ray-template/docs/assets/chunks/Dropdown.5gd1V6-R.js

242 lines
72 KiB
JavaScript

import{N as Le,r as De,O as Wn,P as Rn,Q as vt,R as Hn,J as ce,T as yt,M as on,U as Ce,V as rt,S as Mt,W as Un,X as It,Y as _t,Z as Te,$ as jn,K as Ot,l as Xn,a0 as Zn,a1 as Vn,a2 as qn,a3 as Yn,a4 as Jn,t as fe,E as ze,a5 as Qn,B as er,a6 as an,c as G,a as D,q as Ee,e as te,d as Y,a7 as tr,u as ge,a8 as gt,h as mt,j as wt,n as K,g as X,_ as nr,p as rr,k as he}from"./light.BQgF5P5u.js";import{m as le,p as or,u as ir,q as Tt,r as Xe,a as pe,t as ar,v as sr}from"./DemoFrame.vue_vue_type_script_setup_true_lang.BibqOSJQ.js";import{t as lr,d as ur,i as dr,h as cr,o as Q,b as V,f as fr,c as hr,g as ot,X as sn,a as ln}from"./Icon.CEJcCL76.js";import{p as z,S as it,q as oe,v as Ge,$ as me,ag as pr,a8 as vr,L as J,a as at,F as re,af as yr,d as q,X as ne,ae as gr,a5 as We,a2 as Z,ap as mr,h as O,ad as j,P as wr,o as C,b as W,T as un,s as dn,K as ye,c as N,N as Se,aj as br,j as ve,ak as xr,ao as Sr}from"./framework.D8G7yXPy.js";import{i as cn}from"./isSymbol.rCNNreax.js";import{u as $r}from"./use-compitable.BN_sOfeF.js";var st=Le(De,"WeakMap"),Ar=Wn(Object.keys,Object),Cr=Object.prototype,Pr=Cr.hasOwnProperty;function kr(e){if(!Rn(e))return Ar(e);var t=[];for(var n in Object(e))Pr.call(e,n)&&n!="constructor"&&t.push(n);return t}function bt(e){return vt(e)?Hn(e):kr(e)}var Er=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Mr=/^\w*$/;function xt(e,t){if(ce(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||cn(e)?!0:Mr.test(e)||!Er.test(e)||t!=null&&e in Object(t)}var Ir="Expected a function";function St(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Ir);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(St.Cache||yt),n}St.Cache=yt;var _r=500;function Or(e){var t=St(e,function(r){return n.size===_r&&n.clear(),r}),n=t.cache;return t}var Tr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Nr=/\\(\\)?/g,zr=Or(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Tr,function(n,r,o,i){t.push(o?i.replace(Nr,"$1"):r||n)}),t});function fn(e,t){return ce(e)?e:xt(e,t)?[e]:zr(lr(e))}function Re(e){if(typeof e=="string"||cn(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function hn(e,t){t=fn(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[Re(t[n++])];return n&&n==r?e:void 0}function Br(e,t,n){var r=e==null?void 0:hn(e,t);return r===void 0?n:r}function Fr(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}function Kr(e,t){for(var n=-1,r=e==null?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}function Lr(){return[]}var Dr=Object.prototype,Gr=Dr.propertyIsEnumerable,Nt=Object.getOwnPropertySymbols,Wr=Nt?function(e){return e==null?[]:(e=Object(e),Kr(Nt(e),function(t){return Gr.call(e,t)}))}:Lr;function Rr(e,t,n){var r=t(e);return ce(e)?r:Fr(r,n(e))}function zt(e){return Rr(e,bt,Wr)}var lt=Le(De,"DataView"),ut=Le(De,"Promise"),dt=Le(De,"Set"),Bt="[object Map]",Hr="[object Object]",Ft="[object Promise]",Kt="[object Set]",Lt="[object WeakMap]",Dt="[object DataView]",Ur=Ce(lt),jr=Ce(rt),Xr=Ce(ut),Zr=Ce(dt),Vr=Ce(st),de=on;(lt&&de(new lt(new ArrayBuffer(1)))!=Dt||rt&&de(new rt)!=Bt||ut&&de(ut.resolve())!=Ft||dt&&de(new dt)!=Kt||st&&de(new st)!=Lt)&&(de=function(e){var t=on(e),n=t==Hr?e.constructor:void 0,r=n?Ce(n):"";if(r)switch(r){case Ur:return Dt;case jr:return Bt;case Xr:return Ft;case Zr:return Kt;case Vr:return Lt}return t});var qr="__lodash_hash_undefined__";function Yr(e){return this.__data__.set(e,qr),this}function Jr(e){return this.__data__.has(e)}function Be(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new yt;++t<n;)this.add(e[t])}Be.prototype.add=Be.prototype.push=Yr;Be.prototype.has=Jr;function Qr(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 eo(e,t){return e.has(t)}var to=1,no=2;function pn(e,t,n,r,o,i){var a=n&to,l=e.length,s=t.length;if(l!=s&&!(a&&s>l))return!1;var d=i.get(e),f=i.get(t);if(d&&f)return d==t&&f==e;var h=-1,c=!0,y=n&no?new Be:void 0;for(i.set(e,t),i.set(t,e);++h<l;){var g=e[h],w=t[h];if(r)var p=a?r(w,g,h,t,e,i):r(g,w,h,e,t,i);if(p!==void 0){if(p)continue;c=!1;break}if(y){if(!Qr(t,function(u,P){if(!eo(y,P)&&(g===u||o(g,u,n,r,i)))return y.push(P)})){c=!1;break}}else if(!(g===w||o(g,w,n,r,i))){c=!1;break}}return i.delete(e),i.delete(t),c}function ro(e){var t=-1,n=Array(e.size);return e.forEach(function(r,o){n[++t]=[o,r]}),n}function oo(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var io=1,ao=2,so="[object Boolean]",lo="[object Date]",uo="[object Error]",co="[object Map]",fo="[object Number]",ho="[object RegExp]",po="[object Set]",vo="[object String]",yo="[object Symbol]",go="[object ArrayBuffer]",mo="[object DataView]",Gt=Mt?Mt.prototype:void 0,Ze=Gt?Gt.valueOf:void 0;function wo(e,t,n,r,o,i,a){switch(n){case mo:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case go:return!(e.byteLength!=t.byteLength||!i(new It(e),new It(t)));case so:case lo:case fo:return Un(+e,+t);case uo:return e.name==t.name&&e.message==t.message;case ho:case vo:return e==t+"";case co:var l=ro;case po:var s=r&io;if(l||(l=oo),e.size!=t.size&&!s)return!1;var d=a.get(e);if(d)return d==t;r|=ao,a.set(e,t);var f=pn(l(e),l(t),r,o,i,a);return a.delete(e),f;case yo:if(Ze)return Ze.call(e)==Ze.call(t)}return!1}var bo=1,xo=Object.prototype,So=xo.hasOwnProperty;function $o(e,t,n,r,o,i){var a=n&bo,l=zt(e),s=l.length,d=zt(t),f=d.length;if(s!=f&&!a)return!1;for(var h=s;h--;){var c=l[h];if(!(a?c in t:So.call(t,c)))return!1}var y=i.get(e),g=i.get(t);if(y&&g)return y==t&&g==e;var w=!0;i.set(e,t),i.set(t,e);for(var p=a;++h<s;){c=l[h];var u=e[c],P=t[c];if(r)var I=a?r(P,u,c,t,e,i):r(u,P,c,e,t,i);if(!(I===void 0?u===P||o(u,P,n,r,i):I)){w=!1;break}p||(p=c=="constructor")}if(w&&!p){var m=e.constructor,x=t.constructor;m!=x&&"constructor"in e&&"constructor"in t&&!(typeof m=="function"&&m instanceof m&&typeof x=="function"&&x instanceof x)&&(w=!1)}return i.delete(e),i.delete(t),w}var Ao=1,Wt="[object Arguments]",Rt="[object Array]",Ie="[object Object]",Co=Object.prototype,Ht=Co.hasOwnProperty;function Po(e,t,n,r,o,i){var a=ce(e),l=ce(t),s=a?Rt:de(e),d=l?Rt:de(t);s=s==Wt?Ie:s,d=d==Wt?Ie:d;var f=s==Ie,h=d==Ie,c=s==d;if(c&&_t(e)){if(!_t(t))return!1;a=!0,f=!1}if(c&&!f)return i||(i=new Te),a||jn(e)?pn(e,t,n,r,o,i):wo(e,t,s,n,r,o,i);if(!(n&Ao)){var y=f&&Ht.call(e,"__wrapped__"),g=h&&Ht.call(t,"__wrapped__");if(y||g){var w=y?e.value():e,p=g?t.value():t;return i||(i=new Te),o(w,p,n,r,i)}}return c?(i||(i=new Te),$o(e,t,n,r,o,i)):!1}function $t(e,t,n,r,o){return e===t?!0:e==null||t==null||!Ot(e)&&!Ot(t)?e!==e&&t!==t:Po(e,t,n,r,$t,o)}var ko=1,Eo=2;function Mo(e,t,n,r){var o=n.length,i=o;if(e==null)return!i;for(e=Object(e);o--;){var a=n[o];if(a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++o<i;){a=n[o];var l=a[0],s=e[l],d=a[1];if(a[2]){if(s===void 0&&!(l in e))return!1}else{var f=new Te,h;if(!(h===void 0?$t(d,s,ko|Eo,r,f):h))return!1}}return!0}function vn(e){return e===e&&!Xn(e)}function Io(e){for(var t=bt(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,vn(o)]}return t}function yn(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function _o(e){var t=Io(e);return t.length==1&&t[0][2]?yn(t[0][0],t[0][1]):function(n){return n===e||Mo(n,e,t)}}function Oo(e,t){return e!=null&&t in Object(e)}function To(e,t,n){t=fn(t,e);for(var r=-1,o=t.length,i=!1;++r<o;){var a=Re(t[r]);if(!(i=e!=null&&n(e,a)))break;e=e[a]}return i||++r!=o?i:(o=e==null?0:e.length,!!o&&Zn(o)&&Vn(a,o)&&(ce(e)||qn(e)))}function No(e,t){return e!=null&&To(e,t,Oo)}var zo=1,Bo=2;function Fo(e,t){return xt(e)&&vn(t)?yn(Re(e),t):function(n){var r=Br(n,e);return r===void 0&&r===t?No(n,e):$t(t,r,zo|Bo)}}function Ko(e){return function(t){return t==null?void 0:t[e]}}function Lo(e){return function(t){return hn(t,e)}}function Do(e){return xt(e)?Ko(Re(e)):Lo(e)}function Go(e){return typeof e=="function"?e:e==null?Yn:typeof e=="object"?ce(e)?Fo(e[0],e[1]):_o(e):Do(e)}function Wo(e,t){return e&&Jn(e,t,bt)}function Ro(e,t){return function(n,r){if(n==null)return n;if(!vt(n))return e(n,r);for(var o=n.length,i=-1,a=Object(n);++i<o&&r(a[i],i,a)!==!1;);return n}}var Ho=Ro(Wo);function Uo(e,t){var n=-1,r=vt(e)?Array(e.length):[];return Ho(e,function(o,i,a){r[++n]=t(o,i,a)}),r}function jo(e,t){var n=ce(e)?ur:Uo;return n(e,Go(t))}function Ut(e,t){let{target:n}=e;for(;n;){if(n.dataset&&n.dataset[t]!==void 0)return!0;n=n.parentElement}return!1}function Xo(e=8){return Math.random().toString(16).slice(2,2+e)}function ma(e,t){const n=[];for(let r=0;r<e;++r)n.push(t);return n}const wa=fe("n-internal-select-menu"),Zo=fe("n-internal-select-menu-body"),At=fe("n-drawer-body"),Ct=fe("n-modal-body"),He=fe("n-popover-body");function Vo(e){const t=z(!!e.value);if(t.value)return it(t);const n=oe(e,r=>{r&&(t.value=!0,n())});return it(t)}let $e,Me;const qo=()=>{var e,t;$e=dr?(t=(e=document)===null||e===void 0?void 0:e.fonts)===null||t===void 0?void 0:t.ready:void 0,Me=!1,$e!==void 0?$e.then(()=>{Me=!0}):Me=!0};qo();function Yo(e){if(Me)return;let t=!1;Ge(()=>{Me||$e==null||$e.then(()=>{t||e()})}),me(()=>{t=!0})}function Jo(e={},t){const n=vr({ctrl:!1,command:!1,win:!1,shift:!1,tab:!1}),{keydown:r,keyup:o}=e,i=s=>{switch(s.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(d=>{if(d!==s.key)return;const f=r[d];if(typeof f=="function")f(s);else{const{stop:h=!1,prevent:c=!1}=f;h&&s.stopPropagation(),c&&s.preventDefault(),f.handler(s)}})},a=s=>{switch(s.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}o!==void 0&&Object.keys(o).forEach(d=>{if(d!==s.key)return;const f=o[d];if(typeof f=="function")f(s);else{const{stop:h=!1,prevent:c=!1}=f;h&&s.stopPropagation(),c&&s.preventDefault(),f.handler(s)}})},l=()=>{(t===void 0||t.value)&&(Q("keydown",document,i),Q("keyup",document,a)),t!==void 0&&oe(t,s=>{s?(Q("keydown",document,i),Q("keyup",document,a)):(V("keydown",document,i),V("keyup",document,a))})};return cr()?(pr(l),me(()=>{(t===void 0||t.value)&&(V("keydown",document,i),V("keyup",document,a))})):l(),it(n)}const gn="__disabled__";function Ae(e){const t=J(Ct,null),n=J(At,null),r=J(He,null),o=J(Zo,null),i=z();if(typeof document<"u"){i.value=document.fullscreenElement;const a=()=>{i.value=document.fullscreenElement};Ge(()=>{Q("fullscreenchange",document,a)}),me(()=>{V("fullscreenchange",document,a)})}return le(()=>{const{to:a}=e;return a!==void 0?a===!1?gn:a===!0?i.value||"body":a:t!=null&&t.value?t.value.$el??t.value:n!=null&&n.value?n.value:r!=null&&r.value?r.value:o!=null&&o.value?o.value:a??(i.value||"body")})}Ae.tdkey=gn;Ae.propTo={type:[String,Object,Boolean],default:void 0};function Qo(e,t="default",n=void 0){const r=e[t];if(!r)return ze("getFirstSlotVNode",`slot[${t}] is empty`),null;const o=fr(r(n));return o.length===1?o[0]:(ze("getFirstSlotVNode",`slot[${t}] should have exactly one child`),null)}function mn(e,t=[],n){const r={};return t.forEach(o=>{r[o]=e[o]}),Object.assign(r,n)}const ei=/^(\d|\.)+$/,jt=/(\d|\.)+/;function Ne(e,{c:t=1,offset:n=0,attachPx:r=!0}={}){if(typeof e=="number"){const o=(e+n)*t;return o===0?"0":`${o}px`}else if(typeof e=="string")if(ei.test(e)){const o=(Number(e)+n)*t;return r?o===0?"0":`${o}px`:`${o}`}else{const o=jt.exec(e);return o?e.replace(jt,String((Number(o[0])+n)*t)):e}return e}let Ve;function ti(){return Ve===void 0&&(Ve=navigator.userAgent.includes("Node.js")||navigator.userAgent.includes("jsdom")),Ve}function ct(e,t,n="default"){const r=t[n];if(r===void 0)throw new Error(`[vueuc/${e}]: slot[${n}] is empty.`);return r()}function ft(e,t=!0,n=[]){return e.forEach(r=>{if(r!==null){if(typeof r!="object"){(typeof r=="string"||typeof r=="number")&&n.push(at(String(r)));return}if(Array.isArray(r)){ft(r,t,n);return}if(r.type===re){if(r.children===null)return;Array.isArray(r.children)&&ft(r.children,t,n)}else(r.type!==yr||!t)&&n.push(r)}}),n}function Xt(e,t,n="default"){const r=t[n];if(r===void 0)throw new Error(`[vueuc/${e}]: slot[${n}] is empty.`);const o=ft(r());if(o.length===1)return o[0];throw new Error(`[vueuc/${e}]: slot[${n}] should have exactly one child.`)}let ue=null;function wn(){if(ue===null&&(ue=document.getElementById("v-binder-view-measurer"),ue===null)){ue=document.createElement("div"),ue.id="v-binder-view-measurer";const{style:e}=ue;e.position="fixed",e.left="0",e.right="0",e.top="0",e.bottom="0",e.pointerEvents="none",e.visibility="hidden",document.body.appendChild(ue)}return ue.getBoundingClientRect()}function ni(e,t){const n=wn();return{top:t,left:e,height:0,width:0,right:n.width-e,bottom:n.height-t}}function qe(e){const t=e.getBoundingClientRect(),n=wn();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 ri(e){return e.nodeType===9?null:e.parentNode}function bn(e){if(e===null)return null;const t=ri(e);if(t===null)return null;if(t.nodeType===9)return document;if(t.nodeType===1){const{overflow:n,overflowX:r,overflowY:o}=getComputedStyle(t);if(/(auto|scroll|overlay)/.test(n+o+r))return t}return bn(t)}const xn=q({name:"Binder",props:{syncTargetWithParent:Boolean,syncTarget:{type:Boolean,default:!0}},setup(e){var t;ne("VBinder",(t=gr())===null||t===void 0?void 0:t.proxy);const n=J("VBinder",null),r=z(null),o=u=>{r.value=u,n&&e.syncTargetWithParent&&n.setTargetRef(u)};let i=[];const a=()=>{let u=r.value;for(;u=bn(u),u!==null;)i.push(u);for(const P of i)Q("scroll",P,h,!0)},l=()=>{for(const u of i)V("scroll",u,h,!0);i=[]},s=new Set,d=u=>{s.size===0&&a(),s.has(u)||s.add(u)},f=u=>{s.has(u)&&s.delete(u),s.size===0&&l()},h=()=>{hr(c)},c=()=>{s.forEach(u=>u())},y=new Set,g=u=>{y.size===0&&Q("resize",window,p),y.has(u)||y.add(u)},w=u=>{y.has(u)&&y.delete(u),y.size===0&&V("resize",window,p)},p=()=>{y.forEach(u=>u())};return me(()=>{V("resize",window,p),l()}),{targetRef:r,setTargetRef:o,addScrollListener:d,removeScrollListener:f,addResizeListener:g,removeResizeListener:w}},render(){return ct("binder",this.$slots)}}),Sn=q({name:"Target",setup(){const{setTargetRef:e,syncTarget:t}=J("VBinder");return{syncTarget:t,setTargetDirective:{mounted:e,updated:e}}},render(){const{syncTarget:e,setTargetDirective:t}=this;return e?We(Xt("follower",this.$slots),[[t]]):Xt("follower",this.$slots)}}),we="@@mmoContext",oi={mounted(e,{value:t}){e[we]={handler:void 0},typeof t=="function"&&(e[we].handler=t,Q("mousemoveoutside",e,t))},updated(e,{value:t}){const n=e[we];typeof t=="function"?n.handler?n.handler!==t&&(V("mousemoveoutside",e,n.handler),n.handler=t,Q("mousemoveoutside",e,t)):(e[we].handler=t,Q("mousemoveoutside",e,t)):n.handler&&(V("mousemoveoutside",e,n.handler),n.handler=void 0)},unmounted(e){const{handler:t}=e[we];t&&V("mousemoveoutside",e,t),e[we].handler=void 0}},be="@@coContext",Zt={mounted(e,{value:t,modifiers:n}){e[be]={handler:void 0},typeof t=="function"&&(e[be].handler=t,Q("clickoutside",e,t,{capture:n.capture}))},updated(e,{value:t,modifiers:n}){const r=e[be];typeof t=="function"?r.handler?r.handler!==t&&(V("clickoutside",e,r.handler,{capture:n.capture}),r.handler=t,Q("clickoutside",e,t,{capture:n.capture})):(e[be].handler=t,Q("clickoutside",e,t,{capture:n.capture})):r.handler&&(V("clickoutside",e,r.handler,{capture:n.capture}),r.handler=void 0)},unmounted(e,{modifiers:t}){const{handler:n}=e[be];n&&V("clickoutside",e,n,{capture:t.capture}),e[be].handler=void 0}};function ii(e,t){console.error(`[vdirs/${e}]: ${t}`)}class ai{constructor(){this.elementZIndex=new Map,this.nextZIndex=2e3}get elementCount(){return this.elementZIndex.size}ensureZIndex(t,n){const{elementZIndex:r}=this;if(n!==void 0){t.style.zIndex=`${n}`,r.delete(t);return}const{nextZIndex:o}=this;r.has(t)&&r.get(t)+1===this.nextZIndex||(t.style.zIndex=`${o}`,r.set(t,o),this.nextZIndex=o+1,this.squashState())}unregister(t,n){const{elementZIndex:r}=this;r.has(t)?r.delete(t):n===void 0&&ii("z-index-manager/unregister-element","Element not found when unregistering."),this.squashState()}squashState(){const{elementCount:t}=this;t||(this.nextZIndex=2e3),this.nextZIndex-t>2500&&this.rearrange()}rearrange(){const t=Array.from(this.elementZIndex.entries());t.sort((n,r)=>n[1]-r[1]),this.nextZIndex=2e3,t.forEach(n=>{const r=n[0],o=this.nextZIndex++;`${o}`!==r.style.zIndex&&(r.style.zIndex=`${o}`)})}}const Ye=new ai,xe="@@ziContext",$n={mounted(e,t){const{value:n={}}=t,{zIndex:r,enabled:o}=n;e[xe]={enabled:!!o,initialized:!1},o&&(Ye.ensureZIndex(e,r),e[xe].initialized=!0)},updated(e,t){const{value:n={}}=t,{zIndex:r,enabled:o}=n,i=e[xe].enabled;o&&!i&&(Ye.ensureZIndex(e,r),e[xe].initialized=!0),e[xe].enabled=!!o},unmounted(e,t){if(!e[xe].initialized)return;const{value:n={}}=t,{zIndex:r}=n;Ye.unregister(e,r)}},{c:_e}=Qn(),si="vueuc-style";function Vt(e){var t;return typeof e=="string"?document.querySelector(e):(t=e())!==null&&t!==void 0?t:null}const li=q({name:"LazyTeleport",props:{to:{type:[String,Object],default:void 0},disabled:Boolean,show:{type:Boolean,required:!0}},setup(e){return{showTeleport:Vo(j(e,"show")),mergedTo:O(()=>{const{to:t}=e;return t??"body"})}},render(){return this.showTeleport?this.disabled?ct("lazy-teleport",this.$slots):Z(mr,{disabled:this.disabled,to:this.mergedTo},ct("lazy-teleport",this.$slots)):null}}),Oe={top:"bottom",bottom:"top",left:"right",right:"left"},qt={start:"end",center:"center",end:"start"},Je={top:"height",bottom:"height",left:"width",right:"width"},ui={"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"},di={"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"},ci={"bottom-start":"right","bottom-end":"left","top-start":"right","top-end":"left","right-start":"bottom","right-end":"top","left-start":"bottom","left-end":"top"},Yt={top:!0,bottom:!1,left:!0,right:!1},Jt={top:"end",bottom:"start",left:"end",right:"start"};function fi(e,t,n,r,o,i){if(!o||i)return{placement:e,top:0,left:0};const[a,l]=e.split("-");let s=l??"center",d={top:0,left:0};const f=(y,g,w)=>{let p=0,u=0;const P=n[y]-t[g]-t[y];return P>0&&r&&(w?u=Yt[g]?P:-P:p=Yt[g]?P:-P),{left:p,top:u}},h=a==="left"||a==="right";if(s!=="center"){const y=ci[e],g=Oe[y],w=Je[y];if(n[w]>t[w]){if(t[y]+t[w]<n[w]){const p=(n[w]-t[w])/2;t[y]<p||t[g]<p?t[y]<t[g]?(s=qt[l],d=f(w,g,h)):d=f(w,y,h):s="center"}}else n[w]<t[w]&&t[g]<0&&t[y]>t[g]&&(s=qt[l])}else{const y=a==="bottom"||a==="top"?"left":"top",g=Oe[y],w=Je[y],p=(n[w]-t[w])/2;(t[y]<p||t[g]<p)&&(t[y]>t[g]?(s=Jt[y],d=f(w,y,h)):(s=Jt[g],d=f(w,g,h)))}let c=a;return t[a]<n[Je[a]]&&t[a]<t[Oe[a]]&&(c=Oe[a]),{placement:s!=="center"?`${c}-${s}`:c,left:d.left,top:d.top}}function hi(e,t){return t?di[e]:ui[e]}function pi(e,t,n,r,o,i){if(i)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%)"};case"bottom":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+o)}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+o)}px`,transform:"translateX(-100%)"};case"top-start":return{top:`${Math.round(n.top-t.top+r)}px`,left:`${Math.round(n.left-t.left+o)}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+o)}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+o)}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+o)}px`,transform:"translateY(-100%)"};case"left-start":return{top:`${Math.round(n.top-t.top+r)}px`,left:`${Math.round(n.left-t.left+o)}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+o)}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+o)}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+o)}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+o)}px`,transform:"translateY(-50%) translateX(-100%)"};case"bottom":default:return{top:`${Math.round(n.top-t.top+n.height+r)}px`,left:`${Math.round(n.left-t.left+n.width/2+o)}px`,transform:"translateX(-50%)"}}}const vi=_e([_e(".v-binder-follower-container",{position:"absolute",left:"0",right:"0",top:"0",height:"0",pointerEvents:"none",zIndex:"auto"}),_e(".v-binder-follower-content",{position:"absolute",zIndex:"auto"},[_e("> *",{pointerEvents:"all"})])]),An=q({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){const t=J("VBinder"),n=le(()=>e.enabled!==void 0?e.enabled:e.show),r=z(null),o=z(null),i=()=>{const{syncTrigger:c}=e;c.includes("scroll")&&t.addScrollListener(s),c.includes("resize")&&t.addResizeListener(s)},a=()=>{t.removeScrollListener(s),t.removeResizeListener(s)};Ge(()=>{n.value&&(s(),i())});const l=er();vi.mount({id:"vueuc/binder",head:!0,anchorMetaName:si,ssr:l}),me(()=>{a()}),Yo(()=>{n.value&&s()});const s=()=>{if(!n.value)return;const c=r.value;if(c===null)return;const y=t.targetRef,{x:g,y:w,overlap:p}=e,u=g!==void 0&&w!==void 0?ni(g,w):qe(y);c.style.setProperty("--v-target-width",`${Math.round(u.width)}px`),c.style.setProperty("--v-target-height",`${Math.round(u.height)}px`);const{width:P,minWidth:I,placement:m,internalShift:x,flip:_}=e;c.setAttribute("v-placement",m),p?c.setAttribute("v-overlap",""):c.removeAttribute("v-overlap");const{style:T}=c;P==="target"?T.width=`${u.width}px`:P!==void 0?T.width=P:T.width="",I==="target"?T.minWidth=`${u.width}px`:I!==void 0?T.minWidth=I:T.minWidth="";const L=qe(c),$=qe(o.value),{left:E,top:S,placement:R}=fi(m,u,L,x,_,p),U=hi(R,p),{left:v,top:k,transform:M}=pi(R,$,u,S,E,p);c.setAttribute("v-placement",R),c.style.setProperty("--v-offset-left",`${Math.round(E)}px`),c.style.setProperty("--v-offset-top",`${Math.round(S)}px`),c.style.transform=`translateX(${v}) translateY(${k}) ${M}`,c.style.setProperty("--v-transform-origin",U),c.style.transformOrigin=U};oe(n,c=>{c?(i(),d()):a()});const d=()=>{wr().then(s).catch(c=>console.error(c))};["placement","x","y","internalShift","flip","width","overlap","minWidth"].forEach(c=>{oe(j(e,c),s)}),["teleportDisabled"].forEach(c=>{oe(j(e,c),d)}),oe(j(e,"syncTrigger"),c=>{c.includes("resize")?t.addResizeListener(s):t.removeResizeListener(s),c.includes("scroll")?t.addScrollListener(s):t.removeScrollListener(s)});const f=an(),h=le(()=>{const{to:c}=e;if(c!==void 0)return c;f.value});return{VBinder:t,mergedEnabled:n,offsetContainerRef:o,followerRef:r,mergedTo:h,syncPosition:s}},render(){return Z(li,{show:this.show,to:this.mergedTo,disabled:this.teleportDisabled},{default:()=>{var e,t;const n=Z("div",{class:["v-binder-follower-container",this.containerClass],ref:"offsetContainerRef"},[Z("div",{class:"v-binder-follower-content",ref:"followerRef"},(t=(e=this.$slots).default)===null||t===void 0?void 0:t.call(e))]);return this.zindexable?We(n,[[$n,{enabled:this.mergedEnabled,zIndex:this.zIndex}]]):n}})}});function Cn(e){return e instanceof HTMLElement}function Pn(e){for(let t=0;t<e.childNodes.length;t++){const n=e.childNodes[t];if(Cn(n)&&(En(n)||Pn(n)))return!0}return!1}function kn(e){for(let t=e.childNodes.length-1;t>=0;t--){const n=e.childNodes[t];if(Cn(n)&&(En(n)||kn(n)))return!0}return!1}function En(e){if(!yi(e))return!1;try{e.focus({preventScroll:!0})}catch{}return document.activeElement===e}function yi(e){if(e.tabIndex>0||e.tabIndex===0&&e.getAttribute("tabIndex")!==null)return!0;if(e.getAttribute("disabled"))return!1;switch(e.nodeName){case"A":return!!e.href&&e.rel!=="ignore";case"INPUT":return e.type!=="hidden"&&e.type!=="file";case"SELECT":case"TEXTAREA":return!0;default:return!1}}let ke=[];const gi=q({name:"FocusTrap",props:{disabled:Boolean,active:Boolean,autoFocus:{type:Boolean,default:!0},onEsc:Function,initialFocusTo:[String,Function],finalFocusTo:[String,Function],returnFocusOnDeactivated:{type:Boolean,default:!0}},setup(e){const t=Xo(),n=z(null),r=z(null);let o=!1,i=!1;const a=typeof document>"u"?null:document.activeElement;function l(){return ke[ke.length-1]===t}function s(p){var u;p.code==="Escape"&&l()&&((u=e.onEsc)===null||u===void 0||u.call(e,p))}Ge(()=>{oe(()=>e.active,p=>{p?(h(),Q("keydown",document,s)):(V("keydown",document,s),o&&c())},{immediate:!0})}),me(()=>{V("keydown",document,s),o&&c()});function d(p){if(!i&&l()){const u=f();if(u===null||u.contains(ot(p)))return;y("first")}}function f(){const p=n.value;if(p===null)return null;let u=p;for(;u=u.nextSibling,!(u===null||u instanceof Element&&u.tagName==="DIV"););return u}function h(){var p;if(!e.disabled){if(ke.push(t),e.autoFocus){const{initialFocusTo:u}=e;u===void 0?y("first"):(p=Vt(u))===null||p===void 0||p.focus({preventScroll:!0})}o=!0,document.addEventListener("focus",d,!0)}}function c(){var p;if(e.disabled||(document.removeEventListener("focus",d,!0),ke=ke.filter(P=>P!==t),l()))return;const{finalFocusTo:u}=e;u!==void 0?(p=Vt(u))===null||p===void 0||p.focus({preventScroll:!0}):e.returnFocusOnDeactivated&&a instanceof HTMLElement&&(i=!0,a.focus({preventScroll:!0}),i=!1)}function y(p){if(l()&&e.active){const u=n.value,P=r.value;if(u!==null&&P!==null){const I=f();if(I==null||I===P){i=!0,u.focus({preventScroll:!0}),i=!1;return}i=!0;const m=p==="first"?Pn(I):kn(I);i=!1,m||(i=!0,u.focus({preventScroll:!0}),i=!1)}}}function g(p){if(i)return;const u=f();u!==null&&(p.relatedTarget!==null&&u.contains(p.relatedTarget)?y("last"):y("first"))}function w(p){i||(p.relatedTarget!==null&&p.relatedTarget===n.value?y("last"):y("first"))}return{focusableStartRef:n,focusableEndRef:r,focusableStyle:"position: absolute; height: 0; width: 0;",handleStartFocus:g,handleEndFocus:w}},render(){const{default:e}=this.$slots;if(e===void 0)return null;if(this.disabled)return e();const{active:t,focusableStyle:n}=this;return Z(re,null,[Z("div",{"aria-hidden":"true",tabindex:t?"0":"-1",ref:"focusableStartRef",style:n,onFocus:this.handleStartFocus}),e(),Z("div",{"aria-hidden":"true",style:n,ref:"focusableEndRef",tabindex:t?"0":"-1",onFocus:this.handleEndFocus})])}}),Qe={top:"bottom",bottom:"top",left:"right",right:"left"},H="var(--n-arrow-height) * 1.414";var mi=G([D("popover",`
transition:
box-shadow .3s var(--n-bezier),
background-color .3s var(--n-bezier),
color .3s var(--n-bezier);
position: relative;
font-size: var(--n-font-size);
color: var(--n-text-color);
box-shadow: var(--n-box-shadow);
word-break: break-word;
`,[G(">",[D("scrollbar",`
height: inherit;
max-height: inherit;
`)]),Ee("raw",`
background-color: var(--n-color);
border-radius: var(--n-border-radius);
`,[Ee("scrollable",[Ee("show-header-or-footer","padding: var(--n-padding);")])]),te("header",`
padding: var(--n-padding);
border-bottom: 1px solid var(--n-divider-color);
transition: border-color .3s var(--n-bezier);
`),te("footer",`
padding: var(--n-padding);
border-top: 1px solid var(--n-divider-color);
transition: border-color .3s var(--n-bezier);
`),Y("scrollable, show-header-or-footer",[te("content",`
padding: var(--n-padding);
`)])]),D("popover-shared",`
transform-origin: inherit;
`,[D("popover-arrow-wrapper",`
position: absolute;
overflow: hidden;
pointer-events: none;
`,[D("popover-arrow",`
transition: background-color .3s var(--n-bezier);
position: absolute;
display: block;
width: calc(${H});
height: calc(${H});
box-shadow: 0 0 8px 0 rgba(0, 0, 0, .12);
transform: rotate(45deg);
background-color: var(--n-color);
pointer-events: all;
`)]),G("&.popover-transition-enter-from, &.popover-transition-leave-to",`
opacity: 0;
transform: scale(.85);
`),G("&.popover-transition-enter-to, &.popover-transition-leave-from",`
transform: scale(1);
opacity: 1;
`),G("&.popover-transition-enter-active",`
transition:
box-shadow .3s var(--n-bezier),
background-color .3s var(--n-bezier),
color .3s var(--n-bezier),
opacity .15s var(--n-bezier-ease-out),
transform .15s var(--n-bezier-ease-out);
`),G("&.popover-transition-leave-active",`
transition:
box-shadow .3s var(--n-bezier),
background-color .3s var(--n-bezier),
color .3s var(--n-bezier),
opacity .15s var(--n-bezier-ease-in),
transform .15s var(--n-bezier-ease-in);
`)]),ee("top-start",`
top: calc(${H} / -2);
left: calc(${se("top-start")} - var(--v-offset-left));
`),ee("top",`
top: calc(${H} / -2);
transform: translateX(calc(${H} / -2)) rotate(45deg);
left: 50%;
`),ee("top-end",`
top: calc(${H} / -2);
right: calc(${se("top-end")} + var(--v-offset-left));
`),ee("bottom-start",`
bottom: calc(${H} / -2);
left: calc(${se("bottom-start")} - var(--v-offset-left));
`),ee("bottom",`
bottom: calc(${H} / -2);
transform: translateX(calc(${H} / -2)) rotate(45deg);
left: 50%;
`),ee("bottom-end",`
bottom: calc(${H} / -2);
right: calc(${se("bottom-end")} + var(--v-offset-left));
`),ee("left-start",`
left: calc(${H} / -2);
top: calc(${se("left-start")} - var(--v-offset-top));
`),ee("left",`
left: calc(${H} / -2);
transform: translateY(calc(${H} / -2)) rotate(45deg);
top: 50%;
`),ee("left-end",`
left: calc(${H} / -2);
bottom: calc(${se("left-end")} + var(--v-offset-top));
`),ee("right-start",`
right: calc(${H} / -2);
top: calc(${se("right-start")} - var(--v-offset-top));
`),ee("right",`
right: calc(${H} / -2);
transform: translateY(calc(${H} / -2)) rotate(45deg);
top: 50%;
`),ee("right-end",`
right: calc(${H} / -2);
bottom: calc(${se("right-end")} + var(--v-offset-top));
`),...jo({top:["right-start","left-start"],right:["top-end","bottom-end"],bottom:["right-end","left-end"],left:["top-start","bottom-start"]},(e,t)=>{const n=["right","left"].includes(t),r=n?"width":"height";return e.map(o=>{const i=o.split("-")[1]==="end",a=`calc((${`var(--v-target-${r}, 0px)`} - ${H}) / 2)`,l=se(o);return G(`[v-placement="${o}"] >`,[D("popover-shared",[Y("center-arrow",[D("popover-arrow",`${t}: calc(max(${a}, ${l}) ${i?"+":"-"} var(--v-offset-${n?"left":"top"}));`)])])])})})]);function se(e){return["top","bottom"].includes(e.split("-")[0])?"var(--n-arrow-offset)":"var(--n-arrow-offset-vertical)"}function ee(e,t){const n=e.split("-")[0],r=["top","bottom"].includes(n)?"height: var(--n-space-arrow);":"width: var(--n-space-arrow);";return G(`[v-placement="${e}"] >`,[D("popover-shared",`
margin-${Qe[n]}: var(--n-space);
`,[Y("show-arrow",`
margin-${Qe[n]}: var(--n-space-arrow);
`),Y("overlap",`
margin: 0;
`),tr("popover-arrow-wrapper",`
right: 0;
left: 0;
top: 0;
bottom: 0;
${n}: 100%;
${Qe[n]}: auto;
${r}
`,[D("popover-arrow",t)])])])}const Mn={...ge.props,to:Ae.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 In({arrowClass:e,arrowStyle:t,arrowWrapperClass:n,arrowWrapperStyle:r,clsPrefix:o}){return C(),N("div",{key:"__popover-arrow__",style:Se(r),class:X([`${o}-popover-arrow-wrapper`,n])},[ve("div",{class:X([`${o}-popover-arrow`,e]),style:Se(t)},null,6)],6)}var wi=q({name:"PopoverBody",inheritAttrs:!1,props:Mn,setup(e,{slots:t,attrs:n}){const{namespaceRef:r,mergedClsPrefixRef:o,inlineThemeDisabled:i,mergedRtlRef:a}=mt(e),l=ge("Popover","-popover",mi,or,e,o),s=ir("Popover",a,o),d=z(null),f=J("NPopover"),h=z(null),c=z(e.show),y=z(!1);dn(()=>{const{show:$}=e;$&&!ti()&&!e.internalDeactivateImmediately&&(y.value=!0)});const g=O(()=>{const{trigger:$,onClickoutside:E}=e,S=[],{positionManuallyRef:{value:R}}=f;return R||($==="click"&&!E&&S.push([Zt,_,void 0,{capture:!0}]),$==="hover"&&S.push([oi,x])),E&&S.push([Zt,_,void 0,{capture:!0}]),(e.displayDirective==="show"||e.animated&&y.value)&&S.push([br,e.show]),S}),w=O(()=>{const{common:{cubicBezierEaseInOut:$,cubicBezierEaseIn:E,cubicBezierEaseOut:S},self:{space:R,spaceArrow:U,padding:v,fontSize:k,textColor:M,dividerColor:b,color:A,boxShadow:B,borderRadius:ie,arrowHeight:Pe,arrowOffset:ae,arrowOffsetVertical:je}}=l.value;return{"--n-box-shadow":B,"--n-bezier":$,"--n-bezier-ease-in":E,"--n-bezier-ease-out":S,"--n-font-size":k,"--n-text-color":M,"--n-color":A,"--n-divider-color":b,"--n-border-radius":ie,"--n-arrow-height":Pe,"--n-arrow-offset":ae,"--n-arrow-offset-vertical":je,"--n-padding":v,"--n-space":R,"--n-space-arrow":U}}),p=O(()=>{const $=e.width==="trigger"?void 0:Ne(e.width),E=[];$&&E.push({width:$});const{maxWidth:S,minWidth:R}=e;return S&&E.push({maxWidth:Ne(S)}),R&&E.push({maxWidth:Ne(R)}),i||E.push(w.value),E}),u=i?wt("popover",void 0,w,e):void 0;f.setBodyInstance({syncPosition:P}),me(()=>{f.setBodyInstance(null)}),oe(j(e,"show"),$=>{e.animated||($?c.value=!0:c.value=!1)});function P(){var $;($=d.value)==null||$.syncPosition()}function I($){e.trigger==="hover"&&e.keepAliveOnHover&&e.show&&f.handleMouseEnter($)}function m($){e.trigger==="hover"&&e.keepAliveOnHover&&f.handleMouseLeave($)}function x($){e.trigger==="hover"&&!T().contains(ot($))&&f.handleMouseMoveOutside($)}function _($){(e.trigger==="click"&&!T().contains(ot($))||e.onClickoutside)&&f.handleClickOutside($)}function T(){return f.getTriggerElement()}ne(He,h),ne(At,null),ne(Ct,null);function L(){if(u==null||u.onRender(),!(e.displayDirective==="show"||e.show||e.animated&&y.value))return null;let $;const E=f.internalRenderBodyRef.value,{value:S}=o;if(E)$=E([`${S}-popover-shared`,(s==null?void 0:s.value)&&`${S}-popover--rtl`,u==null?void 0:u.themeClass.value,e.overlap&&`${S}-popover-shared--overlap`,e.showArrow&&`${S}-popover-shared--show-arrow`,e.arrowPointToCenter&&`${S}-popover-shared--center-arrow`],h,p.value,I,m);else{const{value:R}=f.extraClassRef,{internalTrapFocus:U}=e,v=!Tt(t.header)||!Tt(t.footer),k=()=>{var b;const M=v?(C(),N(re,{key:1},[K(()=>Xe(t.header,A=>A?(C(),N("div",{key:2,class:X([`${S}-popover__header`,e.headerClass]),style:Se(e.headerStyle)},[K(()=>A)],6)):null)),K(()=>Xe(t.default,A=>A?(C(),N("div",{key:3,class:X([`${S}-popover__content`,e.contentClass]),style:Se(e.contentStyle)},[K(()=>{var B;return(B=t.default)==null?void 0:B.call(t)})],6)):null)),K(()=>Xe(t.footer,A=>A?(C(),N("div",{key:4,class:X([`${S}-popover__footer`,e.footerClass]),style:Se(e.footerStyle)},[K(()=>A)],6)):null))],64)):e.scrollable?(b=t.default)==null?void 0:b.call(t):(C(),N("div",{key:5,class:X([`${S}-popover__content`,e.contentClass]),style:Se(e.contentStyle)},[K(()=>{var A;return(A=t.default)==null?void 0:A.call(t)})],6));return[e.scrollable?(C(),W(sn,{key:6,themeOverrides:l.value.peerOverrides.Scrollbar,theme:l.value.peers.Scrollbar,contentClass:v?void 0:`${S}-popover__content ${e.contentClass??""}`,contentStyle:v?void 0:e.contentStyle},{default:()=>M},1032,["themeOverrides","theme","contentClass","contentStyle"])):M,e.showArrow?In({arrowClass:e.arrowClass,arrowStyle:e.arrowStyle,arrowWrapperClass:e.arrowWrapperClass,arrowWrapperStyle:e.arrowWrapperStyle,clsPrefix:S}):null]};$=Z("div",ye({class:[`${S}-popover`,`${S}-popover-shared`,(s==null?void 0:s.value)&&`${S}-popover--rtl`,u==null?void 0:u.themeClass.value,R.map(M=>`${S}-${M}`),{[`${S}-popover--scrollable`]:e.scrollable,[`${S}-popover--show-header-or-footer`]:v,[`${S}-popover--raw`]:e.raw,[`${S}-popover-shared--overlap`]:e.overlap,[`${S}-popover-shared--show-arrow`]:e.showArrow,[`${S}-popover-shared--center-arrow`]:e.arrowPointToCenter}],ref:h,style:p.value,onKeydown:f.handleKeydown,onMouseenter:I,onMouseleave:m},n),U?(C(),W(gi,{key:7,active:e.show,autoFocus:!0},{default:k},1032,["active"])):k())}return We($,g.value)}return{displayed:y,namespace:r,isMounted:f.isMountedRef,zIndex:f.zIndexRef,followerRef:d,adjustedTo:Ae(e),followerEnabled:c,renderContentNode:L}},render(){return C(),W(An,{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===Ae.tdkey},{_:1,default:gt(()=>this.animated?(C(),W(un,{key:8,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},1032,["appear","onEnter","onAfterLeave"])):this.renderContentNode())},8,["zIndex","show","enabled","to","x","y","flip","placement","containerClass","overlap","width","teleportDisabled"])}});const bi={key:1,style:{position:"fixed",top:0,right:0,bottom:0,left:0}},xi=Object.keys(Mn),Si={focus:["onFocus","onBlur"],click:["onClick"],hover:["onMouseenter","onMouseleave"],manual:[],nested:["onFocus","onBlur","onMouseenter","onMouseleave","onClick"]};function $i(e,t,n){Si[t].forEach(r=>{e.props?e.props=Object.assign({},e.props):e.props={};const o=e.props[r],i=n[r];o?e.props[r]=(...a)=>{o(...a),i(...a)}:e.props[r]=i})}const Pt={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:Ae.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},Ai={...ge.props,...Pt,internalOnAfterLeave:Function,internalRenderBody:Function};var Ci=q({name:"Popover",inheritAttrs:!1,props:Ai,slots:Object,__popover__:!0,setup(e){const t=an(),n=z(null),r=O(()=>e.show),o=z(e.defaultShow),i=ln(r,o),a=le(()=>e.disabled?!1:i.value),l=()=>{if(e.disabled)return!0;const{getDisabled:v}=e;return!!(v!=null&&v())},s=()=>l()?!1:i.value,d=$r(e,["arrow","showArrow"]),f=O(()=>e.overlap?!1:d.value);let h=null;const c=z(null),y=z(null),g=le(()=>e.x!==void 0&&e.y!==void 0);function w(v){const{"onUpdate:show":k,onUpdateShow:M,onShow:b,onHide:A}=e;o.value=v,k&&pe(k,v),M&&pe(M,v),v&&b&&pe(b,!0),v&&A&&pe(A,!1)}function p(){h&&h.syncPosition()}function u(){const{value:v}=c;v&&(window.clearTimeout(v),c.value=null)}function P(){const{value:v}=y;v&&(window.clearTimeout(v),y.value=null)}function I(){const v=l();if(e.trigger==="focus"&&!v){if(s())return;w(!0)}}function m(){const v=l();if(e.trigger==="focus"&&!v){if(!s())return;w(!1)}}function x(){const v=l();if(e.trigger==="hover"&&!v){if(P(),c.value!==null||s())return;const k=()=>{w(!0),c.value=null},{delay:M}=e;M===0?k():c.value=window.setTimeout(k,M)}}function _(){const v=l();if(e.trigger==="hover"&&!v){if(u(),y.value!==null||!s())return;const k=()=>{w(!1),y.value=null},{duration:M}=e;M===0?k():y.value=window.setTimeout(k,M)}}function T(){_()}function L(v){var k;s()&&(e.trigger==="click"&&(u(),P(),w(!1)),(k=e.onClickoutside)==null||k.call(e,v))}function $(){e.trigger==="click"&&!l()&&(u(),P(),w(!s()))}function E(v){e.internalTrapFocus&&v.key==="Escape"&&(u(),P(),w(!1))}function S(v){o.value=v}function R(){var v;return(v=n.value)==null?void 0:v.targetRef}function U(v){h=v}return ne("NPopover",{getTriggerElement:R,handleKeydown:E,handleMouseEnter:x,handleMouseLeave:_,handleClickOutside:L,handleMouseMoveOutside:T,setBodyInstance:U,positionManuallyRef:g,isMountedRef:t,zIndexRef:j(e,"zIndex"),extraClassRef:j(e,"internalExtraClass"),internalRenderBodyRef:j(e,"internalRenderBody")}),dn(()=>{i.value&&l()&&w(!1)}),{binderInstRef:n,positionManually:g,mergedShowConsideringDisabledProp:a,uncontrolledShow:o,mergedShowArrow:f,getMergedShow:s,setShow:S,handleClick:$,handleMouseEnter:x,handleMouseLeave:_,handleFocus:I,handleBlur:m,syncPosition:p}},render(){var o;const{positionManually:e,$slots:t}=this;let n,r=!1;if(!e&&(n=Qo(t,"trigger"),n)){n=xr(n),n=n.type===Sr?Z("span",[n]):n;const i={onClick:this.handleClick,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onFocus:this.handleFocus,onBlur:this.handleBlur};if((o=n.type)!=null&&o.__popover__)r=!0,n.props||(n.props={internalSyncTargetWithParent:!0,internalInheritedEventHandlers:[]}),n.props.internalSyncTargetWithParent=!0,n.props.internalInheritedEventHandlers?n.props.internalInheritedEventHandlers=[i,...n.props.internalInheritedEventHandlers]:n.props.internalInheritedEventHandlers=[i];else{const{internalInheritedEventHandlers:a}=this,l=[i,...a];$i(n,a?"nested":e?"manual":this.trigger,{onBlur:s=>{l.forEach(d=>{d.onBlur(s)})},onFocus:s=>{l.forEach(d=>{d.onFocus(s)})},onClick:s=>{l.forEach(d=>{d.onClick(s)})},onMouseenter:s=>{l.forEach(d=>{d.onMouseenter(s)})},onMouseleave:s=>{l.forEach(d=>{d.onMouseleave(s)})}})}}return C(),W(xn,{ref:"binderInstRef",syncTarget:!r,syncTargetWithParent:this.internalSyncTargetWithParent},{default:()=>{this.mergedShowConsideringDisabledProp;const i=this.getMergedShow();return[this.internalTrapFocus&&i?We((C(),N("div",bi)),[[$n,{enabled:i,zIndex:this.zIndex}]]):null,e?null:Z(Sn,null,{default:()=>n}),Z(wi,mn(this.$props,xi,{...this.$attrs,showArrow:this.mergedShowArrow,show:i}),{default:()=>{var a,l;return(l=(a=this.$slots).default)==null?void 0:l.call(a)},header:()=>{var a,l;return(l=(a=this.$slots).header)==null?void 0:l.call(a)},footer:()=>{var a,l;return(l=(a=this.$slots).footer)==null?void 0:l.call(a)}})]}},1032,["syncTarget","syncTargetWithParent"])}});function Fe(e,...t){return typeof e=="function"?e(...t):typeof e=="string"?at(e):typeof e=="number"?at(String(e)):null}const{cubicBezierEaseIn:Qt,cubicBezierEaseOut:en}=nr;function Pi({transformOrigin:e="inherit",duration:t=".2s",enterScale:n=".9",originalTransform:r="",originalTransition:o=""}={}){return[G("&.fade-in-scale-up-transition-leave-active",{transformOrigin:e,transition:`opacity ${t} ${Qt}, transform ${t} ${Qt} ${o&&`,${o}`}`}),G("&.fade-in-scale-up-transition-enter-active",{transformOrigin:e,transition:`opacity ${t} ${en}, transform ${t} ${en} ${o&&`,${o}`}`}),G("&.fade-in-scale-up-transition-enter-from, &.fade-in-scale-up-transition-leave-to",{opacity:0,transform:`${r} scale(${n})`}),G("&.fade-in-scale-up-transition-leave-from, &.fade-in-scale-up-transition-enter-to",{opacity:1,transform:`${r} scale(1)`})]}function tn(e){return Array.isArray(e)?e:[e]}const ht={STOP:"STOP"};function _n(e,t){const n=t(e);e.children!==void 0&&n!==ht.STOP&&e.children.forEach(r=>_n(r,t))}function ki(e,t={}){const{preserveGroup:n=!1}=t,r=[],o=n?a=>{a.isLeaf||(r.push(a.key),i(a.children))}:a=>{a.isLeaf||(a.isGroup||r.push(a.key),i(a.children))};function i(a){a.forEach(o)}return i(e),r}function Ei(e,t){const{isLeaf:n}=e;return n!==void 0?n:!t(e)}function Mi(e){return e.children}function Ii(e){return e.key}function _i(){return!1}function Oi(e,t){const{isLeaf:n}=e;return!(n===!1&&!Array.isArray(t(e)))}function Ti(e){return e.disabled===!0}function Ni(e,t){return e.isLeaf===!1&&!Array.isArray(t(e))}function et(e){var t;return e==null?[]:Array.isArray(e)?e:(t=e.checkedKeys)!==null&&t!==void 0?t:[]}function tt(e){var t;return e==null||Array.isArray(e)?[]:(t=e.indeterminateKeys)!==null&&t!==void 0?t:[]}function zi(e,t){const n=new Set(e);return t.forEach(r=>{n.has(r)||n.add(r)}),Array.from(n)}function Bi(e,t){const n=new Set(e);return t.forEach(r=>{n.has(r)&&n.delete(r)}),Array.from(n)}function Fi(e){return(e==null?void 0:e.type)==="group"}function ba(e){const t=new Map;return e.forEach((n,r)=>{t.set(n.key,r)}),n=>{var r;return(r=t.get(n))!==null&&r!==void 0?r:null}}class Ki extends Error{constructor(){super(),this.message="SubtreeNotLoadedError: checking a subtree whose required nodes are not fully loaded."}}function Li(e,t,n,r){return Ke(t.concat(e),n,r,!1)}function Di(e,t){const n=new Set;return e.forEach(r=>{const o=t.treeNodeMap.get(r);if(o!==void 0){let i=o.parent;for(;i!==null&&!(i.disabled||n.has(i.key));)n.add(i.key),i=i.parent}}),n}function Gi(e,t,n,r){const o=Ke(t,n,r,!1),i=Ke(e,n,r,!0),a=Di(e,n),l=[];return o.forEach(s=>{(i.has(s)||a.has(s))&&l.push(s)}),l.forEach(s=>o.delete(s)),o}function nt(e,t){const{checkedKeys:n,keysToCheck:r,keysToUncheck:o,indeterminateKeys:i,cascade:a,leafOnly:l,checkStrategy:s,allowNotLoaded:d}=e;if(!a)return r!==void 0?{checkedKeys:zi(n,r),indeterminateKeys:Array.from(i)}:o!==void 0?{checkedKeys:Bi(n,o),indeterminateKeys:Array.from(i)}:{checkedKeys:Array.from(n),indeterminateKeys:Array.from(i)};const{levelTreeNodeMap:f}=t;let h;o!==void 0?h=Gi(o,n,t,d):r!==void 0?h=Li(r,n,t,d):h=Ke(n,t,d,!1);const c=s==="parent",y=s==="child"||l,g=h,w=new Set,p=Math.max.apply(null,Array.from(f.keys()));for(let u=p;u>=0;u-=1){const P=u===0,I=f.get(u);for(const m of I){if(m.isLeaf)continue;const{key:x,shallowLoaded:_}=m;if(y&&_&&m.children.forEach(E=>{!E.disabled&&!E.isLeaf&&E.shallowLoaded&&g.has(E.key)&&g.delete(E.key)}),m.disabled||!_)continue;let T=!0,L=!1,$=!0;for(const E of m.children){const S=E.key;if(!E.disabled){if($&&($=!1),g.has(S))L=!0;else if(w.has(S)){L=!0,T=!1;break}else if(T=!1,L)break}}T&&!$?(c&&m.children.forEach(E=>{!E.disabled&&g.has(E.key)&&g.delete(E.key)}),g.add(x)):L&&w.add(x),P&&y&&g.has(x)&&g.delete(x)}}return{checkedKeys:Array.from(g),indeterminateKeys:Array.from(w)}}function Ke(e,t,n,r){const{treeNodeMap:o,getChildren:i}=t,a=new Set,l=new Set(e);return e.forEach(s=>{const d=o.get(s);d!==void 0&&_n(d,f=>{if(f.disabled)return ht.STOP;const{key:h}=f;if(!a.has(h)&&(a.add(h),l.add(h),Ni(f.rawNode,i))){if(r)return ht.STOP;if(!n)throw new Ki}})}),l}function Wi(e,{includeGroup:t=!1,includeSelf:n=!0},r){var o;const i=r.treeNodeMap;let a=e==null?null:(o=i.get(e))!==null&&o!==void 0?o:null;const l={keyPath:[],treeNodePath:[],treeNode:a};if(a!=null&&a.ignored)return l.treeNode=null,l;for(;a;)!a.ignored&&(t||!a.isGroup)&&l.treeNodePath.push(a),a=a.parent;return l.treeNodePath.reverse(),n||l.treeNodePath.pop(),l.keyPath=l.treeNodePath.map(s=>s.key),l}function Ri(e){if(e.length===0)return null;const t=e[0];return t.isGroup||t.ignored||t.disabled?t.getNext():t}function Hi(e,t){const n=e.siblings,r=n.length,{index:o}=e;return t?n[(o+1)%r]:o===n.length-1?null:n[o+1]}function nn(e,t,{loop:n=!1,includeDisabled:r=!1}={}){const o=t==="prev"?Ui:Hi,i={reverse:t==="prev"};let a=!1,l=null;function s(d){if(d!==null){if(d===e){if(!a)a=!0;else if(!e.disabled&&!e.isGroup){l=e;return}}else if((!d.disabled||r)&&!d.ignored&&!d.isGroup){l=d;return}if(d.isGroup){const f=kt(d,i);f!==null?l=f:s(o(d,n))}else{const f=o(d,!1);if(f!==null)s(f);else{const h=ji(d);h!=null&&h.isGroup?s(o(h,n)):n&&s(o(d,!0))}}}}return s(e),l}function Ui(e,t){const n=e.siblings,r=n.length,{index:o}=e;return t?n[(o-1+r)%r]:o===0?null:n[o-1]}function ji(e){return e.parent}function kt(e,t={}){const{reverse:n=!1}=t,{children:r}=e;if(r){const{length:o}=r,i=n?o-1:0,a=n?-1:o,l=n?-1:1;for(let s=i;s!==a;s+=l){const d=r[s];if(!d.disabled&&!d.ignored)if(d.isGroup){const f=kt(d,t);if(f!==null)return f}else return d}}return null}const Xi={getChild(){return this.ignored?null:kt(this)},getParent(){const{parent:e}=this;return e!=null&&e.isGroup?e.getParent():e},getNext(e={}){return nn(this,"next",e)},getPrev(e={}){return nn(this,"prev",e)}};function Zi(e,t){const n=t?new Set(t):void 0,r=[];function o(i){i.forEach(a=>{r.push(a),!(a.isLeaf||!a.children||a.ignored)&&(a.isGroup||n===void 0||n.has(a.key))&&o(a.children)})}return o(e),r}function Vi(e,t){const n=e.key;for(;t;){if(t.key===n)return!0;t=t.parent}return!1}function On(e,t,n,r,o,i=null,a=0){const l=[];return e.forEach((s,d)=>{var f;const h=Object.create(r);if(h.rawNode=s,h.siblings=l,h.level=a,h.index=d,h.isFirstChild=d===0,h.isLastChild=d+1===e.length,h.parent=i,!h.ignored){const c=o(s);Array.isArray(c)&&(h.children=On(c,t,n,r,o,h,a+1))}l.push(h),t.set(h.key,h),n.has(a)||n.set(a,[]),(f=n.get(a))===null||f===void 0||f.push(h)}),l}function qi(e,t={}){var n;const r=new Map,o=new Map,{getDisabled:i=Ti,getIgnored:a=_i,getIsGroup:l=Fi,getKey:s=Ii}=t,d=(n=t.getChildren)!==null&&n!==void 0?n:Mi,f=t.ignoreEmptyChildren?m=>{const x=d(m);return Array.isArray(x)?x.length?x:null:x}:d,h=Object.assign({get key(){return s(this.rawNode)},get disabled(){return i(this.rawNode)},get isGroup(){return l(this.rawNode)},get isLeaf(){return Ei(this.rawNode,f)},get shallowLoaded(){return Oi(this.rawNode,f)},get ignored(){return a(this.rawNode)},contains(m){return Vi(this,m)}},Xi),c=On(e,r,o,h,f);function y(m){if(m==null)return null;const x=r.get(m);return x&&!x.isGroup&&!x.ignored?x:null}function g(m){if(m==null)return null;const x=r.get(m);return x&&!x.ignored?x:null}function w(m,x){const _=g(m);return _?_.getPrev(x):null}function p(m,x){const _=g(m);return _?_.getNext(x):null}function u(m){const x=g(m);return x?x.getParent():null}function P(m){const x=g(m);return x?x.getChild():null}const I={treeNodes:c,treeNodeMap:r,levelTreeNodeMap:o,maxLevel:Math.max(...o.keys()),getChildren:f,getFlattenedNodes(m){return Zi(c,m)},getNode:y,getPrev:w,getNext:p,getParent:u,getChild:P,getFirstAvailableNode(){return Ri(c)},getPath(m,x={}){return Wi(m,x,I)},getCheckedKeys(m,x={}){const{cascade:_=!0,leafOnly:T=!1,checkStrategy:L="all",allowNotLoaded:$=!1}=x;return nt({checkedKeys:et(m),indeterminateKeys:tt(m),cascade:_,leafOnly:T,checkStrategy:L,allowNotLoaded:$},I)},check(m,x,_={}){const{cascade:T=!0,leafOnly:L=!1,checkStrategy:$="all",allowNotLoaded:E=!1}=_;return nt({checkedKeys:et(x),indeterminateKeys:tt(x),keysToCheck:m==null?[]:tn(m),cascade:T,leafOnly:L,checkStrategy:$,allowNotLoaded:E},I)},uncheck(m,x,_={}){const{cascade:T=!0,leafOnly:L=!1,checkStrategy:$="all",allowNotLoaded:E=!1}=_;return nt({checkedKeys:et(x),indeterminateKeys:tt(x),keysToUncheck:m==null?[]:tn(m),cascade:T,leafOnly:L,checkStrategy:$,allowNotLoaded:E},I)},getNonLeafKeys(m={}){return ki(c,m)}};return I}var Yi=q({name:"ChevronRight",render(){return(()=>{const e=rr("6ab04425f4fcb756");return e[0]||(e[0]=ve("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[ve("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"})],-1))})()}});function Ji(e){return t=>{t?e.value=t.$el:e.value=null}}var Qi=D("icon",`
height: 1em;
width: 1em;
line-height: 1em;
text-align: center;
display: inline-block;
position: relative;
fill: currentColor;
`,[Y("color-transition",{transition:"color .3s var(--n-bezier)"}),Y("depth",{color:"var(--n-color)"},[G("svg",{opacity:"var(--n-opacity)",transition:"opacity .3s var(--n-bezier)"})]),G("svg",{height:"1em",width:"1em"})]);const ea={...ge.props,depth:[String,Number],size:[Number,String],color:String,component:[Object,Function]},ta=q({_n_icon__:!0,name:"Icon",inheritAttrs:!1,props:ea,setup(e){const{mergedClsPrefixRef:t,inlineThemeDisabled:n}=mt(e),r=ge("Icon","-icon",Qi,ar,e,t),o=O(()=>{const{depth:a}=e,{common:{cubicBezierEaseInOut:l},self:s}=r.value;if(a!==void 0){const{color:d,[`opacity${a}Depth`]:f}=s;return{"--n-bezier":l,"--n-color":d,"--n-opacity":f}}return{"--n-bezier":l,"--n-color":"","--n-opacity":""}}),i=n?wt("icon",O(()=>`${e.depth||"d"}`),o,e):void 0;return{mergedClsPrefix:t,mergedStyle:O(()=>{const{size:a,color:l}=e;return{fontSize:Ne(a),color:l}}),cssVars:n?void 0:o,themeClass:i==null?void 0:i.themeClass,onRender:i==null?void 0:i.onRender}},render(){var a,l,s;const{$parent:e,depth:t,mergedClsPrefix:n,component:r,onRender:o,themeClass:i}=this;return(a=e==null?void 0:e.$options)!=null&&a._n_icon__&&ze("icon","don't wrap `n-icon` inside `n-icon`"),o==null||o(),Z("i",ye(this.$attrs,{role:"img",class:[`${n}-icon`,i,{[`${n}-icon--depth`]:t,[`${n}-icon--color-transition`]:t!==void 0}],style:[this.cssVars,this.mergedStyle]}),r?Z(r):(s=(l=this.$slots).default)==null?void 0:s.call(l))}}),Et=fe("n-dropdown-menu"),Ue=fe("n-dropdown"),rn=fe("n-dropdown-option");var Tn=q({name:"DropdownDivider",props:{clsPrefix:{type:String,required:!0}},render(){return C(),N("div",{class:X(`${this.clsPrefix}-dropdown-divider`)},null,2)}});function pt(e,t){return e.type==="submenu"||e.type===void 0&&e[t]!==void 0}function na(e){return e.type==="group"}function Nn(e){return e.type==="divider"}function ra(e){return e.type==="render"}function oa(e,t,n){const r=z(e.value);let o=null;return oe(e,i=>{o!==null&&window.clearTimeout(o),i===!0?n&&!n.value?r.value=!0:o=window.setTimeout(()=>{r.value=!0},t):r.value=!1}),r}var zn=q({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){const t=J(Ue),{hoverKeyRef:n,keyboardKeyRef:r,lastToggledSubmenuKeyRef:o,pendingKeyPathRef:i,activeKeyPathRef:a,animatedRef:l,mergedShowRef:s,renderLabelRef:d,renderIconRef:f,labelFieldRef:h,childrenFieldRef:c,renderOptionRef:y,nodePropsRef:g,menuPropsRef:w}=t,p=J(rn,null),u=J(Et),P=J(He),I=O(()=>e.tmNode.rawNode),m=O(()=>{const{value:b}=c;return pt(e.tmNode.rawNode,b)}),x=O(()=>{const{disabled:b}=e.tmNode;return b}),_=O(()=>{if(!m.value)return!1;const{key:b,disabled:A}=e.tmNode;if(A)return!1;const{value:B}=n,{value:ie}=r,{value:Pe}=o,{value:ae}=i;return B!==null?ae.includes(b):ie!==null?ae.includes(b)&&ae[ae.length-1]!==b:Pe!==null?ae.includes(b):!1}),T=O(()=>r.value===null&&!l.value),L=oa(_,300,T),$=O(()=>!!(p!=null&&p.enteringSubmenuRef.value)),E=z(!1);ne(rn,{enteringSubmenuRef:E});function S(){E.value=!0}function R(){E.value=!1}function U(){const{parentKey:b,tmNode:A}=e;A.disabled||s.value&&(o.value=b,r.value=null,n.value=A.key)}function v(){const{tmNode:b}=e;b.disabled||s.value&&n.value!==b.key&&U()}function k(b){if(e.tmNode.disabled||!s.value)return;const{relatedTarget:A}=b;A&&!Ut({target:A},"dropdownOption")&&!Ut({target:A},"scrollbarRail")&&(n.value=null)}function M(){const{value:b}=m,{tmNode:A}=e;s.value&&!b&&!A.disabled&&(t.doSelect(A.key,A.rawNode),t.doUpdateShow(!1))}return{labelField:h,renderLabel:d,renderIcon:f,siblingHasIcon:u.showIconRef,siblingHasSubmenu:u.hasSubmenuRef,menuProps:w,popoverBody:P,animated:l,mergedShowSubmenu:O(()=>L.value&&!$.value),rawNode:I,hasSubmenu:m,pending:le(()=>{const{value:b}=i,{key:A}=e.tmNode;return b.includes(A)}),childActive:le(()=>{const{value:b}=a,{key:A}=e.tmNode,B=b.findIndex(ie=>A===ie);return B===-1?!1:B<b.length-1}),active:le(()=>{const{value:b}=a,{key:A}=e.tmNode,B=b.findIndex(ie=>A===ie);return B===-1?!1:B===b.length-1}),mergedDisabled:x,renderOption:y,nodeProps:g,handleClick:M,handleMouseMove:v,handleMouseEnter:U,handleMouseLeave:k,handleSubmenuBeforeEnter:S,handleSubmenuAfterEnter:R}},render(){var p;const{animated:e,rawNode:t,mergedShowSubmenu:n,clsPrefix:r,siblingHasIcon:o,siblingHasSubmenu:i,renderLabel:a,renderIcon:l,renderOption:s,nodeProps:d,props:f,scrollable:h}=this;let c=null;if(n){const u=(p=this.menuProps)==null?void 0:p.call(this,t,t.children);c=(P=>(C(),W(Bn,ye({key:1},u,{clsPrefix:r,scrollable:this.scrollable,tmNodes:this.tmNode.children,parentKey:this.tmNode.key}),null,16,["clsPrefix","scrollable","tmNodes","parentKey"])))()}const y={class:[`${r}-dropdown-option-body`,this.pending&&`${r}-dropdown-option-body--pending`,this.active&&`${r}-dropdown-option-body--active`,this.childActive&&`${r}-dropdown-option-body--child-active`,this.mergedDisabled&&`${r}-dropdown-option-body--disabled`],onMousemove:this.handleMouseMove,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onClick:this.handleClick},g=d==null?void 0:d(t),w=(C(),N("div",ye({class:[`${r}-dropdown-option`,g==null?void 0:g.class],"data-dropdown-option":!0},g),[K(()=>Z("div",ye(y,f),[(C(),N("div",{class:X([`${r}-dropdown-option-body__prefix`,o&&`${r}-dropdown-option-body__prefix--show-icon`])},[K(()=>[l?l(t):Fe(t.icon)])],2)),(C(),N("div",{"data-dropdown-option":!0,class:X(`${r}-dropdown-option-body__label`)},[a?(C(),N(re,{key:0},[K(()=>a(t))],64)):(C(),N(re,{key:1},[K(()=>Fe(t[this.labelField]??t.title))],64))],2)),(C(),N("div",{"data-dropdown-option":!0,class:X([`${r}-dropdown-option-body__suffix`,i&&`${r}-dropdown-option-body__suffix--has-submenu`])},[this.hasSubmenu?(C(),W(ta,{key:0},{_:1,default:gt(()=>(C(),W(Yi)))})):K(()=>null)],2))])),this.hasSubmenu?(C(),W(xn,{key:0},{default:()=>[(C(),W(Sn,null,{default:()=>(C(),N("div",{class:X(`${r}-dropdown-offset-container`)},[(C(),W(An,{show:this.mergedShowSubmenu,placement:this.placement,to:h&&this.popoverBody||void 0,teleportDisabled:!h},{default:()=>(C(),N("div",{class:X(`${r}-dropdown-menu-wrapper`)},[e?(C(),W(un,{key:0,onBeforeEnter:this.handleSubmenuBeforeEnter,onAfterEnter:this.handleSubmenuAfterEnter,name:"fade-in-scale-up-transition",appear:!0},{default:()=>c},1032,["onBeforeEnter","onAfterEnter"])):(C(),N(re,{key:1},[K(()=>c)],64))],2))},1032,["show","placement","to","teleportDisabled"]))],2))},1024))]},1024)):K(()=>null)],16));return s?s({node:w,option:t}):w}}),ia=q({name:"DropdownGroupHeader",props:{clsPrefix:{type:String,required:!0},tmNode:{type:Object,required:!0}},setup(){const{showIconRef:e,hasSubmenuRef:t}=J(Et),{renderLabelRef:n,labelFieldRef:r,nodePropsRef:o,renderOptionRef:i}=J(Ue);return{labelField:r,showIcon:e,hasSubmenu:t,renderLabel:n,nodeProps:o,renderOption:i}},render(){const{clsPrefix:e,hasSubmenu:t,showIcon:n,nodeProps:r,renderLabel:o,renderOption:i}=this,{rawNode:a}=this.tmNode,l=(C(),N("div",ye({class:`${e}-dropdown-option`},r==null?void 0:r(a)),[ve("div",{class:X(`${e}-dropdown-option-body ${e}-dropdown-option-body--group`)},[ve("div",{"data-dropdown-option":!0,class:X([`${e}-dropdown-option-body__prefix`,n&&`${e}-dropdown-option-body__prefix--show-icon`])},[K(()=>Fe(a.icon))],2),ve("div",{class:X(`${e}-dropdown-option-body__label`),"data-dropdown-option":!0},[o?(C(),N(re,{key:0},[K(()=>o(a))],64)):(C(),N(re,{key:1},[K(()=>Fe(a.title??a[this.labelField]))],64))],2),ve("div",{class:X([`${e}-dropdown-option-body__suffix`,t&&`${e}-dropdown-option-body__suffix--has-submenu`]),"data-dropdown-option":!0},null,2)],2)],16));return i?i({node:l,option:a}):l}}),aa=q({name:"NDropdownGroup",props:{clsPrefix:{type:String,required:!0},tmNode:{type:Object,required:!0},parentKey:{type:[String,Number],default:null}},render(){const{tmNode:e,parentKey:t,clsPrefix:n}=this,{children:r}=e;return C(),N(re,null,[(C(),W(ia,{clsPrefix:n,tmNode:e,key:e.key},null,8,["clsPrefix","tmNode"])),K(()=>r==null?void 0:r.map(o=>{const{rawNode:i}=o;return i.show===!1?null:Nn(i)?Z(Tn,{clsPrefix:n,key:o.key}):o.isGroup?(ze("dropdown","`group` node is not allowed to be put in `group` node."),null):(C(),W(zn,{clsPrefix:n,tmNode:o,parentKey:t,key:o.key},null,8,["clsPrefix","tmNode","parentKey"]))}))],64)}}),sa=q({name:"DropdownRenderOption",props:{tmNode:{type:Object,required:!0}},render(){const{rawNode:{render:e,props:t}}=this.tmNode;return Z("div",t,[e==null?void 0:e()])}}),Bn=q({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){const{renderIconRef:t,childrenFieldRef:n}=J(Ue);ne(Et,{showIconRef:O(()=>{const o=t.value;return e.tmNodes.some(i=>{var l;if(i.isGroup)return(l=i.children)==null?void 0:l.some(({rawNode:s})=>o?o(s):s.icon);const{rawNode:a}=i;return o?o(a):a.icon})}),hasSubmenuRef:O(()=>{const{value:o}=n;return e.tmNodes.some(i=>{var l;if(i.isGroup)return(l=i.children)==null?void 0:l.some(({rawNode:s})=>pt(s,o));const{rawNode:a}=i;return pt(a,o)})})});const r=z(null);return ne(Ct,null),ne(At,null),ne(He,r),{bodyRef:r}},render(){const{parentKey:e,clsPrefix:t,scrollable:n}=this,r=this.tmNodes.map(o=>{const{rawNode:i}=o;return i.show===!1?null:ra(i)?(C(),W(sa,{tmNode:o,key:o.key},null,8,["tmNode"])):Nn(i)?(C(),W(Tn,{clsPrefix:t,key:o.key},null,8,["clsPrefix"])):na(i)?(C(),W(aa,{clsPrefix:t,tmNode:o,parentKey:e,key:o.key},null,8,["clsPrefix","tmNode","parentKey"])):(C(),W(zn,{clsPrefix:t,tmNode:o,parentKey:e,key:o.key,props:i.props,scrollable:n},null,8,["clsPrefix","tmNode","parentKey","props","scrollable"]))});return C(),N("div",{class:X([`${t}-dropdown-menu`,n&&`${t}-dropdown-menu--scrollable`]),ref:"bodyRef"},[n?(C(),W(sn,{key:0,contentClass:`${t}-dropdown-menu__content`},{default:()=>r},1032,["contentClass"])):(C(),N(re,{key:1},[K(()=>r)],64)),this.showArrow?(C(),N(re,{key:2},[K(()=>In({clsPrefix:t,arrowStyle:this.arrowStyle,arrowClass:void 0,arrowWrapperClass:void 0,arrowWrapperStyle:void 0}))],64)):K(()=>null)],2)}}),la=D("dropdown-menu",`
transform-origin: var(--v-transform-origin);
background-color: var(--n-color);
border-radius: var(--n-border-radius);
box-shadow: var(--n-box-shadow);
position: relative;
transition:
background-color .3s var(--n-bezier),
box-shadow .3s var(--n-bezier);
`,[Pi(),D("dropdown-option",`
position: relative;
`,[G("a",`
text-decoration: none;
color: inherit;
outline: none;
`,[G("&::before",`
content: "";
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
`)]),D("dropdown-option-body",`
display: flex;
cursor: pointer;
position: relative;
height: var(--n-option-height);
line-height: var(--n-option-height);
font-size: var(--n-font-size);
color: var(--n-option-text-color);
transition: color .3s var(--n-bezier);
`,[G("&::before",`
content: "";
position: absolute;
top: 0;
bottom: 0;
left: 4px;
right: 4px;
transition: background-color .3s var(--n-bezier);
border-radius: var(--n-border-radius);
`),Ee("disabled",[Y("pending",`
color: var(--n-option-text-color-hover);
`,[te("prefix, suffix",`
color: var(--n-option-text-color-hover);
`),G("&::before","background-color: var(--n-option-color-hover);")]),Y("active",`
color: var(--n-option-text-color-active);
`,[te("prefix, suffix",`
color: var(--n-option-text-color-active);
`),G("&::before","background-color: var(--n-option-color-active);")]),Y("child-active",`
color: var(--n-option-text-color-child-active);
`,[te("prefix, suffix",`
color: var(--n-option-text-color-child-active);
`)])]),Y("disabled",`
cursor: not-allowed;
opacity: var(--n-option-opacity-disabled);
`),Y("group",`
font-size: calc(var(--n-font-size) - 1px);
color: var(--n-group-header-text-color);
`,[te("prefix",`
width: calc(var(--n-option-prefix-width) / 2);
`,[Y("show-icon",`
width: calc(var(--n-option-icon-prefix-width) / 2);
`)])]),te("prefix",`
width: var(--n-option-prefix-width);
display: flex;
justify-content: center;
align-items: center;
color: var(--n-prefix-color);
transition: color .3s var(--n-bezier);
z-index: 1;
`,[Y("show-icon",`
width: var(--n-option-icon-prefix-width);
`),D("icon",`
font-size: var(--n-option-icon-size);
`)]),te("label",`
white-space: nowrap;
flex: 1;
z-index: 1;
`),te("suffix",`
box-sizing: border-box;
flex-grow: 0;
flex-shrink: 0;
display: flex;
justify-content: flex-end;
align-items: center;
min-width: var(--n-option-suffix-width);
padding: 0 8px;
transition: color .3s var(--n-bezier);
color: var(--n-suffix-color);
z-index: 1;
`,[Y("has-submenu",`
width: var(--n-option-icon-suffix-width);
`),D("icon",`
font-size: var(--n-option-icon-size);
`)]),D("dropdown-menu","pointer-events: all;")]),D("dropdown-offset-container",`
pointer-events: none;
position: absolute;
left: 0;
right: 0;
top: -4px;
bottom: -4px;
`)]),D("dropdown-divider",`
transition: background-color .3s var(--n-bezier);
background-color: var(--n-divider-color);
height: 1px;
margin: 4px 0;
`),D("dropdown-menu-wrapper",`
transform-origin: var(--v-transform-origin);
width: fit-content;
`),G(">",[D("scrollbar",`
height: inherit;
max-height: inherit;
`)]),Ee("scrollable",`
padding: var(--n-padding);
`),Y("scrollable",[te("content",`
padding: var(--n-padding);
`)])]);const ua={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]},da=Object.keys(Pt),ca={...Pt,...ua,...ge.props};var xa=q({name:"Dropdown",inheritAttrs:!1,props:ca,setup(e){const t=z(!1),n=ln(j(e,"show"),t),r=O(()=>{const{keyField:v,childrenField:k}=e;return qi(e.options,{getKey(M){return M[v]},getDisabled(M){return M.disabled===!0},getIgnored(M){return M.type==="divider"||M.type==="render"},getChildren(M){return M[k]}})}),o=O(()=>r.value.treeNodes),i=z(null),a=z(null),l=z(null),s=O(()=>i.value??a.value??l.value??null),d=O(()=>r.value.getPath(s.value).keyPath),f=O(()=>r.value.getPath(e.value).keyPath),h=le(()=>e.keyboard&&n.value);Jo({keydown:{ArrowUp:{prevent:!0,handler:T},ArrowRight:{prevent:!0,handler:_},ArrowDown:{prevent:!0,handler:L},ArrowLeft:{prevent:!0,handler:x},Enter:{prevent:!0,handler:$},Escape:m}},h);const{mergedClsPrefixRef:c,inlineThemeDisabled:y,mergedComponentPropsRef:g}=mt(e),w=O(()=>{var v,k;return e.size||((k=(v=g==null?void 0:g.value)==null?void 0:v.Dropdown)==null?void 0:k.size)||"medium"}),p=ge("Dropdown","-dropdown",la,sr,e,c);ne(Ue,{labelFieldRef:j(e,"labelField"),childrenFieldRef:j(e,"childrenField"),renderLabelRef:j(e,"renderLabel"),renderIconRef:j(e,"renderIcon"),hoverKeyRef:i,keyboardKeyRef:a,lastToggledSubmenuKeyRef:l,pendingKeyPathRef:d,activeKeyPathRef:f,animatedRef:j(e,"animated"),mergedShowRef:n,nodePropsRef:j(e,"nodeProps"),renderOptionRef:j(e,"renderOption"),menuPropsRef:j(e,"menuProps"),doSelect:u,doUpdateShow:P}),oe(n,v=>{!e.animated&&!v&&I()});function u(v,k){const{onSelect:M}=e;M&&pe(M,v,k)}function P(v){const{"onUpdate:show":k,onUpdateShow:M}=e;k&&pe(k,v),M&&pe(M,v),t.value=v}function I(){i.value=null,a.value=null,l.value=null}function m(){P(!1)}function x(){S("left")}function _(){S("right")}function T(){S("up")}function L(){S("down")}function $(){const v=E();v!=null&&v.isLeaf&&n.value&&(u(v.key,v.rawNode),P(!1))}function E(){const{value:v}=r,{value:k}=s;return!v||k===null?null:v.getNode(k)??null}function S(v){const{value:k}=s,{value:{getFirstAvailableNode:M}}=r;let b=null;if(k===null){const A=M();A!==null&&(b=A.key)}else{const A=E();if(A){let B;switch(v){case"down":B=A.getNext();break;case"up":B=A.getPrev();break;case"right":B=A.getChild();break;case"left":B=A.getParent()}B&&(b=B.key)}}b!==null&&(i.value=null,a.value=b)}const R=O(()=>{const{inverted:v}=e,k=w.value,{common:{cubicBezierEaseInOut:M},self:b}=p.value,{padding:A,dividerColor:B,borderRadius:ie,optionOpacityDisabled:Pe,[he("optionIconSuffixWidth",k)]:ae,[he("optionSuffixWidth",k)]:je,[he("optionIconPrefixWidth",k)]:Fn,[he("optionPrefixWidth",k)]:Kn,[he("fontSize",k)]:Ln,[he("optionHeight",k)]:Dn,[he("optionIconSize",k)]:Gn}=b,F={"--n-bezier":M,"--n-font-size":Ln,"--n-padding":A,"--n-border-radius":ie,"--n-option-height":Dn,"--n-option-prefix-width":Kn,"--n-option-icon-prefix-width":Fn,"--n-option-suffix-width":je,"--n-option-icon-suffix-width":ae,"--n-option-icon-size":Gn,"--n-divider-color":B,"--n-option-opacity-disabled":Pe};return v?(F["--n-color"]=b.colorInverted,F["--n-option-color-hover"]=b.optionColorHoverInverted,F["--n-option-color-active"]=b.optionColorActiveInverted,F["--n-option-text-color"]=b.optionTextColorInverted,F["--n-option-text-color-hover"]=b.optionTextColorHoverInverted,F["--n-option-text-color-active"]=b.optionTextColorActiveInverted,F["--n-option-text-color-child-active"]=b.optionTextColorChildActiveInverted,F["--n-prefix-color"]=b.prefixColorInverted,F["--n-suffix-color"]=b.suffixColorInverted,F["--n-group-header-text-color"]=b.groupHeaderTextColorInverted):(F["--n-color"]=b.color,F["--n-option-color-hover"]=b.optionColorHover,F["--n-option-color-active"]=b.optionColorActive,F["--n-option-text-color"]=b.optionTextColor,F["--n-option-text-color-hover"]=b.optionTextColorHover,F["--n-option-text-color-active"]=b.optionTextColorActive,F["--n-option-text-color-child-active"]=b.optionTextColorChildActive,F["--n-prefix-color"]=b.prefixColor,F["--n-suffix-color"]=b.suffixColor,F["--n-group-header-text-color"]=b.groupHeaderTextColor),F}),U=y?wt("dropdown",O(()=>`${w.value[0]}${e.inverted?"i":""}`),R,e):void 0;return{mergedClsPrefix:c,mergedTheme:p,mergedSize:w,tmNodes:o,mergedShow:n,handleAfterLeave:()=>{e.animated&&I()},doUpdateShow:P,cssVars:y?void 0:R,themeClass:U==null?void 0:U.themeClass,onRender:U==null?void 0:U.onRender}},render(){const e=(r,o,i,a,l)=>{var c;const{mergedClsPrefix:s,menuProps:d}=this;(c=this.onRender)==null||c.call(this);const f=(d==null?void 0:d(void 0,this.tmNodes.map(y=>y.rawNode)))||{},h={ref:Ji(o),class:[r,`${s}-dropdown`,`${s}-dropdown--${this.mergedSize}-size`,this.themeClass],clsPrefix:s,tmNodes:this.tmNodes,style:[...i,this.cssVars],showArrow:this.showArrow,arrowStyle:this.arrowStyle,scrollable:this.scrollable,onMouseenter:a,onMouseleave:l};return Z(Bn,ye(this.$attrs,h,f))},{mergedTheme:t}=this,n={show:this.mergedShow,theme:t.peers.Popover,themeOverrides:t.peerOverrides.Popover,internalOnAfterLeave:this.handleAfterLeave,internalRenderBody:e,onUpdateShow:this.doUpdateShow,"onUpdate:show":void 0};return C(),W(Ci,mn(this.$props,da,n),{_:1,trigger:gt(()=>{var r,o;return(o=(r=this.$slots).default)==null?void 0:o.call(r)})},16)}});export{$t as A,xn as B,Yi as C,xa as D,fn as E,Re as F,No as G,Ji as H,ma as I,Jo as J,Zi as K,Ci as P,Ki as S,Sn as V,qi as a,si as b,Xo as c,ca as d,_e as e,Ne as f,Pi as g,Ut as h,wa as i,ba as j,mn as k,Zo as l,Zt as m,An as n,Br as o,Pt as p,Fr as q,Fe as r,bt as s,Wr as t,Ae as u,Lr as v,Rr as w,de as x,zt as y,hn as z};