go-proxy-bingai/web/assets/index-d9a4ae7e.js

1161 lines
233 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import{r as E,w as Ce,o as We,a as Qe,i as Oa,c as F,b as Ba,h as Ma,d as io,e as Se,f as La,g as Te,j as Ve,k as ie,m as Lr,l as Er,p as Qt,u as Me,n as K,q as Pe,s as Ar,t as Ea,v as vt,x as sn,C as Aa,y as Da,z as Z,A as Dr,B as u,D as Fr,L as ao,E as qt,F as er,G as tr,H as Fa,I as Na,J as Nr,K as Ha,M as Je,N as lo,O as Hr,P as jr,Q as mt,R as so,S as Pr,T as dn,U as ja,V as un,W as cn,X as Kt,Y as Wa,Z as fn,_ as Ua,$ as Va,a0 as Ka,a1 as qa,a2 as Ga,a3 as Xa,a4 as Ya,a5 as uo,a6 as Ke,a7 as Oe,a8 as P,a9 as L,aa as H,ab as Ie,ac as re,ad as Fe,ae as fe,af as ne,ag as ze,ah as W,ai as Za,aj as it,ak as $t,al as hn,am as co,an as pn,ao as vn,ap as Ja,aq as _t,ar as Ye,as as De,at as fo,au as gn,av as Qa,aw as he,ax as ho,ay as ce,az as te,aA as Ot,aB as el,aC as mn,aD as po,aE as vo,aF as go,aG as ht,aH as tl,aI as rl,aJ as nl,aK as mo,aL as ol,aM as il,aN as al,aO as Wr,aP as Bt,aQ as Pt,aR as ll,aS as Ur,aT as Gt,aU as bo,aV as sl,aW as dl,aX as bn,aY as ul,aZ as yn,a_ as cl,a$ as kr,b0 as fl,b1 as hl,b2 as bt,b3 as pl,b4 as yo,b5 as wo,b6 as xo,b7 as Co,b8 as So,b9 as be,ba as wn,bb as vl,bc as gl,bd as me,be as Ae,bf as at,bg as Mt,bh as U,bi as je,bj as J,bk as X,bl as zt,bm as Ue,bn as ml,bo as Po,bp as bl,bq as xn,br as yl,bs as Xt,bt as Vr,bu as wl,bv as xl}from"./index-6982f66e.js";let Yt=[];const ko=new WeakMap;function Cl(){Yt.forEach(e=>e(...ko.get(e))),Yt=[]}function $o(e,...t){ko.set(e,t),!Yt.includes(e)&&Yt.push(e)===1&&requestAnimationFrame(Cl)}function Cn(e,t){let{target:r}=e;for(;r;){if(r.dataset&&r.dataset[t]!==void 0)return!0;r=r.parentElement}return!1}function Sl(e,t="default",r=[]){const o=e.$slots[t];return o===void 0?r:o()}function Pl(e){return t=>{t?e.value=t.$el:e.value=null}}const kl=/^(\d|\.)+$/,Sn=/(\d|\.)+/;function He(e,{c:t=1,offset:r=0,attachPx:n=!0}={}){if(typeof e=="number"){const o=(e+r)*t;return o===0?"0":`${o}px`}else if(typeof e=="string")if(kl.test(e)){const o=(Number(e)+r)*t;return n?o===0?"0":`${o}px`:`${o}`}else{const o=Sn.exec(e);return o?e.replace(Sn,String((Number(o[0])+r)*t)):e}return e}let dr;function $l(){return dr===void 0&&(dr=navigator.userAgent.includes("Node.js")||navigator.userAgent.includes("jsdom")),dr}function zl(e,t,r){if(!t)return e;const n=E(e.value);let o=null;return Ce(e,i=>{o!==null&&window.clearTimeout(o),i===!0?r&&!r.value?n.value=!0:o=window.setTimeout(()=>{n.value=!0},t):n.value=!1}),n}let pt,Tt;const Tl=()=>{var e,t;pt=Oa?(t=(e=document)===null||e===void 0?void 0:e.fonts)===null||t===void 0?void 0:t.ready:void 0,Tt=!1,pt!==void 0?pt.then(()=>{Tt=!0}):Tt=!0};Tl();function Il(e){if(Tt)return;let t=!1;We(()=>{Tt||pt==null||pt.then(()=>{t||e()})}),Qe(()=>{t=!0})}function rr(e,t){return Ce(e,r=>{r!==void 0&&(t.value=r)}),F(()=>e.value===void 0?t.value:e.value)}function Rl(e,t){return F(()=>{for(const r of t)if(e[r]!==void 0)return e[r];return e[t[t.length-1]]})}function _l(e={},t){const r=Ba({ctrl:!1,command:!1,win:!1,shift:!1,tab:!1}),{keydown:n,keyup:o}=e,i=a=>{switch(a.key){case"Control":r.ctrl=!0;break;case"Meta":r.command=!0,r.win=!0;break;case"Shift":r.shift=!0;break;case"Tab":r.tab=!0;break}n!==void 0&&Object.keys(n).forEach(d=>{if(d!==a.key)return;const c=n[d];if(typeof c=="function")c(a);else{const{stop:f=!1,prevent:h=!1}=c;f&&a.stopPropagation(),h&&a.preventDefault(),c.handler(a)}})},l=a=>{switch(a.key){case"Control":r.ctrl=!1;break;case"Meta":r.command=!1,r.win=!1;break;case"Shift":r.shift=!1;break;case"Tab":r.tab=!1;break}o!==void 0&&Object.keys(o).forEach(d=>{if(d!==a.key)return;const c=o[d];if(typeof c=="function")c(a);else{const{stop:f=!1,prevent:h=!1}=c;f&&a.stopPropagation(),h&&a.preventDefault(),c.handler(a)}})},s=()=>{(t===void 0||t.value)&&(Te("keydown",document,i),Te("keyup",document,l)),t!==void 0&&Ce(t,a=>{a?(Te("keydown",document,i),Te("keyup",document,l)):(Se("keydown",document,i),Se("keyup",document,l))})};return Ma()?(io(s),Qe(()=>{(t===void 0||t.value)&&(Se("keydown",document,i),Se("keyup",document,l))})):s(),La(r)}const Ol=Ve("n-internal-select-menu-body"),zo="__disabled__";function gt(e){const t=ie(Lr,null),r=ie(Er,null),n=ie(Qt,null),o=ie(Ol,null),i=E();if(typeof document<"u"){i.value=document.fullscreenElement;const l=()=>{i.value=document.fullscreenElement};We(()=>{Te("fullscreenchange",document,l)}),Qe(()=>{Se("fullscreenchange",document,l)})}return Me(()=>{var l;const{to:s}=e;return s!==void 0?s===!1?zo:s===!0?i.value||"body":s:t!=null&&t.value?(l=t.value.$el)!==null&&l!==void 0?l:t.value:r!=null&&r.value?r.value:n!=null&&n.value?n.value:o!=null&&o.value?o.value:s??(i.value||"body")})}gt.tdkey=zo;gt.propTo={type:[String,Object,Boolean],default:void 0};let Ze=null;function To(){if(Ze===null&&(Ze=document.getElementById("v-binder-view-measurer"),Ze===null)){Ze=document.createElement("div"),Ze.id="v-binder-view-measurer";const{style:e}=Ze;e.position="fixed",e.left="0",e.right="0",e.top="0",e.bottom="0",e.pointerEvents="none",e.visibility="hidden",document.body.appendChild(Ze)}return Ze.getBoundingClientRect()}function Bl(e,t){const r=To();return{top:t,left:e,height:0,width:0,right:r.width-e,bottom:r.height-t}}function ur(e){const t=e.getBoundingClientRect(),r=To();return{left:t.left-r.left,top:t.top-r.top,bottom:r.height+r.top-t.bottom,right:r.width+r.left-t.right,width:t.width,height:t.height}}function Ml(e){return e.nodeType===9?null:e.parentNode}function Io(e){if(e===null)return null;const t=Ml(e);if(t===null)return null;if(t.nodeType===9)return document;if(t.nodeType===1){const{overflow:r,overflowX:n,overflowY:o}=getComputedStyle(t);if(/(auto|scroll|overlay)/.test(r+o+n))return t}return Io(t)}const Ll=K({name:"Binder",props:{syncTargetWithParent:Boolean,syncTarget:{type:Boolean,default:!0}},setup(e){var t;Pe("VBinder",(t=Ar())===null||t===void 0?void 0:t.proxy);const r=ie("VBinder",null),n=E(null),o=w=>{n.value=w,r&&e.syncTargetWithParent&&r.setTargetRef(w)};let i=[];const l=()=>{let w=n.value;for(;w=Io(w),w!==null;)i.push(w);for(const z of i)Te("scroll",z,f,!0)},s=()=>{for(const w of i)Se("scroll",w,f,!0);i=[]},a=new Set,d=w=>{a.size===0&&l(),a.has(w)||a.add(w)},c=w=>{a.has(w)&&a.delete(w),a.size===0&&s()},f=()=>{$o(h)},h=()=>{a.forEach(w=>w())},p=new Set,y=w=>{p.size===0&&Te("resize",window,m),p.has(w)||p.add(w)},C=w=>{p.has(w)&&p.delete(w),p.size===0&&Se("resize",window,m)},m=()=>{p.forEach(w=>w())};return Qe(()=>{Se("resize",window,m),s()}),{targetRef:n,setTargetRef:o,addScrollListener:d,removeScrollListener:c,addResizeListener:y,removeResizeListener:C}},render(){return Ea("binder",this.$slots)}}),Ro=Ll,_o=K({name:"Target",setup(){const{setTargetRef:e,syncTarget:t}=ie("VBinder");return{syncTarget:t,setTargetDirective:{mounted:e,updated:e}}},render(){const{syncTarget:e,setTargetDirective:t}=this;return e?vt(sn("follower",this.$slots),[[t]]):sn("follower",this.$slots)}}),st="@@mmoContext",El={mounted(e,{value:t}){e[st]={handler:void 0},typeof t=="function"&&(e[st].handler=t,Te("mousemoveoutside",e,t))},updated(e,{value:t}){const r=e[st];typeof t=="function"?r.handler?r.handler!==t&&(Se("mousemoveoutside",e,r.handler),r.handler=t,Te("mousemoveoutside",e,t)):(e[st].handler=t,Te("mousemoveoutside",e,t)):r.handler&&(Se("mousemoveoutside",e,r.handler),r.handler=void 0)},unmounted(e){const{handler:t}=e[st];t&&Se("mousemoveoutside",e,t),e[st].handler=void 0}},Al=El,{c:Ft}=Aa(),Dl="vueuc-style",Nt={top:"bottom",bottom:"top",left:"right",right:"left"},Pn={start:"end",center:"center",end:"start"},cr={top:"height",bottom:"height",left:"width",right:"width"},Fl={"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"},Nl={"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"},Hl={"bottom-start":"right","bottom-end":"left","top-start":"right","top-end":"left","right-start":"bottom","right-end":"top","left-start":"bottom","left-end":"top"},kn={top:!0,bottom:!1,left:!0,right:!1},$n={top:"end",bottom:"start",left:"end",right:"start"};function jl(e,t,r,n,o,i){if(!o||i)return{placement:e,top:0,left:0};const[l,s]=e.split("-");let a=s??"center",d={top:0,left:0};const c=(p,y,C)=>{let m=0,w=0;const z=r[p]-t[y]-t[p];return z>0&&n&&(C?w=kn[y]?z:-z:m=kn[y]?z:-z),{left:m,top:w}},f=l==="left"||l==="right";if(a!=="center"){const p=Hl[e],y=Nt[p],C=cr[p];if(r[C]>t[C]){if(t[p]+t[C]<r[C]){const m=(r[C]-t[C])/2;t[p]<m||t[y]<m?t[p]<t[y]?(a=Pn[s],d=c(C,y,f)):d=c(C,p,f):a="center"}}else r[C]<t[C]&&t[y]<0&&t[p]>t[y]&&(a=Pn[s])}else{const p=l==="bottom"||l==="top"?"left":"top",y=Nt[p],C=cr[p],m=(r[C]-t[C])/2;(t[p]<m||t[y]<m)&&(t[p]>t[y]?(a=$n[p],d=c(C,p,f)):(a=$n[y],d=c(C,y,f)))}let h=l;return t[l]<r[cr[l]]&&t[l]<t[Nt[l]]&&(h=Nt[l]),{placement:a!=="center"?`${h}-${a}`:h,left:d.left,top:d.top}}function Wl(e,t){return t?Nl[e]:Fl[e]}function Ul(e,t,r,n,o,i){if(i)switch(e){case"bottom-start":return{top:`${Math.round(r.top-t.top+r.height)}px`,left:`${Math.round(r.left-t.left)}px`,transform:"translateY(-100%)"};case"bottom-end":return{top:`${Math.round(r.top-t.top+r.height)}px`,left:`${Math.round(r.left-t.left+r.width)}px`,transform:"translateX(-100%) translateY(-100%)"};case"top-start":return{top:`${Math.round(r.top-t.top)}px`,left:`${Math.round(r.left-t.left)}px`,transform:""};case"top-end":return{top:`${Math.round(r.top-t.top)}px`,left:`${Math.round(r.left-t.left+r.width)}px`,transform:"translateX(-100%)"};case"right-start":return{top:`${Math.round(r.top-t.top)}px`,left:`${Math.round(r.left-t.left+r.width)}px`,transform:"translateX(-100%)"};case"right-end":return{top:`${Math.round(r.top-t.top+r.height)}px`,left:`${Math.round(r.left-t.left+r.width)}px`,transform:"translateX(-100%) translateY(-100%)"};case"left-start":return{top:`${Math.round(r.top-t.top)}px`,left:`${Math.round(r.left-t.left)}px`,transform:""};case"left-end":return{top:`${Math.round(r.top-t.top+r.height)}px`,left:`${Math.round(r.left-t.left)}px`,transform:"translateY(-100%)"};case"top":return{top:`${Math.round(r.top-t.top)}px`,left:`${Math.round(r.left-t.left+r.width/2)}px`,transform:"translateX(-50%)"};case"right":return{top:`${Math.round(r.top-t.top+r.height/2)}px`,left:`${Math.round(r.left-t.left+r.width)}px`,transform:"translateX(-100%) translateY(-50%)"};case"left":return{top:`${Math.round(r.top-t.top+r.height/2)}px`,left:`${Math.round(r.left-t.left)}px`,transform:"translateY(-50%)"};case"bottom":default:return{top:`${Math.round(r.top-t.top+r.height)}px`,left:`${Math.round(r.left-t.left+r.width/2)}px`,transform:"translateX(-50%) translateY(-100%)"}}switch(e){case"bottom-start":return{top:`${Math.round(r.top-t.top+r.height+n)}px`,left:`${Math.round(r.left-t.left+o)}px`,transform:""};case"bottom-end":return{top:`${Math.round(r.top-t.top+r.height+n)}px`,left:`${Math.round(r.left-t.left+r.width+o)}px`,transform:"translateX(-100%)"};case"top-start":return{top:`${Math.round(r.top-t.top+n)}px`,left:`${Math.round(r.left-t.left+o)}px`,transform:"translateY(-100%)"};case"top-end":return{top:`${Math.round(r.top-t.top+n)}px`,left:`${Math.round(r.left-t.left+r.width+o)}px`,transform:"translateX(-100%) translateY(-100%)"};case"right-start":return{top:`${Math.round(r.top-t.top+n)}px`,left:`${Math.round(r.left-t.left+r.width+o)}px`,transform:""};case"right-end":return{top:`${Math.round(r.top-t.top+r.height+n)}px`,left:`${Math.round(r.left-t.left+r.width+o)}px`,transform:"translateY(-100%)"};case"left-start":return{top:`${Math.round(r.top-t.top+n)}px`,left:`${Math.round(r.left-t.left+o)}px`,transform:"translateX(-100%)"};case"left-end":return{top:`${Math.round(r.top-t.top+r.height+n)}px`,left:`${Math.round(r.left-t.left+o)}px`,transform:"translateX(-100%) translateY(-100%)"};case"top":return{top:`${Math.round(r.top-t.top+n)}px`,left:`${Math.round(r.left-t.left+r.width/2+o)}px`,transform:"translateY(-100%) translateX(-50%)"};case"right":return{top:`${Math.round(r.top-t.top+r.height/2+n)}px`,left:`${Math.round(r.left-t.left+r.width+o)}px`,transform:"translateY(-50%)"};case"left":return{top:`${Math.round(r.top-t.top+r.height/2+n)}px`,left:`${Math.round(r.left-t.left+o)}px`,transform:"translateY(-50%) translateX(-100%)"};case"bottom":default:return{top:`${Math.round(r.top-t.top+r.height+n)}px`,left:`${Math.round(r.left-t.left+r.width/2+o)}px`,transform:"translateX(-50%)"}}}const Vl=Ft([Ft(".v-binder-follower-container",{position:"absolute",left:"0",right:"0",top:"0",height:"0",pointerEvents:"none",zIndex:"auto"}),Ft(".v-binder-follower-content",{position:"absolute",zIndex:"auto"},[Ft("> *",{pointerEvents:"all"})])]),Oo=K({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=ie("VBinder"),r=Me(()=>e.enabled!==void 0?e.enabled:e.show),n=E(null),o=E(null),i=()=>{const{syncTrigger:h}=e;h.includes("scroll")&&t.addScrollListener(a),h.includes("resize")&&t.addResizeListener(a)},l=()=>{t.removeScrollListener(a),t.removeResizeListener(a)};We(()=>{r.value&&(a(),i())});const s=Da();Vl.mount({id:"vueuc/binder",head:!0,anchorMetaName:Dl,ssr:s}),Qe(()=>{l()}),Il(()=>{r.value&&a()});const a=()=>{if(!r.value)return;const h=n.value;if(h===null)return;const p=t.targetRef,{x:y,y:C,overlap:m}=e,w=y!==void 0&&C!==void 0?Bl(y,C):ur(p);h.style.setProperty("--v-target-width",`${Math.round(w.width)}px`),h.style.setProperty("--v-target-height",`${Math.round(w.height)}px`);const{width:z,minWidth:_,placement:b,internalShift:g,flip:M}=e;h.setAttribute("v-placement",b),m?h.setAttribute("v-overlap",""):h.removeAttribute("v-overlap");const{style:k}=h;z==="target"?k.width=`${w.width}px`:z!==void 0?k.width=z:k.width="",_==="target"?k.minWidth=`${w.width}px`:_!==void 0?k.minWidth=_:k.minWidth="";const A=ur(h),$=ur(o.value),{left:B,top:R,placement:O}=jl(b,w,A,g,M,m),I=Wl(O,m),{left:x,top:S,transform:N}=Ul(O,$,w,R,B,m);h.setAttribute("v-placement",O),h.style.setProperty("--v-offset-left",`${Math.round(B)}px`),h.style.setProperty("--v-offset-top",`${Math.round(R)}px`),h.style.transform=`translateX(${x}) translateY(${S}) ${N}`,h.style.setProperty("--v-transform-origin",I),h.style.transformOrigin=I};Ce(r,h=>{h?(i(),d()):l()});const d=()=>{qt().then(a).catch(h=>console.error(h))};["placement","x","y","internalShift","flip","width","overlap","minWidth"].forEach(h=>{Ce(Z(e,h),a)}),["teleportDisabled"].forEach(h=>{Ce(Z(e,h),d)}),Ce(Z(e,"syncTrigger"),h=>{h.includes("resize")?t.addResizeListener(a):t.removeResizeListener(a),h.includes("scroll")?t.addScrollListener(a):t.removeScrollListener(a)});const c=Dr(),f=Me(()=>{const{to:h}=e;if(h!==void 0)return h;c.value});return{VBinder:t,mergedEnabled:r,offsetContainerRef:o,followerRef:n,mergedTo:f,syncPosition:a}},render(){return u(ao,{show:this.show,to:this.mergedTo,disabled:this.teleportDisabled},{default:()=>{var e,t;const r=u("div",{class:["v-binder-follower-container",this.containerClass],ref:"offsetContainerRef"},[u("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?vt(r,[[Fr,{enabled:this.mergedEnabled,zIndex:this.zIndex}]]):r}})}});var Kl=er(tr,"WeakMap");const $r=Kl;var ql=Fa(Object.keys,Object);const Gl=ql;var Xl=Object.prototype,Yl=Xl.hasOwnProperty;function Zl(e){if(!Na(e))return Gl(e);var t=[];for(var r in Object(e))Yl.call(e,r)&&r!="constructor"&&t.push(r);return t}function Kr(e){return Nr(e)?Ha(e):Zl(e)}var Jl=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ql=/^\w*$/;function qr(e,t){if(Je(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||lo(e)?!0:Ql.test(e)||!Jl.test(e)||t!=null&&e in Object(t)}var es="Expected a function";function Gr(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(es);var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var l=e.apply(this,n);return r.cache=i.set(o,l)||i,l};return r.cache=new(Gr.Cache||Hr),r}Gr.Cache=Hr;var ts=500;function rs(e){var t=Gr(e,function(n){return r.size===ts&&r.clear(),n}),r=t.cache;return t}var ns=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,os=/\\(\\)?/g,is=rs(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(ns,function(r,n,o,i){t.push(o?i.replace(os,"$1"):n||r)}),t});const as=is;function Bo(e,t){return Je(e)?e:qr(e,t)?[e]:as(jr(e))}var ls=1/0;function nr(e){if(typeof e=="string"||lo(e))return e;var t=e+"";return t=="0"&&1/e==-ls?"-0":t}function Mo(e,t){t=Bo(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[nr(t[r++])];return r&&r==n?e:void 0}function ss(e,t,r){var n=e==null?void 0:Mo(e,t);return n===void 0?r:n}function ds(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}function us(e,t,r,n){var o=-1,i=e==null?0:e.length;for(n&&i&&(r=e[++o]);++o<i;)r=t(r,e[o],o,e);return r}function cs(e){return function(t){return e==null?void 0:e[t]}}var fs={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},hs=cs(fs);const ps=hs;var vs=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,gs="\\u0300-\\u036f",ms="\\ufe20-\\ufe2f",bs="\\u20d0-\\u20ff",ys=gs+ms+bs,ws="["+ys+"]",xs=RegExp(ws,"g");function Cs(e){return e=jr(e),e&&e.replace(vs,ps).replace(xs,"")}var Ss=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function Ps(e){return e.match(Ss)||[]}var ks=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function $s(e){return ks.test(e)}var Lo="\\ud800-\\udfff",zs="\\u0300-\\u036f",Ts="\\ufe20-\\ufe2f",Is="\\u20d0-\\u20ff",Rs=zs+Ts+Is,Eo="\\u2700-\\u27bf",Ao="a-z\\xdf-\\xf6\\xf8-\\xff",_s="\\xac\\xb1\\xd7\\xf7",Os="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Bs="\\u2000-\\u206f",Ms=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Do="A-Z\\xc0-\\xd6\\xd8-\\xde",Ls="\\ufe0e\\ufe0f",Fo=_s+Os+Bs+Ms,No="[']",zn="["+Fo+"]",Es="["+Rs+"]",Ho="\\d+",As="["+Eo+"]",jo="["+Ao+"]",Wo="[^"+Lo+Fo+Ho+Eo+Ao+Do+"]",Ds="\\ud83c[\\udffb-\\udfff]",Fs="(?:"+Es+"|"+Ds+")",Ns="[^"+Lo+"]",Uo="(?:\\ud83c[\\udde6-\\uddff]){2}",Vo="[\\ud800-\\udbff][\\udc00-\\udfff]",ut="["+Do+"]",Hs="\\u200d",Tn="(?:"+jo+"|"+Wo+")",js="(?:"+ut+"|"+Wo+")",In="(?:"+No+"(?:d|ll|m|re|s|t|ve))?",Rn="(?:"+No+"(?:D|LL|M|RE|S|T|VE))?",Ko=Fs+"?",qo="["+Ls+"]?",Ws="(?:"+Hs+"(?:"+[Ns,Uo,Vo].join("|")+")"+qo+Ko+")*",Us="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Vs="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ks=qo+Ko+Ws,qs="(?:"+[As,Uo,Vo].join("|")+")"+Ks,Gs=RegExp([ut+"?"+jo+"+"+In+"(?="+[zn,ut,"$"].join("|")+")",js+"+"+Rn+"(?="+[zn,ut+Tn,"$"].join("|")+")",ut+"?"+Tn+"+"+In,ut+"+"+Rn,Vs,Us,Ho,qs].join("|"),"g");function Xs(e){return e.match(Gs)||[]}function Ys(e,t,r){return e=jr(e),t=r?void 0:t,t===void 0?$s(e)?Xs(e):Ps(e):e.match(t)||[]}var Zs="[']",Js=RegExp(Zs,"g");function Qs(e){return function(t){return us(Ys(Cs(t).replace(Js,"")),e,"")}}function ed(e,t){for(var r=-1,n=e==null?0:e.length,o=0,i=[];++r<n;){var l=e[r];t(l,r,e)&&(i[o++]=l)}return i}function td(){return[]}var rd=Object.prototype,nd=rd.propertyIsEnumerable,_n=Object.getOwnPropertySymbols,od=_n?function(e){return e==null?[]:(e=Object(e),ed(_n(e),function(t){return nd.call(e,t)}))}:td;const id=od;function ad(e,t,r){var n=t(e);return Je(e)?n:ds(n,r(e))}function On(e){return ad(e,Kr,id)}var ld=er(tr,"DataView");const zr=ld;var sd=er(tr,"Promise");const Tr=sd;var dd=er(tr,"Set");const Ir=dd;var Bn="[object Map]",ud="[object Object]",Mn="[object Promise]",Ln="[object Set]",En="[object WeakMap]",An="[object DataView]",cd=mt(zr),fd=mt(Pr),hd=mt(Tr),pd=mt(Ir),vd=mt($r),ot=so;(zr&&ot(new zr(new ArrayBuffer(1)))!=An||Pr&&ot(new Pr)!=Bn||Tr&&ot(Tr.resolve())!=Mn||Ir&&ot(new Ir)!=Ln||$r&&ot(new $r)!=En)&&(ot=function(e){var t=so(e),r=t==ud?e.constructor:void 0,n=r?mt(r):"";if(n)switch(n){case cd:return An;case fd:return Bn;case hd:return Mn;case pd:return Ln;case vd:return En}return t});const Dn=ot;var gd="__lodash_hash_undefined__";function md(e){return this.__data__.set(e,gd),this}function bd(e){return this.__data__.has(e)}function Zt(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new Hr;++t<r;)this.add(e[t])}Zt.prototype.add=Zt.prototype.push=md;Zt.prototype.has=bd;function yd(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}function wd(e,t){return e.has(t)}var xd=1,Cd=2;function Go(e,t,r,n,o,i){var l=r&xd,s=e.length,a=t.length;if(s!=a&&!(l&&a>s))return!1;var d=i.get(e),c=i.get(t);if(d&&c)return d==t&&c==e;var f=-1,h=!0,p=r&Cd?new Zt:void 0;for(i.set(e,t),i.set(t,e);++f<s;){var y=e[f],C=t[f];if(n)var m=l?n(C,y,f,t,e,i):n(y,C,f,e,t,i);if(m!==void 0){if(m)continue;h=!1;break}if(p){if(!yd(t,function(w,z){if(!wd(p,z)&&(y===w||o(y,w,r,n,i)))return p.push(z)})){h=!1;break}}else if(!(y===C||o(y,C,r,n,i))){h=!1;break}}return i.delete(e),i.delete(t),h}function Sd(e){var t=-1,r=Array(e.size);return e.forEach(function(n,o){r[++t]=[o,n]}),r}function Pd(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var kd=1,$d=2,zd="[object Boolean]",Td="[object Date]",Id="[object Error]",Rd="[object Map]",_d="[object Number]",Od="[object RegExp]",Bd="[object Set]",Md="[object String]",Ld="[object Symbol]",Ed="[object ArrayBuffer]",Ad="[object DataView]",Fn=dn?dn.prototype:void 0,fr=Fn?Fn.valueOf:void 0;function Dd(e,t,r,n,o,i,l){switch(r){case Ad:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Ed:return!(e.byteLength!=t.byteLength||!i(new un(e),new un(t)));case zd:case Td:case _d:return ja(+e,+t);case Id:return e.name==t.name&&e.message==t.message;case Od:case Md:return e==t+"";case Rd:var s=Sd;case Bd:var a=n&kd;if(s||(s=Pd),e.size!=t.size&&!a)return!1;var d=l.get(e);if(d)return d==t;n|=$d,l.set(e,t);var c=Go(s(e),s(t),n,o,i,l);return l.delete(e),c;case Ld:if(fr)return fr.call(e)==fr.call(t)}return!1}var Fd=1,Nd=Object.prototype,Hd=Nd.hasOwnProperty;function jd(e,t,r,n,o,i){var l=r&Fd,s=On(e),a=s.length,d=On(t),c=d.length;if(a!=c&&!l)return!1;for(var f=a;f--;){var h=s[f];if(!(l?h in t:Hd.call(t,h)))return!1}var p=i.get(e),y=i.get(t);if(p&&y)return p==t&&y==e;var C=!0;i.set(e,t),i.set(t,e);for(var m=l;++f<a;){h=s[f];var w=e[h],z=t[h];if(n)var _=l?n(z,w,h,t,e,i):n(w,z,h,e,t,i);if(!(_===void 0?w===z||o(w,z,r,n,i):_)){C=!1;break}m||(m=h=="constructor")}if(C&&!m){var b=e.constructor,g=t.constructor;b!=g&&"constructor"in e&&"constructor"in t&&!(typeof b=="function"&&b instanceof b&&typeof g=="function"&&g instanceof g)&&(C=!1)}return i.delete(e),i.delete(t),C}var Wd=1,Nn="[object Arguments]",Hn="[object Array]",Ht="[object Object]",Ud=Object.prototype,jn=Ud.hasOwnProperty;function Vd(e,t,r,n,o,i){var l=Je(e),s=Je(t),a=l?Hn:Dn(e),d=s?Hn:Dn(t);a=a==Nn?Ht:a,d=d==Nn?Ht:d;var c=a==Ht,f=d==Ht,h=a==d;if(h&&cn(e)){if(!cn(t))return!1;l=!0,c=!1}if(h&&!c)return i||(i=new Kt),l||Wa(e)?Go(e,t,r,n,o,i):Dd(e,t,a,r,n,o,i);if(!(r&Wd)){var p=c&&jn.call(e,"__wrapped__"),y=f&&jn.call(t,"__wrapped__");if(p||y){var C=p?e.value():e,m=y?t.value():t;return i||(i=new Kt),o(C,m,r,n,i)}}return h?(i||(i=new Kt),jd(e,t,r,n,o,i)):!1}function Xr(e,t,r,n,o){return e===t?!0:e==null||t==null||!fn(e)&&!fn(t)?e!==e&&t!==t:Vd(e,t,r,n,Xr,o)}var Kd=1,qd=2;function Gd(e,t,r,n){var o=r.length,i=o,l=!n;if(e==null)return!i;for(e=Object(e);o--;){var s=r[o];if(l&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++o<i;){s=r[o];var a=s[0],d=e[a],c=s[1];if(l&&s[2]){if(d===void 0&&!(a in e))return!1}else{var f=new Kt;if(n)var h=n(d,c,a,e,t,f);if(!(h===void 0?Xr(c,d,Kd|qd,n,f):h))return!1}}return!0}function Xo(e){return e===e&&!Ua(e)}function Xd(e){for(var t=Kr(e),r=t.length;r--;){var n=t[r],o=e[n];t[r]=[n,o,Xo(o)]}return t}function Yo(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}function Yd(e){var t=Xd(e);return t.length==1&&t[0][2]?Yo(t[0][0],t[0][1]):function(r){return r===e||Gd(r,e,t)}}function Zd(e,t){return e!=null&&t in Object(e)}function Jd(e,t,r){t=Bo(t,e);for(var n=-1,o=t.length,i=!1;++n<o;){var l=nr(t[n]);if(!(i=e!=null&&r(e,l)))break;e=e[l]}return i||++n!=o?i:(o=e==null?0:e.length,!!o&&Va(o)&&Ka(l,o)&&(Je(e)||qa(e)))}function Qd(e,t){return e!=null&&Jd(e,t,Zd)}var eu=1,tu=2;function ru(e,t){return qr(e)&&Xo(t)?Yo(nr(e),t):function(r){var n=ss(r,e);return n===void 0&&n===t?Qd(r,e):Xr(t,n,eu|tu)}}function nu(e){return function(t){return t==null?void 0:t[e]}}function ou(e){return function(t){return Mo(t,e)}}function iu(e){return qr(e)?nu(nr(e)):ou(e)}function au(e){return typeof e=="function"?e:e==null?Ga:typeof e=="object"?Je(e)?ru(e[0],e[1]):Yd(e):iu(e)}function lu(e,t){return e&&Xa(e,t,Kr)}function su(e,t){return function(r,n){if(r==null)return r;if(!Nr(r))return e(r,n);for(var o=r.length,i=t?o:-1,l=Object(r);(t?i--:++i<o)&&n(l[i],i,l)!==!1;);return r}}var du=su(lu);const uu=du;function cu(e,t){var r=-1,n=Nr(e)?Array(e.length):[];return uu(e,function(o,i,l){n[++r]=t(o,i,l)}),n}function fu(e,t){var r=Je(e)?Ya:cu;return r(e,au(t))}var hu=Qs(function(e,t,r){return e+(r?"-":"")+t.toLowerCase()});const pu=hu,vu={name:"en-US",global:{undo:"Undo",redo:"Redo",confirm:"Confirm",clear:"Clear"},Popconfirm:{positiveText:"Confirm",negativeText:"Cancel"},Cascader:{placeholder:"Please Select",loading:"Loading",loadingRequiredMessage:e=>`Please load all ${e}'s descendants before checking it.`},Time:{dateFormat:"yyyy-MM-dd",dateTimeFormat:"yyyy-MM-dd HH:mm:ss"},DatePicker:{yearFormat:"yyyy",monthFormat:"MMM",dayFormat:"eeeeee",yearTypeFormat:"yyyy",monthTypeFormat:"yyyy-MM",dateFormat:"yyyy-MM-dd",dateTimeFormat:"yyyy-MM-dd HH:mm:ss",quarterFormat:"yyyy-qqq",clear:"Clear",now:"Now",confirm:"Confirm",selectTime:"Select Time",selectDate:"Select Date",datePlaceholder:"Select Date",datetimePlaceholder:"Select Date and Time",monthPlaceholder:"Select Month",yearPlaceholder:"Select Year",quarterPlaceholder:"Select Quarter",startDatePlaceholder:"Start Date",endDatePlaceholder:"End Date",startDatetimePlaceholder:"Start Date and Time",endDatetimePlaceholder:"End Date and Time",startMonthPlaceholder:"Start Month",endMonthPlaceholder:"End Month",monthBeforeYear:!0,firstDayOfWeek:6,today:"Today"},DataTable:{checkTableAll:"Select all in the table",uncheckTableAll:"Unselect all in the table",confirm:"Confirm",clear:"Clear"},LegacyTransfer:{sourceTitle:"Source",targetTitle:"Target"},Transfer:{selectAll:"Select all",unselectAll:"Unselect all",clearAll:"Clear",total:e=>`Total ${e} items`,selected:e=>`${e} items selected`},Empty:{description:"No Data"},Select:{placeholder:"Please Select"},TimePicker:{placeholder:"Select Time",positiveText:"OK",negativeText:"Cancel",now:"Now"},Pagination:{goto:"Goto",selectionSuffix:"page"},DynamicTags:{add:"Add"},Log:{loading:"Loading"},Input:{placeholder:"Please Input"},InputNumber:{placeholder:"Please Input"},DynamicInput:{create:"Create"},ThemeEditor:{title:"Theme Editor",clearAllVars:"Clear All Variables",clearSearch:"Clear Search",filterCompName:"Filter Component Name",filterVarName:"Filter Variable Name",import:"Import",export:"Export",restore:"Reset to Default"},Image:{tipPrevious:"Previous picture (←)",tipNext:"Next picture (→)",tipCounterclockwise:"Counterclockwise",tipClockwise:"Clockwise",tipZoomOut:"Zoom out",tipZoomIn:"Zoom in",tipClose:"Close (Esc)",tipOriginalSize:"Zoom to original size"}},gu=vu;function hr(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.width?String(t.width):e.defaultWidth,n=e.formats[r]||e.formats[e.defaultWidth];return n}}function Ct(e){return function(t,r){var n=r!=null&&r.context?String(r.context):"standalone",o;if(n==="formatting"&&e.formattingValues){var i=e.defaultFormattingWidth||e.defaultWidth,l=r!=null&&r.width?String(r.width):i;o=e.formattingValues[l]||e.formattingValues[i]}else{var s=e.defaultWidth,a=r!=null&&r.width?String(r.width):e.defaultWidth;o=e.values[a]||e.values[s]}var d=e.argumentCallback?e.argumentCallback(t):t;return o[d]}}function St(e){return function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=r.width,o=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],i=t.match(o);if(!i)return null;var l=i[0],s=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],a=Array.isArray(s)?bu(s,function(f){return f.test(l)}):mu(s,function(f){return f.test(l)}),d;d=e.valueCallback?e.valueCallback(a):a,d=r.valueCallback?r.valueCallback(d):d;var c=t.slice(l.length);return{value:d,rest:c}}}function mu(e,t){for(var r in e)if(e.hasOwnProperty(r)&&t(e[r]))return r}function bu(e,t){for(var r=0;r<e.length;r++)if(t(e[r]))return r}function yu(e){return function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.match(e.matchPattern);if(!n)return null;var o=n[0],i=t.match(e.parsePattern);if(!i)return null;var l=e.valueCallback?e.valueCallback(i[0]):i[0];l=r.valueCallback?r.valueCallback(l):l;var s=t.slice(o.length);return{value:l,rest:s}}}var wu={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},xu=function(t,r,n){var o,i=wu[t];return typeof i=="string"?o=i:r===1?o=i.one:o=i.other.replace("{{count}}",r.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+o:o+" ago":o};const Cu=xu;var Su={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Pu={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},ku={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},$u={date:hr({formats:Su,defaultWidth:"full"}),time:hr({formats:Pu,defaultWidth:"full"}),dateTime:hr({formats:ku,defaultWidth:"full"})};const zu=$u;var Tu={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Iu=function(t,r,n,o){return Tu[t]};const Ru=Iu;var _u={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Ou={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Bu={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Mu={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Lu={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Eu={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Au=function(t,r){var n=Number(t),o=n%100;if(o>20||o<10)switch(o%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},Du={ordinalNumber:Au,era:Ct({values:_u,defaultWidth:"wide"}),quarter:Ct({values:Ou,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:Ct({values:Bu,defaultWidth:"wide"}),day:Ct({values:Mu,defaultWidth:"wide"}),dayPeriod:Ct({values:Lu,defaultWidth:"wide",formattingValues:Eu,defaultFormattingWidth:"wide"})};const Fu=Du;var Nu=/^(\d+)(th|st|nd|rd)?/i,Hu=/\d+/i,ju={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Wu={any:[/^b/i,/^(a|c)/i]},Uu={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Vu={any:[/1/i,/2/i,/3/i,/4/i]},Ku={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},qu={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Gu={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Xu={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Yu={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Zu={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Ju={ordinalNumber:yu({matchPattern:Nu,parsePattern:Hu,valueCallback:function(t){return parseInt(t,10)}}),era:St({matchPatterns:ju,defaultMatchWidth:"wide",parsePatterns:Wu,defaultParseWidth:"any"}),quarter:St({matchPatterns:Uu,defaultMatchWidth:"wide",parsePatterns:Vu,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:St({matchPatterns:Ku,defaultMatchWidth:"wide",parsePatterns:qu,defaultParseWidth:"any"}),day:St({matchPatterns:Gu,defaultMatchWidth:"wide",parsePatterns:Xu,defaultParseWidth:"any"}),dayPeriod:St({matchPatterns:Yu,defaultMatchWidth:"any",parsePatterns:Zu,defaultParseWidth:"any"})};const Qu=Ju;var ec={code:"en-US",formatDistance:Cu,formatLong:zu,formatRelative:Ru,localize:Fu,match:Qu,options:{weekStartsOn:0,firstWeekContainsDate:1}};const tc=ec,rc={name:"en-US",locale:tc},nc=rc;function Yr(e){const{mergedLocaleRef:t,mergedDateLocaleRef:r}=ie(uo,null)||{},n=F(()=>{var i,l;return(l=(i=t==null?void 0:t.value)===null||i===void 0?void 0:i[e])!==null&&l!==void 0?l:gu[e]});return{dateLocaleRef:F(()=>{var i;return(i=r==null?void 0:r.value)!==null&&i!==void 0?i:nc}),localeRef:n}}const oc=K({name:"Add",render(){return u("svg",{width:"512",height:"512",viewBox:"0 0 512 512",fill:"none",xmlns:"http://www.w3.org/2000/svg"},u("path",{d:"M256 112V400M400 256H112",stroke:"currentColor","stroke-width":"32","stroke-linecap":"round","stroke-linejoin":"round"}))}}),ic=Ke("attach",u("svg",{viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},u("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},u("g",{fill:"currentColor","fill-rule":"nonzero"},u("path",{d:"M3.25735931,8.70710678 L7.85355339,4.1109127 C8.82986412,3.13460197 10.4127766,3.13460197 11.3890873,4.1109127 C12.365398,5.08722343 12.365398,6.67013588 11.3890873,7.64644661 L6.08578644,12.9497475 C5.69526215,13.3402718 5.06209717,13.3402718 4.67157288,12.9497475 C4.28104858,12.5592232 4.28104858,11.9260582 4.67157288,11.5355339 L9.97487373,6.23223305 C10.1701359,6.0369709 10.1701359,5.72038841 9.97487373,5.52512627 C9.77961159,5.32986412 9.4630291,5.32986412 9.26776695,5.52512627 L3.96446609,10.8284271 C3.18341751,11.6094757 3.18341751,12.8758057 3.96446609,13.6568542 C4.74551468,14.4379028 6.01184464,14.4379028 6.79289322,13.6568542 L12.0961941,8.35355339 C13.4630291,6.98671837 13.4630291,4.77064094 12.0961941,3.40380592 C10.7293591,2.0369709 8.51328163,2.0369709 7.14644661,3.40380592 L2.55025253,8 C2.35499039,8.19526215 2.35499039,8.51184464 2.55025253,8.70710678 C2.74551468,8.90236893 3.06209717,8.90236893 3.25735931,8.70710678 Z"}))))),ac=K({name:"ChevronRight",render(){return u("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},u("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"}))}}),Zo=K({name:"Eye",render(){return u("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},u("path",{d:"M255.66 112c-77.94 0-157.89 45.11-220.83 135.33a16 16 0 0 0-.27 17.77C82.92 340.8 161.8 400 255.66 400c92.84 0 173.34-59.38 221.79-135.25a16.14 16.14 0 0 0 0-17.47C428.89 172.28 347.8 112 255.66 112z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"}),u("circle",{cx:"256",cy:"256",r:"80",fill:"none",stroke:"currentColor","stroke-miterlimit":"10","stroke-width":"32"}))}}),lc=K({name:"EyeOff",render(){return u("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},u("path",{d:"M432 448a15.92 15.92 0 0 1-11.31-4.69l-352-352a16 16 0 0 1 22.62-22.62l352 352A16 16 0 0 1 432 448z",fill:"currentColor"}),u("path",{d:"M255.66 384c-41.49 0-81.5-12.28-118.92-36.5c-34.07-22-64.74-53.51-88.7-91v-.08c19.94-28.57 41.78-52.73 65.24-72.21a2 2 0 0 0 .14-2.94L93.5 161.38a2 2 0 0 0-2.71-.12c-24.92 21-48.05 46.76-69.08 76.92a31.92 31.92 0 0 0-.64 35.54c26.41 41.33 60.4 76.14 98.28 100.65C162 402 207.9 416 255.66 416a239.13 239.13 0 0 0 75.8-12.58a2 2 0 0 0 .77-3.31l-21.58-21.58a4 4 0 0 0-3.83-1a204.8 204.8 0 0 1-51.16 6.47z",fill:"currentColor"}),u("path",{d:"M490.84 238.6c-26.46-40.92-60.79-75.68-99.27-100.53C349 110.55 302 96 255.66 96a227.34 227.34 0 0 0-74.89 12.83a2 2 0 0 0-.75 3.31l21.55 21.55a4 4 0 0 0 3.88 1a192.82 192.82 0 0 1 50.21-6.69c40.69 0 80.58 12.43 118.55 37c34.71 22.4 65.74 53.88 89.76 91a.13.13 0 0 1 0 .16a310.72 310.72 0 0 1-64.12 72.73a2 2 0 0 0-.15 2.95l19.9 19.89a2 2 0 0 0 2.7.13a343.49 343.49 0 0 0 68.64-78.48a32.2 32.2 0 0 0-.1-34.78z",fill:"currentColor"}),u("path",{d:"M256 160a95.88 95.88 0 0 0-21.37 2.4a2 2 0 0 0-1 3.38l112.59 112.56a2 2 0 0 0 3.38-1A96 96 0 0 0 256 160z",fill:"currentColor"}),u("path",{d:"M165.78 233.66a2 2 0 0 0-3.38 1a96 96 0 0 0 115 115a2 2 0 0 0 1-3.38z",fill:"currentColor"}))}}),sc=Ke("trash",u("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},u("path",{d:"M432,144,403.33,419.74A32,32,0,0,1,371.55,448H140.46a32,32,0,0,1-31.78-28.26L80,144",style:"fill: none; stroke: currentcolor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 32px;"}),u("rect",{x:"32",y:"64",width:"448",height:"80",rx:"16",ry:"16",style:"fill: none; stroke: currentcolor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 32px;"}),u("line",{x1:"312",y1:"240",x2:"200",y2:"352",style:"fill: none; stroke: currentcolor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 32px;"}),u("line",{x1:"312",y1:"352",x2:"200",y2:"240",style:"fill: none; stroke: currentcolor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 32px;"}))),dc=Ke("download",u("svg",{viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},u("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},u("g",{fill:"currentColor","fill-rule":"nonzero"},u("path",{d:"M3.5,13 L12.5,13 C12.7761424,13 13,13.2238576 13,13.5 C13,13.7454599 12.8231248,13.9496084 12.5898756,13.9919443 L12.5,14 L3.5,14 C3.22385763,14 3,13.7761424 3,13.5 C3,13.2545401 3.17687516,13.0503916 3.41012437,13.0080557 L3.5,13 L12.5,13 L3.5,13 Z M7.91012437,1.00805567 L8,1 C8.24545989,1 8.44960837,1.17687516 8.49194433,1.41012437 L8.5,1.5 L8.5,10.292 L11.1819805,7.6109127 C11.3555469,7.43734635 11.6249713,7.4180612 11.8198394,7.55305725 L11.8890873,7.6109127 C12.0626536,7.78447906 12.0819388,8.05390346 11.9469427,8.2487716 L11.8890873,8.31801948 L8.35355339,11.8535534 C8.17998704,12.0271197 7.91056264,12.0464049 7.7156945,11.9114088 L7.64644661,11.8535534 L4.1109127,8.31801948 C3.91565056,8.12275734 3.91565056,7.80617485 4.1109127,7.6109127 C4.28447906,7.43734635 4.55390346,7.4180612 4.7487716,7.55305725 L4.81801948,7.6109127 L7.5,10.292 L7.5,1.5 C7.5,1.25454011 7.67687516,1.05039163 7.91012437,1.00805567 L8,1 L7.91012437,1.00805567 Z"}))))),uc=K({name:"Empty",render(){return u("svg",{viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},u("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"}),u("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"}))}}),cc=Ke("cancel",u("svg",{viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},u("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},u("g",{fill:"currentColor","fill-rule":"nonzero"},u("path",{d:"M2.58859116,2.7156945 L2.64644661,2.64644661 C2.82001296,2.47288026 3.08943736,2.45359511 3.2843055,2.58859116 L3.35355339,2.64644661 L8,7.293 L12.6464466,2.64644661 C12.8417088,2.45118446 13.1582912,2.45118446 13.3535534,2.64644661 C13.5488155,2.84170876 13.5488155,3.15829124 13.3535534,3.35355339 L8.707,8 L13.3535534,12.6464466 C13.5271197,12.820013 13.5464049,13.0894374 13.4114088,13.2843055 L13.3535534,13.3535534 C13.179987,13.5271197 12.9105626,13.5464049 12.7156945,13.4114088 L12.6464466,13.3535534 L8,8.707 L3.35355339,13.3535534 C3.15829124,13.5488155 2.84170876,13.5488155 2.64644661,13.3535534 C2.45118446,13.1582912 2.45118446,12.8417088 2.64644661,12.6464466 L7.293,8 L2.64644661,3.35355339 C2.47288026,3.17998704 2.45359511,2.91056264 2.58859116,2.7156945 L2.64644661,2.64644661 L2.58859116,2.7156945 Z"}))))),fc=K({name:"ChevronDown",render(){return u("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},u("path",{d:"M3.14645 5.64645C3.34171 5.45118 3.65829 5.45118 3.85355 5.64645L8 9.79289L12.1464 5.64645C12.3417 5.45118 12.6583 5.45118 12.8536 5.64645C13.0488 5.84171 13.0488 6.15829 12.8536 6.35355L8.35355 10.8536C8.15829 11.0488 7.84171 11.0488 7.64645 10.8536L3.14645 6.35355C2.95118 6.15829 2.95118 5.84171 3.14645 5.64645Z",fill:"currentColor"}))}}),hc=Ke("clear",u("svg",{viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},u("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},u("g",{fill:"currentColor","fill-rule":"nonzero"},u("path",{d:"M8,2 C11.3137085,2 14,4.6862915 14,8 C14,11.3137085 11.3137085,14 8,14 C4.6862915,14 2,11.3137085 2,8 C2,4.6862915 4.6862915,2 8,2 Z M6.5343055,5.83859116 C6.33943736,5.70359511 6.07001296,5.72288026 5.89644661,5.89644661 L5.89644661,5.89644661 L5.83859116,5.9656945 C5.70359511,6.16056264 5.72288026,6.42998704 5.89644661,6.60355339 L5.89644661,6.60355339 L7.293,8 L5.89644661,9.39644661 L5.83859116,9.4656945 C5.70359511,9.66056264 5.72288026,9.92998704 5.89644661,10.1035534 L5.89644661,10.1035534 L5.9656945,10.1614088 C6.16056264,10.2964049 6.42998704,10.2771197 6.60355339,10.1035534 L6.60355339,10.1035534 L8,8.707 L9.39644661,10.1035534 L9.4656945,10.1614088 C9.66056264,10.2964049 9.92998704,10.2771197 10.1035534,10.1035534 L10.1035534,10.1035534 L10.1614088,10.0343055 C10.2964049,9.83943736 10.2771197,9.57001296 10.1035534,9.39644661 L10.1035534,9.39644661 L8.707,8 L10.1035534,6.60355339 L10.1614088,6.5343055 C10.2964049,6.33943736 10.2771197,6.07001296 10.1035534,5.89644661 L10.1035534,5.89644661 L10.0343055,5.83859116 C9.83943736,5.70359511 9.57001296,5.72288026 9.39644661,5.89644661 L9.39644661,5.89644661 L8,7.293 L6.60355339,5.89644661 Z"}))))),pc=Ke("retry",u("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},u("path",{d:"M320,146s24.36-12-64-12A160,160,0,1,0,416,294",style:"fill: none; stroke: currentcolor; stroke-linecap: round; stroke-miterlimit: 10; stroke-width: 32px;"}),u("polyline",{points:"256 58 336 138 256 218",style:"fill: none; stroke: currentcolor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 32px;"}))),vc=Ke("rotateClockwise",u("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},u("path",{d:"M3 10C3 6.13401 6.13401 3 10 3C13.866 3 17 6.13401 17 10C17 12.7916 15.3658 15.2026 13 16.3265V14.5C13 14.2239 12.7761 14 12.5 14C12.2239 14 12 14.2239 12 14.5V17.5C12 17.7761 12.2239 18 12.5 18H15.5C15.7761 18 16 17.7761 16 17.5C16 17.2239 15.7761 17 15.5 17H13.8758C16.3346 15.6357 18 13.0128 18 10C18 5.58172 14.4183 2 10 2C5.58172 2 2 5.58172 2 10C2 10.2761 2.22386 10.5 2.5 10.5C2.77614 10.5 3 10.2761 3 10Z",fill:"currentColor"}),u("path",{d:"M10 12C11.1046 12 12 11.1046 12 10C12 8.89543 11.1046 8 10 8C8.89543 8 8 8.89543 8 10C8 11.1046 8.89543 12 10 12ZM10 11C9.44772 11 9 10.5523 9 10C9 9.44772 9.44772 9 10 9C10.5523 9 11 9.44772 11 10C11 10.5523 10.5523 11 10 11Z",fill:"currentColor"}))),gc=Ke("rotateClockwise",u("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},u("path",{d:"M17 10C17 6.13401 13.866 3 10 3C6.13401 3 3 6.13401 3 10C3 12.7916 4.63419 15.2026 7 16.3265V14.5C7 14.2239 7.22386 14 7.5 14C7.77614 14 8 14.2239 8 14.5V17.5C8 17.7761 7.77614 18 7.5 18H4.5C4.22386 18 4 17.7761 4 17.5C4 17.2239 4.22386 17 4.5 17H6.12422C3.66539 15.6357 2 13.0128 2 10C2 5.58172 5.58172 2 10 2C14.4183 2 18 5.58172 18 10C18 10.2761 17.7761 10.5 17.5 10.5C17.2239 10.5 17 10.2761 17 10Z",fill:"currentColor"}),u("path",{d:"M10 12C8.89543 12 8 11.1046 8 10C8 8.89543 8.89543 8 10 8C11.1046 8 12 8.89543 12 10C12 11.1046 11.1046 12 10 12ZM10 11C10.5523 11 11 10.5523 11 10C11 9.44772 10.5523 9 10 9C9.44772 9 9 9.44772 9 10C9 10.5523 9.44772 11 10 11Z",fill:"currentColor"}))),mc=Ke("zoomIn",u("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},u("path",{d:"M11.5 8.5C11.5 8.22386 11.2761 8 11 8H9V6C9 5.72386 8.77614 5.5 8.5 5.5C8.22386 5.5 8 5.72386 8 6V8H6C5.72386 8 5.5 8.22386 5.5 8.5C5.5 8.77614 5.72386 9 6 9H8V11C8 11.2761 8.22386 11.5 8.5 11.5C8.77614 11.5 9 11.2761 9 11V9H11C11.2761 9 11.5 8.77614 11.5 8.5Z",fill:"currentColor"}),u("path",{d:"M8.5 3C11.5376 3 14 5.46243 14 8.5C14 9.83879 13.5217 11.0659 12.7266 12.0196L16.8536 16.1464C17.0488 16.3417 17.0488 16.6583 16.8536 16.8536C16.68 17.0271 16.4106 17.0464 16.2157 16.9114L16.1464 16.8536L12.0196 12.7266C11.0659 13.5217 9.83879 14 8.5 14C5.46243 14 3 11.5376 3 8.5C3 5.46243 5.46243 3 8.5 3ZM8.5 4C6.01472 4 4 6.01472 4 8.5C4 10.9853 6.01472 13 8.5 13C10.9853 13 13 10.9853 13 8.5C13 6.01472 10.9853 4 8.5 4Z",fill:"currentColor"}))),bc=Ke("zoomOut",u("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},u("path",{d:"M11 8C11.2761 8 11.5 8.22386 11.5 8.5C11.5 8.77614 11.2761 9 11 9H6C5.72386 9 5.5 8.77614 5.5 8.5C5.5 8.22386 5.72386 8 6 8H11Z",fill:"currentColor"}),u("path",{d:"M14 8.5C14 5.46243 11.5376 3 8.5 3C5.46243 3 3 5.46243 3 8.5C3 11.5376 5.46243 14 8.5 14C9.83879 14 11.0659 13.5217 12.0196 12.7266L16.1464 16.8536L16.2157 16.9114C16.4106 17.0464 16.68 17.0271 16.8536 16.8536C17.0488 16.6583 17.0488 16.3417 16.8536 16.1464L12.7266 12.0196C13.5217 11.0659 14 9.83879 14 8.5ZM4 8.5C4 6.01472 6.01472 4 8.5 4C10.9853 4 13 6.01472 13 8.5C13 10.9853 10.9853 13 8.5 13C6.01472 13 4 10.9853 4 8.5Z",fill:"currentColor"}))),yc=K({name:"ResizeSmall",render(){return u("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"},u("g",{fill:"none"},u("path",{d:"M5.5 4A1.5 1.5 0 0 0 4 5.5v1a.5.5 0 0 1-1 0v-1A2.5 2.5 0 0 1 5.5 3h1a.5.5 0 0 1 0 1h-1zM16 5.5A1.5 1.5 0 0 0 14.5 4h-1a.5.5 0 0 1 0-1h1A2.5 2.5 0 0 1 17 5.5v1a.5.5 0 0 1-1 0v-1zm0 9a1.5 1.5 0 0 1-1.5 1.5h-1a.5.5 0 0 0 0 1h1a2.5 2.5 0 0 0 2.5-2.5v-1a.5.5 0 0 0-1 0v1zm-12 0A1.5 1.5 0 0 0 5.5 16h1.25a.5.5 0 0 1 0 1H5.5A2.5 2.5 0 0 1 3 14.5v-1.25a.5.5 0 0 1 1 0v1.25zM8.5 7A1.5 1.5 0 0 0 7 8.5v3A1.5 1.5 0 0 0 8.5 13h3a1.5 1.5 0 0 0 1.5-1.5v-3A1.5 1.5 0 0 0 11.5 7h-3zM8 8.5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v3a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-3z",fill:"currentColor"})))}});function Wn(e){return Array.isArray(e)?e:[e]}const Rr={STOP:"STOP"};function Jo(e,t){const r=t(e);e.children!==void 0&&r!==Rr.STOP&&e.children.forEach(n=>Jo(n,t))}function wc(e,t={}){const{preserveGroup:r=!1}=t,n=[],o=r?l=>{l.isLeaf||(n.push(l.key),i(l.children))}:l=>{l.isLeaf||(l.isGroup||n.push(l.key),i(l.children))};function i(l){l.forEach(o)}return i(e),n}function xc(e,t){const{isLeaf:r}=e;return r!==void 0?r:!t(e)}function Cc(e){return e.children}function Sc(e){return e.key}function Pc(){return!1}function kc(e,t){const{isLeaf:r}=e;return!(r===!1&&!Array.isArray(t(e)))}function $c(e){return e.disabled===!0}function zc(e,t){return e.isLeaf===!1&&!Array.isArray(t(e))}function pr(e){var t;return e==null?[]:Array.isArray(e)?e:(t=e.checkedKeys)!==null&&t!==void 0?t:[]}function vr(e){var t;return e==null||Array.isArray(e)?[]:(t=e.indeterminateKeys)!==null&&t!==void 0?t:[]}function Tc(e,t){const r=new Set(e);return t.forEach(n=>{r.has(n)||r.add(n)}),Array.from(r)}function Ic(e,t){const r=new Set(e);return t.forEach(n=>{r.has(n)&&r.delete(n)}),Array.from(r)}function Rc(e){return(e==null?void 0:e.type)==="group"}class _c extends Error{constructor(){super(),this.message="SubtreeNotLoadedError: checking a subtree whose required nodes are not fully loaded."}}function Oc(e,t,r,n){return Jt(t.concat(e),r,n,!1)}function Bc(e,t){const r=new Set;return e.forEach(n=>{const o=t.treeNodeMap.get(n);if(o!==void 0){let i=o.parent;for(;i!==null&&!(i.disabled||r.has(i.key));)r.add(i.key),i=i.parent}}),r}function Mc(e,t,r,n){const o=Jt(t,r,n,!1),i=Jt(e,r,n,!0),l=Bc(e,r),s=[];return o.forEach(a=>{(i.has(a)||l.has(a))&&s.push(a)}),s.forEach(a=>o.delete(a)),o}function gr(e,t){const{checkedKeys:r,keysToCheck:n,keysToUncheck:o,indeterminateKeys:i,cascade:l,leafOnly:s,checkStrategy:a,allowNotLoaded:d}=e;if(!l)return n!==void 0?{checkedKeys:Tc(r,n),indeterminateKeys:Array.from(i)}:o!==void 0?{checkedKeys:Ic(r,o),indeterminateKeys:Array.from(i)}:{checkedKeys:Array.from(r),indeterminateKeys:Array.from(i)};const{levelTreeNodeMap:c}=t;let f;o!==void 0?f=Mc(o,r,t,d):n!==void 0?f=Oc(n,r,t,d):f=Jt(r,t,d,!1);const h=a==="parent",p=a==="child"||s,y=f,C=new Set,m=Math.max.apply(null,Array.from(c.keys()));for(let w=m;w>=0;w-=1){const z=w===0,_=c.get(w);for(const b of _){if(b.isLeaf)continue;const{key:g,shallowLoaded:M}=b;if(p&&M&&b.children.forEach(B=>{!B.disabled&&!B.isLeaf&&B.shallowLoaded&&y.has(B.key)&&y.delete(B.key)}),b.disabled||!M)continue;let k=!0,A=!1,$=!0;for(const B of b.children){const R=B.key;if(!B.disabled){if($&&($=!1),y.has(R))A=!0;else if(C.has(R)){A=!0,k=!1;break}else if(k=!1,A)break}}k&&!$?(h&&b.children.forEach(B=>{!B.disabled&&y.has(B.key)&&y.delete(B.key)}),y.add(g)):A&&C.add(g),z&&p&&y.has(g)&&y.delete(g)}}return{checkedKeys:Array.from(y),indeterminateKeys:Array.from(C)}}function Jt(e,t,r,n){const{treeNodeMap:o,getChildren:i}=t,l=new Set,s=new Set(e);return e.forEach(a=>{const d=o.get(a);d!==void 0&&Jo(d,c=>{if(c.disabled)return Rr.STOP;const{key:f}=c;if(!l.has(f)&&(l.add(f),s.add(f),zc(c.rawNode,i))){if(n)return Rr.STOP;if(!r)throw new _c}})}),s}function Lc(e,{includeGroup:t=!1,includeSelf:r=!0},n){var o;const i=n.treeNodeMap;let l=e==null?null:(o=i.get(e))!==null&&o!==void 0?o:null;const s={keyPath:[],treeNodePath:[],treeNode:l};if(l!=null&&l.ignored)return s.treeNode=null,s;for(;l;)!l.ignored&&(t||!l.isGroup)&&s.treeNodePath.push(l),l=l.parent;return s.treeNodePath.reverse(),r||s.treeNodePath.pop(),s.keyPath=s.treeNodePath.map(a=>a.key),s}function Ec(e){if(e.length===0)return null;const t=e[0];return t.isGroup||t.ignored||t.disabled?t.getNext():t}function Ac(e,t){const r=e.siblings,n=r.length,{index:o}=e;return t?r[(o+1)%n]:o===r.length-1?null:r[o+1]}function Un(e,t,{loop:r=!1,includeDisabled:n=!1}={}){const o=t==="prev"?Dc:Ac,i={reverse:t==="prev"};let l=!1,s=null;function a(d){if(d!==null){if(d===e){if(!l)l=!0;else if(!e.disabled&&!e.isGroup){s=e;return}}else if((!d.disabled||n)&&!d.ignored&&!d.isGroup){s=d;return}if(d.isGroup){const c=Zr(d,i);c!==null?s=c:a(o(d,r))}else{const c=o(d,!1);if(c!==null)a(c);else{const f=Fc(d);f!=null&&f.isGroup?a(o(f,r)):r&&a(o(d,!0))}}}}return a(e),s}function Dc(e,t){const r=e.siblings,n=r.length,{index:o}=e;return t?r[(o-1+n)%n]:o===0?null:r[o-1]}function Fc(e){return e.parent}function Zr(e,t={}){const{reverse:r=!1}=t,{children:n}=e;if(n){const{length:o}=n,i=r?o-1:0,l=r?-1:o,s=r?-1:1;for(let a=i;a!==l;a+=s){const d=n[a];if(!d.disabled&&!d.ignored)if(d.isGroup){const c=Zr(d,t);if(c!==null)return c}else return d}}return null}const Nc={getChild(){return this.ignored?null:Zr(this)},getParent(){const{parent:e}=this;return e!=null&&e.isGroup?e.getParent():e},getNext(e={}){return Un(this,"next",e)},getPrev(e={}){return Un(this,"prev",e)}};function Hc(e,t){const r=t?new Set(t):void 0,n=[];function o(i){i.forEach(l=>{n.push(l),!(l.isLeaf||!l.children||l.ignored)&&(l.isGroup||r===void 0||r.has(l.key))&&o(l.children)})}return o(e),n}function jc(e,t){const r=e.key;for(;t;){if(t.key===r)return!0;t=t.parent}return!1}function Qo(e,t,r,n,o,i=null,l=0){const s=[];return e.forEach((a,d)=>{var c;const f=Object.create(n);if(f.rawNode=a,f.siblings=s,f.level=l,f.index=d,f.isFirstChild=d===0,f.isLastChild=d+1===e.length,f.parent=i,!f.ignored){const h=o(a);Array.isArray(h)&&(f.children=Qo(h,t,r,n,o,f,l+1))}s.push(f),t.set(f.key,f),r.has(l)||r.set(l,[]),(c=r.get(l))===null||c===void 0||c.push(f)}),s}function Wc(e,t={}){var r;const n=new Map,o=new Map,{getDisabled:i=$c,getIgnored:l=Pc,getIsGroup:s=Rc,getKey:a=Sc}=t,d=(r=t.getChildren)!==null&&r!==void 0?r:Cc,c=t.ignoreEmptyChildren?b=>{const g=d(b);return Array.isArray(g)?g.length?g:null:g}:d,f=Object.assign({get key(){return a(this.rawNode)},get disabled(){return i(this.rawNode)},get isGroup(){return s(this.rawNode)},get isLeaf(){return xc(this.rawNode,c)},get shallowLoaded(){return kc(this.rawNode,c)},get ignored(){return l(this.rawNode)},contains(b){return jc(this,b)}},Nc),h=Qo(e,n,o,f,c);function p(b){if(b==null)return null;const g=n.get(b);return g&&!g.isGroup&&!g.ignored?g:null}function y(b){if(b==null)return null;const g=n.get(b);return g&&!g.ignored?g:null}function C(b,g){const M=y(b);return M?M.getPrev(g):null}function m(b,g){const M=y(b);return M?M.getNext(g):null}function w(b){const g=y(b);return g?g.getParent():null}function z(b){const g=y(b);return g?g.getChild():null}const _={treeNodes:h,treeNodeMap:n,levelTreeNodeMap:o,maxLevel:Math.max(...o.keys()),getChildren:c,getFlattenedNodes(b){return Hc(h,b)},getNode:p,getPrev:C,getNext:m,getParent:w,getChild:z,getFirstAvailableNode(){return Ec(h)},getPath(b,g={}){return Lc(b,g,_)},getCheckedKeys(b,g={}){const{cascade:M=!0,leafOnly:k=!1,checkStrategy:A="all",allowNotLoaded:$=!1}=g;return gr({checkedKeys:pr(b),indeterminateKeys:vr(b),cascade:M,leafOnly:k,checkStrategy:A,allowNotLoaded:$},_)},check(b,g,M={}){const{cascade:k=!0,leafOnly:A=!1,checkStrategy:$="all",allowNotLoaded:B=!1}=M;return gr({checkedKeys:pr(g),indeterminateKeys:vr(g),keysToCheck:b==null?[]:Wn(b),cascade:k,leafOnly:A,checkStrategy:$,allowNotLoaded:B},_)},uncheck(b,g,M={}){const{cascade:k=!0,leafOnly:A=!1,checkStrategy:$="all",allowNotLoaded:B=!1}=M;return gr({checkedKeys:pr(g),indeterminateKeys:vr(g),keysToUncheck:b==null?[]:Wn(b),cascade:k,leafOnly:A,checkStrategy:$,allowNotLoaded:B},_)},getNonLeafKeys(b={}){return wc(h,b)}};return _}const Uc={iconSizeSmall:"34px",iconSizeMedium:"40px",iconSizeLarge:"46px",iconSizeHuge:"52px"},Vc=e=>{const{textColorDisabled:t,iconColor:r,textColor2:n,fontSizeSmall:o,fontSizeMedium:i,fontSizeLarge:l,fontSizeHuge:s}=e;return Object.assign(Object.assign({},Uc),{fontSizeSmall:o,fontSizeMedium:i,fontSizeLarge:l,fontSizeHuge:s,textColor:t,iconColor:r,extraTextColor:n})},Kc={name:"Empty",common:Oe,self:Vc},qc=Kc,Gc=P("empty",`
display: flex;
flex-direction: column;
align-items: center;
font-size: var(--n-font-size);
`,[L("icon",`
width: var(--n-icon-size);
height: var(--n-icon-size);
font-size: var(--n-icon-size);
line-height: var(--n-icon-size);
color: var(--n-icon-color);
transition:
color .3s var(--n-bezier);
`,[H("+",[L("description",`
margin-top: 8px;
`)])]),L("description",`
transition: color .3s var(--n-bezier);
color: var(--n-text-color);
`),L("extra",`
text-align: center;
transition: color .3s var(--n-bezier);
margin-top: 12px;
color: var(--n-extra-text-color);
`)]),Xc=Object.assign(Object.assign({},re.props),{description:String,showDescription:{type:Boolean,default:!0},showIcon:{type:Boolean,default:!0},size:{type:String,default:"medium"},renderIcon:Function}),ei=K({name:"Empty",props:Xc,setup(e){const{mergedClsPrefixRef:t,inlineThemeDisabled:r}=Ie(e),n=re("Empty","-empty",Gc,qc,e,t),{localeRef:o}=Yr("Empty"),i=ie(uo,null),l=F(()=>{var c,f,h;return(c=e.description)!==null&&c!==void 0?c:(h=(f=i==null?void 0:i.mergedComponentPropsRef.value)===null||f===void 0?void 0:f.Empty)===null||h===void 0?void 0:h.description}),s=F(()=>{var c,f;return((f=(c=i==null?void 0:i.mergedComponentPropsRef.value)===null||c===void 0?void 0:c.Empty)===null||f===void 0?void 0:f.renderIcon)||(()=>u(uc,null))}),a=F(()=>{const{size:c}=e,{common:{cubicBezierEaseInOut:f},self:{[ne("iconSize",c)]:h,[ne("fontSize",c)]:p,textColor:y,iconColor:C,extraTextColor:m}}=n.value;return{"--n-icon-size":h,"--n-font-size":p,"--n-bezier":f,"--n-text-color":y,"--n-icon-color":C,"--n-extra-text-color":m}}),d=r?Fe("empty",F(()=>{let c="";const{size:f}=e;return c+=f[0],c}),a,e):void 0;return{mergedClsPrefix:t,mergedRenderIcon:s,localizedDescription:F(()=>l.value||o.value.description),cssVars:r?void 0:a,themeClass:d==null?void 0:d.themeClass,onRender:d==null?void 0:d.onRender}},render(){const{$slots:e,mergedClsPrefix:t,onRender:r}=this;return r==null||r(),u("div",{class:[`${t}-empty`,this.themeClass],style:this.cssVars},this.showIcon?u("div",{class:`${t}-empty__icon`},e.icon?e.icon():u(fe,{clsPrefix:t},{default:this.mergedRenderIcon})):null,this.showDescription?u("div",{class:`${t}-empty__description`},e.default?e.default():this.localizedDescription):null,e.extra?u("div",{class:`${t}-empty__extra`},e.extra()):null)}}),Yc={space:"6px",spaceArrow:"10px",arrowOffset:"10px",arrowOffsetVertical:"10px",arrowHeight:"6px",padding:"8px 14px"},Zc=e=>{const{boxShadow2:t,popoverColor:r,textColor2:n,borderRadius:o,fontSize:i,dividerColor:l}=e;return Object.assign(Object.assign({},Yc),{fontSize:i,borderRadius:o,color:r,dividerColor:l,textColor:n,boxShadow:t})},Jc={name:"Popover",common:Oe,self:Zc},Jr=Jc,mr={top:"bottom",bottom:"top",left:"right",right:"left"},ye="var(--n-arrow-height) * 1.414",Qc=H([P("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;
`,[H(">",[P("scrollbar",`
height: inherit;
max-height: inherit;
`)]),ze("raw",`
background-color: var(--n-color);
border-radius: var(--n-border-radius);
`,[ze("scrollable",[ze("show-header-or-footer","padding: var(--n-padding);")])]),L("header",`
padding: var(--n-padding);
border-bottom: 1px solid var(--n-divider-color);
transition: border-color .3s var(--n-bezier);
`),L("footer",`
padding: var(--n-padding);
border-top: 1px solid var(--n-divider-color);
transition: border-color .3s var(--n-bezier);
`),W("scrollable, show-header-or-footer",[L("content",`
padding: var(--n-padding);
`)])]),P("popover-shared",`
transform-origin: inherit;
`,[P("popover-arrow-wrapper",`
position: absolute;
overflow: hidden;
pointer-events: none;
`,[P("popover-arrow",`
transition: background-color .3s var(--n-bezier);
position: absolute;
display: block;
width: calc(${ye});
height: calc(${ye});
box-shadow: 0 0 8px 0 rgba(0, 0, 0, .12);
transform: rotate(45deg);
background-color: var(--n-color);
pointer-events: all;
`)]),H("&.popover-transition-enter-from, &.popover-transition-leave-to",`
opacity: 0;
transform: scale(.85);
`),H("&.popover-transition-enter-to, &.popover-transition-leave-from",`
transform: scale(1);
opacity: 1;
`),H("&.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);
`),H("&.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);
`)]),Be("top-start",`
top: calc(${ye} / -2);
left: calc(${Xe("top-start")} - var(--v-offset-left));
`),Be("top",`
top: calc(${ye} / -2);
transform: translateX(calc(${ye} / -2)) rotate(45deg);
left: 50%;
`),Be("top-end",`
top: calc(${ye} / -2);
right: calc(${Xe("top-end")} + var(--v-offset-left));
`),Be("bottom-start",`
bottom: calc(${ye} / -2);
left: calc(${Xe("bottom-start")} - var(--v-offset-left));
`),Be("bottom",`
bottom: calc(${ye} / -2);
transform: translateX(calc(${ye} / -2)) rotate(45deg);
left: 50%;
`),Be("bottom-end",`
bottom: calc(${ye} / -2);
right: calc(${Xe("bottom-end")} + var(--v-offset-left));
`),Be("left-start",`
left: calc(${ye} / -2);
top: calc(${Xe("left-start")} - var(--v-offset-top));
`),Be("left",`
left: calc(${ye} / -2);
transform: translateY(calc(${ye} / -2)) rotate(45deg);
top: 50%;
`),Be("left-end",`
left: calc(${ye} / -2);
bottom: calc(${Xe("left-end")} + var(--v-offset-top));
`),Be("right-start",`
right: calc(${ye} / -2);
top: calc(${Xe("right-start")} - var(--v-offset-top));
`),Be("right",`
right: calc(${ye} / -2);
transform: translateY(calc(${ye} / -2)) rotate(45deg);
top: 50%;
`),Be("right-end",`
right: calc(${ye} / -2);
bottom: calc(${Xe("right-end")} + var(--v-offset-top));
`),...fu({top:["right-start","left-start"],right:["top-end","bottom-end"],bottom:["right-end","left-end"],left:["top-start","bottom-start"]},(e,t)=>{const r=["right","left"].includes(t),n=r?"width":"height";return e.map(o=>{const i=o.split("-")[1]==="end",s=`calc((${`var(--v-target-${n}, 0px)`} - ${ye}) / 2)`,a=Xe(o);return H(`[v-placement="${o}"] >`,[P("popover-shared",[W("center-arrow",[P("popover-arrow",`${t}: calc(max(${s}, ${a}) ${i?"+":"-"} var(--v-offset-${r?"left":"top"}));`)])])])})})]);function Xe(e){return["top","bottom"].includes(e.split("-")[0])?"var(--n-arrow-offset)":"var(--n-arrow-offset-vertical)"}function Be(e,t){const r=e.split("-")[0],n=["top","bottom"].includes(r)?"height: var(--n-space-arrow);":"width: var(--n-space-arrow);";return H(`[v-placement="${e}"] >`,[P("popover-shared",`
margin-${mr[r]}: var(--n-space);
`,[W("show-arrow",`
margin-${mr[r]}: var(--n-space-arrow);
`),W("overlap",`
margin: 0;
`),Za("popover-arrow-wrapper",`
right: 0;
left: 0;
top: 0;
bottom: 0;
${r}: 100%;
${mr[r]}: auto;
${n}
`,[P("popover-arrow",t)])])])}const ti=Object.assign(Object.assign({},re.props),{to:gt.propTo,show:Boolean,trigger:String,showArrow:Boolean,delay:Number,duration:Number,raw:Boolean,arrowPointToCenter:Boolean,arrowStyle:[String,Object],displayDirective:String,x:Number,y:Number,flip:Boolean,overlap:Boolean,placement:String,width:[Number,String],keepAliveOnHover:Boolean,scrollable:Boolean,contentStyle:[Object,String],headerStyle:[Object,String],footerStyle:[Object,String],internalDeactivateImmediately:Boolean,animated:Boolean,onClickoutside:Function,internalTrapFocus:Boolean,internalOnAfterLeave:Function,minWidth:Number,maxWidth:Number}),ri=({arrowStyle:e,clsPrefix:t})=>u("div",{key:"__popover-arrow__",class:`${t}-popover-arrow-wrapper`},u("div",{class:`${t}-popover-arrow`,style:e})),ef=K({name:"PopoverBody",inheritAttrs:!1,props:ti,setup(e,{slots:t,attrs:r}){const{namespaceRef:n,mergedClsPrefixRef:o,inlineThemeDisabled:i}=Ie(e),l=re("Popover","-popover",Qc,Jr,e,o),s=E(null),a=ie("NPopover"),d=E(null),c=E(e.show),f=E(!1);it(()=>{const{show:k}=e;k&&!$l()&&!e.internalDeactivateImmediately&&(f.value=!0)});const h=F(()=>{const{trigger:k,onClickoutside:A}=e,$=[],{positionManuallyRef:{value:B}}=a;return B||(k==="click"&&!A&&$.push([hn,b,void 0,{capture:!0}]),k==="hover"&&$.push([Al,_])),A&&$.push([hn,b,void 0,{capture:!0}]),(e.displayDirective==="show"||e.animated&&f.value)&&$.push([co,e.show]),$}),p=F(()=>{const k=e.width==="trigger"?void 0:He(e.width),A=[];k&&A.push({width:k});const{maxWidth:$,minWidth:B}=e;return $&&A.push({maxWidth:He($)}),B&&A.push({maxWidth:He(B)}),i||A.push(y.value),A}),y=F(()=>{const{common:{cubicBezierEaseInOut:k,cubicBezierEaseIn:A,cubicBezierEaseOut:$},self:{space:B,spaceArrow:R,padding:O,fontSize:I,textColor:x,dividerColor:S,color:N,boxShadow:D,borderRadius:q,arrowHeight:Q,arrowOffset:ae,arrowOffsetVertical:pe}}=l.value;return{"--n-box-shadow":D,"--n-bezier":k,"--n-bezier-ease-in":A,"--n-bezier-ease-out":$,"--n-font-size":I,"--n-text-color":x,"--n-color":N,"--n-divider-color":S,"--n-border-radius":q,"--n-arrow-height":Q,"--n-arrow-offset":ae,"--n-arrow-offset-vertical":pe,"--n-padding":O,"--n-space":B,"--n-space-arrow":R}}),C=i?Fe("popover",void 0,y,e):void 0;a.setBodyInstance({syncPosition:m}),Qe(()=>{a.setBodyInstance(null)}),Ce(Z(e,"show"),k=>{e.animated||(k?c.value=!0:c.value=!1)});function m(){var k;(k=s.value)===null||k===void 0||k.syncPosition()}function w(k){e.trigger==="hover"&&e.keepAliveOnHover&&e.show&&a.handleMouseEnter(k)}function z(k){e.trigger==="hover"&&e.keepAliveOnHover&&a.handleMouseLeave(k)}function _(k){e.trigger==="hover"&&!g().contains(pn(k))&&a.handleMouseMoveOutside(k)}function b(k){(e.trigger==="click"&&!g().contains(pn(k))||e.onClickoutside)&&a.handleClickOutside(k)}function g(){return a.getTriggerElement()}Pe(Qt,d),Pe(Er,null),Pe(Lr,null);function M(){if(C==null||C.onRender(),!(e.displayDirective==="show"||e.show||e.animated&&f.value))return null;let A;const $=a.internalRenderBodyRef.value,{value:B}=o;if($)A=$([`${B}-popover-shared`,C==null?void 0:C.themeClass.value,e.overlap&&`${B}-popover-shared--overlap`,e.showArrow&&`${B}-popover-shared--show-arrow`,e.arrowPointToCenter&&`${B}-popover-shared--center-arrow`],d,p.value,w,z);else{const{value:R}=a.extraClassRef,{internalTrapFocus:O}=e,I=!vn(t.header)||!vn(t.footer),x=()=>{var S;const N=I?u(De,null,Ye(t.header,Q=>Q?u("div",{class:`${B}-popover__header`,style:e.headerStyle},Q):null),Ye(t.default,Q=>Q?u("div",{class:`${B}-popover__content`,style:e.contentStyle},t):null),Ye(t.footer,Q=>Q?u("div",{class:`${B}-popover__footer`,style:e.footerStyle},Q):null)):e.scrollable?(S=t.default)===null||S===void 0?void 0:S.call(t):u("div",{class:`${B}-popover__content`,style:e.contentStyle},t),D=e.scrollable?u(fo,{contentClass:I?void 0:`${B}-popover__content`,contentStyle:I?void 0:e.contentStyle},{default:()=>N}):N,q=e.showArrow?ri({arrowStyle:e.arrowStyle,clsPrefix:B}):null;return[D,q]};A=u("div",_t({class:[`${B}-popover`,`${B}-popover-shared`,C==null?void 0:C.themeClass.value,R.map(S=>`${B}-${S}`),{[`${B}-popover--scrollable`]:e.scrollable,[`${B}-popover--show-header-or-footer`]:I,[`${B}-popover--raw`]:e.raw,[`${B}-popover-shared--overlap`]:e.overlap,[`${B}-popover-shared--show-arrow`]:e.showArrow,[`${B}-popover-shared--center-arrow`]:e.arrowPointToCenter}],ref:d,style:p.value,onKeydown:a.handleKeydown,onMouseenter:w,onMouseleave:z},r),O?u(Ja,{active:e.show,autoFocus:!0},{default:x}):x())}return vt(A,h.value)}return{displayed:f,namespace:n,isMounted:a.isMountedRef,zIndex:a.zIndexRef,followerRef:s,adjustedTo:gt(e),followerEnabled:c,renderContentNode:M}},render(){return u(Oo,{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===gt.tdkey},{default:()=>this.animated?u($t,{name:"popover-transition",appear:this.isMounted,onEnter:()=>{this.followerEnabled=!0},onAfterLeave:()=>{var e;(e=this.internalOnAfterLeave)===null||e===void 0||e.call(this),this.followerEnabled=!1,this.displayed=!1}},{default:this.renderContentNode}):this.renderContentNode()})}}),tf=Object.keys(ti),rf={focus:["onFocus","onBlur"],click:["onClick"],hover:["onMouseenter","onMouseleave"],manual:[],nested:["onFocus","onBlur","onMouseenter","onMouseleave","onClick"]};function nf(e,t,r){rf[t].forEach(n=>{e.props?e.props=Object.assign({},e.props):e.props={};const o=e.props[n],i=r[n];o?e.props[n]=(...l)=>{o(...l),i(...l)}:e.props[n]=i})}const of=he("").type,or={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"},arrowStyle:[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:gt.propTo,scrollable:Boolean,contentStyle:[Object,String],headerStyle:[Object,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},af=Object.assign(Object.assign(Object.assign({},re.props),or),{internalOnAfterLeave:Function,internalRenderBody:Function}),ni=K({name:"Popover",inheritAttrs:!1,props:af,__popover__:!0,setup(e){const t=Dr(),r=E(null),n=F(()=>e.show),o=E(e.defaultShow),i=rr(n,o),l=Me(()=>e.disabled?!1:i.value),s=()=>{if(e.disabled)return!0;const{getDisabled:x}=e;return!!(x!=null&&x())},a=()=>s()?!1:i.value,d=Rl(e,["arrow","showArrow"]),c=F(()=>e.overlap?!1:d.value);let f=null;const h=E(null),p=E(null),y=Me(()=>e.x!==void 0&&e.y!==void 0);function C(x){const{"onUpdate:show":S,onUpdateShow:N,onShow:D,onHide:q}=e;o.value=x,S&&ce(S,x),N&&ce(N,x),x&&D&&ce(D,!0),x&&q&&ce(q,!1)}function m(){f&&f.syncPosition()}function w(){const{value:x}=h;x&&(window.clearTimeout(x),h.value=null)}function z(){const{value:x}=p;x&&(window.clearTimeout(x),p.value=null)}function _(){const x=s();if(e.trigger==="focus"&&!x){if(a())return;C(!0)}}function b(){const x=s();if(e.trigger==="focus"&&!x){if(!a())return;C(!1)}}function g(){const x=s();if(e.trigger==="hover"&&!x){if(z(),h.value!==null||a())return;const S=()=>{C(!0),h.value=null},{delay:N}=e;N===0?S():h.value=window.setTimeout(S,N)}}function M(){const x=s();if(e.trigger==="hover"&&!x){if(w(),p.value!==null||!a())return;const S=()=>{C(!1),p.value=null},{duration:N}=e;N===0?S():p.value=window.setTimeout(S,N)}}function k(){M()}function A(x){var S;a()&&(e.trigger==="click"&&(w(),z(),C(!1)),(S=e.onClickoutside)===null||S===void 0||S.call(e,x))}function $(){if(e.trigger==="click"&&!s()){w(),z();const x=!a();C(x)}}function B(x){e.internalTrapFocus&&x.key==="Escape"&&(w(),z(),C(!1))}function R(x){o.value=x}function O(){var x;return(x=r.value)===null||x===void 0?void 0:x.targetRef}function I(x){f=x}return Pe("NPopover",{getTriggerElement:O,handleKeydown:B,handleMouseEnter:g,handleMouseLeave:M,handleClickOutside:A,handleMouseMoveOutside:k,setBodyInstance:I,positionManuallyRef:y,isMountedRef:t,zIndexRef:Z(e,"zIndex"),extraClassRef:Z(e,"internalExtraClass"),internalRenderBodyRef:Z(e,"internalRenderBody")}),it(()=>{i.value&&s()&&C(!1)}),{binderInstRef:r,positionManually:y,mergedShowConsideringDisabledProp:l,uncontrolledShow:o,mergedShowArrow:c,getMergedShow:a,setShow:R,handleClick:$,handleMouseEnter:g,handleMouseLeave:M,handleFocus:_,handleBlur:b,syncPosition:m}},render(){var e;const{positionManually:t,$slots:r}=this;let n,o=!1;if(!t&&(r.activator?n=gn(r,"activator"):n=gn(r,"trigger"),n)){n=Qa(n),n=n.type===of?u("span",[n]):n;const i={onClick:this.handleClick,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onFocus:this.handleFocus,onBlur:this.handleBlur};if(!((e=n.type)===null||e===void 0)&&e.__popover__)o=!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:l}=this,s=[i,...l],a={onBlur:d=>{s.forEach(c=>{c.onBlur(d)})},onFocus:d=>{s.forEach(c=>{c.onFocus(d)})},onClick:d=>{s.forEach(c=>{c.onClick(d)})},onMouseenter:d=>{s.forEach(c=>{c.onMouseenter(d)})},onMouseleave:d=>{s.forEach(c=>{c.onMouseleave(d)})}};nf(n,l?"nested":t?"manual":this.trigger,a)}}return u(Ro,{ref:"binderInstRef",syncTarget:!o,syncTargetWithParent:this.internalSyncTargetWithParent},{default:()=>{this.mergedShowConsideringDisabledProp;const i=this.getMergedShow();return[this.internalTrapFocus&&i?vt(u("div",{style:{position:"fixed",inset:0}}),[[Fr,{enabled:i,zIndex:this.zIndex}]]):null,t?null:u(_o,null,{default:()=>n}),u(ef,ho(this.$props,tf,Object.assign(Object.assign({},this.$attrs),{showArrow:this.mergedShowArrow,show:i})),{default:()=>{var l,s;return(s=(l=this.$slots).default)===null||s===void 0?void 0:s.call(l)},header:()=>{var l,s;return(s=(l=this.$slots).header)===null||s===void 0?void 0:s.call(l)},footer:()=>{var l,s;return(s=(l=this.$slots).footer)===null||s===void 0?void 0:s.call(l)}})]}})}}),lf={closeIconSizeTiny:"12px",closeIconSizeSmall:"12px",closeIconSizeMedium:"14px",closeIconSizeLarge:"14px",closeSizeTiny:"16px",closeSizeSmall:"16px",closeSizeMedium:"18px",closeSizeLarge:"18px",padding:"0 7px",closeMargin:"0 0 0 4px",closeMarginRtl:"0 4px 0 0"},sf=e=>{const{textColor2:t,primaryColorHover:r,primaryColorPressed:n,primaryColor:o,infoColor:i,successColor:l,warningColor:s,errorColor:a,baseColor:d,borderColor:c,opacityDisabled:f,tagColor:h,closeIconColor:p,closeIconColorHover:y,closeIconColorPressed:C,borderRadiusSmall:m,fontSizeMini:w,fontSizeTiny:z,fontSizeSmall:_,fontSizeMedium:b,heightMini:g,heightTiny:M,heightSmall:k,heightMedium:A,closeColorHover:$,closeColorPressed:B,buttonColor2Hover:R,buttonColor2Pressed:O,fontWeightStrong:I}=e;return Object.assign(Object.assign({},lf),{closeBorderRadius:m,heightTiny:g,heightSmall:M,heightMedium:k,heightLarge:A,borderRadius:m,opacityDisabled:f,fontSizeTiny:w,fontSizeSmall:z,fontSizeMedium:_,fontSizeLarge:b,fontWeightStrong:I,textColorCheckable:t,textColorHoverCheckable:t,textColorPressedCheckable:t,textColorChecked:d,colorCheckable:"#0000",colorHoverCheckable:R,colorPressedCheckable:O,colorChecked:o,colorCheckedHover:r,colorCheckedPressed:n,border:`1px solid ${c}`,textColor:t,color:h,colorBordered:"rgb(250, 250, 252)",closeIconColor:p,closeIconColorHover:y,closeIconColorPressed:C,closeColorHover:$,closeColorPressed:B,borderPrimary:`1px solid ${te(o,{alpha:.3})}`,textColorPrimary:o,colorPrimary:te(o,{alpha:.12}),colorBorderedPrimary:te(o,{alpha:.1}),closeIconColorPrimary:o,closeIconColorHoverPrimary:o,closeIconColorPressedPrimary:o,closeColorHoverPrimary:te(o,{alpha:.12}),closeColorPressedPrimary:te(o,{alpha:.18}),borderInfo:`1px solid ${te(i,{alpha:.3})}`,textColorInfo:i,colorInfo:te(i,{alpha:.12}),colorBorderedInfo:te(i,{alpha:.1}),closeIconColorInfo:i,closeIconColorHoverInfo:i,closeIconColorPressedInfo:i,closeColorHoverInfo:te(i,{alpha:.12}),closeColorPressedInfo:te(i,{alpha:.18}),borderSuccess:`1px solid ${te(l,{alpha:.3})}`,textColorSuccess:l,colorSuccess:te(l,{alpha:.12}),colorBorderedSuccess:te(l,{alpha:.1}),closeIconColorSuccess:l,closeIconColorHoverSuccess:l,closeIconColorPressedSuccess:l,closeColorHoverSuccess:te(l,{alpha:.12}),closeColorPressedSuccess:te(l,{alpha:.18}),borderWarning:`1px solid ${te(s,{alpha:.35})}`,textColorWarning:s,colorWarning:te(s,{alpha:.15}),colorBorderedWarning:te(s,{alpha:.12}),closeIconColorWarning:s,closeIconColorHoverWarning:s,closeIconColorPressedWarning:s,closeColorHoverWarning:te(s,{alpha:.12}),closeColorPressedWarning:te(s,{alpha:.18}),borderError:`1px solid ${te(a,{alpha:.23})}`,textColorError:a,colorError:te(a,{alpha:.1}),colorBorderedError:te(a,{alpha:.08}),closeIconColorError:a,closeIconColorHoverError:a,closeIconColorPressedError:a,closeColorHoverError:te(a,{alpha:.12}),closeColorPressedError:te(a,{alpha:.18})})},df={name:"Tag",common:Oe,self:sf},uf=df,cf={color:Object,type:{type:String,default:"default"},round:Boolean,size:{type:String,default:"medium"},closable:Boolean,disabled:{type:Boolean,default:void 0}},ff=P("tag",`
white-space: nowrap;
position: relative;
box-sizing: border-box;
cursor: default;
display: inline-flex;
align-items: center;
flex-wrap: nowrap;
padding: var(--n-padding);
border-radius: var(--n-border-radius);
color: var(--n-text-color);
background-color: var(--n-color);
transition:
border-color .3s var(--n-bezier),
background-color .3s var(--n-bezier),
color .3s var(--n-bezier),
box-shadow .3s var(--n-bezier),
opacity .3s var(--n-bezier);
line-height: 1;
height: var(--n-height);
font-size: var(--n-font-size);
`,[W("strong",`
font-weight: var(--n-font-weight-strong);
`),L("border",`
pointer-events: none;
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
border-radius: inherit;
border: var(--n-border);
transition: border-color .3s var(--n-bezier);
`),L("icon",`
display: flex;
margin: 0 4px 0 0;
color: var(--n-text-color);
transition: color .3s var(--n-bezier);
font-size: var(--n-avatar-size-override);
`),L("avatar",`
display: flex;
margin: 0 6px 0 0;
`),L("close",`
margin: var(--n-close-margin);
transition:
background-color .3s var(--n-bezier),
color .3s var(--n-bezier);
`),W("round",`
padding: 0 calc(var(--n-height) / 3);
border-radius: calc(var(--n-height) / 2);
`,[L("icon",`
margin: 0 4px 0 calc((var(--n-height) - 8px) / -2);
`),L("avatar",`
margin: 0 6px 0 calc((var(--n-height) - 8px) / -2);
`),W("closable",`
padding: 0 calc(var(--n-height) / 4) 0 calc(var(--n-height) / 3);
`)]),W("icon, avatar",[W("round",`
padding: 0 calc(var(--n-height) / 3) 0 calc(var(--n-height) / 2);
`)]),W("disabled",`
cursor: not-allowed !important;
opacity: var(--n-opacity-disabled);
`),W("checkable",`
cursor: pointer;
box-shadow: none;
color: var(--n-text-color-checkable);
background-color: var(--n-color-checkable);
`,[ze("disabled",[H("&:hover","background-color: var(--n-color-hover-checkable);",[ze("checked","color: var(--n-text-color-hover-checkable);")]),H("&:active","background-color: var(--n-color-pressed-checkable);",[ze("checked","color: var(--n-text-color-pressed-checkable);")])]),W("checked",`
color: var(--n-text-color-checked);
background-color: var(--n-color-checked);
`,[ze("disabled",[H("&:hover","background-color: var(--n-color-checked-hover);"),H("&:active","background-color: var(--n-color-checked-pressed);")])])])]),hf=Object.assign(Object.assign(Object.assign({},re.props),cf),{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}),pf=Ve("n-tag"),oi=K({name:"Tag",props:hf,setup(e){const t=E(null),{mergedBorderedRef:r,mergedClsPrefixRef:n,inlineThemeDisabled:o,mergedRtlRef:i}=Ie(e),l=re("Tag","-tag",ff,uf,e,n);Pe(pf,{roundRef:Z(e,"round")});function s(p){if(!e.disabled&&e.checkable){const{checked:y,onCheckedChange:C,onUpdateChecked:m,"onUpdate:checked":w}=e;m&&m(!y),w&&w(!y),C&&C(!y)}}function a(p){if(e.triggerClickOnClose||p.stopPropagation(),!e.disabled){const{onClose:y}=e;y&&ce(y,p)}}const d={setTextContent(p){const{value:y}=t;y&&(y.textContent=p)}},c=Ot("Tag",i,n),f=F(()=>{const{type:p,size:y,color:{color:C,textColor:m}={}}=e,{common:{cubicBezierEaseInOut:w},self:{padding:z,closeMargin:_,closeMarginRtl:b,borderRadius:g,opacityDisabled:M,textColorCheckable:k,textColorHoverCheckable:A,textColorPressedCheckable:$,textColorChecked:B,colorCheckable:R,colorHoverCheckable:O,colorPressedCheckable:I,colorChecked:x,colorCheckedHover:S,colorCheckedPressed:N,closeBorderRadius:D,fontWeightStrong:q,[ne("colorBordered",p)]:Q,[ne("closeSize",y)]:ae,[ne("closeIconSize",y)]:pe,[ne("fontSize",y)]:ve,[ne("height",y)]:Re,[ne("color",p)]:oe,[ne("textColor",p)]:ke,[ne("border",p)]:we,[ne("closeIconColor",p)]:ee,[ne("closeIconColorHover",p)]:Le,[ne("closeIconColorPressed",p)]:qe,[ne("closeColorHover",p)]:Ge,[ne("closeColorPressed",p)]:Ee}}=l.value;return{"--n-font-weight-strong":q,"--n-avatar-size-override":`calc(${Re} - 8px)`,"--n-bezier":w,"--n-border-radius":g,"--n-border":we,"--n-close-icon-size":pe,"--n-close-color-pressed":Ee,"--n-close-color-hover":Ge,"--n-close-border-radius":D,"--n-close-icon-color":ee,"--n-close-icon-color-hover":Le,"--n-close-icon-color-pressed":qe,"--n-close-icon-color-disabled":ee,"--n-close-margin":_,"--n-close-margin-rtl":b,"--n-close-size":ae,"--n-color":C||(r.value?Q:oe),"--n-color-checkable":R,"--n-color-checked":x,"--n-color-checked-hover":S,"--n-color-checked-pressed":N,"--n-color-hover-checkable":O,"--n-color-pressed-checkable":I,"--n-font-size":ve,"--n-height":Re,"--n-opacity-disabled":M,"--n-padding":z,"--n-text-color":m||ke,"--n-text-color-checkable":k,"--n-text-color-checked":B,"--n-text-color-hover-checkable":A,"--n-text-color-pressed-checkable":$}}),h=o?Fe("tag",F(()=>{let p="";const{type:y,size:C,color:{color:m,textColor:w}={}}=e;return p+=y[0],p+=C[0],m&&(p+=`a${mn(m)}`),w&&(p+=`b${mn(w)}`),r.value&&(p+="c"),p}),f,e):void 0;return Object.assign(Object.assign({},d),{rtlEnabled:c,mergedClsPrefix:n,contentRef:t,mergedBordered:r,handleClick:s,handleCloseClick:a,cssVars:o?void 0:f,themeClass:h==null?void 0:h.themeClass,onRender:h==null?void 0:h.onRender})},render(){var e,t;const{mergedClsPrefix:r,rtlEnabled:n,closable:o,color:{borderColor:i}={},round:l,onRender:s,$slots:a}=this;s==null||s();const d=Ye(a.avatar,f=>f&&u("div",{class:`${r}-tag__avatar`},f)),c=Ye(a.icon,f=>f&&u("div",{class:`${r}-tag__icon`},f));return u("div",{class:[`${r}-tag`,this.themeClass,{[`${r}-tag--rtl`]:n,[`${r}-tag--strong`]:this.strong,[`${r}-tag--disabled`]:this.disabled,[`${r}-tag--checkable`]:this.checkable,[`${r}-tag--checked`]:this.checkable&&this.checked,[`${r}-tag--round`]:l,[`${r}-tag--avatar`]:d,[`${r}-tag--icon`]:c,[`${r}-tag--closable`]:o}],style:this.cssVars,onClick:this.handleClick,onMouseenter:this.onMouseenter,onMouseleave:this.onMouseleave},c||d,u("span",{class:`${r}-tag__content`,ref:"contentRef"},(t=(e=this.$slots).default)===null||t===void 0?void 0:t.call(e)),!this.checkable&&o?u(el,{clsPrefix:r,class:`${r}-tag__close`,disabled:this.disabled,onClick:this.handleCloseClick,focusable:this.internalCloseFocusable,round:l,isButtonTag:this.internalCloseIsButtonTag,absolute:!0}):null,!this.checkable&&this.mergedBordered?u("div",{class:`${r}-tag__border`,style:{borderColor:i}}):null)}}),vf=P("base-clear",`
flex-shrink: 0;
height: 1em;
width: 1em;
position: relative;
`,[H(">",[L("clear",`
font-size: var(--n-clear-size);
height: 1em;
width: 1em;
cursor: pointer;
color: var(--n-clear-color);
transition: color .3s var(--n-bezier);
display: flex;
`,[H("&:hover",`
color: var(--n-clear-color-hover)!important;
`),H("&:active",`
color: var(--n-clear-color-pressed)!important;
`)]),L("placeholder",`
display: flex;
`),L("clear, placeholder",`
position: absolute;
left: 50%;
top: 50%;
transform: translateX(-50%) translateY(-50%);
`,[po({originalTransform:"translateX(-50%) translateY(-50%)",left:"50%",top:"50%"})])])]),_r=K({name:"BaseClear",props:{clsPrefix:{type:String,required:!0},show:Boolean,onClear:Function},setup(e){return vo("-base-clear",vf,Z(e,"clsPrefix")),{handleMouseDown(t){t.preventDefault()}}},render(){const{clsPrefix:e}=this;return u("div",{class:`${e}-base-clear`},u(go,null,{default:()=>{var t,r;return this.show?u("div",{key:"dismiss",class:`${e}-base-clear__clear`,onClick:this.onClear,onMousedown:this.handleMouseDown,"data-clear":!0},ht(this.$slots.icon,()=>[u(fe,{clsPrefix:e},{default:()=>u(hc,null)})])):u("div",{key:"icon",class:`${e}-base-clear__placeholder`},(r=(t=this.$slots).placeholder)===null||r===void 0?void 0:r.call(t))}}))}}),gf=K({name:"InternalSelectionSuffix",props:{clsPrefix:{type:String,required:!0},showArrow:{type:Boolean,default:void 0},showClear:{type:Boolean,default:void 0},loading:{type:Boolean,default:!1},onClear:Function},setup(e,{slots:t}){return()=>{const{clsPrefix:r}=e;return u(tl,{clsPrefix:r,class:`${r}-base-suffix`,strokeWidth:24,scale:.85,show:e.loading},{default:()=>e.showArrow?u(_r,{clsPrefix:r,show:e.showClear,onClear:e.onClear},{placeholder:()=>u(fe,{clsPrefix:r,class:`${r}-base-suffix__arrow`},{default:()=>ht(t.default,()=>[u(fc,null)])})}):null})}}}),mf={paddingTiny:"0 8px",paddingSmall:"0 10px",paddingMedium:"0 12px",paddingLarge:"0 14px",clearSize:"16px"},bf=e=>{const{textColor2:t,textColor3:r,textColorDisabled:n,primaryColor:o,primaryColorHover:i,inputColor:l,inputColorDisabled:s,borderColor:a,warningColor:d,warningColorHover:c,errorColor:f,errorColorHover:h,borderRadius:p,lineHeight:y,fontSizeTiny:C,fontSizeSmall:m,fontSizeMedium:w,fontSizeLarge:z,heightTiny:_,heightSmall:b,heightMedium:g,heightLarge:M,actionColor:k,clearColor:A,clearColorHover:$,clearColorPressed:B,placeholderColor:R,placeholderColorDisabled:O,iconColor:I,iconColorDisabled:x,iconColorHover:S,iconColorPressed:N}=e;return Object.assign(Object.assign({},mf),{countTextColorDisabled:n,countTextColor:r,heightTiny:_,heightSmall:b,heightMedium:g,heightLarge:M,fontSizeTiny:C,fontSizeSmall:m,fontSizeMedium:w,fontSizeLarge:z,lineHeight:y,lineHeightTextarea:y,borderRadius:p,iconSize:"16px",groupLabelColor:k,groupLabelTextColor:t,textColor:t,textColorDisabled:n,textDecorationColor:t,caretColor:o,placeholderColor:R,placeholderColorDisabled:O,color:l,colorDisabled:s,colorFocus:l,groupLabelBorder:`1px solid ${a}`,border:`1px solid ${a}`,borderHover:`1px solid ${i}`,borderDisabled:`1px solid ${a}`,borderFocus:`1px solid ${i}`,boxShadowFocus:`0 0 0 2px ${te(o,{alpha:.2})}`,loadingColor:o,loadingColorWarning:d,borderWarning:`1px solid ${d}`,borderHoverWarning:`1px solid ${c}`,colorFocusWarning:l,borderFocusWarning:`1px solid ${c}`,boxShadowFocusWarning:`0 0 0 2px ${te(d,{alpha:.2})}`,caretColorWarning:d,loadingColorError:f,borderError:`1px solid ${f}`,borderHoverError:`1px solid ${h}`,colorFocusError:l,borderFocusError:`1px solid ${h}`,boxShadowFocusError:`0 0 0 2px ${te(f,{alpha:.2})}`,caretColorError:f,clearColor:A,clearColorHover:$,clearColorPressed:B,iconColor:I,iconColorDisabled:x,iconColorHover:S,iconColorPressed:N,suffixTextColor:t})},yf={name:"Input",common:Oe,self:bf},wf=yf,ii=Ve("n-input");function xf(e){let t=0;for(const r of e)t++;return t}function jt(e){return e===""||e==null}function Cf(e){const t=E(null);function r(){const{value:i}=e;if(!(i!=null&&i.focus)){o();return}const{selectionStart:l,selectionEnd:s,value:a}=i;if(l==null||s==null){o();return}t.value={start:l,end:s,beforeText:a.slice(0,l),afterText:a.slice(s)}}function n(){var i;const{value:l}=t,{value:s}=e;if(!l||!s)return;const{value:a}=s,{start:d,beforeText:c,afterText:f}=l;let h=a.length;if(a.endsWith(f))h=a.length-f.length;else if(a.startsWith(c))h=c.length;else{const p=c[d-1],y=a.indexOf(p,d-1);y!==-1&&(h=y+1)}(i=s.setSelectionRange)===null||i===void 0||i.call(s,h,h)}function o(){t.value=null}return Ce(e,o),{recordCursor:r,restoreCursor:n}}const Vn=K({name:"InputWordCount",setup(e,{slots:t}){const{mergedValueRef:r,maxlengthRef:n,mergedClsPrefixRef:o,countGraphemesRef:i}=ie(ii),l=F(()=>{const{value:s}=r;return s===null||Array.isArray(s)?0:(i.value||xf)(s)});return()=>{const{value:s}=n,{value:a}=r;return u("span",{class:`${o.value}-input-word-count`},rl(t.default,{value:a===null||Array.isArray(a)?"":a},()=>[s===void 0?l.value:`${l.value} / ${s}`]))}}}),Sf=P("input",`
max-width: 100%;
cursor: text;
line-height: 1.5;
z-index: auto;
outline: none;
box-sizing: border-box;
position: relative;
display: inline-flex;
border-radius: var(--n-border-radius);
background-color: var(--n-color);
transition: background-color .3s var(--n-bezier);
font-size: var(--n-font-size);
--n-padding-vertical: calc((var(--n-height) - 1.5 * var(--n-font-size)) / 2);
`,[L("input, textarea",`
overflow: hidden;
flex-grow: 1;
position: relative;
`),L("input-el, textarea-el, input-mirror, textarea-mirror, separator, placeholder",`
box-sizing: border-box;
font-size: inherit;
line-height: 1.5;
font-family: inherit;
border: none;
outline: none;
background-color: #0000;
text-align: inherit;
transition:
-webkit-text-fill-color .3s var(--n-bezier),
caret-color .3s var(--n-bezier),
color .3s var(--n-bezier),
text-decoration-color .3s var(--n-bezier);
`),L("input-el, textarea-el",`
-webkit-appearance: none;
scrollbar-width: none;
width: 100%;
min-width: 0;
text-decoration-color: var(--n-text-decoration-color);
color: var(--n-text-color);
caret-color: var(--n-caret-color);
background-color: transparent;
`,[H("&::-webkit-scrollbar, &::-webkit-scrollbar-track-piece, &::-webkit-scrollbar-thumb",`
width: 0;
height: 0;
display: none;
`),H("&::placeholder",`
color: #0000;
-webkit-text-fill-color: transparent !important;
`),H("&:-webkit-autofill ~",[L("placeholder","display: none;")])]),W("round",[ze("textarea","border-radius: calc(var(--n-height) / 2);")]),L("placeholder",`
pointer-events: none;
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
overflow: hidden;
color: var(--n-placeholder-color);
`,[H("span",`
width: 100%;
display: inline-block;
`)]),W("textarea",[L("placeholder","overflow: visible;")]),ze("autosize","width: 100%;"),W("autosize",[L("textarea-el, input-el",`
position: absolute;
top: 0;
left: 0;
height: 100%;
`)]),P("input-wrapper",`
overflow: hidden;
display: inline-flex;
flex-grow: 1;
position: relative;
padding-left: var(--n-padding-left);
padding-right: var(--n-padding-right);
`),L("input-mirror",`
padding: 0;
height: var(--n-height);
line-height: var(--n-height);
overflow: hidden;
visibility: hidden;
position: static;
white-space: pre;
pointer-events: none;
`),L("input-el",`
padding: 0;
height: var(--n-height);
line-height: var(--n-height);
`,[H("+",[L("placeholder",`
display: flex;
align-items: center;
`)])]),ze("textarea",[L("placeholder","white-space: nowrap;")]),L("eye",`
transition: color .3s var(--n-bezier);
`),W("textarea","width: 100%;",[P("input-word-count",`
position: absolute;
right: var(--n-padding-right);
bottom: var(--n-padding-vertical);
`),W("resizable",[P("input-wrapper",`
resize: vertical;
min-height: var(--n-height);
`)]),L("textarea-el, textarea-mirror, placeholder",`
height: 100%;
padding-left: 0;
padding-right: 0;
padding-top: var(--n-padding-vertical);
padding-bottom: var(--n-padding-vertical);
word-break: break-word;
display: inline-block;
vertical-align: bottom;
box-sizing: border-box;
line-height: var(--n-line-height-textarea);
margin: 0;
resize: none;
white-space: pre-wrap;
`),L("textarea-mirror",`
width: 100%;
pointer-events: none;
overflow: hidden;
visibility: hidden;
position: static;
white-space: pre-wrap;
overflow-wrap: break-word;
`)]),W("pair",[L("input-el, placeholder","text-align: center;"),L("separator",`
display: flex;
align-items: center;
transition: color .3s var(--n-bezier);
color: var(--n-text-color);
white-space: nowrap;
`,[P("icon",`
color: var(--n-icon-color);
`),P("base-icon",`
color: var(--n-icon-color);
`)])]),W("disabled",`
cursor: not-allowed;
background-color: var(--n-color-disabled);
`,[L("border","border: var(--n-border-disabled);"),L("input-el, textarea-el",`
cursor: not-allowed;
color: var(--n-text-color-disabled);
text-decoration-color: var(--n-text-color-disabled);
`),L("placeholder","color: var(--n-placeholder-color-disabled);"),L("separator","color: var(--n-text-color-disabled);",[P("icon",`
color: var(--n-icon-color-disabled);
`),P("base-icon",`
color: var(--n-icon-color-disabled);
`)]),P("input-word-count",`
color: var(--n-count-text-color-disabled);
`),L("suffix, prefix","color: var(--n-text-color-disabled);",[P("icon",`
color: var(--n-icon-color-disabled);
`),P("internal-icon",`
color: var(--n-icon-color-disabled);
`)])]),ze("disabled",[L("eye",`
display: flex;
align-items: center;
justify-content: center;
color: var(--n-icon-color);
cursor: pointer;
`,[H("&:hover",`
color: var(--n-icon-color-hover);
`),H("&:active",`
color: var(--n-icon-color-pressed);
`)]),H("&:hover",[L("state-border","border: var(--n-border-hover);")]),W("focus","background-color: var(--n-color-focus);",[L("state-border",`
border: var(--n-border-focus);
box-shadow: var(--n-box-shadow-focus);
`)])]),L("border, state-border",`
box-sizing: border-box;
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
pointer-events: none;
border-radius: inherit;
border: var(--n-border);
transition:
box-shadow .3s var(--n-bezier),
border-color .3s var(--n-bezier);
`),L("state-border",`
border-color: #0000;
z-index: 1;
`),L("prefix","margin-right: 4px;"),L("suffix",`
margin-left: 4px;
`),L("suffix, prefix",`
transition: color .3s var(--n-bezier);
flex-wrap: nowrap;
flex-shrink: 0;
line-height: var(--n-height);
white-space: nowrap;
display: inline-flex;
align-items: center;
justify-content: center;
color: var(--n-suffix-text-color);
`,[P("base-loading",`
font-size: var(--n-icon-size);
margin: 0 2px;
color: var(--n-loading-color);
`),P("base-clear",`
font-size: var(--n-icon-size);
`,[L("placeholder",[P("base-icon",`
transition: color .3s var(--n-bezier);
color: var(--n-icon-color);
font-size: var(--n-icon-size);
`)])]),H(">",[P("icon",`
transition: color .3s var(--n-bezier);
color: var(--n-icon-color);
font-size: var(--n-icon-size);
`)]),P("base-icon",`
font-size: var(--n-icon-size);
`)]),P("input-word-count",`
pointer-events: none;
line-height: 1.5;
font-size: .85em;
color: var(--n-count-text-color);
transition: color .3s var(--n-bezier);
margin-left: 4px;
font-variant: tabular-nums;
`),["warning","error"].map(e=>W(`${e}-status`,[ze("disabled",[P("base-loading",`
color: var(--n-loading-color-${e})
`),L("input-el, textarea-el",`
caret-color: var(--n-caret-color-${e});
`),L("state-border",`
border: var(--n-border-${e});
`),H("&:hover",[L("state-border",`
border: var(--n-border-hover-${e});
`)]),H("&:focus",`
background-color: var(--n-color-focus-${e});
`,[L("state-border",`
box-shadow: var(--n-box-shadow-focus-${e});
border: var(--n-border-focus-${e});
`)]),W("focus",`
background-color: var(--n-color-focus-${e});
`,[L("state-border",`
box-shadow: var(--n-box-shadow-focus-${e});
border: var(--n-border-focus-${e});
`)])])]))]),Pf=P("input",[W("disabled",[L("input-el, textarea-el",`
-webkit-text-fill-color: var(--n-text-color-disabled);
`)])]),kf=Object.assign(Object.assign({},re.props),{bordered:{type:Boolean,default:void 0},type:{type:String,default:"text"},placeholder:[Array,String],defaultValue:{type:[String,Array],default:null},value:[String,Array],disabled:{type:Boolean,default:void 0},size:String,rows:{type:[Number,String],default:3},round:Boolean,minlength:[String,Number],maxlength:[String,Number],clearable:Boolean,autosize:{type:[Boolean,Object],default:!1},pair:Boolean,separator:String,readonly:{type:[String,Boolean],default:!1},passivelyActivated:Boolean,showPasswordOn:String,stateful:{type:Boolean,default:!0},autofocus:Boolean,inputProps:Object,resizable:{type:Boolean,default:!0},showCount:Boolean,loading:{type:Boolean,default:void 0},allowInput:Function,renderCount:Function,onMousedown:Function,onKeydown:Function,onKeyup:Function,onInput:[Function,Array],onFocus:[Function,Array],onBlur:[Function,Array],onClick:[Function,Array],onChange:[Function,Array],onClear:[Function,Array],countGraphemes:Function,status:String,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],textDecoration:[String,Array],attrSize:{type:Number,default:20},onInputBlur:[Function,Array],onInputFocus:[Function,Array],onDeactivate:[Function,Array],onActivate:[Function,Array],onWrapperFocus:[Function,Array],onWrapperBlur:[Function,Array],internalDeactivateOnEnter:Boolean,internalForceFocus:Boolean,internalLoadingBeforeSuffix:Boolean,showPasswordToggle:Boolean}),kt=K({name:"Input",props:kf,setup(e){const{mergedClsPrefixRef:t,mergedBorderedRef:r,inlineThemeDisabled:n,mergedRtlRef:o}=Ie(e),i=re("Input","-input",Sf,wf,e,t);nl&&vo("-input-safari",Pf,t);const l=E(null),s=E(null),a=E(null),d=E(null),c=E(null),f=E(null),h=E(null),p=Cf(h),y=E(null),{localeRef:C}=Yr("Input"),m=E(e.defaultValue),w=Z(e,"value"),z=rr(w,m),_=mo(e),{mergedSizeRef:b,mergedDisabledRef:g,mergedStatusRef:M}=_,k=E(!1),A=E(!1),$=E(!1),B=E(!1);let R=null;const O=F(()=>{const{placeholder:v,pair:T}=e;return T?Array.isArray(v)?v:v===void 0?["",""]:[v,v]:v===void 0?[C.value.placeholder]:[v]}),I=F(()=>{const{value:v}=$,{value:T}=z,{value:G}=O;return!v&&(jt(T)||Array.isArray(T)&&jt(T[0]))&&G[0]}),x=F(()=>{const{value:v}=$,{value:T}=z,{value:G}=O;return!v&&G[1]&&(jt(T)||Array.isArray(T)&&jt(T[1]))}),S=Me(()=>e.internalForceFocus||k.value),N=Me(()=>{if(g.value||e.readonly||!e.clearable||!S.value&&!A.value)return!1;const{value:v}=z,{value:T}=S;return e.pair?!!(Array.isArray(v)&&(v[0]||v[1]))&&(A.value||T):!!v&&(A.value||T)}),D=F(()=>{const{showPasswordOn:v}=e;if(v)return v;if(e.showPasswordToggle)return"click"}),q=E(!1),Q=F(()=>{const{textDecoration:v}=e;return v?Array.isArray(v)?v.map(T=>({textDecoration:T})):[{textDecoration:v}]:["",""]}),ae=E(void 0),pe=()=>{var v,T;if(e.type==="textarea"){const{autosize:G}=e;if(G&&(ae.value=(T=(v=y.value)===null||v===void 0?void 0:v.$el)===null||T===void 0?void 0:T.offsetWidth),!s.value||typeof G=="boolean")return;const{paddingTop:ue,paddingBottom:ge,lineHeight:de}=window.getComputedStyle(s.value),et=Number(ue.slice(0,-2)),tt=Number(ge.slice(0,-2)),rt=Number(de.slice(0,-2)),{value:wt}=a;if(!wt)return;if(G.minRows){const xt=Math.max(G.minRows,1),sr=`${et+tt+rt*xt}px`;wt.style.minHeight=sr}if(G.maxRows){const xt=`${et+tt+rt*G.maxRows}px`;wt.style.maxHeight=xt}}},ve=F(()=>{const{maxlength:v}=e;return v===void 0?void 0:Number(v)});We(()=>{const{value:v}=z;Array.isArray(v)||lr(v)});const Re=Ar().proxy;function oe(v){const{onUpdateValue:T,"onUpdate:value":G,onInput:ue}=e,{nTriggerFormInput:ge}=_;T&&ce(T,v),G&&ce(G,v),ue&&ce(ue,v),m.value=v,ge()}function ke(v){const{onChange:T}=e,{nTriggerFormChange:G}=_;T&&ce(T,v),m.value=v,G()}function we(v){const{onBlur:T}=e,{nTriggerFormBlur:G}=_;T&&ce(T,v),G()}function ee(v){const{onFocus:T}=e,{nTriggerFormFocus:G}=_;T&&ce(T,v),G()}function Le(v){const{onClear:T}=e;T&&ce(T,v)}function qe(v){const{onInputBlur:T}=e;T&&ce(T,v)}function Ge(v){const{onInputFocus:T}=e;T&&ce(T,v)}function Ee(){const{onDeactivate:v}=e;v&&ce(v)}function j(){const{onActivate:v}=e;v&&ce(v)}function Y(v){const{onClick:T}=e;T&&ce(T,v)}function V(v){const{onWrapperFocus:T}=e;T&&ce(T,v)}function le(v){const{onWrapperBlur:T}=e;T&&ce(T,v)}function se(){$.value=!0}function $e(v){$.value=!1,v.target===f.value?xe(v,1):xe(v,0)}function xe(v,T=0,G="input"){const ue=v.target.value;if(lr(ue),v instanceof InputEvent&&!v.isComposing&&($.value=!1),e.type==="textarea"){const{value:de}=y;de&&de.syncUnifiedContainer()}if(R=ue,$.value)return;p.recordCursor();const ge=_e(ue);if(ge)if(!e.pair)G==="input"?oe(ue):ke(ue);else{let{value:de}=z;Array.isArray(de)?de=[de[0],de[1]]:de=["",""],de[T]=ue,G==="input"?oe(de):ke(de)}Re.$forceUpdate(),ge||qt(p.restoreCursor)}function _e(v){const{countGraphemes:T,maxlength:G,minlength:ue}=e;if(T){let de;if(G!==void 0&&(de===void 0&&(de=T(v)),de>Number(G))||ue!==void 0&&(de===void 0&&(de=T(v)),de<Number(G)))return!1}const{allowInput:ge}=e;return typeof ge=="function"?ge(v):!0}function Ne(v){qe(v),v.relatedTarget===l.value&&Ee(),v.relatedTarget!==null&&(v.relatedTarget===c.value||v.relatedTarget===f.value||v.relatedTarget===s.value)||(B.value=!1),Et(v,"blur"),h.value=null}function $i(v,T){Ge(v),k.value=!0,B.value=!0,j(),Et(v,"focus"),T===0?h.value=c.value:T===1?h.value=f.value:T===2&&(h.value=s.value)}function zi(v){e.passivelyActivated&&(le(v),Et(v,"blur"))}function Ti(v){e.passivelyActivated&&(k.value=!0,V(v),Et(v,"focus"))}function Et(v,T){v.relatedTarget!==null&&(v.relatedTarget===c.value||v.relatedTarget===f.value||v.relatedTarget===s.value||v.relatedTarget===l.value)||(T==="focus"?(ee(v),k.value=!0):T==="blur"&&(we(v),k.value=!1))}function Ii(v,T){xe(v,T,"change")}function Ri(v){Y(v)}function _i(v){Le(v),e.pair?(oe(["",""]),ke(["",""])):(oe(""),ke(""))}function Oi(v){const{onMousedown:T}=e;T&&T(v);const{tagName:G}=v.target;if(G!=="INPUT"&&G!=="TEXTAREA"){if(e.resizable){const{value:ue}=l;if(ue){const{left:ge,top:de,width:et,height:tt}=ue.getBoundingClientRect(),rt=14;if(ge+et-rt<v.clientX&&v.clientX<ge+et&&de+tt-rt<v.clientY&&v.clientY<de+tt)return}}v.preventDefault(),k.value||on()}}function Bi(){var v;A.value=!0,e.type==="textarea"&&((v=y.value)===null||v===void 0||v.handleMouseEnterWrapper())}function Mi(){var v;A.value=!1,e.type==="textarea"&&((v=y.value)===null||v===void 0||v.handleMouseLeaveWrapper())}function Li(){g.value||D.value==="click"&&(q.value=!q.value)}function Ei(v){if(g.value)return;v.preventDefault();const T=ue=>{ue.preventDefault(),Se("mouseup",document,T)};if(Te("mouseup",document,T),D.value!=="mousedown")return;q.value=!0;const G=()=>{q.value=!1,Se("mouseup",document,G)};Te("mouseup",document,G)}function Ai(v){var T;switch((T=e.onKeydown)===null||T===void 0||T.call(e,v),v.key){case"Escape":ar();break;case"Enter":Di(v);break}}function Di(v){var T,G;if(e.passivelyActivated){const{value:ue}=B;if(ue){e.internalDeactivateOnEnter&&ar();return}v.preventDefault(),e.type==="textarea"?(T=s.value)===null||T===void 0||T.focus():(G=c.value)===null||G===void 0||G.focus()}}function ar(){e.passivelyActivated&&(B.value=!1,qt(()=>{var v;(v=l.value)===null||v===void 0||v.focus()}))}function on(){var v,T,G;g.value||(e.passivelyActivated?(v=l.value)===null||v===void 0||v.focus():((T=s.value)===null||T===void 0||T.focus(),(G=c.value)===null||G===void 0||G.focus()))}function Fi(){var v;!((v=l.value)===null||v===void 0)&&v.contains(document.activeElement)&&document.activeElement.blur()}function Ni(){var v,T;(v=s.value)===null||v===void 0||v.select(),(T=c.value)===null||T===void 0||T.select()}function Hi(){g.value||(s.value?s.value.focus():c.value&&c.value.focus())}function ji(){const{value:v}=l;v!=null&&v.contains(document.activeElement)&&v!==document.activeElement&&ar()}function Wi(v){if(e.type==="textarea"){const{value:T}=s;T==null||T.scrollTo(v)}else{const{value:T}=c;T==null||T.scrollTo(v)}}function lr(v){const{type:T,pair:G,autosize:ue}=e;if(!G&&ue)if(T==="textarea"){const{value:ge}=a;ge&&(ge.textContent=(v??"")+`\r
`)}else{const{value:ge}=d;ge&&(v?ge.textContent=v:ge.innerHTML="&nbsp;")}}function Ui(){pe()}const an=E({top:"0"});function Vi(v){var T;const{scrollTop:G}=v.target;an.value.top=`${-G}px`,(T=y.value)===null||T===void 0||T.syncUnifiedContainer()}let At=null;it(()=>{const{autosize:v,type:T}=e;v&&T==="textarea"?At=Ce(z,G=>{!Array.isArray(G)&&G!==R&&lr(G)}):At==null||At()});let Dt=null;it(()=>{e.type==="textarea"?Dt=Ce(z,v=>{var T;!Array.isArray(v)&&v!==R&&((T=y.value)===null||T===void 0||T.syncUnifiedContainer())}):Dt==null||Dt()}),Pe(ii,{mergedValueRef:z,maxlengthRef:ve,mergedClsPrefixRef:t,countGraphemesRef:Z(e,"countGraphemes")});const Ki={wrapperElRef:l,inputElRef:c,textareaElRef:s,isCompositing:$,focus:on,blur:Fi,select:Ni,deactivate:ji,activate:Hi,scrollTo:Wi},qi=Ot("Input",o,t),ln=F(()=>{const{value:v}=b,{common:{cubicBezierEaseInOut:T},self:{color:G,borderRadius:ue,textColor:ge,caretColor:de,caretColorError:et,caretColorWarning:tt,textDecorationColor:rt,border:wt,borderDisabled:xt,borderHover:sr,borderFocus:Gi,placeholderColor:Xi,placeholderColorDisabled:Yi,lineHeightTextarea:Zi,colorDisabled:Ji,colorFocus:Qi,textColorDisabled:ea,boxShadowFocus:ta,iconSize:ra,colorFocusWarning:na,boxShadowFocusWarning:oa,borderWarning:ia,borderFocusWarning:aa,borderHoverWarning:la,colorFocusError:sa,boxShadowFocusError:da,borderError:ua,borderFocusError:ca,borderHoverError:fa,clearSize:ha,clearColor:pa,clearColorHover:va,clearColorPressed:ga,iconColor:ma,iconColorDisabled:ba,suffixTextColor:ya,countTextColor:wa,countTextColorDisabled:xa,iconColorHover:Ca,iconColorPressed:Sa,loadingColor:Pa,loadingColorError:ka,loadingColorWarning:$a,[ne("padding",v)]:za,[ne("fontSize",v)]:Ta,[ne("height",v)]:Ia}}=i.value,{left:Ra,right:_a}=al(za);return{"--n-bezier":T,"--n-count-text-color":wa,"--n-count-text-color-disabled":xa,"--n-color":G,"--n-font-size":Ta,"--n-border-radius":ue,"--n-height":Ia,"--n-padding-left":Ra,"--n-padding-right":_a,"--n-text-color":ge,"--n-caret-color":de,"--n-text-decoration-color":rt,"--n-border":wt,"--n-border-disabled":xt,"--n-border-hover":sr,"--n-border-focus":Gi,"--n-placeholder-color":Xi,"--n-placeholder-color-disabled":Yi,"--n-icon-size":ra,"--n-line-height-textarea":Zi,"--n-color-disabled":Ji,"--n-color-focus":Qi,"--n-text-color-disabled":ea,"--n-box-shadow-focus":ta,"--n-loading-color":Pa,"--n-caret-color-warning":tt,"--n-color-focus-warning":na,"--n-box-shadow-focus-warning":oa,"--n-border-warning":ia,"--n-border-focus-warning":aa,"--n-border-hover-warning":la,"--n-loading-color-warning":$a,"--n-caret-color-error":et,"--n-color-focus-error":sa,"--n-box-shadow-focus-error":da,"--n-border-error":ua,"--n-border-focus-error":ca,"--n-border-hover-error":fa,"--n-loading-color-error":ka,"--n-clear-color":pa,"--n-clear-size":ha,"--n-clear-color-hover":va,"--n-clear-color-pressed":ga,"--n-icon-color":ma,"--n-icon-color-hover":Ca,"--n-icon-color-pressed":Sa,"--n-icon-color-disabled":ba,"--n-suffix-text-color":ya}}),lt=n?Fe("input",F(()=>{const{value:v}=b;return v[0]}),ln,e):void 0;return Object.assign(Object.assign({},Ki),{wrapperElRef:l,inputElRef:c,inputMirrorElRef:d,inputEl2Ref:f,textareaElRef:s,textareaMirrorElRef:a,textareaScrollbarInstRef:y,rtlEnabled:qi,uncontrolledValue:m,mergedValue:z,passwordVisible:q,mergedPlaceholder:O,showPlaceholder1:I,showPlaceholder2:x,mergedFocus:S,isComposing:$,activated:B,showClearButton:N,mergedSize:b,mergedDisabled:g,textDecorationStyle:Q,mergedClsPrefix:t,mergedBordered:r,mergedShowPasswordOn:D,placeholderStyle:an,mergedStatus:M,textAreaScrollContainerWidth:ae,handleTextAreaScroll:Vi,handleCompositionStart:se,handleCompositionEnd:$e,handleInput:xe,handleInputBlur:Ne,handleInputFocus:$i,handleWrapperBlur:zi,handleWrapperFocus:Ti,handleMouseEnter:Bi,handleMouseLeave:Mi,handleMouseDown:Oi,handleChange:Ii,handleClick:Ri,handleClear:_i,handlePasswordToggleClick:Li,handlePasswordToggleMousedown:Ei,handleWrapperKeydown:Ai,handleTextAreaMirrorResize:Ui,getTextareaScrollContainer:()=>s.value,mergedTheme:i,cssVars:n?void 0:ln,themeClass:lt==null?void 0:lt.themeClass,onRender:lt==null?void 0:lt.onRender})},render(){var e,t;const{mergedClsPrefix:r,mergedStatus:n,themeClass:o,type:i,countGraphemes:l,onRender:s}=this,a=this.$slots;return s==null||s(),u("div",{ref:"wrapperElRef",class:[`${r}-input`,o,n&&`${r}-input--${n}-status`,{[`${r}-input--rtl`]:this.rtlEnabled,[`${r}-input--disabled`]:this.mergedDisabled,[`${r}-input--textarea`]:i==="textarea",[`${r}-input--resizable`]:this.resizable&&!this.autosize,[`${r}-input--autosize`]:this.autosize,[`${r}-input--round`]:this.round&&i!=="textarea",[`${r}-input--pair`]:this.pair,[`${r}-input--focus`]:this.mergedFocus,[`${r}-input--stateful`]:this.stateful}],style:this.cssVars,tabindex:!this.mergedDisabled&&this.passivelyActivated&&!this.activated?0:void 0,onFocus:this.handleWrapperFocus,onBlur:this.handleWrapperBlur,onClick:this.handleClick,onMousedown:this.handleMouseDown,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onCompositionstart:this.handleCompositionStart,onCompositionend:this.handleCompositionEnd,onKeyup:this.onKeyup,onKeydown:this.handleWrapperKeydown},u("div",{class:`${r}-input-wrapper`},Ye(a.prefix,d=>d&&u("div",{class:`${r}-input__prefix`},d)),i==="textarea"?u(ol,{ref:"textareaScrollbarInstRef",class:`${r}-input__textarea`,container:this.getTextareaScrollContainer,triggerDisplayManually:!0,useUnifiedContainer:!0,internalHoistYRail:!0},{default:()=>{var d,c;const{textAreaScrollContainerWidth:f}=this,h={width:this.autosize&&f&&`${f}px`};return u(De,null,u("textarea",Object.assign({},this.inputProps,{ref:"textareaElRef",class:[`${r}-input__textarea-el`,(d=this.inputProps)===null||d===void 0?void 0:d.class],autofocus:this.autofocus,rows:Number(this.rows),placeholder:this.placeholder,value:this.mergedValue,disabled:this.mergedDisabled,maxlength:l?void 0:this.maxlength,minlength:l?void 0:this.minlength,readonly:this.readonly,tabindex:this.passivelyActivated&&!this.activated?-1:void 0,style:[this.textDecorationStyle[0],(c=this.inputProps)===null||c===void 0?void 0:c.style,h],onBlur:this.handleInputBlur,onFocus:p=>this.handleInputFocus(p,2),onInput:this.handleInput,onChange:this.handleChange,onScroll:this.handleTextAreaScroll})),this.showPlaceholder1?u("div",{class:`${r}-input__placeholder`,style:[this.placeholderStyle,h],key:"placeholder"},this.mergedPlaceholder[0]):null,this.autosize?u(il,{onResize:this.handleTextAreaMirrorResize},{default:()=>u("div",{ref:"textareaMirrorElRef",class:`${r}-input__textarea-mirror`,key:"mirror"})}):null)}}):u("div",{class:`${r}-input__input`},u("input",Object.assign({type:i==="password"&&this.mergedShowPasswordOn&&this.passwordVisible?"text":i},this.inputProps,{ref:"inputElRef",class:[`${r}-input__input-el`,(e=this.inputProps)===null||e===void 0?void 0:e.class],style:[this.textDecorationStyle[0],(t=this.inputProps)===null||t===void 0?void 0:t.style],tabindex:this.passivelyActivated&&!this.activated?-1:void 0,placeholder:this.mergedPlaceholder[0],disabled:this.mergedDisabled,maxlength:l?void 0:this.maxlength,minlength:l?void 0:this.minlength,value:Array.isArray(this.mergedValue)?this.mergedValue[0]:this.mergedValue,readonly:this.readonly,autofocus:this.autofocus,size:this.attrSize,onBlur:this.handleInputBlur,onFocus:d=>this.handleInputFocus(d,0),onInput:d=>this.handleInput(d,0),onChange:d=>this.handleChange(d,0)})),this.showPlaceholder1?u("div",{class:`${r}-input__placeholder`},u("span",null,this.mergedPlaceholder[0])):null,this.autosize?u("div",{class:`${r}-input__input-mirror`,key:"mirror",ref:"inputMirrorElRef"}," "):null),!this.pair&&Ye(a.suffix,d=>d||this.clearable||this.showCount||this.mergedShowPasswordOn||this.loading!==void 0?u("div",{class:`${r}-input__suffix`},[Ye(a["clear-icon-placeholder"],c=>(this.clearable||c)&&u(_r,{clsPrefix:r,show:this.showClearButton,onClear:this.handleClear},{placeholder:()=>c,icon:()=>{var f,h;return(h=(f=this.$slots)["clear-icon"])===null||h===void 0?void 0:h.call(f)}})),this.internalLoadingBeforeSuffix?null:d,this.loading!==void 0?u(gf,{clsPrefix:r,loading:this.loading,showArrow:!1,showClear:!1,style:this.cssVars}):null,this.internalLoadingBeforeSuffix?d:null,this.showCount&&this.type!=="textarea"?u(Vn,null,{default:c=>{var f;return(f=a.count)===null||f===void 0?void 0:f.call(a,c)}}):null,this.mergedShowPasswordOn&&this.type==="password"?u("div",{class:`${r}-input__eye`,onMousedown:this.handlePasswordToggleMousedown,onClick:this.handlePasswordToggleClick},this.passwordVisible?ht(a["password-visible-icon"],()=>[u(fe,{clsPrefix:r},{default:()=>u(Zo,null)})]):ht(a["password-invisible-icon"],()=>[u(fe,{clsPrefix:r},{default:()=>u(lc,null)})])):null]):null)),this.pair?u("span",{class:`${r}-input__separator`},ht(a.separator,()=>[this.separator])):null,this.pair?u("div",{class:`${r}-input-wrapper`},u("div",{class:`${r}-input__input`},u("input",{ref:"inputEl2Ref",type:this.type,class:`${r}-input__input-el`,tabindex:this.passivelyActivated&&!this.activated?-1:void 0,placeholder:this.mergedPlaceholder[1],disabled:this.mergedDisabled,maxlength:l?void 0:this.maxlength,minlength:l?void 0:this.minlength,value:Array.isArray(this.mergedValue)?this.mergedValue[1]:void 0,readonly:this.readonly,style:this.textDecorationStyle[1],onBlur:this.handleInputBlur,onFocus:d=>this.handleInputFocus(d,1),onInput:d=>this.handleInput(d,1),onChange:d=>this.handleChange(d,1)}),this.showPlaceholder2?u("div",{class:`${r}-input__placeholder`},u("span",null,this.mergedPlaceholder[1])):null),Ye(a.suffix,d=>(this.clearable||d)&&u("div",{class:`${r}-input__suffix`},[this.clearable&&u(_r,{clsPrefix:r,show:this.showClearButton,onClear:this.handleClear},{icon:()=>{var c;return(c=a["clear-icon"])===null||c===void 0?void 0:c.call(a)},placeholder:()=>{var c;return(c=a["clear-icon-placeholder"])===null||c===void 0?void 0:c.call(a)}}),d]))):null,this.mergedBordered?u("div",{class:`${r}-input__border`}):null,this.mergedBordered?u("div",{class:`${r}-input__state-border`}):null,this.showCount&&i==="textarea"?u(Vn,null,{default:d=>{var c;const{renderCount:f}=this;return f?f(d):(c=a.count)===null||c===void 0?void 0:c.call(a,d)}}):null)}}),br=Wr&&"loading"in document.createElement("img"),$f=(e={})=>{var t;const{root:r=null}=e;return{hash:`${e.rootMargin||"0px 0px 0px 0px"}-${Array.isArray(e.threshold)?e.threshold.join(","):(t=e.threshold)!==null&&t!==void 0?t:"0"}`,options:Object.assign(Object.assign({},e),{root:(typeof r=="string"?document.querySelector(r):r)||document.documentElement})}},yr=new WeakMap,wr=new WeakMap,xr=new WeakMap,zf=(e,t,r)=>{if(!e)return()=>{};const n=$f(t),{root:o}=n.options;let i;const l=yr.get(o);l?i=l:(i=new Map,yr.set(o,i));let s,a;i.has(n.hash)?(a=i.get(n.hash),a[1].has(e)||(s=a[0],a[1].add(e),s.observe(e))):(s=new IntersectionObserver(f=>{f.forEach(h=>{if(h.isIntersecting){const p=wr.get(h.target),y=xr.get(h.target);p&&p(),y&&(y.value=!0)}})},n.options),s.observe(e),a=[s,new Set([e])],i.set(n.hash,a));let d=!1;const c=()=>{d||(wr.delete(e),xr.delete(e),d=!0,a[1].has(e)&&(a[0].unobserve(e),a[1].delete(e)),a[1].size<=0&&i.delete(n.hash),i.size||yr.delete(o))};return wr.set(e,c),xr.set(e,r),c},Tf={padding:"8px 14px"},If=e=>{const{borderRadius:t,boxShadow2:r,baseColor:n}=e;return Object.assign(Object.assign({},Tf),{borderRadius:t,boxShadow:r,color:Pt(n,"rgba(0, 0, 0, .85)"),textColor:n})},Rf=Bt({name:"Tooltip",common:Oe,peers:{Popover:Jr},self:If}),Qr=Rf,_f=Bt({name:"Ellipsis",common:Oe,peers:{Tooltip:Qr}}),Of=_f,Bf={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"},Mf=e=>{const{primaryColor:t,textColor2:r,dividerColor:n,hoverColor:o,popoverColor:i,invertedColor:l,borderRadius:s,fontSizeSmall:a,fontSizeMedium:d,fontSizeLarge:c,fontSizeHuge:f,heightSmall:h,heightMedium:p,heightLarge:y,heightHuge:C,textColor3:m,opacityDisabled:w}=e;return Object.assign(Object.assign({},Bf),{optionHeightSmall:h,optionHeightMedium:p,optionHeightLarge:y,optionHeightHuge:C,borderRadius:s,fontSizeSmall:a,fontSizeMedium:d,fontSizeLarge:c,fontSizeHuge:f,optionTextColor:r,optionTextColorHover:r,optionTextColorActive:t,optionTextColorChildActive:t,color:i,dividerColor:n,suffixColor:r,prefixColor:r,optionColorHover:o,optionColorActive:te(t,{alpha:.1}),groupHeaderTextColor:m,optionTextColorInverted:"#BBB",optionTextColorHoverInverted:"#FFF",optionTextColorActiveInverted:"#FFF",optionTextColorChildActiveInverted:"#FFF",colorInverted:l,dividerColorInverted:"#BBB",suffixColorInverted:"#BBB",prefixColorInverted:"#BBB",optionColorHoverInverted:t,optionColorActiveInverted:t,groupHeaderTextColorInverted:"#AAA",optionOpacityDisabled:w})},Lf=Bt({name:"Dropdown",common:Oe,peers:{Popover:Jr},self:Mf}),Ef=Lf,Af=Object.assign(Object.assign({},or),re.props),ai=K({name:"Tooltip",props:Af,__popover__:!0,setup(e){const t=re("Tooltip","-tooltip",void 0,Qr,e),r=E(null);return Object.assign(Object.assign({},{syncPosition(){r.value.syncPosition()},setShow(o){r.value.setShow(o)}}),{popoverRef:r,mergedTheme:t,popoverThemeOverrides:F(()=>t.value.self)})},render(){const{mergedTheme:e,internalExtraClass:t}=this;return u(ni,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)}}),Df=P("ellipsis",{overflow:"hidden"},[ze("line-clamp",`
white-space: nowrap;
display: inline-block;
vertical-align: bottom;
max-width: 100%;
`),W("line-clamp",`
display: -webkit-inline-box;
-webkit-box-orient: vertical;
`),W("cursor-pointer",`
cursor: pointer;
`)]);function Kn(e){return`${e}-ellipsis--line-clamp`}function qn(e,t){return`${e}-ellipsis--cursor-${t}`}const Ff=Object.assign(Object.assign({},re.props),{expandTrigger:String,lineClamp:[Number,String],tooltip:{type:[Boolean,Object],default:!0}}),li=K({name:"Ellipsis",inheritAttrs:!1,props:Ff,setup(e,{slots:t,attrs:r}){const{mergedClsPrefixRef:n}=Ie(e),o=re("Ellipsis","-ellipsis",Df,Of,e,n),i=E(null),l=E(null),s=E(null),a=E(!1),d=F(()=>{const{lineClamp:m}=e,{value:w}=a;return m!==void 0?{textOverflow:"","-webkit-line-clamp":w?"":m}:{textOverflow:w?"":"ellipsis","-webkit-line-clamp":""}});function c(){let m=!1;const{value:w}=a;if(w)return!0;const{value:z}=i;if(z){const{lineClamp:_}=e;if(p(z),_!==void 0)m=z.scrollHeight<=z.offsetHeight;else{const{value:b}=l;b&&(m=b.getBoundingClientRect().width<=z.getBoundingClientRect().width)}y(z,m)}return m}const f=F(()=>e.expandTrigger==="click"?()=>{var m;const{value:w}=a;w&&((m=s.value)===null||m===void 0||m.setShow(!1)),a.value=!w}:void 0);ll(()=>{var m;e.tooltip&&((m=s.value)===null||m===void 0||m.setShow(!1))});const h=()=>u("span",Object.assign({},_t(r,{class:[`${n.value}-ellipsis`,e.lineClamp!==void 0?Kn(n.value):void 0,e.expandTrigger==="click"?qn(n.value,"pointer"):void 0],style:d.value}),{ref:"triggerRef",onClick:f.value,onMouseenter:e.expandTrigger==="click"?c:void 0}),e.lineClamp?t:u("span",{ref:"triggerInnerRef"},t));function p(m){if(!m)return;const w=d.value,z=Kn(n.value);e.lineClamp!==void 0?C(m,z,"add"):C(m,z,"remove");for(const _ in w)m.style[_]!==w[_]&&(m.style[_]=w[_])}function y(m,w){const z=qn(n.value,"pointer");e.expandTrigger==="click"&&!w?C(m,z,"add"):C(m,z,"remove")}function C(m,w,z){z==="add"?m.classList.contains(w)||m.classList.add(w):m.classList.contains(w)&&m.classList.remove(w)}return{mergedTheme:o,triggerRef:i,triggerInnerRef:l,tooltipRef:s,handleClick:f,renderTrigger:h,getTooltipDisabled:c}},render(){var e;const{tooltip:t,renderTrigger:r,$slots:n}=this;if(t){const{mergedTheme:o}=this;return u(ai,Object.assign({ref:"tooltipRef",placement:"top"},t,{getDisabled:this.getTooltipDisabled,theme:o.peers.Tooltip,themeOverrides:o.peerOverrides.Tooltip}),{trigger:r,default:(e=n.tooltip)!==null&&e!==void 0?e:n.default})}else return r()}}),si=K({name:"DropdownDivider",props:{clsPrefix:{type:String,required:!0}},render(){return u("div",{class:`${this.clsPrefix}-dropdown-divider`})}}),Nf=e=>{const{textColorBase:t,opacity1:r,opacity2:n,opacity3:o,opacity4:i,opacity5:l}=e;return{color:t,opacity1Depth:r,opacity2Depth:n,opacity3Depth:o,opacity4Depth:i,opacity5Depth:l}},Hf={name:"Icon",common:Oe,self:Nf},jf=Hf,Wf=P("icon",`
height: 1em;
width: 1em;
line-height: 1em;
text-align: center;
display: inline-block;
position: relative;
fill: currentColor;
transform: translateZ(0);
`,[W("color-transition",{transition:"color .3s var(--n-bezier)"}),W("depth",{color:"var(--n-color)"},[H("svg",{opacity:"var(--n-opacity)",transition:"opacity .3s var(--n-bezier)"})]),H("svg",{height:"1em",width:"1em"})]),Uf=Object.assign(Object.assign({},re.props),{depth:[String,Number],size:[Number,String],color:String,component:Object}),Vf=K({_n_icon__:!0,name:"Icon",inheritAttrs:!1,props:Uf,setup(e){const{mergedClsPrefixRef:t,inlineThemeDisabled:r}=Ie(e),n=re("Icon","-icon",Wf,jf,e,t),o=F(()=>{const{depth:l}=e,{common:{cubicBezierEaseInOut:s},self:a}=n.value;if(l!==void 0){const{color:d,[`opacity${l}Depth`]:c}=a;return{"--n-bezier":s,"--n-color":d,"--n-opacity":c}}return{"--n-bezier":s,"--n-color":"","--n-opacity":""}}),i=r?Fe("icon",F(()=>`${e.depth||"d"}`),o,e):void 0;return{mergedClsPrefix:t,mergedStyle:F(()=>{const{size:l,color:s}=e;return{fontSize:He(l),color:s}}),cssVars:r?void 0:o,themeClass:i==null?void 0:i.themeClass,onRender:i==null?void 0:i.onRender}},render(){var e;const{$parent:t,depth:r,mergedClsPrefix:n,component:o,onRender:i,themeClass:l}=this;return!((e=t==null?void 0:t.$options)===null||e===void 0)&&e._n_icon__&&Ur("icon","don't wrap `n-icon` inside `n-icon`"),i==null||i(),u("i",_t(this.$attrs,{role:"img",class:[`${n}-icon`,l,{[`${n}-icon--depth`]:r,[`${n}-icon--color-transition`]:r!==void 0}],style:[this.cssVars,this.mergedStyle]}),o?u(o):this.$slots)}}),en=Ve("n-dropdown-menu"),ir=Ve("n-dropdown"),Gn=Ve("n-dropdown-option");function Or(e,t){return e.type==="submenu"||e.type===void 0&&e[t]!==void 0}function Kf(e){return e.type==="group"}function di(e){return e.type==="divider"}function qf(e){return e.type==="render"}const ui=K({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=ie(ir),{hoverKeyRef:r,keyboardKeyRef:n,lastToggledSubmenuKeyRef:o,pendingKeyPathRef:i,activeKeyPathRef:l,animatedRef:s,mergedShowRef:a,renderLabelRef:d,renderIconRef:c,labelFieldRef:f,childrenFieldRef:h,renderOptionRef:p,nodePropsRef:y,menuPropsRef:C}=t,m=ie(Gn,null),w=ie(en),z=ie(Qt),_=F(()=>e.tmNode.rawNode),b=F(()=>{const{value:D}=h;return Or(e.tmNode.rawNode,D)}),g=F(()=>{const{disabled:D}=e.tmNode;return D}),M=F(()=>{if(!b.value)return!1;const{key:D,disabled:q}=e.tmNode;if(q)return!1;const{value:Q}=r,{value:ae}=n,{value:pe}=o,{value:ve}=i;return Q!==null?ve.includes(D):ae!==null?ve.includes(D)&&ve[ve.length-1]!==D:pe!==null?ve.includes(D):!1}),k=F(()=>n.value===null&&!s.value),A=zl(M,300,k),$=F(()=>!!(m!=null&&m.enteringSubmenuRef.value)),B=E(!1);Pe(Gn,{enteringSubmenuRef:B});function R(){B.value=!0}function O(){B.value=!1}function I(){const{parentKey:D,tmNode:q}=e;q.disabled||a.value&&(o.value=D,n.value=null,r.value=q.key)}function x(){const{tmNode:D}=e;D.disabled||a.value&&r.value!==D.key&&I()}function S(D){if(e.tmNode.disabled||!a.value)return;const{relatedTarget:q}=D;q&&!Cn({target:q},"dropdownOption")&&!Cn({target:q},"scrollbarRail")&&(r.value=null)}function N(){const{value:D}=b,{tmNode:q}=e;a.value&&!D&&!q.disabled&&(t.doSelect(q.key,q.rawNode),t.doUpdateShow(!1))}return{labelField:f,renderLabel:d,renderIcon:c,siblingHasIcon:w.showIconRef,siblingHasSubmenu:w.hasSubmenuRef,menuProps:C,popoverBody:z,animated:s,mergedShowSubmenu:F(()=>A.value&&!$.value),rawNode:_,hasSubmenu:b,pending:Me(()=>{const{value:D}=i,{key:q}=e.tmNode;return D.includes(q)}),childActive:Me(()=>{const{value:D}=l,{key:q}=e.tmNode,Q=D.findIndex(ae=>q===ae);return Q===-1?!1:Q<D.length-1}),active:Me(()=>{const{value:D}=l,{key:q}=e.tmNode,Q=D.findIndex(ae=>q===ae);return Q===-1?!1:Q===D.length-1}),mergedDisabled:g,renderOption:p,nodeProps:y,handleClick:N,handleMouseMove:x,handleMouseEnter:I,handleMouseLeave:S,handleSubmenuBeforeEnter:R,handleSubmenuAfterEnter:O}},render(){var e,t;const{animated:r,rawNode:n,mergedShowSubmenu:o,clsPrefix:i,siblingHasIcon:l,siblingHasSubmenu:s,renderLabel:a,renderIcon:d,renderOption:c,nodeProps:f,props:h,scrollable:p}=this;let y=null;if(o){const z=(e=this.menuProps)===null||e===void 0?void 0:e.call(this,n,n.children);y=u(ci,Object.assign({},z,{clsPrefix:i,scrollable:this.scrollable,tmNodes:this.tmNode.children,parentKey:this.tmNode.key}))}const C={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},m=f==null?void 0:f(n),w=u("div",Object.assign({class:[`${i}-dropdown-option`,m==null?void 0:m.class],"data-dropdown-option":!0},m),u("div",_t(C,h),[u("div",{class:[`${i}-dropdown-option-body__prefix`,l&&`${i}-dropdown-option-body__prefix--show-icon`]},[d?d(n):Gt(n.icon)]),u("div",{"data-dropdown-option":!0,class:`${i}-dropdown-option-body__label`},a?a(n):Gt((t=n[this.labelField])!==null&&t!==void 0?t:n.title)),u("div",{"data-dropdown-option":!0,class:[`${i}-dropdown-option-body__suffix`,s&&`${i}-dropdown-option-body__suffix--has-submenu`]},this.hasSubmenu?u(Vf,null,{default:()=>u(ac,null)}):null)]),this.hasSubmenu?u(Ro,null,{default:()=>[u(_o,null,{default:()=>u("div",{class:`${i}-dropdown-offset-container`},u(Oo,{show:this.mergedShowSubmenu,placement:this.placement,to:p&&this.popoverBody||void 0,teleportDisabled:!p},{default:()=>u("div",{class:`${i}-dropdown-menu-wrapper`},r?u($t,{onBeforeEnter:this.handleSubmenuBeforeEnter,onAfterEnter:this.handleSubmenuAfterEnter,name:"fade-in-scale-up-transition",appear:!0},{default:()=>y}):y)}))})]}):null);return c?c({node:w,option:n}):w}}),Gf=K({name:"DropdownGroupHeader",props:{clsPrefix:{type:String,required:!0},tmNode:{type:Object,required:!0}},setup(){const{showIconRef:e,hasSubmenuRef:t}=ie(en),{renderLabelRef:r,labelFieldRef:n,nodePropsRef:o,renderOptionRef:i}=ie(ir);return{labelField:n,showIcon:e,hasSubmenu:t,renderLabel:r,nodeProps:o,renderOption:i}},render(){var e;const{clsPrefix:t,hasSubmenu:r,showIcon:n,nodeProps:o,renderLabel:i,renderOption:l}=this,{rawNode:s}=this.tmNode,a=u("div",Object.assign({class:`${t}-dropdown-option`},o==null?void 0:o(s)),u("div",{class:`${t}-dropdown-option-body ${t}-dropdown-option-body--group`},u("div",{"data-dropdown-option":!0,class:[`${t}-dropdown-option-body__prefix`,n&&`${t}-dropdown-option-body__prefix--show-icon`]},Gt(s.icon)),u("div",{class:`${t}-dropdown-option-body__label`,"data-dropdown-option":!0},i?i(s):Gt((e=s.title)!==null&&e!==void 0?e:s[this.labelField])),u("div",{class:[`${t}-dropdown-option-body__suffix`,r&&`${t}-dropdown-option-body__suffix--has-submenu`],"data-dropdown-option":!0})));return l?l({node:a,option:s}):a}}),Xf=K({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:r}=this,{children:n}=e;return u(De,null,u(Gf,{clsPrefix:r,tmNode:e,key:e.key}),n==null?void 0:n.map(o=>{const{rawNode:i}=o;return i.show===!1?null:di(i)?u(si,{clsPrefix:r,key:o.key}):o.isGroup?(Ur("dropdown","`group` node is not allowed to be put in `group` node."),null):u(ui,{clsPrefix:r,tmNode:o,parentKey:t,key:o.key})}))}}),Yf=K({name:"DropdownRenderOption",props:{tmNode:{type:Object,required:!0}},render(){const{rawNode:{render:e,props:t}}=this.tmNode;return u("div",t,[e==null?void 0:e()])}}),ci=K({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:r}=ie(ir);Pe(en,{showIconRef:F(()=>{const o=t.value;return e.tmNodes.some(i=>{var l;if(i.isGroup)return(l=i.children)===null||l===void 0?void 0:l.some(({rawNode:a})=>o?o(a):a.icon);const{rawNode:s}=i;return o?o(s):s.icon})}),hasSubmenuRef:F(()=>{const{value:o}=r;return e.tmNodes.some(i=>{var l;if(i.isGroup)return(l=i.children)===null||l===void 0?void 0:l.some(({rawNode:a})=>Or(a,o));const{rawNode:s}=i;return Or(s,o)})})});const n=E(null);return Pe(Lr,null),Pe(Er,null),Pe(Qt,n),{bodyRef:n}},render(){const{parentKey:e,clsPrefix:t,scrollable:r}=this,n=this.tmNodes.map(o=>{const{rawNode:i}=o;return i.show===!1?null:qf(i)?u(Yf,{tmNode:o,key:o.key}):di(i)?u(si,{clsPrefix:t,key:o.key}):Kf(i)?u(Xf,{clsPrefix:t,tmNode:o,parentKey:e,key:o.key}):u(ui,{clsPrefix:t,tmNode:o,parentKey:e,key:o.key,props:i.props,scrollable:r})});return u("div",{class:[`${t}-dropdown-menu`,r&&`${t}-dropdown-menu--scrollable`],ref:"bodyRef"},r?u(fo,{contentClass:`${t}-dropdown-menu__content`},{default:()=>n}):n,this.showArrow?ri({clsPrefix:t,arrowStyle:this.arrowStyle}):null)}}),Zf=P("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);
`,[bo(),P("dropdown-option",`
position: relative;
`,[H("a",`
text-decoration: none;
color: inherit;
outline: none;
`,[H("&::before",`
content: "";
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
`)]),P("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);
`,[H("&::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);
`),ze("disabled",[W("pending",`
color: var(--n-option-text-color-hover);
`,[L("prefix, suffix",`
color: var(--n-option-text-color-hover);
`),H("&::before","background-color: var(--n-option-color-hover);")]),W("active",`
color: var(--n-option-text-color-active);
`,[L("prefix, suffix",`
color: var(--n-option-text-color-active);
`),H("&::before","background-color: var(--n-option-color-active);")]),W("child-active",`
color: var(--n-option-text-color-child-active);
`,[L("prefix, suffix",`
color: var(--n-option-text-color-child-active);
`)])]),W("disabled",`
cursor: not-allowed;
opacity: var(--n-option-opacity-disabled);
`),W("group",`
font-size: calc(var(--n-font-size) - 1px);
color: var(--n-group-header-text-color);
`,[L("prefix",`
width: calc(var(--n-option-prefix-width) / 2);
`,[W("show-icon",`
width: calc(var(--n-option-icon-prefix-width) / 2);
`)])]),L("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;
`,[W("show-icon",`
width: var(--n-option-icon-prefix-width);
`),P("icon",`
font-size: var(--n-option-icon-size);
`)]),L("label",`
white-space: nowrap;
flex: 1;
z-index: 1;
`),L("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;
`,[W("has-submenu",`
width: var(--n-option-icon-suffix-width);
`),P("icon",`
font-size: var(--n-option-icon-size);
`)]),P("dropdown-menu","pointer-events: all;")]),P("dropdown-offset-container",`
pointer-events: none;
position: absolute;
left: 0;
right: 0;
top: -4px;
bottom: -4px;
`)]),P("dropdown-divider",`
transition: background-color .3s var(--n-bezier);
background-color: var(--n-divider-color);
height: 1px;
margin: 4px 0;
`),P("dropdown-menu-wrapper",`
transform-origin: var(--v-transform-origin);
width: fit-content;
`),H(">",[P("scrollbar",`
height: inherit;
max-height: inherit;
`)]),ze("scrollable",`
padding: var(--n-padding);
`),W("scrollable",[L("content",`
padding: var(--n-padding);
`)])]),Jf={animated:{type:Boolean,default:!0},keyboard:{type:Boolean,default:!0},size:{type:String,default:"medium"},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]},Qf=Object.keys(or),eh=Object.assign(Object.assign(Object.assign({},or),Jf),re.props),Xn=K({name:"Dropdown",inheritAttrs:!1,props:eh,setup(e){const t=E(!1),r=rr(Z(e,"show"),t),n=F(()=>{const{keyField:O,childrenField:I}=e;return Wc(e.options,{getKey(x){return x[O]},getDisabled(x){return x.disabled===!0},getIgnored(x){return x.type==="divider"||x.type==="render"},getChildren(x){return x[I]}})}),o=F(()=>n.value.treeNodes),i=E(null),l=E(null),s=E(null),a=F(()=>{var O,I,x;return(x=(I=(O=i.value)!==null&&O!==void 0?O:l.value)!==null&&I!==void 0?I:s.value)!==null&&x!==void 0?x:null}),d=F(()=>n.value.getPath(a.value).keyPath),c=F(()=>n.value.getPath(e.value).keyPath),f=Me(()=>e.keyboard&&r.value);_l({keydown:{ArrowUp:{prevent:!0,handler:g},ArrowRight:{prevent:!0,handler:b},ArrowDown:{prevent:!0,handler:M},ArrowLeft:{prevent:!0,handler:_},Enter:{prevent:!0,handler:k},Escape:z}},f);const{mergedClsPrefixRef:h,inlineThemeDisabled:p}=Ie(e),y=re("Dropdown","-dropdown",Zf,Ef,e,h);Pe(ir,{labelFieldRef:Z(e,"labelField"),childrenFieldRef:Z(e,"childrenField"),renderLabelRef:Z(e,"renderLabel"),renderIconRef:Z(e,"renderIcon"),hoverKeyRef:i,keyboardKeyRef:l,lastToggledSubmenuKeyRef:s,pendingKeyPathRef:d,activeKeyPathRef:c,animatedRef:Z(e,"animated"),mergedShowRef:r,nodePropsRef:Z(e,"nodeProps"),renderOptionRef:Z(e,"renderOption"),menuPropsRef:Z(e,"menuProps"),doSelect:C,doUpdateShow:m}),Ce(r,O=>{!e.animated&&!O&&w()});function C(O,I){const{onSelect:x}=e;x&&ce(x,O,I)}function m(O){const{"onUpdate:show":I,onUpdateShow:x}=e;I&&ce(I,O),x&&ce(x,O),t.value=O}function w(){i.value=null,l.value=null,s.value=null}function z(){m(!1)}function _(){$("left")}function b(){$("right")}function g(){$("up")}function M(){$("down")}function k(){const O=A();O!=null&&O.isLeaf&&r.value&&(C(O.key,O.rawNode),m(!1))}function A(){var O;const{value:I}=n,{value:x}=a;return!I||x===null?null:(O=I.getNode(x))!==null&&O!==void 0?O:null}function $(O){const{value:I}=a,{value:{getFirstAvailableNode:x}}=n;let S=null;if(I===null){const N=x();N!==null&&(S=N.key)}else{const N=A();if(N){let D;switch(O){case"down":D=N.getNext();break;case"up":D=N.getPrev();break;case"right":D=N.getChild();break;case"left":D=N.getParent();break}D&&(S=D.key)}}S!==null&&(i.value=null,l.value=S)}const B=F(()=>{const{size:O,inverted:I}=e,{common:{cubicBezierEaseInOut:x},self:S}=y.value,{padding:N,dividerColor:D,borderRadius:q,optionOpacityDisabled:Q,[ne("optionIconSuffixWidth",O)]:ae,[ne("optionSuffixWidth",O)]:pe,[ne("optionIconPrefixWidth",O)]:ve,[ne("optionPrefixWidth",O)]:Re,[ne("fontSize",O)]:oe,[ne("optionHeight",O)]:ke,[ne("optionIconSize",O)]:we}=S,ee={"--n-bezier":x,"--n-font-size":oe,"--n-padding":N,"--n-border-radius":q,"--n-option-height":ke,"--n-option-prefix-width":Re,"--n-option-icon-prefix-width":ve,"--n-option-suffix-width":pe,"--n-option-icon-suffix-width":ae,"--n-option-icon-size":we,"--n-divider-color":D,"--n-option-opacity-disabled":Q};return I?(ee["--n-color"]=S.colorInverted,ee["--n-option-color-hover"]=S.optionColorHoverInverted,ee["--n-option-color-active"]=S.optionColorActiveInverted,ee["--n-option-text-color"]=S.optionTextColorInverted,ee["--n-option-text-color-hover"]=S.optionTextColorHoverInverted,ee["--n-option-text-color-active"]=S.optionTextColorActiveInverted,ee["--n-option-text-color-child-active"]=S.optionTextColorChildActiveInverted,ee["--n-prefix-color"]=S.prefixColorInverted,ee["--n-suffix-color"]=S.suffixColorInverted,ee["--n-group-header-text-color"]=S.groupHeaderTextColorInverted):(ee["--n-color"]=S.color,ee["--n-option-color-hover"]=S.optionColorHover,ee["--n-option-color-active"]=S.optionColorActive,ee["--n-option-text-color"]=S.optionTextColor,ee["--n-option-text-color-hover"]=S.optionTextColorHover,ee["--n-option-text-color-active"]=S.optionTextColorActive,ee["--n-option-text-color-child-active"]=S.optionTextColorChildActive,ee["--n-prefix-color"]=S.prefixColor,ee["--n-suffix-color"]=S.suffixColor,ee["--n-group-header-text-color"]=S.groupHeaderTextColor),ee}),R=p?Fe("dropdown",F(()=>`${e.size[0]}${e.inverted?"i":""}`),B,e):void 0;return{mergedClsPrefix:h,mergedTheme:y,tmNodes:o,mergedShow:r,handleAfterLeave:()=>{e.animated&&w()},doUpdateShow:m,cssVars:p?void 0:B,themeClass:R==null?void 0:R.themeClass,onRender:R==null?void 0:R.onRender}},render(){const e=(n,o,i,l,s)=>{var a;const{mergedClsPrefix:d,menuProps:c}=this;(a=this.onRender)===null||a===void 0||a.call(this);const f=(c==null?void 0:c(void 0,this.tmNodes.map(p=>p.rawNode)))||{},h={ref:Pl(o),class:[n,`${d}-dropdown`,this.themeClass],clsPrefix:d,tmNodes:this.tmNodes,style:[i,this.cssVars],showArrow:this.showArrow,arrowStyle:this.arrowStyle,scrollable:this.scrollable,onMouseenter:l,onMouseleave:s};return u(ci,_t(this.$attrs,h,f))},{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 u(ni,Object.assign({},ho(this.$props,Qf),r),{trigger:()=>{var n,o;return(o=(n=this.$slots).default)===null||o===void 0?void 0:o.call(n)}})}}),th={gapSmall:"4px 8px",gapMedium:"8px 12px",gapLarge:"12px 16px"},rh=()=>th,nh={name:"Space",self:rh},oh=nh;let Cr;const ih=()=>{if(!Wr)return!0;if(Cr===void 0){const e=document.createElement("div");e.style.display="flex",e.style.flexDirection="column",e.style.rowGap="1px",e.appendChild(document.createElement("div")),e.appendChild(document.createElement("div")),document.body.appendChild(e);const t=e.scrollHeight===1;return document.body.removeChild(e),Cr=t}return Cr},ah=Object.assign(Object.assign({},re.props),{align:String,justify:{type:String,default:"start"},inline:Boolean,vertical:Boolean,size:{type:[String,Number,Array],default:"medium"},wrapItem:{type:Boolean,default:!0},itemStyle:[String,Object],wrap:{type:Boolean,default:!0},internalUseGap:{type:Boolean,default:void 0}}),lh=K({name:"Space",props:ah,setup(e){const{mergedClsPrefixRef:t,mergedRtlRef:r}=Ie(e),n=re("Space","-space",void 0,oh,e,t),o=Ot("Space",r,t);return{useGap:ih(),rtlEnabled:o,mergedClsPrefix:t,margin:F(()=>{const{size:i}=e;if(Array.isArray(i))return{horizontal:i[0],vertical:i[1]};if(typeof i=="number")return{horizontal:i,vertical:i};const{self:{[ne("gap",i)]:l}}=n.value,{row:s,col:a}=dl(l);return{horizontal:bn(a),vertical:bn(s)}})}},render(){const{vertical:e,align:t,inline:r,justify:n,itemStyle:o,margin:i,wrap:l,mergedClsPrefix:s,rtlEnabled:a,useGap:d,wrapItem:c,internalUseGap:f}=this,h=sl(Sl(this));if(!h.length)return null;const p=`${i.horizontal}px`,y=`${i.horizontal/2}px`,C=`${i.vertical}px`,m=`${i.vertical/2}px`,w=h.length-1,z=n.startsWith("space-");return u("div",{role:"none",class:[`${s}-space`,a&&`${s}-space--rtl`],style:{display:r?"inline-flex":"flex",flexDirection:e?"column":"row",justifyContent:["start","end"].includes(n)?"flex-"+n:n,flexWrap:!l||e?"nowrap":"wrap",marginTop:d||e?"":`-${m}`,marginBottom:d||e?"":`-${m}`,alignItems:t,gap:d?`${i.vertical}px ${i.horizontal}px`:""}},!c&&(d||f)?h:h.map((_,b)=>u("div",{role:"none",style:[o,{maxWidth:"100%"},d?"":e?{marginBottom:b!==w?C:""}:a?{marginLeft:z?n==="space-between"&&b===w?"":y:b!==w?p:"",marginRight:z?n==="space-between"&&b===0?"":y:"",paddingTop:m,paddingBottom:m}:{marginRight:z?n==="space-between"&&b===w?"":y:b!==w?p:"",marginLeft:z?n==="space-between"&&b===0?"":y:"",paddingTop:m,paddingBottom:m}]},_)))}}),tn=Object.assign(Object.assign({},re.props),{showToolbar:{type:Boolean,default:!0},showToolbarTooltip:Boolean}),fi=Ve("n-image");function sh(){return{toolbarIconColor:"rgba(255, 255, 255, .9)",toolbarColor:"rgba(0, 0, 0, .35)",toolbarBoxShadow:"none",toolbarBorderRadius:"24px"}}const dh=Bt({name:"Image",common:Oe,peers:{Tooltip:Qr},self:sh}),uh=e=>{const{textColor2:t,cardColor:r,modalColor:n,popoverColor:o,dividerColor:i,borderRadius:l,fontSize:s,hoverColor:a}=e;return{textColor:t,color:r,colorHover:a,colorModal:n,colorHoverModal:Pt(n,a),colorPopover:o,colorHoverPopover:Pt(o,a),borderColor:i,borderColorModal:Pt(n,i),borderColorPopover:Pt(o,i),borderRadius:l,fontSize:s}},ch={name:"List",common:Oe,self:uh},fh=ch,hh=e=>{const{infoColor:t,successColor:r,warningColor:n,errorColor:o,textColor2:i,progressRailColor:l,fontSize:s,fontWeight:a}=e;return{fontSize:s,fontSizeCircle:"28px",fontWeightCircle:a,railColor:l,railHeight:"8px",iconSizeCircle:"36px",iconSizeLine:"18px",iconColor:t,iconColorInfo:t,iconColorSuccess:r,iconColorWarning:n,iconColorError:o,textColorCircle:i,textColorLineInner:"rgb(255, 255, 255)",textColorLineOuter:i,fillColor:t,fillColorInfo:t,fillColorSuccess:r,fillColorWarning:n,fillColorError:o,lineBgProcessing:"linear-gradient(90deg, rgba(255, 255, 255, .3) 0%, rgba(255, 255, 255, .5) 100%)"}},ph={name:"Progress",common:Oe,self:hh},hi=ph,vh=e=>{const{textColor1:t,textColor2:r,fontWeightStrong:n,fontSize:o}=e;return{fontSize:o,titleTextColor:t,textColor:r,titleFontWeight:n}},gh={name:"Thing",common:Oe,self:vh},mh=gh,bh=e=>{const{iconColor:t,primaryColor:r,errorColor:n,textColor2:o,successColor:i,opacityDisabled:l,actionColor:s,borderColor:a,hoverColor:d,lineHeight:c,borderRadius:f,fontSize:h}=e;return{fontSize:h,lineHeight:c,borderRadius:f,draggerColor:s,draggerBorder:`1px dashed ${a}`,draggerBorderHover:`1px dashed ${r}`,itemColorHover:d,itemColorHoverError:te(n,{alpha:.06}),itemTextColor:o,itemTextColorError:n,itemTextColorSuccess:i,itemIconColor:t,itemDisabledOpacity:l,itemBorderImageCardError:`1px solid ${n}`,itemBorderImageCard:`1px solid ${a}`}},yh=Bt({name:"Upload",common:Oe,peers:{Button:ul,Progress:hi},self:bh}),wh=yh,xh=u("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},u("path",{d:"M6 5C5.75454 5 5.55039 5.17688 5.50806 5.41012L5.5 5.5V14.5C5.5 14.7761 5.72386 15 6 15C6.24546 15 6.44961 14.8231 6.49194 14.5899L6.5 14.5V5.5C6.5 5.22386 6.27614 5 6 5ZM13.8536 5.14645C13.68 4.97288 13.4106 4.9536 13.2157 5.08859L13.1464 5.14645L8.64645 9.64645C8.47288 9.82001 8.4536 10.0894 8.58859 10.2843L8.64645 10.3536L13.1464 14.8536C13.3417 15.0488 13.6583 15.0488 13.8536 14.8536C14.0271 14.68 14.0464 14.4106 13.9114 14.2157L13.8536 14.1464L9.70711 10L13.8536 5.85355C14.0488 5.65829 14.0488 5.34171 13.8536 5.14645Z",fill:"currentColor"})),Ch=u("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},u("path",{d:"M13.5 5C13.7455 5 13.9496 5.17688 13.9919 5.41012L14 5.5V14.5C14 14.7761 13.7761 15 13.5 15C13.2545 15 13.0504 14.8231 13.0081 14.5899L13 14.5V5.5C13 5.22386 13.2239 5 13.5 5ZM5.64645 5.14645C5.82001 4.97288 6.08944 4.9536 6.28431 5.08859L6.35355 5.14645L10.8536 9.64645C11.0271 9.82001 11.0464 10.0894 10.9114 10.2843L10.8536 10.3536L6.35355 14.8536C6.15829 15.0488 5.84171 15.0488 5.64645 14.8536C5.47288 14.68 5.4536 14.4106 5.58859 14.2157L5.64645 14.1464L9.79289 10L5.64645 5.85355C5.45118 5.65829 5.45118 5.34171 5.64645 5.14645Z",fill:"currentColor"})),Sh=u("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},u("path",{d:"M4.089 4.216l.057-.07a.5.5 0 0 1 .638-.057l.07.057L10 9.293l5.146-5.147a.5.5 0 0 1 .638-.057l.07.057a.5.5 0 0 1 .057.638l-.057.07L10.707 10l5.147 5.146a.5.5 0 0 1 .057.638l-.057.07a.5.5 0 0 1-.638.057l-.07-.057L10 10.707l-5.146 5.147a.5.5 0 0 1-.638.057l-.07-.057a.5.5 0 0 1-.057-.638l.057-.07L9.293 10L4.146 4.854a.5.5 0 0 1-.057-.638l.057-.07l-.057.07z",fill:"currentColor"})),Ph=H([H("body >",[P("image-container","position: fixed;")]),P("image-preview-container",`
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
display: flex;
`),P("image-preview-overlay",`
z-index: -1;
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
background: rgba(0, 0, 0, .3);
`,[yn()]),P("image-preview-toolbar",`
z-index: 1;
position: absolute;
left: 50%;
transform: translateX(-50%);
border-radius: var(--n-toolbar-border-radius);
height: 48px;
bottom: 40px;
padding: 0 12px;
background: var(--n-toolbar-color);
box-shadow: var(--n-toolbar-box-shadow);
color: var(--n-toolbar-icon-color);
transition: color .3s var(--n-bezier);
display: flex;
align-items: center;
`,[P("base-icon",`
padding: 0 8px;
font-size: 28px;
cursor: pointer;
`),yn()]),P("image-preview-wrapper",`
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
display: flex;
pointer-events: none;
`,[bo()]),P("image-preview",`
user-select: none;
-webkit-user-select: none;
pointer-events: all;
margin: auto;
max-height: calc(100vh - 32px);
max-width: calc(100vw - 32px);
transition: transform .3s var(--n-bezier);
`),P("image",`
display: inline-flex;
max-height: 100%;
max-width: 100%;
`,[ze("preview-disabled",`
cursor: pointer;
`),H("img",`
border-radius: inherit;
`)])]),Wt=32,pi=K({name:"ImagePreview",props:Object.assign(Object.assign({},tn),{onNext:Function,onPrev:Function,clsPrefix:{type:String,required:!0}}),setup(e){const t=re("Image","-image",Ph,dh,e,Z(e,"clsPrefix"));let r=null;const n=E(null),o=E(null),i=E(void 0),l=E(!1),s=E(!1),{localeRef:a}=Yr("Image");function d(){const{value:j}=o;if(!r||!j)return;const{style:Y}=j,V=r.getBoundingClientRect(),le=V.left+V.width/2,se=V.top+V.height/2;Y.transformOrigin=`${le}px ${se}px`}function c(j){var Y,V;switch(j.key){case" ":j.preventDefault();break;case"ArrowLeft":(Y=e.onPrev)===null||Y===void 0||Y.call(e);break;case"ArrowRight":(V=e.onNext)===null||V===void 0||V.call(e);break;case"Escape":ke();break}}Ce(l,j=>{j?Te("keydown",document,c):Se("keydown",document,c)}),Qe(()=>{Se("keydown",document,c)});let f=0,h=0,p=0,y=0,C=0,m=0,w=0,z=0,_=!1;function b(j){const{clientX:Y,clientY:V}=j;p=Y-f,y=V-h,$o(oe)}function g(j){const{mouseUpClientX:Y,mouseUpClientY:V,mouseDownClientX:le,mouseDownClientY:se}=j,$e=le-Y,xe=se-V,_e=`vertical${xe>0?"Top":"Bottom"}`,Ne=`horizontal${$e>0?"Left":"Right"}`;return{moveVerticalDirection:_e,moveHorizontalDirection:Ne,deltaHorizontal:$e,deltaVertical:xe}}function M(j){const{value:Y}=n;if(!Y)return{offsetX:0,offsetY:0};const V=Y.getBoundingClientRect(),{moveVerticalDirection:le,moveHorizontalDirection:se,deltaHorizontal:$e,deltaVertical:xe}=j||{};let _e=0,Ne=0;return V.width<=window.innerWidth?_e=0:V.left>0?_e=(V.width-window.innerWidth)/2:V.right<window.innerWidth?_e=-(V.width-window.innerWidth)/2:se==="horizontalRight"?_e=Math.min((V.width-window.innerWidth)/2,C-($e??0)):_e=Math.max(-((V.width-window.innerWidth)/2),C-($e??0)),V.height<=window.innerHeight?Ne=0:V.top>0?Ne=(V.height-window.innerHeight)/2:V.bottom<window.innerHeight?Ne=-(V.height-window.innerHeight)/2:le==="verticalBottom"?Ne=Math.min((V.height-window.innerHeight)/2,m-(xe??0)):Ne=Math.max(-((V.height-window.innerHeight)/2),m-(xe??0)),{offsetX:_e,offsetY:Ne}}function k(j){Se("mousemove",document,b),Se("mouseup",document,k);const{clientX:Y,clientY:V}=j;_=!1;const le=g({mouseUpClientX:Y,mouseUpClientY:V,mouseDownClientX:w,mouseDownClientY:z}),se=M(le);p=se.offsetX,y=se.offsetY,oe()}const A=ie(fi,null);function $(j){var Y,V;if((V=(Y=A==null?void 0:A.previewedImgPropsRef.value)===null||Y===void 0?void 0:Y.onMousedown)===null||V===void 0||V.call(Y,j),j.button!==0)return;const{clientX:le,clientY:se}=j;_=!0,f=le-p,h=se-y,C=p,m=y,w=le,z=se,oe(),Te("mousemove",document,b),Te("mouseup",document,k)}function B(j){var Y,V;(V=(Y=A==null?void 0:A.previewedImgPropsRef.value)===null||Y===void 0?void 0:Y.onDblclick)===null||V===void 0||V.call(Y,j);const le=pe();I=I===le?1:le,oe()}const R=1.5;let O=0,I=1,x=0;function S(){I=1,O=0}function N(){var j;S(),x=0,(j=e.onPrev)===null||j===void 0||j.call(e)}function D(){var j;S(),x=0,(j=e.onNext)===null||j===void 0||j.call(e)}function q(){x-=90,oe()}function Q(){x+=90,oe()}function ae(){const{value:j}=n;if(!j)return 1;const{innerWidth:Y,innerHeight:V}=window,le=Math.max(1,j.naturalHeight/(V-Wt)),se=Math.max(1,j.naturalWidth/(Y-Wt));return Math.max(3,le*2,se*2)}function pe(){const{value:j}=n;if(!j)return 1;const{innerWidth:Y,innerHeight:V}=window,le=j.naturalHeight/(V-Wt),se=j.naturalWidth/(Y-Wt);return le<1&&se<1?1:Math.max(le,se)}function ve(){const j=ae();I<j&&(O+=1,I=Math.min(j,Math.pow(R,O)),oe())}function Re(){if(I>.5){const j=I;O-=1,I=Math.max(.5,Math.pow(R,O));const Y=j-I;oe(!1);const V=M();I+=Y,oe(!1),I-=Y,p=V.offsetX,y=V.offsetY,oe()}}function oe(j=!0){var Y;const{value:V}=n;if(!V)return;const{style:le}=V,se=cl((Y=A==null?void 0:A.previewedImgPropsRef.value)===null||Y===void 0?void 0:Y.style);let $e="";if(typeof se=="string")$e=se+";";else for(const _e in se)$e+=`${pu(_e)}: ${se[_e]};`;const xe=`transform-origin: center; transform: translateX(${p}px) translateY(${y}px) rotate(${x}deg) scale(${I});`;_?le.cssText=$e+"cursor: grabbing; transition: none;"+xe:le.cssText=$e+"cursor: grab;"+xe+(j?"":"transition: none;"),j||V.offsetHeight}function ke(){l.value=!l.value,s.value=!0}function we(){I=pe(),O=Math.ceil(Math.log(I)/Math.log(R)),p=0,y=0,oe()}const ee={setPreviewSrc:j=>{i.value=j},setThumbnailEl:j=>{r=j},toggleShow:ke};function Le(j,Y){if(e.showToolbarTooltip){const{value:V}=t;return u(ai,{to:!1,theme:V.peers.Tooltip,themeOverrides:V.peerOverrides.Tooltip,keepAliveOnHover:!1},{default:()=>a.value[Y],trigger:()=>j})}else return j}const qe=F(()=>{const{common:{cubicBezierEaseInOut:j},self:{toolbarIconColor:Y,toolbarBorderRadius:V,toolbarBoxShadow:le,toolbarColor:se}}=t.value;return{"--n-bezier":j,"--n-toolbar-icon-color":Y,"--n-toolbar-color":se,"--n-toolbar-border-radius":V,"--n-toolbar-box-shadow":le}}),{inlineThemeDisabled:Ge}=Ie(),Ee=Ge?Fe("image-preview",void 0,qe,e):void 0;return Object.assign({previewRef:n,previewWrapperRef:o,previewSrc:i,show:l,appear:Dr(),displayed:s,previewedImgProps:A==null?void 0:A.previewedImgPropsRef,handleWheel(j){j.preventDefault()},handlePreviewMousedown:$,handlePreviewDblclick:B,syncTransformOrigin:d,handleAfterLeave:()=>{S(),x=0,s.value=!1},handleDragStart:j=>{var Y,V;(V=(Y=A==null?void 0:A.previewedImgPropsRef.value)===null||Y===void 0?void 0:Y.onDragstart)===null||V===void 0||V.call(Y,j),j.preventDefault()},zoomIn:ve,zoomOut:Re,rotateCounterclockwise:q,rotateClockwise:Q,handleSwitchPrev:N,handleSwitchNext:D,withTooltip:Le,resizeToOrignalImageSize:we,cssVars:Ge?void 0:qe,themeClass:Ee==null?void 0:Ee.themeClass,onRender:Ee==null?void 0:Ee.onRender},ee)},render(){var e,t;const{clsPrefix:r}=this;return u(De,null,(t=(e=this.$slots).default)===null||t===void 0?void 0:t.call(e),u(ao,{show:this.show},{default:()=>{var n;return this.show||this.displayed?((n=this.onRender)===null||n===void 0||n.call(this),vt(u("div",{class:[`${r}-image-preview-container`,this.themeClass],style:this.cssVars,onWheel:this.handleWheel},u($t,{name:"fade-in-transition",appear:this.appear},{default:()=>this.show?u("div",{class:`${r}-image-preview-overlay`,onClick:this.toggleShow}):null}),this.showToolbar?u($t,{name:"fade-in-transition",appear:this.appear},{default:()=>{if(!this.show)return null;const{withTooltip:o}=this;return u("div",{class:`${r}-image-preview-toolbar`},this.onPrev?u(De,null,o(u(fe,{clsPrefix:r,onClick:this.handleSwitchPrev},{default:()=>xh}),"tipPrevious"),o(u(fe,{clsPrefix:r,onClick:this.handleSwitchNext},{default:()=>Ch}),"tipNext")):null,o(u(fe,{clsPrefix:r,onClick:this.rotateCounterclockwise},{default:()=>u(gc,null)}),"tipCounterclockwise"),o(u(fe,{clsPrefix:r,onClick:this.rotateClockwise},{default:()=>u(vc,null)}),"tipClockwise"),o(u(fe,{clsPrefix:r,onClick:this.resizeToOrignalImageSize},{default:()=>u(yc,null)}),"tipOriginalSize"),o(u(fe,{clsPrefix:r,onClick:this.zoomOut},{default:()=>u(bc,null)}),"tipZoomOut"),o(u(fe,{clsPrefix:r,onClick:this.zoomIn},{default:()=>u(mc,null)}),"tipZoomIn"),o(u(fe,{clsPrefix:r,onClick:this.toggleShow},{default:()=>Sh}),"tipClose"))}}):null,u($t,{name:"fade-in-scale-up-transition",onAfterLeave:this.handleAfterLeave,appear:this.appear,onEnter:this.syncTransformOrigin,onBeforeLeave:this.syncTransformOrigin},{default:()=>{const{previewedImgProps:o={}}=this;return vt(u("div",{class:`${r}-image-preview-wrapper`,ref:"previewWrapperRef"},u("img",Object.assign({},o,{draggable:!1,onMousedown:this.handlePreviewMousedown,onDblclick:this.handlePreviewDblclick,class:[`${r}-image-preview`,o.class],key:this.previewSrc,src:this.previewSrc,ref:"previewRef",onDragstart:this.handleDragStart}))),[[co,this.show]])}})),[[Fr,{enabled:this.show}]])):null}}))}}),vi=Ve("n-image-group"),kh=tn,$h=K({name:"ImageGroup",props:kh,setup(e){let t;const{mergedClsPrefixRef:r}=Ie(e),n=`c${kr()}`,o=Ar(),i=a=>{var d;t=a,(d=s.value)===null||d===void 0||d.setPreviewSrc(a)};function l(a){if(!(o!=null&&o.proxy))return;const c=o.proxy.$el.parentElement.querySelectorAll(`[data-group-id=${n}]:not([data-error=true])`);if(!c.length)return;const f=Array.from(c).findIndex(h=>h.dataset.previewSrc===t);~f?i(c[(f+a+c.length)%c.length].dataset.previewSrc):i(c[0].dataset.previewSrc)}Pe(vi,{mergedClsPrefixRef:r,setPreviewSrc:i,setThumbnailEl:a=>{var d;(d=s.value)===null||d===void 0||d.setThumbnailEl(a)},toggleShow:()=>{var a;(a=s.value)===null||a===void 0||a.toggleShow()},groupId:n});const s=E(null);return{mergedClsPrefix:r,previewInstRef:s,next:()=>l(1),prev:()=>l(-1)}},render(){return u(pi,{theme:this.theme,themeOverrides:this.themeOverrides,clsPrefix:this.mergedClsPrefix,ref:"previewInstRef",onPrev:this.prev,onNext:this.next,showToolbar:this.showToolbar,showToolbarTooltip:this.showToolbarTooltip},this.$slots)}}),zh=Object.assign({alt:String,height:[String,Number],imgProps:Object,previewedImgProps:Object,lazy:Boolean,intersectionObserverOptions:Object,objectFit:{type:String,default:"fill"},previewSrc:String,fallbackSrc:String,width:[String,Number],src:String,previewDisabled:Boolean,loadDescription:String,onError:Function,onLoad:Function},tn),Br=K({name:"Image",props:zh,inheritAttrs:!1,setup(e){const t=E(null),r=E(!1),n=E(null),o=ie(vi,null),{mergedClsPrefixRef:i}=o||Ie(e),l={click:()=>{if(e.previewDisabled||r.value)return;const d=e.previewSrc||e.src;if(o){o.setPreviewSrc(d),o.setThumbnailEl(t.value),o.toggleShow();return}const{value:c}=n;c&&(c.setPreviewSrc(d),c.setThumbnailEl(t.value),c.toggleShow())}},s=E(!e.lazy);We(()=>{var d;(d=t.value)===null||d===void 0||d.setAttribute("data-group-id",(o==null?void 0:o.groupId)||"")}),We(()=>{if(br)return;let d;const c=it(()=>{d==null||d(),d=void 0,e.lazy&&(d=zf(t.value,e.intersectionObserverOptions,s))});Qe(()=>{c(),d==null||d()})}),it(()=>{var d;e.src,(d=e.imgProps)===null||d===void 0||d.src,r.value=!1});const a=E(!1);return Pe(fi,{previewedImgPropsRef:Z(e,"previewedImgProps")}),Object.assign({mergedClsPrefix:i,groupId:o==null?void 0:o.groupId,previewInstRef:n,imageRef:t,showError:r,shouldStartLoading:s,loaded:a,mergedOnClick:d=>{var c,f;l.click(),(f=(c=e.imgProps)===null||c===void 0?void 0:c.onClick)===null||f===void 0||f.call(c,d)},mergedOnError:d=>{if(!s.value)return;r.value=!0;const{onError:c,imgProps:{onError:f}={}}=e;c==null||c(d),f==null||f(d)},mergedOnLoad:d=>{const{onLoad:c,imgProps:{onLoad:f}={}}=e;c==null||c(d),f==null||f(d),a.value=!0}},l)},render(){var e,t;const{mergedClsPrefix:r,imgProps:n={},loaded:o,$attrs:i,lazy:l}=this,s=(t=(e=this.$slots).placeholder)===null||t===void 0?void 0:t.call(e),a=this.src||n.src||"",d=u("img",Object.assign(Object.assign({},n),{ref:"imageRef",width:this.width||n.width,height:this.height||n.height,src:br?a:this.showError?this.fallbackSrc:this.shouldStartLoading?a:void 0,alt:this.alt||n.alt,"aria-label":this.alt||n.alt,onClick:this.mergedOnClick,onError:this.mergedOnError,onLoad:this.mergedOnLoad,loading:br&&l&&!this.intersectionObserverOptions?"lazy":"eager",style:[n.style||"",s&&!o?{height:"0",width:"0",visibility:"hidden"}:"",{objectFit:this.objectFit}],"data-error":this.showError,"data-preview-src":this.previewSrc||this.src}));return u("div",Object.assign({},i,{role:"none",class:[i.class,`${r}-image`,(this.previewDisabled||this.showError)&&`${r}-image--preview-disabled`]}),this.groupId?d:u(pi,{theme:this.theme,themeOverrides:this.themeOverrides,clsPrefix:r,ref:"previewInstRef",showToolbar:this.showToolbar,showToolbarTooltip:this.showToolbarTooltip},{default:()=>d}),!o&&s)}}),Th=H([P("list",`
--n-merged-border-color: var(--n-border-color);
--n-merged-color: var(--n-color);
--n-merged-color-hover: var(--n-color-hover);
margin: 0;
font-size: var(--n-font-size);
transition:
background-color .3s var(--n-bezier),
color .3s var(--n-bezier),
border-color .3s var(--n-bezier);
padding: 0;
list-style-type: none;
color: var(--n-text-color);
background-color: var(--n-merged-color);
`,[W("show-divider",[P("list-item",[H("&:not(:last-child)",[L("divider",`
background-color: var(--n-merged-border-color);
`)])])]),W("clickable",[P("list-item",`
cursor: pointer;
`)]),W("bordered",`
border: 1px solid var(--n-merged-border-color);
border-radius: var(--n-border-radius);
`),W("hoverable",[P("list-item",`
border-radius: var(--n-border-radius);
`,[H("&:hover",`
background-color: var(--n-merged-color-hover);
`,[L("divider",`
background-color: transparent;
`)])])]),W("bordered, hoverable",[P("list-item",`
padding: 12px 20px;
`),L("header, footer",`
padding: 12px 20px;
`)]),L("header, footer",`
padding: 12px 0;
box-sizing: border-box;
transition: border-color .3s var(--n-bezier);
`,[H("&:not(:last-child)",`
border-bottom: 1px solid var(--n-merged-border-color);
`)]),P("list-item",`
position: relative;
padding: 12px 0;
box-sizing: border-box;
display: flex;
flex-wrap: nowrap;
align-items: center;
transition:
background-color .3s var(--n-bezier),
border-color .3s var(--n-bezier);
`,[L("prefix",`
margin-right: 20px;
flex: 0;
`),L("suffix",`
margin-left: 20px;
flex: 0;
`),L("main",`
flex: 1;
`),L("divider",`
height: 1px;
position: absolute;
bottom: 0;
left: 0;
right: 0;
background-color: transparent;
transition: background-color .3s var(--n-bezier);
pointer-events: none;
`)])]),fl(P("list",`
--n-merged-color-hover: var(--n-color-hover-modal);
--n-merged-color: var(--n-color-modal);
--n-merged-border-color: var(--n-border-color-modal);
`)),hl(P("list",`
--n-merged-color-hover: var(--n-color-hover-popover);
--n-merged-color: var(--n-color-popover);
--n-merged-border-color: var(--n-border-color-popover);
`))]),Ih=Object.assign(Object.assign({},re.props),{size:{type:String,default:"medium"},bordered:Boolean,clickable:Boolean,hoverable:Boolean,showDivider:{type:Boolean,default:!0}}),gi=Ve("n-list"),Rh=K({name:"List",props:Ih,setup(e){const{mergedClsPrefixRef:t,inlineThemeDisabled:r,mergedRtlRef:n}=Ie(e),o=Ot("List",n,t),i=re("List","-list",Th,fh,e,t);Pe(gi,{showDividerRef:Z(e,"showDivider"),mergedClsPrefixRef:t});const l=F(()=>{const{common:{cubicBezierEaseInOut:a},self:{fontSize:d,textColor:c,color:f,colorModal:h,colorPopover:p,borderColor:y,borderColorModal:C,borderColorPopover:m,borderRadius:w,colorHover:z,colorHoverModal:_,colorHoverPopover:b}}=i.value;return{"--n-font-size":d,"--n-bezier":a,"--n-text-color":c,"--n-color":f,"--n-border-radius":w,"--n-border-color":y,"--n-border-color-modal":C,"--n-border-color-popover":m,"--n-color-modal":h,"--n-color-popover":p,"--n-color-hover":z,"--n-color-hover-modal":_,"--n-color-hover-popover":b}}),s=r?Fe("list",void 0,l,e):void 0;return{mergedClsPrefix:t,rtlEnabled:o,cssVars:r?void 0:l,themeClass:s==null?void 0:s.themeClass,onRender:s==null?void 0:s.onRender}},render(){var e;const{$slots:t,mergedClsPrefix:r,onRender:n}=this;return n==null||n(),u("ul",{class:[`${r}-list`,this.rtlEnabled&&`${r}-list--rtl`,this.bordered&&`${r}-list--bordered`,this.showDivider&&`${r}-list--show-divider`,this.hoverable&&`${r}-list--hoverable`,this.clickable&&`${r}-list--clickable`,this.themeClass],style:this.cssVars},t.header?u("div",{class:`${r}-list__header`},t.header()):null,(e=t.default)===null||e===void 0?void 0:e.call(t),t.footer?u("div",{class:`${r}-list__footer`},t.footer()):null)}}),_h=K({name:"ListItem",setup(){const e=ie(gi,null);return e||bt("list-item","`n-list-item` must be placed in `n-list`."),{showDivider:e.showDividerRef,mergedClsPrefix:e.mergedClsPrefixRef}},render(){const{$slots:e,mergedClsPrefix:t}=this;return u("li",{class:`${t}-list-item`},e.prefix?u("div",{class:`${t}-list-item__prefix`},e.prefix()):null,e.default?u("div",{class:`${t}-list-item__main`},e):null,e.suffix?u("div",{class:`${t}-list-item__suffix`},e.suffix()):null,this.showDivider&&u("div",{class:`${t}-list-item__divider`}))}});function rn(){const e=ie(pl,null);return e===null&&bt("use-message","No outer <n-message-provider /> founded. See prerequisite in https://www.naiveui.com/en-US/os-theme/components/message for more details. If you want to use `useMessage` outside setup, please check https://www.naiveui.com/zh-CN/os-theme/components/message#Q-&-A."),e}const Oh=H([P("progress",{display:"inline-block"},[P("progress-icon",`
color: var(--n-icon-color);
transition: color .3s var(--n-bezier);
`),W("line",`
width: 100%;
display: block;
`,[P("progress-content",`
display: flex;
align-items: center;
`,[P("progress-graph",{flex:1})]),P("progress-custom-content",{marginLeft:"14px"}),P("progress-icon",`
width: 30px;
padding-left: 14px;
height: var(--n-icon-size-line);
line-height: var(--n-icon-size-line);
font-size: var(--n-icon-size-line);
`,[W("as-text",`
color: var(--n-text-color-line-outer);
text-align: center;
width: 40px;
font-size: var(--n-font-size);
padding-left: 4px;
transition: color .3s var(--n-bezier);
`)])]),W("circle, dashboard",{width:"120px"},[P("progress-custom-content",`
position: absolute;
left: 50%;
top: 50%;
transform: translateX(-50%) translateY(-50%);
display: flex;
align-items: center;
justify-content: center;
`),P("progress-text",`
position: absolute;
left: 50%;
top: 50%;
transform: translateX(-50%) translateY(-50%);
display: flex;
align-items: center;
color: inherit;
font-size: var(--n-font-size-circle);
color: var(--n-text-color-circle);
font-weight: var(--n-font-weight-circle);
transition: color .3s var(--n-bezier);
white-space: nowrap;
`),P("progress-icon",`
position: absolute;
left: 50%;
top: 50%;
transform: translateX(-50%) translateY(-50%);
display: flex;
align-items: center;
color: var(--n-icon-color);
font-size: var(--n-icon-size-circle);
`)]),W("multiple-circle",`
width: 200px;
color: inherit;
`,[P("progress-text",`
font-weight: var(--n-font-weight-circle);
color: var(--n-text-color-circle);
position: absolute;
left: 50%;
top: 50%;
transform: translateX(-50%) translateY(-50%);
display: flex;
align-items: center;
justify-content: center;
transition: color .3s var(--n-bezier);
`)]),P("progress-content",{position:"relative"}),P("progress-graph",{position:"relative"},[P("progress-graph-circle",[H("svg",{verticalAlign:"bottom"}),P("progress-graph-circle-fill",`
stroke: var(--n-fill-color);
transition:
opacity .3s var(--n-bezier),
stroke .3s var(--n-bezier),
stroke-dasharray .3s var(--n-bezier);
`,[W("empty",{opacity:0})]),P("progress-graph-circle-rail",`
transition: stroke .3s var(--n-bezier);
overflow: hidden;
stroke: var(--n-rail-color);
`)]),P("progress-graph-line",[W("indicator-inside",[P("progress-graph-line-rail",`
height: 16px;
line-height: 16px;
border-radius: 10px;
`,[P("progress-graph-line-fill",`
height: inherit;
border-radius: 10px;
`),P("progress-graph-line-indicator",`
background: #0000;
white-space: nowrap;
text-align: right;
margin-left: 14px;
margin-right: 14px;
height: inherit;
font-size: 12px;
color: var(--n-text-color-line-inner);
transition: color .3s var(--n-bezier);
`)])]),W("indicator-inside-label",`
height: 16px;
display: flex;
align-items: center;
`,[P("progress-graph-line-rail",`
flex: 1;
transition: background-color .3s var(--n-bezier);
`),P("progress-graph-line-indicator",`
background: var(--n-fill-color);
font-size: 12px;
transform: translateZ(0);
display: flex;
vertical-align: middle;
height: 16px;
line-height: 16px;
padding: 0 10px;
border-radius: 10px;
position: absolute;
white-space: nowrap;
color: var(--n-text-color-line-inner);
transition:
right .2s var(--n-bezier),
color .3s var(--n-bezier),
background-color .3s var(--n-bezier);
`)]),P("progress-graph-line-rail",`
position: relative;
overflow: hidden;
height: var(--n-rail-height);
border-radius: 5px;
background-color: var(--n-rail-color);
transition: background-color .3s var(--n-bezier);
`,[P("progress-graph-line-fill",`
background: var(--n-fill-color);
position: relative;
border-radius: 5px;
height: inherit;
width: 100%;
max-width: 0%;
transition:
background-color .3s var(--n-bezier),
max-width .2s var(--n-bezier);
`,[W("processing",[H("&::after",`
content: "";
background-image: var(--n-line-bg-processing);
animation: progress-processing-animation 2s var(--n-bezier) infinite;
`)])])])])])]),H("@keyframes progress-processing-animation",`
0% {
position: absolute;
left: 0;
top: 0;
bottom: 0;
right: 100%;
opacity: 1;
}
66% {
position: absolute;
left: 0;
top: 0;
bottom: 0;
right: 0;
opacity: 0;
}
100% {
position: absolute;
left: 0;
top: 0;
bottom: 0;
right: 0;
opacity: 0;
}
`)]),Bh={success:u(yo,null),error:u(wo,null),warning:u(xo,null),info:u(Co,null)},Mh=K({name:"ProgressLine",props:{clsPrefix:{type:String,required:!0},percentage:{type:Number,default:0},railColor:String,railStyle:[String,Object],fillColor:String,status:{type:String,required:!0},indicatorPlacement:{type:String,required:!0},indicatorTextColor:String,unit:{type:String,default:"%"},processing:{type:Boolean,required:!0},showIndicator:{type:Boolean,required:!0},height:[String,Number],railBorderRadius:[String,Number],fillBorderRadius:[String,Number]},setup(e,{slots:t}){const r=F(()=>He(e.height)),n=F(()=>e.railBorderRadius!==void 0?He(e.railBorderRadius):e.height!==void 0?He(e.height,{c:.5}):""),o=F(()=>e.fillBorderRadius!==void 0?He(e.fillBorderRadius):e.railBorderRadius!==void 0?He(e.railBorderRadius):e.height!==void 0?He(e.height,{c:.5}):"");return()=>{const{indicatorPlacement:i,railColor:l,railStyle:s,percentage:a,unit:d,indicatorTextColor:c,status:f,showIndicator:h,fillColor:p,processing:y,clsPrefix:C}=e;return u("div",{class:`${C}-progress-content`,role:"none"},u("div",{class:`${C}-progress-graph`,"aria-hidden":!0},u("div",{class:[`${C}-progress-graph-line`,{[`${C}-progress-graph-line--indicator-${i}`]:!0}]},u("div",{class:`${C}-progress-graph-line-rail`,style:[{backgroundColor:l,height:r.value,borderRadius:n.value},s]},u("div",{class:[`${C}-progress-graph-line-fill`,y&&`${C}-progress-graph-line-fill--processing`],style:{maxWidth:`${e.percentage}%`,backgroundColor:p,height:r.value,lineHeight:r.value,borderRadius:o.value}},i==="inside"?u("div",{class:`${C}-progress-graph-line-indicator`,style:{color:c}},a,d):null)))),h&&i==="outside"?u("div",null,t.default?u("div",{class:`${C}-progress-custom-content`,style:{color:c},role:"none"},t.default()):f==="default"?u("div",{role:"none",class:`${C}-progress-icon ${C}-progress-icon--as-text`,style:{color:c}},a,d):u("div",{class:`${C}-progress-icon`,"aria-hidden":!0},u(fe,{clsPrefix:C},{default:()=>Bh[f]}))):null)}}}),Lh={success:u(yo,null),error:u(wo,null),warning:u(xo,null),info:u(Co,null)},Eh=K({name:"ProgressCircle",props:{clsPrefix:{type:String,required:!0},status:{type:String,required:!0},strokeWidth:{type:Number,required:!0},fillColor:String,railColor:String,railStyle:[String,Object],percentage:{type:Number,default:0},offsetDegree:{type:Number,default:0},showIndicator:{type:Boolean,required:!0},indicatorTextColor:String,unit:String,viewBoxWidth:{type:Number,required:!0},gapDegree:{type:Number,required:!0},gapOffsetDegree:{type:Number,default:0}},setup(e,{slots:t}){function r(n,o,i){const{gapDegree:l,viewBoxWidth:s,strokeWidth:a}=e,d=50,c=0,f=d,h=0,p=2*d,y=50+a/2,C=`M ${y},${y} m ${c},${f}
a ${d},${d} 0 1 1 ${h},${-p}
a ${d},${d} 0 1 1 ${-h},${p}`,m=Math.PI*2*d,w={stroke:i,strokeDasharray:`${n/100*(m-l)}px ${s*8}px`,strokeDashoffset:`-${l/2}px`,transformOrigin:o?"center":void 0,transform:o?`rotate(${o}deg)`:void 0};return{pathString:C,pathStyle:w}}return()=>{const{fillColor:n,railColor:o,strokeWidth:i,offsetDegree:l,status:s,percentage:a,showIndicator:d,indicatorTextColor:c,unit:f,gapOffsetDegree:h,clsPrefix:p}=e,{pathString:y,pathStyle:C}=r(100,0,o),{pathString:m,pathStyle:w}=r(a,l,n),z=100+i;return u("div",{class:`${p}-progress-content`,role:"none"},u("div",{class:`${p}-progress-graph`,"aria-hidden":!0},u("div",{class:`${p}-progress-graph-circle`,style:{transform:h?`rotate(${h}deg)`:void 0}},u("svg",{viewBox:`0 0 ${z} ${z}`},u("g",null,u("path",{class:`${p}-progress-graph-circle-rail`,d:y,"stroke-width":i,"stroke-linecap":"round",fill:"none",style:C})),u("g",null,u("path",{class:[`${p}-progress-graph-circle-fill`,a===0&&`${p}-progress-graph-circle-fill--empty`],d:m,"stroke-width":i,"stroke-linecap":"round",fill:"none",style:w}))))),d?u("div",null,t.default?u("div",{class:`${p}-progress-custom-content`,role:"none"},t.default()):s!=="default"?u("div",{class:`${p}-progress-icon`,"aria-hidden":!0},u(fe,{clsPrefix:p},{default:()=>Lh[s]})):u("div",{class:`${p}-progress-text`,style:{color:c},role:"none"},u("span",{class:`${p}-progress-text__percentage`},a),u("span",{class:`${p}-progress-text__unit`},f))):null)}}});function Yn(e,t,r=100){return`m ${r/2} ${r/2-e} a ${e} ${e} 0 1 1 0 ${2*e} a ${e} ${e} 0 1 1 0 -${2*e}`}const Ah=K({name:"ProgressMultipleCircle",props:{clsPrefix:{type:String,required:!0},viewBoxWidth:{type:Number,required:!0},percentage:{type:Array,default:[0]},strokeWidth:{type:Number,required:!0},circleGap:{type:Number,required:!0},showIndicator:{type:Boolean,required:!0},fillColor:{type:Array,default:()=>[]},railColor:{type:Array,default:()=>[]},railStyle:{type:Array,default:()=>[]}},setup(e,{slots:t}){const r=F(()=>e.percentage.map((o,i)=>`${Math.PI*o/100*(e.viewBoxWidth/2-e.strokeWidth/2*(1+2*i)-e.circleGap*i)*2}, ${e.viewBoxWidth*8}`));return()=>{const{viewBoxWidth:n,strokeWidth:o,circleGap:i,showIndicator:l,fillColor:s,railColor:a,railStyle:d,percentage:c,clsPrefix:f}=e;return u("div",{class:`${f}-progress-content`,role:"none"},u("div",{class:`${f}-progress-graph`,"aria-hidden":!0},u("div",{class:`${f}-progress-graph-circle`},u("svg",{viewBox:`0 0 ${n} ${n}`},c.map((h,p)=>u("g",{key:p},u("path",{class:`${f}-progress-graph-circle-rail`,d:Yn(n/2-o/2*(1+2*p)-i*p,o,n),"stroke-width":o,"stroke-linecap":"round",fill:"none",style:[{strokeDashoffset:0,stroke:a[p]},d[p]]}),u("path",{class:[`${f}-progress-graph-circle-fill`,h===0&&`${f}-progress-graph-circle-fill--empty`],d:Yn(n/2-o/2*(1+2*p)-i*p,o,n),"stroke-width":o,"stroke-linecap":"round",fill:"none",style:{strokeDasharray:r.value[p],strokeDashoffset:0,stroke:s[p]}})))))),l&&t.default?u("div",null,u("div",{class:`${f}-progress-text`},t.default())):null)}}}),Dh=Object.assign(Object.assign({},re.props),{processing:Boolean,type:{type:String,default:"line"},gapDegree:Number,gapOffsetDegree:Number,status:{type:String,default:"default"},railColor:[String,Array],railStyle:[String,Array],color:[String,Array],viewBoxWidth:{type:Number,default:100},strokeWidth:{type:Number,default:7},percentage:[Number,Array],unit:{type:String,default:"%"},showIndicator:{type:Boolean,default:!0},indicatorPosition:{type:String,default:"outside"},indicatorPlacement:{type:String,default:"outside"},indicatorTextColor:String,circleGap:{type:Number,default:1},height:Number,borderRadius:[String,Number],fillBorderRadius:[String,Number],offsetDegree:Number}),Fh=K({name:"Progress",props:Dh,setup(e){const t=F(()=>e.indicatorPlacement||e.indicatorPosition),r=F(()=>{if(e.gapDegree||e.gapDegree===0)return e.gapDegree;if(e.type==="dashboard")return 75}),{mergedClsPrefixRef:n,inlineThemeDisabled:o}=Ie(e),i=re("Progress","-progress",Oh,hi,e,n),l=F(()=>{const{status:a}=e,{common:{cubicBezierEaseInOut:d},self:{fontSize:c,fontSizeCircle:f,railColor:h,railHeight:p,iconSizeCircle:y,iconSizeLine:C,textColorCircle:m,textColorLineInner:w,textColorLineOuter:z,lineBgProcessing:_,fontWeightCircle:b,[ne("iconColor",a)]:g,[ne("fillColor",a)]:M}}=i.value;return{"--n-bezier":d,"--n-fill-color":M,"--n-font-size":c,"--n-font-size-circle":f,"--n-font-weight-circle":b,"--n-icon-color":g,"--n-icon-size-circle":y,"--n-icon-size-line":C,"--n-line-bg-processing":_,"--n-rail-color":h,"--n-rail-height":p,"--n-text-color-circle":m,"--n-text-color-line-inner":w,"--n-text-color-line-outer":z}}),s=o?Fe("progress",F(()=>e.status[0]),l,e):void 0;return{mergedClsPrefix:n,mergedIndicatorPlacement:t,gapDeg:r,cssVars:o?void 0:l,themeClass:s==null?void 0:s.themeClass,onRender:s==null?void 0:s.onRender}},render(){const{type:e,cssVars:t,indicatorTextColor:r,showIndicator:n,status:o,railColor:i,railStyle:l,color:s,percentage:a,viewBoxWidth:d,strokeWidth:c,mergedIndicatorPlacement:f,unit:h,borderRadius:p,fillBorderRadius:y,height:C,processing:m,circleGap:w,mergedClsPrefix:z,gapDeg:_,gapOffsetDegree:b,themeClass:g,$slots:M,onRender:k}=this;return k==null||k(),u("div",{class:[g,`${z}-progress`,`${z}-progress--${e}`,`${z}-progress--${o}`],style:t,"aria-valuemax":100,"aria-valuemin":0,"aria-valuenow":a,role:e==="circle"||e==="line"||e==="dashboard"?"progressbar":"none"},e==="circle"||e==="dashboard"?u(Eh,{clsPrefix:z,status:o,showIndicator:n,indicatorTextColor:r,railColor:i,fillColor:s,railStyle:l,offsetDegree:this.offsetDegree,percentage:a,viewBoxWidth:d,strokeWidth:c,gapDegree:_===void 0?e==="dashboard"?75:0:_,gapOffsetDegree:b,unit:h},M):e==="line"?u(Mh,{clsPrefix:z,status:o,showIndicator:n,indicatorTextColor:r,railColor:i,fillColor:s,railStyle:l,percentage:a,processing:m,indicatorPlacement:f,unit:h,fillBorderRadius:y,railBorderRadius:p,height:C},M):e==="multiple-circle"?u(Ah,{clsPrefix:z,strokeWidth:c,railColor:i,fillColor:s,railStyle:l,viewBoxWidth:d,percentage:a,showIndicator:n,circleGap:w},M):null)}}),Nh=P("thing",`
display: flex;
transition: color .3s var(--n-bezier);
font-size: var(--n-font-size);
color: var(--n-text-color);
`,[P("thing-avatar",`
margin-right: 12px;
margin-top: 2px;
`),P("thing-avatar-header-wrapper",`
display: flex;
flex-wrap: nowrap;
`,[P("thing-header-wrapper",`
flex: 1;
`)]),P("thing-main",`
flex-grow: 1;
`,[P("thing-header",`
display: flex;
margin-bottom: 4px;
justify-content: space-between;
align-items: center;
`,[L("title",`
font-size: 16px;
font-weight: var(--n-title-font-weight);
transition: color .3s var(--n-bezier);
color: var(--n-title-text-color);
`)]),L("description",[H("&:not(:last-child)",`
margin-bottom: 4px;
`)]),L("content",[H("&:not(:first-child)",`
margin-top: 12px;
`)]),L("footer",[H("&:not(:first-child)",`
margin-top: 12px;
`)]),L("action",[H("&:not(:first-child)",`
margin-top: 12px;
`)])])]),Hh=Object.assign(Object.assign({},re.props),{title:String,titleExtra:String,description:String,descriptionStyle:[String,Object],content:String,contentStyle:[String,Object],contentIndented:Boolean}),mi=K({name:"Thing",props:Hh,setup(e,{slots:t}){const{mergedClsPrefixRef:r,inlineThemeDisabled:n,mergedRtlRef:o}=Ie(e),i=re("Thing","-thing",Nh,mh,e,r),l=Ot("Thing",o,r),s=F(()=>{const{self:{titleTextColor:d,textColor:c,titleFontWeight:f,fontSize:h},common:{cubicBezierEaseInOut:p}}=i.value;return{"--n-bezier":p,"--n-font-size":h,"--n-text-color":c,"--n-title-font-weight":f,"--n-title-text-color":d}}),a=n?Fe("thing",void 0,s,e):void 0;return()=>{var d;const{value:c}=r,f=l?l.value:!1;return(d=a==null?void 0:a.onRender)===null||d===void 0||d.call(a),u("div",{class:[`${c}-thing`,a==null?void 0:a.themeClass,f&&`${c}-thing--rtl`],style:n?void 0:s.value},t.avatar&&e.contentIndented?u("div",{class:`${c}-thing-avatar`},t.avatar()):null,u("div",{class:`${c}-thing-main`},!e.contentIndented&&(t.header||e.title||t["header-extra"]||e.titleExtra||t.avatar)?u("div",{class:`${c}-thing-avatar-header-wrapper`},t.avatar?u("div",{class:`${c}-thing-avatar`},t.avatar()):null,t.header||e.title||t["header-extra"]||e.titleExtra?u("div",{class:`${c}-thing-header-wrapper`},u("div",{class:`${c}-thing-header`},t.header||e.title?u("div",{class:`${c}-thing-header__title`},t.header?t.header():e.title):null,t["header-extra"]||e.titleExtra?u("div",{class:`${c}-thing-header__extra`},t["header-extra"]?t["header-extra"]():e.titleExtra):null),t.description||e.description?u("div",{class:`${c}-thing-main__description`,style:e.descriptionStyle},t.description?t.description():e.description):null):null):u(De,null,t.header||e.title||t["header-extra"]||e.titleExtra?u("div",{class:`${c}-thing-header`},t.header||e.title?u("div",{class:`${c}-thing-header__title`},t.header?t.header():e.title):null,t["header-extra"]||e.titleExtra?u("div",{class:`${c}-thing-header__extra`},t["header-extra"]?t["header-extra"]():e.titleExtra):null):null,t.description||e.description?u("div",{class:`${c}-thing-main__description`,style:e.descriptionStyle},t.description?t.description():e.description):null),t.default||e.content?u("div",{class:`${c}-thing-main__content`,style:e.contentStyle},t.default?t.default():e.content):null,t.footer?u("div",{class:`${c}-thing-main__footer`},t.footer()):null,t.action?u("div",{class:`${c}-thing-main__action`},t.action()):null))}}}),yt=Ve("n-upload"),bi="__UPLOAD_DRAGGER__",jh=K({name:"UploadDragger",[bi]:!0,setup(e,{slots:t}){const r=ie(yt,null);return r||bt("upload-dragger","`n-upload-dragger` must be placed inside `n-upload`."),()=>{const{mergedClsPrefixRef:{value:n},mergedDisabledRef:{value:o},maxReachedRef:{value:i}}=r;return u("div",{class:[`${n}-upload-dragger`,(o||i)&&`${n}-upload-dragger--disabled`]},t)}}});var yi=globalThis&&globalThis.__awaiter||function(e,t,r,n){function o(i){return i instanceof r?i:new r(function(l){l(i)})}return new(r||(r=Promise))(function(i,l){function s(c){try{d(n.next(c))}catch(f){l(f)}}function a(c){try{d(n.throw(c))}catch(f){l(f)}}function d(c){c.done?i(c.value):o(c.value).then(s,a)}d((n=n.apply(e,t||[])).next())})};const wi=e=>e.includes("image/"),Zn=(e="")=>{const t=e.split("/"),n=t[t.length-1].split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(n)||[""])[0]},Jn=/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico)$/i,xi=e=>{if(e.type)return wi(e.type);const t=Zn(e.name||"");if(Jn.test(t))return!0;const r=e.thumbnailUrl||e.url||"",n=Zn(r);return!!(/^data:image\//.test(r)||Jn.test(n))};function Wh(e){return yi(this,void 0,void 0,function*(){return yield new Promise(t=>{if(!e.type||!wi(e.type)){t("");return}t(window.URL.createObjectURL(e))})})}const Uh=Wr&&window.FileReader&&window.File;function Vh(e){return e.isDirectory}function Kh(e){return e.isFile}function qh(e,t){return yi(this,void 0,void 0,function*(){const r=[];let n,o=0;function i(){o++}function l(){o--,o||n(r)}function s(a){a.forEach(d=>{if(d){if(i(),t&&Vh(d)){const c=d.createReader();i(),c.readEntries(f=>{s(f),l()},()=>{l()})}else Kh(d)&&(i(),d.file(c=>{r.push({file:c,entry:d,source:"dnd"}),l()},()=>{l()}));l()}})}return yield new Promise(a=>{n=a,s(e)}),r})}function Rt(e){const{id:t,name:r,percentage:n,status:o,url:i,file:l,thumbnailUrl:s,type:a,fullPath:d,batchId:c}=e;return{id:t,name:r,percentage:n??null,status:o,url:i??null,file:l??null,thumbnailUrl:s??null,type:a??null,fullPath:d??null,batchId:c??null}}function Gh(e,t,r){return e=e.toLowerCase(),t=t.toLocaleLowerCase(),r=r.toLocaleLowerCase(),r.split(",").map(o=>o.trim()).filter(Boolean).some(o=>{if(o.startsWith(".")){if(e.endsWith(o))return!0}else if(o.includes("/")){const[i,l]=t.split("/"),[s,a]=o.split("/");if((s==="*"||i&&s&&s===i)&&(a==="*"||l&&a&&a===l))return!0}else return!0;return!1})}const Xh=(e,t)=>{if(!e)return;const r=document.createElement("a");r.href=e,t!==void 0&&(r.download=t),document.body.appendChild(r),r.click(),document.body.removeChild(r)},Ci=K({name:"UploadTrigger",props:{abstract:Boolean},setup(e,{slots:t}){const r=ie(yt,null);r||bt("upload-trigger","`n-upload-trigger` must be placed inside `n-upload`.");const{mergedClsPrefixRef:n,mergedDisabledRef:o,maxReachedRef:i,listTypeRef:l,dragOverRef:s,openOpenFileDialog:a,draggerInsideRef:d,handleFileAddition:c,mergedDirectoryDndRef:f,triggerStyleRef:h}=r,p=F(()=>l.value==="image-card");function y(){o.value||i.value||a()}function C(_){_.preventDefault(),s.value=!0}function m(_){_.preventDefault(),s.value=!0}function w(_){_.preventDefault(),s.value=!1}function z(_){var b;if(_.preventDefault(),!d.value||o.value||i.value){s.value=!1;return}const g=(b=_.dataTransfer)===null||b===void 0?void 0:b.items;g!=null&&g.length?qh(Array.from(g).map(M=>M.webkitGetAsEntry()),f.value).then(M=>{c(M)}).finally(()=>{s.value=!1}):s.value=!1}return()=>{var _;const{value:b}=n;return e.abstract?(_=t.default)===null||_===void 0?void 0:_.call(t,{handleClick:y,handleDrop:z,handleDragOver:C,handleDragEnter:m,handleDragLeave:w}):u("div",{class:[`${b}-upload-trigger`,(o.value||i.value)&&`${b}-upload-trigger--disabled`,p.value&&`${b}-upload-trigger--image-card`],style:h.value,onClick:y,onDrop:z,onDragover:C,onDragenter:m,onDragleave:w},p.value?u(jh,null,{default:()=>ht(t.default,()=>[u(fe,{clsPrefix:b},{default:()=>u(oc,null)})])}):t)}}}),Yh=K({name:"UploadProgress",props:{show:Boolean,percentage:{type:Number,required:!0},status:{type:String,required:!0}},setup(){return{mergedTheme:ie(yt).mergedThemeRef}},render(){return u(So,null,{default:()=>this.show?u(Fh,{type:"line",showIndicator:!1,percentage:this.percentage,status:this.status,height:2,theme:this.mergedTheme.peers.Progress,themeOverrides:this.mergedTheme.peerOverrides.Progress}):null})}}),Zh=u("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 28 28"},u("g",{fill:"none"},u("path",{d:"M21.75 3A3.25 3.25 0 0 1 25 6.25v15.5A3.25 3.25 0 0 1 21.75 25H6.25A3.25 3.25 0 0 1 3 21.75V6.25A3.25 3.25 0 0 1 6.25 3h15.5zm.583 20.4l-7.807-7.68a.75.75 0 0 0-.968-.07l-.084.07l-7.808 7.68c.183.065.38.1.584.1h15.5c.204 0 .4-.035.583-.1l-7.807-7.68l7.807 7.68zM21.75 4.5H6.25A1.75 1.75 0 0 0 4.5 6.25v15.5c0 .208.036.408.103.593l7.82-7.692a2.25 2.25 0 0 1 3.026-.117l.129.117l7.82 7.692c.066-.185.102-.385.102-.593V6.25a1.75 1.75 0 0 0-1.75-1.75zm-3.25 3a2.5 2.5 0 1 1 0 5a2.5 2.5 0 0 1 0-5zm0 1.5a1 1 0 1 0 0 2a1 1 0 0 0 0-2z",fill:"currentColor"}))),Jh=u("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 28 28"},u("g",{fill:"none"},u("path",{d:"M6.4 2A2.4 2.4 0 0 0 4 4.4v19.2A2.4 2.4 0 0 0 6.4 26h15.2a2.4 2.4 0 0 0 2.4-2.4V11.578c0-.729-.29-1.428-.805-1.944l-6.931-6.931A2.4 2.4 0 0 0 14.567 2H6.4zm-.9 2.4a.9.9 0 0 1 .9-.9H14V10a2 2 0 0 0 2 2h6.5v11.6a.9.9 0 0 1-.9.9H6.4a.9.9 0 0 1-.9-.9V4.4zm16.44 6.1H16a.5.5 0 0 1-.5-.5V4.06l6.44 6.44z",fill:"currentColor"})));var Qh=globalThis&&globalThis.__awaiter||function(e,t,r,n){function o(i){return i instanceof r?i:new r(function(l){l(i)})}return new(r||(r=Promise))(function(i,l){function s(c){try{d(n.next(c))}catch(f){l(f)}}function a(c){try{d(n.throw(c))}catch(f){l(f)}}function d(c){c.done?i(c.value):o(c.value).then(s,a)}d((n=n.apply(e,t||[])).next())})};const Ut={paddingMedium:"0 3px",heightMedium:"24px",iconSizeMedium:"18px"},ep=K({name:"UploadFile",props:{clsPrefix:{type:String,required:!0},file:{type:Object,required:!0},listType:{type:String,required:!0}},setup(e){const t=ie(yt),r=E(null),n=E(""),o=F(()=>{const{file:g}=e;return g.status==="finished"?"success":g.status==="error"?"error":"info"}),i=F(()=>{const{file:g}=e;if(g.status==="error")return"error"}),l=F(()=>{const{file:g}=e;return g.status==="uploading"}),s=F(()=>{if(!t.showCancelButtonRef.value)return!1;const{file:g}=e;return["uploading","pending","error"].includes(g.status)}),a=F(()=>{if(!t.showRemoveButtonRef.value)return!1;const{file:g}=e;return["finished"].includes(g.status)}),d=F(()=>{if(!t.showDownloadButtonRef.value)return!1;const{file:g}=e;return["finished"].includes(g.status)}),c=F(()=>{if(!t.showRetryButtonRef.value)return!1;const{file:g}=e;return["error"].includes(g.status)}),f=Me(()=>n.value||e.file.thumbnailUrl||e.file.url),h=F(()=>{if(!t.showPreviewButtonRef.value)return!1;const{file:{status:g},listType:M}=e;return["finished"].includes(g)&&f.value&&M==="image-card"});function p(){t.submit(e.file.id)}function y(g){g.preventDefault();const{file:M}=e;["finished","pending","error"].includes(M.status)?m(M):["uploading"].includes(M.status)?z(M):Ur("upload","The button clicked type is unknown.")}function C(g){g.preventDefault(),w(e.file)}function m(g){const{xhrMap:M,doChange:k,onRemoveRef:{value:A},mergedFileListRef:{value:$}}=t;Promise.resolve(A?A({file:Object.assign({},g),fileList:$}):!0).then(B=>{if(B===!1)return;const R=Object.assign({},g,{status:"removed"});M.delete(g.id),k(R,void 0,{remove:!0})})}function w(g){const{onDownloadRef:{value:M}}=t;Promise.resolve(M?M(Object.assign({},g)):!0).then(k=>{k!==!1&&Xh(g.url,g.name)})}function z(g){const{xhrMap:M}=t,k=M.get(g.id);k==null||k.abort(),m(Object.assign({},g))}function _(){const{onPreviewRef:{value:g}}=t;if(g)g(e.file);else if(e.listType==="image-card"){const{value:M}=r;if(!M)return;M.click()}}const b=()=>Qh(this,void 0,void 0,function*(){const{listType:g}=e;g!=="image"&&g!=="image-card"||t.shouldUseThumbnailUrlRef.value(e.file)&&(n.value=yield t.getFileThumbnailUrlResolver(e.file))});return it(()=>{b()}),{mergedTheme:t.mergedThemeRef,progressStatus:o,buttonType:i,showProgress:l,disabled:t.mergedDisabledRef,showCancelButton:s,showRemoveButton:a,showDownloadButton:d,showRetryButton:c,showPreviewButton:h,mergedThumbnailUrl:f,shouldUseThumbnailUrl:t.shouldUseThumbnailUrlRef,renderIcon:t.renderIconRef,imageRef:r,handleRemoveOrCancelClick:y,handleDownloadClick:C,handleRetryClick:p,handlePreviewClick:_}},render(){const{clsPrefix:e,mergedTheme:t,listType:r,file:n,renderIcon:o}=this;let i;const l=r==="image";l||r==="image-card"?i=!this.shouldUseThumbnailUrl(n)||!this.mergedThumbnailUrl?u("span",{class:`${e}-upload-file-info__thumbnail`},o?o(n):xi(n)?u(fe,{clsPrefix:e},{default:()=>Zh}):u(fe,{clsPrefix:e},{default:()=>Jh})):u("a",{rel:"noopener noreferer",target:"_blank",href:n.url||void 0,class:`${e}-upload-file-info__thumbnail`,onClick:this.handlePreviewClick},r==="image-card"?u(Br,{src:this.mergedThumbnailUrl||void 0,previewSrc:n.url||void 0,alt:n.name,ref:"imageRef"}):u("img",{src:this.mergedThumbnailUrl||void 0,alt:n.name})):i=u("span",{class:`${e}-upload-file-info__thumbnail`},o?o(n):u(fe,{clsPrefix:e},{default:()=>u(ic,null)}));const a=u(Yh,{show:this.showProgress,percentage:n.percentage||0,status:this.progressStatus}),d=r==="text"||r==="image";return u("div",{class:[`${e}-upload-file`,`${e}-upload-file--${this.progressStatus}-status`,n.url&&n.status!=="error"&&r!=="image-card"&&`${e}-upload-file--with-url`,`${e}-upload-file--${r}-type`]},u("div",{class:`${e}-upload-file-info`},i,u("div",{class:`${e}-upload-file-info__name`},d&&(n.url&&n.status!=="error"?u("a",{rel:"noopener noreferer",target:"_blank",href:n.url||void 0,onClick:this.handlePreviewClick},n.name):u("span",{onClick:this.handlePreviewClick},n.name)),l&&a),u("div",{class:[`${e}-upload-file-info__action`,`${e}-upload-file-info__action--${r}-type`]},this.showPreviewButton?u(be,{key:"preview",quaternary:!0,type:this.buttonType,onClick:this.handlePreviewClick,theme:t.peers.Button,themeOverrides:t.peerOverrides.Button,builtinThemeOverrides:Ut},{icon:()=>u(fe,{clsPrefix:e},{default:()=>u(Zo,null)})}):null,(this.showRemoveButton||this.showCancelButton)&&!this.disabled&&u(be,{key:"cancelOrTrash",theme:t.peers.Button,themeOverrides:t.peerOverrides.Button,quaternary:!0,builtinThemeOverrides:Ut,type:this.buttonType,onClick:this.handleRemoveOrCancelClick},{icon:()=>u(go,null,{default:()=>this.showRemoveButton?u(fe,{clsPrefix:e,key:"trash"},{default:()=>u(sc,null)}):u(fe,{clsPrefix:e,key:"cancel"},{default:()=>u(cc,null)})})}),this.showRetryButton&&!this.disabled&&u(be,{key:"retry",quaternary:!0,type:this.buttonType,onClick:this.handleRetryClick,theme:t.peers.Button,themeOverrides:t.peerOverrides.Button,builtinThemeOverrides:Ut},{icon:()=>u(fe,{clsPrefix:e},{default:()=>u(pc,null)})}),this.showDownloadButton?u(be,{key:"download",quaternary:!0,type:this.buttonType,onClick:this.handleDownloadClick,theme:t.peers.Button,themeOverrides:t.peerOverrides.Button,builtinThemeOverrides:Ut},{icon:()=>u(fe,{clsPrefix:e},{default:()=>u(dc,null)})}):null)),!l&&a)}}),tp=K({name:"UploadFileList",setup(e,{slots:t}){const r=ie(yt,null);r||bt("upload-file-list","`n-upload-file-list` must be placed inside `n-upload`.");const{abstractRef:n,mergedClsPrefixRef:o,listTypeRef:i,mergedFileListRef:l,fileListStyleRef:s,cssVarsRef:a,themeClassRef:d,maxReachedRef:c,showTriggerRef:f,imageGroupPropsRef:h}=r,p=F(()=>i.value==="image-card"),y=()=>l.value.map(m=>u(ep,{clsPrefix:o.value,key:m.id,file:m,listType:i.value})),C=()=>p.value?u($h,Object.assign({},h.value),{default:y}):u(So,{group:!0},{default:y});return()=>{const{value:m}=o,{value:w}=n;return u("div",{class:[`${m}-upload-file-list`,p.value&&`${m}-upload-file-list--grid`,w?d==null?void 0:d.value:void 0],style:[w&&a?a.value:"",s.value]},C(),f.value&&!c.value&&p.value&&u(Ci,null,t))}}}),rp=H([P("upload","width: 100%;",[W("dragger-inside",[P("upload-trigger",`
display: block;
`)]),W("drag-over",[P("upload-dragger",`
border: var(--n-dragger-border-hover);
`)])]),P("upload-dragger",`
cursor: pointer;
box-sizing: border-box;
width: 100%;
text-align: center;
border-radius: var(--n-border-radius);
padding: 24px;
opacity: 1;
transition:
opacity .3s var(--n-bezier),
border-color .3s var(--n-bezier),
background-color .3s var(--n-bezier);
background-color: var(--n-dragger-color);
border: var(--n-dragger-border);
`,[H("&:hover",`
border: var(--n-dragger-border-hover);
`),W("disabled",`
cursor: not-allowed;
`)]),P("upload-trigger",`
display: inline-block;
box-sizing: border-box;
opacity: 1;
transition: opacity .3s var(--n-bezier);
`,[H("+",[P("upload-file-list","margin-top: 8px;")]),W("disabled",`
opacity: var(--n-item-disabled-opacity);
cursor: not-allowed;
`),W("image-card",`
width: 96px;
height: 96px;
`,[P("base-icon",`
font-size: 24px;
`),P("upload-dragger",`
padding: 0;
height: 100%;
width: 100%;
display: flex;
align-items: center;
justify-content: center;
`)])]),P("upload-file-list",`
line-height: var(--n-line-height);
opacity: 1;
transition: opacity .3s var(--n-bezier);
`,[H("a, img","outline: none;"),W("disabled",`
opacity: var(--n-item-disabled-opacity);
cursor: not-allowed;
`,[P("upload-file","cursor: not-allowed;")]),W("grid",`
display: grid;
grid-template-columns: repeat(auto-fill, 96px);
grid-gap: 8px;
margin-top: 0;
`),P("upload-file",`
display: block;
box-sizing: border-box;
cursor: default;
padding: 0px 12px 0 6px;
transition: background-color .3s var(--n-bezier);
border-radius: var(--n-border-radius);
`,[wn(),P("progress",[wn({foldPadding:!0})]),H("&:hover",`
background-color: var(--n-item-color-hover);
`,[P("upload-file-info",[L("action",`
opacity: 1;
`)])]),W("image-type",`
border-radius: var(--n-border-radius);
text-decoration: underline;
text-decoration-color: #0000;
`,[P("upload-file-info",`
padding-top: 0px;
padding-bottom: 0px;
width: 100%;
height: 100%;
display: flex;
justify-content: space-between;
align-items: center;
padding: 6px 0;
`,[P("progress",`
padding: 2px 0;
margin-bottom: 0;
`),L("name",`
padding: 0 8px;
`),L("thumbnail",`
width: 32px;
height: 32px;
font-size: 28px;
display: flex;
justify-content: center;
align-items: center;
`,[H("img",`
width: 100%;
`)])])]),W("text-type",[P("progress",`
box-sizing: border-box;
padding-bottom: 6px;
margin-bottom: 6px;
`)]),W("image-card-type",`
position: relative;
width: 96px;
height: 96px;
border: var(--n-item-border-image-card);
border-radius: var(--n-border-radius);
padding: 0;
display: flex;
align-items: center;
justify-content: center;
transition: border-color .3s var(--n-bezier), background-color .3s var(--n-bezier);
border-radius: var(--n-border-radius);
overflow: hidden;
`,[P("progress",`
position: absolute;
left: 8px;
bottom: 8px;
right: 8px;
width: unset;
`),P("upload-file-info",`
padding: 0;
width: 100%;
height: 100%;
`,[L("thumbnail",`
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: 36px;
`,[H("img",`
width: 100%;
`)])]),H("&::before",`
position: absolute;
z-index: 1;
left: 0;
right: 0;
top: 0;
bottom: 0;
border-radius: inherit;
opacity: 0;
transition: opacity .2s var(--n-bezier);
content: "";
`),H("&:hover",[H("&::before","opacity: 1;"),P("upload-file-info",[L("thumbnail","opacity: .12;")])])]),W("error-status",[H("&:hover",`
background-color: var(--n-item-color-hover-error);
`),P("upload-file-info",[L("name","color: var(--n-item-text-color-error);"),L("thumbnail","color: var(--n-item-text-color-error);")]),W("image-card-type",`
border: var(--n-item-border-image-card-error);
`)]),W("with-url",`
cursor: pointer;
`,[P("upload-file-info",[L("name",`
color: var(--n-item-text-color-success);
text-decoration-color: var(--n-item-text-color-success);
`,[H("a",`
text-decoration: underline;
`)])])]),P("upload-file-info",`
position: relative;
padding-top: 6px;
padding-bottom: 6px;
display: flex;
flex-wrap: nowrap;
`,[L("thumbnail",`
font-size: 18px;
opacity: 1;
transition: opacity .2s var(--n-bezier);
color: var(--n-item-icon-color);
`,[P("base-icon",`
margin-right: 2px;
vertical-align: middle;
transition: color .3s var(--n-bezier);
`)]),L("action",`
padding-top: inherit;
padding-bottom: inherit;
position: absolute;
right: 0;
top: 0;
bottom: 0;
width: 80px;
display: flex;
align-items: center;
transition: opacity .2s var(--n-bezier);
justify-content: flex-end;
opacity: 0;
`,[P("button",[H("&:not(:last-child)",{marginRight:"4px"}),P("base-icon",[H("svg",[po()])])]),W("image-type",`
position: relative;
max-width: 80px;
width: auto;
`),W("image-card-type",`
z-index: 2;
position: absolute;
width: 100%;
height: 100%;
left: 0;
right: 0;
bottom: 0;
top: 0;
display: flex;
justify-content: center;
align-items: center;
`)]),L("name",`
color: var(--n-item-text-color);
flex: 1;
display: flex;
justify-content: center;
text-overflow: ellipsis;
overflow: hidden;
flex-direction: column;
text-decoration-color: #0000;
font-size: var(--n-font-size);
transition:
color .3s var(--n-bezier),
text-decoration-color .3s var(--n-bezier);
`,[H("a",`
color: inherit;
text-decoration: underline;
`)])])])]),P("upload-file-input",`
display: block;
width: 0;
height: 0;
opacity: 0;
`)]);var Qn=globalThis&&globalThis.__awaiter||function(e,t,r,n){function o(i){return i instanceof r?i:new r(function(l){l(i)})}return new(r||(r=Promise))(function(i,l){function s(c){try{d(n.next(c))}catch(f){l(f)}}function a(c){try{d(n.throw(c))}catch(f){l(f)}}function d(c){c.done?i(c.value):o(c.value).then(s,a)}d((n=n.apply(e,t||[])).next())})};function np(e,t,r){const{doChange:n,xhrMap:o}=e;let i=0;function l(a){var d;let c=Object.assign({},t,{status:"error",percentage:i});o.delete(t.id),c=Rt(((d=e.onError)===null||d===void 0?void 0:d.call(e,{file:c,event:a}))||c),n(c,a)}function s(a){var d;if(e.isErrorState){if(e.isErrorState(r)){l(a);return}}else if(r.status<200||r.status>=300){l(a);return}let c=Object.assign({},t,{status:"finished",percentage:i});o.delete(t.id),c=Rt(((d=e.onFinish)===null||d===void 0?void 0:d.call(e,{file:c,event:a}))||c),n(c,a)}return{handleXHRLoad:s,handleXHRError:l,handleXHRAbort(a){const d=Object.assign({},t,{status:"removed",file:null,percentage:i});o.delete(t.id),n(d,a)},handleXHRProgress(a){const d=Object.assign({},t,{status:"uploading"});if(a.lengthComputable){const c=Math.ceil(a.loaded/a.total*100);d.percentage=c,i=c}n(d,a)}}}function op(e){const{inst:t,file:r,data:n,headers:o,withCredentials:i,action:l,customRequest:s}=e,{doChange:a}=e.inst;let d=0;s({file:r,data:n,headers:o,withCredentials:i,action:l,onProgress(c){const f=Object.assign({},r,{status:"uploading"}),h=c.percent;f.percentage=h,d=h,a(f)},onFinish(){var c;let f=Object.assign({},r,{status:"finished",percentage:d});f=Rt(((c=t.onFinish)===null||c===void 0?void 0:c.call(t,{file:f}))||f),a(f)},onError(){var c;let f=Object.assign({},r,{status:"error",percentage:d});f=Rt(((c=t.onError)===null||c===void 0?void 0:c.call(t,{file:f}))||f),a(f)}})}function ip(e,t,r){const n=np(e,t,r);r.onabort=n.handleXHRAbort,r.onerror=n.handleXHRError,r.onload=n.handleXHRLoad,r.upload&&(r.upload.onprogress=n.handleXHRProgress)}function Si(e,t){return typeof e=="function"?e({file:t}):e||{}}function ap(e,t,r){const n=Si(t,r);n&&Object.keys(n).forEach(o=>{e.setRequestHeader(o,n[o])})}function lp(e,t,r){const n=Si(t,r);n&&Object.keys(n).forEach(o=>{e.append(o,n[o])})}function sp(e,t,r,{method:n,action:o,withCredentials:i,responseType:l,headers:s,data:a}){const d=new XMLHttpRequest;d.responseType=l,e.xhrMap.set(r.id,d),d.withCredentials=i;const c=new FormData;if(lp(c,a,r),c.append(t,r.file),ip(e,r,d),o!==void 0){d.open(n.toUpperCase(),o),ap(d,s,r),d.send(c);const f=Object.assign({},r,{status:"uploading"});e.doChange(f)}}const dp=Object.assign(Object.assign({},re.props),{name:{type:String,default:"file"},accept:String,action:String,customRequest:Function,directory:Boolean,directoryDnd:{type:Boolean,default:void 0},method:{type:String,default:"POST"},multiple:Boolean,showFileList:{type:Boolean,default:!0},data:[Object,Function],headers:[Object,Function],withCredentials:Boolean,responseType:{type:String,default:""},disabled:{type:Boolean,default:void 0},onChange:Function,onRemove:Function,onFinish:Function,onError:Function,onBeforeUpload:Function,isErrorState:Function,onDownload:Function,defaultUpload:{type:Boolean,default:!0},fileList:Array,"onUpdate:fileList":[Function,Array],onUpdateFileList:[Function,Array],fileListStyle:[String,Object],defaultFileList:{type:Array,default:()=>[]},showCancelButton:{type:Boolean,default:!0},showRemoveButton:{type:Boolean,default:!0},showDownloadButton:Boolean,showRetryButton:{type:Boolean,default:!0},showPreviewButton:{type:Boolean,default:!0},listType:{type:String,default:"text"},onPreview:Function,shouldUseThumbnailUrl:{type:Function,default:e=>Uh?xi(e):!1},createThumbnailUrl:Function,abstract:Boolean,max:Number,showTrigger:{type:Boolean,default:!0},imageGroupProps:Object,inputProps:Object,triggerStyle:[String,Object],renderIcon:Object}),up=K({name:"Upload",props:dp,setup(e){e.abstract&&e.listType==="image-card"&&bt("upload","when the list-type is image-card, abstract is not supported.");const{mergedClsPrefixRef:t,inlineThemeDisabled:r}=Ie(e),n=re("Upload","-upload",rp,wh,e,t),o=mo(e),i=F(()=>{const{max:$}=e;return $!==void 0?p.value.length>=$:!1}),l=E(e.defaultFileList),s=Z(e,"fileList"),a=E(null),d={value:!1},c=E(!1),f=new Map,h=rr(s,l),p=F(()=>h.value.map(Rt));function y(){var $;($=a.value)===null||$===void 0||$.click()}function C($){const B=$.target;z(B.files?Array.from(B.files).map(R=>({file:R,entry:null,source:"input"})):null,$),B.value=""}function m($){const{"onUpdate:fileList":B,onUpdateFileList:R}=e;B&&ce(B,$),R&&ce(R,$),l.value=$}const w=F(()=>e.multiple||e.directory);function z($,B){if(!$||$.length===0)return;const{onBeforeUpload:R}=e;$=w.value?$:[$[0]];const{max:O,accept:I}=e;$=$.filter(({file:S,source:N})=>N==="dnd"&&(I!=null&&I.trim())?Gh(S.name,S.type,I):!0),O&&($=$.slice(0,O-p.value.length));const x=kr();Promise.all($.map(({file:S,entry:N})=>Qn(this,void 0,void 0,function*(){var D;const q={id:kr(),batchId:x,name:S.name,status:"pending",percentage:0,file:S,url:null,type:S.type,thumbnailUrl:null,fullPath:(D=N==null?void 0:N.fullPath)!==null&&D!==void 0?D:`/${S.webkitRelativePath||S.name}`};return!R||(yield R({file:q,fileList:p.value}))!==!1?q:null}))).then(S=>Qn(this,void 0,void 0,function*(){let N=Promise.resolve();return S.forEach(D=>{N=N.then(qt).then(()=>{D&&b(D,B,{append:!0})})}),yield N})).then(()=>{e.defaultUpload&&_()})}function _($){const{method:B,action:R,withCredentials:O,headers:I,data:x,name:S}=e,N=$!==void 0?p.value.filter(q=>q.id===$):p.value,D=$!==void 0;N.forEach(q=>{const{status:Q}=q;(Q==="pending"||Q==="error"&&D)&&(e.customRequest?op({inst:{doChange:b,xhrMap:f,onFinish:e.onFinish,onError:e.onError},file:q,action:R,withCredentials:O,headers:I,data:x,customRequest:e.customRequest}):sp({doChange:b,xhrMap:f,onFinish:e.onFinish,onError:e.onError,isErrorState:e.isErrorState},S,q,{method:B,action:R,withCredentials:O,responseType:e.responseType,headers:I,data:x}))})}const b=($,B,R={append:!1,remove:!1})=>{const{append:O,remove:I}=R,x=Array.from(p.value),S=x.findIndex(N=>N.id===$.id);if(O||I||~S){O?x.push($):I?x.splice(S,1):x.splice(S,1,$);const{onChange:N}=e;N&&N({file:$,fileList:x,event:B}),m(x)}};function g($){var B;if($.thumbnailUrl)return $.thumbnailUrl;const{createThumbnailUrl:R}=e;return R?(B=R($.file,$))!==null&&B!==void 0?B:$.url||"":$.url?$.url:$.file?Wh($.file):""}const M=F(()=>{const{common:{cubicBezierEaseInOut:$},self:{draggerColor:B,draggerBorder:R,draggerBorderHover:O,itemColorHover:I,itemColorHoverError:x,itemTextColorError:S,itemTextColorSuccess:N,itemTextColor:D,itemIconColor:q,itemDisabledOpacity:Q,lineHeight:ae,borderRadius:pe,fontSize:ve,itemBorderImageCardError:Re,itemBorderImageCard:oe}}=n.value;return{"--n-bezier":$,"--n-border-radius":pe,"--n-dragger-border":R,"--n-dragger-border-hover":O,"--n-dragger-color":B,"--n-font-size":ve,"--n-item-color-hover":I,"--n-item-color-hover-error":x,"--n-item-disabled-opacity":Q,"--n-item-icon-color":q,"--n-item-text-color":D,"--n-item-text-color-error":S,"--n-item-text-color-success":N,"--n-line-height":ae,"--n-item-border-image-card-error":Re,"--n-item-border-image-card":oe}}),k=r?Fe("upload",void 0,M,e):void 0;Pe(yt,{mergedClsPrefixRef:t,mergedThemeRef:n,showCancelButtonRef:Z(e,"showCancelButton"),showDownloadButtonRef:Z(e,"showDownloadButton"),showRemoveButtonRef:Z(e,"showRemoveButton"),showRetryButtonRef:Z(e,"showRetryButton"),onRemoveRef:Z(e,"onRemove"),onDownloadRef:Z(e,"onDownload"),mergedFileListRef:p,triggerStyleRef:Z(e,"triggerStyle"),shouldUseThumbnailUrlRef:Z(e,"shouldUseThumbnailUrl"),renderIconRef:Z(e,"renderIcon"),xhrMap:f,submit:_,doChange:b,showPreviewButtonRef:Z(e,"showPreviewButton"),onPreviewRef:Z(e,"onPreview"),getFileThumbnailUrlResolver:g,listTypeRef:Z(e,"listType"),dragOverRef:c,openOpenFileDialog:y,draggerInsideRef:d,handleFileAddition:z,mergedDisabledRef:o.mergedDisabledRef,maxReachedRef:i,fileListStyleRef:Z(e,"fileListStyle"),abstractRef:Z(e,"abstract"),acceptRef:Z(e,"accept"),cssVarsRef:r?void 0:M,themeClassRef:k==null?void 0:k.themeClass,onRender:k==null?void 0:k.onRender,showTriggerRef:Z(e,"showTrigger"),imageGroupPropsRef:Z(e,"imageGroupProps"),mergedDirectoryDndRef:F(()=>{var $;return($=e.directoryDnd)!==null&&$!==void 0?$:e.directory})});const A={clear:()=>{l.value=[]},submit:_,openOpenFileDialog:y};return Object.assign({mergedClsPrefix:t,draggerInsideRef:d,inputElRef:a,mergedTheme:n,dragOver:c,mergedMultiple:w,cssVars:r?void 0:M,themeClass:k==null?void 0:k.themeClass,onRender:k==null?void 0:k.onRender,handleFileInputChange:C},A)},render(){var e,t;const{draggerInsideRef:r,mergedClsPrefix:n,$slots:o,directory:i,onRender:l}=this;if(o.default&&!this.abstract){const a=o.default()[0];!((e=a==null?void 0:a.type)===null||e===void 0)&&e[bi]&&(r.value=!0)}const s=u("input",Object.assign({},this.inputProps,{ref:"inputElRef",type:"file",class:`${n}-upload-file-input`,accept:this.accept,multiple:this.mergedMultiple,onChange:this.handleFileInputChange,webkitdirectory:i||void 0,directory:i||void 0}));return this.abstract?u(De,null,(t=o.default)===null||t===void 0?void 0:t.call(o),u(vl,{to:"body"},s)):(l==null||l(),u("div",{class:[`${n}-upload`,r.value&&`${n}-upload--dragger-inside`,this.dragOver&&`${n}-upload--drag-over`,this.themeClass],style:this.cssVars},s,this.showTrigger&&this.listType!=="image-card"&&u(Ci,null,o),this.showFileList&&u(tp,null,o)))}}),eo="/web/assets/setting-c6ca7b14.svg";function cp(e){const t=document.cookie.match("(^|;) ?"+e+"=([^;]*)(;|$)");return t?t[2]:null}function fp(e,t,r=0,n="/",o=""){let i=e+"="+t+";path="+n;if(o&&(i+=";domain="+o),r>0){const l=new Date;l.setTime(l.getTime()+r*60*1e3),i+=";expires="+l.toUTCString()}document.cookie=i}const ct={get:cp,set:fp},Lt=gl("prompt-store",()=>{const e=E([{type:1,name:"ChatGPT 中文调教指南 - 简体",url:"./data/prompts/prompts-zh.json",refer:"https://github.com/PlexPt/awesome-chatgpt-prompts-zh"},{type:1,name:"ChatGPT 中文调教指南 - 繁体",url:"./data/prompts/prompts-zh-TW.json",refer:"https://github.com/PlexPt/awesome-chatgpt-prompts-zh"},{type:1,name:"Awesome ChatGPT Prompts",url:"./data/prompts/prompts.csv",refer:"https://github.com/f/awesome-chatgpt-prompts"},{type:2,name:"",url:"",refer:""}]),t=E(!1),r=E(!1),n=E([]),o=E(""),i=E(0),l=E({isShow:!1,newPrompt:{act:"",prompt:""}}),s=F(()=>{var d;return o.value?(d=n.value)==null?void 0:d.filter(c=>c.act.includes(o.value)||c.prompt.includes(o.value)):n.value});function a(d){if(d instanceof Array&&d.every(c=>c.act&&c.prompt)){if(n.value.length===0)return n.value.push(...d),{result:!0,data:{successCount:d.length}};const c=d.filter(f=>{var h;return(h=n.value)==null?void 0:h.every(p=>f.act!==p.act&&f.prompt!==p.prompt)});return n.value.push(...c),{result:!0,data:{successCount:c.length}}}else return{result:!1,msg:"提示词格式有误"}}return{promptDownloadConfig:e,isShowPromptSotre:t,isShowChatPrompt:r,promptList:n,keyword:o,searchPromptList:s,selectedPromptIndex:i,optPromptConfig:l,addPrompt:a}},{persist:{key:"prompt-store",storage:localStorage,paths:["promptList"]}}),hp=["href"],pp={key:1},vp=K({__name:"ChatNavItem",props:{navConfig:{}},setup(e){return(t,r)=>t.navConfig.url?(me(),Ae("a",{key:0,href:t.navConfig.url,target:"_blank",rel:"noopener noreferrer"},at(t.navConfig.label),9,hp)):(me(),Ae("div",pp,at(t.navConfig.label),1))}}),gp=()=>/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),mp=e=>new Promise((t,r)=>setTimeout(t,e)),bp=Ue("div",{class:"text-3xl py-2"},"设置用户",-1),yp=Ue("div",{class:"text-xl py-2"},"将删除包括 Cookie 等的所有缓存?",-1),Sr="_U",wp="BingAI_Rand_IP",xp=K({__name:"ChatNav",setup(e){const t=E(!1),r=E(!1),n=E(""),o=rn(),i=Lt(),{isShowPromptSotre:l}=Mt(i),s=E(!1),a={github:"github",setToken:"setToken",compose:"compose",promptStore:"promptStore",reset:"reset",version:"version"},d=[{key:a.github,label:"开源地址",url:"https://github.com/adams549659584/go-proxy-bingai"},{key:a.version,label:"版本信息"},{key:a.promptStore,label:"提示词库"},{key:a.setToken,label:"设置用户"},{key:a.compose,label:"撰写文章",url:"/web/compose.html"},{key:a.reset,label:"一键重置"}],c=C=>u(vp,{navConfig:C}),f=C=>{switch(C){case a.version:o.success("当前版本号为1.6.8");break;case a.promptStore:l.value=!0;break;case a.setToken:n.value=ct.get(Sr)||"",r.value=!0;break;case a.reset:s.value=!0;break}},h=async()=>{s.value=!1,ct.set(Sr,"",-1),ct.set(wp,"",-1),await y(),o.success("清理完成"),window.location.reload()},p=()=>{if(!n.value){o.warning("请先填入用户 Cookie");return}ct.set(Sr,n.value,7*24*60,"/"),r.value=!1},y=async()=>{localStorage.clear(),sessionStorage.clear();const C=await caches.keys();for(const m of C)await caches.open(m).then(async w=>{const z=await w.keys();return await Promise.all(z.map(_=>(console.log("del cache : ",_.url),w.delete(_))))})};return(C,m)=>(me(),Ae(De,null,[U(gp)()?(me(),je(U(Xn),{key:0,class:"select-none",show:t.value,options:d,"render-label":c,onSelect:f},{default:J(()=>[X(U(Br),{class:"fixed top-6 right-4 cursor-pointer",src:U(eo),alt:"设置菜单","preview-disabled":!0,onClick:m[0]||(m[0]=w=>t.value=!t.value)},null,8,["src"])]),_:1},8,["show"])):(me(),je(U(Xn),{key:1,class:"select-none",trigger:"hover",options:d,"render-label":c,onSelect:f},{default:J(()=>[X(U(Br),{class:"fixed top-6 right-6 cursor-pointer",src:U(eo),alt:"设置菜单","preview-disabled":!0},null,8,["src"])]),_:1})),X(U(zt),{show:r.value,"onUpdate:show":m[3]||(m[3]=w=>r.value=w),preset:"dialog","show-icon":!1},{header:J(()=>[bp]),action:J(()=>[X(U(be),{size:"large",onClick:m[2]||(m[2]=w=>r.value=!1)},{default:J(()=>[he("取消")]),_:1}),X(U(be),{ghost:"",size:"large",type:"info",onClick:p},{default:J(()=>[he("保存")]),_:1})]),default:J(()=>[X(U(kt),{size:"large",value:n.value,"onUpdate:value":m[1]||(m[1]=w=>n.value=w),type:"text",placeholder:"用户 Cookie ,仅需要 _U 的值"},null,8,["value"])]),_:1},8,["show"]),X(U(zt),{show:s.value,"onUpdate:show":m[5]||(m[5]=w=>s.value=w),preset:"dialog","show-icon":!1},{header:J(()=>[yp]),action:J(()=>[X(U(be),{size:"large",onClick:m[4]||(m[4]=w=>s.value=!1)},{default:J(()=>[he("取消")]),_:1}),X(U(be),{ghost:"",size:"large",type:"error",onClick:h},{default:J(()=>[he("确定")]),_:1})]),_:1},8,["show"])],64))}});function to(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Vt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?to(Object(r),!0).forEach(function(n){Pp(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):to(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Cp(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ro(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Sp(e,t,r){return t&&ro(e.prototype,t),r&&ro(e,r),e}function Pp(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function kp(e){return $p(e)||zp(e)||Tp(e)||Ip()}function $p(e){if(Array.isArray(e))return Mr(e)}function zp(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Tp(e,t){if(e){if(typeof e=="string")return Mr(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Mr(e,t)}}function Mr(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Ip(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var dt={FRONT:"FRONT",BEHIND:"BEHIND"},nt={INIT:"INIT",FIXED:"FIXED",DYNAMIC:"DYNAMIC"},no=2,Rp=function(){function e(t,r){Cp(this,e),this.init(t,r)}return Sp(e,[{key:"init",value:function(r,n){this.param=r,this.callUpdate=n,this.sizes=new Map,this.firstRangeTotalSize=0,this.firstRangeAverageSize=0,this.lastCalcIndex=0,this.fixedSizeValue=0,this.calcType=nt.INIT,this.offset=0,this.direction="",this.range=Object.create(null),r&&this.checkRange(0,r.keeps-1)}},{key:"destroy",value:function(){this.init(null,null)}},{key:"getRange",value:function(){var r=Object.create(null);return r.start=this.range.start,r.end=this.range.end,r.padFront=this.range.padFront,r.padBehind=this.range.padBehind,r}},{key:"isBehind",value:function(){return this.direction===dt.BEHIND}},{key:"isFront",value:function(){return this.direction===dt.FRONT}},{key:"getOffset",value:function(r){return(r<1?0:this.getIndexOffset(r))+this.param.slotHeaderSize}},{key:"updateParam",value:function(r,n){var o=this;this.param&&r in this.param&&(r==="uniqueIds"&&this.sizes.forEach(function(i,l){n.includes(l)||o.sizes.delete(l)}),this.param[r]=n)}},{key:"saveSize",value:function(r,n){this.sizes.set(r,n),this.calcType===nt.INIT?(this.fixedSizeValue=n,this.calcType=nt.FIXED):this.calcType===nt.FIXED&&this.fixedSizeValue!==n&&(this.calcType=nt.DYNAMIC,delete this.fixedSizeValue),this.calcType!==nt.FIXED&&typeof this.firstRangeTotalSize<"u"&&(this.sizes.size<Math.min(this.param.keeps,this.param.uniqueIds.length)?(this.firstRangeTotalSize=kp(this.sizes.values()).reduce(function(o,i){return o+i},0),this.firstRangeAverageSize=Math.round(this.firstRangeTotalSize/this.sizes.size)):delete this.firstRangeTotalSize)}},{key:"handleDataSourcesChange",value:function(){var r=this.range.start;this.isFront()?r=r-no:this.isBehind()&&(r=r+no),r=Math.max(r,0),this.updateRange(this.range.start,this.getEndByStart(r))}},{key:"handleSlotSizeChange",value:function(){this.handleDataSourcesChange()}},{key:"handleScroll",value:function(r){this.direction=r<this.offset?dt.FRONT:dt.BEHIND,this.offset=r,this.param&&(this.direction===dt.FRONT?this.handleFront():this.direction===dt.BEHIND&&this.handleBehind())}},{key:"handleFront",value:function(){var r=this.getScrollOvers();if(!(r>this.range.start)){var n=Math.max(r-this.param.buffer,0);this.checkRange(n,this.getEndByStart(n))}}},{key:"handleBehind",value:function(){var r=this.getScrollOvers();r<this.range.start+this.param.buffer||this.checkRange(r,this.getEndByStart(r))}},{key:"getScrollOvers",value:function(){var r=this.offset-this.param.slotHeaderSize;if(r<=0)return 0;if(this.isFixedType())return Math.floor(r/this.fixedSizeValue);for(var n=0,o=0,i=0,l=this.param.uniqueIds.length;n<=l;){if(o=n+Math.floor((l-n)/2),i=this.getIndexOffset(o),i===r)return o;i<r?n=o+1:i>r&&(l=o-1)}return n>0?--n:0}},{key:"getIndexOffset",value:function(r){if(!r)return 0;for(var n=0,o=0,i=0;i<r;i++)o=this.sizes.get(this.param.uniqueIds[i]),n=n+(typeof o=="number"?o:this.getEstimateSize());return this.lastCalcIndex=Math.max(this.lastCalcIndex,r-1),this.lastCalcIndex=Math.min(this.lastCalcIndex,this.getLastIndex()),n}},{key:"isFixedType",value:function(){return this.calcType===nt.FIXED}},{key:"getLastIndex",value:function(){return this.param.uniqueIds.length-1}},{key:"checkRange",value:function(r,n){var o=this.param.keeps,i=this.param.uniqueIds.length;i<=o?(r=0,n=this.getLastIndex()):n-r<o-1&&(r=n-o+1),this.range.start!==r&&this.updateRange(r,n)}},{key:"updateRange",value:function(r,n){this.range.start=r,this.range.end=n,this.range.padFront=this.getPadFront(),this.range.padBehind=this.getPadBehind(),this.callUpdate(this.getRange())}},{key:"getEndByStart",value:function(r){var n=r+this.param.keeps-1,o=Math.min(n,this.getLastIndex());return o}},{key:"getPadFront",value:function(){return this.isFixedType()?this.fixedSizeValue*this.range.start:this.getIndexOffset(this.range.start)}},{key:"getPadBehind",value:function(){var r=this.range.end,n=this.getLastIndex();return this.isFixedType()?(n-r)*this.fixedSizeValue:this.lastCalcIndex===n?this.getIndexOffset(n)-this.getIndexOffset(r):(n-r)*this.getEstimateSize()}},{key:"getEstimateSize",value:function(){return this.isFixedType()?this.fixedSizeValue:this.firstRangeAverageSize||this.param.estimateSize}}]),e}(),_p={dataKey:{type:[String,Function],required:!0},dataSources:{type:Array,required:!0,default:function(){return[]}},dataComponent:{type:[Object,Function],required:!0},keeps:{type:Number,default:30},extraProps:{type:Object},estimateSize:{type:Number,default:50},direction:{type:String,default:"vertical"},start:{type:Number,default:0},offset:{type:Number,default:0},topThreshold:{type:Number,default:0},bottomThreshold:{type:Number,default:0},pageMode:{type:Boolean,default:!1},rootTag:{type:String,default:"div"},wrapTag:{type:String,default:"div"},wrapClass:{type:String,default:"wrap"},wrapStyle:{type:Object},itemTag:{type:String,default:"div"},itemClass:{type:String,default:""},itemClassAdd:{type:Function},itemStyle:{type:Object},headerTag:{type:String,default:"div"},headerClass:{type:String,default:""},headerStyle:{type:Object},footerTag:{type:String,default:"div"},footerClass:{type:String,default:""},footerStyle:{type:Object},itemScopedSlots:{type:Object}},Op={index:{type:Number},event:{type:String},tag:{type:String},horizontal:{type:Boolean},source:{type:Object},component:{type:[Object,Function]},uniqueKey:{type:[String,Number]},extraProps:{type:Object},scopedSlots:{type:Object}},Bp={event:{type:String},uniqueKey:{type:String},tag:{type:String},horizontal:{type:Boolean}},Pi=function(t,r,n){var o=null,i=F(function(){return t.horizontal?"offsetWidth":"offsetHeight"}),l=function(){return r.value?r.value[i.value]:0},s=function(){var d=t.event,c=t.uniqueKey,f=t.hasInitial;n(d,c,l(),f)};We(function(){typeof ResizeObserver<"u"&&(o=new ResizeObserver(function(){s()}),r.value&&o.observe(r.value))}),bl(function(){s()}),Po(function(){o&&(o.disconnect(),o=null)})},Mp=K({name:"VirtualListItem",props:Op,emits:["itemResize"],setup:function(t,r){var n=r.emit,o=E(null);return Pi(t,o,n),function(){var i=t.tag,l=t.component,s=t.extraProps,a=s===void 0?{}:s,d=t.index,c=t.source,f=t.scopedSlots,h=f===void 0?{}:f,p=t.uniqueKey,y=Vt(Vt({},a),{},{source:c,index:d});return X(i,{key:p,ref:o},{default:function(){return[X(l,Vt(Vt({},y),{},{scopedSlots:h}),null)]}})}}}),oo=K({name:"VirtualListSlot",props:Bp,emits:["slotResize"],setup:function(t,r){var n=r.slots,o=r.emit,i=E(null);return Pi(t,i,o),function(){var l,s=t.tag,a=t.uniqueKey;return X(s,{ref:i,key:a},{default:function(){return[(l=n.default)===null||l===void 0?void 0:l.call(n)]}})}}}),It;(function(e){e.ITEM="itemResize",e.SLOT="slotResize"})(It||(It={}));var ft;(function(e){e.HEADER="thead",e.FOOTER="tfoot"})(ft||(ft={}));var ki=K({name:"VirtualList",props:_p,setup:function(t,r){var n=r.emit,o=r.slots,i=r.expose,l=t.direction==="horizontal",s=l?"scrollLeft":"scrollTop",a=E(null),d=E(),c=E(null),f;Ce(function(){return t.dataSources.length},function(){f.updateParam("uniqueIds",z()),f.handleDataSourcesChange()}),Ce(function(){return t.keeps},function(I){f.updateParam("keeps",I),f.handleSlotSizeChange()}),Ce(function(){return t.start},function(I){g(I)}),Ce(function(){return t.offset},function(I){return M(I)});var h=function(x){return f.sizes.get(x)},p=function(){return t.pageMode?document.documentElement[s]||document.body[s]:d.value?Math.ceil(d.value[s]):0},y=function(){var x=l?"clientWidth":"clientHeight";return t.pageMode?document.documentElement[x]||document.body[x]:d.value?Math.ceil(d.value[x]):0},C=function(){var x=l?"scrollWidth":"scrollHeight";return t.pageMode?document.documentElement[x]||document.body[x]:d.value?Math.ceil(d.value[x]):0},m=function(x,S,N,D){n("scroll",D,f.getRange()),f.isFront()&&t.dataSources.length&&x-t.topThreshold<=0?n("totop"):f.isBehind()&&x+S+t.bottomThreshold>=N&&n("tobottom")},w=function(x){var S=p(),N=y(),D=C();S<0||S+N>D+1||!D||(f.handleScroll(S),m(S,N,D,x))},z=function(){var x=t.dataKey,S=t.dataSources,N=S===void 0?[]:S;return N.map(function(D){return typeof x=="function"?x(D):D[x]})},_=function(x){a.value=x},b=function(){f=new Rp({slotHeaderSize:0,slotFooterSize:0,keeps:t.keeps,estimateSize:t.estimateSize,buffer:Math.round(t.keeps/3),uniqueIds:z()},_),a.value=f.getRange()},g=function(x){if(x>=t.dataSources.length-1)B();else{var S=f.getOffset(x);M(S)}},M=function(x){t.pageMode?(document.body[s]=x,document.documentElement[s]=x):d.value&&(d.value[s]=x)},k=function(){for(var x=[],S=a.value,N=S.start,D=S.end,q=t.dataSources,Q=t.dataKey,ae=t.itemClass,pe=t.itemTag,ve=t.itemStyle,Re=t.extraProps,oe=t.dataComponent,ke=t.itemScopedSlots,we=N;we<=D;we++){var ee=q[we];if(ee){var Le=typeof Q=="function"?Q(ee):ee[Q];typeof Le=="string"||typeof Le=="number"?x.push(X(Mp,{index:we,tag:pe,event:It.ITEM,horizontal:l,uniqueKey:Le,source:ee,extraProps:Re,component:oe,scopedSlots:ke,style:ve,class:"".concat(ae).concat(t.itemClassAdd?" "+t.itemClassAdd(we):""),onItemResize:A},null)):console.warn("Cannot get the data-key '".concat(Q,"' from data-sources."))}else console.warn("Cannot get the index '".concat(we,"' from data-sources."))}return x},A=function(x,S){f.saveSize(x,S),n("resized",x,S)},$=function(x,S,N){x===ft.HEADER?f.updateParam("slotHeaderSize",S):x===ft.FOOTER&&f.updateParam("slotFooterSize",S),N&&f.handleSlotSizeChange()},B=function I(){if(c.value){var x=c.value[l?"offsetLeft":"offsetTop"];M(x),setTimeout(function(){p()+y()<C()&&I()},3)}},R=function(){if(d.value){var x=d.value.getBoundingClientRect(),S=d.value.ownerDocument.defaultView,N=l?x.left+S.pageXOffset:x.top+S.pageYOffset;f.updateParam("slotHeaderSize",N)}},O=function(){return f.sizes.size};return io(function(){b()}),ml(function(){M(f.offset)}),We(function(){t.start?g(t.start):t.offset&&M(t.offset),t.pageMode&&(R(),document.addEventListener("scroll",w,{passive:!1}))}),Po(function(){f.destroy(),t.pageMode&&document.removeEventListener("scroll",w)}),i({scrollToBottom:B,getSizes:O,getSize:h,getOffset:p,getScrollSize:C,getClientSize:y,scrollToOffset:M,scrollToIndex:g}),function(){var I=t.pageMode,x=t.rootTag,S=t.wrapTag,N=t.wrapClass,D=t.wrapStyle,q=t.headerTag,Q=t.headerClass,ae=t.headerStyle,pe=t.footerTag,ve=t.footerClass,Re=t.footerStyle,oe=a.value,ke=oe.padFront,we=oe.padBehind,ee={padding:l?"0px ".concat(we,"px 0px ").concat(ke,"px"):"".concat(ke,"px 0px ").concat(we,"px")},Le=D?Object.assign({},D,ee):ee,qe=o.header,Ge=o.footer;return X(x,{ref:d,onScroll:!I&&w},{default:function(){return[qe&&X(oo,{class:Q,style:ae,tag:q,event:It.SLOT,uniqueKey:ft.HEADER,onSlotResize:$},{default:function(){return[qe()]}}),X(S,{class:N,style:Le},{default:function(){return[k()]}}),Ge&&X(oo,{class:ve,style:Re,tag:pe,event:It.SLOT,uniqueKey:ft.FOOTER,onSlotResize:$},{default:function(){return[Ge()]}}),X("div",{ref:c,style:{width:l?"0px":"100%",height:l?"100%":"0px"}},null)]}})}}});const Lp={class:"float-right"},Ep=K({__name:"ChatPromptItem",props:{index:{},source:{}},setup(e){const t=rn(),r=Lt(),{promptList:n,optPromptConfig:o}=Mt(r),i=s=>{n.value=n.value.filter(a=>a.act!==s.act&&a.prompt!==s.prompt),t.success("删除提示词成功")},l=s=>{o.value.isShow=!0,o.value.type="edit",o.value.title="编辑提示词",o.value.tmpPrompt=s,o.value.newPrompt={...s}};return(s,a)=>(me(),je(U(mi),{class:"hover:bg-gray-100 cursor-pointer p-5"},{description:J(()=>[X(U(oi),{class:"max-w-[150px] xl:max-w-[680px] overflow-ellipsis overflow-hidden",type:"info"},{default:J(()=>[he(at(s.source.act),1)]),_:1}),Ue("div",Lp,[X(U(be),{secondary:"",type:"info",size:"small",onClick:a[0]||(a[0]=d=>l(s.source))},{default:J(()=>[he("编辑")]),_:1}),X(U(be),{secondary:"",class:"ml-2",type:"error",size:"small",onClick:a[1]||(a[1]=d=>i(s.source))},{default:J(()=>[he("删除")]),_:1})])]),default:J(()=>[X(U(li),{tooltip:!1,"line-clamp":2},{default:J(()=>[he(at(s.source.prompt),1)]),_:1})]),_:1}))}}),Ap={class:"flex justify-start flex-wrap gap-2 px-5 pb-2"},Dp=["href"],Fp={class:"flex justify-center gap-5"},Np=["href"],Hp=K({__name:"ChatPromptStore",setup(e){const t=rn(),r=Lt(),{promptDownloadConfig:n,isShowPromptSotre:o,promptList:i,keyword:l,searchPromptList:s,optPromptConfig:a}=Mt(r),d=E(!1),c=E(!1),f=E(!1),h=()=>{a.value.isShow=!0,a.value.type="add",a.value.title="添加提示词",a.value.newPrompt={act:"",prompt:""}},p=()=>{const{type:_,tmpPrompt:b,newPrompt:g}=a.value;if(!g.act)return t.error("提示词标题不能为空");if(!g.prompt)return t.error("提示词描述不能为空");if(_==="add")i.value=[g,...i.value],t.success("添加提示词成功");else if(_==="edit"){if(g.act===(b==null?void 0:b.act)&&g.prompt===(b==null?void 0:b.prompt)){t.warning("提示词未变更"),a.value.isShow=!1;return}const M=i.value.findIndex(k=>k.act===(b==null?void 0:b.act)&&k.prompt===(b==null?void 0:b.prompt));M>-1?(i.value[M]=g,t.success("编辑提示词成功")):t.error("编辑提示词出错")}a.value.isShow=!1},y=_=>new Promise((b,g)=>{const M=new FileReader;M.onload=function(k){var A;b((A=k.target)==null?void 0:A.result)},M.onerror=g,M.readAsText(_)}),C=async _=>{var b;if(_.file.file){c.value=!0;const g=await y(_.file.file),M=JSON.parse(g),k=r.addPrompt(M);k.result?(t.info(`上传文件含 ${M.length} 条数据`),t.success(`成功导入 ${(b=k.data)==null?void 0:b.successCount} 条有效数据`)):t.error(k.msg||"提示词格式有误"),c.value=!1}else t.error("上传文件有误")},m=()=>{if(i.value.length===0)return t.error("暂无可导出的提示词数据");f.value=!0;const _=JSON.stringify(i.value),b=new Blob([_],{type:"application/json"}),g=URL.createObjectURL(b),M=document.createElement("a");M.href=g,M.download="BingAIPrompts.json",M.click(),URL.revokeObjectURL(g),t.success("导出提示词库成功"),f.value=!1},w=()=>{i.value=[],t.success("清空提示词库成功")},z=async _=>{var M;if(!_.url)return t.error("请先输入下载链接");_.isDownloading=!0;let b;if(_.url.endsWith(".json"))b=await fetch(_.url).then(k=>k.json());else if(_.url.endsWith(".csv")){const k=await fetch(_.url).then(A=>A.text());console.log(k),b=k.split(`
`).filter(A=>A).map(A=>{var B;const $=A.split('","');return{act:$[0].slice(1),prompt:(B=$[1])==null?void 0:B.slice(1)}}),b.shift()}else return _.isDownloading=!1,t.error("暂不支持下载此后缀的提示词");_.isDownloading=!1;const g=r.addPrompt(b);g.result?(t.info(`下载文件含 ${b.length} 条数据`),t.success(`成功导入 ${(M=g.data)==null?void 0:M.successCount} 条有效数据`)):t.error(g.msg||"提示词格式有误")};return(_,b)=>(me(),Ae(De,null,[X(U(zt),{class:"w-11/12 xl:w-[900px]",show:U(o),"onUpdate:show":b[3]||(b[3]=g=>xn(o)?o.value=g:null),preset:"card",title:"提示词库"},{default:J(()=>[Ue("div",Ap,[X(U(kt),{class:"basis-full xl:basis-0 xl:min-w-[300px]",placeholder:"搜索提示词",value:U(l),"onUpdate:value":b[0]||(b[0]=g=>xn(l)?l.value=g:null),clearable:!0},null,8,["value"]),X(U(be),{secondary:"",type:"info",onClick:b[1]||(b[1]=g=>d.value=!0)},{default:J(()=>[he("下载")]),_:1}),X(U(be),{secondary:"",type:"info",onClick:h},{default:J(()=>[he("添加")]),_:1}),X(U(up),{class:"w-auto",accept:".json","default-upload":!1,"show-file-list":!1,onChange:C},{default:J(()=>[X(U(be),{secondary:"",type:"success",loading:c.value},{default:J(()=>[he("导入")]),_:1},8,["loading"])]),_:1}),X(U(be),{secondary:"",type:"success",onClick:m,loading:f.value},{default:J(()=>[he("导出")]),_:1},8,["loading"]),X(U(be),{secondary:"",type:"error",onClick:w},{default:J(()=>[he("清空")]),_:1})]),U(s).length>0?(me(),je(U(ki),{key:0,class:"h-[40vh] xl:h-[60vh] overflow-y-auto","data-key":"prompt","data-sources":U(s),"data-component":Ep,keeps:10},null,8,["data-sources"])):(me(),je(U(ei),{key:1,class:"h-[60vh] flex justify-center items-center",description:"暂无数据"},{extra:J(()=>[X(U(be),{secondary:"",type:"info",onClick:b[2]||(b[2]=g=>d.value=!0)},{default:J(()=>[he("下载提示词")]),_:1})]),_:1}))]),_:1},8,["show"]),X(U(zt),{class:"w-11/12 xl:w-[600px]",show:U(a).isShow,"onUpdate:show":b[6]||(b[6]=g=>U(a).isShow=g),preset:"card",title:U(a).title},{default:J(()=>[X(U(lh),{vertical:""},{default:J(()=>[he(" 标题 "),X(U(kt),{placeholder:"请输入标题",value:U(a).newPrompt.act,"onUpdate:value":b[4]||(b[4]=g=>U(a).newPrompt.act=g)},null,8,["value"]),he(" 描述 "),X(U(kt),{placeholder:"请输入描述",type:"textarea",value:U(a).newPrompt.prompt,"onUpdate:value":b[5]||(b[5]=g=>U(a).newPrompt.prompt=g)},null,8,["value"]),X(U(be),{block:"",secondary:"",type:"info",onClick:p},{default:J(()=>[he("保存")]),_:1})]),_:1})]),_:1},8,["show","title"]),X(U(zt),{class:"w-11/12 xl:w-[600px]",show:d.value,"onUpdate:show":b[7]||(b[7]=g=>d.value=g),preset:"card",title:"下载提示词"},{default:J(()=>[X(U(Rh),{class:"overflow-y-auto rounded-lg",hoverable:"",clickable:""},{default:J(()=>[(me(!0),Ae(De,null,yl(U(n),(g,M)=>(me(),je(U(_h),{key:M},{suffix:J(()=>[Ue("div",Fp,[g.type===1?(me(),Ae("a",{key:0,class:"no-underline",href:g.refer,target:"_blank",rel:"noopener noreferrer"},[X(U(be),{secondary:""},{default:J(()=>[he("来源")]),_:1})],8,Np)):Xt("",!0),X(U(be),{secondary:"",type:"info",onClick:k=>z(g),loading:g.isDownloading},{default:J(()=>[he("下载")]),_:2},1032,["onClick","loading"])])]),default:J(()=>[g.type===1?(me(),Ae("a",{key:0,class:"no-underline text-blue-500",href:g.url,target:"_blank",rel:"noopener noreferrer"},at(g.name),9,Dp)):g.type===2?(me(),je(U(kt),{key:1,placeholder:"请输入下载链接,支持 json 及 csv ",value:g.url,"onUpdate:value":k=>g.url=k},null,8,["value","onUpdate:value"])):Xt("",!0)]),_:2},1024))),128))]),_:1})]),_:1},8,["show"])],64))}}),jp=`/* 移除顶部背景遮挡 */\r
.scroller>.top {\r
display: none !important;\r
}\r
\r
/* 移除顶部边距 */\r
.scroller>.scroller-positioner>.content {\r
padding-top: 0 !important;\r
}\r
\r
/* 聊天记录 */\r
.scroller .side-panel {\r
position: fixed;\r
right: 10px;\r
}`,Wp=K({__name:"ChatPromptItem",props:{index:{},source:{}},setup(e){const t=Lt(),{selectedPromptIndex:r,isShowChatPrompt:n,keyword:o}=Mt(t),i=l=>{l&&(o.value="",CIB.vm.actionBar.inputText=l.prompt,CIB.vm.actionBar.input.focus(),n.value=!1)};return(l,s)=>(me(),je(U(mi),{class:Vr(["hover:bg-gray-100 cursor-pointer px-5 h-[130px] flex justify-start items-center",{"bg-gray-100":l.index===U(r)}]),onClick:s[0]||(s[0]=a=>i(l.source))},{description:J(()=>[X(U(oi),{type:"info"},{default:J(()=>[he(at(l.source.act),1)]),_:1})]),default:J(()=>[X(U(li),{tooltip:!1,"line-clamp":2},{default:J(()=>[he(at(l.source.prompt),1)]),_:1})]),_:1},8,["class"]))}}),nn=e=>(wl("data-v-aff729bc"),e=e(),xl(),e),Up=nn(()=>Ue("div",{class:"bounce1"},null,-1)),Vp=nn(()=>Ue("div",{class:"bounce2"},null,-1)),Kp=nn(()=>Ue("div",{class:"bounce3"},null,-1)),qp=[Up,Vp,Kp],Gp=K({__name:"LoadingSpinner",props:{isShow:{type:Boolean}},setup(e){const t=E(!1),r=E();return We(()=>{r.value&&r.value.addEventListener("transitionend",()=>{t.value=!0})}),(n,o)=>t.value?Xt("",!0):(me(),Ae("div",{key:0,ref_key:"loadingRef",ref:r,class:Vr(["loading-spinner",{hidden:!n.isShow}])},qp,2))}});const Xp=(e,t)=>{const r=e.__vccOpts||e;for(const[n,o]of t)r[n]=o;return r},Yp=Xp(Gp,[["__scopeId","data-v-aff729bc"]]),Zp=Ue("div",{class:"w-0 md:w-[60px]"},null,-1),Jp=10,Qp="_U",ev="BingAI_Rand_IP",tv=130,rv=K({__name:"ChatPrompt",setup(e){const t=E(!0),r=Lt(),{isShowPromptSotre:n,isShowChatPrompt:o,keyword:i,promptList:l,searchPromptList:s,selectedPromptIndex:a}=Mt(r),d=E(),c=E(!1),f=E(!1),h=F(()=>CIB.vm.isMobile&&CIB.vm.sidePanel.isVisibleMobile||!CIB.vm.isMobile&&CIB.vm.sidePanel.isVisibleDesktop);We(async()=>{await p(),y(),SydneyFullScreenConv.initWithWaitlistUpdate({cookLoc:{}},10),t.value=!1,w(),z()});const p=async()=>new Promise((R,O)=>{sj_evt.bind("sydFSC.init",R,!0),sj_evt.fire("showSydFSC")}),y=()=>{ct.get(Qp)||(CIB.config.features.enableGetChats=!1,CIB.vm.sidePanel.isVisibleMobile=!1,CIB.vm.sidePanel.isVisibleDesktop=!1,m())},C=()=>{const R=new Date;return R.setMinutes(R.getMinutes()+CIB.config.sydney.expiryInMinutes),R},m=async(R=0)=>{var I;if(R>=Jp){console.log(`已重试 ${R} 次,自动创建停止`);return}const O=await fetch("/turing/conversation/create",{credentials:"include"}).then(x=>x.json()).catch(x=>"error");((I=O==null?void 0:O.result)==null?void 0:I.value)==="Success"?(console.log("成功创建会话ID : ",O.conversationId),CIB.manager.conversation.updateId(O.conversationId,C(),O.clientId,O.conversationSignature)):(await mp(300),R+=1,console.log(`开始第 ${R} 次重试创建会话ID`),ct.set(ev,"",-1),m(R))},w=()=>{var x,S,N,D,q,Q,ae,pe;location.hostname==="localhost"&&(CIB.config.sydney.hostnamesToBypassSecureConnection=CIB.config.sydney.hostnamesToBypassSecureConnection.filter(ve=>ve!==location.hostname));const R=document.querySelector("cib-serp");R==null||R.setAttribute("alignment","center");const O=(x=R==null?void 0:R.shadowRoot)==null?void 0:x.querySelector("cib-conversation");(q=(D=(N=(S=O==null?void 0:O.shadowRoot)==null?void 0:S.querySelector("cib-welcome-container"))==null?void 0:N.shadowRoot)==null?void 0:D.querySelector(".learn-tog-item"))==null||q.remove(),(ae=(Q=R==null?void 0:R.shadowRoot)==null?void 0:Q.querySelector("cib-serp-feedback"))==null||ae.remove();const I=document.createElement("style");I.innerText=jp,(pe=O.shadowRoot)==null||pe.append(I)},z=()=>{var I,x;const R=(x=(I=document.querySelector("#b_sydConvCont > cib-serp"))==null?void 0:I.shadowRoot)==null?void 0:x.querySelector("#cib-action-bar-main"),O=R.handleInputTextKey;R.handleInputTextKey=function(S){if(!(S.key==="Enter"&&o.value))return O.apply(this,[S])},CIB.vm.actionBar.input.addEventListener("compositionstart",_),CIB.vm.actionBar.input.addEventListener("compositionend",b),CIB.vm.actionBar.input.addEventListener("change",g),CIB.vm.actionBar.input.addEventListener("input",g),CIB.vm.actionBar.input.addEventListener("keydown",A),CIB.vm.actionBar.input.addEventListener("focus",M),CIB.vm.actionBar.input.addEventListener("blur",k)},_=R=>{c.value=!0},b=R=>{c.value=!1,g(R)},g=R=>{var O;c.value||(R instanceof InputEvent||R instanceof CompositionEvent)&&R.target instanceof HTMLTextAreaElement&&((O=R.target.value)!=null&&O.startsWith("/")?(o.value=!0,i.value=R.target.value.slice(1),a.value=0):(i.value="",o.value=!1))},M=R=>{},k=R=>{setTimeout(()=>{o.value=!1},200)},A=R=>{switch(R.key){case"ArrowUp":a.value>0&&(a.value--,d.value&&d.value.scrollToIndex(a.value));break;case"ArrowDown":a.value<s.value.length-1&&(a.value++,d.value&&d.value.scrollToIndex(a.value));break;case"Tab":case"Enter":{if(!CIB.vm.actionBar.inputText||!CIB.vm.actionBar.inputText.startsWith("/"))return;$(s.value[a.value])}break}},$=R=>{R&&(i.value="",CIB.vm.actionBar.inputText=R.prompt,o.value=!1)},B=()=>{f.value=!0,setTimeout(()=>{var R;if(f.value===!0){f.value=!1;const O=((R=d.value)==null?void 0:R.getOffset())||0;a.value=Math.round(O/tv)}},100)};return(R,O)=>(me(),Ae(De,null,[X(Yp,{"is-show":t.value},null,8,["is-show"]),Ue("main",null,[U(o)?(me(),Ae("div",{key:0,class:Vr(["box-border fixed bottom-[110px] w-full flex justify-center px-[14px] md:px-[34px] z-999",{"md:px-[170px]":h.value,"xl:px-[220px]":h.value}])},[Zp,U(l).length>0?(me(),je(U(ki),{key:0,ref_key:"scrollbarRef",ref:d,class:"bg-white w-full max-w-[1060px] max-h-[390px] rounded-xl overflow-y-auto","data-key":"prompt","data-sources":U(s),"data-component":Wp,keeps:10,onScroll:B},null,8,["data-sources"])):(me(),je(U(ei),{key:1,class:"bg-white w-full max-w-[1060px] max-h-[390px] rounded-xl py-6",description:"暂未设置提示词数据"},{extra:J(()=>[X(U(be),{secondary:"",type:"info",onClick:O[0]||(O[0]=I=>n.value=!0)},{default:J(()=>[he("去提示词库添加")]),_:1})]),_:1}))],2)):Xt("",!0)])],64))}}),ov=K({__name:"index",setup(e){return(t,r)=>(me(),Ae("main",null,[X(xp),X(Hp),X(rv)]))}});export{ov as default};