import { getCurrentScope as Fh, onScopeDispose as $c, unref as p, getCurrentInstance as We, onMounted as Ye, nextTick as Re, ref as $, readonly as wi, watch as oe, computed as w, warn as Ph, inject as ce, isRef as Tn, shallowRef as Qr, onBeforeUnmount as bt, onBeforeMount as $h, provide as qe, defineComponent as K, renderSlot as ee, openBlock as C, createElementBlock as F, mergeProps as mt, toRef as ct, onUnmounted as _b, useAttrs as Rh, useSlots as ho, createCommentVNode as G, Fragment as Ie, normalizeClass as N, createElementVNode as M, createBlock as J, withCtx as P, resolveDynamicComponent as pt, withModifiers as Be, createVNode as V, toDisplayString as se, normalizeStyle as Ue, Transition as ir, withDirectives as xe, vShow as ht, reactive as mn, onActivated as Eb, onUpdated as Nh, cloneVNode as Lh, Text as Ci, Comment as Bh, Teleport as Dh, onDeactivated as Mh, createTextVNode as Ce, toRaw as Xs, vModelCheckbox as Qs, toRefs as vo, vModelRadio as jh, h as Ct, resolveComponent as Se, renderList as ot, onBeforeUpdate as xb, withKeys as Wr, vModelText as Vh, normalizeProps as Tb, guardReactiveProps as Ob, createSlots as Ib, watchEffect as zh, resolveDirective as Ab, toHandlerKey as Fb, createApp as Hh, shallowReactive as Pb, isVNode as Uh, render as gd, pushScopeId as $b, popScopeId as Rb, markRaw as Ns } from "vue"; import { Loading as Si, CircleCheck as Nb, CircleClose as ki, SuccessFilled as qh, WarningFilled as Kh, CircleCloseFilled as Wh, InfoFilled as Gh, Close as ao, View as Jh, Hide as Lb, Check as Zh, ArrowRight as _i, ArrowDown as Ei, DArrowLeft as Bb, MoreFilled as md, DArrowRight as Db, ArrowLeft as Rc, Delete as Zl, Warning as Yh, Location as Xh, Search as Qh, WarnTriangleFilled as Mb } from "@element-plus/icons-vue"; import { CopyToClipboard as ev, ExternalResourceCard as jb, ConnectivityGraph as Vb, ConnectivityList as zb, AnnotationPopup as Hb, CreateTooltipContent as Ub } from "@abi-software/map-utilities"; const tv = (e) => !e.getAttribute("aria-owns"), nv = (e, t, n) => { const { parentNode: r } = e; if (!r) return null; const o = r.querySelectorAll(n), a = Array.prototype.indexOf.call(o, e); return o[a + t] || null; }, Ls = (e) => { e && (e.focus(), !tv(e) && e.click()); }, St = (e, t, { checkForDefaultPrevented: n = !0 } = {}) => (o) => { const a = e == null ? void 0 : e(o); if (n === !1 || !a) return t == null ? void 0 : t(o); }, yd = (e) => (t) => t.pointerType === "mouse" ? e(t) : void 0; var bd; const Qe = typeof window < "u", qb = (e) => typeof e == "string", rv = () => { }, Yl = Qe && ((bd = window == null ? void 0 : window.navigator) == null ? void 0 : bd.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent); function Oa(e) { return typeof e == "function" ? e() : p(e); } function Kb(e) { return e; } function Ua(e) { return Fh() ? ($c(e), !0) : !1; } function Wb(e, t = !0) { We() ? Ye(e) : t ? e() : Re(e); } function Xl(e, t, n = {}) { const { immediate: r = !0 } = n, o = $(!1); let a = null; function s() { a && (clearTimeout(a), a = null); } function i() { o.value = !1, s(); } function l(...c) { s(), o.value = !0, a = setTimeout(() => { o.value = !1, a = null, e(...c); }, Oa(t)); } return r && (o.value = !0, Qe && l()), Ua(i), { isPending: wi(o), start: l, stop: i }; } function Qn(e) { var t; const n = Oa(e); return (t = n == null ? void 0 : n.$el) != null ? t : n; } const qa = Qe ? window : void 0; function vn(...e) { let t, n, r, o; if (qb(e[0]) || Array.isArray(e[0]) ? ([n, r, o] = e, t = qa) : [t, n, r, o] = e, !t) return rv; Array.isArray(n) || (n = [n]), Array.isArray(r) || (r = [r]); const a = [], s = () => { a.forEach((u) => u()), a.length = 0; }, i = (u, f, g, v) => (u.addEventListener(f, g, v), () => u.removeEventListener(f, g, v)), l = oe(() => [Qn(t), Oa(o)], ([u, f]) => { s(), u && a.push(...n.flatMap((g) => r.map((v) => i(u, g, v, f)))); }, { immediate: !0, flush: "post" }), c = () => { l(), s(); }; return Ua(c), c; } let wd = !1; function Gb(e, t, n = {}) { const { window: r = qa, ignore: o = [], capture: a = !0, detectIframe: s = !1 } = n; if (!r) return; Yl && !wd && (wd = !0, Array.from(r.document.body.children).forEach((g) => g.addEventListener("click", rv))); let i = !0; const l = (g) => o.some((v) => { if (typeof v == "string") return Array.from(r.document.querySelectorAll(v)).some((d) => d === g.target || g.composedPath().includes(d)); { const d = Qn(v); return d && (g.target === d || g.composedPath().includes(d)); } }), u = [ vn(r, "click", (g) => { const v = Qn(e); if (!(!v || v === g.target || g.composedPath().includes(v))) { if (g.detail === 0 && (i = !l(g)), !i) { i = !0; return; } t(g); } }, { passive: !0, capture: a }), vn(r, "pointerdown", (g) => { const v = Qn(e); v && (i = !g.composedPath().includes(v) && !l(g)); }, { passive: !0 }), s && vn(r, "blur", (g) => { var v; const d = Qn(e); ((v = r.document.activeElement) == null ? void 0 : v.tagName) === "IFRAME" && !(d != null && d.contains(r.document.activeElement)) && t(g); }) ].filter(Boolean); return () => u.forEach((g) => g()); } function ov(e, t = !1) { const n = $(), r = () => n.value = !!e(); return r(), Wb(r, t), n; } const Cd = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Sd = "__vueuse_ssr_handlers__"; Cd[Sd] = Cd[Sd] || {}; function Jb(e, t, { window: n = qa, initialValue: r = "" } = {}) { const o = $(r), a = w(() => { var s; return Qn(t) || ((s = n == null ? void 0 : n.document) == null ? void 0 : s.documentElement); }); return oe([a, () => Oa(e)], ([s, i]) => { var l; if (s && n) { const c = (l = n.getComputedStyle(s).getPropertyValue(i)) == null ? void 0 : l.trim(); o.value = c || r; } }, { immediate: !0 }), oe(o, (s) => { var i; (i = a.value) != null && i.style && a.value.style.setProperty(Oa(e), s); }), o; } var kd = Object.getOwnPropertySymbols, Zb = Object.prototype.hasOwnProperty, Yb = Object.prototype.propertyIsEnumerable, Xb = (e, t) => { var n = {}; for (var r in e) Zb.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]); if (e != null && kd) for (var r of kd(e)) t.indexOf(r) < 0 && Yb.call(e, r) && (n[r] = e[r]); return n; }; function Vn(e, t, n = {}) { const r = n, { window: o = qa } = r, a = Xb(r, ["window"]); let s; const i = ov(() => o && "ResizeObserver" in o), l = () => { s && (s.disconnect(), s = void 0); }, c = oe(() => Qn(e), (f) => { l(), i.value && o && f && (s = new ResizeObserver(t), s.observe(f, a)); }, { immediate: !0, flush: "post" }), u = () => { l(), c(); }; return Ua(u), { isSupported: i, stop: u }; } var _d = Object.getOwnPropertySymbols, Qb = Object.prototype.hasOwnProperty, e1 = Object.prototype.propertyIsEnumerable, t1 = (e, t) => { var n = {}; for (var r in e) Qb.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]); if (e != null && _d) for (var r of _d(e)) t.indexOf(r) < 0 && e1.call(e, r) && (n[r] = e[r]); return n; }; function n1(e, t, n = {}) { const r = n, { window: o = qa } = r, a = t1(r, ["window"]); let s; const i = ov(() => o && "MutationObserver" in o), l = () => { s && (s.disconnect(), s = void 0); }, c = oe(() => Qn(e), (f) => { l(), i.value && o && f && (s = new MutationObserver(t), s.observe(f, a)); }, { immediate: !0 }), u = () => { l(), c(); }; return Ua(u), { isSupported: i, stop: u }; } var Ed; (function(e) { e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE"; })(Ed || (Ed = {})); var r1 = Object.defineProperty, xd = Object.getOwnPropertySymbols, o1 = Object.prototype.hasOwnProperty, a1 = Object.prototype.propertyIsEnumerable, Td = (e, t, n) => t in e ? r1(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, s1 = (e, t) => { for (var n in t || (t = {})) o1.call(t, n) && Td(e, n, t[n]); if (xd) for (var n of xd(t)) a1.call(t, n) && Td(e, n, t[n]); return e; }; const i1 = { easeInSine: [0.12, 0, 0.39, 0], easeOutSine: [0.61, 1, 0.88, 1], easeInOutSine: [0.37, 0, 0.63, 1], easeInQuad: [0.11, 0, 0.5, 0], easeOutQuad: [0.5, 1, 0.89, 1], easeInOutQuad: [0.45, 0, 0.55, 1], easeInCubic: [0.32, 0, 0.67, 0], easeOutCubic: [0.33, 1, 0.68, 1], easeInOutCubic: [0.65, 0, 0.35, 1], easeInQuart: [0.5, 0, 0.75, 0], easeOutQuart: [0.25, 1, 0.5, 1], easeInOutQuart: [0.76, 0, 0.24, 1], easeInQuint: [0.64, 0, 0.78, 0], easeOutQuint: [0.22, 1, 0.36, 1], easeInOutQuint: [0.83, 0, 0.17, 1], easeInExpo: [0.7, 0, 0.84, 0], easeOutExpo: [0.16, 1, 0.3, 1], easeInOutExpo: [0.87, 0, 0.13, 1], easeInCirc: [0.55, 0, 1, 0.45], easeOutCirc: [0, 0.55, 0.45, 1], easeInOutCirc: [0.85, 0, 0.15, 1], easeInBack: [0.36, 0, 0.66, -0.56], easeOutBack: [0.34, 1.56, 0.64, 1], easeInOutBack: [0.68, -0.6, 0.32, 1.6] }; s1({ linear: Kb }, i1); const l1 = () => Qe && /firefox/i.test(window.navigator.userAgent); /** * @vue/shared v3.5.13 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **/ process.env.NODE_ENV !== "production" && Object.freeze({}); process.env.NODE_ENV !== "production" && Object.freeze([]); const mr = () => { }, c1 = Object.prototype.hasOwnProperty, Od = (e, t) => c1.call(e, t), qt = Array.isArray, ut = (e) => typeof e == "function", jt = (e) => typeof e == "string", At = (e) => e !== null && typeof e == "object", u1 = (e) => (At(e) || ut(e)) && ut(e.then) && ut(e.catch), d1 = Object.prototype.toString, f1 = (e) => d1.call(e), _l = (e) => f1(e).slice(8, -1), Nc = (e) => { const t = /* @__PURE__ */ Object.create(null); return (n) => t[n] || (t[n] = e(n)); }, p1 = /-(\w)/g, h1 = Nc( (e) => e.replace(p1, (t, n) => n ? n.toUpperCase() : "") ), v1 = /\B([A-Z])/g, g1 = Nc( (e) => e.replace(v1, "-$1").toLowerCase() ), m1 = Nc((e) => e.charAt(0).toUpperCase() + e.slice(1)); var av = typeof global == "object" && global && global.Object === Object && global, y1 = typeof self == "object" && self && self.Object === Object && self, qn = av || y1 || Function("return this")(), On = qn.Symbol, sv = Object.prototype, b1 = sv.hasOwnProperty, w1 = sv.toString, ua = On ? On.toStringTag : void 0; function C1(e) { var t = b1.call(e, ua), n = e[ua]; try { e[ua] = void 0; var r = !0; } catch { } var o = w1.call(e); return r && (t ? e[ua] = n : delete e[ua]), o; } var S1 = Object.prototype, k1 = S1.toString; function _1(e) { return k1.call(e); } var E1 = "[object Null]", x1 = "[object Undefined]", Id = On ? On.toStringTag : void 0; function Wo(e) { return e == null ? e === void 0 ? x1 : E1 : Id && Id in Object(e) ? C1(e) : _1(e); } function Nr(e) { return e != null && typeof e == "object"; } var T1 = "[object Symbol]"; function xi(e) { return typeof e == "symbol" || Nr(e) && Wo(e) == T1; } function O1(e, t) { for (var n = -1, r = e == null ? 0 : e.length, o = Array(r); ++n < r; ) o[n] = t(e[n], n, e); return o; } var In = Array.isArray, I1 = 1 / 0, Ad = On ? On.prototype : void 0, Fd = Ad ? Ad.toString : void 0; function iv(e) { if (typeof e == "string") return e; if (In(e)) return O1(e, iv) + ""; if (xi(e)) return Fd ? Fd.call(e) : ""; var t = e + ""; return t == "0" && 1 / e == -I1 ? "-0" : t; } var A1 = /\s/; function F1(e) { for (var t = e.length; t-- && A1.test(e.charAt(t)); ) ; return t; } var P1 = /^\s+/; function $1(e) { return e && e.slice(0, F1(e) + 1).replace(P1, ""); } function Un(e) { var t = typeof e; return e != null && (t == "object" || t == "function"); } var Pd = NaN, R1 = /^[-+]0x[0-9a-f]+$/i, N1 = /^0b[01]+$/i, L1 = /^0o[0-7]+$/i, B1 = parseInt; function $d(e) { if (typeof e == "number") return e; if (xi(e)) return Pd; if (Un(e)) { var t = typeof e.valueOf == "function" ? e.valueOf() : e; e = Un(t) ? t + "" : t; } if (typeof e != "string") return e === 0 ? e : +e; e = $1(e); var n = N1.test(e); return n || L1.test(e) ? B1(e.slice(2), n ? 2 : 8) : R1.test(e) ? Pd : +e; } function lv(e) { return e; } var D1 = "[object AsyncFunction]", M1 = "[object Function]", j1 = "[object GeneratorFunction]", V1 = "[object Proxy]"; function cv(e) { if (!Un(e)) return !1; var t = Wo(e); return t == M1 || t == j1 || t == D1 || t == V1; } var El = qn["__core-js_shared__"], Rd = function() { var e = /[^.]+$/.exec(El && El.keys && El.keys.IE_PROTO || ""); return e ? "Symbol(src)_1." + e : ""; }(); function z1(e) { return !!Rd && Rd in e; } var H1 = Function.prototype, U1 = H1.toString; function go(e) { if (e != null) { try { return U1.call(e); } catch { } try { return e + ""; } catch { } } return ""; } var q1 = /[\\^$.*+?()[\]{}|]/g, K1 = /^\[object .+?Constructor\]$/, W1 = Function.prototype, G1 = Object.prototype, J1 = W1.toString, Z1 = G1.hasOwnProperty, Y1 = RegExp( "^" + J1.call(Z1).replace(q1, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$" ); function X1(e) { if (!Un(e) || z1(e)) return !1; var t = cv(e) ? Y1 : K1; return t.test(go(e)); } function Q1(e, t) { return e == null ? void 0 : e[t]; } function mo(e, t) { var n = Q1(e, t); return X1(n) ? n : void 0; } var Ql = mo(qn, "WeakMap"), Nd = Object.create, ew = /* @__PURE__ */ function() { function e() { } return function(t) { if (!Un(t)) return {}; if (Nd) return Nd(t); e.prototype = t; var n = new e(); return e.prototype = void 0, n; }; }(); function tw(e, t, n) { switch (n.length) { case 0: return e.call(t); case 1: return e.call(t, n[0]); case 2: return e.call(t, n[0], n[1]); case 3: return e.call(t, n[0], n[1], n[2]); } return e.apply(t, n); } function nw(e, t) { var n = -1, r = e.length; for (t || (t = Array(r)); ++n < r; ) t[n] = e[n]; return t; } var rw = 800, ow = 16, aw = Date.now; function sw(e) { var t = 0, n = 0; return function() { var r = aw(), o = ow - (r - n); if (n = r, o > 0) { if (++t >= rw) return arguments[0]; } else t = 0; return e.apply(void 0, arguments); }; } function iw(e) { return function() { return e; }; } var ei = function() { try { var e = mo(Object, "defineProperty"); return e({}, "", {}), e; } catch { } }(), lw = ei ? function(e, t) { return ei(e, "toString", { configurable: !0, enumerable: !1, value: iw(t), writable: !0 }); } : lv, cw = sw(lw); function uw(e, t) { for (var n = -1, r = e == null ? 0 : e.length; ++n < r && t(e[n], n, e) !== !1; ) ; return e; } function dw(e, t, n, r) { e.length; for (var o = n + 1; o--; ) if (t(e[o], o, e)) return o; return -1; } var fw = 9007199254740991, pw = /^(?:0|[1-9]\d*)$/; function Lc(e, t) { var n = typeof e; return t = t ?? fw, !!t && (n == "number" || n != "symbol" && pw.test(e)) && e > -1 && e % 1 == 0 && e < t; } function uv(e, t, n) { t == "__proto__" && ei ? ei(e, t, { configurable: !0, enumerable: !0, value: n, writable: !0 }) : e[t] = n; } function Bc(e, t) { return e === t || e !== e && t !== t; } var hw = Object.prototype, vw = hw.hasOwnProperty; function Dc(e, t, n) { var r = e[t]; (!(vw.call(e, t) && Bc(r, n)) || n === void 0 && !(t in e)) && uv(e, t, n); } function Ti(e, t, n, r) { var o = !n; n || (n = {}); for (var a = -1, s = t.length; ++a < s; ) { var i = t[a], l = void 0; l === void 0 && (l = e[i]), o ? uv(n, i, l) : Dc(n, i, l); } return n; } var Ld = Math.max; function gw(e, t, n) { return t = Ld(t === void 0 ? e.length - 1 : t, 0), function() { for (var r = arguments, o = -1, a = Ld(r.length - t, 0), s = Array(a); ++o < a; ) s[o] = r[t + o]; o = -1; for (var i = Array(t + 1); ++o < t; ) i[o] = r[o]; return i[t] = n(s), tw(e, this, i); }; } var mw = 9007199254740991; function Mc(e) { return typeof e == "number" && e > -1 && e % 1 == 0 && e <= mw; } function dv(e) { return e != null && Mc(e.length) && !cv(e); } var yw = Object.prototype; function jc(e) { var t = e && e.constructor, n = typeof t == "function" && t.prototype || yw; return e === n; } function bw(e, t) { for (var n = -1, r = Array(e); ++n < e; ) r[n] = t(n); return r; } var ww = "[object Arguments]"; function Bd(e) { return Nr(e) && Wo(e) == ww; } var fv = Object.prototype, Cw = fv.hasOwnProperty, Sw = fv.propertyIsEnumerable, Vc = Bd(/* @__PURE__ */ function() { return arguments; }()) ? Bd : function(e) { return Nr(e) && Cw.call(e, "callee") && !Sw.call(e, "callee"); }; function kw() { return !1; } var pv = typeof exports == "object" && exports && !exports.nodeType && exports, Dd = pv && typeof module == "object" && module && !module.nodeType && module, _w = Dd && Dd.exports === pv, Md = _w ? qn.Buffer : void 0, Ew = Md ? Md.isBuffer : void 0, ti = Ew || kw, xw = "[object Arguments]", Tw = "[object Array]", Ow = "[object Boolean]", Iw = "[object Date]", Aw = "[object Error]", Fw = "[object Function]", Pw = "[object Map]", $w = "[object Number]", Rw = "[object Object]", Nw = "[object RegExp]", Lw = "[object Set]", Bw = "[object String]", Dw = "[object WeakMap]", Mw = "[object ArrayBuffer]", jw = "[object DataView]", Vw = "[object Float32Array]", zw = "[object Float64Array]", Hw = "[object Int8Array]", Uw = "[object Int16Array]", qw = "[object Int32Array]", Kw = "[object Uint8Array]", Ww = "[object Uint8ClampedArray]", Gw = "[object Uint16Array]", Jw = "[object Uint32Array]", rt = {}; rt[Vw] = rt[zw] = rt[Hw] = rt[Uw] = rt[qw] = rt[Kw] = rt[Ww] = rt[Gw] = rt[Jw] = !0; rt[xw] = rt[Tw] = rt[Mw] = rt[Ow] = rt[jw] = rt[Iw] = rt[Aw] = rt[Fw] = rt[Pw] = rt[$w] = rt[Rw] = rt[Nw] = rt[Lw] = rt[Bw] = rt[Dw] = !1; function Zw(e) { return Nr(e) && Mc(e.length) && !!rt[Wo(e)]; } function zc(e) { return function(t) { return e(t); }; } var hv = typeof exports == "object" && exports && !exports.nodeType && exports, wa = hv && typeof module == "object" && module && !module.nodeType && module, Yw = wa && wa.exports === hv, xl = Yw && av.process, $o = function() { try { var e = wa && wa.require && wa.require("util").types; return e || xl && xl.binding && xl.binding("util"); } catch { } }(), jd = $o && $o.isTypedArray, vv = jd ? zc(jd) : Zw, Xw = Object.prototype, Qw = Xw.hasOwnProperty; function gv(e, t) { var n = In(e), r = !n && Vc(e), o = !n && !r && ti(e), a = !n && !r && !o && vv(e), s = n || r || o || a, i = s ? bw(e.length, String) : [], l = i.length; for (var c in e) (t || Qw.call(e, c)) && !(s && // Safari 9 has enumerable `arguments.length` in strict mode. (c == "length" || // Node.js 0.10 has enumerable non-index properties on buffers. o && (c == "offset" || c == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays. a && (c == "buffer" || c == "byteLength" || c == "byteOffset") || // Skip index properties. Lc(c, l))) && i.push(c); return i; } function mv(e, t) { return function(n) { return e(t(n)); }; } var e2 = mv(Object.keys, Object), t2 = Object.prototype, n2 = t2.hasOwnProperty; function r2(e) { if (!jc(e)) return e2(e); var t = []; for (var n in Object(e)) n2.call(e, n) && n != "constructor" && t.push(n); return t; } function Oi(e) { return dv(e) ? gv(e) : r2(e); } function o2(e) { var t = []; if (e != null) for (var n in Object(e)) t.push(n); return t; } var a2 = Object.prototype, s2 = a2.hasOwnProperty; function i2(e) { if (!Un(e)) return o2(e); var t = jc(e), n = []; for (var r in e) r == "constructor" && (t || !s2.call(e, r)) || n.push(r); return n; } function Hc(e) { return dv(e) ? gv(e, !0) : i2(e); } var l2 = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, c2 = /^\w*$/; function Uc(e, t) { if (In(e)) return !1; var n = typeof e; return n == "number" || n == "symbol" || n == "boolean" || e == null || xi(e) ? !0 : c2.test(e) || !l2.test(e) || t != null && e in Object(t); } var Ia = mo(Object, "create"); function u2() { this.__data__ = Ia ? Ia(null) : {}, this.size = 0; } function d2(e) { var t = this.has(e) && delete this.__data__[e]; return this.size -= t ? 1 : 0, t; } var f2 = "__lodash_hash_undefined__", p2 = Object.prototype, h2 = p2.hasOwnProperty; function v2(e) { var t = this.__data__; if (Ia) { var n = t[e]; return n === f2 ? void 0 : n; } return h2.call(t, e) ? t[e] : void 0; } var g2 = Object.prototype, m2 = g2.hasOwnProperty; function y2(e) { var t = this.__data__; return Ia ? t[e] !== void 0 : m2.call(t, e); } var b2 = "__lodash_hash_undefined__"; function w2(e, t) { var n = this.__data__; return this.size += this.has(e) ? 0 : 1, n[e] = Ia && t === void 0 ? b2 : t, this; } function so(e) { var t = -1, n = e == null ? 0 : e.length; for (this.clear(); ++t < n; ) { var r = e[t]; this.set(r[0], r[1]); } } so.prototype.clear = u2; so.prototype.delete = d2; so.prototype.get = v2; so.prototype.has = y2; so.prototype.set = w2; function C2() { this.__data__ = [], this.size = 0; } function Ii(e, t) { for (var n = e.length; n--; ) if (Bc(e[n][0], t)) return n; return -1; } var S2 = Array.prototype, k2 = S2.splice; function _2(e) { var t = this.__data__, n = Ii(t, e); if (n < 0) return !1; var r = t.length - 1; return n == r ? t.pop() : k2.call(t, n, 1), --this.size, !0; } function E2(e) { var t = this.__data__, n = Ii(t, e); return n < 0 ? void 0 : t[n][1]; } function x2(e) { return Ii(this.__data__, e) > -1; } function T2(e, t) { var n = this.__data__, r = Ii(n, e); return r < 0 ? (++this.size, n.push([e, t])) : n[r][1] = t, this; } function Sr(e) { var t = -1, n = e == null ? 0 : e.length; for (this.clear(); ++t < n; ) { var r = e[t]; this.set(r[0], r[1]); } } Sr.prototype.clear = C2; Sr.prototype.delete = _2; Sr.prototype.get = E2; Sr.prototype.has = x2; Sr.prototype.set = T2; var Aa = mo(qn, "Map"); function O2() { this.size = 0, this.__data__ = { hash: new so(), map: new (Aa || Sr)(), string: new so() }; } function I2(e) { var t = typeof e; return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e !== "__proto__" : e === null; } function Ai(e, t) { var n = e.__data__; return I2(t) ? n[typeof t == "string" ? "string" : "hash"] : n.map; } function A2(e) { var t = Ai(this, e).delete(e); return this.size -= t ? 1 : 0, t; } function F2(e) { return Ai(this, e).get(e); } function P2(e) { return Ai(this, e).has(e); } function $2(e, t) { var n = Ai(this, e), r = n.size; return n.set(e, t), this.size += n.size == r ? 0 : 1, this; } function kr(e) { var t = -1, n = e == null ? 0 : e.length; for (this.clear(); ++t < n; ) { var r = e[t]; this.set(r[0], r[1]); } } kr.prototype.clear = O2; kr.prototype.delete = A2; kr.prototype.get = F2; kr.prototype.has = P2; kr.prototype.set = $2; var R2 = "Expected a function"; function qc(e, t) { if (typeof e != "function" || t != null && typeof t != "function") throw new TypeError(R2); var n = function() { var r = arguments, o = t ? t.apply(this, r) : r[0], a = n.cache; if (a.has(o)) return a.get(o); var s = e.apply(this, r); return n.cache = a.set(o, s) || a, s; }; return n.cache = new (qc.Cache || kr)(), n; } qc.Cache = kr; var N2 = 500; function L2(e) { var t = qc(e, function(r) { return n.size === N2 && n.clear(), r; }), n = t.cache; return t; } var B2 = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, D2 = /\\(\\)?/g, M2 = L2(function(e) { var t = []; return e.charCodeAt(0) === 46 && t.push(""), e.replace(B2, function(n, r, o, a) { t.push(o ? a.replace(D2, "$1") : r || n); }), t; }); function j2(e) { return e == null ? "" : iv(e); } function Fi(e, t) { return In(e) ? e : Uc(e, t) ? [e] : M2(j2(e)); } var V2 = 1 / 0; function Ka(e) { if (typeof e == "string" || xi(e)) return e; var t = e + ""; return t == "0" && 1 / e == -V2 ? "-0" : t; } function Kc(e, t) { t = Fi(t, e); for (var n = 0, r = t.length; e != null && n < r; ) e = e[Ka(t[n++])]; return n && n == r ? e : void 0; } function pr(e, t, n) { var r = e == null ? void 0 : Kc(e, t); return r === void 0 ? n : r; } function Wc(e, t) { for (var n = -1, r = t.length, o = e.length; ++n < r; ) e[o + n] = t[n]; return e; } var Vd = On ? On.isConcatSpreadable : void 0; function z2(e) { return In(e) || Vc(e) || !!(Vd && e && e[Vd]); } function Gc(e, t, n, r, o) { var a = -1, s = e.length; for (n || (n = z2), o || (o = []); ++a < s; ) { var i = e[a]; t > 0 && n(i) ? t > 1 ? Gc(i, t - 1, n, r, o) : Wc(o, i) : o[o.length] = i; } return o; } function H2(e) { var t = e == null ? 0 : e.length; return t ? Gc(e, 1) : []; } function U2(e) { return cw(gw(e, void 0, H2), e + ""); } var yv = mv(Object.getPrototypeOf, Object); function hr() { if (!arguments.length) return []; var e = arguments[0]; return In(e) ? e : [e]; } function q2() { this.__data__ = new Sr(), this.size = 0; } function K2(e) { var t = this.__data__, n = t.delete(e); return this.size = t.size, n; } function W2(e) { return this.__data__.get(e); } function G2(e) { return this.__data__.has(e); } var J2 = 200; function Z2(e, t) { var n = this.__data__; if (n instanceof Sr) { var r = n.__data__; if (!Aa || r.length < J2 - 1) return r.push([e, t]), this.size = ++n.size, this; n = this.__data__ = new kr(r); } return n.set(e, t), this.size = n.size, this; } function er(e) { var t = this.__data__ = new Sr(e); this.size = t.size; } er.prototype.clear = q2; er.prototype.delete = K2; er.prototype.get = W2; er.prototype.has = G2; er.prototype.set = Z2; function Y2(e, t) { return e && Ti(t, Oi(t), e); } function X2(e, t) { return e && Ti(t, Hc(t), e); } var bv = typeof exports == "object" && exports && !exports.nodeType && exports, zd = bv && typeof module == "object" && module && !module.nodeType && module, Q2 = zd && zd.exports === bv, Hd = Q2 ? qn.Buffer : void 0, Ud = Hd ? Hd.allocUnsafe : void 0; function eC(e, t) { if (t) return e.slice(); var n = e.length, r = Ud ? Ud(n) : new e.constructor(n); return e.copy(r), r; } function tC(e, t) { for (var n = -1, r = e == null ? 0 : e.length, o = 0, a = []; ++n < r; ) { var s = e[n]; t(s, n, e) && (a[o++] = s); } return a; } function wv() { return []; } var nC = Object.prototype, rC = nC.propertyIsEnumerable, qd = Object.getOwnPropertySymbols, Jc = qd ? function(e) { return e == null ? [] : (e = Object(e), tC(qd(e), function(t) { return rC.call(e, t); })); } : wv; function oC(e, t) { return Ti(e, Jc(e), t); } var aC = Object.getOwnPropertySymbols, Cv = aC ? function(e) { for (var t = []; e; ) Wc(t, Jc(e)), e = yv(e); return t; } : wv; function sC(e, t) { return Ti(e, Cv(e), t); } function Sv(e, t, n) { var r = t(e); return In(e) ? r : Wc(r, n(e)); } function ec(e) { return Sv(e, Oi, Jc); } function iC(e) { return Sv(e, Hc, Cv); } var tc = mo(qn, "DataView"), nc = mo(qn, "Promise"), rc = mo(qn, "Set"), Kd = "[object Map]", lC = "[object Object]", Wd = "[object Promise]", Gd = "[object Set]", Jd = "[object WeakMap]", Zd = "[object DataView]", cC = go(tc), uC = go(Aa), dC = go(nc), fC = go(rc), pC = go(Ql), zn = Wo; (tc && zn(new tc(new ArrayBuffer(1))) != Zd || Aa && zn(new Aa()) != Kd || nc && zn(nc.resolve()) != Wd || rc && zn(new rc()) != Gd || Ql && zn(new Ql()) != Jd) && (zn = function(e) { var t = Wo(e), n = t == lC ? e.constructor : void 0, r = n ? go(n) : ""; if (r) switch (r) { case cC: return Zd; case uC: return Kd; case dC: return Wd; case fC: return Gd; case pC: return Jd; } return t; }); var hC = Object.prototype, vC = hC.hasOwnProperty; function gC(e) { var t = e.length, n = new e.constructor(t); return t && typeof e[0] == "string" && vC.call(e, "index") && (n.index = e.index, n.input = e.input), n; } var ni = qn.Uint8Array; function Zc(e) { var t = new e.constructor(e.byteLength); return new ni(t).set(new ni(e)), t; } function mC(e, t) { var n = t ? Zc(e.buffer) : e.buffer; return new e.constructor(n, e.byteOffset, e.byteLength); } var yC = /\w*$/; function bC(e) { var t = new e.constructor(e.source, yC.exec(e)); return t.lastIndex = e.lastIndex, t; } var Yd = On ? On.prototype : void 0, Xd = Yd ? Yd.valueOf : void 0; function wC(e) { return Xd ? Object(Xd.call(e)) : {}; } function CC(e, t) { var n = t ? Zc(e.buffer) : e.buffer; return new e.constructor(n, e.byteOffset, e.length); } var SC = "[object Boolean]", kC = "[object Date]", _C = "[object Map]", EC = "[object Number]", xC = "[object RegExp]", TC = "[object Set]", OC = "[object String]", IC = "[object Symbol]", AC = "[object ArrayBuffer]", FC = "[object DataView]", PC = "[object Float32Array]", $C = "[object Float64Array]", RC = "[object Int8Array]", NC = "[object Int16Array]", LC = "[object Int32Array]", BC = "[object Uint8Array]", DC = "[object Uint8ClampedArray]", MC = "[object Uint16Array]", jC = "[object Uint32Array]"; function VC(e, t, n) { var r = e.constructor; switch (t) { case AC: return Zc(e); case SC: case kC: return new r(+e); case FC: return mC(e, n); case PC: case $C: case RC: case NC: case LC: case BC: case DC: case MC: case jC: return CC(e, n); case _C: return new r(); case EC: case OC: return new r(e); case xC: return bC(e); case TC: return new r(); case IC: return wC(e); } } function zC(e) { return typeof e.constructor == "function" && !jc(e) ? ew(yv(e)) : {}; } var HC = "[object Map]"; function UC(e) { return Nr(e) && zn(e) == HC; } var Qd = $o && $o.isMap, qC = Qd ? zc(Qd) : UC, KC = "[object Set]"; function WC(e) { return Nr(e) && zn(e) == KC; } var ef = $o && $o.isSet, GC = ef ? zc(ef) : WC, JC = 1, ZC = 2, YC = 4, kv = "[object Arguments]", XC = "[object Array]", QC = "[object Boolean]", eS = "[object Date]", tS = "[object Error]", _v = "[object Function]", nS = "[object GeneratorFunction]", rS = "[object Map]", oS = "[object Number]", Ev = "[object Object]", aS = "[object RegExp]", sS = "[object Set]", iS = "[object String]", lS = "[object Symbol]", cS = "[object WeakMap]", uS = "[object ArrayBuffer]", dS = "[object DataView]", fS = "[object Float32Array]", pS = "[object Float64Array]", hS = "[object Int8Array]", vS = "[object Int16Array]", gS = "[object Int32Array]", mS = "[object Uint8Array]", yS = "[object Uint8ClampedArray]", bS = "[object Uint16Array]", wS = "[object Uint32Array]", tt = {}; tt[kv] = tt[XC] = tt[uS] = tt[dS] = tt[QC] = tt[eS] = tt[fS] = tt[pS] = tt[hS] = tt[vS] = tt[gS] = tt[rS] = tt[oS] = tt[Ev] = tt[aS] = tt[sS] = tt[iS] = tt[lS] = tt[mS] = tt[yS] = tt[bS] = tt[wS] = !0; tt[tS] = tt[_v] = tt[cS] = !1; function Bs(e, t, n, r, o, a) { var s, i = t & JC, l = t & ZC, c = t & YC; if (s !== void 0) return s; if (!Un(e)) return e; var u = In(e); if (u) { if (s = gC(e), !i) return nw(e, s); } else { var f = zn(e), g = f == _v || f == nS; if (ti(e)) return eC(e, i); if (f == Ev || f == kv || g && !o) { if (s = l || g ? {} : zC(e), !i) return l ? sC(e, X2(s, e)) : oC(e, Y2(s, e)); } else { if (!tt[f]) return o ? e : {}; s = VC(e, f, i); } } a || (a = new er()); var v = a.get(e); if (v) return v; a.set(e, s), GC(e) ? e.forEach(function(m) { s.add(Bs(m, t, n, m, e, a)); }) : qC(e) && e.forEach(function(m, y) { s.set(y, Bs(m, t, n, y, e, a)); }); var d = c ? l ? iC : ec : l ? Hc : Oi, h = u ? void 0 : d(e); return uw(h || e, function(m, y) { h && (y = m, m = e[y]), Dc(s, y, Bs(m, t, n, y, e, a)); }), s; } var CS = 1, SS = 4; function xv(e) { return Bs(e, CS | SS); } var kS = "__lodash_hash_undefined__"; function _S(e) { return this.__data__.set(e, kS), this; } function ES(e) { return this.__data__.has(e); } function ri(e) { var t = -1, n = e == null ? 0 : e.length; for (this.__data__ = new kr(); ++t < n; ) this.add(e[t]); } ri.prototype.add = ri.prototype.push = _S; ri.prototype.has = ES; function xS(e, t) { for (var n = -1, r = e == null ? 0 : e.length; ++n < r; ) if (t(e[n], n, e)) return !0; return !1; } function TS(e, t) { return e.has(t); } var OS = 1, IS = 2; function Tv(e, t, n, r, o, a) { var s = n & OS, i = e.length, l = t.length; if (i != l && !(s && l > i)) return !1; var c = a.get(e), u = a.get(t); if (c && u) return c == t && u == e; var f = -1, g = !0, v = n & IS ? new ri() : void 0; for (a.set(e, t), a.set(t, e); ++f < i; ) { var d = e[f], h = t[f]; if (r) var m = s ? r(h, d, f, t, e, a) : r(d, h, f, e, t, a); if (m !== void 0) { if (m) continue; g = !1; break; } if (v) { if (!xS(t, function(y, x) { if (!TS(v, x) && (d === y || o(d, y, n, r, a))) return v.push(x); })) { g = !1; break; } } else if (!(d === h || o(d, h, n, r, a))) { g = !1; break; } } return a.delete(e), a.delete(t), g; } function AS(e) { var t = -1, n = Array(e.size); return e.forEach(function(r, o) { n[++t] = [o, r]; }), n; } function FS(e) { var t = -1, n = Array(e.size); return e.forEach(function(r) { n[++t] = r; }), n; } var PS = 1, $S = 2, RS = "[object Boolean]", NS = "[object Date]", LS = "[object Error]", BS = "[object Map]", DS = "[object Number]", MS = "[object RegExp]", jS = "[object Set]", VS = "[object String]", zS = "[object Symbol]", HS = "[object ArrayBuffer]", US = "[object DataView]", tf = On ? On.prototype : void 0, Tl = tf ? tf.valueOf : void 0; function qS(e, t, n, r, o, a, s) { switch (n) { case US: if (e.byteLength != t.byteLength || e.byteOffset != t.byteOffset) return !1; e = e.buffer, t = t.buffer; case HS: return !(e.byteLength != t.byteLength || !a(new ni(e), new ni(t))); case RS: case NS: case DS: return Bc(+e, +t); case LS: return e.name == t.name && e.message == t.message; case MS: case VS: return e == t + ""; case BS: var i = AS; case jS: var l = r & PS; if (i || (i = FS), e.size != t.size && !l) return !1; var c = s.get(e); if (c) return c == t; r |= $S, s.set(e, t); var u = Tv(i(e), i(t), r, o, a, s); return s.delete(e), u; case zS: if (Tl) return Tl.call(e) == Tl.call(t); } return !1; } var KS = 1, WS = Object.prototype, GS = WS.hasOwnProperty; function JS(e, t, n, r, o, a) { var s = n & KS, i = ec(e), l = i.length, c = ec(t), u = c.length; if (l != u && !s) return !1; for (var f = l; f--; ) { var g = i[f]; if (!(s ? g in t : GS.call(t, g))) return !1; } var v = a.get(e), d = a.get(t); if (v && d) return v == t && d == e; var h = !0; a.set(e, t), a.set(t, e); for (var m = s; ++f < l; ) { g = i[f]; var y = e[g], x = t[g]; if (r) var A = s ? r(x, y, g, t, e, a) : r(y, x, g, e, t, a); if (!(A === void 0 ? y === x || o(y, x, n, r, a) : A)) { h = !1; break; } m || (m = g == "constructor"); } if (h && !m) { var k = e.constructor, E = t.constructor; k != E && "constructor" in e && "constructor" in t && !(typeof k == "function" && k instanceof k && typeof E == "function" && E instanceof E) && (h = !1); } return a.delete(e), a.delete(t), h; } var ZS = 1, nf = "[object Arguments]", rf = "[object Array]", ms = "[object Object]", YS = Object.prototype, of = YS.hasOwnProperty; function XS(e, t, n, r, o, a) { var s = In(e), i = In(t), l = s ? rf : zn(e), c = i ? rf : zn(t); l = l == nf ? ms : l, c = c == nf ? ms : c; var u = l == ms, f = c == ms, g = l == c; if (g && ti(e)) { if (!ti(t)) return !1; s = !0, u = !1; } if (g && !u) return a || (a = new er()), s || vv(e) ? Tv(e, t, n, r, o, a) : qS(e, t, l, n, r, o, a); if (!(n & ZS)) { var v = u && of.call(e, "__wrapped__"), d = f && of.call(t, "__wrapped__"); if (v || d) { var h = v ? e.value() : e, m = d ? t.value() : t; return a || (a = new er()), o(h, m, n, r, a); } } return g ? (a || (a = new er()), JS(e, t, n, r, o, a)) : !1; } function Pi(e, t, n, r, o) { return e === t ? !0 : e == null || t == null || !Nr(e) && !Nr(t) ? e !== e && t !== t : XS(e, t, n, r, Pi, o); } var QS = 1, ek = 2; function tk(e, t, n, r) { var o = n.length, a = o; if (e == null) return !a; for (e = Object(e); o--; ) { var s = n[o]; if (s[2] ? s[1] !== e[s[0]] : !(s[0] in e)) return !1; } for (; ++o < a; ) { s = n[o]; var i = s[0], l = e[i], c = s[1]; if (s[2]) { if (l === void 0 && !(i in e)) return !1; } else { var u = new er(), f; if (!(f === void 0 ? Pi(c, l, QS | ek, r, u) : f)) return !1; } } return !0; } function Ov(e) { return e === e && !Un(e); } function nk(e) { for (var t = Oi(e), n = t.length; n--; ) { var r = t[n], o = e[r]; t[n] = [r, o, Ov(o)]; } return t; } function Iv(e, t) { return function(n) { return n == null ? !1 : n[e] === t && (t !== void 0 || e in Object(n)); }; } function rk(e) { var t = nk(e); return t.length == 1 && t[0][2] ? Iv(t[0][0], t[0][1]) : function(n) { return n === e || tk(n, e, t); }; } function ok(e, t) { return e != null && t in Object(e); } function ak(e, t, n) { t = Fi(t, e); for (var r = -1, o = t.length, a = !1; ++r < o; ) { var s = Ka(t[r]); if (!(a = e != null && n(e, s))) break; e = e[s]; } return a || ++r != o ? a : (o = e == null ? 0 : e.length, !!o && Mc(o) && Lc(s, o) && (In(e) || Vc(e))); } function Av(e, t) { return e != null && ak(e, t, ok); } var sk = 1, ik = 2; function lk(e, t) { return Uc(e) && Ov(t) ? Iv(Ka(e), t) : function(n) { var r = pr(n, e); return r === void 0 && r === t ? Av(n, e) : Pi(t, r, sk | ik); }; } function ck(e) { return function(t) { return t == null ? void 0 : t[e]; }; } function uk(e) { return function(t) { return Kc(t, e); }; } function dk(e) { return Uc(e) ? ck(Ka(e)) : uk(e); } function fk(e) { return typeof e == "function" ? e : e == null ? lv : typeof e == "object" ? In(e) ? lk(e[0], e[1]) : rk(e) : dk(e); } var Ol = function() { return qn.Date.now(); }, pk = "Expected a function", hk = Math.max, vk = Math.min; function Fv(e, t, n) { var r, o, a, s, i, l, c = 0, u = !1, f = !1, g = !0; if (typeof e != "function") throw new TypeError(pk); t = $d(t) || 0, Un(n) && (u = !!n.leading, f = "maxWait" in n, a = f ? hk($d(n.maxWait) || 0, t) : a, g = "trailing" in n ? !!n.trailing : g); function v(T) { var I = r, R = o; return r = o = void 0, c = T, s = e.apply(R, I), s; } function d(T) { return c = T, i = setTimeout(y, t), u ? v(T) : s; } function h(T) { var I = T - l, R = T - c, D = t - I; return f ? vk(D, a - R) : D; } function m(T) { var I = T - l, R = T - c; return l === void 0 || I >= t || I < 0 || f && R >= a; } function y() { var T = Ol(); if (m(T)) return x(T); i = setTimeout(y, h(T)); } function x(T) { return i = void 0, g && r ? v(T) : (r = o = void 0, s); } function A() { i !== void 0 && clearTimeout(i), c = 0, r = l = o = i = void 0; } function k() { return i === void 0 ? s : x(Ol()); } function E() { var T = Ol(), I = m(T); if (r = arguments, o = this, l = T, I) { if (i === void 0) return d(l); if (f) return clearTimeout(i), i = setTimeout(y, t), v(l); } return i === void 0 && (i = setTimeout(y, t)), s; } return E.cancel = A, E.flush = k, E; } function gk(e, t, n) { var r = e == null ? 0 : e.length; if (!r) return -1; var o = r - 1; return dw(e, fk(t), o); } var mk = 1 / 0; function yk(e) { var t = e == null ? 0 : e.length; return t ? Gc(e, mk) : []; } function oi(e) { for (var t = -1, n = e == null ? 0 : e.length, r = {}; ++t < n; ) { var o = e[t]; r[o[0]] = o[1]; } return r; } function tr(e, t) { return Pi(e, t); } function Wa(e) { return e == null; } function Pv(e) { return e === void 0; } function bk(e, t, n, r) { if (!Un(e)) return e; t = Fi(t, e); for (var o = -1, a = t.length, s = a - 1, i = e; i != null && ++o < a; ) { var l = Ka(t[o]), c = n; if (l === "__proto__" || l === "constructor" || l === "prototype") return e; if (o != s) { var u = i[l]; c = void 0, c === void 0 && (c = Un(u) ? u : Lc(t[o + 1]) ? [] : {}); } Dc(i, l, c), i = i[l]; } return e; } function wk(e, t, n) { for (var r = -1, o = t.length, a = {}; ++r < o; ) { var s = t[r], i = Kc(e, s); n(i, s) && bk(a, Fi(s, e), i); } return a; } function Ck(e, t) { return wk(e, t, function(n, r) { return Av(e, r); }); } var $v = U2(function(e, t) { return e == null ? {} : Ck(e, t); }); const gr = (e) => e === void 0, An = (e) => typeof e == "boolean", je = (e) => typeof e == "number", oc = (e) => !e && e !== 0 || qt(e) && e.length === 0 || At(e) && !Object.keys(e).length, Rr = (e) => typeof Element > "u" ? !1 : e instanceof Element, Fa = (e) => Wa(e), Sk = (e) => jt(e) ? !Number.isNaN(Number(e)) : !1, kk = (e = "") => e.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d"), af = (e) => m1(e), sf = (e) => Object.keys(e); class Rv extends Error { constructor(t) { super(t), this.name = "ElementPlusError"; } } function Nv(e, t) { throw new Rv(`[${e}] ${t}`); } function yt(e, t) { if (process.env.NODE_ENV !== "production") { const n = jt(e) ? new Rv(`[${e}] ${t}`) : e; console.warn(n); } } const _k = "utils/dom/style", Lv = (e = "") => e.split(" ").filter((t) => !!t.trim()), lf = (e, t) => { if (!e || !t) return !1; if (t.includes(" ")) throw new Error("className should not contain space."); return e.classList.contains(t); }, ac = (e, t) => { !e || !t.trim() || e.classList.add(...Lv(t)); }, Pa = (e, t) => { !e || !t.trim() || e.classList.remove(...Lv(t)); }, Io = (e, t) => { var n; if (!Qe || !e || !t) return ""; let r = h1(t); r === "float" && (r = "cssFloat"); try { const o = e.style[r]; if (o) return o; const a = (n = document.defaultView) == null ? void 0 : n.getComputedStyle(e, ""); return a ? a[r] : ""; } catch { return e.style[r]; } }; function yr(e, t = "px") { if (!e) return ""; if (je(e) || Sk(e)) return `${e}${t}`; if (jt(e)) return e; yt(_k, "binding value must be a string or number"); } let ys; const Ek = (e) => { var t; if (!Qe) return 0; if (ys !== void 0) return ys; const n = document.createElement("div"); n.className = `${e}-scrollbar__wrap`, n.style.visibility = "hidden", n.style.width = "100px", n.style.position = "absolute", n.style.top = "-9999px", document.body.appendChild(n); const r = n.offsetWidth; n.style.overflow = "scroll"; const o = document.createElement("div"); o.style.width = "100%", n.appendChild(o); const a = o.offsetWidth; return (t = n.parentNode) == null || t.removeChild(n), ys = r - a, ys; }; function Bv(e, t) { if (!Qe) return; if (!t) { e.scrollTop = 0; return; } const n = []; let r = t.offsetParent; for (; r !== null && e !== r && e.contains(r); ) n.push(r), r = r.offsetParent; const o = t.offsetTop + n.reduce((l, c) => l + c.offsetTop, 0), a = o + t.offsetHeight, s = e.scrollTop, i = s + e.clientHeight; o < s ? e.scrollTop = o : a > i && (e.scrollTop = a - e.clientHeight); } const Dv = "__epPropKey", ue = (e) => e, xk = (e) => At(e) && !!e[Dv], $i = (e, t) => { if (!At(e) || xk(e)) return e; const { values: n, required: r, default: o, type: a, validator: s } = e, l = { type: a, required: !!r, validator: n || s ? (c) => { let u = !1, f = []; if (n && (f = Array.from(n), Od(e, "default") && f.push(o), u || (u = f.includes(c))), s && (u || (u = s(c))), !u && f.length > 0) { const g = [...new Set(f)].map((v) => JSON.stringify(v)).join(", "); Ph(`Invalid prop: validation failed${t ? ` for prop "${t}"` : ""}. Expected one of [${g}], got value ${JSON.stringify(c)}.`); } return u; } : void 0, [Dv]: !0 }; return Od(e, "default") && (l.default = o), l; }, we = (e) => oi(Object.entries(e).map(([t, n]) => [ t, $i(n, t) ])), yn = ue([ String, Object, Function ]), Tk = { Close: ao, SuccessFilled: qh, InfoFilled: Gh, WarningFilled: Kh, CircleCloseFilled: Wh }, cf = { success: qh, warning: Kh, error: Wh, info: Gh }, Mv = { validating: Si, success: Nb, error: ki }, vt = (e, t) => { if (e.install = (n) => { for (const r of [e, ...Object.values(t ?? {})]) n.component(r.name, r); }, t) for (const [n, r] of Object.entries(t)) e[n] = r; return e; }, Ok = (e, t) => (e.install = (n) => { e._context = n._context, n.config.globalProperties[t] = e; }, e), Ik = (e, t) => (e.install = (n) => { n.directive(t, e); }, e), bn = (e) => (e.install = mr, e), jv = (...e) => (t) => { e.forEach((n) => { ut(n) ? n(t) : n.value = t; }); }, Ve = { tab: "Tab", enter: "Enter", space: "Space", left: "ArrowLeft", up: "ArrowUp", right: "ArrowRight", down: "ArrowDown", esc: "Escape", delete: "Delete", backspace: "Backspace", numpadEnter: "NumpadEnter", pageUp: "PageUp", pageDown: "PageDown", home: "Home", end: "End" }, ft = "update:modelValue", io = "change", Ri = ["", "default", "small", "large"]; var Ds = /* @__PURE__ */ ((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))(Ds || {}); const uf = (e) => [...new Set(e)], df = (e) => !e && e !== 0 ? [] : Array.isArray(e) ? e : [e], Ak = (e) => /([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(e), vr = (e) => e, Fk = ["class", "style"], Pk = /^on[A-Z]/, $k = (e = {}) => { const { excludeListeners: t = !1, excludeKeys: n } = e, r = w(() => ((n == null ? void 0 : n.value) || []).concat(Fk)), o = We(); return o ? w(() => { var a; return oi(Object.entries((a = o.proxy) == null ? void 0 : a.$attrs).filter(([s]) => !r.value.includes(s) && !(t && Pk.test(s)))); }) : (yt("use-attrs", "getCurrentInstance() returned null. useAttrs() must be called at the top of a setup function"), w(() => ({}))); }, eo = ({ from: e, replacement: t, scope: n, version: r, ref: o, type: a = "API" }, s) => { oe(() => p(s), (i) => { i && yt(n, `[${a}] ${e} is about to be deprecated in version ${r}, please use ${t} instead. For more detail, please visit: ${o} `); }, { immediate: !0 }); }; var Rk = { 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 Nk = (e) => (t, n) => Lk(t, n, p(e)), Lk = (e, t, n) => pr(n, e, e).replace(/\{(\w+)\}/g, (r, o) => { var a; return `${(a = t == null ? void 0 : t[o]) != null ? a : `{${o}}`}`; }), Bk = (e) => { const t = w(() => p(e).name), n = Tn(e) ? e : $(e); return { lang: t, locale: n, t: Nk(e) }; }, Vv = Symbol("localeContextKey"), wn = (e) => { const t = e || ce(Vv, $()); return Bk(w(() => t.value || Rk)); }, Ca = "el", Dk = "is-", Ur = (e, t, n, r, o) => { let a = `${e}-${t}`; return n && (a += `-${n}`), r && (a += `__${r}`), o && (a += `--${o}`), a; }, zv = Symbol("namespaceContextKey"), Yc = (e) => { const t = e || (We() ? ce(zv, $(Ca)) : $(Ca)); return w(() => p(t) || Ca); }, be = (e, t) => { const n = Yc(t); return { namespace: n, b: (h = "") => Ur(n.value, e, h, "", ""), e: (h) => h ? Ur(n.value, e, "", h, "") : "", m: (h) => h ? Ur(n.value, e, "", "", h) : "", be: (h, m) => h && m ? Ur(n.value, e, h, m, "") : "", em: (h, m) => h && m ? Ur(n.value, e, "", h, m) : "", bm: (h, m) => h && m ? Ur(n.value, e, h, "", m) : "", bem: (h, m, y) => h && m && y ? Ur(n.value, e, h, m, y) : "", is: (h, ...m) => { const y = m.length >= 1 ? m[0] : !0; return h && y ? `${Dk}${h}` : ""; }, cssVar: (h) => { const m = {}; for (const y in h) h[y] && (m[`--${n.value}-${y}`] = h[y]); return m; }, cssVarName: (h) => `--${n.value}-${h}`, cssVarBlock: (h) => { const m = {}; for (const y in h) h[y] && (m[`--${n.value}-${e}-${y}`] = h[y]); return m; }, cssVarBlockName: (h) => `--${n.value}-${e}-${h}` }; }, Mk = (e, t = {}) => { Tn(e) || Nv("[useLockscreen]", "You need to pass a ref param to this function"); const n = t.ns || be("popup"), r = w(() => n.bm("parent", "hidden")); if (!Qe || lf(document.body, r.value)) return; let o = 0, a = !1, s = "0"; const i = () => { setTimeout(() => { Pa(document == null ? void 0 : document.body, r.value), a && document && (document.body.style.width = s); }, 200); }; oe(e, (l) => { if (!l) { i(); return; } a = !lf(document.body, r.value), a && (s = document.body.style.width), o = Ek(n.namespace.value); const c = document.documentElement.clientHeight < document.body.scrollHeight, u = Io(document.body, "overflowY"); o > 0 && (c || u === "scroll") && a && (document.body.style.width = `calc(100% - ${o}px)`), ac(document.body, r.value); }), $c(() => i()); }, jk = $i({ type: ue(Boolean), default: null }), Vk = $i({ type: ue(Function) }), zk = (e) => { const t = `update:${e}`, n = `onUpdate:${e}`, r = [t], o = { [e]: jk, [n]: Vk }; return { useModelToggle: ({ indicator: s, toggleReason: i, shouldHideWhenRouteChanges: l, shouldProceed: c, onShow: u, onHide: f }) => { const g = We(), { emit: v } = g, d = g.props, h = w(() => ut(d[n])), m = w(() => d[e] === null), y = (I) => { s.value !== !0 && (s.value = !0, i && (i.value = I), ut(u) && u(I)); }, x = (I) => { s.value !== !1 && (s.value = !1, i && (i.value = I), ut(f) && f(I)); }, A = (I) => { if (d.disabled === !0 || ut(c) && !c()) return; const R = h.value && Qe; R && v(t, !0), (m.value || !R) && y(I); }, k = (I) => { if (d.disabled === !0 || !Qe) return; const R = h.value && Qe; R && v(t, !1), (m.value || !R) && x(I); }, E = (I) => { An(I) && (d.disabled && I ? h.value && v(t, !1) : s.value !== I && (I ? y() : x())); }, T = () => { s.value ? k() : A(); }; return oe(() => d[e], E), l && g.appContext.config.globalProperties.$route !== void 0 && oe(() => ({ ...g.proxy.$route }), () => { l.value && s.value && k(); }), Ye(() => { E(d[e]); }), { hide: k, show: A, toggle: T, hasUpdateHandler: h }; }, useModelToggleProps: o, useModelToggleEmits: r }; }, Hv = (e) => { const t = We(); return w(() => { var n, r; return (r = (n = t == null ? void 0 : t.proxy) == null ? void 0 : n.$props) == null ? void 0 : r[e]; }); }; var en = "top", Fn = "bottom", Pn = "right", tn = "left", Xc = "auto", Ga = [en, Fn, Pn, tn], Ro = "start", $a = "end", Hk = "clippingParents", Uv = "viewport", da = "popper", Uk = "reference", ff = Ga.reduce(function(e, t) { return e.concat([t + "-" + Ro, t + "-" + $a]); }, []), Ja = [].concat(Ga, [Xc]).reduce(function(e, t) { return e.concat([t, t + "-" + Ro, t + "-" + $a]); }, []), qk = "beforeRead", Kk = "read", Wk = "afterRead", Gk = "beforeMain", Jk = "main", Zk = "afterMain", Yk = "beforeWrite", Xk = "write", Qk = "afterWrite", e_ = [qk, Kk, Wk, Gk, Jk, Zk, Yk, Xk, Qk]; function or(e) { return e ? (e.nodeName || "").toLowerCase() : null; } function Kn(e) { if (e == null) return window; if (e.toString() !== "[object Window]") { var t = e.ownerDocument; return t && t.defaultView || window; } return e; } function No(e) { var t = Kn(e).Element; return e instanceof t || e instanceof Element; } function En(e) { var t = Kn(e).HTMLElement; return e instanceof t || e instanceof HTMLElement; } function Qc(e) { if (typeof ShadowRoot > "u") return !1; var t = Kn(e).ShadowRoot; return e instanceof t || e instanceof ShadowRoot; } function t_(e) { var t = e.state; Object.keys(t.elements).forEach(function(n) { var r = t.styles[n] || {}, o = t.attributes[n] || {}, a = t.elements[n]; !En(a) || !or(a) || (Object.assign(a.style, r), Object.keys(o).forEach(function(s) { var i = o[s]; i === !1 ? a.removeAttribute(s) : a.setAttribute(s, i === !0 ? "" : i); })); }); } function n_(e) { var t = e.state, n = { popper: { position: t.options.strategy, left: "0", top: "0", margin: "0" }, arrow: { position: "absolute" }, reference: {} }; return Object.assign(t.elements.popper.style, n.popper), t.styles = n, t.elements.arrow && Object.assign(t.elements.arrow.style, n.arrow), function() { Object.keys(t.elements).forEach(function(r) { var o = t.elements[r], a = t.attributes[r] || {}, s = Object.keys(t.styles.hasOwnProperty(r) ? t.styles[r] : n[r]), i = s.reduce(function(l, c) { return l[c] = "", l; }, {}); !En(o) || !or(o) || (Object.assign(o.style, i), Object.keys(a).forEach(function(l) { o.removeAttribute(l); })); }); }; } var qv = { name: "applyStyles", enabled: !0, phase: "write", fn: t_, effect: n_, requires: ["computeStyles"] }; function nr(e) { return e.split("-")[0]; } var to = Math.max, ai = Math.min, Lo = Math.round; function Bo(e, t) { t === void 0 && (t = !1); var n = e.getBoundingClientRect(), r = 1, o = 1; if (En(e) && t) { var a = e.offsetHeight, s = e.offsetWidth; s > 0 && (r = Lo(n.width) / s || 1), a > 0 && (o = Lo(n.height) / a || 1); } return { width: n.width / r, height: n.height / o, top: n.top / o, right: n.right / r, bottom: n.bottom / o, left: n.left / r, x: n.left / r, y: n.top / o }; } function eu(e) { var t = Bo(e), n = e.offsetWidth, r = e.offsetHeight; return Math.abs(t.width - n) <= 1 && (n = t.width), Math.abs(t.height - r) <= 1 && (r = t.height), { x: e.offsetLeft, y: e.offsetTop, width: n, height: r }; } function Kv(e, t) { var n = t.getRootNode && t.getRootNode(); if (e.contains(t)) return !0; if (n && Qc(n)) { var r = t; do { if (r && e.isSameNode(r)) return !0; r = r.parentNode || r.host; } while (r); } return !1; } function br(e) { return Kn(e).getComputedStyle(e); } function r_(e) { return ["table", "td", "th"].indexOf(or(e)) >= 0; } function Br(e) { return ((No(e) ? e.ownerDocument : e.document) || window.document).documentElement; } function Ni(e) { return or(e) === "html" ? e : e.assignedSlot || e.parentNode || (Qc(e) ? e.host : null) || Br(e); } function pf(e) { return !En(e) || br(e).position === "fixed" ? null : e.offsetParent; } function o_(e) { var t = navigator.userAgent.toLowerCase().indexOf("firefox") !== -1, n = navigator.userAgent.indexOf("Trident") !== -1; if (n && En(e)) { var r = br(e); if (r.position === "fixed") return null; } var o = Ni(e); for (Qc(o) && (o = o.host); En(o) && ["html", "body"].indexOf(or(o)) < 0; ) { var a = br(o); 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 o; o = o.parentNode; } return null; } function Za(e) { for (var t = Kn(e), n = pf(e); n && r_(n) && br(n).position === "static"; ) n = pf(n); return n && (or(n) === "html" || or(n) === "body" && br(n).position === "static") ? t : n || o_(e) || t; } function tu(e) { return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y"; } function Sa(e, t, n) { return to(e, ai(t, n)); } function a_(e, t, n) { var r = Sa(e, t, n); return r > n ? n : r; } function Wv() { return { top: 0, right: 0, bottom: 0, left: 0 }; } function Gv(e) { return Object.assign({}, Wv(), e); } function Jv(e, t) { return t.reduce(function(n, r) { return n[r] = e, n; }, {}); } var s_ = function(e, t) { return e = typeof e == "function" ? e(Object.assign({}, t.rects, { placement: t.placement })) : e, Gv(typeof e != "number" ? e : Jv(e, Ga)); }; function i_(e) { var t, n = e.state, r = e.name, o = e.options, a = n.elements.arrow, s = n.modifiersData.popperOffsets, i = nr(n.placement), l = tu(i), c = [tn, Pn].indexOf(i) >= 0, u = c ? "height" : "width"; if (!(!a || !s)) { var f = s_(o.padding, n), g = eu(a), v = l === "y" ? en : tn, d = l === "y" ? Fn : Pn, h = n.rects.reference[u] + n.rects.reference[l] - s[l] - n.rects.popper[u], m = s[l] - n.rects.reference[l], y = Za(a), x = y ? l === "y" ? y.clientHeight || 0 : y.clientWidth || 0 : 0, A = h / 2 - m / 2, k = f[v], E = x - g[u] - f[d], T = x / 2 - g[u] / 2 + A, I = Sa(k, T, E), R = l; n.modifiersData[r] = (t = {}, t[R] = I, t.centerOffset = I - T, t); } } function l_(e) { var t = e.state, n = e.options, r = n.element, o = r === void 0 ? "[data-popper-arrow]" : r; o != null && (typeof o == "string" && (o = t.elements.popper.querySelector(o), !o) || !Kv(t.elements.popper, o) || (t.elements.arrow = o)); } var c_ = { name: "arrow", enabled: !0, phase: "main", fn: i_, effect: l_, requires: ["popperOffsets"], requiresIfExists: ["preventOverflow"] }; function Do(e) { return e.split("-")[1]; } var u_ = { top: "auto", right: "auto", bottom: "auto", left: "auto" }; function d_(e) { var t = e.x, n = e.y, r = window, o = r.devicePixelRatio || 1; return { x: Lo(t * o) / o || 0, y: Lo(n * o) / o || 0 }; } function hf(e) { var t, n = e.popper, r = e.popperRect, o = e.placement, a = e.variation, s = e.offsets, i = e.position, l = e.gpuAcceleration, c = e.adaptive, u = e.roundOffsets, f = e.isFixed, g = s.x, v = g === void 0 ? 0 : g, d = s.y, h = d === void 0 ? 0 : d, m = typeof u == "function" ? u({ x: v, y: h }) : { x: v, y: h }; v = m.x, h = m.y; var y = s.hasOwnProperty("x"), x = s.hasOwnProperty("y"), A = tn, k = en, E = window; if (c) { var T = Za(n), I = "clientHeight", R = "clientWidth"; if (T === Kn(n) && (T = Br(n), br(T).position !== "static" && i === "absolute" && (I = "scrollHeight", R = "scrollWidth")), T = T, o === en || (o === tn || o === Pn) && a === $a) { k = Fn; var D = f && T === E && E.visualViewport ? E.visualViewport.height : T[I]; h -= D - r.height, h *= l ? 1 : -1; } if (o === tn || (o === en || o === Fn) && a === $a) { A = Pn; var W = f && T === E && E.visualViewport ? E.visualViewport.width : T[R]; v -= W - r.width, v *= l ? 1 : -1; } } var z = Object.assign({ position: i }, c && u_), U = u === !0 ? d_({ x: v, y: h }) : { x: v, y: h }; if (v = U.x, h = U.y, l) { var X; return Object.assign({}, z, (X = {}, X[k] = x ? "0" : "", X[A] = y ? "0" : "", X.transform = (E.devicePixelRatio || 1) <= 1 ? "translate(" + v + "px, " + h + "px)" : "translate3d(" + v + "px, " + h + "px, 0)", X)); } return Object.assign({}, z, (t = {}, t[k] = x ? h + "px" : "", t[A] = y ? v + "px" : "", t.transform = "", t)); } function f_(e) { var t = e.state, n = e.options, r = n.gpuAcceleration, o = r === void 0 ? !0 : r, a = n.adaptive, s = a === void 0 ? !0 : a, i = n.roundOffsets, l = i === void 0 ? !0 : i, c = { placement: nr(t.placement), variation: Do(t.placement), popper: t.elements.popper, popperRect: t.rects.popper, gpuAcceleration: o, isFixed: t.options.strategy === "fixed" }; t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper, hf(Object.assign({}, c, { offsets: t.modifiersData.popperOffsets, position: t.options.strategy, adaptive: s, roundOffsets: l })))), t.modifiersData.arrow != null && (t.styles.arrow = Object.assign({}, t.styles.arrow, hf(Object.assign({}, c, { offsets: t.modifiersData.arrow, position: "absolute", adaptive: !1, roundOffsets: l })))), t.attributes.popper = Object.assign({}, t.attributes.popper, { "data-popper-placement": t.placement }); } var Zv = { name: "computeStyles", enabled: !0, phase: "beforeWrite", fn: f_, data: {} }, bs = { passive: !0 }; function p_(e) { var t = e.state, n = e.instance, r = e.options, o = r.scroll, a = o === void 0 ? !0 : o, s = r.resize, i = s === void 0 ? !0 : s, l = Kn(t.elements.popper), c = [].concat(t.scrollParents.reference, t.scrollParents.popper); return a && c.forEach(function(u) { u.addEventListener("scroll", n.update, bs); }), i && l.addEventListener("resize", n.update, bs), function() { a && c.forEach(function(u) { u.removeEventListener("scroll", n.update, bs); }), i && l.removeEventListener("resize", n.update, bs); }; } var Yv = { name: "eventListeners", enabled: !0, phase: "write", fn: function() { }, effect: p_, data: {} }, h_ = { left: "right", right: "left", bottom: "top", top: "bottom" }; function Ms(e) { return e.replace(/left|right|bottom|top/g, function(t) { return h_[t]; }); } var v_ = { start: "end", end: "start" }; function vf(e) { return e.replace(/start|end/g, function(t) { return v_[t]; }); } function nu(e) { var t = Kn(e), n = t.pageXOffset, r = t.pageYOffset; return { scrollLeft: n, scrollTop: r }; } function ru(e) { return Bo(Br(e)).left + nu(e).scrollLeft; } function g_(e) { var t = Kn(e), n = Br(e), r = t.visualViewport, o = n.clientWidth, a = n.clientHeight, s = 0, i = 0; return r && (o = r.width, a = r.height, /^((?!chrome|android).)*safari/i.test(navigator.userAgent) || (s = r.offsetLeft, i = r.offsetTop)), { width: o, height: a, x: s + ru(e), y: i }; } function m_(e) { var t, n = Br(e), r = nu(e), o = (t = e.ownerDocument) == null ? void 0 : t.body, a = to(n.scrollWidth, n.clientWidth, o ? o.scrollWidth : 0, o ? o.clientWidth : 0), s = to(n.scrollHeight, n.clientHeight, o ? o.scrollHeight : 0, o ? o.clientHeight : 0), i = -r.scrollLeft + ru(e), l = -r.scrollTop; return br(o || n).direction === "rtl" && (i += to(n.clientWidth, o ? o.clientWidth : 0) - a), { width: a, height: s, x: i, y: l }; } function ou(e) { var t = br(e), n = t.overflow, r = t.overflowX, o = t.overflowY; return /auto|scroll|overlay|hidden/.test(n + o + r); } function Xv(e) { return ["html", "body", "#document"].indexOf(or(e)) >= 0 ? e.ownerDocument.body : En(e) && ou(e) ? e : Xv(Ni(e)); } function ka(e, t) { var n; t === void 0 && (t = []); var r = Xv(e), o = r === ((n = e.ownerDocument) == null ? void 0 : n.body), a = Kn(r), s = o ? [a].concat(a.visualViewport || [], ou(r) ? r : []) : r, i = t.concat(s); return o ? i : i.concat(ka(Ni(s))); } function sc(e) { return Object.assign({}, e, { left: e.x, top: e.y, right: e.x + e.width, bottom: e.y + e.height }); } function y_(e) { var t = Bo(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 gf(e, t) { return t === Uv ? sc(g_(e)) : No(t) ? y_(t) : sc(m_(Br(e))); } function b_(e) { var t = ka(Ni(e)), n = ["absolute", "fixed"].indexOf(br(e).position) >= 0, r = n && En(e) ? Za(e) : e; return No(r) ? t.filter(function(o) { return No(o) && Kv(o, r) && or(o) !== "body"; }) : []; } function w_(e, t, n) { var r = t === "clippingParents" ? b_(e) : [].concat(t), o = [].concat(r, [n]), a = o[0], s = o.reduce(function(i, l) { var c = gf(e, l); return i.top = to(c.top, i.top), i.right = ai(c.right, i.right), i.bottom = ai(c.bottom, i.bottom), i.left = to(c.left, i.left), i; }, gf(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 Qv(e) { var t = e.reference, n = e.element, r = e.placement, o = r ? nr(r) : null, a = r ? Do(r) : null, s = t.x + t.width / 2 - n.width / 2, i = t.y + t.height / 2 - n.height / 2, l; switch (o) { case en: l = { x: s, y: t.y - n.height }; break; case Fn: l = { x: s, y: t.y + t.height }; break; case Pn: l = { x: t.x + t.width, y: i }; break; case tn: l = { x: t.x - n.width, y: i }; break; default: l = { x: t.x, y: t.y }; } var c = o ? tu(o) : null; if (c != null) { var u = c === "y" ? "height" : "width"; switch (a) { case Ro: l[c] = l[c] - (t[u] / 2 - n[u] / 2); break; case $a: l[c] = l[c] + (t[u] / 2 - n[u] / 2); break; } } return l; } function Ra(e, t) { t === void 0 && (t = {}); var n = t, r = n.placement, o = r === void 0 ? e.placement : r, a = n.boundary, s = a === void 0 ? Hk : a, i = n.rootBoundary, l = i === void 0 ? Uv : i, c = n.elementContext, u = c === void 0 ? da : c, f = n.altBoundary, g = f === void 0 ? !1 : f, v = n.padding, d = v === void 0 ? 0 : v, h = Gv(typeof d != "number" ? d : Jv(d, Ga)), m = u === da ? Uk : da, y = e.rects.popper, x = e.elements[g ? m : u], A = w_(No(x) ? x : x.contextElement || Br(e.elements.popper), s, l), k = Bo(e.elements.reference), E = Qv({ reference: k, element: y, strategy: "absolute", placement: o }), T = sc(Object.assign({}, y, E)), I = u === da ? T : k, R = { top: A.top - I.top + h.top, bottom: I.bottom - A.bottom + h.bottom, left: A.left - I.left + h.left, right: I.right - A.right + h.right }, D = e.modifiersData.offset; if (u === da && D) { var W = D[o]; Object.keys(R).forEach(function(z) { var U = [Pn, Fn].indexOf(z) >= 0 ? 1 : -1, X = [en, Fn].indexOf(z) >= 0 ? "y" : "x"; R[z] += W[X] * U; }); } return R; } function C_(e, t) { t === void 0 && (t = {}); var n = t, r = n.placement, o = n.boundary, a = n.rootBoundary, s = n.padding, i = n.flipVariations, l = n.allowedAutoPlacements, c = l === void 0 ? Ja : l, u = Do(r), f = u ? i ? ff : ff.filter(function(d) { return Do(d) === u; }) : Ga, g = f.filter(function(d) { return c.indexOf(d) >= 0; }); g.length === 0 && (g = f); var v = g.reduce(function(d, h) { return d[h] = Ra(e, { placement: h, boundary: o, rootBoundary: a, padding: s })[nr(h)], d; }, {}); return Object.keys(v).sort(function(d, h) { return v[d] - v[h]; }); } function S_(e) { if (nr(e) === Xc) return []; var t = Ms(e); return [vf(e), t, vf(t)]; } function k_(e) { var t = e.state, n = e.options, r = e.name; if (!t.modifiersData[r]._skip) { for (var o = n.mainAxis, a = o === void 0 ? !0 : o, s = n.altAxis, i = s === void 0 ? !0 : s, l = n.fallbackPlacements, c = n.padding, u = n.boundary, f = n.rootBoundary, g = n.altBoundary, v = n.flipVariations, d = v === void 0 ? !0 : v, h = n.allowedAutoPlacements, m = t.options.placement, y = nr(m), x = y === m, A = l || (x || !d ? [Ms(m)] : S_(m)), k = [m].concat(A).reduce(function(Ge, Le) { return Ge.concat(nr(Le) === Xc ? C_(t, { placement: Le, boundary: u, rootBoundary: f, padding: c, flipVariations: d, allowedAutoPlacements: h }) : Le); }, []), E = t.rects.reference, T = t.rects.popper, I = /* @__PURE__ */ new Map(), R = !0, D = k[0], W = 0; W < k.length; W++) { var z = k[W], U = nr(z), X = Do(z) === Ro, de = [en, Fn].indexOf(U) >= 0, re = de ? "width" : "height", L = Ra(t, { placement: z, boundary: u, rootBoundary: f, altBoundary: g, padding: c }), Z = de ? X ? Pn : tn : X ? Fn : en; E[re] > T[re] && (Z = Ms(Z)); var ve = Ms(Z), me = []; if (a && me.push(L[U] <= 0), i && me.push(L[Z] <= 0, L[ve] <= 0), me.every(function(Ge) { return Ge; })) { D = z, R = !1; break; } I.set(z, me); } if (R) for (var Ne = d ? 3 : 1, _e = function(Ge) { var Le = k.find(function(Ke) { var nt = I.get(Ke); if (nt) return nt.slice(0, Ge).every(function(dt) { return dt; }); }); if (Le) return D = Le, "break"; }, ze = Ne; ze > 0; ze--) { var at = _e(ze); if (at === "break") break; } t.placement !== D && (t.modifiersData[r]._skip = !0, t.placement = D, t.reset = !0); } } var __ = { name: "flip", enabled: !0, phase: "main", fn: k_, requiresIfExists: ["offset"], data: { _skip: !1 } }; function mf(e, t, n) { return n === void 0 && (n = { x: 0, y: 0 }), { top: e.top - t.height - n.y, right: e.right - t.width + n.x, bottom: e.bottom - t.height + n.y, left: e.left - t.width - n.x }; } function yf(e) { return [en, Pn, Fn, tn].some(function(t) { return e[t] >= 0; }); } function E_(e) { var t = e.state, n = e.name, r = t.rects.reference, o = t.rects.popper, a = t.modifiersData.preventOverflow, s = Ra(t, { elementContext: "reference" }), i = Ra(t, { altBoundary: !0 }), l = mf(s, r), c = mf(i, o, a), u = yf(l), f = yf(c); t.modifiersData[n] = { referenceClippingOffsets: l, popperEscapeOffsets: c, isReferenceHidden: u, hasPopperEscaped: f }, t.attributes.popper = Object.assign({}, t.attributes.popper, { "data-popper-reference-hidden": u, "data-popper-escaped": f }); } var x_ = { name: "hide", enabled: !0, phase: "main", requiresIfExists: ["preventOverflow"], fn: E_ }; function T_(e, t, n) { var r = nr(e), o = [tn, en].indexOf(r) >= 0 ? -1 : 1, a = typeof n == "function" ? n(Object.assign({}, t, { placement: e })) : n, s = a[0], i = a[1]; return s = s || 0, i = (i || 0) * o, [tn, Pn].indexOf(r) >= 0 ? { x: i, y: s } : { x: s, y: i }; } function O_(e) { var t = e.state, n = e.options, r = e.name, o = n.offset, a = o === void 0 ? [0, 0] : o, s = Ja.reduce(function(u, f) { return u[f] = T_(f, t.rects, a), u; }, {}), i = s[t.placement], l = i.x, c = i.y; t.modifiersData.popperOffsets != null && (t.modifiersData.popperOffsets.x += l, t.modifiersData.popperOffsets.y += c), t.modifiersData[r] = s; } var I_ = { name: "offset", enabled: !0, phase: "main", requires: ["popperOffsets"], fn: O_ }; function A_(e) { var t = e.state, n = e.name; t.modifiersData[n] = Qv({ reference: t.rects.reference, element: t.rects.popper, strategy: "absolute", placement: t.placement }); } var eg = { name: "popperOffsets", enabled: !0, phase: "read", fn: A_, data: {} }; function F_(e) { return e === "x" ? "y" : "x"; } function P_(e) { var t = e.state, n = e.options, r = e.name, o = n.mainAxis, a = o === void 0 ? !0 : o, s = n.altAxis, i = s === void 0 ? !1 : s, l = n.boundary, c = n.rootBoundary, u = n.altBoundary, f = n.padding, g = n.tether, v = g === void 0 ? !0 : g, d = n.tetherOffset, h = d === void 0 ? 0 : d, m = Ra(t, { boundary: l, rootBoundary: c, padding: f, altBoundary: u }), y = nr(t.placement), x = Do(t.placement), A = !x, k = tu(y), E = F_(k), T = t.modifiersData.popperOffsets, I = t.rects.reference, R = t.rects.popper, D = typeof h == "function" ? h(Object.assign({}, t.rects, { placement: t.placement })) : h, W = typeof D == "number" ? { mainAxis: D, altAxis: D } : Object.assign({ mainAxis: 0, altAxis: 0 }, D), z = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, U = { x: 0, y: 0 }; if (T) { if (a) { var X, de = k === "y" ? en : tn, re = k === "y" ? Fn : Pn, L = k === "y" ? "height" : "width", Z = T[k], ve = Z + m[de], me = Z - m[re], Ne = v ? -R[L] / 2 : 0, _e = x === Ro ? I[L] : R[L], ze = x === Ro ? -R[L] : -I[L], at = t.elements.arrow, Ge = v && at ? eu(at) : { width: 0, height: 0 }, Le = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : Wv(), Ke = Le[de], nt = Le[re], dt = Sa(0, I[L], Ge[L]), Cn = A ? I[L] / 2 - Ne - dt - Ke - W.mainAxis : _e - dt - Ke - W.mainAxis, Rt = A ? -I[L] / 2 + Ne + dt + nt + W.mainAxis : ze + dt + nt + W.mainAxis, Tt = t.elements.arrow && Za(t.elements.arrow), st = Tt ? k === "y" ? Tt.clientTop || 0 : Tt.clientLeft || 0 : 0, gt = (X = z == null ? void 0 : z[k]) != null ? X : 0, Wt = Z + Cn - gt - st, Gt = Z + Rt - gt, Et = Sa(v ? ai(ve, Wt) : ve, Z, v ? to(me, Gt) : me); T[k] = Et, U[k] = Et - Z; } if (i) { var Jt, Nt = k === "x" ? en : tn, Sn = k === "x" ? Fn : Pn, Je = T[E], Ot = E === "y" ? "height" : "width", zt = Je + m[Nt], cn = Je - m[Sn], It = [en, tn].indexOf(y) !== -1, te = (Jt = z == null ? void 0 : z[E]) != null ? Jt : 0, $e = It ? zt : Je - I[Ot] - R[Ot] - te + W.altAxis, it = It ? Je + I[Ot] + R[Ot] - te - W.altAxis : cn, Ht = v && It ? a_($e, Je, it) : Sa(v ? $e : zt, Je, v ? it : cn); T[E] = Ht, U[E] = Ht - Je; } t.modifiersData[r] = U; } } var $_ = { name: "preventOverflow", enabled: !0, phase: "main", fn: P_, requiresIfExists: ["offset"] }; function R_(e) { return { scrollLeft: e.scrollLeft, scrollTop: e.scrollTop }; } function N_(e) { return e === Kn(e) || !En(e) ? nu(e) : R_(e); } function L_(e) { var t = e.getBoundingClientRect(), n = Lo(t.width) / e.offsetWidth || 1, r = Lo(t.height) / e.offsetHeight || 1; return n !== 1 || r !== 1; } function B_(e, t, n) { n === void 0 && (n = !1); var r = En(t), o = En(t) && L_(t), a = Br(t), s = Bo(e, o), i = { scrollLeft: 0, scrollTop: 0 }, l = { x: 0, y: 0 }; return (r || !r && !n) && ((or(t) !== "body" || ou(a)) && (i = N_(t)), En(t) ? (l = Bo(t, !0), l.x += t.clientLeft, l.y += t.clientTop) : a && (l.x = ru(a))), { x: s.left + i.scrollLeft - l.x, y: s.top + i.scrollTop - l.y, width: s.width, height: s.height }; } function D_(e) { var t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set(), r = []; e.forEach(function(a) { t.set(a.name, a); }); function o(a) { n.add(a.name); var s = [].concat(a.requires || [], a.requiresIfExists || []); s.forEach(function(i) { if (!n.has(i)) { var l = t.get(i); l && o(l); } }), r.push(a); } return e.forEach(function(a) { n.has(a.name) || o(a); }), r; } function M_(e) { var t = D_(e); return e_.reduce(function(n, r) { return n.concat(t.filter(function(o) { return o.phase === r; })); }, []); } function j_(e) { var t; return function() { return t || (t = new Promise(function(n) { Promise.resolve().then(function() { t = void 0, n(e()); }); })), t; }; } function V_(e) { var t = e.reduce(function(n, r) { var o = n[r.name]; return n[r.name] = o ? Object.assign({}, o, r, { options: Object.assign({}, o.options, r.options), data: Object.assign({}, o.data, r.data) }) : r, n; }, {}); return Object.keys(t).map(function(n) { return t[n]; }); } var bf = { placement: "bottom", modifiers: [], strategy: "absolute" }; function wf() { for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++) t[n] = arguments[n]; return !t.some(function(r) { return !(r && typeof r.getBoundingClientRect == "function"); }); } function au(e) { e === void 0 && (e = {}); var t = e, n = t.defaultModifiers, r = n === void 0 ? [] : n, o = t.defaultOptions, a = o === void 0 ? bf : o; return function(s, i, l) { l === void 0 && (l = a); var c = { placement: "bottom", orderedModifiers: [], options: Object.assign({}, bf, a), modifiersData: {}, elements: { reference: s, popper: i }, attributes: {}, styles: {} }, u = [], f = !1, g = { state: c, setOptions: function(h) { var m = typeof h == "function" ? h(c.options) : h; d(), c.options = Object.assign({}, a, c.options, m), c.scrollParents = { reference: No(s) ? ka(s) : s.contextElement ? ka(s.contextElement) : [], popper: ka(i) }; var y = M_(V_([].concat(r, c.options.modifiers))); return c.orderedModifiers = y.filter(function(x) { return x.enabled; }), v(), g.update(); }, forceUpdate: function() { if (!f) { var h = c.elements, m = h.reference, y = h.popper; if (wf(m, y)) { c.rects = { reference: B_(m, Za(y), c.options.strategy === "fixed"), popper: eu(y) }, c.reset = !1, c.placement = c.options.placement, c.orderedModifiers.forEach(function(R) { return c.modifiersData[R.name] = Object.assign({}, R.data); }); for (var x = 0; x < c.orderedModifiers.length; x++) { if (c.reset === !0) { c.reset = !1, x = -1; continue; } var A = c.orderedModifiers[x], k = A.fn, E = A.options, T = E === void 0 ? {} : E, I = A.name; typeof k == "function" && (c = k({ state: c, options: T, name: I, instance: g }) || c); } } } }, update: j_(function() { return new Promise(function(h) { g.forceUpdate(), h(c); }); }), destroy: function() { d(), f = !0; } }; if (!wf(s, i)) return g; g.setOptions(l).then(function(h) { !f && l.onFirstUpdate && l.onFirstUpdate(h); }); function v() { c.orderedModifiers.forEach(function(h) { var m = h.name, y = h.options, x = y === void 0 ? {} : y, A = h.effect; if (typeof A == "function") { var k = A({ state: c, name: m, instance: g, options: x }), E = function() { }; u.push(k || E); } }); } function d() { u.forEach(function(h) { return h(); }), u = []; } return g; }; } au(); var z_ = [Yv, eg, Zv, qv]; au({ defaultModifiers: z_ }); var H_ = [Yv, eg, Zv, qv, I_, __, $_, c_, x_], U_ = au({ defaultModifiers: H_ }); const q_ = (e, t, n = {}) => { const r = { name: "updateState", enabled: !0, phase: "write", fn: ({ state: l }) => { const c = K_(l); Object.assign(s.value, c); }, requires: ["computeStyles"] }, o = w(() => { const { onFirstUpdate: l, placement: c, strategy: u, modifiers: f } = p(n); return { onFirstUpdate: l, placement: c || "bottom", strategy: u || "absolute", modifiers: [ ...f || [], r, { name: "applyStyles", enabled: !1 } ] }; }), a = Qr(), s = $({ styles: { popper: { position: p(o).strategy, left: "0", top: "0" }, arrow: { position: "absolute" } }, attributes: {} }), i = () => { a.value && (a.value.destroy(), a.value = void 0); }; return oe(o, (l) => { const c = p(a); c && c.setOptions(l); }, { deep: !0 }), oe([e, t], ([l, c]) => { i(), !(!l || !c) && (a.value = U_(l, c, p(o))); }), bt(() => { i(); }), { state: w(() => { var l; return { ...((l = p(a)) == null ? void 0 : l.state) || {} }; }), styles: w(() => p(s).styles), attributes: w(() => p(s).attributes), update: () => { var l; return (l = p(a)) == null ? void 0 : l.update(); }, forceUpdate: () => { var l; return (l = p(a)) == null ? void 0 : l.forceUpdate(); }, instanceRef: w(() => p(a)) }; }; function K_(e) { const t = Object.keys(e.elements), n = oi(t.map((o) => [o, e.styles[o] || {}])), r = oi(t.map((o) => [o, e.attributes[o]])); return { styles: n, attributes: r }; } const W_ = (e) => { if (!e) return { onClick: mr, onMousedown: mr, onMouseup: mr }; let t = !1, n = !1; return { onClick: (s) => { t && n && e(s), t = n = !1; }, onMousedown: (s) => { t = s.target === s.currentTarget; }, onMouseup: (s) => { n = s.target === s.currentTarget; } }; }; function Cf() { let e; const t = (r, o) => { n(), e = window.setTimeout(r, o); }, n = () => window.clearTimeout(e); return Ua(() => n()), { registerTimeout: t, cancelTimeout: n }; } const ic = { prefix: Math.floor(Math.random() * 1e4), current: 0 }, G_ = Symbol("elIdInjection"), tg = () => We() ? ce(G_, ic) : ic, ar = (e) => { const t = tg(); !Qe && t === ic && yt("IdInjection", `Looks like you are using server rendering, you must provide a id provider to ensure the hydration process to be succeed usage: app.provide(ID_INJECTION_KEY, { prefix: number, current: number, })`); const n = Yc(); return w(() => p(e) || `${n.value}-id-${t.prefix}-${t.current++}`); }; let Ao = []; const Sf = (e) => { const t = e; t.key === Ve.esc && Ao.forEach((n) => n(t)); }, J_ = (e) => { Ye(() => { Ao.length === 0 && document.addEventListener("keydown", Sf), Qe && Ao.push(e); }), bt(() => { Ao = Ao.filter((t) => t !== e), Ao.length === 0 && Qe && document.removeEventListener("keydown", Sf); }); }; let kf; const ng = () => { const e = Yc(), t = tg(), n = w(() => `${e.value}-popper-container-${t.prefix}`), r = w(() => `#${n.value}`); return { id: n, selector: r }; }, Z_ = (e) => { const t = document.createElement("div"); return t.id = e, document.body.appendChild(t), t; }, Y_ = () => { const { id: e, selector: t } = ng(); return $h(() => { Qe && (process.env.NODE_ENV === "test" || !kf || !document.body.querySelector(t.value)) && (kf = Z_(e.value)); }), { id: e, selector: t }; }, X_ = we({ showAfter: { type: Number, default: 0 }, hideAfter: { type: Number, default: 200 }, autoClose: { type: Number, default: 0 } }), Q_ = ({ showAfter: e, hideAfter: t, autoClose: n, open: r, close: o }) => { const { registerTimeout: a } = Cf(), { registerTimeout: s, cancelTimeout: i } = Cf(); return { onOpen: (u) => { a(() => { r(u); const f = p(n); je(f) && f > 0 && s(() => { o(u); }, f); }, p(e)); }, onClose: (u) => { i(), a(() => { o(u); }, p(t)); } }; }, rg = Symbol("elForwardRef"), eE = (e) => { qe(rg, { setForwardRef: (n) => { e.value = n; } }); }, tE = (e) => ({ mounted(t) { e(t); }, updated(t) { e(t); }, unmounted() { e(null); } }), _f = { current: 0 }, Ef = $(0), og = 2e3, xf = Symbol("elZIndexContextKey"), ag = Symbol("zIndexContextKey"), su = (e) => { const t = We() ? ce(xf, _f) : _f, n = e || (We() ? ce(ag, void 0) : void 0), r = w(() => { const s = p(n); return je(s) ? s : og; }), o = w(() => r.value + Ef.value), a = () => (t.current++, Ef.value = t.current, o.value); return !Qe && !ce(xf) && yt("ZIndexInjection", `Looks like you are using server rendering, you must provide a z-index provider to ensure the hydration process to be succeed usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`), { initialZIndex: r, currentZIndex: o, nextZIndex: a }; }; function nE(e) { let t; function n() { if (e.value == null) return; const { selectionStart: o, selectionEnd: a, value: s } = e.value; if (o == null || a == null) return; const i = s.slice(0, Math.max(0, o)), l = s.slice(Math.max(0, a)); t = { selectionStart: o, selectionEnd: a, value: s, beforeTxt: i, afterTxt: l }; } function r() { if (e.value == null || t == null) return; const { value: o } = e.value, { beforeTxt: a, afterTxt: s, selectionStart: i } = t; if (a == null || s == null || i == null) return; let l = o.length; if (o.endsWith(s)) l = o.length - s.length; else if (o.startsWith(a)) l = a.length; else { const c = a[i - 1], u = o.indexOf(c, i - 1); u !== -1 && (l = u + 1); } e.value.setSelectionRange(l, l); } return [n, r]; } const lr = $i({ type: String, values: Ri, required: !1 }), sg = Symbol("size"), ig = () => { const e = ce(sg, {}); return w(() => p(e.size) || ""); }; function lg(e, { beforeFocus: t, afterFocus: n, beforeBlur: r, afterBlur: o } = {}) { const a = We(), { emit: s } = a, i = Qr(), l = $(!1), c = (g) => { ut(t) && t(g) || l.value || (l.value = !0, s("focus", g), n == null || n()); }, u = (g) => { var v; ut(r) && r(g) || g.relatedTarget && ((v = i.value) != null && v.contains(g.relatedTarget)) || (l.value = !1, s("blur", g), o == null || o()); }, f = () => { var g, v; (g = i.value) != null && g.contains(document.activeElement) && i.value !== document.activeElement || (v = e.value) == null || v.focus(); }; return oe(i, (g) => { g && g.setAttribute("tabindex", "-1"); }), vn(i, "focus", c, !0), vn(i, "blur", u, !0), vn(i, "click", f, !0), process.env.NODE_ENV === "test" && Ye(() => { const g = Rr(e.value) ? e.value : document.querySelector("input,textarea"); g && (vn(g, "focus", c, !0), vn(g, "blur", u, !0)); }), { isFocused: l, wrapperRef: i, handleFocus: c, handleBlur: u }; } function iu({ afterComposition: e, emit: t }) { const n = $(!1), r = (i) => { t == null || t("compositionstart", i), n.value = !0; }, o = (i) => { var l; t == null || t("compositionupdate", i); const c = (l = i.target) == null ? void 0 : l.value, u = c[c.length - 1] || ""; n.value = !Ak(u); }, a = (i) => { t == null || t("compositionend", i), n.value && (n.value = !1, Re(() => e(i))); }; return { isComposing: n, handleComposition: (i) => { i.type === "compositionend" ? a(i) : o(i); }, handleCompositionStart: r, handleCompositionUpdate: o, handleCompositionEnd: a }; } const cg = Symbol("emptyValuesContextKey"), rE = "use-empty-values", oE = ["", void 0, null], aE = void 0, lu = we({ emptyValues: Array, valueOnClear: { type: [String, Number, Boolean, Function], default: void 0, validator: (e) => ut(e) ? !e() : !e } }), ug = (e, t) => { const n = We() ? ce(cg, $({})) : $({}), r = w(() => e.emptyValues || n.value.emptyValues || oE), o = w(() => ut(e.valueOnClear) ? e.valueOnClear() : e.valueOnClear !== void 0 ? e.valueOnClear : ut(n.value.valueOnClear) ? n.value.valueOnClear() : n.value.valueOnClear !== void 0 ? n.value.valueOnClear : aE), a = (s) => r.value.includes(s); return r.value.includes(o.value) || yt(rE, "value-on-clear should be a value of empty-values"), { emptyValues: r, valueOnClear: o, isEmptyValue: a }; }, sE = we({ ariaLabel: String, ariaOrientation: { type: String, values: ["horizontal", "vertical", "undefined"] }, ariaControls: String }), Dr = (e) => $v(sE, e), dg = Symbol(), si = $(); function Li(e, t = void 0) { const n = We() ? ce(dg, si) : si; return e ? w(() => { var r, o; return (o = (r = n.value) == null ? void 0 : r[e]) != null ? o : t; }) : n; } function fg(e, t) { const n = Li(), r = be(e, w(() => { var i; return ((i = n.value) == null ? void 0 : i.namespace) || Ca; })), o = wn(w(() => { var i; return (i = n.value) == null ? void 0 : i.locale; })), a = su(w(() => { var i; return ((i = n.value) == null ? void 0 : i.zIndex) || og; })), s = w(() => { var i; return p(t) || ((i = n.value) == null ? void 0 : i.size) || ""; }); return pg(w(() => p(n) || {})), { ns: r, locale: o, zIndex: a, size: s }; } const pg = (e, t, n = !1) => { var r; const o = !!We(), a = o ? Li() : void 0, s = (r = void 0) != null ? r : o ? qe : void 0; if (!s) { yt("provideGlobalConfig", "provideGlobalConfig() can only be used inside setup()."); return; } const i = w(() => { const l = p(e); return a != null && a.value ? iE(a.value, l) : l; }); return s(dg, i), s(Vv, w(() => i.value.locale)), s(zv, w(() => i.value.namespace)), s(ag, w(() => i.value.zIndex)), s(sg, { size: w(() => i.value.size || "") }), s(cg, w(() => ({ emptyValues: i.value.emptyValues, valueOnClear: i.value.valueOnClear }))), (n || !si.value) && (si.value = i.value), i; }, iE = (e, t) => { const n = [.../* @__PURE__ */ new Set([...sf(e), ...sf(t)])], r = {}; for (const o of n) r[o] = t[o] !== void 0 ? t[o] : e[o]; return r; }, lE = we({ a11y: { type: Boolean, default: !0 }, locale: { type: ue(Object) }, size: lr, button: { type: ue(Object) }, experimentalFeatures: { type: ue(Object) }, keyboardNavigation: { type: Boolean, default: !0 }, message: { type: ue(Object) }, zIndex: Number, namespace: { type: String, default: "el" }, ...lu }), jn = {}; K({ name: "ElConfigProvider", props: lE, setup(e, { slots: t }) { oe(() => e.message, (r) => { Object.assign(jn, r ?? {}); }, { immediate: !0, deep: !0 }); const n = pg(e); return () => ee(t, "default", { config: n == null ? void 0 : n.value }); } }); var ye = (e, t) => { const n = e.__vccOpts || e; for (const [r, o] of t) n[r] = o; return n; }; const cE = we({ size: { type: ue([Number, String]) }, color: { type: String } }), uE = K({ name: "ElIcon", inheritAttrs: !1 }), dE = /* @__PURE__ */ K({ ...uE, props: cE, setup(e) { const t = e, n = be("icon"), r = w(() => { const { size: o, color: a } = t; return !o && !a ? {} : { fontSize: gr(o) ? void 0 : yr(o), "--color": a }; }); return (o, a) => (C(), F("i", mt({ class: p(n).b(), style: p(r) }, o.$attrs), [ ee(o.$slots, "default") ], 16)); } }); var fE = /* @__PURE__ */ ye(dE, [["__file", "icon.vue"]]); const He = vt(fE), cu = Symbol("formContextKey"), ii = Symbol("formItemContextKey"), wr = (e, t = {}) => { const n = $(void 0), r = t.prop ? n : Hv("size"), o = t.global ? n : ig(), a = t.form ? { size: void 0 } : ce(cu, void 0), s = t.formItem ? { size: void 0 } : ce(ii, void 0); return w(() => r.value || p(e) || (s == null ? void 0 : s.size) || (a == null ? void 0 : a.size) || o.value || ""); }, Ya = (e) => { const t = Hv("disabled"), n = ce(cu, void 0); return w(() => t.value || p(e) || (n == null ? void 0 : n.disabled) || !1); }, Mr = () => { const e = ce(cu, void 0), t = ce(ii, void 0); return { form: e, formItem: t }; }, Xa = (e, { formItemContext: t, disableIdGeneration: n, disableIdManagement: r }) => { n || (n = $(!1)), r || (r = $(!1)); const o = $(); let a; const s = w(() => { var i; return !!(!(e.label || e.ariaLabel) && t && t.inputIds && ((i = t.inputIds) == null ? void 0 : i.length) <= 1); }); return Ye(() => { a = oe([ct(e, "id"), n], ([i, l]) => { const c = i ?? (l ? void 0 : ar().value); c !== o.value && (t != null && t.removeInputId && (o.value && t.removeInputId(o.value), !(r != null && r.value) && !l && c && t.addInputId(c)), o.value = c); }, { immediate: !0 }); }), _b(() => { a && a(), t != null && t.removeInputId && o.value && t.removeInputId(o.value); }), { isLabeledByFormItem: s, inputId: o }; }; let Bn; const pE = ` height:0 !important; visibility:hidden !important; ${l1() ? "" : "overflow:hidden !important;"} position:absolute !important; z-index:-1000 !important; top:0 !important; right:0 !important; `, hE = [ "letter-spacing", "line-height", "padding-top", "padding-bottom", "font-family", "font-weight", "font-size", "text-rendering", "text-transform", "width", "text-indent", "padding-left", "padding-right", "border-width", "box-sizing" ]; function vE(e) { const t = window.getComputedStyle(e), n = t.getPropertyValue("box-sizing"), r = Number.parseFloat(t.getPropertyValue("padding-bottom")) + Number.parseFloat(t.getPropertyValue("padding-top")), o = Number.parseFloat(t.getPropertyValue("border-bottom-width")) + Number.parseFloat(t.getPropertyValue("border-top-width")); return { contextStyle: hE.map((s) => `${s}:${t.getPropertyValue(s)}`).join(";"), paddingSize: r, borderSize: o, boxSizing: n }; } function Tf(e, t = 1, n) { var r; Bn || (Bn = document.createElement("textarea"), document.body.appendChild(Bn)); const { paddingSize: o, borderSize: a, boxSizing: s, contextStyle: i } = vE(e); Bn.setAttribute("style", `${i};${pE}`), Bn.value = e.value || e.placeholder || ""; let l = Bn.scrollHeight; const c = {}; s === "border-box" ? l = l + a : s === "content-box" && (l = l - o), Bn.value = ""; const u = Bn.scrollHeight - o; if (je(t)) { let f = u * t; s === "border-box" && (f = f + o + a), l = Math.max(f, l), c.minHeight = `${f}px`; } if (je(n)) { let f = u * n; s === "border-box" && (f = f + o + a), l = Math.min(f, l); } return c.height = `${l}px`, (r = Bn.parentNode) == null || r.removeChild(Bn), Bn = void 0, c; } const gE = we({ id: { type: String, default: void 0 }, size: lr, disabled: Boolean, modelValue: { type: ue([ String, Number, Object ]), default: "" }, maxlength: { type: [String, Number] }, minlength: { type: [String, Number] }, type: { type: String, default: "text" }, resize: { type: String, values: ["none", "both", "horizontal", "vertical"] }, autosize: { type: ue([Boolean, Object]), default: !1 }, autocomplete: { type: String, default: "off" }, formatter: { type: Function }, parser: { type: Function }, placeholder: { type: String }, form: { type: String }, readonly: Boolean, clearable: Boolean, showPassword: Boolean, showWordLimit: Boolean, suffixIcon: { type: yn }, prefixIcon: { type: yn }, containerRole: { type: String, default: void 0 }, tabindex: { type: [String, Number], default: 0 }, validateEvent: { type: Boolean, default: !0 }, inputStyle: { type: ue([Object, Array, String]), default: () => vr({}) }, autofocus: Boolean, rows: { type: Number, default: 2 }, ...Dr(["ariaLabel"]) }), mE = { [ft]: (e) => jt(e), input: (e) => jt(e), change: (e) => jt(e), focus: (e) => e instanceof FocusEvent, blur: (e) => e instanceof FocusEvent, clear: () => !0, mouseleave: (e) => e instanceof MouseEvent, mouseenter: (e) => e instanceof MouseEvent, keydown: (e) => e instanceof Event, compositionstart: (e) => e instanceof CompositionEvent, compositionupdate: (e) => e instanceof CompositionEvent, compositionend: (e) => e instanceof CompositionEvent }, yE = K({ name: "ElInput", inheritAttrs: !1 }), bE = /* @__PURE__ */ K({ ...yE, props: gE, emits: mE, setup(e, { expose: t, emit: n }) { const r = e, o = Rh(), a = ho(), s = w(() => { const te = {}; return r.containerRole === "combobox" && (te["aria-haspopup"] = o["aria-haspopup"], te["aria-owns"] = o["aria-owns"], te["aria-expanded"] = o["aria-expanded"]), te; }), i = w(() => [ r.type === "textarea" ? m.b() : h.b(), h.m(v.value), h.is("disabled", d.value), h.is("exceed", at.value), { [h.b("group")]: a.prepend || a.append, [h.m("prefix")]: a.prefix || r.prefixIcon, [h.m("suffix")]: a.suffix || r.suffixIcon || r.clearable || r.showPassword, [h.bm("suffix", "password-clear")]: me.value && Ne.value, [h.b("hidden")]: r.type === "hidden" }, o.class ]), l = w(() => [ h.e("wrapper"), h.is("focus", D.value) ]), c = $k({ excludeKeys: w(() => Object.keys(s.value)) }), { form: u, formItem: f } = Mr(), { inputId: g } = Xa(r, { formItemContext: f }), v = wr(), d = Ya(), h = be("input"), m = be("textarea"), y = Qr(), x = Qr(), A = $(!1), k = $(!1), E = $(), T = Qr(r.inputStyle), I = w(() => y.value || x.value), { wrapperRef: R, isFocused: D, handleFocus: W, handleBlur: z } = lg(I, { beforeFocus() { return d.value; }, afterBlur() { var te; r.validateEvent && ((te = f == null ? void 0 : f.validate) == null || te.call(f, "blur").catch(($e) => yt($e))); } }), U = w(() => { var te; return (te = u == null ? void 0 : u.statusIcon) != null ? te : !1; }), X = w(() => (f == null ? void 0 : f.validateState) || ""), de = w(() => X.value && Mv[X.value]), re = w(() => k.value ? Jh : Lb), L = w(() => [ o.style ]), Z = w(() => [ r.inputStyle, T.value, { resize: r.resize } ]), ve = w(() => Wa(r.modelValue) ? "" : String(r.modelValue)), me = w(() => r.clearable && !d.value && !r.readonly && !!ve.value && (D.value || A.value)), Ne = w(() => r.showPassword && !d.value && !r.readonly && !!ve.value && (!!ve.value || D.value)), _e = w(() => r.showWordLimit && !!r.maxlength && (r.type === "text" || r.type === "textarea") && !d.value && !r.readonly && !r.showPassword), ze = w(() => ve.value.length), at = w(() => !!_e.value && ze.value > Number(r.maxlength)), Ge = w(() => !!a.suffix || !!r.suffixIcon || me.value || r.showPassword || _e.value || !!X.value && U.value), [Le, Ke] = nE(y); Vn(x, (te) => { if (Cn(), !_e.value || r.resize !== "both") return; const $e = te[0], { width: it } = $e.contentRect; E.value = { right: `calc(100% - ${it + 15 + 6}px)` }; }); const nt = () => { const { type: te, autosize: $e } = r; if (!(!Qe || te !== "textarea" || !x.value)) if ($e) { const it = At($e) ? $e.minRows : void 0, Ht = At($e) ? $e.maxRows : void 0, un = Tf(x.value, it, Ht); T.value = { overflowY: "hidden", ...un }, Re(() => { x.value.offsetHeight, T.value = un; }); } else T.value = { minHeight: Tf(x.value).minHeight }; }, Cn = ((te) => { let $e = !1; return () => { var it; if ($e || !r.autosize) return; ((it = x.value) == null ? void 0 : it.offsetParent) === null || (te(), $e = !0); }; })(nt), Rt = () => { const te = I.value, $e = r.formatter ? r.formatter(ve.value) : ve.value; !te || te.value === $e || (te.value = $e); }, Tt = async (te) => { Le(); let { value: $e } = te.target; if (r.formatter && ($e = r.parser ? r.parser($e) : $e), !gt.value) { if ($e === ve.value) { Rt(); return; } n(ft, $e), n("input", $e), await Re(), Rt(), Ke(); } }, st = (te) => { n("change", te.target.value); }, { isComposing: gt, handleCompositionStart: Wt, handleCompositionUpdate: Gt, handleCompositionEnd: Et } = iu({ emit: n, afterComposition: Tt }), Jt = () => { k.value = !k.value, Nt(); }, Nt = async () => { var te; await Re(), (te = I.value) == null || te.focus(); }, Sn = () => { var te; return (te = I.value) == null ? void 0 : te.blur(); }, Je = (te) => { A.value = !1, n("mouseleave", te); }, Ot = (te) => { A.value = !0, n("mouseenter", te); }, zt = (te) => { n("keydown", te); }, cn = () => { var te; (te = I.value) == null || te.select(); }, It = () => { n(ft, ""), n("change", ""), n("clear"), n("input", ""); }; return oe(() => r.modelValue, () => { var te; Re(() => nt()), r.validateEvent && ((te = f == null ? void 0 : f.validate) == null || te.call(f, "change").catch(($e) => yt($e))); }), oe(ve, () => Rt()), oe(() => r.type, async () => { await Re(), Rt(), nt(); }), Ye(() => { !r.formatter && r.parser && yt("ElInput", "If you set the parser, you also need to set the formatter."), Rt(), Re(nt); }), t({ input: y, textarea: x, ref: I, textareaStyle: Z, autosize: ct(r, "autosize"), isComposing: gt, focus: Nt, blur: Sn, select: cn, clear: It, resizeTextarea: nt }), (te, $e) => (C(), F("div", mt(p(s), { class: [ p(i), { [p(h).bm("group", "append")]: te.$slots.append, [p(h).bm("group", "prepend")]: te.$slots.prepend } ], style: p(L), role: te.containerRole, onMouseenter: Ot, onMouseleave: Je }), [ G(" input "), te.type !== "textarea" ? (C(), F(Ie, { key: 0 }, [ G(" prepend slot "), te.$slots.prepend ? (C(), F("div", { key: 0, class: N(p(h).be("group", "prepend")) }, [ ee(te.$slots, "prepend") ], 2)) : G("v-if", !0), M("div", { ref_key: "wrapperRef", ref: R, class: N(p(l)) }, [ G(" prefix slot "), te.$slots.prefix || te.prefixIcon ? (C(), F("span", { key: 0, class: N(p(h).e("prefix")) }, [ M("span", { class: N(p(h).e("prefix-inner")) }, [ ee(te.$slots, "prefix"), te.prefixIcon ? (C(), J(p(He), { key: 0, class: N(p(h).e("icon")) }, { default: P(() => [ (C(), J(pt(te.prefixIcon))) ]), _: 1 }, 8, ["class"])) : G("v-if", !0) ], 2) ], 2)) : G("v-if", !0), M("input", mt({ id: p(g), ref_key: "input", ref: y, class: p(h).e("inner") }, p(c), { minlength: te.minlength, maxlength: te.maxlength, type: te.showPassword ? k.value ? "text" : "password" : te.type, disabled: p(d), readonly: te.readonly, autocomplete: te.autocomplete, tabindex: te.tabindex, "aria-label": te.ariaLabel, placeholder: te.placeholder, style: te.inputStyle, form: te.form, autofocus: te.autofocus, onCompositionstart: p(Wt), onCompositionupdate: p(Gt), onCompositionend: p(Et), onInput: Tt, onChange: st, onKeydown: zt }), null, 16, ["id", "minlength", "maxlength", "type", "disabled", "readonly", "autocomplete", "tabindex", "aria-label", "placeholder", "form", "autofocus", "onCompositionstart", "onCompositionupdate", "onCompositionend"]), G(" suffix slot "), p(Ge) ? (C(), F("span", { key: 1, class: N(p(h).e("suffix")) }, [ M("span", { class: N(p(h).e("suffix-inner")) }, [ !p(me) || !p(Ne) || !p(_e) ? (C(), F(Ie, { key: 0 }, [ ee(te.$slots, "suffix"), te.suffixIcon ? (C(), J(p(He), { key: 0, class: N(p(h).e("icon")) }, { default: P(() => [ (C(), J(pt(te.suffixIcon))) ]), _: 1 }, 8, ["class"])) : G("v-if", !0) ], 64)) : G("v-if", !0), p(me) ? (C(), J(p(He), { key: 1, class: N([p(h).e("icon"), p(h).e("clear")]), onMousedown: Be(p(mr), ["prevent"]), onClick: It }, { default: P(() => [ V(p(ki)) ]), _: 1 }, 8, ["class", "onMousedown"])) : G("v-if", !0), p(Ne) ? (C(), J(p(He), { key: 2, class: N([p(h).e("icon"), p(h).e("password")]), onClick: Jt }, { default: P(() => [ (C(), J(pt(p(re)))) ]), _: 1 }, 8, ["class"])) : G("v-if", !0), p(_e) ? (C(), F("span", { key: 3, class: N(p(h).e("count")) }, [ M("span", { class: N(p(h).e("count-inner")) }, se(p(ze)) + " / " + se(te.maxlength), 3) ], 2)) : G("v-if", !0), p(X) && p(de) && p(U) ? (C(), J(p(He), { key: 4, class: N([ p(h).e("icon"), p(h).e("validateIcon"), p(h).is("loading", p(X) === "validating") ]) }, { default: P(() => [ (C(), J(pt(p(de)))) ]), _: 1 }, 8, ["class"])) : G("v-if", !0) ], 2) ], 2)) : G("v-if", !0) ], 2), G(" append slot "), te.$slots.append ? (C(), F("div", { key: 1, class: N(p(h).be("group", "append")) }, [ ee(te.$slots, "append") ], 2)) : G("v-if", !0) ], 64)) : (C(), F(Ie, { key: 1 }, [ G(" textarea "), M("textarea", mt({ id: p(g), ref_key: "textarea", ref: x, class: [p(m).e("inner"), p(h).is("focus", p(D))] }, p(c), { minlength: te.minlength, maxlength: te.maxlength, tabindex: te.tabindex, disabled: p(d), readonly: te.readonly, autocomplete: te.autocomplete, style: p(Z), "aria-label": te.ariaLabel, placeholder: te.placeholder, form: te.form, autofocus: te.autofocus, rows: te.rows, onCompositionstart: p(Wt), onCompositionupdate: p(Gt), onCompositionend: p(Et), onInput: Tt, onFocus: p(W), onBlur: p(z), onChange: st, onKeydown: zt }), null, 16, ["id", "minlength", "maxlength", "tabindex", "disabled", "readonly", "autocomplete", "aria-label", "placeholder", "form", "autofocus", "rows", "onCompositionstart", "onCompositionupdate", "onCompositionend", "onFocus", "onBlur"]), p(_e) ? (C(), F("span", { key: 0, style: Ue(E.value), class: N(p(h).e("count")) }, se(p(ze)) + " / " + se(te.maxlength), 7)) : G("v-if", !0) ], 64)) ], 16, ["role"])); } }); var wE = /* @__PURE__ */ ye(bE, [["__file", "input.vue"]]); const Go = vt(wE), Eo = 4, CE = { 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" } }, SE = ({ move: e, size: t, bar: n }) => ({ [n.size]: t, transform: `translate${n.axis}(${e}%)` }), uu = Symbol("scrollbarContextKey"), kE = we({ vertical: Boolean, size: String, move: Number, ratio: { type: Number, required: !0 }, always: Boolean }), _E = "Thumb", EE = /* @__PURE__ */ K({ __name: "thumb", props: kE, setup(e) { const t = e, n = ce(uu), r = be("scrollbar"); n || Nv(_E, "can not inject scrollbar context"); const o = $(), a = $(), s = $({}), i = $(!1); let l = !1, c = !1, u = Qe ? document.onselectstart : null; const f = w(() => CE[t.vertical ? "vertical" : "horizontal"]), g = w(() => SE({ size: t.size, move: t.move, bar: f.value })), v = w(() => o.value[f.value.offset] ** 2 / n.wrapElement[f.value.scrollSize] / t.ratio / a.value[f.value.offset]), d = (T) => { var I; if (T.stopPropagation(), T.ctrlKey || [1, 2].includes(T.button)) return; (I = window.getSelection()) == null || I.removeAllRanges(), m(T); const R = T.currentTarget; R && (s.value[f.value.axis] = R[f.value.offset] - (T[f.value.client] - R.getBoundingClientRect()[f.value.direction])); }, h = (T) => { if (!a.value || !o.value || !n.wrapElement) return; const I = Math.abs(T.target.getBoundingClientRect()[f.value.direction] - T[f.value.client]), R = a.value[f.value.offset] / 2, D = (I - R) * 100 * v.value / o.value[f.value.offset]; n.wrapElement[f.value.scroll] = D * n.wrapElement[f.value.scrollSize] / 100; }, m = (T) => { T.stopImmediatePropagation(), l = !0, document.addEventListener("mousemove", y), document.addEventListener("mouseup", x), u = document.onselectstart, document.onselectstart = () => !1; }, y = (T) => { if (!o.value || !a.value || l === !1) return; const I = s.value[f.value.axis]; if (!I) return; const R = (o.value.getBoundingClientRect()[f.value.direction] - T[f.value.client]) * -1, D = a.value[f.value.offset] - I, W = (R - D) * 100 * v.value / o.value[f.value.offset]; n.wrapElement[f.value.scroll] = W * n.wrapElement[f.value.scrollSize] / 100; }, x = () => { l = !1, s.value[f.value.axis] = 0, document.removeEventListener("mousemove", y), document.removeEventListener("mouseup", x), E(), c && (i.value = !1); }, A = () => { c = !1, i.value = !!t.size; }, k = () => { c = !0, i.value = l; }; bt(() => { E(), document.removeEventListener("mouseup", x); }); const E = () => { document.onselectstart !== u && (document.onselectstart = u); }; return vn(ct(n, "scrollbarElement"), "mousemove", A), vn(ct(n, "scrollbarElement"), "mouseleave", k), (T, I) => (C(), J(ir, { name: p(r).b("fade"), persisted: "" }, { default: P(() => [ xe(M("div", { ref_key: "instance", ref: o, class: N([p(r).e("bar"), p(r).is(p(f).key)]), onMousedown: h }, [ M("div", { ref_key: "thumb", ref: a, class: N(p(r).e("thumb")), style: Ue(p(g)), onMousedown: d }, null, 38) ], 34), [ [ht, T.always || i.value] ]) ]), _: 1 }, 8, ["name"])); } }); var Of = /* @__PURE__ */ ye(EE, [["__file", "thumb.vue"]]); const xE = we({ always: { type: Boolean, default: !0 }, minSize: { type: Number, required: !0 } }), TE = /* @__PURE__ */ K({ __name: "bar", props: xE, setup(e, { expose: t }) { const n = e, r = ce(uu), o = $(0), a = $(0), s = $(""), i = $(""), l = $(1), c = $(1); return t({ handleScroll: (g) => { if (g) { const v = g.offsetHeight - Eo, d = g.offsetWidth - Eo; a.value = g.scrollTop * 100 / v * l.value, o.value = g.scrollLeft * 100 / d * c.value; } }, update: () => { const g = r == null ? void 0 : r.wrapElement; if (!g) return; const v = g.offsetHeight - Eo, d = g.offsetWidth - Eo, h = v ** 2 / g.scrollHeight, m = d ** 2 / g.scrollWidth, y = Math.max(h, n.minSize), x = Math.max(m, n.minSize); l.value = h / (v - h) / (y / (v - y)), c.value = m / (d - m) / (x / (d - x)), i.value = y + Eo < v ? `${y}px` : "", s.value = x + Eo < d ? `${x}px` : ""; } }), (g, v) => (C(), F(Ie, null, [ V(Of, { move: o.value, ratio: c.value, size: s.value, always: g.always }, null, 8, ["move", "ratio", "size", "always"]), V(Of, { move: a.value, ratio: l.value, size: i.value, vertical: "", always: g.always }, null, 8, ["move", "ratio", "size", "always"]) ], 64)); } }); var OE = /* @__PURE__ */ ye(TE, [["__file", "bar.vue"]]); const IE = we({ height: { type: [String, Number], default: "" }, maxHeight: { type: [String, Number], default: "" }, native: { type: Boolean, default: !1 }, wrapStyle: { type: ue([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, ...Dr(["ariaLabel", "ariaOrientation"]) }), AE = { scroll: ({ scrollTop: e, scrollLeft: t }) => [e, t].every(je) }, lc = "ElScrollbar", FE = K({ name: lc }), PE = /* @__PURE__ */ K({ ...FE, props: IE, emits: AE, setup(e, { expose: t, emit: n }) { const r = e, o = be("scrollbar"); let a, s, i = 0, l = 0; const c = $(), u = $(), f = $(), g = $(), v = w(() => { const E = {}; return r.height && (E.height = yr(r.height)), r.maxHeight && (E.maxHeight = yr(r.maxHeight)), [r.wrapStyle, E]; }), d = w(() => [ r.wrapClass, o.e("wrap"), { [o.em("wrap", "hidden-default")]: !r.native } ]), h = w(() => [o.e("view"), r.viewClass]), m = () => { var E; u.value && ((E = g.value) == null || E.handleScroll(u.value), i = u.value.scrollTop, l = u.value.scrollLeft, n("scroll", { scrollTop: u.value.scrollTop, scrollLeft: u.value.scrollLeft })); }; function y(E, T) { At(E) ? u.value.scrollTo(E) : je(E) && je(T) && u.value.scrollTo(E, T); } const x = (E) => { if (!je(E)) { yt(lc, "value must be a number"); return; } u.value.scrollTop = E; }, A = (E) => { if (!je(E)) { yt(lc, "value must be a number"); return; } u.value.scrollLeft = E; }, k = () => { var E; (E = g.value) == null || E.update(); }; return oe(() => r.noresize, (E) => { E ? (a == null || a(), s == null || s()) : ({ stop: a } = Vn(f, k), s = vn("resize", k)); }, { immediate: !0 }), oe(() => [r.maxHeight, r.height], () => { r.native || Re(() => { var E; k(), u.value && ((E = g.value) == null || E.handleScroll(u.value)); }); }), qe(uu, mn({ scrollbarElement: c, wrapElement: u })), Eb(() => { u.value && (u.value.scrollTop = i, u.value.scrollLeft = l); }), Ye(() => { r.native || Re(() => { k(); }); }), Nh(() => k()), t({ wrapRef: u, update: k, scrollTo: y, setScrollTop: x, setScrollLeft: A, handleScroll: m }), (E, T) => (C(), F("div", { ref_key: "scrollbarRef", ref: c, class: N(p(o).b()) }, [ M("div", { ref_key: "wrapRef", ref: u, class: N(p(d)), style: Ue(p(v)), tabindex: E.tabindex, onScroll: m }, [ (C(), J(pt(E.tag), { id: E.id, ref_key: "resizeRef", ref: f, class: N(p(h)), style: Ue(E.viewStyle), role: E.role, "aria-label": E.ariaLabel, "aria-orientation": E.ariaOrientation }, { default: P(() => [ ee(E.$slots, "default") ]), _: 3 }, 8, ["id", "class", "style", "role", "aria-label", "aria-orientation"])) ], 46, ["tabindex"]), E.native ? G("v-if", !0) : (C(), J(OE, { key: 0, ref_key: "barRef", ref: g, always: E.always, "min-size": E.minSize }, null, 8, ["always", "min-size"])) ], 2)); } }); var $E = /* @__PURE__ */ ye(PE, [["__file", "scrollbar.vue"]]); const Bi = vt($E), du = Symbol("popper"), hg = Symbol("popperContent"), RE = [ "dialog", "grid", "group", "listbox", "menu", "navigation", "tooltip", "tree" ], vg = we({ role: { type: String, values: RE, default: "tooltip" } }), NE = K({ name: "ElPopper", inheritAttrs: !1 }), LE = /* @__PURE__ */ K({ ...NE, props: vg, setup(e, { expose: t }) { const n = e, r = $(), o = $(), a = $(), s = $(), i = w(() => n.role), l = { triggerRef: r, popperInstanceRef: o, contentRef: a, referenceRef: s, role: i }; return t(l), qe(du, l), (c, u) => ee(c.$slots, "default"); } }); var BE = /* @__PURE__ */ ye(LE, [["__file", "popper.vue"]]); const gg = we({ arrowOffset: { type: Number, default: 5 } }), DE = K({ name: "ElPopperArrow", inheritAttrs: !1 }), ME = /* @__PURE__ */ K({ ...DE, props: gg, setup(e, { expose: t }) { const n = e, r = be("popper"), { arrowOffset: o, arrowRef: a, arrowStyle: s } = ce(hg, void 0); return oe(() => n.arrowOffset, (i) => { o.value = i; }), bt(() => { a.value = void 0; }), t({ arrowRef: a }), (i, l) => (C(), F("span", { ref_key: "arrowRef", ref: a, class: N(p(r).e("arrow")), style: Ue(p(s)), "data-popper-arrow": "" }, null, 6)); } }); var jE = /* @__PURE__ */ ye(ME, [["__file", "arrow.vue"]]); const Il = "ElOnlyChild", mg = K({ name: Il, setup(e, { slots: t, attrs: n }) { var r; const o = ce(rg), a = tE((r = o == null ? void 0 : o.setForwardRef) != null ? r : mr); return () => { var s; const i = (s = t.default) == null ? void 0 : s.call(t, n); if (!i) return null; if (i.length > 1) return yt(Il, "requires exact only one valid child."), null; const l = yg(i); return l ? xe(Lh(l, n), [[a]]) : (yt(Il, "no valid child node found"), null); }; } }); function yg(e) { if (!e) return null; const t = e; for (const n of t) { if (At(n)) switch (n.type) { case Bh: continue; case Ci: case "svg": return If(n); case Ie: return yg(n.children); default: return n; } return If(n); } return null; } function If(e) { const t = be("only-child"); return V("span", { class: t.e("content") }, [e]); } const bg = we({ virtualRef: { type: ue(Object) }, virtualTriggering: Boolean, onMouseenter: { type: ue(Function) }, onMouseleave: { type: ue(Function) }, onClick: { type: ue(Function) }, onKeydown: { type: ue(Function) }, onFocus: { type: ue(Function) }, onBlur: { type: ue(Function) }, onContextmenu: { type: ue(Function) }, id: String, open: Boolean }), VE = K({ name: "ElPopperTrigger", inheritAttrs: !1 }), zE = /* @__PURE__ */ K({ ...VE, props: bg, setup(e, { expose: t }) { const n = e, { role: r, triggerRef: o } = ce(du, void 0); eE(o); const a = w(() => i.value ? n.id : void 0), s = w(() => { if (r && r.value === "tooltip") return n.open && n.id ? n.id : void 0; }), i = w(() => { if (r && r.value !== "tooltip") return r.value; }), l = w(() => i.value ? `${n.open}` : void 0); let c; const u = [ "onMouseenter", "onMouseleave", "onClick", "onKeydown", "onFocus", "onBlur", "onContextmenu" ]; return Ye(() => { oe(() => n.virtualRef, (f) => { f && (o.value = Qn(f)); }, { immediate: !0 }), oe(o, (f, g) => { c == null || c(), c = void 0, Rr(f) && (u.forEach((v) => { var d; const h = n[v]; h && (f.addEventListener(v.slice(2).toLowerCase(), h), (d = g == null ? void 0 : g.removeEventListener) == null || d.call(g, v.slice(2).toLowerCase(), h)); }), c = oe([a, s, i, l], (v) => { [ "aria-controls", "aria-describedby", "aria-haspopup", "aria-expanded" ].forEach((d, h) => { Wa(v[h]) ? f.removeAttribute(d) : f.setAttribute(d, v[h]); }); }, { immediate: !0 })), Rr(g) && [ "aria-controls", "aria-describedby", "aria-haspopup", "aria-expanded" ].forEach((v) => g.removeAttribute(v)); }, { immediate: !0 }); }), bt(() => { if (c == null || c(), c = void 0, o.value && Rr(o.value)) { const f = o.value; u.forEach((g) => { const v = n[g]; v && f.removeEventListener(g.slice(2).toLowerCase(), v); }), o.value = void 0; } }), t({ triggerRef: o }), (f, g) => f.virtualTriggering ? G("v-if", !0) : (C(), J(p(mg), mt({ key: 0 }, f.$attrs, { "aria-controls": p(a), "aria-describedby": p(s), "aria-expanded": p(l), "aria-haspopup": p(i) }), { default: P(() => [ ee(f.$slots, "default") ]), _: 3 }, 16, ["aria-controls", "aria-describedby", "aria-expanded", "aria-haspopup"])); } }); var HE = /* @__PURE__ */ ye(zE, [["__file", "trigger.vue"]]); const Al = "focus-trap.focus-after-trapped", Fl = "focus-trap.focus-after-released", UE = "focus-trap.focusout-prevented", Af = { cancelable: !0, bubbles: !1 }, qE = { cancelable: !0, bubbles: !1 }, Ff = "focusAfterTrapped", Pf = "focusAfterReleased", wg = Symbol("elFocusTrap"), fu = $(), Di = $(0), pu = $(0); let ws = 0; const Cg = (e) => { const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, { acceptNode: (r) => { const o = r.tagName === "INPUT" && r.type === "hidden"; return r.disabled || r.hidden || o ? NodeFilter.FILTER_SKIP : r.tabIndex >= 0 || r === document.activeElement ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP; } }); for (; n.nextNode(); ) t.push(n.currentNode); return t; }, $f = (e, t) => { for (const n of e) if (!KE(n, t)) return n; }, KE = (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; }, WE = (e) => { const t = Cg(e), n = $f(t, e), r = $f(t.reverse(), e); return [n, r]; }, GE = (e) => e instanceof HTMLInputElement && "select" in e, Ir = (e, t) => { if (e && e.focus) { const n = document.activeElement; e.focus({ preventScroll: !0 }), pu.value = window.performance.now(), e !== n && GE(e) && t && e.select(); } }; function Rf(e, t) { const n = [...e], r = e.indexOf(t); return r !== -1 && n.splice(r, 1), n; } const JE = () => { let e = []; return { push: (r) => { const o = e[0]; o && r !== o && o.pause(), e = Rf(e, r), e.unshift(r); }, remove: (r) => { var o, a; e = Rf(e, r), (a = (o = e[0]) == null ? void 0 : o.resume) == null || a.call(o); } }; }, ZE = (e, t = !1) => { const n = document.activeElement; for (const r of e) if (Ir(r, t), document.activeElement !== n) return; }, Nf = JE(), YE = () => Di.value > pu.value, Cs = () => { fu.value = "pointer", Di.value = window.performance.now(); }, Lf = () => { fu.value = "keyboard", Di.value = window.performance.now(); }, XE = () => (Ye(() => { ws === 0 && (document.addEventListener("mousedown", Cs), document.addEventListener("touchstart", Cs), document.addEventListener("keydown", Lf)), ws++; }), bt(() => { ws--, ws <= 0 && (document.removeEventListener("mousedown", Cs), document.removeEventListener("touchstart", Cs), document.removeEventListener("keydown", Lf)); }), { focusReason: fu, lastUserFocusTimestamp: Di, lastAutomatedFocusTimestamp: pu }), Ss = (e) => new CustomEvent(UE, { ...qE, detail: e }), QE = K({ name: "ElFocusTrap", inheritAttrs: !1, props: { loop: Boolean, trapped: Boolean, focusTrapEl: Object, focusStartEl: { type: [Object, String], default: "first" } }, emits: [ Ff, Pf, "focusin", "focusout", "focusout-prevented", "release-requested" ], setup(e, { emit: t }) { const n = $(); let r, o; const { focusReason: a } = XE(); J_((d) => { e.trapped && !s.paused && t("release-requested", d); }); const s = { paused: !1, pause() { this.paused = !0; }, resume() { this.paused = !1; } }, i = (d) => { if (!e.loop && !e.trapped || s.paused) return; const { key: h, altKey: m, ctrlKey: y, metaKey: x, currentTarget: A, shiftKey: k } = d, { loop: E } = e, T = h === Ve.tab && !m && !y && !x, I = document.activeElement; if (T && I) { const R = A, [D, W] = WE(R); if (D && W) { if (!k && I === W) { const U = Ss({ focusReason: a.value }); t("focusout-prevented", U), U.defaultPrevented || (d.preventDefault(), E && Ir(D, !0)); } else if (k && [D, R].includes(I)) { const U = Ss({ focusReason: a.value }); t("focusout-prevented", U), U.defaultPrevented || (d.preventDefault(), E && Ir(W, !0)); } } else if (I === R) { const U = Ss({ focusReason: a.value }); t("focusout-prevented", U), U.defaultPrevented || d.preventDefault(); } } }; qe(wg, { focusTrapRef: n, onKeydown: i }), oe(() => e.focusTrapEl, (d) => { d && (n.value = d); }, { immediate: !0 }), oe([n], ([d], [h]) => { d && (d.addEventListener("keydown", i), d.addEventListener("focusin", u), d.addEventListener("focusout", f)), h && (h.removeEventListener("keydown", i), h.removeEventListener("focusin", u), h.removeEventListener("focusout", f)); }); const l = (d) => { t(Ff, d); }, c = (d) => t(Pf, d), u = (d) => { const h = p(n); if (!h) return; const m = d.target, y = d.relatedTarget, x = m && h.contains(m); e.trapped || y && h.contains(y) || (r = y), x && t("focusin", d), !s.paused && e.trapped && (x ? o = m : Ir(o, !0)); }, f = (d) => { const h = p(n); if (!(s.paused || !h)) if (e.trapped) { const m = d.relatedTarget; !Wa(m) && !h.contains(m) && setTimeout(() => { if (!s.paused && e.trapped) { const y = Ss({ focusReason: a.value }); t("focusout-prevented", y), y.defaultPrevented || Ir(o, !0); } }, 0); } else { const m = d.target; m && h.contains(m) || t("focusout", d); } }; async function g() { await Re(); const d = p(n); if (d) { Nf.push(s); const h = d.contains(document.activeElement) ? r : document.activeElement; if (r = h, !d.contains(h)) { const y = new Event(Al, Af); d.addEventListener(Al, l), d.dispatchEvent(y), y.defaultPrevented || Re(() => { let x = e.focusStartEl; jt(x) || (Ir(x), document.activeElement !== x && (x = "first")), x === "first" && ZE(Cg(d), !0), (document.activeElement === h || x === "container") && Ir(d); }); } } } function v() { const d = p(n); if (d) { d.removeEventListener(Al, l); const h = new CustomEvent(Fl, { ...Af, detail: { focusReason: a.value } }); d.addEventListener(Fl, c), d.dispatchEvent(h), !h.defaultPrevented && (a.value == "keyboard" || !YE() || d.contains(document.activeElement)) && Ir(r ?? document.body), d.removeEventListener(Fl, c), Nf.remove(s); } } return Ye(() => { e.trapped && g(), oe(() => e.trapped, (d) => { d ? g() : v(); }); }), bt(() => { e.trapped && v(), n.value && (n.value.removeEventListener("keydown", i), n.value.removeEventListener("focusin", u), n.value.removeEventListener("focusout", f), n.value = void 0); }), { onKeydown: i }; } }); function ex(e, t, n, r, o, a) { return ee(e.$slots, "default", { handleKeydown: e.onKeydown }); } var Sg = /* @__PURE__ */ ye(QE, [["render", ex], ["__file", "focus-trap.vue"]]); const tx = ["fixed", "absolute"], nx = we({ boundariesPadding: { type: Number, default: 0 }, fallbackPlacements: { type: ue(Array), default: void 0 }, gpuAcceleration: { type: Boolean, default: !0 }, offset: { type: Number, default: 12 }, placement: { type: String, values: Ja, default: "bottom" }, popperOptions: { type: ue(Object), default: () => ({}) }, strategy: { type: String, values: tx, default: "absolute" } }), kg = we({ ...nx, id: String, style: { type: ue([String, Array, Object]) }, className: { type: ue([String, Array, Object]) }, effect: { type: ue(String), default: "dark" }, visible: Boolean, enterable: { type: Boolean, default: !0 }, pure: Boolean, focusOnShow: { type: Boolean, default: !1 }, trapping: { type: Boolean, default: !1 }, popperClass: { type: ue([String, Array, Object]) }, popperStyle: { type: ue([String, Array, Object]) }, referenceEl: { type: ue(Object) }, triggerTargetEl: { type: ue(Object) }, stopPopperMouseEvent: { type: Boolean, default: !0 }, virtualTriggering: Boolean, zIndex: Number, ...Dr(["ariaLabel"]) }), rx = { mouseenter: (e) => e instanceof MouseEvent, mouseleave: (e) => e instanceof MouseEvent, focus: () => !0, blur: () => !0, close: () => !0 }, ox = (e, t = []) => { const { placement: n, strategy: r, popperOptions: o } = e, a = { placement: n, strategy: r, ...o, modifiers: [...sx(e), ...t] }; return ix(a, o == null ? void 0 : o.modifiers), a; }, ax = (e) => { if (Qe) return Qn(e); }; function sx(e) { const { offset: t, gpuAcceleration: n, fallbackPlacements: r } = 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: r } }, { name: "computeStyles", options: { gpuAcceleration: n } } ]; } function ix(e, t) { t && (e.modifiers = [...e.modifiers, ...t ?? []]); } const lx = 0, cx = (e) => { const { popperInstanceRef: t, contentRef: n, triggerRef: r, role: o } = ce(du, void 0), a = $(), s = $(), i = w(() => ({ name: "eventListeners", enabled: !!e.visible })), l = w(() => { var y; const x = p(a), A = (y = p(s)) != null ? y : lx; return { name: "arrow", enabled: !Pv(x), options: { element: x, padding: A } }; }), c = w(() => ({ onFirstUpdate: () => { d(); }, ...ox(e, [ p(l), p(i) ]) })), u = w(() => ax(e.referenceEl) || p(r)), { attributes: f, state: g, styles: v, update: d, forceUpdate: h, instanceRef: m } = q_(u, n, c); return oe(m, (y) => t.value = y), Ye(() => { oe(() => { var y; return (y = p(u)) == null ? void 0 : y.getBoundingClientRect(); }, () => { d(); }); }), { attributes: f, arrowRef: a, contentRef: n, instanceRef: m, state: g, styles: v, role: o, forceUpdate: h, update: d }; }, ux = (e, { attributes: t, styles: n, role: r }) => { const { nextZIndex: o } = su(), a = be("popper"), s = w(() => p(t).popper), i = $(je(e.zIndex) ? e.zIndex : o()), l = w(() => [ a.b(), a.is("pure", e.pure), a.is(e.effect), e.popperClass ]), c = w(() => [ { zIndex: p(i) }, p(n).popper, e.popperStyle || {} ]), u = w(() => r.value === "dialog" ? "false" : void 0), f = w(() => p(n).arrow || {}); return { ariaModal: u, arrowStyle: f, contentAttrs: s, contentClass: l, contentStyle: c, contentZIndex: i, updateZIndex: () => { i.value = je(e.zIndex) ? e.zIndex : o(); } }; }, dx = (e, t) => { const n = $(!1), r = $(); return { focusStartRef: r, trapped: n, onFocusAfterReleased: (c) => { var u; ((u = c.detail) == null ? void 0 : u.focusReason) !== "pointer" && (r.value = "first", t("blur")); }, onFocusAfterTrapped: () => { t("focus"); }, onFocusInTrap: (c) => { e.visible && !n.value && (c.target && (r.value = c.target), n.value = !0); }, onFocusoutPrevented: (c) => { e.trapping || (c.detail.focusReason === "pointer" && c.preventDefault(), n.value = !1); }, onReleaseRequested: () => { n.value = !1, t("close"); } }; }, fx = K({ name: "ElPopperContent" }), px = /* @__PURE__ */ K({ ...fx, props: kg, emits: rx, setup(e, { expose: t, emit: n }) { const r = e, { focusStartRef: o, trapped: a, onFocusAfterReleased: s, onFocusAfterTrapped: i, onFocusInTrap: l, onFocusoutPrevented: c, onReleaseRequested: u } = dx(r, n), { attributes: f, arrowRef: g, contentRef: v, styles: d, instanceRef: h, role: m, update: y } = cx(r), { ariaModal: x, arrowStyle: A, contentAttrs: k, contentClass: E, contentStyle: T, updateZIndex: I } = ux(r, { styles: d, attributes: f, role: m }), R = ce(ii, void 0), D = $(); qe(hg, { arrowStyle: A, arrowRef: g, arrowOffset: D }), R && qe(ii, { ...R, addInputId: mr, removeInputId: mr }); let W; const z = (X = !0) => { y(), X && I(); }, U = () => { z(!1), r.visible && r.focusOnShow ? a.value = !0 : r.visible === !1 && (a.value = !1); }; return Ye(() => { oe(() => r.triggerTargetEl, (X, de) => { W == null || W(), W = void 0; const re = p(X || v.value), L = p(de || v.value); Rr(re) && (W = oe([m, () => r.ariaLabel, x, () => r.id], (Z) => { ["role", "aria-label", "aria-modal", "id"].forEach((ve, me) => { Wa(Z[me]) ? re.removeAttribute(ve) : re.setAttribute(ve, Z[me]); }); }, { immediate: !0 })), L !== re && Rr(L) && ["role", "aria-label", "aria-modal", "id"].forEach((Z) => { L.removeAttribute(Z); }); }, { immediate: !0 }), oe(() => r.visible, U, { immediate: !0 }); }), bt(() => { W == null || W(), W = void 0; }), t({ popperContentRef: v, popperInstanceRef: h, updatePopper: z, contentStyle: T }), (X, de) => (C(), F("div", mt({ ref_key: "contentRef", ref: v }, p(k), { style: p(T), class: p(E), tabindex: "-1", onMouseenter: (re) => X.$emit("mouseenter", re), onMouseleave: (re) => X.$emit("mouseleave", re) }), [ V(p(Sg), { trapped: p(a), "trap-on-focus-in": !0, "focus-trap-el": p(v), "focus-start-el": p(o), onFocusAfterTrapped: p(i), onFocusAfterReleased: p(s), onFocusin: p(l), onFocusoutPrevented: p(c), onReleaseRequested: p(u) }, { default: P(() => [ ee(X.$slots, "default") ]), _: 3 }, 8, ["trapped", "focus-trap-el", "focus-start-el", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusin", "onFocusoutPrevented", "onReleaseRequested"]) ], 16, ["onMouseenter", "onMouseleave"])); } }); var hx = /* @__PURE__ */ ye(px, [["__file", "content.vue"]]); const vx = vt(BE), hu = Symbol("elTooltip"), Qt = we({ ...X_, ...kg, appendTo: { type: ue([String, Object]) }, content: { type: String, default: "" }, rawContent: Boolean, persistent: Boolean, visible: { type: ue(Boolean), default: null }, transition: String, teleported: { type: Boolean, default: !0 }, disabled: Boolean, ...Dr(["ariaLabel"]) }), Na = we({ ...bg, disabled: Boolean, trigger: { type: ue([String, Array]), default: "hover" }, triggerKeys: { type: ue(Array), default: () => [Ve.enter, Ve.space] } }), { useModelToggleProps: gx, useModelToggleEmits: mx, useModelToggle: yx } = zk("visible"), bx = we({ ...vg, ...gx, ...Qt, ...Na, ...gg, showArrow: { type: Boolean, default: !0 } }), wx = [ ...mx, "before-show", "before-hide", "show", "hide", "open", "close" ], Cx = (e, t) => qt(e) ? e.includes(t) : e === t, xo = (e, t, n) => (r) => { Cx(p(e), t) && n(r); }, Sx = K({ name: "ElTooltipTrigger" }), kx = /* @__PURE__ */ K({ ...Sx, props: Na, setup(e, { expose: t }) { const n = e, r = be("tooltip"), { controlled: o, id: a, open: s, onOpen: i, onClose: l, onToggle: c } = ce(hu, void 0), u = $(null), f = () => { if (p(o) || n.disabled) return !0; }, g = ct(n, "trigger"), v = St(f, xo(g, "hover", i)), d = St(f, xo(g, "hover", l)), h = St(f, xo(g, "click", (k) => { k.button === 0 && c(k); })), m = St(f, xo(g, "focus", i)), y = St(f, xo(g, "focus", l)), x = St(f, xo(g, "contextmenu", (k) => { k.preventDefault(), c(k); })), A = St(f, (k) => { const { code: E } = k; n.triggerKeys.includes(E) && (k.preventDefault(), c(k)); }); return t({ triggerRef: u }), (k, E) => (C(), J(p(HE), { id: p(a), "virtual-ref": k.virtualRef, open: p(s), "virtual-triggering": k.virtualTriggering, class: N(p(r).e("trigger")), onBlur: p(y), onClick: p(h), onContextmenu: p(x), onFocus: p(m), onMouseenter: p(v), onMouseleave: p(d), onKeydown: p(A) }, { default: P(() => [ ee(k.$slots, "default") ]), _: 3 }, 8, ["id", "virtual-ref", "open", "virtual-triggering", "class", "onBlur", "onClick", "onContextmenu", "onFocus", "onMouseenter", "onMouseleave", "onKeydown"])); } }); var _x = /* @__PURE__ */ ye(kx, [["__file", "trigger.vue"]]); const Ex = we({ to: { type: ue([String, Object]), required: !0 }, disabled: Boolean }), xx = /* @__PURE__ */ K({ __name: "teleport", props: Ex, setup(e) { return (t, n) => t.disabled ? ee(t.$slots, "default", { key: 0 }) : (C(), J(Dh, { key: 1, to: t.to }, [ ee(t.$slots, "default") ], 8, ["to"])); } }); var Tx = /* @__PURE__ */ ye(xx, [["__file", "teleport.vue"]]); const _g = vt(Tx), Ox = K({ name: "ElTooltipContent", inheritAttrs: !1 }), Ix = /* @__PURE__ */ K({ ...Ox, props: Qt, setup(e, { expose: t }) { const n = e, { selector: r } = ng(), o = be("tooltip"), a = $(null); let s; const { controlled: i, id: l, open: c, trigger: u, onClose: f, onOpen: g, onShow: v, onHide: d, onBeforeShow: h, onBeforeHide: m } = ce(hu, void 0), y = w(() => n.transition || `${o.namespace.value}-fade-in-linear`), x = w(() => process.env.NODE_ENV === "test" ? !0 : n.persistent); bt(() => { s == null || s(); }); const A = w(() => p(x) ? !0 : p(c)), k = w(() => n.disabled ? !1 : p(c)), E = w(() => n.appendTo || r.value), T = w(() => { var L; return (L = n.style) != null ? L : {}; }), I = $(!0), R = () => { d(), I.value = !0; }, D = () => { if (p(i)) return !0; }, W = St(D, () => { n.enterable && p(u) === "hover" && g(); }), z = St(D, () => { p(u) === "hover" && f(); }), U = () => { var L, Z; (Z = (L = a.value) == null ? void 0 : L.updatePopper) == null || Z.call(L), h == null || h(); }, X = () => { m == null || m(); }, de = () => { v(), s = Gb(w(() => { var L; return (L = a.value) == null ? void 0 : L.popperContentRef; }), () => { if (p(i)) return; p(u) !== "hover" && f(); }); }, re = () => { n.virtualTriggering || f(); }; return oe(() => p(c), (L) => { L ? I.value = !1 : s == null || s(); }, { flush: "post" }), oe(() => n.content, () => { var L, Z; (Z = (L = a.value) == null ? void 0 : L.updatePopper) == null || Z.call(L); }), t({ contentRef: a }), (L, Z) => (C(), J(p(_g), { disabled: !L.teleported, to: p(E) }, { default: P(() => [ V(ir, { name: p(y), onAfterLeave: R, onBeforeEnter: U, onAfterEnter: de, onBeforeLeave: X }, { default: P(() => [ p(A) ? xe((C(), J(p(hx), mt({ key: 0, id: p(l), ref_key: "contentRef", ref: a }, L.$attrs, { "aria-label": L.ariaLabel, "aria-hidden": I.value, "boundaries-padding": L.boundariesPadding, "fallback-placements": L.fallbackPlacements, "gpu-acceleration": L.gpuAcceleration, offset: L.offset, placement: L.placement, "popper-options": L.popperOptions, strategy: L.strategy, effect: L.effect, enterable: L.enterable, pure: L.pure, "popper-class": L.popperClass, "popper-style": [L.popperStyle, p(T)], "reference-el": L.referenceEl, "trigger-target-el": L.triggerTargetEl, visible: p(k), "z-index": L.zIndex, onMouseenter: p(W), onMouseleave: p(z), onBlur: re, onClose: p(f) }), { default: P(() => [ ee(L.$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"])), [ [ht, p(k)] ]) : G("v-if", !0) ]), _: 3 }, 8, ["name"]) ]), _: 3 }, 8, ["disabled", "to"])); } }); var Ax = /* @__PURE__ */ ye(Ix, [["__file", "content.vue"]]); const Fx = K({ name: "ElTooltip" }), Px = /* @__PURE__ */ K({ ...Fx, props: bx, emits: wx, setup(e, { expose: t, emit: n }) { const r = e; Y_(); const o = ar(), a = $(), s = $(), i = () => { var y; const x = p(a); x && ((y = x.popperInstanceRef) == null || y.update()); }, l = $(!1), c = $(), { show: u, hide: f, hasUpdateHandler: g } = yx({ indicator: l, toggleReason: c }), { onOpen: v, onClose: d } = Q_({ showAfter: ct(r, "showAfter"), hideAfter: ct(r, "hideAfter"), autoClose: ct(r, "autoClose"), open: u, close: f }), h = w(() => An(r.visible) && !g.value); qe(hu, { controlled: h, id: o, open: wi(l), trigger: ct(r, "trigger"), onOpen: (y) => { v(y); }, onClose: (y) => { d(y); }, onToggle: (y) => { p(l) ? d(y) : v(y); }, onShow: () => { n("show", c.value); }, onHide: () => { n("hide", c.value); }, onBeforeShow: () => { n("before-show", c.value); }, onBeforeHide: () => { n("before-hide", c.value); }, updatePopper: i }), oe(() => r.disabled, (y) => { y && l.value && (l.value = !1); }); const m = (y) => { var x, A; const k = (A = (x = s.value) == null ? void 0 : x.contentRef) == null ? void 0 : A.popperContentRef, E = (y == null ? void 0 : y.relatedTarget) || document.activeElement; return k && k.contains(E); }; return Mh(() => l.value && f()), t({ popperRef: a, contentRef: s, isFocusInsideContent: m, updatePopper: i, onOpen: v, onClose: d, hide: f }), (y, x) => (C(), J(p(vx), { ref_key: "popperRef", ref: a, role: y.role }, { default: P(() => [ V(_x, { disabled: y.disabled, trigger: y.trigger, "trigger-keys": y.triggerKeys, "virtual-ref": y.virtualRef, "virtual-triggering": y.virtualTriggering }, { default: P(() => [ y.$slots.default ? ee(y.$slots, "default", { key: 0 }) : G("v-if", !0) ]), _: 3 }, 8, ["disabled", "trigger", "trigger-keys", "virtual-ref", "virtual-triggering"]), V(Ax, { ref_key: "contentRef", ref: s, "aria-label": y.ariaLabel, "boundaries-padding": y.boundariesPadding, content: y.content, disabled: y.disabled, effect: y.effect, enterable: y.enterable, "fallback-placements": y.fallbackPlacements, "hide-after": y.hideAfter, "gpu-acceleration": y.gpuAcceleration, offset: y.offset, persistent: y.persistent, "popper-class": y.popperClass, "popper-style": y.popperStyle, placement: y.placement, "popper-options": y.popperOptions, pure: y.pure, "raw-content": y.rawContent, "reference-el": y.referenceEl, "trigger-target-el": y.triggerTargetEl, "show-after": y.showAfter, strategy: y.strategy, teleported: y.teleported, transition: y.transition, "virtual-triggering": y.virtualTriggering, "z-index": y.zIndex, "append-to": y.appendTo }, { default: P(() => [ ee(y.$slots, "content", {}, () => [ y.rawContent ? (C(), F("span", { key: 0, innerHTML: y.content }, null, 8, ["innerHTML"])) : (C(), F("span", { key: 1 }, se(y.content), 1)) ]), y.showArrow ? (C(), J(p(jE), { key: 0, "arrow-offset": y.arrowOffset }, null, 8, ["arrow-offset"])) : G("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 $x = /* @__PURE__ */ ye(Px, [["__file", "tooltip.vue"]]); const La = vt($x), Rx = we({ value: { type: [String, Number], default: "" }, max: { type: Number, default: 99 }, isDot: Boolean, hidden: Boolean, type: { type: String, values: ["primary", "success", "warning", "info", "danger"], default: "danger" }, showZero: { type: Boolean, default: !0 }, color: String, badgeStyle: { type: ue([String, Object, Array]) }, offset: { type: ue(Array), default: [0, 0] }, badgeClass: { type: String } }), Nx = K({ name: "ElBadge" }), Lx = /* @__PURE__ */ K({ ...Nx, props: Rx, setup(e, { expose: t }) { const n = e, r = be("badge"), o = w(() => n.isDot ? "" : je(n.value) && je(n.max) ? n.max < n.value ? `${n.max}+` : n.value === 0 && !n.showZero ? "" : `${n.value}` : `${n.value}`), a = w(() => { var s, i, l, c, u; return [ { backgroundColor: n.color, marginRight: yr(-((i = (s = n.offset) == null ? void 0 : s[0]) != null ? i : 0)), marginTop: yr((c = (l = n.offset) == null ? void 0 : l[1]) != null ? c : 0) }, (u = n.badgeStyle) != null ? u : {} ]; }); return t({ content: o }), (s, i) => (C(), F("div", { class: N(p(r).b()) }, [ ee(s.$slots, "default"), V(ir, { name: `${p(r).namespace.value}-zoom-in-center`, persisted: "" }, { default: P(() => [ xe(M("sup", { class: N([ p(r).e("content"), p(r).em("content", s.type), p(r).is("fixed", !!s.$slots.default), p(r).is("dot", s.isDot), s.badgeClass ]), style: Ue(p(a)), textContent: se(p(o)) }, null, 14, ["textContent"]), [ [ht, !s.hidden && (p(o) || s.isDot)] ]) ]), _: 1 }, 8, ["name"]) ], 2)); } }); var Bx = /* @__PURE__ */ ye(Lx, [["__file", "badge.vue"]]); const Dx = vt(Bx), Eg = Symbol("buttonGroupContextKey"), Mx = (e, t) => { eo({ from: "type.text", replacement: "link", version: "3.0.0", scope: "props", ref: "https://element-plus.org/en-US/component/button.html#button-attributes" }, w(() => e.type === "text")); const n = ce(Eg, void 0), r = Li("button"), { form: o } = Mr(), a = wr(w(() => n == null ? void 0 : n.size)), s = Ya(), i = $(), l = ho(), c = w(() => e.type || (n == null ? void 0 : n.type) || ""), u = w(() => { var d, h, m; return (m = (h = e.autoInsertSpace) != null ? h : (d = r.value) == null ? void 0 : d.autoInsertSpace) != null ? m : !1; }), f = w(() => e.tag === "button" ? { ariaDisabled: s.value || e.loading, disabled: s.value || e.loading, autofocus: e.autofocus, type: e.nativeType } : {}), g = w(() => { var d; const h = (d = l.default) == null ? void 0 : d.call(l); if (u.value && (h == null ? void 0 : h.length) === 1) { const m = h[0]; if ((m == null ? void 0 : m.type) === Ci) { const y = m.children; return new RegExp("^\\p{Unified_Ideograph}{2}$", "u").test(y.trim()); } } return !1; }); return { _disabled: s, _size: a, _type: c, _ref: i, _props: f, shouldAddSpace: g, handleClick: (d) => { if (s.value || e.loading) { d.stopPropagation(); return; } e.nativeType === "reset" && (o == null || o.resetFields()), t("click", d); } }; }, jx = [ "default", "primary", "success", "warning", "info", "danger", "text", "" ], Vx = ["button", "submit", "reset"], cc = we({ size: lr, disabled: Boolean, type: { type: String, values: jx, default: "" }, icon: { type: yn }, nativeType: { type: String, values: Vx, default: "button" }, loading: Boolean, loadingIcon: { type: yn, default: () => Si }, 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: ue([String, Object]), default: "button" } }), zx = { click: (e) => e instanceof MouseEvent }; function Pt(e, t) { Hx(e) && (e = "100%"); var n = Ux(e); return e = t === 360 ? e : Math.min(t, Math.max(0, parseFloat(e))), n && (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 ks(e) { return Math.min(1, Math.max(0, e)); } function Hx(e) { return typeof e == "string" && e.indexOf(".") !== -1 && parseFloat(e) === 1; } function Ux(e) { return typeof e == "string" && e.indexOf("%") !== -1; } function xg(e) { return e = parseFloat(e), (isNaN(e) || e < 0 || e > 1) && (e = 1), e; } function _s(e) { return e <= 1 ? "".concat(Number(e) * 100, "%") : e; } function Gr(e) { return e.length === 1 ? "0" + e : String(e); } function qx(e, t, n) { return { r: Pt(e, 255) * 255, g: Pt(t, 255) * 255, b: Pt(n, 255) * 255 }; } function Bf(e, t, n) { e = Pt(e, 255), t = Pt(t, 255), n = Pt(n, 255); var r = Math.max(e, t, n), o = Math.min(e, t, n), a = 0, s = 0, i = (r + o) / 2; if (r === o) s = 0, a = 0; else { var l = r - o; switch (s = i > 0.5 ? l / (2 - r - o) : l / (r + o), r) { case e: a = (t - n) / l + (t < n ? 6 : 0); break; case t: a = (n - e) / l + 2; break; case n: a = (e - t) / l + 4; break; } a /= 6; } return { h: a, s, l: i }; } function Pl(e, t, n) { return n < 0 && (n += 1), n > 1 && (n -= 1), n < 1 / 6 ? e + (t - e) * (6 * n) : n < 1 / 2 ? t : n < 2 / 3 ? e + (t - e) * (2 / 3 - n) * 6 : e; } function Kx(e, t, n) { var r, o, a; if (e = Pt(e, 360), t = Pt(t, 100), n = Pt(n, 100), t === 0) o = n, a = n, r = n; else { var s = n < 0.5 ? n * (1 + t) : n + t - n * t, i = 2 * n - s; r = Pl(i, s, e + 1 / 3), o = Pl(i, s, e), a = Pl(i, s, e - 1 / 3); } return { r: r * 255, g: o * 255, b: a * 255 }; } function Df(e, t, n) { e = Pt(e, 255), t = Pt(t, 255), n = Pt(n, 255); var r = Math.max(e, t, n), o = Math.min(e, t, n), a = 0, s = r, i = r - o, l = r === 0 ? 0 : i / r; if (r === o) a = 0; else { switch (r) { case e: a = (t - n) / i + (t < n ? 6 : 0); break; case t: a = (n - e) / i + 2; break; case n: a = (e - t) / i + 4; break; } a /= 6; } return { h: a, s: l, v: s }; } function Wx(e, t, n) { e = Pt(e, 360) * 6, t = Pt(t, 100), n = Pt(n, 100); var r = Math.floor(e), o = e - r, a = n * (1 - t), s = n * (1 - o * t), i = n * (1 - (1 - o) * t), l = r % 6, c = [n, s, a, a, i, n][l], u = [i, n, n, s, a, a][l], f = [a, a, i, n, n, s][l]; return { r: c * 255, g: u * 255, b: f * 255 }; } function Mf(e, t, n, r) { var o = [ Gr(Math.round(e).toString(16)), Gr(Math.round(t).toString(16)), Gr(Math.round(n).toString(16)) ]; return r && o[0].startsWith(o[0].charAt(1)) && o[1].startsWith(o[1].charAt(1)) && o[2].startsWith(o[2].charAt(1)) ? o[0].charAt(0) + o[1].charAt(0) + o[2].charAt(0) : o.join(""); } function Gx(e, t, n, r, o) { var a = [ Gr(Math.round(e).toString(16)), Gr(Math.round(t).toString(16)), Gr(Math.round(n).toString(16)), Gr(Jx(r)) ]; return o && 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 Jx(e) { return Math.round(parseFloat(e) * 255).toString(16); } function jf(e) { return pn(e) / 255; } function pn(e) { return parseInt(e, 16); } function Zx(e) { return { r: e >> 16, g: (e & 65280) >> 8, b: e & 255 }; } var uc = { 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 Yx(e) { var t = { r: 0, g: 0, b: 0 }, n = 1, r = null, o = null, a = null, s = !1, i = !1; return typeof e == "string" && (e = eT(e)), typeof e == "object" && (ur(e.r) && ur(e.g) && ur(e.b) ? (t = qx(e.r, e.g, e.b), s = !0, i = String(e.r).substr(-1) === "%" ? "prgb" : "rgb") : ur(e.h) && ur(e.s) && ur(e.v) ? (r = _s(e.s), o = _s(e.v), t = Wx(e.h, r, o), s = !0, i = "hsv") : ur(e.h) && ur(e.s) && ur(e.l) && (r = _s(e.s), a = _s(e.l), t = Kx(e.h, r, a), s = !0, i = "hsl"), Object.prototype.hasOwnProperty.call(e, "a") && (n = e.a)), n = xg(n), { ok: s, format: e.format || i, 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: n }; } var Xx = "[-\\+]?\\d+%?", Qx = "[-\\+]?\\d*\\.\\d+%?", Pr = "(?:".concat(Qx, ")|(?:").concat(Xx, ")"), $l = "[\\s|\\(]+(".concat(Pr, ")[,|\\s]+(").concat(Pr, ")[,|\\s]+(").concat(Pr, ")\\s*\\)?"), Rl = "[\\s|\\(]+(".concat(Pr, ")[,|\\s]+(").concat(Pr, ")[,|\\s]+(").concat(Pr, ")[,|\\s]+(").concat(Pr, ")\\s*\\)?"), Dn = { CSS_UNIT: new RegExp(Pr), rgb: new RegExp("rgb" + $l), rgba: new RegExp("rgba" + Rl), hsl: new RegExp("hsl" + $l), hsla: new RegExp("hsla" + Rl), hsv: new RegExp("hsv" + $l), hsva: new RegExp("hsva" + Rl), 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 eT(e) { if (e = e.trim().toLowerCase(), e.length === 0) return !1; var t = !1; if (uc[e]) e = uc[e], t = !0; else if (e === "transparent") return { r: 0, g: 0, b: 0, a: 0, format: "name" }; var n = Dn.rgb.exec(e); return n ? { r: n[1], g: n[2], b: n[3] } : (n = Dn.rgba.exec(e), n ? { r: n[1], g: n[2], b: n[3], a: n[4] } : (n = Dn.hsl.exec(e), n ? { h: n[1], s: n[2], l: n[3] } : (n = Dn.hsla.exec(e), n ? { h: n[1], s: n[2], l: n[3], a: n[4] } : (n = Dn.hsv.exec(e), n ? { h: n[1], s: n[2], v: n[3] } : (n = Dn.hsva.exec(e), n ? { h: n[1], s: n[2], v: n[3], a: n[4] } : (n = Dn.hex8.exec(e), n ? { r: pn(n[1]), g: pn(n[2]), b: pn(n[3]), a: jf(n[4]), format: t ? "name" : "hex8" } : (n = Dn.hex6.exec(e), n ? { r: pn(n[1]), g: pn(n[2]), b: pn(n[3]), format: t ? "name" : "hex" } : (n = Dn.hex4.exec(e), n ? { r: pn(n[1] + n[1]), g: pn(n[2] + n[2]), b: pn(n[3] + n[3]), a: jf(n[4] + n[4]), format: t ? "name" : "hex8" } : (n = Dn.hex3.exec(e), n ? { r: pn(n[1] + n[1]), g: pn(n[2] + n[2]), b: pn(n[3] + n[3]), format: t ? "name" : "hex" } : !1))))))))); } function ur(e) { return !!Dn.CSS_UNIT.exec(String(e)); } var tT = ( /** @class */ function() { function e(t, n) { t === void 0 && (t = ""), n === void 0 && (n = {}); var r; if (t instanceof e) return t; typeof t == "number" && (t = Zx(t)), this.originalInput = t; var o = Yx(t); this.originalInput = t, this.r = o.r, this.g = o.g, this.b = o.b, this.a = o.a, this.roundA = Math.round(100 * this.a) / 100, this.format = (r = n.format) !== null && r !== void 0 ? r : o.format, this.gradientType = n.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 = o.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(), n, r, o, a = t.r / 255, s = t.g / 255, i = t.b / 255; return a <= 0.03928 ? n = a / 12.92 : n = Math.pow((a + 0.055) / 1.055, 2.4), s <= 0.03928 ? r = s / 12.92 : r = Math.pow((s + 0.055) / 1.055, 2.4), i <= 0.03928 ? o = i / 12.92 : o = Math.pow((i + 0.055) / 1.055, 2.4), 0.2126 * n + 0.7152 * r + 0.0722 * o; }, e.prototype.getAlpha = function() { return this.a; }, e.prototype.setAlpha = function(t) { return this.a = xg(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 = Df(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 = Df(this.r, this.g, this.b), n = Math.round(t.h * 360), r = Math.round(t.s * 100), o = Math.round(t.v * 100); return this.a === 1 ? "hsv(".concat(n, ", ").concat(r, "%, ").concat(o, "%)") : "hsva(".concat(n, ", ").concat(r, "%, ").concat(o, "%, ").concat(this.roundA, ")"); }, e.prototype.toHsl = function() { var t = Bf(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 = Bf(this.r, this.g, this.b), n = Math.round(t.h * 360), r = Math.round(t.s * 100), o = Math.round(t.l * 100); return this.a === 1 ? "hsl(".concat(n, ", ").concat(r, "%, ").concat(o, "%)") : "hsla(".concat(n, ", ").concat(r, "%, ").concat(o, "%, ").concat(this.roundA, ")"); }, e.prototype.toHex = function(t) { return t === void 0 && (t = !1), Mf(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), Gx(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), n = Math.round(this.g), r = Math.round(this.b); return this.a === 1 ? "rgb(".concat(t, ", ").concat(n, ", ").concat(r, ")") : "rgba(".concat(t, ", ").concat(n, ", ").concat(r, ", ").concat(this.roundA, ")"); }, e.prototype.toPercentageRgb = function() { var t = function(n) { return "".concat(Math.round(Pt(n, 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(n) { return Math.round(Pt(n, 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 = "#" + Mf(this.r, this.g, this.b, !1), n = 0, r = Object.entries(uc); n < r.length; n++) { var o = r[n], a = o[0], s = o[1]; if (t === s) return a; } return !1; }, e.prototype.toString = function(t) { var n = !!t; t = t ?? this.format; var r = !1, o = this.a < 1 && this.a >= 0, a = !n && o && (t.startsWith("hex") || t === "name"); return a ? t === "name" && this.a === 0 ? this.toName() : this.toRgbString() : (t === "rgb" && (r = this.toRgbString()), t === "prgb" && (r = this.toPercentageRgbString()), (t === "hex" || t === "hex6") && (r = this.toHexString()), t === "hex3" && (r = this.toHexString(!0)), t === "hex4" && (r = this.toHex8String(!0)), t === "hex8" && (r = this.toHex8String()), t === "name" && (r = this.toName()), t === "hsl" && (r = this.toHslString()), t === "hsv" && (r = this.toHsvString()), r || 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 n = this.toHsl(); return n.l += t / 100, n.l = ks(n.l), new e(n); }, e.prototype.brighten = function(t) { t === void 0 && (t = 10); var n = this.toRgb(); return n.r = Math.max(0, Math.min(255, n.r - Math.round(255 * -(t / 100)))), n.g = Math.max(0, Math.min(255, n.g - Math.round(255 * -(t / 100)))), n.b = Math.max(0, Math.min(255, n.b - Math.round(255 * -(t / 100)))), new e(n); }, e.prototype.darken = function(t) { t === void 0 && (t = 10); var n = this.toHsl(); return n.l -= t / 100, n.l = ks(n.l), new e(n); }, 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 n = this.toHsl(); return n.s -= t / 100, n.s = ks(n.s), new e(n); }, e.prototype.saturate = function(t) { t === void 0 && (t = 10); var n = this.toHsl(); return n.s += t / 100, n.s = ks(n.s), new e(n); }, e.prototype.greyscale = function() { return this.desaturate(100); }, e.prototype.spin = function(t) { var n = this.toHsl(), r = (n.h + t) % 360; return n.h = r < 0 ? 360 + r : r, new e(n); }, e.prototype.mix = function(t, n) { n === void 0 && (n = 50); var r = this.toRgb(), o = new e(t).toRgb(), a = n / 100, s = { r: (o.r - r.r) * a + r.r, g: (o.g - r.g) * a + r.g, b: (o.b - r.b) * a + r.b, a: (o.a - r.a) * a + r.a }; return new e(s); }, e.prototype.analogous = function(t, n) { t === void 0 && (t = 6), n === void 0 && (n = 30); var r = this.toHsl(), o = 360 / n, a = [this]; for (r.h = (r.h - (o * t >> 1) + 720) % 360; --t; ) r.h = (r.h + o) % 360, a.push(new e(r)); 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 n = this.toHsv(), r = n.h, o = n.s, a = n.v, s = [], i = 1 / t; t--; ) s.push(new e({ h: r, s: o, v: a })), a = (a + i) % 1; return s; }, e.prototype.splitcomplement = function() { var t = this.toHsl(), n = t.h; return [ this, new e({ h: (n + 72) % 360, s: t.s, l: t.l }), new e({ h: (n + 216) % 360, s: t.s, l: t.l }) ]; }, e.prototype.onBackground = function(t) { var n = this.toRgb(), r = new e(t).toRgb(), o = n.a + r.a * (1 - n.a); return new e({ r: (n.r * n.a + r.r * r.a * (1 - n.a)) / o, g: (n.g * n.a + r.g * r.a * (1 - n.a)) / o, b: (n.b * n.a + r.b * r.a * (1 - n.a)) / o, a: o }); }, e.prototype.triad = function() { return this.polyad(3); }, e.prototype.tetrad = function() { return this.polyad(4); }, e.prototype.polyad = function(t) { for (var n = this.toHsl(), r = n.h, o = [this], a = 360 / t, s = 1; s < t; s++) o.push(new e({ h: (r + s * a) % 360, s: n.s, l: n.l })); return o; }, e.prototype.equals = function(t) { return this.toRgbString() === new e(t).toRgbString(); }, e; }() ); function Tr(e, t = 20) { return e.mix("#141414", t).toString(); } function nT(e) { const t = Ya(), n = be("button"); return w(() => { let r = {}, o = e.color; if (o) { const a = o.match(/var\((.*?)\)/); a && (o = window.getComputedStyle(window.document.documentElement).getPropertyValue(a[1])); const s = new tT(o), i = e.dark ? s.tint(20).toString() : Tr(s, 20); if (e.plain) r = n.cssVarBlock({ "bg-color": e.dark ? Tr(s, 90) : s.tint(90).toString(), "text-color": o, "border-color": e.dark ? Tr(s, 50) : s.tint(50).toString(), "hover-text-color": `var(${n.cssVarName("color-white")})`, "hover-bg-color": o, "hover-border-color": o, "active-bg-color": i, "active-text-color": `var(${n.cssVarName("color-white")})`, "active-border-color": i }), t.value && (r[n.cssVarBlockName("disabled-bg-color")] = e.dark ? Tr(s, 90) : s.tint(90).toString(), r[n.cssVarBlockName("disabled-text-color")] = e.dark ? Tr(s, 50) : s.tint(50).toString(), r[n.cssVarBlockName("disabled-border-color")] = e.dark ? Tr(s, 80) : s.tint(80).toString()); else { const l = e.dark ? Tr(s, 30) : s.tint(30).toString(), c = s.isDark() ? `var(${n.cssVarName("color-white")})` : `var(${n.cssVarName("color-black")})`; if (r = n.cssVarBlock({ "bg-color": o, "text-color": c, "border-color": o, "hover-bg-color": l, "hover-text-color": c, "hover-border-color": l, "active-bg-color": i, "active-border-color": i }), t.value) { const u = e.dark ? Tr(s, 50) : s.tint(50).toString(); r[n.cssVarBlockName("disabled-bg-color")] = u, r[n.cssVarBlockName("disabled-text-color")] = e.dark ? "rgba(255, 255, 255, 0.5)" : `var(${n.cssVarName("color-white")})`, r[n.cssVarBlockName("disabled-border-color")] = u; } } } return r; }); } const rT = K({ name: "ElButton" }), oT = /* @__PURE__ */ K({ ...rT, props: cc, emits: zx, setup(e, { expose: t, emit: n }) { const r = e, o = nT(r), a = be("button"), { _ref: s, _size: i, _type: l, _disabled: c, _props: u, shouldAddSpace: f, handleClick: g } = Mx(r, n), v = w(() => [ a.b(), a.m(l.value), a.m(i.value), a.is("disabled", c.value), a.is("loading", r.loading), a.is("plain", r.plain), a.is("round", r.round), a.is("circle", r.circle), a.is("text", r.text), a.is("link", r.link), a.is("has-bg", r.bg) ]); return t({ ref: s, size: i, type: l, disabled: c, shouldAddSpace: f }), (d, h) => (C(), J(pt(d.tag), mt({ ref_key: "_ref", ref: s }, p(u), { class: p(v), style: p(o), onClick: p(g) }), { default: P(() => [ d.loading ? (C(), F(Ie, { key: 0 }, [ d.$slots.loading ? ee(d.$slots, "loading", { key: 0 }) : (C(), J(p(He), { key: 1, class: N(p(a).is("loading")) }, { default: P(() => [ (C(), J(pt(d.loadingIcon))) ]), _: 1 }, 8, ["class"])) ], 64)) : d.icon || d.$slots.icon ? (C(), J(p(He), { key: 1 }, { default: P(() => [ d.icon ? (C(), J(pt(d.icon), { key: 0 })) : ee(d.$slots, "icon", { key: 1 }) ]), _: 3 })) : G("v-if", !0), d.$slots.default ? (C(), F("span", { key: 2, class: N({ [p(a).em("text", "expand")]: p(f) }) }, [ ee(d.$slots, "default") ], 2)) : G("v-if", !0) ]), _: 3 }, 16, ["class", "style", "onClick"])); } }); var aT = /* @__PURE__ */ ye(oT, [["__file", "button.vue"]]); const sT = { size: cc.size, type: cc.type }, iT = K({ name: "ElButtonGroup" }), lT = /* @__PURE__ */ K({ ...iT, props: sT, setup(e) { const t = e; qe(Eg, mn({ size: ct(t, "size"), type: ct(t, "type") })); const n = be("button"); return (r, o) => (C(), F("div", { class: N(p(n).b("group")) }, [ ee(r.$slots, "default") ], 2)); } }); var Tg = /* @__PURE__ */ ye(lT, [["__file", "button-group.vue"]]); const Kt = vt(aT, { ButtonGroup: Tg }); bn(Tg); var cT = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}; function uT(e) { return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e; } const Ar = /* @__PURE__ */ new Map(); if (Qe) { let e; document.addEventListener("mousedown", (t) => e = t), document.addEventListener("mouseup", (t) => { if (e) { for (const n of Ar.values()) for (const { documentHandler: r } of n) r(t, e); e = void 0; } }); } function Vf(e, t) { let n = []; return Array.isArray(t.arg) ? n = t.arg : Rr(t.arg) && n.push(t.arg), function(r, o) { const a = t.instance.popperRef, s = r.target, i = o == null ? void 0 : o.target, l = !t || !t.instance, c = !s || !i, u = e.contains(s) || e.contains(i), f = e === s, g = n.length && n.some((d) => d == null ? void 0 : d.contains(s)) || n.length && n.includes(i), v = a && (a.contains(s) || a.contains(i)); l || c || u || f || g || v || t.value(r, o); }; } const Og = { beforeMount(e, t) { Ar.has(e) || Ar.set(e, []), Ar.get(e).push({ documentHandler: Vf(e, t), bindingFn: t.value }); }, updated(e, t) { Ar.has(e) || Ar.set(e, []); const n = Ar.get(e), r = n.findIndex((a) => a.bindingFn === t.oldValue), o = { documentHandler: Vf(e, t), bindingFn: t.value }; r >= 0 ? n.splice(r, 1, o) : n.push(o); }, unmounted(e) { Ar.delete(e); } }, dT = we({ header: { type: String, default: "" }, footer: { type: String, default: "" }, bodyStyle: { type: ue([String, Object, Array]), default: "" }, bodyClass: String, shadow: { type: String, values: ["always", "hover", "never"], default: "always" } }), fT = K({ name: "ElCard" }), pT = /* @__PURE__ */ K({ ...fT, props: dT, setup(e) { const t = be("card"); return (n, r) => (C(), F("div", { class: N([p(t).b(), p(t).is(`${n.shadow}-shadow`)]) }, [ n.$slots.header || n.header ? (C(), F("div", { key: 0, class: N(p(t).e("header")) }, [ ee(n.$slots, "header", {}, () => [ Ce(se(n.header), 1) ]) ], 2)) : G("v-if", !0), M("div", { class: N([p(t).e("body"), n.bodyClass]), style: Ue(n.bodyStyle) }, [ ee(n.$slots, "default") ], 6), n.$slots.footer || n.footer ? (C(), F("div", { key: 1, class: N(p(t).e("footer")) }, [ ee(n.$slots, "footer", {}, () => [ Ce(se(n.footer), 1) ]) ], 2)) : G("v-if", !0) ], 2)); } }); var hT = /* @__PURE__ */ ye(pT, [["__file", "card.vue"]]); const Mi = vt(hT), Ig = { 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: lr, tabindex: [String, Number], validateEvent: { type: Boolean, default: !0 }, ...Dr(["ariaControls"]) }, Ag = { [ft]: (e) => jt(e) || je(e) || An(e), change: (e) => jt(e) || je(e) || An(e) }, Jo = Symbol("checkboxGroupContextKey"), vT = ({ model: e, isChecked: t }) => { const n = ce(Jo, void 0), r = w(() => { var a, s; const i = (a = n == null ? void 0 : n.max) == null ? void 0 : a.value, l = (s = n == null ? void 0 : n.min) == null ? void 0 : s.value; return !gr(i) && e.value.length >= i && !t.value || !gr(l) && e.value.length <= l && t.value; }); return { isDisabled: Ya(w(() => (n == null ? void 0 : n.disabled.value) || r.value)), isLimitDisabled: r }; }, gT = (e, { model: t, isLimitExceeded: n, hasOwnLabel: r, isDisabled: o, isLabeledByFormItem: a }) => { const s = ce(Jo, void 0), { formItem: i } = Mr(), { emit: l } = We(); function c(d) { var h, m, y, x; return [!0, e.trueValue, e.trueLabel].includes(d) ? (m = (h = e.trueValue) != null ? h : e.trueLabel) != null ? m : !0 : (x = (y = e.falseValue) != null ? y : e.falseLabel) != null ? x : !1; } function u(d, h) { l("change", c(d), h); } function f(d) { if (n.value) return; const h = d.target; l("change", c(h.checked), d); } async function g(d) { n.value || !r.value && !o.value && a.value && (d.composedPath().some((y) => y.tagName === "LABEL") || (t.value = c([!1, e.falseValue, e.falseLabel].includes(t.value)), await Re(), u(t.value, d))); } const v = w(() => (s == null ? void 0 : s.validateEvent) || e.validateEvent); return oe(() => e.modelValue, () => { v.value && (i == null || i.validate("change").catch((d) => yt(d))); }), { handleChange: f, onClickRoot: g }; }, mT = (e) => { const t = $(!1), { emit: n } = We(), r = ce(Jo, void 0), o = w(() => gr(r) === !1), a = $(!1), s = w({ get() { var i, l; return o.value ? (i = r == null ? void 0 : r.modelValue) == null ? void 0 : i.value : (l = e.modelValue) != null ? l : t.value; }, set(i) { var l, c; o.value && qt(i) ? (a.value = ((l = r == null ? void 0 : r.max) == null ? void 0 : l.value) !== void 0 && i.length > (r == null ? void 0 : r.max.value) && i.length > s.value.length, a.value === !1 && ((c = r == null ? void 0 : r.changeEvent) == null || c.call(r, i))) : (n(ft, i), t.value = i); } }); return { model: s, isGroup: o, isLimitExceeded: a }; }, yT = (e, t, { model: n }) => { const r = ce(Jo, void 0), o = $(!1), a = w(() => Fa(e.value) ? e.label : e.value), s = w(() => { const u = n.value; return An(u) ? u : qt(u) ? At(a.value) ? u.map(Xs).some((f) => tr(f, a.value)) : u.map(Xs).includes(a.value) : u != null ? u === e.trueValue || u === e.trueLabel : !!u; }), i = wr(w(() => { var u; return (u = r == null ? void 0 : r.size) == null ? void 0 : u.value; }), { prop: !0 }), l = wr(w(() => { var u; return (u = r == null ? void 0 : r.size) == null ? void 0 : u.value; })), c = w(() => !!t.default || !Fa(a.value)); return { checkboxButtonSize: i, isChecked: s, isFocused: o, checkboxSize: l, hasOwnLabel: c, actualValue: a }; }, Fg = (e, t) => { const { formItem: n } = Mr(), { model: r, isGroup: o, isLimitExceeded: a } = mT(e), { isFocused: s, isChecked: i, checkboxButtonSize: l, checkboxSize: c, hasOwnLabel: u, actualValue: f } = yT(e, t, { model: r }), { isDisabled: g } = vT({ model: r, isChecked: i }), { inputId: v, isLabeledByFormItem: d } = Xa(e, { formItemContext: n, disableIdGeneration: u, disableIdManagement: o }), { handleChange: h, onClickRoot: m } = gT(e, { model: r, isLimitExceeded: a, hasOwnLabel: u, isDisabled: g, isLabeledByFormItem: d }); return (() => { function x() { var A, k; qt(r.value) && !r.value.includes(f.value) ? r.value.push(f.value) : r.value = (k = (A = e.trueValue) != null ? A : e.trueLabel) != null ? k : !0; } e.checked && x(); })(), eo({ from: "label act as value", replacement: "value", version: "3.0.0", scope: "el-checkbox", ref: "https://element-plus.org/en-US/component/checkbox.html" }, w(() => o.value && Fa(e.value))), eo({ from: "true-label", replacement: "true-value", version: "3.0.0", scope: "el-checkbox", ref: "https://element-plus.org/en-US/component/checkbox.html" }, w(() => !!e.trueLabel)), eo({ from: "false-label", replacement: "false-value", version: "3.0.0", scope: "el-checkbox", ref: "https://element-plus.org/en-US/component/checkbox.html" }, w(() => !!e.falseLabel)), { inputId: v, isLabeledByFormItem: d, isChecked: i, isDisabled: g, isFocused: s, checkboxButtonSize: l, checkboxSize: c, hasOwnLabel: u, model: r, actualValue: f, handleChange: h, onClickRoot: m }; }, bT = K({ name: "ElCheckbox" }), wT = /* @__PURE__ */ K({ ...bT, props: Ig, emits: Ag, setup(e) { const t = e, n = ho(), { inputId: r, isLabeledByFormItem: o, isChecked: a, isDisabled: s, isFocused: i, checkboxSize: l, hasOwnLabel: c, model: u, actualValue: f, handleChange: g, onClickRoot: v } = Fg(t, n), d = be("checkbox"), h = w(() => [ d.b(), d.m(l.value), d.is("disabled", s.value), d.is("bordered", t.border), d.is("checked", a.value) ]), m = w(() => [ d.e("input"), d.is("disabled", s.value), d.is("checked", a.value), d.is("indeterminate", t.indeterminate), d.is("focus", i.value) ]); return (y, x) => (C(), J(pt(!p(c) && p(o) ? "span" : "label"), { class: N(p(h)), "aria-controls": y.indeterminate ? y.ariaControls : null, onClick: p(v) }, { default: P(() => { var A, k, E, T; return [ M("span", { class: N(p(m)) }, [ y.trueValue || y.falseValue || y.trueLabel || y.falseLabel ? xe((C(), F("input", { key: 0, id: p(r), "onUpdate:modelValue": (I) => Tn(u) ? u.value = I : null, class: N(p(d).e("original")), type: "checkbox", indeterminate: y.indeterminate, name: y.name, tabindex: y.tabindex, disabled: p(s), "true-value": (k = (A = y.trueValue) != null ? A : y.trueLabel) != null ? k : !0, "false-value": (T = (E = y.falseValue) != null ? E : y.falseLabel) != null ? T : !1, onChange: p(g), onFocus: (I) => i.value = !0, onBlur: (I) => i.value = !1, onClick: Be(() => { }, ["stop"]) }, null, 42, ["id", "onUpdate:modelValue", "indeterminate", "name", "tabindex", "disabled", "true-value", "false-value", "onChange", "onFocus", "onBlur", "onClick"])), [ [Qs, p(u)] ]) : xe((C(), F("input", { key: 1, id: p(r), "onUpdate:modelValue": (I) => Tn(u) ? u.value = I : null, class: N(p(d).e("original")), type: "checkbox", indeterminate: y.indeterminate, disabled: p(s), value: p(f), name: y.name, tabindex: y.tabindex, onChange: p(g), onFocus: (I) => i.value = !0, onBlur: (I) => i.value = !1, onClick: Be(() => { }, ["stop"]) }, null, 42, ["id", "onUpdate:modelValue", "indeterminate", "disabled", "value", "name", "tabindex", "onChange", "onFocus", "onBlur", "onClick"])), [ [Qs, p(u)] ]), M("span", { class: N(p(d).e("inner")) }, null, 2) ], 2), p(c) ? (C(), F("span", { key: 0, class: N(p(d).e("label")) }, [ ee(y.$slots, "default"), y.$slots.default ? G("v-if", !0) : (C(), F(Ie, { key: 0 }, [ Ce(se(y.label), 1) ], 64)) ], 2)) : G("v-if", !0) ]; }), _: 3 }, 8, ["class", "aria-controls", "onClick"])); } }); var CT = /* @__PURE__ */ ye(wT, [["__file", "checkbox.vue"]]); const ST = K({ name: "ElCheckboxButton" }), kT = /* @__PURE__ */ K({ ...ST, props: Ig, emits: Ag, setup(e) { const t = e, n = ho(), { isFocused: r, isChecked: o, isDisabled: a, checkboxButtonSize: s, model: i, actualValue: l, handleChange: c } = Fg(t, n), u = ce(Jo, void 0), f = be("checkbox"), g = w(() => { var d, h, m, y; const x = (h = (d = u == null ? void 0 : u.fill) == null ? void 0 : d.value) != null ? h : ""; return { backgroundColor: x, borderColor: x, color: (y = (m = u == null ? void 0 : u.textColor) == null ? void 0 : m.value) != null ? y : "", boxShadow: x ? `-1px 0 0 0 ${x}` : void 0 }; }), v = w(() => [ f.b("button"), f.bm("button", s.value), f.is("disabled", a.value), f.is("checked", o.value), f.is("focus", r.value) ]); return (d, h) => { var m, y, x, A; return C(), F("label", { class: N(p(v)) }, [ d.trueValue || d.falseValue || d.trueLabel || d.falseLabel ? xe((C(), F("input", { key: 0, "onUpdate:modelValue": (k) => Tn(i) ? i.value = k : null, class: N(p(f).be("button", "original")), type: "checkbox", name: d.name, tabindex: d.tabindex, disabled: p(a), "true-value": (y = (m = d.trueValue) != null ? m : d.trueLabel) != null ? y : !0, "false-value": (A = (x = d.falseValue) != null ? x : d.falseLabel) != null ? A : !1, onChange: p(c), onFocus: (k) => r.value = !0, onBlur: (k) => r.value = !1, onClick: Be(() => { }, ["stop"]) }, null, 42, ["onUpdate:modelValue", "name", "tabindex", "disabled", "true-value", "false-value", "onChange", "onFocus", "onBlur", "onClick"])), [ [Qs, p(i)] ]) : xe((C(), F("input", { key: 1, "onUpdate:modelValue": (k) => Tn(i) ? i.value = k : null, class: N(p(f).be("button", "original")), type: "checkbox", name: d.name, tabindex: d.tabindex, disabled: p(a), value: p(l), onChange: p(c), onFocus: (k) => r.value = !0, onBlur: (k) => r.value = !1, onClick: Be(() => { }, ["stop"]) }, null, 42, ["onUpdate:modelValue", "name", "tabindex", "disabled", "value", "onChange", "onFocus", "onBlur", "onClick"])), [ [Qs, p(i)] ]), d.$slots.default || d.label ? (C(), F("span", { key: 2, class: N(p(f).be("button", "inner")), style: Ue(p(o) ? p(g) : void 0) }, [ ee(d.$slots, "default", {}, () => [ Ce(se(d.label), 1) ]) ], 6)) : G("v-if", !0) ], 2); }; } }); var Pg = /* @__PURE__ */ ye(kT, [["__file", "checkbox-button.vue"]]); const _T = we({ modelValue: { type: ue(Array), default: () => [] }, disabled: Boolean, min: Number, max: Number, size: lr, fill: String, textColor: String, tag: { type: String, default: "div" }, validateEvent: { type: Boolean, default: !0 }, ...Dr(["ariaLabel"]) }), ET = { [ft]: (e) => qt(e), change: (e) => qt(e) }, xT = K({ name: "ElCheckboxGroup" }), TT = /* @__PURE__ */ K({ ...xT, props: _T, emits: ET, setup(e, { emit: t }) { const n = e, r = be("checkbox"), { formItem: o } = Mr(), { inputId: a, isLabeledByFormItem: s } = Xa(n, { formItemContext: o }), i = async (c) => { t(ft, c), await Re(), t("change", c); }, l = w({ get() { return n.modelValue; }, set(c) { i(c); } }); return qe(Jo, { ...$v(vo(n), [ "size", "min", "max", "disabled", "validateEvent", "fill", "textColor" ]), modelValue: l, changeEvent: i }), oe(() => n.modelValue, () => { n.validateEvent && (o == null || o.validate("change").catch((c) => yt(c))); }), (c, u) => { var f; return C(), J(pt(c.tag), { id: p(a), class: N(p(r).b("group")), role: "group", "aria-label": p(s) ? void 0 : c.ariaLabel || "checkbox-group", "aria-labelledby": p(s) ? (f = p(o)) == null ? void 0 : f.labelId : void 0 }, { default: P(() => [ ee(c.$slots, "default") ]), _: 3 }, 8, ["id", "class", "aria-label", "aria-labelledby"]); }; } }); var $g = /* @__PURE__ */ ye(TT, [["__file", "checkbox-group.vue"]]); const vu = vt(CT, { CheckboxButton: Pg, CheckboxGroup: $g }); bn(Pg); bn($g); const Rg = we({ modelValue: { type: [String, Number, Boolean], default: void 0 }, size: lr, disabled: Boolean, label: { type: [String, Number, Boolean], default: void 0 }, value: { type: [String, Number, Boolean], default: void 0 }, name: { type: String, default: void 0 } }), OT = we({ ...Rg, border: Boolean }), Ng = { [ft]: (e) => jt(e) || je(e) || An(e), [io]: (e) => jt(e) || je(e) || An(e) }, Lg = Symbol("radioGroupKey"), Bg = (e, t) => { const n = $(), r = ce(Lg, void 0), o = w(() => !!r), a = w(() => Fa(e.value) ? e.label : e.value), s = w({ get() { return o.value ? r.modelValue : e.modelValue; }, set(f) { o.value ? r.changeEvent(f) : t && t(ft, f), n.value.checked = e.modelValue === a.value; } }), i = wr(w(() => r == null ? void 0 : r.size)), l = Ya(w(() => r == null ? void 0 : r.disabled)), c = $(!1), u = w(() => l.value || o.value && s.value !== a.value ? -1 : 0); return eo({ from: "label act as value", replacement: "value", version: "3.0.0", scope: "el-radio", ref: "https://element-plus.org/en-US/component/radio.html" }, w(() => o.value && Fa(e.value))), { radioRef: n, isGroup: o, radioGroup: r, focus: c, size: i, disabled: l, tabIndex: u, modelValue: s, actualValue: a }; }, IT = K({ name: "ElRadio" }), AT = /* @__PURE__ */ K({ ...IT, props: OT, emits: Ng, setup(e, { emit: t }) { const n = e, r = be("radio"), { radioRef: o, radioGroup: a, focus: s, size: i, disabled: l, modelValue: c, actualValue: u } = Bg(n, t); function f() { Re(() => t("change", c.value)); } return (g, v) => { var d; return C(), F("label", { class: N([ p(r).b(), p(r).is("disabled", p(l)), p(r).is("focus", p(s)), p(r).is("bordered", g.border), p(r).is("checked", p(c) === p(u)), p(r).m(p(i)) ]) }, [ M("span", { class: N([ p(r).e("input"), p(r).is("disabled", p(l)), p(r).is("checked", p(c) === p(u)) ]) }, [ xe(M("input", { ref_key: "radioRef", ref: o, "onUpdate:modelValue": (h) => Tn(c) ? c.value = h : null, class: N(p(r).e("original")), value: p(u), name: g.name || ((d = p(a)) == null ? void 0 : d.name), disabled: p(l), checked: p(c) === p(u), type: "radio", onFocus: (h) => s.value = !0, onBlur: (h) => s.value = !1, onChange: f, onClick: Be(() => { }, ["stop"]) }, null, 42, ["onUpdate:modelValue", "value", "name", "disabled", "checked", "onFocus", "onBlur", "onClick"]), [ [jh, p(c)] ]), M("span", { class: N(p(r).e("inner")) }, null, 2) ], 2), M("span", { class: N(p(r).e("label")), onKeydown: Be(() => { }, ["stop"]) }, [ ee(g.$slots, "default", {}, () => [ Ce(se(g.label), 1) ]) ], 42, ["onKeydown"]) ], 2); }; } }); var FT = /* @__PURE__ */ ye(AT, [["__file", "radio.vue"]]); const PT = we({ ...Rg }), $T = K({ name: "ElRadioButton" }), RT = /* @__PURE__ */ K({ ...$T, props: PT, setup(e) { const t = e, n = be("radio"), { radioRef: r, focus: o, size: a, disabled: s, modelValue: i, radioGroup: l, actualValue: c } = Bg(t), u = w(() => ({ backgroundColor: (l == null ? void 0 : l.fill) || "", borderColor: (l == null ? void 0 : l.fill) || "", boxShadow: l != null && l.fill ? `-1px 0 0 0 ${l.fill}` : "", color: (l == null ? void 0 : l.textColor) || "" })); return (f, g) => { var v; return C(), F("label", { class: N([ p(n).b("button"), p(n).is("active", p(i) === p(c)), p(n).is("disabled", p(s)), p(n).is("focus", p(o)), p(n).bm("button", p(a)) ]) }, [ xe(M("input", { ref_key: "radioRef", ref: r, "onUpdate:modelValue": (d) => Tn(i) ? i.value = d : null, class: N(p(n).be("button", "original-radio")), value: p(c), type: "radio", name: f.name || ((v = p(l)) == null ? void 0 : v.name), disabled: p(s), onFocus: (d) => o.value = !0, onBlur: (d) => o.value = !1, onClick: Be(() => { }, ["stop"]) }, null, 42, ["onUpdate:modelValue", "value", "name", "disabled", "onFocus", "onBlur", "onClick"]), [ [jh, p(i)] ]), M("span", { class: N(p(n).be("button", "inner")), style: Ue(p(i) === p(c) ? p(u) : {}), onKeydown: Be(() => { }, ["stop"]) }, [ ee(f.$slots, "default", {}, () => [ Ce(se(f.label), 1) ]) ], 46, ["onKeydown"]) ], 2); }; } }); var Dg = /* @__PURE__ */ ye(RT, [["__file", "radio-button.vue"]]); const NT = we({ id: { type: String, default: void 0 }, size: lr, 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 }, ...Dr(["ariaLabel"]) }), LT = Ng, BT = K({ name: "ElRadioGroup" }), DT = /* @__PURE__ */ K({ ...BT, props: NT, emits: LT, setup(e, { emit: t }) { const n = e, r = be("radio"), o = ar(), a = $(), { formItem: s } = Mr(), { inputId: i, isLabeledByFormItem: l } = Xa(n, { formItemContext: s }), c = (f) => { t(ft, f), Re(() => t("change", f)); }; Ye(() => { const f = a.value.querySelectorAll("[type=radio]"), g = f[0]; !Array.from(f).some((v) => v.checked) && g && (g.tabIndex = 0); }); const u = w(() => n.name || o.value); return qe(Lg, mn({ ...vo(n), changeEvent: c, name: u })), oe(() => n.modelValue, () => { n.validateEvent && (s == null || s.validate("change").catch((f) => yt(f))); }), (f, g) => (C(), F("div", { id: p(i), ref_key: "radioGroupRef", ref: a, class: N(p(r).b("group")), role: "radiogroup", "aria-label": p(l) ? void 0 : f.ariaLabel || "radio-group", "aria-labelledby": p(l) ? p(s).labelId : void 0 }, [ ee(f.$slots, "default") ], 10, ["id", "aria-label", "aria-labelledby"])); } }); var Mg = /* @__PURE__ */ ye(DT, [["__file", "radio-group.vue"]]); const jg = vt(FT, { RadioButton: Dg, RadioGroup: Mg }), MT = bn(Mg); bn(Dg); var jT = K({ name: "NodeContent", setup() { return { ns: be("cascader-node") }; }, render() { const { ns: e } = this, { node: t, panel: n } = this.$parent, { data: r, label: o } = t, { renderLabelFn: a } = n; return Ct("span", { class: e.e("label") }, a ? a({ node: t, data: r }) : o); } }); const gu = Symbol(), VT = K({ name: "ElCascaderNode", components: { ElCheckbox: vu, ElRadio: jg, NodeContent: jT, ElIcon: He, Check: Zh, Loading: Si, ArrowRight: _i }, props: { node: { type: Object, required: !0 }, menuId: String }, emits: ["expand"], setup(e, { emit: t }) { const n = ce(gu), r = be("cascader-node"), o = w(() => n.isHoverMenu), a = w(() => n.config.multiple), s = w(() => n.config.checkStrictly), i = w(() => { var T; return (T = n.checkedNodes[0]) == null ? void 0 : T.uid; }), l = w(() => e.node.isDisabled), c = w(() => e.node.isLeaf), u = w(() => s.value && !c.value || !l.value), f = w(() => v(n.expandingNode)), g = w(() => s.value && n.checkedNodes.some(v)), v = (T) => { var I; const { level: R, uid: D } = e.node; return ((I = T == null ? void 0 : T.pathNodes[R - 1]) == null ? void 0 : I.uid) === D; }, d = () => { f.value || n.expandNode(e.node); }, h = (T) => { const { node: I } = e; T !== I.checked && n.handleCheckChange(I, T); }, m = () => { n.lazyLoad(e.node, () => { c.value || d(); }); }, y = (T) => { o.value && (x(), !c.value && t("expand", T)); }, x = () => { const { node: T } = e; !u.value || T.loading || (T.loaded ? d() : m()); }, A = () => { o.value && !c.value || (c.value && !l.value && !s.value && !a.value ? E(!0) : x()); }, k = (T) => { s.value ? (h(T), e.node.loaded && d()) : E(T); }, E = (T) => { e.node.loaded ? (h(T), !s.value && d()) : m(); }; return { panel: n, isHoverMenu: o, multiple: a, checkStrictly: s, checkedNodeId: i, isDisabled: l, isLeaf: c, expandable: u, inExpandingPath: f, inCheckedPath: g, ns: r, handleHoverExpand: y, handleExpand: x, handleClick: A, handleCheck: E, handleSelectCheck: k }; } }); function zT(e, t, n, r, o, a) { const s = Se("el-checkbox"), i = Se("el-radio"), l = Se("check"), c = Se("el-icon"), u = Se("node-content"), f = Se("loading"), g = Se("arrow-right"); return C(), F("li", { id: `${e.menuId}-${e.node.uid}`, role: "menuitem", "aria-haspopup": !e.isLeaf, "aria-owns": e.isLeaf ? null : e.menuId, "aria-expanded": e.inExpandingPath, tabindex: e.expandable ? -1 : void 0, class: N([ e.ns.b(), e.ns.is("selectable", e.checkStrictly), e.ns.is("active", e.node.checked), e.ns.is("disabled", !e.expandable), e.inExpandingPath && "in-active-path", e.inCheckedPath && "in-checked-path" ]), onMouseenter: e.handleHoverExpand, onFocus: e.handleHoverExpand, onClick: e.handleClick }, [ G(" prefix "), e.multiple ? (C(), J(s, { key: 0, "model-value": e.node.checked, indeterminate: e.node.indeterminate, disabled: e.isDisabled, onClick: Be(() => { }, ["stop"]), "onUpdate:modelValue": e.handleSelectCheck }, null, 8, ["model-value", "indeterminate", "disabled", "onClick", "onUpdate:modelValue"])) : e.checkStrictly ? (C(), J(i, { key: 1, "model-value": e.checkedNodeId, label: e.node.uid, disabled: e.isDisabled, "onUpdate:modelValue": e.handleSelectCheck, onClick: Be(() => { }, ["stop"]) }, { default: P(() => [ G(` Add an empty element to avoid render label, do not use empty fragment here for https://github.com/vuejs/vue-next/pull/2485 `), M("span") ]), _: 1 }, 8, ["model-value", "label", "disabled", "onUpdate:modelValue", "onClick"])) : e.isLeaf && e.node.checked ? (C(), J(c, { key: 2, class: N(e.ns.e("prefix")) }, { default: P(() => [ V(l) ]), _: 1 }, 8, ["class"])) : G("v-if", !0), G(" content "), V(u), G(" postfix "), e.isLeaf ? G("v-if", !0) : (C(), F(Ie, { key: 3 }, [ e.node.loading ? (C(), J(c, { key: 0, class: N([e.ns.is("loading"), e.ns.e("postfix")]) }, { default: P(() => [ V(f) ]), _: 1 }, 8, ["class"])) : (C(), J(c, { key: 1, class: N(["arrow-right", e.ns.e("postfix")]) }, { default: P(() => [ V(g) ]), _: 1 }, 8, ["class"])) ], 64)) ], 42, ["id", "aria-haspopup", "aria-owns", "aria-expanded", "tabindex", "onMouseenter", "onFocus", "onClick"]); } var HT = /* @__PURE__ */ ye(VT, [["render", zT], ["__file", "node.vue"]]); const UT = K({ name: "ElCascaderMenu", components: { Loading: Si, ElIcon: He, ElScrollbar: Bi, ElCascaderNode: HT }, props: { nodes: { type: Array, required: !0 }, index: { type: Number, required: !0 } }, setup(e) { const t = We(), n = be("cascader-menu"), { t: r } = wn(), o = ar(); let a = null, s = null; const i = ce(gu), l = $(null), c = w(() => !e.nodes.length), u = w(() => !i.initialLoaded), f = w(() => `${o.value}-${e.index}`), g = (m) => { a = m.target; }, v = (m) => { if (!(!i.isHoverMenu || !a || !l.value)) if (a.contains(m.target)) { d(); const y = t.vnode.el, { left: x } = y.getBoundingClientRect(), { offsetWidth: A, offsetHeight: k } = y, E = m.clientX - x, T = a.offsetTop, I = T + a.offsetHeight; l.value.innerHTML = ` `; } else s || (s = window.setTimeout(h, i.config.hoverThreshold)); }, d = () => { s && (clearTimeout(s), s = null); }, h = () => { l.value && (l.value.innerHTML = "", d()); }; return { ns: n, panel: i, hoverZone: l, isEmpty: c, isLoading: u, menuId: f, t: r, handleExpand: g, handleMouseMove: v, clearHoverZone: h }; } }); function qT(e, t, n, r, o, a) { const s = Se("el-cascader-node"), i = Se("loading"), l = Se("el-icon"), c = Se("el-scrollbar"); return C(), J(c, { key: e.menuId, tag: "ul", role: "menu", class: N(e.ns.b()), "wrap-class": e.ns.e("wrap"), "view-class": [e.ns.e("list"), e.ns.is("empty", e.isEmpty)], onMousemove: e.handleMouseMove, onMouseleave: e.clearHoverZone }, { default: P(() => { var u; return [ (C(!0), F(Ie, null, ot(e.nodes, (f) => (C(), J(s, { key: f.uid, node: f, "menu-id": e.menuId, onExpand: e.handleExpand }, null, 8, ["node", "menu-id", "onExpand"]))), 128)), e.isLoading ? (C(), F("div", { key: 0, class: N(e.ns.e("empty-text")) }, [ V(l, { size: "14", class: N(e.ns.is("loading")) }, { default: P(() => [ V(i) ]), _: 1 }, 8, ["class"]), Ce(" " + se(e.t("el.cascader.loading")), 1) ], 2)) : e.isEmpty ? (C(), F("div", { key: 1, class: N(e.ns.e("empty-text")) }, [ ee(e.$slots, "empty", {}, () => [ Ce(se(e.t("el.cascader.noData")), 1) ]) ], 2)) : (u = e.panel) != null && u.isHoverMenu ? (C(), F("svg", { key: 2, ref: "hoverZone", class: N(e.ns.e("hover-zone")) }, null, 2)) : G("v-if", !0) ]; }), _: 3 }, 8, ["class", "wrap-class", "view-class", "onMousemove", "onMouseleave"]); } var KT = /* @__PURE__ */ ye(UT, [["render", qT], ["__file", "menu.vue"]]); let WT = 0; const GT = (e) => { const t = [e]; let { parent: n } = e; for (; n; ) t.unshift(n), n = n.parent; return t; }; class Mo { constructor(t, n, r, o = !1) { this.data = t, this.config = n, this.parent = r, this.root = o, this.uid = WT++, this.checked = !1, this.indeterminate = !1, this.loading = !1; const { value: a, label: s, children: i } = n, l = t[i], c = GT(this); this.level = o ? 0 : r ? r.level + 1 : 1, this.value = t[a], this.label = t[s], this.pathNodes = c, this.pathValues = c.map((u) => u.value), this.pathLabels = c.map((u) => u.label), this.childrenData = l, this.children = (l || []).map((u) => new Mo(u, n, this)), this.loaded = !n.lazy || this.isLeaf || !oc(l); } get isDisabled() { const { data: t, parent: n, config: r } = this, { disabled: o, checkStrictly: a } = r; return (ut(o) ? o(t, this) : !!t[o]) || !a && (n == null ? void 0 : n.isDisabled); } get isLeaf() { const { data: t, config: n, childrenData: r, loaded: o } = this, { lazy: a, leaf: s } = n, i = ut(s) ? s(t, this) : t[s]; return gr(i) ? a && !o ? !1 : !(Array.isArray(r) && r.length) : !!i; } get valueByOption() { return this.config.emitPath ? this.pathValues : this.value; } appendChild(t) { const { childrenData: n, children: r } = this, o = new Mo(t, this.config, this); return Array.isArray(n) ? n.push(t) : this.childrenData = [t], r.push(o), o; } calcText(t, n) { const r = t ? this.pathLabels.join(n) : this.label; return this.text = r, r; } broadcast(t, ...n) { const r = `onParent${af(t)}`; this.children.forEach((o) => { o && (o.broadcast(t, ...n), o[r] && o[r](...n)); }); } emit(t, ...n) { const { parent: r } = this, o = `onChild${af(t)}`; r && (r[o] && r[o](...n), r.emit(t, ...n)); } onParentCheck(t) { this.isDisabled || this.setCheckState(t); } onChildCheck() { const { children: t } = this, n = t.filter((o) => !o.isDisabled), r = n.length ? n.every((o) => o.checked) : !1; this.setCheckState(r); } setCheckState(t) { const n = this.children.length, r = this.children.reduce((o, a) => { const s = a.checked ? 1 : a.indeterminate ? 0.5 : 0; return o + s; }, 0); this.checked = this.loaded && this.children.filter((o) => !o.isDisabled).every((o) => o.loaded && o.checked) && t, this.indeterminate = this.loaded && r !== n && r > 0; } doCheck(t) { if (this.checked === t) return; const { checkStrictly: n, multiple: r } = this.config; n || !r ? this.checked = t : (this.broadcast("check", t), this.setCheckState(t), this.emit("check")); } } const dc = (e, t) => e.reduce((n, r) => (r.isLeaf ? n.push(r) : (!t && n.push(r), n = n.concat(dc(r.children, t))), n), []); class zf { constructor(t, n) { this.config = n; const r = (t || []).map((o) => new Mo(o, this.config)); this.nodes = r, this.allNodes = dc(r, !1), this.leafNodes = dc(r, !0); } getNodes() { return this.nodes; } getFlattedNodes(t) { return t ? this.leafNodes : this.allNodes; } appendNode(t, n) { const r = n ? n.appendChild(t) : new Mo(t, this.config); n || this.nodes.push(r), this.allNodes.push(r), r.isLeaf && this.leafNodes.push(r); } appendNodes(t, n) { t.forEach((r) => this.appendNode(r, n)); } getNodeByValue(t, n = !1) { return !t && t !== 0 ? null : this.getFlattedNodes(n).find((o) => tr(o.value, t) || tr(o.pathValues, t)) || null; } getSameNode(t) { return t && this.getFlattedNodes(!1).find(({ value: r, level: o }) => tr(t.value, r) && t.level === o) || null; } } const Vg = we({ modelValue: { type: ue([Number, String, Array]) }, options: { type: ue(Array), default: () => [] }, props: { type: ue(Object), default: () => ({}) } }), JT = { expandTrigger: "click", multiple: !1, checkStrictly: !1, emitPath: !0, lazy: !1, lazyLoad: mr, value: "value", label: "label", children: "children", leaf: "leaf", disabled: "disabled", hoverThreshold: 500 }, ZT = (e) => w(() => ({ ...JT, ...e.props })), Hf = (e) => { if (!e) return 0; const t = e.id.split("-"); return Number(t[t.length - 2]); }, YT = (e) => { if (!e) return; const t = e.querySelector("input"); t ? t.click() : tv(e) && e.click(); }, XT = (e, t) => { const n = t.slice(0), r = n.map((a) => a.uid), o = e.reduce((a, s) => { const i = r.indexOf(s.uid); return i > -1 && (a.push(s), n.splice(i, 1), r.splice(i, 1)), a; }, []); return o.push(...n), o; }, QT = K({ name: "ElCascaderPanel", components: { ElCascaderMenu: KT }, props: { ...Vg, border: { type: Boolean, default: !0 }, renderLabel: Function }, emits: [ft, io, "close", "expand-change"], setup(e, { emit: t, slots: n }) { let r = !1; const o = be("cascader"), a = ZT(e); let s = null; const i = $(!0), l = $([]), c = $(null), u = $([]), f = $(null), g = $([]), v = w(() => a.value.expandTrigger === "hover"), d = w(() => e.renderLabel || n.default), h = () => { const { options: U } = e, X = a.value; r = !1, s = new zf(U, X), u.value = [s.getNodes()], X.lazy && oc(e.options) ? (i.value = !1, m(void 0, (de) => { de && (s = new zf(de, X), u.value = [s.getNodes()]), i.value = !0, R(!1, !0); })) : R(!1, !0); }, m = (U, X) => { const de = a.value; U = U || new Mo({}, de, void 0, !0), U.loading = !0; const re = (L) => { const Z = U, ve = Z.root ? null : Z; L && (s == null || s.appendNodes(L, ve)), Z.loading = !1, Z.loaded = !0, Z.childrenData = Z.childrenData || [], X && X(L); }; de.lazyLoad(U, re); }, y = (U, X) => { var de; const { level: re } = U, L = u.value.slice(0, re); let Z; U.isLeaf ? Z = U.pathNodes[re - 2] : (Z = U, L.push(U.children)), ((de = f.value) == null ? void 0 : de.uid) !== (Z == null ? void 0 : Z.uid) && (f.value = U, u.value = L, !X && t("expand-change", (U == null ? void 0 : U.pathValues) || [])); }, x = (U, X, de = !0) => { const { checkStrictly: re, multiple: L } = a.value, Z = g.value[0]; r = !0, !L && (Z == null || Z.doCheck(!1)), U.doCheck(X), I(), de && !L && !re && t("close"), !de && !L && !re && A(U); }, A = (U) => { U && (U = U.parent, A(U), U && y(U)); }, k = (U) => s == null ? void 0 : s.getFlattedNodes(U), E = (U) => { var X; return (X = k(U)) == null ? void 0 : X.filter((de) => de.checked !== !1); }, T = () => { g.value.forEach((U) => U.doCheck(!1)), I(), u.value = u.value.slice(0, 1), f.value = null, t("expand-change", []); }, I = () => { var U; const { checkStrictly: X, multiple: de } = a.value, re = g.value, L = E(!X), Z = XT(re, L), ve = Z.map((me) => me.valueByOption); g.value = Z, c.value = de ? ve : (U = ve[0]) != null ? U : null; }, R = (U = !1, X = !1) => { const { modelValue: de } = e, { lazy: re, multiple: L, checkStrictly: Z } = a.value, ve = !Z; if (!(!i.value || r || !X && tr(de, c.value))) if (re && !U) { const Ne = uf(yk(df(de))).map((_e) => s == null ? void 0 : s.getNodeByValue(_e)).filter((_e) => !!_e && !_e.loaded && !_e.loading); Ne.length ? Ne.forEach((_e) => { m(_e, () => R(!1, X)); }) : R(!0, X); } else { const me = L ? df(de) : [de], Ne = uf(me.map((_e) => s == null ? void 0 : s.getNodeByValue(_e, ve))); D(Ne, X), c.value = xv(de); } }, D = (U, X = !0) => { const { checkStrictly: de } = a.value, re = g.value, L = U.filter((me) => !!me && (de || me.isLeaf)), Z = s == null ? void 0 : s.getSameNode(f.value), ve = X && Z || L[0]; ve ? ve.pathNodes.forEach((me) => y(me, !0)) : f.value = null, re.forEach((me) => me.doCheck(!1)), mn(L).forEach((me) => me.doCheck(!0)), g.value = L, Re(W); }, W = () => { Qe && l.value.forEach((U) => { const X = U == null ? void 0 : U.$el; if (X) { const de = X.querySelector(`.${o.namespace.value}-scrollbar__wrap`), re = X.querySelector(`.${o.b("node")}.${o.is("active")}`) || X.querySelector(`.${o.b("node")}.in-active-path`); Bv(de, re); } }); }, z = (U) => { const X = U.target, { code: de } = U; switch (de) { case Ve.up: case Ve.down: { U.preventDefault(); const re = de === Ve.up ? -1 : 1; Ls(nv(X, re, `.${o.b("node")}[tabindex="-1"]`)); break; } case Ve.left: { U.preventDefault(); const re = l.value[Hf(X) - 1], L = re == null ? void 0 : re.$el.querySelector(`.${o.b("node")}[aria-expanded="true"]`); Ls(L); break; } case Ve.right: { U.preventDefault(); const re = l.value[Hf(X) + 1], L = re == null ? void 0 : re.$el.querySelector(`.${o.b("node")}[tabindex="-1"]`); Ls(L); break; } case Ve.enter: YT(X); break; } }; return qe(gu, mn({ config: a, expandingNode: f, checkedNodes: g, isHoverMenu: v, initialLoaded: i, renderLabelFn: d, lazyLoad: m, expandNode: y, handleCheckChange: x })), oe([a, () => e.options], h, { deep: !0, immediate: !0 }), oe(() => e.modelValue, () => { r = !1, R(); }, { deep: !0 }), oe(() => c.value, (U) => { tr(U, e.modelValue) || (t(ft, U), t(io, U)); }), xb(() => l.value = []), Ye(() => !oc(e.modelValue) && R()), { ns: o, menuList: l, menus: u, checkedNodes: g, handleKeyDown: z, handleCheckChange: x, getFlattedNodes: k, getCheckedNodes: E, clearCheckedNodes: T, calculateCheckedValue: I, scrollToExpandingNode: W }; } }); function eO(e, t, n, r, o, a) { const s = Se("el-cascader-menu"); return C(), F("div", { class: N([e.ns.b("panel"), e.ns.is("bordered", e.border)]), onKeydown: e.handleKeyDown }, [ (C(!0), F(Ie, null, ot(e.menus, (i, l) => (C(), J(s, { key: l, ref_for: !0, ref: (c) => e.menuList[l] = c, index: l, nodes: [...i] }, { empty: P(() => [ ee(e.$slots, "empty") ]), _: 2 }, 1032, ["index", "nodes"]))), 128)) ], 42, ["onKeydown"]); } var tO = /* @__PURE__ */ ye(QT, [["render", eO], ["__file", "index.vue"]]); const nO = vt(tO), Ba = we({ type: { type: String, values: ["primary", "success", "info", "warning", "danger"], default: "primary" }, closable: Boolean, disableTransitions: Boolean, hit: Boolean, color: String, size: { type: String, values: Ri }, effect: { type: String, values: ["dark", "light", "plain"], default: "light" }, round: Boolean }), rO = { close: (e) => e instanceof MouseEvent, click: (e) => e instanceof MouseEvent }, oO = K({ name: "ElTag" }), aO = /* @__PURE__ */ K({ ...oO, props: Ba, emits: rO, setup(e, { emit: t }) { const n = e, r = wr(), o = be("tag"), a = w(() => { const { type: c, hit: u, effect: f, closable: g, round: v } = n; return [ o.b(), o.is("closable", g), o.m(c || "primary"), o.m(r.value), o.m(f), o.is("hit", u), o.is("round", v) ]; }), s = (c) => { t("close", c); }, i = (c) => { t("click", c); }, l = (c) => { c.component.subTree.component.bum = null; }; return (c, u) => c.disableTransitions ? (C(), F("span", { key: 0, class: N(p(a)), style: Ue({ backgroundColor: c.color }), onClick: i }, [ M("span", { class: N(p(o).e("content")) }, [ ee(c.$slots, "default") ], 2), c.closable ? (C(), J(p(He), { key: 0, class: N(p(o).e("close")), onClick: Be(s, ["stop"]) }, { default: P(() => [ V(p(ao)) ]), _: 1 }, 8, ["class", "onClick"])) : G("v-if", !0) ], 6)) : (C(), J(ir, { key: 1, name: `${p(o).namespace.value}-zoom-in-center`, appear: "", onVnodeMounted: l }, { default: P(() => [ M("span", { class: N(p(a)), style: Ue({ backgroundColor: c.color }), onClick: i }, [ M("span", { class: N(p(o).e("content")) }, [ ee(c.$slots, "default") ], 2), c.closable ? (C(), J(p(He), { key: 0, class: N(p(o).e("close")), onClick: Be(s, ["stop"]) }, { default: P(() => [ V(p(ao)) ]), _: 1 }, 8, ["class", "onClick"])) : G("v-if", !0) ], 6) ]), _: 3 }, 8, ["name"])); } }); var sO = /* @__PURE__ */ ye(aO, [["__file", "tag.vue"]]); const lo = vt(sO), iO = we({ ...Vg, size: lr, placeholder: String, disabled: Boolean, clearable: Boolean, filterable: Boolean, filterMethod: { type: ue(Function), default: (e, t) => e.text.includes(t) }, separator: { type: String, default: " / " }, showAllLevels: { type: Boolean, default: !0 }, collapseTags: Boolean, maxCollapseTags: { type: Number, default: 1 }, collapseTagsTooltip: { type: Boolean, default: !1 }, debounce: { type: Number, default: 300 }, beforeFilter: { type: ue(Function), default: () => !0 }, placement: { type: ue(String), values: Ja, default: "bottom-start" }, fallbackPlacements: { type: ue(Array), default: ["bottom-start", "bottom", "top-start", "top", "right", "left"] }, popperClass: { type: String, default: "" }, teleported: Qt.teleported, tagType: { ...Ba.type, default: "info" }, tagEffect: { ...Ba.effect, default: "light" }, validateEvent: { type: Boolean, default: !0 }, persistent: { type: Boolean, default: !0 }, ...lu }), lO = { [ft]: (e) => !0, [io]: (e) => !0, focus: (e) => e instanceof FocusEvent, blur: (e) => e instanceof FocusEvent, clear: () => !0, visibleChange: (e) => An(e), expandChange: (e) => !!e, removeTag: (e) => !!e }, cO = "ElCascader", uO = K({ name: cO }), dO = /* @__PURE__ */ K({ ...uO, props: iO, emits: lO, setup(e, { expose: t, emit: n }) { const r = e, o = { modifiers: [ { name: "arrowPosition", enabled: !0, phase: "main", fn: ({ state: Y }) => { const { modifiersData: pe, placement: he } = Y; ["right", "left", "bottom", "top"].includes(he) || (pe.arrow.x = 35); }, requires: ["arrow"] } ] }, a = Rh(); let s = 0, i = 0; const l = be("cascader"), c = be("input"), { t: u } = wn(), { form: f, formItem: g } = Mr(), { valueOnClear: v } = ug(r), { isComposing: d, handleComposition: h } = iu({ afterComposition(Y) { var pe; const he = (pe = Y.target) == null ? void 0 : pe.value; Vr(he); } }), m = $(null), y = $(null), x = $(null), A = $(null), k = $(null), E = $(!1), T = $(!1), I = $(!1), R = $(!1), D = $(""), W = $(""), z = $([]), U = $([]), X = $([]), de = w(() => a.style), re = w(() => r.disabled || (f == null ? void 0 : f.disabled)), L = w(() => r.placeholder || u("el.cascader.placeholder")), Z = w(() => W.value || z.value.length > 0 || d.value ? "" : L.value), ve = wr(), me = w(() => ["small"].includes(ve.value) ? "small" : "default"), Ne = w(() => !!r.props.multiple), _e = w(() => !r.filterable || Ne.value), ze = w(() => Ne.value ? W.value : D.value), at = w(() => { var Y; return ((Y = A.value) == null ? void 0 : Y.checkedNodes) || []; }), Ge = w(() => !r.clearable || re.value || I.value || !T.value ? !1 : !!at.value.length), Le = w(() => { const { showAllLevels: Y, separator: pe } = r, he = at.value; return he.length ? Ne.value ? "" : he[0].calcText(Y, pe) : ""; }), Ke = w(() => (g == null ? void 0 : g.validateState) || ""), nt = w({ get() { return xv(r.modelValue); }, set(Y) { const pe = Y ?? v.value; n(ft, pe), n(io, pe), r.validateEvent && (g == null || g.validate("change").catch((he) => yt(he))); } }), dt = w(() => [ l.b(), l.m(ve.value), l.is("disabled", re.value), a.class ]), Cn = w(() => [ c.e("icon"), "icon-arrow-down", l.is("reverse", E.value) ]), Rt = w(() => l.is("focus", E.value || R.value)), Tt = w(() => { var Y, pe; return (pe = (Y = m.value) == null ? void 0 : Y.popperRef) == null ? void 0 : pe.contentRef; }), st = (Y) => { var pe, he, Ze; re.value || (Y = Y ?? !E.value, Y !== E.value && (E.value = Y, (he = (pe = y.value) == null ? void 0 : pe.input) == null || he.setAttribute("aria-expanded", `${Y}`), Y ? (gt(), Re((Ze = A.value) == null ? void 0 : Ze.scrollToExpandingNode)) : r.filterable && te(), n("visibleChange", Y))); }, gt = () => { Re(() => { var Y; (Y = m.value) == null || Y.updatePopper(); }); }, Wt = () => { I.value = !1; }, Gt = (Y) => { const { showAllLevels: pe, separator: he } = r; return { node: Y, key: Y.uid, text: Y.calcText(pe, he), hitState: !1, closable: !re.value && !Y.isDisabled, isCollapseTag: !1 }; }, Et = (Y) => { var pe; const he = Y.node; he.doCheck(!1), (pe = A.value) == null || pe.calculateCheckedValue(), n("removeTag", he.valueByOption); }, Jt = () => { if (!Ne.value) return; const Y = at.value, pe = [], he = []; if (Y.forEach((Ze) => he.push(Gt(Ze))), U.value = he, Y.length) { Y.slice(0, r.maxCollapseTags).forEach((Zt) => pe.push(Gt(Zt))); const Ze = Y.slice(r.maxCollapseTags), dn = Ze.length; dn && (r.collapseTags ? pe.push({ key: -1, text: `+ ${dn}`, closable: !1, isCollapseTag: !0 }) : Ze.forEach((Zt) => pe.push(Gt(Zt)))); } z.value = pe; }, Nt = () => { var Y, pe; const { filterMethod: he, showAllLevels: Ze, separator: dn } = r, Zt = (pe = (Y = A.value) == null ? void 0 : Y.getFlattedNodes(!r.props.checkStrictly)) == null ? void 0 : pe.filter((fn) => fn.isDisabled ? !1 : (fn.calcText(Ze, dn), he(fn, ze.value))); Ne.value && (z.value.forEach((fn) => { fn.hitState = !1; }), U.value.forEach((fn) => { fn.hitState = !1; })), I.value = !0, X.value = Zt, gt(); }, Sn = () => { var Y; let pe; I.value && k.value ? pe = k.value.$el.querySelector(`.${l.e("suggestion-item")}`) : pe = (Y = A.value) == null ? void 0 : Y.$el.querySelector(`.${l.b("node")}[tabindex="-1"]`), pe && (pe.focus(), !I.value && pe.click()); }, Je = () => { var Y, pe; const he = (Y = y.value) == null ? void 0 : Y.input, Ze = x.value, dn = (pe = k.value) == null ? void 0 : pe.$el; if (!(!Qe || !he)) { if (dn) { const Zt = dn.querySelector(`.${l.e("suggestion-list")}`); Zt.style.minWidth = `${he.offsetWidth}px`; } if (Ze) { const { offsetHeight: Zt } = Ze, fn = z.value.length > 0 ? `${Math.max(Zt + 6, s)}px` : `${s}px`; he.style.height = fn, gt(); } } }, Ot = (Y) => { var pe; return (pe = A.value) == null ? void 0 : pe.getCheckedNodes(Y); }, zt = (Y) => { gt(), n("expandChange", Y); }, cn = (Y) => { if (!d.value) switch (Y.code) { case Ve.enter: st(); break; case Ve.down: st(!0), Re(Sn), Y.preventDefault(); break; case Ve.esc: E.value === !0 && (Y.preventDefault(), Y.stopPropagation(), st(!1)); break; case Ve.tab: st(!1); break; } }, It = () => { var Y; (Y = A.value) == null || Y.clearCheckedNodes(), !E.value && r.filterable && te(), st(!1), n("clear"); }, te = () => { const { value: Y } = Le; D.value = Y, W.value = Y; }, $e = (Y) => { var pe, he; const { checked: Ze } = Y; Ne.value ? (pe = A.value) == null || pe.handleCheckChange(Y, !Ze, !1) : (!Ze && ((he = A.value) == null || he.handleCheckChange(Y, !0, !1)), st(!1)); }, it = (Y) => { const pe = Y.target, { code: he } = Y; switch (he) { case Ve.up: case Ve.down: { const Ze = he === Ve.up ? -1 : 1; Ls(nv(pe, Ze, `.${l.e("suggestion-item")}[tabindex="-1"]`)); break; } case Ve.enter: pe.click(); break; } }, Ht = () => { const Y = z.value, pe = Y[Y.length - 1]; i = W.value ? 0 : i + 1, !(!pe || !i || r.collapseTags && Y.length > 1) && (pe.hitState ? Et(pe) : pe.hitState = !0); }, un = (Y) => { const pe = Y.target, he = l.e("search-input"); pe.className === he && (R.value = !0), n("focus", Y); }, wo = (Y) => { R.value = !1, n("blur", Y); }, oa = Fv(() => { const { value: Y } = ze; if (!Y) return; const pe = r.beforeFilter(Y); u1(pe) ? pe.then(Nt).catch(() => { }) : pe !== !1 ? Nt() : Wt(); }, r.debounce), Vr = (Y, pe) => { !E.value && st(!0), !(pe != null && pe.isComposing) && (Y ? oa() : Wt()); }, zr = (Y) => Number.parseFloat(Jb(c.cssVarName("input-height"), Y).value) - 2; return oe(I, gt), oe([at, re, () => r.collapseTags], Jt), oe(z, () => { Re(() => Je()); }), oe(ve, async () => { await Re(); const Y = y.value.input; s = zr(Y) || s, Je(); }), oe(Le, te, { immediate: !0 }), Ye(() => { const Y = y.value.input, pe = zr(Y); s = Y.offsetHeight || pe, Vn(Y, Je); }), t({ getCheckedNodes: Ot, cascaderPanelRef: A, togglePopperVisible: st, contentRef: Tt, presentText: Le }), (Y, pe) => (C(), J(p(La), { ref_key: "tooltipRef", ref: m, visible: E.value, teleported: Y.teleported, "popper-class": [p(l).e("dropdown"), Y.popperClass], "popper-options": o, "fallback-placements": Y.fallbackPlacements, "stop-popper-mouse-event": !1, "gpu-acceleration": !1, placement: Y.placement, transition: `${p(l).namespace.value}-zoom-in-top`, effect: "light", pure: "", persistent: Y.persistent, onHide: Wt }, { default: P(() => [ xe((C(), F("div", { class: N(p(dt)), style: Ue(p(de)), onClick: () => st(p(_e) ? void 0 : !0), onKeydown: cn, onMouseenter: (he) => T.value = !0, onMouseleave: (he) => T.value = !1 }, [ V(p(Go), { ref_key: "input", ref: y, modelValue: D.value, "onUpdate:modelValue": (he) => D.value = he, placeholder: p(Z), readonly: p(_e), disabled: p(re), "validate-event": !1, size: p(ve), class: N(p(Rt)), tabindex: p(Ne) && Y.filterable && !p(re) ? -1 : void 0, onCompositionstart: p(h), onCompositionupdate: p(h), onCompositionend: p(h), onFocus: un, onBlur: wo, onInput: Vr }, { suffix: P(() => [ p(Ge) ? (C(), J(p(He), { key: "clear", class: N([p(c).e("icon"), "icon-circle-close"]), onClick: Be(It, ["stop"]) }, { default: P(() => [ V(p(ki)) ]), _: 1 }, 8, ["class", "onClick"])) : (C(), J(p(He), { key: "arrow-down", class: N(p(Cn)), onClick: Be((he) => st(), ["stop"]) }, { default: P(() => [ V(p(Ei)) ]), _: 1 }, 8, ["class", "onClick"])) ]), _: 1 }, 8, ["modelValue", "onUpdate:modelValue", "placeholder", "readonly", "disabled", "size", "class", "tabindex", "onCompositionstart", "onCompositionupdate", "onCompositionend"]), p(Ne) ? (C(), F("div", { key: 0, ref_key: "tagWrapper", ref: x, class: N([ p(l).e("tags"), p(l).is("validate", !!p(Ke)) ]) }, [ (C(!0), F(Ie, null, ot(z.value, (he) => (C(), J(p(lo), { key: he.key, type: Y.tagType, size: p(me), effect: Y.tagEffect, hit: he.hitState, closable: he.closable, "disable-transitions": "", onClose: (Ze) => Et(he) }, { default: P(() => [ he.isCollapseTag === !1 ? (C(), F("span", { key: 0 }, se(he.text), 1)) : (C(), J(p(La), { key: 1, disabled: E.value || !Y.collapseTagsTooltip, "fallback-placements": ["bottom", "top", "right", "left"], placement: "bottom", effect: "light" }, { default: P(() => [ M("span", null, se(he.text), 1) ]), content: P(() => [ M("div", { class: N(p(l).e("collapse-tags")) }, [ (C(!0), F(Ie, null, ot(U.value.slice(Y.maxCollapseTags), (Ze, dn) => (C(), F("div", { key: dn, class: N(p(l).e("collapse-tag")) }, [ (C(), J(p(lo), { key: Ze.key, class: "in-tooltip", type: Y.tagType, size: p(me), effect: Y.tagEffect, hit: Ze.hitState, closable: Ze.closable, "disable-transitions": "", onClose: (Zt) => Et(Ze) }, { default: P(() => [ M("span", null, se(Ze.text), 1) ]), _: 2 }, 1032, ["type", "size", "effect", "hit", "closable", "onClose"])) ], 2))), 128)) ], 2) ]), _: 2 }, 1032, ["disabled"])) ]), _: 2 }, 1032, ["type", "size", "effect", "hit", "closable", "onClose"]))), 128)), Y.filterable && !p(re) ? xe((C(), F("input", { key: 0, "onUpdate:modelValue": (he) => W.value = he, type: "text", class: N(p(l).e("search-input")), placeholder: p(Le) ? "" : p(L), onInput: (he) => Vr(W.value, he), onClick: Be((he) => st(!0), ["stop"]), onKeydown: Wr(Ht, ["delete"]), onCompositionstart: p(h), onCompositionupdate: p(h), onCompositionend: p(h), onFocus: un, onBlur: wo }, null, 42, ["onUpdate:modelValue", "placeholder", "onInput", "onClick", "onKeydown", "onCompositionstart", "onCompositionupdate", "onCompositionend"])), [ [Vh, W.value] ]) : G("v-if", !0) ], 2)) : G("v-if", !0) ], 46, ["onClick", "onMouseenter", "onMouseleave"])), [ [p(Og), () => st(!1), p(Tt)] ]) ]), content: P(() => [ xe(V(p(nO), { ref_key: "cascaderPanelRef", ref: A, modelValue: p(nt), "onUpdate:modelValue": (he) => Tn(nt) ? nt.value = he : null, options: Y.options, props: r.props, border: !1, "render-label": Y.$slots.default, onExpandChange: zt, onClose: (he) => Y.$nextTick(() => st(!1)) }, { empty: P(() => [ ee(Y.$slots, "empty") ]), _: 3 }, 8, ["modelValue", "onUpdate:modelValue", "options", "props", "render-label", "onClose"]), [ [ht, !I.value] ]), Y.filterable ? xe((C(), J(p(Bi), { key: 0, ref_key: "suggestionPanel", ref: k, tag: "ul", class: N(p(l).e("suggestion-panel")), "view-class": p(l).e("suggestion-list"), onKeydown: it }, { default: P(() => [ X.value.length ? (C(!0), F(Ie, { key: 0 }, ot(X.value, (he) => (C(), F("li", { key: he.uid, class: N([ p(l).e("suggestion-item"), p(l).is("checked", he.checked) ]), tabindex: -1, onClick: (Ze) => $e(he) }, [ M("span", null, se(he.text), 1), he.checked ? (C(), J(p(He), { key: 0 }, { default: P(() => [ V(p(Zh)) ]), _: 1 })) : G("v-if", !0) ], 10, ["onClick"]))), 128)) : ee(Y.$slots, "empty", { key: 1 }, () => [ M("li", { class: N(p(l).e("empty-text")) }, se(p(u)("el.cascader.noMatch")), 3) ]) ]), _: 3 }, 8, ["class", "view-class"])), [ [ht, I.value] ]) : G("v-if", !0) ]), _: 3 }, 8, ["visible", "teleported", "popper-class", "fallback-placements", "placement", "transition", "persistent"])); } }); var fO = /* @__PURE__ */ ye(dO, [["__file", "cascader.vue"]]); const zg = vt(fO), Hg = Symbol("rowContextKey"), pO = [ "start", "center", "end", "space-around", "space-between", "space-evenly" ], hO = ["top", "middle", "bottom"], vO = we({ tag: { type: String, default: "div" }, gutter: { type: Number, default: 0 }, justify: { type: String, values: pO, default: "start" }, align: { type: String, values: hO } }), gO = K({ name: "ElRow" }), mO = /* @__PURE__ */ K({ ...gO, props: vO, setup(e) { const t = e, n = be("row"), r = w(() => t.gutter); qe(Hg, { gutter: r }); const o = w(() => { const s = {}; return t.gutter && (s.marginRight = s.marginLeft = `-${t.gutter / 2}px`), s; }), a = w(() => [ n.b(), n.is(`justify-${t.justify}`, t.justify !== "start"), n.is(`align-${t.align}`, !!t.align) ]); return (s, i) => (C(), J(pt(s.tag), { class: N(p(a)), style: Ue(p(o)) }, { default: P(() => [ ee(s.$slots, "default") ]), _: 3 }, 8, ["class", "style"])); } }); var yO = /* @__PURE__ */ ye(mO, [["__file", "row.vue"]]); const mu = vt(yO), bO = we({ 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: ue([Number, Object]), default: () => vr({}) }, sm: { type: ue([Number, Object]), default: () => vr({}) }, md: { type: ue([Number, Object]), default: () => vr({}) }, lg: { type: ue([Number, Object]), default: () => vr({}) }, xl: { type: ue([Number, Object]), default: () => vr({}) } }), wO = K({ name: "ElCol" }), CO = /* @__PURE__ */ K({ ...wO, props: bO, setup(e) { const t = e, { gutter: n } = ce(Hg, { gutter: w(() => 0) }), r = be("col"), o = w(() => { const s = {}; return n.value && (s.paddingLeft = s.paddingRight = `${n.value / 2}px`), s; }), a = w(() => { const s = []; return ["span", "offset", "pull", "push"].forEach((c) => { const u = t[c]; je(u) && (c === "span" ? s.push(r.b(`${t[c]}`)) : u > 0 && s.push(r.b(`${c}-${t[c]}`))); }), ["xs", "sm", "md", "lg", "xl"].forEach((c) => { je(t[c]) ? s.push(r.b(`${c}-${t[c]}`)) : At(t[c]) && Object.entries(t[c]).forEach(([u, f]) => { s.push(u !== "span" ? r.b(`${c}-${u}-${f}`) : r.b(`${c}-${f}`)); }); }), n.value && s.push(r.is("guttered")), [r.b(), s]; }); return (s, i) => (C(), J(pt(s.tag), { class: N(p(a)), style: Ue(p(o)) }, { default: P(() => [ ee(s.$slots, "default") ]), _: 3 }, 8, ["class", "style"])); } }); var SO = /* @__PURE__ */ ye(CO, [["__file", "col.vue"]]); const yu = vt(SO), kO = K({ name: "ElContainer" }), _O = /* @__PURE__ */ K({ ...kO, props: { direction: { type: String } }, setup(e) { const t = e, n = ho(), r = be("container"), o = w(() => t.direction === "vertical" ? !0 : t.direction === "horizontal" ? !1 : n && n.default ? n.default().some((s) => { const i = s.type.name; return i === "ElHeader" || i === "ElFooter"; }) : !1); return (a, s) => (C(), F("section", { class: N([p(r).b(), p(r).is("vertical", p(o))]) }, [ ee(a.$slots, "default") ], 2)); } }); var EO = /* @__PURE__ */ ye(_O, [["__file", "container.vue"]]); const xO = K({ name: "ElAside" }), TO = /* @__PURE__ */ K({ ...xO, props: { width: { type: String, default: null } }, setup(e) { const t = e, n = be("aside"), r = w(() => t.width ? n.cssVarBlock({ width: t.width }) : {}); return (o, a) => (C(), F("aside", { class: N(p(n).b()), style: Ue(p(r)) }, [ ee(o.$slots, "default") ], 6)); } }); var Ug = /* @__PURE__ */ ye(TO, [["__file", "aside.vue"]]); const OO = K({ name: "ElFooter" }), IO = /* @__PURE__ */ K({ ...OO, props: { height: { type: String, default: null } }, setup(e) { const t = e, n = be("footer"), r = w(() => t.height ? n.cssVarBlock({ height: t.height }) : {}); return (o, a) => (C(), F("footer", { class: N(p(n).b()), style: Ue(p(r)) }, [ ee(o.$slots, "default") ], 6)); } }); var qg = /* @__PURE__ */ ye(IO, [["__file", "footer.vue"]]); const AO = K({ name: "ElHeader" }), FO = /* @__PURE__ */ K({ ...AO, props: { height: { type: String, default: null } }, setup(e) { const t = e, n = be("header"), r = w(() => t.height ? n.cssVarBlock({ height: t.height }) : {}); return (o, a) => (C(), F("header", { class: N(p(n).b()), style: Ue(p(r)) }, [ ee(o.$slots, "default") ], 6)); } }); var Kg = /* @__PURE__ */ ye(FO, [["__file", "header.vue"]]); const PO = K({ name: "ElMain" }), $O = /* @__PURE__ */ K({ ...PO, setup(e) { const t = be("main"); return (n, r) => (C(), F("main", { class: N(p(t).b()) }, [ ee(n.$slots, "default") ], 2)); } }); var Wg = /* @__PURE__ */ ye($O, [["__file", "main.vue"]]); const RO = vt(EO, { Aside: Ug, Footer: qg, Header: Kg, Main: Wg }); bn(Ug); bn(qg); bn(Kg); bn(Wg); const NO = we({ mask: { type: Boolean, default: !0 }, customMaskEvent: Boolean, overlayClass: { type: ue([ String, Array, Object ]) }, zIndex: { type: ue([String, Number]) } }), LO = { click: (e) => e instanceof MouseEvent }, BO = "overlay"; var DO = K({ name: "ElOverlay", props: NO, emits: LO, setup(e, { slots: t, emit: n }) { const r = be(BO), o = (l) => { n("click", l); }, { onClick: a, onMousedown: s, onMouseup: i } = W_(e.customMaskEvent ? void 0 : o); return () => e.mask ? V("div", { class: [r.b(), e.overlayClass], style: { zIndex: e.zIndex }, onClick: a, onMousedown: s, onMouseup: i }, [ee(t, "default")], Ds.STYLE | Ds.CLASS | Ds.PROPS, ["onClick", "onMouseup", "onMousedown"]) : Ct("div", { class: e.overlayClass, style: { zIndex: e.zIndex, position: "fixed", top: "0px", right: "0px", bottom: "0px", left: "0px" } }, [ee(t, "default")]); } }); const MO = DO, jO = we({ center: Boolean, alignCenter: Boolean, closeIcon: { type: yn }, draggable: Boolean, overflow: Boolean, fullscreen: Boolean, showClose: { type: Boolean, default: !0 }, title: { type: String, default: "" }, ariaLevel: { type: String, default: "2" } }), VO = we({ ...jO, appendToBody: Boolean, appendTo: { type: ue([String, Object]), default: "body" }, beforeClose: { type: ue(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" } }), zO = { open: () => !0, opened: () => !0, close: () => !0, closed: () => !0, [ft]: (e) => An(e), openAutoFocus: () => !0, closeAutoFocus: () => !0 }, HO = (e, t) => { var n; const o = We().emit, { nextZIndex: a } = su(); let s = ""; const i = ar(), l = ar(), c = $(!1), u = $(!1), f = $(!1), g = $((n = e.zIndex) != null ? n : a()); let v, d; const h = Li("namespace", Ca), m = w(() => { const re = {}, L = `--${h.value}-dialog`; return e.fullscreen || (e.top && (re[`${L}-margin-top`] = e.top), e.width && (re[`${L}-width`] = yr(e.width))), re; }), y = w(() => e.alignCenter ? { display: "flex" } : {}); function x() { o("opened"); } function A() { o("closed"), o(ft, !1), e.destroyOnClose && (f.value = !1); } function k() { o("close"); } function E() { d == null || d(), v == null || v(), e.openDelay && e.openDelay > 0 ? { stop: v } = Xl(() => D(), e.openDelay) : D(); } function T() { v == null || v(), d == null || d(), e.closeDelay && e.closeDelay > 0 ? { stop: d } = Xl(() => W(), e.closeDelay) : W(); } function I() { function re(L) { L || (u.value = !0, c.value = !1); } e.beforeClose ? e.beforeClose(re) : T(); } function R() { e.closeOnClickModal && I(); } function D() { Qe && (c.value = !0); } function W() { c.value = !1; } function z() { o("openAutoFocus"); } function U() { o("closeAutoFocus"); } function X(re) { var L; ((L = re.detail) == null ? void 0 : L.focusReason) === "pointer" && re.preventDefault(); } e.lockScroll && Mk(c); function de() { e.closeOnPressEscape && I(); } return oe(() => e.modelValue, (re) => { re ? (u.value = !1, E(), f.value = !0, g.value = Pv(e.zIndex) ? a() : g.value++, Re(() => { o("open"), t.value && (t.value.scrollTop = 0); })) : c.value && T(); }), oe(() => e.fullscreen, (re) => { t.value && (re ? (s = t.value.style.transform, t.value.style.transform = "") : t.value.style.transform = s); }), Ye(() => { e.modelValue && (c.value = !0, f.value = !0, E()); }), { afterEnter: x, afterLeave: A, beforeLeave: k, handleClose: I, onModalClick: R, close: T, doClose: W, onOpenAutoFocus: z, onCloseAutoFocus: U, onCloseRequested: de, onFocusoutPrevented: X, titleId: i, bodyId: l, closed: u, style: m, overlayDialogStyle: y, rendered: f, visible: c, zIndex: g }; }, UO = we({ ...VO, direction: { type: String, default: "rtl", values: ["ltr", "rtl", "ttb", "btt"] }, size: { type: [String, Number], default: "30%" }, withHeader: { type: Boolean, default: !0 }, modalFade: { type: Boolean, default: !0 }, headerAriaLevel: { type: String, default: "2" } }), qO = zO, KO = K({ name: "ElDrawer", inheritAttrs: !1 }), WO = /* @__PURE__ */ K({ ...KO, props: UO, emits: qO, setup(e, { expose: t }) { const n = e, r = ho(); eo({ scope: "el-drawer", from: "the title slot", replacement: "the header slot", version: "3.0.0", ref: "https://element-plus.org/en-US/component/drawer.html#slots" }, w(() => !!r.title)); const o = $(), a = $(), s = be("drawer"), { t: i } = wn(), { afterEnter: l, afterLeave: c, beforeLeave: u, visible: f, rendered: g, titleId: v, bodyId: d, zIndex: h, onModalClick: m, onOpenAutoFocus: y, onCloseAutoFocus: x, onFocusoutPrevented: A, onCloseRequested: k, handleClose: E } = HO(n, o), T = w(() => n.direction === "rtl" || n.direction === "ltr"), I = w(() => yr(n.size)); return t({ handleClose: E, afterEnter: l, afterLeave: c }), (R, D) => (C(), J(p(_g), { to: R.appendTo, disabled: R.appendTo !== "body" ? !1 : !R.appendToBody }, { default: P(() => [ V(ir, { name: p(s).b("fade"), onAfterEnter: p(l), onAfterLeave: p(c), onBeforeLeave: p(u), persisted: "" }, { default: P(() => [ xe(V(p(MO), { mask: R.modal, "overlay-class": R.modalClass, "z-index": p(h), onClick: p(m) }, { default: P(() => [ V(p(Sg), { loop: "", trapped: p(f), "focus-trap-el": o.value, "focus-start-el": a.value, onFocusAfterTrapped: p(y), onFocusAfterReleased: p(x), onFocusoutPrevented: p(A), onReleaseRequested: p(k) }, { default: P(() => [ M("div", mt({ ref_key: "drawerRef", ref: o, "aria-modal": "true", "aria-label": R.title || void 0, "aria-labelledby": R.title ? void 0 : p(v), "aria-describedby": p(d) }, R.$attrs, { class: [p(s).b(), R.direction, p(f) && "open"], style: p(T) ? "width: " + p(I) : "height: " + p(I), role: "dialog", onClick: Be(() => { }, ["stop"]) }), [ M("span", { ref_key: "focusStartRef", ref: a, class: N(p(s).e("sr-focus")), tabindex: "-1" }, null, 2), R.withHeader ? (C(), F("header", { key: 0, class: N(p(s).e("header")) }, [ R.$slots.title ? ee(R.$slots, "title", { key: 1 }, () => [ G(" DEPRECATED SLOT ") ]) : ee(R.$slots, "header", { key: 0, close: p(E), titleId: p(v), titleClass: p(s).e("title") }, () => [ R.$slots.title ? G("v-if", !0) : (C(), F("span", { key: 0, id: p(v), role: "heading", "aria-level": R.headerAriaLevel, class: N(p(s).e("title")) }, se(R.title), 11, ["id", "aria-level"])) ]), R.showClose ? (C(), F("button", { key: 2, "aria-label": p(i)("el.drawer.close"), class: N(p(s).e("close-btn")), type: "button", onClick: p(E) }, [ V(p(He), { class: N(p(s).e("close")) }, { default: P(() => [ V(p(ao)) ]), _: 1 }, 8, ["class"]) ], 10, ["aria-label", "onClick"])) : G("v-if", !0) ], 2)) : G("v-if", !0), p(g) ? (C(), F("div", { key: 1, id: p(d), class: N(p(s).e("body")) }, [ ee(R.$slots, "default") ], 10, ["id"])) : G("v-if", !0), R.$slots.footer ? (C(), F("div", { key: 2, class: N(p(s).e("footer")) }, [ ee(R.$slots, "footer") ], 2)) : G("v-if", !0) ], 16, ["aria-label", "aria-labelledby", "aria-describedby", "onClick"]) ]), _: 3 }, 8, ["trapped", "focus-trap-el", "focus-start-el", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusoutPrevented", "onReleaseRequested"]) ]), _: 3 }, 8, ["mask", "overlay-class", "z-index", "onClick"]), [ [ht, p(f)] ]) ]), _: 3 }, 8, ["name", "onAfterEnter", "onAfterLeave", "onBeforeLeave"]) ]), _: 3 }, 8, ["to", "disabled"])); } }); var GO = /* @__PURE__ */ ye(WO, [["__file", "drawer.vue"]]); const bu = vt(GO), JO = /* @__PURE__ */ K({ inheritAttrs: !1 }); function ZO(e, t, n, r, o, a) { return ee(e.$slots, "default"); } var YO = /* @__PURE__ */ ye(JO, [["render", ZO], ["__file", "collection.vue"]]); const XO = /* @__PURE__ */ K({ name: "ElCollectionItem", inheritAttrs: !1 }); function QO(e, t, n, r, o, a) { return ee(e.$slots, "default"); } var e3 = /* @__PURE__ */ ye(XO, [["render", QO], ["__file", "collection-item.vue"]]); const Gg = "data-el-collection-item", Jg = (e) => { const t = `El${e}Collection`, n = `${t}Item`, r = Symbol(t), o = Symbol(n), a = { ...YO, name: t, setup() { const i = $(null), l = /* @__PURE__ */ new Map(); qe(r, { itemMap: l, getItems: () => { const u = p(i); if (!u) return []; const f = Array.from(u.querySelectorAll(`[${Gg}]`)); return [...l.values()].sort((v, d) => f.indexOf(v.ref) - f.indexOf(d.ref)); }, collectionRef: i }); } }, s = { ...e3, name: n, setup(i, { attrs: l }) { const c = $(null), u = ce(r, void 0); qe(o, { collectionItemRef: c }), Ye(() => { const f = p(c); f && u.itemMap.set(f, { ref: f, ...l }); }), bt(() => { const f = p(c); u.itemMap.delete(f); }); } }; return { COLLECTION_INJECTION_KEY: r, COLLECTION_ITEM_INJECTION_KEY: o, ElCollection: a, ElCollectionItem: s }; }, t3 = we({ style: { type: ue([String, Array, Object]) }, currentTabId: { type: ue(String) }, defaultCurrentTabId: String, loop: Boolean, dir: { type: String, values: ["ltr", "rtl"], default: "ltr" }, orientation: { type: ue(String) }, onBlur: Function, onFocus: Function, onMousedown: Function }), { ElCollection: n3, ElCollectionItem: r3, COLLECTION_INJECTION_KEY: wu, COLLECTION_ITEM_INJECTION_KEY: o3 } = Jg("RovingFocusGroup"), Cu = Symbol("elRovingFocusGroup"), Zg = Symbol("elRovingFocusGroupItem"), a3 = { ArrowLeft: "prev", ArrowUp: "prev", ArrowRight: "next", ArrowDown: "next", PageUp: "first", Home: "first", PageDown: "last", End: "last" }, s3 = (e, t) => e, i3 = (e, t, n) => { const r = s3(e.key); return a3[r]; }, l3 = (e, t) => e.map((n, r) => e[(r + t) % e.length]), Su = (e) => { const { activeElement: t } = document; for (const n of e) if (n === t || (n.focus(), t !== document.activeElement)) return; }, Uf = "currentTabIdChange", qf = "rovingFocusGroup.entryFocus", c3 = { bubbles: !1, cancelable: !0 }, u3 = K({ name: "ElRovingFocusGroupImpl", inheritAttrs: !1, props: t3, emits: [Uf, "entryFocus"], setup(e, { emit: t }) { var n; const r = $((n = e.currentTabId || e.defaultCurrentTabId) != null ? n : null), o = $(!1), a = $(!1), s = $(null), { getItems: i } = ce(wu, void 0), l = w(() => [ { outline: "none" }, e.style ]), c = (h) => { t(Uf, h); }, u = () => { o.value = !0; }, f = St((h) => { var m; (m = e.onMousedown) == null || m.call(e, h); }, () => { a.value = !0; }), g = St((h) => { var m; (m = e.onFocus) == null || m.call(e, h); }, (h) => { const m = !p(a), { target: y, currentTarget: x } = h; if (y === x && m && !p(o)) { const A = new Event(qf, c3); if (x == null || x.dispatchEvent(A), !A.defaultPrevented) { const k = i().filter((D) => D.focusable), E = k.find((D) => D.active), T = k.find((D) => D.id === p(r)), R = [E, T, ...k].filter(Boolean).map((D) => D.ref); Su(R); } } a.value = !1; }), v = St((h) => { var m; (m = e.onBlur) == null || m.call(e, h); }, () => { o.value = !1; }), d = (...h) => { t("entryFocus", ...h); }; qe(Cu, { currentTabbedId: wi(r), loop: ct(e, "loop"), tabIndex: w(() => p(o) ? -1 : 0), rovingFocusGroupRef: s, rovingFocusGroupRootStyle: l, orientation: ct(e, "orientation"), dir: ct(e, "dir"), onItemFocus: c, onItemShiftTab: u, onBlur: v, onFocus: g, onMousedown: f }), oe(() => e.currentTabId, (h) => { r.value = h ?? null; }), vn(s, qf, d); } }); function d3(e, t, n, r, o, a) { return ee(e.$slots, "default"); } var f3 = /* @__PURE__ */ ye(u3, [["render", d3], ["__file", "roving-focus-group-impl.vue"]]); const p3 = K({ name: "ElRovingFocusGroup", components: { ElFocusGroupCollection: n3, ElRovingFocusGroupImpl: f3 } }); function h3(e, t, n, r, o, a) { const s = Se("el-roving-focus-group-impl"), i = Se("el-focus-group-collection"); return C(), J(i, null, { default: P(() => [ V(s, Tb(Ob(e.$attrs)), { default: P(() => [ ee(e.$slots, "default") ]), _: 3 }, 16) ]), _: 3 }); } var v3 = /* @__PURE__ */ ye(p3, [["render", h3], ["__file", "roving-focus-group.vue"]]); const g3 = K({ components: { ElRovingFocusCollectionItem: r3 }, props: { focusable: { type: Boolean, default: !0 }, active: { type: Boolean, default: !1 } }, emits: ["mousedown", "focus", "keydown"], setup(e, { emit: t }) { const { currentTabbedId: n, loop: r, onItemFocus: o, onItemShiftTab: a } = ce(Cu, void 0), { getItems: s } = ce(wu, void 0), i = ar(), l = $(null), c = St((v) => { t("mousedown", v); }, (v) => { e.focusable ? o(p(i)) : v.preventDefault(); }), u = St((v) => { t("focus", v); }, () => { o(p(i)); }), f = St((v) => { t("keydown", v); }, (v) => { const { key: d, shiftKey: h, target: m, currentTarget: y } = v; if (d === Ve.tab && h) { a(); return; } if (m !== y) return; const x = i3(v); if (x) { v.preventDefault(); let k = s().filter((E) => E.focusable).map((E) => E.ref); switch (x) { case "last": { k.reverse(); break; } case "prev": case "next": { x === "prev" && k.reverse(); const E = k.indexOf(y); k = r.value ? l3(k, E + 1) : k.slice(E + 1); break; } } Re(() => { Su(k); }); } }), g = w(() => n.value === p(i)); return qe(Zg, { rovingFocusGroupItemRef: l, tabIndex: w(() => p(g) ? 0 : -1), handleMousedown: c, handleFocus: u, handleKeydown: f }), { id: i, handleKeydown: f, handleFocus: u, handleMousedown: c }; } }); function m3(e, t, n, r, o, a) { const s = Se("el-roving-focus-collection-item"); return C(), J(s, { id: e.id, focusable: e.focusable, active: e.active }, { default: P(() => [ ee(e.$slots, "default") ]), _: 3 }, 8, ["id", "focusable", "active"]); } var y3 = /* @__PURE__ */ ye(g3, [["render", m3], ["__file", "roving-focus-item.vue"]]); const js = we({ trigger: Na.trigger, effect: { ...Qt.effect, default: "light" }, type: { type: ue(String) }, placement: { type: ue(String), default: "bottom" }, popperOptions: { type: ue(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: ue([Number, String]), default: 0 }, maxHeight: { type: ue([Number, String]), default: "" }, popperClass: { type: String, default: "" }, disabled: Boolean, role: { type: String, default: "menu" }, buttonProps: { type: ue(Object) }, teleported: Qt.teleported }), Yg = we({ command: { type: [Object, String, Number], default: () => ({}) }, disabled: Boolean, divided: Boolean, textValue: String, icon: { type: yn } }), b3 = we({ onKeydown: { type: ue(Function) } }), w3 = [ Ve.down, Ve.pageDown, Ve.home ], Xg = [Ve.up, Ve.pageUp, Ve.end], C3 = [...w3, ...Xg], { ElCollection: S3, ElCollectionItem: k3, COLLECTION_INJECTION_KEY: _3, COLLECTION_ITEM_INJECTION_KEY: E3 } = Jg("Dropdown"), ji = Symbol("elDropdown"), { ButtonGroup: x3 } = Kt, T3 = K({ name: "ElDropdown", components: { ElButton: Kt, ElButtonGroup: x3, ElScrollbar: Bi, ElDropdownCollection: S3, ElTooltip: La, ElRovingFocusGroup: v3, ElOnlyChild: mg, ElIcon: He, ArrowDown: Ei }, props: js, emits: ["visible-change", "click", "command"], setup(e, { emit: t }) { const n = We(), r = be("dropdown"), { t: o } = wn(), a = $(), s = $(), i = $(null), l = $(null), c = $(null), u = $(null), f = $(!1), g = [Ve.enter, Ve.space, Ve.down], v = w(() => ({ maxHeight: yr(e.maxHeight) })), d = w(() => [r.m(E.value)]), h = w(() => hr(e.trigger)), m = ar().value, y = w(() => e.id || m); oe([a, h], ([Z, ve], [me]) => { var Ne, _e, ze; (Ne = me == null ? void 0 : me.$el) != null && Ne.removeEventListener && me.$el.removeEventListener("pointerenter", I), (_e = Z == null ? void 0 : Z.$el) != null && _e.removeEventListener && Z.$el.removeEventListener("pointerenter", I), (ze = Z == null ? void 0 : Z.$el) != null && ze.addEventListener && ve.includes("hover") && Z.$el.addEventListener("pointerenter", I); }, { immediate: !0 }), bt(() => { var Z, ve; (ve = (Z = a.value) == null ? void 0 : Z.$el) != null && ve.removeEventListener && a.value.$el.removeEventListener("pointerenter", I); }); function x() { A(); } function A() { var Z; (Z = i.value) == null || Z.onClose(); } function k() { var Z; (Z = i.value) == null || Z.onOpen(); } const E = wr(); function T(...Z) { t("command", ...Z); } function I() { var Z, ve; (ve = (Z = a.value) == null ? void 0 : Z.$el) == null || ve.focus(); } function R() { } function D() { const Z = p(l); h.value.includes("hover") && (Z == null || Z.focus()), u.value = null; } function W(Z) { u.value = Z; } function z(Z) { f.value || (Z.preventDefault(), Z.stopImmediatePropagation()); } function U() { t("visible-change", !0); } function X(Z) { (Z == null ? void 0 : Z.type) === "keydown" && l.value.focus(); } function de() { t("visible-change", !1); } return qe(ji, { contentRef: l, role: w(() => e.role), triggerId: y, isUsingKeyboard: f, onItemEnter: R, onItemLeave: D }), qe("elDropdown", { instance: n, dropdownSize: E, handleClick: x, commandHandler: T, trigger: ct(e, "trigger"), hideOnClick: ct(e, "hideOnClick") }), { t: o, ns: r, scrollbar: c, wrapStyle: v, dropdownTriggerKls: d, dropdownSize: E, triggerId: y, triggerKeys: g, currentTabId: u, handleCurrentTabIdChange: W, handlerMainButtonClick: (Z) => { t("click", Z); }, handleEntryFocus: z, handleClose: A, handleOpen: k, handleBeforeShowTooltip: U, handleShowTooltip: X, handleBeforeHideTooltip: de, onFocusAfterTrapped: (Z) => { var ve, me; Z.preventDefault(), (me = (ve = l.value) == null ? void 0 : ve.focus) == null || me.call(ve, { preventScroll: !0 }); }, popperRef: i, contentRef: l, triggeringElementRef: a, referenceElementRef: s }; } }); function O3(e, t, n, r, o, a) { var s; const i = Se("el-dropdown-collection"), l = Se("el-roving-focus-group"), c = Se("el-scrollbar"), u = Se("el-only-child"), f = Se("el-tooltip"), g = Se("el-button"), v = Se("arrow-down"), d = Se("el-icon"), h = Se("el-button-group"); return C(), F("div", { class: N([e.ns.b(), e.ns.is("disabled", e.disabled)]) }, [ V(f, { ref: "popperRef", role: e.role, effect: e.effect, "fallback-placements": ["bottom", "top"], "popper-options": e.popperOptions, "gpu-acceleration": !1, "hide-after": e.trigger === "hover" ? e.hideTimeout : 0, "manual-mode": !0, placement: e.placement, "popper-class": [e.ns.e("popper"), e.popperClass], "reference-element": (s = e.referenceElementRef) == null ? void 0 : s.$el, trigger: e.trigger, "trigger-keys": e.triggerKeys, "trigger-target-el": e.contentRef, "show-after": e.trigger === "hover" ? e.showTimeout : 0, "stop-popper-mouse-event": !1, "virtual-ref": e.triggeringElementRef, "virtual-triggering": e.splitButton, disabled: e.disabled, transition: `${e.ns.namespace.value}-zoom-in-top`, teleported: e.teleported, pure: "", persistent: "", onBeforeShow: e.handleBeforeShowTooltip, onShow: e.handleShowTooltip, onBeforeHide: e.handleBeforeHideTooltip }, Ib({ content: P(() => [ V(c, { ref: "scrollbar", "wrap-style": e.wrapStyle, tag: "div", "view-class": e.ns.e("list") }, { default: P(() => [ V(l, { loop: e.loop, "current-tab-id": e.currentTabId, orientation: "horizontal", onCurrentTabIdChange: e.handleCurrentTabIdChange, onEntryFocus: e.handleEntryFocus }, { default: P(() => [ V(i, null, { default: P(() => [ ee(e.$slots, "dropdown") ]), _: 3 }) ]), _: 3 }, 8, ["loop", "current-tab-id", "onCurrentTabIdChange", "onEntryFocus"]) ]), _: 3 }, 8, ["wrap-style", "view-class"]) ]), _: 2 }, [ e.splitButton ? void 0 : { name: "default", fn: P(() => [ V(u, { id: e.triggerId, ref: "triggeringElementRef", role: "button", tabindex: e.tabindex }, { default: P(() => [ ee(e.$slots, "default") ]), _: 3 }, 8, ["id", "tabindex"]) ]) } ]), 1032, ["role", "effect", "popper-options", "hide-after", "placement", "popper-class", "reference-element", "trigger", "trigger-keys", "trigger-target-el", "show-after", "virtual-ref", "virtual-triggering", "disabled", "transition", "teleported", "onBeforeShow", "onShow", "onBeforeHide"]), e.splitButton ? (C(), J(h, { key: 0 }, { default: P(() => [ V(g, mt({ ref: "referenceElementRef" }, e.buttonProps, { size: e.dropdownSize, type: e.type, disabled: e.disabled, tabindex: e.tabindex, onClick: e.handlerMainButtonClick }), { default: P(() => [ ee(e.$slots, "default") ]), _: 3 }, 16, ["size", "type", "disabled", "tabindex", "onClick"]), V(g, mt({ id: e.triggerId, ref: "triggeringElementRef" }, e.buttonProps, { role: "button", size: e.dropdownSize, type: e.type, class: e.ns.e("caret-button"), disabled: e.disabled, tabindex: e.tabindex, "aria-label": e.t("el.dropdown.toggleDropdown") }), { default: P(() => [ V(d, { class: N(e.ns.e("icon")) }, { default: P(() => [ V(v) ]), _: 1 }, 8, ["class"]) ]), _: 1 }, 16, ["id", "size", "type", "class", "disabled", "tabindex", "aria-label"]) ]), _: 3 })) : G("v-if", !0) ], 2); } var I3 = /* @__PURE__ */ ye(T3, [["render", O3], ["__file", "dropdown.vue"]]); const A3 = K({ name: "DropdownItemImpl", components: { ElIcon: He }, props: Yg, emits: ["pointermove", "pointerleave", "click", "clickimpl"], setup(e, { emit: t }) { const n = be("dropdown"), { role: r } = ce(ji, void 0), { collectionItemRef: o } = ce(E3, void 0), { collectionItemRef: a } = ce(o3, void 0), { rovingFocusGroupItemRef: s, tabIndex: i, handleFocus: l, handleKeydown: c, handleMousedown: u } = ce(Zg, void 0), f = jv(o, a, s), g = w(() => r.value === "menu" ? "menuitem" : r.value === "navigation" ? "link" : "button"), v = St((d) => { const { code: h } = d; if (h === Ve.enter || h === Ve.space) return d.preventDefault(), d.stopImmediatePropagation(), t("clickimpl", d), !0; }, c); return { ns: n, itemRef: f, dataset: { [Gg]: "" }, role: g, tabIndex: i, handleFocus: l, handleKeydown: v, handleMousedown: u }; } }); function F3(e, t, n, r, o, a) { const s = Se("el-icon"); return C(), F(Ie, null, [ e.divided ? (C(), F("li", mt({ key: 0, role: "separator", class: e.ns.bem("menu", "item", "divided") }, e.$attrs), null, 16)) : G("v-if", !0), M("li", mt({ ref: e.itemRef }, { ...e.dataset, ...e.$attrs }, { "aria-disabled": e.disabled, class: [e.ns.be("menu", "item"), e.ns.is("disabled", e.disabled)], tabindex: e.tabIndex, role: e.role, onClick: (i) => e.$emit("clickimpl", i), onFocus: e.handleFocus, onKeydown: Be(e.handleKeydown, ["self"]), onMousedown: e.handleMousedown, onPointermove: (i) => e.$emit("pointermove", i), onPointerleave: (i) => e.$emit("pointerleave", i) }), [ e.icon ? (C(), J(s, { key: 0 }, { default: P(() => [ (C(), J(pt(e.icon))) ]), _: 1 })) : G("v-if", !0), ee(e.$slots, "default") ], 16, ["aria-disabled", "tabindex", "role", "onClick", "onFocus", "onKeydown", "onMousedown", "onPointermove", "onPointerleave"]) ], 64); } var P3 = /* @__PURE__ */ ye(A3, [["render", F3], ["__file", "dropdown-item-impl.vue"]]); const Qg = () => { const e = ce("elDropdown", {}), t = w(() => e == null ? void 0 : e.dropdownSize); return { elDropdown: e, _elDropdownSize: t }; }, $3 = K({ name: "ElDropdownItem", components: { ElDropdownCollectionItem: k3, ElRovingFocusItem: y3, ElDropdownItemImpl: P3 }, inheritAttrs: !1, props: Yg, emits: ["pointermove", "pointerleave", "click"], setup(e, { emit: t, attrs: n }) { const { elDropdown: r } = Qg(), o = We(), a = $(null), s = w(() => { var v, d; return (d = (v = p(a)) == null ? void 0 : v.textContent) != null ? d : ""; }), { onItemEnter: i, onItemLeave: l } = ce(ji, void 0), c = St((v) => (t("pointermove", v), v.defaultPrevented), yd((v) => { if (e.disabled) { l(v); return; } const d = v.currentTarget; d === document.activeElement || d.contains(document.activeElement) || (i(v), v.defaultPrevented || d == null || d.focus()); })), u = St((v) => (t("pointerleave", v), v.defaultPrevented), yd(l)), f = St((v) => { if (!e.disabled) return t("click", v), v.type !== "keydown" && v.defaultPrevented; }, (v) => { var d, h, m; if (e.disabled) { v.stopImmediatePropagation(); return; } (d = r == null ? void 0 : r.hideOnClick) != null && d.value && ((h = r.handleClick) == null || h.call(r)), (m = r.commandHandler) == null || m.call(r, e.command, o, v); }), g = w(() => ({ ...e, ...n })); return { handleClick: f, handlePointerMove: c, handlePointerLeave: u, textContent: s, propsAndAttrs: g }; } }); function R3(e, t, n, r, o, a) { var s; const i = Se("el-dropdown-item-impl"), l = Se("el-roving-focus-item"), c = Se("el-dropdown-collection-item"); return C(), J(c, { disabled: e.disabled, "text-value": (s = e.textValue) != null ? s : e.textContent }, { default: P(() => [ V(l, { focusable: !e.disabled }, { default: P(() => [ V(i, mt(e.propsAndAttrs, { onPointerleave: e.handlePointerLeave, onPointermove: e.handlePointerMove, onClickimpl: e.handleClick }), { default: P(() => [ ee(e.$slots, "default") ]), _: 3 }, 16, ["onPointerleave", "onPointermove", "onClickimpl"]) ]), _: 3 }, 8, ["focusable"]) ]), _: 3 }, 8, ["disabled", "text-value"]); } var em = /* @__PURE__ */ ye($3, [["render", R3], ["__file", "dropdown-item.vue"]]); const N3 = K({ name: "ElDropdownMenu", props: b3, setup(e) { const t = be("dropdown"), { _elDropdownSize: n } = Qg(), r = n.value, { focusTrapRef: o, onKeydown: a } = ce(wg, void 0), { contentRef: s, role: i, triggerId: l } = ce(ji, void 0), { collectionRef: c, getItems: u } = ce(_3, void 0), { rovingFocusGroupRef: f, rovingFocusGroupRootStyle: g, tabIndex: v, onBlur: d, onFocus: h, onMousedown: m } = ce(Cu, void 0), { collectionRef: y } = ce(wu, void 0), x = w(() => [t.b("menu"), t.bm("menu", r == null ? void 0 : r.value)]), A = jv(s, c, o, f, y), k = St((T) => { var I; (I = e.onKeydown) == null || I.call(e, T); }, (T) => { const { currentTarget: I, code: R, target: D } = T; if (I.contains(D), Ve.tab === R && T.stopImmediatePropagation(), T.preventDefault(), D !== p(s) || !C3.includes(R)) return; const z = u().filter((U) => !U.disabled).map((U) => U.ref); Xg.includes(R) && z.reverse(), Su(z); }); return { size: r, rovingFocusGroupRootStyle: g, tabIndex: v, dropdownKls: x, role: i, triggerId: l, dropdownListWrapperRef: A, handleKeydown: (T) => { k(T), a(T); }, onBlur: d, onFocus: h, onMousedown: m }; } }); function L3(e, t, n, r, o, a) { return C(), F("ul", { ref: e.dropdownListWrapperRef, class: N(e.dropdownKls), style: Ue(e.rovingFocusGroupRootStyle), tabindex: -1, role: e.role, "aria-labelledby": e.triggerId, onBlur: e.onBlur, onFocus: e.onFocus, onKeydown: Be(e.handleKeydown, ["self"]), onMousedown: Be(e.onMousedown, ["self"]) }, [ ee(e.$slots, "default") ], 46, ["role", "aria-labelledby", "onBlur", "onFocus", "onKeydown", "onMousedown"]); } var tm = /* @__PURE__ */ ye(N3, [["render", L3], ["__file", "dropdown-menu.vue"]]); const B3 = vt(I3, { DropdownItem: em, DropdownMenu: tm }), D3 = bn(em), M3 = bn(tm), nm = Symbol("elPaginationKey"), j3 = we({ disabled: Boolean, currentPage: { type: Number, default: 1 }, prevText: { type: String }, prevIcon: { type: yn } }), V3 = { click: (e) => e instanceof MouseEvent }, z3 = K({ name: "ElPaginationPrev" }), H3 = /* @__PURE__ */ K({ ...z3, props: j3, emits: V3, setup(e) { const t = e, { t: n } = wn(), r = w(() => t.disabled || t.currentPage <= 1); return (o, a) => (C(), F("button", { type: "button", class: "btn-prev", disabled: p(r), "aria-label": o.prevText || p(n)("el.pagination.prev"), "aria-disabled": p(r), onClick: (s) => o.$emit("click", s) }, [ o.prevText ? (C(), F("span", { key: 0 }, se(o.prevText), 1)) : (C(), J(p(He), { key: 1 }, { default: P(() => [ (C(), J(pt(o.prevIcon))) ]), _: 1 })) ], 8, ["disabled", "aria-label", "aria-disabled", "onClick"])); } }); var U3 = /* @__PURE__ */ ye(H3, [["__file", "prev.vue"]]); const q3 = we({ disabled: Boolean, currentPage: { type: Number, default: 1 }, pageCount: { type: Number, default: 50 }, nextText: { type: String }, nextIcon: { type: yn } }), K3 = K({ name: "ElPaginationNext" }), W3 = /* @__PURE__ */ K({ ...K3, props: q3, emits: ["click"], setup(e) { const t = e, { t: n } = wn(), r = w(() => t.disabled || t.currentPage === t.pageCount || t.pageCount === 0); return (o, a) => (C(), F("button", { type: "button", class: "btn-next", disabled: p(r), "aria-label": o.nextText || p(n)("el.pagination.next"), "aria-disabled": p(r), onClick: (s) => o.$emit("click", s) }, [ o.nextText ? (C(), F("span", { key: 0 }, se(o.nextText), 1)) : (C(), J(p(He), { key: 1 }, { default: P(() => [ (C(), J(pt(o.nextIcon))) ]), _: 1 })) ], 8, ["disabled", "aria-label", "aria-disabled", "onClick"])); } }); var G3 = /* @__PURE__ */ ye(W3, [["__file", "next.vue"]]); const rm = Symbol("ElSelectGroup"), Vi = Symbol("ElSelect"); function J3(e, t) { const n = ce(Vi), r = ce(rm, { disabled: !1 }), o = w(() => u(hr(n.props.modelValue), e.value)), a = w(() => { var v; if (n.props.multiple) { const d = hr((v = n.props.modelValue) != null ? v : []); return !o.value && d.length >= n.props.multipleLimit && n.props.multipleLimit > 0; } else return !1; }), s = w(() => e.label || (At(e.value) ? "" : e.value)), i = w(() => e.value || e.label || ""), l = w(() => e.disabled || t.groupDisabled || a.value), c = We(), u = (v = [], d) => { if (At(e.value)) { const h = n.props.valueKey; return v && v.some((m) => Xs(pr(m, h)) === pr(d, h)); } else return v && v.includes(d); }, f = () => { !e.disabled && !r.disabled && (n.states.hoveringIndex = n.optionsArray.indexOf(c.proxy)); }, g = (v) => { const d = new RegExp(kk(v), "i"); t.visible = d.test(s.value) || e.created; }; return oe(() => s.value, () => { !e.created && !n.props.remote && n.setSelected(); }), oe(() => e.value, (v, d) => { const { remote: h, valueKey: m } = n.props; if (v !== d && (n.onOptionDestroy(d, c.proxy), n.onOptionCreate(c.proxy)), !e.created && !h) { if (m && At(v) && At(d) && v[m] === d[m]) return; n.setSelected(); } }), oe(() => r.disabled, () => { t.groupDisabled = r.disabled; }, { immediate: !0 }), { select: n, currentLabel: s, currentValue: i, itemSelected: o, isDisabled: l, hoverItem: f, updateOption: g }; } const Z3 = K({ name: "ElOption", componentName: "ElOption", props: { value: { required: !0, type: [String, Number, Boolean, Object] }, label: [String, Number], created: Boolean, disabled: Boolean }, setup(e) { const t = be("select"), n = ar(), r = w(() => [ t.be("dropdown", "item"), t.is("disabled", p(i)), t.is("selected", p(s)), t.is("hovering", p(g)) ]), o = mn({ index: -1, groupDisabled: !1, visible: !0, hover: !1 }), { currentLabel: a, itemSelected: s, isDisabled: i, select: l, hoverItem: c, updateOption: u } = J3(e, o), { visible: f, hover: g } = vo(o), v = We().proxy; l.onOptionCreate(v), bt(() => { const h = v.value, { selected: m } = l.states, x = (l.props.multiple ? m : [m]).some((A) => A.value === v.value); Re(() => { l.states.cachedOptions.get(h) === v && !x && l.states.cachedOptions.delete(h); }), l.onOptionDestroy(h, v); }); function d() { i.value || l.handleOptionSelect(v); } return { ns: t, id: n, containerKls: r, currentLabel: a, itemSelected: s, isDisabled: i, select: l, hoverItem: c, updateOption: u, visible: f, hover: g, selectOptionClick: d, states: o }; } }); function Y3(e, t, n, r, o, a) { return xe((C(), F("li", { id: e.id, class: N(e.containerKls), role: "option", "aria-disabled": e.isDisabled || void 0, "aria-selected": e.itemSelected, onMouseenter: e.hoverItem, onClick: Be(e.selectOptionClick, ["stop"]) }, [ ee(e.$slots, "default", {}, () => [ M("span", null, se(e.currentLabel), 1) ]) ], 42, ["id", "aria-disabled", "aria-selected", "onMouseenter", "onClick"])), [ [ht, e.visible] ]); } var ku = /* @__PURE__ */ ye(Z3, [["render", Y3], ["__file", "option.vue"]]); const X3 = K({ name: "ElSelectDropdown", componentName: "ElSelectDropdown", setup() { const e = ce(Vi), t = be("select"), n = w(() => e.props.popperClass), r = w(() => e.props.multiple), o = w(() => e.props.fitInputWidth), a = $(""); function s() { var i; a.value = `${(i = e.selectRef) == null ? void 0 : i.offsetWidth}px`; } return Ye(() => { s(), Vn(e.selectRef, s); }), { ns: t, minWidth: a, popperClass: n, isMultiple: r, isFitInputWidth: o }; } }); function Q3(e, t, n, r, o, a) { return C(), F("div", { class: N([e.ns.b("dropdown"), e.ns.is("multiple", e.isMultiple), e.popperClass]), style: Ue({ [e.isFitInputWidth ? "width" : "minWidth"]: e.minWidth }) }, [ e.$slots.header ? (C(), F("div", { key: 0, class: N(e.ns.be("dropdown", "header")) }, [ ee(e.$slots, "header") ], 2)) : G("v-if", !0), ee(e.$slots, "default"), e.$slots.footer ? (C(), F("div", { key: 1, class: N(e.ns.be("dropdown", "footer")) }, [ ee(e.$slots, "footer") ], 2)) : G("v-if", !0) ], 6); } var e5 = /* @__PURE__ */ ye(X3, [["render", Q3], ["__file", "select-dropdown.vue"]]); const t5 = 11, n5 = (e, t) => { const { t: n } = wn(), r = ar(), o = be("select"), a = be("input"), s = mn({ inputValue: "", options: /* @__PURE__ */ new Map(), cachedOptions: /* @__PURE__ */ new Map(), disabledOptions: /* @__PURE__ */ new Map(), optionValues: [], selected: [], selectionWidth: 0, calculatorWidth: 0, collapseItemWidth: 0, selectedLabel: "", hoveringIndex: -1, previousQuery: null, inputHovering: !1, menuVisibleOnFocus: !1, isBeforeHide: !1 }), i = $(null), l = $(null), c = $(null), u = $(null), f = $(null), g = $(null), v = $(null), d = $(null), h = $(null), m = $(null), y = $(null), x = $(null), { isComposing: A, handleCompositionStart: k, handleCompositionUpdate: E, handleCompositionEnd: T } = iu({ afterComposition: (q) => it(q) }), { wrapperRef: I, isFocused: R } = lg(f, { beforeFocus() { return L.value; }, afterFocus() { e.automaticDropdown && !D.value && (D.value = !0, s.menuVisibleOnFocus = !0); }, beforeBlur(q) { var le, Ae; return ((le = c.value) == null ? void 0 : le.isFocusInsideContent(q)) || ((Ae = u.value) == null ? void 0 : Ae.isFocusInsideContent(q)); }, afterBlur() { D.value = !1, s.menuVisibleOnFocus = !1; } }), D = $(!1), W = $(), { form: z, formItem: U } = Mr(), { inputId: X } = Xa(e, { formItemContext: U }), { valueOnClear: de, isEmptyValue: re } = ug(e), L = w(() => e.disabled || (z == null ? void 0 : z.disabled)), Z = w(() => qt(e.modelValue) ? e.modelValue.length > 0 : !re(e.modelValue)), ve = w(() => e.clearable && !L.value && s.inputHovering && Z.value), me = w(() => e.remote && e.filterable && !e.remoteShowSuffix ? "" : e.suffixIcon), Ne = w(() => o.is("reverse", me.value && D.value)), _e = w(() => (U == null ? void 0 : U.validateState) || ""), ze = w(() => Mv[_e.value]), at = w(() => e.remote ? 300 : 0), Ge = w(() => e.loading ? e.loadingText || n("el.select.loading") : e.remote && !s.inputValue && s.options.size === 0 ? !1 : e.filterable && s.inputValue && s.options.size > 0 && Le.value === 0 ? e.noMatchText || n("el.select.noMatch") : s.options.size === 0 ? e.noDataText || n("el.select.noData") : null), Le = w(() => Ke.value.filter((q) => q.visible).length), Ke = w(() => { const q = Array.from(s.options.values()), le = []; return s.optionValues.forEach((Ae) => { const Xe = q.findIndex((Zn) => Zn.value === Ae); Xe > -1 && le.push(q[Xe]); }), le.length >= q.length ? le : q; }), nt = w(() => Array.from(s.cachedOptions.values())), dt = w(() => { const q = Ke.value.filter((le) => !le.created).some((le) => le.currentLabel === s.inputValue); return e.filterable && e.allowCreate && s.inputValue !== "" && !q; }), Cn = () => { e.filterable && ut(e.filterMethod) || e.filterable && e.remote && ut(e.remoteMethod) || Ke.value.forEach((q) => { var le; (le = q.updateOption) == null || le.call(q, s.inputValue); }); }, Rt = wr(), Tt = w(() => ["small"].includes(Rt.value) ? "small" : "default"), st = w({ get() { return D.value && Ge.value !== !1; }, set(q) { D.value = q; } }), gt = w(() => { if (e.multiple && !gr(e.modelValue)) return hr(e.modelValue).length === 0 && !s.inputValue; const q = qt(e.modelValue) ? e.modelValue[0] : e.modelValue; return e.filterable || gr(q) ? !s.inputValue : !0; }), Wt = w(() => { var q; const le = (q = e.placeholder) != null ? q : n("el.select.placeholder"); return e.multiple || !Z.value ? le : s.selectedLabel; }), Gt = w(() => Yl ? null : "mouseenter"); oe(() => e.modelValue, (q, le) => { e.multiple && e.filterable && !e.reserveKeyword && (s.inputValue = "", Et("")), Nt(), !tr(q, le) && e.validateEvent && (U == null || U.validate("change").catch((Ae) => yt(Ae))); }, { flush: "post", deep: !0 }), oe(() => D.value, (q) => { q ? Et(s.inputValue) : (s.inputValue = "", s.previousQuery = null, s.isBeforeHide = !0), t("visible-change", q); }), oe(() => s.options.entries(), () => { var q; if (!Qe) return; const le = ((q = i.value) == null ? void 0 : q.querySelectorAll("input")) || []; (!e.filterable && !e.defaultFirstOption && !gr(e.modelValue) || !Array.from(le).includes(document.activeElement)) && Nt(), e.defaultFirstOption && (e.filterable || e.remote) && Le.value && Jt(); }, { flush: "post" }), oe(() => s.hoveringIndex, (q) => { je(q) && q > -1 ? W.value = Ke.value[q] || {} : W.value = {}, Ke.value.forEach((le) => { le.hover = W.value === le; }); }), zh(() => { s.isBeforeHide || Cn(); }); const Et = (q) => { s.previousQuery === q || A.value || (s.previousQuery = q, e.filterable && ut(e.filterMethod) ? e.filterMethod(q) : e.filterable && e.remote && ut(e.remoteMethod) && e.remoteMethod(q), e.defaultFirstOption && (e.filterable || e.remote) && Le.value ? Re(Jt) : Re(Je)); }, Jt = () => { const q = Ke.value.filter((Xe) => Xe.visible && !Xe.disabled && !Xe.states.groupDisabled), le = q.find((Xe) => Xe.created), Ae = q[0]; s.hoveringIndex = pe(Ke.value, le || Ae); }, Nt = () => { if (e.multiple) s.selectedLabel = ""; else { const le = qt(e.modelValue) ? e.modelValue[0] : e.modelValue, Ae = Sn(le); s.selectedLabel = Ae.currentLabel, s.selected = [Ae]; return; } const q = []; gr(e.modelValue) || hr(e.modelValue).forEach((le) => { q.push(Sn(le)); }), s.selected = q; }, Sn = (q) => { let le; const Ae = _l(q).toLowerCase() === "object", Xe = _l(q).toLowerCase() === "null", Zn = _l(q).toLowerCase() === "undefined"; for (let cr = s.cachedOptions.size - 1; cr >= 0; cr--) { const kn = nt.value[cr]; if (Ae ? pr(kn.value, e.valueKey) === pr(q, e.valueKey) : kn.value === q) { le = { value: q, currentLabel: kn.currentLabel, get isDisabled() { return kn.isDisabled; } }; break; } } if (le) return le; const Er = Ae ? q.label : !Xe && !Zn ? q : ""; return { value: q, currentLabel: Er }; }, Je = () => { s.hoveringIndex = Ke.value.findIndex((q) => s.selected.some((le) => sa(le) === sa(q))); }, Ot = () => { s.selectionWidth = l.value.getBoundingClientRect().width; }, zt = () => { s.calculatorWidth = g.value.getBoundingClientRect().width; }, cn = () => { s.collapseItemWidth = y.value.getBoundingClientRect().width; }, It = () => { var q, le; (le = (q = c.value) == null ? void 0 : q.updatePopper) == null || le.call(q); }, te = () => { var q, le; (le = (q = u.value) == null ? void 0 : q.updatePopper) == null || le.call(q); }, $e = () => { s.inputValue.length > 0 && !D.value && (D.value = !0), Et(s.inputValue); }, it = (q) => { if (s.inputValue = q.target.value, e.remote) Ht(); else return $e(); }, Ht = Fv(() => { $e(); }, at.value), un = (q) => { tr(e.modelValue, q) || t(io, q); }, wo = (q) => gk(q, (le) => !s.disabledOptions.has(le)), oa = (q) => { if (e.multiple && q.code !== Ve.delete && q.target.value.length <= 0) { const le = hr(e.modelValue).slice(), Ae = wo(le); if (Ae < 0) return; const Xe = le[Ae]; le.splice(Ae, 1), t(ft, le), un(le), t("remove-tag", Xe); } }, Vr = (q, le) => { const Ae = s.selected.indexOf(le); if (Ae > -1 && !L.value) { const Xe = hr(e.modelValue).slice(); Xe.splice(Ae, 1), t(ft, Xe), un(Xe), t("remove-tag", le.value); } q.stopPropagation(), Co(); }, zr = (q) => { q.stopPropagation(); const le = e.multiple ? [] : de.value; if (e.multiple) for (const Ae of s.selected) Ae.isDisabled && le.push(Ae.value); t(ft, le), un(le), s.hoveringIndex = -1, D.value = !1, t("clear"), Co(); }, Y = (q) => { var le; if (e.multiple) { const Ae = hr((le = e.modelValue) != null ? le : []).slice(), Xe = pe(Ae, q.value); Xe > -1 ? Ae.splice(Xe, 1) : (e.multipleLimit <= 0 || Ae.length < e.multipleLimit) && Ae.push(q.value), t(ft, Ae), un(Ae), q.created && Et(""), e.filterable && !e.reserveKeyword && (s.inputValue = ""); } else t(ft, q.value), un(q.value), D.value = !1; Co(), !D.value && Re(() => { he(q); }); }, pe = (q = [], le) => { if (!At(le)) return q.indexOf(le); const Ae = e.valueKey; let Xe = -1; return q.some((Zn, Er) => Xs(pr(Zn, Ae)) === pr(le, Ae) ? (Xe = Er, !0) : !1), Xe; }, he = (q) => { var le, Ae, Xe, Zn, Er; const So = qt(q) ? q[0] : q; let cr = null; if (So != null && So.value) { const kn = Ke.value.filter((hs) => hs.value === So.value); kn.length > 0 && (cr = kn[0].$el); } if (c.value && cr) { const kn = (Zn = (Xe = (Ae = (le = c.value) == null ? void 0 : le.popperRef) == null ? void 0 : Ae.contentRef) == null ? void 0 : Xe.querySelector) == null ? void 0 : Zn.call(Xe, `.${o.be("dropdown", "wrap")}`); kn && Bv(kn, cr); } (Er = x.value) == null || Er.handleScroll(); }, Ze = (q) => { s.options.set(q.value, q), s.cachedOptions.set(q.value, q), q.disabled && s.disabledOptions.set(q.value, q); }, dn = (q, le) => { s.options.get(q) === le && s.options.delete(q); }, Zt = w(() => { var q, le; return (le = (q = c.value) == null ? void 0 : q.popperRef) == null ? void 0 : le.contentRef; }), fn = () => { s.isBeforeHide = !1, Re(() => he(s.selected)); }, Co = () => { var q; (q = f.value) == null || q.focus(); }, fs = () => { var q; (q = f.value) == null || q.blur(); }, ul = (q) => { zr(q); }, dl = () => { D.value = !1, R.value && fs(); }, _r = () => { s.inputValue.length > 0 ? s.inputValue = "" : D.value = !1; }, aa = () => { L.value || (Yl && (s.inputHovering = !0), s.menuVisibleOnFocus ? s.menuVisibleOnFocus = !1 : D.value = !D.value); }, fl = () => { D.value ? Ke.value[s.hoveringIndex] && Y(Ke.value[s.hoveringIndex]) : aa(); }, sa = (q) => At(q.value) ? pr(q.value, e.valueKey) : q.value, pl = w(() => Ke.value.filter((q) => q.visible).every((q) => q.disabled)), ia = w(() => e.multiple ? e.collapseTags ? s.selected.slice(0, e.maxCollapseTags) : s.selected : []), hl = w(() => e.multiple ? e.collapseTags ? s.selected.slice(e.maxCollapseTags) : [] : []), ps = (q) => { if (!D.value) { D.value = !0; return; } if (!(s.options.size === 0 || s.filteredOptionsCount === 0 || A.value) && !pl.value) { q === "next" ? (s.hoveringIndex++, s.hoveringIndex === s.options.size && (s.hoveringIndex = 0)) : q === "prev" && (s.hoveringIndex--, s.hoveringIndex < 0 && (s.hoveringIndex = s.options.size - 1)); const le = Ke.value[s.hoveringIndex]; (le.disabled === !0 || le.states.groupDisabled === !0 || !le.visible) && ps(q), Re(() => he(W.value)); } }, vl = () => { if (!l.value) return 0; const q = window.getComputedStyle(l.value); return Number.parseFloat(q.gap || "6px"); }, gl = w(() => { const q = vl(); return { maxWidth: `${y.value && e.maxCollapseTags === 1 ? s.selectionWidth - s.collapseItemWidth - q : s.selectionWidth}px` }; }), ml = w(() => ({ maxWidth: `${s.selectionWidth}px` })), yl = w(() => ({ width: `${Math.max(s.calculatorWidth, t5)}px` })); return Vn(l, Ot), Vn(g, zt), Vn(h, It), Vn(I, It), Vn(m, te), Vn(y, cn), Ye(() => { Nt(); }), { inputId: X, contentId: r, nsSelect: o, nsInput: a, states: s, isFocused: R, expanded: D, optionsArray: Ke, hoverOption: W, selectSize: Rt, filteredOptionsCount: Le, resetCalculatorWidth: zt, updateTooltip: It, updateTagTooltip: te, debouncedOnInputChange: Ht, onInput: it, deletePrevTag: oa, deleteTag: Vr, deleteSelected: zr, handleOptionSelect: Y, scrollToOption: he, hasModelValue: Z, shouldShowPlaceholder: gt, currentPlaceholder: Wt, mouseEnterEventName: Gt, showClose: ve, iconComponent: me, iconReverse: Ne, validateState: _e, validateIcon: ze, showNewOption: dt, updateOptions: Cn, collapseTagSize: Tt, setSelected: Nt, selectDisabled: L, emptyText: Ge, handleCompositionStart: k, handleCompositionUpdate: E, handleCompositionEnd: T, onOptionCreate: Ze, onOptionDestroy: dn, handleMenuEnter: fn, focus: Co, blur: fs, handleClearClick: ul, handleClickOutside: dl, handleEsc: _r, toggleMenu: aa, selectOption: fl, getValueKey: sa, navigateOptions: ps, dropdownMenuVisible: st, showTagList: ia, collapseTagList: hl, tagStyle: gl, collapseTagStyle: ml, inputStyle: yl, popperRef: Zt, inputRef: f, tooltipRef: c, tagTooltipRef: u, calculatorRef: g, prefixRef: v, suffixRef: d, selectRef: i, wrapperRef: I, selectionRef: l, scrollbarRef: x, menuRef: h, tagMenuRef: m, collapseItemRef: y }; }; var r5 = K({ name: "ElOptions", setup(e, { slots: t }) { const n = ce(Vi); let r = []; return () => { var o, a; const s = (o = t.default) == null ? void 0 : o.call(t), i = []; function l(c) { qt(c) && c.forEach((u) => { var f, g, v, d; const h = (f = (u == null ? void 0 : u.type) || {}) == null ? void 0 : f.name; h === "ElOptionGroup" ? l(!jt(u.children) && !qt(u.children) && ut((g = u.children) == null ? void 0 : g.default) ? (v = u.children) == null ? void 0 : v.default() : u.children) : h === "ElOption" ? i.push((d = u.props) == null ? void 0 : d.value) : qt(u.children) && l(u.children); }); } return s.length && l((a = s[0]) == null ? void 0 : a.children), tr(i, r) || (r = i, n && (n.states.optionValues = i)), s; }; } }); const o5 = we({ name: String, id: String, modelValue: { type: [Array, String, Number, Boolean, Object], default: void 0 }, autocomplete: { type: String, default: "off" }, automaticDropdown: Boolean, size: lr, effect: { type: ue(String), default: "light" }, disabled: Boolean, clearable: Boolean, filterable: Boolean, allowCreate: Boolean, loading: Boolean, popperClass: { type: String, default: "" }, popperOptions: { type: ue(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: Qt.teleported, persistent: { type: Boolean, default: !0 }, clearIcon: { type: yn, default: ki }, fitInputWidth: Boolean, suffixIcon: { type: yn, default: Ei }, tagType: { ...Ba.type, default: "info" }, tagEffect: { ...Ba.effect, default: "light" }, validateEvent: { type: Boolean, default: !0 }, remoteShowSuffix: Boolean, placement: { type: ue(String), values: Ja, default: "bottom-start" }, fallbackPlacements: { type: ue(Array), default: ["bottom-start", "top-start", "right", "left"] }, appendTo: String, ...lu, ...Dr(["ariaLabel"]) }), Kf = "ElSelect", a5 = K({ name: Kf, componentName: Kf, components: { ElSelectMenu: e5, ElOption: ku, ElOptions: r5, ElTag: lo, ElScrollbar: Bi, ElTooltip: La, ElIcon: He }, directives: { ClickOutside: Og }, props: o5, emits: [ ft, io, "remove-tag", "clear", "visible-change", "focus", "blur" ], setup(e, { emit: t }) { const n = w(() => { const { modelValue: a, multiple: s } = e, i = s ? [] : void 0; return qt(a) ? s ? a : i : s ? i : a; }), r = mn({ ...vo(e), modelValue: n }), o = n5(r, t); return qe(Vi, mn({ props: r, states: o.states, optionsArray: o.optionsArray, handleOptionSelect: o.handleOptionSelect, onOptionCreate: o.onOptionCreate, onOptionDestroy: o.onOptionDestroy, selectRef: o.selectRef, setSelected: o.setSelected })), { ...o, modelValue: n }; } }); function s5(e, t, n, r, o, a) { const s = Se("el-tag"), i = Se("el-tooltip"), l = Se("el-icon"), c = Se("el-option"), u = Se("el-options"), f = Se("el-scrollbar"), g = Se("el-select-menu"), v = Ab("click-outside"); return xe((C(), F("div", { ref: "selectRef", class: N([e.nsSelect.b(), e.nsSelect.m(e.selectSize)]), [Fb(e.mouseEnterEventName)]: (d) => e.states.inputHovering = !0, onMouseleave: (d) => e.states.inputHovering = !1 }, [ V(i, { 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: (d) => e.states.isBeforeHide = !1 }, { default: P(() => { var d; return [ M("div", { ref: "wrapperRef", class: N([ 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: Be(e.toggleMenu, ["prevent"]) }, [ e.$slots.prefix ? (C(), F("div", { key: 0, ref: "prefixRef", class: N(e.nsSelect.e("prefix")) }, [ ee(e.$slots, "prefix") ], 2)) : G("v-if", !0), M("div", { ref: "selectionRef", class: N([ e.nsSelect.e("selection"), e.nsSelect.is("near", e.multiple && !e.$slots.prefix && !!e.states.selected.length) ]) }, [ e.multiple ? ee(e.$slots, "tag", { key: 0 }, () => [ (C(!0), F(Ie, null, ot(e.showTagList, (h) => (C(), F("div", { key: e.getValueKey(h), class: N(e.nsSelect.e("selected-item")) }, [ V(s, { closable: !e.selectDisabled && !h.isDisabled, size: e.collapseTagSize, type: e.tagType, effect: e.tagEffect, "disable-transitions": "", style: Ue(e.tagStyle), onClose: (m) => e.deleteTag(m, h) }, { default: P(() => [ M("span", { class: N(e.nsSelect.e("tags-text")) }, [ ee(e.$slots, "label", { label: h.currentLabel, value: h.value }, () => [ Ce(se(h.currentLabel), 1) ]) ], 2) ]), _: 2 }, 1032, ["closable", "size", "type", "effect", "style", "onClose"]) ], 2))), 128)), e.collapseTags && e.states.selected.length > e.maxCollapseTags ? (C(), J(i, { key: 0, ref: "tagTooltipRef", disabled: e.dropdownMenuVisible || !e.collapseTagsTooltip, "fallback-placements": ["bottom", "top", "right", "left"], effect: e.effect, placement: "bottom", teleported: e.teleported }, { default: P(() => [ M("div", { ref: "collapseItemRef", class: N(e.nsSelect.e("selected-item")) }, [ V(s, { closable: !1, size: e.collapseTagSize, type: e.tagType, effect: e.tagEffect, "disable-transitions": "", style: Ue(e.collapseTagStyle) }, { default: P(() => [ M("span", { class: N(e.nsSelect.e("tags-text")) }, " + " + se(e.states.selected.length - e.maxCollapseTags), 3) ]), _: 1 }, 8, ["size", "type", "effect", "style"]) ], 2) ]), content: P(() => [ M("div", { ref: "tagMenuRef", class: N(e.nsSelect.e("selection")) }, [ (C(!0), F(Ie, null, ot(e.collapseTagList, (h) => (C(), F("div", { key: e.getValueKey(h), class: N(e.nsSelect.e("selected-item")) }, [ V(s, { class: "in-tooltip", closable: !e.selectDisabled && !h.isDisabled, size: e.collapseTagSize, type: e.tagType, effect: e.tagEffect, "disable-transitions": "", onClose: (m) => e.deleteTag(m, h) }, { default: P(() => [ M("span", { class: N(e.nsSelect.e("tags-text")) }, [ ee(e.$slots, "label", { label: h.currentLabel, value: h.value }, () => [ Ce(se(h.currentLabel), 1) ]) ], 2) ]), _: 2 }, 1032, ["closable", "size", "type", "effect", "onClose"]) ], 2))), 128)) ], 2) ]), _: 3 }, 8, ["disabled", "effect", "teleported"])) : G("v-if", !0) ]) : G("v-if", !0), e.selectDisabled ? G("v-if", !0) : (C(), F("div", { key: 1, class: N([ e.nsSelect.e("selected-item"), e.nsSelect.e("input-wrapper"), e.nsSelect.is("hidden", !e.filterable) ]) }, [ xe(M("input", { id: e.inputId, ref: "inputRef", "onUpdate:modelValue": (h) => e.states.inputValue = h, type: "text", name: e.name, class: N([e.nsSelect.e("input"), e.nsSelect.is(e.selectSize)]), disabled: e.selectDisabled, autocomplete: e.autocomplete, style: Ue(e.inputStyle), role: "combobox", readonly: !e.filterable, spellcheck: "false", "aria-activedescendant": ((d = e.hoverOption) == null ? void 0 : d.id) || "", "aria-controls": e.contentId, "aria-expanded": e.dropdownMenuVisible, "aria-label": e.ariaLabel, "aria-autocomplete": "none", "aria-haspopup": "listbox", onKeydown: [ Wr(Be((h) => e.navigateOptions("next"), ["stop", "prevent"]), ["down"]), Wr(Be((h) => e.navigateOptions("prev"), ["stop", "prevent"]), ["up"]), Wr(Be(e.handleEsc, ["stop", "prevent"]), ["esc"]), Wr(Be(e.selectOption, ["stop", "prevent"]), ["enter"]), Wr(Be(e.deletePrevTag, ["stop"]), ["delete"]) ], onCompositionstart: e.handleCompositionStart, onCompositionupdate: e.handleCompositionUpdate, onCompositionend: e.handleCompositionEnd, onInput: e.onInput, onClick: Be(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"]), [ [Vh, e.states.inputValue] ]), e.filterable ? (C(), F("span", { key: 0, ref: "calculatorRef", "aria-hidden": "true", class: N(e.nsSelect.e("input-calculator")), textContent: se(e.states.inputValue) }, null, 10, ["textContent"])) : G("v-if", !0) ], 2)), e.shouldShowPlaceholder ? (C(), F("div", { key: 2, class: N([ e.nsSelect.e("selected-item"), e.nsSelect.e("placeholder"), e.nsSelect.is("transparent", !e.hasModelValue || e.expanded && !e.states.inputValue) ]) }, [ e.hasModelValue ? ee(e.$slots, "label", { key: 0, label: e.currentPlaceholder, value: e.modelValue }, () => [ M("span", null, se(e.currentPlaceholder), 1) ]) : (C(), F("span", { key: 1 }, se(e.currentPlaceholder), 1)) ], 2)) : G("v-if", !0) ], 2), M("div", { ref: "suffixRef", class: N(e.nsSelect.e("suffix")) }, [ e.iconComponent && !e.showClose ? (C(), J(l, { key: 0, class: N([e.nsSelect.e("caret"), e.nsSelect.e("icon"), e.iconReverse]) }, { default: P(() => [ (C(), J(pt(e.iconComponent))) ]), _: 1 }, 8, ["class"])) : G("v-if", !0), e.showClose && e.clearIcon ? (C(), J(l, { key: 1, class: N([ e.nsSelect.e("caret"), e.nsSelect.e("icon"), e.nsSelect.e("clear") ]), onClick: e.handleClearClick }, { default: P(() => [ (C(), J(pt(e.clearIcon))) ]), _: 1 }, 8, ["class", "onClick"])) : G("v-if", !0), e.validateState && e.validateIcon ? (C(), J(l, { key: 2, class: N([e.nsInput.e("icon"), e.nsInput.e("validateIcon")]) }, { default: P(() => [ (C(), J(pt(e.validateIcon))) ]), _: 1 }, 8, ["class"])) : G("v-if", !0) ], 2) ], 10, ["onClick"]) ]; }), content: P(() => [ V(g, { ref: "menuRef" }, { default: P(() => [ e.$slots.header ? (C(), F("div", { key: 0, class: N(e.nsSelect.be("dropdown", "header")), onClick: Be(() => { }, ["stop"]) }, [ ee(e.$slots, "header") ], 10, ["onClick"])) : G("v-if", !0), xe(V(f, { id: e.contentId, ref: "scrollbarRef", tag: "ul", "wrap-class": e.nsSelect.be("dropdown", "wrap"), "view-class": e.nsSelect.be("dropdown", "list"), class: N([e.nsSelect.is("empty", e.filteredOptionsCount === 0)]), role: "listbox", "aria-label": e.ariaLabel, "aria-orientation": "vertical" }, { default: P(() => [ e.showNewOption ? (C(), J(c, { key: 0, value: e.states.inputValue, created: !0 }, null, 8, ["value"])) : G("v-if", !0), V(u, null, { default: P(() => [ ee(e.$slots, "default") ]), _: 3 }) ]), _: 3 }, 8, ["id", "wrap-class", "view-class", "class", "aria-label"]), [ [ht, e.states.options.size > 0 && !e.loading] ]), e.$slots.loading && e.loading ? (C(), F("div", { key: 1, class: N(e.nsSelect.be("dropdown", "loading")) }, [ ee(e.$slots, "loading") ], 2)) : e.loading || e.filteredOptionsCount === 0 ? (C(), F("div", { key: 2, class: N(e.nsSelect.be("dropdown", "empty")) }, [ ee(e.$slots, "empty", {}, () => [ M("span", null, se(e.emptyText), 1) ]) ], 2)) : G("v-if", !0), e.$slots.footer ? (C(), F("div", { key: 3, class: N(e.nsSelect.be("dropdown", "footer")), onClick: Be(() => { }, ["stop"]) }, [ ee(e.$slots, "footer") ], 10, ["onClick"])) : G("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"])), [ [v, e.handleClickOutside, e.popperRef] ]); } var i5 = /* @__PURE__ */ ye(a5, [["render", s5], ["__file", "select.vue"]]); const l5 = K({ name: "ElOptionGroup", componentName: "ElOptionGroup", props: { label: String, disabled: Boolean }, setup(e) { const t = be("select"), n = $(null), r = We(), o = $([]); qe(rm, mn({ ...vo(e) })); const a = w(() => o.value.some((c) => c.visible === !0)), s = (c) => { var u, f; return ((u = c.type) == null ? void 0 : u.name) === "ElOption" && !!((f = c.component) != null && f.proxy); }, i = (c) => { const u = hr(c), f = []; return u.forEach((g) => { var v, d; s(g) ? f.push(g.component.proxy) : (v = g.children) != null && v.length ? f.push(...i(g.children)) : (d = g.component) != null && d.subTree && f.push(...i(g.component.subTree)); }), f; }, l = () => { o.value = i(r.subTree); }; return Ye(() => { l(); }), n1(n, l, { attributes: !0, subtree: !0, childList: !0 }), { groupRef: n, visible: a, ns: t }; } }); function c5(e, t, n, r, o, a) { return xe((C(), F("ul", { ref: "groupRef", class: N(e.ns.be("group", "wrap")) }, [ M("li", { class: N(e.ns.be("group", "title")) }, se(e.label), 3), M("li", null, [ M("ul", { class: N(e.ns.b("group")) }, [ ee(e.$slots, "default") ], 2) ]) ], 2)), [ [ht, e.visible] ]); } var om = /* @__PURE__ */ ye(l5, [["render", c5], ["__file", "option-group.vue"]]); const zi = vt(i5, { Option: ku, OptionGroup: om }), _u = bn(ku); bn(om); const Eu = () => ce(nm, {}), u5 = we({ pageSize: { type: Number, required: !0 }, pageSizes: { type: ue(Array), default: () => vr([10, 20, 30, 40, 50, 100]) }, popperClass: { type: String }, disabled: Boolean, teleported: Boolean, size: { type: String, values: Ri }, appendSizeTo: String }), d5 = K({ name: "ElPaginationSizes" }), f5 = /* @__PURE__ */ K({ ...d5, props: u5, emits: ["page-size-change"], setup(e, { emit: t }) { const n = e, { t: r } = wn(), o = be("pagination"), a = Eu(), s = $(n.pageSize); oe(() => n.pageSizes, (c, u) => { if (!tr(c, u) && Array.isArray(c)) { const f = c.includes(n.pageSize) ? n.pageSize : n.pageSizes[0]; t("page-size-change", f); } }), oe(() => n.pageSize, (c) => { s.value = c; }); const i = w(() => n.pageSizes); function l(c) { var u; c !== s.value && (s.value = c, (u = a.handleSizeChange) == null || u.call(a, Number(c))); } return (c, u) => (C(), F("span", { class: N(p(o).e("sizes")) }, [ V(p(zi), { "model-value": s.value, disabled: c.disabled, "popper-class": c.popperClass, size: c.size, teleported: c.teleported, "validate-event": !1, "append-to": c.appendSizeTo, onChange: l }, { default: P(() => [ (C(!0), F(Ie, null, ot(p(i), (f) => (C(), J(p(_u), { key: f, value: f, label: f + p(r)("el.pagination.pagesize") }, null, 8, ["value", "label"]))), 128)) ]), _: 1 }, 8, ["model-value", "disabled", "popper-class", "size", "teleported", "append-to"]) ], 2)); } }); var p5 = /* @__PURE__ */ ye(f5, [["__file", "sizes.vue"]]); const h5 = we({ size: { type: String, values: Ri } }), v5 = K({ name: "ElPaginationJumper" }), g5 = /* @__PURE__ */ K({ ...v5, props: h5, setup(e) { const { t } = wn(), n = be("pagination"), { pageCount: r, disabled: o, currentPage: a, changeEvent: s } = Eu(), i = $(), l = w(() => { var f; return (f = i.value) != null ? f : a == null ? void 0 : a.value; }); function c(f) { i.value = f ? +f : ""; } function u(f) { f = Math.trunc(+f), s == null || s(f), i.value = void 0; } return (f, g) => (C(), F("span", { class: N(p(n).e("jump")), disabled: p(o) }, [ M("span", { class: N([p(n).e("goto")]) }, se(p(t)("el.pagination.goto")), 3), V(p(Go), { size: f.size, class: N([p(n).e("editor"), p(n).is("in-pagination")]), min: 1, max: p(r), disabled: p(o), "model-value": p(l), "validate-event": !1, "aria-label": p(t)("el.pagination.page"), type: "number", "onUpdate:modelValue": c, onChange: u }, null, 8, ["size", "class", "max", "disabled", "model-value", "aria-label"]), M("span", { class: N([p(n).e("classifier")]) }, se(p(t)("el.pagination.pageClassifier")), 3) ], 10, ["disabled"])); } }); var m5 = /* @__PURE__ */ ye(g5, [["__file", "jumper.vue"]]); const y5 = we({ total: { type: Number, default: 1e3 } }), b5 = K({ name: "ElPaginationTotal" }), w5 = /* @__PURE__ */ K({ ...b5, props: y5, setup(e) { const { t } = wn(), n = be("pagination"), { disabled: r } = Eu(); return (o, a) => (C(), F("span", { class: N(p(n).e("total")), disabled: p(r) }, se(p(t)("el.pagination.total", { total: o.total })), 11, ["disabled"])); } }); var C5 = /* @__PURE__ */ ye(w5, [["__file", "total.vue"]]); const S5 = we({ currentPage: { type: Number, default: 1 }, pageCount: { type: Number, required: !0 }, pagerCount: { type: Number, default: 7 }, disabled: Boolean }), k5 = K({ name: "ElPaginationPager" }), _5 = /* @__PURE__ */ K({ ...k5, props: S5, emits: ["change"], setup(e, { emit: t }) { const n = e, r = be("pager"), o = be("icon"), { t: a } = wn(), s = $(!1), i = $(!1), l = $(!1), c = $(!1), u = $(!1), f = $(!1), g = w(() => { const k = n.pagerCount, E = (k - 1) / 2, T = Number(n.currentPage), I = Number(n.pageCount); let R = !1, D = !1; I > k && (T > k - E && (R = !0), T < I - E && (D = !0)); const W = []; if (R && !D) { const z = I - (k - 2); for (let U = z; U < I; U++) W.push(U); } else if (!R && D) for (let z = 2; z < k; z++) W.push(z); else if (R && D) { const z = Math.floor(k / 2) - 1; for (let U = T - z; U <= T + z; U++) W.push(U); } else for (let z = 2; z < I; z++) W.push(z); return W; }), v = w(() => [ "more", "btn-quickprev", o.b(), r.is("disabled", n.disabled) ]), d = w(() => [ "more", "btn-quicknext", o.b(), r.is("disabled", n.disabled) ]), h = w(() => n.disabled ? -1 : 0); zh(() => { const k = (n.pagerCount - 1) / 2; s.value = !1, i.value = !1, n.pageCount > n.pagerCount && (n.currentPage > n.pagerCount - k && (s.value = !0), n.currentPage < n.pageCount - k && (i.value = !0)); }); function m(k = !1) { n.disabled || (k ? l.value = !0 : c.value = !0); } function y(k = !1) { k ? u.value = !0 : f.value = !0; } function x(k) { const E = k.target; if (E.tagName.toLowerCase() === "li" && Array.from(E.classList).includes("number")) { const T = Number(E.textContent); T !== n.currentPage && t("change", T); } else E.tagName.toLowerCase() === "li" && Array.from(E.classList).includes("more") && A(k); } function A(k) { const E = k.target; if (E.tagName.toLowerCase() === "ul" || n.disabled) return; let T = Number(E.textContent); const I = n.pageCount, R = n.currentPage, D = n.pagerCount - 2; E.className.includes("more") && (E.className.includes("quickprev") ? T = R - D : E.className.includes("quicknext") && (T = R + D)), Number.isNaN(+T) || (T < 1 && (T = 1), T > I && (T = I)), T !== R && t("change", T); } return (k, E) => (C(), F("ul", { class: N(p(r).b()), onClick: A, onKeyup: Wr(x, ["enter"]) }, [ k.pageCount > 0 ? (C(), F("li", { key: 0, class: N([[ p(r).is("active", k.currentPage === 1), p(r).is("disabled", k.disabled) ], "number"]), "aria-current": k.currentPage === 1, "aria-label": p(a)("el.pagination.currentPage", { pager: 1 }), tabindex: p(h) }, " 1 ", 10, ["aria-current", "aria-label", "tabindex"])) : G("v-if", !0), s.value ? (C(), F("li", { key: 1, class: N(p(v)), tabindex: p(h), "aria-label": p(a)("el.pagination.prevPages", { pager: k.pagerCount - 2 }), onMouseenter: (T) => m(!0), onMouseleave: (T) => l.value = !1, onFocus: (T) => y(!0), onBlur: (T) => u.value = !1 }, [ (l.value || u.value) && !k.disabled ? (C(), J(p(Bb), { key: 0 })) : (C(), J(p(md), { key: 1 })) ], 42, ["tabindex", "aria-label", "onMouseenter", "onMouseleave", "onFocus", "onBlur"])) : G("v-if", !0), (C(!0), F(Ie, null, ot(p(g), (T) => (C(), F("li", { key: T, class: N([[ p(r).is("active", k.currentPage === T), p(r).is("disabled", k.disabled) ], "number"]), "aria-current": k.currentPage === T, "aria-label": p(a)("el.pagination.currentPage", { pager: T }), tabindex: p(h) }, se(T), 11, ["aria-current", "aria-label", "tabindex"]))), 128)), i.value ? (C(), F("li", { key: 2, class: N(p(d)), tabindex: p(h), "aria-label": p(a)("el.pagination.nextPages", { pager: k.pagerCount - 2 }), onMouseenter: (T) => m(), onMouseleave: (T) => c.value = !1, onFocus: (T) => y(), onBlur: (T) => f.value = !1 }, [ (c.value || f.value) && !k.disabled ? (C(), J(p(Db), { key: 0 })) : (C(), J(p(md), { key: 1 })) ], 42, ["tabindex", "aria-label", "onMouseenter", "onMouseleave", "onFocus", "onBlur"])) : G("v-if", !0), k.pageCount > 1 ? (C(), F("li", { key: 3, class: N([[ p(r).is("active", k.currentPage === k.pageCount), p(r).is("disabled", k.disabled) ], "number"]), "aria-current": k.currentPage === k.pageCount, "aria-label": p(a)("el.pagination.currentPage", { pager: k.pageCount }), tabindex: p(h) }, se(k.pageCount), 11, ["aria-current", "aria-label", "tabindex"])) : G("v-if", !0) ], 42, ["onKeyup"])); } }); var E5 = /* @__PURE__ */ ye(_5, [["__file", "pager.vue"]]); const Ut = (e) => typeof e != "number", x5 = we({ pageSize: Number, defaultPageSize: Number, total: Number, pageCount: Number, pagerCount: { type: Number, validator: (e) => je(e) && Math.trunc(e) === e && e > 4 && e < 22 && e % 2 === 1, default: 7 }, currentPage: Number, defaultCurrentPage: Number, layout: { type: String, default: ["prev", "pager", "next", "jumper", "->", "total"].join(", ") }, pageSizes: { type: ue(Array), default: () => vr([10, 20, 30, 40, 50, 100]) }, popperClass: { type: String, default: "" }, prevText: { type: String, default: "" }, prevIcon: { type: yn, default: () => Rc }, nextText: { type: String, default: "" }, nextIcon: { type: yn, default: () => _i }, teleported: { type: Boolean, default: !0 }, small: Boolean, size: lr, background: Boolean, disabled: Boolean, hideOnSinglePage: Boolean, appendSizeTo: String }), T5 = { "update:current-page": (e) => je(e), "update:page-size": (e) => je(e), "size-change": (e) => je(e), change: (e, t) => je(e) && je(t), "current-change": (e) => je(e), "prev-click": (e) => je(e), "next-click": (e) => je(e) }, Wf = "ElPagination"; var O5 = K({ name: Wf, props: x5, emits: T5, setup(e, { emit: t, slots: n }) { const { t: r } = wn(), o = be("pagination"), a = We().vnode.props || {}, s = ig(), i = w(() => { var E; return e.small ? "small" : (E = e.size) != null ? E : s.value; }); eo({ from: "small", replacement: "size", version: "3.0.0", scope: "el-pagination", ref: "https://element-plus.org/zh-CN/component/pagination.html" }, w(() => !!e.small)); const l = "onUpdate:currentPage" in a || "onUpdate:current-page" in a || "onCurrentChange" in a, c = "onUpdate:pageSize" in a || "onUpdate:page-size" in a || "onSizeChange" in a, u = w(() => { if (Ut(e.total) && Ut(e.pageCount) || !Ut(e.currentPage) && !l) return !1; if (e.layout.includes("sizes")) { if (Ut(e.pageCount)) { if (!Ut(e.total) && !Ut(e.pageSize) && !c) return !1; } else if (!c) return !1; } return !0; }), f = $(Ut(e.defaultPageSize) ? 10 : e.defaultPageSize), g = $(Ut(e.defaultCurrentPage) ? 1 : e.defaultCurrentPage), v = w({ get() { return Ut(e.pageSize) ? f.value : e.pageSize; }, set(E) { Ut(e.pageSize) && (f.value = E), c && (t("update:page-size", E), t("size-change", E)); } }), d = w(() => { let E = 0; return Ut(e.pageCount) ? Ut(e.total) || (E = Math.max(1, Math.ceil(e.total / v.value))) : E = e.pageCount, E; }), h = w({ get() { return Ut(e.currentPage) ? g.value : e.currentPage; }, set(E) { let T = E; E < 1 ? T = 1 : E > d.value && (T = d.value), Ut(e.currentPage) && (g.value = T), l && (t("update:current-page", T), t("current-change", T)); } }); oe(d, (E) => { h.value > E && (h.value = E); }), oe([h, v], (E) => { t("change", ...E); }, { flush: "post" }); function m(E) { h.value = E; } function y(E) { v.value = E; const T = d.value; h.value > T && (h.value = T); } function x() { e.disabled || (h.value -= 1, t("prev-click", h.value)); } function A() { e.disabled || (h.value += 1, t("next-click", h.value)); } function k(E, T) { E && (E.props || (E.props = {}), E.props.class = [E.props.class, T].join(" ")); } return qe(nm, { pageCount: d, disabled: w(() => e.disabled), currentPage: h, changeEvent: m, handleSizeChange: y }), () => { var E, T; if (!u.value) return yt(Wf, r("el.pagination.deprecationWarning")), null; if (!e.layout || e.hideOnSinglePage && d.value <= 1) return null; const I = [], R = [], D = Ct("div", { class: o.e("rightwrapper") }, R), W = { prev: Ct(U3, { disabled: e.disabled, currentPage: h.value, prevText: e.prevText, prevIcon: e.prevIcon, onClick: x }), jumper: Ct(m5, { size: i.value }), pager: Ct(E5, { currentPage: h.value, pageCount: d.value, pagerCount: e.pagerCount, onChange: m, disabled: e.disabled }), next: Ct(G3, { disabled: e.disabled, currentPage: h.value, pageCount: d.value, nextText: e.nextText, nextIcon: e.nextIcon, onClick: A }), sizes: Ct(p5, { pageSize: v.value, pageSizes: e.pageSizes, popperClass: e.popperClass, disabled: e.disabled, teleported: e.teleported, size: i.value, appendSizeTo: e.appendSizeTo }), slot: (T = (E = n == null ? void 0 : n.default) == null ? void 0 : E.call(n)) != null ? T : null, total: Ct(C5, { total: Ut(e.total) ? 0 : e.total }) }, z = e.layout.split(",").map((X) => X.trim()); let U = !1; return z.forEach((X) => { if (X === "->") { U = !0; return; } U ? R.push(W[X]) : I.push(W[X]); }), k(I[0], o.is("first")), k(I[I.length - 1], o.is("last")), U && R.length > 0 && (k(R[0], o.is("first")), k(R[R.length - 1], o.is("last")), I.push(D)), Ct("div", { class: [ o.b(), o.is("background", e.background), o.m(i.value) ] }, I); }; } }); const Hi = vt(O5), I5 = we({ trigger: Na.trigger, placement: js.placement, disabled: Na.disabled, visible: Qt.visible, transition: Qt.transition, popperOptions: js.popperOptions, tabindex: js.tabindex, content: Qt.content, popperStyle: Qt.popperStyle, popperClass: Qt.popperClass, enterable: { ...Qt.enterable, default: !0 }, effect: { ...Qt.effect, default: "light" }, teleported: Qt.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 } }), A5 = { "update:visible": (e) => An(e), "before-enter": () => !0, "before-leave": () => !0, "after-enter": () => !0, "after-leave": () => !0 }, F5 = "onUpdate:visible", P5 = K({ name: "ElPopover" }), $5 = /* @__PURE__ */ K({ ...P5, props: I5, emits: A5, setup(e, { expose: t, emit: n }) { const r = e, o = w(() => r[F5]), a = be("popover"), s = $(), i = w(() => { var m; return (m = p(s)) == null ? void 0 : m.popperRef; }), l = w(() => [ { width: yr(r.width) }, r.popperStyle ]), c = w(() => [a.b(), r.popperClass, { [a.m("plain")]: !!r.content }]), u = w(() => r.transition === `${a.namespace.value}-fade-in-linear`), f = () => { var m; (m = s.value) == null || m.hide(); }, g = () => { n("before-enter"); }, v = () => { n("before-leave"); }, d = () => { n("after-enter"); }, h = () => { n("update:visible", !1), n("after-leave"); }; return t({ popperRef: i, hide: f }), (m, y) => (C(), J(p(La), mt({ ref_key: "tooltipRef", ref: s }, m.$attrs, { trigger: m.trigger, placement: m.placement, disabled: m.disabled, visible: m.visible, transition: m.transition, "popper-options": m.popperOptions, tabindex: m.tabindex, content: m.content, offset: m.offset, "show-after": m.showAfter, "hide-after": m.hideAfter, "auto-close": m.autoClose, "show-arrow": m.showArrow, "aria-label": m.title, effect: m.effect, enterable: m.enterable, "popper-class": p(c), "popper-style": p(l), teleported: m.teleported, persistent: m.persistent, "gpu-acceleration": p(u), "onUpdate:visible": p(o), onBeforeShow: g, onBeforeHide: v, onShow: d, onHide: h }), { content: P(() => [ m.title ? (C(), F("div", { key: 0, class: N(p(a).e("title")), role: "title" }, se(m.title), 3)) : G("v-if", !0), ee(m.$slots, "default", {}, () => [ Ce(se(m.content), 1) ]) ]), default: P(() => [ m.$slots.reference ? ee(m.$slots, "reference", { key: 0 }) : G("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 R5 = /* @__PURE__ */ ye($5, [["__file", "popover.vue"]]); const Gf = (e, t) => { const n = t.arg || t.value, r = n == null ? void 0 : n.popperRef; r && (r.triggerRef = e); }; var N5 = { mounted(e, t) { Gf(e, t); }, updated(e, t) { Gf(e, t); } }; const L5 = "popover", B5 = Ik(N5, L5), Qa = vt(R5, { directive: B5 }); function D5(e) { let t; const n = $(!1), r = mn({ ...e, originalPosition: "", originalOverflow: "", visible: !1 }); function o(g) { r.text = g; } function a() { const g = r.parent, v = f.ns; if (!g.vLoadingAddClassList) { let d = g.getAttribute("loading-number"); d = Number.parseInt(d) - 1, d ? g.setAttribute("loading-number", d.toString()) : (Pa(g, v.bm("parent", "relative")), g.removeAttribute("loading-number")), Pa(g, v.bm("parent", "hidden")); } s(), u.unmount(); } function s() { var g, v; (v = (g = f.$el) == null ? void 0 : g.parentNode) == null || v.removeChild(f.$el); } function i() { var g; e.beforeClose && !e.beforeClose() || (n.value = !0, clearTimeout(t), t = setTimeout(l, 400), r.visible = !1, (g = e.closed) == null || g.call(e)); } function l() { if (!n.value) return; const g = r.parent; n.value = !1, g.vLoadingAddClassList = void 0, a(); } const c = K({ name: "ElLoading", setup(g, { expose: v }) { const { ns: d, zIndex: h } = fg("loading"); return v({ ns: d, zIndex: h }), () => { const m = r.spinner || r.svg, y = Ct("svg", { class: "circular", viewBox: r.svgViewBox ? r.svgViewBox : "0 0 50 50", ...m ? { innerHTML: m } : {} }, [ Ct("circle", { class: "path", cx: "25", cy: "25", r: "20", fill: "none" }) ]), x = r.text ? Ct("p", { class: d.b("text") }, [r.text]) : void 0; return Ct(ir, { name: d.b("fade"), onAfterLeave: l }, { default: P(() => [ xe(V("div", { style: { backgroundColor: r.background || "" }, class: [ d.b("mask"), r.customClass, r.fullscreen ? "is-fullscreen" : "" ] }, [ Ct("div", { class: d.b("spinner") }, [y, x]) ]), [[ht, r.visible]]) ]) }); }; } }), u = Hh(c), f = u.mount(document.createElement("div")); return { ...vo(r), setText: o, removeElLoadingChild: s, close: i, handleAfterLeave: l, vm: f, get $el() { return f.$el; } }; } let Es; const M5 = function(e = {}) { if (!Qe) return; const t = j5(e); if (t.fullscreen && Es) return Es; const n = D5({ ...t, closed: () => { var o; (o = t.closed) == null || o.call(t), t.fullscreen && (Es = void 0); } }); V5(t, t.parent, n), Jf(t, t.parent, n), t.parent.vLoadingAddClassList = () => Jf(t, t.parent, n); let r = t.parent.getAttribute("loading-number"); return r ? r = `${Number.parseInt(r) + 1}` : r = "1", t.parent.setAttribute("loading-number", r), t.parent.appendChild(n.$el), Re(() => n.visible.value = t.visible), t.fullscreen && (Es = n), n; }, j5 = (e) => { var t, n, r, o; let a; return jt(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 && ((n = e.fullscreen) != null ? n : !0), lock: (r = e.lock) != null ? r : !1, customClass: e.customClass || "", visible: (o = e.visible) != null ? o : !0, beforeClose: e.beforeClose, closed: e.closed, target: a }; }, V5 = async (e, t, n) => { const { nextZIndex: r } = n.vm.zIndex || n.vm._.exposed.zIndex, o = {}; if (e.fullscreen) n.originalPosition.value = Io(document.body, "position"), n.originalOverflow.value = Io(document.body, "overflow"), o.zIndex = r(); else if (e.parent === document.body) { n.originalPosition.value = Io(document.body, "position"), await Re(); for (const a of ["top", "left"]) { const s = a === "top" ? "scrollTop" : "scrollLeft"; o[a] = `${e.target.getBoundingClientRect()[a] + document.body[s] + document.documentElement[s] - Number.parseInt(Io(document.body, `margin-${a}`), 10)}px`; } for (const a of ["height", "width"]) o[a] = `${e.target.getBoundingClientRect()[a]}px`; } else n.originalPosition.value = Io(t, "position"); for (const [a, s] of Object.entries(o)) n.$el.style[a] = s; }, Jf = (e, t, n) => { const r = n.vm.ns || n.vm._.exposed.ns; ["absolute", "fixed", "sticky"].includes(n.originalPosition.value) ? Pa(t, r.bm("parent", "relative")) : ac(t, r.bm("parent", "relative")), e.fullscreen && e.lock ? ac(t, r.bm("parent", "hidden")) : Pa(t, r.bm("parent", "hidden")); }, Vs = Symbol("ElLoading"), Zf = (e, t) => { var n, r, o, a; const s = t.instance, i = (g) => At(t.value) ? t.value[g] : void 0, l = (g) => { const v = jt(g) && (s == null ? void 0 : s[g]) || g; return v && $(v); }, c = (g) => l(i(g) || e.getAttribute(`element-loading-${g1(g)}`)), u = (n = i("fullscreen")) != null ? n : t.modifiers.fullscreen, f = { text: c("text"), svg: c("svg"), svgViewBox: c("svgViewBox"), spinner: c("spinner"), background: c("background"), customClass: c("customClass"), fullscreen: u, target: (r = i("target")) != null ? r : u ? void 0 : e, body: (o = i("body")) != null ? o : t.modifiers.body, lock: (a = i("lock")) != null ? a : t.modifiers.lock }; e[Vs] = { options: f, instance: M5(f) }; }, z5 = (e, t) => { for (const n of Object.keys(t)) Tn(t[n]) && (t[n].value = e[n]); }, Zo = { mounted(e, t) { t.value && Zf(e, t); }, updated(e, t) { const n = e[Vs]; t.oldValue !== t.value && (t.value && !t.oldValue ? Zf(e, t) : t.value && t.oldValue ? At(t.value) && z5(t.value, n.options) : n == null || n.instance.close()); }, unmounted(e) { var t; (t = e[Vs]) == null || t.instance.close(), e[Vs] = null; } }, am = ["success", "info", "warning", "error"], Bt = vr({ customClass: "", center: !1, dangerouslyUseHTMLString: !1, duration: 3e3, icon: void 0, id: "", message: "", onClose: void 0, showClose: !1, type: "info", plain: !1, offset: 16, zIndex: 0, grouping: !1, repeatNum: 1, appendTo: Qe ? document.body : void 0 }), H5 = we({ customClass: { type: String, default: Bt.customClass }, center: { type: Boolean, default: Bt.center }, dangerouslyUseHTMLString: { type: Boolean, default: Bt.dangerouslyUseHTMLString }, duration: { type: Number, default: Bt.duration }, icon: { type: yn, default: Bt.icon }, id: { type: String, default: Bt.id }, message: { type: ue([ String, Object, Function ]), default: Bt.message }, onClose: { type: ue(Function), default: Bt.onClose }, showClose: { type: Boolean, default: Bt.showClose }, type: { type: String, values: am, default: Bt.type }, plain: { type: Boolean, default: Bt.plain }, offset: { type: Number, default: Bt.offset }, zIndex: { type: Number, default: Bt.zIndex }, grouping: { type: Boolean, default: Bt.grouping }, repeatNum: { type: Number, default: Bt.repeatNum } }), U5 = { destroy: () => !0 }, Hn = Pb([]), q5 = (e) => { const t = Hn.findIndex((o) => o.id === e), n = Hn[t]; let r; return t > 0 && (r = Hn[t - 1]), { current: n, prev: r }; }, K5 = (e) => { const { prev: t } = q5(e); return t ? t.vm.exposed.bottom.value : 0; }, W5 = (e, t) => Hn.findIndex((r) => r.id === e) > 0 ? 16 : t, G5 = K({ name: "ElMessage" }), J5 = /* @__PURE__ */ K({ ...G5, props: H5, emits: U5, setup(e, { expose: t }) { const n = e, { Close: r } = Tk, { ns: o, zIndex: a } = fg("message"), { currentZIndex: s, nextZIndex: i } = a, l = $(), c = $(!1), u = $(0); let f; const g = w(() => n.type ? n.type === "error" ? "danger" : n.type : "info"), v = w(() => { const I = n.type; return { [o.bm("icon", I)]: I && cf[I] }; }), d = w(() => n.icon || cf[n.type] || ""), h = w(() => K5(n.id)), m = w(() => W5(n.id, n.offset) + h.value), y = w(() => u.value + m.value), x = w(() => ({ top: `${m.value}px`, zIndex: s.value })); function A() { n.duration !== 0 && ({ stop: f } = Xl(() => { E(); }, n.duration)); } function k() { f == null || f(); } function E() { c.value = !1; } function T({ code: I }) { I === Ve.esc && E(); } return Ye(() => { A(), i(), c.value = !0; }), oe(() => n.repeatNum, () => { k(), A(); }), vn(document, "keydown", T), Vn(l, () => { u.value = l.value.getBoundingClientRect().height; }), t({ visible: c, bottom: y, close: E }), (I, R) => (C(), J(ir, { name: p(o).b("fade"), onBeforeLeave: I.onClose, onAfterLeave: (D) => I.$emit("destroy"), persisted: "" }, { default: P(() => [ xe(M("div", { id: I.id, ref_key: "messageRef", ref: l, class: N([ p(o).b(), { [p(o).m(I.type)]: I.type }, p(o).is("center", I.center), p(o).is("closable", I.showClose), p(o).is("plain", I.plain), I.customClass ]), style: Ue(p(x)), role: "alert", onMouseenter: k, onMouseleave: A }, [ I.repeatNum > 1 ? (C(), J(p(Dx), { key: 0, value: I.repeatNum, type: p(g), class: N(p(o).e("badge")) }, null, 8, ["value", "type", "class"])) : G("v-if", !0), p(d) ? (C(), J(p(He), { key: 1, class: N([p(o).e("icon"), p(v)]) }, { default: P(() => [ (C(), J(pt(p(d)))) ]), _: 1 }, 8, ["class"])) : G("v-if", !0), ee(I.$slots, "default", {}, () => [ I.dangerouslyUseHTMLString ? (C(), F(Ie, { key: 1 }, [ G(" Caution here, message could've been compromised, never use user's input as message "), M("p", { class: N(p(o).e("content")), innerHTML: I.message }, null, 10, ["innerHTML"]) ], 2112)) : (C(), F("p", { key: 0, class: N(p(o).e("content")) }, se(I.message), 3)) ]), I.showClose ? (C(), J(p(He), { key: 2, class: N(p(o).e("closeBtn")), onClick: Be(E, ["stop"]) }, { default: P(() => [ V(p(r)) ]), _: 1 }, 8, ["class", "onClick"])) : G("v-if", !0) ], 46, ["id"]), [ [ht, c.value] ]) ]), _: 3 }, 8, ["name", "onBeforeLeave", "onAfterLeave"])); } }); var Z5 = /* @__PURE__ */ ye(J5, [["__file", "message.vue"]]); let Y5 = 1; const sm = (e) => { const t = !e || jt(e) || Uh(e) || ut(e) ? { message: e } : e, n = { ...Bt, ...t }; if (!n.appendTo) n.appendTo = document.body; else if (jt(n.appendTo)) { let r = document.querySelector(n.appendTo); Rr(r) || (yt("ElMessage", "the appendTo option is not an HTMLElement. Falling back to document.body."), r = document.body), n.appendTo = r; } return An(jn.grouping) && !n.grouping && (n.grouping = jn.grouping), je(jn.duration) && n.duration === 3e3 && (n.duration = jn.duration), je(jn.offset) && n.offset === 16 && (n.offset = jn.offset), An(jn.showClose) && !n.showClose && (n.showClose = jn.showClose), n; }, X5 = (e) => { const t = Hn.indexOf(e); if (t === -1) return; Hn.splice(t, 1); const { handler: n } = e; n.close(); }, Q5 = ({ appendTo: e, ...t }, n) => { const r = `message_${Y5++}`, o = t.onClose, a = document.createElement("div"), s = { ...t, id: r, onClose: () => { o == null || o(), X5(u); }, onDestroy: () => { gd(null, a); } }, i = V(Z5, s, ut(s.message) || Uh(s.message) ? { default: ut(s.message) ? s.message : () => s.message } : null); i.appContext = n || jo._context, gd(i, a), e.appendChild(a.firstElementChild); const l = i.component, u = { id: r, vnode: i, vm: l, handler: { close: () => { l.exposed.visible.value = !1; } }, props: i.component.props }; return u; }, jo = (e = {}, t) => { if (!Qe) return { close: () => { } }; const n = sm(e); if (n.grouping && Hn.length) { const o = Hn.find(({ vnode: a }) => { var s; return ((s = a.props) == null ? void 0 : s.message) === n.message; }); if (o) return o.props.repeatNum += 1, o.props.type = n.type, o.handler; } if (je(jn.max) && Hn.length >= jn.max) return { close: () => { } }; const r = Q5(n, t); return Hn.push(r), r.handler; }; am.forEach((e) => { jo[e] = (t = {}, n) => { const r = sm(t); return jo({ ...r, type: e }, n); }; }); function eI(e) { for (const t of Hn) (!e || e === t.props.type) && t.handler.close(); } jo.closeAll = eI; jo._context = null; const im = Ok(jo, "$message"), Nn = (e, t) => { const n = e.__vccOpts || e; for (const [r, o] of t) n[r] = o; return n; }, tI = { name: "BadgesGroup", components: { Button: Kt }, props: { /** * Object containing information for * the required viewing. */ additionalLinks: { type: Array, default: () => [] }, datasetBiolucida: { type: Object, default: () => ({}) }, entry: { type: Object, default: () => ({}) } }, data: function() { return { //Always start with 1 image - the dataset thumbnail itself categories: { All: { size: 1 }, Dataset: { size: 1 } }, active: "All" }; }, methods: { addToCategories: function(e, t) { e && e.length > 0 && (this.categories[t] = { size: e.length }, this.categories.All.size += e.length); }, addSimulationsToCategories: function(e) { if (e && e.length > 0) { const t = e.length; this.categories.Simulations = { size: t }, this.categories.All.size += t; } }, categoryClicked: function(e) { this.active = e, this.$emit("categoryChanged", e); } }, watch: { datasetBiolucida: { deep: !0, immediate: !0, handler: function(e) { "dataset_images" in e && this.addToCategories(e.dataset_images, "Images"); } }, entry: { deep: !0, immediate: !0, handler: function() { this.addToCategories(this.entry.flatmaps, "Flatmaps"), this.addToCategories(this.entry.plots, "Plots"), this.addToCategories(this.entry.scaffolds, "Scaffolds"), this.addToCategories(this.entry.segmentation, "Segmentations"), this.addSimulationsToCategories(this.entry.simulation); } } } }, nI = { key: 0, class: "container", ref: "container" }; function rI(e, t, n, r, o, a) { const s = Kt; return e.categories.All.size > 1 ? (C(), F("div", nI, [ t[0] || (t[0] = M("div", null, "View data types:", -1)), (C(!0), F(Ie, null, ot(e.categories, (i, l) => (C(), F(Ie, null, [ i.size > 0 ? (C(), J(s, { class: N([{ active: l == e.active }, "tag-button"]), onClick: (c) => a.categoryClicked(l), size: "small", key: l }, { default: P(() => [ Ce(se(l + " (" + i.size + ")"), 1) ]), _: 2 }, 1032, ["class", "onClick"])) : G("", !0) ], 64))), 256)) ], 512)) : G("", !0); } const lm = /* @__PURE__ */ Nn(tI, [["render", rI], ["__scopeId", "data-v-5ab783e1"]]); function cm(e, t) { return function() { return e.apply(t, arguments); }; } const { toString: oI } = Object.prototype, { getPrototypeOf: xu } = Object, { iterator: Ui, toStringTag: um } = Symbol, qi = /* @__PURE__ */ ((e) => (t) => { const n = oI.call(t); return e[n] || (e[n] = n.slice(8, -1).toLowerCase()); })(/* @__PURE__ */ Object.create(null)), Wn = (e) => (e = e.toLowerCase(), (t) => qi(t) === e), Ki = (e) => (t) => typeof t === e, { isArray: Yo } = Array, Vo = Ki("undefined"); function es(e) { return e !== null && !Vo(e) && e.constructor !== null && !Vo(e.constructor) && nn(e.constructor.isBuffer) && e.constructor.isBuffer(e); } const dm = Wn("ArrayBuffer"); function aI(e) { let t; return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && dm(e.buffer), t; } const sI = Ki("string"), nn = Ki("function"), fm = Ki("number"), ts = (e) => e !== null && typeof e == "object", iI = (e) => e === !0 || e === !1, zs = (e) => { if (qi(e) !== "object") return !1; const t = xu(e); return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(um in e) && !(Ui in e); }, lI = (e) => { if (!ts(e) || es(e)) return !1; try { return Object.keys(e).length === 0 && Object.getPrototypeOf(e) === Object.prototype; } catch { return !1; } }, cI = Wn("Date"), uI = Wn("File"), dI = Wn("Blob"), fI = Wn("FileList"), pI = (e) => ts(e) && nn(e.pipe), hI = (e) => { let t; return e && (typeof FormData == "function" && e instanceof FormData || nn(e.append) && ((t = qi(e)) === "formdata" || // detect form-data instance t === "object" && nn(e.toString) && e.toString() === "[object FormData]")); }, vI = Wn("URLSearchParams"), [gI, mI, yI, bI] = ["ReadableStream", "Request", "Response", "Headers"].map(Wn), wI = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ""); function ns(e, t, { allOwnKeys: n = !1 } = {}) { if (e === null || typeof e > "u") return; let r, o; if (typeof e != "object" && (e = [e]), Yo(e)) for (r = 0, o = e.length; r < o; r++) t.call(null, e[r], r, e); else { if (es(e)) return; const a = n ? Object.getOwnPropertyNames(e) : Object.keys(e), s = a.length; let i; for (r = 0; r < s; r++) i = a[r], t.call(null, e[i], i, e); } } function pm(e, t) { if (es(e)) return null; t = t.toLowerCase(); const n = Object.keys(e); let r = n.length, o; for (; r-- > 0; ) if (o = n[r], t === o.toLowerCase()) return o; return null; } const Jr = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, hm = (e) => !Vo(e) && e !== Jr; function fc() { const { caseless: e, skipUndefined: t } = hm(this) && this || {}, n = {}, r = (o, a) => { const s = e && pm(n, a) || a; zs(n[s]) && zs(o) ? n[s] = fc(n[s], o) : zs(o) ? n[s] = fc({}, o) : Yo(o) ? n[s] = o.slice() : (!t || !Vo(o)) && (n[s] = o); }; for (let o = 0, a = arguments.length; o < a; o++) arguments[o] && ns(arguments[o], r); return n; } const CI = (e, t, n, { allOwnKeys: r } = {}) => (ns(t, (o, a) => { n && nn(o) ? e[a] = cm(o, n) : e[a] = o; }, { allOwnKeys: r }), e), SI = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), kI = (e, t, n, r) => { e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", { value: t.prototype }), n && Object.assign(e.prototype, n); }, _I = (e, t, n, r) => { let o, a, s; const i = {}; if (t = t || {}, e == null) return t; do { for (o = Object.getOwnPropertyNames(e), a = o.length; a-- > 0; ) s = o[a], (!r || r(s, e, t)) && !i[s] && (t[s] = e[s], i[s] = !0); e = n !== !1 && xu(e); } while (e && (!n || n(e, t)) && e !== Object.prototype); return t; }, EI = (e, t, n) => { e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length; const r = e.indexOf(t, n); return r !== -1 && r === n; }, xI = (e) => { if (!e) return null; if (Yo(e)) return e; let t = e.length; if (!fm(t)) return null; const n = new Array(t); for (; t-- > 0; ) n[t] = e[t]; return n; }, TI = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && xu(Uint8Array)), OI = (e, t) => { const r = (e && e[Ui]).call(e); let o; for (; (o = r.next()) && !o.done; ) { const a = o.value; t.call(e, a[0], a[1]); } }, II = (e, t) => { let n; const r = []; for (; (n = e.exec(t)) !== null; ) r.push(n); return r; }, AI = Wn("HTMLFormElement"), FI = (e) => e.toLowerCase().replace( /[-_\s]([a-z\d])(\w*)/g, function(n, r, o) { return r.toUpperCase() + o; } ), Yf = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), PI = Wn("RegExp"), vm = (e, t) => { const n = Object.getOwnPropertyDescriptors(e), r = {}; ns(n, (o, a) => { let s; (s = t(o, a, e)) !== !1 && (r[a] = s || o); }), Object.defineProperties(e, r); }, $I = (e) => { vm(e, (t, n) => { if (nn(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1) return !1; const r = e[n]; if (nn(r)) { if (t.enumerable = !1, "writable" in t) { t.writable = !1; return; } t.set || (t.set = () => { throw Error("Can not rewrite read-only method '" + n + "'"); }); } }); }, RI = (e, t) => { const n = {}, r = (o) => { o.forEach((a) => { n[a] = !0; }); }; return Yo(e) ? r(e) : r(String(e).split(t)), n; }, NI = () => { }, LI = (e, t) => e != null && Number.isFinite(e = +e) ? e : t; function BI(e) { return !!(e && nn(e.append) && e[um] === "FormData" && e[Ui]); } const DI = (e) => { const t = new Array(10), n = (r, o) => { if (ts(r)) { if (t.indexOf(r) >= 0) return; if (es(r)) return r; if (!("toJSON" in r)) { t[o] = r; const a = Yo(r) ? [] : {}; return ns(r, (s, i) => { const l = n(s, o + 1); !Vo(l) && (a[i] = l); }), t[o] = void 0, a; } } return r; }; return n(e, 0); }, MI = Wn("AsyncFunction"), jI = (e) => e && (ts(e) || nn(e)) && nn(e.then) && nn(e.catch), gm = ((e, t) => e ? setImmediate : t ? ((n, r) => (Jr.addEventListener("message", ({ source: o, data: a }) => { o === Jr && a === n && r.length && r.shift()(); }, !1), (o) => { r.push(o), Jr.postMessage(n, "*"); }))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))( typeof setImmediate == "function", nn(Jr.postMessage) ), VI = typeof queueMicrotask < "u" ? queueMicrotask.bind(Jr) : typeof process < "u" && process.nextTick || gm, zI = (e) => e != null && nn(e[Ui]), j = { isArray: Yo, isArrayBuffer: dm, isBuffer: es, isFormData: hI, isArrayBufferView: aI, isString: sI, isNumber: fm, isBoolean: iI, isObject: ts, isPlainObject: zs, isEmptyObject: lI, isReadableStream: gI, isRequest: mI, isResponse: yI, isHeaders: bI, isUndefined: Vo, isDate: cI, isFile: uI, isBlob: dI, isRegExp: PI, isFunction: nn, isStream: pI, isURLSearchParams: vI, isTypedArray: TI, isFileList: fI, forEach: ns, merge: fc, extend: CI, trim: wI, stripBOM: SI, inherits: kI, toFlatObject: _I, kindOf: qi, kindOfTest: Wn, endsWith: EI, toArray: xI, forEachEntry: OI, matchAll: II, isHTMLForm: AI, hasOwnProperty: Yf, hasOwnProp: Yf, // an alias to avoid ESLint no-prototype-builtins detection reduceDescriptors: vm, freezeMethods: $I, toObjectSet: RI, toCamelCase: FI, noop: NI, toFiniteNumber: LI, findKey: pm, global: Jr, isContextDefined: hm, isSpecCompliantForm: BI, toJSONObject: DI, isAsyncFn: MI, isThenable: jI, setImmediate: gm, asap: VI, isIterable: zI }; function Te(e, t, n, r, o) { Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), n && (this.config = n), r && (this.request = r), o && (this.response = o, this.status = o.status ? o.status : null); } j.inherits(Te, Error, { toJSON: function() { return { // Standard message: this.message, name: this.name, // Microsoft description: this.description, number: this.number, // Mozilla fileName: this.fileName, lineNumber: this.lineNumber, columnNumber: this.columnNumber, stack: this.stack, // Axios config: j.toJSONObject(this.config), code: this.code, status: this.status }; } }); const mm = Te.prototype, ym = {}; [ "ERR_BAD_OPTION_VALUE", "ERR_BAD_OPTION", "ECONNABORTED", "ETIMEDOUT", "ERR_NETWORK", "ERR_FR_TOO_MANY_REDIRECTS", "ERR_DEPRECATED", "ERR_BAD_RESPONSE", "ERR_BAD_REQUEST", "ERR_CANCELED", "ERR_NOT_SUPPORT", "ERR_INVALID_URL" // eslint-disable-next-line func-names ].forEach((e) => { ym[e] = { value: e }; }); Object.defineProperties(Te, ym); Object.defineProperty(mm, "isAxiosError", { value: !0 }); Te.from = (e, t, n, r, o, a) => { const s = Object.create(mm); j.toFlatObject(e, s, function(u) { return u !== Error.prototype; }, (c) => c !== "isAxiosError"); const i = e && e.message ? e.message : "Error", l = t == null && e ? e.code : t; return Te.call(s, i, l, n, r, o), e && s.cause == null && Object.defineProperty(s, "cause", { value: e, configurable: !0 }), s.name = e && e.name || "Error", a && Object.assign(s, a), s; }; const HI = null; function pc(e) { return j.isPlainObject(e) || j.isArray(e); } function bm(e) { return j.endsWith(e, "[]") ? e.slice(0, -2) : e; } function Xf(e, t, n) { return e ? e.concat(t).map(function(o, a) { return o = bm(o), !n && a ? "[" + o + "]" : o; }).join(n ? "." : "") : t; } function UI(e) { return j.isArray(e) && !e.some(pc); } const qI = j.toFlatObject(j, {}, null, function(t) { return /^is[A-Z]/.test(t); }); function Wi(e, t, n) { if (!j.isObject(e)) throw new TypeError("target must be an object"); t = t || new FormData(), n = j.toFlatObject(n, { metaTokens: !0, dots: !1, indexes: !1 }, !1, function(h, m) { return !j.isUndefined(m[h]); }); const r = n.metaTokens, o = n.visitor || u, a = n.dots, s = n.indexes, l = (n.Blob || typeof Blob < "u" && Blob) && j.isSpecCompliantForm(t); if (!j.isFunction(o)) throw new TypeError("visitor must be a function"); function c(d) { if (d === null) return ""; if (j.isDate(d)) return d.toISOString(); if (j.isBoolean(d)) return d.toString(); if (!l && j.isBlob(d)) throw new Te("Blob is not supported. Use a Buffer instead."); return j.isArrayBuffer(d) || j.isTypedArray(d) ? l && typeof Blob == "function" ? new Blob([d]) : Buffer.from(d) : d; } function u(d, h, m) { let y = d; if (d && !m && typeof d == "object") { if (j.endsWith(h, "{}")) h = r ? h : h.slice(0, -2), d = JSON.stringify(d); else if (j.isArray(d) && UI(d) || (j.isFileList(d) || j.endsWith(h, "[]")) && (y = j.toArray(d))) return h = bm(h), y.forEach(function(A, k) { !(j.isUndefined(A) || A === null) && t.append( // eslint-disable-next-line no-nested-ternary s === !0 ? Xf([h], k, a) : s === null ? h : h + "[]", c(A) ); }), !1; } return pc(d) ? !0 : (t.append(Xf(m, h, a), c(d)), !1); } const f = [], g = Object.assign(qI, { defaultVisitor: u, convertValue: c, isVisitable: pc }); function v(d, h) { if (!j.isUndefined(d)) { if (f.indexOf(d) !== -1) throw Error("Circular reference detected in " + h.join(".")); f.push(d), j.forEach(d, function(y, x) { (!(j.isUndefined(y) || y === null) && o.call( t, y, j.isString(x) ? x.trim() : x, h, g )) === !0 && v(y, h ? h.concat(x) : [x]); }), f.pop(); } } if (!j.isObject(e)) throw new TypeError("data must be an object"); return v(e), t; } function Qf(e) { const t = { "!": "%21", "'": "%27", "(": "%28", ")": "%29", "~": "%7E", "%20": "+", "%00": "\0" }; return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(r) { return t[r]; }); } function Tu(e, t) { this._pairs = [], e && Wi(e, this, t); } const wm = Tu.prototype; wm.append = function(t, n) { this._pairs.push([t, n]); }; wm.toString = function(t) { const n = t ? function(r) { return t.call(this, r, Qf); } : Qf; return this._pairs.map(function(o) { return n(o[0]) + "=" + n(o[1]); }, "").join("&"); }; function KI(e) { return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+"); } function Cm(e, t, n) { if (!t) return e; const r = n && n.encode || KI; j.isFunction(n) && (n = { serialize: n }); const o = n && n.serialize; let a; if (o ? a = o(t, n) : a = j.isURLSearchParams(t) ? t.toString() : new Tu(t, n).toString(r), a) { const s = e.indexOf("#"); s !== -1 && (e = e.slice(0, s)), e += (e.indexOf("?") === -1 ? "?" : "&") + a; } return e; } class ep { constructor() { this.handlers = []; } /** * Add a new interceptor to the stack * * @param {Function} fulfilled The function to handle `then` for a `Promise` * @param {Function} rejected The function to handle `reject` for a `Promise` * * @return {Number} An ID used to remove interceptor later */ use(t, n, r) { return this.handlers.push({ fulfilled: t, rejected: n, synchronous: r ? r.synchronous : !1, runWhen: r ? r.runWhen : null }), this.handlers.length - 1; } /** * Remove an interceptor from the stack * * @param {Number} id The ID that was returned by `use` * * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise */ eject(t) { this.handlers[t] && (this.handlers[t] = null); } /** * Clear all interceptors from the stack * * @returns {void} */ clear() { this.handlers && (this.handlers = []); } /** * Iterate over all the registered interceptors * * This method is particularly useful for skipping over any * interceptors that may have become `null` calling `eject`. * * @param {Function} fn The function to call for each interceptor * * @returns {void} */ forEach(t) { j.forEach(this.handlers, function(r) { r !== null && t(r); }); } } const Sm = { silentJSONParsing: !0, forcedJSONParsing: !0, clarifyTimeoutError: !1 }, WI = typeof URLSearchParams < "u" ? URLSearchParams : Tu, GI = typeof FormData < "u" ? FormData : null, JI = typeof Blob < "u" ? Blob : null, ZI = { isBrowser: !0, classes: { URLSearchParams: WI, FormData: GI, Blob: JI }, protocols: ["http", "https", "file", "blob", "url", "data"] }, Ou = typeof window < "u" && typeof document < "u", hc = typeof navigator == "object" && navigator || void 0, YI = Ou && (!hc || ["ReactNative", "NativeScript", "NS"].indexOf(hc.product) < 0), XI = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef self instanceof WorkerGlobalScope && typeof self.importScripts == "function", QI = Ou && window.location.href || "http://localhost", eA = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, hasBrowserEnv: Ou, hasStandardBrowserEnv: YI, hasStandardBrowserWebWorkerEnv: XI, navigator: hc, origin: QI }, Symbol.toStringTag, { value: "Module" })), Dt = { ...eA, ...ZI }; function tA(e, t) { return Wi(e, new Dt.classes.URLSearchParams(), { visitor: function(n, r, o, a) { return Dt.isNode && j.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : a.defaultVisitor.apply(this, arguments); }, ...t }); } function nA(e) { return j.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]); } function rA(e) { const t = {}, n = Object.keys(e); let r; const o = n.length; let a; for (r = 0; r < o; r++) a = n[r], t[a] = e[a]; return t; } function km(e) { function t(n, r, o, a) { let s = n[a++]; if (s === "__proto__") return !0; const i = Number.isFinite(+s), l = a >= n.length; return s = !s && j.isArray(o) ? o.length : s, l ? (j.hasOwnProp(o, s) ? o[s] = [o[s], r] : o[s] = r, !i) : ((!o[s] || !j.isObject(o[s])) && (o[s] = []), t(n, r, o[s], a) && j.isArray(o[s]) && (o[s] = rA(o[s])), !i); } if (j.isFormData(e) && j.isFunction(e.entries)) { const n = {}; return j.forEachEntry(e, (r, o) => { t(nA(r), o, n, 0); }), n; } return null; } function oA(e, t, n) { if (j.isString(e)) try { return (t || JSON.parse)(e), j.trim(e); } catch (r) { if (r.name !== "SyntaxError") throw r; } return (0, JSON.stringify)(e); } const rs = { transitional: Sm, adapter: ["xhr", "http", "fetch"], transformRequest: [function(t, n) { const r = n.getContentType() || "", o = r.indexOf("application/json") > -1, a = j.isObject(t); if (a && j.isHTMLForm(t) && (t = new FormData(t)), j.isFormData(t)) return o ? JSON.stringify(km(t)) : t; if (j.isArrayBuffer(t) || j.isBuffer(t) || j.isStream(t) || j.isFile(t) || j.isBlob(t) || j.isReadableStream(t)) return t; if (j.isArrayBufferView(t)) return t.buffer; if (j.isURLSearchParams(t)) return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString(); let i; if (a) { if (r.indexOf("application/x-www-form-urlencoded") > -1) return tA(t, this.formSerializer).toString(); if ((i = j.isFileList(t)) || r.indexOf("multipart/form-data") > -1) { const l = this.env && this.env.FormData; return Wi( i ? { "files[]": t } : t, l && new l(), this.formSerializer ); } } return a || o ? (n.setContentType("application/json", !1), oA(t)) : t; }], transformResponse: [function(t) { const n = this.transitional || rs.transitional, r = n && n.forcedJSONParsing, o = this.responseType === "json"; if (j.isResponse(t) || j.isReadableStream(t)) return t; if (t && j.isString(t) && (r && !this.responseType || o)) { const s = !(n && n.silentJSONParsing) && o; try { return JSON.parse(t, this.parseReviver); } catch (i) { if (s) throw i.name === "SyntaxError" ? Te.from(i, Te.ERR_BAD_RESPONSE, this, null, this.response) : i; } } return t; }], /** * A timeout in milliseconds to abort a request. If set to 0 (default) a * timeout is not created. */ timeout: 0, xsrfCookieName: "XSRF-TOKEN", xsrfHeaderName: "X-XSRF-TOKEN", maxContentLength: -1, maxBodyLength: -1, env: { FormData: Dt.classes.FormData, Blob: Dt.classes.Blob }, validateStatus: function(t) { return t >= 200 && t < 300; }, headers: { common: { Accept: "application/json, text/plain, */*", "Content-Type": void 0 } } }; j.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => { rs.headers[e] = {}; }); const aA = j.toObjectSet([ "age", "authorization", "content-length", "content-type", "etag", "expires", "from", "host", "if-modified-since", "if-unmodified-since", "last-modified", "location", "max-forwards", "proxy-authorization", "referer", "retry-after", "user-agent" ]), sA = (e) => { const t = {}; let n, r, o; return e && e.split(` `).forEach(function(s) { o = s.indexOf(":"), n = s.substring(0, o).trim().toLowerCase(), r = s.substring(o + 1).trim(), !(!n || t[n] && aA[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r); }), t; }, tp = Symbol("internals"); function fa(e) { return e && String(e).trim().toLowerCase(); } function Hs(e) { return e === !1 || e == null ? e : j.isArray(e) ? e.map(Hs) : String(e); } function iA(e) { const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g; let r; for (; r = n.exec(e); ) t[r[1]] = r[2]; return t; } const lA = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()); function Nl(e, t, n, r, o) { if (j.isFunction(r)) return r.call(this, t, n); if (o && (t = n), !!j.isString(t)) { if (j.isString(r)) return t.indexOf(r) !== -1; if (j.isRegExp(r)) return r.test(t); } } function cA(e) { return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r); } function uA(e, t) { const n = j.toCamelCase(" " + t); ["get", "set", "has"].forEach((r) => { Object.defineProperty(e, r + n, { value: function(o, a, s) { return this[r].call(this, t, o, a, s); }, configurable: !0 }); }); } class rn { constructor(t) { t && this.set(t); } set(t, n, r) { const o = this; function a(i, l, c) { const u = fa(l); if (!u) throw new Error("header name must be a non-empty string"); const f = j.findKey(o, u); (!f || o[f] === void 0 || c === !0 || c === void 0 && o[f] !== !1) && (o[f || l] = Hs(i)); } const s = (i, l) => j.forEach(i, (c, u) => a(c, u, l)); if (j.isPlainObject(t) || t instanceof this.constructor) s(t, n); else if (j.isString(t) && (t = t.trim()) && !lA(t)) s(sA(t), n); else if (j.isObject(t) && j.isIterable(t)) { let i = {}, l, c; for (const u of t) { if (!j.isArray(u)) throw TypeError("Object iterator must return a key-value pair"); i[c = u[0]] = (l = i[c]) ? j.isArray(l) ? [...l, u[1]] : [l, u[1]] : u[1]; } s(i, n); } else t != null && a(n, t, r); return this; } get(t, n) { if (t = fa(t), t) { const r = j.findKey(this, t); if (r) { const o = this[r]; if (!n) return o; if (n === !0) return iA(o); if (j.isFunction(n)) return n.call(this, o, r); if (j.isRegExp(n)) return n.exec(o); throw new TypeError("parser must be boolean|regexp|function"); } } } has(t, n) { if (t = fa(t), t) { const r = j.findKey(this, t); return !!(r && this[r] !== void 0 && (!n || Nl(this, this[r], r, n))); } return !1; } delete(t, n) { const r = this; let o = !1; function a(s) { if (s = fa(s), s) { const i = j.findKey(r, s); i && (!n || Nl(r, r[i], i, n)) && (delete r[i], o = !0); } } return j.isArray(t) ? t.forEach(a) : a(t), o; } clear(t) { const n = Object.keys(this); let r = n.length, o = !1; for (; r--; ) { const a = n[r]; (!t || Nl(this, this[a], a, t, !0)) && (delete this[a], o = !0); } return o; } normalize(t) { const n = this, r = {}; return j.forEach(this, (o, a) => { const s = j.findKey(r, a); if (s) { n[s] = Hs(o), delete n[a]; return; } const i = t ? cA(a) : String(a).trim(); i !== a && delete n[a], n[i] = Hs(o), r[i] = !0; }), this; } concat(...t) { return this.constructor.concat(this, ...t); } toJSON(t) { const n = /* @__PURE__ */ Object.create(null); return j.forEach(this, (r, o) => { r != null && r !== !1 && (n[o] = t && j.isArray(r) ? r.join(", ") : r); }), n; } [Symbol.iterator]() { return Object.entries(this.toJSON())[Symbol.iterator](); } toString() { return Object.entries(this.toJSON()).map(([t, n]) => t + ": " + n).join(` `); } getSetCookie() { return this.get("set-cookie") || []; } get [Symbol.toStringTag]() { return "AxiosHeaders"; } static from(t) { return t instanceof this ? t : new this(t); } static concat(t, ...n) { const r = new this(t); return n.forEach((o) => r.set(o)), r; } static accessor(t) { const r = (this[tp] = this[tp] = { accessors: {} }).accessors, o = this.prototype; function a(s) { const i = fa(s); r[i] || (uA(o, s), r[i] = !0); } return j.isArray(t) ? t.forEach(a) : a(t), this; } } rn.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]); j.reduceDescriptors(rn.prototype, ({ value: e }, t) => { let n = t[0].toUpperCase() + t.slice(1); return { get: () => e, set(r) { this[n] = r; } }; }); j.freezeMethods(rn); function Ll(e, t) { const n = this || rs, r = t || n, o = rn.from(r.headers); let a = r.data; return j.forEach(e, function(i) { a = i.call(n, a, o.normalize(), t ? t.status : void 0); }), o.normalize(), a; } function _m(e) { return !!(e && e.__CANCEL__); } function Xo(e, t, n) { Te.call(this, e ?? "canceled", Te.ERR_CANCELED, t, n), this.name = "CanceledError"; } j.inherits(Xo, Te, { __CANCEL__: !0 }); function Em(e, t, n) { const r = n.config.validateStatus; !n.status || !r || r(n.status) ? e(n) : t(new Te( "Request failed with status code " + n.status, [Te.ERR_BAD_REQUEST, Te.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4], n.config, n.request, n )); } function dA(e) { const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e); return t && t[1] || ""; } function fA(e, t) { e = e || 10; const n = new Array(e), r = new Array(e); let o = 0, a = 0, s; return t = t !== void 0 ? t : 1e3, function(l) { const c = Date.now(), u = r[a]; s || (s = c), n[o] = l, r[o] = c; let f = a, g = 0; for (; f !== o; ) g += n[f++], f = f % e; if (o = (o + 1) % e, o === a && (a = (a + 1) % e), c - s < t) return; const v = u && c - u; return v ? Math.round(g * 1e3 / v) : void 0; }; } function pA(e, t) { let n = 0, r = 1e3 / t, o, a; const s = (c, u = Date.now()) => { n = u, o = null, a && (clearTimeout(a), a = null), e(...c); }; return [(...c) => { const u = Date.now(), f = u - n; f >= r ? s(c, u) : (o = c, a || (a = setTimeout(() => { a = null, s(o); }, r - f))); }, () => o && s(o)]; } const li = (e, t, n = 3) => { let r = 0; const o = fA(50, 250); return pA((a) => { const s = a.loaded, i = a.lengthComputable ? a.total : void 0, l = s - r, c = o(l), u = s <= i; r = s; const f = { loaded: s, total: i, progress: i ? s / i : void 0, bytes: l, rate: c || void 0, estimated: c && i && u ? (i - s) / c : void 0, event: a, lengthComputable: i != null, [t ? "download" : "upload"]: !0 }; e(f); }, n); }, np = (e, t) => { const n = e != null; return [(r) => t[0]({ lengthComputable: n, total: e, loaded: r }), t[1]]; }, rp = (e) => (...t) => j.asap(() => e(...t)), hA = Dt.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, Dt.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))( new URL(Dt.origin), Dt.navigator && /(msie|trident)/i.test(Dt.navigator.userAgent) ) : () => !0, vA = Dt.hasStandardBrowserEnv ? ( // Standard browser envs support document.cookie { write(e, t, n, r, o, a) { const s = [e + "=" + encodeURIComponent(t)]; j.isNumber(n) && s.push("expires=" + new Date(n).toGMTString()), j.isString(r) && s.push("path=" + r), j.isString(o) && s.push("domain=" + o), a === !0 && s.push("secure"), document.cookie = s.join("; "); }, read(e) { const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)")); return t ? decodeURIComponent(t[3]) : null; }, remove(e) { this.write(e, "", Date.now() - 864e5); } } ) : ( // Non-standard browser env (web workers, react-native) lack needed support. { write() { }, read() { return null; }, remove() { } } ); function gA(e) { return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e); } function mA(e, t) { return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e; } function xm(e, t, n) { let r = !gA(t); return e && (r || n == !1) ? mA(e, t) : t; } const op = (e) => e instanceof rn ? { ...e } : e; function co(e, t) { t = t || {}; const n = {}; function r(c, u, f, g) { return j.isPlainObject(c) && j.isPlainObject(u) ? j.merge.call({ caseless: g }, c, u) : j.isPlainObject(u) ? j.merge({}, u) : j.isArray(u) ? u.slice() : u; } function o(c, u, f, g) { if (j.isUndefined(u)) { if (!j.isUndefined(c)) return r(void 0, c, f, g); } else return r(c, u, f, g); } function a(c, u) { if (!j.isUndefined(u)) return r(void 0, u); } function s(c, u) { if (j.isUndefined(u)) { if (!j.isUndefined(c)) return r(void 0, c); } else return r(void 0, u); } function i(c, u, f) { if (f in t) return r(c, u); if (f in e) return r(void 0, c); } const l = { url: a, method: a, data: a, baseURL: s, transformRequest: s, transformResponse: s, paramsSerializer: s, timeout: s, timeoutMessage: s, withCredentials: s, withXSRFToken: s, adapter: s, responseType: s, xsrfCookieName: s, xsrfHeaderName: s, onUploadProgress: s, onDownloadProgress: s, decompress: s, maxContentLength: s, maxBodyLength: s, beforeRedirect: s, transport: s, httpAgent: s, httpsAgent: s, cancelToken: s, socketPath: s, responseEncoding: s, validateStatus: i, headers: (c, u, f) => o(op(c), op(u), f, !0) }; return j.forEach(Object.keys({ ...e, ...t }), function(u) { const f = l[u] || o, g = f(e[u], t[u], u); j.isUndefined(g) && f !== i || (n[u] = g); }), n; } const Tm = (e) => { const t = co({}, e); let { data: n, withXSRFToken: r, xsrfHeaderName: o, xsrfCookieName: a, headers: s, auth: i } = t; if (t.headers = s = rn.from(s), t.url = Cm(xm(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), i && s.set( "Authorization", "Basic " + btoa((i.username || "") + ":" + (i.password ? unescape(encodeURIComponent(i.password)) : "")) ), j.isFormData(n)) { if (Dt.hasStandardBrowserEnv || Dt.hasStandardBrowserWebWorkerEnv) s.setContentType(void 0); else if (j.isFunction(n.getHeaders)) { const l = n.getHeaders(), c = ["content-type", "content-length"]; Object.entries(l).forEach(([u, f]) => { c.includes(u.toLowerCase()) && s.set(u, f); }); } } if (Dt.hasStandardBrowserEnv && (r && j.isFunction(r) && (r = r(t)), r || r !== !1 && hA(t.url))) { const l = o && a && vA.read(a); l && s.set(o, l); } return t; }, yA = typeof XMLHttpRequest < "u", bA = yA && function(e) { return new Promise(function(n, r) { const o = Tm(e); let a = o.data; const s = rn.from(o.headers).normalize(); let { responseType: i, onUploadProgress: l, onDownloadProgress: c } = o, u, f, g, v, d; function h() { v && v(), d && d(), o.cancelToken && o.cancelToken.unsubscribe(u), o.signal && o.signal.removeEventListener("abort", u); } let m = new XMLHttpRequest(); m.open(o.method.toUpperCase(), o.url, !0), m.timeout = o.timeout; function y() { if (!m) return; const A = rn.from( "getAllResponseHeaders" in m && m.getAllResponseHeaders() ), E = { data: !i || i === "text" || i === "json" ? m.responseText : m.response, status: m.status, statusText: m.statusText, headers: A, config: e, request: m }; Em(function(I) { n(I), h(); }, function(I) { r(I), h(); }, E), m = null; } "onloadend" in m ? m.onloadend = y : m.onreadystatechange = function() { !m || m.readyState !== 4 || m.status === 0 && !(m.responseURL && m.responseURL.indexOf("file:") === 0) || setTimeout(y); }, m.onabort = function() { m && (r(new Te("Request aborted", Te.ECONNABORTED, e, m)), m = null); }, m.onerror = function(k) { const E = k && k.message ? k.message : "Network Error", T = new Te(E, Te.ERR_NETWORK, e, m); T.event = k || null, r(T), m = null; }, m.ontimeout = function() { let k = o.timeout ? "timeout of " + o.timeout + "ms exceeded" : "timeout exceeded"; const E = o.transitional || Sm; o.timeoutErrorMessage && (k = o.timeoutErrorMessage), r(new Te( k, E.clarifyTimeoutError ? Te.ETIMEDOUT : Te.ECONNABORTED, e, m )), m = null; }, a === void 0 && s.setContentType(null), "setRequestHeader" in m && j.forEach(s.toJSON(), function(k, E) { m.setRequestHeader(E, k); }), j.isUndefined(o.withCredentials) || (m.withCredentials = !!o.withCredentials), i && i !== "json" && (m.responseType = o.responseType), c && ([g, d] = li(c, !0), m.addEventListener("progress", g)), l && m.upload && ([f, v] = li(l), m.upload.addEventListener("progress", f), m.upload.addEventListener("loadend", v)), (o.cancelToken || o.signal) && (u = (A) => { m && (r(!A || A.type ? new Xo(null, e, m) : A), m.abort(), m = null); }, o.cancelToken && o.cancelToken.subscribe(u), o.signal && (o.signal.aborted ? u() : o.signal.addEventListener("abort", u))); const x = dA(o.url); if (x && Dt.protocols.indexOf(x) === -1) { r(new Te("Unsupported protocol " + x + ":", Te.ERR_BAD_REQUEST, e)); return; } m.send(a || null); }); }, wA = (e, t) => { const { length: n } = e = e ? e.filter(Boolean) : []; if (t || n) { let r = new AbortController(), o; const a = function(c) { if (!o) { o = !0, i(); const u = c instanceof Error ? c : this.reason; r.abort(u instanceof Te ? u : new Xo(u instanceof Error ? u.message : u)); } }; let s = t && setTimeout(() => { s = null, a(new Te(`timeout ${t} of ms exceeded`, Te.ETIMEDOUT)); }, t); const i = () => { e && (s && clearTimeout(s), s = null, e.forEach((c) => { c.unsubscribe ? c.unsubscribe(a) : c.removeEventListener("abort", a); }), e = null); }; e.forEach((c) => c.addEventListener("abort", a)); const { signal: l } = r; return l.unsubscribe = () => j.asap(i), l; } }, CA = function* (e, t) { let n = e.byteLength; if (n < t) { yield e; return; } let r = 0, o; for (; r < n; ) o = r + t, yield e.slice(r, o), r = o; }, SA = async function* (e, t) { for await (const n of kA(e)) yield* CA(n, t); }, kA = async function* (e) { if (e[Symbol.asyncIterator]) { yield* e; return; } const t = e.getReader(); try { for (; ; ) { const { done: n, value: r } = await t.read(); if (n) break; yield r; } } finally { await t.cancel(); } }, ap = (e, t, n, r) => { const o = SA(e, t); let a = 0, s, i = (l) => { s || (s = !0, r && r(l)); }; return new ReadableStream({ async pull(l) { try { const { done: c, value: u } = await o.next(); if (c) { i(), l.close(); return; } let f = u.byteLength; if (n) { let g = a += f; n(g); } l.enqueue(new Uint8Array(u)); } catch (c) { throw i(c), c; } }, cancel(l) { return i(l), o.return(); } }, { highWaterMark: 2 }); }, sp = 64 * 1024, { isFunction: xs } = j, _A = (({ Request: e, Response: t }) => ({ Request: e, Response: t }))(j.global), { ReadableStream: ip, TextEncoder: lp } = j.global, cp = (e, ...t) => { try { return !!e(...t); } catch { return !1; } }, EA = (e) => { e = j.merge.call({ skipUndefined: !0 }, _A, e); const { fetch: t, Request: n, Response: r } = e, o = t ? xs(t) : typeof fetch == "function", a = xs(n), s = xs(r); if (!o) return !1; const i = o && xs(ip), l = o && (typeof lp == "function" ? /* @__PURE__ */ ((d) => (h) => d.encode(h))(new lp()) : async (d) => new Uint8Array(await new n(d).arrayBuffer())), c = a && i && cp(() => { let d = !1; const h = new n(Dt.origin, { body: new ip(), method: "POST", get duplex() { return d = !0, "half"; } }).headers.has("Content-Type"); return d && !h; }), u = s && i && cp(() => j.isReadableStream(new r("").body)), f = { stream: u && ((d) => d.body) }; o && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((d) => { !f[d] && (f[d] = (h, m) => { let y = h && h[d]; if (y) return y.call(h); throw new Te(`Response type '${d}' is not supported`, Te.ERR_NOT_SUPPORT, m); }); }); const g = async (d) => { if (d == null) return 0; if (j.isBlob(d)) return d.size; if (j.isSpecCompliantForm(d)) return (await new n(Dt.origin, { method: "POST", body: d }).arrayBuffer()).byteLength; if (j.isArrayBufferView(d) || j.isArrayBuffer(d)) return d.byteLength; if (j.isURLSearchParams(d) && (d = d + ""), j.isString(d)) return (await l(d)).byteLength; }, v = async (d, h) => { const m = j.toFiniteNumber(d.getContentLength()); return m ?? g(h); }; return async (d) => { let { url: h, method: m, data: y, signal: x, cancelToken: A, timeout: k, onDownloadProgress: E, onUploadProgress: T, responseType: I, headers: R, withCredentials: D = "same-origin", fetchOptions: W } = Tm(d), z = t || fetch; I = I ? (I + "").toLowerCase() : "text"; let U = wA([x, A && A.toAbortSignal()], k), X = null; const de = U && U.unsubscribe && (() => { U.unsubscribe(); }); let re; try { if (T && c && m !== "get" && m !== "head" && (re = await v(R, y)) !== 0) { let _e = new n(h, { method: "POST", body: y, duplex: "half" }), ze; if (j.isFormData(y) && (ze = _e.headers.get("content-type")) && R.setContentType(ze), _e.body) { const [at, Ge] = np( re, li(rp(T)) ); y = ap(_e.body, sp, at, Ge); } } j.isString(D) || (D = D ? "include" : "omit"); const L = a && "credentials" in n.prototype, Z = { ...W, signal: U, method: m.toUpperCase(), headers: R.normalize().toJSON(), body: y, duplex: "half", credentials: L ? D : void 0 }; X = a && new n(h, Z); let ve = await (a ? z(X, W) : z(h, Z)); const me = u && (I === "stream" || I === "response"); if (u && (E || me && de)) { const _e = {}; ["status", "statusText", "headers"].forEach((Le) => { _e[Le] = ve[Le]; }); const ze = j.toFiniteNumber(ve.headers.get("content-length")), [at, Ge] = E && np( ze, li(rp(E), !0) ) || []; ve = new r( ap(ve.body, sp, at, () => { Ge && Ge(), de && de(); }), _e ); } I = I || "text"; let Ne = await f[j.findKey(f, I) || "text"](ve, d); return !me && de && de(), await new Promise((_e, ze) => { Em(_e, ze, { data: Ne, headers: rn.from(ve.headers), status: ve.status, statusText: ve.statusText, config: d, request: X }); }); } catch (L) { throw de && de(), L && L.name === "TypeError" && /Load failed|fetch/i.test(L.message) ? Object.assign( new Te("Network Error", Te.ERR_NETWORK, d, X), { cause: L.cause || L } ) : Te.from(L, L && L.code, d, X); } }; }, xA = /* @__PURE__ */ new Map(), Om = (e) => { let t = e ? e.env : {}; const { fetch: n, Request: r, Response: o } = t, a = [ r, o, n ]; let s = a.length, i = s, l, c, u = xA; for (; i--; ) l = a[i], c = u.get(l), c === void 0 && u.set(l, c = i ? /* @__PURE__ */ new Map() : EA(t)), u = c; return c; }; Om(); const vc = { http: HI, xhr: bA, fetch: { get: Om } }; j.forEach(vc, (e, t) => { if (e) { try { Object.defineProperty(e, "name", { value: t }); } catch { } Object.defineProperty(e, "adapterName", { value: t }); } }); const up = (e) => `- ${e}`, TA = (e) => j.isFunction(e) || e === null || e === !1, Im = { getAdapter: (e, t) => { e = j.isArray(e) ? e : [e]; const { length: n } = e; let r, o; const a = {}; for (let s = 0; s < n; s++) { r = e[s]; let i; if (o = r, !TA(r) && (o = vc[(i = String(r)).toLowerCase()], o === void 0)) throw new Te(`Unknown adapter '${i}'`); if (o && (j.isFunction(o) || (o = o.get(t)))) break; a[i || "#" + s] = o; } if (!o) { const s = Object.entries(a).map( ([l, c]) => `adapter ${l} ` + (c === !1 ? "is not supported by the environment" : "is not available in the build") ); let i = n ? s.length > 1 ? `since : ` + s.map(up).join(` `) : " " + up(s[0]) : "as no adapter specified"; throw new Te( "There is no suitable adapter to dispatch the request " + i, "ERR_NOT_SUPPORT" ); } return o; }, adapters: vc }; function Bl(e) { if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted) throw new Xo(null, e); } function dp(e) { return Bl(e), e.headers = rn.from(e.headers), e.data = Ll.call( e, e.transformRequest ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Im.getAdapter(e.adapter || rs.adapter, e)(e).then(function(r) { return Bl(e), r.data = Ll.call( e, e.transformResponse, r ), r.headers = rn.from(r.headers), r; }, function(r) { return _m(r) || (Bl(e), r && r.response && (r.response.data = Ll.call( e, e.transformResponse, r.response ), r.response.headers = rn.from(r.response.headers))), Promise.reject(r); }); } const Am = "1.12.2", Gi = {}; ["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => { Gi[e] = function(r) { return typeof r === e || "a" + (t < 1 ? "n " : " ") + e; }; }); const fp = {}; Gi.transitional = function(t, n, r) { function o(a, s) { return "[Axios v" + Am + "] Transitional option '" + a + "'" + s + (r ? ". " + r : ""); } return (a, s, i) => { if (t === !1) throw new Te( o(s, " has been removed" + (n ? " in " + n : "")), Te.ERR_DEPRECATED ); return n && !fp[s] && (fp[s] = !0, console.warn( o( s, " has been deprecated since v" + n + " and will be removed in the near future" ) )), t ? t(a, s, i) : !0; }; }; Gi.spelling = function(t) { return (n, r) => (console.warn(`${r} is likely a misspelling of ${t}`), !0); }; function OA(e, t, n) { if (typeof e != "object") throw new Te("options must be an object", Te.ERR_BAD_OPTION_VALUE); const r = Object.keys(e); let o = r.length; for (; o-- > 0; ) { const a = r[o], s = t[a]; if (s) { const i = e[a], l = i === void 0 || s(i, a, e); if (l !== !0) throw new Te("option " + a + " must be " + l, Te.ERR_BAD_OPTION_VALUE); continue; } if (n !== !0) throw new Te("Unknown option " + a, Te.ERR_BAD_OPTION); } } const Us = { assertOptions: OA, validators: Gi }, Yn = Us.validators; class no { constructor(t) { this.defaults = t || {}, this.interceptors = { request: new ep(), response: new ep() }; } /** * Dispatch a request * * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults) * @param {?Object} config * * @returns {Promise} The Promise to be fulfilled */ async request(t, n) { try { return await this._request(t, n); } catch (r) { if (r instanceof Error) { let o = {}; Error.captureStackTrace ? Error.captureStackTrace(o) : o = new Error(); const a = o.stack ? o.stack.replace(/^.+\n/, "") : ""; try { r.stack ? a && !String(r.stack).endsWith(a.replace(/^.+\n.+\n/, "")) && (r.stack += ` ` + a) : r.stack = a; } catch { } } throw r; } } _request(t, n) { typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = co(this.defaults, n); const { transitional: r, paramsSerializer: o, headers: a } = n; r !== void 0 && Us.assertOptions(r, { silentJSONParsing: Yn.transitional(Yn.boolean), forcedJSONParsing: Yn.transitional(Yn.boolean), clarifyTimeoutError: Yn.transitional(Yn.boolean) }, !1), o != null && (j.isFunction(o) ? n.paramsSerializer = { serialize: o } : Us.assertOptions(o, { encode: Yn.function, serialize: Yn.function }, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), Us.assertOptions(n, { baseUrl: Yn.spelling("baseURL"), withXsrfToken: Yn.spelling("withXSRFToken") }, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase(); let s = a && j.merge( a.common, a[n.method] ); a && j.forEach( ["delete", "get", "head", "post", "put", "patch", "common"], (d) => { delete a[d]; } ), n.headers = rn.concat(s, a); const i = []; let l = !0; this.interceptors.request.forEach(function(h) { typeof h.runWhen == "function" && h.runWhen(n) === !1 || (l = l && h.synchronous, i.unshift(h.fulfilled, h.rejected)); }); const c = []; this.interceptors.response.forEach(function(h) { c.push(h.fulfilled, h.rejected); }); let u, f = 0, g; if (!l) { const d = [dp.bind(this), void 0]; for (d.unshift(...i), d.push(...c), g = d.length, u = Promise.resolve(n); f < g; ) u = u.then(d[f++], d[f++]); return u; } g = i.length; let v = n; for (; f < g; ) { const d = i[f++], h = i[f++]; try { v = d(v); } catch (m) { h.call(this, m); break; } } try { u = dp.call(this, v); } catch (d) { return Promise.reject(d); } for (f = 0, g = c.length; f < g; ) u = u.then(c[f++], c[f++]); return u; } getUri(t) { t = co(this.defaults, t); const n = xm(t.baseURL, t.url, t.allowAbsoluteUrls); return Cm(n, t.params, t.paramsSerializer); } } j.forEach(["delete", "get", "head", "options"], function(t) { no.prototype[t] = function(n, r) { return this.request(co(r || {}, { method: t, url: n, data: (r || {}).data })); }; }); j.forEach(["post", "put", "patch"], function(t) { function n(r) { return function(a, s, i) { return this.request(co(i || {}, { method: t, headers: r ? { "Content-Type": "multipart/form-data" } : {}, url: a, data: s })); }; } no.prototype[t] = n(), no.prototype[t + "Form"] = n(!0); }); class Iu { constructor(t) { if (typeof t != "function") throw new TypeError("executor must be a function."); let n; this.promise = new Promise(function(a) { n = a; }); const r = this; this.promise.then((o) => { if (!r._listeners) return; let a = r._listeners.length; for (; a-- > 0; ) r._listeners[a](o); r._listeners = null; }), this.promise.then = (o) => { let a; const s = new Promise((i) => { r.subscribe(i), a = i; }).then(o); return s.cancel = function() { r.unsubscribe(a); }, s; }, t(function(a, s, i) { r.reason || (r.reason = new Xo(a, s, i), n(r.reason)); }); } /** * Throws a `CanceledError` if cancellation has been requested. */ throwIfRequested() { if (this.reason) throw this.reason; } /** * Subscribe to the cancel signal */ subscribe(t) { if (this.reason) { t(this.reason); return; } this._listeners ? this._listeners.push(t) : this._listeners = [t]; } /** * Unsubscribe from the cancel signal */ unsubscribe(t) { if (!this._listeners) return; const n = this._listeners.indexOf(t); n !== -1 && this._listeners.splice(n, 1); } toAbortSignal() { const t = new AbortController(), n = (r) => { t.abort(r); }; return this.subscribe(n), t.signal.unsubscribe = () => this.unsubscribe(n), t.signal; } /** * Returns an object that contains a new `CancelToken` and a function that, when called, * cancels the `CancelToken`. */ static source() { let t; return { token: new Iu(function(o) { t = o; }), cancel: t }; } } function IA(e) { return function(n) { return e.apply(null, n); }; } function AA(e) { return j.isObject(e) && e.isAxiosError === !0; } const gc = { Continue: 100, SwitchingProtocols: 101, Processing: 102, EarlyHints: 103, Ok: 200, Created: 201, Accepted: 202, NonAuthoritativeInformation: 203, NoContent: 204, ResetContent: 205, PartialContent: 206, MultiStatus: 207, AlreadyReported: 208, ImUsed: 226, MultipleChoices: 300, MovedPermanently: 301, Found: 302, SeeOther: 303, NotModified: 304, UseProxy: 305, Unused: 306, TemporaryRedirect: 307, PermanentRedirect: 308, BadRequest: 400, Unauthorized: 401, PaymentRequired: 402, Forbidden: 403, NotFound: 404, MethodNotAllowed: 405, NotAcceptable: 406, ProxyAuthenticationRequired: 407, RequestTimeout: 408, Conflict: 409, Gone: 410, LengthRequired: 411, PreconditionFailed: 412, PayloadTooLarge: 413, UriTooLong: 414, UnsupportedMediaType: 415, RangeNotSatisfiable: 416, ExpectationFailed: 417, ImATeapot: 418, MisdirectedRequest: 421, UnprocessableEntity: 422, Locked: 423, FailedDependency: 424, TooEarly: 425, UpgradeRequired: 426, PreconditionRequired: 428, TooManyRequests: 429, RequestHeaderFieldsTooLarge: 431, UnavailableForLegalReasons: 451, InternalServerError: 500, NotImplemented: 501, BadGateway: 502, ServiceUnavailable: 503, GatewayTimeout: 504, HttpVersionNotSupported: 505, VariantAlsoNegotiates: 506, InsufficientStorage: 507, LoopDetected: 508, NotExtended: 510, NetworkAuthenticationRequired: 511 }; Object.entries(gc).forEach(([e, t]) => { gc[t] = e; }); function Fm(e) { const t = new no(e), n = cm(no.prototype.request, t); return j.extend(n, no.prototype, t, { allOwnKeys: !0 }), j.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(o) { return Fm(co(e, o)); }, n; } const kt = Fm(rs); kt.Axios = no; kt.CanceledError = Xo; kt.CancelToken = Iu; kt.isCancel = _m; kt.VERSION = Am; kt.toFormData = Wi; kt.AxiosError = Te; kt.Cancel = kt.CanceledError; kt.all = function(t) { return Promise.all(t); }; kt.spread = IA; kt.isAxiosError = AA; kt.mergeConfig = co; kt.AxiosHeaders = rn; kt.formToJSON = (e) => km(j.isHTMLForm(e) ? new FormData(e) : e); kt.getAdapter = Im.getAdapter; kt.HttpStatusCode = gc; kt.default = kt; const FA = "data:image/svg+xml,%3csvg%20id='logo-sparc-wave-primary'%20data-name='logo-sparc-wave-primary'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20viewBox='0%200%20400%20190.5854'%3e%3cdefs%3e%3clinearGradient%20id='linear-gradient'%20y1='96.3505'%20x2='400'%20y2='96.3505'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20stop-color='%230b00bf'/%3e%3cstop%20offset='1'%20stop-color='%23bc00fc'/%3e%3c/linearGradient%3e%3c/defs%3e%3ctitle%3eSPARC%20Logo%3c/title%3e%3cpath%20d='M396.6976,128.6248l-146.2735-3.38a6.5358,6.5358,0,0,0-6.1378,3.9236l-.0612.1407-13.673,31.4482L202.9416,9.5333l-.01-.0685a8.9823,8.9823,0,0,0-17.6624-.0114L163.673,125.3819,3.298,129.2886a3.38,3.38,0,0,0,.0269,6.7592L169.34,138.7635a6.5939,6.5939,0,0,0,6.5373-5.1457l.0571-.2546,17.8534-79.5649L221.26,185.1237l.0256.1243A6.7593,6.7593,0,0,0,234.092,186.52L254.9005,138.66l141.7971-3.2762a3.3805,3.3805,0,0,0,0-6.7592Z'%20style='fill:url(%23linear-gradient)'/%3e%3cpath%20d='M25.6793,0C41.3957,0,51.057,10.0926,51.057,26.0972v9.5162H36.2053V26.0972c0-7.3532-3.8945-11.8219-10.526-11.8219-6.7768,0-10.6691,4.4687-10.6691,11.8219,0,3.8945,1.2982,7.3533,5.4786,11.3908l19.754,18.601C46.5861,62.1441,52.21,68.7778,52.21,79.88c0,16.0047-9.95,26.0973-25.9543,26.0973C10.108,105.9776.1585,95.885.1585,79.88V70.362H15.01V79.88c0,7.3533,4.0375,11.822,11.2455,11.822,7.065,0,11.1025-4.4687,11.1025-11.822,0-4.4709-2.1628-8.6514-6.0551-12.2576L11.1158,48.7357C3.043,41.2372.1585,34.8939.1585,25.666.1585,10.0926,9.82,0,25.6793,0Z'%20style='fill:%230e0e19'/%3e%3cpath%20d='M99.7971,69.7856v35.1821H84.9454V1.01h25.3755c16.0047,0,26.0973,10.0926,26.0973,26.0973V43.6883c0,16.15-10.0926,26.0973-26.0973,26.0973Zm10.3808-13.9849c7.2081,0,11.3908-4.3257,11.3908-11.6789V26.6759c0-7.21-4.1827-11.6811-11.3908-11.6811H99.7971V55.8007Z'%20style='fill:%230e0e19'/%3e%3cpath%20d='M278.5812,108.147H263.73V4.1893h26.0972c16.0047,0,26.0973,10.0926,26.0973,26.0972v14.13c0,9.95-4.3257,17.7363-11.3908,22.205,4.1827,12.6889,10.0926,29.9917,13.8418,41.5254h-15.14L290.6914,70.3708h-12.11Zm11.1-51.7632c7.21,0,11.3907-4.3257,11.3907-11.5338V29.8553c0-7.21-4.18-11.6812-11.3907-11.6812h-11.1v38.21Z'%20style='fill:%230e0e19'/%3e%3cpath%20d='M399.844,73.5414V83.06c0,16.0047-9.9474,26.0973-25.9521,26.0973-16.15,0-26.0972-10.0926-26.0972-26.0973V29.2766c0-16.0046,9.9473-26.0972,26.0972-26.0972,16.0047,0,25.9521,10.0926,25.9521,26.0972v9.5161h-14.85V29.2766c0-7.3532-4.0374-11.822-11.1025-11.822-7.21,0-11.2477,4.4688-11.2477,11.822V83.06c0,7.3533,4.0375,11.822,11.2477,11.822,7.0651,0,11.1025-4.4687,11.1025-11.822V73.5414Z'%20style='fill:%230e0e19'/%3e%3c/svg%3e", PA = { //this mixin is not used by this code base but it can be used by other //projects to get a handle to various resources data() { return { defaultImg: FA }; }, methods: { async getRequest(e, t, n) { return await kt({ method: "get", url: e, params: t, timeout: n }); }, /** * Returns a file path for S3. * @param {String} dataset_id dataset id. * @param {String} dataset_version dataset version. * @param {String} file_path file path. * @returns {String} full path to S3 file. */ getS3FilePath(e, t, n) { const r = encodeURIComponent(n); return `${e}/${t}/files/${r}`; }, /** * Find data path in the array that matches the provide path */ findEntryWithPathInArray(e, t) { if (t && e) { for (let n = 0; n < e.length; n++) if (t === e[n].dataset.path) return e[n]; } }, getThumbnailForPlot(e, t) { if (t && e) return this.findEntryWithPathInArray(t, e.datacite.isSourceOf.path[0]); }, /** * Use the scaffoldViews to help with finding the correct thumbnails. * Use the index if the workflow stated above fails. */ getThumbnailForScaffold(e, t, n, r) { if (n && n.length > 0) { let o; if (e && t) { const a = this.findEntryWithPathInArray(t, e.datacite.isSourceOf.path[0]); a && (o = this.findEntryWithPathInArray(n, a.datacite.isSourceOf.path[0])); } if (o) return o; if (r < n.length) return n[r]; } }, getImageURLFromS3(e, t) { let n = `${e}/s3-resource/${t.datasetId}/${t.datasetVersion}/files/${t.file_path}?encodeBase64=true`; return t.s3Bucket && (n = n + `&s3BucketName=${t.s3Bucket}`), n; }, getSegmentationThumbnailURL(e, t) { let n = `${e}/thumbnail/neurolucida`; return n = n + `?datasetId=${t.datasetId}`, n = n + `&version=${t.datasetVersion}`, n = n + `&path=files/${t.segmentationFilePath}`, t.s3Bucket && (n = n + `&s3BucketName=${t.s3Bucket}`), n; }, getThumbnailURLFromBiolucida(e, t) { return `${e}/thumbnail/${t.id}`; }, getImageInfoFromBiolucida(e, t, n) { const r = `${e}/image/${n.id}`, o = {}; this.getRequest(r, o, 2e4).then( (a) => { let s = t.find((l) => l.id === n.id); const i = a.name; i && (s.title = i); }, (a) => (a.message.includes("timeout") && a.message.includes("exceeded") && n.fetchAttempts < 3 && (n.fetchAttempts += 1, this.getImageInfoFromBiolucida(e, t, n)), Promise.reject("Maximum iterations reached.")) ); } } }, Au = (e, t) => { const n = e.__vccOpts || e; for (const [r, o] of t) n[r] = o; return n; }, $A = { class: "indicator-container" }, RA = ["onClick"], NA = { __name: "IndexIndicator", props: { count: { type: Number, default: 0 }, current: { type: Number, default: 0 } }, emits: ["clicked"], setup(e, { emit: t }) { const n = t; return (r, o) => (C(), F("div", $A, [ (C(!0), F(Ie, null, ot(e.count, (a, s) => (C(), F("div", { key: "indicator_" + a, class: N(["indicator", { active: e.current === s }]), onClick: (i) => n("clicked", s) }, null, 10, RA))), 128)) ])); } }, LA = /* @__PURE__ */ Au(NA, [["__scopeId", "data-v-afcfce15"]]), fr = (e, t, { checkForDefaultPrevented: n = !0 } = {}) => (r) => { const o = e == null ? void 0 : e(r); if (n === !1 || !o) return t == null ? void 0 : t(r); }; var pp; const gn = typeof window < "u", BA = (e) => typeof e == "string", Pm = () => { }, DA = gn && ((pp = window == null ? void 0 : window.navigator) == null ? void 0 : pp.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent); function $m(e) { return typeof e == "function" ? e() : p(e); } function MA(e) { return e; } function Rm(e) { return Fh() ? ($c(e), !0) : !1; } function Zr(e) { var t; const n = $m(e); return (t = n == null ? void 0 : n.$el) != null ? t : n; } const Nm = gn ? window : void 0; function Dl(...e) { let t, n, r, o; if (BA(e[0]) || Array.isArray(e[0]) ? ([n, r, o] = e, t = Nm) : [t, n, r, o] = e, !t) return Pm; Array.isArray(n) || (n = [n]), Array.isArray(r) || (r = [r]); const a = [], s = () => { a.forEach((u) => u()), a.length = 0; }, i = (u, f, g, v) => (u.addEventListener(f, g, v), () => u.removeEventListener(f, g, v)), l = oe(() => [Zr(t), $m(o)], ([u, f]) => { s(), u && a.push(...n.flatMap((g) => r.map((v) => i(u, g, v, f)))); }, { immediate: !0, flush: "post" }), c = () => { l(), s(); }; return Rm(c), c; } let hp = !1; function jA(e, t, n = {}) { const { window: r = Nm, ignore: o = [], capture: a = !0, detectIframe: s = !1 } = n; if (!r) return; DA && !hp && (hp = !0, Array.from(r.document.body.children).forEach((u) => u.addEventListener("click", Pm))); let i = !0; const l = (u) => o.some((f) => { if (typeof f == "string") return Array.from(r.document.querySelectorAll(f)).some((g) => g === u.target || u.composedPath().includes(g)); { const g = Zr(f); return g && (u.target === g || u.composedPath().includes(g)); } }), c = [ Dl(r, "click", (u) => { const f = Zr(e); if (!(!f || f === u.target || u.composedPath().includes(f))) { if (u.detail === 0 && (i = !l(u)), !i) { i = !0; return; } t(u); } }, { passive: !0, capture: a }), Dl(r, "pointerdown", (u) => { const f = Zr(e); f && (i = !u.composedPath().includes(f) && !l(u)); }, { passive: !0 }), s && Dl(r, "blur", (u) => { var f; const g = Zr(e); ((f = r.document.activeElement) == null ? void 0 : f.tagName) === "IFRAME" && !(g != null && g.contains(r.document.activeElement)) && t(u); }) ].filter(Boolean); return () => c.forEach((u) => u()); } const vp = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, gp = "__vueuse_ssr_handlers__"; vp[gp] = vp[gp] || {}; var mp; (function(e) { e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE"; })(mp || (mp = {})); var VA = Object.defineProperty, yp = Object.getOwnPropertySymbols, zA = Object.prototype.hasOwnProperty, HA = Object.prototype.propertyIsEnumerable, bp = (e, t, n) => t in e ? VA(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, UA = (e, t) => { for (var n in t || (t = {})) zA.call(t, n) && bp(e, n, t[n]); if (yp) for (var n of yp(t)) HA.call(t, n) && bp(e, n, t[n]); return e; }; const qA = { easeInSine: [0.12, 0, 0.39, 0], easeOutSine: [0.61, 1, 0.88, 1], easeInOutSine: [0.37, 0, 0.63, 1], easeInQuad: [0.11, 0, 0.5, 0], easeOutQuad: [0.5, 1, 0.89, 1], easeInOutQuad: [0.45, 0, 0.55, 1], easeInCubic: [0.32, 0, 0.67, 0], easeOutCubic: [0.33, 1, 0.68, 1], easeInOutCubic: [0.65, 0, 0.35, 1], easeInQuart: [0.5, 0, 0.75, 0], easeOutQuart: [0.25, 1, 0.5, 1], easeInOutQuart: [0.76, 0, 0.24, 1], easeInQuint: [0.64, 0, 0.78, 0], easeOutQuint: [0.22, 1, 0.36, 1], easeInOutQuint: [0.83, 0, 0.17, 1], easeInExpo: [0.7, 0, 0.84, 0], easeOutExpo: [0.16, 1, 0.3, 1], easeInOutExpo: [0.87, 0, 0.13, 1], easeInCirc: [0.55, 0, 1, 0.45], easeOutCirc: [0, 0.55, 0.45, 1], easeInOutCirc: [0.85, 0, 0.15, 1], easeInBack: [0.36, 0, 0.66, -0.56], easeOutBack: [0.34, 1.56, 0.64, 1], easeInOutBack: [0.68, -0.6, 0.32, 1.6] }; UA({ linear: MA }, qA); /** * @vue/shared v3.4.21 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **/ process.env.NODE_ENV !== "production" && Object.freeze({}); process.env.NODE_ENV !== "production" && Object.freeze([]); const ci = () => { }, KA = Object.prototype.hasOwnProperty, wp = (e, t) => KA.call(e, t), WA = Array.isArray, ya = (e) => typeof e == "function", Qo = (e) => typeof e == "string", os = (e) => e !== null && typeof e == "object", Lm = (e) => { const t = /* @__PURE__ */ Object.create(null); return (n) => t[n] || (t[n] = e(n)); }, GA = /-(\w)/g, JA = Lm((e) => e.replace(GA, (t, n) => n ? n.toUpperCase() : "")), ZA = /\B([A-Z])/g, YA = Lm( (e) => e.replace(ZA, "-$1").toLowerCase() ); var XA = typeof global == "object" && global && global.Object === Object && global, QA = typeof self == "object" && self && self.Object === Object && self, Fu = XA || QA || Function("return this")(), Lr = Fu.Symbol, Bm = Object.prototype, eF = Bm.hasOwnProperty, tF = Bm.toString, pa = Lr ? Lr.toStringTag : void 0; function nF(e) { var t = eF.call(e, pa), n = e[pa]; try { e[pa] = void 0; var r = !0; } catch { } var o = tF.call(e); return r && (t ? e[pa] = n : delete e[pa]), o; } var rF = Object.prototype, oF = rF.toString; function aF(e) { return oF.call(e); } var sF = "[object Null]", iF = "[object Undefined]", Cp = Lr ? Lr.toStringTag : void 0; function Pu(e) { return e == null ? e === void 0 ? iF : sF : Cp && Cp in Object(e) ? nF(e) : aF(e); } function $u(e) { return e != null && typeof e == "object"; } var lF = "[object Symbol]"; function Ru(e) { return typeof e == "symbol" || $u(e) && Pu(e) == lF; } function cF(e, t) { for (var n = -1, r = e == null ? 0 : e.length, o = Array(r); ++n < r; ) o[n] = t(e[n], n, e); return o; } var as = Array.isArray, uF = 1 / 0, Sp = Lr ? Lr.prototype : void 0, kp = Sp ? Sp.toString : void 0; function Dm(e) { if (typeof e == "string") return e; if (as(e)) return cF(e, Dm) + ""; if (Ru(e)) return kp ? kp.call(e) : ""; var t = e + ""; return t == "0" && 1 / e == -uF ? "-0" : t; } function ui(e) { var t = typeof e; return e != null && (t == "object" || t == "function"); } function dF(e) { return e; } var fF = "[object AsyncFunction]", pF = "[object Function]", hF = "[object GeneratorFunction]", vF = "[object Proxy]"; function gF(e) { if (!ui(e)) return !1; var t = Pu(e); return t == pF || t == hF || t == fF || t == vF; } var Ml = Fu["__core-js_shared__"], _p = function() { var e = /[^.]+$/.exec(Ml && Ml.keys && Ml.keys.IE_PROTO || ""); return e ? "Symbol(src)_1." + e : ""; }(); function mF(e) { return !!_p && _p in e; } var yF = Function.prototype, bF = yF.toString; function wF(e) { if (e != null) { try { return bF.call(e); } catch { } try { return e + ""; } catch { } } return ""; } var CF = /[\\^$.*+?()[\]{}|]/g, SF = /^\[object .+?Constructor\]$/, kF = Function.prototype, _F = Object.prototype, EF = kF.toString, xF = _F.hasOwnProperty, TF = RegExp( "^" + EF.call(xF).replace(CF, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$" ); function OF(e) { if (!ui(e) || mF(e)) return !1; var t = gF(e) ? TF : SF; return t.test(wF(e)); } function IF(e, t) { return e == null ? void 0 : e[t]; } function Nu(e, t) { var n = IF(e, t); return OF(n) ? n : void 0; } function AF(e, t, n) { switch (n.length) { case 0: return e.call(t); case 1: return e.call(t, n[0]); case 2: return e.call(t, n[0], n[1]); case 3: return e.call(t, n[0], n[1], n[2]); } return e.apply(t, n); } var FF = 800, PF = 16, $F = Date.now; function RF(e) { var t = 0, n = 0; return function() { var r = $F(), o = PF - (r - n); if (n = r, o > 0) { if (++t >= FF) return arguments[0]; } else t = 0; return e.apply(void 0, arguments); }; } function NF(e) { return function() { return e; }; } var di = function() { try { var e = Nu(Object, "defineProperty"); return e({}, "", {}), e; } catch { } }(), LF = di ? function(e, t) { return di(e, "toString", { configurable: !0, enumerable: !1, value: NF(t), writable: !0 }); } : dF, BF = RF(LF), DF = 9007199254740991, MF = /^(?:0|[1-9]\d*)$/; function Mm(e, t) { var n = typeof e; return t = t ?? DF, !!t && (n == "number" || n != "symbol" && MF.test(e)) && e > -1 && e % 1 == 0 && e < t; } function jF(e, t, n) { t == "__proto__" && di ? di(e, t, { configurable: !0, enumerable: !0, value: n, writable: !0 }) : e[t] = n; } function jm(e, t) { return e === t || e !== e && t !== t; } var VF = Object.prototype, zF = VF.hasOwnProperty; function HF(e, t, n) { var r = e[t]; (!(zF.call(e, t) && jm(r, n)) || n === void 0 && !(t in e)) && jF(e, t, n); } var Ep = Math.max; function UF(e, t, n) { return t = Ep(t === void 0 ? e.length - 1 : t, 0), function() { for (var r = arguments, o = -1, a = Ep(r.length - t, 0), s = Array(a); ++o < a; ) s[o] = r[t + o]; o = -1; for (var i = Array(t + 1); ++o < t; ) i[o] = r[o]; return i[t] = n(s), AF(e, this, i); }; } var qF = 9007199254740991; function KF(e) { return typeof e == "number" && e > -1 && e % 1 == 0 && e <= qF; } var WF = "[object Arguments]"; function xp(e) { return $u(e) && Pu(e) == WF; } var Vm = Object.prototype, GF = Vm.hasOwnProperty, JF = Vm.propertyIsEnumerable, zm = xp(/* @__PURE__ */ function() { return arguments; }()) ? xp : function(e) { return $u(e) && GF.call(e, "callee") && !JF.call(e, "callee"); }, ZF = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, YF = /^\w*$/; function XF(e, t) { if (as(e)) return !1; var n = typeof e; return n == "number" || n == "symbol" || n == "boolean" || e == null || Ru(e) ? !0 : YF.test(e) || !ZF.test(e) || t != null && e in Object(t); } var Da = Nu(Object, "create"); function QF() { this.__data__ = Da ? Da(null) : {}, this.size = 0; } function eP(e) { var t = this.has(e) && delete this.__data__[e]; return this.size -= t ? 1 : 0, t; } var tP = "__lodash_hash_undefined__", nP = Object.prototype, rP = nP.hasOwnProperty; function oP(e) { var t = this.__data__; if (Da) { var n = t[e]; return n === tP ? void 0 : n; } return rP.call(t, e) ? t[e] : void 0; } var aP = Object.prototype, sP = aP.hasOwnProperty; function iP(e) { var t = this.__data__; return Da ? t[e] !== void 0 : sP.call(t, e); } var lP = "__lodash_hash_undefined__"; function cP(e, t) { var n = this.__data__; return this.size += this.has(e) ? 0 : 1, n[e] = Da && t === void 0 ? lP : t, this; } function uo(e) { var t = -1, n = e == null ? 0 : e.length; for (this.clear(); ++t < n; ) { var r = e[t]; this.set(r[0], r[1]); } } uo.prototype.clear = QF; uo.prototype.delete = eP; uo.prototype.get = oP; uo.prototype.has = iP; uo.prototype.set = cP; function uP() { this.__data__ = [], this.size = 0; } function Ji(e, t) { for (var n = e.length; n--; ) if (jm(e[n][0], t)) return n; return -1; } var dP = Array.prototype, fP = dP.splice; function pP(e) { var t = this.__data__, n = Ji(t, e); if (n < 0) return !1; var r = t.length - 1; return n == r ? t.pop() : fP.call(t, n, 1), --this.size, !0; } function hP(e) { var t = this.__data__, n = Ji(t, e); return n < 0 ? void 0 : t[n][1]; } function vP(e) { return Ji(this.__data__, e) > -1; } function gP(e, t) { var n = this.__data__, r = Ji(n, e); return r < 0 ? (++this.size, n.push([e, t])) : n[r][1] = t, this; } function ea(e) { var t = -1, n = e == null ? 0 : e.length; for (this.clear(); ++t < n; ) { var r = e[t]; this.set(r[0], r[1]); } } ea.prototype.clear = uP; ea.prototype.delete = pP; ea.prototype.get = hP; ea.prototype.has = vP; ea.prototype.set = gP; var mP = Nu(Fu, "Map"); function yP() { this.size = 0, this.__data__ = { hash: new uo(), map: new (mP || ea)(), string: new uo() }; } function bP(e) { var t = typeof e; return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e !== "__proto__" : e === null; } function Zi(e, t) { var n = e.__data__; return bP(t) ? n[typeof t == "string" ? "string" : "hash"] : n.map; } function wP(e) { var t = Zi(this, e).delete(e); return this.size -= t ? 1 : 0, t; } function CP(e) { return Zi(this, e).get(e); } function SP(e) { return Zi(this, e).has(e); } function kP(e, t) { var n = Zi(this, e), r = n.size; return n.set(e, t), this.size += n.size == r ? 0 : 1, this; } function yo(e) { var t = -1, n = e == null ? 0 : e.length; for (this.clear(); ++t < n; ) { var r = e[t]; this.set(r[0], r[1]); } } yo.prototype.clear = yP; yo.prototype.delete = wP; yo.prototype.get = CP; yo.prototype.has = SP; yo.prototype.set = kP; var _P = "Expected a function"; function Lu(e, t) { if (typeof e != "function" || t != null && typeof t != "function") throw new TypeError(_P); var n = function() { var r = arguments, o = t ? t.apply(this, r) : r[0], a = n.cache; if (a.has(o)) return a.get(o); var s = e.apply(this, r); return n.cache = a.set(o, s) || a, s; }; return n.cache = new (Lu.Cache || yo)(), n; } Lu.Cache = yo; var EP = 500; function xP(e) { var t = Lu(e, function(r) { return n.size === EP && n.clear(), r; }), n = t.cache; return t; } var TP = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, OP = /\\(\\)?/g, IP = xP(function(e) { var t = []; return e.charCodeAt(0) === 46 && t.push(""), e.replace(TP, function(n, r, o, a) { t.push(o ? a.replace(OP, "$1") : r || n); }), t; }); function AP(e) { return e == null ? "" : Dm(e); } function Yi(e, t) { return as(e) ? e : XF(e, t) ? [e] : IP(AP(e)); } var FP = 1 / 0; function Bu(e) { if (typeof e == "string" || Ru(e)) return e; var t = e + ""; return t == "0" && 1 / e == -FP ? "-0" : t; } function Hm(e, t) { t = Yi(t, e); for (var n = 0, r = t.length; e != null && n < r; ) e = e[Bu(t[n++])]; return n && n == r ? e : void 0; } function PP(e, t, n) { var r = e == null ? void 0 : Hm(e, t); return r === void 0 ? n : r; } function $P(e, t) { for (var n = -1, r = t.length, o = e.length; ++n < r; ) e[o + n] = t[n]; return e; } var Tp = Lr ? Lr.isConcatSpreadable : void 0; function RP(e) { return as(e) || zm(e) || !!(Tp && e && e[Tp]); } function NP(e, t, n, r, o) { var a = -1, s = e.length; for (n || (n = RP), o || (o = []); ++a < s; ) { var i = e[a]; n(i) ? $P(o, i) : o[o.length] = i; } return o; } function LP(e) { var t = e == null ? 0 : e.length; return t ? NP(e) : []; } function BP(e) { return BF(UF(e, void 0, LP), e + ""); } function DP(e, t) { return e != null && t in Object(e); } function MP(e, t, n) { t = Yi(t, e); for (var r = -1, o = t.length, a = !1; ++r < o; ) { var s = Bu(t[r]); if (!(a = e != null && n(e, s))) break; e = e[s]; } return a || ++r != o ? a : (o = e == null ? 0 : e.length, !!o && KF(o) && Mm(s, o) && (as(e) || zm(e))); } function jP(e, t) { return e != null && MP(e, t, DP); } function mc(e) { for (var t = -1, n = e == null ? 0 : e.length, r = {}; ++t < n; ) { var o = e[t]; r[o[0]] = o[1]; } return r; } function Du(e) { return e == null; } function VP(e) { return e === void 0; } function zP(e, t, n, r) { if (!ui(e)) return e; t = Yi(t, e); for (var o = -1, a = t.length, s = a - 1, i = e; i != null && ++o < a; ) { var l = Bu(t[o]), c = n; if (l === "__proto__" || l === "constructor" || l === "prototype") return e; if (o != s) { var u = i[l]; c = void 0, c === void 0 && (c = ui(u) ? u : Mm(t[o + 1]) ? [] : {}); } HF(i, l, c), i = i[l]; } return e; } function HP(e, t, n) { for (var r = -1, o = t.length, a = {}; ++r < o; ) { var s = t[r], i = Hm(e, s); n(i, s) && zP(a, Yi(s, e), i); } return a; } function UP(e, t) { return HP(e, t, function(n, r) { return jP(e, r); }); } var qP = BP(function(e, t) { return e == null ? {} : UP(e, t); }); const KP = (e) => e === void 0, Mu = (e) => typeof e == "boolean", Ma = (e) => typeof e == "number", _a = (e) => typeof Element > "u" ? !1 : e instanceof Element, WP = (e) => Qo(e) ? !Number.isNaN(Number(e)) : !1, Op = (e) => Object.keys(e); class GP extends Error { constructor(t) { super(t), this.name = "ElementPlusError"; } } function fo(e, t) { if (process.env.NODE_ENV !== "production") { const n = Qo(e) ? new GP(`[${e}] ${t}`) : e; console.warn(n); } } const JP = "utils/dom/style", Um = (e = "") => e.split(" ").filter((t) => !!t.trim()), Ip = (e, t) => { !e || !t.trim() || e.classList.add(...Um(t)); }, fi = (e, t) => { !e || !t.trim() || e.classList.remove(...Um(t)); }, ha = (e, t) => { var n; if (!gn || !e || !t) return ""; let r = JA(t); r === "float" && (r = "cssFloat"); try { const o = e.style[r]; if (o) return o; const a = (n = document.defaultView) == null ? void 0 : n.getComputedStyle(e, ""); return a ? a[r] : ""; } catch { return e.style[r]; } }; function qm(e, t = "px") { if (!e) return ""; if (Ma(e) || WP(e)) return `${e}${t}`; if (Qo(e)) return e; fo(JP, "binding value must be a string or number"); } /*! Element Plus Icons Vue v2.3.1 */ var ZP = /* @__PURE__ */ K({ name: "Loading", __name: "loading", setup(e) { return (t, n) => (C(), F("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ M("path", { fill: "currentColor", d: "M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32m448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32m-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32M195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248zm452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248zM828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0m-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0z" }) ])); } }), YP = ZP; const Km = "__epPropKey", De = (e) => e, XP = (e) => os(e) && !!e[Km], Xi = (e, t) => { if (!os(e) || XP(e)) return e; const { values: n, required: r, default: o, type: a, validator: s } = e, i = { type: a, required: !!r, validator: n || s ? (l) => { let c = !1, u = []; if (n && (u = Array.from(n), wp(e, "default") && u.push(o), c || (c = u.includes(l))), s && (c || (c = s(l))), !c && u.length > 0) { const f = [...new Set(u)].map((g) => JSON.stringify(g)).join(", "); Ph(`Invalid prop: validation failed${t ? ` for prop "${t}"` : ""}. Expected one of [${f}], got value ${JSON.stringify(l)}.`); } return c; } : void 0, [Km]: !0 }; return wp(e, "default") && (i.default = o), i; }, xt = (e) => mc(Object.entries(e).map(([t, n]) => [ t, Xi(n, t) ])), yc = De([ String, Object, Function ]), bo = (e, t) => { if (e.install = (n) => { for (const r of [e, ...Object.values(t ?? {})]) n.component(r.name, r); }, t) for (const [n, r] of Object.entries(t)) e[n] = r; return e; }, QP = (e, t) => (e.install = (n) => { n.directive(t, e); }, e), e$ = (e) => (e.install = ci, e), pi = { tab: "Tab", enter: "Enter", space: "Space", left: "ArrowLeft", up: "ArrowUp", right: "ArrowRight", down: "ArrowDown", esc: "Escape", delete: "Delete", backspace: "Backspace", numpadEnter: "NumpadEnter", pageUp: "PageUp", pageDown: "PageDown", home: "Home", end: "End" }, t$ = ["", "default", "small", "large"], n$ = ({ from: e, replacement: t, scope: n, version: r, ref: o, type: a = "API" }, s) => { oe(() => p(s), (i) => { i && fo(n, `[${a}] ${e} is about to be deprecated in version ${r}, please use ${t} instead. For more detail, please visit: ${o} `); }, { immediate: !0 }); }; var r$ = { 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 o$ = (e) => (t, n) => a$(t, n, p(e)), a$ = (e, t, n) => PP(n, e, e).replace(/\{(\w+)\}/g, (r, o) => { var a; return `${(a = t == null ? void 0 : t[o]) != null ? a : `{${o}}`}`; }), s$ = (e) => { const t = w(() => p(e).name), n = Tn(e) ? e : $(e); return { lang: t, locale: n, t: o$(e) }; }, Wm = Symbol("localeContextKey"), i$ = (e) => { const t = e || ce(Wm, $()); return s$(w(() => t.value || r$)); }, qs = "el", l$ = "is-", qr = (e, t, n, r, o) => { let a = `${e}-${t}`; return n && (a += `-${n}`), r && (a += `__${r}`), o && (a += `--${o}`), a; }, Gm = Symbol("namespaceContextKey"), ju = (e) => { const t = e || (We() ? ce(Gm, $(qs)) : $(qs)); return w(() => p(t) || qs); }, Ln = (e, t) => { const n = ju(t); return { namespace: n, b: (r = "") => qr(n.value, e, r, "", ""), e: (r) => r ? qr(n.value, e, "", r, "") : "", m: (r) => r ? qr(n.value, e, "", "", r) : "", be: (r, o) => r && o ? qr(n.value, e, r, o, "") : "", em: (r, o) => r && o ? qr(n.value, e, "", r, o) : "", bm: (r, o) => r && o ? qr(n.value, e, r, "", o) : "", bem: (r, o, a) => r && o && a ? qr(n.value, e, r, o, a) : "", is: (r, ...o) => { const a = o.length >= 1 ? o[0] : !0; return r && a ? `${l$}${r}` : ""; }, cssVar: (r) => { const o = {}; for (const a in r) r[a] && (o[`--${n.value}-${a}`] = r[a]); return o; }, cssVarName: (r) => `--${n.value}-${r}`, cssVarBlock: (r) => { const o = {}; for (const a in r) r[a] && (o[`--${n.value}-${e}-${a}`] = r[a]); return o; }, cssVarBlockName: (r) => `--${n.value}-${e}-${r}` }; }, c$ = Xi({ type: De(Boolean), default: null }), u$ = Xi({ type: De(Function) }), d$ = (e) => { const t = `update:${e}`, n = `onUpdate:${e}`, r = [t], o = { [e]: c$, [n]: u$ }; return { useModelToggle: ({ indicator: a, toggleReason: s, shouldHideWhenRouteChanges: i, shouldProceed: l, onShow: c, onHide: u }) => { const f = We(), { emit: g } = f, v = f.props, d = w(() => ya(v[n])), h = w(() => v[e] === null), m = (T) => { a.value !== !0 && (a.value = !0, s && (s.value = T), ya(c) && c(T)); }, y = (T) => { a.value !== !1 && (a.value = !1, s && (s.value = T), ya(u) && u(T)); }, x = (T) => { if (v.disabled === !0 || ya(l) && !l()) return; const I = d.value && gn; I && g(t, !0), (h.value || !I) && m(T); }, A = (T) => { if (v.disabled === !0 || !gn) return; const I = d.value && gn; I && g(t, !1), (h.value || !I) && y(T); }, k = (T) => { Mu(T) && (v.disabled && T ? d.value && g(t, !1) : a.value !== T && (T ? m() : y())); }, E = () => { a.value ? A() : x(); }; return oe(() => v[e], k), i && f.appContext.config.globalProperties.$route !== void 0 && oe(() => ({ ...f.proxy.$route }), () => { i.value && a.value && A(); }), Ye(() => { k(v[e]); }), { hide: A, show: x, toggle: E, hasUpdateHandler: d }; }, useModelToggleProps: o, useModelToggleEmits: r }; }, Jm = (e) => { const t = We(); return w(() => { var n, r; return (r = (n = t == null ? void 0 : t.proxy) == null ? void 0 : n.$props) == null ? void 0 : r[e]; }); }; var on = "top", $n = "bottom", Rn = "right", an = "left", Vu = "auto", ss = [on, $n, Rn, an], zo = "start", ja = "end", f$ = "clippingParents", Zm = "viewport", va = "popper", p$ = "reference", Ap = ss.reduce(function(e, t) { return e.concat([t + "-" + zo, t + "-" + ja]); }, []), zu = [].concat(ss, [Vu]).reduce(function(e, t) { return e.concat([t, t + "-" + zo, t + "-" + ja]); }, []), h$ = "beforeRead", v$ = "read", g$ = "afterRead", m$ = "beforeMain", y$ = "main", b$ = "afterMain", w$ = "beforeWrite", C$ = "write", S$ = "afterWrite", k$ = [h$, v$, g$, m$, y$, b$, w$, C$, S$]; function sr(e) { return e ? (e.nodeName || "").toLowerCase() : null; } function Gn(e) { if (e == null) return window; if (e.toString() !== "[object Window]") { var t = e.ownerDocument; return t && t.defaultView || window; } return e; } function Ho(e) { var t = Gn(e).Element; return e instanceof t || e instanceof Element; } function xn(e) { var t = Gn(e).HTMLElement; return e instanceof t || e instanceof HTMLElement; } function Hu(e) { if (typeof ShadowRoot > "u") return !1; var t = Gn(e).ShadowRoot; return e instanceof t || e instanceof ShadowRoot; } function _$(e) { var t = e.state; Object.keys(t.elements).forEach(function(n) { var r = t.styles[n] || {}, o = t.attributes[n] || {}, a = t.elements[n]; !xn(a) || !sr(a) || (Object.assign(a.style, r), Object.keys(o).forEach(function(s) { var i = o[s]; i === !1 ? a.removeAttribute(s) : a.setAttribute(s, i === !0 ? "" : i); })); }); } function E$(e) { var t = e.state, n = { popper: { position: t.options.strategy, left: "0", top: "0", margin: "0" }, arrow: { position: "absolute" }, reference: {} }; return Object.assign(t.elements.popper.style, n.popper), t.styles = n, t.elements.arrow && Object.assign(t.elements.arrow.style, n.arrow), function() { Object.keys(t.elements).forEach(function(r) { var o = t.elements[r], a = t.attributes[r] || {}, s = Object.keys(t.styles.hasOwnProperty(r) ? t.styles[r] : n[r]), i = s.reduce(function(l, c) { return l[c] = "", l; }, {}); !xn(o) || !sr(o) || (Object.assign(o.style, i), Object.keys(a).forEach(function(l) { o.removeAttribute(l); })); }); }; } var Ym = { name: "applyStyles", enabled: !0, phase: "write", fn: _$, effect: E$, requires: ["computeStyles"] }; function rr(e) { return e.split("-")[0]; } var ro = Math.max, hi = Math.min, Uo = Math.round; function qo(e, t) { t === void 0 && (t = !1); var n = e.getBoundingClientRect(), r = 1, o = 1; if (xn(e) && t) { var a = e.offsetHeight, s = e.offsetWidth; s > 0 && (r = Uo(n.width) / s || 1), a > 0 && (o = Uo(n.height) / a || 1); } return { width: n.width / r, height: n.height / o, top: n.top / o, right: n.right / r, bottom: n.bottom / o, left: n.left / r, x: n.left / r, y: n.top / o }; } function Uu(e) { var t = qo(e), n = e.offsetWidth, r = e.offsetHeight; return Math.abs(t.width - n) <= 1 && (n = t.width), Math.abs(t.height - r) <= 1 && (r = t.height), { x: e.offsetLeft, y: e.offsetTop, width: n, height: r }; } function Xm(e, t) { var n = t.getRootNode && t.getRootNode(); if (e.contains(t)) return !0; if (n && Hu(n)) { var r = t; do { if (r && e.isSameNode(r)) return !0; r = r.parentNode || r.host; } while (r); } return !1; } function Cr(e) { return Gn(e).getComputedStyle(e); } function x$(e) { return ["table", "td", "th"].indexOf(sr(e)) >= 0; } function jr(e) { return ((Ho(e) ? e.ownerDocument : e.document) || window.document).documentElement; } function Qi(e) { return sr(e) === "html" ? e : e.assignedSlot || e.parentNode || (Hu(e) ? e.host : null) || jr(e); } function Fp(e) { return !xn(e) || Cr(e).position === "fixed" ? null : e.offsetParent; } function T$(e) { var t = navigator.userAgent.toLowerCase().indexOf("firefox") !== -1, n = navigator.userAgent.indexOf("Trident") !== -1; if (n && xn(e)) { var r = Cr(e); if (r.position === "fixed") return null; } var o = Qi(e); for (Hu(o) && (o = o.host); xn(o) && ["html", "body"].indexOf(sr(o)) < 0; ) { var a = Cr(o); 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 o; o = o.parentNode; } return null; } function is(e) { for (var t = Gn(e), n = Fp(e); n && x$(n) && Cr(n).position === "static"; ) n = Fp(n); return n && (sr(n) === "html" || sr(n) === "body" && Cr(n).position === "static") ? t : n || T$(e) || t; } function qu(e) { return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y"; } function Ea(e, t, n) { return ro(e, hi(t, n)); } function O$(e, t, n) { var r = Ea(e, t, n); return r > n ? n : r; } function Qm() { return { top: 0, right: 0, bottom: 0, left: 0 }; } function e0(e) { return Object.assign({}, Qm(), e); } function t0(e, t) { return t.reduce(function(n, r) { return n[r] = e, n; }, {}); } var I$ = function(e, t) { return e = typeof e == "function" ? e(Object.assign({}, t.rects, { placement: t.placement })) : e, e0(typeof e != "number" ? e : t0(e, ss)); }; function A$(e) { var t, n = e.state, r = e.name, o = e.options, a = n.elements.arrow, s = n.modifiersData.popperOffsets, i = rr(n.placement), l = qu(i), c = [an, Rn].indexOf(i) >= 0, u = c ? "height" : "width"; if (!(!a || !s)) { var f = I$(o.padding, n), g = Uu(a), v = l === "y" ? on : an, d = l === "y" ? $n : Rn, h = n.rects.reference[u] + n.rects.reference[l] - s[l] - n.rects.popper[u], m = s[l] - n.rects.reference[l], y = is(a), x = y ? l === "y" ? y.clientHeight || 0 : y.clientWidth || 0 : 0, A = h / 2 - m / 2, k = f[v], E = x - g[u] - f[d], T = x / 2 - g[u] / 2 + A, I = Ea(k, T, E), R = l; n.modifiersData[r] = (t = {}, t[R] = I, t.centerOffset = I - T, t); } } function F$(e) { var t = e.state, n = e.options, r = n.element, o = r === void 0 ? "[data-popper-arrow]" : r; o != null && (typeof o == "string" && (o = t.elements.popper.querySelector(o), !o) || !Xm(t.elements.popper, o) || (t.elements.arrow = o)); } var P$ = { name: "arrow", enabled: !0, phase: "main", fn: A$, effect: F$, requires: ["popperOffsets"], requiresIfExists: ["preventOverflow"] }; function Ko(e) { return e.split("-")[1]; } var $$ = { top: "auto", right: "auto", bottom: "auto", left: "auto" }; function R$(e) { var t = e.x, n = e.y, r = window, o = r.devicePixelRatio || 1; return { x: Uo(t * o) / o || 0, y: Uo(n * o) / o || 0 }; } function Pp(e) { var t, n = e.popper, r = e.popperRect, o = e.placement, a = e.variation, s = e.offsets, i = e.position, l = e.gpuAcceleration, c = e.adaptive, u = e.roundOffsets, f = e.isFixed, g = s.x, v = g === void 0 ? 0 : g, d = s.y, h = d === void 0 ? 0 : d, m = typeof u == "function" ? u({ x: v, y: h }) : { x: v, y: h }; v = m.x, h = m.y; var y = s.hasOwnProperty("x"), x = s.hasOwnProperty("y"), A = an, k = on, E = window; if (c) { var T = is(n), I = "clientHeight", R = "clientWidth"; if (T === Gn(n) && (T = jr(n), Cr(T).position !== "static" && i === "absolute" && (I = "scrollHeight", R = "scrollWidth")), T = T, o === on || (o === an || o === Rn) && a === ja) { k = $n; var D = f && T === E && E.visualViewport ? E.visualViewport.height : T[I]; h -= D - r.height, h *= l ? 1 : -1; } if (o === an || (o === on || o === $n) && a === ja) { A = Rn; var W = f && T === E && E.visualViewport ? E.visualViewport.width : T[R]; v -= W - r.width, v *= l ? 1 : -1; } } var z = Object.assign({ position: i }, c && $$), U = u === !0 ? R$({ x: v, y: h }) : { x: v, y: h }; if (v = U.x, h = U.y, l) { var X; return Object.assign({}, z, (X = {}, X[k] = x ? "0" : "", X[A] = y ? "0" : "", X.transform = (E.devicePixelRatio || 1) <= 1 ? "translate(" + v + "px, " + h + "px)" : "translate3d(" + v + "px, " + h + "px, 0)", X)); } return Object.assign({}, z, (t = {}, t[k] = x ? h + "px" : "", t[A] = y ? v + "px" : "", t.transform = "", t)); } function N$(e) { var t = e.state, n = e.options, r = n.gpuAcceleration, o = r === void 0 ? !0 : r, a = n.adaptive, s = a === void 0 ? !0 : a, i = n.roundOffsets, l = i === void 0 ? !0 : i, c = { placement: rr(t.placement), variation: Ko(t.placement), popper: t.elements.popper, popperRect: t.rects.popper, gpuAcceleration: o, isFixed: t.options.strategy === "fixed" }; t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper, Pp(Object.assign({}, c, { offsets: t.modifiersData.popperOffsets, position: t.options.strategy, adaptive: s, roundOffsets: l })))), t.modifiersData.arrow != null && (t.styles.arrow = Object.assign({}, t.styles.arrow, Pp(Object.assign({}, c, { offsets: t.modifiersData.arrow, position: "absolute", adaptive: !1, roundOffsets: l })))), t.attributes.popper = Object.assign({}, t.attributes.popper, { "data-popper-placement": t.placement }); } var n0 = { name: "computeStyles", enabled: !0, phase: "beforeWrite", fn: N$, data: {} }, Ts = { passive: !0 }; function L$(e) { var t = e.state, n = e.instance, r = e.options, o = r.scroll, a = o === void 0 ? !0 : o, s = r.resize, i = s === void 0 ? !0 : s, l = Gn(t.elements.popper), c = [].concat(t.scrollParents.reference, t.scrollParents.popper); return a && c.forEach(function(u) { u.addEventListener("scroll", n.update, Ts); }), i && l.addEventListener("resize", n.update, Ts), function() { a && c.forEach(function(u) { u.removeEventListener("scroll", n.update, Ts); }), i && l.removeEventListener("resize", n.update, Ts); }; } var r0 = { name: "eventListeners", enabled: !0, phase: "write", fn: function() { }, effect: L$, data: {} }, B$ = { left: "right", right: "left", bottom: "top", top: "bottom" }; function Ks(e) { return e.replace(/left|right|bottom|top/g, function(t) { return B$[t]; }); } var D$ = { start: "end", end: "start" }; function $p(e) { return e.replace(/start|end/g, function(t) { return D$[t]; }); } function Ku(e) { var t = Gn(e), n = t.pageXOffset, r = t.pageYOffset; return { scrollLeft: n, scrollTop: r }; } function Wu(e) { return qo(jr(e)).left + Ku(e).scrollLeft; } function M$(e) { var t = Gn(e), n = jr(e), r = t.visualViewport, o = n.clientWidth, a = n.clientHeight, s = 0, i = 0; return r && (o = r.width, a = r.height, /^((?!chrome|android).)*safari/i.test(navigator.userAgent) || (s = r.offsetLeft, i = r.offsetTop)), { width: o, height: a, x: s + Wu(e), y: i }; } function j$(e) { var t, n = jr(e), r = Ku(e), o = (t = e.ownerDocument) == null ? void 0 : t.body, a = ro(n.scrollWidth, n.clientWidth, o ? o.scrollWidth : 0, o ? o.clientWidth : 0), s = ro(n.scrollHeight, n.clientHeight, o ? o.scrollHeight : 0, o ? o.clientHeight : 0), i = -r.scrollLeft + Wu(e), l = -r.scrollTop; return Cr(o || n).direction === "rtl" && (i += ro(n.clientWidth, o ? o.clientWidth : 0) - a), { width: a, height: s, x: i, y: l }; } function Gu(e) { var t = Cr(e), n = t.overflow, r = t.overflowX, o = t.overflowY; return /auto|scroll|overlay|hidden/.test(n + o + r); } function o0(e) { return ["html", "body", "#document"].indexOf(sr(e)) >= 0 ? e.ownerDocument.body : xn(e) && Gu(e) ? e : o0(Qi(e)); } function xa(e, t) { var n; t === void 0 && (t = []); var r = o0(e), o = r === ((n = e.ownerDocument) == null ? void 0 : n.body), a = Gn(r), s = o ? [a].concat(a.visualViewport || [], Gu(r) ? r : []) : r, i = t.concat(s); return o ? i : i.concat(xa(Qi(s))); } function bc(e) { return Object.assign({}, e, { left: e.x, top: e.y, right: e.x + e.width, bottom: e.y + e.height }); } function V$(e) { var t = qo(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 Rp(e, t) { return t === Zm ? bc(M$(e)) : Ho(t) ? V$(t) : bc(j$(jr(e))); } function z$(e) { var t = xa(Qi(e)), n = ["absolute", "fixed"].indexOf(Cr(e).position) >= 0, r = n && xn(e) ? is(e) : e; return Ho(r) ? t.filter(function(o) { return Ho(o) && Xm(o, r) && sr(o) !== "body"; }) : []; } function H$(e, t, n) { var r = t === "clippingParents" ? z$(e) : [].concat(t), o = [].concat(r, [n]), a = o[0], s = o.reduce(function(i, l) { var c = Rp(e, l); return i.top = ro(c.top, i.top), i.right = hi(c.right, i.right), i.bottom = hi(c.bottom, i.bottom), i.left = ro(c.left, i.left), i; }, Rp(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 a0(e) { var t = e.reference, n = e.element, r = e.placement, o = r ? rr(r) : null, a = r ? Ko(r) : null, s = t.x + t.width / 2 - n.width / 2, i = t.y + t.height / 2 - n.height / 2, l; switch (o) { case on: l = { x: s, y: t.y - n.height }; break; case $n: l = { x: s, y: t.y + t.height }; break; case Rn: l = { x: t.x + t.width, y: i }; break; case an: l = { x: t.x - n.width, y: i }; break; default: l = { x: t.x, y: t.y }; } var c = o ? qu(o) : null; if (c != null) { var u = c === "y" ? "height" : "width"; switch (a) { case zo: l[c] = l[c] - (t[u] / 2 - n[u] / 2); break; case ja: l[c] = l[c] + (t[u] / 2 - n[u] / 2); break; } } return l; } function Va(e, t) { t === void 0 && (t = {}); var n = t, r = n.placement, o = r === void 0 ? e.placement : r, a = n.boundary, s = a === void 0 ? f$ : a, i = n.rootBoundary, l = i === void 0 ? Zm : i, c = n.elementContext, u = c === void 0 ? va : c, f = n.altBoundary, g = f === void 0 ? !1 : f, v = n.padding, d = v === void 0 ? 0 : v, h = e0(typeof d != "number" ? d : t0(d, ss)), m = u === va ? p$ : va, y = e.rects.popper, x = e.elements[g ? m : u], A = H$(Ho(x) ? x : x.contextElement || jr(e.elements.popper), s, l), k = qo(e.elements.reference), E = a0({ reference: k, element: y, strategy: "absolute", placement: o }), T = bc(Object.assign({}, y, E)), I = u === va ? T : k, R = { top: A.top - I.top + h.top, bottom: I.bottom - A.bottom + h.bottom, left: A.left - I.left + h.left, right: I.right - A.right + h.right }, D = e.modifiersData.offset; if (u === va && D) { var W = D[o]; Object.keys(R).forEach(function(z) { var U = [Rn, $n].indexOf(z) >= 0 ? 1 : -1, X = [on, $n].indexOf(z) >= 0 ? "y" : "x"; R[z] += W[X] * U; }); } return R; } function U$(e, t) { t === void 0 && (t = {}); var n = t, r = n.placement, o = n.boundary, a = n.rootBoundary, s = n.padding, i = n.flipVariations, l = n.allowedAutoPlacements, c = l === void 0 ? zu : l, u = Ko(r), f = u ? i ? Ap : Ap.filter(function(d) { return Ko(d) === u; }) : ss, g = f.filter(function(d) { return c.indexOf(d) >= 0; }); g.length === 0 && (g = f); var v = g.reduce(function(d, h) { return d[h] = Va(e, { placement: h, boundary: o, rootBoundary: a, padding: s })[rr(h)], d; }, {}); return Object.keys(v).sort(function(d, h) { return v[d] - v[h]; }); } function q$(e) { if (rr(e) === Vu) return []; var t = Ks(e); return [$p(e), t, $p(t)]; } function K$(e) { var t = e.state, n = e.options, r = e.name; if (!t.modifiersData[r]._skip) { for (var o = n.mainAxis, a = o === void 0 ? !0 : o, s = n.altAxis, i = s === void 0 ? !0 : s, l = n.fallbackPlacements, c = n.padding, u = n.boundary, f = n.rootBoundary, g = n.altBoundary, v = n.flipVariations, d = v === void 0 ? !0 : v, h = n.allowedAutoPlacements, m = t.options.placement, y = rr(m), x = y === m, A = l || (x || !d ? [Ks(m)] : q$(m)), k = [m].concat(A).reduce(function(Ge, Le) { return Ge.concat(rr(Le) === Vu ? U$(t, { placement: Le, boundary: u, rootBoundary: f, padding: c, flipVariations: d, allowedAutoPlacements: h }) : Le); }, []), E = t.rects.reference, T = t.rects.popper, I = /* @__PURE__ */ new Map(), R = !0, D = k[0], W = 0; W < k.length; W++) { var z = k[W], U = rr(z), X = Ko(z) === zo, de = [on, $n].indexOf(U) >= 0, re = de ? "width" : "height", L = Va(t, { placement: z, boundary: u, rootBoundary: f, altBoundary: g, padding: c }), Z = de ? X ? Rn : an : X ? $n : on; E[re] > T[re] && (Z = Ks(Z)); var ve = Ks(Z), me = []; if (a && me.push(L[U] <= 0), i && me.push(L[Z] <= 0, L[ve] <= 0), me.every(function(Ge) { return Ge; })) { D = z, R = !1; break; } I.set(z, me); } if (R) for (var Ne = d ? 3 : 1, _e = function(Ge) { var Le = k.find(function(Ke) { var nt = I.get(Ke); if (nt) return nt.slice(0, Ge).every(function(dt) { return dt; }); }); if (Le) return D = Le, "break"; }, ze = Ne; ze > 0; ze--) { var at = _e(ze); if (at === "break") break; } t.placement !== D && (t.modifiersData[r]._skip = !0, t.placement = D, t.reset = !0); } } var W$ = { name: "flip", enabled: !0, phase: "main", fn: K$, requiresIfExists: ["offset"], data: { _skip: !1 } }; function Np(e, t, n) { return n === void 0 && (n = { x: 0, y: 0 }), { top: e.top - t.height - n.y, right: e.right - t.width + n.x, bottom: e.bottom - t.height + n.y, left: e.left - t.width - n.x }; } function Lp(e) { return [on, Rn, $n, an].some(function(t) { return e[t] >= 0; }); } function G$(e) { var t = e.state, n = e.name, r = t.rects.reference, o = t.rects.popper, a = t.modifiersData.preventOverflow, s = Va(t, { elementContext: "reference" }), i = Va(t, { altBoundary: !0 }), l = Np(s, r), c = Np(i, o, a), u = Lp(l), f = Lp(c); t.modifiersData[n] = { referenceClippingOffsets: l, popperEscapeOffsets: c, isReferenceHidden: u, hasPopperEscaped: f }, t.attributes.popper = Object.assign({}, t.attributes.popper, { "data-popper-reference-hidden": u, "data-popper-escaped": f }); } var J$ = { name: "hide", enabled: !0, phase: "main", requiresIfExists: ["preventOverflow"], fn: G$ }; function Z$(e, t, n) { var r = rr(e), o = [an, on].indexOf(r) >= 0 ? -1 : 1, a = typeof n == "function" ? n(Object.assign({}, t, { placement: e })) : n, s = a[0], i = a[1]; return s = s || 0, i = (i || 0) * o, [an, Rn].indexOf(r) >= 0 ? { x: i, y: s } : { x: s, y: i }; } function Y$(e) { var t = e.state, n = e.options, r = e.name, o = n.offset, a = o === void 0 ? [0, 0] : o, s = zu.reduce(function(u, f) { return u[f] = Z$(f, t.rects, a), u; }, {}), i = s[t.placement], l = i.x, c = i.y; t.modifiersData.popperOffsets != null && (t.modifiersData.popperOffsets.x += l, t.modifiersData.popperOffsets.y += c), t.modifiersData[r] = s; } var X$ = { name: "offset", enabled: !0, phase: "main", requires: ["popperOffsets"], fn: Y$ }; function Q$(e) { var t = e.state, n = e.name; t.modifiersData[n] = a0({ reference: t.rects.reference, element: t.rects.popper, strategy: "absolute", placement: t.placement }); } var s0 = { name: "popperOffsets", enabled: !0, phase: "read", fn: Q$, data: {} }; function eR(e) { return e === "x" ? "y" : "x"; } function tR(e) { var t = e.state, n = e.options, r = e.name, o = n.mainAxis, a = o === void 0 ? !0 : o, s = n.altAxis, i = s === void 0 ? !1 : s, l = n.boundary, c = n.rootBoundary, u = n.altBoundary, f = n.padding, g = n.tether, v = g === void 0 ? !0 : g, d = n.tetherOffset, h = d === void 0 ? 0 : d, m = Va(t, { boundary: l, rootBoundary: c, padding: f, altBoundary: u }), y = rr(t.placement), x = Ko(t.placement), A = !x, k = qu(y), E = eR(k), T = t.modifiersData.popperOffsets, I = t.rects.reference, R = t.rects.popper, D = typeof h == "function" ? h(Object.assign({}, t.rects, { placement: t.placement })) : h, W = typeof D == "number" ? { mainAxis: D, altAxis: D } : Object.assign({ mainAxis: 0, altAxis: 0 }, D), z = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, U = { x: 0, y: 0 }; if (T) { if (a) { var X, de = k === "y" ? on : an, re = k === "y" ? $n : Rn, L = k === "y" ? "height" : "width", Z = T[k], ve = Z + m[de], me = Z - m[re], Ne = v ? -R[L] / 2 : 0, _e = x === zo ? I[L] : R[L], ze = x === zo ? -R[L] : -I[L], at = t.elements.arrow, Ge = v && at ? Uu(at) : { width: 0, height: 0 }, Le = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : Qm(), Ke = Le[de], nt = Le[re], dt = Ea(0, I[L], Ge[L]), Cn = A ? I[L] / 2 - Ne - dt - Ke - W.mainAxis : _e - dt - Ke - W.mainAxis, Rt = A ? -I[L] / 2 + Ne + dt + nt + W.mainAxis : ze + dt + nt + W.mainAxis, Tt = t.elements.arrow && is(t.elements.arrow), st = Tt ? k === "y" ? Tt.clientTop || 0 : Tt.clientLeft || 0 : 0, gt = (X = z == null ? void 0 : z[k]) != null ? X : 0, Wt = Z + Cn - gt - st, Gt = Z + Rt - gt, Et = Ea(v ? hi(ve, Wt) : ve, Z, v ? ro(me, Gt) : me); T[k] = Et, U[k] = Et - Z; } if (i) { var Jt, Nt = k === "x" ? on : an, Sn = k === "x" ? $n : Rn, Je = T[E], Ot = E === "y" ? "height" : "width", zt = Je + m[Nt], cn = Je - m[Sn], It = [on, an].indexOf(y) !== -1, te = (Jt = z == null ? void 0 : z[E]) != null ? Jt : 0, $e = It ? zt : Je - I[Ot] - R[Ot] - te + W.altAxis, it = It ? Je + I[Ot] + R[Ot] - te - W.altAxis : cn, Ht = v && It ? O$($e, Je, it) : Ea(v ? $e : zt, Je, v ? it : cn); T[E] = Ht, U[E] = Ht - Je; } t.modifiersData[r] = U; } } var nR = { name: "preventOverflow", enabled: !0, phase: "main", fn: tR, requiresIfExists: ["offset"] }; function rR(e) { return { scrollLeft: e.scrollLeft, scrollTop: e.scrollTop }; } function oR(e) { return e === Gn(e) || !xn(e) ? Ku(e) : rR(e); } function aR(e) { var t = e.getBoundingClientRect(), n = Uo(t.width) / e.offsetWidth || 1, r = Uo(t.height) / e.offsetHeight || 1; return n !== 1 || r !== 1; } function sR(e, t, n) { n === void 0 && (n = !1); var r = xn(t), o = xn(t) && aR(t), a = jr(t), s = qo(e, o), i = { scrollLeft: 0, scrollTop: 0 }, l = { x: 0, y: 0 }; return (r || !r && !n) && ((sr(t) !== "body" || Gu(a)) && (i = oR(t)), xn(t) ? (l = qo(t, !0), l.x += t.clientLeft, l.y += t.clientTop) : a && (l.x = Wu(a))), { x: s.left + i.scrollLeft - l.x, y: s.top + i.scrollTop - l.y, width: s.width, height: s.height }; } function iR(e) { var t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set(), r = []; e.forEach(function(a) { t.set(a.name, a); }); function o(a) { n.add(a.name); var s = [].concat(a.requires || [], a.requiresIfExists || []); s.forEach(function(i) { if (!n.has(i)) { var l = t.get(i); l && o(l); } }), r.push(a); } return e.forEach(function(a) { n.has(a.name) || o(a); }), r; } function lR(e) { var t = iR(e); return k$.reduce(function(n, r) { return n.concat(t.filter(function(o) { return o.phase === r; })); }, []); } function cR(e) { var t; return function() { return t || (t = new Promise(function(n) { Promise.resolve().then(function() { t = void 0, n(e()); }); })), t; }; } function uR(e) { var t = e.reduce(function(n, r) { var o = n[r.name]; return n[r.name] = o ? Object.assign({}, o, r, { options: Object.assign({}, o.options, r.options), data: Object.assign({}, o.data, r.data) }) : r, n; }, {}); return Object.keys(t).map(function(n) { return t[n]; }); } var Bp = { placement: "bottom", modifiers: [], strategy: "absolute" }; function Dp() { for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++) t[n] = arguments[n]; return !t.some(function(r) { return !(r && typeof r.getBoundingClientRect == "function"); }); } function Ju(e) { e === void 0 && (e = {}); var t = e, n = t.defaultModifiers, r = n === void 0 ? [] : n, o = t.defaultOptions, a = o === void 0 ? Bp : o; return function(s, i, l) { l === void 0 && (l = a); var c = { placement: "bottom", orderedModifiers: [], options: Object.assign({}, Bp, a), modifiersData: {}, elements: { reference: s, popper: i }, attributes: {}, styles: {} }, u = [], f = !1, g = { state: c, setOptions: function(h) { var m = typeof h == "function" ? h(c.options) : h; d(), c.options = Object.assign({}, a, c.options, m), c.scrollParents = { reference: Ho(s) ? xa(s) : s.contextElement ? xa(s.contextElement) : [], popper: xa(i) }; var y = lR(uR([].concat(r, c.options.modifiers))); return c.orderedModifiers = y.filter(function(x) { return x.enabled; }), v(), g.update(); }, forceUpdate: function() { if (!f) { var h = c.elements, m = h.reference, y = h.popper; if (Dp(m, y)) { c.rects = { reference: sR(m, is(y), c.options.strategy === "fixed"), popper: Uu(y) }, c.reset = !1, c.placement = c.options.placement, c.orderedModifiers.forEach(function(R) { return c.modifiersData[R.name] = Object.assign({}, R.data); }); for (var x = 0; x < c.orderedModifiers.length; x++) { if (c.reset === !0) { c.reset = !1, x = -1; continue; } var A = c.orderedModifiers[x], k = A.fn, E = A.options, T = E === void 0 ? {} : E, I = A.name; typeof k == "function" && (c = k({ state: c, options: T, name: I, instance: g }) || c); } } } }, update: cR(function() { return new Promise(function(h) { g.forceUpdate(), h(c); }); }), destroy: function() { d(), f = !0; } }; if (!Dp(s, i)) return g; g.setOptions(l).then(function(h) { !f && l.onFirstUpdate && l.onFirstUpdate(h); }); function v() { c.orderedModifiers.forEach(function(h) { var m = h.name, y = h.options, x = y === void 0 ? {} : y, A = h.effect; if (typeof A == "function") { var k = A({ state: c, name: m, instance: g, options: x }), E = function() { }; u.push(k || E); } }); } function d() { u.forEach(function(h) { return h(); }), u = []; } return g; }; } Ju(); var dR = [r0, s0, n0, Ym]; Ju({ defaultModifiers: dR }); var fR = [r0, s0, n0, Ym, X$, W$, nR, P$, J$], pR = Ju({ defaultModifiers: fR }); const hR = (e, t, n = {}) => { const r = { name: "updateState", enabled: !0, phase: "write", fn: ({ state: l }) => { const c = vR(l); Object.assign(s.value, c); }, requires: ["computeStyles"] }, o = w(() => { const { onFirstUpdate: l, placement: c, strategy: u, modifiers: f } = p(n); return { onFirstUpdate: l, placement: c || "bottom", strategy: u || "absolute", modifiers: [ ...f || [], r, { name: "applyStyles", enabled: !1 } ] }; }), a = Qr(), s = $({ styles: { popper: { position: p(o).strategy, left: "0", top: "0" }, arrow: { position: "absolute" } }, attributes: {} }), i = () => { a.value && (a.value.destroy(), a.value = void 0); }; return oe(o, (l) => { const c = p(a); c && c.setOptions(l); }, { deep: !0 }), oe([e, t], ([l, c]) => { i(), !(!l || !c) && (a.value = pR(l, c, p(o))); }), bt(() => { i(); }), { state: w(() => { var l; return { ...((l = p(a)) == null ? void 0 : l.state) || {} }; }), styles: w(() => p(s).styles), attributes: w(() => p(s).attributes), update: () => { var l; return (l = p(a)) == null ? void 0 : l.update(); }, forceUpdate: () => { var l; return (l = p(a)) == null ? void 0 : l.forceUpdate(); }, instanceRef: w(() => p(a)) }; }; function vR(e) { const t = Object.keys(e.elements), n = mc(t.map((o) => [o, e.styles[o] || {}])), r = mc(t.map((o) => [o, e.attributes[o]])); return { styles: n, attributes: r }; } function Mp() { let e; const t = (r, o) => { n(), e = window.setTimeout(r, o); }, n = () => window.clearTimeout(e); return Rm(() => n()), { registerTimeout: t, cancelTimeout: n }; } const wc = { prefix: Math.floor(Math.random() * 1e4), current: 0 }, gR = Symbol("elIdInjection"), i0 = () => We() ? ce(gR, wc) : wc, mR = (e) => { const t = i0(); !gn && t === wc && fo("IdInjection", `Looks like you are using server rendering, you must provide a id provider to ensure the hydration process to be succeed usage: app.provide(ID_INJECTION_KEY, { prefix: number, current: number, })`); const n = ju(); return w(() => p(e) || `${n.value}-id-${t.prefix}-${t.current++}`); }; let Fo = []; const jp = (e) => { const t = e; t.key === pi.esc && Fo.forEach((n) => n(t)); }, yR = (e) => { Ye(() => { Fo.length === 0 && document.addEventListener("keydown", jp), gn && Fo.push(e); }), bt(() => { Fo = Fo.filter((t) => t !== e), Fo.length === 0 && gn && document.removeEventListener("keydown", jp); }); }; let Vp; const l0 = () => { const e = ju(), t = i0(), n = w(() => `${e.value}-popper-container-${t.prefix}`), r = w(() => `#${n.value}`); return { id: n, selector: r }; }, bR = (e) => { const t = document.createElement("div"); return t.id = e, document.body.appendChild(t), t; }, wR = () => { const { id: e, selector: t } = l0(); return $h(() => { gn && (process.env.NODE_ENV === "test" || !Vp || !document.body.querySelector(t.value)) && (Vp = bR(e.value)); }), { id: e, selector: t }; }, CR = xt({ showAfter: { type: Number, default: 0 }, hideAfter: { type: Number, default: 200 }, autoClose: { type: Number, default: 0 } }), SR = ({ showAfter: e, hideAfter: t, autoClose: n, open: r, close: o }) => { const { registerTimeout: a } = Mp(), { registerTimeout: s, cancelTimeout: i } = Mp(); return { onOpen: (l) => { a(() => { r(l); const c = p(n); Ma(c) && c > 0 && s(() => { o(l); }, c); }, p(e)); }, onClose: (l) => { i(), a(() => { o(l); }, p(t)); } }; }, c0 = Symbol("elForwardRef"), kR = (e) => { qe(c0, { setForwardRef: (t) => { e.value = t; } }); }, _R = (e) => ({ mounted(t) { e(t); }, updated(t) { e(t); }, unmounted() { e(null); } }), zp = { current: 0 }, Hp = $(0), u0 = 2e3, Up = Symbol("elZIndexContextKey"), d0 = Symbol("zIndexContextKey"), f0 = (e) => { const t = We() ? ce(Up, zp) : zp, n = e || (We() ? ce(d0, void 0) : void 0), r = w(() => { const s = p(n); return Ma(s) ? s : u0; }), o = w(() => r.value + Hp.value), a = () => (t.current++, Hp.value = t.current, o.value); return !gn && !ce(Up) && fo("ZIndexInjection", `Looks like you are using server rendering, you must provide a z-index provider to ensure the hydration process to be succeed usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`), { initialZIndex: r, currentZIndex: o, nextZIndex: a }; }, ER = Xi({ type: String, values: t$, required: !1 }), p0 = Symbol("size"), xR = () => { const e = ce(p0, {}); return w(() => p(e.size) || ""); }, TR = Symbol("emptyValuesContextKey"); xt({ emptyValues: Array, valueOnClear: { type: [String, Number, Boolean, Function], default: void 0, validator: (e) => ya(e) ? !e() : !e } }); const OR = xt({ ariaLabel: String, ariaOrientation: { type: String, values: ["horizontal", "vertical", "undefined"] }, ariaControls: String }), h0 = (e) => qP(OR, e), v0 = Symbol(), vi = $(); function Zu(e, t = void 0) { const n = We() ? ce(v0, vi) : vi; return e ? w(() => { var r, o; return (o = (r = n.value) == null ? void 0 : r[e]) != null ? o : t; }) : n; } function IR(e, t) { const n = Zu(), r = Ln(e, w(() => { var i; return ((i = n.value) == null ? void 0 : i.namespace) || qs; })), o = i$(w(() => { var i; return (i = n.value) == null ? void 0 : i.locale; })), a = f0(w(() => { var i; return ((i = n.value) == null ? void 0 : i.zIndex) || u0; })), s = w(() => { var i; return p(t) || ((i = n.value) == null ? void 0 : i.size) || ""; }); return AR(w(() => p(n) || {})), { ns: r, locale: o, zIndex: a, size: s }; } const AR = (e, t, n = !1) => { var r; const o = !!We(), a = o ? Zu() : void 0, s = (r = void 0) != null ? r : o ? qe : void 0; if (!s) { fo("provideGlobalConfig", "provideGlobalConfig() can only be used inside setup()."); return; } const i = w(() => { const l = p(e); return a != null && a.value ? FR(a.value, l) : l; }); return s(v0, i), s(Wm, w(() => i.value.locale)), s(Gm, w(() => i.value.namespace)), s(d0, w(() => i.value.zIndex)), s(p0, { size: w(() => i.value.size || "") }), s(TR, w(() => ({ emptyValues: i.value.emptyValues, valueOnClear: i.value.valueOnClear }))), (n || !vi.value) && (vi.value = i.value), i; }, FR = (e, t) => { const n = [.../* @__PURE__ */ new Set([...Op(e), ...Op(t)])], r = {}; for (const o of n) r[o] = t[o] !== void 0 ? t[o] : e[o]; return r; }; var Vt = (e, t) => { const n = e.__vccOpts || e; for (const [r, o] of t) n[r] = o; return n; }; const PR = xt({ size: { type: De([Number, String]) }, color: { type: String } }), $R = K({ name: "ElIcon", inheritAttrs: !1 }), RR = /* @__PURE__ */ K({ ...$R, props: PR, setup(e) { const t = e, n = Ln("icon"), r = w(() => { const { size: o, color: a } = t; return !o && !a ? {} : { fontSize: KP(o) ? void 0 : qm(o), "--color": a }; }); return (o, a) => (C(), F("i", mt({ class: p(n).b(), style: p(r) }, o.$attrs), [ ee(o.$slots, "default") ], 16)); } }); var NR = /* @__PURE__ */ Vt(RR, [["__file", "icon.vue"]]); const qp = bo(NR), Yu = Symbol("formContextKey"), gi = Symbol("formItemContextKey"), LR = (e, t = {}) => { const n = $(void 0), r = t.prop ? n : Jm("size"), o = t.global ? n : xR(), a = t.form ? { size: void 0 } : ce(Yu, void 0), s = t.formItem ? { size: void 0 } : ce(gi, void 0); return w(() => r.value || p(e) || (s == null ? void 0 : s.size) || (a == null ? void 0 : a.size) || o.value || ""); }, g0 = (e) => { const t = Jm("disabled"), n = ce(Yu, void 0); return w(() => t.value || p(e) || (n == null ? void 0 : n.disabled) || !1); }, BR = () => { const e = ce(Yu, void 0), t = ce(gi, void 0); return { form: e, formItem: t }; }, Xu = Symbol("popper"), m0 = Symbol("popperContent"), DR = [ "dialog", "grid", "group", "listbox", "menu", "navigation", "tooltip", "tree" ], y0 = xt({ role: { type: String, values: DR, default: "tooltip" } }), MR = K({ name: "ElPopper", inheritAttrs: !1 }), jR = /* @__PURE__ */ K({ ...MR, props: y0, setup(e, { expose: t }) { const n = e, r = $(), o = $(), a = $(), s = $(), i = w(() => n.role), l = { triggerRef: r, popperInstanceRef: o, contentRef: a, referenceRef: s, role: i }; return t(l), qe(Xu, l), (c, u) => ee(c.$slots, "default"); } }); var VR = /* @__PURE__ */ Vt(jR, [["__file", "popper.vue"]]); const b0 = xt({ arrowOffset: { type: Number, default: 5 } }), zR = K({ name: "ElPopperArrow", inheritAttrs: !1 }), HR = /* @__PURE__ */ K({ ...zR, props: b0, setup(e, { expose: t }) { const n = e, r = Ln("popper"), { arrowOffset: o, arrowRef: a, arrowStyle: s } = ce(m0, void 0); return oe(() => n.arrowOffset, (i) => { o.value = i; }), bt(() => { a.value = void 0; }), t({ arrowRef: a }), (i, l) => (C(), F("span", { ref_key: "arrowRef", ref: a, class: N(p(r).e("arrow")), style: Ue(p(s)), "data-popper-arrow": "" }, null, 6)); } }); var UR = /* @__PURE__ */ Vt(HR, [["__file", "arrow.vue"]]); const jl = "ElOnlyChild", qR = K({ name: jl, setup(e, { slots: t, attrs: n }) { var r; const o = ce(c0), a = _R((r = o == null ? void 0 : o.setForwardRef) != null ? r : ci); return () => { var s; const i = (s = t.default) == null ? void 0 : s.call(t, n); if (!i) return null; if (i.length > 1) return fo(jl, "requires exact only one valid child."), null; const l = w0(i); return l ? xe(Lh(l, n), [[a]]) : (fo(jl, "no valid child node found"), null); }; } }); function w0(e) { if (!e) return null; const t = e; for (const n of t) { if (os(n)) switch (n.type) { case Bh: continue; case Ci: case "svg": return Kp(n); case Ie: return w0(n.children); default: return n; } return Kp(n); } return null; } function Kp(e) { const t = Ln("only-child"); return V("span", { class: t.e("content") }, [e]); } const C0 = xt({ virtualRef: { type: De(Object) }, virtualTriggering: Boolean, onMouseenter: { type: De(Function) }, onMouseleave: { type: De(Function) }, onClick: { type: De(Function) }, onKeydown: { type: De(Function) }, onFocus: { type: De(Function) }, onBlur: { type: De(Function) }, onContextmenu: { type: De(Function) }, id: String, open: Boolean }), KR = K({ name: "ElPopperTrigger", inheritAttrs: !1 }), WR = /* @__PURE__ */ K({ ...KR, props: C0, setup(e, { expose: t }) { const n = e, { role: r, triggerRef: o } = ce(Xu, void 0); kR(o); const a = w(() => i.value ? n.id : void 0), s = w(() => { if (r && r.value === "tooltip") return n.open && n.id ? n.id : void 0; }), i = w(() => { if (r && r.value !== "tooltip") return r.value; }), l = w(() => i.value ? `${n.open}` : void 0); let c; const u = [ "onMouseenter", "onMouseleave", "onClick", "onKeydown", "onFocus", "onBlur", "onContextmenu" ]; return Ye(() => { oe(() => n.virtualRef, (f) => { f && (o.value = Zr(f)); }, { immediate: !0 }), oe(o, (f, g) => { c == null || c(), c = void 0, _a(f) && (u.forEach((v) => { var d; const h = n[v]; h && (f.addEventListener(v.slice(2).toLowerCase(), h), (d = g == null ? void 0 : g.removeEventListener) == null || d.call(g, v.slice(2).toLowerCase(), h)); }), c = oe([a, s, i, l], (v) => { [ "aria-controls", "aria-describedby", "aria-haspopup", "aria-expanded" ].forEach((d, h) => { Du(v[h]) ? f.removeAttribute(d) : f.setAttribute(d, v[h]); }); }, { immediate: !0 })), _a(g) && [ "aria-controls", "aria-describedby", "aria-haspopup", "aria-expanded" ].forEach((v) => g.removeAttribute(v)); }, { immediate: !0 }); }), bt(() => { if (c == null || c(), c = void 0, o.value && _a(o.value)) { const f = o.value; u.forEach((g) => { const v = n[g]; v && f.removeEventListener(g.slice(2).toLowerCase(), v); }), o.value = void 0; } }), t({ triggerRef: o }), (f, g) => f.virtualTriggering ? G("v-if", !0) : (C(), J(p(qR), mt({ key: 0 }, f.$attrs, { "aria-controls": p(a), "aria-describedby": p(s), "aria-expanded": p(l), "aria-haspopup": p(i) }), { default: P(() => [ ee(f.$slots, "default") ]), _: 3 }, 16, ["aria-controls", "aria-describedby", "aria-expanded", "aria-haspopup"])); } }); var GR = /* @__PURE__ */ Vt(WR, [["__file", "trigger.vue"]]); const Vl = "focus-trap.focus-after-trapped", zl = "focus-trap.focus-after-released", JR = "focus-trap.focusout-prevented", Wp = { cancelable: !0, bubbles: !1 }, ZR = { cancelable: !0, bubbles: !1 }, Gp = "focusAfterTrapped", Jp = "focusAfterReleased", YR = Symbol("elFocusTrap"), Qu = $(), el = $(0), ed = $(0); let Os = 0; const S0 = (e) => { const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, { acceptNode: (r) => { const o = r.tagName === "INPUT" && r.type === "hidden"; return r.disabled || r.hidden || o ? NodeFilter.FILTER_SKIP : r.tabIndex >= 0 || r === document.activeElement ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP; } }); for (; n.nextNode(); ) t.push(n.currentNode); return t; }, Zp = (e, t) => { for (const n of e) if (!XR(n, t)) return n; }, XR = (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; }, QR = (e) => { const t = S0(e), n = Zp(t, e), r = Zp(t.reverse(), e); return [n, r]; }, e8 = (e) => e instanceof HTMLInputElement && "select" in e, Fr = (e, t) => { if (e && e.focus) { const n = document.activeElement; e.focus({ preventScroll: !0 }), ed.value = window.performance.now(), e !== n && e8(e) && t && e.select(); } }; function Yp(e, t) { const n = [...e], r = e.indexOf(t); return r !== -1 && n.splice(r, 1), n; } const t8 = () => { let e = []; return { push: (t) => { const n = e[0]; n && t !== n && n.pause(), e = Yp(e, t), e.unshift(t); }, remove: (t) => { var n, r; e = Yp(e, t), (r = (n = e[0]) == null ? void 0 : n.resume) == null || r.call(n); } }; }, n8 = (e, t = !1) => { const n = document.activeElement; for (const r of e) if (Fr(r, t), document.activeElement !== n) return; }, Xp = t8(), r8 = () => el.value > ed.value, Is = () => { Qu.value = "pointer", el.value = window.performance.now(); }, Qp = () => { Qu.value = "keyboard", el.value = window.performance.now(); }, o8 = () => (Ye(() => { Os === 0 && (document.addEventListener("mousedown", Is), document.addEventListener("touchstart", Is), document.addEventListener("keydown", Qp)), Os++; }), bt(() => { Os--, Os <= 0 && (document.removeEventListener("mousedown", Is), document.removeEventListener("touchstart", Is), document.removeEventListener("keydown", Qp)); }), { focusReason: Qu, lastUserFocusTimestamp: el, lastAutomatedFocusTimestamp: ed }), As = (e) => new CustomEvent(JR, { ...ZR, detail: e }), a8 = K({ name: "ElFocusTrap", inheritAttrs: !1, props: { loop: Boolean, trapped: Boolean, focusTrapEl: Object, focusStartEl: { type: [Object, String], default: "first" } }, emits: [ Gp, Jp, "focusin", "focusout", "focusout-prevented", "release-requested" ], setup(e, { emit: t }) { const n = $(); let r, o; const { focusReason: a } = o8(); yR((d) => { e.trapped && !s.paused && t("release-requested", d); }); const s = { paused: !1, pause() { this.paused = !0; }, resume() { this.paused = !1; } }, i = (d) => { if (!e.loop && !e.trapped || s.paused) return; const { key: h, altKey: m, ctrlKey: y, metaKey: x, currentTarget: A, shiftKey: k } = d, { loop: E } = e, T = h === pi.tab && !m && !y && !x, I = document.activeElement; if (T && I) { const R = A, [D, W] = QR(R); if (D && W) { if (!k && I === W) { const z = As({ focusReason: a.value }); t("focusout-prevented", z), z.defaultPrevented || (d.preventDefault(), E && Fr(D, !0)); } else if (k && [D, R].includes(I)) { const z = As({ focusReason: a.value }); t("focusout-prevented", z), z.defaultPrevented || (d.preventDefault(), E && Fr(W, !0)); } } else if (I === R) { const z = As({ focusReason: a.value }); t("focusout-prevented", z), z.defaultPrevented || d.preventDefault(); } } }; qe(YR, { focusTrapRef: n, onKeydown: i }), oe(() => e.focusTrapEl, (d) => { d && (n.value = d); }, { immediate: !0 }), oe([n], ([d], [h]) => { d && (d.addEventListener("keydown", i), d.addEventListener("focusin", u), d.addEventListener("focusout", f)), h && (h.removeEventListener("keydown", i), h.removeEventListener("focusin", u), h.removeEventListener("focusout", f)); }); const l = (d) => { t(Gp, d); }, c = (d) => t(Jp, d), u = (d) => { const h = p(n); if (!h) return; const m = d.target, y = d.relatedTarget, x = m && h.contains(m); e.trapped || y && h.contains(y) || (r = y), x && t("focusin", d), !s.paused && e.trapped && (x ? o = m : Fr(o, !0)); }, f = (d) => { const h = p(n); if (!(s.paused || !h)) if (e.trapped) { const m = d.relatedTarget; !Du(m) && !h.contains(m) && setTimeout(() => { if (!s.paused && e.trapped) { const y = As({ focusReason: a.value }); t("focusout-prevented", y), y.defaultPrevented || Fr(o, !0); } }, 0); } else { const m = d.target; m && h.contains(m) || t("focusout", d); } }; async function g() { await Re(); const d = p(n); if (d) { Xp.push(s); const h = d.contains(document.activeElement) ? r : document.activeElement; if (r = h, !d.contains(h)) { const m = new Event(Vl, Wp); d.addEventListener(Vl, l), d.dispatchEvent(m), m.defaultPrevented || Re(() => { let y = e.focusStartEl; Qo(y) || (Fr(y), document.activeElement !== y && (y = "first")), y === "first" && n8(S0(d), !0), (document.activeElement === h || y === "container") && Fr(d); }); } } } function v() { const d = p(n); if (d) { d.removeEventListener(Vl, l); const h = new CustomEvent(zl, { ...Wp, detail: { focusReason: a.value } }); d.addEventListener(zl, c), d.dispatchEvent(h), !h.defaultPrevented && (a.value == "keyboard" || !r8() || d.contains(document.activeElement)) && Fr(r ?? document.body), d.removeEventListener(zl, c), Xp.remove(s); } } return Ye(() => { e.trapped && g(), oe(() => e.trapped, (d) => { d ? g() : v(); }); }), bt(() => { e.trapped && v(), n.value && (n.value.removeEventListener("keydown", i), n.value.removeEventListener("focusin", u), n.value.removeEventListener("focusout", f), n.value = void 0); }), { onKeydown: i }; } }); function s8(e, t, n, r, o, a) { return ee(e.$slots, "default", { handleKeydown: e.onKeydown }); } var i8 = /* @__PURE__ */ Vt(a8, [["render", s8], ["__file", "focus-trap.vue"]]); const l8 = ["fixed", "absolute"], c8 = xt({ boundariesPadding: { type: Number, default: 0 }, fallbackPlacements: { type: De(Array), default: void 0 }, gpuAcceleration: { type: Boolean, default: !0 }, offset: { type: Number, default: 12 }, placement: { type: String, values: zu, default: "bottom" }, popperOptions: { type: De(Object), default: () => ({}) }, strategy: { type: String, values: l8, default: "absolute" } }), k0 = xt({ ...c8, id: String, style: { type: De([String, Array, Object]) }, className: { type: De([String, Array, Object]) }, effect: { type: De(String), default: "dark" }, visible: Boolean, enterable: { type: Boolean, default: !0 }, pure: Boolean, focusOnShow: { type: Boolean, default: !1 }, trapping: { type: Boolean, default: !1 }, popperClass: { type: De([String, Array, Object]) }, popperStyle: { type: De([String, Array, Object]) }, referenceEl: { type: De(Object) }, triggerTargetEl: { type: De(Object) }, stopPopperMouseEvent: { type: Boolean, default: !0 }, virtualTriggering: Boolean, zIndex: Number, ...h0(["ariaLabel"]) }), u8 = { mouseenter: (e) => e instanceof MouseEvent, mouseleave: (e) => e instanceof MouseEvent, focus: () => !0, blur: () => !0, close: () => !0 }, d8 = (e, t = []) => { const { placement: n, strategy: r, popperOptions: o } = e, a = { placement: n, strategy: r, ...o, modifiers: [...p8(e), ...t] }; return h8(a, o == null ? void 0 : o.modifiers), a; }, f8 = (e) => { if (gn) return Zr(e); }; function p8(e) { const { offset: t, gpuAcceleration: n, fallbackPlacements: r } = 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: r } }, { name: "computeStyles", options: { gpuAcceleration: n } } ]; } function h8(e, t) { t && (e.modifiers = [...e.modifiers, ...t ?? []]); } const v8 = 0, g8 = (e) => { const { popperInstanceRef: t, contentRef: n, triggerRef: r, role: o } = ce(Xu, void 0), a = $(), s = $(), i = w(() => ({ name: "eventListeners", enabled: !!e.visible })), l = w(() => { var y; const x = p(a), A = (y = p(s)) != null ? y : v8; return { name: "arrow", enabled: !VP(x), options: { element: x, padding: A } }; }), c = w(() => ({ onFirstUpdate: () => { d(); }, ...d8(e, [ p(l), p(i) ]) })), u = w(() => f8(e.referenceEl) || p(r)), { attributes: f, state: g, styles: v, update: d, forceUpdate: h, instanceRef: m } = hR(u, n, c); return oe(m, (y) => t.value = y), Ye(() => { oe(() => { var y; return (y = p(u)) == null ? void 0 : y.getBoundingClientRect(); }, () => { d(); }); }), { attributes: f, arrowRef: a, contentRef: n, instanceRef: m, state: g, styles: v, role: o, forceUpdate: h, update: d }; }, m8 = (e, { attributes: t, styles: n, role: r }) => { const { nextZIndex: o } = f0(), a = Ln("popper"), s = w(() => p(t).popper), i = $(Ma(e.zIndex) ? e.zIndex : o()), l = w(() => [ a.b(), a.is("pure", e.pure), a.is(e.effect), e.popperClass ]), c = w(() => [ { zIndex: p(i) }, p(n).popper, e.popperStyle || {} ]), u = w(() => r.value === "dialog" ? "false" : void 0), f = w(() => p(n).arrow || {}); return { ariaModal: u, arrowStyle: f, contentAttrs: s, contentClass: l, contentStyle: c, contentZIndex: i, updateZIndex: () => { i.value = Ma(e.zIndex) ? e.zIndex : o(); } }; }, y8 = (e, t) => { const n = $(!1), r = $(); return { focusStartRef: r, trapped: n, onFocusAfterReleased: (o) => { var a; ((a = o.detail) == null ? void 0 : a.focusReason) !== "pointer" && (r.value = "first", t("blur")); }, onFocusAfterTrapped: () => { t("focus"); }, onFocusInTrap: (o) => { e.visible && !n.value && (o.target && (r.value = o.target), n.value = !0); }, onFocusoutPrevented: (o) => { e.trapping || (o.detail.focusReason === "pointer" && o.preventDefault(), n.value = !1); }, onReleaseRequested: () => { n.value = !1, t("close"); } }; }, b8 = K({ name: "ElPopperContent" }), w8 = /* @__PURE__ */ K({ ...b8, props: k0, emits: u8, setup(e, { expose: t, emit: n }) { const r = e, { focusStartRef: o, trapped: a, onFocusAfterReleased: s, onFocusAfterTrapped: i, onFocusInTrap: l, onFocusoutPrevented: c, onReleaseRequested: u } = y8(r, n), { attributes: f, arrowRef: g, contentRef: v, styles: d, instanceRef: h, role: m, update: y } = g8(r), { ariaModal: x, arrowStyle: A, contentAttrs: k, contentClass: E, contentStyle: T, updateZIndex: I } = m8(r, { styles: d, attributes: f, role: m }), R = ce(gi, void 0), D = $(); qe(m0, { arrowStyle: A, arrowRef: g, arrowOffset: D }), R && qe(gi, { ...R, addInputId: ci, removeInputId: ci }); let W; const z = (X = !0) => { y(), X && I(); }, U = () => { z(!1), r.visible && r.focusOnShow ? a.value = !0 : r.visible === !1 && (a.value = !1); }; return Ye(() => { oe(() => r.triggerTargetEl, (X, de) => { W == null || W(), W = void 0; const re = p(X || v.value), L = p(de || v.value); _a(re) && (W = oe([m, () => r.ariaLabel, x, () => r.id], (Z) => { ["role", "aria-label", "aria-modal", "id"].forEach((ve, me) => { Du(Z[me]) ? re.removeAttribute(ve) : re.setAttribute(ve, Z[me]); }); }, { immediate: !0 })), L !== re && _a(L) && ["role", "aria-label", "aria-modal", "id"].forEach((Z) => { L.removeAttribute(Z); }); }, { immediate: !0 }), oe(() => r.visible, U, { immediate: !0 }); }), bt(() => { W == null || W(), W = void 0; }), t({ popperContentRef: v, popperInstanceRef: h, updatePopper: z, contentStyle: T }), (X, de) => (C(), F("div", mt({ ref_key: "contentRef", ref: v }, p(k), { style: p(T), class: p(E), tabindex: "-1", onMouseenter: (re) => X.$emit("mouseenter", re), onMouseleave: (re) => X.$emit("mouseleave", re) }), [ V(p(i8), { trapped: p(a), "trap-on-focus-in": !0, "focus-trap-el": p(v), "focus-start-el": p(o), onFocusAfterTrapped: p(i), onFocusAfterReleased: p(s), onFocusin: p(l), onFocusoutPrevented: p(c), onReleaseRequested: p(u) }, { default: P(() => [ ee(X.$slots, "default") ]), _: 3 }, 8, ["trapped", "focus-trap-el", "focus-start-el", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusin", "onFocusoutPrevented", "onReleaseRequested"]) ], 16, ["onMouseenter", "onMouseleave"])); } }); var C8 = /* @__PURE__ */ Vt(w8, [["__file", "content.vue"]]); const S8 = bo(VR), td = Symbol("elTooltip"), _n = xt({ ...CR, ...k0, appendTo: { type: De([String, Object]) }, content: { type: String, default: "" }, rawContent: Boolean, persistent: Boolean, visible: { type: De(Boolean), default: null }, transition: String, teleported: { type: Boolean, default: !0 }, disabled: Boolean, ...h0(["ariaLabel"]) }), za = xt({ ...C0, disabled: Boolean, trigger: { type: De([String, Array]), default: "hover" }, triggerKeys: { type: De(Array), default: () => [pi.enter, pi.space] } }), { useModelToggleProps: k8, useModelToggleEmits: _8, useModelToggle: E8 } = d$("visible"), x8 = xt({ ...y0, ...k8, ..._n, ...za, ...b0, showArrow: { type: Boolean, default: !0 } }), T8 = [ ..._8, "before-show", "before-hide", "show", "hide", "open", "close" ], O8 = (e, t) => WA(e) ? e.includes(t) : e === t, To = (e, t, n) => (r) => { O8(p(e), t) && n(r); }, I8 = K({ name: "ElTooltipTrigger" }), A8 = /* @__PURE__ */ K({ ...I8, props: za, setup(e, { expose: t }) { const n = e, r = Ln("tooltip"), { controlled: o, id: a, open: s, onOpen: i, onClose: l, onToggle: c } = ce(td, void 0), u = $(null), f = () => { if (p(o) || n.disabled) return !0; }, g = ct(n, "trigger"), v = fr(f, To(g, "hover", i)), d = fr(f, To(g, "hover", l)), h = fr(f, To(g, "click", (k) => { k.button === 0 && c(k); })), m = fr(f, To(g, "focus", i)), y = fr(f, To(g, "focus", l)), x = fr(f, To(g, "contextmenu", (k) => { k.preventDefault(), c(k); })), A = fr(f, (k) => { const { code: E } = k; n.triggerKeys.includes(E) && (k.preventDefault(), c(k)); }); return t({ triggerRef: u }), (k, E) => (C(), J(p(GR), { id: p(a), "virtual-ref": k.virtualRef, open: p(s), "virtual-triggering": k.virtualTriggering, class: N(p(r).e("trigger")), onBlur: p(y), onClick: p(h), onContextmenu: p(x), onFocus: p(m), onMouseenter: p(v), onMouseleave: p(d), onKeydown: p(A) }, { default: P(() => [ ee(k.$slots, "default") ]), _: 3 }, 8, ["id", "virtual-ref", "open", "virtual-triggering", "class", "onBlur", "onClick", "onContextmenu", "onFocus", "onMouseenter", "onMouseleave", "onKeydown"])); } }); var F8 = /* @__PURE__ */ Vt(A8, [["__file", "trigger.vue"]]); const P8 = xt({ to: { type: De([String, Object]), required: !0 }, disabled: Boolean }), $8 = /* @__PURE__ */ K({ __name: "teleport", props: P8, setup(e) { return (t, n) => t.disabled ? ee(t.$slots, "default", { key: 0 }) : (C(), J(Dh, { key: 1, to: t.to }, [ ee(t.$slots, "default") ], 8, ["to"])); } }); var R8 = /* @__PURE__ */ Vt($8, [["__file", "teleport.vue"]]); const N8 = bo(R8), L8 = K({ name: "ElTooltipContent", inheritAttrs: !1 }), B8 = /* @__PURE__ */ K({ ...L8, props: _n, setup(e, { expose: t }) { const n = e, { selector: r } = l0(), o = Ln("tooltip"), a = $(null); let s; const { controlled: i, id: l, open: c, trigger: u, onClose: f, onOpen: g, onShow: v, onHide: d, onBeforeShow: h, onBeforeHide: m } = ce(td, void 0), y = w(() => n.transition || `${o.namespace.value}-fade-in-linear`), x = w(() => process.env.NODE_ENV === "test" ? !0 : n.persistent); bt(() => { s == null || s(); }); const A = w(() => p(x) ? !0 : p(c)), k = w(() => n.disabled ? !1 : p(c)), E = w(() => n.appendTo || r.value), T = w(() => { var L; return (L = n.style) != null ? L : {}; }), I = $(!0), R = () => { d(), I.value = !0; }, D = () => { if (p(i)) return !0; }, W = fr(D, () => { n.enterable && p(u) === "hover" && g(); }), z = fr(D, () => { p(u) === "hover" && f(); }), U = () => { var L, Z; (Z = (L = a.value) == null ? void 0 : L.updatePopper) == null || Z.call(L), h == null || h(); }, X = () => { m == null || m(); }, de = () => { v(), s = jA(w(() => { var L; return (L = a.value) == null ? void 0 : L.popperContentRef; }), () => { p(i) || p(u) !== "hover" && f(); }); }, re = () => { n.virtualTriggering || f(); }; return oe(() => p(c), (L) => { L ? I.value = !1 : s == null || s(); }, { flush: "post" }), oe(() => n.content, () => { var L, Z; (Z = (L = a.value) == null ? void 0 : L.updatePopper) == null || Z.call(L); }), t({ contentRef: a }), (L, Z) => (C(), J(p(N8), { disabled: !L.teleported, to: p(E) }, { default: P(() => [ V(ir, { name: p(y), onAfterLeave: R, onBeforeEnter: U, onAfterEnter: de, onBeforeLeave: X }, { default: P(() => [ p(A) ? xe((C(), J(p(C8), mt({ key: 0, id: p(l), ref_key: "contentRef", ref: a }, L.$attrs, { "aria-label": L.ariaLabel, "aria-hidden": I.value, "boundaries-padding": L.boundariesPadding, "fallback-placements": L.fallbackPlacements, "gpu-acceleration": L.gpuAcceleration, offset: L.offset, placement: L.placement, "popper-options": L.popperOptions, strategy: L.strategy, effect: L.effect, enterable: L.enterable, pure: L.pure, "popper-class": L.popperClass, "popper-style": [L.popperStyle, p(T)], "reference-el": L.referenceEl, "trigger-target-el": L.triggerTargetEl, visible: p(k), "z-index": L.zIndex, onMouseenter: p(W), onMouseleave: p(z), onBlur: re, onClose: p(f) }), { default: P(() => [ ee(L.$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"])), [ [ht, p(k)] ]) : G("v-if", !0) ]), _: 3 }, 8, ["name"]) ]), _: 3 }, 8, ["disabled", "to"])); } }); var D8 = /* @__PURE__ */ Vt(B8, [["__file", "content.vue"]]); const M8 = K({ name: "ElTooltip" }), j8 = /* @__PURE__ */ K({ ...M8, props: x8, emits: T8, setup(e, { expose: t, emit: n }) { const r = e; wR(); const o = mR(), a = $(), s = $(), i = () => { var y; const x = p(a); x && ((y = x.popperInstanceRef) == null || y.update()); }, l = $(!1), c = $(), { show: u, hide: f, hasUpdateHandler: g } = E8({ indicator: l, toggleReason: c }), { onOpen: v, onClose: d } = SR({ showAfter: ct(r, "showAfter"), hideAfter: ct(r, "hideAfter"), autoClose: ct(r, "autoClose"), open: u, close: f }), h = w(() => Mu(r.visible) && !g.value); qe(td, { controlled: h, id: o, open: wi(l), trigger: ct(r, "trigger"), onOpen: (y) => { v(y); }, onClose: (y) => { d(y); }, onToggle: (y) => { p(l) ? d(y) : v(y); }, onShow: () => { n("show", c.value); }, onHide: () => { n("hide", c.value); }, onBeforeShow: () => { n("before-show", c.value); }, onBeforeHide: () => { n("before-hide", c.value); }, updatePopper: i }), oe(() => r.disabled, (y) => { y && l.value && (l.value = !1); }); const m = (y) => { var x, A; const k = (A = (x = s.value) == null ? void 0 : x.contentRef) == null ? void 0 : A.popperContentRef, E = (y == null ? void 0 : y.relatedTarget) || document.activeElement; return k && k.contains(E); }; return Mh(() => l.value && f()), t({ popperRef: a, contentRef: s, isFocusInsideContent: m, updatePopper: i, onOpen: v, onClose: d, hide: f }), (y, x) => (C(), J(p(S8), { ref_key: "popperRef", ref: a, role: y.role }, { default: P(() => [ V(F8, { disabled: y.disabled, trigger: y.trigger, "trigger-keys": y.triggerKeys, "virtual-ref": y.virtualRef, "virtual-triggering": y.virtualTriggering }, { default: P(() => [ y.$slots.default ? ee(y.$slots, "default", { key: 0 }) : G("v-if", !0) ]), _: 3 }, 8, ["disabled", "trigger", "trigger-keys", "virtual-ref", "virtual-triggering"]), V(D8, { ref_key: "contentRef", ref: s, "aria-label": y.ariaLabel, "boundaries-padding": y.boundariesPadding, content: y.content, disabled: y.disabled, effect: y.effect, enterable: y.enterable, "fallback-placements": y.fallbackPlacements, "hide-after": y.hideAfter, "gpu-acceleration": y.gpuAcceleration, offset: y.offset, persistent: y.persistent, "popper-class": y.popperClass, "popper-style": y.popperStyle, placement: y.placement, "popper-options": y.popperOptions, pure: y.pure, "raw-content": y.rawContent, "reference-el": y.referenceEl, "trigger-target-el": y.triggerTargetEl, "show-after": y.showAfter, strategy: y.strategy, teleported: y.teleported, transition: y.transition, "virtual-triggering": y.virtualTriggering, "z-index": y.zIndex, "append-to": y.appendTo }, { default: P(() => [ ee(y.$slots, "content", {}, () => [ y.rawContent ? (C(), F("span", { key: 0, innerHTML: y.content }, null, 8, ["innerHTML"])) : (C(), F("span", { key: 1 }, se(y.content), 1)) ]), y.showArrow ? (C(), J(p(UR), { key: 0, "arrow-offset": y.arrowOffset }, null, 8, ["arrow-offset"])) : G("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 V8 = /* @__PURE__ */ Vt(j8, [["__file", "tooltip.vue"]]); const z8 = bo(V8), _0 = Symbol("buttonGroupContextKey"), H8 = (e, t) => { n$({ from: "type.text", replacement: "link", version: "3.0.0", scope: "props", ref: "https://element-plus.org/en-US/component/button.html#button-attributes" }, w(() => e.type === "text")); const n = ce(_0, void 0), r = Zu("button"), { form: o } = BR(), a = LR(w(() => n == null ? void 0 : n.size)), s = g0(), i = $(), l = ho(), c = w(() => e.type || (n == null ? void 0 : n.type) || ""), u = w(() => { var v, d, h; return (h = (d = e.autoInsertSpace) != null ? d : (v = r.value) == null ? void 0 : v.autoInsertSpace) != null ? h : !1; }), f = w(() => e.tag === "button" ? { ariaDisabled: s.value || e.loading, disabled: s.value || e.loading, autofocus: e.autofocus, type: e.nativeType } : {}), g = w(() => { var v; const d = (v = l.default) == null ? void 0 : v.call(l); if (u.value && (d == null ? void 0 : d.length) === 1) { const h = d[0]; if ((h == null ? void 0 : h.type) === Ci) { const m = h.children; return new RegExp("^\\p{Unified_Ideograph}{2}$", "u").test(m.trim()); } } return !1; }); return { _disabled: s, _size: a, _type: c, _ref: i, _props: f, shouldAddSpace: g, handleClick: (v) => { if (s.value || e.loading) { v.stopPropagation(); return; } e.nativeType === "reset" && (o == null || o.resetFields()), t("click", v); } }; }, U8 = [ "default", "primary", "success", "warning", "info", "danger", "text", "" ], q8 = ["button", "submit", "reset"], Cc = xt({ size: ER, disabled: Boolean, type: { type: String, values: U8, default: "" }, icon: { type: yc }, nativeType: { type: String, values: q8, default: "button" }, loading: Boolean, loadingIcon: { type: yc, default: () => YP }, 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: De([String, Object]), default: "button" } }), K8 = { click: (e) => e instanceof MouseEvent }; function $t(e, t) { W8(e) && (e = "100%"); var n = G8(e); return e = t === 360 ? e : Math.min(t, Math.max(0, parseFloat(e))), n && (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 Fs(e) { return Math.min(1, Math.max(0, e)); } function W8(e) { return typeof e == "string" && e.indexOf(".") !== -1 && parseFloat(e) === 1; } function G8(e) { return typeof e == "string" && e.indexOf("%") !== -1; } function E0(e) { return e = parseFloat(e), (isNaN(e) || e < 0 || e > 1) && (e = 1), e; } function Ps(e) { return e <= 1 ? "".concat(Number(e) * 100, "%") : e; } function Yr(e) { return e.length === 1 ? "0" + e : String(e); } function J8(e, t, n) { return { r: $t(e, 255) * 255, g: $t(t, 255) * 255, b: $t(n, 255) * 255 }; } function eh(e, t, n) { e = $t(e, 255), t = $t(t, 255), n = $t(n, 255); var r = Math.max(e, t, n), o = Math.min(e, t, n), a = 0, s = 0, i = (r + o) / 2; if (r === o) s = 0, a = 0; else { var l = r - o; switch (s = i > 0.5 ? l / (2 - r - o) : l / (r + o), r) { case e: a = (t - n) / l + (t < n ? 6 : 0); break; case t: a = (n - e) / l + 2; break; case n: a = (e - t) / l + 4; break; } a /= 6; } return { h: a, s, l: i }; } function Hl(e, t, n) { return n < 0 && (n += 1), n > 1 && (n -= 1), n < 1 / 6 ? e + (t - e) * (6 * n) : n < 1 / 2 ? t : n < 2 / 3 ? e + (t - e) * (2 / 3 - n) * 6 : e; } function Z8(e, t, n) { var r, o, a; if (e = $t(e, 360), t = $t(t, 100), n = $t(n, 100), t === 0) o = n, a = n, r = n; else { var s = n < 0.5 ? n * (1 + t) : n + t - n * t, i = 2 * n - s; r = Hl(i, s, e + 1 / 3), o = Hl(i, s, e), a = Hl(i, s, e - 1 / 3); } return { r: r * 255, g: o * 255, b: a * 255 }; } function th(e, t, n) { e = $t(e, 255), t = $t(t, 255), n = $t(n, 255); var r = Math.max(e, t, n), o = Math.min(e, t, n), a = 0, s = r, i = r - o, l = r === 0 ? 0 : i / r; if (r === o) a = 0; else { switch (r) { case e: a = (t - n) / i + (t < n ? 6 : 0); break; case t: a = (n - e) / i + 2; break; case n: a = (e - t) / i + 4; break; } a /= 6; } return { h: a, s: l, v: s }; } function Y8(e, t, n) { e = $t(e, 360) * 6, t = $t(t, 100), n = $t(n, 100); var r = Math.floor(e), o = e - r, a = n * (1 - t), s = n * (1 - o * t), i = n * (1 - (1 - o) * t), l = r % 6, c = [n, s, a, a, i, n][l], u = [i, n, n, s, a, a][l], f = [a, a, i, n, n, s][l]; return { r: c * 255, g: u * 255, b: f * 255 }; } function nh(e, t, n, r) { var o = [ Yr(Math.round(e).toString(16)), Yr(Math.round(t).toString(16)), Yr(Math.round(n).toString(16)) ]; return r && o[0].startsWith(o[0].charAt(1)) && o[1].startsWith(o[1].charAt(1)) && o[2].startsWith(o[2].charAt(1)) ? o[0].charAt(0) + o[1].charAt(0) + o[2].charAt(0) : o.join(""); } function X8(e, t, n, r, o) { var a = [ Yr(Math.round(e).toString(16)), Yr(Math.round(t).toString(16)), Yr(Math.round(n).toString(16)), Yr(Q8(r)) ]; return o && 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 Q8(e) { return Math.round(parseFloat(e) * 255).toString(16); } function rh(e) { return hn(e) / 255; } function hn(e) { return parseInt(e, 16); } function e4(e) { return { r: e >> 16, g: (e & 65280) >> 8, b: e & 255 }; } var Sc = { 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 t4(e) { var t = { r: 0, g: 0, b: 0 }, n = 1, r = null, o = null, a = null, s = !1, i = !1; return typeof e == "string" && (e = o4(e)), typeof e == "object" && (dr(e.r) && dr(e.g) && dr(e.b) ? (t = J8(e.r, e.g, e.b), s = !0, i = String(e.r).substr(-1) === "%" ? "prgb" : "rgb") : dr(e.h) && dr(e.s) && dr(e.v) ? (r = Ps(e.s), o = Ps(e.v), t = Y8(e.h, r, o), s = !0, i = "hsv") : dr(e.h) && dr(e.s) && dr(e.l) && (r = Ps(e.s), a = Ps(e.l), t = Z8(e.h, r, a), s = !0, i = "hsl"), Object.prototype.hasOwnProperty.call(e, "a") && (n = e.a)), n = E0(n), { ok: s, format: e.format || i, 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: n }; } var n4 = "[-\\+]?\\d+%?", r4 = "[-\\+]?\\d*\\.\\d+%?", $r = "(?:".concat(r4, ")|(?:").concat(n4, ")"), Ul = "[\\s|\\(]+(".concat($r, ")[,|\\s]+(").concat($r, ")[,|\\s]+(").concat($r, ")\\s*\\)?"), ql = "[\\s|\\(]+(".concat($r, ")[,|\\s]+(").concat($r, ")[,|\\s]+(").concat($r, ")[,|\\s]+(").concat($r, ")\\s*\\)?"), Mn = { CSS_UNIT: new RegExp($r), rgb: new RegExp("rgb" + Ul), rgba: new RegExp("rgba" + ql), hsl: new RegExp("hsl" + Ul), hsla: new RegExp("hsla" + ql), hsv: new RegExp("hsv" + Ul), hsva: new RegExp("hsva" + ql), 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 o4(e) { if (e = e.trim().toLowerCase(), e.length === 0) return !1; var t = !1; if (Sc[e]) e = Sc[e], t = !0; else if (e === "transparent") return { r: 0, g: 0, b: 0, a: 0, format: "name" }; var n = Mn.rgb.exec(e); return n ? { r: n[1], g: n[2], b: n[3] } : (n = Mn.rgba.exec(e), n ? { r: n[1], g: n[2], b: n[3], a: n[4] } : (n = Mn.hsl.exec(e), n ? { h: n[1], s: n[2], l: n[3] } : (n = Mn.hsla.exec(e), n ? { h: n[1], s: n[2], l: n[3], a: n[4] } : (n = Mn.hsv.exec(e), n ? { h: n[1], s: n[2], v: n[3] } : (n = Mn.hsva.exec(e), n ? { h: n[1], s: n[2], v: n[3], a: n[4] } : (n = Mn.hex8.exec(e), n ? { r: hn(n[1]), g: hn(n[2]), b: hn(n[3]), a: rh(n[4]), format: t ? "name" : "hex8" } : (n = Mn.hex6.exec(e), n ? { r: hn(n[1]), g: hn(n[2]), b: hn(n[3]), format: t ? "name" : "hex" } : (n = Mn.hex4.exec(e), n ? { r: hn(n[1] + n[1]), g: hn(n[2] + n[2]), b: hn(n[3] + n[3]), a: rh(n[4] + n[4]), format: t ? "name" : "hex8" } : (n = Mn.hex3.exec(e), n ? { r: hn(n[1] + n[1]), g: hn(n[2] + n[2]), b: hn(n[3] + n[3]), format: t ? "name" : "hex" } : !1))))))))); } function dr(e) { return !!Mn.CSS_UNIT.exec(String(e)); } var a4 = ( /** @class */ function() { function e(t, n) { t === void 0 && (t = ""), n === void 0 && (n = {}); var r; if (t instanceof e) return t; typeof t == "number" && (t = e4(t)), this.originalInput = t; var o = t4(t); this.originalInput = t, this.r = o.r, this.g = o.g, this.b = o.b, this.a = o.a, this.roundA = Math.round(100 * this.a) / 100, this.format = (r = n.format) !== null && r !== void 0 ? r : o.format, this.gradientType = n.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 = o.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(), n, r, o, a = t.r / 255, s = t.g / 255, i = t.b / 255; return a <= 0.03928 ? n = a / 12.92 : n = Math.pow((a + 0.055) / 1.055, 2.4), s <= 0.03928 ? r = s / 12.92 : r = Math.pow((s + 0.055) / 1.055, 2.4), i <= 0.03928 ? o = i / 12.92 : o = Math.pow((i + 0.055) / 1.055, 2.4), 0.2126 * n + 0.7152 * r + 0.0722 * o; }, e.prototype.getAlpha = function() { return this.a; }, e.prototype.setAlpha = function(t) { return this.a = E0(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 = th(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 = th(this.r, this.g, this.b), n = Math.round(t.h * 360), r = Math.round(t.s * 100), o = Math.round(t.v * 100); return this.a === 1 ? "hsv(".concat(n, ", ").concat(r, "%, ").concat(o, "%)") : "hsva(".concat(n, ", ").concat(r, "%, ").concat(o, "%, ").concat(this.roundA, ")"); }, e.prototype.toHsl = function() { var t = eh(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 = eh(this.r, this.g, this.b), n = Math.round(t.h * 360), r = Math.round(t.s * 100), o = Math.round(t.l * 100); return this.a === 1 ? "hsl(".concat(n, ", ").concat(r, "%, ").concat(o, "%)") : "hsla(".concat(n, ", ").concat(r, "%, ").concat(o, "%, ").concat(this.roundA, ")"); }, e.prototype.toHex = function(t) { return t === void 0 && (t = !1), nh(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), X8(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), n = Math.round(this.g), r = Math.round(this.b); return this.a === 1 ? "rgb(".concat(t, ", ").concat(n, ", ").concat(r, ")") : "rgba(".concat(t, ", ").concat(n, ", ").concat(r, ", ").concat(this.roundA, ")"); }, e.prototype.toPercentageRgb = function() { var t = function(n) { return "".concat(Math.round($t(n, 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(n) { return Math.round($t(n, 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 = "#" + nh(this.r, this.g, this.b, !1), n = 0, r = Object.entries(Sc); n < r.length; n++) { var o = r[n], a = o[0], s = o[1]; if (t === s) return a; } return !1; }, e.prototype.toString = function(t) { var n = !!t; t = t ?? this.format; var r = !1, o = this.a < 1 && this.a >= 0, a = !n && o && (t.startsWith("hex") || t === "name"); return a ? t === "name" && this.a === 0 ? this.toName() : this.toRgbString() : (t === "rgb" && (r = this.toRgbString()), t === "prgb" && (r = this.toPercentageRgbString()), (t === "hex" || t === "hex6") && (r = this.toHexString()), t === "hex3" && (r = this.toHexString(!0)), t === "hex4" && (r = this.toHex8String(!0)), t === "hex8" && (r = this.toHex8String()), t === "name" && (r = this.toName()), t === "hsl" && (r = this.toHslString()), t === "hsv" && (r = this.toHsvString()), r || 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 n = this.toHsl(); return n.l += t / 100, n.l = Fs(n.l), new e(n); }, e.prototype.brighten = function(t) { t === void 0 && (t = 10); var n = this.toRgb(); return n.r = Math.max(0, Math.min(255, n.r - Math.round(255 * -(t / 100)))), n.g = Math.max(0, Math.min(255, n.g - Math.round(255 * -(t / 100)))), n.b = Math.max(0, Math.min(255, n.b - Math.round(255 * -(t / 100)))), new e(n); }, e.prototype.darken = function(t) { t === void 0 && (t = 10); var n = this.toHsl(); return n.l -= t / 100, n.l = Fs(n.l), new e(n); }, 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 n = this.toHsl(); return n.s -= t / 100, n.s = Fs(n.s), new e(n); }, e.prototype.saturate = function(t) { t === void 0 && (t = 10); var n = this.toHsl(); return n.s += t / 100, n.s = Fs(n.s), new e(n); }, e.prototype.greyscale = function() { return this.desaturate(100); }, e.prototype.spin = function(t) { var n = this.toHsl(), r = (n.h + t) % 360; return n.h = r < 0 ? 360 + r : r, new e(n); }, e.prototype.mix = function(t, n) { n === void 0 && (n = 50); var r = this.toRgb(), o = new e(t).toRgb(), a = n / 100, s = { r: (o.r - r.r) * a + r.r, g: (o.g - r.g) * a + r.g, b: (o.b - r.b) * a + r.b, a: (o.a - r.a) * a + r.a }; return new e(s); }, e.prototype.analogous = function(t, n) { t === void 0 && (t = 6), n === void 0 && (n = 30); var r = this.toHsl(), o = 360 / n, a = [this]; for (r.h = (r.h - (o * t >> 1) + 720) % 360; --t; ) r.h = (r.h + o) % 360, a.push(new e(r)); 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 n = this.toHsv(), r = n.h, o = n.s, a = n.v, s = [], i = 1 / t; t--; ) s.push(new e({ h: r, s: o, v: a })), a = (a + i) % 1; return s; }, e.prototype.splitcomplement = function() { var t = this.toHsl(), n = t.h; return [ this, new e({ h: (n + 72) % 360, s: t.s, l: t.l }), new e({ h: (n + 216) % 360, s: t.s, l: t.l }) ]; }, e.prototype.onBackground = function(t) { var n = this.toRgb(), r = new e(t).toRgb(), o = n.a + r.a * (1 - n.a); return new e({ r: (n.r * n.a + r.r * r.a * (1 - n.a)) / o, g: (n.g * n.a + r.g * r.a * (1 - n.a)) / o, b: (n.b * n.a + r.b * r.a * (1 - n.a)) / o, a: o }); }, e.prototype.triad = function() { return this.polyad(3); }, e.prototype.tetrad = function() { return this.polyad(4); }, e.prototype.polyad = function(t) { for (var n = this.toHsl(), r = n.h, o = [this], a = 360 / t, s = 1; s < t; s++) o.push(new e({ h: (r + s * a) % 360, s: n.s, l: n.l })); return o; }, e.prototype.equals = function(t) { return this.toRgbString() === new e(t).toRgbString(); }, e; }() ); function Or(e, t = 20) { return e.mix("#141414", t).toString(); } function s4(e) { const t = g0(), n = Ln("button"); return w(() => { let r = {}, o = e.color; if (o) { const a = o.match(/var\((.*?)\)/); a && (o = window.getComputedStyle(window.document.documentElement).getPropertyValue(a[1])); const s = new a4(o), i = e.dark ? s.tint(20).toString() : Or(s, 20); if (e.plain) r = n.cssVarBlock({ "bg-color": e.dark ? Or(s, 90) : s.tint(90).toString(), "text-color": o, "border-color": e.dark ? Or(s, 50) : s.tint(50).toString(), "hover-text-color": `var(${n.cssVarName("color-white")})`, "hover-bg-color": o, "hover-border-color": o, "active-bg-color": i, "active-text-color": `var(${n.cssVarName("color-white")})`, "active-border-color": i }), t.value && (r[n.cssVarBlockName("disabled-bg-color")] = e.dark ? Or(s, 90) : s.tint(90).toString(), r[n.cssVarBlockName("disabled-text-color")] = e.dark ? Or(s, 50) : s.tint(50).toString(), r[n.cssVarBlockName("disabled-border-color")] = e.dark ? Or(s, 80) : s.tint(80).toString()); else { const l = e.dark ? Or(s, 30) : s.tint(30).toString(), c = s.isDark() ? `var(${n.cssVarName("color-white")})` : `var(${n.cssVarName("color-black")})`; if (r = n.cssVarBlock({ "bg-color": o, "text-color": c, "border-color": o, "hover-bg-color": l, "hover-text-color": c, "hover-border-color": l, "active-bg-color": i, "active-border-color": i }), t.value) { const u = e.dark ? Or(s, 50) : s.tint(50).toString(); r[n.cssVarBlockName("disabled-bg-color")] = u, r[n.cssVarBlockName("disabled-text-color")] = e.dark ? "rgba(255, 255, 255, 0.5)" : `var(${n.cssVarName("color-white")})`, r[n.cssVarBlockName("disabled-border-color")] = u; } } } return r; }); } const i4 = K({ name: "ElButton" }), l4 = /* @__PURE__ */ K({ ...i4, props: Cc, emits: K8, setup(e, { expose: t, emit: n }) { const r = e, o = s4(r), a = Ln("button"), { _ref: s, _size: i, _type: l, _disabled: c, _props: u, shouldAddSpace: f, handleClick: g } = H8(r, n), v = w(() => [ a.b(), a.m(l.value), a.m(i.value), a.is("disabled", c.value), a.is("loading", r.loading), a.is("plain", r.plain), a.is("round", r.round), a.is("circle", r.circle), a.is("text", r.text), a.is("link", r.link), a.is("has-bg", r.bg) ]); return t({ ref: s, size: i, type: l, disabled: c, shouldAddSpace: f }), (d, h) => (C(), J(pt(d.tag), mt({ ref_key: "_ref", ref: s }, p(u), { class: p(v), style: p(o), onClick: p(g) }), { default: P(() => [ d.loading ? (C(), F(Ie, { key: 0 }, [ d.$slots.loading ? ee(d.$slots, "loading", { key: 0 }) : (C(), J(p(qp), { key: 1, class: N(p(a).is("loading")) }, { default: P(() => [ (C(), J(pt(d.loadingIcon))) ]), _: 1 }, 8, ["class"])) ], 64)) : d.icon || d.$slots.icon ? (C(), J(p(qp), { key: 1 }, { default: P(() => [ d.icon ? (C(), J(pt(d.icon), { key: 0 })) : ee(d.$slots, "icon", { key: 1 }) ]), _: 3 })) : G("v-if", !0), d.$slots.default ? (C(), F("span", { key: 2, class: N({ [p(a).em("text", "expand")]: p(f) }) }, [ ee(d.$slots, "default") ], 2)) : G("v-if", !0) ]), _: 3 }, 16, ["class", "style", "onClick"])); } }); var c4 = /* @__PURE__ */ Vt(l4, [["__file", "button.vue"]]); const u4 = { size: Cc.size, type: Cc.type }, d4 = K({ name: "ElButtonGroup" }), f4 = /* @__PURE__ */ K({ ...d4, props: u4, setup(e) { const t = e; qe(_0, mn({ size: ct(t, "size"), type: ct(t, "type") })); const n = Ln("button"); return (r, o) => (C(), F("div", { class: N(p(n).b("group")) }, [ ee(r.$slots, "default") ], 2)); } }); var x0 = /* @__PURE__ */ Vt(f4, [["__file", "button-group.vue"]]); const p4 = bo(c4, { ButtonGroup: x0 }); e$(x0); const h4 = xt({ header: { type: String, default: "" }, footer: { type: String, default: "" }, bodyStyle: { type: De([String, Object, Array]), default: "" }, bodyClass: String, shadow: { type: String, values: ["always", "hover", "never"], default: "always" } }), v4 = K({ name: "ElCard" }), g4 = /* @__PURE__ */ K({ ...v4, props: h4, setup(e) { const t = Ln("card"); return (n, r) => (C(), F("div", { class: N([p(t).b(), p(t).is(`${n.shadow}-shadow`)]) }, [ n.$slots.header || n.header ? (C(), F("div", { key: 0, class: N(p(t).e("header")) }, [ ee(n.$slots, "header", {}, () => [ Ce(se(n.header), 1) ]) ], 2)) : G("v-if", !0), M("div", { class: N([p(t).e("body"), n.bodyClass]), style: Ue(n.bodyStyle) }, [ ee(n.$slots, "default") ], 6), n.$slots.footer || n.footer ? (C(), F("div", { key: 1, class: N(p(t).e("footer")) }, [ ee(n.$slots, "footer", {}, () => [ Ce(se(n.footer), 1) ]) ], 2)) : G("v-if", !0) ], 2)); } }); var m4 = /* @__PURE__ */ Vt(g4, [["__file", "card.vue"]]); const y4 = bo(m4), b4 = /* @__PURE__ */ K({ inheritAttrs: !1 }); function w4(e, t, n, r, o, a) { return ee(e.$slots, "default"); } var C4 = /* @__PURE__ */ Vt(b4, [["render", w4], ["__file", "collection.vue"]]); const S4 = /* @__PURE__ */ K({ name: "ElCollectionItem", inheritAttrs: !1 }); function k4(e, t, n, r, o, a) { return ee(e.$slots, "default"); } var _4 = /* @__PURE__ */ Vt(S4, [["render", k4], ["__file", "collection-item.vue"]]); const E4 = "data-el-collection-item", x4 = (e) => { const t = `El${e}Collection`, n = `${t}Item`, r = Symbol(t), o = Symbol(n), a = { ...C4, name: t, setup() { const i = $(null), l = /* @__PURE__ */ new Map(); qe(r, { itemMap: l, getItems: () => { const c = p(i); if (!c) return []; const u = Array.from(c.querySelectorAll(`[${E4}]`)); return [...l.values()].sort((f, g) => u.indexOf(f.ref) - u.indexOf(g.ref)); }, collectionRef: i }); } }, s = { ..._4, name: n, setup(i, { attrs: l }) { const c = $(null), u = ce(r, void 0); qe(o, { collectionItemRef: c }), Ye(() => { const f = p(c); f && u.itemMap.set(f, { ref: f, ...l }); }), bt(() => { const f = p(c); u.itemMap.delete(f); }); } }; return { COLLECTION_INJECTION_KEY: r, COLLECTION_ITEM_INJECTION_KEY: o, ElCollection: a, ElCollectionItem: s }; }, Kl = xt({ trigger: za.trigger, effect: { ..._n.effect, default: "light" }, type: { type: De(String) }, placement: { type: De(String), default: "bottom" }, popperOptions: { type: De(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: De([Number, String]), default: 0 }, maxHeight: { type: De([Number, String]), default: "" }, popperClass: { type: String, default: "" }, disabled: Boolean, role: { type: String, default: "menu" }, buttonProps: { type: De(Object) }, teleported: _n.teleported }); xt({ command: { type: [Object, String, Number], default: () => ({}) }, disabled: Boolean, divided: Boolean, textValue: String, icon: { type: yc } }); xt({ onKeydown: { type: De(Function) } }); x4("Dropdown"); const T4 = xt({ trigger: za.trigger, placement: Kl.placement, disabled: za.disabled, visible: _n.visible, transition: _n.transition, popperOptions: Kl.popperOptions, tabindex: Kl.tabindex, content: _n.content, popperStyle: _n.popperStyle, popperClass: _n.popperClass, enterable: { ..._n.enterable, default: !0 }, effect: { ..._n.effect, default: "light" }, teleported: _n.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 } }), O4 = { "update:visible": (e) => Mu(e), "before-enter": () => !0, "before-leave": () => !0, "after-enter": () => !0, "after-leave": () => !0 }, I4 = "onUpdate:visible", A4 = K({ name: "ElPopover" }), F4 = /* @__PURE__ */ K({ ...A4, props: T4, emits: O4, setup(e, { expose: t, emit: n }) { const r = e, o = w(() => r[I4]), a = Ln("popover"), s = $(), i = w(() => { var m; return (m = p(s)) == null ? void 0 : m.popperRef; }), l = w(() => [ { width: qm(r.width) }, r.popperStyle ]), c = w(() => [a.b(), r.popperClass, { [a.m("plain")]: !!r.content }]), u = w(() => r.transition === `${a.namespace.value}-fade-in-linear`), f = () => { var m; (m = s.value) == null || m.hide(); }, g = () => { n("before-enter"); }, v = () => { n("before-leave"); }, d = () => { n("after-enter"); }, h = () => { n("update:visible", !1), n("after-leave"); }; return t({ popperRef: i, hide: f }), (m, y) => (C(), J(p(z8), mt({ ref_key: "tooltipRef", ref: s }, m.$attrs, { trigger: m.trigger, placement: m.placement, disabled: m.disabled, visible: m.visible, transition: m.transition, "popper-options": m.popperOptions, tabindex: m.tabindex, content: m.content, offset: m.offset, "show-after": m.showAfter, "hide-after": m.hideAfter, "auto-close": m.autoClose, "show-arrow": m.showArrow, "aria-label": m.title, effect: m.effect, enterable: m.enterable, "popper-class": p(c), "popper-style": p(l), teleported: m.teleported, persistent: m.persistent, "gpu-acceleration": p(u), "onUpdate:visible": p(o), onBeforeShow: g, onBeforeHide: v, onShow: d, onHide: h }), { content: P(() => [ m.title ? (C(), F("div", { key: 0, class: N(p(a).e("title")), role: "title" }, se(m.title), 3)) : G("v-if", !0), ee(m.$slots, "default", {}, () => [ Ce(se(m.content), 1) ]) ]), default: P(() => [ m.$slots.reference ? ee(m.$slots, "reference", { key: 0 }) : G("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 P4 = /* @__PURE__ */ Vt(F4, [["__file", "popover.vue"]]); const oh = (e, t) => { const n = t.arg || t.value, r = n == null ? void 0 : n.popperRef; r && (r.triggerRef = e); }; var $4 = { mounted(e, t) { oh(e, t); }, updated(e, t) { oh(e, t); } }; const R4 = "popover", N4 = QP($4, R4), L4 = bo(P4, { directive: N4 }); function B4(e) { let t; const n = $(!1), r = mn({ ...e, originalPosition: "", originalOverflow: "", visible: !1 }); function o(g) { r.text = g; } function a() { const g = r.parent, v = f.ns; if (!g.vLoadingAddClassList) { let d = g.getAttribute("loading-number"); d = Number.parseInt(d) - 1, d ? g.setAttribute("loading-number", d.toString()) : (fi(g, v.bm("parent", "relative")), g.removeAttribute("loading-number")), fi(g, v.bm("parent", "hidden")); } s(), u.unmount(); } function s() { var g, v; (v = (g = f.$el) == null ? void 0 : g.parentNode) == null || v.removeChild(f.$el); } function i() { var g; e.beforeClose && !e.beforeClose() || (n.value = !0, clearTimeout(t), t = setTimeout(l, 400), r.visible = !1, (g = e.closed) == null || g.call(e)); } function l() { if (!n.value) return; const g = r.parent; n.value = !1, g.vLoadingAddClassList = void 0, a(); } const c = K({ name: "ElLoading", setup(g, { expose: v }) { const { ns: d, zIndex: h } = IR("loading"); return v({ ns: d, zIndex: h }), () => { const m = r.spinner || r.svg, y = Ct("svg", { class: "circular", viewBox: r.svgViewBox ? r.svgViewBox : "0 0 50 50", ...m ? { innerHTML: m } : {} }, [ Ct("circle", { class: "path", cx: "25", cy: "25", r: "20", fill: "none" }) ]), x = r.text ? Ct("p", { class: d.b("text") }, [r.text]) : void 0; return Ct(ir, { name: d.b("fade"), onAfterLeave: l }, { default: P(() => [ xe(V("div", { style: { backgroundColor: r.background || "" }, class: [ d.b("mask"), r.customClass, r.fullscreen ? "is-fullscreen" : "" ] }, [ Ct("div", { class: d.b("spinner") }, [y, x]) ]), [[ht, r.visible]]) ]) }); }; } }), u = Hh(c), f = u.mount(document.createElement("div")); return { ...vo(r), setText: o, removeElLoadingChild: s, close: i, handleAfterLeave: l, vm: f, get $el() { return f.$el; } }; } let $s; const D4 = function(e = {}) { if (!gn) return; const t = M4(e); if (t.fullscreen && $s) return $s; const n = B4({ ...t, closed: () => { var o; (o = t.closed) == null || o.call(t), t.fullscreen && ($s = void 0); } }); j4(t, t.parent, n), ah(t, t.parent, n), t.parent.vLoadingAddClassList = () => ah(t, t.parent, n); let r = t.parent.getAttribute("loading-number"); return r ? r = `${Number.parseInt(r) + 1}` : r = "1", t.parent.setAttribute("loading-number", r), t.parent.appendChild(n.$el), Re(() => n.visible.value = t.visible), t.fullscreen && ($s = n), n; }, M4 = (e) => { var t, n, r, o; let a; return Qo(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 && ((n = e.fullscreen) != null ? n : !0), lock: (r = e.lock) != null ? r : !1, customClass: e.customClass || "", visible: (o = e.visible) != null ? o : !0, beforeClose: e.beforeClose, closed: e.closed, target: a }; }, j4 = async (e, t, n) => { const { nextZIndex: r } = n.vm.zIndex || n.vm._.exposed.zIndex, o = {}; if (e.fullscreen) n.originalPosition.value = ha(document.body, "position"), n.originalOverflow.value = ha(document.body, "overflow"), o.zIndex = r(); else if (e.parent === document.body) { n.originalPosition.value = ha(document.body, "position"), await Re(); for (const a of ["top", "left"]) { const s = a === "top" ? "scrollTop" : "scrollLeft"; o[a] = `${e.target.getBoundingClientRect()[a] + document.body[s] + document.documentElement[s] - Number.parseInt(ha(document.body, `margin-${a}`), 10)}px`; } for (const a of ["height", "width"]) o[a] = `${e.target.getBoundingClientRect()[a]}px`; } else n.originalPosition.value = ha(t, "position"); for (const [a, s] of Object.entries(o)) n.$el.style[a] = s; }, ah = (e, t, n) => { const r = n.vm.ns || n.vm._.exposed.ns; ["absolute", "fixed", "sticky"].includes(n.originalPosition.value) ? fi(t, r.bm("parent", "relative")) : Ip(t, r.bm("parent", "relative")), e.fullscreen && e.lock ? Ip(t, r.bm("parent", "hidden")) : fi(t, r.bm("parent", "hidden")); }, Ws = Symbol("ElLoading"), sh = (e, t) => { var n, r, o, a; const s = t.instance, i = (g) => os(t.value) ? t.value[g] : void 0, l = (g) => { const v = Qo(g) && (s == null ? void 0 : s[g]) || g; return v && $(v); }, c = (g) => l(i(g) || e.getAttribute(`element-loading-${YA(g)}`)), u = (n = i("fullscreen")) != null ? n : t.modifiers.fullscreen, f = { text: c("text"), svg: c("svg"), svgViewBox: c("svgViewBox"), spinner: c("spinner"), background: c("background"), customClass: c("customClass"), fullscreen: u, target: (r = i("target")) != null ? r : u ? void 0 : e, body: (o = i("body")) != null ? o : t.modifiers.body, lock: (a = i("lock")) != null ? a : t.modifiers.lock }; e[Ws] = { options: f, instance: D4(f) }; }, V4 = (e, t) => { for (const n of Object.keys(t)) Tn(t[n]) && (t[n].value = e[n]); }, z4 = { mounted(e, t) { t.value && sh(e, t); }, updated(e, t) { const n = e[Ws]; t.oldValue !== t.value && (t.value && !t.oldValue ? sh(e, t) : t.value && t.oldValue ? os(t.value) && V4(t.value, n.options) : n == null || n.instance.close()); }, unmounted(e) { var t; (t = e[Ws]) == null || t.instance.close(), e[Ws] = null; } }; function T0(e, t) { return function() { return e.apply(t, arguments); }; } const { toString: H4 } = Object.prototype, { getPrototypeOf: nd } = Object, { iterator: tl, toStringTag: O0 } = Symbol, nl = /* @__PURE__ */ ((e) => (t) => { const n = H4.call(t); return e[n] || (e[n] = n.slice(8, -1).toLowerCase()); })(/* @__PURE__ */ Object.create(null)), Jn = (e) => (e = e.toLowerCase(), (t) => nl(t) === e), rl = (e) => (t) => typeof t === e, { isArray: ta } = Array, Ha = rl("undefined"); function ls(e) { return e !== null && !Ha(e) && e.constructor !== null && !Ha(e.constructor) && sn(e.constructor.isBuffer) && e.constructor.isBuffer(e); } const I0 = Jn("ArrayBuffer"); function U4(e) { let t; return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && I0(e.buffer), t; } const q4 = rl("string"), sn = rl("function"), A0 = rl("number"), cs = (e) => e !== null && typeof e == "object", K4 = (e) => e === !0 || e === !1, Gs = (e) => { if (nl(e) !== "object") return !1; const t = nd(e); return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(O0 in e) && !(tl in e); }, W4 = (e) => { if (!cs(e) || ls(e)) return !1; try { return Object.keys(e).length === 0 && Object.getPrototypeOf(e) === Object.prototype; } catch { return !1; } }, G4 = Jn("Date"), J4 = Jn("File"), Z4 = Jn("Blob"), Y4 = Jn("FileList"), X4 = (e) => cs(e) && sn(e.pipe), Q4 = (e) => { let t; return e && (typeof FormData == "function" && e instanceof FormData || sn(e.append) && ((t = nl(e)) === "formdata" || // detect form-data instance t === "object" && sn(e.toString) && e.toString() === "[object FormData]")); }, eN = Jn("URLSearchParams"), [tN, nN, rN, oN] = ["ReadableStream", "Request", "Response", "Headers"].map(Jn), aN = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ""); function us(e, t, { allOwnKeys: n = !1 } = {}) { if (e === null || typeof e > "u") return; let r, o; if (typeof e != "object" && (e = [e]), ta(e)) for (r = 0, o = e.length; r < o; r++) t.call(null, e[r], r, e); else { if (ls(e)) return; const a = n ? Object.getOwnPropertyNames(e) : Object.keys(e), s = a.length; let i; for (r = 0; r < s; r++) i = a[r], t.call(null, e[i], i, e); } } function F0(e, t) { if (ls(e)) return null; t = t.toLowerCase(); const n = Object.keys(e); let r = n.length, o; for (; r-- > 0; ) if (o = n[r], t === o.toLowerCase()) return o; return null; } const Xr = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, P0 = (e) => !Ha(e) && e !== Xr; function kc() { const { caseless: e } = P0(this) && this || {}, t = {}, n = (r, o) => { const a = e && F0(t, o) || o; Gs(t[a]) && Gs(r) ? t[a] = kc(t[a], r) : Gs(r) ? t[a] = kc({}, r) : ta(r) ? t[a] = r.slice() : t[a] = r; }; for (let r = 0, o = arguments.length; r < o; r++) arguments[r] && us(arguments[r], n); return t; } const sN = (e, t, n, { allOwnKeys: r } = {}) => (us(t, (o, a) => { n && sn(o) ? e[a] = T0(o, n) : e[a] = o; }, { allOwnKeys: r }), e), iN = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), lN = (e, t, n, r) => { e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", { value: t.prototype }), n && Object.assign(e.prototype, n); }, cN = (e, t, n, r) => { let o, a, s; const i = {}; if (t = t || {}, e == null) return t; do { for (o = Object.getOwnPropertyNames(e), a = o.length; a-- > 0; ) s = o[a], (!r || r(s, e, t)) && !i[s] && (t[s] = e[s], i[s] = !0); e = n !== !1 && nd(e); } while (e && (!n || n(e, t)) && e !== Object.prototype); return t; }, uN = (e, t, n) => { e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length; const r = e.indexOf(t, n); return r !== -1 && r === n; }, dN = (e) => { if (!e) return null; if (ta(e)) return e; let t = e.length; if (!A0(t)) return null; const n = new Array(t); for (; t-- > 0; ) n[t] = e[t]; return n; }, fN = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && nd(Uint8Array)), pN = (e, t) => { const n = (e && e[tl]).call(e); let r; for (; (r = n.next()) && !r.done; ) { const o = r.value; t.call(e, o[0], o[1]); } }, hN = (e, t) => { let n; const r = []; for (; (n = e.exec(t)) !== null; ) r.push(n); return r; }, vN = Jn("HTMLFormElement"), gN = (e) => e.toLowerCase().replace( /[-_\s]([a-z\d])(\w*)/g, function(t, n, r) { return n.toUpperCase() + r; } ), ih = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), mN = Jn("RegExp"), $0 = (e, t) => { const n = Object.getOwnPropertyDescriptors(e), r = {}; us(n, (o, a) => { let s; (s = t(o, a, e)) !== !1 && (r[a] = s || o); }), Object.defineProperties(e, r); }, yN = (e) => { $0(e, (t, n) => { if (sn(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1) return !1; const r = e[n]; if (sn(r)) { if (t.enumerable = !1, "writable" in t) { t.writable = !1; return; } t.set || (t.set = () => { throw Error("Can not rewrite read-only method '" + n + "'"); }); } }); }, bN = (e, t) => { const n = {}, r = (o) => { o.forEach((a) => { n[a] = !0; }); }; return ta(e) ? r(e) : r(String(e).split(t)), n; }, wN = () => { }, CN = (e, t) => e != null && Number.isFinite(e = +e) ? e : t; function SN(e) { return !!(e && sn(e.append) && e[O0] === "FormData" && e[tl]); } const kN = (e) => { const t = new Array(10), n = (r, o) => { if (cs(r)) { if (t.indexOf(r) >= 0) return; if (ls(r)) return r; if (!("toJSON" in r)) { t[o] = r; const a = ta(r) ? [] : {}; return us(r, (s, i) => { const l = n(s, o + 1); !Ha(l) && (a[i] = l); }), t[o] = void 0, a; } } return r; }; return n(e, 0); }, _N = Jn("AsyncFunction"), EN = (e) => e && (cs(e) || sn(e)) && sn(e.then) && sn(e.catch), R0 = ((e, t) => e ? setImmediate : t ? ((n, r) => (Xr.addEventListener("message", ({ source: o, data: a }) => { o === Xr && a === n && r.length && r.shift()(); }, !1), (o) => { r.push(o), Xr.postMessage(n, "*"); }))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))( typeof setImmediate == "function", sn(Xr.postMessage) ), xN = typeof queueMicrotask < "u" ? queueMicrotask.bind(Xr) : typeof process < "u" && process.nextTick || R0, TN = (e) => e != null && sn(e[tl]), H = { isArray: ta, isArrayBuffer: I0, isBuffer: ls, isFormData: Q4, isArrayBufferView: U4, isString: q4, isNumber: A0, isBoolean: K4, isObject: cs, isPlainObject: Gs, isEmptyObject: W4, isReadableStream: tN, isRequest: nN, isResponse: rN, isHeaders: oN, isUndefined: Ha, isDate: G4, isFile: J4, isBlob: Z4, isRegExp: mN, isFunction: sn, isStream: X4, isURLSearchParams: eN, isTypedArray: fN, isFileList: Y4, forEach: us, merge: kc, extend: sN, trim: aN, stripBOM: iN, inherits: lN, toFlatObject: cN, kindOf: nl, kindOfTest: Jn, endsWith: uN, toArray: dN, forEachEntry: pN, matchAll: hN, isHTMLForm: vN, hasOwnProperty: ih, hasOwnProp: ih, // an alias to avoid ESLint no-prototype-builtins detection reduceDescriptors: $0, freezeMethods: yN, toObjectSet: bN, toCamelCase: gN, noop: wN, toFiniteNumber: CN, findKey: F0, global: Xr, isContextDefined: P0, isSpecCompliantForm: SN, toJSONObject: kN, isAsyncFn: _N, isThenable: EN, setImmediate: R0, asap: xN, isIterable: TN }; function Oe(e, t, n, r, o) { Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), n && (this.config = n), r && (this.request = r), o && (this.response = o, this.status = o.status ? o.status : null); } H.inherits(Oe, Error, { toJSON: function() { return { // Standard message: this.message, name: this.name, // Microsoft description: this.description, number: this.number, // Mozilla fileName: this.fileName, lineNumber: this.lineNumber, columnNumber: this.columnNumber, stack: this.stack, // Axios config: H.toJSONObject(this.config), code: this.code, status: this.status }; } }); const N0 = Oe.prototype, L0 = {}; [ "ERR_BAD_OPTION_VALUE", "ERR_BAD_OPTION", "ECONNABORTED", "ETIMEDOUT", "ERR_NETWORK", "ERR_FR_TOO_MANY_REDIRECTS", "ERR_DEPRECATED", "ERR_BAD_RESPONSE", "ERR_BAD_REQUEST", "ERR_CANCELED", "ERR_NOT_SUPPORT", "ERR_INVALID_URL" // eslint-disable-next-line func-names ].forEach((e) => { L0[e] = { value: e }; }); Object.defineProperties(Oe, L0); Object.defineProperty(N0, "isAxiosError", { value: !0 }); Oe.from = (e, t, n, r, o, a) => { const s = Object.create(N0); return H.toFlatObject(e, s, function(i) { return i !== Error.prototype; }, (i) => i !== "isAxiosError"), Oe.call(s, e.message, t, n, r, o), s.cause = e, s.name = e.name, a && Object.assign(s, a), s; }; const ON = null; function _c(e) { return H.isPlainObject(e) || H.isArray(e); } function B0(e) { return H.endsWith(e, "[]") ? e.slice(0, -2) : e; } function lh(e, t, n) { return e ? e.concat(t).map(function(r, o) { return r = B0(r), !n && o ? "[" + r + "]" : r; }).join(n ? "." : "") : t; } function IN(e) { return H.isArray(e) && !e.some(_c); } const AN = H.toFlatObject(H, {}, null, function(e) { return /^is[A-Z]/.test(e); }); function ol(e, t, n) { if (!H.isObject(e)) throw new TypeError("target must be an object"); t = t || new FormData(), n = H.toFlatObject(n, { metaTokens: !0, dots: !1, indexes: !1 }, !1, function(v, d) { return !H.isUndefined(d[v]); }); const r = n.metaTokens, o = n.visitor || c, a = n.dots, s = n.indexes, i = (n.Blob || typeof Blob < "u" && Blob) && H.isSpecCompliantForm(t); if (!H.isFunction(o)) throw new TypeError("visitor must be a function"); function l(v) { if (v === null) return ""; if (H.isDate(v)) return v.toISOString(); if (H.isBoolean(v)) return v.toString(); if (!i && H.isBlob(v)) throw new Oe("Blob is not supported. Use a Buffer instead."); return H.isArrayBuffer(v) || H.isTypedArray(v) ? i && typeof Blob == "function" ? new Blob([v]) : Buffer.from(v) : v; } function c(v, d, h) { let m = v; if (v && !h && typeof v == "object") { if (H.endsWith(d, "{}")) d = r ? d : d.slice(0, -2), v = JSON.stringify(v); else if (H.isArray(v) && IN(v) || (H.isFileList(v) || H.endsWith(d, "[]")) && (m = H.toArray(v))) return d = B0(d), m.forEach(function(y, x) { !(H.isUndefined(y) || y === null) && t.append( // eslint-disable-next-line no-nested-ternary s === !0 ? lh([d], x, a) : s === null ? d : d + "[]", l(y) ); }), !1; } return _c(v) ? !0 : (t.append(lh(h, d, a), l(v)), !1); } const u = [], f = Object.assign(AN, { defaultVisitor: c, convertValue: l, isVisitable: _c }); function g(v, d) { if (!H.isUndefined(v)) { if (u.indexOf(v) !== -1) throw Error("Circular reference detected in " + d.join(".")); u.push(v), H.forEach(v, function(h, m) { (!(H.isUndefined(h) || h === null) && o.call( t, h, H.isString(m) ? m.trim() : m, d, f )) === !0 && g(h, d ? d.concat(m) : [m]); }), u.pop(); } } if (!H.isObject(e)) throw new TypeError("data must be an object"); return g(e), t; } function ch(e) { const t = { "!": "%21", "'": "%27", "(": "%28", ")": "%29", "~": "%7E", "%20": "+", "%00": "\0" }; return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(n) { return t[n]; }); } function rd(e, t) { this._pairs = [], e && ol(e, this, t); } const D0 = rd.prototype; D0.append = function(e, t) { this._pairs.push([e, t]); }; D0.toString = function(e) { const t = e ? function(n) { return e.call(this, n, ch); } : ch; return this._pairs.map(function(n) { return t(n[0]) + "=" + t(n[1]); }, "").join("&"); }; function FN(e) { return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]"); } function M0(e, t, n) { if (!t) return e; const r = n && n.encode || FN; H.isFunction(n) && (n = { serialize: n }); const o = n && n.serialize; let a; if (o ? a = o(t, n) : a = H.isURLSearchParams(t) ? t.toString() : new rd(t, n).toString(r), a) { const s = e.indexOf("#"); s !== -1 && (e = e.slice(0, s)), e += (e.indexOf("?") === -1 ? "?" : "&") + a; } return e; } class uh { constructor() { this.handlers = []; } /** * Add a new interceptor to the stack * * @param {Function} fulfilled The function to handle `then` for a `Promise` * @param {Function} rejected The function to handle `reject` for a `Promise` * * @return {Number} An ID used to remove interceptor later */ use(t, n, r) { return this.handlers.push({ fulfilled: t, rejected: n, synchronous: r ? r.synchronous : !1, runWhen: r ? r.runWhen : null }), this.handlers.length - 1; } /** * Remove an interceptor from the stack * * @param {Number} id The ID that was returned by `use` * * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise */ eject(t) { this.handlers[t] && (this.handlers[t] = null); } /** * Clear all interceptors from the stack * * @returns {void} */ clear() { this.handlers && (this.handlers = []); } /** * Iterate over all the registered interceptors * * This method is particularly useful for skipping over any * interceptors that may have become `null` calling `eject`. * * @param {Function} fn The function to call for each interceptor * * @returns {void} */ forEach(t) { H.forEach(this.handlers, function(n) { n !== null && t(n); }); } } const j0 = { silentJSONParsing: !0, forcedJSONParsing: !0, clarifyTimeoutError: !1 }, PN = typeof URLSearchParams < "u" ? URLSearchParams : rd, $N = typeof FormData < "u" ? FormData : null, RN = typeof Blob < "u" ? Blob : null, NN = { isBrowser: !0, classes: { URLSearchParams: PN, FormData: $N, Blob: RN }, protocols: ["http", "https", "file", "blob", "url", "data"] }, od = typeof window < "u" && typeof document < "u", Ec = typeof navigator == "object" && navigator || void 0, LN = od && (!Ec || ["ReactNative", "NativeScript", "NS"].indexOf(Ec.product) < 0), BN = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef self instanceof WorkerGlobalScope && typeof self.importScripts == "function", DN = od && window.location.href || "http://localhost", MN = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, hasBrowserEnv: od, hasStandardBrowserEnv: LN, hasStandardBrowserWebWorkerEnv: BN, navigator: Ec, origin: DN }, Symbol.toStringTag, { value: "Module" })), Mt = { ...MN, ...NN }; function jN(e, t) { return ol(e, new Mt.classes.URLSearchParams(), { visitor: function(n, r, o, a) { return Mt.isNode && H.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : a.defaultVisitor.apply(this, arguments); }, ...t }); } function VN(e) { return H.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]); } function zN(e) { const t = {}, n = Object.keys(e); let r; const o = n.length; let a; for (r = 0; r < o; r++) a = n[r], t[a] = e[a]; return t; } function V0(e) { function t(n, r, o, a) { let s = n[a++]; if (s === "__proto__") return !0; const i = Number.isFinite(+s), l = a >= n.length; return s = !s && H.isArray(o) ? o.length : s, l ? (H.hasOwnProp(o, s) ? o[s] = [o[s], r] : o[s] = r, !i) : ((!o[s] || !H.isObject(o[s])) && (o[s] = []), t(n, r, o[s], a) && H.isArray(o[s]) && (o[s] = zN(o[s])), !i); } if (H.isFormData(e) && H.isFunction(e.entries)) { const n = {}; return H.forEachEntry(e, (r, o) => { t(VN(r), o, n, 0); }), n; } return null; } function HN(e, t, n) { if (H.isString(e)) try { return (t || JSON.parse)(e), H.trim(e); } catch (r) { if (r.name !== "SyntaxError") throw r; } return (0, JSON.stringify)(e); } const ds = { transitional: j0, adapter: ["xhr", "http", "fetch"], transformRequest: [function(e, t) { const n = t.getContentType() || "", r = n.indexOf("application/json") > -1, o = H.isObject(e); if (o && H.isHTMLForm(e) && (e = new FormData(e)), H.isFormData(e)) return r ? JSON.stringify(V0(e)) : e; if (H.isArrayBuffer(e) || H.isBuffer(e) || H.isStream(e) || H.isFile(e) || H.isBlob(e) || H.isReadableStream(e)) return e; if (H.isArrayBufferView(e)) return e.buffer; if (H.isURLSearchParams(e)) return t.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), e.toString(); let a; if (o) { if (n.indexOf("application/x-www-form-urlencoded") > -1) return jN(e, this.formSerializer).toString(); if ((a = H.isFileList(e)) || n.indexOf("multipart/form-data") > -1) { const s = this.env && this.env.FormData; return ol( a ? { "files[]": e } : e, s && new s(), this.formSerializer ); } } return o || r ? (t.setContentType("application/json", !1), HN(e)) : e; }], transformResponse: [function(e) { const t = this.transitional || ds.transitional, n = t && t.forcedJSONParsing, r = this.responseType === "json"; if (H.isResponse(e) || H.isReadableStream(e)) return e; if (e && H.isString(e) && (n && !this.responseType || r)) { const o = !(t && t.silentJSONParsing) && r; try { return JSON.parse(e); } catch (a) { if (o) throw a.name === "SyntaxError" ? Oe.from(a, Oe.ERR_BAD_RESPONSE, this, null, this.response) : a; } } return e; }], /** * A timeout in milliseconds to abort a request. If set to 0 (default) a * timeout is not created. */ timeout: 0, xsrfCookieName: "XSRF-TOKEN", xsrfHeaderName: "X-XSRF-TOKEN", maxContentLength: -1, maxBodyLength: -1, env: { FormData: Mt.classes.FormData, Blob: Mt.classes.Blob }, validateStatus: function(e) { return e >= 200 && e < 300; }, headers: { common: { Accept: "application/json, text/plain, */*", "Content-Type": void 0 } } }; H.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => { ds.headers[e] = {}; }); const UN = H.toObjectSet([ "age", "authorization", "content-length", "content-type", "etag", "expires", "from", "host", "if-modified-since", "if-unmodified-since", "last-modified", "location", "max-forwards", "proxy-authorization", "referer", "retry-after", "user-agent" ]), qN = (e) => { const t = {}; let n, r, o; return e && e.split(` `).forEach(function(a) { o = a.indexOf(":"), n = a.substring(0, o).trim().toLowerCase(), r = a.substring(o + 1).trim(), !(!n || t[n] && UN[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r); }), t; }, dh = Symbol("internals"); function ga(e) { return e && String(e).trim().toLowerCase(); } function Js(e) { return e === !1 || e == null ? e : H.isArray(e) ? e.map(Js) : String(e); } function KN(e) { const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g; let r; for (; r = n.exec(e); ) t[r[1]] = r[2]; return t; } const WN = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()); function Wl(e, t, n, r, o) { if (H.isFunction(r)) return r.call(this, t, n); if (o && (t = n), !!H.isString(t)) { if (H.isString(r)) return t.indexOf(r) !== -1; if (H.isRegExp(r)) return r.test(t); } } function GN(e) { return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r); } function JN(e, t) { const n = H.toCamelCase(" " + t); ["get", "set", "has"].forEach((r) => { Object.defineProperty(e, r + n, { value: function(o, a, s) { return this[r].call(this, t, o, a, s); }, configurable: !0 }); }); } class ln { constructor(t) { t && this.set(t); } set(t, n, r) { const o = this; function a(i, l, c) { const u = ga(l); if (!u) throw new Error("header name must be a non-empty string"); const f = H.findKey(o, u); (!f || o[f] === void 0 || c === !0 || c === void 0 && o[f] !== !1) && (o[f || l] = Js(i)); } const s = (i, l) => H.forEach(i, (c, u) => a(c, u, l)); if (H.isPlainObject(t) || t instanceof this.constructor) s(t, n); else if (H.isString(t) && (t = t.trim()) && !WN(t)) s(qN(t), n); else if (H.isObject(t) && H.isIterable(t)) { let i = {}, l, c; for (const u of t) { if (!H.isArray(u)) throw TypeError("Object iterator must return a key-value pair"); i[c = u[0]] = (l = i[c]) ? H.isArray(l) ? [...l, u[1]] : [l, u[1]] : u[1]; } s(i, n); } else t != null && a(n, t, r); return this; } get(t, n) { if (t = ga(t), t) { const r = H.findKey(this, t); if (r) { const o = this[r]; if (!n) return o; if (n === !0) return KN(o); if (H.isFunction(n)) return n.call(this, o, r); if (H.isRegExp(n)) return n.exec(o); throw new TypeError("parser must be boolean|regexp|function"); } } } has(t, n) { if (t = ga(t), t) { const r = H.findKey(this, t); return !!(r && this[r] !== void 0 && (!n || Wl(this, this[r], r, n))); } return !1; } delete(t, n) { const r = this; let o = !1; function a(s) { if (s = ga(s), s) { const i = H.findKey(r, s); i && (!n || Wl(r, r[i], i, n)) && (delete r[i], o = !0); } } return H.isArray(t) ? t.forEach(a) : a(t), o; } clear(t) { const n = Object.keys(this); let r = n.length, o = !1; for (; r--; ) { const a = n[r]; (!t || Wl(this, this[a], a, t, !0)) && (delete this[a], o = !0); } return o; } normalize(t) { const n = this, r = {}; return H.forEach(this, (o, a) => { const s = H.findKey(r, a); if (s) { n[s] = Js(o), delete n[a]; return; } const i = t ? GN(a) : String(a).trim(); i !== a && delete n[a], n[i] = Js(o), r[i] = !0; }), this; } concat(...t) { return this.constructor.concat(this, ...t); } toJSON(t) { const n = /* @__PURE__ */ Object.create(null); return H.forEach(this, (r, o) => { r != null && r !== !1 && (n[o] = t && H.isArray(r) ? r.join(", ") : r); }), n; } [Symbol.iterator]() { return Object.entries(this.toJSON())[Symbol.iterator](); } toString() { return Object.entries(this.toJSON()).map(([t, n]) => t + ": " + n).join(` `); } getSetCookie() { return this.get("set-cookie") || []; } get [Symbol.toStringTag]() { return "AxiosHeaders"; } static from(t) { return t instanceof this ? t : new this(t); } static concat(t, ...n) { const r = new this(t); return n.forEach((o) => r.set(o)), r; } static accessor(t) { const n = (this[dh] = this[dh] = { accessors: {} }).accessors, r = this.prototype; function o(a) { const s = ga(a); n[s] || (JN(r, a), n[s] = !0); } return H.isArray(t) ? t.forEach(o) : o(t), this; } } ln.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]); H.reduceDescriptors(ln.prototype, ({ value: e }, t) => { let n = t[0].toUpperCase() + t.slice(1); return { get: () => e, set(r) { this[n] = r; } }; }); H.freezeMethods(ln); function Gl(e, t) { const n = this || ds, r = t || n, o = ln.from(r.headers); let a = r.data; return H.forEach(e, function(s) { a = s.call(n, a, o.normalize(), t ? t.status : void 0); }), o.normalize(), a; } function z0(e) { return !!(e && e.__CANCEL__); } function na(e, t, n) { Oe.call(this, e ?? "canceled", Oe.ERR_CANCELED, t, n), this.name = "CanceledError"; } H.inherits(na, Oe, { __CANCEL__: !0 }); function H0(e, t, n) { const r = n.config.validateStatus; !n.status || !r || r(n.status) ? e(n) : t(new Oe( "Request failed with status code " + n.status, [Oe.ERR_BAD_REQUEST, Oe.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4], n.config, n.request, n )); } function ZN(e) { const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e); return t && t[1] || ""; } function YN(e, t) { e = e || 10; const n = new Array(e), r = new Array(e); let o = 0, a = 0, s; return t = t !== void 0 ? t : 1e3, function(i) { const l = Date.now(), c = r[a]; s || (s = l), n[o] = i, r[o] = l; let u = a, f = 0; for (; u !== o; ) f += n[u++], u = u % e; if (o = (o + 1) % e, o === a && (a = (a + 1) % e), l - s < t) return; const g = c && l - c; return g ? Math.round(f * 1e3 / g) : void 0; }; } function XN(e, t) { let n = 0, r = 1e3 / t, o, a; const s = (i, l = Date.now()) => { n = l, o = null, a && (clearTimeout(a), a = null), e(...i); }; return [(...i) => { const l = Date.now(), c = l - n; c >= r ? s(i, l) : (o = i, a || (a = setTimeout(() => { a = null, s(o); }, r - c))); }, () => o && s(o)]; } const mi = (e, t, n = 3) => { let r = 0; const o = YN(50, 250); return XN((a) => { const s = a.loaded, i = a.lengthComputable ? a.total : void 0, l = s - r, c = o(l), u = s <= i; r = s; const f = { loaded: s, total: i, progress: i ? s / i : void 0, bytes: l, rate: c || void 0, estimated: c && i && u ? (i - s) / c : void 0, event: a, lengthComputable: i != null, [t ? "download" : "upload"]: !0 }; e(f); }, n); }, fh = (e, t) => { const n = e != null; return [(r) => t[0]({ lengthComputable: n, total: e, loaded: r }), t[1]]; }, ph = (e) => (...t) => H.asap(() => e(...t)), QN = Mt.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, Mt.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))( new URL(Mt.origin), Mt.navigator && /(msie|trident)/i.test(Mt.navigator.userAgent) ) : () => !0, eL = Mt.hasStandardBrowserEnv ? ( // Standard browser envs support document.cookie { write(e, t, n, r, o, a) { const s = [e + "=" + encodeURIComponent(t)]; H.isNumber(n) && s.push("expires=" + new Date(n).toGMTString()), H.isString(r) && s.push("path=" + r), H.isString(o) && s.push("domain=" + o), a === !0 && s.push("secure"), document.cookie = s.join("; "); }, read(e) { const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)")); return t ? decodeURIComponent(t[3]) : null; }, remove(e) { this.write(e, "", Date.now() - 864e5); } } ) : ( // Non-standard browser env (web workers, react-native) lack needed support. { write() { }, read() { return null; }, remove() { } } ); function tL(e) { return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e); } function nL(e, t) { return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e; } function U0(e, t, n) { let r = !tL(t); return e && (r || n == !1) ? nL(e, t) : t; } const hh = (e) => e instanceof ln ? { ...e } : e; function po(e, t) { t = t || {}; const n = {}; function r(c, u, f, g) { return H.isPlainObject(c) && H.isPlainObject(u) ? H.merge.call({ caseless: g }, c, u) : H.isPlainObject(u) ? H.merge({}, u) : H.isArray(u) ? u.slice() : u; } function o(c, u, f, g) { if (H.isUndefined(u)) { if (!H.isUndefined(c)) return r(void 0, c, f, g); } else return r(c, u, f, g); } function a(c, u) { if (!H.isUndefined(u)) return r(void 0, u); } function s(c, u) { if (H.isUndefined(u)) { if (!H.isUndefined(c)) return r(void 0, c); } else return r(void 0, u); } function i(c, u, f) { if (f in t) return r(c, u); if (f in e) return r(void 0, c); } const l = { url: a, method: a, data: a, baseURL: s, transformRequest: s, transformResponse: s, paramsSerializer: s, timeout: s, timeoutMessage: s, withCredentials: s, withXSRFToken: s, adapter: s, responseType: s, xsrfCookieName: s, xsrfHeaderName: s, onUploadProgress: s, onDownloadProgress: s, decompress: s, maxContentLength: s, maxBodyLength: s, beforeRedirect: s, transport: s, httpAgent: s, httpsAgent: s, cancelToken: s, socketPath: s, responseEncoding: s, validateStatus: i, headers: (c, u, f) => o(hh(c), hh(u), f, !0) }; return H.forEach(Object.keys({ ...e, ...t }), function(c) { const u = l[c] || o, f = u(e[c], t[c], c); H.isUndefined(f) && u !== i || (n[c] = f); }), n; } const q0 = (e) => { const t = po({}, e); let { data: n, withXSRFToken: r, xsrfHeaderName: o, xsrfCookieName: a, headers: s, auth: i } = t; t.headers = s = ln.from(s), t.url = M0(U0(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), i && s.set( "Authorization", "Basic " + btoa((i.username || "") + ":" + (i.password ? unescape(encodeURIComponent(i.password)) : "")) ); let l; if (H.isFormData(n)) { if (Mt.hasStandardBrowserEnv || Mt.hasStandardBrowserWebWorkerEnv) s.setContentType(void 0); else if ((l = s.getContentType()) !== !1) { const [c, ...u] = l ? l.split(";").map((f) => f.trim()).filter(Boolean) : []; s.setContentType([c || "multipart/form-data", ...u].join("; ")); } } if (Mt.hasStandardBrowserEnv && (r && H.isFunction(r) && (r = r(t)), r || r !== !1 && QN(t.url))) { const c = o && a && eL.read(a); c && s.set(o, c); } return t; }, rL = typeof XMLHttpRequest < "u", oL = rL && function(e) { return new Promise(function(t, n) { const r = q0(e); let o = r.data; const a = ln.from(r.headers).normalize(); let { responseType: s, onUploadProgress: i, onDownloadProgress: l } = r, c, u, f, g, v; function d() { g && g(), v && v(), r.cancelToken && r.cancelToken.unsubscribe(c), r.signal && r.signal.removeEventListener("abort", c); } let h = new XMLHttpRequest(); h.open(r.method.toUpperCase(), r.url, !0), h.timeout = r.timeout; function m() { if (!h) return; const x = ln.from( "getAllResponseHeaders" in h && h.getAllResponseHeaders() ), A = { data: !s || s === "text" || s === "json" ? h.responseText : h.response, status: h.status, statusText: h.statusText, headers: x, config: e, request: h }; H0(function(k) { t(k), d(); }, function(k) { n(k), d(); }, A), h = null; } "onloadend" in h ? h.onloadend = m : h.onreadystatechange = function() { !h || h.readyState !== 4 || h.status === 0 && !(h.responseURL && h.responseURL.indexOf("file:") === 0) || setTimeout(m); }, h.onabort = function() { h && (n(new Oe("Request aborted", Oe.ECONNABORTED, e, h)), h = null); }, h.onerror = function() { n(new Oe("Network Error", Oe.ERR_NETWORK, e, h)), h = null; }, h.ontimeout = function() { let x = r.timeout ? "timeout of " + r.timeout + "ms exceeded" : "timeout exceeded"; const A = r.transitional || j0; r.timeoutErrorMessage && (x = r.timeoutErrorMessage), n(new Oe( x, A.clarifyTimeoutError ? Oe.ETIMEDOUT : Oe.ECONNABORTED, e, h )), h = null; }, o === void 0 && a.setContentType(null), "setRequestHeader" in h && H.forEach(a.toJSON(), function(x, A) { h.setRequestHeader(A, x); }), H.isUndefined(r.withCredentials) || (h.withCredentials = !!r.withCredentials), s && s !== "json" && (h.responseType = r.responseType), l && ([f, v] = mi(l, !0), h.addEventListener("progress", f)), i && h.upload && ([u, g] = mi(i), h.upload.addEventListener("progress", u), h.upload.addEventListener("loadend", g)), (r.cancelToken || r.signal) && (c = (x) => { h && (n(!x || x.type ? new na(null, e, h) : x), h.abort(), h = null); }, r.cancelToken && r.cancelToken.subscribe(c), r.signal && (r.signal.aborted ? c() : r.signal.addEventListener("abort", c))); const y = ZN(r.url); if (y && Mt.protocols.indexOf(y) === -1) { n(new Oe("Unsupported protocol " + y + ":", Oe.ERR_BAD_REQUEST, e)); return; } h.send(o || null); }); }, aL = (e, t) => { const { length: n } = e = e ? e.filter(Boolean) : []; if (t || n) { let r = new AbortController(), o; const a = function(c) { if (!o) { o = !0, i(); const u = c instanceof Error ? c : this.reason; r.abort(u instanceof Oe ? u : new na(u instanceof Error ? u.message : u)); } }; let s = t && setTimeout(() => { s = null, a(new Oe(`timeout ${t} of ms exceeded`, Oe.ETIMEDOUT)); }, t); const i = () => { e && (s && clearTimeout(s), s = null, e.forEach((c) => { c.unsubscribe ? c.unsubscribe(a) : c.removeEventListener("abort", a); }), e = null); }; e.forEach((c) => c.addEventListener("abort", a)); const { signal: l } = r; return l.unsubscribe = () => H.asap(i), l; } }, sL = function* (e, t) { let n = e.byteLength; if (n < t) { yield e; return; } let r = 0, o; for (; r < n; ) o = r + t, yield e.slice(r, o), r = o; }, iL = async function* (e, t) { for await (const n of lL(e)) yield* sL(n, t); }, lL = async function* (e) { if (e[Symbol.asyncIterator]) { yield* e; return; } const t = e.getReader(); try { for (; ; ) { const { done: n, value: r } = await t.read(); if (n) break; yield r; } } finally { await t.cancel(); } }, vh = (e, t, n, r) => { const o = iL(e, t); let a = 0, s, i = (l) => { s || (s = !0, r && r(l)); }; return new ReadableStream({ async pull(l) { try { const { done: c, value: u } = await o.next(); if (c) { i(), l.close(); return; } let f = u.byteLength; if (n) { let g = a += f; n(g); } l.enqueue(new Uint8Array(u)); } catch (c) { throw i(c), c; } }, cancel(l) { return i(l), o.return(); } }, { highWaterMark: 2 }); }, al = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", K0 = al && typeof ReadableStream == "function", cL = al && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), W0 = (e, ...t) => { try { return !!e(...t); } catch { return !1; } }, uL = K0 && W0(() => { let e = !1; const t = new Request(Mt.origin, { body: new ReadableStream(), method: "POST", get duplex() { return e = !0, "half"; } }).headers.has("Content-Type"); return e && !t; }), gh = 64 * 1024, xc = K0 && W0(() => H.isReadableStream(new Response("").body)), yi = { stream: xc && ((e) => e.body) }; al && ((e) => { ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => { !yi[t] && (yi[t] = H.isFunction(e[t]) ? (n) => n[t]() : (n, r) => { throw new Oe(`Response type '${t}' is not supported`, Oe.ERR_NOT_SUPPORT, r); }); }); })(new Response()); const dL = async (e) => { if (e == null) return 0; if (H.isBlob(e)) return e.size; if (H.isSpecCompliantForm(e)) return (await new Request(Mt.origin, { method: "POST", body: e }).arrayBuffer()).byteLength; if (H.isArrayBufferView(e) || H.isArrayBuffer(e)) return e.byteLength; if (H.isURLSearchParams(e) && (e = e + ""), H.isString(e)) return (await cL(e)).byteLength; }, fL = async (e, t) => H.toFiniteNumber(e.getContentLength()) ?? dL(t), pL = al && (async (e) => { let { url: t, method: n, data: r, signal: o, cancelToken: a, timeout: s, onDownloadProgress: i, onUploadProgress: l, responseType: c, headers: u, withCredentials: f = "same-origin", fetchOptions: g } = q0(e); c = c ? (c + "").toLowerCase() : "text"; let v = aL([o, a && a.toAbortSignal()], s), d; const h = v && v.unsubscribe && (() => { v.unsubscribe(); }); let m; try { if (l && uL && n !== "get" && n !== "head" && (m = await fL(u, r)) !== 0) { let E = new Request(t, { method: "POST", body: r, duplex: "half" }), T; if (H.isFormData(r) && (T = E.headers.get("content-type")) && u.setContentType(T), E.body) { const [I, R] = fh( m, mi(ph(l)) ); r = vh(E.body, gh, I, R); } } H.isString(f) || (f = f ? "include" : "omit"); const y = "credentials" in Request.prototype; d = new Request(t, { ...g, signal: v, method: n.toUpperCase(), headers: u.normalize().toJSON(), body: r, duplex: "half", credentials: y ? f : void 0 }); let x = await fetch(d, g); const A = xc && (c === "stream" || c === "response"); if (xc && (i || A && h)) { const E = {}; ["status", "statusText", "headers"].forEach((D) => { E[D] = x[D]; }); const T = H.toFiniteNumber(x.headers.get("content-length")), [I, R] = i && fh( T, mi(ph(i), !0) ) || []; x = new Response( vh(x.body, gh, I, () => { R && R(), h && h(); }), E ); } c = c || "text"; let k = await yi[H.findKey(yi, c) || "text"](x, e); return !A && h && h(), await new Promise((E, T) => { H0(E, T, { data: k, headers: ln.from(x.headers), status: x.status, statusText: x.statusText, config: e, request: d }); }); } catch (y) { throw h && h(), y && y.name === "TypeError" && /Load failed|fetch/i.test(y.message) ? Object.assign( new Oe("Network Error", Oe.ERR_NETWORK, e, d), { cause: y.cause || y } ) : Oe.from(y, y && y.code, e, d); } }), Tc = { http: ON, xhr: oL, fetch: pL }; H.forEach(Tc, (e, t) => { if (e) { try { Object.defineProperty(e, "name", { value: t }); } catch { } Object.defineProperty(e, "adapterName", { value: t }); } }); const mh = (e) => `- ${e}`, hL = (e) => H.isFunction(e) || e === null || e === !1, G0 = { getAdapter: (e) => { e = H.isArray(e) ? e : [e]; const { length: t } = e; let n, r; const o = {}; for (let a = 0; a < t; a++) { n = e[a]; let s; if (r = n, !hL(n) && (r = Tc[(s = String(n)).toLowerCase()], r === void 0)) throw new Oe(`Unknown adapter '${s}'`); if (r) break; o[s || "#" + a] = r; } if (!r) { const a = Object.entries(o).map( ([i, l]) => `adapter ${i} ` + (l === !1 ? "is not supported by the environment" : "is not available in the build") ); let s = t ? a.length > 1 ? `since : ` + a.map(mh).join(` `) : " " + mh(a[0]) : "as no adapter specified"; throw new Oe( "There is no suitable adapter to dispatch the request " + s, "ERR_NOT_SUPPORT" ); } return r; }, adapters: Tc }; function Jl(e) { if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted) throw new na(null, e); } function yh(e) { return Jl(e), e.headers = ln.from(e.headers), e.data = Gl.call( e, e.transformRequest ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), G0.getAdapter(e.adapter || ds.adapter)(e).then(function(t) { return Jl(e), t.data = Gl.call( e, e.transformResponse, t ), t.headers = ln.from(t.headers), t; }, function(t) { return z0(t) || (Jl(e), t && t.response && (t.response.data = Gl.call( e, e.transformResponse, t.response ), t.response.headers = ln.from(t.response.headers))), Promise.reject(t); }); } const J0 = "1.11.0", sl = {}; ["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => { sl[e] = function(n) { return typeof n === e || "a" + (t < 1 ? "n " : " ") + e; }; }); const bh = {}; sl.transitional = function(e, t, n) { function r(o, a) { return "[Axios v" + J0 + "] Transitional option '" + o + "'" + a + (n ? ". " + n : ""); } return (o, a, s) => { if (e === !1) throw new Oe( r(a, " has been removed" + (t ? " in " + t : "")), Oe.ERR_DEPRECATED ); return t && !bh[a] && (bh[a] = !0, console.warn( r( a, " has been deprecated since v" + t + " and will be removed in the near future" ) )), e ? e(o, a, s) : !0; }; }; sl.spelling = function(e) { return (t, n) => (console.warn(`${n} is likely a misspelling of ${e}`), !0); }; function vL(e, t, n) { if (typeof e != "object") throw new Oe("options must be an object", Oe.ERR_BAD_OPTION_VALUE); const r = Object.keys(e); let o = r.length; for (; o-- > 0; ) { const a = r[o], s = t[a]; if (s) { const i = e[a], l = i === void 0 || s(i, a, e); if (l !== !0) throw new Oe("option " + a + " must be " + l, Oe.ERR_BAD_OPTION_VALUE); continue; } if (n !== !0) throw new Oe("Unknown option " + a, Oe.ERR_BAD_OPTION); } } const Zs = { assertOptions: vL, validators: sl }, Xn = Zs.validators; class oo { constructor(t) { this.defaults = t || {}, this.interceptors = { request: new uh(), response: new uh() }; } /** * Dispatch a request * * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults) * @param {?Object} config * * @returns {Promise} The Promise to be fulfilled */ async request(t, n) { try { return await this._request(t, n); } catch (r) { if (r instanceof Error) { let o = {}; Error.captureStackTrace ? Error.captureStackTrace(o) : o = new Error(); const a = o.stack ? o.stack.replace(/^.+\n/, "") : ""; try { r.stack ? a && !String(r.stack).endsWith(a.replace(/^.+\n.+\n/, "")) && (r.stack += ` ` + a) : r.stack = a; } catch { } } throw r; } } _request(t, n) { typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = po(this.defaults, n); const { transitional: r, paramsSerializer: o, headers: a } = n; r !== void 0 && Zs.assertOptions(r, { silentJSONParsing: Xn.transitional(Xn.boolean), forcedJSONParsing: Xn.transitional(Xn.boolean), clarifyTimeoutError: Xn.transitional(Xn.boolean) }, !1), o != null && (H.isFunction(o) ? n.paramsSerializer = { serialize: o } : Zs.assertOptions(o, { encode: Xn.function, serialize: Xn.function }, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), Zs.assertOptions(n, { baseUrl: Xn.spelling("baseURL"), withXsrfToken: Xn.spelling("withXSRFToken") }, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase(); let s = a && H.merge( a.common, a[n.method] ); a && H.forEach( ["delete", "get", "head", "post", "put", "patch", "common"], (d) => { delete a[d]; } ), n.headers = ln.concat(s, a); const i = []; let l = !0; this.interceptors.request.forEach(function(d) { typeof d.runWhen == "function" && d.runWhen(n) === !1 || (l = l && d.synchronous, i.unshift(d.fulfilled, d.rejected)); }); const c = []; this.interceptors.response.forEach(function(d) { c.push(d.fulfilled, d.rejected); }); let u, f = 0, g; if (!l) { const d = [yh.bind(this), void 0]; for (d.unshift(...i), d.push(...c), g = d.length, u = Promise.resolve(n); f < g; ) u = u.then(d[f++], d[f++]); return u; } g = i.length; let v = n; for (f = 0; f < g; ) { const d = i[f++], h = i[f++]; try { v = d(v); } catch (m) { h.call(this, m); break; } } try { u = yh.call(this, v); } catch (d) { return Promise.reject(d); } for (f = 0, g = c.length; f < g; ) u = u.then(c[f++], c[f++]); return u; } getUri(t) { t = po(this.defaults, t); const n = U0(t.baseURL, t.url, t.allowAbsoluteUrls); return M0(n, t.params, t.paramsSerializer); } } H.forEach(["delete", "get", "head", "options"], function(e) { oo.prototype[e] = function(t, n) { return this.request(po(n || {}, { method: e, url: t, data: (n || {}).data })); }; }); H.forEach(["post", "put", "patch"], function(e) { function t(n) { return function(r, o, a) { return this.request(po(a || {}, { method: e, headers: n ? { "Content-Type": "multipart/form-data" } : {}, url: r, data: o })); }; } oo.prototype[e] = t(), oo.prototype[e + "Form"] = t(!0); }); class ad { constructor(t) { if (typeof t != "function") throw new TypeError("executor must be a function."); let n; this.promise = new Promise(function(o) { n = o; }); const r = this; this.promise.then((o) => { if (!r._listeners) return; let a = r._listeners.length; for (; a-- > 0; ) r._listeners[a](o); r._listeners = null; }), this.promise.then = (o) => { let a; const s = new Promise((i) => { r.subscribe(i), a = i; }).then(o); return s.cancel = function() { r.unsubscribe(a); }, s; }, t(function(o, a, s) { r.reason || (r.reason = new na(o, a, s), n(r.reason)); }); } /** * Throws a `CanceledError` if cancellation has been requested. */ throwIfRequested() { if (this.reason) throw this.reason; } /** * Subscribe to the cancel signal */ subscribe(t) { if (this.reason) { t(this.reason); return; } this._listeners ? this._listeners.push(t) : this._listeners = [t]; } /** * Unsubscribe from the cancel signal */ unsubscribe(t) { if (!this._listeners) return; const n = this._listeners.indexOf(t); n !== -1 && this._listeners.splice(n, 1); } toAbortSignal() { const t = new AbortController(), n = (r) => { t.abort(r); }; return this.subscribe(n), t.signal.unsubscribe = () => this.unsubscribe(n), t.signal; } /** * Returns an object that contains a new `CancelToken` and a function that, when called, * cancels the `CancelToken`. */ static source() { let t; return { token: new ad(function(n) { t = n; }), cancel: t }; } } function gL(e) { return function(t) { return e.apply(null, t); }; } function mL(e) { return H.isObject(e) && e.isAxiosError === !0; } const Oc = { Continue: 100, SwitchingProtocols: 101, Processing: 102, EarlyHints: 103, Ok: 200, Created: 201, Accepted: 202, NonAuthoritativeInformation: 203, NoContent: 204, ResetContent: 205, PartialContent: 206, MultiStatus: 207, AlreadyReported: 208, ImUsed: 226, MultipleChoices: 300, MovedPermanently: 301, Found: 302, SeeOther: 303, NotModified: 304, UseProxy: 305, Unused: 306, TemporaryRedirect: 307, PermanentRedirect: 308, BadRequest: 400, Unauthorized: 401, PaymentRequired: 402, Forbidden: 403, NotFound: 404, MethodNotAllowed: 405, NotAcceptable: 406, ProxyAuthenticationRequired: 407, RequestTimeout: 408, Conflict: 409, Gone: 410, LengthRequired: 411, PreconditionFailed: 412, PayloadTooLarge: 413, UriTooLong: 414, UnsupportedMediaType: 415, RangeNotSatisfiable: 416, ExpectationFailed: 417, ImATeapot: 418, MisdirectedRequest: 421, UnprocessableEntity: 422, Locked: 423, FailedDependency: 424, TooEarly: 425, UpgradeRequired: 426, PreconditionRequired: 428, TooManyRequests: 429, RequestHeaderFieldsTooLarge: 431, UnavailableForLegalReasons: 451, InternalServerError: 500, NotImplemented: 501, BadGateway: 502, ServiceUnavailable: 503, GatewayTimeout: 504, HttpVersionNotSupported: 505, VariantAlsoNegotiates: 506, InsufficientStorage: 507, LoopDetected: 508, NotExtended: 510, NetworkAuthenticationRequired: 511 }; Object.entries(Oc).forEach(([e, t]) => { Oc[t] = e; }); function Z0(e) { const t = new oo(e), n = T0(oo.prototype.request, t); return H.extend(n, oo.prototype, t, { allOwnKeys: !0 }), H.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(r) { return Z0(po(e, r)); }, n; } const _t = Z0(ds); _t.Axios = oo; _t.CanceledError = na; _t.CancelToken = ad; _t.isCancel = z0; _t.VERSION = J0; _t.toFormData = ol; _t.AxiosError = Oe; _t.Cancel = _t.CanceledError; _t.all = function(e) { return Promise.all(e); }; _t.spread = gL; _t.isAxiosError = mL; _t.mergeConfig = po; _t.AxiosHeaders = ln; _t.formToJSON = (e) => V0(H.isHTMLForm(e) ? new FormData(e) : e); _t.getAdapter = G0.getAdapter; _t.HttpStatusCode = Oc; _t.default = _t; const yL = "data:image/svg+xml,%3csvg%20id='logo-sparc-wave-primary'%20data-name='logo-sparc-wave-primary'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20viewBox='0%200%20400%20190.5854'%3e%3cdefs%3e%3clinearGradient%20id='linear-gradient'%20y1='96.3505'%20x2='400'%20y2='96.3505'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20stop-color='%230b00bf'/%3e%3cstop%20offset='1'%20stop-color='%23bc00fc'/%3e%3c/linearGradient%3e%3c/defs%3e%3ctitle%3eSPARC%20Logo%3c/title%3e%3cpath%20d='M396.6976,128.6248l-146.2735-3.38a6.5358,6.5358,0,0,0-6.1378,3.9236l-.0612.1407-13.673,31.4482L202.9416,9.5333l-.01-.0685a8.9823,8.9823,0,0,0-17.6624-.0114L163.673,125.3819,3.298,129.2886a3.38,3.38,0,0,0,.0269,6.7592L169.34,138.7635a6.5939,6.5939,0,0,0,6.5373-5.1457l.0571-.2546,17.8534-79.5649L221.26,185.1237l.0256.1243A6.7593,6.7593,0,0,0,234.092,186.52L254.9005,138.66l141.7971-3.2762a3.3805,3.3805,0,0,0,0-6.7592Z'%20style='fill:url(%23linear-gradient)'/%3e%3cpath%20d='M25.6793,0C41.3957,0,51.057,10.0926,51.057,26.0972v9.5162H36.2053V26.0972c0-7.3532-3.8945-11.8219-10.526-11.8219-6.7768,0-10.6691,4.4687-10.6691,11.8219,0,3.8945,1.2982,7.3533,5.4786,11.3908l19.754,18.601C46.5861,62.1441,52.21,68.7778,52.21,79.88c0,16.0047-9.95,26.0973-25.9543,26.0973C10.108,105.9776.1585,95.885.1585,79.88V70.362H15.01V79.88c0,7.3533,4.0375,11.822,11.2455,11.822,7.065,0,11.1025-4.4687,11.1025-11.822,0-4.4709-2.1628-8.6514-6.0551-12.2576L11.1158,48.7357C3.043,41.2372.1585,34.8939.1585,25.666.1585,10.0926,9.82,0,25.6793,0Z'%20style='fill:%230e0e19'/%3e%3cpath%20d='M99.7971,69.7856v35.1821H84.9454V1.01h25.3755c16.0047,0,26.0973,10.0926,26.0973,26.0973V43.6883c0,16.15-10.0926,26.0973-26.0973,26.0973Zm10.3808-13.9849c7.2081,0,11.3908-4.3257,11.3908-11.6789V26.6759c0-7.21-4.1827-11.6811-11.3908-11.6811H99.7971V55.8007Z'%20style='fill:%230e0e19'/%3e%3cpath%20d='M278.5812,108.147H263.73V4.1893h26.0972c16.0047,0,26.0973,10.0926,26.0973,26.0972v14.13c0,9.95-4.3257,17.7363-11.3908,22.205,4.1827,12.6889,10.0926,29.9917,13.8418,41.5254h-15.14L290.6914,70.3708h-12.11Zm11.1-51.7632c7.21,0,11.3907-4.3257,11.3907-11.5338V29.8553c0-7.21-4.18-11.6812-11.3907-11.6812h-11.1v38.21Z'%20style='fill:%230e0e19'/%3e%3cpath%20d='M399.844,73.5414V83.06c0,16.0047-9.9474,26.0973-25.9521,26.0973-16.15,0-26.0972-10.0926-26.0972-26.0973V29.2766c0-16.0046,9.9473-26.0972,26.0972-26.0972,16.0047,0,25.9521,10.0926,25.9521,26.0972v9.5161h-14.85V29.2766c0-7.3532-4.0374-11.822-11.1025-11.822-7.21,0-11.2477,4.4688-11.2477,11.822V83.06c0,7.3533,4.0375,11.822,11.2477,11.822,7.0651,0,11.1025-4.4687,11.1025-11.822V73.5414Z'%20style='fill:%230e0e19'/%3e%3c/svg%3e"; function bL() { const e = yL; async function t(n, r, o) { return await _t({ method: "get", url: n, params: r, timeout: o }); } return { defaultImg: e, getRequest: t }; } const wL = ["src"], CL = ["src"], SL = { key: 1, class: "details" }, kL = { key: 0 }, _L = { class: "title text-placeholder" }, EL = { __name: "Card", props: { data: { type: Object, required: !0 }, width: { type: Number, default: 3 }, height: { type: Number, default: 3 }, showCardDetails: { type: Boolean }, bodyStyle: { type: Object, default: () => ({ padding: "20px", background: "#ffffff" }) }, imageStyle: { type: Object, default: () => ({}) }, imageContainerStyle: { type: Object, default: () => ({}) }, shadow: { type: String, default: "always" } }, emits: ["card-clicked", "datalink-clicked"], setup(e, { emit: t }) { function n(y) { let x; try { x = new URL(y); } catch { return !1; } return x.protocol === "http:" || x.protocol === "https:"; } const { defaultImg: r, getRequest: o } = bL(), a = $(); $(null), $(4); const s = $(void 0), i = $(!1), l = $(!1), c = $(!1), u = e, f = t, g = w(() => u.data.title && ((s ? s.value : !1) || i.value) && (u.data.link || u.data.userData)); w(() => showCardDetails ? height * 0.525 : height), w(() => width - 2 * v), w(() => height * 0.237); const v = w(() => height * 0.076); w(() => showCardDetails ? height * 0.525 : height), oe( () => u.data, () => { s.value = void 0, i.value = !1, c.value = !1, l.value = !1, u.data.thumbnail ? n(u.data.thumbnail) && u.data.mimetype ? h(u.data.thumbnail, { fetchAttempts: 0 }) : s.value = u.data.thumbnail : i.value = !0, Re(() => { m(); }); }, { immediate: !0 } ), Nh(() => { Re(() => { m(); }); }); function d() { if (u.data.link) { const y = document.createElement("a"); y.href = u.data.link, y.target = "_blank", document.body.appendChild(y), y.click(), f("datalink-clicked", u.data.link), y.remove(); } u.data.userData && f("card-clicked", u.data.userData); } function h(y, x) { o(y, {}, 11e3).then( (A) => { let k = A.data; typeof k == "string" && k.startsWith("data:") ? s.value = A.data : u.data.mimetype ? s.value = `data:${u.data.mimetype};base64,${A.data}` : s.value = A.data; }, (A) => { A.message.includes("timeout") && A.message.includes("exceeded") && x.fetchAttempts < 3 ? (x.fetchAttempts += 1, h(y, x)) : i.value = !0; } ); } function m() { if (u.data.hideTitle) l.value = !0, c.value = !0; else { const y = a; y && y.offsetParent ? (c.value = !0, y.offsetWidth >= y.scrollWidth ? l.value = !0 : l.value = !1) : u.data.title.length > 20 ? l.value = !1 : l.value = !0; } } return (y, x) => { const A = L4, k = p4, E = y4, T = z4; return C(), J(E, { shadow: e.shadow, "body-style": e.bodyStyle, style: Ue({ padding: "0px", maxWidth: e.width + "rem" }), class: "card" }, { default: P(() => [ xe((C(), F("div", null, [ M("div", { class: "cursor-pointer", style: Ue(e.imageContainerStyle), onClick: Be(d, ["prevent"]) }, [ i.value ? (C(), F("img", { key: 0, src: p(r), style: Ue(e.imageStyle) }, null, 12, wL)) : (C(), F("img", { key: 1, src: s.value, alt: "thumbnail loading ...", style: Ue(e.imageStyle) }, null, 12, CL)) ], 4), G("", !0), e.showCardDetails ? (C(), F("div", SL, [ e.data.hideType ? G("", !0) : (C(), F("p", kL, [ M("b", null, se(e.data.type), 1) ])), V(A, { "virtual-ref": a.value, disabled: l.value, content: e.data.title, placement: "top", trigger: "hover", "popper-class": "gallery-popper", "virtual-triggering": "" }, null, 8, ["virtual-ref", "disabled", "content"]), xe(M("p", { ref_key: "titleText", ref: a, class: "title" }, se(e.data.title), 513), [ [ht, !e.data.hideTitle] ]), xe(M("p", _L, null, 512), [ [ht, e.data.hideTitle] ]), V(k, { class: "button", onClick: Be(d, ["prevent"]), size: "large" }, { default: P(() => [ Ce(" View " + se(e.data.type), 1) ]), _: 1 }) ])) : G("", !0) ])), [ [T, !g.value] ]) ]), _: 1 }, 8, ["shadow", "body-style", "style"]); }; } }, xL = /* @__PURE__ */ Au(EL, [["__scopeId", "data-v-8306387d"]]), il = (e) => ($b("data-v-e745b327"), e = e(), Rb(), e), TL = { ref: "myButton", class: "gallery" }, OL = { class: "gallery-strip" }, IL = /* @__PURE__ */ il(() => /* @__PURE__ */ M("span", { class: "progress-button" }, "‹", -1)), AL = [ IL ], FL = { key: 1, style: { width: "2rem" } }, PL = /* @__PURE__ */ il(() => /* @__PURE__ */ M("div", { class: "filler" }, null, -1)), $L = { class: "card-line" }, RL = /* @__PURE__ */ il(() => /* @__PURE__ */ M("div", { class: "filler" }, null, -1)), NL = /* @__PURE__ */ il(() => /* @__PURE__ */ M("span", { class: "progress-button" }, "›", -1)), LL = [ NL ], BL = { key: 3, style: { width: "2rem" } }, DL = { __name: "Gallery", props: { /** * The array of items (data) to render the gallery. */ items: { type: Array, default: () => [] }, /** * The maximum width we are allowed minus two buttons for next and previous divided by the width of a card. */ maxWidth: { type: Number, default: 3 }, /** * The width of the card in rem unit. */ cardWidth: { type: Number, default: 13.8 }, /** * The option to show indicator bar at the bottom. */ showIndicatorBar: { type: Boolean, default: !0 }, /** * The option to highlight the active item. */ highlightActive: { type: Boolean, default: !0 }, /** * The option to show card details. */ showCardDetails: { type: Boolean, default: !0 }, /** * The CSS to define card's style. */ bodyStyle: { type: Object, default: () => ({ padding: "20px", background: "#ffffff" }) }, /** * The space between the card and indicator bar. */ bottomSpacer: { type: Object, default: () => ({ minHeight: "4rem" }) }, /** * The CSS for image container in card. */ imageContainerStyle: { type: Object, default: () => ({}) }, /** * The CSS for image style in card. */ imageStyle: { type: Object, default: () => ({}) }, // TODO: not in use metaData: { type: Object, default: () => ({ datasetVersion: -1, datasetId: -1 }) }, // TODO: not in use description: { type: String, default: "" }, /** * when to show card shadows (always / hover / never) */ shadow: { type: String, default: "always" } }, emits: ["card-clicked", "datalink-clicked"], setup(e, { expose: t, emit: n }) { function r(R) { return typeof window < "u" ? R * parseFloat(window.getComputedStyle(document.documentElement).fontSize) : R * 16; } const o = e, a = n, s = $(0), i = $(0), l = $(2), c = $(2), u = w(() => o.items.length), f = w(() => i.value > 0), g = w(() => i.value < u.value - 1), v = w(() => 0.78 * o.cardWidth); w(() => u.value * (o.cardWidth + 0.25) - 0.25); const d = w(() => { const R = r(0.5), D = r(2), W = r(o.cardWidth), z = (o.maxWidth - 2 * D - 2 * R) / (1.1 * W); return Math.max(1, Math.floor(z)); }), h = w(() => { const R = r(1), D = o.maxWidth / (R * u.value); return o.showIndicatorBar && D > 0.1 && u.value > 1; }), m = w(() => { const R = Math.floor(d.value / 2); let D = i.value - R; return D < 0 ? D = 0 : D + d.value > u.value && (D = u.value - d.value), D; }), y = w(() => { let R = []; for (let D = 0; D < d.value; D++) R.push(o.items[D + m.value]); return R; }); function x(R) { a("card-clicked", R); } function A(R) { a("datalink-clicked", R); } function k(R) { return i.value - m.value === R && o.highlightActive; } function E() { i.value += 1; } function T() { i.value -= 1; } function I(R) { i.value !== R && (i.value = R); } return t({ count: s, currentIndex: i, controlHeight: l, controlWidth: c, cardClicked: x, isActive: k, goNext: E, goPrev: T, indicatorClicked: I }), (R, D) => (C(), F("div", TL, [ M("div", OL, [ e.items.length > 1 ? (C(), F("a", { key: 0, href: "#", class: N(["oval", "prev", { disabled: !f.value }]), onClick: Be(T, ["prevent"]) }, AL, 2)) : (C(), F("div", FL)), PL, M("div", $L, [ (C(!0), F(Ie, null, ot(y.value, (W, z) => (C(), F("span", { key: "card_" + z, class: N(["key-image-span", { active: k(z) }]) }, [ W ? (C(), J(xL, { key: 0, data: W, "body-style": e.bodyStyle, "image-container-style": e.imageContainerStyle, "image-style": e.imageStyle, width: e.cardWidth, height: v.value, shadow: e.shadow, "show-card-details": e.showCardDetails, onCardClicked: x, onDatalinkClicked: A }, null, 8, ["data", "body-style", "image-container-style", "image-style", "width", "height", "shadow", "show-card-details"])) : G("", !0) ], 2))), 128)) ]), RL, e.items.length > 1 ? (C(), F("a", { key: 2, href: "#", class: N(["oval", "next", { disabled: !g.value }]), onClick: Be(E, ["prevent"]) }, LL, 2)) : (C(), F("div", BL)) ]), M("div", { style: Ue(e.bottomSpacer) }, null, 4), h.value ? (C(), J(LA, { key: 0, count: u.value, current: i.value, onClicked: I }, null, 8, ["count", "current"])) : G("", !0) ], 512)); } }, ML = /* @__PURE__ */ Au(DL, [["__scopeId", "data-v-e745b327"]]), jL = { name: "S3Bucket", data() { return { s3Bucket: void 0, s3Prefix: "" }; }, methods: { updateS3Bucket: function(e) { if (this.s3Bucket = void 0, e) { const t = e.split("//")[1]; if (t) { this.s3Bucket = t.split("/")[0]; const n = t.indexOf("/"); this.s3Prefix = t.substring(n + 1); return; } } }, getS3Args: function() { return this.s3Bucket ? `?s3BucketName=${this.s3Bucket}` : ""; }, getS3Prefix: function() { return this.s3Prefix; } } }, Oo = (e) => e.split("\\").pop().split("/").pop(), Kr = function(e) { return e.replace(/\b\w/g, (t) => t.toUpperCase()); }, VL = { name: "ImageGallery", components: { Gallery: ML }, mixins: [PA, jL], props: { datasetBiolucida: { type: Object, default: () => ({}) }, envVars: { type: Object, default: () => { } }, label: { type: String, default: "" }, plots: { type: Array, default: () => [] }, datasetId: { type: Number, default: -1 }, datasetVersion: { type: Number, default: -1 }, datasetThumbnail: { type: String, default: "" }, category: { type: String, default: "All" }, entry: { type: Object, default: () => ({}) } }, data() { return { currentIndex: 0, ro: null, maxWidth: 3, items: { //Use the Images instead for Biolucida Images //"Biolucida Images": [], Dataset: [], Flatmaps: [], Images: [], Scaffolds: [], Segmentations: [], Simulations: [], Videos: [], Plots: [] }, bodyStyle: { padding: "0px", background: "#ffffff" }, imageContainerStyle: { width: "160px", height: "160px", display: "flex", alignItems: "center", justifyContent: "center" }, imageStyle: { maxWidth: "160px", maxHeight: "160px" }, shadow: "never", bottomSpacer: { minHeight: "0rem" }, resetIndex: !1 }; }, methods: { cardClicked: function(e) { this.$emit("card-clicked", e); }, datalinkClicked: function(e) { this.$emit("datalink-clicked", e); }, createSciCurnchItems: function() { this.updateS3Bucket(this.entry.s3uri), this.createDatasetItem(), this.createFlatmapItems(), this.createScaffoldItems(), this.createSimulationItems(), this.createPlotItems(), this.createSegmentationItems(); }, createDatasetItem: function() { const e = `${this.envVars.ROOT_URL}/datasets/${this.datasetId}?type=dataset`; this.datasetThumbnail && this.items.Dataset.push({ id: -1, //Work around gallery requires a truthy string title: " ", type: `Dataset ${this.datasetId}`, thumbnail: this.datasetThumbnail, link: e, hideType: !0, hideTitle: !0 }); }, createFlatmapItems: function() { this.entry.flatmaps && this.entry.flatmaps.forEach((e) => { var t; if ((t = e.associated_flatmap) != null && t.identifier) { const n = e.dataset.path, r = e.identifier, o = this.getThumbnailForPlot( e, this.entry.thumbnails ); let a, s = ""; o && (a = this.getImageURL(this.envVars.API_LOCATION, { id: r, prefix: this.getS3Prefix(), file_path: o.dataset.path, s3Bucket: this.s3Bucket }), s = o.mimetype.name); let i = { label: Kr(this.label), resource: e.associated_flatmap.identifier, title: "View Flatmap", type: "Flatmap", discoverId: this.datasetId, version: this.datasetVersion }; this.items.Flatmaps.push({ id: r, title: Oo(n), type: "Flatmap", thumbnail: a, userData: i, hideType: !0, mimetype: s }); } }); }, createImageItems: function() { this.entry.images && this.entry.images.forEach((e) => { const t = e.dataset.path, n = e.identifier, r = `${this.envVars.ROOT_URL}/datasets/imageviewer?dataset_id=${this.datasetId}&dataset_version=${this.datasetVersion}&file_path=${t}&mimetype=${e.mimetype.name}`; this.items.Images.push({ id: n, title: Oo(t), type: "Image", link: r, hideType: !0 }); }); }, createPlotItems: function() { this.entry.plots && this.entry.plots.forEach((e) => { const t = e.dataset.path, n = e.identifier, r = this.getThumbnailForPlot( e, this.entry.thumbnails ); let o, a = ""; r && (o = this.getImageURL(this.envVars.API_LOCATION, { id: n, prefix: this.getS3Prefix(), file_path: r.dataset.path, s3Bucket: this.s3Bucket }), a = r.mimetype.name); const s = e.datacite, i = `${this.envVars.API_LOCATION}/s3-resource/${this.getS3Prefix()}files/`, l = i + e.dataset.path + this.getS3Args(); let c = {}; try { c = JSON.parse( s.supplemental_json_metadata.description ); } catch (v) { console.warn(v); } let u = []; s.isDescribedBy && u.push({ url: i + s.isDescribedBy.path }); const f = { dataSource: { url: l }, metadata: c, supplementalData: u }; let g = { label: Kr(this.label), resource: f, s3uri: this.entry.s3uri, title: "View plot", type: "Plot", discoverId: this.discoverId, version: this.datasetVersion }; this.items.Plots.push({ id: n, title: Oo(t), type: "Plot", thumbnail: o, userData: g, hideType: !0, mimetype: a }); }); }, createScaffoldItems: function() { if (this.entry.scaffolds) { let e = 0; this.entry.scaffolds.forEach((t, n) => { const r = t.dataset.path, o = t.identifier, a = this.getThumbnailForScaffold( t, this.entry.scaffoldViews, this.entry.thumbnails, e ); let s = "", i; a && (i = this.getImageURL(this.envVars.API_LOCATION, { id: o, prefix: this.getS3Prefix(), file_path: a.dataset.path, s3Bucket: this.s3Bucket }), s = a.mimetype.name); let l = { label: Kr(this.label), resource: `${this.envVars.API_LOCATION}s3-resource/${this.getS3Prefix()}files/${r}${this.getS3Args()}`, title: "View 3D scaffold", type: "Scaffold", discoverId: this.datasetId, apiLocation: this.envVars.API_LOCATION, version: this.datasetVersion, banner: this.datasetThumbnail, s3uri: this.entry.s3uri, contextCardUrl: this.getContextCardUrl(n) }; this.items.Scaffolds.push({ id: o, title: Oo(r), type: "Scaffold", thumbnail: i, userData: l, hideType: !0, mimetype: s }); }); } }, createSegmentationItems: function() { this.entry.segmentation && this.entry.segmentation.forEach((e) => { const t = e.id; let n = e.dataset.path; n = n.replaceAll(" ", "_"), n = n.replaceAll(",", "_"); const o = { share_link: `${this.envVars.NL_LINK_PREFIX}/dataviewer?datasetId=${this.datasetId}&version=${this.datasetVersion}&path=files/${n}` }; let a = { label: Kr(this.label), resource: o, datasetId: this.datasetId, s3uri: this.entry.s3uri, title: "View segmentation", type: "Segmentation" }; const s = this.getSegmentationThumbnailURL( this.envVars.API_LOCATION, { id: t, datasetId: this.datasetId, datasetVersion: this.datasetVersion, segmentationFilePath: n, s3Bucket: this.s3Bucket } ); this.items.Segmentations.push({ id: t, title: Oo(n), type: "Segmentation", thumbnail: s, userData: a, hideType: !0, mimetype: "image/png" }); }); }, createSimulationItems: function() { this.entry.simulation && this.entry.simulation.forEach((e) => { if (e.additional_mimetype.name === "application/x.vnd.abi.simulation+json") { let t = { label: void 0, apiLocation: this.envVars.API_LOCATION, s3uri: this.entry.s3uri, version: this.datasetVersion, title: "View simulation", type: "Simulation", name: this.entry.name, description: this.entry.description, discoverId: this.datasetId, dataset: `${this.envVars.ROOT_URL}/datasets/${this.datasetId}?type=dataset` }; this.items.Simulations.push({ id: "simulation", title: " ", type: "Simulation", hideType: !0, hideTitle: !0, userData: t }); } else { const t = e.dataset.path, n = e.identifier, r = this.getThumbnailForPlot( e, this.entry.thumbnails ); let o, a = ""; r && (o = this.getImageURL(this.envVars.API_LOCATION, { id: n, prefix: this.getS3Prefix(), file_path: r.dataset.path, s3Bucket: this.s3Bucket }), a = r.mimetype.name); const s = `${this.envVars.API_LOCATION}s3-resource/${this.getS3Prefix()}files/${t}${this.getS3Args()}`; let i = { label: Kr(this.label), resource: s, s3uri: this.entry.s3uri, title: "View simulation", type: "Simulation", discoverId: this.discoverId, version: this.datasetVersion }; this.items.Simulations.push({ id: n, title: Oo(t), type: "Simulation", thumbnail: o, userData: i, hideType: !0, mimetype: a }); } }); }, createVideoItems: function() { this.entry.videos && this.entry.videos.forEach((e) => { const t = this.getS3FilePath( this.datasetId, this.datasetVersion, e.dataset.path ), n = `${this.envVars.ROOT_URL}/datasets/videoviewer?dataset_version=${this.datasetVersion}&dataset_id=${this.datasetId}&file_path=${t}&mimetype=${e.mimetype.name}`; this.items.Videos.push({ title: e.name, type: "Video", thumbnail: this.defaultVideoImg, hideType: !0, link: n }); }); }, onResize: function() { this.maxWidth = this.$el.clientWidth; }, getContextCardUrl: function(e) { if (!(!this.entry.contextualInformation || this.entry.contextualInformation.length == 0)) { let t = this.entry["abi-contextual-information"].length == this.entry.scaffolds.length ? e : 0; return `${this.envVars.API_LOCATION}s3-resource/${this.getS3Prefix()}files/${this.entry.contextualInformation[t]}${this.getS3Args()}`; } }, getImageURL: function(e, t) { let n = `${e}/s3-resource/${t.prefix}files/${t.file_path}?encodeBase64=true`; return t.s3Bucket && (n = n + `&s3BucketName=${t.s3Bucket}`), n; } }, computed: { galleryItems() { this.resetIndex && this.$refs.gallery.indicatorClicked(0); let e = [...this.items.Dataset]; if (this.category === "All") { for (const [t, n] of Object.entries(this.items)) t !== "Dataset" && (e = e.concat(n)); return e; } else return [...this.items[this.category]]; } }, created: function() { this.createSciCurnchItems(); }, watch: { category: function() { this.resetIndex = !0; }, galleryItems: function() { this.resetIndex = !1; }, datasetBiolucida: { deep: !0, immediate: !0, handler: function(e) { let t = []; "dataset_images" in e && t.push( ...Array.from(e.dataset_images, (n) => { const r = this.getThumbnailURLFromBiolucida( this.envVars.API_LOCATION, { id: n.image_id } ), o = { share_link: n.share_link, id: n.image_id, itemId: n.sourcepkg_id }; let a = { label: Kr(this.label), resource: o, datasetId: this.datasetId, title: "View image", name: Kr(this.label), type: "Biolucida" }; return { id: n.image_id, title: "Image", type: "Image", thumbnail: r, userData: a, mimetype: "image/png", hideType: !0 }; }) ), this.items.Images = t; } } }, mounted() { this.ro = new ResizeObserver(this.onResize).observe(this.$el); }, unmounted() { delete this.ro; } }, zL = { class: "full-size" }; function HL(e, t, n, r, o, a) { const s = Se("Gallery"); return C(), F("div", zL, [ V(s, { bottomSpacer: o.bottomSpacer, cardWidth: 10, items: a.galleryItems, "max-width": o.maxWidth, "show-indicator-bar": !1, "show-card-details": !0, "highlight-active": !1, "image-style": o.imageStyle, "image-container-style": o.imageContainerStyle, "body-style": o.bodyStyle, shadow: o.shadow, onCardClicked: a.cardClicked, onDatalinkClicked: a.datalinkClicked, ref: "gallery" }, null, 8, ["bottomSpacer", "items", "max-width", "image-style", "image-container-style", "body-style", "shadow", "onCardClicked", "onDatalinkClicked"]) ]); } const Y0 = /* @__PURE__ */ Nn(VL, [["render", HL], ["__scopeId", "data-v-f1a33db5"]]), X0 = "3.7.7", UL = X0, ra = typeof Buffer == "function", wh = typeof TextDecoder == "function" ? new TextDecoder() : void 0, Ch = typeof TextEncoder == "function" ? new TextEncoder() : void 0, qL = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", ba = Array.prototype.slice.call(qL), Rs = ((e) => { let t = {}; return e.forEach((n, r) => t[n] = r), t; })(ba), KL = /^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/, Ft = String.fromCharCode.bind(String), Sh = typeof Uint8Array.from == "function" ? Uint8Array.from.bind(Uint8Array) : (e) => new Uint8Array(Array.prototype.slice.call(e, 0)), Q0 = (e) => e.replace(/=/g, "").replace(/[+\/]/g, (t) => t == "+" ? "-" : "_"), ey = (e) => e.replace(/[^A-Za-z0-9\+\/]/g, ""), ty = (e) => { let t, n, r, o, a = ""; const s = e.length % 3; for (let i = 0; i < e.length; ) { if ((n = e.charCodeAt(i++)) > 255 || (r = e.charCodeAt(i++)) > 255 || (o = e.charCodeAt(i++)) > 255) throw new TypeError("invalid character found"); t = n << 16 | r << 8 | o, a += ba[t >> 18 & 63] + ba[t >> 12 & 63] + ba[t >> 6 & 63] + ba[t & 63]; } return s ? a.slice(0, s - 3) + "===".substring(s) : a; }, sd = typeof btoa == "function" ? (e) => btoa(e) : ra ? (e) => Buffer.from(e, "binary").toString("base64") : ty, Ic = ra ? (e) => Buffer.from(e).toString("base64") : (e) => { let n = []; for (let r = 0, o = e.length; r < o; r += 4096) n.push(Ft.apply(null, e.subarray(r, r + 4096))); return sd(n.join("")); }, Ys = (e, t = !1) => t ? Q0(Ic(e)) : Ic(e), WL = (e) => { if (e.length < 2) { var t = e.charCodeAt(0); return t < 128 ? e : t < 2048 ? Ft(192 | t >>> 6) + Ft(128 | t & 63) : Ft(224 | t >>> 12 & 15) + Ft(128 | t >>> 6 & 63) + Ft(128 | t & 63); } else { var t = 65536 + (e.charCodeAt(0) - 55296) * 1024 + (e.charCodeAt(1) - 56320); return Ft(240 | t >>> 18 & 7) + Ft(128 | t >>> 12 & 63) + Ft(128 | t >>> 6 & 63) + Ft(128 | t & 63); } }, GL = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g, ny = (e) => e.replace(GL, WL), kh = ra ? (e) => Buffer.from(e, "utf8").toString("base64") : Ch ? (e) => Ic(Ch.encode(e)) : (e) => sd(ny(e)), Po = (e, t = !1) => t ? Q0(kh(e)) : kh(e), _h = (e) => Po(e, !0), JL = /[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g, ZL = (e) => { switch (e.length) { case 4: var t = (7 & e.charCodeAt(0)) << 18 | (63 & e.charCodeAt(1)) << 12 | (63 & e.charCodeAt(2)) << 6 | 63 & e.charCodeAt(3), n = t - 65536; return Ft((n >>> 10) + 55296) + Ft((n & 1023) + 56320); case 3: return Ft((15 & e.charCodeAt(0)) << 12 | (63 & e.charCodeAt(1)) << 6 | 63 & e.charCodeAt(2)); default: return Ft((31 & e.charCodeAt(0)) << 6 | 63 & e.charCodeAt(1)); } }, ry = (e) => e.replace(JL, ZL), oy = (e) => { if (e = e.replace(/\s+/g, ""), !KL.test(e)) throw new TypeError("malformed base64."); e += "==".slice(2 - (e.length & 3)); let t, n = "", r, o; for (let a = 0; a < e.length; ) t = Rs[e.charAt(a++)] << 18 | Rs[e.charAt(a++)] << 12 | (r = Rs[e.charAt(a++)]) << 6 | (o = Rs[e.charAt(a++)]), n += r === 64 ? Ft(t >> 16 & 255) : o === 64 ? Ft(t >> 16 & 255, t >> 8 & 255) : Ft(t >> 16 & 255, t >> 8 & 255, t & 255); return n; }, id = typeof atob == "function" ? (e) => atob(ey(e)) : ra ? (e) => Buffer.from(e, "base64").toString("binary") : oy, ay = ra ? (e) => Sh(Buffer.from(e, "base64")) : (e) => Sh(id(e).split("").map((t) => t.charCodeAt(0))), sy = (e) => ay(iy(e)), YL = ra ? (e) => Buffer.from(e, "base64").toString("utf8") : wh ? (e) => wh.decode(ay(e)) : (e) => ry(id(e)), iy = (e) => ey(e.replace(/[-_]/g, (t) => t == "-" ? "+" : "/")), Ac = (e) => YL(iy(e)), XL = (e) => { if (typeof e != "string") return !1; const t = e.replace(/\s+/g, "").replace(/={0,2}$/, ""); return !/[^\s0-9a-zA-Z\+/]/.test(t) || !/[^\s0-9a-zA-Z\-_]/.test(t); }, ly = (e) => ({ value: e, enumerable: !1, writable: !0, configurable: !0 }), cy = function() { const e = (t, n) => Object.defineProperty(String.prototype, t, ly(n)); e("fromBase64", function() { return Ac(this); }), e("toBase64", function(t) { return Po(this, t); }), e("toBase64URI", function() { return Po(this, !0); }), e("toBase64URL", function() { return Po(this, !0); }), e("toUint8Array", function() { return sy(this); }); }, uy = function() { const e = (t, n) => Object.defineProperty(Uint8Array.prototype, t, ly(n)); e("toBase64", function(t) { return Ys(this, t); }), e("toBase64URI", function() { return Ys(this, !0); }), e("toBase64URL", function() { return Ys(this, !0); }); }, QL = () => { cy(), uy(); }, e6 = { version: X0, VERSION: UL, atob: id, atobPolyfill: oy, btoa: sd, btoaPolyfill: ty, fromBase64: Ac, toBase64: Po, encode: Po, encodeURI: _h, encodeURL: _h, utob: ny, btou: ry, decode: Ac, isValid: XL, fromUint8Array: Ys, toUint8Array: sy, extendString: cy, extendUint8Array: uy, extendBuiltins: QL }; function t6(e) { return { all: e = e || /* @__PURE__ */ new Map(), on: function(t, n) { var r = e.get(t); r ? r.push(n) : e.set(t, [n]); }, off: function(t, n) { var r = e.get(t); r && (n ? r.splice(r.indexOf(n) >>> 0, 1) : e.set(t, [])); }, emit: function(t, n) { var r = e.get(t); r && r.slice().map(function(o) { o(n); }), (r = e.get("*")) && r.slice().map(function(o) { o(t, n); }); } }; } const Pe = new t6(), bi = { "homo sapiens": "Human", "rattus norvegicus": "Rat", "mus musculus": "Mouse", "sus scrofa domesticus": "Pig", "sus scrofa": "Boar", "felis catus": "Cat" }, Eh = "data:image/svg+xml,%3csvg%20width='429'%20height='238'%20viewBox='0%200%20429%20238'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3emissing-image-4x3%3c/title%3e%3cg%20fill-rule='nonzero'%20fill='none'%3e%3cpath%20d='M0%200h429v238H0z'%20fill='%23F0F1F2'/%3e%3cpath%20d='M160.875%2079v77.7h107.25V79h-107.25zm101.888%204.9v39.8l-28.85-26.1-28.744%2026.8-14.693-13.7-24.239%2022.7V83.9h96.525zm-96.525%2056.5l24.345-22.7%2036.358%2033.9h-60.704v-11.2zm68.21%2011.3l-25.525-23.8%2024.99-23.3%2028.85%2026.1v21h-28.314z'%20fill='%23DCDDDF'/%3e%3c/g%3e%3c/svg%3e", n6 = { data() { return { ElIconView: Jh }; }, name: "DatasetCard", components: { BadgesGroup: lm, ImageGallery: Y0, Button: Kt, Icon: He, CopyToClipboard: ev }, props: { /** * Object containing information for * the required viewing. */ entry: { type: Object, default: () => { } }, envVars: { type: Object, default: () => { } } }, data: function() { return { thumbnail: Eh, dataLocation: this.entry.doi, discoverId: void 0, loading: !0, version: 1, lastDoi: void 0, biolucidaData: void 0, currentCategory: "All", copyContent: "" }; }, computed: { contributors: function() { let e = ""; return this.entry.contributors && (this.entry.contributors.length === 1 ? e = this.lastName(this.entry.contributors[0].name) : this.entry.contributors.length === 2 ? e = this.lastName(this.entry.contributors[0].name) + " & " + this.lastName(this.entry.contributors[1].name) : this.entry.contributors.length > 2 && (e = this.lastName(this.entry.contributors[0].name) + " et al.")), e; }, samples: function() { let e = ""; return this.entry.species && (bi[this.entry.species[0].toLowerCase()] ? e = `${bi[this.entry.species[0].toLowerCase()]}` : e = `${this.entry.species}`), this.entry.numberSamples > 0 && (e += " (", this.entry.numberSamples === 1 ? e += `${this.entry.numberSamples} sample` : this.entry.numberSamples > 1 && (e += `${this.entry.numberSamples} samples`), this.entry.numberSubjects === 1 ? e += ` from ${this.entry.numberSubjects} subject` : this.entry.numberSamples > 1 && (e += ` from ${this.entry.numberSubjects} subjects`), e += ")"), e; }, label: function() { return this.entry.organs ? this.entry.organs[0] : this.entry.name; }, publishYear: function() { return this.entry.publishDate.split("-")[0]; } }, mounted: function() { this.updateCopyContent(); }, methods: { cardClicked: function() { this.openDataset(); }, categoryChanged: function(e) { this.currentCategory = e; }, galleryClicked: function(e) { this.propogateCardAction(e); }, galleryDatalinkClicked: function(e) { Pe.emit("datalink-clicked", e); }, openDataset: function() { window.open(this.dataLocation, "_blank"); }, openRepository: function() { let e = this.envVars.API_LOCATION; this.entry.additionalLinks.forEach(function(t) { if (t.description == "Repository") { let n = new XMLHttpRequest(); n.open("POST", e + "/pmr_latest_exposure", !0), n.setRequestHeader("Content-type", "application/json"), n.onreadystatechange = () => { if (n.readyState === 4) { let r = ""; n.status === 200 && (r = JSON.parse(n.responseText).url), r === "" && (r = t.uri), window.open(r, "_blank"); } }, n.send(JSON.stringify({ workspace_url: t.uri })); } }); }, propogateCardAction: function(e) { Pe.emit("PopoverActionClick", e), Pe.emit("contextUpdate", e); }, splitDOI: function(e) { return [ e.split("/")[e.split("/").length - 2], e.split("/")[e.split("/").length - 1] ]; }, getBanner: function() { if (this.lastDoi !== this.entry.doi) { this.lastDoi = this.entry.doi, this.loading = !0; let e = this.splitDOI(this.entry.doi); fetch( `${this.envVars.PENNSIEVE_API_LOCATION}/discover/datasets/doi/${e[0]}/${e[1]}` ).then((t) => { if (t.ok) return t.json(); throw Error(t.statusText); }).then((t) => { this.thumbnail = t.banner, this.discoverId = t.id, this.version = t.version, this.dataLocation = `https://sparc.science/datasets/${t.id}?type=dataset`, this.getBiolucidaInfo(), this.loading = !1, this.updateCopyContent(); }).catch(() => { this.thumbnail = Eh, this.discoverId = Number(this.entry.datasetId), this.loading = !1; }); } }, lastName: function(e) { return e.split(",")[0]; }, getBiolucidaInfo: function() { const e = [], t = "biolucida-2d" in this.entry ? this.entry["biolucida-2d"] : [], n = "biolucida-3d" in this.entry ? this.entry["biolucida-3d"] : []; t.concat(n).forEach((r) => { var a; const o = (a = r.biolucida) == null ? void 0 : a.identifier; if (o) { const s = "identifier" in r ? r.identifier : "", l = `https://sparc.biolucida.net/image?c=${encodeURIComponent(e6.encode(`${o}-col-260`))}`; e.push({ share_link: l, image_id: o, sourcepkg_id: s }); } }), e.length > 0 && (this.biolucidaData = { dataset_images: e }); }, updateCopyContent: function() { const e = []; if (this.entry.name && e.push(`
${this.entry.name}
`), this.contributors) { let t = this.contributors; this.entry.publishDate && (t += ` (${this.publishYear})`), e.push(`
${t}
`); } if (this.samples && e.push(`
${this.samples}
`), this.entry.doi) { let t = "
DOI:
"; t += ` `, t += `${this.entry.doi}`, e.push(`
${t}
`); } if (this.entry.datasetId) { let t = "
Dataset ID:
"; t += ` `, t += `${this.entry.datasetId}`, e.push(`
${t}
`); } if (this.dataLocation) { let t = "
Dataset URL:
"; t += ` `, t += `${this.dataLocation}`, e.push(`
${t}
`); } if (this.version) { let t = "
Dataset version:
"; t += ` `, t += `${this.version}`, e.push(`
${t}
`); } this.copyContent = e.join(`
`); } }, created: function() { this.getBanner(); }, watch: { // currently not using card overflow "entry.description": function() { this.getBanner(); } } }, r6 = { class: "dataset-card-container", ref: "container" }, o6 = { class: "dataset-card", ref: "card" }, a6 = { class: "card" }, s6 = { class: "card-left" }, i6 = { class: "card-right" }, l6 = { class: "details" }, c6 = { class: "details" }, u6 = { key: 0, class: "details loading-icon" }, d6 = { class: "badges-container" }, f6 = { class: "float-button-container" }; function p6(e, t, n, r, o, a) { const s = Y0, i = Kt, l = lm, c = Se("CopyToClipboard"), u = Zo; return C(), F("div", r6, [ M("div", o6, [ t[2] || (t[2] = M("div", { class: "seperator-path" }, null, -1)), xe((C(), F("div", a6, [ M("span", s6, [ !e.loading && e.discoverId ? (C(), J(s, { key: 0, datasetId: e.discoverId, datasetVersion: e.version, entry: n.entry, envVars: n.envVars, label: a.label, datasetThumbnail: e.thumbnail, "dataset-biolucida": e.biolucidaData, category: e.currentCategory, onCardClicked: a.galleryClicked, onDatalinkClicked: a.galleryDatalinkClicked }, null, 8, ["datasetId", "datasetVersion", "entry", "envVars", "label", "datasetThumbnail", "dataset-biolucida", "category", "onCardClicked", "onDatalinkClicked"])) : G("", !0) ]), M("div", i6, [ M("div", { class: "title", onClick: t[0] || (t[0] = (...f) => a.cardClicked && a.cardClicked(...f)) }, se(n.entry.name), 1), M("div", l6, se(a.contributors) + " " + se(n.entry.publishDate ? `(${a.publishYear})` : ""), 1), M("div", c6, se(a.samples), 1), n.entry.detailsReady ? G("", !0) : xe((C(), F("div", u6, null, 512)), [ [u, !n.entry.detailsReady] ]), M("div", null, [ n.entry.simulation ? (C(), J(i, { key: 0, onClick: a.openRepository, size: "small", class: "button", icon: o.ElIconView }, { default: P(() => t[1] || (t[1] = [ Ce("View repository") ])), _: 1 }, 8, ["onClick", "icon"])) : G("", !0) ]), M("div", d6, [ V(l, { entry: n.entry, "dataset-biolucida": e.biolucidaData, onCategoryChanged: a.categoryChanged }, null, 8, ["entry", "dataset-biolucida", "onCategoryChanged"]) ]), M("div", f6, [ V(c, { content: e.copyContent }, null, 8, ["content"]) ]) ]) ])), [ [u, e.loading] ]) ], 512) ], 512); } const dy = /* @__PURE__ */ Nn(n6, [["render", p6], ["__scopeId", "data-v-8c3bc5e0"]]), xh = 12; function Th() { const e = new Uint8Array(16); window.crypto.getRandomValues(e), e[6] = e[6] & 15 | 64, e[8] = e[8] & 63 | 128; const t = Array.from(e).map((n) => n.toString(16).padStart(2, "0")).join(""); return `${t.slice(0, 8)}-${t.slice(8, 12)}-${t.slice(12, 16)}-${t.slice(16, 20)}-${t.slice(20)}`; } const h6 = { name: "SearchHistory", components: { Tag: lo, Select: zi }, props: { localStorageKey: { type: String, default: "" } }, data() { return { searchHistory: [], savedSearchHistory: [] }; }, mounted: function() { this.getSearchHistory(), Pe.on("search-changed", (e) => { this.setSearchHistory(e); }), this.updateSearchHistory(), this.savedSearchHistory = this.searchHistory.filter((e) => e.saved); }, methods: { getSearchHistory() { localStorage.getItem(this.localStorageKey) ? this.searchHistory = JSON.parse(localStorage.getItem(this.localStorageKey)) : this.searchHistory = []; }, clearSearchHistory() { localStorage.removeItem(this.localStorageKey), this.searchHistory = []; }, sortFilters(e, t) { return e.facetPropPath.localeCompare(t.facetPropPath); }, // Sort by saved and updated sortSearchHistory(e, t) { return e.saved !== t.saved ? t.saved - e.saved : e.updated !== t.updated ? t.updated - e.updated : 0; }, addSearchToHistory(e = [], t = "") { if (t = t.trim(), !this.searchHistory.some((r) => { let o = r.filters, a = e; o = o.sort(this.sortFilters), a = a.sort(this.sortFilters); const s = JSON.stringify(o), i = JSON.stringify(a); return r.search === t && s === i; })) { const { label: r, longLabel: o } = this.searchHistoryItemLabel(t, e); if (r || o) { const a = { filters: e, search: t, saved: !1, label: r, longLabel: o, id: Th(), updated: (/* @__PURE__ */ new Date()).getTime() }; this.searchHistory.push(a), this.searchHistory = this.searchHistory.sort(this.sortSearchHistory), this.trimSearchHistory(), localStorage.setItem(this.localStorageKey, JSON.stringify(this.searchHistory)); } } }, /** * Remove the duplicate items in search history. */ removeDuplicateSearchHistory: function() { const e = [], t = []; this.searchHistory.forEach((n) => { const r = `${n.search}-${JSON.stringify(n.filters)}`, o = e.find((a) => a.key === r); o ? n.saved ? t.push(o.id) : t.push(n.id) : e.push({ id: n.id, key: r }); }), t.length && (this.searchHistory = this.searchHistory.filter((n) => !t.includes(n.id))); }, /** * Function to trim search history to maximum items, */ trimSearchHistory: function() { if (this.searchHistory.length > xh) { const e = this.searchHistory.filter((r) => r.saved), t = this.searchHistory.filter((r) => !r.saved), n = xh - this.searchHistory.length; this.searchHistory = [ ...e, ...t.slice(0, n) ]; } }, updateSearchHistory: function() { this.searchHistory.forEach((e) => { if (e.id || (e.id = Th()), !e.label) { const { label: t, longLabel: n } = this.searchHistoryItemLabel(e.search, e.filters); e.label = t, e.longLabel = n; } e.filters = e.filters.sort(this.sortFilters), e.saved || (e.saved = !1), e.updated || (e.updated = (/* @__PURE__ */ new Date()).getTime()); }), this.searchHistory = this.searchHistory.sort(this.sortSearchHistory), this.removeDuplicateSearchHistory(), this.trimSearchHistory(), localStorage.setItem(this.localStorageKey, JSON.stringify(this.searchHistory)); }, getParentComponentName: function() { var r, o; const e = ((r = this.localStorageKey) == null ? void 0 : r.indexOf("connectivity")) !== -1, t = ((o = this.localStorageKey) == null ? void 0 : o.indexOf("dataset")) !== -1; return e ? "connectivity" : t ? "dataset" : ""; }, search: function(e) { this.$emit("search", e); const t = this.getParentComponentName(); Pe.emit("trackEvent", { event_name: "portal_maps_search_history_click", category: e.longLabel || e.label, location: `map_sidebar_${t}` }); }, searchHistoryItemLabel: function(e, t) { let n = e ? `"${e.trim()}"` : "", r = "", o = [], a = []; return t && (o = t.filter((s) => s.facet !== "Show all"), a = o.map((s) => s.tagLabel || s.facet)), n && o.length && (r += n, r += `, ${a.join(", ")}`, n += ` (+${o.length})`), !n && o.length && (n = o[0].tagLabel || o[0].facet, o.length > 1 && (r += `${a.join(", ")}`, n += ` (+${o.length - 1})`)), n ? n.length > 15 && !r && (r = n) : n = "", { label: n, longLabel: r }; }, toggleSavedSearch: function(e) { this.searchHistory.forEach((r) => { r.id === e.id && (r.saved = !r.saved); }), this.savedSearchHistory = this.searchHistory.filter((r) => r.saved), this.updateSearchHistory(); const t = e.saved ? "portal_maps_search_history_saved" : "portal_maps_search_history_unsaved", n = this.getParentComponentName(); Pe.emit("trackEvent", { event_name: t, category: e.longLabel || e.label, location: `map_sidebar_${n}` }); }, removeFromSavedSearch: function(e) { const t = this.searchHistory.findIndex((r) => r.id === e.id); this.searchHistory.splice(t, 1), this.savedSearchHistory = this.searchHistory.filter((r) => r.saved), this.updateSearchHistory(); const n = this.getParentComponentName(); Pe.emit("trackEvent", { event_name: "portal_maps_search_history_removed", category: e.longLabel || e.label, location: `map_sidebar_${n}` }); } } }, v6 = { key: 0, class: "history-container" }, g6 = { key: 0, class: "saved-search-history" }, m6 = { key: 1 }, y6 = { class: "el-dropdown-select" }, b6 = ["onClick"], w6 = ["onClick"], C6 = { key: 0, viewBox: "0 0 24 24" }, S6 = { key: 1, viewBox: "0 0 24 24" }, k6 = { key: 0 }, _6 = { key: 1 }, E6 = { key: 2 }; function x6(e, t, n, r, o, a) { const s = Qa, i = lo, l = Ei, c = He, u = Kt, f = Zl, g = D3, v = M3, d = B3; return o.searchHistory.length ? (C(), F("div", v6, [ o.savedSearchHistory.length ? (C(), F("div", g6, [ (C(!0), F(Ie, null, ot(o.savedSearchHistory, (h, m) => (C(), F(Ie, { key: h.id }, [ m < 2 ? (C(), J(i, { class: "search-tag", key: m, onClick: (y) => a.search(h), size: "large" }, { default: P(() => [ h.longLabel ? (C(), J(s, { key: 0, width: "auto", trigger: "hover", "show-after": 200, persistent: !1, "popper-class": "popover-dropdown" }, { reference: P(() => [ Ce(se(h.label), 1) ]), default: P(() => [ Ce(" " + se(h.longLabel), 1) ]), _: 2 }, 1024)) : (C(), F(Ie, { key: 1 }, [ Ce(se(h.label), 1) ], 64)) ]), _: 2 }, 1032, ["onClick"])) : G("", !0) ], 64))), 128)) ])) : (C(), F("div", m6, t[0] || (t[0] = [ M("span", { class: "empty-saved-search" }, "No Saved Searches", -1) ]))), V(d, { trigger: "click", "hide-on-click": !1 }, { dropdown: P(() => [ V(v, null, { default: P(() => [ (C(!0), F(Ie, null, ot(o.searchHistory, (h) => (C(), J(g, { key: h.id }, { default: P(() => [ M("div", null, [ h.longLabel ? (C(), J(s, { key: 0, width: "auto", trigger: "hover", "show-after": 200, persistent: !1, "popper-class": "popover-dropdown" }, { reference: P(() => [ M("span", { class: "dropdown-clickable-item", onClick: (m) => a.search(h) }, se(h.label), 9, b6) ]), default: P(() => [ Ce(" " + se(h.longLabel), 1) ]), _: 2 }, 1024)) : (C(), F("span", { key: 1, class: "dropdown-clickable-item", onClick: (m) => a.search(h) }, se(h.label), 9, w6)) ]), M("div", null, [ V(s, { width: "auto", trigger: "hover", "show-after": 200, persistent: !1, "popper-class": "popover-dropdown" }, { reference: P(() => [ V(u, { circle: "", text: "", size: "small", onClick: (m) => a.toggleSavedSearch(h), disabled: o.savedSearchHistory.length > 1 && !h.saved }, { default: P(() => [ V(c, { color: "#8300BF" }, { default: P(() => [ h.saved ? (C(), F("svg", C6, t[2] || (t[2] = [ M("path", { d: "m12 21.35-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54z" }, null, -1) ]))) : (C(), F("svg", S6, t[3] || (t[3] = [ M("path", { d: "M16.5 3c-1.74 0-3.41.81-4.5 2.09C10.91 3.81 9.24 3 7.5 3 4.42 3 2 5.42 2 8.5c0 3.78 3.4 6.86 8.55 11.54L12 21.35l1.45-1.32C18.6 15.36 22 12.28 22 8.5 22 5.42 19.58 3 16.5 3m-4.4 15.55-.1.1-.1-.1C7.14 14.24 4 11.39 4 8.5 4 6.5 5.5 5 7.5 5c1.54 0 3.04.99 3.57 2.36h1.87C13.46 5.99 14.96 5 16.5 5c2 0 3.5 1.5 3.5 3.5 0 2.89-3.14 5.74-7.9 10.05" }, null, -1) ]))) ]), _: 2 }, 1024) ]), _: 2 }, 1032, ["onClick", "disabled"]) ]), default: P(() => [ o.savedSearchHistory.length > 1 && !h.saved ? (C(), F("span", k6, " Limit 2: Please remove a saved search before adding another. ")) : h.saved ? (C(), F("span", _6, " Remove from saved searches. ")) : (C(), F("span", E6, " Add up to two saved searches. ")) ]), _: 2 }, 1024), V(s, { width: "auto", trigger: "hover", "show-after": 200, persistent: !1, "popper-class": "popover-dropdown" }, { reference: P(() => [ V(u, { circle: "", text: "", size: "small", onClick: (m) => a.removeFromSavedSearch(h) }, { default: P(() => [ V(c, { color: "#8300BF" }, { default: P(() => [ V(f) ]), _: 1 }) ]), _: 2 }, 1032, ["onClick"]) ]), default: P(() => [ t[4] || (t[4] = M("span", null, " Remove from search history. ", -1)) ]), _: 2 }, 1024) ]) ]), _: 2 }, 1024))), 128)) ]), _: 1 }) ]), default: P(() => [ M("span", y6, [ t[1] || (t[1] = Ce(" Search history ")), V(c, { class: "el-icon--right" }, { default: P(() => [ V(l) ]), _: 1 }) ]) ]), _: 1 }) ])) : G("", !0); } const ll = /* @__PURE__ */ Nn(h6, [["render", x6], ["__scopeId", "data-v-e1b89e20"]]), fy = (e, t) => { const n = e.__vccOpts || e; for (const [r, o] of t) n[r] = o; return n; }, T6 = ["xlink:href"], O6 = { __name: "SvgIcon", props: { /** * The svg icon to show. */ icon: { type: String, required: !0 }, /** * The option to spin the icon. */ spin: { type: Boolean, default: !1 } }, setup(e) { return (t, n) => (C(), F("svg", { class: N(["map-icon", { "map-icon-spin": e.spin }]) }, [ M("use", { "xlink:href": `#${e.icon}` }, null, 8, T6) ], 2)); } }, py = /* @__PURE__ */ fy(O6, [["__scopeId", "data-v-e172d5ff"]]), hy = ` 2horpanel ? `, vy = ` 2vertpanel ? `, gy = ` 3panel ? `, my = ` 4panel ? `, yy = ` 2horpanel ? `, by = ` 2horpanel ? `, wy = ` 4panel ? `, Cy = ` changeBckgd `, Sy = ` close no bk `, ky = ` close `, _y = ` closeFullScreen `, Ey = ` Comment `, xy = ` Connection `, Ty = ` dock `, Oy = ` drawLine `, Iy = ` drawPoint `, Ay = ` drawPolygon `, Fy = ` drawTrash `, Py = ` fitWindow `, $y = ` fullScreen `, Ry = 'DataPortal-Icons', Ny = ` magnifyingGlass `, Ly = `Created by Wahyu Prihantorofrom the Noun Project`, By = ` openMap `, Dy = ` Artboard Copy 6 `, My = ` permalink `, jy = ` play `, Vy = ` resetZoom `, zy = ` singlepanel ? `, Hy = ` tooltips ? `, Uy = ` undock `, qy = ` zoomIn `, Ky = ` zoomOut `, Wy = (e, t, n, r) => { const o = ["title", "desc", "defs", "style"], a = ["width", "height"], s = r || []; let i = document.createElement("div"); i.innerHTML = e, o.map((c) => { const u = i.querySelector(c); u && u.remove(); }), a.map((c) => { i.querySelector("svg").removeAttribute(c); }), r && s.map((c) => { Object.values(i.querySelectorAll(`[${c}]`)).map((u) => { u.removeAttribute(c); }); }); const l = i.innerHTML; return i = null, l; }, Gy = (e) => [ // Remove XML stuffs and comments [/<\?xml[\s\S]*?>/gi, ""], [//gi, ""], [//gi, ""], // SVG XML -> HTML5 [/\<([A-Za-z]+)([^\>]*)\/\>/g, "<$1$2>"], // convert self-closing XML SVG nodes to explicitly closed HTML5 SVG nodes [/\s+/g, " "], // replace whitespace sequences with a single space [/\> \<"] // remove whitespace between tags ].reduce((t, n) => "".replace.apply(t, n), e).trim(), I6 = !0, A6 = !0, F6 = ["fill"], Fc = /* @__PURE__ */ Object.assign({ "/assets/icons/2horpanel.svg": hy, "/assets/icons/2vertpanel.svg": vy, "/assets/icons/3panel.svg": gy, "/assets/icons/4panel.svg": my, "/assets/icons/5panel.svg": yy, "/assets/icons/6panel.svg": by, "/assets/icons/6panelVertical.svg": wy, "/assets/icons/changeBckgd.svg": Cy, "/assets/icons/close-no-bk.svg": Sy, "/assets/icons/close.svg": ky, "/assets/icons/closeFullScreen.svg": _y, "/assets/icons/comment.svg": Ey, "/assets/icons/connection.svg": xy, "/assets/icons/dock.svg": Ty, "/assets/icons/drawLine.svg": Oy, "/assets/icons/drawPoint.svg": Iy, "/assets/icons/drawPolygon.svg": Ay, "/assets/icons/drawTrash.svg": Fy, "/assets/icons/fitWindow.svg": Py, "/assets/icons/fullScreen.svg": $y, "/assets/icons/help.svg": Ry, "/assets/icons/magnifyingGlass.svg": Ny, "/assets/icons/noun-filter.svg": Ly, "/assets/icons/openMap.svg": By, "/assets/icons/pause.svg": Dy, "/assets/icons/permalink.svg": My, "/assets/icons/play.svg": jy, "/assets/icons/resetZoom.svg": Vy, "/assets/icons/singlepanel.svg": zy, "/assets/icons/tooltips.svg": Hy, "/assets/icons/undock.svg": Uy, "/assets/icons/zoomIn.svg": qy, "/assets/icons/zoomOut.svg": Ky }), P6 = Object.keys(Fc).map((e) => { const t = Wy(Fc[e], I6, A6, F6), n = e.replace(/^.+\/(\w+).svg$/, "$1"); return Gy(t).replace("", "symbol>"); }); P6.join(` `); const Pc = /* @__PURE__ */ Object.assign({ "/assets/icons/2horpanel.svg": hy, "/assets/icons/2vertpanel.svg": vy, "/assets/icons/3panel.svg": gy, "/assets/icons/4panel.svg": my, "/assets/icons/5panel.svg": yy, "/assets/icons/6panel.svg": by, "/assets/icons/6panelVertical.svg": wy, "/assets/icons/changeBckgd.svg": Cy, "/assets/icons/close-no-bk.svg": Sy, "/assets/icons/close.svg": ky, "/assets/icons/closeFullScreen.svg": _y, "/assets/icons/comment.svg": Ey, "/assets/icons/connection.svg": xy, "/assets/icons/dock.svg": Ty, "/assets/icons/drawLine.svg": Oy, "/assets/icons/drawPoint.svg": Iy, "/assets/icons/drawPolygon.svg": Ay, "/assets/icons/drawTrash.svg": Fy, "/assets/icons/fitWindow.svg": Py, "/assets/icons/fullScreen.svg": $y, "/assets/icons/help.svg": Ry, "/assets/icons/magnifyingGlass.svg": Ny, "/assets/icons/noun-filter.svg": Ly, "/assets/icons/openMap.svg": By, "/assets/icons/pause.svg": Dy, "/assets/icons/permalink.svg": My, "/assets/icons/play.svg": jy, "/assets/icons/resetZoom.svg": Vy, "/assets/icons/singlepanel.svg": zy, "/assets/icons/tooltips.svg": Hy, "/assets/icons/undock.svg": Uy, "/assets/icons/zoomIn.svg": qy, "/assets/icons/zoomOut.svg": Ky }), $6 = Object.keys(Pc).map((e) => { const t = Wy(Pc[e]), n = e.replace(/^.+\/(\w+).svg$/, "$1"); return Gy(t).replace("", "symbol>"); }), R6 = { name: "MapSvgSpriteColor", svgContext: Pc, svgSprite: $6.join(` `) // concatenate all symbols into $options.svgSprite }, N6 = ["innerHTML"]; function L6(e, t, n, r, o, a) { return C(), F("svg", { width: "0", height: "0", style: { display: "none" }, innerHTML: e.$options.svgSprite }, null, 8, N6); } const Jy = /* @__PURE__ */ fy(R6, [["render", L6]]); var Zy = { exports: {} }; /*! algoliasearch.umd.js | 4.23.2 | © Algolia, inc. | https://github.com/algolia/algoliasearch-client-javascript */ (function(e, t) { (function(n, r) { e.exports = r(); })(cT, function() { function n(b, S, _) { return S in b ? Object.defineProperty(b, S, { value: _, enumerable: !0, configurable: !0, writable: !0 }) : b[S] = _, b; } function r(b, S) { var _ = Object.keys(b); if (Object.getOwnPropertySymbols) { var O = Object.getOwnPropertySymbols(b); S && (O = O.filter(function(B) { return Object.getOwnPropertyDescriptor(b, B).enumerable; })), _.push.apply(_, O); } return _; } function o(b) { for (var S = 1; S < arguments.length; S++) { var _ = arguments[S] != null ? arguments[S] : {}; S % 2 ? r(Object(_), !0).forEach(function(O) { n(b, O, _[O]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(b, Object.getOwnPropertyDescriptors(_)) : r(Object(_)).forEach(function(O) { Object.defineProperty(b, O, Object.getOwnPropertyDescriptor(_, O)); }); } return b; } function a(b, S) { if (b == null) return {}; var _, O, B = function(ie, Q) { if (ie == null) return {}; var ae, ge, fe = {}, Ee = Object.keys(ie); for (ge = 0; ge < Ee.length; ge++) ae = Ee[ge], Q.indexOf(ae) >= 0 || (fe[ae] = ie[ae]); return fe; }(b, S); if (Object.getOwnPropertySymbols) { var ne = Object.getOwnPropertySymbols(b); for (O = 0; O < ne.length; O++) _ = ne[O], S.indexOf(_) >= 0 || Object.prototype.propertyIsEnumerable.call(b, _) && (B[_] = b[_]); } return B; } function s(b, S) { return function(_) { if (Array.isArray(_)) return _; }(b) || function(_, O) { if (Symbol.iterator in Object(_) || Object.prototype.toString.call(_) === "[object Arguments]") { var B = [], ne = !0, ie = !1, Q = void 0; try { for (var ae, ge = _[Symbol.iterator](); !(ne = (ae = ge.next()).done) && (B.push(ae.value), !O || B.length !== O); ne = !0) ; } catch (fe) { ie = !0, Q = fe; } finally { try { ne || ge.return == null || ge.return(); } finally { if (ie) throw Q; } } return B; } }(b, S) || function() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }(); } function i(b) { return function(S) { if (Array.isArray(S)) { for (var _ = 0, O = new Array(S.length); _ < S.length; _++) O[_] = S[_]; return O; } }(b) || function(S) { if (Symbol.iterator in Object(S) || Object.prototype.toString.call(S) === "[object Arguments]") return Array.from(S); }(b) || function() { throw new TypeError("Invalid attempt to spread non-iterable instance"); }(); } function l(b) { var S, _ = "algoliasearch-client-js-".concat(b.key), O = function() { return S === void 0 && (S = b.localStorage || window.localStorage), S; }, B = function() { return JSON.parse(O().getItem(_) || "{}"); }, ne = function(Q) { O().setItem(_, JSON.stringify(Q)); }, ie = function() { var Q = b.timeToLive ? 1e3 * b.timeToLive : null, ae = B(), ge = Object.fromEntries(Object.entries(ae).filter(function(Ee) { return s(Ee, 2)[1].timestamp !== void 0; })); if (ne(ge), Q) { var fe = Object.fromEntries(Object.entries(ge).filter(function(Ee) { var ke = s(Ee, 2)[1], Me = (/* @__PURE__ */ new Date()).getTime(); return !(ke.timestamp + Q < Me); })); ne(fe); } }; return { get: function(Q, ae) { var ge = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : { miss: function() { return Promise.resolve(); } }; return Promise.resolve().then(function() { ie(); var fe = JSON.stringify(Q); return B()[fe]; }).then(function(fe) { return Promise.all([fe ? fe.value : ae(), fe !== void 0]); }).then(function(fe) { var Ee = s(fe, 2), ke = Ee[0], Me = Ee[1]; return Promise.all([ke, Me || ge.miss(ke)]); }).then(function(fe) { return s(fe, 1)[0]; }); }, set: function(Q, ae) { return Promise.resolve().then(function() { var ge = B(); return ge[JSON.stringify(Q)] = { timestamp: (/* @__PURE__ */ new Date()).getTime(), value: ae }, O().setItem(_, JSON.stringify(ge)), ae; }); }, delete: function(Q) { return Promise.resolve().then(function() { var ae = B(); delete ae[JSON.stringify(Q)], O().setItem(_, JSON.stringify(ae)); }); }, clear: function() { return Promise.resolve().then(function() { O().removeItem(_); }); } }; } function c(b) { var S = i(b.caches), _ = S.shift(); return _ === void 0 ? { get: function(O, B) { var ne = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : { miss: function() { return Promise.resolve(); } }, ie = B(); return ie.then(function(Q) { return Promise.all([Q, ne.miss(Q)]); }).then(function(Q) { return s(Q, 1)[0]; }); }, set: function(O, B) { return Promise.resolve(B); }, delete: function(O) { return Promise.resolve(); }, clear: function() { return Promise.resolve(); } } : { get: function(O, B) { var ne = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : { miss: function() { return Promise.resolve(); } }; return _.get(O, B, ne).catch(function() { return c({ caches: S }).get(O, B, ne); }); }, set: function(O, B) { return _.set(O, B).catch(function() { return c({ caches: S }).set(O, B); }); }, delete: function(O) { return _.delete(O).catch(function() { return c({ caches: S }).delete(O); }); }, clear: function() { return _.clear().catch(function() { return c({ caches: S }).clear(); }); } }; } function u() { var b = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : { serializable: !0 }, S = {}; return { get: function(_, O) { var B = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : { miss: function() { return Promise.resolve(); } }, ne = JSON.stringify(_); if (ne in S) return Promise.resolve(b.serializable ? JSON.parse(S[ne]) : S[ne]); var ie = O(), Q = B && B.miss || function() { return Promise.resolve(); }; return ie.then(function(ae) { return Q(ae); }).then(function() { return ie; }); }, set: function(_, O) { return S[JSON.stringify(_)] = b.serializable ? JSON.stringify(O) : O, Promise.resolve(O); }, delete: function(_) { return delete S[JSON.stringify(_)], Promise.resolve(); }, clear: function() { return S = {}, Promise.resolve(); } }; } function f(b, S, _) { var O = { "x-algolia-api-key": _, "x-algolia-application-id": S }; return { headers: function() { return b === y.WithinHeaders ? O : {}; }, queryParameters: function() { return b === y.WithinQueryParameters ? O : {}; } }; } function g(b) { var S = 0; return b(function _() { return S++, new Promise(function(O) { setTimeout(function() { O(b(_)); }, Math.min(100 * S, 1e3)); }); }); } function v(b) { var S = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : function(_, O) { return Promise.resolve(); }; return Object.assign(b, { wait: function(_) { return v(b.then(function(O) { return Promise.all([S(O, _), O]); }).then(function(O) { return O[1]; })); } }); } function d(b) { for (var S = b.length - 1; S > 0; S--) { var _ = Math.floor(Math.random() * (S + 1)), O = b[S]; b[S] = b[_], b[_] = O; } return b; } function h(b, S) { return S && Object.keys(S).forEach(function(_) { b[_] = S[_](b); }), b; } function m(b) { for (var S = arguments.length, _ = new Array(S > 1 ? S - 1 : 0), O = 1; O < S; O++) _[O - 1] = arguments[O]; var B = 0; return b.replace(/%s/g, function() { return encodeURIComponent(_[B++]); }); } var y = { WithinQueryParameters: 0, WithinHeaders: 1 }; function x(b, S) { var _ = b || {}, O = _.data || {}; return Object.keys(_).forEach(function(B) { ["timeout", "headers", "queryParameters", "data", "cacheable"].indexOf(B) === -1 && (O[B] = _[B]); }), { data: Object.entries(O).length > 0 ? O : void 0, timeout: _.timeout || S, headers: _.headers || {}, queryParameters: _.queryParameters || {}, cacheable: _.cacheable }; } var A = { Read: 1, Write: 2, Any: 3 }, k = 1, E = 2, T = 3; function I(b) { var S = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : k; return o(o({}, b), {}, { status: S, lastUpdate: Date.now() }); } function R(b) { return typeof b == "string" ? { protocol: "https", url: b, accept: A.Any } : { protocol: b.protocol || "https", url: b.url, accept: b.accept || A.Any }; } var D = "DELETE", W = "GET", z = "POST", U = "PUT"; function X(b, S) { return Promise.all(S.map(function(_) { return b.get(_, function() { return Promise.resolve(I(_)); }); })).then(function(_) { var O = _.filter(function(ie) { return function(Q) { return Q.status === k || Date.now() - Q.lastUpdate > 12e4; }(ie); }), B = _.filter(function(ie) { return function(Q) { return Q.status === T && Date.now() - Q.lastUpdate <= 12e4; }(ie); }), ne = [].concat(i(O), i(B)); return { getTimeout: function(ie, Q) { return (B.length === 0 && ie === 0 ? 1 : B.length + 3 + ie) * Q; }, statelessHosts: ne.length > 0 ? ne.map(function(ie) { return R(ie); }) : S }; }); } function de(b, S, _, O) { var B = [], ne = function(ke, Me) { if (!(ke.method === W || ke.data === void 0 && Me.data === void 0)) { var Fe = Array.isArray(ke.data) ? ke.data : o(o({}, ke.data), Me.data); return JSON.stringify(Fe); } }(_, O), ie = function(ke, Me) { var Fe = o(o({}, ke.headers), Me.headers), et = {}; return Object.keys(Fe).forEach(function(lt) { var Yt = Fe[lt]; et[lt.toLowerCase()] = Yt; }), et; }(b, O), Q = _.method, ae = _.method !== W ? {} : o(o({}, _.data), O.data), ge = o(o(o({ "x-algolia-agent": b.userAgent.value }, b.queryParameters), ae), O.queryParameters), fe = 0, Ee = function ke(Me, Fe) { var et = Me.pop(); if (et === void 0) throw { name: "RetryError", message: "Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.", transporterStackTrace: me(B) }; var lt = { data: ne, headers: ie, method: Q, url: Z(et, _.path, ge), connectTimeout: Fe(fe, b.timeouts.connect), responseTimeout: Fe(fe, O.timeout) }, Yt = function(Xt) { var Lt = { request: lt, response: Xt, host: et, triesLeft: Me.length }; return B.push(Lt), Lt; }, la = { onSuccess: function(Xt) { return function(Lt) { try { return JSON.parse(Lt.content); } catch (Hr) { throw /* @__PURE__ */ function(xr, _o) { return { name: "DeserializationError", message: xr, response: _o }; }(Hr.message, Lt); } }(Xt); }, onRetry: function(Xt) { var Lt = Yt(Xt); return Xt.isTimedOut && fe++, Promise.all([b.logger.info("Retryable failure", Ne(Lt)), b.hostsCache.set(et, I(et, Xt.isTimedOut ? T : E))]).then(function() { return ke(Me, Fe); }); }, onFail: function(Xt) { throw Yt(Xt), function(Lt, Hr) { var xr = Lt.content, _o = Lt.status, ca = xr; try { ca = JSON.parse(xr).message; } catch { } return /* @__PURE__ */ function(gs, kl, kb) { return { name: "ApiError", message: gs, status: kl, transporterStackTrace: kb }; }(ca, _o, Hr); }(Xt, me(B)); } }; return b.requester.send(lt).then(function(Xt) { return function(Lt, Hr) { return function(xr) { var _o = xr.status; return xr.isTimedOut || function(ca) { var gs = ca.isTimedOut, kl = ca.status; return !gs && ~~kl == 0; }(xr) || ~~(_o / 100) != 2 && ~~(_o / 100) != 4; }(Lt) ? Hr.onRetry(Lt) : ~~(Lt.status / 100) == 2 ? Hr.onSuccess(Lt) : Hr.onFail(Lt); }(Xt, la); }); }; return X(b.hostsCache, S).then(function(ke) { return Ee(i(ke.statelessHosts).reverse(), ke.getTimeout); }); } function re(b) { var S = b.hostsCache, _ = b.logger, O = b.requester, B = b.requestsCache, ne = b.responsesCache, ie = b.timeouts, Q = b.userAgent, ae = b.hosts, ge = b.queryParameters, fe = { hostsCache: S, logger: _, requester: O, requestsCache: B, responsesCache: ne, timeouts: ie, userAgent: Q, headers: b.headers, queryParameters: ge, hosts: ae.map(function(Ee) { return R(Ee); }), read: function(Ee, ke) { var Me = x(ke, fe.timeouts.read), Fe = function() { return de(fe, fe.hosts.filter(function(lt) { return (lt.accept & A.Read) != 0; }), Ee, Me); }; if ((Me.cacheable !== void 0 ? Me.cacheable : Ee.cacheable) !== !0) return Fe(); var et = { request: Ee, mappedRequestOptions: Me, transporter: { queryParameters: fe.queryParameters, headers: fe.headers } }; return fe.responsesCache.get(et, function() { return fe.requestsCache.get(et, function() { return fe.requestsCache.set(et, Fe()).then(function(lt) { return Promise.all([fe.requestsCache.delete(et), lt]); }, function(lt) { return Promise.all([fe.requestsCache.delete(et), Promise.reject(lt)]); }).then(function(lt) { var Yt = s(lt, 2); return Yt[0], Yt[1]; }); }); }, { miss: function(lt) { return fe.responsesCache.set(et, lt); } }); }, write: function(Ee, ke) { return de(fe, fe.hosts.filter(function(Me) { return (Me.accept & A.Write) != 0; }), Ee, x(ke, fe.timeouts.write)); } }; return fe; } function L(b) { var S = { value: "Algolia for JavaScript (".concat(b, ")"), add: function(_) { var O = "; ".concat(_.segment).concat(_.version !== void 0 ? " (".concat(_.version, ")") : ""); return S.value.indexOf(O) === -1 && (S.value = "".concat(S.value).concat(O)), S; } }; return S; } function Z(b, S, _) { var O = ve(_), B = "".concat(b.protocol, "://").concat(b.url, "/").concat(S.charAt(0) === "/" ? S.substr(1) : S); return O.length && (B += "?".concat(O)), B; } function ve(b) { return Object.keys(b).map(function(S) { return m("%s=%s", S, (_ = b[S], Object.prototype.toString.call(_) === "[object Object]" || Object.prototype.toString.call(_) === "[object Array]" ? JSON.stringify(b[S]) : b[S])); var _; }).join("&"); } function me(b) { return b.map(function(S) { return Ne(S); }); } function Ne(b) { var S = b.request.headers["x-algolia-api-key"] ? { "x-algolia-api-key": "*****" } : {}; return o(o({}, b), {}, { request: o(o({}, b.request), {}, { headers: o(o({}, b.request.headers), S) }) }); } var _e = function(b) { return function(S, _) { return b.transporter.write({ method: z, path: "2/abtests", data: S }, _); }; }, ze = function(b) { return function(S, _) { return b.transporter.write({ method: D, path: m("2/abtests/%s", S) }, _); }; }, at = function(b) { return function(S, _) { return b.transporter.read({ method: W, path: m("2/abtests/%s", S) }, _); }; }, Ge = function(b) { return function(S) { return b.transporter.read({ method: W, path: "2/abtests" }, S); }; }, Le = function(b) { return function(S, _) { return b.transporter.write({ method: z, path: m("2/abtests/%s/stop", S) }, _); }; }, Ke = function(b) { return function(S) { return b.transporter.read({ method: W, path: "1/strategies/personalization" }, S); }; }, nt = function(b) { return function(S, _) { return b.transporter.write({ method: z, path: "1/strategies/personalization", data: S }, _); }; }; function dt(b) { return function S(_) { return b.request(_).then(function(O) { if (b.batch !== void 0 && b.batch(O.hits), !b.shouldStop(O)) return O.cursor ? S({ cursor: O.cursor }) : S({ page: (_.page || 0) + 1 }); }); }({}); } var Cn = function(b) { return function(S, _) { var O = _ || {}, B = O.queryParameters, ne = a(O, ["queryParameters"]), ie = o({ acl: S }, B !== void 0 ? { queryParameters: B } : {}); return v(b.transporter.write({ method: z, path: "1/keys", data: ie }, ne), function(Q, ae) { return g(function(ge) { return Je(b)(Q.key, ae).catch(function(fe) { if (fe.status !== 404) throw fe; return ge(); }); }); }); }; }, Rt = function(b) { return function(S, _, O) { var B = x(O); return B.queryParameters["X-Algolia-User-ID"] = S, b.transporter.write({ method: z, path: "1/clusters/mapping", data: { cluster: _ } }, B); }; }, Tt = function(b) { return function(S, _, O) { return b.transporter.write({ method: z, path: "1/clusters/mapping/batch", data: { users: S, cluster: _ } }, O); }; }, st = function(b) { return function(S, _) { return v(b.transporter.write({ method: z, path: m("/1/dictionaries/%s/batch", S), data: { clearExistingDictionaryEntries: !0, requests: { action: "addEntry", body: [] } } }, _), function(O, B) { return _r(b)(O.taskID, B); }); }; }, gt = function(b) { return function(S, _, O) { return v(b.transporter.write({ method: z, path: m("1/indexes/%s/operation", S), data: { operation: "copy", destination: _ } }, O), function(B, ne) { return it(b)(S, { methods: { waitTask: wt } }).waitTask(B.taskID, ne); }); }; }, Wt = function(b) { return function(S, _, O) { return gt(b)(S, _, o(o({}, O), {}, { scope: [Sl.Rules] })); }; }, Gt = function(b) { return function(S, _, O) { return gt(b)(S, _, o(o({}, O), {}, { scope: [Sl.Settings] })); }; }, Et = function(b) { return function(S, _, O) { return gt(b)(S, _, o(o({}, O), {}, { scope: [Sl.Synonyms] })); }; }, Jt = function(b) { return function(S, _) { return S.method === W ? b.transporter.read(S, _) : b.transporter.write(S, _); }; }, Nt = function(b) { return function(S, _) { return v(b.transporter.write({ method: D, path: m("1/keys/%s", S) }, _), function(O, B) { return g(function(ne) { return Je(b)(S, B).then(ne).catch(function(ie) { if (ie.status !== 404) throw ie; }); }); }); }; }, Sn = function(b) { return function(S, _, O) { var B = _.map(function(ne) { return { action: "deleteEntry", body: { objectID: ne } }; }); return v(b.transporter.write({ method: z, path: m("/1/dictionaries/%s/batch", S), data: { clearExistingDictionaryEntries: !1, requests: B } }, O), function(ne, ie) { return _r(b)(ne.taskID, ie); }); }; }, Je = function(b) { return function(S, _) { return b.transporter.read({ method: W, path: m("1/keys/%s", S) }, _); }; }, Ot = function(b) { return function(S, _) { return b.transporter.read({ method: W, path: m("1/task/%s", S.toString()) }, _); }; }, zt = function(b) { return function(S) { return b.transporter.read({ method: W, path: "/1/dictionaries/*/settings" }, S); }; }, cn = function(b) { return function(S) { return b.transporter.read({ method: W, path: "1/logs" }, S); }; }, It = function(b) { return function(S) { return b.transporter.read({ method: W, path: "1/clusters/mapping/top" }, S); }; }, te = function(b) { return function(S, _) { return b.transporter.read({ method: W, path: m("1/clusters/mapping/%s", S) }, _); }; }, $e = function(b) { return function(S) { var _ = S || {}, O = _.retrieveMappings, B = a(_, ["retrieveMappings"]); return O === !0 && (B.getClusters = !0), b.transporter.read({ method: W, path: "1/clusters/mapping/pending" }, B); }; }, it = function(b) { return function(S) { var _ = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, O = { transporter: b.transporter, appId: b.appId, indexName: S }; return h(O, _.methods); }; }, Ht = function(b) { return function(S) { return b.transporter.read({ method: W, path: "1/keys" }, S); }; }, un = function(b) { return function(S) { return b.transporter.read({ method: W, path: "1/clusters" }, S); }; }, wo = function(b) { return function(S) { return b.transporter.read({ method: W, path: "1/indexes" }, S); }; }, oa = function(b) { return function(S) { return b.transporter.read({ method: W, path: "1/clusters/mapping" }, S); }; }, Vr = function(b) { return function(S, _, O) { return v(b.transporter.write({ method: z, path: m("1/indexes/%s/operation", S), data: { operation: "move", destination: _ } }, O), function(B, ne) { return it(b)(S, { methods: { waitTask: wt } }).waitTask(B.taskID, ne); }); }; }, zr = function(b) { return function(S, _) { return v(b.transporter.write({ method: z, path: "1/indexes/*/batch", data: { requests: S } }, _), function(O, B) { return Promise.all(Object.keys(O.taskID).map(function(ne) { return it(b)(ne, { methods: { waitTask: wt } }).waitTask(O.taskID[ne], B); })); }); }; }, Y = function(b) { return function(S, _) { return b.transporter.read({ method: z, path: "1/indexes/*/objects", data: { requests: S } }, _); }; }, pe = function(b) { return function(S, _) { var O = S.map(function(B) { return o(o({}, B), {}, { params: ve(B.params || {}) }); }); return b.transporter.read({ method: z, path: "1/indexes/*/queries", data: { requests: O }, cacheable: !0 }, _); }; }, he = function(b) { return function(S, _) { return Promise.all(S.map(function(O) { var B = O.params, ne = B.facetName, ie = B.facetQuery, Q = a(B, ["facetName", "facetQuery"]); return it(b)(O.indexName, { methods: { searchForFacetValues: fd } }).searchForFacetValues(ne, ie, o(o({}, _), Q)); })); }; }, Ze = function(b) { return function(S, _) { var O = x(_); return O.queryParameters["X-Algolia-User-ID"] = S, b.transporter.write({ method: D, path: "1/clusters/mapping" }, O); }; }, dn = function(b) { return function(S, _, O) { var B = _.map(function(ne) { return { action: "addEntry", body: ne }; }); return v(b.transporter.write({ method: z, path: m("/1/dictionaries/%s/batch", S), data: { clearExistingDictionaryEntries: !0, requests: B } }, O), function(ne, ie) { return _r(b)(ne.taskID, ie); }); }; }, Zt = function(b) { return function(S, _) { return v(b.transporter.write({ method: z, path: m("1/keys/%s/restore", S) }, _), function(O, B) { return g(function(ne) { return Je(b)(S, B).catch(function(ie) { if (ie.status !== 404) throw ie; return ne(); }); }); }); }; }, fn = function(b) { return function(S, _, O) { var B = _.map(function(ne) { return { action: "addEntry", body: ne }; }); return v(b.transporter.write({ method: z, path: m("/1/dictionaries/%s/batch", S), data: { clearExistingDictionaryEntries: !1, requests: B } }, O), function(ne, ie) { return _r(b)(ne.taskID, ie); }); }; }, Co = function(b) { return function(S, _, O) { return b.transporter.read({ method: z, path: m("/1/dictionaries/%s/search", S), data: { query: _ }, cacheable: !0 }, O); }; }, fs = function(b) { return function(S, _) { return b.transporter.read({ method: z, path: "1/clusters/mapping/search", data: { query: S } }, _); }; }, ul = function(b) { return function(S, _) { return v(b.transporter.write({ method: U, path: "/1/dictionaries/*/settings", data: S }, _), function(O, B) { return _r(b)(O.taskID, B); }); }; }, dl = function(b) { return function(S, _) { var O = Object.assign({}, _), B = _ || {}, ne = B.queryParameters, ie = a(B, ["queryParameters"]), Q = ne ? { queryParameters: ne } : {}, ae = ["acl", "indexes", "referers", "restrictSources", "queryParameters", "description", "maxQueriesPerIPPerHour", "maxHitsPerQuery"]; return v(b.transporter.write({ method: U, path: m("1/keys/%s", S), data: Q }, ie), function(ge, fe) { return g(function(Ee) { return Je(b)(S, fe).then(function(ke) { return function(Me) { return Object.keys(O).filter(function(Fe) { return ae.indexOf(Fe) !== -1; }).every(function(Fe) { if (Array.isArray(Me[Fe]) && Array.isArray(O[Fe])) { var et = Me[Fe]; return et.length === O[Fe].length && et.every(function(lt, Yt) { return lt === O[Fe][Yt]; }); } return Me[Fe] === O[Fe]; }); }(ke) ? Promise.resolve() : Ee(); }); }); }); }; }, _r = function(b) { return function(S, _) { return g(function(O) { return Ot(b)(S, _).then(function(B) { return B.status !== "published" ? O() : void 0; }); }); }; }, aa = function(b) { return function(S, _) { return v(b.transporter.write({ method: z, path: m("1/indexes/%s/batch", b.indexName), data: { requests: S } }, _), function(O, B) { return wt(b)(O.taskID, B); }); }; }, fl = function(b) { return function(S) { return dt(o(o({ shouldStop: function(_) { return _.cursor === void 0; } }, S), {}, { request: function(_) { return b.transporter.read({ method: z, path: m("1/indexes/%s/browse", b.indexName), data: _ }, S); } })); }; }, sa = function(b) { return function(S) { var _ = o({ hitsPerPage: 1e3 }, S); return dt(o(o({ shouldStop: function(O) { return O.hits.length < _.hitsPerPage; } }, _), {}, { request: function(O) { return pd(b)("", o(o({}, _), O)).then(function(B) { return o(o({}, B), {}, { hits: B.hits.map(function(ne) { return delete ne._highlightResult, ne; }) }); }); } })); }; }, pl = function(b) { return function(S) { var _ = o({ hitsPerPage: 1e3 }, S); return dt(o(o({ shouldStop: function(O) { return O.hits.length < _.hitsPerPage; } }, _), {}, { request: function(O) { return hd(b)("", o(o({}, _), O)).then(function(B) { return o(o({}, B), {}, { hits: B.hits.map(function(ne) { return delete ne._highlightResult, ne; }) }); }); } })); }; }, ia = function(b) { return function(S, _, O) { var B = O || {}, ne = B.batchSize, ie = a(B, ["batchSize"]), Q = { taskIDs: [], objectIDs: [] }; return v(function ae() { var ge, fe = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0, Ee = []; for (ge = fe; ge < S.length && (Ee.push(S[ge]), Ee.length !== (ne || 1e3)); ge++) ; return Ee.length === 0 ? Promise.resolve(Q) : aa(b)(Ee.map(function(ke) { return { action: _, body: ke }; }), ie).then(function(ke) { return Q.objectIDs = Q.objectIDs.concat(ke.objectIDs), Q.taskIDs.push(ke.taskID), ge++, ae(ge); }); }(), function(ae, ge) { return Promise.all(ae.taskIDs.map(function(fe) { return wt(b)(fe, ge); })); }); }; }, hl = function(b) { return function(S) { return v(b.transporter.write({ method: z, path: m("1/indexes/%s/clear", b.indexName) }, S), function(_, O) { return wt(b)(_.taskID, O); }); }; }, ps = function(b) { return function(S) { var _ = S || {}, O = _.forwardToReplicas, B = x(a(_, ["forwardToReplicas"])); return O && (B.queryParameters.forwardToReplicas = 1), v(b.transporter.write({ method: z, path: m("1/indexes/%s/rules/clear", b.indexName) }, B), function(ne, ie) { return wt(b)(ne.taskID, ie); }); }; }, vl = function(b) { return function(S) { var _ = S || {}, O = _.forwardToReplicas, B = x(a(_, ["forwardToReplicas"])); return O && (B.queryParameters.forwardToReplicas = 1), v(b.transporter.write({ method: z, path: m("1/indexes/%s/synonyms/clear", b.indexName) }, B), function(ne, ie) { return wt(b)(ne.taskID, ie); }); }; }, gl = function(b) { return function(S, _) { return v(b.transporter.write({ method: z, path: m("1/indexes/%s/deleteByQuery", b.indexName), data: S }, _), function(O, B) { return wt(b)(O.taskID, B); }); }; }, ml = function(b) { return function(S) { return v(b.transporter.write({ method: D, path: m("1/indexes/%s", b.indexName) }, S), function(_, O) { return wt(b)(_.taskID, O); }); }; }, yl = function(b) { return function(S, _) { return v(q(b)([S], _).then(function(O) { return { taskID: O.taskIDs[0] }; }), function(O, B) { return wt(b)(O.taskID, B); }); }; }, q = function(b) { return function(S, _) { var O = S.map(function(B) { return { objectID: B }; }); return ia(b)(O, ko.DeleteObject, _); }; }, le = function(b) { return function(S, _) { var O = _ || {}, B = O.forwardToReplicas, ne = x(a(O, ["forwardToReplicas"])); return B && (ne.queryParameters.forwardToReplicas = 1), v(b.transporter.write({ method: D, path: m("1/indexes/%s/rules/%s", b.indexName, S) }, ne), function(ie, Q) { return wt(b)(ie.taskID, Q); }); }; }, Ae = function(b) { return function(S, _) { var O = _ || {}, B = O.forwardToReplicas, ne = x(a(O, ["forwardToReplicas"])); return B && (ne.queryParameters.forwardToReplicas = 1), v(b.transporter.write({ method: D, path: m("1/indexes/%s/synonyms/%s", b.indexName, S) }, ne), function(ie, Q) { return wt(b)(ie.taskID, Q); }); }; }, Xe = function(b) { return function(S) { return cd(b)(S).then(function() { return !0; }).catch(function(_) { if (_.status !== 404) throw _; return !1; }); }; }, Zn = function(b) { return function(S, _, O) { return b.transporter.read({ method: z, path: m("1/answers/%s/prediction", b.indexName), data: { query: S, queryLanguages: _ }, cacheable: !0 }, O); }; }, Er = function(b) { return function(S, _) { var O = _ || {}, B = O.query, ne = O.paginate, ie = a(O, ["query", "paginate"]), Q = 0; return function ae() { return dd(b)(B || "", o(o({}, ie), {}, { page: Q })).then(function(ge) { for (var fe = 0, Ee = Object.entries(ge.hits); fe < Ee.length; fe++) { var ke = s(Ee[fe], 2), Me = ke[0], Fe = ke[1]; if (S(Fe)) return { object: Fe, position: parseInt(Me, 10), page: Q }; } if (Q++, ne === !1 || Q >= ge.nbPages) throw { name: "ObjectNotFoundError", message: "Object not found." }; return ae(); }); }(); }; }, So = function(b) { return function(S, _) { return b.transporter.read({ method: W, path: m("1/indexes/%s/%s", b.indexName, S) }, _); }; }, cr = function() { return function(b, S) { for (var _ = 0, O = Object.entries(b.hits); _ < O.length; _++) { var B = s(O[_], 2), ne = B[0]; if (B[1].objectID === S) return parseInt(ne, 10); } return -1; }; }, kn = function(b) { return function(S, _) { var O = _ || {}, B = O.attributesToRetrieve, ne = a(O, ["attributesToRetrieve"]), ie = S.map(function(Q) { return o({ indexName: b.indexName, objectID: Q }, B ? { attributesToRetrieve: B } : {}); }); return b.transporter.read({ method: z, path: "1/indexes/*/objects", data: { requests: ie } }, ne); }; }, hs = function(b) { return function(S, _) { return b.transporter.read({ method: W, path: m("1/indexes/%s/rules/%s", b.indexName, S) }, _); }; }, cd = function(b) { return function(S) { return b.transporter.read({ method: W, path: m("1/indexes/%s/settings", b.indexName), data: { getVersion: 2 } }, S); }; }, ab = function(b) { return function(S, _) { return b.transporter.read({ method: W, path: m("1/indexes/%s/synonyms/%s", b.indexName, S) }, _); }; }, sb = function(b) { return function(S, _) { return v(ud(b)([S], _).then(function(O) { return { objectID: O.objectIDs[0], taskID: O.taskIDs[0] }; }), function(O, B) { return wt(b)(O.taskID, B); }); }; }, ud = function(b) { return function(S, _) { var O = _ || {}, B = O.createIfNotExists, ne = a(O, ["createIfNotExists"]), ie = B ? ko.PartialUpdateObject : ko.PartialUpdateObjectNoCreate; return ia(b)(S, ie, ne); }; }, ib = function(b) { return function(S, _) { var O = _ || {}, B = O.safe, ne = O.autoGenerateObjectIDIfNotExist, ie = O.batchSize, Q = a(O, ["safe", "autoGenerateObjectIDIfNotExist", "batchSize"]), ae = function(Fe, et, lt, Yt) { return v(b.transporter.write({ method: z, path: m("1/indexes/%s/operation", Fe), data: { operation: lt, destination: et } }, Yt), function(la, Xt) { return wt(b)(la.taskID, Xt); }); }, ge = Math.random().toString(36).substring(7), fe = "".concat(b.indexName, "_tmp_").concat(ge), Ee = bl({ appId: b.appId, transporter: b.transporter, indexName: fe }), ke = [], Me = ae(b.indexName, fe, "copy", o(o({}, Q), {}, { scope: ["settings", "synonyms", "rules"] })); return ke.push(Me), v((B ? Me.wait(Q) : Me).then(function() { var Fe = Ee(S, o(o({}, Q), {}, { autoGenerateObjectIDIfNotExist: ne, batchSize: ie })); return ke.push(Fe), B ? Fe.wait(Q) : Fe; }).then(function() { var Fe = ae(fe, b.indexName, "move", Q); return ke.push(Fe), B ? Fe.wait(Q) : Fe; }).then(function() { return Promise.all(ke); }).then(function(Fe) { var et = s(Fe, 3), lt = et[0], Yt = et[1], la = et[2]; return { objectIDs: Yt.objectIDs, taskIDs: [lt.taskID].concat(i(Yt.taskIDs), [la.taskID]) }; }), function(Fe, et) { return Promise.all(ke.map(function(lt) { return lt.wait(et); })); }); }; }, lb = function(b) { return function(S, _) { return wl(b)(S, o(o({}, _), {}, { clearExistingRules: !0 })); }; }, cb = function(b) { return function(S, _) { return Cl(b)(S, o(o({}, _), {}, { clearExistingSynonyms: !0 })); }; }, ub = function(b) { return function(S, _) { return v(bl(b)([S], _).then(function(O) { return { objectID: O.objectIDs[0], taskID: O.taskIDs[0] }; }), function(O, B) { return wt(b)(O.taskID, B); }); }; }, bl = function(b) { return function(S, _) { var O = _ || {}, B = O.autoGenerateObjectIDIfNotExist, ne = a(O, ["autoGenerateObjectIDIfNotExist"]), ie = B ? ko.AddObject : ko.UpdateObject; if (ie === ko.UpdateObject) { var Q = !0, ae = !1, ge = void 0; try { for (var fe, Ee = S[Symbol.iterator](); !(Q = (fe = Ee.next()).done); Q = !0) if (fe.value.objectID === void 0) return v(Promise.reject({ name: "MissingObjectIDError", message: "All objects must have an unique objectID (like a primary key) to be valid. Algolia is also able to generate objectIDs automatically but *it's not recommended*. To do it, use the `{'autoGenerateObjectIDIfNotExist': true}` option." })); } catch (ke) { ae = !0, ge = ke; } finally { try { Q || Ee.return == null || Ee.return(); } finally { if (ae) throw ge; } } } return ia(b)(S, ie, ne); }; }, db = function(b) { return function(S, _) { return wl(b)([S], _); }; }, wl = function(b) { return function(S, _) { var O = _ || {}, B = O.forwardToReplicas, ne = O.clearExistingRules, ie = x(a(O, ["forwardToReplicas", "clearExistingRules"])); return B && (ie.queryParameters.forwardToReplicas = 1), ne && (ie.queryParameters.clearExistingRules = 1), v(b.transporter.write({ method: z, path: m("1/indexes/%s/rules/batch", b.indexName), data: S }, ie), function(Q, ae) { return wt(b)(Q.taskID, ae); }); }; }, fb = function(b) { return function(S, _) { return Cl(b)([S], _); }; }, Cl = function(b) { return function(S, _) { var O = _ || {}, B = O.forwardToReplicas, ne = O.clearExistingSynonyms, ie = O.replaceExistingSynonyms, Q = x(a(O, ["forwardToReplicas", "clearExistingSynonyms", "replaceExistingSynonyms"])); return B && (Q.queryParameters.forwardToReplicas = 1), (ie || ne) && (Q.queryParameters.replaceExistingSynonyms = 1), v(b.transporter.write({ method: z, path: m("1/indexes/%s/synonyms/batch", b.indexName), data: S }, Q), function(ae, ge) { return wt(b)(ae.taskID, ge); }); }; }, dd = function(b) { return function(S, _) { return b.transporter.read({ method: z, path: m("1/indexes/%s/query", b.indexName), data: { query: S }, cacheable: !0 }, _); }; }, fd = function(b) { return function(S, _, O) { return b.transporter.read({ method: z, path: m("1/indexes/%s/facets/%s/query", b.indexName, S), data: { facetQuery: _ }, cacheable: !0 }, O); }; }, pd = function(b) { return function(S, _) { return b.transporter.read({ method: z, path: m("1/indexes/%s/rules/search", b.indexName), data: { query: S } }, _); }; }, hd = function(b) { return function(S, _) { return b.transporter.read({ method: z, path: m("1/indexes/%s/synonyms/search", b.indexName), data: { query: S } }, _); }; }, pb = function(b) { return function(S, _) { var O = _ || {}, B = O.forwardToReplicas, ne = x(a(O, ["forwardToReplicas"])); return B && (ne.queryParameters.forwardToReplicas = 1), v(b.transporter.write({ method: U, path: m("1/indexes/%s/settings", b.indexName), data: S }, ne), function(ie, Q) { return wt(b)(ie.taskID, Q); }); }; }, wt = function(b) { return function(S, _) { return g(function(O) { return (/* @__PURE__ */ function(B) { return function(ne, ie) { return B.transporter.read({ method: W, path: m("1/indexes/%s/task/%s", B.indexName, ne.toString()) }, ie); }; }(b))(S, _).then(function(B) { return B.status !== "published" ? O() : void 0; }); }); }; }, ko = { AddObject: "addObject", UpdateObject: "updateObject", PartialUpdateObject: "partialUpdateObject", PartialUpdateObjectNoCreate: "partialUpdateObjectNoCreate", DeleteObject: "deleteObject", DeleteIndex: "delete", ClearIndex: "clear" }, Sl = { Settings: "settings", Synonyms: "synonyms", Rules: "rules" }, hb = 1, vb = 2, gb = 3, vs = function(b) { return function(S, _) { var O = S.map(function(B) { return o(o({}, B), {}, { threshold: B.threshold || 0 }); }); return b.transporter.read({ method: z, path: "1/indexes/*/recommendations", data: { requests: O }, cacheable: !0 }, _); }; }, mb = function(b) { return function(S, _) { return vs(b)(S.map(function(O) { return o(o({}, O), {}, { fallbackParameters: {}, model: "bought-together" }); }), _); }; }, yb = function(b) { return function(S, _) { return vs(b)(S.map(function(O) { return o(o({}, O), {}, { model: "related-products" }); }), _); }; }, bb = function(b) { return function(S, _) { var O = S.map(function(B) { return o(o({}, B), {}, { model: "trending-facets", threshold: B.threshold || 0 }); }); return b.transporter.read({ method: z, path: "1/indexes/*/recommendations", data: { requests: O }, cacheable: !0 }, _); }; }, wb = function(b) { return function(S, _) { var O = S.map(function(B) { return o(o({}, B), {}, { model: "trending-items", threshold: B.threshold || 0 }); }); return b.transporter.read({ method: z, path: "1/indexes/*/recommendations", data: { requests: O }, cacheable: !0 }, _); }; }, Cb = function(b) { return function(S, _) { return vs(b)(S.map(function(O) { return o(o({}, O), {}, { model: "looking-similar" }); }), _); }; }, Sb = function(b) { return function(S, _) { var O = S.map(function(B) { return o(o({}, B), {}, { model: "recommended-for-you", threshold: B.threshold || 0 }); }); return b.transporter.read({ method: z, path: "1/indexes/*/recommendations", data: { requests: O }, cacheable: !0 }, _); }; }; function vd(b, S, _) { var O, B = { appId: b, apiKey: S, timeouts: { connect: 1, read: 2, write: 30 }, requester: { send: function(Q) { return new Promise(function(ae) { var ge = new XMLHttpRequest(); ge.open(Q.method, Q.url, !0), Object.keys(Q.headers).forEach(function(Me) { return ge.setRequestHeader(Me, Q.headers[Me]); }); var fe, Ee = function(Me, Fe) { return setTimeout(function() { ge.abort(), ae({ status: 0, content: Fe, isTimedOut: !0 }); }, 1e3 * Me); }, ke = Ee(Q.connectTimeout, "Connection timeout"); ge.onreadystatechange = function() { ge.readyState > ge.OPENED && fe === void 0 && (clearTimeout(ke), fe = Ee(Q.responseTimeout, "Socket timeout")); }, ge.onerror = function() { ge.status === 0 && (clearTimeout(ke), clearTimeout(fe), ae({ content: ge.responseText || "Network request failed", status: ge.status, isTimedOut: !1 })); }, ge.onload = function() { clearTimeout(ke), clearTimeout(fe), ae({ content: ge.responseText, status: ge.status, isTimedOut: !1 }); }, ge.send(Q.data); }); } }, logger: (O = gb, { debug: function(Q, ae) { return hb >= O && console.debug(Q, ae), Promise.resolve(); }, info: function(Q, ae) { return vb >= O && console.info(Q, ae), Promise.resolve(); }, error: function(Q, ae) { return console.error(Q, ae), Promise.resolve(); } }), responsesCache: u(), requestsCache: u({ serializable: !1 }), hostsCache: c({ caches: [l({ key: "".concat("4.23.2", "-").concat(b) }), u()] }), userAgent: L("4.23.2").add({ segment: "Browser" }) }, ne = o(o({}, B), _), ie = function() { return function(Q) { return function(ae) { var ge = ae.region || "us", fe = f(y.WithinHeaders, ae.appId, ae.apiKey), Ee = re(o(o({ hosts: [{ url: "personalization.".concat(ge, ".algolia.com") }] }, ae), {}, { headers: o(o(o({}, fe.headers()), { "content-type": "application/json" }), ae.headers), queryParameters: o(o({}, fe.queryParameters()), ae.queryParameters) })); return h({ appId: ae.appId, transporter: Ee }, ae.methods); }(o(o(o({}, B), Q), {}, { methods: { getPersonalizationStrategy: Ke, setPersonalizationStrategy: nt } })); }; }; return function(Q) { var ae = Q.appId, ge = f(Q.authMode !== void 0 ? Q.authMode : y.WithinHeaders, ae, Q.apiKey), fe = re(o(o({ hosts: [{ url: "".concat(ae, "-dsn.algolia.net"), accept: A.Read }, { url: "".concat(ae, ".algolia.net"), accept: A.Write }].concat(d([{ url: "".concat(ae, "-1.algolianet.com") }, { url: "".concat(ae, "-2.algolianet.com") }, { url: "".concat(ae, "-3.algolianet.com") }])) }, Q), {}, { headers: o(o(o({}, ge.headers()), { "content-type": "application/x-www-form-urlencoded" }), Q.headers), queryParameters: o(o({}, ge.queryParameters()), Q.queryParameters) })); return h({ transporter: fe, appId: ae, addAlgoliaAgent: function(Ee, ke) { fe.userAgent.add({ segment: Ee, version: ke }); }, clearCache: function() { return Promise.all([fe.requestsCache.clear(), fe.responsesCache.clear()]).then(function() { }); } }, Q.methods); }(o(o({}, ne), {}, { methods: { search: pe, searchForFacetValues: he, multipleBatch: zr, multipleGetObjects: Y, multipleQueries: pe, copyIndex: gt, copySettings: Gt, copySynonyms: Et, copyRules: Wt, moveIndex: Vr, listIndices: wo, getLogs: cn, listClusters: un, multipleSearchForFacetValues: he, getApiKey: Je, addApiKey: Cn, listApiKeys: Ht, updateApiKey: dl, deleteApiKey: Nt, restoreApiKey: Zt, assignUserID: Rt, assignUserIDs: Tt, getUserID: te, searchUserIDs: fs, listUserIDs: oa, getTopUserIDs: It, removeUserID: Ze, hasPendingMappings: $e, clearDictionaryEntries: st, deleteDictionaryEntries: Sn, getDictionarySettings: zt, getAppTask: Ot, replaceDictionaryEntries: dn, saveDictionaryEntries: fn, searchDictionaryEntries: Co, setDictionarySettings: ul, waitAppTask: _r, customRequest: Jt, initIndex: function(Q) { return function(ae) { return it(Q)(ae, { methods: { batch: aa, delete: ml, findAnswers: Zn, getObject: So, getObjects: kn, saveObject: ub, saveObjects: bl, search: dd, searchForFacetValues: fd, waitTask: wt, setSettings: pb, getSettings: cd, partialUpdateObject: sb, partialUpdateObjects: ud, deleteObject: yl, deleteObjects: q, deleteBy: gl, clearObjects: hl, browseObjects: fl, getObjectPosition: cr, findObject: Er, exists: Xe, saveSynonym: fb, saveSynonyms: Cl, getSynonym: ab, searchSynonyms: hd, browseSynonyms: pl, deleteSynonym: Ae, clearSynonyms: vl, replaceAllObjects: ib, replaceAllSynonyms: cb, searchRules: pd, getRule: hs, deleteRule: le, saveRule: db, saveRules: wl, replaceAllRules: lb, browseRules: sa, clearRules: ps } }); }; }, initAnalytics: function() { return function(Q) { return function(ae) { var ge = ae.region || "us", fe = f(y.WithinHeaders, ae.appId, ae.apiKey), Ee = re(o(o({ hosts: [{ url: "analytics.".concat(ge, ".algolia.com") }] }, ae), {}, { headers: o(o(o({}, fe.headers()), { "content-type": "application/json" }), ae.headers), queryParameters: o(o({}, fe.queryParameters()), ae.queryParameters) })); return h({ appId: ae.appId, transporter: Ee }, ae.methods); }(o(o(o({}, B), Q), {}, { methods: { addABTest: _e, getABTest: at, getABTests: Ge, stopABTest: Le, deleteABTest: ze } })); }; }, initPersonalization: ie, initRecommendation: function() { return function(Q) { return ne.logger.info("The `initRecommendation` method is deprecated. Use `initPersonalization` instead."), ie()(Q); }; }, getRecommendations: vs, getFrequentlyBoughtTogether: mb, getLookingSimilar: Cb, getRecommendedForYou: Sb, getRelatedProducts: yb, getTrendingFacets: bb, getTrendingItems: wb } })); } return vd.version = "4.23.2", vd; }); })(Zy); var B6 = Zy.exports; const D6 = /* @__PURE__ */ uT(B6), Oh = (e, t) => { const n = {}; return e.forEach((r) => { const o = r.split("."); if (o.length !== t) return; const a = r.substring(0, r.lastIndexOf(".")), s = o[o.length - 1]; Object.keys(n).includes(a) ? n[a].push(s) : n[a] = [s]; }), n; }; class Yy { constructor(t, n, r = "https://api.pennsieve.io") { this.client = D6( t, n ), this.PENNSIEVE_API_LOCATION = r; } initIndex(t) { this.index = this.client.initIndex(t); } getAlgoliaFacets(t) { const n = t.map((a) => a.facetPropPath), r = t.map((a) => a.facetSubpropPath), o = t.map( (a) => a.facetSubsubpropPath ).filter( (a) => a !== void 0 ); return this.index.search("", { sortFacetValuesBy: "alpha", facets: n.concat(r).concat(o) }).then((a) => { let s = [], i = 0; return n.map((l) => { const c = t.find((y) => y.facetPropPath == l); var u = []; const f = a.facets; if (f === void 0) return; const g = f[l] == null ? {} : f[l], v = c && f[c.facetSubpropPath] ? Object.keys(f[c.facetSubpropPath]) : [], d = c && c.facetSubsubpropPath && f[c.facetSubsubpropPath] ? Object.keys(f[c.facetSubsubpropPath]) : [], h = Oh(v, 2), m = Oh(d, 3); Object.keys(g).map((y) => { const x = []; Object.keys(h).includes(y) && h[y].forEach((k) => { const E = `${y}.${k}`, T = []; Object.keys(m).includes(E) && (m[E].forEach((I) => { T.push( { label: I, id: i++, facetPropPath: `${c ? c.facetSubsubpropPath : void 0}` } ); }), E === "nerves and ganglia.dorsal root ganglion" && T.push( { label: "Non specific", id: i++, facetPropPath: `${c ? c.facetSubsubpropPath : void 0}` } )), x.push( { label: k, id: i++, facetPropPath: `${c ? c.facetSubpropPath : void 0}`, children: T.length ? T : void 0 } ); }); let A = { label: y, id: i++, facetPropPath: l }; x.length > 0 && (A.children = x), u.push(A); }), u.length > 0 && s.push({ label: c ? c.label : "", id: i++, children: u, key: l }); }), s; }); } // Returns all DOIs of all versions for a given discover dataset _discoverAllDois(t, n = "https://api.pennsieve.io") { return new Promise((r) => { fetch(`${n}/discover/datasets/${t}/versions`).then((o) => o.json()).then((o) => { r(o.map((a) => a.doi)); }); }); } // Get all dois given a list of discoverIds _expandDois(t, n = "https://api.pennsieve.io") { return new Promise((r) => { let o = t.map((a) => this._discoverAllDois(a, n)); Promise.all(o).then((a) => { r(a.flat()); }); }); } _processResultsForCards(t) { let n = [], r = {}; for (let o of t) r = { ...o }, r = { anatomy: o.anatomy ? o.anatomy.organ.map((a) => a.curie) : void 0, doi: o.item.curie.split(":")[1], name: o.item.name, description: o.item.description, updated: o.pennsieve ? o.pennsieve.updatedAt : void 0, publishDate: o.pennsieve ? o.pennsieve.publishDate : void 0, datasetId: o.objectID, detailsReady: !1 }, n.push(r); return n; } _processAnatomy(t) { const n = {}; t.forEach((r) => { r.anatomy && r.anatomy.organ && r.anatomy.organ.forEach((o) => { o.curie && (n[o.curie] = o.name); }), localStorage.setItem("available-name-curie-mapping", JSON.stringify(n)); }); } _processUberonURL(t) { return t.split("/").pop().replace("_", ":"); } /** * Get Search results * This is using fetch from the Algolia API */ search(t, n = "", r = 10, o = 1) { return new Promise((a) => { this.index.search(n, { facets: ["*"], hitsPerPage: r, page: o - 1, filters: t, attributesToHighlight: [], attributesToRetrieve: [ "pennsieve.publishDate", "pennsieve.updatedAt", "item.curie", "item.name", "item.description", "objectID", "anatomy.organ.curie" ] }).then((s) => { let i = { items: this._processResultsForCards(s.hits), total: s.nbHits, discoverIds: s.hits.map((l) => l.pennsieve ? l.pennsieve.identifier : l.objectID), dois: s.hits.map((l) => l.item.curie.split(":")[1]) }; a(i); }); }); } /** * Get key words * This is used to return all keywords for a given search. Note that you often want the hits per page to be maxed out */ anatomyInSearch(t, n = "", r = 999999, o = 1) { return new Promise((a) => { this.index.search(n, { facets: ["*"], hitsPerPage: r, page: o - 1, filters: t, attributesToHighlight: [], attributesToRetrieve: [ "objectID", "item.keywords.keyword", "anatomy.organ.name", "anatomy.organ.curie", "anatomy.organ.subsubcategory.name" ] }).then((s) => { a({ forFlatmap: this.processResultsForFlatmap(s.facets, s.hits), forScaffold: this.processResultsForScaffold(s.hits) }); }); }); } setLocalStorageForTermMapping() { return new Promise((t) => { this.index.search("", { facets: ["*"], hitsPerPage: 999999, page: 0, attributesToHighlight: [], attributesToRetrieve: [ "objectID", "item.keywords.keyword", "anatomy.organ.name", "anatomy.organ.curie" ] }).then((n) => { this._processAnatomy(n.hits); }); }); } processResultsForFlatmap(t, n) { const r = this.filterAvailableAnatomies(t); return n.map((a) => ({ id: a.objectID, terms: a.anatomy ? a.anatomy.organ.map((i) => { if (r.includes(i.name.toLowerCase())) return i.curie; }).filter(Boolean) : [] })); } filterAvailableAnatomies(t) { const n = t["anatomy.organ.name"], r = t["anatomy.organ.category.name"], o = t["anatomy.organ.subcategory.name"], a = t["anatomy.organ.subsubcategory.name"], s = n ? Object.keys(n) : [], i = r ? Object.keys(r) : [], l = o ? Object.keys(o) : [], c = a ? Object.keys(a) : [], u = []; return i.forEach((f) => { const g = f.toLowerCase(); s.forEach((v) => { const d = v.toLowerCase(), h = `${g}.${d}`; l.some((y) => { const x = y.toLowerCase(); return x === h ? !0 : c.find((A) => `${x}.${d}` === A); }) && u.push(d); }); }), u; } processResultsForScaffold(t) { let n = {}; return t.forEach((r) => { r.anatomy && r.anatomy.organ && r.anatomy.organ.forEach((o) => { o.name && (n[o.name] ? n[o.name]++ : n[o.name] = 1); }); }), n; } } const ld = [ { label: "Data Type", id: "item.types", facetPropPath: "item.types.name", facetSubpropPath: "item.types.subcategory.name" }, { label: "Anatomical Structure", id: "anatomy.organ.category", facetPropPath: "anatomy.organ.category.name", facetSubpropPath: "anatomy.organ.subcategory.name", facetSubsubpropPath: "anatomy.organ.subsubcategory.name", facetFilterPath: "anatomy.organ.name" }, { label: "Species", id: "organisms.primary.species", facetPropPath: "organisms.primary.species.name", facetSubpropPath: "organisms.primary.species.subcategory.name" }, { label: "Experimental Approach", id: "item.modalities", facetPropPath: "item.modalities.keyword", facetSubpropPath: "item.modalities.subcategory.name" }, { label: "Sex", id: "attributes.subject.sex", facetPropPath: "attributes.subject.sex.value", facetSubpropPath: "attributes.subject.sex.subcategory.name" }, { label: "Age Categories", id: "attributes.subject.ageCategory", facetPropPath: "attributes.subject.ageCategory.value", facetSubpropPath: "attributes.subject.ageCategory.subcategory.name" }, { label: "Consortia", id: "supportingAwards.consortium", facetPropPath: "supportingAwards.consortium.name", facetSubpropPath: "supportingAwards.consortium.subcategory.name" } ]; function Ih(e = void 0) { if (e === void 0) return "NOT item.published.status:embargo"; e.forEach((o) => { o.label = o.facet3 ? o.facet3 : o.facet2 ? o.facet2 : o.facet; }); let t = Xy(e); t.forEach((o) => { o.facet3 && o.facet3 === "Non specific" && (o.label = o.facet2); }); let n = "NOT item.published.status:embargo"; return n = `(${n}) AND `, ld.map( (o) => [o.facetPropPath, o.facetFilterPath] ).map(([o, a]) => { let s = t.filter( (c) => c.facetPropPath == o ), i = "", l = ""; s.map((c) => { let u = c.facetSubPropPath ? c.facetSubPropPath : a || o; c.AND ? l += `AND "${u}":"${c.label}"` : i += `"${u}":"${c.label}" OR `; }), !(i == "" && l == "") && (i = `(${i.substring(0, i.lastIndexOf(" OR "))})`, n += `${i + l} AND `, n = n.split("()AND ").join("")); }), n.substring(0, n.lastIndexOf(" AND ")); } function Xy(e) { return e.filter((t) => t.label !== "Show all"); } const Ta = function(e) { return e.charAt(0).toUpperCase() + e.slice(1); }, Ah = function(e) { const t = e.toLowerCase(); return bi[t] ? Ta(bi[t]) : e === e.toUpperCase() ? e : Ta(t); }, M6 = { name: "SearchFilters", components: { MapSvgIcon: py, MapSvgSpriteColor: Jy, Option: _u, Select: zi, Popover: Qa, Cascader: zg }, props: { /** * Object containing information for * the required viewing. */ entry: Object, envVars: { type: Object, default: () => { } } }, data: function() { return { algoliaClient: void 0, cascaderIsReady: !1, previousShowAllChecked: { species: !1, gender: !1, organ: !1, datasets: !1 }, showFiltersText: !0, cascadeSelected: [], cascadeSelectedWithBoolean: [], filterTimeout: null, numberShown: 10, filters: [], facets: ["Species", "Gender", "Organ", "Datasets"], numberDatasetsShown: ["10", "20", "50"], cascaderProps: { multiple: !0 }, options: [ { value: "Species", label: "Species", children: [{}] } ], presentTags: [], searchInputs: {} }; }, setup() { const e = Ns({}), t = Ns({ term: /* @__PURE__ */ new Set(), facet: /* @__PURE__ */ new Set(), facet2: /* @__PURE__ */ new Set(), facet3: /* @__PURE__ */ new Set() }); return { cascaderTags: e, correctnessCheck: t }; }, computed: { numberOfResultsText: function() { return `${this.entry.numberOfHits} results | Showing`; }, showFilters: function() { return this.entry.showFilters; } }, watch: { entry: { deep: !0, immediate: !0, handler: function(e, t) { JSON.stringify(e == null ? void 0 : e.options) !== JSON.stringify(t == null ? void 0 : t.options) && (this.options = [], this.filters = [], this.cascaderIsReady = !1, this.populateCascader().then(() => { this.cascaderIsReady = !0, this.options.length && (this.checkShowAllBoxes(), this.cssMods(), this.$emit("cascaderReady")); })); } } }, methods: { /** * Internal only. * Create value of cascader. * Takes an array of label to create the value */ createCascaderItemValue: function(e) { let t; if (e != null && e.length) { t = e[0]; for (let n = 1; e.length > n; n++) t = `${t}>${e[n]}`; t.includes("undefined") && console.warn( "Warning: One or more of the facets is undefined, this will not be shown in the cascader" ); } return t; }, createChildrenCascaderValue: function(e, t, n) { if (e != null && e.length) for (let r = 0; r < e.length; r++) { const o = e[r]; if (e[r].facetPropPath !== "supportingAwards.consortium.name" && (e[r].label = Ah( o.label )), o.key && t.key.includes("flatmap.connectivity.source.")) { const a = o.key, s = t.key, i = a.replace(`${s}.`, ""); e[r].value = this.createCascaderItemValue([t.label, i]); } else { const a = n.slice(); a.push(o.label), e[r].value = this.createCascaderItemValue(a), this.createChildrenCascaderValue(o.children, t, a); } } }, getNodeKey: function(e) { return e ? e.split(">")[1] : ""; }, isFlatmapConnectionsNode: function(e) { return e.pathValues[0].includes("flatmap.connectivity.source") && e.isLeaf; }, isFlatmapConnectionsFilterNode: function(e) { return e.pathValues[0].includes("flatmap.connectivity.source") && e.pathLabels.includes("Filters") && e.isDisabled && e.isLeaf; }, processOptions: function() { const e = JSON.parse(JSON.stringify(this.options)); e.forEach((t, n) => { e[n].total = this.countTotalFacet(t), e[n].label = Ah(t.label), e[n].value = this.createCascaderItemValue( [t.key] ), e[n].children.find((r) => r.label === "Show all") || e[n].children.unshift({ value: this.createCascaderItemValue(["Show all"]), label: "Show all" }), t.key.includes("flatmap.connectivity.source") && e[n].children.unshift({ value: this.createCascaderItemValue(["ConnectivityFilters"]), label: "Filters", disabled: !0 }), this.createChildrenCascaderValue(e[n].children, t, [t.label]); }), Object.assign(this.options, e); }, populateCascader: function() { return this.entry.options ? new Promise((e) => { this.facets = this.entry.options, this.options = this.entry.options, this.processOptions(), e(); }) : new Promise((e) => { this.algoliaClient.getAlgoliaFacets(ld).then((t) => { this.facets = t, Pe.emit("available-facets", t), this.options = t, this.processOptions(); }).finally(() => { e(); }); }); }, isConnectivityTag: function(e) { return /^[A-Za-z]:/.test(e); }, getConnectivityTag: function(e) { const t = e.indexOf(":"); return t !== -1 ? e.substring(t + 1) : e; }, modifyCascaderTagStyle: function(e) { return this.isConnectivityTag(e) ? "connectivity-tag" : ""; }, flattenToEvents: function(e, t, n, r = void 0) { const o = []; for (const [a, s] of Object.entries(t)) { const i = n.find((l) => l.label === a); if (Object.entries(s).length) { const l = i.key || r, c = this.flattenToEvents(e, s, i.children, l); o.push(...c); } else a !== e && o.push([r, i.value]); } return o; }, /** * Create manual events when cascader tag is closed */ cascadeTagClose: function(e) { const t = this.isConnectivityTag(e) ? this.getConnectivityTag(e) : e, n = this.flattenToEvents(t, this.cascaderTags, this.options); this.cascadeEvent(n); }, flattenToTags: function(e) { const t = []; for (const [n, r] of Object.entries(e)) if (Object.entries(r).length) { const o = this.flattenToTags(r); t.push(...o); } else n !== "Show all" && t.push(n); return t; }, /** * Re-generate 'cascaderTags' and 'presentTags' * Not able to avoid wrong facet at the moment */ tagsChangedCallback: function(e) { this.correctnessCheck.term && this.correctnessCheck.facet && this.correctnessCheck.facet2 && this.correctnessCheck.facet3 && this.options.map((t) => { var n; this.correctnessCheck.term.add(t.label), (n = t.children) == null || n.map((r) => { var o; this.correctnessCheck.facet.add(r.label), (o = r.children) == null || o.map((a) => { var s; this.correctnessCheck.facet2.add(a.label), (s = a.children) == null || s.map((i) => { this.correctnessCheck.facet3.add(i.label); }); }); }); }), this.cascaderTags = {}, this.cascaderTagsClone = {}, this.presentTags = [], e.map((t) => { const { facet: n, facet2: r, facet3: o, term: a, tagLabel: s, facetPropPath: i } = t; let l = n, c = ""; i && i.includes("flatmap.connectivity.source.") && s && (l = s, c = a.charAt(0)), a && this.correctnessCheck.term.has(a) && (a in this.cascaderTags || (this.cascaderTags[a] = {}, this.cascaderTagsClone[a] = {}), l && this.correctnessCheck.facet.has(l) && (l in this.cascaderTags[a] || (this.cascaderTags[a][l] = {}, c ? this.cascaderTagsClone[a][c + ":" + l] = {} : this.cascaderTagsClone[a][l] = {}), r && this.correctnessCheck.facet2.has(r) && (r in this.cascaderTags[a][l] || (this.cascaderTags[a][l][r] = {}, this.cascaderTagsClone[a][l][r] = {}), o && this.correctnessCheck.facet3.has(o) && (o in this.cascaderTags[a][l][r] || (this.cascaderTags[a][l][r][o] = {}, this.cascaderTagsClone[a][l][r][o] = {}))))); }), this.presentTags = [...this.presentTags, ...this.flattenToTags(this.cascaderTagsClone)], this.presentTags = [...new Set(this.presentTags)].sort(), this.presentTags.length > 0 ? this.showFiltersText = !1 : this.showFiltersText = !0; }, /** * Support for function 'showAllEventModifierForAutoCheckAll' * Called in function 'populateCascader' */ countTotalFacet: function(e) { return ["anatomy.organ.category.name"].includes(e.key) ? e.children.reduce((n, r) => (n = typeof n == "number" ? n : n.children.length, n + r.children.length)) : e.children.length; }, /** * When check/uncheck all child items, automatically check "Show all" */ showAllEventModifierForAutoCheckAll: function(e) { const t = {}; return e.map((n) => { const r = n[0]; r in t ? t[r] += 1 : t[r] = 1; }), this.options.map((n) => { const r = n.key, o = n.children.filter((s) => s.label === "Show all")[0].value, a = n.total; t[r] === a && (e = e.filter((s) => s[0] !== n.key), delete t[r]), r in t || e.unshift([r, o]); }), e; }, // cascadeEvent: initiate searches based off cascader changes cascadeEvent: function(e) { let t = [...e]; if (t) { t = this.showAllEventModifier(t), t = this.showAllEventModifierForAutoCheckAll(t); const n = this.$refs.cascader, o = (n == null ? void 0 : n.getCheckedNodes(!0)).filter( (i) => i.checked && i.label !== "Show all" ); if (this.__expandItem__) { let i = 0; this.__expandItem__.length > 1 && (i = 1); const l = t.filter((u) => u[i] == this.__expandItem__[i]), c = t.filter((u) => u[i] !== this.__expandItem__[i]); t = [...l, ...c]; } let a = t.filter((i) => i !== void 0).map((i) => { let { hString: l, bString: c } = this.findHierarachyStringAndBooleanString(i), { facet: u, facet2: f, facet3: g, term: v } = this.getFacetsFromHierarchyString(l); const d = o.find( (m) => i.join() === m.pathValues.join() ), h = d ? d.label : void 0; return { facetPropPath: i[0], facet: u, facet2: f, facet3: g, term: v, AND: c, // for setting the boolean tagLabel: h // for connectivity filter's cascader tag }; }), s = t.filter((i) => i !== void 0).map((i) => { let l = i[0].includes("duplicate") ? i[0].split("duplicate")[0] : i[0], { hString: c, bString: u } = this.findHierarachyStringAndBooleanString(i), { facet: f, facet2: g, facet3: v, term: d } = this.getFacetsFromHierarchyString(c); v ? v === "Non specific" ? f = g : f = v : g && (f = g); const h = o.find( (y) => i.join() === y.pathValues.join() ), m = h ? h.label : void 0; return { facetPropPath: l, facet: f, term: d, AND: u, // for setting the boolean tagLabel: m // for connectivity filter's cascader tag }; }); this.filterTimeout && clearTimeout(this.filterTimeout), this.$emit("loading", !0), this.setCascader(a), this.filterTimeout = setTimeout(() => { this.$emit("filterResults", s), this.cssMods(); }, 600); } }, //this fucntion is needed as we previously stored booleans in the array of event that // are stored in the cascader findHierarachyStringAndBooleanString(e) { let t, n; const r = e.length; return r >= 3 ? e[r - 1] && (typeof e[r - 1] == "string" || e[r - 1] instanceof String) && e[r - 1].split(">").length > 2 ? t = e[r - 1] : t = e[r - 2] : t = e[1], r >= 3 && typeof e[r - 1] == "boolean" && (n = e[r - 1]), { hString: t, bString: n }; }, // Splits the terms and facets from the string stored in the cascader getFacetsFromHierarchyString(e) { let t = e.split(">"); return { term: t[0], facet: t[1], facet2: t[2], facet3: t[3] }; }, // showAllEventModifier: Modifies a cascade event to unclick all selections in category if "show all" is clicked. Also unchecks "Show all" if any secection is clicked // *NOTE* Does NOT remove 'Show all' selections from showing in 'cascadeSelected' showAllEventModifier: function(e) { if (e.map((n) => n ? n[1].toLowerCase().includes("show all") : !1).includes(!0)) { let n = [], r = {}; for (const o in e) r[e[o][0]] === void 0 && (r[e[o][0]] = []), r[e[o][0]].push(e[o]); for (const o in r) { let a; for (let s = r[o].length - 1; s >= 0; s--) if (r[o][s][1].toLowerCase().includes("show all")) { a = r[o].splice(s, 1)[0]; break; } a ? this.previousShowAllChecked[o] && r[o].length > 0 ? n.push(...r[o]) : n.push(a) : n.push(...r[o]); } return n.sort((o, a) => this.__expandItem__ ? o[0] == this.__expandItem__ ? a[0] == this.__expandItem__ ? 0 : -1 : a[0] == this.__expandItem__ ? o[0] == this.__expandItem__ ? 0 : 1 : 0 : 0); } return e; }, cascadeExpandChange: function(e) { this.__expandItem__ = e, this.__expandItem__ && this.updateListFilters(this.__expandItem__[0]), this.updateListStyleOrder(), this.cssMods(); }, updateListStyleOrder: function() { this.$nextTick(() => { const e = this.$refs.cascader, t = e == null ? void 0 : e.contentRef; if (t) { const n = t.querySelectorAll(".el-cascader-menu__list"); n && n.forEach((r) => { r.querySelector(".sidebar-cascader-search") ? r.classList.add("cascader-menu-with-search") : r.classList.remove("cascader-menu-with-search"); }); } }); }, searchInputChange: function(e, t) { e.preventDefault(); const { target: n } = e; if (n) { const r = n.value, o = t.pathValues[0]; this.searchInputs[o] = r, this.updateListFilters(o); } }, searchInputFocusToggle: function(e, t) { const { target: n } = e; if (!n) return; const r = n.closest(".el-input__wrapper"); t === !0 ? r.classList.add("is-focus") : r.classList.remove("is-focus"); }, updateListFilters: function(e) { const t = this.searchInputs[e] || ""; this.$nextTick(() => { const n = this.$refs["searchInput_" + e]; if (!n) return; n.closest(".el-cascader-menu__list").querySelectorAll(".el-cascader-node").forEach((o, a) => { a > 1 && (o.querySelector(".el-cascader-node__label").textContent.toLowerCase().includes(t.toLowerCase()) ? o.classList.remove("hide") : o.classList.add("hide")); }), t && n.focus(); }); }, numberShownChanged: function(e) { this.$emit("numberPerPage", parseInt(e)); }, updatePreviousShowAllChecked: function(e) { for (const t in this.previousShowAllChecked) this.previousShowAllChecked[t] = !1; e.forEach((t) => { t[1].toLowerCase().includes("show all") && (this.previousShowAllChecked[t[0]] = !0); }); }, // setCascader: Clears previous selections and takes in an array of facets to select: filterFacets // facets are in the form: // { // facetPropPath: 'anatomy.organ.name', // term: 'Sex', // facet: 'Male' // AND: true // Optional value for setting the boolean within a facet // } setCascader: function(e) { if (this.cascaderIsReady && e && e.length != 0) { const t = (n) => { let r = [ n.facetPropPath, this.createCascaderItemValue([Ta(n.term), n.facet]) ]; return n.facet2 && (r.push( this.createCascaderItemValue([Ta(n.term), n.facet, n.facet2]) ), n.facet3 && r.push( this.createCascaderItemValue([Ta(n.term), n.facet, n.facet2, n.facet3]) )), r; }; this.cascadeSelected = e.map((n) => t(n)), this.cascadeSelectedWithBoolean = e.map((n) => { let r = t(n); return r.push(n.AND), r; }), this.updatePreviousShowAllChecked(this.cascadeSelected); } this.tagsChangedCallback(e); }, addFilter: function(e) { if (this.cascaderIsReady && e) { let t = this.validateAndConvertFilterToHierarchical(e); if (t && t.length) return t.forEach((n) => { this.cascadeSelected.filter((o) => o.term != n.term); const r = [ n.facetPropPath, this.createCascaderItemValue([n.term, n.facet]), this.createCascaderItemValue([n.term, n.facet, n.facet2]) ]; n.facet3 && r.push(this.createCascaderItemValue([n.term, n.facet, n.facet2, n.facet3])), this.cascadeSelected.push([...r]), this.cascadeSelectedWithBoolean.push([...r, n.AND]); }), !0; } }, addFilters: function(e) { let t = !1; return this.cascaderIsReady && e.forEach((n) => { t = t || this.addFilter(n); }), t; }, initiateSearch: function() { this.cascadeEvent(this.cascadeSelectedWithBoolean); }, // checkShowAllBoxes: Checks each 'Show all' cascade option by using the setCascader function checkShowAllBoxes: function() { this.setCascader( this.options.map((e) => ({ facetPropPath: e.value, term: e.label, facet: "Show all" })) ); }, makeCascadeLabelsClickable: function() { this.$nextTick(() => { document.querySelectorAll(".sidebar-cascader-popper .el-cascader-node__label").forEach((e) => { e.onclick = function() { const t = this.previousElementSibling; t && (t.parentElement.attributes["aria-owns"] || this.previousElementSibling.click()); }; }); }); }, cssMods: function() { this.makeCascadeLabelsClickable(); }, flattenToFilters: function(e, t, n = !1) { let r = []; if (t) { const o = e.facet.toLowerCase(); let a = !1; for (const s of t) { const i = e.facetPropPath.includes("flatmap.connectivity.source.") && s.key, l = i ? s.key.replace(`${e.facetPropPath}.`, "").toLowerCase() === o : s.label.toLowerCase() === o; if (s.children && s.children.length) { const c = l || n, u = this.flattenToFilters(e, s.children, c); r.push(...u); } else if (s.facetPropPath || s.key) { const [c, u, f, g] = s.value.split(">"); g === "Non specific" && (a = !0); const v = { term: c, facet: u, facetPropPath: e.facetPropPath, ...f && { facet2: f }, ...g && { facet3: g } }; "AND" in e && (v.AND = e.AND), (n || l) && (i ? r.push(e) : r.push(v)); } } n && a && (r = r.filter((s) => !s.facet3 || s.facet3 === "Non specific")); } return r; }, /* * Given a filter, the function below returns the filter in the format of the cascader, returns false if facet is not found */ validateAndConvertFilterToHierarchical: function(e) { if (e && e.facet && e.term) { if (e.facet2 || e.facet3) return [e]; { const t = this.options.find((n) => n.label === e.term); if (t) return this.flattenToFilters(e, t.children); } } }, getHierarchicalValidatedFilters: function(e) { const t = [], n = [], r = []; if (e) { if (!this.cascaderIsReady) return { result: e, notFound: r }; e.forEach((o) => { const a = this.validateAndConvertFilterToHierarchical(o); a && a.length ? a.forEach((s) => { t.push(s), n.push(s.term); }) : this.options.find((i) => i.key === o.facetPropPath) && r.push(o); }), this.options.forEach((o) => { n.includes(o.label) || t.push({ facet: "Show all", facetPropPath: o.key, label: "Show all", term: o.label }); }); } return { result: t, notFound: r }; }, hasLineStyles: function(e) { return "colour" in e && e.colourStyle === "line"; }, getLineStyles: function(e) { return "colour" in e && e.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" }; }, getBackgroundStyles: function(e) { return "colour" in e && e.colourStyle === "background" ? { background: e.colour } : {}; } }, mounted: function() { this.entry.options || (this.algoliaClient = Ns(new Yy( this.envVars.ALGOLIA_ID, this.envVars.ALGOLIA_KEY, this.envVars.PENNSIEVE_API_LOCATION )), this.algoliaClient.initIndex(this.envVars.ALGOLIA_INDEX), this.algoliaClient.setLocalStorageForTermMapping()), this.populateCascader().then(() => { this.cascaderIsReady = !0, this.checkShowAllBoxes(), this.setCascader(this.entry.filterFacets), this.cssMods(), this.$emit("cascaderReady"); }); } }, j6 = { class: "filters" }, V6 = { key: 0 }, z6 = { key: 0, class: "cascader-tag" }, H6 = { class: "el-tags-container" }, U6 = { class: "el-tags-container" }, q6 = { class: "search-filters transition-box" }, K6 = { key: 0 }, W6 = { class: "sidebar-cascader-search el-input" }, G6 = { class: "el-input__wrapper" }, J6 = ["value", "onInput"], Z6 = { key: 1 }, Y6 = { key: 0, class: "sr-only" }, X6 = { key: 0, class: "filter-default-value" }, Q6 = { class: "dataset-shown" }, e9 = { class: "dataset-results-feedback" }; function t9(e, t, n, r, o, a) { const s = Se("MapSvgSpriteColor"), i = lo, l = Qa, c = yu, u = mu, f = zg, g = Se("MapSvgIcon"), v = _u, d = zi, h = Zo; return C(), F("div", j6, [ V(s), a.showFilters && e.options.length > 0 ? (C(), F("div", V6, [ e.presentTags.length > 0 ? (C(), F("div", z6, [ V(i, { class: "ml-2", type: "info", closable: "", onClose: t[0] || (t[0] = (m) => a.cascadeTagClose(e.presentTags[0])) }, { default: P(() => [ M("span", { class: N(["tag-text", a.modifyCascaderTagStyle(e.presentTags[0])]) }, se(e.presentTags[0]), 3) ]), _: 1 }), e.presentTags.length > 1 ? (C(), J(l, { key: 0, placement: "bottom-start", width: 250, trigger: "hover", "popper-class": "cascade-tags-popover" }, { default: P(() => [ M("div", H6, [ (C(!0), F(Ie, null, ot(e.presentTags.slice(1), (m, y) => (C(), J(i, { key: y, class: N(["ml-2", a.modifyCascaderTagStyle(m)]), type: "info", closable: "", onClose: (x) => a.cascadeTagClose(m) }, { default: P(() => [ Ce(se(m), 1) ]), _: 2 }, 1032, ["class", "onClose"]))), 128)) ]) ]), reference: P(() => [ M("div", U6, [ e.presentTags.length > 1 ? (C(), J(i, { key: 0, class: "ml-2", type: "info" }, { default: P(() => [ Ce(" +" + se(e.presentTags.length - 1), 1) ]), _: 1 })) : G("", !0) ]) ]), _: 1 })) : G("", !0) ])) : G("", !0), V(ir, { name: "el-zoom-in-top" }, { default: P(() => [ xe((C(), F("span", q6, [ V(f, { class: "cascader", ref: "cascader", modelValue: e.cascadeSelected, "onUpdate:modelValue": t[3] || (t[3] = (m) => e.cascadeSelected = m), size: "large", placeholder: " ", "collapse-tags": !0, "collapse-tags-tooltip": "", options: e.options, props: e.cascaderProps, onChange: t[4] || (t[4] = (m) => a.cascadeEvent(m)), onExpandChange: a.cascadeExpandChange, "show-all-levels": !0, "popper-class": "sidebar-cascader-popper" }, { default: P(({ node: m, data: y }) => [ a.isFlatmapConnectionsFilterNode(m) ? (C(), F("div", K6, [ M("div", W6, [ M("div", G6, [ M("input", { class: "el-input__inner", ref: "searchInput_" + m.pathValues[0], value: e.searchInputs[m.pathValues[0]], onInput: (x) => a.searchInputChange(x, m), onFocus: t[1] || (t[1] = (x) => a.searchInputFocusToggle(x, !0)), onBlur: t[2] || (t[2] = (x) => a.searchInputFocusToggle(x, !1)), style: { width: "100%" }, autocomplete: "off", placeholder: "Search" }, null, 40, J6) ]) ]) ])) : (C(), F("div", Z6, [ V(u, null, { default: P(() => [ a.hasLineStyles(y) ? (C(), J(c, { key: 0, span: 4 }, { default: P(() => [ M("div", { class: "path-visual", style: Ue(a.getLineStyles(y)) }, null, 4) ]), _: 2 }, 1024)) : G("", !0), V(c, { span: 20 }, { default: P(() => [ a.isFlatmapConnectionsNode(m) ? (C(), F("span", Y6, se(a.getNodeKey(m.value)), 1)) : G("", !0), M("div", { style: Ue(a.getBackgroundStyles(y)) }, se(y.label), 5) ]), _: 2 }, 1024) ]), _: 2 }, 1024) ])) ]), _: 1 }, 8, ["modelValue", "options", "props", "onExpandChange"]), e.showFiltersText ? (C(), F("div", X6, "Filters")) : G("", !0), V(l, { title: "How do filters work?", width: "250", trigger: "hover", "popper-class": "filter-help-popover" }, { reference: P(() => [ V(g, { icon: "help", class: "help" }) ]), default: P(() => [ M("div", null, [ t[7] || (t[7] = M("strong", null, "Within categories:", -1)), t[8] || (t[8] = Ce(" OR ")), t[9] || (t[9] = M("br", null, null, -1)), Ce(" example: " + se(n.entry.helper.within) + " ", 1), t[10] || (t[10] = M("br", null, null, -1)), t[11] || (t[11] = M("br", null, null, -1)), t[12] || (t[12] = M("strong", null, "Between categories:", -1)), t[13] || (t[13] = Ce(" AND ")), t[14] || (t[14] = M("br", null, null, -1)), Ce(" example: " + se(n.entry.helper.between), 1) ]) ]), _: 1 }) ])), [ [h, !e.cascaderIsReady] ]) ]), _: 1 }) ])) : G("", !0), M("div", Q6, [ M("span", e9, se(a.numberOfResultsText), 1), V(d, { class: "number-shown-select", modelValue: e.numberShown, "onUpdate:modelValue": t[5] || (t[5] = (m) => e.numberShown = m), placeholder: "10", onChange: t[6] || (t[6] = (m) => a.numberShownChanged(m)) }, { default: P(() => [ (C(!0), F(Ie, null, ot(e.numberDatasetsShown, (m) => (C(), J(v, { key: m, label: m, value: m }, null, 8, ["label", "value"]))), 128)) ]), _: 1 }, 8, ["modelValue"]) ]) ]); } const cl = /* @__PURE__ */ Nn(M6, [["render", t9], ["__scopeId", "data-v-5ccdbcd9"]]); var n9 = async function(e) { if (!e.ok) { let t = await e.json(); throw t ? new Error(t.message) : new Error(e); } return e; }, r9 = { searchInput: "", lastSearch: "", results: [], numberOfHits: 0, filter: [], loadingCards: !1, numberPerPage: 10, page: 1, pageModel: 1, start: 0, hasSearched: !1, contextCardEnabled: !1 }; const o9 = { components: { SearchFilters: cl, DatasetCard: dy, SearchHistory: ll, Button: Kt, Card: Mi, Drawer: bu, Icon: He, Input: Go, Pagination: Hi }, name: "DatasetExplorer", props: { visible: { type: Boolean, default: !1 }, isDrawer: { type: Boolean, default: !0 }, entry: { type: Object, default: () => r9 }, envVars: { type: Object, default: () => { } } }, data: function() { return { ...this.entry, algoliaClient: void 0, bodyStyle: { flex: "1 1 auto", "flex-flow": "column", display: "flex" }, cascaderIsReady: !1 }; }, computed: { // This computed property populates filter data's entry object with $data from this sidebar filterEntry: function() { return { numberOfHits: this.numberOfHits, filterFacets: this.filter, showFilters: !0, helper: { within: "'heart' OR 'colon'", between: "'rat' AND 'lung'" } }; } }, methods: { hoverChanged: function(e) { const t = e ? { ...e, tabType: "dataset" } : { tabType: "dataset" }; this.$emit("hover-changed", t); }, resetSearch: function() { this.numberOfHits = 0, this.discoverIds = [], this._dois = [], this.results = [], this.loadingCards = !1; }, openSearch: function(e, t = "") { if (this.searchInput = t, this.resetPageNavigation(), this.cascaderIsReady) { const n = this.$refs.filtersRef.getHierarchicalValidatedFilters(e), r = n.notFound ? n.notFound.filter((o) => o.facet.toLowerCase() !== "show all") : []; this.filter = n.result, r.forEach((o) => { im({ message: `${o.facet} cannot be found in ${o.term}!`, appendTo: this.$el, showClose: !0, offset: 113 }); }), e && e.length > 0 && this.filter && this.filter.length === 0 ? (this.$refs.filtersRef.checkShowAllBoxes(), this.resetSearch()) : this.filter && (this.searchAlgolia(this.filter, t), this.$refs.filtersRef.setCascader(this.filter), this.searchHistoryUpdate(this.filter, t)); } else this.filter = e, (!e || e.length == 0) && (this.searchAlgolia(this.filter, t), this.searchHistoryUpdate(this.filter, t)); }, addFilter: function(e) { this.cascaderIsReady ? (this.resetPageNavigation(), e && this.$refs.filtersRef.addFilters(e) && this.$refs.filtersRef.initiateSearch()) : Array.isArray(this.filter) ? this.filter.push(...e) : this.filter = [...e]; }, cascaderReady: function() { this.cascaderIsReady = !0, this.openSearch(this.filter, this.searchInput); }, clearSearchClicked: function() { this.searchInput = "", this.searchAndFilterUpdate(); }, onResetClick: function() { this.openSearch([], ""), this.$emit("search-changed", { value: this.searchInput, tabType: "dataset", type: "reset-update" }), Pe.emit("trackEvent", { event_name: "portal_maps_action_filter", category: "reset", location: "map_sidebar_dataset" }); }, searchEvent: function(e = !1) { (e.keyCode === 13 || e instanceof MouseEvent) && (this.searchInput = this.searchInput.trim(), this.searchAndFilterUpdate()); }, filterUpdate: function(e) { this.filter = [...e], this.searchAndFilterUpdate(), this.$emit("search-changed", { value: e, tabType: "dataset", type: "filter-update" }); }, searchAndFilterUpdate: function() { this.resetPageNavigation(), this.searchAlgolia(this.filter, this.searchInput), this.searchHistoryUpdate(this.filter, this.searchInput); }, searchHistoryUpdate: function(e, t) { this.$refs.searchHistory.selectValue = "Search history", (e.length || t != null && t.trim()) && this.$refs.searchHistory.addSearchToHistory(e, t); }, searchAlgolia(e, t = "") { this.loadingCards = !0, this.algoliaClient.anatomyInSearch(Ih(e), t).then((n) => { Pe.emit("anatomy-in-datasets", n.forFlatmap), Pe.emit("number-of-datasets-for-anatomies", n.forScaffold); }), this.algoliaClient.search(Ih(e), t, this.numberPerPage, this.page).then((n) => { this.numberOfHits = n.total, this.discoverIds = n.discoverIds, this._dois = n.dois, this.results = n.items, this.loadingCards = !1, this.scrollToTop(), this.$emit("search-changed", { value: this.searchInput, tabType: "dataset", type: "query-update" }), this._abortController && this._abortController.abort(), this._abortController = new AbortController(); const r = this._abortController.signal; this.perItemSearch(r, { count: 0 }); }); }, filtersLoading: function(e) { this.loadingCards = e; }, numberPerPageUpdate: function(e) { this.numberPerPage = e, Pe.emit("trackEvent", { event_name: "portal_maps_dataset_perPage", category: e + "", location: "map_sidebar_dataset" }); const t = this.page === 1; this.pageChange(1, t); }, pageChange: function(e, t = !1) { this.start = (e - 1) * this.numberPerPage, this.page = e, this.searchAlgolia( this.filter, this.searchInput, this.numberPerPage, this.page ), t || Pe.emit("trackEvent", { event_name: "portal_maps_dataset_pagination", category: `page_${this.page}`, location: "map_sidebar_dataset" }); }, handleMissingData: function(e) { let t = this.results.findIndex((n) => n.doi === e); this.results[t] && (this.results[t].detailsReady = !0); }, perItemSearch: function(e, t) { if (10 > t.count) { const r = this._dois.shift(); r && (t.count++, this.callSciCrunch(this.envVars.API_LOCATION, { dois: [r] }, e).then((o) => { o.numberOfHits === 0 ? this.handleMissingData(r) : this.resultsProcessing(o), this.$refs.content.style["overflow-y"] = "scroll", t.count--, this.perItemSearch(e, t); }).catch((o) => { o.name !== "AbortError" && (this.handleMissingData(r), t.count--, this.perItemSearch(e, t)); }), this.perItemSearch(e, t)); } }, scrollToTop: function() { this.$refs.content && this.$refs.content.scroll({ top: 0, behavior: "smooth" }); }, resetPageNavigation: function() { this.start = 0, this.page = 1; }, resultsProcessing: function(e) { this.lastSearch = this.searchInput, e.results.length !== 0 && e.results.forEach((t) => { let n = this.results.findIndex( (r) => t.doi ? t.doi.includes(r.doi) : !1 ); Object.assign(this.results[n], t), Object.assign(this.results[n], { numberSamples: t.sampleSize ? parseInt(t.sampleSize) : 0, numberSubjects: t.subjectSize ? parseInt(t.subjectSize) : 0, updated: (t.updated && t.updated.length) > 0 ? t.updated[0].timestamp.split("T")[0] : "", url: t.uri[0], datasetId: t.dataset_identifier, datasetRevision: t.dataset_revision, datasetVersion: t.dataset_version, organs: t.organs && t.organs.length > 0 ? [...new Set(t.organs.map((r) => r.name))] : void 0, species: t.organisms && t.organisms[0].species ? [ ...new Set( t.organisms.map( (r) => r.species ? r.species.name : null ) ) ] : void 0, // This processing only includes each gender once into 'sexes' scaffolds: t["abi-scaffold-metadata-file"], thumbnails: t["abi-thumbnail"] ? t["abi-thumbnail"] : t["abi-scaffold-thumbnail"], scaffoldViews: t["abi-scaffold-view-file"], videos: t.video, plots: t["abi-plot"], images: t["common-images"], contextualInformation: t["abi-contextual-information"].length > 0 ? t["abi-contextual-information"] : void 0, segmentation: t["mbf-segmentation"], //omex format will be the preferred mimetype simulation: t["abi-simulation-omex-file"] ? t["abi-simulation-omex-file"] : t["abi-simulation-file"], flatmaps: t["abi-flatmap-file"], additionalLinks: t.additionalLinks, detailsReady: !0 }), this.results[n] = this.results[n]; }); }, createfilterParams: function(e) { let t = new URLSearchParams(); for (const n in e) Array.isArray(e[n]) ? e[n].forEach((r) => { t.append(n, r); }) : t.append(n, e[n]); return t.toString(); }, callSciCrunch: function(e, t = {}, n) { return new Promise((r, o) => { let a = this.envVars.API_LOCATION + this.searchEndpoint + "?" + this.createfilterParams(t); fetch(a, { signal: n }).then(n9).then((s) => s.json()).then((s) => r(s)).catch((s) => o(s)); }); }, getAlgoliaFacets: async function() { return await this.algoliaClient.getAlgoliaFacets( ld ); }, searchHistorySearch: function(e) { this.searchInput = e.search, this.filter = e.filters, this.openSearch([...e.filters], e.search); }, getSearch: function() { return this.searchInput; }, getFilters: function() { return this.filter.some((t) => t.facet.toLowerCase() !== "show all") ? this.filter : []; } }, mounted: function() { this.algoliaClient = Ns(new Yy( this.envVars.ALGOLIA_ID, this.envVars.ALGOLIA_KEY, this.envVars.PENNSIEVE_API_LOCATION )), this.algoliaClient.initIndex(this.envVars.ALGOLIA_INDEX), this.openSearch(this.filter, this.searchInput); }, created: function() { this.searchEndpoint = "dataset_info/using_multiple_dois/"; } }, a9 = { class: "header" }, s9 = { class: "content scrollbar", ref: "content" }, i9 = { key: 0, class: "error-feedback" }; function l9(e, t, n, r, o, a) { const s = Go, i = Kt, l = cl, c = ll, u = dy, f = Hi, g = Mi, v = Zo; return C(), J(g, { "body-style": e.bodyStyle, class: "content-card" }, { header: P(() => [ M("div", a9, [ V(s, { class: "search-input", placeholder: "Search", modelValue: e.searchInput, "onUpdate:modelValue": t[0] || (t[0] = (d) => e.searchInput = d), onKeyup: a.searchEvent, clearable: "", onClear: a.clearSearchClicked }, null, 8, ["modelValue", "onKeyup", "onClear"]), V(i, { type: "primary", class: "button", onClick: a.searchEvent, size: "large" }, { default: P(() => t[3] || (t[3] = [ Ce(" Search ") ])), _: 1 }, 8, ["onClick"]), V(i, { link: "", class: "el-button-link", onClick: a.onResetClick, size: "large" }, { default: P(() => t[4] || (t[4] = [ Ce(" Reset ") ])), _: 1 }, 8, ["onClick"]) ]) ]), default: P(() => [ V(l, { class: "filters", ref: "filtersRef", entry: a.filterEntry, envVars: n.envVars, onFilterResults: a.filterUpdate, onNumberPerPage: a.numberPerPageUpdate, onLoading: a.filtersLoading, onCascaderReady: a.cascaderReady }, null, 8, ["entry", "envVars", "onFilterResults", "onNumberPerPage", "onLoading", "onCascaderReady"]), V(c, { ref: "searchHistory", localStorageKey: "sparc.science-dataset-search-history", onSearch: a.searchHistorySearch }, null, 8, ["onSearch"]), xe((C(), F("div", s9, [ e.results.length === 0 && !e.loadingCards ? (C(), F("div", i9, " No results found - Please change your search / filter criteria. ")) : G("", !0), (C(!0), F(Ie, null, ot(e.results, (d) => (C(), F("div", { key: d.doi, class: "step-item" }, [ V(u, { class: "dataset-card", entry: d, envVars: n.envVars, onMouseenter: (h) => a.hoverChanged(d), onMouseleave: t[1] || (t[1] = (h) => a.hoverChanged(void 0)) }, null, 8, ["entry", "envVars", "onMouseenter"]) ]))), 128)), V(f, { class: "pagination", "current-page": e.page, "onUpdate:currentPage": t[2] || (t[2] = (d) => e.page = d), "hide-on-single-page": "", large: "", layout: "prev, pager, next", "page-size": e.numberPerPage, total: e.numberOfHits, onCurrentChange: a.pageChange }, null, 8, ["current-page", "page-size", "total", "onCurrentChange"]) ])), [ [v, e.loadingCards] ]) ]), _: 1 }, 8, ["body-style"]); } const Qy = /* @__PURE__ */ Nn(o9, [["render", l9], ["__scopeId", "data-v-9c8b75be"]]), c9 = (e) => e.replace(/\w\S*/g, (t) => t.charAt(0).toUpperCase() + t.substr(1).toLowerCase()), ma = function(e) { return e ? e.charAt(0).toUpperCase() + e.slice(1) : ""; }, u9 = { name: "ConnectivityInfo", components: { Button: Kt, Container: RO, Icon: He, ElIconWarning: Yh, ElIconLocation: Xh, ElIconSearch: Qh, ExternalResourceCard: jb, CopyToClipboard: ev, ConnectivityGraph: Vb, ConnectivityList: zb }, props: { connectivityEntry: { type: Array, default: [] }, entryId: { type: String, default: "" }, envVars: { type: Object, default: () => { } }, availableAnatomyFacets: { type: Array, default: () => [] }, withCloseButton: { type: Boolean, default: !1 } }, data: function() { return { updatedCopyContent: "", activeView: "listView", connectivityLoading: !1, connectivitySource: "map", // sckan noMapConnectivity: !1, connectivityError: {}, graphViewLoaded: !1, connectivityFromMap: null }; }, computed: { entry: function() { return this.connectivityEntry.find((e) => e.featureId[0] === this.entryId); }, hasProvenanceTaxonomyLabel: function() { return this.entry.provenanceTaxonomyLabel && this.entry.provenanceTaxonomyLabel.length > 0; }, provSpeciesDescription: function() { let e = "Studied in"; return this.entry.provenanceTaxonomyLabel.forEach((t) => { e += ` ${t},`; }), e = e.slice(0, -1), e += " species", e; }, connectivityKey: function() { return this.entry.featureId[0] + this.entry.connectivitySource; }, origins: function() { return this.entry.origins; }, components: function() { return this.entry.components; }, destinations: function() { return this.entry.destinations; }, originsWithDatasets: function() { return this.entry.originsWithDatasets; }, componentsWithDatasets: function() { return this.entry.componentsWithDatasets; }, destinationsWithDatasets: function() { return this.entry.destinationsWithDatasets; }, resources: function() { return this.entry.hyperlinks || []; }, sckanVersion: function() { return this.entry.knowledgeSource; }, flatmapApi: function() { return this.envVars.FLATMAPAPI_LOCATION; } }, watch: { entry: { deep: !0, immediate: !0, handler: function(e, t) { e && e !== t && (this.connectivityLoading = !0, this.activeView = localStorage.getItem("connectivity-active-view") || this.activeView, this.activeView === "graphView" && (this.graphViewLoaded = !0), this.connectivitySource = this.entry.connectivitySource, this.noMapConnectivity = this.entry.noMapConnectivity, this.updateGraphConnectivity(), this.connectivityLoading = !1, (!t || (e == null ? void 0 : e.featureId[0]) !== (t == null ? void 0 : t.featureId[0])) && this.$emit("loaded")); } } }, methods: { titleCase: function(e) { return c9(e); }, capitalise: function(e) { return ma(e); }, showConnectivity: function() { const e = this.entry.featureId || []; this.$emit("show-connectivity", e), Pe.emit("trackEvent", { event_name: "portal_maps_show_connectivity_on_map", category: this.entry.id || "", location: "map_sidebar_connectivity" }); }, onCopied: function() { Pe.emit("trackEvent", { event_name: "portal_maps_connectivity_copy", category: this.entry.id || "", location: "map_sidebar_connectivity" }); }, switchConnectivityView: function(e) { this.activeView = e, localStorage.setItem("connectivity-active-view", this.activeView), e === "graphView" && !this.graphViewLoaded && this.$nextTick(() => { this.graphViewLoaded = !0; }), Pe.emit("trackEvent", { event_name: "portal_maps_connectivity_switch_view", category: e, location: "map_sidebar_connectivity" }); }, onTapNode: function(e) { const t = e.map((n) => n.label).join(", "); this.onConnectivityHovered(t); }, onShowReferenceConnectivities: function(e) { this.$emit("show-reference-connectivities", e); }, onReferencesLoaded: function(e) { this.updatedCopyContent = this.getUpdateCopyContent(e); }, getUpdateCopyContent: function(e) { var s, i, l, c, u; if (!this.entry) return ""; const t = []; let n = this.entry.title, r = this.entry.featureId; const o = []; n && o.push(`${ma(this.entry.title)}`), r != null && r.length && (typeof r == "object" ? o.push(`(${r[0]})`) : o.push(`(${r})`)), t.push(`
${o.join(" ")}
`), (s = this.entry.provenanceTaxonomyLabel) != null && s.length && t.push(`
${this.provSpeciesDescription}
`), this.entry.paths && t.push(`
${this.entry.paths}
`); function a(f, g, v = []) { let d = `
${f}
`; const h = []; g.forEach((y) => { let x = []; y.split(",").forEach((A) => { const k = v.find((E) => E.name === A.trim()); k ? x.push(`${ma(A)} (${k.id})`) : x.push(`${ma(A)}`); }), h.push(x.join(",")); }); const m = h.map((y) => `
  • ${y}
  • `).join(` `); return d += ` `, d += `
      ${m}
    `, d; } if ((i = this.entry["nerve-label"]) != null && i.length) { const f = "Nerves", v = this.entry["nerve-label"].map((h) => Object.values(h)).flat(1 / 0), d = a(f, v); t.push(d); } if ((l = this.origins) != null && l.length) { const f = "Origin", g = this.origins, v = this.originsWithDatasets, d = a(f, g, v); t.push(d); } if ((c = this.components) != null && c.length) { const f = "Components", g = this.components, v = this.componentsWithDatasets, d = a(f, g, v); t.push(d); } if ((u = this.destinations) != null && u.length) { const f = "Destination", g = this.destinations, v = this.destinationsWithDatasets, d = a(f, g, v); t.push(d); } if (e) { let f = "
    References
    "; f += ` `; const g = e.list.map((v) => `
  • ${v}
  • `).join(` `); f += `
      ${g}
    `, t.push(f); } return t.join(`
    `); }, getConnectivityDatasets: function(e) { const t = [ ...this.componentsWithDatasets, ...this.destinationsWithDatasets, ...this.originsWithDatasets ], n = e.split(","); let r = []; return n.forEach((o) => { const a = t.find( (s) => s.name.toLowerCase().trim() === o.toLowerCase().trim() ); a && r.push({ id: a.id, label: a.name }); }), r; }, onConnectivityHovered: function(e) { const t = { connectivityInfo: this.entry, label: e, data: e ? this.getConnectivityDatasets(e) : [] }; this.$emit("connectivity-hovered", t); }, onConnectivityClicked: function(e) { const t = { query: e, filter: [] }; this.$emit("connectivity-clicked", t); }, /** * Function to show error message. * `errorInfo` includes `errorData` array (optional) for error connectivities * and `errorMessage` for error message. * @arg `errorInfo` */ getConnectivityError: function(e) { const { errorData: t, errorMessage: n } = e; return { errorConnectivities: t.map((o) => ma(o.label)).join(", ").replace(/, ([^,]*)$/, " and $1"), errorMessage: n }; }, onConnectivitySourceChange: function(e) { this.connectivityLoading = !0, this.activeView !== "graphView" && (this.graphViewLoaded = !1), this.updateGraphConnectivity(), Pe.emit("connectivity-source-change", { entry: this.entry, connectivitySource: e }), Pe.emit("trackEvent", { event_name: "portal_maps_connectivity_source_change", category: e, location: "map_sidebar_connectivity" }); }, updateGraphConnectivity: function() { this.connectivitySource === "map" ? this.getConnectionsFromMap().then((e) => { var t; this.connectivityFromMap = null, (t = e == null ? void 0 : e.connectivity) != null && t.length && (this.connectivityFromMap = e), this.connectivityLoading = !1; }) : (this.connectivityFromMap = null, this.connectivityLoading = !1); }, getConnectionsFromMap: async function() { if (this.entry.mapuuid) { const e = this.flatmapApi + `flatmap/${this.entry.mapuuid}/connectivity/${this.entry.featureId[0]}`; try { const t = await fetch(e); if (!t.ok) throw new Error(`Response status: ${t.status}`); return await t.json(); } catch (t) { throw Pe.emit("connectivity-source-change", { entry: this.entry, connectivitySource: "sckan" }), new Error(t); } } }, onConnectivityActionClick: function(e) { Pe.emit("onConnectivityActionClick", e); }, closeConnectivity: function() { this.$emit("close-connectivity"), Pe.emit("trackEvent", { event_name: "portal_maps_connectivity_close", category: this.entry.id || "", location: "map_sidebar_connectivity" }); }, onTrackEvent: function(e) { Pe.emit("trackEvent", e); } }, mounted: function() { this.updatedCopyContent = this.getUpdateCopyContent(), Pe.on("connectivity-error", (e) => { const t = this.getConnectivityError(e); this.connectivityError = { ...t }; }); } }, d9 = { key: 0, class: "main" }, f9 = { class: "connectivity-info-title" }, p9 = { class: "title-content" }, h9 = { key: 0, class: "block" }, v9 = { class: "title" }, g9 = { style: { "word-break": "keep-all" } }, m9 = { class: "subtitle" }, y9 = { key: 0, class: "subtitle" }, b9 = { key: 1, class: "block" }, w9 = { class: "title" }, C9 = { class: "title-buttons" }, S9 = { class: "content-container population-display" }, k9 = { class: "block attribute-title-container" }, _9 = { class: "block buttons-row" }, E9 = { class: "population-display-source" }, x9 = { class: "population-display-view" }, T9 = { key: 0, class: "block" }, O9 = ["origin-item-label"], I9 = ["origin-item-label", "onMouseenter"], A9 = { class: "content-container content-container-connectivity" }, F9 = { class: "content-container content-container-connectivity" }, P9 = { key: 1, class: "content-container content-container-references" }; function $9(e, t, n, r, o, a) { const s = Mb, i = He, l = Qa, c = Xh, u = Kt, f = Se("CopyToClipboard"), g = ao, v = Yh, d = jg, h = MT, m = Qh, y = Se("connectivity-list"), x = Se("connectivity-graph"), A = Se("ExternalResourceCard"), k = Zo; return a.entry ? (C(), F("div", d9, [ M("div", f9, [ M("div", p9, [ a.entry.title ? (C(), F("div", h9, [ M("div", v9, [ M("span", null, se(a.capitalise(a.entry.title)), 1), a.entry.featuresAlert ? (C(), J(l, { key: 0, width: "250", trigger: "hover", teleported: !1, "popper-class": "popover-origin-help" }, { reference: P(() => [ V(i, { class: "alert" }, { default: P(() => [ V(s) ]), _: 1 }) ]), default: P(() => [ M("span", g9, se(a.entry.featuresAlert), 1) ]), _: 1 })) : G("", !0) ]), M("div", m9, [ t[4] || (t[4] = M("strong", null, "id: ", -1)), Ce(se(a.entry.featureId[0]), 1) ]), a.hasProvenanceTaxonomyLabel ? (C(), F("div", y9, se(a.provSpeciesDescription), 1)) : G("", !0) ])) : (C(), F("div", b9, [ M("div", w9, se(a.entry.featureId), 1) ])) ]), M("div", C9, [ V(l, { width: "auto", trigger: "hover", teleported: !1, "popper-class": "popover-map-pin" }, { reference: P(() => [ V(u, { class: "button-circle secondary", circle: "", onClick: a.showConnectivity }, { default: P(() => [ V(i, { color: "#8300bf" }, { default: P(() => [ V(c) ]), _: 1 }) ]), _: 1 }, 8, ["onClick"]) ]), default: P(() => [ t[5] || (t[5] = M("span", null, " Show connectivity on map ", -1)) ]), _: 1 }), V(f, { onCopied: a.onCopied, content: e.updatedCopyContent }, null, 8, ["onCopied", "content"]), n.withCloseButton ? (C(), J(l, { key: 0, width: "auto", trigger: "hover", teleported: !1, "popper-class": "popover-map-pin" }, { reference: P(() => [ V(u, { class: "button-circle", circle: "", onClick: a.closeConnectivity }, { default: P(() => [ V(i, { color: "white" }, { default: P(() => [ V(g) ]), _: 1 }) ]), _: 1 }, 8, ["onClick"]) ]), default: P(() => [ t[6] || (t[6] = M("span", null, "Close", -1)) ]), _: 1 })) : G("", !0) ]) ]), M("div", S9, [ M("div", k9, [ t[8] || (t[8] = M("span", { class: "attribute-title" }, "Population Display", -1)), e.activeView === "listView" ? (C(), J(l, { key: 0, width: "250", trigger: "hover", teleported: !1, "popper-class": "popover-origin-help" }, { reference: P(() => [ V(i, { class: "info" }, { default: P(() => [ V(v) ]), _: 1 }) ]), default: P(() => [ t[7] || (t[7] = M("span", { style: { "word-break": "keep-all" } }, " This list is ordered alphabetically, switch to graph view for path details. ", -1)) ]), _: 1 })) : G("", !0) ]), M("div", _9, [ M("div", E9, [ M("span", null, [ t[10] || (t[10] = Ce(" Connectivity from: ")), V(l, { width: "320", trigger: "hover", teleported: !1, "popper-class": "popover-origin-help" }, { reference: P(() => [ V(i, { class: "info" }, { default: P(() => [ V(v) ]), _: 1 }) ]), default: P(() => [ t[9] || (t[9] = M("span", { style: { "word-break": "keep-all" } }, [ M("strong", null, "Map"), Ce(" - connectivity as defined in active map. "), M("br"), M("strong", null, "SCKAN"), Ce(" - connectivity as defined in SCKAN. ") ], -1)) ]), _: 1 }) ]), V(h, { modelValue: e.connectivitySource, "onUpdate:modelValue": t[0] || (t[0] = (E) => e.connectivitySource = E), onChange: a.onConnectivitySourceChange }, { default: P(() => [ V(d, { value: "map", disabled: e.noMapConnectivity }, { default: P(() => t[11] || (t[11] = [ Ce("Map") ])), _: 1 }, 8, ["disabled"]), V(d, { value: "sckan" }, { default: P(() => t[12] || (t[12] = [ Ce("SCKAN") ])), _: 1 }) ]), _: 1 }, 8, ["modelValue", "onChange"]) ]), M("div", x9, [ V(u, { class: N(e.activeView === "listView" ? "button" : "el-button-secondary"), onClick: t[1] || (t[1] = (E) => a.switchConnectivityView("listView")) }, { default: P(() => t[13] || (t[13] = [ Ce(" List view ") ])), _: 1 }, 8, ["class"]), V(u, { class: N(e.activeView === "graphView" ? "button" : "el-button-secondary"), onClick: t[2] || (t[2] = (E) => a.switchConnectivityView("graphView")) }, { default: P(() => t[14] || (t[14] = [ Ce(" Graph view ") ])), _: 1 }, 8, ["class"]) ]) ]) ]), a.entry["nerve-label"] ? (C(), F("div", T9, [ t[16] || (t[16] = M("div", { class: "attribute-title-container" }, [ M("span", { class: "attribute-title" }, "Nerves") ], -1)), (C(!0), F(Ie, null, ot(a.entry["nerve-label"], (E, T) => (C(), F("div", null, [ (C(), F("div", { class: "attribute-content", "origin-item-label": E.nerve, key: E.nerve }, [ M("span", null, se(a.capitalise(E.nerve)), 1) ], 8, O9)), (C(!0), F(Ie, null, ot(E.subNerves, (I, R) => (C(), F("div", { class: "attribute-content", style: { "margin-left": "1rem" }, "origin-item-label": I, key: I, onMouseenter: (D) => a.onConnectivityHovered(I), onMouseleave: t[3] || (t[3] = (D) => a.onConnectivityHovered()) }, [ V(l, { width: "150", trigger: "hover", teleported: !1, "popper-class": "popover-origin-help" }, { reference: P(() => [ V(i, { class: "magnify-glass", onClick: (D) => a.onConnectivityClicked(I) }, { default: P(() => [ V(m) ]), _: 2 }, 1032, ["onClick"]) ]), default: P(() => [ t[15] || (t[15] = M("span", null, "Search sub nerve", -1)) ]), _: 2 }, 1024), M("span", null, se(a.capitalise(I)), 1) ], 40, I9))), 128)) ]))), 256)) ])) : G("", !0), xe(M("div", A9, [ xe((C(), J(y, { key: `${a.connectivityKey}list`, entry: a.entry, origins: a.origins, components: a.components, destinations: a.destinations, originsWithDatasets: a.originsWithDatasets, componentsWithDatasets: a.componentsWithDatasets, destinationsWithDatasets: a.destinationsWithDatasets, availableAnatomyFacets: n.availableAnatomyFacets, connectivityError: e.connectivityError, onConnectivityHovered: a.onConnectivityHovered, onConnectivityClicked: a.onConnectivityClicked, onConnectivityActionClick: a.onConnectivityActionClick }, null, 8, ["entry", "origins", "components", "destinations", "originsWithDatasets", "componentsWithDatasets", "destinationsWithDatasets", "availableAnatomyFacets", "connectivityError", "onConnectivityHovered", "onConnectivityClicked", "onConnectivityActionClick"])), [ [k, e.connectivityLoading] ]) ], 512), [ [ht, e.activeView === "listView"] ]), xe(M("div", F9, [ e.graphViewLoaded ? xe((C(), J(x, { key: `${a.connectivityKey}graph`, entry: a.entry.featureId[0], mapServer: a.flatmapApi, sckanVersion: a.sckanVersion, connectivityFromMap: e.connectivityFromMap, connectivityError: e.connectivityError, onTapNode: a.onTapNode }, null, 8, ["entry", "mapServer", "sckanVersion", "connectivityFromMap", "connectivityError", "onTapNode"])), [ [k, e.connectivityLoading] ]) : G("", !0) ], 512), [ [ht, e.activeView === "graphView"] ]), a.resources.length ? (C(), F("div", P9, [ V(A, { resources: a.resources, onReferencesLoaded: a.onReferencesLoaded, onShowReferenceConnectivities: a.onShowReferenceConnectivities, onTrackEvent: a.onTrackEvent }, null, 8, ["resources", "onReferencesLoaded", "onShowReferenceConnectivities", "onTrackEvent"]) ])) : G("", !0) ])) : G("", !0); } const eb = /* @__PURE__ */ Nn(u9, [["render", $9], ["__scopeId", "data-v-b1d54f1d"]]), R9 = { name: "ConnectivityCard", data() { return { displayFields: ["id", "nerve-label"] }; }, props: { /** * Object containing information for * the required viewing. */ entry: { type: Object, default: () => { } }, connectivityEntry: { type: Array, default: () => [] } }, computed: { loading: function() { if ("ready" in this.entry) return !this.entry.ready; const e = this.connectivityEntry.find( (t) => t.id === this.entry.id ); return e ? !e.ready : !1; } }, methods: { capitalise: function(e) { return e ? e.charAt(0).toUpperCase() + e.slice(1) : ""; }, cardClicked: function(e) { this.loading || (this.$emit("open-connectivity", e), Pe.emit("trackEvent", { event_name: "portal_maps_connectivity_open", category: e.id || "", location: "map_sidebar_connectivity" })); } } }, N9 = { class: "connectivity-card-container", ref: "container" }, L9 = { class: "connectivity-card", ref: "card" }, B9 = { class: "card-title" }, D9 = { key: 0, class: "card-details" }, M9 = { key: 0, class: "card-tags" }, j9 = { key: 1 }; function V9(e, t, n, r, o, a) { const s = lo, i = Zo; return C(), F("div", N9, [ M("div", L9, [ t[1] || (t[1] = M("div", { class: "seperator-path" }, null, -1)), xe((C(), F("div", { class: "card-content", onClick: t[0] || (t[0] = (l) => a.cardClicked(n.entry)) }, [ M("div", B9, se(a.capitalise(n.entry.label)), 1), (C(!0), F(Ie, null, ot(o.displayFields, (l) => (C(), F(Ie, { key: l }, [ n.entry[l] ? (C(), F("div", D9, [ M("strong", null, se(l) + ":", 1), l === "nerve-label" ? (C(), F("div", M9, [ (C(!0), F(Ie, null, ot(n.entry[l], (c) => (C(), F("div", { key: c.nerve }, [ V(s, { type: "primary", size: "small" }, { default: P(() => [ Ce(se(c.nerve), 1) ]), _: 2 }, 1024), (C(!0), F(Ie, null, ot(c.subNerves, (u) => (C(), J(s, { type: "primary", size: "small" }, { default: P(() => [ Ce(se(u), 1) ]), _: 2 }, 1024))), 256)) ]))), 128)) ])) : (C(), F("span", j9, se(n.entry[l]), 1)) ])) : G("", !0) ], 64))), 128)) ])), [ [i, a.loading] ]) ], 512) ], 512); } const tb = /* @__PURE__ */ Nn(R9, [["render", V9], ["__scopeId", "data-v-4c16c9d7"]]); var z9 = { searchInput: "", lastSearch: "", results: [], numberOfHits: 0, filter: [], loadingCards: !1, numberPerPage: 10, page: 1, start: 0 }; const H9 = { components: { SearchFilters: cl, SearchHistory: ll, ConnectivityCard: tb, ConnectivityInfo: eb, Button: Kt, Card: Mi, Checkbox: vu, Icon: He, Input: Go, Pagination: Hi, MapSvgIcon: py, MapSvgSpriteColor: Jy }, name: "ConnectivityExplorer", props: { connectivityKnowledge: { type: Array, default: [] }, entry: { type: Object, default: () => z9 }, envVars: { type: Object, default: () => { } }, connectivityEntry: { type: Array, default: [] }, availableAnatomyFacets: { type: Object, default: [] }, connectivityFilterOptions: { type: Array, default: [] }, showVisibilityFilter: { type: Boolean, default: !1 } }, data: function() { return { ...this.entry, bodyStyle: { flex: "1 1 auto", "flex-flow": "column", display: "flex" }, cascaderIsReady: !1, freezeTimeout: void 0, freezed: !1, initLoading: !0, expanded: "", filterVisibility: !0, expandedData: null }; }, computed: { // This computed property populates filter data's entry object with $data from this sidebar filterEntry: function() { return { numberOfHits: this.numberOfHits, filterFacets: this.filter, options: this.connectivityFilterOptions, showFilters: !0, helper: { within: "'CNS' OR 'Local circuit neuron'", between: "'Somatic lower motor' AND 'Human'" } }; }, paginatedResults: function() { return this.results.slice(this.start, this.start + this.numberPerPage); } }, watch: { connectivityKnowledge: function(e, t) { this.expanded = "", this.expandedData = null, this.loadingCards = !1, JSON.stringify(e) !== JSON.stringify(t) && (this.results = e, this.initLoading = !1, this.numberOfHits = this.results.length, this.numberOfHits > 0 && "ready" in this.results[0] && (this.$refs.filtersRef.checkShowAllBoxes(), this.searchInput = "", this.filter = [])); }, // watch for connectivityEntry changes // card should be expanded if there is only one entry and it is ready connectivityEntry: function(e, t) { if (JSON.stringify(e) !== JSON.stringify(t) && e.length === 1 && e[0].ready) { const n = this.filter.some((r) => r.facet !== "Show all"); if ( // card should not be expanded if only one entry and from neuron click this.numberOfHits === 1 && !this.searchInput && !n || // if the changed property is connectivity source, // or two different maps in split view, do not collapse (e[0].connectivitySource !== t[0].connectivitySource || e[0].mapId !== t[0].mapId) && t[0].ready ) return; this.collapseChange(e[0]); } }, paginatedResults: function() { this.loadingCards = !1; }, filterVisibility: function(e) { this.filterVisibility = e, this.$emit("filter-visibility", this.filterVisibility); } }, methods: { freezeHoverChange: function() { this.freezed = !0, this.freezeTimeout && clearTimeout(this.freezeTimeout), this.freezeTimeout = setTimeout(() => { this.freezed = !1; }, 3e3); }, onShowConnectivity: function(e) { this.freezeHoverChange(), this.$emit("show-connectivity", e); }, onShowReferenceConnectivities: function(e) { this.freezeHoverChange(), this.$emit("show-reference-connectivities", e); }, onConnectivityClicked: function(e) { this.searchInput = e.query, this.searchAndFilterUpdate(); }, collapseChange: function(e) { this.expanded = this.expanded === e.id ? "" : e.id, this.expandedData = this.expanded ? e : null; }, closeConnectivity: function() { this.expanded || this.$emit("connectivity-item-close"); }, onConnectivityCollapseChange: function(e) { this.connectivityEntry.find((t) => t.featureId[0] === e.id) ? (this.collapseChange(e), this.closeConnectivity()) : (this.expanded = "", this.expandedData = null, this.$nextTick(() => { this.$emit("connectivity-collapse-change", e); })); }, onHoverChanged: function(e, t) { const { target: n } = e; (t || n && n.checkVisibility()) && this.hoverChanged(t); }, hoverChanged: function(e) { if (!this.freezed) { let t = { tabType: "connectivity" }; e ? t = { ...t, ...e } : this.expandedData && (t = { ...t, ...this.expandedData }), this.$emit("hover-changed", t); } }, resetSearch: function() { this.numberOfHits = 0, this.results = [], this.loadingCards = !1; }, resetSearchIfNoActiveSearch: function() { const e = this.filter.some((t) => t.facet !== "Show all"); !this.searchInput && !e && this.openSearch([], ""); }, onResetClick: function() { this.openSearch([], ""), this.$emit("search-changed", { value: [], tabType: "dataset", type: "reset-update" }), Pe.emit("trackEvent", { event_name: "portal_maps_action_filter", category: "reset", location: "map_sidebar_connectivity" }); }, openSearch: function(e, t = "") { if (this.searchInput = t, this.resetPageNavigation(), this.cascaderIsReady) { const n = this.$refs.filtersRef.getHierarchicalValidatedFilters(e), r = n.notFound ? n.notFound.filter((o) => o.facet.toLowerCase() !== "show all") : []; this.filter = n.result, r.forEach((o) => { const a = o.tagLabel || o.facet, s = a.charAt(0).toLowerCase() + a.slice(1); let i = ""; o.term.toLowerCase() === "origin" ? i = `There are no neuron populations beginning at ${s}.` : o.term.toLowerCase() === "via" ? i = `There are no neuron populations that run through ${s}.` : o.term.toLowerCase() === "destination" ? i = `There are no neuron populations terminating at ${s}.` : i = `There are no neuron populations beginning, terminating, or running through ${s}.`, im({ dangerouslyUseHTMLString: !0, message: i, appendTo: this.$el, showClose: !0, offset: 113 }); }), r.length && this.$emit("search-changed", { value: r, tabType: "dataset", type: "reset-update" }), e && e.length > 0 && this.filter && this.filter.length === 0 ? (this.$refs.filtersRef.checkShowAllBoxes(), this.resetSearch()) : this.filter && (this.searchKnowledge(this.filter, t), this.$refs.filtersRef.setCascader(this.filter), this.searchHistoryUpdate(this.filter, t)); } else this.filter = e, (!e || e.length == 0) && (this.searchKnowledge(this.filter, t), this.searchHistoryUpdate(this.filter, t)); }, addFilter: function(e) { this.cascaderIsReady ? (this.resetPageNavigation(), e && this.$refs.filtersRef.addFilter(e) && this.$refs.filtersRef.initiateSearch()) : Array.isArray(this.filter) ? this.filter.push(e) : this.filter = [e]; }, cascaderReady: function() { this.cascaderIsReady = !0, this.openSearch(this.filter, this.searchInput); }, clearSearchClicked: function() { this.searchInput = "", this.searchAndFilterUpdate(); }, searchEvent: function(e = !1) { (e.keyCode === 13 || e instanceof MouseEvent) && (this.searchInput = this.searchInput.trim(), this.searchAndFilterUpdate()); }, filterUpdate: function(e) { this.filter = [...e], this.searchAndFilterUpdate(); }, searchAndFilterUpdate: function() { this.resetPageNavigation(), this.searchKnowledge(this.filter, this.searchInput), this.searchHistoryUpdate(this.filter, this.searchInput); }, searchHistoryUpdate: function(e, t) { this.$refs.searchHistory.selectValue = "Search history", (e.length || t != null && t.trim()) && this.$refs.searchHistory.addSearchToHistory(this.filter, t); }, searchKnowledge: function(e, t = "") { this.expanded = "", this.expandedData = null, this.loadingCards = !0, this.scrollToTop(), this.$emit("search-changed", { // value: this.searchInput, // type: "query-update", query: t, filter: e, tabType: "connectivity" }), this.lastSearch = t; }, filtersLoading: function(e) { this.loadingCards = e; }, numberPerPageUpdate: function(e) { this.numberPerPage = e, Pe.emit("trackEvent", { event_name: "portal_maps_connectivity_perPage", category: e + "", location: "map_sidebar_connectivity" }); const t = this.page === 1; this.pageChange(1, t); }, pageChange: function(e, t = !1) { this.start = (e - 1) * this.numberPerPage, this.page = e, this.expanded = "", this.expandedData = null, this.scrollToTop(), t || Pe.emit("trackEvent", { event_name: "portal_maps_connectivity_pagination", category: `page_${this.page}`, location: "map_sidebar_connectivity" }); }, scrollToTop: function() { this.$refs.content && this.$refs.content.scroll({ top: 0, behavior: "smooth" }); }, resetPageNavigation: function() { this.start = 0, this.page = 1; }, searchHistorySearch: function(e) { this.searchInput = e.search, this.filter = e.filters, this.openSearch([...e.filters], e.search); }, onConnectivityInfoLoaded: function(e) { const t = this.$refs["stepItem-" + e.id], n = this.$refs.content; this.$nextTick(() => { n && t && t[0] && (n.scrollTop = t[0].offsetTop); }); }, getSearch: function() { return this.searchInput; }, getFilters: function() { return this.filter.some((t) => t.facet.toLowerCase() !== "show all") ? this.filter : []; } }, mounted: function() { localStorage.removeItem("connectivity-active-view"), this.openSearch(this.filter, this.searchInput), Pe.on("close-connectivity", () => { this.expanded = "", this.expandedData = null; }); } }, U9 = { class: "header" }, q9 = { key: 0, class: "visibility-filter" }, K9 = { key: 0, class: "error-feedback" }, W9 = ["onMouseenter"]; function G9(e, t, n, r, o, a) { const s = Se("MapSvgSpriteColor"), i = Go, l = Kt, c = vu, u = Se("MapSvgIcon"), f = Qa, g = cl, v = ll, d = tb, h = eb, m = Hi, y = Mi, x = Zo; return C(), J(y, { "body-style": e.bodyStyle, class: "content-card" }, { header: P(() => [ M("div", U9, [ V(i, { class: "search-input", placeholder: "Search", modelValue: e.searchInput, "onUpdate:modelValue": t[0] || (t[0] = (A) => e.searchInput = A), onKeyup: a.searchEvent, clearable: "", onClear: a.clearSearchClicked }, null, 8, ["modelValue", "onKeyup", "onClear"]), V(l, { type: "primary", class: "button", onClick: a.searchEvent, size: "large" }, { default: P(() => t[5] || (t[5] = [ Ce(" Search ") ])), _: 1 }, 8, ["onClick"]), V(l, { link: "", class: "el-button-link", onClick: a.onResetClick, size: "large" }, { default: P(() => t[6] || (t[6] = [ Ce(" Reset ") ])), _: 1 }, 8, ["onClick"]), n.showVisibilityFilter ? (C(), F("div", q9, [ V(c, { modelValue: e.filterVisibility, "onUpdate:modelValue": t[1] || (t[1] = (A) => e.filterVisibility = A) }, { default: P(() => t[7] || (t[7] = [ Ce(" Focused ") ])), _: 1 }, 8, ["modelValue"]), V(f, { title: "How does focused checkbox work?", width: "250", trigger: "hover", "popper-class": "filter-help-popover" }, { reference: P(() => [ V(u, { icon: "help", class: "help" }) ]), default: P(() => [ t[8] || (t[8] = M("div", null, [ M("strong", null, "Checked:"), M("br"), Ce(" Display listed or highlighted items only. "), M("br"), M("br"), M("strong", null, "Unchecked:"), M("br"), Ce(" Display listed or highlighted items in full colour and non-listed items in greyscale. ") ], -1)) ]), _: 1 }) ])) : G("", !0) ]) ]), default: P(() => [ V(s), V(g, { class: "filters", ref: "filtersRef", entry: a.filterEntry, envVars: n.envVars, onFilterResults: a.filterUpdate, onNumberPerPage: a.numberPerPageUpdate, onLoading: a.filtersLoading, onCascaderReady: a.cascaderReady }, null, 8, ["entry", "envVars", "onFilterResults", "onNumberPerPage", "onLoading", "onCascaderReady"]), V(v, { ref: "searchHistory", localStorageKey: "sparc.science-connectivity-search-history", onSearch: a.searchHistorySearch }, null, 8, ["onSearch"]), xe((C(), F("div", { class: "content scrollbar", ref: "content", onMouseleave: t[4] || (t[4] = (A) => a.onHoverChanged(A, void 0)) }, [ e.results.length === 0 && !e.loadingCards ? (C(), F("div", K9, " No results found - Please change your search / filter criteria. ")) : G("", !0), (C(!0), F(Ie, null, ot(a.paginatedResults, (A) => (C(), F("div", { key: A.id, ref_for: !0, ref: "stepItem-" + A.id, class: "step-item", onMouseenter: (k) => a.onHoverChanged(k, A) }, [ xe(V(d, { class: "connectivity-card", entry: A, connectivityEntry: n.connectivityEntry, onOpenConnectivity: a.onConnectivityCollapseChange }, null, 8, ["entry", "connectivityEntry", "onOpenConnectivity"]), [ [ht, e.expanded !== A.id] ]), e.expanded === A.id ? (C(), J(h, { key: 0, class: "connectivity-info", entryId: A.id, connectivityEntry: n.connectivityEntry, availableAnatomyFacets: n.availableAnatomyFacets, envVars: n.envVars, withCloseButton: !0, onShowConnectivity: a.onShowConnectivity, onShowReferenceConnectivities: a.onShowReferenceConnectivities, onConnectivityClicked: a.onConnectivityClicked, onConnectivityHovered: t[2] || (t[2] = (k) => e.$emit("connectivity-hovered", k)), onLoaded: (k) => a.onConnectivityInfoLoaded(A), onCloseConnectivity: (k) => a.onConnectivityCollapseChange(A) }, null, 8, ["entryId", "connectivityEntry", "availableAnatomyFacets", "envVars", "onShowConnectivity", "onShowReferenceConnectivities", "onConnectivityClicked", "onLoaded", "onCloseConnectivity"])) : G("", !0) ], 40, W9))), 128)), V(m, { class: "pagination", "current-page": e.page, "onUpdate:currentPage": t[3] || (t[3] = (A) => e.page = A), "hide-on-single-page": "", large: "", layout: "prev, pager, next", "page-size": e.numberPerPage, total: e.numberOfHits, onCurrentChange: a.pageChange }, null, 8, ["current-page", "page-size", "total", "onCurrentChange"]) ], 32)), [ [x, e.loadingCards || e.initLoading] ]) ]), _: 1 }, 8, ["body-style"]); } const nb = /* @__PURE__ */ Nn(H9, [["render", G9], ["__scopeId", "data-v-d9061656"]]), J9 = { name: "AnnotationTool", components: { AnnotationPopup: Hb, Button: Kt, CreateTooltipContent: Ub, Col: yu, ElIconDelete: Zl, Icon: He, Row: mu }, props: { annotationEntry: { type: Array }, createData: { type: Object, default: {} } }, data: function() { return { ElIconDelete: Qr(Zl), annotationPopupData: null }; } }, Z9 = { class: "annotation-tool scrollbar" }, Y9 = { key: 1, class: "delete-container" }; function X9(e, t, n, r, o, a) { const s = Se("CreateTooltipContent"), i = Se("annotation-popup"), l = yu, c = Kt, u = mu; return C(), F("div", Z9, [ xe(V(s, { createData: n.createData, onConfirmCreate: t[0] || (t[0] = (f) => e.$emit("confirm-create", f)), onCancelCreate: t[1] || (t[1] = (f) => e.$emit("cancel-create")), class: "create-tooltip-content" }, null, 8, ["createData"]), [ [ht, n.createData && n.createData.toBeConfirmed] ]), n.annotationEntry && (!n.createData || !n.createData.toBeConfirmed) ? (C(), J(i, { key: 0, class: "annotation-popup", annotationEntry: n.annotationEntry, onAnnotation: t[2] || (t[2] = (f) => e.$emit("annotation", f)), onHoverChanged: t[3] || (t[3] = (f) => e.$emit("hover-changed", f)), onTrackEvent: t[4] || (t[4] = (f) => e.$emit("trackEvent", f)) }, null, 8, ["annotationEntry"])) : G("", !0), n.createData && n.createData.toBeDeleted ? (C(), F("div", Y9, [ V(u, null, { default: P(() => [ V(l, { offset: 1, span: 6 }, { default: P(() => t[7] || (t[7] = [ Ce("Delete this feature?") ])), _: 1 }), V(l, { offset: 1, span: 3 }, { default: P(() => [ V(c, { class: "delete-button", icon: e.ElIconDelete, onClick: t[5] || (t[5] = (f) => e.$emit("confirm-delete")) }, { default: P(() => t[8] || (t[8] = [ Ce(" Delete ") ])), _: 1 }, 8, ["icon"]) ]), _: 1 }), V(l, { offset: 1, span: 2 }, { default: P(() => [ V(c, { class: "delete-button", onClick: t[6] || (t[6] = (f) => e.$emit("cancel-create")) }, { default: P(() => t[9] || (t[9] = [ Ce(" Dismiss ") ])), _: 1 }) ]), _: 1 }) ]), _: 1 }) ])) : G("", !0) ]); } const rb = /* @__PURE__ */ Nn(J9, [["render", X9], ["__scopeId", "data-v-7acfbf0c"]]), Q9 = { name: "Tabs", components: { ElIconClose: ao }, props: { tabEntries: { type: Array, default: () => [] }, activeId: { type: Number, default: 1 }, contextArray: { type: Array, default: () => [] } }, computed: { tabs: function() { const e = this.tabEntries.filter((r) => !r.closable), t = this.tabEntries.filter((r) => r.closable); let n = e.concat(t); if (this.contextArray.length) for (let r in n) n[r].contextCard = this.contextArray[r]; return n; } }, methods: { tabClicked: function(e) { this.$emit("tabClicked", { id: e.id, type: e.type }), this.$emit("trackEvent", { event: "interaction_event", event_name: "portal_maps_sidebar_open_tab", category: e.type, location: "map_sidebar_tabs" }); }, tabClosed: function(e) { this.$emit("tabClosed", { id: e.id, type: e.type }); } } }, eB = { class: "tabs-container" }, tB = ["onClick"], nB = { class: "tab-title" }; function rB(e, t, n, r, o, a) { const s = ao, i = He; return C(), F("div", eB, [ (C(!0), F(Ie, null, ot(a.tabs, (l) => (C(), F("div", { class: N(["tab", { "active-tab": l.id == n.activeId }]), key: l.id, onClick: (c) => a.tabClicked(l) }, [ M("span", nB, se(l.title), 1), l.closable ? (C(), J(i, { key: 0, onClick: Be((c) => a.tabClosed(l), ["stop"]), class: "tab-close-icon" }, { default: P(() => [ V(s) ]), _: 2 }, 1032, ["onClick"])) : G("", !0) ], 10, tB))), 128)) ]); } const ob = /* @__PURE__ */ Nn(Q9, [["render", rB], ["__scopeId", "data-v-744b6365"]]), oB = { components: { DatasetExplorer: Qy, Tabs: ob, ElIconArrowLeft: Rc, ElIconArrowRight: _i, Drawer: bu, Icon: He, AnnotationTool: rb, ConnectivityExplorer: nb }, name: "SideBar", props: { tabs: { type: Array, default: [ { title: "Dataset Explorer", id: 1, type: "datasetExplorer", closable: !1 }, { title: "Connectivity Explorer", id: 2, type: "connectivityExplorer", closable: !1 }, { title: "Annotation", id: 3, type: "annotation", closable: !0 } ] }, /** * The option to show side bar. */ visible: { type: Boolean, default: !1 }, /** * The environment variables object with * `API_LOCATION`, `ALGOLIA_KEY`, `ALGOLIA_ID`, * `ALGOLIA_INDEX`, `PENNSIEVE_API_LOCATION`, `BL_SERVER_URL`, * `NL_LINK_PREFIX`, `ROOT_URL` */ envVars: { type: Object, default: () => { } }, /** * The option to show or hide sidebar on page load. */ openAtStart: { type: Boolean, default: !1 }, /** * The connectivity info data to show in sidebar. */ connectivityEntry: { type: Array, default: [] }, /** * The annotation data to show in sidebar. */ annotationEntry: { type: Array, default: [] }, createData: { type: Object, default: { toBeConfirmed: !1, points: [], shape: "", x: 0, y: 0 } }, connectivityKnowledge: { type: Array, default: [] }, filterOptions: { type: Array, default: [] }, showVisibilityFilter: { type: Boolean, default: !1 } }, data: function() { return { drawerOpen: !1, availableAnatomyFacets: [], activeTabId: 1, activeAnnotationData: { tabType: "annotation" }, activeConnectivityData: { tabType: "connectivity" }, state: { dataset: { search: "", filters: [] }, connectivity: { search: "", filters: [] }, connectivityEntries: [], annotationEntries: [], activeTabId: this.activeTabId } }; }, methods: { onConnectivityCollapseChange: function(e) { this.$emit("connectivity-collapse-change", e); }, /** * This event is emitted when * the close button of the opened connectivity card * in connectivity explorer is clicked. */ onConnectivityItemClose: function() { this.$emit("connectivity-item-close"); }, /** * This event is emitted when the mouse hover are changed. * @arg data */ hoverChanged: function(e, t) { this.$emit("hover-changed", { ...t, tabId: e }); const n = this.getActiveTabTypeById(e); n === "connectivityExplorer" && (this.activeConnectivityData = t), n === "annotation" && (this.activeAnnotationData = t); }, /** * This event is emitted when the show connectivity button is clicked. * @arg featureIds */ showConnectivity: function(e) { this.$emit("show-connectivity", e); }, /** * This event is emitted when the show related connectivities button in reference is clicked. * @param refSource */ onShowReferenceConnectivities: function(e) { this.$emit("show-reference-connectivities", e); }, /** * This function is triggered after connectivity term is hovered. * @arg data */ onConnectivityHovered: function(e) { this.$emit("connectivity-hovered", e); }, /** * This event is emitted when the search filters are changed. * @arg `obj` {data, id} */ searchChanged: function(e, t) { this.$emit("search-changed", { ...t, tabId: e }); }, /** * The function to close sidebar. * @public */ close: function() { this.drawerOpen = !1; }, /** * The function to toggle (open and close) sidebar. * @public */ toggleDrawer: function() { this.drawerOpen = !this.drawerOpen; }, openConnectivitySearch: function(e, t) { this.drawerOpen = !0, this.$nextTick(() => { this.getTabRef(void 0, "connectivityExplorer", !0).openSearch(e, t); }); }, resetConnectivitySearch: function() { this.$nextTick(() => { this.getTabRef(void 0, "connectivityExplorer", !1).resetSearchIfNoActiveSearch(); }); }, openSearch: function(e, t) { this.drawerOpen = !0, this.$nextTick(() => { this.getTabRef(void 0, "datasetExplorer", !0).openSearch(e, t); }); }, /** * Get the ref id of the tab by id and type. */ getTabRef: function(e, t, n = !1) { const r = this.tabEntries.filter((s) => (e === void 0 || s.id === e) && (t === void 0 || s.type === t)), o = r.length ? r : this.tabEntries, a = o[0].type + "Tab_" + o[0].id; return n && this.setActiveTab({ id: o[0].id, type: o[0].type }), !this.$refs[a] || this.$refs[a].length === 0 ? null : this.$refs[a][0]; }, /** * The function to add filters to sidebar search. * * @param {Object} filter * @public */ addFilter: function(e) { if (e) { this.drawerOpen = !0; let t = e; Array.isArray(e) ? t.forEach((n) => n.AND = !0) : (e.AND = !0, t = [e]), this.$nextTick(() => { this.getTabRef(void 0, "datasetExplorer", !0).addFilter(t); }); } }, openNeuronSearch: function(e) { this.drawerOpen = !0, this.$nextTick(() => { this.getTabRef(void 0, "datasetExplorer", !0).openSearch( "", void 0, "scicrunch-query-string/", { field: "*organ.curie", curie: e } ); }); }, getAlgoliaFacets: async function() { return await this.getTabRef(void 0, "datasetExplorer").getAlgoliaFacets(); }, setDrawerOpen: function(e = !0) { this.drawerOpen = e; }, setActiveTab: function(e) { const t = this.tabs.filter((r) => r.id === e.id && r.type === e.type), n = t.length ? t : this.tabEntries; this.activeTabId = n[0].id; }, getActiveTabTypeById: function(e) { const t = this.tabs.find((n) => n.id === e); return t ? t.type : ""; }, highlightActiveTabData: function(e) { let t = null; if (e.type === "connectivityExplorer") { const n = this.getTabRef(void 0, "connectivityExplorer", !0); n && !n.expanded ? t = { tabType: "connectivity" } : t = { ...this.activeConnectivityData }; } else e.type === "annotation" && (t = { ...this.activeAnnotationData }); t && this.$emit("hover-changed", { ...t, tabId: e.id }); }, tabClicked: function(e) { this.setActiveTab(e), this.$emit("tabClicked", e), this.highlightActiveTabData(e); }, tabClosed: function(e) { this.$emit("tabClosed", e); }, /** * To receive error message for connectivity graph * @param {String} errorMessage */ updateConnectivityError: function(e) { Pe.emit("connectivity-error", e); }, /** * Store available anatomy facets data for connectivity list component */ storeAvailableAnatomyFacets: function(e) { localStorage.setItem("available-anatomy-facets", JSON.stringify(e)); }, closeConnectivity: function() { Pe.emit("close-connectivity"); }, updateState: function() { this.state.activeTabId = this.activeTabId; const e = this.getTabRef(void 0, "datasetExplorer"); e && (this.state.dataset.search = e.getSearch(), this.state.dataset.filters = Xy(e.getFilters())); const t = this.getTabRef(void 0, "connectivityExplorer"); t && (this.state.connectivity.search = t.getSearch(), this.state.connectivity.filters = t.getFilters()), this.connectivityEntry && this.connectivityEntry.length > 0 && (this.state.connectivityEntries = this.connectivityEntry.map((n) => n.id)), this.annotationEntry && this.annotationEntry.length > 0 && (this.state.annotationEntries = this.annotationEntry.map((n) => n.models)); }, /** * This function returns the current state of the sidebar * to store in the map state. * @returns {Object} state * @public */ getState: function() { return this.updateState(), this.state; }, /** * This function restores the state of the sidebar * from the provided state object. * @param state {Object} state * @public */ setState: function(e) { if (!e || !e.dataset || !e.connectivity) return; this.state = JSON.parse(JSON.stringify(e)); const t = e.dataset.filters, n = e.connectivity.filters, r = e.dataset.search, o = e.connectivity.search; (t.length || r) && this.openSearch(t, r), (n.length || o) && this.openConnectivitySearch(n, o), e.activeTabId && this.$nextTick(() => { this.tabEntries.find((s) => s.id === e.activeTabId) && (this.activeTabId = e.activeTabId); }); }, /** * @public * Track an event for analytics * @param {Object} `data` - The event data */ trackEvent: function(e) { const t = { event: "interaction_event", location: "map_sidebar", ...e }; this.$emit("trackEvent", t); } }, computed: { // This should respect the information provided by the property tabEntries: function() { return this.tabs.filter( (e) => e.type === "datasetExplorer" || e.type === "connectivityExplorer" || e.type === "annotation" && this.annotationEntry && this.annotationEntry.length > 0 ); } }, created: function() { this.drawerOpen = this.openAtStart; }, mounted: function() { Pe.on("PopoverActionClick", (e) => { this.$emit("actionClick", e); }), Pe.on("number-of-datasets-for-anatomies", (e) => { this.$emit("number-of-datasets-for-anatomies", e); }), Pe.on("anatomy-in-datasets", (e) => { this.$emit("anatomy-in-datasets", e); }), Pe.on("contextUpdate", (e) => { this.$emit("contextUpdate", e); }), Pe.on("datalink-clicked", (e) => { this.$emit("datalink-clicked", e); }), Pe.on("onConnectivityActionClick", (e) => { this.tabClicked({ id: 1, type: "datasetExplorer" }), this.$emit("actionClick", e); }), Pe.on("connectivity-source-change", (e) => { this.$emit("connectivity-source-change", e); }), Pe.on("available-facets", (e) => { this.availableAnatomyFacets = e.find((t) => t.label === "Anatomical Structure").children, this.storeAvailableAnatomyFacets(this.availableAnatomyFacets); }), Pe.on("trackEvent", (e) => { this.trackEvent(e); }); } }, aB = { ref: "container" }, sB = { class: "box-card" }, iB = { class: "sidebar-container" }; function lB(e, t, n, r, o, a) { const s = Rc, i = He, l = _i, c = ob, u = rb, f = nb, g = Qy, v = bu; return C(), F("div", aB, [ e.drawerOpen ? G("", !0) : (C(), F("div", { key: 0, onClick: t[0] || (t[0] = (...d) => a.toggleDrawer && a.toggleDrawer(...d)), class: "open-tab" }, [ V(i, null, { default: P(() => [ V(s) ]), _: 1 }) ])), V(v, { class: "side-bar my-drawer", modelValue: e.drawerOpen, "onUpdate:modelValue": t[7] || (t[7] = (d) => e.drawerOpen = d), teleported: !1, "modal-append-to-body": !1, size: "584", "with-header": !1, wrapperClosable: !1, modal: !1, "modal-class": "sidebar-body", "z-index": 10, "lock-scroll": !1 }, { default: P(() => [ M("div", sB, [ e.drawerOpen ? (C(), F("div", { key: 0, onClick: t[1] || (t[1] = (...d) => a.close && a.close(...d)), class: "close-tab" }, [ V(i, null, { default: P(() => [ V(l) ]), _: 1 }) ])) : G("", !0), M("div", iB, [ a.tabEntries.length > 1 ? (C(), J(c, { key: 0, tabEntries: a.tabEntries, activeId: e.activeTabId, onTabClicked: a.tabClicked, onTabClosed: a.tabClosed, onTrackEvent: a.trackEvent }, null, 8, ["tabEntries", "activeId", "onTabClicked", "onTabClosed", "onTrackEvent"])) : G("", !0), (C(!0), F(Ie, null, ot(n.tabs, (d) => (C(), F(Ie, { key: "tab.id" }, [ d.type === "annotation" ? xe((C(), J(u, { key: 0, ref_for: !0, ref: "annotationTab_" + d.id, annotationEntry: n.annotationEntry, createData: n.createData, onAnnotation: t[2] || (t[2] = (h) => e.$emit("annotation-submitted", h)), onConfirmCreate: t[3] || (t[3] = (h) => e.$emit("confirm-create", h)), onCancelCreate: t[4] || (t[4] = (h) => e.$emit("cancel-create")), onConfirmDelete: t[5] || (t[5] = (h) => e.$emit("confirm-delete", h)), onHoverChanged: (h) => a.hoverChanged(d.id, h), onTrackEvent: a.trackEvent }, null, 8, ["annotationEntry", "createData", "onHoverChanged", "onTrackEvent"])), [ [ht, d.id === e.activeTabId] ]) : d.type === "connectivityExplorer" ? xe((C(), J(f, { key: 1, ref_for: !0, ref: "connectivityExplorerTab_" + d.id, connectivityKnowledge: n.connectivityKnowledge, envVars: n.envVars, connectivityEntry: n.connectivityEntry, availableAnatomyFacets: e.availableAnatomyFacets, onFilterVisibility: t[6] || (t[6] = (h) => e.$emit("filter-visibility", h)), connectivityFilterOptions: n.filterOptions, showVisibilityFilter: n.showVisibilityFilter, onSearchChanged: (h) => a.searchChanged(d.id, h), onHoverChanged: (h) => a.hoverChanged(d.id, h), onShowConnectivity: a.showConnectivity, onShowReferenceConnectivities: a.onShowReferenceConnectivities, onConnectivityHovered: a.onConnectivityHovered, onConnectivityCollapseChange: a.onConnectivityCollapseChange, onConnectivityItemClose: a.onConnectivityItemClose }, null, 8, ["connectivityKnowledge", "envVars", "connectivityEntry", "availableAnatomyFacets", "connectivityFilterOptions", "showVisibilityFilter", "onSearchChanged", "onHoverChanged", "onShowConnectivity", "onShowReferenceConnectivities", "onConnectivityHovered", "onConnectivityCollapseChange", "onConnectivityItemClose"])), [ [ht, d.id === e.activeTabId] ]) : xe((C(), J(g, { key: 2, class: "sidebar-content-container", contextCardEntry: d.contextCard, envVars: n.envVars, ref_for: !0, ref: "datasetExplorerTab_" + d.id, onSearchChanged: (h) => a.searchChanged(d.id, h), onHoverChanged: (h) => a.hoverChanged(d.id, h) }, null, 8, ["contextCardEntry", "envVars", "onSearchChanged", "onHoverChanged"])), [ [ht, d.id === e.activeTabId] ]) ], 64))), 128)) ]) ]) ]), _: 1 }, 8, ["modelValue"]) ], 512); } const fB = /* @__PURE__ */ Nn(oB, [["render", lB], ["__scopeId", "data-v-353bb9df"]]); export { fB as SideBar };