import Fe from"./CCyh6GyX.js";import{a as uo,_ as vo}from"./DKJdaRAD.js";import{g as j,Q as v,bC as mo,b2 as ee,a2 as h,bf as ho,bg as fo,a1 as I,ag as m,a9 as go,a3 as po,b8 as Be,a4 as ue,r as B,C as z,X as q,ai as ve,p as bo,k as Ce,K as xo,D as Le,i as G,f5 as Co,ah as yo,b0 as zo,Y as _o,f6 as wo,a0 as So,c5 as Ae,aV as H,W as je,f7 as Me,b3 as X,aa as Ke,a6 as de,ac as D,bm as re,bn as Io,dd as J,bB as Se,a7 as ye,F as Ve,am as me,aY as Ro,br as Po,aR as To,f8 as ko,m as Ue,I as Ao,j as Oo,P as Z,o as V,w as W,a as F,c as Q,E as ce,b as U,t as ne,q as $,c0 as No,f9 as Ho,V as Eo,S as $o,M as Oe,d as he,fa as Ne,c1 as Fo}from"./Czresmtb.js";import{i as Bo,a as He}from"./DWO5ARJy.js";import{_ as De}from"./TP8I8QlK.js";import{_ as Lo}from"./DzwEWf_k.js";import{C as jo}from"./Dhvxr_Pa.js";import{f as fe,u as ze}from"./CFdxo1g5.js";import{t as Mo,V as Ko}from"./DRcMdvSr.js";import{_ as We}from"./CBaAmZ2K.js";import{u as Vo}from"./BwhG0EbZ.js";import{r as ge}from"./poFbq7Xm.js";import{_ as Uo}from"./DlAUqK2U.js";import{_ as Do}from"./D3k1Qa3g.js";import"./CM8LO42l.js";import"./D4t6JTJM.js";import"./C5Ksf8W7.js";import"./Bk_rJcZu.js";const Wo=j({name:"ChevronDownFilled",render(){return v("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},v("path",{d:"M3.20041 5.73966C3.48226 5.43613 3.95681 5.41856 4.26034 5.70041L8 9.22652L11.7397 5.70041C12.0432 5.41856 12.5177 5.43613 12.7996 5.73966C13.0815 6.0432 13.0639 6.51775 12.7603 6.7996L8.51034 10.7996C8.22258 11.0668 7.77743 11.0668 7.48967 10.7996L3.23966 6.7996C2.93613 6.51775 2.91856 6.0432 3.20041 5.73966Z",fill:"currentColor"}))}}),Go=mo&&"loading"in document.createElement("img");function qo(e={}){var o;const{root:t=null}=e;return{hash:`${e.rootMargin||"0px 0px 0px 0px"}-${Array.isArray(e.threshold)?e.threshold.join(","):(o=e.threshold)!==null&&o!==void 0?o:"0"}`,options:Object.assign(Object.assign({},e),{root:(typeof t=="string"?document.querySelector(t):t)||document.documentElement})}}const pe=new WeakMap,be=new WeakMap,xe=new WeakMap,Yo=(e,o,t)=>{if(!e)return()=>{};const l=qo(o),{root:a}=l.options;let n;const c=pe.get(a);c?n=c:(n=new Map,pe.set(a,n));let d,s;n.has(l.hash)?(s=n.get(l.hash),s[1].has(e)||(d=s[0],s[1].add(e),d.observe(e))):(d=new IntersectionObserver(_=>{_.forEach(u=>{if(u.isIntersecting){const P=be.get(u.target),A=xe.get(u.target);P&&P(),A&&(A.value=!0)}})},l.options),d.observe(e),s=[d,new Set([e])],n.set(l.hash,s));let b=!1;const x=()=>{b||(be.delete(e),xe.delete(e),b=!0,s[1].has(e)&&(s[0].unobserve(e),s[1].delete(e)),s[1].size<=0&&n.delete(l.hash),n.size||pe.delete(a))};return be.set(e,x),xe.set(e,t),x},Xo=ee("n-avatar-group"),Qo=h("avatar",`
 width: var(--n-merged-size);
 height: var(--n-merged-size);
 color: #FFF;
 font-size: var(--n-font-size);
 display: inline-flex;
 position: relative;
 overflow: hidden;
 text-align: center;
 border: var(--n-border);
 border-radius: var(--n-border-radius);
 --n-merged-color: var(--n-color);
 background-color: var(--n-merged-color);
 transition:
 border-color .3s var(--n-bezier),
 background-color .3s var(--n-bezier),
 color .3s var(--n-bezier);
`,[ho(I("&","--n-merged-color: var(--n-color-modal);")),fo(I("&","--n-merged-color: var(--n-color-popover);")),I("img",`
 width: 100%;
 height: 100%;
 `),m("text",`
 white-space: nowrap;
 display: inline-block;
 position: absolute;
 left: 50%;
 top: 50%;
 `),h("icon",`
 vertical-align: bottom;
 font-size: calc(var(--n-merged-size) - 6px);
 `),m("text","line-height: 1.25")]),Zo=Object.assign(Object.assign({},q.props),{size:[String,Number],src:String,circle:{type:Boolean,default:void 0},objectFit:String,round:{type:Boolean,default:void 0},bordered:{type:Boolean,default:void 0},onError:Function,fallbackSrc:String,intersectionObserverOptions:Object,lazy:Boolean,onLoad:Function,renderPlaceholder:Function,renderFallback:Function,imgProps:Object,color:String}),Jo=j({name:"Avatar",props:Zo,slots:Object,setup(e){const{mergedClsPrefixRef:o,inlineThemeDisabled:t}=ue(e),l=B(!1);let a=null;const n=B(null),c=B(null),d=()=>{const{value:f}=n;if(f&&(a===null||a!==f.innerHTML)){a=f.innerHTML;const{value:S}=c;if(S){const{offsetWidth:N,offsetHeight:k}=S,{offsetWidth:p,offsetHeight:w}=f,M=.9,K=Math.min(N/p*M,k/w*M,1);f.style.transform=`translateX(-50%) translateY(-50%) scale(${K})`}}},s=G(Xo,null),b=z(()=>{const{size:f}=e;if(f)return f;const{size:S}=s||{};return S||"medium"}),x=q("Avatar","-avatar",Qo,Co,e,o),_=G(Mo,null),u=z(()=>{if(s)return!0;const{round:f,circle:S}=e;return f!==void 0||S!==void 0?f||S:_?_.roundRef.value:!1}),P=z(()=>s?!0:e.bordered||!1),A=z(()=>{const f=b.value,S=u.value,N=P.value,{color:k}=e,{self:{borderRadius:p,fontSize:w,color:M,border:K,colorModal:oe,colorPopover:L},common:{cubicBezierEaseInOut:le}}=x.value;let te;return typeof f=="number"?te=`${f}px`:te=x.value.self[yo("height",f)],{"--n-font-size":w,"--n-border":N?K:"none","--n-border-radius":S?"50%":p,"--n-color":k||M,"--n-color-modal":k||oe,"--n-color-popover":k||L,"--n-bezier":le,"--n-merged-size":`var(--n-avatar-size-override, ${te})`}}),y=t?ve("avatar",z(()=>{const f=b.value,S=u.value,N=P.value,{color:k}=e;let p="";return f&&(typeof f=="number"?p+=`a${f}`:p+=f[0]),S&&(p+="b"),N&&(p+="c"),k&&(p+=zo(k)),p}),A,e):void 0,T=B(!e.lazy);bo(()=>{if(e.lazy&&e.intersectionObserverOptions){let f;const S=Ce(()=>{f==null||f(),f=void 0,e.lazy&&(f=Yo(c.value,e.intersectionObserverOptions,T))});xo(()=>{S(),f==null||f()})}}),Le(()=>{var f;return e.src||((f=e.imgProps)===null||f===void 0?void 0:f.src)},()=>{l.value=!1});const O=B(!e.lazy);return{textRef:n,selfRef:c,mergedRoundRef:u,mergedClsPrefix:o,fitTextTransform:d,cssVars:t?void 0:A,themeClass:y==null?void 0:y.themeClass,onRender:y==null?void 0:y.onRender,hasLoadError:l,shouldStartLoading:T,loaded:O,mergedOnError:f=>{if(!T.value)return;l.value=!0;const{onError:S,imgProps:{onError:N}={}}=e;S==null||S(f),N==null||N(f)},mergedOnLoad:f=>{const{onLoad:S,imgProps:{onLoad:N}={}}=e;S==null||S(f),N==null||N(f),O.value=!0}}},render(){var e,o;const{$slots:t,src:l,mergedClsPrefix:a,lazy:n,onRender:c,loaded:d,hasLoadError:s,imgProps:b={}}=this;c==null||c();let x;const _=!d&&!s&&(this.renderPlaceholder?this.renderPlaceholder():(o=(e=this.$slots).placeholder)===null||o===void 0?void 0:o.call(e));return this.hasLoadError?x=this.renderFallback?this.renderFallback():go(t.fallback,()=>[v("img",{src:this.fallbackSrc,style:{objectFit:this.objectFit}})]):x=po(t.default,u=>{if(u)return v(Be,{onResize:this.fitTextTransform},{default:()=>v("span",{ref:"textRef",class:`${a}-avatar__text`},u)});if(l||b.src){const P=this.src||b.src;return v("img",Object.assign(Object.assign({},b),{loading:Go&&!this.intersectionObserverOptions&&n?"lazy":"eager",src:n&&this.intersectionObserverOptions?this.shouldStartLoading?P:void 0:P,"data-image-src":P,onLoad:this.mergedOnLoad,onError:this.mergedOnError,style:[b.style||"",{objectFit:this.objectFit},_?{height:"0",width:"0",visibility:"hidden",position:"absolute"}:""]}))}}),v("span",{ref:"selfRef",class:[`${a}-avatar`,this.themeClass],style:this.cssVars},x,n&&_)}});function et(e){const{baseColor:o,textColor2:t,bodyColor:l,cardColor:a,dividerColor:n,actionColor:c,scrollbarColor:d,scrollbarColorHover:s,invertedColor:b}=e;return{textColor:t,textColorInverted:"#FFF",color:l,colorEmbedded:c,headerColor:a,headerColorInverted:b,footerColor:c,footerColorInverted:b,headerBorderColor:n,headerBorderColorInverted:b,footerBorderColor:n,footerBorderColorInverted:b,siderBorderColor:n,siderBorderColorInverted:b,siderColor:a,siderColorInverted:b,siderToggleButtonBorder:`1px solid ${n}`,siderToggleButtonColor:o,siderToggleButtonIconColor:t,siderToggleButtonIconColorInverted:t,siderToggleBarColor:Ae(l,d),siderToggleBarColorHover:Ae(l,s),__invertScrollbar:"true"}}const Ge=_o({name:"Layout",common:So,peers:{Scrollbar:wo},self:et}),qe=ee("n-layout-sider"),Ye={type:String,default:"static"},ot=h("layout",`
 color: var(--n-text-color);
 background-color: var(--n-color);
 box-sizing: border-box;
 position: relative;
 z-index: auto;
 flex: auto;
 overflow: hidden;
 transition:
 box-shadow .3s var(--n-bezier),
 background-color .3s var(--n-bezier),
 color .3s var(--n-bezier);
`,[h("layout-scroll-container",`
 overflow-x: hidden;
 box-sizing: border-box;
 height: 100%;
 `),H("absolute-positioned",`
 position: absolute;
 left: 0;
 right: 0;
 top: 0;
 bottom: 0;
 `)]),tt={embedded:Boolean,position:Ye,nativeScrollbar:{type:Boolean,default:!0},scrollbarProps:Object,onScroll:Function,contentClass:String,contentStyle:{type:[String,Object],default:""},hasSider:Boolean,siderPlacement:{type:String,default:"left"}},Xe=ee("n-layout");function rt(e){return j({name:"Layout",props:Object.assign(Object.assign({},q.props),tt),setup(o){const t=B(null),l=B(null),{mergedClsPrefixRef:a,inlineThemeDisabled:n}=ue(o),c=q("Layout","-layout",ot,Ge,o,a);function d(y,T){if(o.nativeScrollbar){const{value:O}=t;O&&(T===void 0?O.scrollTo(y):O.scrollTo(y,T))}else{const{value:O}=l;O&&O.scrollTo(y,T)}}X(Xe,o);let s=0,b=0;const x=y=>{var T;const O=y.target;s=O.scrollLeft,b=O.scrollTop,(T=o.onScroll)===null||T===void 0||T.call(o,y)};Me(()=>{if(o.nativeScrollbar){const y=t.value;y&&(y.scrollTop=b,y.scrollLeft=s)}});const _={display:"flex",flexWrap:"nowrap",width:"100%",flexDirection:"row"},u={scrollTo:d},P=z(()=>{const{common:{cubicBezierEaseInOut:y},self:T}=c.value;return{"--n-bezier":y,"--n-color":o.embedded?T.colorEmbedded:T.color,"--n-text-color":T.textColor}}),A=n?ve("layout",z(()=>o.embedded?"e":""),P,o):void 0;return Object.assign({mergedClsPrefix:a,scrollableElRef:t,scrollbarInstRef:l,hasSiderStyle:_,mergedTheme:c,handleNativeElScroll:x,cssVars:n?void 0:P,themeClass:A==null?void 0:A.themeClass,onRender:A==null?void 0:A.onRender},u)},render(){var o;const{mergedClsPrefix:t,hasSider:l}=this;(o=this.onRender)===null||o===void 0||o.call(this);const a=l?this.hasSiderStyle:void 0,n=[this.themeClass,e,`${t}-layout`,`${t}-layout--${this.position}-positioned`];return v("div",{class:n,style:this.cssVars},this.nativeScrollbar?v("div",{ref:"scrollableElRef",class:[`${t}-layout-scroll-container`,this.contentClass],style:[this.contentStyle,a],onScroll:this.handleNativeElScroll},this.$slots):v(je,Object.assign({},this.scrollbarProps,{onScroll:this.onScroll,ref:"scrollbarInstRef",theme:this.mergedTheme.peers.Scrollbar,themeOverrides:this.mergedTheme.peerOverrides.Scrollbar,contentClass:this.contentClass,contentStyle:[this.contentStyle,a]}),this.$slots))}})}const nt=rt(!1),it=h("layout-sider",`
 flex-shrink: 0;
 box-sizing: border-box;
 position: relative;
 z-index: 1;
 color: var(--n-text-color);
 transition:
 color .3s var(--n-bezier),
 border-color .3s var(--n-bezier),
 min-width .3s var(--n-bezier),
 max-width .3s var(--n-bezier),
 transform .3s var(--n-bezier),
 background-color .3s var(--n-bezier);
 background-color: var(--n-color);
 display: flex;
 justify-content: flex-end;
`,[H("bordered",[m("border",`
 content: "";
 position: absolute;
 top: 0;
 bottom: 0;
 width: 1px;
 background-color: var(--n-border-color);
 transition: background-color .3s var(--n-bezier);
 `)]),m("left-placement",[H("bordered",[m("border",`
 right: 0;
 `)])]),H("right-placement",`
 justify-content: flex-start;
 `,[H("bordered",[m("border",`
 left: 0;
 `)]),H("collapsed",[h("layout-toggle-button",[h("base-icon",`
 transform: rotate(180deg);
 `)]),h("layout-toggle-bar",[I("&:hover",[m("top",{transform:"rotate(-12deg) scale(1.15) translateY(-2px)"}),m("bottom",{transform:"rotate(12deg) scale(1.15) translateY(2px)"})])])]),h("layout-toggle-button",`
 left: 0;
 transform: translateX(-50%) translateY(-50%);
 `,[h("base-icon",`
 transform: rotate(0);
 `)]),h("layout-toggle-bar",`
 left: -28px;
 transform: rotate(180deg);
 `,[I("&:hover",[m("top",{transform:"rotate(12deg) scale(1.15) translateY(-2px)"}),m("bottom",{transform:"rotate(-12deg) scale(1.15) translateY(2px)"})])])]),H("collapsed",[h("layout-toggle-bar",[I("&:hover",[m("top",{transform:"rotate(-12deg) scale(1.15) translateY(-2px)"}),m("bottom",{transform:"rotate(12deg) scale(1.15) translateY(2px)"})])]),h("layout-toggle-button",[h("base-icon",`
 transform: rotate(0);
 `)])]),h("layout-toggle-button",`
 transition:
 color .3s var(--n-bezier),
 right .3s var(--n-bezier),
 left .3s var(--n-bezier),
 border-color .3s var(--n-bezier),
 background-color .3s var(--n-bezier);
 cursor: pointer;
 width: 24px;
 height: 24px;
 position: absolute;
 top: 50%;
 right: 0;
 border-radius: 50%;
 display: flex;
 align-items: center;
 justify-content: center;
 font-size: 18px;
 color: var(--n-toggle-button-icon-color);
 border: var(--n-toggle-button-border);
 background-color: var(--n-toggle-button-color);
 box-shadow: 0 2px 4px 0px rgba(0, 0, 0, .06);
 transform: translateX(50%) translateY(-50%);
 z-index: 1;
 `,[h("base-icon",`
 transition: transform .3s var(--n-bezier);
 transform: rotate(180deg);
 `)]),h("layout-toggle-bar",`
 cursor: pointer;
 height: 72px;
 width: 32px;
 position: absolute;
 top: calc(50% - 36px);
 right: -28px;
 `,[m("top, bottom",`
 position: absolute;
 width: 4px;
 border-radius: 2px;
 height: 38px;
 left: 14px;
 transition: 
 background-color .3s var(--n-bezier),
 transform .3s var(--n-bezier);
 `),m("bottom",`
 position: absolute;
 top: 34px;
 `),I("&:hover",[m("top",{transform:"rotate(12deg) scale(1.15) translateY(-2px)"}),m("bottom",{transform:"rotate(-12deg) scale(1.15) translateY(2px)"})]),m("top, bottom",{backgroundColor:"var(--n-toggle-bar-color)"}),I("&:hover",[m("top, bottom",{backgroundColor:"var(--n-toggle-bar-color-hover)"})])]),m("border",`
 position: absolute;
 top: 0;
 right: 0;
 bottom: 0;
 width: 1px;
 transition: background-color .3s var(--n-bezier);
 `),h("layout-sider-scroll-container",`
 flex-grow: 1;
 flex-shrink: 0;
 box-sizing: border-box;
 height: 100%;
 opacity: 0;
 transition: opacity .3s var(--n-bezier);
 max-width: 100%;
 `),H("show-content",[h("layout-sider-scroll-container",{opacity:1})]),H("absolute-positioned",`
 position: absolute;
 left: 0;
 top: 0;
 bottom: 0;
 `)]),lt=j({props:{clsPrefix:{type:String,required:!0},onClick:Function},render(){const{clsPrefix:e}=this;return v("div",{onClick:this.onClick,class:`${e}-layout-toggle-bar`},v("div",{class:`${e}-layout-toggle-bar__top`}),v("div",{class:`${e}-layout-toggle-bar__bottom`}))}}),at=j({name:"LayoutToggleButton",props:{clsPrefix:{type:String,required:!0},onClick:Function},render(){const{clsPrefix:e}=this;return v("div",{class:`${e}-layout-toggle-button`,onClick:this.onClick},v(Ke,{clsPrefix:e},{default:()=>v(jo,null)}))}}),st={position:Ye,bordered:Boolean,collapsedWidth:{type:Number,default:48},width:{type:[Number,String],default:272},contentClass:String,contentStyle:{type:[String,Object],default:""},collapseMode:{type:String,default:"transform"},collapsed:{type:Boolean,default:void 0},defaultCollapsed:Boolean,showCollapsedContent:{type:Boolean,default:!0},showTrigger:{type:[Boolean,String],default:!1},nativeScrollbar:{type:Boolean,default:!0},inverted:Boolean,scrollbarProps:Object,triggerClass:String,triggerStyle:[String,Object],collapsedTriggerClass:String,collapsedTriggerStyle:[String,Object],"onUpdate:collapsed":[Function,Array],onUpdateCollapsed:[Function,Array],onAfterEnter:Function,onAfterLeave:Function,onExpand:[Function,Array],onCollapse:[Function,Array],onScroll:Function},ct=j({name:"LayoutSider",props:Object.assign(Object.assign({},q.props),st),setup(e){const o=G(Xe),t=B(null),l=B(null),a=B(e.defaultCollapsed),n=ze(de(e,"collapsed"),a),c=z(()=>fe(n.value?e.collapsedWidth:e.width)),d=z(()=>e.collapseMode!=="transform"?{}:{minWidth:fe(e.width)}),s=z(()=>o?o.siderPlacement:"left");function b(k,p){if(e.nativeScrollbar){const{value:w}=t;w&&(p===void 0?w.scrollTo(k):w.scrollTo(k,p))}else{const{value:w}=l;w&&w.scrollTo(k,p)}}function x(){const{"onUpdate:collapsed":k,onUpdateCollapsed:p,onExpand:w,onCollapse:M}=e,{value:K}=n;p&&D(p,!K),k&&D(k,!K),a.value=!K,K?w&&D(w):M&&D(M)}let _=0,u=0;const P=k=>{var p;const w=k.target;_=w.scrollLeft,u=w.scrollTop,(p=e.onScroll)===null||p===void 0||p.call(e,k)};Me(()=>{if(e.nativeScrollbar){const k=t.value;k&&(k.scrollTop=u,k.scrollLeft=_)}}),X(qe,{collapsedRef:n,collapseModeRef:de(e,"collapseMode")});const{mergedClsPrefixRef:A,inlineThemeDisabled:y}=ue(e),T=q("Layout","-layout-sider",it,Ge,e,A);function O(k){var p,w;k.propertyName==="max-width"&&(n.value?(p=e.onAfterLeave)===null||p===void 0||p.call(e):(w=e.onAfterEnter)===null||w===void 0||w.call(e))}const f={scrollTo:b},S=z(()=>{const{common:{cubicBezierEaseInOut:k},self:p}=T.value,{siderToggleButtonColor:w,siderToggleButtonBorder:M,siderToggleBarColor:K,siderToggleBarColorHover:oe}=p,L={"--n-bezier":k,"--n-toggle-button-color":w,"--n-toggle-button-border":M,"--n-toggle-bar-color":K,"--n-toggle-bar-color-hover":oe};return e.inverted?(L["--n-color"]=p.siderColorInverted,L["--n-text-color"]=p.textColorInverted,L["--n-border-color"]=p.siderBorderColorInverted,L["--n-toggle-button-icon-color"]=p.siderToggleButtonIconColorInverted,L.__invertScrollbar=p.__invertScrollbar):(L["--n-color"]=p.siderColor,L["--n-text-color"]=p.textColor,L["--n-border-color"]=p.siderBorderColor,L["--n-toggle-button-icon-color"]=p.siderToggleButtonIconColor),L}),N=y?ve("layout-sider",z(()=>e.inverted?"a":"b"),S,e):void 0;return Object.assign({scrollableElRef:t,scrollbarInstRef:l,mergedClsPrefix:A,mergedTheme:T,styleMaxWidth:c,mergedCollapsed:n,scrollContainerStyle:d,siderPlacement:s,handleNativeElScroll:P,handleTransitionend:O,handleTriggerClick:x,inlineThemeDisabled:y,cssVars:S,themeClass:N==null?void 0:N.themeClass,onRender:N==null?void 0:N.onRender},f)},render(){var e;const{mergedClsPrefix:o,mergedCollapsed:t,showTrigger:l}=this;return(e=this.onRender)===null||e===void 0||e.call(this),v("aside",{class:[`${o}-layout-sider`,this.themeClass,`${o}-layout-sider--${this.position}-positioned`,`${o}-layout-sider--${this.siderPlacement}-placement`,this.bordered&&`${o}-layout-sider--bordered`,t&&`${o}-layout-sider--collapsed`,(!t||this.showCollapsedContent)&&`${o}-layout-sider--show-content`],onTransitionend:this.handleTransitionend,style:[this.inlineThemeDisabled?void 0:this.cssVars,{maxWidth:this.styleMaxWidth,width:fe(this.width)}]},this.nativeScrollbar?v("div",{class:[`${o}-layout-sider-scroll-container`,this.contentClass],onScroll:this.handleNativeElScroll,style:[this.scrollContainerStyle,{overflow:"auto"},this.contentStyle],ref:"scrollableElRef"},this.$slots):v(je,Object.assign({},this.scrollbarProps,{onScroll:this.onScroll,ref:"scrollbarInstRef",style:this.scrollContainerStyle,contentStyle:this.contentStyle,contentClass:this.contentClass,theme:this.mergedTheme.peers.Scrollbar,themeOverrides:this.mergedTheme.peerOverrides.Scrollbar,builtinThemeOverrides:this.inverted&&this.cssVars.__invertScrollbar==="true"?{colorHover:"rgba(255, 255, 255, .4)",color:"rgba(255, 255, 255, .3)"}:void 0}),this.$slots),l?l==="bar"?v(lt,{clsPrefix:o,class:t?this.collapsedTriggerClass:this.triggerClass,style:t?this.collapsedTriggerStyle:this.triggerStyle,onClick:this.handleTriggerClick}):v(at,{clsPrefix:o,class:t?this.collapsedTriggerClass:this.triggerClass,style:t?this.collapsedTriggerStyle:this.triggerStyle,onClick:this.handleTriggerClick}):null,this.bordered?v("div",{class:`${o}-layout-sider__border`}):null)}}),ie=ee("n-menu"),Ie=ee("n-submenu"),Re=ee("n-menu-item-group"),Ee=[I("&::before","background-color: var(--n-item-color-hover);"),m("arrow",`
 color: var(--n-arrow-color-hover);
 `),m("icon",`
 color: var(--n-item-icon-color-hover);
 `),h("menu-item-content-header",`
 color: var(--n-item-text-color-hover);
 `,[I("a",`
 color: var(--n-item-text-color-hover);
 `),m("extra",`
 color: var(--n-item-text-color-hover);
 `)])],$e=[m("icon",`
 color: var(--n-item-icon-color-hover-horizontal);
 `),h("menu-item-content-header",`
 color: var(--n-item-text-color-hover-horizontal);
 `,[I("a",`
 color: var(--n-item-text-color-hover-horizontal);
 `),m("extra",`
 color: var(--n-item-text-color-hover-horizontal);
 `)])],dt=I([h("menu",`
 background-color: var(--n-color);
 color: var(--n-item-text-color);
 overflow: hidden;
 transition: background-color .3s var(--n-bezier);
 box-sizing: border-box;
 font-size: var(--n-font-size);
 padding-bottom: 6px;
 `,[H("horizontal",`
 max-width: 100%;
 width: 100%;
 display: flex;
 overflow: hidden;
 padding-bottom: 0;
 `,[h("submenu","margin: 0;"),h("menu-item","margin: 0;"),h("menu-item-content",`
 padding: 0 20px;
 border-bottom: 2px solid #0000;
 `,[I("&::before","display: none;"),H("selected","border-bottom: 2px solid var(--n-border-color-horizontal)")]),h("menu-item-content",[H("selected",[m("icon","color: var(--n-item-icon-color-active-horizontal);"),h("menu-item-content-header",`
 color: var(--n-item-text-color-active-horizontal);
 `,[I("a","color: var(--n-item-text-color-active-horizontal);"),m("extra","color: var(--n-item-text-color-active-horizontal);")])]),H("child-active",`
 border-bottom: 2px solid var(--n-border-color-horizontal);
 `,[h("menu-item-content-header",`
 color: var(--n-item-text-color-child-active-horizontal);
 `,[I("a",`
 color: var(--n-item-text-color-child-active-horizontal);
 `),m("extra",`
 color: var(--n-item-text-color-child-active-horizontal);
 `)]),m("icon",`
 color: var(--n-item-icon-color-child-active-horizontal);
 `)]),re("disabled",[re("selected, child-active",[I("&:focus-within",$e)]),H("selected",[Y(null,[m("icon","color: var(--n-item-icon-color-active-hover-horizontal);"),h("menu-item-content-header",`
 color: var(--n-item-text-color-active-hover-horizontal);
 `,[I("a","color: var(--n-item-text-color-active-hover-horizontal);"),m("extra","color: var(--n-item-text-color-active-hover-horizontal);")])])]),H("child-active",[Y(null,[m("icon","color: var(--n-item-icon-color-child-active-hover-horizontal);"),h("menu-item-content-header",`
 color: var(--n-item-text-color-child-active-hover-horizontal);
 `,[I("a","color: var(--n-item-text-color-child-active-hover-horizontal);"),m("extra","color: var(--n-item-text-color-child-active-hover-horizontal);")])])]),Y("border-bottom: 2px solid var(--n-border-color-horizontal);",$e)]),h("menu-item-content-header",[I("a","color: var(--n-item-text-color-horizontal);")])])]),re("responsive",[h("menu-item-content-header",`
 overflow: hidden;
 text-overflow: ellipsis;
 `)]),H("collapsed",[h("menu-item-content",[H("selected",[I("&::before",`
 background-color: var(--n-item-color-active-collapsed) !important;
 `)]),h("menu-item-content-header","opacity: 0;"),m("arrow","opacity: 0;"),m("icon","color: var(--n-item-icon-color-collapsed);")])]),h("menu-item",`
 height: var(--n-item-height);
 margin-top: 6px;
 position: relative;
 `),h("menu-item-content",`
 box-sizing: border-box;
 line-height: 1.75;
 height: 100%;
 display: grid;
 grid-template-areas: "icon content arrow";
 grid-template-columns: auto 1fr auto;
 align-items: center;
 cursor: pointer;
 position: relative;
 padding-right: 18px;
 transition:
 background-color .3s var(--n-bezier),
 padding-left .3s var(--n-bezier),
 border-color .3s var(--n-bezier);
 `,[I("> *","z-index: 1;"),I("&::before",`
 z-index: auto;
 content: "";
 background-color: #0000;
 position: absolute;
 left: 8px;
 right: 8px;
 top: 0;
 bottom: 0;
 pointer-events: none;
 border-radius: var(--n-border-radius);
 transition: background-color .3s var(--n-bezier);
 `),H("disabled",`
 opacity: .45;
 cursor: not-allowed;
 `),H("collapsed",[m("arrow","transform: rotate(0);")]),H("selected",[I("&::before","background-color: var(--n-item-color-active);"),m("arrow","color: var(--n-arrow-color-active);"),m("icon","color: var(--n-item-icon-color-active);"),h("menu-item-content-header",`
 color: var(--n-item-text-color-active);
 `,[I("a","color: var(--n-item-text-color-active);"),m("extra","color: var(--n-item-text-color-active);")])]),H("child-active",[h("menu-item-content-header",`
 color: var(--n-item-text-color-child-active);
 `,[I("a",`
 color: var(--n-item-text-color-child-active);
 `),m("extra",`
 color: var(--n-item-text-color-child-active);
 `)]),m("arrow",`
 color: var(--n-arrow-color-child-active);
 `),m("icon",`
 color: var(--n-item-icon-color-child-active);
 `)]),re("disabled",[re("selected, child-active",[I("&:focus-within",Ee)]),H("selected",[Y(null,[m("arrow","color: var(--n-arrow-color-active-hover);"),m("icon","color: var(--n-item-icon-color-active-hover);"),h("menu-item-content-header",`
 color: var(--n-item-text-color-active-hover);
 `,[I("a","color: var(--n-item-text-color-active-hover);"),m("extra","color: var(--n-item-text-color-active-hover);")])])]),H("child-active",[Y(null,[m("arrow","color: var(--n-arrow-color-child-active-hover);"),m("icon","color: var(--n-item-icon-color-child-active-hover);"),h("menu-item-content-header",`
 color: var(--n-item-text-color-child-active-hover);
 `,[I("a","color: var(--n-item-text-color-child-active-hover);"),m("extra","color: var(--n-item-text-color-child-active-hover);")])])]),H("selected",[Y(null,[I("&::before","background-color: var(--n-item-color-active-hover);")])]),Y(null,Ee)]),m("icon",`
 grid-area: icon;
 color: var(--n-item-icon-color);
 transition:
 color .3s var(--n-bezier),
 font-size .3s var(--n-bezier),
 margin-right .3s var(--n-bezier);
 box-sizing: content-box;
 display: inline-flex;
 align-items: center;
 justify-content: center;
 `),m("arrow",`
 grid-area: arrow;
 font-size: 16px;
 color: var(--n-arrow-color);
 transform: rotate(180deg);
 opacity: 1;
 transition:
 color .3s var(--n-bezier),
 transform 0.2s var(--n-bezier),
 opacity 0.2s var(--n-bezier);
 `),h("menu-item-content-header",`
 grid-area: content;
 transition:
 color .3s var(--n-bezier),
 opacity .3s var(--n-bezier);
 opacity: 1;
 white-space: nowrap;
 color: var(--n-item-text-color);
 `,[I("a",`
 outline: none;
 text-decoration: none;
 transition: color .3s var(--n-bezier);
 color: var(--n-item-text-color);
 `,[I("&::before",`
 content: "";
 position: absolute;
 left: 0;
 right: 0;
 top: 0;
 bottom: 0;
 `)]),m("extra",`
 font-size: .93em;
 color: var(--n-group-text-color);
 transition: color .3s var(--n-bezier);
 `)])]),h("submenu",`
 cursor: pointer;
 position: relative;
 margin-top: 6px;
 `,[h("menu-item-content",`
 height: var(--n-item-height);
 `),h("submenu-children",`
 overflow: hidden;
 padding: 0;
 `,[Io({duration:".2s"})])]),h("menu-item-group",[h("menu-item-group-title",`
 margin-top: 6px;
 color: var(--n-group-text-color);
 cursor: default;
 font-size: .93em;
 height: 36px;
 display: flex;
 align-items: center;
 transition:
 padding-left .3s var(--n-bezier),
 color .3s var(--n-bezier);
 `)])]),h("menu-tooltip",[I("a",`
 color: inherit;
 text-decoration: none;
 `)]),h("menu-divider",`
 transition: background-color .3s var(--n-bezier);
 background-color: var(--n-divider-color);
 height: 1px;
 margin: 6px 18px;
 `)]);function Y(e,o){return[H("hover",e,o),I("&:hover",e,o)]}const Qe=j({name:"MenuOptionContent",props:{collapsed:Boolean,disabled:Boolean,title:[String,Function],icon:Function,extra:[String,Function],showArrow:Boolean,childActive:Boolean,hover:Boolean,paddingLeft:Number,selected:Boolean,maxIconSize:{type:Number,required:!0},activeIconSize:{type:Number,required:!0},iconMarginRight:{type:Number,required:!0},clsPrefix:{type:String,required:!0},onClick:Function,tmNode:{type:Object,required:!0},isEllipsisPlaceholder:Boolean},setup(e){const{props:o}=G(ie);return{menuProps:o,style:z(()=>{const{paddingLeft:t}=e;return{paddingLeft:t&&`${t}px`}}),iconStyle:z(()=>{const{maxIconSize:t,activeIconSize:l,iconMarginRight:a}=e;return{width:`${t}px`,height:`${t}px`,fontSize:`${l}px`,marginRight:`${a}px`}})}},render(){const{clsPrefix:e,tmNode:o,menuProps:{renderIcon:t,renderLabel:l,renderExtra:a,expandIcon:n}}=this,c=t?t(o.rawNode):J(this.icon);return v("div",{onClick:d=>{var s;(s=this.onClick)===null||s===void 0||s.call(this,d)},role:"none",class:[`${e}-menu-item-content`,{[`${e}-menu-item-content--selected`]:this.selected,[`${e}-menu-item-content--collapsed`]:this.collapsed,[`${e}-menu-item-content--child-active`]:this.childActive,[`${e}-menu-item-content--disabled`]:this.disabled,[`${e}-menu-item-content--hover`]:this.hover}],style:this.style},c&&v("div",{class:`${e}-menu-item-content__icon`,style:this.iconStyle,role:"none"},[c]),v("div",{class:`${e}-menu-item-content-header`,role:"none"},this.isEllipsisPlaceholder?this.title:l?l(o.rawNode):J(this.title),this.extra||a?v("span",{class:`${e}-menu-item-content-header__extra`}," ",a?a(o.rawNode):J(this.extra)):null),this.showArrow?v(Ke,{ariaHidden:!0,class:`${e}-menu-item-content__arrow`,clsPrefix:e},{default:()=>n?n(o.rawNode):v(Wo,null)}):null)}}),se=8;function Pe(e){const o=G(ie),{props:t,mergedCollapsedRef:l}=o,a=G(Ie,null),n=G(Re,null),c=z(()=>t.mode==="horizontal"),d=z(()=>c.value?t.dropdownPlacement:"tmNodes"in e?"right-start":"right"),s=z(()=>{var u;return Math.max((u=t.collapsedIconSize)!==null&&u!==void 0?u:t.iconSize,t.iconSize)}),b=z(()=>{var u;return!c.value&&e.root&&l.value&&(u=t.collapsedIconSize)!==null&&u!==void 0?u:t.iconSize}),x=z(()=>{if(c.value)return;const{collapsedWidth:u,indent:P,rootIndent:A}=t,{root:y,isGroup:T}=e,O=A===void 0?P:A;return y?l.value?u/2-s.value/2:O:n&&typeof n.paddingLeftRef.value=="number"?P/2+n.paddingLeftRef.value:a&&typeof a.paddingLeftRef.value=="number"?(T?P/2:P)+a.paddingLeftRef.value:0}),_=z(()=>{const{collapsedWidth:u,indent:P,rootIndent:A}=t,{value:y}=s,{root:T}=e;return c.value||!T||!l.value?se:(A===void 0?P:A)+y+se-(u+y)/2});return{dropdownPlacement:d,activeIconSize:b,maxIconSize:s,paddingLeft:x,iconMarginRight:_,NMenu:o,NSubmenu:a}}const Te={internalKey:{type:[String,Number],required:!0},root:Boolean,isGroup:Boolean,level:{type:Number,required:!0},title:[String,Function],extra:[String,Function]},ut=j({name:"MenuDivider",setup(){const e=G(ie),{mergedClsPrefixRef:o,isHorizontalRef:t}=e;return()=>t.value?null:v("div",{class:`${o.value}-menu-divider`})}}),Ze=Object.assign(Object.assign({},Te),{tmNode:{type:Object,required:!0},disabled:Boolean,icon:Function,onClick:Function}),vt=Se(Ze),mt=j({name:"MenuOption",props:Ze,setup(e){const o=Pe(e),{NSubmenu:t,NMenu:l}=o,{props:a,mergedClsPrefixRef:n,mergedCollapsedRef:c}=l,d=t?t.mergedDisabledRef:{value:!1},s=z(()=>d.value||e.disabled);function b(_){const{onClick:u}=e;u&&u(_)}function x(_){s.value||(l.doSelect(e.internalKey,e.tmNode.rawNode),b(_))}return{mergedClsPrefix:n,dropdownPlacement:o.dropdownPlacement,paddingLeft:o.paddingLeft,iconMarginRight:o.iconMarginRight,maxIconSize:o.maxIconSize,activeIconSize:o.activeIconSize,mergedTheme:l.mergedThemeRef,menuProps:a,dropdownEnabled:ye(()=>e.root&&c.value&&a.mode!=="horizontal"&&!s.value),selected:ye(()=>l.mergedValueRef.value===e.internalKey),mergedDisabled:s,handleClick:x}},render(){const{mergedClsPrefix:e,mergedTheme:o,tmNode:t,menuProps:{renderLabel:l,nodeProps:a}}=this,n=a==null?void 0:a(t.rawNode);return v("div",Object.assign({},n,{role:"menuitem",class:[`${e}-menu-item`,n==null?void 0:n.class]}),v(We,{theme:o.peers.Tooltip,themeOverrides:o.peerOverrides.Tooltip,trigger:"hover",placement:this.dropdownPlacement,disabled:!this.dropdownEnabled||this.title===void 0,internalExtraClass:["menu-tooltip"]},{default:()=>l?l(t.rawNode):J(this.title),trigger:()=>v(Qe,{tmNode:t,clsPrefix:e,paddingLeft:this.paddingLeft,iconMarginRight:this.iconMarginRight,maxIconSize:this.maxIconSize,activeIconSize:this.activeIconSize,selected:this.selected,title:this.title,extra:this.extra,disabled:this.mergedDisabled,icon:this.icon,onClick:this.handleClick})}))}}),Je=Object.assign(Object.assign({},Te),{tmNode:{type:Object,required:!0},tmNodes:{type:Array,required:!0}}),ht=Se(Je),ft=j({name:"MenuOptionGroup",props:Je,setup(e){X(Ie,null);const o=Pe(e);X(Re,{paddingLeftRef:o.paddingLeft});const{mergedClsPrefixRef:t,props:l}=G(ie);return function(){const{value:a}=t,n=o.paddingLeft.value,{nodeProps:c}=l,d=c==null?void 0:c(e.tmNode.rawNode);return v("div",{class:`${a}-menu-item-group`,role:"group"},v("div",Object.assign({},d,{class:[`${a}-menu-item-group-title`,d==null?void 0:d.class],style:[(d==null?void 0:d.style)||"",n!==void 0?`padding-left: ${n}px;`:""]}),J(e.title),e.extra?v(Ve,null," ",J(e.extra)):null),v("div",null,e.tmNodes.map(s=>ke(s,l))))}}});function _e(e){return e.type==="divider"||e.type==="render"}function gt(e){return e.type==="divider"}function ke(e,o){const{rawNode:t}=e,{show:l}=t;if(l===!1)return null;if(_e(t))return gt(t)?v(ut,Object.assign({key:e.key},t.props)):null;const{labelField:a}=o,{key:n,level:c,isGroup:d}=e,s=Object.assign(Object.assign({},t),{title:t.title||t[a],extra:t.titleExtra||t.extra,key:n,internalKey:n,level:c,root:c===0,isGroup:d});return e.children?e.isGroup?v(ft,me(s,ht,{tmNode:e,tmNodes:e.children,key:n})):v(we,me(s,pt,{key:n,rawNodes:t[o.childrenField],tmNodes:e.children,tmNode:e})):v(mt,me(s,vt,{key:n,tmNode:e}))}const eo=Object.assign(Object.assign({},Te),{rawNodes:{type:Array,default:()=>[]},tmNodes:{type:Array,default:()=>[]},tmNode:{type:Object,required:!0},disabled:Boolean,icon:Function,onClick:Function,domId:String,virtualChildActive:{type:Boolean,default:void 0},isEllipsisPlaceholder:Boolean}),pt=Se(eo),we=j({name:"Submenu",props:eo,setup(e){const o=Pe(e),{NMenu:t,NSubmenu:l}=o,{props:a,mergedCollapsedRef:n,mergedThemeRef:c}=t,d=z(()=>{const{disabled:u}=e;return l!=null&&l.mergedDisabledRef.value||a.disabled?!0:u}),s=B(!1);X(Ie,{paddingLeftRef:o.paddingLeft,mergedDisabledRef:d}),X(Re,null);function b(){const{onClick:u}=e;u&&u()}function x(){d.value||(n.value||t.toggleExpand(e.internalKey),b())}function _(u){s.value=u}return{menuProps:a,mergedTheme:c,doSelect:t.doSelect,inverted:t.invertedRef,isHorizontal:t.isHorizontalRef,mergedClsPrefix:t.mergedClsPrefixRef,maxIconSize:o.maxIconSize,activeIconSize:o.activeIconSize,iconMarginRight:o.iconMarginRight,dropdownPlacement:o.dropdownPlacement,dropdownShow:s,paddingLeft:o.paddingLeft,mergedDisabled:d,mergedValue:t.mergedValueRef,childActive:ye(()=>{var u;return(u=e.virtualChildActive)!==null&&u!==void 0?u:t.activePathRef.value.includes(e.internalKey)}),collapsed:z(()=>a.mode==="horizontal"?!1:n.value?!0:!t.mergedExpandedKeysRef.value.includes(e.internalKey)),dropdownEnabled:z(()=>!d.value&&(a.mode==="horizontal"||n.value)),handlePopoverShowChange:_,handleClick:x}},render(){var e;const{mergedClsPrefix:o,menuProps:{renderIcon:t,renderLabel:l}}=this,a=()=>{const{isHorizontal:c,paddingLeft:d,collapsed:s,mergedDisabled:b,maxIconSize:x,activeIconSize:_,title:u,childActive:P,icon:A,handleClick:y,menuProps:{nodeProps:T},dropdownShow:O,iconMarginRight:f,tmNode:S,mergedClsPrefix:N,isEllipsisPlaceholder:k,extra:p}=this,w=T==null?void 0:T(S.rawNode);return v("div",Object.assign({},w,{class:[`${N}-menu-item`,w==null?void 0:w.class],role:"menuitem"}),v(Qe,{tmNode:S,paddingLeft:d,collapsed:s,disabled:b,iconMarginRight:f,maxIconSize:x,activeIconSize:_,title:u,extra:p,showArrow:!c,childActive:P,clsPrefix:N,icon:A,hover:O,onClick:y,isEllipsisPlaceholder:k}))},n=()=>v(Ro,null,{default:()=>{const{tmNodes:c,collapsed:d}=this;return d?null:v("div",{class:`${o}-submenu-children`,role:"menu"},c.map(s=>ke(s,this.menuProps)))}});return this.root?v(De,Object.assign({size:"large",trigger:"hover"},(e=this.menuProps)===null||e===void 0?void 0:e.dropdownProps,{themeOverrides:this.mergedTheme.peerOverrides.Dropdown,theme:this.mergedTheme.peers.Dropdown,builtinThemeOverrides:{fontSizeLarge:"14px",optionIconSizeLarge:"18px"},value:this.mergedValue,disabled:!this.dropdownEnabled,placement:this.dropdownPlacement,keyField:this.menuProps.keyField,labelField:this.menuProps.labelField,childrenField:this.menuProps.childrenField,onUpdateShow:this.handlePopoverShowChange,options:this.rawNodes,onSelect:this.doSelect,inverted:this.inverted,renderIcon:t,renderLabel:l}),{default:()=>v("div",{class:`${o}-submenu`,role:"menu","aria-expanded":!this.collapsed,id:this.domId},a(),this.isHorizontal?null:n())}):v("div",{class:`${o}-submenu`,role:"menu","aria-expanded":!this.collapsed,id:this.domId},a(),n())}}),bt=Object.assign(Object.assign({},q.props),{options:{type:Array,default:()=>[]},collapsed:{type:Boolean,default:void 0},collapsedWidth:{type:Number,default:48},iconSize:{type:Number,default:20},collapsedIconSize:{type:Number,default:24},rootIndent:Number,indent:{type:Number,default:32},labelField:{type:String,default:"label"},keyField:{type:String,default:"key"},childrenField:{type:String,default:"children"},disabledField:{type:String,default:"disabled"},defaultExpandAll:Boolean,defaultExpandedKeys:Array,expandedKeys:Array,value:[String,Number],defaultValue:{type:[String,Number],default:null},mode:{type:String,default:"vertical"},watchProps:{type:Array,default:void 0},disabled:Boolean,show:{type:Boolean,default:!0},inverted:Boolean,"onUpdate:expandedKeys":[Function,Array],onUpdateExpandedKeys:[Function,Array],onUpdateValue:[Function,Array],"onUpdate:value":[Function,Array],expandIcon:Function,renderIcon:Function,renderLabel:Function,renderExtra:Function,dropdownProps:Object,accordion:Boolean,nodeProps:Function,dropdownPlacement:{type:String,default:"bottom"},responsive:Boolean,items:Array,onOpenNamesChange:[Function,Array],onSelect:[Function,Array],onExpandedNamesChange:[Function,Array],expandedNames:Array,defaultExpandedNames:Array}),xt=j({name:"Menu",inheritAttrs:!1,props:bt,setup(e){const{mergedClsPrefixRef:o,inlineThemeDisabled:t}=ue(e),l=q("Menu","-menu",dt,ko,e,o),a=G(qe,null),n=z(()=>{var g;const{collapsed:R}=e;if(R!==void 0)return R;if(a){const{collapseModeRef:r,collapsedRef:C}=a;if(r.value==="width")return(g=C.value)!==null&&g!==void 0?g:!1}return!1}),c=z(()=>{const{keyField:g,childrenField:R,disabledField:r}=e;return ge(e.items||e.options,{getIgnored(C){return _e(C)},getChildren(C){return C[R]},getDisabled(C){return C[r]},getKey(C){var E;return(E=C[g])!==null&&E!==void 0?E:C.name}})}),d=z(()=>new Set(c.value.treeNodes.map(g=>g.key))),{watchProps:s}=e,b=B(null);s!=null&&s.includes("defaultValue")?Ce(()=>{b.value=e.defaultValue}):b.value=e.defaultValue;const x=de(e,"value"),_=ze(x,b),u=B([]),P=()=>{u.value=e.defaultExpandAll?c.value.getNonLeafKeys():e.defaultExpandedNames||e.defaultExpandedKeys||c.value.getPath(_.value,{includeSelf:!1}).keyPath};s!=null&&s.includes("defaultExpandedKeys")?Ce(P):P();const A=Vo(e,["expandedNames","expandedKeys"]),y=ze(A,u),T=z(()=>c.value.treeNodes),O=z(()=>c.value.getPath(_.value).keyPath);X(ie,{props:e,mergedCollapsedRef:n,mergedThemeRef:l,mergedValueRef:_,mergedExpandedKeysRef:y,activePathRef:O,mergedClsPrefixRef:o,isHorizontalRef:z(()=>e.mode==="horizontal"),invertedRef:de(e,"inverted"),doSelect:f,toggleExpand:N});function f(g,R){const{"onUpdate:value":r,onUpdateValue:C,onSelect:E}=e;C&&D(C,g,R),r&&D(r,g,R),E&&D(E,g,R),b.value=g}function S(g){const{"onUpdate:expandedKeys":R,onUpdateExpandedKeys:r,onExpandedNamesChange:C,onOpenNamesChange:E}=e;R&&D(R,g),r&&D(r,g),C&&D(C,g),E&&D(E,g),u.value=g}function N(g){const R=Array.from(y.value),r=R.findIndex(C=>C===g);if(~r)R.splice(r,1);else{if(e.accordion&&d.value.has(g)){const C=R.findIndex(E=>d.value.has(E));C>-1&&R.splice(C,1)}R.push(g)}S(R)}const k=g=>{const R=c.value.getPath(g??_.value,{includeSelf:!1}).keyPath;if(!R.length)return;const r=Array.from(y.value),C=new Set([...r,...R]);e.accordion&&d.value.forEach(E=>{C.has(E)&&!R.includes(E)&&C.delete(E)}),S(Array.from(C))},p=z(()=>{const{inverted:g}=e,{common:{cubicBezierEaseInOut:R},self:r}=l.value,{borderRadius:C,borderColorHorizontal:E,fontSize:ao,itemHeight:so,dividerColor:co}=r,i={"--n-divider-color":co,"--n-bezier":R,"--n-font-size":ao,"--n-border-color-horizontal":E,"--n-border-radius":C,"--n-item-height":so};return g?(i["--n-group-text-color"]=r.groupTextColorInverted,i["--n-color"]=r.colorInverted,i["--n-item-text-color"]=r.itemTextColorInverted,i["--n-item-text-color-hover"]=r.itemTextColorHoverInverted,i["--n-item-text-color-active"]=r.itemTextColorActiveInverted,i["--n-item-text-color-child-active"]=r.itemTextColorChildActiveInverted,i["--n-item-text-color-child-active-hover"]=r.itemTextColorChildActiveInverted,i["--n-item-text-color-active-hover"]=r.itemTextColorActiveHoverInverted,i["--n-item-icon-color"]=r.itemIconColorInverted,i["--n-item-icon-color-hover"]=r.itemIconColorHoverInverted,i["--n-item-icon-color-active"]=r.itemIconColorActiveInverted,i["--n-item-icon-color-active-hover"]=r.itemIconColorActiveHoverInverted,i["--n-item-icon-color-child-active"]=r.itemIconColorChildActiveInverted,i["--n-item-icon-color-child-active-hover"]=r.itemIconColorChildActiveHoverInverted,i["--n-item-icon-color-collapsed"]=r.itemIconColorCollapsedInverted,i["--n-item-text-color-horizontal"]=r.itemTextColorHorizontalInverted,i["--n-item-text-color-hover-horizontal"]=r.itemTextColorHoverHorizontalInverted,i["--n-item-text-color-active-horizontal"]=r.itemTextColorActiveHorizontalInverted,i["--n-item-text-color-child-active-horizontal"]=r.itemTextColorChildActiveHorizontalInverted,i["--n-item-text-color-child-active-hover-horizontal"]=r.itemTextColorChildActiveHoverHorizontalInverted,i["--n-item-text-color-active-hover-horizontal"]=r.itemTextColorActiveHoverHorizontalInverted,i["--n-item-icon-color-horizontal"]=r.itemIconColorHorizontalInverted,i["--n-item-icon-color-hover-horizontal"]=r.itemIconColorHoverHorizontalInverted,i["--n-item-icon-color-active-horizontal"]=r.itemIconColorActiveHorizontalInverted,i["--n-item-icon-color-active-hover-horizontal"]=r.itemIconColorActiveHoverHorizontalInverted,i["--n-item-icon-color-child-active-horizontal"]=r.itemIconColorChildActiveHorizontalInverted,i["--n-item-icon-color-child-active-hover-horizontal"]=r.itemIconColorChildActiveHoverHorizontalInverted,i["--n-arrow-color"]=r.arrowColorInverted,i["--n-arrow-color-hover"]=r.arrowColorHoverInverted,i["--n-arrow-color-active"]=r.arrowColorActiveInverted,i["--n-arrow-color-active-hover"]=r.arrowColorActiveHoverInverted,i["--n-arrow-color-child-active"]=r.arrowColorChildActiveInverted,i["--n-arrow-color-child-active-hover"]=r.arrowColorChildActiveHoverInverted,i["--n-item-color-hover"]=r.itemColorHoverInverted,i["--n-item-color-active"]=r.itemColorActiveInverted,i["--n-item-color-active-hover"]=r.itemColorActiveHoverInverted,i["--n-item-color-active-collapsed"]=r.itemColorActiveCollapsedInverted):(i["--n-group-text-color"]=r.groupTextColor,i["--n-color"]=r.color,i["--n-item-text-color"]=r.itemTextColor,i["--n-item-text-color-hover"]=r.itemTextColorHover,i["--n-item-text-color-active"]=r.itemTextColorActive,i["--n-item-text-color-child-active"]=r.itemTextColorChildActive,i["--n-item-text-color-child-active-hover"]=r.itemTextColorChildActiveHover,i["--n-item-text-color-active-hover"]=r.itemTextColorActiveHover,i["--n-item-icon-color"]=r.itemIconColor,i["--n-item-icon-color-hover"]=r.itemIconColorHover,i["--n-item-icon-color-active"]=r.itemIconColorActive,i["--n-item-icon-color-active-hover"]=r.itemIconColorActiveHover,i["--n-item-icon-color-child-active"]=r.itemIconColorChildActive,i["--n-item-icon-color-child-active-hover"]=r.itemIconColorChildActiveHover,i["--n-item-icon-color-collapsed"]=r.itemIconColorCollapsed,i["--n-item-text-color-horizontal"]=r.itemTextColorHorizontal,i["--n-item-text-color-hover-horizontal"]=r.itemTextColorHoverHorizontal,i["--n-item-text-color-active-horizontal"]=r.itemTextColorActiveHorizontal,i["--n-item-text-color-child-active-horizontal"]=r.itemTextColorChildActiveHorizontal,i["--n-item-text-color-child-active-hover-horizontal"]=r.itemTextColorChildActiveHoverHorizontal,i["--n-item-text-color-active-hover-horizontal"]=r.itemTextColorActiveHoverHorizontal,i["--n-item-icon-color-horizontal"]=r.itemIconColorHorizontal,i["--n-item-icon-color-hover-horizontal"]=r.itemIconColorHoverHorizontal,i["--n-item-icon-color-active-horizontal"]=r.itemIconColorActiveHorizontal,i["--n-item-icon-color-active-hover-horizontal"]=r.itemIconColorActiveHoverHorizontal,i["--n-item-icon-color-child-active-horizontal"]=r.itemIconColorChildActiveHorizontal,i["--n-item-icon-color-child-active-hover-horizontal"]=r.itemIconColorChildActiveHoverHorizontal,i["--n-arrow-color"]=r.arrowColor,i["--n-arrow-color-hover"]=r.arrowColorHover,i["--n-arrow-color-active"]=r.arrowColorActive,i["--n-arrow-color-active-hover"]=r.arrowColorActiveHover,i["--n-arrow-color-child-active"]=r.arrowColorChildActive,i["--n-arrow-color-child-active-hover"]=r.arrowColorChildActiveHover,i["--n-item-color-hover"]=r.itemColorHover,i["--n-item-color-active"]=r.itemColorActive,i["--n-item-color-active-hover"]=r.itemColorActiveHover,i["--n-item-color-active-collapsed"]=r.itemColorActiveCollapsed),i}),w=t?ve("menu",z(()=>e.inverted?"a":"b"),p,e):void 0,M=Po(),K=B(null),oe=B(null);let L=!0;const le=()=>{var g;L?L=!1:(g=K.value)===null||g===void 0||g.sync({showAllItemsBeforeCalculate:!0})};function te(){return document.getElementById(M)}const ae=B(-1);function oo(g){ae.value=e.options.length-g}function to(g){g||(ae.value=-1)}const ro=z(()=>{const g=ae.value;return{children:g===-1?[]:e.options.slice(g)}}),no=z(()=>{const{childrenField:g,disabledField:R,keyField:r}=e;return ge([ro.value],{getIgnored(C){return _e(C)},getChildren(C){return C[g]},getDisabled(C){return C[R]},getKey(C){var E;return(E=C[r])!==null&&E!==void 0?E:C.name}})}),io=z(()=>ge([{}]).treeNodes[0]);function lo(){var g;if(ae.value===-1)return v(we,{root:!0,level:0,key:"__ellpisisGroupPlaceholder__",internalKey:"__ellpisisGroupPlaceholder__",title:"···",tmNode:io.value,domId:M,isEllipsisPlaceholder:!0});const R=no.value.treeNodes[0],r=O.value,C=!!(!((g=R.children)===null||g===void 0)&&g.some(E=>r.includes(E.key)));return v(we,{level:0,root:!0,key:"__ellpisisGroup__",internalKey:"__ellpisisGroup__",title:"···",virtualChildActive:C,tmNode:R,domId:M,rawNodes:R.rawNode.children||[],tmNodes:R.children||[],isEllipsisPlaceholder:!0})}return{mergedClsPrefix:o,controlledExpandedKeys:A,uncontrolledExpanededKeys:u,mergedExpandedKeys:y,uncontrolledValue:b,mergedValue:_,activePath:O,tmNodes:T,mergedTheme:l,mergedCollapsed:n,cssVars:t?void 0:p,themeClass:w==null?void 0:w.themeClass,overflowRef:K,counterRef:oe,updateCounter:()=>{},onResize:le,onUpdateOverflow:to,onUpdateCount:oo,renderCounter:lo,getCounter:te,onRender:w==null?void 0:w.onRender,showOption:k,deriveResponsiveState:le}},render(){const{mergedClsPrefix:e,mode:o,themeClass:t,onRender:l}=this;l==null||l();const a=()=>this.tmNodes.map(s=>ke(s,this.$props)),c=o==="horizontal"&&this.responsive,d=()=>v("div",To(this.$attrs,{role:o==="horizontal"?"menubar":"menu",class:[`${e}-menu`,t,`${e}-menu--${o}`,c&&`${e}-menu--responsive`,this.mergedCollapsed&&`${e}-menu--collapsed`],style:this.cssVars}),c?v(Ko,{ref:"overflowRef",onUpdateOverflow:this.onUpdateOverflow,getCounter:this.getCounter,onUpdateCount:this.onUpdateCount,updateCounter:this.updateCounter,style:{width:"100%",display:"flex",overflow:"hidden"}},{default:a,counter:this.renderCounter}):a());return c?v(Be,{onResize:this.onResize},{default:d}):d()}}),Ct=""+new URL("rustfs.C_aUfSHd.png",import.meta.url).href,yt={class:"flex items-center border-t dark:border-neutral-800 p-4"},zt={class:"px-2"},_t=j({__name:"user-dropdown",props:{isCollapsed:{type:Boolean,default:!1}},setup(e){const{t:o}=Ue(),{logout:t}=Ao(),l=Oo(),a=async()=>{await t(),l.push("/auth/login")},n=d=>{d==="logout"&&a()},c=[{label:o("Logout"),key:"logout",icon:()=>Bo("ri:logout-box-r-line")}];return(d,s)=>{const b=De;return V(),Z(b,{options:c,placement:"right-end",onSelect:n},{default:W(()=>[F("div",yt,[s[0]||(s[0]=F("div",{class:"rounded-full h-8 w-8 object-cover bg-gray-100 border overflow-hidden"},[F("img",{class:"min-h-full",size:"small",src:Ct})],-1)),d.isCollapsed?ce("",!0):(V(),Q(Ve,{key:0},[F("span",zt,ne($(o)("RustFS")),1),U($(Fe),{name:"ri:more-2-line",class:"ml-auto text-xl"})],64))])]),_:1})}}}),wt=No("sidebar",()=>{const e=B(localStorage.getItem("sidebarCollapsed")==="true"),o=()=>{e.value=!e.value},t=l=>{e.value=l};return Le(e,l=>{localStorage.setItem("sidebarCollapsed",l.toString())}),{isCollapsed:e,toggleSidebar:o,setSidebarState:t}}),St={class:"flex flex-col h-screen overflow-hidden gap-2 relative"},It={key:1,class:"text-center text-2xl flex"},Rt={class:"sr-only"},Pt={key:0,class:"px-4 flex items-center -mr-4"},Tt={class:"overflow-y-auto flex-1"},kt={key:0,class:"w-full flex items-center justify-center py-4"},At={class:"px-2 py-2"},Ot={key:0,class:"flex justify-center"},Nt={class:"px-2 py-2"},Ht={key:0,class:"flex justify-center"},Et={class:"sticky bottom-0 left-0 right-0"},$t=j({__name:"sidebar",setup(e){const{t:o}=Ue(),t=Ho(),l=Eo(),a=wt(),n=z(()=>a.isCollapsed);let c;try{c=$o().$siteConfig}catch(x){console.warn("Failed to load siteConfig, using defaults:",x),c={serverHost:window.location.origin,api:{baseURL:`${window.location.origin}/rustfs/admin/v3`},s3:{endpoint:window.location.origin,region:"us-east-1",accessKeyId:"",secretAccessKey:""}}}const d=()=>{a.toggleSidebar()},b=z(()=>t.navs.map(x=>{let _={key:x.label,label:()=>x.to?x.target?v("a",{href:x.to,target:"_blank"},{default:()=>o(x.label)}):v(Ne,{to:x.to},{default:()=>o(x.label)}):o(x.label),icon:x.icon?He(x.icon):void 0,type:x.type};return x.children&&(_.children=x.children.map(u=>({key:u.label,type:"item",label:()=>v(Ne,{to:u.to||"/"},{default:()=>o(u.label)}),icon:u.icon?He(u.icon):void 0}))),_}));return(x,_)=>{const u=Jo,P=Fe,A=xt,y=We,T=uo,O=vo,f=_t,S=ct;return $(l).path.startsWith("/auth")===!1?(V(),Z(S,{key:0,bordered:"",class:"min-h-full","collapse-mode":"width","collapsed-width":64,width:240,"native-scrollbar":!1,collapsed:$(n)},{default:W(()=>[F("div",St,[F("div",{class:Oe(["border-b dark:border-neutral-800 flex flex-wrap h-16 items-center p-4",$(n)?"justify-center":"justify-between"])},[F("div",null,[$(n)?(V(),Z(u,{key:0,class:"text-center text-2xl leading-none"},{default:W(()=>[he(ne($(t).name.substring(0,1)),1)]),_:1})):(V(),Q("h2",It,[_[0]||(_[0]=F("img",{src:Lo,class:"max-w-28",alt:""},null,-1)),F("span",Rt,ne($(t).name),1)]))]),$(n)?ce("",!0):(V(),Q("div",Pt,[U(P,{name:"ri:menu-fold-fill",class:"cursor-pointer text-xl",onClick:d,title:$(o)("Collapse")},null,8,["title"])]))],2),F("div",Tt,[U(A,{indent:26,"root-indent":12,"collapsed-width":64,"collapsed-icon-size":22,options:$(b),class:"flex-1"},null,8,["options"])]),$(n)?(V(),Q("div",kt,[U(P,{name:"ri:menu-unfold-fill",class:"cursor-pointer text-xl",onClick:d,title:$(o)("Expand")},null,8,["title"])])):ce("",!0),F("div",{class:Oe(["border-t dark:border-neutral-800 p-2",{"flex justify-between items-center":!$(n)}])},[F("div",At,[$(n)?(V(),Q("div",Ot,[U(y,{placement:"right",trigger:"hover"},{trigger:W(()=>[F("div",{onClick:d,class:"cursor-pointer"},[U(P,{name:$(n)?"ri:translate-2":"ri:translate",class:"text-xl"},null,8,["name"])])]),default:W(()=>[he(" "+ne($(o)("Language")),1)]),_:1})])):(V(),Z(T,{key:1}))]),F("div",Nt,[$(n)?(V(),Q("div",Ht,[U(y,{placement:"right",trigger:"hover"},{trigger:W(()=>[F("div",{onClick:d,class:"cursor-pointer"},[U(P,{name:"ri:contrast-2-line",class:"text-xl"})])]),default:W(()=>[he(" "+ne($(o)("Theme")),1)]),_:1})])):(V(),Z(O,{key:1}))])],2),F("div",Et,[U(f,{isCollapsed:$(n)},null,8,["isCollapsed"])])])]),_:1},8,["collapsed"])):ce("",!0)}}}),Ft={},Bt={class:"h-screen overflow-y-auto flex flex-col flex-1"},Lt={class:"flex-1"};function jt(e,o){const t=$t,l=nt,a=Do;return V(),Z(a,{vertical:""},{default:W(()=>[U(l,{class:"h-full"},{default:W(()=>[U(l,{"has-sider":"",class:"h-full"},{default:W(()=>[U(t),F("div",Bt,[F("div",Lt,[Fo(e.$slots,"default")])])]),_:3})]),_:3})]),_:3})}const ir=Uo(Ft,[["render",jt]]);export{ir as default};
