galaxy-charts 0.0.13 → 0.0.15
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.
- package/dist/galaxy-charts.js +1626 -1614
- package/dist/galaxy-charts.umd.cjs +51 -51
- package/package.json +1 -1
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
(function(Ve,o){typeof exports=="object"&&typeof module<"u"?o(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],o):(Ve=typeof globalThis<"u"?globalThis:Ve||self,o(Ve.GalaxyCharts={},Ve.vue))})(this,function(Ve,o){"use strict";var Sa=document.createElement("style");Sa.textContent=`*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.z-10{z-index:10}.m-1{margin:.25rem}.m-2{margin:.5rem}.m-4{margin:1rem}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.my-1{margin-top:.25rem;margin-bottom:.25rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mr-1{margin-right:.25rem}.mt-0{margin-top:0}.mt-2{margin-top:.5rem}.block{display:block}.inline{display:inline}.flex{display:flex}.grid{display:grid}.\\!hidden{display:none!important}.size-14{width:3.5rem;height:3.5rem}.size-3{width:.75rem;height:.75rem}.size-4{width:1rem;height:1rem}.h-screen{height:100vh}.w-full{width:100%}.min-w-14{min-width:3.5rem}.max-w-14{max-width:3.5rem}.flex-1{flex:1 1 0%}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize{resize:both}.grid-cols-\\[70\\%_30\\%\\]{grid-template-columns:70% 30%}.justify-center{justify-content:center}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.break-words{overflow-wrap:break-word}.rounded{border-radius:.25rem}.border{border-width:1px}.border-dotted{border-style:dotted}.border-green-600{--tw-border-opacity: 1;border-color:rgb(22 163 74 / var(--tw-border-opacity))}.bg-sky-100{--tw-bg-opacity: 1;background-color:rgb(224 242 254 / var(--tw-bg-opacity))}.bg-sky-50{--tw-bg-opacity: 1;background-color:rgb(240 249 255 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.object-contain{-o-object-fit:contain;object-fit:contain}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-4{padding:1rem}.px-4{padding-left:1rem;padding-right:1rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-4{padding-top:1rem;padding-bottom:1rem}.pb-1{padding-bottom:.25rem}.pb-2{padding-bottom:.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-thin{font-weight:100}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity))}.text-sky-900{--tw-text-opacity: 1;color:rgb(12 74 110 / var(--tw-text-opacity))}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}@media (min-width: 768px){.md\\:flex{display:flex}}
|
|
2
|
-
`,document.head.appendChild(Sa);function $a(e,t="Request failed."){let n=t;return e&&e.response&&e.response.data&&e.response.data.err_msg?n=e.response.data.err_msg:e&&e.data&&e.data.err_msg?n=e.data.err_msg:e&&e.response?n=`${e.response.statusText} (${e.response.status})`:e instanceof Error?n=e.message:typeof e=="string"&&(n=e),n}function Br(e){throw Error($a(e))}const Ta=o.ref("/");function Mo(){function e(){return Ta.value}function t(n){Ta.value=n}return{getRoot:e,setRoot:t}}async function Oo(e,t){const r=`${Mo().getRoot()}${e.substring(1)}`;try{return{data:await(await fetch(r,{credentials:"include",headers:{"Content-Type":"application/json"},...t})).json()}}catch(i){Br(i)}}function cn(){async function e(r){return Oo(r,{method:"GET"})}async function t(r,i){return Oo(r,{body:JSON.stringify(i),method:"POST"})}async function n(r,i){return Oo(r,{body:JSON.stringify(i),method:"PUT"})}return{GET:e,POST:t,PUT:n}}async function ud(e,t){try{const n=new URLSearchParams({data_type:"raw_data",provider:"dataset-column",indeces:t.toString()}).toString(),r=await cn().GET(`/api/datasets/${e}?${n}`),i=t.length,a=new Array(i);for(let l=0;l<a.length;l++)a[l]=[];for(const l of r.data)for(const s in l){const c=l[s];c!==void 0&&c!=2147483647&&s<i&&a[s].push(c)}return a}catch(n){console.error(n)}}function fd(e){return`/api/datasets/${e}/display`}const ka=["auto",void 0],er=o.ref({});function hd(){function e(n,r){const i=[];for(const a of n)for(const l of r){const s=a[l];[...i,...ka].includes(s)||i.push(s)}return i}async function t(n,r,i){er.value[n]=er.value[n]||{};const a=Object.keys(er.value[n]),l=e(r,i).filter(c=>!a.includes(c));if(l.length>0){const c=await ud(n,l);for(const[d,u]of l.entries())er.value[n][u]=c[d]}const s=[];return r.forEach(c=>{const d={};i.forEach(u=>{const f=c[u];ka.includes(f)||(d[u]=er.value[n][f])}),s.push(d)}),s}return{fetchColumns:t}}function pd(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[o.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M10.5 6h9.75M10.5 6a1.5 1.5 0 1 1-3 0m3 0a1.5 1.5 0 1 0-3 0M3.75 6H7.5m3 12h9.75m-9.75 0a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m-3.75 0H7.5m9-6h3.75m-3.75 0a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m-9.75 0h9.75"})])}function bd(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[o.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99"})])}function Ra(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[o.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"})])}function md(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[o.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m18.75 4.5-7.5 7.5 7.5 7.5m-6-15L5.25 12l7.5 7.5"})])}function gd(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[o.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m5.25 4.5 7.5 7.5-7.5 7.5m6-15 7.5 7.5-7.5 7.5"})])}function vd(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[o.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 16.5V9.75m0 0 3 3m-3-3-3 3M6.75 19.5a4.5 4.5 0 0 1-1.41-8.775 5.25 5.25 0 0 1 10.233-2.33 3 3 0 0 1 3.758 3.848A3.752 3.752 0 0 1 18 19.5H6.75Z"})])}function Pa(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[o.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 9v3.75m9-.75a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 3.75h.008v.008H12v-.008Z"})])}function xd(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[o.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 4.5v15m7.5-7.5h-15"})])}function yd(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[o.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6.429 9.75 2.25 12l4.179 2.25m0-4.5 5.571 3 5.571-3m-11.142 0L2.25 7.5 12 2.25l9.75 5.25-4.179 2.25m0 0L21.75 12l-4.179 2.25m0 0 4.179 2.25L12 21.75 2.25 16.5l4.179-2.25m11.142 0-5.571 3-5.571-3"})])}function wd(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[o.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0"})])}let _r=[];const Ea=new WeakMap;function Cd(){_r.forEach(e=>e(...Ea.get(e))),_r=[]}function za(e,...t){Ea.set(e,t),!_r.includes(e)&&_r.push(e)===1&&requestAnimationFrame(Cd)}function tr(e,t){let{target:n}=e;for(;n;){if(n.dataset&&n.dataset[t]!==void 0)return!0;n=n.parentElement}return!1}function An(e){return e.composedPath()[0]||null}function at(e){return typeof e=="string"?e.endsWith("px")?Number(e.slice(0,e.length-2)):Number(e):e}function dn(e){if(e!=null)return typeof e=="number"?`${e}px`:e.endsWith("px")?e:`${e}px`}function ht(e,t){const n=e.trim().split(/\s+/g),r={top:n[0]};switch(n.length){case 1:r.right=n[0],r.bottom=n[0],r.left=n[0];break;case 2:r.right=n[1],r.left=n[1],r.bottom=n[0];break;case 3:r.right=n[1],r.bottom=n[2],r.left=n[1];break;case 4:r.right=n[1],r.bottom=n[2],r.left=n[3];break;default:throw new Error("[seemly/getMargin]:"+e+" is not a valid value.")}return t===void 0?r:r[t]}const Ba={black:"#000",silver:"#C0C0C0",gray:"#808080",white:"#FFF",maroon:"#800000",red:"#F00",purple:"#800080",fuchsia:"#F0F",green:"#008000",lime:"#0F0",olive:"#808000",yellow:"#FF0",navy:"#000080",blue:"#00F",teal:"#008080",aqua:"#0FF",transparent:"#0000"};function _a(e,t,n){t/=100,n/=100;const r=t*Math.min(n,1-n)+n;return[e,r?(2-2*n/r)*100:0,r*100]}function Mr(e,t,n){t/=100,n/=100;const r=n-n*t/2,i=Math.min(r,1-r);return[e,i?(n-r)/i*100:0,r*100]}function Ut(e,t,n){t/=100,n/=100;let r=(i,a=(i+e/60)%6)=>n-n*t*Math.max(Math.min(a,4-a,1),0);return[r(5)*255,r(3)*255,r(1)*255]}function Ao(e,t,n){e/=255,t/=255,n/=255;let r=Math.max(e,t,n),i=r-Math.min(e,t,n),a=i&&(r==e?(t-n)/i:r==t?2+(n-e)/i:4+(e-t)/i);return[60*(a<0?a+6:a),r&&i/r*100,r*100]}function Io(e,t,n){e/=255,t/=255,n/=255;let r=Math.max(e,t,n),i=r-Math.min(e,t,n),a=1-Math.abs(r+r-i-1),l=i&&(r==e?(t-n)/i:r==t?2+(n-e)/i:4+(e-t)/i);return[60*(l<0?l+6:l),a?i/a*100:0,(r+r-i)*50]}function Fo(e,t,n){t/=100,n/=100;let r=t*Math.min(n,1-n),i=(a,l=(a+e/30)%12)=>n-r*Math.max(Math.min(l-3,9-l,1),-1);return[i(0)*255,i(8)*255,i(4)*255]}const Pt="^\\s*",Et="\\s*$",Gt="\\s*((\\.\\d+)|(\\d+(\\.\\d*)?))%\\s*",pt="\\s*((\\.\\d+)|(\\d+(\\.\\d*)?))\\s*",un="([0-9A-Fa-f])",fn="([0-9A-Fa-f]{2})",Sd=new RegExp(`${Pt}hsl\\s*\\(${pt},${Gt},${Gt}\\)${Et}`),$d=new RegExp(`${Pt}hsv\\s*\\(${pt},${Gt},${Gt}\\)${Et}`),Td=new RegExp(`${Pt}hsla\\s*\\(${pt},${Gt},${Gt},${pt}\\)${Et}`),kd=new RegExp(`${Pt}hsva\\s*\\(${pt},${Gt},${Gt},${pt}\\)${Et}`),Rd=new RegExp(`${Pt}rgb\\s*\\(${pt},${pt},${pt}\\)${Et}`),Pd=new RegExp(`${Pt}rgba\\s*\\(${pt},${pt},${pt},${pt}\\)${Et}`),Do=new RegExp(`${Pt}#${un}${un}${un}${Et}`),No=new RegExp(`${Pt}#${fn}${fn}${fn}${Et}`),Lo=new RegExp(`${Pt}#${un}${un}${un}${un}${Et}`),Ho=new RegExp(`${Pt}#${fn}${fn}${fn}${fn}${Et}`);function ct(e){return parseInt(e,16)}function In(e){try{let t;if(t=Td.exec(e))return[zt(t[1]),Xe(t[5]),Xe(t[9]),It(t[13])];if(t=Sd.exec(e))return[zt(t[1]),Xe(t[5]),Xe(t[9]),1];throw new Error(`[seemly/hsla]: Invalid color value ${e}.`)}catch(t){throw t}}function hn(e){try{let t;if(t=kd.exec(e))return[zt(t[1]),Xe(t[5]),Xe(t[9]),It(t[13])];if(t=$d.exec(e))return[zt(t[1]),Xe(t[5]),Xe(t[9]),1];throw new Error(`[seemly/hsva]: Invalid color value ${e}.`)}catch(t){throw t}}function nt(e){try{let t;if(t=No.exec(e))return[ct(t[1]),ct(t[2]),ct(t[3]),1];if(t=Rd.exec(e))return[je(t[1]),je(t[5]),je(t[9]),1];if(t=Pd.exec(e))return[je(t[1]),je(t[5]),je(t[9]),It(t[13])];if(t=Do.exec(e))return[ct(t[1]+t[1]),ct(t[2]+t[2]),ct(t[3]+t[3]),1];if(t=Ho.exec(e))return[ct(t[1]),ct(t[2]),ct(t[3]),It(ct(t[4])/255)];if(t=Lo.exec(e))return[ct(t[1]+t[1]),ct(t[2]+t[2]),ct(t[3]+t[3]),It(ct(t[4]+t[4])/255)];if(e in Ba)return nt(Ba[e]);throw new Error(`[seemly/rgba]: Invalid color value ${e}.`)}catch(t){throw t}}function Ed(e){return e>1?1:e<0?0:e}function zd(e,t,n){return`rgb(${je(e)}, ${je(t)}, ${je(n)})`}function Vo(e,t,n,r){return`rgba(${je(e)}, ${je(t)}, ${je(n)}, ${Ed(r)})`}function jo(e,t,n,r,i){return je((e*t*(1-r)+n*r)/i)}function gt(e,t){Array.isArray(e)||(e=nt(e)),Array.isArray(t)||(t=nt(t));const n=e[3],r=t[3],i=It(n+r-n*r);return Vo(jo(e[0],n,t[0],r,i),jo(e[1],n,t[1],r,i),jo(e[2],n,t[2],r,i),i)}function ve(e,t){const[n,r,i,a=1]=Array.isArray(e)?e:nt(e);return t.alpha?Vo(n,r,i,t.alpha):Vo(n,r,i,a)}function Or(e,t){const[n,r,i,a=1]=Array.isArray(e)?e:nt(e),{lightness:l=1,alpha:s=1}=t;return Bt([n*l,r*l,i*l,a*s])}function It(e){const t=Math.round(Number(e)*100)/100;return t>1?1:t<0?0:t}function zt(e){const t=Math.round(Number(e));return t>=360||t<0?0:t}function je(e){const t=Math.round(Number(e));return t>255?255:t<0?0:t}function Xe(e){const t=Math.round(Number(e));return t>100?100:t<0?0:t}function Wo(e){const[t,n,r]=Array.isArray(e)?e:nt(e);return zd(t,n,r)}function Bt(e){const[t,n,r]=e;return 3 in e?`rgba(${je(t)}, ${je(n)}, ${je(r)}, ${It(e[3])})`:`rgba(${je(t)}, ${je(n)}, ${je(r)}, 1)`}function Uo(e){return`hsv(${zt(e[0])}, ${Xe(e[1])}%, ${Xe(e[2])}%)`}function pn(e){const[t,n,r]=e;return 3 in e?`hsva(${zt(t)}, ${Xe(n)}%, ${Xe(r)}%, ${It(e[3])})`:`hsva(${zt(t)}, ${Xe(n)}%, ${Xe(r)}%, 1)`}function Go(e){return`hsl(${zt(e[0])}, ${Xe(e[1])}%, ${Xe(e[2])}%)`}function qt(e){const[t,n,r]=e;return 3 in e?`hsla(${zt(t)}, ${Xe(n)}%, ${Xe(r)}%, ${It(e[3])})`:`hsla(${zt(t)}, ${Xe(n)}%, ${Xe(r)}%, 1)`}function Kt(e){if(typeof e=="string"){let r;if(r=No.exec(e))return`${r[0]}FF`;if(r=Ho.exec(e))return r[0];if(r=Do.exec(e))return`#${r[1]}${r[1]}${r[2]}${r[2]}${r[3]}${r[3]}FF`;if(r=Lo.exec(e))return`#${r[1]}${r[1]}${r[2]}${r[2]}${r[3]}${r[3]}${r[4]}${r[4]}`;throw new Error(`[seemly/toHexString]: Invalid hex value ${e}.`)}const t=`#${e.slice(0,3).map(r=>je(r).toString(16).toUpperCase().padStart(2,"0")).join("")}`,n=e.length===3?"FF":je(e[3]*255).toString(16).padStart(2,"0").toUpperCase();return t+n}function nr(e){if(typeof e=="string"){let t;if(t=No.exec(e))return t[0];if(t=Ho.exec(e))return t[0].slice(0,7);if(t=Do.exec(e)||Lo.exec(e))return`#${t[1]}${t[1]}${t[2]}${t[2]}${t[3]}${t[3]}`;throw new Error(`[seemly/toHexString]: Invalid hex value ${e}.`)}return`#${e.slice(0,3).map(t=>je(t).toString(16).toUpperCase().padStart(2,"0")).join("")}`}function Bd(e=8){return Math.random().toString(16).slice(2,2+e)}function _d(e,t=[],n){const r={};return t.forEach(i=>{r[i]=e[i]}),Object.assign(r,n)}function Md(e,t=[],n){const r={};return Object.getOwnPropertyNames(e).forEach(a=>{t.includes(a)||(r[a]=e[a])}),Object.assign(r,n)}function Fn(e,t=!0,n=[]){return e.forEach(r=>{if(r!==null){if(typeof r!="object"){(typeof r=="string"||typeof r=="number")&&n.push(o.createTextVNode(String(r)));return}if(Array.isArray(r)){Fn(r,t,n);return}if(r.type===o.Fragment){if(r.children===null)return;Array.isArray(r.children)&&Fn(r.children,t,n)}else{if(r.type===o.Comment&&t)return;n.push(r)}}}),n}function de(e,...t){if(Array.isArray(e))e.forEach(n=>de(n,...t));else return e(...t)}function bn(e,...t){return typeof e=="function"?e(...t):typeof e=="string"?o.createTextVNode(e):typeof e=="number"?o.createTextVNode(String(e)):null}const Ma=new Set;function ot(e,t){const n=`[naive/${e}]: ${t}`;Ma.has(n)||(Ma.add(n),console.error(n))}function rr(e,t){console.error(`[naive/${e}]: ${t}`)}function qo(e,t){throw new Error(`[naive/${e}]: ${t}`)}function Oa(e){switch(typeof e){case"string":return e||void 0;case"number":return String(e);default:return}}function Aa(e,t="default",n=void 0){const r=e[t];if(!r)return rr("getFirstSlotVNode",`slot[${t}] is empty`),null;const i=Fn(r(n));return i.length===1?i[0]:(rr("getFirstSlotVNode",`slot[${t}] should have exactly one child`),null)}function aC(e){return e}function or(e){return e.some(t=>o.isVNode(t)?!(t.type===o.Comment||t.type===o.Fragment&&!or(t.children)):!0)?e:null}function Ct(e,t){return e&&or(e())||t()}function Od(e,t,n){return e&&or(e(t))||n(t)}function Fe(e,t){const n=e&&or(e());return t(n||null)}function Dn(e){return!(e&&or(e()))}function Ko(e){const t=e.filter(n=>n!==void 0);if(t.length!==0)return t.length===1?t[0]:n=>{e.forEach(r=>{r&&r(n)})}}const Xo=o.defineComponent({render(){var e,t;return(t=(e=this.$slots).default)===null||t===void 0?void 0:t.call(e)}}),Ad=/^(\d|\.)+$/,Ia=/(\d|\.)+/;function dt(e,{c:t=1,offset:n=0,attachPx:r=!0}={}){if(typeof e=="number"){const i=(e+n)*t;return i===0?"0":`${i}px`}else if(typeof e=="string")if(Ad.test(e)){const i=(Number(e)+n)*t;return r?i===0?"0":`${i}px`:`${i}`}else{const i=Ia.exec(e);return i?e.replace(Ia,String((Number(i[0])+n)*t)):e}return e}function Ar(e){return e.replace(/#|\(|\)|,|\s|\./g,"_")}function Id(e){const{left:t,right:n,top:r,bottom:i}=ht(e);return`${r} ${n} ${i} ${t}`}function Fd(e){let t=0;for(let n=0;n<e.length;++n)e[n]==="&"&&++t;return t}const Fa=/\s*,(?![^(]*\))\s*/g,Dd=/\s+/g;function Nd(e,t){const n=[];return t.split(Fa).forEach(r=>{let i=Fd(r);if(i){if(i===1){e.forEach(l=>{n.push(r.replace("&",l))});return}}else{e.forEach(l=>{n.push((l&&l+" ")+r)});return}let a=[r];for(;i--;){const l=[];a.forEach(s=>{e.forEach(c=>{l.push(s.replace("&",c))})}),a=l}a.forEach(l=>n.push(l))}),n}function Ld(e,t){const n=[];return t.split(Fa).forEach(r=>{e.forEach(i=>{n.push((i&&i+" ")+r)})}),n}function Hd(e){let t=[""];return e.forEach(n=>{n=n&&n.trim(),n&&(n.includes("&")?t=Nd(t,n):t=Ld(t,n))}),t.join(", ").replace(Dd," ")}function Da(e){if(!e)return;const t=e.parentElement;t&&t.removeChild(e)}function Ir(e,t){return(t??document.head).querySelector(`style[cssr-id="${e}"]`)}function Vd(e){const t=document.createElement("style");return t.setAttribute("cssr-id",e),t}function Fr(e){return e?/^\s*@(s|m)/.test(e):!1}const jd=/[A-Z]/g;function Na(e){return e.replace(jd,t=>"-"+t.toLowerCase())}function Wd(e,t=" "){return typeof e=="object"&&e!==null?` {
|
|
3
|
-
`+Object.entries(e).map(n=>t+` ${
|
|
2
|
+
`,document.head.appendChild(Sa);function $a(e,t="Request failed."){let n=t;return e&&e.response&&e.response.data&&e.response.data.err_msg?n=e.response.data.err_msg:e&&e.data&&e.data.err_msg?n=e.data.err_msg:e&&e.response?n=`${e.response.statusText} (${e.response.status})`:e instanceof Error?n=e.message:typeof e=="string"&&(n=e),n}function Br(e){throw Error($a(e))}const Ta=o.ref("/"),ka=o.ref("include");function Mo(){function e(){return ka.value}function t(i){ka.value=i}function n(){return Ta.value}function r(i){Ta.value=i}return{getCredentials:e,setCredentials:t,getRoot:n,setRoot:r}}async function Oo(e,t){const n=Mo(),r=`${n.getRoot()}${e.substring(1)}`;try{return{data:await(await fetch(r,{credentials:n.getCredentials(),headers:{"Content-Type":"application/json"},...t})).json()}}catch(i){Br(i)}}function cn(){async function e(r){return Oo(r,{method:"GET"})}async function t(r,i){return Oo(r,{body:JSON.stringify(i),method:"POST"})}async function n(r,i){return Oo(r,{body:JSON.stringify(i),method:"PUT"})}return{GET:e,POST:t,PUT:n}}async function fd(e,t){try{const n=new URLSearchParams({data_type:"raw_data",provider:"dataset-column",indeces:t.toString()}).toString(),r=await cn().GET(`/api/datasets/${e}?${n}`),i=t.length,a=new Array(i);for(let l=0;l<a.length;l++)a[l]=[];for(const l of r.data)for(const s in l){const c=l[s];c!==void 0&&c!=2147483647&&s<i&&a[s].push(c)}return a}catch(n){console.error(n)}}function hd(e){return`/api/datasets/${e}/display`}const Ra=["auto",void 0],er=o.ref({});function pd(){function e(n,r){const i=[];for(const a of n)for(const l of r){const s=a[l];[...i,...Ra].includes(s)||i.push(s)}return i}async function t(n,r,i){er.value[n]=er.value[n]||{};const a=Object.keys(er.value[n]),l=e(r,i).filter(c=>!a.includes(c));if(l.length>0){const c=await fd(n,l);for(const[d,u]of l.entries())er.value[n][u]=c[d]}const s=[];return r.forEach(c=>{const d={};i.forEach(u=>{const f=c[u];Ra.includes(f)||(d[u]=er.value[n][f])}),s.push(d)}),s}return{fetchColumns:t}}function bd(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[o.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M10.5 6h9.75M10.5 6a1.5 1.5 0 1 1-3 0m3 0a1.5 1.5 0 1 0-3 0M3.75 6H7.5m3 12h9.75m-9.75 0a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m-3.75 0H7.5m9-6h3.75m-3.75 0a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m-9.75 0h9.75"})])}function md(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[o.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99"})])}function Pa(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[o.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"})])}function gd(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[o.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m18.75 4.5-7.5 7.5 7.5 7.5m-6-15L5.25 12l7.5 7.5"})])}function vd(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[o.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m5.25 4.5 7.5 7.5-7.5 7.5m6-15 7.5 7.5-7.5 7.5"})])}function xd(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[o.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 16.5V9.75m0 0 3 3m-3-3-3 3M6.75 19.5a4.5 4.5 0 0 1-1.41-8.775 5.25 5.25 0 0 1 10.233-2.33 3 3 0 0 1 3.758 3.848A3.752 3.752 0 0 1 18 19.5H6.75Z"})])}function Ea(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[o.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 9v3.75m9-.75a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 3.75h.008v.008H12v-.008Z"})])}function yd(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[o.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 4.5v15m7.5-7.5h-15"})])}function wd(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[o.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6.429 9.75 2.25 12l4.179 2.25m0-4.5 5.571 3 5.571-3m-11.142 0L2.25 7.5 12 2.25l9.75 5.25-4.179 2.25m0 0L21.75 12l-4.179 2.25m0 0 4.179 2.25L12 21.75 2.25 16.5l4.179-2.25m11.142 0-5.571 3-5.571-3"})])}function Cd(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[o.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0"})])}let _r=[];const za=new WeakMap;function Sd(){_r.forEach(e=>e(...za.get(e))),_r=[]}function Ba(e,...t){za.set(e,t),!_r.includes(e)&&_r.push(e)===1&&requestAnimationFrame(Sd)}function tr(e,t){let{target:n}=e;for(;n;){if(n.dataset&&n.dataset[t]!==void 0)return!0;n=n.parentElement}return!1}function An(e){return e.composedPath()[0]||null}function at(e){return typeof e=="string"?e.endsWith("px")?Number(e.slice(0,e.length-2)):Number(e):e}function dn(e){if(e!=null)return typeof e=="number"?`${e}px`:e.endsWith("px")?e:`${e}px`}function ht(e,t){const n=e.trim().split(/\s+/g),r={top:n[0]};switch(n.length){case 1:r.right=n[0],r.bottom=n[0],r.left=n[0];break;case 2:r.right=n[1],r.left=n[1],r.bottom=n[0];break;case 3:r.right=n[1],r.bottom=n[2],r.left=n[1];break;case 4:r.right=n[1],r.bottom=n[2],r.left=n[3];break;default:throw new Error("[seemly/getMargin]:"+e+" is not a valid value.")}return t===void 0?r:r[t]}const _a={black:"#000",silver:"#C0C0C0",gray:"#808080",white:"#FFF",maroon:"#800000",red:"#F00",purple:"#800080",fuchsia:"#F0F",green:"#008000",lime:"#0F0",olive:"#808000",yellow:"#FF0",navy:"#000080",blue:"#00F",teal:"#008080",aqua:"#0FF",transparent:"#0000"};function Ma(e,t,n){t/=100,n/=100;const r=t*Math.min(n,1-n)+n;return[e,r?(2-2*n/r)*100:0,r*100]}function Mr(e,t,n){t/=100,n/=100;const r=n-n*t/2,i=Math.min(r,1-r);return[e,i?(n-r)/i*100:0,r*100]}function Ut(e,t,n){t/=100,n/=100;let r=(i,a=(i+e/60)%6)=>n-n*t*Math.max(Math.min(a,4-a,1),0);return[r(5)*255,r(3)*255,r(1)*255]}function Ao(e,t,n){e/=255,t/=255,n/=255;let r=Math.max(e,t,n),i=r-Math.min(e,t,n),a=i&&(r==e?(t-n)/i:r==t?2+(n-e)/i:4+(e-t)/i);return[60*(a<0?a+6:a),r&&i/r*100,r*100]}function Io(e,t,n){e/=255,t/=255,n/=255;let r=Math.max(e,t,n),i=r-Math.min(e,t,n),a=1-Math.abs(r+r-i-1),l=i&&(r==e?(t-n)/i:r==t?2+(n-e)/i:4+(e-t)/i);return[60*(l<0?l+6:l),a?i/a*100:0,(r+r-i)*50]}function Fo(e,t,n){t/=100,n/=100;let r=t*Math.min(n,1-n),i=(a,l=(a+e/30)%12)=>n-r*Math.max(Math.min(l-3,9-l,1),-1);return[i(0)*255,i(8)*255,i(4)*255]}const Pt="^\\s*",Et="\\s*$",Gt="\\s*((\\.\\d+)|(\\d+(\\.\\d*)?))%\\s*",pt="\\s*((\\.\\d+)|(\\d+(\\.\\d*)?))\\s*",un="([0-9A-Fa-f])",fn="([0-9A-Fa-f]{2})",$d=new RegExp(`${Pt}hsl\\s*\\(${pt},${Gt},${Gt}\\)${Et}`),Td=new RegExp(`${Pt}hsv\\s*\\(${pt},${Gt},${Gt}\\)${Et}`),kd=new RegExp(`${Pt}hsla\\s*\\(${pt},${Gt},${Gt},${pt}\\)${Et}`),Rd=new RegExp(`${Pt}hsva\\s*\\(${pt},${Gt},${Gt},${pt}\\)${Et}`),Pd=new RegExp(`${Pt}rgb\\s*\\(${pt},${pt},${pt}\\)${Et}`),Ed=new RegExp(`${Pt}rgba\\s*\\(${pt},${pt},${pt},${pt}\\)${Et}`),Do=new RegExp(`${Pt}#${un}${un}${un}${Et}`),No=new RegExp(`${Pt}#${fn}${fn}${fn}${Et}`),Lo=new RegExp(`${Pt}#${un}${un}${un}${un}${Et}`),Ho=new RegExp(`${Pt}#${fn}${fn}${fn}${fn}${Et}`);function ct(e){return parseInt(e,16)}function In(e){try{let t;if(t=kd.exec(e))return[zt(t[1]),Xe(t[5]),Xe(t[9]),It(t[13])];if(t=$d.exec(e))return[zt(t[1]),Xe(t[5]),Xe(t[9]),1];throw new Error(`[seemly/hsla]: Invalid color value ${e}.`)}catch(t){throw t}}function hn(e){try{let t;if(t=Rd.exec(e))return[zt(t[1]),Xe(t[5]),Xe(t[9]),It(t[13])];if(t=Td.exec(e))return[zt(t[1]),Xe(t[5]),Xe(t[9]),1];throw new Error(`[seemly/hsva]: Invalid color value ${e}.`)}catch(t){throw t}}function nt(e){try{let t;if(t=No.exec(e))return[ct(t[1]),ct(t[2]),ct(t[3]),1];if(t=Pd.exec(e))return[je(t[1]),je(t[5]),je(t[9]),1];if(t=Ed.exec(e))return[je(t[1]),je(t[5]),je(t[9]),It(t[13])];if(t=Do.exec(e))return[ct(t[1]+t[1]),ct(t[2]+t[2]),ct(t[3]+t[3]),1];if(t=Ho.exec(e))return[ct(t[1]),ct(t[2]),ct(t[3]),It(ct(t[4])/255)];if(t=Lo.exec(e))return[ct(t[1]+t[1]),ct(t[2]+t[2]),ct(t[3]+t[3]),It(ct(t[4]+t[4])/255)];if(e in _a)return nt(_a[e]);throw new Error(`[seemly/rgba]: Invalid color value ${e}.`)}catch(t){throw t}}function zd(e){return e>1?1:e<0?0:e}function Bd(e,t,n){return`rgb(${je(e)}, ${je(t)}, ${je(n)})`}function Vo(e,t,n,r){return`rgba(${je(e)}, ${je(t)}, ${je(n)}, ${zd(r)})`}function jo(e,t,n,r,i){return je((e*t*(1-r)+n*r)/i)}function gt(e,t){Array.isArray(e)||(e=nt(e)),Array.isArray(t)||(t=nt(t));const n=e[3],r=t[3],i=It(n+r-n*r);return Vo(jo(e[0],n,t[0],r,i),jo(e[1],n,t[1],r,i),jo(e[2],n,t[2],r,i),i)}function ve(e,t){const[n,r,i,a=1]=Array.isArray(e)?e:nt(e);return t.alpha?Vo(n,r,i,t.alpha):Vo(n,r,i,a)}function Or(e,t){const[n,r,i,a=1]=Array.isArray(e)?e:nt(e),{lightness:l=1,alpha:s=1}=t;return Bt([n*l,r*l,i*l,a*s])}function It(e){const t=Math.round(Number(e)*100)/100;return t>1?1:t<0?0:t}function zt(e){const t=Math.round(Number(e));return t>=360||t<0?0:t}function je(e){const t=Math.round(Number(e));return t>255?255:t<0?0:t}function Xe(e){const t=Math.round(Number(e));return t>100?100:t<0?0:t}function Wo(e){const[t,n,r]=Array.isArray(e)?e:nt(e);return Bd(t,n,r)}function Bt(e){const[t,n,r]=e;return 3 in e?`rgba(${je(t)}, ${je(n)}, ${je(r)}, ${It(e[3])})`:`rgba(${je(t)}, ${je(n)}, ${je(r)}, 1)`}function Uo(e){return`hsv(${zt(e[0])}, ${Xe(e[1])}%, ${Xe(e[2])}%)`}function pn(e){const[t,n,r]=e;return 3 in e?`hsva(${zt(t)}, ${Xe(n)}%, ${Xe(r)}%, ${It(e[3])})`:`hsva(${zt(t)}, ${Xe(n)}%, ${Xe(r)}%, 1)`}function Go(e){return`hsl(${zt(e[0])}, ${Xe(e[1])}%, ${Xe(e[2])}%)`}function qt(e){const[t,n,r]=e;return 3 in e?`hsla(${zt(t)}, ${Xe(n)}%, ${Xe(r)}%, ${It(e[3])})`:`hsla(${zt(t)}, ${Xe(n)}%, ${Xe(r)}%, 1)`}function Kt(e){if(typeof e=="string"){let r;if(r=No.exec(e))return`${r[0]}FF`;if(r=Ho.exec(e))return r[0];if(r=Do.exec(e))return`#${r[1]}${r[1]}${r[2]}${r[2]}${r[3]}${r[3]}FF`;if(r=Lo.exec(e))return`#${r[1]}${r[1]}${r[2]}${r[2]}${r[3]}${r[3]}${r[4]}${r[4]}`;throw new Error(`[seemly/toHexString]: Invalid hex value ${e}.`)}const t=`#${e.slice(0,3).map(r=>je(r).toString(16).toUpperCase().padStart(2,"0")).join("")}`,n=e.length===3?"FF":je(e[3]*255).toString(16).padStart(2,"0").toUpperCase();return t+n}function nr(e){if(typeof e=="string"){let t;if(t=No.exec(e))return t[0];if(t=Ho.exec(e))return t[0].slice(0,7);if(t=Do.exec(e)||Lo.exec(e))return`#${t[1]}${t[1]}${t[2]}${t[2]}${t[3]}${t[3]}`;throw new Error(`[seemly/toHexString]: Invalid hex value ${e}.`)}return`#${e.slice(0,3).map(t=>je(t).toString(16).toUpperCase().padStart(2,"0")).join("")}`}function _d(e=8){return Math.random().toString(16).slice(2,2+e)}function Md(e,t=[],n){const r={};return t.forEach(i=>{r[i]=e[i]}),Object.assign(r,n)}function Od(e,t=[],n){const r={};return Object.getOwnPropertyNames(e).forEach(a=>{t.includes(a)||(r[a]=e[a])}),Object.assign(r,n)}function Fn(e,t=!0,n=[]){return e.forEach(r=>{if(r!==null){if(typeof r!="object"){(typeof r=="string"||typeof r=="number")&&n.push(o.createTextVNode(String(r)));return}if(Array.isArray(r)){Fn(r,t,n);return}if(r.type===o.Fragment){if(r.children===null)return;Array.isArray(r.children)&&Fn(r.children,t,n)}else{if(r.type===o.Comment&&t)return;n.push(r)}}}),n}function de(e,...t){if(Array.isArray(e))e.forEach(n=>de(n,...t));else return e(...t)}function bn(e,...t){return typeof e=="function"?e(...t):typeof e=="string"?o.createTextVNode(e):typeof e=="number"?o.createTextVNode(String(e)):null}const Oa=new Set;function ot(e,t){const n=`[naive/${e}]: ${t}`;Oa.has(n)||(Oa.add(n),console.error(n))}function rr(e,t){console.error(`[naive/${e}]: ${t}`)}function qo(e,t){throw new Error(`[naive/${e}]: ${t}`)}function Aa(e){switch(typeof e){case"string":return e||void 0;case"number":return String(e);default:return}}function Ia(e,t="default",n=void 0){const r=e[t];if(!r)return rr("getFirstSlotVNode",`slot[${t}] is empty`),null;const i=Fn(r(n));return i.length===1?i[0]:(rr("getFirstSlotVNode",`slot[${t}] should have exactly one child`),null)}function lC(e){return e}function or(e){return e.some(t=>o.isVNode(t)?!(t.type===o.Comment||t.type===o.Fragment&&!or(t.children)):!0)?e:null}function Ct(e,t){return e&&or(e())||t()}function Ad(e,t,n){return e&&or(e(t))||n(t)}function Fe(e,t){const n=e&&or(e());return t(n||null)}function Dn(e){return!(e&&or(e()))}function Ko(e){const t=e.filter(n=>n!==void 0);if(t.length!==0)return t.length===1?t[0]:n=>{e.forEach(r=>{r&&r(n)})}}const Xo=o.defineComponent({render(){var e,t;return(t=(e=this.$slots).default)===null||t===void 0?void 0:t.call(e)}}),Id=/^(\d|\.)+$/,Fa=/(\d|\.)+/;function dt(e,{c:t=1,offset:n=0,attachPx:r=!0}={}){if(typeof e=="number"){const i=(e+n)*t;return i===0?"0":`${i}px`}else if(typeof e=="string")if(Id.test(e)){const i=(Number(e)+n)*t;return r?i===0?"0":`${i}px`:`${i}`}else{const i=Fa.exec(e);return i?e.replace(Fa,String((Number(i[0])+n)*t)):e}return e}function Ar(e){return e.replace(/#|\(|\)|,|\s|\./g,"_")}function Fd(e){const{left:t,right:n,top:r,bottom:i}=ht(e);return`${r} ${n} ${i} ${t}`}function Dd(e){let t=0;for(let n=0;n<e.length;++n)e[n]==="&"&&++t;return t}const Da=/\s*,(?![^(]*\))\s*/g,Nd=/\s+/g;function Ld(e,t){const n=[];return t.split(Da).forEach(r=>{let i=Dd(r);if(i){if(i===1){e.forEach(l=>{n.push(r.replace("&",l))});return}}else{e.forEach(l=>{n.push((l&&l+" ")+r)});return}let a=[r];for(;i--;){const l=[];a.forEach(s=>{e.forEach(c=>{l.push(s.replace("&",c))})}),a=l}a.forEach(l=>n.push(l))}),n}function Hd(e,t){const n=[];return t.split(Da).forEach(r=>{e.forEach(i=>{n.push((i&&i+" ")+r)})}),n}function Vd(e){let t=[""];return e.forEach(n=>{n=n&&n.trim(),n&&(n.includes("&")?t=Ld(t,n):t=Hd(t,n))}),t.join(", ").replace(Nd," ")}function Na(e){if(!e)return;const t=e.parentElement;t&&t.removeChild(e)}function Ir(e,t){return(t??document.head).querySelector(`style[cssr-id="${e}"]`)}function jd(e){const t=document.createElement("style");return t.setAttribute("cssr-id",e),t}function Fr(e){return e?/^\s*@(s|m)/.test(e):!1}const Wd=/[A-Z]/g;function La(e){return e.replace(Wd,t=>"-"+t.toLowerCase())}function Ud(e,t=" "){return typeof e=="object"&&e!==null?` {
|
|
3
|
+
`+Object.entries(e).map(n=>t+` ${La(n[0])}: ${n[1]};`).join(`
|
|
4
4
|
`)+`
|
|
5
|
-
`+t+"}":`: ${e};`}function
|
|
5
|
+
`+t+"}":`: ${e};`}function Gd(e,t,n){return typeof e=="function"?e({context:t.context,props:n}):e}function Ha(e,t,n,r){if(!t)return"";const i=Gd(t,n,r);if(!i)return"";if(typeof i=="string")return`${e} {
|
|
6
6
|
${i}
|
|
7
7
|
}`;const a=Object.keys(i);if(a.length===0)return n.config.keepEmptyBlock?e+` {
|
|
8
8
|
}`:"";const l=e?[e+" {"]:[];return a.forEach(s=>{const c=i[s];if(s==="raw"){l.push(`
|
|
9
9
|
`+c+`
|
|
10
|
-
`);return}s=
|
|
11
|
-
`)}function Yo(e,t,n){e&&e.forEach(r=>{if(Array.isArray(r))Yo(r,t,n);else if(typeof r=="function"){const i=r(t);Array.isArray(i)?Yo(i,t,n):i&&n(i)}else r&&n(r)})}function
|
|
10
|
+
`);return}s=La(s),c!=null&&l.push(` ${s}${Ud(c)}`)}),e&&l.push("}"),l.join(`
|
|
11
|
+
`)}function Yo(e,t,n){e&&e.forEach(r=>{if(Array.isArray(r))Yo(r,t,n);else if(typeof r=="function"){const i=r(t);Array.isArray(i)?Yo(i,t,n):i&&n(i)}else r&&n(r)})}function Va(e,t,n,r,i){const a=e.$;let l="";if(!a||typeof a=="string")Fr(a)?l=a:t.push(a);else if(typeof a=="function"){const d=a({context:r.context,props:i});Fr(d)?l=d:t.push(d)}else if(a.before&&a.before(r.context),!a.$||typeof a.$=="string")Fr(a.$)?l=a.$:t.push(a.$);else if(a.$){const d=a.$({context:r.context,props:i});Fr(d)?l=d:t.push(d)}const s=Vd(t),c=Ha(s,e.props,r,i);l?n.push(`${l} {`):c.length&&n.push(c),e.children&&Yo(e.children,{context:r.context,props:i},d=>{if(typeof d=="string"){const u=Ha(s,{raw:d},r,i);n.push(u)}else Va(d,t,n,r,i)}),t.pop(),l&&n.push("}"),a&&a.after&&a.after(r.context)}function qd(e,t,n){const r=[];return Va(e,[],r,t,n),r.join(`
|
|
12
12
|
|
|
13
|
-
`)}function Zo(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}typeof window<"u"&&(window.__cssrContext={});function qd(e,t,n,r){const{els:i}=t;if(n===void 0)i.forEach(Da),t.els=[];else{const a=Ir(n,r);a&&i.includes(a)&&(Da(a),t.els=i.filter(l=>l!==a))}}function Va(e,t){e.push(t)}function Kd(e,t,n,r,i,a,l,s,c){let d;if(n===void 0&&(d=t.render(r),n=Zo(d)),c){c.adapter(n,d??t.render(r));return}s===void 0&&(s=document.head);const u=Ir(n,s);if(u!==null&&!a)return u;const f=u??Vd(n);if(d===void 0&&(d=t.render(r)),f.textContent=d,u!==null)return u;if(l){const p=s.querySelector(`meta[name="${l}"]`);if(p)return s.insertBefore(f,p),Va(t.els,f),f}return i?s.insertBefore(f,s.querySelector("style, link")):s.appendChild(f),Va(t.els,f),f}function Xd(e){return Gd(this,this.instance,e)}function Yd(e={}){const{id:t,ssr:n,props:r,head:i=!1,force:a=!1,anchorMetaName:l,parent:s}=e;return Kd(this.instance,this,t,r,i,a,l,s,n)}function Zd(e={}){const{id:t,parent:n}=e;qd(this.instance,this,t,n)}const Dr=function(e,t,n,r){return{instance:e,$:t,props:n,children:r,els:[],render:Xd,mount:Yd,unmount:Zd}},Jd=function(e,t,n,r){return Array.isArray(t)?Dr(e,{$:null},null,t):Array.isArray(n)?Dr(e,t,null,n):Array.isArray(r)?Dr(e,t,n,r):Dr(e,t,n,null)};function ja(e={}){const t={c:(...n)=>Jd(t,...n),use:(n,...r)=>n.install(t,...r),find:Ir,context:{},config:e};return t}function Qd(e,t){if(e===void 0)return!1;if(t){const{context:{ids:n}}=t;return n.has(e)}return Ir(e)!==null}function eu(e){let t=".",n="__",r="--",i;if(e){let h=e.blockPrefix;h&&(t=h),h=e.elementPrefix,h&&(n=h),h=e.modifierPrefix,h&&(r=h)}const a={install(h){i=h.c;const x=h.context;x.bem={},x.bem.b=null,x.bem.els=null}};function l(h){let x,v;return{before(g){x=g.bem.b,v=g.bem.els,g.bem.els=null},after(g){g.bem.b=x,g.bem.els=v},$({context:g,props:k}){return h=typeof h=="string"?h:h({context:g,props:k}),g.bem.b=h,`${(k==null?void 0:k.bPrefix)||t}${g.bem.b}`}}}function s(h){let x;return{before(v){x=v.bem.els},after(v){v.bem.els=x},$({context:v,props:g}){return h=typeof h=="string"?h:h({context:v,props:g}),v.bem.els=h.split(",").map(k=>k.trim()),v.bem.els.map(k=>`${(g==null?void 0:g.bPrefix)||t}${v.bem.b}${n}${k}`).join(", ")}}}function c(h){return{$({context:x,props:v}){h=typeof h=="string"?h:h({context:x,props:v});const g=h.split(",").map($=>$.trim());function k($){return g.map(T=>`&${(v==null?void 0:v.bPrefix)||t}${x.bem.b}${$!==void 0?`${n}${$}`:""}${r}${T}`).join(", ")}const z=x.bem.els;if(z!==null){if(process.env.NODE_ENV!=="production"&&z.length>=2)throw Error(`[css-render/plugin-bem]: m(${h}) is invalid, using modifier inside multiple elements is not allowed`);return k(z[0])}else return k()}}}function d(h){return{$({context:x,props:v}){h=typeof h=="string"?h:h({context:x,props:v});const g=x.bem.els;if(process.env.NODE_ENV!=="production"&&g!==null&&g.length>=2)throw Error(`[css-render/plugin-bem]: notM(${h}) is invalid, using modifier inside multiple elements is not allowed`);return`&:not(${(v==null?void 0:v.bPrefix)||t}${x.bem.b}${g!==null&&g.length>0?`${n}${g[0]}`:""}${r}${h})`}}}return Object.assign(a,{cB:(...h)=>i(l(h[0]),h[1],h[2]),cE:(...h)=>i(s(h[0]),h[1],h[2]),cM:(...h)=>i(c(h[0]),h[1],h[2]),cNotM:(...h)=>i(d(h[0]),h[1],h[2])}),a}const Nr=".n-",tu="__",nu="--",Wa=ja(),Ua=eu({blockPrefix:Nr,elementPrefix:tu,modifierPrefix:nu});Wa.use(Ua);const{c:I,find:sC}=Wa,{cB:w,cE:P,cM:W,cNotM:Ge}=Ua;function ru(e){return I(({props:{bPrefix:t}})=>`${t||Nr}modal, ${t||Nr}drawer`,[e])}function ou(e){return I(({props:{bPrefix:t}})=>`${t||Nr}popover`,[e])}const iu=(...e)=>I(">",[w(...e)]);function ee(e,t){return e+(t==="default"?"":t.replace(/^[a-z]/,n=>n.toUpperCase()))}let Jo;function au(){return Jo===void 0&&(Jo=navigator.userAgent.includes("Node.js")||navigator.userAgent.includes("jsdom")),Jo}const Lr=typeof document<"u"&&typeof window<"u",lu=new WeakSet;function su(e){lu.add(e)}function cu(e){const t=o.ref(!!e.value);if(t.value)return o.readonly(t);const n=o.watch(e,r=>{r&&(t.value=!0,n())});return o.readonly(t)}function Je(e){const t=o.computed(e),n=o.ref(t.value);return o.watch(t,r=>{n.value=r}),typeof e=="function"?n:{__v_isRef:!0,get value(){return n.value},set value(r){e.set(r)}}}const du=typeof window<"u";let Nn,ir;(()=>{var e,t;Nn=du?(t=(e=document)===null||e===void 0?void 0:e.fonts)===null||t===void 0?void 0:t.ready:void 0,ir=!1,Nn!==void 0?Nn.then(()=>{ir=!0}):ir=!0})();function Ga(e){if(ir)return;let t=!1;o.onMounted(()=>{ir||Nn==null||Nn.then(()=>{t||e()})}),o.onBeforeUnmount(()=>{t=!0})}function Hr(e){return e.composedPath()[0]}const uu={mousemoveoutside:new WeakMap,clickoutside:new WeakMap};function fu(e,t,n){if(e==="mousemoveoutside"){const r=i=>{t.contains(Hr(i))||n(i)};return{mousemove:r,touchstart:r}}else if(e==="clickoutside"){let r=!1;const i=l=>{r=!t.contains(Hr(l))},a=l=>{r&&(t.contains(Hr(l))||n(l))};return{mousedown:i,mouseup:a,touchstart:i,touchend:a}}return console.error(`[evtd/create-trap-handler]: name \`${e}\` is invalid. This could be a bug of evtd.`),{}}function qa(e,t,n){const r=uu[e];let i=r.get(t);i===void 0&&r.set(t,i=new WeakMap);let a=i.get(n);return a===void 0&&i.set(n,a=fu(e,t,n)),a}function hu(e,t,n,r){if(e==="mousemoveoutside"||e==="clickoutside"){const i=qa(e,t,n);return Object.keys(i).forEach(a=>{ze(a,document,i[a],r)}),!0}return!1}function pu(e,t,n,r){if(e==="mousemoveoutside"||e==="clickoutside"){const i=qa(e,t,n);return Object.keys(i).forEach(a=>{ke(a,document,i[a],r)}),!0}return!1}function bu(){if(typeof window>"u")return{on:()=>{},off:()=>{}};const e=new WeakMap,t=new WeakMap;function n(){e.set(this,!0)}function r(){e.set(this,!0),t.set(this,!0)}function i(m,S,M){const N=m[S];return m[S]=function(){return M.apply(m,arguments),N.apply(m,arguments)},m}function a(m,S){m[S]=Event.prototype[S]}const l=new WeakMap,s=Object.getOwnPropertyDescriptor(Event.prototype,"currentTarget");function c(){var m;return(m=l.get(this))!==null&&m!==void 0?m:null}function d(m,S){s!==void 0&&Object.defineProperty(m,"currentTarget",{configurable:!0,enumerable:!0,get:S??s.get})}const u={bubble:{},capture:{}},f={};function p(){const m=function(S){const{type:M,eventPhase:N,bubbles:A}=S,L=Hr(S);if(N===2)return;const U=N===1?"capture":"bubble";let J=L;const j=[];for(;J===null&&(J=window),j.push(J),J!==window;)J=J.parentNode||null;const Q=u.capture[M],Y=u.bubble[M];if(i(S,"stopPropagation",n),i(S,"stopImmediatePropagation",r),d(S,c),U==="capture"){if(Q===void 0)return;for(let ie=j.length-1;ie>=0&&!e.has(S);--ie){const me=j[ie],ae=Q.get(me);if(ae!==void 0){l.set(S,me);for(const he of ae){if(t.has(S))break;he(S)}}if(ie===0&&!A&&Y!==void 0){const he=Y.get(me);if(he!==void 0)for(const G of he){if(t.has(S))break;G(S)}}}}else if(U==="bubble"){if(Y===void 0)return;for(let ie=0;ie<j.length&&!e.has(S);++ie){const me=j[ie],ae=Y.get(me);if(ae!==void 0){l.set(S,me);for(const he of ae){if(t.has(S))break;he(S)}}}}a(S,"stopPropagation"),a(S,"stopImmediatePropagation"),d(S)};return m.displayName="evtdUnifiedHandler",m}function b(){const m=function(S){const{type:M,eventPhase:N}=S;if(N!==2)return;const A=f[M];A!==void 0&&A.forEach(L=>L(S))};return m.displayName="evtdUnifiedWindowEventHandler",m}const h=p(),x=b();function v(m,S){const M=u[m];return M[S]===void 0&&(M[S]=new Map,window.addEventListener(S,h,m==="capture")),M[S]}function g(m){return f[m]===void 0&&(f[m]=new Set,window.addEventListener(m,x)),f[m]}function k(m,S){let M=m.get(S);return M===void 0&&m.set(S,M=new Set),M}function z(m,S,M,N){const A=u[S][M];if(A!==void 0){const L=A.get(m);if(L!==void 0&&L.has(N))return!0}return!1}function $(m,S){const M=f[m];return!!(M!==void 0&&M.has(S))}function T(m,S,M,N){let A;if(typeof N=="object"&&N.once===!0?A=Q=>{O(m,S,A,N),M(Q)}:A=M,hu(m,S,A,N))return;const U=N===!0||typeof N=="object"&&N.capture===!0?"capture":"bubble",J=v(U,m),j=k(J,S);if(j.has(A)||j.add(A),S===window){const Q=g(m);Q.has(A)||Q.add(A)}}function O(m,S,M,N){if(pu(m,S,M,N))return;const L=N===!0||typeof N=="object"&&N.capture===!0,U=L?"capture":"bubble",J=v(U,m),j=k(J,S);if(S===window&&!z(S,L?"bubble":"capture",m,M)&&$(m,M)){const Y=f[m];Y.delete(M),Y.size===0&&(window.removeEventListener(m,x),f[m]=void 0)}j.has(M)&&j.delete(M),j.size===0&&J.delete(S),J.size===0&&(window.removeEventListener(m,h,U==="capture"),u[U][m]=void 0)}return{on:T,off:O}}const{on:ze,off:ke}=bu();function St(e,t){return o.watch(e,n=>{n!==void 0&&(t.value=n)}),o.computed(()=>e.value===void 0?t.value:e.value)}function Ln(){const e=o.ref(!1);return o.onMounted(()=>{e.value=!0}),o.readonly(e)}function Vr(e,t){return o.computed(()=>{for(const n of t)if(e[n]!==void 0)return e[n];return e[t[t.length-1]]})}const mu=(typeof window>"u"?!1:/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1)&&!window.MSStream;function gu(){return mu}const Qo="n-internal-select-menu",Ka="n-internal-select-menu-body",Xa="n-modal-body",Ya="n-drawer-body",Za="n-popover-body",Ja="__disabled__";function lt(e){const t=o.inject(Xa,null),n=o.inject(Ya,null),r=o.inject(Za,null),i=o.inject(Ka,null),a=o.ref();if(typeof document<"u"){a.value=document.fullscreenElement;const l=()=>{a.value=document.fullscreenElement};o.onMounted(()=>{ze("fullscreenchange",document,l)}),o.onBeforeUnmount(()=>{ke("fullscreenchange",document,l)})}return Je(()=>{var l;const{to:s}=e;return s!==void 0?s===!1?Ja:s===!0?a.value||"body":s:t!=null&&t.value?(l=t.value.$el)!==null&&l!==void 0?l:t.value:n!=null&&n.value?n.value:r!=null&&r.value?r.value:i!=null&&i.value?i.value:s??(a.value||"body")})}lt.tdkey=Ja,lt.propTo={type:[String,Object,Boolean],default:void 0};function ei(e,t,n="default"){const r=t[n];if(r===void 0)throw new Error(`[vueuc/${e}]: slot[${n}] is empty.`);return r()}function ti(e,t=!0,n=[]){return e.forEach(r=>{if(r!==null){if(typeof r!="object"){(typeof r=="string"||typeof r=="number")&&n.push(o.createTextVNode(String(r)));return}if(Array.isArray(r)){ti(r,t,n);return}if(r.type===o.Fragment){if(r.children===null)return;Array.isArray(r.children)&&ti(r.children,t,n)}else r.type!==o.Comment&&n.push(r)}}),n}function Qa(e,t,n="default"){const r=t[n];if(r===void 0)throw new Error(`[vueuc/${e}]: slot[${n}] is empty.`);const i=ti(r());if(i.length===1)return i[0];throw new Error(`[vueuc/${e}]: slot[${n}] should have exactly one child.`)}let Xt=null;function el(){if(Xt===null&&(Xt=document.getElementById("v-binder-view-measurer"),Xt===null)){Xt=document.createElement("div"),Xt.id="v-binder-view-measurer";const{style:e}=Xt;e.position="fixed",e.left="0",e.right="0",e.top="0",e.bottom="0",e.pointerEvents="none",e.visibility="hidden",document.body.appendChild(Xt)}return Xt.getBoundingClientRect()}function vu(e,t){const n=el();return{top:t,left:e,height:0,width:0,right:n.width-e,bottom:n.height-t}}function ni(e){const t=e.getBoundingClientRect(),n=el();return{left:t.left-n.left,top:t.top-n.top,bottom:n.height+n.top-t.bottom,right:n.width+n.left-t.right,width:t.width,height:t.height}}function xu(e){return e.nodeType===9?null:e.parentNode}function tl(e){if(e===null)return null;const t=xu(e);if(t===null)return null;if(t.nodeType===9)return document;if(t.nodeType===1){const{overflow:n,overflowX:r,overflowY:i}=getComputedStyle(t);if(/(auto|scroll|overlay)/.test(n+i+r))return t}return tl(t)}const jr=o.defineComponent({name:"Binder",props:{syncTargetWithParent:Boolean,syncTarget:{type:Boolean,default:!0}},setup(e){var t;o.provide("VBinder",(t=o.getCurrentInstance())===null||t===void 0?void 0:t.proxy);const n=o.inject("VBinder",null),r=o.ref(null),i=g=>{r.value=g,n&&e.syncTargetWithParent&&n.setTargetRef(g)};let a=[];const l=()=>{let g=r.value;for(;g=tl(g),g!==null;)a.push(g);for(const k of a)ze("scroll",k,f,!0)},s=()=>{for(const g of a)ke("scroll",g,f,!0);a=[]},c=new Set,d=g=>{c.size===0&&l(),c.has(g)||c.add(g)},u=g=>{c.has(g)&&c.delete(g),c.size===0&&s()},f=()=>{za(p)},p=()=>{c.forEach(g=>g())},b=new Set,h=g=>{b.size===0&&ze("resize",window,v),b.has(g)||b.add(g)},x=g=>{b.has(g)&&b.delete(g),b.size===0&&ke("resize",window,v)},v=()=>{b.forEach(g=>g())};return o.onBeforeUnmount(()=>{ke("resize",window,v),s()}),{targetRef:r,setTargetRef:i,addScrollListener:d,removeScrollListener:u,addResizeListener:h,removeResizeListener:x}},render(){return ei("binder",this.$slots)}}),Wr=o.defineComponent({name:"Target",setup(){const{setTargetRef:e,syncTarget:t}=o.inject("VBinder");return{syncTarget:t,setTargetDirective:{mounted:e,updated:e}}},render(){const{syncTarget:e,setTargetDirective:t}=this;return e?o.withDirectives(Qa("follower",this.$slots),[[t]]):Qa("follower",this.$slots)}}),Hn="@@mmoContext",nl={mounted(e,{value:t}){e[Hn]={handler:void 0},typeof t=="function"&&(e[Hn].handler=t,ze("mousemoveoutside",e,t))},updated(e,{value:t}){const n=e[Hn];typeof t=="function"?n.handler?n.handler!==t&&(ke("mousemoveoutside",e,n.handler),n.handler=t,ze("mousemoveoutside",e,t)):(e[Hn].handler=t,ze("mousemoveoutside",e,t)):n.handler&&(ke("mousemoveoutside",e,n.handler),n.handler=void 0)},unmounted(e){const{handler:t}=e[Hn];t&&ke("mousemoveoutside",e,t),e[Hn].handler=void 0}},Vn="@@coContext",ar={mounted(e,{value:t,modifiers:n}){e[Vn]={handler:void 0},typeof t=="function"&&(e[Vn].handler=t,ze("clickoutside",e,t,{capture:n.capture}))},updated(e,{value:t,modifiers:n}){const r=e[Vn];typeof t=="function"?r.handler?r.handler!==t&&(ke("clickoutside",e,r.handler,{capture:n.capture}),r.handler=t,ze("clickoutside",e,t,{capture:n.capture})):(e[Vn].handler=t,ze("clickoutside",e,t,{capture:n.capture})):r.handler&&(ke("clickoutside",e,r.handler,{capture:n.capture}),r.handler=void 0)},unmounted(e,{modifiers:t}){const{handler:n}=e[Vn];n&&ke("clickoutside",e,n,{capture:t.capture}),e[Vn].handler=void 0}};function yu(e,t){console.error(`[vdirs/${e}]: ${t}`)}class wu{constructor(){this.elementZIndex=new Map,this.nextZIndex=2e3}get elementCount(){return this.elementZIndex.size}ensureZIndex(t,n){const{elementZIndex:r}=this;if(n!==void 0){t.style.zIndex=`${n}`,r.delete(t);return}const{nextZIndex:i}=this;r.has(t)&&r.get(t)+1===this.nextZIndex||(t.style.zIndex=`${i}`,r.set(t,i),this.nextZIndex=i+1,this.squashState())}unregister(t,n){const{elementZIndex:r}=this;r.has(t)?r.delete(t):n===void 0&&yu("z-index-manager/unregister-element","Element not found when unregistering."),this.squashState()}squashState(){const{elementCount:t}=this;t||(this.nextZIndex=2e3),this.nextZIndex-t>2500&&this.rearrange()}rearrange(){const t=Array.from(this.elementZIndex.entries());t.sort((n,r)=>n[1]-r[1]),this.nextZIndex=2e3,t.forEach(n=>{const r=n[0],i=this.nextZIndex++;`${i}`!==r.style.zIndex&&(r.style.zIndex=`${i}`)})}}const ri=new wu,jn="@@ziContext",rl={mounted(e,t){const{value:n={}}=t,{zIndex:r,enabled:i}=n;e[jn]={enabled:!!i,initialized:!1},i&&(ri.ensureZIndex(e,r),e[jn].initialized=!0)},updated(e,t){const{value:n={}}=t,{zIndex:r,enabled:i}=n,a=e[jn].enabled;i&&!a&&(ri.ensureZIndex(e,r),e[jn].initialized=!0),e[jn].enabled=!!i},unmounted(e,t){if(!e[jn].initialized)return;const{value:n={}}=t,{zIndex:r}=n;ri.unregister(e,r)}},Cu="@css-render/vue3-ssr";function Su(e,t){return`<style cssr-id="${e}">
|
|
13
|
+
`)}function Zo(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}typeof window<"u"&&(window.__cssrContext={});function Kd(e,t,n,r){const{els:i}=t;if(n===void 0)i.forEach(Na),t.els=[];else{const a=Ir(n,r);a&&i.includes(a)&&(Na(a),t.els=i.filter(l=>l!==a))}}function ja(e,t){e.push(t)}function Xd(e,t,n,r,i,a,l,s,c){let d;if(n===void 0&&(d=t.render(r),n=Zo(d)),c){c.adapter(n,d??t.render(r));return}s===void 0&&(s=document.head);const u=Ir(n,s);if(u!==null&&!a)return u;const f=u??jd(n);if(d===void 0&&(d=t.render(r)),f.textContent=d,u!==null)return u;if(l){const p=s.querySelector(`meta[name="${l}"]`);if(p)return s.insertBefore(f,p),ja(t.els,f),f}return i?s.insertBefore(f,s.querySelector("style, link")):s.appendChild(f),ja(t.els,f),f}function Yd(e){return qd(this,this.instance,e)}function Zd(e={}){const{id:t,ssr:n,props:r,head:i=!1,force:a=!1,anchorMetaName:l,parent:s}=e;return Xd(this.instance,this,t,r,i,a,l,s,n)}function Jd(e={}){const{id:t,parent:n}=e;Kd(this.instance,this,t,n)}const Dr=function(e,t,n,r){return{instance:e,$:t,props:n,children:r,els:[],render:Yd,mount:Zd,unmount:Jd}},Qd=function(e,t,n,r){return Array.isArray(t)?Dr(e,{$:null},null,t):Array.isArray(n)?Dr(e,t,null,n):Array.isArray(r)?Dr(e,t,n,r):Dr(e,t,n,null)};function Wa(e={}){const t={c:(...n)=>Qd(t,...n),use:(n,...r)=>n.install(t,...r),find:Ir,context:{},config:e};return t}function eu(e,t){if(e===void 0)return!1;if(t){const{context:{ids:n}}=t;return n.has(e)}return Ir(e)!==null}function tu(e){let t=".",n="__",r="--",i;if(e){let h=e.blockPrefix;h&&(t=h),h=e.elementPrefix,h&&(n=h),h=e.modifierPrefix,h&&(r=h)}const a={install(h){i=h.c;const x=h.context;x.bem={},x.bem.b=null,x.bem.els=null}};function l(h){let x,v;return{before(g){x=g.bem.b,v=g.bem.els,g.bem.els=null},after(g){g.bem.b=x,g.bem.els=v},$({context:g,props:k}){return h=typeof h=="string"?h:h({context:g,props:k}),g.bem.b=h,`${(k==null?void 0:k.bPrefix)||t}${g.bem.b}`}}}function s(h){let x;return{before(v){x=v.bem.els},after(v){v.bem.els=x},$({context:v,props:g}){return h=typeof h=="string"?h:h({context:v,props:g}),v.bem.els=h.split(",").map(k=>k.trim()),v.bem.els.map(k=>`${(g==null?void 0:g.bPrefix)||t}${v.bem.b}${n}${k}`).join(", ")}}}function c(h){return{$({context:x,props:v}){h=typeof h=="string"?h:h({context:x,props:v});const g=h.split(",").map($=>$.trim());function k($){return g.map(T=>`&${(v==null?void 0:v.bPrefix)||t}${x.bem.b}${$!==void 0?`${n}${$}`:""}${r}${T}`).join(", ")}const z=x.bem.els;if(z!==null){if(process.env.NODE_ENV!=="production"&&z.length>=2)throw Error(`[css-render/plugin-bem]: m(${h}) is invalid, using modifier inside multiple elements is not allowed`);return k(z[0])}else return k()}}}function d(h){return{$({context:x,props:v}){h=typeof h=="string"?h:h({context:x,props:v});const g=x.bem.els;if(process.env.NODE_ENV!=="production"&&g!==null&&g.length>=2)throw Error(`[css-render/plugin-bem]: notM(${h}) is invalid, using modifier inside multiple elements is not allowed`);return`&:not(${(v==null?void 0:v.bPrefix)||t}${x.bem.b}${g!==null&&g.length>0?`${n}${g[0]}`:""}${r}${h})`}}}return Object.assign(a,{cB:(...h)=>i(l(h[0]),h[1],h[2]),cE:(...h)=>i(s(h[0]),h[1],h[2]),cM:(...h)=>i(c(h[0]),h[1],h[2]),cNotM:(...h)=>i(d(h[0]),h[1],h[2])}),a}const Nr=".n-",nu="__",ru="--",Ua=Wa(),Ga=tu({blockPrefix:Nr,elementPrefix:nu,modifierPrefix:ru});Ua.use(Ga);const{c:I,find:cC}=Ua,{cB:w,cE:P,cM:W,cNotM:Ge}=Ga;function ou(e){return I(({props:{bPrefix:t}})=>`${t||Nr}modal, ${t||Nr}drawer`,[e])}function iu(e){return I(({props:{bPrefix:t}})=>`${t||Nr}popover`,[e])}const au=(...e)=>I(">",[w(...e)]);function ee(e,t){return e+(t==="default"?"":t.replace(/^[a-z]/,n=>n.toUpperCase()))}let Jo;function lu(){return Jo===void 0&&(Jo=navigator.userAgent.includes("Node.js")||navigator.userAgent.includes("jsdom")),Jo}const Lr=typeof document<"u"&&typeof window<"u",su=new WeakSet;function cu(e){su.add(e)}function du(e){const t=o.ref(!!e.value);if(t.value)return o.readonly(t);const n=o.watch(e,r=>{r&&(t.value=!0,n())});return o.readonly(t)}function Je(e){const t=o.computed(e),n=o.ref(t.value);return o.watch(t,r=>{n.value=r}),typeof e=="function"?n:{__v_isRef:!0,get value(){return n.value},set value(r){e.set(r)}}}const uu=typeof window<"u";let Nn,ir;(()=>{var e,t;Nn=uu?(t=(e=document)===null||e===void 0?void 0:e.fonts)===null||t===void 0?void 0:t.ready:void 0,ir=!1,Nn!==void 0?Nn.then(()=>{ir=!0}):ir=!0})();function qa(e){if(ir)return;let t=!1;o.onMounted(()=>{ir||Nn==null||Nn.then(()=>{t||e()})}),o.onBeforeUnmount(()=>{t=!0})}function Hr(e){return e.composedPath()[0]}const fu={mousemoveoutside:new WeakMap,clickoutside:new WeakMap};function hu(e,t,n){if(e==="mousemoveoutside"){const r=i=>{t.contains(Hr(i))||n(i)};return{mousemove:r,touchstart:r}}else if(e==="clickoutside"){let r=!1;const i=l=>{r=!t.contains(Hr(l))},a=l=>{r&&(t.contains(Hr(l))||n(l))};return{mousedown:i,mouseup:a,touchstart:i,touchend:a}}return console.error(`[evtd/create-trap-handler]: name \`${e}\` is invalid. This could be a bug of evtd.`),{}}function Ka(e,t,n){const r=fu[e];let i=r.get(t);i===void 0&&r.set(t,i=new WeakMap);let a=i.get(n);return a===void 0&&i.set(n,a=hu(e,t,n)),a}function pu(e,t,n,r){if(e==="mousemoveoutside"||e==="clickoutside"){const i=Ka(e,t,n);return Object.keys(i).forEach(a=>{ze(a,document,i[a],r)}),!0}return!1}function bu(e,t,n,r){if(e==="mousemoveoutside"||e==="clickoutside"){const i=Ka(e,t,n);return Object.keys(i).forEach(a=>{ke(a,document,i[a],r)}),!0}return!1}function mu(){if(typeof window>"u")return{on:()=>{},off:()=>{}};const e=new WeakMap,t=new WeakMap;function n(){e.set(this,!0)}function r(){e.set(this,!0),t.set(this,!0)}function i(m,S,M){const N=m[S];return m[S]=function(){return M.apply(m,arguments),N.apply(m,arguments)},m}function a(m,S){m[S]=Event.prototype[S]}const l=new WeakMap,s=Object.getOwnPropertyDescriptor(Event.prototype,"currentTarget");function c(){var m;return(m=l.get(this))!==null&&m!==void 0?m:null}function d(m,S){s!==void 0&&Object.defineProperty(m,"currentTarget",{configurable:!0,enumerable:!0,get:S??s.get})}const u={bubble:{},capture:{}},f={};function p(){const m=function(S){const{type:M,eventPhase:N,bubbles:A}=S,L=Hr(S);if(N===2)return;const U=N===1?"capture":"bubble";let J=L;const j=[];for(;J===null&&(J=window),j.push(J),J!==window;)J=J.parentNode||null;const Q=u.capture[M],Y=u.bubble[M];if(i(S,"stopPropagation",n),i(S,"stopImmediatePropagation",r),d(S,c),U==="capture"){if(Q===void 0)return;for(let ie=j.length-1;ie>=0&&!e.has(S);--ie){const me=j[ie],ae=Q.get(me);if(ae!==void 0){l.set(S,me);for(const he of ae){if(t.has(S))break;he(S)}}if(ie===0&&!A&&Y!==void 0){const he=Y.get(me);if(he!==void 0)for(const G of he){if(t.has(S))break;G(S)}}}}else if(U==="bubble"){if(Y===void 0)return;for(let ie=0;ie<j.length&&!e.has(S);++ie){const me=j[ie],ae=Y.get(me);if(ae!==void 0){l.set(S,me);for(const he of ae){if(t.has(S))break;he(S)}}}}a(S,"stopPropagation"),a(S,"stopImmediatePropagation"),d(S)};return m.displayName="evtdUnifiedHandler",m}function b(){const m=function(S){const{type:M,eventPhase:N}=S;if(N!==2)return;const A=f[M];A!==void 0&&A.forEach(L=>L(S))};return m.displayName="evtdUnifiedWindowEventHandler",m}const h=p(),x=b();function v(m,S){const M=u[m];return M[S]===void 0&&(M[S]=new Map,window.addEventListener(S,h,m==="capture")),M[S]}function g(m){return f[m]===void 0&&(f[m]=new Set,window.addEventListener(m,x)),f[m]}function k(m,S){let M=m.get(S);return M===void 0&&m.set(S,M=new Set),M}function z(m,S,M,N){const A=u[S][M];if(A!==void 0){const L=A.get(m);if(L!==void 0&&L.has(N))return!0}return!1}function $(m,S){const M=f[m];return!!(M!==void 0&&M.has(S))}function T(m,S,M,N){let A;if(typeof N=="object"&&N.once===!0?A=Q=>{O(m,S,A,N),M(Q)}:A=M,pu(m,S,A,N))return;const U=N===!0||typeof N=="object"&&N.capture===!0?"capture":"bubble",J=v(U,m),j=k(J,S);if(j.has(A)||j.add(A),S===window){const Q=g(m);Q.has(A)||Q.add(A)}}function O(m,S,M,N){if(bu(m,S,M,N))return;const L=N===!0||typeof N=="object"&&N.capture===!0,U=L?"capture":"bubble",J=v(U,m),j=k(J,S);if(S===window&&!z(S,L?"bubble":"capture",m,M)&&$(m,M)){const Y=f[m];Y.delete(M),Y.size===0&&(window.removeEventListener(m,x),f[m]=void 0)}j.has(M)&&j.delete(M),j.size===0&&J.delete(S),J.size===0&&(window.removeEventListener(m,h,U==="capture"),u[U][m]=void 0)}return{on:T,off:O}}const{on:ze,off:ke}=mu();function St(e,t){return o.watch(e,n=>{n!==void 0&&(t.value=n)}),o.computed(()=>e.value===void 0?t.value:e.value)}function Ln(){const e=o.ref(!1);return o.onMounted(()=>{e.value=!0}),o.readonly(e)}function Vr(e,t){return o.computed(()=>{for(const n of t)if(e[n]!==void 0)return e[n];return e[t[t.length-1]]})}const gu=(typeof window>"u"?!1:/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1)&&!window.MSStream;function vu(){return gu}const Qo="n-internal-select-menu",Xa="n-internal-select-menu-body",Ya="n-modal-body",Za="n-drawer-body",Ja="n-popover-body",Qa="__disabled__";function lt(e){const t=o.inject(Ya,null),n=o.inject(Za,null),r=o.inject(Ja,null),i=o.inject(Xa,null),a=o.ref();if(typeof document<"u"){a.value=document.fullscreenElement;const l=()=>{a.value=document.fullscreenElement};o.onMounted(()=>{ze("fullscreenchange",document,l)}),o.onBeforeUnmount(()=>{ke("fullscreenchange",document,l)})}return Je(()=>{var l;const{to:s}=e;return s!==void 0?s===!1?Qa:s===!0?a.value||"body":s:t!=null&&t.value?(l=t.value.$el)!==null&&l!==void 0?l:t.value:n!=null&&n.value?n.value:r!=null&&r.value?r.value:i!=null&&i.value?i.value:s??(a.value||"body")})}lt.tdkey=Qa,lt.propTo={type:[String,Object,Boolean],default:void 0};function ei(e,t,n="default"){const r=t[n];if(r===void 0)throw new Error(`[vueuc/${e}]: slot[${n}] is empty.`);return r()}function ti(e,t=!0,n=[]){return e.forEach(r=>{if(r!==null){if(typeof r!="object"){(typeof r=="string"||typeof r=="number")&&n.push(o.createTextVNode(String(r)));return}if(Array.isArray(r)){ti(r,t,n);return}if(r.type===o.Fragment){if(r.children===null)return;Array.isArray(r.children)&&ti(r.children,t,n)}else r.type!==o.Comment&&n.push(r)}}),n}function el(e,t,n="default"){const r=t[n];if(r===void 0)throw new Error(`[vueuc/${e}]: slot[${n}] is empty.`);const i=ti(r());if(i.length===1)return i[0];throw new Error(`[vueuc/${e}]: slot[${n}] should have exactly one child.`)}let Xt=null;function tl(){if(Xt===null&&(Xt=document.getElementById("v-binder-view-measurer"),Xt===null)){Xt=document.createElement("div"),Xt.id="v-binder-view-measurer";const{style:e}=Xt;e.position="fixed",e.left="0",e.right="0",e.top="0",e.bottom="0",e.pointerEvents="none",e.visibility="hidden",document.body.appendChild(Xt)}return Xt.getBoundingClientRect()}function xu(e,t){const n=tl();return{top:t,left:e,height:0,width:0,right:n.width-e,bottom:n.height-t}}function ni(e){const t=e.getBoundingClientRect(),n=tl();return{left:t.left-n.left,top:t.top-n.top,bottom:n.height+n.top-t.bottom,right:n.width+n.left-t.right,width:t.width,height:t.height}}function yu(e){return e.nodeType===9?null:e.parentNode}function nl(e){if(e===null)return null;const t=yu(e);if(t===null)return null;if(t.nodeType===9)return document;if(t.nodeType===1){const{overflow:n,overflowX:r,overflowY:i}=getComputedStyle(t);if(/(auto|scroll|overlay)/.test(n+i+r))return t}return nl(t)}const jr=o.defineComponent({name:"Binder",props:{syncTargetWithParent:Boolean,syncTarget:{type:Boolean,default:!0}},setup(e){var t;o.provide("VBinder",(t=o.getCurrentInstance())===null||t===void 0?void 0:t.proxy);const n=o.inject("VBinder",null),r=o.ref(null),i=g=>{r.value=g,n&&e.syncTargetWithParent&&n.setTargetRef(g)};let a=[];const l=()=>{let g=r.value;for(;g=nl(g),g!==null;)a.push(g);for(const k of a)ze("scroll",k,f,!0)},s=()=>{for(const g of a)ke("scroll",g,f,!0);a=[]},c=new Set,d=g=>{c.size===0&&l(),c.has(g)||c.add(g)},u=g=>{c.has(g)&&c.delete(g),c.size===0&&s()},f=()=>{Ba(p)},p=()=>{c.forEach(g=>g())},b=new Set,h=g=>{b.size===0&&ze("resize",window,v),b.has(g)||b.add(g)},x=g=>{b.has(g)&&b.delete(g),b.size===0&&ke("resize",window,v)},v=()=>{b.forEach(g=>g())};return o.onBeforeUnmount(()=>{ke("resize",window,v),s()}),{targetRef:r,setTargetRef:i,addScrollListener:d,removeScrollListener:u,addResizeListener:h,removeResizeListener:x}},render(){return ei("binder",this.$slots)}}),Wr=o.defineComponent({name:"Target",setup(){const{setTargetRef:e,syncTarget:t}=o.inject("VBinder");return{syncTarget:t,setTargetDirective:{mounted:e,updated:e}}},render(){const{syncTarget:e,setTargetDirective:t}=this;return e?o.withDirectives(el("follower",this.$slots),[[t]]):el("follower",this.$slots)}}),Hn="@@mmoContext",rl={mounted(e,{value:t}){e[Hn]={handler:void 0},typeof t=="function"&&(e[Hn].handler=t,ze("mousemoveoutside",e,t))},updated(e,{value:t}){const n=e[Hn];typeof t=="function"?n.handler?n.handler!==t&&(ke("mousemoveoutside",e,n.handler),n.handler=t,ze("mousemoveoutside",e,t)):(e[Hn].handler=t,ze("mousemoveoutside",e,t)):n.handler&&(ke("mousemoveoutside",e,n.handler),n.handler=void 0)},unmounted(e){const{handler:t}=e[Hn];t&&ke("mousemoveoutside",e,t),e[Hn].handler=void 0}},Vn="@@coContext",ar={mounted(e,{value:t,modifiers:n}){e[Vn]={handler:void 0},typeof t=="function"&&(e[Vn].handler=t,ze("clickoutside",e,t,{capture:n.capture}))},updated(e,{value:t,modifiers:n}){const r=e[Vn];typeof t=="function"?r.handler?r.handler!==t&&(ke("clickoutside",e,r.handler,{capture:n.capture}),r.handler=t,ze("clickoutside",e,t,{capture:n.capture})):(e[Vn].handler=t,ze("clickoutside",e,t,{capture:n.capture})):r.handler&&(ke("clickoutside",e,r.handler,{capture:n.capture}),r.handler=void 0)},unmounted(e,{modifiers:t}){const{handler:n}=e[Vn];n&&ke("clickoutside",e,n,{capture:t.capture}),e[Vn].handler=void 0}};function wu(e,t){console.error(`[vdirs/${e}]: ${t}`)}class Cu{constructor(){this.elementZIndex=new Map,this.nextZIndex=2e3}get elementCount(){return this.elementZIndex.size}ensureZIndex(t,n){const{elementZIndex:r}=this;if(n!==void 0){t.style.zIndex=`${n}`,r.delete(t);return}const{nextZIndex:i}=this;r.has(t)&&r.get(t)+1===this.nextZIndex||(t.style.zIndex=`${i}`,r.set(t,i),this.nextZIndex=i+1,this.squashState())}unregister(t,n){const{elementZIndex:r}=this;r.has(t)?r.delete(t):n===void 0&&wu("z-index-manager/unregister-element","Element not found when unregistering."),this.squashState()}squashState(){const{elementCount:t}=this;t||(this.nextZIndex=2e3),this.nextZIndex-t>2500&&this.rearrange()}rearrange(){const t=Array.from(this.elementZIndex.entries());t.sort((n,r)=>n[1]-r[1]),this.nextZIndex=2e3,t.forEach(n=>{const r=n[0],i=this.nextZIndex++;`${i}`!==r.style.zIndex&&(r.style.zIndex=`${i}`)})}}const ri=new Cu,jn="@@ziContext",ol={mounted(e,t){const{value:n={}}=t,{zIndex:r,enabled:i}=n;e[jn]={enabled:!!i,initialized:!1},i&&(ri.ensureZIndex(e,r),e[jn].initialized=!0)},updated(e,t){const{value:n={}}=t,{zIndex:r,enabled:i}=n,a=e[jn].enabled;i&&!a&&(ri.ensureZIndex(e,r),e[jn].initialized=!0),e[jn].enabled=!!i},unmounted(e,t){if(!e[jn].initialized)return;const{value:n={}}=t,{zIndex:r}=n;ri.unregister(e,r)}},Su="@css-render/vue3-ssr";function $u(e,t){return`<style cssr-id="${e}">
|
|
14
14
|
${t}
|
|
15
|
-
</style>`}function $u(e,t,n){const{styles:r,ids:i}=n;i.has(e)||r!==null&&(i.add(e),r.push(Su(e,t)))}const Tu=typeof document<"u";function Yt(){if(Tu)return;const e=o.inject(Cu,null);if(e!==null)return{adapter:(t,n)=>$u(t,n,e),context:e}}function ol(e,t){console.error(`[vueuc/${e}]: ${t}`)}const{c:_t}=ja(),Ur="vueuc-style";function il(e){return e&-e}class ku{constructor(t,n){this.l=t,this.min=n;const r=new Array(t+1);for(let i=0;i<t+1;++i)r[i]=0;this.ft=r}add(t,n){if(n===0)return;const{l:r,ft:i}=this;for(t+=1;t<=r;)i[t]+=n,t+=il(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:r,l:i}=this;if(t>i)throw new Error("[FinweckTree.sum]: `i` is larger than length.");let a=t*r;for(;t>0;)a+=n[t],t-=il(t);return a}getBound(t){let n=0,r=this.l;for(;r>n;){const i=Math.floor((n+r)/2),a=this.sum(i);if(a>t){r=i;continue}else if(a<t){if(n===i)return this.sum(n+1)<=t?n+1:i;n=i}else return i}return n}}function al(e){return typeof e=="string"?document.querySelector(e):e()}const Ru=o.defineComponent({name:"LazyTeleport",props:{to:{type:[String,Object],default:void 0},disabled:Boolean,show:{type:Boolean,required:!0}},setup(e){return{showTeleport:cu(o.toRef(e,"show")),mergedTo:o.computed(()=>{const{to:t}=e;return t??"body"})}},render(){return this.showTeleport?this.disabled?ei("lazy-teleport",this.$slots):o.h(o.Teleport,{disabled:this.disabled,to:this.mergedTo},ei("lazy-teleport",this.$slots)):null}}),Gr={top:"bottom",bottom:"top",left:"right",right:"left"},ll={start:"end",center:"center",end:"start"},oi={top:"height",bottom:"height",left:"width",right:"width"},Pu={"bottom-start":"top left",bottom:"top center","bottom-end":"top right","top-start":"bottom left",top:"bottom center","top-end":"bottom right","right-start":"top left",right:"center left","right-end":"bottom left","left-start":"top right",left:"center right","left-end":"bottom right"},Eu={"bottom-start":"bottom left",bottom:"bottom center","bottom-end":"bottom right","top-start":"top left",top:"top center","top-end":"top right","right-start":"top right",right:"center right","right-end":"bottom right","left-start":"top left",left:"center left","left-end":"bottom left"},zu={"bottom-start":"right","bottom-end":"left","top-start":"right","top-end":"left","right-start":"bottom","right-end":"top","left-start":"bottom","left-end":"top"},sl={top:!0,bottom:!1,left:!0,right:!1},cl={top:"end",bottom:"start",left:"end",right:"start"};function Bu(e,t,n,r,i,a){if(!i||a)return{placement:e,top:0,left:0};const[l,s]=e.split("-");let c=s??"center",d={top:0,left:0};const u=(b,h,x)=>{let v=0,g=0;const k=n[b]-t[h]-t[b];return k>0&&r&&(x?g=sl[h]?k:-k:v=sl[h]?k:-k),{left:v,top:g}},f=l==="left"||l==="right";if(c!=="center"){const b=zu[e],h=Gr[b],x=oi[b];if(n[x]>t[x]){if(t[b]+t[x]<n[x]){const v=(n[x]-t[x])/2;t[b]<v||t[h]<v?t[b]<t[h]?(c=ll[s],d=u(x,h,f)):d=u(x,b,f):c="center"}}else n[x]<t[x]&&t[h]<0&&t[b]>t[h]&&(c=ll[s])}else{const b=l==="bottom"||l==="top"?"left":"top",h=Gr[b],x=oi[b],v=(n[x]-t[x])/2;(t[b]<v||t[h]<v)&&(t[b]>t[h]?(c=cl[b],d=u(x,b,f)):(c=cl[h],d=u(x,h,f)))}let p=l;return t[l]<n[oi[l]]&&t[l]<t[Gr[l]]&&(p=Gr[l]),{placement:c!=="center"?`${p}-${c}`:p,left:d.left,top:d.top}}function _u(e,t){return t?Eu[e]:Pu[e]}function Mu(e,t,n,r,i,a){if(a)switch(e){case"bottom-start":return{top:`${Math.round(n.top-t.top+n.height)}px`,left:`${Math.round(n.left-t.left)}px`,transform:"translateY(-100%)"};case"bottom-end":return{top:`${Math.round(n.top-t.top+n.height)}px`,left:`${Math.round(n.left-t.left+n.width)}px`,transform:"translateX(-100%) translateY(-100%)"};case"top-start":return{top:`${Math.round(n.top-t.top)}px`,left:`${Math.round(n.left-t.left)}px`,transform:""};case"top-end":return{top:`${Math.round(n.top-t.top)}px`,left:`${Math.round(n.left-t.left+n.width)}px`,transform:"translateX(-100%)"};case"right-start":return{top:`${Math.round(n.top-t.top)}px`,left:`${Math.round(n.left-t.left+n.width)}px`,transform:"translateX(-100%)"};case"right-end":return{top:`${Math.round(n.top-t.top+n.height)}px`,left:`${Math.round(n.left-t.left+n.width)}px`,transform:"translateX(-100%) translateY(-100%)"};case"left-start":return{top:`${Math.round(n.top-t.top)}px`,left:`${Math.round(n.left-t.left)}px`,transform:""};case"left-end":return{top:`${Math.round(n.top-t.top+n.height)}px`,left:`${Math.round(n.left-t.left)}px`,transform:"translateY(-100%)"};case"top":return{top:`${Math.round(n.top-t.top)}px`,left:`${Math.round(n.left-t.left+n.width/2)}px`,transform:"translateX(-50%)"};case"right":return{top:`${Math.round(n.top-t.top+n.height/2)}px`,left:`${Math.round(n.left-t.left+n.width)}px`,transform:"translateX(-100%) translateY(-50%)"};case"left":return{top:`${Math.round(n.top-t.top+n.height/2)}px`,left:`${Math.round(n.left-t.left)}px`,transform:"translateY(-50%)"};case"bottom":default:return{top:`${Math.round(n.top-t.top+n.height)}px`,left:`${Math.round(n.left-t.left+n.width/2)}px`,transform:"translateX(-50%) translateY(-100%)"}}switch(e){case"bottom-start":return{top:`${Math.round(n.top-t.top+n.height+r)}px`,left:`${Math.round(n.left-t.left+i)}px`,transform:""};case"bottom-end":return{top:`${Math.round(n.top-t.top+n.height+r)}px`,left:`${Math.round(n.left-t.left+n.width+i)}px`,transform:"translateX(-100%)"};case"top-start":return{top:`${Math.round(n.top-t.top+r)}px`,left:`${Math.round(n.left-t.left+i)}px`,transform:"translateY(-100%)"};case"top-end":return{top:`${Math.round(n.top-t.top+r)}px`,left:`${Math.round(n.left-t.left+n.width+i)}px`,transform:"translateX(-100%) translateY(-100%)"};case"right-start":return{top:`${Math.round(n.top-t.top+r)}px`,left:`${Math.round(n.left-t.left+n.width+i)}px`,transform:""};case"right-end":return{top:`${Math.round(n.top-t.top+n.height+r)}px`,left:`${Math.round(n.left-t.left+n.width+i)}px`,transform:"translateY(-100%)"};case"left-start":return{top:`${Math.round(n.top-t.top+r)}px`,left:`${Math.round(n.left-t.left+i)}px`,transform:"translateX(-100%)"};case"left-end":return{top:`${Math.round(n.top-t.top+n.height+r)}px`,left:`${Math.round(n.left-t.left+i)}px`,transform:"translateX(-100%) translateY(-100%)"};case"top":return{top:`${Math.round(n.top-t.top+r)}px`,left:`${Math.round(n.left-t.left+n.width/2+i)}px`,transform:"translateY(-100%) translateX(-50%)"};case"right":return{top:`${Math.round(n.top-t.top+n.height/2+r)}px`,left:`${Math.round(n.left-t.left+n.width+i)}px`,transform:"translateY(-50%)"};case"left":return{top:`${Math.round(n.top-t.top+n.height/2+r)}px`,left:`${Math.round(n.left-t.left+i)}px`,transform:"translateY(-50%) translateX(-100%)"};case"bottom":default:return{top:`${Math.round(n.top-t.top+n.height+r)}px`,left:`${Math.round(n.left-t.left+n.width/2+i)}px`,transform:"translateX(-50%)"}}}const Ou=_t([_t(".v-binder-follower-container",{position:"absolute",left:"0",right:"0",top:"0",height:"0",pointerEvents:"none",zIndex:"auto"}),_t(".v-binder-follower-content",{position:"absolute",zIndex:"auto"},[_t("> *",{pointerEvents:"all"})])]),qr=o.defineComponent({name:"Follower",inheritAttrs:!1,props:{show:Boolean,enabled:{type:Boolean,default:void 0},placement:{type:String,default:"bottom"},syncTrigger:{type:Array,default:["resize","scroll"]},to:[String,Object],flip:{type:Boolean,default:!0},internalShift:Boolean,x:Number,y:Number,width:String,minWidth:String,containerClass:String,teleportDisabled:Boolean,zindexable:{type:Boolean,default:!0},zIndex:Number,overlap:Boolean},setup(e){const t=o.inject("VBinder"),n=Je(()=>e.enabled!==void 0?e.enabled:e.show),r=o.ref(null),i=o.ref(null),a=()=>{const{syncTrigger:p}=e;p.includes("scroll")&&t.addScrollListener(c),p.includes("resize")&&t.addResizeListener(c)},l=()=>{t.removeScrollListener(c),t.removeResizeListener(c)};o.onMounted(()=>{n.value&&(c(),a())});const s=Yt();Ou.mount({id:"vueuc/binder",head:!0,anchorMetaName:Ur,ssr:s}),o.onBeforeUnmount(()=>{l()}),Ga(()=>{n.value&&c()});const c=()=>{if(!n.value)return;const p=r.value;if(p===null)return;const b=t.targetRef,{x:h,y:x,overlap:v}=e,g=h!==void 0&&x!==void 0?vu(h,x):ni(b);p.style.setProperty("--v-target-width",`${Math.round(g.width)}px`),p.style.setProperty("--v-target-height",`${Math.round(g.height)}px`);const{width:k,minWidth:z,placement:$,internalShift:T,flip:O}=e;p.setAttribute("v-placement",$),v?p.setAttribute("v-overlap",""):p.removeAttribute("v-overlap");const{style:m}=p;k==="target"?m.width=`${g.width}px`:k!==void 0?m.width=k:m.width="",z==="target"?m.minWidth=`${g.width}px`:z!==void 0?m.minWidth=z:m.minWidth="";const S=ni(p),M=ni(i.value),{left:N,top:A,placement:L}=Bu($,g,S,T,O,v),U=_u(L,v),{left:J,top:j,transform:Q}=Mu(L,M,g,A,N,v);p.setAttribute("v-placement",L),p.style.setProperty("--v-offset-left",`${Math.round(N)}px`),p.style.setProperty("--v-offset-top",`${Math.round(A)}px`),p.style.transform=`translateX(${J}) translateY(${j}) ${Q}`,p.style.setProperty("--v-transform-origin",U),p.style.transformOrigin=U};o.watch(n,p=>{p?(a(),d()):l()});const d=()=>{o.nextTick().then(c).catch(p=>console.error(p))};["placement","x","y","internalShift","flip","width","overlap","minWidth"].forEach(p=>{o.watch(o.toRef(e,p),c)}),["teleportDisabled"].forEach(p=>{o.watch(o.toRef(e,p),d)}),o.watch(o.toRef(e,"syncTrigger"),p=>{p.includes("resize")?t.addResizeListener(c):t.removeResizeListener(c),p.includes("scroll")?t.addScrollListener(c):t.removeScrollListener(c)});const u=Ln(),f=Je(()=>{const{to:p}=e;if(p!==void 0)return p;u.value});return{VBinder:t,mergedEnabled:n,offsetContainerRef:i,followerRef:r,mergedTo:f,syncPosition:c}},render(){return o.h(Ru,{show:this.show,to:this.mergedTo,disabled:this.teleportDisabled},{default:()=>{var e,t;const n=o.h("div",{class:["v-binder-follower-container",this.containerClass],ref:"offsetContainerRef"},[o.h("div",{class:"v-binder-follower-content",ref:"followerRef"},(t=(e=this.$slots).default)===null||t===void 0?void 0:t.call(e))]);return this.zindexable?o.withDirectives(n,[[rl,{enabled:this.mergedEnabled,zIndex:this.zIndex}]]):n}})}});var mn=[],Au=function(){return mn.some(function(e){return e.activeTargets.length>0})},Iu=function(){return mn.some(function(e){return e.skippedTargets.length>0})},dl="ResizeObserver loop completed with undelivered notifications.",Fu=function(){var e;typeof ErrorEvent=="function"?e=new ErrorEvent("error",{message:dl}):(e=document.createEvent("Event"),e.initEvent("error",!1,!1),e.message=dl),window.dispatchEvent(e)},lr;(function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(lr||(lr={}));var gn=function(e){return Object.freeze(e)},Du=function(){function e(t,n){this.inlineSize=t,this.blockSize=n,gn(this)}return e}(),ul=function(){function e(t,n,r,i){return this.x=t,this.y=n,this.width=r,this.height=i,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,gn(this)}return e.prototype.toJSON=function(){var t=this,n=t.x,r=t.y,i=t.top,a=t.right,l=t.bottom,s=t.left,c=t.width,d=t.height;return{x:n,y:r,top:i,right:a,bottom:l,left:s,width:c,height:d}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),ii=function(e){return e instanceof SVGElement&&"getBBox"in e},fl=function(e){if(ii(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var i=e,a=i.offsetWidth,l=i.offsetHeight;return!(a||l||e.getClientRects().length)},hl=function(e){var t;if(e instanceof Element)return!0;var n=(t=e==null?void 0:e.ownerDocument)===null||t===void 0?void 0:t.defaultView;return!!(n&&e instanceof n.Element)},Nu=function(e){switch(e.tagName){case"INPUT":if(e.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},sr=typeof window<"u"?window:{},Kr=new WeakMap,pl=/auto|scroll/,Lu=/^tb|vertical/,Hu=/msie|trident/i.test(sr.navigator&&sr.navigator.userAgent),Mt=function(e){return parseFloat(e||"0")},Wn=function(e,t,n){return e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=!1),new Du((n?t:e)||0,(n?e:t)||0)},bl=gn({devicePixelContentBoxSize:Wn(),borderBoxSize:Wn(),contentBoxSize:Wn(),contentRect:new ul(0,0,0,0)}),ml=function(e,t){if(t===void 0&&(t=!1),Kr.has(e)&&!t)return Kr.get(e);if(fl(e))return Kr.set(e,bl),bl;var n=getComputedStyle(e),r=ii(e)&&e.ownerSVGElement&&e.getBBox(),i=!Hu&&n.boxSizing==="border-box",a=Lu.test(n.writingMode||""),l=!r&&pl.test(n.overflowY||""),s=!r&&pl.test(n.overflowX||""),c=r?0:Mt(n.paddingTop),d=r?0:Mt(n.paddingRight),u=r?0:Mt(n.paddingBottom),f=r?0:Mt(n.paddingLeft),p=r?0:Mt(n.borderTopWidth),b=r?0:Mt(n.borderRightWidth),h=r?0:Mt(n.borderBottomWidth),x=r?0:Mt(n.borderLeftWidth),v=f+d,g=c+u,k=x+b,z=p+h,$=s?e.offsetHeight-z-e.clientHeight:0,T=l?e.offsetWidth-k-e.clientWidth:0,O=i?v+k:0,m=i?g+z:0,S=r?r.width:Mt(n.width)-O-T,M=r?r.height:Mt(n.height)-m-$,N=S+v+T+k,A=M+g+$+z,L=gn({devicePixelContentBoxSize:Wn(Math.round(S*devicePixelRatio),Math.round(M*devicePixelRatio),a),borderBoxSize:Wn(N,A,a),contentBoxSize:Wn(S,M,a),contentRect:new ul(f,c,S,M)});return Kr.set(e,L),L},gl=function(e,t,n){var r=ml(e,n),i=r.borderBoxSize,a=r.contentBoxSize,l=r.devicePixelContentBoxSize;switch(t){case lr.DEVICE_PIXEL_CONTENT_BOX:return l;case lr.BORDER_BOX:return i;default:return a}},Vu=function(){function e(t){var n=ml(t);this.target=t,this.contentRect=n.contentRect,this.borderBoxSize=gn([n.borderBoxSize]),this.contentBoxSize=gn([n.contentBoxSize]),this.devicePixelContentBoxSize=gn([n.devicePixelContentBoxSize])}return e}(),vl=function(e){if(fl(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},ju=function(){var e=1/0,t=[];mn.forEach(function(l){if(l.activeTargets.length!==0){var s=[];l.activeTargets.forEach(function(d){var u=new Vu(d.target),f=vl(d.target);s.push(u),d.lastReportedSize=gl(d.target,d.observedBox),f<e&&(e=f)}),t.push(function(){l.callback.call(l.observer,s,l.observer)}),l.activeTargets.splice(0,l.activeTargets.length)}});for(var n=0,r=t;n<r.length;n++){var i=r[n];i()}return e},xl=function(e){mn.forEach(function(n){n.activeTargets.splice(0,n.activeTargets.length),n.skippedTargets.splice(0,n.skippedTargets.length),n.observationTargets.forEach(function(i){i.isActive()&&(vl(i.target)>e?n.activeTargets.push(i):n.skippedTargets.push(i))})})},Wu=function(){var e=0;for(xl(e);Au();)e=ju(),xl(e);return Iu()&&Fu(),e>0},ai,yl=[],Uu=function(){return yl.splice(0).forEach(function(e){return e()})},Gu=function(e){if(!ai){var t=0,n=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return Uu()}).observe(n,r),ai=function(){n.textContent="".concat(t?t--:t++)}}yl.push(e),ai()},qu=function(e){Gu(function(){requestAnimationFrame(e)})},Xr=0,Ku=function(){return!!Xr},Xu=250,Yu={attributes:!0,characterData:!0,childList:!0,subtree:!0},wl=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Cl=function(e){return e===void 0&&(e=0),Date.now()+e},li=!1,Zu=function(){function e(){var t=this;this.stopped=!0,this.listener=function(){return t.schedule()}}return e.prototype.run=function(t){var n=this;if(t===void 0&&(t=Xu),!li){li=!0;var r=Cl(t);qu(function(){var i=!1;try{i=Wu()}finally{if(li=!1,t=r-Cl(),!Ku())return;i?n.run(1e3):t>0?n.run(t):n.start()}})}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var t=this,n=function(){return t.observer&&t.observer.observe(document.body,Yu)};document.body?n():sr.addEventListener("DOMContentLoaded",n)},e.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),wl.forEach(function(n){return sr.addEventListener(n,t.listener,!0)}))},e.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),wl.forEach(function(n){return sr.removeEventListener(n,t.listener,!0)}),this.stopped=!0)},e}(),si=new Zu,Sl=function(e){!Xr&&e>0&&si.start(),Xr+=e,!Xr&&si.stop()},Ju=function(e){return!ii(e)&&!Nu(e)&&getComputedStyle(e).display==="inline"},Qu=function(){function e(t,n){this.target=t,this.observedBox=n||lr.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var t=gl(this.target,this.observedBox,!0);return Ju(this.target)&&(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e}(),ef=function(){function e(t,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=n}return e}(),Yr=new WeakMap,$l=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return-1},Zr=function(){function e(){}return e.connect=function(t,n){var r=new ef(t,n);Yr.set(t,r)},e.observe=function(t,n,r){var i=Yr.get(t),a=i.observationTargets.length===0;$l(i.observationTargets,n)<0&&(a&&mn.push(i),i.observationTargets.push(new Qu(n,r&&r.box)),Sl(1),si.schedule())},e.unobserve=function(t,n){var r=Yr.get(t),i=$l(r.observationTargets,n),a=r.observationTargets.length===1;i>=0&&(a&&mn.splice(mn.indexOf(r),1),r.observationTargets.splice(i,1),Sl(-1))},e.disconnect=function(t){var n=this,r=Yr.get(t);r.observationTargets.slice().forEach(function(i){return n.unobserve(t,i.target)}),r.activeTargets.splice(0,r.activeTargets.length)},e}(),tf=function(){function e(t){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof t!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");Zr.connect(this,t)}return e.prototype.observe=function(t,n){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!hl(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Zr.observe(this,t,n)},e.prototype.unobserve=function(t){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!hl(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Zr.unobserve(this,t)},e.prototype.disconnect=function(){Zr.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}();class nf{constructor(){this.handleResize=this.handleResize.bind(this),this.observer=new(typeof window<"u"&&window.ResizeObserver||tf)(this.handleResize),this.elHandlersMap=new Map}handleResize(t){for(const n of t){const r=this.elHandlersMap.get(n.target);r!==void 0&&r(n)}}registerHandler(t,n){this.elHandlersMap.set(t,n),this.observer.observe(t)}unregisterHandler(t){this.elHandlersMap.has(t)&&(this.elHandlersMap.delete(t),this.observer.unobserve(t))}}const Jr=new nf,Zt=o.defineComponent({name:"ResizeObserver",props:{onResize:Function},setup(e){let t=!1;const n=o.getCurrentInstance().proxy;function r(i){const{onResize:a}=e;a!==void 0&&a(i)}o.onMounted(()=>{const i=n.$el;if(i===void 0){ol("resize-observer","$el does not exist.");return}if(i.nextElementSibling!==i.nextSibling&&i.nodeType===3&&i.nodeValue!==""){ol("resize-observer","$el can not be observed (it may be a text node).");return}i.nextElementSibling!==null&&(Jr.registerHandler(i.nextElementSibling,r),t=!0)}),o.onBeforeUnmount(()=>{t&&Jr.unregisterHandler(n.$el.nextElementSibling)})},render(){return o.renderSlot(this.$slots,"default")}});let Qr;function rf(){return typeof document>"u"?!1:(Qr===void 0&&("matchMedia"in window?Qr=window.matchMedia("(pointer:coarse)").matches:Qr=!1),Qr)}let ci;function Tl(){return typeof document>"u"?1:(ci===void 0&&(ci="chrome"in window?window.devicePixelRatio:1),ci)}const of=_t(".v-vl",{maxHeight:"inherit",height:"100%",overflow:"auto",minWidth:"1px"},[_t("&:not(.v-vl--show-scrollbar)",{scrollbarWidth:"none"},[_t("&::-webkit-scrollbar, &::-webkit-scrollbar-track-piece, &::-webkit-scrollbar-thumb",{width:0,height:0,display:"none"})])]),af=o.defineComponent({name:"VirtualList",inheritAttrs:!1,props:{showScrollbar:{type:Boolean,default:!0},items:{type:Array,default:()=>[]},itemSize:{type:Number,required:!0},itemResizable:Boolean,itemsStyle:[String,Object],visibleItemsTag:{type:[String,Object],default:"div"},visibleItemsProps:Object,ignoreItemResize:Boolean,onScroll:Function,onWheel:Function,onResize:Function,defaultScrollKey:[Number,String],defaultScrollIndex:Number,keyField:{type:String,default:"key"},paddingTop:{type:[Number,String],default:0},paddingBottom:{type:[Number,String],default:0}},setup(e){const t=Yt();of.mount({id:"vueuc/virtual-list",head:!0,anchorMetaName:Ur,ssr:t}),o.onMounted(()=>{const{defaultScrollIndex:A,defaultScrollKey:L}=e;A!=null?h({index:A}):L!=null&&h({key:L})});let n=!1,r=!1;o.onActivated(()=>{if(n=!1,!r){r=!0;return}h({top:f.value,left:u})}),o.onDeactivated(()=>{n=!0,r||(r=!0)});const i=o.computed(()=>{const A=new Map,{keyField:L}=e;return e.items.forEach((U,J)=>{A.set(U[L],J)}),A}),a=o.ref(null),l=o.ref(void 0),s=new Map,c=o.computed(()=>{const{items:A,itemSize:L,keyField:U}=e,J=new ku(A.length,L);return A.forEach((j,Q)=>{const Y=j[U],ie=s.get(Y);ie!==void 0&&J.add(Q,ie)}),J}),d=o.ref(0);let u=0;const f=o.ref(0),p=Je(()=>Math.max(c.value.getBound(f.value-at(e.paddingTop))-1,0)),b=o.computed(()=>{const{value:A}=l;if(A===void 0)return[];const{items:L,itemSize:U}=e,J=p.value,j=Math.min(J+Math.ceil(A/U+1),L.length-1),Q=[];for(let Y=J;Y<=j;++Y)Q.push(L[Y]);return Q}),h=(A,L)=>{if(typeof A=="number"){k(A,L,"auto");return}const{left:U,top:J,index:j,key:Q,position:Y,behavior:ie,debounce:me=!0}=A;if(U!==void 0||J!==void 0)k(U,J,ie);else if(j!==void 0)g(j,ie,me);else if(Q!==void 0){const ae=i.value.get(Q);ae!==void 0&&g(ae,ie,me)}else Y==="bottom"?k(0,Number.MAX_SAFE_INTEGER,ie):Y==="top"&&k(0,0,ie)};let x,v=null;function g(A,L,U){const{value:J}=c,j=J.sum(A)+at(e.paddingTop);if(!U)a.value.scrollTo({left:0,top:j,behavior:L});else{x=A,v!==null&&window.clearTimeout(v),v=window.setTimeout(()=>{x=void 0,v=null},16);const{scrollTop:Q,offsetHeight:Y}=a.value;if(j>Q){const ie=J.get(A);j+ie<=Q+Y||a.value.scrollTo({left:0,top:j+ie-Y,behavior:L})}else a.value.scrollTo({left:0,top:j,behavior:L})}}function k(A,L,U){a.value.scrollTo({left:A,top:L,behavior:U})}function z(A,L){var U,J,j;if(n||e.ignoreItemResize||N(L.target))return;const{value:Q}=c,Y=i.value.get(A),ie=Q.get(Y),me=(j=(J=(U=L.borderBoxSize)===null||U===void 0?void 0:U[0])===null||J===void 0?void 0:J.blockSize)!==null&&j!==void 0?j:L.contentRect.height;if(me===ie)return;me-e.itemSize===0?s.delete(A):s.set(A,me-e.itemSize);const he=me-ie;if(he===0)return;Q.add(Y,he);const G=a.value;if(G!=null){if(x===void 0){const te=Q.sum(Y);G.scrollTop>te&&G.scrollBy(0,he)}else if(Y<x)G.scrollBy(0,he);else if(Y===x){const te=Q.sum(Y);me+te>G.scrollTop+G.offsetHeight&&G.scrollBy(0,he)}M()}d.value++}const $=!rf();let T=!1;function O(A){var L;(L=e.onScroll)===null||L===void 0||L.call(e,A),(!$||!T)&&M()}function m(A){var L;if((L=e.onWheel)===null||L===void 0||L.call(e,A),$){const U=a.value;if(U!=null){if(A.deltaX===0&&(U.scrollTop===0&&A.deltaY<=0||U.scrollTop+U.offsetHeight>=U.scrollHeight&&A.deltaY>=0))return;A.preventDefault(),U.scrollTop+=A.deltaY/Tl(),U.scrollLeft+=A.deltaX/Tl(),M(),T=!0,za(()=>{T=!1})}}}function S(A){if(n||N(A.target)||A.contentRect.height===l.value)return;l.value=A.contentRect.height;const{onResize:L}=e;L!==void 0&&L(A)}function M(){const{value:A}=a;A!=null&&(f.value=A.scrollTop,u=A.scrollLeft)}function N(A){let L=A;for(;L!==null;){if(L.style.display==="none")return!0;L=L.parentElement}return!1}return{listHeight:l,listStyle:{overflow:"auto"},keyToIndex:i,itemsStyle:o.computed(()=>{const{itemResizable:A}=e,L=dn(c.value.sum());return d.value,[e.itemsStyle,{boxSizing:"content-box",height:A?"":L,minHeight:A?L:"",paddingTop:dn(e.paddingTop),paddingBottom:dn(e.paddingBottom)}]}),visibleItemsStyle:o.computed(()=>(d.value,{transform:`translateY(${dn(c.value.sum(p.value))})`})),viewportItems:b,listElRef:a,itemsElRef:o.ref(null),scrollTo:h,handleListResize:S,handleListScroll:O,handleListWheel:m,handleItemResize:z}},render(){const{itemResizable:e,keyField:t,keyToIndex:n,visibleItemsTag:r}=this;return o.h(Zt,{onResize:this.handleListResize},{default:()=>{var i,a;return o.h("div",o.mergeProps(this.$attrs,{class:["v-vl",this.showScrollbar&&"v-vl--show-scrollbar"],onScroll:this.handleListScroll,onWheel:this.handleListWheel,ref:"listElRef"}),[this.items.length!==0?o.h("div",{ref:"itemsElRef",class:"v-vl-items",style:this.itemsStyle},[o.h(r,Object.assign({class:"v-vl-visible-items",style:this.visibleItemsStyle},this.visibleItemsProps),{default:()=>this.viewportItems.map(l=>{const s=l[t],c=n.get(s),d=this.$slots.default({item:l,index:c})[0];return e?o.h(Zt,{key:s,onResize:u=>this.handleItemResize(s,u)},{default:()=>d}):(d.key=s,d)})})]):(a=(i=this.$slots).empty)===null||a===void 0?void 0:a.call(i)])}})}}),lf=_t(".v-x-scroll",{overflow:"auto",scrollbarWidth:"none"},[_t("&::-webkit-scrollbar",{width:0,height:0})]),sf=o.defineComponent({name:"XScroll",props:{disabled:Boolean,onScroll:Function},setup(){const e=o.ref(null);function t(i){!(i.currentTarget.offsetWidth<i.currentTarget.scrollWidth)||i.deltaY===0||(i.currentTarget.scrollLeft+=i.deltaY+i.deltaX,i.preventDefault())}const n=Yt();return lf.mount({id:"vueuc/x-scroll",head:!0,anchorMetaName:Ur,ssr:n}),Object.assign({selfRef:e,handleWheel:t},{scrollTo(...i){var a;(a=e.value)===null||a===void 0||a.scrollTo(...i)}})},render(){return o.h("div",{ref:"selfRef",onScroll:this.onScroll,onWheel:this.disabled?void 0:this.handleWheel,class:"v-x-scroll"},this.$slots)}}),Ft="v-hidden",cf=_t("[v-hidden]",{display:"none!important"}),kl=o.defineComponent({name:"Overflow",props:{getCounter:Function,getTail:Function,updateCounter:Function,onUpdateCount:Function,onUpdateOverflow:Function},setup(e,{slots:t}){const n=o.ref(null),r=o.ref(null);function i(l){const{value:s}=n,{getCounter:c,getTail:d}=e;let u;if(c!==void 0?u=c():u=r.value,!s||!u)return;u.hasAttribute(Ft)&&u.removeAttribute(Ft);const{children:f}=s;if(l.showAllItemsBeforeCalculate)for(const z of f)z.hasAttribute(Ft)&&z.removeAttribute(Ft);const p=s.offsetWidth,b=[],h=t.tail?d==null?void 0:d():null;let x=h?h.offsetWidth:0,v=!1;const g=s.children.length-(t.tail?1:0);for(let z=0;z<g-1;++z){if(z<0)continue;const $=f[z];if(v){$.hasAttribute(Ft)||$.setAttribute(Ft,"");continue}else $.hasAttribute(Ft)&&$.removeAttribute(Ft);const T=$.offsetWidth;if(x+=T,b[z]=T,x>p){const{updateCounter:O}=e;for(let m=z;m>=0;--m){const S=g-1-m;O!==void 0?O(S):u.textContent=`${S}`;const M=u.offsetWidth;if(x-=b[m],x+M<=p||m===0){v=!0,z=m-1,h&&(z===-1?(h.style.maxWidth=`${p-M}px`,h.style.boxSizing="border-box"):h.style.maxWidth="");const{onUpdateCount:N}=e;N&&N(S);break}}}}const{onUpdateOverflow:k}=e;v?k!==void 0&&k(!0):(k!==void 0&&k(!1),u.setAttribute(Ft,""))}const a=Yt();return cf.mount({id:"vueuc/overflow",head:!0,anchorMetaName:Ur,ssr:a}),o.onMounted(()=>i({showAllItemsBeforeCalculate:!1})),{selfRef:n,counterRef:r,sync:i}},render(){const{$slots:e}=this;return o.nextTick(()=>this.sync({showAllItemsBeforeCalculate:!1})),o.h("div",{class:"v-overflow",ref:"selfRef"},[o.renderSlot(e,"default"),e.counter?e.counter():o.h("span",{style:{display:"inline-block"},ref:"counterRef"}),e.tail?e.tail():null])}});function Rl(e){return e instanceof HTMLElement}function Pl(e){for(let t=0;t<e.childNodes.length;t++){const n=e.childNodes[t];if(Rl(n)&&(zl(n)||Pl(n)))return!0}return!1}function El(e){for(let t=e.childNodes.length-1;t>=0;t--){const n=e.childNodes[t];if(Rl(n)&&(zl(n)||El(n)))return!0}return!1}function zl(e){if(!df(e))return!1;try{e.focus({preventScroll:!0})}catch{}return document.activeElement===e}function df(e){if(e.tabIndex>0||e.tabIndex===0&&e.getAttribute("tabIndex")!==null)return!0;if(e.getAttribute("disabled"))return!1;switch(e.nodeName){case"A":return!!e.href&&e.rel!=="ignore";case"INPUT":return e.type!=="hidden"&&e.type!=="file";case"BUTTON":case"SELECT":case"TEXTAREA":return!0;default:return!1}}let cr=[];const uf=o.defineComponent({name:"FocusTrap",props:{disabled:Boolean,active:Boolean,autoFocus:{type:Boolean,default:!0},onEsc:Function,initialFocusTo:String,finalFocusTo:String,returnFocusOnDeactivated:{type:Boolean,default:!0}},setup(e){const t=Bd(),n=o.ref(null),r=o.ref(null);let i=!1,a=!1;const l=typeof document>"u"?null:document.activeElement;function s(){return cr[cr.length-1]===t}function c(v){var g;v.code==="Escape"&&s()&&((g=e.onEsc)===null||g===void 0||g.call(e,v))}o.onMounted(()=>{o.watch(()=>e.active,v=>{v?(f(),ze("keydown",document,c)):(ke("keydown",document,c),i&&p())},{immediate:!0})}),o.onBeforeUnmount(()=>{ke("keydown",document,c),i&&p()});function d(v){if(!a&&s()){const g=u();if(g===null||g.contains(An(v)))return;b("first")}}function u(){const v=n.value;if(v===null)return null;let g=v;for(;g=g.nextSibling,!(g===null||g instanceof Element&&g.tagName==="DIV"););return g}function f(){var v;if(!e.disabled){if(cr.push(t),e.autoFocus){const{initialFocusTo:g}=e;g===void 0?b("first"):(v=al(g))===null||v===void 0||v.focus({preventScroll:!0})}i=!0,document.addEventListener("focus",d,!0)}}function p(){var v;if(e.disabled||(document.removeEventListener("focus",d,!0),cr=cr.filter(k=>k!==t),s()))return;const{finalFocusTo:g}=e;g!==void 0?(v=al(g))===null||v===void 0||v.focus({preventScroll:!0}):e.returnFocusOnDeactivated&&l instanceof HTMLElement&&(a=!0,l.focus({preventScroll:!0}),a=!1)}function b(v){if(s()&&e.active){const g=n.value,k=r.value;if(g!==null&&k!==null){const z=u();if(z==null||z===k){a=!0,g.focus({preventScroll:!0}),a=!1;return}a=!0;const $=v==="first"?Pl(z):El(z);a=!1,$||(a=!0,g.focus({preventScroll:!0}),a=!1)}}}function h(v){if(a)return;const g=u();g!==null&&(v.relatedTarget!==null&&g.contains(v.relatedTarget)?b("last"):b("first"))}function x(v){a||(v.relatedTarget!==null&&v.relatedTarget===n.value?b("last"):b("first"))}return{focusableStartRef:n,focusableEndRef:r,focusableStyle:"position: absolute; height: 0; width: 0;",handleStartFocus:h,handleEndFocus:x}},render(){const{default:e}=this.$slots;if(e===void 0)return null;if(this.disabled)return e();const{active:t,focusableStyle:n}=this;return o.h(o.Fragment,null,[o.h("div",{"aria-hidden":"true",tabindex:t?"0":"-1",ref:"focusableStartRef",style:n,onFocus:this.handleStartFocus}),e(),o.h("div",{"aria-hidden":"true",style:n,ref:"focusableEndRef",tabindex:t?"0":"-1",onFocus:this.handleEndFocus})])}});function Bl(e,t){t&&(o.onMounted(()=>{const{value:n}=e;n&&Jr.registerHandler(n,t)}),o.onBeforeUnmount(()=>{const{value:n}=e;n&&Jr.unregisterHandler(n)}))}function ff(e){const t={isDeactivated:!1};let n=!1;return o.onActivated(()=>{if(t.isDeactivated=!1,!n){n=!0;return}e()}),o.onDeactivated(()=>{t.isDeactivated=!0,n||(n=!0)}),t}const _l="n-form-item";function vn(e,{defaultSize:t="medium",mergedSize:n,mergedDisabled:r}={}){const i=o.inject(_l,null);o.provide(_l,null);const a=o.computed(n?()=>n(i):()=>{const{size:c}=e;if(c)return c;if(i){const{mergedSize:d}=i;if(d.value!==void 0)return d.value}return t}),l=o.computed(r?()=>r(i):()=>{const{disabled:c}=e;return c!==void 0?c:i?i.disabled.value:!1}),s=o.computed(()=>{const{status:c}=e;return c||(i==null?void 0:i.mergedValidationStatus.value)});return o.onBeforeUnmount(()=>{i&&i.restoreValidation()}),{mergedSizeRef:a,mergedDisabledRef:l,mergedStatusRef:s,nTriggerFormBlur(){i&&i.handleContentBlur()},nTriggerFormChange(){i&&i.handleContentChange()},nTriggerFormFocus(){i&&i.handleContentFocus()},nTriggerFormInput(){i&&i.handleContentInput()}}}var Ml=typeof global=="object"&&global&&global.Object===Object&&global,hf=typeof self=="object"&&self&&self.Object===Object&&self,$t=Ml||hf||Function("return this")(),Jt=$t.Symbol,Ol=Object.prototype,pf=Ol.hasOwnProperty,bf=Ol.toString,dr=Jt?Jt.toStringTag:void 0;function mf(e){var t=pf.call(e,dr),n=e[dr];try{e[dr]=void 0;var r=!0}catch{}var i=bf.call(e);return r&&(t?e[dr]=n:delete e[dr]),i}var gf=Object.prototype,vf=gf.toString;function xf(e){return vf.call(e)}var yf="[object Null]",wf="[object Undefined]",Al=Jt?Jt.toStringTag:void 0;function xn(e){return e==null?e===void 0?wf:yf:Al&&Al in Object(e)?mf(e):xf(e)}function Qt(e){return e!=null&&typeof e=="object"}var Cf="[object Symbol]";function eo(e){return typeof e=="symbol"||Qt(e)&&xn(e)==Cf}function Il(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var vt=Array.isArray,Sf=1/0,Fl=Jt?Jt.prototype:void 0,Dl=Fl?Fl.toString:void 0;function Nl(e){if(typeof e=="string")return e;if(vt(e))return Il(e,Nl)+"";if(eo(e))return Dl?Dl.call(e):"";var t=e+"";return t=="0"&&1/e==-Sf?"-0":t}var $f=/\s/;function Tf(e){for(var t=e.length;t--&&$f.test(e.charAt(t)););return t}var kf=/^\s+/;function Rf(e){return e&&e.slice(0,Tf(e)+1).replace(kf,"")}function xt(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Ll=NaN,Pf=/^[-+]0x[0-9a-f]+$/i,Ef=/^0b[01]+$/i,zf=/^0o[0-7]+$/i,Bf=parseInt;function Hl(e){if(typeof e=="number")return e;if(eo(e))return Ll;if(xt(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=xt(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Rf(e);var n=Ef.test(e);return n||zf.test(e)?Bf(e.slice(2),n?2:8):Pf.test(e)?Ll:+e}function di(e){return e}var _f="[object AsyncFunction]",Mf="[object Function]",Of="[object GeneratorFunction]",Af="[object Proxy]";function ui(e){if(!xt(e))return!1;var t=xn(e);return t==Mf||t==Of||t==_f||t==Af}var fi=$t["__core-js_shared__"],Vl=function(){var e=/[^.]+$/.exec(fi&&fi.keys&&fi.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function If(e){return!!Vl&&Vl in e}var Ff=Function.prototype,Df=Ff.toString;function yn(e){if(e!=null){try{return Df.call(e)}catch{}try{return e+""}catch{}}return""}var Nf=/[\\^$.*+?()[\]{}|]/g,Lf=/^\[object .+?Constructor\]$/,Hf=Function.prototype,Vf=Object.prototype,jf=Hf.toString,Wf=Vf.hasOwnProperty,Uf=RegExp("^"+jf.call(Wf).replace(Nf,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Gf(e){if(!xt(e)||If(e))return!1;var t=ui(e)?Uf:Lf;return t.test(yn(e))}function qf(e,t){return e==null?void 0:e[t]}function wn(e,t){var n=qf(e,t);return Gf(n)?n:void 0}var hi=wn($t,"WeakMap"),jl=Object.create,Kf=function(){function e(){}return function(t){if(!xt(t))return{};if(jl)return jl(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function Xf(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function Yf(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var Zf=800,Jf=16,Qf=Date.now;function eh(e){var t=0,n=0;return function(){var r=Qf(),i=Jf-(r-n);if(n=r,i>0){if(++t>=Zf)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function th(e){return function(){return e}}var to=function(){try{var e=wn(Object,"defineProperty");return e({},"",{}),e}catch{}}(),nh=to?function(e,t){return to(e,"toString",{configurable:!0,enumerable:!1,value:th(t),writable:!0})}:di,rh=eh(nh),oh=9007199254740991,ih=/^(?:0|[1-9]\d*)$/;function pi(e,t){var n=typeof e;return t=t??oh,!!t&&(n=="number"||n!="symbol"&&ih.test(e))&&e>-1&&e%1==0&&e<t}function bi(e,t,n){t=="__proto__"&&to?to(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function ur(e,t){return e===t||e!==e&&t!==t}var ah=Object.prototype,lh=ah.hasOwnProperty;function sh(e,t,n){var r=e[t];(!(lh.call(e,t)&&ur(r,n))||n===void 0&&!(t in e))&&bi(e,t,n)}function ch(e,t,n,r){var i=!n;n||(n={});for(var a=-1,l=t.length;++a<l;){var s=t[a],c=void 0;c===void 0&&(c=e[s]),i?bi(n,s,c):sh(n,s,c)}return n}var Wl=Math.max;function dh(e,t,n){return t=Wl(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,a=Wl(r.length-t,0),l=Array(a);++i<a;)l[i]=r[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=r[i];return s[t]=n(l),Xf(e,this,s)}}function uh(e,t){return rh(dh(e,t,di),e+"")}var fh=9007199254740991;function mi(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=fh}function Un(e){return e!=null&&mi(e.length)&&!ui(e)}function hh(e,t,n){if(!xt(n))return!1;var r=typeof t;return(r=="number"?Un(n)&&pi(t,n.length):r=="string"&&t in n)?ur(n[t],e):!1}function ph(e){return uh(function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,l=i>2?n[2]:void 0;for(a=e.length>3&&typeof a=="function"?(i--,a):void 0,l&&hh(n[0],n[1],l)&&(a=i<3?void 0:a,i=1),t=Object(t);++r<i;){var s=n[r];s&&e(t,s,r,a)}return t})}var bh=Object.prototype;function gi(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||bh;return e===n}function mh(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var gh="[object Arguments]";function Ul(e){return Qt(e)&&xn(e)==gh}var Gl=Object.prototype,vh=Gl.hasOwnProperty,xh=Gl.propertyIsEnumerable,no=Ul(function(){return arguments}())?Ul:function(e){return Qt(e)&&vh.call(e,"callee")&&!xh.call(e,"callee")};function yh(){return!1}var ql=typeof Ve=="object"&&Ve&&!Ve.nodeType&&Ve,Kl=ql&&typeof module=="object"&&module&&!module.nodeType&&module,wh=Kl&&Kl.exports===ql,Xl=wh?$t.Buffer:void 0,Ch=Xl?Xl.isBuffer:void 0,ro=Ch||yh,Sh="[object Arguments]",$h="[object Array]",Th="[object Boolean]",kh="[object Date]",Rh="[object Error]",Ph="[object Function]",Eh="[object Map]",zh="[object Number]",Bh="[object Object]",_h="[object RegExp]",Mh="[object Set]",Oh="[object String]",Ah="[object WeakMap]",Ih="[object ArrayBuffer]",Fh="[object DataView]",Dh="[object Float32Array]",Nh="[object Float64Array]",Lh="[object Int8Array]",Hh="[object Int16Array]",Vh="[object Int32Array]",jh="[object Uint8Array]",Wh="[object Uint8ClampedArray]",Uh="[object Uint16Array]",Gh="[object Uint32Array]",Ne={};Ne[Dh]=Ne[Nh]=Ne[Lh]=Ne[Hh]=Ne[Vh]=Ne[jh]=Ne[Wh]=Ne[Uh]=Ne[Gh]=!0,Ne[Sh]=Ne[$h]=Ne[Ih]=Ne[Th]=Ne[Fh]=Ne[kh]=Ne[Rh]=Ne[Ph]=Ne[Eh]=Ne[zh]=Ne[Bh]=Ne[_h]=Ne[Mh]=Ne[Oh]=Ne[Ah]=!1;function qh(e){return Qt(e)&&mi(e.length)&&!!Ne[xn(e)]}function Kh(e){return function(t){return e(t)}}var Yl=typeof Ve=="object"&&Ve&&!Ve.nodeType&&Ve,fr=Yl&&typeof module=="object"&&module&&!module.nodeType&&module,Xh=fr&&fr.exports===Yl,vi=Xh&&Ml.process,Zl=function(){try{var e=fr&&fr.require&&fr.require("util").types;return e||vi&&vi.binding&&vi.binding("util")}catch{}}(),Jl=Zl&&Zl.isTypedArray,xi=Jl?Kh(Jl):qh,Yh=Object.prototype,Zh=Yh.hasOwnProperty;function Ql(e,t){var n=vt(e),r=!n&&no(e),i=!n&&!r&&ro(e),a=!n&&!r&&!i&&xi(e),l=n||r||i||a,s=l?mh(e.length,String):[],c=s.length;for(var d in e)(t||Zh.call(e,d))&&!(l&&(d=="length"||i&&(d=="offset"||d=="parent")||a&&(d=="buffer"||d=="byteLength"||d=="byteOffset")||pi(d,c)))&&s.push(d);return s}function es(e,t){return function(n){return e(t(n))}}var Jh=es(Object.keys,Object),Qh=Object.prototype,ep=Qh.hasOwnProperty;function tp(e){if(!gi(e))return Jh(e);var t=[];for(var n in Object(e))ep.call(e,n)&&n!="constructor"&&t.push(n);return t}function yi(e){return Un(e)?Ql(e):tp(e)}function np(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var rp=Object.prototype,op=rp.hasOwnProperty;function ip(e){if(!xt(e))return np(e);var t=gi(e),n=[];for(var r in e)r=="constructor"&&(t||!op.call(e,r))||n.push(r);return n}function ts(e){return Un(e)?Ql(e,!0):ip(e)}var ap=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,lp=/^\w*$/;function wi(e,t){if(vt(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||eo(e)?!0:lp.test(e)||!ap.test(e)||t!=null&&e in Object(t)}var hr=wn(Object,"create");function sp(){this.__data__=hr?hr(null):{},this.size=0}function cp(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var dp="__lodash_hash_undefined__",up=Object.prototype,fp=up.hasOwnProperty;function hp(e){var t=this.__data__;if(hr){var n=t[e];return n===dp?void 0:n}return fp.call(t,e)?t[e]:void 0}var pp=Object.prototype,bp=pp.hasOwnProperty;function mp(e){var t=this.__data__;return hr?t[e]!==void 0:bp.call(t,e)}var gp="__lodash_hash_undefined__";function vp(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=hr&&t===void 0?gp:t,this}function Cn(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Cn.prototype.clear=sp,Cn.prototype.delete=cp,Cn.prototype.get=hp,Cn.prototype.has=mp,Cn.prototype.set=vp;function xp(){this.__data__=[],this.size=0}function oo(e,t){for(var n=e.length;n--;)if(ur(e[n][0],t))return n;return-1}var yp=Array.prototype,wp=yp.splice;function Cp(e){var t=this.__data__,n=oo(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():wp.call(t,n,1),--this.size,!0}function Sp(e){var t=this.__data__,n=oo(t,e);return n<0?void 0:t[n][1]}function $p(e){return oo(this.__data__,e)>-1}function Tp(e,t){var n=this.__data__,r=oo(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function Dt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Dt.prototype.clear=xp,Dt.prototype.delete=Cp,Dt.prototype.get=Sp,Dt.prototype.has=$p,Dt.prototype.set=Tp;var pr=wn($t,"Map");function kp(){this.size=0,this.__data__={hash:new Cn,map:new(pr||Dt),string:new Cn}}function Rp(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function io(e,t){var n=e.__data__;return Rp(t)?n[typeof t=="string"?"string":"hash"]:n.map}function Pp(e){var t=io(this,e).delete(e);return this.size-=t?1:0,t}function Ep(e){return io(this,e).get(e)}function zp(e){return io(this,e).has(e)}function Bp(e,t){var n=io(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function Nt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Nt.prototype.clear=kp,Nt.prototype.delete=Pp,Nt.prototype.get=Ep,Nt.prototype.has=zp,Nt.prototype.set=Bp;var _p="Expected a function";function Ci(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(_p);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var l=e.apply(this,r);return n.cache=a.set(i,l)||a,l};return n.cache=new(Ci.Cache||Nt),n}Ci.Cache=Nt;var Mp=500;function Op(e){var t=Ci(e,function(r){return n.size===Mp&&n.clear(),r}),n=t.cache;return t}var Ap=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ip=/\\(\\)?/g,Fp=Op(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Ap,function(n,r,i,a){t.push(i?a.replace(Ip,"$1"):r||n)}),t});function ns(e){return e==null?"":Nl(e)}function rs(e,t){return vt(e)?e:wi(e,t)?[e]:Fp(ns(e))}var Dp=1/0;function ao(e){if(typeof e=="string"||eo(e))return e;var t=e+"";return t=="0"&&1/e==-Dp?"-0":t}function os(e,t){t=rs(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[ao(t[n++])];return n&&n==r?e:void 0}function Np(e,t,n){var r=e==null?void 0:os(e,t);return r===void 0?n:r}function Lp(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var is=es(Object.getPrototypeOf,Object),Hp="[object Object]",Vp=Function.prototype,jp=Object.prototype,as=Vp.toString,Wp=jp.hasOwnProperty,Up=as.call(Object);function Gp(e){if(!Qt(e)||xn(e)!=Hp)return!1;var t=is(e);if(t===null)return!0;var n=Wp.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&as.call(n)==Up}function qp(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(i);++r<i;)a[r]=e[r+t];return a}function Kp(e,t,n){var r=e.length;return n=n===void 0?r:n,!t&&n>=r?e:qp(e,t,n)}var Xp="\\ud800-\\udfff",Yp="\\u0300-\\u036f",Zp="\\ufe20-\\ufe2f",Jp="\\u20d0-\\u20ff",Qp=Yp+Zp+Jp,eb="\\ufe0e\\ufe0f",tb="\\u200d",nb=RegExp("["+tb+Xp+Qp+eb+"]");function ls(e){return nb.test(e)}function rb(e){return e.split("")}var ss="\\ud800-\\udfff",ob="\\u0300-\\u036f",ib="\\ufe20-\\ufe2f",ab="\\u20d0-\\u20ff",lb=ob+ib+ab,sb="\\ufe0e\\ufe0f",cb="["+ss+"]",Si="["+lb+"]",$i="\\ud83c[\\udffb-\\udfff]",db="(?:"+Si+"|"+$i+")",cs="[^"+ss+"]",ds="(?:\\ud83c[\\udde6-\\uddff]){2}",us="[\\ud800-\\udbff][\\udc00-\\udfff]",ub="\\u200d",fs=db+"?",hs="["+sb+"]?",fb="(?:"+ub+"(?:"+[cs,ds,us].join("|")+")"+hs+fs+")*",hb=hs+fs+fb,pb="(?:"+[cs+Si+"?",Si,ds,us,cb].join("|")+")",bb=RegExp($i+"(?="+$i+")|"+pb+hb,"g");function mb(e){return e.match(bb)||[]}function gb(e){return ls(e)?mb(e):rb(e)}function vb(e){return function(t){t=ns(t);var n=ls(t)?gb(t):void 0,r=n?n[0]:t.charAt(0),i=n?Kp(n,1).join(""):t.slice(1);return r[e]()+i}}var xb=vb("toUpperCase");function yb(){this.__data__=new Dt,this.size=0}function wb(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function Cb(e){return this.__data__.get(e)}function Sb(e){return this.__data__.has(e)}var $b=200;function Tb(e,t){var n=this.__data__;if(n instanceof Dt){var r=n.__data__;if(!pr||r.length<$b-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Nt(r)}return n.set(e,t),this.size=n.size,this}function Ot(e){var t=this.__data__=new Dt(e);this.size=t.size}Ot.prototype.clear=yb,Ot.prototype.delete=wb,Ot.prototype.get=Cb,Ot.prototype.has=Sb,Ot.prototype.set=Tb;var ps=typeof Ve=="object"&&Ve&&!Ve.nodeType&&Ve,bs=ps&&typeof module=="object"&&module&&!module.nodeType&&module,kb=bs&&bs.exports===ps,ms=kb?$t.Buffer:void 0;ms&&ms.allocUnsafe;function Rb(e,t){return e.slice()}function Pb(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var l=e[n];t(l,n,e)&&(a[i++]=l)}return a}function Eb(){return[]}var zb=Object.prototype,Bb=zb.propertyIsEnumerable,gs=Object.getOwnPropertySymbols,_b=gs?function(e){return e==null?[]:(e=Object(e),Pb(gs(e),function(t){return Bb.call(e,t)}))}:Eb;function Mb(e,t,n){var r=t(e);return vt(e)?r:Lp(r,n(e))}function vs(e){return Mb(e,yi,_b)}var Ti=wn($t,"DataView"),ki=wn($t,"Promise"),Ri=wn($t,"Set"),xs="[object Map]",Ob="[object Object]",ys="[object Promise]",ws="[object Set]",Cs="[object WeakMap]",Ss="[object DataView]",Ab=yn(Ti),Ib=yn(pr),Fb=yn(ki),Db=yn(Ri),Nb=yn(hi),en=xn;(Ti&&en(new Ti(new ArrayBuffer(1)))!=Ss||pr&&en(new pr)!=xs||ki&&en(ki.resolve())!=ys||Ri&&en(new Ri)!=ws||hi&&en(new hi)!=Cs)&&(en=function(e){var t=xn(e),n=t==Ob?e.constructor:void 0,r=n?yn(n):"";if(r)switch(r){case Ab:return Ss;case Ib:return xs;case Fb:return ys;case Db:return ws;case Nb:return Cs}return t});var lo=$t.Uint8Array;function Lb(e){var t=new e.constructor(e.byteLength);return new lo(t).set(new lo(e)),t}function Hb(e,t){var n=Lb(e.buffer);return new e.constructor(n,e.byteOffset,e.length)}function Vb(e){return typeof e.constructor=="function"&&!gi(e)?Kf(is(e)):{}}var jb="__lodash_hash_undefined__";function Wb(e){return this.__data__.set(e,jb),this}function Ub(e){return this.__data__.has(e)}function so(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new Nt;++t<n;)this.add(e[t])}so.prototype.add=so.prototype.push=Wb,so.prototype.has=Ub;function Gb(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function qb(e,t){return e.has(t)}var Kb=1,Xb=2;function $s(e,t,n,r,i,a){var l=n&Kb,s=e.length,c=t.length;if(s!=c&&!(l&&c>s))return!1;var d=a.get(e),u=a.get(t);if(d&&u)return d==t&&u==e;var f=-1,p=!0,b=n&Xb?new so:void 0;for(a.set(e,t),a.set(t,e);++f<s;){var h=e[f],x=t[f];if(r)var v=l?r(x,h,f,t,e,a):r(h,x,f,e,t,a);if(v!==void 0){if(v)continue;p=!1;break}if(b){if(!Gb(t,function(g,k){if(!qb(b,k)&&(h===g||i(h,g,n,r,a)))return b.push(k)})){p=!1;break}}else if(!(h===x||i(h,x,n,r,a))){p=!1;break}}return a.delete(e),a.delete(t),p}function Yb(e){var t=-1,n=Array(e.size);return e.forEach(function(r,i){n[++t]=[i,r]}),n}function Zb(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var Jb=1,Qb=2,em="[object Boolean]",tm="[object Date]",nm="[object Error]",rm="[object Map]",om="[object Number]",im="[object RegExp]",am="[object Set]",lm="[object String]",sm="[object Symbol]",cm="[object ArrayBuffer]",dm="[object DataView]",Ts=Jt?Jt.prototype:void 0,Pi=Ts?Ts.valueOf:void 0;function um(e,t,n,r,i,a,l){switch(n){case dm:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case cm:return!(e.byteLength!=t.byteLength||!a(new lo(e),new lo(t)));case em:case tm:case om:return ur(+e,+t);case nm:return e.name==t.name&&e.message==t.message;case im:case lm:return e==t+"";case rm:var s=Yb;case am:var c=r&Jb;if(s||(s=Zb),e.size!=t.size&&!c)return!1;var d=l.get(e);if(d)return d==t;r|=Qb,l.set(e,t);var u=$s(s(e),s(t),r,i,a,l);return l.delete(e),u;case sm:if(Pi)return Pi.call(e)==Pi.call(t)}return!1}var fm=1,hm=Object.prototype,pm=hm.hasOwnProperty;function bm(e,t,n,r,i,a){var l=n&fm,s=vs(e),c=s.length,d=vs(t),u=d.length;if(c!=u&&!l)return!1;for(var f=c;f--;){var p=s[f];if(!(l?p in t:pm.call(t,p)))return!1}var b=a.get(e),h=a.get(t);if(b&&h)return b==t&&h==e;var x=!0;a.set(e,t),a.set(t,e);for(var v=l;++f<c;){p=s[f];var g=e[p],k=t[p];if(r)var z=l?r(k,g,p,t,e,a):r(g,k,p,e,t,a);if(!(z===void 0?g===k||i(g,k,n,r,a):z)){x=!1;break}v||(v=p=="constructor")}if(x&&!v){var $=e.constructor,T=t.constructor;$!=T&&"constructor"in e&&"constructor"in t&&!(typeof $=="function"&&$ instanceof $&&typeof T=="function"&&T instanceof T)&&(x=!1)}return a.delete(e),a.delete(t),x}var mm=1,ks="[object Arguments]",Rs="[object Array]",co="[object Object]",gm=Object.prototype,Ps=gm.hasOwnProperty;function vm(e,t,n,r,i,a){var l=vt(e),s=vt(t),c=l?Rs:en(e),d=s?Rs:en(t);c=c==ks?co:c,d=d==ks?co:d;var u=c==co,f=d==co,p=c==d;if(p&&ro(e)){if(!ro(t))return!1;l=!0,u=!1}if(p&&!u)return a||(a=new Ot),l||xi(e)?$s(e,t,n,r,i,a):um(e,t,c,n,r,i,a);if(!(n&mm)){var b=u&&Ps.call(e,"__wrapped__"),h=f&&Ps.call(t,"__wrapped__");if(b||h){var x=b?e.value():e,v=h?t.value():t;return a||(a=new Ot),i(x,v,n,r,a)}}return p?(a||(a=new Ot),bm(e,t,n,r,i,a)):!1}function Ei(e,t,n,r,i){return e===t?!0:e==null||t==null||!Qt(e)&&!Qt(t)?e!==e&&t!==t:vm(e,t,n,r,Ei,i)}var xm=1,ym=2;function wm(e,t,n,r){var i=n.length,a=i;if(e==null)return!a;for(e=Object(e);i--;){var l=n[i];if(l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++i<a;){l=n[i];var s=l[0],c=e[s],d=l[1];if(l[2]){if(c===void 0&&!(s in e))return!1}else{var u=new Ot,f;if(!(f===void 0?Ei(d,c,xm|ym,r,u):f))return!1}}return!0}function Es(e){return e===e&&!xt(e)}function Cm(e){for(var t=yi(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,Es(i)]}return t}function zs(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function Sm(e){var t=Cm(e);return t.length==1&&t[0][2]?zs(t[0][0],t[0][1]):function(n){return n===e||wm(n,e,t)}}function $m(e,t){return e!=null&&t in Object(e)}function Tm(e,t,n){t=rs(t,e);for(var r=-1,i=t.length,a=!1;++r<i;){var l=ao(t[r]);if(!(a=e!=null&&n(e,l)))break;e=e[l]}return a||++r!=i?a:(i=e==null?0:e.length,!!i&&mi(i)&&pi(l,i)&&(vt(e)||no(e)))}function km(e,t){return e!=null&&Tm(e,t,$m)}var Rm=1,Pm=2;function Em(e,t){return wi(e)&&Es(t)?zs(ao(e),t):function(n){var r=Np(n,e);return r===void 0&&r===t?km(n,e):Ei(t,r,Rm|Pm)}}function zm(e){return function(t){return t==null?void 0:t[e]}}function Bm(e){return function(t){return os(t,e)}}function _m(e){return wi(e)?zm(ao(e)):Bm(e)}function Mm(e){return typeof e=="function"?e:e==null?di:typeof e=="object"?vt(e)?Em(e[0],e[1]):Sm(e):_m(e)}function Om(e){return function(t,n,r){for(var i=-1,a=Object(t),l=r(t),s=l.length;s--;){var c=l[++i];if(n(a[c],c,a)===!1)break}return t}}var Bs=Om();function Am(e,t){return e&&Bs(e,t,yi)}function Im(e,t){return function(n,r){if(n==null)return n;if(!Un(n))return e(n,r);for(var i=n.length,a=-1,l=Object(n);++a<i&&r(l[a],a,l)!==!1;);return n}}var Fm=Im(Am),zi=function(){return $t.Date.now()},Dm="Expected a function",Nm=Math.max,Lm=Math.min;function Hm(e,t,n){var r,i,a,l,s,c,d=0,u=!1,f=!1,p=!0;if(typeof e!="function")throw new TypeError(Dm);t=Hl(t)||0,xt(n)&&(u=!!n.leading,f="maxWait"in n,a=f?Nm(Hl(n.maxWait)||0,t):a,p="trailing"in n?!!n.trailing:p);function b(O){var m=r,S=i;return r=i=void 0,d=O,l=e.apply(S,m),l}function h(O){return d=O,s=setTimeout(g,t),u?b(O):l}function x(O){var m=O-c,S=O-d,M=t-m;return f?Lm(M,a-S):M}function v(O){var m=O-c,S=O-d;return c===void 0||m>=t||m<0||f&&S>=a}function g(){var O=zi();if(v(O))return k(O);s=setTimeout(g,x(O))}function k(O){return s=void 0,p&&r?b(O):(r=i=void 0,l)}function z(){s!==void 0&&clearTimeout(s),d=0,r=c=i=s=void 0}function $(){return s===void 0?l:k(zi())}function T(){var O=zi(),m=v(O);if(r=arguments,i=this,c=O,m){if(s===void 0)return h(c);if(f)return clearTimeout(s),s=setTimeout(g,t),b(c)}return s===void 0&&(s=setTimeout(g,t)),l}return T.cancel=z,T.flush=$,T}function Bi(e,t,n){(n!==void 0&&!ur(e[t],n)||n===void 0&&!(t in e))&&bi(e,t,n)}function Vm(e){return Qt(e)&&Un(e)}function _i(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function jm(e){return ch(e,ts(e))}function Wm(e,t,n,r,i,a,l){var s=_i(e,n),c=_i(t,n),d=l.get(c);if(d){Bi(e,n,d);return}var u=a?a(s,c,n+"",e,t,l):void 0,f=u===void 0;if(f){var p=vt(c),b=!p&&ro(c),h=!p&&!b&&xi(c);u=c,p||b||h?vt(s)?u=s:Vm(s)?u=Yf(s):b?(f=!1,u=Rb(c)):h?(f=!1,u=Hb(c)):u=[]:Gp(c)||no(c)?(u=s,no(s)?u=jm(s):(!xt(s)||ui(s))&&(u=Vb(c))):f=!1}f&&(l.set(c,u),i(u,c,r,a,l),l.delete(c)),Bi(e,n,u)}function _s(e,t,n,r,i){e!==t&&Bs(t,function(a,l){if(i||(i=new Ot),xt(a))Wm(e,t,l,n,_s,r,i);else{var s=r?r(_i(e,l),a,l+"",e,t,i):void 0;s===void 0&&(s=a),Bi(e,l,s)}},ts)}function Um(e,t){var n=-1,r=Un(e)?Array(e.length):[];return Fm(e,function(i,a,l){r[++n]=t(i,a,l)}),r}function Gm(e,t){var n=vt(e)?Il:Um;return n(e,Mm(t))}var uo=ph(function(e,t,n){_s(e,t,n)}),qm="Expected a function";function Mi(e,t,n){var r=!0,i=!0;if(typeof e!="function")throw new TypeError(qm);return xt(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Hm(e,t,{leading:r,maxWait:t,trailing:i})}const Sn={fontFamily:'v-sans, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',fontFamilyMono:"v-mono, SFMono-Regular, Menlo, Consolas, Courier, monospace",fontWeight:"400",fontWeightStrong:"500",cubicBezierEaseInOut:"cubic-bezier(.4, 0, .2, 1)",cubicBezierEaseOut:"cubic-bezier(0, 0, .2, 1)",cubicBezierEaseIn:"cubic-bezier(.4, 0, 1, 1)",borderRadius:"3px",borderRadiusSmall:"2px",fontSize:"14px",fontSizeMini:"12px",fontSizeTiny:"12px",fontSizeSmall:"14px",fontSizeMedium:"14px",fontSizeLarge:"15px",fontSizeHuge:"16px",lineHeight:"1.6",heightMini:"16px",heightTiny:"22px",heightSmall:"28px",heightMedium:"34px",heightLarge:"40px",heightHuge:"46px"},{fontSize:Km,fontFamily:Xm,lineHeight:Ym}=Sn,Ms=I("body",`
|
|
15
|
+
</style>`}function Tu(e,t,n){const{styles:r,ids:i}=n;i.has(e)||r!==null&&(i.add(e),r.push($u(e,t)))}const ku=typeof document<"u";function Yt(){if(ku)return;const e=o.inject(Su,null);if(e!==null)return{adapter:(t,n)=>Tu(t,n,e),context:e}}function il(e,t){console.error(`[vueuc/${e}]: ${t}`)}const{c:_t}=Wa(),Ur="vueuc-style";function al(e){return e&-e}class Ru{constructor(t,n){this.l=t,this.min=n;const r=new Array(t+1);for(let i=0;i<t+1;++i)r[i]=0;this.ft=r}add(t,n){if(n===0)return;const{l:r,ft:i}=this;for(t+=1;t<=r;)i[t]+=n,t+=al(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:r,l:i}=this;if(t>i)throw new Error("[FinweckTree.sum]: `i` is larger than length.");let a=t*r;for(;t>0;)a+=n[t],t-=al(t);return a}getBound(t){let n=0,r=this.l;for(;r>n;){const i=Math.floor((n+r)/2),a=this.sum(i);if(a>t){r=i;continue}else if(a<t){if(n===i)return this.sum(n+1)<=t?n+1:i;n=i}else return i}return n}}function ll(e){return typeof e=="string"?document.querySelector(e):e()}const Pu=o.defineComponent({name:"LazyTeleport",props:{to:{type:[String,Object],default:void 0},disabled:Boolean,show:{type:Boolean,required:!0}},setup(e){return{showTeleport:du(o.toRef(e,"show")),mergedTo:o.computed(()=>{const{to:t}=e;return t??"body"})}},render(){return this.showTeleport?this.disabled?ei("lazy-teleport",this.$slots):o.h(o.Teleport,{disabled:this.disabled,to:this.mergedTo},ei("lazy-teleport",this.$slots)):null}}),Gr={top:"bottom",bottom:"top",left:"right",right:"left"},sl={start:"end",center:"center",end:"start"},oi={top:"height",bottom:"height",left:"width",right:"width"},Eu={"bottom-start":"top left",bottom:"top center","bottom-end":"top right","top-start":"bottom left",top:"bottom center","top-end":"bottom right","right-start":"top left",right:"center left","right-end":"bottom left","left-start":"top right",left:"center right","left-end":"bottom right"},zu={"bottom-start":"bottom left",bottom:"bottom center","bottom-end":"bottom right","top-start":"top left",top:"top center","top-end":"top right","right-start":"top right",right:"center right","right-end":"bottom right","left-start":"top left",left:"center left","left-end":"bottom left"},Bu={"bottom-start":"right","bottom-end":"left","top-start":"right","top-end":"left","right-start":"bottom","right-end":"top","left-start":"bottom","left-end":"top"},cl={top:!0,bottom:!1,left:!0,right:!1},dl={top:"end",bottom:"start",left:"end",right:"start"};function _u(e,t,n,r,i,a){if(!i||a)return{placement:e,top:0,left:0};const[l,s]=e.split("-");let c=s??"center",d={top:0,left:0};const u=(b,h,x)=>{let v=0,g=0;const k=n[b]-t[h]-t[b];return k>0&&r&&(x?g=cl[h]?k:-k:v=cl[h]?k:-k),{left:v,top:g}},f=l==="left"||l==="right";if(c!=="center"){const b=Bu[e],h=Gr[b],x=oi[b];if(n[x]>t[x]){if(t[b]+t[x]<n[x]){const v=(n[x]-t[x])/2;t[b]<v||t[h]<v?t[b]<t[h]?(c=sl[s],d=u(x,h,f)):d=u(x,b,f):c="center"}}else n[x]<t[x]&&t[h]<0&&t[b]>t[h]&&(c=sl[s])}else{const b=l==="bottom"||l==="top"?"left":"top",h=Gr[b],x=oi[b],v=(n[x]-t[x])/2;(t[b]<v||t[h]<v)&&(t[b]>t[h]?(c=dl[b],d=u(x,b,f)):(c=dl[h],d=u(x,h,f)))}let p=l;return t[l]<n[oi[l]]&&t[l]<t[Gr[l]]&&(p=Gr[l]),{placement:c!=="center"?`${p}-${c}`:p,left:d.left,top:d.top}}function Mu(e,t){return t?zu[e]:Eu[e]}function Ou(e,t,n,r,i,a){if(a)switch(e){case"bottom-start":return{top:`${Math.round(n.top-t.top+n.height)}px`,left:`${Math.round(n.left-t.left)}px`,transform:"translateY(-100%)"};case"bottom-end":return{top:`${Math.round(n.top-t.top+n.height)}px`,left:`${Math.round(n.left-t.left+n.width)}px`,transform:"translateX(-100%) translateY(-100%)"};case"top-start":return{top:`${Math.round(n.top-t.top)}px`,left:`${Math.round(n.left-t.left)}px`,transform:""};case"top-end":return{top:`${Math.round(n.top-t.top)}px`,left:`${Math.round(n.left-t.left+n.width)}px`,transform:"translateX(-100%)"};case"right-start":return{top:`${Math.round(n.top-t.top)}px`,left:`${Math.round(n.left-t.left+n.width)}px`,transform:"translateX(-100%)"};case"right-end":return{top:`${Math.round(n.top-t.top+n.height)}px`,left:`${Math.round(n.left-t.left+n.width)}px`,transform:"translateX(-100%) translateY(-100%)"};case"left-start":return{top:`${Math.round(n.top-t.top)}px`,left:`${Math.round(n.left-t.left)}px`,transform:""};case"left-end":return{top:`${Math.round(n.top-t.top+n.height)}px`,left:`${Math.round(n.left-t.left)}px`,transform:"translateY(-100%)"};case"top":return{top:`${Math.round(n.top-t.top)}px`,left:`${Math.round(n.left-t.left+n.width/2)}px`,transform:"translateX(-50%)"};case"right":return{top:`${Math.round(n.top-t.top+n.height/2)}px`,left:`${Math.round(n.left-t.left+n.width)}px`,transform:"translateX(-100%) translateY(-50%)"};case"left":return{top:`${Math.round(n.top-t.top+n.height/2)}px`,left:`${Math.round(n.left-t.left)}px`,transform:"translateY(-50%)"};case"bottom":default:return{top:`${Math.round(n.top-t.top+n.height)}px`,left:`${Math.round(n.left-t.left+n.width/2)}px`,transform:"translateX(-50%) translateY(-100%)"}}switch(e){case"bottom-start":return{top:`${Math.round(n.top-t.top+n.height+r)}px`,left:`${Math.round(n.left-t.left+i)}px`,transform:""};case"bottom-end":return{top:`${Math.round(n.top-t.top+n.height+r)}px`,left:`${Math.round(n.left-t.left+n.width+i)}px`,transform:"translateX(-100%)"};case"top-start":return{top:`${Math.round(n.top-t.top+r)}px`,left:`${Math.round(n.left-t.left+i)}px`,transform:"translateY(-100%)"};case"top-end":return{top:`${Math.round(n.top-t.top+r)}px`,left:`${Math.round(n.left-t.left+n.width+i)}px`,transform:"translateX(-100%) translateY(-100%)"};case"right-start":return{top:`${Math.round(n.top-t.top+r)}px`,left:`${Math.round(n.left-t.left+n.width+i)}px`,transform:""};case"right-end":return{top:`${Math.round(n.top-t.top+n.height+r)}px`,left:`${Math.round(n.left-t.left+n.width+i)}px`,transform:"translateY(-100%)"};case"left-start":return{top:`${Math.round(n.top-t.top+r)}px`,left:`${Math.round(n.left-t.left+i)}px`,transform:"translateX(-100%)"};case"left-end":return{top:`${Math.round(n.top-t.top+n.height+r)}px`,left:`${Math.round(n.left-t.left+i)}px`,transform:"translateX(-100%) translateY(-100%)"};case"top":return{top:`${Math.round(n.top-t.top+r)}px`,left:`${Math.round(n.left-t.left+n.width/2+i)}px`,transform:"translateY(-100%) translateX(-50%)"};case"right":return{top:`${Math.round(n.top-t.top+n.height/2+r)}px`,left:`${Math.round(n.left-t.left+n.width+i)}px`,transform:"translateY(-50%)"};case"left":return{top:`${Math.round(n.top-t.top+n.height/2+r)}px`,left:`${Math.round(n.left-t.left+i)}px`,transform:"translateY(-50%) translateX(-100%)"};case"bottom":default:return{top:`${Math.round(n.top-t.top+n.height+r)}px`,left:`${Math.round(n.left-t.left+n.width/2+i)}px`,transform:"translateX(-50%)"}}}const Au=_t([_t(".v-binder-follower-container",{position:"absolute",left:"0",right:"0",top:"0",height:"0",pointerEvents:"none",zIndex:"auto"}),_t(".v-binder-follower-content",{position:"absolute",zIndex:"auto"},[_t("> *",{pointerEvents:"all"})])]),qr=o.defineComponent({name:"Follower",inheritAttrs:!1,props:{show:Boolean,enabled:{type:Boolean,default:void 0},placement:{type:String,default:"bottom"},syncTrigger:{type:Array,default:["resize","scroll"]},to:[String,Object],flip:{type:Boolean,default:!0},internalShift:Boolean,x:Number,y:Number,width:String,minWidth:String,containerClass:String,teleportDisabled:Boolean,zindexable:{type:Boolean,default:!0},zIndex:Number,overlap:Boolean},setup(e){const t=o.inject("VBinder"),n=Je(()=>e.enabled!==void 0?e.enabled:e.show),r=o.ref(null),i=o.ref(null),a=()=>{const{syncTrigger:p}=e;p.includes("scroll")&&t.addScrollListener(c),p.includes("resize")&&t.addResizeListener(c)},l=()=>{t.removeScrollListener(c),t.removeResizeListener(c)};o.onMounted(()=>{n.value&&(c(),a())});const s=Yt();Au.mount({id:"vueuc/binder",head:!0,anchorMetaName:Ur,ssr:s}),o.onBeforeUnmount(()=>{l()}),qa(()=>{n.value&&c()});const c=()=>{if(!n.value)return;const p=r.value;if(p===null)return;const b=t.targetRef,{x:h,y:x,overlap:v}=e,g=h!==void 0&&x!==void 0?xu(h,x):ni(b);p.style.setProperty("--v-target-width",`${Math.round(g.width)}px`),p.style.setProperty("--v-target-height",`${Math.round(g.height)}px`);const{width:k,minWidth:z,placement:$,internalShift:T,flip:O}=e;p.setAttribute("v-placement",$),v?p.setAttribute("v-overlap",""):p.removeAttribute("v-overlap");const{style:m}=p;k==="target"?m.width=`${g.width}px`:k!==void 0?m.width=k:m.width="",z==="target"?m.minWidth=`${g.width}px`:z!==void 0?m.minWidth=z:m.minWidth="";const S=ni(p),M=ni(i.value),{left:N,top:A,placement:L}=_u($,g,S,T,O,v),U=Mu(L,v),{left:J,top:j,transform:Q}=Ou(L,M,g,A,N,v);p.setAttribute("v-placement",L),p.style.setProperty("--v-offset-left",`${Math.round(N)}px`),p.style.setProperty("--v-offset-top",`${Math.round(A)}px`),p.style.transform=`translateX(${J}) translateY(${j}) ${Q}`,p.style.setProperty("--v-transform-origin",U),p.style.transformOrigin=U};o.watch(n,p=>{p?(a(),d()):l()});const d=()=>{o.nextTick().then(c).catch(p=>console.error(p))};["placement","x","y","internalShift","flip","width","overlap","minWidth"].forEach(p=>{o.watch(o.toRef(e,p),c)}),["teleportDisabled"].forEach(p=>{o.watch(o.toRef(e,p),d)}),o.watch(o.toRef(e,"syncTrigger"),p=>{p.includes("resize")?t.addResizeListener(c):t.removeResizeListener(c),p.includes("scroll")?t.addScrollListener(c):t.removeScrollListener(c)});const u=Ln(),f=Je(()=>{const{to:p}=e;if(p!==void 0)return p;u.value});return{VBinder:t,mergedEnabled:n,offsetContainerRef:i,followerRef:r,mergedTo:f,syncPosition:c}},render(){return o.h(Pu,{show:this.show,to:this.mergedTo,disabled:this.teleportDisabled},{default:()=>{var e,t;const n=o.h("div",{class:["v-binder-follower-container",this.containerClass],ref:"offsetContainerRef"},[o.h("div",{class:"v-binder-follower-content",ref:"followerRef"},(t=(e=this.$slots).default)===null||t===void 0?void 0:t.call(e))]);return this.zindexable?o.withDirectives(n,[[ol,{enabled:this.mergedEnabled,zIndex:this.zIndex}]]):n}})}});var mn=[],Iu=function(){return mn.some(function(e){return e.activeTargets.length>0})},Fu=function(){return mn.some(function(e){return e.skippedTargets.length>0})},ul="ResizeObserver loop completed with undelivered notifications.",Du=function(){var e;typeof ErrorEvent=="function"?e=new ErrorEvent("error",{message:ul}):(e=document.createEvent("Event"),e.initEvent("error",!1,!1),e.message=ul),window.dispatchEvent(e)},lr;(function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(lr||(lr={}));var gn=function(e){return Object.freeze(e)},Nu=function(){function e(t,n){this.inlineSize=t,this.blockSize=n,gn(this)}return e}(),fl=function(){function e(t,n,r,i){return this.x=t,this.y=n,this.width=r,this.height=i,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,gn(this)}return e.prototype.toJSON=function(){var t=this,n=t.x,r=t.y,i=t.top,a=t.right,l=t.bottom,s=t.left,c=t.width,d=t.height;return{x:n,y:r,top:i,right:a,bottom:l,left:s,width:c,height:d}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),ii=function(e){return e instanceof SVGElement&&"getBBox"in e},hl=function(e){if(ii(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var i=e,a=i.offsetWidth,l=i.offsetHeight;return!(a||l||e.getClientRects().length)},pl=function(e){var t;if(e instanceof Element)return!0;var n=(t=e==null?void 0:e.ownerDocument)===null||t===void 0?void 0:t.defaultView;return!!(n&&e instanceof n.Element)},Lu=function(e){switch(e.tagName){case"INPUT":if(e.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},sr=typeof window<"u"?window:{},Kr=new WeakMap,bl=/auto|scroll/,Hu=/^tb|vertical/,Vu=/msie|trident/i.test(sr.navigator&&sr.navigator.userAgent),Mt=function(e){return parseFloat(e||"0")},Wn=function(e,t,n){return e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=!1),new Nu((n?t:e)||0,(n?e:t)||0)},ml=gn({devicePixelContentBoxSize:Wn(),borderBoxSize:Wn(),contentBoxSize:Wn(),contentRect:new fl(0,0,0,0)}),gl=function(e,t){if(t===void 0&&(t=!1),Kr.has(e)&&!t)return Kr.get(e);if(hl(e))return Kr.set(e,ml),ml;var n=getComputedStyle(e),r=ii(e)&&e.ownerSVGElement&&e.getBBox(),i=!Vu&&n.boxSizing==="border-box",a=Hu.test(n.writingMode||""),l=!r&&bl.test(n.overflowY||""),s=!r&&bl.test(n.overflowX||""),c=r?0:Mt(n.paddingTop),d=r?0:Mt(n.paddingRight),u=r?0:Mt(n.paddingBottom),f=r?0:Mt(n.paddingLeft),p=r?0:Mt(n.borderTopWidth),b=r?0:Mt(n.borderRightWidth),h=r?0:Mt(n.borderBottomWidth),x=r?0:Mt(n.borderLeftWidth),v=f+d,g=c+u,k=x+b,z=p+h,$=s?e.offsetHeight-z-e.clientHeight:0,T=l?e.offsetWidth-k-e.clientWidth:0,O=i?v+k:0,m=i?g+z:0,S=r?r.width:Mt(n.width)-O-T,M=r?r.height:Mt(n.height)-m-$,N=S+v+T+k,A=M+g+$+z,L=gn({devicePixelContentBoxSize:Wn(Math.round(S*devicePixelRatio),Math.round(M*devicePixelRatio),a),borderBoxSize:Wn(N,A,a),contentBoxSize:Wn(S,M,a),contentRect:new fl(f,c,S,M)});return Kr.set(e,L),L},vl=function(e,t,n){var r=gl(e,n),i=r.borderBoxSize,a=r.contentBoxSize,l=r.devicePixelContentBoxSize;switch(t){case lr.DEVICE_PIXEL_CONTENT_BOX:return l;case lr.BORDER_BOX:return i;default:return a}},ju=function(){function e(t){var n=gl(t);this.target=t,this.contentRect=n.contentRect,this.borderBoxSize=gn([n.borderBoxSize]),this.contentBoxSize=gn([n.contentBoxSize]),this.devicePixelContentBoxSize=gn([n.devicePixelContentBoxSize])}return e}(),xl=function(e){if(hl(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},Wu=function(){var e=1/0,t=[];mn.forEach(function(l){if(l.activeTargets.length!==0){var s=[];l.activeTargets.forEach(function(d){var u=new ju(d.target),f=xl(d.target);s.push(u),d.lastReportedSize=vl(d.target,d.observedBox),f<e&&(e=f)}),t.push(function(){l.callback.call(l.observer,s,l.observer)}),l.activeTargets.splice(0,l.activeTargets.length)}});for(var n=0,r=t;n<r.length;n++){var i=r[n];i()}return e},yl=function(e){mn.forEach(function(n){n.activeTargets.splice(0,n.activeTargets.length),n.skippedTargets.splice(0,n.skippedTargets.length),n.observationTargets.forEach(function(i){i.isActive()&&(xl(i.target)>e?n.activeTargets.push(i):n.skippedTargets.push(i))})})},Uu=function(){var e=0;for(yl(e);Iu();)e=Wu(),yl(e);return Fu()&&Du(),e>0},ai,wl=[],Gu=function(){return wl.splice(0).forEach(function(e){return e()})},qu=function(e){if(!ai){var t=0,n=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return Gu()}).observe(n,r),ai=function(){n.textContent="".concat(t?t--:t++)}}wl.push(e),ai()},Ku=function(e){qu(function(){requestAnimationFrame(e)})},Xr=0,Xu=function(){return!!Xr},Yu=250,Zu={attributes:!0,characterData:!0,childList:!0,subtree:!0},Cl=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Sl=function(e){return e===void 0&&(e=0),Date.now()+e},li=!1,Ju=function(){function e(){var t=this;this.stopped=!0,this.listener=function(){return t.schedule()}}return e.prototype.run=function(t){var n=this;if(t===void 0&&(t=Yu),!li){li=!0;var r=Sl(t);Ku(function(){var i=!1;try{i=Uu()}finally{if(li=!1,t=r-Sl(),!Xu())return;i?n.run(1e3):t>0?n.run(t):n.start()}})}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var t=this,n=function(){return t.observer&&t.observer.observe(document.body,Zu)};document.body?n():sr.addEventListener("DOMContentLoaded",n)},e.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Cl.forEach(function(n){return sr.addEventListener(n,t.listener,!0)}))},e.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),Cl.forEach(function(n){return sr.removeEventListener(n,t.listener,!0)}),this.stopped=!0)},e}(),si=new Ju,$l=function(e){!Xr&&e>0&&si.start(),Xr+=e,!Xr&&si.stop()},Qu=function(e){return!ii(e)&&!Lu(e)&&getComputedStyle(e).display==="inline"},ef=function(){function e(t,n){this.target=t,this.observedBox=n||lr.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var t=vl(this.target,this.observedBox,!0);return Qu(this.target)&&(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e}(),tf=function(){function e(t,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=n}return e}(),Yr=new WeakMap,Tl=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return-1},Zr=function(){function e(){}return e.connect=function(t,n){var r=new tf(t,n);Yr.set(t,r)},e.observe=function(t,n,r){var i=Yr.get(t),a=i.observationTargets.length===0;Tl(i.observationTargets,n)<0&&(a&&mn.push(i),i.observationTargets.push(new ef(n,r&&r.box)),$l(1),si.schedule())},e.unobserve=function(t,n){var r=Yr.get(t),i=Tl(r.observationTargets,n),a=r.observationTargets.length===1;i>=0&&(a&&mn.splice(mn.indexOf(r),1),r.observationTargets.splice(i,1),$l(-1))},e.disconnect=function(t){var n=this,r=Yr.get(t);r.observationTargets.slice().forEach(function(i){return n.unobserve(t,i.target)}),r.activeTargets.splice(0,r.activeTargets.length)},e}(),nf=function(){function e(t){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof t!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");Zr.connect(this,t)}return e.prototype.observe=function(t,n){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!pl(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Zr.observe(this,t,n)},e.prototype.unobserve=function(t){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!pl(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Zr.unobserve(this,t)},e.prototype.disconnect=function(){Zr.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}();class rf{constructor(){this.handleResize=this.handleResize.bind(this),this.observer=new(typeof window<"u"&&window.ResizeObserver||nf)(this.handleResize),this.elHandlersMap=new Map}handleResize(t){for(const n of t){const r=this.elHandlersMap.get(n.target);r!==void 0&&r(n)}}registerHandler(t,n){this.elHandlersMap.set(t,n),this.observer.observe(t)}unregisterHandler(t){this.elHandlersMap.has(t)&&(this.elHandlersMap.delete(t),this.observer.unobserve(t))}}const Jr=new rf,Zt=o.defineComponent({name:"ResizeObserver",props:{onResize:Function},setup(e){let t=!1;const n=o.getCurrentInstance().proxy;function r(i){const{onResize:a}=e;a!==void 0&&a(i)}o.onMounted(()=>{const i=n.$el;if(i===void 0){il("resize-observer","$el does not exist.");return}if(i.nextElementSibling!==i.nextSibling&&i.nodeType===3&&i.nodeValue!==""){il("resize-observer","$el can not be observed (it may be a text node).");return}i.nextElementSibling!==null&&(Jr.registerHandler(i.nextElementSibling,r),t=!0)}),o.onBeforeUnmount(()=>{t&&Jr.unregisterHandler(n.$el.nextElementSibling)})},render(){return o.renderSlot(this.$slots,"default")}});let Qr;function of(){return typeof document>"u"?!1:(Qr===void 0&&("matchMedia"in window?Qr=window.matchMedia("(pointer:coarse)").matches:Qr=!1),Qr)}let ci;function kl(){return typeof document>"u"?1:(ci===void 0&&(ci="chrome"in window?window.devicePixelRatio:1),ci)}const af=_t(".v-vl",{maxHeight:"inherit",height:"100%",overflow:"auto",minWidth:"1px"},[_t("&:not(.v-vl--show-scrollbar)",{scrollbarWidth:"none"},[_t("&::-webkit-scrollbar, &::-webkit-scrollbar-track-piece, &::-webkit-scrollbar-thumb",{width:0,height:0,display:"none"})])]),lf=o.defineComponent({name:"VirtualList",inheritAttrs:!1,props:{showScrollbar:{type:Boolean,default:!0},items:{type:Array,default:()=>[]},itemSize:{type:Number,required:!0},itemResizable:Boolean,itemsStyle:[String,Object],visibleItemsTag:{type:[String,Object],default:"div"},visibleItemsProps:Object,ignoreItemResize:Boolean,onScroll:Function,onWheel:Function,onResize:Function,defaultScrollKey:[Number,String],defaultScrollIndex:Number,keyField:{type:String,default:"key"},paddingTop:{type:[Number,String],default:0},paddingBottom:{type:[Number,String],default:0}},setup(e){const t=Yt();af.mount({id:"vueuc/virtual-list",head:!0,anchorMetaName:Ur,ssr:t}),o.onMounted(()=>{const{defaultScrollIndex:A,defaultScrollKey:L}=e;A!=null?h({index:A}):L!=null&&h({key:L})});let n=!1,r=!1;o.onActivated(()=>{if(n=!1,!r){r=!0;return}h({top:f.value,left:u})}),o.onDeactivated(()=>{n=!0,r||(r=!0)});const i=o.computed(()=>{const A=new Map,{keyField:L}=e;return e.items.forEach((U,J)=>{A.set(U[L],J)}),A}),a=o.ref(null),l=o.ref(void 0),s=new Map,c=o.computed(()=>{const{items:A,itemSize:L,keyField:U}=e,J=new Ru(A.length,L);return A.forEach((j,Q)=>{const Y=j[U],ie=s.get(Y);ie!==void 0&&J.add(Q,ie)}),J}),d=o.ref(0);let u=0;const f=o.ref(0),p=Je(()=>Math.max(c.value.getBound(f.value-at(e.paddingTop))-1,0)),b=o.computed(()=>{const{value:A}=l;if(A===void 0)return[];const{items:L,itemSize:U}=e,J=p.value,j=Math.min(J+Math.ceil(A/U+1),L.length-1),Q=[];for(let Y=J;Y<=j;++Y)Q.push(L[Y]);return Q}),h=(A,L)=>{if(typeof A=="number"){k(A,L,"auto");return}const{left:U,top:J,index:j,key:Q,position:Y,behavior:ie,debounce:me=!0}=A;if(U!==void 0||J!==void 0)k(U,J,ie);else if(j!==void 0)g(j,ie,me);else if(Q!==void 0){const ae=i.value.get(Q);ae!==void 0&&g(ae,ie,me)}else Y==="bottom"?k(0,Number.MAX_SAFE_INTEGER,ie):Y==="top"&&k(0,0,ie)};let x,v=null;function g(A,L,U){const{value:J}=c,j=J.sum(A)+at(e.paddingTop);if(!U)a.value.scrollTo({left:0,top:j,behavior:L});else{x=A,v!==null&&window.clearTimeout(v),v=window.setTimeout(()=>{x=void 0,v=null},16);const{scrollTop:Q,offsetHeight:Y}=a.value;if(j>Q){const ie=J.get(A);j+ie<=Q+Y||a.value.scrollTo({left:0,top:j+ie-Y,behavior:L})}else a.value.scrollTo({left:0,top:j,behavior:L})}}function k(A,L,U){a.value.scrollTo({left:A,top:L,behavior:U})}function z(A,L){var U,J,j;if(n||e.ignoreItemResize||N(L.target))return;const{value:Q}=c,Y=i.value.get(A),ie=Q.get(Y),me=(j=(J=(U=L.borderBoxSize)===null||U===void 0?void 0:U[0])===null||J===void 0?void 0:J.blockSize)!==null&&j!==void 0?j:L.contentRect.height;if(me===ie)return;me-e.itemSize===0?s.delete(A):s.set(A,me-e.itemSize);const he=me-ie;if(he===0)return;Q.add(Y,he);const G=a.value;if(G!=null){if(x===void 0){const te=Q.sum(Y);G.scrollTop>te&&G.scrollBy(0,he)}else if(Y<x)G.scrollBy(0,he);else if(Y===x){const te=Q.sum(Y);me+te>G.scrollTop+G.offsetHeight&&G.scrollBy(0,he)}M()}d.value++}const $=!of();let T=!1;function O(A){var L;(L=e.onScroll)===null||L===void 0||L.call(e,A),(!$||!T)&&M()}function m(A){var L;if((L=e.onWheel)===null||L===void 0||L.call(e,A),$){const U=a.value;if(U!=null){if(A.deltaX===0&&(U.scrollTop===0&&A.deltaY<=0||U.scrollTop+U.offsetHeight>=U.scrollHeight&&A.deltaY>=0))return;A.preventDefault(),U.scrollTop+=A.deltaY/kl(),U.scrollLeft+=A.deltaX/kl(),M(),T=!0,Ba(()=>{T=!1})}}}function S(A){if(n||N(A.target)||A.contentRect.height===l.value)return;l.value=A.contentRect.height;const{onResize:L}=e;L!==void 0&&L(A)}function M(){const{value:A}=a;A!=null&&(f.value=A.scrollTop,u=A.scrollLeft)}function N(A){let L=A;for(;L!==null;){if(L.style.display==="none")return!0;L=L.parentElement}return!1}return{listHeight:l,listStyle:{overflow:"auto"},keyToIndex:i,itemsStyle:o.computed(()=>{const{itemResizable:A}=e,L=dn(c.value.sum());return d.value,[e.itemsStyle,{boxSizing:"content-box",height:A?"":L,minHeight:A?L:"",paddingTop:dn(e.paddingTop),paddingBottom:dn(e.paddingBottom)}]}),visibleItemsStyle:o.computed(()=>(d.value,{transform:`translateY(${dn(c.value.sum(p.value))})`})),viewportItems:b,listElRef:a,itemsElRef:o.ref(null),scrollTo:h,handleListResize:S,handleListScroll:O,handleListWheel:m,handleItemResize:z}},render(){const{itemResizable:e,keyField:t,keyToIndex:n,visibleItemsTag:r}=this;return o.h(Zt,{onResize:this.handleListResize},{default:()=>{var i,a;return o.h("div",o.mergeProps(this.$attrs,{class:["v-vl",this.showScrollbar&&"v-vl--show-scrollbar"],onScroll:this.handleListScroll,onWheel:this.handleListWheel,ref:"listElRef"}),[this.items.length!==0?o.h("div",{ref:"itemsElRef",class:"v-vl-items",style:this.itemsStyle},[o.h(r,Object.assign({class:"v-vl-visible-items",style:this.visibleItemsStyle},this.visibleItemsProps),{default:()=>this.viewportItems.map(l=>{const s=l[t],c=n.get(s),d=this.$slots.default({item:l,index:c})[0];return e?o.h(Zt,{key:s,onResize:u=>this.handleItemResize(s,u)},{default:()=>d}):(d.key=s,d)})})]):(a=(i=this.$slots).empty)===null||a===void 0?void 0:a.call(i)])}})}}),sf=_t(".v-x-scroll",{overflow:"auto",scrollbarWidth:"none"},[_t("&::-webkit-scrollbar",{width:0,height:0})]),cf=o.defineComponent({name:"XScroll",props:{disabled:Boolean,onScroll:Function},setup(){const e=o.ref(null);function t(i){!(i.currentTarget.offsetWidth<i.currentTarget.scrollWidth)||i.deltaY===0||(i.currentTarget.scrollLeft+=i.deltaY+i.deltaX,i.preventDefault())}const n=Yt();return sf.mount({id:"vueuc/x-scroll",head:!0,anchorMetaName:Ur,ssr:n}),Object.assign({selfRef:e,handleWheel:t},{scrollTo(...i){var a;(a=e.value)===null||a===void 0||a.scrollTo(...i)}})},render(){return o.h("div",{ref:"selfRef",onScroll:this.onScroll,onWheel:this.disabled?void 0:this.handleWheel,class:"v-x-scroll"},this.$slots)}}),Ft="v-hidden",df=_t("[v-hidden]",{display:"none!important"}),Rl=o.defineComponent({name:"Overflow",props:{getCounter:Function,getTail:Function,updateCounter:Function,onUpdateCount:Function,onUpdateOverflow:Function},setup(e,{slots:t}){const n=o.ref(null),r=o.ref(null);function i(l){const{value:s}=n,{getCounter:c,getTail:d}=e;let u;if(c!==void 0?u=c():u=r.value,!s||!u)return;u.hasAttribute(Ft)&&u.removeAttribute(Ft);const{children:f}=s;if(l.showAllItemsBeforeCalculate)for(const z of f)z.hasAttribute(Ft)&&z.removeAttribute(Ft);const p=s.offsetWidth,b=[],h=t.tail?d==null?void 0:d():null;let x=h?h.offsetWidth:0,v=!1;const g=s.children.length-(t.tail?1:0);for(let z=0;z<g-1;++z){if(z<0)continue;const $=f[z];if(v){$.hasAttribute(Ft)||$.setAttribute(Ft,"");continue}else $.hasAttribute(Ft)&&$.removeAttribute(Ft);const T=$.offsetWidth;if(x+=T,b[z]=T,x>p){const{updateCounter:O}=e;for(let m=z;m>=0;--m){const S=g-1-m;O!==void 0?O(S):u.textContent=`${S}`;const M=u.offsetWidth;if(x-=b[m],x+M<=p||m===0){v=!0,z=m-1,h&&(z===-1?(h.style.maxWidth=`${p-M}px`,h.style.boxSizing="border-box"):h.style.maxWidth="");const{onUpdateCount:N}=e;N&&N(S);break}}}}const{onUpdateOverflow:k}=e;v?k!==void 0&&k(!0):(k!==void 0&&k(!1),u.setAttribute(Ft,""))}const a=Yt();return df.mount({id:"vueuc/overflow",head:!0,anchorMetaName:Ur,ssr:a}),o.onMounted(()=>i({showAllItemsBeforeCalculate:!1})),{selfRef:n,counterRef:r,sync:i}},render(){const{$slots:e}=this;return o.nextTick(()=>this.sync({showAllItemsBeforeCalculate:!1})),o.h("div",{class:"v-overflow",ref:"selfRef"},[o.renderSlot(e,"default"),e.counter?e.counter():o.h("span",{style:{display:"inline-block"},ref:"counterRef"}),e.tail?e.tail():null])}});function Pl(e){return e instanceof HTMLElement}function El(e){for(let t=0;t<e.childNodes.length;t++){const n=e.childNodes[t];if(Pl(n)&&(Bl(n)||El(n)))return!0}return!1}function zl(e){for(let t=e.childNodes.length-1;t>=0;t--){const n=e.childNodes[t];if(Pl(n)&&(Bl(n)||zl(n)))return!0}return!1}function Bl(e){if(!uf(e))return!1;try{e.focus({preventScroll:!0})}catch{}return document.activeElement===e}function uf(e){if(e.tabIndex>0||e.tabIndex===0&&e.getAttribute("tabIndex")!==null)return!0;if(e.getAttribute("disabled"))return!1;switch(e.nodeName){case"A":return!!e.href&&e.rel!=="ignore";case"INPUT":return e.type!=="hidden"&&e.type!=="file";case"BUTTON":case"SELECT":case"TEXTAREA":return!0;default:return!1}}let cr=[];const ff=o.defineComponent({name:"FocusTrap",props:{disabled:Boolean,active:Boolean,autoFocus:{type:Boolean,default:!0},onEsc:Function,initialFocusTo:String,finalFocusTo:String,returnFocusOnDeactivated:{type:Boolean,default:!0}},setup(e){const t=_d(),n=o.ref(null),r=o.ref(null);let i=!1,a=!1;const l=typeof document>"u"?null:document.activeElement;function s(){return cr[cr.length-1]===t}function c(v){var g;v.code==="Escape"&&s()&&((g=e.onEsc)===null||g===void 0||g.call(e,v))}o.onMounted(()=>{o.watch(()=>e.active,v=>{v?(f(),ze("keydown",document,c)):(ke("keydown",document,c),i&&p())},{immediate:!0})}),o.onBeforeUnmount(()=>{ke("keydown",document,c),i&&p()});function d(v){if(!a&&s()){const g=u();if(g===null||g.contains(An(v)))return;b("first")}}function u(){const v=n.value;if(v===null)return null;let g=v;for(;g=g.nextSibling,!(g===null||g instanceof Element&&g.tagName==="DIV"););return g}function f(){var v;if(!e.disabled){if(cr.push(t),e.autoFocus){const{initialFocusTo:g}=e;g===void 0?b("first"):(v=ll(g))===null||v===void 0||v.focus({preventScroll:!0})}i=!0,document.addEventListener("focus",d,!0)}}function p(){var v;if(e.disabled||(document.removeEventListener("focus",d,!0),cr=cr.filter(k=>k!==t),s()))return;const{finalFocusTo:g}=e;g!==void 0?(v=ll(g))===null||v===void 0||v.focus({preventScroll:!0}):e.returnFocusOnDeactivated&&l instanceof HTMLElement&&(a=!0,l.focus({preventScroll:!0}),a=!1)}function b(v){if(s()&&e.active){const g=n.value,k=r.value;if(g!==null&&k!==null){const z=u();if(z==null||z===k){a=!0,g.focus({preventScroll:!0}),a=!1;return}a=!0;const $=v==="first"?El(z):zl(z);a=!1,$||(a=!0,g.focus({preventScroll:!0}),a=!1)}}}function h(v){if(a)return;const g=u();g!==null&&(v.relatedTarget!==null&&g.contains(v.relatedTarget)?b("last"):b("first"))}function x(v){a||(v.relatedTarget!==null&&v.relatedTarget===n.value?b("last"):b("first"))}return{focusableStartRef:n,focusableEndRef:r,focusableStyle:"position: absolute; height: 0; width: 0;",handleStartFocus:h,handleEndFocus:x}},render(){const{default:e}=this.$slots;if(e===void 0)return null;if(this.disabled)return e();const{active:t,focusableStyle:n}=this;return o.h(o.Fragment,null,[o.h("div",{"aria-hidden":"true",tabindex:t?"0":"-1",ref:"focusableStartRef",style:n,onFocus:this.handleStartFocus}),e(),o.h("div",{"aria-hidden":"true",style:n,ref:"focusableEndRef",tabindex:t?"0":"-1",onFocus:this.handleEndFocus})])}});function _l(e,t){t&&(o.onMounted(()=>{const{value:n}=e;n&&Jr.registerHandler(n,t)}),o.onBeforeUnmount(()=>{const{value:n}=e;n&&Jr.unregisterHandler(n)}))}function hf(e){const t={isDeactivated:!1};let n=!1;return o.onActivated(()=>{if(t.isDeactivated=!1,!n){n=!0;return}e()}),o.onDeactivated(()=>{t.isDeactivated=!0,n||(n=!0)}),t}const Ml="n-form-item";function vn(e,{defaultSize:t="medium",mergedSize:n,mergedDisabled:r}={}){const i=o.inject(Ml,null);o.provide(Ml,null);const a=o.computed(n?()=>n(i):()=>{const{size:c}=e;if(c)return c;if(i){const{mergedSize:d}=i;if(d.value!==void 0)return d.value}return t}),l=o.computed(r?()=>r(i):()=>{const{disabled:c}=e;return c!==void 0?c:i?i.disabled.value:!1}),s=o.computed(()=>{const{status:c}=e;return c||(i==null?void 0:i.mergedValidationStatus.value)});return o.onBeforeUnmount(()=>{i&&i.restoreValidation()}),{mergedSizeRef:a,mergedDisabledRef:l,mergedStatusRef:s,nTriggerFormBlur(){i&&i.handleContentBlur()},nTriggerFormChange(){i&&i.handleContentChange()},nTriggerFormFocus(){i&&i.handleContentFocus()},nTriggerFormInput(){i&&i.handleContentInput()}}}var Ol=typeof global=="object"&&global&&global.Object===Object&&global,pf=typeof self=="object"&&self&&self.Object===Object&&self,$t=Ol||pf||Function("return this")(),Jt=$t.Symbol,Al=Object.prototype,bf=Al.hasOwnProperty,mf=Al.toString,dr=Jt?Jt.toStringTag:void 0;function gf(e){var t=bf.call(e,dr),n=e[dr];try{e[dr]=void 0;var r=!0}catch{}var i=mf.call(e);return r&&(t?e[dr]=n:delete e[dr]),i}var vf=Object.prototype,xf=vf.toString;function yf(e){return xf.call(e)}var wf="[object Null]",Cf="[object Undefined]",Il=Jt?Jt.toStringTag:void 0;function xn(e){return e==null?e===void 0?Cf:wf:Il&&Il in Object(e)?gf(e):yf(e)}function Qt(e){return e!=null&&typeof e=="object"}var Sf="[object Symbol]";function eo(e){return typeof e=="symbol"||Qt(e)&&xn(e)==Sf}function Fl(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var vt=Array.isArray,$f=1/0,Dl=Jt?Jt.prototype:void 0,Nl=Dl?Dl.toString:void 0;function Ll(e){if(typeof e=="string")return e;if(vt(e))return Fl(e,Ll)+"";if(eo(e))return Nl?Nl.call(e):"";var t=e+"";return t=="0"&&1/e==-$f?"-0":t}var Tf=/\s/;function kf(e){for(var t=e.length;t--&&Tf.test(e.charAt(t)););return t}var Rf=/^\s+/;function Pf(e){return e&&e.slice(0,kf(e)+1).replace(Rf,"")}function xt(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Hl=NaN,Ef=/^[-+]0x[0-9a-f]+$/i,zf=/^0b[01]+$/i,Bf=/^0o[0-7]+$/i,_f=parseInt;function Vl(e){if(typeof e=="number")return e;if(eo(e))return Hl;if(xt(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=xt(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Pf(e);var n=zf.test(e);return n||Bf.test(e)?_f(e.slice(2),n?2:8):Ef.test(e)?Hl:+e}function di(e){return e}var Mf="[object AsyncFunction]",Of="[object Function]",Af="[object GeneratorFunction]",If="[object Proxy]";function ui(e){if(!xt(e))return!1;var t=xn(e);return t==Of||t==Af||t==Mf||t==If}var fi=$t["__core-js_shared__"],jl=function(){var e=/[^.]+$/.exec(fi&&fi.keys&&fi.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Ff(e){return!!jl&&jl in e}var Df=Function.prototype,Nf=Df.toString;function yn(e){if(e!=null){try{return Nf.call(e)}catch{}try{return e+""}catch{}}return""}var Lf=/[\\^$.*+?()[\]{}|]/g,Hf=/^\[object .+?Constructor\]$/,Vf=Function.prototype,jf=Object.prototype,Wf=Vf.toString,Uf=jf.hasOwnProperty,Gf=RegExp("^"+Wf.call(Uf).replace(Lf,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function qf(e){if(!xt(e)||Ff(e))return!1;var t=ui(e)?Gf:Hf;return t.test(yn(e))}function Kf(e,t){return e==null?void 0:e[t]}function wn(e,t){var n=Kf(e,t);return qf(n)?n:void 0}var hi=wn($t,"WeakMap"),Wl=Object.create,Xf=function(){function e(){}return function(t){if(!xt(t))return{};if(Wl)return Wl(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function Yf(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function Zf(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var Jf=800,Qf=16,eh=Date.now;function th(e){var t=0,n=0;return function(){var r=eh(),i=Qf-(r-n);if(n=r,i>0){if(++t>=Jf)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function nh(e){return function(){return e}}var to=function(){try{var e=wn(Object,"defineProperty");return e({},"",{}),e}catch{}}(),rh=to?function(e,t){return to(e,"toString",{configurable:!0,enumerable:!1,value:nh(t),writable:!0})}:di,oh=th(rh),ih=9007199254740991,ah=/^(?:0|[1-9]\d*)$/;function pi(e,t){var n=typeof e;return t=t??ih,!!t&&(n=="number"||n!="symbol"&&ah.test(e))&&e>-1&&e%1==0&&e<t}function bi(e,t,n){t=="__proto__"&&to?to(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function ur(e,t){return e===t||e!==e&&t!==t}var lh=Object.prototype,sh=lh.hasOwnProperty;function ch(e,t,n){var r=e[t];(!(sh.call(e,t)&&ur(r,n))||n===void 0&&!(t in e))&&bi(e,t,n)}function dh(e,t,n,r){var i=!n;n||(n={});for(var a=-1,l=t.length;++a<l;){var s=t[a],c=void 0;c===void 0&&(c=e[s]),i?bi(n,s,c):ch(n,s,c)}return n}var Ul=Math.max;function uh(e,t,n){return t=Ul(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,a=Ul(r.length-t,0),l=Array(a);++i<a;)l[i]=r[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=r[i];return s[t]=n(l),Yf(e,this,s)}}function fh(e,t){return oh(uh(e,t,di),e+"")}var hh=9007199254740991;function mi(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=hh}function Un(e){return e!=null&&mi(e.length)&&!ui(e)}function ph(e,t,n){if(!xt(n))return!1;var r=typeof t;return(r=="number"?Un(n)&&pi(t,n.length):r=="string"&&t in n)?ur(n[t],e):!1}function bh(e){return fh(function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,l=i>2?n[2]:void 0;for(a=e.length>3&&typeof a=="function"?(i--,a):void 0,l&&ph(n[0],n[1],l)&&(a=i<3?void 0:a,i=1),t=Object(t);++r<i;){var s=n[r];s&&e(t,s,r,a)}return t})}var mh=Object.prototype;function gi(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||mh;return e===n}function gh(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var vh="[object Arguments]";function Gl(e){return Qt(e)&&xn(e)==vh}var ql=Object.prototype,xh=ql.hasOwnProperty,yh=ql.propertyIsEnumerable,no=Gl(function(){return arguments}())?Gl:function(e){return Qt(e)&&xh.call(e,"callee")&&!yh.call(e,"callee")};function wh(){return!1}var Kl=typeof Ve=="object"&&Ve&&!Ve.nodeType&&Ve,Xl=Kl&&typeof module=="object"&&module&&!module.nodeType&&module,Ch=Xl&&Xl.exports===Kl,Yl=Ch?$t.Buffer:void 0,Sh=Yl?Yl.isBuffer:void 0,ro=Sh||wh,$h="[object Arguments]",Th="[object Array]",kh="[object Boolean]",Rh="[object Date]",Ph="[object Error]",Eh="[object Function]",zh="[object Map]",Bh="[object Number]",_h="[object Object]",Mh="[object RegExp]",Oh="[object Set]",Ah="[object String]",Ih="[object WeakMap]",Fh="[object ArrayBuffer]",Dh="[object DataView]",Nh="[object Float32Array]",Lh="[object Float64Array]",Hh="[object Int8Array]",Vh="[object Int16Array]",jh="[object Int32Array]",Wh="[object Uint8Array]",Uh="[object Uint8ClampedArray]",Gh="[object Uint16Array]",qh="[object Uint32Array]",Ne={};Ne[Nh]=Ne[Lh]=Ne[Hh]=Ne[Vh]=Ne[jh]=Ne[Wh]=Ne[Uh]=Ne[Gh]=Ne[qh]=!0,Ne[$h]=Ne[Th]=Ne[Fh]=Ne[kh]=Ne[Dh]=Ne[Rh]=Ne[Ph]=Ne[Eh]=Ne[zh]=Ne[Bh]=Ne[_h]=Ne[Mh]=Ne[Oh]=Ne[Ah]=Ne[Ih]=!1;function Kh(e){return Qt(e)&&mi(e.length)&&!!Ne[xn(e)]}function Xh(e){return function(t){return e(t)}}var Zl=typeof Ve=="object"&&Ve&&!Ve.nodeType&&Ve,fr=Zl&&typeof module=="object"&&module&&!module.nodeType&&module,Yh=fr&&fr.exports===Zl,vi=Yh&&Ol.process,Jl=function(){try{var e=fr&&fr.require&&fr.require("util").types;return e||vi&&vi.binding&&vi.binding("util")}catch{}}(),Ql=Jl&&Jl.isTypedArray,xi=Ql?Xh(Ql):Kh,Zh=Object.prototype,Jh=Zh.hasOwnProperty;function es(e,t){var n=vt(e),r=!n&&no(e),i=!n&&!r&&ro(e),a=!n&&!r&&!i&&xi(e),l=n||r||i||a,s=l?gh(e.length,String):[],c=s.length;for(var d in e)(t||Jh.call(e,d))&&!(l&&(d=="length"||i&&(d=="offset"||d=="parent")||a&&(d=="buffer"||d=="byteLength"||d=="byteOffset")||pi(d,c)))&&s.push(d);return s}function ts(e,t){return function(n){return e(t(n))}}var Qh=ts(Object.keys,Object),ep=Object.prototype,tp=ep.hasOwnProperty;function np(e){if(!gi(e))return Qh(e);var t=[];for(var n in Object(e))tp.call(e,n)&&n!="constructor"&&t.push(n);return t}function yi(e){return Un(e)?es(e):np(e)}function rp(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var op=Object.prototype,ip=op.hasOwnProperty;function ap(e){if(!xt(e))return rp(e);var t=gi(e),n=[];for(var r in e)r=="constructor"&&(t||!ip.call(e,r))||n.push(r);return n}function ns(e){return Un(e)?es(e,!0):ap(e)}var lp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,sp=/^\w*$/;function wi(e,t){if(vt(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||eo(e)?!0:sp.test(e)||!lp.test(e)||t!=null&&e in Object(t)}var hr=wn(Object,"create");function cp(){this.__data__=hr?hr(null):{},this.size=0}function dp(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var up="__lodash_hash_undefined__",fp=Object.prototype,hp=fp.hasOwnProperty;function pp(e){var t=this.__data__;if(hr){var n=t[e];return n===up?void 0:n}return hp.call(t,e)?t[e]:void 0}var bp=Object.prototype,mp=bp.hasOwnProperty;function gp(e){var t=this.__data__;return hr?t[e]!==void 0:mp.call(t,e)}var vp="__lodash_hash_undefined__";function xp(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=hr&&t===void 0?vp:t,this}function Cn(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Cn.prototype.clear=cp,Cn.prototype.delete=dp,Cn.prototype.get=pp,Cn.prototype.has=gp,Cn.prototype.set=xp;function yp(){this.__data__=[],this.size=0}function oo(e,t){for(var n=e.length;n--;)if(ur(e[n][0],t))return n;return-1}var wp=Array.prototype,Cp=wp.splice;function Sp(e){var t=this.__data__,n=oo(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():Cp.call(t,n,1),--this.size,!0}function $p(e){var t=this.__data__,n=oo(t,e);return n<0?void 0:t[n][1]}function Tp(e){return oo(this.__data__,e)>-1}function kp(e,t){var n=this.__data__,r=oo(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function Dt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Dt.prototype.clear=yp,Dt.prototype.delete=Sp,Dt.prototype.get=$p,Dt.prototype.has=Tp,Dt.prototype.set=kp;var pr=wn($t,"Map");function Rp(){this.size=0,this.__data__={hash:new Cn,map:new(pr||Dt),string:new Cn}}function Pp(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function io(e,t){var n=e.__data__;return Pp(t)?n[typeof t=="string"?"string":"hash"]:n.map}function Ep(e){var t=io(this,e).delete(e);return this.size-=t?1:0,t}function zp(e){return io(this,e).get(e)}function Bp(e){return io(this,e).has(e)}function _p(e,t){var n=io(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function Nt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Nt.prototype.clear=Rp,Nt.prototype.delete=Ep,Nt.prototype.get=zp,Nt.prototype.has=Bp,Nt.prototype.set=_p;var Mp="Expected a function";function Ci(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Mp);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var l=e.apply(this,r);return n.cache=a.set(i,l)||a,l};return n.cache=new(Ci.Cache||Nt),n}Ci.Cache=Nt;var Op=500;function Ap(e){var t=Ci(e,function(r){return n.size===Op&&n.clear(),r}),n=t.cache;return t}var Ip=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Fp=/\\(\\)?/g,Dp=Ap(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Ip,function(n,r,i,a){t.push(i?a.replace(Fp,"$1"):r||n)}),t});function rs(e){return e==null?"":Ll(e)}function os(e,t){return vt(e)?e:wi(e,t)?[e]:Dp(rs(e))}var Np=1/0;function ao(e){if(typeof e=="string"||eo(e))return e;var t=e+"";return t=="0"&&1/e==-Np?"-0":t}function is(e,t){t=os(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[ao(t[n++])];return n&&n==r?e:void 0}function Lp(e,t,n){var r=e==null?void 0:is(e,t);return r===void 0?n:r}function Hp(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var as=ts(Object.getPrototypeOf,Object),Vp="[object Object]",jp=Function.prototype,Wp=Object.prototype,ls=jp.toString,Up=Wp.hasOwnProperty,Gp=ls.call(Object);function qp(e){if(!Qt(e)||xn(e)!=Vp)return!1;var t=as(e);if(t===null)return!0;var n=Up.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&ls.call(n)==Gp}function Kp(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(i);++r<i;)a[r]=e[r+t];return a}function Xp(e,t,n){var r=e.length;return n=n===void 0?r:n,!t&&n>=r?e:Kp(e,t,n)}var Yp="\\ud800-\\udfff",Zp="\\u0300-\\u036f",Jp="\\ufe20-\\ufe2f",Qp="\\u20d0-\\u20ff",eb=Zp+Jp+Qp,tb="\\ufe0e\\ufe0f",nb="\\u200d",rb=RegExp("["+nb+Yp+eb+tb+"]");function ss(e){return rb.test(e)}function ob(e){return e.split("")}var cs="\\ud800-\\udfff",ib="\\u0300-\\u036f",ab="\\ufe20-\\ufe2f",lb="\\u20d0-\\u20ff",sb=ib+ab+lb,cb="\\ufe0e\\ufe0f",db="["+cs+"]",Si="["+sb+"]",$i="\\ud83c[\\udffb-\\udfff]",ub="(?:"+Si+"|"+$i+")",ds="[^"+cs+"]",us="(?:\\ud83c[\\udde6-\\uddff]){2}",fs="[\\ud800-\\udbff][\\udc00-\\udfff]",fb="\\u200d",hs=ub+"?",ps="["+cb+"]?",hb="(?:"+fb+"(?:"+[ds,us,fs].join("|")+")"+ps+hs+")*",pb=ps+hs+hb,bb="(?:"+[ds+Si+"?",Si,us,fs,db].join("|")+")",mb=RegExp($i+"(?="+$i+")|"+bb+pb,"g");function gb(e){return e.match(mb)||[]}function vb(e){return ss(e)?gb(e):ob(e)}function xb(e){return function(t){t=rs(t);var n=ss(t)?vb(t):void 0,r=n?n[0]:t.charAt(0),i=n?Xp(n,1).join(""):t.slice(1);return r[e]()+i}}var yb=xb("toUpperCase");function wb(){this.__data__=new Dt,this.size=0}function Cb(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function Sb(e){return this.__data__.get(e)}function $b(e){return this.__data__.has(e)}var Tb=200;function kb(e,t){var n=this.__data__;if(n instanceof Dt){var r=n.__data__;if(!pr||r.length<Tb-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Nt(r)}return n.set(e,t),this.size=n.size,this}function Ot(e){var t=this.__data__=new Dt(e);this.size=t.size}Ot.prototype.clear=wb,Ot.prototype.delete=Cb,Ot.prototype.get=Sb,Ot.prototype.has=$b,Ot.prototype.set=kb;var bs=typeof Ve=="object"&&Ve&&!Ve.nodeType&&Ve,ms=bs&&typeof module=="object"&&module&&!module.nodeType&&module,Rb=ms&&ms.exports===bs,gs=Rb?$t.Buffer:void 0;gs&&gs.allocUnsafe;function Pb(e,t){return e.slice()}function Eb(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var l=e[n];t(l,n,e)&&(a[i++]=l)}return a}function zb(){return[]}var Bb=Object.prototype,_b=Bb.propertyIsEnumerable,vs=Object.getOwnPropertySymbols,Mb=vs?function(e){return e==null?[]:(e=Object(e),Eb(vs(e),function(t){return _b.call(e,t)}))}:zb;function Ob(e,t,n){var r=t(e);return vt(e)?r:Hp(r,n(e))}function xs(e){return Ob(e,yi,Mb)}var Ti=wn($t,"DataView"),ki=wn($t,"Promise"),Ri=wn($t,"Set"),ys="[object Map]",Ab="[object Object]",ws="[object Promise]",Cs="[object Set]",Ss="[object WeakMap]",$s="[object DataView]",Ib=yn(Ti),Fb=yn(pr),Db=yn(ki),Nb=yn(Ri),Lb=yn(hi),en=xn;(Ti&&en(new Ti(new ArrayBuffer(1)))!=$s||pr&&en(new pr)!=ys||ki&&en(ki.resolve())!=ws||Ri&&en(new Ri)!=Cs||hi&&en(new hi)!=Ss)&&(en=function(e){var t=xn(e),n=t==Ab?e.constructor:void 0,r=n?yn(n):"";if(r)switch(r){case Ib:return $s;case Fb:return ys;case Db:return ws;case Nb:return Cs;case Lb:return Ss}return t});var lo=$t.Uint8Array;function Hb(e){var t=new e.constructor(e.byteLength);return new lo(t).set(new lo(e)),t}function Vb(e,t){var n=Hb(e.buffer);return new e.constructor(n,e.byteOffset,e.length)}function jb(e){return typeof e.constructor=="function"&&!gi(e)?Xf(as(e)):{}}var Wb="__lodash_hash_undefined__";function Ub(e){return this.__data__.set(e,Wb),this}function Gb(e){return this.__data__.has(e)}function so(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new Nt;++t<n;)this.add(e[t])}so.prototype.add=so.prototype.push=Ub,so.prototype.has=Gb;function qb(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function Kb(e,t){return e.has(t)}var Xb=1,Yb=2;function Ts(e,t,n,r,i,a){var l=n&Xb,s=e.length,c=t.length;if(s!=c&&!(l&&c>s))return!1;var d=a.get(e),u=a.get(t);if(d&&u)return d==t&&u==e;var f=-1,p=!0,b=n&Yb?new so:void 0;for(a.set(e,t),a.set(t,e);++f<s;){var h=e[f],x=t[f];if(r)var v=l?r(x,h,f,t,e,a):r(h,x,f,e,t,a);if(v!==void 0){if(v)continue;p=!1;break}if(b){if(!qb(t,function(g,k){if(!Kb(b,k)&&(h===g||i(h,g,n,r,a)))return b.push(k)})){p=!1;break}}else if(!(h===x||i(h,x,n,r,a))){p=!1;break}}return a.delete(e),a.delete(t),p}function Zb(e){var t=-1,n=Array(e.size);return e.forEach(function(r,i){n[++t]=[i,r]}),n}function Jb(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var Qb=1,em=2,tm="[object Boolean]",nm="[object Date]",rm="[object Error]",om="[object Map]",im="[object Number]",am="[object RegExp]",lm="[object Set]",sm="[object String]",cm="[object Symbol]",dm="[object ArrayBuffer]",um="[object DataView]",ks=Jt?Jt.prototype:void 0,Pi=ks?ks.valueOf:void 0;function fm(e,t,n,r,i,a,l){switch(n){case um:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case dm:return!(e.byteLength!=t.byteLength||!a(new lo(e),new lo(t)));case tm:case nm:case im:return ur(+e,+t);case rm:return e.name==t.name&&e.message==t.message;case am:case sm:return e==t+"";case om:var s=Zb;case lm:var c=r&Qb;if(s||(s=Jb),e.size!=t.size&&!c)return!1;var d=l.get(e);if(d)return d==t;r|=em,l.set(e,t);var u=Ts(s(e),s(t),r,i,a,l);return l.delete(e),u;case cm:if(Pi)return Pi.call(e)==Pi.call(t)}return!1}var hm=1,pm=Object.prototype,bm=pm.hasOwnProperty;function mm(e,t,n,r,i,a){var l=n&hm,s=xs(e),c=s.length,d=xs(t),u=d.length;if(c!=u&&!l)return!1;for(var f=c;f--;){var p=s[f];if(!(l?p in t:bm.call(t,p)))return!1}var b=a.get(e),h=a.get(t);if(b&&h)return b==t&&h==e;var x=!0;a.set(e,t),a.set(t,e);for(var v=l;++f<c;){p=s[f];var g=e[p],k=t[p];if(r)var z=l?r(k,g,p,t,e,a):r(g,k,p,e,t,a);if(!(z===void 0?g===k||i(g,k,n,r,a):z)){x=!1;break}v||(v=p=="constructor")}if(x&&!v){var $=e.constructor,T=t.constructor;$!=T&&"constructor"in e&&"constructor"in t&&!(typeof $=="function"&&$ instanceof $&&typeof T=="function"&&T instanceof T)&&(x=!1)}return a.delete(e),a.delete(t),x}var gm=1,Rs="[object Arguments]",Ps="[object Array]",co="[object Object]",vm=Object.prototype,Es=vm.hasOwnProperty;function xm(e,t,n,r,i,a){var l=vt(e),s=vt(t),c=l?Ps:en(e),d=s?Ps:en(t);c=c==Rs?co:c,d=d==Rs?co:d;var u=c==co,f=d==co,p=c==d;if(p&&ro(e)){if(!ro(t))return!1;l=!0,u=!1}if(p&&!u)return a||(a=new Ot),l||xi(e)?Ts(e,t,n,r,i,a):fm(e,t,c,n,r,i,a);if(!(n&gm)){var b=u&&Es.call(e,"__wrapped__"),h=f&&Es.call(t,"__wrapped__");if(b||h){var x=b?e.value():e,v=h?t.value():t;return a||(a=new Ot),i(x,v,n,r,a)}}return p?(a||(a=new Ot),mm(e,t,n,r,i,a)):!1}function Ei(e,t,n,r,i){return e===t?!0:e==null||t==null||!Qt(e)&&!Qt(t)?e!==e&&t!==t:xm(e,t,n,r,Ei,i)}var ym=1,wm=2;function Cm(e,t,n,r){var i=n.length,a=i;if(e==null)return!a;for(e=Object(e);i--;){var l=n[i];if(l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++i<a;){l=n[i];var s=l[0],c=e[s],d=l[1];if(l[2]){if(c===void 0&&!(s in e))return!1}else{var u=new Ot,f;if(!(f===void 0?Ei(d,c,ym|wm,r,u):f))return!1}}return!0}function zs(e){return e===e&&!xt(e)}function Sm(e){for(var t=yi(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,zs(i)]}return t}function Bs(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function $m(e){var t=Sm(e);return t.length==1&&t[0][2]?Bs(t[0][0],t[0][1]):function(n){return n===e||Cm(n,e,t)}}function Tm(e,t){return e!=null&&t in Object(e)}function km(e,t,n){t=os(t,e);for(var r=-1,i=t.length,a=!1;++r<i;){var l=ao(t[r]);if(!(a=e!=null&&n(e,l)))break;e=e[l]}return a||++r!=i?a:(i=e==null?0:e.length,!!i&&mi(i)&&pi(l,i)&&(vt(e)||no(e)))}function Rm(e,t){return e!=null&&km(e,t,Tm)}var Pm=1,Em=2;function zm(e,t){return wi(e)&&zs(t)?Bs(ao(e),t):function(n){var r=Lp(n,e);return r===void 0&&r===t?Rm(n,e):Ei(t,r,Pm|Em)}}function Bm(e){return function(t){return t==null?void 0:t[e]}}function _m(e){return function(t){return is(t,e)}}function Mm(e){return wi(e)?Bm(ao(e)):_m(e)}function Om(e){return typeof e=="function"?e:e==null?di:typeof e=="object"?vt(e)?zm(e[0],e[1]):$m(e):Mm(e)}function Am(e){return function(t,n,r){for(var i=-1,a=Object(t),l=r(t),s=l.length;s--;){var c=l[++i];if(n(a[c],c,a)===!1)break}return t}}var _s=Am();function Im(e,t){return e&&_s(e,t,yi)}function Fm(e,t){return function(n,r){if(n==null)return n;if(!Un(n))return e(n,r);for(var i=n.length,a=-1,l=Object(n);++a<i&&r(l[a],a,l)!==!1;);return n}}var Dm=Fm(Im),zi=function(){return $t.Date.now()},Nm="Expected a function",Lm=Math.max,Hm=Math.min;function Vm(e,t,n){var r,i,a,l,s,c,d=0,u=!1,f=!1,p=!0;if(typeof e!="function")throw new TypeError(Nm);t=Vl(t)||0,xt(n)&&(u=!!n.leading,f="maxWait"in n,a=f?Lm(Vl(n.maxWait)||0,t):a,p="trailing"in n?!!n.trailing:p);function b(O){var m=r,S=i;return r=i=void 0,d=O,l=e.apply(S,m),l}function h(O){return d=O,s=setTimeout(g,t),u?b(O):l}function x(O){var m=O-c,S=O-d,M=t-m;return f?Hm(M,a-S):M}function v(O){var m=O-c,S=O-d;return c===void 0||m>=t||m<0||f&&S>=a}function g(){var O=zi();if(v(O))return k(O);s=setTimeout(g,x(O))}function k(O){return s=void 0,p&&r?b(O):(r=i=void 0,l)}function z(){s!==void 0&&clearTimeout(s),d=0,r=c=i=s=void 0}function $(){return s===void 0?l:k(zi())}function T(){var O=zi(),m=v(O);if(r=arguments,i=this,c=O,m){if(s===void 0)return h(c);if(f)return clearTimeout(s),s=setTimeout(g,t),b(c)}return s===void 0&&(s=setTimeout(g,t)),l}return T.cancel=z,T.flush=$,T}function Bi(e,t,n){(n!==void 0&&!ur(e[t],n)||n===void 0&&!(t in e))&&bi(e,t,n)}function jm(e){return Qt(e)&&Un(e)}function _i(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function Wm(e){return dh(e,ns(e))}function Um(e,t,n,r,i,a,l){var s=_i(e,n),c=_i(t,n),d=l.get(c);if(d){Bi(e,n,d);return}var u=a?a(s,c,n+"",e,t,l):void 0,f=u===void 0;if(f){var p=vt(c),b=!p&&ro(c),h=!p&&!b&&xi(c);u=c,p||b||h?vt(s)?u=s:jm(s)?u=Zf(s):b?(f=!1,u=Pb(c)):h?(f=!1,u=Vb(c)):u=[]:qp(c)||no(c)?(u=s,no(s)?u=Wm(s):(!xt(s)||ui(s))&&(u=jb(c))):f=!1}f&&(l.set(c,u),i(u,c,r,a,l),l.delete(c)),Bi(e,n,u)}function Ms(e,t,n,r,i){e!==t&&_s(t,function(a,l){if(i||(i=new Ot),xt(a))Um(e,t,l,n,Ms,r,i);else{var s=r?r(_i(e,l),a,l+"",e,t,i):void 0;s===void 0&&(s=a),Bi(e,l,s)}},ns)}function Gm(e,t){var n=-1,r=Un(e)?Array(e.length):[];return Dm(e,function(i,a,l){r[++n]=t(i,a,l)}),r}function qm(e,t){var n=vt(e)?Fl:Gm;return n(e,Om(t))}var uo=bh(function(e,t,n){Ms(e,t,n)}),Km="Expected a function";function Mi(e,t,n){var r=!0,i=!0;if(typeof e!="function")throw new TypeError(Km);return xt(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Vm(e,t,{leading:r,maxWait:t,trailing:i})}const Sn={fontFamily:'v-sans, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',fontFamilyMono:"v-mono, SFMono-Regular, Menlo, Consolas, Courier, monospace",fontWeight:"400",fontWeightStrong:"500",cubicBezierEaseInOut:"cubic-bezier(.4, 0, .2, 1)",cubicBezierEaseOut:"cubic-bezier(0, 0, .2, 1)",cubicBezierEaseIn:"cubic-bezier(.4, 0, 1, 1)",borderRadius:"3px",borderRadiusSmall:"2px",fontSize:"14px",fontSizeMini:"12px",fontSizeTiny:"12px",fontSizeSmall:"14px",fontSizeMedium:"14px",fontSizeLarge:"15px",fontSizeHuge:"16px",lineHeight:"1.6",heightMini:"16px",heightTiny:"22px",heightSmall:"28px",heightMedium:"34px",heightLarge:"40px",heightHuge:"46px"},{fontSize:Xm,fontFamily:Ym,lineHeight:Zm}=Sn,Os=I("body",`
|
|
16
16
|
margin: 0;
|
|
17
|
-
font-size: ${
|
|
18
|
-
font-family: ${
|
|
19
|
-
line-height: ${
|
|
17
|
+
font-size: ${Xm};
|
|
18
|
+
font-family: ${Ym};
|
|
19
|
+
line-height: ${Zm};
|
|
20
20
|
-webkit-text-size-adjust: 100%;
|
|
21
21
|
-webkit-tap-highlight-color: transparent;
|
|
22
22
|
`,[I("input",`
|
|
23
23
|
font-family: inherit;
|
|
24
24
|
font-size: inherit;
|
|
25
|
-
`)]),$n="n-config-provider",br="naive-ui-style";function dC(e){return e}function Ce(e,t,n,r,i,a){const l=Yt(),s=o.inject($n,null);if(n){const d=()=>{const u=a==null?void 0:a.value;n.mount({id:u===void 0?t:u+t,head:!0,props:{bPrefix:u?`.${u}-`:void 0},anchorMetaName:br,ssr:l}),s!=null&&s.preflightStyleDisabled||Ms.mount({id:"n-global",head:!0,anchorMetaName:br,ssr:l})};l?d():o.onBeforeMount(d)}return o.computed(()=>{var d;const{theme:{common:u,self:f,peers:p={}}={},themeOverrides:b={},builtinThemeOverrides:h={}}=i,{common:x,peers:v}=b,{common:g=void 0,[e]:{common:k=void 0,self:z=void 0,peers:$={}}={}}=(s==null?void 0:s.mergedThemeRef.value)||{},{common:T=void 0,[e]:O={}}=(s==null?void 0:s.mergedThemeOverridesRef.value)||{},{common:m,peers:S={}}=O,M=uo({},u||k||g||r.common,T,m,x),N=uo((d=f||z||r.self)===null||d===void 0?void 0:d(M),h,O,b);return{common:M,self:N,peers:uo({},r.peers,$,p),peerOverrides:uo({},h.peers,S,v)}})}Ce.props={theme:Object,themeOverrides:Object,builtinThemeOverrides:Object};const Zm="n";function Ye(e={},t={defaultBordered:!0}){const n=o.inject($n,null);return{inlineThemeDisabled:n==null?void 0:n.inlineThemeDisabled,mergedRtlRef:n==null?void 0:n.mergedRtlRef,mergedComponentPropsRef:n==null?void 0:n.mergedComponentPropsRef,mergedBreakpointsRef:n==null?void 0:n.mergedBreakpointsRef,mergedBorderedRef:o.computed(()=>{var r,i;const{bordered:a}=e;return a!==void 0?a:(i=(r=n==null?void 0:n.mergedBorderedRef.value)!==null&&r!==void 0?r:t.defaultBordered)!==null&&i!==void 0?i:!0}),mergedClsPrefixRef:n?n.mergedClsPrefixRef:o.shallowRef(Zm),namespaceRef:o.computed(()=>n==null?void 0:n.mergedNamespaceRef.value)}}const Jm={name:"en-US",global:{undo:"Undo",redo:"Redo",confirm:"Confirm",clear:"Clear"},Popconfirm:{positiveText:"Confirm",negativeText:"Cancel"},Cascader:{placeholder:"Please Select",loading:"Loading",loadingRequiredMessage:e=>`Please load all ${e}'s descendants before checking it.`},Time:{dateFormat:"yyyy-MM-dd",dateTimeFormat:"yyyy-MM-dd HH:mm:ss"},DatePicker:{yearFormat:"yyyy",monthFormat:"MMM",dayFormat:"eeeeee",yearTypeFormat:"yyyy",monthTypeFormat:"yyyy-MM",dateFormat:"yyyy-MM-dd",dateTimeFormat:"yyyy-MM-dd HH:mm:ss",quarterFormat:"yyyy-qqq",weekFormat:"RRRR-w",clear:"Clear",now:"Now",confirm:"Confirm",selectTime:"Select Time",selectDate:"Select Date",datePlaceholder:"Select Date",datetimePlaceholder:"Select Date and Time",monthPlaceholder:"Select Month",yearPlaceholder:"Select Year",quarterPlaceholder:"Select Quarter",weekPlaceholder:"Select Week",startDatePlaceholder:"Start Date",endDatePlaceholder:"End Date",startDatetimePlaceholder:"Start Date and Time",endDatetimePlaceholder:"End Date and Time",startMonthPlaceholder:"Start Month",endMonthPlaceholder:"End Month",monthBeforeYear:!0,firstDayOfWeek:6,today:"Today"},DataTable:{checkTableAll:"Select all in the table",uncheckTableAll:"Unselect all in the table",confirm:"Confirm",clear:"Clear"},LegacyTransfer:{sourceTitle:"Source",targetTitle:"Target"},Transfer:{selectAll:"Select all",unselectAll:"Unselect all",clearAll:"Clear",total:e=>`Total ${e} items`,selected:e=>`${e} items selected`},Empty:{description:"No Data"},Select:{placeholder:"Please Select"},TimePicker:{placeholder:"Select Time",positiveText:"OK",negativeText:"Cancel",now:"Now",clear:"Clear"},Pagination:{goto:"Goto",selectionSuffix:"page"},DynamicTags:{add:"Add"},Log:{loading:"Loading"},Input:{placeholder:"Please Input"},InputNumber:{placeholder:"Please Input"},DynamicInput:{create:"Create"},ThemeEditor:{title:"Theme Editor",clearAllVars:"Clear All Variables",clearSearch:"Clear Search",filterCompName:"Filter Component Name",filterVarName:"Filter Variable Name",import:"Import",export:"Export",restore:"Reset to Default"},Image:{tipPrevious:"Previous picture (←)",tipNext:"Next picture (→)",tipCounterclockwise:"Counterclockwise",tipClockwise:"Clockwise",tipZoomOut:"Zoom out",tipZoomIn:"Zoom in",tipDownload:"Download",tipClose:"Close (Esc)",tipOriginalSize:"Zoom to original size"}};function Oi(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth,r=e.formats[n]||e.formats[e.defaultWidth];return r}}function mr(e){return function(t,n){var r=n!=null&&n.context?String(n.context):"standalone",i;if(r==="formatting"&&e.formattingValues){var a=e.defaultFormattingWidth||e.defaultWidth,l=n!=null&&n.width?String(n.width):a;i=e.formattingValues[l]||e.formattingValues[a]}else{var s=e.defaultWidth,c=n!=null&&n.width?String(n.width):e.defaultWidth;i=e.values[c]||e.values[s]}var d=e.argumentCallback?e.argumentCallback(t):t;return i[d]}}function gr(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;var l=a[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(s)?eg(s,function(f){return f.test(l)}):Qm(s,function(f){return f.test(l)}),d;d=e.valueCallback?e.valueCallback(c):c,d=n.valueCallback?n.valueCallback(d):d;var u=t.slice(l.length);return{value:d,rest:u}}}function Qm(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n}function eg(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n}function tg(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.match(e.matchPattern);if(!r)return null;var i=r[0],a=t.match(e.parsePattern);if(!a)return null;var l=e.valueCallback?e.valueCallback(a[0]):a[0];l=n.valueCallback?n.valueCallback(l):l;var s=t.slice(i.length);return{value:l,rest:s}}}var ng={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},rg=function(t,n,r){var i,a=ng[t];return typeof a=="string"?i=a:n===1?i=a.one:i=a.other.replace("{{count}}",n.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+i:i+" ago":i},og={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},ig={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},ag={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},lg={date:Oi({formats:og,defaultWidth:"full"}),time:Oi({formats:ig,defaultWidth:"full"}),dateTime:Oi({formats:ag,defaultWidth:"full"})},sg={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},cg=function(t,n,r,i){return sg[t]},dg={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},ug={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},fg={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},hg={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},pg={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},bg={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},mg=function(t,n){var r=Number(t),i=r%100;if(i>20||i<10)switch(i%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},gg={ordinalNumber:mg,era:mr({values:dg,defaultWidth:"wide"}),quarter:mr({values:ug,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:mr({values:fg,defaultWidth:"wide"}),day:mr({values:hg,defaultWidth:"wide"}),dayPeriod:mr({values:pg,defaultWidth:"wide",formattingValues:bg,defaultFormattingWidth:"wide"})},vg=/^(\d+)(th|st|nd|rd)?/i,xg=/\d+/i,yg={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},wg={any:[/^b/i,/^(a|c)/i]},Cg={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Sg={any:[/1/i,/2/i,/3/i,/4/i]},$g={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Tg={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},kg={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Rg={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Pg={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Eg={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},zg={ordinalNumber:tg({matchPattern:vg,parsePattern:xg,valueCallback:function(t){return parseInt(t,10)}}),era:gr({matchPatterns:yg,defaultMatchWidth:"wide",parsePatterns:wg,defaultParseWidth:"any"}),quarter:gr({matchPatterns:Cg,defaultMatchWidth:"wide",parsePatterns:Sg,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:gr({matchPatterns:$g,defaultMatchWidth:"wide",parsePatterns:Tg,defaultParseWidth:"any"}),day:gr({matchPatterns:kg,defaultMatchWidth:"wide",parsePatterns:Rg,defaultParseWidth:"any"}),dayPeriod:gr({matchPatterns:Pg,defaultMatchWidth:"any",parsePatterns:Eg,defaultParseWidth:"any"})},Bg={code:"en-US",formatDistance:rg,formatLong:lg,formatRelative:cg,localize:gg,match:zg,options:{weekStartsOn:0,firstWeekContainsDate:1}};const _g={name:"en-US",locale:Bg};function vr(e){const{mergedLocaleRef:t,mergedDateLocaleRef:n}=o.inject($n,null)||{},r=o.computed(()=>{var a,l;return(l=(a=t==null?void 0:t.value)===null||a===void 0?void 0:a[e])!==null&&l!==void 0?l:Jm[e]});return{dateLocaleRef:o.computed(()=>{var a;return(a=n==null?void 0:n.value)!==null&&a!==void 0?a:_g}),localeRef:r}}function Tn(e,t,n){if(!t){process.env.NODE_ENV!=="production"&&qo("use-style","No style is specified.");return}const r=Yt(),i=o.inject($n,null),a=()=>{const l=n.value;t.mount({id:l===void 0?e:l+e,head:!0,anchorMetaName:br,props:{bPrefix:l?`.${l}-`:void 0},ssr:r}),i!=null&&i.preflightStyleDisabled||Ms.mount({id:"n-global",head:!0,anchorMetaName:br,ssr:r})};r?a():o.onBeforeMount(a)}function rt(e,t,n,r){var i;n||qo("useThemeClass","cssVarsRef is not passed");const a=(i=o.inject($n,null))===null||i===void 0?void 0:i.mergedThemeHashRef,l=o.ref(""),s=Yt();let c;const d=`__${e}`,u=()=>{let f=d;const p=t?t.value:void 0,b=a==null?void 0:a.value;b&&(f+=`-${b}`),p&&(f+=`-${p}`);const{themeOverrides:h,builtinThemeOverrides:x}=r;h&&(f+=`-${Zo(JSON.stringify(h))}`),x&&(f+=`-${Zo(JSON.stringify(x))}`),l.value=f,c=()=>{const v=n.value;let g="";for(const k in v)g+=`${k}: ${v[k]};`;I(`.${f}`,g).mount({id:f,ssr:s}),c=void 0}};return o.watchEffect(()=>{u()}),{themeClass:l,onRender:()=>{c==null||c()}}}function tn(e,t,n){if(!t)return;const r=Yt(),i=o.computed(()=>{const{value:l}=t;if(!l)return;const s=l[e];if(s)return s}),a=()=>{o.watchEffect(()=>{const{value:l}=n,s=`${l}${e}Rtl`;if(Qd(s,r))return;const{value:c}=i;c&&c.style.mount({id:s,head:!0,anchorMetaName:br,props:{bPrefix:l?`.${l}-`:void 0},ssr:r})})};return r?a():o.onBeforeMount(a),i}const Os=o.defineComponent({name:"Add",render(){return o.h("svg",{width:"512",height:"512",viewBox:"0 0 512 512",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o.h("path",{d:"M256 112V400M400 256H112",stroke:"currentColor","stroke-width":"32","stroke-linecap":"round","stroke-linejoin":"round"}))}});function Gn(e,t){return o.defineComponent({name:xb(e),setup(){var n;const r=(n=o.inject($n,null))===null||n===void 0?void 0:n.mergedIconsRef;return()=>{var i;const a=(i=r==null?void 0:r.value)===null||i===void 0?void 0:i[e];return a?a():t}}})}const Mg=o.defineComponent({name:"Checkmark",render(){return o.h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16"},o.h("g",{fill:"none"},o.h("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"})))}}),As=Gn("close",o.h("svg",{viewBox:"0 0 12 12",version:"1.1",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0},o.h("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},o.h("g",{fill:"currentColor","fill-rule":"nonzero"},o.h("path",{d:"M2.08859116,2.2156945 L2.14644661,2.14644661 C2.32001296,1.97288026 2.58943736,1.95359511 2.7843055,2.08859116 L2.85355339,2.14644661 L6,5.293 L9.14644661,2.14644661 C9.34170876,1.95118446 9.65829124,1.95118446 9.85355339,2.14644661 C10.0488155,2.34170876 10.0488155,2.65829124 9.85355339,2.85355339 L6.707,6 L9.85355339,9.14644661 C10.0271197,9.32001296 10.0464049,9.58943736 9.91140884,9.7843055 L9.85355339,9.85355339 C9.67998704,10.0271197 9.41056264,10.0464049 9.2156945,9.91140884 L9.14644661,9.85355339 L6,6.707 L2.85355339,9.85355339 C2.65829124,10.0488155 2.34170876,10.0488155 2.14644661,9.85355339 C1.95118446,9.65829124 1.95118446,9.34170876 2.14644661,9.14644661 L5.293,6 L2.14644661,2.85355339 C1.97288026,2.67998704 1.95359511,2.41056264 2.08859116,2.2156945 L2.14644661,2.14644661 L2.08859116,2.2156945 Z"}))))),Og=o.defineComponent({name:"Eye",render(){return o.h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},o.h("path",{d:"M255.66 112c-77.94 0-157.89 45.11-220.83 135.33a16 16 0 0 0-.27 17.77C82.92 340.8 161.8 400 255.66 400c92.84 0 173.34-59.38 221.79-135.25a16.14 16.14 0 0 0 0-17.47C428.89 172.28 347.8 112 255.66 112z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"}),o.h("circle",{cx:"256",cy:"256",r:"80",fill:"none",stroke:"currentColor","stroke-miterlimit":"10","stroke-width":"32"}))}}),Ag=o.defineComponent({name:"EyeOff",render(){return o.h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},o.h("path",{d:"M432 448a15.92 15.92 0 0 1-11.31-4.69l-352-352a16 16 0 0 1 22.62-22.62l352 352A16 16 0 0 1 432 448z",fill:"currentColor"}),o.h("path",{d:"M255.66 384c-41.49 0-81.5-12.28-118.92-36.5c-34.07-22-64.74-53.51-88.7-91v-.08c19.94-28.57 41.78-52.73 65.24-72.21a2 2 0 0 0 .14-2.94L93.5 161.38a2 2 0 0 0-2.71-.12c-24.92 21-48.05 46.76-69.08 76.92a31.92 31.92 0 0 0-.64 35.54c26.41 41.33 60.4 76.14 98.28 100.65C162 402 207.9 416 255.66 416a239.13 239.13 0 0 0 75.8-12.58a2 2 0 0 0 .77-3.31l-21.58-21.58a4 4 0 0 0-3.83-1a204.8 204.8 0 0 1-51.16 6.47z",fill:"currentColor"}),o.h("path",{d:"M490.84 238.6c-26.46-40.92-60.79-75.68-99.27-100.53C349 110.55 302 96 255.66 96a227.34 227.34 0 0 0-74.89 12.83a2 2 0 0 0-.75 3.31l21.55 21.55a4 4 0 0 0 3.88 1a192.82 192.82 0 0 1 50.21-6.69c40.69 0 80.58 12.43 118.55 37c34.71 22.4 65.74 53.88 89.76 91a.13.13 0 0 1 0 .16a310.72 310.72 0 0 1-64.12 72.73a2 2 0 0 0-.15 2.95l19.9 19.89a2 2 0 0 0 2.7.13a343.49 343.49 0 0 0 68.64-78.48a32.2 32.2 0 0 0-.1-34.78z",fill:"currentColor"}),o.h("path",{d:"M256 160a95.88 95.88 0 0 0-21.37 2.4a2 2 0 0 0-1 3.38l112.59 112.56a2 2 0 0 0 3.38-1A96 96 0 0 0 256 160z",fill:"currentColor"}),o.h("path",{d:"M165.78 233.66a2 2 0 0 0-3.38 1a96 96 0 0 0 115 115a2 2 0 0 0 1-3.38z",fill:"currentColor"}))}}),Ig=o.defineComponent({name:"Empty",render(){return o.h("svg",{viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o.h("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"}),o.h("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"}))}}),Fg=Gn("error",o.h("svg",{viewBox:"0 0 48 48",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},o.h("g",{stroke:"none","stroke-width":"1","fill-rule":"evenodd"},o.h("g",{"fill-rule":"nonzero"},o.h("path",{d:"M24,4 C35.045695,4 44,12.954305 44,24 C44,35.045695 35.045695,44 24,44 C12.954305,44 4,35.045695 4,24 C4,12.954305 12.954305,4 24,4 Z M17.8838835,16.1161165 L17.7823881,16.0249942 C17.3266086,15.6583353 16.6733914,15.6583353 16.2176119,16.0249942 L16.1161165,16.1161165 L16.0249942,16.2176119 C15.6583353,16.6733914 15.6583353,17.3266086 16.0249942,17.7823881 L16.1161165,17.8838835 L22.233,24 L16.1161165,30.1161165 L16.0249942,30.2176119 C15.6583353,30.6733914 15.6583353,31.3266086 16.0249942,31.7823881 L16.1161165,31.8838835 L16.2176119,31.9750058 C16.6733914,32.3416647 17.3266086,32.3416647 17.7823881,31.9750058 L17.8838835,31.8838835 L24,25.767 L30.1161165,31.8838835 L30.2176119,31.9750058 C30.6733914,32.3416647 31.3266086,32.3416647 31.7823881,31.9750058 L31.8838835,31.8838835 L31.9750058,31.7823881 C32.3416647,31.3266086 32.3416647,30.6733914 31.9750058,30.2176119 L31.8838835,30.1161165 L25.767,24 L31.8838835,17.8838835 L31.9750058,17.7823881 C32.3416647,17.3266086 32.3416647,16.6733914 31.9750058,16.2176119 L31.8838835,16.1161165 L31.7823881,16.0249942 C31.3266086,15.6583353 30.6733914,15.6583353 30.2176119,16.0249942 L30.1161165,16.1161165 L24,22.233 L17.8838835,16.1161165 L17.7823881,16.0249942 L17.8838835,16.1161165 Z"}))))),Dg=Gn("info",o.h("svg",{viewBox:"0 0 28 28",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},o.h("g",{stroke:"none","stroke-width":"1","fill-rule":"evenodd"},o.h("g",{"fill-rule":"nonzero"},o.h("path",{d:"M14,2 C20.6274,2 26,7.37258 26,14 C26,20.6274 20.6274,26 14,26 C7.37258,26 2,20.6274 2,14 C2,7.37258 7.37258,2 14,2 Z M14,11 C13.4477,11 13,11.4477 13,12 L13,12 L13,20 C13,20.5523 13.4477,21 14,21 C14.5523,21 15,20.5523 15,20 L15,20 L15,12 C15,11.4477 14.5523,11 14,11 Z M14,6.75 C13.3096,6.75 12.75,7.30964 12.75,8 C12.75,8.69036 13.3096,9.25 14,9.25 C14.6904,9.25 15.25,8.69036 15.25,8 C15.25,7.30964 14.6904,6.75 14,6.75 Z"}))))),Ng=o.defineComponent({name:"Remove",render(){return o.h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},o.h("line",{x1:"400",y1:"256",x2:"112",y2:"256",style:`
|
|
25
|
+
`)]),$n="n-config-provider",br="naive-ui-style";function uC(e){return e}function Ce(e,t,n,r,i,a){const l=Yt(),s=o.inject($n,null);if(n){const d=()=>{const u=a==null?void 0:a.value;n.mount({id:u===void 0?t:u+t,head:!0,props:{bPrefix:u?`.${u}-`:void 0},anchorMetaName:br,ssr:l}),s!=null&&s.preflightStyleDisabled||Os.mount({id:"n-global",head:!0,anchorMetaName:br,ssr:l})};l?d():o.onBeforeMount(d)}return o.computed(()=>{var d;const{theme:{common:u,self:f,peers:p={}}={},themeOverrides:b={},builtinThemeOverrides:h={}}=i,{common:x,peers:v}=b,{common:g=void 0,[e]:{common:k=void 0,self:z=void 0,peers:$={}}={}}=(s==null?void 0:s.mergedThemeRef.value)||{},{common:T=void 0,[e]:O={}}=(s==null?void 0:s.mergedThemeOverridesRef.value)||{},{common:m,peers:S={}}=O,M=uo({},u||k||g||r.common,T,m,x),N=uo((d=f||z||r.self)===null||d===void 0?void 0:d(M),h,O,b);return{common:M,self:N,peers:uo({},r.peers,$,p),peerOverrides:uo({},h.peers,S,v)}})}Ce.props={theme:Object,themeOverrides:Object,builtinThemeOverrides:Object};const Jm="n";function Ye(e={},t={defaultBordered:!0}){const n=o.inject($n,null);return{inlineThemeDisabled:n==null?void 0:n.inlineThemeDisabled,mergedRtlRef:n==null?void 0:n.mergedRtlRef,mergedComponentPropsRef:n==null?void 0:n.mergedComponentPropsRef,mergedBreakpointsRef:n==null?void 0:n.mergedBreakpointsRef,mergedBorderedRef:o.computed(()=>{var r,i;const{bordered:a}=e;return a!==void 0?a:(i=(r=n==null?void 0:n.mergedBorderedRef.value)!==null&&r!==void 0?r:t.defaultBordered)!==null&&i!==void 0?i:!0}),mergedClsPrefixRef:n?n.mergedClsPrefixRef:o.shallowRef(Jm),namespaceRef:o.computed(()=>n==null?void 0:n.mergedNamespaceRef.value)}}const Qm={name:"en-US",global:{undo:"Undo",redo:"Redo",confirm:"Confirm",clear:"Clear"},Popconfirm:{positiveText:"Confirm",negativeText:"Cancel"},Cascader:{placeholder:"Please Select",loading:"Loading",loadingRequiredMessage:e=>`Please load all ${e}'s descendants before checking it.`},Time:{dateFormat:"yyyy-MM-dd",dateTimeFormat:"yyyy-MM-dd HH:mm:ss"},DatePicker:{yearFormat:"yyyy",monthFormat:"MMM",dayFormat:"eeeeee",yearTypeFormat:"yyyy",monthTypeFormat:"yyyy-MM",dateFormat:"yyyy-MM-dd",dateTimeFormat:"yyyy-MM-dd HH:mm:ss",quarterFormat:"yyyy-qqq",weekFormat:"RRRR-w",clear:"Clear",now:"Now",confirm:"Confirm",selectTime:"Select Time",selectDate:"Select Date",datePlaceholder:"Select Date",datetimePlaceholder:"Select Date and Time",monthPlaceholder:"Select Month",yearPlaceholder:"Select Year",quarterPlaceholder:"Select Quarter",weekPlaceholder:"Select Week",startDatePlaceholder:"Start Date",endDatePlaceholder:"End Date",startDatetimePlaceholder:"Start Date and Time",endDatetimePlaceholder:"End Date and Time",startMonthPlaceholder:"Start Month",endMonthPlaceholder:"End Month",monthBeforeYear:!0,firstDayOfWeek:6,today:"Today"},DataTable:{checkTableAll:"Select all in the table",uncheckTableAll:"Unselect all in the table",confirm:"Confirm",clear:"Clear"},LegacyTransfer:{sourceTitle:"Source",targetTitle:"Target"},Transfer:{selectAll:"Select all",unselectAll:"Unselect all",clearAll:"Clear",total:e=>`Total ${e} items`,selected:e=>`${e} items selected`},Empty:{description:"No Data"},Select:{placeholder:"Please Select"},TimePicker:{placeholder:"Select Time",positiveText:"OK",negativeText:"Cancel",now:"Now",clear:"Clear"},Pagination:{goto:"Goto",selectionSuffix:"page"},DynamicTags:{add:"Add"},Log:{loading:"Loading"},Input:{placeholder:"Please Input"},InputNumber:{placeholder:"Please Input"},DynamicInput:{create:"Create"},ThemeEditor:{title:"Theme Editor",clearAllVars:"Clear All Variables",clearSearch:"Clear Search",filterCompName:"Filter Component Name",filterVarName:"Filter Variable Name",import:"Import",export:"Export",restore:"Reset to Default"},Image:{tipPrevious:"Previous picture (←)",tipNext:"Next picture (→)",tipCounterclockwise:"Counterclockwise",tipClockwise:"Clockwise",tipZoomOut:"Zoom out",tipZoomIn:"Zoom in",tipDownload:"Download",tipClose:"Close (Esc)",tipOriginalSize:"Zoom to original size"}};function Oi(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth,r=e.formats[n]||e.formats[e.defaultWidth];return r}}function mr(e){return function(t,n){var r=n!=null&&n.context?String(n.context):"standalone",i;if(r==="formatting"&&e.formattingValues){var a=e.defaultFormattingWidth||e.defaultWidth,l=n!=null&&n.width?String(n.width):a;i=e.formattingValues[l]||e.formattingValues[a]}else{var s=e.defaultWidth,c=n!=null&&n.width?String(n.width):e.defaultWidth;i=e.values[c]||e.values[s]}var d=e.argumentCallback?e.argumentCallback(t):t;return i[d]}}function gr(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;var l=a[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(s)?tg(s,function(f){return f.test(l)}):eg(s,function(f){return f.test(l)}),d;d=e.valueCallback?e.valueCallback(c):c,d=n.valueCallback?n.valueCallback(d):d;var u=t.slice(l.length);return{value:d,rest:u}}}function eg(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n}function tg(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n}function ng(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.match(e.matchPattern);if(!r)return null;var i=r[0],a=t.match(e.parsePattern);if(!a)return null;var l=e.valueCallback?e.valueCallback(a[0]):a[0];l=n.valueCallback?n.valueCallback(l):l;var s=t.slice(i.length);return{value:l,rest:s}}}var rg={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},og=function(t,n,r){var i,a=rg[t];return typeof a=="string"?i=a:n===1?i=a.one:i=a.other.replace("{{count}}",n.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+i:i+" ago":i},ig={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},ag={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},lg={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},sg={date:Oi({formats:ig,defaultWidth:"full"}),time:Oi({formats:ag,defaultWidth:"full"}),dateTime:Oi({formats:lg,defaultWidth:"full"})},cg={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},dg=function(t,n,r,i){return cg[t]},ug={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},fg={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},hg={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},pg={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},bg={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},mg={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},gg=function(t,n){var r=Number(t),i=r%100;if(i>20||i<10)switch(i%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},vg={ordinalNumber:gg,era:mr({values:ug,defaultWidth:"wide"}),quarter:mr({values:fg,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:mr({values:hg,defaultWidth:"wide"}),day:mr({values:pg,defaultWidth:"wide"}),dayPeriod:mr({values:bg,defaultWidth:"wide",formattingValues:mg,defaultFormattingWidth:"wide"})},xg=/^(\d+)(th|st|nd|rd)?/i,yg=/\d+/i,wg={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Cg={any:[/^b/i,/^(a|c)/i]},Sg={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},$g={any:[/1/i,/2/i,/3/i,/4/i]},Tg={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},kg={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Rg={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Pg={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Eg={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},zg={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Bg={ordinalNumber:ng({matchPattern:xg,parsePattern:yg,valueCallback:function(t){return parseInt(t,10)}}),era:gr({matchPatterns:wg,defaultMatchWidth:"wide",parsePatterns:Cg,defaultParseWidth:"any"}),quarter:gr({matchPatterns:Sg,defaultMatchWidth:"wide",parsePatterns:$g,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:gr({matchPatterns:Tg,defaultMatchWidth:"wide",parsePatterns:kg,defaultParseWidth:"any"}),day:gr({matchPatterns:Rg,defaultMatchWidth:"wide",parsePatterns:Pg,defaultParseWidth:"any"}),dayPeriod:gr({matchPatterns:Eg,defaultMatchWidth:"any",parsePatterns:zg,defaultParseWidth:"any"})},_g={code:"en-US",formatDistance:og,formatLong:sg,formatRelative:dg,localize:vg,match:Bg,options:{weekStartsOn:0,firstWeekContainsDate:1}};const Mg={name:"en-US",locale:_g};function vr(e){const{mergedLocaleRef:t,mergedDateLocaleRef:n}=o.inject($n,null)||{},r=o.computed(()=>{var a,l;return(l=(a=t==null?void 0:t.value)===null||a===void 0?void 0:a[e])!==null&&l!==void 0?l:Qm[e]});return{dateLocaleRef:o.computed(()=>{var a;return(a=n==null?void 0:n.value)!==null&&a!==void 0?a:Mg}),localeRef:r}}function Tn(e,t,n){if(!t){process.env.NODE_ENV!=="production"&&qo("use-style","No style is specified.");return}const r=Yt(),i=o.inject($n,null),a=()=>{const l=n.value;t.mount({id:l===void 0?e:l+e,head:!0,anchorMetaName:br,props:{bPrefix:l?`.${l}-`:void 0},ssr:r}),i!=null&&i.preflightStyleDisabled||Os.mount({id:"n-global",head:!0,anchorMetaName:br,ssr:r})};r?a():o.onBeforeMount(a)}function rt(e,t,n,r){var i;n||qo("useThemeClass","cssVarsRef is not passed");const a=(i=o.inject($n,null))===null||i===void 0?void 0:i.mergedThemeHashRef,l=o.ref(""),s=Yt();let c;const d=`__${e}`,u=()=>{let f=d;const p=t?t.value:void 0,b=a==null?void 0:a.value;b&&(f+=`-${b}`),p&&(f+=`-${p}`);const{themeOverrides:h,builtinThemeOverrides:x}=r;h&&(f+=`-${Zo(JSON.stringify(h))}`),x&&(f+=`-${Zo(JSON.stringify(x))}`),l.value=f,c=()=>{const v=n.value;let g="";for(const k in v)g+=`${k}: ${v[k]};`;I(`.${f}`,g).mount({id:f,ssr:s}),c=void 0}};return o.watchEffect(()=>{u()}),{themeClass:l,onRender:()=>{c==null||c()}}}function tn(e,t,n){if(!t)return;const r=Yt(),i=o.computed(()=>{const{value:l}=t;if(!l)return;const s=l[e];if(s)return s}),a=()=>{o.watchEffect(()=>{const{value:l}=n,s=`${l}${e}Rtl`;if(eu(s,r))return;const{value:c}=i;c&&c.style.mount({id:s,head:!0,anchorMetaName:br,props:{bPrefix:l?`.${l}-`:void 0},ssr:r})})};return r?a():o.onBeforeMount(a),i}const As=o.defineComponent({name:"Add",render(){return o.h("svg",{width:"512",height:"512",viewBox:"0 0 512 512",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o.h("path",{d:"M256 112V400M400 256H112",stroke:"currentColor","stroke-width":"32","stroke-linecap":"round","stroke-linejoin":"round"}))}});function Gn(e,t){return o.defineComponent({name:yb(e),setup(){var n;const r=(n=o.inject($n,null))===null||n===void 0?void 0:n.mergedIconsRef;return()=>{var i;const a=(i=r==null?void 0:r.value)===null||i===void 0?void 0:i[e];return a?a():t}}})}const Og=o.defineComponent({name:"Checkmark",render(){return o.h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16"},o.h("g",{fill:"none"},o.h("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"})))}}),Is=Gn("close",o.h("svg",{viewBox:"0 0 12 12",version:"1.1",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0},o.h("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},o.h("g",{fill:"currentColor","fill-rule":"nonzero"},o.h("path",{d:"M2.08859116,2.2156945 L2.14644661,2.14644661 C2.32001296,1.97288026 2.58943736,1.95359511 2.7843055,2.08859116 L2.85355339,2.14644661 L6,5.293 L9.14644661,2.14644661 C9.34170876,1.95118446 9.65829124,1.95118446 9.85355339,2.14644661 C10.0488155,2.34170876 10.0488155,2.65829124 9.85355339,2.85355339 L6.707,6 L9.85355339,9.14644661 C10.0271197,9.32001296 10.0464049,9.58943736 9.91140884,9.7843055 L9.85355339,9.85355339 C9.67998704,10.0271197 9.41056264,10.0464049 9.2156945,9.91140884 L9.14644661,9.85355339 L6,6.707 L2.85355339,9.85355339 C2.65829124,10.0488155 2.34170876,10.0488155 2.14644661,9.85355339 C1.95118446,9.65829124 1.95118446,9.34170876 2.14644661,9.14644661 L5.293,6 L2.14644661,2.85355339 C1.97288026,2.67998704 1.95359511,2.41056264 2.08859116,2.2156945 L2.14644661,2.14644661 L2.08859116,2.2156945 Z"}))))),Ag=o.defineComponent({name:"Eye",render(){return o.h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},o.h("path",{d:"M255.66 112c-77.94 0-157.89 45.11-220.83 135.33a16 16 0 0 0-.27 17.77C82.92 340.8 161.8 400 255.66 400c92.84 0 173.34-59.38 221.79-135.25a16.14 16.14 0 0 0 0-17.47C428.89 172.28 347.8 112 255.66 112z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"}),o.h("circle",{cx:"256",cy:"256",r:"80",fill:"none",stroke:"currentColor","stroke-miterlimit":"10","stroke-width":"32"}))}}),Ig=o.defineComponent({name:"EyeOff",render(){return o.h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},o.h("path",{d:"M432 448a15.92 15.92 0 0 1-11.31-4.69l-352-352a16 16 0 0 1 22.62-22.62l352 352A16 16 0 0 1 432 448z",fill:"currentColor"}),o.h("path",{d:"M255.66 384c-41.49 0-81.5-12.28-118.92-36.5c-34.07-22-64.74-53.51-88.7-91v-.08c19.94-28.57 41.78-52.73 65.24-72.21a2 2 0 0 0 .14-2.94L93.5 161.38a2 2 0 0 0-2.71-.12c-24.92 21-48.05 46.76-69.08 76.92a31.92 31.92 0 0 0-.64 35.54c26.41 41.33 60.4 76.14 98.28 100.65C162 402 207.9 416 255.66 416a239.13 239.13 0 0 0 75.8-12.58a2 2 0 0 0 .77-3.31l-21.58-21.58a4 4 0 0 0-3.83-1a204.8 204.8 0 0 1-51.16 6.47z",fill:"currentColor"}),o.h("path",{d:"M490.84 238.6c-26.46-40.92-60.79-75.68-99.27-100.53C349 110.55 302 96 255.66 96a227.34 227.34 0 0 0-74.89 12.83a2 2 0 0 0-.75 3.31l21.55 21.55a4 4 0 0 0 3.88 1a192.82 192.82 0 0 1 50.21-6.69c40.69 0 80.58 12.43 118.55 37c34.71 22.4 65.74 53.88 89.76 91a.13.13 0 0 1 0 .16a310.72 310.72 0 0 1-64.12 72.73a2 2 0 0 0-.15 2.95l19.9 19.89a2 2 0 0 0 2.7.13a343.49 343.49 0 0 0 68.64-78.48a32.2 32.2 0 0 0-.1-34.78z",fill:"currentColor"}),o.h("path",{d:"M256 160a95.88 95.88 0 0 0-21.37 2.4a2 2 0 0 0-1 3.38l112.59 112.56a2 2 0 0 0 3.38-1A96 96 0 0 0 256 160z",fill:"currentColor"}),o.h("path",{d:"M165.78 233.66a2 2 0 0 0-3.38 1a96 96 0 0 0 115 115a2 2 0 0 0 1-3.38z",fill:"currentColor"}))}}),Fg=o.defineComponent({name:"Empty",render(){return o.h("svg",{viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o.h("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"}),o.h("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"}))}}),Dg=Gn("error",o.h("svg",{viewBox:"0 0 48 48",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},o.h("g",{stroke:"none","stroke-width":"1","fill-rule":"evenodd"},o.h("g",{"fill-rule":"nonzero"},o.h("path",{d:"M24,4 C35.045695,4 44,12.954305 44,24 C44,35.045695 35.045695,44 24,44 C12.954305,44 4,35.045695 4,24 C4,12.954305 12.954305,4 24,4 Z M17.8838835,16.1161165 L17.7823881,16.0249942 C17.3266086,15.6583353 16.6733914,15.6583353 16.2176119,16.0249942 L16.1161165,16.1161165 L16.0249942,16.2176119 C15.6583353,16.6733914 15.6583353,17.3266086 16.0249942,17.7823881 L16.1161165,17.8838835 L22.233,24 L16.1161165,30.1161165 L16.0249942,30.2176119 C15.6583353,30.6733914 15.6583353,31.3266086 16.0249942,31.7823881 L16.1161165,31.8838835 L16.2176119,31.9750058 C16.6733914,32.3416647 17.3266086,32.3416647 17.7823881,31.9750058 L17.8838835,31.8838835 L24,25.767 L30.1161165,31.8838835 L30.2176119,31.9750058 C30.6733914,32.3416647 31.3266086,32.3416647 31.7823881,31.9750058 L31.8838835,31.8838835 L31.9750058,31.7823881 C32.3416647,31.3266086 32.3416647,30.6733914 31.9750058,30.2176119 L31.8838835,30.1161165 L25.767,24 L31.8838835,17.8838835 L31.9750058,17.7823881 C32.3416647,17.3266086 32.3416647,16.6733914 31.9750058,16.2176119 L31.8838835,16.1161165 L31.7823881,16.0249942 C31.3266086,15.6583353 30.6733914,15.6583353 30.2176119,16.0249942 L30.1161165,16.1161165 L24,22.233 L17.8838835,16.1161165 L17.7823881,16.0249942 L17.8838835,16.1161165 Z"}))))),Ng=Gn("info",o.h("svg",{viewBox:"0 0 28 28",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},o.h("g",{stroke:"none","stroke-width":"1","fill-rule":"evenodd"},o.h("g",{"fill-rule":"nonzero"},o.h("path",{d:"M14,2 C20.6274,2 26,7.37258 26,14 C26,20.6274 20.6274,26 14,26 C7.37258,26 2,20.6274 2,14 C2,7.37258 7.37258,2 14,2 Z M14,11 C13.4477,11 13,11.4477 13,12 L13,12 L13,20 C13,20.5523 13.4477,21 14,21 C14.5523,21 15,20.5523 15,20 L15,20 L15,12 C15,11.4477 14.5523,11 14,11 Z M14,6.75 C13.3096,6.75 12.75,7.30964 12.75,8 C12.75,8.69036 13.3096,9.25 14,9.25 C14.6904,9.25 15.25,8.69036 15.25,8 C15.25,7.30964 14.6904,6.75 14,6.75 Z"}))))),Lg=o.defineComponent({name:"Remove",render(){return o.h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},o.h("line",{x1:"400",y1:"256",x2:"112",y2:"256",style:`
|
|
26
26
|
fill: none;
|
|
27
27
|
stroke: currentColor;
|
|
28
28
|
stroke-linecap: round;
|
|
29
29
|
stroke-linejoin: round;
|
|
30
30
|
stroke-width: 32px;
|
|
31
|
-
`}))}}),
|
|
31
|
+
`}))}}),Hg=Gn("success",o.h("svg",{viewBox:"0 0 48 48",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},o.h("g",{stroke:"none","stroke-width":"1","fill-rule":"evenodd"},o.h("g",{"fill-rule":"nonzero"},o.h("path",{d:"M24,4 C35.045695,4 44,12.954305 44,24 C44,35.045695 35.045695,44 24,44 C12.954305,44 4,35.045695 4,24 C4,12.954305 12.954305,4 24,4 Z M32.6338835,17.6161165 C32.1782718,17.1605048 31.4584514,17.1301307 30.9676119,17.5249942 L30.8661165,17.6161165 L20.75,27.732233 L17.1338835,24.1161165 C16.6457281,23.6279612 15.8542719,23.6279612 15.3661165,24.1161165 C14.9105048,24.5717282 14.8801307,25.2915486 15.2749942,25.7823881 L15.3661165,25.8838835 L19.8661165,30.3838835 C20.3217282,30.8394952 21.0415486,30.8698693 21.5323881,30.4750058 L21.6338835,30.3838835 L32.6338835,19.3838835 C33.1220388,18.8957281 33.1220388,18.1042719 32.6338835,17.6161165 Z"}))))),Vg=Gn("warning",o.h("svg",{viewBox:"0 0 24 24",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},o.h("g",{stroke:"none","stroke-width":"1","fill-rule":"evenodd"},o.h("g",{"fill-rule":"nonzero"},o.h("path",{d:"M12,2 C17.523,2 22,6.478 22,12 C22,17.522 17.523,22 12,22 C6.477,22 2,17.522 2,12 C2,6.478 6.477,2 12,2 Z M12.0018002,15.0037242 C11.450254,15.0037242 11.0031376,15.4508407 11.0031376,16.0023869 C11.0031376,16.553933 11.450254,17.0010495 12.0018002,17.0010495 C12.5533463,17.0010495 13.0004628,16.553933 13.0004628,16.0023869 C13.0004628,15.4508407 12.5533463,15.0037242 12.0018002,15.0037242 Z M11.99964,7 C11.4868042,7.00018474 11.0642719,7.38637706 11.0066858,7.8837365 L11,8.00036004 L11.0018003,13.0012393 L11.00857,13.117858 C11.0665141,13.6151758 11.4893244,14.0010638 12.0021602,14.0008793 C12.514996,14.0006946 12.9375283,13.6145023 12.9951144,13.1171428 L13.0018002,13.0005193 L13,7.99964009 L12.9932303,7.8830214 C12.9352861,7.38570354 12.5124758,6.99981552 11.99964,7 Z"}))))),jg=o.defineComponent({name:"ChevronDown",render(){return o.h("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o.h("path",{d:"M3.14645 5.64645C3.34171 5.45118 3.65829 5.45118 3.85355 5.64645L8 9.79289L12.1464 5.64645C12.3417 5.45118 12.6583 5.45118 12.8536 5.64645C13.0488 5.84171 13.0488 6.15829 12.8536 6.35355L8.35355 10.8536C8.15829 11.0488 7.84171 11.0488 7.64645 10.8536L3.14645 6.35355C2.95118 6.15829 2.95118 5.84171 3.14645 5.64645Z",fill:"currentColor"}))}}),Wg=Gn("clear",o.h("svg",{viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},o.h("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},o.h("g",{fill:"currentColor","fill-rule":"nonzero"},o.h("path",{d:"M8,2 C11.3137085,2 14,4.6862915 14,8 C14,11.3137085 11.3137085,14 8,14 C4.6862915,14 2,11.3137085 2,8 C2,4.6862915 4.6862915,2 8,2 Z M6.5343055,5.83859116 C6.33943736,5.70359511 6.07001296,5.72288026 5.89644661,5.89644661 L5.89644661,5.89644661 L5.83859116,5.9656945 C5.70359511,6.16056264 5.72288026,6.42998704 5.89644661,6.60355339 L5.89644661,6.60355339 L7.293,8 L5.89644661,9.39644661 L5.83859116,9.4656945 C5.70359511,9.66056264 5.72288026,9.92998704 5.89644661,10.1035534 L5.89644661,10.1035534 L5.9656945,10.1614088 C6.16056264,10.2964049 6.42998704,10.2771197 6.60355339,10.1035534 L6.60355339,10.1035534 L8,8.707 L9.39644661,10.1035534 L9.4656945,10.1614088 C9.66056264,10.2964049 9.92998704,10.2771197 10.1035534,10.1035534 L10.1035534,10.1035534 L10.1614088,10.0343055 C10.2964049,9.83943736 10.2771197,9.57001296 10.1035534,9.39644661 L10.1035534,9.39644661 L8.707,8 L10.1035534,6.60355339 L10.1614088,6.5343055 C10.2964049,6.33943736 10.2771197,6.07001296 10.1035534,5.89644661 L10.1035534,5.89644661 L10.0343055,5.83859116 C9.83943736,5.70359511 9.57001296,5.72288026 9.39644661,5.89644661 L9.39644661,5.89644661 L8,7.293 L6.60355339,5.89644661 Z"}))))),fo=o.defineComponent({name:"BaseIconSwitchTransition",setup(e,{slots:t}){const n=Ln();return()=>o.h(o.Transition,{name:"icon-switch-transition",appear:n.value},t)}}),Fs=o.defineComponent({name:"FadeInExpandTransition",props:{appear:Boolean,group:Boolean,mode:String,onLeave:Function,onAfterLeave:Function,onAfterEnter:Function,width:Boolean,reverse:Boolean},setup(e,{slots:t}){function n(s){e.width?s.style.maxWidth=`${s.offsetWidth}px`:s.style.maxHeight=`${s.offsetHeight}px`,s.offsetWidth}function r(s){e.width?s.style.maxWidth="0":s.style.maxHeight="0",s.offsetWidth;const{onLeave:c}=e;c&&c()}function i(s){e.width?s.style.maxWidth="":s.style.maxHeight="";const{onAfterLeave:c}=e;c&&c()}function a(s){if(s.style.transition="none",e.width){const c=s.offsetWidth;s.style.maxWidth="0",s.offsetWidth,s.style.transition="",s.style.maxWidth=`${c}px`}else if(e.reverse)s.style.maxHeight=`${s.offsetHeight}px`,s.offsetHeight,s.style.transition="",s.style.maxHeight="0";else{const c=s.offsetHeight;s.style.maxHeight="0",s.offsetWidth,s.style.transition="",s.style.maxHeight=`${c}px`}s.offsetWidth}function l(s){var c;e.width?s.style.maxWidth="":e.reverse||(s.style.maxHeight=""),(c=e.onAfterEnter)===null||c===void 0||c.call(e)}return()=>{const{group:s,width:c,appear:d,mode:u}=e,f=s?o.TransitionGroup:o.Transition,p={name:c?"fade-in-width-expand-transition":"fade-in-height-expand-transition",appear:d,onEnter:a,onAfterEnter:l,onBeforeLeave:n,onLeave:r,onAfterLeave:i};return s||(p.mode=u),o.h(f,p,t)}}}),Ug=w("base-icon",`
|
|
32
32
|
height: 1em;
|
|
33
33
|
width: 1em;
|
|
34
34
|
line-height: 1em;
|
|
@@ -40,7 +40,7 @@ ${t}
|
|
|
40
40
|
`,[I("svg",`
|
|
41
41
|
height: 1em;
|
|
42
42
|
width: 1em;
|
|
43
|
-
`)]),yt=o.defineComponent({name:"BaseIcon",props:{role:String,ariaLabel:String,ariaDisabled:{type:Boolean,default:void 0},ariaHidden:{type:Boolean,default:void 0},clsPrefix:{type:String,required:!0},onClick:Function,onMousedown:Function,onMouseup:Function},setup(e){Tn("-base-icon",
|
|
43
|
+
`)]),yt=o.defineComponent({name:"BaseIcon",props:{role:String,ariaLabel:String,ariaDisabled:{type:Boolean,default:void 0},ariaHidden:{type:Boolean,default:void 0},clsPrefix:{type:String,required:!0},onClick:Function,onMousedown:Function,onMouseup:Function},setup(e){Tn("-base-icon",Ug,o.toRef(e,"clsPrefix"))},render(){return o.h("i",{class:`${this.clsPrefix}-base-icon`,onClick:this.onClick,onMousedown:this.onMousedown,onMouseup:this.onMouseup,role:this.role,"aria-label":this.ariaLabel,"aria-hidden":this.ariaHidden,"aria-disabled":this.ariaDisabled},this.$slots)}}),Gg=w("base-close",`
|
|
44
44
|
display: flex;
|
|
45
45
|
align-items: center;
|
|
46
46
|
justify-content: center;
|
|
@@ -84,7 +84,7 @@ ${t}
|
|
|
84
84
|
background-color: transparent;
|
|
85
85
|
`),W("round",[I("&::before",`
|
|
86
86
|
border-radius: 50%;
|
|
87
|
-
`)])]),Ai=o.defineComponent({name:"BaseClose",props:{isButtonTag:{type:Boolean,default:!0},clsPrefix:{type:String,required:!0},disabled:{type:Boolean,default:void 0},focusable:{type:Boolean,default:!0},round:Boolean,onClick:Function,absolute:Boolean},setup(e){return Tn("-base-close",
|
|
87
|
+
`)])]),Ai=o.defineComponent({name:"BaseClose",props:{isButtonTag:{type:Boolean,default:!0},clsPrefix:{type:String,required:!0},disabled:{type:Boolean,default:void 0},focusable:{type:Boolean,default:!0},round:Boolean,onClick:Function,absolute:Boolean},setup(e){return Tn("-base-close",Gg,o.toRef(e,"clsPrefix")),()=>{const{clsPrefix:t,disabled:n,absolute:r,round:i,isButtonTag:a}=e,l=a?"button":"div";return o.h(l,{type:a?"button":void 0,tabindex:n||!e.focusable?-1:0,"aria-disabled":n,"aria-label":"close",role:a?void 0:"button",disabled:n,class:[`${t}-base-close`,r&&`${t}-base-close--absolute`,n&&`${t}-base-close--disabled`,i&&`${t}-base-close--round`],onMousedown:s=>{e.focusable||s.preventDefault()},onClick:e.onClick},o.h(yt,{clsPrefix:t},{default:()=>o.h(Is,null)}))}}}),qg=o.defineComponent({props:{onFocus:Function,onBlur:Function},setup(e){return()=>o.h("div",{style:"width: 0; height: 0",tabindex:0,onFocus:e.onFocus,onBlur:e.onBlur})}}),{cubicBezierEaseInOut:Kg}=Sn;function qn({originalTransform:e="",left:t=0,top:n=0,transition:r=`all .3s ${Kg} !important`}={}){return[I("&.icon-switch-transition-enter-from, &.icon-switch-transition-leave-to",{transform:`${e} scale(0.75)`,left:t,top:n,opacity:0}),I("&.icon-switch-transition-enter-to, &.icon-switch-transition-leave-from",{transform:`scale(1) ${e}`,left:t,top:n,opacity:1}),I("&.icon-switch-transition-enter-active, &.icon-switch-transition-leave-active",{transformOrigin:"center",position:"absolute",left:t,top:n,transition:r})]}const Xg=I([I("@keyframes rotator",`
|
|
88
88
|
0% {
|
|
89
89
|
-webkit-transform: rotate(0deg);
|
|
90
90
|
transform: rotate(0deg);
|
|
@@ -111,7 +111,7 @@ ${t}
|
|
|
111
111
|
`,[P("icon",`
|
|
112
112
|
height: 1em;
|
|
113
113
|
width: 1em;
|
|
114
|
-
`)])])]),Ii="1.6s",Xg={strokeWidth:{type:Number,default:28},stroke:{type:String,default:void 0}},ho=o.defineComponent({name:"BaseLoading",props:Object.assign({clsPrefix:{type:String,required:!0},show:{type:Boolean,default:!0},scale:{type:Number,default:1},radius:{type:Number,default:100}},Xg),setup(e){Tn("-base-loading",Kg,o.toRef(e,"clsPrefix"))},render(){const{clsPrefix:e,radius:t,strokeWidth:n,stroke:r,scale:i}=this,a=t/i;return o.h("div",{class:`${e}-base-loading`,role:"img","aria-label":"loading"},o.h(fo,null,{default:()=>this.show?o.h("div",{key:"icon",class:`${e}-base-loading__transition-wrapper`},o.h("div",{class:`${e}-base-loading__container`},o.h("svg",{class:`${e}-base-loading__icon`,viewBox:`0 0 ${2*a} ${2*a}`,xmlns:"http://www.w3.org/2000/svg",style:{color:r}},o.h("g",null,o.h("animateTransform",{attributeName:"transform",type:"rotate",values:`0 ${a} ${a};270 ${a} ${a}`,begin:"0s",dur:Ii,fill:"freeze",repeatCount:"indefinite"}),o.h("circle",{class:`${e}-base-loading__icon`,fill:"none",stroke:"currentColor","stroke-width":n,"stroke-linecap":"round",cx:a,cy:a,r:t-n/2,"stroke-dasharray":5.67*t,"stroke-dashoffset":18.48*t},o.h("animateTransform",{attributeName:"transform",type:"rotate",values:`0 ${a} ${a};135 ${a} ${a};450 ${a} ${a}`,begin:"0s",dur:Ii,fill:"freeze",repeatCount:"indefinite"}),o.h("animate",{attributeName:"stroke-dashoffset",values:`${5.67*t};${1.42*t};${5.67*t}`,begin:"0s",dur:Ii,fill:"freeze",repeatCount:"indefinite"})))))):o.h("div",{key:"placeholder",class:`${e}-base-loading__placeholder`},this.$slots)}))}});function Fs(e){return Array.isArray(e)?e:[e]}const Fi={STOP:"STOP"};function Ds(e,t){const n=t(e);e.children!==void 0&&n!==Fi.STOP&&e.children.forEach(r=>Ds(r,t))}function Yg(e,t={}){const{preserveGroup:n=!1}=t,r=[],i=n?l=>{l.isLeaf||(r.push(l.key),a(l.children))}:l=>{l.isLeaf||(l.isGroup||r.push(l.key),a(l.children))};function a(l){l.forEach(i)}return a(e),r}function Zg(e,t){const{isLeaf:n}=e;return n!==void 0?n:!t(e)}function Jg(e){return e.children}function Qg(e){return e.key}function ev(){return!1}function tv(e,t){const{isLeaf:n}=e;return!(n===!1&&!Array.isArray(t(e)))}function nv(e){return e.disabled===!0}function rv(e,t){return e.isLeaf===!1&&!Array.isArray(t(e))}function ov(e,t){if(e.isLeaf===!0){const n=t(e);if(Array.isArray(n)&&n.length>0)return!0}return!1}function Di(e){var t;return e==null?[]:Array.isArray(e)?e:(t=e.checkedKeys)!==null&&t!==void 0?t:[]}function Ni(e){var t;return e==null||Array.isArray(e)?[]:(t=e.indeterminateKeys)!==null&&t!==void 0?t:[]}function iv(e,t){const n=new Set(e);return t.forEach(r=>{n.has(r)||n.add(r)}),Array.from(n)}function av(e,t){const n=new Set(e);return t.forEach(r=>{n.has(r)&&n.delete(r)}),Array.from(n)}function lv(e){return(e==null?void 0:e.type)==="group"}function sv(e){const t=new Map;return e.forEach((n,r)=>{t.set(n.key,r)}),n=>{var r;return(r=t.get(n))!==null&&r!==void 0?r:null}}class cv extends Error{constructor(){super(),this.message="SubtreeNotLoadedError: checking a subtree whose required nodes are not fully loaded."}}function dv(e,t,n,r){return po(t.concat(e),n,r,!1)}function uv(e,t){const n=new Set;return e.forEach(r=>{const i=t.treeNodeMap.get(r);if(i!==void 0){let a=i.parent;for(;a!==null&&!(a.disabled||n.has(a.key));)n.add(a.key),a=a.parent}}),n}function fv(e,t,n,r){const i=po(t,n,r,!1),a=po(e,n,r,!0),l=uv(e,n),s=[];return i.forEach(c=>{(a.has(c)||l.has(c))&&s.push(c)}),s.forEach(c=>i.delete(c)),i}function Li(e,t){const{checkedKeys:n,keysToCheck:r,keysToUncheck:i,indeterminateKeys:a,cascade:l,leafOnly:s,checkStrategy:c,allowNotLoaded:d}=e;if(!l)return r!==void 0?{checkedKeys:iv(n,r),indeterminateKeys:Array.from(a)}:i!==void 0?{checkedKeys:av(n,i),indeterminateKeys:Array.from(a)}:{checkedKeys:Array.from(n),indeterminateKeys:Array.from(a)};const{levelTreeNodeMap:u}=t;let f;i!==void 0?f=fv(i,n,t,d):r!==void 0?f=dv(r,n,t,d):f=po(n,t,d,!1);const p=c==="parent",b=c==="child"||s,h=f,x=new Set,v=Math.max.apply(null,Array.from(u.keys()));for(let g=v;g>=0;g-=1){const k=g===0,z=u.get(g);for(const $ of z){if($.isLeaf)continue;const{key:T,shallowLoaded:O}=$;if(b&&O&&$.children.forEach(N=>{!N.disabled&&!N.isLeaf&&N.shallowLoaded&&h.has(N.key)&&h.delete(N.key)}),$.disabled||!O)continue;let m=!0,S=!1,M=!0;for(const N of $.children){const A=N.key;if(!N.disabled){if(M&&(M=!1),h.has(A))S=!0;else if(x.has(A)){S=!0,m=!1;break}else if(m=!1,S)break}}m&&!M?(p&&$.children.forEach(N=>{!N.disabled&&h.has(N.key)&&h.delete(N.key)}),h.add(T)):S&&x.add(T),k&&b&&h.has(T)&&h.delete(T)}}return{checkedKeys:Array.from(h),indeterminateKeys:Array.from(x)}}function po(e,t,n,r){const{treeNodeMap:i,getChildren:a}=t,l=new Set,s=new Set(e);return e.forEach(c=>{const d=i.get(c);d!==void 0&&Ds(d,u=>{if(u.disabled)return Fi.STOP;const{key:f}=u;if(!l.has(f)&&(l.add(f),s.add(f),rv(u.rawNode,a))){if(r)return Fi.STOP;if(!n)throw new cv}})}),s}function hv(e,{includeGroup:t=!1,includeSelf:n=!0},r){var i;const a=r.treeNodeMap;let l=e==null?null:(i=a.get(e))!==null&&i!==void 0?i:null;const s={keyPath:[],treeNodePath:[],treeNode:l};if(l!=null&&l.ignored)return s.treeNode=null,s;for(;l;)!l.ignored&&(t||!l.isGroup)&&s.treeNodePath.push(l),l=l.parent;return s.treeNodePath.reverse(),n||s.treeNodePath.pop(),s.keyPath=s.treeNodePath.map(c=>c.key),s}function pv(e){if(e.length===0)return null;const t=e[0];return t.isGroup||t.ignored||t.disabled?t.getNext():t}function bv(e,t){const n=e.siblings,r=n.length,{index:i}=e;return t?n[(i+1)%r]:i===n.length-1?null:n[i+1]}function Ns(e,t,{loop:n=!1,includeDisabled:r=!1}={}){const i=t==="prev"?mv:bv,a={reverse:t==="prev"};let l=!1,s=null;function c(d){if(d!==null){if(d===e){if(!l)l=!0;else if(!e.disabled&&!e.isGroup){s=e;return}}else if((!d.disabled||r)&&!d.ignored&&!d.isGroup){s=d;return}if(d.isGroup){const u=Hi(d,a);u!==null?s=u:c(i(d,n))}else{const u=i(d,!1);if(u!==null)c(u);else{const f=gv(d);f!=null&&f.isGroup?c(i(f,n)):n&&c(i(d,!0))}}}}return c(e),s}function mv(e,t){const n=e.siblings,r=n.length,{index:i}=e;return t?n[(i-1+r)%r]:i===0?null:n[i-1]}function gv(e){return e.parent}function Hi(e,t={}){const{reverse:n=!1}=t,{children:r}=e;if(r){const{length:i}=r,a=n?i-1:0,l=n?-1:i,s=n?-1:1;for(let c=a;c!==l;c+=s){const d=r[c];if(!d.disabled&&!d.ignored)if(d.isGroup){const u=Hi(d,t);if(u!==null)return u}else return d}}return null}const vv={getChild(){return this.ignored?null:Hi(this)},getParent(){const{parent:e}=this;return e!=null&&e.isGroup?e.getParent():e},getNext(e={}){return Ns(this,"next",e)},getPrev(e={}){return Ns(this,"prev",e)}};function xv(e,t){const n=t?new Set(t):void 0,r=[];function i(a){a.forEach(l=>{r.push(l),!(l.isLeaf||!l.children||l.ignored)&&(l.isGroup||n===void 0||n.has(l.key))&&i(l.children)})}return i(e),r}function yv(e,t){const n=e.key;for(;t;){if(t.key===n)return!0;t=t.parent}return!1}function Ls(e,t,n,r,i,a=null,l=0){const s=[];return e.forEach((c,d)=>{var u;process.env.NODE_ENV!=="production"&&ov(c,i)&&console.error("[treemate]: node",c,"is invalid");const f=Object.create(r);if(f.rawNode=c,f.siblings=s,f.level=l,f.index=d,f.isFirstChild=d===0,f.isLastChild=d+1===e.length,f.parent=a,!f.ignored){const p=i(c);Array.isArray(p)&&(f.children=Ls(p,t,n,r,i,f,l+1))}s.push(f),t.set(f.key,f),n.has(l)||n.set(l,[]),(u=n.get(l))===null||u===void 0||u.push(f)}),s}function wv(e,t={}){var n;const r=new Map,i=new Map,{getDisabled:a=nv,getIgnored:l=ev,getIsGroup:s=lv,getKey:c=Qg}=t,d=(n=t.getChildren)!==null&&n!==void 0?n:Jg,u=t.ignoreEmptyChildren?$=>{const T=d($);return Array.isArray(T)?T.length?T:null:T}:d,f=Object.assign({get key(){return c(this.rawNode)},get disabled(){return a(this.rawNode)},get isGroup(){return s(this.rawNode)},get isLeaf(){return Zg(this.rawNode,u)},get shallowLoaded(){return tv(this.rawNode,u)},get ignored(){return l(this.rawNode)},contains($){return yv(this,$)}},vv),p=Ls(e,r,i,f,u);function b($){if($==null)return null;const T=r.get($);return T&&!T.isGroup&&!T.ignored?T:null}function h($){if($==null)return null;const T=r.get($);return T&&!T.ignored?T:null}function x($,T){const O=h($);return O?O.getPrev(T):null}function v($,T){const O=h($);return O?O.getNext(T):null}function g($){const T=h($);return T?T.getParent():null}function k($){const T=h($);return T?T.getChild():null}const z={treeNodes:p,treeNodeMap:r,levelTreeNodeMap:i,maxLevel:Math.max(...i.keys()),getChildren:u,getFlattenedNodes($){return xv(p,$)},getNode:b,getPrev:x,getNext:v,getParent:g,getChild:k,getFirstAvailableNode(){return pv(p)},getPath($,T={}){return hv($,T,z)},getCheckedKeys($,T={}){const{cascade:O=!0,leafOnly:m=!1,checkStrategy:S="all",allowNotLoaded:M=!1}=T;return Li({checkedKeys:Di($),indeterminateKeys:Ni($),cascade:O,leafOnly:m,checkStrategy:S,allowNotLoaded:M},z)},check($,T,O={}){const{cascade:m=!0,leafOnly:S=!1,checkStrategy:M="all",allowNotLoaded:N=!1}=O;return Li({checkedKeys:Di(T),indeterminateKeys:Ni(T),keysToCheck:$==null?[]:Fs($),cascade:m,leafOnly:S,checkStrategy:M,allowNotLoaded:N},z)},uncheck($,T,O={}){const{cascade:m=!0,leafOnly:S=!1,checkStrategy:M="all",allowNotLoaded:N=!1}=O;return Li({checkedKeys:Di(T),indeterminateKeys:Ni(T),keysToUncheck:$==null?[]:Fs($),cascade:m,leafOnly:S,checkStrategy:M,allowNotLoaded:N},z)},getNonLeafKeys($={}){return Yg(p,$)}};return z}const pe={neutralBase:"#FFF",neutralInvertBase:"#000",neutralTextBase:"#000",neutralPopover:"#fff",neutralCard:"#fff",neutralModal:"#fff",neutralBody:"#fff",alpha1:"0.82",alpha2:"0.72",alpha3:"0.38",alpha4:"0.24",alpha5:"0.18",alphaClose:"0.6",alphaDisabled:"0.5",alphaDisabledInput:"0.02",alphaPending:"0.05",alphaTablePending:"0.02",alphaPressed:"0.07",alphaAvatar:"0.2",alphaRail:"0.14",alphaProgressRail:".08",alphaBorder:"0.12",alphaDivider:"0.06",alphaInput:"0",alphaAction:"0.02",alphaTab:"0.04",alphaScrollbar:"0.25",alphaScrollbarHover:"0.4",alphaCode:"0.05",alphaTag:"0.02",primaryHover:"#36ad6a",primaryDefault:"#18a058",primaryActive:"#0c7a43",primarySuppl:"#36ad6a",infoHover:"#4098fc",infoDefault:"#2080f0",infoActive:"#1060c9",infoSuppl:"#4098fc",errorHover:"#de576d",errorDefault:"#d03050",errorActive:"#ab1f3f",errorSuppl:"#de576d",warningHover:"#fcb040",warningDefault:"#f0a020",warningActive:"#c97c10",warningSuppl:"#fcb040",successHover:"#36ad6a",successDefault:"#18a058",successActive:"#0c7a43",successSuppl:"#36ad6a"},Cv=nt(pe.neutralBase),Hs=nt(pe.neutralInvertBase),Sv=`rgba(${Hs.slice(0,3).join(", ")}, `;function Vs(e){return`${Sv+String(e)})`}function it(e){const t=Array.from(Hs);return t[3]=Number(e),gt(Cv,t)}const Qe=Object.assign(Object.assign({name:"common"},Sn),{baseColor:pe.neutralBase,primaryColor:pe.primaryDefault,primaryColorHover:pe.primaryHover,primaryColorPressed:pe.primaryActive,primaryColorSuppl:pe.primarySuppl,infoColor:pe.infoDefault,infoColorHover:pe.infoHover,infoColorPressed:pe.infoActive,infoColorSuppl:pe.infoSuppl,successColor:pe.successDefault,successColorHover:pe.successHover,successColorPressed:pe.successActive,successColorSuppl:pe.successSuppl,warningColor:pe.warningDefault,warningColorHover:pe.warningHover,warningColorPressed:pe.warningActive,warningColorSuppl:pe.warningSuppl,errorColor:pe.errorDefault,errorColorHover:pe.errorHover,errorColorPressed:pe.errorActive,errorColorSuppl:pe.errorSuppl,textColorBase:pe.neutralTextBase,textColor1:"rgb(31, 34, 37)",textColor2:"rgb(51, 54, 57)",textColor3:"rgb(118, 124, 130)",textColorDisabled:it(pe.alpha4),placeholderColor:it(pe.alpha4),placeholderColorDisabled:it(pe.alpha5),iconColor:it(pe.alpha4),iconColorHover:Or(it(pe.alpha4),{lightness:.75}),iconColorPressed:Or(it(pe.alpha4),{lightness:.9}),iconColorDisabled:it(pe.alpha5),opacity1:pe.alpha1,opacity2:pe.alpha2,opacity3:pe.alpha3,opacity4:pe.alpha4,opacity5:pe.alpha5,dividerColor:"rgb(239, 239, 245)",borderColor:"rgb(224, 224, 230)",closeIconColor:it(Number(pe.alphaClose)),closeIconColorHover:it(Number(pe.alphaClose)),closeIconColorPressed:it(Number(pe.alphaClose)),closeColorHover:"rgba(0, 0, 0, .09)",closeColorPressed:"rgba(0, 0, 0, .13)",clearColor:it(pe.alpha4),clearColorHover:Or(it(pe.alpha4),{lightness:.75}),clearColorPressed:Or(it(pe.alpha4),{lightness:.9}),scrollbarColor:Vs(pe.alphaScrollbar),scrollbarColorHover:Vs(pe.alphaScrollbarHover),scrollbarWidth:"5px",scrollbarHeight:"5px",scrollbarBorderRadius:"5px",progressRailColor:it(pe.alphaProgressRail),railColor:"rgb(219, 219, 223)",popoverColor:pe.neutralPopover,tableColor:pe.neutralCard,cardColor:pe.neutralCard,modalColor:pe.neutralModal,bodyColor:pe.neutralBody,tagColor:"#eee",avatarColor:it(pe.alphaAvatar),invertedColor:"rgb(0, 20, 40)",inputColor:it(pe.alphaInput),codeColor:"rgb(244, 244, 248)",tabColor:"rgb(247, 247, 250)",actionColor:"rgb(250, 250, 252)",tableHeaderColor:"rgb(250, 250, 252)",hoverColor:"rgb(243, 243, 245)",tableColorHover:"rgba(0, 0, 100, 0.03)",tableColorStriped:"rgba(0, 0, 100, 0.02)",pressedColor:"rgb(237, 237, 239)",opacityDisabled:pe.alphaDisabled,inputColorDisabled:"rgb(250, 250, 252)",buttonColor2:"rgba(46, 51, 56, .05)",buttonColor2Hover:"rgba(46, 51, 56, .09)",buttonColor2Pressed:"rgba(46, 51, 56, .13)",boxShadow1:"0 1px 2px -2px rgba(0, 0, 0, .08), 0 3px 6px 0 rgba(0, 0, 0, .06), 0 5px 12px 4px rgba(0, 0, 0, .04)",boxShadow2:"0 3px 6px -4px rgba(0, 0, 0, .12), 0 6px 16px 0 rgba(0, 0, 0, .08), 0 9px 28px 8px rgba(0, 0, 0, .05)",boxShadow3:"0 6px 16px -9px rgba(0, 0, 0, .08), 0 9px 28px 0 rgba(0, 0, 0, .05), 0 12px 48px 16px rgba(0, 0, 0, .03)"}),$v={iconSizeSmall:"34px",iconSizeMedium:"40px",iconSizeLarge:"46px",iconSizeHuge:"52px"};function Tv(e){const{textColorDisabled:t,iconColor:n,textColor2:r,fontSizeSmall:i,fontSizeMedium:a,fontSizeLarge:l,fontSizeHuge:s}=e;return Object.assign(Object.assign({},$v),{fontSizeSmall:i,fontSizeMedium:a,fontSizeLarge:l,fontSizeHuge:s,textColor:t,iconColor:n,extraTextColor:r})}const js={name:"Empty",common:Qe,self:Tv},kv=w("empty",`
|
|
114
|
+
`)])])]),Ii="1.6s",Yg={strokeWidth:{type:Number,default:28},stroke:{type:String,default:void 0}},ho=o.defineComponent({name:"BaseLoading",props:Object.assign({clsPrefix:{type:String,required:!0},show:{type:Boolean,default:!0},scale:{type:Number,default:1},radius:{type:Number,default:100}},Yg),setup(e){Tn("-base-loading",Xg,o.toRef(e,"clsPrefix"))},render(){const{clsPrefix:e,radius:t,strokeWidth:n,stroke:r,scale:i}=this,a=t/i;return o.h("div",{class:`${e}-base-loading`,role:"img","aria-label":"loading"},o.h(fo,null,{default:()=>this.show?o.h("div",{key:"icon",class:`${e}-base-loading__transition-wrapper`},o.h("div",{class:`${e}-base-loading__container`},o.h("svg",{class:`${e}-base-loading__icon`,viewBox:`0 0 ${2*a} ${2*a}`,xmlns:"http://www.w3.org/2000/svg",style:{color:r}},o.h("g",null,o.h("animateTransform",{attributeName:"transform",type:"rotate",values:`0 ${a} ${a};270 ${a} ${a}`,begin:"0s",dur:Ii,fill:"freeze",repeatCount:"indefinite"}),o.h("circle",{class:`${e}-base-loading__icon`,fill:"none",stroke:"currentColor","stroke-width":n,"stroke-linecap":"round",cx:a,cy:a,r:t-n/2,"stroke-dasharray":5.67*t,"stroke-dashoffset":18.48*t},o.h("animateTransform",{attributeName:"transform",type:"rotate",values:`0 ${a} ${a};135 ${a} ${a};450 ${a} ${a}`,begin:"0s",dur:Ii,fill:"freeze",repeatCount:"indefinite"}),o.h("animate",{attributeName:"stroke-dashoffset",values:`${5.67*t};${1.42*t};${5.67*t}`,begin:"0s",dur:Ii,fill:"freeze",repeatCount:"indefinite"})))))):o.h("div",{key:"placeholder",class:`${e}-base-loading__placeholder`},this.$slots)}))}});function Ds(e){return Array.isArray(e)?e:[e]}const Fi={STOP:"STOP"};function Ns(e,t){const n=t(e);e.children!==void 0&&n!==Fi.STOP&&e.children.forEach(r=>Ns(r,t))}function Zg(e,t={}){const{preserveGroup:n=!1}=t,r=[],i=n?l=>{l.isLeaf||(r.push(l.key),a(l.children))}:l=>{l.isLeaf||(l.isGroup||r.push(l.key),a(l.children))};function a(l){l.forEach(i)}return a(e),r}function Jg(e,t){const{isLeaf:n}=e;return n!==void 0?n:!t(e)}function Qg(e){return e.children}function ev(e){return e.key}function tv(){return!1}function nv(e,t){const{isLeaf:n}=e;return!(n===!1&&!Array.isArray(t(e)))}function rv(e){return e.disabled===!0}function ov(e,t){return e.isLeaf===!1&&!Array.isArray(t(e))}function iv(e,t){if(e.isLeaf===!0){const n=t(e);if(Array.isArray(n)&&n.length>0)return!0}return!1}function Di(e){var t;return e==null?[]:Array.isArray(e)?e:(t=e.checkedKeys)!==null&&t!==void 0?t:[]}function Ni(e){var t;return e==null||Array.isArray(e)?[]:(t=e.indeterminateKeys)!==null&&t!==void 0?t:[]}function av(e,t){const n=new Set(e);return t.forEach(r=>{n.has(r)||n.add(r)}),Array.from(n)}function lv(e,t){const n=new Set(e);return t.forEach(r=>{n.has(r)&&n.delete(r)}),Array.from(n)}function sv(e){return(e==null?void 0:e.type)==="group"}function cv(e){const t=new Map;return e.forEach((n,r)=>{t.set(n.key,r)}),n=>{var r;return(r=t.get(n))!==null&&r!==void 0?r:null}}class dv extends Error{constructor(){super(),this.message="SubtreeNotLoadedError: checking a subtree whose required nodes are not fully loaded."}}function uv(e,t,n,r){return po(t.concat(e),n,r,!1)}function fv(e,t){const n=new Set;return e.forEach(r=>{const i=t.treeNodeMap.get(r);if(i!==void 0){let a=i.parent;for(;a!==null&&!(a.disabled||n.has(a.key));)n.add(a.key),a=a.parent}}),n}function hv(e,t,n,r){const i=po(t,n,r,!1),a=po(e,n,r,!0),l=fv(e,n),s=[];return i.forEach(c=>{(a.has(c)||l.has(c))&&s.push(c)}),s.forEach(c=>i.delete(c)),i}function Li(e,t){const{checkedKeys:n,keysToCheck:r,keysToUncheck:i,indeterminateKeys:a,cascade:l,leafOnly:s,checkStrategy:c,allowNotLoaded:d}=e;if(!l)return r!==void 0?{checkedKeys:av(n,r),indeterminateKeys:Array.from(a)}:i!==void 0?{checkedKeys:lv(n,i),indeterminateKeys:Array.from(a)}:{checkedKeys:Array.from(n),indeterminateKeys:Array.from(a)};const{levelTreeNodeMap:u}=t;let f;i!==void 0?f=hv(i,n,t,d):r!==void 0?f=uv(r,n,t,d):f=po(n,t,d,!1);const p=c==="parent",b=c==="child"||s,h=f,x=new Set,v=Math.max.apply(null,Array.from(u.keys()));for(let g=v;g>=0;g-=1){const k=g===0,z=u.get(g);for(const $ of z){if($.isLeaf)continue;const{key:T,shallowLoaded:O}=$;if(b&&O&&$.children.forEach(N=>{!N.disabled&&!N.isLeaf&&N.shallowLoaded&&h.has(N.key)&&h.delete(N.key)}),$.disabled||!O)continue;let m=!0,S=!1,M=!0;for(const N of $.children){const A=N.key;if(!N.disabled){if(M&&(M=!1),h.has(A))S=!0;else if(x.has(A)){S=!0,m=!1;break}else if(m=!1,S)break}}m&&!M?(p&&$.children.forEach(N=>{!N.disabled&&h.has(N.key)&&h.delete(N.key)}),h.add(T)):S&&x.add(T),k&&b&&h.has(T)&&h.delete(T)}}return{checkedKeys:Array.from(h),indeterminateKeys:Array.from(x)}}function po(e,t,n,r){const{treeNodeMap:i,getChildren:a}=t,l=new Set,s=new Set(e);return e.forEach(c=>{const d=i.get(c);d!==void 0&&Ns(d,u=>{if(u.disabled)return Fi.STOP;const{key:f}=u;if(!l.has(f)&&(l.add(f),s.add(f),ov(u.rawNode,a))){if(r)return Fi.STOP;if(!n)throw new dv}})}),s}function pv(e,{includeGroup:t=!1,includeSelf:n=!0},r){var i;const a=r.treeNodeMap;let l=e==null?null:(i=a.get(e))!==null&&i!==void 0?i:null;const s={keyPath:[],treeNodePath:[],treeNode:l};if(l!=null&&l.ignored)return s.treeNode=null,s;for(;l;)!l.ignored&&(t||!l.isGroup)&&s.treeNodePath.push(l),l=l.parent;return s.treeNodePath.reverse(),n||s.treeNodePath.pop(),s.keyPath=s.treeNodePath.map(c=>c.key),s}function bv(e){if(e.length===0)return null;const t=e[0];return t.isGroup||t.ignored||t.disabled?t.getNext():t}function mv(e,t){const n=e.siblings,r=n.length,{index:i}=e;return t?n[(i+1)%r]:i===n.length-1?null:n[i+1]}function Ls(e,t,{loop:n=!1,includeDisabled:r=!1}={}){const i=t==="prev"?gv:mv,a={reverse:t==="prev"};let l=!1,s=null;function c(d){if(d!==null){if(d===e){if(!l)l=!0;else if(!e.disabled&&!e.isGroup){s=e;return}}else if((!d.disabled||r)&&!d.ignored&&!d.isGroup){s=d;return}if(d.isGroup){const u=Hi(d,a);u!==null?s=u:c(i(d,n))}else{const u=i(d,!1);if(u!==null)c(u);else{const f=vv(d);f!=null&&f.isGroup?c(i(f,n)):n&&c(i(d,!0))}}}}return c(e),s}function gv(e,t){const n=e.siblings,r=n.length,{index:i}=e;return t?n[(i-1+r)%r]:i===0?null:n[i-1]}function vv(e){return e.parent}function Hi(e,t={}){const{reverse:n=!1}=t,{children:r}=e;if(r){const{length:i}=r,a=n?i-1:0,l=n?-1:i,s=n?-1:1;for(let c=a;c!==l;c+=s){const d=r[c];if(!d.disabled&&!d.ignored)if(d.isGroup){const u=Hi(d,t);if(u!==null)return u}else return d}}return null}const xv={getChild(){return this.ignored?null:Hi(this)},getParent(){const{parent:e}=this;return e!=null&&e.isGroup?e.getParent():e},getNext(e={}){return Ls(this,"next",e)},getPrev(e={}){return Ls(this,"prev",e)}};function yv(e,t){const n=t?new Set(t):void 0,r=[];function i(a){a.forEach(l=>{r.push(l),!(l.isLeaf||!l.children||l.ignored)&&(l.isGroup||n===void 0||n.has(l.key))&&i(l.children)})}return i(e),r}function wv(e,t){const n=e.key;for(;t;){if(t.key===n)return!0;t=t.parent}return!1}function Hs(e,t,n,r,i,a=null,l=0){const s=[];return e.forEach((c,d)=>{var u;process.env.NODE_ENV!=="production"&&iv(c,i)&&console.error("[treemate]: node",c,"is invalid");const f=Object.create(r);if(f.rawNode=c,f.siblings=s,f.level=l,f.index=d,f.isFirstChild=d===0,f.isLastChild=d+1===e.length,f.parent=a,!f.ignored){const p=i(c);Array.isArray(p)&&(f.children=Hs(p,t,n,r,i,f,l+1))}s.push(f),t.set(f.key,f),n.has(l)||n.set(l,[]),(u=n.get(l))===null||u===void 0||u.push(f)}),s}function Cv(e,t={}){var n;const r=new Map,i=new Map,{getDisabled:a=rv,getIgnored:l=tv,getIsGroup:s=sv,getKey:c=ev}=t,d=(n=t.getChildren)!==null&&n!==void 0?n:Qg,u=t.ignoreEmptyChildren?$=>{const T=d($);return Array.isArray(T)?T.length?T:null:T}:d,f=Object.assign({get key(){return c(this.rawNode)},get disabled(){return a(this.rawNode)},get isGroup(){return s(this.rawNode)},get isLeaf(){return Jg(this.rawNode,u)},get shallowLoaded(){return nv(this.rawNode,u)},get ignored(){return l(this.rawNode)},contains($){return wv(this,$)}},xv),p=Hs(e,r,i,f,u);function b($){if($==null)return null;const T=r.get($);return T&&!T.isGroup&&!T.ignored?T:null}function h($){if($==null)return null;const T=r.get($);return T&&!T.ignored?T:null}function x($,T){const O=h($);return O?O.getPrev(T):null}function v($,T){const O=h($);return O?O.getNext(T):null}function g($){const T=h($);return T?T.getParent():null}function k($){const T=h($);return T?T.getChild():null}const z={treeNodes:p,treeNodeMap:r,levelTreeNodeMap:i,maxLevel:Math.max(...i.keys()),getChildren:u,getFlattenedNodes($){return yv(p,$)},getNode:b,getPrev:x,getNext:v,getParent:g,getChild:k,getFirstAvailableNode(){return bv(p)},getPath($,T={}){return pv($,T,z)},getCheckedKeys($,T={}){const{cascade:O=!0,leafOnly:m=!1,checkStrategy:S="all",allowNotLoaded:M=!1}=T;return Li({checkedKeys:Di($),indeterminateKeys:Ni($),cascade:O,leafOnly:m,checkStrategy:S,allowNotLoaded:M},z)},check($,T,O={}){const{cascade:m=!0,leafOnly:S=!1,checkStrategy:M="all",allowNotLoaded:N=!1}=O;return Li({checkedKeys:Di(T),indeterminateKeys:Ni(T),keysToCheck:$==null?[]:Ds($),cascade:m,leafOnly:S,checkStrategy:M,allowNotLoaded:N},z)},uncheck($,T,O={}){const{cascade:m=!0,leafOnly:S=!1,checkStrategy:M="all",allowNotLoaded:N=!1}=O;return Li({checkedKeys:Di(T),indeterminateKeys:Ni(T),keysToUncheck:$==null?[]:Ds($),cascade:m,leafOnly:S,checkStrategy:M,allowNotLoaded:N},z)},getNonLeafKeys($={}){return Zg(p,$)}};return z}const pe={neutralBase:"#FFF",neutralInvertBase:"#000",neutralTextBase:"#000",neutralPopover:"#fff",neutralCard:"#fff",neutralModal:"#fff",neutralBody:"#fff",alpha1:"0.82",alpha2:"0.72",alpha3:"0.38",alpha4:"0.24",alpha5:"0.18",alphaClose:"0.6",alphaDisabled:"0.5",alphaDisabledInput:"0.02",alphaPending:"0.05",alphaTablePending:"0.02",alphaPressed:"0.07",alphaAvatar:"0.2",alphaRail:"0.14",alphaProgressRail:".08",alphaBorder:"0.12",alphaDivider:"0.06",alphaInput:"0",alphaAction:"0.02",alphaTab:"0.04",alphaScrollbar:"0.25",alphaScrollbarHover:"0.4",alphaCode:"0.05",alphaTag:"0.02",primaryHover:"#36ad6a",primaryDefault:"#18a058",primaryActive:"#0c7a43",primarySuppl:"#36ad6a",infoHover:"#4098fc",infoDefault:"#2080f0",infoActive:"#1060c9",infoSuppl:"#4098fc",errorHover:"#de576d",errorDefault:"#d03050",errorActive:"#ab1f3f",errorSuppl:"#de576d",warningHover:"#fcb040",warningDefault:"#f0a020",warningActive:"#c97c10",warningSuppl:"#fcb040",successHover:"#36ad6a",successDefault:"#18a058",successActive:"#0c7a43",successSuppl:"#36ad6a"},Sv=nt(pe.neutralBase),Vs=nt(pe.neutralInvertBase),$v=`rgba(${Vs.slice(0,3).join(", ")}, `;function js(e){return`${$v+String(e)})`}function it(e){const t=Array.from(Vs);return t[3]=Number(e),gt(Sv,t)}const Qe=Object.assign(Object.assign({name:"common"},Sn),{baseColor:pe.neutralBase,primaryColor:pe.primaryDefault,primaryColorHover:pe.primaryHover,primaryColorPressed:pe.primaryActive,primaryColorSuppl:pe.primarySuppl,infoColor:pe.infoDefault,infoColorHover:pe.infoHover,infoColorPressed:pe.infoActive,infoColorSuppl:pe.infoSuppl,successColor:pe.successDefault,successColorHover:pe.successHover,successColorPressed:pe.successActive,successColorSuppl:pe.successSuppl,warningColor:pe.warningDefault,warningColorHover:pe.warningHover,warningColorPressed:pe.warningActive,warningColorSuppl:pe.warningSuppl,errorColor:pe.errorDefault,errorColorHover:pe.errorHover,errorColorPressed:pe.errorActive,errorColorSuppl:pe.errorSuppl,textColorBase:pe.neutralTextBase,textColor1:"rgb(31, 34, 37)",textColor2:"rgb(51, 54, 57)",textColor3:"rgb(118, 124, 130)",textColorDisabled:it(pe.alpha4),placeholderColor:it(pe.alpha4),placeholderColorDisabled:it(pe.alpha5),iconColor:it(pe.alpha4),iconColorHover:Or(it(pe.alpha4),{lightness:.75}),iconColorPressed:Or(it(pe.alpha4),{lightness:.9}),iconColorDisabled:it(pe.alpha5),opacity1:pe.alpha1,opacity2:pe.alpha2,opacity3:pe.alpha3,opacity4:pe.alpha4,opacity5:pe.alpha5,dividerColor:"rgb(239, 239, 245)",borderColor:"rgb(224, 224, 230)",closeIconColor:it(Number(pe.alphaClose)),closeIconColorHover:it(Number(pe.alphaClose)),closeIconColorPressed:it(Number(pe.alphaClose)),closeColorHover:"rgba(0, 0, 0, .09)",closeColorPressed:"rgba(0, 0, 0, .13)",clearColor:it(pe.alpha4),clearColorHover:Or(it(pe.alpha4),{lightness:.75}),clearColorPressed:Or(it(pe.alpha4),{lightness:.9}),scrollbarColor:js(pe.alphaScrollbar),scrollbarColorHover:js(pe.alphaScrollbarHover),scrollbarWidth:"5px",scrollbarHeight:"5px",scrollbarBorderRadius:"5px",progressRailColor:it(pe.alphaProgressRail),railColor:"rgb(219, 219, 223)",popoverColor:pe.neutralPopover,tableColor:pe.neutralCard,cardColor:pe.neutralCard,modalColor:pe.neutralModal,bodyColor:pe.neutralBody,tagColor:"#eee",avatarColor:it(pe.alphaAvatar),invertedColor:"rgb(0, 20, 40)",inputColor:it(pe.alphaInput),codeColor:"rgb(244, 244, 248)",tabColor:"rgb(247, 247, 250)",actionColor:"rgb(250, 250, 252)",tableHeaderColor:"rgb(250, 250, 252)",hoverColor:"rgb(243, 243, 245)",tableColorHover:"rgba(0, 0, 100, 0.03)",tableColorStriped:"rgba(0, 0, 100, 0.02)",pressedColor:"rgb(237, 237, 239)",opacityDisabled:pe.alphaDisabled,inputColorDisabled:"rgb(250, 250, 252)",buttonColor2:"rgba(46, 51, 56, .05)",buttonColor2Hover:"rgba(46, 51, 56, .09)",buttonColor2Pressed:"rgba(46, 51, 56, .13)",boxShadow1:"0 1px 2px -2px rgba(0, 0, 0, .08), 0 3px 6px 0 rgba(0, 0, 0, .06), 0 5px 12px 4px rgba(0, 0, 0, .04)",boxShadow2:"0 3px 6px -4px rgba(0, 0, 0, .12), 0 6px 16px 0 rgba(0, 0, 0, .08), 0 9px 28px 8px rgba(0, 0, 0, .05)",boxShadow3:"0 6px 16px -9px rgba(0, 0, 0, .08), 0 9px 28px 0 rgba(0, 0, 0, .05), 0 12px 48px 16px rgba(0, 0, 0, .03)"}),Tv={iconSizeSmall:"34px",iconSizeMedium:"40px",iconSizeLarge:"46px",iconSizeHuge:"52px"};function kv(e){const{textColorDisabled:t,iconColor:n,textColor2:r,fontSizeSmall:i,fontSizeMedium:a,fontSizeLarge:l,fontSizeHuge:s}=e;return Object.assign(Object.assign({},Tv),{fontSizeSmall:i,fontSizeMedium:a,fontSizeLarge:l,fontSizeHuge:s,textColor:t,iconColor:n,extraTextColor:r})}const Ws={name:"Empty",common:Qe,self:kv},Rv=w("empty",`
|
|
115
115
|
display: flex;
|
|
116
116
|
flex-direction: column;
|
|
117
117
|
align-items: center;
|
|
@@ -134,7 +134,7 @@ ${t}
|
|
|
134
134
|
transition: color .3s var(--n-bezier);
|
|
135
135
|
margin-top: 12px;
|
|
136
136
|
color: var(--n-extra-text-color);
|
|
137
|
-
`)]),
|
|
137
|
+
`)]),Pv=Object.assign(Object.assign({},Ce.props),{description:String,showDescription:{type:Boolean,default:!0},showIcon:{type:Boolean,default:!0},size:{type:String,default:"medium"},renderIcon:Function}),Ev=o.defineComponent({name:"Empty",props:Pv,setup(e){const{mergedClsPrefixRef:t,inlineThemeDisabled:n}=Ye(e),r=Ce("Empty","-empty",Rv,Ws,e,t),{localeRef:i}=vr("Empty"),a=o.inject($n,null),l=o.computed(()=>{var u,f,p;return(u=e.description)!==null&&u!==void 0?u:(p=(f=a==null?void 0:a.mergedComponentPropsRef.value)===null||f===void 0?void 0:f.Empty)===null||p===void 0?void 0:p.description}),s=o.computed(()=>{var u,f;return((f=(u=a==null?void 0:a.mergedComponentPropsRef.value)===null||u===void 0?void 0:u.Empty)===null||f===void 0?void 0:f.renderIcon)||(()=>o.h(Fg,null))}),c=o.computed(()=>{const{size:u}=e,{common:{cubicBezierEaseInOut:f},self:{[ee("iconSize",u)]:p,[ee("fontSize",u)]:b,textColor:h,iconColor:x,extraTextColor:v}}=r.value;return{"--n-icon-size":p,"--n-font-size":b,"--n-bezier":f,"--n-text-color":h,"--n-icon-color":x,"--n-extra-text-color":v}}),d=n?rt("empty",o.computed(()=>{let u="";const{size:f}=e;return u+=f[0],u}),c,e):void 0;return{mergedClsPrefix:t,mergedRenderIcon:s,localizedDescription:o.computed(()=>l.value||i.value.description),cssVars:n?void 0:c,themeClass:d==null?void 0:d.themeClass,onRender:d==null?void 0:d.onRender}},render(){const{$slots:e,mergedClsPrefix:t,onRender:n}=this;return n==null||n(),o.h("div",{class:[`${t}-empty`,this.themeClass],style:this.cssVars},this.showIcon?o.h("div",{class:`${t}-empty__icon`},e.icon?e.icon():o.h(yt,{clsPrefix:t},{default:this.mergedRenderIcon})):null,this.showDescription?o.h("div",{class:`${t}-empty__description`},e.default?e.default():this.localizedDescription):null,e.extra?o.h("div",{class:`${t}-empty__extra`},e.extra()):null)}}),zv={railInsetHorizontal:"auto 2px 4px 2px",railInsetVertical:"2px 4px 2px auto",railColor:"transparent"};function Bv(e){const{scrollbarColor:t,scrollbarColorHover:n,scrollbarHeight:r,scrollbarWidth:i,scrollbarBorderRadius:a}=e;return Object.assign(Object.assign({},zv),{height:r,width:i,borderRadius:a,color:t,colorHover:n})}const Us={name:"Scrollbar",common:Qe,self:Bv},{cubicBezierEaseInOut:Gs}=Sn;function _v({name:e="fade-in",enterDuration:t="0.2s",leaveDuration:n="0.2s",enterCubicBezier:r=Gs,leaveCubicBezier:i=Gs}={}){return[I(`&.${e}-transition-enter-active`,{transition:`all ${t} ${r}!important`}),I(`&.${e}-transition-leave-active`,{transition:`all ${n} ${i}!important`}),I(`&.${e}-transition-enter-from, &.${e}-transition-leave-to`,{opacity:0}),I(`&.${e}-transition-leave-from, &.${e}-transition-enter-to`,{opacity:1})]}const Mv=w("scrollbar",`
|
|
138
138
|
overflow: hidden;
|
|
139
139
|
position: relative;
|
|
140
140
|
z-index: auto;
|
|
@@ -181,7 +181,7 @@ ${t}
|
|
|
181
181
|
pointer-events: all;
|
|
182
182
|
background-color: var(--n-scrollbar-color);
|
|
183
183
|
transition: background-color .2s var(--n-scrollbar-bezier);
|
|
184
|
-
`,[Bv(),I("&:hover","background-color: var(--n-scrollbar-color-hover);")])])])])]),Mv=Object.assign(Object.assign({},Ce.props),{duration:{type:Number,default:0},scrollable:{type:Boolean,default:!0},xScrollable:Boolean,trigger:{type:String,default:"hover"},useUnifiedContainer:Boolean,triggerDisplayManually:Boolean,container:Function,content:Function,containerClass:String,containerStyle:[String,Object],contentClass:[String,Array],contentStyle:[String,Object],horizontalRailStyle:[String,Object],verticalRailStyle:[String,Object],onScroll:Function,onWheel:Function,onResize:Function,internalOnUpdateScrollLeft:Function,internalHoistYRail:Boolean}),Vi=o.defineComponent({name:"Scrollbar",props:Mv,inheritAttrs:!1,setup(e){const{mergedClsPrefixRef:t,inlineThemeDisabled:n,mergedRtlRef:r}=Ye(e),i=tn("Scrollbar",r,t),a=o.ref(null),l=o.ref(null),s=o.ref(null),c=o.ref(null),d=o.ref(null),u=o.ref(null),f=o.ref(null),p=o.ref(null),b=o.ref(null),h=o.ref(null),x=o.ref(null),v=o.ref(0),g=o.ref(0),k=o.ref(!1),z=o.ref(!1);let $=!1,T=!1,O,m,S=0,M=0,N=0,A=0;const L=gu(),U=Ce("Scrollbar","-scrollbar",_v,Ws,e,t),J=o.computed(()=>{const{value:y}=p,{value:H}=u,{value:Z}=h;return y===null||H===null||Z===null?0:Math.min(y,Z*y/H+at(U.value.self.width)*1.5)}),j=o.computed(()=>`${J.value}px`),Q=o.computed(()=>{const{value:y}=b,{value:H}=f,{value:Z}=x;return y===null||H===null||Z===null?0:Z*y/H+at(U.value.self.height)*1.5}),Y=o.computed(()=>`${Q.value}px`),ie=o.computed(()=>{const{value:y}=p,{value:H}=v,{value:Z}=u,{value:le}=h;if(y===null||Z===null||le===null)return 0;{const ce=Z-y;return ce?H/ce*(le-J.value):0}}),me=o.computed(()=>`${ie.value}px`),ae=o.computed(()=>{const{value:y}=b,{value:H}=g,{value:Z}=f,{value:le}=x;if(y===null||Z===null||le===null)return 0;{const ce=Z-y;return ce?H/ce*(le-Q.value):0}}),he=o.computed(()=>`${ae.value}px`),G=o.computed(()=>{const{value:y}=p,{value:H}=u;return y!==null&&H!==null&&H>y}),te=o.computed(()=>{const{value:y}=b,{value:H}=f;return y!==null&&H!==null&&H>y}),xe=o.computed(()=>{const{trigger:y}=e;return y==="none"||k.value}),Se=o.computed(()=>{const{trigger:y}=e;return y==="none"||z.value}),oe=o.computed(()=>{const{container:y}=e;return y?y():l.value}),Te=o.computed(()=>{const{content:y}=e;return y?y():s.value}),$e=(y,H)=>{if(!e.scrollable)return;if(typeof y=="number"){Ie(y,H??0,0,!1,"auto");return}const{left:Z,top:le,index:ce,elSize:ue,position:fe,behavior:ge,el:Ee,debounce:mt=!0}=y;(Z!==void 0||le!==void 0)&&Ie(Z??0,le??0,0,!1,ge),Ee!==void 0?Ie(0,Ee.offsetTop,Ee.offsetHeight,mt,ge):ce!==void 0&&ue!==void 0?Ie(0,ce*ue,ue,mt,ge):fe==="bottom"?Ie(0,Number.MAX_SAFE_INTEGER,0,!1,ge):fe==="top"&&Ie(0,0,0,!1,ge)},se=ff(()=>{e.container||$e({top:v.value,left:g.value})}),Ae=()=>{se.isDeactivated||B()},Be=y=>{if(se.isDeactivated)return;const{onResize:H}=e;H&&H(y),B()},We=(y,H)=>{if(!e.scrollable)return;const{value:Z}=oe;Z&&(typeof y=="object"?Z.scrollBy(y):Z.scrollBy(y,H||0))};function Ie(y,H,Z,le,ce){const{value:ue}=oe;if(ue){if(le){const{scrollTop:fe,offsetHeight:ge}=ue;if(H>fe){H+Z<=fe+ge||ue.scrollTo({left:y,top:H+Z-ge,behavior:ce});return}}ue.scrollTo({left:y,top:H,behavior:ce})}}function Le(){ne(),_(),B()}function Ke(){Re()}function Re(){X(),F()}function X(){m!==void 0&&window.clearTimeout(m),m=window.setTimeout(()=>{z.value=!1},e.duration)}function F(){O!==void 0&&window.clearTimeout(O),O=window.setTimeout(()=>{k.value=!1},e.duration)}function ne(){O!==void 0&&window.clearTimeout(O),k.value=!0}function _(){m!==void 0&&window.clearTimeout(m),z.value=!0}function D(y){const{onScroll:H}=e;H&&H(y),K()}function K(){const{value:y}=oe;y&&(v.value=y.scrollTop,g.value=y.scrollLeft*(i!=null&&i.value?-1:1))}function R(){const{value:y}=Te;y&&(u.value=y.offsetHeight,f.value=y.offsetWidth);const{value:H}=oe;H&&(p.value=H.offsetHeight,b.value=H.offsetWidth);const{value:Z}=d,{value:le}=c;Z&&(x.value=Z.offsetWidth),le&&(h.value=le.offsetHeight)}function C(){const{value:y}=oe;y&&(v.value=y.scrollTop,g.value=y.scrollLeft*(i!=null&&i.value?-1:1),p.value=y.offsetHeight,b.value=y.offsetWidth,u.value=y.scrollHeight,f.value=y.scrollWidth);const{value:H}=d,{value:Z}=c;H&&(x.value=H.offsetWidth),Z&&(h.value=Z.offsetHeight)}function B(){e.scrollable&&(e.useUnifiedContainer?C():(R(),K()))}function re(y){var H;return!(!((H=a.value)===null||H===void 0)&&H.contains(An(y)))}function we(y){y.preventDefault(),y.stopPropagation(),T=!0,ze("mousemove",window,Pe,!0),ze("mouseup",window,Ue,!0),M=g.value,N=i!=null&&i.value?window.innerWidth-y.clientX:y.clientX}function Pe(y){if(!T)return;O!==void 0&&window.clearTimeout(O),m!==void 0&&window.clearTimeout(m);const{value:H}=b,{value:Z}=f,{value:le}=Q;if(H===null||Z===null)return;const ue=(i!=null&&i.value?window.innerWidth-y.clientX-N:y.clientX-N)*(Z-H)/(H-le),fe=Z-H;let ge=M+ue;ge=Math.min(fe,ge),ge=Math.max(ge,0);const{value:Ee}=oe;if(Ee){Ee.scrollLeft=ge*(i!=null&&i.value?-1:1);const{internalOnUpdateScrollLeft:mt}=e;mt&&mt(ge)}}function Ue(y){y.preventDefault(),y.stopPropagation(),ke("mousemove",window,Pe,!0),ke("mouseup",window,Ue,!0),T=!1,B(),re(y)&&Re()}function De(y){y.preventDefault(),y.stopPropagation(),$=!0,ze("mousemove",window,Me,!0),ze("mouseup",window,Ze,!0),S=v.value,A=y.clientY}function Me(y){if(!$)return;O!==void 0&&window.clearTimeout(O),m!==void 0&&window.clearTimeout(m);const{value:H}=p,{value:Z}=u,{value:le}=J;if(H===null||Z===null)return;const ue=(y.clientY-A)*(Z-H)/(H-le),fe=Z-H;let ge=S+ue;ge=Math.min(fe,ge),ge=Math.max(ge,0);const{value:Ee}=oe;Ee&&(Ee.scrollTop=ge)}function Ze(y){y.preventDefault(),y.stopPropagation(),ke("mousemove",window,Me,!0),ke("mouseup",window,Ze,!0),$=!1,B(),re(y)&&Re()}o.watchEffect(()=>{const{value:y}=te,{value:H}=G,{value:Z}=t,{value:le}=d,{value:ce}=c;le&&(y?le.classList.remove(`${Z}-scrollbar-rail--disabled`):le.classList.add(`${Z}-scrollbar-rail--disabled`)),ce&&(H?ce.classList.remove(`${Z}-scrollbar-rail--disabled`):ce.classList.add(`${Z}-scrollbar-rail--disabled`))}),o.onMounted(()=>{e.container||B()}),o.onBeforeUnmount(()=>{O!==void 0&&window.clearTimeout(O),m!==void 0&&window.clearTimeout(m),ke("mousemove",window,Me,!0),ke("mouseup",window,Ze,!0)});const ft=o.computed(()=>{const{common:{cubicBezierEaseInOut:y},self:{color:H,colorHover:Z,height:le,width:ce,borderRadius:ue,railInsetHorizontal:fe,railInsetVertical:ge,railColor:Ee}}=U.value;return{"--n-scrollbar-bezier":y,"--n-scrollbar-color":H,"--n-scrollbar-color-hover":Z,"--n-scrollbar-border-radius":ue,"--n-scrollbar-width":ce,"--n-scrollbar-height":le,"--n-scrollbar-rail-inset-horizontal":fe,"--n-scrollbar-rail-inset-vertical":i!=null&&i.value?Id(ge):ge,"--n-scrollbar-rail-color":Ee}}),tt=n?rt("scrollbar",void 0,ft,e):void 0;return Object.assign(Object.assign({},{scrollTo:$e,scrollBy:We,sync:B,syncUnifiedContainer:C,handleMouseEnterWrapper:Le,handleMouseLeaveWrapper:Ke}),{mergedClsPrefix:t,rtlEnabled:i,containerScrollTop:v,wrapperRef:a,containerRef:l,contentRef:s,yRailRef:c,xRailRef:d,needYBar:G,needXBar:te,yBarSizePx:j,xBarSizePx:Y,yBarTopPx:me,xBarLeftPx:he,isShowXBar:xe,isShowYBar:Se,isIos:L,handleScroll:D,handleContentResize:Ae,handleContainerResize:Be,handleYScrollMouseDown:De,handleXScrollMouseDown:we,cssVars:n?void 0:ft,themeClass:tt==null?void 0:tt.themeClass,onRender:tt==null?void 0:tt.onRender})},render(){var e;const{$slots:t,mergedClsPrefix:n,triggerDisplayManually:r,rtlEnabled:i,internalHoistYRail:a}=this;if(!this.scrollable)return(e=t.default)===null||e===void 0?void 0:e.call(t);const l=this.trigger==="none",s=(u,f)=>o.h("div",{ref:"yRailRef",class:[`${n}-scrollbar-rail`,`${n}-scrollbar-rail--vertical`,u],"data-scrollbar-rail":!0,style:[f||"",this.verticalRailStyle],"aria-hidden":!0},o.h(l?Xo:o.Transition,l?null:{name:"fade-in-transition"},{default:()=>this.needYBar&&this.isShowYBar&&!this.isIos?o.h("div",{class:`${n}-scrollbar-rail__scrollbar`,style:{height:this.yBarSizePx,top:this.yBarTopPx},onMousedown:this.handleYScrollMouseDown}):null})),c=()=>{var u,f;return(u=this.onRender)===null||u===void 0||u.call(this),o.h("div",o.mergeProps(this.$attrs,{role:"none",ref:"wrapperRef",class:[`${n}-scrollbar`,this.themeClass,i&&`${n}-scrollbar--rtl`],style:this.cssVars,onMouseenter:r?void 0:this.handleMouseEnterWrapper,onMouseleave:r?void 0:this.handleMouseLeaveWrapper}),[this.container?(f=t.default)===null||f===void 0?void 0:f.call(t):o.h("div",{role:"none",ref:"containerRef",class:[`${n}-scrollbar-container`,this.containerClass],style:this.containerStyle,onScroll:this.handleScroll,onWheel:this.onWheel},o.h(Zt,{onResize:this.handleContentResize},{default:()=>o.h("div",{ref:"contentRef",role:"none",style:[{width:this.xScrollable?"fit-content":null},this.contentStyle],class:[`${n}-scrollbar-content`,this.contentClass]},t)})),a?null:s(void 0,void 0),this.xScrollable&&o.h("div",{ref:"xRailRef",class:[`${n}-scrollbar-rail`,`${n}-scrollbar-rail--horizontal`],style:this.horizontalRailStyle,"data-scrollbar-rail":!0,"aria-hidden":!0},o.h(l?Xo:o.Transition,l?null:{name:"fade-in-transition"},{default:()=>this.needXBar&&this.isShowXBar&&!this.isIos?o.h("div",{class:`${n}-scrollbar-rail__scrollbar`,style:{width:this.xBarSizePx,right:i?this.xBarLeftPx:void 0,left:i?void 0:this.xBarLeftPx},onMousedown:this.handleXScrollMouseDown}):null}))])},d=this.container?c():o.h(Zt,{onResize:this.handleContainerResize},{default:c});return a?o.h(o.Fragment,null,d,s(this.themeClass,this.cssVars)):d}}),Ov=Vi,Av={height:"calc(var(--n-option-height) * 7.6)",paddingSmall:"4px 0",paddingMedium:"4px 0",paddingLarge:"4px 0",paddingHuge:"4px 0",optionPaddingSmall:"0 12px",optionPaddingMedium:"0 12px",optionPaddingLarge:"0 12px",optionPaddingHuge:"0 12px",loadingSize:"18px"};function Iv(e){const{borderRadius:t,popoverColor:n,textColor3:r,dividerColor:i,textColor2:a,primaryColorPressed:l,textColorDisabled:s,primaryColor:c,opacityDisabled:d,hoverColor:u,fontSizeSmall:f,fontSizeMedium:p,fontSizeLarge:b,fontSizeHuge:h,heightSmall:x,heightMedium:v,heightLarge:g,heightHuge:k}=e;return Object.assign(Object.assign({},Av),{optionFontSizeSmall:f,optionFontSizeMedium:p,optionFontSizeLarge:b,optionFontSizeHuge:h,optionHeightSmall:x,optionHeightMedium:v,optionHeightLarge:g,optionHeightHuge:k,borderRadius:t,color:n,groupHeaderTextColor:r,actionDividerColor:i,optionTextColor:a,optionTextColorPressed:l,optionTextColorDisabled:s,optionTextColorActive:c,optionOpacityDisabled:d,optionCheckColor:c,optionColorPending:u,optionColorActive:"rgba(0, 0, 0, 0)",optionColorActivePending:u,actionTextColor:a,loadingColor:c})}const Gs={name:"InternalSelectMenu",common:Qe,peers:{Scrollbar:Ws,Empty:js},self:Iv};function Fv(e,t){return o.h(o.Transition,{name:"fade-in-scale-up-transition"},{default:()=>e?o.h(yt,{clsPrefix:t,class:`${t}-base-select-option__check`},{default:()=>o.h(Mg)}):null})}const qs=o.defineComponent({name:"NBaseSelectOption",props:{clsPrefix:{type:String,required:!0},tmNode:{type:Object,required:!0}},setup(e){const{valueRef:t,pendingTmNodeRef:n,multipleRef:r,valueSetRef:i,renderLabelRef:a,renderOptionRef:l,labelFieldRef:s,valueFieldRef:c,showCheckmarkRef:d,nodePropsRef:u,handleOptionClick:f,handleOptionMouseEnter:p}=o.inject(Qo),b=Je(()=>{const{value:g}=n;return g?e.tmNode.key===g.key:!1});function h(g){const{tmNode:k}=e;k.disabled||f(g,k)}function x(g){const{tmNode:k}=e;k.disabled||p(g,k)}function v(g){const{tmNode:k}=e,{value:z}=b;k.disabled||z||p(g,k)}return{multiple:r,isGrouped:Je(()=>{const{tmNode:g}=e,{parent:k}=g;return k&&k.rawNode.type==="group"}),showCheckmark:d,nodeProps:u,isPending:b,isSelected:Je(()=>{const{value:g}=t,{value:k}=r;if(g===null)return!1;const z=e.tmNode.rawNode[c.value];if(k){const{value:$}=i;return $.has(z)}else return g===z}),labelField:s,renderLabel:a,renderOption:l,handleMouseMove:v,handleMouseEnter:x,handleClick:h}},render(){const{clsPrefix:e,tmNode:{rawNode:t},isSelected:n,isPending:r,isGrouped:i,showCheckmark:a,nodeProps:l,renderOption:s,renderLabel:c,handleClick:d,handleMouseEnter:u,handleMouseMove:f}=this,p=Fv(n,e),b=c?[c(t,n),a&&p]:[bn(t[this.labelField],t,n),a&&p],h=l==null?void 0:l(t),x=o.h("div",Object.assign({},h,{class:[`${e}-base-select-option`,t.class,h==null?void 0:h.class,{[`${e}-base-select-option--disabled`]:t.disabled,[`${e}-base-select-option--selected`]:n,[`${e}-base-select-option--grouped`]:i,[`${e}-base-select-option--pending`]:r,[`${e}-base-select-option--show-checkmark`]:a}],style:[(h==null?void 0:h.style)||"",t.style||""],onClick:Ko([d,h==null?void 0:h.onClick]),onMouseenter:Ko([u,h==null?void 0:h.onMouseenter]),onMousemove:Ko([f,h==null?void 0:h.onMousemove])}),o.h("div",{class:`${e}-base-select-option__content`},b));return t.render?t.render({node:x,option:t,selected:n}):s?s({node:x,option:t,selected:n}):x}}),Ks=o.defineComponent({name:"NBaseSelectGroupHeader",props:{clsPrefix:{type:String,required:!0},tmNode:{type:Object,required:!0}},setup(){const{renderLabelRef:e,renderOptionRef:t,labelFieldRef:n,nodePropsRef:r}=o.inject(Qo);return{labelField:n,nodeProps:r,renderLabel:e,renderOption:t}},render(){const{clsPrefix:e,renderLabel:t,renderOption:n,nodeProps:r,tmNode:{rawNode:i}}=this,a=r==null?void 0:r(i),l=t?t(i,!1):bn(i[this.labelField],i,!1),s=o.h("div",Object.assign({},a,{class:[`${e}-base-select-group-header`,a==null?void 0:a.class]}),l);return i.render?i.render({node:s,option:i}):n?n({node:s,option:i,selected:!1}):s}}),{cubicBezierEaseIn:Xs,cubicBezierEaseOut:Ys}=Sn;function xr({transformOrigin:e="inherit",duration:t=".2s",enterScale:n=".9",originalTransform:r="",originalTransition:i=""}={}){return[I("&.fade-in-scale-up-transition-leave-active",{transformOrigin:e,transition:`opacity ${t} ${Xs}, transform ${t} ${Xs} ${i&&`,${i}`}`}),I("&.fade-in-scale-up-transition-enter-active",{transformOrigin:e,transition:`opacity ${t} ${Ys}, transform ${t} ${Ys} ${i&&`,${i}`}`}),I("&.fade-in-scale-up-transition-enter-from, &.fade-in-scale-up-transition-leave-to",{opacity:0,transform:`${r} scale(${n})`}),I("&.fade-in-scale-up-transition-leave-from, &.fade-in-scale-up-transition-enter-to",{opacity:1,transform:`${r} scale(1)`})]}const Dv=w("base-select-menu",`
|
|
184
|
+
`,[_v(),I("&:hover","background-color: var(--n-scrollbar-color-hover);")])])])])]),Ov=Object.assign(Object.assign({},Ce.props),{duration:{type:Number,default:0},scrollable:{type:Boolean,default:!0},xScrollable:Boolean,trigger:{type:String,default:"hover"},useUnifiedContainer:Boolean,triggerDisplayManually:Boolean,container:Function,content:Function,containerClass:String,containerStyle:[String,Object],contentClass:[String,Array],contentStyle:[String,Object],horizontalRailStyle:[String,Object],verticalRailStyle:[String,Object],onScroll:Function,onWheel:Function,onResize:Function,internalOnUpdateScrollLeft:Function,internalHoistYRail:Boolean}),Vi=o.defineComponent({name:"Scrollbar",props:Ov,inheritAttrs:!1,setup(e){const{mergedClsPrefixRef:t,inlineThemeDisabled:n,mergedRtlRef:r}=Ye(e),i=tn("Scrollbar",r,t),a=o.ref(null),l=o.ref(null),s=o.ref(null),c=o.ref(null),d=o.ref(null),u=o.ref(null),f=o.ref(null),p=o.ref(null),b=o.ref(null),h=o.ref(null),x=o.ref(null),v=o.ref(0),g=o.ref(0),k=o.ref(!1),z=o.ref(!1);let $=!1,T=!1,O,m,S=0,M=0,N=0,A=0;const L=vu(),U=Ce("Scrollbar","-scrollbar",Mv,Us,e,t),J=o.computed(()=>{const{value:y}=p,{value:H}=u,{value:Z}=h;return y===null||H===null||Z===null?0:Math.min(y,Z*y/H+at(U.value.self.width)*1.5)}),j=o.computed(()=>`${J.value}px`),Q=o.computed(()=>{const{value:y}=b,{value:H}=f,{value:Z}=x;return y===null||H===null||Z===null?0:Z*y/H+at(U.value.self.height)*1.5}),Y=o.computed(()=>`${Q.value}px`),ie=o.computed(()=>{const{value:y}=p,{value:H}=v,{value:Z}=u,{value:le}=h;if(y===null||Z===null||le===null)return 0;{const ce=Z-y;return ce?H/ce*(le-J.value):0}}),me=o.computed(()=>`${ie.value}px`),ae=o.computed(()=>{const{value:y}=b,{value:H}=g,{value:Z}=f,{value:le}=x;if(y===null||Z===null||le===null)return 0;{const ce=Z-y;return ce?H/ce*(le-Q.value):0}}),he=o.computed(()=>`${ae.value}px`),G=o.computed(()=>{const{value:y}=p,{value:H}=u;return y!==null&&H!==null&&H>y}),te=o.computed(()=>{const{value:y}=b,{value:H}=f;return y!==null&&H!==null&&H>y}),xe=o.computed(()=>{const{trigger:y}=e;return y==="none"||k.value}),Se=o.computed(()=>{const{trigger:y}=e;return y==="none"||z.value}),oe=o.computed(()=>{const{container:y}=e;return y?y():l.value}),Te=o.computed(()=>{const{content:y}=e;return y?y():s.value}),$e=(y,H)=>{if(!e.scrollable)return;if(typeof y=="number"){Ie(y,H??0,0,!1,"auto");return}const{left:Z,top:le,index:ce,elSize:ue,position:fe,behavior:ge,el:Ee,debounce:mt=!0}=y;(Z!==void 0||le!==void 0)&&Ie(Z??0,le??0,0,!1,ge),Ee!==void 0?Ie(0,Ee.offsetTop,Ee.offsetHeight,mt,ge):ce!==void 0&&ue!==void 0?Ie(0,ce*ue,ue,mt,ge):fe==="bottom"?Ie(0,Number.MAX_SAFE_INTEGER,0,!1,ge):fe==="top"&&Ie(0,0,0,!1,ge)},se=hf(()=>{e.container||$e({top:v.value,left:g.value})}),Ae=()=>{se.isDeactivated||B()},Be=y=>{if(se.isDeactivated)return;const{onResize:H}=e;H&&H(y),B()},We=(y,H)=>{if(!e.scrollable)return;const{value:Z}=oe;Z&&(typeof y=="object"?Z.scrollBy(y):Z.scrollBy(y,H||0))};function Ie(y,H,Z,le,ce){const{value:ue}=oe;if(ue){if(le){const{scrollTop:fe,offsetHeight:ge}=ue;if(H>fe){H+Z<=fe+ge||ue.scrollTo({left:y,top:H+Z-ge,behavior:ce});return}}ue.scrollTo({left:y,top:H,behavior:ce})}}function Le(){ne(),_(),B()}function Ke(){Re()}function Re(){X(),F()}function X(){m!==void 0&&window.clearTimeout(m),m=window.setTimeout(()=>{z.value=!1},e.duration)}function F(){O!==void 0&&window.clearTimeout(O),O=window.setTimeout(()=>{k.value=!1},e.duration)}function ne(){O!==void 0&&window.clearTimeout(O),k.value=!0}function _(){m!==void 0&&window.clearTimeout(m),z.value=!0}function D(y){const{onScroll:H}=e;H&&H(y),K()}function K(){const{value:y}=oe;y&&(v.value=y.scrollTop,g.value=y.scrollLeft*(i!=null&&i.value?-1:1))}function R(){const{value:y}=Te;y&&(u.value=y.offsetHeight,f.value=y.offsetWidth);const{value:H}=oe;H&&(p.value=H.offsetHeight,b.value=H.offsetWidth);const{value:Z}=d,{value:le}=c;Z&&(x.value=Z.offsetWidth),le&&(h.value=le.offsetHeight)}function C(){const{value:y}=oe;y&&(v.value=y.scrollTop,g.value=y.scrollLeft*(i!=null&&i.value?-1:1),p.value=y.offsetHeight,b.value=y.offsetWidth,u.value=y.scrollHeight,f.value=y.scrollWidth);const{value:H}=d,{value:Z}=c;H&&(x.value=H.offsetWidth),Z&&(h.value=Z.offsetHeight)}function B(){e.scrollable&&(e.useUnifiedContainer?C():(R(),K()))}function re(y){var H;return!(!((H=a.value)===null||H===void 0)&&H.contains(An(y)))}function we(y){y.preventDefault(),y.stopPropagation(),T=!0,ze("mousemove",window,Pe,!0),ze("mouseup",window,Ue,!0),M=g.value,N=i!=null&&i.value?window.innerWidth-y.clientX:y.clientX}function Pe(y){if(!T)return;O!==void 0&&window.clearTimeout(O),m!==void 0&&window.clearTimeout(m);const{value:H}=b,{value:Z}=f,{value:le}=Q;if(H===null||Z===null)return;const ue=(i!=null&&i.value?window.innerWidth-y.clientX-N:y.clientX-N)*(Z-H)/(H-le),fe=Z-H;let ge=M+ue;ge=Math.min(fe,ge),ge=Math.max(ge,0);const{value:Ee}=oe;if(Ee){Ee.scrollLeft=ge*(i!=null&&i.value?-1:1);const{internalOnUpdateScrollLeft:mt}=e;mt&&mt(ge)}}function Ue(y){y.preventDefault(),y.stopPropagation(),ke("mousemove",window,Pe,!0),ke("mouseup",window,Ue,!0),T=!1,B(),re(y)&&Re()}function De(y){y.preventDefault(),y.stopPropagation(),$=!0,ze("mousemove",window,Me,!0),ze("mouseup",window,Ze,!0),S=v.value,A=y.clientY}function Me(y){if(!$)return;O!==void 0&&window.clearTimeout(O),m!==void 0&&window.clearTimeout(m);const{value:H}=p,{value:Z}=u,{value:le}=J;if(H===null||Z===null)return;const ue=(y.clientY-A)*(Z-H)/(H-le),fe=Z-H;let ge=S+ue;ge=Math.min(fe,ge),ge=Math.max(ge,0);const{value:Ee}=oe;Ee&&(Ee.scrollTop=ge)}function Ze(y){y.preventDefault(),y.stopPropagation(),ke("mousemove",window,Me,!0),ke("mouseup",window,Ze,!0),$=!1,B(),re(y)&&Re()}o.watchEffect(()=>{const{value:y}=te,{value:H}=G,{value:Z}=t,{value:le}=d,{value:ce}=c;le&&(y?le.classList.remove(`${Z}-scrollbar-rail--disabled`):le.classList.add(`${Z}-scrollbar-rail--disabled`)),ce&&(H?ce.classList.remove(`${Z}-scrollbar-rail--disabled`):ce.classList.add(`${Z}-scrollbar-rail--disabled`))}),o.onMounted(()=>{e.container||B()}),o.onBeforeUnmount(()=>{O!==void 0&&window.clearTimeout(O),m!==void 0&&window.clearTimeout(m),ke("mousemove",window,Me,!0),ke("mouseup",window,Ze,!0)});const ft=o.computed(()=>{const{common:{cubicBezierEaseInOut:y},self:{color:H,colorHover:Z,height:le,width:ce,borderRadius:ue,railInsetHorizontal:fe,railInsetVertical:ge,railColor:Ee}}=U.value;return{"--n-scrollbar-bezier":y,"--n-scrollbar-color":H,"--n-scrollbar-color-hover":Z,"--n-scrollbar-border-radius":ue,"--n-scrollbar-width":ce,"--n-scrollbar-height":le,"--n-scrollbar-rail-inset-horizontal":fe,"--n-scrollbar-rail-inset-vertical":i!=null&&i.value?Fd(ge):ge,"--n-scrollbar-rail-color":Ee}}),tt=n?rt("scrollbar",void 0,ft,e):void 0;return Object.assign(Object.assign({},{scrollTo:$e,scrollBy:We,sync:B,syncUnifiedContainer:C,handleMouseEnterWrapper:Le,handleMouseLeaveWrapper:Ke}),{mergedClsPrefix:t,rtlEnabled:i,containerScrollTop:v,wrapperRef:a,containerRef:l,contentRef:s,yRailRef:c,xRailRef:d,needYBar:G,needXBar:te,yBarSizePx:j,xBarSizePx:Y,yBarTopPx:me,xBarLeftPx:he,isShowXBar:xe,isShowYBar:Se,isIos:L,handleScroll:D,handleContentResize:Ae,handleContainerResize:Be,handleYScrollMouseDown:De,handleXScrollMouseDown:we,cssVars:n?void 0:ft,themeClass:tt==null?void 0:tt.themeClass,onRender:tt==null?void 0:tt.onRender})},render(){var e;const{$slots:t,mergedClsPrefix:n,triggerDisplayManually:r,rtlEnabled:i,internalHoistYRail:a}=this;if(!this.scrollable)return(e=t.default)===null||e===void 0?void 0:e.call(t);const l=this.trigger==="none",s=(u,f)=>o.h("div",{ref:"yRailRef",class:[`${n}-scrollbar-rail`,`${n}-scrollbar-rail--vertical`,u],"data-scrollbar-rail":!0,style:[f||"",this.verticalRailStyle],"aria-hidden":!0},o.h(l?Xo:o.Transition,l?null:{name:"fade-in-transition"},{default:()=>this.needYBar&&this.isShowYBar&&!this.isIos?o.h("div",{class:`${n}-scrollbar-rail__scrollbar`,style:{height:this.yBarSizePx,top:this.yBarTopPx},onMousedown:this.handleYScrollMouseDown}):null})),c=()=>{var u,f;return(u=this.onRender)===null||u===void 0||u.call(this),o.h("div",o.mergeProps(this.$attrs,{role:"none",ref:"wrapperRef",class:[`${n}-scrollbar`,this.themeClass,i&&`${n}-scrollbar--rtl`],style:this.cssVars,onMouseenter:r?void 0:this.handleMouseEnterWrapper,onMouseleave:r?void 0:this.handleMouseLeaveWrapper}),[this.container?(f=t.default)===null||f===void 0?void 0:f.call(t):o.h("div",{role:"none",ref:"containerRef",class:[`${n}-scrollbar-container`,this.containerClass],style:this.containerStyle,onScroll:this.handleScroll,onWheel:this.onWheel},o.h(Zt,{onResize:this.handleContentResize},{default:()=>o.h("div",{ref:"contentRef",role:"none",style:[{width:this.xScrollable?"fit-content":null},this.contentStyle],class:[`${n}-scrollbar-content`,this.contentClass]},t)})),a?null:s(void 0,void 0),this.xScrollable&&o.h("div",{ref:"xRailRef",class:[`${n}-scrollbar-rail`,`${n}-scrollbar-rail--horizontal`],style:this.horizontalRailStyle,"data-scrollbar-rail":!0,"aria-hidden":!0},o.h(l?Xo:o.Transition,l?null:{name:"fade-in-transition"},{default:()=>this.needXBar&&this.isShowXBar&&!this.isIos?o.h("div",{class:`${n}-scrollbar-rail__scrollbar`,style:{width:this.xBarSizePx,right:i?this.xBarLeftPx:void 0,left:i?void 0:this.xBarLeftPx},onMousedown:this.handleXScrollMouseDown}):null}))])},d=this.container?c():o.h(Zt,{onResize:this.handleContainerResize},{default:c});return a?o.h(o.Fragment,null,d,s(this.themeClass,this.cssVars)):d}}),Av=Vi,Iv={height:"calc(var(--n-option-height) * 7.6)",paddingSmall:"4px 0",paddingMedium:"4px 0",paddingLarge:"4px 0",paddingHuge:"4px 0",optionPaddingSmall:"0 12px",optionPaddingMedium:"0 12px",optionPaddingLarge:"0 12px",optionPaddingHuge:"0 12px",loadingSize:"18px"};function Fv(e){const{borderRadius:t,popoverColor:n,textColor3:r,dividerColor:i,textColor2:a,primaryColorPressed:l,textColorDisabled:s,primaryColor:c,opacityDisabled:d,hoverColor:u,fontSizeSmall:f,fontSizeMedium:p,fontSizeLarge:b,fontSizeHuge:h,heightSmall:x,heightMedium:v,heightLarge:g,heightHuge:k}=e;return Object.assign(Object.assign({},Iv),{optionFontSizeSmall:f,optionFontSizeMedium:p,optionFontSizeLarge:b,optionFontSizeHuge:h,optionHeightSmall:x,optionHeightMedium:v,optionHeightLarge:g,optionHeightHuge:k,borderRadius:t,color:n,groupHeaderTextColor:r,actionDividerColor:i,optionTextColor:a,optionTextColorPressed:l,optionTextColorDisabled:s,optionTextColorActive:c,optionOpacityDisabled:d,optionCheckColor:c,optionColorPending:u,optionColorActive:"rgba(0, 0, 0, 0)",optionColorActivePending:u,actionTextColor:a,loadingColor:c})}const qs={name:"InternalSelectMenu",common:Qe,peers:{Scrollbar:Us,Empty:Ws},self:Fv};function Dv(e,t){return o.h(o.Transition,{name:"fade-in-scale-up-transition"},{default:()=>e?o.h(yt,{clsPrefix:t,class:`${t}-base-select-option__check`},{default:()=>o.h(Og)}):null})}const Ks=o.defineComponent({name:"NBaseSelectOption",props:{clsPrefix:{type:String,required:!0},tmNode:{type:Object,required:!0}},setup(e){const{valueRef:t,pendingTmNodeRef:n,multipleRef:r,valueSetRef:i,renderLabelRef:a,renderOptionRef:l,labelFieldRef:s,valueFieldRef:c,showCheckmarkRef:d,nodePropsRef:u,handleOptionClick:f,handleOptionMouseEnter:p}=o.inject(Qo),b=Je(()=>{const{value:g}=n;return g?e.tmNode.key===g.key:!1});function h(g){const{tmNode:k}=e;k.disabled||f(g,k)}function x(g){const{tmNode:k}=e;k.disabled||p(g,k)}function v(g){const{tmNode:k}=e,{value:z}=b;k.disabled||z||p(g,k)}return{multiple:r,isGrouped:Je(()=>{const{tmNode:g}=e,{parent:k}=g;return k&&k.rawNode.type==="group"}),showCheckmark:d,nodeProps:u,isPending:b,isSelected:Je(()=>{const{value:g}=t,{value:k}=r;if(g===null)return!1;const z=e.tmNode.rawNode[c.value];if(k){const{value:$}=i;return $.has(z)}else return g===z}),labelField:s,renderLabel:a,renderOption:l,handleMouseMove:v,handleMouseEnter:x,handleClick:h}},render(){const{clsPrefix:e,tmNode:{rawNode:t},isSelected:n,isPending:r,isGrouped:i,showCheckmark:a,nodeProps:l,renderOption:s,renderLabel:c,handleClick:d,handleMouseEnter:u,handleMouseMove:f}=this,p=Dv(n,e),b=c?[c(t,n),a&&p]:[bn(t[this.labelField],t,n),a&&p],h=l==null?void 0:l(t),x=o.h("div",Object.assign({},h,{class:[`${e}-base-select-option`,t.class,h==null?void 0:h.class,{[`${e}-base-select-option--disabled`]:t.disabled,[`${e}-base-select-option--selected`]:n,[`${e}-base-select-option--grouped`]:i,[`${e}-base-select-option--pending`]:r,[`${e}-base-select-option--show-checkmark`]:a}],style:[(h==null?void 0:h.style)||"",t.style||""],onClick:Ko([d,h==null?void 0:h.onClick]),onMouseenter:Ko([u,h==null?void 0:h.onMouseenter]),onMousemove:Ko([f,h==null?void 0:h.onMousemove])}),o.h("div",{class:`${e}-base-select-option__content`},b));return t.render?t.render({node:x,option:t,selected:n}):s?s({node:x,option:t,selected:n}):x}}),Xs=o.defineComponent({name:"NBaseSelectGroupHeader",props:{clsPrefix:{type:String,required:!0},tmNode:{type:Object,required:!0}},setup(){const{renderLabelRef:e,renderOptionRef:t,labelFieldRef:n,nodePropsRef:r}=o.inject(Qo);return{labelField:n,nodeProps:r,renderLabel:e,renderOption:t}},render(){const{clsPrefix:e,renderLabel:t,renderOption:n,nodeProps:r,tmNode:{rawNode:i}}=this,a=r==null?void 0:r(i),l=t?t(i,!1):bn(i[this.labelField],i,!1),s=o.h("div",Object.assign({},a,{class:[`${e}-base-select-group-header`,a==null?void 0:a.class]}),l);return i.render?i.render({node:s,option:i}):n?n({node:s,option:i,selected:!1}):s}}),{cubicBezierEaseIn:Ys,cubicBezierEaseOut:Zs}=Sn;function xr({transformOrigin:e="inherit",duration:t=".2s",enterScale:n=".9",originalTransform:r="",originalTransition:i=""}={}){return[I("&.fade-in-scale-up-transition-leave-active",{transformOrigin:e,transition:`opacity ${t} ${Ys}, transform ${t} ${Ys} ${i&&`,${i}`}`}),I("&.fade-in-scale-up-transition-enter-active",{transformOrigin:e,transition:`opacity ${t} ${Zs}, transform ${t} ${Zs} ${i&&`,${i}`}`}),I("&.fade-in-scale-up-transition-enter-from, &.fade-in-scale-up-transition-leave-to",{opacity:0,transform:`${r} scale(${n})`}),I("&.fade-in-scale-up-transition-leave-from, &.fade-in-scale-up-transition-enter-to",{opacity:1,transform:`${r} scale(1)`})]}const Nv=w("base-select-menu",`
|
|
185
185
|
line-height: 1.5;
|
|
186
186
|
outline: none;
|
|
187
187
|
z-index: 0;
|
|
@@ -288,14 +288,14 @@ ${t}
|
|
|
288
288
|
top: calc(50% - 7px);
|
|
289
289
|
color: var(--n-option-check-color);
|
|
290
290
|
transition: color .3s var(--n-bezier);
|
|
291
|
-
`,[xr({enterScale:"0.5"})])])]),
|
|
291
|
+
`,[xr({enterScale:"0.5"})])])]),Lv=o.defineComponent({name:"InternalSelectMenu",props:Object.assign(Object.assign({},Ce.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}=Ye(e),r=tn("InternalSelectMenu",n,t),i=Ce("InternalSelectMenu","-internal-select-menu",Nv,qs,e,o.toRef(e,"clsPrefix")),a=o.ref(null),l=o.ref(null),s=o.ref(null),c=o.computed(()=>e.treeMate.getFlattenedNodes()),d=o.computed(()=>cv(c.value)),u=o.ref(null);function f(){const{treeMate:G}=e;let te=null;const{value:xe}=e;xe===null?te=G.getFirstAvailableNode():(e.multiple?te=G.getNode((xe||[])[(xe||[]).length-1]):te=G.getNode(xe),(!te||te.disabled)&&(te=G.getFirstAvailableNode())),J(te||null)}function p(){const{value:G}=u;G&&!e.treeMate.getNode(G.key)&&(u.value=null)}let b;o.watch(()=>e.show,G=>{G?b=o.watch(()=>e.treeMate,()=>{e.resetMenuOnOptionsChange?(e.autoPending?f():p(),o.nextTick(j)):p()},{immediate:!0}):b==null||b()},{immediate:!0}),o.onBeforeUnmount(()=>{b==null||b()});const h=o.computed(()=>at(i.value.self[ee("optionHeight",e.size)])),x=o.computed(()=>ht(i.value.self[ee("padding",e.size)])),v=o.computed(()=>e.multiple&&Array.isArray(e.value)?new Set(e.value):new Set),g=o.computed(()=>{const G=c.value;return G&&G.length===0});function k(G){const{onToggle:te}=e;te&&te(G)}function z(G){const{onScroll:te}=e;te&&te(G)}function $(G){var te;(te=s.value)===null||te===void 0||te.sync(),z(G)}function T(){var G;(G=s.value)===null||G===void 0||G.sync()}function O(){const{value:G}=u;return G||null}function m(G,te){te.disabled||J(te,!1)}function S(G,te){te.disabled||k(te)}function M(G){var te;tr(G,"action")||(te=e.onKeyup)===null||te===void 0||te.call(e,G)}function N(G){var te;tr(G,"action")||(te=e.onKeydown)===null||te===void 0||te.call(e,G)}function A(G){var te;(te=e.onMousedown)===null||te===void 0||te.call(e,G),!e.focusable&&G.preventDefault()}function L(){const{value:G}=u;G&&J(G.getNext({loop:!0}),!0)}function U(){const{value:G}=u;G&&J(G.getPrev({loop:!0}),!0)}function J(G,te=!1){u.value=G,te&&j()}function j(){var G,te;const xe=u.value;if(!xe)return;const Se=d.value(xe.key);Se!==null&&(e.virtualScroll?(G=l.value)===null||G===void 0||G.scrollTo({index:Se}):(te=s.value)===null||te===void 0||te.scrollTo({index:Se,elSize:h.value}))}function Q(G){var te,xe;!((te=a.value)===null||te===void 0)&&te.contains(G.target)&&((xe=e.onFocus)===null||xe===void 0||xe.call(e,G))}function Y(G){var te,xe;!((te=a.value)===null||te===void 0)&&te.contains(G.relatedTarget)||(xe=e.onBlur)===null||xe===void 0||xe.call(e,G)}o.provide(Qo,{handleOptionMouseEnter:m,handleOptionClick:S,valueSetRef:v,pendingTmNodeRef:u,nodePropsRef:o.toRef(e,"nodeProps"),showCheckmarkRef:o.toRef(e,"showCheckmark"),multipleRef:o.toRef(e,"multiple"),valueRef:o.toRef(e,"value"),renderLabelRef:o.toRef(e,"renderLabel"),renderOptionRef:o.toRef(e,"renderOption"),labelFieldRef:o.toRef(e,"labelField"),valueFieldRef:o.toRef(e,"valueField")}),o.provide(Xa,a),o.onMounted(()=>{const{value:G}=s;G&&G.sync()});const ie=o.computed(()=>{const{size:G}=e,{common:{cubicBezierEaseInOut:te},self:{height:xe,borderRadius:Se,color:oe,groupHeaderTextColor:Te,actionDividerColor:$e,optionTextColorPressed:se,optionTextColor:Ae,optionTextColorDisabled:Be,optionTextColorActive:We,optionOpacityDisabled:Ie,optionCheckColor:Le,actionTextColor:Ke,optionColorPending:Re,optionColorActive:X,loadingColor:F,loadingSize:ne,optionColorActivePending:_,[ee("optionFontSize",G)]:D,[ee("optionHeight",G)]:K,[ee("optionPadding",G)]:R}}=i.value;return{"--n-height":xe,"--n-action-divider-color":$e,"--n-action-text-color":Ke,"--n-bezier":te,"--n-border-radius":Se,"--n-color":oe,"--n-option-font-size":D,"--n-group-header-text-color":Te,"--n-option-check-color":Le,"--n-option-color-pending":Re,"--n-option-color-active":X,"--n-option-color-active-pending":_,"--n-option-height":K,"--n-option-opacity-disabled":Ie,"--n-option-text-color":Ae,"--n-option-text-color-active":We,"--n-option-text-color-disabled":Be,"--n-option-text-color-pressed":se,"--n-option-padding":R,"--n-option-padding-left":ht(R,"left"),"--n-option-padding-right":ht(R,"right"),"--n-loading-color":F,"--n-loading-size":ne}}),{inlineThemeDisabled:me}=e,ae=me?rt("internal-select-menu",o.computed(()=>e.size[0]),ie,e):void 0,he={selfRef:a,next:L,prev:U,getPendingTmNode:O};return _l(a,e.onResize),Object.assign({mergedTheme:i,mergedClsPrefix:t,rtlEnabled:r,virtualListRef:l,scrollbarRef:s,itemSize:h,padding:x,flattenedNodes:c,empty:g,virtualListContainer(){const{value:G}=l;return G==null?void 0:G.listElRef},virtualListContent(){const{value:G}=l;return G==null?void 0:G.itemsElRef},doScroll:z,handleFocusin:Q,handleFocusout:Y,handleKeyUp:M,handleKeyDown:N,handleMouseDown:A,handleVirtualListResize:T,handleVirtualListScroll:$,cssVars:me?void 0:ie,themeClass:ae==null?void 0:ae.themeClass,onRender:ae==null?void 0:ae.onRender},he)},render(){const{$slots:e,virtualScroll:t,clsPrefix:n,mergedTheme:r,themeClass:i,onRender:a}=this;return a==null||a(),o.h("div",{ref:"selfRef",tabindex:this.focusable?0:-1,class:[`${n}-base-select-menu`,this.rtlEnabled&&`${n}-base-select-menu--rtl`,i,this.multiple&&`${n}-base-select-menu--multiple`],style:this.cssVars,onFocusin:this.handleFocusin,onFocusout:this.handleFocusout,onKeyup:this.handleKeyUp,onKeydown:this.handleKeyDown,onMousedown:this.handleMouseDown,onMouseenter:this.onMouseenter,onMouseleave:this.onMouseleave},Fe(e.header,l=>l&&o.h("div",{class:`${n}-base-select-menu__header`,"data-header":!0,key:"header"},l)),this.loading?o.h("div",{class:`${n}-base-select-menu__loading`},o.h(ho,{clsPrefix:n,strokeWidth:20})):this.empty?o.h("div",{class:`${n}-base-select-menu__empty`,"data-empty":!0},Ct(e.empty,()=>[o.h(Ev,{theme:r.peers.Empty,themeOverrides:r.peerOverrides.Empty})])):o.h(Vi,{ref:"scrollbarRef",theme:r.peers.Scrollbar,themeOverrides:r.peerOverrides.Scrollbar,scrollable:this.scrollable,container:t?this.virtualListContainer:void 0,content:t?this.virtualListContent:void 0,onScroll:t?void 0:this.doScroll},{default:()=>t?o.h(lf,{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:l})=>l.isGroup?o.h(Xs,{key:l.key,clsPrefix:n,tmNode:l}):l.ignored?null:o.h(Ks,{clsPrefix:n,key:l.key,tmNode:l})}):o.h("div",{class:`${n}-base-select-menu-option-wrapper`,style:{paddingTop:this.padding.top,paddingBottom:this.padding.bottom}},this.flattenedNodes.map(l=>l.isGroup?o.h(Xs,{key:l.key,clsPrefix:n,tmNode:l}):o.h(Ks,{clsPrefix:n,key:l.key,tmNode:l})))}),Fe(e.action,l=>l&&[o.h("div",{class:`${n}-base-select-menu__action`,"data-action":!0,key:"action"},l),o.h(qg,{onFocus:this.onTabOut,key:"focus-detector"})]))}}),Hv=w("base-wave",`
|
|
292
292
|
position: absolute;
|
|
293
293
|
left: 0;
|
|
294
294
|
right: 0;
|
|
295
295
|
top: 0;
|
|
296
296
|
bottom: 0;
|
|
297
297
|
border-radius: inherit;
|
|
298
|
-
`),
|
|
298
|
+
`),Vv=o.defineComponent({name:"BaseWave",props:{clsPrefix:{type:String,required:!0}},setup(e){Tn("-base-wave",Hv,o.toRef(e,"clsPrefix"));const t=o.ref(null),n=o.ref(!1);let r=null;return o.onBeforeUnmount(()=>{r!==null&&window.clearTimeout(r)}),{active:n,selfRef:t,play(){r!==null&&(window.clearTimeout(r),n.value=!1,r=null),o.nextTick(()=>{var i;(i=t.value)===null||i===void 0||i.offsetHeight,n.value=!0,r=window.setTimeout(()=>{n.value=!1,r=null},1e3)})}}},render(){const{clsPrefix:e}=this;return o.h("div",{ref:"selfRef","aria-hidden":!0,class:[`${e}-base-wave`,this.active&&`${e}-base-wave--active`]})}}),jv={space:"6px",spaceArrow:"10px",arrowOffset:"10px",arrowOffsetVertical:"10px",arrowHeight:"6px",padding:"8px 14px"};function Wv(e){const{boxShadow2:t,popoverColor:n,textColor2:r,borderRadius:i,fontSize:a,dividerColor:l}=e;return Object.assign(Object.assign({},jv),{fontSize:a,borderRadius:i,color:n,dividerColor:l,textColor:r,boxShadow:t})}const ji={name:"Popover",common:Qe,self:Wv},Wi={top:"bottom",bottom:"top",left:"right",right:"left"},et="var(--n-arrow-height) * 1.414",Uv=I([w("popover",`
|
|
299
299
|
transition:
|
|
300
300
|
box-shadow .3s var(--n-bezier),
|
|
301
301
|
background-color .3s var(--n-bezier),
|
|
@@ -397,13 +397,13 @@ ${t}
|
|
|
397
397
|
`),wt("right-end",`
|
|
398
398
|
right: calc(${et} / -2);
|
|
399
399
|
bottom: calc(${Lt("right-end")} + var(--v-offset-top));
|
|
400
|
-
`),...
|
|
400
|
+
`),...qm({top:["right-start","left-start"],right:["top-end","bottom-end"],bottom:["right-end","left-end"],left:["top-start","bottom-start"]},(e,t)=>{const n=["right","left"].includes(t),r=n?"width":"height";return e.map(i=>{const a=i.split("-")[1]==="end",s=`calc((${`var(--v-target-${r}, 0px)`} - ${et}) / 2)`,c=Lt(i);return I(`[v-placement="${i}"] >`,[w("popover-shared",[W("center-arrow",[w("popover-arrow",`${t}: calc(max(${s}, ${c}) ${a?"+":"-"} var(--v-offset-${n?"left":"top"}));`)])])])})})]);function Lt(e){return["top","bottom"].includes(e.split("-")[0])?"var(--n-arrow-offset)":"var(--n-arrow-offset-vertical)"}function wt(e,t){const n=e.split("-")[0],r=["top","bottom"].includes(n)?"height: var(--n-space-arrow);":"width: var(--n-space-arrow);";return I(`[v-placement="${e}"] >`,[w("popover-shared",`
|
|
401
401
|
margin-${Wi[n]}: var(--n-space);
|
|
402
402
|
`,[W("show-arrow",`
|
|
403
403
|
margin-${Wi[n]}: var(--n-space-arrow);
|
|
404
404
|
`),W("overlap",`
|
|
405
405
|
margin: 0;
|
|
406
|
-
`),
|
|
406
|
+
`),au("popover-arrow-wrapper",`
|
|
407
407
|
right: 0;
|
|
408
408
|
left: 0;
|
|
409
409
|
top: 0;
|
|
@@ -411,7 +411,7 @@ ${t}
|
|
|
411
411
|
${n}: 100%;
|
|
412
412
|
${Wi[n]}: auto;
|
|
413
413
|
${r}
|
|
414
|
-
`,[w("popover-arrow",t)])])])}const Zs=Object.assign(Object.assign({},Ce.props),{to:lt.propTo,show:Boolean,trigger:String,showArrow:Boolean,delay:Number,duration:Number,raw:Boolean,arrowPointToCenter:Boolean,arrowClass:String,arrowStyle:[String,Object],arrowWrapperClass:String,arrowWrapperStyle:[String,Object],displayDirective:String,x:Number,y:Number,flip:Boolean,overlap:Boolean,placement:String,width:[Number,String],keepAliveOnHover:Boolean,scrollable:Boolean,contentClass:String,contentStyle:[Object,String],headerClass:String,headerStyle:[Object,String],footerClass:String,footerStyle:[Object,String],internalDeactivateImmediately:Boolean,animated:Boolean,onClickoutside:Function,internalTrapFocus:Boolean,internalOnAfterLeave:Function,minWidth:Number,maxWidth:Number});function Uv({arrowClass:e,arrowStyle:t,arrowWrapperClass:n,arrowWrapperStyle:r,clsPrefix:i}){return o.h("div",{key:"__popover-arrow__",style:r,class:[`${i}-popover-arrow-wrapper`,n]},o.h("div",{class:[`${i}-popover-arrow`,e],style:t}))}const Gv=o.defineComponent({name:"PopoverBody",inheritAttrs:!1,props:Zs,setup(e,{slots:t,attrs:n}){const{namespaceRef:r,mergedClsPrefixRef:i,inlineThemeDisabled:a}=Ye(e),l=Ce("Popover","-popover",Wv,ji,e,i),s=o.ref(null),c=o.inject("NPopover"),d=o.ref(null),u=o.ref(e.show),f=o.ref(!1);o.watchEffect(()=>{const{show:m}=e;m&&!au()&&!e.internalDeactivateImmediately&&(f.value=!0)});const p=o.computed(()=>{const{trigger:m,onClickoutside:S}=e,M=[],{positionManuallyRef:{value:N}}=c;return N||(m==="click"&&!S&&M.push([ar,$,void 0,{capture:!0}]),m==="hover"&&M.push([nl,z])),S&&M.push([ar,$,void 0,{capture:!0}]),(e.displayDirective==="show"||e.animated&&f.value)&&M.push([o.vShow,e.show]),M}),b=o.computed(()=>{const{common:{cubicBezierEaseInOut:m,cubicBezierEaseIn:S,cubicBezierEaseOut:M},self:{space:N,spaceArrow:A,padding:L,fontSize:U,textColor:J,dividerColor:j,color:Q,boxShadow:Y,borderRadius:ie,arrowHeight:me,arrowOffset:ae,arrowOffsetVertical:he}}=l.value;return{"--n-box-shadow":Y,"--n-bezier":m,"--n-bezier-ease-in":S,"--n-bezier-ease-out":M,"--n-font-size":U,"--n-text-color":J,"--n-color":Q,"--n-divider-color":j,"--n-border-radius":ie,"--n-arrow-height":me,"--n-arrow-offset":ae,"--n-arrow-offset-vertical":he,"--n-padding":L,"--n-space":N,"--n-space-arrow":A}}),h=o.computed(()=>{const m=e.width==="trigger"?void 0:dt(e.width),S=[];m&&S.push({width:m});const{maxWidth:M,minWidth:N}=e;return M&&S.push({maxWidth:dt(M)}),N&&S.push({maxWidth:dt(N)}),a||S.push(b.value),S}),x=a?rt("popover",void 0,b,e):void 0;c.setBodyInstance({syncPosition:v}),o.onBeforeUnmount(()=>{c.setBodyInstance(null)}),o.watch(o.toRef(e,"show"),m=>{e.animated||(m?u.value=!0:u.value=!1)});function v(){var m;(m=s.value)===null||m===void 0||m.syncPosition()}function g(m){e.trigger==="hover"&&e.keepAliveOnHover&&e.show&&c.handleMouseEnter(m)}function k(m){e.trigger==="hover"&&e.keepAliveOnHover&&c.handleMouseLeave(m)}function z(m){e.trigger==="hover"&&!T().contains(An(m))&&c.handleMouseMoveOutside(m)}function $(m){(e.trigger==="click"&&!T().contains(An(m))||e.onClickoutside)&&c.handleClickOutside(m)}function T(){return c.getTriggerElement()}o.provide(Za,d),o.provide(Ya,null),o.provide(Xa,null);function O(){if(x==null||x.onRender(),!(e.displayDirective==="show"||e.show||e.animated&&f.value))return null;let S;const M=c.internalRenderBodyRef.value,{value:N}=i;if(M)S=M([`${N}-popover-shared`,x==null?void 0:x.themeClass.value,e.overlap&&`${N}-popover-shared--overlap`,e.showArrow&&`${N}-popover-shared--show-arrow`,e.arrowPointToCenter&&`${N}-popover-shared--center-arrow`],d,h.value,g,k);else{const{value:A}=c.extraClassRef,{internalTrapFocus:L}=e,U=!Dn(t.header)||!Dn(t.footer),J=()=>{var j,Q;const Y=U?o.h(o.Fragment,null,Fe(t.header,ae=>ae?o.h("div",{class:[`${N}-popover__header`,e.headerClass],style:e.headerStyle},ae):null),Fe(t.default,ae=>ae?o.h("div",{class:[`${N}-popover__content`,e.contentClass],style:e.contentStyle},t):null),Fe(t.footer,ae=>ae?o.h("div",{class:[`${N}-popover__footer`,e.footerClass],style:e.footerStyle},ae):null)):e.scrollable?(j=t.default)===null||j===void 0?void 0:j.call(t):o.h("div",{class:[`${N}-popover__content`,e.contentClass],style:e.contentStyle},t),ie=e.scrollable?o.h(Ov,{contentClass:U?void 0:`${N}-popover__content ${(Q=e.contentClass)!==null&&Q!==void 0?Q:""}`,contentStyle:U?void 0:e.contentStyle},{default:()=>Y}):Y,me=e.showArrow?Uv({arrowClass:e.arrowClass,arrowStyle:e.arrowStyle,arrowWrapperClass:e.arrowWrapperClass,arrowWrapperStyle:e.arrowWrapperStyle,clsPrefix:N}):null;return[ie,me]};S=o.h("div",o.mergeProps({class:[`${N}-popover`,`${N}-popover-shared`,x==null?void 0:x.themeClass.value,A.map(j=>`${N}-${j}`),{[`${N}-popover--scrollable`]:e.scrollable,[`${N}-popover--show-header-or-footer`]:U,[`${N}-popover--raw`]:e.raw,[`${N}-popover-shared--overlap`]:e.overlap,[`${N}-popover-shared--show-arrow`]:e.showArrow,[`${N}-popover-shared--center-arrow`]:e.arrowPointToCenter}],ref:d,style:h.value,onKeydown:c.handleKeydown,onMouseenter:g,onMouseleave:k},n),L?o.h(uf,{active:e.show,autoFocus:!0},{default:J}):J())}return o.withDirectives(S,p.value)}return{displayed:f,namespace:r,isMounted:c.isMountedRef,zIndex:c.zIndexRef,followerRef:s,adjustedTo:lt(e),followerEnabled:u,renderContentNode:O}},render(){return o.h(qr,{ref:"followerRef",zIndex:this.zIndex,show:this.show,enabled:this.followerEnabled,to:this.adjustedTo,x:this.x,y:this.y,flip:this.flip,placement:this.placement,containerClass:this.namespace,overlap:this.overlap,width:this.width==="trigger"?"target":void 0,teleportDisabled:this.adjustedTo===lt.tdkey},{default:()=>this.animated?o.h(o.Transition,{name:"popover-transition",appear:this.isMounted,onEnter:()=>{this.followerEnabled=!0},onAfterLeave:()=>{var e;(e=this.internalOnAfterLeave)===null||e===void 0||e.call(this),this.followerEnabled=!1,this.displayed=!1}},{default:this.renderContentNode}):this.renderContentNode()})}}),qv=Object.keys(Zs),Kv={focus:["onFocus","onBlur"],click:["onClick"],hover:["onMouseenter","onMouseleave"],manual:[],nested:["onFocus","onBlur","onMouseenter","onMouseleave","onClick"]};function Xv(e,t,n){Kv[t].forEach(r=>{e.props?e.props=Object.assign({},e.props):e.props={};const i=e.props[r],a=n[r];i?e.props[r]=(...l)=>{i(...l),a(...l)}:e.props[r]=a})}const Js={show:{type:Boolean,default:void 0},defaultShow:Boolean,showArrow:{type:Boolean,default:!0},trigger:{type:String,default:"hover"},delay:{type:Number,default:100},duration:{type:Number,default:100},raw:Boolean,placement:{type:String,default:"top"},x:Number,y:Number,arrowPointToCenter:Boolean,disabled:Boolean,getDisabled:Function,displayDirective:{type:String,default:"if"},arrowClass:String,arrowStyle:[String,Object],arrowWrapperClass:String,arrowWrapperStyle:[String,Object],flip:{type:Boolean,default:!0},animated:{type:Boolean,default:!0},width:{type:[Number,String],default:void 0},overlap:Boolean,keepAliveOnHover:{type:Boolean,default:!0},zIndex:Number,to:lt.propTo,scrollable:Boolean,contentClass:String,contentStyle:[Object,String],headerClass:String,headerStyle:[Object,String],footerClass:String,footerStyle:[Object,String],onClickoutside:Function,"onUpdate:show":[Function,Array],onUpdateShow:[Function,Array],internalDeactivateImmediately:Boolean,internalSyncTargetWithParent:Boolean,internalInheritedEventHandlers:{type:Array,default:()=>[]},internalTrapFocus:Boolean,internalExtraClass:{type:Array,default:()=>[]},onShow:[Function,Array],onHide:[Function,Array],arrow:{type:Boolean,default:void 0},minWidth:Number,maxWidth:Number},Yv=Object.assign(Object.assign(Object.assign({},Ce.props),Js),{internalOnAfterLeave:Function,internalRenderBody:Function}),Qs=o.defineComponent({name:"Popover",inheritAttrs:!1,props:Yv,__popover__:!0,setup(e){process.env.NODE_ENV!=="production"&&o.watchEffect(()=>{e.maxWidth!==void 0&&ot("popover","`max-width` is deprecated, please use `style` instead."),e.minWidth!==void 0&&ot("popover","`min-width` is deprecated, please use `style` instead."),e.arrow!==void 0&&ot("popover","`arrow` is deprecated, please use `showArrow` instead."),e.onHide!==void 0&&ot("popover","`on-hide` is deprecated, please use `on-update:show` instead."),e.onShow!==void 0&&ot("popover","`on-show` is deprecated, please use `on-update:show` instead.")});const t=Ln(),n=o.ref(null),r=o.computed(()=>e.show),i=o.ref(e.defaultShow),a=St(r,i),l=Je(()=>e.disabled?!1:a.value),s=()=>{if(e.disabled)return!0;const{getDisabled:j}=e;return!!(j!=null&&j())},c=()=>s()?!1:a.value,d=Vr(e,["arrow","showArrow"]),u=o.computed(()=>e.overlap?!1:d.value);let f=null;const p=o.ref(null),b=o.ref(null),h=Je(()=>e.x!==void 0&&e.y!==void 0);function x(j){const{"onUpdate:show":Q,onUpdateShow:Y,onShow:ie,onHide:me}=e;i.value=j,Q&&de(Q,j),Y&&de(Y,j),j&&ie&&de(ie,!0),j&&me&&de(me,!1)}function v(){f&&f.syncPosition()}function g(){const{value:j}=p;j&&(window.clearTimeout(j),p.value=null)}function k(){const{value:j}=b;j&&(window.clearTimeout(j),b.value=null)}function z(){const j=s();if(e.trigger==="focus"&&!j){if(c())return;x(!0)}}function $(){const j=s();if(e.trigger==="focus"&&!j){if(!c())return;x(!1)}}function T(){const j=s();if(e.trigger==="hover"&&!j){if(k(),p.value!==null||c())return;const Q=()=>{x(!0),p.value=null},{delay:Y}=e;Y===0?Q():p.value=window.setTimeout(Q,Y)}}function O(){const j=s();if(e.trigger==="hover"&&!j){if(g(),b.value!==null||!c())return;const Q=()=>{x(!1),b.value=null},{duration:Y}=e;Y===0?Q():b.value=window.setTimeout(Q,Y)}}function m(){O()}function S(j){var Q;c()&&(e.trigger==="click"&&(g(),k(),x(!1)),(Q=e.onClickoutside)===null||Q===void 0||Q.call(e,j))}function M(){if(e.trigger==="click"&&!s()){g(),k();const j=!c();x(j)}}function N(j){e.internalTrapFocus&&j.key==="Escape"&&(g(),k(),x(!1))}function A(j){i.value=j}function L(){var j;return(j=n.value)===null||j===void 0?void 0:j.targetRef}function U(j){f=j}return o.provide("NPopover",{getTriggerElement:L,handleKeydown:N,handleMouseEnter:T,handleMouseLeave:O,handleClickOutside:S,handleMouseMoveOutside:m,setBodyInstance:U,positionManuallyRef:h,isMountedRef:t,zIndexRef:o.toRef(e,"zIndex"),extraClassRef:o.toRef(e,"internalExtraClass"),internalRenderBodyRef:o.toRef(e,"internalRenderBody")}),o.watchEffect(()=>{a.value&&s()&&x(!1)}),{binderInstRef:n,positionManually:h,mergedShowConsideringDisabledProp:l,uncontrolledShow:i,mergedShowArrow:u,getMergedShow:c,setShow:A,handleClick:M,handleMouseEnter:T,handleMouseLeave:O,handleFocus:z,handleBlur:$,syncPosition:v}},render(){var e;const{positionManually:t,$slots:n}=this;let r,i=!1;if(!t&&(n.activator?r=Aa(n,"activator"):r=Aa(n,"trigger"),r)){r=o.cloneVNode(r),r=r.type===o.Text?o.h("span",[r]):r;const a={onClick:this.handleClick,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onFocus:this.handleFocus,onBlur:this.handleBlur};if(!((e=r.type)===null||e===void 0)&&e.__popover__)i=!0,r.props||(r.props={internalSyncTargetWithParent:!0,internalInheritedEventHandlers:[]}),r.props.internalSyncTargetWithParent=!0,r.props.internalInheritedEventHandlers?r.props.internalInheritedEventHandlers=[a,...r.props.internalInheritedEventHandlers]:r.props.internalInheritedEventHandlers=[a];else{const{internalInheritedEventHandlers:l}=this,s=[a,...l],c={onBlur:d=>{s.forEach(u=>{u.onBlur(d)})},onFocus:d=>{s.forEach(u=>{u.onFocus(d)})},onClick:d=>{s.forEach(u=>{u.onClick(d)})},onMouseenter:d=>{s.forEach(u=>{u.onMouseenter(d)})},onMouseleave:d=>{s.forEach(u=>{u.onMouseleave(d)})}};Xv(r,l?"nested":t?"manual":this.trigger,c)}}return o.h(jr,{ref:"binderInstRef",syncTarget:!i,syncTargetWithParent:this.internalSyncTargetWithParent},{default:()=>{this.mergedShowConsideringDisabledProp;const a=this.getMergedShow();return[this.internalTrapFocus&&a?o.withDirectives(o.h("div",{style:{position:"fixed",inset:0}}),[[rl,{enabled:a,zIndex:this.zIndex}]]):null,t?null:o.h(Wr,null,{default:()=>r}),o.h(Gv,_d(this.$props,qv,Object.assign(Object.assign({},this.$attrs),{showArrow:this.mergedShowArrow,show:a})),{default:()=>{var l,s;return(s=(l=this.$slots).default)===null||s===void 0?void 0:s.call(l)},header:()=>{var l,s;return(s=(l=this.$slots).header)===null||s===void 0?void 0:s.call(l)},footer:()=>{var l,s;return(s=(l=this.$slots).footer)===null||s===void 0?void 0:s.call(l)}})]}})}}),Zv={closeIconSizeTiny:"12px",closeIconSizeSmall:"12px",closeIconSizeMedium:"14px",closeIconSizeLarge:"14px",closeSizeTiny:"16px",closeSizeSmall:"16px",closeSizeMedium:"18px",closeSizeLarge:"18px",padding:"0 7px",closeMargin:"0 0 0 4px"};function Jv(e){const{textColor2:t,primaryColorHover:n,primaryColorPressed:r,primaryColor:i,infoColor:a,successColor:l,warningColor:s,errorColor:c,baseColor:d,borderColor:u,opacityDisabled:f,tagColor:p,closeIconColor:b,closeIconColorHover:h,closeIconColorPressed:x,borderRadiusSmall:v,fontSizeMini:g,fontSizeTiny:k,fontSizeSmall:z,fontSizeMedium:$,heightMini:T,heightTiny:O,heightSmall:m,heightMedium:S,closeColorHover:M,closeColorPressed:N,buttonColor2Hover:A,buttonColor2Pressed:L,fontWeightStrong:U}=e;return Object.assign(Object.assign({},Zv),{closeBorderRadius:v,heightTiny:T,heightSmall:O,heightMedium:m,heightLarge:S,borderRadius:v,opacityDisabled:f,fontSizeTiny:g,fontSizeSmall:k,fontSizeMedium:z,fontSizeLarge:$,fontWeightStrong:U,textColorCheckable:t,textColorHoverCheckable:t,textColorPressedCheckable:t,textColorChecked:d,colorCheckable:"#0000",colorHoverCheckable:A,colorPressedCheckable:L,colorChecked:i,colorCheckedHover:n,colorCheckedPressed:r,border:`1px solid ${u}`,textColor:t,color:p,colorBordered:"rgb(250, 250, 252)",closeIconColor:b,closeIconColorHover:h,closeIconColorPressed:x,closeColorHover:M,closeColorPressed:N,borderPrimary:`1px solid ${ve(i,{alpha:.3})}`,textColorPrimary:i,colorPrimary:ve(i,{alpha:.12}),colorBorderedPrimary:ve(i,{alpha:.1}),closeIconColorPrimary:i,closeIconColorHoverPrimary:i,closeIconColorPressedPrimary:i,closeColorHoverPrimary:ve(i,{alpha:.12}),closeColorPressedPrimary:ve(i,{alpha:.18}),borderInfo:`1px solid ${ve(a,{alpha:.3})}`,textColorInfo:a,colorInfo:ve(a,{alpha:.12}),colorBorderedInfo:ve(a,{alpha:.1}),closeIconColorInfo:a,closeIconColorHoverInfo:a,closeIconColorPressedInfo:a,closeColorHoverInfo:ve(a,{alpha:.12}),closeColorPressedInfo:ve(a,{alpha:.18}),borderSuccess:`1px solid ${ve(l,{alpha:.3})}`,textColorSuccess:l,colorSuccess:ve(l,{alpha:.12}),colorBorderedSuccess:ve(l,{alpha:.1}),closeIconColorSuccess:l,closeIconColorHoverSuccess:l,closeIconColorPressedSuccess:l,closeColorHoverSuccess:ve(l,{alpha:.12}),closeColorPressedSuccess:ve(l,{alpha:.18}),borderWarning:`1px solid ${ve(s,{alpha:.35})}`,textColorWarning:s,colorWarning:ve(s,{alpha:.15}),colorBorderedWarning:ve(s,{alpha:.12}),closeIconColorWarning:s,closeIconColorHoverWarning:s,closeIconColorPressedWarning:s,closeColorHoverWarning:ve(s,{alpha:.12}),closeColorPressedWarning:ve(s,{alpha:.18}),borderError:`1px solid ${ve(c,{alpha:.23})}`,textColorError:c,colorError:ve(c,{alpha:.1}),colorBorderedError:ve(c,{alpha:.08}),closeIconColorError:c,closeIconColorHoverError:c,closeIconColorPressedError:c,closeColorHoverError:ve(c,{alpha:.12}),closeColorPressedError:ve(c,{alpha:.18})})}const Qv={name:"Tag",common:Qe,self:Jv},e0={color:Object,type:{type:String,default:"default"},round:Boolean,size:{type:String,default:"medium"},closable:Boolean,disabled:{type:Boolean,default:void 0}},t0=w("tag",`
|
|
414
|
+
`,[w("popover-arrow",t)])])])}const Js=Object.assign(Object.assign({},Ce.props),{to:lt.propTo,show:Boolean,trigger:String,showArrow:Boolean,delay:Number,duration:Number,raw:Boolean,arrowPointToCenter:Boolean,arrowClass:String,arrowStyle:[String,Object],arrowWrapperClass:String,arrowWrapperStyle:[String,Object],displayDirective:String,x:Number,y:Number,flip:Boolean,overlap:Boolean,placement:String,width:[Number,String],keepAliveOnHover:Boolean,scrollable:Boolean,contentClass:String,contentStyle:[Object,String],headerClass:String,headerStyle:[Object,String],footerClass:String,footerStyle:[Object,String],internalDeactivateImmediately:Boolean,animated:Boolean,onClickoutside:Function,internalTrapFocus:Boolean,internalOnAfterLeave:Function,minWidth:Number,maxWidth:Number});function Gv({arrowClass:e,arrowStyle:t,arrowWrapperClass:n,arrowWrapperStyle:r,clsPrefix:i}){return o.h("div",{key:"__popover-arrow__",style:r,class:[`${i}-popover-arrow-wrapper`,n]},o.h("div",{class:[`${i}-popover-arrow`,e],style:t}))}const qv=o.defineComponent({name:"PopoverBody",inheritAttrs:!1,props:Js,setup(e,{slots:t,attrs:n}){const{namespaceRef:r,mergedClsPrefixRef:i,inlineThemeDisabled:a}=Ye(e),l=Ce("Popover","-popover",Uv,ji,e,i),s=o.ref(null),c=o.inject("NPopover"),d=o.ref(null),u=o.ref(e.show),f=o.ref(!1);o.watchEffect(()=>{const{show:m}=e;m&&!lu()&&!e.internalDeactivateImmediately&&(f.value=!0)});const p=o.computed(()=>{const{trigger:m,onClickoutside:S}=e,M=[],{positionManuallyRef:{value:N}}=c;return N||(m==="click"&&!S&&M.push([ar,$,void 0,{capture:!0}]),m==="hover"&&M.push([rl,z])),S&&M.push([ar,$,void 0,{capture:!0}]),(e.displayDirective==="show"||e.animated&&f.value)&&M.push([o.vShow,e.show]),M}),b=o.computed(()=>{const{common:{cubicBezierEaseInOut:m,cubicBezierEaseIn:S,cubicBezierEaseOut:M},self:{space:N,spaceArrow:A,padding:L,fontSize:U,textColor:J,dividerColor:j,color:Q,boxShadow:Y,borderRadius:ie,arrowHeight:me,arrowOffset:ae,arrowOffsetVertical:he}}=l.value;return{"--n-box-shadow":Y,"--n-bezier":m,"--n-bezier-ease-in":S,"--n-bezier-ease-out":M,"--n-font-size":U,"--n-text-color":J,"--n-color":Q,"--n-divider-color":j,"--n-border-radius":ie,"--n-arrow-height":me,"--n-arrow-offset":ae,"--n-arrow-offset-vertical":he,"--n-padding":L,"--n-space":N,"--n-space-arrow":A}}),h=o.computed(()=>{const m=e.width==="trigger"?void 0:dt(e.width),S=[];m&&S.push({width:m});const{maxWidth:M,minWidth:N}=e;return M&&S.push({maxWidth:dt(M)}),N&&S.push({maxWidth:dt(N)}),a||S.push(b.value),S}),x=a?rt("popover",void 0,b,e):void 0;c.setBodyInstance({syncPosition:v}),o.onBeforeUnmount(()=>{c.setBodyInstance(null)}),o.watch(o.toRef(e,"show"),m=>{e.animated||(m?u.value=!0:u.value=!1)});function v(){var m;(m=s.value)===null||m===void 0||m.syncPosition()}function g(m){e.trigger==="hover"&&e.keepAliveOnHover&&e.show&&c.handleMouseEnter(m)}function k(m){e.trigger==="hover"&&e.keepAliveOnHover&&c.handleMouseLeave(m)}function z(m){e.trigger==="hover"&&!T().contains(An(m))&&c.handleMouseMoveOutside(m)}function $(m){(e.trigger==="click"&&!T().contains(An(m))||e.onClickoutside)&&c.handleClickOutside(m)}function T(){return c.getTriggerElement()}o.provide(Ja,d),o.provide(Za,null),o.provide(Ya,null);function O(){if(x==null||x.onRender(),!(e.displayDirective==="show"||e.show||e.animated&&f.value))return null;let S;const M=c.internalRenderBodyRef.value,{value:N}=i;if(M)S=M([`${N}-popover-shared`,x==null?void 0:x.themeClass.value,e.overlap&&`${N}-popover-shared--overlap`,e.showArrow&&`${N}-popover-shared--show-arrow`,e.arrowPointToCenter&&`${N}-popover-shared--center-arrow`],d,h.value,g,k);else{const{value:A}=c.extraClassRef,{internalTrapFocus:L}=e,U=!Dn(t.header)||!Dn(t.footer),J=()=>{var j,Q;const Y=U?o.h(o.Fragment,null,Fe(t.header,ae=>ae?o.h("div",{class:[`${N}-popover__header`,e.headerClass],style:e.headerStyle},ae):null),Fe(t.default,ae=>ae?o.h("div",{class:[`${N}-popover__content`,e.contentClass],style:e.contentStyle},t):null),Fe(t.footer,ae=>ae?o.h("div",{class:[`${N}-popover__footer`,e.footerClass],style:e.footerStyle},ae):null)):e.scrollable?(j=t.default)===null||j===void 0?void 0:j.call(t):o.h("div",{class:[`${N}-popover__content`,e.contentClass],style:e.contentStyle},t),ie=e.scrollable?o.h(Av,{contentClass:U?void 0:`${N}-popover__content ${(Q=e.contentClass)!==null&&Q!==void 0?Q:""}`,contentStyle:U?void 0:e.contentStyle},{default:()=>Y}):Y,me=e.showArrow?Gv({arrowClass:e.arrowClass,arrowStyle:e.arrowStyle,arrowWrapperClass:e.arrowWrapperClass,arrowWrapperStyle:e.arrowWrapperStyle,clsPrefix:N}):null;return[ie,me]};S=o.h("div",o.mergeProps({class:[`${N}-popover`,`${N}-popover-shared`,x==null?void 0:x.themeClass.value,A.map(j=>`${N}-${j}`),{[`${N}-popover--scrollable`]:e.scrollable,[`${N}-popover--show-header-or-footer`]:U,[`${N}-popover--raw`]:e.raw,[`${N}-popover-shared--overlap`]:e.overlap,[`${N}-popover-shared--show-arrow`]:e.showArrow,[`${N}-popover-shared--center-arrow`]:e.arrowPointToCenter}],ref:d,style:h.value,onKeydown:c.handleKeydown,onMouseenter:g,onMouseleave:k},n),L?o.h(ff,{active:e.show,autoFocus:!0},{default:J}):J())}return o.withDirectives(S,p.value)}return{displayed:f,namespace:r,isMounted:c.isMountedRef,zIndex:c.zIndexRef,followerRef:s,adjustedTo:lt(e),followerEnabled:u,renderContentNode:O}},render(){return o.h(qr,{ref:"followerRef",zIndex:this.zIndex,show:this.show,enabled:this.followerEnabled,to:this.adjustedTo,x:this.x,y:this.y,flip:this.flip,placement:this.placement,containerClass:this.namespace,overlap:this.overlap,width:this.width==="trigger"?"target":void 0,teleportDisabled:this.adjustedTo===lt.tdkey},{default:()=>this.animated?o.h(o.Transition,{name:"popover-transition",appear:this.isMounted,onEnter:()=>{this.followerEnabled=!0},onAfterLeave:()=>{var e;(e=this.internalOnAfterLeave)===null||e===void 0||e.call(this),this.followerEnabled=!1,this.displayed=!1}},{default:this.renderContentNode}):this.renderContentNode()})}}),Kv=Object.keys(Js),Xv={focus:["onFocus","onBlur"],click:["onClick"],hover:["onMouseenter","onMouseleave"],manual:[],nested:["onFocus","onBlur","onMouseenter","onMouseleave","onClick"]};function Yv(e,t,n){Xv[t].forEach(r=>{e.props?e.props=Object.assign({},e.props):e.props={};const i=e.props[r],a=n[r];i?e.props[r]=(...l)=>{i(...l),a(...l)}:e.props[r]=a})}const Qs={show:{type:Boolean,default:void 0},defaultShow:Boolean,showArrow:{type:Boolean,default:!0},trigger:{type:String,default:"hover"},delay:{type:Number,default:100},duration:{type:Number,default:100},raw:Boolean,placement:{type:String,default:"top"},x:Number,y:Number,arrowPointToCenter:Boolean,disabled:Boolean,getDisabled:Function,displayDirective:{type:String,default:"if"},arrowClass:String,arrowStyle:[String,Object],arrowWrapperClass:String,arrowWrapperStyle:[String,Object],flip:{type:Boolean,default:!0},animated:{type:Boolean,default:!0},width:{type:[Number,String],default:void 0},overlap:Boolean,keepAliveOnHover:{type:Boolean,default:!0},zIndex:Number,to:lt.propTo,scrollable:Boolean,contentClass:String,contentStyle:[Object,String],headerClass:String,headerStyle:[Object,String],footerClass:String,footerStyle:[Object,String],onClickoutside:Function,"onUpdate:show":[Function,Array],onUpdateShow:[Function,Array],internalDeactivateImmediately:Boolean,internalSyncTargetWithParent:Boolean,internalInheritedEventHandlers:{type:Array,default:()=>[]},internalTrapFocus:Boolean,internalExtraClass:{type:Array,default:()=>[]},onShow:[Function,Array],onHide:[Function,Array],arrow:{type:Boolean,default:void 0},minWidth:Number,maxWidth:Number},Zv=Object.assign(Object.assign(Object.assign({},Ce.props),Qs),{internalOnAfterLeave:Function,internalRenderBody:Function}),ec=o.defineComponent({name:"Popover",inheritAttrs:!1,props:Zv,__popover__:!0,setup(e){process.env.NODE_ENV!=="production"&&o.watchEffect(()=>{e.maxWidth!==void 0&&ot("popover","`max-width` is deprecated, please use `style` instead."),e.minWidth!==void 0&&ot("popover","`min-width` is deprecated, please use `style` instead."),e.arrow!==void 0&&ot("popover","`arrow` is deprecated, please use `showArrow` instead."),e.onHide!==void 0&&ot("popover","`on-hide` is deprecated, please use `on-update:show` instead."),e.onShow!==void 0&&ot("popover","`on-show` is deprecated, please use `on-update:show` instead.")});const t=Ln(),n=o.ref(null),r=o.computed(()=>e.show),i=o.ref(e.defaultShow),a=St(r,i),l=Je(()=>e.disabled?!1:a.value),s=()=>{if(e.disabled)return!0;const{getDisabled:j}=e;return!!(j!=null&&j())},c=()=>s()?!1:a.value,d=Vr(e,["arrow","showArrow"]),u=o.computed(()=>e.overlap?!1:d.value);let f=null;const p=o.ref(null),b=o.ref(null),h=Je(()=>e.x!==void 0&&e.y!==void 0);function x(j){const{"onUpdate:show":Q,onUpdateShow:Y,onShow:ie,onHide:me}=e;i.value=j,Q&&de(Q,j),Y&&de(Y,j),j&&ie&&de(ie,!0),j&&me&&de(me,!1)}function v(){f&&f.syncPosition()}function g(){const{value:j}=p;j&&(window.clearTimeout(j),p.value=null)}function k(){const{value:j}=b;j&&(window.clearTimeout(j),b.value=null)}function z(){const j=s();if(e.trigger==="focus"&&!j){if(c())return;x(!0)}}function $(){const j=s();if(e.trigger==="focus"&&!j){if(!c())return;x(!1)}}function T(){const j=s();if(e.trigger==="hover"&&!j){if(k(),p.value!==null||c())return;const Q=()=>{x(!0),p.value=null},{delay:Y}=e;Y===0?Q():p.value=window.setTimeout(Q,Y)}}function O(){const j=s();if(e.trigger==="hover"&&!j){if(g(),b.value!==null||!c())return;const Q=()=>{x(!1),b.value=null},{duration:Y}=e;Y===0?Q():b.value=window.setTimeout(Q,Y)}}function m(){O()}function S(j){var Q;c()&&(e.trigger==="click"&&(g(),k(),x(!1)),(Q=e.onClickoutside)===null||Q===void 0||Q.call(e,j))}function M(){if(e.trigger==="click"&&!s()){g(),k();const j=!c();x(j)}}function N(j){e.internalTrapFocus&&j.key==="Escape"&&(g(),k(),x(!1))}function A(j){i.value=j}function L(){var j;return(j=n.value)===null||j===void 0?void 0:j.targetRef}function U(j){f=j}return o.provide("NPopover",{getTriggerElement:L,handleKeydown:N,handleMouseEnter:T,handleMouseLeave:O,handleClickOutside:S,handleMouseMoveOutside:m,setBodyInstance:U,positionManuallyRef:h,isMountedRef:t,zIndexRef:o.toRef(e,"zIndex"),extraClassRef:o.toRef(e,"internalExtraClass"),internalRenderBodyRef:o.toRef(e,"internalRenderBody")}),o.watchEffect(()=>{a.value&&s()&&x(!1)}),{binderInstRef:n,positionManually:h,mergedShowConsideringDisabledProp:l,uncontrolledShow:i,mergedShowArrow:u,getMergedShow:c,setShow:A,handleClick:M,handleMouseEnter:T,handleMouseLeave:O,handleFocus:z,handleBlur:$,syncPosition:v}},render(){var e;const{positionManually:t,$slots:n}=this;let r,i=!1;if(!t&&(n.activator?r=Ia(n,"activator"):r=Ia(n,"trigger"),r)){r=o.cloneVNode(r),r=r.type===o.Text?o.h("span",[r]):r;const a={onClick:this.handleClick,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onFocus:this.handleFocus,onBlur:this.handleBlur};if(!((e=r.type)===null||e===void 0)&&e.__popover__)i=!0,r.props||(r.props={internalSyncTargetWithParent:!0,internalInheritedEventHandlers:[]}),r.props.internalSyncTargetWithParent=!0,r.props.internalInheritedEventHandlers?r.props.internalInheritedEventHandlers=[a,...r.props.internalInheritedEventHandlers]:r.props.internalInheritedEventHandlers=[a];else{const{internalInheritedEventHandlers:l}=this,s=[a,...l],c={onBlur:d=>{s.forEach(u=>{u.onBlur(d)})},onFocus:d=>{s.forEach(u=>{u.onFocus(d)})},onClick:d=>{s.forEach(u=>{u.onClick(d)})},onMouseenter:d=>{s.forEach(u=>{u.onMouseenter(d)})},onMouseleave:d=>{s.forEach(u=>{u.onMouseleave(d)})}};Yv(r,l?"nested":t?"manual":this.trigger,c)}}return o.h(jr,{ref:"binderInstRef",syncTarget:!i,syncTargetWithParent:this.internalSyncTargetWithParent},{default:()=>{this.mergedShowConsideringDisabledProp;const a=this.getMergedShow();return[this.internalTrapFocus&&a?o.withDirectives(o.h("div",{style:{position:"fixed",inset:0}}),[[ol,{enabled:a,zIndex:this.zIndex}]]):null,t?null:o.h(Wr,null,{default:()=>r}),o.h(qv,Md(this.$props,Kv,Object.assign(Object.assign({},this.$attrs),{showArrow:this.mergedShowArrow,show:a})),{default:()=>{var l,s;return(s=(l=this.$slots).default)===null||s===void 0?void 0:s.call(l)},header:()=>{var l,s;return(s=(l=this.$slots).header)===null||s===void 0?void 0:s.call(l)},footer:()=>{var l,s;return(s=(l=this.$slots).footer)===null||s===void 0?void 0:s.call(l)}})]}})}}),Jv={closeIconSizeTiny:"12px",closeIconSizeSmall:"12px",closeIconSizeMedium:"14px",closeIconSizeLarge:"14px",closeSizeTiny:"16px",closeSizeSmall:"16px",closeSizeMedium:"18px",closeSizeLarge:"18px",padding:"0 7px",closeMargin:"0 0 0 4px"};function Qv(e){const{textColor2:t,primaryColorHover:n,primaryColorPressed:r,primaryColor:i,infoColor:a,successColor:l,warningColor:s,errorColor:c,baseColor:d,borderColor:u,opacityDisabled:f,tagColor:p,closeIconColor:b,closeIconColorHover:h,closeIconColorPressed:x,borderRadiusSmall:v,fontSizeMini:g,fontSizeTiny:k,fontSizeSmall:z,fontSizeMedium:$,heightMini:T,heightTiny:O,heightSmall:m,heightMedium:S,closeColorHover:M,closeColorPressed:N,buttonColor2Hover:A,buttonColor2Pressed:L,fontWeightStrong:U}=e;return Object.assign(Object.assign({},Jv),{closeBorderRadius:v,heightTiny:T,heightSmall:O,heightMedium:m,heightLarge:S,borderRadius:v,opacityDisabled:f,fontSizeTiny:g,fontSizeSmall:k,fontSizeMedium:z,fontSizeLarge:$,fontWeightStrong:U,textColorCheckable:t,textColorHoverCheckable:t,textColorPressedCheckable:t,textColorChecked:d,colorCheckable:"#0000",colorHoverCheckable:A,colorPressedCheckable:L,colorChecked:i,colorCheckedHover:n,colorCheckedPressed:r,border:`1px solid ${u}`,textColor:t,color:p,colorBordered:"rgb(250, 250, 252)",closeIconColor:b,closeIconColorHover:h,closeIconColorPressed:x,closeColorHover:M,closeColorPressed:N,borderPrimary:`1px solid ${ve(i,{alpha:.3})}`,textColorPrimary:i,colorPrimary:ve(i,{alpha:.12}),colorBorderedPrimary:ve(i,{alpha:.1}),closeIconColorPrimary:i,closeIconColorHoverPrimary:i,closeIconColorPressedPrimary:i,closeColorHoverPrimary:ve(i,{alpha:.12}),closeColorPressedPrimary:ve(i,{alpha:.18}),borderInfo:`1px solid ${ve(a,{alpha:.3})}`,textColorInfo:a,colorInfo:ve(a,{alpha:.12}),colorBorderedInfo:ve(a,{alpha:.1}),closeIconColorInfo:a,closeIconColorHoverInfo:a,closeIconColorPressedInfo:a,closeColorHoverInfo:ve(a,{alpha:.12}),closeColorPressedInfo:ve(a,{alpha:.18}),borderSuccess:`1px solid ${ve(l,{alpha:.3})}`,textColorSuccess:l,colorSuccess:ve(l,{alpha:.12}),colorBorderedSuccess:ve(l,{alpha:.1}),closeIconColorSuccess:l,closeIconColorHoverSuccess:l,closeIconColorPressedSuccess:l,closeColorHoverSuccess:ve(l,{alpha:.12}),closeColorPressedSuccess:ve(l,{alpha:.18}),borderWarning:`1px solid ${ve(s,{alpha:.35})}`,textColorWarning:s,colorWarning:ve(s,{alpha:.15}),colorBorderedWarning:ve(s,{alpha:.12}),closeIconColorWarning:s,closeIconColorHoverWarning:s,closeIconColorPressedWarning:s,closeColorHoverWarning:ve(s,{alpha:.12}),closeColorPressedWarning:ve(s,{alpha:.18}),borderError:`1px solid ${ve(c,{alpha:.23})}`,textColorError:c,colorError:ve(c,{alpha:.1}),colorBorderedError:ve(c,{alpha:.08}),closeIconColorError:c,closeIconColorHoverError:c,closeIconColorPressedError:c,closeColorHoverError:ve(c,{alpha:.12}),closeColorPressedError:ve(c,{alpha:.18})})}const e0={name:"Tag",common:Qe,self:Qv},t0={color:Object,type:{type:String,default:"default"},round:Boolean,size:{type:String,default:"medium"},closable:Boolean,disabled:{type:Boolean,default:void 0}},n0=w("tag",`
|
|
415
415
|
--n-close-margin: var(--n-close-margin-top) var(--n-close-margin-right) var(--n-close-margin-bottom) var(--n-close-margin-left);
|
|
416
416
|
white-space: nowrap;
|
|
417
417
|
position: relative;
|
|
@@ -481,7 +481,7 @@ ${t}
|
|
|
481
481
|
`,[Ge("disabled",[I("&:hover","background-color: var(--n-color-hover-checkable);",[Ge("checked","color: var(--n-text-color-hover-checkable);")]),I("&:active","background-color: var(--n-color-pressed-checkable);",[Ge("checked","color: var(--n-text-color-pressed-checkable);")])]),W("checked",`
|
|
482
482
|
color: var(--n-text-color-checked);
|
|
483
483
|
background-color: var(--n-color-checked);
|
|
484
|
-
`,[Ge("disabled",[I("&:hover","background-color: var(--n-color-checked-hover);"),I("&:active","background-color: var(--n-color-checked-pressed);")])])])]),
|
|
484
|
+
`,[Ge("disabled",[I("&:hover","background-color: var(--n-color-checked-hover);"),I("&:active","background-color: var(--n-color-checked-pressed);")])])])]),r0=Object.assign(Object.assign(Object.assign({},Ce.props),t0),{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}),o0="n-tag",Ui=o.defineComponent({name:"Tag",props:r0,setup(e){process.env.NODE_ENV!=="production"&&o.watchEffect(()=>{e.onCheckedChange!==void 0&&ot("tag","`on-checked-change` is deprecated, please use `on-update:checked` instead")});const t=o.ref(null),{mergedBorderedRef:n,mergedClsPrefixRef:r,inlineThemeDisabled:i,mergedRtlRef:a}=Ye(e),l=Ce("Tag","-tag",n0,e0,e,r);o.provide(o0,{roundRef:o.toRef(e,"round")});function s(){if(!e.disabled&&e.checkable){const{checked:b,onCheckedChange:h,onUpdateChecked:x,"onUpdate:checked":v}=e;x&&x(!b),v&&v(!b),h&&h(!b)}}function c(b){if(e.triggerClickOnClose||b.stopPropagation(),!e.disabled){const{onClose:h}=e;h&&de(h,b)}}const d={setTextContent(b){const{value:h}=t;h&&(h.textContent=b)}},u=tn("Tag",a,r),f=o.computed(()=>{const{type:b,size:h,color:{color:x,textColor:v}={}}=e,{common:{cubicBezierEaseInOut:g},self:{padding:k,closeMargin:z,borderRadius:$,opacityDisabled:T,textColorCheckable:O,textColorHoverCheckable:m,textColorPressedCheckable:S,textColorChecked:M,colorCheckable:N,colorHoverCheckable:A,colorPressedCheckable:L,colorChecked:U,colorCheckedHover:J,colorCheckedPressed:j,closeBorderRadius:Q,fontWeightStrong:Y,[ee("colorBordered",b)]:ie,[ee("closeSize",h)]:me,[ee("closeIconSize",h)]:ae,[ee("fontSize",h)]:he,[ee("height",h)]:G,[ee("color",b)]:te,[ee("textColor",b)]:xe,[ee("border",b)]:Se,[ee("closeIconColor",b)]:oe,[ee("closeIconColorHover",b)]:Te,[ee("closeIconColorPressed",b)]:$e,[ee("closeColorHover",b)]:se,[ee("closeColorPressed",b)]:Ae}}=l.value,Be=ht(z);return{"--n-font-weight-strong":Y,"--n-avatar-size-override":`calc(${G} - 8px)`,"--n-bezier":g,"--n-border-radius":$,"--n-border":Se,"--n-close-icon-size":ae,"--n-close-color-pressed":Ae,"--n-close-color-hover":se,"--n-close-border-radius":Q,"--n-close-icon-color":oe,"--n-close-icon-color-hover":Te,"--n-close-icon-color-pressed":$e,"--n-close-icon-color-disabled":oe,"--n-close-margin-top":Be.top,"--n-close-margin-right":Be.right,"--n-close-margin-bottom":Be.bottom,"--n-close-margin-left":Be.left,"--n-close-size":me,"--n-color":x||(n.value?ie:te),"--n-color-checkable":N,"--n-color-checked":U,"--n-color-checked-hover":J,"--n-color-checked-pressed":j,"--n-color-hover-checkable":A,"--n-color-pressed-checkable":L,"--n-font-size":he,"--n-height":G,"--n-opacity-disabled":T,"--n-padding":k,"--n-text-color":v||xe,"--n-text-color-checkable":O,"--n-text-color-checked":M,"--n-text-color-hover-checkable":m,"--n-text-color-pressed-checkable":S}}),p=i?rt("tag",o.computed(()=>{let b="";const{type:h,size:x,color:{color:v,textColor:g}={}}=e;return b+=h[0],b+=x[0],v&&(b+=`a${Ar(v)}`),g&&(b+=`b${Ar(g)}`),n.value&&(b+="c"),b}),f,e):void 0;return Object.assign(Object.assign({},d),{rtlEnabled:u,mergedClsPrefix:r,contentRef:t,mergedBordered:n,handleClick:s,handleCloseClick:c,cssVars:i?void 0:f,themeClass:p==null?void 0:p.themeClass,onRender:p==null?void 0:p.onRender})},render(){var e,t;const{mergedClsPrefix:n,rtlEnabled:r,closable:i,color:{borderColor:a}={},round:l,onRender:s,$slots:c}=this;s==null||s();const d=Fe(c.avatar,f=>f&&o.h("div",{class:`${n}-tag__avatar`},f)),u=Fe(c.icon,f=>f&&o.h("div",{class:`${n}-tag__icon`},f));return o.h("div",{class:[`${n}-tag`,this.themeClass,{[`${n}-tag--rtl`]:r,[`${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`]:l,[`${n}-tag--avatar`]:d,[`${n}-tag--icon`]:u,[`${n}-tag--closable`]:i}],style:this.cssVars,onClick:this.handleClick,onMouseenter:this.onMouseenter,onMouseleave:this.onMouseleave},u||d,o.h("span",{class:`${n}-tag__content`,ref:"contentRef"},(t=(e=this.$slots).default)===null||t===void 0?void 0:t.call(e)),!this.checkable&&i?o.h(Ai,{clsPrefix:n,class:`${n}-tag__close`,disabled:this.disabled,onClick:this.handleCloseClick,focusable:this.internalCloseFocusable,round:l,isButtonTag:this.internalCloseIsButtonTag,absolute:!0}):null,!this.checkable&&this.mergedBordered?o.h("div",{class:`${n}-tag__border`,style:{borderColor:a}}):null)}}),i0=w("base-clear",`
|
|
485
485
|
flex-shrink: 0;
|
|
486
486
|
height: 1em;
|
|
487
487
|
width: 1em;
|
|
@@ -505,7 +505,7 @@ ${t}
|
|
|
505
505
|
left: 50%;
|
|
506
506
|
top: 50%;
|
|
507
507
|
transform: translateX(-50%) translateY(-50%);
|
|
508
|
-
`,[qn({originalTransform:"translateX(-50%) translateY(-50%)",left:"50%",top:"50%"})])])]),Gi=o.defineComponent({name:"BaseClear",props:{clsPrefix:{type:String,required:!0},show:Boolean,onClear:Function},setup(e){return Tn("-base-clear",
|
|
508
|
+
`,[qn({originalTransform:"translateX(-50%) translateY(-50%)",left:"50%",top:"50%"})])])]),Gi=o.defineComponent({name:"BaseClear",props:{clsPrefix:{type:String,required:!0},show:Boolean,onClear:Function},setup(e){return Tn("-base-clear",i0,o.toRef(e,"clsPrefix")),{handleMouseDown(t){t.preventDefault()}}},render(){const{clsPrefix:e}=this;return o.h("div",{class:`${e}-base-clear`},o.h(fo,null,{default:()=>{var t,n;return this.show?o.h("div",{key:"dismiss",class:`${e}-base-clear__clear`,onClick:this.onClear,onMousedown:this.handleMouseDown,"data-clear":!0},Ct(this.$slots.icon,()=>[o.h(yt,{clsPrefix:e},{default:()=>o.h(Wg,null)})])):o.h("div",{key:"icon",class:`${e}-base-clear__placeholder`},(n=(t=this.$slots).placeholder)===null||n===void 0?void 0:n.call(t))}}))}}),tc=o.defineComponent({name:"InternalSelectionSuffix",props:{clsPrefix:{type:String,required:!0},showArrow:{type:Boolean,default:void 0},showClear:{type:Boolean,default:void 0},loading:{type:Boolean,default:!1},onClear:Function},setup(e,{slots:t}){return()=>{const{clsPrefix:n}=e;return o.h(ho,{clsPrefix:n,class:`${n}-base-suffix`,strokeWidth:24,scale:.85,show:e.loading},{default:()=>e.showArrow?o.h(Gi,{clsPrefix:n,show:e.showClear,onClear:e.onClear},{placeholder:()=>o.h(yt,{clsPrefix:n,class:`${n}-base-suffix__arrow`},{default:()=>Ct(t.default,()=>[o.h(jg,null)])})}):null})}}}),a0={paddingSingle:"0 26px 0 12px",paddingMultiple:"3px 26px 0 12px",clearSize:"16px",arrowSize:"16px"};function l0(e){const{borderRadius:t,textColor2:n,textColorDisabled:r,inputColor:i,inputColorDisabled:a,primaryColor:l,primaryColorHover:s,warningColor:c,warningColorHover:d,errorColor:u,errorColorHover:f,borderColor:p,iconColor:b,iconColorDisabled:h,clearColor:x,clearColorHover:v,clearColorPressed:g,placeholderColor:k,placeholderColorDisabled:z,fontSizeTiny:$,fontSizeSmall:T,fontSizeMedium:O,fontSizeLarge:m,heightTiny:S,heightSmall:M,heightMedium:N,heightLarge:A}=e;return Object.assign(Object.assign({},a0),{fontSizeTiny:$,fontSizeSmall:T,fontSizeMedium:O,fontSizeLarge:m,heightTiny:S,heightSmall:M,heightMedium:N,heightLarge:A,borderRadius:t,textColor:n,textColorDisabled:r,placeholderColor:k,placeholderColorDisabled:z,color:i,colorDisabled:a,colorActive:i,border:`1px solid ${p}`,borderHover:`1px solid ${s}`,borderActive:`1px solid ${l}`,borderFocus:`1px solid ${s}`,boxShadowHover:"none",boxShadowActive:`0 0 0 2px ${ve(l,{alpha:.2})}`,boxShadowFocus:`0 0 0 2px ${ve(l,{alpha:.2})}`,caretColor:l,arrowColor:b,arrowColorDisabled:h,loadingColor:l,borderWarning:`1px solid ${c}`,borderHoverWarning:`1px solid ${d}`,borderActiveWarning:`1px solid ${c}`,borderFocusWarning:`1px solid ${d}`,boxShadowHoverWarning:"none",boxShadowActiveWarning:`0 0 0 2px ${ve(c,{alpha:.2})}`,boxShadowFocusWarning:`0 0 0 2px ${ve(c,{alpha:.2})}`,colorActiveWarning:i,caretColorWarning:c,borderError:`1px solid ${u}`,borderHoverError:`1px solid ${f}`,borderActiveError:`1px solid ${u}`,borderFocusError:`1px solid ${f}`,boxShadowHoverError:"none",boxShadowActiveError:`0 0 0 2px ${ve(u,{alpha:.2})}`,boxShadowFocusError:`0 0 0 2px ${ve(u,{alpha:.2})}`,colorActiveError:i,caretColorError:u,clearColor:x,clearColorHover:v,clearColorPressed:g})}const nc={name:"InternalSelection",common:Qe,peers:{Popover:ji},self:l0},s0=I([w("base-selection",`
|
|
509
509
|
--n-padding-single: var(--n-padding-single-top) var(--n-padding-single-right) var(--n-padding-single-bottom) var(--n-padding-single-left);
|
|
510
510
|
--n-padding-multiple: var(--n-padding-multiple-top) var(--n-padding-multiple-right) var(--n-padding-multiple-bottom) var(--n-padding-multiple-left);
|
|
511
511
|
position: relative;
|
|
@@ -705,7 +705,7 @@ ${t}
|
|
|
705
705
|
line-height: 1.25;
|
|
706
706
|
text-overflow: ellipsis;
|
|
707
707
|
overflow: hidden;
|
|
708
|
-
`)])])]),s0=o.defineComponent({name:"InternalSelection",props:Object.assign(Object.assign({},Ce.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}=Ye(e),r=tn("InternalSelection",n,t),i=o.ref(null),a=o.ref(null),l=o.ref(null),s=o.ref(null),c=o.ref(null),d=o.ref(null),u=o.ref(null),f=o.ref(null),p=o.ref(null),b=o.ref(null),h=o.ref(!1),x=o.ref(!1),v=o.ref(!1),g=Ce("InternalSelection","-internal-selection",l0,tc,e,o.toRef(e,"clsPrefix")),k=o.computed(()=>e.clearable&&!e.disabled&&(v.value||e.active)),z=o.computed(()=>e.selectedOption?e.renderTag?e.renderTag({option:e.selectedOption,handleClose:()=>{}}):e.renderLabel?e.renderLabel(e.selectedOption,!0):bn(e.selectedOption[e.labelField],e.selectedOption,!0):e.placeholder),$=o.computed(()=>{const C=e.selectedOption;if(C)return C[e.labelField]}),T=o.computed(()=>e.multiple?!!(Array.isArray(e.selectedOptions)&&e.selectedOptions.length):e.selectedOption!==null);function O(){var C;const{value:B}=i;if(B){const{value:re}=a;re&&(re.style.width=`${B.offsetWidth}px`,e.maxTagCount!=="responsive"&&((C=p.value)===null||C===void 0||C.sync({showAllItemsBeforeCalculate:!1})))}}function m(){const{value:C}=b;C&&(C.style.display="none")}function S(){const{value:C}=b;C&&(C.style.display="inline-block")}o.watch(o.toRef(e,"active"),C=>{C||m()}),o.watch(o.toRef(e,"pattern"),()=>{e.multiple&&o.nextTick(O)});function M(C){const{onFocus:B}=e;B&&B(C)}function N(C){const{onBlur:B}=e;B&&B(C)}function A(C){const{onDeleteOption:B}=e;B&&B(C)}function L(C){const{onClear:B}=e;B&&B(C)}function U(C){const{onPatternInput:B}=e;B&&B(C)}function J(C){var B;(!C.relatedTarget||!(!((B=l.value)===null||B===void 0)&&B.contains(C.relatedTarget)))&&M(C)}function j(C){var B;!((B=l.value)===null||B===void 0)&&B.contains(C.relatedTarget)||N(C)}function Q(C){L(C)}function Y(){v.value=!0}function ie(){v.value=!1}function me(C){!e.active||!e.filterable||C.target!==a.value&&C.preventDefault()}function ae(C){A(C)}const he=o.ref(!1);function G(C){if(C.key==="Backspace"&&!he.value&&!e.pattern.length){const{selectedOptions:B}=e;B!=null&&B.length&&ae(B[B.length-1])}}let te=null;function xe(C){const{value:B}=i;if(B){const re=C.target.value;B.textContent=re,O()}e.ignoreComposition&&he.value?te=C:U(C)}function Se(){he.value=!0}function oe(){he.value=!1,e.ignoreComposition&&U(te),te=null}function Te(C){var B;x.value=!0,(B=e.onPatternFocus)===null||B===void 0||B.call(e,C)}function $e(C){var B;x.value=!1,(B=e.onPatternBlur)===null||B===void 0||B.call(e,C)}function se(){var C,B;if(e.filterable)x.value=!1,(C=d.value)===null||C===void 0||C.blur(),(B=a.value)===null||B===void 0||B.blur();else if(e.multiple){const{value:re}=s;re==null||re.blur()}else{const{value:re}=c;re==null||re.blur()}}function Ae(){var C,B,re;e.filterable?(x.value=!1,(C=d.value)===null||C===void 0||C.focus()):e.multiple?(B=s.value)===null||B===void 0||B.focus():(re=c.value)===null||re===void 0||re.focus()}function Be(){const{value:C}=a;C&&(S(),C.focus())}function We(){const{value:C}=a;C&&C.blur()}function Ie(C){const{value:B}=u;B&&B.setTextContent(`+${C}`)}function Le(){const{value:C}=f;return C}function Ke(){return a.value}let Re=null;function X(){Re!==null&&window.clearTimeout(Re)}function F(){e.active||(X(),Re=window.setTimeout(()=>{T.value&&(h.value=!0)},100))}function ne(){X()}function _(C){C||(X(),h.value=!1)}o.watch(T,C=>{C||(h.value=!1)}),o.onMounted(()=>{o.watchEffect(()=>{const C=d.value;C&&(e.disabled?C.removeAttribute("tabindex"):C.tabIndex=x.value?-1:0)})}),Bl(l,e.onResize);const{inlineThemeDisabled:D}=e,K=o.computed(()=>{const{size:C}=e,{common:{cubicBezierEaseInOut:B},self:{borderRadius:re,color:we,placeholderColor:Pe,textColor:Ue,paddingSingle:De,paddingMultiple:Me,caretColor:Ze,colorDisabled:ft,textColorDisabled:tt,placeholderColorDisabled:st,colorActive:y,boxShadowFocus:H,boxShadowActive:Z,boxShadowHover:le,border:ce,borderFocus:ue,borderHover:fe,borderActive:ge,arrowColor:Ee,arrowColorDisabled:mt,loadingColor:on,colorActiveWarning:_n,boxShadowFocusWarning:an,boxShadowActiveWarning:ln,boxShadowHoverWarning:Pr,borderWarning:Er,borderFocusWarning:Zn,borderHoverWarning:sn,borderActiveWarning:E,colorActiveError:q,boxShadowFocusError:be,boxShadowActiveError:Oe,boxShadowHoverError:He,borderError:_e,borderFocusError:Vt,borderHoverError:jt,borderActiveError:Wt,clearColor:Mn,clearColorHover:On,clearColorPressed:zr,clearSize:xa,arrowSize:ya,[ee("height",C)]:wa,[ee("fontSize",C)]:Ca}}=g.value,Jn=ht(De),Qn=ht(Me);return{"--n-bezier":B,"--n-border":ce,"--n-border-active":ge,"--n-border-focus":ue,"--n-border-hover":fe,"--n-border-radius":re,"--n-box-shadow-active":Z,"--n-box-shadow-focus":H,"--n-box-shadow-hover":le,"--n-caret-color":Ze,"--n-color":we,"--n-color-active":y,"--n-color-disabled":ft,"--n-font-size":Ca,"--n-height":wa,"--n-padding-single-top":Jn.top,"--n-padding-multiple-top":Qn.top,"--n-padding-single-right":Jn.right,"--n-padding-multiple-right":Qn.right,"--n-padding-single-left":Jn.left,"--n-padding-multiple-left":Qn.left,"--n-padding-single-bottom":Jn.bottom,"--n-padding-multiple-bottom":Qn.bottom,"--n-placeholder-color":Pe,"--n-placeholder-color-disabled":st,"--n-text-color":Ue,"--n-text-color-disabled":tt,"--n-arrow-color":Ee,"--n-arrow-color-disabled":mt,"--n-loading-color":on,"--n-color-active-warning":_n,"--n-box-shadow-focus-warning":an,"--n-box-shadow-active-warning":ln,"--n-box-shadow-hover-warning":Pr,"--n-border-warning":Er,"--n-border-focus-warning":Zn,"--n-border-hover-warning":sn,"--n-border-active-warning":E,"--n-color-active-error":q,"--n-box-shadow-focus-error":be,"--n-box-shadow-active-error":Oe,"--n-box-shadow-hover-error":He,"--n-border-error":_e,"--n-border-focus-error":Vt,"--n-border-hover-error":jt,"--n-border-active-error":Wt,"--n-clear-size":xa,"--n-clear-color":Mn,"--n-clear-color-hover":On,"--n-clear-color-pressed":zr,"--n-arrow-size":ya}}),R=D?rt("internal-selection",o.computed(()=>e.size[0]),K,e):void 0;return{mergedTheme:g,mergedClearable:k,mergedClsPrefix:t,rtlEnabled:r,patternInputFocused:x,filterablePlaceholder:z,label:$,selected:T,showTagsPanel:h,isComposing:he,counterRef:u,counterWrapperRef:f,patternInputMirrorRef:i,patternInputRef:a,selfRef:l,multipleElRef:s,singleElRef:c,patternInputWrapperRef:d,overflowRef:p,inputTagElRef:b,handleMouseDown:me,handleFocusin:J,handleClear:Q,handleMouseEnter:Y,handleMouseLeave:ie,handleDeleteOption:ae,handlePatternKeyDown:G,handlePatternInputInput:xe,handlePatternInputBlur:$e,handlePatternInputFocus:Te,handleMouseEnterCounter:F,handleMouseLeaveCounter:ne,handleFocusout:j,handleCompositionEnd:oe,handleCompositionStart:Se,onPopoverUpdateShow:_,focus:Ae,focusInput:Be,blur:se,blurInput:We,updateCounter:Ie,getCounter:Le,getTail:Ke,renderLabel:e.renderLabel,cssVars:D?void 0:K,themeClass:R==null?void 0:R.themeClass,onRender:R==null?void 0:R.onRender}},render(){const{status:e,multiple:t,size:n,disabled:r,filterable:i,maxTagCount:a,bordered:l,clsPrefix:s,ellipsisTagPopoverProps:c,onRender:d,renderTag:u,renderLabel:f}=this;d==null||d();const p=a==="responsive",b=typeof a=="number",h=p||b,x=o.h(Xo,null,{default:()=>o.h(ec,{clsPrefix:s,loading:this.loading,showArrow:this.showArrow,showClear:this.mergedClearable&&this.selected,onClear:this.handleClear},{default:()=>{var g,k;return(k=(g=this.$slots).arrow)===null||k===void 0?void 0:k.call(g)}})});let v;if(t){const{labelField:g}=this,k=U=>o.h("div",{class:`${s}-base-selection-tag-wrapper`,key:U.value},u?u({option:U,handleClose:()=>{this.handleDeleteOption(U)}}):o.h(Ui,{size:n,closable:!U.disabled,disabled:r,onClose:()=>{this.handleDeleteOption(U)},internalCloseIsButtonTag:!1,internalCloseFocusable:!1},{default:()=>f?f(U,!0):bn(U[g],U,!0)})),z=()=>(b?this.selectedOptions.slice(0,a):this.selectedOptions).map(k),$=i?o.h("div",{class:`${s}-base-selection-input-tag`,ref:"inputTagElRef",key:"__input-tag__"},o.h("input",Object.assign({},this.inputProps,{ref:"patternInputRef",tabindex:-1,disabled:r,value:this.pattern,autofocus:this.autofocus,class:`${s}-base-selection-input-tag__input`,onBlur:this.handlePatternInputBlur,onFocus:this.handlePatternInputFocus,onKeydown:this.handlePatternKeyDown,onInput:this.handlePatternInputInput,onCompositionstart:this.handleCompositionStart,onCompositionend:this.handleCompositionEnd})),o.h("span",{ref:"patternInputMirrorRef",class:`${s}-base-selection-input-tag__mirror`},this.pattern)):null,T=p?()=>o.h("div",{class:`${s}-base-selection-tag-wrapper`,ref:"counterWrapperRef"},o.h(Ui,{size:n,ref:"counterRef",onMouseenter:this.handleMouseEnterCounter,onMouseleave:this.handleMouseLeaveCounter,disabled:r})):void 0;let O;if(b){const U=this.selectedOptions.length-a;U>0&&(O=o.h("div",{class:`${s}-base-selection-tag-wrapper`,key:"__counter__"},o.h(Ui,{size:n,ref:"counterRef",onMouseenter:this.handleMouseEnterCounter,disabled:r},{default:()=>`+${U}`})))}const m=p?i?o.h(kl,{ref:"overflowRef",updateCounter:this.updateCounter,getCounter:this.getCounter,getTail:this.getTail,style:{width:"100%",display:"flex",overflow:"hidden"}},{default:z,counter:T,tail:()=>$}):o.h(kl,{ref:"overflowRef",updateCounter:this.updateCounter,getCounter:this.getCounter,style:{width:"100%",display:"flex",overflow:"hidden"}},{default:z,counter:T}):b&&O?z().concat(O):z(),S=h?()=>o.h("div",{class:`${s}-base-selection-popover`},p?z():this.selectedOptions.map(k)):void 0,M=h?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,A=(this.selected?!1:this.active?!this.pattern&&!this.isComposing:!0)?o.h("div",{class:`${s}-base-selection-placeholder ${s}-base-selection-overlay`},o.h("div",{class:`${s}-base-selection-placeholder__inner`},this.placeholder)):null,L=i?o.h("div",{ref:"patternInputWrapperRef",class:`${s}-base-selection-tags`},m,p?null:$,x):o.h("div",{ref:"multipleElRef",class:`${s}-base-selection-tags`,tabindex:r?void 0:0},m,x);v=o.h(o.Fragment,null,h?o.h(Qs,Object.assign({},M,{scrollable:!0,style:"max-height: calc(var(--v-target-height) * 6.6);"}),{trigger:()=>L,default:S}):L,A)}else if(i){const g=this.pattern||this.isComposing,k=this.active?!g:!this.selected,z=this.active?!1:this.selected;v=o.h("div",{ref:"patternInputWrapperRef",class:`${s}-base-selection-label`,title:this.patternInputFocused?void 0:Oa(this.label)},o.h("input",Object.assign({},this.inputProps,{ref:"patternInputRef",class:`${s}-base-selection-input`,value:this.active?this.pattern:"",placeholder:"",readonly:r,disabled:r,tabindex:-1,autofocus:this.autofocus,onFocus:this.handlePatternInputFocus,onBlur:this.handlePatternInputBlur,onInput:this.handlePatternInputInput,onCompositionstart:this.handleCompositionStart,onCompositionend:this.handleCompositionEnd})),z?o.h("div",{class:`${s}-base-selection-label__render-label ${s}-base-selection-overlay`,key:"input"},o.h("div",{class:`${s}-base-selection-overlay__wrapper`},u?u({option:this.selectedOption,handleClose:()=>{}}):f?f(this.selectedOption,!0):bn(this.label,this.selectedOption,!0))):null,k?o.h("div",{class:`${s}-base-selection-placeholder ${s}-base-selection-overlay`,key:"placeholder"},o.h("div",{class:`${s}-base-selection-overlay__wrapper`},this.filterablePlaceholder)):null,x)}else v=o.h("div",{ref:"singleElRef",class:`${s}-base-selection-label`,tabindex:this.disabled?void 0:0},this.label!==void 0?o.h("div",{class:`${s}-base-selection-input`,title:Oa(this.label),key:"input"},o.h("div",{class:`${s}-base-selection-input__content`},u?u({option:this.selectedOption,handleClose:()=>{}}):f?f(this.selectedOption,!0):bn(this.label,this.selectedOption,!0))):o.h("div",{class:`${s}-base-selection-placeholder ${s}-base-selection-overlay`,key:"placeholder"},o.h("div",{class:`${s}-base-selection-placeholder__inner`},this.placeholder)),x);return o.h("div",{ref:"selfRef",class:[`${s}-base-selection`,this.rtlEnabled&&`${s}-base-selection--rtl`,this.themeClass,e&&`${s}-base-selection--${e}-status`,{[`${s}-base-selection--active`]:this.active,[`${s}-base-selection--selected`]:this.selected||this.active&&this.pattern,[`${s}-base-selection--disabled`]:this.disabled,[`${s}-base-selection--multiple`]:this.multiple,[`${s}-base-selection--focus`]:this.focused}],style:this.cssVars,onClick:this.onClick,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onKeydown:this.onKeydown,onFocusin:this.handleFocusin,onFocusout:this.handleFocusout,onMousedown:this.handleMouseDown},v,l?o.h("div",{class:`${s}-base-selection__border`}):null,l?o.h("div",{class:`${s}-base-selection__state-border`}):null)}}),{cubicBezierEaseInOut:nn}=Sn;function c0({duration:e=".2s",delay:t=".1s"}={}){return[I("&.fade-in-width-expand-transition-leave-from, &.fade-in-width-expand-transition-enter-to",{opacity:1}),I("&.fade-in-width-expand-transition-leave-to, &.fade-in-width-expand-transition-enter-from",`
|
|
708
|
+
`)])])]),c0=o.defineComponent({name:"InternalSelection",props:Object.assign(Object.assign({},Ce.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}=Ye(e),r=tn("InternalSelection",n,t),i=o.ref(null),a=o.ref(null),l=o.ref(null),s=o.ref(null),c=o.ref(null),d=o.ref(null),u=o.ref(null),f=o.ref(null),p=o.ref(null),b=o.ref(null),h=o.ref(!1),x=o.ref(!1),v=o.ref(!1),g=Ce("InternalSelection","-internal-selection",s0,nc,e,o.toRef(e,"clsPrefix")),k=o.computed(()=>e.clearable&&!e.disabled&&(v.value||e.active)),z=o.computed(()=>e.selectedOption?e.renderTag?e.renderTag({option:e.selectedOption,handleClose:()=>{}}):e.renderLabel?e.renderLabel(e.selectedOption,!0):bn(e.selectedOption[e.labelField],e.selectedOption,!0):e.placeholder),$=o.computed(()=>{const C=e.selectedOption;if(C)return C[e.labelField]}),T=o.computed(()=>e.multiple?!!(Array.isArray(e.selectedOptions)&&e.selectedOptions.length):e.selectedOption!==null);function O(){var C;const{value:B}=i;if(B){const{value:re}=a;re&&(re.style.width=`${B.offsetWidth}px`,e.maxTagCount!=="responsive"&&((C=p.value)===null||C===void 0||C.sync({showAllItemsBeforeCalculate:!1})))}}function m(){const{value:C}=b;C&&(C.style.display="none")}function S(){const{value:C}=b;C&&(C.style.display="inline-block")}o.watch(o.toRef(e,"active"),C=>{C||m()}),o.watch(o.toRef(e,"pattern"),()=>{e.multiple&&o.nextTick(O)});function M(C){const{onFocus:B}=e;B&&B(C)}function N(C){const{onBlur:B}=e;B&&B(C)}function A(C){const{onDeleteOption:B}=e;B&&B(C)}function L(C){const{onClear:B}=e;B&&B(C)}function U(C){const{onPatternInput:B}=e;B&&B(C)}function J(C){var B;(!C.relatedTarget||!(!((B=l.value)===null||B===void 0)&&B.contains(C.relatedTarget)))&&M(C)}function j(C){var B;!((B=l.value)===null||B===void 0)&&B.contains(C.relatedTarget)||N(C)}function Q(C){L(C)}function Y(){v.value=!0}function ie(){v.value=!1}function me(C){!e.active||!e.filterable||C.target!==a.value&&C.preventDefault()}function ae(C){A(C)}const he=o.ref(!1);function G(C){if(C.key==="Backspace"&&!he.value&&!e.pattern.length){const{selectedOptions:B}=e;B!=null&&B.length&&ae(B[B.length-1])}}let te=null;function xe(C){const{value:B}=i;if(B){const re=C.target.value;B.textContent=re,O()}e.ignoreComposition&&he.value?te=C:U(C)}function Se(){he.value=!0}function oe(){he.value=!1,e.ignoreComposition&&U(te),te=null}function Te(C){var B;x.value=!0,(B=e.onPatternFocus)===null||B===void 0||B.call(e,C)}function $e(C){var B;x.value=!1,(B=e.onPatternBlur)===null||B===void 0||B.call(e,C)}function se(){var C,B;if(e.filterable)x.value=!1,(C=d.value)===null||C===void 0||C.blur(),(B=a.value)===null||B===void 0||B.blur();else if(e.multiple){const{value:re}=s;re==null||re.blur()}else{const{value:re}=c;re==null||re.blur()}}function Ae(){var C,B,re;e.filterable?(x.value=!1,(C=d.value)===null||C===void 0||C.focus()):e.multiple?(B=s.value)===null||B===void 0||B.focus():(re=c.value)===null||re===void 0||re.focus()}function Be(){const{value:C}=a;C&&(S(),C.focus())}function We(){const{value:C}=a;C&&C.blur()}function Ie(C){const{value:B}=u;B&&B.setTextContent(`+${C}`)}function Le(){const{value:C}=f;return C}function Ke(){return a.value}let Re=null;function X(){Re!==null&&window.clearTimeout(Re)}function F(){e.active||(X(),Re=window.setTimeout(()=>{T.value&&(h.value=!0)},100))}function ne(){X()}function _(C){C||(X(),h.value=!1)}o.watch(T,C=>{C||(h.value=!1)}),o.onMounted(()=>{o.watchEffect(()=>{const C=d.value;C&&(e.disabled?C.removeAttribute("tabindex"):C.tabIndex=x.value?-1:0)})}),_l(l,e.onResize);const{inlineThemeDisabled:D}=e,K=o.computed(()=>{const{size:C}=e,{common:{cubicBezierEaseInOut:B},self:{borderRadius:re,color:we,placeholderColor:Pe,textColor:Ue,paddingSingle:De,paddingMultiple:Me,caretColor:Ze,colorDisabled:ft,textColorDisabled:tt,placeholderColorDisabled:st,colorActive:y,boxShadowFocus:H,boxShadowActive:Z,boxShadowHover:le,border:ce,borderFocus:ue,borderHover:fe,borderActive:ge,arrowColor:Ee,arrowColorDisabled:mt,loadingColor:on,colorActiveWarning:_n,boxShadowFocusWarning:an,boxShadowActiveWarning:ln,boxShadowHoverWarning:Pr,borderWarning:Er,borderFocusWarning:Zn,borderHoverWarning:sn,borderActiveWarning:E,colorActiveError:q,boxShadowFocusError:be,boxShadowActiveError:Oe,boxShadowHoverError:He,borderError:_e,borderFocusError:Vt,borderHoverError:jt,borderActiveError:Wt,clearColor:Mn,clearColorHover:On,clearColorPressed:zr,clearSize:xa,arrowSize:ya,[ee("height",C)]:wa,[ee("fontSize",C)]:Ca}}=g.value,Jn=ht(De),Qn=ht(Me);return{"--n-bezier":B,"--n-border":ce,"--n-border-active":ge,"--n-border-focus":ue,"--n-border-hover":fe,"--n-border-radius":re,"--n-box-shadow-active":Z,"--n-box-shadow-focus":H,"--n-box-shadow-hover":le,"--n-caret-color":Ze,"--n-color":we,"--n-color-active":y,"--n-color-disabled":ft,"--n-font-size":Ca,"--n-height":wa,"--n-padding-single-top":Jn.top,"--n-padding-multiple-top":Qn.top,"--n-padding-single-right":Jn.right,"--n-padding-multiple-right":Qn.right,"--n-padding-single-left":Jn.left,"--n-padding-multiple-left":Qn.left,"--n-padding-single-bottom":Jn.bottom,"--n-padding-multiple-bottom":Qn.bottom,"--n-placeholder-color":Pe,"--n-placeholder-color-disabled":st,"--n-text-color":Ue,"--n-text-color-disabled":tt,"--n-arrow-color":Ee,"--n-arrow-color-disabled":mt,"--n-loading-color":on,"--n-color-active-warning":_n,"--n-box-shadow-focus-warning":an,"--n-box-shadow-active-warning":ln,"--n-box-shadow-hover-warning":Pr,"--n-border-warning":Er,"--n-border-focus-warning":Zn,"--n-border-hover-warning":sn,"--n-border-active-warning":E,"--n-color-active-error":q,"--n-box-shadow-focus-error":be,"--n-box-shadow-active-error":Oe,"--n-box-shadow-hover-error":He,"--n-border-error":_e,"--n-border-focus-error":Vt,"--n-border-hover-error":jt,"--n-border-active-error":Wt,"--n-clear-size":xa,"--n-clear-color":Mn,"--n-clear-color-hover":On,"--n-clear-color-pressed":zr,"--n-arrow-size":ya}}),R=D?rt("internal-selection",o.computed(()=>e.size[0]),K,e):void 0;return{mergedTheme:g,mergedClearable:k,mergedClsPrefix:t,rtlEnabled:r,patternInputFocused:x,filterablePlaceholder:z,label:$,selected:T,showTagsPanel:h,isComposing:he,counterRef:u,counterWrapperRef:f,patternInputMirrorRef:i,patternInputRef:a,selfRef:l,multipleElRef:s,singleElRef:c,patternInputWrapperRef:d,overflowRef:p,inputTagElRef:b,handleMouseDown:me,handleFocusin:J,handleClear:Q,handleMouseEnter:Y,handleMouseLeave:ie,handleDeleteOption:ae,handlePatternKeyDown:G,handlePatternInputInput:xe,handlePatternInputBlur:$e,handlePatternInputFocus:Te,handleMouseEnterCounter:F,handleMouseLeaveCounter:ne,handleFocusout:j,handleCompositionEnd:oe,handleCompositionStart:Se,onPopoverUpdateShow:_,focus:Ae,focusInput:Be,blur:se,blurInput:We,updateCounter:Ie,getCounter:Le,getTail:Ke,renderLabel:e.renderLabel,cssVars:D?void 0:K,themeClass:R==null?void 0:R.themeClass,onRender:R==null?void 0:R.onRender}},render(){const{status:e,multiple:t,size:n,disabled:r,filterable:i,maxTagCount:a,bordered:l,clsPrefix:s,ellipsisTagPopoverProps:c,onRender:d,renderTag:u,renderLabel:f}=this;d==null||d();const p=a==="responsive",b=typeof a=="number",h=p||b,x=o.h(Xo,null,{default:()=>o.h(tc,{clsPrefix:s,loading:this.loading,showArrow:this.showArrow,showClear:this.mergedClearable&&this.selected,onClear:this.handleClear},{default:()=>{var g,k;return(k=(g=this.$slots).arrow)===null||k===void 0?void 0:k.call(g)}})});let v;if(t){const{labelField:g}=this,k=U=>o.h("div",{class:`${s}-base-selection-tag-wrapper`,key:U.value},u?u({option:U,handleClose:()=>{this.handleDeleteOption(U)}}):o.h(Ui,{size:n,closable:!U.disabled,disabled:r,onClose:()=>{this.handleDeleteOption(U)},internalCloseIsButtonTag:!1,internalCloseFocusable:!1},{default:()=>f?f(U,!0):bn(U[g],U,!0)})),z=()=>(b?this.selectedOptions.slice(0,a):this.selectedOptions).map(k),$=i?o.h("div",{class:`${s}-base-selection-input-tag`,ref:"inputTagElRef",key:"__input-tag__"},o.h("input",Object.assign({},this.inputProps,{ref:"patternInputRef",tabindex:-1,disabled:r,value:this.pattern,autofocus:this.autofocus,class:`${s}-base-selection-input-tag__input`,onBlur:this.handlePatternInputBlur,onFocus:this.handlePatternInputFocus,onKeydown:this.handlePatternKeyDown,onInput:this.handlePatternInputInput,onCompositionstart:this.handleCompositionStart,onCompositionend:this.handleCompositionEnd})),o.h("span",{ref:"patternInputMirrorRef",class:`${s}-base-selection-input-tag__mirror`},this.pattern)):null,T=p?()=>o.h("div",{class:`${s}-base-selection-tag-wrapper`,ref:"counterWrapperRef"},o.h(Ui,{size:n,ref:"counterRef",onMouseenter:this.handleMouseEnterCounter,onMouseleave:this.handleMouseLeaveCounter,disabled:r})):void 0;let O;if(b){const U=this.selectedOptions.length-a;U>0&&(O=o.h("div",{class:`${s}-base-selection-tag-wrapper`,key:"__counter__"},o.h(Ui,{size:n,ref:"counterRef",onMouseenter:this.handleMouseEnterCounter,disabled:r},{default:()=>`+${U}`})))}const m=p?i?o.h(Rl,{ref:"overflowRef",updateCounter:this.updateCounter,getCounter:this.getCounter,getTail:this.getTail,style:{width:"100%",display:"flex",overflow:"hidden"}},{default:z,counter:T,tail:()=>$}):o.h(Rl,{ref:"overflowRef",updateCounter:this.updateCounter,getCounter:this.getCounter,style:{width:"100%",display:"flex",overflow:"hidden"}},{default:z,counter:T}):b&&O?z().concat(O):z(),S=h?()=>o.h("div",{class:`${s}-base-selection-popover`},p?z():this.selectedOptions.map(k)):void 0,M=h?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,A=(this.selected?!1:this.active?!this.pattern&&!this.isComposing:!0)?o.h("div",{class:`${s}-base-selection-placeholder ${s}-base-selection-overlay`},o.h("div",{class:`${s}-base-selection-placeholder__inner`},this.placeholder)):null,L=i?o.h("div",{ref:"patternInputWrapperRef",class:`${s}-base-selection-tags`},m,p?null:$,x):o.h("div",{ref:"multipleElRef",class:`${s}-base-selection-tags`,tabindex:r?void 0:0},m,x);v=o.h(o.Fragment,null,h?o.h(ec,Object.assign({},M,{scrollable:!0,style:"max-height: calc(var(--v-target-height) * 6.6);"}),{trigger:()=>L,default:S}):L,A)}else if(i){const g=this.pattern||this.isComposing,k=this.active?!g:!this.selected,z=this.active?!1:this.selected;v=o.h("div",{ref:"patternInputWrapperRef",class:`${s}-base-selection-label`,title:this.patternInputFocused?void 0:Aa(this.label)},o.h("input",Object.assign({},this.inputProps,{ref:"patternInputRef",class:`${s}-base-selection-input`,value:this.active?this.pattern:"",placeholder:"",readonly:r,disabled:r,tabindex:-1,autofocus:this.autofocus,onFocus:this.handlePatternInputFocus,onBlur:this.handlePatternInputBlur,onInput:this.handlePatternInputInput,onCompositionstart:this.handleCompositionStart,onCompositionend:this.handleCompositionEnd})),z?o.h("div",{class:`${s}-base-selection-label__render-label ${s}-base-selection-overlay`,key:"input"},o.h("div",{class:`${s}-base-selection-overlay__wrapper`},u?u({option:this.selectedOption,handleClose:()=>{}}):f?f(this.selectedOption,!0):bn(this.label,this.selectedOption,!0))):null,k?o.h("div",{class:`${s}-base-selection-placeholder ${s}-base-selection-overlay`,key:"placeholder"},o.h("div",{class:`${s}-base-selection-overlay__wrapper`},this.filterablePlaceholder)):null,x)}else v=o.h("div",{ref:"singleElRef",class:`${s}-base-selection-label`,tabindex:this.disabled?void 0:0},this.label!==void 0?o.h("div",{class:`${s}-base-selection-input`,title:Aa(this.label),key:"input"},o.h("div",{class:`${s}-base-selection-input__content`},u?u({option:this.selectedOption,handleClose:()=>{}}):f?f(this.selectedOption,!0):bn(this.label,this.selectedOption,!0))):o.h("div",{class:`${s}-base-selection-placeholder ${s}-base-selection-overlay`,key:"placeholder"},o.h("div",{class:`${s}-base-selection-placeholder__inner`},this.placeholder)),x);return o.h("div",{ref:"selfRef",class:[`${s}-base-selection`,this.rtlEnabled&&`${s}-base-selection--rtl`,this.themeClass,e&&`${s}-base-selection--${e}-status`,{[`${s}-base-selection--active`]:this.active,[`${s}-base-selection--selected`]:this.selected||this.active&&this.pattern,[`${s}-base-selection--disabled`]:this.disabled,[`${s}-base-selection--multiple`]:this.multiple,[`${s}-base-selection--focus`]:this.focused}],style:this.cssVars,onClick:this.onClick,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onKeydown:this.onKeydown,onFocusin:this.handleFocusin,onFocusout:this.handleFocusout,onMousedown:this.handleMouseDown},v,l?o.h("div",{class:`${s}-base-selection__border`}):null,l?o.h("div",{class:`${s}-base-selection__state-border`}):null)}}),{cubicBezierEaseInOut:nn}=Sn;function d0({duration:e=".2s",delay:t=".1s"}={}){return[I("&.fade-in-width-expand-transition-leave-from, &.fade-in-width-expand-transition-enter-to",{opacity:1}),I("&.fade-in-width-expand-transition-leave-to, &.fade-in-width-expand-transition-enter-from",`
|
|
709
709
|
opacity: 0!important;
|
|
710
710
|
margin-left: 0!important;
|
|
711
711
|
margin-right: 0!important;
|
|
@@ -723,13 +723,13 @@ ${t}
|
|
|
723
723
|
max-width ${e} ${nn},
|
|
724
724
|
margin-left ${e} ${nn},
|
|
725
725
|
margin-right ${e} ${nn};
|
|
726
|
-
`)]}const
|
|
726
|
+
`)]}const u0={iconMargin:"11px 8px 0 12px",iconMarginRtl:"11px 12px 0 8px",iconSize:"24px",closeIconSize:"16px",closeSize:"20px",closeMargin:"13px 14px 0 0",closeMarginRtl:"13px 0 0 14px",padding:"13px"};function f0(e){const{lineHeight:t,borderRadius:n,fontWeightStrong:r,baseColor:i,dividerColor:a,actionColor:l,textColor1:s,textColor2:c,closeColorHover:d,closeColorPressed:u,closeIconColor:f,closeIconColorHover:p,closeIconColorPressed:b,infoColor:h,successColor:x,warningColor:v,errorColor:g,fontSize:k}=e;return Object.assign(Object.assign({},u0),{fontSize:k,lineHeight:t,titleFontWeight:r,borderRadius:n,border:`1px solid ${a}`,color:l,titleTextColor:s,iconColor:c,contentTextColor:c,closeBorderRadius:n,closeColorHover:d,closeColorPressed:u,closeIconColor:f,closeIconColorHover:p,closeIconColorPressed:b,borderInfo:`1px solid ${gt(i,ve(h,{alpha:.25}))}`,colorInfo:gt(i,ve(h,{alpha:.08})),titleTextColorInfo:s,iconColorInfo:h,contentTextColorInfo:c,closeColorHoverInfo:d,closeColorPressedInfo:u,closeIconColorInfo:f,closeIconColorHoverInfo:p,closeIconColorPressedInfo:b,borderSuccess:`1px solid ${gt(i,ve(x,{alpha:.25}))}`,colorSuccess:gt(i,ve(x,{alpha:.08})),titleTextColorSuccess:s,iconColorSuccess:x,contentTextColorSuccess:c,closeColorHoverSuccess:d,closeColorPressedSuccess:u,closeIconColorSuccess:f,closeIconColorHoverSuccess:p,closeIconColorPressedSuccess:b,borderWarning:`1px solid ${gt(i,ve(v,{alpha:.33}))}`,colorWarning:gt(i,ve(v,{alpha:.08})),titleTextColorWarning:s,iconColorWarning:v,contentTextColorWarning:c,closeColorHoverWarning:d,closeColorPressedWarning:u,closeIconColorWarning:f,closeIconColorHoverWarning:p,closeIconColorPressedWarning:b,borderError:`1px solid ${gt(i,ve(g,{alpha:.25}))}`,colorError:gt(i,ve(g,{alpha:.08})),titleTextColorError:s,iconColorError:g,contentTextColorError:c,closeColorHoverError:d,closeColorPressedError:u,closeIconColorError:f,closeIconColorHoverError:p,closeIconColorPressedError:b})}const h0={name:"Alert",common:Qe,self:f0},{cubicBezierEaseInOut:At,cubicBezierEaseOut:p0,cubicBezierEaseIn:b0}=Sn;function m0({overflow:e="hidden",duration:t=".3s",originalTransition:n="",leavingDelay:r="0s",foldPadding:i=!1,enterToProps:a=void 0,leaveToProps:l=void 0,reverse:s=!1}={}){const c=s?"leave":"enter",d=s?"enter":"leave";return[I(`&.fade-in-height-expand-transition-${d}-from,
|
|
727
727
|
&.fade-in-height-expand-transition-${c}-to`,Object.assign(Object.assign({},a),{opacity:1})),I(`&.fade-in-height-expand-transition-${d}-to,
|
|
728
728
|
&.fade-in-height-expand-transition-${c}-from`,Object.assign(Object.assign({},l),{opacity:0,marginTop:"0 !important",marginBottom:"0 !important",paddingTop:i?"0 !important":void 0,paddingBottom:i?"0 !important":void 0})),I(`&.fade-in-height-expand-transition-${d}-active`,`
|
|
729
729
|
overflow: ${e};
|
|
730
730
|
transition:
|
|
731
731
|
max-height ${t} ${At} ${r},
|
|
732
|
-
opacity ${t} ${
|
|
732
|
+
opacity ${t} ${p0} ${r},
|
|
733
733
|
margin-top ${t} ${At} ${r},
|
|
734
734
|
margin-bottom ${t} ${At} ${r},
|
|
735
735
|
padding-top ${t} ${At} ${r},
|
|
@@ -739,13 +739,13 @@ ${t}
|
|
|
739
739
|
overflow: ${e};
|
|
740
740
|
transition:
|
|
741
741
|
max-height ${t} ${At},
|
|
742
|
-
opacity ${t} ${
|
|
742
|
+
opacity ${t} ${b0},
|
|
743
743
|
margin-top ${t} ${At},
|
|
744
744
|
margin-bottom ${t} ${At},
|
|
745
745
|
padding-top ${t} ${At},
|
|
746
746
|
padding-bottom ${t} ${At}
|
|
747
747
|
${n?`,${n}`:""}
|
|
748
|
-
`)]}const
|
|
748
|
+
`)]}const g0=w("alert",`
|
|
749
749
|
line-height: var(--n-line-height);
|
|
750
750
|
border-radius: var(--n-border-radius);
|
|
751
751
|
position: relative;
|
|
@@ -765,7 +765,7 @@ ${t}
|
|
|
765
765
|
pointer-events: none;
|
|
766
766
|
`),W("closable",[w("alert-body",[P("title",`
|
|
767
767
|
padding-right: 24px;
|
|
768
|
-
`)])]),P("icon",{color:"var(--n-icon-color)"}),w("alert-body",{padding:"var(--n-padding)"},[P("title",{color:"var(--n-title-text-color)"}),P("content",{color:"var(--n-content-text-color)"})]),
|
|
768
|
+
`)])]),P("icon",{color:"var(--n-icon-color)"}),w("alert-body",{padding:"var(--n-padding)"},[P("title",{color:"var(--n-title-text-color)"}),P("content",{color:"var(--n-content-text-color)"})]),m0({originalTransition:"transform .3s var(--n-bezier)",enterToProps:{transform:"scale(1)"},leaveToProps:{transform:"scale(0.9)"}}),P("icon",`
|
|
769
769
|
position: absolute;
|
|
770
770
|
left: 0;
|
|
771
771
|
top: 0;
|
|
@@ -792,7 +792,7 @@ ${t}
|
|
|
792
792
|
font-size: 16px;
|
|
793
793
|
line-height: 19px;
|
|
794
794
|
font-weight: var(--n-title-font-weight);
|
|
795
|
-
`,[I("& +",[P("content",{marginTop:"9px"})])]),P("content",{transition:"color .3s var(--n-bezier)",fontSize:"var(--n-font-size)"})]),P("icon",{transition:"color .3s var(--n-bezier)"})]),
|
|
795
|
+
`,[I("& +",[P("content",{marginTop:"9px"})])]),P("content",{transition:"color .3s var(--n-bezier)",fontSize:"var(--n-font-size)"})]),P("icon",{transition:"color .3s var(--n-bezier)"})]),v0=Object.assign(Object.assign({},Ce.props),{title:String,showIcon:{type:Boolean,default:!0},type:{type:String,default:"default"},bordered:{type:Boolean,default:!0},closable:Boolean,onClose:Function,onAfterLeave:Function,onAfterHide:Function}),rc=o.defineComponent({name:"Alert",inheritAttrs:!1,props:v0,setup(e){process.env.NODE_ENV!=="production"&&o.watchEffect(()=>{e.onAfterHide!==void 0&&ot("alert","`on-after-hide` is deprecated, please use `on-after-leave` instead.")});const{mergedClsPrefixRef:t,mergedBorderedRef:n,inlineThemeDisabled:r,mergedRtlRef:i}=Ye(e),a=Ce("Alert","-alert",g0,h0,e,t),l=tn("Alert",i,t),s=o.computed(()=>{const{common:{cubicBezierEaseInOut:b},self:h}=a.value,{fontSize:x,borderRadius:v,titleFontWeight:g,lineHeight:k,iconSize:z,iconMargin:$,iconMarginRtl:T,closeIconSize:O,closeBorderRadius:m,closeSize:S,closeMargin:M,closeMarginRtl:N,padding:A}=h,{type:L}=e,{left:U,right:J}=ht($);return{"--n-bezier":b,"--n-color":h[ee("color",L)],"--n-close-icon-size":O,"--n-close-border-radius":m,"--n-close-color-hover":h[ee("closeColorHover",L)],"--n-close-color-pressed":h[ee("closeColorPressed",L)],"--n-close-icon-color":h[ee("closeIconColor",L)],"--n-close-icon-color-hover":h[ee("closeIconColorHover",L)],"--n-close-icon-color-pressed":h[ee("closeIconColorPressed",L)],"--n-icon-color":h[ee("iconColor",L)],"--n-border":h[ee("border",L)],"--n-title-text-color":h[ee("titleTextColor",L)],"--n-content-text-color":h[ee("contentTextColor",L)],"--n-line-height":k,"--n-border-radius":v,"--n-font-size":x,"--n-title-font-weight":g,"--n-icon-size":z,"--n-icon-margin":$,"--n-icon-margin-rtl":T,"--n-close-size":S,"--n-close-margin":M,"--n-close-margin-rtl":N,"--n-padding":A,"--n-icon-margin-left":U,"--n-icon-margin-right":J}}),c=r?rt("alert",o.computed(()=>e.type[0]),s,e):void 0,d=o.ref(!0),u=()=>{const{onAfterLeave:b,onAfterHide:h}=e;b&&b(),h&&h()};return{rtlEnabled:l,mergedClsPrefix:t,mergedBordered:n,visible:d,handleCloseClick:()=>{var b;Promise.resolve((b=e.onClose)===null||b===void 0?void 0:b.call(e)).then(h=>{h!==!1&&(d.value=!1)})},handleAfterLeave:()=>{u()},mergedTheme:a,cssVars:r?void 0:s,themeClass:c==null?void 0:c.themeClass,onRender:c==null?void 0:c.onRender}},render(){var e;return(e=this.onRender)===null||e===void 0||e.call(this),o.h(Fs,{onAfterLeave:this.handleAfterLeave},{default:()=>{const{mergedClsPrefix:t,$slots:n}=this,r={class:[`${t}-alert`,this.themeClass,this.closable&&`${t}-alert--closable`,this.showIcon&&`${t}-alert--show-icon`,!this.title&&this.closable&&`${t}-alert--right-adjust`,this.rtlEnabled&&`${t}-alert--rtl`],style:this.cssVars,role:"alert"};return this.visible?o.h("div",Object.assign({},o.mergeProps(this.$attrs,r)),this.closable&&o.h(Ai,{clsPrefix:t,class:`${t}-alert__close`,onClick:this.handleCloseClick}),this.bordered&&o.h("div",{class:`${t}-alert__border`}),this.showIcon&&o.h("div",{class:`${t}-alert__icon`,"aria-hidden":"true"},Ct(n.icon,()=>[o.h(yt,{clsPrefix:t},{default:()=>{switch(this.type){case"success":return o.h(Hg,null);case"info":return o.h(Ng,null);case"warning":return o.h(Vg,null);case"error":return o.h(Dg,null);default:return null}}})])),o.h("div",{class:[`${t}-alert-body`,this.mergedBordered&&`${t}-alert-body--bordered`]},Fe(n.header,i=>{const a=i||this.title;return a?o.h("div",{class:`${t}-alert-body__title`},a):null}),n.default&&o.h("div",{class:`${t}-alert-body__content`},n))):null}})}});function bo(e){return e.type==="group"}function oc(e){return e.type==="ignored"}function qi(e,t){try{return!!(1+t.toString().toLowerCase().indexOf(e.trim().toLowerCase()))}catch{return!1}}function x0(e,t){return{getIsGroup:bo,getIgnored:oc,getKey(r){return bo(r)?r.name||r.key||"key-required":r[e]},getChildren(r){return r[t]}}}function y0(e,t,n,r){if(!t)return e;function i(a){if(!Array.isArray(a))return[];const l=[];for(const s of a)if(bo(s)){const c=i(s[r]);c.length&&l.push(Object.assign({},s,{[r]:c}))}else{if(oc(s))continue;t(n,s)&&l.push(s)}return l}return i(e)}function w0(e,t,n){const r=new Map;return e.forEach(i=>{bo(i)?i[n].forEach(a=>{r.set(a[t],a)}):r.set(i[t],i)}),r}const C0=Lr&&"chrome"in window;Lr&&navigator.userAgent.includes("Firefox");const ic=Lr&&navigator.userAgent.includes("Safari")&&!C0,S0={paddingTiny:"0 8px",paddingSmall:"0 10px",paddingMedium:"0 12px",paddingLarge:"0 14px",clearSize:"16px"};function $0(e){const{textColor2:t,textColor3:n,textColorDisabled:r,primaryColor:i,primaryColorHover:a,inputColor:l,inputColorDisabled:s,borderColor:c,warningColor:d,warningColorHover:u,errorColor:f,errorColorHover:p,borderRadius:b,lineHeight:h,fontSizeTiny:x,fontSizeSmall:v,fontSizeMedium:g,fontSizeLarge:k,heightTiny:z,heightSmall:$,heightMedium:T,heightLarge:O,actionColor:m,clearColor:S,clearColorHover:M,clearColorPressed:N,placeholderColor:A,placeholderColorDisabled:L,iconColor:U,iconColorDisabled:J,iconColorHover:j,iconColorPressed:Q}=e;return Object.assign(Object.assign({},S0),{countTextColorDisabled:r,countTextColor:n,heightTiny:z,heightSmall:$,heightMedium:T,heightLarge:O,fontSizeTiny:x,fontSizeSmall:v,fontSizeMedium:g,fontSizeLarge:k,lineHeight:h,lineHeightTextarea:h,borderRadius:b,iconSize:"16px",groupLabelColor:m,groupLabelTextColor:t,textColor:t,textColorDisabled:r,textDecorationColor:t,caretColor:i,placeholderColor:A,placeholderColorDisabled:L,color:l,colorDisabled:s,colorFocus:l,groupLabelBorder:`1px solid ${c}`,border:`1px solid ${c}`,borderHover:`1px solid ${a}`,borderDisabled:`1px solid ${c}`,borderFocus:`1px solid ${a}`,boxShadowFocus:`0 0 0 2px ${ve(i,{alpha:.2})}`,loadingColor:i,loadingColorWarning:d,borderWarning:`1px solid ${d}`,borderHoverWarning:`1px solid ${u}`,colorFocusWarning:l,borderFocusWarning:`1px solid ${u}`,boxShadowFocusWarning:`0 0 0 2px ${ve(d,{alpha:.2})}`,caretColorWarning:d,loadingColorError:f,borderError:`1px solid ${f}`,borderHoverError:`1px solid ${p}`,colorFocusError:l,borderFocusError:`1px solid ${p}`,boxShadowFocusError:`0 0 0 2px ${ve(f,{alpha:.2})}`,caretColorError:f,clearColor:S,clearColorHover:M,clearColorPressed:N,iconColor:U,iconColorDisabled:J,iconColorHover:j,iconColorPressed:Q,suffixTextColor:t})}const Ki={name:"Input",common:Qe,self:$0},ac="n-input";function T0(e){let t=0;for(const n of e)t++;return t}function mo(e){return e===""||e==null}function k0(e){const t=o.ref(null);function n(){const{value:a}=e;if(!(a!=null&&a.focus)){i();return}const{selectionStart:l,selectionEnd:s,value:c}=a;if(l==null||s==null){i();return}t.value={start:l,end:s,beforeText:c.slice(0,l),afterText:c.slice(s)}}function r(){var a;const{value:l}=t,{value:s}=e;if(!l||!s)return;const{value:c}=s,{start:d,beforeText:u,afterText:f}=l;let p=c.length;if(c.endsWith(f))p=c.length-f.length;else if(c.startsWith(u))p=u.length;else{const b=u[d-1],h=c.indexOf(b,d-1);h!==-1&&(p=h+1)}(a=s.setSelectionRange)===null||a===void 0||a.call(s,p,p)}function i(){t.value=null}return o.watch(e,i),{recordCursor:n,restoreCursor:r}}const lc=o.defineComponent({name:"InputWordCount",setup(e,{slots:t}){const{mergedValueRef:n,maxlengthRef:r,mergedClsPrefixRef:i,countGraphemesRef:a}=o.inject(ac),l=o.computed(()=>{const{value:s}=n;return s===null||Array.isArray(s)?0:(a.value||T0)(s)});return()=>{const{value:s}=r,{value:c}=n;return o.h("span",{class:`${i.value}-input-word-count`},Ad(t.default,{value:c===null||Array.isArray(c)?"":c},()=>[s===void 0?l.value:`${l.value} / ${s}`]))}}}),R0=w("input",`
|
|
796
796
|
max-width: 100%;
|
|
797
797
|
cursor: text;
|
|
798
798
|
line-height: 1.5;
|
|
@@ -1022,10 +1022,10 @@ ${t}
|
|
|
1022
1022
|
`,[P("state-border",`
|
|
1023
1023
|
box-shadow: var(--n-box-shadow-focus-${e});
|
|
1024
1024
|
border: var(--n-border-focus-${e});
|
|
1025
|
-
`)])])]))]),
|
|
1025
|
+
`)])])]))]),P0=w("input",[W("disabled",[P("input-el, textarea-el",`
|
|
1026
1026
|
-webkit-text-fill-color: var(--n-text-color-disabled);
|
|
1027
|
-
`)])]),
|
|
1028
|
-
`)}else{const{value:He}=d;He&&(E?He.textContent=E:He.innerHTML=" ")}}function mt(){he()}const on=o.ref({top:"0"});function _n(E){var q;const{scrollTop:be}=E.target;on.value.top=`${-be}px`,(q=h.value)===null||q===void 0||q.syncUnifiedContainer()}let an=null;o.watchEffect(()=>{const{autosize:E,type:q}=e;E&&q==="textarea"?an=o.watch(k,be=>{!Array.isArray(be)&&be!==A&&Ee(be)}):an==null||an()});let ln=null;o.watchEffect(()=>{e.type==="textarea"?ln=o.watch(k,E=>{var q;!Array.isArray(E)&&E!==A&&((q=h.value)===null||q===void 0||q.syncUnifiedContainer())}):ln==null||ln()}),o.provide(ic,{mergedValueRef:k,maxlengthRef:G,mergedClsPrefixRef:t,countGraphemesRef:o.toRef(e,"countGraphemes")});const Pr={wrapperElRef:l,inputElRef:u,textareaElRef:s,isCompositing:M,clear:Pe,focus:Z,blur:le,select:ce,deactivate:fe,activate:ue,scrollTo:ge},Er=tn("Input",i,t),Zn=o.computed(()=>{const{value:E}=$,{common:{cubicBezierEaseInOut:q},self:{color:be,borderRadius:Oe,textColor:He,caretColor:_e,caretColorError:Vt,caretColorWarning:jt,textDecorationColor:Wt,border:Mn,borderDisabled:On,borderHover:zr,borderFocus:xa,placeholderColor:ya,placeholderColorDisabled:wa,lineHeightTextarea:Ca,colorDisabled:Jn,colorFocus:Qn,textColorDisabled:P1,boxShadowFocus:E1,iconSize:z1,colorFocusWarning:B1,boxShadowFocusWarning:_1,borderWarning:M1,borderFocusWarning:O1,borderHoverWarning:A1,colorFocusError:I1,boxShadowFocusError:F1,borderError:D1,borderFocusError:N1,borderHoverError:L1,clearSize:H1,clearColor:V1,clearColorHover:j1,clearColorPressed:W1,iconColor:U1,iconColorDisabled:G1,suffixTextColor:q1,countTextColor:K1,countTextColorDisabled:X1,iconColorHover:Y1,iconColorPressed:Z1,loadingColor:J1,loadingColorError:Q1,loadingColorWarning:eC,[ee("padding",E)]:tC,[ee("fontSize",E)]:nC,[ee("height",E)]:rC}}=a.value,{left:oC,right:iC}=ht(tC);return{"--n-bezier":q,"--n-count-text-color":K1,"--n-count-text-color-disabled":X1,"--n-color":be,"--n-font-size":nC,"--n-border-radius":Oe,"--n-height":rC,"--n-padding-left":oC,"--n-padding-right":iC,"--n-text-color":He,"--n-caret-color":_e,"--n-text-decoration-color":Wt,"--n-border":Mn,"--n-border-disabled":On,"--n-border-hover":zr,"--n-border-focus":xa,"--n-placeholder-color":ya,"--n-placeholder-color-disabled":wa,"--n-icon-size":z1,"--n-line-height-textarea":Ca,"--n-color-disabled":Jn,"--n-color-focus":Qn,"--n-text-color-disabled":P1,"--n-box-shadow-focus":E1,"--n-loading-color":J1,"--n-caret-color-warning":jt,"--n-color-focus-warning":B1,"--n-box-shadow-focus-warning":_1,"--n-border-warning":M1,"--n-border-focus-warning":O1,"--n-border-hover-warning":A1,"--n-loading-color-warning":eC,"--n-caret-color-error":Vt,"--n-color-focus-error":I1,"--n-box-shadow-focus-error":F1,"--n-border-error":D1,"--n-border-focus-error":N1,"--n-border-hover-error":L1,"--n-loading-color-error":Q1,"--n-clear-color":V1,"--n-clear-size":H1,"--n-clear-color-hover":j1,"--n-clear-color-pressed":W1,"--n-icon-color":U1,"--n-icon-color-hover":Y1,"--n-icon-color-pressed":Z1,"--n-icon-color-disabled":G1,"--n-suffix-text-color":q1}}),sn=r?rt("input",o.computed(()=>{const{value:E}=$;return E[0]}),Zn,e):void 0;return Object.assign(Object.assign({},Pr),{wrapperElRef:l,inputElRef:u,inputMirrorElRef:d,inputEl2Ref:f,textareaElRef:s,textareaMirrorElRef:c,textareaScrollbarInstRef:h,rtlEnabled:Er,uncontrolledValue:v,mergedValue:k,passwordVisible:ie,mergedPlaceholder:L,showPlaceholder1:U,showPlaceholder2:J,mergedFocus:j,isComposing:M,activated:N,showClearButton:Q,mergedSize:$,mergedDisabled:T,textDecorationStyle:me,mergedClsPrefix:t,mergedBordered:n,mergedShowPasswordOn:Y,placeholderStyle:on,mergedStatus:O,textAreaScrollContainerWidth:ae,handleTextAreaScroll:_n,handleCompositionStart:Re,handleCompositionEnd:X,handleInput:F,handleInputBlur:_,handleInputFocus:D,handleWrapperBlur:K,handleWrapperFocus:R,handleMouseEnter:De,handleMouseLeave:Me,handleMouseDown:Ue,handleChange:B,handleClick:re,handleClear:we,handlePasswordToggleClick:Ze,handlePasswordToggleMousedown:ft,handleWrapperKeydown:st,handleWrapperKeyup:tt,handleTextAreaMirrorResize:mt,getTextareaScrollContainer:()=>s.value,mergedTheme:a,cssVars:r?void 0:Zn,themeClass:sn==null?void 0:sn.themeClass,onRender:sn==null?void 0:sn.onRender})},render(){var e,t;const{mergedClsPrefix:n,mergedStatus:r,themeClass:i,type:a,countGraphemes:l,onRender:s}=this,c=this.$slots;return s==null||s(),o.h("div",{ref:"wrapperElRef",class:[`${n}-input`,i,r&&`${n}-input--${r}-status`,{[`${n}-input--rtl`]:this.rtlEnabled,[`${n}-input--disabled`]:this.mergedDisabled,[`${n}-input--textarea`]:a==="textarea",[`${n}-input--resizable`]:this.resizable&&!this.autosize,[`${n}-input--autosize`]:this.autosize,[`${n}-input--round`]:this.round&&a!=="textarea",[`${n}-input--pair`]:this.pair,[`${n}-input--focus`]:this.mergedFocus,[`${n}-input--stateful`]:this.stateful}],style:this.cssVars,tabindex:!this.mergedDisabled&&this.passivelyActivated&&!this.activated?0:void 0,onFocus:this.handleWrapperFocus,onBlur:this.handleWrapperBlur,onClick:this.handleClick,onMousedown:this.handleMouseDown,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onCompositionstart:this.handleCompositionStart,onCompositionend:this.handleCompositionEnd,onKeyup:this.handleWrapperKeyup,onKeydown:this.handleWrapperKeydown},o.h("div",{class:`${n}-input-wrapper`},Fe(c.prefix,d=>d&&o.h("div",{class:`${n}-input__prefix`},d)),a==="textarea"?o.h(Vi,{ref:"textareaScrollbarInstRef",class:`${n}-input__textarea`,container:this.getTextareaScrollContainer,triggerDisplayManually:!0,useUnifiedContainer:!0,internalHoistYRail:!0},{default:()=>{var d,u;const{textAreaScrollContainerWidth:f}=this,p={width:this.autosize&&f&&`${f}px`};return o.h(o.Fragment,null,o.h("textarea",Object.assign({},this.inputProps,{ref:"textareaElRef",class:[`${n}-input__textarea-el`,(d=this.inputProps)===null||d===void 0?void 0:d.class],autofocus:this.autofocus,rows:Number(this.rows),placeholder:this.placeholder,value:this.mergedValue,disabled:this.mergedDisabled,maxlength:l?void 0:this.maxlength,minlength:l?void 0:this.minlength,readonly:this.readonly,tabindex:this.passivelyActivated&&!this.activated?-1:void 0,style:[this.textDecorationStyle[0],(u=this.inputProps)===null||u===void 0?void 0:u.style,p],onBlur:this.handleInputBlur,onFocus:b=>{this.handleInputFocus(b,2)},onInput:this.handleInput,onChange:this.handleChange,onScroll:this.handleTextAreaScroll})),this.showPlaceholder1?o.h("div",{class:`${n}-input__placeholder`,style:[this.placeholderStyle,p],key:"placeholder"},this.mergedPlaceholder[0]):null,this.autosize?o.h(Zt,{onResize:this.handleTextAreaMirrorResize},{default:()=>o.h("div",{ref:"textareaMirrorElRef",class:`${n}-input__textarea-mirror`,key:"mirror"})}):null)}}):o.h("div",{class:`${n}-input__input`},o.h("input",Object.assign({type:a==="password"&&this.mergedShowPasswordOn&&this.passwordVisible?"text":a},this.inputProps,{ref:"inputElRef",class:[`${n}-input__input-el`,(e=this.inputProps)===null||e===void 0?void 0:e.class],style:[this.textDecorationStyle[0],(t=this.inputProps)===null||t===void 0?void 0:t.style],tabindex:this.passivelyActivated&&!this.activated?-1:void 0,placeholder:this.mergedPlaceholder[0],disabled:this.mergedDisabled,maxlength:l?void 0:this.maxlength,minlength:l?void 0:this.minlength,value:Array.isArray(this.mergedValue)?this.mergedValue[0]:this.mergedValue,readonly:this.readonly,autofocus:this.autofocus,size:this.attrSize,onBlur:this.handleInputBlur,onFocus:d=>{this.handleInputFocus(d,0)},onInput:d=>{this.handleInput(d,0)},onChange:d=>{this.handleChange(d,0)}})),this.showPlaceholder1?o.h("div",{class:`${n}-input__placeholder`},o.h("span",null,this.mergedPlaceholder[0])):null,this.autosize?o.h("div",{class:`${n}-input__input-mirror`,key:"mirror",ref:"inputMirrorElRef"}," "):null),!this.pair&&Fe(c.suffix,d=>d||this.clearable||this.showCount||this.mergedShowPasswordOn||this.loading!==void 0?o.h("div",{class:`${n}-input__suffix`},[Fe(c["clear-icon-placeholder"],u=>(this.clearable||u)&&o.h(Gi,{clsPrefix:n,show:this.showClearButton,onClear:this.handleClear},{placeholder:()=>u,icon:()=>{var f,p;return(p=(f=this.$slots)["clear-icon"])===null||p===void 0?void 0:p.call(f)}})),this.internalLoadingBeforeSuffix?null:d,this.loading!==void 0?o.h(ec,{clsPrefix:n,loading:this.loading,showArrow:!1,showClear:!1,style:this.cssVars}):null,this.internalLoadingBeforeSuffix?d:null,this.showCount&&this.type!=="textarea"?o.h(ac,null,{default:u=>{var f;return(f=c.count)===null||f===void 0?void 0:f.call(c,u)}}):null,this.mergedShowPasswordOn&&this.type==="password"?o.h("div",{class:`${n}-input__eye`,onMousedown:this.handlePasswordToggleMousedown,onClick:this.handlePasswordToggleClick},this.passwordVisible?Ct(c["password-visible-icon"],()=>[o.h(yt,{clsPrefix:n},{default:()=>o.h(Og,null)})]):Ct(c["password-invisible-icon"],()=>[o.h(yt,{clsPrefix:n},{default:()=>o.h(Ag,null)})])):null]):null)),this.pair?o.h("span",{class:`${n}-input__separator`},Ct(c.separator,()=>[this.separator])):null,this.pair?o.h("div",{class:`${n}-input-wrapper`},o.h("div",{class:`${n}-input__input`},o.h("input",{ref:"inputEl2Ref",type:this.type,class:`${n}-input__input-el`,tabindex:this.passivelyActivated&&!this.activated?-1:void 0,placeholder:this.mergedPlaceholder[1],disabled:this.mergedDisabled,maxlength:l?void 0:this.maxlength,minlength:l?void 0:this.minlength,value:Array.isArray(this.mergedValue)?this.mergedValue[1]:void 0,readonly:this.readonly,style:this.textDecorationStyle[1],onBlur:this.handleInputBlur,onFocus:d=>{this.handleInputFocus(d,1)},onInput:d=>{this.handleInput(d,1)},onChange:d=>{this.handleChange(d,1)}}),this.showPlaceholder2?o.h("div",{class:`${n}-input__placeholder`},o.h("span",null,this.mergedPlaceholder[1])):null),Fe(c.suffix,d=>(this.clearable||d)&&o.h("div",{class:`${n}-input__suffix`},[this.clearable&&o.h(Gi,{clsPrefix:n,show:this.showClearButton,onClear:this.handleClear},{icon:()=>{var u;return(u=c["clear-icon"])===null||u===void 0?void 0:u.call(c)},placeholder:()=>{var u;return(u=c["clear-icon-placeholder"])===null||u===void 0?void 0:u.call(c)}}),d]))):null,this.mergedBordered?o.h("div",{class:`${n}-input__border`}):null,this.mergedBordered?o.h("div",{class:`${n}-input__state-border`}):null,this.showCount&&a==="textarea"?o.h(ac,null,{default:d=>{var u;const{renderCount:f}=this;return f?f(d):(u=c.count)===null||u===void 0?void 0:u.call(c,d)}}):null)}}),E0=w("input-group",`
|
|
1027
|
+
`)])]),E0=Object.assign(Object.assign({},Ce.props),{bordered:{type:Boolean,default:void 0},type:{type:String,default:"text"},placeholder:[Array,String],defaultValue:{type:[String,Array],default:null},value:[String,Array],disabled:{type:Boolean,default:void 0},size:String,rows:{type:[Number,String],default:3},round:Boolean,minlength:[String,Number],maxlength:[String,Number],clearable:Boolean,autosize:{type:[Boolean,Object],default:!1},pair:Boolean,separator:String,readonly:{type:[String,Boolean],default:!1},passivelyActivated:Boolean,showPasswordOn:String,stateful:{type:Boolean,default:!0},autofocus:Boolean,inputProps:Object,resizable:{type:Boolean,default:!0},showCount:Boolean,loading:{type:Boolean,default:void 0},allowInput:Function,renderCount:Function,onMousedown:Function,onKeydown:Function,onKeyup:[Function,Array],onInput:[Function,Array],onFocus:[Function,Array],onBlur:[Function,Array],onClick:[Function,Array],onChange:[Function,Array],onClear:[Function,Array],countGraphemes:Function,status:String,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],textDecoration:[String,Array],attrSize:{type:Number,default:20},onInputBlur:[Function,Array],onInputFocus:[Function,Array],onDeactivate:[Function,Array],onActivate:[Function,Array],onWrapperFocus:[Function,Array],onWrapperBlur:[Function,Array],internalDeactivateOnEnter:Boolean,internalForceFocus:Boolean,internalLoadingBeforeSuffix:{type:Boolean,default:!0},showPasswordToggle:Boolean}),yr=o.defineComponent({name:"Input",props:E0,setup(e){process.env.NODE_ENV!=="production"&&o.watchEffect(()=>{e.showPasswordToggle&&ot("input",'`show-password-toggle` is deprecated, please use `showPasswordOn="click"` instead')});const{mergedClsPrefixRef:t,mergedBorderedRef:n,inlineThemeDisabled:r,mergedRtlRef:i}=Ye(e),a=Ce("Input","-input",R0,Ki,e,t);ic&&Tn("-input-safari",P0,t);const l=o.ref(null),s=o.ref(null),c=o.ref(null),d=o.ref(null),u=o.ref(null),f=o.ref(null),p=o.ref(null),b=k0(p),h=o.ref(null),{localeRef:x}=vr("Input"),v=o.ref(e.defaultValue),g=o.toRef(e,"value"),k=St(g,v),z=vn(e),{mergedSizeRef:$,mergedDisabledRef:T,mergedStatusRef:O}=z,m=o.ref(!1),S=o.ref(!1),M=o.ref(!1),N=o.ref(!1);let A=null;const L=o.computed(()=>{const{placeholder:E,pair:q}=e;return q?Array.isArray(E)?E:E===void 0?["",""]:[E,E]:E===void 0?[x.value.placeholder]:[E]}),U=o.computed(()=>{const{value:E}=M,{value:q}=k,{value:be}=L;return!E&&(mo(q)||Array.isArray(q)&&mo(q[0]))&&be[0]}),J=o.computed(()=>{const{value:E}=M,{value:q}=k,{value:be}=L;return!E&&be[1]&&(mo(q)||Array.isArray(q)&&mo(q[1]))}),j=Je(()=>e.internalForceFocus||m.value),Q=Je(()=>{if(T.value||e.readonly||!e.clearable||!j.value&&!S.value)return!1;const{value:E}=k,{value:q}=j;return e.pair?!!(Array.isArray(E)&&(E[0]||E[1]))&&(S.value||q):!!E&&(S.value||q)}),Y=o.computed(()=>{const{showPasswordOn:E}=e;if(E)return E;if(e.showPasswordToggle)return"click"}),ie=o.ref(!1),me=o.computed(()=>{const{textDecoration:E}=e;return E?Array.isArray(E)?E.map(q=>({textDecoration:q})):[{textDecoration:E}]:["",""]}),ae=o.ref(void 0),he=()=>{var E,q;if(e.type==="textarea"){const{autosize:be}=e;if(be&&(ae.value=(q=(E=h.value)===null||E===void 0?void 0:E.$el)===null||q===void 0?void 0:q.offsetWidth),!s.value||typeof be=="boolean")return;const{paddingTop:Oe,paddingBottom:He,lineHeight:_e}=window.getComputedStyle(s.value),Vt=Number(Oe.slice(0,-2)),jt=Number(He.slice(0,-2)),Wt=Number(_e.slice(0,-2)),{value:Mn}=c;if(!Mn)return;if(be.minRows){const On=Math.max(be.minRows,1),zr=`${Vt+jt+Wt*On}px`;Mn.style.minHeight=zr}if(be.maxRows){const On=`${Vt+jt+Wt*be.maxRows}px`;Mn.style.maxHeight=On}}},G=o.computed(()=>{const{maxlength:E}=e;return E===void 0?void 0:Number(E)});o.onMounted(()=>{const{value:E}=k;Array.isArray(E)||Ee(E)});const te=o.getCurrentInstance().proxy;function xe(E,q){const{onUpdateValue:be,"onUpdate:value":Oe,onInput:He}=e,{nTriggerFormInput:_e}=z;be&&de(be,E,q),Oe&&de(Oe,E,q),He&&de(He,E,q),v.value=E,_e()}function Se(E,q){const{onChange:be}=e,{nTriggerFormChange:Oe}=z;be&&de(be,E,q),v.value=E,Oe()}function oe(E){const{onBlur:q}=e,{nTriggerFormBlur:be}=z;q&&de(q,E),be()}function Te(E){const{onFocus:q}=e,{nTriggerFormFocus:be}=z;q&&de(q,E),be()}function $e(E){const{onClear:q}=e;q&&de(q,E)}function se(E){const{onInputBlur:q}=e;q&&de(q,E)}function Ae(E){const{onInputFocus:q}=e;q&&de(q,E)}function Be(){const{onDeactivate:E}=e;E&&de(E)}function We(){const{onActivate:E}=e;E&&de(E)}function Ie(E){const{onClick:q}=e;q&&de(q,E)}function Le(E){const{onWrapperFocus:q}=e;q&&de(q,E)}function Ke(E){const{onWrapperBlur:q}=e;q&&de(q,E)}function Re(){M.value=!0}function X(E){M.value=!1,E.target===f.value?F(E,1):F(E,0)}function F(E,q=0,be="input"){const Oe=E.target.value;if(Ee(Oe),E instanceof InputEvent&&!E.isComposing&&(M.value=!1),e.type==="textarea"){const{value:_e}=h;_e&&_e.syncUnifiedContainer()}if(A=Oe,M.value)return;b.recordCursor();const He=ne(Oe);if(He)if(!e.pair)be==="input"?xe(Oe,{source:q}):Se(Oe,{source:q});else{let{value:_e}=k;Array.isArray(_e)?_e=[_e[0],_e[1]]:_e=["",""],_e[q]=Oe,be==="input"?xe(_e,{source:q}):Se(_e,{source:q})}te.$forceUpdate(),He||o.nextTick(b.restoreCursor)}function ne(E){const{countGraphemes:q,maxlength:be,minlength:Oe}=e;if(q){let _e;if(be!==void 0&&(_e===void 0&&(_e=q(E)),_e>Number(be))||Oe!==void 0&&(_e===void 0&&(_e=q(E)),_e<Number(be)))return!1}const{allowInput:He}=e;return typeof He=="function"?He(E):!0}function _(E){se(E),E.relatedTarget===l.value&&Be(),E.relatedTarget!==null&&(E.relatedTarget===u.value||E.relatedTarget===f.value||E.relatedTarget===s.value)||(N.value=!1),C(E,"blur"),p.value=null}function D(E,q){Ae(E),m.value=!0,N.value=!0,We(),C(E,"focus"),q===0?p.value=u.value:q===1?p.value=f.value:q===2&&(p.value=s.value)}function K(E){e.passivelyActivated&&(Ke(E),C(E,"blur"))}function R(E){e.passivelyActivated&&(m.value=!0,Le(E),C(E,"focus"))}function C(E,q){E.relatedTarget!==null&&(E.relatedTarget===u.value||E.relatedTarget===f.value||E.relatedTarget===s.value||E.relatedTarget===l.value)||(q==="focus"?(Te(E),m.value=!0):q==="blur"&&(oe(E),m.value=!1))}function B(E,q){F(E,q,"change")}function re(E){Ie(E)}function we(E){$e(E),Pe()}function Pe(){e.pair?(xe(["",""],{source:"clear"}),Se(["",""],{source:"clear"})):(xe("",{source:"clear"}),Se("",{source:"clear"}))}function Ue(E){const{onMousedown:q}=e;q&&q(E);const{tagName:be}=E.target;if(be!=="INPUT"&&be!=="TEXTAREA"){if(e.resizable){const{value:Oe}=l;if(Oe){const{left:He,top:_e,width:Vt,height:jt}=Oe.getBoundingClientRect(),Wt=14;if(He+Vt-Wt<E.clientX&&E.clientX<He+Vt&&_e+jt-Wt<E.clientY&&E.clientY<_e+jt)return}}E.preventDefault(),m.value||Z()}}function De(){var E;S.value=!0,e.type==="textarea"&&((E=h.value)===null||E===void 0||E.handleMouseEnterWrapper())}function Me(){var E;S.value=!1,e.type==="textarea"&&((E=h.value)===null||E===void 0||E.handleMouseLeaveWrapper())}function Ze(){T.value||Y.value==="click"&&(ie.value=!ie.value)}function ft(E){if(T.value)return;E.preventDefault();const q=Oe=>{Oe.preventDefault(),ke("mouseup",document,q)};if(ze("mouseup",document,q),Y.value!=="mousedown")return;ie.value=!0;const be=()=>{ie.value=!1,ke("mouseup",document,be)};ze("mouseup",document,be)}function tt(E){e.onKeyup&&de(e.onKeyup,E)}function st(E){switch(e.onKeydown&&de(e.onKeydown,E),E.key){case"Escape":H();break;case"Enter":y(E);break}}function y(E){var q,be;if(e.passivelyActivated){const{value:Oe}=N;if(Oe){e.internalDeactivateOnEnter&&H();return}E.preventDefault(),e.type==="textarea"?(q=s.value)===null||q===void 0||q.focus():(be=u.value)===null||be===void 0||be.focus()}}function H(){e.passivelyActivated&&(N.value=!1,o.nextTick(()=>{var E;(E=l.value)===null||E===void 0||E.focus()}))}function Z(){var E,q,be;T.value||(e.passivelyActivated?(E=l.value)===null||E===void 0||E.focus():((q=s.value)===null||q===void 0||q.focus(),(be=u.value)===null||be===void 0||be.focus()))}function le(){var E;!((E=l.value)===null||E===void 0)&&E.contains(document.activeElement)&&document.activeElement.blur()}function ce(){var E,q;(E=s.value)===null||E===void 0||E.select(),(q=u.value)===null||q===void 0||q.select()}function ue(){T.value||(s.value?s.value.focus():u.value&&u.value.focus())}function fe(){const{value:E}=l;E!=null&&E.contains(document.activeElement)&&E!==document.activeElement&&H()}function ge(E){if(e.type==="textarea"){const{value:q}=s;q==null||q.scrollTo(E)}else{const{value:q}=u;q==null||q.scrollTo(E)}}function Ee(E){const{type:q,pair:be,autosize:Oe}=e;if(!be&&Oe)if(q==="textarea"){const{value:He}=c;He&&(He.textContent=`${E??""}\r
|
|
1028
|
+
`)}else{const{value:He}=d;He&&(E?He.textContent=E:He.innerHTML=" ")}}function mt(){he()}const on=o.ref({top:"0"});function _n(E){var q;const{scrollTop:be}=E.target;on.value.top=`${-be}px`,(q=h.value)===null||q===void 0||q.syncUnifiedContainer()}let an=null;o.watchEffect(()=>{const{autosize:E,type:q}=e;E&&q==="textarea"?an=o.watch(k,be=>{!Array.isArray(be)&&be!==A&&Ee(be)}):an==null||an()});let ln=null;o.watchEffect(()=>{e.type==="textarea"?ln=o.watch(k,E=>{var q;!Array.isArray(E)&&E!==A&&((q=h.value)===null||q===void 0||q.syncUnifiedContainer())}):ln==null||ln()}),o.provide(ac,{mergedValueRef:k,maxlengthRef:G,mergedClsPrefixRef:t,countGraphemesRef:o.toRef(e,"countGraphemes")});const Pr={wrapperElRef:l,inputElRef:u,textareaElRef:s,isCompositing:M,clear:Pe,focus:Z,blur:le,select:ce,deactivate:fe,activate:ue,scrollTo:ge},Er=tn("Input",i,t),Zn=o.computed(()=>{const{value:E}=$,{common:{cubicBezierEaseInOut:q},self:{color:be,borderRadius:Oe,textColor:He,caretColor:_e,caretColorError:Vt,caretColorWarning:jt,textDecorationColor:Wt,border:Mn,borderDisabled:On,borderHover:zr,borderFocus:xa,placeholderColor:ya,placeholderColorDisabled:wa,lineHeightTextarea:Ca,colorDisabled:Jn,colorFocus:Qn,textColorDisabled:E1,boxShadowFocus:z1,iconSize:B1,colorFocusWarning:_1,boxShadowFocusWarning:M1,borderWarning:O1,borderFocusWarning:A1,borderHoverWarning:I1,colorFocusError:F1,boxShadowFocusError:D1,borderError:N1,borderFocusError:L1,borderHoverError:H1,clearSize:V1,clearColor:j1,clearColorHover:W1,clearColorPressed:U1,iconColor:G1,iconColorDisabled:q1,suffixTextColor:K1,countTextColor:X1,countTextColorDisabled:Y1,iconColorHover:Z1,iconColorPressed:J1,loadingColor:Q1,loadingColorError:eC,loadingColorWarning:tC,[ee("padding",E)]:nC,[ee("fontSize",E)]:rC,[ee("height",E)]:oC}}=a.value,{left:iC,right:aC}=ht(nC);return{"--n-bezier":q,"--n-count-text-color":X1,"--n-count-text-color-disabled":Y1,"--n-color":be,"--n-font-size":rC,"--n-border-radius":Oe,"--n-height":oC,"--n-padding-left":iC,"--n-padding-right":aC,"--n-text-color":He,"--n-caret-color":_e,"--n-text-decoration-color":Wt,"--n-border":Mn,"--n-border-disabled":On,"--n-border-hover":zr,"--n-border-focus":xa,"--n-placeholder-color":ya,"--n-placeholder-color-disabled":wa,"--n-icon-size":B1,"--n-line-height-textarea":Ca,"--n-color-disabled":Jn,"--n-color-focus":Qn,"--n-text-color-disabled":E1,"--n-box-shadow-focus":z1,"--n-loading-color":Q1,"--n-caret-color-warning":jt,"--n-color-focus-warning":_1,"--n-box-shadow-focus-warning":M1,"--n-border-warning":O1,"--n-border-focus-warning":A1,"--n-border-hover-warning":I1,"--n-loading-color-warning":tC,"--n-caret-color-error":Vt,"--n-color-focus-error":F1,"--n-box-shadow-focus-error":D1,"--n-border-error":N1,"--n-border-focus-error":L1,"--n-border-hover-error":H1,"--n-loading-color-error":eC,"--n-clear-color":j1,"--n-clear-size":V1,"--n-clear-color-hover":W1,"--n-clear-color-pressed":U1,"--n-icon-color":G1,"--n-icon-color-hover":Z1,"--n-icon-color-pressed":J1,"--n-icon-color-disabled":q1,"--n-suffix-text-color":K1}}),sn=r?rt("input",o.computed(()=>{const{value:E}=$;return E[0]}),Zn,e):void 0;return Object.assign(Object.assign({},Pr),{wrapperElRef:l,inputElRef:u,inputMirrorElRef:d,inputEl2Ref:f,textareaElRef:s,textareaMirrorElRef:c,textareaScrollbarInstRef:h,rtlEnabled:Er,uncontrolledValue:v,mergedValue:k,passwordVisible:ie,mergedPlaceholder:L,showPlaceholder1:U,showPlaceholder2:J,mergedFocus:j,isComposing:M,activated:N,showClearButton:Q,mergedSize:$,mergedDisabled:T,textDecorationStyle:me,mergedClsPrefix:t,mergedBordered:n,mergedShowPasswordOn:Y,placeholderStyle:on,mergedStatus:O,textAreaScrollContainerWidth:ae,handleTextAreaScroll:_n,handleCompositionStart:Re,handleCompositionEnd:X,handleInput:F,handleInputBlur:_,handleInputFocus:D,handleWrapperBlur:K,handleWrapperFocus:R,handleMouseEnter:De,handleMouseLeave:Me,handleMouseDown:Ue,handleChange:B,handleClick:re,handleClear:we,handlePasswordToggleClick:Ze,handlePasswordToggleMousedown:ft,handleWrapperKeydown:st,handleWrapperKeyup:tt,handleTextAreaMirrorResize:mt,getTextareaScrollContainer:()=>s.value,mergedTheme:a,cssVars:r?void 0:Zn,themeClass:sn==null?void 0:sn.themeClass,onRender:sn==null?void 0:sn.onRender})},render(){var e,t;const{mergedClsPrefix:n,mergedStatus:r,themeClass:i,type:a,countGraphemes:l,onRender:s}=this,c=this.$slots;return s==null||s(),o.h("div",{ref:"wrapperElRef",class:[`${n}-input`,i,r&&`${n}-input--${r}-status`,{[`${n}-input--rtl`]:this.rtlEnabled,[`${n}-input--disabled`]:this.mergedDisabled,[`${n}-input--textarea`]:a==="textarea",[`${n}-input--resizable`]:this.resizable&&!this.autosize,[`${n}-input--autosize`]:this.autosize,[`${n}-input--round`]:this.round&&a!=="textarea",[`${n}-input--pair`]:this.pair,[`${n}-input--focus`]:this.mergedFocus,[`${n}-input--stateful`]:this.stateful}],style:this.cssVars,tabindex:!this.mergedDisabled&&this.passivelyActivated&&!this.activated?0:void 0,onFocus:this.handleWrapperFocus,onBlur:this.handleWrapperBlur,onClick:this.handleClick,onMousedown:this.handleMouseDown,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onCompositionstart:this.handleCompositionStart,onCompositionend:this.handleCompositionEnd,onKeyup:this.handleWrapperKeyup,onKeydown:this.handleWrapperKeydown},o.h("div",{class:`${n}-input-wrapper`},Fe(c.prefix,d=>d&&o.h("div",{class:`${n}-input__prefix`},d)),a==="textarea"?o.h(Vi,{ref:"textareaScrollbarInstRef",class:`${n}-input__textarea`,container:this.getTextareaScrollContainer,triggerDisplayManually:!0,useUnifiedContainer:!0,internalHoistYRail:!0},{default:()=>{var d,u;const{textAreaScrollContainerWidth:f}=this,p={width:this.autosize&&f&&`${f}px`};return o.h(o.Fragment,null,o.h("textarea",Object.assign({},this.inputProps,{ref:"textareaElRef",class:[`${n}-input__textarea-el`,(d=this.inputProps)===null||d===void 0?void 0:d.class],autofocus:this.autofocus,rows:Number(this.rows),placeholder:this.placeholder,value:this.mergedValue,disabled:this.mergedDisabled,maxlength:l?void 0:this.maxlength,minlength:l?void 0:this.minlength,readonly:this.readonly,tabindex:this.passivelyActivated&&!this.activated?-1:void 0,style:[this.textDecorationStyle[0],(u=this.inputProps)===null||u===void 0?void 0:u.style,p],onBlur:this.handleInputBlur,onFocus:b=>{this.handleInputFocus(b,2)},onInput:this.handleInput,onChange:this.handleChange,onScroll:this.handleTextAreaScroll})),this.showPlaceholder1?o.h("div",{class:`${n}-input__placeholder`,style:[this.placeholderStyle,p],key:"placeholder"},this.mergedPlaceholder[0]):null,this.autosize?o.h(Zt,{onResize:this.handleTextAreaMirrorResize},{default:()=>o.h("div",{ref:"textareaMirrorElRef",class:`${n}-input__textarea-mirror`,key:"mirror"})}):null)}}):o.h("div",{class:`${n}-input__input`},o.h("input",Object.assign({type:a==="password"&&this.mergedShowPasswordOn&&this.passwordVisible?"text":a},this.inputProps,{ref:"inputElRef",class:[`${n}-input__input-el`,(e=this.inputProps)===null||e===void 0?void 0:e.class],style:[this.textDecorationStyle[0],(t=this.inputProps)===null||t===void 0?void 0:t.style],tabindex:this.passivelyActivated&&!this.activated?-1:void 0,placeholder:this.mergedPlaceholder[0],disabled:this.mergedDisabled,maxlength:l?void 0:this.maxlength,minlength:l?void 0:this.minlength,value:Array.isArray(this.mergedValue)?this.mergedValue[0]:this.mergedValue,readonly:this.readonly,autofocus:this.autofocus,size:this.attrSize,onBlur:this.handleInputBlur,onFocus:d=>{this.handleInputFocus(d,0)},onInput:d=>{this.handleInput(d,0)},onChange:d=>{this.handleChange(d,0)}})),this.showPlaceholder1?o.h("div",{class:`${n}-input__placeholder`},o.h("span",null,this.mergedPlaceholder[0])):null,this.autosize?o.h("div",{class:`${n}-input__input-mirror`,key:"mirror",ref:"inputMirrorElRef"}," "):null),!this.pair&&Fe(c.suffix,d=>d||this.clearable||this.showCount||this.mergedShowPasswordOn||this.loading!==void 0?o.h("div",{class:`${n}-input__suffix`},[Fe(c["clear-icon-placeholder"],u=>(this.clearable||u)&&o.h(Gi,{clsPrefix:n,show:this.showClearButton,onClear:this.handleClear},{placeholder:()=>u,icon:()=>{var f,p;return(p=(f=this.$slots)["clear-icon"])===null||p===void 0?void 0:p.call(f)}})),this.internalLoadingBeforeSuffix?null:d,this.loading!==void 0?o.h(tc,{clsPrefix:n,loading:this.loading,showArrow:!1,showClear:!1,style:this.cssVars}):null,this.internalLoadingBeforeSuffix?d:null,this.showCount&&this.type!=="textarea"?o.h(lc,null,{default:u=>{var f;return(f=c.count)===null||f===void 0?void 0:f.call(c,u)}}):null,this.mergedShowPasswordOn&&this.type==="password"?o.h("div",{class:`${n}-input__eye`,onMousedown:this.handlePasswordToggleMousedown,onClick:this.handlePasswordToggleClick},this.passwordVisible?Ct(c["password-visible-icon"],()=>[o.h(yt,{clsPrefix:n},{default:()=>o.h(Ag,null)})]):Ct(c["password-invisible-icon"],()=>[o.h(yt,{clsPrefix:n},{default:()=>o.h(Ig,null)})])):null]):null)),this.pair?o.h("span",{class:`${n}-input__separator`},Ct(c.separator,()=>[this.separator])):null,this.pair?o.h("div",{class:`${n}-input-wrapper`},o.h("div",{class:`${n}-input__input`},o.h("input",{ref:"inputEl2Ref",type:this.type,class:`${n}-input__input-el`,tabindex:this.passivelyActivated&&!this.activated?-1:void 0,placeholder:this.mergedPlaceholder[1],disabled:this.mergedDisabled,maxlength:l?void 0:this.maxlength,minlength:l?void 0:this.minlength,value:Array.isArray(this.mergedValue)?this.mergedValue[1]:void 0,readonly:this.readonly,style:this.textDecorationStyle[1],onBlur:this.handleInputBlur,onFocus:d=>{this.handleInputFocus(d,1)},onInput:d=>{this.handleInput(d,1)},onChange:d=>{this.handleChange(d,1)}}),this.showPlaceholder2?o.h("div",{class:`${n}-input__placeholder`},o.h("span",null,this.mergedPlaceholder[1])):null),Fe(c.suffix,d=>(this.clearable||d)&&o.h("div",{class:`${n}-input__suffix`},[this.clearable&&o.h(Gi,{clsPrefix:n,show:this.showClearButton,onClear:this.handleClear},{icon:()=>{var u;return(u=c["clear-icon"])===null||u===void 0?void 0:u.call(c)},placeholder:()=>{var u;return(u=c["clear-icon-placeholder"])===null||u===void 0?void 0:u.call(c)}}),d]))):null,this.mergedBordered?o.h("div",{class:`${n}-input__border`}):null,this.mergedBordered?o.h("div",{class:`${n}-input__state-border`}):null,this.showCount&&a==="textarea"?o.h(lc,null,{default:d=>{var u;const{renderCount:f}=this;return f?f(d):(u=c.count)===null||u===void 0?void 0:u.call(c,d)}}):null)}}),z0=w("input-group",`
|
|
1029
1029
|
display: inline-flex;
|
|
1030
1030
|
width: 100%;
|
|
1031
1031
|
flex-wrap: nowrap;
|
|
@@ -1080,7 +1080,7 @@ ${t}
|
|
|
1080
1080
|
`),P("box-shadow, border, state-border",`
|
|
1081
1081
|
border-top-left-radius: 0!important;
|
|
1082
1082
|
border-bottom-left-radius: 0!important;
|
|
1083
|
-
`)])])])])])]),
|
|
1083
|
+
`)])])])])])]),B0={},_0=o.defineComponent({name:"InputGroup",props:B0,setup(e){const{mergedClsPrefixRef:t}=Ye(e);return Tn("-input-group",z0,t),{mergedClsPrefix:t}},render(){const{mergedClsPrefix:e}=this;return o.h("div",{class:`${e}-input-group`},this.$slots)}});function kn(e){return gt(e,[255,255,255,.16])}function go(e){return gt(e,[0,0,0,.12])}const M0="n-button-group",O0={paddingTiny:"0 6px",paddingSmall:"0 10px",paddingMedium:"0 14px",paddingLarge:"0 18px",paddingRoundTiny:"0 10px",paddingRoundSmall:"0 14px",paddingRoundMedium:"0 18px",paddingRoundLarge:"0 22px",iconMarginTiny:"6px",iconMarginSmall:"6px",iconMarginMedium:"6px",iconMarginLarge:"6px",iconSizeTiny:"14px",iconSizeSmall:"18px",iconSizeMedium:"18px",iconSizeLarge:"20px",rippleDuration:".6s"};function A0(e){const{heightTiny:t,heightSmall:n,heightMedium:r,heightLarge:i,borderRadius:a,fontSizeTiny:l,fontSizeSmall:s,fontSizeMedium:c,fontSizeLarge:d,opacityDisabled:u,textColor2:f,textColor3:p,primaryColorHover:b,primaryColorPressed:h,borderColor:x,primaryColor:v,baseColor:g,infoColor:k,infoColorHover:z,infoColorPressed:$,successColor:T,successColorHover:O,successColorPressed:m,warningColor:S,warningColorHover:M,warningColorPressed:N,errorColor:A,errorColorHover:L,errorColorPressed:U,fontWeight:J,buttonColor2:j,buttonColor2Hover:Q,buttonColor2Pressed:Y,fontWeightStrong:ie}=e;return Object.assign(Object.assign({},O0),{heightTiny:t,heightSmall:n,heightMedium:r,heightLarge:i,borderRadiusTiny:a,borderRadiusSmall:a,borderRadiusMedium:a,borderRadiusLarge:a,fontSizeTiny:l,fontSizeSmall:s,fontSizeMedium:c,fontSizeLarge:d,opacityDisabled:u,colorOpacitySecondary:"0.16",colorOpacitySecondaryHover:"0.22",colorOpacitySecondaryPressed:"0.28",colorSecondary:j,colorSecondaryHover:Q,colorSecondaryPressed:Y,colorTertiary:j,colorTertiaryHover:Q,colorTertiaryPressed:Y,colorQuaternary:"#0000",colorQuaternaryHover:Q,colorQuaternaryPressed:Y,color:"#0000",colorHover:"#0000",colorPressed:"#0000",colorFocus:"#0000",colorDisabled:"#0000",textColor:f,textColorTertiary:p,textColorHover:b,textColorPressed:h,textColorFocus:b,textColorDisabled:f,textColorText:f,textColorTextHover:b,textColorTextPressed:h,textColorTextFocus:b,textColorTextDisabled:f,textColorGhost:f,textColorGhostHover:b,textColorGhostPressed:h,textColorGhostFocus:b,textColorGhostDisabled:f,border:`1px solid ${x}`,borderHover:`1px solid ${b}`,borderPressed:`1px solid ${h}`,borderFocus:`1px solid ${b}`,borderDisabled:`1px solid ${x}`,rippleColor:v,colorPrimary:v,colorHoverPrimary:b,colorPressedPrimary:h,colorFocusPrimary:b,colorDisabledPrimary:v,textColorPrimary:g,textColorHoverPrimary:g,textColorPressedPrimary:g,textColorFocusPrimary:g,textColorDisabledPrimary:g,textColorTextPrimary:v,textColorTextHoverPrimary:b,textColorTextPressedPrimary:h,textColorTextFocusPrimary:b,textColorTextDisabledPrimary:f,textColorGhostPrimary:v,textColorGhostHoverPrimary:b,textColorGhostPressedPrimary:h,textColorGhostFocusPrimary:b,textColorGhostDisabledPrimary:v,borderPrimary:`1px solid ${v}`,borderHoverPrimary:`1px solid ${b}`,borderPressedPrimary:`1px solid ${h}`,borderFocusPrimary:`1px solid ${b}`,borderDisabledPrimary:`1px solid ${v}`,rippleColorPrimary:v,colorInfo:k,colorHoverInfo:z,colorPressedInfo:$,colorFocusInfo:z,colorDisabledInfo:k,textColorInfo:g,textColorHoverInfo:g,textColorPressedInfo:g,textColorFocusInfo:g,textColorDisabledInfo:g,textColorTextInfo:k,textColorTextHoverInfo:z,textColorTextPressedInfo:$,textColorTextFocusInfo:z,textColorTextDisabledInfo:f,textColorGhostInfo:k,textColorGhostHoverInfo:z,textColorGhostPressedInfo:$,textColorGhostFocusInfo:z,textColorGhostDisabledInfo:k,borderInfo:`1px solid ${k}`,borderHoverInfo:`1px solid ${z}`,borderPressedInfo:`1px solid ${$}`,borderFocusInfo:`1px solid ${z}`,borderDisabledInfo:`1px solid ${k}`,rippleColorInfo:k,colorSuccess:T,colorHoverSuccess:O,colorPressedSuccess:m,colorFocusSuccess:O,colorDisabledSuccess:T,textColorSuccess:g,textColorHoverSuccess:g,textColorPressedSuccess:g,textColorFocusSuccess:g,textColorDisabledSuccess:g,textColorTextSuccess:T,textColorTextHoverSuccess:O,textColorTextPressedSuccess:m,textColorTextFocusSuccess:O,textColorTextDisabledSuccess:f,textColorGhostSuccess:T,textColorGhostHoverSuccess:O,textColorGhostPressedSuccess:m,textColorGhostFocusSuccess:O,textColorGhostDisabledSuccess:T,borderSuccess:`1px solid ${T}`,borderHoverSuccess:`1px solid ${O}`,borderPressedSuccess:`1px solid ${m}`,borderFocusSuccess:`1px solid ${O}`,borderDisabledSuccess:`1px solid ${T}`,rippleColorSuccess:T,colorWarning:S,colorHoverWarning:M,colorPressedWarning:N,colorFocusWarning:M,colorDisabledWarning:S,textColorWarning:g,textColorHoverWarning:g,textColorPressedWarning:g,textColorFocusWarning:g,textColorDisabledWarning:g,textColorTextWarning:S,textColorTextHoverWarning:M,textColorTextPressedWarning:N,textColorTextFocusWarning:M,textColorTextDisabledWarning:f,textColorGhostWarning:S,textColorGhostHoverWarning:M,textColorGhostPressedWarning:N,textColorGhostFocusWarning:M,textColorGhostDisabledWarning:S,borderWarning:`1px solid ${S}`,borderHoverWarning:`1px solid ${M}`,borderPressedWarning:`1px solid ${N}`,borderFocusWarning:`1px solid ${M}`,borderDisabledWarning:`1px solid ${S}`,rippleColorWarning:S,colorError:A,colorHoverError:L,colorPressedError:U,colorFocusError:L,colorDisabledError:A,textColorError:g,textColorHoverError:g,textColorPressedError:g,textColorFocusError:g,textColorDisabledError:g,textColorTextError:A,textColorTextHoverError:L,textColorTextPressedError:U,textColorTextFocusError:L,textColorTextDisabledError:f,textColorGhostError:A,textColorGhostHoverError:L,textColorGhostPressedError:U,textColorGhostFocusError:L,textColorGhostDisabledError:A,borderError:`1px solid ${A}`,borderHoverError:`1px solid ${L}`,borderPressedError:`1px solid ${U}`,borderFocusError:`1px solid ${L}`,borderDisabledError:`1px solid ${A}`,rippleColorError:A,waveOpacity:"0.6",fontWeight:J,fontWeightStrong:ie})}const Xi={name:"Button",common:Qe,self:A0},I0=I([w("button",`
|
|
1084
1084
|
margin: 0;
|
|
1085
1085
|
font-weight: var(--n-font-weight);
|
|
1086
1086
|
line-height: 1;
|
|
@@ -1149,7 +1149,7 @@ ${t}
|
|
|
1149
1149
|
display: flex;
|
|
1150
1150
|
align-items: center;
|
|
1151
1151
|
justify-content: center;
|
|
1152
|
-
`,[qn({top:"50%",originalTransform:"translateY(-50%)"})]),
|
|
1152
|
+
`,[qn({top:"50%",originalTransform:"translateY(-50%)"})]),d0()]),P("content",`
|
|
1153
1153
|
display: flex;
|
|
1154
1154
|
align-items: center;
|
|
1155
1155
|
flex-wrap: nowrap;
|
|
@@ -1157,7 +1157,7 @@ ${t}
|
|
|
1157
1157
|
`,[I("~",[P("icon",{margin:"var(--n-icon-margin)",marginRight:0})])]),W("block",`
|
|
1158
1158
|
display: flex;
|
|
1159
1159
|
width: 100%;
|
|
1160
|
-
`),W("dashed",[P("border, state-border",{borderStyle:"dashed !important"})]),W("disabled",{cursor:"not-allowed",opacity:"var(--n-opacity-disabled)"})]),I("@keyframes button-wave-spread",{from:{boxShadow:"0 0 0.5px 0 var(--n-ripple-color)"},to:{boxShadow:"0 0 0.5px 4.5px var(--n-ripple-color)"}}),I("@keyframes button-wave-opacity",{from:{opacity:"var(--n-wave-opacity)"},to:{opacity:0}})]),I0=Object.assign(Object.assign({},Ce.props),{color:String,textColor:String,text:Boolean,block:Boolean,loading:Boolean,disabled:Boolean,circle:Boolean,size:String,ghost:Boolean,round:Boolean,secondary:Boolean,tertiary:Boolean,quaternary:Boolean,strong:Boolean,focusable:{type:Boolean,default:!0},keyboard:{type:Boolean,default:!0},tag:{type:String,default:"button"},type:{type:String,default:"default"},dashed:Boolean,renderIcon:Function,iconPlacement:{type:String,default:"left"},attrType:{type:String,default:"button"},bordered:{type:Boolean,default:!0},onClick:[Function,Array],nativeFocusBehavior:{type:Boolean,default:!oc}}),Ht=o.defineComponent({name:"Button",props:I0,setup(e){process.env.NODE_ENV!=="production"&&o.watchEffect(()=>{const{dashed:$,ghost:T,text:O,secondary:m,tertiary:S,quaternary:M}=e;($||T||O)&&(m||S||M)&&ot("button","`dashed`, `ghost` and `text` props can't be used along with `secondary`, `tertiary` and `quaternary` props.")});const t=o.ref(null),n=o.ref(null),r=o.ref(!1),i=Je(()=>!e.quaternary&&!e.tertiary&&!e.secondary&&!e.text&&(!e.color||e.ghost||e.dashed)&&e.bordered),a=o.inject(_0,{}),{mergedSizeRef:l}=vn({},{defaultSize:"medium",mergedSize:$=>{const{size:T}=e;if(T)return T;const{size:O}=a;if(O)return O;const{mergedSize:m}=$||{};return m?m.value:"medium"}}),s=o.computed(()=>e.focusable&&!e.disabled),c=$=>{var T;s.value||$.preventDefault(),!e.nativeFocusBehavior&&($.preventDefault(),!e.disabled&&s.value&&((T=t.value)===null||T===void 0||T.focus({preventScroll:!0})))},d=$=>{var T;if(!e.disabled&&!e.loading){const{onClick:O}=e;O&&de(O,$),e.text||(T=n.value)===null||T===void 0||T.play()}},u=$=>{switch($.key){case"Enter":if(!e.keyboard)return;r.value=!1}},f=$=>{switch($.key){case"Enter":if(!e.keyboard||e.loading){$.preventDefault();return}r.value=!0}},p=()=>{r.value=!1},{inlineThemeDisabled:b,mergedClsPrefixRef:h,mergedRtlRef:x}=Ye(e),v=Ce("Button","-button",A0,Xi,e,h),g=tn("Button",x,h),k=o.computed(()=>{const $=v.value,{common:{cubicBezierEaseInOut:T,cubicBezierEaseOut:O},self:m}=$,{rippleDuration:S,opacityDisabled:M,fontWeight:N,fontWeightStrong:A}=m,L=l.value,{dashed:U,type:J,ghost:j,text:Q,color:Y,round:ie,circle:me,textColor:ae,secondary:he,tertiary:G,quaternary:te,strong:xe}=e,Se={"font-weight":xe?A:N};let oe={"--n-color":"initial","--n-color-hover":"initial","--n-color-pressed":"initial","--n-color-focus":"initial","--n-color-disabled":"initial","--n-ripple-color":"initial","--n-text-color":"initial","--n-text-color-hover":"initial","--n-text-color-pressed":"initial","--n-text-color-focus":"initial","--n-text-color-disabled":"initial"};const Te=J==="tertiary",$e=J==="default",se=Te?"default":J;if(Q){const _=ae||Y;oe={"--n-color":"#0000","--n-color-hover":"#0000","--n-color-pressed":"#0000","--n-color-focus":"#0000","--n-color-disabled":"#0000","--n-ripple-color":"#0000","--n-text-color":_||m[ee("textColorText",se)],"--n-text-color-hover":_?kn(_):m[ee("textColorTextHover",se)],"--n-text-color-pressed":_?go(_):m[ee("textColorTextPressed",se)],"--n-text-color-focus":_?kn(_):m[ee("textColorTextHover",se)],"--n-text-color-disabled":_||m[ee("textColorTextDisabled",se)]}}else if(j||U){const _=ae||Y;oe={"--n-color":"#0000","--n-color-hover":"#0000","--n-color-pressed":"#0000","--n-color-focus":"#0000","--n-color-disabled":"#0000","--n-ripple-color":Y||m[ee("rippleColor",se)],"--n-text-color":_||m[ee("textColorGhost",se)],"--n-text-color-hover":_?kn(_):m[ee("textColorGhostHover",se)],"--n-text-color-pressed":_?go(_):m[ee("textColorGhostPressed",se)],"--n-text-color-focus":_?kn(_):m[ee("textColorGhostHover",se)],"--n-text-color-disabled":_||m[ee("textColorGhostDisabled",se)]}}else if(he){const _=$e?m.textColor:Te?m.textColorTertiary:m[ee("color",se)],D=Y||_,K=J!=="default"&&J!=="tertiary";oe={"--n-color":K?ve(D,{alpha:Number(m.colorOpacitySecondary)}):m.colorSecondary,"--n-color-hover":K?ve(D,{alpha:Number(m.colorOpacitySecondaryHover)}):m.colorSecondaryHover,"--n-color-pressed":K?ve(D,{alpha:Number(m.colorOpacitySecondaryPressed)}):m.colorSecondaryPressed,"--n-color-focus":K?ve(D,{alpha:Number(m.colorOpacitySecondaryHover)}):m.colorSecondaryHover,"--n-color-disabled":m.colorSecondary,"--n-ripple-color":"#0000","--n-text-color":D,"--n-text-color-hover":D,"--n-text-color-pressed":D,"--n-text-color-focus":D,"--n-text-color-disabled":D}}else if(G||te){const _=$e?m.textColor:Te?m.textColorTertiary:m[ee("color",se)],D=Y||_;G?(oe["--n-color"]=m.colorTertiary,oe["--n-color-hover"]=m.colorTertiaryHover,oe["--n-color-pressed"]=m.colorTertiaryPressed,oe["--n-color-focus"]=m.colorSecondaryHover,oe["--n-color-disabled"]=m.colorTertiary):(oe["--n-color"]=m.colorQuaternary,oe["--n-color-hover"]=m.colorQuaternaryHover,oe["--n-color-pressed"]=m.colorQuaternaryPressed,oe["--n-color-focus"]=m.colorQuaternaryHover,oe["--n-color-disabled"]=m.colorQuaternary),oe["--n-ripple-color"]="#0000",oe["--n-text-color"]=D,oe["--n-text-color-hover"]=D,oe["--n-text-color-pressed"]=D,oe["--n-text-color-focus"]=D,oe["--n-text-color-disabled"]=D}else oe={"--n-color":Y||m[ee("color",se)],"--n-color-hover":Y?kn(Y):m[ee("colorHover",se)],"--n-color-pressed":Y?go(Y):m[ee("colorPressed",se)],"--n-color-focus":Y?kn(Y):m[ee("colorFocus",se)],"--n-color-disabled":Y||m[ee("colorDisabled",se)],"--n-ripple-color":Y||m[ee("rippleColor",se)],"--n-text-color":ae||(Y?m.textColorPrimary:Te?m.textColorTertiary:m[ee("textColor",se)]),"--n-text-color-hover":ae||(Y?m.textColorHoverPrimary:m[ee("textColorHover",se)]),"--n-text-color-pressed":ae||(Y?m.textColorPressedPrimary:m[ee("textColorPressed",se)]),"--n-text-color-focus":ae||(Y?m.textColorFocusPrimary:m[ee("textColorFocus",se)]),"--n-text-color-disabled":ae||(Y?m.textColorDisabledPrimary:m[ee("textColorDisabled",se)])};let Ae={"--n-border":"initial","--n-border-hover":"initial","--n-border-pressed":"initial","--n-border-focus":"initial","--n-border-disabled":"initial"};Q?Ae={"--n-border":"none","--n-border-hover":"none","--n-border-pressed":"none","--n-border-focus":"none","--n-border-disabled":"none"}:Ae={"--n-border":m[ee("border",se)],"--n-border-hover":m[ee("borderHover",se)],"--n-border-pressed":m[ee("borderPressed",se)],"--n-border-focus":m[ee("borderFocus",se)],"--n-border-disabled":m[ee("borderDisabled",se)]};const{[ee("height",L)]:Be,[ee("fontSize",L)]:We,[ee("padding",L)]:Ie,[ee("paddingRound",L)]:Le,[ee("iconSize",L)]:Ke,[ee("borderRadius",L)]:Re,[ee("iconMargin",L)]:X,waveOpacity:F}=m,ne={"--n-width":me&&!Q?Be:"initial","--n-height":Q?"initial":Be,"--n-font-size":We,"--n-padding":me||Q?"initial":ie?Le:Ie,"--n-icon-size":Ke,"--n-icon-margin":X,"--n-border-radius":Q?"initial":me||ie?Be:Re};return Object.assign(Object.assign(Object.assign(Object.assign({"--n-bezier":T,"--n-bezier-ease-out":O,"--n-ripple-duration":S,"--n-opacity-disabled":M,"--n-wave-opacity":F},Se),oe),Ae),ne)}),z=b?rt("button",o.computed(()=>{let $="";const{dashed:T,type:O,ghost:m,text:S,color:M,round:N,circle:A,textColor:L,secondary:U,tertiary:J,quaternary:j,strong:Q}=e;T&&($+="a"),m&&($+="b"),S&&($+="c"),N&&($+="d"),A&&($+="e"),U&&($+="f"),J&&($+="g"),j&&($+="h"),Q&&($+="i"),M&&($+=`j${Ar(M)}`),L&&($+=`k${Ar(L)}`);const{value:Y}=l;return $+=`l${Y[0]}`,$+=`m${O[0]}`,$}),k,e):void 0;return{selfElRef:t,waveElRef:n,mergedClsPrefix:h,mergedFocusable:s,mergedSize:l,showBorder:i,enterPressed:r,rtlEnabled:g,handleMousedown:c,handleKeydown:f,handleBlur:p,handleKeyup:u,handleClick:d,customColorCssVars:o.computed(()=>{const{color:$}=e;if(!$)return null;const T=kn($);return{"--n-border-color":$,"--n-border-color-hover":T,"--n-border-color-pressed":go($),"--n-border-color-focus":T,"--n-border-color-disabled":$}}),cssVars:b?void 0:k,themeClass:z==null?void 0:z.themeClass,onRender:z==null?void 0:z.onRender}},render(){const{mergedClsPrefix:e,tag:t,onRender:n}=this;n==null||n();const r=Fe(this.$slots.default,i=>i&&o.h("span",{class:`${e}-button__content`},i));return o.h(t,{ref:"selfElRef",class:[this.themeClass,`${e}-button`,`${e}-button--${this.type}-type`,`${e}-button--${this.mergedSize}-type`,this.rtlEnabled&&`${e}-button--rtl`,this.disabled&&`${e}-button--disabled`,this.block&&`${e}-button--block`,this.enterPressed&&`${e}-button--pressed`,!this.text&&this.dashed&&`${e}-button--dashed`,this.color&&`${e}-button--color`,this.secondary&&`${e}-button--secondary`,this.loading&&`${e}-button--loading`,this.ghost&&`${e}-button--ghost`],tabindex:this.mergedFocusable?0:-1,type:this.attrType,style:this.cssVars,disabled:this.disabled,onClick:this.handleClick,onBlur:this.handleBlur,onMousedown:this.handleMousedown,onKeyup:this.handleKeyup,onKeydown:this.handleKeydown},this.iconPlacement==="right"&&r,o.h(Is,{width:!0},{default:()=>Fe(this.$slots.icon,i=>(this.loading||this.renderIcon||i)&&o.h("span",{class:`${e}-button__icon`,style:{margin:Dn(this.$slots.default)?"0":""}},o.h(fo,null,{default:()=>this.loading?o.h(ho,{clsPrefix:e,key:"loading",class:`${e}-icon-slot`,strokeWidth:20}):o.h("div",{key:"icon",class:`${e}-icon-slot`,role:"none"},this.renderIcon?this.renderIcon():i)})))}),this.iconPlacement==="left"&&r,this.text?null:o.h(Hv,{ref:"waveElRef",clsPrefix:e}),this.showBorder?o.h("div",{"aria-hidden":!0,class:`${e}-button__border`,style:this.customColorCssVars}):null,this.showBorder?o.h("div",{"aria-hidden":!0,class:`${e}-button__state-border`,style:this.customColorCssVars}):null)}}),lc=Ht;function F0(e){const{fontSize:t,boxShadow2:n,popoverColor:r,textColor2:i,borderRadius:a,borderColor:l,heightSmall:s,heightMedium:c,heightLarge:d,fontSizeSmall:u,fontSizeMedium:f,fontSizeLarge:p,dividerColor:b}=e;return{panelFontSize:t,boxShadow:n,color:r,textColor:i,borderRadius:a,border:`1px solid ${l}`,heightSmall:s,heightMedium:c,heightLarge:d,fontSizeSmall:u,fontSizeMedium:f,fontSizeLarge:p,dividerColor:b}}const D0={name:"ColorPicker",common:Qe,peers:{Input:Ki,Button:Xi},self:F0};function N0(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 process.env.NODE_ENV!=="production"&&rr("color-picker","props.modes is invalid."),"#000000"}function wr(e){return e===null?null:/^ *#/.test(e)?"hex":e.includes("rgb")?"rgb":e.includes("hsl")?"hsl":e.includes("hsv")?"hsv":null}function L0(e){return e=Math.round(e),e>=360?359:e<0?0:e}function H0(e){return e=Math.round(e*100)/100,e>1?1:e<0?0:e}const V0={rgb:{hex(e){return Kt(nt(e))},hsl(e){const[t,n,r,i]=nt(e);return qt([...Io(t,n,r),i])},hsv(e){const[t,n,r,i]=nt(e);return pn([...Ao(t,n,r),i])}},hex:{rgb(e){return Bt(nt(e))},hsl(e){const[t,n,r,i]=nt(e);return qt([...Io(t,n,r),i])},hsv(e){const[t,n,r,i]=nt(e);return pn([...Ao(t,n,r),i])}},hsl:{hex(e){const[t,n,r,i]=In(e);return Kt([...Fo(t,n,r),i])},rgb(e){const[t,n,r,i]=In(e);return Bt([...Fo(t,n,r),i])},hsv(e){const[t,n,r,i]=In(e);return pn([..._a(t,n,r),i])}},hsv:{hex(e){const[t,n,r,i]=hn(e);return Kt([...Ut(t,n,r),i])},rgb(e){const[t,n,r,i]=hn(e);return Bt([...Ut(t,n,r),i])},hsl(e){const[t,n,r,i]=hn(e);return qt([...Mr(t,n,r),i])}}};function sc(e,t,n){return n=n||wr(e),n?n===t?e:V0[n][t](e):null}const Kn="12px",j0=12,Rn="6px",W0=6,U0="linear-gradient(90deg,red,#ff0 16.66%,#0f0 33.33%,#0ff 50%,#00f 66.66%,#f0f 83.33%,red)",G0=o.defineComponent({name:"HueSlider",props:{clsPrefix:{type:String,required:!0},hue:{type:Number,required:!0},onUpdateHue:{type:Function,required:!0},onComplete:Function},setup(e){const t=o.ref(null);function n(a){t.value&&(ze("mousemove",document,r),ze("mouseup",document,i),r(a))}function r(a){const{value:l}=t;if(!l)return;const{width:s,left:c}=l.getBoundingClientRect(),d=L0((a.clientX-c-W0)/(s-j0)*360);e.onUpdateHue(d)}function i(){var a;ke("mousemove",document,r),ke("mouseup",document,i),(a=e.onComplete)===null||a===void 0||a.call(e)}return{railRef:t,handleMouseDown:n}},render(){const{clsPrefix:e}=this;return o.h("div",{class:`${e}-color-picker-slider`,style:{height:Kn,borderRadius:Rn}},o.h("div",{ref:"railRef",style:{boxShadow:"inset 0 0 2px 0 rgba(0, 0, 0, .24)",boxSizing:"border-box",backgroundImage:U0,height:Kn,borderRadius:Rn,position:"relative"},onMousedown:this.handleMouseDown},o.h("div",{style:{position:"absolute",left:Rn,right:Rn,top:0,bottom:0}},o.h("div",{class:`${e}-color-picker-handle`,style:{left:`calc((${this.hue}%) / 359 * 100 - ${Rn})`,borderRadius:Rn,width:Kn,height:Kn}},o.h("div",{class:`${e}-color-picker-handle__fill`,style:{backgroundColor:`hsl(${this.hue}, 100%, 50%)`,borderRadius:Rn,width:Kn,height:Kn}})))))}}),Cr="12px",q0=12,Pn="6px",K0=o.defineComponent({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=o.ref(null);function n(a){!t.value||!e.rgba||(ze("mousemove",document,r),ze("mouseup",document,i),r(a))}function r(a){const{value:l}=t;if(!l)return;const{width:s,left:c}=l.getBoundingClientRect(),d=(a.clientX-c)/(s-q0);e.onUpdateAlpha(H0(d))}function i(){var a;ke("mousemove",document,r),ke("mouseup",document,i),(a=e.onComplete)===null||a===void 0||a.call(e)}return{railRef:t,railBackgroundImage:o.computed(()=>{const{rgba:a}=e;return a?`linear-gradient(to right, rgba(${a[0]}, ${a[1]}, ${a[2]}, 0) 0%, rgba(${a[0]}, ${a[1]}, ${a[2]}, 1) 100%)`:""}),handleMouseDown:n}},render(){const{clsPrefix:e}=this;return o.h("div",{class:`${e}-color-picker-slider`,ref:"railRef",style:{height:Cr,borderRadius:Pn},onMousedown:this.handleMouseDown},o.h("div",{style:{borderRadius:Pn,position:"absolute",left:0,right:0,top:0,bottom:0,overflow:"hidden"}},o.h("div",{class:`${e}-color-picker-checkboard`}),o.h("div",{class:`${e}-color-picker-slider__image`,style:{backgroundImage:this.railBackgroundImage}})),this.rgba&&o.h("div",{style:{position:"absolute",left:Pn,right:Pn,top:0,bottom:0}},o.h("div",{class:`${e}-color-picker-handle`,style:{left:`calc(${this.alpha*100}% - ${Pn})`,borderRadius:Pn,width:Cr,height:Cr}},o.h("div",{class:`${e}-color-picker-handle__fill`,style:{backgroundColor:Bt(this.rgba),borderRadius:Pn,width:Cr,height:Cr}}))))}}),vo="12px",xo="6px",X0=o.defineComponent({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=o.ref(null);function n(a){t.value&&(ze("mousemove",document,r),ze("mouseup",document,i),r(a))}function r(a){const{value:l}=t;if(!l)return;const{width:s,height:c,left:d,bottom:u}=l.getBoundingClientRect(),f=(u-a.clientY)/c,p=(a.clientX-d)/s,b=100*(p>1?1:p<0?0:p),h=100*(f>1?1:f<0?0:f);e.onUpdateSV(b,h)}function i(){var a;ke("mousemove",document,r),ke("mouseup",document,i),(a=e.onComplete)===null||a===void 0||a.call(e)}return{palleteRef:t,handleColor:o.computed(()=>{const{rgba:a}=e;return a?`rgb(${a[0]}, ${a[1]}, ${a[2]})`:""}),handleMouseDown:n}},render(){const{clsPrefix:e}=this;return o.h("div",{class:`${e}-color-picker-pallete`,onMousedown:this.handleMouseDown,ref:"palleteRef"},o.h("div",{class:`${e}-color-picker-pallete__layer`,style:{backgroundImage:`linear-gradient(90deg, white, hsl(${this.displayedHue}, 100%, 50%))`}}),o.h("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&&o.h("div",{class:`${e}-color-picker-handle`,style:{width:vo,height:vo,borderRadius:xo,left:`calc(${this.displayedSv[0]}% - ${xo})`,bottom:`calc(${this.displayedSv[1]}% - ${xo})`}},o.h("div",{class:`${e}-color-picker-handle__fill`,style:{backgroundColor:this.handleColor,borderRadius:xo,width:vo,height:vo}})))}}),Yi="n-color-picker";function Y0(e){return/^\d{1,3}\.?\d*$/.test(e.trim())?Math.max(0,Math.min(Number.parseInt(e),255)):!1}function Z0(e){return/^\d{1,3}\.?\d*$/.test(e.trim())?Math.max(0,Math.min(Number.parseInt(e),360)):!1}function J0(e){return/^\d{1,3}\.?\d*$/.test(e.trim())?Math.max(0,Math.min(Number.parseInt(e),100)):!1}function Q0(e){const t=e.trim();return/^#[0-9a-fA-F]+$/.test(t)?[4,5,7,9].includes(t.length):!1}function ex(e){return/^\d{1,3}\.?\d*%$/.test(e.trim())?Math.max(0,Math.min(Number.parseInt(e)/100,100)):!1}const tx={paddingSmall:"0 4px"},cc=o.defineComponent({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=o.ref(""),{themeRef:n}=o.inject(Yi,null);o.watchEffect(()=>{t.value=r()});function r(){const{value:l}=e;if(l===null)return"";const{label:s}=e;return s==="HEX"?l:s==="A"?`${Math.floor(l*100)}%`:String(Math.floor(l))}function i(l){t.value=l}function a(l){let s,c;switch(e.label){case"HEX":c=Q0(l),c&&e.onUpdateValue(l),t.value=r();break;case"H":s=Z0(l),s===!1?t.value=r():e.onUpdateValue(s);break;case"S":case"L":case"V":s=J0(l),s===!1?t.value=r():e.onUpdateValue(s);break;case"A":s=ex(l),s===!1?t.value=r():e.onUpdateValue(s);break;case"R":case"G":case"B":s=Y0(l),s===!1?t.value=r():e.onUpdateValue(s);break}}return{mergedTheme:n,inputValue:t,handleInputChange:a,handleInputUpdateValue:i}},render(){const{mergedTheme:e}=this;return o.h(yr,{size:"small",placeholder:this.label,theme:e.peers.Input,themeOverrides:e.peerOverrides.Input,builtinThemeOverrides:tx,value:this.inputValue,onUpdateValue:this.handleInputUpdateValue,onChange:this.handleInputChange,style:this.label==="A"?"flex-grow: 1.25;":""})}}),nx=o.defineComponent({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:r}=e;if(e.mode==="hex"){e.onUpdateValue((r?Kt:nr)(n));return}let i;switch(e.valueArr===null?i=[0,0,0,0]:i=Array.from(e.valueArr),e.mode){case"hsv":i[t]=n,e.onUpdateValue((r?pn:Uo)(i));break;case"rgb":i[t]=n,e.onUpdateValue((r?Bt:Wo)(i));break;case"hsl":i[t]=n,e.onUpdateValue((r?qt:Go)(i));break}}}},render(){const{clsPrefix:e,modes:t}=this;return o.h("div",{class:`${e}-color-picker-input`},o.h("div",{class:`${e}-color-picker-input__mode`,onClick:this.onUpdateMode,style:{cursor:t.length===1?"":"pointer"}},this.mode.toUpperCase()+(this.showAlpha?"A":"")),o.h(B0,null,{default:()=>{const{mode:n,valueArr:r,showAlpha:i}=this;if(n==="hex"){let a=null;try{a=r===null?null:(i?Kt:nr)(r)}catch{}return o.h(cc,{label:"HEX",showAlpha:i,value:a,onUpdateValue:l=>{this.handleUnitUpdateValue(0,l)}})}return(n+(i?"a":"")).split("").map((a,l)=>o.h(cc,{label:a.toUpperCase(),value:r===null?null:r[l],onUpdateValue:s=>{this.handleUnitUpdateValue(l,s)}}))}}))}}),rx=o.defineComponent({name:"ColorPickerTrigger",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}=o.inject(Yi,null);return()=>{const{hsla:r,value:i,clsPrefix:a,onClick:l,disabled:s}=e,c=t.label||n.value;return o.h("div",{class:[`${a}-color-picker-trigger`,s&&`${a}-color-picker-trigger--disabled`],onClick:s?void 0:l},o.h("div",{class:`${a}-color-picker-trigger__fill`},o.h("div",{class:`${a}-color-picker-checkboard`}),o.h("div",{style:{position:"absolute",left:0,right:0,top:0,bottom:0,backgroundColor:r?qt(r):""}}),i&&r?o.h("div",{class:`${a}-color-picker-trigger__value`,style:{color:r[2]>50||r[3]<.5?"black":"white"}},c?c(i):i):null))}}});function ox(e,t){if(t==="hsv"){const[n,r,i,a]=hn(e);return Bt([...Ut(n,r,i),a])}return e}function ix(e){const t=document.createElement("canvas").getContext("2d");return t?(t.fillStyle=e,t.fillStyle):"#000000"}const ax=o.defineComponent({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=o.computed(()=>e.swatches.map(a=>{const l=wr(a);return{value:a,mode:l,legalValue:ox(a,l)}}));function n(a){const{mode:l}=e;let{value:s,mode:c}=a;return c||(c="hex",/^[a-zA-Z]+$/.test(s)?s=ix(s):(rr("color-picker",`color ${s} in swatches is invalid.`),s="#000000")),c===l?s:sc(s,l,c)}function r(a){e.onUpdateColor(n(a))}function i(a,l){a.key==="Enter"&&r(l)}return{parsedSwatchesRef:t,handleSwatchSelect:r,handleSwatchKeyDown:i}},render(){const{clsPrefix:e}=this;return o.h("div",{class:`${e}-color-picker-swatches`},this.parsedSwatchesRef.map(t=>o.h("div",{class:`${e}-color-picker-swatch`,tabindex:0,onClick:()=>{this.handleSwatchSelect(t)},onKeydown:n=>{this.handleSwatchKeyDown(n,t)}},o.h("div",{class:`${e}-color-picker-swatch__fill`,style:{background:t.legalValue}}))))}}),lx=o.defineComponent({name:"ColorPreview",props:{clsPrefix:{type:String,required:!0},mode:{type:String,required:!0},color:{type:String,default:null,validator:e=>{const t=wr(e);return!!(!e||t&&t!=="hsv")}},onUpdateColor:{type:Function,required:!0}},setup(e){function t(n){var r;const i=n.target.value;(r=e.onUpdateColor)===null||r===void 0||r.call(e,sc(i.toUpperCase(),e.mode,"hex")),n.stopPropagation()}return{handleChange:t}},render(){const{clsPrefix:e}=this;return o.h("div",{class:`${e}-color-picker-preview__preview`},o.h("span",{class:`${e}-color-picker-preview__fill`,style:{background:this.color||"#000000"}}),o.h("input",{class:`${e}-color-picker-preview__input`,type:"color",value:this.color,onChange:this.handleChange}))}}),sx=I([w("color-picker",`
|
|
1160
|
+
`),W("dashed",[P("border, state-border",{borderStyle:"dashed !important"})]),W("disabled",{cursor:"not-allowed",opacity:"var(--n-opacity-disabled)"})]),I("@keyframes button-wave-spread",{from:{boxShadow:"0 0 0.5px 0 var(--n-ripple-color)"},to:{boxShadow:"0 0 0.5px 4.5px var(--n-ripple-color)"}}),I("@keyframes button-wave-opacity",{from:{opacity:"var(--n-wave-opacity)"},to:{opacity:0}})]),F0=Object.assign(Object.assign({},Ce.props),{color:String,textColor:String,text:Boolean,block:Boolean,loading:Boolean,disabled:Boolean,circle:Boolean,size:String,ghost:Boolean,round:Boolean,secondary:Boolean,tertiary:Boolean,quaternary:Boolean,strong:Boolean,focusable:{type:Boolean,default:!0},keyboard:{type:Boolean,default:!0},tag:{type:String,default:"button"},type:{type:String,default:"default"},dashed:Boolean,renderIcon:Function,iconPlacement:{type:String,default:"left"},attrType:{type:String,default:"button"},bordered:{type:Boolean,default:!0},onClick:[Function,Array],nativeFocusBehavior:{type:Boolean,default:!ic}}),Ht=o.defineComponent({name:"Button",props:F0,setup(e){process.env.NODE_ENV!=="production"&&o.watchEffect(()=>{const{dashed:$,ghost:T,text:O,secondary:m,tertiary:S,quaternary:M}=e;($||T||O)&&(m||S||M)&&ot("button","`dashed`, `ghost` and `text` props can't be used along with `secondary`, `tertiary` and `quaternary` props.")});const t=o.ref(null),n=o.ref(null),r=o.ref(!1),i=Je(()=>!e.quaternary&&!e.tertiary&&!e.secondary&&!e.text&&(!e.color||e.ghost||e.dashed)&&e.bordered),a=o.inject(M0,{}),{mergedSizeRef:l}=vn({},{defaultSize:"medium",mergedSize:$=>{const{size:T}=e;if(T)return T;const{size:O}=a;if(O)return O;const{mergedSize:m}=$||{};return m?m.value:"medium"}}),s=o.computed(()=>e.focusable&&!e.disabled),c=$=>{var T;s.value||$.preventDefault(),!e.nativeFocusBehavior&&($.preventDefault(),!e.disabled&&s.value&&((T=t.value)===null||T===void 0||T.focus({preventScroll:!0})))},d=$=>{var T;if(!e.disabled&&!e.loading){const{onClick:O}=e;O&&de(O,$),e.text||(T=n.value)===null||T===void 0||T.play()}},u=$=>{switch($.key){case"Enter":if(!e.keyboard)return;r.value=!1}},f=$=>{switch($.key){case"Enter":if(!e.keyboard||e.loading){$.preventDefault();return}r.value=!0}},p=()=>{r.value=!1},{inlineThemeDisabled:b,mergedClsPrefixRef:h,mergedRtlRef:x}=Ye(e),v=Ce("Button","-button",I0,Xi,e,h),g=tn("Button",x,h),k=o.computed(()=>{const $=v.value,{common:{cubicBezierEaseInOut:T,cubicBezierEaseOut:O},self:m}=$,{rippleDuration:S,opacityDisabled:M,fontWeight:N,fontWeightStrong:A}=m,L=l.value,{dashed:U,type:J,ghost:j,text:Q,color:Y,round:ie,circle:me,textColor:ae,secondary:he,tertiary:G,quaternary:te,strong:xe}=e,Se={"font-weight":xe?A:N};let oe={"--n-color":"initial","--n-color-hover":"initial","--n-color-pressed":"initial","--n-color-focus":"initial","--n-color-disabled":"initial","--n-ripple-color":"initial","--n-text-color":"initial","--n-text-color-hover":"initial","--n-text-color-pressed":"initial","--n-text-color-focus":"initial","--n-text-color-disabled":"initial"};const Te=J==="tertiary",$e=J==="default",se=Te?"default":J;if(Q){const _=ae||Y;oe={"--n-color":"#0000","--n-color-hover":"#0000","--n-color-pressed":"#0000","--n-color-focus":"#0000","--n-color-disabled":"#0000","--n-ripple-color":"#0000","--n-text-color":_||m[ee("textColorText",se)],"--n-text-color-hover":_?kn(_):m[ee("textColorTextHover",se)],"--n-text-color-pressed":_?go(_):m[ee("textColorTextPressed",se)],"--n-text-color-focus":_?kn(_):m[ee("textColorTextHover",se)],"--n-text-color-disabled":_||m[ee("textColorTextDisabled",se)]}}else if(j||U){const _=ae||Y;oe={"--n-color":"#0000","--n-color-hover":"#0000","--n-color-pressed":"#0000","--n-color-focus":"#0000","--n-color-disabled":"#0000","--n-ripple-color":Y||m[ee("rippleColor",se)],"--n-text-color":_||m[ee("textColorGhost",se)],"--n-text-color-hover":_?kn(_):m[ee("textColorGhostHover",se)],"--n-text-color-pressed":_?go(_):m[ee("textColorGhostPressed",se)],"--n-text-color-focus":_?kn(_):m[ee("textColorGhostHover",se)],"--n-text-color-disabled":_||m[ee("textColorGhostDisabled",se)]}}else if(he){const _=$e?m.textColor:Te?m.textColorTertiary:m[ee("color",se)],D=Y||_,K=J!=="default"&&J!=="tertiary";oe={"--n-color":K?ve(D,{alpha:Number(m.colorOpacitySecondary)}):m.colorSecondary,"--n-color-hover":K?ve(D,{alpha:Number(m.colorOpacitySecondaryHover)}):m.colorSecondaryHover,"--n-color-pressed":K?ve(D,{alpha:Number(m.colorOpacitySecondaryPressed)}):m.colorSecondaryPressed,"--n-color-focus":K?ve(D,{alpha:Number(m.colorOpacitySecondaryHover)}):m.colorSecondaryHover,"--n-color-disabled":m.colorSecondary,"--n-ripple-color":"#0000","--n-text-color":D,"--n-text-color-hover":D,"--n-text-color-pressed":D,"--n-text-color-focus":D,"--n-text-color-disabled":D}}else if(G||te){const _=$e?m.textColor:Te?m.textColorTertiary:m[ee("color",se)],D=Y||_;G?(oe["--n-color"]=m.colorTertiary,oe["--n-color-hover"]=m.colorTertiaryHover,oe["--n-color-pressed"]=m.colorTertiaryPressed,oe["--n-color-focus"]=m.colorSecondaryHover,oe["--n-color-disabled"]=m.colorTertiary):(oe["--n-color"]=m.colorQuaternary,oe["--n-color-hover"]=m.colorQuaternaryHover,oe["--n-color-pressed"]=m.colorQuaternaryPressed,oe["--n-color-focus"]=m.colorQuaternaryHover,oe["--n-color-disabled"]=m.colorQuaternary),oe["--n-ripple-color"]="#0000",oe["--n-text-color"]=D,oe["--n-text-color-hover"]=D,oe["--n-text-color-pressed"]=D,oe["--n-text-color-focus"]=D,oe["--n-text-color-disabled"]=D}else oe={"--n-color":Y||m[ee("color",se)],"--n-color-hover":Y?kn(Y):m[ee("colorHover",se)],"--n-color-pressed":Y?go(Y):m[ee("colorPressed",se)],"--n-color-focus":Y?kn(Y):m[ee("colorFocus",se)],"--n-color-disabled":Y||m[ee("colorDisabled",se)],"--n-ripple-color":Y||m[ee("rippleColor",se)],"--n-text-color":ae||(Y?m.textColorPrimary:Te?m.textColorTertiary:m[ee("textColor",se)]),"--n-text-color-hover":ae||(Y?m.textColorHoverPrimary:m[ee("textColorHover",se)]),"--n-text-color-pressed":ae||(Y?m.textColorPressedPrimary:m[ee("textColorPressed",se)]),"--n-text-color-focus":ae||(Y?m.textColorFocusPrimary:m[ee("textColorFocus",se)]),"--n-text-color-disabled":ae||(Y?m.textColorDisabledPrimary:m[ee("textColorDisabled",se)])};let Ae={"--n-border":"initial","--n-border-hover":"initial","--n-border-pressed":"initial","--n-border-focus":"initial","--n-border-disabled":"initial"};Q?Ae={"--n-border":"none","--n-border-hover":"none","--n-border-pressed":"none","--n-border-focus":"none","--n-border-disabled":"none"}:Ae={"--n-border":m[ee("border",se)],"--n-border-hover":m[ee("borderHover",se)],"--n-border-pressed":m[ee("borderPressed",se)],"--n-border-focus":m[ee("borderFocus",se)],"--n-border-disabled":m[ee("borderDisabled",se)]};const{[ee("height",L)]:Be,[ee("fontSize",L)]:We,[ee("padding",L)]:Ie,[ee("paddingRound",L)]:Le,[ee("iconSize",L)]:Ke,[ee("borderRadius",L)]:Re,[ee("iconMargin",L)]:X,waveOpacity:F}=m,ne={"--n-width":me&&!Q?Be:"initial","--n-height":Q?"initial":Be,"--n-font-size":We,"--n-padding":me||Q?"initial":ie?Le:Ie,"--n-icon-size":Ke,"--n-icon-margin":X,"--n-border-radius":Q?"initial":me||ie?Be:Re};return Object.assign(Object.assign(Object.assign(Object.assign({"--n-bezier":T,"--n-bezier-ease-out":O,"--n-ripple-duration":S,"--n-opacity-disabled":M,"--n-wave-opacity":F},Se),oe),Ae),ne)}),z=b?rt("button",o.computed(()=>{let $="";const{dashed:T,type:O,ghost:m,text:S,color:M,round:N,circle:A,textColor:L,secondary:U,tertiary:J,quaternary:j,strong:Q}=e;T&&($+="a"),m&&($+="b"),S&&($+="c"),N&&($+="d"),A&&($+="e"),U&&($+="f"),J&&($+="g"),j&&($+="h"),Q&&($+="i"),M&&($+=`j${Ar(M)}`),L&&($+=`k${Ar(L)}`);const{value:Y}=l;return $+=`l${Y[0]}`,$+=`m${O[0]}`,$}),k,e):void 0;return{selfElRef:t,waveElRef:n,mergedClsPrefix:h,mergedFocusable:s,mergedSize:l,showBorder:i,enterPressed:r,rtlEnabled:g,handleMousedown:c,handleKeydown:f,handleBlur:p,handleKeyup:u,handleClick:d,customColorCssVars:o.computed(()=>{const{color:$}=e;if(!$)return null;const T=kn($);return{"--n-border-color":$,"--n-border-color-hover":T,"--n-border-color-pressed":go($),"--n-border-color-focus":T,"--n-border-color-disabled":$}}),cssVars:b?void 0:k,themeClass:z==null?void 0:z.themeClass,onRender:z==null?void 0:z.onRender}},render(){const{mergedClsPrefix:e,tag:t,onRender:n}=this;n==null||n();const r=Fe(this.$slots.default,i=>i&&o.h("span",{class:`${e}-button__content`},i));return o.h(t,{ref:"selfElRef",class:[this.themeClass,`${e}-button`,`${e}-button--${this.type}-type`,`${e}-button--${this.mergedSize}-type`,this.rtlEnabled&&`${e}-button--rtl`,this.disabled&&`${e}-button--disabled`,this.block&&`${e}-button--block`,this.enterPressed&&`${e}-button--pressed`,!this.text&&this.dashed&&`${e}-button--dashed`,this.color&&`${e}-button--color`,this.secondary&&`${e}-button--secondary`,this.loading&&`${e}-button--loading`,this.ghost&&`${e}-button--ghost`],tabindex:this.mergedFocusable?0:-1,type:this.attrType,style:this.cssVars,disabled:this.disabled,onClick:this.handleClick,onBlur:this.handleBlur,onMousedown:this.handleMousedown,onKeyup:this.handleKeyup,onKeydown:this.handleKeydown},this.iconPlacement==="right"&&r,o.h(Fs,{width:!0},{default:()=>Fe(this.$slots.icon,i=>(this.loading||this.renderIcon||i)&&o.h("span",{class:`${e}-button__icon`,style:{margin:Dn(this.$slots.default)?"0":""}},o.h(fo,null,{default:()=>this.loading?o.h(ho,{clsPrefix:e,key:"loading",class:`${e}-icon-slot`,strokeWidth:20}):o.h("div",{key:"icon",class:`${e}-icon-slot`,role:"none"},this.renderIcon?this.renderIcon():i)})))}),this.iconPlacement==="left"&&r,this.text?null:o.h(Vv,{ref:"waveElRef",clsPrefix:e}),this.showBorder?o.h("div",{"aria-hidden":!0,class:`${e}-button__border`,style:this.customColorCssVars}):null,this.showBorder?o.h("div",{"aria-hidden":!0,class:`${e}-button__state-border`,style:this.customColorCssVars}):null)}}),sc=Ht;function D0(e){const{fontSize:t,boxShadow2:n,popoverColor:r,textColor2:i,borderRadius:a,borderColor:l,heightSmall:s,heightMedium:c,heightLarge:d,fontSizeSmall:u,fontSizeMedium:f,fontSizeLarge:p,dividerColor:b}=e;return{panelFontSize:t,boxShadow:n,color:r,textColor:i,borderRadius:a,border:`1px solid ${l}`,heightSmall:s,heightMedium:c,heightLarge:d,fontSizeSmall:u,fontSizeMedium:f,fontSizeLarge:p,dividerColor:b}}const N0={name:"ColorPicker",common:Qe,peers:{Input:Ki,Button:Xi},self:D0};function L0(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 process.env.NODE_ENV!=="production"&&rr("color-picker","props.modes is invalid."),"#000000"}function wr(e){return e===null?null:/^ *#/.test(e)?"hex":e.includes("rgb")?"rgb":e.includes("hsl")?"hsl":e.includes("hsv")?"hsv":null}function H0(e){return e=Math.round(e),e>=360?359:e<0?0:e}function V0(e){return e=Math.round(e*100)/100,e>1?1:e<0?0:e}const j0={rgb:{hex(e){return Kt(nt(e))},hsl(e){const[t,n,r,i]=nt(e);return qt([...Io(t,n,r),i])},hsv(e){const[t,n,r,i]=nt(e);return pn([...Ao(t,n,r),i])}},hex:{rgb(e){return Bt(nt(e))},hsl(e){const[t,n,r,i]=nt(e);return qt([...Io(t,n,r),i])},hsv(e){const[t,n,r,i]=nt(e);return pn([...Ao(t,n,r),i])}},hsl:{hex(e){const[t,n,r,i]=In(e);return Kt([...Fo(t,n,r),i])},rgb(e){const[t,n,r,i]=In(e);return Bt([...Fo(t,n,r),i])},hsv(e){const[t,n,r,i]=In(e);return pn([...Ma(t,n,r),i])}},hsv:{hex(e){const[t,n,r,i]=hn(e);return Kt([...Ut(t,n,r),i])},rgb(e){const[t,n,r,i]=hn(e);return Bt([...Ut(t,n,r),i])},hsl(e){const[t,n,r,i]=hn(e);return qt([...Mr(t,n,r),i])}}};function cc(e,t,n){return n=n||wr(e),n?n===t?e:j0[n][t](e):null}const Kn="12px",W0=12,Rn="6px",U0=6,G0="linear-gradient(90deg,red,#ff0 16.66%,#0f0 33.33%,#0ff 50%,#00f 66.66%,#f0f 83.33%,red)",q0=o.defineComponent({name:"HueSlider",props:{clsPrefix:{type:String,required:!0},hue:{type:Number,required:!0},onUpdateHue:{type:Function,required:!0},onComplete:Function},setup(e){const t=o.ref(null);function n(a){t.value&&(ze("mousemove",document,r),ze("mouseup",document,i),r(a))}function r(a){const{value:l}=t;if(!l)return;const{width:s,left:c}=l.getBoundingClientRect(),d=H0((a.clientX-c-U0)/(s-W0)*360);e.onUpdateHue(d)}function i(){var a;ke("mousemove",document,r),ke("mouseup",document,i),(a=e.onComplete)===null||a===void 0||a.call(e)}return{railRef:t,handleMouseDown:n}},render(){const{clsPrefix:e}=this;return o.h("div",{class:`${e}-color-picker-slider`,style:{height:Kn,borderRadius:Rn}},o.h("div",{ref:"railRef",style:{boxShadow:"inset 0 0 2px 0 rgba(0, 0, 0, .24)",boxSizing:"border-box",backgroundImage:G0,height:Kn,borderRadius:Rn,position:"relative"},onMousedown:this.handleMouseDown},o.h("div",{style:{position:"absolute",left:Rn,right:Rn,top:0,bottom:0}},o.h("div",{class:`${e}-color-picker-handle`,style:{left:`calc((${this.hue}%) / 359 * 100 - ${Rn})`,borderRadius:Rn,width:Kn,height:Kn}},o.h("div",{class:`${e}-color-picker-handle__fill`,style:{backgroundColor:`hsl(${this.hue}, 100%, 50%)`,borderRadius:Rn,width:Kn,height:Kn}})))))}}),Cr="12px",K0=12,Pn="6px",X0=o.defineComponent({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=o.ref(null);function n(a){!t.value||!e.rgba||(ze("mousemove",document,r),ze("mouseup",document,i),r(a))}function r(a){const{value:l}=t;if(!l)return;const{width:s,left:c}=l.getBoundingClientRect(),d=(a.clientX-c)/(s-K0);e.onUpdateAlpha(V0(d))}function i(){var a;ke("mousemove",document,r),ke("mouseup",document,i),(a=e.onComplete)===null||a===void 0||a.call(e)}return{railRef:t,railBackgroundImage:o.computed(()=>{const{rgba:a}=e;return a?`linear-gradient(to right, rgba(${a[0]}, ${a[1]}, ${a[2]}, 0) 0%, rgba(${a[0]}, ${a[1]}, ${a[2]}, 1) 100%)`:""}),handleMouseDown:n}},render(){const{clsPrefix:e}=this;return o.h("div",{class:`${e}-color-picker-slider`,ref:"railRef",style:{height:Cr,borderRadius:Pn},onMousedown:this.handleMouseDown},o.h("div",{style:{borderRadius:Pn,position:"absolute",left:0,right:0,top:0,bottom:0,overflow:"hidden"}},o.h("div",{class:`${e}-color-picker-checkboard`}),o.h("div",{class:`${e}-color-picker-slider__image`,style:{backgroundImage:this.railBackgroundImage}})),this.rgba&&o.h("div",{style:{position:"absolute",left:Pn,right:Pn,top:0,bottom:0}},o.h("div",{class:`${e}-color-picker-handle`,style:{left:`calc(${this.alpha*100}% - ${Pn})`,borderRadius:Pn,width:Cr,height:Cr}},o.h("div",{class:`${e}-color-picker-handle__fill`,style:{backgroundColor:Bt(this.rgba),borderRadius:Pn,width:Cr,height:Cr}}))))}}),vo="12px",xo="6px",Y0=o.defineComponent({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=o.ref(null);function n(a){t.value&&(ze("mousemove",document,r),ze("mouseup",document,i),r(a))}function r(a){const{value:l}=t;if(!l)return;const{width:s,height:c,left:d,bottom:u}=l.getBoundingClientRect(),f=(u-a.clientY)/c,p=(a.clientX-d)/s,b=100*(p>1?1:p<0?0:p),h=100*(f>1?1:f<0?0:f);e.onUpdateSV(b,h)}function i(){var a;ke("mousemove",document,r),ke("mouseup",document,i),(a=e.onComplete)===null||a===void 0||a.call(e)}return{palleteRef:t,handleColor:o.computed(()=>{const{rgba:a}=e;return a?`rgb(${a[0]}, ${a[1]}, ${a[2]})`:""}),handleMouseDown:n}},render(){const{clsPrefix:e}=this;return o.h("div",{class:`${e}-color-picker-pallete`,onMousedown:this.handleMouseDown,ref:"palleteRef"},o.h("div",{class:`${e}-color-picker-pallete__layer`,style:{backgroundImage:`linear-gradient(90deg, white, hsl(${this.displayedHue}, 100%, 50%))`}}),o.h("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&&o.h("div",{class:`${e}-color-picker-handle`,style:{width:vo,height:vo,borderRadius:xo,left:`calc(${this.displayedSv[0]}% - ${xo})`,bottom:`calc(${this.displayedSv[1]}% - ${xo})`}},o.h("div",{class:`${e}-color-picker-handle__fill`,style:{backgroundColor:this.handleColor,borderRadius:xo,width:vo,height:vo}})))}}),Yi="n-color-picker";function Z0(e){return/^\d{1,3}\.?\d*$/.test(e.trim())?Math.max(0,Math.min(Number.parseInt(e),255)):!1}function J0(e){return/^\d{1,3}\.?\d*$/.test(e.trim())?Math.max(0,Math.min(Number.parseInt(e),360)):!1}function Q0(e){return/^\d{1,3}\.?\d*$/.test(e.trim())?Math.max(0,Math.min(Number.parseInt(e),100)):!1}function ex(e){const t=e.trim();return/^#[0-9a-fA-F]+$/.test(t)?[4,5,7,9].includes(t.length):!1}function tx(e){return/^\d{1,3}\.?\d*%$/.test(e.trim())?Math.max(0,Math.min(Number.parseInt(e)/100,100)):!1}const nx={paddingSmall:"0 4px"},dc=o.defineComponent({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=o.ref(""),{themeRef:n}=o.inject(Yi,null);o.watchEffect(()=>{t.value=r()});function r(){const{value:l}=e;if(l===null)return"";const{label:s}=e;return s==="HEX"?l:s==="A"?`${Math.floor(l*100)}%`:String(Math.floor(l))}function i(l){t.value=l}function a(l){let s,c;switch(e.label){case"HEX":c=ex(l),c&&e.onUpdateValue(l),t.value=r();break;case"H":s=J0(l),s===!1?t.value=r():e.onUpdateValue(s);break;case"S":case"L":case"V":s=Q0(l),s===!1?t.value=r():e.onUpdateValue(s);break;case"A":s=tx(l),s===!1?t.value=r():e.onUpdateValue(s);break;case"R":case"G":case"B":s=Z0(l),s===!1?t.value=r():e.onUpdateValue(s);break}}return{mergedTheme:n,inputValue:t,handleInputChange:a,handleInputUpdateValue:i}},render(){const{mergedTheme:e}=this;return o.h(yr,{size:"small",placeholder:this.label,theme:e.peers.Input,themeOverrides:e.peerOverrides.Input,builtinThemeOverrides:nx,value:this.inputValue,onUpdateValue:this.handleInputUpdateValue,onChange:this.handleInputChange,style:this.label==="A"?"flex-grow: 1.25;":""})}}),rx=o.defineComponent({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:r}=e;if(e.mode==="hex"){e.onUpdateValue((r?Kt:nr)(n));return}let i;switch(e.valueArr===null?i=[0,0,0,0]:i=Array.from(e.valueArr),e.mode){case"hsv":i[t]=n,e.onUpdateValue((r?pn:Uo)(i));break;case"rgb":i[t]=n,e.onUpdateValue((r?Bt:Wo)(i));break;case"hsl":i[t]=n,e.onUpdateValue((r?qt:Go)(i));break}}}},render(){const{clsPrefix:e,modes:t}=this;return o.h("div",{class:`${e}-color-picker-input`},o.h("div",{class:`${e}-color-picker-input__mode`,onClick:this.onUpdateMode,style:{cursor:t.length===1?"":"pointer"}},this.mode.toUpperCase()+(this.showAlpha?"A":"")),o.h(_0,null,{default:()=>{const{mode:n,valueArr:r,showAlpha:i}=this;if(n==="hex"){let a=null;try{a=r===null?null:(i?Kt:nr)(r)}catch{}return o.h(dc,{label:"HEX",showAlpha:i,value:a,onUpdateValue:l=>{this.handleUnitUpdateValue(0,l)}})}return(n+(i?"a":"")).split("").map((a,l)=>o.h(dc,{label:a.toUpperCase(),value:r===null?null:r[l],onUpdateValue:s=>{this.handleUnitUpdateValue(l,s)}}))}}))}}),ox=o.defineComponent({name:"ColorPickerTrigger",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}=o.inject(Yi,null);return()=>{const{hsla:r,value:i,clsPrefix:a,onClick:l,disabled:s}=e,c=t.label||n.value;return o.h("div",{class:[`${a}-color-picker-trigger`,s&&`${a}-color-picker-trigger--disabled`],onClick:s?void 0:l},o.h("div",{class:`${a}-color-picker-trigger__fill`},o.h("div",{class:`${a}-color-picker-checkboard`}),o.h("div",{style:{position:"absolute",left:0,right:0,top:0,bottom:0,backgroundColor:r?qt(r):""}}),i&&r?o.h("div",{class:`${a}-color-picker-trigger__value`,style:{color:r[2]>50||r[3]<.5?"black":"white"}},c?c(i):i):null))}}});function ix(e,t){if(t==="hsv"){const[n,r,i,a]=hn(e);return Bt([...Ut(n,r,i),a])}return e}function ax(e){const t=document.createElement("canvas").getContext("2d");return t?(t.fillStyle=e,t.fillStyle):"#000000"}const lx=o.defineComponent({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=o.computed(()=>e.swatches.map(a=>{const l=wr(a);return{value:a,mode:l,legalValue:ix(a,l)}}));function n(a){const{mode:l}=e;let{value:s,mode:c}=a;return c||(c="hex",/^[a-zA-Z]+$/.test(s)?s=ax(s):(rr("color-picker",`color ${s} in swatches is invalid.`),s="#000000")),c===l?s:cc(s,l,c)}function r(a){e.onUpdateColor(n(a))}function i(a,l){a.key==="Enter"&&r(l)}return{parsedSwatchesRef:t,handleSwatchSelect:r,handleSwatchKeyDown:i}},render(){const{clsPrefix:e}=this;return o.h("div",{class:`${e}-color-picker-swatches`},this.parsedSwatchesRef.map(t=>o.h("div",{class:`${e}-color-picker-swatch`,tabindex:0,onClick:()=>{this.handleSwatchSelect(t)},onKeydown:n=>{this.handleSwatchKeyDown(n,t)}},o.h("div",{class:`${e}-color-picker-swatch__fill`,style:{background:t.legalValue}}))))}}),sx=o.defineComponent({name:"ColorPreview",props:{clsPrefix:{type:String,required:!0},mode:{type:String,required:!0},color:{type:String,default:null,validator:e=>{const t=wr(e);return!!(!e||t&&t!=="hsv")}},onUpdateColor:{type:Function,required:!0}},setup(e){function t(n){var r;const i=n.target.value;(r=e.onUpdateColor)===null||r===void 0||r.call(e,cc(i.toUpperCase(),e.mode,"hex")),n.stopPropagation()}return{handleChange:t}},render(){const{clsPrefix:e}=this;return o.h("div",{class:`${e}-color-picker-preview__preview`},o.h("span",{class:`${e}-color-picker-preview__fill`,style:{background:this.color||"#000000"}}),o.h("input",{class:`${e}-color-picker-preview__input`,type:"color",value:this.color,onChange:this.handleChange}))}}),cx=I([w("color-picker",`
|
|
1161
1161
|
display: inline-block;
|
|
1162
1162
|
box-sizing: border-box;
|
|
1163
1163
|
height: var(--n-height);
|
|
@@ -1337,7 +1337,7 @@ ${t}
|
|
|
1337
1337
|
background: inherit;
|
|
1338
1338
|
filter: blur(2px);
|
|
1339
1339
|
content: "";
|
|
1340
|
-
`)])])])])]),
|
|
1340
|
+
`)])])])])]),dx=Object.assign(Object.assign({},Ce.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:lt.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]}),ux=o.defineComponent({name:"ColorPicker",props:dx,setup(e,{slots:t}){const n=o.ref(null);let r=null;const i=vn(e),{mergedSizeRef:a,mergedDisabledRef:l}=i,{localeRef:s}=vr("global"),{mergedClsPrefixRef:c,namespaceRef:d,inlineThemeDisabled:u}=Ye(e),f=Ce("ColorPicker","-color-picker",cx,N0,e,c);o.provide(Yi,{themeRef:f,renderLabelRef:o.toRef(e,"renderLabel"),colorPickerSlots:t});const p=o.ref(e.defaultShow),b=St(o.toRef(e,"show"),p);function h(F){const{onUpdateShow:ne,"onUpdate:show":_}=e;ne&&de(ne,F),_&&de(_,F),p.value=F}const{defaultValue:x}=e,v=o.ref(x===void 0?L0(e.modes,e.showAlpha):x),g=St(o.toRef(e,"value"),v),k=o.ref([g.value]),z=o.ref(0),$=o.computed(()=>wr(g.value)),{modes:T}=e,O=o.ref(wr(g.value)||T[0]||"rgb");function m(){const{modes:F}=e,{value:ne}=O,_=F.findIndex(D=>D===ne);~_?O.value=F[(_+1)%F.length]:O.value="rgb"}let S,M,N,A,L,U,J,j;const Q=o.computed(()=>{const{value:F}=g;if(!F)return null;switch($.value){case"hsv":return hn(F);case"hsl":return[S,M,N,j]=In(F),[...Ma(S,M,N),j];case"rgb":case"hex":return[L,U,J,j]=nt(F),[...Ao(L,U,J),j]}}),Y=o.computed(()=>{const{value:F}=g;if(!F)return null;switch($.value){case"rgb":case"hex":return nt(F);case"hsv":return[S,M,A,j]=hn(F),[...Ut(S,M,A),j];case"hsl":return[S,M,N,j]=In(F),[...Fo(S,M,N),j]}}),ie=o.computed(()=>{const{value:F}=g;if(!F)return null;switch($.value){case"hsl":return In(F);case"hsv":return[S,M,A,j]=hn(F),[...Mr(S,M,A),j];case"rgb":case"hex":return[L,U,J,j]=nt(F),[...Io(L,U,J),j]}}),me=o.computed(()=>{switch(O.value){case"rgb":case"hex":return Y.value;case"hsv":return Q.value;case"hsl":return ie.value}}),ae=o.ref(0),he=o.ref(1),G=o.ref([0,0]);function te(F,ne){const{value:_}=Q,D=ae.value,K=_?_[3]:1;G.value=[F,ne];const{showAlpha:R}=e;switch(O.value){case"hsv":oe((R?pn:Uo)([D,F,ne,K]),"cursor");break;case"hsl":oe((R?qt:Go)([...Mr(D,F,ne),K]),"cursor");break;case"rgb":oe((R?Bt:Wo)([...Ut(D,F,ne),K]),"cursor");break;case"hex":oe((R?Kt:nr)([...Ut(D,F,ne),K]),"cursor");break}}function xe(F){ae.value=F;const{value:ne}=Q;if(!ne)return;const[,_,D,K]=ne,{showAlpha:R}=e;switch(O.value){case"hsv":oe((R?pn:Uo)([F,_,D,K]),"cursor");break;case"rgb":oe((R?Bt:Wo)([...Ut(F,_,D),K]),"cursor");break;case"hex":oe((R?Kt:nr)([...Ut(F,_,D),K]),"cursor");break;case"hsl":oe((R?qt:Go)([...Mr(F,_,D),K]),"cursor");break}}function Se(F){switch(O.value){case"hsv":[S,M,A]=Q.value,oe(pn([S,M,A,F]),"cursor");break;case"rgb":[L,U,J]=Y.value,oe(Bt([L,U,J,F]),"cursor");break;case"hex":[L,U,J]=Y.value,oe(Kt([L,U,J,F]),"cursor");break;case"hsl":[S,M,N]=ie.value,oe(qt([S,M,N,F]),"cursor");break}he.value=F}function oe(F,ne){ne==="cursor"?r=F:r=null;const{nTriggerFormChange:_,nTriggerFormInput:D}=i,{onUpdateValue:K,"onUpdate:value":R}=e;K&&de(K,F),R&&de(R,F),_(),D(),v.value=F}function Te(F){oe(F,"input"),o.nextTick($e)}function $e(F=!0){const{value:ne}=g;if(ne){const{nTriggerFormChange:_,nTriggerFormInput:D}=i,{onComplete:K}=e;K&&K(ne);const{value:R}=k,{value:C}=z;F&&(R.splice(C+1,R.length,ne),z.value=C+1),_(),D()}}function se(){const{value:F}=z;F-1<0||(oe(k.value[F-1],"input"),$e(!1),z.value=F-1)}function Ae(){const{value:F}=z;F<0||F+1>=k.value.length||(oe(k.value[F+1],"input"),$e(!1),z.value=F+1)}function Be(){oe(null,"input");const{onClear:F}=e;F&&F(),h(!1)}function We(){const{value:F}=g,{onConfirm:ne}=e;ne&&ne(F),h(!1)}const Ie=o.computed(()=>z.value>=1),Le=o.computed(()=>{const{value:F}=k;return F.length>1&&z.value<F.length-1});o.watch(b,F=>{F||(k.value=[g.value],z.value=0)}),o.watchEffect(()=>{if(!(r&&r===g.value)){const{value:F}=Q;F&&(ae.value=F[0],he.value=F[3],G.value=[F[1],F[2]])}r=null});const Ke=o.computed(()=>{const{value:F}=a,{common:{cubicBezierEaseInOut:ne},self:{textColor:_,color:D,panelFontSize:K,boxShadow:R,border:C,borderRadius:B,dividerColor:re,[ee("height",F)]:we,[ee("fontSize",F)]:Pe}}=f.value;return{"--n-bezier":ne,"--n-text-color":_,"--n-color":D,"--n-panel-font-size":K,"--n-font-size":Pe,"--n-box-shadow":R,"--n-border":C,"--n-border-radius":B,"--n-height":we,"--n-divider-color":re}}),Re=u?rt("color-picker",o.computed(()=>a.value[0]),Ke,e):void 0;function X(){var F;const{value:ne}=Y,{value:_}=ae,{internalActions:D,modes:K,actions:R}=e,{value:C}=f,{value:B}=c;return o.h("div",{class:[`${B}-color-picker-panel`,Re==null?void 0:Re.themeClass.value],onDragstart:re=>{re.preventDefault()},style:u?void 0:Ke.value},o.h("div",{class:`${B}-color-picker-control`},o.h(Y0,{clsPrefix:B,rgba:ne,displayedHue:_,displayedSv:G.value,onUpdateSV:te,onComplete:$e}),o.h("div",{class:`${B}-color-picker-preview`},o.h("div",{class:`${B}-color-picker-preview__sliders`},o.h(q0,{clsPrefix:B,hue:_,onUpdateHue:xe,onComplete:$e}),e.showAlpha?o.h(X0,{clsPrefix:B,rgba:ne,alpha:he.value,onUpdateAlpha:Se,onComplete:$e}):null),e.showPreview?o.h(sx,{clsPrefix:B,mode:O.value,color:Y.value&&nr(Y.value),onUpdateColor:re=>{oe(re,"input")}}):null),o.h(rx,{clsPrefix:B,showAlpha:e.showAlpha,mode:O.value,modes:K,onUpdateMode:m,value:g.value,valueArr:me.value,onUpdateValue:Te}),((F=e.swatches)===null||F===void 0?void 0:F.length)&&o.h(lx,{clsPrefix:B,mode:O.value,swatches:e.swatches,onUpdateColor:re=>{oe(re,"input")}})),R!=null&&R.length?o.h("div",{class:`${B}-color-picker-action`},R.includes("confirm")&&o.h(Ht,{size:"small",onClick:We,theme:C.peers.Button,themeOverrides:C.peerOverrides.Button},{default:()=>s.value.confirm}),R.includes("clear")&&o.h(Ht,{size:"small",onClick:Be,disabled:!g.value,theme:C.peers.Button,themeOverrides:C.peerOverrides.Button},{default:()=>s.value.clear})):null,t.action?o.h("div",{class:`${B}-color-picker-action`},{default:t.action}):D?o.h("div",{class:`${B}-color-picker-action`},D.includes("undo")&&o.h(Ht,{size:"small",onClick:se,disabled:!Ie.value,theme:C.peers.Button,themeOverrides:C.peerOverrides.Button},{default:()=>s.value.undo}),D.includes("redo")&&o.h(Ht,{size:"small",onClick:Ae,disabled:!Le.value,theme:C.peers.Button,themeOverrides:C.peerOverrides.Button},{default:()=>s.value.redo})):null)}return{mergedClsPrefix:c,namespace:d,selfRef:n,hsla:ie,rgba:Y,mergedShow:b,mergedDisabled:l,isMounted:Ln(),adjustedTo:lt(e),mergedValue:g,handleTriggerClick(){h(!0)},handleClickOutside(F){var ne;!((ne=n.value)===null||ne===void 0)&&ne.contains(An(F))||h(!1)},renderPanel:X,cssVars:u?void 0:Ke,themeClass:Re==null?void 0:Re.themeClass,onRender:Re==null?void 0:Re.onRender}},render(){const{$slots:e,mergedClsPrefix:t,onRender:n}=this;return n==null||n(),o.h("div",{class:[this.themeClass,`${t}-color-picker`],ref:"selfRef",style:this.cssVars},o.h(jr,null,{default:()=>[o.h(Wr,null,{default:()=>o.h(ox,{clsPrefix:t,value:this.mergedValue,hsla:this.hsla,disabled:this.mergedDisabled,onClick:this.handleTriggerClick},{label:e.label})}),o.h(qr,{placement:this.placement,show:this.mergedShow,containerClass:this.namespace,teleportDisabled:this.adjustedTo===lt.tdkey,to:this.adjustedTo},{default:()=>o.h(o.Transition,{name:"fade-in-scale-up-transition",appear:this.isMounted},{default:()=>this.mergedShow?o.withDirectives(this.renderPanel(),[[ar,this.handleClickOutside,void 0,{capture:!0}]]):null})})]}))}});function fx(e){const{boxShadow2:t}=e;return{menuBoxShadow:t}}const hx={name:"Select",common:Qe,peers:{InternalSelection:nc,InternalSelectMenu:qs},self:fx},px=I([w("select",`
|
|
1341
1341
|
z-index: auto;
|
|
1342
1342
|
outline: none;
|
|
1343
1343
|
width: 100%;
|
|
@@ -1345,7 +1345,7 @@ ${t}
|
|
|
1345
1345
|
`),w("select-menu",`
|
|
1346
1346
|
margin: 4px 0;
|
|
1347
1347
|
box-shadow: var(--n-menu-box-shadow);
|
|
1348
|
-
`,[xr({originalTransition:"background-color .3s var(--n-bezier), box-shadow .3s var(--n-bezier)"})])]),px=Object.assign(Object.assign({},Ce.props),{to:lt.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,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}),yo=o.defineComponent({name:"Select",props:px,setup(e){process.env.NODE_ENV!=="production"&&o.watchEffect(()=>{e.items!==void 0&&ot("select","`items` is deprecated, please use `options` instead."),e.onChange!==void 0&&ot("select","`on-change` is deprecated, please use `on-update:value` instead.")});const{mergedClsPrefixRef:t,mergedBorderedRef:n,namespaceRef:r,inlineThemeDisabled:i}=Ye(e),a=Ce("Select","-select",hx,fx,e,t),l=o.ref(e.defaultValue),s=o.toRef(e,"value"),c=St(s,l),d=o.ref(!1),u=o.ref(""),f=Vr(e,["items","options"]),p=o.ref([]),b=o.ref([]),h=o.computed(()=>b.value.concat(p.value).concat(f.value)),x=o.computed(()=>{const{filter:y}=e;if(y)return y;const{labelField:H,valueField:Z}=e;return(le,ce)=>{if(!ce)return!1;const ue=ce[H];if(typeof ue=="string")return qi(le,ue);const fe=ce[Z];return typeof fe=="string"?qi(le,fe):typeof fe=="number"?qi(le,String(fe)):!1}}),v=o.computed(()=>{if(e.remote)return f.value;{const{value:y}=h,{value:H}=u;return!H.length||!e.filterable?y:x0(y,x.value,H,e.childrenField)}}),g=o.computed(()=>{const{valueField:y,childrenField:H}=e,Z=v0(y,H);return wv(v.value,Z)}),k=o.computed(()=>y0(h.value,e.valueField,e.childrenField)),z=o.ref(!1),$=St(o.toRef(e,"show"),z),T=o.ref(null),O=o.ref(null),m=o.ref(null),{localeRef:S}=vr("Select"),M=o.computed(()=>{var y;return(y=e.placeholder)!==null&&y!==void 0?y:S.value.placeholder}),N=[],A=o.ref(new Map),L=o.computed(()=>{const{fallbackOption:y}=e;if(y===void 0){const{labelField:H,valueField:Z}=e;return le=>({[H]:String(le),[Z]:le})}return y===!1?!1:H=>Object.assign(y(H),{value:H})});function U(y){const H=e.remote,{value:Z}=A,{value:le}=k,{value:ce}=L,ue=[];return y.forEach(fe=>{if(le.has(fe))ue.push(le.get(fe));else if(H&&Z.has(fe))ue.push(Z.get(fe));else if(ce){const ge=ce(fe);ge&&ue.push(ge)}}),ue}const J=o.computed(()=>{if(e.multiple){const{value:y}=c;return Array.isArray(y)?U(y):[]}return null}),j=o.computed(()=>{const{value:y}=c;return!e.multiple&&!Array.isArray(y)?y===null?null:U([y])[0]||null:null}),Q=vn(e),{mergedSizeRef:Y,mergedDisabledRef:ie,mergedStatusRef:me}=Q;function ae(y,H){const{onChange:Z,"onUpdate:value":le,onUpdateValue:ce}=e,{nTriggerFormChange:ue,nTriggerFormInput:fe}=Q;Z&&de(Z,y,H),ce&&de(ce,y,H),le&&de(le,y,H),l.value=y,ue(),fe()}function he(y){const{onBlur:H}=e,{nTriggerFormBlur:Z}=Q;H&&de(H,y),Z()}function G(){const{onClear:y}=e;y&&de(y)}function te(y){const{onFocus:H,showOnFocus:Z}=e,{nTriggerFormFocus:le}=Q;H&&de(H,y),le(),Z&&$e()}function xe(y){const{onSearch:H}=e;H&&de(H,y)}function Se(y){const{onScroll:H}=e;H&&de(H,y)}function oe(){var y;const{remote:H,multiple:Z}=e;if(H){const{value:le}=A;if(Z){const{valueField:ce}=e;(y=J.value)===null||y===void 0||y.forEach(ue=>{le.set(ue[ce],ue)})}else{const ce=j.value;ce&&le.set(ce[e.valueField],ce)}}}function Te(y){const{onUpdateShow:H,"onUpdate:show":Z}=e;H&&de(H,y),Z&&de(Z,y),z.value=y}function $e(){ie.value||(Te(!0),z.value=!0,e.filterable&&Me())}function se(){Te(!1)}function Ae(){u.value="",b.value=N}const Be=o.ref(!1);function We(){e.filterable&&(Be.value=!0)}function Ie(){e.filterable&&(Be.value=!1,$.value||Ae())}function Le(){ie.value||($.value?e.filterable?Me():se():$e())}function Ke(y){var H,Z;!((Z=(H=m.value)===null||H===void 0?void 0:H.selfRef)===null||Z===void 0)&&Z.contains(y.relatedTarget)||(d.value=!1,he(y),se())}function Re(y){te(y),d.value=!0}function X(){d.value=!0}function F(y){var H;!((H=T.value)===null||H===void 0)&&H.$el.contains(y.relatedTarget)||(d.value=!1,he(y),se())}function ne(){var y;(y=T.value)===null||y===void 0||y.focus(),se()}function _(y){var H;$.value&&(!((H=T.value)===null||H===void 0)&&H.$el.contains(An(y))||se())}function D(y){if(!Array.isArray(y))return[];if(L.value)return Array.from(y);{const{remote:H}=e,{value:Z}=k;if(H){const{value:le}=A;return y.filter(ce=>Z.has(ce)||le.has(ce))}else return y.filter(le=>Z.has(le))}}function K(y){R(y.rawNode)}function R(y){if(ie.value)return;const{tag:H,remote:Z,clearFilterAfterSelect:le,valueField:ce}=e;if(H&&!Z){const{value:ue}=b,fe=ue[0]||null;if(fe){const ge=p.value;ge.length?ge.push(fe):p.value=[fe],b.value=N}}if(Z&&A.value.set(y[ce],y),e.multiple){const ue=D(c.value),fe=ue.findIndex(ge=>ge===y[ce]);if(~fe){if(ue.splice(fe,1),H&&!Z){const ge=C(y[ce]);~ge&&(p.value.splice(ge,1),le&&(u.value=""))}}else ue.push(y[ce]),le&&(u.value="");ae(ue,U(ue))}else{if(H&&!Z){const ue=C(y[ce]);~ue?p.value=[p.value[ue]]:p.value=N}De(),se(),ae(y[ce],y)}}function C(y){return p.value.findIndex(Z=>Z[e.valueField]===y)}function B(y){$.value||$e();const{value:H}=y.target;u.value=H;const{tag:Z,remote:le}=e;if(xe(H),Z&&!le){if(!H){b.value=N;return}const{onCreate:ce}=e,ue=ce?ce(H):{[e.labelField]:H,[e.valueField]:H},{valueField:fe,labelField:ge}=e;f.value.some(Ee=>Ee[fe]===ue[fe]||Ee[ge]===ue[ge])||p.value.some(Ee=>Ee[fe]===ue[fe]||Ee[ge]===ue[ge])?b.value=N:b.value=[ue]}}function re(y){y.stopPropagation();const{multiple:H}=e;!H&&e.filterable&&se(),G(),H?ae([],[]):ae(null,null)}function we(y){!tr(y,"action")&&!tr(y,"empty")&&!tr(y,"header")&&y.preventDefault()}function Pe(y){Se(y)}function Ue(y){var H,Z,le,ce,ue;if(!e.keyboard){y.preventDefault();return}switch(y.key){case" ":if(e.filterable)break;y.preventDefault();case"Enter":if(!(!((H=T.value)===null||H===void 0)&&H.isComposing)){if($.value){const fe=(Z=m.value)===null||Z===void 0?void 0:Z.getPendingTmNode();fe?K(fe):e.filterable||(se(),De())}else if($e(),e.tag&&Be.value){const fe=b.value[0];if(fe){const ge=fe[e.valueField],{value:Ee}=c;e.multiple&&Array.isArray(Ee)&&Ee.includes(ge)||R(fe)}}}y.preventDefault();break;case"ArrowUp":if(y.preventDefault(),e.loading)return;$.value&&((le=m.value)===null||le===void 0||le.prev());break;case"ArrowDown":if(y.preventDefault(),e.loading)return;$.value?(ce=m.value)===null||ce===void 0||ce.next():$e();break;case"Escape":$.value&&(su(y),se()),(ue=T.value)===null||ue===void 0||ue.focus();break}}function De(){var y;(y=T.value)===null||y===void 0||y.focus()}function Me(){var y;(y=T.value)===null||y===void 0||y.focusInput()}function Ze(){var y;$.value&&((y=O.value)===null||y===void 0||y.syncPosition())}oe(),o.watch(o.toRef(e,"options"),oe);const ft={focus:()=>{var y;(y=T.value)===null||y===void 0||y.focus()},focusInput:()=>{var y;(y=T.value)===null||y===void 0||y.focusInput()},blur:()=>{var y;(y=T.value)===null||y===void 0||y.blur()},blurInput:()=>{var y;(y=T.value)===null||y===void 0||y.blurInput()}},tt=o.computed(()=>{const{self:{menuBoxShadow:y}}=a.value;return{"--n-menu-box-shadow":y}}),st=i?rt("select",void 0,tt,e):void 0;return Object.assign(Object.assign({},ft),{mergedStatus:me,mergedClsPrefix:t,mergedBordered:n,namespace:r,treeMate:g,isMounted:Ln(),triggerRef:T,menuRef:m,pattern:u,uncontrolledShow:z,mergedShow:$,adjustedTo:lt(e),uncontrolledValue:l,mergedValue:c,followerRef:O,localizedPlaceholder:M,selectedOption:j,selectedOptions:J,mergedSize:Y,mergedDisabled:ie,focused:d,activeWithoutMenuOpen:Be,inlineThemeDisabled:i,onTriggerInputFocus:We,onTriggerInputBlur:Ie,handleTriggerOrMenuResize:Ze,handleMenuFocus:X,handleMenuBlur:F,handleMenuTabOut:ne,handleTriggerClick:Le,handleToggle:K,handleDeleteOption:R,handlePatternInput:B,handleClear:re,handleTriggerBlur:Ke,handleTriggerFocus:Re,handleKeydown:Ue,handleMenuAfterLeave:Ae,handleMenuClickOutside:_,handleMenuScroll:Pe,handleMenuKeydown:Ue,handleMenuMousedown:we,mergedTheme:a,cssVars:i?void 0:tt,themeClass:st==null?void 0:st.themeClass,onRender:st==null?void 0:st.onRender})},render(){return o.h("div",{class:`${this.mergedClsPrefix}-select`},o.h(jr,null,{default:()=>[o.h(Wr,null,{default:()=>o.h(s0,{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)]}})}),o.h(qr,{ref:"followerRef",show:this.mergedShow,to:this.adjustedTo,teleportDisabled:this.adjustedTo===lt.tdkey,containerClass:this.namespace,width:this.consistentMenuWidth?"target":void 0,minWidth:"target",placement:this.placement},{default:()=>o.h(o.Transition,{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),o.withDirectives(o.h(Nv,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:"medium",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 r,i;return[(i=(r=this.$slots).empty)===null||i===void 0?void 0:i.call(r)]},header:()=>{var r,i;return[(i=(r=this.$slots).header)===null||i===void 0?void 0:i.call(r)]},action:()=>{var r,i;return[(i=(r=this.$slots).action)===null||i===void 0?void 0:i.call(r)]}}),this.displayDirective==="show"?[[o.vShow,this.mergedShow],[ar,this.handleMenuClickOutside,void 0,{capture:!0}]]:[[ar,this.handleMenuClickOutside,void 0,{capture:!0}]])):null}})})]}))}}),bx={padding:"8px 14px"};function mx(e){const{borderRadius:t,boxShadow2:n,baseColor:r}=e;return Object.assign(Object.assign({},bx),{borderRadius:t,boxShadow:n,color:gt(r,"rgba(0, 0, 0, .85)"),textColor:r})}const gx={name:"Tooltip",common:Qe,peers:{Popover:ji},self:mx},vx=Object.assign(Object.assign({},Js),Ce.props),dc=o.defineComponent({name:"Tooltip",props:vx,__popover__:!0,setup(e){const{mergedClsPrefixRef:t}=Ye(e),n=Ce("Tooltip","-tooltip",void 0,gx,e,t),r=o.ref(null);return Object.assign(Object.assign({},{syncPosition(){r.value.syncPosition()},setShow(a){r.value.setShow(a)}}),{popoverRef:r,mergedTheme:n,popoverThemeOverrides:o.computed(()=>n.value.self)})},render(){const{mergedTheme:e,internalExtraClass:t}=this;return o.h(Qs,Object.assign(Object.assign({},this.$props),{theme:e.peers.Popover,themeOverrides:e.peerOverrides.Popover,builtinThemeOverrides:this.popoverThemeOverrides,internalExtraClass:t.concat("tooltip"),ref:"popoverRef"}),this.$slots)}});function xx(e){const{textColorBase:t,opacity1:n,opacity2:r,opacity3:i,opacity4:a,opacity5:l}=e;return{color:t,opacity1Depth:n,opacity2Depth:r,opacity3Depth:i,opacity4Depth:a,opacity5Depth:l}}const yx={name:"Icon",common:Qe,self:xx},wx=w("icon",`
|
|
1348
|
+
`,[xr({originalTransition:"background-color .3s var(--n-bezier), box-shadow .3s var(--n-bezier)"})])]),bx=Object.assign(Object.assign({},Ce.props),{to:lt.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,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}),yo=o.defineComponent({name:"Select",props:bx,setup(e){process.env.NODE_ENV!=="production"&&o.watchEffect(()=>{e.items!==void 0&&ot("select","`items` is deprecated, please use `options` instead."),e.onChange!==void 0&&ot("select","`on-change` is deprecated, please use `on-update:value` instead.")});const{mergedClsPrefixRef:t,mergedBorderedRef:n,namespaceRef:r,inlineThemeDisabled:i}=Ye(e),a=Ce("Select","-select",px,hx,e,t),l=o.ref(e.defaultValue),s=o.toRef(e,"value"),c=St(s,l),d=o.ref(!1),u=o.ref(""),f=Vr(e,["items","options"]),p=o.ref([]),b=o.ref([]),h=o.computed(()=>b.value.concat(p.value).concat(f.value)),x=o.computed(()=>{const{filter:y}=e;if(y)return y;const{labelField:H,valueField:Z}=e;return(le,ce)=>{if(!ce)return!1;const ue=ce[H];if(typeof ue=="string")return qi(le,ue);const fe=ce[Z];return typeof fe=="string"?qi(le,fe):typeof fe=="number"?qi(le,String(fe)):!1}}),v=o.computed(()=>{if(e.remote)return f.value;{const{value:y}=h,{value:H}=u;return!H.length||!e.filterable?y:y0(y,x.value,H,e.childrenField)}}),g=o.computed(()=>{const{valueField:y,childrenField:H}=e,Z=x0(y,H);return Cv(v.value,Z)}),k=o.computed(()=>w0(h.value,e.valueField,e.childrenField)),z=o.ref(!1),$=St(o.toRef(e,"show"),z),T=o.ref(null),O=o.ref(null),m=o.ref(null),{localeRef:S}=vr("Select"),M=o.computed(()=>{var y;return(y=e.placeholder)!==null&&y!==void 0?y:S.value.placeholder}),N=[],A=o.ref(new Map),L=o.computed(()=>{const{fallbackOption:y}=e;if(y===void 0){const{labelField:H,valueField:Z}=e;return le=>({[H]:String(le),[Z]:le})}return y===!1?!1:H=>Object.assign(y(H),{value:H})});function U(y){const H=e.remote,{value:Z}=A,{value:le}=k,{value:ce}=L,ue=[];return y.forEach(fe=>{if(le.has(fe))ue.push(le.get(fe));else if(H&&Z.has(fe))ue.push(Z.get(fe));else if(ce){const ge=ce(fe);ge&&ue.push(ge)}}),ue}const J=o.computed(()=>{if(e.multiple){const{value:y}=c;return Array.isArray(y)?U(y):[]}return null}),j=o.computed(()=>{const{value:y}=c;return!e.multiple&&!Array.isArray(y)?y===null?null:U([y])[0]||null:null}),Q=vn(e),{mergedSizeRef:Y,mergedDisabledRef:ie,mergedStatusRef:me}=Q;function ae(y,H){const{onChange:Z,"onUpdate:value":le,onUpdateValue:ce}=e,{nTriggerFormChange:ue,nTriggerFormInput:fe}=Q;Z&&de(Z,y,H),ce&&de(ce,y,H),le&&de(le,y,H),l.value=y,ue(),fe()}function he(y){const{onBlur:H}=e,{nTriggerFormBlur:Z}=Q;H&&de(H,y),Z()}function G(){const{onClear:y}=e;y&&de(y)}function te(y){const{onFocus:H,showOnFocus:Z}=e,{nTriggerFormFocus:le}=Q;H&&de(H,y),le(),Z&&$e()}function xe(y){const{onSearch:H}=e;H&&de(H,y)}function Se(y){const{onScroll:H}=e;H&&de(H,y)}function oe(){var y;const{remote:H,multiple:Z}=e;if(H){const{value:le}=A;if(Z){const{valueField:ce}=e;(y=J.value)===null||y===void 0||y.forEach(ue=>{le.set(ue[ce],ue)})}else{const ce=j.value;ce&&le.set(ce[e.valueField],ce)}}}function Te(y){const{onUpdateShow:H,"onUpdate:show":Z}=e;H&&de(H,y),Z&&de(Z,y),z.value=y}function $e(){ie.value||(Te(!0),z.value=!0,e.filterable&&Me())}function se(){Te(!1)}function Ae(){u.value="",b.value=N}const Be=o.ref(!1);function We(){e.filterable&&(Be.value=!0)}function Ie(){e.filterable&&(Be.value=!1,$.value||Ae())}function Le(){ie.value||($.value?e.filterable?Me():se():$e())}function Ke(y){var H,Z;!((Z=(H=m.value)===null||H===void 0?void 0:H.selfRef)===null||Z===void 0)&&Z.contains(y.relatedTarget)||(d.value=!1,he(y),se())}function Re(y){te(y),d.value=!0}function X(){d.value=!0}function F(y){var H;!((H=T.value)===null||H===void 0)&&H.$el.contains(y.relatedTarget)||(d.value=!1,he(y),se())}function ne(){var y;(y=T.value)===null||y===void 0||y.focus(),se()}function _(y){var H;$.value&&(!((H=T.value)===null||H===void 0)&&H.$el.contains(An(y))||se())}function D(y){if(!Array.isArray(y))return[];if(L.value)return Array.from(y);{const{remote:H}=e,{value:Z}=k;if(H){const{value:le}=A;return y.filter(ce=>Z.has(ce)||le.has(ce))}else return y.filter(le=>Z.has(le))}}function K(y){R(y.rawNode)}function R(y){if(ie.value)return;const{tag:H,remote:Z,clearFilterAfterSelect:le,valueField:ce}=e;if(H&&!Z){const{value:ue}=b,fe=ue[0]||null;if(fe){const ge=p.value;ge.length?ge.push(fe):p.value=[fe],b.value=N}}if(Z&&A.value.set(y[ce],y),e.multiple){const ue=D(c.value),fe=ue.findIndex(ge=>ge===y[ce]);if(~fe){if(ue.splice(fe,1),H&&!Z){const ge=C(y[ce]);~ge&&(p.value.splice(ge,1),le&&(u.value=""))}}else ue.push(y[ce]),le&&(u.value="");ae(ue,U(ue))}else{if(H&&!Z){const ue=C(y[ce]);~ue?p.value=[p.value[ue]]:p.value=N}De(),se(),ae(y[ce],y)}}function C(y){return p.value.findIndex(Z=>Z[e.valueField]===y)}function B(y){$.value||$e();const{value:H}=y.target;u.value=H;const{tag:Z,remote:le}=e;if(xe(H),Z&&!le){if(!H){b.value=N;return}const{onCreate:ce}=e,ue=ce?ce(H):{[e.labelField]:H,[e.valueField]:H},{valueField:fe,labelField:ge}=e;f.value.some(Ee=>Ee[fe]===ue[fe]||Ee[ge]===ue[ge])||p.value.some(Ee=>Ee[fe]===ue[fe]||Ee[ge]===ue[ge])?b.value=N:b.value=[ue]}}function re(y){y.stopPropagation();const{multiple:H}=e;!H&&e.filterable&&se(),G(),H?ae([],[]):ae(null,null)}function we(y){!tr(y,"action")&&!tr(y,"empty")&&!tr(y,"header")&&y.preventDefault()}function Pe(y){Se(y)}function Ue(y){var H,Z,le,ce,ue;if(!e.keyboard){y.preventDefault();return}switch(y.key){case" ":if(e.filterable)break;y.preventDefault();case"Enter":if(!(!((H=T.value)===null||H===void 0)&&H.isComposing)){if($.value){const fe=(Z=m.value)===null||Z===void 0?void 0:Z.getPendingTmNode();fe?K(fe):e.filterable||(se(),De())}else if($e(),e.tag&&Be.value){const fe=b.value[0];if(fe){const ge=fe[e.valueField],{value:Ee}=c;e.multiple&&Array.isArray(Ee)&&Ee.includes(ge)||R(fe)}}}y.preventDefault();break;case"ArrowUp":if(y.preventDefault(),e.loading)return;$.value&&((le=m.value)===null||le===void 0||le.prev());break;case"ArrowDown":if(y.preventDefault(),e.loading)return;$.value?(ce=m.value)===null||ce===void 0||ce.next():$e();break;case"Escape":$.value&&(cu(y),se()),(ue=T.value)===null||ue===void 0||ue.focus();break}}function De(){var y;(y=T.value)===null||y===void 0||y.focus()}function Me(){var y;(y=T.value)===null||y===void 0||y.focusInput()}function Ze(){var y;$.value&&((y=O.value)===null||y===void 0||y.syncPosition())}oe(),o.watch(o.toRef(e,"options"),oe);const ft={focus:()=>{var y;(y=T.value)===null||y===void 0||y.focus()},focusInput:()=>{var y;(y=T.value)===null||y===void 0||y.focusInput()},blur:()=>{var y;(y=T.value)===null||y===void 0||y.blur()},blurInput:()=>{var y;(y=T.value)===null||y===void 0||y.blurInput()}},tt=o.computed(()=>{const{self:{menuBoxShadow:y}}=a.value;return{"--n-menu-box-shadow":y}}),st=i?rt("select",void 0,tt,e):void 0;return Object.assign(Object.assign({},ft),{mergedStatus:me,mergedClsPrefix:t,mergedBordered:n,namespace:r,treeMate:g,isMounted:Ln(),triggerRef:T,menuRef:m,pattern:u,uncontrolledShow:z,mergedShow:$,adjustedTo:lt(e),uncontrolledValue:l,mergedValue:c,followerRef:O,localizedPlaceholder:M,selectedOption:j,selectedOptions:J,mergedSize:Y,mergedDisabled:ie,focused:d,activeWithoutMenuOpen:Be,inlineThemeDisabled:i,onTriggerInputFocus:We,onTriggerInputBlur:Ie,handleTriggerOrMenuResize:Ze,handleMenuFocus:X,handleMenuBlur:F,handleMenuTabOut:ne,handleTriggerClick:Le,handleToggle:K,handleDeleteOption:R,handlePatternInput:B,handleClear:re,handleTriggerBlur:Ke,handleTriggerFocus:Re,handleKeydown:Ue,handleMenuAfterLeave:Ae,handleMenuClickOutside:_,handleMenuScroll:Pe,handleMenuKeydown:Ue,handleMenuMousedown:we,mergedTheme:a,cssVars:i?void 0:tt,themeClass:st==null?void 0:st.themeClass,onRender:st==null?void 0:st.onRender})},render(){return o.h("div",{class:`${this.mergedClsPrefix}-select`},o.h(jr,null,{default:()=>[o.h(Wr,null,{default:()=>o.h(c0,{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)]}})}),o.h(qr,{ref:"followerRef",show:this.mergedShow,to:this.adjustedTo,teleportDisabled:this.adjustedTo===lt.tdkey,containerClass:this.namespace,width:this.consistentMenuWidth?"target":void 0,minWidth:"target",placement:this.placement},{default:()=>o.h(o.Transition,{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),o.withDirectives(o.h(Lv,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:"medium",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 r,i;return[(i=(r=this.$slots).empty)===null||i===void 0?void 0:i.call(r)]},header:()=>{var r,i;return[(i=(r=this.$slots).header)===null||i===void 0?void 0:i.call(r)]},action:()=>{var r,i;return[(i=(r=this.$slots).action)===null||i===void 0?void 0:i.call(r)]}}),this.displayDirective==="show"?[[o.vShow,this.mergedShow],[ar,this.handleMenuClickOutside,void 0,{capture:!0}]]:[[ar,this.handleMenuClickOutside,void 0,{capture:!0}]])):null}})})]}))}}),mx={padding:"8px 14px"};function gx(e){const{borderRadius:t,boxShadow2:n,baseColor:r}=e;return Object.assign(Object.assign({},mx),{borderRadius:t,boxShadow:n,color:gt(r,"rgba(0, 0, 0, .85)"),textColor:r})}const vx={name:"Tooltip",common:Qe,peers:{Popover:ji},self:gx},xx=Object.assign(Object.assign({},Qs),Ce.props),uc=o.defineComponent({name:"Tooltip",props:xx,__popover__:!0,setup(e){const{mergedClsPrefixRef:t}=Ye(e),n=Ce("Tooltip","-tooltip",void 0,vx,e,t),r=o.ref(null);return Object.assign(Object.assign({},{syncPosition(){r.value.syncPosition()},setShow(a){r.value.setShow(a)}}),{popoverRef:r,mergedTheme:n,popoverThemeOverrides:o.computed(()=>n.value.self)})},render(){const{mergedTheme:e,internalExtraClass:t}=this;return o.h(ec,Object.assign(Object.assign({},this.$props),{theme:e.peers.Popover,themeOverrides:e.peerOverrides.Popover,builtinThemeOverrides:this.popoverThemeOverrides,internalExtraClass:t.concat("tooltip"),ref:"popoverRef"}),this.$slots)}});function yx(e){const{textColorBase:t,opacity1:n,opacity2:r,opacity3:i,opacity4:a,opacity5:l}=e;return{color:t,opacity1Depth:n,opacity2Depth:r,opacity3Depth:i,opacity4Depth:a,opacity5Depth:l}}const wx={name:"Icon",common:Qe,self:yx},Cx=w("icon",`
|
|
1349
1349
|
height: 1em;
|
|
1350
1350
|
width: 1em;
|
|
1351
1351
|
line-height: 1em;
|
|
@@ -1354,7 +1354,7 @@ ${t}
|
|
|
1354
1354
|
position: relative;
|
|
1355
1355
|
fill: currentColor;
|
|
1356
1356
|
transform: translateZ(0);
|
|
1357
|
-
`,[W("color-transition",{transition:"color .3s var(--n-bezier)"}),W("depth",{color:"var(--n-color)"},[I("svg",{opacity:"var(--n-opacity)",transition:"opacity .3s var(--n-bezier)"})]),I("svg",{height:"1em",width:"1em"})]),
|
|
1357
|
+
`,[W("color-transition",{transition:"color .3s var(--n-bezier)"}),W("depth",{color:"var(--n-color)"},[I("svg",{opacity:"var(--n-opacity)",transition:"opacity .3s var(--n-bezier)"})]),I("svg",{height:"1em",width:"1em"})]),Sx=Object.assign(Object.assign({},Ce.props),{depth:[String,Number],size:[Number,String],color:String,component:Object}),Tt=o.defineComponent({_n_icon__:!0,name:"Icon",inheritAttrs:!1,props:Sx,setup(e){const{mergedClsPrefixRef:t,inlineThemeDisabled:n}=Ye(e),r=Ce("Icon","-icon",Cx,wx,e,t),i=o.computed(()=>{const{depth:l}=e,{common:{cubicBezierEaseInOut:s},self:c}=r.value;if(l!==void 0){const{color:d,[`opacity${l}Depth`]:u}=c;return{"--n-bezier":s,"--n-color":d,"--n-opacity":u}}return{"--n-bezier":s,"--n-color":"","--n-opacity":""}}),a=n?rt("icon",o.computed(()=>`${e.depth||"d"}`),i,e):void 0;return{mergedClsPrefix:t,mergedStyle:o.computed(()=>{const{size:l,color:s}=e;return{fontSize:dt(l),color:s}}),cssVars:n?void 0:i,themeClass:a==null?void 0:a.themeClass,onRender:a==null?void 0:a.onRender}},render(){var e;const{$parent:t,depth:n,mergedClsPrefix:r,component:i,onRender:a,themeClass:l}=this;return!((e=t==null?void 0:t.$options)===null||e===void 0)&&e._n_icon__&&rr("icon","don't wrap `n-icon` inside `n-icon`"),a==null||a(),o.h("i",o.mergeProps(this.$attrs,{role:"img",class:[`${r}-icon`,l,{[`${r}-icon--depth`]:n,[`${r}-icon--color-transition`]:n!==void 0}],style:[this.cssVars,this.mergedStyle]}),i?o.h(i):this.$slots)}});function $x(e){const{textColorDisabled:t}=e;return{iconColorDisabled:t}}const Tx={name:"InputNumber",common:Qe,peers:{Button:Xi,Input:Ki},self:$x},kx={railHeight:"4px",railWidthVertical:"4px",handleSize:"18px",dotHeight:"8px",dotWidth:"8px",dotBorderRadius:"4px"};function Rx(e){const t="rgba(0, 0, 0, .85)",n="0 2px 8px 0 rgba(0, 0, 0, 0.12)",{railColor:r,primaryColor:i,baseColor:a,cardColor:l,modalColor:s,popoverColor:c,borderRadius:d,fontSize:u,opacityDisabled:f}=e;return Object.assign(Object.assign({},kx),{fontSize:u,markFontSize:u,railColor:r,railColorHover:r,fillColor:i,fillColorHover:i,opacityDisabled:f,handleColor:"#FFF",dotColor:l,dotColorModal:s,dotColorPopover:c,handleBoxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.3), inset 0 0 1px 0 rgba(0, 0, 0, 0.05)",handleBoxShadowHover:"0 1px 4px 0 rgba(0, 0, 0, 0.3), inset 0 0 1px 0 rgba(0, 0, 0, 0.05)",handleBoxShadowActive:"0 1px 4px 0 rgba(0, 0, 0, 0.3), inset 0 0 1px 0 rgba(0, 0, 0, 0.05)",handleBoxShadowFocus:"0 1px 4px 0 rgba(0, 0, 0, 0.3), inset 0 0 1px 0 rgba(0, 0, 0, 0.05)",indicatorColor:t,indicatorBoxShadow:n,indicatorTextColor:a,indicatorBorderRadius:d,dotBorder:`2px solid ${r}`,dotBorderActive:`2px solid ${i}`,dotBoxShadow:""})}const Px={name:"Slider",common:Qe,self:Rx},Ex={buttonHeightSmall:"14px",buttonHeightMedium:"18px",buttonHeightLarge:"22px",buttonWidthSmall:"14px",buttonWidthMedium:"18px",buttonWidthLarge:"22px",buttonWidthPressedSmall:"20px",buttonWidthPressedMedium:"24px",buttonWidthPressedLarge:"28px",railHeightSmall:"18px",railHeightMedium:"22px",railHeightLarge:"26px",railWidthSmall:"32px",railWidthMedium:"40px",railWidthLarge:"48px"};function zx(e){const{primaryColor:t,opacityDisabled:n,borderRadius:r,textColor3:i}=e;return Object.assign(Object.assign({},Ex),{iconColor:i,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:r,railBorderRadiusMedium:r,railBorderRadiusLarge:r,buttonBorderRadiusSmall:r,buttonBorderRadiusMedium:r,buttonBorderRadiusLarge:r,boxShadowFocus:`0 0 0 2px ${ve(t,{alpha:.2})}`})}const Bx={name:"Switch",common:Qe,self:zx},_x={tabFontSizeSmall:"14px",tabFontSizeMedium:"14px",tabFontSizeLarge:"16px",tabGapSmallLine:"36px",tabGapMediumLine:"36px",tabGapLargeLine:"36px",tabGapSmallLineVertical:"8px",tabGapMediumLineVertical:"8px",tabGapLargeLineVertical:"8px",tabPaddingSmallLine:"6px 0",tabPaddingMediumLine:"10px 0",tabPaddingLargeLine:"14px 0",tabPaddingVerticalSmallLine:"6px 12px",tabPaddingVerticalMediumLine:"8px 16px",tabPaddingVerticalLargeLine:"10px 20px",tabGapSmallBar:"36px",tabGapMediumBar:"36px",tabGapLargeBar:"36px",tabGapSmallBarVertical:"8px",tabGapMediumBarVertical:"8px",tabGapLargeBarVertical:"8px",tabPaddingSmallBar:"4px 0",tabPaddingMediumBar:"6px 0",tabPaddingLargeBar:"10px 0",tabPaddingVerticalSmallBar:"6px 12px",tabPaddingVerticalMediumBar:"8px 16px",tabPaddingVerticalLargeBar:"10px 20px",tabGapSmallCard:"4px",tabGapMediumCard:"4px",tabGapLargeCard:"4px",tabGapSmallCardVertical:"4px",tabGapMediumCardVertical:"4px",tabGapLargeCardVertical:"4px",tabPaddingSmallCard:"8px 16px",tabPaddingMediumCard:"10px 20px",tabPaddingLargeCard:"12px 24px",tabPaddingSmallSegment:"4px 0",tabPaddingMediumSegment:"6px 0",tabPaddingLargeSegment:"8px 0",tabPaddingVerticalLargeSegment:"0 8px",tabPaddingVerticalSmallCard:"8px 12px",tabPaddingVerticalMediumCard:"10px 16px",tabPaddingVerticalLargeCard:"12px 20px",tabPaddingVerticalSmallSegment:"0 4px",tabPaddingVerticalMediumSegment:"0 6px",tabGapSmallSegment:"0",tabGapMediumSegment:"0",tabGapLargeSegment:"0",tabGapSmallSegmentVertical:"0",tabGapMediumSegmentVertical:"0",tabGapLargeSegmentVertical:"0",panePaddingSmall:"8px 0 0 0",panePaddingMedium:"12px 0 0 0",panePaddingLarge:"16px 0 0 0",closeSize:"18px",closeIconSize:"14px"};function Mx(e){const{textColor2:t,primaryColor:n,textColorDisabled:r,closeIconColor:i,closeIconColorHover:a,closeIconColorPressed:l,closeColorHover:s,closeColorPressed:c,tabColor:d,baseColor:u,dividerColor:f,fontWeight:p,textColor1:b,borderRadius:h,fontSize:x,fontWeightStrong:v}=e;return Object.assign(Object.assign({},_x),{colorSegment:d,tabFontSizeCard:x,tabTextColorLine:b,tabTextColorActiveLine:n,tabTextColorHoverLine:n,tabTextColorDisabledLine:r,tabTextColorSegment:b,tabTextColorActiveSegment:t,tabTextColorHoverSegment:t,tabTextColorDisabledSegment:r,tabTextColorBar:b,tabTextColorActiveBar:n,tabTextColorHoverBar:n,tabTextColorDisabledBar:r,tabTextColorCard:b,tabTextColorHoverCard:b,tabTextColorActiveCard:n,tabTextColorDisabledCard:r,barColor:n,closeIconColor:i,closeIconColorHover:a,closeIconColorPressed:l,closeColorHover:s,closeColorPressed:c,closeBorderRadius:h,tabColor:d,tabColorSegment:u,tabBorderColor:f,tabFontWeightActive:p,tabFontWeight:p,tabBorderRadius:h,paneTextColor:t,fontWeightStrong:v})}const Ox={name:"Tabs",common:Qe,self:Mx};function Ax(e){const{popoverColor:t,dividerColor:n,borderRadius:r}=e;return{color:t,buttonBorderColor:n,borderRadiusSquare:r,boxShadow:"0 2px 8px 0px rgba(0, 0, 0, .12)"}}const Ix={name:"FloatButtonGroup",common:Qe,self:Ax},Fx=w("float-button-group",[w("float-button",`
|
|
1358
1358
|
position: relative;
|
|
1359
1359
|
`),W("square-shape",`
|
|
1360
1360
|
background-color: var(--n-color);
|
|
@@ -1385,7 +1385,7 @@ ${t}
|
|
|
1385
1385
|
border-bottom-right-radius: 4px;
|
|
1386
1386
|
`),P("fill","inset: 4px; border-radius: var(--n-border-radius-square);")])]),W("circle-shape",[I(">:not(:last-child)",`
|
|
1387
1387
|
margin-bottom: 16px;
|
|
1388
|
-
`)])]),
|
|
1388
|
+
`)])]),Dx=Object.assign(Object.assign({},Ce.props),{left:[Number,String],right:[Number,String],top:[Number,String],bottom:[Number,String],shape:{type:String,default:"circle"},position:{type:String,default:"fixed"}}),fc="n-float-button-group";o.defineComponent({name:"FloatButtonGroup",props:Dx,setup(e){const{mergedClsPrefixRef:t,inlineThemeDisabled:n}=Ye(e),r=Ce("FloatButtonGroup","-float-button-group",Fx,Ix,e,t),i=o.computed(()=>{const{self:{color:l,boxShadow:s,buttonBorderColor:c,borderRadiusSquare:d},common:{cubicBezierEaseInOut:u}}=r.value;return{"--n-bezier":u,"--n-box-shadow":s,"--n-color":l,"--n-button-border-color":c,"--n-border-radius-square":d,position:e.position,left:dt(e.left)||"",right:dt(e.right)||"",top:dt(e.top)||"",bottom:dt(e.bottom)||""}});o.provide(fc,{shapeRef:o.toRef(e,"shape")});const a=n?rt("float-button",void 0,i,e):void 0;return{cssVars:n?void 0:i,mergedClsPrefix:t,themeClass:a==null?void 0:a.themeClass,onRender:a==null?void 0:a.onRender}},render(){const{mergedClsPrefix:e,cssVars:t,shape:n}=this;return o.h("div",{class:[`${e}-float-button-group`,`${e}-float-button-group--${n}-shape`],style:t,role:"group"},this.$slots)}});function Nx(e){const{popoverColor:t,textColor2:n,buttonColor2Hover:r,buttonColor2Pressed:i,primaryColor:a,primaryColorHover:l,primaryColorPressed:s,borderRadius:c}=e;return{color:t,colorHover:r,colorPressed:i,colorPrimary:a,colorPrimaryHover:l,colorPrimaryPressed:s,textColor:n,boxShadow:"0 2px 8px 0px rgba(0, 0, 0, .16)",boxShadowHover:"0 2px 12px 0px rgba(0, 0, 0, .24)",boxShadowPressed:"0 2px 12px 0px rgba(0, 0, 0, .24)",textColorPrimary:"#fff",borderRadiusSquare:c}}const Lx={name:"FloatButton",common:Qe,self:Nx},Hx=w("float-button",`
|
|
1389
1389
|
user-select: none;
|
|
1390
1390
|
cursor: pointer;
|
|
1391
1391
|
color: var(--n-text-color);
|
|
@@ -1463,13 +1463,13 @@ ${t}
|
|
|
1463
1463
|
margin-bottom: 16px;
|
|
1464
1464
|
`),w("float-button",`
|
|
1465
1465
|
position: relative !important;
|
|
1466
|
-
`)])]),
|
|
1466
|
+
`)])]),Vx=Object.assign(Object.assign({},Ce.props),{width:{type:[Number,String],default:40},height:{type:[Number,String],default:40},left:[Number,String],right:[Number,String],top:[Number,String],bottom:[Number,String],shape:{type:String,default:"circle"},position:{type:String,default:"fixed"},type:{type:String,default:"default"},menuTrigger:String,showMenu:{type:Boolean,default:void 0},onUpdateShowMenu:{type:[Function,Array],default:void 0},"onUpdate:showMenu":{type:[Function,Array],default:void 0}}),jx=o.defineComponent({name:"FloatButton",props:Vx,setup(e){const{mergedClsPrefixRef:t,inlineThemeDisabled:n}=Ye(e),r=Ce("FloatButton","-float-button",Hx,Lx,e,t),i=o.inject(fc,null),a=o.ref(!1),l=o.toRef(e,"showMenu"),s=St(l,a);function c(v){const{onUpdateShowMenu:g,"onUpdate:showMenu":k}=e;a.value=v,g&&de(g,v),k&&de(k,v)}const d=o.computed(()=>{const{self:{color:v,textColor:g,boxShadow:k,boxShadowHover:z,boxShadowPressed:$,colorHover:T,colorPrimary:O,colorPrimaryHover:m,textColorPrimary:S,borderRadiusSquare:M,colorPressed:N,colorPrimaryPressed:A},common:{cubicBezierEaseInOut:L}}=r.value,{type:U}=e;return{"--n-bezier":L,"--n-box-shadow":k,"--n-box-shadow-hover":z,"--n-box-shadow-pressed":$,"--n-color":U==="primary"?O:v,"--n-text-color":U==="primary"?S:g,"--n-color-hover":U==="primary"?m:T,"--n-color-pressed":U==="primary"?A:N,"--n-border-radius-square":M}}),u=o.computed(()=>{const{width:v,height:g}=e;return Object.assign({position:i?void 0:e.position,width:dt(v),minHeight:dt(g)},i?null:{left:dt(e.left),right:dt(e.right),top:dt(e.top),bottom:dt(e.bottom)})}),f=o.computed(()=>i?i.shapeRef.value:e.shape),p=()=>{e.menuTrigger==="hover"&&c(!0)},b=()=>{e.menuTrigger==="hover"&&s.value&&c(!1)},h=()=>{e.menuTrigger==="click"&&c(!s.value)},x=n?rt("float-button",o.computed(()=>e.type[0]),d,e):void 0;return{inlineStyle:u,cssVars:n?void 0:d,mergedClsPrefix:t,mergedShape:f,mergedShowMenu:s,themeClass:x==null?void 0:x.themeClass,onRender:x==null?void 0:x.onRender,Mouseenter:p,handleMouseleave:b,handleClick:h}},render(){var e;const{mergedClsPrefix:t,cssVars:n,mergedShape:r,type:i,menuTrigger:a,mergedShowMenu:l,themeClass:s,$slots:c,inlineStyle:d,onRender:u}=this,f=[[rl,this.handleMouseleave]];return u==null||u(),o.withDirectives(o.h("div",{class:[`${t}-float-button`,`${t}-float-button--${r}-shape`,`${t}-float-button--${i}-type`,l&&`${t}-float-button--show-menu`,s],style:[n,d],onMouseenter:this.Mouseenter,onMouseleave:this.handleMouseleave,onClick:this.handleClick,role:"button"},o.h("div",{class:`${t}-float-button__fill`,"aria-hidden":!0}),o.h("div",{class:`${t}-float-button__body`},(e=c.default)===null||e===void 0?void 0:e.call(c),Fe(c.description,p=>p?o.h("div",{class:`${t}-float-button__description`},p):null)),a?o.h("div",{class:`${t}-float-button__close`},o.h(yt,{clsPrefix:t},{default:()=>o.h(Is,null)})):null,a?o.h("div",{onClick:p=>{p.stopPropagation()},"data-float-button-menu":!0,class:`${t}-float-button__menu`},Ct(c.menu,()=>[])):null),f)}});function Wx(e){return e==null||typeof e=="string"&&e.trim()===""?null:Number(e)}function Ux(e){return e.includes(".")&&(/^(-)?\d+.*(\.|0)$/.test(e)||/^\.\d+$/.test(e))}function Zi(e){return e==null?!0:!Number.isNaN(e)}function hc(e,t){return typeof e!="number"?"":t===void 0?String(e):e.toFixed(t)}function Ji(e){if(e===null)return null;if(typeof e=="number")return e;{const t=Number(e);return Number.isNaN(t)?null:t}}const Gx=I([w("input-number-suffix",`
|
|
1467
1467
|
display: inline-block;
|
|
1468
1468
|
margin-right: 10px;
|
|
1469
1469
|
`),w("input-number-prefix",`
|
|
1470
1470
|
display: inline-block;
|
|
1471
1471
|
margin-left: 10px;
|
|
1472
|
-
`)]),
|
|
1472
|
+
`)]),pc=800,bc=100,qx=Object.assign(Object.assign({},Ce.props),{autofocus:Boolean,loading:{type:Boolean,default:void 0},placeholder:String,defaultValue:{type:Number,default:null},value:Number,step:{type:[Number,String],default:1},min:[Number,String],max:[Number,String],size:String,disabled:{type:Boolean,default:void 0},validator:Function,bordered:{type:Boolean,default:void 0},showButton:{type:Boolean,default:!0},buttonPlacement:{type:String,default:"right"},inputProps:Object,readonly:Boolean,clearable:Boolean,keyboard:{type:Object,default:{}},updateValueOnInput:{type:Boolean,default:!0},round:{type:Boolean,default:void 0},parse:Function,format:Function,precision:Number,status:String,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],onFocus:[Function,Array],onBlur:[Function,Array],onClear:[Function,Array],onChange:[Function,Array]}),Kx=o.defineComponent({name:"InputNumber",props:qx,setup(e){process.env.NODE_ENV!=="production"&&o.watchEffect(()=>{e.onChange!==void 0&&ot("input-number","`on-change` is deprecated, please use `on-update:value` instead")});const{mergedBorderedRef:t,mergedClsPrefixRef:n,mergedRtlRef:r}=Ye(e),i=Ce("InputNumber","-input-number",Gx,Tx,e,n),{localeRef:a}=vr("InputNumber"),l=vn(e),{mergedSizeRef:s,mergedDisabledRef:c,mergedStatusRef:d}=l,u=o.ref(null),f=o.ref(null),p=o.ref(null),b=o.ref(e.defaultValue),h=o.toRef(e,"value"),x=St(h,b),v=o.ref(""),g=X=>{const F=String(X).split(".")[1];return F?F.length:0},k=X=>{const F=[e.min,e.max,e.step,X].map(ne=>ne===void 0?0:g(ne));return Math.max(...F)},z=Je(()=>{const{placeholder:X}=e;return X!==void 0?X:a.value.placeholder}),$=Je(()=>{const X=Ji(e.step);return X!==null?X===0?1:Math.abs(X):1}),T=Je(()=>{const X=Ji(e.min);return X!==null?X:null}),O=Je(()=>{const X=Ji(e.max);return X!==null?X:null}),m=()=>{const{value:X}=x;if(Zi(X)){const{format:F,precision:ne}=e;F?v.value=F(X):X===null||ne===void 0||g(X)>ne?v.value=hc(X,void 0):v.value=hc(X,ne)}else v.value=String(X)};m();const S=X=>{const{value:F}=x;if(X===F){m();return}const{"onUpdate:value":ne,onUpdateValue:_,onChange:D}=e,{nTriggerFormInput:K,nTriggerFormChange:R}=l;D&&de(D,X),_&&de(_,X),ne&&de(ne,X),b.value=X,K(),R()},M=({offset:X,doUpdateIfValid:F,fixPrecision:ne,isInputing:_})=>{const{value:D}=v;if(_&&Ux(D))return!1;const K=(e.parse||Wx)(D);if(K===null)return F&&S(null),null;if(Zi(K)){const R=g(K),{precision:C}=e;if(C!==void 0&&C<R&&!ne)return!1;let B=Number.parseFloat((K+X).toFixed(C??k(K)));if(Zi(B)){const{value:re}=O,{value:we}=T;if(re!==null&&B>re){if(!F||_)return!1;B=re}if(we!==null&&B<we){if(!F||_)return!1;B=we}return e.validator&&!e.validator(B)?!1:(F&&S(B),B)}}return!1},N=Je(()=>M({offset:0,doUpdateIfValid:!1,isInputing:!1,fixPrecision:!1})===!1),A=Je(()=>{const{value:X}=x;if(e.validator&&X===null)return!1;const{value:F}=$;return M({offset:-F,doUpdateIfValid:!1,isInputing:!1,fixPrecision:!1})!==!1}),L=Je(()=>{const{value:X}=x;if(e.validator&&X===null)return!1;const{value:F}=$;return M({offset:+F,doUpdateIfValid:!1,isInputing:!1,fixPrecision:!1})!==!1});function U(X){const{onFocus:F}=e,{nTriggerFormFocus:ne}=l;F&&de(F,X),ne()}function J(X){var F,ne;if(X.target===((F=u.value)===null||F===void 0?void 0:F.wrapperElRef))return;const _=M({offset:0,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0});if(_!==!1){const R=(ne=u.value)===null||ne===void 0?void 0:ne.inputElRef;R&&(R.value=String(_||"")),x.value===_&&m()}else m();const{onBlur:D}=e,{nTriggerFormBlur:K}=l;D&&de(D,X),K(),o.nextTick(()=>{m()})}function j(X){const{onClear:F}=e;F&&de(F,X)}function Q(){const{value:X}=L;if(!X){$e();return}const{value:F}=x;if(F===null)e.validator||S(ae());else{const{value:ne}=$;M({offset:ne,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0})}}function Y(){const{value:X}=A;if(!X){oe();return}const{value:F}=x;if(F===null)e.validator||S(ae());else{const{value:ne}=$;M({offset:-ne,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0})}}const ie=U,me=J;function ae(){if(e.validator)return null;const{value:X}=T,{value:F}=O;return X!==null?Math.max(0,X):F!==null?Math.min(0,F):0}function he(X){j(X),S(null)}function G(X){var F,ne,_;!((F=p.value)===null||F===void 0)&&F.$el.contains(X.target)&&X.preventDefault(),!((ne=f.value)===null||ne===void 0)&&ne.$el.contains(X.target)&&X.preventDefault(),(_=u.value)===null||_===void 0||_.activate()}let te=null,xe=null,Se=null;function oe(){Se&&(window.clearTimeout(Se),Se=null),te&&(window.clearInterval(te),te=null)}let Te=null;function $e(){Te&&(window.clearTimeout(Te),Te=null),xe&&(window.clearInterval(xe),xe=null)}function se(){oe(),Se=window.setTimeout(()=>{te=window.setInterval(()=>{Y()},bc)},pc),ze("mouseup",document,oe,{once:!0})}function Ae(){$e(),Te=window.setTimeout(()=>{xe=window.setInterval(()=>{Q()},bc)},pc),ze("mouseup",document,$e,{once:!0})}const Be=()=>{xe||Q()},We=()=>{te||Y()};function Ie(X){var F,ne;if(X.key==="Enter"){if(X.target===((F=u.value)===null||F===void 0?void 0:F.wrapperElRef))return;M({offset:0,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0})!==!1&&((ne=u.value)===null||ne===void 0||ne.deactivate())}else if(X.key==="ArrowUp"){if(!L.value||e.keyboard.ArrowUp===!1)return;X.preventDefault(),M({offset:0,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0})!==!1&&Q()}else if(X.key==="ArrowDown"){if(!A.value||e.keyboard.ArrowDown===!1)return;X.preventDefault(),M({offset:0,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0})!==!1&&Y()}}function Le(X){v.value=X,e.updateValueOnInput&&!e.format&&!e.parse&&e.precision===void 0&&M({offset:0,doUpdateIfValid:!0,isInputing:!0,fixPrecision:!1})}o.watch(x,()=>{m()});const Ke={focus:()=>{var X;return(X=u.value)===null||X===void 0?void 0:X.focus()},blur:()=>{var X;return(X=u.value)===null||X===void 0?void 0:X.blur()},select:()=>{var X;return(X=u.value)===null||X===void 0?void 0:X.select()}},Re=tn("InputNumber",r,n);return Object.assign(Object.assign({},Ke),{rtlEnabled:Re,inputInstRef:u,minusButtonInstRef:f,addButtonInstRef:p,mergedClsPrefix:n,mergedBordered:t,uncontrolledValue:b,mergedValue:x,mergedPlaceholder:z,displayedValueInvalid:N,mergedSize:s,mergedDisabled:c,displayedValue:v,addable:L,minusable:A,mergedStatus:d,handleFocus:ie,handleBlur:me,handleClear:he,handleMouseDown:G,handleAddClick:Be,handleMinusClick:We,handleAddMousedown:Ae,handleMinusMousedown:se,handleKeyDown:Ie,handleUpdateDisplayedValue:Le,mergedTheme:i,inputThemeOverrides:{paddingSmall:"0 8px 0 10px",paddingMedium:"0 8px 0 12px",paddingLarge:"0 8px 0 14px"},buttonThemeOverrides:o.computed(()=>{const{self:{iconColorDisabled:X}}=i.value,[F,ne,_,D]=nt(X);return{textColorTextDisabled:`rgb(${F}, ${ne}, ${_})`,opacityDisabled:`${D}`}})})},render(){const{mergedClsPrefix:e,$slots:t}=this,n=()=>o.h(sc,{text:!0,disabled:!this.minusable||this.mergedDisabled||this.readonly,focusable:!1,theme:this.mergedTheme.peers.Button,themeOverrides:this.mergedTheme.peerOverrides.Button,builtinThemeOverrides:this.buttonThemeOverrides,onClick:this.handleMinusClick,onMousedown:this.handleMinusMousedown,ref:"minusButtonInstRef"},{icon:()=>Ct(t["minus-icon"],()=>[o.h(yt,{clsPrefix:e},{default:()=>o.h(Lg,null)})])}),r=()=>o.h(sc,{text:!0,disabled:!this.addable||this.mergedDisabled||this.readonly,focusable:!1,theme:this.mergedTheme.peers.Button,themeOverrides:this.mergedTheme.peerOverrides.Button,builtinThemeOverrides:this.buttonThemeOverrides,onClick:this.handleAddClick,onMousedown:this.handleAddMousedown,ref:"addButtonInstRef"},{icon:()=>Ct(t["add-icon"],()=>[o.h(yt,{clsPrefix:e},{default:()=>o.h(As,null)})])});return o.h("div",{class:[`${e}-input-number`,this.rtlEnabled&&`${e}-input-number--rtl`]},o.h(yr,{ref:"inputInstRef",autofocus:this.autofocus,status:this.mergedStatus,bordered:this.mergedBordered,loading:this.loading,value:this.displayedValue,onUpdateValue:this.handleUpdateDisplayedValue,theme:this.mergedTheme.peers.Input,themeOverrides:this.mergedTheme.peerOverrides.Input,builtinThemeOverrides:this.inputThemeOverrides,size:this.mergedSize,placeholder:this.mergedPlaceholder,disabled:this.mergedDisabled,readonly:this.readonly,round:this.round,textDecoration:this.displayedValueInvalid?"line-through":void 0,onFocus:this.handleFocus,onBlur:this.handleBlur,onKeydown:this.handleKeyDown,onMousedown:this.handleMouseDown,onClear:this.handleClear,clearable:this.clearable,inputProps:this.inputProps,internalLoadingBeforeSuffix:!0},{prefix:()=>{var i;return this.showButton&&this.buttonPlacement==="both"?[n(),Fe(t.prefix,a=>a?o.h("span",{class:`${e}-input-number-prefix`},a):null)]:(i=t.prefix)===null||i===void 0?void 0:i.call(t)},suffix:()=>{var i;return this.showButton?[Fe(t.suffix,a=>a?o.h("span",{class:`${e}-input-number-suffix`},a):null),this.buttonPlacement==="right"?n():null,r()]:(i=t.suffix)===null||i===void 0?void 0:i.call(t)}}))}});function mc(e){return window.TouchEvent&&e instanceof window.TouchEvent}function gc(){const e=new Map,t=n=>r=>{e.set(n,r)};return o.onBeforeUpdate(()=>{e.clear()}),[e,t]}const Xx=I([w("slider",`
|
|
1473
1473
|
display: block;
|
|
1474
1474
|
padding: calc((var(--n-handle-size) - var(--n-rail-height)) / 2) 0;
|
|
1475
1475
|
position: relative;
|
|
@@ -1626,7 +1626,7 @@ ${t}
|
|
|
1626
1626
|
margin-top: 12px;
|
|
1627
1627
|
`),W("left",`
|
|
1628
1628
|
margin-right: 12px;
|
|
1629
|
-
`),xr()]),ru(w("slider",[w("slider-dot","background-color: var(--n-dot-color-modal);")])),ou(w("slider",[w("slider-dot","background-color: var(--n-dot-color-popover);")]))]),Xx=0,Yx=Object.assign(Object.assign({},Ce.props),{to:lt.propTo,defaultValue:{type:[Number,Array],default:0},marks:Object,disabled:{type:Boolean,default:void 0},formatTooltip:Function,keyboard:{type:Boolean,default:!0},min:{type:Number,default:0},max:{type:Number,default:100},step:{type:[Number,String],default:1},range:Boolean,value:[Number,Array],placement:String,showTooltip:{type:Boolean,default:void 0},tooltip:{type:Boolean,default:!0},vertical:Boolean,reverse:Boolean,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],onDragstart:[Function],onDragend:[Function]}),Zx=o.defineComponent({name:"Slider",props:Yx,setup(e){const{mergedClsPrefixRef:t,namespaceRef:n,inlineThemeDisabled:r}=Ye(e),i=Ce("Slider","-slider",Kx,Rx,e,t),a=o.ref(null),[l,s]=mc(),[c,d]=mc(),u=o.ref(new Set),f=vn(e),{mergedDisabledRef:p}=f,b=o.computed(()=>{const{step:R}=e;if(Number(R)<=0||R==="mark")return 0;const C=R.toString();let B=0;return C.includes(".")&&(B=C.length-C.indexOf(".")-1),B}),h=o.ref(e.defaultValue),x=o.toRef(e,"value"),v=St(x,h),g=o.computed(()=>{const{value:R}=v;return(e.range?R:[R]).map(G)}),k=o.computed(()=>g.value.length>2),z=o.computed(()=>e.placement===void 0?e.vertical?"right":"top":e.placement),$=o.computed(()=>{const{marks:R}=e;return R?Object.keys(R).map(Number.parseFloat):null}),T=o.ref(-1),O=o.ref(-1),m=o.ref(-1),S=o.ref(!1),M=o.ref(!1),N=o.computed(()=>{const{vertical:R,reverse:C}=e;return R?C?"top":"bottom":C?"right":"left"}),A=o.computed(()=>{if(k.value)return;const R=g.value,C=te(e.range?Math.min(...R):e.min),B=te(e.range?Math.max(...R):R[0]),{value:re}=N;return e.vertical?{[re]:`${C}%`,height:`${B-C}%`}:{[re]:`${C}%`,width:`${B-C}%`}}),L=o.computed(()=>{const R=[],{marks:C}=e;if(C){const B=g.value.slice();B.sort((De,Me)=>De-Me);const{value:re}=N,{value:we}=k,{range:Pe}=e,Ue=we?()=>!1:De=>Pe?De>=B[0]&&De<=B[B.length-1]:De<=B[0];for(const De of Object.keys(C)){const Me=Number(De);R.push({active:Ue(Me),label:C[De],style:{[re]:`${te(Me)}%`}})}}return R});function U(R,C){const B=te(R),{value:re}=N;return{[re]:`${B}%`,zIndex:C===T.value?1:0}}function J(R){return e.showTooltip||m.value===R||T.value===R&&S.value}function j(R){return S.value?!(T.value===R&&O.value===R):!0}function Q(R){var C;~R&&(T.value=R,(C=l.get(R))===null||C===void 0||C.focus())}function Y(){c.forEach((R,C)=>{J(C)&&R.syncPosition()})}function ie(R){const{"onUpdate:value":C,onUpdateValue:B}=e,{nTriggerFormInput:re,nTriggerFormChange:we}=f;B&&de(B,R),C&&de(C,R),h.value=R,re(),we()}function me(R){const{range:C}=e;if(C){if(Array.isArray(R)){const{value:B}=g;R.join()!==B.join()&&ie(R)}}else Array.isArray(R)||g.value[0]!==R&&ie(R)}function ae(R,C){if(e.range){const B=g.value.slice();B.splice(C,1,R),me(B)}else me(R)}function he(R,C,B){const re=B!==void 0;B||(B=R-C>0?1:-1);const we=$.value||[],{step:Pe}=e;if(Pe==="mark"){const Me=oe(R,we.concat(C),re?B:void 0);return Me?Me.value:C}if(Pe<=0)return C;const{value:Ue}=b;let De;if(re){const Me=Number((C/Pe).toFixed(Ue)),Ze=Math.floor(Me),ft=Me>Ze?Ze:Ze-1,tt=Me<Ze?Ze:Ze+1;De=oe(C,[Number((ft*Pe).toFixed(Ue)),Number((tt*Pe).toFixed(Ue)),...we],B)}else{const Me=Se(R);De=oe(R,[...we,Me])}return De?G(De.value):C}function G(R){return Math.min(e.max,Math.max(e.min,R))}function te(R){const{max:C,min:B}=e;return(R-B)/(C-B)*100}function xe(R){const{max:C,min:B}=e;return B+(C-B)*R}function Se(R){const{step:C,min:B}=e;if(Number(C)<=0||C==="mark")return R;const re=Math.round((R-B)/C)*C+B;return Number(re.toFixed(b.value))}function oe(R,C=$.value,B){if(!(C!=null&&C.length))return null;let re=null,we=-1;for(;++we<C.length;){const Pe=C[we]-R,Ue=Math.abs(Pe);(B===void 0||Pe*B>0)&&(re===null||Ue<re.distance)&&(re={index:we,distance:Ue,value:C[we]})}return re}function Te(R){const C=a.value;if(!C)return;const B=bc(R)?R.touches[0]:R,re=C.getBoundingClientRect();let we;return e.vertical?we=(re.bottom-B.clientY)/re.height:we=(B.clientX-re.left)/re.width,e.reverse&&(we=1-we),xe(we)}function $e(R){if(p.value||!e.keyboard)return;const{vertical:C,reverse:B}=e;switch(R.key){case"ArrowUp":R.preventDefault(),se(C&&B?-1:1);break;case"ArrowRight":R.preventDefault(),se(!C&&B?-1:1);break;case"ArrowDown":R.preventDefault(),se(C&&B?1:-1);break;case"ArrowLeft":R.preventDefault(),se(!C&&B?1:-1);break}}function se(R){const C=T.value;if(C===-1)return;const{step:B}=e,re=g.value[C],we=Number(B)<=0||B==="mark"?re:re+B*R;ae(he(we,re,R>0?1:-1),C)}function Ae(R){var C,B;if(p.value||!bc(R)&&R.button!==Xx)return;const re=Te(R);if(re===void 0)return;const we=g.value.slice(),Pe=e.range?(B=(C=oe(re,we))===null||C===void 0?void 0:C.index)!==null&&B!==void 0?B:-1:0;Pe!==-1&&(R.preventDefault(),Q(Pe),Be(),ae(he(re,g.value[Pe]),Pe))}function Be(){S.value||(S.value=!0,e.onDragstart&&de(e.onDragstart),ze("touchend",document,Le),ze("mouseup",document,Le),ze("touchmove",document,Ie),ze("mousemove",document,Ie))}function We(){S.value&&(S.value=!1,e.onDragend&&de(e.onDragend),ke("touchend",document,Le),ke("mouseup",document,Le),ke("touchmove",document,Ie),ke("mousemove",document,Ie))}function Ie(R){const{value:C}=T;if(!S.value||C===-1){We();return}const B=Te(R);B!==void 0&&ae(he(B,g.value[C]),C)}function Le(){We()}function Ke(R){T.value=R,p.value||(m.value=R)}function Re(R){T.value===R&&(T.value=-1,We()),m.value===R&&(m.value=-1)}function X(R){m.value=R}function F(R){m.value===R&&(m.value=-1)}o.watch(T,(R,C)=>void o.nextTick(()=>O.value=C)),o.watch(v,()=>{if(e.marks){if(M.value)return;M.value=!0,o.nextTick(()=>{M.value=!1})}o.nextTick(Y)}),o.onBeforeUnmount(()=>{We()});const ne=o.computed(()=>{const{self:{markFontSize:R,railColor:C,railColorHover:B,fillColor:re,fillColorHover:we,handleColor:Pe,opacityDisabled:Ue,dotColor:De,dotColorModal:Me,handleBoxShadow:Ze,handleBoxShadowHover:ft,handleBoxShadowActive:tt,handleBoxShadowFocus:st,dotBorder:y,dotBoxShadow:H,railHeight:Z,railWidthVertical:le,handleSize:ce,dotHeight:ue,dotWidth:fe,dotBorderRadius:ge,fontSize:Ee,dotBorderActive:mt,dotColorPopover:on},common:{cubicBezierEaseInOut:_n}}=i.value;return{"--n-bezier":_n,"--n-dot-border":y,"--n-dot-border-active":mt,"--n-dot-border-radius":ge,"--n-dot-box-shadow":H,"--n-dot-color":De,"--n-dot-color-modal":Me,"--n-dot-color-popover":on,"--n-dot-height":ue,"--n-dot-width":fe,"--n-fill-color":re,"--n-fill-color-hover":we,"--n-font-size":Ee,"--n-handle-box-shadow":Ze,"--n-handle-box-shadow-active":tt,"--n-handle-box-shadow-focus":st,"--n-handle-box-shadow-hover":ft,"--n-handle-color":Pe,"--n-handle-size":ce,"--n-opacity-disabled":Ue,"--n-rail-color":C,"--n-rail-color-hover":B,"--n-rail-height":Z,"--n-rail-width-vertical":le,"--n-mark-font-size":R}}),_=r?rt("slider",void 0,ne,e):void 0,D=o.computed(()=>{const{self:{fontSize:R,indicatorColor:C,indicatorBoxShadow:B,indicatorTextColor:re,indicatorBorderRadius:we}}=i.value;return{"--n-font-size":R,"--n-indicator-border-radius":we,"--n-indicator-box-shadow":B,"--n-indicator-color":C,"--n-indicator-text-color":re}}),K=r?rt("slider-indicator",void 0,D,e):void 0;return{mergedClsPrefix:t,namespace:n,uncontrolledValue:h,mergedValue:v,mergedDisabled:p,mergedPlacement:z,isMounted:Ln(),adjustedTo:lt(e),dotTransitionDisabled:M,markInfos:L,isShowTooltip:J,shouldKeepTooltipTransition:j,handleRailRef:a,setHandleRefs:s,setFollowerRefs:d,fillStyle:A,getHandleStyle:U,activeIndex:T,arrifiedValues:g,followerEnabledIndexSet:u,handleRailMouseDown:Ae,handleHandleFocus:Ke,handleHandleBlur:Re,handleHandleMouseEnter:X,handleHandleMouseLeave:F,handleRailKeyDown:$e,indicatorCssVars:r?void 0:D,indicatorThemeClass:K==null?void 0:K.themeClass,indicatorOnRender:K==null?void 0:K.onRender,cssVars:r?void 0:ne,themeClass:_==null?void 0:_.themeClass,onRender:_==null?void 0:_.onRender}},render(){var e;const{mergedClsPrefix:t,themeClass:n,formatTooltip:r}=this;return(e=this.onRender)===null||e===void 0||e.call(this),o.h("div",{class:[`${t}-slider`,n,{[`${t}-slider--disabled`]:this.mergedDisabled,[`${t}-slider--active`]:this.activeIndex!==-1,[`${t}-slider--with-mark`]:this.marks,[`${t}-slider--vertical`]:this.vertical,[`${t}-slider--reverse`]:this.reverse}],style:this.cssVars,onKeydown:this.handleRailKeyDown,onMousedown:this.handleRailMouseDown,onTouchstart:this.handleRailMouseDown},o.h("div",{class:`${t}-slider-rail`},o.h("div",{class:`${t}-slider-rail__fill`,style:this.fillStyle}),this.marks?o.h("div",{class:[`${t}-slider-dots`,this.dotTransitionDisabled&&`${t}-slider-dots--transition-disabled`]},this.markInfos.map(i=>o.h("div",{key:i.label,class:[`${t}-slider-dot`,{[`${t}-slider-dot--active`]:i.active}],style:i.style}))):null,o.h("div",{ref:"handleRailRef",class:`${t}-slider-handles`},this.arrifiedValues.map((i,a)=>{const l=this.isShowTooltip(a);return o.h(jr,null,{default:()=>[o.h(Wr,null,{default:()=>o.h("div",{ref:this.setHandleRefs(a),class:`${t}-slider-handle-wrapper`,tabindex:this.mergedDisabled?-1:0,role:"slider","aria-valuenow":i,"aria-valuemin":this.min,"aria-valuemax":this.max,"aria-orientation":this.vertical?"vertical":"horizontal","aria-disabled":this.disabled,style:this.getHandleStyle(i,a),onFocus:()=>{this.handleHandleFocus(a)},onBlur:()=>{this.handleHandleBlur(a)},onMouseenter:()=>{this.handleHandleMouseEnter(a)},onMouseleave:()=>{this.handleHandleMouseLeave(a)}},Ct(this.$slots.thumb,()=>[o.h("div",{class:`${t}-slider-handle`})]))}),this.tooltip&&o.h(qr,{ref:this.setFollowerRefs(a),show:l,to:this.adjustedTo,enabled:this.showTooltip&&!this.range||this.followerEnabledIndexSet.has(a),teleportDisabled:this.adjustedTo===lt.tdkey,placement:this.mergedPlacement,containerClass:this.namespace},{default:()=>o.h(o.Transition,{name:"fade-in-scale-up-transition",appear:this.isMounted,css:this.shouldKeepTooltipTransition(a),onEnter:()=>{this.followerEnabledIndexSet.add(a)},onAfterLeave:()=>{this.followerEnabledIndexSet.delete(a)}},{default:()=>{var s;return l?((s=this.indicatorOnRender)===null||s===void 0||s.call(this),o.h("div",{class:[`${t}-slider-handle-indicator`,this.indicatorThemeClass,`${t}-slider-handle-indicator--${this.mergedPlacement}`],style:this.indicatorCssVars},typeof r=="function"?r(i):i)):null}})})]})})),this.marks?o.h("div",{class:`${t}-slider-marks`},this.markInfos.map(i=>o.h("div",{key:i.label,class:`${t}-slider-mark`,style:i.style},i.label))):null))}}),Jx=w("switch",`
|
|
1629
|
+
`),xr()]),ou(w("slider",[w("slider-dot","background-color: var(--n-dot-color-modal);")])),iu(w("slider",[w("slider-dot","background-color: var(--n-dot-color-popover);")]))]),Yx=0,Zx=Object.assign(Object.assign({},Ce.props),{to:lt.propTo,defaultValue:{type:[Number,Array],default:0},marks:Object,disabled:{type:Boolean,default:void 0},formatTooltip:Function,keyboard:{type:Boolean,default:!0},min:{type:Number,default:0},max:{type:Number,default:100},step:{type:[Number,String],default:1},range:Boolean,value:[Number,Array],placement:String,showTooltip:{type:Boolean,default:void 0},tooltip:{type:Boolean,default:!0},vertical:Boolean,reverse:Boolean,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],onDragstart:[Function],onDragend:[Function]}),Jx=o.defineComponent({name:"Slider",props:Zx,setup(e){const{mergedClsPrefixRef:t,namespaceRef:n,inlineThemeDisabled:r}=Ye(e),i=Ce("Slider","-slider",Xx,Px,e,t),a=o.ref(null),[l,s]=gc(),[c,d]=gc(),u=o.ref(new Set),f=vn(e),{mergedDisabledRef:p}=f,b=o.computed(()=>{const{step:R}=e;if(Number(R)<=0||R==="mark")return 0;const C=R.toString();let B=0;return C.includes(".")&&(B=C.length-C.indexOf(".")-1),B}),h=o.ref(e.defaultValue),x=o.toRef(e,"value"),v=St(x,h),g=o.computed(()=>{const{value:R}=v;return(e.range?R:[R]).map(G)}),k=o.computed(()=>g.value.length>2),z=o.computed(()=>e.placement===void 0?e.vertical?"right":"top":e.placement),$=o.computed(()=>{const{marks:R}=e;return R?Object.keys(R).map(Number.parseFloat):null}),T=o.ref(-1),O=o.ref(-1),m=o.ref(-1),S=o.ref(!1),M=o.ref(!1),N=o.computed(()=>{const{vertical:R,reverse:C}=e;return R?C?"top":"bottom":C?"right":"left"}),A=o.computed(()=>{if(k.value)return;const R=g.value,C=te(e.range?Math.min(...R):e.min),B=te(e.range?Math.max(...R):R[0]),{value:re}=N;return e.vertical?{[re]:`${C}%`,height:`${B-C}%`}:{[re]:`${C}%`,width:`${B-C}%`}}),L=o.computed(()=>{const R=[],{marks:C}=e;if(C){const B=g.value.slice();B.sort((De,Me)=>De-Me);const{value:re}=N,{value:we}=k,{range:Pe}=e,Ue=we?()=>!1:De=>Pe?De>=B[0]&&De<=B[B.length-1]:De<=B[0];for(const De of Object.keys(C)){const Me=Number(De);R.push({active:Ue(Me),label:C[De],style:{[re]:`${te(Me)}%`}})}}return R});function U(R,C){const B=te(R),{value:re}=N;return{[re]:`${B}%`,zIndex:C===T.value?1:0}}function J(R){return e.showTooltip||m.value===R||T.value===R&&S.value}function j(R){return S.value?!(T.value===R&&O.value===R):!0}function Q(R){var C;~R&&(T.value=R,(C=l.get(R))===null||C===void 0||C.focus())}function Y(){c.forEach((R,C)=>{J(C)&&R.syncPosition()})}function ie(R){const{"onUpdate:value":C,onUpdateValue:B}=e,{nTriggerFormInput:re,nTriggerFormChange:we}=f;B&&de(B,R),C&&de(C,R),h.value=R,re(),we()}function me(R){const{range:C}=e;if(C){if(Array.isArray(R)){const{value:B}=g;R.join()!==B.join()&&ie(R)}}else Array.isArray(R)||g.value[0]!==R&&ie(R)}function ae(R,C){if(e.range){const B=g.value.slice();B.splice(C,1,R),me(B)}else me(R)}function he(R,C,B){const re=B!==void 0;B||(B=R-C>0?1:-1);const we=$.value||[],{step:Pe}=e;if(Pe==="mark"){const Me=oe(R,we.concat(C),re?B:void 0);return Me?Me.value:C}if(Pe<=0)return C;const{value:Ue}=b;let De;if(re){const Me=Number((C/Pe).toFixed(Ue)),Ze=Math.floor(Me),ft=Me>Ze?Ze:Ze-1,tt=Me<Ze?Ze:Ze+1;De=oe(C,[Number((ft*Pe).toFixed(Ue)),Number((tt*Pe).toFixed(Ue)),...we],B)}else{const Me=Se(R);De=oe(R,[...we,Me])}return De?G(De.value):C}function G(R){return Math.min(e.max,Math.max(e.min,R))}function te(R){const{max:C,min:B}=e;return(R-B)/(C-B)*100}function xe(R){const{max:C,min:B}=e;return B+(C-B)*R}function Se(R){const{step:C,min:B}=e;if(Number(C)<=0||C==="mark")return R;const re=Math.round((R-B)/C)*C+B;return Number(re.toFixed(b.value))}function oe(R,C=$.value,B){if(!(C!=null&&C.length))return null;let re=null,we=-1;for(;++we<C.length;){const Pe=C[we]-R,Ue=Math.abs(Pe);(B===void 0||Pe*B>0)&&(re===null||Ue<re.distance)&&(re={index:we,distance:Ue,value:C[we]})}return re}function Te(R){const C=a.value;if(!C)return;const B=mc(R)?R.touches[0]:R,re=C.getBoundingClientRect();let we;return e.vertical?we=(re.bottom-B.clientY)/re.height:we=(B.clientX-re.left)/re.width,e.reverse&&(we=1-we),xe(we)}function $e(R){if(p.value||!e.keyboard)return;const{vertical:C,reverse:B}=e;switch(R.key){case"ArrowUp":R.preventDefault(),se(C&&B?-1:1);break;case"ArrowRight":R.preventDefault(),se(!C&&B?-1:1);break;case"ArrowDown":R.preventDefault(),se(C&&B?1:-1);break;case"ArrowLeft":R.preventDefault(),se(!C&&B?1:-1);break}}function se(R){const C=T.value;if(C===-1)return;const{step:B}=e,re=g.value[C],we=Number(B)<=0||B==="mark"?re:re+B*R;ae(he(we,re,R>0?1:-1),C)}function Ae(R){var C,B;if(p.value||!mc(R)&&R.button!==Yx)return;const re=Te(R);if(re===void 0)return;const we=g.value.slice(),Pe=e.range?(B=(C=oe(re,we))===null||C===void 0?void 0:C.index)!==null&&B!==void 0?B:-1:0;Pe!==-1&&(R.preventDefault(),Q(Pe),Be(),ae(he(re,g.value[Pe]),Pe))}function Be(){S.value||(S.value=!0,e.onDragstart&&de(e.onDragstart),ze("touchend",document,Le),ze("mouseup",document,Le),ze("touchmove",document,Ie),ze("mousemove",document,Ie))}function We(){S.value&&(S.value=!1,e.onDragend&&de(e.onDragend),ke("touchend",document,Le),ke("mouseup",document,Le),ke("touchmove",document,Ie),ke("mousemove",document,Ie))}function Ie(R){const{value:C}=T;if(!S.value||C===-1){We();return}const B=Te(R);B!==void 0&&ae(he(B,g.value[C]),C)}function Le(){We()}function Ke(R){T.value=R,p.value||(m.value=R)}function Re(R){T.value===R&&(T.value=-1,We()),m.value===R&&(m.value=-1)}function X(R){m.value=R}function F(R){m.value===R&&(m.value=-1)}o.watch(T,(R,C)=>void o.nextTick(()=>O.value=C)),o.watch(v,()=>{if(e.marks){if(M.value)return;M.value=!0,o.nextTick(()=>{M.value=!1})}o.nextTick(Y)}),o.onBeforeUnmount(()=>{We()});const ne=o.computed(()=>{const{self:{markFontSize:R,railColor:C,railColorHover:B,fillColor:re,fillColorHover:we,handleColor:Pe,opacityDisabled:Ue,dotColor:De,dotColorModal:Me,handleBoxShadow:Ze,handleBoxShadowHover:ft,handleBoxShadowActive:tt,handleBoxShadowFocus:st,dotBorder:y,dotBoxShadow:H,railHeight:Z,railWidthVertical:le,handleSize:ce,dotHeight:ue,dotWidth:fe,dotBorderRadius:ge,fontSize:Ee,dotBorderActive:mt,dotColorPopover:on},common:{cubicBezierEaseInOut:_n}}=i.value;return{"--n-bezier":_n,"--n-dot-border":y,"--n-dot-border-active":mt,"--n-dot-border-radius":ge,"--n-dot-box-shadow":H,"--n-dot-color":De,"--n-dot-color-modal":Me,"--n-dot-color-popover":on,"--n-dot-height":ue,"--n-dot-width":fe,"--n-fill-color":re,"--n-fill-color-hover":we,"--n-font-size":Ee,"--n-handle-box-shadow":Ze,"--n-handle-box-shadow-active":tt,"--n-handle-box-shadow-focus":st,"--n-handle-box-shadow-hover":ft,"--n-handle-color":Pe,"--n-handle-size":ce,"--n-opacity-disabled":Ue,"--n-rail-color":C,"--n-rail-color-hover":B,"--n-rail-height":Z,"--n-rail-width-vertical":le,"--n-mark-font-size":R}}),_=r?rt("slider",void 0,ne,e):void 0,D=o.computed(()=>{const{self:{fontSize:R,indicatorColor:C,indicatorBoxShadow:B,indicatorTextColor:re,indicatorBorderRadius:we}}=i.value;return{"--n-font-size":R,"--n-indicator-border-radius":we,"--n-indicator-box-shadow":B,"--n-indicator-color":C,"--n-indicator-text-color":re}}),K=r?rt("slider-indicator",void 0,D,e):void 0;return{mergedClsPrefix:t,namespace:n,uncontrolledValue:h,mergedValue:v,mergedDisabled:p,mergedPlacement:z,isMounted:Ln(),adjustedTo:lt(e),dotTransitionDisabled:M,markInfos:L,isShowTooltip:J,shouldKeepTooltipTransition:j,handleRailRef:a,setHandleRefs:s,setFollowerRefs:d,fillStyle:A,getHandleStyle:U,activeIndex:T,arrifiedValues:g,followerEnabledIndexSet:u,handleRailMouseDown:Ae,handleHandleFocus:Ke,handleHandleBlur:Re,handleHandleMouseEnter:X,handleHandleMouseLeave:F,handleRailKeyDown:$e,indicatorCssVars:r?void 0:D,indicatorThemeClass:K==null?void 0:K.themeClass,indicatorOnRender:K==null?void 0:K.onRender,cssVars:r?void 0:ne,themeClass:_==null?void 0:_.themeClass,onRender:_==null?void 0:_.onRender}},render(){var e;const{mergedClsPrefix:t,themeClass:n,formatTooltip:r}=this;return(e=this.onRender)===null||e===void 0||e.call(this),o.h("div",{class:[`${t}-slider`,n,{[`${t}-slider--disabled`]:this.mergedDisabled,[`${t}-slider--active`]:this.activeIndex!==-1,[`${t}-slider--with-mark`]:this.marks,[`${t}-slider--vertical`]:this.vertical,[`${t}-slider--reverse`]:this.reverse}],style:this.cssVars,onKeydown:this.handleRailKeyDown,onMousedown:this.handleRailMouseDown,onTouchstart:this.handleRailMouseDown},o.h("div",{class:`${t}-slider-rail`},o.h("div",{class:`${t}-slider-rail__fill`,style:this.fillStyle}),this.marks?o.h("div",{class:[`${t}-slider-dots`,this.dotTransitionDisabled&&`${t}-slider-dots--transition-disabled`]},this.markInfos.map(i=>o.h("div",{key:i.label,class:[`${t}-slider-dot`,{[`${t}-slider-dot--active`]:i.active}],style:i.style}))):null,o.h("div",{ref:"handleRailRef",class:`${t}-slider-handles`},this.arrifiedValues.map((i,a)=>{const l=this.isShowTooltip(a);return o.h(jr,null,{default:()=>[o.h(Wr,null,{default:()=>o.h("div",{ref:this.setHandleRefs(a),class:`${t}-slider-handle-wrapper`,tabindex:this.mergedDisabled?-1:0,role:"slider","aria-valuenow":i,"aria-valuemin":this.min,"aria-valuemax":this.max,"aria-orientation":this.vertical?"vertical":"horizontal","aria-disabled":this.disabled,style:this.getHandleStyle(i,a),onFocus:()=>{this.handleHandleFocus(a)},onBlur:()=>{this.handleHandleBlur(a)},onMouseenter:()=>{this.handleHandleMouseEnter(a)},onMouseleave:()=>{this.handleHandleMouseLeave(a)}},Ct(this.$slots.thumb,()=>[o.h("div",{class:`${t}-slider-handle`})]))}),this.tooltip&&o.h(qr,{ref:this.setFollowerRefs(a),show:l,to:this.adjustedTo,enabled:this.showTooltip&&!this.range||this.followerEnabledIndexSet.has(a),teleportDisabled:this.adjustedTo===lt.tdkey,placement:this.mergedPlacement,containerClass:this.namespace},{default:()=>o.h(o.Transition,{name:"fade-in-scale-up-transition",appear:this.isMounted,css:this.shouldKeepTooltipTransition(a),onEnter:()=>{this.followerEnabledIndexSet.add(a)},onAfterLeave:()=>{this.followerEnabledIndexSet.delete(a)}},{default:()=>{var s;return l?((s=this.indicatorOnRender)===null||s===void 0||s.call(this),o.h("div",{class:[`${t}-slider-handle-indicator`,this.indicatorThemeClass,`${t}-slider-handle-indicator--${this.mergedPlacement}`],style:this.indicatorCssVars},typeof r=="function"?r(i):i)):null}})})]})})),this.marks?o.h("div",{class:`${t}-slider-marks`},this.markInfos.map(i=>o.h("div",{key:i.label,class:`${t}-slider-mark`,style:i.style},i.label))):null))}}),Qx=w("switch",`
|
|
1630
1630
|
height: var(--n-height);
|
|
1631
1631
|
min-width: var(--n-width);
|
|
1632
1632
|
vertical-align: middle;
|
|
@@ -1727,7 +1727,7 @@ ${t}
|
|
|
1727
1727
|
`)]),W("disabled",[P("rail",`
|
|
1728
1728
|
cursor: not-allowed;
|
|
1729
1729
|
opacity: .5;
|
|
1730
|
-
`)])]),
|
|
1730
|
+
`)])]),ey=Object.assign(Object.assign({},Ce.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 Sr;const ty=o.defineComponent({name:"Switch",props:ey,setup(e){process.env.NODE_ENV!=="production"&&o.watchEffect(()=>{e.onChange&&ot("switch","`on-change` is deprecated, please use `on-update:value` instead.")}),Sr===void 0&&(typeof CSS<"u"?typeof CSS.supports<"u"?Sr=CSS.supports("width","max(1px)"):Sr=!1:Sr=!0);const{mergedClsPrefixRef:t,inlineThemeDisabled:n}=Ye(e),r=Ce("Switch","-switch",Qx,Bx,e,t),i=vn(e),{mergedSizeRef:a,mergedDisabledRef:l}=i,s=o.ref(e.defaultValue),c=o.toRef(e,"value"),d=St(c,s),u=o.computed(()=>d.value===e.checkedValue),f=o.ref(!1),p=o.ref(!1),b=o.computed(()=>{const{railStyle:S}=e;if(S)return S({focused:p.value,checked:u.value})});function h(S){const{"onUpdate:value":M,onChange:N,onUpdateValue:A}=e,{nTriggerFormInput:L,nTriggerFormChange:U}=i;M&&de(M,S),A&&de(A,S),N&&de(N,S),s.value=S,L(),U()}function x(){const{nTriggerFormFocus:S}=i;S()}function v(){const{nTriggerFormBlur:S}=i;S()}function g(){e.loading||l.value||(d.value!==e.checkedValue?h(e.checkedValue):h(e.uncheckedValue))}function k(){p.value=!0,x()}function z(){p.value=!1,v(),f.value=!1}function $(S){e.loading||l.value||S.key===" "&&(d.value!==e.checkedValue?h(e.checkedValue):h(e.uncheckedValue),f.value=!1)}function T(S){e.loading||l.value||S.key===" "&&(S.preventDefault(),f.value=!0)}const O=o.computed(()=>{const{value:S}=a,{self:{opacityDisabled:M,railColor:N,railColorActive:A,buttonBoxShadow:L,buttonColor:U,boxShadowFocus:J,loadingColor:j,textColor:Q,iconColor:Y,[ee("buttonHeight",S)]:ie,[ee("buttonWidth",S)]:me,[ee("buttonWidthPressed",S)]:ae,[ee("railHeight",S)]:he,[ee("railWidth",S)]:G,[ee("railBorderRadius",S)]:te,[ee("buttonBorderRadius",S)]:xe},common:{cubicBezierEaseInOut:Se}}=r.value;let oe,Te,$e;return Sr?(oe=`calc((${he} - ${ie}) / 2)`,Te=`max(${he}, ${ie})`,$e=`max(${G}, calc(${G} + ${ie} - ${he}))`):(oe=dn((at(he)-at(ie))/2),Te=dn(Math.max(at(he),at(ie))),$e=at(he)>at(ie)?G:dn(at(G)+at(ie)-at(he))),{"--n-bezier":Se,"--n-button-border-radius":xe,"--n-button-box-shadow":L,"--n-button-color":U,"--n-button-width":me,"--n-button-width-pressed":ae,"--n-button-height":ie,"--n-height":Te,"--n-offset":oe,"--n-opacity-disabled":M,"--n-rail-border-radius":te,"--n-rail-color":N,"--n-rail-color-active":A,"--n-rail-height":he,"--n-rail-width":G,"--n-width":$e,"--n-box-shadow-focus":J,"--n-loading-color":j,"--n-text-color":Q,"--n-icon-color":Y}}),m=n?rt("switch",o.computed(()=>a.value[0]),O,e):void 0;return{handleClick:g,handleBlur:z,handleFocus:k,handleKeyup:$,handleKeydown:T,mergedRailStyle:b,pressed:f,mergedClsPrefix:t,mergedValue:d,checked:u,mergedDisabled:l,cssVars:n?void 0:O,themeClass:m==null?void 0:m.themeClass,onRender:m==null?void 0:m.onRender}},render(){const{mergedClsPrefix:e,mergedDisabled:t,checked:n,mergedRailStyle:r,onRender:i,$slots:a}=this;i==null||i();const{checked:l,unchecked:s,icon:c,"checked-icon":d,"unchecked-icon":u}=a,f=!(Dn(c)&&Dn(d)&&Dn(u));return o.h("div",{role:"switch","aria-checked":n,class:[`${e}-switch`,this.themeClass,f&&`${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},o.h("div",{class:`${e}-switch__rail`,"aria-hidden":"true",style:r},Fe(l,p=>Fe(s,b=>p||b?o.h("div",{"aria-hidden":!0,class:`${e}-switch__children-placeholder`},o.h("div",{class:`${e}-switch__rail-placeholder`},o.h("div",{class:`${e}-switch__button-placeholder`}),p),o.h("div",{class:`${e}-switch__rail-placeholder`},o.h("div",{class:`${e}-switch__button-placeholder`}),b)):null)),o.h("div",{class:`${e}-switch__button`},Fe(c,p=>Fe(d,b=>Fe(u,h=>o.h(fo,null,{default:()=>this.loading?o.h(ho,{key:"loading",clsPrefix:e,strokeWidth:20}):this.checked&&(b||p)?o.h("div",{class:`${e}-switch__button-icon`,key:b?"checked-icon":"icon"},b||p):!this.checked&&(h||p)?o.h("div",{class:`${e}-switch__button-icon`,key:h?"unchecked-icon":"icon"},h||p):null})))),Fe(l,p=>p&&o.h("div",{key:"checked",class:`${e}-switch__checked`},p)),Fe(s,p=>p&&o.h("div",{key:"unchecked",class:`${e}-switch__unchecked`},p)))))}}),Qi="n-tabs",vc={tab:[String,Number,Object,Function],name:{type:[String,Number],required:!0},disabled:Boolean,displayDirective:{type:String,default:"if"},closable:{type:Boolean,default:void 0},tabProps:Object,label:[String,Number,Object,Function]},xc=o.defineComponent({__TAB_PANE__:!0,name:"TabPane",alias:["TabPanel"],props:vc,setup(e){process.env.NODE_ENV!=="production"&&o.watchEffect(()=>{e.label!==void 0&&ot("tab-pane","`label` is deprecated, please use `tab` instead.")});const t=o.inject(Qi,null);return t||qo("tab-pane","`n-tab-pane` must be placed inside `n-tabs`."),{style:t.paneStyleRef,class:t.paneClassRef,mergedClsPrefix:t.mergedClsPrefixRef}},render(){return o.h("div",{class:[`${this.mergedClsPrefix}-tab-pane`,this.class],style:this.style},this.$slots)}}),ny=Object.assign({internalLeftPadded:Boolean,internalAddable:Boolean,internalCreatedByPane:Boolean},Od(vc,["displayDirective"])),ea=o.defineComponent({__TAB__:!0,inheritAttrs:!1,name:"Tab",props:ny,setup(e){const{mergedClsPrefixRef:t,valueRef:n,typeRef:r,closableRef:i,tabStyleRef:a,addTabStyleRef:l,tabClassRef:s,addTabClassRef:c,tabChangeIdRef:d,onBeforeLeaveRef:u,triggerRef:f,handleAdd:p,activateTab:b,handleClose:h}=o.inject(Qi);return{trigger:f,mergedClosable:o.computed(()=>{if(e.internalAddable)return!1;const{closable:x}=e;return x===void 0?i.value:x}),style:a,addStyle:l,tabClass:s,addTabClass:c,clsPrefix:t,value:n,type:r,handleClose(x){x.stopPropagation(),!e.disabled&&h(e.name)},activateTab(){if(e.disabled)return;if(e.internalAddable){p();return}const{name:x}=e,v=++d.id;if(x!==n.value){const{value:g}=u;g?Promise.resolve(g(e.name,n.value)).then(k=>{k&&d.id===v&&b(x)}):b(x)}}}},render(){const{internalAddable:e,clsPrefix:t,name:n,disabled:r,label:i,tab:a,value:l,mergedClosable:s,trigger:c,$slots:{default:d}}=this,u=i??a;return o.h("div",{class:`${t}-tabs-tab-wrapper`},this.internalLeftPadded?o.h("div",{class:`${t}-tabs-tab-pad`}):null,o.h("div",Object.assign({key:n,"data-name":n,"data-disabled":r?!0:void 0},o.mergeProps({class:[`${t}-tabs-tab`,l===n&&`${t}-tabs-tab--active`,r&&`${t}-tabs-tab--disabled`,s&&`${t}-tabs-tab--closable`,e&&`${t}-tabs-tab--addable`,e?this.addTabClass:this.tabClass],onClick:c==="click"?this.activateTab:void 0,onMouseenter:c==="hover"?this.activateTab:void 0,style:e?this.addStyle:this.style},this.internalCreatedByPane?this.tabProps||{}:this.$attrs)),o.h("span",{class:`${t}-tabs-tab__label`},e?o.h(o.Fragment,null,o.h("div",{class:`${t}-tabs-tab__height-placeholder`}," "),o.h(yt,{clsPrefix:t},{default:()=>o.h(As,null)})):d?d():typeof u=="object"?u:bn(u??n)),s&&this.type==="card"?o.h(Ai,{clsPrefix:t,class:`${t}-tabs-tab__close`,onClick:this.handleClose,disabled:r}):null))}}),ry=w("tabs",`
|
|
1731
1731
|
box-sizing: border-box;
|
|
1732
1732
|
width: 100%;
|
|
1733
1733
|
display: flex;
|
|
@@ -2065,9 +2065,9 @@ ${t}
|
|
|
2065
2065
|
border-top: 1px solid var(--n-tab-border-color);
|
|
2066
2066
|
`),w("tabs-pad",`
|
|
2067
2067
|
border-top: 1px solid var(--n-tab-border-color);
|
|
2068
|
-
`)])])])]),ry=Object.assign(Object.assign({},Ce.props),{value:[String,Number],defaultValue:[String,Number],trigger:{type:String,default:"click"},type:{type:String,default:"bar"},closable:Boolean,justifyContent:String,size:{type:String,default:"medium"},placement:{type:String,default:"top"},tabStyle:[String,Object],tabClass:String,addTabStyle:[String,Object],addTabClass:String,barWidth:Number,paneClass:String,paneStyle:[String,Object],paneWrapperClass:String,paneWrapperStyle:[String,Object],addable:[Boolean,Object],tabsPadding:{type:Number,default:0},animated:Boolean,onBeforeLeave:Function,onAdd:Function,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],onClose:[Function,Array],labelSize:String,activeName:[String,Number],onActiveNameChange:[Function,Array]}),oy=o.defineComponent({name:"Tabs",props:ry,setup(e,{slots:t}){var n,r,i,a;process.env.NODE_ENV!=="production"&&o.watchEffect(()=>{e.labelSize!==void 0&&ot("tabs","`label-size` is deprecated, please use `size` instead."),e.activeName!==void 0&&ot("tabs","`active-name` is deprecated, please use `value` instead."),e.onActiveNameChange!==void 0&&ot("tabs","`on-active-name-change` is deprecated, please use `on-update:value` instead.")});const{mergedClsPrefixRef:l,inlineThemeDisabled:s}=Ye(e),c=Ce("Tabs","-tabs",ny,Mx,e,l),d=o.ref(null),u=o.ref(null),f=o.ref(null),p=o.ref(null),b=o.ref(null),h=o.ref(null),x=o.ref(!0),v=o.ref(!0),g=Vr(e,["labelSize","size"]),k=Vr(e,["activeName","value"]),z=o.ref((r=(n=k.value)!==null&&n!==void 0?n:e.defaultValue)!==null&&r!==void 0?r:t.default?(a=(i=Fn(t.default())[0])===null||i===void 0?void 0:i.props)===null||a===void 0?void 0:a.name:null),$=St(k,z),T={id:0},O=o.computed(()=>{if(!(!e.justifyContent||e.type==="card"))return{display:"flex",justifyContent:e.justifyContent}});o.watch($,()=>{T.id=0,A(),L()});function m(){var _;const{value:D}=$;return D===null?null:(_=d.value)===null||_===void 0?void 0:_.querySelector(`[data-name="${D}"]`)}function S(_){if(e.type==="card")return;const{value:D}=u;if(!D)return;const K=D.style.opacity==="0";if(_){const R=`${l.value}-tabs-bar--disabled`,{barWidth:C,placement:B}=e;if(_.dataset.disabled==="true"?D.classList.add(R):D.classList.remove(R),["top","bottom"].includes(B)){if(N(["top","maxHeight","height"]),typeof C=="number"&&_.offsetWidth>=C){const re=Math.floor((_.offsetWidth-C)/2)+_.offsetLeft;D.style.left=`${re}px`,D.style.maxWidth=`${C}px`}else D.style.left=`${_.offsetLeft}px`,D.style.maxWidth=`${_.offsetWidth}px`;D.style.width="8192px",K&&(D.style.transition="none"),D.offsetWidth,K&&(D.style.transition="",D.style.opacity="1")}else{if(N(["left","maxWidth","width"]),typeof C=="number"&&_.offsetHeight>=C){const re=Math.floor((_.offsetHeight-C)/2)+_.offsetTop;D.style.top=`${re}px`,D.style.maxHeight=`${C}px`}else D.style.top=`${_.offsetTop}px`,D.style.maxHeight=`${_.offsetHeight}px`;D.style.height="8192px",K&&(D.style.transition="none"),D.offsetHeight,K&&(D.style.transition="",D.style.opacity="1")}}}function M(){if(e.type==="card")return;const{value:_}=u;_&&(_.style.opacity="0")}function N(_){const{value:D}=u;if(D)for(const K of _)D.style[K]=""}function A(){if(e.type==="card")return;const _=m();_?S(_):M()}function L(){var _;const D=(_=b.value)===null||_===void 0?void 0:_.$el;if(!D)return;const K=m();if(!K)return;const{scrollLeft:R,offsetWidth:C}=D,{offsetLeft:B,offsetWidth:re}=K;R>B?D.scrollTo({top:0,left:B,behavior:"smooth"}):B+re>R+C&&D.scrollTo({top:0,left:B+re-C,behavior:"smooth"})}const U=o.ref(null);let J=0,j=null;function Q(_){const D=U.value;if(D){J=_.getBoundingClientRect().height;const K=`${J}px`,R=()=>{D.style.height=K,D.style.maxHeight=K};j?(R(),j(),j=null):j=R}}function Y(_){const D=U.value;if(D){const K=_.getBoundingClientRect().height,R=()=>{document.body.offsetHeight,D.style.maxHeight=`${K}px`,D.style.height=`${Math.max(J,K)}px`};j?(j(),j=null,R()):j=R}}function ie(){const _=U.value;if(_){_.style.maxHeight="",_.style.height="";const{paneWrapperStyle:D}=e;if(typeof D=="string")_.style.cssText=D;else if(D){const{maxHeight:K,height:R}=D;K!==void 0&&(_.style.maxHeight=K),R!==void 0&&(_.style.height=R)}}}const me={value:[]},ae=o.ref("next");function he(_){const D=$.value;let K="next";for(const R of me.value){if(R===D)break;if(R===_){K="prev";break}}ae.value=K,G(_)}function G(_){const{onActiveNameChange:D,onUpdateValue:K,"onUpdate:value":R}=e;D&&de(D,_),K&&de(K,_),R&&de(R,_),z.value=_}function te(_){const{onClose:D}=e;D&&de(D,_)}function xe(){const{value:_}=u;if(!_)return;const D="transition-disabled";_.classList.add(D),A(),_.classList.remove(D)}const Se=o.ref(null);function oe({transitionDisabled:_}){const D=d.value;if(!D)return;_&&D.classList.add("transition-disabled");const K=m();K&&Se.value&&(Se.value.style.width=`${K.offsetWidth}px`,Se.value.style.height=`${K.offsetHeight}px`,Se.value.style.transform=`translateX(${K.offsetLeft-at(getComputedStyle(D).paddingLeft)}px)`,_&&Se.value.offsetWidth),_&&D.classList.remove("transition-disabled")}o.watch([$],()=>{e.type==="segment"&&o.nextTick(()=>{oe({transitionDisabled:!1})})}),o.onMounted(()=>{e.type==="segment"&&oe({transitionDisabled:!0})});let Te=0;function $e(_){var D;if(_.contentRect.width===0&&_.contentRect.height===0||Te===_.contentRect.width)return;Te=_.contentRect.width;const{type:K}=e;if((K==="line"||K==="bar")&&xe(),K!=="segment"){const{placement:R}=e;Le((R==="top"||R==="bottom"?(D=b.value)===null||D===void 0?void 0:D.$el:h.value)||null)}}const se=Mi($e,64);o.watch([()=>e.justifyContent,()=>e.size],()=>{o.nextTick(()=>{const{type:_}=e;(_==="line"||_==="bar")&&xe()})});const Ae=o.ref(!1);function Be(_){var D;const{target:K,contentRect:{width:R}}=_,C=K.parentElement.offsetWidth;if(!Ae.value)C<R&&(Ae.value=!0);else{const{value:B}=p;if(!B)return;C-R>B.$el.offsetWidth&&(Ae.value=!1)}Le(((D=b.value)===null||D===void 0?void 0:D.$el)||null)}const We=Mi(Be,64);function Ie(){const{onAdd:_}=e;_&&_(),o.nextTick(()=>{const D=m(),{value:K}=b;!D||!K||K.scrollTo({left:D.offsetLeft,top:0,behavior:"smooth"})})}function Le(_){if(!_)return;const{placement:D}=e;if(D==="top"||D==="bottom"){const{scrollLeft:K,scrollWidth:R,offsetWidth:C}=_;x.value=K<=0,v.value=K+C>=R}else{const{scrollTop:K,scrollHeight:R,offsetHeight:C}=_;x.value=K<=0,v.value=K+C>=R}}const Ke=Mi(_=>{Le(_.target)},64);o.provide(Qi,{triggerRef:o.toRef(e,"trigger"),tabStyleRef:o.toRef(e,"tabStyle"),tabClassRef:o.toRef(e,"tabClass"),addTabStyleRef:o.toRef(e,"addTabStyle"),addTabClassRef:o.toRef(e,"addTabClass"),paneClassRef:o.toRef(e,"paneClass"),paneStyleRef:o.toRef(e,"paneStyle"),mergedClsPrefixRef:l,typeRef:o.toRef(e,"type"),closableRef:o.toRef(e,"closable"),valueRef:$,tabChangeIdRef:T,onBeforeLeaveRef:o.toRef(e,"onBeforeLeave"),activateTab:he,handleClose:te,handleAdd:Ie}),Ga(()=>{A(),L()}),o.watchEffect(()=>{const{value:_}=f;if(!_)return;const{value:D}=l,K=`${D}-tabs-nav-scroll-wrapper--shadow-start`,R=`${D}-tabs-nav-scroll-wrapper--shadow-end`;x.value?_.classList.remove(K):_.classList.add(K),v.value?_.classList.remove(R):_.classList.add(R)});const Re={syncBarPosition:()=>{A()}},X=()=>{oe({transitionDisabled:!0})},F=o.computed(()=>{const{value:_}=g,{type:D}=e,K={card:"Card",bar:"Bar",line:"Line",segment:"Segment"}[D],R=`${_}${K}`,{self:{barColor:C,closeIconColor:B,closeIconColorHover:re,closeIconColorPressed:we,tabColor:Pe,tabBorderColor:Ue,paneTextColor:De,tabFontWeight:Me,tabBorderRadius:Ze,tabFontWeightActive:ft,colorSegment:tt,fontWeightStrong:st,tabColorSegment:y,closeSize:H,closeIconSize:Z,closeColorHover:le,closeColorPressed:ce,closeBorderRadius:ue,[ee("panePadding",_)]:fe,[ee("tabPadding",R)]:ge,[ee("tabPaddingVertical",R)]:Ee,[ee("tabGap",R)]:mt,[ee("tabGap",`${R}Vertical`)]:on,[ee("tabTextColor",D)]:_n,[ee("tabTextColorActive",D)]:an,[ee("tabTextColorHover",D)]:ln,[ee("tabTextColorDisabled",D)]:Pr,[ee("tabFontSize",_)]:Er},common:{cubicBezierEaseInOut:Zn}}=c.value;return{"--n-bezier":Zn,"--n-color-segment":tt,"--n-bar-color":C,"--n-tab-font-size":Er,"--n-tab-text-color":_n,"--n-tab-text-color-active":an,"--n-tab-text-color-disabled":Pr,"--n-tab-text-color-hover":ln,"--n-pane-text-color":De,"--n-tab-border-color":Ue,"--n-tab-border-radius":Ze,"--n-close-size":H,"--n-close-icon-size":Z,"--n-close-color-hover":le,"--n-close-color-pressed":ce,"--n-close-border-radius":ue,"--n-close-icon-color":B,"--n-close-icon-color-hover":re,"--n-close-icon-color-pressed":we,"--n-tab-color":Pe,"--n-tab-font-weight":Me,"--n-tab-font-weight-active":ft,"--n-tab-padding":ge,"--n-tab-padding-vertical":Ee,"--n-tab-gap":mt,"--n-tab-gap-vertical":on,"--n-pane-padding-left":ht(fe,"left"),"--n-pane-padding-right":ht(fe,"right"),"--n-pane-padding-top":ht(fe,"top"),"--n-pane-padding-bottom":ht(fe,"bottom"),"--n-font-weight-strong":st,"--n-tab-color-segment":y}}),ne=s?rt("tabs",o.computed(()=>`${g.value[0]}${e.type[0]}`),F,e):void 0;return Object.assign({mergedClsPrefix:l,mergedValue:$,renderedNames:new Set,segmentCapsuleElRef:Se,tabsPaneWrapperRef:U,tabsElRef:d,barElRef:u,addTabInstRef:p,xScrollInstRef:b,scrollWrapperElRef:f,addTabFixed:Ae,tabWrapperStyle:O,handleNavResize:se,mergedSize:g,handleScroll:Ke,handleTabsResize:We,cssVars:s?void 0:F,themeClass:ne==null?void 0:ne.themeClass,animationDirection:ae,renderNameListRef:me,yScrollElRef:h,handleSegmentResize:X,onAnimationBeforeLeave:Q,onAnimationEnter:Y,onAnimationAfterEnter:ie,onRender:ne==null?void 0:ne.onRender},Re)},render(){const{mergedClsPrefix:e,type:t,placement:n,addTabFixed:r,addable:i,mergedSize:a,renderNameListRef:l,onRender:s,paneWrapperClass:c,paneWrapperStyle:d,$slots:{default:u,prefix:f,suffix:p}}=this;s==null||s();const b=u?Fn(u()).filter(T=>T.type.__TAB_PANE__===!0):[],h=u?Fn(u()).filter(T=>T.type.__TAB__===!0):[],x=!h.length,v=t==="card",g=t==="segment",k=!v&&!g&&this.justifyContent;l.value=[];const z=()=>{const T=o.h("div",{style:this.tabWrapperStyle,class:[`${e}-tabs-wrapper`]},k?null:o.h("div",{class:`${e}-tabs-scroll-padding`,style:{width:`${this.tabsPadding}px`}}),x?b.map((O,m)=>(l.value.push(O.props.name),ta(o.h(ea,Object.assign({},O.props,{internalCreatedByPane:!0,internalLeftPadded:m!==0&&(!k||k==="center"||k==="start"||k==="end")}),O.children?{default:O.children.tab}:void 0)))):h.map((O,m)=>(l.value.push(O.props.name),ta(m!==0&&!k?wc(O):O))),!r&&i&&v?yc(i,(x?b.length:h.length)!==0):null,k?null:o.h("div",{class:`${e}-tabs-scroll-padding`,style:{width:`${this.tabsPadding}px`}}));return o.h("div",{ref:"tabsElRef",class:`${e}-tabs-nav-scroll-content`},v&&i?o.h(Zt,{onResize:this.handleTabsResize},{default:()=>T}):T,v?o.h("div",{class:`${e}-tabs-pad`}):null,v?null:o.h("div",{ref:"barElRef",class:`${e}-tabs-bar`}))},$=g?"top":n;return o.h("div",{class:[`${e}-tabs`,this.themeClass,`${e}-tabs--${t}-type`,`${e}-tabs--${a}-size`,k&&`${e}-tabs--flex`,`${e}-tabs--${$}`],style:this.cssVars},o.h("div",{class:[`${e}-tabs-nav--${t}-type`,`${e}-tabs-nav--${$}`,`${e}-tabs-nav`]},Fe(f,T=>T&&o.h("div",{class:`${e}-tabs-nav__prefix`},T)),g?o.h(Zt,{onResize:this.handleSegmentResize},{default:()=>o.h("div",{class:`${e}-tabs-rail`,ref:"tabsElRef"},o.h("div",{class:`${e}-tabs-capsule`,ref:"segmentCapsuleElRef"},o.h("div",{class:`${e}-tabs-wrapper`},o.h("div",{class:`${e}-tabs-tab`}))),x?b.map((T,O)=>(l.value.push(T.props.name),o.h(ea,Object.assign({},T.props,{internalCreatedByPane:!0,internalLeftPadded:O!==0}),T.children?{default:T.children.tab}:void 0))):h.map((T,O)=>(l.value.push(T.props.name),O===0?T:wc(T))))}):o.h(Zt,{onResize:this.handleNavResize},{default:()=>o.h("div",{class:`${e}-tabs-nav-scroll-wrapper`,ref:"scrollWrapperElRef"},["top","bottom"].includes($)?o.h(sf,{ref:"xScrollInstRef",onScroll:this.handleScroll},{default:z}):o.h("div",{class:`${e}-tabs-nav-y-scroll`,onScroll:this.handleScroll,ref:"yScrollElRef"},z()))}),r&&i&&v?yc(i,!0):null,Fe(p,T=>T&&o.h("div",{class:`${e}-tabs-nav__suffix`},T))),x&&(this.animated&&($==="top"||$==="bottom")?o.h("div",{ref:"tabsPaneWrapperRef",style:d,class:[`${e}-tabs-pane-wrapper`,c]},xc(b,this.mergedValue,this.renderedNames,this.onAnimationBeforeLeave,this.onAnimationEnter,this.onAnimationAfterEnter,this.animationDirection)):xc(b,this.mergedValue,this.renderedNames)))}});function xc(e,t,n,r,i,a,l){const s=[];return e.forEach(c=>{const{name:d,displayDirective:u,"display-directive":f}=c.props,p=h=>u===h||f===h,b=t===d;if(c.key!==void 0&&(c.key=d),b||p("show")||p("show:lazy")&&n.has(d)){n.has(d)||n.add(d);const h=!p("if");s.push(h?o.withDirectives(c,[[o.vShow,b]]):c)}}),l?o.h(o.TransitionGroup,{name:`${l}-transition`,onBeforeLeave:r,onEnter:i,onAfterEnter:a},{default:()=>s}):s}function yc(e,t){return o.h(ea,{ref:"addTabInstRef",key:"__addable",name:"__addable",internalCreatedByPane:!0,internalAddable:!0,internalLeftPadded:t,disabled:typeof e=="object"&&e.disabled})}function wc(e){const t=o.cloneVNode(e);return t.props?t.props.internalLeftPadded=!0:t.props={internalLeftPadded:!0},t}function ta(e){return Array.isArray(e.dynamicProps)?e.dynamicProps.includes("internalLeftPadded")||e.dynamicProps.push("internalLeftPadded"):e.dynamicProps=["internalLeftPadded"],e}async function iy(e,t,n){try{const{data:r}=await cn().POST("/api/visualizations",{type:e,title:t,config:n});return r.id}catch(r){Br(r)}}async function ay(e,t,n){try{return(await cn().PUT(`/api/visualizations/${e}`,{title:t,config:n})).data}catch(r){Br(r)}}function Cc(e){let t={};return e&&e.forEach(n=>{n.name?t[n.name]=n.value||null:console.debug("Warning: Detected input element with no name.")}),t}const ly={key:0,class:"border border-dotted border-green-600 rounded mt-2 p-2"},sy={__name:"InputConditional",props:o.mergeModels({datasetId:{type:String,required:!0},input:{type:Object,required:!0}},{value:{},valueModifiers:{}}),emits:["update:value"],setup(e){const t=e,n=t.input.test_param.name;n||console.error(`Test parameter has no name: ${t.input.name}.`);const r=o.useModel(e,"value");(!r.value||!(n in r.value))&&console.error(`Test parameter of conditional not available: ${t.input.name}.`,r.value);const i=o.ref(r.value[n]),a={},l={};for(const c of t.input.cases)a[c.value]=c.inputs,l[c.value]=Cc(c.inputs),l[c.value][n]=c.value;function s(c){r.value={...l[i.value]},c&&(r.value={...r.value,...c})}return o.watch(()=>i.value,()=>{s()}),(c,d)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createVNode(o.unref(yo),{value:i.value,"onUpdate:value":d[0]||(d[0]=u=>i.value=u),options:e.input.test_param.data},null,8,["value","options"]),a[i.value]?(o.openBlock(),o.createElementBlock("div",ly,[o.createVNode(na,{"dataset-id":e.datasetId,inputs:a[i.value],values:r.value,"onUpdate:values":s},null,8,["dataset-id","inputs","values"])])):o.createCommentVNode("",!0)],64))}},cy={key:0,class:"mb-1"},dy={key:1,class:"text-red-600 mb-1"},uy=o.createElementVNode("span",null,"Please select a dataset.",-1),fy=100,hy={__name:"InputData",props:o.mergeModels({extension:{type:String,default:""},optional:{type:Boolean,default:!1}},{value:{},valueModifiers:{}}),emits:["update:value"],setup(e){const t=e,n=o.ref([]),r=o.useModel(e,"value"),i=o.ref(!1),a=o.ref(null);async function l(c){i.value=!0;try{const d=t.extension?`q=extension-eq&qv=${t.extension}`:"",u=c?`q=name-contains&qv=${c}`:"",{data:f}=await cn().GET(`/api/datasets?limit=${fy}&${d}&${u}`),p=f.map(b=>({label:b.name,value:b}));p.push({label:"...filter for more",value:null,disabled:!0}),t.optional&&p.unshift({label:"-- Clear Selection --",value:null}),n.value=p,i.value=!1}catch(d){console.log(d)}}function s(){r.value=a.value,a.value=null}return l(),(c,d)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[r.value?(o.openBlock(),o.createElementBlock("div",cy,[o.createVNode(o.unref(Tt),{class:"size-3 mr-1"},{default:o.withCtx(()=>[o.createVNode(o.unref(Ra))]),_:1}),o.createElementVNode("span",null,"Selected: "+o.toDisplayString(r.value.name),1)])):e.optional?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",dy,[o.createVNode(o.unref(Tt),{class:"size-3 mr-1"},{default:o.withCtx(()=>[o.createVNode(o.unref(Pa))]),_:1}),uy])),o.createVNode(o.unref(yo),{value:a.value,"onUpdate:value":[d[0]||(d[0]=u=>a.value=u),s],filterable:"",placeholder:"Select a Dataset",loading:i.value,options:n.value,onSearch:l},null,8,["value","loading","options"])],64))}};function py(e,t,n,r){const i=[];t&&i.push({label:"Column: Default",value:"auto"});var a=e.metadata_column_types;for(const l in a)(r&&["int","float"].indexOf(a[l])!=-1||n&&a[l]==="str"||!r&&!n)&&i.push({label:"Column: "+(parseInt(l)+1),value:l});return i}const by={__name:"InputDataColumn",props:o.mergeModels({datasetId:{type:String,default:""},isAuto:{type:Boolean,default:!1},isText:{type:Boolean,default:!1},isNumber:{type:Boolean,default:!1}},{value:{},valueModifiers:{}}),emits:["update:value"],setup(e){const t=e,n=o.ref([]),r=o.useModel(e,"value");async function i(){if(t.datasetId)try{const{data:l}=await cn().GET(`/api/datasets/${t.datasetId}`),s=py(l,t.isAuto,t.isText,t.isNumber);n.value=s,a()}catch(l){console.log(l)}else console.log("Data column input disabled, since `datasetId` is unavailable.")}function a(){n.value.length>0&&r.value===null&&(r.value=n.value[0].value)}return i(),o.watch(()=>r.value,()=>a()),(l,s)=>(o.openBlock(),o.createBlock(o.unref(yo),{value:r.value,"onUpdate:value":s[0]||(s[0]=c=>r.value=c),options:n.value},null,8,["value","options"]))}};function wo(e){return String(e).toLowerCase()==="true"}const my={class:"overflow-auto select-none"},gy={class:"font-bold pb-1"},vy={key:0,class:"text-xs pb-1"},xy={key:5},Sc=.01,na={__name:"InputForm",props:{datasetId:{type:String,default:""},inputs:{type:Array,default:()=>[]},values:{type:Object,default:()=>{}}},emits:["update:values"],setup(e,{emit:t}){const n=e,r=o.ref(a()),i=t;function a(){const s={...n.values};return n.inputs.forEach(c=>{s[c.name]===void 0&&(s[c.name]=null)}),s}function l(){i("update:values",r.value)}return o.watch(()=>n.values,()=>{r.value=a()}),(s,c)=>(o.openBlock(),o.createElementBlock("div",my,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.inputs,(d,u)=>(o.openBlock(),o.createElementBlock("div",{key:u,class:"pb-2"},[o.createElementVNode("div",gy,o.toDisplayString(d.label||d.name),1),d.help?(o.openBlock(),o.createElementBlock("div",vy,o.toDisplayString(d.help),1)):o.createCommentVNode("",!0),o.createElementVNode("div",null,[d.type==="boolean"?(o.openBlock(),o.createBlock(o.unref(ey),{key:0,value:r.value[d.name],"onUpdate:value":[f=>r.value[d.name]=f,c[0]||(c[0]=f=>l())]},null,8,["value","onUpdate:value"])):d.type==="color"?(o.openBlock(),o.createBlock(o.unref(dx),{key:1,value:r.value[d.name],"onUpdate:value":[f=>r.value[d.name]=f,c[1]||(c[1]=f=>l())],modes:["hex"],"show-alpha":!1},null,8,["value","onUpdate:value"])):d.type==="conditional"?(o.openBlock(),o.createBlock(sy,{key:2,value:r.value[d.name],"onUpdate:value":[f=>r.value[d.name]=f,c[2]||(c[2]=f=>l())],"dataset-id":e.datasetId,input:d},null,8,["value","onUpdate:value","dataset-id","input"])):d.type==="data"?(o.openBlock(),o.createBlock(hy,{key:3,value:r.value[d.name],"onUpdate:value":[f=>r.value[d.name]=f,c[3]||(c[3]=f=>l())],extension:d.extension,optional:o.unref(wo)(d.optional)},null,8,["value","onUpdate:value","extension","optional"])):d.type==="data_column"?(o.openBlock(),o.createBlock(by,{key:4,value:r.value[d.name],"onUpdate:value":[f=>r.value[d.name]=f,c[4]||(c[4]=f=>l())],"dataset-id":e.datasetId,"is-auto":o.unref(wo)(d.is_auto),"is-text":o.unref(wo)(d.is_text),"is-number":o.unref(wo)(d.is_number)},null,8,["value","onUpdate:value","dataset-id","is-auto","is-text","is-number"])):d.type==="float"?(o.openBlock(),o.createElementBlock("div",xy,[d.min!==void 0&&d.max!==void 0?(o.openBlock(),o.createBlock(o.unref(Zx),{key:0,class:"mb-2",value:r.value[d.name],"onUpdate:value":[f=>r.value[d.name]=f,c[5]||(c[5]=f=>l())],min:Number(d.min),max:Number(d.max),step:Sc},null,8,["value","onUpdate:value","min","max"])):o.createCommentVNode("",!0),o.createVNode(o.unref(qx),{value:r.value[d.name],"onUpdate:value":[f=>r.value[d.name]=f,c[6]||(c[6]=f=>l())],size:"small",min:Number(d.min),max:Number(d.max),step:Sc},null,8,["value","onUpdate:value","min","max"])])):d.type==="select"?(o.openBlock(),o.createBlock(o.unref(yo),{key:6,value:r.value[d.name],"onUpdate:value":[f=>r.value[d.name]=f,c[7]||(c[7]=f=>l())],options:d.data},null,8,["value","onUpdate:value","options"])):d.type==="textarea"?(o.openBlock(),o.createBlock(o.unref(yr),{key:7,value:r.value[d.name],"onUpdate:value":[f=>r.value[d.name]=f,c[8]||(c[8]=f=>l())],rows:Number(d.rows),type:"textarea"},null,8,["value","onUpdate:value","rows"])):(o.openBlock(),o.createBlock(o.unref(yr),{key:8,value:r.value[d.name],"onUpdate:value":[f=>r.value[d.name]=f,c[9]||(c[9]=f=>l())]},null,8,["value","onUpdate:value"]))])]))),128))]))}},yy=o.createElementVNode("span",{class:"mx-1"},"Add New Track",-1),wy={class:"border border-dotted border-green-600 rounded p-2"},Cy={class:"flex text-green-600 my-1"},Sy={class:"mx-1"},$y={__name:"InputRepeats",props:{datasetId:{type:String,default:""},inputs:{type:Array,required:!0},valuesArray:{type:Array,required:!0}},emits:["update:values-array"],setup(e,{emit:t}){const n=e,r=t,i=o.computed(()=>Cc(n.inputs));function a(){const c=[...n.valuesArray];c.unshift(i.value),r("update:values-array",c)}function l(c){const d=[...n.valuesArray];d.splice(c,1),r("update:values-array",d)}function s(c,d){const u=[...n.valuesArray];u[c]={...d},r("update:values-array",u)}return(c,d)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createVNode(o.unref(Ht),{size:"tiny",type:"primary",class:"mb-2",onClick:a},{default:o.withCtx(()=>[o.createVNode(o.unref(Tt),null,{default:o.withCtx(()=>[o.createVNode(o.unref(xd))]),_:1}),yy]),_:1}),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.valuesArray,(u,f)=>(o.openBlock(),o.createElementBlock("div",{key:f,class:"my-2"},[o.createElementVNode("div",wy,[o.createVNode(na,{"dataset-id":e.datasetId,inputs:e.inputs,values:u,"onUpdate:values":p=>s(f,p)},null,8,["dataset-id","inputs","values","onUpdate:values"]),o.createElementVNode("div",Cy,[o.createVNode(o.unref(Ht),{class:"text-green-600 w-full",size:"tiny",round:"",disabled:e.valuesArray.length<=1,onClick:p=>l(f)},{default:o.withCtx(()=>[o.createVNode(o.unref(Tt),null,{default:o.withCtx(()=>[o.createVNode(o.unref(wd))]),_:1}),o.createElementVNode("span",Sy,"Remove Track "+o.toDisplayString(e.valuesArray.length-f),1)]),_:2},1032,["disabled","onClick"])])])]))),128))],64))}},Ty=2e3,ky=o.defineComponent({__name:"AlertNotify",props:{message:{},messageType:{default:"info"}},emits:["timeout"],setup(e,{emit:t}){const n=e,r=t;let i=null;return o.watch(()=>n.message,()=>{i&&clearTimeout(i),i=setTimeout(()=>r("timeout"),Ty)}),(a,l)=>a.message?(o.openBlock(),o.createBlock(o.unref(nc),{key:0,type:a.messageType,class:"m-4"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(a.message),1)]),_:1},8,["type"])):o.createCommentVNode("",!0)}}),Ry={class:"text-xs"},Py=o.createElementVNode("span",{class:"text-xs"},"Galaxy is not accessible, review `server.config.js`.",-1),Ey={__name:"ApiStatus",props:{},setup(e){const t=o.ref("...");async function n(){try{const{data:r}=await cn().GET("/api/version");t.value=r.version_major}catch{console.log("Unable to connect to Galaxy. Verify Galaxy is running and properly configured in 'server.config.js'."),t.value=""}}return n(),(r,i)=>t.value?(o.openBlock(),o.createBlock(o.unref(dc),{key:0,class:"mx-1",trigger:"hover"},{trigger:o.withCtx(()=>[o.createVNode(o.unref(Tt),{class:"mx-1"},{default:o.withCtx(()=>[o.createVNode(o.unref(Ra),{class:"text-green-600"})]),_:1})]),default:o.withCtx(()=>[o.createElementVNode("span",Ry,"Connected to Galaxy Version "+o.toDisplayString(t.value)+".",1)]),_:1})):(o.openBlock(),o.createBlock(o.unref(dc),{key:1,class:"mx-1",trigger:"hover"},{trigger:o.withCtx(()=>[o.createVNode(o.unref(Tt),{class:"mx-1"},{default:o.withCtx(()=>[o.createVNode(o.unref(Pa),{class:"text-red-600"})]),_:1})]),default:o.withCtx(()=>[Py]),_:1}))}},zy={class:"overflow-auto select-none bg-white z-10"},By={class:"flex p-2"},_y={class:"flex-1 font-thin text-lg p-1 p-2"},My=o.createElementVNode("span",null,"Charts",-1),Oy={class:"m-4 mt-0 p-2 bg-sky-50 text-sky-900 rounded"},Ay={class:"md:flex"},Iy={class:"flex justify-center center-items"},Fy={class:"m-2"},Dy=["src"],Ny={key:1,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 100 100",class:"size-14"},Ly=[o.createElementVNode("circle",{cx:"50",cy:"50",r:"45",stroke:"#E30A17","stroke-width":"5",fill:"#FFFFFF"},null,-1),o.createElementVNode("path",{d:"M 50,5 A 45,45 0 0,1 95,50 L 50,50 Z",fill:"#E30A17"},null,-1)],Hy={class:"overflow-hidden break-words p-1"},Vy={class:"font-bold"},jy=["innerHTML"],Wy={class:"px-4 pb-2"},Uy=o.createElementVNode("div",{class:"font-bold"},"Title",-1),Gy=o.createElementVNode("div",{class:"text-xs py-1"},"Specify a visualization title.",-1),qy=o.createElementVNode("span",{class:"mx-1"},"Tracks",-1),Ky=o.createElementVNode("span",{class:"mx-1"},"Settings",-1),Xy={__name:"SidePanel",props:{datasetId:{type:String,default:""},description:{type:String,default:"This visualization has no description."},logoUrl:{type:String,default:""},html:{type:String,default:"Visualization Title"},name:{type:String,required:!0},settingInputs:{type:Array,default:()=>[]},settingValues:{type:Object,default:()=>{}},trackInputs:{type:Array,default:()=>[]},trackValues:{type:Object,default:()=>[]},visualizationId:{type:String,default:null},visualizationTitle:{type:String,required:!0}},emits:["update:tracks","update:settings","toggle"],setup(e,{emit:t}){const n=e,r=o.ref(n.visualizationTitle),i=o.ref(n.visualizationId),a=o.ref(""),l=o.ref(""),s=o.computed(()=>n.settingInputs.length===0||n.trackInputs.length===0),c=t;async function d(){try{i.value?(await ay(i.value,r.value,{dataset_id:n.datasetId,settings:n.values}),a.value="Successfully saved.",l.value="success"):(i.value=await iy(n.name,r.value,{dataset_id:n.datasetId,settings:n.values}),a.value="Successfully created.",l.value="success")}catch(p){a.value=$a(p),l.value="error"}}function u(p){c("update:settings",p)}function f(p){c("update:tracks",p)}return(p,b)=>(o.openBlock(),o.createElementBlock("div",zy,[o.createElementVNode("div",By,[o.createElementVNode("div",_y,[My,o.createVNode(Ey)]),o.createElementVNode("div",null,[o.createVNode(o.unref(Ht),{strong:"",secondary:"",circle:"",class:"bg-sky-100 m-1",onClick:d},{icon:o.withCtx(()=>[o.createVNode(o.unref(Tt),null,{default:o.withCtx(()=>[o.createVNode(o.unref(vd))]),_:1})]),_:1}),o.createVNode(o.unref(Ht),{strong:"",secondary:"",circle:"",class:"bg-sky-100 m-1",onClick:b[0]||(b[0]=h=>c("toggle"))},{icon:o.withCtx(()=>[o.createVNode(o.unref(Tt),null,{default:o.withCtx(()=>[o.createVNode(o.unref(gd))]),_:1})]),_:1})])]),o.createVNode(ky,{message:a.value,"message-type":l.value,onTimeout:b[1]||(b[1]=h=>a.value=""),class:"m-4"},null,8,["message","message-type"]),o.createElementVNode("div",Oy,[o.createElementVNode("div",Ay,[o.createElementVNode("div",Iy,[o.createElementVNode("div",Fy,[n.logoUrl?(o.openBlock(),o.createElementBlock("img",{key:0,src:n.logoUrl,class:"min-w-14 max-w-14 object-contain"},null,8,Dy)):(o.openBlock(),o.createElementBlock("svg",Ny,Ly))])]),o.createElementVNode("div",Hy,[o.createElementVNode("span",Vy,o.toDisplayString(e.html),1),o.createElementVNode("div",{class:"text-xs",innerHTML:e.description},null,8,jy)])])]),o.createElementVNode("div",Wy,[Uy,Gy,o.createVNode(o.unref(yr),{value:r.value,"onUpdate:value":b[2]||(b[2]=h=>r.value=h)},null,8,["value"])]),o.createVNode(o.unref(oy),{type:"line",animated:"",class:"px-4","tab-class":s.value?"!hidden":""},{default:o.withCtx(()=>[e.trackInputs.length>0?(o.openBlock(),o.createBlock(o.unref(vc),{key:0,name:"tracks"},{tab:o.withCtx(()=>[o.createVNode(o.unref(Tt),null,{default:o.withCtx(()=>[o.createVNode(o.unref(yd))]),_:1}),qy]),default:o.withCtx(()=>[o.createVNode($y,{"dataset-id":e.datasetId,inputs:e.trackInputs,"values-array":e.trackValues,"onUpdate:valuesArray":f},null,8,["dataset-id","inputs","values-array"])]),_:1})):o.createCommentVNode("",!0),e.settingInputs.length>0?(o.openBlock(),o.createBlock(o.unref(vc),{key:1,name:"settings"},{tab:o.withCtx(()=>[o.createVNode(o.unref(Tt),null,{default:o.withCtx(()=>[o.createVNode(o.unref(pd))]),_:1}),Ky]),default:o.withCtx(()=>[o.createVNode(na,{"dataset-id":e.datasetId,inputs:e.settingInputs,values:e.settingValues,"onUpdate:values":u},null,8,["dataset-id","inputs","values"])]),_:1})):o.createCommentVNode("",!0)]),_:1},8,["tab-class"])]))}};function $c(e,t){return function(){return e.apply(t,arguments)}}const{toString:Yy}=Object.prototype,{getPrototypeOf:ra}=Object,Co=(e=>t=>{const n=Yy.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),kt=e=>(e=e.toLowerCase(),t=>Co(t)===e),So=e=>t=>typeof t===e,{isArray:Xn}=Array,$r=So("undefined");function Zy(e){return e!==null&&!$r(e)&&e.constructor!==null&&!$r(e.constructor)&&bt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Tc=kt("ArrayBuffer");function Jy(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Tc(e.buffer),t}const Qy=So("string"),bt=So("function"),kc=So("number"),$o=e=>e!==null&&typeof e=="object",ew=e=>e===!0||e===!1,To=e=>{if(Co(e)!=="object")return!1;const t=ra(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},tw=kt("Date"),nw=kt("File"),rw=kt("Blob"),ow=kt("FileList"),iw=e=>$o(e)&&bt(e.pipe),aw=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||bt(e.append)&&((t=Co(e))==="formdata"||t==="object"&&bt(e.toString)&&e.toString()==="[object FormData]"))},lw=kt("URLSearchParams"),[sw,cw,dw,uw]=["ReadableStream","Request","Response","Headers"].map(kt),fw=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Tr(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),Xn(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{const a=n?Object.getOwnPropertyNames(e):Object.keys(e),l=a.length;let s;for(r=0;r<l;r++)s=a[r],t.call(null,e[s],s,e)}}function Rc(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}const En=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Pc=e=>!$r(e)&&e!==En;function oa(){const{caseless:e}=Pc(this)&&this||{},t={},n=(r,i)=>{const a=e&&Rc(t,i)||i;To(t[a])&&To(r)?t[a]=oa(t[a],r):To(r)?t[a]=oa({},r):Xn(r)?t[a]=r.slice():t[a]=r};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&Tr(arguments[r],n);return t}const hw=(e,t,n,{allOwnKeys:r}={})=>(Tr(t,(i,a)=>{n&&bt(i)?e[a]=$c(i,n):e[a]=i},{allOwnKeys:r}),e),pw=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),bw=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},mw=(e,t,n,r)=>{let i,a,l;const s={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-- >0;)l=i[a],(!r||r(l,e,t))&&!s[l]&&(t[l]=e[l],s[l]=!0);e=n!==!1&&ra(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},gw=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},vw=e=>{if(!e)return null;if(Xn(e))return e;let t=e.length;if(!kc(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},xw=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&ra(Uint8Array)),yw=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let i;for(;(i=r.next())&&!i.done;){const a=i.value;t.call(e,a[0],a[1])}},ww=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Cw=kt("HTMLFormElement"),Sw=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),Ec=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),$w=kt("RegExp"),zc=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Tr(n,(i,a)=>{let l;(l=t(i,a,e))!==!1&&(r[a]=l||i)}),Object.defineProperties(e,r)},Tw=e=>{zc(e,(t,n)=>{if(bt(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(bt(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},kw=(e,t)=>{const n={},r=i=>{i.forEach(a=>{n[a]=!0})};return Xn(e)?r(e):r(String(e).split(t)),n},Rw=()=>{},Pw=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,ia="abcdefghijklmnopqrstuvwxyz",Bc="0123456789",_c={DIGIT:Bc,ALPHA:ia,ALPHA_DIGIT:ia+ia.toUpperCase()+Bc},Ew=(e=16,t=_c.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function zw(e){return!!(e&&bt(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const Bw=e=>{const t=new Array(10),n=(r,i)=>{if($o(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;const a=Xn(r)?[]:{};return Tr(r,(l,s)=>{const c=n(l,i+1);!$r(c)&&(a[s]=c)}),t[i]=void 0,a}}return r};return n(e,0)},_w=kt("AsyncFunction"),Mw=e=>e&&($o(e)||bt(e))&&bt(e.then)&&bt(e.catch),Mc=((e,t)=>e?setImmediate:t?((n,r)=>(En.addEventListener("message",({source:i,data:a})=>{i===En&&a===n&&r.length&&r.shift()()},!1),i=>{r.push(i),En.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",bt(En.postMessage)),Ow=typeof queueMicrotask<"u"?queueMicrotask.bind(En):typeof process<"u"&&process.nextTick||Mc,V={isArray:Xn,isArrayBuffer:Tc,isBuffer:Zy,isFormData:aw,isArrayBufferView:Jy,isString:Qy,isNumber:kc,isBoolean:ew,isObject:$o,isPlainObject:To,isReadableStream:sw,isRequest:cw,isResponse:dw,isHeaders:uw,isUndefined:$r,isDate:tw,isFile:nw,isBlob:rw,isRegExp:$w,isFunction:bt,isStream:iw,isURLSearchParams:lw,isTypedArray:xw,isFileList:ow,forEach:Tr,merge:oa,extend:hw,trim:fw,stripBOM:pw,inherits:bw,toFlatObject:mw,kindOf:Co,kindOfTest:kt,endsWith:gw,toArray:vw,forEachEntry:yw,matchAll:ww,isHTMLForm:Cw,hasOwnProperty:Ec,hasOwnProp:Ec,reduceDescriptors:zc,freezeMethods:Tw,toObjectSet:kw,toCamelCase:Sw,noop:Rw,toFiniteNumber:Pw,findKey:Rc,global:En,isContextDefined:Pc,ALPHABET:_c,generateString:Ew,isSpecCompliantForm:zw,toJSONObject:Bw,isAsyncFn:_w,isThenable:Mw,setImmediate:Mc,asap:Ow};function ye(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i)}V.inherits(ye,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:V.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Oc=ye.prototype,Ac={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Ac[e]={value:e}}),Object.defineProperties(ye,Ac),Object.defineProperty(Oc,"isAxiosError",{value:!0}),ye.from=(e,t,n,r,i,a)=>{const l=Object.create(Oc);return V.toFlatObject(e,l,function(c){return c!==Error.prototype},s=>s!=="isAxiosError"),ye.call(l,e.message,t,n,r,i),l.cause=e,l.name=e.name,a&&Object.assign(l,a),l};const Aw=null;function aa(e){return V.isPlainObject(e)||V.isArray(e)}function Ic(e){return V.endsWith(e,"[]")?e.slice(0,-2):e}function Fc(e,t,n){return e?e.concat(t).map(function(i,a){return i=Ic(i),!n&&a?"["+i+"]":i}).join(n?".":""):t}function Iw(e){return V.isArray(e)&&!e.some(aa)}const Fw=V.toFlatObject(V,{},null,function(t){return/^is[A-Z]/.test(t)});function ko(e,t,n){if(!V.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=V.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(x,v){return!V.isUndefined(v[x])});const r=n.metaTokens,i=n.visitor||u,a=n.dots,l=n.indexes,c=(n.Blob||typeof Blob<"u"&&Blob)&&V.isSpecCompliantForm(t);if(!V.isFunction(i))throw new TypeError("visitor must be a function");function d(h){if(h===null)return"";if(V.isDate(h))return h.toISOString();if(!c&&V.isBlob(h))throw new ye("Blob is not supported. Use a Buffer instead.");return V.isArrayBuffer(h)||V.isTypedArray(h)?c&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function u(h,x,v){let g=h;if(h&&!v&&typeof h=="object"){if(V.endsWith(x,"{}"))x=r?x:x.slice(0,-2),h=JSON.stringify(h);else if(V.isArray(h)&&Iw(h)||(V.isFileList(h)||V.endsWith(x,"[]"))&&(g=V.toArray(h)))return x=Ic(x),g.forEach(function(z,$){!(V.isUndefined(z)||z===null)&&t.append(l===!0?Fc([x],$,a):l===null?x:x+"[]",d(z))}),!1}return aa(h)?!0:(t.append(Fc(v,x,a),d(h)),!1)}const f=[],p=Object.assign(Fw,{defaultVisitor:u,convertValue:d,isVisitable:aa});function b(h,x){if(!V.isUndefined(h)){if(f.indexOf(h)!==-1)throw Error("Circular reference detected in "+x.join("."));f.push(h),V.forEach(h,function(g,k){(!(V.isUndefined(g)||g===null)&&i.call(t,g,V.isString(k)?k.trim():k,x,p))===!0&&b(g,x?x.concat(k):[k])}),f.pop()}}if(!V.isObject(e))throw new TypeError("data must be an object");return b(e),t}function Dc(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function la(e,t){this._pairs=[],e&&ko(e,this,t)}const Nc=la.prototype;Nc.append=function(t,n){this._pairs.push([t,n])},Nc.toString=function(t){const n=t?function(r){return t.call(this,r,Dc)}:Dc;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function Dw(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Lc(e,t,n){if(!t)return e;const r=n&&n.encode||Dw,i=n&&n.serialize;let a;if(i?a=i(t,n):a=V.isURLSearchParams(t)?t.toString():new la(t,n).toString(r),a){const l=e.indexOf("#");l!==-1&&(e=e.slice(0,l)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class Hc{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){V.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Vc={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Nw={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:la,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},sa=typeof window<"u"&&typeof document<"u",Lw=(e=>sa&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),Hw=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Vw=sa&&window.location.href||"http://localhost",Rt={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:sa,hasStandardBrowserEnv:Lw,hasStandardBrowserWebWorkerEnv:Hw,origin:Vw},Symbol.toStringTag,{value:"Module"})),...Nw};function jw(e,t){return ko(e,new Rt.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,a){return Rt.isNode&&V.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function Ww(e){return V.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Uw(e){const t={},n=Object.keys(e);let r;const i=n.length;let a;for(r=0;r<i;r++)a=n[r],t[a]=e[a];return t}function jc(e){function t(n,r,i,a){let l=n[a++];if(l==="__proto__")return!0;const s=Number.isFinite(+l),c=a>=n.length;return l=!l&&V.isArray(i)?i.length:l,c?(V.hasOwnProp(i,l)?i[l]=[i[l],r]:i[l]=r,!s):((!i[l]||!V.isObject(i[l]))&&(i[l]=[]),t(n,r,i[l],a)&&V.isArray(i[l])&&(i[l]=Uw(i[l])),!s)}if(V.isFormData(e)&&V.isFunction(e.entries)){const n={};return V.forEachEntry(e,(r,i)=>{t(Ww(r),i,n,0)}),n}return null}function Gw(e,t,n){if(V.isString(e))try{return(t||JSON.parse)(e),V.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(0,JSON.stringify)(e)}const kr={transitional:Vc,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,a=V.isObject(t);if(a&&V.isHTMLForm(t)&&(t=new FormData(t)),V.isFormData(t))return i?JSON.stringify(jc(t)):t;if(V.isArrayBuffer(t)||V.isBuffer(t)||V.isStream(t)||V.isFile(t)||V.isBlob(t)||V.isReadableStream(t))return t;if(V.isArrayBufferView(t))return t.buffer;if(V.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(a){if(r.indexOf("application/x-www-form-urlencoded")>-1)return jw(t,this.formSerializer).toString();if((s=V.isFileList(t))||r.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return ko(s?{"files[]":t}:t,c&&new c,this.formSerializer)}}return a||i?(n.setContentType("application/json",!1),Gw(t)):t}],transformResponse:[function(t){const n=this.transitional||kr.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(V.isResponse(t)||V.isReadableStream(t))return t;if(t&&V.isString(t)&&(r&&!this.responseType||i)){const l=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(s){if(l)throw s.name==="SyntaxError"?ye.from(s,ye.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Rt.classes.FormData,Blob:Rt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};V.forEach(["delete","get","head","post","put","patch"],e=>{kr.headers[e]={}});const qw=V.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Kw=e=>{const t={};let n,r,i;return e&&e.split(`
|
|
2069
|
-
`).forEach(function(l){i=l.indexOf(":"),n=l.substring(0,i).trim().toLowerCase(),r=l.substring(i+1).trim(),!(!n||t[n]&&
|
|
2070
|
-
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[Wc]=this[Wc]={accessors:{}}).accessors,i=this.prototype;function a(l){const s=Rr(l);r[s]||(Jw(i,l),r[s]=!0)}return V.isArray(t)?t.forEach(a):a(t),this}}ut.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),V.reduceDescriptors(ut.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),V.freezeMethods(ut);function da(e,t){const n=this||kr,r=t||n,i=ut.from(r.headers);let a=r.data;return V.forEach(e,function(s){a=s.call(n,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function Uc(e){return!!(e&&e.__CANCEL__)}function Yn(e,t,n){ye.call(this,e??"canceled",ye.ERR_CANCELED,t,n),this.name="CanceledError"}V.inherits(Yn,ye,{__CANCEL__:!0});function Gc(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new ye("Request failed with status code "+n.status,[ye.ERR_BAD_REQUEST,ye.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Qw(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function e1(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,a=0,l;return t=t!==void 0?t:1e3,function(c){const d=Date.now(),u=r[a];l||(l=d),n[i]=c,r[i]=d;let f=a,p=0;for(;f!==i;)p+=n[f++],f=f%e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),d-l<t)return;const b=u&&d-u;return b?Math.round(p*1e3/b):void 0}}function t1(e,t){let n=0,r=1e3/t,i,a;const l=(d,u=Date.now())=>{n=u,i=null,a&&(clearTimeout(a),a=null),e.apply(null,d)};return[(...d)=>{const u=Date.now(),f=u-n;f>=r?l(d,u):(i=d,a||(a=setTimeout(()=>{a=null,l(i)},r-f)))},()=>i&&l(i)]}const Po=(e,t,n=3)=>{let r=0;const i=e1(50,250);return t1(a=>{const l=a.loaded,s=a.lengthComputable?a.total:void 0,c=l-r,d=i(c),u=l<=s;r=l;const f={loaded:l,total:s,progress:s?l/s:void 0,bytes:c,rate:d||void 0,estimated:d&&s&&u?(s-l)/d:void 0,event:a,lengthComputable:s!=null,[t?"download":"upload"]:!0};e(f)},n)},qc=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Kc=e=>(...t)=>V.asap(()=>e(...t)),n1=Rt.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function i(a){let l=a;return t&&(n.setAttribute("href",l),l=n.href),n.setAttribute("href",l),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=i(window.location.href),function(l){const s=V.isString(l)?i(l):l;return s.protocol===r.protocol&&s.host===r.host}}():function(){return function(){return!0}}(),r1=Rt.hasStandardBrowserEnv?{write(e,t,n,r,i,a){const l=[e+"="+encodeURIComponent(t)];V.isNumber(n)&&l.push("expires="+new Date(n).toGMTString()),V.isString(r)&&l.push("path="+r),V.isString(i)&&l.push("domain="+i),a===!0&&l.push("secure"),document.cookie=l.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function o1(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function i1(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Xc(e,t){return e&&!o1(t)?i1(e,t):t}const Yc=e=>e instanceof ut?{...e}:e;function zn(e,t){t=t||{};const n={};function r(d,u,f){return V.isPlainObject(d)&&V.isPlainObject(u)?V.merge.call({caseless:f},d,u):V.isPlainObject(u)?V.merge({},u):V.isArray(u)?u.slice():u}function i(d,u,f){if(V.isUndefined(u)){if(!V.isUndefined(d))return r(void 0,d,f)}else return r(d,u,f)}function a(d,u){if(!V.isUndefined(u))return r(void 0,u)}function l(d,u){if(V.isUndefined(u)){if(!V.isUndefined(d))return r(void 0,d)}else return r(void 0,u)}function s(d,u,f){if(f in t)return r(d,u);if(f in e)return r(void 0,d)}const c={url:a,method:a,data:a,baseURL:l,transformRequest:l,transformResponse:l,paramsSerializer:l,timeout:l,timeoutMessage:l,withCredentials:l,withXSRFToken:l,adapter:l,responseType:l,xsrfCookieName:l,xsrfHeaderName:l,onUploadProgress:l,onDownloadProgress:l,decompress:l,maxContentLength:l,maxBodyLength:l,beforeRedirect:l,transport:l,httpAgent:l,httpsAgent:l,cancelToken:l,socketPath:l,responseEncoding:l,validateStatus:s,headers:(d,u)=>i(Yc(d),Yc(u),!0)};return V.forEach(Object.keys(Object.assign({},e,t)),function(u){const f=c[u]||i,p=f(e[u],t[u],u);V.isUndefined(p)&&f!==s||(n[u]=p)}),n}const Zc=e=>{const t=zn({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:a,headers:l,auth:s}=t;t.headers=l=ut.from(l),t.url=Lc(Xc(t.baseURL,t.url),e.params,e.paramsSerializer),s&&l.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):"")));let c;if(V.isFormData(n)){if(Rt.hasStandardBrowserEnv||Rt.hasStandardBrowserWebWorkerEnv)l.setContentType(void 0);else if((c=l.getContentType())!==!1){const[d,...u]=c?c.split(";").map(f=>f.trim()).filter(Boolean):[];l.setContentType([d||"multipart/form-data",...u].join("; "))}}if(Rt.hasStandardBrowserEnv&&(r&&V.isFunction(r)&&(r=r(t)),r||r!==!1&&n1(t.url))){const d=i&&a&&r1.read(a);d&&l.set(i,d)}return t},a1=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){const i=Zc(e);let a=i.data;const l=ut.from(i.headers).normalize();let{responseType:s,onUploadProgress:c,onDownloadProgress:d}=i,u,f,p,b,h;function x(){b&&b(),h&&h(),i.cancelToken&&i.cancelToken.unsubscribe(u),i.signal&&i.signal.removeEventListener("abort",u)}let v=new XMLHttpRequest;v.open(i.method.toUpperCase(),i.url,!0),v.timeout=i.timeout;function g(){if(!v)return;const z=ut.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),T={data:!s||s==="text"||s==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:z,config:e,request:v};Gc(function(m){n(m),x()},function(m){r(m),x()},T),v=null}"onloadend"in v?v.onloadend=g:v.onreadystatechange=function(){!v||v.readyState!==4||v.status===0&&!(v.responseURL&&v.responseURL.indexOf("file:")===0)||setTimeout(g)},v.onabort=function(){v&&(r(new ye("Request aborted",ye.ECONNABORTED,e,v)),v=null)},v.onerror=function(){r(new ye("Network Error",ye.ERR_NETWORK,e,v)),v=null},v.ontimeout=function(){let $=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const T=i.transitional||Vc;i.timeoutErrorMessage&&($=i.timeoutErrorMessage),r(new ye($,T.clarifyTimeoutError?ye.ETIMEDOUT:ye.ECONNABORTED,e,v)),v=null},a===void 0&&l.setContentType(null),"setRequestHeader"in v&&V.forEach(l.toJSON(),function($,T){v.setRequestHeader(T,$)}),V.isUndefined(i.withCredentials)||(v.withCredentials=!!i.withCredentials),s&&s!=="json"&&(v.responseType=i.responseType),d&&([p,h]=Po(d,!0),v.addEventListener("progress",p)),c&&v.upload&&([f,b]=Po(c),v.upload.addEventListener("progress",f),v.upload.addEventListener("loadend",b)),(i.cancelToken||i.signal)&&(u=z=>{v&&(r(!z||z.type?new Yn(null,e,v):z),v.abort(),v=null)},i.cancelToken&&i.cancelToken.subscribe(u),i.signal&&(i.signal.aborted?u():i.signal.addEventListener("abort",u)));const k=Qw(i.url);if(k&&Rt.protocols.indexOf(k)===-1){r(new ye("Unsupported protocol "+k+":",ye.ERR_BAD_REQUEST,e));return}v.send(a||null)})},l1=(e,t)=>{let n=new AbortController,r;const i=function(c){if(!r){r=!0,l();const d=c instanceof Error?c:this.reason;n.abort(d instanceof ye?d:new Yn(d instanceof Error?d.message:d))}};let a=t&&setTimeout(()=>{i(new ye(`timeout ${t} of ms exceeded`,ye.ETIMEDOUT))},t);const l=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(c=>{c&&(c.removeEventListener?c.removeEventListener("abort",i):c.unsubscribe(i))}),e=null)};e.forEach(c=>c&&c.addEventListener&&c.addEventListener("abort",i));const{signal:s}=n;return s.unsubscribe=l,[s,()=>{a&&clearTimeout(a),a=null}]},s1=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},c1=async function*(e,t,n){for await(const r of e)yield*s1(ArrayBuffer.isView(r)?r:await n(String(r)),t)},Jc=(e,t,n,r,i)=>{const a=c1(e,t,i);let l=0,s,c=d=>{s||(s=!0,r&&r(d))};return new ReadableStream({async pull(d){try{const{done:u,value:f}=await a.next();if(u){c(),d.close();return}let p=f.byteLength;if(n){let b=l+=p;n(b)}d.enqueue(new Uint8Array(f))}catch(u){throw c(u),u}},cancel(d){return c(d),a.return()}},{highWaterMark:2})},Eo=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Qc=Eo&&typeof ReadableStream=="function",ua=Eo&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),ed=(e,...t)=>{try{return!!e(...t)}catch{return!1}},d1=Qc&&ed(()=>{let e=!1;const t=new Request(Rt.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),td=64*1024,fa=Qc&&ed(()=>V.isReadableStream(new Response("").body)),zo={stream:fa&&(e=>e.body)};Eo&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!zo[t]&&(zo[t]=V.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new ye(`Response type '${t}' is not supported`,ye.ERR_NOT_SUPPORT,r)})})})(new Response);const u1=async e=>{if(e==null)return 0;if(V.isBlob(e))return e.size;if(V.isSpecCompliantForm(e))return(await new Request(e).arrayBuffer()).byteLength;if(V.isArrayBufferView(e)||V.isArrayBuffer(e))return e.byteLength;if(V.isURLSearchParams(e)&&(e=e+""),V.isString(e))return(await ua(e)).byteLength},f1=async(e,t)=>{const n=V.toFiniteNumber(e.getContentLength());return n??u1(t)},ha={http:Aw,xhr:a1,fetch:Eo&&(async e=>{let{url:t,method:n,data:r,signal:i,cancelToken:a,timeout:l,onDownloadProgress:s,onUploadProgress:c,responseType:d,headers:u,withCredentials:f="same-origin",fetchOptions:p}=Zc(e);d=d?(d+"").toLowerCase():"text";let[b,h]=i||a||l?l1([i,a],l):[],x,v;const g=()=>{!x&&setTimeout(()=>{b&&b.unsubscribe()}),x=!0};let k;try{if(c&&d1&&n!=="get"&&n!=="head"&&(k=await f1(u,r))!==0){let O=new Request(t,{method:"POST",body:r,duplex:"half"}),m;if(V.isFormData(r)&&(m=O.headers.get("content-type"))&&u.setContentType(m),O.body){const[S,M]=qc(k,Po(Kc(c)));r=Jc(O.body,td,S,M,ua)}}V.isString(f)||(f=f?"include":"omit"),v=new Request(t,{...p,signal:b,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",credentials:f});let z=await fetch(v);const $=fa&&(d==="stream"||d==="response");if(fa&&(s||$)){const O={};["status","statusText","headers"].forEach(N=>{O[N]=z[N]});const m=V.toFiniteNumber(z.headers.get("content-length")),[S,M]=s&&qc(m,Po(Kc(s),!0))||[];z=new Response(Jc(z.body,td,S,()=>{M&&M(),$&&g()},ua),O)}d=d||"text";let T=await zo[V.findKey(zo,d)||"text"](z,e);return!$&&g(),h&&h(),await new Promise((O,m)=>{Gc(O,m,{data:T,headers:ut.from(z.headers),status:z.status,statusText:z.statusText,config:e,request:v})})}catch(z){throw g(),z&&z.name==="TypeError"&&/fetch/i.test(z.message)?Object.assign(new ye("Network Error",ye.ERR_NETWORK,e,v),{cause:z.cause||z}):ye.from(z,z&&z.code,e,v)}})};V.forEach(ha,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const nd=e=>`- ${e}`,h1=e=>V.isFunction(e)||e===null||e===!1,rd={getAdapter:e=>{e=V.isArray(e)?e:[e];const{length:t}=e;let n,r;const i={};for(let a=0;a<t;a++){n=e[a];let l;if(r=n,!h1(n)&&(r=ha[(l=String(n)).toLowerCase()],r===void 0))throw new ye(`Unknown adapter '${l}'`);if(r)break;i[l||"#"+a]=r}if(!r){const a=Object.entries(i).map(([s,c])=>`adapter ${s} `+(c===!1?"is not supported by the environment":"is not available in the build"));let l=t?a.length>1?`since :
|
|
2071
|
-
`+a.map(
|
|
2072
|
-
`):" "+
|
|
2073
|
-
`+a):r.stack=a}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=zn(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:a}=n;r!==void 0&&ma.assertOptions(r,{silentJSONParsing:rn.transitional(rn.boolean),forcedJSONParsing:rn.transitional(rn.boolean),clarifyTimeoutError:rn.transitional(rn.boolean)},!1),i!=null&&(V.isFunction(i)?n.paramsSerializer={serialize:i}:ma.assertOptions(i,{encode:rn.function,serialize:rn.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let l=a&&V.merge(a.common,a[n.method]);a&&V.forEach(["delete","get","head","post","put","patch","common"],h=>{delete a[h]}),n.headers=ut.concat(l,a);const s=[];let c=!0;this.interceptors.request.forEach(function(x){typeof x.runWhen=="function"&&x.runWhen(n)===!1||(c=c&&x.synchronous,s.unshift(x.fulfilled,x.rejected))});const d=[];this.interceptors.response.forEach(function(x){d.push(x.fulfilled,x.rejected)});let u,f=0,p;if(!c){const h=[od.bind(this),void 0];for(h.unshift.apply(h,s),h.push.apply(h,d),p=h.length,u=Promise.resolve(n);f<p;)u=u.then(h[f++],h[f++]);return u}p=s.length;let b=n;for(f=0;f<p;){const h=s[f++],x=s[f++];try{b=h(b)}catch(v){x.call(this,v);break}}try{u=od.call(this,b)}catch(h){return Promise.reject(h)}for(f=0,p=d.length;f<p;)u=u.then(d[f++],d[f++]);return u}getUri(t){t=zn(this.defaults,t);const n=Xc(t.baseURL,t.url);return Lc(n,t.params,t.paramsSerializer)}}V.forEach(["delete","get","head","options"],function(t){Bn.prototype[t]=function(n,r){return this.request(zn(r||{},{method:t,url:n,data:(r||{}).data}))}}),V.forEach(["post","put","patch"],function(t){function n(r){return function(a,l,s){return this.request(zn(s||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:l}))}}Bn.prototype[t]=n(),Bn.prototype[t+"Form"]=n(!0)});class ga{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const r=this;this.promise.then(i=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](i);r._listeners=null}),this.promise.then=i=>{let a;const l=new Promise(s=>{r.subscribe(s),a=s}).then(i);return l.cancel=function(){r.unsubscribe(a)},l},t(function(a,l,s){r.reason||(r.reason=new Yn(a,l,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new ga(function(i){t=i}),cancel:t}}}function b1(e){return function(n){return e.apply(null,n)}}function m1(e){return V.isObject(e)&&e.isAxiosError===!0}const va={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(va).forEach(([e,t])=>{va[t]=e});function ld(e){const t=new Bn(e),n=$c(Bn.prototype.request,t);return V.extend(n,Bn.prototype,t,{allOwnKeys:!0}),V.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return ld(zn(e,i))},n}const qe=ld(kr);qe.Axios=Bn,qe.CanceledError=Yn,qe.CancelToken=ga,qe.isCancel=Uc,qe.VERSION=id,qe.toFormData=ko,qe.AxiosError=ye,qe.Cancel=qe.CanceledError,qe.all=function(t){return Promise.all(t)},qe.spread=b1,qe.isAxiosError=m1,qe.mergeConfig=zn,qe.AxiosHeaders=ut,qe.formToJSON=e=>jc(V.isHTMLForm(e)?new FormData(e):e),qe.getAdapter=rd.getAdapter,qe.HttpStatusCode=va,qe.default=qe;function g1(e){const t=e.replace(/^.*[\\\/]/,"");return t.substring(0,t.lastIndexOf("."))}const sd=new DOMParser;async function v1(e,t=""){const n=sd.parseFromString(e,"text/xml"),r=[],i=n.documentElement.getElementsByTagName("macros");if(i.length>0)for(const s of i)for(const c of s.children)r.push(c.textContent.trim());console.debug(`Detected ${r.length} macro file(s) in xml.`);const a={};for(const s of r){const{data:c}=await qe.get(`${t}${s}`),u=sd.parseFromString(c,"text/xml").documentElement.getElementsByTagName("xml");if(u.length>0)for(const f of u){const p=f.getAttribute("name");for(const b of f.children)a[p]=a[p]||[],a[p].push(b)}}console.debug("Successfully collected macro files.");const l=n.documentElement.getElementsByTagName("expand");if(l.length>0)for(const s of l){const c=s.getAttribute("macro");if(c in a){const d=a[c];for(const u of d)s.parentNode.appendChild(u);s.parentNode.removeChild(s)}else console.error(`Failed to detect '${c}' macros source.`)}return n}async function x1(e){const t=await qe.get(e),n=await v1(t.data);let r={};r.name=g1(e),r.html=n.documentElement.getAttribute("name"),r.logo=n.documentElement.getAttribute("logo");const i=n.documentElement.getElementsByTagName("description");i.length===1&&(r.description=i[0].textContent.trim());const a=n.documentElement.getElementsByTagName("specs");return a.length===1&&(r.specs=new _o(a[0])),["settings","tracks"].forEach(l=>{const s=n.documentElement.getElementsByTagName(l);s.length===1&&(r[l]=new Bo(s[0]))}),r}class Bo extends Array{constructor(t){super();for(const n of t.children)n.children.length>0?n.tagName===n.children[0].tagName?this.push(new Bo(n)):this.push(new _o(n)):n.textContent&&n.textContent.trim()&&this.push(n.textContent.trim())}}class _o{constructor(t){if(t.attributes.length>0)for(const n of t.attributes)this[n.name]=n.value;for(const n of t.children)if(n.children.length>0){let r;if(n.tagName===n.children[0].tagName)r=new Bo(n);else{const i=new _o(n);if(n.attributes.length>0)for(const a of n.attributes)i[a.name]=a.value;r=i}this[n.tagName]=r}else if(n.attributes.length>0){const r={};for(const i of n.attributes)r[i.name]=i.value;this[n.tagName]=r}else this[n.tagName]=n.textContent.trim()}}async function y1(e,t,n){if(!t)try{t=await x1(e)}catch(l){console.error("Visualization requires configuration from XML or attached `visualization_plugin` details."),Br(l)}const r=dd(t.settings,n.settings),i=t.specs,a=C1(t.tracks,n.tracks);return{plugin:t,settings:r,specs:i,tracks:a}}function cd(e,t){let n=t??e.value;return e.type==="float"&&(n=Number(n)),n}function w1(e,t){var i;const n=t||{},r=e.test_param.name;if(!r)console.error(`Test parameter has no name: ${e.name}.`);else{const a=n[r]??e.test_param.value;for(const l of e.cases)if(l.value===a&&(n[r]=a,((i=l.inputs)==null?void 0:i.length)>0))for(const s of l.inputs)n[s.name]=cd(s,n[s.name])}return n}function dd(e,t){const n=t||{};return e&&e.forEach(r=>{r.type==="conditional"?n[r.name]=w1(r,n[r.name]):n[r.name]=cd(r,n[r.name])}),n}function C1(e,t){const n=t||[];return e&&(n.length===0&&n.push({}),n.forEach((r,i)=>{n[i]=dd(e,r)})),n}function S1(e){var c;const t=document.getElementById("app"),n=JSON.parse(t.getAttribute("data-incoming"))||{},r=n.root||(e==null?void 0:e.root)||"/",i=n.visualization_id,a=n.visualization_plugin,l=n.visualization_title||(e==null?void 0:e.title)||"Unnamed Visualization";let s=n.visualization_config||e;if((c=n.visualization_config)!=null&&c.chart_dict){const d=n.visualization_config.chart_dict;s.groups=d.groups,s.settings=d.settings,delete s.chartDict}return{root:r,visualizationConfig:s,visualizationId:i,visualizationPlugin:a,visualizationTitle:l}}const $1={key:1,class:"m-2"},T1=o.createElementVNode("span",{class:"text-xs"},"Please wait...",-1),k1={key:0},R1={__name:"GalaxyCharts",props:{config:{type:Object,default:()=>{}},xml:{type:String,required:!0}},setup(e){const t=e,n=o.ref(!1),r=o.ref(null),i=o.ref(null),a=o.ref(""),l=o.ref(null),s=o.ref(!0),c=o.ref(null),d=o.ref(""),u=o.ref([]),f=o.ref({}),p=o.ref({}),b=o.ref([]),h=o.ref([]),{root:x,visualizationConfig:v,visualizationId:g,visualizationPlugin:k,visualizationTitle:z}=S1(t.config);Mo().setRoot(x),y1(t.xml,k,v).then(({plugin:A,settings:L,specs:U,tracks:J})=>{i.value=A.description,l.value=A.html,s.value=!1,c.value=A.logo,d.value=A.name,u.value=A.settings||[],f.value=L,p.value=U,b.value=A.tracks||[],h.value=J});const T=v.dataset_id;v.dataset_url?(r.value=v.dataset_url,console.debug(`GalaxyCharts: Evaluating dataset url: ${r.value}.`)):T?(r.value=fd(T),console.debug(`GalaxyCharts: Built dataset url from dataset id: ${r.value}.`)):a.value="Visualization requires `dataset_id` or `dataset_url`.";const O=o.computed(()=>c.value&&`${x}${c.value}`),m=o.computed(()=>u.value.length===0&&b.value.length===0);async function S(){n.value=!n.value,await o.nextTick(),window.dispatchEvent(new Event("resize"))}function M(A){f.value={...A}}function N(A){h.value=[...A]}return(A,L)=>a.value?(o.openBlock(),o.createBlock(o.unref(nc),{key:0,title:"Visualization Error!",type:"error",class:"m-2"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(a.value),1)]),_:1})):s.value?(o.openBlock(),o.createElementBlock("div",$1,[o.createElementVNode("span",null,[o.createVNode(o.unref(bd),{class:"animate-spin size-4 inline mx-1"})]),T1])):(o.openBlock(),o.createElementBlock("div",{key:2,class:o.normalizeClass(["grid h-screen",{"grid-cols-[70%_30%]":!n.value&&!m.value}])},[o.renderSlot(A.$slots,"default",{datasetId:o.unref(T),datasetUrl:r.value,root:o.unref(x),settings:f.value,specs:p.value,tracks:h.value}),n.value&&!m.value?(o.openBlock(),o.createElementBlock("div",k1,[o.createVNode(o.unref(Vx),{strong:"",secondary:"",circle:"",class:"bg-sky-100 m-2",top:0,right:0,onClick:S},{default:o.withCtx(()=>[o.createVNode(o.unref(Tt),null,{default:o.withCtx(()=>[o.createVNode(o.unref(md))]),_:1})]),_:1})])):(o.openBlock(),o.createBlock(Xy,{key:1,"dataset-id":o.unref(T),description:i.value,html:l.value,"logo-url":O.value,name:d.value,"setting-inputs":u.value,"setting-values":f.value,"track-inputs":b.value,"track-values":h.value,"visualization-id":o.unref(g),"visualization-title":o.unref(z),"onUpdate:settings":M,"onUpdate:tracks":N,onToggle:S},null,8,["dataset-id","description","html","logo-url","name","setting-inputs","setting-values","track-inputs","track-values","visualization-id","visualization-title"]))],2))}};Ve.GalaxyApi=cn,Ve.GalaxyCharts=R1,Ve.useColumnsStore=hd,Ve.useConfigStore=Mo,Object.defineProperty(Ve,Symbol.toStringTag,{value:"Module"})});
|
|
2068
|
+
`)])])])]),oy=Object.assign(Object.assign({},Ce.props),{value:[String,Number],defaultValue:[String,Number],trigger:{type:String,default:"click"},type:{type:String,default:"bar"},closable:Boolean,justifyContent:String,size:{type:String,default:"medium"},placement:{type:String,default:"top"},tabStyle:[String,Object],tabClass:String,addTabStyle:[String,Object],addTabClass:String,barWidth:Number,paneClass:String,paneStyle:[String,Object],paneWrapperClass:String,paneWrapperStyle:[String,Object],addable:[Boolean,Object],tabsPadding:{type:Number,default:0},animated:Boolean,onBeforeLeave:Function,onAdd:Function,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],onClose:[Function,Array],labelSize:String,activeName:[String,Number],onActiveNameChange:[Function,Array]}),iy=o.defineComponent({name:"Tabs",props:oy,setup(e,{slots:t}){var n,r,i,a;process.env.NODE_ENV!=="production"&&o.watchEffect(()=>{e.labelSize!==void 0&&ot("tabs","`label-size` is deprecated, please use `size` instead."),e.activeName!==void 0&&ot("tabs","`active-name` is deprecated, please use `value` instead."),e.onActiveNameChange!==void 0&&ot("tabs","`on-active-name-change` is deprecated, please use `on-update:value` instead.")});const{mergedClsPrefixRef:l,inlineThemeDisabled:s}=Ye(e),c=Ce("Tabs","-tabs",ry,Ox,e,l),d=o.ref(null),u=o.ref(null),f=o.ref(null),p=o.ref(null),b=o.ref(null),h=o.ref(null),x=o.ref(!0),v=o.ref(!0),g=Vr(e,["labelSize","size"]),k=Vr(e,["activeName","value"]),z=o.ref((r=(n=k.value)!==null&&n!==void 0?n:e.defaultValue)!==null&&r!==void 0?r:t.default?(a=(i=Fn(t.default())[0])===null||i===void 0?void 0:i.props)===null||a===void 0?void 0:a.name:null),$=St(k,z),T={id:0},O=o.computed(()=>{if(!(!e.justifyContent||e.type==="card"))return{display:"flex",justifyContent:e.justifyContent}});o.watch($,()=>{T.id=0,A(),L()});function m(){var _;const{value:D}=$;return D===null?null:(_=d.value)===null||_===void 0?void 0:_.querySelector(`[data-name="${D}"]`)}function S(_){if(e.type==="card")return;const{value:D}=u;if(!D)return;const K=D.style.opacity==="0";if(_){const R=`${l.value}-tabs-bar--disabled`,{barWidth:C,placement:B}=e;if(_.dataset.disabled==="true"?D.classList.add(R):D.classList.remove(R),["top","bottom"].includes(B)){if(N(["top","maxHeight","height"]),typeof C=="number"&&_.offsetWidth>=C){const re=Math.floor((_.offsetWidth-C)/2)+_.offsetLeft;D.style.left=`${re}px`,D.style.maxWidth=`${C}px`}else D.style.left=`${_.offsetLeft}px`,D.style.maxWidth=`${_.offsetWidth}px`;D.style.width="8192px",K&&(D.style.transition="none"),D.offsetWidth,K&&(D.style.transition="",D.style.opacity="1")}else{if(N(["left","maxWidth","width"]),typeof C=="number"&&_.offsetHeight>=C){const re=Math.floor((_.offsetHeight-C)/2)+_.offsetTop;D.style.top=`${re}px`,D.style.maxHeight=`${C}px`}else D.style.top=`${_.offsetTop}px`,D.style.maxHeight=`${_.offsetHeight}px`;D.style.height="8192px",K&&(D.style.transition="none"),D.offsetHeight,K&&(D.style.transition="",D.style.opacity="1")}}}function M(){if(e.type==="card")return;const{value:_}=u;_&&(_.style.opacity="0")}function N(_){const{value:D}=u;if(D)for(const K of _)D.style[K]=""}function A(){if(e.type==="card")return;const _=m();_?S(_):M()}function L(){var _;const D=(_=b.value)===null||_===void 0?void 0:_.$el;if(!D)return;const K=m();if(!K)return;const{scrollLeft:R,offsetWidth:C}=D,{offsetLeft:B,offsetWidth:re}=K;R>B?D.scrollTo({top:0,left:B,behavior:"smooth"}):B+re>R+C&&D.scrollTo({top:0,left:B+re-C,behavior:"smooth"})}const U=o.ref(null);let J=0,j=null;function Q(_){const D=U.value;if(D){J=_.getBoundingClientRect().height;const K=`${J}px`,R=()=>{D.style.height=K,D.style.maxHeight=K};j?(R(),j(),j=null):j=R}}function Y(_){const D=U.value;if(D){const K=_.getBoundingClientRect().height,R=()=>{document.body.offsetHeight,D.style.maxHeight=`${K}px`,D.style.height=`${Math.max(J,K)}px`};j?(j(),j=null,R()):j=R}}function ie(){const _=U.value;if(_){_.style.maxHeight="",_.style.height="";const{paneWrapperStyle:D}=e;if(typeof D=="string")_.style.cssText=D;else if(D){const{maxHeight:K,height:R}=D;K!==void 0&&(_.style.maxHeight=K),R!==void 0&&(_.style.height=R)}}}const me={value:[]},ae=o.ref("next");function he(_){const D=$.value;let K="next";for(const R of me.value){if(R===D)break;if(R===_){K="prev";break}}ae.value=K,G(_)}function G(_){const{onActiveNameChange:D,onUpdateValue:K,"onUpdate:value":R}=e;D&&de(D,_),K&&de(K,_),R&&de(R,_),z.value=_}function te(_){const{onClose:D}=e;D&&de(D,_)}function xe(){const{value:_}=u;if(!_)return;const D="transition-disabled";_.classList.add(D),A(),_.classList.remove(D)}const Se=o.ref(null);function oe({transitionDisabled:_}){const D=d.value;if(!D)return;_&&D.classList.add("transition-disabled");const K=m();K&&Se.value&&(Se.value.style.width=`${K.offsetWidth}px`,Se.value.style.height=`${K.offsetHeight}px`,Se.value.style.transform=`translateX(${K.offsetLeft-at(getComputedStyle(D).paddingLeft)}px)`,_&&Se.value.offsetWidth),_&&D.classList.remove("transition-disabled")}o.watch([$],()=>{e.type==="segment"&&o.nextTick(()=>{oe({transitionDisabled:!1})})}),o.onMounted(()=>{e.type==="segment"&&oe({transitionDisabled:!0})});let Te=0;function $e(_){var D;if(_.contentRect.width===0&&_.contentRect.height===0||Te===_.contentRect.width)return;Te=_.contentRect.width;const{type:K}=e;if((K==="line"||K==="bar")&&xe(),K!=="segment"){const{placement:R}=e;Le((R==="top"||R==="bottom"?(D=b.value)===null||D===void 0?void 0:D.$el:h.value)||null)}}const se=Mi($e,64);o.watch([()=>e.justifyContent,()=>e.size],()=>{o.nextTick(()=>{const{type:_}=e;(_==="line"||_==="bar")&&xe()})});const Ae=o.ref(!1);function Be(_){var D;const{target:K,contentRect:{width:R}}=_,C=K.parentElement.offsetWidth;if(!Ae.value)C<R&&(Ae.value=!0);else{const{value:B}=p;if(!B)return;C-R>B.$el.offsetWidth&&(Ae.value=!1)}Le(((D=b.value)===null||D===void 0?void 0:D.$el)||null)}const We=Mi(Be,64);function Ie(){const{onAdd:_}=e;_&&_(),o.nextTick(()=>{const D=m(),{value:K}=b;!D||!K||K.scrollTo({left:D.offsetLeft,top:0,behavior:"smooth"})})}function Le(_){if(!_)return;const{placement:D}=e;if(D==="top"||D==="bottom"){const{scrollLeft:K,scrollWidth:R,offsetWidth:C}=_;x.value=K<=0,v.value=K+C>=R}else{const{scrollTop:K,scrollHeight:R,offsetHeight:C}=_;x.value=K<=0,v.value=K+C>=R}}const Ke=Mi(_=>{Le(_.target)},64);o.provide(Qi,{triggerRef:o.toRef(e,"trigger"),tabStyleRef:o.toRef(e,"tabStyle"),tabClassRef:o.toRef(e,"tabClass"),addTabStyleRef:o.toRef(e,"addTabStyle"),addTabClassRef:o.toRef(e,"addTabClass"),paneClassRef:o.toRef(e,"paneClass"),paneStyleRef:o.toRef(e,"paneStyle"),mergedClsPrefixRef:l,typeRef:o.toRef(e,"type"),closableRef:o.toRef(e,"closable"),valueRef:$,tabChangeIdRef:T,onBeforeLeaveRef:o.toRef(e,"onBeforeLeave"),activateTab:he,handleClose:te,handleAdd:Ie}),qa(()=>{A(),L()}),o.watchEffect(()=>{const{value:_}=f;if(!_)return;const{value:D}=l,K=`${D}-tabs-nav-scroll-wrapper--shadow-start`,R=`${D}-tabs-nav-scroll-wrapper--shadow-end`;x.value?_.classList.remove(K):_.classList.add(K),v.value?_.classList.remove(R):_.classList.add(R)});const Re={syncBarPosition:()=>{A()}},X=()=>{oe({transitionDisabled:!0})},F=o.computed(()=>{const{value:_}=g,{type:D}=e,K={card:"Card",bar:"Bar",line:"Line",segment:"Segment"}[D],R=`${_}${K}`,{self:{barColor:C,closeIconColor:B,closeIconColorHover:re,closeIconColorPressed:we,tabColor:Pe,tabBorderColor:Ue,paneTextColor:De,tabFontWeight:Me,tabBorderRadius:Ze,tabFontWeightActive:ft,colorSegment:tt,fontWeightStrong:st,tabColorSegment:y,closeSize:H,closeIconSize:Z,closeColorHover:le,closeColorPressed:ce,closeBorderRadius:ue,[ee("panePadding",_)]:fe,[ee("tabPadding",R)]:ge,[ee("tabPaddingVertical",R)]:Ee,[ee("tabGap",R)]:mt,[ee("tabGap",`${R}Vertical`)]:on,[ee("tabTextColor",D)]:_n,[ee("tabTextColorActive",D)]:an,[ee("tabTextColorHover",D)]:ln,[ee("tabTextColorDisabled",D)]:Pr,[ee("tabFontSize",_)]:Er},common:{cubicBezierEaseInOut:Zn}}=c.value;return{"--n-bezier":Zn,"--n-color-segment":tt,"--n-bar-color":C,"--n-tab-font-size":Er,"--n-tab-text-color":_n,"--n-tab-text-color-active":an,"--n-tab-text-color-disabled":Pr,"--n-tab-text-color-hover":ln,"--n-pane-text-color":De,"--n-tab-border-color":Ue,"--n-tab-border-radius":Ze,"--n-close-size":H,"--n-close-icon-size":Z,"--n-close-color-hover":le,"--n-close-color-pressed":ce,"--n-close-border-radius":ue,"--n-close-icon-color":B,"--n-close-icon-color-hover":re,"--n-close-icon-color-pressed":we,"--n-tab-color":Pe,"--n-tab-font-weight":Me,"--n-tab-font-weight-active":ft,"--n-tab-padding":ge,"--n-tab-padding-vertical":Ee,"--n-tab-gap":mt,"--n-tab-gap-vertical":on,"--n-pane-padding-left":ht(fe,"left"),"--n-pane-padding-right":ht(fe,"right"),"--n-pane-padding-top":ht(fe,"top"),"--n-pane-padding-bottom":ht(fe,"bottom"),"--n-font-weight-strong":st,"--n-tab-color-segment":y}}),ne=s?rt("tabs",o.computed(()=>`${g.value[0]}${e.type[0]}`),F,e):void 0;return Object.assign({mergedClsPrefix:l,mergedValue:$,renderedNames:new Set,segmentCapsuleElRef:Se,tabsPaneWrapperRef:U,tabsElRef:d,barElRef:u,addTabInstRef:p,xScrollInstRef:b,scrollWrapperElRef:f,addTabFixed:Ae,tabWrapperStyle:O,handleNavResize:se,mergedSize:g,handleScroll:Ke,handleTabsResize:We,cssVars:s?void 0:F,themeClass:ne==null?void 0:ne.themeClass,animationDirection:ae,renderNameListRef:me,yScrollElRef:h,handleSegmentResize:X,onAnimationBeforeLeave:Q,onAnimationEnter:Y,onAnimationAfterEnter:ie,onRender:ne==null?void 0:ne.onRender},Re)},render(){const{mergedClsPrefix:e,type:t,placement:n,addTabFixed:r,addable:i,mergedSize:a,renderNameListRef:l,onRender:s,paneWrapperClass:c,paneWrapperStyle:d,$slots:{default:u,prefix:f,suffix:p}}=this;s==null||s();const b=u?Fn(u()).filter(T=>T.type.__TAB_PANE__===!0):[],h=u?Fn(u()).filter(T=>T.type.__TAB__===!0):[],x=!h.length,v=t==="card",g=t==="segment",k=!v&&!g&&this.justifyContent;l.value=[];const z=()=>{const T=o.h("div",{style:this.tabWrapperStyle,class:[`${e}-tabs-wrapper`]},k?null:o.h("div",{class:`${e}-tabs-scroll-padding`,style:{width:`${this.tabsPadding}px`}}),x?b.map((O,m)=>(l.value.push(O.props.name),ta(o.h(ea,Object.assign({},O.props,{internalCreatedByPane:!0,internalLeftPadded:m!==0&&(!k||k==="center"||k==="start"||k==="end")}),O.children?{default:O.children.tab}:void 0)))):h.map((O,m)=>(l.value.push(O.props.name),ta(m!==0&&!k?Cc(O):O))),!r&&i&&v?wc(i,(x?b.length:h.length)!==0):null,k?null:o.h("div",{class:`${e}-tabs-scroll-padding`,style:{width:`${this.tabsPadding}px`}}));return o.h("div",{ref:"tabsElRef",class:`${e}-tabs-nav-scroll-content`},v&&i?o.h(Zt,{onResize:this.handleTabsResize},{default:()=>T}):T,v?o.h("div",{class:`${e}-tabs-pad`}):null,v?null:o.h("div",{ref:"barElRef",class:`${e}-tabs-bar`}))},$=g?"top":n;return o.h("div",{class:[`${e}-tabs`,this.themeClass,`${e}-tabs--${t}-type`,`${e}-tabs--${a}-size`,k&&`${e}-tabs--flex`,`${e}-tabs--${$}`],style:this.cssVars},o.h("div",{class:[`${e}-tabs-nav--${t}-type`,`${e}-tabs-nav--${$}`,`${e}-tabs-nav`]},Fe(f,T=>T&&o.h("div",{class:`${e}-tabs-nav__prefix`},T)),g?o.h(Zt,{onResize:this.handleSegmentResize},{default:()=>o.h("div",{class:`${e}-tabs-rail`,ref:"tabsElRef"},o.h("div",{class:`${e}-tabs-capsule`,ref:"segmentCapsuleElRef"},o.h("div",{class:`${e}-tabs-wrapper`},o.h("div",{class:`${e}-tabs-tab`}))),x?b.map((T,O)=>(l.value.push(T.props.name),o.h(ea,Object.assign({},T.props,{internalCreatedByPane:!0,internalLeftPadded:O!==0}),T.children?{default:T.children.tab}:void 0))):h.map((T,O)=>(l.value.push(T.props.name),O===0?T:Cc(T))))}):o.h(Zt,{onResize:this.handleNavResize},{default:()=>o.h("div",{class:`${e}-tabs-nav-scroll-wrapper`,ref:"scrollWrapperElRef"},["top","bottom"].includes($)?o.h(cf,{ref:"xScrollInstRef",onScroll:this.handleScroll},{default:z}):o.h("div",{class:`${e}-tabs-nav-y-scroll`,onScroll:this.handleScroll,ref:"yScrollElRef"},z()))}),r&&i&&v?wc(i,!0):null,Fe(p,T=>T&&o.h("div",{class:`${e}-tabs-nav__suffix`},T))),x&&(this.animated&&($==="top"||$==="bottom")?o.h("div",{ref:"tabsPaneWrapperRef",style:d,class:[`${e}-tabs-pane-wrapper`,c]},yc(b,this.mergedValue,this.renderedNames,this.onAnimationBeforeLeave,this.onAnimationEnter,this.onAnimationAfterEnter,this.animationDirection)):yc(b,this.mergedValue,this.renderedNames)))}});function yc(e,t,n,r,i,a,l){const s=[];return e.forEach(c=>{const{name:d,displayDirective:u,"display-directive":f}=c.props,p=h=>u===h||f===h,b=t===d;if(c.key!==void 0&&(c.key=d),b||p("show")||p("show:lazy")&&n.has(d)){n.has(d)||n.add(d);const h=!p("if");s.push(h?o.withDirectives(c,[[o.vShow,b]]):c)}}),l?o.h(o.TransitionGroup,{name:`${l}-transition`,onBeforeLeave:r,onEnter:i,onAfterEnter:a},{default:()=>s}):s}function wc(e,t){return o.h(ea,{ref:"addTabInstRef",key:"__addable",name:"__addable",internalCreatedByPane:!0,internalAddable:!0,internalLeftPadded:t,disabled:typeof e=="object"&&e.disabled})}function Cc(e){const t=o.cloneVNode(e);return t.props?t.props.internalLeftPadded=!0:t.props={internalLeftPadded:!0},t}function ta(e){return Array.isArray(e.dynamicProps)?e.dynamicProps.includes("internalLeftPadded")||e.dynamicProps.push("internalLeftPadded"):e.dynamicProps=["internalLeftPadded"],e}async function ay(e,t,n){try{const{data:r}=await cn().POST("/api/visualizations",{type:e,title:t,config:n});return r.id}catch(r){Br(r)}}async function ly(e,t,n){try{return(await cn().PUT(`/api/visualizations/${e}`,{title:t,config:n})).data}catch(r){Br(r)}}function Sc(e){let t={};return e&&e.forEach(n=>{n.name?t[n.name]=n.value||null:console.debug("Warning: Detected input element with no name.")}),t}const sy={key:0,class:"border border-dotted border-green-600 rounded mt-2 p-2"},cy={__name:"InputConditional",props:o.mergeModels({datasetId:{type:String,required:!0},input:{type:Object,required:!0}},{value:{},valueModifiers:{}}),emits:["update:value"],setup(e){const t=e,n=t.input.test_param.name;n||console.error(`Test parameter has no name: ${t.input.name}.`);const r=o.useModel(e,"value");(!r.value||!(n in r.value))&&console.error(`Test parameter of conditional not available: ${t.input.name}.`,r.value);const i=o.ref(r.value[n]),a={},l={};for(const c of t.input.cases)a[c.value]=c.inputs,l[c.value]=Sc(c.inputs),l[c.value][n]=c.value;function s(c){r.value={...l[i.value]},c&&(r.value={...r.value,...c})}return o.watch(()=>i.value,()=>{s()}),(c,d)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createVNode(o.unref(yo),{value:i.value,"onUpdate:value":d[0]||(d[0]=u=>i.value=u),options:e.input.test_param.data},null,8,["value","options"]),a[i.value]?(o.openBlock(),o.createElementBlock("div",sy,[o.createVNode(na,{"dataset-id":e.datasetId,inputs:a[i.value],values:r.value,"onUpdate:values":s},null,8,["dataset-id","inputs","values"])])):o.createCommentVNode("",!0)],64))}},dy={key:0,class:"mb-1"},uy={key:1,class:"text-red-600 mb-1"},fy=o.createElementVNode("span",null,"Please select a dataset.",-1),hy=100,py={__name:"InputData",props:o.mergeModels({extension:{type:String,default:""},optional:{type:Boolean,default:!1}},{value:{},valueModifiers:{}}),emits:["update:value"],setup(e){const t=e,n=o.ref([]),r=o.useModel(e,"value"),i=o.ref(!1),a=o.ref(null);async function l(c){i.value=!0;try{const d=t.extension?`q=extension-eq&qv=${t.extension}`:"",u=c?`q=name-contains&qv=${c}`:"",{data:f}=await cn().GET(`/api/datasets?limit=${hy}&${d}&${u}`);if(f&&f.length>0){const p=f.map(b=>({label:b.name,value:b}));p.push({label:"...filter for more",value:null,disabled:!0}),t.optional&&p.unshift({label:"-- Clear Selection --",value:null}),n.value=p}i.value=!1}catch(d){console.log(d)}}function s(){r.value=a.value,a.value=null}return l(),(c,d)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[r.value?(o.openBlock(),o.createElementBlock("div",dy,[o.createVNode(o.unref(Tt),{class:"size-3 mr-1"},{default:o.withCtx(()=>[o.createVNode(o.unref(Pa))]),_:1}),o.createElementVNode("span",null,"Selected: "+o.toDisplayString(r.value.name),1)])):e.optional?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",uy,[o.createVNode(o.unref(Tt),{class:"size-3 mr-1"},{default:o.withCtx(()=>[o.createVNode(o.unref(Ea))]),_:1}),fy])),o.createVNode(o.unref(yo),{value:a.value,"onUpdate:value":[d[0]||(d[0]=u=>a.value=u),s],filterable:"",placeholder:"Select a Dataset",loading:i.value,options:n.value,onSearch:l},null,8,["value","loading","options"])],64))}};function by(e,t,n,r){const i=[];t&&i.push({label:"Column: Default",value:"auto"});var a=e.metadata_column_types;for(const l in a)(r&&["int","float"].indexOf(a[l])!=-1||n&&a[l]==="str"||!r&&!n)&&i.push({label:"Column: "+(parseInt(l)+1),value:l});return i}const my={__name:"InputDataColumn",props:o.mergeModels({datasetId:{type:String,default:""},isAuto:{type:Boolean,default:!1},isText:{type:Boolean,default:!1},isNumber:{type:Boolean,default:!1}},{value:{},valueModifiers:{}}),emits:["update:value"],setup(e){const t=e,n=o.ref([]),r=o.useModel(e,"value");async function i(){if(t.datasetId)try{const{data:l}=await cn().GET(`/api/datasets/${t.datasetId}`),s=by(l,t.isAuto,t.isText,t.isNumber);n.value=s,a()}catch(l){console.log(l)}else console.log("Data column input disabled, since `datasetId` is unavailable.")}function a(){n.value.length>0&&r.value===null&&(r.value=n.value[0].value)}return i(),o.watch(()=>r.value,()=>a()),(l,s)=>(o.openBlock(),o.createBlock(o.unref(yo),{value:r.value,"onUpdate:value":s[0]||(s[0]=c=>r.value=c),options:n.value},null,8,["value","options"]))}};function wo(e){return String(e).toLowerCase()==="true"}const gy={class:"overflow-auto select-none"},vy={class:"font-bold pb-1"},xy={key:0,class:"text-xs pb-1"},yy={key:5},$c=.01,na={__name:"InputForm",props:{datasetId:{type:String,default:""},inputs:{type:Array,default:()=>[]},values:{type:Object,default:()=>{}}},emits:["update:values"],setup(e,{emit:t}){const n=e,r=o.ref(a()),i=t;function a(){const s={...n.values};return n.inputs.forEach(c=>{s[c.name]===void 0&&(s[c.name]=null)}),s}function l(){i("update:values",r.value)}return o.watch(()=>n.values,()=>{r.value=a()}),(s,c)=>(o.openBlock(),o.createElementBlock("div",gy,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.inputs,(d,u)=>(o.openBlock(),o.createElementBlock("div",{key:u,class:"pb-2"},[o.createElementVNode("div",vy,o.toDisplayString(d.label||d.name),1),d.help?(o.openBlock(),o.createElementBlock("div",xy,o.toDisplayString(d.help),1)):o.createCommentVNode("",!0),o.createElementVNode("div",null,[d.type==="boolean"?(o.openBlock(),o.createBlock(o.unref(ty),{key:0,value:r.value[d.name],"onUpdate:value":[f=>r.value[d.name]=f,c[0]||(c[0]=f=>l())]},null,8,["value","onUpdate:value"])):d.type==="color"?(o.openBlock(),o.createBlock(o.unref(ux),{key:1,value:r.value[d.name],"onUpdate:value":[f=>r.value[d.name]=f,c[1]||(c[1]=f=>l())],modes:["hex"],"show-alpha":!1},null,8,["value","onUpdate:value"])):d.type==="conditional"?(o.openBlock(),o.createBlock(cy,{key:2,value:r.value[d.name],"onUpdate:value":[f=>r.value[d.name]=f,c[2]||(c[2]=f=>l())],"dataset-id":e.datasetId,input:d},null,8,["value","onUpdate:value","dataset-id","input"])):d.type==="data"?(o.openBlock(),o.createBlock(py,{key:3,value:r.value[d.name],"onUpdate:value":[f=>r.value[d.name]=f,c[3]||(c[3]=f=>l())],extension:d.extension,optional:o.unref(wo)(d.optional)},null,8,["value","onUpdate:value","extension","optional"])):d.type==="data_column"?(o.openBlock(),o.createBlock(my,{key:4,value:r.value[d.name],"onUpdate:value":[f=>r.value[d.name]=f,c[4]||(c[4]=f=>l())],"dataset-id":e.datasetId,"is-auto":o.unref(wo)(d.is_auto),"is-text":o.unref(wo)(d.is_text),"is-number":o.unref(wo)(d.is_number)},null,8,["value","onUpdate:value","dataset-id","is-auto","is-text","is-number"])):d.type==="float"?(o.openBlock(),o.createElementBlock("div",yy,[d.min!==void 0&&d.max!==void 0?(o.openBlock(),o.createBlock(o.unref(Jx),{key:0,class:"mb-2",value:r.value[d.name],"onUpdate:value":[f=>r.value[d.name]=f,c[5]||(c[5]=f=>l())],min:Number(d.min),max:Number(d.max),step:$c},null,8,["value","onUpdate:value","min","max"])):o.createCommentVNode("",!0),o.createVNode(o.unref(Kx),{value:r.value[d.name],"onUpdate:value":[f=>r.value[d.name]=f,c[6]||(c[6]=f=>l())],size:"small",min:Number(d.min),max:Number(d.max),step:$c},null,8,["value","onUpdate:value","min","max"])])):d.type==="select"?(o.openBlock(),o.createBlock(o.unref(yo),{key:6,value:r.value[d.name],"onUpdate:value":[f=>r.value[d.name]=f,c[7]||(c[7]=f=>l())],options:d.data},null,8,["value","onUpdate:value","options"])):d.type==="textarea"?(o.openBlock(),o.createBlock(o.unref(yr),{key:7,value:r.value[d.name],"onUpdate:value":[f=>r.value[d.name]=f,c[8]||(c[8]=f=>l())],rows:Number(d.rows),type:"textarea"},null,8,["value","onUpdate:value","rows"])):(o.openBlock(),o.createBlock(o.unref(yr),{key:8,value:r.value[d.name],"onUpdate:value":[f=>r.value[d.name]=f,c[9]||(c[9]=f=>l())]},null,8,["value","onUpdate:value"]))])]))),128))]))}},wy=o.createElementVNode("span",{class:"mx-1"},"Add New Track",-1),Cy={class:"border border-dotted border-green-600 rounded p-2"},Sy={class:"flex text-green-600 my-1"},$y={class:"mx-1"},Ty={__name:"InputRepeats",props:{datasetId:{type:String,default:""},inputs:{type:Array,required:!0},valuesArray:{type:Array,required:!0}},emits:["update:values-array"],setup(e,{emit:t}){const n=e,r=t,i=o.computed(()=>Sc(n.inputs));function a(){const c=[...n.valuesArray];c.unshift(i.value),r("update:values-array",c)}function l(c){const d=[...n.valuesArray];d.splice(c,1),r("update:values-array",d)}function s(c,d){const u=[...n.valuesArray];u[c]={...d},r("update:values-array",u)}return(c,d)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createVNode(o.unref(Ht),{size:"tiny",type:"primary",class:"mb-2",onClick:a},{default:o.withCtx(()=>[o.createVNode(o.unref(Tt),null,{default:o.withCtx(()=>[o.createVNode(o.unref(yd))]),_:1}),wy]),_:1}),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.valuesArray,(u,f)=>(o.openBlock(),o.createElementBlock("div",{key:f,class:"my-2"},[o.createElementVNode("div",Cy,[o.createVNode(na,{"dataset-id":e.datasetId,inputs:e.inputs,values:u,"onUpdate:values":p=>s(f,p)},null,8,["dataset-id","inputs","values","onUpdate:values"]),o.createElementVNode("div",Sy,[o.createVNode(o.unref(Ht),{class:"text-green-600 w-full",size:"tiny",round:"",disabled:e.valuesArray.length<=1,onClick:p=>l(f)},{default:o.withCtx(()=>[o.createVNode(o.unref(Tt),null,{default:o.withCtx(()=>[o.createVNode(o.unref(Cd))]),_:1}),o.createElementVNode("span",$y,"Remove Track "+o.toDisplayString(e.valuesArray.length-f),1)]),_:2},1032,["disabled","onClick"])])])]))),128))],64))}},ky=2e3,Ry=o.defineComponent({__name:"AlertNotify",props:{message:{},messageType:{default:"info"}},emits:["timeout"],setup(e,{emit:t}){const n=e,r=t;let i=null;return o.watch(()=>n.message,()=>{i&&clearTimeout(i),i=setTimeout(()=>r("timeout"),ky)}),(a,l)=>a.message?(o.openBlock(),o.createBlock(o.unref(rc),{key:0,type:a.messageType,class:"m-4"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(a.message),1)]),_:1},8,["type"])):o.createCommentVNode("",!0)}}),Py={class:"text-xs"},Ey=o.createElementVNode("span",{class:"text-xs"},"Galaxy is not accessible, review `server.config.js`.",-1),zy={__name:"ApiStatus",props:{},setup(e){const t=o.ref("...");async function n(){try{const{data:r}=await cn().GET("/api/version");t.value=r.version_major}catch{console.log("Unable to connect to Galaxy. Verify Galaxy is running and properly configured in 'server.config.js'."),t.value=""}}return n(),(r,i)=>t.value?(o.openBlock(),o.createBlock(o.unref(uc),{key:0,class:"mx-1",trigger:"hover"},{trigger:o.withCtx(()=>[o.createVNode(o.unref(Tt),{class:"mx-1"},{default:o.withCtx(()=>[o.createVNode(o.unref(Pa),{class:"text-green-600"})]),_:1})]),default:o.withCtx(()=>[o.createElementVNode("span",Py,"Connected to Galaxy Version "+o.toDisplayString(t.value)+".",1)]),_:1})):(o.openBlock(),o.createBlock(o.unref(uc),{key:1,class:"mx-1",trigger:"hover"},{trigger:o.withCtx(()=>[o.createVNode(o.unref(Tt),{class:"mx-1"},{default:o.withCtx(()=>[o.createVNode(o.unref(Ea),{class:"text-red-600"})]),_:1})]),default:o.withCtx(()=>[Ey]),_:1}))}},By={class:"overflow-auto select-none bg-white z-10"},_y={class:"flex p-2"},My={class:"flex-1 font-thin text-lg p-1 p-2"},Oy=o.createElementVNode("span",null,"Charts",-1),Ay={class:"m-4 mt-0 p-2 bg-sky-50 text-sky-900 rounded"},Iy={class:"md:flex"},Fy={class:"flex justify-center center-items"},Dy={class:"m-2"},Ny=["src"],Ly={key:1,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 100 100",class:"size-14"},Hy=[o.createElementVNode("circle",{cx:"50",cy:"50",r:"45",stroke:"#E30A17","stroke-width":"5",fill:"#FFFFFF"},null,-1),o.createElementVNode("path",{d:"M 50,5 A 45,45 0 0,1 95,50 L 50,50 Z",fill:"#E30A17"},null,-1)],Vy={class:"overflow-hidden break-words p-1"},jy={class:"font-bold"},Wy=["innerHTML"],Uy={class:"px-4 pb-2"},Gy=o.createElementVNode("div",{class:"font-bold"},"Title",-1),qy=o.createElementVNode("div",{class:"text-xs py-1"},"Specify a visualization title.",-1),Ky=o.createElementVNode("span",{class:"mx-1"},"Tracks",-1),Xy=o.createElementVNode("span",{class:"mx-1"},"Settings",-1),Yy={__name:"SidePanel",props:{datasetId:{type:String,default:""},description:{type:String,default:"This visualization has no description."},logoUrl:{type:String,default:""},html:{type:String,default:"Visualization Title"},name:{type:String,required:!0},settingInputs:{type:Array,default:()=>[]},settingValues:{type:Object,default:()=>{}},trackInputs:{type:Array,default:()=>[]},trackValues:{type:Object,default:()=>[]},visualizationId:{type:String,default:null},visualizationTitle:{type:String,required:!0}},emits:["update:tracks","update:settings","toggle"],setup(e,{emit:t}){const n=e,r=o.ref(n.visualizationTitle),i=o.ref(n.visualizationId),a=o.ref(""),l=o.ref(""),s=o.computed(()=>n.settingInputs.length===0||n.trackInputs.length===0),c=t;async function d(){try{i.value?(await ly(i.value,r.value,{dataset_id:n.datasetId,settings:n.values}),a.value="Successfully saved.",l.value="success"):(i.value=await ay(n.name,r.value,{dataset_id:n.datasetId,settings:n.values}),a.value="Successfully created.",l.value="success")}catch(p){a.value=$a(p),l.value="error"}}function u(p){c("update:settings",p)}function f(p){c("update:tracks",p)}return(p,b)=>(o.openBlock(),o.createElementBlock("div",By,[o.createElementVNode("div",_y,[o.createElementVNode("div",My,[Oy,o.createVNode(zy)]),o.createElementVNode("div",null,[o.createVNode(o.unref(Ht),{strong:"",secondary:"",circle:"",class:"bg-sky-100 m-1",onClick:d},{icon:o.withCtx(()=>[o.createVNode(o.unref(Tt),null,{default:o.withCtx(()=>[o.createVNode(o.unref(xd))]),_:1})]),_:1}),o.createVNode(o.unref(Ht),{strong:"",secondary:"",circle:"",class:"bg-sky-100 m-1",onClick:b[0]||(b[0]=h=>c("toggle"))},{icon:o.withCtx(()=>[o.createVNode(o.unref(Tt),null,{default:o.withCtx(()=>[o.createVNode(o.unref(vd))]),_:1})]),_:1})])]),o.createVNode(Ry,{message:a.value,"message-type":l.value,onTimeout:b[1]||(b[1]=h=>a.value=""),class:"m-4"},null,8,["message","message-type"]),o.createElementVNode("div",Ay,[o.createElementVNode("div",Iy,[o.createElementVNode("div",Fy,[o.createElementVNode("div",Dy,[n.logoUrl?(o.openBlock(),o.createElementBlock("img",{key:0,src:n.logoUrl,class:"min-w-14 max-w-14 object-contain"},null,8,Ny)):(o.openBlock(),o.createElementBlock("svg",Ly,Hy))])]),o.createElementVNode("div",Vy,[o.createElementVNode("span",jy,o.toDisplayString(e.html),1),o.createElementVNode("div",{class:"text-xs",innerHTML:e.description},null,8,Wy)])])]),o.createElementVNode("div",Uy,[Gy,qy,o.createVNode(o.unref(yr),{value:r.value,"onUpdate:value":b[2]||(b[2]=h=>r.value=h)},null,8,["value"])]),o.createVNode(o.unref(iy),{type:"line",animated:"",class:"px-4","tab-class":s.value?"!hidden":""},{default:o.withCtx(()=>[e.trackInputs.length>0?(o.openBlock(),o.createBlock(o.unref(xc),{key:0,name:"tracks"},{tab:o.withCtx(()=>[o.createVNode(o.unref(Tt),null,{default:o.withCtx(()=>[o.createVNode(o.unref(wd))]),_:1}),Ky]),default:o.withCtx(()=>[o.createVNode(Ty,{"dataset-id":e.datasetId,inputs:e.trackInputs,"values-array":e.trackValues,"onUpdate:valuesArray":f},null,8,["dataset-id","inputs","values-array"])]),_:1})):o.createCommentVNode("",!0),e.settingInputs.length>0?(o.openBlock(),o.createBlock(o.unref(xc),{key:1,name:"settings"},{tab:o.withCtx(()=>[o.createVNode(o.unref(Tt),null,{default:o.withCtx(()=>[o.createVNode(o.unref(bd))]),_:1}),Xy]),default:o.withCtx(()=>[o.createVNode(na,{"dataset-id":e.datasetId,inputs:e.settingInputs,values:e.settingValues,"onUpdate:values":u},null,8,["dataset-id","inputs","values"])]),_:1})):o.createCommentVNode("",!0)]),_:1},8,["tab-class"])]))}};function Tc(e,t){return function(){return e.apply(t,arguments)}}const{toString:Zy}=Object.prototype,{getPrototypeOf:ra}=Object,Co=(e=>t=>{const n=Zy.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),kt=e=>(e=e.toLowerCase(),t=>Co(t)===e),So=e=>t=>typeof t===e,{isArray:Xn}=Array,$r=So("undefined");function Jy(e){return e!==null&&!$r(e)&&e.constructor!==null&&!$r(e.constructor)&&bt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const kc=kt("ArrayBuffer");function Qy(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&kc(e.buffer),t}const ew=So("string"),bt=So("function"),Rc=So("number"),$o=e=>e!==null&&typeof e=="object",tw=e=>e===!0||e===!1,To=e=>{if(Co(e)!=="object")return!1;const t=ra(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},nw=kt("Date"),rw=kt("File"),ow=kt("Blob"),iw=kt("FileList"),aw=e=>$o(e)&&bt(e.pipe),lw=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||bt(e.append)&&((t=Co(e))==="formdata"||t==="object"&&bt(e.toString)&&e.toString()==="[object FormData]"))},sw=kt("URLSearchParams"),[cw,dw,uw,fw]=["ReadableStream","Request","Response","Headers"].map(kt),hw=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Tr(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),Xn(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{const a=n?Object.getOwnPropertyNames(e):Object.keys(e),l=a.length;let s;for(r=0;r<l;r++)s=a[r],t.call(null,e[s],s,e)}}function Pc(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}const En=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Ec=e=>!$r(e)&&e!==En;function oa(){const{caseless:e}=Ec(this)&&this||{},t={},n=(r,i)=>{const a=e&&Pc(t,i)||i;To(t[a])&&To(r)?t[a]=oa(t[a],r):To(r)?t[a]=oa({},r):Xn(r)?t[a]=r.slice():t[a]=r};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&Tr(arguments[r],n);return t}const pw=(e,t,n,{allOwnKeys:r}={})=>(Tr(t,(i,a)=>{n&&bt(i)?e[a]=Tc(i,n):e[a]=i},{allOwnKeys:r}),e),bw=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),mw=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},gw=(e,t,n,r)=>{let i,a,l;const s={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-- >0;)l=i[a],(!r||r(l,e,t))&&!s[l]&&(t[l]=e[l],s[l]=!0);e=n!==!1&&ra(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},vw=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},xw=e=>{if(!e)return null;if(Xn(e))return e;let t=e.length;if(!Rc(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},yw=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&ra(Uint8Array)),ww=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let i;for(;(i=r.next())&&!i.done;){const a=i.value;t.call(e,a[0],a[1])}},Cw=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Sw=kt("HTMLFormElement"),$w=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),zc=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Tw=kt("RegExp"),Bc=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Tr(n,(i,a)=>{let l;(l=t(i,a,e))!==!1&&(r[a]=l||i)}),Object.defineProperties(e,r)},kw=e=>{Bc(e,(t,n)=>{if(bt(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(bt(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Rw=(e,t)=>{const n={},r=i=>{i.forEach(a=>{n[a]=!0})};return Xn(e)?r(e):r(String(e).split(t)),n},Pw=()=>{},Ew=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,ia="abcdefghijklmnopqrstuvwxyz",_c="0123456789",Mc={DIGIT:_c,ALPHA:ia,ALPHA_DIGIT:ia+ia.toUpperCase()+_c},zw=(e=16,t=Mc.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function Bw(e){return!!(e&&bt(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const _w=e=>{const t=new Array(10),n=(r,i)=>{if($o(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;const a=Xn(r)?[]:{};return Tr(r,(l,s)=>{const c=n(l,i+1);!$r(c)&&(a[s]=c)}),t[i]=void 0,a}}return r};return n(e,0)},Mw=kt("AsyncFunction"),Ow=e=>e&&($o(e)||bt(e))&&bt(e.then)&&bt(e.catch),Oc=((e,t)=>e?setImmediate:t?((n,r)=>(En.addEventListener("message",({source:i,data:a})=>{i===En&&a===n&&r.length&&r.shift()()},!1),i=>{r.push(i),En.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",bt(En.postMessage)),Aw=typeof queueMicrotask<"u"?queueMicrotask.bind(En):typeof process<"u"&&process.nextTick||Oc,V={isArray:Xn,isArrayBuffer:kc,isBuffer:Jy,isFormData:lw,isArrayBufferView:Qy,isString:ew,isNumber:Rc,isBoolean:tw,isObject:$o,isPlainObject:To,isReadableStream:cw,isRequest:dw,isResponse:uw,isHeaders:fw,isUndefined:$r,isDate:nw,isFile:rw,isBlob:ow,isRegExp:Tw,isFunction:bt,isStream:aw,isURLSearchParams:sw,isTypedArray:yw,isFileList:iw,forEach:Tr,merge:oa,extend:pw,trim:hw,stripBOM:bw,inherits:mw,toFlatObject:gw,kindOf:Co,kindOfTest:kt,endsWith:vw,toArray:xw,forEachEntry:ww,matchAll:Cw,isHTMLForm:Sw,hasOwnProperty:zc,hasOwnProp:zc,reduceDescriptors:Bc,freezeMethods:kw,toObjectSet:Rw,toCamelCase:$w,noop:Pw,toFiniteNumber:Ew,findKey:Pc,global:En,isContextDefined:Ec,ALPHABET:Mc,generateString:zw,isSpecCompliantForm:Bw,toJSONObject:_w,isAsyncFn:Mw,isThenable:Ow,setImmediate:Oc,asap:Aw};function ye(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i)}V.inherits(ye,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:V.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Ac=ye.prototype,Ic={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Ic[e]={value:e}}),Object.defineProperties(ye,Ic),Object.defineProperty(Ac,"isAxiosError",{value:!0}),ye.from=(e,t,n,r,i,a)=>{const l=Object.create(Ac);return V.toFlatObject(e,l,function(c){return c!==Error.prototype},s=>s!=="isAxiosError"),ye.call(l,e.message,t,n,r,i),l.cause=e,l.name=e.name,a&&Object.assign(l,a),l};const Iw=null;function aa(e){return V.isPlainObject(e)||V.isArray(e)}function Fc(e){return V.endsWith(e,"[]")?e.slice(0,-2):e}function Dc(e,t,n){return e?e.concat(t).map(function(i,a){return i=Fc(i),!n&&a?"["+i+"]":i}).join(n?".":""):t}function Fw(e){return V.isArray(e)&&!e.some(aa)}const Dw=V.toFlatObject(V,{},null,function(t){return/^is[A-Z]/.test(t)});function ko(e,t,n){if(!V.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=V.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(x,v){return!V.isUndefined(v[x])});const r=n.metaTokens,i=n.visitor||u,a=n.dots,l=n.indexes,c=(n.Blob||typeof Blob<"u"&&Blob)&&V.isSpecCompliantForm(t);if(!V.isFunction(i))throw new TypeError("visitor must be a function");function d(h){if(h===null)return"";if(V.isDate(h))return h.toISOString();if(!c&&V.isBlob(h))throw new ye("Blob is not supported. Use a Buffer instead.");return V.isArrayBuffer(h)||V.isTypedArray(h)?c&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function u(h,x,v){let g=h;if(h&&!v&&typeof h=="object"){if(V.endsWith(x,"{}"))x=r?x:x.slice(0,-2),h=JSON.stringify(h);else if(V.isArray(h)&&Fw(h)||(V.isFileList(h)||V.endsWith(x,"[]"))&&(g=V.toArray(h)))return x=Fc(x),g.forEach(function(z,$){!(V.isUndefined(z)||z===null)&&t.append(l===!0?Dc([x],$,a):l===null?x:x+"[]",d(z))}),!1}return aa(h)?!0:(t.append(Dc(v,x,a),d(h)),!1)}const f=[],p=Object.assign(Dw,{defaultVisitor:u,convertValue:d,isVisitable:aa});function b(h,x){if(!V.isUndefined(h)){if(f.indexOf(h)!==-1)throw Error("Circular reference detected in "+x.join("."));f.push(h),V.forEach(h,function(g,k){(!(V.isUndefined(g)||g===null)&&i.call(t,g,V.isString(k)?k.trim():k,x,p))===!0&&b(g,x?x.concat(k):[k])}),f.pop()}}if(!V.isObject(e))throw new TypeError("data must be an object");return b(e),t}function Nc(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function la(e,t){this._pairs=[],e&&ko(e,this,t)}const Lc=la.prototype;Lc.append=function(t,n){this._pairs.push([t,n])},Lc.toString=function(t){const n=t?function(r){return t.call(this,r,Nc)}:Nc;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function Nw(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Hc(e,t,n){if(!t)return e;const r=n&&n.encode||Nw,i=n&&n.serialize;let a;if(i?a=i(t,n):a=V.isURLSearchParams(t)?t.toString():new la(t,n).toString(r),a){const l=e.indexOf("#");l!==-1&&(e=e.slice(0,l)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class Vc{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){V.forEach(this.handlers,function(r){r!==null&&t(r)})}}const jc={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Lw={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:la,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},sa=typeof window<"u"&&typeof document<"u",Hw=(e=>sa&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),Vw=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",jw=sa&&window.location.href||"http://localhost",Rt={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:sa,hasStandardBrowserEnv:Hw,hasStandardBrowserWebWorkerEnv:Vw,origin:jw},Symbol.toStringTag,{value:"Module"})),...Lw};function Ww(e,t){return ko(e,new Rt.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,a){return Rt.isNode&&V.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function Uw(e){return V.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Gw(e){const t={},n=Object.keys(e);let r;const i=n.length;let a;for(r=0;r<i;r++)a=n[r],t[a]=e[a];return t}function Wc(e){function t(n,r,i,a){let l=n[a++];if(l==="__proto__")return!0;const s=Number.isFinite(+l),c=a>=n.length;return l=!l&&V.isArray(i)?i.length:l,c?(V.hasOwnProp(i,l)?i[l]=[i[l],r]:i[l]=r,!s):((!i[l]||!V.isObject(i[l]))&&(i[l]=[]),t(n,r,i[l],a)&&V.isArray(i[l])&&(i[l]=Gw(i[l])),!s)}if(V.isFormData(e)&&V.isFunction(e.entries)){const n={};return V.forEachEntry(e,(r,i)=>{t(Uw(r),i,n,0)}),n}return null}function qw(e,t,n){if(V.isString(e))try{return(t||JSON.parse)(e),V.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(0,JSON.stringify)(e)}const kr={transitional:jc,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,a=V.isObject(t);if(a&&V.isHTMLForm(t)&&(t=new FormData(t)),V.isFormData(t))return i?JSON.stringify(Wc(t)):t;if(V.isArrayBuffer(t)||V.isBuffer(t)||V.isStream(t)||V.isFile(t)||V.isBlob(t)||V.isReadableStream(t))return t;if(V.isArrayBufferView(t))return t.buffer;if(V.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(a){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Ww(t,this.formSerializer).toString();if((s=V.isFileList(t))||r.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return ko(s?{"files[]":t}:t,c&&new c,this.formSerializer)}}return a||i?(n.setContentType("application/json",!1),qw(t)):t}],transformResponse:[function(t){const n=this.transitional||kr.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(V.isResponse(t)||V.isReadableStream(t))return t;if(t&&V.isString(t)&&(r&&!this.responseType||i)){const l=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(s){if(l)throw s.name==="SyntaxError"?ye.from(s,ye.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Rt.classes.FormData,Blob:Rt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};V.forEach(["delete","get","head","post","put","patch"],e=>{kr.headers[e]={}});const Kw=V.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Xw=e=>{const t={};let n,r,i;return e&&e.split(`
|
|
2069
|
+
`).forEach(function(l){i=l.indexOf(":"),n=l.substring(0,i).trim().toLowerCase(),r=l.substring(i+1).trim(),!(!n||t[n]&&Kw[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},Uc=Symbol("internals");function Rr(e){return e&&String(e).trim().toLowerCase()}function Ro(e){return e===!1||e==null?e:V.isArray(e)?e.map(Ro):String(e)}function Yw(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const Zw=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function ca(e,t,n,r,i){if(V.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!V.isString(t)){if(V.isString(r))return t.indexOf(r)!==-1;if(V.isRegExp(r))return r.test(t)}}function Jw(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Qw(e,t){const n=V.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,a,l){return this[r].call(this,t,i,a,l)},configurable:!0})})}class ut{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function a(s,c,d){const u=Rr(c);if(!u)throw new Error("header name must be a non-empty string");const f=V.findKey(i,u);(!f||i[f]===void 0||d===!0||d===void 0&&i[f]!==!1)&&(i[f||c]=Ro(s))}const l=(s,c)=>V.forEach(s,(d,u)=>a(d,u,c));if(V.isPlainObject(t)||t instanceof this.constructor)l(t,n);else if(V.isString(t)&&(t=t.trim())&&!Zw(t))l(Xw(t),n);else if(V.isHeaders(t))for(const[s,c]of t.entries())a(c,s,r);else t!=null&&a(n,t,r);return this}get(t,n){if(t=Rr(t),t){const r=V.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return Yw(i);if(V.isFunction(n))return n.call(this,i,r);if(V.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Rr(t),t){const r=V.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||ca(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function a(l){if(l=Rr(l),l){const s=V.findKey(r,l);s&&(!n||ca(r,r[s],s,n))&&(delete r[s],i=!0)}}return V.isArray(t)?t.forEach(a):a(t),i}clear(t){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const a=n[r];(!t||ca(this,this[a],a,t,!0))&&(delete this[a],i=!0)}return i}normalize(t){const n=this,r={};return V.forEach(this,(i,a)=>{const l=V.findKey(r,a);if(l){n[l]=Ro(i),delete n[a];return}const s=t?Jw(a):String(a).trim();s!==a&&delete n[a],n[s]=Ro(i),r[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return V.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&V.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
|
|
2070
|
+
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[Uc]=this[Uc]={accessors:{}}).accessors,i=this.prototype;function a(l){const s=Rr(l);r[s]||(Qw(i,l),r[s]=!0)}return V.isArray(t)?t.forEach(a):a(t),this}}ut.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),V.reduceDescriptors(ut.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),V.freezeMethods(ut);function da(e,t){const n=this||kr,r=t||n,i=ut.from(r.headers);let a=r.data;return V.forEach(e,function(s){a=s.call(n,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function Gc(e){return!!(e&&e.__CANCEL__)}function Yn(e,t,n){ye.call(this,e??"canceled",ye.ERR_CANCELED,t,n),this.name="CanceledError"}V.inherits(Yn,ye,{__CANCEL__:!0});function qc(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new ye("Request failed with status code "+n.status,[ye.ERR_BAD_REQUEST,ye.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function e1(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function t1(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,a=0,l;return t=t!==void 0?t:1e3,function(c){const d=Date.now(),u=r[a];l||(l=d),n[i]=c,r[i]=d;let f=a,p=0;for(;f!==i;)p+=n[f++],f=f%e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),d-l<t)return;const b=u&&d-u;return b?Math.round(p*1e3/b):void 0}}function n1(e,t){let n=0,r=1e3/t,i,a;const l=(d,u=Date.now())=>{n=u,i=null,a&&(clearTimeout(a),a=null),e.apply(null,d)};return[(...d)=>{const u=Date.now(),f=u-n;f>=r?l(d,u):(i=d,a||(a=setTimeout(()=>{a=null,l(i)},r-f)))},()=>i&&l(i)]}const Po=(e,t,n=3)=>{let r=0;const i=t1(50,250);return n1(a=>{const l=a.loaded,s=a.lengthComputable?a.total:void 0,c=l-r,d=i(c),u=l<=s;r=l;const f={loaded:l,total:s,progress:s?l/s:void 0,bytes:c,rate:d||void 0,estimated:d&&s&&u?(s-l)/d:void 0,event:a,lengthComputable:s!=null,[t?"download":"upload"]:!0};e(f)},n)},Kc=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Xc=e=>(...t)=>V.asap(()=>e(...t)),r1=Rt.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function i(a){let l=a;return t&&(n.setAttribute("href",l),l=n.href),n.setAttribute("href",l),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=i(window.location.href),function(l){const s=V.isString(l)?i(l):l;return s.protocol===r.protocol&&s.host===r.host}}():function(){return function(){return!0}}(),o1=Rt.hasStandardBrowserEnv?{write(e,t,n,r,i,a){const l=[e+"="+encodeURIComponent(t)];V.isNumber(n)&&l.push("expires="+new Date(n).toGMTString()),V.isString(r)&&l.push("path="+r),V.isString(i)&&l.push("domain="+i),a===!0&&l.push("secure"),document.cookie=l.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function i1(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function a1(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Yc(e,t){return e&&!i1(t)?a1(e,t):t}const Zc=e=>e instanceof ut?{...e}:e;function zn(e,t){t=t||{};const n={};function r(d,u,f){return V.isPlainObject(d)&&V.isPlainObject(u)?V.merge.call({caseless:f},d,u):V.isPlainObject(u)?V.merge({},u):V.isArray(u)?u.slice():u}function i(d,u,f){if(V.isUndefined(u)){if(!V.isUndefined(d))return r(void 0,d,f)}else return r(d,u,f)}function a(d,u){if(!V.isUndefined(u))return r(void 0,u)}function l(d,u){if(V.isUndefined(u)){if(!V.isUndefined(d))return r(void 0,d)}else return r(void 0,u)}function s(d,u,f){if(f in t)return r(d,u);if(f in e)return r(void 0,d)}const c={url:a,method:a,data:a,baseURL:l,transformRequest:l,transformResponse:l,paramsSerializer:l,timeout:l,timeoutMessage:l,withCredentials:l,withXSRFToken:l,adapter:l,responseType:l,xsrfCookieName:l,xsrfHeaderName:l,onUploadProgress:l,onDownloadProgress:l,decompress:l,maxContentLength:l,maxBodyLength:l,beforeRedirect:l,transport:l,httpAgent:l,httpsAgent:l,cancelToken:l,socketPath:l,responseEncoding:l,validateStatus:s,headers:(d,u)=>i(Zc(d),Zc(u),!0)};return V.forEach(Object.keys(Object.assign({},e,t)),function(u){const f=c[u]||i,p=f(e[u],t[u],u);V.isUndefined(p)&&f!==s||(n[u]=p)}),n}const Jc=e=>{const t=zn({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:a,headers:l,auth:s}=t;t.headers=l=ut.from(l),t.url=Hc(Yc(t.baseURL,t.url),e.params,e.paramsSerializer),s&&l.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):"")));let c;if(V.isFormData(n)){if(Rt.hasStandardBrowserEnv||Rt.hasStandardBrowserWebWorkerEnv)l.setContentType(void 0);else if((c=l.getContentType())!==!1){const[d,...u]=c?c.split(";").map(f=>f.trim()).filter(Boolean):[];l.setContentType([d||"multipart/form-data",...u].join("; "))}}if(Rt.hasStandardBrowserEnv&&(r&&V.isFunction(r)&&(r=r(t)),r||r!==!1&&r1(t.url))){const d=i&&a&&o1.read(a);d&&l.set(i,d)}return t},l1=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){const i=Jc(e);let a=i.data;const l=ut.from(i.headers).normalize();let{responseType:s,onUploadProgress:c,onDownloadProgress:d}=i,u,f,p,b,h;function x(){b&&b(),h&&h(),i.cancelToken&&i.cancelToken.unsubscribe(u),i.signal&&i.signal.removeEventListener("abort",u)}let v=new XMLHttpRequest;v.open(i.method.toUpperCase(),i.url,!0),v.timeout=i.timeout;function g(){if(!v)return;const z=ut.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),T={data:!s||s==="text"||s==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:z,config:e,request:v};qc(function(m){n(m),x()},function(m){r(m),x()},T),v=null}"onloadend"in v?v.onloadend=g:v.onreadystatechange=function(){!v||v.readyState!==4||v.status===0&&!(v.responseURL&&v.responseURL.indexOf("file:")===0)||setTimeout(g)},v.onabort=function(){v&&(r(new ye("Request aborted",ye.ECONNABORTED,e,v)),v=null)},v.onerror=function(){r(new ye("Network Error",ye.ERR_NETWORK,e,v)),v=null},v.ontimeout=function(){let $=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const T=i.transitional||jc;i.timeoutErrorMessage&&($=i.timeoutErrorMessage),r(new ye($,T.clarifyTimeoutError?ye.ETIMEDOUT:ye.ECONNABORTED,e,v)),v=null},a===void 0&&l.setContentType(null),"setRequestHeader"in v&&V.forEach(l.toJSON(),function($,T){v.setRequestHeader(T,$)}),V.isUndefined(i.withCredentials)||(v.withCredentials=!!i.withCredentials),s&&s!=="json"&&(v.responseType=i.responseType),d&&([p,h]=Po(d,!0),v.addEventListener("progress",p)),c&&v.upload&&([f,b]=Po(c),v.upload.addEventListener("progress",f),v.upload.addEventListener("loadend",b)),(i.cancelToken||i.signal)&&(u=z=>{v&&(r(!z||z.type?new Yn(null,e,v):z),v.abort(),v=null)},i.cancelToken&&i.cancelToken.subscribe(u),i.signal&&(i.signal.aborted?u():i.signal.addEventListener("abort",u)));const k=e1(i.url);if(k&&Rt.protocols.indexOf(k)===-1){r(new ye("Unsupported protocol "+k+":",ye.ERR_BAD_REQUEST,e));return}v.send(a||null)})},s1=(e,t)=>{let n=new AbortController,r;const i=function(c){if(!r){r=!0,l();const d=c instanceof Error?c:this.reason;n.abort(d instanceof ye?d:new Yn(d instanceof Error?d.message:d))}};let a=t&&setTimeout(()=>{i(new ye(`timeout ${t} of ms exceeded`,ye.ETIMEDOUT))},t);const l=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(c=>{c&&(c.removeEventListener?c.removeEventListener("abort",i):c.unsubscribe(i))}),e=null)};e.forEach(c=>c&&c.addEventListener&&c.addEventListener("abort",i));const{signal:s}=n;return s.unsubscribe=l,[s,()=>{a&&clearTimeout(a),a=null}]},c1=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},d1=async function*(e,t,n){for await(const r of e)yield*c1(ArrayBuffer.isView(r)?r:await n(String(r)),t)},Qc=(e,t,n,r,i)=>{const a=d1(e,t,i);let l=0,s,c=d=>{s||(s=!0,r&&r(d))};return new ReadableStream({async pull(d){try{const{done:u,value:f}=await a.next();if(u){c(),d.close();return}let p=f.byteLength;if(n){let b=l+=p;n(b)}d.enqueue(new Uint8Array(f))}catch(u){throw c(u),u}},cancel(d){return c(d),a.return()}},{highWaterMark:2})},Eo=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",ed=Eo&&typeof ReadableStream=="function",ua=Eo&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),td=(e,...t)=>{try{return!!e(...t)}catch{return!1}},u1=ed&&td(()=>{let e=!1;const t=new Request(Rt.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),nd=64*1024,fa=ed&&td(()=>V.isReadableStream(new Response("").body)),zo={stream:fa&&(e=>e.body)};Eo&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!zo[t]&&(zo[t]=V.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new ye(`Response type '${t}' is not supported`,ye.ERR_NOT_SUPPORT,r)})})})(new Response);const f1=async e=>{if(e==null)return 0;if(V.isBlob(e))return e.size;if(V.isSpecCompliantForm(e))return(await new Request(e).arrayBuffer()).byteLength;if(V.isArrayBufferView(e)||V.isArrayBuffer(e))return e.byteLength;if(V.isURLSearchParams(e)&&(e=e+""),V.isString(e))return(await ua(e)).byteLength},h1=async(e,t)=>{const n=V.toFiniteNumber(e.getContentLength());return n??f1(t)},ha={http:Iw,xhr:l1,fetch:Eo&&(async e=>{let{url:t,method:n,data:r,signal:i,cancelToken:a,timeout:l,onDownloadProgress:s,onUploadProgress:c,responseType:d,headers:u,withCredentials:f="same-origin",fetchOptions:p}=Jc(e);d=d?(d+"").toLowerCase():"text";let[b,h]=i||a||l?s1([i,a],l):[],x,v;const g=()=>{!x&&setTimeout(()=>{b&&b.unsubscribe()}),x=!0};let k;try{if(c&&u1&&n!=="get"&&n!=="head"&&(k=await h1(u,r))!==0){let O=new Request(t,{method:"POST",body:r,duplex:"half"}),m;if(V.isFormData(r)&&(m=O.headers.get("content-type"))&&u.setContentType(m),O.body){const[S,M]=Kc(k,Po(Xc(c)));r=Qc(O.body,nd,S,M,ua)}}V.isString(f)||(f=f?"include":"omit"),v=new Request(t,{...p,signal:b,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",credentials:f});let z=await fetch(v);const $=fa&&(d==="stream"||d==="response");if(fa&&(s||$)){const O={};["status","statusText","headers"].forEach(N=>{O[N]=z[N]});const m=V.toFiniteNumber(z.headers.get("content-length")),[S,M]=s&&Kc(m,Po(Xc(s),!0))||[];z=new Response(Qc(z.body,nd,S,()=>{M&&M(),$&&g()},ua),O)}d=d||"text";let T=await zo[V.findKey(zo,d)||"text"](z,e);return!$&&g(),h&&h(),await new Promise((O,m)=>{qc(O,m,{data:T,headers:ut.from(z.headers),status:z.status,statusText:z.statusText,config:e,request:v})})}catch(z){throw g(),z&&z.name==="TypeError"&&/fetch/i.test(z.message)?Object.assign(new ye("Network Error",ye.ERR_NETWORK,e,v),{cause:z.cause||z}):ye.from(z,z&&z.code,e,v)}})};V.forEach(ha,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const rd=e=>`- ${e}`,p1=e=>V.isFunction(e)||e===null||e===!1,od={getAdapter:e=>{e=V.isArray(e)?e:[e];const{length:t}=e;let n,r;const i={};for(let a=0;a<t;a++){n=e[a];let l;if(r=n,!p1(n)&&(r=ha[(l=String(n)).toLowerCase()],r===void 0))throw new ye(`Unknown adapter '${l}'`);if(r)break;i[l||"#"+a]=r}if(!r){const a=Object.entries(i).map(([s,c])=>`adapter ${s} `+(c===!1?"is not supported by the environment":"is not available in the build"));let l=t?a.length>1?`since :
|
|
2071
|
+
`+a.map(rd).join(`
|
|
2072
|
+
`):" "+rd(a[0]):"as no adapter specified";throw new ye("There is no suitable adapter to dispatch the request "+l,"ERR_NOT_SUPPORT")}return r},adapters:ha};function pa(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Yn(null,e)}function id(e){return pa(e),e.headers=ut.from(e.headers),e.data=da.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),od.getAdapter(e.adapter||kr.adapter)(e).then(function(r){return pa(e),r.data=da.call(e,e.transformResponse,r),r.headers=ut.from(r.headers),r},function(r){return Gc(r)||(pa(e),r&&r.response&&(r.response.data=da.call(e,e.transformResponse,r.response),r.response.headers=ut.from(r.response.headers))),Promise.reject(r)})}const ad="1.7.4",ba={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{ba[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const ld={};ba.transitional=function(t,n,r){function i(a,l){return"[Axios v"+ad+"] Transitional option '"+a+"'"+l+(r?". "+r:"")}return(a,l,s)=>{if(t===!1)throw new ye(i(l," has been removed"+(n?" in "+n:"")),ye.ERR_DEPRECATED);return n&&!ld[l]&&(ld[l]=!0,console.warn(i(l," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,l,s):!0}};function b1(e,t,n){if(typeof e!="object")throw new ye("options must be an object",ye.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const a=r[i],l=t[a];if(l){const s=e[a],c=s===void 0||l(s,a,e);if(c!==!0)throw new ye("option "+a+" must be "+c,ye.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new ye("Unknown option "+a,ye.ERR_BAD_OPTION)}}const ma={assertOptions:b1,validators:ba},rn=ma.validators;class Bn{constructor(t){this.defaults=t,this.interceptors={request:new Vc,response:new Vc}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let i;Error.captureStackTrace?Error.captureStackTrace(i={}):i=new Error;const a=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?a&&!String(r.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(r.stack+=`
|
|
2073
|
+
`+a):r.stack=a}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=zn(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:a}=n;r!==void 0&&ma.assertOptions(r,{silentJSONParsing:rn.transitional(rn.boolean),forcedJSONParsing:rn.transitional(rn.boolean),clarifyTimeoutError:rn.transitional(rn.boolean)},!1),i!=null&&(V.isFunction(i)?n.paramsSerializer={serialize:i}:ma.assertOptions(i,{encode:rn.function,serialize:rn.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let l=a&&V.merge(a.common,a[n.method]);a&&V.forEach(["delete","get","head","post","put","patch","common"],h=>{delete a[h]}),n.headers=ut.concat(l,a);const s=[];let c=!0;this.interceptors.request.forEach(function(x){typeof x.runWhen=="function"&&x.runWhen(n)===!1||(c=c&&x.synchronous,s.unshift(x.fulfilled,x.rejected))});const d=[];this.interceptors.response.forEach(function(x){d.push(x.fulfilled,x.rejected)});let u,f=0,p;if(!c){const h=[id.bind(this),void 0];for(h.unshift.apply(h,s),h.push.apply(h,d),p=h.length,u=Promise.resolve(n);f<p;)u=u.then(h[f++],h[f++]);return u}p=s.length;let b=n;for(f=0;f<p;){const h=s[f++],x=s[f++];try{b=h(b)}catch(v){x.call(this,v);break}}try{u=id.call(this,b)}catch(h){return Promise.reject(h)}for(f=0,p=d.length;f<p;)u=u.then(d[f++],d[f++]);return u}getUri(t){t=zn(this.defaults,t);const n=Yc(t.baseURL,t.url);return Hc(n,t.params,t.paramsSerializer)}}V.forEach(["delete","get","head","options"],function(t){Bn.prototype[t]=function(n,r){return this.request(zn(r||{},{method:t,url:n,data:(r||{}).data}))}}),V.forEach(["post","put","patch"],function(t){function n(r){return function(a,l,s){return this.request(zn(s||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:l}))}}Bn.prototype[t]=n(),Bn.prototype[t+"Form"]=n(!0)});class ga{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const r=this;this.promise.then(i=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](i);r._listeners=null}),this.promise.then=i=>{let a;const l=new Promise(s=>{r.subscribe(s),a=s}).then(i);return l.cancel=function(){r.unsubscribe(a)},l},t(function(a,l,s){r.reason||(r.reason=new Yn(a,l,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new ga(function(i){t=i}),cancel:t}}}function m1(e){return function(n){return e.apply(null,n)}}function g1(e){return V.isObject(e)&&e.isAxiosError===!0}const va={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(va).forEach(([e,t])=>{va[t]=e});function sd(e){const t=new Bn(e),n=Tc(Bn.prototype.request,t);return V.extend(n,Bn.prototype,t,{allOwnKeys:!0}),V.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return sd(zn(e,i))},n}const qe=sd(kr);qe.Axios=Bn,qe.CanceledError=Yn,qe.CancelToken=ga,qe.isCancel=Gc,qe.VERSION=ad,qe.toFormData=ko,qe.AxiosError=ye,qe.Cancel=qe.CanceledError,qe.all=function(t){return Promise.all(t)},qe.spread=m1,qe.isAxiosError=g1,qe.mergeConfig=zn,qe.AxiosHeaders=ut,qe.formToJSON=e=>Wc(V.isHTMLForm(e)?new FormData(e):e),qe.getAdapter=od.getAdapter,qe.HttpStatusCode=va,qe.default=qe;function v1(e){const t=e.replace(/^.*[\\\/]/,"");return t.substring(0,t.lastIndexOf("."))}const cd=new DOMParser;async function x1(e,t=""){const n=cd.parseFromString(e,"text/xml"),r=[],i=n.documentElement.getElementsByTagName("macros");if(i.length>0)for(const s of i)for(const c of s.children)r.push(c.textContent.trim());console.debug(`Detected ${r.length} macro file(s) in xml.`);const a={};for(const s of r){const{data:c}=await qe.get(`${t}${s}`),u=cd.parseFromString(c,"text/xml").documentElement.getElementsByTagName("xml");if(u.length>0)for(const f of u){const p=f.getAttribute("name");for(const b of f.children)a[p]=a[p]||[],a[p].push(b)}}console.debug("Successfully collected macro files.");const l=n.documentElement.getElementsByTagName("expand");if(l.length>0)for(const s of l){const c=s.getAttribute("macro");if(c in a){const d=a[c];for(const u of d)s.parentNode.appendChild(u);s.parentNode.removeChild(s)}else console.error(`Failed to detect '${c}' macros source.`)}return n}async function y1(e){const t=await qe.get(e),n=await x1(t.data);let r={};r.name=v1(e),r.html=n.documentElement.getAttribute("name"),r.logo=n.documentElement.getAttribute("logo");const i=n.documentElement.getElementsByTagName("description");i.length===1&&(r.description=i[0].textContent.trim());const a=n.documentElement.getElementsByTagName("specs");return a.length===1&&(r.specs=new _o(a[0])),["settings","tracks"].forEach(l=>{const s=n.documentElement.getElementsByTagName(l);s.length===1&&(r[l]=new Bo(s[0]))}),r}class Bo extends Array{constructor(t){super();for(const n of t.children)n.children.length>0?n.tagName===n.children[0].tagName?this.push(new Bo(n)):this.push(new _o(n)):n.textContent&&n.textContent.trim()&&this.push(n.textContent.trim())}}class _o{constructor(t){if(t.attributes.length>0)for(const n of t.attributes)this[n.name]=n.value;for(const n of t.children)if(n.children.length>0){let r;if(n.tagName===n.children[0].tagName)r=new Bo(n);else{const i=new _o(n);if(n.attributes.length>0)for(const a of n.attributes)i[a.name]=a.value;r=i}this[n.tagName]=r}else if(n.attributes.length>0){const r={};for(const i of n.attributes)r[i.name]=i.value;this[n.tagName]=r}else this[n.tagName]=n.textContent.trim()}}async function w1(e,t,n){if(!t)try{t=await y1(e)}catch(l){console.error("Visualization requires configuration from XML or attached `visualization_plugin` details."),Br(l)}const r=ud(t.settings,n.settings),i=t.specs,a=S1(t.tracks,n.tracks);return{plugin:t,settings:r,specs:i,tracks:a}}function dd(e,t){let n=t??e.value;return e.type==="float"&&(n=Number(n)),n}function C1(e,t){var i;const n=t||{},r=e.test_param.name;if(!r)console.error(`Test parameter has no name: ${e.name}.`);else{const a=n[r]??e.test_param.value;for(const l of e.cases)if(l.value===a&&(n[r]=a,((i=l.inputs)==null?void 0:i.length)>0))for(const s of l.inputs)n[s.name]=dd(s,n[s.name])}return n}function ud(e,t){const n=t||{};return e&&e.forEach(r=>{r.type==="conditional"?n[r.name]=C1(r,n[r.name]):n[r.name]=dd(r,n[r.name])}),n}function S1(e,t){const n=t||[];return e&&(n.length===0&&n.push({}),n.forEach((r,i)=>{n[i]=ud(e,r)})),n}function $1(e){var c;const t=document.getElementById("app"),n=JSON.parse(t.getAttribute("data-incoming"))||{},r=n.root||(e==null?void 0:e.root)||"/",i=n.visualization_id,a=n.visualization_plugin,l=n.visualization_title||(e==null?void 0:e.title)||"Unnamed Visualization";let s=n.visualization_config||e;if((c=n.visualization_config)!=null&&c.chart_dict){const d=n.visualization_config.chart_dict;s.groups=d.groups,s.settings=d.settings,delete s.chartDict}return{root:r,visualizationConfig:s,visualizationId:i,visualizationPlugin:a,visualizationTitle:l}}const T1={key:1,class:"m-2"},k1=o.createElementVNode("span",{class:"text-xs"},"Please wait...",-1),R1={key:0},P1={__name:"GalaxyCharts",props:{config:{type:Object,default:()=>{}},xml:{type:String,required:!0}},setup(e){const t=e,n=o.ref(!1),r=o.ref(null),i=o.ref(null),a=o.ref(""),l=o.ref(null),s=o.ref(!0),c=o.ref(null),d=o.ref(""),u=o.ref([]),f=o.ref({}),p=o.ref({}),b=o.ref([]),h=o.ref([]),{root:x,visualizationConfig:v,visualizationId:g,visualizationPlugin:k,visualizationTitle:z}=$1(t.config),$=Mo();$.setCredentials(t.config.credentials||"include"),$.setRoot(x||"/"),w1(t.xml,k,v).then(({plugin:A,settings:L,specs:U,tracks:J})=>{i.value=A.description,l.value=A.html,s.value=!1,c.value=A.logo,d.value=A.name,u.value=A.settings||[],f.value=L,p.value=U,b.value=A.tracks||[],h.value=J});const T=v.dataset_id;v.dataset_url?(r.value=v.dataset_url,console.debug(`GalaxyCharts: Evaluating dataset url: ${r.value}.`)):T?(r.value=hd(T),console.debug(`GalaxyCharts: Built dataset url from dataset id: ${r.value}.`)):a.value="Visualization requires `dataset_id` or `dataset_url`.";const O=o.computed(()=>c.value&&`${x}${c.value}`),m=o.computed(()=>u.value.length===0&&b.value.length===0);async function S(){n.value=!n.value,await o.nextTick(),window.dispatchEvent(new Event("resize"))}function M(A){f.value={...A}}function N(A){h.value=[...A]}return(A,L)=>a.value?(o.openBlock(),o.createBlock(o.unref(rc),{key:0,title:"Visualization Error!",type:"error",class:"m-2"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(a.value),1)]),_:1})):s.value?(o.openBlock(),o.createElementBlock("div",T1,[o.createElementVNode("span",null,[o.createVNode(o.unref(md),{class:"animate-spin size-4 inline mx-1"})]),k1])):(o.openBlock(),o.createElementBlock("div",{key:2,class:o.normalizeClass(["grid h-screen",{"grid-cols-[70%_30%]":!n.value&&!m.value}])},[o.renderSlot(A.$slots,"default",{datasetId:o.unref(T),datasetUrl:r.value,root:o.unref(x),settings:f.value,specs:p.value,tracks:h.value}),n.value&&!m.value?(o.openBlock(),o.createElementBlock("div",R1,[o.createVNode(o.unref(jx),{strong:"",secondary:"",circle:"",class:"bg-sky-100 m-2",top:0,right:0,onClick:S},{default:o.withCtx(()=>[o.createVNode(o.unref(Tt),null,{default:o.withCtx(()=>[o.createVNode(o.unref(gd))]),_:1})]),_:1})])):(o.openBlock(),o.createBlock(Yy,{key:1,"dataset-id":o.unref(T),description:i.value,html:l.value,"logo-url":O.value,name:d.value,"setting-inputs":u.value,"setting-values":f.value,"track-inputs":b.value,"track-values":h.value,"visualization-id":o.unref(g),"visualization-title":o.unref(z),"onUpdate:settings":M,"onUpdate:tracks":N,onToggle:S},null,8,["dataset-id","description","html","logo-url","name","setting-inputs","setting-values","track-inputs","track-values","visualization-id","visualization-title"]))],2))}};Ve.GalaxyApi=cn,Ve.GalaxyCharts=P1,Ve.useColumnsStore=pd,Ve.useConfigStore=Mo,Object.defineProperty(Ve,Symbol.toStringTag,{value:"Module"})});
|