2 lines
35 KiB
JavaScript
2 lines
35 KiB
JavaScript
import{d as J,an as Oe,h as o,am as Me,$ as k,g as E,K as Tn,aj as Ke,b as f,a8 as m,ak as pe,E as ae,a3 as V,F as Le,aq as Fn,au as tn,a2 as _e,av as Be,ap as he,a5 as De,P as ke,a7 as fn,af as Ue,X as dn,aw as mn,ax as Ln,a1 as Dn,V as kn,ay as Un,az as an,O as $n,Y as pn,v as Vn,a4 as We,j as Ae,aA as jn}from"./index-f8ee37b9.js";import{b as yn,S as He,c as gn,d as zn,e as Bn,T as Wn}from"./isSymbol-cdcd460d.js";import{c as xe}from"./vnode-b0e810ae.js";import{R as Cn}from"./omit-bdd3cea5.js";import{w as Ge}from"./_plugin-vue_export-helper-775bc553.js";var g={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(e){var l=e.keyCode;if(e.altKey&&!e.ctrlKey||e.metaKey||l>=g.F1&&l<=g.F12)return!1;switch(l){case g.ALT:case g.CAPS_LOCK:case g.CONTEXT_MENU:case g.CTRL:case g.DOWN:case g.END:case g.ESC:case g.HOME:case g.INSERT:case g.LEFT:case g.MAC_FF_META:case g.META:case g.NUMLOCK:case g.NUM_CENTER:case g.PAGE_DOWN:case g.PAGE_UP:case g.PAUSE:case g.PRINT_SCREEN:case g.RIGHT:case g.SHIFT:case g.UP:case g.WIN_KEY:case g.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(e){if(e>=g.ZERO&&e<=g.NINE||e>=g.NUM_ZERO&&e<=g.NUM_MULTIPLY||e>=g.A&&e<=g.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&e===0)return!0;switch(e){case g.SPACE:case g.QUESTION_MARK:case g.NUM_PLUS:case g.NUM_MINUS:case g.NUM_PERIOD:case g.NUM_DIVISION:case g.SEMICOLON:case g.DASH:case g.EQUALS:case g.COMMA:case g.PERIOD:case g.SLASH:case g.APOSTROPHE:case g.SINGLE_QUOTE:case g.OPEN_SQUARE_BRACKET:case g.BACKSLASH:case g.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}};const Hn=g;var hn=Symbol("OverflowContextProviderKey"),Qe=J({compatConfig:{MODE:3},name:"OverflowContextProvider",inheritAttrs:!1,props:{value:{type:Object}},setup:function(e,l){var a=l.slots;return Oe(hn,o(function(){return e.value})),function(){var t;return(t=a.default)===null||t===void 0?void 0:t.call(a)}}}),Gn=function(){return Me(hn,o(function(){return null}))},Yn=["prefixCls","invalidate","item","renderItem","responsive","registerSize","itemKey","display","order","component"],Ie=void 0;const Fe=J({compatConfig:{MODE:3},name:"Item",props:{prefixCls:String,item:k.any,renderItem:Function,responsive:Boolean,itemKey:{type:[String,Number]},registerSize:Function,display:Boolean,order:Number,component:k.any,invalidate:Boolean},setup:function(e,l){var a=l.slots,t=l.expose,r=o(function(){return e.responsive&&!e.display}),c=E();t({itemNodeRef:c});function v(s){e.registerSize(e.itemKey,s)}return Tn(function(){v(null)}),function(){var s,M=e.prefixCls,p=e.invalidate,y=e.item,I=e.renderItem,h=e.responsive;e.registerSize,e.itemKey,e.display;var b=e.order,d=e.component,O=d===void 0?"div":d,w=Ke(e,Yn),Q=(s=a.default)===null||s===void 0?void 0:s.call(a),K=I&&y!==Ie?I(y):Q,_;p||(_={opacity:r.value?0:1,height:r.value?0:Ie,overflowY:r.value?"hidden":Ie,order:h?b:Ie,pointerEvents:r.value?"none":Ie,position:r.value?"absolute":Ie});var j={};return r.value&&(j["aria-hidden"]=!0),f(Cn,{disabled:!h,onResize:function(A){var S=A.offsetWidth;v(S)}},{default:function(){return f(O,m(m(m({class:pe(!p&&M),style:_},j),w),{},{ref:c}),{default:function(){return[K]}})}})}}});var Qn=["component"],Xn=["className"],Zn=["class"];const qn=J({compatConfig:{MODE:3},name:"RawItem",inheritAttrs:!1,props:{component:k.any,title:k.any,id:String,onMouseenter:{type:Function},onMouseleave:{type:Function},onClick:{type:Function},onKeydown:{type:Function},onFocus:{type:Function}},setup:function(e,l){var a=l.slots,t=l.attrs,r=Gn();return function(){if(!r.value){var c,v=e.component,s=v===void 0?"div":v,M=Ke(e,Qn);return f(s,m(m({},M),t),{default:function(){return[(c=a.default)===null||c===void 0?void 0:c.call(a)]}})}var p=r.value,y=p.className,I=Ke(p,Xn),h=t.class,b=Ke(t,Zn);return f(Qe,{value:null},{default:function(){return[f(Fe,m(m(m({class:pe(y,h)},I),b),e),a)]}})}}});var Jn=["class","style"],Mn="responsive",bn="invalidate";function et(n){return"+ ".concat(n.length," ...")}var nt=function(){return{id:String,prefixCls:String,data:Array,itemKey:[String,Number,Function],itemWidth:{type:Number,default:10},renderItem:Function,renderRawItem:Function,maxCount:[Number,String],renderRest:Function,renderRawRest:Function,suffix:k.any,component:String,itemComponent:k.any,onVisibleChange:Function,ssr:String,onMousedown:Function}},je=J({name:"Overflow",inheritAttrs:!1,props:nt(),emits:["visibleChange"],setup:function(e,l){var a=l.attrs,t=l.emit,r=l.slots,c=o(function(){return e.ssr==="full"}),v=E(null),s=o(function(){return v.value||0}),M=E(new Map),p=E(0),y=E(0),I=E(0),h=E(null),b=E(null),d=o(function(){return b.value===null&&c.value?Number.MAX_SAFE_INTEGER:b.value||0}),O=E(!1),w=o(function(){return"".concat(e.prefixCls,"-item")}),Q=o(function(){return Math.max(p.value,y.value)}),K=o(function(){return!!(e.data.length&&e.maxCount===Mn)}),_=o(function(){return e.maxCount===bn}),j=o(function(){return K.value||typeof e.maxCount=="number"&&e.data.length>e.maxCount}),B=o(function(){var P=e.data;return K.value?v.value===null&&c.value?P=e.data:P=e.data.slice(0,Math.min(e.data.length,s.value/e.itemWidth)):typeof e.maxCount=="number"&&(P=e.data.slice(0,e.maxCount)),P}),A=o(function(){return K.value?e.data.slice(d.value+1):e.data.slice(B.value.length)}),S=function(N,T){var R;return typeof e.itemKey=="function"?e.itemKey(N):(R=e.itemKey&&(N==null?void 0:N[e.itemKey]))!==null&&R!==void 0?R:T},x=o(function(){return e.renderItem||function(P){return P}}),W=function(N,T){b.value=N,T||(O.value=N<e.data.length-1,t("visibleChange",N))},Z=function(N,T){v.value=T.clientWidth},le=function(N,T){var R=new Map(M.value);T===null?R.delete(N):R.set(N,T),M.value=R},ee=function(N,T){p.value=y.value,y.value=T},re=function(N,T){I.value=T},ie=function(N){return M.value.get(S(B.value[N],N))};return ae([s,M,y,I,function(){return e.itemKey},B],function(){if(s.value&&Q.value&&B.value){var P=I.value,N=B.value.length,T=N-1;if(!N){W(0),h.value=null;return}for(var R=0;R<N;R+=1){var ne=ie(R);if(ne===void 0){W(R-1,!0);break}if(P+=ne,T===0&&P<=s.value||R===T-1&&P+ie(T)<=s.value){W(T),h.value=null;break}else if(P+Q.value>s.value){W(R-1),h.value=P-ne-I.value+y.value;break}}e.suffix&&ie(0)+I.value>s.value&&(h.value=null)}}),function(){var P=O.value&&!!A.value.length,N=e.itemComponent,T=e.renderRawItem,R=e.renderRawRest,ne=e.renderRest,oe=e.prefixCls,X=oe===void 0?"rc-overflow":oe,ce=e.suffix,i=e.component,u=i===void 0?"div":i,C=e.id,F=e.onMousedown,L=a.class,$=a.style,z=Ke(a,Jn),U={};h.value!==null&&K.value&&(U={position:"absolute",left:"".concat(h.value,"px"),top:0});var G={prefixCls:w.value,responsive:K.value,component:N,invalidate:_.value},se=T?function(q,Y){var fe=S(q,Y);return f(Qe,{key:fe,value:m(m({},G),{},{order:Y,item:q,itemKey:fe,registerSize:le,display:Y<=d.value})},{default:function(){return[T(q,Y)]}})}:function(q,Y){var fe=S(q,Y);return f(Fe,m(m({},G),{},{order:Y,key:fe,item:q,renderItem:x.value,itemKey:fe,registerSize:le,display:Y<=d.value}),null)},ue=function(){return null},ve={order:P?d.value:Number.MAX_SAFE_INTEGER,className:"".concat(w.value," ").concat(w.value,"-rest"),registerSize:ee,display:P};if(R)R&&(ue=function(){return f(Qe,{value:m(m({},G),ve)},{default:function(){return[R(A.value)]}})});else{var be=ne||et;ue=function(){return f(Fe,m(m({},G),ve),{default:function(){return typeof be=="function"?be(A.value):be}})}}var ze=function(){var Y;return f(u,m({id:C,class:pe(!_.value&&X,L),style:$,onMousedown:F},z),{default:function(){return[B.value.map(se),j.value?ue():null,ce&&f(Fe,m(m({},G),{},{order:d.value,class:"".concat(w.value,"-suffix"),registerSize:re,display:!0,style:U}),{default:function(){return ce}}),(Y=r.default)===null||Y===void 0?void 0:Y.call(r)]}})};return f(Cn,{disabled:!K.value,onResize:Z},{default:ze})}}});je.Item=qn;je.RESPONSIVE=Mn;je.INVALIDATE=bn;const Ne=je;var Ee={adjustX:1,adjustY:1},Se=[0,0],tt={topLeft:{points:["bl","tl"],overflow:Ee,offset:[0,-4],targetOffset:Se},topCenter:{points:["bc","tc"],overflow:Ee,offset:[0,-4],targetOffset:Se},topRight:{points:["br","tr"],overflow:Ee,offset:[0,-4],targetOffset:Se},bottomLeft:{points:["tl","bl"],overflow:Ee,offset:[0,4],targetOffset:Se},bottomCenter:{points:["tc","bc"],overflow:Ee,offset:[0,4],targetOffset:Se},bottomRight:{points:["tr","br"],overflow:Ee,offset:[0,4],targetOffset:Se}};const at=tt;var lt=["prefixCls","arrow","showAction","overlayStyle","trigger","placement","align","getPopupContainer","transitionName","animation","overlayClassName"];const Ht=J({compatConfig:{MODE:3},props:{minOverlayWidthMatchTrigger:{type:Boolean,default:void 0},arrow:{type:Boolean,default:!1},prefixCls:k.string.def("rc-dropdown"),transitionName:String,overlayClassName:k.string.def(""),openClassName:String,animation:k.any,align:k.object,overlayStyle:{type:Object,default:void 0},placement:k.string.def("bottomLeft"),overlay:k.any,trigger:k.oneOfType([k.string,k.arrayOf(k.string)]).def("hover"),alignPoint:{type:Boolean,default:void 0},showAction:k.array,hideAction:k.array,getPopupContainer:Function,visible:{type:Boolean,default:void 0},defaultVisible:{type:Boolean,default:!1},mouseEnterDelay:k.number.def(.15),mouseLeaveDelay:k.number.def(.1)},emits:["visibleChange","overlayClick"],slots:["overlay"],setup:function(e,l){var a=l.slots,t=l.emit,r=l.expose,c=E(!!e.visible);ae(function(){return e.visible},function(b){b!==void 0&&(c.value=b)});var v=E();r({triggerRef:v});var s=function(d){e.visible===void 0&&(c.value=!1),t("overlayClick",d)},M=function(d){e.visible===void 0&&(c.value=d),t("visibleChange",d)},p=function(){var d,O=(d=a.overlay)===null||d===void 0?void 0:d.call(a),w={prefixCls:"".concat(e.prefixCls,"-menu"),onClick:s,getPopupContainer:function(){return v.value.getPopupDomNode()}};return f(Le,null,[e.arrow&&f("div",{class:"".concat(e.prefixCls,"-arrow")},null),xe(O,w,!1)])},y=o(function(){var b=e.minOverlayWidthMatchTrigger,d=b===void 0?!e.alignPoint:b;return d}),I=function(){var d,O=(d=a.default)===null||d===void 0?void 0:d.call(a);return c.value&&O?xe(O[0],{class:e.openClassName||"".concat(e.prefixCls,"-open")},!1):O},h=o(function(){return!e.hideAction&&e.trigger.indexOf("contextmenu")!==-1?["click"]:e.hideAction});return function(){var b=e.prefixCls,d=e.arrow,O=e.showAction,w=e.overlayStyle,Q=e.trigger,K=e.placement,_=e.align,j=e.getPopupContainer,B=e.transitionName,A=e.animation,S=e.overlayClassName,x=Ke(e,lt);return f(yn,m(m({},x),{},{prefixCls:b,ref:v,popupClassName:pe(S,V({},"".concat(b,"-show-arrow"),d)),popupStyle:w,builtinPlacements:at,action:Q,showAction:O,hideAction:h.value||[],popupPlacement:K,popupAlign:_,popupTransitionName:B,popupAnimation:A,popupVisible:c.value,stretch:y.value?"minWidth":"",onPopupVisibleChange:M,getPopupContainer:j}),{popup:p,default:I})}}});var ut={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"ellipsis",theme:"outlined"};const it=ut;function ln(n){for(var e=1;e<arguments.length;e++){var l=arguments[e]!=null?Object(arguments[e]):{},a=Object.keys(l);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(l).filter(function(t){return Object.getOwnPropertyDescriptor(l,t).enumerable}))),a.forEach(function(t){rt(n,t,l[t])})}return n}function rt(n,e,l){return e in n?Object.defineProperty(n,e,{value:l,enumerable:!0,configurable:!0,writable:!0}):n[e]=l,n}var qe=function(e,l){var a=ln({},e,l.attrs);return f(Fn,ln({},a,{icon:it}),null)};qe.displayName="EllipsisOutlined";qe.inheritAttrs=!1;const ot=qe;function st(n,e,l,a){var t=l?l.call(a,n,e):void 0;if(t!==void 0)return!!t;if(n===e)return!0;if(_e(n)!=="object"||!n||_e(e)!=="object"||!e)return!1;var r=Object.keys(n),c=Object.keys(e);if(r.length!==c.length)return!1;for(var v=Object.prototype.hasOwnProperty.bind(e),s=0;s<r.length;s++){var M=r[s];if(!v(M))return!1;var p=n[M],y=e[M];if(t=l?l.call(a,p,y,M):void 0,t===!1||t===void 0&&p!==y)return!1}return!0}function Pe(n,e,l,a){return st(tn(n),tn(e),l,a)}var In=Symbol("menuContextKey"),En=function(e){Oe(In,e)},ye=function(){return Me(In)},Sn=Symbol("ForceRenderKey"),ct=function(e){Oe(Sn,e)},Kn=function(){return Me(Sn,!1)},_n=Symbol("menuFirstLevelContextKey"),On=function(e){Oe(_n,e)},vt=function(){return Me(_n,!0)},$e=J({compatConfig:{MODE:3},name:"MenuContextProvider",inheritAttrs:!1,props:{mode:{type:String,default:void 0},overflowDisabled:{type:Boolean,default:void 0},isRootMenu:{type:Boolean,default:void 0}},setup:function(e,l){var a=l.slots,t=ye(),r=m({},t);return e.mode!==void 0&&(r.mode=Be(e,"mode")),e.isRootMenu!==void 0&&(r.isRootMenu=Be(e,"isRootMenu")),e.overflowDisabled!==void 0&&(r.overflowDisabled=Be(e,"overflowDisabled")),En(r),function(){var c;return(c=a.default)===null||c===void 0?void 0:c.call(a)}}});const ft=En;function dt(n,e,l,a){for(var t=n.length,r=l+(a?1:-1);a?r--:++r<t;)if(e(n[r],r,n))return r;return-1}function mt(n){return n!==n}function pt(n,e,l){for(var a=l-1,t=n.length;++a<t;)if(n[a]===e)return a;return-1}function yt(n,e,l){return e===e?pt(n,e,l):dt(n,mt,l)}function gt(n,e){var l=n==null?0:n.length;return!!l&&yt(n,e,0)>-1}function Ct(n,e,l){for(var a=-1,t=n==null?0:n.length;++a<t;)if(l(e,n[a]))return!0;return!1}function ht(){}var Mt=1/0,bt=He&&1/gn(new He([,-0]))[1]==Mt?function(n){return new He(n)}:ht;const It=bt;var Et=200;function St(n,e,l){var a=-1,t=gt,r=n.length,c=!0,v=[],s=v;if(l)c=!1,t=Ct;else if(r>=Et){var M=e?null:It(n);if(M)return gn(M);c=!1,t=Bn,s=new zn}else s=e?[]:v;e:for(;++a<r;){var p=n[a],y=e?e(p):p;if(p=l||p!==0?p:0,c&&y===y){for(var I=s.length;I--;)if(s[I]===y)continue e;e&&s.push(y),v.push(p)}else t(s,y,l)||(s!==v&&s.push(y),v.push(p))}return v}function Ye(n){return n&&n.length?St(n):[]}var Kt=Symbol("siderCollapsed"),Gt=Symbol("siderHookProvider"),Te="$$__vc-menu-more__key",Pn=Symbol("KeyPathContext"),Je=function(){return Me(Pn,{parentEventKeys:o(function(){return[]}),parentKeys:o(function(){return[]}),parentInfo:{}})},_t=function(e,l,a){var t=Je(),r=t.parentEventKeys,c=t.parentKeys,v=o(function(){return[].concat(he(r.value),[e])}),s=o(function(){return[].concat(he(c.value),[l])});return Oe(Pn,{parentEventKeys:v,parentKeys:s,parentInfo:a}),s},Nn=Symbol("measure"),un=J({compatConfig:{MODE:3},setup:function(e,l){var a=l.slots;return Oe(Nn,!0),function(){var t;return(t=a.default)===null||t===void 0?void 0:t.call(a)}}}),en=function(){return Me(Nn,!1)};const Ot=_t;function xn(n){var e=ye(),l=e.mode,a=e.rtl,t=e.inlineIndent;return o(function(){return l.value!=="inline"?null:a.value?{paddingRight:"".concat(n.value*t.value,"px")}:{paddingLeft:"".concat(n.value*t.value,"px")}})}var Pt=0,Nt=function(){return{id:String,role:String,disabled:Boolean,danger:Boolean,title:{type:[String,Boolean],default:void 0},icon:k.any,onMouseenter:Function,onMouseleave:Function,onClick:Function,onKeydown:Function,onFocus:Function}};const Ve=J({compatConfig:{MODE:3},name:"AMenuItem",inheritAttrs:!1,props:Nt(),slots:["icon","title"],setup:function(e,l){var a=l.slots,t=l.emit,r=l.attrs,c=dn(),v=en(),s=_e(c.vnode.key)==="symbol"?String(c.vnode.key):c.vnode.key;De(_e(c.vnode.key)!=="symbol","MenuItem",'MenuItem `:key="'.concat(String(s),'"` not support Symbol type'));var M="menu_item_".concat(++Pt,"_$$_").concat(s),p=Je(),y=p.parentEventKeys,I=p.parentKeys,h=ye(),b=h.prefixCls,d=h.activeKeys,O=h.disabled,w=h.changeActiveKeys,Q=h.rtl,K=h.inlineCollapsed,_=h.siderCollapsed,j=h.onItemClick,B=h.selectedKeys,A=h.registerMenuInfo,S=h.unRegisterMenuInfo,x=vt(),W=E(!1),Z=o(function(){return[].concat(he(I.value),[s])}),le={eventKey:M,key:s,parentEventKeys:y,parentKeys:I,isLeaf:!0};A(M,le),ke(function(){S(M)}),ae(d,function(){W.value=!!d.value.find(function(i){return i===s})},{immediate:!0});var ee=o(function(){return O.value||e.disabled}),re=o(function(){return B.value.includes(s)}),ie=o(function(){var i,u="".concat(b.value,"-item");return i={},V(i,"".concat(u),!0),V(i,"".concat(u,"-danger"),e.danger),V(i,"".concat(u,"-active"),W.value),V(i,"".concat(u,"-selected"),re.value),V(i,"".concat(u,"-disabled"),ee.value),i}),P=function(u){return{key:s,eventKey:M,keyPath:Z.value,eventKeyPath:[].concat(he(y.value),[M]),domEvent:u,item:m(m({},e),r)}},N=function(u){if(!ee.value){var C=P(u);t("click",u),j(C)}},T=function(u){ee.value||(w(Z.value),t("mouseenter",u))},R=function(u){ee.value||(w([]),t("mouseleave",u))},ne=function(u){if(t("keydown",u),u.which===Hn.ENTER){var C=P(u);t("click",u),j(C)}},oe=function(u){w(Z.value),t("focus",u)},X=function(u,C){var F=f("span",{class:"".concat(b.value,"-title-content")},[C]);return(!u||mn(C)&&C.type==="span")&&C&&K.value&&x&&typeof C=="string"?f("div",{class:"".concat(b.value,"-inline-collapsed-noicon")},[C.charAt(0)]):F},ce=xn(o(function(){return Z.value.length}));return function(){var i,u,C,F;if(v)return null;var L=(i=e.title)!==null&&i!==void 0?i:(u=a.title)===null||u===void 0?void 0:u.call(a),$=fn((C=a.default)===null||C===void 0?void 0:C.call(a)),z=$.length,U=L;typeof L>"u"?U=x&&z?$:"":L===!1&&(U="");var G={title:U};!_.value&&!K.value&&(G.title=null,G.visible=!1);var se={};e.role==="option"&&(se["aria-selected"]=re.value);var ue=Ue(a,e,"icon");return f(Wn,m(m({},G),{},{placement:Q.value?"left":"right",overlayClassName:"".concat(b.value,"-inline-collapsed-tooltip")}),{default:function(){return[f(Ne.Item,m(m(m({component:"li"},r),{},{id:e.id,style:m(m({},r.style||{}),ce.value),class:[ie.value,(F={},V(F,"".concat(r.class),!!r.class),V(F,"".concat(b.value,"-item-only-child"),(ue?z+1:z)===1),F)],role:e.role||"menuitem",tabindex:e.disabled?null:-1,"data-menu-id":s,"aria-disabled":e.disabled},se),{},{onMouseenter:T,onMouseleave:R,onClick:N,onKeydown:ne,onFocus:oe,title:typeof L=="string"?L:void 0}),{default:function(){return[xe(ue,{class:"".concat(b.value,"-item-icon")},!1),X(ue,$)]}})]}})}}});var me={adjustX:1,adjustY:1},xt={topLeft:{points:["bl","tl"],overflow:me,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:me,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:me,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:me,offset:[4,0]}},Rt={topLeft:{points:["bl","tl"],overflow:me,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:me,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:me,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:me,offset:[4,0]}},wt={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};const rn=J({compatConfig:{MODE:3},name:"PopupTrigger",inheritAttrs:!1,props:{prefixCls:String,mode:String,visible:Boolean,popupClassName:String,popupOffset:Array,disabled:Boolean,onVisibleChange:Function},slots:["popup"],emits:["visibleChange"],setup:function(e,l){var a=l.slots,t=l.emit,r=E(!1),c=ye(),v=c.getPopupContainer,s=c.rtl,M=c.subMenuOpenDelay,p=c.subMenuCloseDelay,y=c.builtinPlacements,I=c.triggerSubMenuAction,h=c.isRootMenu,b=c.forceSubMenuRender,d=c.motion,O=c.defaultMotions,w=Kn(),Q=o(function(){return s.value?m(m({},Rt),y.value):m(m({},xt),y.value)}),K=o(function(){return wt[e.mode]}),_=E();ae(function(){return e.visible},function(A){Ge.cancel(_.value),_.value=Ge(function(){r.value=A})},{immediate:!0}),ke(function(){Ge.cancel(_.value)});var j=function(S){t("visibleChange",S)},B=o(function(){var A,S,x=d.value||((A=O.value)===null||A===void 0?void 0:A[e.mode])||((S=O.value)===null||S===void 0?void 0:S.other),W=typeof x=="function"?x():x;return W?Ln(W.name,{css:!0}):void 0});return function(){var A=e.prefixCls,S=e.popupClassName,x=e.mode,W=e.popupOffset,Z=e.disabled;return f(yn,{prefixCls:A,popupClassName:pe("".concat(A,"-popup"),V({},"".concat(A,"-rtl"),s.value),S),stretch:x==="horizontal"?"minWidth":null,getPopupContainer:h.value?v.value:function(le){return le.parentNode},builtinPlacements:Q.value,popupPlacement:K.value,popupVisible:r.value,popupAlign:W&&{offset:W},action:Z?[]:[I.value],mouseEnterDelay:M.value,mouseLeaveDelay:p.value,onPopupVisibleChange:j,forceRender:w||b.value,popupAnimation:B.value},{popup:a.popup,default:a.default})}}});var Rn=function(e,l){var a,t=l.slots,r=l.attrs,c=ye(),v=c.prefixCls,s=c.mode;return f("ul",m(m({},r),{},{class:pe(v.value,"".concat(v.value,"-sub"),"".concat(v.value,"-").concat(s.value==="inline"?"inline":"vertical")),"data-menu-list":!0}),[(a=t.default)===null||a===void 0?void 0:a.call(t)])};Rn.displayName="SubMenuList";const wn=Rn,At=J({compatConfig:{MODE:3},name:"InlineSubMenuList",inheritAttrs:!1,props:{id:String,open:Boolean,keyPath:Array},setup:function(e,l){var a=l.slots,t=o(function(){return"inline"}),r=ye(),c=r.motion,v=r.mode,s=r.defaultMotions,M=o(function(){return v.value===t.value}),p=E(!M.value),y=o(function(){return M.value?e.open:!1});ae(v,function(){M.value&&(p.value=!1)},{flush:"post"});var I=o(function(){var h,b,d=c.value||((h=s.value)===null||h===void 0?void 0:h[t.value])||((b=s.value)===null||b===void 0?void 0:b.other),O=typeof d=="function"?d():d;return m(m({},O),{},{appear:e.keyPath.length<=1})});return function(){var h;return p.value?null:f($e,{mode:t.value},{default:function(){return[f(Dn,I.value,{default:function(){return[kn(f(wn,{id:e.id},{default:function(){return[(h=a.default)===null||h===void 0?void 0:h.call(a)]}}),[[Un,y.value]])]}})]}})}}});var on=0,Tt=function(){return{icon:k.any,title:k.any,disabled:Boolean,level:Number,popupClassName:String,popupOffset:Array,internalPopupClose:Boolean,eventKey:String,expandIcon:Function,onMouseenter:Function,onMouseleave:Function,onTitleClick:Function}};const Re=J({compatConfig:{MODE:3},name:"ASubMenu",inheritAttrs:!1,props:Tt(),slots:["icon","title","expandIcon"],setup:function(e,l){var a,t,r=l.slots,c=l.attrs,v=l.emit;On(!1);var s=en(),M=dn(),p=_e(M.vnode.key)==="symbol"?String(M.vnode.key):M.vnode.key;De(_e(M.vnode.key)!=="symbol","SubMenu",'SubMenu `:key="'.concat(String(p),'"` not support Symbol type'));var y=an(p)?p:"sub_menu_".concat(++on,"_$$_not_set_key"),I=(a=e.eventKey)!==null&&a!==void 0?a:an(p)?"sub_menu_".concat(++on,"_$$_").concat(p):y,h=Je(),b=h.parentEventKeys,d=h.parentInfo,O=h.parentKeys,w=o(function(){return[].concat(he(O.value),[y])}),Q=E([]),K={eventKey:I,key:y,parentEventKeys:b,childrenEventKeys:Q,parentKeys:O};(t=d.childrenEventKeys)===null||t===void 0||t.value.push(I),ke(function(){if(d.childrenEventKeys){var H;d.childrenEventKeys.value=(H=d.childrenEventKeys)===null||H===void 0?void 0:H.value.filter(function(D){return D!=I})}}),Ot(I,y,K);var _=ye(),j=_.prefixCls,B=_.activeKeys,A=_.disabled,S=_.changeActiveKeys,x=_.mode,W=_.inlineCollapsed,Z=_.antdMenuTheme,le=_.openKeys,ee=_.overflowDisabled,re=_.onOpenChange,ie=_.registerMenuInfo,P=_.unRegisterMenuInfo,N=_.selectedSubMenuKeys,T=_.expandIcon,R=p!=null,ne=!s&&(Kn()||!R);ct(ne),(s&&R||!s&&!R||ne)&&(ie(I,K),ke(function(){P(I)}));var oe=o(function(){return"".concat(j.value,"-submenu")}),X=o(function(){return A.value||e.disabled}),ce=E(),i=E(),u=o(function(){return le.value.includes(y)}),C=o(function(){return!ee.value&&u.value}),F=o(function(){return N.value.includes(y)}),L=E(!1);ae(B,function(){L.value=!!B.value.find(function(H){return H===y})},{immediate:!0});var $=function(D){X.value||(v("titleClick",D,y),x.value==="inline"&&re(y,!u.value))},z=function(D){X.value||(S(w.value),v("mouseenter",D))},U=function(D){X.value||(S([]),v("mouseleave",D))},G=xn(o(function(){return w.value.length})),se=function(D){x.value!=="inline"&&re(y,D)},ue=function(){S(w.value)},ve=I&&"".concat(I,"-popup"),be=o(function(){return pe(j.value,"".concat(j.value,"-").concat(Z.value),e.popupClassName)}),ze=function(D,te){if(!te)return W.value&&!O.value.length&&D&&typeof D=="string"?f("div",{class:"".concat(j.value,"-inline-collapsed-noicon")},[D.charAt(0)]):f("span",{class:"".concat(j.value,"-title-content")},[D]);var de=mn(D)&&D.type==="span";return f(Le,null,[xe(te,{class:"".concat(j.value,"-item-icon")},!1),de?D:f("span",{class:"".concat(j.value,"-title-content")},[D])])},q=o(function(){return x.value!=="inline"&&w.value.length>1?"vertical":x.value}),Y=o(function(){return x.value==="horizontal"?"vertical":x.value}),fe=o(function(){return q.value==="horizontal"?"vertical":q.value}),we=function(){var D=oe.value,te=Ue(r,e,"icon"),de=e.expandIcon||r.expandIcon||T.value,ge=ze(Ue(r,e,"title"),te);return f("div",{style:G.value,class:"".concat(D,"-title"),tabindex:X.value?null:-1,ref:ce,title:typeof ge=="string"?ge:null,"data-menu-id":y,"aria-expanded":C.value,"aria-haspopup":!0,"aria-controls":ve,"aria-disabled":X.value,onClick:$,onFocus:ue},[ge,x.value!=="horizontal"&&de?de(m(m({},e),{},{isOpen:C.value})):f("i",{class:"".concat(D,"-arrow")},null)])};return function(){var H;if(s){var D;return R?(D=r.default)===null||D===void 0?void 0:D.call(r):null}var te=oe.value,de=function(){return null};return!ee.value&&x.value!=="inline"?de=function(){return f(rn,{mode:q.value,prefixCls:te,visible:!e.internalPopupClose&&C.value,popupClassName:be.value,popupOffset:e.popupOffset,disabled:X.value,onVisibleChange:se},{default:function(){return[we()]},popup:function(){return f($e,{mode:fe.value,isRootMenu:!1},{default:function(){return[f(wn,{id:ve,ref:i},{default:r.default})]}})}})}:de=function(){return f(rn,null,{default:we})},f($e,{mode:Y.value},{default:function(){return[f(Ne.Item,m(m({component:"li"},c),{},{role:"none",class:pe(te,"".concat(te,"-").concat(x.value),c.class,(H={},V(H,"".concat(te,"-open"),C.value),V(H,"".concat(te,"-active"),L.value),V(H,"".concat(te,"-selected"),F.value),V(H,"".concat(te,"-disabled"),X.value),H)),onMouseenter:z,onMouseleave:U,"data-submenu-id":y}),{default:function(){return f(Le,null,[de(),!ee.value&&f(At,{id:ve,open:C.value,keyPath:w.value},{default:r.default})])}})]}})}}});function An(n,e){if(n.classList)return n.classList.contains(e);var l=n.className;return" ".concat(l," ").indexOf(" ".concat(e," "))>-1}function sn(n,e){n.classList?n.classList.add(e):An(n,e)||(n.className="".concat(n.className," ").concat(e))}function cn(n,e){if(n.classList)n.classList.remove(e);else if(An(n,e)){var l=n.className;n.className=" ".concat(l," ").replace(" ".concat(e," ")," ")}}var Ft=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"ant-motion-collapse",l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return{name:e,appear:l,css:!0,onBeforeEnter:function(t){t.style.height="0px",t.style.opacity="0",sn(t,e)},onEnter:function(t){$n(function(){t.style.height="".concat(t.scrollHeight,"px"),t.style.opacity="1"})},onAfterEnter:function(t){t&&(cn(t,e),t.style.height=null,t.style.opacity=null)},onBeforeLeave:function(t){sn(t,e),t.style.height="".concat(t.offsetHeight,"px"),t.style.opacity=null},onLeave:function(t){setTimeout(function(){t.style.height="0px",t.style.opacity="0"})},onAfterLeave:function(t){t&&(cn(t,e),t.style&&(t.style.height=null,t.style.opacity=null))}}};const Lt=Ft;var Dt=function(){return{id:String,prefixCls:String,disabled:Boolean,inlineCollapsed:Boolean,disabledOverflow:Boolean,forceSubMenuRender:Boolean,openKeys:Array,selectedKeys:Array,activeKey:String,selectable:{type:Boolean,default:!0},multiple:{type:Boolean,default:!1},motion:Object,theme:{type:String,default:"light"},mode:{type:String,default:"vertical"},inlineIndent:{type:Number,default:24},subMenuOpenDelay:{type:Number,default:.1},subMenuCloseDelay:{type:Number,default:.1},builtinPlacements:{type:Object},triggerSubMenuAction:{type:String,default:"hover"},getPopupContainer:Function,expandIcon:Function,onOpenChange:Function,onSelect:Function,onDeselect:Function,onClick:[Function,Array],onFocus:Function,onBlur:Function,onMousedown:Function,"onUpdate:openKeys":Function,"onUpdate:selectedKeys":Function,"onUpdate:activeKey":Function}},vn=[];const Ce=J({compatConfig:{MODE:3},name:"AMenu",inheritAttrs:!1,props:Dt(),slots:["expandIcon","overflowedIndicator"],setup:function(e,l){var a=l.slots,t=l.emit,r=l.attrs,c=pn("menu",e),v=c.prefixCls,s=c.direction,M=c.getPrefixCls,p=E({}),y=Me(Kt,E(void 0)),I=o(function(){return y.value!==void 0?y.value:e.inlineCollapsed}),h=E(!1);Vn(function(){h.value=!0}),We(function(){De(!(e.inlineCollapsed===!0&&e.mode!=="inline"),"Menu","`inlineCollapsed` should only be used when `mode` is inline."),De(!(y.value!==void 0&&e.inlineCollapsed===!0),"Menu","`inlineCollapsed` not control Menu under Sider. Should set `collapsed` on Sider instead.")});var b=E([]),d=E([]),O=E({});ae(p,function(){for(var i={},u=0,C=Object.values(p.value);u<C.length;u++){var F=C[u];i[F.key]=F}O.value=i},{flush:"post"}),We(function(){if(e.activeKey!==void 0){var i=[],u=e.activeKey?O.value[e.activeKey]:void 0;u&&e.activeKey!==void 0?i=Ye([].concat(Ae(u.parentKeys),e.activeKey)):i=[],Pe(b.value,i)||(b.value=i)}}),ae(function(){return e.selectedKeys},function(i){i&&(d.value=i.slice())},{immediate:!0,deep:!0});var w=E([]);ae([O,d],function(){var i=[];d.value.forEach(function(u){var C=O.value[u];C&&(i=i.concat(Ae(C.parentKeys)))}),i=Ye(i),Pe(w.value,i)||(w.value=i)},{immediate:!0});var Q=function(u){if(e.selectable){var C=u.key,F=d.value.includes(C),L;e.multiple?F?L=d.value.filter(function(z){return z!==C}):L=[].concat(he(d.value),[C]):L=[C];var $=m(m({},u),{},{selectedKeys:L});Pe(L,d.value)||(e.selectedKeys===void 0&&(d.value=L),t("update:selectedKeys",L),F&&e.multiple?t("deselect",$):t("select",$)),S.value!=="inline"&&!e.multiple&&K.value.length&&Z(vn)}},K=E([]);ae(function(){return e.openKeys},function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:K.value;Pe(K.value,i)||(K.value=i.slice())},{immediate:!0,deep:!0});var _,j=function(u){clearTimeout(_),_=setTimeout(function(){e.activeKey===void 0&&(b.value=u),t("update:activeKey",u[u.length-1])})},B=o(function(){return!!e.disabled}),A=o(function(){return s.value==="rtl"}),S=E("vertical"),x=E(!1);We(function(){(e.mode==="inline"||e.mode==="vertical")&&I.value?(S.value="vertical",x.value=I.value):(S.value=e.mode,x.value=!1)});var W=o(function(){return S.value==="inline"}),Z=function(u){K.value=u,t("update:openKeys",u),t("openChange",u)},le=E(K.value),ee=E(!1);ae(K,function(){W.value&&(le.value=K.value)},{immediate:!0}),ae(W,function(){if(!ee.value){ee.value=!0;return}W.value?K.value=le.value:Z(vn)},{immediate:!0});var re=o(function(){var i;return i={},V(i,"".concat(v.value),!0),V(i,"".concat(v.value,"-root"),!0),V(i,"".concat(v.value,"-").concat(S.value),!0),V(i,"".concat(v.value,"-inline-collapsed"),x.value),V(i,"".concat(v.value,"-rtl"),A.value),V(i,"".concat(v.value,"-").concat(e.theme),!0),i}),ie=o(function(){return M()}),P=o(function(){return{horizontal:{name:"".concat(ie.value,"-slide-up")},inline:Lt,other:{name:"".concat(ie.value,"-zoom-big")}}});On(!0);var N=function i(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],C=[],F=p.value;return u.forEach(function(L){var $=F[L],z=$.key,U=$.childrenEventKeys;C.push.apply(C,[z].concat(he(i(Ae(U)))))}),C},T=function(u){t("click",u),Q(u)},R=function(u,C){var F,L=((F=O.value[u])===null||F===void 0?void 0:F.childrenEventKeys)||[],$=K.value.filter(function(U){return U!==u});if(C)$.push(u);else if(S.value!=="inline"){var z=N(Ae(L));$=Ye($.filter(function(U){return!z.includes(U)}))}Pe(K,$)||Z($)},ne=function(u,C){p.value=m(m({},p.value),{},V({},u,C))},oe=function(u){delete p.value[u],p.value=m({},p.value)},X=E(0),ce=o(function(){return e.expandIcon||a.expandIcon?function(i){var u=e.expandIcon||a.expandIcon;return u=typeof u=="function"?u(i):u,xe(u,{class:"".concat(v.value,"-submenu-expand-icon")},!1)}:null});return ft({store:p,prefixCls:v,activeKeys:b,openKeys:K,selectedKeys:d,changeActiveKeys:j,disabled:B,rtl:A,mode:S,inlineIndent:o(function(){return e.inlineIndent}),subMenuCloseDelay:o(function(){return e.subMenuCloseDelay}),subMenuOpenDelay:o(function(){return e.subMenuOpenDelay}),builtinPlacements:o(function(){return e.builtinPlacements}),triggerSubMenuAction:o(function(){return e.triggerSubMenuAction}),getPopupContainer:o(function(){return e.getPopupContainer}),inlineCollapsed:x,antdMenuTheme:o(function(){return e.theme}),siderCollapsed:y,defaultMotions:o(function(){return h.value?P.value:null}),motion:o(function(){return h.value?e.motion:null}),overflowDisabled:E(void 0),onOpenChange:R,onItemClick:T,registerMenuInfo:ne,unRegisterMenuInfo:oe,selectedSubMenuKeys:w,isRootMenu:E(!0),expandIcon:ce,forceSubMenuRender:o(function(){return e.forceSubMenuRender})}),function(){var i,u,C=fn((i=a.default)===null||i===void 0?void 0:i.call(a)),F=X.value>=C.length-1||S.value!=="horizontal"||e.disabledOverflow,L=S.value!=="horizontal"||e.disabledOverflow?C:C.map(function(z,U){return f($e,{key:z.key,overflowDisabled:U>X.value},{default:function(){return z}})}),$=((u=a.overflowedIndicator)===null||u===void 0?void 0:u.call(a))||f(ot,null,null);return f(Ne,m(m({},r),{},{onMousedown:e.onMousedown,prefixCls:"".concat(v.value,"-overflow"),component:"ul",itemComponent:Ve,class:[re.value,r.class],role:"menu",id:e.id,data:L,renderRawItem:function(U){return U},renderRawRest:function(U){var G=U.length,se=G?C.slice(-G):null;return f(Le,null,[f(Re,{eventKey:Te,key:Te,title:$,disabled:F,internalPopupClose:G===0},{default:function(){return se}}),f(un,null,{default:function(){return[f(Re,{eventKey:Te,key:Te,title:$,disabled:F,internalPopupClose:G===0},{default:function(){return se}})]}})])},maxCount:S.value!=="horizontal"||e.disabledOverflow?Ne.INVALIDATE:Ne.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(U){X.value=U}}),{default:function(){return[f(jn,{to:"body"},{default:function(){return[f("div",{style:{display:"none"},"aria-hidden":!0},[f(un,null,{default:function(){return[L]}})])]}})]}})}}});var kt=function(){return{title:k.any}};const Xe=J({compatConfig:{MODE:3},name:"AMenuItemGroup",inheritAttrs:!1,props:kt(),slots:["title"],setup:function(e,l){var a=l.slots,t=l.attrs,r=ye(),c=r.prefixCls,v=o(function(){return"".concat(c.value,"-item-group")}),s=en();return function(){var M,p;return s?(M=a.default)===null||M===void 0?void 0:M.call(a):f("li",m(m({},t),{},{onClick:function(I){return I.stopPropagation()},class:v.value}),[f("div",{title:typeof e.title=="string"?e.title:void 0,class:"".concat(v.value,"-title")},[Ue(a,e,"title")]),f("ul",{class:"".concat(v.value,"-list")},[(p=a.default)===null||p===void 0?void 0:p.call(a)])])}}});var Ut=function(){return{prefixCls:String,dashed:Boolean}};const Ze=J({compatConfig:{MODE:3},name:"AMenuDivider",props:Ut(),setup:function(e){var l=pn("menu",e),a=l.prefixCls,t=o(function(){var r;return r={},V(r,"".concat(a.value,"-item-divider"),!0),V(r,"".concat(a.value,"-item-divider-dashed"),!!e.dashed),r});return function(){return f("li",{class:t.value},null)}}});Ce.install=function(n){return n.component(Ce.name,Ce),n.component(Ve.name,Ve),n.component(Re.name,Re),n.component(Ze.name,Ze),n.component(Xe.name,Xe),n};Ce.Item=Ve;Ce.Divider=Ze;Ce.SubMenu=Re;Ce.ItemGroup=Xe;export{Ht as D,ot as E,Xe as I,Hn as K,Ce as M,Ne as O,Gt as S,Ve as _,Re as a,Ze as b,Kt as c,dt as d,Lt as e,Ct as f,gt as g,Pe as s};
|