@cjy0812/inspect-plus 0.0.1772240426360

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/README.md +148 -0
  2. package/dist/.nojekyll +1 -0
  3. package/dist/404.html +38 -0
  4. package/dist/_redirects +1 -0
  5. package/dist/assets/ActionCard.vue_vue_type_script_setup_true_lang-CzzwrEAn.js +17 -0
  6. package/dist/assets/ActionCard.vue_vue_type_script_setup_true_lang-CzzwrEAn.js.map +1 -0
  7. package/dist/assets/DevicePage-ClkEpwEg.js +2 -0
  8. package/dist/assets/DevicePage-ClkEpwEg.js.map +1 -0
  9. package/dist/assets/HomePage-DWBCu_RV.js +55 -0
  10. package/dist/assets/HomePage-DWBCu_RV.js.map +1 -0
  11. package/dist/assets/ImportPage-DNhXkQRM.js +2 -0
  12. package/dist/assets/ImportPage-DNhXkQRM.js.map +1 -0
  13. package/dist/assets/SelectorPage-BPf1NT6K.js +2 -0
  14. package/dist/assets/SelectorPage-BPf1NT6K.js.map +1 -0
  15. package/dist/assets/SettingsModal.vue_vue_type_script_setup_true_lang-Dzypo389.js +977 -0
  16. package/dist/assets/SettingsModal.vue_vue_type_script_setup_true_lang-Dzypo389.js.map +1 -0
  17. package/dist/assets/SnapshotPage-B6Jpif--.js +250 -0
  18. package/dist/assets/SnapshotPage-B6Jpif--.js.map +1 -0
  19. package/dist/assets/SnapshotPage-B_oz4RvQ.css +1 -0
  20. package/dist/assets/SvgPage-BgerzYLu.js +2 -0
  21. package/dist/assets/SvgPage-BgerzYLu.js.map +1 -0
  22. package/dist/assets/TrackGraph-BqCqbx5h.css +1 -0
  23. package/dist/assets/TrackGraph-CSZuKoTS.js +134 -0
  24. package/dist/assets/TrackGraph-CSZuKoTS.js.map +1 -0
  25. package/dist/assets/_404Page-Beb778B7.js +2 -0
  26. package/dist/assets/_404Page-Beb778B7.js.map +1 -0
  27. package/dist/assets/import-ohlNKANL.js +2 -0
  28. package/dist/assets/import-ohlNKANL.js.map +1 -0
  29. package/dist/assets/index-BlWrRSuL.js +18 -0
  30. package/dist/assets/index-BlWrRSuL.js.map +1 -0
  31. package/dist/assets/index-CFzr9cs0.css +1 -0
  32. package/dist/assets/index-DfAptoUr.js +1172 -0
  33. package/dist/assets/index-DfAptoUr.js.map +1 -0
  34. package/dist/assets/index-OOkxa8o-.css +1 -0
  35. package/dist/assets/jszip.min-DUXE_wq7.js +3 -0
  36. package/dist/assets/jszip.min-DUXE_wq7.js.map +1 -0
  37. package/dist/assets/mod-BHC4TAjm.wasm +0 -0
  38. package/dist/assets/node-TLy2IyRG.js +118 -0
  39. package/dist/assets/node-TLy2IyRG.js.map +1 -0
  40. package/dist/assets/polyfills-t8dO9Hxd.js +2 -0
  41. package/dist/assets/polyfills-t8dO9Hxd.js.map +1 -0
  42. package/dist/assets/snapshot-D02dgTNQ.js +4 -0
  43. package/dist/assets/snapshot-D02dgTNQ.js.map +1 -0
  44. package/dist/assets/snapshotGroup-DhERMZkD.js +2 -0
  45. package/dist/assets/snapshotGroup-DhERMZkD.js.map +1 -0
  46. package/dist/assets/svg-D9PkDGa0.js +2 -0
  47. package/dist/assets/svg-D9PkDGa0.js.map +1 -0
  48. package/dist/assets/worker-NxeETyFs.js +10 -0
  49. package/dist/assets/worker-NxeETyFs.js.map +1 -0
  50. package/dist/index.html +38 -0
  51. package/package.json +102 -0
@@ -0,0 +1,977 @@
1
+ import{be as yi,i as N,bd as vo,r as V,al as je,a4 as pt,d as re,ag as mt,h as v,bf as Qn,aa as eo,bg as pr,o as Dt,bh as xi,a9 as Fi,as as Le,ax as be,p as Ve,aw as kn,aC as vr,bi as Tn,av as Xe,aX as Rn,a as _,a1 as E,c as q,aj as go,u as Ue,e as ke,b4 as bo,g as tt,bj as Ai,j as ce,ah as It,T as mo,b as W,a0 as Ge,bk as Do,b2 as qe,N as gr,ab as Ei,ar as Bi,a3 as Ct,bl as Si,aq as Pt,a7 as Co,bm as ki,bn as we,bo as Ri,ay as xe,bp as $o,af as Yt,bq as zi,br as Ii,I as wo,w as zn,bs as Pi,a2 as _i,ao as $i,au as vt,bt as Ti,an as Oi,aW as yo,bu as Mi,bv as To,bw as Ni,bx as Ui,by as Li,bz as Qe,bA as lt,bB as Et,bC as vn,bD as ut,bE as ft,bF as ht,bG as _t,bH as Bt,bI as br,bJ as to,bK as no,bL as oo,bM as $t,bN as Tt,_ as Zt,bO as Kt,bP as ro,bQ as io,bR as ao,bS as Vi,bT as lo,bU as Qt,bV as mr,bW as Dr,bX as ji,B as at,bY as Hi,bZ as Wi,b_ as Gi,b$ as xo,c0 as Ki,ak as Cr,c1 as qi,c2 as Xi,c3 as Zi,c4 as Ji,c5 as Oo,ap as Mo,c6 as On,ai as Yi,c7 as rt,Z as Qi,x as L,F as Be,b9 as No,c8 as ea,E as Fo,c9 as Uo,ca as ta,aT as Ao,aZ as Oe,cb as un,cc as na,a$ as Ot,cd as Lo,ce as oa,cf as Vo,bc as wr,cg as ra,ch as ia,S as In,ci as aa,cj as Dn,R as et,D as uo,t as Cn,z as H,aK as wn,L as la,v as G,H as yn,aD as ua,C as St,b1 as sa,q as yr,y as he,J as ca,G as da,P as fa,Q as ha,ck as pa}from"./index-DfAptoUr.js";import{e as Eo,J as Bo,b as en,p as xr,a as Fr,s as va}from"./snapshot-D02dgTNQ.js";import{j as Ar,k as Er,m as gn,n as So,o as ga,_ as ba,B as Br,V as Sr,q as kr,r as Mt,u as ma,a as Da}from"./node-TLy2IyRG.js";function kt(e,t){let{target:n}=e;for(;n;){if(n.dataset&&n.dataset[t]!==void 0)return!0;n=n.parentElement}return!1}function Ca(e){if(typeof e=="number")return{"":e.toString()};const t={};return e.split(/ +/).forEach(n=>{if(n==="")return;const[o,r]=n.split(":");r===void 0?t[""]=o:t[o]=r}),t}function Rt(e,t){var n;if(e==null)return;const o=Ca(e);if(t===void 0)return o[""];if(typeof t=="string")return(n=o[t])!==null&&n!==void 0?n:o[""];if(Array.isArray(t)){for(let r=t.length-1;r>=0;--r){const i=t[r];if(i in o)return o[i]}return o[""]}else{let r,i=-1;return Object.keys(o).forEach(a=>{const l=Number(a);!Number.isNaN(l)&&t>=l&&l>=i&&(i=l,r=o[a])}),r}}const wa={xs:0,s:640,m:1024,l:1280,xl:1536,"2xl":1920};function ya(e){return`(min-width: ${e}px)`}const Lt={};function xa(e=wa){if(!yi)return N(()=>[]);if(typeof window.matchMedia!="function")return N(()=>[]);const t=V({}),n=Object.keys(e),o=(r,i)=>{r.matches?t.value[i]=!0:t.value[i]=!1};return n.forEach(r=>{const i=e[r];let a,l;Lt[i]===void 0?(a=window.matchMedia(ya(i)),a.addEventListener?a.addEventListener("change",c=>{l.forEach(s=>{s(c,r)})}):a.addListener&&a.addListener(c=>{l.forEach(s=>{s(c,r)})}),l=new Set,Lt[i]={mql:a,cbs:l}):(a=Lt[i].mql,l=Lt[i].cbs),l.add(o),a.matches&&l.forEach(c=>{c(a,r)})}),vo(()=>{n.forEach(r=>{const{cbs:i}=Lt[e[r]];i.has(o)&&i.delete(o)})}),N(()=>{const{value:r}=t;return n.filter(i=>r[i])})}function jo(e){return e&-e}class Rr{constructor(t,n){this.l=t,this.min=n;const o=new Array(t+1);for(let r=0;r<t+1;++r)o[r]=0;this.ft=o}add(t,n){if(n===0)return;const{l:o,ft:r}=this;for(t+=1;t<=o;)r[t]+=n,t+=jo(t)}get(t){return this.sum(t+1)-this.sum(t)}sum(t){if(t===void 0&&(t=this.l),t<=0)return 0;const{ft:n,min:o,l:r}=this;if(t>r)throw new Error("[FinweckTree.sum]: `i` is larger than length.");let i=t*o;for(;t>0;)i+=n[t],t-=jo(t);return i}getBound(t){let n=0,o=this.l;for(;o>n;){const r=Math.floor((n+o)/2),i=this.sum(r);if(i>t){o=r;continue}else if(i<t){if(n===r)return this.sum(n+1)<=t?n+1:r;n=r}else return r}return n}}let sn;function Fa(){return typeof document>"u"?!1:(sn===void 0&&("matchMedia"in window?sn=window.matchMedia("(pointer:coarse)").matches:sn=!1),sn)}let Mn;function Ho(){return typeof document>"u"?1:(Mn===void 0&&(Mn="chrome"in window?window.devicePixelRatio:1),Mn)}const zr="VVirtualListXScroll";function Aa({columnsRef:e,renderColRef:t,renderItemWithColsRef:n}){const o=V(0),r=V(0),i=N(()=>{const s=e.value;if(s.length===0)return null;const d=new Rr(s.length,0);return s.forEach((u,h)=>{d.add(h,u.width)}),d}),a=je(()=>{const s=i.value;return s!==null?Math.max(s.getBound(r.value)-1,0):0}),l=s=>{const d=i.value;return d!==null?d.sum(s):0},c=je(()=>{const s=i.value;return s!==null?Math.min(s.getBound(r.value+o.value)+1,e.value.length-1):0});return pt(zr,{startIndexRef:a,endIndexRef:c,columnsRef:e,renderColRef:t,renderItemWithColsRef:n,getLeft:l}),{listWidthRef:o,scrollLeftRef:r}}const Wo=re({name:"VirtualListRow",props:{index:{type:Number,required:!0},item:{type:Object,required:!0}},setup(){const{startIndexRef:e,endIndexRef:t,columnsRef:n,getLeft:o,renderColRef:r,renderItemWithColsRef:i}=mt(zr);return{startIndex:e,endIndex:t,columns:n,renderCol:r,renderItemWithCols:i,getLeft:o}},render(){const{startIndex:e,endIndex:t,columns:n,renderCol:o,renderItemWithCols:r,getLeft:i,item:a}=this;if(r!=null)return r({itemIndex:this.index,startColIndex:e,endColIndex:t,allColumns:n,item:a,getLeft:i});if(o!=null){const l=[];for(let c=e;c<=t;++c){const s=n[c];l.push(o({column:s,left:i(c),item:a}))}return l}return null}}),Ea=gn(".v-vl",{maxHeight:"inherit",height:"100%",overflow:"auto",minWidth:"1px"},[gn("&:not(.v-vl--show-scrollbar)",{scrollbarWidth:"none"},[gn("&::-webkit-scrollbar, &::-webkit-scrollbar-track-piece, &::-webkit-scrollbar-thumb",{width:0,height:0,display:"none"})])]),Ba=re({name:"VirtualList",inheritAttrs:!1,props:{showScrollbar:{type:Boolean,default:!0},columns:{type:Array,default:()=>[]},renderCol:Function,renderItemWithCols:Function,items:{type:Array,default:()=>[]},itemSize:{type:Number,required:!0},itemResizable:Boolean,itemsStyle:[String,Object],visibleItemsTag:{type:[String,Object],default:"div"},visibleItemsProps:Object,ignoreItemResize:Boolean,onScroll:Function,onWheel:Function,onResize:Function,defaultScrollKey:[Number,String],defaultScrollIndex:Number,keyField:{type:String,default:"key"},paddingTop:{type:[Number,String],default:0},paddingBottom:{type:[Number,String],default:0}},setup(e){const t=pr();Ea.mount({id:"vueuc/virtual-list",head:!0,anchorMetaName:Ar,ssr:t}),Dt(()=>{const{defaultScrollIndex:B,defaultScrollKey:T}=e;B!=null?y({index:B}):T!=null&&y({key:T})});let n=!1,o=!1;xi(()=>{if(n=!1,!o){o=!0;return}y({top:g.value,left:a.value})}),Fi(()=>{n=!0,o||(o=!0)});const r=je(()=>{if(e.renderCol==null&&e.renderItemWithCols==null||e.columns.length===0)return;let B=0;return e.columns.forEach(T=>{B+=T.width}),B}),i=N(()=>{const B=new Map,{keyField:T}=e;return e.items.forEach((I,ee)=>{B.set(I[T],ee)}),B}),{scrollLeftRef:a,listWidthRef:l}=Aa({columnsRef:be(e,"columns"),renderColRef:be(e,"renderCol"),renderItemWithColsRef:be(e,"renderItemWithCols")}),c=V(null),s=V(void 0),d=new Map,u=N(()=>{const{items:B,itemSize:T,keyField:I}=e,ee=new Rr(B.length,T);return B.forEach((ne,X)=>{const de=ne[I],Y=d.get(de);Y!==void 0&&ee.add(X,Y)}),ee}),h=V(0),g=V(0),p=je(()=>Math.max(u.value.getBound(g.value-Le(e.paddingTop))-1,0)),w=N(()=>{const{value:B}=s;if(B===void 0)return[];const{items:T,itemSize:I}=e,ee=p.value,ne=Math.min(ee+Math.ceil(B/I+1),T.length-1),X=[];for(let de=ee;de<=ne;++de)X.push(T[de]);return X}),y=(B,T)=>{if(typeof B=="number"){D(B,T,"auto");return}const{left:I,top:ee,index:ne,key:X,position:de,behavior:Y,debounce:le=!0}=B;if(I!==void 0||ee!==void 0)D(I,ee,Y);else if(ne!==void 0)f(ne,Y,le);else if(X!==void 0){const z=i.value.get(X);z!==void 0&&f(z,Y,le)}else de==="bottom"?D(0,Number.MAX_SAFE_INTEGER,Y):de==="top"&&D(0,0,Y)};let m,C=null;function f(B,T,I){const{value:ee}=u,ne=ee.sum(B)+Le(e.paddingTop);if(!I)c.value.scrollTo({left:0,top:ne,behavior:T});else{m=B,C!==null&&window.clearTimeout(C),C=window.setTimeout(()=>{m=void 0,C=null},16);const{scrollTop:X,offsetHeight:de}=c.value;if(ne>X){const Y=ee.get(B);ne+Y<=X+de||c.value.scrollTo({left:0,top:ne+Y-de,behavior:T})}else c.value.scrollTo({left:0,top:ne,behavior:T})}}function D(B,T,I){c.value.scrollTo({left:B,top:T,behavior:I})}function b(B,T){var I,ee,ne;if(n||e.ignoreItemResize||ae(T.target))return;const{value:X}=u,de=i.value.get(B),Y=X.get(de),le=(ne=(ee=(I=T.borderBoxSize)===null||I===void 0?void 0:I[0])===null||ee===void 0?void 0:ee.blockSize)!==null&&ne!==void 0?ne:T.contentRect.height;if(le===Y)return;le-e.itemSize===0?d.delete(B):d.set(B,le-e.itemSize);const O=le-Y;if(O===0)return;X.add(de,O);const ie=c.value;if(ie!=null){if(m===void 0){const Se=X.sum(de);ie.scrollTop>Se&&ie.scrollBy(0,O)}else if(de<m)ie.scrollBy(0,O);else if(de===m){const Se=X.sum(de);le+Se>ie.scrollTop+ie.offsetHeight&&ie.scrollBy(0,O)}K()}h.value++}const F=!Fa();let P=!1;function S(B){var T;(T=e.onScroll)===null||T===void 0||T.call(e,B),(!F||!P)&&K()}function $(B){var T;if((T=e.onWheel)===null||T===void 0||T.call(e,B),F){const I=c.value;if(I!=null){if(B.deltaX===0&&(I.scrollTop===0&&B.deltaY<=0||I.scrollTop+I.offsetHeight>=I.scrollHeight&&B.deltaY>=0))return;B.preventDefault(),I.scrollTop+=B.deltaY/Ho(),I.scrollLeft+=B.deltaX/Ho(),K(),P=!0,Er(()=>{P=!1})}}}function j(B){if(n||ae(B.target))return;if(e.renderCol==null&&e.renderItemWithCols==null){if(B.contentRect.height===s.value)return}else if(B.contentRect.height===s.value&&B.contentRect.width===l.value)return;s.value=B.contentRect.height,l.value=B.contentRect.width;const{onResize:T}=e;T!==void 0&&T(B)}function K(){const{value:B}=c;B!=null&&(g.value=B.scrollTop,a.value=B.scrollLeft)}function ae(B){let T=B;for(;T!==null;){if(T.style.display==="none")return!0;T=T.parentElement}return!1}return{listHeight:s,listStyle:{overflow:"auto"},keyToIndex:i,itemsStyle:N(()=>{const{itemResizable:B}=e,T=Ve(u.value.sum());return h.value,[e.itemsStyle,{boxSizing:"content-box",width:Ve(r.value),height:B?"":T,minHeight:B?T:"",paddingTop:Ve(e.paddingTop),paddingBottom:Ve(e.paddingBottom)}]}),visibleItemsStyle:N(()=>(h.value,{transform:`translateY(${Ve(u.value.sum(p.value))})`})),viewportItems:w,listElRef:c,itemsElRef:V(null),scrollTo:y,handleListResize:j,handleListScroll:S,handleListWheel:$,handleItemResize:b}},render(){const{itemResizable:e,keyField:t,keyToIndex:n,visibleItemsTag:o}=this;return v(Qn,{onResize:this.handleListResize},{default:()=>{var r,i;return v("div",eo(this.$attrs,{class:["v-vl",this.showScrollbar&&"v-vl--show-scrollbar"],onScroll:this.handleListScroll,onWheel:this.handleListWheel,ref:"listElRef"}),[this.items.length!==0?v("div",{ref:"itemsElRef",class:"v-vl-items",style:this.itemsStyle},[v(o,Object.assign({class:"v-vl-visible-items",style:this.visibleItemsStyle},this.visibleItemsProps),{default:()=>{const{renderCol:a,renderItemWithCols:l}=this;return this.viewportItems.map(c=>{const s=c[t],d=n.get(s),u=a!=null?v(Wo,{index:d,item:c}):void 0,h=l!=null?v(Wo,{index:d,item:c}):void 0,g=this.$slots.default({item:c,renderedCols:u,renderedItemWithCols:h,index:d})[0];return e?v(Qn,{key:s,onResize:p=>this.handleItemResize(s,p)},{default:()=>g}):(g.key=s,g)})}})]):(i=(r=this.$slots).empty)===null||i===void 0?void 0:i.call(r)])}})}}),nt="v-hidden",Sa=gn("[v-hidden]",{display:"none!important"}),Go=re({name:"Overflow",props:{getCounter:Function,getTail:Function,updateCounter:Function,onUpdateCount:Function,onUpdateOverflow:Function},setup(e,{slots:t}){const n=V(null),o=V(null);function r(a){const{value:l}=n,{getCounter:c,getTail:s}=e;let d;if(c!==void 0?d=c():d=o.value,!l||!d)return;d.hasAttribute(nt)&&d.removeAttribute(nt);const{children:u}=l;if(a.showAllItemsBeforeCalculate)for(const f of u)f.hasAttribute(nt)&&f.removeAttribute(nt);const h=l.offsetWidth,g=[],p=t.tail?s==null?void 0:s():null;let w=p?p.offsetWidth:0,y=!1;const m=l.children.length-(t.tail?1:0);for(let f=0;f<m-1;++f){if(f<0)continue;const D=u[f];if(y){D.hasAttribute(nt)||D.setAttribute(nt,"");continue}else D.hasAttribute(nt)&&D.removeAttribute(nt);const b=D.offsetWidth;if(w+=b,g[f]=b,w>h){const{updateCounter:F}=e;for(let P=f;P>=0;--P){const S=m-1-P;F!==void 0?F(S):d.textContent=`${S}`;const $=d.offsetWidth;if(w-=g[P],w+$<=h||P===0){y=!0,f=P-1,p&&(f===-1?(p.style.maxWidth=`${h-$}px`,p.style.boxSizing="border-box"):p.style.maxWidth="");const{onUpdateCount:j}=e;j&&j(S);break}}}}const{onUpdateOverflow:C}=e;y?C!==void 0&&C(!0):(C!==void 0&&C(!1),d.setAttribute(nt,""))}const i=pr();return Sa.mount({id:"vueuc/overflow",head:!0,anchorMetaName:Ar,ssr:i}),Dt(()=>r({showAllItemsBeforeCalculate:!1})),{selfRef:n,counterRef:o,sync:r}},render(){const{$slots:e}=this;return kn(()=>this.sync({showAllItemsBeforeCalculate:!1})),v("div",{class:"v-overflow",ref:"selfRef"},[vr(e,"default"),e.counter?e.counter():v("span",{style:{display:"inline-block"},ref:"counterRef"}),e.tail?e.tail():null])}});function Ir(e,t){t&&(Dt(()=>{const{value:n}=e;n&&Tn.registerHandler(n,t)}),Xe(e,(n,o)=>{o&&Tn.unregisterHandler(o)},{deep:!1}),vo(()=>{const{value:n}=e;n&&Tn.unregisterHandler(n)}))}function Ko(e){switch(typeof e){case"string":return e||void 0;case"number":return String(e);default:return}}function ko(e,t="default",n=[]){const r=e.$slots[t];return r===void 0?n:r()}function ka(e){var t;const n=(t=e.dirs)===null||t===void 0?void 0:t.find(({dir:o})=>o===Rn);return!!(n&&n.value===!1)}function Nn(e){const t=e.filter(n=>n!==void 0);if(t.length!==0)return t.length===1?t[0]:n=>{e.forEach(o=>{o&&o(n)})}}const Ra=re({name:"Checkmark",render(){return v("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16"},v("g",{fill:"none"},v("path",{d:"M14.046 3.486a.75.75 0 0 1-.032 1.06l-7.93 7.474a.85.85 0 0 1-1.188-.022l-2.68-2.72a.75.75 0 1 1 1.068-1.053l2.234 2.267l7.468-7.038a.75.75 0 0 1 1.06.032z",fill:"currentColor"})))}}),za=re({name:"ChevronLeft",render(){return v("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},v("path",{d:"M10.3536 3.14645C10.5488 3.34171 10.5488 3.65829 10.3536 3.85355L6.20711 8L10.3536 12.1464C10.5488 12.3417 10.5488 12.6583 10.3536 12.8536C10.1583 13.0488 9.84171 13.0488 9.64645 12.8536L5.14645 8.35355C4.95118 8.15829 4.95118 7.84171 5.14645 7.64645L9.64645 3.14645C9.84171 2.95118 10.1583 2.95118 10.3536 3.14645Z",fill:"currentColor"}))}}),Ia=re({name:"ChevronRight",render(){return v("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},v("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"}))}}),Pa=re({name:"Empty",render(){return v("svg",{viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},v("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"}),v("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"}))}}),_a=re({props:{onFocus:Function,onBlur:Function},setup(e){return()=>v("div",{style:"width: 0; height: 0",tabindex:0,onFocus:e.onFocus,onBlur:e.onBlur})}});function qo(e){return Array.isArray(e)?e:[e]}const so={STOP:"STOP"};function Pr(e,t){const n=t(e);e.children!==void 0&&n!==so.STOP&&e.children.forEach(o=>Pr(o,t))}function $a(e,t={}){const{preserveGroup:n=!1}=t,o=[],r=n?a=>{a.isLeaf||(o.push(a.key),i(a.children))}:a=>{a.isLeaf||(a.isGroup||o.push(a.key),i(a.children))};function i(a){a.forEach(r)}return i(e),o}function Ta(e,t){const{isLeaf:n}=e;return n!==void 0?n:!t(e)}function Oa(e){return e.children}function Ma(e){return e.key}function Na(){return!1}function Ua(e,t){const{isLeaf:n}=e;return!(n===!1&&!Array.isArray(t(e)))}function La(e){return e.disabled===!0}function Va(e,t){return e.isLeaf===!1&&!Array.isArray(t(e))}function Un(e){var t;return e==null?[]:Array.isArray(e)?e:(t=e.checkedKeys)!==null&&t!==void 0?t:[]}function Ln(e){var t;return e==null||Array.isArray(e)?[]:(t=e.indeterminateKeys)!==null&&t!==void 0?t:[]}function ja(e,t){const n=new Set(e);return t.forEach(o=>{n.has(o)||n.add(o)}),Array.from(n)}function Ha(e,t){const n=new Set(e);return t.forEach(o=>{n.has(o)&&n.delete(o)}),Array.from(n)}function Wa(e){return(e==null?void 0:e.type)==="group"}function Ga(e){const t=new Map;return e.forEach((n,o)=>{t.set(n.key,o)}),n=>{var o;return(o=t.get(n))!==null&&o!==void 0?o:null}}class Ka extends Error{constructor(){super(),this.message="SubtreeNotLoadedError: checking a subtree whose required nodes are not fully loaded."}}function qa(e,t,n,o){return xn(t.concat(e),n,o,!1)}function Xa(e,t){const n=new Set;return e.forEach(o=>{const r=t.treeNodeMap.get(o);if(r!==void 0){let i=r.parent;for(;i!==null&&!(i.disabled||n.has(i.key));)n.add(i.key),i=i.parent}}),n}function Za(e,t,n,o){const r=xn(t,n,o,!1),i=xn(e,n,o,!0),a=Xa(e,n),l=[];return r.forEach(c=>{(i.has(c)||a.has(c))&&l.push(c)}),l.forEach(c=>r.delete(c)),r}function Vn(e,t){const{checkedKeys:n,keysToCheck:o,keysToUncheck:r,indeterminateKeys:i,cascade:a,leafOnly:l,checkStrategy:c,allowNotLoaded:s}=e;if(!a)return o!==void 0?{checkedKeys:ja(n,o),indeterminateKeys:Array.from(i)}:r!==void 0?{checkedKeys:Ha(n,r),indeterminateKeys:Array.from(i)}:{checkedKeys:Array.from(n),indeterminateKeys:Array.from(i)};const{levelTreeNodeMap:d}=t;let u;r!==void 0?u=Za(r,n,t,s):o!==void 0?u=qa(o,n,t,s):u=xn(n,t,s,!1);const h=c==="parent",g=c==="child"||l,p=u,w=new Set,y=Math.max.apply(null,Array.from(d.keys()));for(let m=y;m>=0;m-=1){const C=m===0,f=d.get(m);for(const D of f){if(D.isLeaf)continue;const{key:b,shallowLoaded:F}=D;if(g&&F&&D.children.forEach(j=>{!j.disabled&&!j.isLeaf&&j.shallowLoaded&&p.has(j.key)&&p.delete(j.key)}),D.disabled||!F)continue;let P=!0,S=!1,$=!0;for(const j of D.children){const K=j.key;if(!j.disabled){if($&&($=!1),p.has(K))S=!0;else if(w.has(K)){S=!0,P=!1;break}else if(P=!1,S)break}}P&&!$?(h&&D.children.forEach(j=>{!j.disabled&&p.has(j.key)&&p.delete(j.key)}),p.add(b)):S&&w.add(b),C&&g&&p.has(b)&&p.delete(b)}}return{checkedKeys:Array.from(p),indeterminateKeys:Array.from(w)}}function xn(e,t,n,o){const{treeNodeMap:r,getChildren:i}=t,a=new Set,l=new Set(e);return e.forEach(c=>{const s=r.get(c);s!==void 0&&Pr(s,d=>{if(d.disabled)return so.STOP;const{key:u}=d;if(!a.has(u)&&(a.add(u),l.add(u),Va(d.rawNode,i))){if(o)return so.STOP;if(!n)throw new Ka}})}),l}function Ja(e,{includeGroup:t=!1,includeSelf:n=!0},o){var r;const i=o.treeNodeMap;let a=e==null?null:(r=i.get(e))!==null&&r!==void 0?r:null;const l={keyPath:[],treeNodePath:[],treeNode:a};if(a!=null&&a.ignored)return l.treeNode=null,l;for(;a;)!a.ignored&&(t||!a.isGroup)&&l.treeNodePath.push(a),a=a.parent;return l.treeNodePath.reverse(),n||l.treeNodePath.pop(),l.keyPath=l.treeNodePath.map(c=>c.key),l}function Ya(e){if(e.length===0)return null;const t=e[0];return t.isGroup||t.ignored||t.disabled?t.getNext():t}function Qa(e,t){const n=e.siblings,o=n.length,{index:r}=e;return t?n[(r+1)%o]:r===n.length-1?null:n[r+1]}function Xo(e,t,{loop:n=!1,includeDisabled:o=!1}={}){const r=t==="prev"?el:Qa,i={reverse:t==="prev"};let a=!1,l=null;function c(s){if(s!==null){if(s===e){if(!a)a=!0;else if(!e.disabled&&!e.isGroup){l=e;return}}else if((!s.disabled||o)&&!s.ignored&&!s.isGroup){l=s;return}if(s.isGroup){const d=Ro(s,i);d!==null?l=d:c(r(s,n))}else{const d=r(s,!1);if(d!==null)c(d);else{const u=tl(s);u!=null&&u.isGroup?c(r(u,n)):n&&c(r(s,!0))}}}}return c(e),l}function el(e,t){const n=e.siblings,o=n.length,{index:r}=e;return t?n[(r-1+o)%o]:r===0?null:n[r-1]}function tl(e){return e.parent}function Ro(e,t={}){const{reverse:n=!1}=t,{children:o}=e;if(o){const{length:r}=o,i=n?r-1:0,a=n?-1:r,l=n?-1:1;for(let c=i;c!==a;c+=l){const s=o[c];if(!s.disabled&&!s.ignored)if(s.isGroup){const d=Ro(s,t);if(d!==null)return d}else return s}}return null}const nl={getChild(){return this.ignored?null:Ro(this)},getParent(){const{parent:e}=this;return e!=null&&e.isGroup?e.getParent():e},getNext(e={}){return Xo(this,"next",e)},getPrev(e={}){return Xo(this,"prev",e)}};function ol(e,t){const n=t?new Set(t):void 0,o=[];function r(i){i.forEach(a=>{o.push(a),!(a.isLeaf||!a.children||a.ignored)&&(a.isGroup||n===void 0||n.has(a.key))&&r(a.children)})}return r(e),o}function rl(e,t){const n=e.key;for(;t;){if(t.key===n)return!0;t=t.parent}return!1}function _r(e,t,n,o,r,i=null,a=0){const l=[];return e.forEach((c,s)=>{var d;const u=Object.create(o);if(u.rawNode=c,u.siblings=l,u.level=a,u.index=s,u.isFirstChild=s===0,u.isLastChild=s+1===e.length,u.parent=i,!u.ignored){const h=r(c);Array.isArray(h)&&(u.children=_r(h,t,n,o,r,u,a+1))}l.push(u),t.set(u.key,u),n.has(a)||n.set(a,[]),(d=n.get(a))===null||d===void 0||d.push(u)}),l}function il(e,t={}){var n;const o=new Map,r=new Map,{getDisabled:i=La,getIgnored:a=Na,getIsGroup:l=Wa,getKey:c=Ma}=t,s=(n=t.getChildren)!==null&&n!==void 0?n:Oa,d=t.ignoreEmptyChildren?D=>{const b=s(D);return Array.isArray(b)?b.length?b:null:b}:s,u=Object.assign({get key(){return c(this.rawNode)},get disabled(){return i(this.rawNode)},get isGroup(){return l(this.rawNode)},get isLeaf(){return Ta(this.rawNode,d)},get shallowLoaded(){return Ua(this.rawNode,d)},get ignored(){return a(this.rawNode)},contains(D){return rl(this,D)}},nl),h=_r(e,o,r,u,d);function g(D){if(D==null)return null;const b=o.get(D);return b&&!b.isGroup&&!b.ignored?b:null}function p(D){if(D==null)return null;const b=o.get(D);return b&&!b.ignored?b:null}function w(D,b){const F=p(D);return F?F.getPrev(b):null}function y(D,b){const F=p(D);return F?F.getNext(b):null}function m(D){const b=p(D);return b?b.getParent():null}function C(D){const b=p(D);return b?b.getChild():null}const f={treeNodes:h,treeNodeMap:o,levelTreeNodeMap:r,maxLevel:Math.max(...r.keys()),getChildren:d,getFlattenedNodes(D){return ol(h,D)},getNode:g,getPrev:w,getNext:y,getParent:m,getChild:C,getFirstAvailableNode(){return Ya(h)},getPath(D,b={}){return Ja(D,b,f)},getCheckedKeys(D,b={}){const{cascade:F=!0,leafOnly:P=!1,checkStrategy:S="all",allowNotLoaded:$=!1}=b;return Vn({checkedKeys:Un(D),indeterminateKeys:Ln(D),cascade:F,leafOnly:P,checkStrategy:S,allowNotLoaded:$},f)},check(D,b,F={}){const{cascade:P=!0,leafOnly:S=!1,checkStrategy:$="all",allowNotLoaded:j=!1}=F;return Vn({checkedKeys:Un(b),indeterminateKeys:Ln(b),keysToCheck:D==null?[]:qo(D),cascade:P,leafOnly:S,checkStrategy:$,allowNotLoaded:j},f)},uncheck(D,b,F={}){const{cascade:P=!0,leafOnly:S=!1,checkStrategy:$="all",allowNotLoaded:j=!1}=F;return Vn({checkedKeys:Un(b),indeterminateKeys:Ln(b),keysToUncheck:D==null?[]:qo(D),cascade:P,leafOnly:S,checkStrategy:$,allowNotLoaded:j},f)},getNonLeafKeys(D={}){return $a(h,D)}};return f}const al=_("empty",`
2
+ display: flex;
3
+ flex-direction: column;
4
+ align-items: center;
5
+ font-size: var(--n-font-size);
6
+ `,[E("icon",`
7
+ width: var(--n-icon-size);
8
+ height: var(--n-icon-size);
9
+ font-size: var(--n-icon-size);
10
+ line-height: var(--n-icon-size);
11
+ color: var(--n-icon-color);
12
+ transition:
13
+ color .3s var(--n-bezier);
14
+ `,[q("+",[E("description",`
15
+ margin-top: 8px;
16
+ `)])]),E("description",`
17
+ transition: color .3s var(--n-bezier);
18
+ color: var(--n-text-color);
19
+ `),E("extra",`
20
+ text-align: center;
21
+ transition: color .3s var(--n-bezier);
22
+ margin-top: 12px;
23
+ color: var(--n-extra-text-color);
24
+ `)]),ll=Object.assign(Object.assign({},ke.props),{description:String,showDescription:{type:Boolean,default:!0},showIcon:{type:Boolean,default:!0},size:{type:String,default:"medium"},renderIcon:Function}),ul=re({name:"Empty",props:ll,slots:Object,setup(e){const{mergedClsPrefixRef:t,inlineThemeDisabled:n,mergedComponentPropsRef:o}=Ue(e),r=ke("Empty","-empty",al,Ai,e,t),{localeRef:i}=bo("Empty"),a=N(()=>{var d,u,h;return(d=e.description)!==null&&d!==void 0?d:(h=(u=o==null?void 0:o.value)===null||u===void 0?void 0:u.Empty)===null||h===void 0?void 0:h.description}),l=N(()=>{var d,u;return((u=(d=o==null?void 0:o.value)===null||d===void 0?void 0:d.Empty)===null||u===void 0?void 0:u.renderIcon)||(()=>v(Pa,null))}),c=N(()=>{const{size:d}=e,{common:{cubicBezierEaseInOut:u},self:{[ce("iconSize",d)]:h,[ce("fontSize",d)]:g,textColor:p,iconColor:w,extraTextColor:y}}=r.value;return{"--n-icon-size":h,"--n-font-size":g,"--n-bezier":u,"--n-text-color":p,"--n-icon-color":w,"--n-extra-text-color":y}}),s=n?tt("empty",N(()=>{let d="";const{size:u}=e;return d+=u[0],d}),c,e):void 0;return{mergedClsPrefix:t,mergedRenderIcon:l,localizedDescription:N(()=>a.value||i.value.description),cssVars:n?void 0:c,themeClass:s==null?void 0:s.themeClass,onRender:s==null?void 0:s.onRender}},render(){const{$slots:e,mergedClsPrefix:t,onRender:n}=this;return n==null||n(),v("div",{class:[`${t}-empty`,this.themeClass],style:this.cssVars},this.showIcon?v("div",{class:`${t}-empty__icon`},e.icon?e.icon():v(go,{clsPrefix:t},{default:this.mergedRenderIcon})):null,this.showDescription?v("div",{class:`${t}-empty__description`},e.default?e.default():this.localizedDescription):null,e.extra?v("div",{class:`${t}-empty__extra`},e.extra()):null)}}),Zo=re({name:"NBaseSelectGroupHeader",props:{clsPrefix:{type:String,required:!0},tmNode:{type:Object,required:!0}},setup(){const{renderLabelRef:e,renderOptionRef:t,labelFieldRef:n,nodePropsRef:o}=mt(So);return{labelField:n,nodeProps:o,renderLabel:e,renderOption:t}},render(){const{clsPrefix:e,renderLabel:t,renderOption:n,nodeProps:o,tmNode:{rawNode:r}}=this,i=o==null?void 0:o(r),a=t?t(r,!1):It(r[this.labelField],r,!1),l=v("div",Object.assign({},i,{class:[`${e}-base-select-group-header`,i==null?void 0:i.class]}),a);return r.render?r.render({node:l,option:r}):n?n({node:l,option:r,selected:!1}):l}});function sl(e,t){return v(mo,{name:"fade-in-scale-up-transition"},{default:()=>e?v(go,{clsPrefix:t,class:`${t}-base-select-option__check`},{default:()=>v(Ra)}):null})}const Jo=re({name:"NBaseSelectOption",props:{clsPrefix:{type:String,required:!0},tmNode:{type:Object,required:!0}},setup(e){const{valueRef:t,pendingTmNodeRef:n,multipleRef:o,valueSetRef:r,renderLabelRef:i,renderOptionRef:a,labelFieldRef:l,valueFieldRef:c,showCheckmarkRef:s,nodePropsRef:d,handleOptionClick:u,handleOptionMouseEnter:h}=mt(So),g=je(()=>{const{value:m}=n;return m?e.tmNode.key===m.key:!1});function p(m){const{tmNode:C}=e;C.disabled||u(m,C)}function w(m){const{tmNode:C}=e;C.disabled||h(m,C)}function y(m){const{tmNode:C}=e,{value:f}=g;C.disabled||f||h(m,C)}return{multiple:o,isGrouped:je(()=>{const{tmNode:m}=e,{parent:C}=m;return C&&C.rawNode.type==="group"}),showCheckmark:s,nodeProps:d,isPending:g,isSelected:je(()=>{const{value:m}=t,{value:C}=o;if(m===null)return!1;const f=e.tmNode.rawNode[c.value];if(C){const{value:D}=r;return D.has(f)}else return m===f}),labelField:l,renderLabel:i,renderOption:a,handleMouseMove:y,handleMouseEnter:w,handleClick:p}},render(){const{clsPrefix:e,tmNode:{rawNode:t},isSelected:n,isPending:o,isGrouped:r,showCheckmark:i,nodeProps:a,renderOption:l,renderLabel:c,handleClick:s,handleMouseEnter:d,handleMouseMove:u}=this,h=sl(n,e),g=c?[c(t,n),i&&h]:[It(t[this.labelField],t,n),i&&h],p=a==null?void 0:a(t),w=v("div",Object.assign({},p,{class:[`${e}-base-select-option`,t.class,p==null?void 0:p.class,{[`${e}-base-select-option--disabled`]:t.disabled,[`${e}-base-select-option--selected`]:n,[`${e}-base-select-option--grouped`]:r,[`${e}-base-select-option--pending`]:o,[`${e}-base-select-option--show-checkmark`]:i}],style:[(p==null?void 0:p.style)||"",t.style||""],onClick:Nn([s,p==null?void 0:p.onClick]),onMouseenter:Nn([d,p==null?void 0:p.onMouseenter]),onMousemove:Nn([u,p==null?void 0:p.onMousemove])}),v("div",{class:`${e}-base-select-option__content`},g));return t.render?t.render({node:w,option:t,selected:n}):l?l({node:w,option:t,selected:n}):w}}),cl=_("base-select-menu",`
25
+ line-height: 1.5;
26
+ outline: none;
27
+ z-index: 0;
28
+ position: relative;
29
+ border-radius: var(--n-border-radius);
30
+ transition:
31
+ background-color .3s var(--n-bezier),
32
+ box-shadow .3s var(--n-bezier);
33
+ background-color: var(--n-color);
34
+ `,[_("scrollbar",`
35
+ max-height: var(--n-height);
36
+ `),_("virtual-list",`
37
+ max-height: var(--n-height);
38
+ `),_("base-select-option",`
39
+ min-height: var(--n-option-height);
40
+ font-size: var(--n-option-font-size);
41
+ display: flex;
42
+ align-items: center;
43
+ `,[E("content",`
44
+ z-index: 1;
45
+ white-space: nowrap;
46
+ text-overflow: ellipsis;
47
+ overflow: hidden;
48
+ `)]),_("base-select-group-header",`
49
+ min-height: var(--n-option-height);
50
+ font-size: .93em;
51
+ display: flex;
52
+ align-items: center;
53
+ `),_("base-select-menu-option-wrapper",`
54
+ position: relative;
55
+ width: 100%;
56
+ `),E("loading, empty",`
57
+ display: flex;
58
+ padding: 12px 32px;
59
+ flex: 1;
60
+ justify-content: center;
61
+ `),E("loading",`
62
+ color: var(--n-loading-color);
63
+ font-size: var(--n-loading-size);
64
+ `),E("header",`
65
+ padding: 8px var(--n-option-padding-left);
66
+ font-size: var(--n-option-font-size);
67
+ transition:
68
+ color .3s var(--n-bezier),
69
+ border-color .3s var(--n-bezier);
70
+ border-bottom: 1px solid var(--n-action-divider-color);
71
+ color: var(--n-action-text-color);
72
+ `),E("action",`
73
+ padding: 8px var(--n-option-padding-left);
74
+ font-size: var(--n-option-font-size);
75
+ transition:
76
+ color .3s var(--n-bezier),
77
+ border-color .3s var(--n-bezier);
78
+ border-top: 1px solid var(--n-action-divider-color);
79
+ color: var(--n-action-text-color);
80
+ `),_("base-select-group-header",`
81
+ position: relative;
82
+ cursor: default;
83
+ padding: var(--n-option-padding);
84
+ color: var(--n-group-header-text-color);
85
+ `),_("base-select-option",`
86
+ cursor: pointer;
87
+ position: relative;
88
+ padding: var(--n-option-padding);
89
+ transition:
90
+ color .3s var(--n-bezier),
91
+ opacity .3s var(--n-bezier);
92
+ box-sizing: border-box;
93
+ color: var(--n-option-text-color);
94
+ opacity: 1;
95
+ `,[W("show-checkmark",`
96
+ padding-right: calc(var(--n-option-padding-right) + 20px);
97
+ `),q("&::before",`
98
+ content: "";
99
+ position: absolute;
100
+ left: 4px;
101
+ right: 4px;
102
+ top: 0;
103
+ bottom: 0;
104
+ border-radius: var(--n-border-radius);
105
+ transition: background-color .3s var(--n-bezier);
106
+ `),q("&:active",`
107
+ color: var(--n-option-text-color-pressed);
108
+ `),W("grouped",`
109
+ padding-left: calc(var(--n-option-padding-left) * 1.5);
110
+ `),W("pending",[q("&::before",`
111
+ background-color: var(--n-option-color-pending);
112
+ `)]),W("selected",`
113
+ color: var(--n-option-text-color-active);
114
+ `,[q("&::before",`
115
+ background-color: var(--n-option-color-active);
116
+ `),W("pending",[q("&::before",`
117
+ background-color: var(--n-option-color-active-pending);
118
+ `)])]),W("disabled",`
119
+ cursor: not-allowed;
120
+ `,[Ge("selected",`
121
+ color: var(--n-option-text-color-disabled);
122
+ `),W("selected",`
123
+ opacity: var(--n-option-opacity-disabled);
124
+ `)]),E("check",`
125
+ font-size: 16px;
126
+ position: absolute;
127
+ right: calc(var(--n-option-padding-right) - 4px);
128
+ top: calc(50% - 7px);
129
+ color: var(--n-option-check-color);
130
+ transition: color .3s var(--n-bezier);
131
+ `,[Do({enterScale:"0.5"})])])]),dl=re({name:"InternalSelectMenu",props:Object.assign(Object.assign({},ke.props),{clsPrefix:{type:String,required:!0},scrollable:{type:Boolean,default:!0},treeMate:{type:Object,required:!0},multiple:Boolean,size:{type:String,default:"medium"},value:{type:[String,Number,Array],default:null},autoPending:Boolean,virtualScroll:{type:Boolean,default:!0},show:{type:Boolean,default:!0},labelField:{type:String,default:"label"},valueField:{type:String,default:"value"},loading:Boolean,focusable:Boolean,renderLabel:Function,renderOption:Function,nodeProps:Function,showCheckmark:{type:Boolean,default:!0},onMousedown:Function,onScroll:Function,onFocus:Function,onBlur:Function,onKeyup:Function,onKeydown:Function,onTabOut:Function,onMouseenter:Function,onMouseleave:Function,onResize:Function,resetMenuOnOptionsChange:{type:Boolean,default:!0},inlineThemeDisabled:Boolean,onToggle:Function}),setup(e){const{mergedClsPrefixRef:t,mergedRtlRef:n}=Ue(e),o=Ct("InternalSelectMenu",n,t),r=ke("InternalSelectMenu","-internal-select-menu",cl,Si,e,be(e,"clsPrefix")),i=V(null),a=V(null),l=V(null),c=N(()=>e.treeMate.getFlattenedNodes()),s=N(()=>Ga(c.value)),d=V(null);function u(){const{treeMate:z}=e;let O=null;const{value:ie}=e;ie===null?O=z.getFirstAvailableNode():(e.multiple?O=z.getNode((ie||[])[(ie||[]).length-1]):O=z.getNode(ie),(!O||O.disabled)&&(O=z.getFirstAvailableNode())),T(O||null)}function h(){const{value:z}=d;z&&!e.treeMate.getNode(z.key)&&(d.value=null)}let g;Xe(()=>e.show,z=>{z?g=Xe(()=>e.treeMate,()=>{e.resetMenuOnOptionsChange?(e.autoPending?u():h(),kn(I)):h()},{immediate:!0}):g==null||g()},{immediate:!0}),vo(()=>{g==null||g()});const p=N(()=>Le(r.value.self[ce("optionHeight",e.size)])),w=N(()=>Pt(r.value.self[ce("padding",e.size)])),y=N(()=>e.multiple&&Array.isArray(e.value)?new Set(e.value):new Set),m=N(()=>{const z=c.value;return z&&z.length===0});function C(z){const{onToggle:O}=e;O&&O(z)}function f(z){const{onScroll:O}=e;O&&O(z)}function D(z){var O;(O=l.value)===null||O===void 0||O.sync(),f(z)}function b(){var z;(z=l.value)===null||z===void 0||z.sync()}function F(){const{value:z}=d;return z||null}function P(z,O){O.disabled||T(O,!1)}function S(z,O){O.disabled||C(O)}function $(z){var O;kt(z,"action")||(O=e.onKeyup)===null||O===void 0||O.call(e,z)}function j(z){var O;kt(z,"action")||(O=e.onKeydown)===null||O===void 0||O.call(e,z)}function K(z){var O;(O=e.onMousedown)===null||O===void 0||O.call(e,z),!e.focusable&&z.preventDefault()}function ae(){const{value:z}=d;z&&T(z.getNext({loop:!0}),!0)}function B(){const{value:z}=d;z&&T(z.getPrev({loop:!0}),!0)}function T(z,O=!1){d.value=z,O&&I()}function I(){var z,O;const ie=d.value;if(!ie)return;const Se=s.value(ie.key);Se!==null&&(e.virtualScroll?(z=a.value)===null||z===void 0||z.scrollTo({index:Se}):(O=l.value)===null||O===void 0||O.scrollTo({index:Se,elSize:p.value}))}function ee(z){var O,ie;!((O=i.value)===null||O===void 0)&&O.contains(z.target)&&((ie=e.onFocus)===null||ie===void 0||ie.call(e,z))}function ne(z){var O,ie;!((O=i.value)===null||O===void 0)&&O.contains(z.relatedTarget)||(ie=e.onBlur)===null||ie===void 0||ie.call(e,z)}pt(So,{handleOptionMouseEnter:P,handleOptionClick:S,valueSetRef:y,pendingTmNodeRef:d,nodePropsRef:be(e,"nodeProps"),showCheckmarkRef:be(e,"showCheckmark"),multipleRef:be(e,"multiple"),valueRef:be(e,"value"),renderLabelRef:be(e,"renderLabel"),renderOptionRef:be(e,"renderOption"),labelFieldRef:be(e,"labelField"),valueFieldRef:be(e,"valueField")}),pt(ga,i),Dt(()=>{const{value:z}=l;z&&z.sync()});const X=N(()=>{const{size:z}=e,{common:{cubicBezierEaseInOut:O},self:{height:ie,borderRadius:Se,color:ue,groupHeaderTextColor:_e,actionDividerColor:Fe,optionTextColorPressed:ze,optionTextColor:He,optionTextColorDisabled:$e,optionTextColorActive:Je,optionOpacityDisabled:ct,optionCheckColor:We,actionTextColor:Ke,optionColorPending:Ie,optionColorActive:Me,loadingColor:R,loadingSize:Z,optionColorActivePending:me,[ce("optionFontSize",z)]:De,[ce("optionHeight",z)]:ye,[ce("optionPadding",z)]:oe}}=r.value;return{"--n-height":ie,"--n-action-divider-color":Fe,"--n-action-text-color":Ke,"--n-bezier":O,"--n-border-radius":Se,"--n-color":ue,"--n-option-font-size":De,"--n-group-header-text-color":_e,"--n-option-check-color":We,"--n-option-color-pending":Ie,"--n-option-color-active":Me,"--n-option-color-active-pending":me,"--n-option-height":ye,"--n-option-opacity-disabled":ct,"--n-option-text-color":He,"--n-option-text-color-active":Je,"--n-option-text-color-disabled":$e,"--n-option-text-color-pressed":ze,"--n-option-padding":oe,"--n-option-padding-left":Pt(oe,"left"),"--n-option-padding-right":Pt(oe,"right"),"--n-loading-color":R,"--n-loading-size":Z}}),{inlineThemeDisabled:de}=e,Y=de?tt("internal-select-menu",N(()=>e.size[0]),X,e):void 0,le={selfRef:i,next:ae,prev:B,getPendingTmNode:F};return Ir(i,e.onResize),Object.assign({mergedTheme:r,mergedClsPrefix:t,rtlEnabled:o,virtualListRef:a,scrollbarRef:l,itemSize:p,padding:w,flattenedNodes:c,empty:m,virtualListContainer(){const{value:z}=a;return z==null?void 0:z.listElRef},virtualListContent(){const{value:z}=a;return z==null?void 0:z.itemsElRef},doScroll:f,handleFocusin:ee,handleFocusout:ne,handleKeyUp:$,handleKeyDown:j,handleMouseDown:K,handleVirtualListResize:b,handleVirtualListScroll:D,cssVars:de?void 0:X,themeClass:Y==null?void 0:Y.themeClass,onRender:Y==null?void 0:Y.onRender},le)},render(){const{$slots:e,virtualScroll:t,clsPrefix:n,mergedTheme:o,themeClass:r,onRender:i}=this;return i==null||i(),v("div",{ref:"selfRef",tabindex:this.focusable?0:-1,class:[`${n}-base-select-menu`,this.rtlEnabled&&`${n}-base-select-menu--rtl`,r,this.multiple&&`${n}-base-select-menu--multiple`],style:this.cssVars,onFocusin:this.handleFocusin,onFocusout:this.handleFocusout,onKeyup:this.handleKeyUp,onKeydown:this.handleKeyDown,onMousedown:this.handleMouseDown,onMouseenter:this.onMouseenter,onMouseleave:this.onMouseleave},qe(e.header,a=>a&&v("div",{class:`${n}-base-select-menu__header`,"data-header":!0,key:"header"},a)),this.loading?v("div",{class:`${n}-base-select-menu__loading`},v(gr,{clsPrefix:n,strokeWidth:20})):this.empty?v("div",{class:`${n}-base-select-menu__empty`,"data-empty":!0},Bi(e.empty,()=>[v(ul,{theme:o.peers.Empty,themeOverrides:o.peerOverrides.Empty,size:this.size})])):v(Ei,{ref:"scrollbarRef",theme:o.peers.Scrollbar,themeOverrides:o.peerOverrides.Scrollbar,scrollable:this.scrollable,container:t?this.virtualListContainer:void 0,content:t?this.virtualListContent:void 0,onScroll:t?void 0:this.doScroll},{default:()=>t?v(Ba,{ref:"virtualListRef",class:`${n}-virtual-list`,items:this.flattenedNodes,itemSize:this.itemSize,showScrollbar:!1,paddingTop:this.padding.top,paddingBottom:this.padding.bottom,onResize:this.handleVirtualListResize,onScroll:this.handleVirtualListScroll,itemResizable:!0},{default:({item:a})=>a.isGroup?v(Zo,{key:a.key,clsPrefix:n,tmNode:a}):a.ignored?null:v(Jo,{clsPrefix:n,key:a.key,tmNode:a})}):v("div",{class:`${n}-base-select-menu-option-wrapper`,style:{paddingTop:this.padding.top,paddingBottom:this.padding.bottom}},this.flattenedNodes.map(a=>a.isGroup?v(Zo,{key:a.key,clsPrefix:n,tmNode:a}):v(Jo,{clsPrefix:n,key:a.key,tmNode:a})))}),qe(e.action,a=>a&&[v("div",{class:`${n}-base-select-menu__action`,"data-action":!0,key:"action"},a),v(_a,{onFocus:this.onTabOut,key:"focus-detector"})]))}});function fl(e){const{textColor2:t,primaryColorHover:n,primaryColorPressed:o,primaryColor:r,infoColor:i,successColor:a,warningColor:l,errorColor:c,baseColor:s,borderColor:d,opacityDisabled:u,tagColor:h,closeIconColor:g,closeIconColorHover:p,closeIconColorPressed:w,borderRadiusSmall:y,fontSizeMini:m,fontSizeTiny:C,fontSizeSmall:f,fontSizeMedium:D,heightMini:b,heightTiny:F,heightSmall:P,heightMedium:S,closeColorHover:$,closeColorPressed:j,buttonColor2Hover:K,buttonColor2Pressed:ae,fontWeightStrong:B}=e;return Object.assign(Object.assign({},ki),{closeBorderRadius:y,heightTiny:b,heightSmall:F,heightMedium:P,heightLarge:S,borderRadius:y,opacityDisabled:u,fontSizeTiny:m,fontSizeSmall:C,fontSizeMedium:f,fontSizeLarge:D,fontWeightStrong:B,textColorCheckable:t,textColorHoverCheckable:t,textColorPressedCheckable:t,textColorChecked:s,colorCheckable:"#0000",colorHoverCheckable:K,colorPressedCheckable:ae,colorChecked:r,colorCheckedHover:n,colorCheckedPressed:o,border:`1px solid ${d}`,textColor:t,color:h,colorBordered:"rgb(250, 250, 252)",closeIconColor:g,closeIconColorHover:p,closeIconColorPressed:w,closeColorHover:$,closeColorPressed:j,borderPrimary:`1px solid ${we(r,{alpha:.3})}`,textColorPrimary:r,colorPrimary:we(r,{alpha:.12}),colorBorderedPrimary:we(r,{alpha:.1}),closeIconColorPrimary:r,closeIconColorHoverPrimary:r,closeIconColorPressedPrimary:r,closeColorHoverPrimary:we(r,{alpha:.12}),closeColorPressedPrimary:we(r,{alpha:.18}),borderInfo:`1px solid ${we(i,{alpha:.3})}`,textColorInfo:i,colorInfo:we(i,{alpha:.12}),colorBorderedInfo:we(i,{alpha:.1}),closeIconColorInfo:i,closeIconColorHoverInfo:i,closeIconColorPressedInfo:i,closeColorHoverInfo:we(i,{alpha:.12}),closeColorPressedInfo:we(i,{alpha:.18}),borderSuccess:`1px solid ${we(a,{alpha:.3})}`,textColorSuccess:a,colorSuccess:we(a,{alpha:.12}),colorBorderedSuccess:we(a,{alpha:.1}),closeIconColorSuccess:a,closeIconColorHoverSuccess:a,closeIconColorPressedSuccess:a,closeColorHoverSuccess:we(a,{alpha:.12}),closeColorPressedSuccess:we(a,{alpha:.18}),borderWarning:`1px solid ${we(l,{alpha:.35})}`,textColorWarning:l,colorWarning:we(l,{alpha:.15}),colorBorderedWarning:we(l,{alpha:.12}),closeIconColorWarning:l,closeIconColorHoverWarning:l,closeIconColorPressedWarning:l,closeColorHoverWarning:we(l,{alpha:.12}),closeColorPressedWarning:we(l,{alpha:.18}),borderError:`1px solid ${we(c,{alpha:.23})}`,textColorError:c,colorError:we(c,{alpha:.1}),colorBorderedError:we(c,{alpha:.08}),closeIconColorError:c,closeIconColorHoverError:c,closeIconColorPressedError:c,closeColorHoverError:we(c,{alpha:.12}),closeColorPressedError:we(c,{alpha:.18})})}const hl={common:Co,self:fl},pl={color:Object,type:{type:String,default:"default"},round:Boolean,size:{type:String,default:"medium"},closable:Boolean,disabled:{type:Boolean,default:void 0}},vl=_("tag",`
132
+ --n-close-margin: var(--n-close-margin-top) var(--n-close-margin-right) var(--n-close-margin-bottom) var(--n-close-margin-left);
133
+ white-space: nowrap;
134
+ position: relative;
135
+ box-sizing: border-box;
136
+ cursor: default;
137
+ display: inline-flex;
138
+ align-items: center;
139
+ flex-wrap: nowrap;
140
+ padding: var(--n-padding);
141
+ border-radius: var(--n-border-radius);
142
+ color: var(--n-text-color);
143
+ background-color: var(--n-color);
144
+ transition:
145
+ border-color .3s var(--n-bezier),
146
+ background-color .3s var(--n-bezier),
147
+ color .3s var(--n-bezier),
148
+ box-shadow .3s var(--n-bezier),
149
+ opacity .3s var(--n-bezier);
150
+ line-height: 1;
151
+ height: var(--n-height);
152
+ font-size: var(--n-font-size);
153
+ `,[W("strong",`
154
+ font-weight: var(--n-font-weight-strong);
155
+ `),E("border",`
156
+ pointer-events: none;
157
+ position: absolute;
158
+ left: 0;
159
+ right: 0;
160
+ top: 0;
161
+ bottom: 0;
162
+ border-radius: inherit;
163
+ border: var(--n-border);
164
+ transition: border-color .3s var(--n-bezier);
165
+ `),E("icon",`
166
+ display: flex;
167
+ margin: 0 4px 0 0;
168
+ color: var(--n-text-color);
169
+ transition: color .3s var(--n-bezier);
170
+ font-size: var(--n-avatar-size-override);
171
+ `),E("avatar",`
172
+ display: flex;
173
+ margin: 0 6px 0 0;
174
+ `),E("close",`
175
+ margin: var(--n-close-margin);
176
+ transition:
177
+ background-color .3s var(--n-bezier),
178
+ color .3s var(--n-bezier);
179
+ `),W("round",`
180
+ padding: 0 calc(var(--n-height) / 3);
181
+ border-radius: calc(var(--n-height) / 2);
182
+ `,[E("icon",`
183
+ margin: 0 4px 0 calc((var(--n-height) - 8px) / -2);
184
+ `),E("avatar",`
185
+ margin: 0 6px 0 calc((var(--n-height) - 8px) / -2);
186
+ `),W("closable",`
187
+ padding: 0 calc(var(--n-height) / 4) 0 calc(var(--n-height) / 3);
188
+ `)]),W("icon, avatar",[W("round",`
189
+ padding: 0 calc(var(--n-height) / 3) 0 calc(var(--n-height) / 2);
190
+ `)]),W("disabled",`
191
+ cursor: not-allowed !important;
192
+ opacity: var(--n-opacity-disabled);
193
+ `),W("checkable",`
194
+ cursor: pointer;
195
+ box-shadow: none;
196
+ color: var(--n-text-color-checkable);
197
+ background-color: var(--n-color-checkable);
198
+ `,[Ge("disabled",[q("&:hover","background-color: var(--n-color-hover-checkable);",[Ge("checked","color: var(--n-text-color-hover-checkable);")]),q("&:active","background-color: var(--n-color-pressed-checkable);",[Ge("checked","color: var(--n-text-color-pressed-checkable);")])]),W("checked",`
199
+ color: var(--n-text-color-checked);
200
+ background-color: var(--n-color-checked);
201
+ `,[Ge("disabled",[q("&:hover","background-color: var(--n-color-checked-hover);"),q("&:active","background-color: var(--n-color-checked-pressed);")])])])]),gl=Object.assign(Object.assign(Object.assign({},ke.props),pl),{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}),bl=Yt("n-tag"),jn=re({name:"Tag",props:gl,slots:Object,setup(e){const t=V(null),{mergedBorderedRef:n,mergedClsPrefixRef:o,inlineThemeDisabled:r,mergedRtlRef:i}=Ue(e),a=ke("Tag","-tag",vl,hl,e,o);pt(bl,{roundRef:be(e,"round")});function l(){if(!e.disabled&&e.checkable){const{checked:g,onCheckedChange:p,onUpdateChecked:w,"onUpdate:checked":y}=e;w&&w(!g),y&&y(!g),p&&p(!g)}}function c(g){if(e.triggerClickOnClose||g.stopPropagation(),!e.disabled){const{onClose:p}=e;p&&xe(p,g)}}const s={setTextContent(g){const{value:p}=t;p&&(p.textContent=g)}},d=Ct("Tag",i,o),u=N(()=>{const{type:g,size:p,color:{color:w,textColor:y}={}}=e,{common:{cubicBezierEaseInOut:m},self:{padding:C,closeMargin:f,borderRadius:D,opacityDisabled:b,textColorCheckable:F,textColorHoverCheckable:P,textColorPressedCheckable:S,textColorChecked:$,colorCheckable:j,colorHoverCheckable:K,colorPressedCheckable:ae,colorChecked:B,colorCheckedHover:T,colorCheckedPressed:I,closeBorderRadius:ee,fontWeightStrong:ne,[ce("colorBordered",g)]:X,[ce("closeSize",p)]:de,[ce("closeIconSize",p)]:Y,[ce("fontSize",p)]:le,[ce("height",p)]:z,[ce("color",g)]:O,[ce("textColor",g)]:ie,[ce("border",g)]:Se,[ce("closeIconColor",g)]:ue,[ce("closeIconColorHover",g)]:_e,[ce("closeIconColorPressed",g)]:Fe,[ce("closeColorHover",g)]:ze,[ce("closeColorPressed",g)]:He}}=a.value,$e=Pt(f);return{"--n-font-weight-strong":ne,"--n-avatar-size-override":`calc(${z} - 8px)`,"--n-bezier":m,"--n-border-radius":D,"--n-border":Se,"--n-close-icon-size":Y,"--n-close-color-pressed":He,"--n-close-color-hover":ze,"--n-close-border-radius":ee,"--n-close-icon-color":ue,"--n-close-icon-color-hover":_e,"--n-close-icon-color-pressed":Fe,"--n-close-icon-color-disabled":ue,"--n-close-margin-top":$e.top,"--n-close-margin-right":$e.right,"--n-close-margin-bottom":$e.bottom,"--n-close-margin-left":$e.left,"--n-close-size":de,"--n-color":w||(n.value?X:O),"--n-color-checkable":j,"--n-color-checked":B,"--n-color-checked-hover":T,"--n-color-checked-pressed":I,"--n-color-hover-checkable":K,"--n-color-pressed-checkable":ae,"--n-font-size":le,"--n-height":z,"--n-opacity-disabled":b,"--n-padding":C,"--n-text-color":y||ie,"--n-text-color-checkable":F,"--n-text-color-checked":$,"--n-text-color-hover-checkable":P,"--n-text-color-pressed-checkable":S}}),h=r?tt("tag",N(()=>{let g="";const{type:p,size:w,color:{color:y,textColor:m}={}}=e;return g+=p[0],g+=w[0],y&&(g+=`a${$o(y)}`),m&&(g+=`b${$o(m)}`),n.value&&(g+="c"),g}),u,e):void 0;return Object.assign(Object.assign({},s),{rtlEnabled:d,mergedClsPrefix:o,contentRef:t,mergedBordered:n,handleClick:l,handleCloseClick:c,cssVars:r?void 0:u,themeClass:h==null?void 0:h.themeClass,onRender:h==null?void 0:h.onRender})},render(){var e,t;const{mergedClsPrefix:n,rtlEnabled:o,closable:r,color:{borderColor:i}={},round:a,onRender:l,$slots:c}=this;l==null||l();const s=qe(c.avatar,u=>u&&v("div",{class:`${n}-tag__avatar`},u)),d=qe(c.icon,u=>u&&v("div",{class:`${n}-tag__icon`},u));return v("div",{class:[`${n}-tag`,this.themeClass,{[`${n}-tag--rtl`]:o,[`${n}-tag--strong`]:this.strong,[`${n}-tag--disabled`]:this.disabled,[`${n}-tag--checkable`]:this.checkable,[`${n}-tag--checked`]:this.checkable&&this.checked,[`${n}-tag--round`]:a,[`${n}-tag--avatar`]:s,[`${n}-tag--icon`]:d,[`${n}-tag--closable`]:r}],style:this.cssVars,onClick:this.handleClick,onMouseenter:this.onMouseenter,onMouseleave:this.onMouseleave},d||s,v("span",{class:`${n}-tag__content`,ref:"contentRef"},(t=(e=this.$slots).default)===null||t===void 0?void 0:t.call(e)),!this.checkable&&r?v(Ri,{clsPrefix:n,class:`${n}-tag__close`,disabled:this.disabled,onClick:this.handleCloseClick,focusable:this.internalCloseFocusable,round:a,isButtonTag:this.internalCloseIsButtonTag,absolute:!0}):null,!this.checkable&&this.mergedBordered?v("div",{class:`${n}-tag__border`,style:{borderColor:i}}):null)}}),ml=q([_("base-selection",`
202
+ --n-padding-single: var(--n-padding-single-top) var(--n-padding-single-right) var(--n-padding-single-bottom) var(--n-padding-single-left);
203
+ --n-padding-multiple: var(--n-padding-multiple-top) var(--n-padding-multiple-right) var(--n-padding-multiple-bottom) var(--n-padding-multiple-left);
204
+ position: relative;
205
+ z-index: auto;
206
+ box-shadow: none;
207
+ width: 100%;
208
+ max-width: 100%;
209
+ display: inline-block;
210
+ vertical-align: bottom;
211
+ border-radius: var(--n-border-radius);
212
+ min-height: var(--n-height);
213
+ line-height: 1.5;
214
+ font-size: var(--n-font-size);
215
+ `,[_("base-loading",`
216
+ color: var(--n-loading-color);
217
+ `),_("base-selection-tags","min-height: var(--n-height);"),E("border, state-border",`
218
+ position: absolute;
219
+ left: 0;
220
+ right: 0;
221
+ top: 0;
222
+ bottom: 0;
223
+ pointer-events: none;
224
+ border: var(--n-border);
225
+ border-radius: inherit;
226
+ transition:
227
+ box-shadow .3s var(--n-bezier),
228
+ border-color .3s var(--n-bezier);
229
+ `),E("state-border",`
230
+ z-index: 1;
231
+ border-color: #0000;
232
+ `),_("base-suffix",`
233
+ cursor: pointer;
234
+ position: absolute;
235
+ top: 50%;
236
+ transform: translateY(-50%);
237
+ right: 10px;
238
+ `,[E("arrow",`
239
+ font-size: var(--n-arrow-size);
240
+ color: var(--n-arrow-color);
241
+ transition: color .3s var(--n-bezier);
242
+ `)]),_("base-selection-overlay",`
243
+ display: flex;
244
+ align-items: center;
245
+ white-space: nowrap;
246
+ pointer-events: none;
247
+ position: absolute;
248
+ top: 0;
249
+ right: 0;
250
+ bottom: 0;
251
+ left: 0;
252
+ padding: var(--n-padding-single);
253
+ transition: color .3s var(--n-bezier);
254
+ `,[E("wrapper",`
255
+ flex-basis: 0;
256
+ flex-grow: 1;
257
+ overflow: hidden;
258
+ text-overflow: ellipsis;
259
+ `)]),_("base-selection-placeholder",`
260
+ color: var(--n-placeholder-color);
261
+ `,[E("inner",`
262
+ max-width: 100%;
263
+ overflow: hidden;
264
+ `)]),_("base-selection-tags",`
265
+ cursor: pointer;
266
+ outline: none;
267
+ box-sizing: border-box;
268
+ position: relative;
269
+ z-index: auto;
270
+ display: flex;
271
+ padding: var(--n-padding-multiple);
272
+ flex-wrap: wrap;
273
+ align-items: center;
274
+ width: 100%;
275
+ vertical-align: bottom;
276
+ background-color: var(--n-color);
277
+ border-radius: inherit;
278
+ transition:
279
+ color .3s var(--n-bezier),
280
+ box-shadow .3s var(--n-bezier),
281
+ background-color .3s var(--n-bezier);
282
+ `),_("base-selection-label",`
283
+ height: var(--n-height);
284
+ display: inline-flex;
285
+ width: 100%;
286
+ vertical-align: bottom;
287
+ cursor: pointer;
288
+ outline: none;
289
+ z-index: auto;
290
+ box-sizing: border-box;
291
+ position: relative;
292
+ transition:
293
+ color .3s var(--n-bezier),
294
+ box-shadow .3s var(--n-bezier),
295
+ background-color .3s var(--n-bezier);
296
+ border-radius: inherit;
297
+ background-color: var(--n-color);
298
+ align-items: center;
299
+ `,[_("base-selection-input",`
300
+ font-size: inherit;
301
+ line-height: inherit;
302
+ outline: none;
303
+ cursor: pointer;
304
+ box-sizing: border-box;
305
+ border:none;
306
+ width: 100%;
307
+ padding: var(--n-padding-single);
308
+ background-color: #0000;
309
+ color: var(--n-text-color);
310
+ transition: color .3s var(--n-bezier);
311
+ caret-color: var(--n-caret-color);
312
+ `,[E("content",`
313
+ text-overflow: ellipsis;
314
+ overflow: hidden;
315
+ white-space: nowrap;
316
+ `)]),E("render-label",`
317
+ color: var(--n-text-color);
318
+ `)]),Ge("disabled",[q("&:hover",[E("state-border",`
319
+ box-shadow: var(--n-box-shadow-hover);
320
+ border: var(--n-border-hover);
321
+ `)]),W("focus",[E("state-border",`
322
+ box-shadow: var(--n-box-shadow-focus);
323
+ border: var(--n-border-focus);
324
+ `)]),W("active",[E("state-border",`
325
+ box-shadow: var(--n-box-shadow-active);
326
+ border: var(--n-border-active);
327
+ `),_("base-selection-label","background-color: var(--n-color-active);"),_("base-selection-tags","background-color: var(--n-color-active);")])]),W("disabled","cursor: not-allowed;",[E("arrow",`
328
+ color: var(--n-arrow-color-disabled);
329
+ `),_("base-selection-label",`
330
+ cursor: not-allowed;
331
+ background-color: var(--n-color-disabled);
332
+ `,[_("base-selection-input",`
333
+ cursor: not-allowed;
334
+ color: var(--n-text-color-disabled);
335
+ `),E("render-label",`
336
+ color: var(--n-text-color-disabled);
337
+ `)]),_("base-selection-tags",`
338
+ cursor: not-allowed;
339
+ background-color: var(--n-color-disabled);
340
+ `),_("base-selection-placeholder",`
341
+ cursor: not-allowed;
342
+ color: var(--n-placeholder-color-disabled);
343
+ `)]),_("base-selection-input-tag",`
344
+ height: calc(var(--n-height) - 6px);
345
+ line-height: calc(var(--n-height) - 6px);
346
+ outline: none;
347
+ display: none;
348
+ position: relative;
349
+ margin-bottom: 3px;
350
+ max-width: 100%;
351
+ vertical-align: bottom;
352
+ `,[E("input",`
353
+ font-size: inherit;
354
+ font-family: inherit;
355
+ min-width: 1px;
356
+ padding: 0;
357
+ background-color: #0000;
358
+ outline: none;
359
+ border: none;
360
+ max-width: 100%;
361
+ overflow: hidden;
362
+ width: 1em;
363
+ line-height: inherit;
364
+ cursor: pointer;
365
+ color: var(--n-text-color);
366
+ caret-color: var(--n-caret-color);
367
+ `),E("mirror",`
368
+ position: absolute;
369
+ left: 0;
370
+ top: 0;
371
+ white-space: pre;
372
+ visibility: hidden;
373
+ user-select: none;
374
+ -webkit-user-select: none;
375
+ opacity: 0;
376
+ `)]),["warning","error"].map(e=>W(`${e}-status`,[E("state-border",`border: var(--n-border-${e});`),Ge("disabled",[q("&:hover",[E("state-border",`
377
+ box-shadow: var(--n-box-shadow-hover-${e});
378
+ border: var(--n-border-hover-${e});
379
+ `)]),W("active",[E("state-border",`
380
+ box-shadow: var(--n-box-shadow-active-${e});
381
+ border: var(--n-border-active-${e});
382
+ `),_("base-selection-label",`background-color: var(--n-color-active-${e});`),_("base-selection-tags",`background-color: var(--n-color-active-${e});`)]),W("focus",[E("state-border",`
383
+ box-shadow: var(--n-box-shadow-focus-${e});
384
+ border: var(--n-border-focus-${e});
385
+ `)])])]))]),_("base-selection-popover",`
386
+ margin-bottom: -3px;
387
+ display: flex;
388
+ flex-wrap: wrap;
389
+ margin-right: -8px;
390
+ `),_("base-selection-tag-wrapper",`
391
+ max-width: 100%;
392
+ display: inline-flex;
393
+ padding: 0 7px 3px 0;
394
+ `,[q("&:last-child","padding-right: 0;"),_("tag",`
395
+ font-size: 14px;
396
+ max-width: 100%;
397
+ `,[E("content",`
398
+ line-height: 1.25;
399
+ text-overflow: ellipsis;
400
+ overflow: hidden;
401
+ `)])])]),Dl=re({name:"InternalSelection",props:Object.assign(Object.assign({},ke.props),{clsPrefix:{type:String,required:!0},bordered:{type:Boolean,default:void 0},active:Boolean,pattern:{type:String,default:""},placeholder:String,selectedOption:{type:Object,default:null},selectedOptions:{type:Array,default:null},labelField:{type:String,default:"label"},valueField:{type:String,default:"value"},multiple:Boolean,filterable:Boolean,clearable:Boolean,disabled:Boolean,size:{type:String,default:"medium"},loading:Boolean,autofocus:Boolean,showArrow:{type:Boolean,default:!0},inputProps:Object,focused:Boolean,renderTag:Function,onKeydown:Function,onClick:Function,onBlur:Function,onFocus:Function,onDeleteOption:Function,maxTagCount:[String,Number],ellipsisTagPopoverProps:Object,onClear:Function,onPatternInput:Function,onPatternFocus:Function,onPatternBlur:Function,renderLabel:Function,status:String,inlineThemeDisabled:Boolean,ignoreComposition:{type:Boolean,default:!0},onResize:Function}),setup(e){const{mergedClsPrefixRef:t,mergedRtlRef:n}=Ue(e),o=Ct("InternalSelection",n,t),r=V(null),i=V(null),a=V(null),l=V(null),c=V(null),s=V(null),d=V(null),u=V(null),h=V(null),g=V(null),p=V(!1),w=V(!1),y=V(!1),m=ke("InternalSelection","-internal-selection",ml,Pi,e,be(e,"clsPrefix")),C=N(()=>e.clearable&&!e.disabled&&(y.value||e.active)),f=N(()=>e.selectedOption?e.renderTag?e.renderTag({option:e.selectedOption,handleClose:()=>{}}):e.renderLabel?e.renderLabel(e.selectedOption,!0):It(e.selectedOption[e.labelField],e.selectedOption,!0):e.placeholder),D=N(()=>{const k=e.selectedOption;if(k)return k[e.labelField]}),b=N(()=>e.multiple?!!(Array.isArray(e.selectedOptions)&&e.selectedOptions.length):e.selectedOption!==null);function F(){var k;const{value:M}=r;if(M){const{value:Ce}=i;Ce&&(Ce.style.width=`${M.offsetWidth}px`,e.maxTagCount!=="responsive"&&((k=h.value)===null||k===void 0||k.sync({showAllItemsBeforeCalculate:!1})))}}function P(){const{value:k}=g;k&&(k.style.display="none")}function S(){const{value:k}=g;k&&(k.style.display="inline-block")}Xe(be(e,"active"),k=>{k||P()}),Xe(be(e,"pattern"),()=>{e.multiple&&kn(F)});function $(k){const{onFocus:M}=e;M&&M(k)}function j(k){const{onBlur:M}=e;M&&M(k)}function K(k){const{onDeleteOption:M}=e;M&&M(k)}function ae(k){const{onClear:M}=e;M&&M(k)}function B(k){const{onPatternInput:M}=e;M&&M(k)}function T(k){var M;(!k.relatedTarget||!(!((M=a.value)===null||M===void 0)&&M.contains(k.relatedTarget)))&&$(k)}function I(k){var M;!((M=a.value)===null||M===void 0)&&M.contains(k.relatedTarget)||j(k)}function ee(k){ae(k)}function ne(){y.value=!0}function X(){y.value=!1}function de(k){!e.active||!e.filterable||k.target!==i.value&&k.preventDefault()}function Y(k){K(k)}const le=V(!1);function z(k){if(k.key==="Backspace"&&!le.value&&!e.pattern.length){const{selectedOptions:M}=e;M!=null&&M.length&&Y(M[M.length-1])}}let O=null;function ie(k){const{value:M}=r;if(M){const Ce=k.target.value;M.textContent=Ce,F()}e.ignoreComposition&&le.value?O=k:B(k)}function Se(){le.value=!0}function ue(){le.value=!1,e.ignoreComposition&&B(O),O=null}function _e(k){var M;w.value=!0,(M=e.onPatternFocus)===null||M===void 0||M.call(e,k)}function Fe(k){var M;w.value=!1,(M=e.onPatternBlur)===null||M===void 0||M.call(e,k)}function ze(){var k,M;if(e.filterable)w.value=!1,(k=s.value)===null||k===void 0||k.blur(),(M=i.value)===null||M===void 0||M.blur();else if(e.multiple){const{value:Ce}=l;Ce==null||Ce.blur()}else{const{value:Ce}=c;Ce==null||Ce.blur()}}function He(){var k,M,Ce;e.filterable?(w.value=!1,(k=s.value)===null||k===void 0||k.focus()):e.multiple?(M=l.value)===null||M===void 0||M.focus():(Ce=c.value)===null||Ce===void 0||Ce.focus()}function $e(){const{value:k}=i;k&&(S(),k.focus())}function Je(){const{value:k}=i;k&&k.blur()}function ct(k){const{value:M}=d;M&&M.setTextContent(`+${k}`)}function We(){const{value:k}=u;return k}function Ke(){return i.value}let Ie=null;function Me(){Ie!==null&&window.clearTimeout(Ie)}function R(){e.active||(Me(),Ie=window.setTimeout(()=>{b.value&&(p.value=!0)},100))}function Z(){Me()}function me(k){k||(Me(),p.value=!1)}Xe(b,k=>{k||(p.value=!1)}),Dt(()=>{zn(()=>{const k=s.value;k&&(e.disabled?k.removeAttribute("tabindex"):k.tabIndex=w.value?-1:0)})}),Ir(a,e.onResize);const{inlineThemeDisabled:De}=e,ye=N(()=>{const{size:k}=e,{common:{cubicBezierEaseInOut:M},self:{fontWeight:Ce,borderRadius:Nt,color:Ut,placeholderColor:tn,textColor:nn,paddingSingle:on,paddingMultiple:_n,caretColor:$n,colorDisabled:rn,textColorDisabled:dt,placeholderColorDisabled:x,colorActive:U,boxShadowFocus:Q,boxShadowActive:ge,boxShadowHover:pe,border:fe,borderFocus:ve,borderHover:Pe,borderActive:Ye,arrowColor:Zr,arrowColorDisabled:Jr,loadingColor:Yr,colorActiveWarning:Qr,boxShadowFocusWarning:ei,boxShadowActiveWarning:ti,boxShadowHoverWarning:ni,borderWarning:oi,borderFocusWarning:ri,borderHoverWarning:ii,borderActiveWarning:ai,colorActiveError:li,boxShadowFocusError:ui,boxShadowActiveError:si,boxShadowHoverError:ci,borderError:di,borderFocusError:fi,borderHoverError:hi,borderActiveError:pi,clearColor:vi,clearColorHover:gi,clearColorPressed:bi,clearSize:mi,arrowSize:Di,[ce("height",k)]:Ci,[ce("fontSize",k)]:wi}}=m.value,an=Pt(on),ln=Pt(_n);return{"--n-bezier":M,"--n-border":fe,"--n-border-active":Ye,"--n-border-focus":ve,"--n-border-hover":Pe,"--n-border-radius":Nt,"--n-box-shadow-active":ge,"--n-box-shadow-focus":Q,"--n-box-shadow-hover":pe,"--n-caret-color":$n,"--n-color":Ut,"--n-color-active":U,"--n-color-disabled":rn,"--n-font-size":wi,"--n-height":Ci,"--n-padding-single-top":an.top,"--n-padding-multiple-top":ln.top,"--n-padding-single-right":an.right,"--n-padding-multiple-right":ln.right,"--n-padding-single-left":an.left,"--n-padding-multiple-left":ln.left,"--n-padding-single-bottom":an.bottom,"--n-padding-multiple-bottom":ln.bottom,"--n-placeholder-color":tn,"--n-placeholder-color-disabled":x,"--n-text-color":nn,"--n-text-color-disabled":dt,"--n-arrow-color":Zr,"--n-arrow-color-disabled":Jr,"--n-loading-color":Yr,"--n-color-active-warning":Qr,"--n-box-shadow-focus-warning":ei,"--n-box-shadow-active-warning":ti,"--n-box-shadow-hover-warning":ni,"--n-border-warning":oi,"--n-border-focus-warning":ri,"--n-border-hover-warning":ii,"--n-border-active-warning":ai,"--n-color-active-error":li,"--n-box-shadow-focus-error":ui,"--n-box-shadow-active-error":si,"--n-box-shadow-hover-error":ci,"--n-border-error":di,"--n-border-focus-error":fi,"--n-border-hover-error":hi,"--n-border-active-error":pi,"--n-clear-size":mi,"--n-clear-color":vi,"--n-clear-color-hover":gi,"--n-clear-color-pressed":bi,"--n-arrow-size":Di,"--n-font-weight":Ce}}),oe=De?tt("internal-selection",N(()=>e.size[0]),ye,e):void 0;return{mergedTheme:m,mergedClearable:C,mergedClsPrefix:t,rtlEnabled:o,patternInputFocused:w,filterablePlaceholder:f,label:D,selected:b,showTagsPanel:p,isComposing:le,counterRef:d,counterWrapperRef:u,patternInputMirrorRef:r,patternInputRef:i,selfRef:a,multipleElRef:l,singleElRef:c,patternInputWrapperRef:s,overflowRef:h,inputTagElRef:g,handleMouseDown:de,handleFocusin:T,handleClear:ee,handleMouseEnter:ne,handleMouseLeave:X,handleDeleteOption:Y,handlePatternKeyDown:z,handlePatternInputInput:ie,handlePatternInputBlur:Fe,handlePatternInputFocus:_e,handleMouseEnterCounter:R,handleMouseLeaveCounter:Z,handleFocusout:I,handleCompositionEnd:ue,handleCompositionStart:Se,onPopoverUpdateShow:me,focus:He,focusInput:$e,blur:ze,blurInput:Je,updateCounter:ct,getCounter:We,getTail:Ke,renderLabel:e.renderLabel,cssVars:De?void 0:ye,themeClass:oe==null?void 0:oe.themeClass,onRender:oe==null?void 0:oe.onRender}},render(){const{status:e,multiple:t,size:n,disabled:o,filterable:r,maxTagCount:i,bordered:a,clsPrefix:l,ellipsisTagPopoverProps:c,onRender:s,renderTag:d,renderLabel:u}=this;s==null||s();const h=i==="responsive",g=typeof i=="number",p=h||g,w=v(zi,null,{default:()=>v(Ii,{clsPrefix:l,loading:this.loading,showArrow:this.showArrow,showClear:this.mergedClearable&&this.selected,onClear:this.handleClear},{default:()=>{var m,C;return(C=(m=this.$slots).arrow)===null||C===void 0?void 0:C.call(m)}})});let y;if(t){const{labelField:m}=this,C=B=>v("div",{class:`${l}-base-selection-tag-wrapper`,key:B.value},d?d({option:B,handleClose:()=>{this.handleDeleteOption(B)}}):v(jn,{size:n,closable:!B.disabled,disabled:o,onClose:()=>{this.handleDeleteOption(B)},internalCloseIsButtonTag:!1,internalCloseFocusable:!1},{default:()=>u?u(B,!0):It(B[m],B,!0)})),f=()=>(g?this.selectedOptions.slice(0,i):this.selectedOptions).map(C),D=r?v("div",{class:`${l}-base-selection-input-tag`,ref:"inputTagElRef",key:"__input-tag__"},v("input",Object.assign({},this.inputProps,{ref:"patternInputRef",tabindex:-1,disabled:o,value:this.pattern,autofocus:this.autofocus,class:`${l}-base-selection-input-tag__input`,onBlur:this.handlePatternInputBlur,onFocus:this.handlePatternInputFocus,onKeydown:this.handlePatternKeyDown,onInput:this.handlePatternInputInput,onCompositionstart:this.handleCompositionStart,onCompositionend:this.handleCompositionEnd})),v("span",{ref:"patternInputMirrorRef",class:`${l}-base-selection-input-tag__mirror`},this.pattern)):null,b=h?()=>v("div",{class:`${l}-base-selection-tag-wrapper`,ref:"counterWrapperRef"},v(jn,{size:n,ref:"counterRef",onMouseenter:this.handleMouseEnterCounter,onMouseleave:this.handleMouseLeaveCounter,disabled:o})):void 0;let F;if(g){const B=this.selectedOptions.length-i;B>0&&(F=v("div",{class:`${l}-base-selection-tag-wrapper`,key:"__counter__"},v(jn,{size:n,ref:"counterRef",onMouseenter:this.handleMouseEnterCounter,disabled:o},{default:()=>`+${B}`})))}const P=h?r?v(Go,{ref:"overflowRef",updateCounter:this.updateCounter,getCounter:this.getCounter,getTail:this.getTail,style:{width:"100%",display:"flex",overflow:"hidden"}},{default:f,counter:b,tail:()=>D}):v(Go,{ref:"overflowRef",updateCounter:this.updateCounter,getCounter:this.getCounter,style:{width:"100%",display:"flex",overflow:"hidden"}},{default:f,counter:b}):g&&F?f().concat(F):f(),S=p?()=>v("div",{class:`${l}-base-selection-popover`},h?f():this.selectedOptions.map(C)):void 0,$=p?Object.assign({show:this.showTagsPanel,trigger:"hover",overlap:!0,placement:"top",width:"trigger",onUpdateShow:this.onPopoverUpdateShow,theme:this.mergedTheme.peers.Popover,themeOverrides:this.mergedTheme.peerOverrides.Popover},c):null,K=(this.selected?!1:this.active?!this.pattern&&!this.isComposing:!0)?v("div",{class:`${l}-base-selection-placeholder ${l}-base-selection-overlay`},v("div",{class:`${l}-base-selection-placeholder__inner`},this.placeholder)):null,ae=r?v("div",{ref:"patternInputWrapperRef",class:`${l}-base-selection-tags`},P,h?null:D,w):v("div",{ref:"multipleElRef",class:`${l}-base-selection-tags`,tabindex:o?void 0:0},P,w);y=v(wo,null,p?v(ba,Object.assign({},$,{scrollable:!0,style:"max-height: calc(var(--v-target-height) * 6.6);"}),{trigger:()=>ae,default:S}):ae,K)}else if(r){const m=this.pattern||this.isComposing,C=this.active?!m:!this.selected,f=this.active?!1:this.selected;y=v("div",{ref:"patternInputWrapperRef",class:`${l}-base-selection-label`,title:this.patternInputFocused?void 0:Ko(this.label)},v("input",Object.assign({},this.inputProps,{ref:"patternInputRef",class:`${l}-base-selection-input`,value:this.active?this.pattern:"",placeholder:"",readonly:o,disabled:o,tabindex:-1,autofocus:this.autofocus,onFocus:this.handlePatternInputFocus,onBlur:this.handlePatternInputBlur,onInput:this.handlePatternInputInput,onCompositionstart:this.handleCompositionStart,onCompositionend:this.handleCompositionEnd})),f?v("div",{class:`${l}-base-selection-label__render-label ${l}-base-selection-overlay`,key:"input"},v("div",{class:`${l}-base-selection-overlay__wrapper`},d?d({option:this.selectedOption,handleClose:()=>{}}):u?u(this.selectedOption,!0):It(this.label,this.selectedOption,!0))):null,C?v("div",{class:`${l}-base-selection-placeholder ${l}-base-selection-overlay`,key:"placeholder"},v("div",{class:`${l}-base-selection-overlay__wrapper`},this.filterablePlaceholder)):null,w)}else y=v("div",{ref:"singleElRef",class:`${l}-base-selection-label`,tabindex:this.disabled?void 0:0},this.label!==void 0?v("div",{class:`${l}-base-selection-input`,title:Ko(this.label),key:"input"},v("div",{class:`${l}-base-selection-input__content`},d?d({option:this.selectedOption,handleClose:()=>{}}):u?u(this.selectedOption,!0):It(this.label,this.selectedOption,!0))):v("div",{class:`${l}-base-selection-placeholder ${l}-base-selection-overlay`,key:"placeholder"},v("div",{class:`${l}-base-selection-placeholder__inner`},this.placeholder)),w);return v("div",{ref:"selfRef",class:[`${l}-base-selection`,this.rtlEnabled&&`${l}-base-selection--rtl`,this.themeClass,e&&`${l}-base-selection--${e}-status`,{[`${l}-base-selection--active`]:this.active,[`${l}-base-selection--selected`]:this.selected||this.active&&this.pattern,[`${l}-base-selection--disabled`]:this.disabled,[`${l}-base-selection--multiple`]:this.multiple,[`${l}-base-selection--focus`]:this.focused}],style:this.cssVars,onClick:this.onClick,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onKeydown:this.onKeydown,onFocusin:this.handleFocusin,onFocusout:this.handleFocusout,onMousedown:this.handleMouseDown},y,a?v("div",{class:`${l}-base-selection__border`}):null,a?v("div",{class:`${l}-base-selection__state-border`}):null)}}),Cl=_("input-group",`
402
+ display: inline-flex;
403
+ width: 100%;
404
+ flex-wrap: nowrap;
405
+ vertical-align: bottom;
406
+ `,[q(">",[_("input",[q("&:not(:last-child)",`
407
+ border-top-right-radius: 0!important;
408
+ border-bottom-right-radius: 0!important;
409
+ `),q("&:not(:first-child)",`
410
+ border-top-left-radius: 0!important;
411
+ border-bottom-left-radius: 0!important;
412
+ margin-left: -1px!important;
413
+ `)]),_("button",[q("&:not(:last-child)",`
414
+ border-top-right-radius: 0!important;
415
+ border-bottom-right-radius: 0!important;
416
+ `,[E("state-border, border",`
417
+ border-top-right-radius: 0!important;
418
+ border-bottom-right-radius: 0!important;
419
+ `)]),q("&:not(:first-child)",`
420
+ border-top-left-radius: 0!important;
421
+ border-bottom-left-radius: 0!important;
422
+ `,[E("state-border, border",`
423
+ border-top-left-radius: 0!important;
424
+ border-bottom-left-radius: 0!important;
425
+ `)])]),q("*",[q("&:not(:last-child)",`
426
+ border-top-right-radius: 0!important;
427
+ border-bottom-right-radius: 0!important;
428
+ `,[q(">",[_("input",`
429
+ border-top-right-radius: 0!important;
430
+ border-bottom-right-radius: 0!important;
431
+ `),_("base-selection",[_("base-selection-label",`
432
+ border-top-right-radius: 0!important;
433
+ border-bottom-right-radius: 0!important;
434
+ `),_("base-selection-tags",`
435
+ border-top-right-radius: 0!important;
436
+ border-bottom-right-radius: 0!important;
437
+ `),E("box-shadow, border, state-border",`
438
+ border-top-right-radius: 0!important;
439
+ border-bottom-right-radius: 0!important;
440
+ `)])])]),q("&:not(:first-child)",`
441
+ margin-left: -1px!important;
442
+ border-top-left-radius: 0!important;
443
+ border-bottom-left-radius: 0!important;
444
+ `,[q(">",[_("input",`
445
+ border-top-left-radius: 0!important;
446
+ border-bottom-left-radius: 0!important;
447
+ `),_("base-selection",[_("base-selection-label",`
448
+ border-top-left-radius: 0!important;
449
+ border-bottom-left-radius: 0!important;
450
+ `),_("base-selection-tags",`
451
+ border-top-left-radius: 0!important;
452
+ border-bottom-left-radius: 0!important;
453
+ `),E("box-shadow, border, state-border",`
454
+ border-top-left-radius: 0!important;
455
+ border-bottom-left-radius: 0!important;
456
+ `)])])])])])]),wl={},yl=re({name:"InputGroup",props:wl,setup(e){const{mergedClsPrefixRef:t}=Ue(e);return _i("-input-group",Cl,t),{mergedClsPrefix:t}},render(){const{mergedClsPrefix:e}=this;return v("div",{class:`${e}-input-group`},this.$slots)}});function Fn(e){return e.type==="group"}function $r(e){return e.type==="ignored"}function Hn(e,t){try{return!!(1+t.toString().toLowerCase().indexOf(e.trim().toLowerCase()))}catch{return!1}}function xl(e,t){return{getIsGroup:Fn,getIgnored:$r,getKey(o){return Fn(o)?o.name||o.key||"key-required":o[e]},getChildren(o){return o[t]}}}function Fl(e,t,n,o){if(!t)return e;function r(i){if(!Array.isArray(i))return[];const a=[];for(const l of i)if(Fn(l)){const c=r(l[o]);c.length&&a.push(Object.assign({},l,{[o]:c}))}else{if($r(l))continue;t(n,l)&&a.push(l)}return a}return r(e)}function Al(e,t,n){const o=new Map;return e.forEach(r=>{Fn(r)?r[n].forEach(i=>{o.set(i[t],i)}):o.set(r[t],r)}),o}const El=_("collapse","width: 100%;",[_("collapse-item",`
457
+ font-size: var(--n-font-size);
458
+ color: var(--n-text-color);
459
+ transition:
460
+ color .3s var(--n-bezier),
461
+ border-color .3s var(--n-bezier);
462
+ margin: var(--n-item-margin);
463
+ `,[W("disabled",[E("header","cursor: not-allowed;",[E("header-main",`
464
+ color: var(--n-title-text-color-disabled);
465
+ `),_("collapse-item-arrow",`
466
+ color: var(--n-arrow-color-disabled);
467
+ `)])]),_("collapse-item","margin-left: 32px;"),q("&:first-child","margin-top: 0;"),q("&:first-child >",[E("header","padding-top: 0;")]),W("left-arrow-placement",[E("header",[_("collapse-item-arrow","margin-right: 4px;")])]),W("right-arrow-placement",[E("header",[_("collapse-item-arrow","margin-left: 4px;")])]),E("content-wrapper",[E("content-inner","padding-top: 16px;"),$i({duration:"0.15s"})]),W("active",[E("header",[W("active",[_("collapse-item-arrow","transform: rotate(90deg);")])])]),q("&:not(:first-child)","border-top: 1px solid var(--n-divider-color);"),Ge("disabled",[W("trigger-area-main",[E("header",[E("header-main","cursor: pointer;"),_("collapse-item-arrow","cursor: default;")])]),W("trigger-area-arrow",[E("header",[_("collapse-item-arrow","cursor: pointer;")])]),W("trigger-area-extra",[E("header",[E("header-extra","cursor: pointer;")])])]),E("header",`
468
+ font-size: var(--n-title-font-size);
469
+ display: flex;
470
+ flex-wrap: nowrap;
471
+ align-items: center;
472
+ transition: color .3s var(--n-bezier);
473
+ position: relative;
474
+ padding: var(--n-title-padding);
475
+ color: var(--n-title-text-color);
476
+ `,[E("header-main",`
477
+ display: flex;
478
+ flex-wrap: nowrap;
479
+ align-items: center;
480
+ font-weight: var(--n-title-font-weight);
481
+ transition: color .3s var(--n-bezier);
482
+ flex: 1;
483
+ color: var(--n-title-text-color);
484
+ `),E("header-extra",`
485
+ display: flex;
486
+ align-items: center;
487
+ transition: color .3s var(--n-bezier);
488
+ color: var(--n-text-color);
489
+ `),_("collapse-item-arrow",`
490
+ display: flex;
491
+ transition:
492
+ transform .15s var(--n-bezier),
493
+ color .3s var(--n-bezier);
494
+ font-size: 18px;
495
+ color: var(--n-arrow-color);
496
+ `)])])]),Bl=Object.assign(Object.assign({},ke.props),{defaultExpandedNames:{type:[Array,String],default:null},expandedNames:[Array,String],arrowPlacement:{type:String,default:"left"},accordion:{type:Boolean,default:!1},displayDirective:{type:String,default:"if"},triggerAreas:{type:Array,default:()=>["main","extra","arrow"]},onItemHeaderClick:[Function,Array],"onUpdate:expandedNames":[Function,Array],onUpdateExpandedNames:[Function,Array],onExpandedNamesChange:{type:[Function,Array],validator:()=>!0,default:void 0}}),Tr=Yt("n-collapse"),Ks=re({name:"Collapse",props:Bl,slots:Object,setup(e,{slots:t}){const{mergedClsPrefixRef:n,inlineThemeDisabled:o,mergedRtlRef:r}=Ue(e),i=V(e.defaultExpandedNames),a=N(()=>e.expandedNames),l=vt(a,i),c=ke("Collapse","-collapse",El,Ti,e,n);function s(w){const{"onUpdate:expandedNames":y,onUpdateExpandedNames:m,onExpandedNamesChange:C}=e;m&&xe(m,w),y&&xe(y,w),C&&xe(C,w),i.value=w}function d(w){const{onItemHeaderClick:y}=e;y&&xe(y,w)}function u(w,y,m){const{accordion:C}=e,{value:f}=l;if(C)w?(s([y]),d({name:y,expanded:!0,event:m})):(s([]),d({name:y,expanded:!1,event:m}));else if(!Array.isArray(f))s([y]),d({name:y,expanded:!0,event:m});else{const D=f.slice(),b=D.findIndex(F=>y===F);~b?(D.splice(b,1),s(D),d({name:y,expanded:!1,event:m})):(D.push(y),s(D),d({name:y,expanded:!0,event:m}))}}pt(Tr,{props:e,mergedClsPrefixRef:n,expandedNamesRef:l,slots:t,toggleItem:u});const h=Ct("Collapse",r,n),g=N(()=>{const{common:{cubicBezierEaseInOut:w},self:{titleFontWeight:y,dividerColor:m,titlePadding:C,titleTextColor:f,titleTextColorDisabled:D,textColor:b,arrowColor:F,fontSize:P,titleFontSize:S,arrowColorDisabled:$,itemMargin:j}}=c.value;return{"--n-font-size":P,"--n-bezier":w,"--n-text-color":b,"--n-divider-color":m,"--n-title-padding":C,"--n-title-font-size":S,"--n-title-text-color":f,"--n-title-text-color-disabled":D,"--n-title-font-weight":y,"--n-arrow-color":F,"--n-arrow-color-disabled":$,"--n-item-margin":j}}),p=o?tt("collapse",void 0,g,e):void 0;return{rtlEnabled:h,mergedTheme:c,mergedClsPrefix:n,cssVars:o?void 0:g,themeClass:p==null?void 0:p.themeClass,onRender:p==null?void 0:p.onRender}},render(){var e;return(e=this.onRender)===null||e===void 0||e.call(this),v("div",{class:[`${this.mergedClsPrefix}-collapse`,this.rtlEnabled&&`${this.mergedClsPrefix}-collapse--rtl`,this.themeClass],style:this.cssVars},this.$slots)}}),Sl=re({name:"CollapseItemContent",props:{displayDirective:{type:String,required:!0},show:Boolean,clsPrefix:{type:String,required:!0}},setup(e){return{onceTrue:Mi(be(e,"show"))}},render(){return v(Oi,null,{default:()=>{const{show:e,displayDirective:t,onceTrue:n,clsPrefix:o}=this,r=t==="show"&&n,i=v("div",{class:`${o}-collapse-item__content-wrapper`},v("div",{class:`${o}-collapse-item__content-inner`},this.$slots));return r?yo(i,[[Rn,e]]):e?i:null}})}}),kl={title:String,name:[String,Number],disabled:Boolean,displayDirective:String},qs=re({name:"CollapseItem",props:kl,setup(e){const{mergedRtlRef:t}=Ue(e),n=Ui(),o=je(()=>{var u;return(u=e.name)!==null&&u!==void 0?u:n}),r=mt(Tr);r||Li("collapse-item","`n-collapse-item` must be placed inside `n-collapse`.");const{expandedNamesRef:i,props:a,mergedClsPrefixRef:l,slots:c}=r,s=N(()=>{const{value:u}=i;if(Array.isArray(u)){const{value:h}=o;return!~u.findIndex(g=>g===h)}else if(u){const{value:h}=o;return h!==u}return!0});return{rtlEnabled:Ct("Collapse",t,l),collapseSlots:c,randomName:n,mergedClsPrefix:l,collapsed:s,triggerAreas:be(a,"triggerAreas"),mergedDisplayDirective:N(()=>{const{displayDirective:u}=e;return u||a.displayDirective}),arrowPlacement:N(()=>a.arrowPlacement),handleClick(u){let h="main";kt(u,"arrow")&&(h="arrow"),kt(u,"extra")&&(h="extra"),a.triggerAreas.includes(h)&&r&&!e.disabled&&r.toggleItem(s.value,o.value,u)}}},render(){const{collapseSlots:e,$slots:t,arrowPlacement:n,collapsed:o,mergedDisplayDirective:r,mergedClsPrefix:i,disabled:a,triggerAreas:l}=this,c=To(t.header,{collapsed:o},()=>[this.title]),s=t["header-extra"]||e["header-extra"],d=t.arrow||e.arrow;return v("div",{class:[`${i}-collapse-item`,`${i}-collapse-item--${n}-arrow-placement`,a&&`${i}-collapse-item--disabled`,!o&&`${i}-collapse-item--active`,l.map(u=>`${i}-collapse-item--trigger-area-${u}`)]},v("div",{class:[`${i}-collapse-item__header`,!o&&`${i}-collapse-item__header--active`]},v("div",{class:`${i}-collapse-item__header-main`,onClick:this.handleClick},n==="right"&&c,v("div",{class:`${i}-collapse-item-arrow`,key:this.rtlEnabled?0:1,"data-arrow":!0},To(d,{collapsed:o},()=>[v(go,{clsPrefix:i},{default:()=>this.rtlEnabled?v(za,null):v(Ia,null)})])),n==="left"&&c),Ni(s,{collapsed:o},u=>v("div",{class:`${i}-collapse-item__header-extra`,onClick:this.handleClick,"data-extra":!0},u))),v(Sl,{clsPrefix:i,displayDirective:r,show:!o},t))}});function Rl(e,t){switch(e[0]){case"hex":return t?"#000000FF":"#000000";case"rgb":return t?"rgba(0, 0, 0, 1)":"rgb(0, 0, 0)";case"hsl":return t?"hsla(0, 0%, 0%, 1)":"hsl(0, 0%, 0%)";case"hsv":return t?"hsva(0, 0%, 0%, 1)":"hsv(0, 0%, 0%)"}return"#000000"}function Jt(e){return e===null?null:/^ *#/.test(e)?"hex":e.includes("rgb")?"rgb":e.includes("hsl")?"hsl":e.includes("hsv")?"hsv":null}function zl(e,t=[255,255,255],n="AA"){const[o,r,i,a]=Qe(lt(e));if(a===1){const g=cn([o,r,i]),p=cn(t);return(Math.max(g,p)+.05)/(Math.min(g,p)+.05)>=(n==="AA"?4.5:7)}const l=Math.round(o*a+t[0]*(1-a)),c=Math.round(r*a+t[1]*(1-a)),s=Math.round(i*a+t[2]*(1-a)),d=cn([l,c,s]),u=cn(t);return(Math.max(d,u)+.05)/(Math.min(d,u)+.05)>=(n==="AA"?4.5:7)}function cn(e){const[t,n,o]=e.map(r=>(r/=255,r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4)));return .2126*t+.7152*n+.0722*o}function Il(e){return e=Math.round(e),e>=360?359:e<0?0:e}function Pl(e){return e=Math.round(e*100)/100,e>1?1:e<0?0:e}const _l={rgb:{hex(e){return ht(Qe(e))},hsl(e){const[t,n,o,r]=Qe(e);return lt([...oo(t,n,o),r])},hsv(e){const[t,n,o,r]=Qe(e);return Bt([...no(t,n,o),r])}},hex:{rgb(e){return ut(Qe(e))},hsl(e){const[t,n,o,r]=Qe(e);return lt([...oo(t,n,o),r])},hsv(e){const[t,n,o,r]=Qe(e);return Bt([...no(t,n,o),r])}},hsl:{hex(e){const[t,n,o,r]=_t(e);return ht([...to(t,n,o),r])},rgb(e){const[t,n,o,r]=_t(e);return ut([...to(t,n,o),r])},hsv(e){const[t,n,o,r]=_t(e);return Bt([...br(t,n,o),r])}},hsv:{hex(e){const[t,n,o,r]=Et(e);return ht([...ft(t,n,o),r])},rgb(e){const[t,n,o,r]=Et(e);return ut([...ft(t,n,o),r])},hsl(e){const[t,n,o,r]=Et(e);return lt([...vn(t,n,o),r])}}};function Or(e,t,n){return n=n||Jt(e),n?n===t?e:_l[n][t](e):null}const Vt="12px",$l=12,wt="6px",Tl=re({name:"AlphaSlider",props:{clsPrefix:{type:String,required:!0},rgba:{type:Array,default:null},alpha:{type:Number,default:0},onUpdateAlpha:{type:Function,required:!0},onComplete:Function},setup(e){const t=V(null);function n(i){!t.value||!e.rgba||($t("mousemove",document,o),$t("mouseup",document,r),o(i))}function o(i){const{value:a}=t;if(!a)return;const{width:l,left:c}=a.getBoundingClientRect(),s=(i.clientX-c)/(l-$l);e.onUpdateAlpha(Pl(s))}function r(){var i;Tt("mousemove",document,o),Tt("mouseup",document,r),(i=e.onComplete)===null||i===void 0||i.call(e)}return{railRef:t,railBackgroundImage:N(()=>{const{rgba:i}=e;return i?`linear-gradient(to right, rgba(${i[0]}, ${i[1]}, ${i[2]}, 0) 0%, rgba(${i[0]}, ${i[1]}, ${i[2]}, 1) 100%)`:""}),handleMouseDown:n}},render(){const{clsPrefix:e}=this;return v("div",{class:`${e}-color-picker-slider`,ref:"railRef",style:{height:Vt,borderRadius:wt},onMousedown:this.handleMouseDown},v("div",{style:{borderRadius:wt,position:"absolute",left:0,right:0,top:0,bottom:0,overflow:"hidden"}},v("div",{class:`${e}-color-picker-checkboard`}),v("div",{class:`${e}-color-picker-slider__image`,style:{backgroundImage:this.railBackgroundImage}})),this.rgba&&v("div",{style:{position:"absolute",left:wt,right:wt,top:0,bottom:0}},v("div",{class:`${e}-color-picker-handle`,style:{left:`calc(${this.alpha*100}% - ${wt})`,borderRadius:wt,width:Vt,height:Vt}},v("div",{class:`${e}-color-picker-handle__fill`,style:{backgroundColor:ut(this.rgba),borderRadius:wt,width:Vt,height:Vt}}))))}}),zo=Yt("n-color-picker");function Ol(e){return/^\d{1,3}\.?\d*$/.test(e.trim())?Math.max(0,Math.min(Number.parseInt(e),255)):!1}function Ml(e){return/^\d{1,3}\.?\d*$/.test(e.trim())?Math.max(0,Math.min(Number.parseInt(e),360)):!1}function Nl(e){return/^\d{1,3}\.?\d*$/.test(e.trim())?Math.max(0,Math.min(Number.parseInt(e),100)):!1}function Ul(e){const t=e.trim();return/^#[0-9a-fA-F]+$/.test(t)?[4,5,7,9].includes(t.length):!1}function Ll(e){return/^\d{1,3}\.?\d*%$/.test(e.trim())?Math.max(0,Math.min(Number.parseInt(e)/100,100)):!1}const Vl={paddingSmall:"0 4px"},Yo=re({name:"ColorInputUnit",props:{label:{type:String,required:!0},value:{type:[Number,String],default:null},showAlpha:Boolean,onUpdateValue:{type:Function,required:!0}},setup(e){const t=V(""),{themeRef:n}=mt(zo,null);zn(()=>{t.value=o()});function o(){const{value:a}=e;if(a===null)return"";const{label:l}=e;return l==="HEX"?a:l==="A"?`${Math.floor(a*100)}%`:String(Math.floor(a))}function r(a){t.value=a}function i(a){let l,c;switch(e.label){case"HEX":c=Ul(a),c&&e.onUpdateValue(a),t.value=o();break;case"H":l=Ml(a),l===!1?t.value=o():e.onUpdateValue(l);break;case"S":case"L":case"V":l=Nl(a),l===!1?t.value=o():e.onUpdateValue(l);break;case"A":l=Ll(a),l===!1?t.value=o():e.onUpdateValue(l);break;case"R":case"G":case"B":l=Ol(a),l===!1?t.value=o():e.onUpdateValue(l);break}}return{mergedTheme:n,inputValue:t,handleInputChange:i,handleInputUpdateValue:r}},render(){const{mergedTheme:e}=this;return v(Zt,{size:"small",placeholder:this.label,theme:e.peers.Input,themeOverrides:e.peerOverrides.Input,builtinThemeOverrides:Vl,value:this.inputValue,onUpdateValue:this.handleInputUpdateValue,onChange:this.handleInputChange,style:this.label==="A"?"flex-grow: 1.25;":""})}}),jl=re({name:"ColorInput",props:{clsPrefix:{type:String,required:!0},mode:{type:String,required:!0},modes:{type:Array,required:!0},showAlpha:{type:Boolean,required:!0},value:{type:String,default:null},valueArr:{type:Array,default:null},onUpdateValue:{type:Function,required:!0},onUpdateMode:{type:Function,required:!0}},setup(e){return{handleUnitUpdateValue(t,n){const{showAlpha:o}=e;if(e.mode==="hex"){e.onUpdateValue((o?ht:Kt)(n));return}let r;switch(e.valueArr===null?r=[0,0,0,0]:r=Array.from(e.valueArr),e.mode){case"hsv":r[t]=n,e.onUpdateValue((o?Bt:ao)(r));break;case"rgb":r[t]=n,e.onUpdateValue((o?ut:io)(r));break;case"hsl":r[t]=n,e.onUpdateValue((o?lt:ro)(r));break}}}},render(){const{clsPrefix:e,modes:t}=this;return v("div",{class:`${e}-color-picker-input`},v("div",{class:`${e}-color-picker-input__mode`,onClick:this.onUpdateMode,style:{cursor:t.length===1?"":"pointer"}},this.mode.toUpperCase()+(this.showAlpha?"A":"")),v(yl,null,{default:()=>{const{mode:n,valueArr:o,showAlpha:r}=this;if(n==="hex"){let i=null;try{i=o===null?null:(r?ht:Kt)(o)}catch{}return v(Yo,{label:"HEX",showAlpha:r,value:i,onUpdateValue:a=>{this.handleUnitUpdateValue(0,a)}})}return(n+(r?"a":"")).split("").map((i,a)=>v(Yo,{label:i.toUpperCase(),value:o===null?null:o[a],onUpdateValue:l=>{this.handleUnitUpdateValue(a,l)}}))}}))}});function Hl(e,t){if(t==="hsv"){const[n,o,r,i]=Et(e);return ut([...ft(n,o,r),i])}return e}function Wl(e){const t=document.createElement("canvas").getContext("2d");return t?(t.fillStyle=e,t.fillStyle):"#000000"}const Gl=re({name:"ColorPickerSwatches",props:{clsPrefix:{type:String,required:!0},mode:{type:String,required:!0},swatches:{type:Array,required:!0},onUpdateColor:{type:Function,required:!0}},setup(e){const t=N(()=>e.swatches.map(i=>{const a=Jt(i);return{value:i,mode:a,legalValue:Hl(i,a)}}));function n(i){const{mode:a}=e;let{value:l,mode:c}=i;return c||(c="hex",/^[a-zA-Z]+$/.test(l)?l=Wl(l):(Vi("color-picker",`color ${l} in swatches is invalid.`),l="#000000")),c===a?l:Or(l,a,c)}function o(i){e.onUpdateColor(n(i))}function r(i,a){i.key==="Enter"&&o(a)}return{parsedSwatchesRef:t,handleSwatchSelect:o,handleSwatchKeyDown:r}},render(){const{clsPrefix:e}=this;return v("div",{class:`${e}-color-picker-swatches`},this.parsedSwatchesRef.map(t=>v("div",{class:`${e}-color-picker-swatch`,tabindex:0,onClick:()=>{this.handleSwatchSelect(t)},onKeydown:n=>{this.handleSwatchKeyDown(n,t)}},v("div",{class:`${e}-color-picker-swatch__fill`,style:{background:t.legalValue}}))))}}),Kl=re({name:"ColorPickerTrigger",slots:Object,props:{clsPrefix:{type:String,required:!0},value:{type:String,default:null},hsla:{type:Array,default:null},disabled:Boolean,onClick:Function},setup(e){const{colorPickerSlots:t,renderLabelRef:n}=mt(zo,null);return()=>{const{hsla:o,value:r,clsPrefix:i,onClick:a,disabled:l}=e,c=t.label||n.value;return v("div",{class:[`${i}-color-picker-trigger`,l&&`${i}-color-picker-trigger--disabled`],onClick:l?void 0:a},v("div",{class:`${i}-color-picker-trigger__fill`},v("div",{class:`${i}-color-picker-checkboard`}),v("div",{style:{position:"absolute",left:0,right:0,top:0,bottom:0,backgroundColor:o?lt(o):""}}),r&&o?v("div",{class:`${i}-color-picker-trigger__value`,style:{color:zl(o)?"white":"black"}},c?c(r):r):null))}}}),ql=re({name:"ColorPreview",props:{clsPrefix:{type:String,required:!0},mode:{type:String,required:!0},color:{type:String,default:null,validator:e=>{const t=Jt(e);return!!(!e||t&&t!=="hsv")}},onUpdateColor:{type:Function,required:!0}},setup(e){function t(n){var o;const r=n.target.value;(o=e.onUpdateColor)===null||o===void 0||o.call(e,Or(r.toUpperCase(),e.mode,"hex")),n.stopPropagation()}return{handleChange:t}},render(){const{clsPrefix:e}=this;return v("div",{class:`${e}-color-picker-preview__preview`},v("span",{class:`${e}-color-picker-preview__fill`,style:{background:this.color||"#000000"}}),v("input",{class:`${e}-color-picker-preview__input`,type:"color",value:this.color,onChange:this.handleChange}))}}),zt="12px",Xl=12,yt="6px",Zl=6,Jl="linear-gradient(90deg,red,#ff0 16.66%,#0f0 33.33%,#0ff 50%,#00f 66.66%,#f0f 83.33%,red)",Yl=re({name:"HueSlider",props:{clsPrefix:{type:String,required:!0},hue:{type:Number,required:!0},onUpdateHue:{type:Function,required:!0},onComplete:Function},setup(e){const t=V(null);function n(i){t.value&&($t("mousemove",document,o),$t("mouseup",document,r),o(i))}function o(i){const{value:a}=t;if(!a)return;const{width:l,left:c}=a.getBoundingClientRect(),s=Il((i.clientX-c-Zl)/(l-Xl)*360);e.onUpdateHue(s)}function r(){var i;Tt("mousemove",document,o),Tt("mouseup",document,r),(i=e.onComplete)===null||i===void 0||i.call(e)}return{railRef:t,handleMouseDown:n}},render(){const{clsPrefix:e}=this;return v("div",{class:`${e}-color-picker-slider`,style:{height:zt,borderRadius:yt}},v("div",{ref:"railRef",style:{boxShadow:"inset 0 0 2px 0 rgba(0, 0, 0, .24)",boxSizing:"border-box",backgroundImage:Jl,height:zt,borderRadius:yt,position:"relative"},onMousedown:this.handleMouseDown},v("div",{style:{position:"absolute",left:yt,right:yt,top:0,bottom:0}},v("div",{class:`${e}-color-picker-handle`,style:{left:`calc((${this.hue}%) / 359 * 100 - ${yt})`,borderRadius:yt,width:zt,height:zt}},v("div",{class:`${e}-color-picker-handle__fill`,style:{backgroundColor:`hsl(${this.hue}, 100%, 50%)`,borderRadius:yt,width:zt,height:zt}})))))}}),dn="12px",fn="6px",Ql=re({name:"Pallete",props:{clsPrefix:{type:String,required:!0},rgba:{type:Array,default:null},displayedHue:{type:Number,required:!0},displayedSv:{type:Array,required:!0},onUpdateSV:{type:Function,required:!0},onComplete:Function},setup(e){const t=V(null);function n(i){t.value&&($t("mousemove",document,o),$t("mouseup",document,r),o(i))}function o(i){const{value:a}=t;if(!a)return;const{width:l,height:c,left:s,bottom:d}=a.getBoundingClientRect(),u=(d-i.clientY)/c,h=(i.clientX-s)/l,g=100*(h>1?1:h<0?0:h),p=100*(u>1?1:u<0?0:u);e.onUpdateSV(g,p)}function r(){var i;Tt("mousemove",document,o),Tt("mouseup",document,r),(i=e.onComplete)===null||i===void 0||i.call(e)}return{palleteRef:t,handleColor:N(()=>{const{rgba:i}=e;return i?`rgb(${i[0]}, ${i[1]}, ${i[2]})`:""}),handleMouseDown:n}},render(){const{clsPrefix:e}=this;return v("div",{class:`${e}-color-picker-pallete`,onMousedown:this.handleMouseDown,ref:"palleteRef"},v("div",{class:`${e}-color-picker-pallete__layer`,style:{backgroundImage:`linear-gradient(90deg, white, hsl(${this.displayedHue}, 100%, 50%))`}}),v("div",{class:`${e}-color-picker-pallete__layer ${e}-color-picker-pallete__layer--shadowed`,style:{backgroundImage:"linear-gradient(180deg, rgba(0, 0, 0, 0%), rgba(0, 0, 0, 100%))"}}),this.rgba&&v("div",{class:`${e}-color-picker-handle`,style:{width:dn,height:dn,borderRadius:fn,left:`calc(${this.displayedSv[0]}% - ${fn})`,bottom:`calc(${this.displayedSv[1]}% - ${fn})`}},v("div",{class:`${e}-color-picker-handle__fill`,style:{backgroundColor:this.handleColor,borderRadius:fn,width:dn,height:dn}})))}}),eu=q([_("color-picker",`
497
+ display: inline-block;
498
+ box-sizing: border-box;
499
+ height: var(--n-height);
500
+ font-size: var(--n-font-size);
501
+ width: 100%;
502
+ position: relative;
503
+ `),_("color-picker-panel",`
504
+ margin: 4px 0;
505
+ width: 240px;
506
+ font-size: var(--n-panel-font-size);
507
+ color: var(--n-text-color);
508
+ background-color: var(--n-color);
509
+ transition:
510
+ box-shadow .3s var(--n-bezier),
511
+ color .3s var(--n-bezier),
512
+ background-color .3s var(--n-bezier);
513
+ border-radius: var(--n-border-radius);
514
+ box-shadow: var(--n-box-shadow);
515
+ `,[Do(),_("input",`
516
+ text-align: center;
517
+ `)]),_("color-picker-checkboard",`
518
+ background: white;
519
+ position: absolute;
520
+ left: 0;
521
+ right: 0;
522
+ top: 0;
523
+ bottom: 0;
524
+ `,[q("&::after",`
525
+ background-image: linear-gradient(45deg, #DDD 25%, #0000 25%), linear-gradient(-45deg, #DDD 25%, #0000 25%), linear-gradient(45deg, #0000 75%, #DDD 75%), linear-gradient(-45deg, #0000 75%, #DDD 75%);
526
+ background-size: 12px 12px;
527
+ background-position: 0 0, 0 6px, 6px -6px, -6px 0px;
528
+ background-repeat: repeat;
529
+ content: "";
530
+ position: absolute;
531
+ left: 0;
532
+ right: 0;
533
+ top: 0;
534
+ bottom: 0;
535
+ `)]),_("color-picker-slider",`
536
+ margin-bottom: 8px;
537
+ position: relative;
538
+ box-sizing: border-box;
539
+ `,[E("image",`
540
+ position: absolute;
541
+ left: 0;
542
+ right: 0;
543
+ top: 0;
544
+ bottom: 0;
545
+ `),q("&::after",`
546
+ content: "";
547
+ position: absolute;
548
+ border-radius: inherit;
549
+ left: 0;
550
+ right: 0;
551
+ top: 0;
552
+ bottom: 0;
553
+ box-shadow: inset 0 0 2px 0 rgba(0, 0, 0, .24);
554
+ pointer-events: none;
555
+ `)]),_("color-picker-handle",`
556
+ z-index: 1;
557
+ box-shadow: 0 0 2px 0 rgba(0, 0, 0, .45);
558
+ position: absolute;
559
+ background-color: white;
560
+ overflow: hidden;
561
+ `,[E("fill",`
562
+ box-sizing: border-box;
563
+ border: 2px solid white;
564
+ `)]),_("color-picker-pallete",`
565
+ height: 180px;
566
+ position: relative;
567
+ margin-bottom: 8px;
568
+ cursor: crosshair;
569
+ `,[E("layer",`
570
+ position: absolute;
571
+ left: 0;
572
+ right: 0;
573
+ top: 0;
574
+ bottom: 0;
575
+ `,[W("shadowed",`
576
+ box-shadow: inset 0 0 2px 0 rgba(0, 0, 0, .24);
577
+ `)])]),_("color-picker-preview",`
578
+ display: flex;
579
+ `,[E("sliders",`
580
+ flex: 1 0 auto;
581
+ `),E("preview",`
582
+ position: relative;
583
+ height: 30px;
584
+ width: 30px;
585
+ margin: 0 0 8px 6px;
586
+ border-radius: 50%;
587
+ box-shadow: rgba(0, 0, 0, .15) 0px 0px 0px 1px inset;
588
+ overflow: hidden;
589
+ `),E("fill",`
590
+ display: block;
591
+ width: 30px;
592
+ height: 30px;
593
+ `),E("input",`
594
+ position: absolute;
595
+ top: 0;
596
+ left: 0;
597
+ width: 30px;
598
+ height: 30px;
599
+ opacity: 0;
600
+ z-index: 1;
601
+ `)]),_("color-picker-input",`
602
+ display: flex;
603
+ align-items: center;
604
+ `,[_("input",`
605
+ flex-grow: 1;
606
+ flex-basis: 0;
607
+ `),E("mode",`
608
+ width: 72px;
609
+ text-align: center;
610
+ `)]),_("color-picker-control",`
611
+ padding: 12px;
612
+ `),_("color-picker-action",`
613
+ display: flex;
614
+ margin-top: -4px;
615
+ border-top: 1px solid var(--n-divider-color);
616
+ padding: 8px 12px;
617
+ justify-content: flex-end;
618
+ `,[_("button","margin-left: 8px;")]),_("color-picker-trigger",`
619
+ border: var(--n-border);
620
+ height: 100%;
621
+ box-sizing: border-box;
622
+ border-radius: var(--n-border-radius);
623
+ transition: border-color .3s var(--n-bezier);
624
+ cursor: pointer;
625
+ `,[E("value",`
626
+ white-space: nowrap;
627
+ position: relative;
628
+ `),E("fill",`
629
+ border-radius: var(--n-border-radius);
630
+ position: absolute;
631
+ display: flex;
632
+ align-items: center;
633
+ justify-content: center;
634
+ left: 4px;
635
+ right: 4px;
636
+ top: 4px;
637
+ bottom: 4px;
638
+ `),W("disabled","cursor: not-allowed"),_("color-picker-checkboard",`
639
+ border-radius: var(--n-border-radius);
640
+ `,[q("&::after",`
641
+ --n-block-size: calc((var(--n-height) - 8px) / 3);
642
+ background-size: calc(var(--n-block-size) * 2) calc(var(--n-block-size) * 2);
643
+ background-position: 0 0, 0 var(--n-block-size), var(--n-block-size) calc(-1 * var(--n-block-size)), calc(-1 * var(--n-block-size)) 0px;
644
+ `)])]),_("color-picker-swatches",`
645
+ display: grid;
646
+ grid-gap: 8px;
647
+ flex-wrap: wrap;
648
+ position: relative;
649
+ grid-template-columns: repeat(auto-fill, 18px);
650
+ margin-top: 10px;
651
+ `,[_("color-picker-swatch",`
652
+ width: 18px;
653
+ height: 18px;
654
+ background-image: linear-gradient(45deg, #DDD 25%, #0000 25%), linear-gradient(-45deg, #DDD 25%, #0000 25%), linear-gradient(45deg, #0000 75%, #DDD 75%), linear-gradient(-45deg, #0000 75%, #DDD 75%);
655
+ background-size: 8px 8px;
656
+ background-position: 0px 0, 0px 4px, 4px -4px, -4px 0px;
657
+ background-repeat: repeat;
658
+ `,[E("fill",`
659
+ position: relative;
660
+ width: 100%;
661
+ height: 100%;
662
+ border-radius: 3px;
663
+ box-shadow: rgba(0, 0, 0, .15) 0px 0px 0px 1px inset;
664
+ cursor: pointer;
665
+ `),q("&:focus",`
666
+ outline: none;
667
+ `,[E("fill",[q("&::after",`
668
+ position: absolute;
669
+ top: 0;
670
+ right: 0;
671
+ bottom: 0;
672
+ left: 0;
673
+ background: inherit;
674
+ filter: blur(2px);
675
+ content: "";
676
+ `)])])])])]),tu=Object.assign(Object.assign({},ke.props),{value:String,show:{type:Boolean,default:void 0},defaultShow:Boolean,defaultValue:String,modes:{type:Array,default:()=>["rgb","hex","hsl"]},placement:{type:String,default:"bottom-start"},to:Mt.propTo,showAlpha:{type:Boolean,default:!0},showPreview:Boolean,swatches:Array,disabled:{type:Boolean,default:void 0},actions:{type:Array,default:null},internalActions:Array,size:String,renderLabel:Function,onComplete:Function,onConfirm:Function,onClear:Function,"onUpdate:show":[Function,Array],onUpdateShow:[Function,Array],"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array]}),nu=re({name:"ColorPicker",props:tu,slots:Object,setup(e,{slots:t}){const n=V(null);let o=null;const r=Qt(e),{mergedSizeRef:i,mergedDisabledRef:a}=r,{localeRef:l}=bo("global"),{mergedClsPrefixRef:c,namespaceRef:s,inlineThemeDisabled:d}=Ue(e),u=ke("ColorPicker","-color-picker",eu,ji,e,c);pt(zo,{themeRef:u,renderLabelRef:be(e,"renderLabel"),colorPickerSlots:t});const h=V(e.defaultShow),g=vt(be(e,"show"),h);function p(R){const{onUpdateShow:Z,"onUpdate:show":me}=e;Z&&xe(Z,R),me&&xe(me,R),h.value=R}const{defaultValue:w}=e,y=V(w===void 0?Rl(e.modes,e.showAlpha):w),m=vt(be(e,"value"),y),C=V([m.value]),f=V(0),D=N(()=>Jt(m.value)),{modes:b}=e,F=V(Jt(m.value)||b[0]||"rgb");function P(){const{modes:R}=e,{value:Z}=F,me=R.findIndex(De=>De===Z);~me?F.value=R[(me+1)%R.length]:F.value="rgb"}let S,$,j,K,ae,B,T,I;const ee=N(()=>{const{value:R}=m;if(!R)return null;switch(D.value){case"hsv":return Et(R);case"hsl":return[S,$,j,I]=_t(R),[...br(S,$,j),I];case"rgb":case"hex":return[ae,B,T,I]=Qe(R),[...no(ae,B,T),I]}}),ne=N(()=>{const{value:R}=m;if(!R)return null;switch(D.value){case"rgb":case"hex":return Qe(R);case"hsv":return[S,$,K,I]=Et(R),[...ft(S,$,K),I];case"hsl":return[S,$,j,I]=_t(R),[...to(S,$,j),I]}}),X=N(()=>{const{value:R}=m;if(!R)return null;switch(D.value){case"hsl":return _t(R);case"hsv":return[S,$,K,I]=Et(R),[...vn(S,$,K),I];case"rgb":case"hex":return[ae,B,T,I]=Qe(R),[...oo(ae,B,T),I]}}),de=N(()=>{switch(F.value){case"rgb":case"hex":return ne.value;case"hsv":return ee.value;case"hsl":return X.value}}),Y=V(0),le=V(1),z=V([0,0]);function O(R,Z){const{value:me}=ee,De=Y.value,ye=me?me[3]:1;z.value=[R,Z];const{showAlpha:oe}=e;switch(F.value){case"hsv":ue((oe?Bt:ao)([De,R,Z,ye]),"cursor");break;case"hsl":ue((oe?lt:ro)([...vn(De,R,Z),ye]),"cursor");break;case"rgb":ue((oe?ut:io)([...ft(De,R,Z),ye]),"cursor");break;case"hex":ue((oe?ht:Kt)([...ft(De,R,Z),ye]),"cursor");break}}function ie(R){Y.value=R;const{value:Z}=ee;if(!Z)return;const[,me,De,ye]=Z,{showAlpha:oe}=e;switch(F.value){case"hsv":ue((oe?Bt:ao)([R,me,De,ye]),"cursor");break;case"rgb":ue((oe?ut:io)([...ft(R,me,De),ye]),"cursor");break;case"hex":ue((oe?ht:Kt)([...ft(R,me,De),ye]),"cursor");break;case"hsl":ue((oe?lt:ro)([...vn(R,me,De),ye]),"cursor");break}}function Se(R){switch(F.value){case"hsv":[S,$,K]=ee.value,ue(Bt([S,$,K,R]),"cursor");break;case"rgb":[ae,B,T]=ne.value,ue(ut([ae,B,T,R]),"cursor");break;case"hex":[ae,B,T]=ne.value,ue(ht([ae,B,T,R]),"cursor");break;case"hsl":[S,$,j]=X.value,ue(lt([S,$,j,R]),"cursor");break}le.value=R}function ue(R,Z){Z==="cursor"?o=R:o=null;const{nTriggerFormChange:me,nTriggerFormInput:De}=r,{onUpdateValue:ye,"onUpdate:value":oe}=e;ye&&xe(ye,R),oe&&xe(oe,R),me(),De(),y.value=R}function _e(R){ue(R,"input"),kn(Fe)}function Fe(R=!0){const{value:Z}=m;if(Z){const{nTriggerFormChange:me,nTriggerFormInput:De}=r,{onComplete:ye}=e;ye&&ye(Z);const{value:oe}=C,{value:k}=f;R&&(oe.splice(k+1,oe.length,Z),f.value=k+1),me(),De()}}function ze(){const{value:R}=f;R-1<0||(ue(C.value[R-1],"input"),Fe(!1),f.value=R-1)}function He(){const{value:R}=f;R<0||R+1>=C.value.length||(ue(C.value[R+1],"input"),Fe(!1),f.value=R+1)}function $e(){ue(null,"input");const{onClear:R}=e;R&&R(),p(!1)}function Je(){const{value:R}=m,{onConfirm:Z}=e;Z&&Z(R),p(!1)}const ct=N(()=>f.value>=1),We=N(()=>{const{value:R}=C;return R.length>1&&f.value<R.length-1});Xe(g,R=>{R||(C.value=[m.value],f.value=0)}),zn(()=>{if(!(o&&o===m.value)){const{value:R}=ee;R&&(Y.value=R[0],le.value=R[3],z.value=[R[1],R[2]])}o=null});const Ke=N(()=>{const{value:R}=i,{common:{cubicBezierEaseInOut:Z},self:{textColor:me,color:De,panelFontSize:ye,boxShadow:oe,border:k,borderRadius:M,dividerColor:Ce,[ce("height",R)]:Nt,[ce("fontSize",R)]:Ut}}=u.value;return{"--n-bezier":Z,"--n-text-color":me,"--n-color":De,"--n-panel-font-size":ye,"--n-font-size":Ut,"--n-box-shadow":oe,"--n-border":k,"--n-border-radius":M,"--n-height":Nt,"--n-divider-color":Ce}}),Ie=d?tt("color-picker",N(()=>i.value[0]),Ke,e):void 0;function Me(){var R;const{value:Z}=ne,{value:me}=Y,{internalActions:De,modes:ye,actions:oe}=e,{value:k}=u,{value:M}=c;return v("div",{class:[`${M}-color-picker-panel`,Ie==null?void 0:Ie.themeClass.value],onDragstart:Ce=>{Ce.preventDefault()},style:d?void 0:Ke.value},v("div",{class:`${M}-color-picker-control`},v(Ql,{clsPrefix:M,rgba:Z,displayedHue:me,displayedSv:z.value,onUpdateSV:O,onComplete:Fe}),v("div",{class:`${M}-color-picker-preview`},v("div",{class:`${M}-color-picker-preview__sliders`},v(Yl,{clsPrefix:M,hue:me,onUpdateHue:ie,onComplete:Fe}),e.showAlpha?v(Tl,{clsPrefix:M,rgba:Z,alpha:le.value,onUpdateAlpha:Se,onComplete:Fe}):null),e.showPreview?v(ql,{clsPrefix:M,mode:F.value,color:ne.value&&Kt(ne.value),onUpdateColor:Ce=>{ue(Ce,"input")}}):null),v(jl,{clsPrefix:M,showAlpha:e.showAlpha,mode:F.value,modes:ye,onUpdateMode:P,value:m.value,valueArr:de.value,onUpdateValue:_e}),((R=e.swatches)===null||R===void 0?void 0:R.length)&&v(Gl,{clsPrefix:M,mode:F.value,swatches:e.swatches,onUpdateColor:Ce=>{ue(Ce,"input")}})),oe!=null&&oe.length?v("div",{class:`${M}-color-picker-action`},oe.includes("confirm")&&v(at,{size:"small",onClick:Je,theme:k.peers.Button,themeOverrides:k.peerOverrides.Button},{default:()=>l.value.confirm}),oe.includes("clear")&&v(at,{size:"small",onClick:$e,disabled:!m.value,theme:k.peers.Button,themeOverrides:k.peerOverrides.Button},{default:()=>l.value.clear})):null,t.action?v("div",{class:`${M}-color-picker-action`},{default:t.action}):De?v("div",{class:`${M}-color-picker-action`},De.includes("undo")&&v(at,{size:"small",onClick:ze,disabled:!ct.value,theme:k.peers.Button,themeOverrides:k.peerOverrides.Button},{default:()=>l.value.undo}),De.includes("redo")&&v(at,{size:"small",onClick:He,disabled:!We.value,theme:k.peers.Button,themeOverrides:k.peerOverrides.Button},{default:()=>l.value.redo})):null)}return{mergedClsPrefix:c,namespace:s,selfRef:n,hsla:X,rgba:ne,mergedShow:g,mergedDisabled:a,isMounted:Dr(),adjustedTo:Mt(e),mergedValue:m,handleTriggerClick(){p(!0)},handleClickOutside(R){var Z;!((Z=n.value)===null||Z===void 0)&&Z.contains(mr(R))||p(!1)},renderPanel:Me,cssVars:d?void 0:Ke,themeClass:Ie==null?void 0:Ie.themeClass,onRender:Ie==null?void 0:Ie.onRender}},render(){const{mergedClsPrefix:e,onRender:t}=this;return t==null||t(),v("div",{class:[this.themeClass,`${e}-color-picker`],ref:"selfRef",style:this.cssVars},v(Br,null,{default:()=>[v(Sr,null,{default:()=>v(Kl,{clsPrefix:e,value:this.mergedValue,hsla:this.hsla,disabled:this.mergedDisabled,onClick:this.handleTriggerClick})}),v(kr,{placement:this.placement,show:this.mergedShow,containerClass:this.namespace,teleportDisabled:this.adjustedTo===Mt.tdkey,to:this.adjustedTo},{default:()=>v(mo,{name:"fade-in-scale-up-transition",appear:this.isMounted},{default:()=>this.mergedShow?yo(this.renderPanel(),[[lo,this.handleClickOutside,void 0,{capture:!0}]]):null})})]}))}}),ou=q([_("select",`
677
+ z-index: auto;
678
+ outline: none;
679
+ width: 100%;
680
+ position: relative;
681
+ font-weight: var(--n-font-weight);
682
+ `),_("select-menu",`
683
+ margin: 4px 0;
684
+ box-shadow: var(--n-menu-box-shadow);
685
+ `,[Do({originalTransition:"background-color .3s var(--n-bezier), box-shadow .3s var(--n-bezier)"})])]),ru=Object.assign(Object.assign({},ke.props),{to:Mt.propTo,bordered:{type:Boolean,default:void 0},clearable:Boolean,clearFilterAfterSelect:{type:Boolean,default:!0},options:{type:Array,default:()=>[]},defaultValue:{type:[String,Number,Array],default:null},keyboard:{type:Boolean,default:!0},value:[String,Number,Array],placeholder:String,menuProps:Object,multiple:Boolean,size:String,menuSize:{type:String},filterable:Boolean,disabled:{type:Boolean,default:void 0},remote:Boolean,loading:Boolean,filter:Function,placement:{type:String,default:"bottom-start"},widthMode:{type:String,default:"trigger"},tag:Boolean,onCreate:Function,fallbackOption:{type:[Function,Boolean],default:void 0},show:{type:Boolean,default:void 0},showArrow:{type:Boolean,default:!0},maxTagCount:[Number,String],ellipsisTagPopoverProps:Object,consistentMenuWidth:{type:Boolean,default:!0},virtualScroll:{type:Boolean,default:!0},labelField:{type:String,default:"label"},valueField:{type:String,default:"value"},childrenField:{type:String,default:"children"},renderLabel:Function,renderOption:Function,renderTag:Function,"onUpdate:value":[Function,Array],inputProps:Object,nodeProps:Function,ignoreComposition:{type:Boolean,default:!0},showOnFocus:Boolean,onUpdateValue:[Function,Array],onBlur:[Function,Array],onClear:[Function,Array],onFocus:[Function,Array],onScroll:[Function,Array],onSearch:[Function,Array],onUpdateShow:[Function,Array],"onUpdate:show":[Function,Array],displayDirective:{type:String,default:"show"},resetMenuOnOptionsChange:{type:Boolean,default:!0},status:String,showCheckmark:{type:Boolean,default:!0},onChange:[Function,Array],items:Array}),iu=re({name:"Select",props:ru,slots:Object,setup(e){const{mergedClsPrefixRef:t,mergedBorderedRef:n,namespaceRef:o,inlineThemeDisabled:r}=Ue(e),i=ke("Select","-select",ou,Hi,e,t),a=V(e.defaultValue),l=be(e,"value"),c=vt(l,a),s=V(!1),d=V(""),u=ma(e,["items","options"]),h=V([]),g=V([]),p=N(()=>g.value.concat(h.value).concat(u.value)),w=N(()=>{const{filter:x}=e;if(x)return x;const{labelField:U,valueField:Q}=e;return(ge,pe)=>{if(!pe)return!1;const fe=pe[U];if(typeof fe=="string")return Hn(ge,fe);const ve=pe[Q];return typeof ve=="string"?Hn(ge,ve):typeof ve=="number"?Hn(ge,String(ve)):!1}}),y=N(()=>{if(e.remote)return u.value;{const{value:x}=p,{value:U}=d;return!U.length||!e.filterable?x:Fl(x,w.value,U,e.childrenField)}}),m=N(()=>{const{valueField:x,childrenField:U}=e,Q=xl(x,U);return il(y.value,Q)}),C=N(()=>Al(p.value,e.valueField,e.childrenField)),f=V(!1),D=vt(be(e,"show"),f),b=V(null),F=V(null),P=V(null),{localeRef:S}=bo("Select"),$=N(()=>{var x;return(x=e.placeholder)!==null&&x!==void 0?x:S.value.placeholder}),j=[],K=V(new Map),ae=N(()=>{const{fallbackOption:x}=e;if(x===void 0){const{labelField:U,valueField:Q}=e;return ge=>({[U]:String(ge),[Q]:ge})}return x===!1?!1:U=>Object.assign(x(U),{value:U})});function B(x){const U=e.remote,{value:Q}=K,{value:ge}=C,{value:pe}=ae,fe=[];return x.forEach(ve=>{if(ge.has(ve))fe.push(ge.get(ve));else if(U&&Q.has(ve))fe.push(Q.get(ve));else if(pe){const Pe=pe(ve);Pe&&fe.push(Pe)}}),fe}const T=N(()=>{if(e.multiple){const{value:x}=c;return Array.isArray(x)?B(x):[]}return null}),I=N(()=>{const{value:x}=c;return!e.multiple&&!Array.isArray(x)?x===null?null:B([x])[0]||null:null}),ee=Qt(e),{mergedSizeRef:ne,mergedDisabledRef:X,mergedStatusRef:de}=ee;function Y(x,U){const{onChange:Q,"onUpdate:value":ge,onUpdateValue:pe}=e,{nTriggerFormChange:fe,nTriggerFormInput:ve}=ee;Q&&xe(Q,x,U),pe&&xe(pe,x,U),ge&&xe(ge,x,U),a.value=x,fe(),ve()}function le(x){const{onBlur:U}=e,{nTriggerFormBlur:Q}=ee;U&&xe(U,x),Q()}function z(){const{onClear:x}=e;x&&xe(x)}function O(x){const{onFocus:U,showOnFocus:Q}=e,{nTriggerFormFocus:ge}=ee;U&&xe(U,x),ge(),Q&&Fe()}function ie(x){const{onSearch:U}=e;U&&xe(U,x)}function Se(x){const{onScroll:U}=e;U&&xe(U,x)}function ue(){var x;const{remote:U,multiple:Q}=e;if(U){const{value:ge}=K;if(Q){const{valueField:pe}=e;(x=T.value)===null||x===void 0||x.forEach(fe=>{ge.set(fe[pe],fe)})}else{const pe=I.value;pe&&ge.set(pe[e.valueField],pe)}}}function _e(x){const{onUpdateShow:U,"onUpdate:show":Q}=e;U&&xe(U,x),Q&&xe(Q,x),f.value=x}function Fe(){X.value||(_e(!0),f.value=!0,e.filterable&&on())}function ze(){_e(!1)}function He(){d.value="",g.value=j}const $e=V(!1);function Je(){e.filterable&&($e.value=!0)}function ct(){e.filterable&&($e.value=!1,D.value||He())}function We(){X.value||(D.value?e.filterable?on():ze():Fe())}function Ke(x){var U,Q;!((Q=(U=P.value)===null||U===void 0?void 0:U.selfRef)===null||Q===void 0)&&Q.contains(x.relatedTarget)||(s.value=!1,le(x),ze())}function Ie(x){O(x),s.value=!0}function Me(){s.value=!0}function R(x){var U;!((U=b.value)===null||U===void 0)&&U.$el.contains(x.relatedTarget)||(s.value=!1,le(x),ze())}function Z(){var x;(x=b.value)===null||x===void 0||x.focus(),ze()}function me(x){var U;D.value&&(!((U=b.value)===null||U===void 0)&&U.$el.contains(mr(x))||ze())}function De(x){if(!Array.isArray(x))return[];if(ae.value)return Array.from(x);{const{remote:U}=e,{value:Q}=C;if(U){const{value:ge}=K;return x.filter(pe=>Q.has(pe)||ge.has(pe))}else return x.filter(ge=>Q.has(ge))}}function ye(x){oe(x.rawNode)}function oe(x){if(X.value)return;const{tag:U,remote:Q,clearFilterAfterSelect:ge,valueField:pe}=e;if(U&&!Q){const{value:fe}=g,ve=fe[0]||null;if(ve){const Pe=h.value;Pe.length?Pe.push(ve):h.value=[ve],g.value=j}}if(Q&&K.value.set(x[pe],x),e.multiple){const fe=De(c.value),ve=fe.findIndex(Pe=>Pe===x[pe]);if(~ve){if(fe.splice(ve,1),U&&!Q){const Pe=k(x[pe]);~Pe&&(h.value.splice(Pe,1),ge&&(d.value=""))}}else fe.push(x[pe]),ge&&(d.value="");Y(fe,B(fe))}else{if(U&&!Q){const fe=k(x[pe]);~fe?h.value=[h.value[fe]]:h.value=j}nn(),ze(),Y(x[pe],x)}}function k(x){return h.value.findIndex(Q=>Q[e.valueField]===x)}function M(x){D.value||Fe();const{value:U}=x.target;d.value=U;const{tag:Q,remote:ge}=e;if(ie(U),Q&&!ge){if(!U){g.value=j;return}const{onCreate:pe}=e,fe=pe?pe(U):{[e.labelField]:U,[e.valueField]:U},{valueField:ve,labelField:Pe}=e;u.value.some(Ye=>Ye[ve]===fe[ve]||Ye[Pe]===fe[Pe])||h.value.some(Ye=>Ye[ve]===fe[ve]||Ye[Pe]===fe[Pe])?g.value=j:g.value=[fe]}}function Ce(x){x.stopPropagation();const{multiple:U}=e;!U&&e.filterable&&ze(),z(),U?Y([],[]):Y(null,null)}function Nt(x){!kt(x,"action")&&!kt(x,"empty")&&!kt(x,"header")&&x.preventDefault()}function Ut(x){Se(x)}function tn(x){var U,Q,ge,pe,fe;if(!e.keyboard){x.preventDefault();return}switch(x.key){case" ":if(e.filterable)break;x.preventDefault();case"Enter":if(!(!((U=b.value)===null||U===void 0)&&U.isComposing)){if(D.value){const ve=(Q=P.value)===null||Q===void 0?void 0:Q.getPendingTmNode();ve?ye(ve):e.filterable||(ze(),nn())}else if(Fe(),e.tag&&$e.value){const ve=g.value[0];if(ve){const Pe=ve[e.valueField],{value:Ye}=c;e.multiple&&Array.isArray(Ye)&&Ye.includes(Pe)||oe(ve)}}}x.preventDefault();break;case"ArrowUp":if(x.preventDefault(),e.loading)return;D.value&&((ge=P.value)===null||ge===void 0||ge.prev());break;case"ArrowDown":if(x.preventDefault(),e.loading)return;D.value?(pe=P.value)===null||pe===void 0||pe.next():Fe();break;case"Escape":D.value&&(Wi(x),ze()),(fe=b.value)===null||fe===void 0||fe.focus();break}}function nn(){var x;(x=b.value)===null||x===void 0||x.focus()}function on(){var x;(x=b.value)===null||x===void 0||x.focusInput()}function _n(){var x;D.value&&((x=F.value)===null||x===void 0||x.syncPosition())}ue(),Xe(be(e,"options"),ue);const $n={focus:()=>{var x;(x=b.value)===null||x===void 0||x.focus()},focusInput:()=>{var x;(x=b.value)===null||x===void 0||x.focusInput()},blur:()=>{var x;(x=b.value)===null||x===void 0||x.blur()},blurInput:()=>{var x;(x=b.value)===null||x===void 0||x.blurInput()}},rn=N(()=>{const{self:{menuBoxShadow:x}}=i.value;return{"--n-menu-box-shadow":x}}),dt=r?tt("select",void 0,rn,e):void 0;return Object.assign(Object.assign({},$n),{mergedStatus:de,mergedClsPrefix:t,mergedBordered:n,namespace:o,treeMate:m,isMounted:Dr(),triggerRef:b,menuRef:P,pattern:d,uncontrolledShow:f,mergedShow:D,adjustedTo:Mt(e),uncontrolledValue:a,mergedValue:c,followerRef:F,localizedPlaceholder:$,selectedOption:I,selectedOptions:T,mergedSize:ne,mergedDisabled:X,focused:s,activeWithoutMenuOpen:$e,inlineThemeDisabled:r,onTriggerInputFocus:Je,onTriggerInputBlur:ct,handleTriggerOrMenuResize:_n,handleMenuFocus:Me,handleMenuBlur:R,handleMenuTabOut:Z,handleTriggerClick:We,handleToggle:ye,handleDeleteOption:oe,handlePatternInput:M,handleClear:Ce,handleTriggerBlur:Ke,handleTriggerFocus:Ie,handleKeydown:tn,handleMenuAfterLeave:He,handleMenuClickOutside:me,handleMenuScroll:Ut,handleMenuKeydown:tn,handleMenuMousedown:Nt,mergedTheme:i,cssVars:r?void 0:rn,themeClass:dt==null?void 0:dt.themeClass,onRender:dt==null?void 0:dt.onRender})},render(){return v("div",{class:`${this.mergedClsPrefix}-select`},v(Br,null,{default:()=>[v(Sr,null,{default:()=>v(Dl,{ref:"triggerRef",inlineThemeDisabled:this.inlineThemeDisabled,status:this.mergedStatus,inputProps:this.inputProps,clsPrefix:this.mergedClsPrefix,showArrow:this.showArrow,maxTagCount:this.maxTagCount,ellipsisTagPopoverProps:this.ellipsisTagPopoverProps,bordered:this.mergedBordered,active:this.activeWithoutMenuOpen||this.mergedShow,pattern:this.pattern,placeholder:this.localizedPlaceholder,selectedOption:this.selectedOption,selectedOptions:this.selectedOptions,multiple:this.multiple,renderTag:this.renderTag,renderLabel:this.renderLabel,filterable:this.filterable,clearable:this.clearable,disabled:this.mergedDisabled,size:this.mergedSize,theme:this.mergedTheme.peers.InternalSelection,labelField:this.labelField,valueField:this.valueField,themeOverrides:this.mergedTheme.peerOverrides.InternalSelection,loading:this.loading,focused:this.focused,onClick:this.handleTriggerClick,onDeleteOption:this.handleDeleteOption,onPatternInput:this.handlePatternInput,onClear:this.handleClear,onBlur:this.handleTriggerBlur,onFocus:this.handleTriggerFocus,onKeydown:this.handleKeydown,onPatternBlur:this.onTriggerInputBlur,onPatternFocus:this.onTriggerInputFocus,onResize:this.handleTriggerOrMenuResize,ignoreComposition:this.ignoreComposition},{arrow:()=>{var e,t;return[(t=(e=this.$slots).arrow)===null||t===void 0?void 0:t.call(e)]}})}),v(kr,{ref:"followerRef",show:this.mergedShow,to:this.adjustedTo,teleportDisabled:this.adjustedTo===Mt.tdkey,containerClass:this.namespace,width:this.consistentMenuWidth?"target":void 0,minWidth:"target",placement:this.placement},{default:()=>v(mo,{name:"fade-in-scale-up-transition",appear:this.isMounted,onAfterLeave:this.handleMenuAfterLeave},{default:()=>{var e,t,n;return this.mergedShow||this.displayDirective==="show"?((e=this.onRender)===null||e===void 0||e.call(this),yo(v(dl,Object.assign({},this.menuProps,{ref:"menuRef",onResize:this.handleTriggerOrMenuResize,inlineThemeDisabled:this.inlineThemeDisabled,virtualScroll:this.consistentMenuWidth&&this.virtualScroll,class:[`${this.mergedClsPrefix}-select-menu`,this.themeClass,(t=this.menuProps)===null||t===void 0?void 0:t.class],clsPrefix:this.mergedClsPrefix,focusable:!0,labelField:this.labelField,valueField:this.valueField,autoPending:!0,nodeProps:this.nodeProps,theme:this.mergedTheme.peers.InternalSelectMenu,themeOverrides:this.mergedTheme.peerOverrides.InternalSelectMenu,treeMate:this.treeMate,multiple:this.multiple,size:this.menuSize,renderOption:this.renderOption,renderLabel:this.renderLabel,value:this.mergedValue,style:[(n=this.menuProps)===null||n===void 0?void 0:n.style,this.cssVars],onToggle:this.handleToggle,onScroll:this.handleMenuScroll,onFocus:this.handleMenuFocus,onBlur:this.handleMenuBlur,onKeydown:this.handleMenuKeydown,onTabOut:this.handleMenuTabOut,onMousedown:this.handleMenuMousedown,show:this.mergedShow,showCheckmark:this.showCheckmark,resetMenuOnOptionsChange:this.resetMenuOnOptionsChange}),{empty:()=>{var o,r;return[(r=(o=this.$slots).empty)===null||r===void 0?void 0:r.call(o)]},header:()=>{var o,r;return[(r=(o=this.$slots).header)===null||r===void 0?void 0:r.call(o)]},action:()=>{var o,r;return[(r=(o=this.$slots).action)===null||r===void 0?void 0:r.call(o)]}}),this.displayDirective==="show"?[[Rn,this.mergedShow],[lo,this.handleMenuClickOutside,void 0,{capture:!0}]]:[[lo,this.handleMenuClickOutside,void 0,{capture:!0}]])):null}})})]}))}});function au(e){const{borderColor:t,primaryColor:n,baseColor:o,textColorDisabled:r,inputColorDisabled:i,textColor2:a,opacityDisabled:l,borderRadius:c,fontSizeSmall:s,fontSizeMedium:d,fontSizeLarge:u,heightSmall:h,heightMedium:g,heightLarge:p,lineHeight:w}=e;return Object.assign(Object.assign({},Gi),{labelLineHeight:w,buttonHeightSmall:h,buttonHeightMedium:g,buttonHeightLarge:p,fontSizeSmall:s,fontSizeMedium:d,fontSizeLarge:u,boxShadow:`inset 0 0 0 1px ${t}`,boxShadowActive:`inset 0 0 0 1px ${n}`,boxShadowFocus:`inset 0 0 0 1px ${n}, 0 0 0 2px ${we(n,{alpha:.2})}`,boxShadowHover:`inset 0 0 0 1px ${n}`,boxShadowDisabled:`inset 0 0 0 1px ${t}`,color:o,colorDisabled:i,colorActive:"#0000",textColor:a,textColorDisabled:r,dotColorActive:n,dotColorDisabled:t,buttonBorderColor:t,buttonBorderColorActive:n,buttonBorderColorHover:t,buttonColor:o,buttonColorActive:o,buttonTextColor:a,buttonTextColorActive:n,buttonTextColorHover:n,opacityDisabled:l,buttonBoxShadowFocus:`inset 0 0 0 1px ${n}, 0 0 0 2px ${we(n,{alpha:.3})}`,buttonBoxShadowHover:"inset 0 0 0 1px #0000",buttonBoxShadow:"inset 0 0 0 1px #0000",buttonBorderRadius:c})}const Mr={common:Co,self:au},lu=_("radio",`
686
+ line-height: var(--n-label-line-height);
687
+ outline: none;
688
+ position: relative;
689
+ user-select: none;
690
+ -webkit-user-select: none;
691
+ display: inline-flex;
692
+ align-items: flex-start;
693
+ flex-wrap: nowrap;
694
+ font-size: var(--n-font-size);
695
+ word-break: break-word;
696
+ `,[W("checked",[E("dot",`
697
+ background-color: var(--n-color-active);
698
+ `)]),E("dot-wrapper",`
699
+ position: relative;
700
+ flex-shrink: 0;
701
+ flex-grow: 0;
702
+ width: var(--n-radio-size);
703
+ `),_("radio-input",`
704
+ position: absolute;
705
+ border: 0;
706
+ width: 0;
707
+ height: 0;
708
+ opacity: 0;
709
+ margin: 0;
710
+ `),E("dot",`
711
+ position: absolute;
712
+ top: 50%;
713
+ left: 0;
714
+ transform: translateY(-50%);
715
+ height: var(--n-radio-size);
716
+ width: var(--n-radio-size);
717
+ background: var(--n-color);
718
+ box-shadow: var(--n-box-shadow);
719
+ border-radius: 50%;
720
+ transition:
721
+ background-color .3s var(--n-bezier),
722
+ box-shadow .3s var(--n-bezier);
723
+ `,[q("&::before",`
724
+ content: "";
725
+ opacity: 0;
726
+ position: absolute;
727
+ left: 4px;
728
+ top: 4px;
729
+ height: calc(100% - 8px);
730
+ width: calc(100% - 8px);
731
+ border-radius: 50%;
732
+ transform: scale(.8);
733
+ background: var(--n-dot-color-active);
734
+ transition:
735
+ opacity .3s var(--n-bezier),
736
+ background-color .3s var(--n-bezier),
737
+ transform .3s var(--n-bezier);
738
+ `),W("checked",{boxShadow:"var(--n-box-shadow-active)"},[q("&::before",`
739
+ opacity: 1;
740
+ transform: scale(1);
741
+ `)])]),E("label",`
742
+ color: var(--n-text-color);
743
+ padding: var(--n-label-padding);
744
+ font-weight: var(--n-label-font-weight);
745
+ display: inline-block;
746
+ transition: color .3s var(--n-bezier);
747
+ `),Ge("disabled",`
748
+ cursor: pointer;
749
+ `,[q("&:hover",[E("dot",{boxShadow:"var(--n-box-shadow-hover)"})]),W("focus",[q("&:not(:active)",[E("dot",{boxShadow:"var(--n-box-shadow-focus)"})])])]),W("disabled",`
750
+ cursor: not-allowed;
751
+ `,[E("dot",{boxShadow:"var(--n-box-shadow-disabled)",backgroundColor:"var(--n-color-disabled)"},[q("&::before",{backgroundColor:"var(--n-dot-color-disabled)"}),W("checked",`
752
+ opacity: 1;
753
+ `)]),E("label",{color:"var(--n-text-color-disabled)"}),_("radio-input",`
754
+ cursor: not-allowed;
755
+ `)])]),uu={name:String,value:{type:[String,Number,Boolean],default:"on"},checked:{type:Boolean,default:void 0},defaultChecked:Boolean,disabled:{type:Boolean,default:void 0},label:String,size:String,onUpdateChecked:[Function,Array],"onUpdate:checked":[Function,Array],checkedValue:{type:Boolean,default:void 0}},Nr=Yt("n-radio-group");function su(e){const t=mt(Nr,null),n=Qt(e,{mergedSize(C){const{size:f}=e;if(f!==void 0)return f;if(t){const{mergedSizeRef:{value:D}}=t;if(D!==void 0)return D}return C?C.mergedSize.value:"medium"},mergedDisabled(C){return!!(e.disabled||t!=null&&t.disabledRef.value||C!=null&&C.disabled.value)}}),{mergedSizeRef:o,mergedDisabledRef:r}=n,i=V(null),a=V(null),l=V(e.defaultChecked),c=be(e,"checked"),s=vt(c,l),d=je(()=>t?t.valueRef.value===e.value:s.value),u=je(()=>{const{name:C}=e;if(C!==void 0)return C;if(t)return t.nameRef.value}),h=V(!1);function g(){if(t){const{doUpdateValue:C}=t,{value:f}=e;xe(C,f)}else{const{onUpdateChecked:C,"onUpdate:checked":f}=e,{nTriggerFormInput:D,nTriggerFormChange:b}=n;C&&xe(C,!0),f&&xe(f,!0),D(),b(),l.value=!0}}function p(){r.value||d.value||g()}function w(){p(),i.value&&(i.value.checked=d.value)}function y(){h.value=!1}function m(){h.value=!0}return{mergedClsPrefix:t?t.mergedClsPrefixRef:Ue(e).mergedClsPrefixRef,inputRef:i,labelRef:a,mergedName:u,mergedDisabled:r,renderSafeChecked:d,focus:h,mergedSize:o,handleRadioInputChange:w,handleRadioInputBlur:y,handleRadioInputFocus:m}}const cu=Object.assign(Object.assign({},ke.props),uu),du=re({name:"Radio",props:cu,setup(e){const t=su(e),n=ke("Radio","-radio",lu,Mr,e,t.mergedClsPrefix),o=N(()=>{const{mergedSize:{value:s}}=t,{common:{cubicBezierEaseInOut:d},self:{boxShadow:u,boxShadowActive:h,boxShadowDisabled:g,boxShadowFocus:p,boxShadowHover:w,color:y,colorDisabled:m,colorActive:C,textColor:f,textColorDisabled:D,dotColorActive:b,dotColorDisabled:F,labelPadding:P,labelLineHeight:S,labelFontWeight:$,[ce("fontSize",s)]:j,[ce("radioSize",s)]:K}}=n.value;return{"--n-bezier":d,"--n-label-line-height":S,"--n-label-font-weight":$,"--n-box-shadow":u,"--n-box-shadow-active":h,"--n-box-shadow-disabled":g,"--n-box-shadow-focus":p,"--n-box-shadow-hover":w,"--n-color":y,"--n-color-active":C,"--n-color-disabled":m,"--n-dot-color-active":b,"--n-dot-color-disabled":F,"--n-font-size":j,"--n-radio-size":K,"--n-text-color":f,"--n-text-color-disabled":D,"--n-label-padding":P}}),{inlineThemeDisabled:r,mergedClsPrefixRef:i,mergedRtlRef:a}=Ue(e),l=Ct("Radio",a,i),c=r?tt("radio",N(()=>t.mergedSize.value[0]),o,e):void 0;return Object.assign(t,{rtlEnabled:l,cssVars:r?void 0:o,themeClass:c==null?void 0:c.themeClass,onRender:c==null?void 0:c.onRender})},render(){const{$slots:e,mergedClsPrefix:t,onRender:n,label:o}=this;return n==null||n(),v("label",{class:[`${t}-radio`,this.themeClass,this.rtlEnabled&&`${t}-radio--rtl`,this.mergedDisabled&&`${t}-radio--disabled`,this.renderSafeChecked&&`${t}-radio--checked`,this.focus&&`${t}-radio--focus`],style:this.cssVars},v("div",{class:`${t}-radio__dot-wrapper`}," ",v("div",{class:[`${t}-radio__dot`,this.renderSafeChecked&&`${t}-radio__dot--checked`]}),v("input",{ref:"inputRef",type:"radio",class:`${t}-radio-input`,value:this.value,name:this.mergedName,checked:this.renderSafeChecked,disabled:this.mergedDisabled,onChange:this.handleRadioInputChange,onFocus:this.handleRadioInputFocus,onBlur:this.handleRadioInputBlur})),qe(e.default,r=>!r&&!o?null:v("div",{ref:"labelRef",class:`${t}-radio__label`},r||o)))}}),fu=_("radio-group",`
756
+ display: inline-block;
757
+ font-size: var(--n-font-size);
758
+ `,[E("splitor",`
759
+ display: inline-block;
760
+ vertical-align: bottom;
761
+ width: 1px;
762
+ transition:
763
+ background-color .3s var(--n-bezier),
764
+ opacity .3s var(--n-bezier);
765
+ background: var(--n-button-border-color);
766
+ `,[W("checked",{backgroundColor:"var(--n-button-border-color-active)"}),W("disabled",{opacity:"var(--n-opacity-disabled)"})]),W("button-group",`
767
+ white-space: nowrap;
768
+ height: var(--n-height);
769
+ line-height: var(--n-height);
770
+ `,[_("radio-button",{height:"var(--n-height)",lineHeight:"var(--n-height)"}),E("splitor",{height:"var(--n-height)"})]),_("radio-button",`
771
+ vertical-align: bottom;
772
+ outline: none;
773
+ position: relative;
774
+ user-select: none;
775
+ -webkit-user-select: none;
776
+ display: inline-block;
777
+ box-sizing: border-box;
778
+ padding-left: 14px;
779
+ padding-right: 14px;
780
+ white-space: nowrap;
781
+ transition:
782
+ background-color .3s var(--n-bezier),
783
+ opacity .3s var(--n-bezier),
784
+ border-color .3s var(--n-bezier),
785
+ color .3s var(--n-bezier);
786
+ background: var(--n-button-color);
787
+ color: var(--n-button-text-color);
788
+ border-top: 1px solid var(--n-button-border-color);
789
+ border-bottom: 1px solid var(--n-button-border-color);
790
+ `,[_("radio-input",`
791
+ pointer-events: none;
792
+ position: absolute;
793
+ border: 0;
794
+ border-radius: inherit;
795
+ left: 0;
796
+ right: 0;
797
+ top: 0;
798
+ bottom: 0;
799
+ opacity: 0;
800
+ z-index: 1;
801
+ `),E("state-border",`
802
+ z-index: 1;
803
+ pointer-events: none;
804
+ position: absolute;
805
+ box-shadow: var(--n-button-box-shadow);
806
+ transition: box-shadow .3s var(--n-bezier);
807
+ left: -1px;
808
+ bottom: -1px;
809
+ right: -1px;
810
+ top: -1px;
811
+ `),q("&:first-child",`
812
+ border-top-left-radius: var(--n-button-border-radius);
813
+ border-bottom-left-radius: var(--n-button-border-radius);
814
+ border-left: 1px solid var(--n-button-border-color);
815
+ `,[E("state-border",`
816
+ border-top-left-radius: var(--n-button-border-radius);
817
+ border-bottom-left-radius: var(--n-button-border-radius);
818
+ `)]),q("&:last-child",`
819
+ border-top-right-radius: var(--n-button-border-radius);
820
+ border-bottom-right-radius: var(--n-button-border-radius);
821
+ border-right: 1px solid var(--n-button-border-color);
822
+ `,[E("state-border",`
823
+ border-top-right-radius: var(--n-button-border-radius);
824
+ border-bottom-right-radius: var(--n-button-border-radius);
825
+ `)]),Ge("disabled",`
826
+ cursor: pointer;
827
+ `,[q("&:hover",[E("state-border",`
828
+ transition: box-shadow .3s var(--n-bezier);
829
+ box-shadow: var(--n-button-box-shadow-hover);
830
+ `),Ge("checked",{color:"var(--n-button-text-color-hover)"})]),W("focus",[q("&:not(:active)",[E("state-border",{boxShadow:"var(--n-button-box-shadow-focus)"})])])]),W("checked",`
831
+ background: var(--n-button-color-active);
832
+ color: var(--n-button-text-color-active);
833
+ border-color: var(--n-button-border-color-active);
834
+ `),W("disabled",`
835
+ cursor: not-allowed;
836
+ opacity: var(--n-opacity-disabled);
837
+ `)])]);function hu(e,t,n){var o;const r=[];let i=!1;for(let a=0;a<e.length;++a){const l=e[a],c=(o=l.type)===null||o===void 0?void 0:o.name;c==="RadioButton"&&(i=!0);const s=l.props;if(c!=="RadioButton"){r.push(l);continue}if(a===0)r.push(l);else{const d=r[r.length-1].props,u=t===d.value,h=d.disabled,g=t===s.value,p=s.disabled,w=(u?2:0)+(h?0:1),y=(g?2:0)+(p?0:1),m={[`${n}-radio-group__splitor--disabled`]:h,[`${n}-radio-group__splitor--checked`]:u},C={[`${n}-radio-group__splitor--disabled`]:p,[`${n}-radio-group__splitor--checked`]:g},f=w<y?C:m;r.push(v("div",{class:[`${n}-radio-group__splitor`,f]}),l)}}return{children:r,isButtonGroup:i}}const pu=Object.assign(Object.assign({},ke.props),{name:String,value:[String,Number,Boolean],defaultValue:{type:[String,Number,Boolean],default:null},size:String,disabled:{type:Boolean,default:void 0},"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array]}),vu=re({name:"RadioGroup",props:pu,setup(e){const t=V(null),{mergedSizeRef:n,mergedDisabledRef:o,nTriggerFormChange:r,nTriggerFormInput:i,nTriggerFormBlur:a,nTriggerFormFocus:l}=Qt(e),{mergedClsPrefixRef:c,inlineThemeDisabled:s,mergedRtlRef:d}=Ue(e),u=ke("Radio","-radio-group",fu,Mr,e,c),h=V(e.defaultValue),g=be(e,"value"),p=vt(g,h);function w(b){const{onUpdateValue:F,"onUpdate:value":P}=e;F&&xe(F,b),P&&xe(P,b),h.value=b,r(),i()}function y(b){const{value:F}=t;F&&(F.contains(b.relatedTarget)||l())}function m(b){const{value:F}=t;F&&(F.contains(b.relatedTarget)||a())}pt(Nr,{mergedClsPrefixRef:c,nameRef:be(e,"name"),valueRef:p,disabledRef:o,mergedSizeRef:n,doUpdateValue:w});const C=Ct("Radio",d,c),f=N(()=>{const{value:b}=n,{common:{cubicBezierEaseInOut:F},self:{buttonBorderColor:P,buttonBorderColorActive:S,buttonBorderRadius:$,buttonBoxShadow:j,buttonBoxShadowFocus:K,buttonBoxShadowHover:ae,buttonColor:B,buttonColorActive:T,buttonTextColor:I,buttonTextColorActive:ee,buttonTextColorHover:ne,opacityDisabled:X,[ce("buttonHeight",b)]:de,[ce("fontSize",b)]:Y}}=u.value;return{"--n-font-size":Y,"--n-bezier":F,"--n-button-border-color":P,"--n-button-border-color-active":S,"--n-button-border-radius":$,"--n-button-box-shadow":j,"--n-button-box-shadow-focus":K,"--n-button-box-shadow-hover":ae,"--n-button-color":B,"--n-button-color-active":T,"--n-button-text-color":I,"--n-button-text-color-hover":ne,"--n-button-text-color-active":ee,"--n-height":de,"--n-opacity-disabled":X}}),D=s?tt("radio-group",N(()=>n.value[0]),f,e):void 0;return{selfElRef:t,rtlEnabled:C,mergedClsPrefix:c,mergedValue:p,handleFocusout:m,handleFocusin:y,cssVars:s?void 0:f,themeClass:D==null?void 0:D.themeClass,onRender:D==null?void 0:D.onRender}},render(){var e;const{mergedValue:t,mergedClsPrefix:n,handleFocusin:o,handleFocusout:r}=this,{children:i,isButtonGroup:a}=hu(xo(ko(this)),t,n);return(e=this.onRender)===null||e===void 0||e.call(this),v("div",{onFocusin:o,onFocusout:r,ref:"selfElRef",class:[`${n}-radio-group`,this.rtlEnabled&&`${n}-radio-group--rtl`,this.themeClass,a&&`${n}-radio-group--button-group`],style:this.cssVars},i)}});function gu(){return Ki}const bu={self:gu};let Wn;function mu(){if(!Cr)return!0;if(Wn===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),Wn=t}return Wn}const Du=Object.assign(Object.assign({},ke.props),{align:String,justify:{type:String,default:"start"},inline:Boolean,vertical:Boolean,reverse:Boolean,size:{type:[String,Number,Array],default:"medium"},wrapItem:{type:Boolean,default:!0},itemClass:String,itemStyle:[String,Object],wrap:{type:Boolean,default:!0},internalUseGap:{type:Boolean,default:void 0}}),qt=re({name:"Space",props:Du,setup(e){const{mergedClsPrefixRef:t,mergedRtlRef:n}=Ue(e),o=ke("Space","-space",void 0,bu,e,t),r=Ct("Space",n,t);return{useGap:mu(),rtlEnabled:r,mergedClsPrefix:t,margin:N(()=>{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:{[ce("gap",i)]:a}}=o.value,{row:l,col:c}=Xi(a);return{horizontal:Le(c),vertical:Le(l)}})}},render(){const{vertical:e,reverse:t,align:n,inline:o,justify:r,itemClass:i,itemStyle:a,margin:l,wrap:c,mergedClsPrefix:s,rtlEnabled:d,useGap:u,wrapItem:h,internalUseGap:g}=this,p=xo(ko(this),!1);if(!p.length)return null;const w=`${l.horizontal}px`,y=`${l.horizontal/2}px`,m=`${l.vertical}px`,C=`${l.vertical/2}px`,f=p.length-1,D=r.startsWith("space-");return v("div",{role:"none",class:[`${s}-space`,d&&`${s}-space--rtl`],style:{display:o?"inline-flex":"flex",flexDirection:e&&!t?"column":e&&t?"column-reverse":!e&&t?"row-reverse":"row",justifyContent:["start","end"].includes(r)?`flex-${r}`:r,flexWrap:!c||e?"nowrap":"wrap",marginTop:u||e?"":`-${C}`,marginBottom:u||e?"":`-${C}`,alignItems:n,gap:u?`${l.vertical}px ${l.horizontal}px`:""}},!h&&(u||g)?p:p.map((b,F)=>b.type===qi?b:v("div",{role:"none",class:i,style:[a,{maxWidth:"100%"},u?"":e?{marginBottom:F!==f?m:""}:d?{marginLeft:D?r==="space-between"&&F===f?"":y:F!==f?w:"",marginRight:D?r==="space-between"&&F===0?"":y:"",paddingTop:C,paddingBottom:C}:{marginRight:D?r==="space-between"&&F===f?"":y:F!==f?w:"",marginLeft:D?r==="space-between"&&F===0?"":y:"",paddingTop:C,paddingBottom:C}]},b)))}});function Cu(e){const{primaryColor:t,opacityDisabled:n,borderRadius:o,textColor3:r}=e;return Object.assign(Object.assign({},Zi),{iconColor:r,textColor:"white",loadingColor:t,opacityDisabled:n,railColor:"rgba(0, 0, 0, .14)",railColorActive:t,buttonBoxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.3), inset 0 0 1px 0 rgba(0, 0, 0, 0.05)",buttonColor:"#FFF",railBorderRadiusSmall:o,railBorderRadiusMedium:o,railBorderRadiusLarge:o,buttonBorderRadiusSmall:o,buttonBorderRadiusMedium:o,buttonBorderRadiusLarge:o,boxShadowFocus:`0 0 0 2px ${we(t,{alpha:.2})}`})}const wu={common:Co,self:Cu},Qo=1,Ur=Yt("n-grid"),Lr=1,yu={span:{type:[Number,String],default:Lr},offset:{type:[Number,String],default:0},suffix:Boolean,privateOffset:Number,privateSpan:Number,privateColStart:Number,privateShow:{type:Boolean,default:!0}},er=re({__GRID_ITEM__:!0,name:"GridItem",alias:["Gi"],props:yu,setup(){const{isSsrRef:e,xGapRef:t,itemStyleRef:n,overflowRef:o,layoutShiftDisabledRef:r}=mt(Ur),i=Ji();return{overflow:o,itemStyle:n,layoutShiftDisabled:r,mergedXGap:N(()=>Ve(t.value||0)),deriveStyle:()=>{e.value;const{privateSpan:a=Lr,privateShow:l=!0,privateColStart:c=void 0,privateOffset:s=0}=i.vnode.props,{value:d}=t,u=Ve(d||0);return{display:l?"":"none",gridColumn:`${c??`span ${a}`} / span ${a}`,marginLeft:s?`calc((100% - (${a} - 1) * ${u}) / ${a} * ${s} + ${u} * ${s})`:""}}}},render(){var e,t;if(this.layoutShiftDisabled){const{span:n,offset:o,mergedXGap:r}=this;return v("div",{style:{gridColumn:`span ${n} / span ${n}`,marginLeft:o?`calc((100% - (${n} - 1) * ${r}) / ${n} * ${o} + ${r} * ${o})`:""}},this.$slots)}return v("div",{style:[this.itemStyle,this.deriveStyle()]},(t=(e=this.$slots).default)===null||t===void 0?void 0:t.call(e,{overflow:this.overflow}))}}),xu={xs:0,s:640,m:1024,l:1280,xl:1536,xxl:1920},Vr=24,Gn="__ssr__",Fu={layoutShiftDisabled:Boolean,responsive:{type:[String,Boolean],default:"self"},cols:{type:[Number,String],default:Vr},itemResponsive:Boolean,collapsed:Boolean,collapsedRows:{type:Number,default:1},itemStyle:[Object,String],xGap:{type:[Number,String],default:0},yGap:{type:[Number,String],default:0}},Au=re({name:"Grid",inheritAttrs:!1,props:Fu,setup(e){const{mergedClsPrefixRef:t,mergedBreakpointsRef:n}=Ue(e),o=/^\d+$/,r=V(void 0),i=xa((n==null?void 0:n.value)||xu),a=je(()=>!!(e.itemResponsive||!o.test(e.cols.toString())||!o.test(e.xGap.toString())||!o.test(e.yGap.toString()))),l=N(()=>{if(a.value)return e.responsive==="self"?r.value:i.value}),c=je(()=>{var m;return(m=Number(Rt(e.cols.toString(),l.value)))!==null&&m!==void 0?m:Vr}),s=je(()=>Rt(e.xGap.toString(),l.value)),d=je(()=>Rt(e.yGap.toString(),l.value)),u=m=>{r.value=m.contentRect.width},h=m=>{Er(u,m)},g=V(!1),p=N(()=>{if(e.responsive==="self")return h}),w=V(!1),y=V();return Dt(()=>{const{value:m}=y;m&&m.hasAttribute(Gn)&&(m.removeAttribute(Gn),w.value=!0)}),pt(Ur,{layoutShiftDisabledRef:be(e,"layoutShiftDisabled"),isSsrRef:w,itemStyleRef:be(e,"itemStyle"),xGapRef:s,overflowRef:g}),{isSsr:!Cr,contentEl:y,mergedClsPrefix:t,style:N(()=>e.layoutShiftDisabled?{width:"100%",display:"grid",gridTemplateColumns:`repeat(${e.cols}, minmax(0, 1fr))`,columnGap:Ve(e.xGap),rowGap:Ve(e.yGap)}:{width:"100%",display:"grid",gridTemplateColumns:`repeat(${c.value}, minmax(0, 1fr))`,columnGap:Ve(s.value),rowGap:Ve(d.value)}),isResponsive:a,responsiveQuery:l,responsiveCols:c,handleResize:p,overflow:g}},render(){if(this.layoutShiftDisabled)return v("div",eo({ref:"contentEl",class:`${this.mergedClsPrefix}-grid`,style:this.style},this.$attrs),this.$slots);const e=()=>{var t,n,o,r,i,a,l;this.overflow=!1;const c=xo(ko(this)),s=[],{collapsed:d,collapsedRows:u,responsiveCols:h,responsiveQuery:g}=this;c.forEach(C=>{var f,D,b,F,P;if(((f=C==null?void 0:C.type)===null||f===void 0?void 0:f.__GRID_ITEM__)!==!0)return;if(ka(C)){const j=Oo(C);j.props?j.props.privateShow=!1:j.props={privateShow:!1},s.push({child:j,rawChildSpan:0});return}C.dirs=((D=C.dirs)===null||D===void 0?void 0:D.filter(({dir:j})=>j!==Rn))||null,((b=C.dirs)===null||b===void 0?void 0:b.length)===0&&(C.dirs=null);const S=Oo(C),$=Number((P=Rt((F=S.props)===null||F===void 0?void 0:F.span,g))!==null&&P!==void 0?P:Qo);$!==0&&s.push({child:S,rawChildSpan:$})});let p=0;const w=(t=s[s.length-1])===null||t===void 0?void 0:t.child;if(w!=null&&w.props){const C=(n=w.props)===null||n===void 0?void 0:n.suffix;C!==void 0&&C!==!1&&(p=Number((r=Rt((o=w.props)===null||o===void 0?void 0:o.span,g))!==null&&r!==void 0?r:Qo),w.props.privateSpan=p,w.props.privateColStart=h+1-p,w.props.privateShow=(i=w.props.privateShow)!==null&&i!==void 0?i:!0)}let y=0,m=!1;for(const{child:C,rawChildSpan:f}of s){if(m&&(this.overflow=!0),!m){const D=Number((l=Rt((a=C.props)===null||a===void 0?void 0:a.offset,g))!==null&&l!==void 0?l:0),b=Math.min(f+D,h);if(C.props?(C.props.privateSpan=b,C.props.privateOffset=D):C.props={privateSpan:b,privateOffset:D},d){const F=y%h;b+F>h&&(y+=h-F),b+y+p>u*h?m=!0:y+=b}}m&&(C.props?C.props.privateShow!==!0&&(C.props.privateShow=!1):C.props={privateShow:!1})}return v("div",eo({ref:"contentEl",class:`${this.mergedClsPrefix}-grid`,style:this.style,[Gn]:this.isSsr||void 0},this.$attrs),s.map(({child:C})=>C))};return this.isResponsive&&this.responsive==="self"?v(Qn,{onResize:this.handleResize},{default:e}):e()}}),Eu=_("switch",`
838
+ height: var(--n-height);
839
+ min-width: var(--n-width);
840
+ vertical-align: middle;
841
+ user-select: none;
842
+ -webkit-user-select: none;
843
+ display: inline-flex;
844
+ outline: none;
845
+ justify-content: center;
846
+ align-items: center;
847
+ `,[E("children-placeholder",`
848
+ height: var(--n-rail-height);
849
+ display: flex;
850
+ flex-direction: column;
851
+ overflow: hidden;
852
+ pointer-events: none;
853
+ visibility: hidden;
854
+ `),E("rail-placeholder",`
855
+ display: flex;
856
+ flex-wrap: none;
857
+ `),E("button-placeholder",`
858
+ width: calc(1.75 * var(--n-rail-height));
859
+ height: var(--n-rail-height);
860
+ `),_("base-loading",`
861
+ position: absolute;
862
+ top: 50%;
863
+ left: 50%;
864
+ transform: translateX(-50%) translateY(-50%);
865
+ font-size: calc(var(--n-button-width) - 4px);
866
+ color: var(--n-loading-color);
867
+ transition: color .3s var(--n-bezier);
868
+ `,[Mo({left:"50%",top:"50%",originalTransform:"translateX(-50%) translateY(-50%)"})]),E("checked, unchecked",`
869
+ transition: color .3s var(--n-bezier);
870
+ color: var(--n-text-color);
871
+ box-sizing: border-box;
872
+ position: absolute;
873
+ white-space: nowrap;
874
+ top: 0;
875
+ bottom: 0;
876
+ display: flex;
877
+ align-items: center;
878
+ line-height: 1;
879
+ `),E("checked",`
880
+ right: 0;
881
+ padding-right: calc(1.25 * var(--n-rail-height) - var(--n-offset));
882
+ `),E("unchecked",`
883
+ left: 0;
884
+ justify-content: flex-end;
885
+ padding-left: calc(1.25 * var(--n-rail-height) - var(--n-offset));
886
+ `),q("&:focus",[E("rail",`
887
+ box-shadow: var(--n-box-shadow-focus);
888
+ `)]),W("round",[E("rail","border-radius: calc(var(--n-rail-height) / 2);",[E("button","border-radius: calc(var(--n-button-height) / 2);")])]),Ge("disabled",[Ge("icon",[W("rubber-band",[W("pressed",[E("rail",[E("button","max-width: var(--n-button-width-pressed);")])]),E("rail",[q("&:active",[E("button","max-width: var(--n-button-width-pressed);")])]),W("active",[W("pressed",[E("rail",[E("button","left: calc(100% - var(--n-offset) - var(--n-button-width-pressed));")])]),E("rail",[q("&:active",[E("button","left: calc(100% - var(--n-offset) - var(--n-button-width-pressed));")])])])])])]),W("active",[E("rail",[E("button","left: calc(100% - var(--n-button-width) - var(--n-offset))")])]),E("rail",`
889
+ overflow: hidden;
890
+ height: var(--n-rail-height);
891
+ min-width: var(--n-rail-width);
892
+ border-radius: var(--n-rail-border-radius);
893
+ cursor: pointer;
894
+ position: relative;
895
+ transition:
896
+ opacity .3s var(--n-bezier),
897
+ background .3s var(--n-bezier),
898
+ box-shadow .3s var(--n-bezier);
899
+ background-color: var(--n-rail-color);
900
+ `,[E("button-icon",`
901
+ color: var(--n-icon-color);
902
+ transition: color .3s var(--n-bezier);
903
+ font-size: calc(var(--n-button-height) - 4px);
904
+ position: absolute;
905
+ left: 0;
906
+ right: 0;
907
+ top: 0;
908
+ bottom: 0;
909
+ display: flex;
910
+ justify-content: center;
911
+ align-items: center;
912
+ line-height: 1;
913
+ `,[Mo()]),E("button",`
914
+ align-items: center;
915
+ top: var(--n-offset);
916
+ left: var(--n-offset);
917
+ height: var(--n-button-height);
918
+ width: var(--n-button-width-pressed);
919
+ max-width: var(--n-button-width);
920
+ border-radius: var(--n-button-border-radius);
921
+ background-color: var(--n-button-color);
922
+ box-shadow: var(--n-button-box-shadow);
923
+ box-sizing: border-box;
924
+ cursor: inherit;
925
+ content: "";
926
+ position: absolute;
927
+ transition:
928
+ background-color .3s var(--n-bezier),
929
+ left .3s var(--n-bezier),
930
+ opacity .3s var(--n-bezier),
931
+ max-width .3s var(--n-bezier),
932
+ box-shadow .3s var(--n-bezier);
933
+ `)]),W("active",[E("rail","background-color: var(--n-rail-color-active);")]),W("loading",[E("rail",`
934
+ cursor: wait;
935
+ `)]),W("disabled",[E("rail",`
936
+ cursor: not-allowed;
937
+ opacity: .5;
938
+ `)])]),Bu=Object.assign(Object.assign({},ke.props),{size:{type:String,default:"medium"},value:{type:[String,Number,Boolean],default:void 0},loading:Boolean,defaultValue:{type:[String,Number,Boolean],default:!1},disabled:{type:Boolean,default:void 0},round:{type:Boolean,default:!0},"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],checkedValue:{type:[String,Number,Boolean],default:!0},uncheckedValue:{type:[String,Number,Boolean],default:!1},railStyle:Function,rubberBand:{type:Boolean,default:!0},onChange:[Function,Array]});let jt;const Su=re({name:"Switch",props:Bu,slots:Object,setup(e){jt===void 0&&(typeof CSS<"u"?typeof CSS.supports<"u"?jt=CSS.supports("width","max(1px)"):jt=!1:jt=!0);const{mergedClsPrefixRef:t,inlineThemeDisabled:n}=Ue(e),o=ke("Switch","-switch",Eu,wu,e,t),r=Qt(e),{mergedSizeRef:i,mergedDisabledRef:a}=r,l=V(e.defaultValue),c=be(e,"value"),s=vt(c,l),d=N(()=>s.value===e.checkedValue),u=V(!1),h=V(!1),g=N(()=>{const{railStyle:S}=e;if(S)return S({focused:h.value,checked:d.value})});function p(S){const{"onUpdate:value":$,onChange:j,onUpdateValue:K}=e,{nTriggerFormInput:ae,nTriggerFormChange:B}=r;$&&xe($,S),K&&xe(K,S),j&&xe(j,S),l.value=S,ae(),B()}function w(){const{nTriggerFormFocus:S}=r;S()}function y(){const{nTriggerFormBlur:S}=r;S()}function m(){e.loading||a.value||(s.value!==e.checkedValue?p(e.checkedValue):p(e.uncheckedValue))}function C(){h.value=!0,w()}function f(){h.value=!1,y(),u.value=!1}function D(S){e.loading||a.value||S.key===" "&&(s.value!==e.checkedValue?p(e.checkedValue):p(e.uncheckedValue),u.value=!1)}function b(S){e.loading||a.value||S.key===" "&&(S.preventDefault(),u.value=!0)}const F=N(()=>{const{value:S}=i,{self:{opacityDisabled:$,railColor:j,railColorActive:K,buttonBoxShadow:ae,buttonColor:B,boxShadowFocus:T,loadingColor:I,textColor:ee,iconColor:ne,[ce("buttonHeight",S)]:X,[ce("buttonWidth",S)]:de,[ce("buttonWidthPressed",S)]:Y,[ce("railHeight",S)]:le,[ce("railWidth",S)]:z,[ce("railBorderRadius",S)]:O,[ce("buttonBorderRadius",S)]:ie},common:{cubicBezierEaseInOut:Se}}=o.value;let ue,_e,Fe;return jt?(ue=`calc((${le} - ${X}) / 2)`,_e=`max(${le}, ${X})`,Fe=`max(${z}, calc(${z} + ${X} - ${le}))`):(ue=Ve((Le(le)-Le(X))/2),_e=Ve(Math.max(Le(le),Le(X))),Fe=Le(le)>Le(X)?z:Ve(Le(z)+Le(X)-Le(le))),{"--n-bezier":Se,"--n-button-border-radius":ie,"--n-button-box-shadow":ae,"--n-button-color":B,"--n-button-width":de,"--n-button-width-pressed":Y,"--n-button-height":X,"--n-height":_e,"--n-offset":ue,"--n-opacity-disabled":$,"--n-rail-border-radius":O,"--n-rail-color":j,"--n-rail-color-active":K,"--n-rail-height":le,"--n-rail-width":z,"--n-width":Fe,"--n-box-shadow-focus":T,"--n-loading-color":I,"--n-text-color":ee,"--n-icon-color":ne}}),P=n?tt("switch",N(()=>i.value[0]),F,e):void 0;return{handleClick:m,handleBlur:f,handleFocus:C,handleKeyup:D,handleKeydown:b,mergedRailStyle:g,pressed:u,mergedClsPrefix:t,mergedValue:s,checked:d,mergedDisabled:a,cssVars:n?void 0:F,themeClass:P==null?void 0:P.themeClass,onRender:P==null?void 0:P.onRender}},render(){const{mergedClsPrefix:e,mergedDisabled:t,checked:n,mergedRailStyle:o,onRender:r,$slots:i}=this;r==null||r();const{checked:a,unchecked:l,icon:c,"checked-icon":s,"unchecked-icon":d}=i,u=!(On(c)&&On(s)&&On(d));return v("div",{role:"switch","aria-checked":n,class:[`${e}-switch`,this.themeClass,u&&`${e}-switch--icon`,n&&`${e}-switch--active`,t&&`${e}-switch--disabled`,this.round&&`${e}-switch--round`,this.loading&&`${e}-switch--loading`,this.pressed&&`${e}-switch--pressed`,this.rubberBand&&`${e}-switch--rubber-band`],tabindex:this.mergedDisabled?void 0:0,style:this.cssVars,onClick:this.handleClick,onFocus:this.handleFocus,onBlur:this.handleBlur,onKeyup:this.handleKeyup,onKeydown:this.handleKeydown},v("div",{class:`${e}-switch__rail`,"aria-hidden":"true",style:o},qe(a,h=>qe(l,g=>h||g?v("div",{"aria-hidden":!0,class:`${e}-switch__children-placeholder`},v("div",{class:`${e}-switch__rail-placeholder`},v("div",{class:`${e}-switch__button-placeholder`}),h),v("div",{class:`${e}-switch__rail-placeholder`},v("div",{class:`${e}-switch__button-placeholder`}),g)):null)),v("div",{class:`${e}-switch__button`},qe(c,h=>qe(s,g=>qe(d,p=>v(Yi,null,{default:()=>this.loading?v(gr,{key:"loading",clsPrefix:e,strokeWidth:20}):this.checked&&(g||h)?v("div",{class:`${e}-switch__button-icon`,key:g?"checked-icon":"icon"},g||h):!this.checked&&(p||h)?v("div",{class:`${e}-switch__button-icon`,key:p?"unchecked-icon":"icon"},p||h):null})))),qe(a,h=>h&&v("div",{key:"checked",class:`${e}-switch__checked`},h)),qe(l,h=>h&&v("div",{key:"unchecked",class:`${e}-switch__unchecked`},h)))))}}),ku="data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1771792788434'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='59843'%20data-darkreader-inline-fill=''%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cpath%20d='M357.416807%20548.994566l306.228473%200%200-76.54535-306.228473%200L357.416807%20548.994566zM200.461079%20510.692215c0-88.038102%2068.861344-156.953681%20156.955728-156.953681l114.842585%200%200-72.729441-114.842585%200c-126.337383%200-229.6821%20103.34574-229.6821%20229.683123%200%20126.335337%20103.344716%20229.683123%20229.6821%20229.683123l114.842585%200%200-72.728418-114.842585%200C269.322423%20667.647943%20200.461079%20598.678128%20200.461079%20510.692215M663.64528%20281.009092l-114.842585%200%200%2072.729441%20114.842585%200c88.034009%200%20156.898423%2068.915579%20156.898423%20156.953681%200%2087.98489-68.863391%20156.954705-156.898423%20156.954705l-114.842585%200%200%2072.728418%20114.842585%200c126.33636%200%20229.683123-103.347786%20229.683123-229.683123C893.32738%20384.354831%20789.98164%20281.009092%20663.64528%20281.009092'%20p-id='59844'%3e%3c/path%3e%3c/svg%3e",Ru=re({props:{title:{type:String,default:"批量分享链接"},officialUrl:{type:String,required:!0},currentOriginUrl:{type:String,required:!0},extraTitle:{type:String,default:"自定义域链接"},quickPick:{type:Boolean,default:!1},onClose:{type:Function,required:!0}},setup(e){const t=N(()=>{const o=!!Uo.value;return console.log("[DialogDebug] 响应式状态:",o?"深色":"亮色"),o}),n=async o=>{try{await navigator.clipboard.writeText(o),Oe.success("复制成功")}catch{Oe.error("复制失败")}};return()=>L(ta,{theme:Uo.value},{default:()=>[L(Ao,{class:"snapshot-floating-panel snapshot-floating-panel--passthrough",size:"small",style:{width:e.quickPick?"520px":"500px",overflow:"hidden",backgroundColor:t.value?"#18181c":"#ffffff",transition:"background-color 0.3s ease"}},{header:()=>L(qt,{class:"n-draggable",align:"center",justify:"space-between",style:{width:"100%",cursor:"move"}},{default:()=>[L(qt,{align:"center",size:8},{default:()=>[L("div",{style:{width:"30px",height:"30px",filter:t.value?"invert(100%)":"none",transition:"filter 0.3s ease"}},[L("img",{src:ku,style:{width:"100%",height:"100%"}},null)]),L("span",{style:{fontWeight:"500",color:t.value?"#ffffff":"inherit"}},[e.title])]}),L(at,{text:!0,style:{fontSize:"20px"},onClick:()=>e.onClose()},{default:()=>[" ",Be("×")," "]})]}),default:()=>L(qt,{vertical:!0,size:10},{default:()=>[L("div",{class:"flex flex-col gap-1"},[L("div",{class:"text-11px opacity-40 ml-1",style:{color:"var(--n-text-color-disabled)"}},[" ",Be("官方域 (i.gkd.li)")," "]),L(Zt,{type:"textarea",autosize:{minRows:2,maxRows:3},inputProps:{class:"gkd_code",readonly:"true",style:"white-space: pre; font-size: 13px; padding: 6px;"},value:e.officialUrl},null)]),L("div",{class:"flex flex-col gap-1"},[L("div",{class:"text-11px opacity-40 ml-1",style:{color:"var(--n-text-color-disabled)"}},[" ",e.extraTitle," "]),L(Zt,{type:"textarea",autosize:{minRows:2,maxRows:3},inputProps:{class:"gkd_code",readonly:"true",style:"white-space: pre; font-size: 13px; padding: 6px;"},value:e.currentOriginUrl},null)])]}),footer:()=>L(Au,{cols:2,xGap:12},{default:()=>[L(er,null,{default:()=>[L(at,{block:"",style:{borderRadius:"7px",fontWeight:600,color:rt.shareUseOfficialImportDomain?t.value?"#ffffff":"#000000":"#ffffff !important"},type:rt.shareUseOfficialImportDomain?"tertiary":"success",onClick:()=>{rt.shareUseOfficialImportDomain=!1,n(e.currentOriginUrl),e.quickPick&&setTimeout(()=>e.onClose(),220)}},{default:()=>[" ",Be("当前域链接")," "]})]}),L(er,null,{default:()=>[L(at,{block:"",style:{borderRadius:"7px",fontWeight:600,color:rt.shareUseOfficialImportDomain?"#ffffff !important":t.value?"#ffffff":"#000000"},type:rt.shareUseOfficialImportDomain?"success":"tertiary",onClick:()=>{rt.shareUseOfficialImportDomain=!0,n(e.officialUrl),e.quickPick&&setTimeout(()=>e.onClose(),220)}},{default:()=>[" ",Be("官方链接")," "]})]})]})})]})}}),zu=(e={})=>{const{content:t="",extraContent:n=""}=e,o=No(t)||No(n),r=o?`https://i.gkd.li/i/${o}`:t,i=n||(o?`${window.location.origin}/i/${o}`:t);let a=null;const l=()=>a==null?void 0:a.destroy();a=ea.create({draggable:!0,showMask:!1,maskClosable:!1,closeOnEsc:!0,render:()=>v(Ru,{...e,officialUrl:r,currentOriginUrl:i,onClose:l})})},Iu=re(()=>()=>L(Fo,{checked:rt.ignoreUploadWarn,onUpdateChecked:e=>{rt.ignoreUploadWarn=e},focusable:!1},{default:()=>[" ",Be("不再提醒")," "]})),Xs=async()=>{if(!rt.ignoreUploadWarn)return new Promise((e,t)=>{Qi.warning({class:"snapshot-floating-panel",title:"生成分享链接须知",content(){return L("div",{class:"snapshot-floating-panel"},[L("div",null,[Be("所有快照上传分享链接均为公开链接,任何人均可访问。")]),L("div",null,[Be("请确保快照不包含隐私信息,请勿分享任何敏感信息。")]),L(Iu,{class:"mt-10px"},null)])},positiveText:"继续上传",negativeText:"取消分享",onPositiveClick:e,onNegativeClick:t})})};function tr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,o)}return n}function hn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?tr(Object(n),!0).forEach(function(o){$u(e,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tr(Object(n)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(n,o))})}return e}function Pu(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function nr(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,jr(o.key),o)}}function _u(e,t,n){return t&&nr(e.prototype,t),n&&nr(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function $u(e,t,n){return t=jr(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function An(){return An=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},An.apply(this,arguments)}function Tu(e,t){if(typeof e!="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var o=n.call(e,t);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function jr(e){var t=Tu(e,"string");return typeof t=="symbol"?t:String(t)}var Hr={exports:{}};(function(e){typeof window>"u"||(function(t){var n=t.HTMLCanvasElement&&t.HTMLCanvasElement.prototype,o=t.Blob&&(function(){try{return!!new Blob}catch{return!1}})(),r=o&&t.Uint8Array&&(function(){try{return new Blob([new Uint8Array(100)]).size===100}catch{return!1}})(),i=t.BlobBuilder||t.WebKitBlobBuilder||t.MozBlobBuilder||t.MSBlobBuilder,a=/^data:((.*?)(;charset=.*?)?)(;base64)?,/,l=(o||i)&&t.atob&&t.ArrayBuffer&&t.Uint8Array&&function(c){var s,d,u,h,g,p,w,y,m;if(s=c.match(a),!s)throw new Error("invalid data URI");for(d=s[2]?s[1]:"text/plain"+(s[3]||";charset=US-ASCII"),u=!!s[4],h=c.slice(s[0].length),u?g=atob(h):g=decodeURIComponent(h),p=new ArrayBuffer(g.length),w=new Uint8Array(p),y=0;y<g.length;y+=1)w[y]=g.charCodeAt(y);return o?new Blob([r?w:p],{type:d}):(m=new i,m.append(p),m.getBlob(d))};t.HTMLCanvasElement&&!n.toBlob&&(n.mozGetAsFile?n.toBlob=function(c,s,d){var u=this;setTimeout(function(){d&&n.toDataURL&&l?c(l(u.toDataURL(s,d))):c(u.mozGetAsFile("blob",s))})}:n.toDataURL&&l&&(n.msToBlob?n.toBlob=function(c,s,d){var u=this;setTimeout(function(){(s&&s!=="image/png"||d)&&n.toDataURL&&l?c(l(u.toDataURL(s,d))):c(u.msToBlob(s))})}:n.toBlob=function(c,s,d){var u=this;setTimeout(function(){c(l(u.toDataURL(s,d)))})})),e.exports?e.exports=l:t.dataURLtoBlob=l})(window)})(Hr);var or=Hr.exports,Ou=function(t){return typeof Blob>"u"?!1:t instanceof Blob||Object.prototype.toString.call(t)==="[object Blob]"},rr={strict:!0,checkOrientation:!0,retainExif:!1,maxWidth:1/0,maxHeight:1/0,minWidth:0,minHeight:0,width:void 0,height:void 0,resize:"none",quality:.8,mimeType:"auto",convertTypes:["image/png"],convertSize:5e6,beforeDraw:null,drew:null,success:null,error:null},Mu=typeof window<"u"&&typeof window.document<"u",gt=Mu?window:{},En=function(t){return t>0&&t<1/0},Nu=Array.prototype.slice;function Io(e){return Array.from?Array.from(e):Nu.call(e)}var Uu=/^image\/.+$/;function co(e){return Uu.test(e)}function Lu(e){var t=co(e)?e.substr(6):"";return t==="jpeg"&&(t="jpg"),".".concat(t)}var Wr=String.fromCharCode;function Vu(e,t,n){var o="",r;for(n+=t,r=t;r<n;r+=1)o+=Wr(e.getUint8(r));return o}var ju=gt.btoa;function ir(e,t){for(var n=[],o=8192,r=new Uint8Array(e);r.length>0;)n.push(Wr.apply(null,Io(r.subarray(0,o)))),r=r.subarray(o);return"data:".concat(t,";base64,").concat(ju(n.join("")))}function Hu(e){var t=new DataView(e),n;try{var o,r,i;if(t.getUint8(0)===255&&t.getUint8(1)===216)for(var a=t.byteLength,l=2;l+1<a;){if(t.getUint8(l)===255&&t.getUint8(l+1)===225){r=l;break}l+=1}if(r){var c=r+4,s=r+10;if(Vu(t,c,4)==="Exif"){var d=t.getUint16(s);if(o=d===18761,(o||d===19789)&&t.getUint16(s+2,o)===42){var u=t.getUint32(s+4,o);u>=8&&(i=s+u)}}}if(i){var h=t.getUint16(i,o),g,p;for(p=0;p<h;p+=1)if(g=i+p*12+2,t.getUint16(g,o)===274){g+=8,n=t.getUint16(g,o),t.setUint16(g,1,o);break}}}catch{n=1}return n}function Wu(e){var t=0,n=1,o=1;switch(e){case 2:n=-1;break;case 3:t=-180;break;case 4:o=-1;break;case 5:t=90,o=-1;break;case 6:t=90;break;case 7:t=90,n=-1;break;case 8:t=-90;break}return{rotate:t,scaleX:n,scaleY:o}}var Gu=/\.\d*(?:0|9){12}\d*$/;function ar(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e11;return Gu.test(e)?Math.round(e*t)/t:e}function Ht(e){var t=e.aspectRatio,n=e.height,o=e.width,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"none",i=En(o),a=En(n);if(i&&a){var l=n*t;(r==="contain"||r==="none")&&l>o||r==="cover"&&l<o?n=o/t:o=n*t}else i?n=o/t:a&&(o=n*t);return{width:o,height:n}}function Ku(e){for(var t=Io(new Uint8Array(e)),n=t.length,o=[],r=0;r+3<n;){var i=t[r],a=t[r+1];if(i===255&&a===218)break;if(i===255&&a===216)r+=2;else{var l=t[r+2]*256+t[r+3],c=r+l+2,s=t.slice(r,c);o.push(s),r=c}}return o.reduce(function(d,u){return u[0]===255&&u[1]===225?d.concat(u):d},[])}function qu(e,t){var n=Io(new Uint8Array(e));if(n[2]!==255||n[3]!==224)return e;var o=n[4]*256+n[5],r=[255,216].concat(t,n.slice(4+o));return new Uint8Array(r)}var Xu=gt.ArrayBuffer,Kn=gt.FileReader,xt=gt.URL||gt.webkitURL,Zu=/\.\w+$/,Ju=gt.Compressor,Yu=(function(){function e(t,n){Pu(this,e),this.file=t,this.exif=[],this.image=new Image,this.options=hn(hn({},rr),n),this.aborted=!1,this.result=null,this.init()}return _u(e,[{key:"init",value:function(){var n=this,o=this.file,r=this.options;if(!Ou(o)){this.fail(new Error("The first argument must be a File or Blob object."));return}var i=o.type;if(!co(i)){this.fail(new Error("The first argument must be an image File or Blob object."));return}if(!xt||!Kn){this.fail(new Error("The current browser does not support image compression."));return}Xu||(r.checkOrientation=!1,r.retainExif=!1);var a=i==="image/jpeg",l=a&&r.checkOrientation,c=a&&r.retainExif;if(xt&&!l&&!c)this.load({url:xt.createObjectURL(o)});else{var s=new Kn;this.reader=s,s.onload=function(d){var u=d.target,h=u.result,g={},p=1;l&&(p=Hu(h),p>1&&An(g,Wu(p))),c&&(n.exif=Ku(h)),l||c?!xt||p>1?g.url=ir(h,i):g.url=xt.createObjectURL(o):g.url=h,n.load(g)},s.onabort=function(){n.fail(new Error("Aborted to read the image with FileReader."))},s.onerror=function(){n.fail(new Error("Failed to read the image with FileReader."))},s.onloadend=function(){n.reader=null},l||c?s.readAsArrayBuffer(o):s.readAsDataURL(o)}}},{key:"load",value:function(n){var o=this,r=this.file,i=this.image;i.onload=function(){o.draw(hn(hn({},n),{},{naturalWidth:i.naturalWidth,naturalHeight:i.naturalHeight}))},i.onabort=function(){o.fail(new Error("Aborted to load the image."))},i.onerror=function(){o.fail(new Error("Failed to load the image."))},gt.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(gt.navigator.userAgent)&&(i.crossOrigin="anonymous"),i.alt=r.name,i.src=n.url}},{key:"draw",value:function(n){var o=this,r=n.naturalWidth,i=n.naturalHeight,a=n.rotate,l=a===void 0?0:a,c=n.scaleX,s=c===void 0?1:c,d=n.scaleY,u=d===void 0?1:d,h=this.file,g=this.image,p=this.options,w=document.createElement("canvas"),y=w.getContext("2d"),m=Math.abs(l)%180===90,C=(p.resize==="contain"||p.resize==="cover")&&En(p.width)&&En(p.height),f=Math.max(p.maxWidth,0)||1/0,D=Math.max(p.maxHeight,0)||1/0,b=Math.max(p.minWidth,0)||0,F=Math.max(p.minHeight,0)||0,P=r/i,S=p.width,$=p.height;if(m){var j=[D,f];f=j[0],D=j[1];var K=[F,b];b=K[0],F=K[1];var ae=[$,S];S=ae[0],$=ae[1]}C&&(P=S/$);var B=Ht({aspectRatio:P,width:f,height:D},"contain");f=B.width,D=B.height;var T=Ht({aspectRatio:P,width:b,height:F},"cover");if(b=T.width,F=T.height,C){var I=Ht({aspectRatio:P,width:S,height:$},p.resize);S=I.width,$=I.height}else{var ee=Ht({aspectRatio:P,width:S,height:$}),ne=ee.width;S=ne===void 0?r:ne;var X=ee.height;$=X===void 0?i:X}S=Math.floor(ar(Math.min(Math.max(S,b),f))),$=Math.floor(ar(Math.min(Math.max($,F),D)));var de=-S/2,Y=-$/2,le=S,z=$,O=[];if(C){var ie=0,Se=0,ue=r,_e=i,Fe=Ht({aspectRatio:P,width:r,height:i},{contain:"cover",cover:"contain"}[p.resize]);ue=Fe.width,_e=Fe.height,ie=(r-ue)/2,Se=(i-_e)/2,O.push(ie,Se,ue,_e)}if(O.push(de,Y,le,z),m){var ze=[$,S];S=ze[0],$=ze[1]}w.width=S,w.height=$,co(p.mimeType)||(p.mimeType=h.type);var He="transparent";h.size>p.convertSize&&p.convertTypes.indexOf(p.mimeType)>=0&&(p.mimeType="image/jpeg");var $e=p.mimeType==="image/jpeg";if($e&&(He="#fff"),y.fillStyle=He,y.fillRect(0,0,S,$),p.beforeDraw&&p.beforeDraw.call(this,y,w),!this.aborted&&(y.save(),y.translate(S/2,$/2),y.rotate(l*Math.PI/180),y.scale(s,u),y.drawImage.apply(y,[g].concat(O)),y.restore(),p.drew&&p.drew.call(this,y,w),!this.aborted)){var Je=function(We){if(!o.aborted){var Ke=function(Z){return o.done({naturalWidth:r,naturalHeight:i,result:Z})};if(We&&$e&&p.retainExif&&o.exif&&o.exif.length>0){var Ie=function(Z){return Ke(or(ir(qu(Z,o.exif),p.mimeType)))};if(We.arrayBuffer)We.arrayBuffer().then(Ie).catch(function(){o.fail(new Error("Failed to read the compressed image with Blob.arrayBuffer()."))});else{var Me=new Kn;o.reader=Me,Me.onload=function(R){var Z=R.target;Ie(Z.result)},Me.onabort=function(){o.fail(new Error("Aborted to read the compressed image with FileReader."))},Me.onerror=function(){o.fail(new Error("Failed to read the compressed image with FileReader."))},Me.onloadend=function(){o.reader=null},Me.readAsArrayBuffer(We)}}else Ke(We)}};w.toBlob?w.toBlob(Je,p.mimeType,p.quality):Je(or(w.toDataURL(p.mimeType,p.quality)))}}},{key:"done",value:function(n){var o=n.naturalWidth,r=n.naturalHeight,i=n.result,a=this.file,l=this.image,c=this.options;if(xt&&l.src.indexOf("blob:")===0&&xt.revokeObjectURL(l.src),i)if(c.strict&&!c.retainExif&&i.size>a.size&&c.mimeType===a.type&&!(c.width>o||c.height>r||c.minWidth>o||c.minHeight>r||c.maxWidth<o||c.maxHeight<r))i=a;else{var s=new Date;i.lastModified=s.getTime(),i.lastModifiedDate=s,i.name=a.name,i.name&&i.type!==a.type&&(i.name=i.name.replace(Zu,Lu(i.type)))}else i=a;this.result=i,c.success&&c.success.call(this,i)}},{key:"fail",value:function(n){var o=this.options;if(o.error)o.error.call(this,n);else throw n}},{key:"abort",value:function(){this.aborted||(this.aborted=!0,this.reader?this.reader.abort():this.image.complete?this.fail(new Error("The compression process has been aborted.")):(this.image.onload=null,this.image.onabort()))}}],[{key:"noConflict",value:function(){return window.Compressor=Ju,e}},{key:"setDefaults",value:function(n){An(rr,n)}}]),e})(),bn={exports:{}},Qu=bn.exports,lr;function es(){return lr||(lr=1,(function(e,t){(function(n,o){o()})(Qu,function(){function n(s,d){return typeof d>"u"?d={autoBom:!1}:typeof d!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),d={autoBom:!d}),d.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(s.type)?new Blob(["\uFEFF",s],{type:s.type}):s}function o(s,d,u){var h=new XMLHttpRequest;h.open("GET",s),h.responseType="blob",h.onload=function(){c(h.response,d,u)},h.onerror=function(){console.error("could not download file")},h.send()}function r(s){var d=new XMLHttpRequest;d.open("HEAD",s,!1);try{d.send()}catch{}return 200<=d.status&&299>=d.status}function i(s){try{s.dispatchEvent(new MouseEvent("click"))}catch{var d=document.createEvent("MouseEvents");d.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),s.dispatchEvent(d)}}var a=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof un=="object"&&un.global===un?un:void 0,l=a.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),c=a.saveAs||(typeof window!="object"||window!==a?function(){}:"download"in HTMLAnchorElement.prototype&&!l?function(s,d,u){var h=a.URL||a.webkitURL,g=document.createElement("a");d=d||s.name||"download",g.download=d,g.rel="noopener",typeof s=="string"?(g.href=s,g.origin===location.origin?i(g):r(g.href)?o(s,d,u):i(g,g.target="_blank")):(g.href=h.createObjectURL(s),setTimeout(function(){h.revokeObjectURL(g.href)},4e4),setTimeout(function(){i(g)},0))}:"msSaveOrOpenBlob"in navigator?function(s,d,u){if(d=d||s.name||"download",typeof s!="string")navigator.msSaveOrOpenBlob(n(s,u),d);else if(r(s))o(s,d,u);else{var h=document.createElement("a");h.href=s,h.target="_blank",setTimeout(function(){i(h)})}}:function(s,d,u,h){if(h=h||open("","_blank"),h&&(h.document.title=h.document.body.innerText="downloading..."),typeof s=="string")return o(s,d,u);var g=s.type==="application/octet-stream",p=/constructor/i.test(a.HTMLElement)||a.safari,w=/CriOS\/[\d]+/.test(navigator.userAgent);if((w||g&&p||l)&&typeof FileReader<"u"){var y=new FileReader;y.onloadend=function(){var f=y.result;f=w?f:f.replace(/^data:[^;]*;/,"data:attachment/file;"),h?h.location.href=f:location=f,h=null},y.readAsDataURL(s)}else{var m=a.URL||a.webkitURL,C=m.createObjectURL(s);h?h.location=C:location.href=C,h=null,setTimeout(function(){m.revokeObjectURL(C)},4e4)}});a.saveAs=c.saveAs=c,e.exports=c})})(bn)),bn.exports}var Pn=es();const ur=e=>{const t=new FormData;for(const n in e){const o=e[n];o instanceof File?t.append(n,o,o.name):(o instanceof Blob||typeof o=="string")&&t.append(n,o)}return t},qn={"User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36 Edg/125.0.0.0",origin:"https://github.com",referer:"https://github.com/"},ts={svg:"image/svg+xml",gif:"image/gif",jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",mov:"video/quicktime",mp4:"video/mp4",webm:"video/webm",cpuprofile:"application/json",csv:"text/csv",dmp:"application/octet-stream",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",fodg:"application/vnd.oasis.opendocument.graphics-flat-xml",fodp:"application/vnd.oasis.opendocument.presentation-flat-xml",fods:"application/vnd.oasis.opendocument.spreadsheet-flat-xml",fodt:"application/vnd.oasis.opendocument.text-flat-xml",gz:"application/gzip",json:"application/json",jsonc:"application/json",log:"text/plain",md:"text/markdown",odf:"application/vnd.oasis.opendocument.formula",odg:"application/vnd.oasis.opendocument.graphics",odp:"application/vnd.oasis.opendocument.presentation",ods:"application/vnd.oasis.opendocument.spreadsheet",odt:"application/vnd.oasis.opendocument.text",patch:"text/x-diff",pdf:"application/pdf",pptx:"application/vnd.openxmlformats-officedocument.presentationml.presentation",tgz:"application/gzip",txt:"text/plain",xls:"application/vnd.ms-excel",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",zip:"application/x-zip-compressed"};class mn extends Error{constructor(t,n,o){super(t,o),this.response=n}}const Xn=e=>{const t={};for(const n in e){const o=e[n];o!=null&&(t[n]=o)}return t},ns=async e=>{const{cookie:t,fetch:n=globalThis.fetch,repositoryId:o}=e,r=e.file.name.substring(e.file.name.lastIndexOf(".")+1),i=ts[r];if(!i)throw new Error(`not support file type ${r}`);const a=e.file.type?e.file:new File([e.file],e.file.name,{type:i}),l=new FormData;l.append("repository_id",String(o)),l.append("name",a.name),l.append("size",a.size.toString()),l.append("content_type",a.type);const c=await n("https://github.com/upload/policies/assets",{method:"POST",body:l,headers:Xn({...qn,cookie:t,"GitHub-Verified-Fetch":"true","X-Requested-With":"XMLHttpRequest"})}).then(async s=>{if(!s.ok)throw new mn("failed upload policies assets",s);return s.json()});return await n(c.upload_url,{method:"POST",body:ur({...c.form,file:a}),headers:Xn({authenticity_token:c.same_origin?c.upload_authenticity_token:void 0,...qn,...c.header,cookie:t})}).then(async s=>{if(!s.ok)throw new mn("failed upload to s3",s)}),await n(new URL(c.asset_upload_url,"https://github.com/").href,{method:"PUT",body:ur({authenticity_token:c.asset_upload_authenticity_token}),headers:Xn({...qn,cookie:t,Accept:"application/json","X-Requested-With":"XMLHttpRequest"})}).then(async s=>{if(!s.ok)throw new mn("failed check authenticity upload",s)}),c.asset},Zn=async e=>Eo("https://github.com/_graphql",{method:"POST",headers:{"content-type":"text/plain;charset=UTF-8",accept:"application/json","github-verified-fetch":"true",origin:"https://github.com",referer:"https://github.com/gkd-kit/inspect/issues/46"},body:JSON.stringify(e)}).then(async t=>{if(!t.ok)throw console.error(t,await t.text()),new Error("github comment graphql failed");return t}).then(t=>t.json()),Gr=async(e,t)=>{const n=await ns({repositoryId:"661952005",file:new File([e],t),fetch:Eo}).catch(async r=>{throw r instanceof mn&&(na().githubErrorDlgVisible=!0),r}),o=await Zn({query:"50e7774b5a519b88858e02e46e0348da",variables:{connections:["client:I_kwDOJ3SWBc6viUWN:__Issue__backTimelineItems_connection(visibleEventsOnly:true)"],input:{body:n.href,subjectId:"I_kwDOJ3SWBc6viUWN"}}});return await Ot(1e3),await Zn({query:"d0752b2e49295017f67c84f21bfe41a3",variables:{input:{state:"UNSUBSCRIBED",subscribableId:"I_kwDOJ3SWBc6viUWN"}}}),await Zn({query:"b0f125991160e607a64d9407db9c01b3",variables:{connections:[],input:{id:o.data.addComment.timelineEdge.node.id}}}),n},Po=async e=>{e.nodes.length||(e=await Fr.getItem(e.id)||e);const t=new(await Bo);return t.file("snapshot.json",JSON.stringify(e)).file("screenshot.png",await en.getItem(e.id)),await t.generateAsync({type:"blob",compression:"STORE"})},Zs=async e=>{const t=`snapshot-${e.id}.zip`;Pn.saveAs(await Po(e),t)},Js=async e=>{const t=`snapshot-${e.id}.png`;Pn.saveAs(new Blob([await en.getItem(e.id)],{type:"image/png"}),t)},Ys=async e=>{const t=new(await Bo);for(const o of e)await Ot(),t.file(o.id+".png",new Blob([await en.getItem(o.id)],{type:"image/png"}));const n=await t.generateAsync({type:"blob",compression:"STORE"});Pn.saveAs(n,`batch-png-${Date.now()}.zip`)},Qs=async e=>{const t=new(await Bo);for(const o of e)await Ot(),t.file(o.id+".zip",await Po(o));const n=await t.generateAsync({type:"blob",compression:"STORE"});Pn.saveAs(n,`batch-zip-${Date.now()}.zip`)},os=async e=>new Promise((t,n)=>{new Yu(new Blob([e],{type:"image/png"}),{quality:.75,convertSize:2e5,success(o){t(o)},error(o){n(o)}})}),rs=async e=>Lo[e.id]??Gr(await os(await en.getItem(e.id)),"file.jpg").then(t=>{const n=oa(t.href);if(!n)throw new Error("imageId not found");return Lo[e.id]=n,n}),is=async e=>Vo[e.id]||Gr(await Po(e).then(t=>t.arrayBuffer()),"file.zip").then(t=>(Vo[e.id]=t.id,wr[t.id]=e.id,Kr(e.id,t.id),t.id)),ec=async e=>{const t=xr(3);return(await Promise.allSettled(e.map(n=>t(()=>rs(n))))).reduce((n,o)=>(o.status=="fulfilled"&&n.push(o.value),n),[])},tc=async e=>{const t=xr(3);return(await Promise.allSettled(e.map(n=>t(()=>is(n))))).reduce((n,o)=>(o.status=="fulfilled"&&n.push(o.value),n),[])},Kr=async(e,t)=>fetch("https://detect.gkd.li/api/detectSnapshot?"+ra({id:e,importId:t}).toString()),nc=async(e,t)=>{t&&Number.isSafeInteger(+t)&&(wr[t]||await Kr(e,t))},sr=(e,t=0,n)=>{let o=!1;const r=ia((i,a)=>({get(){return i(),o},set(l){o=l,a()}}));return{get loading(){return r.value},invoke:async(...i)=>{if(o)return;let a=!1;const l=e(...i).catch(c=>{}).finally(()=>{a=!0});await Ot(),!a&&(r.value=!0,await l,t>0&&await Ot(t),r.value=!1)}}},oc=(e,t=(...r)=>r.join(""),n=0,o)=>{const r=In({}),i=aa(r);return{loading:r,invoke:async(...l)=>{const c=String(t(...l));i[c]||(r[c]=!0,await e(...l).catch(s=>{console.error(s)}),await Ot(n),delete r[c])}}},cr=e=>{const t=et(),n={x:0,y:0},o=In({...n});let r;const i=d=>{r&&d.preventDefault()},a=d=>{r=d,n.x=o.x,n.y=o.y},l=d=>{if(!r||!t.value)return;const u=d.clientX-r.clientX,h=d.clientY-r.clientY;e(u)&&(o.x=n.x+u),o.y=n.y+h},c=()=>{r=void 0},s=()=>{if(!t.value||!r)return;c();const{top:d,bottom:u,left:h,right:g}=t.value.getBoundingClientRect();(g<0||h>window.innerWidth||u<0||d>window.innerHeight)&&(o.x=n.x,o.y=n.y)};return Dt(()=>{window.addEventListener("pointermove",l),window.addEventListener("pointerup",s),document.addEventListener("selectstart",i)}),Dn(()=>{window.removeEventListener("pointermove",l),window.removeEventListener("pointerup",s),document.removeEventListener("selectstart",i),c()}),Xe(t,(d,u)=>{d&&(d.addEventListener("pointerdown",a),d.addEventListener("pointerup",c)),u&&(u.removeEventListener("pointerdown",a),u.removeEventListener("pointerup",c))}),Dn(()=>{t.value&&(t.value.removeEventListener("pointerdown",a),t.value.removeEventListener("pointerup",c))}),{target:t,offset:o}};let Wt=1e3;const as=()=>{Wt++;const e=et(Wt);return{zIndex:e,setTop:()=>{e.value!==Wt&&(Wt++,e.value=Wt)}}},dr="transition-top,bottom,left,right-500",fr=re({__name:"DraggableCard",props:{initialValue:{default:()=>({})},minWidth:{},sizeDraggable:{type:Boolean},show:{type:Boolean,default:!0},class:{}},setup(e){const t=e,n=t.initialValue.left!==void 0,o=t.initialValue.top!==void 0,r={x:(n?t.initialValue.left:t.initialValue.right)??0,y:(o?t.initialValue.top:t.initialValue.bottom)??0},i=cr(b=>{const F=(t.initialValue.width||0)+a.offset.x+-i.offset.x-b;return(t.minWidth||0)<F}),a=cr(b=>{const F=(t.initialValue.width||0)+a.offset.x+b-i.offset.x;return(t.minWidth||0)<F}),l=In({...r}),c=N(()=>{const b=(t.initialValue.width||0)+a.offset.x-i.offset.x,F=t.initialValue.width?`width:${b}px;`:"",P=o?`top:${l.y}px;`:`bottom:${l.y}px;`;return n?`left:${l.x-i.offset.x}px;`+P+F:`right:${l.x-a.offset.x}px;`+P+F});let s;const d=et(!1),u=b=>{s=b,r.x=l.x,r.y=l.y,d.value=!1},h=b=>{if(!w.value||!s)return;const F=b.clientX-s.clientX,P=b.clientY-s.clientY;l.x=r.x+(n?F:-F),l.y=r.y+(o?P:-P),d.value=!0},g=()=>{s=void 0},p=et(),w=et(),y=b=>{s&&b.preventDefault()},m=()=>{if(!w.value||!s)return;g();const{top:b,bottom:F,left:P,right:S}=w.value.getBoundingClientRect();if(S<0||P>window.innerWidth||F<0||b>window.innerHeight){l.x=r.x,l.y=r.y;const $=p.value;$&&($.classList.add(dr),setTimeout(()=>{$.classList.remove(dr)},550))}};Dt(()=>{window.addEventListener("pointermove",h),window.addEventListener("pointerup",m),document.addEventListener("selectstart",y)}),Dn(()=>{window.removeEventListener("pointermove",h),window.removeEventListener("pointerup",m),document.removeEventListener("selectstart",y),g()}),Xe(w,(b,F)=>{b&&(b.addEventListener("pointerdown",u),b.addEventListener("pointerup",g)),F&&(F.removeEventListener("pointerdown",u),F.removeEventListener("pointerup",g))}),Dn(()=>{w.value&&(w.value.removeEventListener("pointerdown",u),w.value.removeEventListener("pointerup",g))});const C=b=>{b instanceof HTMLElement?w.value=b:w.value=void 0},{setTop:f,zIndex:D}=as();return Xe(()=>t.show,()=>{t.show&&f()}),(b,F)=>(St(),uo(ua,{to:"body"},[e.show?(St(),Cn("div",{key:0,ref_key:"box",ref:p,fixed:"",class:la(["DraggableCard",t.class]),style:wn([H(c),{zIndex:H(D)}]),onMousedown:F[0]||(F[0]=(...P)=>H(f)&&H(f)(...P))},[vr(b.$slots,"default",{onRef:C,moved:H(d)}),e.sizeDraggable?(St(),Cn(wo,{key:0},[G("div",{ref:H(i).target,absolute:"","right-full":"","top-0":"","bottom-0":"","w-5px":"","cursor-ew-resize":""},null,512),G("div",{ref:H(a).target,absolute:"","left-full":"","top-0":"","bottom-0":"","w-5px":"","cursor-ew-resize":""},null,512)],64)):yn("",!0)],38)):yn("",!0)]))}}),ls=e=>{const t=et(e),n=et(),o=async(c,s,d)=>{var g;if(!t.value)throw new Error("origin must exist");const u=new URL("/api/"+c,t.value),h=await Eo(u,s,d).catch(p=>{throw Oe.error("网络错误:"+c),p});if(!h.ok)throw Oe.error("接口错误:"+c+":"+h.status),h;if((g=h.headers.get("Content-Type"))!=null&&g.includes("application/json")){const p=await h.clone().json();if(p.__error)throw Oe.error(p.message),h}return h},r=async(c,s={},d)=>o(c,{method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)},d),i=async(c,s={})=>r(c,s).then(d=>d.json()),a=async(c,s={})=>r(c,s,d=>(d.responseType="arraybuffer",d)).then(d=>d.arrayBuffer());return{origin:t,api:{getServerInfo:async()=>i("getServerInfo"),getSnapshot:async c=>{var s,d;return((d=(s=n.value)==null?void 0:s.gkdAppInfo)==null?void 0:d.versionName)==="1.10.4"?o("snapshot?id="+c.id).then(u=>u.json()):i("getSnapshot",c)},getScreenshot:async c=>a("getScreenshot",c),captureSnapshot:async()=>i("captureSnapshot"),getSnapshots:async()=>i("getSnapshots"),updateSubscription:async c=>i("updateSubscription",{...c,id:-1,name:"内存订阅",version:0}),execSelector:async c=>(c=structuredClone(c),c.action||=void 0,i("execSelector",c))},serverInfo:n}},us=(e,t,n)=>{try{return e()}catch(o){if(typeof t=="string")Oe.error(t);else{const r=(t==null?void 0:t(o))??o;typeof r=="string"?Oe.error(r):r instanceof Error&&Oe.error(r.message)}throw o}},rc=e=>(...t)=>{try{e(...t)}catch(n){console.log({error:n})}};var ss=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,cs=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,ds=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/,Jn={Space_Separator:ss,ID_Start:cs,ID_Continue:ds},Re={isSpaceSeparator(e){return typeof e=="string"&&Jn.Space_Separator.test(e)},isIdStartChar(e){return typeof e=="string"&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||e==="$"||e==="_"||Jn.ID_Start.test(e))},isIdContinueChar(e){return typeof e=="string"&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"||e==="$"||e==="_"||e==="‌"||e==="‍"||Jn.ID_Continue.test(e))},isDigit(e){return typeof e=="string"&&/[0-9]/.test(e)},isHexDigit(e){return typeof e=="string"&&/[0-9A-Fa-f]/.test(e)}};let fo,Ne,it,Bn,bt,Ze,Te,_o,Xt;var fs=function(t,n){fo=String(t),Ne="start",it=[],Bn=0,bt=1,Ze=0,Te=void 0,_o=void 0,Xt=void 0;do Te=hs(),gs[Ne]();while(Te.type!=="eof");return typeof n=="function"?ho({"":Xt},"",n):Xt};function ho(e,t,n){const o=e[t];if(o!=null&&typeof o=="object")if(Array.isArray(o))for(let r=0;r<o.length;r++){const i=String(r),a=ho(o,i,n);a===void 0?delete o[i]:Object.defineProperty(o,i,{value:a,writable:!0,enumerable:!0,configurable:!0})}else for(const r in o){const i=ho(o,r,n);i===void 0?delete o[r]:Object.defineProperty(o,r,{value:i,writable:!0,enumerable:!0,configurable:!0})}return n.call(e,t,o)}let te,J,Gt,ot,se;function hs(){for(te="default",J="",Gt=!1,ot=1;;){se=st();const e=qr[te]();if(e)return e}}function st(){if(fo[Bn])return String.fromCodePoint(fo.codePointAt(Bn))}function A(){const e=st();return e===`
939
+ `?(bt++,Ze=0):e?Ze+=e.length:Ze++,e&&(Bn+=e.length),e}const qr={default(){switch(se){case" ":case"\v":case"\f":case" ":case" ":case"\uFEFF":case`
940
+ `:case"\r":case"\u2028":case"\u2029":A();return;case"/":A(),te="comment";return;case void 0:return A(),Ae("eof")}if(Re.isSpaceSeparator(se)){A();return}return qr[Ne]()},comment(){switch(se){case"*":A(),te="multiLineComment";return;case"/":A(),te="singleLineComment";return}throw Ee(A())},multiLineComment(){switch(se){case"*":A(),te="multiLineCommentAsterisk";return;case void 0:throw Ee(A())}A()},multiLineCommentAsterisk(){switch(se){case"*":A();return;case"/":A(),te="default";return;case void 0:throw Ee(A())}A(),te="multiLineComment"},singleLineComment(){switch(se){case`
941
+ `:case"\r":case"\u2028":case"\u2029":A(),te="default";return;case void 0:return A(),Ae("eof")}A()},value(){switch(se){case"{":case"[":return Ae("punctuator",A());case"n":return A(),Ft("ull"),Ae("null",null);case"t":return A(),Ft("rue"),Ae("boolean",!0);case"f":return A(),Ft("alse"),Ae("boolean",!1);case"-":case"+":A()==="-"&&(ot=-1),te="sign";return;case".":J=A(),te="decimalPointLeading";return;case"0":J=A(),te="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":J=A(),te="decimalInteger";return;case"I":return A(),Ft("nfinity"),Ae("numeric",1/0);case"N":return A(),Ft("aN"),Ae("numeric",NaN);case'"':case"'":Gt=A()==='"',J="",te="string";return}throw Ee(A())},identifierNameStartEscape(){if(se!=="u")throw Ee(A());A();const e=po();switch(e){case"$":case"_":break;default:if(!Re.isIdStartChar(e))throw hr();break}J+=e,te="identifierName"},identifierName(){switch(se){case"$":case"_":case"‌":case"‍":J+=A();return;case"\\":A(),te="identifierNameEscape";return}if(Re.isIdContinueChar(se)){J+=A();return}return Ae("identifier",J)},identifierNameEscape(){if(se!=="u")throw Ee(A());A();const e=po();switch(e){case"$":case"_":case"‌":case"‍":break;default:if(!Re.isIdContinueChar(e))throw hr();break}J+=e,te="identifierName"},sign(){switch(se){case".":J=A(),te="decimalPointLeading";return;case"0":J=A(),te="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":J=A(),te="decimalInteger";return;case"I":return A(),Ft("nfinity"),Ae("numeric",ot*(1/0));case"N":return A(),Ft("aN"),Ae("numeric",NaN)}throw Ee(A())},zero(){switch(se){case".":J+=A(),te="decimalPoint";return;case"e":case"E":J+=A(),te="decimalExponent";return;case"x":case"X":J+=A(),te="hexadecimal";return}return Ae("numeric",ot*0)},decimalInteger(){switch(se){case".":J+=A(),te="decimalPoint";return;case"e":case"E":J+=A(),te="decimalExponent";return}if(Re.isDigit(se)){J+=A();return}return Ae("numeric",ot*Number(J))},decimalPointLeading(){if(Re.isDigit(se)){J+=A(),te="decimalFraction";return}throw Ee(A())},decimalPoint(){switch(se){case"e":case"E":J+=A(),te="decimalExponent";return}if(Re.isDigit(se)){J+=A(),te="decimalFraction";return}return Ae("numeric",ot*Number(J))},decimalFraction(){switch(se){case"e":case"E":J+=A(),te="decimalExponent";return}if(Re.isDigit(se)){J+=A();return}return Ae("numeric",ot*Number(J))},decimalExponent(){switch(se){case"+":case"-":J+=A(),te="decimalExponentSign";return}if(Re.isDigit(se)){J+=A(),te="decimalExponentInteger";return}throw Ee(A())},decimalExponentSign(){if(Re.isDigit(se)){J+=A(),te="decimalExponentInteger";return}throw Ee(A())},decimalExponentInteger(){if(Re.isDigit(se)){J+=A();return}return Ae("numeric",ot*Number(J))},hexadecimal(){if(Re.isHexDigit(se)){J+=A(),te="hexadecimalInteger";return}throw Ee(A())},hexadecimalInteger(){if(Re.isHexDigit(se)){J+=A();return}return Ae("numeric",ot*Number(J))},string(){switch(se){case"\\":A(),J+=ps();return;case'"':if(Gt)return A(),Ae("string",J);J+=A();return;case"'":if(!Gt)return A(),Ae("string",J);J+=A();return;case`
942
+ `:case"\r":throw Ee(A());case"\u2028":case"\u2029":bs(se);break;case void 0:throw Ee(A())}J+=A()},start(){switch(se){case"{":case"[":return Ae("punctuator",A())}te="value"},beforePropertyName(){switch(se){case"$":case"_":J=A(),te="identifierName";return;case"\\":A(),te="identifierNameStartEscape";return;case"}":return Ae("punctuator",A());case'"':case"'":Gt=A()==='"',te="string";return}if(Re.isIdStartChar(se)){J+=A(),te="identifierName";return}throw Ee(A())},afterPropertyName(){if(se===":")return Ae("punctuator",A());throw Ee(A())},beforePropertyValue(){te="value"},afterPropertyValue(){switch(se){case",":case"}":return Ae("punctuator",A())}throw Ee(A())},beforeArrayValue(){if(se==="]")return Ae("punctuator",A());te="value"},afterArrayValue(){switch(se){case",":case"]":return Ae("punctuator",A())}throw Ee(A())},end(){throw Ee(A())}};function Ae(e,t){return{type:e,value:t,line:bt,column:Ze}}function Ft(e){for(const t of e){if(st()!==t)throw Ee(A());A()}}function ps(){switch(st()){case"b":return A(),"\b";case"f":return A(),"\f";case"n":return A(),`
943
+ `;case"r":return A(),"\r";case"t":return A()," ";case"v":return A(),"\v";case"0":if(A(),Re.isDigit(st()))throw Ee(A());return"\0";case"x":return A(),vs();case"u":return A(),po();case`
944
+ `:case"\u2028":case"\u2029":return A(),"";case"\r":return A(),st()===`
945
+ `&&A(),"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":throw Ee(A());case void 0:throw Ee(A())}return A()}function vs(){let e="",t=st();if(!Re.isHexDigit(t)||(e+=A(),t=st(),!Re.isHexDigit(t)))throw Ee(A());return e+=A(),String.fromCodePoint(parseInt(e,16))}function po(){let e="",t=4;for(;t-- >0;){const n=st();if(!Re.isHexDigit(n))throw Ee(A());e+=A()}return String.fromCodePoint(parseInt(e,16))}const gs={start(){if(Te.type==="eof")throw At();Yn()},beforePropertyName(){switch(Te.type){case"identifier":case"string":_o=Te.value,Ne="afterPropertyName";return;case"punctuator":pn();return;case"eof":throw At()}},afterPropertyName(){if(Te.type==="eof")throw At();Ne="beforePropertyValue"},beforePropertyValue(){if(Te.type==="eof")throw At();Yn()},beforeArrayValue(){if(Te.type==="eof")throw At();if(Te.type==="punctuator"&&Te.value==="]"){pn();return}Yn()},afterPropertyValue(){if(Te.type==="eof")throw At();switch(Te.value){case",":Ne="beforePropertyName";return;case"}":pn()}},afterArrayValue(){if(Te.type==="eof")throw At();switch(Te.value){case",":Ne="beforeArrayValue";return;case"]":pn()}},end(){}};function Yn(){let e;switch(Te.type){case"punctuator":switch(Te.value){case"{":e={};break;case"[":e=[];break}break;case"null":case"boolean":case"numeric":case"string":e=Te.value;break}if(Xt===void 0)Xt=e;else{const t=it[it.length-1];Array.isArray(t)?t.push(e):Object.defineProperty(t,_o,{value:e,writable:!0,enumerable:!0,configurable:!0})}if(e!==null&&typeof e=="object")it.push(e),Array.isArray(e)?Ne="beforeArrayValue":Ne="beforePropertyName";else{const t=it[it.length-1];t==null?Ne="end":Array.isArray(t)?Ne="afterArrayValue":Ne="afterPropertyValue"}}function pn(){it.pop();const e=it[it.length-1];e==null?Ne="end":Array.isArray(e)?Ne="afterArrayValue":Ne="afterPropertyValue"}function Ee(e){return Sn(e===void 0?`JSON5: invalid end of input at ${bt}:${Ze}`:`JSON5: invalid character '${Xr(e)}' at ${bt}:${Ze}`)}function At(){return Sn(`JSON5: invalid end of input at ${bt}:${Ze}`)}function hr(){return Ze-=5,Sn(`JSON5: invalid identifier character at ${bt}:${Ze}`)}function bs(e){console.warn(`JSON5: '${Xr(e)}' in strings is not valid ECMAScript; consider escaping`)}function Xr(e){const t={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(t[e])return t[e];if(e<" "){const n=e.charCodeAt(0).toString(16);return"\\x"+("00"+n).substring(n.length)}return e}function Sn(e){const t=new SyntaxError(e);return t.lineNumber=bt,t.columnNumber=Ze,t}var ms=function(t,n,o){const r=[];let i="",a,l,c="",s;if(n!=null&&typeof n=="object"&&!Array.isArray(n)&&(o=n.space,s=n.quote,n=n.replacer),typeof n=="function")l=n;else if(Array.isArray(n)){a=[];for(const w of n){let y;typeof w=="string"?y=w:(typeof w=="number"||w instanceof String||w instanceof Number)&&(y=String(w)),y!==void 0&&a.indexOf(y)<0&&a.push(y)}}return o instanceof Number?o=Number(o):o instanceof String&&(o=String(o)),typeof o=="number"?o>0&&(o=Math.min(10,Math.floor(o)),c=" ".substr(0,o)):typeof o=="string"&&(c=o.substr(0,10)),d("",{"":t});function d(w,y){let m=y[w];switch(m!=null&&(typeof m.toJSON5=="function"?m=m.toJSON5(w):typeof m.toJSON=="function"&&(m=m.toJSON(w))),l&&(m=l.call(y,w,m)),m instanceof Number?m=Number(m):m instanceof String?m=String(m):m instanceof Boolean&&(m=m.valueOf()),m){case null:return"null";case!0:return"true";case!1:return"false"}if(typeof m=="string")return u(m);if(typeof m=="number")return String(m);if(typeof m=="object")return Array.isArray(m)?p(m):h(m)}function u(w){const y={"'":.1,'"':.2},m={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};let C="";for(let D=0;D<w.length;D++){const b=w[D];switch(b){case"'":case'"':y[b]++,C+=b;continue;case"\0":if(Re.isDigit(w[D+1])){C+="\\x00";continue}}if(m[b]){C+=m[b];continue}if(b<" "){let F=b.charCodeAt(0).toString(16);C+="\\x"+("00"+F).substring(F.length);continue}C+=b}const f=s||Object.keys(y).reduce((D,b)=>y[D]<y[b]?D:b);return C=C.replace(new RegExp(f,"g"),m[f]),f+C+f}function h(w){if(r.indexOf(w)>=0)throw TypeError("Converting circular structure to JSON5");r.push(w);let y=i;i=i+c;let m=a||Object.keys(w),C=[];for(const D of m){const b=d(D,w);if(b!==void 0){let F=g(D)+":";c!==""&&(F+=" "),F+=b,C.push(F)}}let f;if(C.length===0)f="{}";else{let D;if(c==="")D=C.join(","),f="{"+D+"}";else{let b=`,
946
+ `+i;D=C.join(b),f=`{
947
+ `+i+D+`,
948
+ `+y+"}"}}return r.pop(),i=y,f}function g(w){if(w.length===0)return u(w);const y=String.fromCodePoint(w.codePointAt(0));if(!Re.isIdStartChar(y))return u(w);for(let m=y.length;m<w.length;m++)if(!Re.isIdContinueChar(String.fromCodePoint(w.codePointAt(m))))return u(w);return w}function p(w){if(r.indexOf(w)>=0)throw TypeError("Converting circular structure to JSON5");r.push(w);let y=i;i=i+c;let m=[];for(let f=0;f<w.length;f++){const D=d(String(f),w);m.push(D!==void 0?D:"null")}let C;if(m.length===0)C="[]";else if(c==="")C="["+m.join(",")+"]";else{let f=`,
949
+ `+i,D=m.join(f);C=`[
950
+ `+i+D+`,
951
+ `+y+"]"}return r.pop(),i=y,C}};const Ds={parse:fs,stringify:ms};var Cs=Ds;const ws=()=>{const{api:e,origin:t}=ls(),n=sa("device_link","");zn(()=>{t.value=n.value||void 0});const o=()=>{if(!t.value)throw Oe.error("未连接设备,请先在 /device 页面连接设备"),new Error("未连接设备,请先在 /device 页面连接设备")},r=et(!1),i=et(""),a=sr(async()=>{var h,g;o();const u=us(()=>Cs.parse(i.value.trim()));if(u!=null){if(u!=null&&u.categories||u!=null&&u.globalGroups||u!=null&&u.apps)await e.updateSubscription(u);else if(typeof(u==null?void 0:u.id)=="string")await e.updateSubscription({apps:[u]});else if(Array.isArray(u)&&typeof((h=u[0])==null?void 0:h.id)=="string")await e.updateSubscription({apps:u});else if(typeof(u==null?void 0:u.key)=="number")await e.updateSubscription({globalGroups:[u]});else if(Array.isArray(u)&&typeof((g=u[0])==null?void 0:g.key)=="number")await e.updateSubscription({globalGroups:u});else{Oe.error("无法识别的订阅文本");return}Oe.success("修改成功")}}),l=et(!1),c=[{label:"仅查询",value:""},{value:"click",label:"click"},{value:"clickNode",label:"clickNode"},{value:"clickCenter",label:"clickCenter"},{value:"back",label:"back"},{value:"longClick",label:"longClick"},{value:"longClickNode",label:"longClickNode"},{value:"longClickCenter",label:"longClickCenter"}],s=In({selector:"",action:"click",quickFind:!1}),d=sr(async()=>{o();const{quickFind:u,...h}=s,g=await e.execSelector({...h,fastQuery:u});if(g.message){Oe.success(`操作成功: ${g.message}`);return}g.action?g.result?Oe.success(`操作成功: ${g.action}`):Oe.error(`操作失败: ${g.action}`):g.result&&Oe.success("查询成功")});return{showSubsModel:r,subsText:i,updateSubs:a,showSelectorModel:l,actionOptions:c,clickAction:s,execSelector:d}},ys={"mt-10px":"",flex:"","justify-end":"","gap-8px":""},xs={flex:"","gap-10px":"","flex-items-center":""},Fs={"mt-10px":"",flex:"","justify-end":"","gap-8px":""},ic=re({__name:"DeviceControlTools",props:{iconSize:{default:"var(--app-icon-size)"},tooltipPlacement:{default:"right"}},setup(e){const t=e,{showSubsModel:n,subsText:o,updateSubs:r,showSelectorModel:i,actionOptions:a,clickAction:l,execSelector:c}=ws(),s=`
952
+ 请输入订阅文本(JSON5语法):
953
+ 示例1-单个应用的规则:
954
+ {
955
+ id: 'cn.dxy.clinmaster',
956
+ name: '临床决策',
957
+ groups: [
958
+ {
959
+ key: 1,
960
+ name: '更新提示',
961
+ matchTime: 10000,
962
+ actionMaximum: 1,
963
+ resetMatch: 'app',
964
+ rules: [
965
+ {
966
+ fastQuery: true,
967
+ activityIds: 'cn.dxy.clinmaster.home.MainActivity',
968
+ matches:
969
+ '@[vid="iv_close"][clickable=true][visibleToUser=true] -2 [text="立即更新"]',
970
+ snapshotUrls: 'https://i.gkd.li/i/25459821',
971
+ },
972
+ ],
973
+ },
974
+ ],
975
+ }
976
+ `.trim();return(d,u)=>{const h=yr("SvgIcon"),g=at,p=Da,w=Zt,y=Ao,m=Fo,C=qt,f=iu;return St(),Cn(wo,null,[L(p,{placement:t.tooltipPlacement},{trigger:he(()=>[L(g,{text:"",style:wn({"--n-icon-size":t.iconSize,"--svg-h":t.iconSize}),onClick:u[0]||(u[0]=D=>n.value=!H(n))},{icon:he(()=>[L(h,{name:"CacheSub",style:{color:"var(--icon-contrast-color)"}})]),_:1},8,["style"])]),default:he(()=>[u[10]||(u[10]=Be(" 修改内存订阅 ",-1))]),_:1},8,["placement"]),L(p,{placement:t.tooltipPlacement},{trigger:he(()=>[L(g,{text:"",style:wn({"--n-icon-size":t.iconSize,"--svg-h":t.iconSize}),onClick:u[1]||(u[1]=D=>i.value=!H(i))},{icon:he(()=>[L(h,{name:"Exe-Sel",style:{color:"var(--icon-contrast-color)"}})]),_:1},8,["style"])]),default:he(()=>[u[11]||(u[11]=Be(" 执行选择器 ",-1))]),_:1},8,["placement"]),L(fr,{initialValue:{top:84,left:120},class:"box-shadow-dim window-anim",show:H(n)},{default:he(({onRef:D})=>[L(y,{size:"small",closable:"",class:"floating-panel",style:{width:"min(720px, 90vw)"},"content-style":{maxHeight:"70vh",overflow:"auto"},onClose:u[4]||(u[4]=b=>n.value=!1)},{header:he(()=>[G("div",{ref:D,flex:"","items-center":"","cursor-move":""},[L(h,{name:"CacheSub",class:"mr-6px",style:{color:"var(--accent-success-color)"}}),u[12]||(u[12]=G("span",null,"修改内存订阅",-1)),u[13]||(u[13]=G("div",{"flex-1":""},null,-1))],512)]),default:he(()=>[L(w,{value:H(o),"onUpdate:value":u[2]||(u[2]=b=>ca(o)?o.value=b:null),disabled:H(r).loading,type:"textarea",class:"gkd_code",autosize:{minRows:20,maxRows:25},placeholder:H(s),"aria-label":"订阅文本输入框"},null,8,["value","disabled","placeholder"]),G("div",ys,[L(g,{onClick:u[3]||(u[3]=b=>n.value=!1)},{default:he(()=>[...u[14]||(u[14]=[Be("取消",-1)])]),_:1}),L(g,{type:"primary",loading:H(r).loading,onClick:H(r).invoke},{default:he(()=>[...u[15]||(u[15]=[Be(" 确认 ",-1)])]),_:1},8,["loading","onClick"])])]),_:2},1024)]),_:1},8,["show"]),L(fr,{initialValue:{top:120,left:180},class:"box-shadow-dim window-anim",show:H(i)},{default:he(({onRef:D})=>[L(y,{size:"small",closable:"",class:"floating-panel",style:{width:"min(720px, 90vw)"},"content-style":{maxHeight:"70vh",overflow:"auto"},onClose:u[9]||(u[9]=b=>i.value=!1)},{header:he(()=>[G("div",{ref:D,flex:"","items-center":"","cursor-move":""},[L(h,{name:"Exe-Sel",class:"mr-6px",style:{color:"var(--accent-success-color)"}}),u[16]||(u[16]=G("span",null,"执行选择器",-1)),u[17]||(u[17]=G("div",{"flex-1":""},null,-1))],512)]),default:he(()=>[L(w,{value:H(l).selector,"onUpdate:value":u[5]||(u[5]=b=>H(l).selector=b),disabled:H(c).loading,type:"textarea",class:"gkd_code",autosize:{minRows:4,maxRows:10},placeholder:"请输入合法选择器","aria-label":"选择器输入框"},null,8,["value","disabled"]),u[23]||(u[23]=G("div",{"h-15px":""},null,-1)),L(C,null,{default:he(()=>[L(m,{checked:H(l).quickFind,"onUpdate:checked":u[6]||(u[6]=b=>H(l).quickFind=b)},{default:he(()=>[...u[18]||(u[18]=[Be("快速查询",-1)])]),_:1},8,["checked"]),u[19]||(u[19]=G("a",{href:"https://gkd.li/api/interfaces/RawCommonProps.html#quickfind",target:"_blank",rel:"noopener noreferrer"}," 查找说明 ",-1))]),_:1}),u[24]||(u[24]=G("div",{"h-10px":""},null,-1)),G("div",xs,[L(f,{value:H(l).action,"onUpdate:value":u[7]||(u[7]=b=>H(l).action=b),options:H(a),class:"w-150px"},null,8,["value","options"]),u[20]||(u[20]=G("a",{href:"https://gkd.li/api/interfaces/RawRuleProps#action",target:"_blank",rel:"noopener noreferrer"}," 操作说明 ",-1))]),G("div",Fs,[L(g,{onClick:u[8]||(u[8]=b=>i.value=!1)},{default:he(()=>[...u[21]||(u[21]=[Be("取消",-1)])]),_:1}),L(g,{type:"primary",loading:H(c).loading,onClick:H(c).invoke},{default:he(()=>[...u[22]||(u[22]=[Be(" 确认 ",-1)])]),_:1},8,["loading","onClick"])])]),_:2},1024)]),_:1},8,["show"])],64)}}}),As={flex:"","items-center":""},Es={class:"settings-layout"},Bs={class:"settings-section"},Ss={class:"settings-row"},ks={class:"settings-row"},Rs={class:"settings-row"},zs={class:"settings-row"},Is={class:"settings-section"},Ps={class:"settings-row"},_s={class:"settings-row"},$s={class:"settings-row"},Ts={class:"settings-row"},Os={class:"settings-row"},Ms={class:"settings-section"},Ns={class:"settings-section"},Us={class:"settings-row settings-debug"},Ls={key:0,"mt-8px":""},Vs={flex:"","items-center":"","gap-10px":""},js={flex:"","gap-8px":"","flex-wrap":""},ac=re({__name:"SettingsModal",props:{show:{type:Boolean}},emits:["update:show"],setup(e,{emit:t}){const n=e,o=t,{settingsStore:r,snapshotViewedTime:i,snapshotImportTime:a,snapshotImageId:l,snapshotImportId:c,importSnapshotId:s}=ha(),d=V(!1),u=()=>{r.shareCustomImportDomain=pa(r.shareCustomImportDomain)},h=()=>{zu({title:"调试 - 链接复制窗口",content:"https://i.gkd.li/i/123456",extraContent:`${window.location.origin}/i/123456`,extraTitle:"当前域链接"})},g=C=>{Object.keys(C).forEach(f=>{delete C[f]})},p=async C=>{const f=await C.keys();await Promise.all(f.map(D=>C.removeItem(D)))},w=async(C=!0)=>{g(i),g(a),g(l),g(c),g(s),C&&Oe.success("已清理索引缓存")},y=async()=>{await Promise.all([p(Fr),p(va),p(en)]),await w(!1),Oe.success("已清理快照数据")},m=()=>{localStorage.removeItem("settings"),Oe.success("已重置设置,正在刷新"),setTimeout(()=>{location.reload()},300)};return(C,f)=>{const D=yr("SvgIcon"),b=Su,F=Zt,P=Fo,S=du,$=qt,j=vu,K=at,ae=nu,B=Ao,T=fa;return St(),uo(T,{show:n.show,preset:"dialog",title:"设置",showIcon:!1,positiveText:"关闭",style:{width:"620px"},class:"settings-modal","onUpdate:show":f[15]||(f[15]=I=>o("update:show",I)),onPositiveClick:f[16]||(f[16]=I=>o("update:show",!1))},{header:he(()=>[G("div",As,[L(D,{name:"settings",class:"mr-6px",style:{color:"var(--accent-success-color)"}}),f[17]||(f[17]=G("span",null,"设置",-1)),f[18]||(f[18]=G("div",{"flex-1":""},null,-1))])]),default:he(()=>[G("div",Es,[G("div",Bs,[f[23]||(f[23]=G("div",{class:"settings-title"},"分享与导入",-1)),G("div",Ss,[L(b,{value:H(r).autoUploadImport,"onUpdate:value":f[0]||(f[0]=I=>H(r).autoUploadImport=I)},null,8,["value"]),f[19]||(f[19]=G("div",null,"打开快照页面自动生成分享链接(请确保不含隐私)",-1))]),G("div",ks,[L(b,{value:H(r).shareUseOfficialImportDomain,"onUpdate:value":f[1]||(f[1]=I=>H(r).shareUseOfficialImportDomain=I)},null,8,["value"]),f[20]||(f[20]=G("div",null,"分享快照链接默认复制官方域名 i.gkd.li",-1))]),G("div",Rs,[f[21]||(f[21]=G("div",{class:"w-120px"},"自定义分享域",-1)),L(F,{value:H(r).shareCustomImportDomain,"onUpdate:value":f[2]||(f[2]=I=>H(r).shareCustomImportDomain=I),placeholder:"https://li.chenge.eu.org",class:"w-320px",onBlur:u},null,8,["value"])]),G("div",zs,[L(P,{checked:H(r).ignoreUploadWarn,"onUpdate:checked":f[3]||(f[3]=I=>H(r).ignoreUploadWarn=I)},{default:he(()=>[...f[22]||(f[22]=[Be(" 关闭生成分享链接弹窗提醒 ",-1)])]),_:1},8,["checked"])])]),G("div",Is,[f[29]||(f[29]=G("div",{class:"settings-title"},"性能与显示",-1)),G("div",Ps,[L(b,{value:H(r).lowMemoryMode,"onUpdate:value":f[4]||(f[4]=I=>H(r).lowMemoryMode=I)},null,8,["value"]),f[24]||(f[24]=G("div",null,"低内存模式(限制预览缓存、减少动画、降低实时更新开销)",-1))]),G("div",_s,[L(b,{value:H(r).autoExpandSnapshots,"onUpdate:value":f[5]||(f[5]=I=>H(r).autoExpandSnapshots=I)},null,8,["value"]),f[25]||(f[25]=G("div",null,"自动展开快照",-1))]),G("div",$s,[L(b,{value:H(r).randomFocusNodeColorOnOpen,"onUpdate:value":f[6]||(f[6]=I=>H(r).randomFocusNodeColorOnOpen=I)},null,8,["value"]),f[26]||(f[26]=G("div",null,"每次打开随机节点高亮颜色(中等亮度)",-1))]),G("div",Ts,[L(P,{checked:H(r).ignoreWasmWarn,"onUpdate:checked":f[7]||(f[7]=I=>H(r).ignoreWasmWarn=I)},{default:he(()=>[...f[27]||(f[27]=[Be(" 关闭浏览器版本正则表达式 WASM(GC) 提醒 ",-1)])]),_:1},8,["checked"])]),G("div",Os,[L(P,{checked:H(r).filterRandomVidQf,"onUpdate:checked":f[8]||(f[8]=I=>H(r).filterRandomVidQf=I)},{default:he(()=>[...f[28]||(f[28]=[Be(' 过滤由三个随机字符组成的伪快查节点(如 [vid="k4p"]) ',-1)])]),_:1},8,["checked"])])]),G("div",Ms,[f[33]||(f[33]=G("div",{class:"settings-title"},"主题模式",-1)),L(j,{value:H(r).themeMode,"onUpdate:value":f[9]||(f[9]=I=>H(r).themeMode=I)},{default:he(()=>[L($,null,{default:he(()=>[L(S,{value:"auto"},{default:he(()=>[...f[30]||(f[30]=[Be("自动",-1)])]),_:1}),L(S,{value:"light"},{default:he(()=>[...f[31]||(f[31]=[Be("强制日间",-1)])]),_:1}),L(S,{value:"dark"},{default:he(()=>[...f[32]||(f[32]=[Be("强制夜间",-1)])]),_:1})]),_:1})]),_:1},8,["value"])]),G("div",Ns,[G("div",Us,[G("div",{class:"text-12px",style:wn({color:H(r).debugMode?"var(--accent-danger-color)":"var(--text-muted-color)"})}," 调试模式 ",4),L(b,{value:H(r).debugMode,"onUpdate:value":[f[10]||(f[10]=I=>H(r).debugMode=I),f[11]||(f[11]=I=>{I||(d.value=!1)})],size:"small"},null,8,["value"])]),H(r).debugMode?(St(),Cn("div",Ls,[L(K,{text:"",size:"tiny",type:H(d)?"error":"default",onClick:f[12]||(f[12]=I=>d.value=!H(d))},{default:he(()=>[Be(da(H(d)?"隐藏调试菜单":"展开调试菜单"),1)]),_:1},8,["type"]),H(d)?(St(),uo(B,{key:0,embedded:"",size:"small",class:"mt-8px",style:{"border-radius":"8px"}},{default:he(()=>[L($,{vertical:"",size:"small"},{default:he(()=>[f[39]||(f[39]=G("div",{class:"text-12px opacity-65"},"预留后续调试工具入口",-1)),G("div",Vs,[f[34]||(f[34]=G("span",null,"选中节点高亮颜色:",-1)),L(ae,{value:H(r).focusNodeColor,"onUpdate:value":f[13]||(f[13]=I=>H(r).focusNodeColor=I),modes:["rgb"],size:"small"},null,8,["value"])]),G("div",js,[L(K,{size:"small",secondary:"",onClick:f[14]||(f[14]=()=>w())},{default:he(()=>[...f[35]||(f[35]=[Be(" 清理索引缓存 ",-1)])]),_:1}),L(K,{size:"small",secondary:"",type:"warning",onClick:y},{default:he(()=>[...f[36]||(f[36]=[Be(" 清理快照数据 ",-1)])]),_:1}),L(K,{size:"small",secondary:"",type:"error",onClick:m},{default:he(()=>[...f[37]||(f[37]=[Be(" 重置本地设置 ",-1)])]),_:1})]),L(K,{size:"small",secondary:"",type:"error",onClick:h},{default:he(()=>[...f[38]||(f[38]=[Be(" 触发链接弹窗测试 ",-1)])]),_:1})]),_:1})]),_:1})):yn("",!0)])):yn("",!0)])])]),_:1},8,["show"])}}});export{Js as A,Zs as B,ls as C,oc as D,ul as N,Ba as V,yl as _,qt as a,ic as b,Ks as c,qs as d,jn as e,ac as f,Qs as g,Ys as h,tc as i,ec as j,kt as k,ol as l,il as m,Ga as n,rs as o,is as p,nc as q,fr as r,zu as s,Cs as t,sr as u,vu as v,Xs as w,du as x,us as y,rc as z};
977
+ //# sourceMappingURL=SettingsModal.vue_vue_type_script_setup_true_lang-Dzypo389.js.map