Dropdown-CCyygHGl.js 132 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650
  1. import{$ as e,$t as t,An as n,At as r,B as i,Bn as a,Bt as o,Ct as s,D as c,Dn as l,En as u,Et as d,F as f,Fn as p,G as m,Gn as h,Gt as g,H as _,Hn as v,I as y,In as b,J as x,Jt as S,K as C,Kt as w,L as T,Lt as E,M as D,Mn as O,Mt as k,Nn as A,Nt as ee,O as j,On as M,Ot as N,Pn as P,Pt as te,Q as F,Qt as I,Rt as ne,U as re,Un as ie,V as ae,Vt as L,W as oe,Wt as R,X as se,Xn as ce,Y as z,Yn as le,Yt as ue,Z as de,Zn as B,Zt as V,_ as fe,_n as pe,_t as me,at as he,en as H,er as U,et as ge,fn as _e,g as ve,gt as ye,hn as be,it as xe,jn as Se,jt as Ce,k as W,kn as G,nn as K,nt as we,on as Te,ot as Ee,q as De,qt as Oe,rn as q,st as ke,tn as J,tt as Ae,un as je,v as Me,vn as Ne,vt as Pe,wt as Fe,x as Ie,xt as Le,y as Re,yn as Y,z as ze,zn as X,zt as Z}from"./vault-CdmsmWuM.js";import{C as Be,S as Ve,_ as He,a as Ue,d as We,f as Ge,g as Ke,h as qe,i as Je,m as Ye,o as Xe,p as Ze,r as Qe,s as $e,v as et,w as tt,y as nt}from"./vue-i18n-Gwuy_nD9.js";import{c as rt,d as it,f as at,l as ot,m as st,o as ct,p as lt,r as ut,s as dt,u as ft}from"./_plugin-vue_export-helper-Igk7P-hr.js";var pt=[],mt=new WeakMap;function ht(){pt.forEach(e=>e(...mt.get(e))),pt=[]}function gt(e,...t){mt.set(e,t),!pt.includes(e)&&pt.push(e)===1&&requestAnimationFrame(ht)}function _t(e,t){let{target:n}=e;for(;n;){if(n.dataset&&n.dataset[t]!==void 0)return!0;n=n.parentElement}return!1}var vt=tt?document?.fonts?.ready:void 0,yt=!1;vt===void 0?yt=!0:vt.then(()=>{yt=!0});function bt(e){if(yt)return;let t=!1;b(()=>{yt||vt?.then(()=>{t||e()})}),P(()=>{t=!0})}function xt(e={},t){let n=le({ctrl:!1,command:!1,win:!1,shift:!1,tab:!1}),{keydown:r,keyup:i}=e,a=e=>{switch(e.key){case`Control`:n.ctrl=!0;break;case`Meta`:n.command=!0,n.win=!0;break;case`Shift`:n.shift=!0;break;case`Tab`:n.tab=!0;break}r!==void 0&&Object.keys(r).forEach(t=>{if(t!==e.key)return;let n=r[t];if(typeof n==`function`)n(e);else{let{stop:t=!1,prevent:r=!1}=n;t&&e.stopPropagation(),r&&e.preventDefault(),n.handler(e)}})},s=e=>{switch(e.key){case`Control`:n.ctrl=!1;break;case`Meta`:n.command=!1,n.win=!1;break;case`Shift`:n.shift=!1;break;case`Tab`:n.tab=!1;break}i!==void 0&&Object.keys(i).forEach(t=>{if(t!==e.key)return;let n=i[t];if(typeof n==`function`)n(e);else{let{stop:t=!1,prevent:r=!1}=n;t&&e.stopPropagation(),r&&e.preventDefault(),n.handler(e)}})},c=()=>{(t===void 0||t.value)&&(L(`keydown`,document,a),L(`keyup`,document,s)),t!==void 0&&v(t,e=>{e?(L(`keydown`,document,a),L(`keyup`,document,s)):(o(`keydown`,document,a),o(`keyup`,document,s))})};return Be()?(A(c),P(()=>{(t===void 0||t.value)&&(o(`keydown`,document,a),o(`keyup`,document,s))})):c(),ce(n)}var St=E(`n-internal-select-menu`),Ct=E(`n-internal-select-menu-body`),wt=`__disabled__`;function Tt(e){let t=G(nt,null),n=G(Ve,null),r=G(et,null),i=G(Ct,null),a=B();if(typeof document<`u`){a.value=document.fullscreenElement;let e=()=>{a.value=document.fullscreenElement};b(()=>{L(`fullscreenchange`,document,e)}),P(()=>{o(`fullscreenchange`,document,e)})}return Z(()=>{let{to:o}=e;return o===void 0?t?.value?t.value.$el??t.value:n?.value?n.value:r?.value?r.value:i?.value?i.value:o??(a.value||`body`):o===!1?wt:o===!0?a.value||`body`:o})}Tt.tdkey=wt,Tt.propTo={type:[String,Object,Boolean],default:void 0};function Et(e,t,n){if(!t)return e;let r=B(e.value),i=null;return v(e,e=>{i!==null&&window.clearTimeout(i),e===!0?n&&!n.value?r.value=!0:i=window.setTimeout(()=>{r.value=!0},t):r.value=!1}),r}var Dt=null;function Ot(){if(Dt===null&&(Dt=document.getElementById(`v-binder-view-measurer`),Dt===null)){Dt=document.createElement(`div`),Dt.id=`v-binder-view-measurer`;let{style:e}=Dt;e.position=`fixed`,e.left=`0`,e.right=`0`,e.top=`0`,e.bottom=`0`,e.pointerEvents=`none`,e.visibility=`hidden`,document.body.appendChild(Dt)}return Dt.getBoundingClientRect()}function kt(e,t){let n=Ot();return{top:t,left:e,height:0,width:0,right:n.width-e,bottom:n.height-t}}function At(e){let t=e.getBoundingClientRect(),n=Ot();return{left:t.left-n.left,top:t.top-n.top,bottom:n.height+n.top-t.bottom,right:n.width+n.left-t.right,width:t.width,height:t.height}}function jt(e){return e.nodeType===9?null:e.parentNode}function Mt(e){if(e===null)return null;let t=jt(e);if(t===null)return null;if(t.nodeType===9)return document;if(t.nodeType===1){let{overflow:e,overflowX:n,overflowY:r}=getComputedStyle(t);if(/(auto|scroll|overlay)/.test(e+r+n))return t}return Mt(t)}var Nt=u({name:`Binder`,props:{syncTargetWithParent:Boolean,syncTarget:{type:Boolean,default:!0}},setup(e){X(`VBinder`,l()?.proxy);let t=G(`VBinder`,null),n=B(null),r=r=>{n.value=r,t&&e.syncTargetWithParent&&t.setTargetRef(r)},i=[],a=()=>{let e=n.value;for(;e=Mt(e),e!==null;)i.push(e);for(let e of i)L(`scroll`,e,f,!0)},s=()=>{for(let e of i)o(`scroll`,e,f,!0);i=[]},c=new Set,u=e=>{c.size===0&&a(),c.has(e)||c.add(e)},d=e=>{c.has(e)&&c.delete(e),c.size===0&&s()},f=()=>{gt(p)},p=()=>{c.forEach(e=>e())},m=new Set,h=e=>{m.size===0&&L(`resize`,window,_),m.has(e)||m.add(e)},g=e=>{m.has(e)&&m.delete(e),m.size===0&&o(`resize`,window,_)},_=()=>{m.forEach(e=>e())};return P(()=>{o(`resize`,window,_),s()}),{targetRef:n,setTargetRef:r,addScrollListener:u,removeScrollListener:d,addResizeListener:h,removeResizeListener:g}},render(){return He(`binder`,this.$slots)}}),Pt=u({name:`Target`,setup(){let{setTargetRef:e,syncTarget:t}=G(`VBinder`);return{syncTarget:t,setTargetDirective:{mounted:e,updated:e}}},render(){let{syncTarget:e,setTargetDirective:t}=this;return e?h(Ke(`follower`,this.$slots),[[t]]):Ke(`follower`,this.$slots)}}),Ft=`@@mmoContext`,It={mounted(e,{value:t}){e[Ft]={handler:void 0},typeof t==`function`&&(e[Ft].handler=t,L(`mousemoveoutside`,e,t))},updated(e,{value:t}){let n=e[Ft];typeof t==`function`?n.handler?n.handler!==t&&(o(`mousemoveoutside`,e,n.handler),n.handler=t,L(`mousemoveoutside`,e,t)):(e[Ft].handler=t,L(`mousemoveoutside`,e,t)):n.handler&&=(o(`mousemoveoutside`,e,n.handler),void 0)},unmounted(e){let{handler:t}=e[Ft];t&&o(`mousemoveoutside`,e,t),e[Ft].handler=void 0}},{c:Lt}=Te(),Rt=`vueuc-style`;function zt(e){return e&-e}var Bt=class{constructor(e,t){this.l=e,this.min=t;let n=Array(e+1);for(let t=0;t<e+1;++t)n[t]=0;this.ft=n}add(e,t){if(t===0)return;let{l:n,ft:r}=this;for(e+=1;e<=n;)r[e]+=t,e+=zt(e)}get(e){return this.sum(e+1)-this.sum(e)}sum(e){if(e===void 0&&(e=this.l),e<=0)return 0;let{ft:t,min:n,l:r}=this;if(e>r)throw Error("[FinweckTree.sum]: `i` is larger than length.");let i=e*n;for(;e>0;)i+=t[e],e-=zt(e);return i}getBound(e){let t=0,n=this.l;for(;n>t;){let r=Math.floor((t+n)/2),i=this.sum(r);if(i>e){n=r;continue}else if(i<e){if(t===r)return this.sum(t+1)<=e?t+1:r;t=r}else return r}return t}},Vt={top:`bottom`,bottom:`top`,left:`right`,right:`left`},Ht={start:`end`,center:`center`,end:`start`},Ut={top:`height`,bottom:`height`,left:`width`,right:`width`},Wt={"bottom-start":`top left`,bottom:`top center`,"bottom-end":`top right`,"top-start":`bottom left`,top:`bottom center`,"top-end":`bottom right`,"right-start":`top left`,right:`center left`,"right-end":`bottom left`,"left-start":`top right`,left:`center right`,"left-end":`bottom right`},Gt={"bottom-start":`bottom left`,bottom:`bottom center`,"bottom-end":`bottom right`,"top-start":`top left`,top:`top center`,"top-end":`top right`,"right-start":`top right`,right:`center right`,"right-end":`bottom right`,"left-start":`top left`,left:`center left`,"left-end":`bottom left`},Kt={"bottom-start":`right`,"bottom-end":`left`,"top-start":`right`,"top-end":`left`,"right-start":`bottom`,"right-end":`top`,"left-start":`bottom`,"left-end":`top`},qt={top:!0,bottom:!1,left:!0,right:!1},Jt={top:`end`,bottom:`start`,left:`end`,right:`start`};function Yt(e,t,n,r,i,a){if(!i||a)return{placement:e,top:0,left:0};let[o,s]=e.split(`-`),c=s??`center`,l={top:0,left:0},u=(e,i,a)=>{let o=0,s=0,c=n[e]-t[i]-t[e];return c>0&&r&&(a?s=qt[i]?c:-c:o=qt[i]?c:-c),{left:o,top:s}},d=o===`left`||o===`right`;if(c!==`center`){let r=Kt[e],i=Vt[r],a=Ut[r];if(n[a]>t[a]){if(t[r]+t[a]<n[a]){let e=(n[a]-t[a])/2;t[r]<e||t[i]<e?t[r]<t[i]?(c=Ht[s],l=u(a,i,d)):l=u(a,r,d):c=`center`}}else n[a]<t[a]&&t[i]<0&&t[r]>t[i]&&(c=Ht[s])}else{let e=o===`bottom`||o===`top`?`left`:`top`,r=Vt[e],i=Ut[e],a=(n[i]-t[i])/2;(t[e]<a||t[r]<a)&&(t[e]>t[r]?(c=Jt[e],l=u(i,e,d)):(c=Jt[r],l=u(i,r,d)))}let f=o;return t[o]<n[Ut[o]]&&t[o]<t[Vt[o]]&&(f=Vt[o]),{placement:c===`center`?f:`${f}-${c}`,left:l.left,top:l.top}}function Xt(e,t){return t?Gt[e]:Wt[e]}function Zt(e,t,n,r,i,a){if(a)switch(e){case`bottom-start`:return{top:`${Math.round(n.top-t.top+n.height)}px`,left:`${Math.round(n.left-t.left)}px`,transform:`translateY(-100%)`};case`bottom-end`:return{top:`${Math.round(n.top-t.top+n.height)}px`,left:`${Math.round(n.left-t.left+n.width)}px`,transform:`translateX(-100%) translateY(-100%)`};case`top-start`:return{top:`${Math.round(n.top-t.top)}px`,left:`${Math.round(n.left-t.left)}px`,transform:``};case`top-end`:return{top:`${Math.round(n.top-t.top)}px`,left:`${Math.round(n.left-t.left+n.width)}px`,transform:`translateX(-100%)`};case`right-start`:return{top:`${Math.round(n.top-t.top)}px`,left:`${Math.round(n.left-t.left+n.width)}px`,transform:`translateX(-100%)`};case`right-end`:return{top:`${Math.round(n.top-t.top+n.height)}px`,left:`${Math.round(n.left-t.left+n.width)}px`,transform:`translateX(-100%) translateY(-100%)`};case`left-start`:return{top:`${Math.round(n.top-t.top)}px`,left:`${Math.round(n.left-t.left)}px`,transform:``};case`left-end`:return{top:`${Math.round(n.top-t.top+n.height)}px`,left:`${Math.round(n.left-t.left)}px`,transform:`translateY(-100%)`};case`top`:return{top:`${Math.round(n.top-t.top)}px`,left:`${Math.round(n.left-t.left+n.width/2)}px`,transform:`translateX(-50%)`};case`right`:return{top:`${Math.round(n.top-t.top+n.height/2)}px`,left:`${Math.round(n.left-t.left+n.width)}px`,transform:`translateX(-100%) translateY(-50%)`};case`left`:return{top:`${Math.round(n.top-t.top+n.height/2)}px`,left:`${Math.round(n.left-t.left)}px`,transform:`translateY(-50%)`};default:return{top:`${Math.round(n.top-t.top+n.height)}px`,left:`${Math.round(n.left-t.left+n.width/2)}px`,transform:`translateX(-50%) translateY(-100%)`}}switch(e){case`bottom-start`:return{top:`${Math.round(n.top-t.top+n.height+r)}px`,left:`${Math.round(n.left-t.left+i)}px`,transform:``};case`bottom-end`:return{top:`${Math.round(n.top-t.top+n.height+r)}px`,left:`${Math.round(n.left-t.left+n.width+i)}px`,transform:`translateX(-100%)`};case`top-start`:return{top:`${Math.round(n.top-t.top+r)}px`,left:`${Math.round(n.left-t.left+i)}px`,transform:`translateY(-100%)`};case`top-end`:return{top:`${Math.round(n.top-t.top+r)}px`,left:`${Math.round(n.left-t.left+n.width+i)}px`,transform:`translateX(-100%) translateY(-100%)`};case`right-start`:return{top:`${Math.round(n.top-t.top+r)}px`,left:`${Math.round(n.left-t.left+n.width+i)}px`,transform:``};case`right-end`:return{top:`${Math.round(n.top-t.top+n.height+r)}px`,left:`${Math.round(n.left-t.left+n.width+i)}px`,transform:`translateY(-100%)`};case`left-start`:return{top:`${Math.round(n.top-t.top+r)}px`,left:`${Math.round(n.left-t.left+i)}px`,transform:`translateX(-100%)`};case`left-end`:return{top:`${Math.round(n.top-t.top+n.height+r)}px`,left:`${Math.round(n.left-t.left+i)}px`,transform:`translateX(-100%) translateY(-100%)`};case`top`:return{top:`${Math.round(n.top-t.top+r)}px`,left:`${Math.round(n.left-t.left+n.width/2+i)}px`,transform:`translateY(-100%) translateX(-50%)`};case`right`:return{top:`${Math.round(n.top-t.top+n.height/2+r)}px`,left:`${Math.round(n.left-t.left+n.width+i)}px`,transform:`translateY(-50%)`};case`left`:return{top:`${Math.round(n.top-t.top+n.height/2+r)}px`,left:`${Math.round(n.left-t.left+i)}px`,transform:`translateY(-50%) translateX(-100%)`};default:return{top:`${Math.round(n.top-t.top+n.height+r)}px`,left:`${Math.round(n.left-t.left+n.width/2+i)}px`,transform:`translateX(-50%)`}}}var Qt=Lt([Lt(`.v-binder-follower-container`,{position:`absolute`,left:`0`,right:`0`,top:`0`,height:`0`,pointerEvents:`none`,zIndex:`auto`}),Lt(`.v-binder-follower-content`,{position:`absolute`,zIndex:`auto`},[Lt(`> *`,{pointerEvents:`all`})])]),$t=u({name:`Follower`,inheritAttrs:!1,props:{show:Boolean,enabled:{type:Boolean,default:void 0},placement:{type:String,default:`bottom`},syncTrigger:{type:Array,default:[`resize`,`scroll`]},to:[String,Object],flip:{type:Boolean,default:!0},internalShift:Boolean,x:Number,y:Number,width:String,minWidth:String,containerClass:String,teleportDisabled:Boolean,zindexable:{type:Boolean,default:!0},zIndex:Number,overlap:Boolean},setup(e){let t=G(`VBinder`),n=Z(()=>e.enabled===void 0?e.show:e.enabled),r=B(null),i=B(null),a=()=>{let{syncTrigger:n}=e;n.includes(`scroll`)&&t.addScrollListener(c),n.includes(`resize`)&&t.addResizeListener(c)},o=()=>{t.removeScrollListener(c),t.removeResizeListener(c)};b(()=>{n.value&&(c(),a())});let s=te();Qt.mount({id:`vueuc/binder`,head:!0,anchorMetaName:Rt,ssr:s}),P(()=>{o()}),bt(()=>{n.value&&c()});let c=()=>{if(!n.value)return;let a=r.value;if(a===null)return;let o=t.targetRef,{x:s,y:c,overlap:l}=e,u=s!==void 0&&c!==void 0?kt(s,c):At(o);a.style.setProperty(`--v-target-width`,`${Math.round(u.width)}px`),a.style.setProperty(`--v-target-height`,`${Math.round(u.height)}px`);let{width:d,minWidth:f,placement:p,internalShift:m,flip:h}=e;a.setAttribute(`v-placement`,p),l?a.setAttribute(`v-overlap`,``):a.removeAttribute(`v-overlap`);let{style:g}=a;d===`target`?g.width=`${u.width}px`:d===void 0?g.width=``:g.width=d,f===`target`?g.minWidth=`${u.width}px`:f===void 0?g.minWidth=``:g.minWidth=f;let _=At(a),v=At(i.value),{left:y,top:b,placement:x}=Yt(p,u,_,m,h,l),S=Xt(x,l),{left:C,top:w,transform:T}=Zt(x,v,u,b,y,l);a.setAttribute(`v-placement`,x),a.style.setProperty(`--v-offset-left`,`${Math.round(y)}px`),a.style.setProperty(`--v-offset-top`,`${Math.round(b)}px`),a.style.transform=`translateX(${C}) translateY(${w}) ${T}`,a.style.setProperty(`--v-transform-origin`,S),a.style.transformOrigin=S};v(n,e=>{e?(a(),l()):o()});let l=()=>{Se().then(c).catch(e=>console.error(e))};[`placement`,`x`,`y`,`internalShift`,`flip`,`width`,`overlap`,`minWidth`].forEach(t=>{v(U(e,t),c)}),[`teleportDisabled`].forEach(t=>{v(U(e,t),l)}),v(U(e,`syncTrigger`),e=>{e.includes(`resize`)?t.addResizeListener(c):t.removeResizeListener(c),e.includes(`scroll`)?t.addScrollListener(c):t.removeScrollListener(c)});let u=ne();return{VBinder:t,mergedEnabled:n,offsetContainerRef:i,followerRef:r,mergedTo:Z(()=>{let{to:t}=e;if(t!==void 0)return t;u.value}),syncPosition:c}},render(){return M(Ze,{show:this.show,to:this.mergedTo,disabled:this.teleportDisabled},{default:()=>{var e;let t=M(`div`,{class:[`v-binder-follower-container`,this.containerClass],ref:`offsetContainerRef`},[M(`div`,{class:`v-binder-follower-content`,ref:`followerRef`},(e=this.$slots).default?.call(e))]);return this.zindexable?h(t,[[Ye,{enabled:this.mergedEnabled,zIndex:this.zIndex}]]):t}})}}),en;function tn(){return typeof document>`u`?!1:(en===void 0&&(en=`matchMedia`in window?window.matchMedia(`(pointer:coarse)`).matches:!1),en)}var nn;function rn(){return typeof document>`u`?1:(nn===void 0&&(nn=`chrome`in window?window.devicePixelRatio:1),nn)}var an=`VVirtualListXScroll`;function on({columnsRef:e,renderColRef:t,renderItemWithColsRef:n}){let r=B(0),i=B(0),a=Y(()=>{let t=e.value;if(t.length===0)return null;let n=new Bt(t.length,0);return t.forEach((e,t)=>{n.add(t,e.width)}),n});return X(an,{startIndexRef:Z(()=>{let e=a.value;return e===null?0:Math.max(e.getBound(i.value)-1,0)}),endIndexRef:Z(()=>{let t=a.value;return t===null?0:Math.min(t.getBound(i.value+r.value)+1,e.value.length-1)}),columnsRef:e,renderColRef:t,renderItemWithColsRef:n,getLeft:e=>{let t=a.value;return t===null?0:t.sum(e)}}),{listWidthRef:r,scrollLeftRef:i}}var sn=u({name:`VirtualListRow`,props:{index:{type:Number,required:!0},item:{type:Object,required:!0}},setup(){let{startIndexRef:e,endIndexRef:t,columnsRef:n,getLeft:r,renderColRef:i,renderItemWithColsRef:a}=G(an);return{startIndex:e,endIndex:t,columns:n,renderCol:i,renderItemWithCols:a,getLeft:r}},render(){let{startIndex:e,endIndex:t,columns:n,renderCol:r,renderItemWithCols:i,getLeft:a,item:o}=this;if(i!=null)return i({itemIndex:this.index,startColIndex:e,endColIndex:t,allColumns:n,item:o,getLeft:a});if(r!=null){let i=[];for(let s=e;s<=t;++s){let e=n[s];i.push(r({column:e,left:a(s),item:o}))}return i}return null}}),cn=Lt(`.v-vl`,{maxHeight:`inherit`,height:`100%`,overflow:`auto`,minWidth:`1px`},[Lt(`&:not(.v-vl--show-scrollbar)`,{scrollbarWidth:`none`},[Lt(`&::-webkit-scrollbar, &::-webkit-scrollbar-track-piece, &::-webkit-scrollbar-thumb`,{width:0,height:0,display:`none`})])]),ln=u({name:`VirtualList`,inheritAttrs:!1,props:{showScrollbar:{type:Boolean,default:!0},columns:{type:Array,default:()=>[]},renderCol:Function,renderItemWithCols:Function,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){let t=te();cn.mount({id:`vueuc/virtual-list`,head:!0,anchorMetaName:Rt,ssr:t}),b(()=>{let{defaultScrollIndex:t,defaultScrollKey:n}=e;t==null?n!=null&&_({key:n}):_({index:t})});let n=!1,r=!1;O(()=>{if(n=!1,!r){r=!0;return}_({top:m.value,left:o.value})}),p(()=>{n=!0,r||=!0});let i=Z(()=>{if(e.renderCol==null&&e.renderItemWithCols==null||e.columns.length===0)return;let t=0;return e.columns.forEach(e=>{t+=e.width}),t}),a=Y(()=>{let t=new Map,{keyField:n}=e;return e.items.forEach((e,r)=>{t.set(e[n],r)}),t}),{scrollLeftRef:o,listWidthRef:s}=on({columnsRef:U(e,`columns`),renderColRef:U(e,`renderCol`),renderItemWithColsRef:U(e,`renderItemWithCols`)}),c=B(null),l=B(void 0),u=new Map,d=Y(()=>{let{items:t,itemSize:n,keyField:r}=e,i=new Bt(t.length,n);return t.forEach((e,t)=>{let n=e[r],a=u.get(n);a!==void 0&&i.add(t,a)}),i}),f=B(0),m=B(0),h=Z(()=>Math.max(d.value.getBound(m.value-w(e.paddingTop))-1,0)),g=Y(()=>{let{value:t}=l;if(t===void 0)return[];let{items:n,itemSize:r}=e,i=h.value,a=Math.min(i+Math.ceil(t/r+1),n.length-1),o=[];for(let e=i;e<=a;++e)o.push(n[e]);return o}),_=(e,t)=>{if(typeof e==`number`){C(e,t,`auto`);return}let{left:n,top:r,index:i,key:o,position:s,behavior:c,debounce:l=!0}=e;if(n!==void 0||r!==void 0)C(n,r,c);else if(i!==void 0)x(i,c,l);else if(o!==void 0){let e=a.value.get(o);e!==void 0&&x(e,c,l)}else s===`bottom`?C(0,2**53-1,c):s===`top`&&C(0,0,c)},v,y=null;function x(t,n,r){let{value:i}=d,a=i.sum(t)+w(e.paddingTop);if(!r)c.value.scrollTo({left:0,top:a,behavior:n});else{v=t,y!==null&&window.clearTimeout(y),y=window.setTimeout(()=>{v=void 0,y=null},16);let{scrollTop:e,offsetHeight:r}=c.value;if(a>e){let o=i.get(t);a+o<=e+r||c.value.scrollTo({left:0,top:a+o-r,behavior:n})}else c.value.scrollTo({left:0,top:a,behavior:n})}}function C(e,t,n){c.value.scrollTo({left:e,top:t,behavior:n})}function T(t,r){if(n||e.ignoreItemResize||M(r.target))return;let{value:i}=d,o=a.value.get(t),s=i.get(o),l=r.borderBoxSize?.[0]?.blockSize??r.contentRect.height;if(l===s)return;l-e.itemSize===0?u.delete(t):u.set(t,l-e.itemSize);let p=l-s;if(p===0)return;i.add(o,p);let m=c.value;if(m!=null){if(v===void 0){let e=i.sum(o);m.scrollTop>e&&m.scrollBy(0,p)}else (o<v||o===v&&l+i.sum(o)>m.scrollTop+m.offsetHeight)&&m.scrollBy(0,p);j()}f.value++}let E=!tn(),D=!1;function k(t){var n;(n=e.onScroll)==null||n.call(e,t),(!E||!D)&&j()}function A(t){var n;if((n=e.onWheel)==null||n.call(e,t),E){let e=c.value;if(e!=null){if(t.deltaX===0&&(e.scrollTop===0&&t.deltaY<=0||e.scrollTop+e.offsetHeight>=e.scrollHeight&&t.deltaY>=0))return;t.preventDefault(),e.scrollTop+=t.deltaY/rn(),e.scrollLeft+=t.deltaX/rn(),j(),D=!0,gt(()=>{D=!1})}}}function ee(t){if(n||M(t.target))return;if(e.renderCol==null&&e.renderItemWithCols==null){if(t.contentRect.height===l.value)return}else if(t.contentRect.height===l.value&&t.contentRect.width===s.value)return;l.value=t.contentRect.height,s.value=t.contentRect.width;let{onResize:r}=e;r!==void 0&&r(t)}function j(){let{value:e}=c;e!=null&&(m.value=e.scrollTop,o.value=e.scrollLeft)}function M(e){let t=e;for(;t!==null;){if(t.style.display===`none`)return!0;t=t.parentElement}return!1}return{listHeight:l,listStyle:{overflow:`auto`},keyToIndex:a,itemsStyle:Y(()=>{let{itemResizable:t}=e,n=S(d.value.sum());return f.value,[e.itemsStyle,{boxSizing:`content-box`,width:S(i.value),height:t?``:n,minHeight:t?n:``,paddingTop:S(e.paddingTop),paddingBottom:S(e.paddingBottom)}]}),visibleItemsStyle:Y(()=>(f.value,{transform:`translateY(${S(d.value.sum(h.value))})`})),viewportItems:g,listElRef:c,itemsElRef:B(null),scrollTo:_,handleListResize:ee,handleListScroll:k,handleListWheel:A,handleItemResize:T}},render(){let{itemResizable:e,keyField:t,keyToIndex:r,visibleItemsTag:i}=this;return M(k,{onResize:this.handleListResize},{default:()=>{var a;return M(`div`,n(this.$attrs,{class:[`v-vl`,this.showScrollbar&&`v-vl--show-scrollbar`],onScroll:this.handleListScroll,onWheel:this.handleListWheel,ref:`listElRef`}),[this.items.length===0?(a=this.$slots).empty?.call(a):M(`div`,{ref:`itemsElRef`,class:`v-vl-items`,style:this.itemsStyle},[M(i,Object.assign({class:`v-vl-visible-items`,style:this.visibleItemsStyle},this.visibleItemsProps),{default:()=>{let{renderCol:n,renderItemWithCols:i}=this;return this.viewportItems.map(a=>{let o=a[t],s=r.get(o),c=n==null?void 0:M(sn,{index:s,item:a}),l=i==null?void 0:M(sn,{index:s,item:a}),u=this.$slots.default({item:a,renderedCols:c,renderedItemWithCols:l,index:s})[0];return e?M(k,{key:o,onResize:e=>this.handleItemResize(o,e)},{default:()=>u}):(u.key=o,u)})}})])])}})}}),un=`v-hidden`,dn=Lt(`[v-hidden]`,{display:`none!important`}),fn=u({name:`Overflow`,props:{getCounter:Function,getTail:Function,updateCounter:Function,onUpdateCount:Function,onUpdateOverflow:Function},setup(e,{slots:t}){let n=B(null),r=B(null);function i(i){let{value:a}=n,{getCounter:o,getTail:s}=e,c;if(c=o===void 0?r.value:o(),!a||!c)return;c.hasAttribute(un)&&c.removeAttribute(un);let{children:l}=a;if(i.showAllItemsBeforeCalculate)for(let e of l)e.hasAttribute(un)&&e.removeAttribute(un);let u=a.offsetWidth,d=[],f=t.tail?s?.():null,p=f?f.offsetWidth:0,m=!1,h=a.children.length-(t.tail?1:0);for(let t=0;t<h-1;++t){if(t<0)continue;let n=l[t];if(m){n.hasAttribute(un)||n.setAttribute(un,``);continue}else n.hasAttribute(un)&&n.removeAttribute(un);let r=n.offsetWidth;if(p+=r,d[t]=r,p>u){let{updateCounter:n}=e;for(let r=t;r>=0;--r){let i=h-1-r;n===void 0?c.textContent=`${i}`:n(i);let a=c.offsetWidth;if(p-=d[r],p+a<=u||r===0){m=!0,t=r-1,f&&(t===-1?(f.style.maxWidth=`${u-a}px`,f.style.boxSizing=`border-box`):f.style.maxWidth=``);let{onUpdateCount:n}=e;n&&n(i);break}}}}let{onUpdateOverflow:g}=e;m?g!==void 0&&g(!0):(g!==void 0&&g(!1),c.setAttribute(un,``))}let a=te();return dn.mount({id:`vueuc/overflow`,head:!0,anchorMetaName:Rt,ssr:a}),b(()=>i({showAllItemsBeforeCalculate:!1})),{selfRef:n,counterRef:r,sync:i}},render(){let{$slots:e}=this;return Se(()=>this.sync({showAllItemsBeforeCalculate:!1})),M(`div`,{class:`v-overflow`,ref:`selfRef`},[a(e,`default`),e.counter?e.counter():M(`span`,{style:{display:`inline-block`},ref:`counterRef`}),e.tail?e.tail():null])}});function pn(e,t){t&&(b(()=>{let{value:n}=e;n&&ee.registerHandler(n,t)}),v(e,(e,t)=>{t&&ee.unregisterHandler(t)},{deep:!1}),P(()=>{let{value:t}=e;t&&ee.unregisterHandler(t)}))}var mn;function hn(){return mn===void 0&&(mn=navigator.userAgent.includes(`Node.js`)||navigator.userAgent.includes(`jsdom`)),mn}function gn(e){switch(typeof e){case`string`:return e||void 0;case`number`:return String(e);default:return}}function _n(e){return t=>{t?e.value=t.$el:e.value=null}}function vn(e){let t=e.filter(e=>e!==void 0);if(t.length!==0)return t.length===1?t[0]:t=>{e.forEach(e=>{e&&e(t)})}}var yn=de(ke,`WeakMap`),bn=ae(Object.keys,Object),xn=Object.prototype.hasOwnProperty;function Sn(e){if(!C(e))return bn(e);var t=[];for(var n in Object(e))xn.call(e,n)&&n!=`constructor`&&t.push(n);return t}function Cn(e){return De(e)?_(e):Sn(e)}function wn(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function Tn(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}function En(){return[]}var Dn=Object.prototype.propertyIsEnumerable,On=Object.getOwnPropertySymbols,kn=On?function(e){return e==null?[]:(e=Object(e),Tn(On(e),function(t){return Dn.call(e,t)}))}:En;function An(e,t,n){var r=t(e);return Ae(e)?r:wn(r,n(e))}function jn(e){return An(e,Cn,kn)}var Mn=de(ke,`DataView`),Nn=de(ke,`Promise`),Pn=de(ke,`Set`),Fn=`[object Map]`,In=`[object Object]`,Ln=`[object Promise]`,Rn=`[object Set]`,zn=`[object WeakMap]`,Bn=`[object DataView]`,Vn=F(Mn),Hn=F(i),Un=F(Nn),Wn=F(Pn),Gn=F(yn),Kn=he;(Mn&&Kn(new Mn(new ArrayBuffer(1)))!=Bn||i&&Kn(new i)!=Fn||Nn&&Kn(Nn.resolve())!=Ln||Pn&&Kn(new Pn)!=Rn||yn&&Kn(new yn)!=zn)&&(Kn=function(e){var t=he(e),n=t==In?e.constructor:void 0,r=n?F(n):``;if(r)switch(r){case Vn:return Bn;case Hn:return Fn;case Un:return Ln;case Wn:return Rn;case Gn:return zn}return t});var qn=Kn,Jn=`__lodash_hash_undefined__`;function Yn(e){return this.__data__.set(e,Jn),this}function Xn(e){return this.__data__.has(e)}function Zn(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new ze;++t<n;)this.add(e[t])}Zn.prototype.add=Zn.prototype.push=Yn,Zn.prototype.has=Xn;function Qn(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function $n(e,t){return e.has(t)}var er=1,tr=2;function nr(e,t,n,r,i,a){var o=n&er,s=e.length,c=t.length;if(s!=c&&!(o&&c>s))return!1;var l=a.get(e),u=a.get(t);if(l&&u)return l==t&&u==e;var d=-1,f=!0,p=n&tr?new Zn:void 0;for(a.set(e,t),a.set(t,e);++d<s;){var m=e[d],h=t[d];if(r)var g=o?r(h,m,d,t,e,a):r(m,h,d,e,t,a);if(g!==void 0){if(g)continue;f=!1;break}if(p){if(!Qn(t,function(e,t){if(!$n(p,t)&&(m===e||i(m,e,n,r,a)))return p.push(t)})){f=!1;break}}else if(!(m===h||i(m,h,n,r,a))){f=!1;break}}return a.delete(e),a.delete(t),f}function rr(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function ir(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var ar=1,or=2,sr=`[object Boolean]`,cr=`[object Date]`,lr=`[object Error]`,ur=`[object Map]`,dr=`[object Number]`,fr=`[object RegExp]`,pr=`[object Set]`,mr=`[object String]`,hr=`[object Symbol]`,gr=`[object ArrayBuffer]`,_r=`[object DataView]`,vr=Ee?Ee.prototype:void 0,yr=vr?vr.valueOf:void 0;function br(e,t,n,r,i,a,o){switch(n){case _r:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case gr:return!(e.byteLength!=t.byteLength||!a(new y(e),new y(t)));case sr:case cr:case dr:return z(+e,+t);case lr:return e.name==t.name&&e.message==t.message;case fr:case mr:return e==t+``;case ur:var s=rr;case pr:var c=r&ar;if(s||=ir,e.size!=t.size&&!c)return!1;var l=o.get(e);if(l)return l==t;r|=or,o.set(e,t);var u=nr(s(e),s(t),r,i,a,o);return o.delete(e),u;case hr:if(yr)return yr.call(e)==yr.call(t)}return!1}var xr=1,Sr=Object.prototype.hasOwnProperty;function Cr(e,t,n,r,i,a){var o=n&xr,s=jn(e),c=s.length;if(c!=jn(t).length&&!o)return!1;for(var l=c;l--;){var u=s[l];if(!(o?u in t:Sr.call(t,u)))return!1}var d=a.get(e),f=a.get(t);if(d&&f)return d==t&&f==e;var p=!0;a.set(e,t),a.set(t,e);for(var m=o;++l<c;){u=s[l];var h=e[u],g=t[u];if(r)var _=o?r(g,h,u,t,e,a):r(h,g,u,e,t,a);if(!(_===void 0?h===g||i(h,g,n,r,a):_)){p=!1;break}m||=u==`constructor`}if(p&&!m){var v=e.constructor,y=t.constructor;v!=y&&`constructor`in e&&`constructor`in t&&!(typeof v==`function`&&v instanceof v&&typeof y==`function`&&y instanceof y)&&(p=!1)}return a.delete(e),a.delete(t),p}var wr=1,Tr=`[object Arguments]`,Er=`[object Array]`,Dr=`[object Object]`,Or=Object.prototype.hasOwnProperty;function kr(e,t,n,r,i,a){var o=Ae(e),s=Ae(t),c=o?Er:qn(e),l=s?Er:qn(t);c=c==Tr?Dr:c,l=l==Tr?Dr:l;var u=c==Dr,d=l==Dr,f=c==l;if(f&&oe(e)){if(!oe(t))return!1;o=!0,u=!1}if(f&&!u)return a||=new T,o||re(e)?nr(e,t,n,r,i,a):br(e,t,c,n,r,i,a);if(!(n&wr)){var p=u&&Or.call(e,`__wrapped__`),m=d&&Or.call(t,`__wrapped__`);if(p||m){var h=p?e.value():e,g=m?t.value():t;return a||=new T,i(h,g,n,r,a)}}return f?(a||=new T,Cr(e,t,n,r,i,a)):!1}function Ar(e,t,n,r,i){return e===t?!0:e==null||t==null||!xe(e)&&!xe(t)?e!==e&&t!==t:kr(e,t,n,r,Ar,i)}var jr=1,Mr=2;function Nr(e,t,n,r){var i=n.length,a=i,o=!r;if(e==null)return!a;for(e=Object(e);i--;){var s=n[i];if(o&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<a;){s=n[i];var c=s[0],l=e[c],u=s[1];if(o&&s[2]){if(l===void 0&&!(c in e))return!1}else{var d=new T;if(r)var f=r(l,u,c,e,t,d);if(!(f===void 0?Ar(u,l,jr|Mr,r,d):f))return!1}}return!0}function Pr(e){return e===e&&!ge(e)}function Fr(e){for(var t=Cn(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,Pr(i)]}return t}function Ir(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function Lr(e){var t=Fr(e);return t.length==1&&t[0][2]?Ir(t[0][0],t[0][1]):function(n){return n===e||Nr(n,e,t)}}function Rr(e,t){return e!=null&&t in Object(e)}function zr(e,t,n){t=ft(t,e);for(var r=-1,i=t.length,a=!1;++r<i;){var o=ot(t[r]);if(!(a=e!=null&&n(e,o)))break;e=e[o]}return a||++r!=i?a:(i=e==null?0:e.length,!!i&&x(i)&&se(o,i)&&(Ae(e)||m(e)))}function Br(e,t){return e!=null&&zr(e,t,Rr)}var Vr=1,Hr=2;function Ur(e,t){return it(e)&&Pr(t)?Ir(ot(e),t):function(n){var r=dt(n,e);return r===void 0&&r===t?Br(n,e):Ar(t,r,Vr|Hr)}}function Wr(e){return function(t){return t?.[e]}}function Gr(e){return function(t){return rt(t,e)}}function Kr(e){return it(e)?Wr(ot(e)):Gr(e)}function qr(t){return typeof t==`function`?t:t==null?e:typeof t==`object`?Ae(t)?Ur(t[0],t[1]):Lr(t):Kr(t)}function Jr(e,t){return e&&f(e,t,Cn)}function Yr(e,t){return function(n,r){if(n==null)return n;if(!De(n))return e(n,r);for(var i=n.length,a=t?i:-1,o=Object(n);(t?a--:++a<i)&&r(o[a],a,o)!==!1;);return n}}var Xr=Yr(Jr);function Zr(e,t){var n=-1,r=De(e)?Array(e.length):[];return Xr(e,function(e,i,a){r[++n]=t(e,i,a)}),r}function Qr(e,t){return(Ae(e)?we:Zr)(e,qr(t,3))}var $r=u({name:`Checkmark`,render(){return M(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 16 16`},M(`g`,{fill:`none`},M(`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`})))}}),ei=u({name:`ChevronRight`,render(){return M(`svg`,{viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},M(`path`,{d:`M5.64645 3.14645C5.45118 3.34171 5.45118 3.65829 5.64645 3.85355L9.79289 8L5.64645 12.1464C5.45118 12.3417 5.45118 12.6583 5.64645 12.8536C5.84171 13.0488 6.15829 13.0488 6.35355 12.8536L10.8536 8.35355C11.0488 8.15829 11.0488 7.84171 10.8536 7.64645L6.35355 3.14645C6.15829 2.95118 5.84171 2.95118 5.64645 3.14645Z`,fill:`currentColor`}))}}),ti=u({name:`Empty`,render(){return M(`svg`,{viewBox:`0 0 28 28`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},M(`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`}),M(`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`}))}}),ni=u({props:{onFocus:Function,onBlur:Function},setup(e){return()=>M(`div`,{style:`width: 0; height: 0`,tabindex:0,onFocus:e.onFocus,onBlur:e.onBlur})}});function ri(e){return Array.isArray(e)?e:[e]}var ii={STOP:`STOP`};function ai(e,t){let n=t(e);e.children!==void 0&&n!==ii.STOP&&e.children.forEach(e=>ai(e,t))}function oi(e,t={}){let{preserveGroup:n=!1}=t,r=[],i=n?e=>{e.isLeaf||(r.push(e.key),a(e.children))}:e=>{e.isLeaf||(e.isGroup||r.push(e.key),a(e.children))};function a(e){e.forEach(i)}return a(e),r}function si(e,t){let{isLeaf:n}=e;return n===void 0?!t(e):n}function ci(e){return e.children}function li(e){return e.key}function ui(){return!1}function di(e,t){let{isLeaf:n}=e;return!(n===!1&&!Array.isArray(t(e)))}function fi(e){return e.disabled===!0}function pi(e,t){return e.isLeaf===!1&&!Array.isArray(t(e))}function mi(e){return e==null?[]:Array.isArray(e)?e:e.checkedKeys??[]}function hi(e){return e==null||Array.isArray(e)?[]:e.indeterminateKeys??[]}function gi(e,t){let n=new Set(e);return t.forEach(e=>{n.has(e)||n.add(e)}),Array.from(n)}function _i(e,t){let n=new Set(e);return t.forEach(e=>{n.has(e)&&n.delete(e)}),Array.from(n)}function vi(e){return e?.type===`group`}function yi(e){let t=new Map;return e.forEach((e,n)=>{t.set(e.key,n)}),e=>t.get(e)??null}var bi=class extends Error{constructor(){super(),this.message=`SubtreeNotLoadedError: checking a subtree whose required nodes are not fully loaded.`}};function xi(e,t,n,r){return Ti(t.concat(e),n,r,!1)}function Si(e,t){let n=new Set;return e.forEach(e=>{let r=t.treeNodeMap.get(e);if(r!==void 0){let e=r.parent;for(;e!==null&&!(e.disabled||n.has(e.key));)n.add(e.key),e=e.parent}}),n}function Ci(e,t,n,r){let i=Ti(t,n,r,!1),a=Ti(e,n,r,!0),o=Si(e,n),s=[];return i.forEach(e=>{(a.has(e)||o.has(e))&&s.push(e)}),s.forEach(e=>i.delete(e)),i}function wi(e,t){let{checkedKeys:n,keysToCheck:r,keysToUncheck:i,indeterminateKeys:a,cascade:o,leafOnly:s,checkStrategy:c,allowNotLoaded:l}=e;if(!o)return r===void 0?i===void 0?{checkedKeys:Array.from(n),indeterminateKeys:Array.from(a)}:{checkedKeys:_i(n,i),indeterminateKeys:Array.from(a)}:{checkedKeys:gi(n,r),indeterminateKeys:Array.from(a)};let{levelTreeNodeMap:u}=t,d;d=i===void 0?r===void 0?Ti(n,t,l,!1):xi(r,n,t,l):Ci(i,n,t,l);let f=c===`parent`,p=c===`child`||s,m=d,h=new Set,g=Math.max.apply(null,Array.from(u.keys()));for(let e=g;e>=0;--e){let t=e===0,n=u.get(e);for(let e of n){if(e.isLeaf)continue;let{key:n,shallowLoaded:r}=e;if(p&&r&&e.children.forEach(e=>{!e.disabled&&!e.isLeaf&&e.shallowLoaded&&m.has(e.key)&&m.delete(e.key)}),e.disabled||!r)continue;let i=!0,a=!1,o=!0;for(let t of e.children){let e=t.key;if(!t.disabled){if(o&&=!1,m.has(e))a=!0;else if(h.has(e)){a=!0,i=!1;break}else if(i=!1,a)break}}i&&!o?(f&&e.children.forEach(e=>{!e.disabled&&m.has(e.key)&&m.delete(e.key)}),m.add(n)):a&&h.add(n),t&&p&&m.has(n)&&m.delete(n)}}return{checkedKeys:Array.from(m),indeterminateKeys:Array.from(h)}}function Ti(e,t,n,r){let{treeNodeMap:i,getChildren:a}=t,o=new Set,s=new Set(e);return e.forEach(e=>{let t=i.get(e);t!==void 0&&ai(t,e=>{if(e.disabled)return ii.STOP;let{key:t}=e;if(!o.has(t)&&(o.add(t),s.add(t),pi(e.rawNode,a))){if(r)return ii.STOP;if(!n)throw new bi}})}),s}function Ei(e,{includeGroup:t=!1,includeSelf:n=!0},r){let i=r.treeNodeMap,a=e==null?null:i.get(e)??null,o={keyPath:[],treeNodePath:[],treeNode:a};if(a?.ignored)return o.treeNode=null,o;for(;a;)!a.ignored&&(t||!a.isGroup)&&o.treeNodePath.push(a),a=a.parent;return o.treeNodePath.reverse(),n||o.treeNodePath.pop(),o.keyPath=o.treeNodePath.map(e=>e.key),o}function Di(e){if(e.length===0)return null;let t=e[0];return t.isGroup||t.ignored||t.disabled?t.getNext():t}function Oi(e,t){let n=e.siblings,r=n.length,{index:i}=e;return t?n[(i+1)%r]:i===n.length-1?null:n[i+1]}function ki(e,t,{loop:n=!1,includeDisabled:r=!1}={}){let i=t===`prev`?Ai:Oi,a={reverse:t===`prev`},o=!1,s=null;function c(t){if(t!==null){if(t===e){if(!o)o=!0;else if(!e.disabled&&!e.isGroup){s=e;return}}else if((!t.disabled||r)&&!t.ignored&&!t.isGroup){s=t;return}if(t.isGroup){let e=Mi(t,a);e===null?c(i(t,n)):s=e}else{let e=i(t,!1);if(e!==null)c(e);else{let e=ji(t);e?.isGroup?c(i(e,n)):n&&c(i(t,!0))}}}}return c(e),s}function Ai(e,t){let n=e.siblings,r=n.length,{index:i}=e;return t?n[(i-1+r)%r]:i===0?null:n[i-1]}function ji(e){return e.parent}function Mi(e,t={}){let{reverse:n=!1}=t,{children:r}=e;if(r){let{length:e}=r,i=n?e-1:0,a=n?-1:e,o=n?-1:1;for(let e=i;e!==a;e+=o){let n=r[e];if(!n.disabled&&!n.ignored)if(n.isGroup){let e=Mi(n,t);if(e!==null)return e}else return n}}return null}var Ni={getChild(){return this.ignored?null:Mi(this)},getParent(){let{parent:e}=this;return e?.isGroup?e.getParent():e},getNext(e={}){return ki(this,`next`,e)},getPrev(e={}){return ki(this,`prev`,e)}};function Pi(e,t){let n=t?new Set(t):void 0,r=[];function i(e){e.forEach(e=>{r.push(e),!(e.isLeaf||!e.children||e.ignored)&&(e.isGroup||n===void 0||n.has(e.key))&&i(e.children)})}return i(e),r}function Fi(e,t){let n=e.key;for(;t;){if(t.key===n)return!0;t=t.parent}return!1}function Ii(e,t,n,r,i,a=null,o=0){let s=[];return e.forEach((c,l)=>{var u;let d=Object.create(r);if(d.rawNode=c,d.siblings=s,d.level=o,d.index=l,d.isFirstChild=l===0,d.isLastChild=l+1===e.length,d.parent=a,!d.ignored){let e=i(c);Array.isArray(e)&&(d.children=Ii(e,t,n,r,i,d,o+1))}s.push(d),t.set(d.key,d),n.has(o)||n.set(o,[]),(u=n.get(o))==null||u.push(d)}),s}function Li(e,t={}){let n=new Map,r=new Map,{getDisabled:i=fi,getIgnored:a=ui,getIsGroup:o=vi,getKey:s=li}=t,c=t.getChildren??ci,l=t.ignoreEmptyChildren?e=>{let t=c(e);return Array.isArray(t)?t.length?t:null:t}:c,u=Ii(e,n,r,Object.assign({get key(){return s(this.rawNode)},get disabled(){return i(this.rawNode)},get isGroup(){return o(this.rawNode)},get isLeaf(){return si(this.rawNode,l)},get shallowLoaded(){return di(this.rawNode,l)},get ignored(){return a(this.rawNode)},contains(e){return Fi(this,e)}},Ni),l);function d(e){if(e==null)return null;let t=n.get(e);return t&&!t.isGroup&&!t.ignored?t:null}function f(e){if(e==null)return null;let t=n.get(e);return t&&!t.ignored?t:null}function p(e,t){let n=f(e);return n?n.getPrev(t):null}function m(e,t){let n=f(e);return n?n.getNext(t):null}function h(e){let t=f(e);return t?t.getParent():null}function g(e){let t=f(e);return t?t.getChild():null}let _={treeNodes:u,treeNodeMap:n,levelTreeNodeMap:r,maxLevel:Math.max(...r.keys()),getChildren:l,getFlattenedNodes(e){return Pi(u,e)},getNode:d,getPrev:p,getNext:m,getParent:h,getChild:g,getFirstAvailableNode(){return Di(u)},getPath(e,t={}){return Ei(e,t,_)},getCheckedKeys(e,t={}){let{cascade:n=!0,leafOnly:r=!1,checkStrategy:i=`all`,allowNotLoaded:a=!1}=t;return wi({checkedKeys:mi(e),indeterminateKeys:hi(e),cascade:n,leafOnly:r,checkStrategy:i,allowNotLoaded:a},_)},check(e,t,n={}){let{cascade:r=!0,leafOnly:i=!1,checkStrategy:a=`all`,allowNotLoaded:o=!1}=n;return wi({checkedKeys:mi(t),indeterminateKeys:hi(t),keysToCheck:e==null?[]:ri(e),cascade:r,leafOnly:i,checkStrategy:a,allowNotLoaded:o},_)},uncheck(e,t,n={}){let{cascade:r=!0,leafOnly:i=!1,checkStrategy:a=`all`,allowNotLoaded:o=!1}=n;return wi({checkedKeys:mi(t),indeterminateKeys:hi(t),keysToUncheck:e==null?[]:ri(e),cascade:r,leafOnly:i,checkStrategy:a,allowNotLoaded:o},_)},getNonLeafKeys(e={}){return oi(u,e)}};return _}var Ri={iconSizeTiny:`28px`,iconSizeSmall:`34px`,iconSizeMedium:`40px`,iconSizeLarge:`46px`,iconSizeHuge:`52px`};function zi(e){let{textColorDisabled:t,iconColor:n,textColor2:r,fontSizeTiny:i,fontSizeSmall:a,fontSizeMedium:o,fontSizeLarge:s,fontSizeHuge:c}=e;return Object.assign(Object.assign({},Ri),{fontSizeTiny:i,fontSizeSmall:a,fontSizeMedium:o,fontSizeLarge:s,fontSizeHuge:c,textColor:t,iconColor:n,extraTextColor:r})}var Bi={name:`Empty`,common:Re,self:zi},Vi=I(`empty`,`
  2. display: flex;
  3. flex-direction: column;
  4. align-items: center;
  5. font-size: var(--n-font-size);
  6. `,[H(`icon`,`
  7. width: var(--n-icon-size);
  8. height: var(--n-icon-size);
  9. font-size: var(--n-icon-size);
  10. line-height: var(--n-icon-size);
  11. color: var(--n-icon-color);
  12. transition:
  13. color .3s var(--n-bezier);
  14. `,[V(`+`,[H(`description`,`
  15. margin-top: 8px;
  16. `)])]),H(`description`,`
  17. transition: color .3s var(--n-bezier);
  18. color: var(--n-text-color);
  19. `),H(`extra`,`
  20. text-align: center;
  21. transition: color .3s var(--n-bezier);
  22. margin-top: 12px;
  23. color: var(--n-extra-text-color);
  24. `)]),Hi=u({name:`Empty`,props:Object.assign(Object.assign({},W.props),{description:String,showDescription:{type:Boolean,default:!0},showIcon:{type:Boolean,default:!0},size:{type:String,default:`medium`},renderIcon:Function}),slots:Object,setup(e){let{mergedClsPrefixRef:t,inlineThemeDisabled:n,mergedComponentPropsRef:r}=Pe(e),i=W(`Empty`,`-empty`,Vi,Bi,e,t),{localeRef:a}=ct(`Empty`),o=Y(()=>e.description??r?.value?.Empty?.description),s=Y(()=>r?.value?.Empty?.renderIcon||(()=>M(ti,null))),c=Y(()=>{let{size:t}=e,{common:{cubicBezierEaseInOut:n},self:{[q(`iconSize`,t)]:r,[q(`fontSize`,t)]:a,textColor:o,iconColor:s,extraTextColor:c}}=i.value;return{"--n-icon-size":r,"--n-font-size":a,"--n-bezier":n,"--n-text-color":o,"--n-icon-color":s,"--n-extra-text-color":c}}),l=n?me(`empty`,Y(()=>{let t=``,{size:n}=e;return t+=n[0],t}),c,e):void 0;return{mergedClsPrefix:t,mergedRenderIcon:s,localizedDescription:Y(()=>o.value||a.value.description),cssVars:n?void 0:c,themeClass:l?.themeClass,onRender:l?.onRender}},render(){let{$slots:e,mergedClsPrefix:t,onRender:n}=this;return n?.(),M(`div`,{class:[`${t}-empty`,this.themeClass],style:this.cssVars},this.showIcon?M(`div`,{class:`${t}-empty__icon`},e.icon?e.icon():M(c,{clsPrefix:t},{default:this.mergedRenderIcon})):null,this.showDescription?M(`div`,{class:`${t}-empty__description`},e.default?e.default():this.localizedDescription):null,e.extra?M(`div`,{class:`${t}-empty__extra`},e.extra()):null)}}),Ui={height:`calc(var(--n-option-height) * 7.6)`,paddingTiny:`4px 0`,paddingSmall:`4px 0`,paddingMedium:`4px 0`,paddingLarge:`4px 0`,paddingHuge:`4px 0`,optionPaddingTiny:`0 12px`,optionPaddingSmall:`0 12px`,optionPaddingMedium:`0 12px`,optionPaddingLarge:`0 12px`,optionPaddingHuge:`0 12px`,loadingSize:`18px`};function Wi(e){let{borderRadius:t,popoverColor:n,textColor3:r,dividerColor:i,textColor2:a,primaryColorPressed:o,textColorDisabled:s,primaryColor:c,opacityDisabled:l,hoverColor:u,fontSizeTiny:d,fontSizeSmall:f,fontSizeMedium:p,fontSizeLarge:m,fontSizeHuge:h,heightTiny:g,heightSmall:_,heightMedium:v,heightLarge:y,heightHuge:b}=e;return Object.assign(Object.assign({},Ui),{optionFontSizeTiny:d,optionFontSizeSmall:f,optionFontSizeMedium:p,optionFontSizeLarge:m,optionFontSizeHuge:h,optionHeightTiny:g,optionHeightSmall:_,optionHeightMedium:v,optionHeightLarge:y,optionHeightHuge:b,borderRadius:t,color:n,groupHeaderTextColor:r,actionDividerColor:i,optionTextColor:a,optionTextColorPressed:o,optionTextColorDisabled:s,optionTextColorActive:c,optionOpacityDisabled:l,optionCheckColor:c,optionColorPending:u,optionColorActive:`rgba(0, 0, 0, 0)`,optionColorActivePending:u,actionTextColor:a,loadingColor:c})}var Gi=j({name:`InternalSelectMenu`,common:Re,peers:{Scrollbar:Me,Empty:Bi},self:Wi}),Ki=u({name:`NBaseSelectGroupHeader`,props:{clsPrefix:{type:String,required:!0},tmNode:{type:Object,required:!0}},setup(){let{renderLabelRef:e,renderOptionRef:t,labelFieldRef:n,nodePropsRef:r}=G(St);return{labelField:n,nodeProps:r,renderLabel:e,renderOption:t}},render(){let{clsPrefix:e,renderLabel:t,renderOption:n,nodeProps:r,tmNode:{rawNode:i}}=this,a=r?.(i),o=t?t(i,!1):Ue(i[this.labelField],i,!1),s=M(`div`,Object.assign({},a,{class:[`${e}-base-select-group-header`,a?.class]}),o);return i.render?i.render({node:s,option:i}):n?n({node:s,option:i,selected:!1}):s}});function qi(e,t){return M(je,{name:`fade-in-scale-up-transition`},{default:()=>e?M(c,{clsPrefix:t,class:`${t}-base-select-option__check`},{default:()=>M($r)}):null})}var Ji=u({name:`NBaseSelectOption`,props:{clsPrefix:{type:String,required:!0},tmNode:{type:Object,required:!0}},setup(e){let{valueRef:t,pendingTmNodeRef:n,multipleRef:r,valueSetRef:i,renderLabelRef:a,renderOptionRef:o,labelFieldRef:s,valueFieldRef:c,showCheckmarkRef:l,nodePropsRef:u,handleOptionClick:d,handleOptionMouseEnter:f}=G(St),p=Z(()=>{let{value:t}=n;return t?e.tmNode.key===t.key:!1});function m(t){let{tmNode:n}=e;n.disabled||d(t,n)}function h(t){let{tmNode:n}=e;n.disabled||f(t,n)}function g(t){let{tmNode:n}=e,{value:r}=p;n.disabled||r||f(t,n)}return{multiple:r,isGrouped:Z(()=>{let{tmNode:t}=e,{parent:n}=t;return n&&n.rawNode.type===`group`}),showCheckmark:l,nodeProps:u,isPending:p,isSelected:Z(()=>{let{value:n}=t,{value:a}=r;if(n===null)return!1;let o=e.tmNode.rawNode[c.value];if(a){let{value:e}=i;return e.has(o)}else return n===o}),labelField:s,renderLabel:a,renderOption:o,handleMouseMove:g,handleMouseEnter:h,handleClick:m}},render(){let{clsPrefix:e,tmNode:{rawNode:t},isSelected:n,isPending:r,isGrouped:i,showCheckmark:a,nodeProps:o,renderOption:s,renderLabel:c,handleClick:l,handleMouseEnter:u,handleMouseMove:d}=this,f=qi(n,e),p=c?[c(t,n),a&&f]:[Ue(t[this.labelField],t,n),a&&f],m=o?.(t),h=M(`div`,Object.assign({},m,{class:[`${e}-base-select-option`,t.class,m?.class,{[`${e}-base-select-option--disabled`]:t.disabled,[`${e}-base-select-option--selected`]:n,[`${e}-base-select-option--grouped`]:i,[`${e}-base-select-option--pending`]:r,[`${e}-base-select-option--show-checkmark`]:a}],style:[m?.style||``,t.style||``],onClick:vn([l,m?.onClick]),onMouseenter:vn([u,m?.onMouseenter]),onMousemove:vn([d,m?.onMousemove])}),M(`div`,{class:`${e}-base-select-option__content`},p));return t.render?t.render({node:h,option:t,selected:n}):s?s({node:h,option:t,selected:n}):h}}),Yi=I(`base-select-menu`,`
  25. line-height: 1.5;
  26. outline: none;
  27. z-index: 0;
  28. position: relative;
  29. border-radius: var(--n-border-radius);
  30. transition:
  31. background-color .3s var(--n-bezier),
  32. box-shadow .3s var(--n-bezier);
  33. background-color: var(--n-color);
  34. `,[I(`scrollbar`,`
  35. max-height: var(--n-height);
  36. `),I(`virtual-list`,`
  37. max-height: var(--n-height);
  38. `),I(`base-select-option`,`
  39. min-height: var(--n-option-height);
  40. font-size: var(--n-option-font-size);
  41. display: flex;
  42. align-items: center;
  43. `,[H(`content`,`
  44. z-index: 1;
  45. white-space: nowrap;
  46. text-overflow: ellipsis;
  47. overflow: hidden;
  48. `)]),I(`base-select-group-header`,`
  49. min-height: var(--n-option-height);
  50. font-size: .93em;
  51. display: flex;
  52. align-items: center;
  53. `),I(`base-select-menu-option-wrapper`,`
  54. position: relative;
  55. width: 100%;
  56. `),H(`loading, empty`,`
  57. display: flex;
  58. padding: 12px 32px;
  59. flex: 1;
  60. justify-content: center;
  61. `),H(`loading`,`
  62. color: var(--n-loading-color);
  63. font-size: var(--n-loading-size);
  64. `),H(`header`,`
  65. padding: 8px var(--n-option-padding-left);
  66. font-size: var(--n-option-font-size);
  67. transition:
  68. color .3s var(--n-bezier),
  69. border-color .3s var(--n-bezier);
  70. border-bottom: 1px solid var(--n-action-divider-color);
  71. color: var(--n-action-text-color);
  72. `),H(`action`,`
  73. padding: 8px var(--n-option-padding-left);
  74. font-size: var(--n-option-font-size);
  75. transition:
  76. color .3s var(--n-bezier),
  77. border-color .3s var(--n-bezier);
  78. border-top: 1px solid var(--n-action-divider-color);
  79. color: var(--n-action-text-color);
  80. `),I(`base-select-group-header`,`
  81. position: relative;
  82. cursor: default;
  83. padding: var(--n-option-padding);
  84. color: var(--n-group-header-text-color);
  85. `),I(`base-select-option`,`
  86. cursor: pointer;
  87. position: relative;
  88. padding: var(--n-option-padding);
  89. transition:
  90. color .3s var(--n-bezier),
  91. opacity .3s var(--n-bezier);
  92. box-sizing: border-box;
  93. color: var(--n-option-text-color);
  94. opacity: 1;
  95. `,[J(`show-checkmark`,`
  96. padding-right: calc(var(--n-option-padding-right) + 20px);
  97. `),V(`&::before`,`
  98. content: "";
  99. position: absolute;
  100. left: 4px;
  101. right: 4px;
  102. top: 0;
  103. bottom: 0;
  104. border-radius: var(--n-border-radius);
  105. transition: background-color .3s var(--n-bezier);
  106. `),V(`&:active`,`
  107. color: var(--n-option-text-color-pressed);
  108. `),J(`grouped`,`
  109. padding-left: calc(var(--n-option-padding-left) * 1.5);
  110. `),J(`pending`,[V(`&::before`,`
  111. background-color: var(--n-option-color-pending);
  112. `)]),J(`selected`,`
  113. color: var(--n-option-text-color-active);
  114. `,[V(`&::before`,`
  115. background-color: var(--n-option-color-active);
  116. `),J(`pending`,[V(`&::before`,`
  117. background-color: var(--n-option-color-active-pending);
  118. `)])]),J(`disabled`,`
  119. cursor: not-allowed;
  120. `,[K(`selected`,`
  121. color: var(--n-option-text-color-disabled);
  122. `),J(`selected`,`
  123. opacity: var(--n-option-opacity-disabled);
  124. `)]),H(`check`,`
  125. font-size: 16px;
  126. position: absolute;
  127. right: calc(var(--n-option-padding-right) - 4px);
  128. top: calc(50% - 7px);
  129. color: var(--n-option-check-color);
  130. transition: color .3s var(--n-bezier);
  131. `,[Qe({enterScale:`0.5`})])])]),Xi=u({name:`InternalSelectMenu`,props:Object.assign(Object.assign({},W.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,scrollbarProps:Object,onToggle:Function}),setup(e){let{mergedClsPrefixRef:t,mergedRtlRef:n,mergedComponentPropsRef:r}=Pe(e),i=D(`InternalSelectMenu`,n,t),a=W(`InternalSelectMenu`,`-internal-select-menu`,Yi,Gi,e,U(e,`clsPrefix`)),o=B(null),s=B(null),c=B(null),l=Y(()=>e.treeMate.getFlattenedNodes()),u=Y(()=>yi(l.value)),d=B(null);function f(){let{treeMate:t}=e,n=null,{value:r}=e;r===null?n=t.getFirstAvailableNode():(n=e.multiple?t.getNode((r||[])[(r||[]).length-1]):t.getNode(r),(!n||n.disabled)&&(n=t.getFirstAvailableNode())),F(n||null)}function p(){let{value:t}=d;t&&!e.treeMate.getNode(t.key)&&(d.value=null)}let m;v(()=>e.show,t=>{t?m=v(()=>e.treeMate,()=>{e.resetMenuOnOptionsChange?(e.autoPending?f():p(),Se(I)):p()},{immediate:!0}):m?.()},{immediate:!0}),P(()=>{m?.()});let h=Y(()=>w(a.value.self[q(`optionHeight`,e.size)])),g=Y(()=>Oe(a.value.self[q(`padding`,e.size)])),_=Y(()=>e.multiple&&Array.isArray(e.value)?new Set(e.value):new Set),y=Y(()=>{let e=l.value;return e&&e.length===0}),x=Y(()=>r?.value?.Select?.renderEmpty);function S(t){let{onToggle:n}=e;n&&n(t)}function C(t){let{onScroll:n}=e;n&&n(t)}function T(e){var t;(t=c.value)==null||t.sync(),C(e)}function E(){var e;(e=c.value)==null||e.sync()}function O(){let{value:e}=d;return e||null}function k(e,t){t.disabled||F(t,!1)}function A(e,t){t.disabled||S(t)}function ee(t){var n;_t(t,`action`)||(n=e.onKeyup)==null||n.call(e,t)}function j(t){var n;_t(t,`action`)||(n=e.onKeydown)==null||n.call(e,t)}function M(t){var n;(n=e.onMousedown)==null||n.call(e,t),!e.focusable&&t.preventDefault()}function N(){let{value:e}=d;e&&F(e.getNext({loop:!0}),!0)}function te(){let{value:e}=d;e&&F(e.getPrev({loop:!0}),!0)}function F(e,t=!1){d.value=e,t&&I()}function I(){var t,n;let r=d.value;if(!r)return;let i=u.value(r.key);i!==null&&(e.virtualScroll?(t=s.value)==null||t.scrollTo({index:i}):(n=c.value)==null||n.scrollTo({index:i,elSize:h.value}))}function ne(t){var n;o.value?.contains(t.target)&&((n=e.onFocus)==null||n.call(e,t))}function re(t){var n;o.value?.contains(t.relatedTarget)||(n=e.onBlur)==null||n.call(e,t)}X(St,{handleOptionMouseEnter:k,handleOptionClick:A,valueSetRef:_,pendingTmNodeRef:d,nodePropsRef:U(e,`nodeProps`),showCheckmarkRef:U(e,`showCheckmark`),multipleRef:U(e,`multiple`),valueRef:U(e,`value`),renderLabelRef:U(e,`renderLabel`),renderOptionRef:U(e,`renderOption`),labelFieldRef:U(e,`labelField`),valueFieldRef:U(e,`valueField`)}),X(Ct,o),b(()=>{let{value:e}=c;e&&e.sync()});let ie=Y(()=>{let{size:t}=e,{common:{cubicBezierEaseInOut:n},self:{height:r,borderRadius:i,color:o,groupHeaderTextColor:s,actionDividerColor:c,optionTextColorPressed:l,optionTextColor:u,optionTextColorDisabled:d,optionTextColorActive:f,optionOpacityDisabled:p,optionCheckColor:m,actionTextColor:h,optionColorPending:g,optionColorActive:_,loadingColor:v,loadingSize:y,optionColorActivePending:b,[q(`optionFontSize`,t)]:x,[q(`optionHeight`,t)]:S,[q(`optionPadding`,t)]:C}}=a.value;return{"--n-height":r,"--n-action-divider-color":c,"--n-action-text-color":h,"--n-bezier":n,"--n-border-radius":i,"--n-color":o,"--n-option-font-size":x,"--n-group-header-text-color":s,"--n-option-check-color":m,"--n-option-color-pending":g,"--n-option-color-active":_,"--n-option-color-active-pending":b,"--n-option-height":S,"--n-option-opacity-disabled":p,"--n-option-text-color":u,"--n-option-text-color-active":f,"--n-option-text-color-disabled":d,"--n-option-text-color-pressed":l,"--n-option-padding":C,"--n-option-padding-left":Oe(C,`left`),"--n-option-padding-right":Oe(C,`right`),"--n-loading-color":v,"--n-loading-size":y}}),{inlineThemeDisabled:ae}=e,L=ae?me(`internal-select-menu`,Y(()=>e.size[0]),ie,e):void 0,oe={selfRef:o,next:N,prev:te,getPendingTmNode:O};return pn(o,e.onResize),Object.assign({mergedTheme:a,mergedClsPrefix:t,rtlEnabled:i,virtualListRef:s,scrollbarRef:c,itemSize:h,padding:g,flattenedNodes:l,empty:y,mergedRenderEmpty:x,virtualListContainer(){let{value:e}=s;return e?.listElRef},virtualListContent(){let{value:e}=s;return e?.itemsElRef},doScroll:C,handleFocusin:ne,handleFocusout:re,handleKeyUp:ee,handleKeyDown:j,handleMouseDown:M,handleVirtualListResize:E,handleVirtualListScroll:T,cssVars:ae?void 0:ie,themeClass:L?.themeClass,onRender:L?.onRender},oe)},render(){let{$slots:e,virtualScroll:t,clsPrefix:n,mergedTheme:r,themeClass:i,onRender:a}=this;return a?.(),M(`div`,{ref:`selfRef`,tabindex:this.focusable?0:-1,class:[`${n}-base-select-menu`,`${n}-base-select-menu--${this.size}-size`,this.rtlEnabled&&`${n}-base-select-menu--rtl`,i,this.multiple&&`${n}-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},d(e.header,e=>e&&M(`div`,{class:`${n}-base-select-menu__header`,"data-header":!0,key:`header`},e)),this.loading?M(`div`,{class:`${n}-base-select-menu__loading`},M(Ie,{clsPrefix:n,strokeWidth:20})):this.empty?M(`div`,{class:`${n}-base-select-menu__empty`,"data-empty":!0},Fe(e.empty,()=>[this.mergedRenderEmpty?.call(this)||M(Hi,{theme:r.peers.Empty,themeOverrides:r.peerOverrides.Empty,size:this.size})])):M(ve,Object.assign({ref:`scrollbarRef`,theme:r.peers.Scrollbar,themeOverrides:r.peerOverrides.Scrollbar,scrollable:this.scrollable,container:t?this.virtualListContainer:void 0,content:t?this.virtualListContent:void 0,onScroll:t?void 0:this.doScroll},this.scrollbarProps),{default:()=>t?M(ln,{ref:`virtualListRef`,class:`${n}-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:e})=>e.isGroup?M(Ki,{key:e.key,clsPrefix:n,tmNode:e}):e.ignored?null:M(Ji,{clsPrefix:n,key:e.key,tmNode:e})}):M(`div`,{class:`${n}-base-select-menu-option-wrapper`,style:{paddingTop:this.padding.top,paddingBottom:this.padding.bottom}},this.flattenedNodes.map(e=>e.isGroup?M(Ki,{key:e.key,clsPrefix:n,tmNode:e}):M(Ji,{clsPrefix:n,key:e.key,tmNode:e})))}),d(e.action,e=>e&&[M(`div`,{class:`${n}-base-select-menu__action`,"data-action":!0,key:`action`},e),M(ni,{onFocus:this.onTabOut,key:`focus-detector`})]))}}),Zi={space:`6px`,spaceArrow:`10px`,arrowOffset:`10px`,arrowOffsetVertical:`10px`,arrowHeight:`6px`,padding:`8px 14px`};function Qi(e){let{boxShadow2:t,popoverColor:n,textColor2:r,borderRadius:i,fontSize:a,dividerColor:o}=e;return Object.assign(Object.assign({},Zi),{fontSize:a,borderRadius:i,color:n,dividerColor:o,textColor:r,boxShadow:t})}var $i=j({name:`Popover`,common:Re,peers:{Scrollbar:Me},self:Qi}),ea={top:`bottom`,bottom:`top`,left:`right`,right:`left`},Q=`var(--n-arrow-height) * 1.414`,ta=V([I(`popover`,`
  132. transition:
  133. box-shadow .3s var(--n-bezier),
  134. background-color .3s var(--n-bezier),
  135. color .3s var(--n-bezier);
  136. position: relative;
  137. font-size: var(--n-font-size);
  138. color: var(--n-text-color);
  139. box-shadow: var(--n-box-shadow);
  140. word-break: break-word;
  141. `,[V(`>`,[I(`scrollbar`,`
  142. height: inherit;
  143. max-height: inherit;
  144. `)]),K(`raw`,`
  145. background-color: var(--n-color);
  146. border-radius: var(--n-border-radius);
  147. `,[K(`scrollable`,[K(`show-header-or-footer`,`padding: var(--n-padding);`)])]),H(`header`,`
  148. padding: var(--n-padding);
  149. border-bottom: 1px solid var(--n-divider-color);
  150. transition: border-color .3s var(--n-bezier);
  151. `),H(`footer`,`
  152. padding: var(--n-padding);
  153. border-top: 1px solid var(--n-divider-color);
  154. transition: border-color .3s var(--n-bezier);
  155. `),J(`scrollable, show-header-or-footer`,[H(`content`,`
  156. padding: var(--n-padding);
  157. `)])]),I(`popover-shared`,`
  158. transform-origin: inherit;
  159. `,[I(`popover-arrow-wrapper`,`
  160. position: absolute;
  161. overflow: hidden;
  162. pointer-events: none;
  163. `,[I(`popover-arrow`,`
  164. transition: background-color .3s var(--n-bezier);
  165. position: absolute;
  166. display: block;
  167. width: calc(${Q});
  168. height: calc(${Q});
  169. box-shadow: 0 0 8px 0 rgba(0, 0, 0, .12);
  170. transform: rotate(45deg);
  171. background-color: var(--n-color);
  172. pointer-events: all;
  173. `)]),V(`&.popover-transition-enter-from, &.popover-transition-leave-to`,`
  174. opacity: 0;
  175. transform: scale(.85);
  176. `),V(`&.popover-transition-enter-to, &.popover-transition-leave-from`,`
  177. transform: scale(1);
  178. opacity: 1;
  179. `),V(`&.popover-transition-enter-active`,`
  180. transition:
  181. box-shadow .3s var(--n-bezier),
  182. background-color .3s var(--n-bezier),
  183. color .3s var(--n-bezier),
  184. opacity .15s var(--n-bezier-ease-out),
  185. transform .15s var(--n-bezier-ease-out);
  186. `),V(`&.popover-transition-leave-active`,`
  187. transition:
  188. box-shadow .3s var(--n-bezier),
  189. background-color .3s var(--n-bezier),
  190. color .3s var(--n-bezier),
  191. opacity .15s var(--n-bezier-ease-in),
  192. transform .15s var(--n-bezier-ease-in);
  193. `)]),$(`top-start`,`
  194. top: calc(${Q} / -2);
  195. left: calc(${na(`top-start`)} - var(--v-offset-left));
  196. `),$(`top`,`
  197. top: calc(${Q} / -2);
  198. transform: translateX(calc(${Q} / -2)) rotate(45deg);
  199. left: 50%;
  200. `),$(`top-end`,`
  201. top: calc(${Q} / -2);
  202. right: calc(${na(`top-end`)} + var(--v-offset-left));
  203. `),$(`bottom-start`,`
  204. bottom: calc(${Q} / -2);
  205. left: calc(${na(`bottom-start`)} - var(--v-offset-left));
  206. `),$(`bottom`,`
  207. bottom: calc(${Q} / -2);
  208. transform: translateX(calc(${Q} / -2)) rotate(45deg);
  209. left: 50%;
  210. `),$(`bottom-end`,`
  211. bottom: calc(${Q} / -2);
  212. right: calc(${na(`bottom-end`)} + var(--v-offset-left));
  213. `),$(`left-start`,`
  214. left: calc(${Q} / -2);
  215. top: calc(${na(`left-start`)} - var(--v-offset-top));
  216. `),$(`left`,`
  217. left: calc(${Q} / -2);
  218. transform: translateY(calc(${Q} / -2)) rotate(45deg);
  219. top: 50%;
  220. `),$(`left-end`,`
  221. left: calc(${Q} / -2);
  222. bottom: calc(${na(`left-end`)} + var(--v-offset-top));
  223. `),$(`right-start`,`
  224. right: calc(${Q} / -2);
  225. top: calc(${na(`right-start`)} - var(--v-offset-top));
  226. `),$(`right`,`
  227. right: calc(${Q} / -2);
  228. transform: translateY(calc(${Q} / -2)) rotate(45deg);
  229. top: 50%;
  230. `),$(`right-end`,`
  231. right: calc(${Q} / -2);
  232. bottom: calc(${na(`right-end`)} + var(--v-offset-top));
  233. `),...Qr({top:[`right-start`,`left-start`],right:[`top-end`,`bottom-end`],bottom:[`right-end`,`left-end`],left:[`top-start`,`bottom-start`]},(e,t)=>{let n=[`right`,`left`].includes(t),r=n?`width`:`height`;return e.map(e=>{let i=e.split(`-`)[1]===`end`,a=`calc((${`var(--v-target-${r}, 0px)`} - ${Q}) / 2)`,o=na(e);return V(`[v-placement="${e}"] >`,[I(`popover-shared`,[J(`center-arrow`,[I(`popover-arrow`,`${t}: calc(max(${a}, ${o}) ${i?`+`:`-`} var(--v-offset-${n?`left`:`top`}));`)])])])})})]);function na(e){return[`top`,`bottom`].includes(e.split(`-`)[0])?`var(--n-arrow-offset)`:`var(--n-arrow-offset-vertical)`}function $(e,n){let r=e.split(`-`)[0],i=[`top`,`bottom`].includes(r)?`height: var(--n-space-arrow);`:`width: var(--n-space-arrow);`;return V(`[v-placement="${e}"] >`,[I(`popover-shared`,`
  234. margin-${ea[r]}: var(--n-space);
  235. `,[J(`show-arrow`,`
  236. margin-${ea[r]}: var(--n-space-arrow);
  237. `),J(`overlap`,`
  238. margin: 0;
  239. `),t(`popover-arrow-wrapper`,`
  240. right: 0;
  241. left: 0;
  242. top: 0;
  243. bottom: 0;
  244. ${r}: 100%;
  245. ${ea[r]}: auto;
  246. ${i}
  247. `,[I(`popover-arrow`,n)])])])}var ra=Object.assign(Object.assign({},W.props),{to:Tt.propTo,show:Boolean,trigger:String,showArrow:Boolean,delay:Number,duration:Number,raw:Boolean,arrowPointToCenter:Boolean,arrowClass:String,arrowStyle:[String,Object],arrowWrapperClass:String,arrowWrapperStyle:[String,Object],displayDirective:String,x:Number,y:Number,flip:Boolean,overlap:Boolean,placement:String,width:[Number,String],keepAliveOnHover:Boolean,scrollable:Boolean,contentClass:String,contentStyle:[Object,String],headerClass:String,headerStyle:[Object,String],footerClass:String,footerStyle:[Object,String],internalDeactivateImmediately:Boolean,animated:Boolean,onClickoutside:Function,internalTrapFocus:Boolean,internalOnAfterLeave:Function,minWidth:Number,maxWidth:Number});function ia({arrowClass:e,arrowStyle:t,arrowWrapperClass:n,arrowWrapperStyle:r,clsPrefix:i}){return M(`div`,{key:`__popover-arrow__`,style:r,class:[`${i}-popover-arrow-wrapper`,n]},M(`div`,{class:[`${i}-popover-arrow`,e],style:t}))}var aa=u({name:`PopoverBody`,inheritAttrs:!1,props:ra,setup(e,{slots:t,attrs:r}){let{namespaceRef:i,mergedClsPrefixRef:a,inlineThemeDisabled:o,mergedRtlRef:c}=Pe(e),l=W(`Popover`,`-popover`,ta,$i,e,a),u=D(`Popover`,c,a),f=B(null),p=G(`NPopover`),m=B(null),g=B(e.show),_=B(!1);ie(()=>{let{show:t}=e;t&&!hn()&&!e.internalDeactivateImmediately&&(_.value=!0)});let y=Y(()=>{let{trigger:t,onClickoutside:n}=e,r=[],{positionManuallyRef:{value:i}}=p;return i||(t===`click`&&!n&&r.push([qe,O,void 0,{capture:!0}]),t===`hover`&&r.push([It,E])),n&&r.push([qe,O,void 0,{capture:!0}]),(e.displayDirective===`show`||e.animated&&_.value)&&r.push([_e,e.show]),r}),b=Y(()=>{let{common:{cubicBezierEaseInOut:e,cubicBezierEaseIn:t,cubicBezierEaseOut:n},self:{space:r,spaceArrow:i,padding:a,fontSize:o,textColor:s,dividerColor:c,color:u,boxShadow:d,borderRadius:f,arrowHeight:p,arrowOffset:m,arrowOffsetVertical:h}}=l.value;return{"--n-box-shadow":d,"--n-bezier":e,"--n-bezier-ease-in":t,"--n-bezier-ease-out":n,"--n-font-size":o,"--n-text-color":s,"--n-color":u,"--n-divider-color":c,"--n-border-radius":f,"--n-arrow-height":p,"--n-arrow-offset":m,"--n-arrow-offset-vertical":h,"--n-padding":a,"--n-space":r,"--n-space-arrow":i}}),x=Y(()=>{let t=e.width===`trigger`?void 0:at(e.width),n=[];t&&n.push({width:t});let{maxWidth:r,minWidth:i}=e;return r&&n.push({maxWidth:at(r)}),i&&n.push({maxWidth:at(i)}),o||n.push(b.value),n}),S=o?me(`popover`,void 0,b,e):void 0;p.setBodyInstance({syncPosition:C}),P(()=>{p.setBodyInstance(null)}),v(U(e,`show`),t=>{e.animated||(t?g.value=!0:g.value=!1)});function C(){var e;(e=f.value)==null||e.syncPosition()}function w(t){e.trigger===`hover`&&e.keepAliveOnHover&&e.show&&p.handleMouseEnter(t)}function T(t){e.trigger===`hover`&&e.keepAliveOnHover&&p.handleMouseLeave(t)}function E(t){e.trigger===`hover`&&!k().contains(ue(t))&&p.handleMouseMoveOutside(t)}function O(t){(e.trigger===`click`&&!k().contains(ue(t))||e.onClickoutside)&&p.handleClickOutside(t)}function k(){return p.getTriggerElement()}X(et,m),X(Ve,null),X(nt,null);function A(){if(S?.onRender(),!(e.displayDirective===`show`||e.show||e.animated&&_.value))return null;let i,o=p.internalRenderBodyRef.value,{value:c}=a;if(o)i=o([`${c}-popover-shared`,u?.value&&`${c}-popover--rtl`,S?.themeClass.value,e.overlap&&`${c}-popover-shared--overlap`,e.showArrow&&`${c}-popover-shared--show-arrow`,e.arrowPointToCenter&&`${c}-popover-shared--center-arrow`],m,x.value,w,T);else{let{value:a}=p.extraClassRef,{internalTrapFocus:o}=e,f=!s(t.header)||!s(t.footer),h=()=>{let n=f?M(be,null,d(t.header,t=>t?M(`div`,{class:[`${c}-popover__header`,e.headerClass],style:e.headerStyle},t):null),d(t.default,n=>n?M(`div`,{class:[`${c}-popover__content`,e.contentClass],style:e.contentStyle},t):null),d(t.footer,t=>t?M(`div`,{class:[`${c}-popover__footer`,e.footerClass],style:e.footerStyle},t):null)):e.scrollable?t.default?.call(t):M(`div`,{class:[`${c}-popover__content`,e.contentClass],style:e.contentStyle},t);return[e.scrollable?M(fe,{themeOverrides:l.value.peerOverrides.Scrollbar,theme:l.value.peers.Scrollbar,contentClass:f?void 0:`${c}-popover__content ${e.contentClass??``}`,contentStyle:f?void 0:e.contentStyle},{default:()=>n}):n,e.showArrow?ia({arrowClass:e.arrowClass,arrowStyle:e.arrowStyle,arrowWrapperClass:e.arrowWrapperClass,arrowWrapperStyle:e.arrowWrapperStyle,clsPrefix:c}):null]};i=M(`div`,n({class:[`${c}-popover`,`${c}-popover-shared`,u?.value&&`${c}-popover--rtl`,S?.themeClass.value,a.map(e=>`${c}-${e}`),{[`${c}-popover--scrollable`]:e.scrollable,[`${c}-popover--show-header-or-footer`]:f,[`${c}-popover--raw`]:e.raw,[`${c}-popover-shared--overlap`]:e.overlap,[`${c}-popover-shared--show-arrow`]:e.showArrow,[`${c}-popover-shared--center-arrow`]:e.arrowPointToCenter}],ref:m,style:x.value,onKeydown:p.handleKeydown,onMouseenter:w,onMouseleave:T},r),o?M(Ge,{active:e.show,autoFocus:!0},{default:h}):h())}return h(i,y.value)}return{displayed:_,namespace:i,isMounted:p.isMountedRef,zIndex:p.zIndexRef,followerRef:f,adjustedTo:Tt(e),followerEnabled:g,renderContentNode:A}},render(){return M($t,{ref:`followerRef`,zIndex:this.zIndex,show:this.show,enabled:this.followerEnabled,to:this.adjustedTo,x:this.x,y:this.y,flip:this.flip,placement:this.placement,containerClass:this.namespace,overlap:this.overlap,width:this.width===`trigger`?`target`:void 0,teleportDisabled:this.adjustedTo===Tt.tdkey},{default:()=>this.animated?M(je,{name:`popover-transition`,appear:this.isMounted,onEnter:()=>{this.followerEnabled=!0},onAfterLeave:()=>{var e;(e=this.internalOnAfterLeave)==null||e.call(this),this.followerEnabled=!1,this.displayed=!1}},{default:this.renderContentNode}):this.renderContentNode()})}}),oa=Object.keys(ra),sa={focus:[`onFocus`,`onBlur`],click:[`onClick`],hover:[`onMouseenter`,`onMouseleave`],manual:[],nested:[`onFocus`,`onBlur`,`onMouseenter`,`onMouseleave`,`onClick`]};function ca(e,t,n){sa[t].forEach(t=>{e.props?e.props=Object.assign({},e.props):e.props={};let r=e.props[t],i=n[t];r?e.props[t]=(...e)=>{r(...e),i(...e)}:e.props[t]=i})}var la={show:{type:Boolean,default:void 0},defaultShow:Boolean,showArrow:{type:Boolean,default:!0},trigger:{type:String,default:`hover`},delay:{type:Number,default:100},duration:{type:Number,default:100},raw:Boolean,placement:{type:String,default:`top`},x:Number,y:Number,arrowPointToCenter:Boolean,disabled:Boolean,getDisabled:Function,displayDirective:{type:String,default:`if`},arrowClass:String,arrowStyle:[String,Object],arrowWrapperClass:String,arrowWrapperStyle:[String,Object],flip:{type:Boolean,default:!0},animated:{type:Boolean,default:!0},width:{type:[Number,String],default:void 0},overlap:Boolean,keepAliveOnHover:{type:Boolean,default:!0},zIndex:Number,to:Tt.propTo,scrollable:Boolean,contentClass:String,contentStyle:[Object,String],headerClass:String,headerStyle:[Object,String],footerClass:String,footerStyle:[Object,String],onClickoutside:Function,"onUpdate:show":[Function,Array],onUpdateShow:[Function,Array],internalDeactivateImmediately:Boolean,internalSyncTargetWithParent:Boolean,internalInheritedEventHandlers:{type:Array,default:()=>[]},internalTrapFocus:Boolean,internalExtraClass:{type:Array,default:()=>[]},onShow:[Function,Array],onHide:[Function,Array],arrow:{type:Boolean,default:void 0},minWidth:Number,maxWidth:Number},ua=u({name:`Popover`,inheritAttrs:!1,props:Object.assign(Object.assign(Object.assign({},W.props),la),{internalOnAfterLeave:Function,internalRenderBody:Function}),slots:Object,__popover__:!0,setup(e){let t=ne(),n=B(null),r=Y(()=>e.show),i=B(e.defaultShow),a=st(r,i),o=Z(()=>e.disabled?!1:a.value),s=()=>{if(e.disabled)return!0;let{getDisabled:t}=e;return!!t?.()},c=()=>s()?!1:a.value,l=lt(e,[`arrow`,`showArrow`]),u=Y(()=>e.overlap?!1:l.value),d=null,f=B(null),p=B(null),m=Z(()=>e.x!==void 0&&e.y!==void 0);function h(t){let{"onUpdate:show":n,onUpdateShow:r,onShow:a,onHide:o}=e;i.value=t,n&&N(n,t),r&&N(r,t),t&&a&&N(a,!0),t&&o&&N(o,!1)}function g(){d&&d.syncPosition()}function _(){let{value:e}=f;e&&(window.clearTimeout(e),f.value=null)}function v(){let{value:e}=p;e&&(window.clearTimeout(e),p.value=null)}function y(){let t=s();if(e.trigger===`focus`&&!t){if(c())return;h(!0)}}function b(){let t=s();if(e.trigger===`focus`&&!t){if(!c())return;h(!1)}}function x(){let t=s();if(e.trigger===`hover`&&!t){if(v(),f.value!==null||c())return;let t=()=>{h(!0),f.value=null},{delay:n}=e;n===0?t():f.value=window.setTimeout(t,n)}}function S(){let t=s();if(e.trigger===`hover`&&!t){if(_(),p.value!==null||!c())return;let t=()=>{h(!1),p.value=null},{duration:n}=e;n===0?t():p.value=window.setTimeout(t,n)}}function C(){S()}function w(t){var n;c()&&(e.trigger===`click`&&(_(),v(),h(!1)),(n=e.onClickoutside)==null||n.call(e,t))}function T(){e.trigger===`click`&&!s()&&(_(),v(),h(!c()))}function E(t){e.internalTrapFocus&&t.key===`Escape`&&(_(),v(),h(!1))}function D(e){i.value=e}function O(){return n.value?.targetRef}function k(e){d=e}return X(`NPopover`,{getTriggerElement:O,handleKeydown:E,handleMouseEnter:x,handleMouseLeave:S,handleClickOutside:w,handleMouseMoveOutside:C,setBodyInstance:k,positionManuallyRef:m,isMountedRef:t,zIndexRef:U(e,`zIndex`),extraClassRef:U(e,`internalExtraClass`),internalRenderBodyRef:U(e,`internalRenderBody`)}),ie(()=>{a.value&&s()&&h(!1)}),{binderInstRef:n,positionManually:m,mergedShowConsideringDisabledProp:o,uncontrolledShow:i,mergedShowArrow:u,getMergedShow:c,setShow:D,handleClick:T,handleMouseEnter:x,handleMouseLeave:S,handleFocus:y,handleBlur:b,syncPosition:g}},render(){let{positionManually:e,$slots:t}=this,n,r=!1;if(!e&&(n=$e(t,`trigger`),n)){n=Ne(n),n=n.type===pe?M(`span`,[n]):n;let t={onClick:this.handleClick,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onFocus:this.handleFocus,onBlur:this.handleBlur};if(n.type?.__popover__)r=!0,n.props||={internalSyncTargetWithParent:!0,internalInheritedEventHandlers:[]},n.props.internalSyncTargetWithParent=!0,n.props.internalInheritedEventHandlers?n.props.internalInheritedEventHandlers=[t,...n.props.internalInheritedEventHandlers]:n.props.internalInheritedEventHandlers=[t];else{let{internalInheritedEventHandlers:r}=this,i=[t,...r];ca(n,r?`nested`:e?`manual`:this.trigger,{onBlur:e=>{i.forEach(t=>{t.onBlur(e)})},onFocus:e=>{i.forEach(t=>{t.onFocus(e)})},onClick:e=>{i.forEach(t=>{t.onClick(e)})},onMouseenter:e=>{i.forEach(t=>{t.onMouseenter(e)})},onMouseleave:e=>{i.forEach(t=>{t.onMouseleave(e)})}})}}return M(Nt,{ref:`binderInstRef`,syncTarget:!r,syncTargetWithParent:this.internalSyncTargetWithParent},{default:()=>{this.mergedShowConsideringDisabledProp;let t=this.getMergedShow();return[this.internalTrapFocus&&t?h(M(`div`,{style:{position:`fixed`,top:0,right:0,bottom:0,left:0}}),[[Ye,{enabled:t,zIndex:this.zIndex}]]):null,e?null:M(Pt,null,{default:()=>n}),M(aa,Xe(this.$props,oa,Object.assign(Object.assign({},this.$attrs),{showArrow:this.mergedShowArrow,show:t})),{default:()=>{var e;return(e=this.$slots).default?.call(e)},header:()=>{var e;return(e=this.$slots).header?.call(e)},footer:()=>{var e;return(e=this.$slots).footer?.call(e)}})]}})}}),da={closeIconSizeTiny:`12px`,closeIconSizeSmall:`12px`,closeIconSizeMedium:`14px`,closeIconSizeLarge:`14px`,closeSizeTiny:`16px`,closeSizeSmall:`16px`,closeSizeMedium:`18px`,closeSizeLarge:`18px`,padding:`0 7px`,closeMargin:`0 0 0 4px`};function fa(e){let{textColor2:t,primaryColorHover:n,primaryColorPressed:r,primaryColor:i,infoColor:a,successColor:o,warningColor:s,errorColor:c,baseColor:l,borderColor:u,opacityDisabled:d,tagColor:f,closeIconColor:p,closeIconColorHover:m,closeIconColorPressed:h,borderRadiusSmall:g,fontSizeMini:_,fontSizeTiny:v,fontSizeSmall:y,fontSizeMedium:b,heightMini:x,heightTiny:S,heightSmall:C,heightMedium:w,closeColorHover:T,closeColorPressed:E,buttonColor2Hover:D,buttonColor2Pressed:O,fontWeightStrong:k}=e;return Object.assign(Object.assign({},da),{closeBorderRadius:g,heightTiny:x,heightSmall:S,heightMedium:C,heightLarge:w,borderRadius:g,opacityDisabled:d,fontSizeTiny:_,fontSizeSmall:v,fontSizeMedium:y,fontSizeLarge:b,fontWeightStrong:k,textColorCheckable:t,textColorHoverCheckable:t,textColorPressedCheckable:t,textColorChecked:l,colorCheckable:`#0000`,colorHoverCheckable:D,colorPressedCheckable:O,colorChecked:i,colorCheckedHover:n,colorCheckedPressed:r,border:`1px solid ${u}`,textColor:t,color:f,colorBordered:`rgb(250, 250, 252)`,closeIconColor:p,closeIconColorHover:m,closeIconColorPressed:h,closeColorHover:T,closeColorPressed:E,borderPrimary:`1px solid ${R(i,{alpha:.3})}`,textColorPrimary:i,colorPrimary:R(i,{alpha:.12}),colorBorderedPrimary:R(i,{alpha:.1}),closeIconColorPrimary:i,closeIconColorHoverPrimary:i,closeIconColorPressedPrimary:i,closeColorHoverPrimary:R(i,{alpha:.12}),closeColorPressedPrimary:R(i,{alpha:.18}),borderInfo:`1px solid ${R(a,{alpha:.3})}`,textColorInfo:a,colorInfo:R(a,{alpha:.12}),colorBorderedInfo:R(a,{alpha:.1}),closeIconColorInfo:a,closeIconColorHoverInfo:a,closeIconColorPressedInfo:a,closeColorHoverInfo:R(a,{alpha:.12}),closeColorPressedInfo:R(a,{alpha:.18}),borderSuccess:`1px solid ${R(o,{alpha:.3})}`,textColorSuccess:o,colorSuccess:R(o,{alpha:.12}),colorBorderedSuccess:R(o,{alpha:.1}),closeIconColorSuccess:o,closeIconColorHoverSuccess:o,closeIconColorPressedSuccess:o,closeColorHoverSuccess:R(o,{alpha:.12}),closeColorPressedSuccess:R(o,{alpha:.18}),borderWarning:`1px solid ${R(s,{alpha:.35})}`,textColorWarning:s,colorWarning:R(s,{alpha:.15}),colorBorderedWarning:R(s,{alpha:.12}),closeIconColorWarning:s,closeIconColorHoverWarning:s,closeIconColorPressedWarning:s,closeColorHoverWarning:R(s,{alpha:.12}),closeColorPressedWarning:R(s,{alpha:.18}),borderError:`1px solid ${R(c,{alpha:.23})}`,textColorError:c,colorError:R(c,{alpha:.1}),colorBorderedError:R(c,{alpha:.08}),closeIconColorError:c,closeIconColorHoverError:c,closeIconColorPressedError:c,closeColorHoverError:R(c,{alpha:.12}),closeColorPressedError:R(c,{alpha:.18})})}var pa={name:`Tag`,common:Re,self:fa},ma={color:Object,type:{type:String,default:`default`},round:Boolean,size:String,closable:Boolean,disabled:{type:Boolean,default:void 0}},ha=I(`tag`,`
  248. --n-close-margin: var(--n-close-margin-top) var(--n-close-margin-right) var(--n-close-margin-bottom) var(--n-close-margin-left);
  249. white-space: nowrap;
  250. position: relative;
  251. box-sizing: border-box;
  252. cursor: default;
  253. display: inline-flex;
  254. align-items: center;
  255. flex-wrap: nowrap;
  256. padding: var(--n-padding);
  257. border-radius: var(--n-border-radius);
  258. color: var(--n-text-color);
  259. background-color: var(--n-color);
  260. transition:
  261. border-color .3s var(--n-bezier),
  262. background-color .3s var(--n-bezier),
  263. color .3s var(--n-bezier),
  264. box-shadow .3s var(--n-bezier),
  265. opacity .3s var(--n-bezier);
  266. line-height: 1;
  267. height: var(--n-height);
  268. font-size: var(--n-font-size);
  269. `,[J(`strong`,`
  270. font-weight: var(--n-font-weight-strong);
  271. `),H(`border`,`
  272. pointer-events: none;
  273. position: absolute;
  274. left: 0;
  275. right: 0;
  276. top: 0;
  277. bottom: 0;
  278. border-radius: inherit;
  279. border: var(--n-border);
  280. transition: border-color .3s var(--n-bezier);
  281. `),H(`icon`,`
  282. display: flex;
  283. margin: 0 4px 0 0;
  284. color: var(--n-text-color);
  285. transition: color .3s var(--n-bezier);
  286. font-size: var(--n-avatar-size-override);
  287. `),H(`avatar`,`
  288. display: flex;
  289. margin: 0 6px 0 0;
  290. `),H(`close`,`
  291. margin: var(--n-close-margin);
  292. transition:
  293. background-color .3s var(--n-bezier),
  294. color .3s var(--n-bezier);
  295. `),J(`round`,`
  296. padding: 0 calc(var(--n-height) / 3);
  297. border-radius: calc(var(--n-height) / 2);
  298. `,[H(`icon`,`
  299. margin: 0 4px 0 calc((var(--n-height) - 8px) / -2);
  300. `),H(`avatar`,`
  301. margin: 0 6px 0 calc((var(--n-height) - 8px) / -2);
  302. `),J(`closable`,`
  303. padding: 0 calc(var(--n-height) / 4) 0 calc(var(--n-height) / 3);
  304. `)]),J(`icon, avatar`,[J(`round`,`
  305. padding: 0 calc(var(--n-height) / 3) 0 calc(var(--n-height) / 2);
  306. `)]),J(`disabled`,`
  307. cursor: not-allowed !important;
  308. opacity: var(--n-opacity-disabled);
  309. `),J(`checkable`,`
  310. cursor: pointer;
  311. box-shadow: none;
  312. color: var(--n-text-color-checkable);
  313. background-color: var(--n-color-checkable);
  314. `,[K(`disabled`,[V(`&:hover`,`background-color: var(--n-color-hover-checkable);`,[K(`checked`,`color: var(--n-text-color-hover-checkable);`)]),V(`&:active`,`background-color: var(--n-color-pressed-checkable);`,[K(`checked`,`color: var(--n-text-color-pressed-checkable);`)])]),J(`checked`,`
  315. color: var(--n-text-color-checked);
  316. background-color: var(--n-color-checked);
  317. `,[K(`disabled`,[V(`&:hover`,`background-color: var(--n-color-checked-hover);`),V(`&:active`,`background-color: var(--n-color-checked-pressed);`)])])])]),ga=Object.assign(Object.assign(Object.assign({},W.props),ma),{bordered:{type:Boolean,default:void 0},checked:Boolean,checkable:Boolean,strong:Boolean,triggerClickOnClose:Boolean,onClose:[Array,Function],onMouseenter:Function,onMouseleave:Function,"onUpdate:checked":Function,onUpdateChecked:Function,internalCloseFocusable:{type:Boolean,default:!0},internalCloseIsButtonTag:{type:Boolean,default:!0},onCheckedChange:Function}),_a=E(`n-tag`),va=u({name:`Tag`,props:ga,slots:Object,setup(e){let t=B(null),{mergedBorderedRef:n,mergedClsPrefixRef:r,inlineThemeDisabled:i,mergedRtlRef:a,mergedComponentPropsRef:o}=Pe(e),s=Y(()=>e.size||o?.value?.Tag?.size||`medium`),c=W(`Tag`,`-tag`,ha,pa,e,r);X(_a,{roundRef:U(e,`round`)});function l(){if(!e.disabled&&e.checkable){let{checked:t,onCheckedChange:n,onUpdateChecked:r,"onUpdate:checked":i}=e;r&&r(!t),i&&i(!t),n&&n(!t)}}function u(t){if(e.triggerClickOnClose||t.stopPropagation(),!e.disabled){let{onClose:n}=e;n&&N(n,t)}}let d={setTextContent(e){let{value:n}=t;n&&(n.textContent=e)}},f=D(`Tag`,a,r),p=Y(()=>{let{type:t,color:{color:r,textColor:i}={}}=e,a=s.value,{common:{cubicBezierEaseInOut:o},self:{padding:l,closeMargin:u,borderRadius:d,opacityDisabled:f,textColorCheckable:p,textColorHoverCheckable:m,textColorPressedCheckable:h,textColorChecked:g,colorCheckable:_,colorHoverCheckable:v,colorPressedCheckable:y,colorChecked:b,colorCheckedHover:x,colorCheckedPressed:S,closeBorderRadius:C,fontWeightStrong:w,[q(`colorBordered`,t)]:T,[q(`closeSize`,a)]:E,[q(`closeIconSize`,a)]:D,[q(`fontSize`,a)]:O,[q(`height`,a)]:k,[q(`color`,t)]:A,[q(`textColor`,t)]:ee,[q(`border`,t)]:j,[q(`closeIconColor`,t)]:M,[q(`closeIconColorHover`,t)]:N,[q(`closeIconColorPressed`,t)]:P,[q(`closeColorHover`,t)]:te,[q(`closeColorPressed`,t)]:F}}=c.value,I=Oe(u);return{"--n-font-weight-strong":w,"--n-avatar-size-override":`calc(${k} - 8px)`,"--n-bezier":o,"--n-border-radius":d,"--n-border":j,"--n-close-icon-size":D,"--n-close-color-pressed":F,"--n-close-color-hover":te,"--n-close-border-radius":C,"--n-close-icon-color":M,"--n-close-icon-color-hover":N,"--n-close-icon-color-pressed":P,"--n-close-icon-color-disabled":M,"--n-close-margin-top":I.top,"--n-close-margin-right":I.right,"--n-close-margin-bottom":I.bottom,"--n-close-margin-left":I.left,"--n-close-size":E,"--n-color":r||(n.value?T:A),"--n-color-checkable":_,"--n-color-checked":b,"--n-color-checked-hover":x,"--n-color-checked-pressed":S,"--n-color-hover-checkable":v,"--n-color-pressed-checkable":y,"--n-font-size":O,"--n-height":k,"--n-opacity-disabled":f,"--n-padding":l,"--n-text-color":i||ee,"--n-text-color-checkable":p,"--n-text-color-checked":g,"--n-text-color-hover-checkable":m,"--n-text-color-pressed-checkable":h}}),m=i?me(`tag`,Y(()=>{let t=``,{type:r,color:{color:i,textColor:a}={}}=e;return t+=r[0],t+=s.value[0],i&&(t+=`a${Ce(i)}`),a&&(t+=`b${Ce(a)}`),n.value&&(t+=`c`),t}),p,e):void 0;return Object.assign(Object.assign({},d),{rtlEnabled:f,mergedClsPrefix:r,contentRef:t,mergedBordered:n,handleClick:l,handleCloseClick:u,cssVars:i?void 0:p,themeClass:m?.themeClass,onRender:m?.onRender})},render(){var e;let{mergedClsPrefix:t,rtlEnabled:n,closable:r,color:{borderColor:i}={},round:a,onRender:o,$slots:s}=this;o?.();let c=d(s.avatar,e=>e&&M(`div`,{class:`${t}-tag__avatar`},e)),l=d(s.icon,e=>e&&M(`div`,{class:`${t}-tag__icon`},e));return M(`div`,{class:[`${t}-tag`,this.themeClass,{[`${t}-tag--rtl`]:n,[`${t}-tag--strong`]:this.strong,[`${t}-tag--disabled`]:this.disabled,[`${t}-tag--checkable`]:this.checkable,[`${t}-tag--checked`]:this.checkable&&this.checked,[`${t}-tag--round`]:a,[`${t}-tag--avatar`]:c,[`${t}-tag--icon`]:l,[`${t}-tag--closable`]:r}],style:this.cssVars,onClick:this.handleClick,onMouseenter:this.onMouseenter,onMouseleave:this.onMouseleave},l||c,M(`span`,{class:`${t}-tag__content`,ref:`contentRef`},(e=this.$slots).default?.call(e)),!this.checkable&&r?M(Je,{clsPrefix:t,class:`${t}-tag__close`,disabled:this.disabled,onClick:this.handleCloseClick,focusable:this.internalCloseFocusable,round:a,isButtonTag:this.internalCloseIsButtonTag,absolute:!0}):null,!this.checkable&&this.mergedBordered?M(`div`,{class:`${t}-tag__border`,style:{borderColor:i}}):null)}}),ya={paddingSingle:`0 26px 0 12px`,paddingMultiple:`3px 26px 0 12px`,clearSize:`16px`,arrowSize:`16px`};function ba(e){let{borderRadius:t,textColor2:n,textColorDisabled:r,inputColor:i,inputColorDisabled:a,primaryColor:o,primaryColorHover:s,warningColor:c,warningColorHover:l,errorColor:u,errorColorHover:d,borderColor:f,iconColor:p,iconColorDisabled:m,clearColor:h,clearColorHover:g,clearColorPressed:_,placeholderColor:v,placeholderColorDisabled:y,fontSizeTiny:b,fontSizeSmall:x,fontSizeMedium:S,fontSizeLarge:C,heightTiny:w,heightSmall:T,heightMedium:E,heightLarge:D,fontWeight:O}=e;return Object.assign(Object.assign({},ya),{fontSizeTiny:b,fontSizeSmall:x,fontSizeMedium:S,fontSizeLarge:C,heightTiny:w,heightSmall:T,heightMedium:E,heightLarge:D,borderRadius:t,fontWeight:O,textColor:n,textColorDisabled:r,placeholderColor:v,placeholderColorDisabled:y,color:i,colorDisabled:a,colorActive:i,border:`1px solid ${f}`,borderHover:`1px solid ${s}`,borderActive:`1px solid ${o}`,borderFocus:`1px solid ${s}`,boxShadowHover:`none`,boxShadowActive:`0 0 0 2px ${R(o,{alpha:.2})}`,boxShadowFocus:`0 0 0 2px ${R(o,{alpha:.2})}`,caretColor:o,arrowColor:p,arrowColorDisabled:m,loadingColor:o,borderWarning:`1px solid ${c}`,borderHoverWarning:`1px solid ${l}`,borderActiveWarning:`1px solid ${c}`,borderFocusWarning:`1px solid ${l}`,boxShadowHoverWarning:`none`,boxShadowActiveWarning:`0 0 0 2px ${R(c,{alpha:.2})}`,boxShadowFocusWarning:`0 0 0 2px ${R(c,{alpha:.2})}`,colorActiveWarning:i,caretColorWarning:c,borderError:`1px solid ${u}`,borderHoverError:`1px solid ${d}`,borderActiveError:`1px solid ${u}`,borderFocusError:`1px solid ${d}`,boxShadowHoverError:`none`,boxShadowActiveError:`0 0 0 2px ${R(u,{alpha:.2})}`,boxShadowFocusError:`0 0 0 2px ${R(u,{alpha:.2})}`,colorActiveError:i,caretColorError:u,clearColor:h,clearColorHover:g,clearColorPressed:_})}var xa=j({name:`InternalSelection`,common:Re,peers:{Popover:$i},self:ba}),Sa=V([I(`base-selection`,`
  318. --n-padding-single: var(--n-padding-single-top) var(--n-padding-single-right) var(--n-padding-single-bottom) var(--n-padding-single-left);
  319. --n-padding-multiple: var(--n-padding-multiple-top) var(--n-padding-multiple-right) var(--n-padding-multiple-bottom) var(--n-padding-multiple-left);
  320. position: relative;
  321. z-index: auto;
  322. box-shadow: none;
  323. width: 100%;
  324. max-width: 100%;
  325. display: inline-block;
  326. vertical-align: bottom;
  327. border-radius: var(--n-border-radius);
  328. min-height: var(--n-height);
  329. line-height: 1.5;
  330. font-size: var(--n-font-size);
  331. `,[I(`base-loading`,`
  332. color: var(--n-loading-color);
  333. `),I(`base-selection-tags`,`min-height: var(--n-height);`),H(`border, state-border`,`
  334. position: absolute;
  335. left: 0;
  336. right: 0;
  337. top: 0;
  338. bottom: 0;
  339. pointer-events: none;
  340. border: var(--n-border);
  341. border-radius: inherit;
  342. transition:
  343. box-shadow .3s var(--n-bezier),
  344. border-color .3s var(--n-bezier);
  345. `),H(`state-border`,`
  346. z-index: 1;
  347. border-color: #0000;
  348. `),I(`base-suffix`,`
  349. cursor: pointer;
  350. position: absolute;
  351. top: 50%;
  352. transform: translateY(-50%);
  353. right: 10px;
  354. `,[H(`arrow`,`
  355. font-size: var(--n-arrow-size);
  356. color: var(--n-arrow-color);
  357. transition: color .3s var(--n-bezier);
  358. `)]),I(`base-selection-overlay`,`
  359. display: flex;
  360. align-items: center;
  361. white-space: nowrap;
  362. pointer-events: none;
  363. position: absolute;
  364. top: 0;
  365. right: 0;
  366. bottom: 0;
  367. left: 0;
  368. padding: var(--n-padding-single);
  369. transition: color .3s var(--n-bezier);
  370. `,[H(`wrapper`,`
  371. flex-basis: 0;
  372. flex-grow: 1;
  373. overflow: hidden;
  374. text-overflow: ellipsis;
  375. `)]),I(`base-selection-placeholder`,`
  376. color: var(--n-placeholder-color);
  377. `,[H(`inner`,`
  378. max-width: 100%;
  379. overflow: hidden;
  380. `)]),I(`base-selection-tags`,`
  381. cursor: pointer;
  382. outline: none;
  383. box-sizing: border-box;
  384. position: relative;
  385. z-index: auto;
  386. display: flex;
  387. padding: var(--n-padding-multiple);
  388. flex-wrap: wrap;
  389. align-items: center;
  390. width: 100%;
  391. vertical-align: bottom;
  392. background-color: var(--n-color);
  393. border-radius: inherit;
  394. transition:
  395. color .3s var(--n-bezier),
  396. box-shadow .3s var(--n-bezier),
  397. background-color .3s var(--n-bezier);
  398. `),I(`base-selection-label`,`
  399. height: var(--n-height);
  400. display: inline-flex;
  401. width: 100%;
  402. vertical-align: bottom;
  403. cursor: pointer;
  404. outline: none;
  405. z-index: auto;
  406. box-sizing: border-box;
  407. position: relative;
  408. transition:
  409. color .3s var(--n-bezier),
  410. box-shadow .3s var(--n-bezier),
  411. background-color .3s var(--n-bezier);
  412. border-radius: inherit;
  413. background-color: var(--n-color);
  414. align-items: center;
  415. `,[I(`base-selection-input`,`
  416. font-size: inherit;
  417. line-height: inherit;
  418. outline: none;
  419. cursor: pointer;
  420. box-sizing: border-box;
  421. border:none;
  422. width: 100%;
  423. padding: var(--n-padding-single);
  424. background-color: #0000;
  425. color: var(--n-text-color);
  426. transition: color .3s var(--n-bezier);
  427. caret-color: var(--n-caret-color);
  428. `,[H(`content`,`
  429. text-overflow: ellipsis;
  430. overflow: hidden;
  431. white-space: nowrap;
  432. `)]),H(`render-label`,`
  433. color: var(--n-text-color);
  434. `)]),K(`disabled`,[V(`&:hover`,[H(`state-border`,`
  435. box-shadow: var(--n-box-shadow-hover);
  436. border: var(--n-border-hover);
  437. `)]),J(`focus`,[H(`state-border`,`
  438. box-shadow: var(--n-box-shadow-focus);
  439. border: var(--n-border-focus);
  440. `)]),J(`active`,[H(`state-border`,`
  441. box-shadow: var(--n-box-shadow-active);
  442. border: var(--n-border-active);
  443. `),I(`base-selection-label`,`background-color: var(--n-color-active);`),I(`base-selection-tags`,`background-color: var(--n-color-active);`)])]),J(`disabled`,`cursor: not-allowed;`,[H(`arrow`,`
  444. color: var(--n-arrow-color-disabled);
  445. `),I(`base-selection-label`,`
  446. cursor: not-allowed;
  447. background-color: var(--n-color-disabled);
  448. `,[I(`base-selection-input`,`
  449. cursor: not-allowed;
  450. color: var(--n-text-color-disabled);
  451. `),H(`render-label`,`
  452. color: var(--n-text-color-disabled);
  453. `)]),I(`base-selection-tags`,`
  454. cursor: not-allowed;
  455. background-color: var(--n-color-disabled);
  456. `),I(`base-selection-placeholder`,`
  457. cursor: not-allowed;
  458. color: var(--n-placeholder-color-disabled);
  459. `)]),I(`base-selection-input-tag`,`
  460. height: calc(var(--n-height) - 6px);
  461. line-height: calc(var(--n-height) - 6px);
  462. outline: none;
  463. display: none;
  464. position: relative;
  465. margin-bottom: 3px;
  466. max-width: 100%;
  467. vertical-align: bottom;
  468. `,[H(`input`,`
  469. font-size: inherit;
  470. font-family: inherit;
  471. min-width: 1px;
  472. padding: 0;
  473. background-color: #0000;
  474. outline: none;
  475. border: none;
  476. max-width: 100%;
  477. overflow: hidden;
  478. width: 1em;
  479. line-height: inherit;
  480. cursor: pointer;
  481. color: var(--n-text-color);
  482. caret-color: var(--n-caret-color);
  483. `),H(`mirror`,`
  484. position: absolute;
  485. left: 0;
  486. top: 0;
  487. white-space: pre;
  488. visibility: hidden;
  489. user-select: none;
  490. -webkit-user-select: none;
  491. opacity: 0;
  492. `)]),[`warning`,`error`].map(e=>J(`${e}-status`,[H(`state-border`,`border: var(--n-border-${e});`),K(`disabled`,[V(`&:hover`,[H(`state-border`,`
  493. box-shadow: var(--n-box-shadow-hover-${e});
  494. border: var(--n-border-hover-${e});
  495. `)]),J(`active`,[H(`state-border`,`
  496. box-shadow: var(--n-box-shadow-active-${e});
  497. border: var(--n-border-active-${e});
  498. `),I(`base-selection-label`,`background-color: var(--n-color-active-${e});`),I(`base-selection-tags`,`background-color: var(--n-color-active-${e});`)]),J(`focus`,[H(`state-border`,`
  499. box-shadow: var(--n-box-shadow-focus-${e});
  500. border: var(--n-border-focus-${e});
  501. `)])])]))]),I(`base-selection-popover`,`
  502. margin-bottom: -3px;
  503. display: flex;
  504. flex-wrap: wrap;
  505. margin-right: -8px;
  506. `),I(`base-selection-tag-wrapper`,`
  507. max-width: 100%;
  508. display: inline-flex;
  509. padding: 0 7px 3px 0;
  510. `,[V(`&:last-child`,`padding-right: 0;`),I(`tag`,`
  511. font-size: 14px;
  512. max-width: 100%;
  513. `,[H(`content`,`
  514. line-height: 1.25;
  515. text-overflow: ellipsis;
  516. overflow: hidden;
  517. `)])])]),Ca=u({name:`InternalSelection`,props:Object.assign(Object.assign({},W.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],ellipsisTagPopoverProps:Object,onClear:Function,onPatternInput:Function,onPatternFocus:Function,onPatternBlur:Function,renderLabel:Function,status:String,inlineThemeDisabled:Boolean,ignoreComposition:{type:Boolean,default:!0},onResize:Function}),setup(e){let{mergedClsPrefixRef:t,mergedRtlRef:n}=Pe(e),r=D(`InternalSelection`,n,t),i=B(null),a=B(null),o=B(null),s=B(null),c=B(null),l=B(null),u=B(null),d=B(null),f=B(null),p=B(null),m=B(!1),h=B(!1),g=B(!1),_=W(`InternalSelection`,`-internal-selection`,Sa,xa,e,U(e,`clsPrefix`)),y=Y(()=>e.clearable&&!e.disabled&&(g.value||e.active)),x=Y(()=>e.selectedOption?e.renderTag?e.renderTag({option:e.selectedOption,handleClose:()=>{}}):e.renderLabel?e.renderLabel(e.selectedOption,!0):Ue(e.selectedOption[e.labelField],e.selectedOption,!0):e.placeholder),S=Y(()=>{let t=e.selectedOption;if(t)return t[e.labelField]}),C=Y(()=>e.multiple?!!(Array.isArray(e.selectedOptions)&&e.selectedOptions.length):e.selectedOption!==null);function w(){var t;let{value:n}=i;if(n){let{value:r}=a;r&&(r.style.width=`${n.offsetWidth}px`,e.maxTagCount!==`responsive`&&((t=f.value)==null||t.sync({showAllItemsBeforeCalculate:!1})))}}function T(){let{value:e}=p;e&&(e.style.display=`none`)}function E(){let{value:e}=p;e&&(e.style.display=`inline-block`)}v(U(e,`active`),e=>{e||T()}),v(U(e,`pattern`),()=>{e.multiple&&Se(w)});function O(t){let{onFocus:n}=e;n&&n(t)}function k(t){let{onBlur:n}=e;n&&n(t)}function A(t){let{onDeleteOption:n}=e;n&&n(t)}function ee(t){let{onClear:n}=e;n&&n(t)}function j(t){let{onPatternInput:n}=e;n&&n(t)}function M(e){(!e.relatedTarget||!o.value?.contains(e.relatedTarget))&&O(e)}function N(e){o.value?.contains(e.relatedTarget)||k(e)}function P(e){ee(e)}function te(){g.value=!0}function F(){g.value=!1}function I(t){!e.active||!e.filterable||t.target!==a.value&&t.preventDefault()}function ne(e){A(e)}let re=B(!1);function ae(t){if(t.key===`Backspace`&&!re.value&&!e.pattern.length){let{selectedOptions:t}=e;t?.length&&ne(t[t.length-1])}}let L=null;function oe(t){let{value:n}=i;n&&(n.textContent=t.target.value,w()),e.ignoreComposition&&re.value?L=t:j(t)}function R(){re.value=!0}function se(){re.value=!1,e.ignoreComposition&&j(L),L=null}function ce(t){var n;h.value=!0,(n=e.onPatternFocus)==null||n.call(e,t)}function z(t){var n;h.value=!1,(n=e.onPatternBlur)==null||n.call(e,t)}function le(){var t,n;if(e.filterable)h.value=!1,(t=l.value)==null||t.blur(),(n=a.value)==null||n.blur();else if(e.multiple){let{value:e}=s;e?.blur()}else{let{value:e}=c;e?.blur()}}function ue(){var t,n,r;e.filterable?(h.value=!1,(t=l.value)==null||t.focus()):e.multiple?(n=s.value)==null||n.focus():(r=c.value)==null||r.focus()}function de(){let{value:e}=a;e&&(E(),e.focus())}function V(){let{value:e}=a;e&&e.blur()}function fe(e){let{value:t}=u;t&&t.setTextContent(`+${e}`)}function pe(){let{value:e}=d;return e}function he(){return a.value}let H=null;function ge(){H!==null&&window.clearTimeout(H)}function _e(){e.active||(ge(),H=window.setTimeout(()=>{C.value&&(m.value=!0)},100))}function ve(){ge()}function ye(e){e||(ge(),m.value=!1)}v(C,e=>{e||(m.value=!1)}),b(()=>{ie(()=>{let t=l.value;t&&(e.disabled?t.removeAttribute(`tabindex`):t.tabIndex=h.value?-1:0)})}),pn(o,e.onResize);let{inlineThemeDisabled:be}=e,xe=Y(()=>{let{size:t}=e,{common:{cubicBezierEaseInOut:n},self:{fontWeight:r,borderRadius:i,color:a,placeholderColor:o,textColor:s,paddingSingle:c,paddingMultiple:l,caretColor:u,colorDisabled:d,textColorDisabled:f,placeholderColorDisabled:p,colorActive:m,boxShadowFocus:h,boxShadowActive:g,boxShadowHover:v,border:y,borderFocus:b,borderHover:x,borderActive:S,arrowColor:C,arrowColorDisabled:w,loadingColor:T,colorActiveWarning:E,boxShadowFocusWarning:D,boxShadowActiveWarning:O,boxShadowHoverWarning:k,borderWarning:A,borderFocusWarning:ee,borderHoverWarning:j,borderActiveWarning:M,colorActiveError:N,boxShadowFocusError:P,boxShadowActiveError:te,boxShadowHoverError:F,borderError:I,borderFocusError:ne,borderHoverError:re,borderActiveError:ie,clearColor:ae,clearColorHover:L,clearColorPressed:oe,clearSize:R,arrowSize:se,[q(`height`,t)]:ce,[q(`fontSize`,t)]:z}}=_.value,le=Oe(c),ue=Oe(l);return{"--n-bezier":n,"--n-border":y,"--n-border-active":S,"--n-border-focus":b,"--n-border-hover":x,"--n-border-radius":i,"--n-box-shadow-active":g,"--n-box-shadow-focus":h,"--n-box-shadow-hover":v,"--n-caret-color":u,"--n-color":a,"--n-color-active":m,"--n-color-disabled":d,"--n-font-size":z,"--n-height":ce,"--n-padding-single-top":le.top,"--n-padding-multiple-top":ue.top,"--n-padding-single-right":le.right,"--n-padding-multiple-right":ue.right,"--n-padding-single-left":le.left,"--n-padding-multiple-left":ue.left,"--n-padding-single-bottom":le.bottom,"--n-padding-multiple-bottom":ue.bottom,"--n-placeholder-color":o,"--n-placeholder-color-disabled":p,"--n-text-color":s,"--n-text-color-disabled":f,"--n-arrow-color":C,"--n-arrow-color-disabled":w,"--n-loading-color":T,"--n-color-active-warning":E,"--n-box-shadow-focus-warning":D,"--n-box-shadow-active-warning":O,"--n-box-shadow-hover-warning":k,"--n-border-warning":A,"--n-border-focus-warning":ee,"--n-border-hover-warning":j,"--n-border-active-warning":M,"--n-color-active-error":N,"--n-box-shadow-focus-error":P,"--n-box-shadow-active-error":te,"--n-box-shadow-hover-error":F,"--n-border-error":I,"--n-border-focus-error":ne,"--n-border-hover-error":re,"--n-border-active-error":ie,"--n-clear-size":R,"--n-clear-color":ae,"--n-clear-color-hover":L,"--n-clear-color-pressed":oe,"--n-arrow-size":se,"--n-font-weight":r}}),Ce=be?me(`internal-selection`,Y(()=>e.size[0]),xe,e):void 0;return{mergedTheme:_,mergedClearable:y,mergedClsPrefix:t,rtlEnabled:r,patternInputFocused:h,filterablePlaceholder:x,label:S,selected:C,showTagsPanel:m,isComposing:re,counterRef:u,counterWrapperRef:d,patternInputMirrorRef:i,patternInputRef:a,selfRef:o,multipleElRef:s,singleElRef:c,patternInputWrapperRef:l,overflowRef:f,inputTagElRef:p,handleMouseDown:I,handleFocusin:M,handleClear:P,handleMouseEnter:te,handleMouseLeave:F,handleDeleteOption:ne,handlePatternKeyDown:ae,handlePatternInputInput:oe,handlePatternInputBlur:z,handlePatternInputFocus:ce,handleMouseEnterCounter:_e,handleMouseLeaveCounter:ve,handleFocusout:N,handleCompositionEnd:se,handleCompositionStart:R,onPopoverUpdateShow:ye,focus:ue,focusInput:de,blur:le,blurInput:V,updateCounter:fe,getCounter:pe,getTail:he,renderLabel:e.renderLabel,cssVars:be?void 0:xe,themeClass:Ce?.themeClass,onRender:Ce?.onRender}},render(){let{status:e,multiple:t,size:n,disabled:r,filterable:i,maxTagCount:a,bordered:o,clsPrefix:s,ellipsisTagPopoverProps:c,onRender:l,renderTag:u,renderLabel:d}=this;l?.();let f=a===`responsive`,p=typeof a==`number`,m=f||p,h=M(Le,null,{default:()=>M(ut,{clsPrefix:s,loading:this.loading,showArrow:this.showArrow,showClear:this.mergedClearable&&this.selected,onClear:this.handleClear},{default:()=>{var e;return(e=this.$slots).arrow?.call(e)}})}),g;if(t){let{labelField:e}=this,t=t=>M(`div`,{class:`${s}-base-selection-tag-wrapper`,key:t.value},u?u({option:t,handleClose:()=>{this.handleDeleteOption(t)}}):M(va,{size:n,closable:!t.disabled,disabled:r,onClose:()=>{this.handleDeleteOption(t)},internalCloseIsButtonTag:!1,internalCloseFocusable:!1},{default:()=>d?d(t,!0):Ue(t[e],t,!0)})),o=()=>(p?this.selectedOptions.slice(0,a):this.selectedOptions).map(t),l=i?M(`div`,{class:`${s}-base-selection-input-tag`,ref:`inputTagElRef`,key:`__input-tag__`},M(`input`,Object.assign({},this.inputProps,{ref:`patternInputRef`,tabindex:-1,disabled:r,value:this.pattern,autofocus:this.autofocus,class:`${s}-base-selection-input-tag__input`,onBlur:this.handlePatternInputBlur,onFocus:this.handlePatternInputFocus,onKeydown:this.handlePatternKeyDown,onInput:this.handlePatternInputInput,onCompositionstart:this.handleCompositionStart,onCompositionend:this.handleCompositionEnd})),M(`span`,{ref:`patternInputMirrorRef`,class:`${s}-base-selection-input-tag__mirror`},this.pattern)):null,_=f?()=>M(`div`,{class:`${s}-base-selection-tag-wrapper`,ref:`counterWrapperRef`},M(va,{size:n,ref:`counterRef`,onMouseenter:this.handleMouseEnterCounter,onMouseleave:this.handleMouseLeaveCounter,disabled:r})):void 0,v;if(p){let e=this.selectedOptions.length-a;e>0&&(v=M(`div`,{class:`${s}-base-selection-tag-wrapper`,key:`__counter__`},M(va,{size:n,ref:`counterRef`,onMouseenter:this.handleMouseEnterCounter,disabled:r},{default:()=>`+${e}`})))}let y=f?i?M(fn,{ref:`overflowRef`,updateCounter:this.updateCounter,getCounter:this.getCounter,getTail:this.getTail,style:{width:`100%`,display:`flex`,overflow:`hidden`}},{default:o,counter:_,tail:()=>l}):M(fn,{ref:`overflowRef`,updateCounter:this.updateCounter,getCounter:this.getCounter,style:{width:`100%`,display:`flex`,overflow:`hidden`}},{default:o,counter:_}):p&&v?o().concat(v):o(),b=m?()=>M(`div`,{class:`${s}-base-selection-popover`},f?o():this.selectedOptions.map(t)):void 0,x=m?Object.assign({show:this.showTagsPanel,trigger:`hover`,overlap:!0,placement:`top`,width:`trigger`,onUpdateShow:this.onPopoverUpdateShow,theme:this.mergedTheme.peers.Popover,themeOverrides:this.mergedTheme.peerOverrides.Popover},c):null,S=!this.selected&&(!this.active||!this.pattern&&!this.isComposing)?M(`div`,{class:`${s}-base-selection-placeholder ${s}-base-selection-overlay`},M(`div`,{class:`${s}-base-selection-placeholder__inner`},this.placeholder)):null,C=i?M(`div`,{ref:`patternInputWrapperRef`,class:`${s}-base-selection-tags`},y,f?null:l,h):M(`div`,{ref:`multipleElRef`,class:`${s}-base-selection-tags`,tabindex:r?void 0:0},y,h);g=M(be,null,m?M(ua,Object.assign({},x,{scrollable:!0,style:`max-height: calc(var(--v-target-height) * 6.6);`}),{trigger:()=>C,default:b}):C,S)}else if(i){let e=this.pattern||this.isComposing,t=this.active?!e:!this.selected,n=this.active?!1:this.selected;g=M(`div`,{ref:`patternInputWrapperRef`,class:`${s}-base-selection-label`,title:this.patternInputFocused?void 0:gn(this.label)},M(`input`,Object.assign({},this.inputProps,{ref:`patternInputRef`,class:`${s}-base-selection-input`,value:this.active?this.pattern:``,placeholder:``,readonly:r,disabled:r,tabindex:-1,autofocus:this.autofocus,onFocus:this.handlePatternInputFocus,onBlur:this.handlePatternInputBlur,onInput:this.handlePatternInputInput,onCompositionstart:this.handleCompositionStart,onCompositionend:this.handleCompositionEnd})),n?M(`div`,{class:`${s}-base-selection-label__render-label ${s}-base-selection-overlay`,key:`input`},M(`div`,{class:`${s}-base-selection-overlay__wrapper`},u?u({option:this.selectedOption,handleClose:()=>{}}):d?d(this.selectedOption,!0):Ue(this.label,this.selectedOption,!0))):null,t?M(`div`,{class:`${s}-base-selection-placeholder ${s}-base-selection-overlay`,key:`placeholder`},M(`div`,{class:`${s}-base-selection-overlay__wrapper`},this.filterablePlaceholder)):null,h)}else g=M(`div`,{ref:`singleElRef`,class:`${s}-base-selection-label`,tabindex:this.disabled?void 0:0},this.label===void 0?M(`div`,{class:`${s}-base-selection-placeholder ${s}-base-selection-overlay`,key:`placeholder`},M(`div`,{class:`${s}-base-selection-placeholder__inner`},this.placeholder)):M(`div`,{class:`${s}-base-selection-input`,title:gn(this.label),key:`input`},M(`div`,{class:`${s}-base-selection-input__content`},u?u({option:this.selectedOption,handleClose:()=>{}}):d?d(this.selectedOption,!0):Ue(this.label,this.selectedOption,!0))),h);return M(`div`,{ref:`selfRef`,class:[`${s}-base-selection`,this.rtlEnabled&&`${s}-base-selection--rtl`,this.themeClass,e&&`${s}-base-selection--${e}-status`,{[`${s}-base-selection--active`]:this.active,[`${s}-base-selection--selected`]:this.selected||this.active&&this.pattern,[`${s}-base-selection--disabled`]:this.disabled,[`${s}-base-selection--multiple`]:this.multiple,[`${s}-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},g,o?M(`div`,{class:`${s}-base-selection__border`}):null,o?M(`div`,{class:`${s}-base-selection__state-border`}):null)}});function wa(e){return e.type===`group`}function Ta(e){return e.type===`ignored`}function Ea(e,t){try{return!!(1+t.toString().toLowerCase().indexOf(e.trim().toLowerCase()))}catch{return!1}}function Da(e,t){return{getIsGroup:wa,getIgnored:Ta,getKey(t){return wa(t)?t.name||t.key||`key-required`:t[e]},getChildren(e){return e[t]}}}function Oa(e,t,n,r){if(!t)return e;function i(e){if(!Array.isArray(e))return[];let a=[];for(let o of e)if(wa(o)){let e=i(o[r]);e.length&&a.push(Object.assign({},o,{[r]:e}))}else if(Ta(o))continue;else t(n,o)&&a.push(o);return a}return i(e)}function ka(e,t,n){let r=new Map;return e.forEach(e=>{wa(e)?e[n].forEach(e=>{r.set(e[t],e)}):r.set(e[t],e)}),r}function Aa(e){let{boxShadow2:t}=e;return{menuBoxShadow:t}}var ja=j({name:`Select`,common:Re,peers:{InternalSelection:xa,InternalSelectMenu:Gi},self:Aa}),Ma=V([I(`select`,`
  518. z-index: auto;
  519. outline: none;
  520. width: 100%;
  521. position: relative;
  522. font-weight: var(--n-font-weight);
  523. `),I(`select-menu`,`
  524. margin: 4px 0;
  525. box-shadow: var(--n-menu-box-shadow);
  526. `,[Qe({originalTransition:`background-color .3s var(--n-bezier), box-shadow .3s var(--n-bezier)`})])]),Na=u({name:`Select`,props:Object.assign(Object.assign({},W.props),{to:Tt.propTo,bordered:{type:Boolean,default:void 0},clearable:Boolean,clearCreatedOptionsOnClear:{type:Boolean,default:!0},clearFilterAfterSelect:{type:Boolean,default:!0},options:{type:Array,default:()=>[]},defaultValue:{type:[String,Number,Array],default:null},keyboard:{type:Boolean,default:!0},value:[String,Number,Array],placeholder:String,menuProps:Object,multiple:Boolean,size:String,menuSize:{type: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],ellipsisTagPopoverProps:Object,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},scrollbarProps:Object,onChange:[Function,Array],items:Array}),slots:Object,setup(e){let{mergedClsPrefixRef:t,mergedBorderedRef:n,namespaceRef:r,inlineThemeDisabled:i,mergedComponentPropsRef:a}=Pe(e),o=W(`Select`,`-select`,Ma,ja,e,t),s=B(e.defaultValue),c=st(U(e,`value`),s),l=B(!1),u=B(``),d=lt(e,[`items`,`options`]),f=B([]),p=B([]),m=Y(()=>p.value.concat(f.value).concat(d.value)),h=Y(()=>{let{filter:t}=e;if(t)return t;let{labelField:n,valueField:r}=e;return(e,t)=>{if(!t)return!1;let i=t[n];if(typeof i==`string`)return Ea(e,i);let a=t[r];return typeof a==`string`?Ea(e,a):typeof a==`number`?Ea(e,String(a)):!1}}),g=Y(()=>{if(e.remote)return d.value;{let{value:t}=m,{value:n}=u;return!n.length||!e.filterable?t:Oa(t,h.value,n,e.childrenField)}}),_=Y(()=>{let{valueField:t,childrenField:n}=e,r=Da(t,n);return Li(g.value,r)}),y=Y(()=>ka(m.value,e.valueField,e.childrenField)),b=B(!1),x=st(U(e,`show`),b),S=B(null),C=B(null),w=B(null),{localeRef:T}=ct(`Select`),E=Y(()=>e.placeholder??T.value.placeholder),D=[],O=B(new Map),k=Y(()=>{let{fallbackOption:t}=e;if(t===void 0){let{labelField:t,valueField:n}=e;return e=>({[t]:String(e),[n]:e})}return t===!1?!1:e=>Object.assign(t(e),{value:e})});function A(t){let n=e.remote,{value:r}=O,{value:i}=y,{value:a}=k,o=[];return t.forEach(e=>{if(i.has(e))o.push(i.get(e));else if(n&&r.has(e))o.push(r.get(e));else if(a){let t=a(e);t&&o.push(t)}}),o}let ee=Y(()=>{if(e.multiple){let{value:e}=c;return Array.isArray(e)?A(e):[]}return null}),j=Y(()=>{let{value:t}=c;return!e.multiple&&!Array.isArray(t)?t===null?null:A([t])[0]||null:null}),M=ye(e,{mergedSize:t=>{let{size:n}=e;if(n)return n;let{mergedSize:r}=t||{};return r?.value?r.value:a?.value?.Select?.size||`medium`}}),{mergedSizeRef:P,mergedDisabledRef:te,mergedStatusRef:F}=M;function I(t,n){let{onChange:r,"onUpdate:value":i,onUpdateValue:a}=e,{nTriggerFormChange:o,nTriggerFormInput:c}=M;r&&N(r,t,n),a&&N(a,t,n),i&&N(i,t,n),s.value=t,o(),c()}function re(t){let{onBlur:n}=e,{nTriggerFormBlur:r}=M;n&&N(n,t),r()}function ie(){let{onClear:t}=e;t&&N(t)}function ae(t){let{onFocus:n,showOnFocus:r}=e,{nTriggerFormFocus:i}=M;n&&N(n,t),i(),r&&ce()}function L(t){let{onSearch:n}=e;n&&N(n,t)}function oe(t){let{onScroll:n}=e;n&&N(n,t)}function R(){var t;let{remote:n,multiple:r}=e;if(n){let{value:n}=O;if(r){let{valueField:r}=e;(t=ee.value)==null||t.forEach(e=>{n.set(e[r],e)})}else{let t=j.value;t&&n.set(t[e.valueField],t)}}}function se(t){let{onUpdateShow:n,"onUpdate:show":r}=e;n&&N(n,t),r&&N(r,t),b.value=t}function ce(){te.value||(se(!0),b.value=!0,e.filterable&&q())}function z(){se(!1)}function le(){u.value=``,p.value=D}let de=B(!1);function V(){e.filterable&&(de.value=!0)}function fe(){e.filterable&&(de.value=!1,x.value||le())}function pe(){te.value||(x.value?e.filterable?q():z():ce())}function he(e){(w.value?.selfRef)?.contains(e.relatedTarget)||(l.value=!1,re(e),z())}function H(e){ae(e),l.value=!0}function ge(){l.value=!0}function _e(e){S.value?.$el.contains(e.relatedTarget)||(l.value=!1,re(e),z())}function ve(){var e;(e=S.value)==null||e.focus(),z()}function be(e){x.value&&(S.value?.$el.contains(ue(e))||z())}function xe(t){if(!Array.isArray(t))return[];if(k.value)return Array.from(t);{let{remote:n}=e,{value:r}=y;if(n){let{value:e}=O;return t.filter(t=>r.has(t)||e.has(t))}else return t.filter(e=>r.has(e))}}function Se(e){Ce(e.rawNode)}function Ce(t){if(te.value)return;let{tag:n,remote:r,clearFilterAfterSelect:i,valueField:a}=e;if(n&&!r){let{value:e}=p,t=e[0]||null;if(t){let e=f.value;e.length?e.push(t):f.value=[t],p.value=D}}if(r&&O.value.set(t[a],t),e.multiple){let e=xe(c.value),o=e.findIndex(e=>e===t[a]);if(~o){if(e.splice(o,1),n&&!r){let e=G(t[a]);~e&&(f.value.splice(e,1),i&&(u.value=``))}}else e.push(t[a]),i&&(u.value=``);I(e,A(e))}else{if(n&&!r){let e=G(t[a]);~e?f.value=[f.value[e]]:f.value=D}Oe(),z(),I(t[a],t)}}function G(t){return f.value.findIndex(n=>n[e.valueField]===t)}function K(t){x.value||ce();let{value:n}=t.target;u.value=n;let{tag:r,remote:i}=e;if(L(n),r&&!i){if(!n){p.value=D;return}let{onCreate:t}=e,r=t?t(n):{[e.labelField]:n,[e.valueField]:n},{valueField:i,labelField:a}=e;d.value.some(e=>e[i]===r[i]||e[a]===r[a])||f.value.some(e=>e[i]===r[i]||e[a]===r[a])?p.value=D:p.value=[r]}}function we(t){t.stopPropagation();let{multiple:n,tag:r,remote:i,clearCreatedOptionsOnClear:a}=e;!n&&e.filterable&&z(),r&&!i&&a&&(f.value=D),ie(),n?I([],[]):I(null,null)}function Te(e){!_t(e,`action`)&&!_t(e,`empty`)&&!_t(e,`header`)&&e.preventDefault()}function Ee(e){oe(e)}function De(t){var n,r,i;if(!e.keyboard){t.preventDefault();return}switch(t.key){case` `:if(e.filterable)break;t.preventDefault();case`Enter`:if(!S.value?.isComposing){if(x.value){let t=w.value?.getPendingTmNode();t?Se(t):e.filterable||(z(),Oe())}else if(ce(),e.tag&&de.value){let t=p.value[0];if(t){let n=t[e.valueField],{value:r}=c;e.multiple&&Array.isArray(r)&&r.includes(n)||Ce(t)}}}t.preventDefault();break;case`ArrowUp`:if(t.preventDefault(),e.loading)return;x.value&&((n=w.value)==null||n.prev());break;case`ArrowDown`:if(t.preventDefault(),e.loading)return;x.value?(r=w.value)==null||r.next():ce();break;case`Escape`:x.value&&(We(t),z()),(i=S.value)==null||i.focus();break}}function Oe(){var e;(e=S.value)==null||e.focus()}function q(){var e;(e=S.value)==null||e.focusInput()}function ke(){var e;x.value&&((e=C.value)==null||e.syncPosition())}R(),v(U(e,`options`),R);let J={focus:()=>{var e;(e=S.value)==null||e.focus()},focusInput:()=>{var e;(e=S.value)==null||e.focusInput()},blur:()=>{var e;(e=S.value)==null||e.blur()},blurInput:()=>{var e;(e=S.value)==null||e.blurInput()}},Ae=Y(()=>{let{self:{menuBoxShadow:e}}=o.value;return{"--n-menu-box-shadow":e}}),je=i?me(`select`,void 0,Ae,e):void 0;return Object.assign(Object.assign({},J),{mergedStatus:F,mergedClsPrefix:t,mergedBordered:n,namespace:r,treeMate:_,isMounted:ne(),triggerRef:S,menuRef:w,pattern:u,uncontrolledShow:b,mergedShow:x,adjustedTo:Tt(e),uncontrolledValue:s,mergedValue:c,followerRef:C,localizedPlaceholder:E,selectedOption:j,selectedOptions:ee,mergedSize:P,mergedDisabled:te,focused:l,activeWithoutMenuOpen:de,inlineThemeDisabled:i,onTriggerInputFocus:V,onTriggerInputBlur:fe,handleTriggerOrMenuResize:ke,handleMenuFocus:ge,handleMenuBlur:_e,handleMenuTabOut:ve,handleTriggerClick:pe,handleToggle:Se,handleDeleteOption:Ce,handlePatternInput:K,handleClear:we,handleTriggerBlur:he,handleTriggerFocus:H,handleKeydown:De,handleMenuAfterLeave:le,handleMenuClickOutside:be,handleMenuScroll:Ee,handleMenuKeydown:De,handleMenuMousedown:Te,mergedTheme:o,cssVars:i?void 0:Ae,themeClass:je?.themeClass,onRender:je?.onRender})},render(){return M(`div`,{class:`${this.mergedClsPrefix}-select`},M(Nt,null,{default:()=>[M(Pt,null,{default:()=>M(Ca,{ref:`triggerRef`,inlineThemeDisabled:this.inlineThemeDisabled,status:this.mergedStatus,inputProps:this.inputProps,clsPrefix:this.mergedClsPrefix,showArrow:this.showArrow,maxTagCount:this.maxTagCount,ellipsisTagPopoverProps:this.ellipsisTagPopoverProps,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;return[(e=this.$slots).arrow?.call(e)]}})}),M($t,{ref:`followerRef`,show:this.mergedShow,to:this.adjustedTo,teleportDisabled:this.adjustedTo===Tt.tdkey,containerClass:this.namespace,width:this.consistentMenuWidth?`target`:void 0,minWidth:`target`,placement:this.placement},{default:()=>M(je,{name:`fade-in-scale-up-transition`,appear:this.isMounted,onAfterLeave:this.handleMenuAfterLeave},{default:()=>{var e;return this.mergedShow||this.displayDirective===`show`?((e=this.onRender)==null||e.call(this),h(M(Xi,Object.assign({},this.menuProps,{ref:`menuRef`,onResize:this.handleTriggerOrMenuResize,inlineThemeDisabled:this.inlineThemeDisabled,virtualScroll:this.consistentMenuWidth&&this.virtualScroll,class:[`${this.mergedClsPrefix}-select-menu`,this.themeClass,this.menuProps?.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:this.menuSize,renderOption:this.renderOption,renderLabel:this.renderLabel,value:this.mergedValue,style:[this.menuProps?.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,scrollbarProps:this.scrollbarProps}),{empty:()=>{var e;return[(e=this.$slots).empty?.call(e)]},header:()=>{var e;return[(e=this.$slots).header?.call(e)]},action:()=>{var e;return[(e=this.$slots).action?.call(e)]}}),this.displayDirective===`show`?[[_e,this.mergedShow],[qe,this.handleMenuClickOutside,void 0,{capture:!0}]]:[[qe,this.handleMenuClickOutside,void 0,{capture:!0}]])):null}})})]}))}}),Pa={padding:`4px 0`,optionIconSizeSmall:`14px`,optionIconSizeMedium:`16px`,optionIconSizeLarge:`16px`,optionIconSizeHuge:`18px`,optionSuffixWidthSmall:`14px`,optionSuffixWidthMedium:`14px`,optionSuffixWidthLarge:`16px`,optionSuffixWidthHuge:`16px`,optionIconSuffixWidthSmall:`32px`,optionIconSuffixWidthMedium:`32px`,optionIconSuffixWidthLarge:`36px`,optionIconSuffixWidthHuge:`36px`,optionPrefixWidthSmall:`14px`,optionPrefixWidthMedium:`14px`,optionPrefixWidthLarge:`16px`,optionPrefixWidthHuge:`16px`,optionIconPrefixWidthSmall:`36px`,optionIconPrefixWidthMedium:`36px`,optionIconPrefixWidthLarge:`40px`,optionIconPrefixWidthHuge:`40px`};function Fa(e){let{primaryColor:t,textColor2:n,dividerColor:r,hoverColor:i,popoverColor:a,invertedColor:o,borderRadius:s,fontSizeSmall:c,fontSizeMedium:l,fontSizeLarge:u,fontSizeHuge:d,heightSmall:f,heightMedium:p,heightLarge:m,heightHuge:h,textColor3:g,opacityDisabled:_}=e;return Object.assign(Object.assign({},Pa),{optionHeightSmall:f,optionHeightMedium:p,optionHeightLarge:m,optionHeightHuge:h,borderRadius:s,fontSizeSmall:c,fontSizeMedium:l,fontSizeLarge:u,fontSizeHuge:d,optionTextColor:n,optionTextColorHover:n,optionTextColorActive:t,optionTextColorChildActive:t,color:a,dividerColor:r,suffixColor:n,prefixColor:n,optionColorHover:i,optionColorActive:R(t,{alpha:.1}),groupHeaderTextColor:g,optionTextColorInverted:`#BBB`,optionTextColorHoverInverted:`#FFF`,optionTextColorActiveInverted:`#FFF`,optionTextColorChildActiveInverted:`#FFF`,colorInverted:o,dividerColorInverted:`#BBB`,suffixColorInverted:`#BBB`,prefixColorInverted:`#BBB`,optionColorHoverInverted:t,optionColorActiveInverted:t,groupHeaderTextColorInverted:`#AAA`,optionOpacityDisabled:_})}var Ia=j({name:`Dropdown`,common:Re,peers:{Popover:$i},self:Fa}),La={padding:`8px 14px`};function Ra(e){let{borderRadius:t,boxShadow2:n,baseColor:r}=e;return Object.assign(Object.assign({},La),{borderRadius:t,boxShadow:n,color:g(r,`rgba(0, 0, 0, .85)`),textColor:r})}var za=j({name:`Tooltip`,common:Re,peers:{Popover:$i},self:Ra}),Ba=u({name:`Tooltip`,props:Object.assign(Object.assign({},la),W.props),slots:Object,__popover__:!0,setup(e){let{mergedClsPrefixRef:t}=Pe(e),n=W(`Tooltip`,`-tooltip`,void 0,za,e,t),r=B(null);return Object.assign(Object.assign({},{syncPosition(){r.value.syncPosition()},setShow(e){r.value.setShow(e)}}),{popoverRef:r,mergedTheme:n,popoverThemeOverrides:Y(()=>n.value.self)})},render(){let{mergedTheme:e,internalExtraClass:t}=this;return M(ua,Object.assign(Object.assign({},this.$props),{theme:e.peers.Popover,themeOverrides:e.peerOverrides.Popover,builtinThemeOverrides:this.popoverThemeOverrides,internalExtraClass:t.concat(`tooltip`),ref:`popoverRef`}),this.$slots)}}),Va=E(`n-dropdown-menu`),Ha=E(`n-dropdown`),Ua=E(`n-dropdown-option`),Wa=u({name:`DropdownDivider`,props:{clsPrefix:{type:String,required:!0}},render(){return M(`div`,{class:`${this.clsPrefix}-dropdown-divider`})}}),Ga=u({name:`DropdownGroupHeader`,props:{clsPrefix:{type:String,required:!0},tmNode:{type:Object,required:!0}},setup(){let{showIconRef:e,hasSubmenuRef:t}=G(Va),{renderLabelRef:n,labelFieldRef:r,nodePropsRef:i,renderOptionRef:a}=G(Ha);return{labelField:r,showIcon:e,hasSubmenu:t,renderLabel:n,nodeProps:i,renderOption:a}},render(){let{clsPrefix:e,hasSubmenu:t,showIcon:n,nodeProps:r,renderLabel:i,renderOption:a}=this,{rawNode:o}=this.tmNode,s=M(`div`,Object.assign({class:`${e}-dropdown-option`},r?.(o)),M(`div`,{class:`${e}-dropdown-option-body ${e}-dropdown-option-body--group`},M(`div`,{"data-dropdown-option":!0,class:[`${e}-dropdown-option-body__prefix`,n&&`${e}-dropdown-option-body__prefix--show-icon`]},Ue(o.icon)),M(`div`,{class:`${e}-dropdown-option-body__label`,"data-dropdown-option":!0},i?i(o):Ue(o.title??o[this.labelField])),M(`div`,{class:[`${e}-dropdown-option-body__suffix`,t&&`${e}-dropdown-option-body__suffix--has-submenu`],"data-dropdown-option":!0})));return a?a({node:s,option:o}):s}});function Ka(e){let{textColorBase:t,opacity1:n,opacity2:r,opacity3:i,opacity4:a,opacity5:o}=e;return{color:t,opacity1Depth:n,opacity2Depth:r,opacity3Depth:i,opacity4Depth:a,opacity5Depth:o}}var qa={name:`Icon`,common:Re,self:Ka},Ja=I(`icon`,`
  527. height: 1em;
  528. width: 1em;
  529. line-height: 1em;
  530. text-align: center;
  531. display: inline-block;
  532. position: relative;
  533. fill: currentColor;
  534. `,[J(`color-transition`,{transition:`color .3s var(--n-bezier)`}),J(`depth`,{color:`var(--n-color)`},[V(`svg`,{opacity:`var(--n-opacity)`,transition:`opacity .3s var(--n-bezier)`})]),V(`svg`,{height:`1em`,width:`1em`})]),Ya=u({_n_icon__:!0,name:`Icon`,inheritAttrs:!1,props:Object.assign(Object.assign({},W.props),{depth:[String,Number],size:[Number,String],color:String,component:[Object,Function]}),setup(e){let{mergedClsPrefixRef:t,inlineThemeDisabled:n}=Pe(e),r=W(`Icon`,`-icon`,Ja,qa,e,t),i=Y(()=>{let{depth:t}=e,{common:{cubicBezierEaseInOut:n},self:i}=r.value;if(t!==void 0){let{color:e,[`opacity${t}Depth`]:r}=i;return{"--n-bezier":n,"--n-color":e,"--n-opacity":r}}return{"--n-bezier":n,"--n-color":``,"--n-opacity":``}}),a=n?me(`icon`,Y(()=>`${e.depth||`d`}`),i,e):void 0;return{mergedClsPrefix:t,mergedStyle:Y(()=>{let{size:t,color:n}=e;return{fontSize:at(t),color:n}}),cssVars:n?void 0:i,themeClass:a?.themeClass,onRender:a?.onRender}},render(){let{$parent:e,depth:t,mergedClsPrefix:i,component:a,onRender:o,themeClass:s}=this;return e?.$options?._n_icon__&&r(`icon`,"don't wrap `n-icon` inside `n-icon`"),o?.(),M(`i`,n(this.$attrs,{role:`img`,class:[`${i}-icon`,s,{[`${i}-icon--depth`]:t,[`${i}-icon--color-transition`]:t!==void 0}],style:[this.cssVars,this.mergedStyle]}),a?M(a):this.$slots)}});function Xa(e,t){return e.type===`submenu`||e.type===void 0&&e[t]!==void 0}function Za(e){return e.type===`group`}function Qa(e){return e.type===`divider`}function $a(e){return e.type===`render`}var eo=u({name:`DropdownOption`,props:{clsPrefix:{type:String,required:!0},tmNode:{type:Object,required:!0},parentKey:{type:[String,Number],default:null},placement:{type:String,default:`right-start`},props:Object,scrollable:Boolean},setup(e){let t=G(Ha),{hoverKeyRef:n,keyboardKeyRef:r,lastToggledSubmenuKeyRef:i,pendingKeyPathRef:a,activeKeyPathRef:o,animatedRef:s,mergedShowRef:c,renderLabelRef:l,renderIconRef:u,labelFieldRef:d,childrenFieldRef:f,renderOptionRef:p,nodePropsRef:m,menuPropsRef:h}=t,g=G(Ua,null),_=G(Va),v=G(et),y=Y(()=>e.tmNode.rawNode),b=Y(()=>{let{value:t}=f;return Xa(e.tmNode.rawNode,t)}),x=Y(()=>{let{disabled:t}=e.tmNode;return t}),S=Et(Y(()=>{if(!b.value)return!1;let{key:t,disabled:o}=e.tmNode;if(o)return!1;let{value:s}=n,{value:c}=r,{value:l}=i,{value:u}=a;return s===null?c===null?l===null?!1:u.includes(t):u.includes(t)&&u[u.length-1]!==t:u.includes(t)}),300,Y(()=>r.value===null&&!s.value)),C=Y(()=>!!g?.enteringSubmenuRef.value),w=B(!1);X(Ua,{enteringSubmenuRef:w});function T(){w.value=!0}function E(){w.value=!1}function D(){let{parentKey:t,tmNode:a}=e;a.disabled||c.value&&(i.value=t,r.value=null,n.value=a.key)}function O(){let{tmNode:t}=e;t.disabled||c.value&&n.value!==t.key&&D()}function k(t){if(e.tmNode.disabled||!c.value)return;let{relatedTarget:r}=t;r&&!_t({target:r},`dropdownOption`)&&!_t({target:r},`scrollbarRail`)&&(n.value=null)}function A(){let{value:n}=b,{tmNode:r}=e;c.value&&!n&&!r.disabled&&(t.doSelect(r.key,r.rawNode),t.doUpdateShow(!1))}return{labelField:d,renderLabel:l,renderIcon:u,siblingHasIcon:_.showIconRef,siblingHasSubmenu:_.hasSubmenuRef,menuProps:h,popoverBody:v,animated:s,mergedShowSubmenu:Y(()=>S.value&&!C.value),rawNode:y,hasSubmenu:b,pending:Z(()=>{let{value:t}=a,{key:n}=e.tmNode;return t.includes(n)}),childActive:Z(()=>{let{value:t}=o,{key:n}=e.tmNode,r=t.findIndex(e=>n===e);return r===-1?!1:r<t.length-1}),active:Z(()=>{let{value:t}=o,{key:n}=e.tmNode,r=t.findIndex(e=>n===e);return r===-1?!1:r===t.length-1}),mergedDisabled:x,renderOption:p,nodeProps:m,handleClick:A,handleMouseMove:O,handleMouseEnter:D,handleMouseLeave:k,handleSubmenuBeforeEnter:T,handleSubmenuAfterEnter:E}},render(){let{animated:e,rawNode:t,mergedShowSubmenu:r,clsPrefix:i,siblingHasIcon:a,siblingHasSubmenu:o,renderLabel:s,renderIcon:c,renderOption:l,nodeProps:u,props:d,scrollable:f}=this,p=null;if(r){let e=this.menuProps?.call(this,t,t.children);p=M(ro,Object.assign({},e,{clsPrefix:i,scrollable:this.scrollable,tmNodes:this.tmNode.children,parentKey:this.tmNode.key}))}let m={class:[`${i}-dropdown-option-body`,this.pending&&`${i}-dropdown-option-body--pending`,this.active&&`${i}-dropdown-option-body--active`,this.childActive&&`${i}-dropdown-option-body--child-active`,this.mergedDisabled&&`${i}-dropdown-option-body--disabled`],onMousemove:this.handleMouseMove,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onClick:this.handleClick},h=u?.(t),g=M(`div`,Object.assign({class:[`${i}-dropdown-option`,h?.class],"data-dropdown-option":!0},h),M(`div`,n(m,d),[M(`div`,{class:[`${i}-dropdown-option-body__prefix`,a&&`${i}-dropdown-option-body__prefix--show-icon`]},[c?c(t):Ue(t.icon)]),M(`div`,{"data-dropdown-option":!0,class:`${i}-dropdown-option-body__label`},s?s(t):Ue(t[this.labelField]??t.title)),M(`div`,{"data-dropdown-option":!0,class:[`${i}-dropdown-option-body__suffix`,o&&`${i}-dropdown-option-body__suffix--has-submenu`]},this.hasSubmenu?M(Ya,null,{default:()=>M(ei,null)}):null)]),this.hasSubmenu?M(Nt,null,{default:()=>[M(Pt,null,{default:()=>M(`div`,{class:`${i}-dropdown-offset-container`},M($t,{show:this.mergedShowSubmenu,placement:this.placement,to:f&&this.popoverBody||void 0,teleportDisabled:!f},{default:()=>M(`div`,{class:`${i}-dropdown-menu-wrapper`},e?M(je,{onBeforeEnter:this.handleSubmenuBeforeEnter,onAfterEnter:this.handleSubmenuAfterEnter,name:`fade-in-scale-up-transition`,appear:!0},{default:()=>p}):p)}))})]}):null);return l?l({node:g,option:t}):g}}),to=u({name:`NDropdownGroup`,props:{clsPrefix:{type:String,required:!0},tmNode:{type:Object,required:!0},parentKey:{type:[String,Number],default:null}},render(){let{tmNode:e,parentKey:t,clsPrefix:n}=this,{children:i}=e;return M(be,null,M(Ga,{clsPrefix:n,tmNode:e,key:e.key}),i?.map(e=>{let{rawNode:i}=e;return i.show===!1?null:Qa(i)?M(Wa,{clsPrefix:n,key:e.key}):e.isGroup?(r(`dropdown`,"`group` node is not allowed to be put in `group` node."),null):M(eo,{clsPrefix:n,tmNode:e,parentKey:t,key:e.key})}))}}),no=u({name:`DropdownRenderOption`,props:{tmNode:{type:Object,required:!0}},render(){let{rawNode:{render:e,props:t}}=this.tmNode;return M(`div`,t,[e?.()])}}),ro=u({name:`DropdownMenu`,props:{scrollable:Boolean,showArrow:Boolean,arrowStyle:[String,Object],clsPrefix:{type:String,required:!0},tmNodes:{type:Array,default:()=>[]},parentKey:{type:[String,Number],default:null}},setup(e){let{renderIconRef:t,childrenFieldRef:n}=G(Ha);X(Va,{showIconRef:Y(()=>{let n=t.value;return e.tmNodes.some(e=>{if(e.isGroup)return e.children?.some(({rawNode:e})=>n?n(e):e.icon);let{rawNode:t}=e;return n?n(t):t.icon})}),hasSubmenuRef:Y(()=>{let{value:t}=n;return e.tmNodes.some(e=>{if(e.isGroup)return e.children?.some(({rawNode:e})=>Xa(e,t));let{rawNode:n}=e;return Xa(n,t)})})});let r=B(null);return X(nt,null),X(Ve,null),X(et,r),{bodyRef:r}},render(){let{parentKey:e,clsPrefix:t,scrollable:n}=this,r=this.tmNodes.map(r=>{let{rawNode:i}=r;return i.show===!1?null:$a(i)?M(no,{tmNode:r,key:r.key}):Qa(i)?M(Wa,{clsPrefix:t,key:r.key}):Za(i)?M(to,{clsPrefix:t,tmNode:r,parentKey:e,key:r.key}):M(eo,{clsPrefix:t,tmNode:r,parentKey:e,key:r.key,props:i.props,scrollable:n})});return M(`div`,{class:[`${t}-dropdown-menu`,n&&`${t}-dropdown-menu--scrollable`],ref:`bodyRef`},n?M(fe,{contentClass:`${t}-dropdown-menu__content`},{default:()=>r}):r,this.showArrow?ia({clsPrefix:t,arrowStyle:this.arrowStyle,arrowClass:void 0,arrowWrapperClass:void 0,arrowWrapperStyle:void 0}):null)}}),io=I(`dropdown-menu`,`
  535. transform-origin: var(--v-transform-origin);
  536. background-color: var(--n-color);
  537. border-radius: var(--n-border-radius);
  538. box-shadow: var(--n-box-shadow);
  539. position: relative;
  540. transition:
  541. background-color .3s var(--n-bezier),
  542. box-shadow .3s var(--n-bezier);
  543. `,[Qe(),I(`dropdown-option`,`
  544. position: relative;
  545. `,[V(`a`,`
  546. text-decoration: none;
  547. color: inherit;
  548. outline: none;
  549. `,[V(`&::before`,`
  550. content: "";
  551. position: absolute;
  552. left: 0;
  553. right: 0;
  554. top: 0;
  555. bottom: 0;
  556. `)]),I(`dropdown-option-body`,`
  557. display: flex;
  558. cursor: pointer;
  559. position: relative;
  560. height: var(--n-option-height);
  561. line-height: var(--n-option-height);
  562. font-size: var(--n-font-size);
  563. color: var(--n-option-text-color);
  564. transition: color .3s var(--n-bezier);
  565. `,[V(`&::before`,`
  566. content: "";
  567. position: absolute;
  568. top: 0;
  569. bottom: 0;
  570. left: 4px;
  571. right: 4px;
  572. transition: background-color .3s var(--n-bezier);
  573. border-radius: var(--n-border-radius);
  574. `),K(`disabled`,[J(`pending`,`
  575. color: var(--n-option-text-color-hover);
  576. `,[H(`prefix, suffix`,`
  577. color: var(--n-option-text-color-hover);
  578. `),V(`&::before`,`background-color: var(--n-option-color-hover);`)]),J(`active`,`
  579. color: var(--n-option-text-color-active);
  580. `,[H(`prefix, suffix`,`
  581. color: var(--n-option-text-color-active);
  582. `),V(`&::before`,`background-color: var(--n-option-color-active);`)]),J(`child-active`,`
  583. color: var(--n-option-text-color-child-active);
  584. `,[H(`prefix, suffix`,`
  585. color: var(--n-option-text-color-child-active);
  586. `)])]),J(`disabled`,`
  587. cursor: not-allowed;
  588. opacity: var(--n-option-opacity-disabled);
  589. `),J(`group`,`
  590. font-size: calc(var(--n-font-size) - 1px);
  591. color: var(--n-group-header-text-color);
  592. `,[H(`prefix`,`
  593. width: calc(var(--n-option-prefix-width) / 2);
  594. `,[J(`show-icon`,`
  595. width: calc(var(--n-option-icon-prefix-width) / 2);
  596. `)])]),H(`prefix`,`
  597. width: var(--n-option-prefix-width);
  598. display: flex;
  599. justify-content: center;
  600. align-items: center;
  601. color: var(--n-prefix-color);
  602. transition: color .3s var(--n-bezier);
  603. z-index: 1;
  604. `,[J(`show-icon`,`
  605. width: var(--n-option-icon-prefix-width);
  606. `),I(`icon`,`
  607. font-size: var(--n-option-icon-size);
  608. `)]),H(`label`,`
  609. white-space: nowrap;
  610. flex: 1;
  611. z-index: 1;
  612. `),H(`suffix`,`
  613. box-sizing: border-box;
  614. flex-grow: 0;
  615. flex-shrink: 0;
  616. display: flex;
  617. justify-content: flex-end;
  618. align-items: center;
  619. min-width: var(--n-option-suffix-width);
  620. padding: 0 8px;
  621. transition: color .3s var(--n-bezier);
  622. color: var(--n-suffix-color);
  623. z-index: 1;
  624. `,[J(`has-submenu`,`
  625. width: var(--n-option-icon-suffix-width);
  626. `),I(`icon`,`
  627. font-size: var(--n-option-icon-size);
  628. `)]),I(`dropdown-menu`,`pointer-events: all;`)]),I(`dropdown-offset-container`,`
  629. pointer-events: none;
  630. position: absolute;
  631. left: 0;
  632. right: 0;
  633. top: -4px;
  634. bottom: -4px;
  635. `)]),I(`dropdown-divider`,`
  636. transition: background-color .3s var(--n-bezier);
  637. background-color: var(--n-divider-color);
  638. height: 1px;
  639. margin: 4px 0;
  640. `),I(`dropdown-menu-wrapper`,`
  641. transform-origin: var(--v-transform-origin);
  642. width: fit-content;
  643. `),V(`>`,[I(`scrollbar`,`
  644. height: inherit;
  645. max-height: inherit;
  646. `)]),K(`scrollable`,`
  647. padding: var(--n-padding);
  648. `),J(`scrollable`,[H(`content`,`
  649. padding: var(--n-padding);
  650. `)])]),ao={animated:{type:Boolean,default:!0},keyboard:{type:Boolean,default:!0},size:String,inverted:Boolean,placement:{type:String,default:`bottom`},onSelect:[Function,Array],options:{type:Array,default:()=>[]},menuProps:Function,showArrow:Boolean,renderLabel:Function,renderIcon:Function,renderOption:Function,nodeProps:Function,labelField:{type:String,default:`label`},keyField:{type:String,default:`key`},childrenField:{type:String,default:`children`},value:[String,Number]},oo=Object.keys(la),so=u({name:`Dropdown`,inheritAttrs:!1,props:Object.assign(Object.assign(Object.assign({},la),ao),W.props),setup(e){let t=B(!1),n=st(U(e,`show`),t),r=Y(()=>{let{keyField:t,childrenField:n}=e;return Li(e.options,{getKey(e){return e[t]},getDisabled(e){return e.disabled===!0},getIgnored(e){return e.type===`divider`||e.type===`render`},getChildren(e){return e[n]}})}),i=Y(()=>r.value.treeNodes),a=B(null),o=B(null),s=B(null),c=Y(()=>a.value??o.value??s.value??null),l=Y(()=>r.value.getPath(c.value).keyPath),u=Y(()=>r.value.getPath(e.value).keyPath),d=Z(()=>e.keyboard&&n.value);xt({keydown:{ArrowUp:{prevent:!0,handler:w},ArrowRight:{prevent:!0,handler:C},ArrowDown:{prevent:!0,handler:T},ArrowLeft:{prevent:!0,handler:S},Enter:{prevent:!0,handler:E},Escape:x}},d);let{mergedClsPrefixRef:f,inlineThemeDisabled:p,mergedComponentPropsRef:m}=Pe(e),h=Y(()=>e.size||m?.value?.Dropdown?.size||`medium`),g=W(`Dropdown`,`-dropdown`,io,Ia,e,f);X(Ha,{labelFieldRef:U(e,`labelField`),childrenFieldRef:U(e,`childrenField`),renderLabelRef:U(e,`renderLabel`),renderIconRef:U(e,`renderIcon`),hoverKeyRef:a,keyboardKeyRef:o,lastToggledSubmenuKeyRef:s,pendingKeyPathRef:l,activeKeyPathRef:u,animatedRef:U(e,`animated`),mergedShowRef:n,nodePropsRef:U(e,`nodeProps`),renderOptionRef:U(e,`renderOption`),menuPropsRef:U(e,`menuProps`),doSelect:_,doUpdateShow:y}),v(n,t=>{!e.animated&&!t&&b()});function _(t,n){let{onSelect:r}=e;r&&N(r,t,n)}function y(n){let{"onUpdate:show":r,onUpdateShow:i}=e;r&&N(r,n),i&&N(i,n),t.value=n}function b(){a.value=null,o.value=null,s.value=null}function x(){y(!1)}function S(){O(`left`)}function C(){O(`right`)}function w(){O(`up`)}function T(){O(`down`)}function E(){let e=D();e?.isLeaf&&n.value&&(_(e.key,e.rawNode),y(!1))}function D(){let{value:e}=r,{value:t}=c;return!e||t===null?null:e.getNode(t)??null}function O(e){let{value:t}=c,{value:{getFirstAvailableNode:n}}=r,i=null;if(t===null){let e=n();e!==null&&(i=e.key)}else{let t=D();if(t){let n;switch(e){case`down`:n=t.getNext();break;case`up`:n=t.getPrev();break;case`right`:n=t.getChild();break;case`left`:n=t.getParent();break}n&&(i=n.key)}}i!==null&&(a.value=null,o.value=i)}let k=Y(()=>{let{inverted:t}=e,n=h.value,{common:{cubicBezierEaseInOut:r},self:i}=g.value,{padding:a,dividerColor:o,borderRadius:s,optionOpacityDisabled:c,[q(`optionIconSuffixWidth`,n)]:l,[q(`optionSuffixWidth`,n)]:u,[q(`optionIconPrefixWidth`,n)]:d,[q(`optionPrefixWidth`,n)]:f,[q(`fontSize`,n)]:p,[q(`optionHeight`,n)]:m,[q(`optionIconSize`,n)]:_}=i,v={"--n-bezier":r,"--n-font-size":p,"--n-padding":a,"--n-border-radius":s,"--n-option-height":m,"--n-option-prefix-width":f,"--n-option-icon-prefix-width":d,"--n-option-suffix-width":u,"--n-option-icon-suffix-width":l,"--n-option-icon-size":_,"--n-divider-color":o,"--n-option-opacity-disabled":c};return t?(v[`--n-color`]=i.colorInverted,v[`--n-option-color-hover`]=i.optionColorHoverInverted,v[`--n-option-color-active`]=i.optionColorActiveInverted,v[`--n-option-text-color`]=i.optionTextColorInverted,v[`--n-option-text-color-hover`]=i.optionTextColorHoverInverted,v[`--n-option-text-color-active`]=i.optionTextColorActiveInverted,v[`--n-option-text-color-child-active`]=i.optionTextColorChildActiveInverted,v[`--n-prefix-color`]=i.prefixColorInverted,v[`--n-suffix-color`]=i.suffixColorInverted,v[`--n-group-header-text-color`]=i.groupHeaderTextColorInverted):(v[`--n-color`]=i.color,v[`--n-option-color-hover`]=i.optionColorHover,v[`--n-option-color-active`]=i.optionColorActive,v[`--n-option-text-color`]=i.optionTextColor,v[`--n-option-text-color-hover`]=i.optionTextColorHover,v[`--n-option-text-color-active`]=i.optionTextColorActive,v[`--n-option-text-color-child-active`]=i.optionTextColorChildActive,v[`--n-prefix-color`]=i.prefixColor,v[`--n-suffix-color`]=i.suffixColor,v[`--n-group-header-text-color`]=i.groupHeaderTextColor),v}),A=p?me(`dropdown`,Y(()=>`${h.value[0]}${e.inverted?`i`:``}`),k,e):void 0;return{mergedClsPrefix:f,mergedTheme:g,mergedSize:h,tmNodes:i,mergedShow:n,handleAfterLeave:()=>{e.animated&&b()},doUpdateShow:y,cssVars:p?void 0:k,themeClass:A?.themeClass,onRender:A?.onRender}},render(){let e=(e,t,r,i,a)=>{var o;let{mergedClsPrefix:s,menuProps:c}=this;(o=this.onRender)==null||o.call(this);let l=c?.(void 0,this.tmNodes.map(e=>e.rawNode))||{},u={ref:_n(t),class:[e,`${s}-dropdown`,`${s}-dropdown--${this.mergedSize}-size`,this.themeClass],clsPrefix:s,tmNodes:this.tmNodes,style:[...r,this.cssVars],showArrow:this.showArrow,arrowStyle:this.arrowStyle,scrollable:this.scrollable,onMouseenter:i,onMouseleave:a};return M(ro,n(this.$attrs,u,l))},{mergedTheme:t}=this,r={show:this.mergedShow,theme:t.peers.Popover,themeOverrides:t.peerOverrides.Popover,internalOnAfterLeave:this.handleAfterLeave,internalRenderBody:e,onUpdateShow:this.doUpdateShow,"onUpdate:show":void 0};return M(ua,Object.assign({},Xe(this.$props,oo),r),{trigger:()=>{var e;return(e=this.$slots).default?.call(e)}})}});export{$t as C,xt as D,Tt as E,_t as O,ln as S,Nt as T,ni as _,Na as a,_n as b,_a as c,$i as d,Xi as f,Li as g,Bi as h,Ia as i,gt as k,ua as l,Hi as m,Ba as n,ja as o,Gi as p,za as r,Da as s,so as t,la as u,ei as v,Pt as w,fn as x,vn as y};