You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
330 lines
54 KiB
JavaScript
330 lines
54 KiB
JavaScript
import{M as re,a$ as mt,b0 as wt,i as ke,b1 as Yt,aG as Xt,L as k,j as T,aa as Le,aM as nt,aQ as Ae,q as r,aI as Zt,ak as st,b2 as De,aX as Qt,al as lt,b3 as Jt,b4 as dt,aO as yt,P as B,R as N,Q as le,a4 as xt,a5 as he,b5 as en,J as rt,K as tn,af as ue,ah as He,X as Ct,b6 as at,b7 as Ce,a_ as St,a2 as ne,a3 as ot,aY as Rt,U as J,b8 as nn,b9 as on,a0 as Se,ag as Ze,ad as ut,ba as ln,ai as rn,Y as an,aj as sn,W as dn,ax as Ve,bb as un,ac as cn,bc as fn,N as Qe,aB as hn,F as vn,bd as gn,a8 as ct,av as bn,be as pn,a9 as mn,bf as wn,aE as it,bg as yn,bh as xn,bi as Cn,bj as Sn,bk as Rn,bl as ft,bm as Fn,bn as Tn,an as ae}from"./index.31905853.js";import{u as Ft,N as On}from"./Input.325ae8a6.js";function zn(e){switch(typeof e){case"string":return e||void 0;case"number":return String(e);default:return}}function Je(e){const n=e.filter(o=>o!==void 0);if(n.length!==0)return n.length===1?n[0]:o=>{e.forEach(l=>{l&&l(o)})}}function ht(e){return e&-e}class Mn{constructor(n,o){this.l=n,this.min=o;const l=new Array(n+1);for(let d=0;d<n+1;++d)l[d]=0;this.ft=l}add(n,o){if(o===0)return;const{l,ft:d}=this;for(n+=1;n<=l;)d[n]+=o,n+=ht(n)}get(n){return this.sum(n+1)-this.sum(n)}sum(n){if(n===void 0&&(n=this.l),n<=0)return 0;const{ft:o,min:l,l:d}=this;if(n>d)throw new Error("[FinweckTree.sum]: `i` is larger than length.");let c=n*l;for(;n>0;)c+=o[n],n-=ht(n);return c}getBound(n){let o=0,l=this.l;for(;l>o;){const d=Math.floor((o+l)/2),c=this.sum(d);if(c>n){l=d;continue}else if(c<n){if(o===d)return this.sum(o+1)<=n?o+1:d;o=d}else return d}return o}}let Ne;function kn(){return Ne===void 0&&("matchMedia"in window?Ne=window.matchMedia("(pointer:coarse)").matches:Ne=!1),Ne}let et;function vt(){return et===void 0&&(et="chrome"in window?window.devicePixelRatio:1),et}const Pn=De(".v-vl",{maxHeight:"inherit",height:"100%",overflow:"auto",minWidth:"1px"},[De("&:not(.v-vl--show-scrollbar)",{scrollbarWidth:"none"},[De("&::-webkit-scrollbar, &::-webkit-scrollbar-track-piece, &::-webkit-scrollbar-thumb",{width:0,height:0,display:"none"})])]);var In=re({name:"VirtualList",inheritAttrs:!1,props:{showScrollbar:{type:Boolean,default:!0},items:{type:Array,default:()=>[]},itemSize:{type:Number,required:!0},itemResizable:Boolean,itemsStyle:[String,Object],visibleItemsTag:{type:[String,Object],default:"div"},visibleItemsProps:Object,ignoreItemResize:Boolean,onScroll:Function,onWheel:Function,onResize:Function,defaultScrollKey:[Number,String],defaultScrollIndex:Number,keyField:{type:String,default:"key"},paddingTop:{type:[Number,String],default:0},paddingBottom:{type:[Number,String],default:0}},setup(e){const n=mt();Pn.mount({id:"vueuc/virtual-list",head:!0,anchorMetaName:wt,ssr:n}),ke(()=>{const{defaultScrollIndex:h,defaultScrollKey:v}=e;h!=null?p({index:h}):v!=null&&p({key:v})});let o=!1,l=!1;Yt(()=>{if(o=!1,!l){l=!0;return}p({top:S.value,left:m})}),Xt(()=>{o=!0,l||(l=!0)});const d=k(()=>{const h=new Map,{keyField:v}=e;return e.items.forEach((I,W)=>{h.set(I[v],W)}),h}),c=T(null),b=T(void 0),a=new Map,R=k(()=>{const{items:h,itemSize:v,keyField:I}=e,W=new Mn(h.length,v);return h.forEach((H,V)=>{const E=H[I],j=a.get(E);j!==void 0&&W.add(V,j)}),W}),w=T(0);let m=0;const S=T(0),O=Le(()=>Math.max(R.value.getBound(S.value-nt(e.paddingTop))-1,0)),$=k(()=>{const{value:h}=b;if(h===void 0)return[];const{items:v,itemSize:I}=e,W=O.value,H=Math.min(W+Math.ceil(h/I+1),v.length-1),V=[];for(let E=W;E<=H;++E)V.push(v[E]);return V}),p=(h,v)=>{if(typeof h=="number"){y(h,v,"auto");return}const{left:I,top:W,index:H,key:V,position:E,behavior:j,debounce:i=!0}=h;if(I!==void 0||W!==void 0)y(I,W,j);else if(H!==void 0)C(H,j,i);else if(V!==void 0){const f=d.value.get(V);f!==void 0&&C(f,j,i)}else E==="bottom"?y(0,Number.MAX_SAFE_INTEGER,j):E==="top"&&y(0,0,j)};let F,L=null;function C(h,v,I){const{value:W}=R,H=W.sum(h)+nt(e.paddingTop);if(!I)c.value.scrollTo({left:0,top:H,behavior:v});else{F=h,L!==null&&window.clearTimeout(L),L=window.setTimeout(()=>{F=void 0,L=null},16);const{scrollTop:V,offsetHeight:E}=c.value;if(H>V){const j=W.get(h);H+j<=V+E||c.value.scrollTo({left:0,top:H+j-E,behavior:v})}else c.value.scrollTo({left:0,top:H,behavior:v})}}function y(h,v,I){c.value.scrollTo({left:h,top:v,behavior:I})}function U(h,v){var I,W,H;if(o||e.ignoreItemResize||ee(v.target))return;const{value:V}=R,E=d.value.get(h),j=V.get(E),i=(H=(W=(I=v.borderBoxSize)===null||I===void 0?void 0:I[0])===null||W===void 0?void 0:W.blockSize)!==null&&H!==void 0?H:v.contentRect.height;if(i===j)return;i-e.itemSize===0?a.delete(h):a.set(h,i-e.itemSize);const A=i-j;if(A===0)return;V.add(E,A);const Z=c.value;if(Z!=null){if(F===void 0){const se=V.sum(E);Z.scrollTop>se&&Z.scrollBy(0,A)}else if(E<F)Z.scrollBy(0,A);else if(E===F){const se=V.sum(E);i+se>Z.scrollTop+Z.offsetHeight&&Z.scrollBy(0,A)}ie()}w.value++}const Y=!kn();let q=!1;function D(h){var v;(v=e.onScroll)===null||v===void 0||v.call(e,h),(!Y||!q)&&ie()}function G(h){var v;if((v=e.onWheel)===null||v===void 0||v.call(e,h),Y){const I=c.value;if(I!=null){if(h.deltaX===0&&(I.scrollTop===0&&h.deltaY<=0||I.scrollTop+I.offsetHeight>=I.scrollHeight&&h.deltaY>=0))return;h.preventDefault(),I.scrollTop+=h.deltaY/vt(),I.scrollLeft+=h.deltaX/vt(),ie(),q=!0,Qt(()=>{q=!1})}}}function Q(h){if(o||ee(h.target)||h.contentRect.height===b.value)return;b.value=h.contentRect.height;const{onResize:v}=e;v!==void 0&&v(h)}function ie(){const{value:h}=c;h!=null&&(S.value=h.scrollTop,m=h.scrollLeft)}function ee(h){let v=h;for(;v!==null;){if(v.style.display==="none")return!0;v=v.parentElement}return!1}return{listHeight:b,listStyle:{overflow:"auto"},keyToIndex:d,itemsStyle:k(()=>{const{itemResizable:h}=e,v=Ae(R.value.sum());return w.value,[e.itemsStyle,{boxSizing:"content-box",height:h?"":v,minHeight:h?v:"",paddingTop:Ae(e.paddingTop),paddingBottom:Ae(e.paddingBottom)}]}),visibleItemsStyle:k(()=>(w.value,{transform:`translateY(${Ae(R.value.sum(O.value))})`})),viewportItems:$,listElRef:c,itemsElRef:T(null),scrollTo:p,handleListResize:Q,handleListScroll:D,handleListWheel:G,handleItemResize:U}},render(){const{itemResizable:e,keyField:n,keyToIndex:o,visibleItemsTag:l}=this;return r(st,{onResize:this.handleListResize},{default:()=>{var d,c;return r("div",Zt(this.$attrs,{class:["v-vl",this.showScrollbar&&"v-vl--show-scrollbar"],onScroll:this.handleListScroll,onWheel:this.handleListWheel,ref:"listElRef"}),[this.items.length!==0?r("div",{ref:"itemsElRef",class:"v-vl-items",style:this.itemsStyle},[r(l,Object.assign({class:"v-vl-visible-items",style:this.visibleItemsStyle},this.visibleItemsProps),{default:()=>this.viewportItems.map(b=>{const a=b[n],R=o.get(a),w=this.$slots.default({item:b,index:R})[0];return e?r(st,{key:a,onResize:m=>this.handleItemResize(a,m)},{default:()=>w}):(w.key=a,w)})})]):(c=(d=this.$slots).empty)===null||c===void 0?void 0:c.call(d)])}})}});const be="v-hidden",_n=De("[v-hidden]",{display:"none!important"});var gt=re({name:"Overflow",props:{getCounter:Function,getTail:Function,updateCounter:Function,onUpdateOverflow:Function},setup(e,{slots:n}){const o=T(null),l=T(null);function d(){const{value:b}=o,{getCounter:a,getTail:R}=e;let w;if(a!==void 0?w=a():w=l.value,!b||!w)return;w.hasAttribute(be)&&w.removeAttribute(be);const{children:m}=b,S=b.offsetWidth,O=[],$=n.tail?R==null?void 0:R():null;let p=$?$.offsetWidth:0,F=!1;const L=b.children.length-(n.tail?1:0);for(let y=0;y<L-1;++y){if(y<0)continue;const U=m[y];if(F){U.hasAttribute(be)||U.setAttribute(be,"");continue}else U.hasAttribute(be)&&U.removeAttribute(be);const Y=U.offsetWidth;if(p+=Y,O[y]=Y,p>S){const{updateCounter:q}=e;for(let D=y;D>=0;--D){const G=L-1-D;q!==void 0?q(G):w.textContent=`${G}`;const Q=w.offsetWidth;if(p-=O[D],p+Q<=S||D===0){F=!0,y=D-1,$&&(y===-1?($.style.maxWidth=`${S-Q}px`,$.style.boxSizing="border-box"):$.style.maxWidth="");break}}}}const{onUpdateOverflow:C}=e;F?C!==void 0&&C(!0):(C!==void 0&&C(!1),w.setAttribute(be,""))}const c=mt();return _n.mount({id:"vueuc/overflow",head:!0,anchorMetaName:wt,ssr:c}),ke(d),{selfRef:o,counterRef:l,sync:d}},render(){const{$slots:e}=this;return lt(this.sync),r("div",{class:"v-overflow",ref:"selfRef"},[Jt(e,"default"),e.counter?e.counter():r("span",{style:{display:"inline-block"},ref:"counterRef"}),e.tail?e.tail():null])}});function Tt(e,n){n&&(ke(()=>{const{value:o}=e;o&&dt.registerHandler(o,n)}),yt(()=>{const{value:o}=e;o&&dt.unregisterHandler(o)}))}var Bn=re({name:"Checkmark",render(){return r("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16"},r("g",{fill:"none"},r("path",{d:"M14.046 3.486a.75.75 0 0 1-.032 1.06l-7.93 7.474a.85.85 0 0 1-1.188-.022l-2.68-2.72a.75.75 0 1 1 1.068-1.053l2.234 2.267l7.468-7.038a.75.75 0 0 1 1.06.032z",fill:"currentColor"})))}}),$n=re({name:"Empty",render(){return r("svg",{viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r("path",{d:"M26 7.5C26 11.0899 23.0899 14 19.5 14C15.9101 14 13 11.0899 13 7.5C13 3.91015 15.9101 1 19.5 1C23.0899 1 26 3.91015 26 7.5ZM16.8536 4.14645C16.6583 3.95118 16.3417 3.95118 16.1464 4.14645C15.9512 4.34171 15.9512 4.65829 16.1464 4.85355L18.7929 7.5L16.1464 10.1464C15.9512 10.3417 15.9512 10.6583 16.1464 10.8536C16.3417 11.0488 16.6583 11.0488 16.8536 10.8536L19.5 8.20711L22.1464 10.8536C22.3417 11.0488 22.6583 11.0488 22.8536 10.8536C23.0488 10.6583 23.0488 10.3417 22.8536 10.1464L20.2071 7.5L22.8536 4.85355C23.0488 4.65829 23.0488 4.34171 22.8536 4.14645C22.6583 3.95118 22.3417 3.95118 22.1464 4.14645L19.5 6.79289L16.8536 4.14645Z",fill:"currentColor"}),r("path",{d:"M25 22.75V12.5991C24.5572 13.0765 24.053 13.4961 23.5 13.8454V16H17.5L17.3982 16.0068C17.0322 16.0565 16.75 16.3703 16.75 16.75C16.75 18.2688 15.5188 19.5 14 19.5C12.4812 19.5 11.25 18.2688 11.25 16.75L11.2432 16.6482C11.1935 16.2822 10.8797 16 10.5 16H4.5V7.25C4.5 6.2835 5.2835 5.5 6.25 5.5H12.2696C12.4146 4.97463 12.6153 4.47237 12.865 4H6.25C4.45507 4 3 5.45507 3 7.25V22.75C3 24.5449 4.45507 26 6.25 26H21.75C23.5449 26 25 24.5449 25 22.75ZM4.5 22.75V17.5H9.81597L9.85751 17.7041C10.2905 19.5919 11.9808 21 14 21L14.215 20.9947C16.2095 20.8953 17.842 19.4209 18.184 17.5H23.5V22.75C23.5 23.7165 22.7165 24.5 21.75 24.5H6.25C5.2835 24.5 4.5 23.7165 4.5 22.75Z",fill:"currentColor"}))}}),En=re({props:{onFocus:Function,onBlur:Function},setup(e){return()=>r("div",{style:"width: 0; height: 0",tabindex:0,onFocus:e.onFocus,onBlur:e.onBlur})}}),An=B("empty",`
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
font-size: var(--n-font-size);
|
|
`,[N("icon",`
|
|
width: var(--n-icon-size);
|
|
height: var(--n-icon-size);
|
|
font-size: var(--n-icon-size);
|
|
line-height: var(--n-icon-size);
|
|
color: var(--n-icon-color);
|
|
transition:
|
|
color .3s var(--n-bezier);
|
|
`,[le("+",[N("description",`
|
|
margin-top: 8px;
|
|
`)])]),N("description",`
|
|
transition: color .3s var(--n-bezier);
|
|
color: var(--n-text-color);
|
|
`),N("extra",`
|
|
text-align: center;
|
|
transition: color .3s var(--n-bezier);
|
|
margin-top: 12px;
|
|
color: var(--n-extra-text-color);
|
|
`)]);const Nn=Object.assign(Object.assign({},he.props),{description:String,showDescription:{type:Boolean,default:!0},showIcon:{type:Boolean,default:!0},size:{type:String,default:"medium"},renderIcon:Function});var Ln=re({name:"Empty",props:Nn,setup(e){const{mergedClsPrefixRef:n,inlineThemeDisabled:o}=xt(e),l=he("Empty","-empty",An,en,e,n),{localeRef:d}=Ft("Empty"),c=rt(tn,null),b=k(()=>{var m,S,O;return(m=e.description)!==null&&m!==void 0?m:(O=(S=c==null?void 0:c.mergedComponentPropsRef.value)===null||S===void 0?void 0:S.Empty)===null||O===void 0?void 0:O.description}),a=k(()=>{var m,S;return((S=(m=c==null?void 0:c.mergedComponentPropsRef.value)===null||m===void 0?void 0:m.Empty)===null||S===void 0?void 0:S.renderIcon)||(()=>r($n,null))}),R=k(()=>{const{size:m}=e,{common:{cubicBezierEaseInOut:S},self:{[ue("iconSize",m)]:O,[ue("fontSize",m)]:$,textColor:p,iconColor:F,extraTextColor:L}}=l.value;return{"--n-icon-size":O,"--n-font-size":$,"--n-bezier":S,"--n-text-color":p,"--n-icon-color":F,"--n-extra-text-color":L}}),w=o?He("empty",k(()=>{let m="";const{size:S}=e;return m+=S[0],m}),R,e):void 0;return{mergedClsPrefix:n,mergedRenderIcon:a,localizedDescription:k(()=>b.value||d.value.description),cssVars:o?void 0:R,themeClass:w==null?void 0:w.themeClass,onRender:w==null?void 0:w.onRender}},render(){const{$slots:e,mergedClsPrefix:n,onRender:o}=this;return o==null||o(),r("div",{class:[`${n}-empty`,this.themeClass],style:this.cssVars},this.showIcon?r("div",{class:`${n}-empty__icon`},e.icon?e.icon():r(Ct,{clsPrefix:n},{default:this.mergedRenderIcon})):null,this.showDescription?r("div",{class:`${n}-empty__description`},e.default?e.default():this.localizedDescription):null,e.extra?r("div",{class:`${n}-empty__extra`},e.extra()):null)}});function Dn(e,n){return r(St,{name:"fade-in-scale-up-transition"},{default:()=>e?r(Ct,{clsPrefix:n,class:`${n}-base-select-option__check`},{default:()=>r(Bn)}):null})}var bt=re({name:"NBaseSelectOption",props:{clsPrefix:{type:String,required:!0},tmNode:{type:Object,required:!0}},setup(e){const{valueRef:n,pendingTmNodeRef:o,multipleRef:l,valueSetRef:d,renderLabelRef:c,renderOptionRef:b,labelFieldRef:a,valueFieldRef:R,showCheckmarkRef:w,nodePropsRef:m,handleOptionClick:S,handleOptionMouseEnter:O}=rt(at),$=Le(()=>{const{value:C}=o;return C?e.tmNode.key===C.key:!1});function p(C){const{tmNode:y}=e;y.disabled||S(C,y)}function F(C){const{tmNode:y}=e;y.disabled||O(C,y)}function L(C){const{tmNode:y}=e,{value:U}=$;y.disabled||U||O(C,y)}return{multiple:l,isGrouped:Le(()=>{const{tmNode:C}=e,{parent:y}=C;return y&&y.rawNode.type==="group"}),showCheckmark:w,nodeProps:m,isPending:$,isSelected:Le(()=>{const{value:C}=n,{value:y}=l;if(C===null)return!1;const U=e.tmNode.rawNode[R.value];if(y){const{value:Y}=d;return Y.has(U)}else return C===U}),labelField:a,renderLabel:c,renderOption:b,handleMouseMove:L,handleMouseEnter:F,handleClick:p}},render(){const{clsPrefix:e,tmNode:{rawNode:n},isSelected:o,isPending:l,isGrouped:d,showCheckmark:c,nodeProps:b,renderOption:a,renderLabel:R,handleClick:w,handleMouseEnter:m,handleMouseMove:S}=this,O=Dn(o,e),$=R?[R(n,o),c&&O]:[Ce(n[this.labelField],n,o),c&&O],p=b==null?void 0:b(n),F=r("div",Object.assign({},p,{class:[`${e}-base-select-option`,n.class,p==null?void 0:p.class,{[`${e}-base-select-option--disabled`]:n.disabled,[`${e}-base-select-option--selected`]:o,[`${e}-base-select-option--grouped`]:d,[`${e}-base-select-option--pending`]:l,[`${e}-base-select-option--show-checkmark`]:c}],style:[(p==null?void 0:p.style)||"",n.style||""],onClick:Je([w,p==null?void 0:p.onClick]),onMouseenter:Je([m,p==null?void 0:p.onMouseenter]),onMousemove:Je([S,p==null?void 0:p.onMousemove])}),r("div",{class:`${e}-base-select-option__content`},$));return n.render?n.render({node:F,option:n,selected:o}):a?a({node:F,option:n,selected:o}):F}}),pt=re({name:"NBaseSelectGroupHeader",props:{clsPrefix:{type:String,required:!0},tmNode:{type:Object,required:!0}},setup(){const{renderLabelRef:e,renderOptionRef:n,labelFieldRef:o,nodePropsRef:l}=rt(at);return{labelField:o,nodeProps:l,renderLabel:e,renderOption:n}},render(){const{clsPrefix:e,renderLabel:n,renderOption:o,nodeProps:l,tmNode:{rawNode:d}}=this,c=l==null?void 0:l(d),b=n?n(d,!1):Ce(d[this.labelField],d,!1),a=r("div",Object.assign({},c,{class:[`${e}-base-select-group-header`,c==null?void 0:c.class]}),b);return d.render?d.render({node:a,option:d}):o?o({node:a,option:d,selected:!1}):a}}),Vn=B("base-select-menu",`
|
|
line-height: 1.5;
|
|
outline: none;
|
|
z-index: 0;
|
|
position: relative;
|
|
border-radius: var(--n-border-radius);
|
|
transition:
|
|
background-color .3s var(--n-bezier),
|
|
box-shadow .3s var(--n-bezier);
|
|
background-color: var(--n-color);
|
|
`,[B("scrollbar",`
|
|
max-height: var(--n-height);
|
|
`),B("virtual-list",`
|
|
max-height: var(--n-height);
|
|
`),B("base-select-option",`
|
|
min-height: var(--n-option-height);
|
|
font-size: var(--n-option-font-size);
|
|
display: flex;
|
|
align-items: center;
|
|
`,[N("content",`
|
|
z-index: 1;
|
|
white-space: nowrap;
|
|
text-overflow: ellipsis;
|
|
overflow: hidden;
|
|
`)]),B("base-select-group-header",`
|
|
min-height: var(--n-option-height);
|
|
font-size: .93em;
|
|
display: flex;
|
|
align-items: center;
|
|
`),B("base-select-menu-option-wrapper",`
|
|
position: relative;
|
|
width: 100%;
|
|
`),N("loading, empty",`
|
|
display: flex;
|
|
padding: 12px 32px;
|
|
flex: 1;
|
|
justify-content: center;
|
|
`),N("loading",`
|
|
color: var(--n-loading-color);
|
|
font-size: var(--n-loading-size);
|
|
`),N("action",`
|
|
padding: 8px var(--n-option-padding-left);
|
|
font-size: var(--n-option-font-size);
|
|
transition:
|
|
color .3s var(--n-bezier),
|
|
border-color .3s var(--n-bezier);
|
|
border-top: 1px solid var(--n-action-divider-color);
|
|
color: var(--n-action-text-color);
|
|
`),B("base-select-group-header",`
|
|
position: relative;
|
|
cursor: default;
|
|
padding: var(--n-option-padding);
|
|
color: var(--n-group-header-text-color);
|
|
`),B("base-select-option",`
|
|
cursor: pointer;
|
|
position: relative;
|
|
padding: var(--n-option-padding);
|
|
transition:
|
|
color .3s var(--n-bezier),
|
|
opacity .3s var(--n-bezier);
|
|
box-sizing: border-box;
|
|
color: var(--n-option-text-color);
|
|
opacity: 1;
|
|
`,[ne("show-checkmark",`
|
|
padding-right: calc(var(--n-option-padding-right) + 20px);
|
|
`),le("&::before",`
|
|
content: "";
|
|
position: absolute;
|
|
left: 4px;
|
|
right: 4px;
|
|
top: 0;
|
|
bottom: 0;
|
|
border-radius: var(--n-border-radius);
|
|
transition: background-color .3s var(--n-bezier);
|
|
`),le("&:active",`
|
|
color: var(--n-option-text-color-pressed);
|
|
`),ne("grouped",`
|
|
padding-left: calc(var(--n-option-padding-left) * 1.5);
|
|
`),ne("pending",[le("&::before",`
|
|
background-color: var(--n-option-color-pending);
|
|
`)]),ne("selected",`
|
|
color: var(--n-option-text-color-active);
|
|
`,[le("&::before",`
|
|
background-color: var(--n-option-color-active);
|
|
`),ne("pending",[le("&::before",`
|
|
background-color: var(--n-option-color-active-pending);
|
|
`)])]),ne("disabled",`
|
|
cursor: not-allowed;
|
|
`,[ot("selected",`
|
|
color: var(--n-option-text-color-disabled);
|
|
`),ne("selected",`
|
|
opacity: var(--n-option-opacity-disabled);
|
|
`)]),N("check",`
|
|
font-size: 16px;
|
|
position: absolute;
|
|
right: calc(var(--n-option-padding-right) - 4px);
|
|
top: calc(50% - 7px);
|
|
color: var(--n-option-check-color);
|
|
transition: color .3s var(--n-bezier);
|
|
`,[Rt({enterScale:"0.5"})])])]),Wn=re({name:"InternalSelectMenu",props:Object.assign(Object.assign({},he.props),{clsPrefix:{type:String,required:!0},scrollable:{type:Boolean,default:!0},treeMate:{type:Object,required:!0},multiple:Boolean,size:{type:String,default:"medium"},value:{type:[String,Number,Array],default:null},autoPending:Boolean,virtualScroll:{type:Boolean,default:!0},show:{type:Boolean,default:!0},labelField:{type:String,default:"label"},valueField:{type:String,default:"value"},loading:Boolean,focusable:Boolean,renderLabel:Function,renderOption:Function,nodeProps:Function,showCheckmark:{type:Boolean,default:!0},onMousedown:Function,onScroll:Function,onFocus:Function,onBlur:Function,onKeyup:Function,onKeydown:Function,onTabOut:Function,onMouseenter:Function,onMouseleave:Function,onResize:Function,resetMenuOnOptionsChange:{type:Boolean,default:!0},inlineThemeDisabled:Boolean,onToggle:Function}),setup(e){const n=he("InternalSelectMenu","-internal-select-menu",Vn,nn,e,J(e,"clsPrefix")),o=T(null),l=T(null),d=T(null),c=k(()=>e.treeMate.getFlattenedNodes()),b=k(()=>on(c.value)),a=T(null);function R(){const{treeMate:i}=e;let f=null;const{value:A}=e;A===null?f=i.getFirstAvailableNode():(e.multiple?f=i.getNode((A||[])[(A||[]).length-1]):f=i.getNode(A),(!f||f.disabled)&&(f=i.getFirstAvailableNode())),h(f||null)}function w(){const{value:i}=a;i&&!e.treeMate.getNode(i.key)&&(a.value=null)}let m;Se(()=>e.show,i=>{i?m=Se(()=>e.treeMate,()=>{e.resetMenuOnOptionsChange?(e.autoPending?R():w(),lt(v)):w()},{immediate:!0}):m==null||m()},{immediate:!0}),yt(()=>{m==null||m()});const S=k(()=>nt(n.value.self[ue("optionHeight",e.size)])),O=k(()=>Ze(n.value.self[ue("padding",e.size)])),$=k(()=>e.multiple&&Array.isArray(e.value)?new Set(e.value):new Set),p=k(()=>{const i=c.value;return i&&i.length===0});function F(i){const{onToggle:f}=e;f&&f(i)}function L(i){const{onScroll:f}=e;f&&f(i)}function C(i){var f;(f=d.value)===null||f===void 0||f.sync(),L(i)}function y(){var i;(i=d.value)===null||i===void 0||i.sync()}function U(){const{value:i}=a;return i||null}function Y(i,f){f.disabled||h(f,!1)}function q(i,f){f.disabled||F(f)}function D(i){var f;Ve(i,"action")||(f=e.onKeyup)===null||f===void 0||f.call(e,i)}function G(i){var f;Ve(i,"action")||(f=e.onKeydown)===null||f===void 0||f.call(e,i)}function Q(i){var f;(f=e.onMousedown)===null||f===void 0||f.call(e,i),!e.focusable&&i.preventDefault()}function ie(){const{value:i}=a;i&&h(i.getNext({loop:!0}),!0)}function ee(){const{value:i}=a;i&&h(i.getPrev({loop:!0}),!0)}function h(i,f=!1){a.value=i,f&&v()}function v(){var i,f;const A=a.value;if(!A)return;const Z=b.value(A.key);Z!==null&&(e.virtualScroll?(i=l.value)===null||i===void 0||i.scrollTo({index:Z}):(f=d.value)===null||f===void 0||f.scrollTo({index:Z,elSize:S.value}))}function I(i){var f,A;!((f=o.value)===null||f===void 0)&&f.contains(i.target)&&((A=e.onFocus)===null||A===void 0||A.call(e,i))}function W(i){var f,A;!((f=o.value)===null||f===void 0)&&f.contains(i.relatedTarget)||(A=e.onBlur)===null||A===void 0||A.call(e,i)}ut(at,{handleOptionMouseEnter:Y,handleOptionClick:q,valueSetRef:$,pendingTmNodeRef:a,nodePropsRef:J(e,"nodeProps"),showCheckmarkRef:J(e,"showCheckmark"),multipleRef:J(e,"multiple"),valueRef:J(e,"value"),renderLabelRef:J(e,"renderLabel"),renderOptionRef:J(e,"renderOption"),labelFieldRef:J(e,"labelField"),valueFieldRef:J(e,"valueField")}),ut(ln,o),ke(()=>{const{value:i}=d;i&&i.sync()});const H=k(()=>{const{size:i}=e,{common:{cubicBezierEaseInOut:f},self:{height:A,borderRadius:Z,color:se,groupHeaderTextColor:Re,actionDividerColor:Fe,optionTextColorPressed:pe,optionTextColor:me,optionTextColorDisabled:de,optionTextColorActive:te,optionOpacityDisabled:we,optionCheckColor:ce,actionTextColor:Te,optionColorPending:ve,optionColorActive:ge,loadingColor:Oe,loadingSize:ze,optionColorActivePending:Me,[ue("optionFontSize",i)]:ye,[ue("optionHeight",i)]:xe,[ue("optionPadding",i)]:oe}}=n.value;return{"--n-height":A,"--n-action-divider-color":Fe,"--n-action-text-color":Te,"--n-bezier":f,"--n-border-radius":Z,"--n-color":se,"--n-option-font-size":ye,"--n-group-header-text-color":Re,"--n-option-check-color":ce,"--n-option-color-pending":ve,"--n-option-color-active":ge,"--n-option-color-active-pending":Me,"--n-option-height":xe,"--n-option-opacity-disabled":we,"--n-option-text-color":me,"--n-option-text-color-active":te,"--n-option-text-color-disabled":de,"--n-option-text-color-pressed":pe,"--n-option-padding":oe,"--n-option-padding-left":Ze(oe,"left"),"--n-option-padding-right":Ze(oe,"right"),"--n-loading-color":Oe,"--n-loading-size":ze}}),{inlineThemeDisabled:V}=e,E=V?He("internal-select-menu",k(()=>e.size[0]),H,e):void 0,j={selfRef:o,next:ie,prev:ee,getPendingTmNode:U};return Tt(o,e.onResize),Object.assign({mergedTheme:n,virtualListRef:l,scrollbarRef:d,itemSize:S,padding:O,flattenedNodes:c,empty:p,virtualListContainer(){const{value:i}=l;return i==null?void 0:i.listElRef},virtualListContent(){const{value:i}=l;return i==null?void 0:i.itemsElRef},doScroll:L,handleFocusin:I,handleFocusout:W,handleKeyUp:D,handleKeyDown:G,handleMouseDown:Q,handleVirtualListResize:y,handleVirtualListScroll:C,cssVars:V?void 0:H,themeClass:E==null?void 0:E.themeClass,onRender:E==null?void 0:E.onRender},j)},render(){const{$slots:e,virtualScroll:n,clsPrefix:o,mergedTheme:l,themeClass:d,onRender:c}=this;return c==null||c(),r("div",{ref:"selfRef",tabindex:this.focusable?0:-1,class:[`${o}-base-select-menu`,d,this.multiple&&`${o}-base-select-menu--multiple`],style:this.cssVars,onFocusin:this.handleFocusin,onFocusout:this.handleFocusout,onKeyup:this.handleKeyUp,onKeydown:this.handleKeyDown,onMousedown:this.handleMouseDown,onMouseenter:this.onMouseenter,onMouseleave:this.onMouseleave},this.loading?r("div",{class:`${o}-base-select-menu__loading`},r(an,{clsPrefix:o,strokeWidth:20})):this.empty?r("div",{class:`${o}-base-select-menu__empty`,"data-empty":!0},dn(e.empty,()=>[r(Ln,{theme:l.peers.Empty,themeOverrides:l.peerOverrides.Empty})])):r(sn,{ref:"scrollbarRef",theme:l.peers.Scrollbar,themeOverrides:l.peerOverrides.Scrollbar,scrollable:this.scrollable,container:n?this.virtualListContainer:void 0,content:n?this.virtualListContent:void 0,onScroll:n?void 0:this.doScroll},{default:()=>n?r(In,{ref:"virtualListRef",class:`${o}-virtual-list`,items:this.flattenedNodes,itemSize:this.itemSize,showScrollbar:!1,paddingTop:this.padding.top,paddingBottom:this.padding.bottom,onResize:this.handleVirtualListResize,onScroll:this.handleVirtualListScroll,itemResizable:!0},{default:({item:b})=>b.isGroup?r(pt,{key:b.key,clsPrefix:o,tmNode:b}):b.ignored?null:r(bt,{clsPrefix:o,key:b.key,tmNode:b})}):r("div",{class:`${o}-base-select-menu-option-wrapper`,style:{paddingTop:this.padding.top,paddingBottom:this.padding.bottom}},this.flattenedNodes.map(b=>b.isGroup?r(pt,{key:b.key,clsPrefix:o,tmNode:b}):r(bt,{clsPrefix:o,key:b.key,tmNode:b})))}),rn(e.action,b=>b&&[r("div",{class:`${o}-base-select-menu__action`,"data-action":!0,key:"action"},b),r(En,{onFocus:this.onTabOut,key:"focus-detector"})]))}}),Hn=le([B("base-selection",`
|
|
position: relative;
|
|
z-index: auto;
|
|
box-shadow: none;
|
|
width: 100%;
|
|
max-width: 100%;
|
|
display: inline-block;
|
|
vertical-align: bottom;
|
|
border-radius: var(--n-border-radius);
|
|
min-height: var(--n-height);
|
|
line-height: 1.5;
|
|
font-size: var(--n-font-size);
|
|
`,[B("base-loading",`
|
|
color: var(--n-loading-color);
|
|
`),B("base-selection-tags","min-height: var(--n-height);"),N("border, state-border",`
|
|
position: absolute;
|
|
left: 0;
|
|
right: 0;
|
|
top: 0;
|
|
bottom: 0;
|
|
pointer-events: none;
|
|
border: var(--n-border);
|
|
border-radius: inherit;
|
|
transition:
|
|
box-shadow .3s var(--n-bezier),
|
|
border-color .3s var(--n-bezier);
|
|
`),N("state-border",`
|
|
z-index: 1;
|
|
border-color: #0000;
|
|
`),B("base-suffix",`
|
|
cursor: pointer;
|
|
position: absolute;
|
|
top: 50%;
|
|
transform: translateY(-50%);
|
|
right: 10px;
|
|
`,[N("arrow",`
|
|
font-size: var(--n-arrow-size);
|
|
color: var(--n-arrow-color);
|
|
transition: color .3s var(--n-bezier);
|
|
`)]),B("base-selection-overlay",`
|
|
display: flex;
|
|
align-items: center;
|
|
white-space: nowrap;
|
|
pointer-events: none;
|
|
position: absolute;
|
|
top: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
left: 0;
|
|
padding: var(--n-padding-single);
|
|
transition: color .3s var(--n-bezier);
|
|
`,[N("wrapper",`
|
|
flex-basis: 0;
|
|
flex-grow: 1;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
`)]),B("base-selection-placeholder",`
|
|
color: var(--n-placeholder-color);
|
|
`,[N("inner",`
|
|
max-width: 100%;
|
|
overflow: hidden;
|
|
`)]),B("base-selection-tags",`
|
|
cursor: pointer;
|
|
outline: none;
|
|
box-sizing: border-box;
|
|
position: relative;
|
|
z-index: auto;
|
|
display: flex;
|
|
padding: var(--n-padding-multiple);
|
|
flex-wrap: wrap;
|
|
align-items: center;
|
|
width: 100%;
|
|
vertical-align: bottom;
|
|
background-color: var(--n-color);
|
|
border-radius: inherit;
|
|
transition:
|
|
color .3s var(--n-bezier),
|
|
box-shadow .3s var(--n-bezier),
|
|
background-color .3s var(--n-bezier);
|
|
`),B("base-selection-label",`
|
|
height: var(--n-height);
|
|
display: inline-flex;
|
|
width: 100%;
|
|
vertical-align: bottom;
|
|
cursor: pointer;
|
|
outline: none;
|
|
z-index: auto;
|
|
box-sizing: border-box;
|
|
position: relative;
|
|
transition:
|
|
color .3s var(--n-bezier),
|
|
box-shadow .3s var(--n-bezier),
|
|
background-color .3s var(--n-bezier);
|
|
border-radius: inherit;
|
|
background-color: var(--n-color);
|
|
align-items: center;
|
|
`,[B("base-selection-input",`
|
|
font-size: inherit;
|
|
line-height: inherit;
|
|
outline: none;
|
|
cursor: pointer;
|
|
box-sizing: border-box;
|
|
border:none;
|
|
width: 100%;
|
|
padding: var(--n-padding-single);
|
|
background-color: #0000;
|
|
color: var(--n-text-color);
|
|
transition: color .3s var(--n-bezier);
|
|
caret-color: var(--n-caret-color);
|
|
`,[N("content",`
|
|
text-overflow: ellipsis;
|
|
overflow: hidden;
|
|
white-space: nowrap;
|
|
`)]),N("render-label",`
|
|
color: var(--n-text-color);
|
|
`)]),ot("disabled",[le("&:hover",[N("state-border",`
|
|
box-shadow: var(--n-box-shadow-hover);
|
|
border: var(--n-border-hover);
|
|
`)]),ne("focus",[N("state-border",`
|
|
box-shadow: var(--n-box-shadow-focus);
|
|
border: var(--n-border-focus);
|
|
`)]),ne("active",[N("state-border",`
|
|
box-shadow: var(--n-box-shadow-active);
|
|
border: var(--n-border-active);
|
|
`),B("base-selection-label","background-color: var(--n-color-active);"),B("base-selection-tags","background-color: var(--n-color-active);")])]),ne("disabled","cursor: not-allowed;",[N("arrow",`
|
|
color: var(--n-arrow-color-disabled);
|
|
`),B("base-selection-label",`
|
|
cursor: not-allowed;
|
|
background-color: var(--n-color-disabled);
|
|
`,[B("base-selection-input",`
|
|
cursor: not-allowed;
|
|
color: var(--n-text-color-disabled);
|
|
`),N("render-label",`
|
|
color: var(--n-text-color-disabled);
|
|
`)]),B("base-selection-tags",`
|
|
cursor: not-allowed;
|
|
background-color: var(--n-color-disabled);
|
|
`),B("base-selection-placeholder",`
|
|
cursor: not-allowed;
|
|
color: var(--n-placeholder-color-disabled);
|
|
`)]),B("base-selection-input-tag",`
|
|
height: calc(var(--n-height) - 6px);
|
|
line-height: calc(var(--n-height) - 6px);
|
|
outline: none;
|
|
display: none;
|
|
position: relative;
|
|
margin-bottom: 3px;
|
|
max-width: 100%;
|
|
vertical-align: bottom;
|
|
`,[N("input",`
|
|
font-size: inherit;
|
|
font-family: inherit;
|
|
min-width: 1px;
|
|
padding: 0;
|
|
background-color: #0000;
|
|
outline: none;
|
|
border: none;
|
|
max-width: 100%;
|
|
overflow: hidden;
|
|
width: 1em;
|
|
line-height: inherit;
|
|
cursor: pointer;
|
|
color: var(--n-text-color);
|
|
caret-color: var(--n-caret-color);
|
|
`),N("mirror",`
|
|
position: absolute;
|
|
left: 0;
|
|
top: 0;
|
|
white-space: pre;
|
|
visibility: hidden;
|
|
user-select: none;
|
|
-webkit-user-select: none;
|
|
opacity: 0;
|
|
`)]),["warning","error"].map(e=>ne(`${e}-status`,[N("state-border",`border: var(--n-border-${e});`),ot("disabled",[le("&:hover",[N("state-border",`
|
|
box-shadow: var(--n-box-shadow-hover-${e});
|
|
border: var(--n-border-hover-${e});
|
|
`)]),ne("active",[N("state-border",`
|
|
box-shadow: var(--n-box-shadow-active-${e});
|
|
border: var(--n-border-active-${e});
|
|
`),B("base-selection-label",`background-color: var(--n-color-active-${e});`),B("base-selection-tags",`background-color: var(--n-color-active-${e});`)]),ne("focus",[N("state-border",`
|
|
box-shadow: var(--n-box-shadow-focus-${e});
|
|
border: var(--n-border-focus-${e});
|
|
`)])])]))]),B("base-selection-popover",`
|
|
margin-bottom: -3px;
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
margin-right: -8px;
|
|
`),B("base-selection-tag-wrapper",`
|
|
max-width: 100%;
|
|
display: inline-flex;
|
|
padding: 0 7px 3px 0;
|
|
`,[le("&:last-child","padding-right: 0;"),B("tag",`
|
|
font-size: 14px;
|
|
max-width: 100%;
|
|
`,[N("content",`
|
|
line-height: 1.25;
|
|
text-overflow: ellipsis;
|
|
overflow: hidden;
|
|
`)])])]),jn=re({name:"InternalSelection",props:Object.assign(Object.assign({},he.props),{clsPrefix:{type:String,required:!0},bordered:{type:Boolean,default:void 0},active:Boolean,pattern:{type:String,default:""},placeholder:String,selectedOption:{type:Object,default:null},selectedOptions:{type:Array,default:null},labelField:{type:String,default:"label"},valueField:{type:String,default:"value"},multiple:Boolean,filterable:Boolean,clearable:Boolean,disabled:Boolean,size:{type:String,default:"medium"},loading:Boolean,autofocus:Boolean,showArrow:{type:Boolean,default:!0},inputProps:Object,focused:Boolean,renderTag:Function,onKeydown:Function,onClick:Function,onBlur:Function,onFocus:Function,onDeleteOption:Function,maxTagCount:[String,Number],onClear:Function,onPatternInput:Function,onPatternFocus:Function,onPatternBlur:Function,renderLabel:Function,status:String,inlineThemeDisabled:Boolean,ignoreComposition:{type:Boolean,default:!0},onResize:Function}),setup(e){const n=T(null),o=T(null),l=T(null),d=T(null),c=T(null),b=T(null),a=T(null),R=T(null),w=T(null),m=T(null),S=T(!1),O=T(!1),$=T(!1),p=he("InternalSelection","-internal-selection",Hn,un,e,J(e,"clsPrefix")),F=k(()=>e.clearable&&!e.disabled&&($.value||e.active)),L=k(()=>e.selectedOption?e.renderTag?e.renderTag({option:e.selectedOption,handleClose:()=>{}}):e.renderLabel?e.renderLabel(e.selectedOption,!0):Ce(e.selectedOption[e.labelField],e.selectedOption,!0):e.placeholder),C=k(()=>{const s=e.selectedOption;if(!!s)return s[e.labelField]}),y=k(()=>e.multiple?!!(Array.isArray(e.selectedOptions)&&e.selectedOptions.length):e.selectedOption!==null);function U(){var s;const{value:g}=n;if(g){const{value:K}=o;K&&(K.style.width=`${g.offsetWidth}px`,e.maxTagCount!=="responsive"&&((s=w.value)===null||s===void 0||s.sync()))}}function Y(){const{value:s}=m;s&&(s.style.display="none")}function q(){const{value:s}=m;s&&(s.style.display="inline-block")}Se(J(e,"active"),s=>{s||Y()}),Se(J(e,"pattern"),()=>{e.multiple&<(U)});function D(s){const{onFocus:g}=e;g&&g(s)}function G(s){const{onBlur:g}=e;g&&g(s)}function Q(s){const{onDeleteOption:g}=e;g&&g(s)}function ie(s){const{onClear:g}=e;g&&g(s)}function ee(s){const{onPatternInput:g}=e;g&&g(s)}function h(s){var g;(!s.relatedTarget||!(!((g=l.value)===null||g===void 0)&&g.contains(s.relatedTarget)))&&D(s)}function v(s){var g;!((g=l.value)===null||g===void 0)&&g.contains(s.relatedTarget)||G(s)}function I(s){ie(s)}function W(){$.value=!0}function H(){$.value=!1}function V(s){!e.active||!e.filterable||s.target!==o.value&&s.preventDefault()}function E(s){Q(s)}function j(s){if(s.key==="Backspace"&&!i.value&&!e.pattern.length){const{selectedOptions:g}=e;g!=null&&g.length&&E(g[g.length-1])}}const i=T(!1);let f=null;function A(s){const{value:g}=n;if(g){const K=s.target.value;g.textContent=K,U()}e.ignoreComposition&&i.value?f=s:ee(s)}function Z(){i.value=!0}function se(){i.value=!1,e.ignoreComposition&&ee(f),f=null}function Re(s){var g;O.value=!0,(g=e.onPatternFocus)===null||g===void 0||g.call(e,s)}function Fe(s){var g;O.value=!1,(g=e.onPatternBlur)===null||g===void 0||g.call(e,s)}function pe(){var s,g;if(e.filterable)O.value=!1,(s=b.value)===null||s===void 0||s.blur(),(g=o.value)===null||g===void 0||g.blur();else if(e.multiple){const{value:K}=d;K==null||K.blur()}else{const{value:K}=c;K==null||K.blur()}}function me(){var s,g,K;e.filterable?(O.value=!1,(s=b.value)===null||s===void 0||s.focus()):e.multiple?(g=d.value)===null||g===void 0||g.focus():(K=c.value)===null||K===void 0||K.focus()}function de(){const{value:s}=o;s&&(q(),s.focus())}function te(){const{value:s}=o;s&&s.blur()}function we(s){const{value:g}=a;g&&g.setTextContent(`+${s}`)}function ce(){const{value:s}=R;return s}function Te(){return o.value}let ve=null;function ge(){ve!==null&&window.clearTimeout(ve)}function Oe(){e.disabled||e.active||(ge(),ve=window.setTimeout(()=>{y.value&&(S.value=!0)},100))}function ze(){ge()}function Me(s){s||(ge(),S.value=!1)}Se(y,s=>{s||(S.value=!1)}),ke(()=>{cn(()=>{const s=b.value;!s||(s.tabIndex=e.disabled||O.value?-1:0)})}),Tt(l,e.onResize);const{inlineThemeDisabled:ye}=e,xe=k(()=>{const{size:s}=e,{common:{cubicBezierEaseInOut:g},self:{borderRadius:K,color:Pe,placeholderColor:je,textColor:Ke,paddingSingle:Ue,paddingMultiple:qe,caretColor:Ie,colorDisabled:_e,textColorDisabled:Be,placeholderColorDisabled:Ge,colorActive:Ye,boxShadowFocus:$e,boxShadowActive:fe,boxShadowHover:t,border:u,borderFocus:x,borderHover:_,borderActive:z,arrowColor:P,arrowColorDisabled:M,loadingColor:X,colorActiveWarning:Ee,boxShadowFocusWarning:Xe,boxShadowActiveWarning:zt,boxShadowHoverWarning:Mt,borderWarning:kt,borderFocusWarning:Pt,borderHoverWarning:It,borderActiveWarning:_t,colorActiveError:Bt,boxShadowFocusError:$t,boxShadowActiveError:Et,boxShadowHoverError:At,borderError:Nt,borderFocusError:Lt,borderHoverError:Dt,borderActiveError:Vt,clearColor:Wt,clearColorHover:Ht,clearColorPressed:jt,clearSize:Kt,arrowSize:Ut,[ue("height",s)]:qt,[ue("fontSize",s)]:Gt}}=p.value;return{"--n-bezier":g,"--n-border":u,"--n-border-active":z,"--n-border-focus":x,"--n-border-hover":_,"--n-border-radius":K,"--n-box-shadow-active":fe,"--n-box-shadow-focus":$e,"--n-box-shadow-hover":t,"--n-caret-color":Ie,"--n-color":Pe,"--n-color-active":Ye,"--n-color-disabled":_e,"--n-font-size":Gt,"--n-height":qt,"--n-padding-single":Ue,"--n-padding-multiple":qe,"--n-placeholder-color":je,"--n-placeholder-color-disabled":Ge,"--n-text-color":Ke,"--n-text-color-disabled":Be,"--n-arrow-color":P,"--n-arrow-color-disabled":M,"--n-loading-color":X,"--n-color-active-warning":Ee,"--n-box-shadow-focus-warning":Xe,"--n-box-shadow-active-warning":zt,"--n-box-shadow-hover-warning":Mt,"--n-border-warning":kt,"--n-border-focus-warning":Pt,"--n-border-hover-warning":It,"--n-border-active-warning":_t,"--n-color-active-error":Bt,"--n-box-shadow-focus-error":$t,"--n-box-shadow-active-error":Et,"--n-box-shadow-hover-error":At,"--n-border-error":Nt,"--n-border-focus-error":Lt,"--n-border-hover-error":Dt,"--n-border-active-error":Vt,"--n-clear-size":Kt,"--n-clear-color":Wt,"--n-clear-color-hover":Ht,"--n-clear-color-pressed":jt,"--n-arrow-size":Ut}}),oe=ye?He("internal-selection",k(()=>e.size[0]),xe,e):void 0;return{mergedTheme:p,mergedClearable:F,patternInputFocused:O,filterablePlaceholder:L,label:C,selected:y,showTagsPanel:S,isComposing:i,counterRef:a,counterWrapperRef:R,patternInputMirrorRef:n,patternInputRef:o,selfRef:l,multipleElRef:d,singleElRef:c,patternInputWrapperRef:b,overflowRef:w,inputTagElRef:m,handleMouseDown:V,handleFocusin:h,handleClear:I,handleMouseEnter:W,handleMouseLeave:H,handleDeleteOption:E,handlePatternKeyDown:j,handlePatternInputInput:A,handlePatternInputBlur:Fe,handlePatternInputFocus:Re,handleMouseEnterCounter:Oe,handleMouseLeaveCounter:ze,handleFocusout:v,handleCompositionEnd:se,handleCompositionStart:Z,onPopoverUpdateShow:Me,focus:me,focusInput:de,blur:pe,blurInput:te,updateCounter:we,getCounter:ce,getTail:Te,renderLabel:e.renderLabel,cssVars:ye?void 0:xe,themeClass:oe==null?void 0:oe.themeClass,onRender:oe==null?void 0:oe.onRender}},render(){const{status:e,multiple:n,size:o,disabled:l,filterable:d,maxTagCount:c,bordered:b,clsPrefix:a,onRender:R,renderTag:w,renderLabel:m}=this;R==null||R();const S=c==="responsive",O=typeof c=="number",$=S||O,p=r(fn,null,{default:()=>r(On,{clsPrefix:a,loading:this.loading,showArrow:this.showArrow,showClear:this.mergedClearable&&this.selected,onClear:this.handleClear},{default:()=>{var L,C;return(C=(L=this.$slots).arrow)===null||C===void 0?void 0:C.call(L)}})});let F;if(n){const{labelField:L}=this,C=v=>r("div",{class:`${a}-base-selection-tag-wrapper`,key:v.value},w?w({option:v,handleClose:()=>this.handleDeleteOption(v)}):r(Qe,{size:o,closable:!v.disabled,disabled:l,onClose:()=>this.handleDeleteOption(v),internalCloseIsButtonTag:!1,internalCloseFocusable:!1},{default:()=>m?m(v,!0):Ce(v[L],v,!0)})),y=()=>(O?this.selectedOptions.slice(0,c):this.selectedOptions).map(C),U=d?r("div",{class:`${a}-base-selection-input-tag`,ref:"inputTagElRef",key:"__input-tag__"},r("input",Object.assign({},this.inputProps,{ref:"patternInputRef",tabindex:-1,disabled:l,value:this.pattern,autofocus:this.autofocus,class:`${a}-base-selection-input-tag__input`,onBlur:this.handlePatternInputBlur,onFocus:this.handlePatternInputFocus,onKeydown:this.handlePatternKeyDown,onInput:this.handlePatternInputInput,onCompositionstart:this.handleCompositionStart,onCompositionend:this.handleCompositionEnd})),r("span",{ref:"patternInputMirrorRef",class:`${a}-base-selection-input-tag__mirror`},this.pattern)):null,Y=S?()=>r("div",{class:`${a}-base-selection-tag-wrapper`,ref:"counterWrapperRef"},r(Qe,{size:o,ref:"counterRef",onMouseenter:this.handleMouseEnterCounter,onMouseleave:this.handleMouseLeaveCounter,disabled:l})):void 0;let q;if(O){const v=this.selectedOptions.length-c;v>0&&(q=r("div",{class:`${a}-base-selection-tag-wrapper`,key:"__counter__"},r(Qe,{size:o,ref:"counterRef",onMouseenter:this.handleMouseEnterCounter,disabled:l},{default:()=>`+${v}`})))}const D=S?d?r(gt,{ref:"overflowRef",updateCounter:this.updateCounter,getCounter:this.getCounter,getTail:this.getTail,style:{width:"100%",display:"flex",overflow:"hidden"}},{default:y,counter:Y,tail:()=>U}):r(gt,{ref:"overflowRef",updateCounter:this.updateCounter,getCounter:this.getCounter,style:{width:"100%",display:"flex",overflow:"hidden"}},{default:y,counter:Y}):O?y().concat(q):y(),G=$?()=>r("div",{class:`${a}-base-selection-popover`},S?y():this.selectedOptions.map(C)):void 0,Q=$?{show:this.showTagsPanel,trigger:"hover",overlap:!0,placement:"top",width:"trigger",onUpdateShow:this.onPopoverUpdateShow,theme:this.mergedTheme.peers.Popover,themeOverrides:this.mergedTheme.peerOverrides.Popover}:null,ee=(this.selected?!1:this.active?!this.pattern&&!this.isComposing:!0)?r("div",{class:`${a}-base-selection-placeholder ${a}-base-selection-overlay`},r("div",{class:`${a}-base-selection-placeholder__inner`},this.placeholder)):null,h=d?r("div",{ref:"patternInputWrapperRef",class:`${a}-base-selection-tags`},D,S?null:U,p):r("div",{ref:"multipleElRef",class:`${a}-base-selection-tags`,tabindex:l?void 0:0},D,p);F=r(vn,null,$?r(hn,Object.assign({},Q,{scrollable:!0,style:"max-height: calc(var(--v-target-height) * 6.6);"}),{trigger:()=>h,default:G}):h,ee)}else if(d){const L=this.pattern||this.isComposing,C=this.active?!L:!this.selected,y=this.active?!1:this.selected;F=r("div",{ref:"patternInputWrapperRef",class:`${a}-base-selection-label`},r("input",Object.assign({},this.inputProps,{ref:"patternInputRef",class:`${a}-base-selection-input`,value:this.active?this.pattern:"",placeholder:"",readonly:l,disabled:l,tabindex:-1,autofocus:this.autofocus,onFocus:this.handlePatternInputFocus,onBlur:this.handlePatternInputBlur,onInput:this.handlePatternInputInput,onCompositionstart:this.handleCompositionStart,onCompositionend:this.handleCompositionEnd})),y?r("div",{class:`${a}-base-selection-label__render-label ${a}-base-selection-overlay`,key:"input"},r("div",{class:`${a}-base-selection-overlay__wrapper`},w?w({option:this.selectedOption,handleClose:()=>{}}):m?m(this.selectedOption,!0):Ce(this.label,this.selectedOption,!0))):null,C?r("div",{class:`${a}-base-selection-placeholder ${a}-base-selection-overlay`,key:"placeholder"},r("div",{class:`${a}-base-selection-overlay__wrapper`},this.filterablePlaceholder)):null,p)}else F=r("div",{ref:"singleElRef",class:`${a}-base-selection-label`,tabindex:this.disabled?void 0:0},this.label!==void 0?r("div",{class:`${a}-base-selection-input`,title:zn(this.label),key:"input"},r("div",{class:`${a}-base-selection-input__content`},w?w({option:this.selectedOption,handleClose:()=>{}}):m?m(this.selectedOption,!0):Ce(this.label,this.selectedOption,!0))):r("div",{class:`${a}-base-selection-placeholder ${a}-base-selection-overlay`,key:"placeholder"},r("div",{class:`${a}-base-selection-placeholder__inner`},this.placeholder)),p);return r("div",{ref:"selfRef",class:[`${a}-base-selection`,this.themeClass,e&&`${a}-base-selection--${e}-status`,{[`${a}-base-selection--active`]:this.active,[`${a}-base-selection--selected`]:this.selected||this.active&&this.pattern,[`${a}-base-selection--disabled`]:this.disabled,[`${a}-base-selection--multiple`]:this.multiple,[`${a}-base-selection--focus`]:this.focused}],style:this.cssVars,onClick:this.onClick,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onKeydown:this.onKeydown,onFocusin:this.handleFocusin,onFocusout:this.handleFocusout,onMousedown:this.handleMouseDown},F,b?r("div",{class:`${a}-base-selection__border`}):null,b?r("div",{class:`${a}-base-selection__state-border`}):null)}});function We(e){return e.type==="group"}function Ot(e){return e.type==="ignored"}function tt(e,n){try{return!!(1+n.toString().toLowerCase().indexOf(e.trim().toLowerCase()))}catch{return!1}}function Kn(e,n){return{getIsGroup:We,getIgnored:Ot,getKey(l){return We(l)?l.name||l.key||"key-required":l[e]},getChildren(l){return l[n]}}}function Un(e,n,o,l){if(!n)return e;function d(c){if(!Array.isArray(c))return[];const b=[];for(const a of c)if(We(a)){const R=d(a[l]);R.length&&b.push(Object.assign({},a,{[l]:R}))}else{if(Ot(a))continue;n(o,a)&&b.push(a)}return b}return d(e)}function qn(e,n,o){const l=new Map;return e.forEach(d=>{We(d)?d[o].forEach(c=>{l.set(c[n],c)}):l.set(d[n],d)}),l}var Gn=le([B("select",`
|
|
z-index: auto;
|
|
outline: none;
|
|
width: 100%;
|
|
position: relative;
|
|
`),B("select-menu",`
|
|
margin: 4px 0;
|
|
box-shadow: var(--n-menu-box-shadow);
|
|
`,[Rt({originalTransition:"background-color .3s var(--n-bezier), box-shadow .3s var(--n-bezier)"})])]);const Yn=Object.assign(Object.assign({},he.props),{to:it.propTo,bordered:{type:Boolean,default:void 0},clearable:Boolean,clearFilterAfterSelect:{type:Boolean,default:!0},options:{type:Array,default:()=>[]},defaultValue:{type:[String,Number,Array],default:null},value:[String,Number,Array],placeholder:String,menuProps:Object,multiple:Boolean,size:String,filterable:Boolean,disabled:{type:Boolean,default:void 0},remote:Boolean,loading:Boolean,filter:Function,placement:{type:String,default:"bottom-start"},widthMode:{type:String,default:"trigger"},tag:Boolean,onCreate:Function,fallbackOption:{type:[Function,Boolean],default:void 0},show:{type:Boolean,default:void 0},showArrow:{type:Boolean,default:!0},maxTagCount:[Number,String],consistentMenuWidth:{type:Boolean,default:!0},virtualScroll:{type:Boolean,default:!0},labelField:{type:String,default:"label"},valueField:{type:String,default:"value"},childrenField:{type:String,default:"children"},renderLabel:Function,renderOption:Function,renderTag:Function,"onUpdate:value":[Function,Array],inputProps:Object,nodeProps:Function,ignoreComposition:{type:Boolean,default:!0},showOnFocus:Boolean,onUpdateValue:[Function,Array],onBlur:[Function,Array],onClear:[Function,Array],onFocus:[Function,Array],onScroll:[Function,Array],onSearch:[Function,Array],onUpdateShow:[Function,Array],"onUpdate:show":[Function,Array],displayDirective:{type:String,default:"show"},resetMenuOnOptionsChange:{type:Boolean,default:!0},status:String,showCheckmark:{type:Boolean,default:!0},onChange:[Function,Array],items:Array});var Qn=re({name:"Select",props:Yn,setup(e){const{mergedClsPrefixRef:n,mergedBorderedRef:o,namespaceRef:l,inlineThemeDisabled:d}=xt(e),c=he("Select","-select",Gn,gn,e,n),b=T(e.defaultValue),a=J(e,"value"),R=ct(a,b),w=T(!1),m=T(""),S=k(()=>{const{valueField:t,childrenField:u}=e,x=Kn(t,u);return bn(v.value,x)}),O=k(()=>qn(ee.value,e.valueField,e.childrenField)),$=T(!1),p=ct(J(e,"show"),$),F=T(null),L=T(null),C=T(null),{localeRef:y}=Ft("Select"),U=k(()=>{var t;return(t=e.placeholder)!==null&&t!==void 0?t:y.value.placeholder}),Y=pn(e,["items","options"]),q=[],D=T([]),G=T([]),Q=T(new Map),ie=k(()=>{const{fallbackOption:t}=e;if(t===void 0){const{labelField:u,valueField:x}=e;return _=>({[u]:String(_),[x]:_})}return t===!1?!1:u=>Object.assign(t(u),{value:u})}),ee=k(()=>G.value.concat(D.value).concat(Y.value)),h=k(()=>{const{filter:t}=e;if(t)return t;const{labelField:u,valueField:x}=e;return(_,z)=>{if(!z)return!1;const P=z[u];if(typeof P=="string")return tt(_,P);const M=z[x];return typeof M=="string"?tt(_,M):typeof M=="number"?tt(_,String(M)):!1}}),v=k(()=>{if(e.remote)return Y.value;{const{value:t}=ee,{value:u}=m;return!u.length||!e.filterable?t:Un(t,h.value,u,e.childrenField)}});function I(t){const u=e.remote,{value:x}=Q,{value:_}=O,{value:z}=ie,P=[];return t.forEach(M=>{if(_.has(M))P.push(_.get(M));else if(u&&x.has(M))P.push(x.get(M));else if(z){const X=z(M);X&&P.push(X)}}),P}const W=k(()=>{if(e.multiple){const{value:t}=R;return Array.isArray(t)?I(t):[]}return null}),H=k(()=>{const{value:t}=R;return!e.multiple&&!Array.isArray(t)?t===null?null:I([t])[0]||null:null}),V=mn(e),{mergedSizeRef:E,mergedDisabledRef:j,mergedStatusRef:i}=V;function f(t,u){const{onChange:x,"onUpdate:value":_,onUpdateValue:z}=e,{nTriggerFormChange:P,nTriggerFormInput:M}=V;x&&ae(x,t,u),z&&ae(z,t,u),_&&ae(_,t,u),b.value=t,P(),M()}function A(t){const{onBlur:u}=e,{nTriggerFormBlur:x}=V;u&&ae(u,t),x()}function Z(){const{onClear:t}=e;t&&ae(t)}function se(t){const{onFocus:u,showOnFocus:x}=e,{nTriggerFormFocus:_}=V;u&&ae(u,t),_(),x&&de()}function Re(t){const{onSearch:u}=e;u&&ae(u,t)}function Fe(t){const{onScroll:u}=e;u&&ae(u,t)}function pe(){var t;const{remote:u,multiple:x}=e;if(u){const{value:_}=Q;if(x){const{valueField:z}=e;(t=W.value)===null||t===void 0||t.forEach(P=>{_.set(P[z],P)})}else{const z=H.value;z&&_.set(z[e.valueField],z)}}}function me(t){const{onUpdateShow:u,"onUpdate:show":x}=e;u&&ae(u,t),x&&ae(x,t),$.value=t}function de(){j.value||(me(!0),$.value=!0,e.filterable&&Be())}function te(){me(!1)}function we(){m.value="",G.value=q}const ce=T(!1);function Te(){e.filterable&&(ce.value=!0)}function ve(){e.filterable&&(ce.value=!1,p.value||we())}function ge(){j.value||(p.value?e.filterable?Be():te():de())}function Oe(t){var u,x;!((x=(u=C.value)===null||u===void 0?void 0:u.selfRef)===null||x===void 0)&&x.contains(t.relatedTarget)||(w.value=!1,A(t),te())}function ze(t){se(t),w.value=!0}function Me(t){w.value=!0}function ye(t){var u;!((u=F.value)===null||u===void 0)&&u.$el.contains(t.relatedTarget)||(w.value=!1,A(t),te())}function xe(){var t;(t=F.value)===null||t===void 0||t.focus(),te()}function oe(t){var u;p.value&&(!((u=F.value)===null||u===void 0)&&u.$el.contains(Fn(t))||te())}function s(t){if(!Array.isArray(t))return[];if(ie.value)return Array.from(t);{const{remote:u}=e,{value:x}=O;if(u){const{value:_}=Q;return t.filter(z=>x.has(z)||_.has(z))}else return t.filter(_=>x.has(_))}}function g(t){K(t.rawNode)}function K(t){if(j.value)return;const{tag:u,remote:x,clearFilterAfterSelect:_,valueField:z}=e;if(u&&!x){const{value:P}=G,M=P[0]||null;if(M){const X=D.value;X.length?X.push(M):D.value=[M],G.value=q}}if(x&&Q.value.set(t[z],t),e.multiple){const P=s(R.value),M=P.findIndex(X=>X===t[z]);if(~M){if(P.splice(M,1),u&&!x){const X=Pe(t[z]);~X&&(D.value.splice(X,1),_&&(m.value=""))}}else P.push(t[z]),_&&(m.value="");f(P,I(P))}else{if(u&&!x){const P=Pe(t[z]);~P?D.value=[D.value[P]]:D.value=q}_e(),te(),f(t[z],t)}}function Pe(t){return D.value.findIndex(x=>x[e.valueField]===t)}function je(t){p.value||de();const{value:u}=t.target;m.value=u;const{tag:x,remote:_}=e;if(Re(u),x&&!_){if(!u){G.value=q;return}const{onCreate:z}=e,P=z?z(u):{[e.labelField]:u,[e.valueField]:u},{valueField:M}=e;Y.value.some(X=>X[M]===P[M])||D.value.some(X=>X[M]===P[M])?G.value=q:G.value=[P]}}function Ke(t){t.stopPropagation();const{multiple:u}=e;!u&&e.filterable&&te(),Z(),u?f([],[]):f(null,null)}function Ue(t){!Ve(t,"action")&&!Ve(t,"empty")&&t.preventDefault()}function qe(t){Fe(t)}function Ie(t){var u,x,_,z,P;switch(t.key){case" ":if(e.filterable)break;t.preventDefault();case"Enter":if(!(!((u=F.value)===null||u===void 0)&&u.isComposing)){if(p.value){const M=(x=C.value)===null||x===void 0?void 0:x.getPendingTmNode();M?g(M):e.filterable||(te(),_e())}else if(de(),e.tag&&ce.value){const M=G.value[0];if(M){const X=M[e.valueField],{value:Ee}=R;e.multiple&&Array.isArray(Ee)&&Ee.some(Xe=>Xe===X)||K(M)}}}t.preventDefault();break;case"ArrowUp":if(t.preventDefault(),e.loading)return;p.value&&((_=C.value)===null||_===void 0||_.prev());break;case"ArrowDown":if(t.preventDefault(),e.loading)return;p.value?(z=C.value)===null||z===void 0||z.next():de();break;case"Escape":p.value&&(Tn(t),te()),(P=F.value)===null||P===void 0||P.focus();break}}function _e(){var t;(t=F.value)===null||t===void 0||t.focus()}function Be(){var t;(t=F.value)===null||t===void 0||t.focusInput()}function Ge(){var t;!p.value||(t=L.value)===null||t===void 0||t.syncPosition()}pe(),Se(J(e,"options"),pe);const Ye={focus:()=>{var t;(t=F.value)===null||t===void 0||t.focus()},blur:()=>{var t;(t=F.value)===null||t===void 0||t.blur()}},$e=k(()=>{const{self:{menuBoxShadow:t}}=c.value;return{"--n-menu-box-shadow":t}}),fe=d?He("select",void 0,$e,e):void 0;return Object.assign(Object.assign({},Ye),{mergedStatus:i,mergedClsPrefix:n,mergedBordered:o,namespace:l,treeMate:S,isMounted:wn(),triggerRef:F,menuRef:C,pattern:m,uncontrolledShow:$,mergedShow:p,adjustedTo:it(e),uncontrolledValue:b,mergedValue:R,followerRef:L,localizedPlaceholder:U,selectedOption:H,selectedOptions:W,mergedSize:E,mergedDisabled:j,focused:w,activeWithoutMenuOpen:ce,inlineThemeDisabled:d,onTriggerInputFocus:Te,onTriggerInputBlur:ve,handleTriggerOrMenuResize:Ge,handleMenuFocus:Me,handleMenuBlur:ye,handleMenuTabOut:xe,handleTriggerClick:ge,handleToggle:g,handleDeleteOption:K,handlePatternInput:je,handleClear:Ke,handleTriggerBlur:Oe,handleTriggerFocus:ze,handleKeydown:Ie,handleMenuAfterLeave:we,handleMenuClickOutside:oe,handleMenuScroll:qe,handleMenuKeydown:Ie,handleMenuMousedown:Ue,mergedTheme:c,cssVars:d?void 0:$e,themeClass:fe==null?void 0:fe.themeClass,onRender:fe==null?void 0:fe.onRender})},render(){return r("div",{class:`${this.mergedClsPrefix}-select`},r(yn,null,{default:()=>[r(xn,null,{default:()=>r(jn,{ref:"triggerRef",inlineThemeDisabled:this.inlineThemeDisabled,status:this.mergedStatus,inputProps:this.inputProps,clsPrefix:this.mergedClsPrefix,showArrow:this.showArrow,maxTagCount:this.maxTagCount,bordered:this.mergedBordered,active:this.activeWithoutMenuOpen||this.mergedShow,pattern:this.pattern,placeholder:this.localizedPlaceholder,selectedOption:this.selectedOption,selectedOptions:this.selectedOptions,multiple:this.multiple,renderTag:this.renderTag,renderLabel:this.renderLabel,filterable:this.filterable,clearable:this.clearable,disabled:this.mergedDisabled,size:this.mergedSize,theme:this.mergedTheme.peers.InternalSelection,labelField:this.labelField,valueField:this.valueField,themeOverrides:this.mergedTheme.peerOverrides.InternalSelection,loading:this.loading,focused:this.focused,onClick:this.handleTriggerClick,onDeleteOption:this.handleDeleteOption,onPatternInput:this.handlePatternInput,onClear:this.handleClear,onBlur:this.handleTriggerBlur,onFocus:this.handleTriggerFocus,onKeydown:this.handleKeydown,onPatternBlur:this.onTriggerInputBlur,onPatternFocus:this.onTriggerInputFocus,onResize:this.handleTriggerOrMenuResize,ignoreComposition:this.ignoreComposition},{arrow:()=>{var e,n;return[(n=(e=this.$slots).arrow)===null||n===void 0?void 0:n.call(e)]}})}),r(Cn,{ref:"followerRef",show:this.mergedShow,to:this.adjustedTo,teleportDisabled:this.adjustedTo===it.tdkey,containerClass:this.namespace,width:this.consistentMenuWidth?"target":void 0,minWidth:"target",placement:this.placement},{default:()=>r(St,{name:"fade-in-scale-up-transition",appear:this.isMounted,onAfterLeave:this.handleMenuAfterLeave},{default:()=>{var e,n,o;return this.mergedShow||this.displayDirective==="show"?((e=this.onRender)===null||e===void 0||e.call(this),Sn(r(Wn,Object.assign({},this.menuProps,{ref:"menuRef",onResize:this.handleTriggerOrMenuResize,inlineThemeDisabled:this.inlineThemeDisabled,virtualScroll:this.consistentMenuWidth&&this.virtualScroll,class:[`${this.mergedClsPrefix}-select-menu`,this.themeClass,(n=this.menuProps)===null||n===void 0?void 0:n.class],clsPrefix:this.mergedClsPrefix,focusable:!0,labelField:this.labelField,valueField:this.valueField,autoPending:!0,nodeProps:this.nodeProps,theme:this.mergedTheme.peers.InternalSelectMenu,themeOverrides:this.mergedTheme.peerOverrides.InternalSelectMenu,treeMate:this.treeMate,multiple:this.multiple,size:"medium",renderOption:this.renderOption,renderLabel:this.renderLabel,value:this.mergedValue,style:[(o=this.menuProps)===null||o===void 0?void 0:o.style,this.cssVars],onToggle:this.handleToggle,onScroll:this.handleMenuScroll,onFocus:this.handleMenuFocus,onBlur:this.handleMenuBlur,onKeydown:this.handleMenuKeydown,onTabOut:this.handleMenuTabOut,onMousedown:this.handleMenuMousedown,show:this.mergedShow,showCheckmark:this.showCheckmark,resetMenuOnOptionsChange:this.resetMenuOnOptionsChange}),{empty:()=>{var l,d;return[(d=(l=this.$slots).empty)===null||d===void 0?void 0:d.call(l)]},action:()=>{var l,d;return[(d=(l=this.$slots).action)===null||d===void 0?void 0:d.call(l)]}}),this.displayDirective==="show"?[[Rn,this.mergedShow],[ft,this.handleMenuClickOutside,void 0,{capture:!0}]]:[[ft,this.handleMenuClickOutside,void 0,{capture:!0}]])):null}})})]}))}});export{Wn as N,In as V,Qn as _,Ln as a,Kn as c,Je as m};
|