@abi-software/flatmapvuer 1.13.3-demo.0 → 1.13.3

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.
@@ -1,15 +1,15 @@
1
- (function(H,Vt){typeof exports=="object"&&typeof module<"u"?Vt(exports,require("https://cdn.jsdelivr.net/npm/@abi-software/flatmap-viewer@4.4.3/+esm"),require("@element-plus/icons-vue"),require("vue"),require("@abi-software/svg-sprite"),require("@abi-software/map-utilities"),require("@abi-software/sparc-annotation"),require("pinia")):typeof define=="function"&&define.amd?define(["exports","https://cdn.jsdelivr.net/npm/@abi-software/flatmap-viewer@4.4.3/+esm","@element-plus/icons-vue","vue","@abi-software/svg-sprite","@abi-software/map-utilities","@abi-software/sparc-annotation","pinia"],Vt):(H=typeof globalThis<"u"?globalThis:H||self,Vt(H.FlatmapVuer={},H.flatmap,H["@element-plus/icons-vue"],H.Vue,H["@abi-software/svg-sprite"],H["@abi-software/map-utilities"],H["@abi-software/sparc-annotation"],H.pinia))})(this,function(H,Vt,W,n,Ci,ut,Os,vi){"use strict";function Ms(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const i=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,i.get?i:{enumerable:!0,get:()=>e[o]})}}return t.default=e,Object.freeze(t)}const Si=Ms(Vt),Ae=(e,t,{checkForDefaultPrevented:o=!0}={})=>a=>{const r=e==null?void 0:e(a);if(o===!1||!r)return t==null?void 0:t(a)};var ki;const K=typeof window<"u",xs=e=>typeof e=="string",Ei=()=>{},io=K&&((ki=window==null?void 0:window.navigator)==null?void 0:ki.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function ao(e){return typeof e=="function"?e():n.unref(e)}function Bs(e){return e}function Rt(e){return n.getCurrentScope()?(n.onScopeDispose(e),!0):!1}function Ns(e,t=!0){n.getCurrentInstance()?n.onMounted(e):t?e():n.nextTick(e)}function Ii(e,t,o={}){const{immediate:i=!0}=o,a=n.ref(!1);let r=null;function s(){r&&(clearTimeout(r),r=null)}function l(){a.value=!1,s()}function c(...d){s(),a.value=!0,r=setTimeout(()=>{a.value=!1,r=null,e(...d)},ao(t))}return i&&(a.value=!0,K&&c()),Rt(l),{isPending:n.readonly(a),start:c,stop:l}}function Oe(e){var t;const o=ao(e);return(t=o==null?void 0:o.$el)!=null?t:o}const mn=K?window:void 0;function he(...e){let t,o,i,a;if(xs(e[0])||Array.isArray(e[0])?([o,i,a]=e,t=mn):[t,o,i,a]=e,!t)return Ei;Array.isArray(o)||(o=[o]),Array.isArray(i)||(i=[i]);const r=[],s=()=>{r.forEach(f=>f()),r.length=0},l=(f,u,p,g)=>(f.addEventListener(u,p,g),()=>f.removeEventListener(u,p,g)),c=n.watch(()=>[Oe(t),ao(a)],([f,u])=>{s(),f&&r.push(...o.flatMap(p=>i.map(g=>l(f,p,g,u))))},{immediate:!0,flush:"post"}),d=()=>{c(),s()};return Rt(d),d}let Ti=!1;function _s(e,t,o={}){const{window:i=mn,ignore:a=[],capture:r=!0,detectIframe:s=!1}=o;if(!i)return;io&&!Ti&&(Ti=!0,Array.from(i.document.body.children).forEach(p=>p.addEventListener("click",Ei)));let l=!0;const c=p=>a.some(g=>{if(typeof g=="string")return Array.from(i.document.querySelectorAll(g)).some(h=>h===p.target||p.composedPath().includes(h));{const h=Oe(g);return h&&(p.target===h||p.composedPath().includes(h))}}),f=[he(i,"click",p=>{const g=Oe(e);if(!(!g||g===p.target||p.composedPath().includes(g))){if(p.detail===0&&(l=!c(p)),!l){l=!0;return}t(p)}},{passive:!0,capture:r}),he(i,"pointerdown",p=>{const g=Oe(e);g&&(l=!p.composedPath().includes(g)&&!c(p))},{passive:!0}),s&&he(i,"blur",p=>{var g;const h=Oe(e);((g=i.document.activeElement)==null?void 0:g.tagName)==="IFRAME"&&!(h!=null&&h.contains(i.document.activeElement))&&t(p)})].filter(Boolean);return()=>f.forEach(p=>p())}function Ai(e,t=!1){const o=n.ref(),i=()=>o.value=!!e();return i(),Ns(i,t),o}const Oi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Mi="__vueuse_ssr_handlers__";Oi[Mi]=Oi[Mi]||{};var xi=Object.getOwnPropertySymbols,Ls=Object.prototype.hasOwnProperty,Ps=Object.prototype.propertyIsEnumerable,Vs=(e,t)=>{var o={};for(var i in e)Ls.call(e,i)&&t.indexOf(i)<0&&(o[i]=e[i]);if(e!=null&&xi)for(var i of xi(e))t.indexOf(i)<0&&Ps.call(e,i)&&(o[i]=e[i]);return o};function Re(e,t,o={}){const i=o,{window:a=mn}=i,r=Vs(i,["window"]);let s;const l=Ai(()=>a&&"ResizeObserver"in a),c=()=>{s&&(s.disconnect(),s=void 0)},d=n.watch(()=>Oe(e),u=>{c(),l.value&&a&&u&&(s=new ResizeObserver(t),s.observe(u,r))},{immediate:!0,flush:"post"}),f=()=>{c(),d()};return Rt(f),{isSupported:l,stop:f}}var Bi=Object.getOwnPropertySymbols,Rs=Object.prototype.hasOwnProperty,Fs=Object.prototype.propertyIsEnumerable,Ds=(e,t)=>{var o={};for(var i in e)Rs.call(e,i)&&t.indexOf(i)<0&&(o[i]=e[i]);if(e!=null&&Bi)for(var i of Bi(e))t.indexOf(i)<0&&Fs.call(e,i)&&(o[i]=e[i]);return o};function $s(e,t,o={}){const i=o,{window:a=mn}=i,r=Ds(i,["window"]);let s;const l=Ai(()=>a&&"MutationObserver"in a),c=()=>{s&&(s.disconnect(),s=void 0)},d=n.watch(()=>Oe(e),u=>{c(),l.value&&a&&u&&(s=new MutationObserver(t),s.observe(u,r))},{immediate:!0}),f=()=>{c(),d()};return Rt(f),{isSupported:l,stop:f}}var Ni;(function(e){e.UP="UP",e.RIGHT="RIGHT",e.DOWN="DOWN",e.LEFT="LEFT",e.NONE="NONE"})(Ni||(Ni={}));var zs=Object.defineProperty,_i=Object.getOwnPropertySymbols,js=Object.prototype.hasOwnProperty,Hs=Object.prototype.propertyIsEnumerable,Li=(e,t,o)=>t in e?zs(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,Ks=(e,t)=>{for(var o in t||(t={}))js.call(t,o)&&Li(e,o,t[o]);if(_i)for(var o of _i(t))Hs.call(t,o)&&Li(e,o,t[o]);return e};Ks({linear:Bs},{easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]});/**
1
+ (function(H,Rt){typeof exports=="object"&&typeof module<"u"?Rt(exports,require("https://cdn.jsdelivr.net/npm/@abi-software/flatmap-viewer@4.4.3/+esm"),require("@element-plus/icons-vue"),require("vue"),require("@abi-software/svg-sprite"),require("@abi-software/map-utilities"),require("@abi-software/sparc-annotation"),require("pinia")):typeof define=="function"&&define.amd?define(["exports","https://cdn.jsdelivr.net/npm/@abi-software/flatmap-viewer@4.4.3/+esm","@element-plus/icons-vue","vue","@abi-software/svg-sprite","@abi-software/map-utilities","@abi-software/sparc-annotation","pinia"],Rt):(H=typeof globalThis<"u"?globalThis:H||self,Rt(H.FlatmapVuer={},H.flatmap,H["@element-plus/icons-vue"],H.Vue,H["@abi-software/svg-sprite"],H["@abi-software/map-utilities"],H["@abi-software/sparc-annotation"],H.pinia))})(this,function(H,Rt,W,n,vi,ut,Ms,Si){"use strict";function xs(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const i=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,i.get?i:{enumerable:!0,get:()=>e[o]})}}return t.default=e,Object.freeze(t)}const ki=xs(Rt),Ae=(e,t,{checkForDefaultPrevented:o=!0}={})=>r=>{const a=e==null?void 0:e(r);if(o===!1||!a)return t==null?void 0:t(r)};var Ei;const K=typeof window<"u",Bs=e=>typeof e=="string",Ii=()=>{},ro=K&&((Ei=window==null?void 0:window.navigator)==null?void 0:Ei.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function ao(e){return typeof e=="function"?e():n.unref(e)}function Ns(e){return e}function Ft(e){return n.getCurrentScope()?(n.onScopeDispose(e),!0):!1}function _s(e,t=!0){n.getCurrentInstance()?n.onMounted(e):t?e():n.nextTick(e)}function Ti(e,t,o={}){const{immediate:i=!0}=o,r=n.ref(!1);let a=null;function s(){a&&(clearTimeout(a),a=null)}function l(){r.value=!1,s()}function c(...d){s(),r.value=!0,a=setTimeout(()=>{r.value=!1,a=null,e(...d)},ao(t))}return i&&(r.value=!0,K&&c()),Ft(l),{isPending:n.readonly(r),start:c,stop:l}}function Oe(e){var t;const o=ao(e);return(t=o==null?void 0:o.$el)!=null?t:o}const gn=K?window:void 0;function he(...e){let t,o,i,r;if(Bs(e[0])||Array.isArray(e[0])?([o,i,r]=e,t=gn):[t,o,i,r]=e,!t)return Ii;Array.isArray(o)||(o=[o]),Array.isArray(i)||(i=[i]);const a=[],s=()=>{a.forEach(f=>f()),a.length=0},l=(f,u,p,g)=>(f.addEventListener(u,p,g),()=>f.removeEventListener(u,p,g)),c=n.watch(()=>[Oe(t),ao(r)],([f,u])=>{s(),f&&a.push(...o.flatMap(p=>i.map(g=>l(f,p,g,u))))},{immediate:!0,flush:"post"}),d=()=>{c(),s()};return Ft(d),d}let Ai=!1;function Ls(e,t,o={}){const{window:i=gn,ignore:r=[],capture:a=!0,detectIframe:s=!1}=o;if(!i)return;ro&&!Ai&&(Ai=!0,Array.from(i.document.body.children).forEach(p=>p.addEventListener("click",Ii)));let l=!0;const c=p=>r.some(g=>{if(typeof g=="string")return Array.from(i.document.querySelectorAll(g)).some(h=>h===p.target||p.composedPath().includes(h));{const h=Oe(g);return h&&(p.target===h||p.composedPath().includes(h))}}),f=[he(i,"click",p=>{const g=Oe(e);if(!(!g||g===p.target||p.composedPath().includes(g))){if(p.detail===0&&(l=!c(p)),!l){l=!0;return}t(p)}},{passive:!0,capture:a}),he(i,"pointerdown",p=>{const g=Oe(e);g&&(l=!p.composedPath().includes(g)&&!c(p))},{passive:!0}),s&&he(i,"blur",p=>{var g;const h=Oe(e);((g=i.document.activeElement)==null?void 0:g.tagName)==="IFRAME"&&!(h!=null&&h.contains(i.document.activeElement))&&t(p)})].filter(Boolean);return()=>f.forEach(p=>p())}function Oi(e,t=!1){const o=n.ref(),i=()=>o.value=!!e();return i(),_s(i,t),o}const Mi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},xi="__vueuse_ssr_handlers__";Mi[xi]=Mi[xi]||{};var Bi=Object.getOwnPropertySymbols,Ps=Object.prototype.hasOwnProperty,Vs=Object.prototype.propertyIsEnumerable,Rs=(e,t)=>{var o={};for(var i in e)Ps.call(e,i)&&t.indexOf(i)<0&&(o[i]=e[i]);if(e!=null&&Bi)for(var i of Bi(e))t.indexOf(i)<0&&Vs.call(e,i)&&(o[i]=e[i]);return o};function Re(e,t,o={}){const i=o,{window:r=gn}=i,a=Rs(i,["window"]);let s;const l=Oi(()=>r&&"ResizeObserver"in r),c=()=>{s&&(s.disconnect(),s=void 0)},d=n.watch(()=>Oe(e),u=>{c(),l.value&&r&&u&&(s=new ResizeObserver(t),s.observe(u,a))},{immediate:!0,flush:"post"}),f=()=>{c(),d()};return Ft(f),{isSupported:l,stop:f}}var Ni=Object.getOwnPropertySymbols,Fs=Object.prototype.hasOwnProperty,Ds=Object.prototype.propertyIsEnumerable,$s=(e,t)=>{var o={};for(var i in e)Fs.call(e,i)&&t.indexOf(i)<0&&(o[i]=e[i]);if(e!=null&&Ni)for(var i of Ni(e))t.indexOf(i)<0&&Ds.call(e,i)&&(o[i]=e[i]);return o};function zs(e,t,o={}){const i=o,{window:r=gn}=i,a=$s(i,["window"]);let s;const l=Oi(()=>r&&"MutationObserver"in r),c=()=>{s&&(s.disconnect(),s=void 0)},d=n.watch(()=>Oe(e),u=>{c(),l.value&&r&&u&&(s=new MutationObserver(t),s.observe(u,a))},{immediate:!0}),f=()=>{c(),d()};return Ft(f),{isSupported:l,stop:f}}var _i;(function(e){e.UP="UP",e.RIGHT="RIGHT",e.DOWN="DOWN",e.LEFT="LEFT",e.NONE="NONE"})(_i||(_i={}));var js=Object.defineProperty,Li=Object.getOwnPropertySymbols,Hs=Object.prototype.hasOwnProperty,Ks=Object.prototype.propertyIsEnumerable,Pi=(e,t,o)=>t in e?js(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,Us=(e,t)=>{for(var o in t||(t={}))Hs.call(t,o)&&Pi(e,o,t[o]);if(Li)for(var o of Li(t))Ks.call(t,o)&&Pi(e,o,t[o]);return e};Us({linear:Ns},{easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]});/**
2
2
  * @vue/shared v3.5.13
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
- **/process.env.NODE_ENV!=="production"&&Object.freeze({}),process.env.NODE_ENV!=="production"&&Object.freeze([]);const Je=()=>{},Us=Object.prototype.hasOwnProperty,Pi=(e,t)=>Us.call(e,t),ee=Array.isArray,Q=e=>typeof e=="function",me=e=>typeof e=="string",te=e=>e!==null&&typeof e=="object",Ws=Object.prototype.toString,qs=e=>Ws.call(e),ro=e=>qs(e).slice(8,-1),Vi=e=>{const t=Object.create(null);return o=>t[o]||(t[o]=e(o))},Gs=/-(\w)/g,Js=Vi(e=>e.replace(Gs,(t,o)=>o?o.toUpperCase():"")),Ys=/\B([A-Z])/g,Zs=Vi(e=>e.replace(Ys,"-$1").toLowerCase());var Ri=typeof global=="object"&&global&&global.Object===Object&&global,Qs=typeof self=="object"&&self&&self.Object===Object&&self,Ce=Ri||Qs||Function("return this")(),ve=Ce.Symbol,Fi=Object.prototype,Xs=Fi.hasOwnProperty,el=Fi.toString,Ft=ve?ve.toStringTag:void 0;function tl(e){var t=Xs.call(e,Ft),o=e[Ft];try{e[Ft]=void 0;var i=!0}catch{}var a=el.call(e);return i&&(t?e[Ft]=o:delete e[Ft]),a}var nl=Object.prototype,ol=nl.toString;function il(e){return ol.call(e)}var al="[object Null]",rl="[object Undefined]",Di=ve?ve.toStringTag:void 0;function pt(e){return e==null?e===void 0?rl:al:Di&&Di in Object(e)?tl(e):il(e)}function ht(e){return e!=null&&typeof e=="object"}var sl="[object Symbol]";function gn(e){return typeof e=="symbol"||ht(e)&&pt(e)==sl}function ll(e,t){for(var o=-1,i=e==null?0:e.length,a=Array(i);++o<i;)a[o]=t(e[o],o,e);return a}var ge=Array.isArray,$i=ve?ve.prototype:void 0,zi=$i?$i.toString:void 0;function ji(e){if(typeof e=="string")return e;if(ge(e))return ll(e,ji)+"";if(gn(e))return zi?zi.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var cl=/\s/;function dl(e){for(var t=e.length;t--&&cl.test(e.charAt(t)););return t}var fl=/^\s+/;function ul(e){return e&&e.slice(0,dl(e)+1).replace(fl,"")}function Fe(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Hi=NaN,pl=/^[-+]0x[0-9a-f]+$/i,hl=/^0b[01]+$/i,ml=/^0o[0-7]+$/i,gl=parseInt;function Ki(e){if(typeof e=="number")return e;if(gn(e))return Hi;if(Fe(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Fe(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=ul(e);var o=hl.test(e);return o||ml.test(e)?gl(e.slice(2),o?2:8):pl.test(e)?Hi:+e}function Ui(e){return e}var yl="[object AsyncFunction]",bl="[object Function]",wl="[object GeneratorFunction]",Cl="[object Proxy]";function Wi(e){if(!Fe(e))return!1;var t=pt(e);return t==bl||t==wl||t==yl||t==Cl}var so=Ce["__core-js_shared__"],qi=function(){var e=/[^.]+$/.exec(so&&so.keys&&so.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function vl(e){return!!qi&&qi in e}var Sl=Function.prototype,kl=Sl.toString;function Ye(e){if(e!=null){try{return kl.call(e)}catch{}try{return e+""}catch{}}return""}var El=/[\\^$.*+?()[\]{}|]/g,Il=/^\[object .+?Constructor\]$/,Tl=Function.prototype,Al=Object.prototype,Ol=Tl.toString,Ml=Al.hasOwnProperty,xl=RegExp("^"+Ol.call(Ml).replace(El,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Bl(e){if(!Fe(e)||vl(e))return!1;var t=Wi(e)?xl:Il;return t.test(Ye(e))}function Nl(e,t){return e==null?void 0:e[t]}function Ze(e,t){var o=Nl(e,t);return Bl(o)?o:void 0}var lo=Ze(Ce,"WeakMap");function _l(e,t,o){switch(o.length){case 0:return e.call(t);case 1:return e.call(t,o[0]);case 2:return e.call(t,o[0],o[1]);case 3:return e.call(t,o[0],o[1],o[2])}return e.apply(t,o)}var Ll=800,Pl=16,Vl=Date.now;function Rl(e){var t=0,o=0;return function(){var i=Vl(),a=Pl-(i-o);if(o=i,a>0){if(++t>=Ll)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Fl(e){return function(){return e}}var yn=function(){try{var e=Ze(Object,"defineProperty");return e({},"",{}),e}catch{}}(),Dl=yn?function(e,t){return yn(e,"toString",{configurable:!0,enumerable:!1,value:Fl(t),writable:!0})}:Ui,$l=Rl(Dl);function zl(e,t,o,i){e.length;for(var a=o+1;a--;)if(t(e[a],a,e))return a;return-1}var jl=9007199254740991,Hl=/^(?:0|[1-9]\d*)$/;function co(e,t){var o=typeof e;return t=t??jl,!!t&&(o=="number"||o!="symbol"&&Hl.test(e))&&e>-1&&e%1==0&&e<t}function Gi(e,t,o){t=="__proto__"&&yn?yn(e,t,{configurable:!0,enumerable:!0,value:o,writable:!0}):e[t]=o}function fo(e,t){return e===t||e!==e&&t!==t}var Kl=Object.prototype,Ul=Kl.hasOwnProperty;function Wl(e,t,o){var i=e[t];(!(Ul.call(e,t)&&fo(i,o))||o===void 0&&!(t in e))&&Gi(e,t,o)}var Ji=Math.max;function ql(e,t,o){return t=Ji(t===void 0?e.length-1:t,0),function(){for(var i=arguments,a=-1,r=Ji(i.length-t,0),s=Array(r);++a<r;)s[a]=i[t+a];a=-1;for(var l=Array(t+1);++a<t;)l[a]=i[a];return l[t]=o(s),_l(e,this,l)}}var Gl=9007199254740991;function uo(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Gl}function Jl(e){return e!=null&&uo(e.length)&&!Wi(e)}var Yl=Object.prototype;function Zl(e){var t=e&&e.constructor,o=typeof t=="function"&&t.prototype||Yl;return e===o}function Ql(e,t){for(var o=-1,i=Array(e);++o<e;)i[o]=t(o);return i}var Xl="[object Arguments]";function Yi(e){return ht(e)&&pt(e)==Xl}var Zi=Object.prototype,ec=Zi.hasOwnProperty,tc=Zi.propertyIsEnumerable,po=Yi(function(){return arguments}())?Yi:function(e){return ht(e)&&ec.call(e,"callee")&&!tc.call(e,"callee")};function nc(){return!1}var Qi=typeof H=="object"&&H&&!H.nodeType&&H,Xi=Qi&&typeof module=="object"&&module&&!module.nodeType&&module,oc=Xi&&Xi.exports===Qi,ea=oc?Ce.Buffer:void 0,ic=ea?ea.isBuffer:void 0,ho=ic||nc,ac="[object Arguments]",rc="[object Array]",sc="[object Boolean]",lc="[object Date]",cc="[object Error]",dc="[object Function]",fc="[object Map]",uc="[object Number]",pc="[object Object]",hc="[object RegExp]",mc="[object Set]",gc="[object String]",yc="[object WeakMap]",bc="[object ArrayBuffer]",wc="[object DataView]",Cc="[object Float32Array]",vc="[object Float64Array]",Sc="[object Int8Array]",kc="[object Int16Array]",Ec="[object Int32Array]",Ic="[object Uint8Array]",Tc="[object Uint8ClampedArray]",Ac="[object Uint16Array]",Oc="[object Uint32Array]",j={};j[Cc]=j[vc]=j[Sc]=j[kc]=j[Ec]=j[Ic]=j[Tc]=j[Ac]=j[Oc]=!0,j[ac]=j[rc]=j[bc]=j[sc]=j[wc]=j[lc]=j[cc]=j[dc]=j[fc]=j[uc]=j[pc]=j[hc]=j[mc]=j[gc]=j[yc]=!1;function Mc(e){return ht(e)&&uo(e.length)&&!!j[pt(e)]}function xc(e){return function(t){return e(t)}}var ta=typeof H=="object"&&H&&!H.nodeType&&H,Dt=ta&&typeof module=="object"&&module&&!module.nodeType&&module,Bc=Dt&&Dt.exports===ta,mo=Bc&&Ri.process,na=function(){try{var e=Dt&&Dt.require&&Dt.require("util").types;return e||mo&&mo.binding&&mo.binding("util")}catch{}}(),oa=na&&na.isTypedArray,ia=oa?xc(oa):Mc,Nc=Object.prototype,_c=Nc.hasOwnProperty;function Lc(e,t){var o=ge(e),i=!o&&po(e),a=!o&&!i&&ho(e),r=!o&&!i&&!a&&ia(e),s=o||i||a||r,l=s?Ql(e.length,String):[],c=l.length;for(var d in e)_c.call(e,d)&&!(s&&(d=="length"||a&&(d=="offset"||d=="parent")||r&&(d=="buffer"||d=="byteLength"||d=="byteOffset")||co(d,c)))&&l.push(d);return l}function Pc(e,t){return function(o){return e(t(o))}}var Vc=Pc(Object.keys,Object),Rc=Object.prototype,Fc=Rc.hasOwnProperty;function Dc(e){if(!Zl(e))return Vc(e);var t=[];for(var o in Object(e))Fc.call(e,o)&&o!="constructor"&&t.push(o);return t}function aa(e){return Jl(e)?Lc(e):Dc(e)}var $c=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,zc=/^\w*$/;function go(e,t){if(ge(e))return!1;var o=typeof e;return o=="number"||o=="symbol"||o=="boolean"||e==null||gn(e)?!0:zc.test(e)||!$c.test(e)||t!=null&&e in Object(t)}var $t=Ze(Object,"create");function jc(){this.__data__=$t?$t(null):{},this.size=0}function Hc(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Kc="__lodash_hash_undefined__",Uc=Object.prototype,Wc=Uc.hasOwnProperty;function qc(e){var t=this.__data__;if($t){var o=t[e];return o===Kc?void 0:o}return Wc.call(t,e)?t[e]:void 0}var Gc=Object.prototype,Jc=Gc.hasOwnProperty;function Yc(e){var t=this.__data__;return $t?t[e]!==void 0:Jc.call(t,e)}var Zc="__lodash_hash_undefined__";function Qc(e,t){var o=this.__data__;return this.size+=this.has(e)?0:1,o[e]=$t&&t===void 0?Zc:t,this}function Qe(e){var t=-1,o=e==null?0:e.length;for(this.clear();++t<o;){var i=e[t];this.set(i[0],i[1])}}Qe.prototype.clear=jc,Qe.prototype.delete=Hc,Qe.prototype.get=qc,Qe.prototype.has=Yc,Qe.prototype.set=Qc;function Xc(){this.__data__=[],this.size=0}function bn(e,t){for(var o=e.length;o--;)if(fo(e[o][0],t))return o;return-1}var ed=Array.prototype,td=ed.splice;function nd(e){var t=this.__data__,o=bn(t,e);if(o<0)return!1;var i=t.length-1;return o==i?t.pop():td.call(t,o,1),--this.size,!0}function od(e){var t=this.__data__,o=bn(t,e);return o<0?void 0:t[o][1]}function id(e){return bn(this.__data__,e)>-1}function ad(e,t){var o=this.__data__,i=bn(o,e);return i<0?(++this.size,o.push([e,t])):o[i][1]=t,this}function Me(e){var t=-1,o=e==null?0:e.length;for(this.clear();++t<o;){var i=e[t];this.set(i[0],i[1])}}Me.prototype.clear=Xc,Me.prototype.delete=nd,Me.prototype.get=od,Me.prototype.has=id,Me.prototype.set=ad;var zt=Ze(Ce,"Map");function rd(){this.size=0,this.__data__={hash:new Qe,map:new(zt||Me),string:new Qe}}function sd(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function wn(e,t){var o=e.__data__;return sd(t)?o[typeof t=="string"?"string":"hash"]:o.map}function ld(e){var t=wn(this,e).delete(e);return this.size-=t?1:0,t}function cd(e){return wn(this,e).get(e)}function dd(e){return wn(this,e).has(e)}function fd(e,t){var o=wn(this,e),i=o.size;return o.set(e,t),this.size+=o.size==i?0:1,this}function xe(e){var t=-1,o=e==null?0:e.length;for(this.clear();++t<o;){var i=e[t];this.set(i[0],i[1])}}xe.prototype.clear=rd,xe.prototype.delete=ld,xe.prototype.get=cd,xe.prototype.has=dd,xe.prototype.set=fd;var ud="Expected a function";function yo(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(ud);var o=function(){var i=arguments,a=t?t.apply(this,i):i[0],r=o.cache;if(r.has(a))return r.get(a);var s=e.apply(this,i);return o.cache=r.set(a,s)||r,s};return o.cache=new(yo.Cache||xe),o}yo.Cache=xe;var pd=500;function hd(e){var t=yo(e,function(i){return o.size===pd&&o.clear(),i}),o=t.cache;return t}var md=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,gd=/\\(\\)?/g,yd=hd(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(md,function(o,i,a,r){t.push(a?r.replace(gd,"$1"):i||o)}),t});function bd(e){return e==null?"":ji(e)}function Cn(e,t){return ge(e)?e:go(e,t)?[e]:yd(bd(e))}function jt(e){if(typeof e=="string"||gn(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function bo(e,t){t=Cn(t,e);for(var o=0,i=t.length;e!=null&&o<i;)e=e[jt(t[o++])];return o&&o==i?e:void 0}function Be(e,t,o){var i=e==null?void 0:bo(e,t);return i===void 0?o:i}function ra(e,t){for(var o=-1,i=t.length,a=e.length;++o<i;)e[a+o]=t[o];return e}var sa=ve?ve.isConcatSpreadable:void 0;function wd(e){return ge(e)||po(e)||!!(sa&&e&&e[sa])}function Cd(e,t,o,i,a){var r=-1,s=e.length;for(o||(o=wd),a||(a=[]);++r<s;){var l=e[r];o(l)?ra(a,l):a[a.length]=l}return a}function vd(e){var t=e==null?0:e.length;return t?Cd(e):[]}function Sd(e){return $l(ql(e,void 0,vd),e+"")}function De(){if(!arguments.length)return[];var e=arguments[0];return ge(e)?e:[e]}function kd(){this.__data__=new Me,this.size=0}function Ed(e){var t=this.__data__,o=t.delete(e);return this.size=t.size,o}function Id(e){return this.__data__.get(e)}function Td(e){return this.__data__.has(e)}var Ad=200;function Od(e,t){var o=this.__data__;if(o instanceof Me){var i=o.__data__;if(!zt||i.length<Ad-1)return i.push([e,t]),this.size=++o.size,this;o=this.__data__=new xe(i)}return o.set(e,t),this.size=o.size,this}function Ne(e){var t=this.__data__=new Me(e);this.size=t.size}Ne.prototype.clear=kd,Ne.prototype.delete=Ed,Ne.prototype.get=Id,Ne.prototype.has=Td,Ne.prototype.set=Od;function Md(e,t){for(var o=-1,i=e==null?0:e.length,a=0,r=[];++o<i;){var s=e[o];t(s,o,e)&&(r[a++]=s)}return r}function xd(){return[]}var Bd=Object.prototype,Nd=Bd.propertyIsEnumerable,la=Object.getOwnPropertySymbols,_d=la?function(e){return e==null?[]:(e=Object(e),Md(la(e),function(t){return Nd.call(e,t)}))}:xd;function Ld(e,t,o){var i=t(e);return ge(e)?i:ra(i,o(e))}function ca(e){return Ld(e,aa,_d)}var wo=Ze(Ce,"DataView"),Co=Ze(Ce,"Promise"),vo=Ze(Ce,"Set"),da="[object Map]",Pd="[object Object]",fa="[object Promise]",ua="[object Set]",pa="[object WeakMap]",ha="[object DataView]",Vd=Ye(wo),Rd=Ye(zt),Fd=Ye(Co),Dd=Ye(vo),$d=Ye(lo),$e=pt;(wo&&$e(new wo(new ArrayBuffer(1)))!=ha||zt&&$e(new zt)!=da||Co&&$e(Co.resolve())!=fa||vo&&$e(new vo)!=ua||lo&&$e(new lo)!=pa)&&($e=function(e){var t=pt(e),o=t==Pd?e.constructor:void 0,i=o?Ye(o):"";if(i)switch(i){case Vd:return ha;case Rd:return da;case Fd:return fa;case Dd:return ua;case $d:return pa}return t});var ma=Ce.Uint8Array,zd="__lodash_hash_undefined__";function jd(e){return this.__data__.set(e,zd),this}function Hd(e){return this.__data__.has(e)}function vn(e){var t=-1,o=e==null?0:e.length;for(this.__data__=new xe;++t<o;)this.add(e[t])}vn.prototype.add=vn.prototype.push=jd,vn.prototype.has=Hd;function Kd(e,t){for(var o=-1,i=e==null?0:e.length;++o<i;)if(t(e[o],o,e))return!0;return!1}function Ud(e,t){return e.has(t)}var Wd=1,qd=2;function ga(e,t,o,i,a,r){var s=o&Wd,l=e.length,c=t.length;if(l!=c&&!(s&&c>l))return!1;var d=r.get(e),f=r.get(t);if(d&&f)return d==t&&f==e;var u=-1,p=!0,g=o&qd?new vn:void 0;for(r.set(e,t),r.set(t,e);++u<l;){var h=e[u],m=t[u];if(i)var y=s?i(m,h,u,t,e,r):i(h,m,u,e,t,r);if(y!==void 0){if(y)continue;p=!1;break}if(g){if(!Kd(t,function(b,C){if(!Ud(g,C)&&(h===b||a(h,b,o,i,r)))return g.push(C)})){p=!1;break}}else if(!(h===m||a(h,m,o,i,r))){p=!1;break}}return r.delete(e),r.delete(t),p}function Gd(e){var t=-1,o=Array(e.size);return e.forEach(function(i,a){o[++t]=[a,i]}),o}function Jd(e){var t=-1,o=Array(e.size);return e.forEach(function(i){o[++t]=i}),o}var Yd=1,Zd=2,Qd="[object Boolean]",Xd="[object Date]",ef="[object Error]",tf="[object Map]",nf="[object Number]",of="[object RegExp]",af="[object Set]",rf="[object String]",sf="[object Symbol]",lf="[object ArrayBuffer]",cf="[object DataView]",ya=ve?ve.prototype:void 0,So=ya?ya.valueOf:void 0;function df(e,t,o,i,a,r,s){switch(o){case cf:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case lf:return!(e.byteLength!=t.byteLength||!r(new ma(e),new ma(t)));case Qd:case Xd:case nf:return fo(+e,+t);case ef:return e.name==t.name&&e.message==t.message;case of:case rf:return e==t+"";case tf:var l=Gd;case af:var c=i&Yd;if(l||(l=Jd),e.size!=t.size&&!c)return!1;var d=s.get(e);if(d)return d==t;i|=Zd,s.set(e,t);var f=ga(l(e),l(t),i,a,r,s);return s.delete(e),f;case sf:if(So)return So.call(e)==So.call(t)}return!1}var ff=1,uf=Object.prototype,pf=uf.hasOwnProperty;function hf(e,t,o,i,a,r){var s=o&ff,l=ca(e),c=l.length,d=ca(t),f=d.length;if(c!=f&&!s)return!1;for(var u=c;u--;){var p=l[u];if(!(s?p in t:pf.call(t,p)))return!1}var g=r.get(e),h=r.get(t);if(g&&h)return g==t&&h==e;var m=!0;r.set(e,t),r.set(t,e);for(var y=s;++u<c;){p=l[u];var b=e[p],C=t[p];if(i)var I=s?i(C,b,p,t,e,r):i(b,C,p,e,t,r);if(!(I===void 0?b===C||a(b,C,o,i,r):I)){m=!1;break}y||(y=p=="constructor")}if(m&&!y){var k=e.constructor,v=t.constructor;k!=v&&"constructor"in e&&"constructor"in t&&!(typeof k=="function"&&k instanceof k&&typeof v=="function"&&v instanceof v)&&(m=!1)}return r.delete(e),r.delete(t),m}var mf=1,ba="[object Arguments]",wa="[object Array]",Sn="[object Object]",gf=Object.prototype,Ca=gf.hasOwnProperty;function yf(e,t,o,i,a,r){var s=ge(e),l=ge(t),c=s?wa:$e(e),d=l?wa:$e(t);c=c==ba?Sn:c,d=d==ba?Sn:d;var f=c==Sn,u=d==Sn,p=c==d;if(p&&ho(e)){if(!ho(t))return!1;s=!0,f=!1}if(p&&!f)return r||(r=new Ne),s||ia(e)?ga(e,t,o,i,a,r):df(e,t,c,o,i,a,r);if(!(o&mf)){var g=f&&Ca.call(e,"__wrapped__"),h=u&&Ca.call(t,"__wrapped__");if(g||h){var m=g?e.value():e,y=h?t.value():t;return r||(r=new Ne),a(m,y,o,i,r)}}return p?(r||(r=new Ne),hf(e,t,o,i,a,r)):!1}function kn(e,t,o,i,a){return e===t?!0:e==null||t==null||!ht(e)&&!ht(t)?e!==e&&t!==t:yf(e,t,o,i,kn,a)}var bf=1,wf=2;function Cf(e,t,o,i){var a=o.length,r=a;if(e==null)return!r;for(e=Object(e);a--;){var s=o[a];if(s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++a<r;){s=o[a];var l=s[0],c=e[l],d=s[1];if(s[2]){if(c===void 0&&!(l in e))return!1}else{var f=new Ne,u;if(!(u===void 0?kn(d,c,bf|wf,i,f):u))return!1}}return!0}function va(e){return e===e&&!Fe(e)}function vf(e){for(var t=aa(e),o=t.length;o--;){var i=t[o],a=e[i];t[o]=[i,a,va(a)]}return t}function Sa(e,t){return function(o){return o==null?!1:o[e]===t&&(t!==void 0||e in Object(o))}}function Sf(e){var t=vf(e);return t.length==1&&t[0][2]?Sa(t[0][0],t[0][1]):function(o){return o===e||Cf(o,e,t)}}function kf(e,t){return e!=null&&t in Object(e)}function Ef(e,t,o){t=Cn(t,e);for(var i=-1,a=t.length,r=!1;++i<a;){var s=jt(t[i]);if(!(r=e!=null&&o(e,s)))break;e=e[s]}return r||++i!=a?r:(a=e==null?0:e.length,!!a&&uo(a)&&co(s,a)&&(ge(e)||po(e)))}function ka(e,t){return e!=null&&Ef(e,t,kf)}var If=1,Tf=2;function Af(e,t){return go(e)&&va(t)?Sa(jt(e),t):function(o){var i=Be(o,e);return i===void 0&&i===t?ka(o,e):kn(t,i,If|Tf)}}function Of(e){return function(t){return t==null?void 0:t[e]}}function Mf(e){return function(t){return bo(t,e)}}function xf(e){return go(e)?Of(jt(e)):Mf(e)}function Bf(e){return typeof e=="function"?e:e==null?Ui:typeof e=="object"?ge(e)?Af(e[0],e[1]):Sf(e):xf(e)}var ko=function(){return Ce.Date.now()},Nf="Expected a function",_f=Math.max,Lf=Math.min;function Pf(e,t,o){var i,a,r,s,l,c,d=0,f=!1,u=!1,p=!0;if(typeof e!="function")throw new TypeError(Nf);t=Ki(t)||0,Fe(o)&&(f=!!o.leading,u="maxWait"in o,r=u?_f(Ki(o.maxWait)||0,t):r,p="trailing"in o?!!o.trailing:p);function g(S){var E=i,O=a;return i=a=void 0,d=S,s=e.apply(O,E),s}function h(S){return d=S,l=setTimeout(b,t),f?g(S):s}function m(S){var E=S-c,O=S-d,x=t-E;return u?Lf(x,r-O):x}function y(S){var E=S-c,O=S-d;return c===void 0||E>=t||E<0||u&&O>=r}function b(){var S=ko();if(y(S))return C(S);l=setTimeout(b,m(S))}function C(S){return l=void 0,p&&i?g(S):(i=a=void 0,s)}function I(){l!==void 0&&clearTimeout(l),d=0,i=c=a=l=void 0}function k(){return l===void 0?s:C(ko())}function v(){var S=ko(),E=y(S);if(i=arguments,a=this,c=S,E){if(l===void 0)return h(c);if(u)return clearTimeout(l),l=setTimeout(b,t),g(c)}return l===void 0&&(l=setTimeout(b,t)),s}return v.cancel=I,v.flush=k,v}function Vf(e,t,o){var i=e==null?0:e.length;if(!i)return-1;var a=i-1;return zl(e,Bf(t),a)}function Eo(e){for(var t=-1,o=e==null?0:e.length,i={};++t<o;){var a=e[t];Gi(i,a[0],a[1])}return i}function En(e,t){return kn(e,t)}function In(e){return e==null}function Ea(e){return e===void 0}function Rf(e,t,o,i){if(!Fe(e))return e;t=Cn(t,e);for(var a=-1,r=t.length,s=r-1,l=e;l!=null&&++a<r;){var c=jt(t[a]),d=o;if(c==="__proto__"||c==="constructor"||c==="prototype")return e;if(a!=s){var f=l[c];d=void 0,d===void 0&&(d=Fe(f)?f:co(t[a+1])?[]:{})}Wl(l,c,d),l=l[c]}return e}function Ff(e,t,o){for(var i=-1,a=t.length,r={};++i<a;){var s=t[i],l=bo(e,s);o(l,s)&&Rf(r,Cn(s,e),l)}return r}function Df(e,t){return Ff(e,t,function(o,i){return ka(e,i)})}var Ia=Sd(function(e,t){return e==null?{}:Df(e,t)});const ze=e=>e===void 0,_e=e=>typeof e=="boolean",G=e=>typeof e=="number",Xe=e=>typeof Element>"u"?!1:e instanceof Element,Ht=e=>In(e),$f=e=>me(e)?!Number.isNaN(Number(e)):!1,zf=(e="")=>e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d"),Ta=e=>Object.keys(e);class Aa extends Error{constructor(t){super(t),this.name="ElementPlusError"}}function Oa(e,t){throw new Aa(`[${e}] ${t}`)}function ne(e,t){if(process.env.NODE_ENV!=="production"){const o=me(e)?new Aa(`[${e}] ${t}`):e;console.warn(o)}}const jf="utils/dom/style",Ma=(e="")=>e.split(" ").filter(t=>!!t.trim()),xa=(e,t)=>{if(!e||!t)return!1;if(t.includes(" "))throw new Error("className should not contain space.");return e.classList.contains(t)},Io=(e,t)=>{!e||!t.trim()||e.classList.add(...Ma(t))},Kt=(e,t)=>{!e||!t.trim()||e.classList.remove(...Ma(t))},mt=(e,t)=>{var o;if(!K||!e||!t)return"";let i=Js(t);i==="float"&&(i="cssFloat");try{const a=e.style[i];if(a)return a;const r=(o=document.defaultView)==null?void 0:o.getComputedStyle(e,"");return r?r[i]:""}catch{return e.style[i]}};function et(e,t="px"){if(!e)return"";if(G(e)||$f(e))return`${e}${t}`;if(me(e))return e;ne(jf,"binding value must be a string or number")}let Tn;const Hf=e=>{var t;if(!K)return 0;if(Tn!==void 0)return Tn;const o=document.createElement("div");o.className=`${e}-scrollbar__wrap`,o.style.visibility="hidden",o.style.width="100px",o.style.position="absolute",o.style.top="-9999px",document.body.appendChild(o);const i=o.offsetWidth;o.style.overflow="scroll";const a=document.createElement("div");a.style.width="100%",o.appendChild(a);const r=a.offsetWidth;return(t=o.parentNode)==null||t.removeChild(o),Tn=i-r,Tn};function Kf(e,t){if(!K)return;if(!t){e.scrollTop=0;return}const o=[];let i=t.offsetParent;for(;i!==null&&e!==i&&e.contains(i);)o.push(i),i=i.offsetParent;const a=t.offsetTop+o.reduce((c,d)=>c+d.offsetTop,0),r=a+t.offsetHeight,s=e.scrollTop,l=s+e.clientHeight;a<s?e.scrollTop=a:r>l&&(e.scrollTop=r-e.clientHeight)}const Ba="__epPropKey",_=e=>e,Uf=e=>te(e)&&!!e[Ba],An=(e,t)=>{if(!te(e)||Uf(e))return e;const{values:o,required:i,default:a,type:r,validator:s}=e,c={type:r,required:!!i,validator:o||s?d=>{let f=!1,u=[];if(o&&(u=Array.from(o),Pi(e,"default")&&u.push(a),f||(f=u.includes(d))),s&&(f||(f=s(d))),!f&&u.length>0){const p=[...new Set(u)].map(g=>JSON.stringify(g)).join(", ");n.warn(`Invalid prop: validation failed${t?` for prop "${t}"`:""}. Expected one of [${p}], got value ${JSON.stringify(d)}.`)}return f}:void 0,[Ba]:!0};return Pi(e,"default")&&(c.default=a),c},R=e=>Eo(Object.entries(e).map(([t,o])=>[t,An(o,t)])),gt=_([String,Object,Function]),Wf={Close:W.Close},qf={validating:W.Loading,success:W.CircleCheck,error:W.CircleClose},oe=(e,t)=>{if(e.install=o=>{for(const i of[e,...Object.values(t??{})])o.component(i.name,i)},t)for(const[o,i]of Object.entries(t))e[o]=i;return e},Gf=(e,t)=>(e.install=o=>{o.directive(t,e)},e),tt=e=>(e.install=Je,e),Jf=(...e)=>t=>{e.forEach(o=>{Q(o)?o(t):o.value=t})},Ut={tab:"Tab",enter:"Enter",space:"Space",esc:"Escape",delete:"Delete"},X="update:modelValue",To="change",Na=["","default","small","large"];var On=(e=>(e[e.TEXT=1]="TEXT",e[e.CLASS=2]="CLASS",e[e.STYLE=4]="STYLE",e[e.PROPS=8]="PROPS",e[e.FULL_PROPS=16]="FULL_PROPS",e[e.HYDRATE_EVENTS=32]="HYDRATE_EVENTS",e[e.STABLE_FRAGMENT=64]="STABLE_FRAGMENT",e[e.KEYED_FRAGMENT=128]="KEYED_FRAGMENT",e[e.UNKEYED_FRAGMENT=256]="UNKEYED_FRAGMENT",e[e.NEED_PATCH=512]="NEED_PATCH",e[e.DYNAMIC_SLOTS=1024]="DYNAMIC_SLOTS",e[e.HOISTED=-1]="HOISTED",e[e.BAIL=-2]="BAIL",e))(On||{});const Yf=e=>/([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(e),Wt=e=>e,yt=({from:e,replacement:t,scope:o,version:i,ref:a,type:r="API"},s)=>{n.watch(()=>n.unref(s),l=>{l&&ne(o,`[${r}] ${e} is about to be deprecated in version ${i}, please use ${t} instead.
6
- For more detail, please visit: ${a}
7
- `)},{immediate:!0})},Zf=(e,t,o,i)=>{let a={offsetX:0,offsetY:0};const r=d=>{const f=d.clientX,u=d.clientY,{offsetX:p,offsetY:g}=a,h=e.value.getBoundingClientRect(),m=h.left,y=h.top,b=h.width,C=h.height,I=document.documentElement.clientWidth,k=document.documentElement.clientHeight,v=-m+p,S=-y+g,E=I-m-b+p,O=k-y-C+g,x=B=>{let T=p+B.clientX-f,L=g+B.clientY-u;i!=null&&i.value||(T=Math.min(Math.max(T,v),E),L=Math.min(Math.max(L,S),O)),a={offsetX:T,offsetY:L},e.value&&(e.value.style.transform=`translate(${et(T)}, ${et(L)})`)},N=()=>{document.removeEventListener("mousemove",x),document.removeEventListener("mouseup",N)};document.addEventListener("mousemove",x),document.addEventListener("mouseup",N)},s=()=>{t.value&&e.value&&t.value.addEventListener("mousedown",r)},l=()=>{t.value&&e.value&&t.value.removeEventListener("mousedown",r)},c=()=>{a={offsetX:0,offsetY:0},e.value&&(e.value.style.transform="none")};return n.onMounted(()=>{n.watchEffect(()=>{o.value?s():l()})}),n.onBeforeUnmount(()=>{l()}),{resetPosition:c}};var Qf={name:"en",el:{breadcrumb:{label:"Breadcrumb"},colorpicker:{confirm:"OK",clear:"Clear",defaultLabel:"color picker",description:"current color is {color}. press enter to select a new color.",alphaLabel:"pick alpha value"},datepicker:{now:"Now",today:"Today",cancel:"Cancel",clear:"Clear",confirm:"OK",dateTablePrompt:"Use the arrow keys and enter to select the day of the month",monthTablePrompt:"Use the arrow keys and enter to select the month",yearTablePrompt:"Use the arrow keys and enter to select the year",selectedDate:"Selected date",selectDate:"Select date",selectTime:"Select time",startDate:"Start Date",startTime:"Start Time",endDate:"End Date",endTime:"End Time",prevYear:"Previous Year",nextYear:"Next Year",prevMonth:"Previous Month",nextMonth:"Next Month",year:"",month1:"January",month2:"February",month3:"March",month4:"April",month5:"May",month6:"June",month7:"July",month8:"August",month9:"September",month10:"October",month11:"November",month12:"December",week:"week",weeks:{sun:"Sun",mon:"Mon",tue:"Tue",wed:"Wed",thu:"Thu",fri:"Fri",sat:"Sat"},weeksFull:{sun:"Sunday",mon:"Monday",tue:"Tuesday",wed:"Wednesday",thu:"Thursday",fri:"Friday",sat:"Saturday"},months:{jan:"Jan",feb:"Feb",mar:"Mar",apr:"Apr",may:"May",jun:"Jun",jul:"Jul",aug:"Aug",sep:"Sep",oct:"Oct",nov:"Nov",dec:"Dec"}},inputNumber:{decrease:"decrease number",increase:"increase number"},select:{loading:"Loading",noMatch:"No matching data",noData:"No data",placeholder:"Select"},mention:{loading:"Loading"},dropdown:{toggleDropdown:"Toggle Dropdown"},cascader:{noMatch:"No matching data",loading:"Loading",placeholder:"Select",noData:"No data"},pagination:{goto:"Go to",pagesize:"/page",total:"Total {total}",pageClassifier:"",page:"Page",prev:"Go to previous page",next:"Go to next page",currentPage:"page {pager}",prevPages:"Previous {pager} pages",nextPages:"Next {pager} pages",deprecationWarning:"Deprecated usages detected, please refer to the el-pagination documentation for more details"},dialog:{close:"Close this dialog"},drawer:{close:"Close this dialog"},messagebox:{title:"Message",confirm:"OK",cancel:"Cancel",error:"Illegal input",close:"Close this dialog"},upload:{deleteTip:"press delete to remove",delete:"Delete",preview:"Preview",continue:"Continue"},slider:{defaultLabel:"slider between {min} and {max}",defaultRangeStartLabel:"pick start value",defaultRangeEndLabel:"pick end value"},table:{emptyText:"No Data",confirmFilter:"Confirm",resetFilter:"Reset",clearFilter:"All",sumText:"Sum"},tour:{next:"Next",previous:"Previous",finish:"Finish"},tree:{emptyText:"No Data"},transfer:{noMatch:"No matching data",noData:"No data",titles:["List 1","List 2"],filterPlaceholder:"Enter keyword",noCheckedFormat:"{total} items",hasCheckedFormat:"{checked}/{total} checked"},image:{error:"FAILED"},pageHeader:{title:"Back"},popconfirm:{confirmButtonText:"Yes",cancelButtonText:"No"},carousel:{leftArrow:"Carousel arrow left",rightArrow:"Carousel arrow right",indicator:"Carousel switch to index {index}"}}};const Xf=e=>(t,o)=>eu(t,o,n.unref(e)),eu=(e,t,o)=>Be(o,e,e).replace(/\{(\w+)\}/g,(i,a)=>{var r;return`${(r=t==null?void 0:t[a])!=null?r:`{${a}}`}`}),tu=e=>{const t=n.computed(()=>n.unref(e).name),o=n.isRef(e)?e:n.ref(e);return{lang:t,locale:o,t:Xf(e)}},_a=Symbol("localeContextKey"),Ao=e=>{const t=e||n.inject(_a,n.ref());return tu(n.computed(()=>t.value||Qf))},qt="el",nu="is-",nt=(e,t,o,i,a)=>{let r=`${e}-${t}`;return o&&(r+=`-${o}`),i&&(r+=`__${i}`),a&&(r+=`--${a}`),r},La=Symbol("namespaceContextKey"),Oo=e=>{const t=e||(n.getCurrentInstance()?n.inject(La,n.ref(qt)):n.ref(qt));return n.computed(()=>n.unref(t)||qt)},D=(e,t)=>{const o=Oo(t);return{namespace:o,b:(m="")=>nt(o.value,e,m,"",""),e:m=>m?nt(o.value,e,"",m,""):"",m:m=>m?nt(o.value,e,"","",m):"",be:(m,y)=>m&&y?nt(o.value,e,m,y,""):"",em:(m,y)=>m&&y?nt(o.value,e,"",m,y):"",bm:(m,y)=>m&&y?nt(o.value,e,m,"",y):"",bem:(m,y,b)=>m&&y&&b?nt(o.value,e,m,y,b):"",is:(m,...y)=>{const b=y.length>=1?y[0]:!0;return m&&b?`${nu}${m}`:""},cssVar:m=>{const y={};for(const b in m)m[b]&&(y[`--${o.value}-${b}`]=m[b]);return y},cssVarName:m=>`--${o.value}-${m}`,cssVarBlock:m=>{const y={};for(const b in m)m[b]&&(y[`--${o.value}-${e}-${b}`]=m[b]);return y},cssVarBlockName:m=>`--${o.value}-${e}-${m}`}},ou=(e,t={})=>{n.isRef(e)||Oa("[useLockscreen]","You need to pass a ref param to this function");const o=t.ns||D("popup"),i=n.computed(()=>o.bm("parent","hidden"));if(!K||xa(document.body,i.value))return;let a=0,r=!1,s="0";const l=()=>{setTimeout(()=>{Kt(document==null?void 0:document.body,i.value),r&&document&&(document.body.style.width=s)},200)};n.watch(e,c=>{if(!c){l();return}r=!xa(document.body,i.value),r&&(s=document.body.style.width),a=Hf(o.namespace.value);const d=document.documentElement.clientHeight<document.body.scrollHeight,f=mt(document.body,"overflowY");a>0&&(d||f==="scroll")&&r&&(document.body.style.width=`calc(100% - ${a}px)`),Io(document.body,i.value)}),n.onScopeDispose(()=>l())},iu=An({type:_(Boolean),default:null}),au=An({type:_(Function)}),ru=e=>{const t=`update:${e}`,o=`onUpdate:${e}`,i=[t],a={[e]:iu,[o]:au};return{useModelToggle:({indicator:s,toggleReason:l,shouldHideWhenRouteChanges:c,shouldProceed:d,onShow:f,onHide:u})=>{const p=n.getCurrentInstance(),{emit:g}=p,h=p.props,m=n.computed(()=>Q(h[o])),y=n.computed(()=>h[e]===null),b=E=>{s.value!==!0&&(s.value=!0,l&&(l.value=E),Q(f)&&f(E))},C=E=>{s.value!==!1&&(s.value=!1,l&&(l.value=E),Q(u)&&u(E))},I=E=>{if(h.disabled===!0||Q(d)&&!d())return;const O=m.value&&K;O&&g(t,!0),(y.value||!O)&&b(E)},k=E=>{if(h.disabled===!0||!K)return;const O=m.value&&K;O&&g(t,!1),(y.value||!O)&&C(E)},v=E=>{_e(E)&&(h.disabled&&E?m.value&&g(t,!1):s.value!==E&&(E?b():C()))},S=()=>{s.value?k():I()};return n.watch(()=>h[e],v),c&&p.appContext.config.globalProperties.$route!==void 0&&n.watch(()=>({...p.proxy.$route}),()=>{c.value&&s.value&&k()}),n.onMounted(()=>{v(h[e])}),{hide:k,show:I,toggle:S,hasUpdateHandler:m}},useModelToggleProps:a,useModelToggleEmits:i}},Pa=e=>{const t=n.getCurrentInstance();return n.computed(()=>{var o,i;return(i=(o=t==null?void 0:t.proxy)==null?void 0:o.$props)==null?void 0:i[e]})};var ie="top",de="bottom",fe="right",ae="left",Mo="auto",Gt=[ie,de,fe,ae],bt="start",Jt="end",su="clippingParents",Va="viewport",Yt="popper",lu="reference",Ra=Gt.reduce(function(e,t){return e.concat([t+"-"+bt,t+"-"+Jt])},[]),Mn=[].concat(Gt,[Mo]).reduce(function(e,t){return e.concat([t,t+"-"+bt,t+"-"+Jt])},[]),cu="beforeRead",du="read",fu="afterRead",uu="beforeMain",pu="main",hu="afterMain",mu="beforeWrite",gu="write",yu="afterWrite",bu=[cu,du,fu,uu,pu,hu,mu,gu,yu];function Se(e){return e?(e.nodeName||"").toLowerCase():null}function ye(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function wt(e){var t=ye(e).Element;return e instanceof t||e instanceof Element}function ue(e){var t=ye(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function xo(e){if(typeof ShadowRoot>"u")return!1;var t=ye(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function wu(e){var t=e.state;Object.keys(t.elements).forEach(function(o){var i=t.styles[o]||{},a=t.attributes[o]||{},r=t.elements[o];!ue(r)||!Se(r)||(Object.assign(r.style,i),Object.keys(a).forEach(function(s){var l=a[s];l===!1?r.removeAttribute(s):r.setAttribute(s,l===!0?"":l)}))})}function Cu(e){var t=e.state,o={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,o.popper),t.styles=o,t.elements.arrow&&Object.assign(t.elements.arrow.style,o.arrow),function(){Object.keys(t.elements).forEach(function(i){var a=t.elements[i],r=t.attributes[i]||{},s=Object.keys(t.styles.hasOwnProperty(i)?t.styles[i]:o[i]),l=s.reduce(function(c,d){return c[d]="",c},{});!ue(a)||!Se(a)||(Object.assign(a.style,l),Object.keys(r).forEach(function(c){a.removeAttribute(c)}))})}}var Fa={name:"applyStyles",enabled:!0,phase:"write",fn:wu,effect:Cu,requires:["computeStyles"]};function ke(e){return e.split("-")[0]}var ot=Math.max,xn=Math.min,Ct=Math.round;function vt(e,t){t===void 0&&(t=!1);var o=e.getBoundingClientRect(),i=1,a=1;if(ue(e)&&t){var r=e.offsetHeight,s=e.offsetWidth;s>0&&(i=Ct(o.width)/s||1),r>0&&(a=Ct(o.height)/r||1)}return{width:o.width/i,height:o.height/a,top:o.top/a,right:o.right/i,bottom:o.bottom/a,left:o.left/i,x:o.left/i,y:o.top/a}}function Bo(e){var t=vt(e),o=e.offsetWidth,i=e.offsetHeight;return Math.abs(t.width-o)<=1&&(o=t.width),Math.abs(t.height-i)<=1&&(i=t.height),{x:e.offsetLeft,y:e.offsetTop,width:o,height:i}}function Da(e,t){var o=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(o&&xo(o)){var i=t;do{if(i&&e.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function Le(e){return ye(e).getComputedStyle(e)}function vu(e){return["table","td","th"].indexOf(Se(e))>=0}function je(e){return((wt(e)?e.ownerDocument:e.document)||window.document).documentElement}function Bn(e){return Se(e)==="html"?e:e.assignedSlot||e.parentNode||(xo(e)?e.host:null)||je(e)}function $a(e){return!ue(e)||Le(e).position==="fixed"?null:e.offsetParent}function Su(e){var t=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1,o=navigator.userAgent.indexOf("Trident")!==-1;if(o&&ue(e)){var i=Le(e);if(i.position==="fixed")return null}var a=Bn(e);for(xo(a)&&(a=a.host);ue(a)&&["html","body"].indexOf(Se(a))<0;){var r=Le(a);if(r.transform!=="none"||r.perspective!=="none"||r.contain==="paint"||["transform","perspective"].indexOf(r.willChange)!==-1||t&&r.willChange==="filter"||t&&r.filter&&r.filter!=="none")return a;a=a.parentNode}return null}function Zt(e){for(var t=ye(e),o=$a(e);o&&vu(o)&&Le(o).position==="static";)o=$a(o);return o&&(Se(o)==="html"||Se(o)==="body"&&Le(o).position==="static")?t:o||Su(e)||t}function No(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Qt(e,t,o){return ot(e,xn(t,o))}function ku(e,t,o){var i=Qt(e,t,o);return i>o?o:i}function za(){return{top:0,right:0,bottom:0,left:0}}function ja(e){return Object.assign({},za(),e)}function Ha(e,t){return t.reduce(function(o,i){return o[i]=e,o},{})}var Eu=function(e,t){return e=typeof e=="function"?e(Object.assign({},t.rects,{placement:t.placement})):e,ja(typeof e!="number"?e:Ha(e,Gt))};function Iu(e){var t,o=e.state,i=e.name,a=e.options,r=o.elements.arrow,s=o.modifiersData.popperOffsets,l=ke(o.placement),c=No(l),d=[ae,fe].indexOf(l)>=0,f=d?"height":"width";if(!(!r||!s)){var u=Eu(a.padding,o),p=Bo(r),g=c==="y"?ie:ae,h=c==="y"?de:fe,m=o.rects.reference[f]+o.rects.reference[c]-s[c]-o.rects.popper[f],y=s[c]-o.rects.reference[c],b=Zt(r),C=b?c==="y"?b.clientHeight||0:b.clientWidth||0:0,I=m/2-y/2,k=u[g],v=C-p[f]-u[h],S=C/2-p[f]/2+I,E=Qt(k,S,v),O=c;o.modifiersData[i]=(t={},t[O]=E,t.centerOffset=E-S,t)}}function Tu(e){var t=e.state,o=e.options,i=o.element,a=i===void 0?"[data-popper-arrow]":i;a!=null&&(typeof a=="string"&&(a=t.elements.popper.querySelector(a),!a)||!Da(t.elements.popper,a)||(t.elements.arrow=a))}var Au={name:"arrow",enabled:!0,phase:"main",fn:Iu,effect:Tu,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function St(e){return e.split("-")[1]}var Ou={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Mu(e){var t=e.x,o=e.y,i=window,a=i.devicePixelRatio||1;return{x:Ct(t*a)/a||0,y:Ct(o*a)/a||0}}function Ka(e){var t,o=e.popper,i=e.popperRect,a=e.placement,r=e.variation,s=e.offsets,l=e.position,c=e.gpuAcceleration,d=e.adaptive,f=e.roundOffsets,u=e.isFixed,p=s.x,g=p===void 0?0:p,h=s.y,m=h===void 0?0:h,y=typeof f=="function"?f({x:g,y:m}):{x:g,y:m};g=y.x,m=y.y;var b=s.hasOwnProperty("x"),C=s.hasOwnProperty("y"),I=ae,k=ie,v=window;if(d){var S=Zt(o),E="clientHeight",O="clientWidth";if(S===ye(o)&&(S=je(o),Le(S).position!=="static"&&l==="absolute"&&(E="scrollHeight",O="scrollWidth")),S=S,a===ie||(a===ae||a===fe)&&r===Jt){k=de;var x=u&&S===v&&v.visualViewport?v.visualViewport.height:S[E];m-=x-i.height,m*=c?1:-1}if(a===ae||(a===ie||a===de)&&r===Jt){I=fe;var N=u&&S===v&&v.visualViewport?v.visualViewport.width:S[O];g-=N-i.width,g*=c?1:-1}}var B=Object.assign({position:l},d&&Ou),T=f===!0?Mu({x:g,y:m}):{x:g,y:m};if(g=T.x,m=T.y,c){var L;return Object.assign({},B,(L={},L[k]=C?"0":"",L[I]=b?"0":"",L.transform=(v.devicePixelRatio||1)<=1?"translate("+g+"px, "+m+"px)":"translate3d("+g+"px, "+m+"px, 0)",L))}return Object.assign({},B,(t={},t[k]=C?m+"px":"",t[I]=b?g+"px":"",t.transform="",t))}function xu(e){var t=e.state,o=e.options,i=o.gpuAcceleration,a=i===void 0?!0:i,r=o.adaptive,s=r===void 0?!0:r,l=o.roundOffsets,c=l===void 0?!0:l,d={placement:ke(t.placement),variation:St(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:a,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,Ka(Object.assign({},d,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,Ka(Object.assign({},d,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var Ua={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:xu,data:{}},Nn={passive:!0};function Bu(e){var t=e.state,o=e.instance,i=e.options,a=i.scroll,r=a===void 0?!0:a,s=i.resize,l=s===void 0?!0:s,c=ye(t.elements.popper),d=[].concat(t.scrollParents.reference,t.scrollParents.popper);return r&&d.forEach(function(f){f.addEventListener("scroll",o.update,Nn)}),l&&c.addEventListener("resize",o.update,Nn),function(){r&&d.forEach(function(f){f.removeEventListener("scroll",o.update,Nn)}),l&&c.removeEventListener("resize",o.update,Nn)}}var Wa={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Bu,data:{}},Nu={left:"right",right:"left",bottom:"top",top:"bottom"};function _n(e){return e.replace(/left|right|bottom|top/g,function(t){return Nu[t]})}var _u={start:"end",end:"start"};function qa(e){return e.replace(/start|end/g,function(t){return _u[t]})}function _o(e){var t=ye(e),o=t.pageXOffset,i=t.pageYOffset;return{scrollLeft:o,scrollTop:i}}function Lo(e){return vt(je(e)).left+_o(e).scrollLeft}function Lu(e){var t=ye(e),o=je(e),i=t.visualViewport,a=o.clientWidth,r=o.clientHeight,s=0,l=0;return i&&(a=i.width,r=i.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(s=i.offsetLeft,l=i.offsetTop)),{width:a,height:r,x:s+Lo(e),y:l}}function Pu(e){var t,o=je(e),i=_o(e),a=(t=e.ownerDocument)==null?void 0:t.body,r=ot(o.scrollWidth,o.clientWidth,a?a.scrollWidth:0,a?a.clientWidth:0),s=ot(o.scrollHeight,o.clientHeight,a?a.scrollHeight:0,a?a.clientHeight:0),l=-i.scrollLeft+Lo(e),c=-i.scrollTop;return Le(a||o).direction==="rtl"&&(l+=ot(o.clientWidth,a?a.clientWidth:0)-r),{width:r,height:s,x:l,y:c}}function Po(e){var t=Le(e),o=t.overflow,i=t.overflowX,a=t.overflowY;return/auto|scroll|overlay|hidden/.test(o+a+i)}function Ga(e){return["html","body","#document"].indexOf(Se(e))>=0?e.ownerDocument.body:ue(e)&&Po(e)?e:Ga(Bn(e))}function Xt(e,t){var o;t===void 0&&(t=[]);var i=Ga(e),a=i===((o=e.ownerDocument)==null?void 0:o.body),r=ye(i),s=a?[r].concat(r.visualViewport||[],Po(i)?i:[]):i,l=t.concat(s);return a?l:l.concat(Xt(Bn(s)))}function Vo(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Vu(e){var t=vt(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}function Ja(e,t){return t===Va?Vo(Lu(e)):wt(t)?Vu(t):Vo(Pu(je(e)))}function Ru(e){var t=Xt(Bn(e)),o=["absolute","fixed"].indexOf(Le(e).position)>=0,i=o&&ue(e)?Zt(e):e;return wt(i)?t.filter(function(a){return wt(a)&&Da(a,i)&&Se(a)!=="body"}):[]}function Fu(e,t,o){var i=t==="clippingParents"?Ru(e):[].concat(t),a=[].concat(i,[o]),r=a[0],s=a.reduce(function(l,c){var d=Ja(e,c);return l.top=ot(d.top,l.top),l.right=xn(d.right,l.right),l.bottom=xn(d.bottom,l.bottom),l.left=ot(d.left,l.left),l},Ja(e,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function Ya(e){var t=e.reference,o=e.element,i=e.placement,a=i?ke(i):null,r=i?St(i):null,s=t.x+t.width/2-o.width/2,l=t.y+t.height/2-o.height/2,c;switch(a){case ie:c={x:s,y:t.y-o.height};break;case de:c={x:s,y:t.y+t.height};break;case fe:c={x:t.x+t.width,y:l};break;case ae:c={x:t.x-o.width,y:l};break;default:c={x:t.x,y:t.y}}var d=a?No(a):null;if(d!=null){var f=d==="y"?"height":"width";switch(r){case bt:c[d]=c[d]-(t[f]/2-o[f]/2);break;case Jt:c[d]=c[d]+(t[f]/2-o[f]/2);break}}return c}function en(e,t){t===void 0&&(t={});var o=t,i=o.placement,a=i===void 0?e.placement:i,r=o.boundary,s=r===void 0?su:r,l=o.rootBoundary,c=l===void 0?Va:l,d=o.elementContext,f=d===void 0?Yt:d,u=o.altBoundary,p=u===void 0?!1:u,g=o.padding,h=g===void 0?0:g,m=ja(typeof h!="number"?h:Ha(h,Gt)),y=f===Yt?lu:Yt,b=e.rects.popper,C=e.elements[p?y:f],I=Fu(wt(C)?C:C.contextElement||je(e.elements.popper),s,c),k=vt(e.elements.reference),v=Ya({reference:k,element:b,placement:a}),S=Vo(Object.assign({},b,v)),E=f===Yt?S:k,O={top:I.top-E.top+m.top,bottom:E.bottom-I.bottom+m.bottom,left:I.left-E.left+m.left,right:E.right-I.right+m.right},x=e.modifiersData.offset;if(f===Yt&&x){var N=x[a];Object.keys(O).forEach(function(B){var T=[fe,de].indexOf(B)>=0?1:-1,L=[ie,de].indexOf(B)>=0?"y":"x";O[B]+=N[L]*T})}return O}function Du(e,t){t===void 0&&(t={});var o=t,i=o.placement,a=o.boundary,r=o.rootBoundary,s=o.padding,l=o.flipVariations,c=o.allowedAutoPlacements,d=c===void 0?Mn:c,f=St(i),u=f?l?Ra:Ra.filter(function(h){return St(h)===f}):Gt,p=u.filter(function(h){return d.indexOf(h)>=0});p.length===0&&(p=u);var g=p.reduce(function(h,m){return h[m]=en(e,{placement:m,boundary:a,rootBoundary:r,padding:s})[ke(m)],h},{});return Object.keys(g).sort(function(h,m){return g[h]-g[m]})}function $u(e){if(ke(e)===Mo)return[];var t=_n(e);return[qa(e),t,qa(t)]}function zu(e){var t=e.state,o=e.options,i=e.name;if(!t.modifiersData[i]._skip){for(var a=o.mainAxis,r=a===void 0?!0:a,s=o.altAxis,l=s===void 0?!0:s,c=o.fallbackPlacements,d=o.padding,f=o.boundary,u=o.rootBoundary,p=o.altBoundary,g=o.flipVariations,h=g===void 0?!0:g,m=o.allowedAutoPlacements,y=t.options.placement,b=ke(y),C=b===y,I=c||(C||!h?[_n(y)]:$u(y)),k=[y].concat(I).reduce(function(Ie,re){return Ie.concat(ke(re)===Mo?Du(t,{placement:re,boundary:f,rootBoundary:u,padding:d,flipVariations:h,allowedAutoPlacements:m}):re)},[]),v=t.rects.reference,S=t.rects.popper,E=new Map,O=!0,x=k[0],N=0;N<k.length;N++){var B=k[N],T=ke(B),L=St(B)===bt,q=[ie,de].indexOf(T)>=0,V=q?"width":"height",M=en(t,{placement:B,boundary:f,rootBoundary:u,altBoundary:p,padding:d}),$=q?L?fe:ae:L?de:ie;v[V]>S[V]&&($=_n($));var pe=_n($),Y=[];if(r&&Y.push(M[T]<=0),l&&Y.push(M[$]<=0,M[pe]<=0),Y.every(function(Ie){return Ie})){x=B,O=!1;break}E.set(B,Y)}if(O)for(var Z=h?3:1,ce=function(Ie){var re=k.find(function(U){var lt=E.get(U);if(lt)return lt.slice(0,Ie).every(function(qe){return qe})});if(re)return x=re,"break"},Ee=Z;Ee>0;Ee--){var Nt=ce(Ee);if(Nt==="break")break}t.placement!==x&&(t.modifiersData[i]._skip=!0,t.placement=x,t.reset=!0)}}var ju={name:"flip",enabled:!0,phase:"main",fn:zu,requiresIfExists:["offset"],data:{_skip:!1}};function Za(e,t,o){return o===void 0&&(o={x:0,y:0}),{top:e.top-t.height-o.y,right:e.right-t.width+o.x,bottom:e.bottom-t.height+o.y,left:e.left-t.width-o.x}}function Qa(e){return[ie,fe,de,ae].some(function(t){return e[t]>=0})}function Hu(e){var t=e.state,o=e.name,i=t.rects.reference,a=t.rects.popper,r=t.modifiersData.preventOverflow,s=en(t,{elementContext:"reference"}),l=en(t,{altBoundary:!0}),c=Za(s,i),d=Za(l,a,r),f=Qa(c),u=Qa(d);t.modifiersData[o]={referenceClippingOffsets:c,popperEscapeOffsets:d,isReferenceHidden:f,hasPopperEscaped:u},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":f,"data-popper-escaped":u})}var Ku={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Hu};function Uu(e,t,o){var i=ke(e),a=[ae,ie].indexOf(i)>=0?-1:1,r=typeof o=="function"?o(Object.assign({},t,{placement:e})):o,s=r[0],l=r[1];return s=s||0,l=(l||0)*a,[ae,fe].indexOf(i)>=0?{x:l,y:s}:{x:s,y:l}}function Wu(e){var t=e.state,o=e.options,i=e.name,a=o.offset,r=a===void 0?[0,0]:a,s=Mn.reduce(function(f,u){return f[u]=Uu(u,t.rects,r),f},{}),l=s[t.placement],c=l.x,d=l.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=d),t.modifiersData[i]=s}var qu={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Wu};function Gu(e){var t=e.state,o=e.name;t.modifiersData[o]=Ya({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}var Xa={name:"popperOffsets",enabled:!0,phase:"read",fn:Gu,data:{}};function Ju(e){return e==="x"?"y":"x"}function Yu(e){var t=e.state,o=e.options,i=e.name,a=o.mainAxis,r=a===void 0?!0:a,s=o.altAxis,l=s===void 0?!1:s,c=o.boundary,d=o.rootBoundary,f=o.altBoundary,u=o.padding,p=o.tether,g=p===void 0?!0:p,h=o.tetherOffset,m=h===void 0?0:h,y=en(t,{boundary:c,rootBoundary:d,padding:u,altBoundary:f}),b=ke(t.placement),C=St(t.placement),I=!C,k=No(b),v=Ju(k),S=t.modifiersData.popperOffsets,E=t.rects.reference,O=t.rects.popper,x=typeof m=="function"?m(Object.assign({},t.rects,{placement:t.placement})):m,N=typeof x=="number"?{mainAxis:x,altAxis:x}:Object.assign({mainAxis:0,altAxis:0},x),B=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,T={x:0,y:0};if(S){if(r){var L,q=k==="y"?ie:ae,V=k==="y"?de:fe,M=k==="y"?"height":"width",$=S[k],pe=$+y[q],Y=$-y[V],Z=g?-O[M]/2:0,ce=C===bt?E[M]:O[M],Ee=C===bt?-O[M]:-E[M],Nt=t.elements.arrow,Ie=g&&Nt?Bo(Nt):{width:0,height:0},re=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:za(),U=re[q],lt=re[V],qe=Qt(0,E[M],Ie[M]),Yn=I?E[M]/2-Z-qe-U-N.mainAxis:ce-qe-U-N.mainAxis,Zn=I?-E[M]/2+Z+qe+lt+N.mainAxis:Ee+qe+lt+N.mainAxis,sn=t.elements.arrow&&Zt(t.elements.arrow),gi=sn?k==="y"?sn.clientTop||0:sn.clientLeft||0:0,Qn=(L=B==null?void 0:B[k])!=null?L:0,yi=$+Yn-Qn-gi,bi=$+Zn-Qn,ct=Qt(g?xn(pe,yi):pe,$,g?ot(Y,bi):Y);S[k]=ct,T[k]=ct-$}if(l){var ln,_t=k==="x"?ie:ae,Xn=k==="x"?de:fe,Ve=S[v],Lt=v==="y"?"height":"width",cn=Ve+y[_t],eo=Ve-y[Xn],dt=[ie,ae].indexOf(b)!==-1,dn=(ln=B==null?void 0:B[v])!=null?ln:0,fn=dt?cn:Ve-E[Lt]-O[Lt]-dn+N.altAxis,un=dt?Ve+E[Lt]+O[Lt]-dn-N.altAxis:eo,pn=g&&dt?ku(fn,Ve,un):Qt(g?fn:cn,Ve,g?un:eo);S[v]=pn,T[v]=pn-Ve}t.modifiersData[i]=T}}var Zu={name:"preventOverflow",enabled:!0,phase:"main",fn:Yu,requiresIfExists:["offset"]};function Qu(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Xu(e){return e===ye(e)||!ue(e)?_o(e):Qu(e)}function ep(e){var t=e.getBoundingClientRect(),o=Ct(t.width)/e.offsetWidth||1,i=Ct(t.height)/e.offsetHeight||1;return o!==1||i!==1}function tp(e,t,o){o===void 0&&(o=!1);var i=ue(t),a=ue(t)&&ep(t),r=je(t),s=vt(e,a),l={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(i||!i&&!o)&&((Se(t)!=="body"||Po(r))&&(l=Xu(t)),ue(t)?(c=vt(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):r&&(c.x=Lo(r))),{x:s.left+l.scrollLeft-c.x,y:s.top+l.scrollTop-c.y,width:s.width,height:s.height}}function np(e){var t=new Map,o=new Set,i=[];e.forEach(function(r){t.set(r.name,r)});function a(r){o.add(r.name);var s=[].concat(r.requires||[],r.requiresIfExists||[]);s.forEach(function(l){if(!o.has(l)){var c=t.get(l);c&&a(c)}}),i.push(r)}return e.forEach(function(r){o.has(r.name)||a(r)}),i}function op(e){var t=np(e);return bu.reduce(function(o,i){return o.concat(t.filter(function(a){return a.phase===i}))},[])}function ip(e){var t;return function(){return t||(t=new Promise(function(o){Promise.resolve().then(function(){t=void 0,o(e())})})),t}}function ap(e){var t=e.reduce(function(o,i){var a=o[i.name];return o[i.name]=a?Object.assign({},a,i,{options:Object.assign({},a.options,i.options),data:Object.assign({},a.data,i.data)}):i,o},{});return Object.keys(t).map(function(o){return t[o]})}var er={placement:"bottom",modifiers:[],strategy:"absolute"};function tr(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return!t.some(function(i){return!(i&&typeof i.getBoundingClientRect=="function")})}function Ro(e){e===void 0&&(e={});var t=e,o=t.defaultModifiers,i=o===void 0?[]:o,a=t.defaultOptions,r=a===void 0?er:a;return function(s,l,c){c===void 0&&(c=r);var d={placement:"bottom",orderedModifiers:[],options:Object.assign({},er,r),modifiersData:{},elements:{reference:s,popper:l},attributes:{},styles:{}},f=[],u=!1,p={state:d,setOptions:function(m){var y=typeof m=="function"?m(d.options):m;h(),d.options=Object.assign({},r,d.options,y),d.scrollParents={reference:wt(s)?Xt(s):s.contextElement?Xt(s.contextElement):[],popper:Xt(l)};var b=op(ap([].concat(i,d.options.modifiers)));return d.orderedModifiers=b.filter(function(C){return C.enabled}),g(),p.update()},forceUpdate:function(){if(!u){var m=d.elements,y=m.reference,b=m.popper;if(tr(y,b)){d.rects={reference:tp(y,Zt(b),d.options.strategy==="fixed"),popper:Bo(b)},d.reset=!1,d.placement=d.options.placement,d.orderedModifiers.forEach(function(O){return d.modifiersData[O.name]=Object.assign({},O.data)});for(var C=0;C<d.orderedModifiers.length;C++){if(d.reset===!0){d.reset=!1,C=-1;continue}var I=d.orderedModifiers[C],k=I.fn,v=I.options,S=v===void 0?{}:v,E=I.name;typeof k=="function"&&(d=k({state:d,options:S,name:E,instance:p})||d)}}}},update:ip(function(){return new Promise(function(m){p.forceUpdate(),m(d)})}),destroy:function(){h(),u=!0}};if(!tr(s,l))return p;p.setOptions(c).then(function(m){!u&&c.onFirstUpdate&&c.onFirstUpdate(m)});function g(){d.orderedModifiers.forEach(function(m){var y=m.name,b=m.options,C=b===void 0?{}:b,I=m.effect;if(typeof I=="function"){var k=I({state:d,name:y,instance:p,options:C}),v=function(){};f.push(k||v)}})}function h(){f.forEach(function(m){return m()}),f=[]}return p}}Ro();var rp=[Wa,Xa,Ua,Fa];Ro({defaultModifiers:rp});var sp=[Wa,Xa,Ua,Fa,qu,ju,Zu,Au,Ku],lp=Ro({defaultModifiers:sp});const cp=(e,t,o={})=>{const i={name:"updateState",enabled:!0,phase:"write",fn:({state:c})=>{const d=dp(c);Object.assign(s.value,d)},requires:["computeStyles"]},a=n.computed(()=>{const{onFirstUpdate:c,placement:d,strategy:f,modifiers:u}=n.unref(o);return{onFirstUpdate:c,placement:d||"bottom",strategy:f||"absolute",modifiers:[...u||[],i,{name:"applyStyles",enabled:!1}]}}),r=n.shallowRef(),s=n.ref({styles:{popper:{position:n.unref(a).strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),l=()=>{r.value&&(r.value.destroy(),r.value=void 0)};return n.watch(a,c=>{const d=n.unref(r);d&&d.setOptions(c)},{deep:!0}),n.watch([e,t],([c,d])=>{l(),!(!c||!d)&&(r.value=lp(c,d,n.unref(a)))}),n.onBeforeUnmount(()=>{l()}),{state:n.computed(()=>{var c;return{...((c=n.unref(r))==null?void 0:c.state)||{}}}),styles:n.computed(()=>n.unref(s).styles),attributes:n.computed(()=>n.unref(s).attributes),update:()=>{var c;return(c=n.unref(r))==null?void 0:c.update()},forceUpdate:()=>{var c;return(c=n.unref(r))==null?void 0:c.forceUpdate()},instanceRef:n.computed(()=>n.unref(r))}};function dp(e){const t=Object.keys(e.elements),o=Eo(t.map(a=>[a,e.styles[a]||{}])),i=Eo(t.map(a=>[a,e.attributes[a]]));return{styles:o,attributes:i}}const nr=e=>{if(!e)return{onClick:Je,onMousedown:Je,onMouseup:Je};let t=!1,o=!1;return{onClick:s=>{t&&o&&e(s),t=o=!1},onMousedown:s=>{t=s.target===s.currentTarget},onMouseup:s=>{o=s.target===s.currentTarget}}};function or(){let e;const t=(i,a)=>{o(),e=window.setTimeout(i,a)},o=()=>window.clearTimeout(e);return Rt(()=>o()),{registerTimeout:t,cancelTimeout:o}}const Fo={prefix:Math.floor(Math.random()*1e4),current:0},fp=Symbol("elIdInjection"),ir=()=>n.getCurrentInstance()?n.inject(fp,Fo):Fo,it=e=>{const t=ir();!K&&t===Fo&&ne("IdInjection",`Looks like you are using server rendering, you must provide a id provider to ensure the hydration process to be succeed
5
+ **/process.env.NODE_ENV!=="production"&&Object.freeze({}),process.env.NODE_ENV!=="production"&&Object.freeze([]);const Je=()=>{},Ws=Object.prototype.hasOwnProperty,Vi=(e,t)=>Ws.call(e,t),ee=Array.isArray,Q=e=>typeof e=="function",me=e=>typeof e=="string",te=e=>e!==null&&typeof e=="object",qs=Object.prototype.toString,Gs=e=>qs.call(e),so=e=>Gs(e).slice(8,-1),Ri=e=>{const t=Object.create(null);return o=>t[o]||(t[o]=e(o))},Js=/-(\w)/g,Ys=Ri(e=>e.replace(Js,(t,o)=>o?o.toUpperCase():"")),Zs=/\B([A-Z])/g,Qs=Ri(e=>e.replace(Zs,"-$1").toLowerCase());var Fi=typeof global=="object"&&global&&global.Object===Object&&global,Xs=typeof self=="object"&&self&&self.Object===Object&&self,Ce=Fi||Xs||Function("return this")(),ve=Ce.Symbol,Di=Object.prototype,el=Di.hasOwnProperty,tl=Di.toString,Dt=ve?ve.toStringTag:void 0;function nl(e){var t=el.call(e,Dt),o=e[Dt];try{e[Dt]=void 0;var i=!0}catch{}var r=tl.call(e);return i&&(t?e[Dt]=o:delete e[Dt]),r}var ol=Object.prototype,il=ol.toString;function rl(e){return il.call(e)}var al="[object Null]",sl="[object Undefined]",$i=ve?ve.toStringTag:void 0;function pt(e){return e==null?e===void 0?sl:al:$i&&$i in Object(e)?nl(e):rl(e)}function ht(e){return e!=null&&typeof e=="object"}var ll="[object Symbol]";function yn(e){return typeof e=="symbol"||ht(e)&&pt(e)==ll}function cl(e,t){for(var o=-1,i=e==null?0:e.length,r=Array(i);++o<i;)r[o]=t(e[o],o,e);return r}var ge=Array.isArray,zi=ve?ve.prototype:void 0,ji=zi?zi.toString:void 0;function Hi(e){if(typeof e=="string")return e;if(ge(e))return cl(e,Hi)+"";if(yn(e))return ji?ji.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var dl=/\s/;function fl(e){for(var t=e.length;t--&&dl.test(e.charAt(t)););return t}var ul=/^\s+/;function pl(e){return e&&e.slice(0,fl(e)+1).replace(ul,"")}function Fe(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Ki=NaN,hl=/^[-+]0x[0-9a-f]+$/i,ml=/^0b[01]+$/i,gl=/^0o[0-7]+$/i,yl=parseInt;function Ui(e){if(typeof e=="number")return e;if(yn(e))return Ki;if(Fe(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Fe(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=pl(e);var o=ml.test(e);return o||gl.test(e)?yl(e.slice(2),o?2:8):hl.test(e)?Ki:+e}function Wi(e){return e}var bl="[object AsyncFunction]",wl="[object Function]",Cl="[object GeneratorFunction]",vl="[object Proxy]";function qi(e){if(!Fe(e))return!1;var t=pt(e);return t==wl||t==Cl||t==bl||t==vl}var lo=Ce["__core-js_shared__"],Gi=function(){var e=/[^.]+$/.exec(lo&&lo.keys&&lo.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Sl(e){return!!Gi&&Gi in e}var kl=Function.prototype,El=kl.toString;function Ye(e){if(e!=null){try{return El.call(e)}catch{}try{return e+""}catch{}}return""}var Il=/[\\^$.*+?()[\]{}|]/g,Tl=/^\[object .+?Constructor\]$/,Al=Function.prototype,Ol=Object.prototype,Ml=Al.toString,xl=Ol.hasOwnProperty,Bl=RegExp("^"+Ml.call(xl).replace(Il,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Nl(e){if(!Fe(e)||Sl(e))return!1;var t=qi(e)?Bl:Tl;return t.test(Ye(e))}function _l(e,t){return e==null?void 0:e[t]}function Ze(e,t){var o=_l(e,t);return Nl(o)?o:void 0}var co=Ze(Ce,"WeakMap");function Ll(e,t,o){switch(o.length){case 0:return e.call(t);case 1:return e.call(t,o[0]);case 2:return e.call(t,o[0],o[1]);case 3:return e.call(t,o[0],o[1],o[2])}return e.apply(t,o)}var Pl=800,Vl=16,Rl=Date.now;function Fl(e){var t=0,o=0;return function(){var i=Rl(),r=Vl-(i-o);if(o=i,r>0){if(++t>=Pl)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Dl(e){return function(){return e}}var bn=function(){try{var e=Ze(Object,"defineProperty");return e({},"",{}),e}catch{}}(),$l=bn?function(e,t){return bn(e,"toString",{configurable:!0,enumerable:!1,value:Dl(t),writable:!0})}:Wi,zl=Fl($l);function jl(e,t,o,i){e.length;for(var r=o+1;r--;)if(t(e[r],r,e))return r;return-1}var Hl=9007199254740991,Kl=/^(?:0|[1-9]\d*)$/;function fo(e,t){var o=typeof e;return t=t??Hl,!!t&&(o=="number"||o!="symbol"&&Kl.test(e))&&e>-1&&e%1==0&&e<t}function Ji(e,t,o){t=="__proto__"&&bn?bn(e,t,{configurable:!0,enumerable:!0,value:o,writable:!0}):e[t]=o}function uo(e,t){return e===t||e!==e&&t!==t}var Ul=Object.prototype,Wl=Ul.hasOwnProperty;function ql(e,t,o){var i=e[t];(!(Wl.call(e,t)&&uo(i,o))||o===void 0&&!(t in e))&&Ji(e,t,o)}var Yi=Math.max;function Gl(e,t,o){return t=Yi(t===void 0?e.length-1:t,0),function(){for(var i=arguments,r=-1,a=Yi(i.length-t,0),s=Array(a);++r<a;)s[r]=i[t+r];r=-1;for(var l=Array(t+1);++r<t;)l[r]=i[r];return l[t]=o(s),Ll(e,this,l)}}var Jl=9007199254740991;function po(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Jl}function Yl(e){return e!=null&&po(e.length)&&!qi(e)}var Zl=Object.prototype;function Ql(e){var t=e&&e.constructor,o=typeof t=="function"&&t.prototype||Zl;return e===o}function Xl(e,t){for(var o=-1,i=Array(e);++o<e;)i[o]=t(o);return i}var ec="[object Arguments]";function Zi(e){return ht(e)&&pt(e)==ec}var Qi=Object.prototype,tc=Qi.hasOwnProperty,nc=Qi.propertyIsEnumerable,ho=Zi(function(){return arguments}())?Zi:function(e){return ht(e)&&tc.call(e,"callee")&&!nc.call(e,"callee")};function oc(){return!1}var Xi=typeof H=="object"&&H&&!H.nodeType&&H,er=Xi&&typeof module=="object"&&module&&!module.nodeType&&module,ic=er&&er.exports===Xi,tr=ic?Ce.Buffer:void 0,rc=tr?tr.isBuffer:void 0,mo=rc||oc,ac="[object Arguments]",sc="[object Array]",lc="[object Boolean]",cc="[object Date]",dc="[object Error]",fc="[object Function]",uc="[object Map]",pc="[object Number]",hc="[object Object]",mc="[object RegExp]",gc="[object Set]",yc="[object String]",bc="[object WeakMap]",wc="[object ArrayBuffer]",Cc="[object DataView]",vc="[object Float32Array]",Sc="[object Float64Array]",kc="[object Int8Array]",Ec="[object Int16Array]",Ic="[object Int32Array]",Tc="[object Uint8Array]",Ac="[object Uint8ClampedArray]",Oc="[object Uint16Array]",Mc="[object Uint32Array]",j={};j[vc]=j[Sc]=j[kc]=j[Ec]=j[Ic]=j[Tc]=j[Ac]=j[Oc]=j[Mc]=!0,j[ac]=j[sc]=j[wc]=j[lc]=j[Cc]=j[cc]=j[dc]=j[fc]=j[uc]=j[pc]=j[hc]=j[mc]=j[gc]=j[yc]=j[bc]=!1;function xc(e){return ht(e)&&po(e.length)&&!!j[pt(e)]}function Bc(e){return function(t){return e(t)}}var nr=typeof H=="object"&&H&&!H.nodeType&&H,$t=nr&&typeof module=="object"&&module&&!module.nodeType&&module,Nc=$t&&$t.exports===nr,go=Nc&&Fi.process,or=function(){try{var e=$t&&$t.require&&$t.require("util").types;return e||go&&go.binding&&go.binding("util")}catch{}}(),ir=or&&or.isTypedArray,rr=ir?Bc(ir):xc,_c=Object.prototype,Lc=_c.hasOwnProperty;function Pc(e,t){var o=ge(e),i=!o&&ho(e),r=!o&&!i&&mo(e),a=!o&&!i&&!r&&rr(e),s=o||i||r||a,l=s?Xl(e.length,String):[],c=l.length;for(var d in e)Lc.call(e,d)&&!(s&&(d=="length"||r&&(d=="offset"||d=="parent")||a&&(d=="buffer"||d=="byteLength"||d=="byteOffset")||fo(d,c)))&&l.push(d);return l}function Vc(e,t){return function(o){return e(t(o))}}var Rc=Vc(Object.keys,Object),Fc=Object.prototype,Dc=Fc.hasOwnProperty;function $c(e){if(!Ql(e))return Rc(e);var t=[];for(var o in Object(e))Dc.call(e,o)&&o!="constructor"&&t.push(o);return t}function ar(e){return Yl(e)?Pc(e):$c(e)}var zc=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,jc=/^\w*$/;function yo(e,t){if(ge(e))return!1;var o=typeof e;return o=="number"||o=="symbol"||o=="boolean"||e==null||yn(e)?!0:jc.test(e)||!zc.test(e)||t!=null&&e in Object(t)}var zt=Ze(Object,"create");function Hc(){this.__data__=zt?zt(null):{},this.size=0}function Kc(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Uc="__lodash_hash_undefined__",Wc=Object.prototype,qc=Wc.hasOwnProperty;function Gc(e){var t=this.__data__;if(zt){var o=t[e];return o===Uc?void 0:o}return qc.call(t,e)?t[e]:void 0}var Jc=Object.prototype,Yc=Jc.hasOwnProperty;function Zc(e){var t=this.__data__;return zt?t[e]!==void 0:Yc.call(t,e)}var Qc="__lodash_hash_undefined__";function Xc(e,t){var o=this.__data__;return this.size+=this.has(e)?0:1,o[e]=zt&&t===void 0?Qc:t,this}function Qe(e){var t=-1,o=e==null?0:e.length;for(this.clear();++t<o;){var i=e[t];this.set(i[0],i[1])}}Qe.prototype.clear=Hc,Qe.prototype.delete=Kc,Qe.prototype.get=Gc,Qe.prototype.has=Zc,Qe.prototype.set=Xc;function ed(){this.__data__=[],this.size=0}function wn(e,t){for(var o=e.length;o--;)if(uo(e[o][0],t))return o;return-1}var td=Array.prototype,nd=td.splice;function od(e){var t=this.__data__,o=wn(t,e);if(o<0)return!1;var i=t.length-1;return o==i?t.pop():nd.call(t,o,1),--this.size,!0}function id(e){var t=this.__data__,o=wn(t,e);return o<0?void 0:t[o][1]}function rd(e){return wn(this.__data__,e)>-1}function ad(e,t){var o=this.__data__,i=wn(o,e);return i<0?(++this.size,o.push([e,t])):o[i][1]=t,this}function Me(e){var t=-1,o=e==null?0:e.length;for(this.clear();++t<o;){var i=e[t];this.set(i[0],i[1])}}Me.prototype.clear=ed,Me.prototype.delete=od,Me.prototype.get=id,Me.prototype.has=rd,Me.prototype.set=ad;var jt=Ze(Ce,"Map");function sd(){this.size=0,this.__data__={hash:new Qe,map:new(jt||Me),string:new Qe}}function ld(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Cn(e,t){var o=e.__data__;return ld(t)?o[typeof t=="string"?"string":"hash"]:o.map}function cd(e){var t=Cn(this,e).delete(e);return this.size-=t?1:0,t}function dd(e){return Cn(this,e).get(e)}function fd(e){return Cn(this,e).has(e)}function ud(e,t){var o=Cn(this,e),i=o.size;return o.set(e,t),this.size+=o.size==i?0:1,this}function xe(e){var t=-1,o=e==null?0:e.length;for(this.clear();++t<o;){var i=e[t];this.set(i[0],i[1])}}xe.prototype.clear=sd,xe.prototype.delete=cd,xe.prototype.get=dd,xe.prototype.has=fd,xe.prototype.set=ud;var pd="Expected a function";function bo(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(pd);var o=function(){var i=arguments,r=t?t.apply(this,i):i[0],a=o.cache;if(a.has(r))return a.get(r);var s=e.apply(this,i);return o.cache=a.set(r,s)||a,s};return o.cache=new(bo.Cache||xe),o}bo.Cache=xe;var hd=500;function md(e){var t=bo(e,function(i){return o.size===hd&&o.clear(),i}),o=t.cache;return t}var gd=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,yd=/\\(\\)?/g,bd=md(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(gd,function(o,i,r,a){t.push(r?a.replace(yd,"$1"):i||o)}),t});function wd(e){return e==null?"":Hi(e)}function vn(e,t){return ge(e)?e:yo(e,t)?[e]:bd(wd(e))}function Ht(e){if(typeof e=="string"||yn(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function wo(e,t){t=vn(t,e);for(var o=0,i=t.length;e!=null&&o<i;)e=e[Ht(t[o++])];return o&&o==i?e:void 0}function Be(e,t,o){var i=e==null?void 0:wo(e,t);return i===void 0?o:i}function sr(e,t){for(var o=-1,i=t.length,r=e.length;++o<i;)e[r+o]=t[o];return e}var lr=ve?ve.isConcatSpreadable:void 0;function Cd(e){return ge(e)||ho(e)||!!(lr&&e&&e[lr])}function vd(e,t,o,i,r){var a=-1,s=e.length;for(o||(o=Cd),r||(r=[]);++a<s;){var l=e[a];o(l)?sr(r,l):r[r.length]=l}return r}function Sd(e){var t=e==null?0:e.length;return t?vd(e):[]}function kd(e){return zl(Gl(e,void 0,Sd),e+"")}function De(){if(!arguments.length)return[];var e=arguments[0];return ge(e)?e:[e]}function Ed(){this.__data__=new Me,this.size=0}function Id(e){var t=this.__data__,o=t.delete(e);return this.size=t.size,o}function Td(e){return this.__data__.get(e)}function Ad(e){return this.__data__.has(e)}var Od=200;function Md(e,t){var o=this.__data__;if(o instanceof Me){var i=o.__data__;if(!jt||i.length<Od-1)return i.push([e,t]),this.size=++o.size,this;o=this.__data__=new xe(i)}return o.set(e,t),this.size=o.size,this}function Ne(e){var t=this.__data__=new Me(e);this.size=t.size}Ne.prototype.clear=Ed,Ne.prototype.delete=Id,Ne.prototype.get=Td,Ne.prototype.has=Ad,Ne.prototype.set=Md;function xd(e,t){for(var o=-1,i=e==null?0:e.length,r=0,a=[];++o<i;){var s=e[o];t(s,o,e)&&(a[r++]=s)}return a}function Bd(){return[]}var Nd=Object.prototype,_d=Nd.propertyIsEnumerable,cr=Object.getOwnPropertySymbols,Ld=cr?function(e){return e==null?[]:(e=Object(e),xd(cr(e),function(t){return _d.call(e,t)}))}:Bd;function Pd(e,t,o){var i=t(e);return ge(e)?i:sr(i,o(e))}function dr(e){return Pd(e,ar,Ld)}var Co=Ze(Ce,"DataView"),vo=Ze(Ce,"Promise"),So=Ze(Ce,"Set"),fr="[object Map]",Vd="[object Object]",ur="[object Promise]",pr="[object Set]",hr="[object WeakMap]",mr="[object DataView]",Rd=Ye(Co),Fd=Ye(jt),Dd=Ye(vo),$d=Ye(So),zd=Ye(co),$e=pt;(Co&&$e(new Co(new ArrayBuffer(1)))!=mr||jt&&$e(new jt)!=fr||vo&&$e(vo.resolve())!=ur||So&&$e(new So)!=pr||co&&$e(new co)!=hr)&&($e=function(e){var t=pt(e),o=t==Vd?e.constructor:void 0,i=o?Ye(o):"";if(i)switch(i){case Rd:return mr;case Fd:return fr;case Dd:return ur;case $d:return pr;case zd:return hr}return t});var gr=Ce.Uint8Array,jd="__lodash_hash_undefined__";function Hd(e){return this.__data__.set(e,jd),this}function Kd(e){return this.__data__.has(e)}function Sn(e){var t=-1,o=e==null?0:e.length;for(this.__data__=new xe;++t<o;)this.add(e[t])}Sn.prototype.add=Sn.prototype.push=Hd,Sn.prototype.has=Kd;function Ud(e,t){for(var o=-1,i=e==null?0:e.length;++o<i;)if(t(e[o],o,e))return!0;return!1}function Wd(e,t){return e.has(t)}var qd=1,Gd=2;function yr(e,t,o,i,r,a){var s=o&qd,l=e.length,c=t.length;if(l!=c&&!(s&&c>l))return!1;var d=a.get(e),f=a.get(t);if(d&&f)return d==t&&f==e;var u=-1,p=!0,g=o&Gd?new Sn:void 0;for(a.set(e,t),a.set(t,e);++u<l;){var h=e[u],m=t[u];if(i)var y=s?i(m,h,u,t,e,a):i(h,m,u,e,t,a);if(y!==void 0){if(y)continue;p=!1;break}if(g){if(!Ud(t,function(b,C){if(!Wd(g,C)&&(h===b||r(h,b,o,i,a)))return g.push(C)})){p=!1;break}}else if(!(h===m||r(h,m,o,i,a))){p=!1;break}}return a.delete(e),a.delete(t),p}function Jd(e){var t=-1,o=Array(e.size);return e.forEach(function(i,r){o[++t]=[r,i]}),o}function Yd(e){var t=-1,o=Array(e.size);return e.forEach(function(i){o[++t]=i}),o}var Zd=1,Qd=2,Xd="[object Boolean]",ef="[object Date]",tf="[object Error]",nf="[object Map]",of="[object Number]",rf="[object RegExp]",af="[object Set]",sf="[object String]",lf="[object Symbol]",cf="[object ArrayBuffer]",df="[object DataView]",br=ve?ve.prototype:void 0,ko=br?br.valueOf:void 0;function ff(e,t,o,i,r,a,s){switch(o){case df:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case cf:return!(e.byteLength!=t.byteLength||!a(new gr(e),new gr(t)));case Xd:case ef:case of:return uo(+e,+t);case tf:return e.name==t.name&&e.message==t.message;case rf:case sf:return e==t+"";case nf:var l=Jd;case af:var c=i&Zd;if(l||(l=Yd),e.size!=t.size&&!c)return!1;var d=s.get(e);if(d)return d==t;i|=Qd,s.set(e,t);var f=yr(l(e),l(t),i,r,a,s);return s.delete(e),f;case lf:if(ko)return ko.call(e)==ko.call(t)}return!1}var uf=1,pf=Object.prototype,hf=pf.hasOwnProperty;function mf(e,t,o,i,r,a){var s=o&uf,l=dr(e),c=l.length,d=dr(t),f=d.length;if(c!=f&&!s)return!1;for(var u=c;u--;){var p=l[u];if(!(s?p in t:hf.call(t,p)))return!1}var g=a.get(e),h=a.get(t);if(g&&h)return g==t&&h==e;var m=!0;a.set(e,t),a.set(t,e);for(var y=s;++u<c;){p=l[u];var b=e[p],C=t[p];if(i)var I=s?i(C,b,p,t,e,a):i(b,C,p,e,t,a);if(!(I===void 0?b===C||r(b,C,o,i,a):I)){m=!1;break}y||(y=p=="constructor")}if(m&&!y){var k=e.constructor,v=t.constructor;k!=v&&"constructor"in e&&"constructor"in t&&!(typeof k=="function"&&k instanceof k&&typeof v=="function"&&v instanceof v)&&(m=!1)}return a.delete(e),a.delete(t),m}var gf=1,wr="[object Arguments]",Cr="[object Array]",kn="[object Object]",yf=Object.prototype,vr=yf.hasOwnProperty;function bf(e,t,o,i,r,a){var s=ge(e),l=ge(t),c=s?Cr:$e(e),d=l?Cr:$e(t);c=c==wr?kn:c,d=d==wr?kn:d;var f=c==kn,u=d==kn,p=c==d;if(p&&mo(e)){if(!mo(t))return!1;s=!0,f=!1}if(p&&!f)return a||(a=new Ne),s||rr(e)?yr(e,t,o,i,r,a):ff(e,t,c,o,i,r,a);if(!(o&gf)){var g=f&&vr.call(e,"__wrapped__"),h=u&&vr.call(t,"__wrapped__");if(g||h){var m=g?e.value():e,y=h?t.value():t;return a||(a=new Ne),r(m,y,o,i,a)}}return p?(a||(a=new Ne),mf(e,t,o,i,r,a)):!1}function En(e,t,o,i,r){return e===t?!0:e==null||t==null||!ht(e)&&!ht(t)?e!==e&&t!==t:bf(e,t,o,i,En,r)}var wf=1,Cf=2;function vf(e,t,o,i){var r=o.length,a=r;if(e==null)return!a;for(e=Object(e);r--;){var s=o[r];if(s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++r<a;){s=o[r];var l=s[0],c=e[l],d=s[1];if(s[2]){if(c===void 0&&!(l in e))return!1}else{var f=new Ne,u;if(!(u===void 0?En(d,c,wf|Cf,i,f):u))return!1}}return!0}function Sr(e){return e===e&&!Fe(e)}function Sf(e){for(var t=ar(e),o=t.length;o--;){var i=t[o],r=e[i];t[o]=[i,r,Sr(r)]}return t}function kr(e,t){return function(o){return o==null?!1:o[e]===t&&(t!==void 0||e in Object(o))}}function kf(e){var t=Sf(e);return t.length==1&&t[0][2]?kr(t[0][0],t[0][1]):function(o){return o===e||vf(o,e,t)}}function Ef(e,t){return e!=null&&t in Object(e)}function If(e,t,o){t=vn(t,e);for(var i=-1,r=t.length,a=!1;++i<r;){var s=Ht(t[i]);if(!(a=e!=null&&o(e,s)))break;e=e[s]}return a||++i!=r?a:(r=e==null?0:e.length,!!r&&po(r)&&fo(s,r)&&(ge(e)||ho(e)))}function Er(e,t){return e!=null&&If(e,t,Ef)}var Tf=1,Af=2;function Of(e,t){return yo(e)&&Sr(t)?kr(Ht(e),t):function(o){var i=Be(o,e);return i===void 0&&i===t?Er(o,e):En(t,i,Tf|Af)}}function Mf(e){return function(t){return t==null?void 0:t[e]}}function xf(e){return function(t){return wo(t,e)}}function Bf(e){return yo(e)?Mf(Ht(e)):xf(e)}function Nf(e){return typeof e=="function"?e:e==null?Wi:typeof e=="object"?ge(e)?Of(e[0],e[1]):kf(e):Bf(e)}var Eo=function(){return Ce.Date.now()},_f="Expected a function",Lf=Math.max,Pf=Math.min;function Vf(e,t,o){var i,r,a,s,l,c,d=0,f=!1,u=!1,p=!0;if(typeof e!="function")throw new TypeError(_f);t=Ui(t)||0,Fe(o)&&(f=!!o.leading,u="maxWait"in o,a=u?Lf(Ui(o.maxWait)||0,t):a,p="trailing"in o?!!o.trailing:p);function g(S){var E=i,O=r;return i=r=void 0,d=S,s=e.apply(O,E),s}function h(S){return d=S,l=setTimeout(b,t),f?g(S):s}function m(S){var E=S-c,O=S-d,x=t-E;return u?Pf(x,a-O):x}function y(S){var E=S-c,O=S-d;return c===void 0||E>=t||E<0||u&&O>=a}function b(){var S=Eo();if(y(S))return C(S);l=setTimeout(b,m(S))}function C(S){return l=void 0,p&&i?g(S):(i=r=void 0,s)}function I(){l!==void 0&&clearTimeout(l),d=0,i=c=r=l=void 0}function k(){return l===void 0?s:C(Eo())}function v(){var S=Eo(),E=y(S);if(i=arguments,r=this,c=S,E){if(l===void 0)return h(c);if(u)return clearTimeout(l),l=setTimeout(b,t),g(c)}return l===void 0&&(l=setTimeout(b,t)),s}return v.cancel=I,v.flush=k,v}function Rf(e,t,o){var i=e==null?0:e.length;if(!i)return-1;var r=i-1;return jl(e,Nf(t),r)}function Io(e){for(var t=-1,o=e==null?0:e.length,i={};++t<o;){var r=e[t];Ji(i,r[0],r[1])}return i}function In(e,t){return En(e,t)}function Tn(e){return e==null}function Ir(e){return e===void 0}function Ff(e,t,o,i){if(!Fe(e))return e;t=vn(t,e);for(var r=-1,a=t.length,s=a-1,l=e;l!=null&&++r<a;){var c=Ht(t[r]),d=o;if(c==="__proto__"||c==="constructor"||c==="prototype")return e;if(r!=s){var f=l[c];d=void 0,d===void 0&&(d=Fe(f)?f:fo(t[r+1])?[]:{})}ql(l,c,d),l=l[c]}return e}function Df(e,t,o){for(var i=-1,r=t.length,a={};++i<r;){var s=t[i],l=wo(e,s);o(l,s)&&Ff(a,vn(s,e),l)}return a}function $f(e,t){return Df(e,t,function(o,i){return Er(e,i)})}var Tr=kd(function(e,t){return e==null?{}:$f(e,t)});const ze=e=>e===void 0,_e=e=>typeof e=="boolean",G=e=>typeof e=="number",Xe=e=>typeof Element>"u"?!1:e instanceof Element,Kt=e=>Tn(e),zf=e=>me(e)?!Number.isNaN(Number(e)):!1,jf=(e="")=>e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d"),Ar=e=>Object.keys(e);class Or extends Error{constructor(t){super(t),this.name="ElementPlusError"}}function Mr(e,t){throw new Or(`[${e}] ${t}`)}function ne(e,t){if(process.env.NODE_ENV!=="production"){const o=me(e)?new Or(`[${e}] ${t}`):e;console.warn(o)}}const Hf="utils/dom/style",xr=(e="")=>e.split(" ").filter(t=>!!t.trim()),Br=(e,t)=>{if(!e||!t)return!1;if(t.includes(" "))throw new Error("className should not contain space.");return e.classList.contains(t)},To=(e,t)=>{!e||!t.trim()||e.classList.add(...xr(t))},Ut=(e,t)=>{!e||!t.trim()||e.classList.remove(...xr(t))},mt=(e,t)=>{var o;if(!K||!e||!t)return"";let i=Ys(t);i==="float"&&(i="cssFloat");try{const r=e.style[i];if(r)return r;const a=(o=document.defaultView)==null?void 0:o.getComputedStyle(e,"");return a?a[i]:""}catch{return e.style[i]}};function et(e,t="px"){if(!e)return"";if(G(e)||zf(e))return`${e}${t}`;if(me(e))return e;ne(Hf,"binding value must be a string or number")}let An;const Kf=e=>{var t;if(!K)return 0;if(An!==void 0)return An;const o=document.createElement("div");o.className=`${e}-scrollbar__wrap`,o.style.visibility="hidden",o.style.width="100px",o.style.position="absolute",o.style.top="-9999px",document.body.appendChild(o);const i=o.offsetWidth;o.style.overflow="scroll";const r=document.createElement("div");r.style.width="100%",o.appendChild(r);const a=r.offsetWidth;return(t=o.parentNode)==null||t.removeChild(o),An=i-a,An};function Uf(e,t){if(!K)return;if(!t){e.scrollTop=0;return}const o=[];let i=t.offsetParent;for(;i!==null&&e!==i&&e.contains(i);)o.push(i),i=i.offsetParent;const r=t.offsetTop+o.reduce((c,d)=>c+d.offsetTop,0),a=r+t.offsetHeight,s=e.scrollTop,l=s+e.clientHeight;r<s?e.scrollTop=r:a>l&&(e.scrollTop=a-e.clientHeight)}const Nr="__epPropKey",_=e=>e,Wf=e=>te(e)&&!!e[Nr],On=(e,t)=>{if(!te(e)||Wf(e))return e;const{values:o,required:i,default:r,type:a,validator:s}=e,c={type:a,required:!!i,validator:o||s?d=>{let f=!1,u=[];if(o&&(u=Array.from(o),Vi(e,"default")&&u.push(r),f||(f=u.includes(d))),s&&(f||(f=s(d))),!f&&u.length>0){const p=[...new Set(u)].map(g=>JSON.stringify(g)).join(", ");n.warn(`Invalid prop: validation failed${t?` for prop "${t}"`:""}. Expected one of [${p}], got value ${JSON.stringify(d)}.`)}return f}:void 0,[Nr]:!0};return Vi(e,"default")&&(c.default=r),c},R=e=>Io(Object.entries(e).map(([t,o])=>[t,On(o,t)])),gt=_([String,Object,Function]),qf={Close:W.Close},Gf={validating:W.Loading,success:W.CircleCheck,error:W.CircleClose},oe=(e,t)=>{if(e.install=o=>{for(const i of[e,...Object.values(t??{})])o.component(i.name,i)},t)for(const[o,i]of Object.entries(t))e[o]=i;return e},Jf=(e,t)=>(e.install=o=>{o.directive(t,e)},e),tt=e=>(e.install=Je,e),Yf=(...e)=>t=>{e.forEach(o=>{Q(o)?o(t):o.value=t})},Wt={tab:"Tab",enter:"Enter",space:"Space",esc:"Escape",delete:"Delete"},X="update:modelValue",Ao="change",_r=["","default","small","large"];var Mn=(e=>(e[e.TEXT=1]="TEXT",e[e.CLASS=2]="CLASS",e[e.STYLE=4]="STYLE",e[e.PROPS=8]="PROPS",e[e.FULL_PROPS=16]="FULL_PROPS",e[e.HYDRATE_EVENTS=32]="HYDRATE_EVENTS",e[e.STABLE_FRAGMENT=64]="STABLE_FRAGMENT",e[e.KEYED_FRAGMENT=128]="KEYED_FRAGMENT",e[e.UNKEYED_FRAGMENT=256]="UNKEYED_FRAGMENT",e[e.NEED_PATCH=512]="NEED_PATCH",e[e.DYNAMIC_SLOTS=1024]="DYNAMIC_SLOTS",e[e.HOISTED=-1]="HOISTED",e[e.BAIL=-2]="BAIL",e))(Mn||{});const Zf=e=>/([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(e),qt=e=>e,yt=({from:e,replacement:t,scope:o,version:i,ref:r,type:a="API"},s)=>{n.watch(()=>n.unref(s),l=>{l&&ne(o,`[${a}] ${e} is about to be deprecated in version ${i}, please use ${t} instead.
6
+ For more detail, please visit: ${r}
7
+ `)},{immediate:!0})},Qf=(e,t,o,i)=>{let r={offsetX:0,offsetY:0};const a=d=>{const f=d.clientX,u=d.clientY,{offsetX:p,offsetY:g}=r,h=e.value.getBoundingClientRect(),m=h.left,y=h.top,b=h.width,C=h.height,I=document.documentElement.clientWidth,k=document.documentElement.clientHeight,v=-m+p,S=-y+g,E=I-m-b+p,O=k-y-C+g,x=B=>{let T=p+B.clientX-f,L=g+B.clientY-u;i!=null&&i.value||(T=Math.min(Math.max(T,v),E),L=Math.min(Math.max(L,S),O)),r={offsetX:T,offsetY:L},e.value&&(e.value.style.transform=`translate(${et(T)}, ${et(L)})`)},N=()=>{document.removeEventListener("mousemove",x),document.removeEventListener("mouseup",N)};document.addEventListener("mousemove",x),document.addEventListener("mouseup",N)},s=()=>{t.value&&e.value&&t.value.addEventListener("mousedown",a)},l=()=>{t.value&&e.value&&t.value.removeEventListener("mousedown",a)},c=()=>{r={offsetX:0,offsetY:0},e.value&&(e.value.style.transform="none")};return n.onMounted(()=>{n.watchEffect(()=>{o.value?s():l()})}),n.onBeforeUnmount(()=>{l()}),{resetPosition:c}};var Xf={name:"en",el:{breadcrumb:{label:"Breadcrumb"},colorpicker:{confirm:"OK",clear:"Clear",defaultLabel:"color picker",description:"current color is {color}. press enter to select a new color.",alphaLabel:"pick alpha value"},datepicker:{now:"Now",today:"Today",cancel:"Cancel",clear:"Clear",confirm:"OK",dateTablePrompt:"Use the arrow keys and enter to select the day of the month",monthTablePrompt:"Use the arrow keys and enter to select the month",yearTablePrompt:"Use the arrow keys and enter to select the year",selectedDate:"Selected date",selectDate:"Select date",selectTime:"Select time",startDate:"Start Date",startTime:"Start Time",endDate:"End Date",endTime:"End Time",prevYear:"Previous Year",nextYear:"Next Year",prevMonth:"Previous Month",nextMonth:"Next Month",year:"",month1:"January",month2:"February",month3:"March",month4:"April",month5:"May",month6:"June",month7:"July",month8:"August",month9:"September",month10:"October",month11:"November",month12:"December",week:"week",weeks:{sun:"Sun",mon:"Mon",tue:"Tue",wed:"Wed",thu:"Thu",fri:"Fri",sat:"Sat"},weeksFull:{sun:"Sunday",mon:"Monday",tue:"Tuesday",wed:"Wednesday",thu:"Thursday",fri:"Friday",sat:"Saturday"},months:{jan:"Jan",feb:"Feb",mar:"Mar",apr:"Apr",may:"May",jun:"Jun",jul:"Jul",aug:"Aug",sep:"Sep",oct:"Oct",nov:"Nov",dec:"Dec"}},inputNumber:{decrease:"decrease number",increase:"increase number"},select:{loading:"Loading",noMatch:"No matching data",noData:"No data",placeholder:"Select"},mention:{loading:"Loading"},dropdown:{toggleDropdown:"Toggle Dropdown"},cascader:{noMatch:"No matching data",loading:"Loading",placeholder:"Select",noData:"No data"},pagination:{goto:"Go to",pagesize:"/page",total:"Total {total}",pageClassifier:"",page:"Page",prev:"Go to previous page",next:"Go to next page",currentPage:"page {pager}",prevPages:"Previous {pager} pages",nextPages:"Next {pager} pages",deprecationWarning:"Deprecated usages detected, please refer to the el-pagination documentation for more details"},dialog:{close:"Close this dialog"},drawer:{close:"Close this dialog"},messagebox:{title:"Message",confirm:"OK",cancel:"Cancel",error:"Illegal input",close:"Close this dialog"},upload:{deleteTip:"press delete to remove",delete:"Delete",preview:"Preview",continue:"Continue"},slider:{defaultLabel:"slider between {min} and {max}",defaultRangeStartLabel:"pick start value",defaultRangeEndLabel:"pick end value"},table:{emptyText:"No Data",confirmFilter:"Confirm",resetFilter:"Reset",clearFilter:"All",sumText:"Sum"},tour:{next:"Next",previous:"Previous",finish:"Finish"},tree:{emptyText:"No Data"},transfer:{noMatch:"No matching data",noData:"No data",titles:["List 1","List 2"],filterPlaceholder:"Enter keyword",noCheckedFormat:"{total} items",hasCheckedFormat:"{checked}/{total} checked"},image:{error:"FAILED"},pageHeader:{title:"Back"},popconfirm:{confirmButtonText:"Yes",cancelButtonText:"No"},carousel:{leftArrow:"Carousel arrow left",rightArrow:"Carousel arrow right",indicator:"Carousel switch to index {index}"}}};const eu=e=>(t,o)=>tu(t,o,n.unref(e)),tu=(e,t,o)=>Be(o,e,e).replace(/\{(\w+)\}/g,(i,r)=>{var a;return`${(a=t==null?void 0:t[r])!=null?a:`{${r}}`}`}),nu=e=>{const t=n.computed(()=>n.unref(e).name),o=n.isRef(e)?e:n.ref(e);return{lang:t,locale:o,t:eu(e)}},Lr=Symbol("localeContextKey"),Oo=e=>{const t=e||n.inject(Lr,n.ref());return nu(n.computed(()=>t.value||Xf))},Gt="el",ou="is-",nt=(e,t,o,i,r)=>{let a=`${e}-${t}`;return o&&(a+=`-${o}`),i&&(a+=`__${i}`),r&&(a+=`--${r}`),a},Pr=Symbol("namespaceContextKey"),Mo=e=>{const t=e||(n.getCurrentInstance()?n.inject(Pr,n.ref(Gt)):n.ref(Gt));return n.computed(()=>n.unref(t)||Gt)},D=(e,t)=>{const o=Mo(t);return{namespace:o,b:(m="")=>nt(o.value,e,m,"",""),e:m=>m?nt(o.value,e,"",m,""):"",m:m=>m?nt(o.value,e,"","",m):"",be:(m,y)=>m&&y?nt(o.value,e,m,y,""):"",em:(m,y)=>m&&y?nt(o.value,e,"",m,y):"",bm:(m,y)=>m&&y?nt(o.value,e,m,"",y):"",bem:(m,y,b)=>m&&y&&b?nt(o.value,e,m,y,b):"",is:(m,...y)=>{const b=y.length>=1?y[0]:!0;return m&&b?`${ou}${m}`:""},cssVar:m=>{const y={};for(const b in m)m[b]&&(y[`--${o.value}-${b}`]=m[b]);return y},cssVarName:m=>`--${o.value}-${m}`,cssVarBlock:m=>{const y={};for(const b in m)m[b]&&(y[`--${o.value}-${e}-${b}`]=m[b]);return y},cssVarBlockName:m=>`--${o.value}-${e}-${m}`}},iu=(e,t={})=>{n.isRef(e)||Mr("[useLockscreen]","You need to pass a ref param to this function");const o=t.ns||D("popup"),i=n.computed(()=>o.bm("parent","hidden"));if(!K||Br(document.body,i.value))return;let r=0,a=!1,s="0";const l=()=>{setTimeout(()=>{Ut(document==null?void 0:document.body,i.value),a&&document&&(document.body.style.width=s)},200)};n.watch(e,c=>{if(!c){l();return}a=!Br(document.body,i.value),a&&(s=document.body.style.width),r=Kf(o.namespace.value);const d=document.documentElement.clientHeight<document.body.scrollHeight,f=mt(document.body,"overflowY");r>0&&(d||f==="scroll")&&a&&(document.body.style.width=`calc(100% - ${r}px)`),To(document.body,i.value)}),n.onScopeDispose(()=>l())},ru=On({type:_(Boolean),default:null}),au=On({type:_(Function)}),su=e=>{const t=`update:${e}`,o=`onUpdate:${e}`,i=[t],r={[e]:ru,[o]:au};return{useModelToggle:({indicator:s,toggleReason:l,shouldHideWhenRouteChanges:c,shouldProceed:d,onShow:f,onHide:u})=>{const p=n.getCurrentInstance(),{emit:g}=p,h=p.props,m=n.computed(()=>Q(h[o])),y=n.computed(()=>h[e]===null),b=E=>{s.value!==!0&&(s.value=!0,l&&(l.value=E),Q(f)&&f(E))},C=E=>{s.value!==!1&&(s.value=!1,l&&(l.value=E),Q(u)&&u(E))},I=E=>{if(h.disabled===!0||Q(d)&&!d())return;const O=m.value&&K;O&&g(t,!0),(y.value||!O)&&b(E)},k=E=>{if(h.disabled===!0||!K)return;const O=m.value&&K;O&&g(t,!1),(y.value||!O)&&C(E)},v=E=>{_e(E)&&(h.disabled&&E?m.value&&g(t,!1):s.value!==E&&(E?b():C()))},S=()=>{s.value?k():I()};return n.watch(()=>h[e],v),c&&p.appContext.config.globalProperties.$route!==void 0&&n.watch(()=>({...p.proxy.$route}),()=>{c.value&&s.value&&k()}),n.onMounted(()=>{v(h[e])}),{hide:k,show:I,toggle:S,hasUpdateHandler:m}},useModelToggleProps:r,useModelToggleEmits:i}},Vr=e=>{const t=n.getCurrentInstance();return n.computed(()=>{var o,i;return(i=(o=t==null?void 0:t.proxy)==null?void 0:o.$props)==null?void 0:i[e]})};var ie="top",de="bottom",fe="right",re="left",xo="auto",Jt=[ie,de,fe,re],bt="start",Yt="end",lu="clippingParents",Rr="viewport",Zt="popper",cu="reference",Fr=Jt.reduce(function(e,t){return e.concat([t+"-"+bt,t+"-"+Yt])},[]),xn=[].concat(Jt,[xo]).reduce(function(e,t){return e.concat([t,t+"-"+bt,t+"-"+Yt])},[]),du="beforeRead",fu="read",uu="afterRead",pu="beforeMain",hu="main",mu="afterMain",gu="beforeWrite",yu="write",bu="afterWrite",wu=[du,fu,uu,pu,hu,mu,gu,yu,bu];function Se(e){return e?(e.nodeName||"").toLowerCase():null}function ye(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function wt(e){var t=ye(e).Element;return e instanceof t||e instanceof Element}function ue(e){var t=ye(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Bo(e){if(typeof ShadowRoot>"u")return!1;var t=ye(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Cu(e){var t=e.state;Object.keys(t.elements).forEach(function(o){var i=t.styles[o]||{},r=t.attributes[o]||{},a=t.elements[o];!ue(a)||!Se(a)||(Object.assign(a.style,i),Object.keys(r).forEach(function(s){var l=r[s];l===!1?a.removeAttribute(s):a.setAttribute(s,l===!0?"":l)}))})}function vu(e){var t=e.state,o={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,o.popper),t.styles=o,t.elements.arrow&&Object.assign(t.elements.arrow.style,o.arrow),function(){Object.keys(t.elements).forEach(function(i){var r=t.elements[i],a=t.attributes[i]||{},s=Object.keys(t.styles.hasOwnProperty(i)?t.styles[i]:o[i]),l=s.reduce(function(c,d){return c[d]="",c},{});!ue(r)||!Se(r)||(Object.assign(r.style,l),Object.keys(a).forEach(function(c){r.removeAttribute(c)}))})}}var Dr={name:"applyStyles",enabled:!0,phase:"write",fn:Cu,effect:vu,requires:["computeStyles"]};function ke(e){return e.split("-")[0]}var ot=Math.max,Bn=Math.min,Ct=Math.round;function vt(e,t){t===void 0&&(t=!1);var o=e.getBoundingClientRect(),i=1,r=1;if(ue(e)&&t){var a=e.offsetHeight,s=e.offsetWidth;s>0&&(i=Ct(o.width)/s||1),a>0&&(r=Ct(o.height)/a||1)}return{width:o.width/i,height:o.height/r,top:o.top/r,right:o.right/i,bottom:o.bottom/r,left:o.left/i,x:o.left/i,y:o.top/r}}function No(e){var t=vt(e),o=e.offsetWidth,i=e.offsetHeight;return Math.abs(t.width-o)<=1&&(o=t.width),Math.abs(t.height-i)<=1&&(i=t.height),{x:e.offsetLeft,y:e.offsetTop,width:o,height:i}}function $r(e,t){var o=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(o&&Bo(o)){var i=t;do{if(i&&e.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function Le(e){return ye(e).getComputedStyle(e)}function Su(e){return["table","td","th"].indexOf(Se(e))>=0}function je(e){return((wt(e)?e.ownerDocument:e.document)||window.document).documentElement}function Nn(e){return Se(e)==="html"?e:e.assignedSlot||e.parentNode||(Bo(e)?e.host:null)||je(e)}function zr(e){return!ue(e)||Le(e).position==="fixed"?null:e.offsetParent}function ku(e){var t=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1,o=navigator.userAgent.indexOf("Trident")!==-1;if(o&&ue(e)){var i=Le(e);if(i.position==="fixed")return null}var r=Nn(e);for(Bo(r)&&(r=r.host);ue(r)&&["html","body"].indexOf(Se(r))<0;){var a=Le(r);if(a.transform!=="none"||a.perspective!=="none"||a.contain==="paint"||["transform","perspective"].indexOf(a.willChange)!==-1||t&&a.willChange==="filter"||t&&a.filter&&a.filter!=="none")return r;r=r.parentNode}return null}function Qt(e){for(var t=ye(e),o=zr(e);o&&Su(o)&&Le(o).position==="static";)o=zr(o);return o&&(Se(o)==="html"||Se(o)==="body"&&Le(o).position==="static")?t:o||ku(e)||t}function _o(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Xt(e,t,o){return ot(e,Bn(t,o))}function Eu(e,t,o){var i=Xt(e,t,o);return i>o?o:i}function jr(){return{top:0,right:0,bottom:0,left:0}}function Hr(e){return Object.assign({},jr(),e)}function Kr(e,t){return t.reduce(function(o,i){return o[i]=e,o},{})}var Iu=function(e,t){return e=typeof e=="function"?e(Object.assign({},t.rects,{placement:t.placement})):e,Hr(typeof e!="number"?e:Kr(e,Jt))};function Tu(e){var t,o=e.state,i=e.name,r=e.options,a=o.elements.arrow,s=o.modifiersData.popperOffsets,l=ke(o.placement),c=_o(l),d=[re,fe].indexOf(l)>=0,f=d?"height":"width";if(!(!a||!s)){var u=Iu(r.padding,o),p=No(a),g=c==="y"?ie:re,h=c==="y"?de:fe,m=o.rects.reference[f]+o.rects.reference[c]-s[c]-o.rects.popper[f],y=s[c]-o.rects.reference[c],b=Qt(a),C=b?c==="y"?b.clientHeight||0:b.clientWidth||0:0,I=m/2-y/2,k=u[g],v=C-p[f]-u[h],S=C/2-p[f]/2+I,E=Xt(k,S,v),O=c;o.modifiersData[i]=(t={},t[O]=E,t.centerOffset=E-S,t)}}function Au(e){var t=e.state,o=e.options,i=o.element,r=i===void 0?"[data-popper-arrow]":i;r!=null&&(typeof r=="string"&&(r=t.elements.popper.querySelector(r),!r)||!$r(t.elements.popper,r)||(t.elements.arrow=r))}var Ou={name:"arrow",enabled:!0,phase:"main",fn:Tu,effect:Au,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function St(e){return e.split("-")[1]}var Mu={top:"auto",right:"auto",bottom:"auto",left:"auto"};function xu(e){var t=e.x,o=e.y,i=window,r=i.devicePixelRatio||1;return{x:Ct(t*r)/r||0,y:Ct(o*r)/r||0}}function Ur(e){var t,o=e.popper,i=e.popperRect,r=e.placement,a=e.variation,s=e.offsets,l=e.position,c=e.gpuAcceleration,d=e.adaptive,f=e.roundOffsets,u=e.isFixed,p=s.x,g=p===void 0?0:p,h=s.y,m=h===void 0?0:h,y=typeof f=="function"?f({x:g,y:m}):{x:g,y:m};g=y.x,m=y.y;var b=s.hasOwnProperty("x"),C=s.hasOwnProperty("y"),I=re,k=ie,v=window;if(d){var S=Qt(o),E="clientHeight",O="clientWidth";if(S===ye(o)&&(S=je(o),Le(S).position!=="static"&&l==="absolute"&&(E="scrollHeight",O="scrollWidth")),S=S,r===ie||(r===re||r===fe)&&a===Yt){k=de;var x=u&&S===v&&v.visualViewport?v.visualViewport.height:S[E];m-=x-i.height,m*=c?1:-1}if(r===re||(r===ie||r===de)&&a===Yt){I=fe;var N=u&&S===v&&v.visualViewport?v.visualViewport.width:S[O];g-=N-i.width,g*=c?1:-1}}var B=Object.assign({position:l},d&&Mu),T=f===!0?xu({x:g,y:m}):{x:g,y:m};if(g=T.x,m=T.y,c){var L;return Object.assign({},B,(L={},L[k]=C?"0":"",L[I]=b?"0":"",L.transform=(v.devicePixelRatio||1)<=1?"translate("+g+"px, "+m+"px)":"translate3d("+g+"px, "+m+"px, 0)",L))}return Object.assign({},B,(t={},t[k]=C?m+"px":"",t[I]=b?g+"px":"",t.transform="",t))}function Bu(e){var t=e.state,o=e.options,i=o.gpuAcceleration,r=i===void 0?!0:i,a=o.adaptive,s=a===void 0?!0:a,l=o.roundOffsets,c=l===void 0?!0:l,d={placement:ke(t.placement),variation:St(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:r,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,Ur(Object.assign({},d,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,Ur(Object.assign({},d,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var Wr={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Bu,data:{}},_n={passive:!0};function Nu(e){var t=e.state,o=e.instance,i=e.options,r=i.scroll,a=r===void 0?!0:r,s=i.resize,l=s===void 0?!0:s,c=ye(t.elements.popper),d=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&d.forEach(function(f){f.addEventListener("scroll",o.update,_n)}),l&&c.addEventListener("resize",o.update,_n),function(){a&&d.forEach(function(f){f.removeEventListener("scroll",o.update,_n)}),l&&c.removeEventListener("resize",o.update,_n)}}var qr={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Nu,data:{}},_u={left:"right",right:"left",bottom:"top",top:"bottom"};function Ln(e){return e.replace(/left|right|bottom|top/g,function(t){return _u[t]})}var Lu={start:"end",end:"start"};function Gr(e){return e.replace(/start|end/g,function(t){return Lu[t]})}function Lo(e){var t=ye(e),o=t.pageXOffset,i=t.pageYOffset;return{scrollLeft:o,scrollTop:i}}function Po(e){return vt(je(e)).left+Lo(e).scrollLeft}function Pu(e){var t=ye(e),o=je(e),i=t.visualViewport,r=o.clientWidth,a=o.clientHeight,s=0,l=0;return i&&(r=i.width,a=i.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(s=i.offsetLeft,l=i.offsetTop)),{width:r,height:a,x:s+Po(e),y:l}}function Vu(e){var t,o=je(e),i=Lo(e),r=(t=e.ownerDocument)==null?void 0:t.body,a=ot(o.scrollWidth,o.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),s=ot(o.scrollHeight,o.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),l=-i.scrollLeft+Po(e),c=-i.scrollTop;return Le(r||o).direction==="rtl"&&(l+=ot(o.clientWidth,r?r.clientWidth:0)-a),{width:a,height:s,x:l,y:c}}function Vo(e){var t=Le(e),o=t.overflow,i=t.overflowX,r=t.overflowY;return/auto|scroll|overlay|hidden/.test(o+r+i)}function Jr(e){return["html","body","#document"].indexOf(Se(e))>=0?e.ownerDocument.body:ue(e)&&Vo(e)?e:Jr(Nn(e))}function en(e,t){var o;t===void 0&&(t=[]);var i=Jr(e),r=i===((o=e.ownerDocument)==null?void 0:o.body),a=ye(i),s=r?[a].concat(a.visualViewport||[],Vo(i)?i:[]):i,l=t.concat(s);return r?l:l.concat(en(Nn(s)))}function Ro(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Ru(e){var t=vt(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}function Yr(e,t){return t===Rr?Ro(Pu(e)):wt(t)?Ru(t):Ro(Vu(je(e)))}function Fu(e){var t=en(Nn(e)),o=["absolute","fixed"].indexOf(Le(e).position)>=0,i=o&&ue(e)?Qt(e):e;return wt(i)?t.filter(function(r){return wt(r)&&$r(r,i)&&Se(r)!=="body"}):[]}function Du(e,t,o){var i=t==="clippingParents"?Fu(e):[].concat(t),r=[].concat(i,[o]),a=r[0],s=r.reduce(function(l,c){var d=Yr(e,c);return l.top=ot(d.top,l.top),l.right=Bn(d.right,l.right),l.bottom=Bn(d.bottom,l.bottom),l.left=ot(d.left,l.left),l},Yr(e,a));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function Zr(e){var t=e.reference,o=e.element,i=e.placement,r=i?ke(i):null,a=i?St(i):null,s=t.x+t.width/2-o.width/2,l=t.y+t.height/2-o.height/2,c;switch(r){case ie:c={x:s,y:t.y-o.height};break;case de:c={x:s,y:t.y+t.height};break;case fe:c={x:t.x+t.width,y:l};break;case re:c={x:t.x-o.width,y:l};break;default:c={x:t.x,y:t.y}}var d=r?_o(r):null;if(d!=null){var f=d==="y"?"height":"width";switch(a){case bt:c[d]=c[d]-(t[f]/2-o[f]/2);break;case Yt:c[d]=c[d]+(t[f]/2-o[f]/2);break}}return c}function tn(e,t){t===void 0&&(t={});var o=t,i=o.placement,r=i===void 0?e.placement:i,a=o.boundary,s=a===void 0?lu:a,l=o.rootBoundary,c=l===void 0?Rr:l,d=o.elementContext,f=d===void 0?Zt:d,u=o.altBoundary,p=u===void 0?!1:u,g=o.padding,h=g===void 0?0:g,m=Hr(typeof h!="number"?h:Kr(h,Jt)),y=f===Zt?cu:Zt,b=e.rects.popper,C=e.elements[p?y:f],I=Du(wt(C)?C:C.contextElement||je(e.elements.popper),s,c),k=vt(e.elements.reference),v=Zr({reference:k,element:b,placement:r}),S=Ro(Object.assign({},b,v)),E=f===Zt?S:k,O={top:I.top-E.top+m.top,bottom:E.bottom-I.bottom+m.bottom,left:I.left-E.left+m.left,right:E.right-I.right+m.right},x=e.modifiersData.offset;if(f===Zt&&x){var N=x[r];Object.keys(O).forEach(function(B){var T=[fe,de].indexOf(B)>=0?1:-1,L=[ie,de].indexOf(B)>=0?"y":"x";O[B]+=N[L]*T})}return O}function $u(e,t){t===void 0&&(t={});var o=t,i=o.placement,r=o.boundary,a=o.rootBoundary,s=o.padding,l=o.flipVariations,c=o.allowedAutoPlacements,d=c===void 0?xn:c,f=St(i),u=f?l?Fr:Fr.filter(function(h){return St(h)===f}):Jt,p=u.filter(function(h){return d.indexOf(h)>=0});p.length===0&&(p=u);var g=p.reduce(function(h,m){return h[m]=tn(e,{placement:m,boundary:r,rootBoundary:a,padding:s})[ke(m)],h},{});return Object.keys(g).sort(function(h,m){return g[h]-g[m]})}function zu(e){if(ke(e)===xo)return[];var t=Ln(e);return[Gr(e),t,Gr(t)]}function ju(e){var t=e.state,o=e.options,i=e.name;if(!t.modifiersData[i]._skip){for(var r=o.mainAxis,a=r===void 0?!0:r,s=o.altAxis,l=s===void 0?!0:s,c=o.fallbackPlacements,d=o.padding,f=o.boundary,u=o.rootBoundary,p=o.altBoundary,g=o.flipVariations,h=g===void 0?!0:g,m=o.allowedAutoPlacements,y=t.options.placement,b=ke(y),C=b===y,I=c||(C||!h?[Ln(y)]:zu(y)),k=[y].concat(I).reduce(function(Ie,ae){return Ie.concat(ke(ae)===xo?$u(t,{placement:ae,boundary:f,rootBoundary:u,padding:d,flipVariations:h,allowedAutoPlacements:m}):ae)},[]),v=t.rects.reference,S=t.rects.popper,E=new Map,O=!0,x=k[0],N=0;N<k.length;N++){var B=k[N],T=ke(B),L=St(B)===bt,q=[ie,de].indexOf(T)>=0,V=q?"width":"height",M=tn(t,{placement:B,boundary:f,rootBoundary:u,altBoundary:p,padding:d}),$=q?L?fe:re:L?de:ie;v[V]>S[V]&&($=Ln($));var pe=Ln($),Y=[];if(a&&Y.push(M[T]<=0),l&&Y.push(M[$]<=0,M[pe]<=0),Y.every(function(Ie){return Ie})){x=B,O=!1;break}E.set(B,Y)}if(O)for(var Z=h?3:1,ce=function(Ie){var ae=k.find(function(U){var lt=E.get(U);if(lt)return lt.slice(0,Ie).every(function(qe){return qe})});if(ae)return x=ae,"break"},Ee=Z;Ee>0;Ee--){var _t=ce(Ee);if(_t==="break")break}t.placement!==x&&(t.modifiersData[i]._skip=!0,t.placement=x,t.reset=!0)}}var Hu={name:"flip",enabled:!0,phase:"main",fn:ju,requiresIfExists:["offset"],data:{_skip:!1}};function Qr(e,t,o){return o===void 0&&(o={x:0,y:0}),{top:e.top-t.height-o.y,right:e.right-t.width+o.x,bottom:e.bottom-t.height+o.y,left:e.left-t.width-o.x}}function Xr(e){return[ie,fe,de,re].some(function(t){return e[t]>=0})}function Ku(e){var t=e.state,o=e.name,i=t.rects.reference,r=t.rects.popper,a=t.modifiersData.preventOverflow,s=tn(t,{elementContext:"reference"}),l=tn(t,{altBoundary:!0}),c=Qr(s,i),d=Qr(l,r,a),f=Xr(c),u=Xr(d);t.modifiersData[o]={referenceClippingOffsets:c,popperEscapeOffsets:d,isReferenceHidden:f,hasPopperEscaped:u},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":f,"data-popper-escaped":u})}var Uu={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Ku};function Wu(e,t,o){var i=ke(e),r=[re,ie].indexOf(i)>=0?-1:1,a=typeof o=="function"?o(Object.assign({},t,{placement:e})):o,s=a[0],l=a[1];return s=s||0,l=(l||0)*r,[re,fe].indexOf(i)>=0?{x:l,y:s}:{x:s,y:l}}function qu(e){var t=e.state,o=e.options,i=e.name,r=o.offset,a=r===void 0?[0,0]:r,s=xn.reduce(function(f,u){return f[u]=Wu(u,t.rects,a),f},{}),l=s[t.placement],c=l.x,d=l.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=d),t.modifiersData[i]=s}var Gu={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:qu};function Ju(e){var t=e.state,o=e.name;t.modifiersData[o]=Zr({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}var ea={name:"popperOffsets",enabled:!0,phase:"read",fn:Ju,data:{}};function Yu(e){return e==="x"?"y":"x"}function Zu(e){var t=e.state,o=e.options,i=e.name,r=o.mainAxis,a=r===void 0?!0:r,s=o.altAxis,l=s===void 0?!1:s,c=o.boundary,d=o.rootBoundary,f=o.altBoundary,u=o.padding,p=o.tether,g=p===void 0?!0:p,h=o.tetherOffset,m=h===void 0?0:h,y=tn(t,{boundary:c,rootBoundary:d,padding:u,altBoundary:f}),b=ke(t.placement),C=St(t.placement),I=!C,k=_o(b),v=Yu(k),S=t.modifiersData.popperOffsets,E=t.rects.reference,O=t.rects.popper,x=typeof m=="function"?m(Object.assign({},t.rects,{placement:t.placement})):m,N=typeof x=="number"?{mainAxis:x,altAxis:x}:Object.assign({mainAxis:0,altAxis:0},x),B=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,T={x:0,y:0};if(S){if(a){var L,q=k==="y"?ie:re,V=k==="y"?de:fe,M=k==="y"?"height":"width",$=S[k],pe=$+y[q],Y=$-y[V],Z=g?-O[M]/2:0,ce=C===bt?E[M]:O[M],Ee=C===bt?-O[M]:-E[M],_t=t.elements.arrow,Ie=g&&_t?No(_t):{width:0,height:0},ae=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:jr(),U=ae[q],lt=ae[V],qe=Xt(0,E[M],Ie[M]),Zn=I?E[M]/2-Z-qe-U-N.mainAxis:ce-qe-U-N.mainAxis,Qn=I?-E[M]/2+Z+qe+lt+N.mainAxis:Ee+qe+lt+N.mainAxis,ln=t.elements.arrow&&Qt(t.elements.arrow),yi=ln?k==="y"?ln.clientTop||0:ln.clientLeft||0:0,Xn=(L=B==null?void 0:B[k])!=null?L:0,bi=$+Zn-Xn-yi,wi=$+Qn-Xn,ct=Xt(g?Bn(pe,bi):pe,$,g?ot(Y,wi):Y);S[k]=ct,T[k]=ct-$}if(l){var cn,Lt=k==="x"?ie:re,eo=k==="x"?de:fe,Ve=S[v],Pt=v==="y"?"height":"width",dn=Ve+y[Lt],to=Ve-y[eo],dt=[ie,re].indexOf(b)!==-1,fn=(cn=B==null?void 0:B[v])!=null?cn:0,un=dt?dn:Ve-E[Pt]-O[Pt]-fn+N.altAxis,pn=dt?Ve+E[Pt]+O[Pt]-fn-N.altAxis:to,hn=g&&dt?Eu(un,Ve,pn):Xt(g?un:dn,Ve,g?pn:to);S[v]=hn,T[v]=hn-Ve}t.modifiersData[i]=T}}var Qu={name:"preventOverflow",enabled:!0,phase:"main",fn:Zu,requiresIfExists:["offset"]};function Xu(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function ep(e){return e===ye(e)||!ue(e)?Lo(e):Xu(e)}function tp(e){var t=e.getBoundingClientRect(),o=Ct(t.width)/e.offsetWidth||1,i=Ct(t.height)/e.offsetHeight||1;return o!==1||i!==1}function np(e,t,o){o===void 0&&(o=!1);var i=ue(t),r=ue(t)&&tp(t),a=je(t),s=vt(e,r),l={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(i||!i&&!o)&&((Se(t)!=="body"||Vo(a))&&(l=ep(t)),ue(t)?(c=vt(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):a&&(c.x=Po(a))),{x:s.left+l.scrollLeft-c.x,y:s.top+l.scrollTop-c.y,width:s.width,height:s.height}}function op(e){var t=new Map,o=new Set,i=[];e.forEach(function(a){t.set(a.name,a)});function r(a){o.add(a.name);var s=[].concat(a.requires||[],a.requiresIfExists||[]);s.forEach(function(l){if(!o.has(l)){var c=t.get(l);c&&r(c)}}),i.push(a)}return e.forEach(function(a){o.has(a.name)||r(a)}),i}function ip(e){var t=op(e);return wu.reduce(function(o,i){return o.concat(t.filter(function(r){return r.phase===i}))},[])}function rp(e){var t;return function(){return t||(t=new Promise(function(o){Promise.resolve().then(function(){t=void 0,o(e())})})),t}}function ap(e){var t=e.reduce(function(o,i){var r=o[i.name];return o[i.name]=r?Object.assign({},r,i,{options:Object.assign({},r.options,i.options),data:Object.assign({},r.data,i.data)}):i,o},{});return Object.keys(t).map(function(o){return t[o]})}var ta={placement:"bottom",modifiers:[],strategy:"absolute"};function na(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return!t.some(function(i){return!(i&&typeof i.getBoundingClientRect=="function")})}function Fo(e){e===void 0&&(e={});var t=e,o=t.defaultModifiers,i=o===void 0?[]:o,r=t.defaultOptions,a=r===void 0?ta:r;return function(s,l,c){c===void 0&&(c=a);var d={placement:"bottom",orderedModifiers:[],options:Object.assign({},ta,a),modifiersData:{},elements:{reference:s,popper:l},attributes:{},styles:{}},f=[],u=!1,p={state:d,setOptions:function(m){var y=typeof m=="function"?m(d.options):m;h(),d.options=Object.assign({},a,d.options,y),d.scrollParents={reference:wt(s)?en(s):s.contextElement?en(s.contextElement):[],popper:en(l)};var b=ip(ap([].concat(i,d.options.modifiers)));return d.orderedModifiers=b.filter(function(C){return C.enabled}),g(),p.update()},forceUpdate:function(){if(!u){var m=d.elements,y=m.reference,b=m.popper;if(na(y,b)){d.rects={reference:np(y,Qt(b),d.options.strategy==="fixed"),popper:No(b)},d.reset=!1,d.placement=d.options.placement,d.orderedModifiers.forEach(function(O){return d.modifiersData[O.name]=Object.assign({},O.data)});for(var C=0;C<d.orderedModifiers.length;C++){if(d.reset===!0){d.reset=!1,C=-1;continue}var I=d.orderedModifiers[C],k=I.fn,v=I.options,S=v===void 0?{}:v,E=I.name;typeof k=="function"&&(d=k({state:d,options:S,name:E,instance:p})||d)}}}},update:rp(function(){return new Promise(function(m){p.forceUpdate(),m(d)})}),destroy:function(){h(),u=!0}};if(!na(s,l))return p;p.setOptions(c).then(function(m){!u&&c.onFirstUpdate&&c.onFirstUpdate(m)});function g(){d.orderedModifiers.forEach(function(m){var y=m.name,b=m.options,C=b===void 0?{}:b,I=m.effect;if(typeof I=="function"){var k=I({state:d,name:y,instance:p,options:C}),v=function(){};f.push(k||v)}})}function h(){f.forEach(function(m){return m()}),f=[]}return p}}Fo();var sp=[qr,ea,Wr,Dr];Fo({defaultModifiers:sp});var lp=[qr,ea,Wr,Dr,Gu,Hu,Qu,Ou,Uu],cp=Fo({defaultModifiers:lp});const dp=(e,t,o={})=>{const i={name:"updateState",enabled:!0,phase:"write",fn:({state:c})=>{const d=fp(c);Object.assign(s.value,d)},requires:["computeStyles"]},r=n.computed(()=>{const{onFirstUpdate:c,placement:d,strategy:f,modifiers:u}=n.unref(o);return{onFirstUpdate:c,placement:d||"bottom",strategy:f||"absolute",modifiers:[...u||[],i,{name:"applyStyles",enabled:!1}]}}),a=n.shallowRef(),s=n.ref({styles:{popper:{position:n.unref(r).strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),l=()=>{a.value&&(a.value.destroy(),a.value=void 0)};return n.watch(r,c=>{const d=n.unref(a);d&&d.setOptions(c)},{deep:!0}),n.watch([e,t],([c,d])=>{l(),!(!c||!d)&&(a.value=cp(c,d,n.unref(r)))}),n.onBeforeUnmount(()=>{l()}),{state:n.computed(()=>{var c;return{...((c=n.unref(a))==null?void 0:c.state)||{}}}),styles:n.computed(()=>n.unref(s).styles),attributes:n.computed(()=>n.unref(s).attributes),update:()=>{var c;return(c=n.unref(a))==null?void 0:c.update()},forceUpdate:()=>{var c;return(c=n.unref(a))==null?void 0:c.forceUpdate()},instanceRef:n.computed(()=>n.unref(a))}};function fp(e){const t=Object.keys(e.elements),o=Io(t.map(r=>[r,e.styles[r]||{}])),i=Io(t.map(r=>[r,e.attributes[r]]));return{styles:o,attributes:i}}const oa=e=>{if(!e)return{onClick:Je,onMousedown:Je,onMouseup:Je};let t=!1,o=!1;return{onClick:s=>{t&&o&&e(s),t=o=!1},onMousedown:s=>{t=s.target===s.currentTarget},onMouseup:s=>{o=s.target===s.currentTarget}}};function ia(){let e;const t=(i,r)=>{o(),e=window.setTimeout(i,r)},o=()=>window.clearTimeout(e);return Ft(()=>o()),{registerTimeout:t,cancelTimeout:o}}const Do={prefix:Math.floor(Math.random()*1e4),current:0},up=Symbol("elIdInjection"),ra=()=>n.getCurrentInstance()?n.inject(up,Do):Do,it=e=>{const t=ra();!K&&t===Do&&ne("IdInjection",`Looks like you are using server rendering, you must provide a id provider to ensure the hydration process to be succeed
8
8
  usage: app.provide(ID_INJECTION_KEY, {
9
9
  prefix: number,
10
10
  current: number,
11
- })`);const o=Oo();return n.computed(()=>n.unref(e)||`${o.value}-id-${t.prefix}-${t.current++}`)};let kt=[];const ar=e=>{const t=e;t.key===Ut.esc&&kt.forEach(o=>o(t))},up=e=>{n.onMounted(()=>{kt.length===0&&document.addEventListener("keydown",ar),K&&kt.push(e)}),n.onBeforeUnmount(()=>{kt=kt.filter(t=>t!==e),kt.length===0&&K&&document.removeEventListener("keydown",ar)})};let rr;const sr=()=>{const e=Oo(),t=ir(),o=n.computed(()=>`${e.value}-popper-container-${t.prefix}`),i=n.computed(()=>`#${o.value}`);return{id:o,selector:i}},pp=e=>{const t=document.createElement("div");return t.id=e,document.body.appendChild(t),t},hp=()=>{const{id:e,selector:t}=sr();return n.onBeforeMount(()=>{K&&(process.env.NODE_ENV==="test"||!rr||!document.body.querySelector(t.value))&&(rr=pp(e.value))}),{id:e,selector:t}},mp=R({showAfter:{type:Number,default:0},hideAfter:{type:Number,default:200},autoClose:{type:Number,default:0}}),gp=({showAfter:e,hideAfter:t,autoClose:o,open:i,close:a})=>{const{registerTimeout:r}=or(),{registerTimeout:s,cancelTimeout:l}=or();return{onOpen:f=>{r(()=>{i(f);const u=n.unref(o);G(u)&&u>0&&s(()=>{a(f)},u)},n.unref(e))},onClose:f=>{l(),r(()=>{a(f)},n.unref(t))}}},lr=Symbol("elForwardRef"),yp=e=>{const t=o=>{e.value=o};n.provide(lr,{setForwardRef:t})},bp=e=>({mounted(t){e(t)},updated(t){e(t)},unmounted(){e(null)}}),cr={current:0},dr=n.ref(0),fr=2e3,ur=Symbol("elZIndexContextKey"),pr=Symbol("zIndexContextKey"),Do=e=>{const t=n.getCurrentInstance()?n.inject(ur,cr):cr,o=e||(n.getCurrentInstance()?n.inject(pr,void 0):void 0),i=n.computed(()=>{const s=n.unref(o);return G(s)?s:fr}),a=n.computed(()=>i.value+dr.value),r=()=>(t.current++,dr.value=t.current,a.value);return!K&&!n.inject(ur)&&ne("ZIndexInjection",`Looks like you are using server rendering, you must provide a z-index provider to ensure the hydration process to be succeed
12
- usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`),{initialZIndex:i,currentZIndex:a,nextZIndex:r}},Et=An({type:String,values:Na,required:!1}),hr=Symbol("size"),wp=()=>{const e=n.inject(hr,{});return n.computed(()=>n.unref(e.size)||"")};function Cp(e,{beforeFocus:t,afterFocus:o,beforeBlur:i,afterBlur:a}={}){const r=n.getCurrentInstance(),{emit:s}=r,l=n.shallowRef(),c=n.ref(!1),d=p=>{Q(t)&&t(p)||c.value||(c.value=!0,s("focus",p),o==null||o())},f=p=>{var g;Q(i)&&i(p)||p.relatedTarget&&((g=l.value)!=null&&g.contains(p.relatedTarget))||(c.value=!1,s("blur",p),a==null||a())},u=()=>{var p,g;(p=l.value)!=null&&p.contains(document.activeElement)&&l.value!==document.activeElement||(g=e.value)==null||g.focus()};return n.watch(l,p=>{p&&p.setAttribute("tabindex","-1")}),he(l,"focus",d,!0),he(l,"blur",f,!0),he(l,"click",u,!0),process.env.NODE_ENV==="test"&&n.onMounted(()=>{const p=Xe(e.value)?e.value:document.querySelector("input,textarea");p&&(he(p,"focus",d,!0),he(p,"blur",f,!0))}),{isFocused:c,wrapperRef:l,handleFocus:d,handleBlur:f}}function vp({afterComposition:e,emit:t}){const o=n.ref(!1),i=l=>{t==null||t("compositionstart",l),o.value=!0},a=l=>{var c;t==null||t("compositionupdate",l);const d=(c=l.target)==null?void 0:c.value,f=d[d.length-1]||"";o.value=!Yf(f)},r=l=>{t==null||t("compositionend",l),o.value&&(o.value=!1,n.nextTick(()=>e(l)))};return{isComposing:o,handleComposition:l=>{l.type==="compositionend"?r(l):a(l)},handleCompositionStart:i,handleCompositionUpdate:a,handleCompositionEnd:r}}const mr=Symbol("emptyValuesContextKey"),Sp="use-empty-values",kp=["",void 0,null],Ep=void 0,Ip=R({emptyValues:Array,valueOnClear:{type:[String,Number,Boolean,Function],default:void 0,validator:e=>Q(e)?!e():!e}}),Tp=(e,t)=>{const o=n.getCurrentInstance()?n.inject(mr,n.ref({})):n.ref({}),i=n.computed(()=>e.emptyValues||o.value.emptyValues||kp),a=n.computed(()=>Q(e.valueOnClear)?e.valueOnClear():e.valueOnClear!==void 0?e.valueOnClear:Q(o.value.valueOnClear)?o.value.valueOnClear():o.value.valueOnClear!==void 0?o.value.valueOnClear:Ep),r=s=>i.value.includes(s);return i.value.includes(a.value)||ne(Sp,"value-on-clear should be a value of empty-values"),{emptyValues:i,valueOnClear:a,isEmptyValue:r}},Ap=R({ariaLabel:String,ariaOrientation:{type:String,values:["horizontal","vertical","undefined"]},ariaControls:String}),at=e=>Ia(Ap,e),gr=Symbol(),Ln=n.ref();function Pn(e,t=void 0){const o=n.getCurrentInstance()?n.inject(gr,Ln):Ln;return e?n.computed(()=>{var i,a;return(a=(i=o.value)==null?void 0:i[e])!=null?a:t}):o}function Op(e,t){const o=Pn(),i=D(e,n.computed(()=>{var l;return((l=o.value)==null?void 0:l.namespace)||qt})),a=Ao(n.computed(()=>{var l;return(l=o.value)==null?void 0:l.locale})),r=Do(n.computed(()=>{var l;return((l=o.value)==null?void 0:l.zIndex)||fr})),s=n.computed(()=>{var l;return n.unref(t)||((l=o.value)==null?void 0:l.size)||""});return Mp(n.computed(()=>n.unref(o)||{})),{ns:i,locale:a,zIndex:r,size:s}}const Mp=(e,t,o=!1)=>{var i;const a=!!n.getCurrentInstance(),r=a?Pn():void 0,s=(i=void 0)!=null?i:a?n.provide:void 0;if(!s){ne("provideGlobalConfig","provideGlobalConfig() can only be used inside setup().");return}const l=n.computed(()=>{const c=n.unref(e);return r!=null&&r.value?xp(r.value,c):c});return s(gr,l),s(_a,n.computed(()=>l.value.locale)),s(La,n.computed(()=>l.value.namespace)),s(pr,n.computed(()=>l.value.zIndex)),s(hr,{size:n.computed(()=>l.value.size||"")}),s(mr,n.computed(()=>({emptyValues:l.value.emptyValues,valueOnClear:l.value.valueOnClear}))),(o||!Ln.value)&&(Ln.value=l.value),l},xp=(e,t)=>{const o=[...new Set([...Ta(e),...Ta(t)])],i={};for(const a of o)i[a]=t[a]!==void 0?t[a]:e[a];return i};var F=(e,t)=>{const o=e.__vccOpts||e;for(const[i,a]of t)o[i]=a;return o};const Bp=R({size:{type:_([Number,String])},color:{type:String}}),Np=n.defineComponent({name:"ElIcon",inheritAttrs:!1}),_p=n.defineComponent({...Np,props:Bp,setup(e){const t=e,o=D("icon"),i=n.computed(()=>{const{size:a,color:r}=t;return!a&&!r?{}:{fontSize:ze(a)?void 0:et(a),"--color":r}});return(a,r)=>(n.openBlock(),n.createElementBlock("i",n.mergeProps({class:n.unref(o).b(),style:n.unref(i)},a.$attrs),[n.renderSlot(a.$slots,"default")],16))}});var Lp=F(_p,[["__file","icon.vue"]]);const be=oe(Lp),$o=Symbol("formContextKey"),Vn=Symbol("formItemContextKey"),It=(e,t={})=>{const o=n.ref(void 0),i=t.prop?o:Pa("size"),a=t.global?o:wp(),r=t.form?{size:void 0}:n.inject($o,void 0),s=t.formItem?{size:void 0}:n.inject(Vn,void 0);return n.computed(()=>i.value||n.unref(e)||(s==null?void 0:s.size)||(r==null?void 0:r.size)||a.value||"")},Rn=e=>{const t=Pa("disabled"),o=n.inject($o,void 0);return n.computed(()=>t.value||n.unref(e)||(o==null?void 0:o.disabled)||!1)},Tt=()=>{const e=n.inject($o,void 0),t=n.inject(Vn,void 0);return{form:e,formItem:t}},Fn=(e,{formItemContext:t,disableIdGeneration:o,disableIdManagement:i})=>{o||(o=n.ref(!1)),i||(i=n.ref(!1));const a=n.ref();let r;const s=n.computed(()=>{var l;return!!(!(e.label||e.ariaLabel)&&t&&t.inputIds&&((l=t.inputIds)==null?void 0:l.length)<=1)});return n.onMounted(()=>{r=n.watch([n.toRef(e,"id"),o],([l,c])=>{const d=l??(c?void 0:it().value);d!==a.value&&(t!=null&&t.removeInputId&&(a.value&&t.removeInputId(a.value),!(i!=null&&i.value)&&!c&&d&&t.addInputId(d)),a.value=d)},{immediate:!0})}),n.onUnmounted(()=>{r&&r(),t!=null&&t.removeInputId&&a.value&&t.removeInputId(a.value)}),{isLabeledByFormItem:s,inputId:a}},At=4,Pp={vertical:{offset:"offsetHeight",scroll:"scrollTop",scrollSize:"scrollHeight",size:"height",key:"vertical",axis:"Y",client:"clientY",direction:"top"},horizontal:{offset:"offsetWidth",scroll:"scrollLeft",scrollSize:"scrollWidth",size:"width",key:"horizontal",axis:"X",client:"clientX",direction:"left"}},Vp=({move:e,size:t,bar:o})=>({[o.size]:t,transform:`translate${o.axis}(${e}%)`}),zo=Symbol("scrollbarContextKey"),Rp=R({vertical:Boolean,size:String,move:Number,ratio:{type:Number,required:!0},always:Boolean}),Fp="Thumb";var yr=F(n.defineComponent({__name:"thumb",props:Rp,setup(e){const t=e,o=n.inject(zo),i=D("scrollbar");o||Oa(Fp,"can not inject scrollbar context");const a=n.ref(),r=n.ref(),s=n.ref({}),l=n.ref(!1);let c=!1,d=!1,f=K?document.onselectstart:null;const u=n.computed(()=>Pp[t.vertical?"vertical":"horizontal"]),p=n.computed(()=>Vp({size:t.size,move:t.move,bar:u.value})),g=n.computed(()=>a.value[u.value.offset]**2/o.wrapElement[u.value.scrollSize]/t.ratio/r.value[u.value.offset]),h=S=>{var E;if(S.stopPropagation(),S.ctrlKey||[1,2].includes(S.button))return;(E=window.getSelection())==null||E.removeAllRanges(),y(S);const O=S.currentTarget;O&&(s.value[u.value.axis]=O[u.value.offset]-(S[u.value.client]-O.getBoundingClientRect()[u.value.direction]))},m=S=>{if(!r.value||!a.value||!o.wrapElement)return;const E=Math.abs(S.target.getBoundingClientRect()[u.value.direction]-S[u.value.client]),O=r.value[u.value.offset]/2,x=(E-O)*100*g.value/a.value[u.value.offset];o.wrapElement[u.value.scroll]=x*o.wrapElement[u.value.scrollSize]/100},y=S=>{S.stopImmediatePropagation(),c=!0,document.addEventListener("mousemove",b),document.addEventListener("mouseup",C),f=document.onselectstart,document.onselectstart=()=>!1},b=S=>{if(!a.value||!r.value||c===!1)return;const E=s.value[u.value.axis];if(!E)return;const O=(a.value.getBoundingClientRect()[u.value.direction]-S[u.value.client])*-1,x=r.value[u.value.offset]-E,N=(O-x)*100*g.value/a.value[u.value.offset];o.wrapElement[u.value.scroll]=N*o.wrapElement[u.value.scrollSize]/100},C=()=>{c=!1,s.value[u.value.axis]=0,document.removeEventListener("mousemove",b),document.removeEventListener("mouseup",C),v(),d&&(l.value=!1)},I=()=>{d=!1,l.value=!!t.size},k=()=>{d=!0,l.value=c};n.onBeforeUnmount(()=>{v(),document.removeEventListener("mouseup",C)});const v=()=>{document.onselectstart!==f&&(document.onselectstart=f)};return he(n.toRef(o,"scrollbarElement"),"mousemove",I),he(n.toRef(o,"scrollbarElement"),"mouseleave",k),(S,E)=>(n.openBlock(),n.createBlock(n.Transition,{name:n.unref(i).b("fade"),persisted:""},{default:n.withCtx(()=>[n.withDirectives(n.createElementVNode("div",{ref_key:"instance",ref:a,class:n.normalizeClass([n.unref(i).e("bar"),n.unref(i).is(n.unref(u).key)]),onMousedown:m},[n.createElementVNode("div",{ref_key:"thumb",ref:r,class:n.normalizeClass(n.unref(i).e("thumb")),style:n.normalizeStyle(n.unref(p)),onMousedown:h},null,38)],34),[[n.vShow,S.always||l.value]])]),_:1},8,["name"]))}}),[["__file","thumb.vue"]]);const Dp=R({always:{type:Boolean,default:!0},minSize:{type:Number,required:!0}});var $p=F(n.defineComponent({__name:"bar",props:Dp,setup(e,{expose:t}){const o=e,i=n.inject(zo),a=n.ref(0),r=n.ref(0),s=n.ref(""),l=n.ref(""),c=n.ref(1),d=n.ref(1);return t({handleScroll:p=>{if(p){const g=p.offsetHeight-At,h=p.offsetWidth-At;r.value=p.scrollTop*100/g*c.value,a.value=p.scrollLeft*100/h*d.value}},update:()=>{const p=i==null?void 0:i.wrapElement;if(!p)return;const g=p.offsetHeight-At,h=p.offsetWidth-At,m=g**2/p.scrollHeight,y=h**2/p.scrollWidth,b=Math.max(m,o.minSize),C=Math.max(y,o.minSize);c.value=m/(g-m)/(b/(g-b)),d.value=y/(h-y)/(C/(h-C)),l.value=b+At<g?`${b}px`:"",s.value=C+At<h?`${C}px`:""}}),(p,g)=>(n.openBlock(),n.createElementBlock(n.Fragment,null,[n.createVNode(yr,{move:a.value,ratio:d.value,size:s.value,always:p.always},null,8,["move","ratio","size","always"]),n.createVNode(yr,{move:r.value,ratio:c.value,size:l.value,vertical:"",always:p.always},null,8,["move","ratio","size","always"])],64))}}),[["__file","bar.vue"]]);const zp=R({height:{type:[String,Number],default:""},maxHeight:{type:[String,Number],default:""},native:{type:Boolean,default:!1},wrapStyle:{type:_([String,Object,Array]),default:""},wrapClass:{type:[String,Array],default:""},viewClass:{type:[String,Array],default:""},viewStyle:{type:[String,Array,Object],default:""},noresize:Boolean,tag:{type:String,default:"div"},always:Boolean,minSize:{type:Number,default:20},tabindex:{type:[String,Number],default:void 0},id:String,role:String,...at(["ariaLabel","ariaOrientation"])}),jp={scroll:({scrollTop:e,scrollLeft:t})=>[e,t].every(G)},jo="ElScrollbar",Hp=n.defineComponent({name:jo}),Kp=n.defineComponent({...Hp,props:zp,emits:jp,setup(e,{expose:t,emit:o}){const i=e,a=D("scrollbar");let r,s,l=0,c=0;const d=n.ref(),f=n.ref(),u=n.ref(),p=n.ref(),g=n.computed(()=>{const v={};return i.height&&(v.height=et(i.height)),i.maxHeight&&(v.maxHeight=et(i.maxHeight)),[i.wrapStyle,v]}),h=n.computed(()=>[i.wrapClass,a.e("wrap"),{[a.em("wrap","hidden-default")]:!i.native}]),m=n.computed(()=>[a.e("view"),i.viewClass]),y=()=>{var v;f.value&&((v=p.value)==null||v.handleScroll(f.value),l=f.value.scrollTop,c=f.value.scrollLeft,o("scroll",{scrollTop:f.value.scrollTop,scrollLeft:f.value.scrollLeft}))};function b(v,S){te(v)?f.value.scrollTo(v):G(v)&&G(S)&&f.value.scrollTo(v,S)}const C=v=>{if(!G(v)){ne(jo,"value must be a number");return}f.value.scrollTop=v},I=v=>{if(!G(v)){ne(jo,"value must be a number");return}f.value.scrollLeft=v},k=()=>{var v;(v=p.value)==null||v.update()};return n.watch(()=>i.noresize,v=>{v?(r==null||r(),s==null||s()):({stop:r}=Re(u,k),s=he("resize",k))},{immediate:!0}),n.watch(()=>[i.maxHeight,i.height],()=>{i.native||n.nextTick(()=>{var v;k(),f.value&&((v=p.value)==null||v.handleScroll(f.value))})}),n.provide(zo,n.reactive({scrollbarElement:d,wrapElement:f})),n.onActivated(()=>{f.value&&(f.value.scrollTop=l,f.value.scrollLeft=c)}),n.onMounted(()=>{i.native||n.nextTick(()=>{k()})}),n.onUpdated(()=>k()),t({wrapRef:f,update:k,scrollTo:b,setScrollTop:C,setScrollLeft:I,handleScroll:y}),(v,S)=>(n.openBlock(),n.createElementBlock("div",{ref_key:"scrollbarRef",ref:d,class:n.normalizeClass(n.unref(a).b())},[n.createElementVNode("div",{ref_key:"wrapRef",ref:f,class:n.normalizeClass(n.unref(h)),style:n.normalizeStyle(n.unref(g)),tabindex:v.tabindex,onScroll:y},[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(v.tag),{id:v.id,ref_key:"resizeRef",ref:u,class:n.normalizeClass(n.unref(m)),style:n.normalizeStyle(v.viewStyle),role:v.role,"aria-label":v.ariaLabel,"aria-orientation":v.ariaOrientation},{default:n.withCtx(()=>[n.renderSlot(v.$slots,"default")]),_:3},8,["id","class","style","role","aria-label","aria-orientation"]))],46,["tabindex"]),v.native?n.createCommentVNode("v-if",!0):(n.openBlock(),n.createBlock($p,{key:0,ref_key:"barRef",ref:p,always:v.always,"min-size":v.minSize},null,8,["always","min-size"]))],2))}});var Up=F(Kp,[["__file","scrollbar.vue"]]);const Wp=oe(Up),Ho=Symbol("popper"),br=Symbol("popperContent"),wr=R({role:{type:String,values:["dialog","grid","group","listbox","menu","navigation","tooltip","tree"],default:"tooltip"}}),qp=n.defineComponent({name:"ElPopper",inheritAttrs:!1}),Gp=n.defineComponent({...qp,props:wr,setup(e,{expose:t}){const o=e,i=n.ref(),a=n.ref(),r=n.ref(),s=n.ref(),l=n.computed(()=>o.role),c={triggerRef:i,popperInstanceRef:a,contentRef:r,referenceRef:s,role:l};return t(c),n.provide(Ho,c),(d,f)=>n.renderSlot(d.$slots,"default")}});var Jp=F(Gp,[["__file","popper.vue"]]);const Cr=R({arrowOffset:{type:Number,default:5}}),Yp=n.defineComponent({name:"ElPopperArrow",inheritAttrs:!1}),Zp=n.defineComponent({...Yp,props:Cr,setup(e,{expose:t}){const o=e,i=D("popper"),{arrowOffset:a,arrowRef:r,arrowStyle:s}=n.inject(br,void 0);return n.watch(()=>o.arrowOffset,l=>{a.value=l}),n.onBeforeUnmount(()=>{r.value=void 0}),t({arrowRef:r}),(l,c)=>(n.openBlock(),n.createElementBlock("span",{ref_key:"arrowRef",ref:r,class:n.normalizeClass(n.unref(i).e("arrow")),style:n.normalizeStyle(n.unref(s)),"data-popper-arrow":""},null,6))}});var Qp=F(Zp,[["__file","arrow.vue"]]);const Ko="ElOnlyChild",Xp=n.defineComponent({name:Ko,setup(e,{slots:t,attrs:o}){var i;const a=n.inject(lr),r=bp((i=a==null?void 0:a.setForwardRef)!=null?i:Je);return()=>{var s;const l=(s=t.default)==null?void 0:s.call(t,o);if(!l)return null;if(l.length>1)return ne(Ko,"requires exact only one valid child."),null;const c=vr(l);return c?n.withDirectives(n.cloneVNode(c,o),[[r]]):(ne(Ko,"no valid child node found"),null)}}});function vr(e){if(!e)return null;const t=e;for(const o of t){if(te(o))switch(o.type){case n.Comment:continue;case n.Text:case"svg":return Sr(o);case n.Fragment:return vr(o.children);default:return o}return Sr(o)}return null}function Sr(e){const t=D("only-child");return n.createVNode("span",{class:t.e("content")},[e])}const kr=R({virtualRef:{type:_(Object)},virtualTriggering:Boolean,onMouseenter:{type:_(Function)},onMouseleave:{type:_(Function)},onClick:{type:_(Function)},onKeydown:{type:_(Function)},onFocus:{type:_(Function)},onBlur:{type:_(Function)},onContextmenu:{type:_(Function)},id:String,open:Boolean}),eh=n.defineComponent({name:"ElPopperTrigger",inheritAttrs:!1}),th=n.defineComponent({...eh,props:kr,setup(e,{expose:t}){const o=e,{role:i,triggerRef:a}=n.inject(Ho,void 0);yp(a);const r=n.computed(()=>l.value?o.id:void 0),s=n.computed(()=>{if(i&&i.value==="tooltip")return o.open&&o.id?o.id:void 0}),l=n.computed(()=>{if(i&&i.value!=="tooltip")return i.value}),c=n.computed(()=>l.value?`${o.open}`:void 0);let d;const f=["onMouseenter","onMouseleave","onClick","onKeydown","onFocus","onBlur","onContextmenu"];return n.onMounted(()=>{n.watch(()=>o.virtualRef,u=>{u&&(a.value=Oe(u))},{immediate:!0}),n.watch(a,(u,p)=>{d==null||d(),d=void 0,Xe(u)&&(f.forEach(g=>{var h;const m=o[g];m&&(u.addEventListener(g.slice(2).toLowerCase(),m),(h=p==null?void 0:p.removeEventListener)==null||h.call(p,g.slice(2).toLowerCase(),m))}),d=n.watch([r,s,l,c],g=>{["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach((h,m)=>{In(g[m])?u.removeAttribute(h):u.setAttribute(h,g[m])})},{immediate:!0})),Xe(p)&&["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach(g=>p.removeAttribute(g))},{immediate:!0})}),n.onBeforeUnmount(()=>{if(d==null||d(),d=void 0,a.value&&Xe(a.value)){const u=a.value;f.forEach(p=>{const g=o[p];g&&u.removeEventListener(p.slice(2).toLowerCase(),g)}),a.value=void 0}}),t({triggerRef:a}),(u,p)=>u.virtualTriggering?n.createCommentVNode("v-if",!0):(n.openBlock(),n.createBlock(n.unref(Xp),n.mergeProps({key:0},u.$attrs,{"aria-controls":n.unref(r),"aria-describedby":n.unref(s),"aria-expanded":n.unref(c),"aria-haspopup":n.unref(l)}),{default:n.withCtx(()=>[n.renderSlot(u.$slots,"default")]),_:3},16,["aria-controls","aria-describedby","aria-expanded","aria-haspopup"]))}});var nh=F(th,[["__file","trigger.vue"]]);const Uo="focus-trap.focus-after-trapped",Wo="focus-trap.focus-after-released",oh="focus-trap.focusout-prevented",Er={cancelable:!0,bubbles:!1},ih={cancelable:!0,bubbles:!1},Ir="focusAfterTrapped",Tr="focusAfterReleased",Ar=Symbol("elFocusTrap"),qo=n.ref(),Dn=n.ref(0),Go=n.ref(0);let $n=0;const Or=e=>{const t=[],o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const a=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||a?NodeFilter.FILTER_SKIP:i.tabIndex>=0||i===document.activeElement?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;o.nextNode();)t.push(o.currentNode);return t},Mr=(e,t)=>{for(const o of e)if(!ah(o,t))return o},ah=(e,t)=>{if(process.env.NODE_ENV==="test")return!1;if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1},rh=e=>{const t=Or(e),o=Mr(t,e),i=Mr(t.reverse(),e);return[o,i]},sh=e=>e instanceof HTMLInputElement&&"select"in e,He=(e,t)=>{if(e&&e.focus){const o=document.activeElement;e.focus({preventScroll:!0}),Go.value=window.performance.now(),e!==o&&sh(e)&&t&&e.select()}};function xr(e,t){const o=[...e],i=e.indexOf(t);return i!==-1&&o.splice(i,1),o}const lh=()=>{let e=[];return{push:i=>{const a=e[0];a&&i!==a&&a.pause(),e=xr(e,i),e.unshift(i)},remove:i=>{var a,r;e=xr(e,i),(r=(a=e[0])==null?void 0:a.resume)==null||r.call(a)}}},ch=(e,t=!1)=>{const o=document.activeElement;for(const i of e)if(He(i,t),document.activeElement!==o)return},Br=lh(),dh=()=>Dn.value>Go.value,zn=()=>{qo.value="pointer",Dn.value=window.performance.now()},Nr=()=>{qo.value="keyboard",Dn.value=window.performance.now()},fh=()=>(n.onMounted(()=>{$n===0&&(document.addEventListener("mousedown",zn),document.addEventListener("touchstart",zn),document.addEventListener("keydown",Nr)),$n++}),n.onBeforeUnmount(()=>{$n--,$n<=0&&(document.removeEventListener("mousedown",zn),document.removeEventListener("touchstart",zn),document.removeEventListener("keydown",Nr))}),{focusReason:qo,lastUserFocusTimestamp:Dn,lastAutomatedFocusTimestamp:Go}),jn=e=>new CustomEvent(oh,{...ih,detail:e}),uh=n.defineComponent({name:"ElFocusTrap",inheritAttrs:!1,props:{loop:Boolean,trapped:Boolean,focusTrapEl:Object,focusStartEl:{type:[Object,String],default:"first"}},emits:[Ir,Tr,"focusin","focusout","focusout-prevented","release-requested"],setup(e,{emit:t}){const o=n.ref();let i,a;const{focusReason:r}=fh();up(h=>{e.trapped&&!s.paused&&t("release-requested",h)});const s={paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}},l=h=>{if(!e.loop&&!e.trapped||s.paused)return;const{key:m,altKey:y,ctrlKey:b,metaKey:C,currentTarget:I,shiftKey:k}=h,{loop:v}=e,S=m===Ut.tab&&!y&&!b&&!C,E=document.activeElement;if(S&&E){const O=I,[x,N]=rh(O);if(x&&N){if(!k&&E===N){const T=jn({focusReason:r.value});t("focusout-prevented",T),T.defaultPrevented||(h.preventDefault(),v&&He(x,!0))}else if(k&&[x,O].includes(E)){const T=jn({focusReason:r.value});t("focusout-prevented",T),T.defaultPrevented||(h.preventDefault(),v&&He(N,!0))}}else if(E===O){const T=jn({focusReason:r.value});t("focusout-prevented",T),T.defaultPrevented||h.preventDefault()}}};n.provide(Ar,{focusTrapRef:o,onKeydown:l}),n.watch(()=>e.focusTrapEl,h=>{h&&(o.value=h)},{immediate:!0}),n.watch([o],([h],[m])=>{h&&(h.addEventListener("keydown",l),h.addEventListener("focusin",f),h.addEventListener("focusout",u)),m&&(m.removeEventListener("keydown",l),m.removeEventListener("focusin",f),m.removeEventListener("focusout",u))});const c=h=>{t(Ir,h)},d=h=>t(Tr,h),f=h=>{const m=n.unref(o);if(!m)return;const y=h.target,b=h.relatedTarget,C=y&&m.contains(y);e.trapped||b&&m.contains(b)||(i=b),C&&t("focusin",h),!s.paused&&e.trapped&&(C?a=y:He(a,!0))},u=h=>{const m=n.unref(o);if(!(s.paused||!m))if(e.trapped){const y=h.relatedTarget;!In(y)&&!m.contains(y)&&setTimeout(()=>{if(!s.paused&&e.trapped){const b=jn({focusReason:r.value});t("focusout-prevented",b),b.defaultPrevented||He(a,!0)}},0)}else{const y=h.target;y&&m.contains(y)||t("focusout",h)}};async function p(){await n.nextTick();const h=n.unref(o);if(h){Br.push(s);const m=h.contains(document.activeElement)?i:document.activeElement;if(i=m,!h.contains(m)){const b=new Event(Uo,Er);h.addEventListener(Uo,c),h.dispatchEvent(b),b.defaultPrevented||n.nextTick(()=>{let C=e.focusStartEl;me(C)||(He(C),document.activeElement!==C&&(C="first")),C==="first"&&ch(Or(h),!0),(document.activeElement===m||C==="container")&&He(h)})}}}function g(){const h=n.unref(o);if(h){h.removeEventListener(Uo,c);const m=new CustomEvent(Wo,{...Er,detail:{focusReason:r.value}});h.addEventListener(Wo,d),h.dispatchEvent(m),!m.defaultPrevented&&(r.value=="keyboard"||!dh()||h.contains(document.activeElement))&&He(i??document.body),h.removeEventListener(Wo,d),Br.remove(s)}}return n.onMounted(()=>{e.trapped&&p(),n.watch(()=>e.trapped,h=>{h?p():g()})}),n.onBeforeUnmount(()=>{e.trapped&&g(),o.value&&(o.value.removeEventListener("keydown",l),o.value.removeEventListener("focusin",f),o.value.removeEventListener("focusout",u),o.value=void 0)}),{onKeydown:l}}});function ph(e,t,o,i,a,r){return n.renderSlot(e.$slots,"default",{handleKeydown:e.onKeydown})}var _r=F(uh,[["render",ph],["__file","focus-trap.vue"]]);const hh=["fixed","absolute"],mh=R({boundariesPadding:{type:Number,default:0},fallbackPlacements:{type:_(Array),default:void 0},gpuAcceleration:{type:Boolean,default:!0},offset:{type:Number,default:12},placement:{type:String,values:Mn,default:"bottom"},popperOptions:{type:_(Object),default:()=>({})},strategy:{type:String,values:hh,default:"absolute"}}),Lr=R({...mh,id:String,style:{type:_([String,Array,Object])},className:{type:_([String,Array,Object])},effect:{type:_(String),default:"dark"},visible:Boolean,enterable:{type:Boolean,default:!0},pure:Boolean,focusOnShow:{type:Boolean,default:!1},trapping:{type:Boolean,default:!1},popperClass:{type:_([String,Array,Object])},popperStyle:{type:_([String,Array,Object])},referenceEl:{type:_(Object)},triggerTargetEl:{type:_(Object)},stopPopperMouseEvent:{type:Boolean,default:!0},virtualTriggering:Boolean,zIndex:Number,...at(["ariaLabel"])}),gh={mouseenter:e=>e instanceof MouseEvent,mouseleave:e=>e instanceof MouseEvent,focus:()=>!0,blur:()=>!0,close:()=>!0},yh=(e,t=[])=>{const{placement:o,strategy:i,popperOptions:a}=e,r={placement:o,strategy:i,...a,modifiers:[...wh(e),...t]};return Ch(r,a==null?void 0:a.modifiers),r},bh=e=>{if(K)return Oe(e)};function wh(e){const{offset:t,gpuAcceleration:o,fallbackPlacements:i}=e;return[{name:"offset",options:{offset:[0,t??12]}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5,fallbackPlacements:i}},{name:"computeStyles",options:{gpuAcceleration:o}}]}function Ch(e,t){t&&(e.modifiers=[...e.modifiers,...t??[]])}const vh=0,Sh=e=>{const{popperInstanceRef:t,contentRef:o,triggerRef:i,role:a}=n.inject(Ho,void 0),r=n.ref(),s=n.ref(),l=n.computed(()=>({name:"eventListeners",enabled:!!e.visible})),c=n.computed(()=>{var b;const C=n.unref(r),I=(b=n.unref(s))!=null?b:vh;return{name:"arrow",enabled:!Ea(C),options:{element:C,padding:I}}}),d=n.computed(()=>({onFirstUpdate:()=>{h()},...yh(e,[n.unref(c),n.unref(l)])})),f=n.computed(()=>bh(e.referenceEl)||n.unref(i)),{attributes:u,state:p,styles:g,update:h,forceUpdate:m,instanceRef:y}=cp(f,o,d);return n.watch(y,b=>t.value=b),n.onMounted(()=>{n.watch(()=>{var b;return(b=n.unref(f))==null?void 0:b.getBoundingClientRect()},()=>{h()})}),{attributes:u,arrowRef:r,contentRef:o,instanceRef:y,state:p,styles:g,role:a,forceUpdate:m,update:h}},kh=(e,{attributes:t,styles:o,role:i})=>{const{nextZIndex:a}=Do(),r=D("popper"),s=n.computed(()=>n.unref(t).popper),l=n.ref(G(e.zIndex)?e.zIndex:a()),c=n.computed(()=>[r.b(),r.is("pure",e.pure),r.is(e.effect),e.popperClass]),d=n.computed(()=>[{zIndex:n.unref(l)},n.unref(o).popper,e.popperStyle||{}]),f=n.computed(()=>i.value==="dialog"?"false":void 0),u=n.computed(()=>n.unref(o).arrow||{});return{ariaModal:f,arrowStyle:u,contentAttrs:s,contentClass:c,contentStyle:d,contentZIndex:l,updateZIndex:()=>{l.value=G(e.zIndex)?e.zIndex:a()}}},Eh=(e,t)=>{const o=n.ref(!1),i=n.ref();return{focusStartRef:i,trapped:o,onFocusAfterReleased:d=>{var f;((f=d.detail)==null?void 0:f.focusReason)!=="pointer"&&(i.value="first",t("blur"))},onFocusAfterTrapped:()=>{t("focus")},onFocusInTrap:d=>{e.visible&&!o.value&&(d.target&&(i.value=d.target),o.value=!0)},onFocusoutPrevented:d=>{e.trapping||(d.detail.focusReason==="pointer"&&d.preventDefault(),o.value=!1)},onReleaseRequested:()=>{o.value=!1,t("close")}}},Ih=n.defineComponent({name:"ElPopperContent"}),Th=n.defineComponent({...Ih,props:Lr,emits:gh,setup(e,{expose:t,emit:o}){const i=e,{focusStartRef:a,trapped:r,onFocusAfterReleased:s,onFocusAfterTrapped:l,onFocusInTrap:c,onFocusoutPrevented:d,onReleaseRequested:f}=Eh(i,o),{attributes:u,arrowRef:p,contentRef:g,styles:h,instanceRef:m,role:y,update:b}=Sh(i),{ariaModal:C,arrowStyle:I,contentAttrs:k,contentClass:v,contentStyle:S,updateZIndex:E}=kh(i,{styles:h,attributes:u,role:y}),O=n.inject(Vn,void 0),x=n.ref();n.provide(br,{arrowStyle:I,arrowRef:p,arrowOffset:x}),O&&n.provide(Vn,{...O,addInputId:Je,removeInputId:Je});let N;const B=(L=!0)=>{b(),L&&E()},T=()=>{B(!1),i.visible&&i.focusOnShow?r.value=!0:i.visible===!1&&(r.value=!1)};return n.onMounted(()=>{n.watch(()=>i.triggerTargetEl,(L,q)=>{N==null||N(),N=void 0;const V=n.unref(L||g.value),M=n.unref(q||g.value);Xe(V)&&(N=n.watch([y,()=>i.ariaLabel,C,()=>i.id],$=>{["role","aria-label","aria-modal","id"].forEach((pe,Y)=>{In($[Y])?V.removeAttribute(pe):V.setAttribute(pe,$[Y])})},{immediate:!0})),M!==V&&Xe(M)&&["role","aria-label","aria-modal","id"].forEach($=>{M.removeAttribute($)})},{immediate:!0}),n.watch(()=>i.visible,T,{immediate:!0})}),n.onBeforeUnmount(()=>{N==null||N(),N=void 0}),t({popperContentRef:g,popperInstanceRef:m,updatePopper:B,contentStyle:S}),(L,q)=>(n.openBlock(),n.createElementBlock("div",n.mergeProps({ref_key:"contentRef",ref:g},n.unref(k),{style:n.unref(S),class:n.unref(v),tabindex:"-1",onMouseenter:V=>L.$emit("mouseenter",V),onMouseleave:V=>L.$emit("mouseleave",V)}),[n.createVNode(n.unref(_r),{trapped:n.unref(r),"trap-on-focus-in":!0,"focus-trap-el":n.unref(g),"focus-start-el":n.unref(a),onFocusAfterTrapped:n.unref(l),onFocusAfterReleased:n.unref(s),onFocusin:n.unref(c),onFocusoutPrevented:n.unref(d),onReleaseRequested:n.unref(f)},{default:n.withCtx(()=>[n.renderSlot(L.$slots,"default")]),_:3},8,["trapped","focus-trap-el","focus-start-el","onFocusAfterTrapped","onFocusAfterReleased","onFocusin","onFocusoutPrevented","onReleaseRequested"])],16,["onMouseenter","onMouseleave"]))}});var Ah=F(Th,[["__file","content.vue"]]);const Oh=oe(Jp),Jo=Symbol("elTooltip"),se=R({...mp,...Lr,appendTo:{type:_([String,Object])},content:{type:String,default:""},rawContent:Boolean,persistent:Boolean,visible:{type:_(Boolean),default:null},transition:String,teleported:{type:Boolean,default:!0},disabled:Boolean,...at(["ariaLabel"])}),tn=R({...kr,disabled:Boolean,trigger:{type:_([String,Array]),default:"hover"},triggerKeys:{type:_(Array),default:()=>[Ut.enter,Ut.space]}}),{useModelToggleProps:Mh,useModelToggleEmits:xh,useModelToggle:Bh}=ru("visible"),Nh=R({...wr,...Mh,...se,...tn,...Cr,showArrow:{type:Boolean,default:!0}}),_h=[...xh,"before-show","before-hide","show","hide","open","close"],Lh=(e,t)=>ee(e)?e.includes(t):e===t,Ot=(e,t,o)=>i=>{Lh(n.unref(e),t)&&o(i)},Ph=n.defineComponent({name:"ElTooltipTrigger"}),Vh=n.defineComponent({...Ph,props:tn,setup(e,{expose:t}){const o=e,i=D("tooltip"),{controlled:a,id:r,open:s,onOpen:l,onClose:c,onToggle:d}=n.inject(Jo,void 0),f=n.ref(null),u=()=>{if(n.unref(a)||o.disabled)return!0},p=n.toRef(o,"trigger"),g=Ae(u,Ot(p,"hover",l)),h=Ae(u,Ot(p,"hover",c)),m=Ae(u,Ot(p,"click",k=>{k.button===0&&d(k)})),y=Ae(u,Ot(p,"focus",l)),b=Ae(u,Ot(p,"focus",c)),C=Ae(u,Ot(p,"contextmenu",k=>{k.preventDefault(),d(k)})),I=Ae(u,k=>{const{code:v}=k;o.triggerKeys.includes(v)&&(k.preventDefault(),d(k))});return t({triggerRef:f}),(k,v)=>(n.openBlock(),n.createBlock(n.unref(nh),{id:n.unref(r),"virtual-ref":k.virtualRef,open:n.unref(s),"virtual-triggering":k.virtualTriggering,class:n.normalizeClass(n.unref(i).e("trigger")),onBlur:n.unref(b),onClick:n.unref(m),onContextmenu:n.unref(C),onFocus:n.unref(y),onMouseenter:n.unref(g),onMouseleave:n.unref(h),onKeydown:n.unref(I)},{default:n.withCtx(()=>[n.renderSlot(k.$slots,"default")]),_:3},8,["id","virtual-ref","open","virtual-triggering","class","onBlur","onClick","onContextmenu","onFocus","onMouseenter","onMouseleave","onKeydown"]))}});var Rh=F(Vh,[["__file","trigger.vue"]]);const Fh=R({to:{type:_([String,Object]),required:!0},disabled:Boolean});var Dh=F(n.defineComponent({__name:"teleport",props:Fh,setup(e){return(t,o)=>t.disabled?n.renderSlot(t.$slots,"default",{key:0}):(n.openBlock(),n.createBlock(n.Teleport,{key:1,to:t.to},[n.renderSlot(t.$slots,"default")],8,["to"]))}}),[["__file","teleport.vue"]]);const Pr=oe(Dh),$h=n.defineComponent({name:"ElTooltipContent",inheritAttrs:!1}),zh=n.defineComponent({...$h,props:se,setup(e,{expose:t}){const o=e,{selector:i}=sr(),a=D("tooltip"),r=n.ref(null);let s;const{controlled:l,id:c,open:d,trigger:f,onClose:u,onOpen:p,onShow:g,onHide:h,onBeforeShow:m,onBeforeHide:y}=n.inject(Jo,void 0),b=n.computed(()=>o.transition||`${a.namespace.value}-fade-in-linear`),C=n.computed(()=>process.env.NODE_ENV==="test"?!0:o.persistent);n.onBeforeUnmount(()=>{s==null||s()});const I=n.computed(()=>n.unref(C)?!0:n.unref(d)),k=n.computed(()=>o.disabled?!1:n.unref(d)),v=n.computed(()=>o.appendTo||i.value),S=n.computed(()=>{var M;return(M=o.style)!=null?M:{}}),E=n.ref(!0),O=()=>{h(),E.value=!0},x=()=>{if(n.unref(l))return!0},N=Ae(x,()=>{o.enterable&&n.unref(f)==="hover"&&p()}),B=Ae(x,()=>{n.unref(f)==="hover"&&u()}),T=()=>{var M,$;($=(M=r.value)==null?void 0:M.updatePopper)==null||$.call(M),m==null||m()},L=()=>{y==null||y()},q=()=>{g(),s=_s(n.computed(()=>{var M;return(M=r.value)==null?void 0:M.popperContentRef}),()=>{if(n.unref(l))return;n.unref(f)!=="hover"&&u()})},V=()=>{o.virtualTriggering||u()};return n.watch(()=>n.unref(d),M=>{M?E.value=!1:s==null||s()},{flush:"post"}),n.watch(()=>o.content,()=>{var M,$;($=(M=r.value)==null?void 0:M.updatePopper)==null||$.call(M)}),t({contentRef:r}),(M,$)=>(n.openBlock(),n.createBlock(n.unref(Pr),{disabled:!M.teleported,to:n.unref(v)},{default:n.withCtx(()=>[n.createVNode(n.Transition,{name:n.unref(b),onAfterLeave:O,onBeforeEnter:T,onAfterEnter:q,onBeforeLeave:L},{default:n.withCtx(()=>[n.unref(I)?n.withDirectives((n.openBlock(),n.createBlock(n.unref(Ah),n.mergeProps({key:0,id:n.unref(c),ref_key:"contentRef",ref:r},M.$attrs,{"aria-label":M.ariaLabel,"aria-hidden":E.value,"boundaries-padding":M.boundariesPadding,"fallback-placements":M.fallbackPlacements,"gpu-acceleration":M.gpuAcceleration,offset:M.offset,placement:M.placement,"popper-options":M.popperOptions,strategy:M.strategy,effect:M.effect,enterable:M.enterable,pure:M.pure,"popper-class":M.popperClass,"popper-style":[M.popperStyle,n.unref(S)],"reference-el":M.referenceEl,"trigger-target-el":M.triggerTargetEl,visible:n.unref(k),"z-index":M.zIndex,onMouseenter:n.unref(N),onMouseleave:n.unref(B),onBlur:V,onClose:n.unref(u)}),{default:n.withCtx(()=>[n.renderSlot(M.$slots,"default")]),_:3},16,["id","aria-label","aria-hidden","boundaries-padding","fallback-placements","gpu-acceleration","offset","placement","popper-options","strategy","effect","enterable","pure","popper-class","popper-style","reference-el","trigger-target-el","visible","z-index","onMouseenter","onMouseleave","onClose"])),[[n.vShow,n.unref(k)]]):n.createCommentVNode("v-if",!0)]),_:3},8,["name"])]),_:3},8,["disabled","to"]))}});var jh=F(zh,[["__file","content.vue"]]);const Hh=n.defineComponent({name:"ElTooltip"}),Kh=n.defineComponent({...Hh,props:Nh,emits:_h,setup(e,{expose:t,emit:o}){const i=e;hp();const a=it(),r=n.ref(),s=n.ref(),l=()=>{var b;const C=n.unref(r);C&&((b=C.popperInstanceRef)==null||b.update())},c=n.ref(!1),d=n.ref(),{show:f,hide:u,hasUpdateHandler:p}=Bh({indicator:c,toggleReason:d}),{onOpen:g,onClose:h}=gp({showAfter:n.toRef(i,"showAfter"),hideAfter:n.toRef(i,"hideAfter"),autoClose:n.toRef(i,"autoClose"),open:f,close:u}),m=n.computed(()=>_e(i.visible)&&!p.value);n.provide(Jo,{controlled:m,id:a,open:n.readonly(c),trigger:n.toRef(i,"trigger"),onOpen:b=>{g(b)},onClose:b=>{h(b)},onToggle:b=>{n.unref(c)?h(b):g(b)},onShow:()=>{o("show",d.value)},onHide:()=>{o("hide",d.value)},onBeforeShow:()=>{o("before-show",d.value)},onBeforeHide:()=>{o("before-hide",d.value)},updatePopper:l}),n.watch(()=>i.disabled,b=>{b&&c.value&&(c.value=!1)});const y=b=>{var C,I;const k=(I=(C=s.value)==null?void 0:C.contentRef)==null?void 0:I.popperContentRef,v=(b==null?void 0:b.relatedTarget)||document.activeElement;return k&&k.contains(v)};return n.onDeactivated(()=>c.value&&u()),t({popperRef:r,contentRef:s,isFocusInsideContent:y,updatePopper:l,onOpen:g,onClose:h,hide:u}),(b,C)=>(n.openBlock(),n.createBlock(n.unref(Oh),{ref_key:"popperRef",ref:r,role:b.role},{default:n.withCtx(()=>[n.createVNode(Rh,{disabled:b.disabled,trigger:b.trigger,"trigger-keys":b.triggerKeys,"virtual-ref":b.virtualRef,"virtual-triggering":b.virtualTriggering},{default:n.withCtx(()=>[b.$slots.default?n.renderSlot(b.$slots,"default",{key:0}):n.createCommentVNode("v-if",!0)]),_:3},8,["disabled","trigger","trigger-keys","virtual-ref","virtual-triggering"]),n.createVNode(jh,{ref_key:"contentRef",ref:s,"aria-label":b.ariaLabel,"boundaries-padding":b.boundariesPadding,content:b.content,disabled:b.disabled,effect:b.effect,enterable:b.enterable,"fallback-placements":b.fallbackPlacements,"hide-after":b.hideAfter,"gpu-acceleration":b.gpuAcceleration,offset:b.offset,persistent:b.persistent,"popper-class":b.popperClass,"popper-style":b.popperStyle,placement:b.placement,"popper-options":b.popperOptions,pure:b.pure,"raw-content":b.rawContent,"reference-el":b.referenceEl,"trigger-target-el":b.triggerTargetEl,"show-after":b.showAfter,strategy:b.strategy,teleported:b.teleported,transition:b.transition,"virtual-triggering":b.virtualTriggering,"z-index":b.zIndex,"append-to":b.appendTo},{default:n.withCtx(()=>[n.renderSlot(b.$slots,"content",{},()=>[b.rawContent?(n.openBlock(),n.createElementBlock("span",{key:0,innerHTML:b.content},null,8,["innerHTML"])):(n.openBlock(),n.createElementBlock("span",{key:1},n.toDisplayString(b.content),1))]),b.showArrow?(n.openBlock(),n.createBlock(n.unref(Qp),{key:0,"arrow-offset":b.arrowOffset},null,8,["arrow-offset"])):n.createCommentVNode("v-if",!0)]),_:3},8,["aria-label","boundaries-padding","content","disabled","effect","enterable","fallback-placements","hide-after","gpu-acceleration","offset","persistent","popper-class","popper-style","placement","popper-options","pure","raw-content","reference-el","trigger-target-el","show-after","strategy","teleported","transition","virtual-triggering","z-index","append-to"])]),_:3},8,["role"]))}});var Uh=F(Kh,[["__file","tooltip.vue"]]);const Vr=oe(Uh),Rr=Symbol("buttonGroupContextKey"),Wh=(e,t)=>{yt({from:"type.text",replacement:"link",version:"3.0.0",scope:"props",ref:"https://element-plus.org/en-US/component/button.html#button-attributes"},n.computed(()=>e.type==="text"));const o=n.inject(Rr,void 0),i=Pn("button"),{form:a}=Tt(),r=It(n.computed(()=>o==null?void 0:o.size)),s=Rn(),l=n.ref(),c=n.useSlots(),d=n.computed(()=>e.type||(o==null?void 0:o.type)||""),f=n.computed(()=>{var h,m,y;return(y=(m=e.autoInsertSpace)!=null?m:(h=i.value)==null?void 0:h.autoInsertSpace)!=null?y:!1}),u=n.computed(()=>e.tag==="button"?{ariaDisabled:s.value||e.loading,disabled:s.value||e.loading,autofocus:e.autofocus,type:e.nativeType}:{}),p=n.computed(()=>{var h;const m=(h=c.default)==null?void 0:h.call(c);if(f.value&&(m==null?void 0:m.length)===1){const y=m[0];if((y==null?void 0:y.type)===n.Text){const b=y.children;return new RegExp("^\\p{Unified_Ideograph}{2}$","u").test(b.trim())}}return!1});return{_disabled:s,_size:r,_type:d,_ref:l,_props:u,shouldAddSpace:p,handleClick:h=>{if(s.value||e.loading){h.stopPropagation();return}e.nativeType==="reset"&&(a==null||a.resetFields()),t("click",h)}}},Yo=R({size:Et,disabled:Boolean,type:{type:String,values:["default","primary","success","warning","info","danger","text",""],default:""},icon:{type:gt},nativeType:{type:String,values:["button","submit","reset"],default:"button"},loading:Boolean,loadingIcon:{type:gt,default:()=>W.Loading},plain:Boolean,text:Boolean,link:Boolean,bg:Boolean,autofocus:Boolean,round:Boolean,circle:Boolean,color:String,dark:Boolean,autoInsertSpace:{type:Boolean,default:void 0},tag:{type:_([String,Object]),default:"button"}}),qh={click:e=>e instanceof MouseEvent};function J(e,t){Gh(e)&&(e="100%");var o=Jh(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),o&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function Hn(e){return Math.min(1,Math.max(0,e))}function Gh(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function Jh(e){return typeof e=="string"&&e.indexOf("%")!==-1}function Fr(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Kn(e){return e<=1?"".concat(Number(e)*100,"%"):e}function rt(e){return e.length===1?"0"+e:String(e)}function Yh(e,t,o){return{r:J(e,255)*255,g:J(t,255)*255,b:J(o,255)*255}}function Dr(e,t,o){e=J(e,255),t=J(t,255),o=J(o,255);var i=Math.max(e,t,o),a=Math.min(e,t,o),r=0,s=0,l=(i+a)/2;if(i===a)s=0,r=0;else{var c=i-a;switch(s=l>.5?c/(2-i-a):c/(i+a),i){case e:r=(t-o)/c+(t<o?6:0);break;case t:r=(o-e)/c+2;break;case o:r=(e-t)/c+4;break}r/=6}return{h:r,s,l}}function Zo(e,t,o){return o<0&&(o+=1),o>1&&(o-=1),o<1/6?e+(t-e)*(6*o):o<1/2?t:o<2/3?e+(t-e)*(2/3-o)*6:e}function Zh(e,t,o){var i,a,r;if(e=J(e,360),t=J(t,100),o=J(o,100),t===0)a=o,r=o,i=o;else{var s=o<.5?o*(1+t):o+t-o*t,l=2*o-s;i=Zo(l,s,e+1/3),a=Zo(l,s,e),r=Zo(l,s,e-1/3)}return{r:i*255,g:a*255,b:r*255}}function $r(e,t,o){e=J(e,255),t=J(t,255),o=J(o,255);var i=Math.max(e,t,o),a=Math.min(e,t,o),r=0,s=i,l=i-a,c=i===0?0:l/i;if(i===a)r=0;else{switch(i){case e:r=(t-o)/l+(t<o?6:0);break;case t:r=(o-e)/l+2;break;case o:r=(e-t)/l+4;break}r/=6}return{h:r,s:c,v:s}}function Qh(e,t,o){e=J(e,360)*6,t=J(t,100),o=J(o,100);var i=Math.floor(e),a=e-i,r=o*(1-t),s=o*(1-a*t),l=o*(1-(1-a)*t),c=i%6,d=[o,s,r,r,l,o][c],f=[l,o,o,s,r,r][c],u=[r,r,l,o,o,s][c];return{r:d*255,g:f*255,b:u*255}}function zr(e,t,o,i){var a=[rt(Math.round(e).toString(16)),rt(Math.round(t).toString(16)),rt(Math.round(o).toString(16))];return i&&a[0].startsWith(a[0].charAt(1))&&a[1].startsWith(a[1].charAt(1))&&a[2].startsWith(a[2].charAt(1))?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0):a.join("")}function Xh(e,t,o,i,a){var r=[rt(Math.round(e).toString(16)),rt(Math.round(t).toString(16)),rt(Math.round(o).toString(16)),rt(em(i))];return a&&r[0].startsWith(r[0].charAt(1))&&r[1].startsWith(r[1].charAt(1))&&r[2].startsWith(r[2].charAt(1))&&r[3].startsWith(r[3].charAt(1))?r[0].charAt(0)+r[1].charAt(0)+r[2].charAt(0)+r[3].charAt(0):r.join("")}function em(e){return Math.round(parseFloat(e)*255).toString(16)}function jr(e){return le(e)/255}function le(e){return parseInt(e,16)}function tm(e){return{r:e>>16,g:(e&65280)>>8,b:e&255}}var Qo={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function nm(e){var t={r:0,g:0,b:0},o=1,i=null,a=null,r=null,s=!1,l=!1;return typeof e=="string"&&(e=am(e)),typeof e=="object"&&(Pe(e.r)&&Pe(e.g)&&Pe(e.b)?(t=Yh(e.r,e.g,e.b),s=!0,l=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Pe(e.h)&&Pe(e.s)&&Pe(e.v)?(i=Kn(e.s),a=Kn(e.v),t=Qh(e.h,i,a),s=!0,l="hsv"):Pe(e.h)&&Pe(e.s)&&Pe(e.l)&&(i=Kn(e.s),r=Kn(e.l),t=Zh(e.h,i,r),s=!0,l="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(o=e.a)),o=Fr(o),{ok:s,format:e.format||l,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:o}}var om="[-\\+]?\\d+%?",im="[-\\+]?\\d*\\.\\d+%?",Ke="(?:".concat(im,")|(?:").concat(om,")"),Xo="[\\s|\\(]+(".concat(Ke,")[,|\\s]+(").concat(Ke,")[,|\\s]+(").concat(Ke,")\\s*\\)?"),ei="[\\s|\\(]+(".concat(Ke,")[,|\\s]+(").concat(Ke,")[,|\\s]+(").concat(Ke,")[,|\\s]+(").concat(Ke,")\\s*\\)?"),we={CSS_UNIT:new RegExp(Ke),rgb:new RegExp("rgb"+Xo),rgba:new RegExp("rgba"+ei),hsl:new RegExp("hsl"+Xo),hsla:new RegExp("hsla"+ei),hsv:new RegExp("hsv"+Xo),hsva:new RegExp("hsva"+ei),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function am(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(Qo[e])e=Qo[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var o=we.rgb.exec(e);return o?{r:o[1],g:o[2],b:o[3]}:(o=we.rgba.exec(e),o?{r:o[1],g:o[2],b:o[3],a:o[4]}:(o=we.hsl.exec(e),o?{h:o[1],s:o[2],l:o[3]}:(o=we.hsla.exec(e),o?{h:o[1],s:o[2],l:o[3],a:o[4]}:(o=we.hsv.exec(e),o?{h:o[1],s:o[2],v:o[3]}:(o=we.hsva.exec(e),o?{h:o[1],s:o[2],v:o[3],a:o[4]}:(o=we.hex8.exec(e),o?{r:le(o[1]),g:le(o[2]),b:le(o[3]),a:jr(o[4]),format:t?"name":"hex8"}:(o=we.hex6.exec(e),o?{r:le(o[1]),g:le(o[2]),b:le(o[3]),format:t?"name":"hex"}:(o=we.hex4.exec(e),o?{r:le(o[1]+o[1]),g:le(o[2]+o[2]),b:le(o[3]+o[3]),a:jr(o[4]+o[4]),format:t?"name":"hex8"}:(o=we.hex3.exec(e),o?{r:le(o[1]+o[1]),g:le(o[2]+o[2]),b:le(o[3]+o[3]),format:t?"name":"hex"}:!1)))))))))}function Pe(e){return!!we.CSS_UNIT.exec(String(e))}var rm=function(){function e(t,o){t===void 0&&(t=""),o===void 0&&(o={});var i;if(t instanceof e)return t;typeof t=="number"&&(t=tm(t)),this.originalInput=t;var a=nm(t);this.originalInput=t,this.r=a.r,this.g=a.g,this.b=a.b,this.a=a.a,this.roundA=Math.round(100*this.a)/100,this.format=(i=o.format)!==null&&i!==void 0?i:a.format,this.gradientType=o.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=a.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),o,i,a,r=t.r/255,s=t.g/255,l=t.b/255;return r<=.03928?o=r/12.92:o=Math.pow((r+.055)/1.055,2.4),s<=.03928?i=s/12.92:i=Math.pow((s+.055)/1.055,2.4),l<=.03928?a=l/12.92:a=Math.pow((l+.055)/1.055,2.4),.2126*o+.7152*i+.0722*a},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=Fr(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.isMonochrome=function(){var t=this.toHsl().s;return t===0},e.prototype.toHsv=function(){var t=$r(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=$r(this.r,this.g,this.b),o=Math.round(t.h*360),i=Math.round(t.s*100),a=Math.round(t.v*100);return this.a===1?"hsv(".concat(o,", ").concat(i,"%, ").concat(a,"%)"):"hsva(".concat(o,", ").concat(i,"%, ").concat(a,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=Dr(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=Dr(this.r,this.g,this.b),o=Math.round(t.h*360),i=Math.round(t.s*100),a=Math.round(t.l*100);return this.a===1?"hsl(".concat(o,", ").concat(i,"%, ").concat(a,"%)"):"hsla(".concat(o,", ").concat(i,"%, ").concat(a,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),zr(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),Xh(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toHexShortString=function(t){return t===void 0&&(t=!1),this.a===1?this.toHexString(t):this.toHex8String(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),o=Math.round(this.g),i=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(o,", ").concat(i,")"):"rgba(".concat(t,", ").concat(o,", ").concat(i,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(o){return"".concat(Math.round(J(o,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(o){return Math.round(J(o,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+zr(this.r,this.g,this.b,!1),o=0,i=Object.entries(Qo);o<i.length;o++){var a=i[o],r=a[0],s=a[1];if(t===s)return r}return!1},e.prototype.toString=function(t){var o=!!t;t=t??this.format;var i=!1,a=this.a<1&&this.a>=0,r=!o&&a&&(t.startsWith("hex")||t==="name");return r?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(i=this.toRgbString()),t==="prgb"&&(i=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(i=this.toHexString()),t==="hex3"&&(i=this.toHexString(!0)),t==="hex4"&&(i=this.toHex8String(!0)),t==="hex8"&&(i=this.toHex8String()),t==="name"&&(i=this.toName()),t==="hsl"&&(i=this.toHslString()),t==="hsv"&&(i=this.toHsvString()),i||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var o=this.toHsl();return o.l+=t/100,o.l=Hn(o.l),new e(o)},e.prototype.brighten=function(t){t===void 0&&(t=10);var o=this.toRgb();return o.r=Math.max(0,Math.min(255,o.r-Math.round(255*-(t/100)))),o.g=Math.max(0,Math.min(255,o.g-Math.round(255*-(t/100)))),o.b=Math.max(0,Math.min(255,o.b-Math.round(255*-(t/100)))),new e(o)},e.prototype.darken=function(t){t===void 0&&(t=10);var o=this.toHsl();return o.l-=t/100,o.l=Hn(o.l),new e(o)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var o=this.toHsl();return o.s-=t/100,o.s=Hn(o.s),new e(o)},e.prototype.saturate=function(t){t===void 0&&(t=10);var o=this.toHsl();return o.s+=t/100,o.s=Hn(o.s),new e(o)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var o=this.toHsl(),i=(o.h+t)%360;return o.h=i<0?360+i:i,new e(o)},e.prototype.mix=function(t,o){o===void 0&&(o=50);var i=this.toRgb(),a=new e(t).toRgb(),r=o/100,s={r:(a.r-i.r)*r+i.r,g:(a.g-i.g)*r+i.g,b:(a.b-i.b)*r+i.b,a:(a.a-i.a)*r+i.a};return new e(s)},e.prototype.analogous=function(t,o){t===void 0&&(t=6),o===void 0&&(o=30);var i=this.toHsl(),a=360/o,r=[this];for(i.h=(i.h-(a*t>>1)+720)%360;--t;)i.h=(i.h+a)%360,r.push(new e(i));return r},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var o=this.toHsv(),i=o.h,a=o.s,r=o.v,s=[],l=1/t;t--;)s.push(new e({h:i,s:a,v:r})),r=(r+l)%1;return s},e.prototype.splitcomplement=function(){var t=this.toHsl(),o=t.h;return[this,new e({h:(o+72)%360,s:t.s,l:t.l}),new e({h:(o+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var o=this.toRgb(),i=new e(t).toRgb(),a=o.a+i.a*(1-o.a);return new e({r:(o.r*o.a+i.r*i.a*(1-o.a))/a,g:(o.g*o.a+i.g*i.a*(1-o.a))/a,b:(o.b*o.a+i.b*i.a*(1-o.a))/a,a})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var o=this.toHsl(),i=o.h,a=[this],r=360/t,s=1;s<t;s++)a.push(new e({h:(i+s*r)%360,s:o.s,l:o.l}));return a},e.prototype.equals=function(t){return this.toRgbString()===new e(t).toRgbString()},e}();function Ue(e,t=20){return e.mix("#141414",t).toString()}function sm(e){const t=Rn(),o=D("button");return n.computed(()=>{let i={},a=e.color;if(a){const r=a.match(/var\((.*?)\)/);r&&(a=window.getComputedStyle(window.document.documentElement).getPropertyValue(r[1]));const s=new rm(a),l=e.dark?s.tint(20).toString():Ue(s,20);if(e.plain)i=o.cssVarBlock({"bg-color":e.dark?Ue(s,90):s.tint(90).toString(),"text-color":a,"border-color":e.dark?Ue(s,50):s.tint(50).toString(),"hover-text-color":`var(${o.cssVarName("color-white")})`,"hover-bg-color":a,"hover-border-color":a,"active-bg-color":l,"active-text-color":`var(${o.cssVarName("color-white")})`,"active-border-color":l}),t.value&&(i[o.cssVarBlockName("disabled-bg-color")]=e.dark?Ue(s,90):s.tint(90).toString(),i[o.cssVarBlockName("disabled-text-color")]=e.dark?Ue(s,50):s.tint(50).toString(),i[o.cssVarBlockName("disabled-border-color")]=e.dark?Ue(s,80):s.tint(80).toString());else{const c=e.dark?Ue(s,30):s.tint(30).toString(),d=s.isDark()?`var(${o.cssVarName("color-white")})`:`var(${o.cssVarName("color-black")})`;if(i=o.cssVarBlock({"bg-color":a,"text-color":d,"border-color":a,"hover-bg-color":c,"hover-text-color":d,"hover-border-color":c,"active-bg-color":l,"active-border-color":l}),t.value){const f=e.dark?Ue(s,50):s.tint(50).toString();i[o.cssVarBlockName("disabled-bg-color")]=f,i[o.cssVarBlockName("disabled-text-color")]=e.dark?"rgba(255, 255, 255, 0.5)":`var(${o.cssVarName("color-white")})`,i[o.cssVarBlockName("disabled-border-color")]=f}}}return i})}const lm=n.defineComponent({name:"ElButton"}),cm=n.defineComponent({...lm,props:Yo,emits:qh,setup(e,{expose:t,emit:o}){const i=e,a=sm(i),r=D("button"),{_ref:s,_size:l,_type:c,_disabled:d,_props:f,shouldAddSpace:u,handleClick:p}=Wh(i,o),g=n.computed(()=>[r.b(),r.m(c.value),r.m(l.value),r.is("disabled",d.value),r.is("loading",i.loading),r.is("plain",i.plain),r.is("round",i.round),r.is("circle",i.circle),r.is("text",i.text),r.is("link",i.link),r.is("has-bg",i.bg)]);return t({ref:s,size:l,type:c,disabled:d,shouldAddSpace:u}),(h,m)=>(n.openBlock(),n.createBlock(n.resolveDynamicComponent(h.tag),n.mergeProps({ref_key:"_ref",ref:s},n.unref(f),{class:n.unref(g),style:n.unref(a),onClick:n.unref(p)}),{default:n.withCtx(()=>[h.loading?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[h.$slots.loading?n.renderSlot(h.$slots,"loading",{key:0}):(n.openBlock(),n.createBlock(n.unref(be),{key:1,class:n.normalizeClass(n.unref(r).is("loading"))},{default:n.withCtx(()=>[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(h.loadingIcon)))]),_:1},8,["class"]))],64)):h.icon||h.$slots.icon?(n.openBlock(),n.createBlock(n.unref(be),{key:1},{default:n.withCtx(()=>[h.icon?(n.openBlock(),n.createBlock(n.resolveDynamicComponent(h.icon),{key:0})):n.renderSlot(h.$slots,"icon",{key:1})]),_:3})):n.createCommentVNode("v-if",!0),h.$slots.default?(n.openBlock(),n.createElementBlock("span",{key:2,class:n.normalizeClass({[n.unref(r).em("text","expand")]:n.unref(u)})},[n.renderSlot(h.$slots,"default")],2)):n.createCommentVNode("v-if",!0)]),_:3},16,["class","style","onClick"]))}});var dm=F(cm,[["__file","button.vue"]]);const fm={size:Yo.size,type:Yo.type},um=n.defineComponent({name:"ElButtonGroup"}),pm=n.defineComponent({...um,props:fm,setup(e){const t=e;n.provide(Rr,n.reactive({size:n.toRef(t,"size"),type:n.toRef(t,"type")}));const o=D("button");return(i,a)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(n.unref(o).b("group"))},[n.renderSlot(i.$slots,"default")],2))}});var Hr=F(pm,[["__file","button-group.vue"]]);const ti=oe(dm,{ButtonGroup:Hr});tt(Hr);var hm=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function mm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}const We=new Map;if(K){let e;document.addEventListener("mousedown",t=>e=t),document.addEventListener("mouseup",t=>{if(e){for(const o of We.values())for(const{documentHandler:i}of o)i(t,e);e=void 0}})}function Kr(e,t){let o=[];return Array.isArray(t.arg)?o=t.arg:Xe(t.arg)&&o.push(t.arg),function(i,a){const r=t.instance.popperRef,s=i.target,l=a==null?void 0:a.target,c=!t||!t.instance,d=!s||!l,f=e.contains(s)||e.contains(l),u=e===s,p=o.length&&o.some(h=>h==null?void 0:h.contains(s))||o.length&&o.includes(l),g=r&&(r.contains(s)||r.contains(l));c||d||f||u||p||g||t.value(i,a)}}const gm={beforeMount(e,t){We.has(e)||We.set(e,[]),We.get(e).push({documentHandler:Kr(e,t),bindingFn:t.value})},updated(e,t){We.has(e)||We.set(e,[]);const o=We.get(e),i=o.findIndex(r=>r.bindingFn===t.oldValue),a={documentHandler:Kr(e,t),bindingFn:t.value};i>=0?o.splice(i,1,a):o.push(a)},unmounted(e){We.delete(e)}},Ur={modelValue:{type:[Number,String,Boolean],default:void 0},label:{type:[String,Boolean,Number,Object],default:void 0},value:{type:[String,Boolean,Number,Object],default:void 0},indeterminate:Boolean,disabled:Boolean,checked:Boolean,name:{type:String,default:void 0},trueValue:{type:[String,Number],default:void 0},falseValue:{type:[String,Number],default:void 0},trueLabel:{type:[String,Number],default:void 0},falseLabel:{type:[String,Number],default:void 0},id:{type:String,default:void 0},border:Boolean,size:Et,tabindex:[String,Number],validateEvent:{type:Boolean,default:!0},...at(["ariaControls"])},Wr={[X]:e=>me(e)||G(e)||_e(e),change:e=>me(e)||G(e)||_e(e)},Mt=Symbol("checkboxGroupContextKey"),ym=({model:e,isChecked:t})=>{const o=n.inject(Mt,void 0),i=n.computed(()=>{var r,s;const l=(r=o==null?void 0:o.max)==null?void 0:r.value,c=(s=o==null?void 0:o.min)==null?void 0:s.value;return!ze(l)&&e.value.length>=l&&!t.value||!ze(c)&&e.value.length<=c&&t.value});return{isDisabled:Rn(n.computed(()=>(o==null?void 0:o.disabled.value)||i.value)),isLimitDisabled:i}},bm=(e,{model:t,isLimitExceeded:o,hasOwnLabel:i,isDisabled:a,isLabeledByFormItem:r})=>{const s=n.inject(Mt,void 0),{formItem:l}=Tt(),{emit:c}=n.getCurrentInstance();function d(h){var m,y,b,C;return[!0,e.trueValue,e.trueLabel].includes(h)?(y=(m=e.trueValue)!=null?m:e.trueLabel)!=null?y:!0:(C=(b=e.falseValue)!=null?b:e.falseLabel)!=null?C:!1}function f(h,m){c("change",d(h),m)}function u(h){if(o.value)return;const m=h.target;c("change",d(m.checked),h)}async function p(h){o.value||!i.value&&!a.value&&r.value&&(h.composedPath().some(b=>b.tagName==="LABEL")||(t.value=d([!1,e.falseValue,e.falseLabel].includes(t.value)),await n.nextTick(),f(t.value,h)))}const g=n.computed(()=>(s==null?void 0:s.validateEvent)||e.validateEvent);return n.watch(()=>e.modelValue,()=>{g.value&&(l==null||l.validate("change").catch(h=>ne(h)))}),{handleChange:u,onClickRoot:p}},wm=e=>{const t=n.ref(!1),{emit:o}=n.getCurrentInstance(),i=n.inject(Mt,void 0),a=n.computed(()=>ze(i)===!1),r=n.ref(!1),s=n.computed({get(){var l,c;return a.value?(l=i==null?void 0:i.modelValue)==null?void 0:l.value:(c=e.modelValue)!=null?c:t.value},set(l){var c,d;a.value&&ee(l)?(r.value=((c=i==null?void 0:i.max)==null?void 0:c.value)!==void 0&&l.length>(i==null?void 0:i.max.value)&&l.length>s.value.length,r.value===!1&&((d=i==null?void 0:i.changeEvent)==null||d.call(i,l))):(o(X,l),t.value=l)}});return{model:s,isGroup:a,isLimitExceeded:r}},Cm=(e,t,{model:o})=>{const i=n.inject(Mt,void 0),a=n.ref(!1),r=n.computed(()=>Ht(e.value)?e.label:e.value),s=n.computed(()=>{const f=o.value;return _e(f)?f:ee(f)?te(r.value)?f.map(n.toRaw).some(u=>En(u,r.value)):f.map(n.toRaw).includes(r.value):f!=null?f===e.trueValue||f===e.trueLabel:!!f}),l=It(n.computed(()=>{var f;return(f=i==null?void 0:i.size)==null?void 0:f.value}),{prop:!0}),c=It(n.computed(()=>{var f;return(f=i==null?void 0:i.size)==null?void 0:f.value})),d=n.computed(()=>!!t.default||!Ht(r.value));return{checkboxButtonSize:l,isChecked:s,isFocused:a,checkboxSize:c,hasOwnLabel:d,actualValue:r}},qr=(e,t)=>{const{formItem:o}=Tt(),{model:i,isGroup:a,isLimitExceeded:r}=wm(e),{isFocused:s,isChecked:l,checkboxButtonSize:c,checkboxSize:d,hasOwnLabel:f,actualValue:u}=Cm(e,t,{model:i}),{isDisabled:p}=ym({model:i,isChecked:l}),{inputId:g,isLabeledByFormItem:h}=Fn(e,{formItemContext:o,disableIdGeneration:f,disableIdManagement:a}),{handleChange:m,onClickRoot:y}=bm(e,{model:i,isLimitExceeded:r,hasOwnLabel:f,isDisabled:p,isLabeledByFormItem:h});return(()=>{function C(){var I,k;ee(i.value)&&!i.value.includes(u.value)?i.value.push(u.value):i.value=(k=(I=e.trueValue)!=null?I:e.trueLabel)!=null?k:!0}e.checked&&C()})(),yt({from:"label act as value",replacement:"value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},n.computed(()=>a.value&&Ht(e.value))),yt({from:"true-label",replacement:"true-value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},n.computed(()=>!!e.trueLabel)),yt({from:"false-label",replacement:"false-value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},n.computed(()=>!!e.falseLabel)),{inputId:g,isLabeledByFormItem:h,isChecked:l,isDisabled:p,isFocused:s,checkboxButtonSize:c,checkboxSize:d,hasOwnLabel:f,model:i,actualValue:u,handleChange:m,onClickRoot:y}},vm=n.defineComponent({name:"ElCheckbox"}),Sm=n.defineComponent({...vm,props:Ur,emits:Wr,setup(e){const t=e,o=n.useSlots(),{inputId:i,isLabeledByFormItem:a,isChecked:r,isDisabled:s,isFocused:l,checkboxSize:c,hasOwnLabel:d,model:f,actualValue:u,handleChange:p,onClickRoot:g}=qr(t,o),h=D("checkbox"),m=n.computed(()=>[h.b(),h.m(c.value),h.is("disabled",s.value),h.is("bordered",t.border),h.is("checked",r.value)]),y=n.computed(()=>[h.e("input"),h.is("disabled",s.value),h.is("checked",r.value),h.is("indeterminate",t.indeterminate),h.is("focus",l.value)]);return(b,C)=>(n.openBlock(),n.createBlock(n.resolveDynamicComponent(!n.unref(d)&&n.unref(a)?"span":"label"),{class:n.normalizeClass(n.unref(m)),"aria-controls":b.indeterminate?b.ariaControls:null,onClick:n.unref(g)},{default:n.withCtx(()=>{var I,k,v,S;return[n.createElementVNode("span",{class:n.normalizeClass(n.unref(y))},[b.trueValue||b.falseValue||b.trueLabel||b.falseLabel?n.withDirectives((n.openBlock(),n.createElementBlock("input",{key:0,id:n.unref(i),"onUpdate:modelValue":E=>n.isRef(f)?f.value=E:null,class:n.normalizeClass(n.unref(h).e("original")),type:"checkbox",indeterminate:b.indeterminate,name:b.name,tabindex:b.tabindex,disabled:n.unref(s),"true-value":(k=(I=b.trueValue)!=null?I:b.trueLabel)!=null?k:!0,"false-value":(S=(v=b.falseValue)!=null?v:b.falseLabel)!=null?S:!1,onChange:n.unref(p),onFocus:E=>l.value=!0,onBlur:E=>l.value=!1,onClick:n.withModifiers(()=>{},["stop"])},null,42,["id","onUpdate:modelValue","indeterminate","name","tabindex","disabled","true-value","false-value","onChange","onFocus","onBlur","onClick"])),[[n.vModelCheckbox,n.unref(f)]]):n.withDirectives((n.openBlock(),n.createElementBlock("input",{key:1,id:n.unref(i),"onUpdate:modelValue":E=>n.isRef(f)?f.value=E:null,class:n.normalizeClass(n.unref(h).e("original")),type:"checkbox",indeterminate:b.indeterminate,disabled:n.unref(s),value:n.unref(u),name:b.name,tabindex:b.tabindex,onChange:n.unref(p),onFocus:E=>l.value=!0,onBlur:E=>l.value=!1,onClick:n.withModifiers(()=>{},["stop"])},null,42,["id","onUpdate:modelValue","indeterminate","disabled","value","name","tabindex","onChange","onFocus","onBlur","onClick"])),[[n.vModelCheckbox,n.unref(f)]]),n.createElementVNode("span",{class:n.normalizeClass(n.unref(h).e("inner"))},null,2)],2),n.unref(d)?(n.openBlock(),n.createElementBlock("span",{key:0,class:n.normalizeClass(n.unref(h).e("label"))},[n.renderSlot(b.$slots,"default"),b.$slots.default?n.createCommentVNode("v-if",!0):(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createTextVNode(n.toDisplayString(b.label),1)],64))],2)):n.createCommentVNode("v-if",!0)]}),_:3},8,["class","aria-controls","onClick"]))}});var km=F(Sm,[["__file","checkbox.vue"]]);const Em=n.defineComponent({name:"ElCheckboxButton"}),Im=n.defineComponent({...Em,props:Ur,emits:Wr,setup(e){const t=e,o=n.useSlots(),{isFocused:i,isChecked:a,isDisabled:r,checkboxButtonSize:s,model:l,actualValue:c,handleChange:d}=qr(t,o),f=n.inject(Mt,void 0),u=D("checkbox"),p=n.computed(()=>{var h,m,y,b;const C=(m=(h=f==null?void 0:f.fill)==null?void 0:h.value)!=null?m:"";return{backgroundColor:C,borderColor:C,color:(b=(y=f==null?void 0:f.textColor)==null?void 0:y.value)!=null?b:"",boxShadow:C?`-1px 0 0 0 ${C}`:void 0}}),g=n.computed(()=>[u.b("button"),u.bm("button",s.value),u.is("disabled",r.value),u.is("checked",a.value),u.is("focus",i.value)]);return(h,m)=>{var y,b,C,I;return n.openBlock(),n.createElementBlock("label",{class:n.normalizeClass(n.unref(g))},[h.trueValue||h.falseValue||h.trueLabel||h.falseLabel?n.withDirectives((n.openBlock(),n.createElementBlock("input",{key:0,"onUpdate:modelValue":k=>n.isRef(l)?l.value=k:null,class:n.normalizeClass(n.unref(u).be("button","original")),type:"checkbox",name:h.name,tabindex:h.tabindex,disabled:n.unref(r),"true-value":(b=(y=h.trueValue)!=null?y:h.trueLabel)!=null?b:!0,"false-value":(I=(C=h.falseValue)!=null?C:h.falseLabel)!=null?I:!1,onChange:n.unref(d),onFocus:k=>i.value=!0,onBlur:k=>i.value=!1,onClick:n.withModifiers(()=>{},["stop"])},null,42,["onUpdate:modelValue","name","tabindex","disabled","true-value","false-value","onChange","onFocus","onBlur","onClick"])),[[n.vModelCheckbox,n.unref(l)]]):n.withDirectives((n.openBlock(),n.createElementBlock("input",{key:1,"onUpdate:modelValue":k=>n.isRef(l)?l.value=k:null,class:n.normalizeClass(n.unref(u).be("button","original")),type:"checkbox",name:h.name,tabindex:h.tabindex,disabled:n.unref(r),value:n.unref(c),onChange:n.unref(d),onFocus:k=>i.value=!0,onBlur:k=>i.value=!1,onClick:n.withModifiers(()=>{},["stop"])},null,42,["onUpdate:modelValue","name","tabindex","disabled","value","onChange","onFocus","onBlur","onClick"])),[[n.vModelCheckbox,n.unref(l)]]),h.$slots.default||h.label?(n.openBlock(),n.createElementBlock("span",{key:2,class:n.normalizeClass(n.unref(u).be("button","inner")),style:n.normalizeStyle(n.unref(a)?n.unref(p):void 0)},[n.renderSlot(h.$slots,"default",{},()=>[n.createTextVNode(n.toDisplayString(h.label),1)])],6)):n.createCommentVNode("v-if",!0)],2)}}});var Gr=F(Im,[["__file","checkbox-button.vue"]]);const Tm=R({modelValue:{type:_(Array),default:()=>[]},disabled:Boolean,min:Number,max:Number,size:Et,fill:String,textColor:String,tag:{type:String,default:"div"},validateEvent:{type:Boolean,default:!0},...at(["ariaLabel"])}),Am={[X]:e=>ee(e),change:e=>ee(e)},Om=n.defineComponent({name:"ElCheckboxGroup"}),Mm=n.defineComponent({...Om,props:Tm,emits:Am,setup(e,{emit:t}){const o=e,i=D("checkbox"),{formItem:a}=Tt(),{inputId:r,isLabeledByFormItem:s}=Fn(o,{formItemContext:a}),l=async d=>{t(X,d),await n.nextTick(),t("change",d)},c=n.computed({get(){return o.modelValue},set(d){l(d)}});return n.provide(Mt,{...Ia(n.toRefs(o),["size","min","max","disabled","validateEvent","fill","textColor"]),modelValue:c,changeEvent:l}),n.watch(()=>o.modelValue,()=>{o.validateEvent&&(a==null||a.validate("change").catch(d=>ne(d)))}),(d,f)=>{var u;return n.openBlock(),n.createBlock(n.resolveDynamicComponent(d.tag),{id:n.unref(r),class:n.normalizeClass(n.unref(i).b("group")),role:"group","aria-label":n.unref(s)?void 0:d.ariaLabel||"checkbox-group","aria-labelledby":n.unref(s)?(u=n.unref(a))==null?void 0:u.labelId:void 0},{default:n.withCtx(()=>[n.renderSlot(d.$slots,"default")]),_:3},8,["id","class","aria-label","aria-labelledby"])}}});var Jr=F(Mm,[["__file","checkbox-group.vue"]]);const Yr=oe(km,{CheckboxButton:Gr,CheckboxGroup:Jr});tt(Gr);const Zr=tt(Jr),Qr=R({modelValue:{type:[String,Number,Boolean],default:void 0},size:Et,disabled:Boolean,label:{type:[String,Number,Boolean],default:void 0},value:{type:[String,Number,Boolean],default:void 0},name:{type:String,default:void 0}}),xm=R({...Qr,border:Boolean}),Xr={[X]:e=>me(e)||G(e)||_e(e),[To]:e=>me(e)||G(e)||_e(e)},es=Symbol("radioGroupKey"),ts=(e,t)=>{const o=n.ref(),i=n.inject(es,void 0),a=n.computed(()=>!!i),r=n.computed(()=>Ht(e.value)?e.label:e.value),s=n.computed({get(){return a.value?i.modelValue:e.modelValue},set(u){a.value?i.changeEvent(u):t&&t(X,u),o.value.checked=e.modelValue===r.value}}),l=It(n.computed(()=>i==null?void 0:i.size)),c=Rn(n.computed(()=>i==null?void 0:i.disabled)),d=n.ref(!1),f=n.computed(()=>c.value||a.value&&s.value!==r.value?-1:0);return yt({from:"label act as value",replacement:"value",version:"3.0.0",scope:"el-radio",ref:"https://element-plus.org/en-US/component/radio.html"},n.computed(()=>a.value&&Ht(e.value))),{radioRef:o,isGroup:a,radioGroup:i,focus:d,size:l,disabled:c,tabIndex:f,modelValue:s,actualValue:r}},Bm=n.defineComponent({name:"ElRadio"}),Nm=n.defineComponent({...Bm,props:xm,emits:Xr,setup(e,{emit:t}){const o=e,i=D("radio"),{radioRef:a,radioGroup:r,focus:s,size:l,disabled:c,modelValue:d,actualValue:f}=ts(o,t);function u(){n.nextTick(()=>t("change",d.value))}return(p,g)=>{var h;return n.openBlock(),n.createElementBlock("label",{class:n.normalizeClass([n.unref(i).b(),n.unref(i).is("disabled",n.unref(c)),n.unref(i).is("focus",n.unref(s)),n.unref(i).is("bordered",p.border),n.unref(i).is("checked",n.unref(d)===n.unref(f)),n.unref(i).m(n.unref(l))])},[n.createElementVNode("span",{class:n.normalizeClass([n.unref(i).e("input"),n.unref(i).is("disabled",n.unref(c)),n.unref(i).is("checked",n.unref(d)===n.unref(f))])},[n.withDirectives(n.createElementVNode("input",{ref_key:"radioRef",ref:a,"onUpdate:modelValue":m=>n.isRef(d)?d.value=m:null,class:n.normalizeClass(n.unref(i).e("original")),value:n.unref(f),name:p.name||((h=n.unref(r))==null?void 0:h.name),disabled:n.unref(c),checked:n.unref(d)===n.unref(f),type:"radio",onFocus:m=>s.value=!0,onBlur:m=>s.value=!1,onChange:u,onClick:n.withModifiers(()=>{},["stop"])},null,42,["onUpdate:modelValue","value","name","disabled","checked","onFocus","onBlur","onClick"]),[[n.vModelRadio,n.unref(d)]]),n.createElementVNode("span",{class:n.normalizeClass(n.unref(i).e("inner"))},null,2)],2),n.createElementVNode("span",{class:n.normalizeClass(n.unref(i).e("label")),onKeydown:n.withModifiers(()=>{},["stop"])},[n.renderSlot(p.$slots,"default",{},()=>[n.createTextVNode(n.toDisplayString(p.label),1)])],42,["onKeydown"])],2)}}});var _m=F(Nm,[["__file","radio.vue"]]);const Lm=R({...Qr}),Pm=n.defineComponent({name:"ElRadioButton"}),Vm=n.defineComponent({...Pm,props:Lm,setup(e){const t=e,o=D("radio"),{radioRef:i,focus:a,size:r,disabled:s,modelValue:l,radioGroup:c,actualValue:d}=ts(t),f=n.computed(()=>({backgroundColor:(c==null?void 0:c.fill)||"",borderColor:(c==null?void 0:c.fill)||"",boxShadow:c!=null&&c.fill?`-1px 0 0 0 ${c.fill}`:"",color:(c==null?void 0:c.textColor)||""}));return(u,p)=>{var g;return n.openBlock(),n.createElementBlock("label",{class:n.normalizeClass([n.unref(o).b("button"),n.unref(o).is("active",n.unref(l)===n.unref(d)),n.unref(o).is("disabled",n.unref(s)),n.unref(o).is("focus",n.unref(a)),n.unref(o).bm("button",n.unref(r))])},[n.withDirectives(n.createElementVNode("input",{ref_key:"radioRef",ref:i,"onUpdate:modelValue":h=>n.isRef(l)?l.value=h:null,class:n.normalizeClass(n.unref(o).be("button","original-radio")),value:n.unref(d),type:"radio",name:u.name||((g=n.unref(c))==null?void 0:g.name),disabled:n.unref(s),onFocus:h=>a.value=!0,onBlur:h=>a.value=!1,onClick:n.withModifiers(()=>{},["stop"])},null,42,["onUpdate:modelValue","value","name","disabled","onFocus","onBlur","onClick"]),[[n.vModelRadio,n.unref(l)]]),n.createElementVNode("span",{class:n.normalizeClass(n.unref(o).be("button","inner")),style:n.normalizeStyle(n.unref(l)===n.unref(d)?n.unref(f):{}),onKeydown:n.withModifiers(()=>{},["stop"])},[n.renderSlot(u.$slots,"default",{},()=>[n.createTextVNode(n.toDisplayString(u.label),1)])],46,["onKeydown"])],2)}}});var ns=F(Vm,[["__file","radio-button.vue"]]);const Rm=R({id:{type:String,default:void 0},size:Et,disabled:Boolean,modelValue:{type:[String,Number,Boolean],default:void 0},fill:{type:String,default:""},textColor:{type:String,default:""},name:{type:String,default:void 0},validateEvent:{type:Boolean,default:!0},...at(["ariaLabel"])}),Fm=Xr,Dm=n.defineComponent({name:"ElRadioGroup"}),$m=n.defineComponent({...Dm,props:Rm,emits:Fm,setup(e,{emit:t}){const o=e,i=D("radio"),a=it(),r=n.ref(),{formItem:s}=Tt(),{inputId:l,isLabeledByFormItem:c}=Fn(o,{formItemContext:s}),d=u=>{t(X,u),n.nextTick(()=>t("change",u))};n.onMounted(()=>{const u=r.value.querySelectorAll("[type=radio]"),p=u[0];!Array.from(u).some(g=>g.checked)&&p&&(p.tabIndex=0)});const f=n.computed(()=>o.name||a.value);return n.provide(es,n.reactive({...n.toRefs(o),changeEvent:d,name:f})),n.watch(()=>o.modelValue,()=>{o.validateEvent&&(s==null||s.validate("change").catch(u=>ne(u)))}),(u,p)=>(n.openBlock(),n.createElementBlock("div",{id:n.unref(l),ref_key:"radioGroupRef",ref:r,class:n.normalizeClass(n.unref(i).b("group")),role:"radiogroup","aria-label":n.unref(c)?void 0:u.ariaLabel||"radio-group","aria-labelledby":n.unref(c)?n.unref(s).labelId:void 0},[n.renderSlot(u.$slots,"default")],10,["id","aria-label","aria-labelledby"]))}});var os=F($m,[["__file","radio-group.vue"]]);const is=oe(_m,{RadioButton:ns,RadioGroup:os}),as=tt(os);tt(ns);const ni=R({type:{type:String,values:["primary","success","info","warning","danger"],default:"primary"},closable:Boolean,disableTransitions:Boolean,hit:Boolean,color:String,size:{type:String,values:Na},effect:{type:String,values:["dark","light","plain"],default:"light"},round:Boolean}),zm={close:e=>e instanceof MouseEvent,click:e=>e instanceof MouseEvent},jm=n.defineComponent({name:"ElTag"}),Hm=n.defineComponent({...jm,props:ni,emits:zm,setup(e,{emit:t}){const o=e,i=It(),a=D("tag"),r=n.computed(()=>{const{type:d,hit:f,effect:u,closable:p,round:g}=o;return[a.b(),a.is("closable",p),a.m(d||"primary"),a.m(i.value),a.m(u),a.is("hit",f),a.is("round",g)]}),s=d=>{t("close",d)},l=d=>{t("click",d)},c=d=>{d.component.subTree.component.bum=null};return(d,f)=>d.disableTransitions?(n.openBlock(),n.createElementBlock("span",{key:0,class:n.normalizeClass(n.unref(r)),style:n.normalizeStyle({backgroundColor:d.color}),onClick:l},[n.createElementVNode("span",{class:n.normalizeClass(n.unref(a).e("content"))},[n.renderSlot(d.$slots,"default")],2),d.closable?(n.openBlock(),n.createBlock(n.unref(be),{key:0,class:n.normalizeClass(n.unref(a).e("close")),onClick:n.withModifiers(s,["stop"])},{default:n.withCtx(()=>[n.createVNode(n.unref(W.Close))]),_:1},8,["class","onClick"])):n.createCommentVNode("v-if",!0)],6)):(n.openBlock(),n.createBlock(n.Transition,{key:1,name:`${n.unref(a).namespace.value}-zoom-in-center`,appear:"",onVnodeMounted:c},{default:n.withCtx(()=>[n.createElementVNode("span",{class:n.normalizeClass(n.unref(r)),style:n.normalizeStyle({backgroundColor:d.color}),onClick:l},[n.createElementVNode("span",{class:n.normalizeClass(n.unref(a).e("content"))},[n.renderSlot(d.$slots,"default")],2),d.closable?(n.openBlock(),n.createBlock(n.unref(be),{key:0,class:n.normalizeClass(n.unref(a).e("close")),onClick:n.withModifiers(s,["stop"])},{default:n.withCtx(()=>[n.createVNode(n.unref(W.Close))]),_:1},8,["class","onClick"])):n.createCommentVNode("v-if",!0)],6)]),_:3},8,["name"]))}});var Km=F(Hm,[["__file","tag.vue"]]);const Um=oe(Km),rs=Symbol("rowContextKey"),Wm=R({tag:{type:String,default:"div"},gutter:{type:Number,default:0},justify:{type:String,values:["start","center","end","space-around","space-between","space-evenly"],default:"start"},align:{type:String,values:["top","middle","bottom"]}}),qm=n.defineComponent({name:"ElRow"}),Gm=n.defineComponent({...qm,props:Wm,setup(e){const t=e,o=D("row"),i=n.computed(()=>t.gutter);n.provide(rs,{gutter:i});const a=n.computed(()=>{const s={};return t.gutter&&(s.marginRight=s.marginLeft=`-${t.gutter/2}px`),s}),r=n.computed(()=>[o.b(),o.is(`justify-${t.justify}`,t.justify!=="start"),o.is(`align-${t.align}`,!!t.align)]);return(s,l)=>(n.openBlock(),n.createBlock(n.resolveDynamicComponent(s.tag),{class:n.normalizeClass(n.unref(r)),style:n.normalizeStyle(n.unref(a))},{default:n.withCtx(()=>[n.renderSlot(s.$slots,"default")]),_:3},8,["class","style"]))}});var Jm=F(Gm,[["__file","row.vue"]]);const nn=oe(Jm),Ym=R({tag:{type:String,default:"div"},span:{type:Number,default:24},offset:{type:Number,default:0},pull:{type:Number,default:0},push:{type:Number,default:0},xs:{type:_([Number,Object]),default:()=>Wt({})},sm:{type:_([Number,Object]),default:()=>Wt({})},md:{type:_([Number,Object]),default:()=>Wt({})},lg:{type:_([Number,Object]),default:()=>Wt({})},xl:{type:_([Number,Object]),default:()=>Wt({})}}),Zm=n.defineComponent({name:"ElCol"}),Qm=n.defineComponent({...Zm,props:Ym,setup(e){const t=e,{gutter:o}=n.inject(rs,{gutter:n.computed(()=>0)}),i=D("col"),a=n.computed(()=>{const s={};return o.value&&(s.paddingLeft=s.paddingRight=`${o.value/2}px`),s}),r=n.computed(()=>{const s=[];return["span","offset","pull","push"].forEach(d=>{const f=t[d];G(f)&&(d==="span"?s.push(i.b(`${t[d]}`)):f>0&&s.push(i.b(`${d}-${t[d]}`)))}),["xs","sm","md","lg","xl"].forEach(d=>{G(t[d])?s.push(i.b(`${d}-${t[d]}`)):te(t[d])&&Object.entries(t[d]).forEach(([f,u])=>{s.push(f!=="span"?i.b(`${d}-${f}-${u}`):i.b(`${d}-${u}`))})}),o.value&&s.push(i.is("guttered")),[i.b(),s]});return(s,l)=>(n.openBlock(),n.createBlock(n.resolveDynamicComponent(s.tag),{class:n.normalizeClass(n.unref(r)),style:n.normalizeStyle(n.unref(a))},{default:n.withCtx(()=>[n.renderSlot(s.$slots,"default")]),_:3},8,["class","style"]))}});var Xm=F(Qm,[["__file","col.vue"]]);const on=oe(Xm),eg=R({mask:{type:Boolean,default:!0},customMaskEvent:Boolean,overlayClass:{type:_([String,Array,Object])},zIndex:{type:_([String,Number])}}),tg={click:e=>e instanceof MouseEvent},ng="overlay";var og=n.defineComponent({name:"ElOverlay",props:eg,emits:tg,setup(e,{slots:t,emit:o}){const i=D(ng),a=c=>{o("click",c)},{onClick:r,onMousedown:s,onMouseup:l}=nr(e.customMaskEvent?void 0:a);return()=>e.mask?n.createVNode("div",{class:[i.b(),e.overlayClass],style:{zIndex:e.zIndex},onClick:r,onMousedown:s,onMouseup:l},[n.renderSlot(t,"default")],On.STYLE|On.CLASS|On.PROPS,["onClick","onMouseup","onMousedown"]):n.h("div",{class:e.overlayClass,style:{zIndex:e.zIndex,position:"fixed",top:"0px",right:"0px",bottom:"0px",left:"0px"}},[n.renderSlot(t,"default")])}});const ig=og,ss=Symbol("dialogInjectionKey"),ls=R({center:Boolean,alignCenter:Boolean,closeIcon:{type:gt},draggable:Boolean,overflow:Boolean,fullscreen:Boolean,showClose:{type:Boolean,default:!0},title:{type:String,default:""},ariaLevel:{type:String,default:"2"}}),ag={close:()=>!0},rg=n.defineComponent({name:"ElDialogContent"}),sg=n.defineComponent({...rg,props:ls,emits:ag,setup(e,{expose:t}){const o=e,{t:i}=Ao(),{Close:a}=Wf,{dialogRef:r,headerRef:s,bodyId:l,ns:c,style:d}=n.inject(ss),{focusTrapRef:f}=n.inject(Ar),u=n.computed(()=>[c.b(),c.is("fullscreen",o.fullscreen),c.is("draggable",o.draggable),c.is("align-center",o.alignCenter),{[c.m("center")]:o.center}]),p=Jf(f,r),g=n.computed(()=>o.draggable),h=n.computed(()=>o.overflow),{resetPosition:m}=Zf(r,s,g,h);return t({resetPosition:m}),(y,b)=>(n.openBlock(),n.createElementBlock("div",{ref:n.unref(p),class:n.normalizeClass(n.unref(u)),style:n.normalizeStyle(n.unref(d)),tabindex:"-1"},[n.createElementVNode("header",{ref_key:"headerRef",ref:s,class:n.normalizeClass([n.unref(c).e("header"),{"show-close":y.showClose}])},[n.renderSlot(y.$slots,"header",{},()=>[n.createElementVNode("span",{role:"heading","aria-level":y.ariaLevel,class:n.normalizeClass(n.unref(c).e("title"))},n.toDisplayString(y.title),11,["aria-level"])]),y.showClose?(n.openBlock(),n.createElementBlock("button",{key:0,"aria-label":n.unref(i)("el.dialog.close"),class:n.normalizeClass(n.unref(c).e("headerbtn")),type:"button",onClick:C=>y.$emit("close")},[n.createVNode(n.unref(be),{class:n.normalizeClass(n.unref(c).e("close"))},{default:n.withCtx(()=>[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(y.closeIcon||n.unref(a))))]),_:1},8,["class"])],10,["aria-label","onClick"])):n.createCommentVNode("v-if",!0)],2),n.createElementVNode("div",{id:n.unref(l),class:n.normalizeClass(n.unref(c).e("body"))},[n.renderSlot(y.$slots,"default")],10,["id"]),y.$slots.footer?(n.openBlock(),n.createElementBlock("footer",{key:0,class:n.normalizeClass(n.unref(c).e("footer"))},[n.renderSlot(y.$slots,"footer")],2)):n.createCommentVNode("v-if",!0)],6))}});var lg=F(sg,[["__file","dialog-content.vue"]]);const cg=R({...ls,appendToBody:Boolean,appendTo:{type:_([String,Object]),default:"body"},beforeClose:{type:_(Function)},destroyOnClose:Boolean,closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0},modal:{type:Boolean,default:!0},openDelay:{type:Number,default:0},closeDelay:{type:Number,default:0},top:{type:String},modelValue:Boolean,modalClass:String,width:{type:[String,Number]},zIndex:{type:Number},trapFocus:Boolean,headerAriaLevel:{type:String,default:"2"}}),dg={open:()=>!0,opened:()=>!0,close:()=>!0,closed:()=>!0,[X]:e=>_e(e),openAutoFocus:()=>!0,closeAutoFocus:()=>!0},fg=(e,t)=>{var o;const a=n.getCurrentInstance().emit,{nextZIndex:r}=Do();let s="";const l=it(),c=it(),d=n.ref(!1),f=n.ref(!1),u=n.ref(!1),p=n.ref((o=e.zIndex)!=null?o:r());let g,h;const m=Pn("namespace",qt),y=n.computed(()=>{const V={},M=`--${m.value}-dialog`;return e.fullscreen||(e.top&&(V[`${M}-margin-top`]=e.top),e.width&&(V[`${M}-width`]=et(e.width))),V}),b=n.computed(()=>e.alignCenter?{display:"flex"}:{});function C(){a("opened")}function I(){a("closed"),a(X,!1),e.destroyOnClose&&(u.value=!1)}function k(){a("close")}function v(){h==null||h(),g==null||g(),e.openDelay&&e.openDelay>0?{stop:g}=Ii(()=>x(),e.openDelay):x()}function S(){g==null||g(),h==null||h(),e.closeDelay&&e.closeDelay>0?{stop:h}=Ii(()=>N(),e.closeDelay):N()}function E(){function V(M){M||(f.value=!0,d.value=!1)}e.beforeClose?e.beforeClose(V):S()}function O(){e.closeOnClickModal&&E()}function x(){K&&(d.value=!0)}function N(){d.value=!1}function B(){a("openAutoFocus")}function T(){a("closeAutoFocus")}function L(V){var M;((M=V.detail)==null?void 0:M.focusReason)==="pointer"&&V.preventDefault()}e.lockScroll&&ou(d);function q(){e.closeOnPressEscape&&E()}return n.watch(()=>e.modelValue,V=>{V?(f.value=!1,v(),u.value=!0,p.value=Ea(e.zIndex)?r():p.value++,n.nextTick(()=>{a("open"),t.value&&(t.value.scrollTop=0)})):d.value&&S()}),n.watch(()=>e.fullscreen,V=>{t.value&&(V?(s=t.value.style.transform,t.value.style.transform=""):t.value.style.transform=s)}),n.onMounted(()=>{e.modelValue&&(d.value=!0,u.value=!0,v())}),{afterEnter:C,afterLeave:I,beforeLeave:k,handleClose:E,onModalClick:O,close:S,doClose:N,onOpenAutoFocus:B,onCloseAutoFocus:T,onCloseRequested:q,onFocusoutPrevented:L,titleId:l,bodyId:c,closed:f,style:y,overlayDialogStyle:b,rendered:u,visible:d,zIndex:p}},ug=n.defineComponent({name:"ElDialog",inheritAttrs:!1}),pg=n.defineComponent({...ug,props:cg,emits:dg,setup(e,{expose:t}){const o=e,i=n.useSlots();yt({scope:"el-dialog",from:"the title slot",replacement:"the header slot",version:"3.0.0",ref:"https://element-plus.org/en-US/component/dialog.html#slots"},n.computed(()=>!!i.title));const a=D("dialog"),r=n.ref(),s=n.ref(),l=n.ref(),{visible:c,titleId:d,bodyId:f,style:u,overlayDialogStyle:p,rendered:g,zIndex:h,afterEnter:m,afterLeave:y,beforeLeave:b,handleClose:C,onModalClick:I,onOpenAutoFocus:k,onCloseAutoFocus:v,onCloseRequested:S,onFocusoutPrevented:E}=fg(o,r);n.provide(ss,{dialogRef:r,headerRef:s,bodyId:f,ns:a,rendered:g,style:u});const O=nr(I),x=n.computed(()=>o.draggable&&!o.fullscreen);return t({visible:c,dialogContentRef:l,resetPosition:()=>{var B;(B=l.value)==null||B.resetPosition()}}),(B,T)=>(n.openBlock(),n.createBlock(n.unref(Pr),{to:B.appendTo,disabled:B.appendTo!=="body"?!1:!B.appendToBody},{default:n.withCtx(()=>[n.createVNode(n.Transition,{name:"dialog-fade",onAfterEnter:n.unref(m),onAfterLeave:n.unref(y),onBeforeLeave:n.unref(b),persisted:""},{default:n.withCtx(()=>[n.withDirectives(n.createVNode(n.unref(ig),{"custom-mask-event":"",mask:B.modal,"overlay-class":B.modalClass,"z-index":n.unref(h)},{default:n.withCtx(()=>[n.createElementVNode("div",{role:"dialog","aria-modal":"true","aria-label":B.title||void 0,"aria-labelledby":B.title?void 0:n.unref(d),"aria-describedby":n.unref(f),class:n.normalizeClass(`${n.unref(a).namespace.value}-overlay-dialog`),style:n.normalizeStyle(n.unref(p)),onClick:n.unref(O).onClick,onMousedown:n.unref(O).onMousedown,onMouseup:n.unref(O).onMouseup},[n.createVNode(n.unref(_r),{loop:"",trapped:n.unref(c),"focus-start-el":"container",onFocusAfterTrapped:n.unref(k),onFocusAfterReleased:n.unref(v),onFocusoutPrevented:n.unref(E),onReleaseRequested:n.unref(S)},{default:n.withCtx(()=>[n.unref(g)?(n.openBlock(),n.createBlock(lg,n.mergeProps({key:0,ref_key:"dialogContentRef",ref:l},B.$attrs,{center:B.center,"align-center":B.alignCenter,"close-icon":B.closeIcon,draggable:n.unref(x),overflow:B.overflow,fullscreen:B.fullscreen,"show-close":B.showClose,title:B.title,"aria-level":B.headerAriaLevel,onClose:n.unref(C)}),n.createSlots({header:n.withCtx(()=>[B.$slots.title?n.renderSlot(B.$slots,"title",{key:1}):n.renderSlot(B.$slots,"header",{key:0,close:n.unref(C),titleId:n.unref(d),titleClass:n.unref(a).e("title")})]),default:n.withCtx(()=>[n.renderSlot(B.$slots,"default")]),_:2},[B.$slots.footer?{name:"footer",fn:n.withCtx(()=>[n.renderSlot(B.$slots,"footer")])}:void 0]),1040,["center","align-center","close-icon","draggable","overflow","fullscreen","show-close","title","aria-level","onClose"])):n.createCommentVNode("v-if",!0)]),_:3},8,["trapped","onFocusAfterTrapped","onFocusAfterReleased","onFocusoutPrevented","onReleaseRequested"])],46,["aria-label","aria-labelledby","aria-describedby","onClick","onMousedown","onMouseup"])]),_:3},8,["mask","overlay-class","z-index"]),[[n.vShow,n.unref(c)]])]),_:3},8,["onAfterEnter","onAfterLeave","onBeforeLeave"])]),_:3},8,["to","disabled"]))}});var hg=F(pg,[["__file","dialog.vue"]]);const mg=oe(hg),gg=n.defineComponent({inheritAttrs:!1});function yg(e,t,o,i,a,r){return n.renderSlot(e.$slots,"default")}var bg=F(gg,[["render",yg],["__file","collection.vue"]]);const wg=n.defineComponent({name:"ElCollectionItem",inheritAttrs:!1});function Cg(e,t,o,i,a,r){return n.renderSlot(e.$slots,"default")}var vg=F(wg,[["render",Cg],["__file","collection-item.vue"]]);const Sg="data-el-collection-item",kg=e=>{const t=`El${e}Collection`,o=`${t}Item`,i=Symbol(t),a=Symbol(o),r={...bg,name:t,setup(){const l=n.ref(null),c=new Map,d=()=>{const f=n.unref(l);if(!f)return[];const u=Array.from(f.querySelectorAll(`[${Sg}]`));return[...c.values()].sort((g,h)=>u.indexOf(g.ref)-u.indexOf(h.ref))};n.provide(i,{itemMap:c,getItems:d,collectionRef:l})}},s={...vg,name:o,setup(l,{attrs:c}){const d=n.ref(null),f=n.inject(i,void 0);n.provide(a,{collectionItemRef:d}),n.onMounted(()=>{const u=n.unref(d);u&&f.itemMap.set(u,{ref:u,...c})}),n.onBeforeUnmount(()=>{const u=n.unref(d);f.itemMap.delete(u)})}};return{COLLECTION_INJECTION_KEY:i,COLLECTION_ITEM_INJECTION_KEY:a,ElCollection:r,ElCollectionItem:s}},oi=R({trigger:tn.trigger,effect:{...se.effect,default:"light"},type:{type:_(String)},placement:{type:_(String),default:"bottom"},popperOptions:{type:_(Object),default:()=>({})},id:String,size:{type:String,default:""},splitButton:Boolean,hideOnClick:{type:Boolean,default:!0},loop:{type:Boolean,default:!0},showTimeout:{type:Number,default:150},hideTimeout:{type:Number,default:150},tabindex:{type:_([Number,String]),default:0},maxHeight:{type:_([Number,String]),default:""},popperClass:{type:String,default:""},disabled:Boolean,role:{type:String,default:"menu"},buttonProps:{type:_(Object)},teleported:se.teleported});R({command:{type:[Object,String,Number],default:()=>({})},disabled:Boolean,divided:Boolean,textValue:String,icon:{type:gt}}),R({onKeydown:{type:_(Function)}}),kg("Dropdown");const cs=Symbol("ElSelectGroup"),Un=Symbol("ElSelect");function Eg(e,t){const o=n.inject(Un),i=n.inject(cs,{disabled:!1}),a=n.computed(()=>f(De(o.props.modelValue),e.value)),r=n.computed(()=>{var g;if(o.props.multiple){const h=De((g=o.props.modelValue)!=null?g:[]);return!a.value&&h.length>=o.props.multipleLimit&&o.props.multipleLimit>0}else return!1}),s=n.computed(()=>e.label||(te(e.value)?"":e.value)),l=n.computed(()=>e.value||e.label||""),c=n.computed(()=>e.disabled||t.groupDisabled||r.value),d=n.getCurrentInstance(),f=(g=[],h)=>{if(te(e.value)){const m=o.props.valueKey;return g&&g.some(y=>n.toRaw(Be(y,m))===Be(h,m))}else return g&&g.includes(h)},u=()=>{!e.disabled&&!i.disabled&&(o.states.hoveringIndex=o.optionsArray.indexOf(d.proxy))},p=g=>{const h=new RegExp(zf(g),"i");t.visible=h.test(s.value)||e.created};return n.watch(()=>s.value,()=>{!e.created&&!o.props.remote&&o.setSelected()}),n.watch(()=>e.value,(g,h)=>{const{remote:m,valueKey:y}=o.props;if(g!==h&&(o.onOptionDestroy(h,d.proxy),o.onOptionCreate(d.proxy)),!e.created&&!m){if(y&&te(g)&&te(h)&&g[y]===h[y])return;o.setSelected()}}),n.watch(()=>i.disabled,()=>{t.groupDisabled=i.disabled},{immediate:!0}),{select:o,currentLabel:s,currentValue:l,itemSelected:a,isDisabled:c,hoverItem:u,updateOption:p}}const Ig=n.defineComponent({name:"ElOption",componentName:"ElOption",props:{value:{required:!0,type:[String,Number,Boolean,Object]},label:[String,Number],created:Boolean,disabled:Boolean},setup(e){const t=D("select"),o=it(),i=n.computed(()=>[t.be("dropdown","item"),t.is("disabled",n.unref(l)),t.is("selected",n.unref(s)),t.is("hovering",n.unref(p))]),a=n.reactive({index:-1,groupDisabled:!1,visible:!0,hover:!1}),{currentLabel:r,itemSelected:s,isDisabled:l,select:c,hoverItem:d,updateOption:f}=Eg(e,a),{visible:u,hover:p}=n.toRefs(a),g=n.getCurrentInstance().proxy;c.onOptionCreate(g),n.onBeforeUnmount(()=>{const m=g.value,{selected:y}=c.states,C=(c.props.multiple?y:[y]).some(I=>I.value===g.value);n.nextTick(()=>{c.states.cachedOptions.get(m)===g&&!C&&c.states.cachedOptions.delete(m)}),c.onOptionDestroy(m,g)});function h(){l.value||c.handleOptionSelect(g)}return{ns:t,id:o,containerKls:i,currentLabel:r,itemSelected:s,isDisabled:l,select:c,hoverItem:d,updateOption:f,visible:u,hover:p,selectOptionClick:h,states:a}}});function Tg(e,t,o,i,a,r){return n.withDirectives((n.openBlock(),n.createElementBlock("li",{id:e.id,class:n.normalizeClass(e.containerKls),role:"option","aria-disabled":e.isDisabled||void 0,"aria-selected":e.itemSelected,onMouseenter:e.hoverItem,onClick:n.withModifiers(e.selectOptionClick,["stop"])},[n.renderSlot(e.$slots,"default",{},()=>[n.createElementVNode("span",null,n.toDisplayString(e.currentLabel),1)])],42,["id","aria-disabled","aria-selected","onMouseenter","onClick"])),[[n.vShow,e.visible]])}var ii=F(Ig,[["render",Tg],["__file","option.vue"]]);const Ag=n.defineComponent({name:"ElSelectDropdown",componentName:"ElSelectDropdown",setup(){const e=n.inject(Un),t=D("select"),o=n.computed(()=>e.props.popperClass),i=n.computed(()=>e.props.multiple),a=n.computed(()=>e.props.fitInputWidth),r=n.ref("");function s(){var l;r.value=`${(l=e.selectRef)==null?void 0:l.offsetWidth}px`}return n.onMounted(()=>{s(),Re(e.selectRef,s)}),{ns:t,minWidth:r,popperClass:o,isMultiple:i,isFitInputWidth:a}}});function Og(e,t,o,i,a,r){return n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass([e.ns.b("dropdown"),e.ns.is("multiple",e.isMultiple),e.popperClass]),style:n.normalizeStyle({[e.isFitInputWidth?"width":"minWidth"]:e.minWidth})},[e.$slots.header?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(e.ns.be("dropdown","header"))},[n.renderSlot(e.$slots,"header")],2)):n.createCommentVNode("v-if",!0),n.renderSlot(e.$slots,"default"),e.$slots.footer?(n.openBlock(),n.createElementBlock("div",{key:1,class:n.normalizeClass(e.ns.be("dropdown","footer"))},[n.renderSlot(e.$slots,"footer")],2)):n.createCommentVNode("v-if",!0)],6)}var Mg=F(Ag,[["render",Og],["__file","select-dropdown.vue"]]);const xg=11,Bg=(e,t)=>{const{t:o}=Ao(),i=it(),a=D("select"),r=D("input"),s=n.reactive({inputValue:"",options:new Map,cachedOptions:new Map,disabledOptions:new Map,optionValues:[],selected:[],selectionWidth:0,calculatorWidth:0,collapseItemWidth:0,selectedLabel:"",hoveringIndex:-1,previousQuery:null,inputHovering:!1,menuVisibleOnFocus:!1,isBeforeHide:!1}),l=n.ref(null),c=n.ref(null),d=n.ref(null),f=n.ref(null),u=n.ref(null),p=n.ref(null),g=n.ref(null),h=n.ref(null),m=n.ref(null),y=n.ref(null),b=n.ref(null),C=n.ref(null),{isComposing:I,handleCompositionStart:k,handleCompositionUpdate:v,handleCompositionEnd:S}=vp({afterComposition:w=>un(w)}),{wrapperRef:E,isFocused:O}=Cp(u,{beforeFocus(){return M.value},afterFocus(){e.automaticDropdown&&!x.value&&(x.value=!0,s.menuVisibleOnFocus=!0)},beforeBlur(w){var A,P;return((A=d.value)==null?void 0:A.isFocusInsideContent(w))||((P=f.value)==null?void 0:P.isFocusInsideContent(w))},afterBlur(){x.value=!1,s.menuVisibleOnFocus=!1}}),x=n.ref(!1),N=n.ref(),{form:B,formItem:T}=Tt(),{inputId:L}=Fn(e,{formItemContext:T}),{valueOnClear:q,isEmptyValue:V}=Tp(e),M=n.computed(()=>e.disabled||(B==null?void 0:B.disabled)),$=n.computed(()=>ee(e.modelValue)?e.modelValue.length>0:!V(e.modelValue)),pe=n.computed(()=>e.clearable&&!M.value&&s.inputHovering&&$.value),Y=n.computed(()=>e.remote&&e.filterable&&!e.remoteShowSuffix?"":e.suffixIcon),Z=n.computed(()=>a.is("reverse",Y.value&&x.value)),ce=n.computed(()=>(T==null?void 0:T.validateState)||""),Ee=n.computed(()=>qf[ce.value]),Nt=n.computed(()=>e.remote?300:0),Ie=n.computed(()=>e.loading?e.loadingText||o("el.select.loading"):e.remote&&!s.inputValue&&s.options.size===0?!1:e.filterable&&s.inputValue&&s.options.size>0&&re.value===0?e.noMatchText||o("el.select.noMatch"):s.options.size===0?e.noDataText||o("el.select.noData"):null),re=n.computed(()=>U.value.filter(w=>w.visible).length),U=n.computed(()=>{const w=Array.from(s.options.values()),A=[];return s.optionValues.forEach(P=>{const z=w.findIndex(Ge=>Ge.value===P);z>-1&&A.push(w[z])}),A.length>=w.length?A:w}),lt=n.computed(()=>Array.from(s.cachedOptions.values())),qe=n.computed(()=>{const w=U.value.filter(A=>!A.created).some(A=>A.currentLabel===s.inputValue);return e.filterable&&e.allowCreate&&s.inputValue!==""&&!w}),Yn=()=>{e.filterable&&Q(e.filterMethod)||e.filterable&&e.remote&&Q(e.remoteMethod)||U.value.forEach(w=>{var A;(A=w.updateOption)==null||A.call(w,s.inputValue)})},Zn=It(),sn=n.computed(()=>["small"].includes(Zn.value)?"small":"default"),gi=n.computed({get(){return x.value&&Ie.value!==!1},set(w){x.value=w}}),Qn=n.computed(()=>{if(e.multiple&&!ze(e.modelValue))return De(e.modelValue).length===0&&!s.inputValue;const w=ee(e.modelValue)?e.modelValue[0]:e.modelValue;return e.filterable||ze(w)?!s.inputValue:!0}),yi=n.computed(()=>{var w;const A=(w=e.placeholder)!=null?w:o("el.select.placeholder");return e.multiple||!$.value?A:s.selectedLabel}),bi=n.computed(()=>io?null:"mouseenter");n.watch(()=>e.modelValue,(w,A)=>{e.multiple&&e.filterable&&!e.reserveKeyword&&(s.inputValue="",ct("")),_t(),!En(w,A)&&e.validateEvent&&(T==null||T.validate("change").catch(P=>ne(P)))},{flush:"post",deep:!0}),n.watch(()=>x.value,w=>{w?ct(s.inputValue):(s.inputValue="",s.previousQuery=null,s.isBeforeHide=!0),t("visible-change",w)}),n.watch(()=>s.options.entries(),()=>{var w;if(!K)return;const A=((w=l.value)==null?void 0:w.querySelectorAll("input"))||[];(!e.filterable&&!e.defaultFirstOption&&!ze(e.modelValue)||!Array.from(A).includes(document.activeElement))&&_t(),e.defaultFirstOption&&(e.filterable||e.remote)&&re.value&&ln()},{flush:"post"}),n.watch(()=>s.hoveringIndex,w=>{G(w)&&w>-1?N.value=U.value[w]||{}:N.value={},U.value.forEach(A=>{A.hover=N.value===A})}),n.watchEffect(()=>{s.isBeforeHide||Yn()});const ct=w=>{s.previousQuery===w||I.value||(s.previousQuery=w,e.filterable&&Q(e.filterMethod)?e.filterMethod(w):e.filterable&&e.remote&&Q(e.remoteMethod)&&e.remoteMethod(w),e.defaultFirstOption&&(e.filterable||e.remote)&&re.value?n.nextTick(ln):n.nextTick(Ve))},ln=()=>{const w=U.value.filter(z=>z.visible&&!z.disabled&&!z.states.groupDisabled),A=w.find(z=>z.created),P=w[0];s.hoveringIndex=ks(U.value,A||P)},_t=()=>{if(e.multiple)s.selectedLabel="";else{const A=ee(e.modelValue)?e.modelValue[0]:e.modelValue,P=Xn(A);s.selectedLabel=P.currentLabel,s.selected=[P];return}const w=[];ze(e.modelValue)||De(e.modelValue).forEach(A=>{w.push(Xn(A))}),s.selected=w},Xn=w=>{let A;const P=ro(w).toLowerCase()==="object",z=ro(w).toLowerCase()==="null",Ge=ro(w).toLowerCase()==="undefined";for(let ft=s.cachedOptions.size-1;ft>=0;ft--){const Te=lt.value[ft];if(P?Be(Te.value,e.valueKey)===Be(w,e.valueKey):Te.value===w){A={value:w,currentLabel:Te.currentLabel,get isDisabled(){return Te.isDisabled}};break}}if(A)return A;const Pt=P?w.label:!z&&!Ge?w:"";return{value:w,currentLabel:Pt}},Ve=()=>{s.hoveringIndex=U.value.findIndex(w=>s.selected.some(A=>wi(A)===wi(w)))},Lt=()=>{s.selectionWidth=c.value.getBoundingClientRect().width},cn=()=>{s.calculatorWidth=p.value.getBoundingClientRect().width},eo=()=>{s.collapseItemWidth=b.value.getBoundingClientRect().width},dt=()=>{var w,A;(A=(w=d.value)==null?void 0:w.updatePopper)==null||A.call(w)},dn=()=>{var w,A;(A=(w=f.value)==null?void 0:w.updatePopper)==null||A.call(w)},fn=()=>{s.inputValue.length>0&&!x.value&&(x.value=!0),ct(s.inputValue)},un=w=>{if(s.inputValue=w.target.value,e.remote)pn();else return fn()},pn=Pf(()=>{fn()},Nt.value),hn=w=>{En(e.modelValue,w)||t(To,w)},sb=w=>Vf(w,A=>!s.disabledOptions.has(A)),lb=w=>{if(e.multiple&&w.code!==Ut.delete&&w.target.value.length<=0){const A=De(e.modelValue).slice(),P=sb(A);if(P<0)return;const z=A[P];A.splice(P,1),t(X,A),hn(A),t("remove-tag",z)}},cb=(w,A)=>{const P=s.selected.indexOf(A);if(P>-1&&!M.value){const z=De(e.modelValue).slice();z.splice(P,1),t(X,z),hn(z),t("remove-tag",A.value)}w.stopPropagation(),no()},vs=w=>{w.stopPropagation();const A=e.multiple?[]:q.value;if(e.multiple)for(const P of s.selected)P.isDisabled&&A.push(P.value);t(X,A),hn(A),s.hoveringIndex=-1,x.value=!1,t("clear"),no()},Ss=w=>{var A;if(e.multiple){const P=De((A=e.modelValue)!=null?A:[]).slice(),z=ks(P,w.value);z>-1?P.splice(z,1):(e.multipleLimit<=0||P.length<e.multipleLimit)&&P.push(w.value),t(X,P),hn(P),w.created&&ct(""),e.filterable&&!e.reserveKeyword&&(s.inputValue="")}else t(X,w.value),hn(w.value),x.value=!1;no(),!x.value&&n.nextTick(()=>{to(w)})},ks=(w=[],A)=>{if(!te(A))return w.indexOf(A);const P=e.valueKey;let z=-1;return w.some((Ge,Pt)=>n.toRaw(Be(Ge,P))===Be(A,P)?(z=Pt,!0):!1),z},to=w=>{var A,P,z,Ge,Pt;const oo=ee(w)?w[0]:w;let ft=null;if(oo!=null&&oo.value){const Te=U.value.filter(As=>As.value===oo.value);Te.length>0&&(ft=Te[0].$el)}if(d.value&&ft){const Te=(Ge=(z=(P=(A=d.value)==null?void 0:A.popperRef)==null?void 0:P.contentRef)==null?void 0:z.querySelector)==null?void 0:Ge.call(z,`.${a.be("dropdown","wrap")}`);Te&&Kf(Te,ft)}(Pt=C.value)==null||Pt.handleScroll()},db=w=>{s.options.set(w.value,w),s.cachedOptions.set(w.value,w),w.disabled&&s.disabledOptions.set(w.value,w)},fb=(w,A)=>{s.options.get(w)===A&&s.options.delete(w)},ub=n.computed(()=>{var w,A;return(A=(w=d.value)==null?void 0:w.popperRef)==null?void 0:A.contentRef}),pb=()=>{s.isBeforeHide=!1,n.nextTick(()=>to(s.selected))},no=()=>{var w;(w=u.value)==null||w.focus()},Es=()=>{var w;(w=u.value)==null||w.blur()},hb=w=>{vs(w)},mb=()=>{x.value=!1,O.value&&Es()},gb=()=>{s.inputValue.length>0?s.inputValue="":x.value=!1},Is=()=>{M.value||(io&&(s.inputHovering=!0),s.menuVisibleOnFocus?s.menuVisibleOnFocus=!1:x.value=!x.value)},yb=()=>{x.value?U.value[s.hoveringIndex]&&Ss(U.value[s.hoveringIndex]):Is()},wi=w=>te(w.value)?Be(w.value,e.valueKey):w.value,bb=n.computed(()=>U.value.filter(w=>w.visible).every(w=>w.disabled)),wb=n.computed(()=>e.multiple?e.collapseTags?s.selected.slice(0,e.maxCollapseTags):s.selected:[]),Cb=n.computed(()=>e.multiple?e.collapseTags?s.selected.slice(e.maxCollapseTags):[]:[]),Ts=w=>{if(!x.value){x.value=!0;return}if(!(s.options.size===0||s.filteredOptionsCount===0||I.value)&&!bb.value){w==="next"?(s.hoveringIndex++,s.hoveringIndex===s.options.size&&(s.hoveringIndex=0)):w==="prev"&&(s.hoveringIndex--,s.hoveringIndex<0&&(s.hoveringIndex=s.options.size-1));const A=U.value[s.hoveringIndex];(A.disabled===!0||A.states.groupDisabled===!0||!A.visible)&&Ts(w),n.nextTick(()=>to(N.value))}},vb=()=>{if(!c.value)return 0;const w=window.getComputedStyle(c.value);return Number.parseFloat(w.gap||"6px")},Sb=n.computed(()=>{const w=vb();return{maxWidth:`${b.value&&e.maxCollapseTags===1?s.selectionWidth-s.collapseItemWidth-w:s.selectionWidth}px`}}),kb=n.computed(()=>({maxWidth:`${s.selectionWidth}px`})),Eb=n.computed(()=>({width:`${Math.max(s.calculatorWidth,xg)}px`}));return Re(c,Lt),Re(p,cn),Re(m,dt),Re(E,dt),Re(y,dn),Re(b,eo),n.onMounted(()=>{_t()}),{inputId:L,contentId:i,nsSelect:a,nsInput:r,states:s,isFocused:O,expanded:x,optionsArray:U,hoverOption:N,selectSize:Zn,filteredOptionsCount:re,resetCalculatorWidth:cn,updateTooltip:dt,updateTagTooltip:dn,debouncedOnInputChange:pn,onInput:un,deletePrevTag:lb,deleteTag:cb,deleteSelected:vs,handleOptionSelect:Ss,scrollToOption:to,hasModelValue:$,shouldShowPlaceholder:Qn,currentPlaceholder:yi,mouseEnterEventName:bi,showClose:pe,iconComponent:Y,iconReverse:Z,validateState:ce,validateIcon:Ee,showNewOption:qe,updateOptions:Yn,collapseTagSize:sn,setSelected:_t,selectDisabled:M,emptyText:Ie,handleCompositionStart:k,handleCompositionUpdate:v,handleCompositionEnd:S,onOptionCreate:db,onOptionDestroy:fb,handleMenuEnter:pb,focus:no,blur:Es,handleClearClick:hb,handleClickOutside:mb,handleEsc:gb,toggleMenu:Is,selectOption:yb,getValueKey:wi,navigateOptions:Ts,dropdownMenuVisible:gi,showTagList:wb,collapseTagList:Cb,tagStyle:Sb,collapseTagStyle:kb,inputStyle:Eb,popperRef:ub,inputRef:u,tooltipRef:d,tagTooltipRef:f,calculatorRef:p,prefixRef:g,suffixRef:h,selectRef:l,wrapperRef:E,selectionRef:c,scrollbarRef:C,menuRef:m,tagMenuRef:y,collapseItemRef:b}};var Ng=n.defineComponent({name:"ElOptions",setup(e,{slots:t}){const o=n.inject(Un);let i=[];return()=>{var a,r;const s=(a=t.default)==null?void 0:a.call(t),l=[];function c(d){ee(d)&&d.forEach(f=>{var u,p,g,h;const m=(u=(f==null?void 0:f.type)||{})==null?void 0:u.name;m==="ElOptionGroup"?c(!me(f.children)&&!ee(f.children)&&Q((p=f.children)==null?void 0:p.default)?(g=f.children)==null?void 0:g.default():f.children):m==="ElOption"?l.push((h=f.props)==null?void 0:h.value):ee(f.children)&&c(f.children)})}return s.length&&c((r=s[0])==null?void 0:r.children),En(l,i)||(i=l,o&&(o.states.optionValues=l)),s}}});const _g=R({name:String,id:String,modelValue:{type:[Array,String,Number,Boolean,Object],default:void 0},autocomplete:{type:String,default:"off"},automaticDropdown:Boolean,size:Et,effect:{type:_(String),default:"light"},disabled:Boolean,clearable:Boolean,filterable:Boolean,allowCreate:Boolean,loading:Boolean,popperClass:{type:String,default:""},popperOptions:{type:_(Object),default:()=>({})},remote:Boolean,loadingText:String,noMatchText:String,noDataText:String,remoteMethod:Function,filterMethod:Function,multiple:Boolean,multipleLimit:{type:Number,default:0},placeholder:{type:String},defaultFirstOption:Boolean,reserveKeyword:{type:Boolean,default:!0},valueKey:{type:String,default:"value"},collapseTags:Boolean,collapseTagsTooltip:Boolean,maxCollapseTags:{type:Number,default:1},teleported:se.teleported,persistent:{type:Boolean,default:!0},clearIcon:{type:gt,default:W.CircleClose},fitInputWidth:Boolean,suffixIcon:{type:gt,default:W.ArrowDown},tagType:{...ni.type,default:"info"},tagEffect:{...ni.effect,default:"light"},validateEvent:{type:Boolean,default:!0},remoteShowSuffix:Boolean,placement:{type:_(String),values:Mn,default:"bottom-start"},fallbackPlacements:{type:_(Array),default:["bottom-start","top-start","right","left"]},appendTo:String,...Ip,...at(["ariaLabel"])}),ds="ElSelect",Lg=n.defineComponent({name:ds,componentName:ds,components:{ElSelectMenu:Mg,ElOption:ii,ElOptions:Ng,ElTag:Um,ElScrollbar:Wp,ElTooltip:Vr,ElIcon:be},directives:{ClickOutside:gm},props:_g,emits:[X,To,"remove-tag","clear","visible-change","focus","blur"],setup(e,{emit:t}){const o=n.computed(()=>{const{modelValue:r,multiple:s}=e,l=s?[]:void 0;return ee(r)?s?r:l:s?l:r}),i=n.reactive({...n.toRefs(e),modelValue:o}),a=Bg(i,t);return n.provide(Un,n.reactive({props:i,states:a.states,optionsArray:a.optionsArray,handleOptionSelect:a.handleOptionSelect,onOptionCreate:a.onOptionCreate,onOptionDestroy:a.onOptionDestroy,selectRef:a.selectRef,setSelected:a.setSelected})),{...a,modelValue:o}}});function Pg(e,t,o,i,a,r){const s=n.resolveComponent("el-tag"),l=n.resolveComponent("el-tooltip"),c=n.resolveComponent("el-icon"),d=n.resolveComponent("el-option"),f=n.resolveComponent("el-options"),u=n.resolveComponent("el-scrollbar"),p=n.resolveComponent("el-select-menu"),g=n.resolveDirective("click-outside");return n.withDirectives((n.openBlock(),n.createElementBlock("div",{ref:"selectRef",class:n.normalizeClass([e.nsSelect.b(),e.nsSelect.m(e.selectSize)]),[n.toHandlerKey(e.mouseEnterEventName)]:h=>e.states.inputHovering=!0,onMouseleave:h=>e.states.inputHovering=!1},[n.createVNode(l,{ref:"tooltipRef",visible:e.dropdownMenuVisible,placement:e.placement,teleported:e.teleported,"popper-class":[e.nsSelect.e("popper"),e.popperClass],"popper-options":e.popperOptions,"fallback-placements":e.fallbackPlacements,effect:e.effect,pure:"",trigger:"click",transition:`${e.nsSelect.namespace.value}-zoom-in-top`,"stop-popper-mouse-event":!1,"gpu-acceleration":!1,persistent:e.persistent,"append-to":e.appendTo,onBeforeShow:e.handleMenuEnter,onHide:h=>e.states.isBeforeHide=!1},{default:n.withCtx(()=>{var h;return[n.createElementVNode("div",{ref:"wrapperRef",class:n.normalizeClass([e.nsSelect.e("wrapper"),e.nsSelect.is("focused",e.isFocused),e.nsSelect.is("hovering",e.states.inputHovering),e.nsSelect.is("filterable",e.filterable),e.nsSelect.is("disabled",e.selectDisabled)]),onClick:n.withModifiers(e.toggleMenu,["prevent"])},[e.$slots.prefix?(n.openBlock(),n.createElementBlock("div",{key:0,ref:"prefixRef",class:n.normalizeClass(e.nsSelect.e("prefix"))},[n.renderSlot(e.$slots,"prefix")],2)):n.createCommentVNode("v-if",!0),n.createElementVNode("div",{ref:"selectionRef",class:n.normalizeClass([e.nsSelect.e("selection"),e.nsSelect.is("near",e.multiple&&!e.$slots.prefix&&!!e.states.selected.length)])},[e.multiple?n.renderSlot(e.$slots,"tag",{key:0},()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.showTagList,m=>(n.openBlock(),n.createElementBlock("div",{key:e.getValueKey(m),class:n.normalizeClass(e.nsSelect.e("selected-item"))},[n.createVNode(s,{closable:!e.selectDisabled&&!m.isDisabled,size:e.collapseTagSize,type:e.tagType,effect:e.tagEffect,"disable-transitions":"",style:n.normalizeStyle(e.tagStyle),onClose:y=>e.deleteTag(y,m)},{default:n.withCtx(()=>[n.createElementVNode("span",{class:n.normalizeClass(e.nsSelect.e("tags-text"))},[n.renderSlot(e.$slots,"label",{label:m.currentLabel,value:m.value},()=>[n.createTextVNode(n.toDisplayString(m.currentLabel),1)])],2)]),_:2},1032,["closable","size","type","effect","style","onClose"])],2))),128)),e.collapseTags&&e.states.selected.length>e.maxCollapseTags?(n.openBlock(),n.createBlock(l,{key:0,ref:"tagTooltipRef",disabled:e.dropdownMenuVisible||!e.collapseTagsTooltip,"fallback-placements":["bottom","top","right","left"],effect:e.effect,placement:"bottom",teleported:e.teleported},{default:n.withCtx(()=>[n.createElementVNode("div",{ref:"collapseItemRef",class:n.normalizeClass(e.nsSelect.e("selected-item"))},[n.createVNode(s,{closable:!1,size:e.collapseTagSize,type:e.tagType,effect:e.tagEffect,"disable-transitions":"",style:n.normalizeStyle(e.collapseTagStyle)},{default:n.withCtx(()=>[n.createElementVNode("span",{class:n.normalizeClass(e.nsSelect.e("tags-text"))}," + "+n.toDisplayString(e.states.selected.length-e.maxCollapseTags),3)]),_:1},8,["size","type","effect","style"])],2)]),content:n.withCtx(()=>[n.createElementVNode("div",{ref:"tagMenuRef",class:n.normalizeClass(e.nsSelect.e("selection"))},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.collapseTagList,m=>(n.openBlock(),n.createElementBlock("div",{key:e.getValueKey(m),class:n.normalizeClass(e.nsSelect.e("selected-item"))},[n.createVNode(s,{class:"in-tooltip",closable:!e.selectDisabled&&!m.isDisabled,size:e.collapseTagSize,type:e.tagType,effect:e.tagEffect,"disable-transitions":"",onClose:y=>e.deleteTag(y,m)},{default:n.withCtx(()=>[n.createElementVNode("span",{class:n.normalizeClass(e.nsSelect.e("tags-text"))},[n.renderSlot(e.$slots,"label",{label:m.currentLabel,value:m.value},()=>[n.createTextVNode(n.toDisplayString(m.currentLabel),1)])],2)]),_:2},1032,["closable","size","type","effect","onClose"])],2))),128))],2)]),_:3},8,["disabled","effect","teleported"])):n.createCommentVNode("v-if",!0)]):n.createCommentVNode("v-if",!0),e.selectDisabled?n.createCommentVNode("v-if",!0):(n.openBlock(),n.createElementBlock("div",{key:1,class:n.normalizeClass([e.nsSelect.e("selected-item"),e.nsSelect.e("input-wrapper"),e.nsSelect.is("hidden",!e.filterable)])},[n.withDirectives(n.createElementVNode("input",{id:e.inputId,ref:"inputRef","onUpdate:modelValue":m=>e.states.inputValue=m,type:"text",name:e.name,class:n.normalizeClass([e.nsSelect.e("input"),e.nsSelect.is(e.selectSize)]),disabled:e.selectDisabled,autocomplete:e.autocomplete,style:n.normalizeStyle(e.inputStyle),role:"combobox",readonly:!e.filterable,spellcheck:"false","aria-activedescendant":((h=e.hoverOption)==null?void 0:h.id)||"","aria-controls":e.contentId,"aria-expanded":e.dropdownMenuVisible,"aria-label":e.ariaLabel,"aria-autocomplete":"none","aria-haspopup":"listbox",onKeydown:[n.withKeys(n.withModifiers(m=>e.navigateOptions("next"),["stop","prevent"]),["down"]),n.withKeys(n.withModifiers(m=>e.navigateOptions("prev"),["stop","prevent"]),["up"]),n.withKeys(n.withModifiers(e.handleEsc,["stop","prevent"]),["esc"]),n.withKeys(n.withModifiers(e.selectOption,["stop","prevent"]),["enter"]),n.withKeys(n.withModifiers(e.deletePrevTag,["stop"]),["delete"])],onCompositionstart:e.handleCompositionStart,onCompositionupdate:e.handleCompositionUpdate,onCompositionend:e.handleCompositionEnd,onInput:e.onInput,onClick:n.withModifiers(e.toggleMenu,["stop"])},null,46,["id","onUpdate:modelValue","name","disabled","autocomplete","readonly","aria-activedescendant","aria-controls","aria-expanded","aria-label","onKeydown","onCompositionstart","onCompositionupdate","onCompositionend","onInput","onClick"]),[[n.vModelText,e.states.inputValue]]),e.filterable?(n.openBlock(),n.createElementBlock("span",{key:0,ref:"calculatorRef","aria-hidden":"true",class:n.normalizeClass(e.nsSelect.e("input-calculator")),textContent:n.toDisplayString(e.states.inputValue)},null,10,["textContent"])):n.createCommentVNode("v-if",!0)],2)),e.shouldShowPlaceholder?(n.openBlock(),n.createElementBlock("div",{key:2,class:n.normalizeClass([e.nsSelect.e("selected-item"),e.nsSelect.e("placeholder"),e.nsSelect.is("transparent",!e.hasModelValue||e.expanded&&!e.states.inputValue)])},[e.hasModelValue?n.renderSlot(e.$slots,"label",{key:0,label:e.currentPlaceholder,value:e.modelValue},()=>[n.createElementVNode("span",null,n.toDisplayString(e.currentPlaceholder),1)]):(n.openBlock(),n.createElementBlock("span",{key:1},n.toDisplayString(e.currentPlaceholder),1))],2)):n.createCommentVNode("v-if",!0)],2),n.createElementVNode("div",{ref:"suffixRef",class:n.normalizeClass(e.nsSelect.e("suffix"))},[e.iconComponent&&!e.showClose?(n.openBlock(),n.createBlock(c,{key:0,class:n.normalizeClass([e.nsSelect.e("caret"),e.nsSelect.e("icon"),e.iconReverse])},{default:n.withCtx(()=>[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.iconComponent)))]),_:1},8,["class"])):n.createCommentVNode("v-if",!0),e.showClose&&e.clearIcon?(n.openBlock(),n.createBlock(c,{key:1,class:n.normalizeClass([e.nsSelect.e("caret"),e.nsSelect.e("icon"),e.nsSelect.e("clear")]),onClick:e.handleClearClick},{default:n.withCtx(()=>[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.clearIcon)))]),_:1},8,["class","onClick"])):n.createCommentVNode("v-if",!0),e.validateState&&e.validateIcon?(n.openBlock(),n.createBlock(c,{key:2,class:n.normalizeClass([e.nsInput.e("icon"),e.nsInput.e("validateIcon")])},{default:n.withCtx(()=>[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.validateIcon)))]),_:1},8,["class"])):n.createCommentVNode("v-if",!0)],2)],10,["onClick"])]}),content:n.withCtx(()=>[n.createVNode(p,{ref:"menuRef"},{default:n.withCtx(()=>[e.$slots.header?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(e.nsSelect.be("dropdown","header")),onClick:n.withModifiers(()=>{},["stop"])},[n.renderSlot(e.$slots,"header")],10,["onClick"])):n.createCommentVNode("v-if",!0),n.withDirectives(n.createVNode(u,{id:e.contentId,ref:"scrollbarRef",tag:"ul","wrap-class":e.nsSelect.be("dropdown","wrap"),"view-class":e.nsSelect.be("dropdown","list"),class:n.normalizeClass([e.nsSelect.is("empty",e.filteredOptionsCount===0)]),role:"listbox","aria-label":e.ariaLabel,"aria-orientation":"vertical"},{default:n.withCtx(()=>[e.showNewOption?(n.openBlock(),n.createBlock(d,{key:0,value:e.states.inputValue,created:!0},null,8,["value"])):n.createCommentVNode("v-if",!0),n.createVNode(f,null,{default:n.withCtx(()=>[n.renderSlot(e.$slots,"default")]),_:3})]),_:3},8,["id","wrap-class","view-class","class","aria-label"]),[[n.vShow,e.states.options.size>0&&!e.loading]]),e.$slots.loading&&e.loading?(n.openBlock(),n.createElementBlock("div",{key:1,class:n.normalizeClass(e.nsSelect.be("dropdown","loading"))},[n.renderSlot(e.$slots,"loading")],2)):e.loading||e.filteredOptionsCount===0?(n.openBlock(),n.createElementBlock("div",{key:2,class:n.normalizeClass(e.nsSelect.be("dropdown","empty"))},[n.renderSlot(e.$slots,"empty",{},()=>[n.createElementVNode("span",null,n.toDisplayString(e.emptyText),1)])],2)):n.createCommentVNode("v-if",!0),e.$slots.footer?(n.openBlock(),n.createElementBlock("div",{key:3,class:n.normalizeClass(e.nsSelect.be("dropdown","footer")),onClick:n.withModifiers(()=>{},["stop"])},[n.renderSlot(e.$slots,"footer")],10,["onClick"])):n.createCommentVNode("v-if",!0)]),_:3},512)]),_:3},8,["visible","placement","teleported","popper-class","popper-options","fallback-placements","effect","transition","persistent","append-to","onBeforeShow","onHide"])],16,["onMouseleave"])),[[g,e.handleClickOutside,e.popperRef]])}var Vg=F(Lg,[["render",Pg],["__file","select.vue"]]);const Rg=n.defineComponent({name:"ElOptionGroup",componentName:"ElOptionGroup",props:{label:String,disabled:Boolean},setup(e){const t=D("select"),o=n.ref(null),i=n.getCurrentInstance(),a=n.ref([]);n.provide(cs,n.reactive({...n.toRefs(e)}));const r=n.computed(()=>a.value.some(d=>d.visible===!0)),s=d=>{var f,u;return((f=d.type)==null?void 0:f.name)==="ElOption"&&!!((u=d.component)!=null&&u.proxy)},l=d=>{const f=De(d),u=[];return f.forEach(p=>{var g,h;s(p)?u.push(p.component.proxy):(g=p.children)!=null&&g.length?u.push(...l(p.children)):(h=p.component)!=null&&h.subTree&&u.push(...l(p.component.subTree))}),u},c=()=>{a.value=l(i.subTree)};return n.onMounted(()=>{c()}),$s(o,c,{attributes:!0,subtree:!0,childList:!0}),{groupRef:o,visible:r,ns:t}}});function Fg(e,t,o,i,a,r){return n.withDirectives((n.openBlock(),n.createElementBlock("ul",{ref:"groupRef",class:n.normalizeClass(e.ns.be("group","wrap"))},[n.createElementVNode("li",{class:n.normalizeClass(e.ns.be("group","title"))},n.toDisplayString(e.label),3),n.createElementVNode("li",null,[n.createElementVNode("ul",{class:n.normalizeClass(e.ns.b("group"))},[n.renderSlot(e.$slots,"default")],2)])],2)),[[n.vShow,e.visible]])}var fs=F(Rg,[["render",Fg],["__file","option-group.vue"]]);const Wn=oe(Vg,{Option:ii,OptionGroup:fs}),ai=tt(ii);tt(fs);const Dg=R({trigger:tn.trigger,placement:oi.placement,disabled:tn.disabled,visible:se.visible,transition:se.transition,popperOptions:oi.popperOptions,tabindex:oi.tabindex,content:se.content,popperStyle:se.popperStyle,popperClass:se.popperClass,enterable:{...se.enterable,default:!0},effect:{...se.effect,default:"light"},teleported:se.teleported,title:String,width:{type:[String,Number],default:150},offset:{type:Number,default:void 0},showAfter:{type:Number,default:0},hideAfter:{type:Number,default:200},autoClose:{type:Number,default:0},showArrow:{type:Boolean,default:!0},persistent:{type:Boolean,default:!0},"onUpdate:visible":{type:Function}}),$g={"update:visible":e=>_e(e),"before-enter":()=>!0,"before-leave":()=>!0,"after-enter":()=>!0,"after-leave":()=>!0},zg="onUpdate:visible",jg=n.defineComponent({name:"ElPopover"}),Hg=n.defineComponent({...jg,props:Dg,emits:$g,setup(e,{expose:t,emit:o}){const i=e,a=n.computed(()=>i[zg]),r=D("popover"),s=n.ref(),l=n.computed(()=>{var y;return(y=n.unref(s))==null?void 0:y.popperRef}),c=n.computed(()=>[{width:et(i.width)},i.popperStyle]),d=n.computed(()=>[r.b(),i.popperClass,{[r.m("plain")]:!!i.content}]),f=n.computed(()=>i.transition===`${r.namespace.value}-fade-in-linear`),u=()=>{var y;(y=s.value)==null||y.hide()},p=()=>{o("before-enter")},g=()=>{o("before-leave")},h=()=>{o("after-enter")},m=()=>{o("update:visible",!1),o("after-leave")};return t({popperRef:l,hide:u}),(y,b)=>(n.openBlock(),n.createBlock(n.unref(Vr),n.mergeProps({ref_key:"tooltipRef",ref:s},y.$attrs,{trigger:y.trigger,placement:y.placement,disabled:y.disabled,visible:y.visible,transition:y.transition,"popper-options":y.popperOptions,tabindex:y.tabindex,content:y.content,offset:y.offset,"show-after":y.showAfter,"hide-after":y.hideAfter,"auto-close":y.autoClose,"show-arrow":y.showArrow,"aria-label":y.title,effect:y.effect,enterable:y.enterable,"popper-class":n.unref(d),"popper-style":n.unref(c),teleported:y.teleported,persistent:y.persistent,"gpu-acceleration":n.unref(f),"onUpdate:visible":n.unref(a),onBeforeShow:p,onBeforeHide:g,onShow:h,onHide:m}),{content:n.withCtx(()=>[y.title?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(n.unref(r).e("title")),role:"title"},n.toDisplayString(y.title),3)):n.createCommentVNode("v-if",!0),n.renderSlot(y.$slots,"default",{},()=>[n.createTextVNode(n.toDisplayString(y.content),1)])]),default:n.withCtx(()=>[y.$slots.reference?n.renderSlot(y.$slots,"reference",{key:0}):n.createCommentVNode("v-if",!0)]),_:3},16,["trigger","placement","disabled","visible","transition","popper-options","tabindex","content","offset","show-after","hide-after","auto-close","show-arrow","aria-label","effect","enterable","popper-class","popper-style","teleported","persistent","gpu-acceleration","onUpdate:visible"]))}});var Kg=F(Hg,[["__file","popover.vue"]]);const us=(e,t)=>{const o=t.arg||t.value,i=o==null?void 0:o.popperRef;i&&(i.triggerRef=e)};var Ug={mounted(e,t){us(e,t)},updated(e,t){us(e,t)}};const ri=Gf(Ug,"popover"),an=oe(Kg,{directive:ri});function Wg(e){let t;const o=n.ref(!1),i=n.reactive({...e,originalPosition:"",originalOverflow:"",visible:!1});function a(p){i.text=p}function r(){const p=i.parent,g=u.ns;if(!p.vLoadingAddClassList){let h=p.getAttribute("loading-number");h=Number.parseInt(h)-1,h?p.setAttribute("loading-number",h.toString()):(Kt(p,g.bm("parent","relative")),p.removeAttribute("loading-number")),Kt(p,g.bm("parent","hidden"))}s(),f.unmount()}function s(){var p,g;(g=(p=u.$el)==null?void 0:p.parentNode)==null||g.removeChild(u.$el)}function l(){var p;e.beforeClose&&!e.beforeClose()||(o.value=!0,clearTimeout(t),t=setTimeout(c,400),i.visible=!1,(p=e.closed)==null||p.call(e))}function c(){if(!o.value)return;const p=i.parent;o.value=!1,p.vLoadingAddClassList=void 0,r()}const d=n.defineComponent({name:"ElLoading",setup(p,{expose:g}){const{ns:h,zIndex:m}=Op("loading");return g({ns:h,zIndex:m}),()=>{const y=i.spinner||i.svg,b=n.h("svg",{class:"circular",viewBox:i.svgViewBox?i.svgViewBox:"0 0 50 50",...y?{innerHTML:y}:{}},[n.h("circle",{class:"path",cx:"25",cy:"25",r:"20",fill:"none"})]),C=i.text?n.h("p",{class:h.b("text")},[i.text]):void 0;return n.h(n.Transition,{name:h.b("fade"),onAfterLeave:c},{default:n.withCtx(()=>[n.withDirectives(n.createVNode("div",{style:{backgroundColor:i.background||""},class:[h.b("mask"),i.customClass,i.fullscreen?"is-fullscreen":""]},[n.h("div",{class:h.b("spinner")},[b,C])]),[[n.vShow,i.visible]])])})}}}),f=n.createApp(d),u=f.mount(document.createElement("div"));return{...n.toRefs(i),setText:a,removeElLoadingChild:s,close:l,handleAfterLeave:c,vm:u,get $el(){return u.$el}}}let qn;const si=function(e={}){if(!K)return;const t=qg(e);if(t.fullscreen&&qn)return qn;const o=Wg({...t,closed:()=>{var a;(a=t.closed)==null||a.call(t),t.fullscreen&&(qn=void 0)}});Gg(t,t.parent,o),ps(t,t.parent,o),t.parent.vLoadingAddClassList=()=>ps(t,t.parent,o);let i=t.parent.getAttribute("loading-number");return i?i=`${Number.parseInt(i)+1}`:i="1",t.parent.setAttribute("loading-number",i),t.parent.appendChild(o.$el),n.nextTick(()=>o.visible.value=t.visible),t.fullscreen&&(qn=o),o},qg=e=>{var t,o,i,a;let r;return me(e.target)?r=(t=document.querySelector(e.target))!=null?t:document.body:r=e.target||document.body,{parent:r===document.body||e.body?document.body:r,background:e.background||"",svg:e.svg||"",svgViewBox:e.svgViewBox||"",spinner:e.spinner||!1,text:e.text||"",fullscreen:r===document.body&&((o=e.fullscreen)!=null?o:!0),lock:(i=e.lock)!=null?i:!1,customClass:e.customClass||"",visible:(a=e.visible)!=null?a:!0,beforeClose:e.beforeClose,closed:e.closed,target:r}},Gg=async(e,t,o)=>{const{nextZIndex:i}=o.vm.zIndex||o.vm._.exposed.zIndex,a={};if(e.fullscreen)o.originalPosition.value=mt(document.body,"position"),o.originalOverflow.value=mt(document.body,"overflow"),a.zIndex=i();else if(e.parent===document.body){o.originalPosition.value=mt(document.body,"position"),await n.nextTick();for(const r of["top","left"]){const s=r==="top"?"scrollTop":"scrollLeft";a[r]=`${e.target.getBoundingClientRect()[r]+document.body[s]+document.documentElement[s]-Number.parseInt(mt(document.body,`margin-${r}`),10)}px`}for(const r of["height","width"])a[r]=`${e.target.getBoundingClientRect()[r]}px`}else o.originalPosition.value=mt(t,"position");for(const[r,s]of Object.entries(a))o.$el.style[r]=s},ps=(e,t,o)=>{const i=o.vm.ns||o.vm._.exposed.ns;["absolute","fixed","sticky"].includes(o.originalPosition.value)?Kt(t,i.bm("parent","relative")):Io(t,i.bm("parent","relative")),e.fullscreen&&e.lock?Io(t,i.bm("parent","hidden")):Kt(t,i.bm("parent","hidden"))},Gn=Symbol("ElLoading"),hs=(e,t)=>{var o,i,a,r;const s=t.instance,l=p=>te(t.value)?t.value[p]:void 0,c=p=>{const g=me(p)&&(s==null?void 0:s[p])||p;return g&&n.ref(g)},d=p=>c(l(p)||e.getAttribute(`element-loading-${Zs(p)}`)),f=(o=l("fullscreen"))!=null?o:t.modifiers.fullscreen,u={text:d("text"),svg:d("svg"),svgViewBox:d("svgViewBox"),spinner:d("spinner"),background:d("background"),customClass:d("customClass"),fullscreen:f,target:(i=l("target"))!=null?i:f?void 0:e,body:(a=l("body"))!=null?a:t.modifiers.body,lock:(r=l("lock"))!=null?r:t.modifiers.lock};e[Gn]={options:u,instance:si(u)}},Jg=(e,t)=>{for(const o of Object.keys(t))n.isRef(t[o])&&(t[o].value=e[o])},li={mounted(e,t){t.value&&hs(e,t)},updated(e,t){const o=e[Gn];t.oldValue!==t.value&&(t.value&&!t.oldValue?hs(e,t):t.value&&t.oldValue?te(t.value)&&Jg(t.value,o.options):o==null||o.instance.close())},unmounted(e){var t;(t=e[Gn])==null||t.instance.close(),e[Gn]=null}},Yg={install(e){e.directive("loading",li),e.config.globalProperties.$loading=si},directive:li,service:si},st=(e,t)=>{const o=e.__vccOpts||e;for(const[i,a]of t)o[i]=a;return o},Zg={name:"SelectionsGroup",components:{Checkbox:Yr,CheckboxGroup:Zr,Col:on,Icon:be,Row:nn,ElIconWarning:W.Warning},methods:{reset:function(){this.checkAll=!0,this.checkedItems=[],this.selections.forEach(e=>{!("enabled"in e)||e.enabled===!0?this.checkedItems.push(e[this.identifierKey]):this.checkAll=!1})},setCheckboxActionData:function(e,t){if(e){const o=e.querySelector('input[type="checkbox"]'),i=e.querySelector(".el-checkbox__label"),r=e.closest(".selections-container").querySelector(".checkall-display-text");let s="";o&&(s=o.checked?"checked":"unchecked"),this.checkboxActionData={selectionsTitle:r?r.innerText:"",property:o&&t!=="all"?o.value:"",label:i?i.innerText:"",checked:s}}else this.checkboxActionData={selectionsTitle:"",property:"",label:"",checked:""}},onCheckboxNativeChange:function(e){const t=e.target.closest(".checkbox-container");this.setCheckboxActionData(t,"individual")},onAllCheckboxNativeChange:function(e){const t=e.target.closest(".all-checkbox");this.setCheckboxActionData(t,"all")},visibilityToggle:function(e,t){this.$emit("changed",{key:e,value:t}),e===this.checkboxActionData.property&&(this.checkboxActionData.checked=t?"checked":"unchecked"),this.$emit("selections-data-changed",this.checkboxActionData)},checkboxMouseEnterEmit:function(e,t){this.$emit("checkboxMouseEnter",{key:e,value:t,selections:this.selections,checked:this.checkedItems})},handleCheckedItemsChange:function(e){let t=e.length;this.checkAll=t===this.selections.length},handleCheckAllChange:function(e){this.checkedItems=e?this.selections.map(t=>t[this.identifierKey]):[],this.$emit("checkAll",{keys:this.selections.map(t=>t[this.identifierKey]),value:e}),this.checkboxActionData.property=this.identifierKey,this.checkboxActionData.checked=e?"checked":"unchecked",this.$emit("selections-data-changed",this.checkboxActionData)},getBackgroundStyles:function(e){return"colour"in e&&this.colourStyle==="background"?{background:e.colour}:{}},getState:function(){const t=this.checkedItems.length===this.selections.length;return{checkAll:t,checked:t?[]:this.checkedItems}},setState:function(e){var t;if(this.checkAll=e.checkAll,this.checkedItems.length=0,(t=e.checked)!=null&&t.length)this.checkedItems.push(...e.checked),this.selections.forEach(o=>{const i=o[this.identifierKey];this.$emit("changed",{key:i,value:this.checkedItems.includes(i)})});else{const o=this.selections.map(a=>a[this.identifierKey]);let i=!1;this.checkAll&&(i=!0,this.checkedItems.push(...o)),this.$emit("checkAll",{keys:o,value:i})}},hasLineStyles:function(e){return"colour"in e&&this.colourStyle==="line"},getLineStyles:function(e){return"colour"in e&&this.colourStyle==="line"?"dashed"in e&&e.dashed===!0?{background:`repeating-linear-gradient(90deg,${e.colour},${e.colour} 6px,transparent 0,transparent 9px)`}:{background:e.colour}:{display:"None"}}},props:{colourStyle:{type:String,default:"line"},helpMessage:{type:String,default:""},identifierKey:{type:String,default:"id"},labelKey:{type:String,default:"label"},title:{type:String,default:""},selections:{type:Array,default:function(){return[]}},showAsLegend:{type:Boolean,default:!1}},computed:{isIndeterminate:function(){return!(this.checkedItems.length===0||this.checkAll)}},data:function(){return{checkedItems:[],checkAll:!0,checkboxActionData:{selectionsTitle:"",property:"",label:"",checked:""}}},mounted:function(){this.reset()}},Qg={class:"selections-container"},Xg={class:"checkall-display-text"},ey={style:{"word-break":"keep-all"}},ty={class:"checkbox-group-inner"},ny=["onMouseenter","onMouseleave"];function oy(e,t,o,i,a,r){const s=W.Warning,l=be,c=an,d=on,f=Yr,u=nn,p=Zr;return n.openBlock(),n.createElementBlock("div",Qg,[n.createVNode(u,null,{default:n.withCtx(()=>[n.createVNode(d,{span:12},{default:n.withCtx(()=>[n.createElementVNode("span",Xg,n.toDisplayString(o.title),1),o.helpMessage?(n.openBlock(),n.createBlock(c,{key:0,width:"250",trigger:"hover",teleported:!1,"popper-class":"popover-origin-help"},n.createSlots({default:n.withCtx(()=>[n.createElementVNode("span",ey,n.toDisplayString(o.helpMessage),1)]),_:2},[o.helpMessage?{name:"reference",fn:n.withCtx(()=>[n.createVNode(l,{class:"info"},{default:n.withCtx(()=>[n.createVNode(s)]),_:1})]),key:"0"}:void 0]),1024)):n.createCommentVNode("",!0)]),_:1}),n.createVNode(d,{span:12},{default:n.withCtx(()=>[o.selections&&o.selections.length>1&&!o.showAsLegend?(n.openBlock(),n.createBlock(f,{key:0,class:"all-checkbox",indeterminate:r.isIndeterminate,modelValue:e.checkAll,"onUpdate:modelValue":t[0]||(t[0]=g=>e.checkAll=g),onChange:r.handleCheckAllChange,onClick:r.onAllCheckboxNativeChange},{default:n.withCtx(()=>t[2]||(t[2]=[n.createTextVNode("Display all")])),_:1},8,["indeterminate","modelValue","onChange","onClick"])):n.createCommentVNode("",!0)]),_:1})]),_:1}),n.createVNode(p,{class:n.normalizeClass({"show-as-legend":o.showAsLegend,"checkbox-group":!o.showAsLegend}),modelValue:e.checkedItems,"onUpdate:modelValue":t[1]||(t[1]=g=>e.checkedItems=g),size:"small",onChange:r.handleCheckedItemsChange},{default:n.withCtx(()=>[n.createElementVNode("div",ty,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(o.selections,g=>(n.openBlock(),n.createBlock(u,{key:g[o.identifierKey],label:g[o.identifierKey]},{default:n.withCtx(()=>[n.createElementVNode("div",{class:"checkbox-container",onMouseenter:h=>r.checkboxMouseEnterEmit(g[o.identifierKey],!0),onMouseleave:h=>r.checkboxMouseEnterEmit(g[o.identifierKey],!1)},[n.createVNode(f,{class:"my-checkbox",label:g[o.identifierKey],value:g[o.identifierKey],onChange:h=>r.visibilityToggle(g[o.identifierKey],h),onClick:r.onCheckboxNativeChange,checked:!("enabled"in g)||g.enabled===!0},{default:n.withCtx(()=>[n.createVNode(u,{class:"checkbox-row"},{default:n.withCtx(()=>[r.hasLineStyles(g)?(n.openBlock(),n.createBlock(d,{key:0,span:4},{default:n.withCtx(()=>[n.createElementVNode("div",{class:"path-visual",style:n.normalizeStyle(r.getLineStyles(g))},null,4)]),_:2},1024)):n.createCommentVNode("",!0),n.createVNode(d,{span:20},{default:n.withCtx(()=>[n.createElementVNode("div",{style:n.normalizeStyle(r.getBackgroundStyles(g))},n.toDisplayString(g[o.labelKey]),5)]),_:2},1024)]),_:2},1024)]),_:2},1032,["label","value","onChange","onClick","checked"])],40,ny)]),_:2},1032,["label"]))),128))])]),_:1},8,["class","modelValue","onChange"])])}const ms=st(Zg,[["render",oy],["__scopeId","data-v-35fb97d0"]]),iy='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="<fillColor>" stroke="<borderColor>" stroke-width="<borderWidth>" d="M11.0748 3.25583C11.4141 2.42845 12.5859 2.42845 12.9252 3.25583L14.6493 7.45955C14.793 7.80979 15.1221 8.04889 15.4995 8.07727L20.0303 8.41798C20.922 8.48504 21.2841 9.59942 20.6021 10.1778L17.1369 13.1166C16.8482 13.3614 16.7225 13.7483 16.8122 14.1161L17.8882 18.5304C18.1 19.3992 17.152 20.0879 16.3912 19.618L12.5255 17.2305C12.2034 17.0316 11.7966 17.0316 11.4745 17.2305L7.60881 19.618C6.84796 20.0879 5.90001 19.3992 6.1118 18.5304L7.18785 14.1161C7.2775 13.7483 7.1518 13.3614 6.86309 13.1166L3.3979 10.1778C2.71588 9.59942 3.07796 8.48504 3.96971 8.41798L8.50046 8.07727C8.87794 8.04889 9.20704 7.80979 9.35068 7.45955L11.0748 3.25583Z"/></svg>',ay={name:"LegendItem",props:{item:{type:Object,required:!0},identifierKey:{type:String,default:"id"},styleKey:{type:String,default:"style"},showStarInLegend:{type:Boolean,default:!1}},computed:{clipPathLegends:function(){return["exoid","hexagon"]},legendStyleValue:function(){return this.item[this.styleKey]==="star"?this.item[this.identifierKey]==="Featured dataset marker"&&!this.showStarInLegend?void 0:"star":this.clipPathLegends.includes(this.item[this.styleKey])?this.item[this.styleKey]:this.item[this.styleKey]==="line"?[this.item[this.styleKey],this.item.dashed?"dashed":"",this.item.arrow?"arrow":""]:[this.item[this.styleKey],"shape"]},customStyle:function(){const e=this.item.color?this.item.color:this.item.colour;let t=e||"transparent",o=this.item.border?this.item.border:"black",i=this.item.borderStyle?this.item.borderStyle:"default";if(e&&!this.item.border&&(o=t),this.item[this.styleKey]==="star"){let a=iy.replace("<fillColor>",t);return a=a.replace("<borderColor>",o),a=a.replace("<borderWidth>",o?"2":"0"),a="data:image/svg+xml,"+encodeURIComponent(a),{color:t,"background-image":`url(${a})`}}else return this.item[this.styleKey]==="line"?{color:t}:{"background-color":t,"border-color":o,"border-style":i}}},methods:{capitalise:function(e){return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()},customClipPathStyle:function(e){const t={...this.customStyle};return e?t["background-color"]=t["border-color"]:t.scale=.7,t}}},ry={key:0,class:"legend-item"},sy={class:"label"};function ly(e,t,o,i,a,r){return r.legendStyleValue?(n.openBlock(),n.createElementBlock("div",ry,[r.clipPathLegends.includes(r.legendStyleValue)?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(r.legendStyleValue),style:n.normalizeStyle(r.customClipPathStyle(!0))},[n.createElementVNode("div",{class:n.normalizeClass(r.legendStyleValue),style:n.normalizeStyle(r.customClipPathStyle(!1))},null,6)],6)):(n.openBlock(),n.createElementBlock("div",{key:1,class:n.normalizeClass(r.legendStyleValue),style:n.normalizeStyle(r.customStyle)},null,6)),n.createElementVNode("div",sy,n.toDisplayString(r.capitalise(o.item[o.identifierKey])),1)])):n.createCommentVNode("",!0)}const gs=st(ay,[["render",ly],["__scopeId","data-v-b7e5b095"]]),cy={name:"DynamicLegends",components:{LegendItem:gs},props:{identifierKey:{type:String,default:"id"},styleKey:{type:String,default:"style"},title:{type:String,default:""},legends:{type:Array,default:function(){return[]}},showStarInLegend:{type:Boolean,default:!1},showDatasetMarkerTooltip:{type:Boolean,default:!1}},data(){return{isHovering:!1,hoverTimeout:null}},computed:{tooltipVisible(){return this.showDatasetMarkerTooltip&&this.showStarInLegend||this.isHovering}},methods:{onMouseOver(){clearTimeout(this.hoverTimeout),this.hoverTimeout=setTimeout(()=>{this.isHovering=!0},500)},onMouseOut(){clearTimeout(this.hoverTimeout),this.hoverTimeout=setTimeout(()=>{this.isHovering=!1},500)}}},dy={class:"legend-group"},fy=["label"];function uy(e,t,o,i,a,r){const s=gs,l=an,c=ri;return n.openBlock(),n.createElementBlock("div",dy,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(o.legends,d=>(n.openBlock(),n.createElementBlock("div",{class:"legend-container",key:d[o.identifierKey],label:d[o.identifierKey]},[d[o.identifierKey]==="Featured dataset marker"?(n.openBlock(),n.createBlock(l,{key:0,content:"Location of the featured dataset",placement:"right",teleported:!0,trigger:"manual",width:"max-content",offset:0,"popper-class":"flatmap-popper flatmap-teleport-popper",visible:r.tooltipVisible,ref_for:!0,ref:"featuredMarkerPopover"},{reference:n.withCtx(()=>[n.withDirectives((n.openBlock(),n.createElementBlock("div",{onMouseover:t[0]||(t[0]=(...f)=>r.onMouseOver&&r.onMouseOver(...f)),onMouseout:t[1]||(t[1]=(...f)=>r.onMouseOut&&r.onMouseOut(...f))},[n.createVNode(s,{item:d,identifierKey:o.identifierKey,styleKey:o.styleKey,showStarInLegend:o.showStarInLegend},null,8,["item","identifierKey","styleKey","showStarInLegend"])],32)),[[c,void 0,"featuredMarkerPopover"]])]),_:2},1032,["visible"])):(n.openBlock(),n.createBlock(s,{key:1,item:d,identifierKey:o.identifierKey,styleKey:o.styleKey,showStarInLegend:o.showStarInLegend},null,8,["item","identifierKey","styleKey","showStarInLegend"]))],8,fy))),128))])}const py=st(cy,[["render",uy],["__scopeId","data-v-32c93a1a"]]),hy={name:"FlatmapError",props:{flatmapError:{type:Object,default:()=>({})}}},my={class:"flatmap-error"},gy={class:"flatmap-error-title"},yy={key:0},by={key:0,class:"flatmap-error-message"},wy=["innerHTML"],Cy={key:1};function vy(e,t,o,i,a,r){const s=W.DocumentDelete,l=be,c=ti;return n.openBlock(),n.createElementBlock("div",my,[n.createElementVNode("div",gy,[n.createVNode(l,{size:"24"},{default:n.withCtx(()=>[n.createVNode(s)]),_:1}),o.flatmapError.title?(n.openBlock(),n.createElementBlock("div",yy,n.toDisplayString(o.flatmapError.title),1)):n.createCommentVNode("",!0)]),o.flatmapError.messages?(n.openBlock(),n.createElementBlock("div",by,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(o.flatmapError.messages,(d,f)=>(n.openBlock(),n.createElementBlock("div",{key:f},[n.createElementVNode("div",{innerHTML:d},null,8,wy)]))),128))])):n.createCommentVNode("",!0),o.flatmapError.button?(n.openBlock(),n.createElementBlock("div",Cy,[n.createVNode(c,{class:"button",type:"primary",onClick:o.flatmapError.button.callback},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(o.flatmapError.button.text),1)]),_:1},8,["onClick"])])):n.createCommentVNode("",!0)])}const ci=st(hy,[["render",vy],["__scopeId","data-v-8961361a"]]),Sy={name:"SvgLegends"},ky={class:"legends-container"},Ey={version:"1.1",id:"Layer_1",x:"0px",y:"0px",viewBox:"0 0 500 500",style:{"enable-background":"new 0 0 500 500"},xmlns:"http://www.w3.org/2000/svg","xmlns:bx":"https://boxy-svg.com"};function Iy(e,t,o,i,a,r){return n.openBlock(),n.createElementBlock("div",ky,[(n.openBlock(),n.createElementBlock("svg",Ey,t[0]||(t[0]=[n.createStaticVNode('<defs data-v-88079d87><bx:grid height="30.447" width="32.516" x="0" y="0" data-v-88079d87></bx:grid></defs><path class="st0 st0-translate" d="M61.3,103.8c-15.9,0-28.8-12.3-28.8-27.3c0-15,13-27.3,28.8-27.3s28.8,12.3,28.8,27.3 C90.1,91.5,77.2,103.8,61.3,103.8z" data-v-88079d87></path><path class="st1" d="M40.3,356.1C29.5,345,29.8,328,41.5,317.5c11.7-10.5,29.6-9.9,40.7,1.1c11.1,11,10.5,28.1-1.2,38.5 C69.3,367.4,51.1,366.9,40.3,356.1z" data-v-88079d87></path><path class="st2" d="M61.2,396.9c-5.3,9.3-15.3,15.1-26.1,15.1l-0.4,0.6c5.1,9,5.1,20,0,29l0.4,0.6c10.7,0,20.8,5.8,26.1,15.1 c5.3-9.3,15.3-15.1,26.1-15.1c-5.3-9.3-5.3-20.9,0-30.4C76.6,412.1,66.7,406.3,61.2,396.9z" data-v-88079d87></path><text transform="matrix(0.9908 0 0 1 118.0161 171.7975)" class="st3 st4 st5" style="white-space:pre;" data-v-88079d87> Tissue region </text><path class="st6" d="M40.9,231.1c11.3-10.6,29.5-10.6,40.8,0c11.3,10.6,11.3,27.9,0,38.5c-11.3,10.6-29.5,10.6-40.8,0 C29.7,259,29.7,241.7,40.9,231.1z" data-v-88079d87></path><text transform="matrix(0.9908 0 0 1 118.0161 257.675)" class="st3 st4 st5" style="white-space:pre;" data-v-88079d87> Brain nuclei </text><text transform="matrix(0.9908 0 0 1 118.0903 345.5266)" class="st3 st4 st5" style="white-space:pre;" data-v-88079d87> Ganglia </text><text transform="matrix(0.9908 0 0 1 118.0903 433.1613)" class="st3 st4 st5" style="white-space:pre;" data-v-88079d87> Ganglionated nerve plexus </text>',9)]))),t[1]||(t[1]=n.createElementVNode("svg",{width:"72px",height:"72px",viewBox:"0 0 24 24",fill:"yellow"},null,-1))])}const Ty=st(Sy,[["render",Iy],["__scopeId","data-v-88079d87"]]),Ay=`<div class="flatmap-marker">
11
+ })`);const o=Mo();return n.computed(()=>n.unref(e)||`${o.value}-id-${t.prefix}-${t.current++}`)};let kt=[];const aa=e=>{const t=e;t.key===Wt.esc&&kt.forEach(o=>o(t))},pp=e=>{n.onMounted(()=>{kt.length===0&&document.addEventListener("keydown",aa),K&&kt.push(e)}),n.onBeforeUnmount(()=>{kt=kt.filter(t=>t!==e),kt.length===0&&K&&document.removeEventListener("keydown",aa)})};let sa;const la=()=>{const e=Mo(),t=ra(),o=n.computed(()=>`${e.value}-popper-container-${t.prefix}`),i=n.computed(()=>`#${o.value}`);return{id:o,selector:i}},hp=e=>{const t=document.createElement("div");return t.id=e,document.body.appendChild(t),t},mp=()=>{const{id:e,selector:t}=la();return n.onBeforeMount(()=>{K&&(process.env.NODE_ENV==="test"||!sa||!document.body.querySelector(t.value))&&(sa=hp(e.value))}),{id:e,selector:t}},gp=R({showAfter:{type:Number,default:0},hideAfter:{type:Number,default:200},autoClose:{type:Number,default:0}}),yp=({showAfter:e,hideAfter:t,autoClose:o,open:i,close:r})=>{const{registerTimeout:a}=ia(),{registerTimeout:s,cancelTimeout:l}=ia();return{onOpen:f=>{a(()=>{i(f);const u=n.unref(o);G(u)&&u>0&&s(()=>{r(f)},u)},n.unref(e))},onClose:f=>{l(),a(()=>{r(f)},n.unref(t))}}},ca=Symbol("elForwardRef"),bp=e=>{const t=o=>{e.value=o};n.provide(ca,{setForwardRef:t})},wp=e=>({mounted(t){e(t)},updated(t){e(t)},unmounted(){e(null)}}),da={current:0},fa=n.ref(0),ua=2e3,pa=Symbol("elZIndexContextKey"),ha=Symbol("zIndexContextKey"),$o=e=>{const t=n.getCurrentInstance()?n.inject(pa,da):da,o=e||(n.getCurrentInstance()?n.inject(ha,void 0):void 0),i=n.computed(()=>{const s=n.unref(o);return G(s)?s:ua}),r=n.computed(()=>i.value+fa.value),a=()=>(t.current++,fa.value=t.current,r.value);return!K&&!n.inject(pa)&&ne("ZIndexInjection",`Looks like you are using server rendering, you must provide a z-index provider to ensure the hydration process to be succeed
12
+ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`),{initialZIndex:i,currentZIndex:r,nextZIndex:a}},Et=On({type:String,values:_r,required:!1}),ma=Symbol("size"),Cp=()=>{const e=n.inject(ma,{});return n.computed(()=>n.unref(e.size)||"")};function vp(e,{beforeFocus:t,afterFocus:o,beforeBlur:i,afterBlur:r}={}){const a=n.getCurrentInstance(),{emit:s}=a,l=n.shallowRef(),c=n.ref(!1),d=p=>{Q(t)&&t(p)||c.value||(c.value=!0,s("focus",p),o==null||o())},f=p=>{var g;Q(i)&&i(p)||p.relatedTarget&&((g=l.value)!=null&&g.contains(p.relatedTarget))||(c.value=!1,s("blur",p),r==null||r())},u=()=>{var p,g;(p=l.value)!=null&&p.contains(document.activeElement)&&l.value!==document.activeElement||(g=e.value)==null||g.focus()};return n.watch(l,p=>{p&&p.setAttribute("tabindex","-1")}),he(l,"focus",d,!0),he(l,"blur",f,!0),he(l,"click",u,!0),process.env.NODE_ENV==="test"&&n.onMounted(()=>{const p=Xe(e.value)?e.value:document.querySelector("input,textarea");p&&(he(p,"focus",d,!0),he(p,"blur",f,!0))}),{isFocused:c,wrapperRef:l,handleFocus:d,handleBlur:f}}function Sp({afterComposition:e,emit:t}){const o=n.ref(!1),i=l=>{t==null||t("compositionstart",l),o.value=!0},r=l=>{var c;t==null||t("compositionupdate",l);const d=(c=l.target)==null?void 0:c.value,f=d[d.length-1]||"";o.value=!Zf(f)},a=l=>{t==null||t("compositionend",l),o.value&&(o.value=!1,n.nextTick(()=>e(l)))};return{isComposing:o,handleComposition:l=>{l.type==="compositionend"?a(l):r(l)},handleCompositionStart:i,handleCompositionUpdate:r,handleCompositionEnd:a}}const ga=Symbol("emptyValuesContextKey"),kp="use-empty-values",Ep=["",void 0,null],Ip=void 0,Tp=R({emptyValues:Array,valueOnClear:{type:[String,Number,Boolean,Function],default:void 0,validator:e=>Q(e)?!e():!e}}),Ap=(e,t)=>{const o=n.getCurrentInstance()?n.inject(ga,n.ref({})):n.ref({}),i=n.computed(()=>e.emptyValues||o.value.emptyValues||Ep),r=n.computed(()=>Q(e.valueOnClear)?e.valueOnClear():e.valueOnClear!==void 0?e.valueOnClear:Q(o.value.valueOnClear)?o.value.valueOnClear():o.value.valueOnClear!==void 0?o.value.valueOnClear:Ip),a=s=>i.value.includes(s);return i.value.includes(r.value)||ne(kp,"value-on-clear should be a value of empty-values"),{emptyValues:i,valueOnClear:r,isEmptyValue:a}},Op=R({ariaLabel:String,ariaOrientation:{type:String,values:["horizontal","vertical","undefined"]},ariaControls:String}),rt=e=>Tr(Op,e),ya=Symbol(),Pn=n.ref();function Vn(e,t=void 0){const o=n.getCurrentInstance()?n.inject(ya,Pn):Pn;return e?n.computed(()=>{var i,r;return(r=(i=o.value)==null?void 0:i[e])!=null?r:t}):o}function Mp(e,t){const o=Vn(),i=D(e,n.computed(()=>{var l;return((l=o.value)==null?void 0:l.namespace)||Gt})),r=Oo(n.computed(()=>{var l;return(l=o.value)==null?void 0:l.locale})),a=$o(n.computed(()=>{var l;return((l=o.value)==null?void 0:l.zIndex)||ua})),s=n.computed(()=>{var l;return n.unref(t)||((l=o.value)==null?void 0:l.size)||""});return xp(n.computed(()=>n.unref(o)||{})),{ns:i,locale:r,zIndex:a,size:s}}const xp=(e,t,o=!1)=>{var i;const r=!!n.getCurrentInstance(),a=r?Vn():void 0,s=(i=void 0)!=null?i:r?n.provide:void 0;if(!s){ne("provideGlobalConfig","provideGlobalConfig() can only be used inside setup().");return}const l=n.computed(()=>{const c=n.unref(e);return a!=null&&a.value?Bp(a.value,c):c});return s(ya,l),s(Lr,n.computed(()=>l.value.locale)),s(Pr,n.computed(()=>l.value.namespace)),s(ha,n.computed(()=>l.value.zIndex)),s(ma,{size:n.computed(()=>l.value.size||"")}),s(ga,n.computed(()=>({emptyValues:l.value.emptyValues,valueOnClear:l.value.valueOnClear}))),(o||!Pn.value)&&(Pn.value=l.value),l},Bp=(e,t)=>{const o=[...new Set([...Ar(e),...Ar(t)])],i={};for(const r of o)i[r]=t[r]!==void 0?t[r]:e[r];return i};var F=(e,t)=>{const o=e.__vccOpts||e;for(const[i,r]of t)o[i]=r;return o};const Np=R({size:{type:_([Number,String])},color:{type:String}}),_p=n.defineComponent({name:"ElIcon",inheritAttrs:!1}),Lp=n.defineComponent({..._p,props:Np,setup(e){const t=e,o=D("icon"),i=n.computed(()=>{const{size:r,color:a}=t;return!r&&!a?{}:{fontSize:ze(r)?void 0:et(r),"--color":a}});return(r,a)=>(n.openBlock(),n.createElementBlock("i",n.mergeProps({class:n.unref(o).b(),style:n.unref(i)},r.$attrs),[n.renderSlot(r.$slots,"default")],16))}});var Pp=F(Lp,[["__file","icon.vue"]]);const be=oe(Pp),zo=Symbol("formContextKey"),Rn=Symbol("formItemContextKey"),It=(e,t={})=>{const o=n.ref(void 0),i=t.prop?o:Vr("size"),r=t.global?o:Cp(),a=t.form?{size:void 0}:n.inject(zo,void 0),s=t.formItem?{size:void 0}:n.inject(Rn,void 0);return n.computed(()=>i.value||n.unref(e)||(s==null?void 0:s.size)||(a==null?void 0:a.size)||r.value||"")},Fn=e=>{const t=Vr("disabled"),o=n.inject(zo,void 0);return n.computed(()=>t.value||n.unref(e)||(o==null?void 0:o.disabled)||!1)},Tt=()=>{const e=n.inject(zo,void 0),t=n.inject(Rn,void 0);return{form:e,formItem:t}},Dn=(e,{formItemContext:t,disableIdGeneration:o,disableIdManagement:i})=>{o||(o=n.ref(!1)),i||(i=n.ref(!1));const r=n.ref();let a;const s=n.computed(()=>{var l;return!!(!(e.label||e.ariaLabel)&&t&&t.inputIds&&((l=t.inputIds)==null?void 0:l.length)<=1)});return n.onMounted(()=>{a=n.watch([n.toRef(e,"id"),o],([l,c])=>{const d=l??(c?void 0:it().value);d!==r.value&&(t!=null&&t.removeInputId&&(r.value&&t.removeInputId(r.value),!(i!=null&&i.value)&&!c&&d&&t.addInputId(d)),r.value=d)},{immediate:!0})}),n.onUnmounted(()=>{a&&a(),t!=null&&t.removeInputId&&r.value&&t.removeInputId(r.value)}),{isLabeledByFormItem:s,inputId:r}},At=4,Vp={vertical:{offset:"offsetHeight",scroll:"scrollTop",scrollSize:"scrollHeight",size:"height",key:"vertical",axis:"Y",client:"clientY",direction:"top"},horizontal:{offset:"offsetWidth",scroll:"scrollLeft",scrollSize:"scrollWidth",size:"width",key:"horizontal",axis:"X",client:"clientX",direction:"left"}},Rp=({move:e,size:t,bar:o})=>({[o.size]:t,transform:`translate${o.axis}(${e}%)`}),jo=Symbol("scrollbarContextKey"),Fp=R({vertical:Boolean,size:String,move:Number,ratio:{type:Number,required:!0},always:Boolean}),Dp="Thumb";var ba=F(n.defineComponent({__name:"thumb",props:Fp,setup(e){const t=e,o=n.inject(jo),i=D("scrollbar");o||Mr(Dp,"can not inject scrollbar context");const r=n.ref(),a=n.ref(),s=n.ref({}),l=n.ref(!1);let c=!1,d=!1,f=K?document.onselectstart:null;const u=n.computed(()=>Vp[t.vertical?"vertical":"horizontal"]),p=n.computed(()=>Rp({size:t.size,move:t.move,bar:u.value})),g=n.computed(()=>r.value[u.value.offset]**2/o.wrapElement[u.value.scrollSize]/t.ratio/a.value[u.value.offset]),h=S=>{var E;if(S.stopPropagation(),S.ctrlKey||[1,2].includes(S.button))return;(E=window.getSelection())==null||E.removeAllRanges(),y(S);const O=S.currentTarget;O&&(s.value[u.value.axis]=O[u.value.offset]-(S[u.value.client]-O.getBoundingClientRect()[u.value.direction]))},m=S=>{if(!a.value||!r.value||!o.wrapElement)return;const E=Math.abs(S.target.getBoundingClientRect()[u.value.direction]-S[u.value.client]),O=a.value[u.value.offset]/2,x=(E-O)*100*g.value/r.value[u.value.offset];o.wrapElement[u.value.scroll]=x*o.wrapElement[u.value.scrollSize]/100},y=S=>{S.stopImmediatePropagation(),c=!0,document.addEventListener("mousemove",b),document.addEventListener("mouseup",C),f=document.onselectstart,document.onselectstart=()=>!1},b=S=>{if(!r.value||!a.value||c===!1)return;const E=s.value[u.value.axis];if(!E)return;const O=(r.value.getBoundingClientRect()[u.value.direction]-S[u.value.client])*-1,x=a.value[u.value.offset]-E,N=(O-x)*100*g.value/r.value[u.value.offset];o.wrapElement[u.value.scroll]=N*o.wrapElement[u.value.scrollSize]/100},C=()=>{c=!1,s.value[u.value.axis]=0,document.removeEventListener("mousemove",b),document.removeEventListener("mouseup",C),v(),d&&(l.value=!1)},I=()=>{d=!1,l.value=!!t.size},k=()=>{d=!0,l.value=c};n.onBeforeUnmount(()=>{v(),document.removeEventListener("mouseup",C)});const v=()=>{document.onselectstart!==f&&(document.onselectstart=f)};return he(n.toRef(o,"scrollbarElement"),"mousemove",I),he(n.toRef(o,"scrollbarElement"),"mouseleave",k),(S,E)=>(n.openBlock(),n.createBlock(n.Transition,{name:n.unref(i).b("fade"),persisted:""},{default:n.withCtx(()=>[n.withDirectives(n.createElementVNode("div",{ref_key:"instance",ref:r,class:n.normalizeClass([n.unref(i).e("bar"),n.unref(i).is(n.unref(u).key)]),onMousedown:m},[n.createElementVNode("div",{ref_key:"thumb",ref:a,class:n.normalizeClass(n.unref(i).e("thumb")),style:n.normalizeStyle(n.unref(p)),onMousedown:h},null,38)],34),[[n.vShow,S.always||l.value]])]),_:1},8,["name"]))}}),[["__file","thumb.vue"]]);const $p=R({always:{type:Boolean,default:!0},minSize:{type:Number,required:!0}});var zp=F(n.defineComponent({__name:"bar",props:$p,setup(e,{expose:t}){const o=e,i=n.inject(jo),r=n.ref(0),a=n.ref(0),s=n.ref(""),l=n.ref(""),c=n.ref(1),d=n.ref(1);return t({handleScroll:p=>{if(p){const g=p.offsetHeight-At,h=p.offsetWidth-At;a.value=p.scrollTop*100/g*c.value,r.value=p.scrollLeft*100/h*d.value}},update:()=>{const p=i==null?void 0:i.wrapElement;if(!p)return;const g=p.offsetHeight-At,h=p.offsetWidth-At,m=g**2/p.scrollHeight,y=h**2/p.scrollWidth,b=Math.max(m,o.minSize),C=Math.max(y,o.minSize);c.value=m/(g-m)/(b/(g-b)),d.value=y/(h-y)/(C/(h-C)),l.value=b+At<g?`${b}px`:"",s.value=C+At<h?`${C}px`:""}}),(p,g)=>(n.openBlock(),n.createElementBlock(n.Fragment,null,[n.createVNode(ba,{move:r.value,ratio:d.value,size:s.value,always:p.always},null,8,["move","ratio","size","always"]),n.createVNode(ba,{move:a.value,ratio:c.value,size:l.value,vertical:"",always:p.always},null,8,["move","ratio","size","always"])],64))}}),[["__file","bar.vue"]]);const jp=R({height:{type:[String,Number],default:""},maxHeight:{type:[String,Number],default:""},native:{type:Boolean,default:!1},wrapStyle:{type:_([String,Object,Array]),default:""},wrapClass:{type:[String,Array],default:""},viewClass:{type:[String,Array],default:""},viewStyle:{type:[String,Array,Object],default:""},noresize:Boolean,tag:{type:String,default:"div"},always:Boolean,minSize:{type:Number,default:20},tabindex:{type:[String,Number],default:void 0},id:String,role:String,...rt(["ariaLabel","ariaOrientation"])}),Hp={scroll:({scrollTop:e,scrollLeft:t})=>[e,t].every(G)},Ho="ElScrollbar",Kp=n.defineComponent({name:Ho}),Up=n.defineComponent({...Kp,props:jp,emits:Hp,setup(e,{expose:t,emit:o}){const i=e,r=D("scrollbar");let a,s,l=0,c=0;const d=n.ref(),f=n.ref(),u=n.ref(),p=n.ref(),g=n.computed(()=>{const v={};return i.height&&(v.height=et(i.height)),i.maxHeight&&(v.maxHeight=et(i.maxHeight)),[i.wrapStyle,v]}),h=n.computed(()=>[i.wrapClass,r.e("wrap"),{[r.em("wrap","hidden-default")]:!i.native}]),m=n.computed(()=>[r.e("view"),i.viewClass]),y=()=>{var v;f.value&&((v=p.value)==null||v.handleScroll(f.value),l=f.value.scrollTop,c=f.value.scrollLeft,o("scroll",{scrollTop:f.value.scrollTop,scrollLeft:f.value.scrollLeft}))};function b(v,S){te(v)?f.value.scrollTo(v):G(v)&&G(S)&&f.value.scrollTo(v,S)}const C=v=>{if(!G(v)){ne(Ho,"value must be a number");return}f.value.scrollTop=v},I=v=>{if(!G(v)){ne(Ho,"value must be a number");return}f.value.scrollLeft=v},k=()=>{var v;(v=p.value)==null||v.update()};return n.watch(()=>i.noresize,v=>{v?(a==null||a(),s==null||s()):({stop:a}=Re(u,k),s=he("resize",k))},{immediate:!0}),n.watch(()=>[i.maxHeight,i.height],()=>{i.native||n.nextTick(()=>{var v;k(),f.value&&((v=p.value)==null||v.handleScroll(f.value))})}),n.provide(jo,n.reactive({scrollbarElement:d,wrapElement:f})),n.onActivated(()=>{f.value&&(f.value.scrollTop=l,f.value.scrollLeft=c)}),n.onMounted(()=>{i.native||n.nextTick(()=>{k()})}),n.onUpdated(()=>k()),t({wrapRef:f,update:k,scrollTo:b,setScrollTop:C,setScrollLeft:I,handleScroll:y}),(v,S)=>(n.openBlock(),n.createElementBlock("div",{ref_key:"scrollbarRef",ref:d,class:n.normalizeClass(n.unref(r).b())},[n.createElementVNode("div",{ref_key:"wrapRef",ref:f,class:n.normalizeClass(n.unref(h)),style:n.normalizeStyle(n.unref(g)),tabindex:v.tabindex,onScroll:y},[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(v.tag),{id:v.id,ref_key:"resizeRef",ref:u,class:n.normalizeClass(n.unref(m)),style:n.normalizeStyle(v.viewStyle),role:v.role,"aria-label":v.ariaLabel,"aria-orientation":v.ariaOrientation},{default:n.withCtx(()=>[n.renderSlot(v.$slots,"default")]),_:3},8,["id","class","style","role","aria-label","aria-orientation"]))],46,["tabindex"]),v.native?n.createCommentVNode("v-if",!0):(n.openBlock(),n.createBlock(zp,{key:0,ref_key:"barRef",ref:p,always:v.always,"min-size":v.minSize},null,8,["always","min-size"]))],2))}});var Wp=F(Up,[["__file","scrollbar.vue"]]);const qp=oe(Wp),Ko=Symbol("popper"),wa=Symbol("popperContent"),Ca=R({role:{type:String,values:["dialog","grid","group","listbox","menu","navigation","tooltip","tree"],default:"tooltip"}}),Gp=n.defineComponent({name:"ElPopper",inheritAttrs:!1}),Jp=n.defineComponent({...Gp,props:Ca,setup(e,{expose:t}){const o=e,i=n.ref(),r=n.ref(),a=n.ref(),s=n.ref(),l=n.computed(()=>o.role),c={triggerRef:i,popperInstanceRef:r,contentRef:a,referenceRef:s,role:l};return t(c),n.provide(Ko,c),(d,f)=>n.renderSlot(d.$slots,"default")}});var Yp=F(Jp,[["__file","popper.vue"]]);const va=R({arrowOffset:{type:Number,default:5}}),Zp=n.defineComponent({name:"ElPopperArrow",inheritAttrs:!1}),Qp=n.defineComponent({...Zp,props:va,setup(e,{expose:t}){const o=e,i=D("popper"),{arrowOffset:r,arrowRef:a,arrowStyle:s}=n.inject(wa,void 0);return n.watch(()=>o.arrowOffset,l=>{r.value=l}),n.onBeforeUnmount(()=>{a.value=void 0}),t({arrowRef:a}),(l,c)=>(n.openBlock(),n.createElementBlock("span",{ref_key:"arrowRef",ref:a,class:n.normalizeClass(n.unref(i).e("arrow")),style:n.normalizeStyle(n.unref(s)),"data-popper-arrow":""},null,6))}});var Xp=F(Qp,[["__file","arrow.vue"]]);const Uo="ElOnlyChild",eh=n.defineComponent({name:Uo,setup(e,{slots:t,attrs:o}){var i;const r=n.inject(ca),a=wp((i=r==null?void 0:r.setForwardRef)!=null?i:Je);return()=>{var s;const l=(s=t.default)==null?void 0:s.call(t,o);if(!l)return null;if(l.length>1)return ne(Uo,"requires exact only one valid child."),null;const c=Sa(l);return c?n.withDirectives(n.cloneVNode(c,o),[[a]]):(ne(Uo,"no valid child node found"),null)}}});function Sa(e){if(!e)return null;const t=e;for(const o of t){if(te(o))switch(o.type){case n.Comment:continue;case n.Text:case"svg":return ka(o);case n.Fragment:return Sa(o.children);default:return o}return ka(o)}return null}function ka(e){const t=D("only-child");return n.createVNode("span",{class:t.e("content")},[e])}const Ea=R({virtualRef:{type:_(Object)},virtualTriggering:Boolean,onMouseenter:{type:_(Function)},onMouseleave:{type:_(Function)},onClick:{type:_(Function)},onKeydown:{type:_(Function)},onFocus:{type:_(Function)},onBlur:{type:_(Function)},onContextmenu:{type:_(Function)},id:String,open:Boolean}),th=n.defineComponent({name:"ElPopperTrigger",inheritAttrs:!1}),nh=n.defineComponent({...th,props:Ea,setup(e,{expose:t}){const o=e,{role:i,triggerRef:r}=n.inject(Ko,void 0);bp(r);const a=n.computed(()=>l.value?o.id:void 0),s=n.computed(()=>{if(i&&i.value==="tooltip")return o.open&&o.id?o.id:void 0}),l=n.computed(()=>{if(i&&i.value!=="tooltip")return i.value}),c=n.computed(()=>l.value?`${o.open}`:void 0);let d;const f=["onMouseenter","onMouseleave","onClick","onKeydown","onFocus","onBlur","onContextmenu"];return n.onMounted(()=>{n.watch(()=>o.virtualRef,u=>{u&&(r.value=Oe(u))},{immediate:!0}),n.watch(r,(u,p)=>{d==null||d(),d=void 0,Xe(u)&&(f.forEach(g=>{var h;const m=o[g];m&&(u.addEventListener(g.slice(2).toLowerCase(),m),(h=p==null?void 0:p.removeEventListener)==null||h.call(p,g.slice(2).toLowerCase(),m))}),d=n.watch([a,s,l,c],g=>{["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach((h,m)=>{Tn(g[m])?u.removeAttribute(h):u.setAttribute(h,g[m])})},{immediate:!0})),Xe(p)&&["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach(g=>p.removeAttribute(g))},{immediate:!0})}),n.onBeforeUnmount(()=>{if(d==null||d(),d=void 0,r.value&&Xe(r.value)){const u=r.value;f.forEach(p=>{const g=o[p];g&&u.removeEventListener(p.slice(2).toLowerCase(),g)}),r.value=void 0}}),t({triggerRef:r}),(u,p)=>u.virtualTriggering?n.createCommentVNode("v-if",!0):(n.openBlock(),n.createBlock(n.unref(eh),n.mergeProps({key:0},u.$attrs,{"aria-controls":n.unref(a),"aria-describedby":n.unref(s),"aria-expanded":n.unref(c),"aria-haspopup":n.unref(l)}),{default:n.withCtx(()=>[n.renderSlot(u.$slots,"default")]),_:3},16,["aria-controls","aria-describedby","aria-expanded","aria-haspopup"]))}});var oh=F(nh,[["__file","trigger.vue"]]);const Wo="focus-trap.focus-after-trapped",qo="focus-trap.focus-after-released",ih="focus-trap.focusout-prevented",Ia={cancelable:!0,bubbles:!1},rh={cancelable:!0,bubbles:!1},Ta="focusAfterTrapped",Aa="focusAfterReleased",Oa=Symbol("elFocusTrap"),Go=n.ref(),$n=n.ref(0),Jo=n.ref(0);let zn=0;const Ma=e=>{const t=[],o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const r=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||r?NodeFilter.FILTER_SKIP:i.tabIndex>=0||i===document.activeElement?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;o.nextNode();)t.push(o.currentNode);return t},xa=(e,t)=>{for(const o of e)if(!ah(o,t))return o},ah=(e,t)=>{if(process.env.NODE_ENV==="test")return!1;if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1},sh=e=>{const t=Ma(e),o=xa(t,e),i=xa(t.reverse(),e);return[o,i]},lh=e=>e instanceof HTMLInputElement&&"select"in e,He=(e,t)=>{if(e&&e.focus){const o=document.activeElement;e.focus({preventScroll:!0}),Jo.value=window.performance.now(),e!==o&&lh(e)&&t&&e.select()}};function Ba(e,t){const o=[...e],i=e.indexOf(t);return i!==-1&&o.splice(i,1),o}const ch=()=>{let e=[];return{push:i=>{const r=e[0];r&&i!==r&&r.pause(),e=Ba(e,i),e.unshift(i)},remove:i=>{var r,a;e=Ba(e,i),(a=(r=e[0])==null?void 0:r.resume)==null||a.call(r)}}},dh=(e,t=!1)=>{const o=document.activeElement;for(const i of e)if(He(i,t),document.activeElement!==o)return},Na=ch(),fh=()=>$n.value>Jo.value,jn=()=>{Go.value="pointer",$n.value=window.performance.now()},_a=()=>{Go.value="keyboard",$n.value=window.performance.now()},uh=()=>(n.onMounted(()=>{zn===0&&(document.addEventListener("mousedown",jn),document.addEventListener("touchstart",jn),document.addEventListener("keydown",_a)),zn++}),n.onBeforeUnmount(()=>{zn--,zn<=0&&(document.removeEventListener("mousedown",jn),document.removeEventListener("touchstart",jn),document.removeEventListener("keydown",_a))}),{focusReason:Go,lastUserFocusTimestamp:$n,lastAutomatedFocusTimestamp:Jo}),Hn=e=>new CustomEvent(ih,{...rh,detail:e}),ph=n.defineComponent({name:"ElFocusTrap",inheritAttrs:!1,props:{loop:Boolean,trapped:Boolean,focusTrapEl:Object,focusStartEl:{type:[Object,String],default:"first"}},emits:[Ta,Aa,"focusin","focusout","focusout-prevented","release-requested"],setup(e,{emit:t}){const o=n.ref();let i,r;const{focusReason:a}=uh();pp(h=>{e.trapped&&!s.paused&&t("release-requested",h)});const s={paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}},l=h=>{if(!e.loop&&!e.trapped||s.paused)return;const{key:m,altKey:y,ctrlKey:b,metaKey:C,currentTarget:I,shiftKey:k}=h,{loop:v}=e,S=m===Wt.tab&&!y&&!b&&!C,E=document.activeElement;if(S&&E){const O=I,[x,N]=sh(O);if(x&&N){if(!k&&E===N){const T=Hn({focusReason:a.value});t("focusout-prevented",T),T.defaultPrevented||(h.preventDefault(),v&&He(x,!0))}else if(k&&[x,O].includes(E)){const T=Hn({focusReason:a.value});t("focusout-prevented",T),T.defaultPrevented||(h.preventDefault(),v&&He(N,!0))}}else if(E===O){const T=Hn({focusReason:a.value});t("focusout-prevented",T),T.defaultPrevented||h.preventDefault()}}};n.provide(Oa,{focusTrapRef:o,onKeydown:l}),n.watch(()=>e.focusTrapEl,h=>{h&&(o.value=h)},{immediate:!0}),n.watch([o],([h],[m])=>{h&&(h.addEventListener("keydown",l),h.addEventListener("focusin",f),h.addEventListener("focusout",u)),m&&(m.removeEventListener("keydown",l),m.removeEventListener("focusin",f),m.removeEventListener("focusout",u))});const c=h=>{t(Ta,h)},d=h=>t(Aa,h),f=h=>{const m=n.unref(o);if(!m)return;const y=h.target,b=h.relatedTarget,C=y&&m.contains(y);e.trapped||b&&m.contains(b)||(i=b),C&&t("focusin",h),!s.paused&&e.trapped&&(C?r=y:He(r,!0))},u=h=>{const m=n.unref(o);if(!(s.paused||!m))if(e.trapped){const y=h.relatedTarget;!Tn(y)&&!m.contains(y)&&setTimeout(()=>{if(!s.paused&&e.trapped){const b=Hn({focusReason:a.value});t("focusout-prevented",b),b.defaultPrevented||He(r,!0)}},0)}else{const y=h.target;y&&m.contains(y)||t("focusout",h)}};async function p(){await n.nextTick();const h=n.unref(o);if(h){Na.push(s);const m=h.contains(document.activeElement)?i:document.activeElement;if(i=m,!h.contains(m)){const b=new Event(Wo,Ia);h.addEventListener(Wo,c),h.dispatchEvent(b),b.defaultPrevented||n.nextTick(()=>{let C=e.focusStartEl;me(C)||(He(C),document.activeElement!==C&&(C="first")),C==="first"&&dh(Ma(h),!0),(document.activeElement===m||C==="container")&&He(h)})}}}function g(){const h=n.unref(o);if(h){h.removeEventListener(Wo,c);const m=new CustomEvent(qo,{...Ia,detail:{focusReason:a.value}});h.addEventListener(qo,d),h.dispatchEvent(m),!m.defaultPrevented&&(a.value=="keyboard"||!fh()||h.contains(document.activeElement))&&He(i??document.body),h.removeEventListener(qo,d),Na.remove(s)}}return n.onMounted(()=>{e.trapped&&p(),n.watch(()=>e.trapped,h=>{h?p():g()})}),n.onBeforeUnmount(()=>{e.trapped&&g(),o.value&&(o.value.removeEventListener("keydown",l),o.value.removeEventListener("focusin",f),o.value.removeEventListener("focusout",u),o.value=void 0)}),{onKeydown:l}}});function hh(e,t,o,i,r,a){return n.renderSlot(e.$slots,"default",{handleKeydown:e.onKeydown})}var La=F(ph,[["render",hh],["__file","focus-trap.vue"]]);const mh=["fixed","absolute"],gh=R({boundariesPadding:{type:Number,default:0},fallbackPlacements:{type:_(Array),default:void 0},gpuAcceleration:{type:Boolean,default:!0},offset:{type:Number,default:12},placement:{type:String,values:xn,default:"bottom"},popperOptions:{type:_(Object),default:()=>({})},strategy:{type:String,values:mh,default:"absolute"}}),Pa=R({...gh,id:String,style:{type:_([String,Array,Object])},className:{type:_([String,Array,Object])},effect:{type:_(String),default:"dark"},visible:Boolean,enterable:{type:Boolean,default:!0},pure:Boolean,focusOnShow:{type:Boolean,default:!1},trapping:{type:Boolean,default:!1},popperClass:{type:_([String,Array,Object])},popperStyle:{type:_([String,Array,Object])},referenceEl:{type:_(Object)},triggerTargetEl:{type:_(Object)},stopPopperMouseEvent:{type:Boolean,default:!0},virtualTriggering:Boolean,zIndex:Number,...rt(["ariaLabel"])}),yh={mouseenter:e=>e instanceof MouseEvent,mouseleave:e=>e instanceof MouseEvent,focus:()=>!0,blur:()=>!0,close:()=>!0},bh=(e,t=[])=>{const{placement:o,strategy:i,popperOptions:r}=e,a={placement:o,strategy:i,...r,modifiers:[...Ch(e),...t]};return vh(a,r==null?void 0:r.modifiers),a},wh=e=>{if(K)return Oe(e)};function Ch(e){const{offset:t,gpuAcceleration:o,fallbackPlacements:i}=e;return[{name:"offset",options:{offset:[0,t??12]}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5,fallbackPlacements:i}},{name:"computeStyles",options:{gpuAcceleration:o}}]}function vh(e,t){t&&(e.modifiers=[...e.modifiers,...t??[]])}const Sh=0,kh=e=>{const{popperInstanceRef:t,contentRef:o,triggerRef:i,role:r}=n.inject(Ko,void 0),a=n.ref(),s=n.ref(),l=n.computed(()=>({name:"eventListeners",enabled:!!e.visible})),c=n.computed(()=>{var b;const C=n.unref(a),I=(b=n.unref(s))!=null?b:Sh;return{name:"arrow",enabled:!Ir(C),options:{element:C,padding:I}}}),d=n.computed(()=>({onFirstUpdate:()=>{h()},...bh(e,[n.unref(c),n.unref(l)])})),f=n.computed(()=>wh(e.referenceEl)||n.unref(i)),{attributes:u,state:p,styles:g,update:h,forceUpdate:m,instanceRef:y}=dp(f,o,d);return n.watch(y,b=>t.value=b),n.onMounted(()=>{n.watch(()=>{var b;return(b=n.unref(f))==null?void 0:b.getBoundingClientRect()},()=>{h()})}),{attributes:u,arrowRef:a,contentRef:o,instanceRef:y,state:p,styles:g,role:r,forceUpdate:m,update:h}},Eh=(e,{attributes:t,styles:o,role:i})=>{const{nextZIndex:r}=$o(),a=D("popper"),s=n.computed(()=>n.unref(t).popper),l=n.ref(G(e.zIndex)?e.zIndex:r()),c=n.computed(()=>[a.b(),a.is("pure",e.pure),a.is(e.effect),e.popperClass]),d=n.computed(()=>[{zIndex:n.unref(l)},n.unref(o).popper,e.popperStyle||{}]),f=n.computed(()=>i.value==="dialog"?"false":void 0),u=n.computed(()=>n.unref(o).arrow||{});return{ariaModal:f,arrowStyle:u,contentAttrs:s,contentClass:c,contentStyle:d,contentZIndex:l,updateZIndex:()=>{l.value=G(e.zIndex)?e.zIndex:r()}}},Ih=(e,t)=>{const o=n.ref(!1),i=n.ref();return{focusStartRef:i,trapped:o,onFocusAfterReleased:d=>{var f;((f=d.detail)==null?void 0:f.focusReason)!=="pointer"&&(i.value="first",t("blur"))},onFocusAfterTrapped:()=>{t("focus")},onFocusInTrap:d=>{e.visible&&!o.value&&(d.target&&(i.value=d.target),o.value=!0)},onFocusoutPrevented:d=>{e.trapping||(d.detail.focusReason==="pointer"&&d.preventDefault(),o.value=!1)},onReleaseRequested:()=>{o.value=!1,t("close")}}},Th=n.defineComponent({name:"ElPopperContent"}),Ah=n.defineComponent({...Th,props:Pa,emits:yh,setup(e,{expose:t,emit:o}){const i=e,{focusStartRef:r,trapped:a,onFocusAfterReleased:s,onFocusAfterTrapped:l,onFocusInTrap:c,onFocusoutPrevented:d,onReleaseRequested:f}=Ih(i,o),{attributes:u,arrowRef:p,contentRef:g,styles:h,instanceRef:m,role:y,update:b}=kh(i),{ariaModal:C,arrowStyle:I,contentAttrs:k,contentClass:v,contentStyle:S,updateZIndex:E}=Eh(i,{styles:h,attributes:u,role:y}),O=n.inject(Rn,void 0),x=n.ref();n.provide(wa,{arrowStyle:I,arrowRef:p,arrowOffset:x}),O&&n.provide(Rn,{...O,addInputId:Je,removeInputId:Je});let N;const B=(L=!0)=>{b(),L&&E()},T=()=>{B(!1),i.visible&&i.focusOnShow?a.value=!0:i.visible===!1&&(a.value=!1)};return n.onMounted(()=>{n.watch(()=>i.triggerTargetEl,(L,q)=>{N==null||N(),N=void 0;const V=n.unref(L||g.value),M=n.unref(q||g.value);Xe(V)&&(N=n.watch([y,()=>i.ariaLabel,C,()=>i.id],$=>{["role","aria-label","aria-modal","id"].forEach((pe,Y)=>{Tn($[Y])?V.removeAttribute(pe):V.setAttribute(pe,$[Y])})},{immediate:!0})),M!==V&&Xe(M)&&["role","aria-label","aria-modal","id"].forEach($=>{M.removeAttribute($)})},{immediate:!0}),n.watch(()=>i.visible,T,{immediate:!0})}),n.onBeforeUnmount(()=>{N==null||N(),N=void 0}),t({popperContentRef:g,popperInstanceRef:m,updatePopper:B,contentStyle:S}),(L,q)=>(n.openBlock(),n.createElementBlock("div",n.mergeProps({ref_key:"contentRef",ref:g},n.unref(k),{style:n.unref(S),class:n.unref(v),tabindex:"-1",onMouseenter:V=>L.$emit("mouseenter",V),onMouseleave:V=>L.$emit("mouseleave",V)}),[n.createVNode(n.unref(La),{trapped:n.unref(a),"trap-on-focus-in":!0,"focus-trap-el":n.unref(g),"focus-start-el":n.unref(r),onFocusAfterTrapped:n.unref(l),onFocusAfterReleased:n.unref(s),onFocusin:n.unref(c),onFocusoutPrevented:n.unref(d),onReleaseRequested:n.unref(f)},{default:n.withCtx(()=>[n.renderSlot(L.$slots,"default")]),_:3},8,["trapped","focus-trap-el","focus-start-el","onFocusAfterTrapped","onFocusAfterReleased","onFocusin","onFocusoutPrevented","onReleaseRequested"])],16,["onMouseenter","onMouseleave"]))}});var Oh=F(Ah,[["__file","content.vue"]]);const Mh=oe(Yp),Yo=Symbol("elTooltip"),se=R({...gp,...Pa,appendTo:{type:_([String,Object])},content:{type:String,default:""},rawContent:Boolean,persistent:Boolean,visible:{type:_(Boolean),default:null},transition:String,teleported:{type:Boolean,default:!0},disabled:Boolean,...rt(["ariaLabel"])}),nn=R({...Ea,disabled:Boolean,trigger:{type:_([String,Array]),default:"hover"},triggerKeys:{type:_(Array),default:()=>[Wt.enter,Wt.space]}}),{useModelToggleProps:xh,useModelToggleEmits:Bh,useModelToggle:Nh}=su("visible"),_h=R({...Ca,...xh,...se,...nn,...va,showArrow:{type:Boolean,default:!0}}),Lh=[...Bh,"before-show","before-hide","show","hide","open","close"],Ph=(e,t)=>ee(e)?e.includes(t):e===t,Ot=(e,t,o)=>i=>{Ph(n.unref(e),t)&&o(i)},Vh=n.defineComponent({name:"ElTooltipTrigger"}),Rh=n.defineComponent({...Vh,props:nn,setup(e,{expose:t}){const o=e,i=D("tooltip"),{controlled:r,id:a,open:s,onOpen:l,onClose:c,onToggle:d}=n.inject(Yo,void 0),f=n.ref(null),u=()=>{if(n.unref(r)||o.disabled)return!0},p=n.toRef(o,"trigger"),g=Ae(u,Ot(p,"hover",l)),h=Ae(u,Ot(p,"hover",c)),m=Ae(u,Ot(p,"click",k=>{k.button===0&&d(k)})),y=Ae(u,Ot(p,"focus",l)),b=Ae(u,Ot(p,"focus",c)),C=Ae(u,Ot(p,"contextmenu",k=>{k.preventDefault(),d(k)})),I=Ae(u,k=>{const{code:v}=k;o.triggerKeys.includes(v)&&(k.preventDefault(),d(k))});return t({triggerRef:f}),(k,v)=>(n.openBlock(),n.createBlock(n.unref(oh),{id:n.unref(a),"virtual-ref":k.virtualRef,open:n.unref(s),"virtual-triggering":k.virtualTriggering,class:n.normalizeClass(n.unref(i).e("trigger")),onBlur:n.unref(b),onClick:n.unref(m),onContextmenu:n.unref(C),onFocus:n.unref(y),onMouseenter:n.unref(g),onMouseleave:n.unref(h),onKeydown:n.unref(I)},{default:n.withCtx(()=>[n.renderSlot(k.$slots,"default")]),_:3},8,["id","virtual-ref","open","virtual-triggering","class","onBlur","onClick","onContextmenu","onFocus","onMouseenter","onMouseleave","onKeydown"]))}});var Fh=F(Rh,[["__file","trigger.vue"]]);const Dh=R({to:{type:_([String,Object]),required:!0},disabled:Boolean});var $h=F(n.defineComponent({__name:"teleport",props:Dh,setup(e){return(t,o)=>t.disabled?n.renderSlot(t.$slots,"default",{key:0}):(n.openBlock(),n.createBlock(n.Teleport,{key:1,to:t.to},[n.renderSlot(t.$slots,"default")],8,["to"]))}}),[["__file","teleport.vue"]]);const Va=oe($h),zh=n.defineComponent({name:"ElTooltipContent",inheritAttrs:!1}),jh=n.defineComponent({...zh,props:se,setup(e,{expose:t}){const o=e,{selector:i}=la(),r=D("tooltip"),a=n.ref(null);let s;const{controlled:l,id:c,open:d,trigger:f,onClose:u,onOpen:p,onShow:g,onHide:h,onBeforeShow:m,onBeforeHide:y}=n.inject(Yo,void 0),b=n.computed(()=>o.transition||`${r.namespace.value}-fade-in-linear`),C=n.computed(()=>process.env.NODE_ENV==="test"?!0:o.persistent);n.onBeforeUnmount(()=>{s==null||s()});const I=n.computed(()=>n.unref(C)?!0:n.unref(d)),k=n.computed(()=>o.disabled?!1:n.unref(d)),v=n.computed(()=>o.appendTo||i.value),S=n.computed(()=>{var M;return(M=o.style)!=null?M:{}}),E=n.ref(!0),O=()=>{h(),E.value=!0},x=()=>{if(n.unref(l))return!0},N=Ae(x,()=>{o.enterable&&n.unref(f)==="hover"&&p()}),B=Ae(x,()=>{n.unref(f)==="hover"&&u()}),T=()=>{var M,$;($=(M=a.value)==null?void 0:M.updatePopper)==null||$.call(M),m==null||m()},L=()=>{y==null||y()},q=()=>{g(),s=Ls(n.computed(()=>{var M;return(M=a.value)==null?void 0:M.popperContentRef}),()=>{if(n.unref(l))return;n.unref(f)!=="hover"&&u()})},V=()=>{o.virtualTriggering||u()};return n.watch(()=>n.unref(d),M=>{M?E.value=!1:s==null||s()},{flush:"post"}),n.watch(()=>o.content,()=>{var M,$;($=(M=a.value)==null?void 0:M.updatePopper)==null||$.call(M)}),t({contentRef:a}),(M,$)=>(n.openBlock(),n.createBlock(n.unref(Va),{disabled:!M.teleported,to:n.unref(v)},{default:n.withCtx(()=>[n.createVNode(n.Transition,{name:n.unref(b),onAfterLeave:O,onBeforeEnter:T,onAfterEnter:q,onBeforeLeave:L},{default:n.withCtx(()=>[n.unref(I)?n.withDirectives((n.openBlock(),n.createBlock(n.unref(Oh),n.mergeProps({key:0,id:n.unref(c),ref_key:"contentRef",ref:a},M.$attrs,{"aria-label":M.ariaLabel,"aria-hidden":E.value,"boundaries-padding":M.boundariesPadding,"fallback-placements":M.fallbackPlacements,"gpu-acceleration":M.gpuAcceleration,offset:M.offset,placement:M.placement,"popper-options":M.popperOptions,strategy:M.strategy,effect:M.effect,enterable:M.enterable,pure:M.pure,"popper-class":M.popperClass,"popper-style":[M.popperStyle,n.unref(S)],"reference-el":M.referenceEl,"trigger-target-el":M.triggerTargetEl,visible:n.unref(k),"z-index":M.zIndex,onMouseenter:n.unref(N),onMouseleave:n.unref(B),onBlur:V,onClose:n.unref(u)}),{default:n.withCtx(()=>[n.renderSlot(M.$slots,"default")]),_:3},16,["id","aria-label","aria-hidden","boundaries-padding","fallback-placements","gpu-acceleration","offset","placement","popper-options","strategy","effect","enterable","pure","popper-class","popper-style","reference-el","trigger-target-el","visible","z-index","onMouseenter","onMouseleave","onClose"])),[[n.vShow,n.unref(k)]]):n.createCommentVNode("v-if",!0)]),_:3},8,["name"])]),_:3},8,["disabled","to"]))}});var Hh=F(jh,[["__file","content.vue"]]);const Kh=n.defineComponent({name:"ElTooltip"}),Uh=n.defineComponent({...Kh,props:_h,emits:Lh,setup(e,{expose:t,emit:o}){const i=e;mp();const r=it(),a=n.ref(),s=n.ref(),l=()=>{var b;const C=n.unref(a);C&&((b=C.popperInstanceRef)==null||b.update())},c=n.ref(!1),d=n.ref(),{show:f,hide:u,hasUpdateHandler:p}=Nh({indicator:c,toggleReason:d}),{onOpen:g,onClose:h}=yp({showAfter:n.toRef(i,"showAfter"),hideAfter:n.toRef(i,"hideAfter"),autoClose:n.toRef(i,"autoClose"),open:f,close:u}),m=n.computed(()=>_e(i.visible)&&!p.value);n.provide(Yo,{controlled:m,id:r,open:n.readonly(c),trigger:n.toRef(i,"trigger"),onOpen:b=>{g(b)},onClose:b=>{h(b)},onToggle:b=>{n.unref(c)?h(b):g(b)},onShow:()=>{o("show",d.value)},onHide:()=>{o("hide",d.value)},onBeforeShow:()=>{o("before-show",d.value)},onBeforeHide:()=>{o("before-hide",d.value)},updatePopper:l}),n.watch(()=>i.disabled,b=>{b&&c.value&&(c.value=!1)});const y=b=>{var C,I;const k=(I=(C=s.value)==null?void 0:C.contentRef)==null?void 0:I.popperContentRef,v=(b==null?void 0:b.relatedTarget)||document.activeElement;return k&&k.contains(v)};return n.onDeactivated(()=>c.value&&u()),t({popperRef:a,contentRef:s,isFocusInsideContent:y,updatePopper:l,onOpen:g,onClose:h,hide:u}),(b,C)=>(n.openBlock(),n.createBlock(n.unref(Mh),{ref_key:"popperRef",ref:a,role:b.role},{default:n.withCtx(()=>[n.createVNode(Fh,{disabled:b.disabled,trigger:b.trigger,"trigger-keys":b.triggerKeys,"virtual-ref":b.virtualRef,"virtual-triggering":b.virtualTriggering},{default:n.withCtx(()=>[b.$slots.default?n.renderSlot(b.$slots,"default",{key:0}):n.createCommentVNode("v-if",!0)]),_:3},8,["disabled","trigger","trigger-keys","virtual-ref","virtual-triggering"]),n.createVNode(Hh,{ref_key:"contentRef",ref:s,"aria-label":b.ariaLabel,"boundaries-padding":b.boundariesPadding,content:b.content,disabled:b.disabled,effect:b.effect,enterable:b.enterable,"fallback-placements":b.fallbackPlacements,"hide-after":b.hideAfter,"gpu-acceleration":b.gpuAcceleration,offset:b.offset,persistent:b.persistent,"popper-class":b.popperClass,"popper-style":b.popperStyle,placement:b.placement,"popper-options":b.popperOptions,pure:b.pure,"raw-content":b.rawContent,"reference-el":b.referenceEl,"trigger-target-el":b.triggerTargetEl,"show-after":b.showAfter,strategy:b.strategy,teleported:b.teleported,transition:b.transition,"virtual-triggering":b.virtualTriggering,"z-index":b.zIndex,"append-to":b.appendTo},{default:n.withCtx(()=>[n.renderSlot(b.$slots,"content",{},()=>[b.rawContent?(n.openBlock(),n.createElementBlock("span",{key:0,innerHTML:b.content},null,8,["innerHTML"])):(n.openBlock(),n.createElementBlock("span",{key:1},n.toDisplayString(b.content),1))]),b.showArrow?(n.openBlock(),n.createBlock(n.unref(Xp),{key:0,"arrow-offset":b.arrowOffset},null,8,["arrow-offset"])):n.createCommentVNode("v-if",!0)]),_:3},8,["aria-label","boundaries-padding","content","disabled","effect","enterable","fallback-placements","hide-after","gpu-acceleration","offset","persistent","popper-class","popper-style","placement","popper-options","pure","raw-content","reference-el","trigger-target-el","show-after","strategy","teleported","transition","virtual-triggering","z-index","append-to"])]),_:3},8,["role"]))}});var Wh=F(Uh,[["__file","tooltip.vue"]]);const Ra=oe(Wh),Fa=Symbol("buttonGroupContextKey"),qh=(e,t)=>{yt({from:"type.text",replacement:"link",version:"3.0.0",scope:"props",ref:"https://element-plus.org/en-US/component/button.html#button-attributes"},n.computed(()=>e.type==="text"));const o=n.inject(Fa,void 0),i=Vn("button"),{form:r}=Tt(),a=It(n.computed(()=>o==null?void 0:o.size)),s=Fn(),l=n.ref(),c=n.useSlots(),d=n.computed(()=>e.type||(o==null?void 0:o.type)||""),f=n.computed(()=>{var h,m,y;return(y=(m=e.autoInsertSpace)!=null?m:(h=i.value)==null?void 0:h.autoInsertSpace)!=null?y:!1}),u=n.computed(()=>e.tag==="button"?{ariaDisabled:s.value||e.loading,disabled:s.value||e.loading,autofocus:e.autofocus,type:e.nativeType}:{}),p=n.computed(()=>{var h;const m=(h=c.default)==null?void 0:h.call(c);if(f.value&&(m==null?void 0:m.length)===1){const y=m[0];if((y==null?void 0:y.type)===n.Text){const b=y.children;return new RegExp("^\\p{Unified_Ideograph}{2}$","u").test(b.trim())}}return!1});return{_disabled:s,_size:a,_type:d,_ref:l,_props:u,shouldAddSpace:p,handleClick:h=>{if(s.value||e.loading){h.stopPropagation();return}e.nativeType==="reset"&&(r==null||r.resetFields()),t("click",h)}}},Zo=R({size:Et,disabled:Boolean,type:{type:String,values:["default","primary","success","warning","info","danger","text",""],default:""},icon:{type:gt},nativeType:{type:String,values:["button","submit","reset"],default:"button"},loading:Boolean,loadingIcon:{type:gt,default:()=>W.Loading},plain:Boolean,text:Boolean,link:Boolean,bg:Boolean,autofocus:Boolean,round:Boolean,circle:Boolean,color:String,dark:Boolean,autoInsertSpace:{type:Boolean,default:void 0},tag:{type:_([String,Object]),default:"button"}}),Gh={click:e=>e instanceof MouseEvent};function J(e,t){Jh(e)&&(e="100%");var o=Yh(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),o&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function Kn(e){return Math.min(1,Math.max(0,e))}function Jh(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function Yh(e){return typeof e=="string"&&e.indexOf("%")!==-1}function Da(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Un(e){return e<=1?"".concat(Number(e)*100,"%"):e}function at(e){return e.length===1?"0"+e:String(e)}function Zh(e,t,o){return{r:J(e,255)*255,g:J(t,255)*255,b:J(o,255)*255}}function $a(e,t,o){e=J(e,255),t=J(t,255),o=J(o,255);var i=Math.max(e,t,o),r=Math.min(e,t,o),a=0,s=0,l=(i+r)/2;if(i===r)s=0,a=0;else{var c=i-r;switch(s=l>.5?c/(2-i-r):c/(i+r),i){case e:a=(t-o)/c+(t<o?6:0);break;case t:a=(o-e)/c+2;break;case o:a=(e-t)/c+4;break}a/=6}return{h:a,s,l}}function Qo(e,t,o){return o<0&&(o+=1),o>1&&(o-=1),o<1/6?e+(t-e)*(6*o):o<1/2?t:o<2/3?e+(t-e)*(2/3-o)*6:e}function Qh(e,t,o){var i,r,a;if(e=J(e,360),t=J(t,100),o=J(o,100),t===0)r=o,a=o,i=o;else{var s=o<.5?o*(1+t):o+t-o*t,l=2*o-s;i=Qo(l,s,e+1/3),r=Qo(l,s,e),a=Qo(l,s,e-1/3)}return{r:i*255,g:r*255,b:a*255}}function za(e,t,o){e=J(e,255),t=J(t,255),o=J(o,255);var i=Math.max(e,t,o),r=Math.min(e,t,o),a=0,s=i,l=i-r,c=i===0?0:l/i;if(i===r)a=0;else{switch(i){case e:a=(t-o)/l+(t<o?6:0);break;case t:a=(o-e)/l+2;break;case o:a=(e-t)/l+4;break}a/=6}return{h:a,s:c,v:s}}function Xh(e,t,o){e=J(e,360)*6,t=J(t,100),o=J(o,100);var i=Math.floor(e),r=e-i,a=o*(1-t),s=o*(1-r*t),l=o*(1-(1-r)*t),c=i%6,d=[o,s,a,a,l,o][c],f=[l,o,o,s,a,a][c],u=[a,a,l,o,o,s][c];return{r:d*255,g:f*255,b:u*255}}function ja(e,t,o,i){var r=[at(Math.round(e).toString(16)),at(Math.round(t).toString(16)),at(Math.round(o).toString(16))];return i&&r[0].startsWith(r[0].charAt(1))&&r[1].startsWith(r[1].charAt(1))&&r[2].startsWith(r[2].charAt(1))?r[0].charAt(0)+r[1].charAt(0)+r[2].charAt(0):r.join("")}function em(e,t,o,i,r){var a=[at(Math.round(e).toString(16)),at(Math.round(t).toString(16)),at(Math.round(o).toString(16)),at(tm(i))];return r&&a[0].startsWith(a[0].charAt(1))&&a[1].startsWith(a[1].charAt(1))&&a[2].startsWith(a[2].charAt(1))&&a[3].startsWith(a[3].charAt(1))?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}function tm(e){return Math.round(parseFloat(e)*255).toString(16)}function Ha(e){return le(e)/255}function le(e){return parseInt(e,16)}function nm(e){return{r:e>>16,g:(e&65280)>>8,b:e&255}}var Xo={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function om(e){var t={r:0,g:0,b:0},o=1,i=null,r=null,a=null,s=!1,l=!1;return typeof e=="string"&&(e=am(e)),typeof e=="object"&&(Pe(e.r)&&Pe(e.g)&&Pe(e.b)?(t=Zh(e.r,e.g,e.b),s=!0,l=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Pe(e.h)&&Pe(e.s)&&Pe(e.v)?(i=Un(e.s),r=Un(e.v),t=Xh(e.h,i,r),s=!0,l="hsv"):Pe(e.h)&&Pe(e.s)&&Pe(e.l)&&(i=Un(e.s),a=Un(e.l),t=Qh(e.h,i,a),s=!0,l="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(o=e.a)),o=Da(o),{ok:s,format:e.format||l,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:o}}var im="[-\\+]?\\d+%?",rm="[-\\+]?\\d*\\.\\d+%?",Ke="(?:".concat(rm,")|(?:").concat(im,")"),ei="[\\s|\\(]+(".concat(Ke,")[,|\\s]+(").concat(Ke,")[,|\\s]+(").concat(Ke,")\\s*\\)?"),ti="[\\s|\\(]+(".concat(Ke,")[,|\\s]+(").concat(Ke,")[,|\\s]+(").concat(Ke,")[,|\\s]+(").concat(Ke,")\\s*\\)?"),we={CSS_UNIT:new RegExp(Ke),rgb:new RegExp("rgb"+ei),rgba:new RegExp("rgba"+ti),hsl:new RegExp("hsl"+ei),hsla:new RegExp("hsla"+ti),hsv:new RegExp("hsv"+ei),hsva:new RegExp("hsva"+ti),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function am(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(Xo[e])e=Xo[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var o=we.rgb.exec(e);return o?{r:o[1],g:o[2],b:o[3]}:(o=we.rgba.exec(e),o?{r:o[1],g:o[2],b:o[3],a:o[4]}:(o=we.hsl.exec(e),o?{h:o[1],s:o[2],l:o[3]}:(o=we.hsla.exec(e),o?{h:o[1],s:o[2],l:o[3],a:o[4]}:(o=we.hsv.exec(e),o?{h:o[1],s:o[2],v:o[3]}:(o=we.hsva.exec(e),o?{h:o[1],s:o[2],v:o[3],a:o[4]}:(o=we.hex8.exec(e),o?{r:le(o[1]),g:le(o[2]),b:le(o[3]),a:Ha(o[4]),format:t?"name":"hex8"}:(o=we.hex6.exec(e),o?{r:le(o[1]),g:le(o[2]),b:le(o[3]),format:t?"name":"hex"}:(o=we.hex4.exec(e),o?{r:le(o[1]+o[1]),g:le(o[2]+o[2]),b:le(o[3]+o[3]),a:Ha(o[4]+o[4]),format:t?"name":"hex8"}:(o=we.hex3.exec(e),o?{r:le(o[1]+o[1]),g:le(o[2]+o[2]),b:le(o[3]+o[3]),format:t?"name":"hex"}:!1)))))))))}function Pe(e){return!!we.CSS_UNIT.exec(String(e))}var sm=function(){function e(t,o){t===void 0&&(t=""),o===void 0&&(o={});var i;if(t instanceof e)return t;typeof t=="number"&&(t=nm(t)),this.originalInput=t;var r=om(t);this.originalInput=t,this.r=r.r,this.g=r.g,this.b=r.b,this.a=r.a,this.roundA=Math.round(100*this.a)/100,this.format=(i=o.format)!==null&&i!==void 0?i:r.format,this.gradientType=o.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=r.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),o,i,r,a=t.r/255,s=t.g/255,l=t.b/255;return a<=.03928?o=a/12.92:o=Math.pow((a+.055)/1.055,2.4),s<=.03928?i=s/12.92:i=Math.pow((s+.055)/1.055,2.4),l<=.03928?r=l/12.92:r=Math.pow((l+.055)/1.055,2.4),.2126*o+.7152*i+.0722*r},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=Da(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.isMonochrome=function(){var t=this.toHsl().s;return t===0},e.prototype.toHsv=function(){var t=za(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=za(this.r,this.g,this.b),o=Math.round(t.h*360),i=Math.round(t.s*100),r=Math.round(t.v*100);return this.a===1?"hsv(".concat(o,", ").concat(i,"%, ").concat(r,"%)"):"hsva(".concat(o,", ").concat(i,"%, ").concat(r,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=$a(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=$a(this.r,this.g,this.b),o=Math.round(t.h*360),i=Math.round(t.s*100),r=Math.round(t.l*100);return this.a===1?"hsl(".concat(o,", ").concat(i,"%, ").concat(r,"%)"):"hsla(".concat(o,", ").concat(i,"%, ").concat(r,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),ja(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),em(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toHexShortString=function(t){return t===void 0&&(t=!1),this.a===1?this.toHexString(t):this.toHex8String(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),o=Math.round(this.g),i=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(o,", ").concat(i,")"):"rgba(".concat(t,", ").concat(o,", ").concat(i,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(o){return"".concat(Math.round(J(o,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(o){return Math.round(J(o,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+ja(this.r,this.g,this.b,!1),o=0,i=Object.entries(Xo);o<i.length;o++){var r=i[o],a=r[0],s=r[1];if(t===s)return a}return!1},e.prototype.toString=function(t){var o=!!t;t=t??this.format;var i=!1,r=this.a<1&&this.a>=0,a=!o&&r&&(t.startsWith("hex")||t==="name");return a?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(i=this.toRgbString()),t==="prgb"&&(i=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(i=this.toHexString()),t==="hex3"&&(i=this.toHexString(!0)),t==="hex4"&&(i=this.toHex8String(!0)),t==="hex8"&&(i=this.toHex8String()),t==="name"&&(i=this.toName()),t==="hsl"&&(i=this.toHslString()),t==="hsv"&&(i=this.toHsvString()),i||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var o=this.toHsl();return o.l+=t/100,o.l=Kn(o.l),new e(o)},e.prototype.brighten=function(t){t===void 0&&(t=10);var o=this.toRgb();return o.r=Math.max(0,Math.min(255,o.r-Math.round(255*-(t/100)))),o.g=Math.max(0,Math.min(255,o.g-Math.round(255*-(t/100)))),o.b=Math.max(0,Math.min(255,o.b-Math.round(255*-(t/100)))),new e(o)},e.prototype.darken=function(t){t===void 0&&(t=10);var o=this.toHsl();return o.l-=t/100,o.l=Kn(o.l),new e(o)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var o=this.toHsl();return o.s-=t/100,o.s=Kn(o.s),new e(o)},e.prototype.saturate=function(t){t===void 0&&(t=10);var o=this.toHsl();return o.s+=t/100,o.s=Kn(o.s),new e(o)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var o=this.toHsl(),i=(o.h+t)%360;return o.h=i<0?360+i:i,new e(o)},e.prototype.mix=function(t,o){o===void 0&&(o=50);var i=this.toRgb(),r=new e(t).toRgb(),a=o/100,s={r:(r.r-i.r)*a+i.r,g:(r.g-i.g)*a+i.g,b:(r.b-i.b)*a+i.b,a:(r.a-i.a)*a+i.a};return new e(s)},e.prototype.analogous=function(t,o){t===void 0&&(t=6),o===void 0&&(o=30);var i=this.toHsl(),r=360/o,a=[this];for(i.h=(i.h-(r*t>>1)+720)%360;--t;)i.h=(i.h+r)%360,a.push(new e(i));return a},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var o=this.toHsv(),i=o.h,r=o.s,a=o.v,s=[],l=1/t;t--;)s.push(new e({h:i,s:r,v:a})),a=(a+l)%1;return s},e.prototype.splitcomplement=function(){var t=this.toHsl(),o=t.h;return[this,new e({h:(o+72)%360,s:t.s,l:t.l}),new e({h:(o+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var o=this.toRgb(),i=new e(t).toRgb(),r=o.a+i.a*(1-o.a);return new e({r:(o.r*o.a+i.r*i.a*(1-o.a))/r,g:(o.g*o.a+i.g*i.a*(1-o.a))/r,b:(o.b*o.a+i.b*i.a*(1-o.a))/r,a:r})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var o=this.toHsl(),i=o.h,r=[this],a=360/t,s=1;s<t;s++)r.push(new e({h:(i+s*a)%360,s:o.s,l:o.l}));return r},e.prototype.equals=function(t){return this.toRgbString()===new e(t).toRgbString()},e}();function Ue(e,t=20){return e.mix("#141414",t).toString()}function lm(e){const t=Fn(),o=D("button");return n.computed(()=>{let i={},r=e.color;if(r){const a=r.match(/var\((.*?)\)/);a&&(r=window.getComputedStyle(window.document.documentElement).getPropertyValue(a[1]));const s=new sm(r),l=e.dark?s.tint(20).toString():Ue(s,20);if(e.plain)i=o.cssVarBlock({"bg-color":e.dark?Ue(s,90):s.tint(90).toString(),"text-color":r,"border-color":e.dark?Ue(s,50):s.tint(50).toString(),"hover-text-color":`var(${o.cssVarName("color-white")})`,"hover-bg-color":r,"hover-border-color":r,"active-bg-color":l,"active-text-color":`var(${o.cssVarName("color-white")})`,"active-border-color":l}),t.value&&(i[o.cssVarBlockName("disabled-bg-color")]=e.dark?Ue(s,90):s.tint(90).toString(),i[o.cssVarBlockName("disabled-text-color")]=e.dark?Ue(s,50):s.tint(50).toString(),i[o.cssVarBlockName("disabled-border-color")]=e.dark?Ue(s,80):s.tint(80).toString());else{const c=e.dark?Ue(s,30):s.tint(30).toString(),d=s.isDark()?`var(${o.cssVarName("color-white")})`:`var(${o.cssVarName("color-black")})`;if(i=o.cssVarBlock({"bg-color":r,"text-color":d,"border-color":r,"hover-bg-color":c,"hover-text-color":d,"hover-border-color":c,"active-bg-color":l,"active-border-color":l}),t.value){const f=e.dark?Ue(s,50):s.tint(50).toString();i[o.cssVarBlockName("disabled-bg-color")]=f,i[o.cssVarBlockName("disabled-text-color")]=e.dark?"rgba(255, 255, 255, 0.5)":`var(${o.cssVarName("color-white")})`,i[o.cssVarBlockName("disabled-border-color")]=f}}}return i})}const cm=n.defineComponent({name:"ElButton"}),dm=n.defineComponent({...cm,props:Zo,emits:Gh,setup(e,{expose:t,emit:o}){const i=e,r=lm(i),a=D("button"),{_ref:s,_size:l,_type:c,_disabled:d,_props:f,shouldAddSpace:u,handleClick:p}=qh(i,o),g=n.computed(()=>[a.b(),a.m(c.value),a.m(l.value),a.is("disabled",d.value),a.is("loading",i.loading),a.is("plain",i.plain),a.is("round",i.round),a.is("circle",i.circle),a.is("text",i.text),a.is("link",i.link),a.is("has-bg",i.bg)]);return t({ref:s,size:l,type:c,disabled:d,shouldAddSpace:u}),(h,m)=>(n.openBlock(),n.createBlock(n.resolveDynamicComponent(h.tag),n.mergeProps({ref_key:"_ref",ref:s},n.unref(f),{class:n.unref(g),style:n.unref(r),onClick:n.unref(p)}),{default:n.withCtx(()=>[h.loading?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[h.$slots.loading?n.renderSlot(h.$slots,"loading",{key:0}):(n.openBlock(),n.createBlock(n.unref(be),{key:1,class:n.normalizeClass(n.unref(a).is("loading"))},{default:n.withCtx(()=>[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(h.loadingIcon)))]),_:1},8,["class"]))],64)):h.icon||h.$slots.icon?(n.openBlock(),n.createBlock(n.unref(be),{key:1},{default:n.withCtx(()=>[h.icon?(n.openBlock(),n.createBlock(n.resolveDynamicComponent(h.icon),{key:0})):n.renderSlot(h.$slots,"icon",{key:1})]),_:3})):n.createCommentVNode("v-if",!0),h.$slots.default?(n.openBlock(),n.createElementBlock("span",{key:2,class:n.normalizeClass({[n.unref(a).em("text","expand")]:n.unref(u)})},[n.renderSlot(h.$slots,"default")],2)):n.createCommentVNode("v-if",!0)]),_:3},16,["class","style","onClick"]))}});var fm=F(dm,[["__file","button.vue"]]);const um={size:Zo.size,type:Zo.type},pm=n.defineComponent({name:"ElButtonGroup"}),hm=n.defineComponent({...pm,props:um,setup(e){const t=e;n.provide(Fa,n.reactive({size:n.toRef(t,"size"),type:n.toRef(t,"type")}));const o=D("button");return(i,r)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(n.unref(o).b("group"))},[n.renderSlot(i.$slots,"default")],2))}});var Ka=F(hm,[["__file","button-group.vue"]]);const ni=oe(fm,{ButtonGroup:Ka});tt(Ka);var mm=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function gm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}const We=new Map;if(K){let e;document.addEventListener("mousedown",t=>e=t),document.addEventListener("mouseup",t=>{if(e){for(const o of We.values())for(const{documentHandler:i}of o)i(t,e);e=void 0}})}function Ua(e,t){let o=[];return Array.isArray(t.arg)?o=t.arg:Xe(t.arg)&&o.push(t.arg),function(i,r){const a=t.instance.popperRef,s=i.target,l=r==null?void 0:r.target,c=!t||!t.instance,d=!s||!l,f=e.contains(s)||e.contains(l),u=e===s,p=o.length&&o.some(h=>h==null?void 0:h.contains(s))||o.length&&o.includes(l),g=a&&(a.contains(s)||a.contains(l));c||d||f||u||p||g||t.value(i,r)}}const ym={beforeMount(e,t){We.has(e)||We.set(e,[]),We.get(e).push({documentHandler:Ua(e,t),bindingFn:t.value})},updated(e,t){We.has(e)||We.set(e,[]);const o=We.get(e),i=o.findIndex(a=>a.bindingFn===t.oldValue),r={documentHandler:Ua(e,t),bindingFn:t.value};i>=0?o.splice(i,1,r):o.push(r)},unmounted(e){We.delete(e)}},Wa={modelValue:{type:[Number,String,Boolean],default:void 0},label:{type:[String,Boolean,Number,Object],default:void 0},value:{type:[String,Boolean,Number,Object],default:void 0},indeterminate:Boolean,disabled:Boolean,checked:Boolean,name:{type:String,default:void 0},trueValue:{type:[String,Number],default:void 0},falseValue:{type:[String,Number],default:void 0},trueLabel:{type:[String,Number],default:void 0},falseLabel:{type:[String,Number],default:void 0},id:{type:String,default:void 0},border:Boolean,size:Et,tabindex:[String,Number],validateEvent:{type:Boolean,default:!0},...rt(["ariaControls"])},qa={[X]:e=>me(e)||G(e)||_e(e),change:e=>me(e)||G(e)||_e(e)},Mt=Symbol("checkboxGroupContextKey"),bm=({model:e,isChecked:t})=>{const o=n.inject(Mt,void 0),i=n.computed(()=>{var a,s;const l=(a=o==null?void 0:o.max)==null?void 0:a.value,c=(s=o==null?void 0:o.min)==null?void 0:s.value;return!ze(l)&&e.value.length>=l&&!t.value||!ze(c)&&e.value.length<=c&&t.value});return{isDisabled:Fn(n.computed(()=>(o==null?void 0:o.disabled.value)||i.value)),isLimitDisabled:i}},wm=(e,{model:t,isLimitExceeded:o,hasOwnLabel:i,isDisabled:r,isLabeledByFormItem:a})=>{const s=n.inject(Mt,void 0),{formItem:l}=Tt(),{emit:c}=n.getCurrentInstance();function d(h){var m,y,b,C;return[!0,e.trueValue,e.trueLabel].includes(h)?(y=(m=e.trueValue)!=null?m:e.trueLabel)!=null?y:!0:(C=(b=e.falseValue)!=null?b:e.falseLabel)!=null?C:!1}function f(h,m){c("change",d(h),m)}function u(h){if(o.value)return;const m=h.target;c("change",d(m.checked),h)}async function p(h){o.value||!i.value&&!r.value&&a.value&&(h.composedPath().some(b=>b.tagName==="LABEL")||(t.value=d([!1,e.falseValue,e.falseLabel].includes(t.value)),await n.nextTick(),f(t.value,h)))}const g=n.computed(()=>(s==null?void 0:s.validateEvent)||e.validateEvent);return n.watch(()=>e.modelValue,()=>{g.value&&(l==null||l.validate("change").catch(h=>ne(h)))}),{handleChange:u,onClickRoot:p}},Cm=e=>{const t=n.ref(!1),{emit:o}=n.getCurrentInstance(),i=n.inject(Mt,void 0),r=n.computed(()=>ze(i)===!1),a=n.ref(!1),s=n.computed({get(){var l,c;return r.value?(l=i==null?void 0:i.modelValue)==null?void 0:l.value:(c=e.modelValue)!=null?c:t.value},set(l){var c,d;r.value&&ee(l)?(a.value=((c=i==null?void 0:i.max)==null?void 0:c.value)!==void 0&&l.length>(i==null?void 0:i.max.value)&&l.length>s.value.length,a.value===!1&&((d=i==null?void 0:i.changeEvent)==null||d.call(i,l))):(o(X,l),t.value=l)}});return{model:s,isGroup:r,isLimitExceeded:a}},vm=(e,t,{model:o})=>{const i=n.inject(Mt,void 0),r=n.ref(!1),a=n.computed(()=>Kt(e.value)?e.label:e.value),s=n.computed(()=>{const f=o.value;return _e(f)?f:ee(f)?te(a.value)?f.map(n.toRaw).some(u=>In(u,a.value)):f.map(n.toRaw).includes(a.value):f!=null?f===e.trueValue||f===e.trueLabel:!!f}),l=It(n.computed(()=>{var f;return(f=i==null?void 0:i.size)==null?void 0:f.value}),{prop:!0}),c=It(n.computed(()=>{var f;return(f=i==null?void 0:i.size)==null?void 0:f.value})),d=n.computed(()=>!!t.default||!Kt(a.value));return{checkboxButtonSize:l,isChecked:s,isFocused:r,checkboxSize:c,hasOwnLabel:d,actualValue:a}},Ga=(e,t)=>{const{formItem:o}=Tt(),{model:i,isGroup:r,isLimitExceeded:a}=Cm(e),{isFocused:s,isChecked:l,checkboxButtonSize:c,checkboxSize:d,hasOwnLabel:f,actualValue:u}=vm(e,t,{model:i}),{isDisabled:p}=bm({model:i,isChecked:l}),{inputId:g,isLabeledByFormItem:h}=Dn(e,{formItemContext:o,disableIdGeneration:f,disableIdManagement:r}),{handleChange:m,onClickRoot:y}=wm(e,{model:i,isLimitExceeded:a,hasOwnLabel:f,isDisabled:p,isLabeledByFormItem:h});return(()=>{function C(){var I,k;ee(i.value)&&!i.value.includes(u.value)?i.value.push(u.value):i.value=(k=(I=e.trueValue)!=null?I:e.trueLabel)!=null?k:!0}e.checked&&C()})(),yt({from:"label act as value",replacement:"value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},n.computed(()=>r.value&&Kt(e.value))),yt({from:"true-label",replacement:"true-value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},n.computed(()=>!!e.trueLabel)),yt({from:"false-label",replacement:"false-value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},n.computed(()=>!!e.falseLabel)),{inputId:g,isLabeledByFormItem:h,isChecked:l,isDisabled:p,isFocused:s,checkboxButtonSize:c,checkboxSize:d,hasOwnLabel:f,model:i,actualValue:u,handleChange:m,onClickRoot:y}},Sm=n.defineComponent({name:"ElCheckbox"}),km=n.defineComponent({...Sm,props:Wa,emits:qa,setup(e){const t=e,o=n.useSlots(),{inputId:i,isLabeledByFormItem:r,isChecked:a,isDisabled:s,isFocused:l,checkboxSize:c,hasOwnLabel:d,model:f,actualValue:u,handleChange:p,onClickRoot:g}=Ga(t,o),h=D("checkbox"),m=n.computed(()=>[h.b(),h.m(c.value),h.is("disabled",s.value),h.is("bordered",t.border),h.is("checked",a.value)]),y=n.computed(()=>[h.e("input"),h.is("disabled",s.value),h.is("checked",a.value),h.is("indeterminate",t.indeterminate),h.is("focus",l.value)]);return(b,C)=>(n.openBlock(),n.createBlock(n.resolveDynamicComponent(!n.unref(d)&&n.unref(r)?"span":"label"),{class:n.normalizeClass(n.unref(m)),"aria-controls":b.indeterminate?b.ariaControls:null,onClick:n.unref(g)},{default:n.withCtx(()=>{var I,k,v,S;return[n.createElementVNode("span",{class:n.normalizeClass(n.unref(y))},[b.trueValue||b.falseValue||b.trueLabel||b.falseLabel?n.withDirectives((n.openBlock(),n.createElementBlock("input",{key:0,id:n.unref(i),"onUpdate:modelValue":E=>n.isRef(f)?f.value=E:null,class:n.normalizeClass(n.unref(h).e("original")),type:"checkbox",indeterminate:b.indeterminate,name:b.name,tabindex:b.tabindex,disabled:n.unref(s),"true-value":(k=(I=b.trueValue)!=null?I:b.trueLabel)!=null?k:!0,"false-value":(S=(v=b.falseValue)!=null?v:b.falseLabel)!=null?S:!1,onChange:n.unref(p),onFocus:E=>l.value=!0,onBlur:E=>l.value=!1,onClick:n.withModifiers(()=>{},["stop"])},null,42,["id","onUpdate:modelValue","indeterminate","name","tabindex","disabled","true-value","false-value","onChange","onFocus","onBlur","onClick"])),[[n.vModelCheckbox,n.unref(f)]]):n.withDirectives((n.openBlock(),n.createElementBlock("input",{key:1,id:n.unref(i),"onUpdate:modelValue":E=>n.isRef(f)?f.value=E:null,class:n.normalizeClass(n.unref(h).e("original")),type:"checkbox",indeterminate:b.indeterminate,disabled:n.unref(s),value:n.unref(u),name:b.name,tabindex:b.tabindex,onChange:n.unref(p),onFocus:E=>l.value=!0,onBlur:E=>l.value=!1,onClick:n.withModifiers(()=>{},["stop"])},null,42,["id","onUpdate:modelValue","indeterminate","disabled","value","name","tabindex","onChange","onFocus","onBlur","onClick"])),[[n.vModelCheckbox,n.unref(f)]]),n.createElementVNode("span",{class:n.normalizeClass(n.unref(h).e("inner"))},null,2)],2),n.unref(d)?(n.openBlock(),n.createElementBlock("span",{key:0,class:n.normalizeClass(n.unref(h).e("label"))},[n.renderSlot(b.$slots,"default"),b.$slots.default?n.createCommentVNode("v-if",!0):(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createTextVNode(n.toDisplayString(b.label),1)],64))],2)):n.createCommentVNode("v-if",!0)]}),_:3},8,["class","aria-controls","onClick"]))}});var Em=F(km,[["__file","checkbox.vue"]]);const Im=n.defineComponent({name:"ElCheckboxButton"}),Tm=n.defineComponent({...Im,props:Wa,emits:qa,setup(e){const t=e,o=n.useSlots(),{isFocused:i,isChecked:r,isDisabled:a,checkboxButtonSize:s,model:l,actualValue:c,handleChange:d}=Ga(t,o),f=n.inject(Mt,void 0),u=D("checkbox"),p=n.computed(()=>{var h,m,y,b;const C=(m=(h=f==null?void 0:f.fill)==null?void 0:h.value)!=null?m:"";return{backgroundColor:C,borderColor:C,color:(b=(y=f==null?void 0:f.textColor)==null?void 0:y.value)!=null?b:"",boxShadow:C?`-1px 0 0 0 ${C}`:void 0}}),g=n.computed(()=>[u.b("button"),u.bm("button",s.value),u.is("disabled",a.value),u.is("checked",r.value),u.is("focus",i.value)]);return(h,m)=>{var y,b,C,I;return n.openBlock(),n.createElementBlock("label",{class:n.normalizeClass(n.unref(g))},[h.trueValue||h.falseValue||h.trueLabel||h.falseLabel?n.withDirectives((n.openBlock(),n.createElementBlock("input",{key:0,"onUpdate:modelValue":k=>n.isRef(l)?l.value=k:null,class:n.normalizeClass(n.unref(u).be("button","original")),type:"checkbox",name:h.name,tabindex:h.tabindex,disabled:n.unref(a),"true-value":(b=(y=h.trueValue)!=null?y:h.trueLabel)!=null?b:!0,"false-value":(I=(C=h.falseValue)!=null?C:h.falseLabel)!=null?I:!1,onChange:n.unref(d),onFocus:k=>i.value=!0,onBlur:k=>i.value=!1,onClick:n.withModifiers(()=>{},["stop"])},null,42,["onUpdate:modelValue","name","tabindex","disabled","true-value","false-value","onChange","onFocus","onBlur","onClick"])),[[n.vModelCheckbox,n.unref(l)]]):n.withDirectives((n.openBlock(),n.createElementBlock("input",{key:1,"onUpdate:modelValue":k=>n.isRef(l)?l.value=k:null,class:n.normalizeClass(n.unref(u).be("button","original")),type:"checkbox",name:h.name,tabindex:h.tabindex,disabled:n.unref(a),value:n.unref(c),onChange:n.unref(d),onFocus:k=>i.value=!0,onBlur:k=>i.value=!1,onClick:n.withModifiers(()=>{},["stop"])},null,42,["onUpdate:modelValue","name","tabindex","disabled","value","onChange","onFocus","onBlur","onClick"])),[[n.vModelCheckbox,n.unref(l)]]),h.$slots.default||h.label?(n.openBlock(),n.createElementBlock("span",{key:2,class:n.normalizeClass(n.unref(u).be("button","inner")),style:n.normalizeStyle(n.unref(r)?n.unref(p):void 0)},[n.renderSlot(h.$slots,"default",{},()=>[n.createTextVNode(n.toDisplayString(h.label),1)])],6)):n.createCommentVNode("v-if",!0)],2)}}});var Ja=F(Tm,[["__file","checkbox-button.vue"]]);const Am=R({modelValue:{type:_(Array),default:()=>[]},disabled:Boolean,min:Number,max:Number,size:Et,fill:String,textColor:String,tag:{type:String,default:"div"},validateEvent:{type:Boolean,default:!0},...rt(["ariaLabel"])}),Om={[X]:e=>ee(e),change:e=>ee(e)},Mm=n.defineComponent({name:"ElCheckboxGroup"}),xm=n.defineComponent({...Mm,props:Am,emits:Om,setup(e,{emit:t}){const o=e,i=D("checkbox"),{formItem:r}=Tt(),{inputId:a,isLabeledByFormItem:s}=Dn(o,{formItemContext:r}),l=async d=>{t(X,d),await n.nextTick(),t("change",d)},c=n.computed({get(){return o.modelValue},set(d){l(d)}});return n.provide(Mt,{...Tr(n.toRefs(o),["size","min","max","disabled","validateEvent","fill","textColor"]),modelValue:c,changeEvent:l}),n.watch(()=>o.modelValue,()=>{o.validateEvent&&(r==null||r.validate("change").catch(d=>ne(d)))}),(d,f)=>{var u;return n.openBlock(),n.createBlock(n.resolveDynamicComponent(d.tag),{id:n.unref(a),class:n.normalizeClass(n.unref(i).b("group")),role:"group","aria-label":n.unref(s)?void 0:d.ariaLabel||"checkbox-group","aria-labelledby":n.unref(s)?(u=n.unref(r))==null?void 0:u.labelId:void 0},{default:n.withCtx(()=>[n.renderSlot(d.$slots,"default")]),_:3},8,["id","class","aria-label","aria-labelledby"])}}});var Ya=F(xm,[["__file","checkbox-group.vue"]]);const Za=oe(Em,{CheckboxButton:Ja,CheckboxGroup:Ya});tt(Ja);const Qa=tt(Ya),Xa=R({modelValue:{type:[String,Number,Boolean],default:void 0},size:Et,disabled:Boolean,label:{type:[String,Number,Boolean],default:void 0},value:{type:[String,Number,Boolean],default:void 0},name:{type:String,default:void 0}}),Bm=R({...Xa,border:Boolean}),es={[X]:e=>me(e)||G(e)||_e(e),[Ao]:e=>me(e)||G(e)||_e(e)},ts=Symbol("radioGroupKey"),ns=(e,t)=>{const o=n.ref(),i=n.inject(ts,void 0),r=n.computed(()=>!!i),a=n.computed(()=>Kt(e.value)?e.label:e.value),s=n.computed({get(){return r.value?i.modelValue:e.modelValue},set(u){r.value?i.changeEvent(u):t&&t(X,u),o.value.checked=e.modelValue===a.value}}),l=It(n.computed(()=>i==null?void 0:i.size)),c=Fn(n.computed(()=>i==null?void 0:i.disabled)),d=n.ref(!1),f=n.computed(()=>c.value||r.value&&s.value!==a.value?-1:0);return yt({from:"label act as value",replacement:"value",version:"3.0.0",scope:"el-radio",ref:"https://element-plus.org/en-US/component/radio.html"},n.computed(()=>r.value&&Kt(e.value))),{radioRef:o,isGroup:r,radioGroup:i,focus:d,size:l,disabled:c,tabIndex:f,modelValue:s,actualValue:a}},Nm=n.defineComponent({name:"ElRadio"}),_m=n.defineComponent({...Nm,props:Bm,emits:es,setup(e,{emit:t}){const o=e,i=D("radio"),{radioRef:r,radioGroup:a,focus:s,size:l,disabled:c,modelValue:d,actualValue:f}=ns(o,t);function u(){n.nextTick(()=>t("change",d.value))}return(p,g)=>{var h;return n.openBlock(),n.createElementBlock("label",{class:n.normalizeClass([n.unref(i).b(),n.unref(i).is("disabled",n.unref(c)),n.unref(i).is("focus",n.unref(s)),n.unref(i).is("bordered",p.border),n.unref(i).is("checked",n.unref(d)===n.unref(f)),n.unref(i).m(n.unref(l))])},[n.createElementVNode("span",{class:n.normalizeClass([n.unref(i).e("input"),n.unref(i).is("disabled",n.unref(c)),n.unref(i).is("checked",n.unref(d)===n.unref(f))])},[n.withDirectives(n.createElementVNode("input",{ref_key:"radioRef",ref:r,"onUpdate:modelValue":m=>n.isRef(d)?d.value=m:null,class:n.normalizeClass(n.unref(i).e("original")),value:n.unref(f),name:p.name||((h=n.unref(a))==null?void 0:h.name),disabled:n.unref(c),checked:n.unref(d)===n.unref(f),type:"radio",onFocus:m=>s.value=!0,onBlur:m=>s.value=!1,onChange:u,onClick:n.withModifiers(()=>{},["stop"])},null,42,["onUpdate:modelValue","value","name","disabled","checked","onFocus","onBlur","onClick"]),[[n.vModelRadio,n.unref(d)]]),n.createElementVNode("span",{class:n.normalizeClass(n.unref(i).e("inner"))},null,2)],2),n.createElementVNode("span",{class:n.normalizeClass(n.unref(i).e("label")),onKeydown:n.withModifiers(()=>{},["stop"])},[n.renderSlot(p.$slots,"default",{},()=>[n.createTextVNode(n.toDisplayString(p.label),1)])],42,["onKeydown"])],2)}}});var Lm=F(_m,[["__file","radio.vue"]]);const Pm=R({...Xa}),Vm=n.defineComponent({name:"ElRadioButton"}),Rm=n.defineComponent({...Vm,props:Pm,setup(e){const t=e,o=D("radio"),{radioRef:i,focus:r,size:a,disabled:s,modelValue:l,radioGroup:c,actualValue:d}=ns(t),f=n.computed(()=>({backgroundColor:(c==null?void 0:c.fill)||"",borderColor:(c==null?void 0:c.fill)||"",boxShadow:c!=null&&c.fill?`-1px 0 0 0 ${c.fill}`:"",color:(c==null?void 0:c.textColor)||""}));return(u,p)=>{var g;return n.openBlock(),n.createElementBlock("label",{class:n.normalizeClass([n.unref(o).b("button"),n.unref(o).is("active",n.unref(l)===n.unref(d)),n.unref(o).is("disabled",n.unref(s)),n.unref(o).is("focus",n.unref(r)),n.unref(o).bm("button",n.unref(a))])},[n.withDirectives(n.createElementVNode("input",{ref_key:"radioRef",ref:i,"onUpdate:modelValue":h=>n.isRef(l)?l.value=h:null,class:n.normalizeClass(n.unref(o).be("button","original-radio")),value:n.unref(d),type:"radio",name:u.name||((g=n.unref(c))==null?void 0:g.name),disabled:n.unref(s),onFocus:h=>r.value=!0,onBlur:h=>r.value=!1,onClick:n.withModifiers(()=>{},["stop"])},null,42,["onUpdate:modelValue","value","name","disabled","onFocus","onBlur","onClick"]),[[n.vModelRadio,n.unref(l)]]),n.createElementVNode("span",{class:n.normalizeClass(n.unref(o).be("button","inner")),style:n.normalizeStyle(n.unref(l)===n.unref(d)?n.unref(f):{}),onKeydown:n.withModifiers(()=>{},["stop"])},[n.renderSlot(u.$slots,"default",{},()=>[n.createTextVNode(n.toDisplayString(u.label),1)])],46,["onKeydown"])],2)}}});var os=F(Rm,[["__file","radio-button.vue"]]);const Fm=R({id:{type:String,default:void 0},size:Et,disabled:Boolean,modelValue:{type:[String,Number,Boolean],default:void 0},fill:{type:String,default:""},textColor:{type:String,default:""},name:{type:String,default:void 0},validateEvent:{type:Boolean,default:!0},...rt(["ariaLabel"])}),Dm=es,$m=n.defineComponent({name:"ElRadioGroup"}),zm=n.defineComponent({...$m,props:Fm,emits:Dm,setup(e,{emit:t}){const o=e,i=D("radio"),r=it(),a=n.ref(),{formItem:s}=Tt(),{inputId:l,isLabeledByFormItem:c}=Dn(o,{formItemContext:s}),d=u=>{t(X,u),n.nextTick(()=>t("change",u))};n.onMounted(()=>{const u=a.value.querySelectorAll("[type=radio]"),p=u[0];!Array.from(u).some(g=>g.checked)&&p&&(p.tabIndex=0)});const f=n.computed(()=>o.name||r.value);return n.provide(ts,n.reactive({...n.toRefs(o),changeEvent:d,name:f})),n.watch(()=>o.modelValue,()=>{o.validateEvent&&(s==null||s.validate("change").catch(u=>ne(u)))}),(u,p)=>(n.openBlock(),n.createElementBlock("div",{id:n.unref(l),ref_key:"radioGroupRef",ref:a,class:n.normalizeClass(n.unref(i).b("group")),role:"radiogroup","aria-label":n.unref(c)?void 0:u.ariaLabel||"radio-group","aria-labelledby":n.unref(c)?n.unref(s).labelId:void 0},[n.renderSlot(u.$slots,"default")],10,["id","aria-label","aria-labelledby"]))}});var is=F(zm,[["__file","radio-group.vue"]]);const rs=oe(Lm,{RadioButton:os,RadioGroup:is}),as=tt(is);tt(os);const oi=R({type:{type:String,values:["primary","success","info","warning","danger"],default:"primary"},closable:Boolean,disableTransitions:Boolean,hit:Boolean,color:String,size:{type:String,values:_r},effect:{type:String,values:["dark","light","plain"],default:"light"},round:Boolean}),jm={close:e=>e instanceof MouseEvent,click:e=>e instanceof MouseEvent},Hm=n.defineComponent({name:"ElTag"}),Km=n.defineComponent({...Hm,props:oi,emits:jm,setup(e,{emit:t}){const o=e,i=It(),r=D("tag"),a=n.computed(()=>{const{type:d,hit:f,effect:u,closable:p,round:g}=o;return[r.b(),r.is("closable",p),r.m(d||"primary"),r.m(i.value),r.m(u),r.is("hit",f),r.is("round",g)]}),s=d=>{t("close",d)},l=d=>{t("click",d)},c=d=>{d.component.subTree.component.bum=null};return(d,f)=>d.disableTransitions?(n.openBlock(),n.createElementBlock("span",{key:0,class:n.normalizeClass(n.unref(a)),style:n.normalizeStyle({backgroundColor:d.color}),onClick:l},[n.createElementVNode("span",{class:n.normalizeClass(n.unref(r).e("content"))},[n.renderSlot(d.$slots,"default")],2),d.closable?(n.openBlock(),n.createBlock(n.unref(be),{key:0,class:n.normalizeClass(n.unref(r).e("close")),onClick:n.withModifiers(s,["stop"])},{default:n.withCtx(()=>[n.createVNode(n.unref(W.Close))]),_:1},8,["class","onClick"])):n.createCommentVNode("v-if",!0)],6)):(n.openBlock(),n.createBlock(n.Transition,{key:1,name:`${n.unref(r).namespace.value}-zoom-in-center`,appear:"",onVnodeMounted:c},{default:n.withCtx(()=>[n.createElementVNode("span",{class:n.normalizeClass(n.unref(a)),style:n.normalizeStyle({backgroundColor:d.color}),onClick:l},[n.createElementVNode("span",{class:n.normalizeClass(n.unref(r).e("content"))},[n.renderSlot(d.$slots,"default")],2),d.closable?(n.openBlock(),n.createBlock(n.unref(be),{key:0,class:n.normalizeClass(n.unref(r).e("close")),onClick:n.withModifiers(s,["stop"])},{default:n.withCtx(()=>[n.createVNode(n.unref(W.Close))]),_:1},8,["class","onClick"])):n.createCommentVNode("v-if",!0)],6)]),_:3},8,["name"]))}});var Um=F(Km,[["__file","tag.vue"]]);const Wm=oe(Um),ss=Symbol("rowContextKey"),qm=R({tag:{type:String,default:"div"},gutter:{type:Number,default:0},justify:{type:String,values:["start","center","end","space-around","space-between","space-evenly"],default:"start"},align:{type:String,values:["top","middle","bottom"]}}),Gm=n.defineComponent({name:"ElRow"}),Jm=n.defineComponent({...Gm,props:qm,setup(e){const t=e,o=D("row"),i=n.computed(()=>t.gutter);n.provide(ss,{gutter:i});const r=n.computed(()=>{const s={};return t.gutter&&(s.marginRight=s.marginLeft=`-${t.gutter/2}px`),s}),a=n.computed(()=>[o.b(),o.is(`justify-${t.justify}`,t.justify!=="start"),o.is(`align-${t.align}`,!!t.align)]);return(s,l)=>(n.openBlock(),n.createBlock(n.resolveDynamicComponent(s.tag),{class:n.normalizeClass(n.unref(a)),style:n.normalizeStyle(n.unref(r))},{default:n.withCtx(()=>[n.renderSlot(s.$slots,"default")]),_:3},8,["class","style"]))}});var Ym=F(Jm,[["__file","row.vue"]]);const on=oe(Ym),Zm=R({tag:{type:String,default:"div"},span:{type:Number,default:24},offset:{type:Number,default:0},pull:{type:Number,default:0},push:{type:Number,default:0},xs:{type:_([Number,Object]),default:()=>qt({})},sm:{type:_([Number,Object]),default:()=>qt({})},md:{type:_([Number,Object]),default:()=>qt({})},lg:{type:_([Number,Object]),default:()=>qt({})},xl:{type:_([Number,Object]),default:()=>qt({})}}),Qm=n.defineComponent({name:"ElCol"}),Xm=n.defineComponent({...Qm,props:Zm,setup(e){const t=e,{gutter:o}=n.inject(ss,{gutter:n.computed(()=>0)}),i=D("col"),r=n.computed(()=>{const s={};return o.value&&(s.paddingLeft=s.paddingRight=`${o.value/2}px`),s}),a=n.computed(()=>{const s=[];return["span","offset","pull","push"].forEach(d=>{const f=t[d];G(f)&&(d==="span"?s.push(i.b(`${t[d]}`)):f>0&&s.push(i.b(`${d}-${t[d]}`)))}),["xs","sm","md","lg","xl"].forEach(d=>{G(t[d])?s.push(i.b(`${d}-${t[d]}`)):te(t[d])&&Object.entries(t[d]).forEach(([f,u])=>{s.push(f!=="span"?i.b(`${d}-${f}-${u}`):i.b(`${d}-${u}`))})}),o.value&&s.push(i.is("guttered")),[i.b(),s]});return(s,l)=>(n.openBlock(),n.createBlock(n.resolveDynamicComponent(s.tag),{class:n.normalizeClass(n.unref(a)),style:n.normalizeStyle(n.unref(r))},{default:n.withCtx(()=>[n.renderSlot(s.$slots,"default")]),_:3},8,["class","style"]))}});var eg=F(Xm,[["__file","col.vue"]]);const rn=oe(eg),tg=R({mask:{type:Boolean,default:!0},customMaskEvent:Boolean,overlayClass:{type:_([String,Array,Object])},zIndex:{type:_([String,Number])}}),ng={click:e=>e instanceof MouseEvent},og="overlay";var ig=n.defineComponent({name:"ElOverlay",props:tg,emits:ng,setup(e,{slots:t,emit:o}){const i=D(og),r=c=>{o("click",c)},{onClick:a,onMousedown:s,onMouseup:l}=oa(e.customMaskEvent?void 0:r);return()=>e.mask?n.createVNode("div",{class:[i.b(),e.overlayClass],style:{zIndex:e.zIndex},onClick:a,onMousedown:s,onMouseup:l},[n.renderSlot(t,"default")],Mn.STYLE|Mn.CLASS|Mn.PROPS,["onClick","onMouseup","onMousedown"]):n.h("div",{class:e.overlayClass,style:{zIndex:e.zIndex,position:"fixed",top:"0px",right:"0px",bottom:"0px",left:"0px"}},[n.renderSlot(t,"default")])}});const rg=ig,ls=Symbol("dialogInjectionKey"),cs=R({center:Boolean,alignCenter:Boolean,closeIcon:{type:gt},draggable:Boolean,overflow:Boolean,fullscreen:Boolean,showClose:{type:Boolean,default:!0},title:{type:String,default:""},ariaLevel:{type:String,default:"2"}}),ag={close:()=>!0},sg=n.defineComponent({name:"ElDialogContent"}),lg=n.defineComponent({...sg,props:cs,emits:ag,setup(e,{expose:t}){const o=e,{t:i}=Oo(),{Close:r}=qf,{dialogRef:a,headerRef:s,bodyId:l,ns:c,style:d}=n.inject(ls),{focusTrapRef:f}=n.inject(Oa),u=n.computed(()=>[c.b(),c.is("fullscreen",o.fullscreen),c.is("draggable",o.draggable),c.is("align-center",o.alignCenter),{[c.m("center")]:o.center}]),p=Yf(f,a),g=n.computed(()=>o.draggable),h=n.computed(()=>o.overflow),{resetPosition:m}=Qf(a,s,g,h);return t({resetPosition:m}),(y,b)=>(n.openBlock(),n.createElementBlock("div",{ref:n.unref(p),class:n.normalizeClass(n.unref(u)),style:n.normalizeStyle(n.unref(d)),tabindex:"-1"},[n.createElementVNode("header",{ref_key:"headerRef",ref:s,class:n.normalizeClass([n.unref(c).e("header"),{"show-close":y.showClose}])},[n.renderSlot(y.$slots,"header",{},()=>[n.createElementVNode("span",{role:"heading","aria-level":y.ariaLevel,class:n.normalizeClass(n.unref(c).e("title"))},n.toDisplayString(y.title),11,["aria-level"])]),y.showClose?(n.openBlock(),n.createElementBlock("button",{key:0,"aria-label":n.unref(i)("el.dialog.close"),class:n.normalizeClass(n.unref(c).e("headerbtn")),type:"button",onClick:C=>y.$emit("close")},[n.createVNode(n.unref(be),{class:n.normalizeClass(n.unref(c).e("close"))},{default:n.withCtx(()=>[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(y.closeIcon||n.unref(r))))]),_:1},8,["class"])],10,["aria-label","onClick"])):n.createCommentVNode("v-if",!0)],2),n.createElementVNode("div",{id:n.unref(l),class:n.normalizeClass(n.unref(c).e("body"))},[n.renderSlot(y.$slots,"default")],10,["id"]),y.$slots.footer?(n.openBlock(),n.createElementBlock("footer",{key:0,class:n.normalizeClass(n.unref(c).e("footer"))},[n.renderSlot(y.$slots,"footer")],2)):n.createCommentVNode("v-if",!0)],6))}});var cg=F(lg,[["__file","dialog-content.vue"]]);const dg=R({...cs,appendToBody:Boolean,appendTo:{type:_([String,Object]),default:"body"},beforeClose:{type:_(Function)},destroyOnClose:Boolean,closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0},modal:{type:Boolean,default:!0},openDelay:{type:Number,default:0},closeDelay:{type:Number,default:0},top:{type:String},modelValue:Boolean,modalClass:String,width:{type:[String,Number]},zIndex:{type:Number},trapFocus:Boolean,headerAriaLevel:{type:String,default:"2"}}),fg={open:()=>!0,opened:()=>!0,close:()=>!0,closed:()=>!0,[X]:e=>_e(e),openAutoFocus:()=>!0,closeAutoFocus:()=>!0},ug=(e,t)=>{var o;const r=n.getCurrentInstance().emit,{nextZIndex:a}=$o();let s="";const l=it(),c=it(),d=n.ref(!1),f=n.ref(!1),u=n.ref(!1),p=n.ref((o=e.zIndex)!=null?o:a());let g,h;const m=Vn("namespace",Gt),y=n.computed(()=>{const V={},M=`--${m.value}-dialog`;return e.fullscreen||(e.top&&(V[`${M}-margin-top`]=e.top),e.width&&(V[`${M}-width`]=et(e.width))),V}),b=n.computed(()=>e.alignCenter?{display:"flex"}:{});function C(){r("opened")}function I(){r("closed"),r(X,!1),e.destroyOnClose&&(u.value=!1)}function k(){r("close")}function v(){h==null||h(),g==null||g(),e.openDelay&&e.openDelay>0?{stop:g}=Ti(()=>x(),e.openDelay):x()}function S(){g==null||g(),h==null||h(),e.closeDelay&&e.closeDelay>0?{stop:h}=Ti(()=>N(),e.closeDelay):N()}function E(){function V(M){M||(f.value=!0,d.value=!1)}e.beforeClose?e.beforeClose(V):S()}function O(){e.closeOnClickModal&&E()}function x(){K&&(d.value=!0)}function N(){d.value=!1}function B(){r("openAutoFocus")}function T(){r("closeAutoFocus")}function L(V){var M;((M=V.detail)==null?void 0:M.focusReason)==="pointer"&&V.preventDefault()}e.lockScroll&&iu(d);function q(){e.closeOnPressEscape&&E()}return n.watch(()=>e.modelValue,V=>{V?(f.value=!1,v(),u.value=!0,p.value=Ir(e.zIndex)?a():p.value++,n.nextTick(()=>{r("open"),t.value&&(t.value.scrollTop=0)})):d.value&&S()}),n.watch(()=>e.fullscreen,V=>{t.value&&(V?(s=t.value.style.transform,t.value.style.transform=""):t.value.style.transform=s)}),n.onMounted(()=>{e.modelValue&&(d.value=!0,u.value=!0,v())}),{afterEnter:C,afterLeave:I,beforeLeave:k,handleClose:E,onModalClick:O,close:S,doClose:N,onOpenAutoFocus:B,onCloseAutoFocus:T,onCloseRequested:q,onFocusoutPrevented:L,titleId:l,bodyId:c,closed:f,style:y,overlayDialogStyle:b,rendered:u,visible:d,zIndex:p}},pg=n.defineComponent({name:"ElDialog",inheritAttrs:!1}),hg=n.defineComponent({...pg,props:dg,emits:fg,setup(e,{expose:t}){const o=e,i=n.useSlots();yt({scope:"el-dialog",from:"the title slot",replacement:"the header slot",version:"3.0.0",ref:"https://element-plus.org/en-US/component/dialog.html#slots"},n.computed(()=>!!i.title));const r=D("dialog"),a=n.ref(),s=n.ref(),l=n.ref(),{visible:c,titleId:d,bodyId:f,style:u,overlayDialogStyle:p,rendered:g,zIndex:h,afterEnter:m,afterLeave:y,beforeLeave:b,handleClose:C,onModalClick:I,onOpenAutoFocus:k,onCloseAutoFocus:v,onCloseRequested:S,onFocusoutPrevented:E}=ug(o,a);n.provide(ls,{dialogRef:a,headerRef:s,bodyId:f,ns:r,rendered:g,style:u});const O=oa(I),x=n.computed(()=>o.draggable&&!o.fullscreen);return t({visible:c,dialogContentRef:l,resetPosition:()=>{var B;(B=l.value)==null||B.resetPosition()}}),(B,T)=>(n.openBlock(),n.createBlock(n.unref(Va),{to:B.appendTo,disabled:B.appendTo!=="body"?!1:!B.appendToBody},{default:n.withCtx(()=>[n.createVNode(n.Transition,{name:"dialog-fade",onAfterEnter:n.unref(m),onAfterLeave:n.unref(y),onBeforeLeave:n.unref(b),persisted:""},{default:n.withCtx(()=>[n.withDirectives(n.createVNode(n.unref(rg),{"custom-mask-event":"",mask:B.modal,"overlay-class":B.modalClass,"z-index":n.unref(h)},{default:n.withCtx(()=>[n.createElementVNode("div",{role:"dialog","aria-modal":"true","aria-label":B.title||void 0,"aria-labelledby":B.title?void 0:n.unref(d),"aria-describedby":n.unref(f),class:n.normalizeClass(`${n.unref(r).namespace.value}-overlay-dialog`),style:n.normalizeStyle(n.unref(p)),onClick:n.unref(O).onClick,onMousedown:n.unref(O).onMousedown,onMouseup:n.unref(O).onMouseup},[n.createVNode(n.unref(La),{loop:"",trapped:n.unref(c),"focus-start-el":"container",onFocusAfterTrapped:n.unref(k),onFocusAfterReleased:n.unref(v),onFocusoutPrevented:n.unref(E),onReleaseRequested:n.unref(S)},{default:n.withCtx(()=>[n.unref(g)?(n.openBlock(),n.createBlock(cg,n.mergeProps({key:0,ref_key:"dialogContentRef",ref:l},B.$attrs,{center:B.center,"align-center":B.alignCenter,"close-icon":B.closeIcon,draggable:n.unref(x),overflow:B.overflow,fullscreen:B.fullscreen,"show-close":B.showClose,title:B.title,"aria-level":B.headerAriaLevel,onClose:n.unref(C)}),n.createSlots({header:n.withCtx(()=>[B.$slots.title?n.renderSlot(B.$slots,"title",{key:1}):n.renderSlot(B.$slots,"header",{key:0,close:n.unref(C),titleId:n.unref(d),titleClass:n.unref(r).e("title")})]),default:n.withCtx(()=>[n.renderSlot(B.$slots,"default")]),_:2},[B.$slots.footer?{name:"footer",fn:n.withCtx(()=>[n.renderSlot(B.$slots,"footer")])}:void 0]),1040,["center","align-center","close-icon","draggable","overflow","fullscreen","show-close","title","aria-level","onClose"])):n.createCommentVNode("v-if",!0)]),_:3},8,["trapped","onFocusAfterTrapped","onFocusAfterReleased","onFocusoutPrevented","onReleaseRequested"])],46,["aria-label","aria-labelledby","aria-describedby","onClick","onMousedown","onMouseup"])]),_:3},8,["mask","overlay-class","z-index"]),[[n.vShow,n.unref(c)]])]),_:3},8,["onAfterEnter","onAfterLeave","onBeforeLeave"])]),_:3},8,["to","disabled"]))}});var mg=F(hg,[["__file","dialog.vue"]]);const gg=oe(mg),yg=n.defineComponent({inheritAttrs:!1});function bg(e,t,o,i,r,a){return n.renderSlot(e.$slots,"default")}var wg=F(yg,[["render",bg],["__file","collection.vue"]]);const Cg=n.defineComponent({name:"ElCollectionItem",inheritAttrs:!1});function vg(e,t,o,i,r,a){return n.renderSlot(e.$slots,"default")}var Sg=F(Cg,[["render",vg],["__file","collection-item.vue"]]);const kg="data-el-collection-item",Eg=e=>{const t=`El${e}Collection`,o=`${t}Item`,i=Symbol(t),r=Symbol(o),a={...wg,name:t,setup(){const l=n.ref(null),c=new Map,d=()=>{const f=n.unref(l);if(!f)return[];const u=Array.from(f.querySelectorAll(`[${kg}]`));return[...c.values()].sort((g,h)=>u.indexOf(g.ref)-u.indexOf(h.ref))};n.provide(i,{itemMap:c,getItems:d,collectionRef:l})}},s={...Sg,name:o,setup(l,{attrs:c}){const d=n.ref(null),f=n.inject(i,void 0);n.provide(r,{collectionItemRef:d}),n.onMounted(()=>{const u=n.unref(d);u&&f.itemMap.set(u,{ref:u,...c})}),n.onBeforeUnmount(()=>{const u=n.unref(d);f.itemMap.delete(u)})}};return{COLLECTION_INJECTION_KEY:i,COLLECTION_ITEM_INJECTION_KEY:r,ElCollection:a,ElCollectionItem:s}},ii=R({trigger:nn.trigger,effect:{...se.effect,default:"light"},type:{type:_(String)},placement:{type:_(String),default:"bottom"},popperOptions:{type:_(Object),default:()=>({})},id:String,size:{type:String,default:""},splitButton:Boolean,hideOnClick:{type:Boolean,default:!0},loop:{type:Boolean,default:!0},showTimeout:{type:Number,default:150},hideTimeout:{type:Number,default:150},tabindex:{type:_([Number,String]),default:0},maxHeight:{type:_([Number,String]),default:""},popperClass:{type:String,default:""},disabled:Boolean,role:{type:String,default:"menu"},buttonProps:{type:_(Object)},teleported:se.teleported});R({command:{type:[Object,String,Number],default:()=>({})},disabled:Boolean,divided:Boolean,textValue:String,icon:{type:gt}}),R({onKeydown:{type:_(Function)}}),Eg("Dropdown");const ds=Symbol("ElSelectGroup"),Wn=Symbol("ElSelect");function Ig(e,t){const o=n.inject(Wn),i=n.inject(ds,{disabled:!1}),r=n.computed(()=>f(De(o.props.modelValue),e.value)),a=n.computed(()=>{var g;if(o.props.multiple){const h=De((g=o.props.modelValue)!=null?g:[]);return!r.value&&h.length>=o.props.multipleLimit&&o.props.multipleLimit>0}else return!1}),s=n.computed(()=>e.label||(te(e.value)?"":e.value)),l=n.computed(()=>e.value||e.label||""),c=n.computed(()=>e.disabled||t.groupDisabled||a.value),d=n.getCurrentInstance(),f=(g=[],h)=>{if(te(e.value)){const m=o.props.valueKey;return g&&g.some(y=>n.toRaw(Be(y,m))===Be(h,m))}else return g&&g.includes(h)},u=()=>{!e.disabled&&!i.disabled&&(o.states.hoveringIndex=o.optionsArray.indexOf(d.proxy))},p=g=>{const h=new RegExp(jf(g),"i");t.visible=h.test(s.value)||e.created};return n.watch(()=>s.value,()=>{!e.created&&!o.props.remote&&o.setSelected()}),n.watch(()=>e.value,(g,h)=>{const{remote:m,valueKey:y}=o.props;if(g!==h&&(o.onOptionDestroy(h,d.proxy),o.onOptionCreate(d.proxy)),!e.created&&!m){if(y&&te(g)&&te(h)&&g[y]===h[y])return;o.setSelected()}}),n.watch(()=>i.disabled,()=>{t.groupDisabled=i.disabled},{immediate:!0}),{select:o,currentLabel:s,currentValue:l,itemSelected:r,isDisabled:c,hoverItem:u,updateOption:p}}const Tg=n.defineComponent({name:"ElOption",componentName:"ElOption",props:{value:{required:!0,type:[String,Number,Boolean,Object]},label:[String,Number],created:Boolean,disabled:Boolean},setup(e){const t=D("select"),o=it(),i=n.computed(()=>[t.be("dropdown","item"),t.is("disabled",n.unref(l)),t.is("selected",n.unref(s)),t.is("hovering",n.unref(p))]),r=n.reactive({index:-1,groupDisabled:!1,visible:!0,hover:!1}),{currentLabel:a,itemSelected:s,isDisabled:l,select:c,hoverItem:d,updateOption:f}=Ig(e,r),{visible:u,hover:p}=n.toRefs(r),g=n.getCurrentInstance().proxy;c.onOptionCreate(g),n.onBeforeUnmount(()=>{const m=g.value,{selected:y}=c.states,C=(c.props.multiple?y:[y]).some(I=>I.value===g.value);n.nextTick(()=>{c.states.cachedOptions.get(m)===g&&!C&&c.states.cachedOptions.delete(m)}),c.onOptionDestroy(m,g)});function h(){l.value||c.handleOptionSelect(g)}return{ns:t,id:o,containerKls:i,currentLabel:a,itemSelected:s,isDisabled:l,select:c,hoverItem:d,updateOption:f,visible:u,hover:p,selectOptionClick:h,states:r}}});function Ag(e,t,o,i,r,a){return n.withDirectives((n.openBlock(),n.createElementBlock("li",{id:e.id,class:n.normalizeClass(e.containerKls),role:"option","aria-disabled":e.isDisabled||void 0,"aria-selected":e.itemSelected,onMouseenter:e.hoverItem,onClick:n.withModifiers(e.selectOptionClick,["stop"])},[n.renderSlot(e.$slots,"default",{},()=>[n.createElementVNode("span",null,n.toDisplayString(e.currentLabel),1)])],42,["id","aria-disabled","aria-selected","onMouseenter","onClick"])),[[n.vShow,e.visible]])}var ri=F(Tg,[["render",Ag],["__file","option.vue"]]);const Og=n.defineComponent({name:"ElSelectDropdown",componentName:"ElSelectDropdown",setup(){const e=n.inject(Wn),t=D("select"),o=n.computed(()=>e.props.popperClass),i=n.computed(()=>e.props.multiple),r=n.computed(()=>e.props.fitInputWidth),a=n.ref("");function s(){var l;a.value=`${(l=e.selectRef)==null?void 0:l.offsetWidth}px`}return n.onMounted(()=>{s(),Re(e.selectRef,s)}),{ns:t,minWidth:a,popperClass:o,isMultiple:i,isFitInputWidth:r}}});function Mg(e,t,o,i,r,a){return n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass([e.ns.b("dropdown"),e.ns.is("multiple",e.isMultiple),e.popperClass]),style:n.normalizeStyle({[e.isFitInputWidth?"width":"minWidth"]:e.minWidth})},[e.$slots.header?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(e.ns.be("dropdown","header"))},[n.renderSlot(e.$slots,"header")],2)):n.createCommentVNode("v-if",!0),n.renderSlot(e.$slots,"default"),e.$slots.footer?(n.openBlock(),n.createElementBlock("div",{key:1,class:n.normalizeClass(e.ns.be("dropdown","footer"))},[n.renderSlot(e.$slots,"footer")],2)):n.createCommentVNode("v-if",!0)],6)}var xg=F(Og,[["render",Mg],["__file","select-dropdown.vue"]]);const Bg=11,Ng=(e,t)=>{const{t:o}=Oo(),i=it(),r=D("select"),a=D("input"),s=n.reactive({inputValue:"",options:new Map,cachedOptions:new Map,disabledOptions:new Map,optionValues:[],selected:[],selectionWidth:0,calculatorWidth:0,collapseItemWidth:0,selectedLabel:"",hoveringIndex:-1,previousQuery:null,inputHovering:!1,menuVisibleOnFocus:!1,isBeforeHide:!1}),l=n.ref(null),c=n.ref(null),d=n.ref(null),f=n.ref(null),u=n.ref(null),p=n.ref(null),g=n.ref(null),h=n.ref(null),m=n.ref(null),y=n.ref(null),b=n.ref(null),C=n.ref(null),{isComposing:I,handleCompositionStart:k,handleCompositionUpdate:v,handleCompositionEnd:S}=Sp({afterComposition:w=>pn(w)}),{wrapperRef:E,isFocused:O}=vp(u,{beforeFocus(){return M.value},afterFocus(){e.automaticDropdown&&!x.value&&(x.value=!0,s.menuVisibleOnFocus=!0)},beforeBlur(w){var A,P;return((A=d.value)==null?void 0:A.isFocusInsideContent(w))||((P=f.value)==null?void 0:P.isFocusInsideContent(w))},afterBlur(){x.value=!1,s.menuVisibleOnFocus=!1}}),x=n.ref(!1),N=n.ref(),{form:B,formItem:T}=Tt(),{inputId:L}=Dn(e,{formItemContext:T}),{valueOnClear:q,isEmptyValue:V}=Ap(e),M=n.computed(()=>e.disabled||(B==null?void 0:B.disabled)),$=n.computed(()=>ee(e.modelValue)?e.modelValue.length>0:!V(e.modelValue)),pe=n.computed(()=>e.clearable&&!M.value&&s.inputHovering&&$.value),Y=n.computed(()=>e.remote&&e.filterable&&!e.remoteShowSuffix?"":e.suffixIcon),Z=n.computed(()=>r.is("reverse",Y.value&&x.value)),ce=n.computed(()=>(T==null?void 0:T.validateState)||""),Ee=n.computed(()=>Gf[ce.value]),_t=n.computed(()=>e.remote?300:0),Ie=n.computed(()=>e.loading?e.loadingText||o("el.select.loading"):e.remote&&!s.inputValue&&s.options.size===0?!1:e.filterable&&s.inputValue&&s.options.size>0&&ae.value===0?e.noMatchText||o("el.select.noMatch"):s.options.size===0?e.noDataText||o("el.select.noData"):null),ae=n.computed(()=>U.value.filter(w=>w.visible).length),U=n.computed(()=>{const w=Array.from(s.options.values()),A=[];return s.optionValues.forEach(P=>{const z=w.findIndex(Ge=>Ge.value===P);z>-1&&A.push(w[z])}),A.length>=w.length?A:w}),lt=n.computed(()=>Array.from(s.cachedOptions.values())),qe=n.computed(()=>{const w=U.value.filter(A=>!A.created).some(A=>A.currentLabel===s.inputValue);return e.filterable&&e.allowCreate&&s.inputValue!==""&&!w}),Zn=()=>{e.filterable&&Q(e.filterMethod)||e.filterable&&e.remote&&Q(e.remoteMethod)||U.value.forEach(w=>{var A;(A=w.updateOption)==null||A.call(w,s.inputValue)})},Qn=It(),ln=n.computed(()=>["small"].includes(Qn.value)?"small":"default"),yi=n.computed({get(){return x.value&&Ie.value!==!1},set(w){x.value=w}}),Xn=n.computed(()=>{if(e.multiple&&!ze(e.modelValue))return De(e.modelValue).length===0&&!s.inputValue;const w=ee(e.modelValue)?e.modelValue[0]:e.modelValue;return e.filterable||ze(w)?!s.inputValue:!0}),bi=n.computed(()=>{var w;const A=(w=e.placeholder)!=null?w:o("el.select.placeholder");return e.multiple||!$.value?A:s.selectedLabel}),wi=n.computed(()=>ro?null:"mouseenter");n.watch(()=>e.modelValue,(w,A)=>{e.multiple&&e.filterable&&!e.reserveKeyword&&(s.inputValue="",ct("")),Lt(),!In(w,A)&&e.validateEvent&&(T==null||T.validate("change").catch(P=>ne(P)))},{flush:"post",deep:!0}),n.watch(()=>x.value,w=>{w?ct(s.inputValue):(s.inputValue="",s.previousQuery=null,s.isBeforeHide=!0),t("visible-change",w)}),n.watch(()=>s.options.entries(),()=>{var w;if(!K)return;const A=((w=l.value)==null?void 0:w.querySelectorAll("input"))||[];(!e.filterable&&!e.defaultFirstOption&&!ze(e.modelValue)||!Array.from(A).includes(document.activeElement))&&Lt(),e.defaultFirstOption&&(e.filterable||e.remote)&&ae.value&&cn()},{flush:"post"}),n.watch(()=>s.hoveringIndex,w=>{G(w)&&w>-1?N.value=U.value[w]||{}:N.value={},U.value.forEach(A=>{A.hover=N.value===A})}),n.watchEffect(()=>{s.isBeforeHide||Zn()});const ct=w=>{s.previousQuery===w||I.value||(s.previousQuery=w,e.filterable&&Q(e.filterMethod)?e.filterMethod(w):e.filterable&&e.remote&&Q(e.remoteMethod)&&e.remoteMethod(w),e.defaultFirstOption&&(e.filterable||e.remote)&&ae.value?n.nextTick(cn):n.nextTick(Ve))},cn=()=>{const w=U.value.filter(z=>z.visible&&!z.disabled&&!z.states.groupDisabled),A=w.find(z=>z.created),P=w[0];s.hoveringIndex=Es(U.value,A||P)},Lt=()=>{if(e.multiple)s.selectedLabel="";else{const A=ee(e.modelValue)?e.modelValue[0]:e.modelValue,P=eo(A);s.selectedLabel=P.currentLabel,s.selected=[P];return}const w=[];ze(e.modelValue)||De(e.modelValue).forEach(A=>{w.push(eo(A))}),s.selected=w},eo=w=>{let A;const P=so(w).toLowerCase()==="object",z=so(w).toLowerCase()==="null",Ge=so(w).toLowerCase()==="undefined";for(let ft=s.cachedOptions.size-1;ft>=0;ft--){const Te=lt.value[ft];if(P?Be(Te.value,e.valueKey)===Be(w,e.valueKey):Te.value===w){A={value:w,currentLabel:Te.currentLabel,get isDisabled(){return Te.isDisabled}};break}}if(A)return A;const Vt=P?w.label:!z&&!Ge?w:"";return{value:w,currentLabel:Vt}},Ve=()=>{s.hoveringIndex=U.value.findIndex(w=>s.selected.some(A=>Ci(A)===Ci(w)))},Pt=()=>{s.selectionWidth=c.value.getBoundingClientRect().width},dn=()=>{s.calculatorWidth=p.value.getBoundingClientRect().width},to=()=>{s.collapseItemWidth=b.value.getBoundingClientRect().width},dt=()=>{var w,A;(A=(w=d.value)==null?void 0:w.updatePopper)==null||A.call(w)},fn=()=>{var w,A;(A=(w=f.value)==null?void 0:w.updatePopper)==null||A.call(w)},un=()=>{s.inputValue.length>0&&!x.value&&(x.value=!0),ct(s.inputValue)},pn=w=>{if(s.inputValue=w.target.value,e.remote)hn();else return un()},hn=Vf(()=>{un()},_t.value),mn=w=>{In(e.modelValue,w)||t(Ao,w)},lb=w=>Rf(w,A=>!s.disabledOptions.has(A)),cb=w=>{if(e.multiple&&w.code!==Wt.delete&&w.target.value.length<=0){const A=De(e.modelValue).slice(),P=lb(A);if(P<0)return;const z=A[P];A.splice(P,1),t(X,A),mn(A),t("remove-tag",z)}},db=(w,A)=>{const P=s.selected.indexOf(A);if(P>-1&&!M.value){const z=De(e.modelValue).slice();z.splice(P,1),t(X,z),mn(z),t("remove-tag",A.value)}w.stopPropagation(),oo()},Ss=w=>{w.stopPropagation();const A=e.multiple?[]:q.value;if(e.multiple)for(const P of s.selected)P.isDisabled&&A.push(P.value);t(X,A),mn(A),s.hoveringIndex=-1,x.value=!1,t("clear"),oo()},ks=w=>{var A;if(e.multiple){const P=De((A=e.modelValue)!=null?A:[]).slice(),z=Es(P,w.value);z>-1?P.splice(z,1):(e.multipleLimit<=0||P.length<e.multipleLimit)&&P.push(w.value),t(X,P),mn(P),w.created&&ct(""),e.filterable&&!e.reserveKeyword&&(s.inputValue="")}else t(X,w.value),mn(w.value),x.value=!1;oo(),!x.value&&n.nextTick(()=>{no(w)})},Es=(w=[],A)=>{if(!te(A))return w.indexOf(A);const P=e.valueKey;let z=-1;return w.some((Ge,Vt)=>n.toRaw(Be(Ge,P))===Be(A,P)?(z=Vt,!0):!1),z},no=w=>{var A,P,z,Ge,Vt;const io=ee(w)?w[0]:w;let ft=null;if(io!=null&&io.value){const Te=U.value.filter(Os=>Os.value===io.value);Te.length>0&&(ft=Te[0].$el)}if(d.value&&ft){const Te=(Ge=(z=(P=(A=d.value)==null?void 0:A.popperRef)==null?void 0:P.contentRef)==null?void 0:z.querySelector)==null?void 0:Ge.call(z,`.${r.be("dropdown","wrap")}`);Te&&Uf(Te,ft)}(Vt=C.value)==null||Vt.handleScroll()},fb=w=>{s.options.set(w.value,w),s.cachedOptions.set(w.value,w),w.disabled&&s.disabledOptions.set(w.value,w)},ub=(w,A)=>{s.options.get(w)===A&&s.options.delete(w)},pb=n.computed(()=>{var w,A;return(A=(w=d.value)==null?void 0:w.popperRef)==null?void 0:A.contentRef}),hb=()=>{s.isBeforeHide=!1,n.nextTick(()=>no(s.selected))},oo=()=>{var w;(w=u.value)==null||w.focus()},Is=()=>{var w;(w=u.value)==null||w.blur()},mb=w=>{Ss(w)},gb=()=>{x.value=!1,O.value&&Is()},yb=()=>{s.inputValue.length>0?s.inputValue="":x.value=!1},Ts=()=>{M.value||(ro&&(s.inputHovering=!0),s.menuVisibleOnFocus?s.menuVisibleOnFocus=!1:x.value=!x.value)},bb=()=>{x.value?U.value[s.hoveringIndex]&&ks(U.value[s.hoveringIndex]):Ts()},Ci=w=>te(w.value)?Be(w.value,e.valueKey):w.value,wb=n.computed(()=>U.value.filter(w=>w.visible).every(w=>w.disabled)),Cb=n.computed(()=>e.multiple?e.collapseTags?s.selected.slice(0,e.maxCollapseTags):s.selected:[]),vb=n.computed(()=>e.multiple?e.collapseTags?s.selected.slice(e.maxCollapseTags):[]:[]),As=w=>{if(!x.value){x.value=!0;return}if(!(s.options.size===0||s.filteredOptionsCount===0||I.value)&&!wb.value){w==="next"?(s.hoveringIndex++,s.hoveringIndex===s.options.size&&(s.hoveringIndex=0)):w==="prev"&&(s.hoveringIndex--,s.hoveringIndex<0&&(s.hoveringIndex=s.options.size-1));const A=U.value[s.hoveringIndex];(A.disabled===!0||A.states.groupDisabled===!0||!A.visible)&&As(w),n.nextTick(()=>no(N.value))}},Sb=()=>{if(!c.value)return 0;const w=window.getComputedStyle(c.value);return Number.parseFloat(w.gap||"6px")},kb=n.computed(()=>{const w=Sb();return{maxWidth:`${b.value&&e.maxCollapseTags===1?s.selectionWidth-s.collapseItemWidth-w:s.selectionWidth}px`}}),Eb=n.computed(()=>({maxWidth:`${s.selectionWidth}px`})),Ib=n.computed(()=>({width:`${Math.max(s.calculatorWidth,Bg)}px`}));return Re(c,Pt),Re(p,dn),Re(m,dt),Re(E,dt),Re(y,fn),Re(b,to),n.onMounted(()=>{Lt()}),{inputId:L,contentId:i,nsSelect:r,nsInput:a,states:s,isFocused:O,expanded:x,optionsArray:U,hoverOption:N,selectSize:Qn,filteredOptionsCount:ae,resetCalculatorWidth:dn,updateTooltip:dt,updateTagTooltip:fn,debouncedOnInputChange:hn,onInput:pn,deletePrevTag:cb,deleteTag:db,deleteSelected:Ss,handleOptionSelect:ks,scrollToOption:no,hasModelValue:$,shouldShowPlaceholder:Xn,currentPlaceholder:bi,mouseEnterEventName:wi,showClose:pe,iconComponent:Y,iconReverse:Z,validateState:ce,validateIcon:Ee,showNewOption:qe,updateOptions:Zn,collapseTagSize:ln,setSelected:Lt,selectDisabled:M,emptyText:Ie,handleCompositionStart:k,handleCompositionUpdate:v,handleCompositionEnd:S,onOptionCreate:fb,onOptionDestroy:ub,handleMenuEnter:hb,focus:oo,blur:Is,handleClearClick:mb,handleClickOutside:gb,handleEsc:yb,toggleMenu:Ts,selectOption:bb,getValueKey:Ci,navigateOptions:As,dropdownMenuVisible:yi,showTagList:Cb,collapseTagList:vb,tagStyle:kb,collapseTagStyle:Eb,inputStyle:Ib,popperRef:pb,inputRef:u,tooltipRef:d,tagTooltipRef:f,calculatorRef:p,prefixRef:g,suffixRef:h,selectRef:l,wrapperRef:E,selectionRef:c,scrollbarRef:C,menuRef:m,tagMenuRef:y,collapseItemRef:b}};var _g=n.defineComponent({name:"ElOptions",setup(e,{slots:t}){const o=n.inject(Wn);let i=[];return()=>{var r,a;const s=(r=t.default)==null?void 0:r.call(t),l=[];function c(d){ee(d)&&d.forEach(f=>{var u,p,g,h;const m=(u=(f==null?void 0:f.type)||{})==null?void 0:u.name;m==="ElOptionGroup"?c(!me(f.children)&&!ee(f.children)&&Q((p=f.children)==null?void 0:p.default)?(g=f.children)==null?void 0:g.default():f.children):m==="ElOption"?l.push((h=f.props)==null?void 0:h.value):ee(f.children)&&c(f.children)})}return s.length&&c((a=s[0])==null?void 0:a.children),In(l,i)||(i=l,o&&(o.states.optionValues=l)),s}}});const Lg=R({name:String,id:String,modelValue:{type:[Array,String,Number,Boolean,Object],default:void 0},autocomplete:{type:String,default:"off"},automaticDropdown:Boolean,size:Et,effect:{type:_(String),default:"light"},disabled:Boolean,clearable:Boolean,filterable:Boolean,allowCreate:Boolean,loading:Boolean,popperClass:{type:String,default:""},popperOptions:{type:_(Object),default:()=>({})},remote:Boolean,loadingText:String,noMatchText:String,noDataText:String,remoteMethod:Function,filterMethod:Function,multiple:Boolean,multipleLimit:{type:Number,default:0},placeholder:{type:String},defaultFirstOption:Boolean,reserveKeyword:{type:Boolean,default:!0},valueKey:{type:String,default:"value"},collapseTags:Boolean,collapseTagsTooltip:Boolean,maxCollapseTags:{type:Number,default:1},teleported:se.teleported,persistent:{type:Boolean,default:!0},clearIcon:{type:gt,default:W.CircleClose},fitInputWidth:Boolean,suffixIcon:{type:gt,default:W.ArrowDown},tagType:{...oi.type,default:"info"},tagEffect:{...oi.effect,default:"light"},validateEvent:{type:Boolean,default:!0},remoteShowSuffix:Boolean,placement:{type:_(String),values:xn,default:"bottom-start"},fallbackPlacements:{type:_(Array),default:["bottom-start","top-start","right","left"]},appendTo:String,...Tp,...rt(["ariaLabel"])}),fs="ElSelect",Pg=n.defineComponent({name:fs,componentName:fs,components:{ElSelectMenu:xg,ElOption:ri,ElOptions:_g,ElTag:Wm,ElScrollbar:qp,ElTooltip:Ra,ElIcon:be},directives:{ClickOutside:ym},props:Lg,emits:[X,Ao,"remove-tag","clear","visible-change","focus","blur"],setup(e,{emit:t}){const o=n.computed(()=>{const{modelValue:a,multiple:s}=e,l=s?[]:void 0;return ee(a)?s?a:l:s?l:a}),i=n.reactive({...n.toRefs(e),modelValue:o}),r=Ng(i,t);return n.provide(Wn,n.reactive({props:i,states:r.states,optionsArray:r.optionsArray,handleOptionSelect:r.handleOptionSelect,onOptionCreate:r.onOptionCreate,onOptionDestroy:r.onOptionDestroy,selectRef:r.selectRef,setSelected:r.setSelected})),{...r,modelValue:o}}});function Vg(e,t,o,i,r,a){const s=n.resolveComponent("el-tag"),l=n.resolveComponent("el-tooltip"),c=n.resolveComponent("el-icon"),d=n.resolveComponent("el-option"),f=n.resolveComponent("el-options"),u=n.resolveComponent("el-scrollbar"),p=n.resolveComponent("el-select-menu"),g=n.resolveDirective("click-outside");return n.withDirectives((n.openBlock(),n.createElementBlock("div",{ref:"selectRef",class:n.normalizeClass([e.nsSelect.b(),e.nsSelect.m(e.selectSize)]),[n.toHandlerKey(e.mouseEnterEventName)]:h=>e.states.inputHovering=!0,onMouseleave:h=>e.states.inputHovering=!1},[n.createVNode(l,{ref:"tooltipRef",visible:e.dropdownMenuVisible,placement:e.placement,teleported:e.teleported,"popper-class":[e.nsSelect.e("popper"),e.popperClass],"popper-options":e.popperOptions,"fallback-placements":e.fallbackPlacements,effect:e.effect,pure:"",trigger:"click",transition:`${e.nsSelect.namespace.value}-zoom-in-top`,"stop-popper-mouse-event":!1,"gpu-acceleration":!1,persistent:e.persistent,"append-to":e.appendTo,onBeforeShow:e.handleMenuEnter,onHide:h=>e.states.isBeforeHide=!1},{default:n.withCtx(()=>{var h;return[n.createElementVNode("div",{ref:"wrapperRef",class:n.normalizeClass([e.nsSelect.e("wrapper"),e.nsSelect.is("focused",e.isFocused),e.nsSelect.is("hovering",e.states.inputHovering),e.nsSelect.is("filterable",e.filterable),e.nsSelect.is("disabled",e.selectDisabled)]),onClick:n.withModifiers(e.toggleMenu,["prevent"])},[e.$slots.prefix?(n.openBlock(),n.createElementBlock("div",{key:0,ref:"prefixRef",class:n.normalizeClass(e.nsSelect.e("prefix"))},[n.renderSlot(e.$slots,"prefix")],2)):n.createCommentVNode("v-if",!0),n.createElementVNode("div",{ref:"selectionRef",class:n.normalizeClass([e.nsSelect.e("selection"),e.nsSelect.is("near",e.multiple&&!e.$slots.prefix&&!!e.states.selected.length)])},[e.multiple?n.renderSlot(e.$slots,"tag",{key:0},()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.showTagList,m=>(n.openBlock(),n.createElementBlock("div",{key:e.getValueKey(m),class:n.normalizeClass(e.nsSelect.e("selected-item"))},[n.createVNode(s,{closable:!e.selectDisabled&&!m.isDisabled,size:e.collapseTagSize,type:e.tagType,effect:e.tagEffect,"disable-transitions":"",style:n.normalizeStyle(e.tagStyle),onClose:y=>e.deleteTag(y,m)},{default:n.withCtx(()=>[n.createElementVNode("span",{class:n.normalizeClass(e.nsSelect.e("tags-text"))},[n.renderSlot(e.$slots,"label",{label:m.currentLabel,value:m.value},()=>[n.createTextVNode(n.toDisplayString(m.currentLabel),1)])],2)]),_:2},1032,["closable","size","type","effect","style","onClose"])],2))),128)),e.collapseTags&&e.states.selected.length>e.maxCollapseTags?(n.openBlock(),n.createBlock(l,{key:0,ref:"tagTooltipRef",disabled:e.dropdownMenuVisible||!e.collapseTagsTooltip,"fallback-placements":["bottom","top","right","left"],effect:e.effect,placement:"bottom",teleported:e.teleported},{default:n.withCtx(()=>[n.createElementVNode("div",{ref:"collapseItemRef",class:n.normalizeClass(e.nsSelect.e("selected-item"))},[n.createVNode(s,{closable:!1,size:e.collapseTagSize,type:e.tagType,effect:e.tagEffect,"disable-transitions":"",style:n.normalizeStyle(e.collapseTagStyle)},{default:n.withCtx(()=>[n.createElementVNode("span",{class:n.normalizeClass(e.nsSelect.e("tags-text"))}," + "+n.toDisplayString(e.states.selected.length-e.maxCollapseTags),3)]),_:1},8,["size","type","effect","style"])],2)]),content:n.withCtx(()=>[n.createElementVNode("div",{ref:"tagMenuRef",class:n.normalizeClass(e.nsSelect.e("selection"))},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.collapseTagList,m=>(n.openBlock(),n.createElementBlock("div",{key:e.getValueKey(m),class:n.normalizeClass(e.nsSelect.e("selected-item"))},[n.createVNode(s,{class:"in-tooltip",closable:!e.selectDisabled&&!m.isDisabled,size:e.collapseTagSize,type:e.tagType,effect:e.tagEffect,"disable-transitions":"",onClose:y=>e.deleteTag(y,m)},{default:n.withCtx(()=>[n.createElementVNode("span",{class:n.normalizeClass(e.nsSelect.e("tags-text"))},[n.renderSlot(e.$slots,"label",{label:m.currentLabel,value:m.value},()=>[n.createTextVNode(n.toDisplayString(m.currentLabel),1)])],2)]),_:2},1032,["closable","size","type","effect","onClose"])],2))),128))],2)]),_:3},8,["disabled","effect","teleported"])):n.createCommentVNode("v-if",!0)]):n.createCommentVNode("v-if",!0),e.selectDisabled?n.createCommentVNode("v-if",!0):(n.openBlock(),n.createElementBlock("div",{key:1,class:n.normalizeClass([e.nsSelect.e("selected-item"),e.nsSelect.e("input-wrapper"),e.nsSelect.is("hidden",!e.filterable)])},[n.withDirectives(n.createElementVNode("input",{id:e.inputId,ref:"inputRef","onUpdate:modelValue":m=>e.states.inputValue=m,type:"text",name:e.name,class:n.normalizeClass([e.nsSelect.e("input"),e.nsSelect.is(e.selectSize)]),disabled:e.selectDisabled,autocomplete:e.autocomplete,style:n.normalizeStyle(e.inputStyle),role:"combobox",readonly:!e.filterable,spellcheck:"false","aria-activedescendant":((h=e.hoverOption)==null?void 0:h.id)||"","aria-controls":e.contentId,"aria-expanded":e.dropdownMenuVisible,"aria-label":e.ariaLabel,"aria-autocomplete":"none","aria-haspopup":"listbox",onKeydown:[n.withKeys(n.withModifiers(m=>e.navigateOptions("next"),["stop","prevent"]),["down"]),n.withKeys(n.withModifiers(m=>e.navigateOptions("prev"),["stop","prevent"]),["up"]),n.withKeys(n.withModifiers(e.handleEsc,["stop","prevent"]),["esc"]),n.withKeys(n.withModifiers(e.selectOption,["stop","prevent"]),["enter"]),n.withKeys(n.withModifiers(e.deletePrevTag,["stop"]),["delete"])],onCompositionstart:e.handleCompositionStart,onCompositionupdate:e.handleCompositionUpdate,onCompositionend:e.handleCompositionEnd,onInput:e.onInput,onClick:n.withModifiers(e.toggleMenu,["stop"])},null,46,["id","onUpdate:modelValue","name","disabled","autocomplete","readonly","aria-activedescendant","aria-controls","aria-expanded","aria-label","onKeydown","onCompositionstart","onCompositionupdate","onCompositionend","onInput","onClick"]),[[n.vModelText,e.states.inputValue]]),e.filterable?(n.openBlock(),n.createElementBlock("span",{key:0,ref:"calculatorRef","aria-hidden":"true",class:n.normalizeClass(e.nsSelect.e("input-calculator")),textContent:n.toDisplayString(e.states.inputValue)},null,10,["textContent"])):n.createCommentVNode("v-if",!0)],2)),e.shouldShowPlaceholder?(n.openBlock(),n.createElementBlock("div",{key:2,class:n.normalizeClass([e.nsSelect.e("selected-item"),e.nsSelect.e("placeholder"),e.nsSelect.is("transparent",!e.hasModelValue||e.expanded&&!e.states.inputValue)])},[e.hasModelValue?n.renderSlot(e.$slots,"label",{key:0,label:e.currentPlaceholder,value:e.modelValue},()=>[n.createElementVNode("span",null,n.toDisplayString(e.currentPlaceholder),1)]):(n.openBlock(),n.createElementBlock("span",{key:1},n.toDisplayString(e.currentPlaceholder),1))],2)):n.createCommentVNode("v-if",!0)],2),n.createElementVNode("div",{ref:"suffixRef",class:n.normalizeClass(e.nsSelect.e("suffix"))},[e.iconComponent&&!e.showClose?(n.openBlock(),n.createBlock(c,{key:0,class:n.normalizeClass([e.nsSelect.e("caret"),e.nsSelect.e("icon"),e.iconReverse])},{default:n.withCtx(()=>[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.iconComponent)))]),_:1},8,["class"])):n.createCommentVNode("v-if",!0),e.showClose&&e.clearIcon?(n.openBlock(),n.createBlock(c,{key:1,class:n.normalizeClass([e.nsSelect.e("caret"),e.nsSelect.e("icon"),e.nsSelect.e("clear")]),onClick:e.handleClearClick},{default:n.withCtx(()=>[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.clearIcon)))]),_:1},8,["class","onClick"])):n.createCommentVNode("v-if",!0),e.validateState&&e.validateIcon?(n.openBlock(),n.createBlock(c,{key:2,class:n.normalizeClass([e.nsInput.e("icon"),e.nsInput.e("validateIcon")])},{default:n.withCtx(()=>[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.validateIcon)))]),_:1},8,["class"])):n.createCommentVNode("v-if",!0)],2)],10,["onClick"])]}),content:n.withCtx(()=>[n.createVNode(p,{ref:"menuRef"},{default:n.withCtx(()=>[e.$slots.header?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(e.nsSelect.be("dropdown","header")),onClick:n.withModifiers(()=>{},["stop"])},[n.renderSlot(e.$slots,"header")],10,["onClick"])):n.createCommentVNode("v-if",!0),n.withDirectives(n.createVNode(u,{id:e.contentId,ref:"scrollbarRef",tag:"ul","wrap-class":e.nsSelect.be("dropdown","wrap"),"view-class":e.nsSelect.be("dropdown","list"),class:n.normalizeClass([e.nsSelect.is("empty",e.filteredOptionsCount===0)]),role:"listbox","aria-label":e.ariaLabel,"aria-orientation":"vertical"},{default:n.withCtx(()=>[e.showNewOption?(n.openBlock(),n.createBlock(d,{key:0,value:e.states.inputValue,created:!0},null,8,["value"])):n.createCommentVNode("v-if",!0),n.createVNode(f,null,{default:n.withCtx(()=>[n.renderSlot(e.$slots,"default")]),_:3})]),_:3},8,["id","wrap-class","view-class","class","aria-label"]),[[n.vShow,e.states.options.size>0&&!e.loading]]),e.$slots.loading&&e.loading?(n.openBlock(),n.createElementBlock("div",{key:1,class:n.normalizeClass(e.nsSelect.be("dropdown","loading"))},[n.renderSlot(e.$slots,"loading")],2)):e.loading||e.filteredOptionsCount===0?(n.openBlock(),n.createElementBlock("div",{key:2,class:n.normalizeClass(e.nsSelect.be("dropdown","empty"))},[n.renderSlot(e.$slots,"empty",{},()=>[n.createElementVNode("span",null,n.toDisplayString(e.emptyText),1)])],2)):n.createCommentVNode("v-if",!0),e.$slots.footer?(n.openBlock(),n.createElementBlock("div",{key:3,class:n.normalizeClass(e.nsSelect.be("dropdown","footer")),onClick:n.withModifiers(()=>{},["stop"])},[n.renderSlot(e.$slots,"footer")],10,["onClick"])):n.createCommentVNode("v-if",!0)]),_:3},512)]),_:3},8,["visible","placement","teleported","popper-class","popper-options","fallback-placements","effect","transition","persistent","append-to","onBeforeShow","onHide"])],16,["onMouseleave"])),[[g,e.handleClickOutside,e.popperRef]])}var Rg=F(Pg,[["render",Vg],["__file","select.vue"]]);const Fg=n.defineComponent({name:"ElOptionGroup",componentName:"ElOptionGroup",props:{label:String,disabled:Boolean},setup(e){const t=D("select"),o=n.ref(null),i=n.getCurrentInstance(),r=n.ref([]);n.provide(ds,n.reactive({...n.toRefs(e)}));const a=n.computed(()=>r.value.some(d=>d.visible===!0)),s=d=>{var f,u;return((f=d.type)==null?void 0:f.name)==="ElOption"&&!!((u=d.component)!=null&&u.proxy)},l=d=>{const f=De(d),u=[];return f.forEach(p=>{var g,h;s(p)?u.push(p.component.proxy):(g=p.children)!=null&&g.length?u.push(...l(p.children)):(h=p.component)!=null&&h.subTree&&u.push(...l(p.component.subTree))}),u},c=()=>{r.value=l(i.subTree)};return n.onMounted(()=>{c()}),zs(o,c,{attributes:!0,subtree:!0,childList:!0}),{groupRef:o,visible:a,ns:t}}});function Dg(e,t,o,i,r,a){return n.withDirectives((n.openBlock(),n.createElementBlock("ul",{ref:"groupRef",class:n.normalizeClass(e.ns.be("group","wrap"))},[n.createElementVNode("li",{class:n.normalizeClass(e.ns.be("group","title"))},n.toDisplayString(e.label),3),n.createElementVNode("li",null,[n.createElementVNode("ul",{class:n.normalizeClass(e.ns.b("group"))},[n.renderSlot(e.$slots,"default")],2)])],2)),[[n.vShow,e.visible]])}var us=F(Fg,[["render",Dg],["__file","option-group.vue"]]);const qn=oe(Rg,{Option:ri,OptionGroup:us}),ai=tt(ri);tt(us);const $g=R({trigger:nn.trigger,placement:ii.placement,disabled:nn.disabled,visible:se.visible,transition:se.transition,popperOptions:ii.popperOptions,tabindex:ii.tabindex,content:se.content,popperStyle:se.popperStyle,popperClass:se.popperClass,enterable:{...se.enterable,default:!0},effect:{...se.effect,default:"light"},teleported:se.teleported,title:String,width:{type:[String,Number],default:150},offset:{type:Number,default:void 0},showAfter:{type:Number,default:0},hideAfter:{type:Number,default:200},autoClose:{type:Number,default:0},showArrow:{type:Boolean,default:!0},persistent:{type:Boolean,default:!0},"onUpdate:visible":{type:Function}}),zg={"update:visible":e=>_e(e),"before-enter":()=>!0,"before-leave":()=>!0,"after-enter":()=>!0,"after-leave":()=>!0},jg="onUpdate:visible",Hg=n.defineComponent({name:"ElPopover"}),Kg=n.defineComponent({...Hg,props:$g,emits:zg,setup(e,{expose:t,emit:o}){const i=e,r=n.computed(()=>i[jg]),a=D("popover"),s=n.ref(),l=n.computed(()=>{var y;return(y=n.unref(s))==null?void 0:y.popperRef}),c=n.computed(()=>[{width:et(i.width)},i.popperStyle]),d=n.computed(()=>[a.b(),i.popperClass,{[a.m("plain")]:!!i.content}]),f=n.computed(()=>i.transition===`${a.namespace.value}-fade-in-linear`),u=()=>{var y;(y=s.value)==null||y.hide()},p=()=>{o("before-enter")},g=()=>{o("before-leave")},h=()=>{o("after-enter")},m=()=>{o("update:visible",!1),o("after-leave")};return t({popperRef:l,hide:u}),(y,b)=>(n.openBlock(),n.createBlock(n.unref(Ra),n.mergeProps({ref_key:"tooltipRef",ref:s},y.$attrs,{trigger:y.trigger,placement:y.placement,disabled:y.disabled,visible:y.visible,transition:y.transition,"popper-options":y.popperOptions,tabindex:y.tabindex,content:y.content,offset:y.offset,"show-after":y.showAfter,"hide-after":y.hideAfter,"auto-close":y.autoClose,"show-arrow":y.showArrow,"aria-label":y.title,effect:y.effect,enterable:y.enterable,"popper-class":n.unref(d),"popper-style":n.unref(c),teleported:y.teleported,persistent:y.persistent,"gpu-acceleration":n.unref(f),"onUpdate:visible":n.unref(r),onBeforeShow:p,onBeforeHide:g,onShow:h,onHide:m}),{content:n.withCtx(()=>[y.title?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(n.unref(a).e("title")),role:"title"},n.toDisplayString(y.title),3)):n.createCommentVNode("v-if",!0),n.renderSlot(y.$slots,"default",{},()=>[n.createTextVNode(n.toDisplayString(y.content),1)])]),default:n.withCtx(()=>[y.$slots.reference?n.renderSlot(y.$slots,"reference",{key:0}):n.createCommentVNode("v-if",!0)]),_:3},16,["trigger","placement","disabled","visible","transition","popper-options","tabindex","content","offset","show-after","hide-after","auto-close","show-arrow","aria-label","effect","enterable","popper-class","popper-style","teleported","persistent","gpu-acceleration","onUpdate:visible"]))}});var Ug=F(Kg,[["__file","popover.vue"]]);const ps=(e,t)=>{const o=t.arg||t.value,i=o==null?void 0:o.popperRef;i&&(i.triggerRef=e)};var Wg={mounted(e,t){ps(e,t)},updated(e,t){ps(e,t)}};const si=Jf(Wg,"popover"),an=oe(Ug,{directive:si});function qg(e){let t;const o=n.ref(!1),i=n.reactive({...e,originalPosition:"",originalOverflow:"",visible:!1});function r(p){i.text=p}function a(){const p=i.parent,g=u.ns;if(!p.vLoadingAddClassList){let h=p.getAttribute("loading-number");h=Number.parseInt(h)-1,h?p.setAttribute("loading-number",h.toString()):(Ut(p,g.bm("parent","relative")),p.removeAttribute("loading-number")),Ut(p,g.bm("parent","hidden"))}s(),f.unmount()}function s(){var p,g;(g=(p=u.$el)==null?void 0:p.parentNode)==null||g.removeChild(u.$el)}function l(){var p;e.beforeClose&&!e.beforeClose()||(o.value=!0,clearTimeout(t),t=setTimeout(c,400),i.visible=!1,(p=e.closed)==null||p.call(e))}function c(){if(!o.value)return;const p=i.parent;o.value=!1,p.vLoadingAddClassList=void 0,a()}const d=n.defineComponent({name:"ElLoading",setup(p,{expose:g}){const{ns:h,zIndex:m}=Mp("loading");return g({ns:h,zIndex:m}),()=>{const y=i.spinner||i.svg,b=n.h("svg",{class:"circular",viewBox:i.svgViewBox?i.svgViewBox:"0 0 50 50",...y?{innerHTML:y}:{}},[n.h("circle",{class:"path",cx:"25",cy:"25",r:"20",fill:"none"})]),C=i.text?n.h("p",{class:h.b("text")},[i.text]):void 0;return n.h(n.Transition,{name:h.b("fade"),onAfterLeave:c},{default:n.withCtx(()=>[n.withDirectives(n.createVNode("div",{style:{backgroundColor:i.background||""},class:[h.b("mask"),i.customClass,i.fullscreen?"is-fullscreen":""]},[n.h("div",{class:h.b("spinner")},[b,C])]),[[n.vShow,i.visible]])])})}}}),f=n.createApp(d),u=f.mount(document.createElement("div"));return{...n.toRefs(i),setText:r,removeElLoadingChild:s,close:l,handleAfterLeave:c,vm:u,get $el(){return u.$el}}}let Gn;const li=function(e={}){if(!K)return;const t=Gg(e);if(t.fullscreen&&Gn)return Gn;const o=qg({...t,closed:()=>{var r;(r=t.closed)==null||r.call(t),t.fullscreen&&(Gn=void 0)}});Jg(t,t.parent,o),hs(t,t.parent,o),t.parent.vLoadingAddClassList=()=>hs(t,t.parent,o);let i=t.parent.getAttribute("loading-number");return i?i=`${Number.parseInt(i)+1}`:i="1",t.parent.setAttribute("loading-number",i),t.parent.appendChild(o.$el),n.nextTick(()=>o.visible.value=t.visible),t.fullscreen&&(Gn=o),o},Gg=e=>{var t,o,i,r;let a;return me(e.target)?a=(t=document.querySelector(e.target))!=null?t:document.body:a=e.target||document.body,{parent:a===document.body||e.body?document.body:a,background:e.background||"",svg:e.svg||"",svgViewBox:e.svgViewBox||"",spinner:e.spinner||!1,text:e.text||"",fullscreen:a===document.body&&((o=e.fullscreen)!=null?o:!0),lock:(i=e.lock)!=null?i:!1,customClass:e.customClass||"",visible:(r=e.visible)!=null?r:!0,beforeClose:e.beforeClose,closed:e.closed,target:a}},Jg=async(e,t,o)=>{const{nextZIndex:i}=o.vm.zIndex||o.vm._.exposed.zIndex,r={};if(e.fullscreen)o.originalPosition.value=mt(document.body,"position"),o.originalOverflow.value=mt(document.body,"overflow"),r.zIndex=i();else if(e.parent===document.body){o.originalPosition.value=mt(document.body,"position"),await n.nextTick();for(const a of["top","left"]){const s=a==="top"?"scrollTop":"scrollLeft";r[a]=`${e.target.getBoundingClientRect()[a]+document.body[s]+document.documentElement[s]-Number.parseInt(mt(document.body,`margin-${a}`),10)}px`}for(const a of["height","width"])r[a]=`${e.target.getBoundingClientRect()[a]}px`}else o.originalPosition.value=mt(t,"position");for(const[a,s]of Object.entries(r))o.$el.style[a]=s},hs=(e,t,o)=>{const i=o.vm.ns||o.vm._.exposed.ns;["absolute","fixed","sticky"].includes(o.originalPosition.value)?Ut(t,i.bm("parent","relative")):To(t,i.bm("parent","relative")),e.fullscreen&&e.lock?To(t,i.bm("parent","hidden")):Ut(t,i.bm("parent","hidden"))},Jn=Symbol("ElLoading"),ms=(e,t)=>{var o,i,r,a;const s=t.instance,l=p=>te(t.value)?t.value[p]:void 0,c=p=>{const g=me(p)&&(s==null?void 0:s[p])||p;return g&&n.ref(g)},d=p=>c(l(p)||e.getAttribute(`element-loading-${Qs(p)}`)),f=(o=l("fullscreen"))!=null?o:t.modifiers.fullscreen,u={text:d("text"),svg:d("svg"),svgViewBox:d("svgViewBox"),spinner:d("spinner"),background:d("background"),customClass:d("customClass"),fullscreen:f,target:(i=l("target"))!=null?i:f?void 0:e,body:(r=l("body"))!=null?r:t.modifiers.body,lock:(a=l("lock"))!=null?a:t.modifiers.lock};e[Jn]={options:u,instance:li(u)}},Yg=(e,t)=>{for(const o of Object.keys(t))n.isRef(t[o])&&(t[o].value=e[o])},ci={mounted(e,t){t.value&&ms(e,t)},updated(e,t){const o=e[Jn];t.oldValue!==t.value&&(t.value&&!t.oldValue?ms(e,t):t.value&&t.oldValue?te(t.value)&&Yg(t.value,o.options):o==null||o.instance.close())},unmounted(e){var t;(t=e[Jn])==null||t.instance.close(),e[Jn]=null}},Zg={install(e){e.directive("loading",ci),e.config.globalProperties.$loading=li},directive:ci,service:li},st=(e,t)=>{const o=e.__vccOpts||e;for(const[i,r]of t)o[i]=r;return o},Qg={name:"SelectionsGroup",components:{Checkbox:Za,CheckboxGroup:Qa,Col:rn,Icon:be,Row:on,ElIconWarning:W.Warning},methods:{reset:function(){this.checkAll=!0,this.checkedItems=[],this.selections.forEach(e=>{!("enabled"in e)||e.enabled===!0?this.checkedItems.push(e[this.identifierKey]):this.checkAll=!1})},setCheckboxActionData:function(e,t){if(e){const o=e.querySelector('input[type="checkbox"]'),i=e.querySelector(".el-checkbox__label"),a=e.closest(".selections-container").querySelector(".checkall-display-text");let s="";o&&(s=o.checked?"checked":"unchecked"),this.checkboxActionData={selectionsTitle:a?a.innerText:"",property:o&&t!=="all"?o.value:"",label:i?i.innerText:"",checked:s}}else this.checkboxActionData={selectionsTitle:"",property:"",label:"",checked:""}},onCheckboxNativeChange:function(e){const t=e.target.closest(".checkbox-container");this.setCheckboxActionData(t,"individual")},onAllCheckboxNativeChange:function(e){const t=e.target.closest(".all-checkbox");this.setCheckboxActionData(t,"all")},visibilityToggle:function(e,t){this.$emit("changed",{key:e,value:t}),e===this.checkboxActionData.property&&(this.checkboxActionData.checked=t?"checked":"unchecked"),this.$emit("selections-data-changed",this.checkboxActionData)},checkboxMouseEnterEmit:function(e,t){this.$emit("checkboxMouseEnter",{key:e,value:t,selections:this.selections,checked:this.checkedItems})},handleCheckedItemsChange:function(e){let t=e.length;this.checkAll=t===this.selections.length},handleCheckAllChange:function(e){this.checkedItems=e?this.selections.map(t=>t[this.identifierKey]):[],this.$emit("checkAll",{keys:this.selections.map(t=>t[this.identifierKey]),value:e}),this.checkboxActionData.property=this.identifierKey,this.checkboxActionData.checked=e?"checked":"unchecked",this.$emit("selections-data-changed",this.checkboxActionData)},getBackgroundStyles:function(e){return"colour"in e&&this.colourStyle==="background"?{background:e.colour}:{}},getState:function(){const t=this.checkedItems.length===this.selections.length;return{checkAll:t,checked:t?[]:this.checkedItems}},setState:function(e){var t;if(this.checkAll=e.checkAll,this.checkedItems.length=0,(t=e.checked)!=null&&t.length)this.checkedItems.push(...e.checked),this.selections.forEach(o=>{const i=o[this.identifierKey];this.$emit("changed",{key:i,value:this.checkedItems.includes(i)})});else{const o=this.selections.map(r=>r[this.identifierKey]);let i=!1;this.checkAll&&(i=!0,this.checkedItems.push(...o)),this.$emit("checkAll",{keys:o,value:i})}},hasLineStyles:function(e){return"colour"in e&&this.colourStyle==="line"},getLineStyles:function(e){return"colour"in e&&this.colourStyle==="line"?"dashed"in e&&e.dashed===!0?{background:`repeating-linear-gradient(90deg,${e.colour},${e.colour} 6px,transparent 0,transparent 9px)`}:{background:e.colour}:{display:"None"}}},props:{colourStyle:{type:String,default:"line"},helpMessage:{type:String,default:""},identifierKey:{type:String,default:"id"},labelKey:{type:String,default:"label"},title:{type:String,default:""},selections:{type:Array,default:function(){return[]}},showAsLegend:{type:Boolean,default:!1}},computed:{isIndeterminate:function(){return!(this.checkedItems.length===0||this.checkAll)}},data:function(){return{checkedItems:[],checkAll:!0,checkboxActionData:{selectionsTitle:"",property:"",label:"",checked:""}}},mounted:function(){this.reset()}},Xg={class:"selections-container"},ey={class:"checkall-display-text"},ty={style:{"word-break":"keep-all"}},ny={class:"checkbox-group-inner"},oy=["onMouseenter","onMouseleave"];function iy(e,t,o,i,r,a){const s=W.Warning,l=be,c=an,d=rn,f=Za,u=on,p=Qa;return n.openBlock(),n.createElementBlock("div",Xg,[n.createVNode(u,null,{default:n.withCtx(()=>[n.createVNode(d,{span:12},{default:n.withCtx(()=>[n.createElementVNode("span",ey,n.toDisplayString(o.title),1),o.helpMessage?(n.openBlock(),n.createBlock(c,{key:0,width:"250",trigger:"hover",teleported:!1,"popper-class":"popover-origin-help"},n.createSlots({default:n.withCtx(()=>[n.createElementVNode("span",ty,n.toDisplayString(o.helpMessage),1)]),_:2},[o.helpMessage?{name:"reference",fn:n.withCtx(()=>[n.createVNode(l,{class:"info"},{default:n.withCtx(()=>[n.createVNode(s)]),_:1})]),key:"0"}:void 0]),1024)):n.createCommentVNode("",!0)]),_:1}),n.createVNode(d,{span:12},{default:n.withCtx(()=>[o.selections&&o.selections.length>1&&!o.showAsLegend?(n.openBlock(),n.createBlock(f,{key:0,class:"all-checkbox",indeterminate:a.isIndeterminate,modelValue:e.checkAll,"onUpdate:modelValue":t[0]||(t[0]=g=>e.checkAll=g),onChange:a.handleCheckAllChange,onClick:a.onAllCheckboxNativeChange},{default:n.withCtx(()=>t[2]||(t[2]=[n.createTextVNode("Display all")])),_:1},8,["indeterminate","modelValue","onChange","onClick"])):n.createCommentVNode("",!0)]),_:1})]),_:1}),n.createVNode(p,{class:n.normalizeClass({"show-as-legend":o.showAsLegend,"checkbox-group":!o.showAsLegend}),modelValue:e.checkedItems,"onUpdate:modelValue":t[1]||(t[1]=g=>e.checkedItems=g),size:"small",onChange:a.handleCheckedItemsChange},{default:n.withCtx(()=>[n.createElementVNode("div",ny,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(o.selections,g=>(n.openBlock(),n.createBlock(u,{key:g[o.identifierKey],label:g[o.identifierKey]},{default:n.withCtx(()=>[n.createElementVNode("div",{class:"checkbox-container",onMouseenter:h=>a.checkboxMouseEnterEmit(g[o.identifierKey],!0),onMouseleave:h=>a.checkboxMouseEnterEmit(g[o.identifierKey],!1)},[n.createVNode(f,{class:"my-checkbox",label:g[o.identifierKey],value:g[o.identifierKey],onChange:h=>a.visibilityToggle(g[o.identifierKey],h),onClick:a.onCheckboxNativeChange,checked:!("enabled"in g)||g.enabled===!0},{default:n.withCtx(()=>[n.createVNode(u,{class:"checkbox-row"},{default:n.withCtx(()=>[a.hasLineStyles(g)?(n.openBlock(),n.createBlock(d,{key:0,span:4},{default:n.withCtx(()=>[n.createElementVNode("div",{class:"path-visual",style:n.normalizeStyle(a.getLineStyles(g))},null,4)]),_:2},1024)):n.createCommentVNode("",!0),n.createVNode(d,{span:20},{default:n.withCtx(()=>[n.createElementVNode("div",{style:n.normalizeStyle(a.getBackgroundStyles(g))},n.toDisplayString(g[o.labelKey]),5)]),_:2},1024)]),_:2},1024)]),_:2},1032,["label","value","onChange","onClick","checked"])],40,oy)]),_:2},1032,["label"]))),128))])]),_:1},8,["class","modelValue","onChange"])])}const gs=st(Qg,[["render",iy],["__scopeId","data-v-35fb97d0"]]),ry='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="<fillColor>" stroke="<borderColor>" stroke-width="<borderWidth>" d="M11.0748 3.25583C11.4141 2.42845 12.5859 2.42845 12.9252 3.25583L14.6493 7.45955C14.793 7.80979 15.1221 8.04889 15.4995 8.07727L20.0303 8.41798C20.922 8.48504 21.2841 9.59942 20.6021 10.1778L17.1369 13.1166C16.8482 13.3614 16.7225 13.7483 16.8122 14.1161L17.8882 18.5304C18.1 19.3992 17.152 20.0879 16.3912 19.618L12.5255 17.2305C12.2034 17.0316 11.7966 17.0316 11.4745 17.2305L7.60881 19.618C6.84796 20.0879 5.90001 19.3992 6.1118 18.5304L7.18785 14.1161C7.2775 13.7483 7.1518 13.3614 6.86309 13.1166L3.3979 10.1778C2.71588 9.59942 3.07796 8.48504 3.96971 8.41798L8.50046 8.07727C8.87794 8.04889 9.20704 7.80979 9.35068 7.45955L11.0748 3.25583Z"/></svg>',ay={name:"LegendItem",props:{item:{type:Object,required:!0},identifierKey:{type:String,default:"id"},styleKey:{type:String,default:"style"},showStarInLegend:{type:Boolean,default:!1}},computed:{clipPathLegends:function(){return["exoid","hexagon"]},legendStyleValue:function(){return this.item[this.styleKey]==="star"?this.item[this.identifierKey]==="Featured dataset marker"&&!this.showStarInLegend?void 0:"star":this.clipPathLegends.includes(this.item[this.styleKey])?this.item[this.styleKey]:this.item[this.styleKey]==="line"?[this.item[this.styleKey],this.item.dashed?"dashed":"",this.item.arrow?"arrow":""]:[this.item[this.styleKey],"shape"]},customStyle:function(){const e=this.item.color?this.item.color:this.item.colour;let t=e||"transparent",o=this.item.border?this.item.border:"black",i=this.item.borderStyle?this.item.borderStyle:"default";if(e&&!this.item.border&&(o=t),this.item[this.styleKey]==="star"){let r=ry.replace("<fillColor>",t);return r=r.replace("<borderColor>",o),r=r.replace("<borderWidth>",o?"2":"0"),r="data:image/svg+xml,"+encodeURIComponent(r),{color:t,"background-image":`url(${r})`}}else return this.item[this.styleKey]==="line"?{color:t}:{"background-color":t,"border-color":o,"border-style":i}}},methods:{capitalise:function(e){return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()},customClipPathStyle:function(e){const t={...this.customStyle};return e?t["background-color"]=t["border-color"]:t.scale=.7,t}}},sy={key:0,class:"legend-item"},ly={class:"label"};function cy(e,t,o,i,r,a){return a.legendStyleValue?(n.openBlock(),n.createElementBlock("div",sy,[a.clipPathLegends.includes(a.legendStyleValue)?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(a.legendStyleValue),style:n.normalizeStyle(a.customClipPathStyle(!0))},[n.createElementVNode("div",{class:n.normalizeClass(a.legendStyleValue),style:n.normalizeStyle(a.customClipPathStyle(!1))},null,6)],6)):(n.openBlock(),n.createElementBlock("div",{key:1,class:n.normalizeClass(a.legendStyleValue),style:n.normalizeStyle(a.customStyle)},null,6)),n.createElementVNode("div",ly,n.toDisplayString(a.capitalise(o.item[o.identifierKey])),1)])):n.createCommentVNode("",!0)}const ys=st(ay,[["render",cy],["__scopeId","data-v-b7e5b095"]]),dy={name:"DynamicLegends",components:{LegendItem:ys},props:{identifierKey:{type:String,default:"id"},styleKey:{type:String,default:"style"},title:{type:String,default:""},legends:{type:Array,default:function(){return[]}},showStarInLegend:{type:Boolean,default:!1},showDatasetMarkerTooltip:{type:Boolean,default:!1}},data(){return{isHovering:!1,hoverTimeout:null}},computed:{tooltipVisible(){return this.showDatasetMarkerTooltip&&this.showStarInLegend||this.isHovering}},methods:{onMouseOver(){clearTimeout(this.hoverTimeout),this.hoverTimeout=setTimeout(()=>{this.isHovering=!0},500)},onMouseOut(){clearTimeout(this.hoverTimeout),this.hoverTimeout=setTimeout(()=>{this.isHovering=!1},500)}}},fy={class:"legend-group"},uy=["label"];function py(e,t,o,i,r,a){const s=ys,l=an,c=si;return n.openBlock(),n.createElementBlock("div",fy,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(o.legends,d=>(n.openBlock(),n.createElementBlock("div",{class:"legend-container",key:d[o.identifierKey],label:d[o.identifierKey]},[d[o.identifierKey]==="Featured dataset marker"?(n.openBlock(),n.createBlock(l,{key:0,content:"Location of the featured dataset",placement:"right",teleported:!0,trigger:"manual",width:"max-content",offset:0,"popper-class":"flatmap-popper flatmap-teleport-popper",visible:a.tooltipVisible,ref_for:!0,ref:"featuredMarkerPopover"},{reference:n.withCtx(()=>[n.withDirectives((n.openBlock(),n.createElementBlock("div",{onMouseover:t[0]||(t[0]=(...f)=>a.onMouseOver&&a.onMouseOver(...f)),onMouseout:t[1]||(t[1]=(...f)=>a.onMouseOut&&a.onMouseOut(...f))},[n.createVNode(s,{item:d,identifierKey:o.identifierKey,styleKey:o.styleKey,showStarInLegend:o.showStarInLegend},null,8,["item","identifierKey","styleKey","showStarInLegend"])],32)),[[c,void 0,"featuredMarkerPopover"]])]),_:2},1032,["visible"])):(n.openBlock(),n.createBlock(s,{key:1,item:d,identifierKey:o.identifierKey,styleKey:o.styleKey,showStarInLegend:o.showStarInLegend},null,8,["item","identifierKey","styleKey","showStarInLegend"]))],8,uy))),128))])}const hy=st(dy,[["render",py],["__scopeId","data-v-32c93a1a"]]),my={name:"FlatmapError",props:{flatmapError:{type:Object,default:()=>({})}}},gy={class:"flatmap-error"},yy={class:"flatmap-error-title"},by={key:0},wy={key:0,class:"flatmap-error-message"},Cy=["innerHTML"],vy={key:1};function Sy(e,t,o,i,r,a){const s=W.DocumentDelete,l=be,c=ni;return n.openBlock(),n.createElementBlock("div",gy,[n.createElementVNode("div",yy,[n.createVNode(l,{size:"24"},{default:n.withCtx(()=>[n.createVNode(s)]),_:1}),o.flatmapError.title?(n.openBlock(),n.createElementBlock("div",by,n.toDisplayString(o.flatmapError.title),1)):n.createCommentVNode("",!0)]),o.flatmapError.messages?(n.openBlock(),n.createElementBlock("div",wy,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(o.flatmapError.messages,(d,f)=>(n.openBlock(),n.createElementBlock("div",{key:f},[n.createElementVNode("div",{innerHTML:d},null,8,Cy)]))),128))])):n.createCommentVNode("",!0),o.flatmapError.button?(n.openBlock(),n.createElementBlock("div",vy,[n.createVNode(c,{class:"button",type:"primary",onClick:o.flatmapError.button.callback},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(o.flatmapError.button.text),1)]),_:1},8,["onClick"])])):n.createCommentVNode("",!0)])}const di=st(my,[["render",Sy],["__scopeId","data-v-8961361a"]]),ky={name:"SvgLegends"},Ey={class:"legends-container"},Iy={version:"1.1",id:"Layer_1",x:"0px",y:"0px",viewBox:"0 0 500 500",style:{"enable-background":"new 0 0 500 500"},xmlns:"http://www.w3.org/2000/svg","xmlns:bx":"https://boxy-svg.com"};function Ty(e,t,o,i,r,a){return n.openBlock(),n.createElementBlock("div",Ey,[(n.openBlock(),n.createElementBlock("svg",Iy,t[0]||(t[0]=[n.createStaticVNode('<defs data-v-88079d87><bx:grid height="30.447" width="32.516" x="0" y="0" data-v-88079d87></bx:grid></defs><path class="st0 st0-translate" d="M61.3,103.8c-15.9,0-28.8-12.3-28.8-27.3c0-15,13-27.3,28.8-27.3s28.8,12.3,28.8,27.3 C90.1,91.5,77.2,103.8,61.3,103.8z" data-v-88079d87></path><path class="st1" d="M40.3,356.1C29.5,345,29.8,328,41.5,317.5c11.7-10.5,29.6-9.9,40.7,1.1c11.1,11,10.5,28.1-1.2,38.5 C69.3,367.4,51.1,366.9,40.3,356.1z" data-v-88079d87></path><path class="st2" d="M61.2,396.9c-5.3,9.3-15.3,15.1-26.1,15.1l-0.4,0.6c5.1,9,5.1,20,0,29l0.4,0.6c10.7,0,20.8,5.8,26.1,15.1 c5.3-9.3,15.3-15.1,26.1-15.1c-5.3-9.3-5.3-20.9,0-30.4C76.6,412.1,66.7,406.3,61.2,396.9z" data-v-88079d87></path><text transform="matrix(0.9908 0 0 1 118.0161 171.7975)" class="st3 st4 st5" style="white-space:pre;" data-v-88079d87> Tissue region </text><path class="st6" d="M40.9,231.1c11.3-10.6,29.5-10.6,40.8,0c11.3,10.6,11.3,27.9,0,38.5c-11.3,10.6-29.5,10.6-40.8,0 C29.7,259,29.7,241.7,40.9,231.1z" data-v-88079d87></path><text transform="matrix(0.9908 0 0 1 118.0161 257.675)" class="st3 st4 st5" style="white-space:pre;" data-v-88079d87> Brain nuclei </text><text transform="matrix(0.9908 0 0 1 118.0903 345.5266)" class="st3 st4 st5" style="white-space:pre;" data-v-88079d87> Ganglia </text><text transform="matrix(0.9908 0 0 1 118.0903 433.1613)" class="st3 st4 st5" style="white-space:pre;" data-v-88079d87> Ganglionated nerve plexus </text>',9)]))),t[1]||(t[1]=n.createElementVNode("svg",{width:"72px",height:"72px",viewBox:"0 0 24 24",fill:"yellow"},null,-1))])}const Ay=st(ky,[["render",Ty],["__scopeId","data-v-88079d87"]]),Oy=`<div class="flatmap-marker">
13
13
  <svg xmlns="http://www.w3.org/2000/svg" width="28" height="39" viewBox="-1 -1 27 42">
14
14
  <ellipse style="fill: rgb(0, 0, 0); fill-opacity: 0.2;" cx="12" cy="36" rx="8" ry="4"></ellipse>
15
15
  <path d="M12.25.25a12.254 12.254 0 0 0-12 12.494c0 6.444 6.488 12.109 11.059 22.564.549 1.256 1.333 1.256 1.882 0
@@ -17,17 +17,17 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`),{initialZIndex:i,curr
17
17
  <circle cx="12.5" cy="12.5" r="9" fill="#fff"></circle>
18
18
  <text x="12" y="17.5" style="font-size:14px;fill:#000;text-anchor:middle">2</text>
19
19
  </svg>
20
- </div>`,rn=function(e){return e?[...new Set(e.map(t=>JSON.stringify(t)))].map(t=>JSON.parse(t)):[]},di=[],fi=async function(e,t){const o=t.filter(r=>di.some(s=>s.taxon===r)),i=di.filter(r=>o.includes(r.taxon)),a=t.filter(r=>!o.includes(r));if(a.length){const r=await e.queryLabels(a);if(r.length)return r.forEach(s=>{let{entity:l,label:c}=s;c==="Mammalia"&&(c="Mammalia not otherwise specified");const d={taxon:l,label:c};i.push(d),di.push(d)}),i}else return i},ui=function(e,t){if(!e||!t)return!1;let o=JSON.stringify(e),i=JSON.stringify(t);return o.indexOf(i)!==-1},xt=(e,t)=>{const o=e.name??e,i=t.name??t,a=o.toUpperCase(),r=i.toUpperCase();return a<r?-1:a>r?1:0};let Oy=function(){this.initialise=function(e){this.flatmapAPI=e,this.destinations=[],this.origins=[],this.components=[],this.destinationsWithDatasets=[],this.originsWithDatasets=[],this.componentsWithDatasets=[],this.destinationsCombinations=[],this.originsCombinations=[],this.componentsCombinations=[],this.singleConnectivityList=[],this.hasSingleConnectivityList=!1,this.rawURLs=[],this.controller=void 0,this.uberons=[],this.lookUp=[],this.connectivitySource="map",this.noMapConnectivity=!1},this.createTooltipData=async function(e,t){let o=[];t.feature.hyperlinks&&t.feature.hyperlinks.length>0?o=t.feature.hyperlinks:o=this.rawURLs;let i;if(t.provenanceTaxonomy){i=[];try{const r=await fi(e,t.provenanceTaxonomy);r.length&&r.forEach(s=>{const{label:l}=s;i.push(l)})}catch(r){console.log(r)}}return{destinations:this.destinations,origins:this.origins,components:this.components,destinationsWithDatasets:this.destinationsWithDatasets,originsWithDatasets:this.originsWithDatasets,componentsWithDatasets:this.componentsWithDatasets,destinationsCombinations:this.destinationsCombinations,originsCombinations:this.originsCombinations,componentsCombinations:this.componentsCombinations,hasSingleConnectivityList:this.singleConnectivityList.length>0,title:t.label,featureId:t.resource,hyperlinks:o,provenanceTaxonomy:t.provenanceTaxonomy,provenanceTaxonomyLabel:i,connectivitySource:this.connectivitySource,noMapConnectivity:this.noMapConnectivity}},this.updateTooltipData=function(e){return{...e,origins:this.origins,originsWithDatasets:this.originsWithDatasets,components:this.components,componentsWithDatasets:this.componentsWithDatasets,destinations:this.destinations,destinationsWithDatasets:this.destinationsWithDatasets,destinationsCombinations:this.destinationsCombinations,originsCombinations:this.originsCombinations,componentsCombinations:this.componentsCombinations,connectivitySource:this.connectivitySource,noMapConnectivity:this.noMapConnectivity}},this.createComponentsLabelList=function(e,t){let o=[];return e.forEach(i=>{o.push(this.createLabelFromNeuralNode(i[0]),t),i.length===2&&o.push(this.createLabelFromNeuralNode(i[1]),t)}),o},this.createLabelLookup=function(e,t){return new Promise(async o=>{let i={};this.uberons=[];const a=await fi(e,t);a.length&&(a.forEach(r=>{const{taxon:s,label:l}=r;i[s]=l,this.uberons.push({id:s,name:l})}),o(i))})},this.buildConnectivitySqlStatement=function(e){let t="select knowledge from knowledge where entity in (";if(e.length===1)t+=`'${e[0]}')`;else if(e.length>1)for(let o in e)t+=`'${e[o]}'${o>=e.length-1?")":","} `;return t},this.buildLabelSqlStatement=function(e){let t="select entity, label from labels where entity in (";if(e.length===1)t+=`'${e[0]}')`;else if(e.length>1)for(let o in e)t+=`'${e[o]}'${o>=e.length-1?")":","} `;return t},this.findAllIdsFromConnectivity=function(e){let t=e.connectivity.flat(),o=[...new Set(t)],i=[];return o.forEach(a=>{Array.isArray(a)?i.push(a.flat()):i.push(a)}),[...new Set(i.flat())]},this.flattenConnectivity=function(e){let t=e.flat(),o=[...new Set(t)],i=[];return o.forEach(a=>{Array.isArray(a)?i.push(a.flat()):i.push(a)}),i.flat()},this.findComponents=function(e,t,o,i){let a=e.connectivity.flat(),r=rn(a),s=[],l=!1;return r.forEach(c=>{l=!1,ui(t,c)&&(l=!0),i&&ui(i,c)&&(l=!0),ui(o,c)&&(l=!0),l||s.push(c)}),s},this.retrieveFlatmapKnowledgeForEvent=async function(e,t){this.controller&&this.controller.abort(),this.controller=new AbortController,this.controller.signal;const o=t.resource;if(this.destinations=[],this.origins=[],this.components=[],this.destinationsWithDatasets=[],this.originsWithDatasets=[],this.componentsWithDatasets=[],this.destinationsCombinations=[],this.originsCombinations=[],this.componentsCombinations=[],this.singleConnectivityList=[],this.rawURLs=[],!o||o.length===0||!o[0])return;let i=await this.queryForConnectivityNew(e,o[0]);return await Promise.all([i])},this.queryForConnectivityNew=async function(e,t,o="map",i=!0){const a=/^sckan-(\d{4})/.exec(e.knowledgeSource||""),s=(a?Number(a[1]):0)>=2026,l=e.mapMetadata.uuid,c=this.flatmapAPI;return this.connectivitySource=s?"sckan":o,s&&(this.singleConnectivityList=await ut.querySingleConnectivityList(c,l,t)),new Promise(d=>{(this.connectivitySource==="map"?this.queryMapConnectivity(e.mapMetadata.uuid,t):e.queryKnowledge(t)).then(u=>{if(this.checkConnectivityExists(u)){this.connectivitySource==="map"&&(this.noMapConnectivity=!1);let p=u;i?this.processConnectivity(e,p).then(g=>{u.references&&(this.rawURLs=[...u.references]),d(g)}):d(p)}else this.connectivitySource==="map"?(this.connectivitySource="sckan",this.noMapConnectivity=!0,e.queryKnowledge(t).then(p=>{if(this.checkConnectivityExists(p)){let g=p;i?this.processConnectivity(e,g).then(h=>{p.references&&(this.rawURLs=[...p.references]),d(h)}):d(g)}else d(!1)}).catch(()=>d(!1))):d(!1)}).catch(u=>{u.name==="AbortError"||console.warn(`Unable to get the knowledge for the entity ${t}.`),d(!1)})})},this.queryMapConnectivity=async function(e,t){const o=this.flatmapAPI+`flatmap/${e}/connectivity/${t}`;try{const i=await fetch(o);if(!i.ok)throw new Error(`Response status: ${i.status}`);return await i.json()}catch(i){throw new Error(i)}},this.queryForConnectivity=function(e,t,o,i=!0){const a={sql:this.buildConnectivitySqlStatement(t)},r={method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a),...o?{signal:o}:{}};return new Promise(s=>{fetch(`${this.flatmapAPI}knowledge/query/`,r).then(l=>l.json()).then(l=>{if(this.connectivityExists(l)){let c=JSON.parse(l.values[0][0]);i?this.processConnectivity(e,c).then(d=>{s(d)}):s(c)}else s(!1)}).catch(l=>{l.name==="AbortError"||console.error("Error:",l),s(!1)})})},this.checkConnectivityExists=function(e){var t;return e&&((t=e.connectivity)==null?void 0:t.length)},this.connectivityExists=function(e){return!!(e.values&&e.values.length>0&&JSON.parse(e.values[0][0]).connectivity&&JSON.parse(e.values[0][0]).connectivity.length>0)},this.findIfNodeIsSingle=function(e){return e.length===1?(console.error("Server returns a single node",e),e[0]):e.length===2&&e[1].length===0?e[0]:!1},this.createLabelFromNeuralNode=function(e,t){let o=this.findIfNodeIsSingle(e);if(o)return t[o];let i=t[e[0]];return e.length===2&&e[1].length>0&&e[1].forEach(a=>{t[a]==null?i+=`, ${a}`:i+=`, ${t[a]}`}),i},this.flattenAndFindDatasets=function(e,t,o){let i=this.flattenConnectivity(e),a=this.flattenConnectivity(t),r=this.flattenConnectivity(o);this.originsWithDatasets=this.uberons.filter(s=>i.indexOf(s.id)!==-1).sort(xt),this.componentsWithDatasets=this.uberons.filter(s=>a.indexOf(s.id)!==-1).sort(xt),this.destinationsWithDatasets=this.uberons.filter(s=>r.indexOf(s.id)!==-1).sort(xt),this.singleConnectivityList.length>0&&this.singleConnectivityList.forEach(s=>{const{sckanNodeId:l,sckanNodeLabel:c,mapNodeId:d,mapNodeLabel:f}=s;o.find(u=>JSON.stringify(u)===JSON.stringify(l))&&(this.destinationsCombinations.push({sckanId:l,sckanLabel:c,mapId:d,mapLabel:f}),d.forEach((u,p)=>{const g=typeof u=="string"?u:u[0];g&&this.destinationsWithDatasets.push({id:g,name:f.split(",")[p]})})),e.find(u=>JSON.stringify(u)===JSON.stringify(l))&&(this.originsCombinations.push({sckanId:l,sckanLabel:c,mapId:d,mapLabel:f}),d.forEach((u,p)=>{const g=typeof u=="string"?u:u[0];g&&this.originsWithDatasets.push({id:g,name:f.split(",")[p]})})),t.find(u=>JSON.stringify(u)===JSON.stringify(l))&&(this.componentsCombinations.push({sckanId:l,sckanLabel:c,mapId:d,mapLabel:f}),d.forEach((u,p)=>{const g=typeof u=="string"?u:u[0];g&&this.componentsWithDatasets.push({id:g,name:f.split(",")[p]})}))})},this.processConnectivity=function(e,t){return new Promise(o=>{let i=[],a=[],r;if(t&&t["node-phenotypes"]){const c=["ilxtr:hasSomaLocatedIn"],d=["ilxtr:hasAxonPresynapticElementIn","ilxtr:hasAxonSensorySubcellularElementIn"];c.forEach(f=>{f in t["node-phenotypes"]&&i.push(...t["node-phenotypes"][f])}),i=rn(i),d.forEach(f=>{f in t["node-phenotypes"]&&a.push(...t["node-phenotypes"][f])}),a=rn(a)}else a=rn(t.axons),t.somas&&t.somas.length>0&&i.push(...t.somas),t.dendrites&&t.dendrites.length>0&&i.push(...t.dendrites),i=rn(i),r=t.somas;const s=this.findComponents(t,a,i,r),l=this.findAllIdsFromConnectivity(t);this.createLabelLookup(e,l).then(c=>{this.origins=i.map(d=>this.createLabelFromNeuralNode(d,c)).sort(xt),this.components=s.map(d=>this.createLabelFromNeuralNode(d,c)).sort(xt),this.destinations=a.map(d=>this.createLabelFromNeuralNode(d,c)).sort(xt),this.flattenAndFindDatasets(i,s,a),o({ids:{dendrites:i,components:s,axons:a},labels:{origins:this.origins,components:this.components,destinations:this.destinations}})})})},this.buildPubmedSqlStatement=function(e){let t="select distinct publication from publications where entity in (";if(e.length===1)t+=`'${e[0]}')`;else if(e.length>1)for(let o in e)t+=`'${e[o]}'${o>=e.length-1?")":","} `;return t},this.buildPubmedSqlStatementForModels=function(e){return`select distinct publication from publications where entity = '${e}'`},this.queryKnowledge=async(e,t)=>{const o=`${this.flatmapAPI}knowledge/query/`,a=await fetch(o,{method:"POST",headers:{Accept:"application/json"},body:JSON.stringify({sql:e,params:t})});if(!a.ok)throw new Error(`Cannot access ${o}`);const r=await a.json();if("error"in r)throw new TypeError(r.error);return r.values}};async function My(e){const t=sessionStorage.getItem("flatmap-knowledge");if(t){const a=JSON.parse(t).filter(r=>r.references&&r.references.length).filter(r=>r.references.includes(e));if(a.length)return a.map(s=>s.id)}return[]}async function xy(e,t,o){const a=`select knowledge from knowledge
21
- where source="${pi(e)}" and
22
- knowledge like "%${t}%" order by source desc`;return(await o.queryKnowledge(a)).map(c=>JSON.parse(c)).map(c=>c.id)}function pi(e){return By(e.mapMetadata)}function By(e){let t="";if(e!=null&&e.connectivity){const o=e.connectivity;"knowledge-source"in o?t=o["knowledge-source"]:"npo"in o&&(t=`${o.npo.release}-npo`)}return t}async function Ny(e,t){const o=pi(e),i=`select knowledge from knowledge
20
+ </div>`,sn=function(e){return e?[...new Set(e.map(t=>JSON.stringify(t)))].map(t=>JSON.parse(t)):[]},xt=function(e){if(!e)return[];const t=new Set,o=[];return e.forEach(i=>{const{id:r,name:a}=i,s=`${r.toLowerCase()}:${a.toLowerCase()}`;t.has(s)||(t.add(s),o.push(i))}),o},fi=[],ui=async function(e,t){const o=t.filter(a=>fi.some(s=>s.taxon===a)),i=fi.filter(a=>o.includes(a.taxon)),r=t.filter(a=>!o.includes(a));if(r.length){const a=await e.queryLabels(r);if(a.length)return a.forEach(s=>{let{entity:l,label:c}=s;c==="Mammalia"&&(c="Mammalia not otherwise specified");const d={taxon:l,label:c};i.push(d),fi.push(d)}),i}else return i},pi=function(e,t){if(!e||!t)return!1;let o=JSON.stringify(e),i=JSON.stringify(t);return o.indexOf(i)!==-1},Bt=(e,t)=>{const o=e.name??e,i=t.name??t,r=o.toUpperCase(),a=i.toUpperCase();return r<a?-1:r>a?1:0};let My=function(){this.initialise=function(e){this.flatmapAPI=e,this.destinations=[],this.origins=[],this.components=[],this.destinationsWithDatasets=[],this.originsWithDatasets=[],this.componentsWithDatasets=[],this.destinationsCombinations=[],this.originsCombinations=[],this.componentsCombinations=[],this.singleConnectivityList=[],this.hasSingleConnectivityList=!1,this.rawURLs=[],this.controller=void 0,this.uberons=[],this.lookUp=[],this.connectivitySource="map",this.noMapConnectivity=!1},this.createTooltipData=async function(e,t){let o=[];t.feature.hyperlinks&&t.feature.hyperlinks.length>0?o=t.feature.hyperlinks:o=this.rawURLs;let i;if(t.provenanceTaxonomy){i=[];try{const a=await ui(e,t.provenanceTaxonomy);a.length&&a.forEach(s=>{const{label:l}=s;i.push(l)})}catch(a){console.log(a)}}return{destinations:this.destinations,origins:this.origins,components:this.components,destinationsWithDatasets:xt(this.destinationsWithDatasets),originsWithDatasets:xt(this.originsWithDatasets),componentsWithDatasets:xt(this.componentsWithDatasets),destinationsCombinations:this.destinationsCombinations,originsCombinations:this.originsCombinations,componentsCombinations:this.componentsCombinations,hasSingleConnectivityList:this.singleConnectivityList.length>0,title:t.label,featureId:t.resource,hyperlinks:o,provenanceTaxonomy:t.provenanceTaxonomy,provenanceTaxonomyLabel:i,connectivitySource:this.connectivitySource,noMapConnectivity:this.noMapConnectivity}},this.updateTooltipData=function(e){return{...e,origins:this.origins,originsWithDatasets:xt(this.originsWithDatasets),components:this.components,componentsWithDatasets:xt(this.componentsWithDatasets),destinations:this.destinations,destinationsWithDatasets:xt(this.destinationsWithDatasets),destinationsCombinations:this.destinationsCombinations,originsCombinations:this.originsCombinations,componentsCombinations:this.componentsCombinations,connectivitySource:this.connectivitySource,noMapConnectivity:this.noMapConnectivity}},this.createComponentsLabelList=function(e,t){let o=[];return e.forEach(i=>{o.push(this.createLabelFromNeuralNode(i[0]),t),i.length===2&&o.push(this.createLabelFromNeuralNode(i[1]),t)}),o},this.createLabelLookup=function(e,t){return new Promise(async o=>{let i={};this.uberons=[];const r=await ui(e,t);r.length&&(r.forEach(a=>{const{taxon:s,label:l}=a;i[s]=l,this.uberons.push({id:s,name:l})}),o(i))})},this.buildConnectivitySqlStatement=function(e){let t="select knowledge from knowledge where entity in (";if(e.length===1)t+=`'${e[0]}')`;else if(e.length>1)for(let o in e)t+=`'${e[o]}'${o>=e.length-1?")":","} `;return t},this.buildLabelSqlStatement=function(e){let t="select entity, label from labels where entity in (";if(e.length===1)t+=`'${e[0]}')`;else if(e.length>1)for(let o in e)t+=`'${e[o]}'${o>=e.length-1?")":","} `;return t},this.findAllIdsFromConnectivity=function(e){let t=e.connectivity.flat(),o=[...new Set(t)],i=[];return o.forEach(r=>{Array.isArray(r)?i.push(r.flat()):i.push(r)}),[...new Set(i.flat())]},this.flattenConnectivity=function(e){let t=e.flat(),o=[...new Set(t)],i=[];return o.forEach(r=>{Array.isArray(r)?i.push(r.flat()):i.push(r)}),i.flat()},this.findComponents=function(e,t,o,i){let r=e.connectivity.flat(),a=sn(r),s=[],l=!1;return a.forEach(c=>{l=!1,pi(t,c)&&(l=!0),i&&pi(i,c)&&(l=!0),pi(o,c)&&(l=!0),l||s.push(c)}),s},this.retrieveFlatmapKnowledgeForEvent=async function(e,t){this.controller&&this.controller.abort(),this.controller=new AbortController,this.controller.signal;const o=t.resource;if(this.destinations=[],this.origins=[],this.components=[],this.destinationsWithDatasets=[],this.originsWithDatasets=[],this.componentsWithDatasets=[],this.destinationsCombinations=[],this.originsCombinations=[],this.componentsCombinations=[],this.singleConnectivityList=[],this.rawURLs=[],!o||o.length===0||!o[0])return;let i=await this.queryForConnectivityNew(e,o[0]);return await Promise.all([i])},this.queryForConnectivityNew=async function(e,t,o="map",i=!0){const r=/^sckan-(\d{4})/.exec(e.knowledgeSource||""),s=(r?Number(r[1]):0)>=2026,l=e.mapMetadata.uuid,c=this.flatmapAPI;return this.connectivitySource=s?"sckan":o,s&&(this.singleConnectivityList=await ut.querySingleConnectivityList(c,l,t)),new Promise(d=>{(this.connectivitySource==="map"?this.queryMapConnectivity(e.mapMetadata.uuid,t):e.queryKnowledge(t)).then(u=>{if(this.checkConnectivityExists(u)){this.connectivitySource==="map"&&(this.noMapConnectivity=!1);let p=u;i?this.processConnectivity(e,p).then(g=>{u.references&&(this.rawURLs=[...u.references]),d(g)}):d(p)}else this.connectivitySource==="map"?(this.connectivitySource="sckan",this.noMapConnectivity=!0,e.queryKnowledge(t).then(p=>{if(this.checkConnectivityExists(p)){let g=p;i?this.processConnectivity(e,g).then(h=>{p.references&&(this.rawURLs=[...p.references]),d(h)}):d(g)}else d(!1)}).catch(()=>d(!1))):d(!1)}).catch(u=>{u.name==="AbortError"||console.warn(`Unable to get the knowledge for the entity ${t}.`),d(!1)})})},this.queryMapConnectivity=async function(e,t){const o=this.flatmapAPI+`flatmap/${e}/connectivity/${t}`;try{const i=await fetch(o);if(!i.ok)throw new Error(`Response status: ${i.status}`);return await i.json()}catch(i){throw new Error(i)}},this.queryForConnectivity=function(e,t,o,i=!0){const r={sql:this.buildConnectivitySqlStatement(t)},a={method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r),...o?{signal:o}:{}};return new Promise(s=>{fetch(`${this.flatmapAPI}knowledge/query/`,a).then(l=>l.json()).then(l=>{if(this.connectivityExists(l)){let c=JSON.parse(l.values[0][0]);i?this.processConnectivity(e,c).then(d=>{s(d)}):s(c)}else s(!1)}).catch(l=>{l.name==="AbortError"||console.error("Error:",l),s(!1)})})},this.checkConnectivityExists=function(e){var t;return e&&((t=e.connectivity)==null?void 0:t.length)},this.connectivityExists=function(e){return!!(e.values&&e.values.length>0&&JSON.parse(e.values[0][0]).connectivity&&JSON.parse(e.values[0][0]).connectivity.length>0)},this.findIfNodeIsSingle=function(e){return e.length===1?(console.error("Server returns a single node",e),e[0]):e.length===2&&e[1].length===0?e[0]:!1},this.createLabelFromNeuralNode=function(e,t){let o=this.findIfNodeIsSingle(e);if(o)return t[o];let i=t[e[0]];return e.length===2&&e[1].length>0&&e[1].forEach(r=>{t[r]==null?i+=`, ${r}`:i+=`, ${t[r]}`}),i},this.flattenAndFindDatasets=function(e,t,o){let i=this.flattenConnectivity(e),r=this.flattenConnectivity(t),a=this.flattenConnectivity(o);this.originsWithDatasets=this.uberons.filter(s=>i.indexOf(s.id)!==-1).sort(Bt),this.componentsWithDatasets=this.uberons.filter(s=>r.indexOf(s.id)!==-1).sort(Bt),this.destinationsWithDatasets=this.uberons.filter(s=>a.indexOf(s.id)!==-1).sort(Bt),this.singleConnectivityList.length>0&&this.singleConnectivityList.forEach(s=>{const{sckanNodeId:l,sckanNodeLabel:c,mapNodeId:d,mapNodeLabel:f}=s;o.find(u=>JSON.stringify(u)===JSON.stringify(l))&&(this.destinationsCombinations.push({sckanId:l,sckanLabel:c,mapId:d,mapLabel:f}),d.forEach((u,p)=>{const g=typeof u=="string"?u:u[0];g&&this.destinationsWithDatasets.push({id:g,name:f.split(",")[p]})})),e.find(u=>JSON.stringify(u)===JSON.stringify(l))&&(this.originsCombinations.push({sckanId:l,sckanLabel:c,mapId:d,mapLabel:f}),d.forEach((u,p)=>{const g=typeof u=="string"?u:u[0];g&&this.originsWithDatasets.push({id:g,name:f.split(",")[p]})})),t.find(u=>JSON.stringify(u)===JSON.stringify(l))&&(this.componentsCombinations.push({sckanId:l,sckanLabel:c,mapId:d,mapLabel:f}),d.forEach((u,p)=>{const g=typeof u=="string"?u:u[0];g&&this.componentsWithDatasets.push({id:g,name:f.split(",")[p]})}))})},this.processConnectivity=function(e,t){return new Promise(o=>{let i=[],r=[],a;if(t&&t["node-phenotypes"]){const c=["ilxtr:hasSomaLocatedIn"],d=["ilxtr:hasAxonPresynapticElementIn","ilxtr:hasAxonSensorySubcellularElementIn"];c.forEach(f=>{f in t["node-phenotypes"]&&i.push(...t["node-phenotypes"][f])}),i=sn(i),d.forEach(f=>{f in t["node-phenotypes"]&&r.push(...t["node-phenotypes"][f])}),r=sn(r)}else r=sn(t.axons),t.somas&&t.somas.length>0&&i.push(...t.somas),t.dendrites&&t.dendrites.length>0&&i.push(...t.dendrites),i=sn(i),a=t.somas;const s=this.findComponents(t,r,i,a),l=this.findAllIdsFromConnectivity(t);this.createLabelLookup(e,l).then(c=>{this.origins=i.map(d=>this.createLabelFromNeuralNode(d,c)).sort(Bt),this.components=s.map(d=>this.createLabelFromNeuralNode(d,c)).sort(Bt),this.destinations=r.map(d=>this.createLabelFromNeuralNode(d,c)).sort(Bt),this.flattenAndFindDatasets(i,s,r),o({ids:{dendrites:i,components:s,axons:r},labels:{origins:this.origins,components:this.components,destinations:this.destinations}})})})},this.buildPubmedSqlStatement=function(e){let t="select distinct publication from publications where entity in (";if(e.length===1)t+=`'${e[0]}')`;else if(e.length>1)for(let o in e)t+=`'${e[o]}'${o>=e.length-1?")":","} `;return t},this.buildPubmedSqlStatementForModels=function(e){return`select distinct publication from publications where entity = '${e}'`},this.queryKnowledge=async(e,t)=>{const o=`${this.flatmapAPI}knowledge/query/`,r=await fetch(o,{method:"POST",headers:{Accept:"application/json"},body:JSON.stringify({sql:e,params:t})});if(!r.ok)throw new Error(`Cannot access ${o}`);const a=await r.json();if("error"in a)throw new TypeError(a.error);return a.values}};async function xy(e){const t=sessionStorage.getItem("flatmap-knowledge");if(t){const r=JSON.parse(t).filter(a=>a.references&&a.references.length).filter(a=>a.references.includes(e));if(r.length)return r.map(s=>s.id)}return[]}async function By(e,t,o){const r=`select knowledge from knowledge
21
+ where source="${hi(e)}" and
22
+ knowledge like "%${t}%" order by source desc`;return(await o.queryKnowledge(r)).map(c=>JSON.parse(c)).map(c=>c.id)}function hi(e){return Ny(e.mapMetadata)}function Ny(e){let t="";if(e!=null&&e.connectivity){const o=e.connectivity;"knowledge-source"in o?t=o["knowledge-source"]:"npo"in o&&(t=`${o.npo.release}-npo`)}return t}async function _y(e,t){const o=hi(e),i=`select knowledge from knowledge
23
23
  where source="${o}"
24
- order by source desc`;ys();const a=sessionStorage.getItem("flatmap-knowledge"),r=sessionStorage.getItem("flatmap-knowledge-source");if(!a||r!==o){const l=(await t.queryKnowledge(i)).map(c=>JSON.parse(c));return sessionStorage.setItem("flatmap-knowledge",JSON.stringify(l)),sessionStorage.setItem("flatmap-knowledge-source",o),_y(),l}return JSON.parse(a)}function _y(){const o=new Date().getTime()+864e5;sessionStorage.setItem("flatmap-knowledge-expiry",o)}function Ly(){["flatmap-knowledge","flatmap-knowledge-expiry","flatmap-knowledge-source"].forEach(t=>{sessionStorage.removeItem(t)})}function ys(){const e=sessionStorage.getItem("flatmap-knowledge-expiry");new Date().getTime()>e&&Ly()}const Jn=e=>e&&e.charAt(0).toUpperCase()+e.slice(1),Bt=e=>{if(e==null)return[];if(Array.isArray(e))return e.flatMap(t=>Bt(t));if(typeof e=="string"){const t=e.trim();if(!t)return[];try{const o=JSON.parse(t);if(o!==e)return Bt(o)}catch{}return[t]}return typeof e=="number"||typeof e=="boolean"?[String(e)]:[]},Py='<svg width="195px" height="24px" viewBox="0 0 200 24" fill="yellow"><path d="M22.0748 3.25583C22.4141 2.42845 23.5859 2.42845 23.9252 3.25583L25.6493 7.45955C25.793 7.80979 26.1221 8.04889 26.4995 8.07727L31.0303 8.41798C31.922 8.48504 32.2841 9.59942 31.6021 10.1778L28.1369 13.1166C27.8482 13.3614 27.7225 13.7483 27.8122 14.1161L28.8882 18.5304C29.1 19.3992 28.152 20.0879 27.3912 19.618L23.5255 17.2305C23.2034 17.0316 22.7966 17.0316 22.4745 17.2305L18.60881 19.618C17.84796 20.0879 16.9 19.3992 17.1118 18.5304L18.18785 14.1161C18.2775 13.7483 18.1518 13.3614 17.86309 13.1166L14.3979 10.1778C13.71588 9.59942 14.07796 8.48504 14.96971 8.41798L19.50046 8.07727C19.87794 8.04889 20.20704 7.80979 20.35068 7.45955L22.0748 3.25583Z" stroke="#000000" stroke-width="2"/><text x="47" y="52%" style="white-space: pre" dominant-baseline="middle" text-anchor="start" font-family="Asap, sans-serif" font-size="12" fill="#333333">Featured dataset marker</text></svg>';var bs={exports:{}};(function(e,t){(function(o,i){e.exports=i()})(typeof window<"u"?window:hm,function(){if(typeof window>"u")return null;var o=typeof window<"u"&&window.Math==Math?window:typeof self<"u"&&self.Math==Math?self:Function("return this")(),i=o.requestAnimationFrame||o.mozRequestAnimationFrame||o.webkitRequestAnimationFrame||function(f){return o.setTimeout(f,20)},a=o.cancelAnimationFrame||o.mozCancelAnimationFrame||o.webkitCancelAnimationFrame||function(f){o.clearTimeout(f)};function r(f,u){var p=Object.prototype.toString.call(f),g=p==="[object Array]"||p==="[object NodeList]"||p==="[object HTMLCollection]"||p==="[object Object]"||typeof jQuery<"u"&&f instanceof jQuery||typeof Elements<"u"&&f instanceof Elements,h=0,m=f.length;if(g)for(;h<m;h++)u(f[h]);else u(f)}function s(f){if(!f.getBoundingClientRect)return{width:f.offsetWidth,height:f.offsetHeight};var u=f.getBoundingClientRect();return{width:Math.round(u.width),height:Math.round(u.height)}}function l(f,u){Object.keys(u).forEach(function(p){f.style[p]=u[p]})}var c=function(f,u){var p=0;function g(){var m=[];this.add=function(C){m.push(C)};var y,b;this.call=function(C){for(y=0,b=m.length;y<b;y++)m[y].call(this,C)},this.remove=function(C){var I=[];for(y=0,b=m.length;y<b;y++)m[y]!==C&&I.push(m[y]);m=I},this.length=function(){return m.length}}function h(m,y){if(m){if(m.resizedAttached){m.resizedAttached.add(y);return}m.resizedAttached=new g,m.resizedAttached.add(y),m.resizeSensor=document.createElement("div"),m.resizeSensor.dir="ltr",m.resizeSensor.className="resize-sensor";var b={pointerEvents:"none",position:"absolute",left:"0px",top:"0px",right:"0px",bottom:"0px",overflow:"hidden",zIndex:"-1",visibility:"hidden",maxWidth:"100%"},C={position:"absolute",left:"0px",top:"0px",transition:"0s"};l(m.resizeSensor,b);var I=document.createElement("div");I.className="resize-sensor-expand",l(I,b);var k=document.createElement("div");l(k,C),I.appendChild(k);var v=document.createElement("div");v.className="resize-sensor-shrink",l(v,b);var S=document.createElement("div");l(S,C),l(S,{width:"200%",height:"200%"}),v.appendChild(S),m.resizeSensor.appendChild(I),m.resizeSensor.appendChild(v),m.appendChild(m.resizeSensor);var E=window.getComputedStyle(m),O=E?E.getPropertyValue("position"):null;O!=="absolute"&&O!=="relative"&&O!=="fixed"&&O!=="sticky"&&(m.style.position="relative");var x=!1,N=0,B=s(m),T=0,L=0,q=!0;p=0;var V=function(){var Z=m.offsetWidth,ce=m.offsetHeight;k.style.width=Z+10+"px",k.style.height=ce+10+"px",I.scrollLeft=Z+10,I.scrollTop=ce+10,v.scrollLeft=Z+10,v.scrollTop=ce+10},M=function(){if(q){var Z=m.offsetWidth===0&&m.offsetHeight===0;if(Z){p||(p=i(function(){p=0,M()}));return}else q=!1}V()};m.resizeSensor.resetSensor=M;var $=function(){N=0,x&&(T=B.width,L=B.height,m.resizedAttached&&m.resizedAttached.call(B))},pe=function(){B=s(m),x=B.width!==T||B.height!==L,x&&!N&&(N=i($)),M()},Y=function(Z,ce,Ee){Z.attachEvent?Z.attachEvent("on"+ce,Ee):Z.addEventListener(ce,Ee)};Y(I,"scroll",pe),Y(v,"scroll",pe),p=i(function(){p=0,M()})}}r(f,function(m){h(m,u)}),this.detach=function(m){p||(a(p),p=0),c.detach(f,m)},this.reset=function(){f.resizeSensor.resetSensor()}};if(c.reset=function(f){r(f,function(u){u.resizeSensor.resetSensor()})},c.detach=function(f,u){r(f,function(p){p&&(p.resizedAttached&&typeof u=="function"&&(p.resizedAttached.remove(u),p.resizedAttached.length())||p.resizeSensor&&(p.contains(p.resizeSensor)&&p.removeChild(p.resizeSensor),delete p.resizeSensor,delete p.resizedAttached))})},typeof MutationObserver<"u"){var d=new MutationObserver(function(f){for(var u in f)if(f.hasOwnProperty(u))for(var p=f[u].addedNodes,g=0;g<p.length;g++)p[g].resizeSensor&&c.reset(p[g])});document.addEventListener("DOMContentLoaded",function(f){d.observe(document.body,{childList:!0,subtree:!0})})}return c})})(bs);var Vy=bs.exports;const Ry=mm(Vy),Fy=vi.defineStore("main",{state:()=>({userProfile:{token:""}}),getters:{userToken(e){return e.userProfile.token}},actions:{setUserToken(e){this.userProfile.token=e}}});function Dy(e){return{all:e=e||new Map,on:function(t,o){var i=e.get(t);i?i.push(o):e.set(t,[o])},off:function(t,o){var i=e.get(t);i&&(o?i.splice(i.indexOf(o)>>>0,1):e.set(t,[]))},emit:function(t,o){var i=e.get(t);i&&i.slice().map(function(a){a(o)}),(i=e.get("*"))&&i.slice().map(function(a){a(t,o)})}}}const hi=new Dy,$y="cannot be found on the map.",zy=e=>{let t={lng:0,lat:0},o;return e.type==="Polygon"?e.coordinates.length&&(o=e.coordinates[0]):o=e.coordinates,o&&(e.type!=="Point"?(o.map(i=>{t.lng+=parseFloat(i[0]),t.lat+=parseFloat(i[1])}),t.lng=t.lng/o.length,t.lat=t.lat/o.length):(t.lng+=parseFloat(o[0]),t.lat+=parseFloat(o[1]))),t},ws=(e,t)=>{const o=[];let i=e.organs?e.organs:e.ftus;const a=i?i.filter((r,s)=>i.findIndex(l=>l.label===r.label)===s):void 0;return a&&a.forEach(r=>{const s={label:r.label,models:r.models,key:`${t}.${r.label}`},l=ws(r,s.key);l.length>0&&(s.children=l),o.push(s)}),o},jy={name:"FlatmapVuer",components:{Button:ti,Col:on,Loading:Yg,Radio:is,Icon:be,RadioGroup:as,Row:nn,Select:Wn,Dialog:mg,MapSvgIcon:Ci.MapSvgIcon,MapSvgSpriteColor:Ci.MapSvgSpriteColor,Tooltip:ut.Tooltip,TreeControls:ut.TreeControls,SelectionsGroup:ms,SvgLegends:Ty,ElIconWarningFilled:W.WarningFilled,ElIconArrowDown:W.ArrowDown,ElIconArrowLeft:W.ArrowLeft,DrawToolbar:ut.DrawToolbar,FlatmapError:ci},beforeCreate:function(){this.setStateRequired=!1},setup(e){let t=n.inject("$annotator");return t||(t=n.markRaw(new Os.AnnotationService(`${e.flatmapAPI}annotator`)),n.provide("$annotator",t)),{annotator:t}},methods:{enableFeatureResetOnClick:function(e){this.mapImp&&this.mapImp.enableFeatureResetOnClick(e)},setVisibilityFilter:function(e){this.mapImp&&(this.mapImp.contextLost?e?this.filterToRestore=n.markRaw(JSON.parse(JSON.stringify(e))):this.filterToRestore=void 0:(e?this.mapImp.setVisibilityFilter(e):this.mapImp.clearVisibilityFilter(),this.filterToRestore=void 0))},manualAbortedOnClose:function(){this.annotationSidebar&&this.$emit("annotation-close"),this.closeTooltip(),this.annotationEventCallback({},{type:"aborted"}),this.initialiseDrawing()},initialiseDrawing:function(){this.connectionEntry={},this.activeDrawTool=void 0,this.activeDrawMode=void 0,this.drawnCreatedEvent={}},cancelDrawnFeature:function(){this.isValidDrawnCreated&&(this.annotationSidebar&&this.$emit("annotation-close"),this.closeTooltip(),this.annotationEntry=[{...this.drawnCreatedEvent.feature,resourceId:this.serverURL}],this.rollbackAnnotationEvent(),this.initialiseDrawing())},connectedFeatureTooltip:function(e){if(this.mapImp)if(e){const t=Number(e);let i={feature:t?this.mapImp.featureProperties(t):{feature:this.existDrawnFeatures.find(a=>a.id===e.trim())}};this.checkAndCreatePopups([i],!1)}else this.closeTooltip()},confirmDrawnFeature:function(){this.isValidDrawnCreated&&(this.checkAndCreatePopups([this.drawnCreatedEvent],!1),Object.keys(this.connectionEntry).length>0&&(this.annotationEntry[0].feature.connection=this.connectionEntry),this.initialiseDrawing())},toolbarEvent:function(e,t){if(!this.isValidDrawnCreated){if(this.manualAbortedOnClose(),this.doubleClickedFeature=!1,this.changeAnnotationDrawMode({mode:"simple_select"}),e==="mode")this.activeDrawMode=t;else if(e==="tool"){if(this.cancelDrawnFeature(),t){const o=t.replace(/[A-Z]/g,i=>`_${i.toLowerCase()}`);this.changeAnnotationDrawMode({mode:`draw${o}`})}this.activeDrawTool=t}}},annotationDrawModeEvent:function(e){this.activeDrawMode==="Edit"?this.doubleClickedFeature&&(e.feature.feature.geometry.type!=="Point"&&(this.changeAnnotationDrawMode({mode:"direct_select",options:{featureId:e.feature.feature.id}}),this.modifyAnnotationFeature()),this.doubleClickedFeature=!1):this.activeDrawMode==="Delete"&&(this.changeAnnotationDrawMode({mode:"simple_select",options:{featureIds:[e.feature.feature.id]}}),this.modifyAnnotationFeature())},createConnectivityBody:function(){if(Object.keys(this.connectionEntry).length>0){const e=Object.values(this.connectionEntry),t={type:"connectivity",source:e[0],target:e[e.length-1],intermediates:e.filter((o,i)=>i!==0&&i!==e.length-1)};this.annotationEntry[0].body=t}},changeAnnotationDrawMode:function(e){this.mapImp&&this.mapImp.changeAnnotationDrawMode(e)},clearAnnotationFeature:function(){this.mapImp&&this.mapImp.clearAnnotationFeature()},forceContextLoss:function(){this.mapImp&&!this.mapImp.contextLost&&!this.loading&&this.mapImp.forceContextLoss()},forceContextRestore:function(){this.mapImp&&(this.flatmapError=null,this.mapImp.forceContextRestore())},modifyAnnotationFeature:function(){this.mapImp&&this.mapImp.removeAnnotationFeature()},rollbackAnnotationEvent:function(){this.mapImp&&this.annotationEntry.length>0&&["created","updated","deleted"].includes(this.annotationEntry[0].type)&&(this.mapImp.rollbackAnnotationEvent(this.annotationEntry[0]),this.annotationEntry=[])},commitAnnotationEvent:function(e){this.mapImp&&(this.offlineAnnotationEnabled&&(this.offlineAnnotations=JSON.parse(sessionStorage.getItem("anonymous-annotation"))||[],this.offlineAnnotations.push(e),this.annotationEntry[0].type==="deleted"&&(this.offlineAnnotations=this.offlineAnnotations.filter(t=>t.resource!==this.serverURL||t.item.id!==e.item.id)),sessionStorage.setItem("anonymous-annotation",JSON.stringify(this.offlineAnnotations))),["created","updated","deleted"].includes(this.annotationEntry[0].type)&&(this.featureAnnotationSubmitted=!0,this.mapImp.commitAnnotationEvent(this.annotationEntry[0]),e.body.comment==="Position Updated"?this.annotationEntry[0].positionUpdated=!1:this.annotationEntry[0].type==="deleted"&&(this.annotationSidebar&&this.$emit("annotation-close"),this.closeTooltip(),this.annotationEntry=[]),this.addAnnotationFeature()))},fetchAnnotatedItemIds:async function(e=void 0,t=void 0){let o;return this.offlineAnnotationEnabled?(this.offlineAnnotations=JSON.parse(sessionStorage.getItem("anonymous-annotation"))||[],o=this.offlineAnnotations.filter(i=>i.resource===this.serverURL).map(i=>i.item.id)):(o=await this.annotator.annotatedItemIds(this.userToken,this.serverURL,e,t),"resource"in o&&(o=o.itemIds)),o},setFeatureAnnotated:async function(){if(this.mapImp){const e=await this.fetchAnnotatedItemIds();for(const t of e)this.mapImp.setFeatureAnnotated(t)}},fetchDrawnFeatures:async function(e,t){let o;if(this.offlineAnnotationEnabled)this.offlineAnnotations=JSON.parse(sessionStorage.getItem("anonymous-annotation"))||[],o=this.offlineAnnotations.filter(i=>i.feature&&i.resource===this.serverURL).map(i=>i.feature);else{const i=await this.fetchAnnotatedItemIds(e,t);o=await this.annotator.drawnFeatures(this.userToken,this.serverURL,i),"resource"in o&&(o=o.features)}return o},addAnnotationFeature:async function(){if(this.mapImp){this.featureAnnotationSubmitted||(this.clearAnnotationFeature(),this.loading=!0);const e=this.annotationFrom==="Anyone"?void 0:this.authorisedUser.orcid?this.authorisedUser.orcid:"0000-0000-0000-0000",t=this.annotationFrom==="Anyone"?void 0:this.annotationFrom==="Me",o=await this.fetchDrawnFeatures(e,t);if(this.existDrawnFeatures=o,this.loading=!1,!this.featureAnnotationSubmitted)for(const i of o)this.mapImp.addAnnotationFeature(i)}},showAnnotator:function(e){this.mapImp&&(this.mapImp.showAnnotator(e),this.$el.querySelector(".maplibregl-ctrl-group").style.display="none")},setAnnotationFrom:function(e){this.annotationFrom=e,this.mapImp&&(this.manualAbortedOnClose(),this.addAnnotationFeature())},emitOfflineAnnotationUpdate:function(){this.$emit("update-offline-annotation-enabled",this.offlineAnnotationEnabled)},setFlightPath3D:function(e){this.flightPath3DRadio=e,this.mapImp&&this.mapImp.enableFlightPaths(e)},viewLatestMap:function(){let e=this.biologicalSex?this.biologicalSex:void 0;this.entry==="NCBITaxon:9606"&&(e="PATO:0000384");const t={entry:this.entry,biologicalSex:e,viewport:this.mapImp.getState()};this.$emit("view-latest-map",t)},backgroundChangeCallback:function(e){this.currentBackground=e,this.mapImp&&this.mapImp.setBackgroundColour(this.currentBackground,1)},processSystems:function(e){if(this.systems.length=0,e&&e.length>0){const t={label:"All",key:"All",children:[]};e.forEach(o=>{const i={colour:o.colour,enabled:o.enabled,label:o.id,key:o.id},a=ws(o,i.key);a.length>0&&(i.children=a),t.children.push(i)}),this.systems.push(t)}},processTaxon:function(e,t){this.taxonConnectivity.length=0,fi(this.mapImp,e).then(o=>{o.length&&o.forEach(i=>{let a=!0;t&&(a=t.checkAll?!0:t.checked.includes(i.taxon)),this.taxonConnectivity.push({...i,enabled:a}),this.mapImp&&this.mapImp.enableConnectivityByTaxonIds(i.taxon,a)})})},toggleDrawer:function(){this.drawerOpen=!this.drawerOpen},setColour:function(e){this.colourRadio=e,this.mapImp&&this.mapImp.setPaint({coloured:e,outlined:this.outlinesRadio})},setOutlines:function(e){this.outlinesRadio=e,this.mapImp&&this.mapImp.setPaint({coloured:this.colourRadio,outlined:e})},setInitMapState:function(){if(this.mapImp){const e=this.mapImp.map,t=this.mapImp.options.bounds,o=[[t[0],t[1]],[t[2],t[3]]];e.setMaxBounds(null),e.setRenderWorldCopies(!1),this.initMapState=n.markRaw({initBounds:o})}},resetView:function(){if(this.mapImp){const e=this.mapImp.map,{initBounds:t}=this.initMapState;e.resetNorthPitch({animate:!1}),t&&e.fitBounds(t,{animate:!1}),this.$refs.skcanSelection&&this.$refs.skcanSelection.reset(),this.$refs.layersSelection&&this.$refs.layersSelection.reset(),this.$refs.systemsSelection&&this.$refs.pathwaysSelection.reset(),this.$refs.pathwaysSelection&&this.$refs.pathwaysSelection.reset(),this.trackEvent({event_name:"portal_maps_zoom",category:"reset"})}},zoomIn:function(){this.mapImp&&(this.mapImp.zoomIn(),this.trackEvent({event_name:"portal_maps_zoom",category:"zoom_in"}))},zoomOut:function(){this.mapImp&&(this.mapImp.zoomOut(),this.trackEvent({event_name:"portal_maps_zoom",category:"zoom_out"}))},onSelectionsDataChanged:function(e){this.$emit("pathway-selection-changed",e)},sckanSelected:function(e){this.mapImp&&this.mapImp.enableSckanPath(e.key,e.value)},checkAllSCKAN:function(e){this.mapImp&&e.keys.forEach(t=>this.mapImp.enableSckanPath(t,e.value))},zoomToFeatures:function(e){this.mapImp&&this.mapImp.zoomToFeatures(e)},retrieveConnectedPaths:async function(e,t={}){var o,i,a,r,s;if(this.mapImp){let l=[],c=(o=t.target)!=null&&o.length?t.target:[];const d=[...this.mapImp.pathModelNodes(e)],f=await this.mapImp.queryPathsForFeatures(e);if(d.length){if(!c.length){const u=(i=t.type)!=null&&i.length?t.type:["all"],p=await this.flatmapQueries.queryForConnectivityNew(this.mapImp,e[0]),g=(a=p==null?void 0:p.ids)==null?void 0:a.dendrites.flat(1/0),h=(r=p==null?void 0:p.ids)==null?void 0:r.components.flat(1/0),m=(s=p==null?void 0:p.ids)==null?void 0:s.axons.flat(1/0);let y=[];u.includes("origins")&&y.push(...g),u.includes("components")&&y.push(...h),u.includes("destinations")&&y.push(...m),u.includes("all")&&y.push(...g,...h,...m),c=[...new Set(y)]}d.forEach(u=>{this.mapImp.nodePathModels(u).forEach(g=>{const m=this.mapImp.pathModelNodes(g).map(b=>this.mapImp.featureProperties(b).models);c.filter(b=>m.includes(b)).length&&!l.includes(g)&&l.push(g)})})}else f.length&&(c.length?f.forEach(u=>{const g=this.mapImp.pathModelNodes(u).map(m=>this.mapImp.featureProperties(m).models);c.filter(m=>g.includes(m)).length&&!l.includes(u)&&l.push(u)}):l=f);return l=[...new Set([...l,...e])],l}},resetMapFilter:function(){const e=this.mapFilters.alert;let t;const o={"tile-layer":"pathways"},i={NOT:o};e.with&&!e.without?t={OR:[i,{AND:[o,{HAS:"alert"}]}]}:!e.with&&e.without?t={OR:[i,{AND:[o,{NOT:{HAS:"alert"}}]}]}:!e.with&&!e.without&&(t=i),this.setVisibilityFilter(t)},alertMouseEnterEmitted:function(e){if(this.mapImp)if(e.value){let t;const o={"tile-layer":"pathways"},i={NOT:o};if(e.key==="alert"||e.key==="withoutAlert"){const a=e.key==="alert"?{HAS:"alert"}:{NOT:{HAS:"alert"}};t={OR:[i,{AND:[o,a]}]}}this.setVisibilityFilter(t)}else this.resetMapFilter()},alertSelected:function(e){this.mapImp&&(e.key==="alert"?e.value?this.mapFilters.alert.with=!0:this.mapFilters.alert.with=!1:e.key==="withoutAlert"&&(e.value?this.mapFilters.alert.without=!0:this.mapFilters.alert.without=!1),this.resetMapFilter())},checkAllAlerts:function(e){this.mapImp&&(e.value?(this.mapFilters.alert.without=!0,this.mapFilters.alert.with=!0):(this.mapFilters.alert.without=!1,this.mapFilters.alert.with=!1),this.resetMapFilter())},systemSelected:function(e){this.mapImp&&this.mapImp.enableSystem(e.key,e.value)},checkAllSystems:function(e){this.mapImp&&this.systems[0].children.forEach(t=>this.mapImp.enableSystem(t.label,e))},ftuSelected:function(e){this.searchAndShowResult(e,!0,!0)},layersSelected:function(e){this.mapImp&&this.mapImp.enableLayer(e.key,e.value)},checkAllLayers:function(e){this.mapImp&&e.keys.forEach(t=>this.mapImp.enableLayer(t,e.value))},taxonsSelected:function(e){this.mapImp&&this.mapImp.enableConnectivityByTaxonIds(e.key,e.value)},taxonMouseEnterEmitted:function(e){if(this.mapImp)if(e.value){clearTimeout(this.taxonLeaveDelay);let t=this.mapImp.taxonFeatureIds(e.key);this.mapImp.enableConnectivityByTaxonIds(e.key,e.value),this.mapImp.zoomToGeoJSONFeatures(t,{noZoomIn:!0})}else this.taxonLeaveDelay=setTimeout(()=>{this.mapImp.unselectGeoJSONFeatures(),e.selections.forEach(t=>{let o=e.checked.includes(t.taxon);this.mapImp.enableConnectivityByTaxonIds(t.taxon,o)})},1e3)},checkAllTaxons:function(e){this.mapImp&&this.mapImp.enableConnectivityByTaxonIds(e.keys,e.value)},pathwaysSelected:function(e){this.mapImp&&this.mapImp.enablePath(e.key,e.value)},checkAllPathways:function(e){this.mapImp&&e.keys.forEach(t=>this.mapImp.enablePath(t,e.value))},enablePanZoomEvents:function(e){this.mapImp.enablePanZoomEvents(e)},annotationEventCallback:function(e,t){if(t.type==="aborted")this.featureAnnotationSubmitted?this.featureAnnotationSubmitted=!1:this.rollbackAnnotationEvent(),this.annotationEntry=[];else if(t.type==="modeChanged")t.feature.mode==="direct_select"&&(this.doubleClickedFeature=!0),this.annotationSidebar&&t.feature.mode==="simple_select"&&this.activeDrawMode==="Deleted"&&this.annotationEventCallback({},{type:"aborted"});else if(t.type==="selectionChanged"){if(this.selectedDrawnFeature=t.feature.features.length===0?void 0:t.feature.features[0],e.feature.feature=this.selectedDrawnFeature,!this.activeDrawTool)if(this.connectionEntry={},this.selectedDrawnFeature){const o=this.existDrawnFeatures.find(i=>i.id===this.selectedDrawnFeature.id);o&&o.connection&&(this.connectionEntry=o.connection),this.annotationDrawModeEvent(e)}else this.annotationSidebar&&this.previousEditEvent.type==="updated"&&(this.annotationEntry=[{...this.previousEditEvent,resourceId:this.serverURL}],this.annotationEventCallback({},{type:"aborted"})),this.previousEditEvent={}}else{if(t.type==="created"||t.type==="updated"){t.type==="updated"&&t.feature.action&&(t.positionUpdated=t.feature.action==="move");const o=this.mapImp.refreshAnnotationFeatureGeometry(t.feature);e.feature.feature=o}t.type==="created"?this.drawnCreatedEvent=e:this.checkAndCreatePopups([e])}t.type==="updated"&&(this.previousEditEvent=t),t.type==="deleted"?this.previousDeletedEvent=t:this.previousDeletedEvent={}},getTaxons:function(e){let t;return e.taxons&&(typeof e.taxons!="object"?t=JSON.parse(e.taxons):t=e.taxons),t},eventCallback:function(){return(e,t,...o)=>{if(e==="annotation"){const i={feature:t,userData:o,eventType:e};this.annotationEventCallback(i,t)}else if(e==="context-lost")this.onContextLost();else if(e==="context-restored")this.onContextRestored();else if(e==="pan-zoom")this.$emit("pan-zoom-callback",t);else{const i=t.label,a=[t.models],r=this.entry,s=this.biologicalSex,l=Bt(t.alert),c=this.getTaxons(t);let d=[{dataset:t.dataset,biologicalSex:s,taxonomy:r,resource:a,label:i,feature:t,userData:o,eventType:e,provenanceTaxonomy:c,alert:l}];if(e==="click"){const f=!t[0];if(!f){d=[];const p=t.mapUUID,g=new Set;for(let[h,m]of Object.entries(t))if(h!=="mapUUID"){const y=m.featureId,b=m.label,C=[m.models],I=this.getTaxons(m);if(g.has(y))continue;g.add(y),d.push({dataset:m.dataset,biologicalSex:s,taxonomy:r,resource:C,label:b,feature:m,userData:o,eventType:e,provenanceTaxonomy:I,alert:Bt(m.alert),mapUUID:p})}}const u=f?t:t[0];if(this.setConnectivityDataSource(this.viewingMode,u),this.viewingMode!=="Neuron Connection"){if(this.currentActive=u.models?u.models:"",this.activeDrawTool&&!this.isValidDrawnCreated){const p=u.featureId||this.existDrawnFeatures.find(g=>g.id===u.id);if(this.activeDrawTool==="LineString"&&p){const g=u.featureId?u.featureId:u.id,h=u.label?u.label:`Feature ${u.id}`;this.connectionEntry[` ${g}`]=Object.assign({label:h},Object.fromEntries(Object.entries(u).filter(([m])=>["featureId","models"].includes(m)).map(([m,y])=>[m==="featureId"?"id":m,y])))}}}t&&t.type!=="marker"&&!this.activeDrawTool&&this.checkAndCreatePopups(d)}else e==="mouseenter"&&this.viewingMode!=="Neuron Connection"&&(this.currentHover=t.models?t.models:"");this.$emit("resource-selected",d)}}},setConnectivityDataSource:function(e,t){var o;e==="Exploration"?this.connectivityDataSource=(o=t.models)!=null&&o.startsWith("ilxtr:")?t.models:"":this.connectivityDataSource=t.featureId||t.id},changeViewingMode:function(e){e&&(this.viewingMode=e),this.manualAbortedOnClose()},removeActiveTooltips:function(){this.mapImp&&this.mapImp.removePopup(),this.$el.querySelectorAll(".flatmap-tooltip-popup").forEach(t=>t.remove())},createTooltipForConnectivity:function(e,t){const o=document.createElement("div");o.classList.add("flatmap-feature-label"),e.forEach((i,a)=>{const{label:r}=i;if(o.append(Jn(r)),a+1<e.length){const s=document.createElement("hr");o.appendChild(s)}}),this.mapImp.showPopup(t,o,{className:"custom-popup flatmap-tooltip-popup",positionAtLastClick:!1,preserveSelection:!0})},showConnectivityTooltips:function(e){const{connectivityInfo:t,data:o}=e,i=[],a=[],r=[],s=[];if(t&&t.featureId&&i.push(...t.featureId),this.mapImp){if(o.forEach(p=>{const g=this.mapImp.search(p.id);if(g!=null&&g.results.length){const h=g==null?void 0:g.results[0].featureId;r.push({featureId:h,...p})}else s.push(p)}),r.length){let p=r[0].featureId;this.mapImp.annotations.forEach(g=>{const h=g["anatomical-nodes"];if(h){const m=h.join("");r.every(b=>m.indexOf(b.id)!==-1)&&(p=g.featureId,a.push(p))}}),this.createTooltipForConnectivity(r,p)}else this.removeActiveTooltips();s.length&&this.emitConnectivityError(s);const l=i.reduce((p,g)=>{const h=this.mapImp.pathways.paths[g],m=h?h.connectivity:null;if(m){const y=m.flat(1/0);p.push(...y)}return p},[]),c=[...new Set(l)],d=[...i,...c],u=[...this.mapImp.modelFeatureIdList(d),...a];this.mapImp.selectGeoJSONFeatures(u)}},showConnectivitiesByReference:function(e){this.searchConnectivitiesByReference(e).then(t=>{this.mapImp.selectFeatures(t)})},searchConnectivitiesByReference:async function(e){const t=sessionStorage.getItem("flatmap-knowledge");let o=[];return t?o=await My(e):o=await xy(this.mapImp,e,this.flatmapQueries),o},getFlatmapKnowledge:function(){let e=[];const t=sessionStorage.getItem("flatmap-knowledge");return t&&(e=JSON.parse(t)),e},emitConnectivityError:function(e){this.$emit("connectivity-error",{data:{errorData:e,errorMessage:$y}})},checkConnectivityTooltipEntry:function(e){return e!=null&&e.length?e.find(t=>{var o,i;return((o=t==null?void 0:t.destinations)==null?void 0:o.length)||((i=t==null?void 0:t.components)==null?void 0:i.length)})!==void 0:!1},changeConnectivitySource:async function(e){const{entry:t,connectivitySource:o}=e;t.mapId===this.mapImp.id&&(await this.flatmapQueries.queryForConnectivityNew(this.mapImp,t.featureId[0],o),this.tooltipEntry=this.tooltipEntry.map(i=>i.featureId[0]===t.featureId[0]?this.flatmapQueries.updateTooltipData(i):i),this.checkConnectivityTooltipEntry(this.tooltipEntry)&&this.$emit("connectivity-info-open",this.tooltipEntry))},checkAndCreatePopups:async function(e,t=!0){var o;if(this.viewingMode==="Annotation"){const i=e.filter(a=>a.feature).map(a=>a.feature);if(i.length>0)if(this.annotationSidebar&&this.previousDeletedEvent.type==="deleted"&&(this.annotationEntry=[{...this.previousDeletedEvent,resourceId:this.serverURL}],this.annotationEventCallback({},{type:"aborted"})),this.annotationEntry=[],i.forEach(a=>{var r;this.annotationEntry.push({...a,resourceId:this.serverURL,featureId:a.featureId?a.featureId:(r=a.feature)==null?void 0:r.id,offline:this.offlineAnnotationEnabled})}),i[0].feature)this.activeDrawTool||this.activeDrawMode||this.isValidDrawnCreated?(this.featureAnnotationSubmitted=!1,this.activeDrawTool&&this.createConnectivityBody(),this.displayTooltip(i[0].feature.id,zy(i[0].feature.geometry))):this.rollbackAnnotationEvent();else{const a=this.annotationEntry.filter(r=>r.featureId&&r.models).map(r=>r.models);a.length>0&&this.displayTooltip(a)}else this.annotation={}}else if(this.viewingMode==="Neuron Connection"&&t){const i=e.map(r=>r.resource[0]);if(i.find(r=>!r.startsWith("ilxtr:"))){const r=Array.isArray(i)?[...i]:[i];r.length===1&&r.push([]);const s=(o=e[0].feature)==null?void 0:o.featureId,l=this.mapImp.annotations.get(s),c=l==null?void 0:l["anatomical-nodes"],d=l==null?void 0:l.models;let f,u=r;const p=l==null?void 0:l.models;c!=null&&c.length&&(f=c.find(S=>JSON.parse(S)[0]===d)),f?u=JSON.parse(f):p&&(u=[p,[]]);const g=this.mapImp.knowledgeSource,h=u.flat(1/0),m=[...new Set(h)],b=(await ut.fetchLabels(this.flatmapAPI,m)).reduce((S,E)=>{const O=E[0],x=JSON.parse(E[1]);return S.push({id:O,label:x.label,source:x.source}),S},[]);b.sort((S,E)=>S.id===E.id?S.source===g&&E.source!==g?-1:S.source!==g&&E.source===g?1:0:S.id.localeCompare(E.id));const C=[];for(let S=0;S<m.length;S++){const E=b.find(O=>O.id===m[S]);E&&C.push(E.label)}const I=Jn(C.join(", ")),k={facet:JSON.stringify(u),facetPropPath:`flatmap.connectivity.source.${this.connectionType.toLowerCase()}`,tagLabel:I,term:this.connectionType};this.connectivityFilters.some(S=>S.facet===k.facet&&S.facetPropPath===k.facetPropPath)||this.connectivityFilters.push(k),this.$emit("neuron-connection-feature-click",{filters:this.connectivityFilters,search:""})}else await this.openConnectivityInfo(e)}else await this.openConnectivityInfo(e)},openConnectivityInfo:async function(e){Ny(this.mapImp,this.flatmapQueries);let t=[];if(this.tooltipEntry=e.filter(o=>o.resource[0]in this.mapImp.pathways.paths).map(o=>({title:o.label,featureId:o.resource,ready:!1})),this.tooltipEntry.length){this.$emit("connectivity-info-open",this.tooltipEntry);for(let i=0;i<e.length;i++)t.push(await this.getKnowledgeTooltip(e[i]));this.tooltipEntry=await Promise.all(t);const o=this.tooltipEntry.map(i=>i.featureId[0]);o.length>0&&this.displayTooltip(o)}},updateConnectivityFilters:function(e){e.length&&(this.connectivityFilters=e.filter(t=>t.facet.toLowerCase()!=="show all"))},resetConnectivityfilters:function(e){e.length?this.connectivityFilters=this.connectivityFilters.filter(t=>e.some(o=>o.facetPropPath===t.facetPropPath&&o.facet!==t.facet)):this.connectivityFilters=[]},getKnowledgeTooltip:async function(e){const t=await this.flatmapQueries.retrieveFlatmapKnowledgeForEvent(this.mapImp,e);let o=await this.flatmapQueries.createTooltipData(this.mapImp,e);return(t&&t[0]||e.feature.hyperlinks&&e.feature.hyperlinks.length>0)&&(o.featuresAlert=Bt(e.alert),o.knowledgeSource=pi(this.mapImp),o.mapId=this.mapImp.mapMetadata.id,o.mapuuid=this.mapImp.mapMetadata.uuid),o.ready=!0,o},popUpCssHacks:function(){const e=document.querySelector(".flatmap-tooltip-popup"),t=document.querySelector(".maplibregl-popup-close-button");e&&(e.style.display="none"),t.style.display="block",this.$refs.tooltip.$el.style.display="flex",t.onclick=()=>{this.$emit("connectivity-info-close"),e&&(e.style.display="block")}},closeTooltip:function(){this.$refs.tooltip&&(this.$refs.tooltip.$el.style.display="none"),document.querySelectorAll(".maplibregl-popup").forEach(e=>{e.style.display="none"})},showPopup:function(e,t,o){let i=o;this.mapImp&&(i?i.className||(i.className="custom-popup"):i={className:"custom-popup",positionAtLastClick:!0},this.mapImp.showPopup(e,t,i))},showMarkerPopup:function(e,t,o){this.mapImp&&this.mapImp.showMarkerPopup(e,t,o)},closeMinimap:function(){let e=this.$refs.flatmapContainer.querySelector(".maplibregl-ctrl-minimap");this.minimapSmall?(e.classList.add("enlarge"),e.classList.remove("shrink")):(e.classList.add("shrink"),e.classList.remove("enlarge")),this.minimapSmall=!this.minimapSmall},addResizeButtonToMinimap:function(){let e=this.$refs.flatmapContainer.querySelector(".maplibregl-ctrl-minimap");e&&(this.$refs.minimapResize&&this.$refs.minimapResize.$el.parentNode&&this.$refs.minimapResize.$el.parentNode.removeChild(this.$refs.minimapResize.$el),e.appendChild(this.$refs.minimapResize.$el),this.minimapResizeShow=!0)},setHelpMode:function(e){const t=this.hoverVisibilities.length,o=t-1,i=this.hoverVisibilities[this.helpModeActiveIndex];if(i){const r=i==null?void 0:i.refs,s=i==null?void 0:i.ref,l=this.$refs[r||s];if(l){const{parentElement:c,nextElementSibling:d}=l.$el,f=u=>u&&(u.classList.contains("pathway-container")||u.classList.contains("pathway-location"));(f(c)||f(d))&&(this.requiresDrawer?this.drawerOpen=!0:this.helpModeActiveIndex+=1)}else this.helpModeActiveIndex+=1,this.setHelpMode(e)}const a=this.hoverVisibilities[this.helpModeActiveIndex];(a==null?void 0:a.ref)==="checkBoxPopover"&&!this.showPathwayFilter&&(this.helpModeActiveIndex+=1,this.setHelpMode(e)),e||(this.helpModeActiveIndex=this.helpModeInitialIndex),this.viewingMode!=="Annotation"&&this.helpModeActiveIndex>9&&(this.helpModeActiveIndex=o),e&&this.helpModeActiveIndex>=o&&this.$emit("help-mode-last-item",!0),e&&!this.helpModeDialog?(this.inHelp=!0,this.hoverVisibilities.forEach(r=>{r.value=!0})):e&&this.helpModeDialog&&t>this.helpModeActiveIndex?this.helpModeActiveIndex>-1?(this.closeFlatmapHelpPopup(),setTimeout(()=>{this.inHelp=!1,this.hoverVisibilities.forEach(r=>{r.value=!1}),this.showTooltip(this.helpModeActiveIndex,200)},300)):this.helpModeActiveIndex===-1&&this.openFlatmapHelpPopup():(this.inHelp=!1,this.hoverVisibilities.forEach(r=>{r.value=!1}),this.closeFlatmapHelpPopup())},showTooltip:function(e,t=500){this.inHelp||(clearTimeout(this.tooltipWait[e]),this.tooltipWait[e]=setTimeout(()=>{this.hoverVisibilities[e].value=!0,this.$emit("shown-tooltip")},t))},hideTooltip:function(e,t=500){this.inHelp||(clearTimeout(this.tooltipWait[e]),this.tooltipWait[e]=setTimeout(()=>{this.hoverVisibilities[e].value=!1},t))},displayTooltip:function(e,t=void 0){let o,i={className:"flatmapvuer-popover"};if(t)o=e,i.annotationFeatureGeometry=t,this.annotationEntry.length&&(i.annotationEvent={type:this.annotationEntry[0].type,feature:this.annotationEntry[0].feature});else{const a=Array.isArray(e)?e[0]:e;a&&(o=this.mapImp.modelFeatureIds(a)[0]),this.activeDrawTool||(i.positionAtLastClick=!0)}this.connectivityInfoSidebar&&this.tooltipEntry.length&&this.viewingMode!=="Annotation"&&this.checkConnectivityTooltipEntry(this.tooltipEntry)&&this.$emit("connectivity-info-open",this.tooltipEntry),this.annotationSidebar&&this.viewingMode==="Annotation"&&this.$emit("annotation-open",{annotationEntry:this.annotationEntry,commitCallback:this.commitAnnotationEvent}),o&&!this.disableUI&&(this.viewingMode==="Annotation"&&!this.annotationSidebar||this.viewingMode==="Exploration"&&!this.connectivityInfoSidebar)&&(this.tooltipDisplay=!0,this.$nextTick(()=>{this.mapImp.showPopup(o,this.$refs.tooltip.$el,i),this.popUpCssHacks()}))},moveMap:function(e,t={}){if(this.mapImp){const{offsetX:o=0,offsetY:i=0,zoom:a=4}=t,r=this.mapImp.map,s=this.mapImp.bounds.toArray();this.mapImp.zoomToFeatures(e,{noZoomIn:!0}),this.showPathwaysDrawer(!1),s!=null&&s.length&&setTimeout(()=>{r.fitBounds(s,{offset:[o,i],zoom:a,animate:!0})})}},openFlatmapHelpPopup:function(){if(this.mapImp){let e=this.mapImp.modelFeatureIds("UBERON:0000948");e&&e.length>0&&(this.mapImp.showPopup(e[0],"Click for more information",{anchor:"top",className:"flatmap-popup-popper"}),this.$emit("shown-map-tooltip"))}},closeFlatmapHelpPopup:function(){this.$el.querySelectorAll(".maplibregl-popup-close-button").forEach(e=>{e.click()})},getLabels:function(){let e=[];if(this.mapImp){let t=this.mapImp.annotations;for(let o of t.values())o.label&&e.push(o.label);return Array.from(new Set(e))}},getVisibilityState:function(e){if(["alertSelection","pathwaysSelection","taxonSelection"].forEach(o=>{let i=this.$refs[o];i&&(e[o]=i.getState())}),this.$refs.treeControls){const o=this.$refs.treeControls.$refs.regionTree.getCheckedKeys();e.systemsSelection=o.filter(i=>!i.includes("."))}},setVisibilityState:function(e){["alertSelection","pathwaysSelection","taxonSelection"].forEach(o=>{const i=e[o];if(i){const a=this.$refs[o];a&&a.setState(i)}}),"systemsSelection"in e&&this.$refs.treeControls&&(this.$refs.treeControls.$refs.regionTree.setCheckedKeys(e.systemsSelection),this.systems[0].children.forEach(o=>{this.mapImp.enableSystem(o.key,e.systemsSelection.includes(o.key))}))},getState:function(){if(this.mapImp){let e={entry:this.entry,viewport:this.mapImp.getState()};const t=this.mapImp.getIdentifier();return this.biologicalSex?e.biologicalSex=this.biologicalSex:t&&t.biologicalSex&&(e.biologicalSex=t.biologicalSex),t&&t.uuid&&(e.uuid=t.uuid),e.viewingMode=this.viewingMode,e.searchTerm=this.searchTerm,e.flightPath3D=this.flightPath3DRadio,e.colour=this.colourRadio,e.outlines=this.outlinesRadio,e.background=this.currentBackground,this.offlineAnnotationEnabled&&(e.offlineAnnotations=sessionStorage.getItem("anonymous-annotation")),this.getVisibilityState(e),e}},setState:function(e){e&&(this.mapImp&&e.entry&&this.entry==e.entry&&(!e.biologicalSex||e.biologicalSex===this.biologicalSex)?this.restoreMapState(e):this.createFlatmap(e),this.setStateRequired=!1)},restoreMapState:function(e){if(e){if(e.viewport&&this.mapImp.setState(e.viewport),e.offlineAnnotations&&sessionStorage.setItem("anonymous-annotation",e.offlineAnnotations),e.viewingMode&&this.changeViewingMode(e.viewingMode),"flightPath3D"in e&&this.setFlightPath3D(e.flightPath3D),"colour"in e&&this.setColour(e.colour),"outlines"in e&&this.setOutlines(e.outlines),e.background&&this.backgroundChangeCallback(e.background),e.searchTerm){const t=e.searchTerm;this.searchAndShowResult(t,!0,!0)}this.setVisibilityState(e)}},setFlightPathInfo:function(e){(e===1.6||e>1.6)&&(this.displayFlightPathOption=!0,this.setFlightPath3D(!1))},createFlatmap:function(e){if(!this.mapImp&&!this.loading){this.loading=!0,this.flatmapError=null;let t={taxon:this.entry};this.uuid&&(t.uuid=this.uuid),e?(e.uuid?t={uuid:e.uuid}:e.entry&&(t.taxon=e.entry),e.biologicalSex?t.biologicalSex=e.biologicalSex:t.taxon==="NCBITaxon:9606"&&(t.biologicalSex="PATO:0000384")):this.biologicalSex&&(t.biologicalSex=this.biologicalSex),this.mapManagerRef.loadMap(t,this.eventCallback(),{minZoom:this.minZoom,tooltips:this.tooltips,minimap:!1,container:this.$refs.display,tooltipDelay:15}).then(i=>{this.mapImp=i,this.serverURL=this.mapImp.makeServerUrl("").slice(0,-1);let a=this.mapImp.details.version;this.setFlightPathInfo(a);const r=this._stateToBeSet?this._stateToBeSet:e;this.onFlatmapReady(r),this.$nextTick(()=>this.restoreMapState(r))}).catch(i=>{var a,r;if(console.error("Flatmap loading error:",i),this.flatmapError={},i.message&&i.message.indexOf("Unknown map")!==-1?(this.flatmapError.title="Unknown Map!",this.flatmapError.messages=Object.keys(t).map(s=>`${s==="uuid"?"UUID":Jn(s)}: ${t[s]}`)):(this.flatmapError.title="Error Loading Map!",this.flatmapError.messages=[i.message?i.message:i.toString(),"Please try again later or contact support if the problem persists."]),(r=(a=this.$parent)==null?void 0:a.$refs)!=null&&r.multiContainer){const s=this.$parent;this.flatmapError.button={text:"Load Default Map",callback:()=>{const l=s.initial;s.setSpecies(l,void 0,3)}}}this.loading=!1})}else e&&(this._stateToBeSet={...e},this.mapImp&&!this.loading&&this.restoreMapState(this._stateToBeSet))},computePathControlsMaximumHeight(){const e=this.$refs.display;if(e){const t=getComputedStyle(e),o=parseInt(t.paddingTop)+parseInt(t.paddingBottom),i=e.clientHeight-o;this.pathwaysMaxHeight=i-170}},mapResize:function(){try{this.computePathControlsMaximumHeight(),this.mapImp&&this.mapImp.resize()}catch{console.error("Map resize error")}},getFilterSources:function(){const e=["kind","taxons"];let t=new Set,o=new Set,i=new Map;for(const r of this.mapImp.annotations.values())if(r.source){"alert"in r?t.add(r.source):o.add(r.source);for(const[s,l]of Object.entries(r))if(e.includes(s)){i.has(s)||i.set(s,new Map);const c=i.get(s),d=f=>{const u=f;c.has(u)||c.set(u,new Set),c.get(u).add(`${r.source}`)};Array.isArray(l)?l.forEach(d):d(l)}}let a={alert:{with:[...t],without:[...o]}};for(const[r,s]of i.entries()){a[r]={};for(const[l,c]of s.entries())a[r][l]=[...c.values()]}return a},getFilterOptions:async function(e,t){const o=t||this.getFlatmapKnowledge(),i=this.pathways;return await ut.getFlatmapFilterOptions(this.flatmapAPI,e,o,i)},onFlatmapReady:function(e){var t;if(this.sensor=n.markRaw(new Ry(this.$refs.display,this.mapResize)),((t=this.mapImp.options)==null?void 0:t.style)==="functional"&&(this.isFC=!0),this.mapImp.setBackgroundOpacity(1),this.backgroundChangeCallback(this.currentBackground),this.pathways=this.mapImp.pathTypes(),this.pathways=this.pathways.filter(o=>o.enabled&&o.type!=="other"),this.processSystems(this.mapImp.getSystems()),this.processTaxon(this.mapImp.taxonIdentifiers,e?e.taxonSelection:void 0),this.containsAlert="alert"in this.mapImp.featureFilterRanges(),this.flatmapLegends=this.mapImp.flatmapLegend,this.loading=!1,this.computePathControlsMaximumHeight(),this.mapResize(),this.handleMapClick(),this.setInitMapState(),this.displayMinimap){const o={position:"top-right"};this.mapImp.createMinimap(o),this.addResizeButtonToMinimap()}this.$emit("ready",this)},handleMapClick:function(){const e=this.mapImp.map;e&&e.on("click",t=>{this.connectivityDataSource||this.$emit("connectivity-info-close"),this.connectivityDataSource=""})},onContextLost:function(){this.lastViewport=n.markRaw(this.mapImp.getState()),this.flatmapError={},this.flatmapError.title="GL context lost!",this.flatmapError.messages=[`A display issue has occurred due
24
+ order by source desc`;bs();const r=sessionStorage.getItem("flatmap-knowledge"),a=sessionStorage.getItem("flatmap-knowledge-source");if(!r||a!==o){const l=(await t.queryKnowledge(i)).map(c=>JSON.parse(c));return sessionStorage.setItem("flatmap-knowledge",JSON.stringify(l)),sessionStorage.setItem("flatmap-knowledge-source",o),Ly(),l}return JSON.parse(r)}function Ly(){const o=new Date().getTime()+864e5;sessionStorage.setItem("flatmap-knowledge-expiry",o)}function Py(){["flatmap-knowledge","flatmap-knowledge-expiry","flatmap-knowledge-source"].forEach(t=>{sessionStorage.removeItem(t)})}function bs(){const e=sessionStorage.getItem("flatmap-knowledge-expiry");new Date().getTime()>e&&Py()}const Yn=e=>e&&e.charAt(0).toUpperCase()+e.slice(1),Nt=e=>{if(e==null)return[];if(Array.isArray(e))return e.flatMap(t=>Nt(t));if(typeof e=="string"){const t=e.trim();if(!t)return[];try{const o=JSON.parse(t);if(o!==e)return Nt(o)}catch{}return[t]}return typeof e=="number"||typeof e=="boolean"?[String(e)]:[]},Vy='<svg width="195px" height="24px" viewBox="0 0 200 24" fill="yellow"><path d="M22.0748 3.25583C22.4141 2.42845 23.5859 2.42845 23.9252 3.25583L25.6493 7.45955C25.793 7.80979 26.1221 8.04889 26.4995 8.07727L31.0303 8.41798C31.922 8.48504 32.2841 9.59942 31.6021 10.1778L28.1369 13.1166C27.8482 13.3614 27.7225 13.7483 27.8122 14.1161L28.8882 18.5304C29.1 19.3992 28.152 20.0879 27.3912 19.618L23.5255 17.2305C23.2034 17.0316 22.7966 17.0316 22.4745 17.2305L18.60881 19.618C17.84796 20.0879 16.9 19.3992 17.1118 18.5304L18.18785 14.1161C18.2775 13.7483 18.1518 13.3614 17.86309 13.1166L14.3979 10.1778C13.71588 9.59942 14.07796 8.48504 14.96971 8.41798L19.50046 8.07727C19.87794 8.04889 20.20704 7.80979 20.35068 7.45955L22.0748 3.25583Z" stroke="#000000" stroke-width="2"/><text x="47" y="52%" style="white-space: pre" dominant-baseline="middle" text-anchor="start" font-family="Asap, sans-serif" font-size="12" fill="#333333">Featured dataset marker</text></svg>';var ws={exports:{}};(function(e,t){(function(o,i){e.exports=i()})(typeof window<"u"?window:mm,function(){if(typeof window>"u")return null;var o=typeof window<"u"&&window.Math==Math?window:typeof self<"u"&&self.Math==Math?self:Function("return this")(),i=o.requestAnimationFrame||o.mozRequestAnimationFrame||o.webkitRequestAnimationFrame||function(f){return o.setTimeout(f,20)},r=o.cancelAnimationFrame||o.mozCancelAnimationFrame||o.webkitCancelAnimationFrame||function(f){o.clearTimeout(f)};function a(f,u){var p=Object.prototype.toString.call(f),g=p==="[object Array]"||p==="[object NodeList]"||p==="[object HTMLCollection]"||p==="[object Object]"||typeof jQuery<"u"&&f instanceof jQuery||typeof Elements<"u"&&f instanceof Elements,h=0,m=f.length;if(g)for(;h<m;h++)u(f[h]);else u(f)}function s(f){if(!f.getBoundingClientRect)return{width:f.offsetWidth,height:f.offsetHeight};var u=f.getBoundingClientRect();return{width:Math.round(u.width),height:Math.round(u.height)}}function l(f,u){Object.keys(u).forEach(function(p){f.style[p]=u[p]})}var c=function(f,u){var p=0;function g(){var m=[];this.add=function(C){m.push(C)};var y,b;this.call=function(C){for(y=0,b=m.length;y<b;y++)m[y].call(this,C)},this.remove=function(C){var I=[];for(y=0,b=m.length;y<b;y++)m[y]!==C&&I.push(m[y]);m=I},this.length=function(){return m.length}}function h(m,y){if(m){if(m.resizedAttached){m.resizedAttached.add(y);return}m.resizedAttached=new g,m.resizedAttached.add(y),m.resizeSensor=document.createElement("div"),m.resizeSensor.dir="ltr",m.resizeSensor.className="resize-sensor";var b={pointerEvents:"none",position:"absolute",left:"0px",top:"0px",right:"0px",bottom:"0px",overflow:"hidden",zIndex:"-1",visibility:"hidden",maxWidth:"100%"},C={position:"absolute",left:"0px",top:"0px",transition:"0s"};l(m.resizeSensor,b);var I=document.createElement("div");I.className="resize-sensor-expand",l(I,b);var k=document.createElement("div");l(k,C),I.appendChild(k);var v=document.createElement("div");v.className="resize-sensor-shrink",l(v,b);var S=document.createElement("div");l(S,C),l(S,{width:"200%",height:"200%"}),v.appendChild(S),m.resizeSensor.appendChild(I),m.resizeSensor.appendChild(v),m.appendChild(m.resizeSensor);var E=window.getComputedStyle(m),O=E?E.getPropertyValue("position"):null;O!=="absolute"&&O!=="relative"&&O!=="fixed"&&O!=="sticky"&&(m.style.position="relative");var x=!1,N=0,B=s(m),T=0,L=0,q=!0;p=0;var V=function(){var Z=m.offsetWidth,ce=m.offsetHeight;k.style.width=Z+10+"px",k.style.height=ce+10+"px",I.scrollLeft=Z+10,I.scrollTop=ce+10,v.scrollLeft=Z+10,v.scrollTop=ce+10},M=function(){if(q){var Z=m.offsetWidth===0&&m.offsetHeight===0;if(Z){p||(p=i(function(){p=0,M()}));return}else q=!1}V()};m.resizeSensor.resetSensor=M;var $=function(){N=0,x&&(T=B.width,L=B.height,m.resizedAttached&&m.resizedAttached.call(B))},pe=function(){B=s(m),x=B.width!==T||B.height!==L,x&&!N&&(N=i($)),M()},Y=function(Z,ce,Ee){Z.attachEvent?Z.attachEvent("on"+ce,Ee):Z.addEventListener(ce,Ee)};Y(I,"scroll",pe),Y(v,"scroll",pe),p=i(function(){p=0,M()})}}a(f,function(m){h(m,u)}),this.detach=function(m){p||(r(p),p=0),c.detach(f,m)},this.reset=function(){f.resizeSensor.resetSensor()}};if(c.reset=function(f){a(f,function(u){u.resizeSensor.resetSensor()})},c.detach=function(f,u){a(f,function(p){p&&(p.resizedAttached&&typeof u=="function"&&(p.resizedAttached.remove(u),p.resizedAttached.length())||p.resizeSensor&&(p.contains(p.resizeSensor)&&p.removeChild(p.resizeSensor),delete p.resizeSensor,delete p.resizedAttached))})},typeof MutationObserver<"u"){var d=new MutationObserver(function(f){for(var u in f)if(f.hasOwnProperty(u))for(var p=f[u].addedNodes,g=0;g<p.length;g++)p[g].resizeSensor&&c.reset(p[g])});document.addEventListener("DOMContentLoaded",function(f){d.observe(document.body,{childList:!0,subtree:!0})})}return c})})(ws);var Ry=ws.exports;const Fy=gm(Ry),Dy=Si.defineStore("main",{state:()=>({userProfile:{token:""}}),getters:{userToken(e){return e.userProfile.token}},actions:{setUserToken(e){this.userProfile.token=e}}});function $y(e){return{all:e=e||new Map,on:function(t,o){var i=e.get(t);i?i.push(o):e.set(t,[o])},off:function(t,o){var i=e.get(t);i&&(o?i.splice(i.indexOf(o)>>>0,1):e.set(t,[]))},emit:function(t,o){var i=e.get(t);i&&i.slice().map(function(r){r(o)}),(i=e.get("*"))&&i.slice().map(function(r){r(t,o)})}}}const mi=new $y,zy="cannot be found on the map.",jy=e=>{let t={lng:0,lat:0},o;return e.type==="Polygon"?e.coordinates.length&&(o=e.coordinates[0]):o=e.coordinates,o&&(e.type!=="Point"?(o.map(i=>{t.lng+=parseFloat(i[0]),t.lat+=parseFloat(i[1])}),t.lng=t.lng/o.length,t.lat=t.lat/o.length):(t.lng+=parseFloat(o[0]),t.lat+=parseFloat(o[1]))),t},Cs=(e,t)=>{const o=[];let i=e.organs?e.organs:e.ftus;const r=i?i.filter((a,s)=>i.findIndex(l=>l.label===a.label)===s):void 0;return r&&r.forEach(a=>{const s={label:a.label,models:a.models,key:`${t}.${a.label}`},l=Cs(a,s.key);l.length>0&&(s.children=l),o.push(s)}),o},Hy={name:"FlatmapVuer",components:{Button:ni,Col:rn,Loading:Zg,Radio:rs,Icon:be,RadioGroup:as,Row:on,Select:qn,Dialog:gg,MapSvgIcon:vi.MapSvgIcon,MapSvgSpriteColor:vi.MapSvgSpriteColor,Tooltip:ut.Tooltip,TreeControls:ut.TreeControls,SelectionsGroup:gs,SvgLegends:Ay,ElIconWarningFilled:W.WarningFilled,ElIconArrowDown:W.ArrowDown,ElIconArrowLeft:W.ArrowLeft,DrawToolbar:ut.DrawToolbar,FlatmapError:di},beforeCreate:function(){this.setStateRequired=!1},setup(e){let t=n.inject("$annotator");return t||(t=n.markRaw(new Ms.AnnotationService(`${e.flatmapAPI}annotator`)),n.provide("$annotator",t)),{annotator:t}},methods:{enableFeatureResetOnClick:function(e){this.mapImp&&this.mapImp.enableFeatureResetOnClick(e)},setVisibilityFilter:function(e){this.mapImp&&(this.mapImp.contextLost?e?this.filterToRestore=n.markRaw(JSON.parse(JSON.stringify(e))):this.filterToRestore=void 0:(e?this.mapImp.setVisibilityFilter(e):this.mapImp.clearVisibilityFilter(),this.filterToRestore=void 0))},manualAbortedOnClose:function(){this.annotationSidebar&&this.$emit("annotation-close"),this.closeTooltip(),this.annotationEventCallback({},{type:"aborted"}),this.initialiseDrawing()},initialiseDrawing:function(){this.connectionEntry={},this.activeDrawTool=void 0,this.activeDrawMode=void 0,this.drawnCreatedEvent={}},cancelDrawnFeature:function(){this.isValidDrawnCreated&&(this.annotationSidebar&&this.$emit("annotation-close"),this.closeTooltip(),this.annotationEntry=[{...this.drawnCreatedEvent.feature,resourceId:this.serverURL}],this.rollbackAnnotationEvent(),this.initialiseDrawing())},connectedFeatureTooltip:function(e){if(this.mapImp)if(e){const t=Number(e);let i={feature:t?this.mapImp.featureProperties(t):{feature:this.existDrawnFeatures.find(r=>r.id===e.trim())}};this.checkAndCreatePopups([i],!1)}else this.closeTooltip()},confirmDrawnFeature:function(){this.isValidDrawnCreated&&(this.checkAndCreatePopups([this.drawnCreatedEvent],!1),Object.keys(this.connectionEntry).length>0&&(this.annotationEntry[0].feature.connection=this.connectionEntry),this.initialiseDrawing())},toolbarEvent:function(e,t){if(!this.isValidDrawnCreated){if(this.manualAbortedOnClose(),this.doubleClickedFeature=!1,this.changeAnnotationDrawMode({mode:"simple_select"}),e==="mode")this.activeDrawMode=t;else if(e==="tool"){if(this.cancelDrawnFeature(),t){const o=t.replace(/[A-Z]/g,i=>`_${i.toLowerCase()}`);this.changeAnnotationDrawMode({mode:`draw${o}`})}this.activeDrawTool=t}}},annotationDrawModeEvent:function(e){this.activeDrawMode==="Edit"?this.doubleClickedFeature&&(e.feature.feature.geometry.type!=="Point"&&(this.changeAnnotationDrawMode({mode:"direct_select",options:{featureId:e.feature.feature.id}}),this.modifyAnnotationFeature()),this.doubleClickedFeature=!1):this.activeDrawMode==="Delete"&&(this.changeAnnotationDrawMode({mode:"simple_select",options:{featureIds:[e.feature.feature.id]}}),this.modifyAnnotationFeature())},createConnectivityBody:function(){if(Object.keys(this.connectionEntry).length>0){const e=Object.values(this.connectionEntry),t={type:"connectivity",source:e[0],target:e[e.length-1],intermediates:e.filter((o,i)=>i!==0&&i!==e.length-1)};this.annotationEntry[0].body=t}},changeAnnotationDrawMode:function(e){this.mapImp&&this.mapImp.changeAnnotationDrawMode(e)},clearAnnotationFeature:function(){this.mapImp&&this.mapImp.clearAnnotationFeature()},forceContextLoss:function(){this.mapImp&&!this.mapImp.contextLost&&!this.loading&&this.mapImp.forceContextLoss()},forceContextRestore:function(){this.mapImp&&(this.flatmapError=null,this.mapImp.forceContextRestore())},modifyAnnotationFeature:function(){this.mapImp&&this.mapImp.removeAnnotationFeature()},rollbackAnnotationEvent:function(){this.mapImp&&this.annotationEntry.length>0&&["created","updated","deleted"].includes(this.annotationEntry[0].type)&&(this.mapImp.rollbackAnnotationEvent(this.annotationEntry[0]),this.annotationEntry=[])},commitAnnotationEvent:function(e){this.mapImp&&(this.offlineAnnotationEnabled&&(this.offlineAnnotations=JSON.parse(sessionStorage.getItem("anonymous-annotation"))||[],this.offlineAnnotations.push(e),this.annotationEntry[0].type==="deleted"&&(this.offlineAnnotations=this.offlineAnnotations.filter(t=>t.resource!==this.serverURL||t.item.id!==e.item.id)),sessionStorage.setItem("anonymous-annotation",JSON.stringify(this.offlineAnnotations))),["created","updated","deleted"].includes(this.annotationEntry[0].type)&&(this.featureAnnotationSubmitted=!0,this.mapImp.commitAnnotationEvent(this.annotationEntry[0]),e.body.comment==="Position Updated"?this.annotationEntry[0].positionUpdated=!1:this.annotationEntry[0].type==="deleted"&&(this.annotationSidebar&&this.$emit("annotation-close"),this.closeTooltip(),this.annotationEntry=[]),this.addAnnotationFeature()))},fetchAnnotatedItemIds:async function(e=void 0,t=void 0){let o;return this.offlineAnnotationEnabled?(this.offlineAnnotations=JSON.parse(sessionStorage.getItem("anonymous-annotation"))||[],o=this.offlineAnnotations.filter(i=>i.resource===this.serverURL).map(i=>i.item.id)):(o=await this.annotator.annotatedItemIds(this.userToken,this.serverURL,e,t),"resource"in o&&(o=o.itemIds)),o},setFeatureAnnotated:async function(){if(this.mapImp){const e=await this.fetchAnnotatedItemIds();for(const t of e)this.mapImp.setFeatureAnnotated(t)}},fetchDrawnFeatures:async function(e,t){let o;if(this.offlineAnnotationEnabled)this.offlineAnnotations=JSON.parse(sessionStorage.getItem("anonymous-annotation"))||[],o=this.offlineAnnotations.filter(i=>i.feature&&i.resource===this.serverURL).map(i=>i.feature);else{const i=await this.fetchAnnotatedItemIds(e,t);o=await this.annotator.drawnFeatures(this.userToken,this.serverURL,i),"resource"in o&&(o=o.features)}return o},addAnnotationFeature:async function(){if(this.mapImp){this.featureAnnotationSubmitted||(this.clearAnnotationFeature(),this.loading=!0);const e=this.annotationFrom==="Anyone"?void 0:this.authorisedUser.orcid?this.authorisedUser.orcid:"0000-0000-0000-0000",t=this.annotationFrom==="Anyone"?void 0:this.annotationFrom==="Me",o=await this.fetchDrawnFeatures(e,t);if(this.existDrawnFeatures=o,this.loading=!1,!this.featureAnnotationSubmitted)for(const i of o)this.mapImp.addAnnotationFeature(i)}},showAnnotator:function(e){this.mapImp&&(this.mapImp.showAnnotator(e),this.$el.querySelector(".maplibregl-ctrl-group").style.display="none")},setAnnotationFrom:function(e){this.annotationFrom=e,this.mapImp&&(this.manualAbortedOnClose(),this.addAnnotationFeature())},emitOfflineAnnotationUpdate:function(){this.$emit("update-offline-annotation-enabled",this.offlineAnnotationEnabled)},setFlightPath3D:function(e){this.flightPath3DRadio=e,this.mapImp&&this.mapImp.enableFlightPaths(e)},viewLatestMap:function(){let e=this.biologicalSex?this.biologicalSex:void 0;this.entry==="NCBITaxon:9606"&&(e="PATO:0000384");const t={entry:this.entry,biologicalSex:e,viewport:this.mapImp.getState()};this.$emit("view-latest-map",t)},backgroundChangeCallback:function(e){this.currentBackground=e,this.mapImp&&this.mapImp.setBackgroundColour(this.currentBackground,1)},processSystems:function(e){if(this.systems.length=0,e&&e.length>0){const t={label:"All",key:"All",children:[]};e.forEach(o=>{const i={colour:o.colour,enabled:o.enabled,label:o.id,key:o.id},r=Cs(o,i.key);r.length>0&&(i.children=r),t.children.push(i)}),this.systems.push(t)}},processTaxon:function(e,t){this.taxonConnectivity.length=0,ui(this.mapImp,e).then(o=>{o.length&&o.forEach(i=>{let r=!0;t&&(r=t.checkAll?!0:t.checked.includes(i.taxon)),this.taxonConnectivity.push({...i,enabled:r}),this.mapImp&&this.mapImp.enableConnectivityByTaxonIds(i.taxon,r)})})},toggleDrawer:function(){this.drawerOpen=!this.drawerOpen},setColour:function(e){this.colourRadio=e,this.mapImp&&this.mapImp.setPaint({coloured:e,outlined:this.outlinesRadio})},setOutlines:function(e){this.outlinesRadio=e,this.mapImp&&this.mapImp.setPaint({coloured:this.colourRadio,outlined:e})},setInitMapState:function(){if(this.mapImp){const e=this.mapImp.map,t=this.mapImp.options.bounds,o=[[t[0],t[1]],[t[2],t[3]]];e.setMaxBounds(null),e.setRenderWorldCopies(!1),this.initMapState=n.markRaw({initBounds:o})}},resetView:function(){if(this.mapImp){const e=this.mapImp.map,{initBounds:t}=this.initMapState;e.resetNorthPitch({animate:!1}),t&&e.fitBounds(t,{animate:!1}),this.$refs.skcanSelection&&this.$refs.skcanSelection.reset(),this.$refs.layersSelection&&this.$refs.layersSelection.reset(),this.$refs.systemsSelection&&this.$refs.pathwaysSelection.reset(),this.$refs.pathwaysSelection&&this.$refs.pathwaysSelection.reset()}},zoomIn:function(){this.mapImp&&this.mapImp.zoomIn()},zoomOut:function(){this.mapImp&&this.mapImp.zoomOut()},onSelectionsDataChanged:function(e){this.$emit("pathway-selection-changed",e)},sckanSelected:function(e){this.mapImp&&this.mapImp.enableSckanPath(e.key,e.value)},checkAllSCKAN:function(e){this.mapImp&&e.keys.forEach(t=>this.mapImp.enableSckanPath(t,e.value))},zoomToFeatures:function(e){this.mapImp&&this.mapImp.zoomToFeatures(e)},retrieveConnectedPaths:async function(e,t={}){var o,i,r,a,s;if(this.mapImp){let l=[],c=(o=t.target)!=null&&o.length?t.target:[];const d=[...this.mapImp.pathModelNodes(e)],f=await this.mapImp.queryPathsForFeatures(e);if(d.length){if(!c.length){const u=(i=t.type)!=null&&i.length?t.type:["all"],p=await this.flatmapQueries.queryForConnectivityNew(this.mapImp,e[0]),g=(r=p==null?void 0:p.ids)==null?void 0:r.dendrites.flat(1/0),h=(a=p==null?void 0:p.ids)==null?void 0:a.components.flat(1/0),m=(s=p==null?void 0:p.ids)==null?void 0:s.axons.flat(1/0);let y=[];u.includes("origins")&&y.push(...g),u.includes("components")&&y.push(...h),u.includes("destinations")&&y.push(...m),u.includes("all")&&y.push(...g,...h,...m),c=[...new Set(y)]}d.forEach(u=>{this.mapImp.nodePathModels(u).forEach(g=>{const m=this.mapImp.pathModelNodes(g).map(b=>this.mapImp.featureProperties(b).models);c.filter(b=>m.includes(b)).length&&!l.includes(g)&&l.push(g)})})}else f.length&&(c.length?f.forEach(u=>{const g=this.mapImp.pathModelNodes(u).map(m=>this.mapImp.featureProperties(m).models);c.filter(m=>g.includes(m)).length&&!l.includes(u)&&l.push(u)}):l=f);return l=[...new Set([...l,...e])],l}},resetMapFilter:function(){const e=this.mapFilters.alert;let t;const o={"tile-layer":"pathways"},i={NOT:o};e.with&&!e.without?t={OR:[i,{AND:[o,{HAS:"alert"}]}]}:!e.with&&e.without?t={OR:[i,{AND:[o,{NOT:{HAS:"alert"}}]}]}:!e.with&&!e.without&&(t=i),this.setVisibilityFilter(t)},alertMouseEnterEmitted:function(e){if(this.mapImp)if(e.value){let t;const o={"tile-layer":"pathways"},i={NOT:o};if(e.key==="alert"||e.key==="withoutAlert"){const r=e.key==="alert"?{HAS:"alert"}:{NOT:{HAS:"alert"}};t={OR:[i,{AND:[o,r]}]}}this.setVisibilityFilter(t)}else this.resetMapFilter()},alertSelected:function(e){this.mapImp&&(e.key==="alert"?e.value?this.mapFilters.alert.with=!0:this.mapFilters.alert.with=!1:e.key==="withoutAlert"&&(e.value?this.mapFilters.alert.without=!0:this.mapFilters.alert.without=!1),this.resetMapFilter())},checkAllAlerts:function(e){this.mapImp&&(e.value?(this.mapFilters.alert.without=!0,this.mapFilters.alert.with=!0):(this.mapFilters.alert.without=!1,this.mapFilters.alert.with=!1),this.resetMapFilter())},systemSelected:function(e){this.mapImp&&this.mapImp.enableSystem(e.key,e.value)},checkAllSystems:function(e){this.mapImp&&this.systems[0].children.forEach(t=>this.mapImp.enableSystem(t.label,e))},ftuSelected:function(e){this.searchAndShowResult(e,!0,!0)},layersSelected:function(e){this.mapImp&&this.mapImp.enableLayer(e.key,e.value)},checkAllLayers:function(e){this.mapImp&&e.keys.forEach(t=>this.mapImp.enableLayer(t,e.value))},taxonsSelected:function(e){this.mapImp&&this.mapImp.enableConnectivityByTaxonIds(e.key,e.value)},taxonMouseEnterEmitted:function(e){if(this.mapImp)if(e.value){clearTimeout(this.taxonLeaveDelay);let t=this.mapImp.taxonFeatureIds(e.key);this.mapImp.enableConnectivityByTaxonIds(e.key,e.value),this.mapImp.zoomToGeoJSONFeatures(t,{noZoomIn:!0})}else this.taxonLeaveDelay=setTimeout(()=>{this.mapImp.unselectGeoJSONFeatures(),e.selections.forEach(t=>{let o=e.checked.includes(t.taxon);this.mapImp.enableConnectivityByTaxonIds(t.taxon,o)})},1e3)},checkAllTaxons:function(e){this.mapImp&&this.mapImp.enableConnectivityByTaxonIds(e.keys,e.value)},pathwaysSelected:function(e){this.mapImp&&this.mapImp.enablePath(e.key,e.value)},checkAllPathways:function(e){this.mapImp&&e.keys.forEach(t=>this.mapImp.enablePath(t,e.value))},enablePanZoomEvents:function(e){this.mapImp.enablePanZoomEvents(e)},annotationEventCallback:function(e,t){if(t.type==="aborted")this.featureAnnotationSubmitted?this.featureAnnotationSubmitted=!1:this.rollbackAnnotationEvent(),this.annotationEntry=[];else if(t.type==="modeChanged")t.feature.mode==="direct_select"&&(this.doubleClickedFeature=!0),this.annotationSidebar&&t.feature.mode==="simple_select"&&this.activeDrawMode==="Deleted"&&this.annotationEventCallback({},{type:"aborted"});else if(t.type==="selectionChanged"){if(this.selectedDrawnFeature=t.feature.features.length===0?void 0:t.feature.features[0],e.feature.feature=this.selectedDrawnFeature,!this.activeDrawTool)if(this.connectionEntry={},this.selectedDrawnFeature){const o=this.existDrawnFeatures.find(i=>i.id===this.selectedDrawnFeature.id);o&&o.connection&&(this.connectionEntry=o.connection),this.annotationDrawModeEvent(e)}else this.annotationSidebar&&this.previousEditEvent.type==="updated"&&(this.annotationEntry=[{...this.previousEditEvent,resourceId:this.serverURL}],this.annotationEventCallback({},{type:"aborted"})),this.previousEditEvent={}}else{if(t.type==="created"||t.type==="updated"){t.type==="updated"&&t.feature.action&&(t.positionUpdated=t.feature.action==="move");const o=this.mapImp.refreshAnnotationFeatureGeometry(t.feature);e.feature.feature=o}t.type==="created"?this.drawnCreatedEvent=e:this.checkAndCreatePopups([e])}t.type==="updated"&&(this.previousEditEvent=t),t.type==="deleted"?this.previousDeletedEvent=t:this.previousDeletedEvent={}},getTaxons:function(e){let t;return e.taxons&&(typeof e.taxons!="object"?t=JSON.parse(e.taxons):t=e.taxons),t},eventCallback:function(){return(e,t,...o)=>{if(e==="annotation"){const i={feature:t,userData:o,eventType:e};this.annotationEventCallback(i,t)}else if(e==="context-lost")this.onContextLost();else if(e==="context-restored")this.onContextRestored();else if(e==="pan-zoom")this.$emit("pan-zoom-callback",t);else{const i=t.label,r=[t.models],a=this.entry,s=this.biologicalSex,l=Nt(t.alert),c=this.getTaxons(t);let d=[{dataset:t.dataset,biologicalSex:s,taxonomy:a,resource:r,label:i,feature:t,userData:o,eventType:e,provenanceTaxonomy:c,alert:l}];if(e==="click"){const f=!t[0];if(!f){d=[];const p=t.mapUUID,g=new Set;for(let[h,m]of Object.entries(t))if(h!=="mapUUID"){const y=m.featureId,b=m.label,C=[m.models],I=this.getTaxons(m);if(g.has(y))continue;g.add(y),d.push({dataset:m.dataset,biologicalSex:s,taxonomy:a,resource:C,label:b,feature:m,userData:o,eventType:e,provenanceTaxonomy:I,alert:Nt(m.alert),mapUUID:p})}}const u=f?t:t[0];if(this.setConnectivityDataSource(this.viewingMode,u),this.viewingMode!=="Neuron Connection"){if(this.currentActive=u.models?u.models:"",this.activeDrawTool&&!this.isValidDrawnCreated){const p=u.featureId||this.existDrawnFeatures.find(g=>g.id===u.id);if(this.activeDrawTool==="LineString"&&p){const g=u.featureId?u.featureId:u.id,h=u.label?u.label:`Feature ${u.id}`;this.connectionEntry[` ${g}`]=Object.assign({label:h},Object.fromEntries(Object.entries(u).filter(([m])=>["featureId","models"].includes(m)).map(([m,y])=>[m==="featureId"?"id":m,y])))}}}t&&t.type!=="marker"&&!this.activeDrawTool&&this.checkAndCreatePopups(d)}else e==="mouseenter"&&this.viewingMode!=="Neuron Connection"&&(this.currentHover=t.models?t.models:"");this.$emit("resource-selected",d)}}},setConnectivityDataSource:function(e,t){var o;e==="Exploration"?this.connectivityDataSource=(o=t.models)!=null&&o.startsWith("ilxtr:")?t.models:"":this.connectivityDataSource=t.featureId||t.id},changeViewingMode:function(e){e&&(this.viewingMode=e),this.manualAbortedOnClose()},removeActiveTooltips:function(){this.mapImp&&this.mapImp.removePopup(),this.$el.querySelectorAll(".flatmap-tooltip-popup").forEach(t=>t.remove())},createTooltipForConnectivity:function(e,t){const o=document.createElement("div");o.classList.add("flatmap-feature-label"),e.forEach((i,r)=>{const{label:a}=i;if(o.append(Yn(a)),r+1<e.length){const s=document.createElement("hr");o.appendChild(s)}}),this.mapImp.showPopup(t,o,{className:"custom-popup flatmap-tooltip-popup",positionAtLastClick:!1,preserveSelection:!0})},showConnectivityTooltips:function(e){const{connectivityInfo:t,data:o}=e,i=[],r=[],a=[],s=[];if(t&&t.featureId&&i.push(...t.featureId),this.mapImp){if(o.forEach(p=>{const g=this.mapImp.search(p.id);if(g!=null&&g.results.length){const h=g==null?void 0:g.results[0].featureId;a.push({featureId:h,...p})}else s.push(p)}),a.length){let p=a[0].featureId;this.mapImp.annotations.forEach(g=>{const h=g["anatomical-nodes"];if(h){const m=h.join("");a.every(b=>m.indexOf(b.id)!==-1)&&(p=g.featureId,r.push(p))}}),this.createTooltipForConnectivity(a,p)}else this.removeActiveTooltips();s.length&&this.emitConnectivityError(s);const l=i.reduce((p,g)=>{const h=this.mapImp.pathways.paths[g],m=h?h.connectivity:null;if(m){const y=m.flat(1/0);p.push(...y)}return p},[]),c=[...new Set(l)],d=[...i,...c],u=[...this.mapImp.modelFeatureIdList(d),...r];this.mapImp.selectGeoJSONFeatures(u)}},showConnectivitiesByReference:function(e){this.searchConnectivitiesByReference(e).then(t=>{this.mapImp.selectFeatures(t)})},searchConnectivitiesByReference:async function(e){const t=sessionStorage.getItem("flatmap-knowledge");let o=[];return t?o=await xy(e):o=await By(this.mapImp,e,this.flatmapQueries),o},getFlatmapKnowledge:function(){let e=[];const t=sessionStorage.getItem("flatmap-knowledge");return t&&(e=JSON.parse(t)),e},emitConnectivityError:function(e){this.$emit("connectivity-error",{data:{errorData:e,errorMessage:zy}})},checkConnectivityTooltipEntry:function(e){return e!=null&&e.length?e.find(t=>{var o,i;return((o=t==null?void 0:t.destinations)==null?void 0:o.length)||((i=t==null?void 0:t.components)==null?void 0:i.length)})!==void 0:!1},changeConnectivitySource:async function(e){const{entry:t,connectivitySource:o}=e;t.mapId===this.mapImp.id&&(await this.flatmapQueries.queryForConnectivityNew(this.mapImp,t.featureId[0],o),this.tooltipEntry=this.tooltipEntry.map(i=>i.featureId[0]===t.featureId[0]?this.flatmapQueries.updateTooltipData(i):i),this.checkConnectivityTooltipEntry(this.tooltipEntry)&&this.$emit("connectivity-info-open",this.tooltipEntry))},checkAndCreatePopups:async function(e,t=!0){var o;if(this.viewingMode==="Annotation"){const i=e.filter(r=>r.feature).map(r=>r.feature);if(i.length>0)if(this.annotationSidebar&&this.previousDeletedEvent.type==="deleted"&&(this.annotationEntry=[{...this.previousDeletedEvent,resourceId:this.serverURL}],this.annotationEventCallback({},{type:"aborted"})),this.annotationEntry=[],i.forEach(r=>{var a;this.annotationEntry.push({...r,resourceId:this.serverURL,featureId:r.featureId?r.featureId:(a=r.feature)==null?void 0:a.id,offline:this.offlineAnnotationEnabled})}),i[0].feature)this.activeDrawTool||this.activeDrawMode||this.isValidDrawnCreated?(this.featureAnnotationSubmitted=!1,this.activeDrawTool&&this.createConnectivityBody(),this.displayTooltip(i[0].feature.id,jy(i[0].feature.geometry))):this.rollbackAnnotationEvent();else{const r=this.annotationEntry.filter(a=>a.featureId&&a.models).map(a=>a.models);r.length>0&&this.displayTooltip(r)}else this.annotation={}}else if(this.viewingMode==="Neuron Connection"&&t){const i=e.map(a=>a.resource[0]);if(i.find(a=>!a.startsWith("ilxtr:"))){const a=Array.isArray(i)?[...i]:[i];a.length===1&&a.push([]);const s=(o=e[0].feature)==null?void 0:o.featureId,l=this.mapImp.annotations.get(s),c=l==null?void 0:l["anatomical-nodes"],d=l==null?void 0:l.models;let f,u=a;const p=l==null?void 0:l.models;c!=null&&c.length&&(f=c.find(S=>JSON.parse(S)[0]===d)),f?u=JSON.parse(f):p&&(u=[p,[]]);const g=this.mapImp.knowledgeSource,h=u.flat(1/0),m=[...new Set(h)],b=(await ut.fetchLabels(this.flatmapAPI,m)).reduce((S,E)=>{const O=E[0],x=JSON.parse(E[1]);return S.push({id:O,label:x.label,source:x.source}),S},[]);b.sort((S,E)=>S.id===E.id?S.source===g&&E.source!==g?-1:S.source!==g&&E.source===g?1:0:S.id.localeCompare(E.id));const C=[];for(let S=0;S<m.length;S++){const E=b.find(O=>O.id===m[S]);E&&C.push(E.label)}const I=Yn(C.join(", ")),k={facet:JSON.stringify(u),facetPropPath:`flatmap.connectivity.source.${this.connectionType.toLowerCase()}`,tagLabel:I,term:this.connectionType};this.connectivityFilters.some(S=>S.facet===k.facet&&S.facetPropPath===k.facetPropPath)||this.connectivityFilters.push(k),this.$emit("neuron-connection-feature-click",{filters:this.connectivityFilters,search:""})}else await this.openConnectivityInfo(e)}else await this.openConnectivityInfo(e)},openConnectivityInfo:async function(e){_y(this.mapImp,this.flatmapQueries);let t=[];if(this.tooltipEntry=e.filter(o=>o.resource[0]in this.mapImp.pathways.paths).map(o=>({title:o.label,featureId:o.resource,ready:!1})),this.tooltipEntry.length){this.$emit("connectivity-info-open",this.tooltipEntry);for(let i=0;i<e.length;i++)t.push(await this.getKnowledgeTooltip(e[i]));this.tooltipEntry=await Promise.all(t);const o=this.tooltipEntry.map(i=>i.featureId[0]);o.length>0&&this.displayTooltip(o)}},updateConnectivityFilters:function(e){e.length&&(this.connectivityFilters=e.filter(t=>t.facet.toLowerCase()!=="show all"))},resetConnectivityfilters:function(e){e.length?this.connectivityFilters=this.connectivityFilters.filter(t=>e.some(o=>o.facetPropPath===t.facetPropPath&&o.facet!==t.facet)):this.connectivityFilters=[]},getKnowledgeTooltip:async function(e){const t=await this.flatmapQueries.retrieveFlatmapKnowledgeForEvent(this.mapImp,e);let o=await this.flatmapQueries.createTooltipData(this.mapImp,e);return(t&&t[0]||e.feature.hyperlinks&&e.feature.hyperlinks.length>0)&&(o.featuresAlert=Nt(e.alert),o.knowledgeSource=hi(this.mapImp),o.mapId=this.mapImp.mapMetadata.id,o.mapuuid=this.mapImp.mapMetadata.uuid),o.ready=!0,o},popUpCssHacks:function(){const e=document.querySelector(".flatmap-tooltip-popup"),t=document.querySelector(".maplibregl-popup-close-button");e&&(e.style.display="none"),t.style.display="block",this.$refs.tooltip.$el.style.display="flex",t.onclick=()=>{this.$emit("connectivity-info-close"),e&&(e.style.display="block")}},closeTooltip:function(){this.$refs.tooltip&&(this.$refs.tooltip.$el.style.display="none"),document.querySelectorAll(".maplibregl-popup").forEach(e=>{e.style.display="none"})},showPopup:function(e,t,o){let i=o;this.mapImp&&(i?i.className||(i.className="custom-popup"):i={className:"custom-popup",positionAtLastClick:!0},this.mapImp.showPopup(e,t,i))},showMarkerPopup:function(e,t,o){this.mapImp&&this.mapImp.showMarkerPopup(e,t,o)},closeMinimap:function(){let e=this.$refs.flatmapContainer.querySelector(".maplibregl-ctrl-minimap");this.minimapSmall?(e.classList.add("enlarge"),e.classList.remove("shrink")):(e.classList.add("shrink"),e.classList.remove("enlarge")),this.minimapSmall=!this.minimapSmall},addResizeButtonToMinimap:function(){let e=this.$refs.flatmapContainer.querySelector(".maplibregl-ctrl-minimap");e&&(this.$refs.minimapResize&&this.$refs.minimapResize.$el.parentNode&&this.$refs.minimapResize.$el.parentNode.removeChild(this.$refs.minimapResize.$el),e.appendChild(this.$refs.minimapResize.$el),this.minimapResizeShow=!0)},setHelpMode:function(e){const t=this.hoverVisibilities.length,o=t-1,i=this.hoverVisibilities[this.helpModeActiveIndex];if(i){const a=i==null?void 0:i.refs,s=i==null?void 0:i.ref,l=this.$refs[a||s];if(l){const{parentElement:c,nextElementSibling:d}=l.$el,f=u=>u&&(u.classList.contains("pathway-container")||u.classList.contains("pathway-location"));(f(c)||f(d))&&(this.requiresDrawer?this.drawerOpen=!0:this.helpModeActiveIndex+=1)}else this.helpModeActiveIndex+=1,this.setHelpMode(e)}const r=this.hoverVisibilities[this.helpModeActiveIndex];(r==null?void 0:r.ref)==="checkBoxPopover"&&!this.showPathwayFilter&&(this.helpModeActiveIndex+=1,this.setHelpMode(e)),e||(this.helpModeActiveIndex=this.helpModeInitialIndex),this.viewingMode!=="Annotation"&&this.helpModeActiveIndex>9&&(this.helpModeActiveIndex=o),e&&this.helpModeActiveIndex>=o&&this.$emit("help-mode-last-item",!0),e&&!this.helpModeDialog?(this.inHelp=!0,this.hoverVisibilities.forEach(a=>{a.value=!0})):e&&this.helpModeDialog&&t>this.helpModeActiveIndex?this.helpModeActiveIndex>-1?(this.closeFlatmapHelpPopup(),setTimeout(()=>{this.inHelp=!1,this.hoverVisibilities.forEach(a=>{a.value=!1}),this.showTooltip(this.helpModeActiveIndex,200)},300)):this.helpModeActiveIndex===-1&&this.openFlatmapHelpPopup():(this.inHelp=!1,this.hoverVisibilities.forEach(a=>{a.value=!1}),this.closeFlatmapHelpPopup())},showTooltip:function(e,t=500){this.inHelp||(clearTimeout(this.tooltipWait[e]),this.tooltipWait[e]=setTimeout(()=>{this.hoverVisibilities[e].value=!0,this.$emit("shown-tooltip")},t))},hideTooltip:function(e,t=500){this.inHelp||(clearTimeout(this.tooltipWait[e]),this.tooltipWait[e]=setTimeout(()=>{this.hoverVisibilities[e].value=!1},t))},displayTooltip:function(e,t=void 0){let o,i={className:"flatmapvuer-popover"};if(t)o=e,i.annotationFeatureGeometry=t,this.annotationEntry.length&&(i.annotationEvent={type:this.annotationEntry[0].type,feature:this.annotationEntry[0].feature});else{const r=Array.isArray(e)?e[0]:e;r&&(o=this.mapImp.modelFeatureIds(r)[0]),this.activeDrawTool||(i.positionAtLastClick=!0)}this.connectivityInfoSidebar&&this.tooltipEntry.length&&this.viewingMode!=="Annotation"&&this.checkConnectivityTooltipEntry(this.tooltipEntry)&&this.$emit("connectivity-info-open",this.tooltipEntry),this.annotationSidebar&&this.viewingMode==="Annotation"&&this.$emit("annotation-open",{annotationEntry:this.annotationEntry,commitCallback:this.commitAnnotationEvent}),o&&!this.disableUI&&(this.viewingMode==="Annotation"&&!this.annotationSidebar||this.viewingMode==="Exploration"&&!this.connectivityInfoSidebar)&&(this.tooltipDisplay=!0,this.$nextTick(()=>{this.mapImp.showPopup(o,this.$refs.tooltip.$el,i),this.popUpCssHacks()}))},moveMap:function(e,t={}){if(this.mapImp){const{offsetX:o=0,offsetY:i=0,zoom:r=4}=t,a=this.mapImp.map,s=this.mapImp.bounds.toArray();this.mapImp.zoomToFeatures(e,{noZoomIn:!0}),this.showPathwaysDrawer(!1),s!=null&&s.length&&setTimeout(()=>{a.fitBounds(s,{offset:[o,i],zoom:r,animate:!0})})}},openFlatmapHelpPopup:function(){if(this.mapImp){let e=this.mapImp.modelFeatureIds("UBERON:0000948");e&&e.length>0&&(this.mapImp.showPopup(e[0],"Click for more information",{anchor:"top",className:"flatmap-popup-popper"}),this.$emit("shown-map-tooltip"))}},closeFlatmapHelpPopup:function(){this.$el.querySelectorAll(".maplibregl-popup-close-button").forEach(e=>{e.click()})},getLabels:function(){let e=[];if(this.mapImp){let t=this.mapImp.annotations;for(let o of t.values())o.label&&e.push(o.label);return Array.from(new Set(e))}},getVisibilityState:function(e){if(["alertSelection","pathwaysSelection","taxonSelection"].forEach(o=>{let i=this.$refs[o];i&&(e[o]=i.getState())}),this.$refs.treeControls){const o=this.$refs.treeControls.$refs.regionTree.getCheckedKeys();e.systemsSelection=o.filter(i=>!i.includes("."))}},setVisibilityState:function(e){["alertSelection","pathwaysSelection","taxonSelection"].forEach(o=>{const i=e[o];if(i){const r=this.$refs[o];r&&r.setState(i)}}),"systemsSelection"in e&&this.$refs.treeControls&&(this.$refs.treeControls.$refs.regionTree.setCheckedKeys(e.systemsSelection),this.systems[0].children.forEach(o=>{this.mapImp.enableSystem(o.key,e.systemsSelection.includes(o.key))}))},getState:function(){if(this.mapImp){let e={entry:this.entry,viewport:this.mapImp.getState()};const t=this.mapImp.getIdentifier();return this.biologicalSex?e.biologicalSex=this.biologicalSex:t&&t.biologicalSex&&(e.biologicalSex=t.biologicalSex),t&&t.uuid&&(e.uuid=t.uuid),e.viewingMode=this.viewingMode,e.searchTerm=this.searchTerm,e.flightPath3D=this.flightPath3DRadio,e.colour=this.colourRadio,e.outlines=this.outlinesRadio,e.background=this.currentBackground,this.offlineAnnotationEnabled&&(e.offlineAnnotations=sessionStorage.getItem("anonymous-annotation")),this.getVisibilityState(e),e}},setState:function(e){e&&(this.mapImp&&e.entry&&this.entry==e.entry&&(!e.biologicalSex||e.biologicalSex===this.biologicalSex)?this.restoreMapState(e):this.createFlatmap(e),this.setStateRequired=!1)},restoreMapState:function(e){if(e){if(e.viewport&&this.mapImp.setState(e.viewport),e.offlineAnnotations&&sessionStorage.setItem("anonymous-annotation",e.offlineAnnotations),e.viewingMode&&this.changeViewingMode(e.viewingMode),"flightPath3D"in e&&this.setFlightPath3D(e.flightPath3D),"colour"in e&&this.setColour(e.colour),"outlines"in e&&this.setOutlines(e.outlines),e.background&&this.backgroundChangeCallback(e.background),e.searchTerm){const t=e.searchTerm;this.searchAndShowResult(t,!0,!0)}this.setVisibilityState(e)}},setFlightPathInfo:function(e){(e===1.6||e>1.6)&&(this.displayFlightPathOption=!0,this.setFlightPath3D(!1))},createFlatmap:function(e){if(!this.mapImp&&!this.loading){this.loading=!0,this.flatmapError=null;let t={taxon:this.entry};this.uuid&&(t.uuid=this.uuid),e?(e.uuid?t={uuid:e.uuid}:e.entry&&(t.taxon=e.entry),e.biologicalSex?t.biologicalSex=e.biologicalSex:t.taxon==="NCBITaxon:9606"&&(t.biologicalSex="PATO:0000384")):this.biologicalSex&&(t.biologicalSex=this.biologicalSex),this.mapManagerRef.loadMap(t,this.eventCallback(),{minZoom:this.minZoom,tooltips:this.tooltips,minimap:!1,container:this.$refs.display,tooltipDelay:15}).then(i=>{this.mapImp=i,this.serverURL=this.mapImp.makeServerUrl("").slice(0,-1);let r=this.mapImp.details.version;this.setFlightPathInfo(r);const a=this._stateToBeSet?this._stateToBeSet:e;this.onFlatmapReady(a),this.$nextTick(()=>this.restoreMapState(a))}).catch(i=>{var r,a;if(console.error("Flatmap loading error:",i),this.flatmapError={},i.message&&i.message.indexOf("Unknown map")!==-1?(this.flatmapError.title="Unknown Map!",this.flatmapError.messages=Object.keys(t).map(s=>`${s==="uuid"?"UUID":Yn(s)}: ${t[s]}`)):(this.flatmapError.title="Error Loading Map!",this.flatmapError.messages=[i.message?i.message:i.toString(),"Please try again later or contact support if the problem persists."]),(a=(r=this.$parent)==null?void 0:r.$refs)!=null&&a.multiContainer){const s=this.$parent;this.flatmapError.button={text:"Load Default Map",callback:()=>{const l=s.initial;s.setSpecies(l,void 0,3)}}}this.loading=!1})}else e&&(this._stateToBeSet={...e},this.mapImp&&!this.loading&&this.restoreMapState(this._stateToBeSet))},computePathControlsMaximumHeight(){const e=this.$refs.display;if(e){const t=getComputedStyle(e),o=parseInt(t.paddingTop)+parseInt(t.paddingBottom),i=e.clientHeight-o;this.pathwaysMaxHeight=i-170}},mapResize:function(){try{this.computePathControlsMaximumHeight(),this.mapImp&&this.mapImp.resize()}catch{console.error("Map resize error")}},getFilterSources:function(){const e=["kind","taxons"];let t=new Set,o=new Set,i=new Map;for(const a of this.mapImp.annotations.values())if(a.source){"alert"in a?t.add(a.source):o.add(a.source);for(const[s,l]of Object.entries(a))if(e.includes(s)){i.has(s)||i.set(s,new Map);const c=i.get(s),d=f=>{const u=f;c.has(u)||c.set(u,new Set),c.get(u).add(`${a.source}`)};Array.isArray(l)?l.forEach(d):d(l)}}let r={alert:{with:[...t],without:[...o]}};for(const[a,s]of i.entries()){r[a]={};for(const[l,c]of s.entries())r[a][l]=[...c.values()]}return r},getFilterOptions:async function(e,t){const o=t||this.getFlatmapKnowledge(),i=this.pathways;return await ut.getFlatmapFilterOptions(this.flatmapAPI,e,o,i)},onFlatmapReady:function(e){var t;if(this.sensor=n.markRaw(new Fy(this.$refs.display,this.mapResize)),((t=this.mapImp.options)==null?void 0:t.style)==="functional"&&(this.isFC=!0),this.mapImp.setBackgroundOpacity(1),this.backgroundChangeCallback(this.currentBackground),this.pathways=this.mapImp.pathTypes(),this.pathways=this.pathways.filter(o=>o.enabled&&o.type!=="other"),this.processSystems(this.mapImp.getSystems()),this.processTaxon(this.mapImp.taxonIdentifiers,e?e.taxonSelection:void 0),this.containsAlert="alert"in this.mapImp.featureFilterRanges(),this.flatmapLegends=this.mapImp.flatmapLegend,this.loading=!1,this.computePathControlsMaximumHeight(),this.mapResize(),this.handleMapClick(),this.setInitMapState(),this.displayMinimap){const o={position:"top-right"};this.mapImp.createMinimap(o),this.addResizeButtonToMinimap()}this.$emit("ready",this)},handleMapClick:function(){const e=this.mapImp.map;e&&e.on("click",t=>{this.connectivityDataSource||this.$emit("connectivity-info-close"),this.connectivityDataSource=""})},onContextLost:function(){this.lastViewport=n.markRaw(this.mapImp.getState()),this.flatmapError={},this.flatmapError.title="GL context lost!",this.flatmapError.messages=[`A display issue has occurred due
25
25
  to a limit on available WebGL contexts. You can restore the display
26
26
  using the Restore Context button. Please see the
27
27
  <a href="https://docs.sparc.science/docs/integrated-maps-viewer-overview#limit-on-available-webgl-contexts" target='_blank'>documentation</a>
28
- for more details.`],this.flatmapError.button={text:"Restore Context",callback:()=>{this.forceContextRestore()}}},onContextRestored:function(){if(this.mapImp){this.handleMapClick(),this.setInitMapState();const e=this.getState();if(e&&(e.viewport=this.lastViewport),this.restoreMapState(e),this.displayMinimap){const t={position:"top-right"};this.mapImp.createMinimap(t),this.addResizeButtonToMinimap()}this.filterToRestore&&(this.mapImp.setVisibilityFilter(this.filterToRestore),this.filterToRestore=void 0),this.$emit("context-restored",this)}},showPathwaysDrawer:function(e){this.drawerOpen=e},searchAndShowResult:function(e,t,o=!0){var i;if(this.mapImp){if(e===void 0||e==="")return this.mapImp.clearSearchResults(),this.viewingMode==="Exploration"?this.$emit("connectivity-info-close"):this.viewingMode==="Annotation"&&this.manualAbortedOnClose(),this.searchTerm="",!0;{const a=this.mapImp.search(e);if((i=a==null?void 0:a.results)!=null&&i.length){if(this.mapImp.showSearchResults(a),t){let r;for(let s=0;s<a.results.length;s++){r=a.results[s].featureId;const l=this.mapImp.annotation(r);if(r&&(l!=null&&l.label))break}if(r){const s=this.mapImp.featureProperties(r),l={resource:[s.models],feature:s,label:s.label,provenanceTaxonomy:s.taxons,alert:Bt(s.alert)};this.checkAndCreatePopups([l],o),this.mapImp.showPopup(r,Jn(s.label),{className:"custom-popup",positionAtLastClick:!1,preserveSelection:!0})}}return this.searchTerm=e,!0}else this.mapImp.clearSearchResults()}}return!1},highlightConnectedPaths:function(e){if(e.length){const t=e.filter(i=>i in this.mapImp.pathways.paths),o=this.mapImp.modelFeatureIdList(t);this.mapImp.selectGeoJSONFeatures(o)}},searchSuggestions:function(e){return this.mapImp?this.mapImp.search(e):[]},onActionClick:function(e){hi.emit("onActionClick",e)},setConnectionType:function(e){this.connectionType=e},trackEvent:function(e){const t={event:"interaction_event",location:"flatmap",...e};this.$emit("trackEvent",t)}},props:{entry:{type:String,required:!0},uuid:String,biologicalSex:{type:String,default:""},minZoom:{type:Number,default:1},tooltips:{type:Boolean,default:!0},helpMode:{type:Boolean,default:!1},helpModeActiveItem:{type:Number,default:0},helpModeDialog:{type:Boolean,default:!1},helpModeLastItem:{type:Boolean,default:!1},helpModeInitialIndex:{type:Number,default:0},render:{type:Boolean,default:!0},renderAtMounted:{type:Boolean,default:!0},displayMinimap:{type:Boolean,default:!1},displayWarning:{type:Boolean,default:!1},enableOpenMapUI:{type:Boolean,default:!1},openMapOptions:{type:Array,default:function(){return[{display:"Open AC Map",key:"AC"},{display:"Open FC Map",key:"FC"},{display:"Open 3D Human Map",key:"3D"}]}},showStarInLegend:{type:Boolean,default:!1},isLegacy:{type:Boolean,default:!1},displayLatestChanges:{type:Boolean,default:!1},state:{type:Object,default:void 0},mapManager:{type:Object,default:void 0},flatmapAPI:{type:String,default:"https://mapcore-demo.org/current/flatmap/v3/"},sparcAPI:{type:String,default:"https://api.sparc.science/"},disableUI:{type:Boolean,default:!1},connectivityInfoSidebar:{type:Boolean,default:!1},annotationSidebar:{type:Boolean,default:!1},showLocalSettings:{type:Boolean,default:!0},showOpenMapButton:{type:Boolean,default:!0},showPathwayFilter:{type:Boolean,default:!0},externalLegends:{type:Array,default:function(){return[]}}},provide(){return{flatmapAPI:this.flatmapAPI,sparcAPI:this.sparcAPI,userApiKey:this.userToken}},data:function(){return{filterToRestore:void 0,flatmapError:null,sensor:null,mapManagerRef:void 0,flatmapQueries:void 0,annotationEntry:[],tooltipDisplay:!1,serverURL:void 0,layers:[],pathways:[],initMapState:n.markRaw({}),sckanDisplay:[{label:"Display Path with SCKAN",key:"VALID"}],systems:[],taxonConnectivity:[],pathwaysMaxHeight:1e3,tooltipWait:n.markRaw([]),hoverVisibilities:[{value:!1,ref:"markerPopover"},{value:!1,ref:"zoomInPopover"},{value:!1,ref:"zoomOutPopover"},{value:!1,ref:"zoomFitPopover"},{value:!1,ref:"openMapPopover"},{value:!1,ref:"settingsPopover"},{value:!1,ref:"checkBoxPopover"},{value:!1,ref:"warningPopover"},{value:!1,ref:"whatsNewPopover"},{value:!1,ref:"featuredMarkerPopover"},{value:!1,refs:"toolbarPopover",ref:"editPopover"},{value:!1,refs:"toolbarPopover",ref:"deletePopover"},{value:!1,refs:"toolbarPopover",ref:"pointPopover"},{value:!1,refs:"toolbarPopover",ref:"lineStringPopover"},{value:!1,refs:"toolbarPopover",ref:"polygonPopover"},{value:!1,refs:"toolbarPopover",ref:"connectionPopover"}],helpModeActiveIndex:this.helpModeInitialIndex,yellowstar:Py,isFC:!1,inHelp:!1,currentBackground:"white",availableBackground:["white","lightskyblue","black"],loading:!1,flatmapMarker:Ay,tooltipEntry:[],connectivityDataSource:"",connectivityTooltipVisible:!1,drawerOpen:!1,flightPath3DRadio:!1,displayFlightPathOption:!1,colourRadio:!0,outlinesRadio:!0,minimapResizeShow:!1,minimapSmall:!1,currentActive:"",selectedDrawnFeature:void 0,currentHover:"",viewingMode:"Exploration",viewingModes:{Exploration:"Find relevant research and view detail of neural pathways by selecting a pathway to view its connections and data sources","Neuron Connection":"Discover Neuron connections by selecting a neuron and viewing its associated network connections",Annotation:["View feature annotations","Add, comment on and view feature annotations"]},connectionType:"All",offlineAnnotationEnabled:!1,offlineAnnotations:[],annotationFrom:"Anyone",annotatedSource:["Anyone","Me","Others"],openMapRef:void 0,backgroundIconRef:void 0,toolbarOptions:["Edit","Delete","Point","LineString","Polygon","Connection"],annotator:void 0,authorisedUser:void 0,activeDrawMode:void 0,activeDrawTool:void 0,featureAnnotationSubmitted:!1,drawnCreatedEvent:{},previousEditEvent:{},previousDeletedEvent:{},connectionEntry:{},existDrawnFeatures:[],doubleClickedFeature:!1,containsAlert:!1,alertOptions:[{label:"Display Path With Notes",key:"alert",enabled:!0},{label:"Display Path Without Notes",key:"withoutAlert",enabled:!0}],mapFilters:n.markRaw({alert:{with:!0,without:!0}}),searchTerm:"",taxonLeaveDelay:void 0,connectivityFilters:[],flatmapLegends:[],lastViewport:void 0}},computed:{...vi.mapState(Fy,["userToken"]),isValidDrawnCreated:function(){return Object.keys(this.drawnCreatedEvent).length>0},requiresDrawer:function(){var e,t,o,i;return this.loading?(this.drawerOpen=!1,!1):((e=this.systems)==null?void 0:e.length)>0||this.containsAlert&&this.alertOptions||((t=this.pathways)==null?void 0:t.length)>0||((o=this.taxonConnectivity)==null?void 0:o.length)>0||((i=this.legendEntry)==null?void 0:i.length)>0?(this.drawerOpen=!0,!0):(this.drawerOpen=!1,!1)},modeDescription:function(){let e=this.viewingModes[this.viewingMode];return this.viewingMode==="Annotation"?this.authorisedUser?e[1]:e[0]:e},legendEntry:function(){return[...this.flatmapLegends,...this.externalLegends]},showDatasetMarkerTooltip:function(){return this.hoverVisibilities[9].value}},watch:{entry:function(){this.state||this.createFlatmap()},helpMode:function(e,t){e!==t&&this.setHelpMode(e)},helpModeActiveItem:function(){this.helpMode&&(this.helpModeActiveIndex+=1,this.setHelpMode(this.helpMode))},render:function(e){e&&this.mapImp&&this.mapImp.contextLost&&!this.loading&&this.$nextTick(()=>{this.forceContextRestore()})},state:{handler:function(e,t){e!==t&&(this.mapManagerRef?this.setState(e):this.setStateRequired=!0)},immediate:!0,deep:!0},viewingMode:function(e){this.clearAnnotationFeature(),e==="Annotation"&&(this.loading=!0,this.annotator.authenticate(this.userToken).then(t=>{t.name&&t.email&&t.canUpdate?(this.authorisedUser=t,this.offlineAnnotationEnabled=!1):(this.authorisedUser=void 0,this.offlineAnnotationEnabled=!0),this.emitOfflineAnnotationUpdate(),this.setFeatureAnnotated(),this.addAnnotationFeature(),this.loading=!1}))},disableUI:function(e){e&&this.closeTooltip()},activeDrawTool:function(e){let t=[],o={x:null,y:null};const i=this.$el.querySelector(".maplibregl-canvas"),a=()=>{i.removeEventListener("keydown",r),i.removeEventListener("click",s)},r=l=>{if(!["Escape","Enter"].includes(l.key))return;const c=e==="Point"&&t.length===1||e==="LineString"&&t.length>=2||e==="Polygon"&&t.length>=3;(l.key==="Escape"||l.key==="Enter"&&!c)&&(this.activeDrawTool=void 0),a()},s=l=>{const c=i.getBoundingClientRect(),d=l.clientX-c.left,f=l.clientY-c.top;if(Math.sqrt((d-o.x)**2+(f-o.y)**2)<8){this.isValidDrawnCreated||(this.activeDrawTool=void 0),a();return}o={x:d,y:f},t.push(o)};e&&(a(),i.addEventListener("keydown",r),i.addEventListener("click",s))}},created:function(){this.mapManager?this.mapManagerRef=this.mapManager:(this.mapManagerRef=n.markRaw(new Si.MapViewer(this.flatmapAPI,{container:void 0})),this.$emit("mapmanager-loaded",this.mapManagerRef))},mounted:function(){this.openMapRef=n.shallowRef(this.$refs.openMapRef),this.backgroundIconRef=n.shallowRef(this.$refs.backgroundIconRef),this.tooltipWait.length=this.hoverVisibilities.length,this.flatmapQueries=n.markRaw(new Oy),this.flatmapQueries.initialise(this.flatmapAPI),this.state?this.setStateRequired&&this.setState(this.state):this.renderAtMounted&&this.createFlatmap(),ys()}},Hy={class:"flatmap-container",ref:"flatmapContainer","element-loading-text":"Loading...","element-loading-background":"rgba(0, 0, 0, 0.3)"},Ky={style:{height:"100%",width:"100%",position:"relative","overflow-y":"none"}},Uy={style:{height:"100%",width:"100%"},ref:"display",class:"flatmap-display"},Wy={class:"beta-popovers"},qy={key:2,class:"warning-text"},Gy={class:"bottom-right-control"},Jy=["innerHTML"],Yy={style:{"margin-bottom":"2px"}},Zy={key:0,class:"viewing-mode-title"},Qy=["onClick"],Xy=["onClick"];function eb(e,t,o,i,a,r){const s=n.resolveComponent("map-svg-sprite-color"),l=ci,c=W.WarningFilled,d=be,f=an,u=W.ArrowDown,p=n.resolveComponent("DrawToolbar"),g=n.resolveComponent("map-svg-icon"),h=py,m=n.resolveComponent("tree-controls"),y=ms,b=W.ArrowLeft,C=ti,I=nn,k=on,v=ai,S=Wn,E=is,O=as,x=n.resolveComponent("Tooltip"),N=ri,B=li;return n.withDirectives((n.openBlock(),n.createElementBlock("div",Hy,[n.createVNode(s),n.createElementVNode("div",Ky,[n.createElementVNode("div",Uy,null,512),e.flatmapError?(n.openBlock(),n.createBlock(l,{key:0,flatmapError:e.flatmapError},null,8,["flatmapError"])):n.createCommentVNode("",!0),n.withDirectives(n.createElementVNode("div",Wy,[n.createElementVNode("div",null,[o.displayWarning||o.isLegacy?(n.openBlock(),n.createBlock(f,{key:0,placement:"right","popper-class":"warning-popper flatmap-popper",teleported:!1,visible:e.hoverVisibilities[7].value,ref:"warningPopover"},{reference:n.withCtx(()=>[n.createElementVNode("div",{class:"warning-icon",onMouseover:t[7]||(t[7]=T=>r.showTooltip(7)),onMouseout:t[8]||(t[8]=T=>r.hideTooltip(7))},[o.displayWarning||o.isLegacy?(n.openBlock(),n.createBlock(d,{key:0},{default:n.withCtx(()=>[n.createVNode(c)]),_:1})):n.createCommentVNode("",!0),o.isLegacy?(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[t[31]||(t[31]=n.createElementVNode("span",{class:"warning-text"},"Legacy Map",-1)),n.createElementVNode("div",{class:"latest-map-text",onClick:t[6]||(t[6]=(...T)=>r.viewLatestMap&&r.viewLatestMap(...T))}," Click here for the latest map ")],64)):o.displayWarning?(n.openBlock(),n.createElementBlock("span",qy,"Beta")):n.createCommentVNode("",!0)],32)]),default:n.withCtx(()=>[o.isLegacy?(n.openBlock(),n.createElementBlock("p",{key:0,onMouseover:t[0]||(t[0]=T=>r.showTooltip(7)),onMouseout:t[1]||(t[1]=T=>r.hideTooltip(7))}," This is a legacy map, you may view the latest map instead. ",32)):e.isFC?(n.openBlock(),n.createElementBlock("p",{key:1,onMouseover:t[2]||(t[2]=T=>r.showTooltip(7)),onMouseout:t[3]||(t[3]=T=>r.hideTooltip(7))},t[29]||(t[29]=[n.createTextVNode(" This map displays the connectivity of individual neurons. Specifically, those which align with (parts of) the neuron populations from the "),n.createElementVNode("a",{href:"https://sparc.science/resources/1ZUKXU2YmLcn2reCyXjlew",target:"_blank"}," ApiNATOMY ",-1),n.createTextVNode(" models available in "),n.createElementVNode("a",{href:"https://sparc.science/resources/6eg3VpJbwQR4B84CjrvmyD",target:"_blank"}," SCKAN ",-1),n.createTextVNode(". ")]),32)):(n.openBlock(),n.createElementBlock("p",{key:2,onMouseover:t[4]||(t[4]=T=>r.showTooltip(7)),onMouseout:t[5]||(t[5]=T=>r.hideTooltip(7))},t[30]||(t[30]=[n.createTextVNode(" This map displays the connectivity of neuron populations. Specifically, those from the primarily rat-based "),n.createElementVNode("a",{href:"https://sparc.science/resources/1ZUKXU2YmLcn2reCyXjlew",target:"_blank"}," ApiNATOMY ",-1),n.createTextVNode(" models available in "),n.createElementVNode("a",{href:"https://sparc.science/resources/6eg3VpJbwQR4B84CjrvmyD",target:"_blank"}," SCKAN ",-1),n.createTextVNode(". New connectivity and species specificity will be added as the SPARC program progresses. ")]),32))]),_:1},8,["visible"])):n.createCommentVNode("",!0)]),o.displayLatestChanges?(n.openBlock(),n.createBlock(f,{key:0,placement:"right",teleported:!1,trigger:"manual","popper-class":"warning-popper flatmap-popper",visible:e.hoverVisibilities[8].value,ref:"whatsNewPopover"},{reference:n.withCtx(()=>[o.displayLatestChanges?(n.openBlock(),n.createElementBlock("div",{key:0,class:"latest-changesicon",onMouseover:t[9]||(t[9]=T=>r.showTooltip(8)),onMouseout:t[10]||(t[10]=T=>r.hideTooltip(8))},[n.createVNode(d,null,{default:n.withCtx(()=>[n.createVNode(c)]),_:1}),t[32]||(t[32]=n.createElementVNode("span",{class:"warning-text"},"What's new?",-1))],32)):n.createCommentVNode("",!0)]),default:n.withCtx(()=>t[33]||(t[33]=[n.createElementVNode("b",null,"Connectivity References",-1),n.createElementVNode("p",null," Connectivity references have been improved and available in various formats. ",-1),n.createElementVNode("b",null,"Improved state storing",-1),n.createElementVNode("p",null," Current selection and visibility filters are now stored when creating a permalink. ",-1)])),_:1},8,["visible"])):n.createCommentVNode("",!0)],512),[[n.vShow,!o.disableUI]]),n.withDirectives(n.createVNode(d,{class:n.normalizeClass(["minimap-resize",{enlarge:e.minimapSmall,shrink:!e.minimapSmall}]),ref:"minimapResize",onClick:r.closeMinimap},{default:n.withCtx(()=>[n.createVNode(u)]),_:1},8,["class","onClick"]),[[n.vShow,e.minimapResizeShow]]),e.viewingMode==="Annotation"&&(e.authorisedUser||e.offlineAnnotationEnabled)&&!o.disableUI?(n.openBlock(),n.createBlock(p,{key:1,mapCanvas:{containerHTML:this.$el,class:".maplibregl-canvas"},toolbarOptions:e.toolbarOptions,activeDrawTool:e.activeDrawTool,activeDrawMode:e.activeDrawMode,newlyDrawnEntry:e.drawnCreatedEvent,connectionEntry:e.connectionEntry,hoverVisibilities:e.hoverVisibilities,onClickToolbar:r.toolbarEvent,onFeatureTooltip:r.connectedFeatureTooltip,onConfirmDrawn:r.confirmDrawnFeature,onCancelDrawn:r.cancelDrawnFeature,onShowTooltip:r.showTooltip,onHideTooltip:r.hideTooltip,ref:"toolbarPopover"},null,8,["mapCanvas","toolbarOptions","activeDrawTool","activeDrawMode","newlyDrawnEntry","connectionEntry","hoverVisibilities","onClickToolbar","onFeatureTooltip","onConfirmDrawn","onCancelDrawn","onShowTooltip","onHideTooltip"])):n.createCommentVNode("",!0),n.withDirectives(n.createElementVNode("div",Gy,[n.createVNode(f,{content:"Zoom in",placement:"left",teleported:!1,trigger:"manual",width:"70","popper-class":"flatmap-popper",visible:e.hoverVisibilities[1].value,ref:"zoomInPopover"},{reference:n.withCtx(()=>[n.createElementVNode("div",{class:"icon-button-container",onClick:t[11]||(t[11]=T=>r.zoomIn()),onMouseover:t[12]||(t[12]=T=>r.showTooltip(1)),onMouseout:t[13]||(t[13]=T=>r.hideTooltip(1))},[n.createVNode(g,{class:"icon-button zoomIn",icon:"zoomIn"})],32)]),_:1},8,["visible"]),n.createVNode(f,{content:"Zoom out",placement:"top-end",teleported:!1,trigger:"manual",width:"70","popper-class":"flatmap-popper",visible:e.hoverVisibilities[2].value,ref:"zoomOutPopover"},{reference:n.withCtx(()=>[n.createElementVNode("div",{class:"icon-button-container",onClick:t[14]||(t[14]=T=>r.zoomOut()),onMouseover:t[15]||(t[15]=T=>r.showTooltip(2)),onMouseout:t[16]||(t[16]=T=>r.hideTooltip(2))},[n.createVNode(g,{class:"icon-button zoomOut",icon:"zoomOut"})],32)]),_:1},8,["visible"]),n.createVNode(f,{content:"Reset",placement:"top",teleported:!1,trigger:"manual",width:"70","popper-class":"flatmap-popper",visible:e.hoverVisibilities[3].value,ref:"zoomFitPopover"},{reference:n.withCtx(()=>[n.createElementVNode("div",{class:"icon-button-container",onClick:t[17]||(t[17]=T=>r.resetView()),onMouseover:t[18]||(t[18]=T=>r.showTooltip(3)),onMouseout:t[19]||(t[19]=T=>r.hideTooltip(3))},[n.createVNode(g,{class:"icon-button fitWindow",icon:"fitWindow"})],32)]),default:n.withCtx(()=>[t[34]||(t[34]=n.createElementVNode("div",null,[n.createTextVNode(" Fit to "),n.createElementVNode("br"),n.createTextVNode(" window ")],-1))]),_:1},8,["visible"])],512),[[n.vShow,!o.disableUI]]),n.createVNode(f,{content:"Change pathway visibility",placement:"right",teleported:!1,trigger:"manual",offset:-18,"popper-class":"flatmap-popper",visible:e.hoverVisibilities[6].value,ref:"checkBoxPopover"},{reference:n.withCtx(()=>[n.withDirectives(n.createElementVNode("div",{class:n.normalizeClass(["pathway-location",{open:e.drawerOpen,close:!e.drawerOpen}])},[n.withDirectives((n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["pathway-container",{open:e.drawerOpen,close:!e.drawerOpen}]),style:n.normalizeStyle({"max-height":e.pathwaysMaxHeight+"px"})},[r.legendEntry.length?(n.openBlock(),n.createBlock(h,{key:0,identifierKey:"prompt",colourKey:"colour",styleKey:"style",legends:r.legendEntry,showStarInLegend:!0,showDatasetMarkerTooltip:r.showDatasetMarkerTooltip,ref:"featuredMarkerPopover",class:"svg-legends-container"},null,8,["legends","showDatasetMarkerTooltip"])):n.createCommentVNode("",!0),n.createVNode(f,{content:"Find these markers for data. The number inside the markers is the number of datasets available for each marker.",placement:"right",teleported:!1,width:"200",trigger:"manual","popper-class":"flatmap-popper flatmap-marker-popper",visible:e.hoverVisibilities[0].value,ref:"markerPopover"},{reference:n.withCtx(()=>[n.withDirectives(n.createElementVNode("div",{class:"flatmap-marker-help",innerHTML:e.flatmapMarker},null,8,Jy),[[n.vShow,e.hoverVisibilities[0].value],[N,void 0,"markerPopover"]])]),_:1},8,["visible"]),e.isFC&&e.systems&&e.systems.length>0?(n.openBlock(),n.createBlock(m,{key:1,class:"treeControls",mapType:"flatmap",title:"Systems",treeData:e.systems,active:e.currentActive,hover:e.currentHover,onCheckChanged:r.systemSelected,onCheckAll:r.checkAllSystems,onChangeActive:r.ftuSelected,ref:"treeControls"},null,8,["treeData","active","hover","onCheckChanged","onCheckAll","onChangeActive"])):n.createCommentVNode("",!0),e.containsAlert&&e.alertOptions&&o.showPathwayFilter?(n.openBlock(),n.createBlock(y,{title:"Alert",labelKey:"label",identifierKey:"key",selections:e.alertOptions,onChanged:r.alertSelected,onCheckboxMouseEnter:r.alertMouseEnterEmitted,onSelectionsDataChanged:r.onSelectionsDataChanged,onCheckAll:r.checkAllAlerts,ref:"alertSelection",key:"alertSelection"},null,8,["selections","onChanged","onCheckboxMouseEnter","onSelectionsDataChanged","onCheckAll"])):n.createCommentVNode("",!0),e.pathways&&e.pathways.length>0?(n.openBlock(),n.createBlock(y,{title:"Pathways",labelKey:"label",identifierKey:"type",colourStyle:"line",selections:e.pathways,showAsLegend:!o.showPathwayFilter,onChanged:r.pathwaysSelected,onSelectionsDataChanged:r.onSelectionsDataChanged,onCheckAll:r.checkAllPathways,ref:"pathwaysSelection",key:"pathwaysSelection"},null,8,["selections","showAsLegend","onChanged","onSelectionsDataChanged","onCheckAll"])):n.createCommentVNode("",!0),e.taxonConnectivity&&e.taxonConnectivity.length>0&&o.showPathwayFilter?(n.openBlock(),n.createBlock(y,{title:"Studied in",labelKey:"label",identifierKey:"taxon",helpMessage:"Evidence exists that this set of neuron populations have been studied in the given species.",selections:e.taxonConnectivity,onChanged:r.taxonsSelected,onCheckboxMouseEnter:r.taxonMouseEnterEmitted,onSelectionsDataChanged:r.onSelectionsDataChanged,onCheckAll:r.checkAllTaxons,ref:"taxonSelection",key:"taxonSelection"},null,8,["selections","onChanged","onCheckboxMouseEnter","onSelectionsDataChanged","onCheckAll"])):n.createCommentVNode("",!0)],6)),[[N,void 0,"checkBoxPopover"]]),n.createElementVNode("div",{onClick:t[20]||(t[20]=(...T)=>r.toggleDrawer&&r.toggleDrawer(...T)),class:n.normalizeClass(["drawer-button",{open:e.drawerOpen,close:!e.drawerOpen}])},[n.createVNode(d,null,{default:n.withCtx(()=>[n.createVNode(b)]),_:1})],2)],2),[[n.vShow,!o.disableUI&&r.requiresDrawer]])]),_:1},8,["visible"]),e.openMapRef?(n.openBlock(),n.createBlock(f,{key:2,ref:"open-map-popover","virtual-ref":e.openMapRef,placement:"top-start",width:"136",teleported:!1,trigger:"click","popper-class":"open-map-popper non-selectable","virtual-triggering":""},{default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(o.openMapOptions,T=>(n.openBlock(),n.createBlock(I,{key:T.key},{default:n.withCtx(()=>[n.createVNode(C,{type:"primary",plain:"",onClick:L=>e.$emit("open-map",T.key)},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(T.display),1)]),_:2},1032,["onClick"])]),_:2},1024))),128))]),_:1},8,["virtual-ref"])):n.createCommentVNode("",!0),n.createVNode(f,{ref:"backgroundPopover","virtual-ref":e.backgroundIconRef,placement:"top-start",width:"320",teleported:!1,trigger:"click","popper-class":"background-popper h-auto","virtual-triggering":""},{default:n.withCtx(()=>[n.createElementVNode("div",null,[n.createVNode(I,{class:"backgroundText"},{default:n.withCtx(()=>t[35]||(t[35]=[n.createTextVNode("Viewing Mode")])),_:1}),n.createVNode(I,{class:"backgroundControl"},{default:n.withCtx(()=>[n.createElementVNode("div",Yy,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.viewingModes,(T,L,q)=>(n.openBlock(),n.createElementBlock(n.Fragment,{key:L},[L===e.viewingMode?(n.openBlock(),n.createElementBlock("span",Zy,[n.createElementVNode("b",null,n.toDisplayString(L),1)])):(n.openBlock(),n.createElementBlock("span",{key:1,class:"viewing-mode-unselected",onClick:V=>r.changeViewingMode(L)},n.toDisplayString(L),9,Qy))],64))),128))]),n.createVNode(I,{class:"viewing-mode-description"},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(r.modeDescription),1)]),_:1}),e.viewingMode==="Annotation"&&e.offlineAnnotationEnabled?(n.openBlock(),n.createBlock(I,{key:0,class:"viewing-mode-description"},{default:n.withCtx(()=>t[36]||(t[36]=[n.createTextVNode(" (Anonymous annotate) ")])),_:1})):n.createCommentVNode("",!0)]),_:1}),e.viewingMode==="Annotation"&&e.authorisedUser?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createVNode(I,{class:"backgroundText"},{default:n.withCtx(()=>t[37]||(t[37]=[n.createTextVNode("Annotations From")])),_:1}),n.createVNode(I,{class:"backgroundControl"},{default:n.withCtx(()=>[n.createVNode(S,{teleported:!1,modelValue:e.annotationFrom,"onUpdate:modelValue":t[21]||(t[21]=T=>e.annotationFrom=T),placeholder:"Select",class:"select-box","popper-class":"flatmap_dropdown",onChange:r.setAnnotationFrom},{default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.annotatedSource,T=>(n.openBlock(),n.createBlock(v,{key:T,label:T,value:T},{default:n.withCtx(()=>[n.createVNode(I,null,{default:n.withCtx(()=>[n.createVNode(k,{span:12},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(T),1)]),_:2},1024)]),_:2},1024)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","onChange"])]),_:1})],64)):n.createCommentVNode("",!0),e.displayFlightPathOption?(n.openBlock(),n.createBlock(I,{key:1,class:"backgroundSpacer"})):n.createCommentVNode("",!0),e.displayFlightPathOption?(n.openBlock(),n.createBlock(I,{key:2,class:"backgroundText"},{default:n.withCtx(()=>t[38]||(t[38]=[n.createTextVNode("Flight path display")])),_:1})):n.createCommentVNode("",!0),e.displayFlightPathOption?(n.openBlock(),n.createBlock(I,{key:3,class:"backgroundControl"},{default:n.withCtx(()=>[n.createVNode(O,{modelValue:e.flightPath3DRadio,"onUpdate:modelValue":t[22]||(t[22]=T=>e.flightPath3DRadio=T),class:"flatmap-radio",onChange:r.setFlightPath3D},{default:n.withCtx(()=>[n.createVNode(E,{value:!1},{default:n.withCtx(()=>t[39]||(t[39]=[n.createTextVNode("2D")])),_:1}),n.createVNode(E,{value:!0},{default:n.withCtx(()=>t[40]||(t[40]=[n.createTextVNode("3D")])),_:1})]),_:1},8,["modelValue","onChange"])]),_:1})):n.createCommentVNode("",!0),n.createVNode(I,{class:"backgroundSpacer"}),n.createVNode(I,{class:"backgroundText"},{default:n.withCtx(()=>t[41]||(t[41]=[n.createTextVNode("Organs display")])),_:1}),n.createVNode(I,{class:"backgroundControl"},{default:n.withCtx(()=>[n.createVNode(O,{modelValue:e.colourRadio,"onUpdate:modelValue":t[23]||(t[23]=T=>e.colourRadio=T),class:"flatmap-radio",onChange:r.setColour},{default:n.withCtx(()=>[n.createVNode(E,{value:!0},{default:n.withCtx(()=>t[42]||(t[42]=[n.createTextVNode("Colour")])),_:1}),n.createVNode(E,{value:!1},{default:n.withCtx(()=>t[43]||(t[43]=[n.createTextVNode("Greyscale")])),_:1})]),_:1},8,["modelValue","onChange"])]),_:1}),n.createVNode(I,{class:"backgroundSpacer"}),n.createVNode(I,{class:"backgroundText"},{default:n.withCtx(()=>t[44]||(t[44]=[n.createTextVNode("Outlines display")])),_:1}),n.createVNode(I,{class:"backgroundControl"},{default:n.withCtx(()=>[n.createVNode(O,{modelValue:e.outlinesRadio,"onUpdate:modelValue":t[24]||(t[24]=T=>e.outlinesRadio=T),class:"flatmap-radio",onChange:r.setOutlines},{default:n.withCtx(()=>[n.createVNode(E,{value:!0},{default:n.withCtx(()=>t[45]||(t[45]=[n.createTextVNode("Show")])),_:1}),n.createVNode(E,{value:!1},{default:n.withCtx(()=>t[46]||(t[46]=[n.createTextVNode("Hide")])),_:1})]),_:1},8,["modelValue","onChange"])]),_:1}),n.createVNode(I,{class:"backgroundSpacer"}),n.createVNode(I,{class:"backgroundText"},{default:n.withCtx(()=>t[47]||(t[47]=[n.createTextVNode("Change background")])),_:1}),n.createVNode(I,{class:"backgroundControl"},{default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.availableBackground,T=>(n.openBlock(),n.createElementBlock("div",{key:T,class:n.normalizeClass(["backgroundChoice",T,T==e.currentBackground?"active":""]),onClick:L=>r.backgroundChangeCallback(T)},null,10,Xy))),128))]),_:1})])]),_:1},8,["virtual-ref"]),n.withDirectives(n.createElementVNode("div",{class:n.normalizeClass(["settings-group",{open:e.drawerOpen,close:!e.drawerOpen}])},[o.showOpenMapButton?(n.openBlock(),n.createBlock(I,{key:0},{default:n.withCtx(()=>[n.createVNode(f,{visible:e.hoverVisibilities[4].value,content:"Open new map",placement:"right",teleported:!1,"popper-class":"flatmap-popper",ref:"openMapPopover"},{reference:n.withCtx(()=>[o.enableOpenMapUI&&o.openMapOptions.length>0?(n.openBlock(),n.createElementBlock("div",{key:0,ref:"openMapRef",class:"icon-button-container",onMouseover:t[25]||(t[25]=T=>r.showTooltip(4)),onMouseout:t[26]||(t[26]=T=>r.hideTooltip(4))},[n.createVNode(g,{icon:"openMap",class:"icon-button open-map-button"})],544)):n.createCommentVNode("",!0)]),_:1},8,["visible"])]),_:1})):n.createCommentVNode("",!0),o.showLocalSettings?(n.openBlock(),n.createBlock(I,{key:1},{default:n.withCtx(()=>[n.createVNode(f,{content:"Change settings",placement:"right",visible:e.hoverVisibilities[5].value,teleported:!1,trigger:"manual","popper-class":"flatmap-popper",ref:"settingsPopover"},{reference:n.withCtx(()=>[n.createElementVNode("div",{ref:"backgroundIconRef",class:"icon-button-container",onMouseover:t[27]||(t[27]=T=>r.showTooltip(5)),onMouseout:t[28]||(t[28]=T=>r.hideTooltip(5))},[n.createVNode(g,{icon:"changeBckgd",class:"icon-button"})],544)]),_:1},8,["visible"])]),_:1})):n.createCommentVNode("",!0)],2),[[n.vShow,!o.disableUI]]),e.tooltipDisplay?(n.openBlock(),n.createBlock(x,{key:3,ref:"tooltip",class:"tooltip",annotationEntry:e.annotationEntry,tooltipEntry:e.tooltipEntry,annotationDisplay:e.viewingMode==="Annotation",onAnnotation:r.commitAnnotationEvent,onOnActionClick:r.onActionClick},null,8,["annotationEntry","tooltipEntry","annotationDisplay","onAnnotation","onOnActionClick"])):n.createCommentVNode("",!0)])])),[[B,e.loading]])}const mi=st(jy,[["render",eb],["__scopeId","data-v-0cb6200d"]]),Cs={"NCBITaxon:10114":"01fedbf9-d783-509c-a10c-827941ab13da","NCBITaxon:9823":"a336ac04-24db-561f-a25f-1c994fe17410","NCBITaxon:9606":"42ed6323-f645-5fbe-bada-9581819cf689","NCBITaxon:10090":"25285fab-48a0-5620-a6a0-f9a0374837d5","NCBITaxon:9685":"73060497-46a6-52bf-b975-cac511c127cb"},tb={name:"MultiFlatmapVuer",components:{Col:on,Row:nn,Option:ai,Select:Wn,Popover:an,FlatmapVuer:mi},created:function(){this.loadMapManager()},mounted:function(){this.initialise(),hi.on("onActionClick",e=>{this.resourceSelected(e)}),hi.on("open-pubmed-url",e=>{this.$emit("open-pubmed-url",e)})},methods:{initialise:function(){return this.multiflatmapError=null,new Promise(e=>{if(this.requireInitialisation){this.requireInitialisation=!1;const t=new AbortController,o=t.signal,i=setTimeout(()=>t.abort(),5e3);fetch(this.flatmapAPI,{signal:o}).then(a=>{if(!a.ok){if(a.status===404)return this.multiflatmapError={},this.multiflatmapError.title="MultiFlatmap Error!",this.multiflatmapError.messages=[`Sorry, the component could not be loaded because the specified
28
+ for more details.`],this.flatmapError.button={text:"Restore Context",callback:()=>{this.forceContextRestore()}}},onContextRestored:function(){if(this.mapImp){this.handleMapClick(),this.setInitMapState();const e=this.getState();if(e&&(e.viewport=this.lastViewport),this.restoreMapState(e),this.displayMinimap){const t={position:"top-right"};this.mapImp.createMinimap(t),this.addResizeButtonToMinimap()}this.filterToRestore&&(this.mapImp.setVisibilityFilter(this.filterToRestore),this.filterToRestore=void 0),this.$emit("context-restored",this)}},showPathwaysDrawer:function(e){this.drawerOpen=e},searchAndShowResult:function(e,t,o=!0){var i;if(this.mapImp){if(e===void 0||e==="")return this.mapImp.clearSearchResults(),this.viewingMode==="Exploration"?this.$emit("connectivity-info-close"):this.viewingMode==="Annotation"&&this.manualAbortedOnClose(),this.searchTerm="",!0;{const r=this.mapImp.search(e);if((i=r==null?void 0:r.results)!=null&&i.length){if(this.mapImp.showSearchResults(r),t){let a;for(let s=0;s<r.results.length;s++){a=r.results[s].featureId;const l=this.mapImp.annotation(a);if(a&&(l!=null&&l.label))break}if(a){const s=this.mapImp.featureProperties(a),l={resource:[s.models],feature:s,label:s.label,provenanceTaxonomy:s.taxons,alert:Nt(s.alert)};this.checkAndCreatePopups([l],o),this.mapImp.showPopup(a,Yn(s.label),{className:"custom-popup",positionAtLastClick:!1,preserveSelection:!0})}}return this.searchTerm=e,!0}else this.mapImp.clearSearchResults()}}return!1},highlightConnectedPaths:function(e){if(e.length){const t=e.filter(i=>i in this.mapImp.pathways.paths),o=this.mapImp.modelFeatureIdList(t);this.mapImp.selectGeoJSONFeatures(o)}},searchSuggestions:function(e){return this.mapImp?this.mapImp.search(e):[]},onActionClick:function(e){mi.emit("onActionClick",e)},setConnectionType:function(e){this.connectionType=e}},props:{entry:{type:String,required:!0},uuid:String,biologicalSex:{type:String,default:""},minZoom:{type:Number,default:1},tooltips:{type:Boolean,default:!0},helpMode:{type:Boolean,default:!1},helpModeActiveItem:{type:Number,default:0},helpModeDialog:{type:Boolean,default:!1},helpModeLastItem:{type:Boolean,default:!1},helpModeInitialIndex:{type:Number,default:0},render:{type:Boolean,default:!0},renderAtMounted:{type:Boolean,default:!0},displayMinimap:{type:Boolean,default:!1},displayWarning:{type:Boolean,default:!1},enableOpenMapUI:{type:Boolean,default:!1},openMapOptions:{type:Array,default:function(){return[{display:"Open AC Map",key:"AC"},{display:"Open FC Map",key:"FC"},{display:"Open 3D Human Map",key:"3D"}]}},showStarInLegend:{type:Boolean,default:!1},isLegacy:{type:Boolean,default:!1},displayLatestChanges:{type:Boolean,default:!1},state:{type:Object,default:void 0},mapManager:{type:Object,default:void 0},flatmapAPI:{type:String,default:"https://mapcore-demo.org/current/flatmap/v3/"},sparcAPI:{type:String,default:"https://api.sparc.science/"},disableUI:{type:Boolean,default:!1},connectivityInfoSidebar:{type:Boolean,default:!1},annotationSidebar:{type:Boolean,default:!1},showLocalSettings:{type:Boolean,default:!0},showOpenMapButton:{type:Boolean,default:!0},showPathwayFilter:{type:Boolean,default:!0},externalLegends:{type:Array,default:function(){return[]}}},provide(){return{flatmapAPI:this.flatmapAPI,sparcAPI:this.sparcAPI,userApiKey:this.userToken}},data:function(){return{filterToRestore:void 0,flatmapError:null,sensor:null,mapManagerRef:void 0,flatmapQueries:void 0,annotationEntry:[],tooltipDisplay:!1,serverURL:void 0,layers:[],pathways:[],initMapState:n.markRaw({}),sckanDisplay:[{label:"Display Path with SCKAN",key:"VALID"}],systems:[],taxonConnectivity:[],pathwaysMaxHeight:1e3,tooltipWait:n.markRaw([]),hoverVisibilities:[{value:!1,ref:"markerPopover"},{value:!1,ref:"zoomInPopover"},{value:!1,ref:"zoomOutPopover"},{value:!1,ref:"zoomFitPopover"},{value:!1,ref:"openMapPopover"},{value:!1,ref:"settingsPopover"},{value:!1,ref:"checkBoxPopover"},{value:!1,ref:"warningPopover"},{value:!1,ref:"whatsNewPopover"},{value:!1,ref:"featuredMarkerPopover"},{value:!1,refs:"toolbarPopover",ref:"editPopover"},{value:!1,refs:"toolbarPopover",ref:"deletePopover"},{value:!1,refs:"toolbarPopover",ref:"pointPopover"},{value:!1,refs:"toolbarPopover",ref:"lineStringPopover"},{value:!1,refs:"toolbarPopover",ref:"polygonPopover"},{value:!1,refs:"toolbarPopover",ref:"connectionPopover"}],helpModeActiveIndex:this.helpModeInitialIndex,yellowstar:Vy,isFC:!1,inHelp:!1,currentBackground:"white",availableBackground:["white","lightskyblue","black"],loading:!1,flatmapMarker:Oy,tooltipEntry:[],connectivityDataSource:"",connectivityTooltipVisible:!1,drawerOpen:!1,flightPath3DRadio:!1,displayFlightPathOption:!1,colourRadio:!0,outlinesRadio:!0,minimapResizeShow:!1,minimapSmall:!1,currentActive:"",selectedDrawnFeature:void 0,currentHover:"",viewingMode:"Exploration",viewingModes:{Exploration:"Find relevant research and view detail of neural pathways by selecting a pathway to view its connections and data sources","Neuron Connection":"Discover Neuron connections by selecting a neuron and viewing its associated network connections",Annotation:["View feature annotations","Add, comment on and view feature annotations"]},connectionType:"All",offlineAnnotationEnabled:!1,offlineAnnotations:[],annotationFrom:"Anyone",annotatedSource:["Anyone","Me","Others"],openMapRef:void 0,backgroundIconRef:void 0,toolbarOptions:["Edit","Delete","Point","LineString","Polygon","Connection"],annotator:void 0,authorisedUser:void 0,activeDrawMode:void 0,activeDrawTool:void 0,featureAnnotationSubmitted:!1,drawnCreatedEvent:{},previousEditEvent:{},previousDeletedEvent:{},connectionEntry:{},existDrawnFeatures:[],doubleClickedFeature:!1,containsAlert:!1,alertOptions:[{label:"Display Path With Notes",key:"alert",enabled:!0},{label:"Display Path Without Notes",key:"withoutAlert",enabled:!0}],mapFilters:n.markRaw({alert:{with:!0,without:!0}}),searchTerm:"",taxonLeaveDelay:void 0,connectivityFilters:[],flatmapLegends:[],lastViewport:void 0}},computed:{...Si.mapState(Dy,["userToken"]),isValidDrawnCreated:function(){return Object.keys(this.drawnCreatedEvent).length>0},requiresDrawer:function(){var e,t,o,i;return this.loading?(this.drawerOpen=!1,!1):((e=this.systems)==null?void 0:e.length)>0||this.containsAlert&&this.alertOptions||((t=this.pathways)==null?void 0:t.length)>0||((o=this.taxonConnectivity)==null?void 0:o.length)>0||((i=this.legendEntry)==null?void 0:i.length)>0?(this.drawerOpen=!0,!0):(this.drawerOpen=!1,!1)},modeDescription:function(){let e=this.viewingModes[this.viewingMode];return this.viewingMode==="Annotation"?this.authorisedUser?e[1]:e[0]:e},legendEntry:function(){return[...this.flatmapLegends,...this.externalLegends]},showDatasetMarkerTooltip:function(){return this.hoverVisibilities[9].value}},watch:{entry:function(){this.state||this.createFlatmap()},helpMode:function(e,t){e!==t&&this.setHelpMode(e)},helpModeActiveItem:function(){this.helpMode&&(this.helpModeActiveIndex+=1,this.setHelpMode(this.helpMode))},render:function(e){e&&this.mapImp&&this.mapImp.contextLost&&!this.loading&&this.$nextTick(()=>{this.forceContextRestore()})},state:{handler:function(e,t){e!==t&&(this.mapManagerRef?this.setState(e):this.setStateRequired=!0)},immediate:!0,deep:!0},viewingMode:function(e){this.clearAnnotationFeature(),e==="Annotation"&&(this.loading=!0,this.annotator.authenticate(this.userToken).then(t=>{t.name&&t.email&&t.canUpdate?(this.authorisedUser=t,this.offlineAnnotationEnabled=!1):(this.authorisedUser=void 0,this.offlineAnnotationEnabled=!0),this.emitOfflineAnnotationUpdate(),this.setFeatureAnnotated(),this.addAnnotationFeature(),this.loading=!1}))},disableUI:function(e){e&&this.closeTooltip()},activeDrawTool:function(e){let t=[],o={x:null,y:null};const i=this.$el.querySelector(".maplibregl-canvas"),r=()=>{i.removeEventListener("keydown",a),i.removeEventListener("click",s)},a=l=>{if(!["Escape","Enter"].includes(l.key))return;const c=e==="Point"&&t.length===1||e==="LineString"&&t.length>=2||e==="Polygon"&&t.length>=3;(l.key==="Escape"||l.key==="Enter"&&!c)&&(this.activeDrawTool=void 0),r()},s=l=>{const c=i.getBoundingClientRect(),d=l.clientX-c.left,f=l.clientY-c.top;if(Math.sqrt((d-o.x)**2+(f-o.y)**2)<8){this.isValidDrawnCreated||(this.activeDrawTool=void 0),r();return}o={x:d,y:f},t.push(o)};e&&(r(),i.addEventListener("keydown",a),i.addEventListener("click",s))}},created:function(){this.mapManager?this.mapManagerRef=this.mapManager:(this.mapManagerRef=n.markRaw(new ki.MapViewer(this.flatmapAPI,{container:void 0})),this.$emit("mapmanager-loaded",this.mapManagerRef))},mounted:function(){this.openMapRef=n.shallowRef(this.$refs.openMapRef),this.backgroundIconRef=n.shallowRef(this.$refs.backgroundIconRef),this.tooltipWait.length=this.hoverVisibilities.length,this.flatmapQueries=n.markRaw(new My),this.flatmapQueries.initialise(this.flatmapAPI),this.state?this.setStateRequired&&this.setState(this.state):this.renderAtMounted&&this.createFlatmap(),bs()}},Ky={class:"flatmap-container",ref:"flatmapContainer","element-loading-text":"Loading...","element-loading-background":"rgba(0, 0, 0, 0.3)"},Uy={style:{height:"100%",width:"100%",position:"relative","overflow-y":"none"}},Wy={style:{height:"100%",width:"100%"},ref:"display",class:"flatmap-display"},qy={class:"beta-popovers"},Gy={key:2,class:"warning-text"},Jy={class:"bottom-right-control"},Yy=["innerHTML"],Zy={style:{"margin-bottom":"2px"}},Qy={key:0,class:"viewing-mode-title"},Xy=["onClick"],eb=["onClick"];function tb(e,t,o,i,r,a){const s=n.resolveComponent("map-svg-sprite-color"),l=di,c=W.WarningFilled,d=be,f=an,u=W.ArrowDown,p=n.resolveComponent("DrawToolbar"),g=n.resolveComponent("map-svg-icon"),h=hy,m=n.resolveComponent("tree-controls"),y=gs,b=W.ArrowLeft,C=ni,I=on,k=rn,v=ai,S=qn,E=rs,O=as,x=n.resolveComponent("Tooltip"),N=si,B=ci;return n.withDirectives((n.openBlock(),n.createElementBlock("div",Ky,[n.createVNode(s),n.createElementVNode("div",Uy,[n.createElementVNode("div",Wy,null,512),e.flatmapError?(n.openBlock(),n.createBlock(l,{key:0,flatmapError:e.flatmapError},null,8,["flatmapError"])):n.createCommentVNode("",!0),n.withDirectives(n.createElementVNode("div",qy,[n.createElementVNode("div",null,[o.displayWarning||o.isLegacy?(n.openBlock(),n.createBlock(f,{key:0,placement:"right","popper-class":"warning-popper flatmap-popper",teleported:!1,visible:e.hoverVisibilities[7].value,ref:"warningPopover"},{reference:n.withCtx(()=>[n.createElementVNode("div",{class:"warning-icon",onMouseover:t[7]||(t[7]=T=>a.showTooltip(7)),onMouseout:t[8]||(t[8]=T=>a.hideTooltip(7))},[o.displayWarning||o.isLegacy?(n.openBlock(),n.createBlock(d,{key:0},{default:n.withCtx(()=>[n.createVNode(c)]),_:1})):n.createCommentVNode("",!0),o.isLegacy?(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[t[31]||(t[31]=n.createElementVNode("span",{class:"warning-text"},"Legacy Map",-1)),n.createElementVNode("div",{class:"latest-map-text",onClick:t[6]||(t[6]=(...T)=>a.viewLatestMap&&a.viewLatestMap(...T))}," Click here for the latest map ")],64)):o.displayWarning?(n.openBlock(),n.createElementBlock("span",Gy,"Beta")):n.createCommentVNode("",!0)],32)]),default:n.withCtx(()=>[o.isLegacy?(n.openBlock(),n.createElementBlock("p",{key:0,onMouseover:t[0]||(t[0]=T=>a.showTooltip(7)),onMouseout:t[1]||(t[1]=T=>a.hideTooltip(7))}," This is a legacy map, you may view the latest map instead. ",32)):e.isFC?(n.openBlock(),n.createElementBlock("p",{key:1,onMouseover:t[2]||(t[2]=T=>a.showTooltip(7)),onMouseout:t[3]||(t[3]=T=>a.hideTooltip(7))},t[29]||(t[29]=[n.createTextVNode(" This map displays the connectivity of individual neurons. Specifically, those which align with (parts of) the neuron populations from the "),n.createElementVNode("a",{href:"https://sparc.science/resources/1ZUKXU2YmLcn2reCyXjlew",target:"_blank"}," ApiNATOMY ",-1),n.createTextVNode(" models available in "),n.createElementVNode("a",{href:"https://sparc.science/resources/6eg3VpJbwQR4B84CjrvmyD",target:"_blank"}," SCKAN ",-1),n.createTextVNode(". ")]),32)):(n.openBlock(),n.createElementBlock("p",{key:2,onMouseover:t[4]||(t[4]=T=>a.showTooltip(7)),onMouseout:t[5]||(t[5]=T=>a.hideTooltip(7))},t[30]||(t[30]=[n.createTextVNode(" This map displays the connectivity of neuron populations. Specifically, those from the primarily rat-based "),n.createElementVNode("a",{href:"https://sparc.science/resources/1ZUKXU2YmLcn2reCyXjlew",target:"_blank"}," ApiNATOMY ",-1),n.createTextVNode(" models available in "),n.createElementVNode("a",{href:"https://sparc.science/resources/6eg3VpJbwQR4B84CjrvmyD",target:"_blank"}," SCKAN ",-1),n.createTextVNode(". New connectivity and species specificity will be added as the SPARC program progresses. ")]),32))]),_:1},8,["visible"])):n.createCommentVNode("",!0)]),o.displayLatestChanges?(n.openBlock(),n.createBlock(f,{key:0,placement:"right",teleported:!1,trigger:"manual","popper-class":"warning-popper flatmap-popper",visible:e.hoverVisibilities[8].value,ref:"whatsNewPopover"},{reference:n.withCtx(()=>[o.displayLatestChanges?(n.openBlock(),n.createElementBlock("div",{key:0,class:"latest-changesicon",onMouseover:t[9]||(t[9]=T=>a.showTooltip(8)),onMouseout:t[10]||(t[10]=T=>a.hideTooltip(8))},[n.createVNode(d,null,{default:n.withCtx(()=>[n.createVNode(c)]),_:1}),t[32]||(t[32]=n.createElementVNode("span",{class:"warning-text"},"What's new?",-1))],32)):n.createCommentVNode("",!0)]),default:n.withCtx(()=>t[33]||(t[33]=[n.createElementVNode("b",null,"Connectivity References",-1),n.createElementVNode("p",null," Connectivity references have been improved and available in various formats. ",-1),n.createElementVNode("b",null,"Improved state storing",-1),n.createElementVNode("p",null," Current selection and visibility filters are now stored when creating a permalink. ",-1)])),_:1},8,["visible"])):n.createCommentVNode("",!0)],512),[[n.vShow,!o.disableUI]]),n.withDirectives(n.createVNode(d,{class:n.normalizeClass(["minimap-resize",{enlarge:e.minimapSmall,shrink:!e.minimapSmall}]),ref:"minimapResize",onClick:a.closeMinimap},{default:n.withCtx(()=>[n.createVNode(u)]),_:1},8,["class","onClick"]),[[n.vShow,e.minimapResizeShow]]),e.viewingMode==="Annotation"&&(e.authorisedUser||e.offlineAnnotationEnabled)&&!o.disableUI?(n.openBlock(),n.createBlock(p,{key:1,mapCanvas:{containerHTML:this.$el,class:".maplibregl-canvas"},toolbarOptions:e.toolbarOptions,activeDrawTool:e.activeDrawTool,activeDrawMode:e.activeDrawMode,newlyDrawnEntry:e.drawnCreatedEvent,connectionEntry:e.connectionEntry,hoverVisibilities:e.hoverVisibilities,onClickToolbar:a.toolbarEvent,onFeatureTooltip:a.connectedFeatureTooltip,onConfirmDrawn:a.confirmDrawnFeature,onCancelDrawn:a.cancelDrawnFeature,onShowTooltip:a.showTooltip,onHideTooltip:a.hideTooltip,ref:"toolbarPopover"},null,8,["mapCanvas","toolbarOptions","activeDrawTool","activeDrawMode","newlyDrawnEntry","connectionEntry","hoverVisibilities","onClickToolbar","onFeatureTooltip","onConfirmDrawn","onCancelDrawn","onShowTooltip","onHideTooltip"])):n.createCommentVNode("",!0),n.withDirectives(n.createElementVNode("div",Jy,[n.createVNode(f,{content:"Zoom in",placement:"left",teleported:!1,trigger:"manual",width:"70","popper-class":"flatmap-popper",visible:e.hoverVisibilities[1].value,ref:"zoomInPopover"},{reference:n.withCtx(()=>[n.createElementVNode("div",{class:"icon-button-container",onClick:t[11]||(t[11]=T=>a.zoomIn()),onMouseover:t[12]||(t[12]=T=>a.showTooltip(1)),onMouseout:t[13]||(t[13]=T=>a.hideTooltip(1))},[n.createVNode(g,{class:"icon-button zoomIn",icon:"zoomIn"})],32)]),_:1},8,["visible"]),n.createVNode(f,{content:"Zoom out",placement:"top-end",teleported:!1,trigger:"manual",width:"70","popper-class":"flatmap-popper",visible:e.hoverVisibilities[2].value,ref:"zoomOutPopover"},{reference:n.withCtx(()=>[n.createElementVNode("div",{class:"icon-button-container",onClick:t[14]||(t[14]=T=>a.zoomOut()),onMouseover:t[15]||(t[15]=T=>a.showTooltip(2)),onMouseout:t[16]||(t[16]=T=>a.hideTooltip(2))},[n.createVNode(g,{class:"icon-button zoomOut",icon:"zoomOut"})],32)]),_:1},8,["visible"]),n.createVNode(f,{content:"Reset",placement:"top",teleported:!1,trigger:"manual",width:"70","popper-class":"flatmap-popper",visible:e.hoverVisibilities[3].value,ref:"zoomFitPopover"},{reference:n.withCtx(()=>[n.createElementVNode("div",{class:"icon-button-container",onClick:t[17]||(t[17]=T=>a.resetView()),onMouseover:t[18]||(t[18]=T=>a.showTooltip(3)),onMouseout:t[19]||(t[19]=T=>a.hideTooltip(3))},[n.createVNode(g,{class:"icon-button fitWindow",icon:"fitWindow"})],32)]),default:n.withCtx(()=>[t[34]||(t[34]=n.createElementVNode("div",null,[n.createTextVNode(" Fit to "),n.createElementVNode("br"),n.createTextVNode(" window ")],-1))]),_:1},8,["visible"])],512),[[n.vShow,!o.disableUI]]),n.createVNode(f,{content:"Change pathway visibility",placement:"right",teleported:!1,trigger:"manual",offset:-18,"popper-class":"flatmap-popper",visible:e.hoverVisibilities[6].value,ref:"checkBoxPopover"},{reference:n.withCtx(()=>[n.withDirectives(n.createElementVNode("div",{class:n.normalizeClass(["pathway-location",{open:e.drawerOpen,close:!e.drawerOpen}])},[n.withDirectives((n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["pathway-container",{open:e.drawerOpen,close:!e.drawerOpen}]),style:n.normalizeStyle({"max-height":e.pathwaysMaxHeight+"px"})},[a.legendEntry.length?(n.openBlock(),n.createBlock(h,{key:0,identifierKey:"prompt",colourKey:"colour",styleKey:"style",legends:a.legendEntry,showStarInLegend:!0,showDatasetMarkerTooltip:a.showDatasetMarkerTooltip,ref:"featuredMarkerPopover",class:"svg-legends-container"},null,8,["legends","showDatasetMarkerTooltip"])):n.createCommentVNode("",!0),n.createVNode(f,{content:"Find these markers for data. The number inside the markers is the number of datasets available for each marker.",placement:"right",teleported:!1,width:"200",trigger:"manual","popper-class":"flatmap-popper flatmap-marker-popper",visible:e.hoverVisibilities[0].value,ref:"markerPopover"},{reference:n.withCtx(()=>[n.withDirectives(n.createElementVNode("div",{class:"flatmap-marker-help",innerHTML:e.flatmapMarker},null,8,Yy),[[n.vShow,e.hoverVisibilities[0].value],[N,void 0,"markerPopover"]])]),_:1},8,["visible"]),e.isFC&&e.systems&&e.systems.length>0?(n.openBlock(),n.createBlock(m,{key:1,class:"treeControls",mapType:"flatmap",title:"Systems",treeData:e.systems,active:e.currentActive,hover:e.currentHover,onCheckChanged:a.systemSelected,onCheckAll:a.checkAllSystems,onChangeActive:a.ftuSelected,ref:"treeControls"},null,8,["treeData","active","hover","onCheckChanged","onCheckAll","onChangeActive"])):n.createCommentVNode("",!0),e.containsAlert&&e.alertOptions&&o.showPathwayFilter?(n.openBlock(),n.createBlock(y,{title:"Alert",labelKey:"label",identifierKey:"key",selections:e.alertOptions,onChanged:a.alertSelected,onCheckboxMouseEnter:a.alertMouseEnterEmitted,onSelectionsDataChanged:a.onSelectionsDataChanged,onCheckAll:a.checkAllAlerts,ref:"alertSelection",key:"alertSelection"},null,8,["selections","onChanged","onCheckboxMouseEnter","onSelectionsDataChanged","onCheckAll"])):n.createCommentVNode("",!0),e.pathways&&e.pathways.length>0?(n.openBlock(),n.createBlock(y,{title:"Pathways",labelKey:"label",identifierKey:"type",colourStyle:"line",selections:e.pathways,showAsLegend:!o.showPathwayFilter,onChanged:a.pathwaysSelected,onSelectionsDataChanged:a.onSelectionsDataChanged,onCheckAll:a.checkAllPathways,ref:"pathwaysSelection",key:"pathwaysSelection"},null,8,["selections","showAsLegend","onChanged","onSelectionsDataChanged","onCheckAll"])):n.createCommentVNode("",!0),e.taxonConnectivity&&e.taxonConnectivity.length>0&&o.showPathwayFilter?(n.openBlock(),n.createBlock(y,{title:"Studied in",labelKey:"label",identifierKey:"taxon",helpMessage:"Evidence exists that this set of neuron populations have been studied in the given species.",selections:e.taxonConnectivity,onChanged:a.taxonsSelected,onCheckboxMouseEnter:a.taxonMouseEnterEmitted,onSelectionsDataChanged:a.onSelectionsDataChanged,onCheckAll:a.checkAllTaxons,ref:"taxonSelection",key:"taxonSelection"},null,8,["selections","onChanged","onCheckboxMouseEnter","onSelectionsDataChanged","onCheckAll"])):n.createCommentVNode("",!0)],6)),[[N,void 0,"checkBoxPopover"]]),n.createElementVNode("div",{onClick:t[20]||(t[20]=(...T)=>a.toggleDrawer&&a.toggleDrawer(...T)),class:n.normalizeClass(["drawer-button",{open:e.drawerOpen,close:!e.drawerOpen}])},[n.createVNode(d,null,{default:n.withCtx(()=>[n.createVNode(b)]),_:1})],2)],2),[[n.vShow,!o.disableUI&&a.requiresDrawer]])]),_:1},8,["visible"]),e.openMapRef?(n.openBlock(),n.createBlock(f,{key:2,ref:"open-map-popover","virtual-ref":e.openMapRef,placement:"top-start",width:"136",teleported:!1,trigger:"click","popper-class":"open-map-popper non-selectable","virtual-triggering":""},{default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(o.openMapOptions,T=>(n.openBlock(),n.createBlock(I,{key:T.key},{default:n.withCtx(()=>[n.createVNode(C,{type:"primary",plain:"",onClick:L=>e.$emit("open-map",T.key)},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(T.display),1)]),_:2},1032,["onClick"])]),_:2},1024))),128))]),_:1},8,["virtual-ref"])):n.createCommentVNode("",!0),n.createVNode(f,{ref:"backgroundPopover","virtual-ref":e.backgroundIconRef,placement:"top-start",width:"320",teleported:!1,trigger:"click","popper-class":"background-popper h-auto","virtual-triggering":""},{default:n.withCtx(()=>[n.createElementVNode("div",null,[n.createVNode(I,{class:"backgroundText"},{default:n.withCtx(()=>t[35]||(t[35]=[n.createTextVNode("Viewing Mode")])),_:1}),n.createVNode(I,{class:"backgroundControl"},{default:n.withCtx(()=>[n.createElementVNode("div",Zy,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.viewingModes,(T,L,q)=>(n.openBlock(),n.createElementBlock(n.Fragment,{key:L},[L===e.viewingMode?(n.openBlock(),n.createElementBlock("span",Qy,[n.createElementVNode("b",null,n.toDisplayString(L),1)])):(n.openBlock(),n.createElementBlock("span",{key:1,class:"viewing-mode-unselected",onClick:V=>a.changeViewingMode(L)},n.toDisplayString(L),9,Xy))],64))),128))]),n.createVNode(I,{class:"viewing-mode-description"},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(a.modeDescription),1)]),_:1}),e.viewingMode==="Annotation"&&e.offlineAnnotationEnabled?(n.openBlock(),n.createBlock(I,{key:0,class:"viewing-mode-description"},{default:n.withCtx(()=>t[36]||(t[36]=[n.createTextVNode(" (Anonymous annotate) ")])),_:1})):n.createCommentVNode("",!0)]),_:1}),e.viewingMode==="Annotation"&&e.authorisedUser?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createVNode(I,{class:"backgroundText"},{default:n.withCtx(()=>t[37]||(t[37]=[n.createTextVNode("Annotations From")])),_:1}),n.createVNode(I,{class:"backgroundControl"},{default:n.withCtx(()=>[n.createVNode(S,{teleported:!1,modelValue:e.annotationFrom,"onUpdate:modelValue":t[21]||(t[21]=T=>e.annotationFrom=T),placeholder:"Select",class:"select-box","popper-class":"flatmap_dropdown",onChange:a.setAnnotationFrom},{default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.annotatedSource,T=>(n.openBlock(),n.createBlock(v,{key:T,label:T,value:T},{default:n.withCtx(()=>[n.createVNode(I,null,{default:n.withCtx(()=>[n.createVNode(k,{span:12},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(T),1)]),_:2},1024)]),_:2},1024)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","onChange"])]),_:1})],64)):n.createCommentVNode("",!0),e.displayFlightPathOption?(n.openBlock(),n.createBlock(I,{key:1,class:"backgroundSpacer"})):n.createCommentVNode("",!0),e.displayFlightPathOption?(n.openBlock(),n.createBlock(I,{key:2,class:"backgroundText"},{default:n.withCtx(()=>t[38]||(t[38]=[n.createTextVNode("Flight path display")])),_:1})):n.createCommentVNode("",!0),e.displayFlightPathOption?(n.openBlock(),n.createBlock(I,{key:3,class:"backgroundControl"},{default:n.withCtx(()=>[n.createVNode(O,{modelValue:e.flightPath3DRadio,"onUpdate:modelValue":t[22]||(t[22]=T=>e.flightPath3DRadio=T),class:"flatmap-radio",onChange:a.setFlightPath3D},{default:n.withCtx(()=>[n.createVNode(E,{value:!1},{default:n.withCtx(()=>t[39]||(t[39]=[n.createTextVNode("2D")])),_:1}),n.createVNode(E,{value:!0},{default:n.withCtx(()=>t[40]||(t[40]=[n.createTextVNode("3D")])),_:1})]),_:1},8,["modelValue","onChange"])]),_:1})):n.createCommentVNode("",!0),n.createVNode(I,{class:"backgroundSpacer"}),n.createVNode(I,{class:"backgroundText"},{default:n.withCtx(()=>t[41]||(t[41]=[n.createTextVNode("Organs display")])),_:1}),n.createVNode(I,{class:"backgroundControl"},{default:n.withCtx(()=>[n.createVNode(O,{modelValue:e.colourRadio,"onUpdate:modelValue":t[23]||(t[23]=T=>e.colourRadio=T),class:"flatmap-radio",onChange:a.setColour},{default:n.withCtx(()=>[n.createVNode(E,{value:!0},{default:n.withCtx(()=>t[42]||(t[42]=[n.createTextVNode("Colour")])),_:1}),n.createVNode(E,{value:!1},{default:n.withCtx(()=>t[43]||(t[43]=[n.createTextVNode("Greyscale")])),_:1})]),_:1},8,["modelValue","onChange"])]),_:1}),n.createVNode(I,{class:"backgroundSpacer"}),n.createVNode(I,{class:"backgroundText"},{default:n.withCtx(()=>t[44]||(t[44]=[n.createTextVNode("Outlines display")])),_:1}),n.createVNode(I,{class:"backgroundControl"},{default:n.withCtx(()=>[n.createVNode(O,{modelValue:e.outlinesRadio,"onUpdate:modelValue":t[24]||(t[24]=T=>e.outlinesRadio=T),class:"flatmap-radio",onChange:a.setOutlines},{default:n.withCtx(()=>[n.createVNode(E,{value:!0},{default:n.withCtx(()=>t[45]||(t[45]=[n.createTextVNode("Show")])),_:1}),n.createVNode(E,{value:!1},{default:n.withCtx(()=>t[46]||(t[46]=[n.createTextVNode("Hide")])),_:1})]),_:1},8,["modelValue","onChange"])]),_:1}),n.createVNode(I,{class:"backgroundSpacer"}),n.createVNode(I,{class:"backgroundText"},{default:n.withCtx(()=>t[47]||(t[47]=[n.createTextVNode("Change background")])),_:1}),n.createVNode(I,{class:"backgroundControl"},{default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.availableBackground,T=>(n.openBlock(),n.createElementBlock("div",{key:T,class:n.normalizeClass(["backgroundChoice",T,T==e.currentBackground?"active":""]),onClick:L=>a.backgroundChangeCallback(T)},null,10,eb))),128))]),_:1})])]),_:1},8,["virtual-ref"]),n.withDirectives(n.createElementVNode("div",{class:n.normalizeClass(["settings-group",{open:e.drawerOpen,close:!e.drawerOpen}])},[o.showOpenMapButton?(n.openBlock(),n.createBlock(I,{key:0},{default:n.withCtx(()=>[n.createVNode(f,{visible:e.hoverVisibilities[4].value,content:"Open new map",placement:"right",teleported:!1,"popper-class":"flatmap-popper",ref:"openMapPopover"},{reference:n.withCtx(()=>[o.enableOpenMapUI&&o.openMapOptions.length>0?(n.openBlock(),n.createElementBlock("div",{key:0,ref:"openMapRef",class:"icon-button-container",onMouseover:t[25]||(t[25]=T=>a.showTooltip(4)),onMouseout:t[26]||(t[26]=T=>a.hideTooltip(4))},[n.createVNode(g,{icon:"openMap",class:"icon-button open-map-button"})],544)):n.createCommentVNode("",!0)]),_:1},8,["visible"])]),_:1})):n.createCommentVNode("",!0),o.showLocalSettings?(n.openBlock(),n.createBlock(I,{key:1},{default:n.withCtx(()=>[n.createVNode(f,{content:"Change settings",placement:"right",visible:e.hoverVisibilities[5].value,teleported:!1,trigger:"manual","popper-class":"flatmap-popper",ref:"settingsPopover"},{reference:n.withCtx(()=>[n.createElementVNode("div",{ref:"backgroundIconRef",class:"icon-button-container",onMouseover:t[27]||(t[27]=T=>a.showTooltip(5)),onMouseout:t[28]||(t[28]=T=>a.hideTooltip(5))},[n.createVNode(g,{icon:"changeBckgd",class:"icon-button"})],544)]),_:1},8,["visible"])]),_:1})):n.createCommentVNode("",!0)],2),[[n.vShow,!o.disableUI]]),e.tooltipDisplay?(n.openBlock(),n.createBlock(x,{key:3,ref:"tooltip",class:"tooltip",annotationEntry:e.annotationEntry,tooltipEntry:e.tooltipEntry,annotationDisplay:e.viewingMode==="Annotation",onAnnotation:a.commitAnnotationEvent,onOnActionClick:a.onActionClick},null,8,["annotationEntry","tooltipEntry","annotationDisplay","onAnnotation","onOnActionClick"])):n.createCommentVNode("",!0)])])),[[B,e.loading]])}const gi=st(Hy,[["render",tb],["__scopeId","data-v-8bc68213"]]),vs={"NCBITaxon:10114":"01fedbf9-d783-509c-a10c-827941ab13da","NCBITaxon:9823":"a336ac04-24db-561f-a25f-1c994fe17410","NCBITaxon:9606":"42ed6323-f645-5fbe-bada-9581819cf689","NCBITaxon:10090":"25285fab-48a0-5620-a6a0-f9a0374837d5","NCBITaxon:9685":"73060497-46a6-52bf-b975-cac511c127cb"},nb={name:"MultiFlatmapVuer",components:{Col:rn,Row:on,Option:ai,Select:qn,Popover:an,FlatmapVuer:gi},created:function(){this.loadMapManager()},mounted:function(){this.initialise(),mi.on("onActionClick",e=>{this.resourceSelected(e)}),mi.on("open-pubmed-url",e=>{this.$emit("open-pubmed-url",e)})},methods:{initialise:function(){return this.multiflatmapError=null,new Promise(e=>{if(this.requireInitialisation){this.requireInitialisation=!1;const t=new AbortController,o=t.signal,i=setTimeout(()=>t.abort(),5e3);fetch(this.flatmapAPI,{signal:o}).then(r=>{if(!r.ok){if(r.status===404)return this.multiflatmapError={},this.multiflatmapError.title="MultiFlatmap Error!",this.multiflatmapError.messages=[`Sorry, the component could not be loaded because the specified
29
29
  flatmap API endpoint is incorrect. Please check the endpoint URL
30
- or contact support if the problem persists.`],this.initialised=!0,e(),this.resolveList.forEach(r=>r()),Promise.reject({handled:!0});throw new Error(`HTTP ${a.status}: ${a.statusText}`)}return a.json()}).then(a=>{if(a&&a.status_code===404){console.error("Flatmap API endpoint is incorrect",a),this.multiflatmapError={},this.multiflatmapError.title="MultiFlatmap Error!",this.multiflatmapError.messages=[`Sorry, the component could not be loaded because the specified
30
+ or contact support if the problem persists.`],this.initialised=!0,e(),this.resolveList.forEach(a=>a()),Promise.reject({handled:!0});throw new Error(`HTTP ${r.status}: ${r.statusText}`)}return r.json()}).then(r=>{if(r&&r.status_code===404){console.error("Flatmap API endpoint is incorrect",r),this.multiflatmapError={},this.multiflatmapError.title="MultiFlatmap Error!",this.multiflatmapError.messages=[`Sorry, the component could not be loaded because the specified
31
31
  flatmap API endpoint is incorrect. Please check the endpoint URL
32
- or contact support if the problem persists.`],this.initialised=!0,e(),this.resolveList.forEach(s=>s());return}Object.keys(this.availableSpecies).forEach(s=>{const l=this.availableSpecies[s].uuid;if(l&&a.length&&a.map(c=>c.uuid).indexOf(l)>0)this.speciesList[s]=this.availableSpecies[s];else for(let c=0;c<a.length;c++)if(this.availableSpecies[s].taxo===a[c].taxon)if(this.availableSpecies[s].biologicalSex){if(a[c].biologicalSex&&a[c].biologicalSex===this.availableSpecies[s].biologicalSex){this.speciesList[s]=this.availableSpecies[s];break}}else{this.speciesList[s]=this.availableSpecies[s];break}});let r=this.initial;if(this.state){const s=this.state.state;(!s||!s.uuid&&!s.entry)&&this.state.species?r=this.state.species:r=void 0}r&&(r&&this.speciesList[r]!==void 0?this.activeSpecies=r:this.activeSpecies=Object.keys(this.speciesList)[0],this.setSpecies(this.activeSpecies,this.state?this.state.state:void 0,5)),this.initialised=!0,e(),this.resolveList.forEach(s=>{s()})}).catch(a=>{a&&a.handled||(console.error("Error fetching flatmap:",a),this.initialised=!0,this.multiflatmapError={},this.multiflatmapError.title="MultiFlatmap Error!",this.multiflatmapError.messages=[`Sorry, the component could not be loaded due to an unexpected error.
33
- Please try again later or contact support if the problem persists.`],e(),this.resolveList.forEach(r=>{r()}))}).finally(()=>{clearTimeout(i)})}else this.initialised?e():this.resolveList.push(e)})},loadMapManager:function(){this.mapManagerRef||(this.mapManager?this.mapManagerRef=this.mapManager:(this.mapManagerRef=n.markRaw(new Si.MapViewer(this.flatmapAPI,{container:void 0})),this.$emit("mapmanager-loaded",this.mapManagerRef)))},resourceSelected:function(e){this.$emit("resource-selected",e)},onContextRestored:function(e){this.$emit("context-restored",e)},FlatmapReady:function(e){this.$emit("ready",e)},getCurrentFlatmap:function(){return this.$refs[this.activeSpecies][0]},panZoomCallback:function(e){this.$emit("pan-zoom-callback",e)},onAnnotationClose:function(){this.$emit("annotation-close")},onAnnotationOpen:function(e){this.$emit("annotation-open",e)},updateOfflineAnnotationEnabled:function(e){this.$emit("update-offline-annotation-enabled",e)},onConnectivityInfoClose:function(){this.$emit("connectivity-info-close")},onConnectivityInfoOpen:function(e){this.$emit("connectivity-info-open",e)},onConnectivityError:function(e){this.$emit("connectivity-error",e)},onNeuronConnectionFeatureClick:function(e){this.$emit("neuron-connection-feature-click",e)},onSelectionsDataChanged:function(e){this.$emit("pathway-selection-changed",e)},showPopup:function(e,t,o){this.getCurrentFlatmap().showPopup(e,t,o)},showMarkerPopup:function(e,t,o){this.getCurrentFlatmap().showMarkerPopup(e,t,o)},setSpecies:function(e,t,o){if(this.$refs&&e in this.$refs)this.activeSpecies=e,this.$refs[this.activeSpecies][0].createFlatmap(t),this.$emit("flatmapChanged",this.activeSpecies);else if(o){const i=o-1;i>=0&&this.$nextTick(()=>{this.setSpecies(e,t,i)})}},viewLatestMap:function(e){const t=Object.keys(this.speciesList);for(let o=0;o<t.length;o++){const i=this.speciesList[t[o]];if(!i.isLegacy&&i.taxo===e.entry&&i.biologicalSex===e.biologicalSex){this.setSpecies(t[o],e,0);return}}},createLegacyEntry:function(e,t,o){if(o&&t){let i="Legacy";return e.species&&(e.species.slice(0,6)==="Legacy"?i=e.species:i=i+` ${e.species}`),this.speciesList[i]={taxo:t,isLegacy:!0,displayWarning:!0},{species:i,state:{entry:t,uuid:o,viewport:e.state.viewport,searchTerm:e.state.searchTerm}}}},updateState:function(e){return new Promise(t=>{if(e&&e.state){const o=e.state;if(o.uuid){if(o.entry)return new Promise(()=>{const i={taxon:o.entry};o.biologicalSex&&(i.biologicalSex=o.biologicalSex),this.mapManagerRef.findMap(i).then(a=>{if(a.uuid!==o.uuid)return this.createLegacyEntry(e,o.entry,o.uuid)}).then(a=>{t(a||e)}).catch(()=>{t(e)})})}else if(o.entry){const i=o.entry in Cs?Cs[o.entry]:void 0,a=this.createLegacyEntry(e,o.entry,i);t(a||e)}}t(e)})},getState:function(){let e={species:this.activeSpecies,state:void 0},t=this.getCurrentFlatmap();return e.state=t.getState(),e},setState:function(e){e&&(this.loadMapManager(),this.updateState(e).then(t=>{this.initialise().then(()=>{t.species&&t.species!==this.activeSpecies?this.setSpecies(t.species,t.state,5):t.state&&this.getCurrentFlatmap().setState(t.state)})}))},activateTooltipByIndex:function(e){return e===this.helpModeActiveItem&&this.helpMode},onHelpModeLastItem:function(e){e&&this.$emit("help-mode-last-item",!0)},onTooltipShown:function(){this.$emit("shown-tooltip")},onMapTooltipShown:function(){this.$emit("shown-map-tooltip")},changeViewingMode:function(e){this.getCurrentFlatmap().changeViewingMode(e)},setConnectionType:function(e){this.getCurrentFlatmap().setConnectionType(e)},trackEvent:function(e){const t={event:"interaction_event",location:"flatmap",...e};this.$emit("trackEvent",t)}},props:{initial:{type:String,default:""},minZoom:{type:Number,default:1},renderAtMounted:{type:Boolean,default:!1},render:{type:Boolean,default:!0},helpMode:{type:Boolean,default:!1},helpModeActiveItem:{type:Number,default:0},helpModeDialog:{type:Boolean,default:!1},helpModeLastItem:{type:Boolean,default:!1},displayMinimap:{type:Boolean,default:!1},showStarInLegend:{type:Boolean,default:!1},enableOpenMapUI:{type:Boolean,default:!1},openMapOptions:{type:Array},availableSpecies:{type:Object,default:function(){return{"Human Female":{taxo:"NCBITaxon:9606",biologicalSex:"PATO:0000383",iconClass:"mapicon-icon_human",displayWarning:!0},"Human Male":{taxo:"NCBITaxon:9606",biologicalSex:"PATO:0000384",iconClass:"mapicon-icon_human",displayWarning:!0},Rat:{taxo:"NCBITaxon:10114",iconClass:"mapicon-icon_rat",displayLatestChanges:!0},Mouse:{taxo:"NCBITaxon:10090",iconClass:"mapicon-icon_mouse",displayWarning:!0},Pig:{taxo:"NCBITaxon:9823",iconClass:"mapicon-icon_pig",displayWarning:!0},Cat:{taxo:"NCBITaxon:9685",iconClass:"mapicon-icon_cat",displayWarning:!0}}}},state:{type:Object,default:void 0},mapManager:{type:Object,default:void 0},flatmapAPI:{type:String,default:"https://mapcore-demo.org/current/flatmap/v3/"},sparcAPI:{type:String,default:"https://api.sparc.science/"},disableUI:{type:Boolean,default:!1},connectivityInfoSidebar:{type:Boolean,default:!1},annotationSidebar:{type:Boolean,default:!1},showLocalSettings:{type:Boolean,default:!0},showOpenMapButton:{type:Boolean,default:!0},showPathwayFilter:{type:Boolean,default:!0},externalLegends:{type:Array,default:function(){return[]}}},data:function(){return{activeSpecies:void 0,speciesList:{},requireInitialisation:!0,resolveList:n.markRaw([]),initialised:!1,mapManagerRef:void 0,multiflatmapError:null}},watch:{state:{handler:function(e){this.setState(e)},immediate:!0,deep:!0},activeSpecies:{handler:function(e,t){t&&this.$refs[t][0].forceContextLoss()}}}},nb={class:"multi-container",ref:"multiContainer"},ob={key:0,style:{position:"absolute","z-index":"100"}},ib={class:"select-box-icon"};function ab(e,t,o,i,a,r){const s=ai,l=Wn,c=an,d=mi,f=ci;return n.openBlock(),n.createElementBlock("div",nb,[o.disableUI?n.createCommentVNode("",!0):(n.openBlock(),n.createElementBlock("div",ob,[t[2]||(t[2]=n.createElementVNode("div",{class:"species-display-text"},"Species",-1)),n.createVNode(c,{content:"Select a species",placement:"right",trigger:"manual","popper-class":"flatmap-popper flatmap-teleport-popper right-popper",width:"max-content",visible:r.activateTooltipByIndex(0),teleported:!1,ref:"selectPopover"},{reference:n.withCtx(()=>[n.createVNode(l,{id:"flatmap-select",teleported:!1,modelValue:e.activeSpecies,"onUpdate:modelValue":t[0]||(t[0]=u=>e.activeSpecies=u),placeholder:"Select",class:"select-box","popper-class":"flatmap-dropdown",onChange:r.setSpecies},{default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.speciesList,(u,p)=>(n.openBlock(),n.createBlock(s,{key:p,label:p,value:p},{default:n.withCtx(()=>[n.createElementVNode("span",ib,[n.createElementVNode("i",{class:n.normalizeClass(u.iconClass)},null,2)]),n.createTextVNode(" "+n.toDisplayString(p),1)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","onChange"])]),_:1},8,["visible"])])),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.speciesList,(u,p)=>n.withDirectives((n.openBlock(),n.createBlock(d,{key:p,entry:u.taxo,uuid:u.uuid,biologicalSex:u.biologicalSex,displayWarning:u.displayWarning,displayLatestChanges:u.displayLatestChanges,isLegacy:u.isLegacy,ref_for:!0,ref:p,enableOpenMapUI:o.enableOpenMapUI,openMapOptions:o.openMapOptions,disableUI:o.disableUI,onContextRestored:r.onContextRestored,onViewLatestMap:r.viewLatestMap,onResourceSelected:r.resourceSelected,onReady:r.FlatmapReady,onPanZoomCallback:r.panZoomCallback,annotationSidebar:o.annotationSidebar,onAnnotationOpen:r.onAnnotationOpen,onAnnotationClose:r.onAnnotationClose,onUpdateOfflineAnnotationEnabled:r.updateOfflineAnnotationEnabled,connectivityInfoSidebar:o.connectivityInfoSidebar,onConnectivityInfoOpen:r.onConnectivityInfoOpen,onConnectivityInfoClose:r.onConnectivityInfoClose,onConnectivityError:r.onConnectivityError,onNeuronConnectionFeatureClick:r.onNeuronConnectionFeatureClick,onOpenMap:t[1]||(t[1]=g=>e.$emit("open-map",g)),onPathwaySelectionChanged:r.onSelectionsDataChanged,minZoom:o.minZoom,helpMode:e.activeSpecies==p&&o.helpMode,helpModeActiveItem:o.helpModeActiveItem,helpModeDialog:o.helpModeDialog,helpModeInitialIndex:-2,onHelpModeLastItem:r.onHelpModeLastItem,onShownTooltip:r.onTooltipShown,onShownMapTooltip:r.onMapTooltipShown,renderAtMounted:o.renderAtMounted,render:o.render&&e.activeSpecies==p,displayMinimap:o.displayMinimap,showStarInLegend:o.showStarInLegend,style:{height:"100%"},mapManager:e.mapManagerRef,flatmapAPI:o.flatmapAPI,sparcAPI:o.sparcAPI,showLocalSettings:o.showLocalSettings,showOpenMapButton:o.showOpenMapButton,showPathwayFilter:o.showPathwayFilter,onTrackEvent:r.trackEvent,externalLegends:o.externalLegends},null,8,["entry","uuid","biologicalSex","displayWarning","displayLatestChanges","isLegacy","enableOpenMapUI","openMapOptions","disableUI","onContextRestored","onViewLatestMap","onResourceSelected","onReady","onPanZoomCallback","annotationSidebar","onAnnotationOpen","onAnnotationClose","onUpdateOfflineAnnotationEnabled","connectivityInfoSidebar","onConnectivityInfoOpen","onConnectivityInfoClose","onConnectivityError","onNeuronConnectionFeatureClick","onPathwaySelectionChanged","minZoom","helpMode","helpModeActiveItem","helpModeDialog","onHelpModeLastItem","onShownTooltip","onShownMapTooltip","renderAtMounted","render","displayMinimap","showStarInLegend","mapManager","flatmapAPI","sparcAPI","showLocalSettings","showOpenMapButton","showPathwayFilter","onTrackEvent","externalLegends"])),[[n.vShow,e.activeSpecies==p]])),128)),e.multiflatmapError?(n.openBlock(),n.createBlock(f,{key:1,flatmapError:e.multiflatmapError},null,8,["flatmapError"])):n.createCommentVNode("",!0)],512)}const rb=st(tb,[["render",ab],["__scopeId","data-v-89ec89c8"]]);H.FlatmapVuer=mi,H.MultiFlatmapVuer=rb,Object.defineProperty(H,Symbol.toStringTag,{value:"Module"})});
32
+ or contact support if the problem persists.`],this.initialised=!0,e(),this.resolveList.forEach(s=>s());return}Object.keys(this.availableSpecies).forEach(s=>{const l=this.availableSpecies[s].uuid;if(l&&r.length&&r.map(c=>c.uuid).indexOf(l)>0)this.speciesList[s]=this.availableSpecies[s];else for(let c=0;c<r.length;c++)if(this.availableSpecies[s].taxo===r[c].taxon)if(this.availableSpecies[s].biologicalSex){if(r[c].biologicalSex&&r[c].biologicalSex===this.availableSpecies[s].biologicalSex){this.speciesList[s]=this.availableSpecies[s];break}}else{this.speciesList[s]=this.availableSpecies[s];break}});let a=this.initial;if(this.state){const s=this.state.state;(!s||!s.uuid&&!s.entry)&&this.state.species?a=this.state.species:a=void 0}a&&(a&&this.speciesList[a]!==void 0?this.activeSpecies=a:this.activeSpecies=Object.keys(this.speciesList)[0],this.setSpecies(this.activeSpecies,this.state?this.state.state:void 0,5)),this.initialised=!0,e(),this.resolveList.forEach(s=>{s()})}).catch(r=>{r&&r.handled||(console.error("Error fetching flatmap:",r),this.initialised=!0,this.multiflatmapError={},this.multiflatmapError.title="MultiFlatmap Error!",this.multiflatmapError.messages=[`Sorry, the component could not be loaded due to an unexpected error.
33
+ Please try again later or contact support if the problem persists.`],e(),this.resolveList.forEach(a=>{a()}))}).finally(()=>{clearTimeout(i)})}else this.initialised?e():this.resolveList.push(e)})},loadMapManager:function(){this.mapManagerRef||(this.mapManager?this.mapManagerRef=this.mapManager:(this.mapManagerRef=n.markRaw(new ki.MapViewer(this.flatmapAPI,{container:void 0})),this.$emit("mapmanager-loaded",this.mapManagerRef)))},resourceSelected:function(e){this.$emit("resource-selected",e)},onContextRestored:function(e){this.$emit("context-restored",e)},FlatmapReady:function(e){this.$emit("ready",e)},getCurrentFlatmap:function(){return this.$refs[this.activeSpecies][0]},panZoomCallback:function(e){this.$emit("pan-zoom-callback",e)},onAnnotationClose:function(){this.$emit("annotation-close")},onAnnotationOpen:function(e){this.$emit("annotation-open",e)},updateOfflineAnnotationEnabled:function(e){this.$emit("update-offline-annotation-enabled",e)},onConnectivityInfoClose:function(){this.$emit("connectivity-info-close")},onConnectivityInfoOpen:function(e){this.$emit("connectivity-info-open",e)},onConnectivityError:function(e){this.$emit("connectivity-error",e)},onNeuronConnectionFeatureClick:function(e){this.$emit("neuron-connection-feature-click",e)},onSelectionsDataChanged:function(e){this.$emit("pathway-selection-changed",e)},showPopup:function(e,t,o){this.getCurrentFlatmap().showPopup(e,t,o)},showMarkerPopup:function(e,t,o){this.getCurrentFlatmap().showMarkerPopup(e,t,o)},setSpecies:function(e,t,o){if(this.$refs&&e in this.$refs)this.activeSpecies=e,this.$refs[this.activeSpecies][0].createFlatmap(t),this.$emit("flatmapChanged",this.activeSpecies);else if(o){const i=o-1;i>=0&&this.$nextTick(()=>{this.setSpecies(e,t,i)})}},viewLatestMap:function(e){const t=Object.keys(this.speciesList);for(let o=0;o<t.length;o++){const i=this.speciesList[t[o]];if(!i.isLegacy&&i.taxo===e.entry&&i.biologicalSex===e.biologicalSex){this.setSpecies(t[o],e,0);return}}},createLegacyEntry:function(e,t,o){if(o&&t){let i="Legacy";return e.species&&(e.species.slice(0,6)==="Legacy"?i=e.species:i=i+` ${e.species}`),this.speciesList[i]={taxo:t,isLegacy:!0,displayWarning:!0},{species:i,state:{entry:t,uuid:o,viewport:e.state.viewport,searchTerm:e.state.searchTerm}}}},updateState:function(e){return new Promise(t=>{if(e&&e.state){const o=e.state;if(o.uuid){if(o.entry)return new Promise(()=>{const i={taxon:o.entry};o.biologicalSex&&(i.biologicalSex=o.biologicalSex),this.mapManagerRef.findMap(i).then(r=>{if(r.uuid!==o.uuid)return this.createLegacyEntry(e,o.entry,o.uuid)}).then(r=>{t(r||e)}).catch(()=>{t(e)})})}else if(o.entry){const i=o.entry in vs?vs[o.entry]:void 0,r=this.createLegacyEntry(e,o.entry,i);t(r||e)}}t(e)})},getState:function(){let e={species:this.activeSpecies,state:void 0},t=this.getCurrentFlatmap();return e.state=t.getState(),e},setState:function(e){e&&(this.loadMapManager(),this.updateState(e).then(t=>{this.initialise().then(()=>{t.species&&t.species!==this.activeSpecies?this.setSpecies(t.species,t.state,5):t.state&&this.getCurrentFlatmap().setState(t.state)})}))},activateTooltipByIndex:function(e){return e===this.helpModeActiveItem&&this.helpMode},onHelpModeLastItem:function(e){e&&this.$emit("help-mode-last-item",!0)},onTooltipShown:function(){this.$emit("shown-tooltip")},onMapTooltipShown:function(){this.$emit("shown-map-tooltip")},changeViewingMode:function(e){this.getCurrentFlatmap().changeViewingMode(e)},setConnectionType:function(e){this.getCurrentFlatmap().setConnectionType(e)}},props:{initial:{type:String,default:""},minZoom:{type:Number,default:1},renderAtMounted:{type:Boolean,default:!1},render:{type:Boolean,default:!0},helpMode:{type:Boolean,default:!1},helpModeActiveItem:{type:Number,default:0},helpModeDialog:{type:Boolean,default:!1},helpModeLastItem:{type:Boolean,default:!1},displayMinimap:{type:Boolean,default:!1},showStarInLegend:{type:Boolean,default:!1},enableOpenMapUI:{type:Boolean,default:!1},openMapOptions:{type:Array},availableSpecies:{type:Object,default:function(){return{"Human Female":{taxo:"NCBITaxon:9606",biologicalSex:"PATO:0000383",iconClass:"mapicon-icon_human",displayWarning:!0},"Human Male":{taxo:"NCBITaxon:9606",biologicalSex:"PATO:0000384",iconClass:"mapicon-icon_human",displayWarning:!0},Rat:{taxo:"NCBITaxon:10114",iconClass:"mapicon-icon_rat",displayLatestChanges:!0},Mouse:{taxo:"NCBITaxon:10090",iconClass:"mapicon-icon_mouse",displayWarning:!0},Pig:{taxo:"NCBITaxon:9823",iconClass:"mapicon-icon_pig",displayWarning:!0},Cat:{taxo:"NCBITaxon:9685",iconClass:"mapicon-icon_cat",displayWarning:!0}}}},state:{type:Object,default:void 0},mapManager:{type:Object,default:void 0},flatmapAPI:{type:String,default:"https://mapcore-demo.org/current/flatmap/v3/"},sparcAPI:{type:String,default:"https://api.sparc.science/"},disableUI:{type:Boolean,default:!1},connectivityInfoSidebar:{type:Boolean,default:!1},annotationSidebar:{type:Boolean,default:!1},showLocalSettings:{type:Boolean,default:!0},showOpenMapButton:{type:Boolean,default:!0},showPathwayFilter:{type:Boolean,default:!0},externalLegends:{type:Array,default:function(){return[]}}},data:function(){return{activeSpecies:void 0,speciesList:{},requireInitialisation:!0,resolveList:n.markRaw([]),initialised:!1,mapManagerRef:void 0,multiflatmapError:null}},watch:{state:{handler:function(e){this.setState(e)},immediate:!0,deep:!0},activeSpecies:{handler:function(e,t){t&&this.$refs[t][0].forceContextLoss()}}}},ob={class:"multi-container",ref:"multiContainer"},ib={key:0,style:{position:"absolute","z-index":"100"}},rb={class:"select-box-icon"};function ab(e,t,o,i,r,a){const s=ai,l=qn,c=an,d=gi,f=di;return n.openBlock(),n.createElementBlock("div",ob,[o.disableUI?n.createCommentVNode("",!0):(n.openBlock(),n.createElementBlock("div",ib,[t[2]||(t[2]=n.createElementVNode("div",{class:"species-display-text"},"Species",-1)),n.createVNode(c,{content:"Select a species",placement:"right",trigger:"manual","popper-class":"flatmap-popper flatmap-teleport-popper right-popper",width:"max-content",visible:a.activateTooltipByIndex(0),teleported:!1,ref:"selectPopover"},{reference:n.withCtx(()=>[n.createVNode(l,{id:"flatmap-select",teleported:!1,modelValue:e.activeSpecies,"onUpdate:modelValue":t[0]||(t[0]=u=>e.activeSpecies=u),placeholder:"Select",class:"select-box","popper-class":"flatmap-dropdown",onChange:a.setSpecies},{default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.speciesList,(u,p)=>(n.openBlock(),n.createBlock(s,{key:p,label:p,value:p},{default:n.withCtx(()=>[n.createElementVNode("span",rb,[n.createElementVNode("i",{class:n.normalizeClass(u.iconClass)},null,2)]),n.createTextVNode(" "+n.toDisplayString(p),1)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","onChange"])]),_:1},8,["visible"])])),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.speciesList,(u,p)=>n.withDirectives((n.openBlock(),n.createBlock(d,{key:p,entry:u.taxo,uuid:u.uuid,biologicalSex:u.biologicalSex,displayWarning:u.displayWarning,displayLatestChanges:u.displayLatestChanges,isLegacy:u.isLegacy,ref_for:!0,ref:p,enableOpenMapUI:o.enableOpenMapUI,openMapOptions:o.openMapOptions,disableUI:o.disableUI,onContextRestored:a.onContextRestored,onViewLatestMap:a.viewLatestMap,onResourceSelected:a.resourceSelected,onReady:a.FlatmapReady,onPanZoomCallback:a.panZoomCallback,annotationSidebar:o.annotationSidebar,onAnnotationOpen:a.onAnnotationOpen,onAnnotationClose:a.onAnnotationClose,onUpdateOfflineAnnotationEnabled:a.updateOfflineAnnotationEnabled,connectivityInfoSidebar:o.connectivityInfoSidebar,onConnectivityInfoOpen:a.onConnectivityInfoOpen,onConnectivityInfoClose:a.onConnectivityInfoClose,onConnectivityError:a.onConnectivityError,onNeuronConnectionFeatureClick:a.onNeuronConnectionFeatureClick,onOpenMap:t[1]||(t[1]=g=>e.$emit("open-map",g)),onPathwaySelectionChanged:a.onSelectionsDataChanged,minZoom:o.minZoom,helpMode:e.activeSpecies==p&&o.helpMode,helpModeActiveItem:o.helpModeActiveItem,helpModeDialog:o.helpModeDialog,helpModeInitialIndex:-2,onHelpModeLastItem:a.onHelpModeLastItem,onShownTooltip:a.onTooltipShown,onShownMapTooltip:a.onMapTooltipShown,renderAtMounted:o.renderAtMounted,render:o.render&&e.activeSpecies==p,displayMinimap:o.displayMinimap,showStarInLegend:o.showStarInLegend,style:{height:"100%"},mapManager:e.mapManagerRef,flatmapAPI:o.flatmapAPI,sparcAPI:o.sparcAPI,showLocalSettings:o.showLocalSettings,showOpenMapButton:o.showOpenMapButton,showPathwayFilter:o.showPathwayFilter,externalLegends:o.externalLegends},null,8,["entry","uuid","biologicalSex","displayWarning","displayLatestChanges","isLegacy","enableOpenMapUI","openMapOptions","disableUI","onContextRestored","onViewLatestMap","onResourceSelected","onReady","onPanZoomCallback","annotationSidebar","onAnnotationOpen","onAnnotationClose","onUpdateOfflineAnnotationEnabled","connectivityInfoSidebar","onConnectivityInfoOpen","onConnectivityInfoClose","onConnectivityError","onNeuronConnectionFeatureClick","onPathwaySelectionChanged","minZoom","helpMode","helpModeActiveItem","helpModeDialog","onHelpModeLastItem","onShownTooltip","onShownMapTooltip","renderAtMounted","render","displayMinimap","showStarInLegend","mapManager","flatmapAPI","sparcAPI","showLocalSettings","showOpenMapButton","showPathwayFilter","externalLegends"])),[[n.vShow,e.activeSpecies==p]])),128)),e.multiflatmapError?(n.openBlock(),n.createBlock(f,{key:1,flatmapError:e.multiflatmapError},null,8,["flatmapError"])):n.createCommentVNode("",!0)],512)}const sb=st(nb,[["render",ab],["__scopeId","data-v-1a5d097a"]]);H.FlatmapVuer=gi,H.MultiFlatmapVuer=sb,Object.defineProperty(H,Symbol.toStringTag,{value:"Module"})});