var gW = Object.defineProperty; var mW = (e, t, n) => t in e ? gW(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n; var N5 = (e, t, n) => mW(e, typeof t != "symbol" ? t + "" : t, n); import { getCurrentScope as x0, onScopeDispose as Lf, unref as y, getCurrentInstance as st, onMounted as ut, nextTick as Ke, watch as he, ref as z, defineComponent as W, openBlock as S, createElementBlock as L, createElementVNode as D, warn as k0, computed as E, inject as be, isRef as xn, shallowRef as En, onBeforeUnmount as Tt, onBeforeMount as C0, provide as nt, mergeProps as Et, renderSlot as ue, toRef as St, onUnmounted as W_, useAttrs as Rf, useSlots as Dr, createCommentVNode as J, Fragment as Re, normalizeClass as H, createBlock as re, withCtx as N, resolveDynamicComponent as yt, withModifiers as Ge, createVNode as q, toDisplayString as ge, normalizeStyle as Ye, Transition as nr, withDirectives as Be, vShow as ht, reactive as en, onActivated as Y_, onUpdated as Nf, cloneVNode as _0, Text as hl, Comment as S0, Teleport as $0, readonly as $u, onDeactivated as E0, renderList as mt, createTextVNode as Oe, withKeys as wn, createSlots as O0, toRaw as ra, vModelCheckbox as oa, toRefs as Cr, vModelRadio as F0, toHandlers as M9, resolveComponent as Ve, normalizeProps as D9, guardReactiveProps as B9, watchEffect as Mf, resolveDirective as X_, toHandlerKey as Z_, vModelText as T0, h as Gt, createApp as A0, pushScopeId as Ci, popScopeId as _i, createStaticVNode as yW, defineAsyncComponent as ud, Suspense as bW, onBeforeUpdate as wW, shallowReactive as xW, isVNode as z9, render as M5, markRaw as Go } from "vue"; import { defineStore as Df, mapStores as vl } from "pinia"; const Yn = (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); }, D5 = (e) => (t) => t.pointerType === "mouse" ? e(t) : void 0; var B5; const ur = typeof window < "u", kW = (e) => typeof e == "string", j9 = () => { }, uC = ur && ((B5 = window == null ? void 0 : window.navigator) == null ? void 0 : B5.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent); function V9(e) { return typeof e == "function" ? e() : y(e); } function CW(e) { return e; } function I0(e) { return x0() ? (Lf(e), !0) : !1; } function _W(e, t = !0) { st() ? ut(e) : t ? e() : Ke(e); } function Wi(e) { var t; const n = V9(e); return (t = n == null ? void 0 : n.$el) != null ? t : n; } const P0 = ur ? window : void 0; function Xo(...e) { let t, n, r, o; if (kW(e[0]) || Array.isArray(e[0]) ? ([n, r, o] = e, t = P0) : [t, n, r, o] = e, !t) return j9; Array.isArray(n) || (n = [n]), Array.isArray(r) || (r = [r]); const a = [], i = () => { a.forEach((c) => c()), a.length = 0; }, s = (c, d, p, h) => (c.addEventListener(d, p, h), () => c.removeEventListener(d, p, h)), l = he(() => [Wi(t), V9(o)], ([c, d]) => { i(), c && a.push(...n.flatMap((p) => r.map((h) => s(c, p, h, d)))); }, { immediate: !0, flush: "post" }), u = () => { l(), i(); }; return I0(u), u; } let z5 = !1; function H9(e, t, n = {}) { const { window: r = P0, ignore: o = [], capture: a = !0, detectIframe: i = !1 } = n; if (!r) return; uC && !z5 && (z5 = !0, Array.from(r.document.body.children).forEach((p) => p.addEventListener("click", j9))); let s = !0; const l = (p) => o.some((h) => { if (typeof h == "string") return Array.from(r.document.querySelectorAll(h)).some((f) => f === p.target || p.composedPath().includes(f)); { const f = Wi(h); return f && (p.target === f || p.composedPath().includes(f)); } }), c = [ Xo(r, "click", (p) => { const h = Wi(e); if (!(!h || h === p.target || p.composedPath().includes(h))) { if (p.detail === 0 && (s = !l(p)), !s) { s = !0; return; } t(p); } }, { passive: !0, capture: a }), Xo(r, "pointerdown", (p) => { const h = Wi(e); h && (s = !p.composedPath().includes(h) && !l(p)); }, { passive: !0 }), i && Xo(r, "blur", (p) => { var h; const f = Wi(e); ((h = r.document.activeElement) == null ? void 0 : h.tagName) === "IFRAME" && !(f != null && f.contains(r.document.activeElement)) && t(p); }) ].filter(Boolean); return () => c.forEach((p) => p()); } function U9(e, t = !1) { const n = z(), r = () => n.value = !!e(); return r(), _W(r, t), n; } const j5 = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, V5 = "__vueuse_ssr_handlers__"; j5[V5] = j5[V5] || {}; var H5 = Object.getOwnPropertySymbols, SW = Object.prototype.hasOwnProperty, $W = Object.prototype.propertyIsEnumerable, EW = (e, t) => { var n = {}; for (var r in e) SW.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]); if (e != null && H5) for (var r of H5(e)) t.indexOf(r) < 0 && $W.call(e, r) && (n[r] = e[r]); return n; }; function ji(e, t, n = {}) { const r = n, { window: o = P0 } = r, a = EW(r, ["window"]); let i; const s = U9(() => o && "ResizeObserver" in o), l = () => { i && (i.disconnect(), i = void 0); }, u = he(() => Wi(e), (d) => { l(), s.value && o && d && (i = new ResizeObserver(t), i.observe(d, a)); }, { immediate: !0, flush: "post" }), c = () => { l(), u(); }; return I0(c), { isSupported: s, stop: c }; } var U5 = Object.getOwnPropertySymbols, OW = Object.prototype.hasOwnProperty, FW = Object.prototype.propertyIsEnumerable, TW = (e, t) => { var n = {}; for (var r in e) OW.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]); if (e != null && U5) for (var r of U5(e)) t.indexOf(r) < 0 && FW.call(e, r) && (n[r] = e[r]); return n; }; function AW(e, t, n = {}) { const r = n, { window: o = P0 } = r, a = TW(r, ["window"]); let i; const s = U9(() => o && "MutationObserver" in o), l = () => { i && (i.disconnect(), i = void 0); }, u = he(() => Wi(e), (d) => { l(), s.value && o && d && (i = new MutationObserver(t), i.observe(d, a)); }, { immediate: !0 }), c = () => { l(), u(); }; return I0(c), { isSupported: s, stop: c }; } var q5; (function(e) { e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE"; })(q5 || (q5 = {})); var IW = Object.defineProperty, K5 = Object.getOwnPropertySymbols, PW = Object.prototype.hasOwnProperty, LW = Object.prototype.propertyIsEnumerable, G5 = (e, t, n) => t in e ? IW(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, RW = (e, t) => { for (var n in t || (t = {})) PW.call(t, n) && G5(e, n, t[n]); if (K5) for (var n of K5(t)) LW.call(t, n) && G5(e, n, t[n]); return e; }; const NW = { 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] }; RW({ linear: CW }, NW); const MW = () => ur && /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 Tc = () => { }, DW = Object.prototype.hasOwnProperty, W5 = (e, t) => DW.call(e, t), yr = Array.isArray, oo = (e) => typeof e == "function", wr = (e) => typeof e == "string", Fr = (e) => e !== null && typeof e == "object", BW = Object.prototype.toString, zW = (e) => BW.call(e), B1 = (e) => zW(e).slice(8, -1), q9 = (e) => { const t = /* @__PURE__ */ Object.create(null); return (n) => t[n] || (t[n] = e(n)); }, jW = /-(\w)/g, VW = q9( (e) => e.replace(jW, (t, n) => n ? n.toUpperCase() : "") ), HW = /\B([A-Z])/g, UW = q9( (e) => e.replace(HW, "-$1").toLowerCase() ); var K9 = typeof global == "object" && global && global.Object === Object && global, qW = typeof self == "object" && self && self.Object === Object && self, Si = K9 || qW || Function("return this")(), hi = Si.Symbol, G9 = Object.prototype, KW = G9.hasOwnProperty, GW = G9.toString, Kd = hi ? hi.toStringTag : void 0; function WW(e) { var t = KW.call(e, Kd), n = e[Kd]; try { e[Kd] = void 0; var r = !0; } catch { } var o = GW.call(e); return r && (t ? e[Kd] = n : delete e[Kd]), o; } var YW = Object.prototype, XW = YW.toString; function ZW(e) { return XW.call(e); } var JW = "[object Null]", QW = "[object Undefined]", Y5 = hi ? hi.toStringTag : void 0; function cd(e) { return e == null ? e === void 0 ? QW : JW : Y5 && Y5 in Object(e) ? WW(e) : ZW(e); } function Ac(e) { return e != null && typeof e == "object"; } var eY = "[object Symbol]"; function L0(e) { return typeof e == "symbol" || Ac(e) && cd(e) == eY; } function tY(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 za = Array.isArray, nY = 1 / 0, X5 = hi ? hi.prototype : void 0, Z5 = X5 ? X5.toString : void 0; function W9(e) { if (typeof e == "string") return e; if (za(e)) return tY(e, W9) + ""; if (L0(e)) return Z5 ? Z5.call(e) : ""; var t = e + ""; return t == "0" && 1 / e == -nY ? "-0" : t; } var rY = /\s/; function oY(e) { for (var t = e.length; t-- && rY.test(e.charAt(t)); ) ; return t; } var aY = /^\s+/; function iY(e) { return e && e.slice(0, oY(e) + 1).replace(aY, ""); } function Js(e) { var t = typeof e; return e != null && (t == "object" || t == "function"); } var J5 = NaN, sY = /^[-+]0x[0-9a-f]+$/i, lY = /^0b[01]+$/i, uY = /^0o[0-7]+$/i, cY = parseInt; function Q5(e) { if (typeof e == "number") return e; if (L0(e)) return J5; if (Js(e)) { var t = typeof e.valueOf == "function" ? e.valueOf() : e; e = Js(t) ? t + "" : t; } if (typeof e != "string") return e === 0 ? e : +e; e = iY(e); var n = lY.test(e); return n || uY.test(e) ? cY(e.slice(2), n ? 2 : 8) : sY.test(e) ? J5 : +e; } function Y9(e) { return e; } var dY = "[object AsyncFunction]", pY = "[object Function]", fY = "[object GeneratorFunction]", hY = "[object Proxy]"; function X9(e) { if (!Js(e)) return !1; var t = cd(e); return t == pY || t == fY || t == dY || t == hY; } var z1 = Si["__core-js_shared__"], e3 = function() { var e = /[^.]+$/.exec(z1 && z1.keys && z1.keys.IE_PROTO || ""); return e ? "Symbol(src)_1." + e : ""; }(); function vY(e) { return !!e3 && e3 in e; } var gY = Function.prototype, mY = gY.toString; function Eu(e) { if (e != null) { try { return mY.call(e); } catch { } try { return e + ""; } catch { } } return ""; } var yY = /[\\^$.*+?()[\]{}|]/g, bY = /^\[object .+?Constructor\]$/, wY = Function.prototype, xY = Object.prototype, kY = wY.toString, CY = xY.hasOwnProperty, _Y = RegExp( "^" + kY.call(CY).replace(yY, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$" ); function SY(e) { if (!Js(e) || vY(e)) return !1; var t = X9(e) ? _Y : bY; return t.test(Eu(e)); } function $Y(e, t) { return e == null ? void 0 : e[t]; } function Ou(e, t) { var n = $Y(e, t); return SY(n) ? n : void 0; } var cC = Ou(Si, "WeakMap"); function EY(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 OY = 800, FY = 16, TY = Date.now; function AY(e) { var t = 0, n = 0; return function() { var r = TY(), o = FY - (r - n); if (n = r, o > 0) { if (++t >= OY) return arguments[0]; } else t = 0; return e.apply(void 0, arguments); }; } function IY(e) { return function() { return e; }; } var kg = function() { try { var e = Ou(Object, "defineProperty"); return e({}, "", {}), e; } catch { } }(), PY = kg ? function(e, t) { return kg(e, "toString", { configurable: !0, enumerable: !1, value: IY(t), writable: !0 }); } : Y9, LY = AY(PY); function RY(e, t, n, r) { e.length; for (var o = n + 1; o--; ) if (t(e[o], o, e)) return o; return -1; } var NY = 9007199254740991, MY = /^(?:0|[1-9]\d*)$/; function J_(e, t) { var n = typeof e; return t = t ?? NY, !!t && (n == "number" || n != "symbol" && MY.test(e)) && e > -1 && e % 1 == 0 && e < t; } function DY(e, t, n) { t == "__proto__" && kg ? kg(e, t, { configurable: !0, enumerable: !0, value: n, writable: !0 }) : e[t] = n; } function Q_(e, t) { return e === t || e !== e && t !== t; } var BY = Object.prototype, zY = BY.hasOwnProperty; function jY(e, t, n) { var r = e[t]; (!(zY.call(e, t) && Q_(r, n)) || n === void 0 && !(t in e)) && DY(e, t, n); } var t3 = Math.max; function VY(e, t, n) { return t = t3(t === void 0 ? e.length - 1 : t, 0), function() { for (var r = arguments, o = -1, a = t3(r.length - t, 0), i = Array(a); ++o < a; ) i[o] = r[t + o]; o = -1; for (var s = Array(t + 1); ++o < t; ) s[o] = r[o]; return s[t] = n(i), EY(e, this, s); }; } var HY = 9007199254740991; function eS(e) { return typeof e == "number" && e > -1 && e % 1 == 0 && e <= HY; } function UY(e) { return e != null && eS(e.length) && !X9(e); } var qY = Object.prototype; function KY(e) { var t = e && e.constructor, n = typeof t == "function" && t.prototype || qY; return e === n; } function GY(e, t) { for (var n = -1, r = Array(e); ++n < e; ) r[n] = t(n); return r; } var WY = "[object Arguments]"; function n3(e) { return Ac(e) && cd(e) == WY; } var Z9 = Object.prototype, YY = Z9.hasOwnProperty, XY = Z9.propertyIsEnumerable, tS = n3(/* @__PURE__ */ function() { return arguments; }()) ? n3 : function(e) { return Ac(e) && YY.call(e, "callee") && !XY.call(e, "callee"); }; function ZY() { return !1; } var J9 = typeof exports == "object" && exports && !exports.nodeType && exports, r3 = J9 && typeof module == "object" && module && !module.nodeType && module, JY = r3 && r3.exports === J9, o3 = JY ? Si.Buffer : void 0, QY = o3 ? o3.isBuffer : void 0, dC = QY || ZY, eX = "[object Arguments]", tX = "[object Array]", nX = "[object Boolean]", rX = "[object Date]", oX = "[object Error]", aX = "[object Function]", iX = "[object Map]", sX = "[object Number]", lX = "[object Object]", uX = "[object RegExp]", cX = "[object Set]", dX = "[object String]", pX = "[object WeakMap]", fX = "[object ArrayBuffer]", hX = "[object DataView]", vX = "[object Float32Array]", gX = "[object Float64Array]", mX = "[object Int8Array]", yX = "[object Int16Array]", bX = "[object Int32Array]", wX = "[object Uint8Array]", xX = "[object Uint8ClampedArray]", kX = "[object Uint16Array]", CX = "[object Uint32Array]", _n = {}; _n[vX] = _n[gX] = _n[mX] = _n[yX] = _n[bX] = _n[wX] = _n[xX] = _n[kX] = _n[CX] = !0; _n[eX] = _n[tX] = _n[fX] = _n[nX] = _n[hX] = _n[rX] = _n[oX] = _n[aX] = _n[iX] = _n[sX] = _n[lX] = _n[uX] = _n[cX] = _n[dX] = _n[pX] = !1; function _X(e) { return Ac(e) && eS(e.length) && !!_n[cd(e)]; } function SX(e) { return function(t) { return e(t); }; } var Q9 = typeof exports == "object" && exports && !exports.nodeType && exports, _p = Q9 && typeof module == "object" && module && !module.nodeType && module, $X = _p && _p.exports === Q9, j1 = $X && K9.process, a3 = function() { try { var e = _p && _p.require && _p.require("util").types; return e || j1 && j1.binding && j1.binding("util"); } catch { } }(), i3 = a3 && a3.isTypedArray, eN = i3 ? SX(i3) : _X, EX = Object.prototype, OX = EX.hasOwnProperty; function FX(e, t) { var n = za(e), r = !n && tS(e), o = !n && !r && dC(e), a = !n && !r && !o && eN(e), i = n || r || o || a, s = i ? GY(e.length, String) : [], l = s.length; for (var u in e) OX.call(e, u) && !(i && // Safari 9 has enumerable `arguments.length` in strict mode. (u == "length" || // Node.js 0.10 has enumerable non-index properties on buffers. o && (u == "offset" || u == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays. a && (u == "buffer" || u == "byteLength" || u == "byteOffset") || // Skip index properties. J_(u, l))) && s.push(u); return s; } function TX(e, t) { return function(n) { return e(t(n)); }; } var AX = TX(Object.keys, Object), IX = Object.prototype, PX = IX.hasOwnProperty; function LX(e) { if (!KY(e)) return AX(e); var t = []; for (var n in Object(e)) PX.call(e, n) && n != "constructor" && t.push(n); return t; } function tN(e) { return UY(e) ? FX(e) : LX(e); } var RX = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, NX = /^\w*$/; function nS(e, t) { if (za(e)) return !1; var n = typeof e; return n == "number" || n == "symbol" || n == "boolean" || e == null || L0(e) ? !0 : NX.test(e) || !RX.test(e) || t != null && e in Object(t); } var Hp = Ou(Object, "create"); function MX() { this.__data__ = Hp ? Hp(null) : {}, this.size = 0; } function DX(e) { var t = this.has(e) && delete this.__data__[e]; return this.size -= t ? 1 : 0, t; } var BX = "__lodash_hash_undefined__", zX = Object.prototype, jX = zX.hasOwnProperty; function VX(e) { var t = this.__data__; if (Hp) { var n = t[e]; return n === BX ? void 0 : n; } return jX.call(t, e) ? t[e] : void 0; } var HX = Object.prototype, UX = HX.hasOwnProperty; function qX(e) { var t = this.__data__; return Hp ? t[e] !== void 0 : UX.call(t, e); } var KX = "__lodash_hash_undefined__"; function GX(e, t) { var n = this.__data__; return this.size += this.has(e) ? 0 : 1, n[e] = Hp && t === void 0 ? KX : t, this; } function su(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]); } } su.prototype.clear = MX; su.prototype.delete = DX; su.prototype.get = VX; su.prototype.has = qX; su.prototype.set = GX; function WX() { this.__data__ = [], this.size = 0; } function R0(e, t) { for (var n = e.length; n--; ) if (Q_(e[n][0], t)) return n; return -1; } var YX = Array.prototype, XX = YX.splice; function ZX(e) { var t = this.__data__, n = R0(t, e); if (n < 0) return !1; var r = t.length - 1; return n == r ? t.pop() : XX.call(t, n, 1), --this.size, !0; } function JX(e) { var t = this.__data__, n = R0(t, e); return n < 0 ? void 0 : t[n][1]; } function QX(e) { return R0(this.__data__, e) > -1; } function eZ(e, t) { var n = this.__data__, r = R0(n, e); return r < 0 ? (++this.size, n.push([e, t])) : n[r][1] = t, this; } function us(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]); } } us.prototype.clear = WX; us.prototype.delete = ZX; us.prototype.get = JX; us.prototype.has = QX; us.prototype.set = eZ; var Up = Ou(Si, "Map"); function tZ() { this.size = 0, this.__data__ = { hash: new su(), map: new (Up || us)(), string: new su() }; } function nZ(e) { var t = typeof e; return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e !== "__proto__" : e === null; } function N0(e, t) { var n = e.__data__; return nZ(t) ? n[typeof t == "string" ? "string" : "hash"] : n.map; } function rZ(e) { var t = N0(this, e).delete(e); return this.size -= t ? 1 : 0, t; } function oZ(e) { return N0(this, e).get(e); } function aZ(e) { return N0(this, e).has(e); } function iZ(e, t) { var n = N0(this, e), r = n.size; return n.set(e, t), this.size += n.size == r ? 0 : 1, this; } function cs(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]); } } cs.prototype.clear = tZ; cs.prototype.delete = rZ; cs.prototype.get = oZ; cs.prototype.has = aZ; cs.prototype.set = iZ; var sZ = "Expected a function"; function rS(e, t) { if (typeof e != "function" || t != null && typeof t != "function") throw new TypeError(sZ); 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 i = e.apply(this, r); return n.cache = a.set(o, i) || a, i; }; return n.cache = new (rS.Cache || cs)(), n; } rS.Cache = cs; var lZ = 500; function uZ(e) { var t = rS(e, function(r) { return n.size === lZ && n.clear(), r; }), n = t.cache; return t; } var cZ = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, dZ = /\\(\\)?/g, pZ = uZ(function(e) { var t = []; return e.charCodeAt(0) === 46 && t.push(""), e.replace(cZ, function(n, r, o, a) { t.push(o ? a.replace(dZ, "$1") : r || n); }), t; }); function fZ(e) { return e == null ? "" : W9(e); } function M0(e, t) { return za(e) ? e : nS(e, t) ? [e] : pZ(fZ(e)); } var hZ = 1 / 0; function Bf(e) { if (typeof e == "string" || L0(e)) return e; var t = e + ""; return t == "0" && 1 / e == -hZ ? "-0" : t; } function oS(e, t) { t = M0(t, e); for (var n = 0, r = t.length; e != null && n < r; ) e = e[Bf(t[n++])]; return n && n == r ? e : void 0; } function Hi(e, t, n) { var r = e == null ? void 0 : oS(e, t); return r === void 0 ? n : r; } function nN(e, t) { for (var n = -1, r = t.length, o = e.length; ++n < r; ) e[o + n] = t[n]; return e; } var s3 = hi ? hi.isConcatSpreadable : void 0; function vZ(e) { return za(e) || tS(e) || !!(s3 && e && e[s3]); } function gZ(e, t, n, r, o) { var a = -1, i = e.length; for (n || (n = vZ), o || (o = []); ++a < i; ) { var s = e[a]; n(s) ? nN(o, s) : o[o.length] = s; } return o; } function mZ(e) { var t = e == null ? 0 : e.length; return t ? gZ(e) : []; } function yZ(e) { return LY(VY(e, void 0, mZ), e + ""); } function Ma() { if (!arguments.length) return []; var e = arguments[0]; return za(e) ? e : [e]; } function bZ() { this.__data__ = new us(), this.size = 0; } function wZ(e) { var t = this.__data__, n = t.delete(e); return this.size = t.size, n; } function xZ(e) { return this.__data__.get(e); } function kZ(e) { return this.__data__.has(e); } var CZ = 200; function _Z(e, t) { var n = this.__data__; if (n instanceof us) { var r = n.__data__; if (!Up || r.length < CZ - 1) return r.push([e, t]), this.size = ++n.size, this; n = this.__data__ = new cs(r); } return n.set(e, t), this.size = n.size, this; } function Zi(e) { var t = this.__data__ = new us(e); this.size = t.size; } Zi.prototype.clear = bZ; Zi.prototype.delete = wZ; Zi.prototype.get = xZ; Zi.prototype.has = kZ; Zi.prototype.set = _Z; function SZ(e, t) { for (var n = -1, r = e == null ? 0 : e.length, o = 0, a = []; ++n < r; ) { var i = e[n]; t(i, n, e) && (a[o++] = i); } return a; } function $Z() { return []; } var EZ = Object.prototype, OZ = EZ.propertyIsEnumerable, l3 = Object.getOwnPropertySymbols, FZ = l3 ? function(e) { return e == null ? [] : (e = Object(e), SZ(l3(e), function(t) { return OZ.call(e, t); })); } : $Z; function TZ(e, t, n) { var r = t(e); return za(e) ? r : nN(r, n(e)); } function u3(e) { return TZ(e, tN, FZ); } var pC = Ou(Si, "DataView"), fC = Ou(Si, "Promise"), hC = Ou(Si, "Set"), c3 = "[object Map]", AZ = "[object Object]", d3 = "[object Promise]", p3 = "[object Set]", f3 = "[object WeakMap]", h3 = "[object DataView]", IZ = Eu(pC), PZ = Eu(Up), LZ = Eu(fC), RZ = Eu(hC), NZ = Eu(cC), Ns = cd; (pC && Ns(new pC(new ArrayBuffer(1))) != h3 || Up && Ns(new Up()) != c3 || fC && Ns(fC.resolve()) != d3 || hC && Ns(new hC()) != p3 || cC && Ns(new cC()) != f3) && (Ns = function(e) { var t = cd(e), n = t == AZ ? e.constructor : void 0, r = n ? Eu(n) : ""; if (r) switch (r) { case IZ: return h3; case PZ: return c3; case LZ: return d3; case RZ: return p3; case NZ: return f3; } return t; }); var v3 = Si.Uint8Array, MZ = "__lodash_hash_undefined__"; function DZ(e) { return this.__data__.set(e, MZ), this; } function BZ(e) { return this.__data__.has(e); } function Cg(e) { var t = -1, n = e == null ? 0 : e.length; for (this.__data__ = new cs(); ++t < n; ) this.add(e[t]); } Cg.prototype.add = Cg.prototype.push = DZ; Cg.prototype.has = BZ; function zZ(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 jZ(e, t) { return e.has(t); } var VZ = 1, HZ = 2; function rN(e, t, n, r, o, a) { var i = n & VZ, s = e.length, l = t.length; if (s != l && !(i && l > s)) return !1; var u = a.get(e), c = a.get(t); if (u && c) return u == t && c == e; var d = -1, p = !0, h = n & HZ ? new Cg() : void 0; for (a.set(e, t), a.set(t, e); ++d < s; ) { var f = e[d], v = t[d]; if (r) var m = i ? r(v, f, d, t, e, a) : r(f, v, d, e, t, a); if (m !== void 0) { if (m) continue; p = !1; break; } if (h) { if (!zZ(t, function(g, b) { if (!jZ(h, b) && (f === g || o(f, g, n, r, a))) return h.push(b); })) { p = !1; break; } } else if (!(f === v || o(f, v, n, r, a))) { p = !1; break; } } return a.delete(e), a.delete(t), p; } function UZ(e) { var t = -1, n = Array(e.size); return e.forEach(function(r, o) { n[++t] = [o, r]; }), n; } function qZ(e) { var t = -1, n = Array(e.size); return e.forEach(function(r) { n[++t] = r; }), n; } var KZ = 1, GZ = 2, WZ = "[object Boolean]", YZ = "[object Date]", XZ = "[object Error]", ZZ = "[object Map]", JZ = "[object Number]", QZ = "[object RegExp]", eJ = "[object Set]", tJ = "[object String]", nJ = "[object Symbol]", rJ = "[object ArrayBuffer]", oJ = "[object DataView]", g3 = hi ? hi.prototype : void 0, V1 = g3 ? g3.valueOf : void 0; function aJ(e, t, n, r, o, a, i) { switch (n) { case oJ: if (e.byteLength != t.byteLength || e.byteOffset != t.byteOffset) return !1; e = e.buffer, t = t.buffer; case rJ: return !(e.byteLength != t.byteLength || !a(new v3(e), new v3(t))); case WZ: case YZ: case JZ: return Q_(+e, +t); case XZ: return e.name == t.name && e.message == t.message; case QZ: case tJ: return e == t + ""; case ZZ: var s = UZ; case eJ: var l = r & KZ; if (s || (s = qZ), e.size != t.size && !l) return !1; var u = i.get(e); if (u) return u == t; r |= GZ, i.set(e, t); var c = rN(s(e), s(t), r, o, a, i); return i.delete(e), c; case nJ: if (V1) return V1.call(e) == V1.call(t); } return !1; } var iJ = 1, sJ = Object.prototype, lJ = sJ.hasOwnProperty; function uJ(e, t, n, r, o, a) { var i = n & iJ, s = u3(e), l = s.length, u = u3(t), c = u.length; if (l != c && !i) return !1; for (var d = l; d--; ) { var p = s[d]; if (!(i ? p in t : lJ.call(t, p))) return !1; } var h = a.get(e), f = a.get(t); if (h && f) return h == t && f == e; var v = !0; a.set(e, t), a.set(t, e); for (var m = i; ++d < l; ) { p = s[d]; var g = e[p], b = t[p]; if (r) var x = i ? r(b, g, p, t, e, a) : r(g, b, p, e, t, a); if (!(x === void 0 ? g === b || o(g, b, n, r, a) : x)) { v = !1; break; } m || (m = p == "constructor"); } if (v && !m) { var w = e.constructor, k = t.constructor; w != k && "constructor" in e && "constructor" in t && !(typeof w == "function" && w instanceof w && typeof k == "function" && k instanceof k) && (v = !1); } return a.delete(e), a.delete(t), v; } var cJ = 1, m3 = "[object Arguments]", y3 = "[object Array]", Bh = "[object Object]", dJ = Object.prototype, b3 = dJ.hasOwnProperty; function pJ(e, t, n, r, o, a) { var i = za(e), s = za(t), l = i ? y3 : Ns(e), u = s ? y3 : Ns(t); l = l == m3 ? Bh : l, u = u == m3 ? Bh : u; var c = l == Bh, d = u == Bh, p = l == u; if (p && dC(e)) { if (!dC(t)) return !1; i = !0, c = !1; } if (p && !c) return a || (a = new Zi()), i || eN(e) ? rN(e, t, n, r, o, a) : aJ(e, t, l, n, r, o, a); if (!(n & cJ)) { var h = c && b3.call(e, "__wrapped__"), f = d && b3.call(t, "__wrapped__"); if (h || f) { var v = h ? e.value() : e, m = f ? t.value() : t; return a || (a = new Zi()), o(v, m, n, r, a); } } return p ? (a || (a = new Zi()), uJ(e, t, n, r, o, a)) : !1; } function D0(e, t, n, r, o) { return e === t ? !0 : e == null || t == null || !Ac(e) && !Ac(t) ? e !== e && t !== t : pJ(e, t, n, r, D0, o); } var fJ = 1, hJ = 2; function vJ(e, t, n, r) { var o = n.length, a = o; if (e == null) return !a; for (e = Object(e); o--; ) { var i = n[o]; if (i[2] ? i[1] !== e[i[0]] : !(i[0] in e)) return !1; } for (; ++o < a; ) { i = n[o]; var s = i[0], l = e[s], u = i[1]; if (i[2]) { if (l === void 0 && !(s in e)) return !1; } else { var c = new Zi(), d; if (!(d === void 0 ? D0(u, l, fJ | hJ, r, c) : d)) return !1; } } return !0; } function oN(e) { return e === e && !Js(e); } function gJ(e) { for (var t = tN(e), n = t.length; n--; ) { var r = t[n], o = e[r]; t[n] = [r, o, oN(o)]; } return t; } function aN(e, t) { return function(n) { return n == null ? !1 : n[e] === t && (t !== void 0 || e in Object(n)); }; } function mJ(e) { var t = gJ(e); return t.length == 1 && t[0][2] ? aN(t[0][0], t[0][1]) : function(n) { return n === e || vJ(n, e, t); }; } function yJ(e, t) { return e != null && t in Object(e); } function bJ(e, t, n) { t = M0(t, e); for (var r = -1, o = t.length, a = !1; ++r < o; ) { var i = Bf(t[r]); if (!(a = e != null && n(e, i))) break; e = e[i]; } return a || ++r != o ? a : (o = e == null ? 0 : e.length, !!o && eS(o) && J_(i, o) && (za(e) || tS(e))); } function iN(e, t) { return e != null && bJ(e, t, yJ); } var wJ = 1, xJ = 2; function kJ(e, t) { return nS(e) && oN(t) ? aN(Bf(e), t) : function(n) { var r = Hi(n, e); return r === void 0 && r === t ? iN(n, e) : D0(t, r, wJ | xJ); }; } function CJ(e) { return function(t) { return t == null ? void 0 : t[e]; }; } function _J(e) { return function(t) { return oS(t, e); }; } function SJ(e) { return nS(e) ? CJ(Bf(e)) : _J(e); } function $J(e) { return typeof e == "function" ? e : e == null ? Y9 : typeof e == "object" ? za(e) ? kJ(e[0], e[1]) : mJ(e) : SJ(e); } var H1 = function() { return Si.Date.now(); }, EJ = "Expected a function", OJ = Math.max, FJ = Math.min; function sN(e, t, n) { var r, o, a, i, s, l, u = 0, c = !1, d = !1, p = !0; if (typeof e != "function") throw new TypeError(EJ); t = Q5(t) || 0, Js(n) && (c = !!n.leading, d = "maxWait" in n, a = d ? OJ(Q5(n.maxWait) || 0, t) : a, p = "trailing" in n ? !!n.trailing : p); function h(C) { var _ = r, $ = o; return r = o = void 0, u = C, i = e.apply($, _), i; } function f(C) { return u = C, s = setTimeout(g, t), c ? h(C) : i; } function v(C) { var _ = C - l, $ = C - u, O = t - _; return d ? FJ(O, a - $) : O; } function m(C) { var _ = C - l, $ = C - u; return l === void 0 || _ >= t || _ < 0 || d && $ >= a; } function g() { var C = H1(); if (m(C)) return b(C); s = setTimeout(g, v(C)); } function b(C) { return s = void 0, p && r ? h(C) : (r = o = void 0, i); } function x() { s !== void 0 && clearTimeout(s), u = 0, r = l = o = s = void 0; } function w() { return s === void 0 ? i : b(H1()); } function k() { var C = H1(), _ = m(C); if (r = arguments, o = this, l = C, _) { if (s === void 0) return f(l); if (d) return clearTimeout(s), s = setTimeout(g, t), h(l); } return s === void 0 && (s = setTimeout(g, t)), i; } return k.cancel = x, k.flush = w, k; } function TJ(e, t, n) { var r = e == null ? 0 : e.length; if (!r) return -1; var o = r - 1; return RY(e, $J(t), o); } function _g(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 Sg(e, t) { return D0(e, t); } function zf(e) { return e == null; } function AJ(e) { return e === void 0; } function IJ(e, t, n, r) { if (!Js(e)) return e; t = M0(t, e); for (var o = -1, a = t.length, i = a - 1, s = e; s != null && ++o < a; ) { var l = Bf(t[o]), u = n; if (l === "__proto__" || l === "constructor" || l === "prototype") return e; if (o != i) { var c = s[l]; u = void 0, u === void 0 && (u = Js(c) ? c : J_(t[o + 1]) ? [] : {}); } jY(s, l, u), s = s[l]; } return e; } function PJ(e, t, n) { for (var r = -1, o = t.length, a = {}; ++r < o; ) { var i = t[r], s = oS(e, i); n(s, i) && IJ(a, M0(i, e), s); } return a; } function LJ(e, t) { return PJ(e, t, function(n, r) { return iN(e, r); }); } var lN = yZ(function(e, t) { return e == null ? {} : LJ(e, t); }); const js = (e) => e === void 0, Qs = (e) => typeof e == "boolean", Zn = (e) => typeof e == "number", Zl = (e) => typeof Element > "u" ? !1 : e instanceof Element, qp = (e) => zf(e), RJ = (e) => wr(e) ? !Number.isNaN(Number(e)) : !1, NJ = (e = "") => e.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d"), w3 = (e) => Object.keys(e); class uN extends Error { constructor(t) { super(t), this.name = "ElementPlusError"; } } function cN(e, t) { throw new uN(`[${e}] ${t}`); } function xr(e, t) { if (process.env.NODE_ENV !== "production") { const n = wr(e) ? new uN(`[${e}] ${t}`) : e; console.warn(n); } } const MJ = "utils/dom/style", dN = (e = "") => e.split(" ").filter((t) => !!t.trim()), x3 = (e, t) => { !e || !t.trim() || e.classList.add(...dN(t)); }, $g = (e, t) => { !e || !t.trim() || e.classList.remove(...dN(t)); }, Gd = (e, t) => { var n; if (!ur || !e || !t) return ""; let r = VW(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 Kp(e, t = "px") { if (!e) return ""; if (Zn(e) || RJ(e)) return `${e}${t}`; if (wr(e)) return e; xr(MJ, "binding value must be a string or number"); } function DJ(e, t) { if (!ur) 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, u) => l + u.offsetTop, 0), a = o + t.offsetHeight, i = e.scrollTop, s = i + e.clientHeight; o < i ? e.scrollTop = o : a > s && (e.scrollTop = a - e.clientHeight); } /*! Element Plus Icons Vue v2.3.1 */ var BJ = /* @__PURE__ */ W({ name: "Aim", __name: "aim", setup(e) { return (t, n) => (S(), L("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ D("path", { fill: "currentColor", d: "M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896" }), D("path", { fill: "currentColor", d: "M512 96a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V128a32 32 0 0 1 32-32m0 576a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V704a32 32 0 0 1 32-32M96 512a32 32 0 0 1 32-32h192a32 32 0 0 1 0 64H128a32 32 0 0 1-32-32m576 0a32 32 0 0 1 32-32h192a32 32 0 1 1 0 64H704a32 32 0 0 1-32-32" }) ])); } }), zJ = BJ, jJ = /* @__PURE__ */ W({ name: "ArrowDown", __name: "arrow-down", setup(e) { return (t, n) => (S(), L("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ D("path", { fill: "currentColor", d: "M831.872 340.864 512 652.672 192.128 340.864a30.592 30.592 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.592 30.592 0 0 0-42.752 0z" }) ])); } }), ma = jJ, VJ = /* @__PURE__ */ W({ name: "ArrowLeft", __name: "arrow-left", setup(e) { return (t, n) => (S(), L("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ D("path", { fill: "currentColor", d: "M609.408 149.376 277.76 489.6a32 32 0 0 0 0 44.672l331.648 340.352a29.12 29.12 0 0 0 41.728 0 30.592 30.592 0 0 0 0-42.752L339.264 511.936l311.872-319.872a30.592 30.592 0 0 0 0-42.688 29.12 29.12 0 0 0-41.728 0z" }) ])); } }), aS = VJ, HJ = /* @__PURE__ */ W({ name: "ArrowRight", __name: "arrow-right", setup(e) { return (t, n) => (S(), L("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ D("path", { fill: "currentColor", d: "M340.864 149.312a30.592 30.592 0 0 0 0 42.752L652.736 512 340.864 831.872a30.592 30.592 0 0 0 0 42.752 29.12 29.12 0 0 0 41.728 0L714.24 534.336a32 32 0 0 0 0-44.672L382.592 149.376a29.12 29.12 0 0 0-41.728 0z" }) ])); } }), jf = HJ, UJ = /* @__PURE__ */ W({ name: "ArrowUp", __name: "arrow-up", setup(e) { return (t, n) => (S(), L("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ D("path", { fill: "currentColor", d: "m488.832 344.32-339.84 356.672a32 32 0 0 0 0 44.16l.384.384a29.44 29.44 0 0 0 42.688 0l320-335.872 319.872 335.872a29.44 29.44 0 0 0 42.688 0l.384-.384a32 32 0 0 0 0-44.16L535.168 344.32a32 32 0 0 0-46.336 0" }) ])); } }), iS = UJ, qJ = /* @__PURE__ */ W({ name: "CaretRight", __name: "caret-right", setup(e) { return (t, n) => (S(), L("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ D("path", { fill: "currentColor", d: "M384 192v640l384-320.064z" }) ])); } }), KJ = qJ, GJ = /* @__PURE__ */ W({ name: "Check", __name: "check", setup(e) { return (t, n) => (S(), L("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ D("path", { fill: "currentColor", d: "M406.656 706.944 195.84 496.256a32 32 0 1 0-45.248 45.248l256 256 512-512a32 32 0 0 0-45.248-45.248L406.592 706.944z" }) ])); } }), pN = GJ, WJ = /* @__PURE__ */ W({ name: "CircleCheck", __name: "circle-check", setup(e) { return (t, n) => (S(), L("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ D("path", { fill: "currentColor", d: "M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896" }), D("path", { fill: "currentColor", d: "M745.344 361.344a32 32 0 0 1 45.312 45.312l-288 288a32 32 0 0 1-45.312 0l-160-160a32 32 0 1 1 45.312-45.312L480 626.752l265.344-265.408z" }) ])); } }), sS = WJ, YJ = /* @__PURE__ */ W({ name: "CircleCloseFilled", __name: "circle-close-filled", setup(e) { return (t, n) => (S(), L("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ D("path", { fill: "currentColor", d: "M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 393.664L407.936 353.6a38.4 38.4 0 1 0-54.336 54.336L457.664 512 353.6 616.064a38.4 38.4 0 1 0 54.336 54.336L512 566.336 616.064 670.4a38.4 38.4 0 1 0 54.336-54.336L566.336 512 670.4 407.936a38.4 38.4 0 1 0-54.336-54.336z" }) ])); } }), fN = YJ, XJ = /* @__PURE__ */ W({ name: "CircleClose", __name: "circle-close", setup(e) { return (t, n) => (S(), L("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ D("path", { fill: "currentColor", d: "m466.752 512-90.496-90.496a32 32 0 0 1 45.248-45.248L512 466.752l90.496-90.496a32 32 0 1 1 45.248 45.248L557.248 512l90.496 90.496a32 32 0 1 1-45.248 45.248L512 557.248l-90.496 90.496a32 32 0 0 1-45.248-45.248z" }), D("path", { fill: "currentColor", d: "M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896" }) ])); } }), $i = XJ, ZJ = /* @__PURE__ */ W({ name: "Close", __name: "close", setup(e) { return (t, n) => (S(), L("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ D("path", { fill: "currentColor", d: "M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z" }) ])); } }), Bo = ZJ, JJ = /* @__PURE__ */ W({ name: "Compass", __name: "compass", setup(e) { return (t, n) => (S(), L("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ D("path", { fill: "currentColor", d: "M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896" }), D("path", { fill: "currentColor", d: "M725.888 315.008C676.48 428.672 624 513.28 568.576 568.64c-55.424 55.424-139.968 107.904-253.568 157.312a12.8 12.8 0 0 1-16.896-16.832c49.536-113.728 102.016-198.272 157.312-253.632 55.36-55.296 139.904-107.776 253.632-157.312a12.8 12.8 0 0 1 16.832 16.832" }) ])); } }), QJ = JJ, eQ = /* @__PURE__ */ W({ name: "CopyDocument", __name: "copy-document", setup(e) { return (t, n) => (S(), L("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ D("path", { fill: "currentColor", d: "M768 832a128 128 0 0 1-128 128H192A128 128 0 0 1 64 832V384a128 128 0 0 1 128-128v64a64 64 0 0 0-64 64v448a64 64 0 0 0 64 64h448a64 64 0 0 0 64-64z" }), D("path", { fill: "currentColor", d: "M384 128a64 64 0 0 0-64 64v448a64 64 0 0 0 64 64h448a64 64 0 0 0 64-64V192a64 64 0 0 0-64-64zm0-64h448a128 128 0 0 1 128 128v448a128 128 0 0 1-128 128H384a128 128 0 0 1-128-128V192A128 128 0 0 1 384 64" }) ])); } }), vC = eQ, tQ = /* @__PURE__ */ W({ name: "DArrowLeft", __name: "d-arrow-left", setup(e) { return (t, n) => (S(), L("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ D("path", { fill: "currentColor", d: "M529.408 149.376a29.12 29.12 0 0 1 41.728 0 30.592 30.592 0 0 1 0 42.688L259.264 511.936l311.872 319.936a30.592 30.592 0 0 1-.512 43.264 29.12 29.12 0 0 1-41.216-.512L197.76 534.272a32 32 0 0 1 0-44.672l331.648-340.224zm256 0a29.12 29.12 0 0 1 41.728 0 30.592 30.592 0 0 1 0 42.688L515.264 511.936l311.872 319.936a30.592 30.592 0 0 1-.512 43.264 29.12 29.12 0 0 1-41.216-.512L453.76 534.272a32 32 0 0 1 0-44.672l331.648-340.224z" }) ])); } }), nQ = tQ, rQ = /* @__PURE__ */ W({ name: "DArrowRight", __name: "d-arrow-right", setup(e) { return (t, n) => (S(), L("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ D("path", { fill: "currentColor", d: "M452.864 149.312a29.12 29.12 0 0 1 41.728.064L826.24 489.664a32 32 0 0 1 0 44.672L494.592 874.624a29.12 29.12 0 0 1-41.728 0 30.592 30.592 0 0 1 0-42.752L764.736 512 452.864 192a30.592 30.592 0 0 1 0-42.688m-256 0a29.12 29.12 0 0 1 41.728.064L570.24 489.664a32 32 0 0 1 0 44.672L238.592 874.624a29.12 29.12 0 0 1-41.728 0 30.592 30.592 0 0 1 0-42.752L508.736 512 196.864 192a30.592 30.592 0 0 1 0-42.688z" }) ])); } }), oQ = rQ, aQ = /* @__PURE__ */ W({ name: "Delete", __name: "delete", setup(e) { return (t, n) => (S(), L("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ D("path", { fill: "currentColor", d: "M160 256H96a32 32 0 0 1 0-64h256V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64h-64v672a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32zm448-64v-64H416v64zM224 896h576V256H224zm192-128a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32m192 0a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32" }) ])); } }), Eg = aQ, iQ = /* @__PURE__ */ W({ name: "EditPen", __name: "edit-pen", setup(e) { return (t, n) => (S(), L("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ D("path", { fill: "currentColor", d: "m199.04 672.64 193.984 112 224-387.968-193.92-112-224 388.032zm-23.872 60.16 32.896 148.288 144.896-45.696zM455.04 229.248l193.92 112 56.704-98.112-193.984-112-56.64 98.112zM104.32 708.8l384-665.024 304.768 175.936L409.152 884.8h.064l-248.448 78.336zm384 254.272v-64h448v64h-448z" }) ])); } }), sQ = iQ, lQ = /* @__PURE__ */ W({ name: "Edit", __name: "edit", setup(e) { return (t, n) => (S(), L("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ D("path", { fill: "currentColor", d: "M832 512a32 32 0 1 1 64 0v352a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h352a32 32 0 0 1 0 64H192v640h640z" }), D("path", { fill: "currentColor", d: "m469.952 554.24 52.8-7.552L847.104 222.4a32 32 0 1 0-45.248-45.248L477.44 501.44l-7.552 52.8zm422.4-422.4a96 96 0 0 1 0 135.808l-331.84 331.84a32 32 0 0 1-18.112 9.088L436.8 623.68a32 32 0 0 1-36.224-36.224l15.104-105.6a32 32 0 0 1 9.024-18.112l331.904-331.84a96 96 0 0 1 135.744 0z" }) ])); } }), uQ = lQ, cQ = /* @__PURE__ */ W({ name: "Finished", __name: "finished", setup(e) { return (t, n) => (S(), L("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ D("path", { fill: "currentColor", d: "M280.768 753.728 691.456 167.04a32 32 0 1 1 52.416 36.672L314.24 817.472a32 32 0 0 1-45.44 7.296l-230.4-172.8a32 32 0 0 1 38.4-51.2l203.968 152.96zM736 448a32 32 0 1 1 0-64h192a32 32 0 1 1 0 64zM608 640a32 32 0 0 1 0-64h319.936a32 32 0 1 1 0 64zM480 832a32 32 0 1 1 0-64h447.936a32 32 0 1 1 0 64z" }) ])); } }), dQ = cQ, pQ = /* @__PURE__ */ W({ name: "Hide", __name: "hide", setup(e) { return (t, n) => (S(), L("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ D("path", { fill: "currentColor", d: "M876.8 156.8c0-9.6-3.2-16-9.6-22.4-6.4-6.4-12.8-9.6-22.4-9.6-9.6 0-16 3.2-22.4 9.6L736 220.8c-64-32-137.6-51.2-224-60.8-160 16-288 73.6-377.6 176C44.8 438.4 0 496 0 512s48 73.6 134.4 176c22.4 25.6 44.8 48 73.6 67.2l-86.4 89.6c-6.4 6.4-9.6 12.8-9.6 22.4 0 9.6 3.2 16 9.6 22.4 6.4 6.4 12.8 9.6 22.4 9.6 9.6 0 16-3.2 22.4-9.6l704-710.4c3.2-6.4 6.4-12.8 6.4-22.4Zm-646.4 528c-76.8-70.4-128-128-153.6-172.8 28.8-48 80-105.6 153.6-172.8C304 272 400 230.4 512 224c64 3.2 124.8 19.2 176 44.8l-54.4 54.4C598.4 300.8 560 288 512 288c-64 0-115.2 22.4-160 64s-64 96-64 160c0 48 12.8 89.6 35.2 124.8L256 707.2c-9.6-6.4-19.2-16-25.6-22.4Zm140.8-96c-12.8-22.4-19.2-48-19.2-76.8 0-44.8 16-83.2 48-112 32-28.8 67.2-48 112-48 28.8 0 54.4 6.4 73.6 19.2zM889.599 336c-12.8-16-28.8-28.8-41.6-41.6l-48 48c73.6 67.2 124.8 124.8 150.4 169.6-28.8 48-80 105.6-153.6 172.8-73.6 67.2-172.8 108.8-284.8 115.2-51.2-3.2-99.2-12.8-140.8-28.8l-48 48c57.6 22.4 118.4 38.4 188.8 44.8 160-16 288-73.6 377.6-176C979.199 585.6 1024 528 1024 512s-48.001-73.6-134.401-176Z" }), D("path", { fill: "currentColor", d: "M511.998 672c-12.8 0-25.6-3.2-38.4-6.4l-51.2 51.2c28.8 12.8 57.6 19.2 89.6 19.2 64 0 115.2-22.4 160-64 41.6-41.6 64-96 64-160 0-32-6.4-64-19.2-89.6l-51.2 51.2c3.2 12.8 6.4 25.6 6.4 38.4 0 44.8-16 83.2-48 112-32 28.8-67.2 48-112 48Z" }) ])); } }), lS = pQ, fQ = /* @__PURE__ */ W({ name: "InfoFilled", __name: "info-filled", setup(e) { return (t, n) => (S(), L("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ D("path", { fill: "currentColor", d: "M512 64a448 448 0 1 1 0 896.064A448 448 0 0 1 512 64m67.2 275.072c33.28 0 60.288-23.104 60.288-57.344s-27.072-57.344-60.288-57.344c-33.28 0-60.16 23.104-60.16 57.344s26.88 57.344 60.16 57.344M590.912 699.2c0-6.848 2.368-24.64 1.024-34.752l-52.608 60.544c-10.88 11.456-24.512 19.392-30.912 17.28a12.992 12.992 0 0 1-8.256-14.72l87.68-276.992c7.168-35.136-12.544-67.2-54.336-71.296-44.096 0-108.992 44.736-148.48 101.504 0 6.784-1.28 23.68.064 33.792l52.544-60.608c10.88-11.328 23.552-19.328 29.952-17.152a12.8 12.8 0 0 1 7.808 16.128L388.48 728.576c-10.048 32.256 8.96 63.872 55.04 71.04 67.84 0 107.904-43.648 147.456-100.416z" }) ])); } }), uS = fQ, hQ = /* @__PURE__ */ W({ name: "Loading", __name: "loading", setup(e) { return (t, n) => (S(), L("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ D("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" }) ])); } }), Ei = hQ, vQ = /* @__PURE__ */ W({ name: "Location", __name: "location", setup(e) { return (t, n) => (S(), L("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ D("path", { fill: "currentColor", d: "M800 416a288 288 0 1 0-576 0c0 118.144 94.528 272.128 288 456.576C705.472 688.128 800 534.144 800 416M512 960C277.312 746.688 160 565.312 160 416a352 352 0 0 1 704 0c0 149.312-117.312 330.688-352 544" }), D("path", { fill: "currentColor", d: "M512 512a96 96 0 1 0 0-192 96 96 0 0 0 0 192m0 64a160 160 0 1 1 0-320 160 160 0 0 1 0 320" }) ])); } }), hN = vQ, gQ = /* @__PURE__ */ W({ name: "Lock", __name: "lock", setup(e) { return (t, n) => (S(), L("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ D("path", { fill: "currentColor", d: "M224 448a32 32 0 0 0-32 32v384a32 32 0 0 0 32 32h576a32 32 0 0 0 32-32V480a32 32 0 0 0-32-32zm0-64h576a96 96 0 0 1 96 96v384a96 96 0 0 1-96 96H224a96 96 0 0 1-96-96V480a96 96 0 0 1 96-96" }), D("path", { fill: "currentColor", d: "M512 544a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V576a32 32 0 0 1 32-32m192-160v-64a192 192 0 1 0-384 0v64zM512 64a256 256 0 0 1 256 256v128H256V320A256 256 0 0 1 512 64" }) ])); } }), mQ = gQ, yQ = /* @__PURE__ */ W({ name: "MoreFilled", __name: "more-filled", setup(e) { return (t, n) => (S(), L("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ D("path", { fill: "currentColor", d: "M176 416a112 112 0 1 1 0 224 112 112 0 0 1 0-224m336 0a112 112 0 1 1 0 224 112 112 0 0 1 0-224m336 0a112 112 0 1 1 0 224 112 112 0 0 1 0-224" }) ])); } }), gC = yQ, bQ = /* @__PURE__ */ W({ name: "Search", __name: "search", setup(e) { return (t, n) => (S(), L("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ D("path", { fill: "currentColor", d: "m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704" }) ])); } }), B0 = bQ, wQ = /* @__PURE__ */ W({ name: "Share", __name: "share", setup(e) { return (t, n) => (S(), L("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ D("path", { fill: "currentColor", d: "m679.872 348.8-301.76 188.608a127.808 127.808 0 0 1 5.12 52.16l279.936 104.96a128 128 0 1 1-22.464 59.904l-279.872-104.96a128 128 0 1 1-16.64-166.272l301.696-188.608a128 128 0 1 1 33.92 54.272z" }) ])); } }), xQ = wQ, kQ = /* @__PURE__ */ W({ name: "SuccessFilled", __name: "success-filled", setup(e) { return (t, n) => (S(), L("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ D("path", { fill: "currentColor", d: "M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m-55.808 536.384-99.52-99.584a38.4 38.4 0 1 0-54.336 54.336l126.72 126.72a38.272 38.272 0 0 0 54.336 0l262.4-262.464a38.4 38.4 0 1 0-54.272-54.336z" }) ])); } }), vN = kQ, CQ = /* @__PURE__ */ W({ name: "Unlock", __name: "unlock", setup(e) { return (t, n) => (S(), L("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ D("path", { fill: "currentColor", d: "M224 448a32 32 0 0 0-32 32v384a32 32 0 0 0 32 32h576a32 32 0 0 0 32-32V480a32 32 0 0 0-32-32zm0-64h576a96 96 0 0 1 96 96v384a96 96 0 0 1-96 96H224a96 96 0 0 1-96-96V480a96 96 0 0 1 96-96" }), D("path", { fill: "currentColor", d: "M512 544a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V576a32 32 0 0 1 32-32m178.304-295.296A192.064 192.064 0 0 0 320 320v64h352l96 38.4V448H256V320a256 256 0 0 1 493.76-95.104z" }) ])); } }), _Q = CQ, SQ = /* @__PURE__ */ W({ name: "View", __name: "view", setup(e) { return (t, n) => (S(), L("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ D("path", { fill: "currentColor", d: "M512 160c320 0 512 352 512 352S832 864 512 864 0 512 0 512s192-352 512-352m0 64c-225.28 0-384.128 208.064-436.8 288 52.608 79.872 211.456 288 436.8 288 225.28 0 384.128-208.064 436.8-288-52.608-79.872-211.456-288-436.8-288zm0 64a224 224 0 1 1 0 448 224 224 0 0 1 0-448m0 64a160.192 160.192 0 0 0-160 160c0 88.192 71.744 160 160 160s160-71.808 160-160-71.744-160-160-160" }) ])); } }), z0 = SQ, $Q = /* @__PURE__ */ W({ name: "WarnTriangleFilled", __name: "warn-triangle-filled", setup(e) { return (t, n) => (S(), L("svg", { xmlns: "http://www.w3.org/2000/svg", "xml:space": "preserve", style: { "enable-background": "new 0 0 1024 1024" }, viewBox: "0 0 1024 1024" }, [ D("path", { fill: "currentColor", d: "M928.99 755.83 574.6 203.25c-12.89-20.16-36.76-32.58-62.6-32.58s-49.71 12.43-62.6 32.58L95.01 755.83c-12.91 20.12-12.9 44.91.01 65.03 12.92 20.12 36.78 32.51 62.59 32.49h708.78c25.82.01 49.68-12.37 62.59-32.49 12.91-20.12 12.92-44.91.01-65.03M554.67 768h-85.33v-85.33h85.33zm0-426.67v298.66h-85.33V341.32z" }) ])); } }), EQ = $Q, OQ = /* @__PURE__ */ W({ name: "WarningFilled", __name: "warning-filled", setup(e) { return (t, n) => (S(), L("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ D("path", { fill: "currentColor", d: "M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 192a58.432 58.432 0 0 0-58.24 63.744l23.36 256.384a35.072 35.072 0 0 0 69.76 0l23.296-256.384A58.432 58.432 0 0 0 512 256m0 512a51.2 51.2 0 1 0 0-102.4 51.2 51.2 0 0 0 0 102.4" }) ])); } }), gN = OQ, FQ = /* @__PURE__ */ W({ name: "Warning", __name: "warning", setup(e) { return (t, n) => (S(), L("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ D("path", { fill: "currentColor", d: "M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 832a384 384 0 0 0 0-768 384 384 0 0 0 0 768m48-176a48 48 0 1 1-96 0 48 48 0 0 1 96 0m-48-464a32 32 0 0 1 32 32v288a32 32 0 0 1-64 0V288a32 32 0 0 1 32-32" }) ])); } }), j0 = FQ, TQ = /* @__PURE__ */ W({ name: "ZoomIn", __name: "zoom-in", setup(e) { return (t, n) => (S(), L("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ D("path", { fill: "currentColor", d: "m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704m-32-384v-96a32 32 0 0 1 64 0v96h96a32 32 0 0 1 0 64h-96v96a32 32 0 0 1-64 0v-96h-96a32 32 0 0 1 0-64z" }) ])); } }), AQ = TQ, IQ = /* @__PURE__ */ W({ name: "ZoomOut", __name: "zoom-out", setup(e) { return (t, n) => (S(), L("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ D("path", { fill: "currentColor", d: "m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704M352 448h256a32 32 0 0 1 0 64H352a32 32 0 0 1 0-64" }) ])); } }), PQ = IQ; const mN = "__epPropKey", bt = (e) => e, LQ = (e) => Fr(e) && !!e[mN], V0 = (e, t) => { if (!Fr(e) || LQ(e)) return e; const { values: n, required: r, default: o, type: a, validator: i } = e, l = { type: a, required: !!r, validator: n || i ? (u) => { let c = !1, d = []; if (n && (d = Array.from(n), W5(e, "default") && d.push(o), c || (c = d.includes(u))), i && (c || (c = i(u))), !c && d.length > 0) { const p = [...new Set(d)].map((h) => JSON.stringify(h)).join(", "); k0(`Invalid prop: validation failed${t ? ` for prop "${t}"` : ""}. Expected one of [${p}], got value ${JSON.stringify(u)}.`); } return c; } : void 0, [mN]: !0 }; return W5(e, "default") && (l.default = o), l; }, Vt = (e) => _g(Object.entries(e).map(([t, n]) => [ t, V0(n, t) ])), el = bt([ String, Object, Function ]), yN = { validating: Ei, success: sS, error: $i }, dr = (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; }, RQ = (e, t) => (e.install = (n) => { n.directive(t, e); }, e), To = (e) => (e.install = Tc, e), bN = (...e) => (t) => { e.forEach((n) => { oo(n) ? n(t) : n.value = t; }); }, kr = { 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" }, Vn = "update:modelValue", Fu = "change", mC = "input", wN = ["", "default", "small", "large"], NQ = (e) => /([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(e), jl = (e) => e, MQ = ["class", "style"], DQ = /^on[A-Z]/, xN = (e = {}) => { const { excludeListeners: t = !1, excludeKeys: n } = e, r = E(() => ((n == null ? void 0 : n.value) || []).concat(MQ)), o = st(); return o ? E(() => { var a; return _g(Object.entries((a = o.proxy) == null ? void 0 : a.$attrs).filter(([i]) => !r.value.includes(i) && !(t && DQ.test(i)))); }) : (xr("use-attrs", "getCurrentInstance() returned null. useAttrs() must be called at the top of a setup function"), E(() => ({}))); }, Sp = ({ from: e, replacement: t, scope: n, version: r, ref: o, type: a = "API" }, i) => { he(() => y(i), (s) => { s && xr(n, `[${a}] ${e} is about to be deprecated in version ${r}, please use ${t} instead. For more detail, please visit: ${o} `); }, { immediate: !0 }); }; var BQ = { 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 zQ = (e) => (t, n) => jQ(t, n, y(e)), jQ = (e, t, n) => Hi(n, e, e).replace(/\{(\w+)\}/g, (r, o) => { var a; return `${(a = t == null ? void 0 : t[o]) != null ? a : `{${o}}`}`; }), VQ = (e) => { const t = E(() => y(e).name), n = xn(e) ? e : z(e); return { lang: t, locale: n, t: zQ(e) }; }, kN = Symbol("localeContextKey"), cS = (e) => { const t = e || be(kN, z()); return VQ(E(() => t.value || BQ)); }, Nv = "el", HQ = "is-", Il = (e, t, n, r, o) => { let a = `${e}-${t}`; return n && (a += `-${n}`), r && (a += `__${r}`), o && (a += `--${o}`), a; }, CN = Symbol("namespaceContextKey"), dS = (e) => { const t = e || (st() ? be(CN, z(Nv)) : z(Nv)); return E(() => y(t) || Nv); }, Mt = (e, t) => { const n = dS(t); return { namespace: n, b: (v = "") => Il(n.value, e, v, "", ""), e: (v) => v ? Il(n.value, e, "", v, "") : "", m: (v) => v ? Il(n.value, e, "", "", v) : "", be: (v, m) => v && m ? Il(n.value, e, v, m, "") : "", em: (v, m) => v && m ? Il(n.value, e, "", v, m) : "", bm: (v, m) => v && m ? Il(n.value, e, v, "", m) : "", bem: (v, m, g) => v && m && g ? Il(n.value, e, v, m, g) : "", is: (v, ...m) => { const g = m.length >= 1 ? m[0] : !0; return v && g ? `${HQ}${v}` : ""; }, cssVar: (v) => { const m = {}; for (const g in v) v[g] && (m[`--${n.value}-${g}`] = v[g]); return m; }, cssVarName: (v) => `--${n.value}-${v}`, cssVarBlock: (v) => { const m = {}; for (const g in v) v[g] && (m[`--${n.value}-${e}-${g}`] = v[g]); return m; }, cssVarBlockName: (v) => `--${n.value}-${e}-${v}` }; }, UQ = V0({ type: bt(Boolean), default: null }), qQ = V0({ type: bt(Function) }), KQ = (e) => { const t = `update:${e}`, n = `onUpdate:${e}`, r = [t], o = { [e]: UQ, [n]: qQ }; return { useModelToggle: ({ indicator: i, toggleReason: s, shouldHideWhenRouteChanges: l, shouldProceed: u, onShow: c, onHide: d }) => { const p = st(), { emit: h } = p, f = p.props, v = E(() => oo(f[n])), m = E(() => f[e] === null), g = (_) => { i.value !== !0 && (i.value = !0, s && (s.value = _), oo(c) && c(_)); }, b = (_) => { i.value !== !1 && (i.value = !1, s && (s.value = _), oo(d) && d(_)); }, x = (_) => { if (f.disabled === !0 || oo(u) && !u()) return; const $ = v.value && ur; $ && h(t, !0), (m.value || !$) && g(_); }, w = (_) => { if (f.disabled === !0 || !ur) return; const $ = v.value && ur; $ && h(t, !1), (m.value || !$) && b(_); }, k = (_) => { Qs(_) && (f.disabled && _ ? v.value && h(t, !1) : i.value !== _ && (_ ? g() : b())); }, C = () => { i.value ? w() : x(); }; return he(() => f[e], k), l && p.appContext.config.globalProperties.$route !== void 0 && he(() => ({ ...p.proxy.$route }), () => { l.value && i.value && w(); }), ut(() => { k(f[e]); }), { hide: w, show: x, toggle: C, hasUpdateHandler: v }; }, useModelToggleProps: o, useModelToggleEmits: r }; }, _N = (e) => { const t = st(); return E(() => { var n, r; return (r = (n = t == null ? void 0 : t.proxy) == null ? void 0 : n.$props) == null ? void 0 : r[e]; }); }; var go = "top", aa = "bottom", ia = "right", mo = "left", pS = "auto", Vf = [go, aa, ia, mo], Ic = "start", Gp = "end", GQ = "clippingParents", SN = "viewport", Wd = "popper", WQ = "reference", k3 = Vf.reduce(function(e, t) { return e.concat([t + "-" + Ic, t + "-" + Gp]); }, []), H0 = [].concat(Vf, [pS]).reduce(function(e, t) { return e.concat([t, t + "-" + Ic, t + "-" + Gp]); }, []), YQ = "beforeRead", XQ = "read", ZQ = "afterRead", JQ = "beforeMain", QQ = "main", eee = "afterMain", tee = "beforeWrite", nee = "write", ree = "afterWrite", oee = [YQ, XQ, ZQ, JQ, QQ, eee, tee, nee, ree]; function vi(e) { return e ? (e.nodeName || "").toLowerCase() : null; } function Ha(e) { if (e == null) return window; if (e.toString() !== "[object Window]") { var t = e.ownerDocument; return t && t.defaultView || window; } return e; } function Pc(e) { var t = Ha(e).Element; return e instanceof t || e instanceof Element; } function Qo(e) { var t = Ha(e).HTMLElement; return e instanceof t || e instanceof HTMLElement; } function fS(e) { if (typeof ShadowRoot > "u") return !1; var t = Ha(e).ShadowRoot; return e instanceof t || e instanceof ShadowRoot; } function aee(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]; !Qo(a) || !vi(a) || (Object.assign(a.style, r), Object.keys(o).forEach(function(i) { var s = o[i]; s === !1 ? a.removeAttribute(i) : a.setAttribute(i, s === !0 ? "" : s); })); }); } function iee(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] || {}, i = Object.keys(t.styles.hasOwnProperty(r) ? t.styles[r] : n[r]), s = i.reduce(function(l, u) { return l[u] = "", l; }, {}); !Qo(o) || !vi(o) || (Object.assign(o.style, s), Object.keys(a).forEach(function(l) { o.removeAttribute(l); })); }); }; } var $N = { name: "applyStyles", enabled: !0, phase: "write", fn: aee, effect: iee, requires: ["computeStyles"] }; function li(e) { return e.split("-")[0]; } var Jl = Math.max, Og = Math.min, Lc = Math.round; function Rc(e, t) { t === void 0 && (t = !1); var n = e.getBoundingClientRect(), r = 1, o = 1; if (Qo(e) && t) { var a = e.offsetHeight, i = e.offsetWidth; i > 0 && (r = Lc(n.width) / i || 1), a > 0 && (o = Lc(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 hS(e) { var t = Rc(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 EN(e, t) { var n = t.getRootNode && t.getRootNode(); if (e.contains(t)) return !0; if (n && fS(n)) { var r = t; do { if (r && e.isSameNode(r)) return !0; r = r.parentNode || r.host; } while (r); } return !1; } function es(e) { return Ha(e).getComputedStyle(e); } function see(e) { return ["table", "td", "th"].indexOf(vi(e)) >= 0; } function gl(e) { return ((Pc(e) ? e.ownerDocument : e.document) || window.document).documentElement; } function U0(e) { return vi(e) === "html" ? e : e.assignedSlot || e.parentNode || (fS(e) ? e.host : null) || gl(e); } function C3(e) { return !Qo(e) || es(e).position === "fixed" ? null : e.offsetParent; } function lee(e) { var t = navigator.userAgent.toLowerCase().indexOf("firefox") !== -1, n = navigator.userAgent.indexOf("Trident") !== -1; if (n && Qo(e)) { var r = es(e); if (r.position === "fixed") return null; } var o = U0(e); for (fS(o) && (o = o.host); Qo(o) && ["html", "body"].indexOf(vi(o)) < 0; ) { var a = es(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 Hf(e) { for (var t = Ha(e), n = C3(e); n && see(n) && es(n).position === "static"; ) n = C3(n); return n && (vi(n) === "html" || vi(n) === "body" && es(n).position === "static") ? t : n || lee(e) || t; } function vS(e) { return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y"; } function $p(e, t, n) { return Jl(e, Og(t, n)); } function uee(e, t, n) { var r = $p(e, t, n); return r > n ? n : r; } function ON() { return { top: 0, right: 0, bottom: 0, left: 0 }; } function FN(e) { return Object.assign({}, ON(), e); } function TN(e, t) { return t.reduce(function(n, r) { return n[r] = e, n; }, {}); } var cee = function(e, t) { return e = typeof e == "function" ? e(Object.assign({}, t.rects, { placement: t.placement })) : e, FN(typeof e != "number" ? e : TN(e, Vf)); }; function dee(e) { var t, n = e.state, r = e.name, o = e.options, a = n.elements.arrow, i = n.modifiersData.popperOffsets, s = li(n.placement), l = vS(s), u = [mo, ia].indexOf(s) >= 0, c = u ? "height" : "width"; if (!(!a || !i)) { var d = cee(o.padding, n), p = hS(a), h = l === "y" ? go : mo, f = l === "y" ? aa : ia, v = n.rects.reference[c] + n.rects.reference[l] - i[l] - n.rects.popper[c], m = i[l] - n.rects.reference[l], g = Hf(a), b = g ? l === "y" ? g.clientHeight || 0 : g.clientWidth || 0 : 0, x = v / 2 - m / 2, w = d[h], k = b - p[c] - d[f], C = b / 2 - p[c] / 2 + x, _ = $p(w, C, k), $ = l; n.modifiersData[r] = (t = {}, t[$] = _, t.centerOffset = _ - C, t); } } function pee(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) || !EN(t.elements.popper, o) || (t.elements.arrow = o)); } var fee = { name: "arrow", enabled: !0, phase: "main", fn: dee, effect: pee, requires: ["popperOffsets"], requiresIfExists: ["preventOverflow"] }; function Nc(e) { return e.split("-")[1]; } var hee = { top: "auto", right: "auto", bottom: "auto", left: "auto" }; function vee(e) { var t = e.x, n = e.y, r = window, o = r.devicePixelRatio || 1; return { x: Lc(t * o) / o || 0, y: Lc(n * o) / o || 0 }; } function _3(e) { var t, n = e.popper, r = e.popperRect, o = e.placement, a = e.variation, i = e.offsets, s = e.position, l = e.gpuAcceleration, u = e.adaptive, c = e.roundOffsets, d = e.isFixed, p = i.x, h = p === void 0 ? 0 : p, f = i.y, v = f === void 0 ? 0 : f, m = typeof c == "function" ? c({ x: h, y: v }) : { x: h, y: v }; h = m.x, v = m.y; var g = i.hasOwnProperty("x"), b = i.hasOwnProperty("y"), x = mo, w = go, k = window; if (u) { var C = Hf(n), _ = "clientHeight", $ = "clientWidth"; if (C === Ha(n) && (C = gl(n), es(C).position !== "static" && s === "absolute" && (_ = "scrollHeight", $ = "scrollWidth")), C = C, o === go || (o === mo || o === ia) && a === Gp) { w = aa; var O = d && C === k && k.visualViewport ? k.visualViewport.height : C[_]; v -= O - r.height, v *= l ? 1 : -1; } if (o === mo || (o === go || o === aa) && a === Gp) { x = ia; var F = d && C === k && k.visualViewport ? k.visualViewport.width : C[$]; h -= F - r.width, h *= l ? 1 : -1; } } var A = Object.assign({ position: s }, u && hee), T = c === !0 ? vee({ x: h, y: v }) : { x: h, y: v }; if (h = T.x, v = T.y, l) { var R; return Object.assign({}, A, (R = {}, R[w] = b ? "0" : "", R[x] = g ? "0" : "", R.transform = (k.devicePixelRatio || 1) <= 1 ? "translate(" + h + "px, " + v + "px)" : "translate3d(" + h + "px, " + v + "px, 0)", R)); } return Object.assign({}, A, (t = {}, t[w] = b ? v + "px" : "", t[x] = g ? h + "px" : "", t.transform = "", t)); } function gee(e) { var t = e.state, n = e.options, r = n.gpuAcceleration, o = r === void 0 ? !0 : r, a = n.adaptive, i = a === void 0 ? !0 : a, s = n.roundOffsets, l = s === void 0 ? !0 : s, u = { placement: li(t.placement), variation: Nc(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, _3(Object.assign({}, u, { offsets: t.modifiersData.popperOffsets, position: t.options.strategy, adaptive: i, roundOffsets: l })))), t.modifiersData.arrow != null && (t.styles.arrow = Object.assign({}, t.styles.arrow, _3(Object.assign({}, u, { offsets: t.modifiersData.arrow, position: "absolute", adaptive: !1, roundOffsets: l })))), t.attributes.popper = Object.assign({}, t.attributes.popper, { "data-popper-placement": t.placement }); } var AN = { name: "computeStyles", enabled: !0, phase: "beforeWrite", fn: gee, data: {} }, zh = { passive: !0 }; function mee(e) { var t = e.state, n = e.instance, r = e.options, o = r.scroll, a = o === void 0 ? !0 : o, i = r.resize, s = i === void 0 ? !0 : i, l = Ha(t.elements.popper), u = [].concat(t.scrollParents.reference, t.scrollParents.popper); return a && u.forEach(function(c) { c.addEventListener("scroll", n.update, zh); }), s && l.addEventListener("resize", n.update, zh), function() { a && u.forEach(function(c) { c.removeEventListener("scroll", n.update, zh); }), s && l.removeEventListener("resize", n.update, zh); }; } var IN = { name: "eventListeners", enabled: !0, phase: "write", fn: function() { }, effect: mee, data: {} }, yee = { left: "right", right: "left", bottom: "top", top: "bottom" }; function Mv(e) { return e.replace(/left|right|bottom|top/g, function(t) { return yee[t]; }); } var bee = { start: "end", end: "start" }; function S3(e) { return e.replace(/start|end/g, function(t) { return bee[t]; }); } function gS(e) { var t = Ha(e), n = t.pageXOffset, r = t.pageYOffset; return { scrollLeft: n, scrollTop: r }; } function mS(e) { return Rc(gl(e)).left + gS(e).scrollLeft; } function wee(e) { var t = Ha(e), n = gl(e), r = t.visualViewport, o = n.clientWidth, a = n.clientHeight, i = 0, s = 0; return r && (o = r.width, a = r.height, /^((?!chrome|android).)*safari/i.test(navigator.userAgent) || (i = r.offsetLeft, s = r.offsetTop)), { width: o, height: a, x: i + mS(e), y: s }; } function xee(e) { var t, n = gl(e), r = gS(e), o = (t = e.ownerDocument) == null ? void 0 : t.body, a = Jl(n.scrollWidth, n.clientWidth, o ? o.scrollWidth : 0, o ? o.clientWidth : 0), i = Jl(n.scrollHeight, n.clientHeight, o ? o.scrollHeight : 0, o ? o.clientHeight : 0), s = -r.scrollLeft + mS(e), l = -r.scrollTop; return es(o || n).direction === "rtl" && (s += Jl(n.clientWidth, o ? o.clientWidth : 0) - a), { width: a, height: i, x: s, y: l }; } function yS(e) { var t = es(e), n = t.overflow, r = t.overflowX, o = t.overflowY; return /auto|scroll|overlay|hidden/.test(n + o + r); } function PN(e) { return ["html", "body", "#document"].indexOf(vi(e)) >= 0 ? e.ownerDocument.body : Qo(e) && yS(e) ? e : PN(U0(e)); } function Ep(e, t) { var n; t === void 0 && (t = []); var r = PN(e), o = r === ((n = e.ownerDocument) == null ? void 0 : n.body), a = Ha(r), i = o ? [a].concat(a.visualViewport || [], yS(r) ? r : []) : r, s = t.concat(i); return o ? s : s.concat(Ep(U0(i))); } function yC(e) { return Object.assign({}, e, { left: e.x, top: e.y, right: e.x + e.width, bottom: e.y + e.height }); } function kee(e) { var t = Rc(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 $3(e, t) { return t === SN ? yC(wee(e)) : Pc(t) ? kee(t) : yC(xee(gl(e))); } function Cee(e) { var t = Ep(U0(e)), n = ["absolute", "fixed"].indexOf(es(e).position) >= 0, r = n && Qo(e) ? Hf(e) : e; return Pc(r) ? t.filter(function(o) { return Pc(o) && EN(o, r) && vi(o) !== "body"; }) : []; } function _ee(e, t, n) { var r = t === "clippingParents" ? Cee(e) : [].concat(t), o = [].concat(r, [n]), a = o[0], i = o.reduce(function(s, l) { var u = $3(e, l); return s.top = Jl(u.top, s.top), s.right = Og(u.right, s.right), s.bottom = Og(u.bottom, s.bottom), s.left = Jl(u.left, s.left), s; }, $3(e, a)); return i.width = i.right - i.left, i.height = i.bottom - i.top, i.x = i.left, i.y = i.top, i; } function LN(e) { var t = e.reference, n = e.element, r = e.placement, o = r ? li(r) : null, a = r ? Nc(r) : null, i = t.x + t.width / 2 - n.width / 2, s = t.y + t.height / 2 - n.height / 2, l; switch (o) { case go: l = { x: i, y: t.y - n.height }; break; case aa: l = { x: i, y: t.y + t.height }; break; case ia: l = { x: t.x + t.width, y: s }; break; case mo: l = { x: t.x - n.width, y: s }; break; default: l = { x: t.x, y: t.y }; } var u = o ? vS(o) : null; if (u != null) { var c = u === "y" ? "height" : "width"; switch (a) { case Ic: l[u] = l[u] - (t[c] / 2 - n[c] / 2); break; case Gp: l[u] = l[u] + (t[c] / 2 - n[c] / 2); break; } } return l; } function Wp(e, t) { t === void 0 && (t = {}); var n = t, r = n.placement, o = r === void 0 ? e.placement : r, a = n.boundary, i = a === void 0 ? GQ : a, s = n.rootBoundary, l = s === void 0 ? SN : s, u = n.elementContext, c = u === void 0 ? Wd : u, d = n.altBoundary, p = d === void 0 ? !1 : d, h = n.padding, f = h === void 0 ? 0 : h, v = FN(typeof f != "number" ? f : TN(f, Vf)), m = c === Wd ? WQ : Wd, g = e.rects.popper, b = e.elements[p ? m : c], x = _ee(Pc(b) ? b : b.contextElement || gl(e.elements.popper), i, l), w = Rc(e.elements.reference), k = LN({ reference: w, element: g, strategy: "absolute", placement: o }), C = yC(Object.assign({}, g, k)), _ = c === Wd ? C : w, $ = { top: x.top - _.top + v.top, bottom: _.bottom - x.bottom + v.bottom, left: x.left - _.left + v.left, right: _.right - x.right + v.right }, O = e.modifiersData.offset; if (c === Wd && O) { var F = O[o]; Object.keys($).forEach(function(A) { var T = [ia, aa].indexOf(A) >= 0 ? 1 : -1, R = [go, aa].indexOf(A) >= 0 ? "y" : "x"; $[A] += F[R] * T; }); } return $; } function See(e, t) { t === void 0 && (t = {}); var n = t, r = n.placement, o = n.boundary, a = n.rootBoundary, i = n.padding, s = n.flipVariations, l = n.allowedAutoPlacements, u = l === void 0 ? H0 : l, c = Nc(r), d = c ? s ? k3 : k3.filter(function(f) { return Nc(f) === c; }) : Vf, p = d.filter(function(f) { return u.indexOf(f) >= 0; }); p.length === 0 && (p = d); var h = p.reduce(function(f, v) { return f[v] = Wp(e, { placement: v, boundary: o, rootBoundary: a, padding: i })[li(v)], f; }, {}); return Object.keys(h).sort(function(f, v) { return h[f] - h[v]; }); } function $ee(e) { if (li(e) === pS) return []; var t = Mv(e); return [S3(e), t, S3(t)]; } function Eee(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, i = n.altAxis, s = i === void 0 ? !0 : i, l = n.fallbackPlacements, u = n.padding, c = n.boundary, d = n.rootBoundary, p = n.altBoundary, h = n.flipVariations, f = h === void 0 ? !0 : h, v = n.allowedAutoPlacements, m = t.options.placement, g = li(m), b = g === m, x = l || (b || !f ? [Mv(m)] : $ee(m)), w = [m].concat(x).reduce(function(te, oe) { return te.concat(li(oe) === pS ? See(t, { placement: oe, boundary: c, rootBoundary: d, padding: u, flipVariations: f, allowedAutoPlacements: v }) : oe); }, []), k = t.rects.reference, C = t.rects.popper, _ = /* @__PURE__ */ new Map(), $ = !0, O = w[0], F = 0; F < w.length; F++) { var A = w[F], T = li(A), R = Nc(A) === Ic, M = [go, aa].indexOf(T) >= 0, j = M ? "width" : "height", P = Wp(t, { placement: A, boundary: c, rootBoundary: d, altBoundary: p, padding: u }), V = M ? R ? ia : mo : R ? aa : go; k[j] > C[j] && (V = Mv(V)); var U = Mv(V), G = []; if (a && G.push(P[T] <= 0), s && G.push(P[V] <= 0, P[U] <= 0), G.every(function(te) { return te; })) { O = A, $ = !1; break; } _.set(A, G); } if ($) for (var se = f ? 3 : 1, ae = function(te) { var oe = w.find(function(ne) { var ee = _.get(ne); if (ee) return ee.slice(0, te).every(function(Z) { return Z; }); }); if (oe) return O = oe, "break"; }, de = se; de > 0; de--) { var me = ae(de); if (me === "break") break; } t.placement !== O && (t.modifiersData[r]._skip = !0, t.placement = O, t.reset = !0); } } var Oee = { name: "flip", enabled: !0, phase: "main", fn: Eee, requiresIfExists: ["offset"], data: { _skip: !1 } }; function E3(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 O3(e) { return [go, ia, aa, mo].some(function(t) { return e[t] >= 0; }); } function Fee(e) { var t = e.state, n = e.name, r = t.rects.reference, o = t.rects.popper, a = t.modifiersData.preventOverflow, i = Wp(t, { elementContext: "reference" }), s = Wp(t, { altBoundary: !0 }), l = E3(i, r), u = E3(s, o, a), c = O3(l), d = O3(u); t.modifiersData[n] = { referenceClippingOffsets: l, popperEscapeOffsets: u, isReferenceHidden: c, hasPopperEscaped: d }, t.attributes.popper = Object.assign({}, t.attributes.popper, { "data-popper-reference-hidden": c, "data-popper-escaped": d }); } var Tee = { name: "hide", enabled: !0, phase: "main", requiresIfExists: ["preventOverflow"], fn: Fee }; function Aee(e, t, n) { var r = li(e), o = [mo, go].indexOf(r) >= 0 ? -1 : 1, a = typeof n == "function" ? n(Object.assign({}, t, { placement: e })) : n, i = a[0], s = a[1]; return i = i || 0, s = (s || 0) * o, [mo, ia].indexOf(r) >= 0 ? { x: s, y: i } : { x: i, y: s }; } function Iee(e) { var t = e.state, n = e.options, r = e.name, o = n.offset, a = o === void 0 ? [0, 0] : o, i = H0.reduce(function(c, d) { return c[d] = Aee(d, t.rects, a), c; }, {}), s = i[t.placement], l = s.x, u = s.y; t.modifiersData.popperOffsets != null && (t.modifiersData.popperOffsets.x += l, t.modifiersData.popperOffsets.y += u), t.modifiersData[r] = i; } var Pee = { name: "offset", enabled: !0, phase: "main", requires: ["popperOffsets"], fn: Iee }; function Lee(e) { var t = e.state, n = e.name; t.modifiersData[n] = LN({ reference: t.rects.reference, element: t.rects.popper, strategy: "absolute", placement: t.placement }); } var RN = { name: "popperOffsets", enabled: !0, phase: "read", fn: Lee, data: {} }; function Ree(e) { return e === "x" ? "y" : "x"; } function Nee(e) { var t = e.state, n = e.options, r = e.name, o = n.mainAxis, a = o === void 0 ? !0 : o, i = n.altAxis, s = i === void 0 ? !1 : i, l = n.boundary, u = n.rootBoundary, c = n.altBoundary, d = n.padding, p = n.tether, h = p === void 0 ? !0 : p, f = n.tetherOffset, v = f === void 0 ? 0 : f, m = Wp(t, { boundary: l, rootBoundary: u, padding: d, altBoundary: c }), g = li(t.placement), b = Nc(t.placement), x = !b, w = vS(g), k = Ree(w), C = t.modifiersData.popperOffsets, _ = t.rects.reference, $ = t.rects.popper, O = typeof v == "function" ? v(Object.assign({}, t.rects, { placement: t.placement })) : v, F = typeof O == "number" ? { mainAxis: O, altAxis: O } : Object.assign({ mainAxis: 0, altAxis: 0 }, O), A = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, T = { x: 0, y: 0 }; if (C) { if (a) { var R, M = w === "y" ? go : mo, j = w === "y" ? aa : ia, P = w === "y" ? "height" : "width", V = C[w], U = V + m[M], G = V - m[j], se = h ? -$[P] / 2 : 0, ae = b === Ic ? _[P] : $[P], de = b === Ic ? -$[P] : -_[P], me = t.elements.arrow, te = h && me ? hS(me) : { width: 0, height: 0 }, oe = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : ON(), ne = oe[M], ee = oe[j], Z = $p(0, _[P], te[P]), le = x ? _[P] / 2 - se - Z - ne - F.mainAxis : ae - Z - ne - F.mainAxis, pe = x ? -_[P] / 2 + se + Z + ee + F.mainAxis : de + Z + ee + F.mainAxis, ke = t.elements.arrow && Hf(t.elements.arrow), Ne = ke ? w === "y" ? ke.clientTop || 0 : ke.clientLeft || 0 : 0, De = (R = A == null ? void 0 : A[w]) != null ? R : 0, _e = V + le - De - Ne, Fe = V + pe - De, Ie = $p(h ? Og(U, _e) : U, V, h ? Jl(G, Fe) : G); C[w] = Ie, T[w] = Ie - V; } if (s) { var Ae, qe = w === "x" ? go : mo, et = w === "x" ? aa : ia, He = C[k], ot = k === "y" ? "height" : "width", tt = He + m[qe], Qe = He - m[et], I = [go, mo].indexOf(g) !== -1, Y = (Ae = A == null ? void 0 : A[k]) != null ? Ae : 0, ve = I ? tt : He - _[ot] - $[ot] - Y + F.altAxis, we = I ? He + _[ot] + $[ot] - Y - F.altAxis : Qe, ye = h && I ? uee(ve, He, we) : $p(h ? ve : tt, He, h ? we : Qe); C[k] = ye, T[k] = ye - He; } t.modifiersData[r] = T; } } var Mee = { name: "preventOverflow", enabled: !0, phase: "main", fn: Nee, requiresIfExists: ["offset"] }; function Dee(e) { return { scrollLeft: e.scrollLeft, scrollTop: e.scrollTop }; } function Bee(e) { return e === Ha(e) || !Qo(e) ? gS(e) : Dee(e); } function zee(e) { var t = e.getBoundingClientRect(), n = Lc(t.width) / e.offsetWidth || 1, r = Lc(t.height) / e.offsetHeight || 1; return n !== 1 || r !== 1; } function jee(e, t, n) { n === void 0 && (n = !1); var r = Qo(t), o = Qo(t) && zee(t), a = gl(t), i = Rc(e, o), s = { scrollLeft: 0, scrollTop: 0 }, l = { x: 0, y: 0 }; return (r || !r && !n) && ((vi(t) !== "body" || yS(a)) && (s = Bee(t)), Qo(t) ? (l = Rc(t, !0), l.x += t.clientLeft, l.y += t.clientTop) : a && (l.x = mS(a))), { x: i.left + s.scrollLeft - l.x, y: i.top + s.scrollTop - l.y, width: i.width, height: i.height }; } function Vee(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 i = [].concat(a.requires || [], a.requiresIfExists || []); i.forEach(function(s) { if (!n.has(s)) { var l = t.get(s); l && o(l); } }), r.push(a); } return e.forEach(function(a) { n.has(a.name) || o(a); }), r; } function Hee(e) { var t = Vee(e); return oee.reduce(function(n, r) { return n.concat(t.filter(function(o) { return o.phase === r; })); }, []); } function Uee(e) { var t; return function() { return t || (t = new Promise(function(n) { Promise.resolve().then(function() { t = void 0, n(e()); }); })), t; }; } function qee(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 F3 = { placement: "bottom", modifiers: [], strategy: "absolute" }; function T3() { 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 bS(e) { e === void 0 && (e = {}); var t = e, n = t.defaultModifiers, r = n === void 0 ? [] : n, o = t.defaultOptions, a = o === void 0 ? F3 : o; return function(i, s, l) { l === void 0 && (l = a); var u = { placement: "bottom", orderedModifiers: [], options: Object.assign({}, F3, a), modifiersData: {}, elements: { reference: i, popper: s }, attributes: {}, styles: {} }, c = [], d = !1, p = { state: u, setOptions: function(v) { var m = typeof v == "function" ? v(u.options) : v; f(), u.options = Object.assign({}, a, u.options, m), u.scrollParents = { reference: Pc(i) ? Ep(i) : i.contextElement ? Ep(i.contextElement) : [], popper: Ep(s) }; var g = Hee(qee([].concat(r, u.options.modifiers))); return u.orderedModifiers = g.filter(function(b) { return b.enabled; }), h(), p.update(); }, forceUpdate: function() { if (!d) { var v = u.elements, m = v.reference, g = v.popper; if (T3(m, g)) { u.rects = { reference: jee(m, Hf(g), u.options.strategy === "fixed"), popper: hS(g) }, u.reset = !1, u.placement = u.options.placement, u.orderedModifiers.forEach(function($) { return u.modifiersData[$.name] = Object.assign({}, $.data); }); for (var b = 0; b < u.orderedModifiers.length; b++) { if (u.reset === !0) { u.reset = !1, b = -1; continue; } var x = u.orderedModifiers[b], w = x.fn, k = x.options, C = k === void 0 ? {} : k, _ = x.name; typeof w == "function" && (u = w({ state: u, options: C, name: _, instance: p }) || u); } } } }, update: Uee(function() { return new Promise(function(v) { p.forceUpdate(), v(u); }); }), destroy: function() { f(), d = !0; } }; if (!T3(i, s)) return p; p.setOptions(l).then(function(v) { !d && l.onFirstUpdate && l.onFirstUpdate(v); }); function h() { u.orderedModifiers.forEach(function(v) { var m = v.name, g = v.options, b = g === void 0 ? {} : g, x = v.effect; if (typeof x == "function") { var w = x({ state: u, name: m, instance: p, options: b }), k = function() { }; c.push(w || k); } }); } function f() { c.forEach(function(v) { return v(); }), c = []; } return p; }; } bS(); var Kee = [IN, RN, AN, $N]; bS({ defaultModifiers: Kee }); var Gee = [IN, RN, AN, $N, Pee, Oee, Mee, fee, Tee], Wee = bS({ defaultModifiers: Gee }); const Yee = (e, t, n = {}) => { const r = { name: "updateState", enabled: !0, phase: "write", fn: ({ state: l }) => { const u = Xee(l); Object.assign(i.value, u); }, requires: ["computeStyles"] }, o = E(() => { const { onFirstUpdate: l, placement: u, strategy: c, modifiers: d } = y(n); return { onFirstUpdate: l, placement: u || "bottom", strategy: c || "absolute", modifiers: [ ...d || [], r, { name: "applyStyles", enabled: !1 } ] }; }), a = En(), i = z({ styles: { popper: { position: y(o).strategy, left: "0", top: "0" }, arrow: { position: "absolute" } }, attributes: {} }), s = () => { a.value && (a.value.destroy(), a.value = void 0); }; return he(o, (l) => { const u = y(a); u && u.setOptions(l); }, { deep: !0 }), he([e, t], ([l, u]) => { s(), !(!l || !u) && (a.value = Wee(l, u, y(o))); }), Tt(() => { s(); }), { state: E(() => { var l; return { ...((l = y(a)) == null ? void 0 : l.state) || {} }; }), styles: E(() => y(i).styles), attributes: E(() => y(i).attributes), update: () => { var l; return (l = y(a)) == null ? void 0 : l.update(); }, forceUpdate: () => { var l; return (l = y(a)) == null ? void 0 : l.forceUpdate(); }, instanceRef: E(() => y(a)) }; }; function Xee(e) { const t = Object.keys(e.elements), n = _g(t.map((o) => [o, e.styles[o] || {}])), r = _g(t.map((o) => [o, e.attributes[o]])); return { styles: n, attributes: r }; } function A3() { let e; const t = (r, o) => { n(), e = window.setTimeout(r, o); }, n = () => window.clearTimeout(e); return I0(() => n()), { registerTimeout: t, cancelTimeout: n }; } const bC = { prefix: Math.floor(Math.random() * 1e4), current: 0 }, Zee = Symbol("elIdInjection"), wS = () => st() ? be(Zee, bC) : bC, ml = (e) => { const t = wS(); !ur && t === bC && xr("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 = dS(); return E(() => y(e) || `${n.value}-id-${t.prefix}-${t.current++}`); }; let hc = []; const I3 = (e) => { const t = e; t.key === kr.esc && hc.forEach((n) => n(t)); }, Jee = (e) => { ut(() => { hc.length === 0 && document.addEventListener("keydown", I3), ur && hc.push(e); }), Tt(() => { hc = hc.filter((t) => t !== e), hc.length === 0 && ur && document.removeEventListener("keydown", I3); }); }; let P3; const NN = () => { const e = dS(), t = wS(), n = E(() => `${e.value}-popper-container-${t.prefix}`), r = E(() => `#${n.value}`); return { id: n, selector: r }; }, Qee = (e) => { const t = document.createElement("div"); return t.id = e, document.body.appendChild(t), t; }, ete = () => { const { id: e, selector: t } = NN(); return C0(() => { ur && (process.env.NODE_ENV === "test" || !P3 || !document.body.querySelector(t.value)) && (P3 = Qee(e.value)); }), { id: e, selector: t }; }, tte = Vt({ showAfter: { type: Number, default: 0 }, hideAfter: { type: Number, default: 200 }, autoClose: { type: Number, default: 0 } }), nte = ({ showAfter: e, hideAfter: t, autoClose: n, open: r, close: o }) => { const { registerTimeout: a } = A3(), { registerTimeout: i, cancelTimeout: s } = A3(); return { onOpen: (c) => { a(() => { r(c); const d = y(n); Zn(d) && d > 0 && i(() => { o(c); }, d); }, y(e)); }, onClose: (c) => { s(), a(() => { o(c); }, y(t)); } }; }, MN = Symbol("elForwardRef"), rte = (e) => { nt(MN, { setForwardRef: (n) => { e.value = n; } }); }, ote = (e) => ({ mounted(t) { e(t); }, updated(t) { e(t); }, unmounted() { e(null); } }), L3 = { current: 0 }, R3 = z(0), DN = 2e3, N3 = Symbol("elZIndexContextKey"), BN = Symbol("zIndexContextKey"), zN = (e) => { const t = st() ? be(N3, L3) : L3, n = e || (st() ? be(BN, void 0) : void 0), r = E(() => { const i = y(n); return Zn(i) ? i : DN; }), o = E(() => r.value + R3.value), a = () => (t.current++, R3.value = t.current, o.value); return !ur && !be(N3) && xr("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 ate(e) { let t; function n() { if (e.value == null) return; const { selectionStart: o, selectionEnd: a, value: i } = e.value; if (o == null || a == null) return; const s = i.slice(0, Math.max(0, o)), l = i.slice(Math.max(0, a)); t = { selectionStart: o, selectionEnd: a, value: i, beforeTxt: s, afterTxt: l }; } function r() { if (e.value == null || t == null) return; const { value: o } = e.value, { beforeTxt: a, afterTxt: i, selectionStart: s } = t; if (a == null || i == null || s == null) return; let l = o.length; if (o.endsWith(i)) l = o.length - i.length; else if (o.startsWith(a)) l = a.length; else { const u = a[s - 1], c = o.indexOf(u, s - 1); c !== -1 && (l = c + 1); } e.value.setSelectionRange(l, l); } return [n, r]; } const Tu = V0({ type: String, values: wN, required: !1 }), jN = Symbol("size"), ite = () => { const e = be(jN, {}); return E(() => y(e.size) || ""); }; function VN(e, { beforeFocus: t, afterFocus: n, beforeBlur: r, afterBlur: o } = {}) { const a = st(), { emit: i } = a, s = En(), l = z(!1), u = (p) => { oo(t) && t(p) || l.value || (l.value = !0, i("focus", p), n == null || n()); }, c = (p) => { var h; oo(r) && r(p) || p.relatedTarget && ((h = s.value) != null && h.contains(p.relatedTarget)) || (l.value = !1, i("blur", p), o == null || o()); }, d = () => { var p, h; (p = s.value) != null && p.contains(document.activeElement) && s.value !== document.activeElement || (h = e.value) == null || h.focus(); }; return he(s, (p) => { p && p.setAttribute("tabindex", "-1"); }), Xo(s, "focus", u, !0), Xo(s, "blur", c, !0), Xo(s, "click", d, !0), process.env.NODE_ENV === "test" && ut(() => { const p = Zl(e.value) ? e.value : document.querySelector("input,textarea"); p && (Xo(p, "focus", u, !0), Xo(p, "blur", c, !0)); }), { isFocused: l, wrapperRef: s, handleFocus: u, handleBlur: c }; } function HN({ afterComposition: e, emit: t }) { const n = z(!1), r = (s) => { t == null || t("compositionstart", s), n.value = !0; }, o = (s) => { var l; t == null || t("compositionupdate", s); const u = (l = s.target) == null ? void 0 : l.value, c = u[u.length - 1] || ""; n.value = !NQ(c); }, a = (s) => { t == null || t("compositionend", s), n.value && (n.value = !1, Ke(() => e(s))); }; return { isComposing: n, handleComposition: (s) => { s.type === "compositionend" ? a(s) : o(s); }, handleCompositionStart: r, handleCompositionUpdate: o, handleCompositionEnd: a }; } const UN = Symbol("emptyValuesContextKey"), ste = "use-empty-values", lte = ["", void 0, null], ute = void 0, cte = Vt({ emptyValues: Array, valueOnClear: { type: [String, Number, Boolean, Function], default: void 0, validator: (e) => oo(e) ? !e() : !e } }), dte = (e, t) => { const n = st() ? be(UN, z({})) : z({}), r = E(() => e.emptyValues || n.value.emptyValues || lte), o = E(() => oo(e.valueOnClear) ? e.valueOnClear() : e.valueOnClear !== void 0 ? e.valueOnClear : oo(n.value.valueOnClear) ? n.value.valueOnClear() : n.value.valueOnClear !== void 0 ? n.value.valueOnClear : ute), a = (i) => r.value.includes(i); return r.value.includes(o.value) || xr(ste, "value-on-clear should be a value of empty-values"), { emptyValues: r, valueOnClear: o, isEmptyValue: a }; }, pte = Vt({ ariaLabel: String, ariaOrientation: { type: String, values: ["horizontal", "vertical", "undefined"] }, ariaControls: String }), ds = (e) => lN(pte, e), qN = Symbol(), Fg = z(); function xS(e, t = void 0) { const n = st() ? be(qN, Fg) : Fg; return e ? E(() => { var r, o; return (o = (r = n.value) == null ? void 0 : r[e]) != null ? o : t; }) : n; } function fte(e, t) { const n = xS(), r = Mt(e, E(() => { var s; return ((s = n.value) == null ? void 0 : s.namespace) || Nv; })), o = cS(E(() => { var s; return (s = n.value) == null ? void 0 : s.locale; })), a = zN(E(() => { var s; return ((s = n.value) == null ? void 0 : s.zIndex) || DN; })), i = E(() => { var s; return y(t) || ((s = n.value) == null ? void 0 : s.size) || ""; }); return hte(E(() => y(n) || {})), { ns: r, locale: o, zIndex: a, size: i }; } const hte = (e, t, n = !1) => { var r; const o = !!st(), a = o ? xS() : void 0, i = (r = void 0) != null ? r : o ? nt : void 0; if (!i) { xr("provideGlobalConfig", "provideGlobalConfig() can only be used inside setup()."); return; } const s = E(() => { const l = y(e); return a != null && a.value ? vte(a.value, l) : l; }); return i(qN, s), i(kN, E(() => s.value.locale)), i(CN, E(() => s.value.namespace)), i(BN, E(() => s.value.zIndex)), i(jN, { size: E(() => s.value.size || "") }), i(UN, E(() => ({ emptyValues: s.value.emptyValues, valueOnClear: s.value.valueOnClear }))), (n || !Fg.value) && (Fg.value = s.value), s; }, vte = (e, t) => { const n = [.../* @__PURE__ */ new Set([...w3(e), ...w3(t)])], r = {}; for (const o of n) r[o] = t[o] !== void 0 ? t[o] : e[o]; return r; }; var Ot = (e, t) => { const n = e.__vccOpts || e; for (const [r, o] of t) n[r] = o; return n; }; const gte = Vt({ size: { type: bt([Number, String]) }, color: { type: String } }), mte = W({ name: "ElIcon", inheritAttrs: !1 }), yte = /* @__PURE__ */ W({ ...mte, props: gte, setup(e) { const t = e, n = Mt("icon"), r = E(() => { const { size: o, color: a } = t; return !o && !a ? {} : { fontSize: js(o) ? void 0 : Kp(o), "--color": a }; }); return (o, a) => (S(), L("i", Et({ class: y(n).b(), style: y(r) }, o.$attrs), [ ue(o.$slots, "default") ], 16)); } }); var bte = /* @__PURE__ */ Ot(yte, [["__file", "icon.vue"]]); const Er = dr(bte), kS = Symbol("formContextKey"), Tg = Symbol("formItemContextKey"), tl = (e, t = {}) => { const n = z(void 0), r = t.prop ? n : _N("size"), o = t.global ? n : ite(), a = t.form ? { size: void 0 } : be(kS, void 0), i = t.formItem ? { size: void 0 } : be(Tg, void 0); return E(() => r.value || y(e) || (i == null ? void 0 : i.size) || (a == null ? void 0 : a.size) || o.value || ""); }, dd = (e) => { const t = _N("disabled"), n = be(kS, void 0); return E(() => t.value || y(e) || (n == null ? void 0 : n.disabled) || !1); }, Au = () => { const e = be(kS, void 0), t = be(Tg, void 0); return { form: e, formItem: t }; }, Uf = (e, { formItemContext: t, disableIdGeneration: n, disableIdManagement: r }) => { n || (n = z(!1)), r || (r = z(!1)); const o = z(); let a; const i = E(() => { var s; return !!(!(e.label || e.ariaLabel) && t && t.inputIds && ((s = t.inputIds) == null ? void 0 : s.length) <= 1); }); return ut(() => { a = he([St(e, "id"), n], ([s, l]) => { const u = s ?? (l ? void 0 : ml().value); u !== o.value && (t != null && t.removeInputId && (o.value && t.removeInputId(o.value), !(r != null && r.value) && !l && u && t.addInputId(u)), o.value = u); }, { immediate: !0 }); }), W_(() => { a && a(), t != null && t.removeInputId && o.value && t.removeInputId(o.value); }), { isLabeledByFormItem: i, inputId: o }; }; let ka; const wte = ` height:0 !important; visibility:hidden !important; ${MW() ? "" : "overflow:hidden !important;"} position:absolute !important; z-index:-1000 !important; top:0 !important; right:0 !important; `, xte = [ "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 kte(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: xte.map((i) => `${i}:${t.getPropertyValue(i)}`).join(";"), paddingSize: r, borderSize: o, boxSizing: n }; } function M3(e, t = 1, n) { var r; ka || (ka = document.createElement("textarea"), document.body.appendChild(ka)); const { paddingSize: o, borderSize: a, boxSizing: i, contextStyle: s } = kte(e); ka.setAttribute("style", `${s};${wte}`), ka.value = e.value || e.placeholder || ""; let l = ka.scrollHeight; const u = {}; i === "border-box" ? l = l + a : i === "content-box" && (l = l - o), ka.value = ""; const c = ka.scrollHeight - o; if (Zn(t)) { let d = c * t; i === "border-box" && (d = d + o + a), l = Math.max(d, l), u.minHeight = `${d}px`; } if (Zn(n)) { let d = c * n; i === "border-box" && (d = d + o + a), l = Math.min(d, l); } return u.height = `${l}px`, (r = ka.parentNode) == null || r.removeChild(ka), ka = void 0, u; } const Cte = Vt({ id: { type: String, default: void 0 }, size: Tu, disabled: Boolean, modelValue: { type: bt([ 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: bt([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: el }, prefixIcon: { type: el }, containerRole: { type: String, default: void 0 }, tabindex: { type: [String, Number], default: 0 }, validateEvent: { type: Boolean, default: !0 }, inputStyle: { type: bt([Object, Array, String]), default: () => jl({}) }, autofocus: Boolean, rows: { type: Number, default: 2 }, ...ds(["ariaLabel"]) }), _te = { [Vn]: (e) => wr(e), input: (e) => wr(e), change: (e) => wr(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 }, Ste = W({ name: "ElInput", inheritAttrs: !1 }), $te = /* @__PURE__ */ W({ ...Ste, props: Cte, emits: _te, setup(e, { expose: t, emit: n }) { const r = e, o = Rf(), a = Dr(), i = E(() => { const Y = {}; return r.containerRole === "combobox" && (Y["aria-haspopup"] = o["aria-haspopup"], Y["aria-owns"] = o["aria-owns"], Y["aria-expanded"] = o["aria-expanded"]), Y; }), s = E(() => [ r.type === "textarea" ? m.b() : v.b(), v.m(h.value), v.is("disabled", f.value), v.is("exceed", me.value), { [v.b("group")]: a.prepend || a.append, [v.m("prefix")]: a.prefix || r.prefixIcon, [v.m("suffix")]: a.suffix || r.suffixIcon || r.clearable || r.showPassword, [v.bm("suffix", "password-clear")]: G.value && se.value, [v.b("hidden")]: r.type === "hidden" }, o.class ]), l = E(() => [ v.e("wrapper"), v.is("focus", O.value) ]), u = xN({ excludeKeys: E(() => Object.keys(i.value)) }), { form: c, formItem: d } = Au(), { inputId: p } = Uf(r, { formItemContext: d }), h = tl(), f = dd(), v = Mt("input"), m = Mt("textarea"), g = En(), b = En(), x = z(!1), w = z(!1), k = z(), C = En(r.inputStyle), _ = E(() => g.value || b.value), { wrapperRef: $, isFocused: O, handleFocus: F, handleBlur: A } = VN(_, { beforeFocus() { return f.value; }, afterBlur() { var Y; r.validateEvent && ((Y = d == null ? void 0 : d.validate) == null || Y.call(d, "blur").catch((ve) => xr(ve))); } }), T = E(() => { var Y; return (Y = c == null ? void 0 : c.statusIcon) != null ? Y : !1; }), R = E(() => (d == null ? void 0 : d.validateState) || ""), M = E(() => R.value && yN[R.value]), j = E(() => w.value ? z0 : lS), P = E(() => [ o.style ]), V = E(() => [ r.inputStyle, C.value, { resize: r.resize } ]), U = E(() => zf(r.modelValue) ? "" : String(r.modelValue)), G = E(() => r.clearable && !f.value && !r.readonly && !!U.value && (O.value || x.value)), se = E(() => r.showPassword && !f.value && !r.readonly && !!U.value && (!!U.value || O.value)), ae = E(() => r.showWordLimit && !!r.maxlength && (r.type === "text" || r.type === "textarea") && !f.value && !r.readonly && !r.showPassword), de = E(() => U.value.length), me = E(() => !!ae.value && de.value > Number(r.maxlength)), te = E(() => !!a.suffix || !!r.suffixIcon || G.value || r.showPassword || ae.value || !!R.value && T.value), [oe, ne] = ate(g); ji(b, (Y) => { if (le(), !ae.value || r.resize !== "both") return; const ve = Y[0], { width: we } = ve.contentRect; k.value = { right: `calc(100% - ${we + 15 + 6}px)` }; }); const ee = () => { const { type: Y, autosize: ve } = r; if (!(!ur || Y !== "textarea" || !b.value)) if (ve) { const we = Fr(ve) ? ve.minRows : void 0, ye = Fr(ve) ? ve.maxRows : void 0, Pe = M3(b.value, we, ye); C.value = { overflowY: "hidden", ...Pe }, Ke(() => { b.value.offsetHeight, C.value = Pe; }); } else C.value = { minHeight: M3(b.value).minHeight }; }, le = ((Y) => { let ve = !1; return () => { var we; if (ve || !r.autosize) return; ((we = b.value) == null ? void 0 : we.offsetParent) === null || (Y(), ve = !0); }; })(ee), pe = () => { const Y = _.value, ve = r.formatter ? r.formatter(U.value) : U.value; !Y || Y.value === ve || (Y.value = ve); }, ke = async (Y) => { oe(); let { value: ve } = Y.target; if (r.formatter && (ve = r.parser ? r.parser(ve) : ve), !De.value) { if (ve === U.value) { pe(); return; } n(Vn, ve), n("input", ve), await Ke(), pe(), ne(); } }, Ne = (Y) => { n("change", Y.target.value); }, { isComposing: De, handleCompositionStart: _e, handleCompositionUpdate: Fe, handleCompositionEnd: Ie } = HN({ emit: n, afterComposition: ke }), Ae = () => { w.value = !w.value, qe(); }, qe = async () => { var Y; await Ke(), (Y = _.value) == null || Y.focus(); }, et = () => { var Y; return (Y = _.value) == null ? void 0 : Y.blur(); }, He = (Y) => { x.value = !1, n("mouseleave", Y); }, ot = (Y) => { x.value = !0, n("mouseenter", Y); }, tt = (Y) => { n("keydown", Y); }, Qe = () => { var Y; (Y = _.value) == null || Y.select(); }, I = () => { n(Vn, ""), n("change", ""), n("clear"), n("input", ""); }; return he(() => r.modelValue, () => { var Y; Ke(() => ee()), r.validateEvent && ((Y = d == null ? void 0 : d.validate) == null || Y.call(d, "change").catch((ve) => xr(ve))); }), he(U, () => pe()), he(() => r.type, async () => { await Ke(), pe(), ee(); }), ut(() => { !r.formatter && r.parser && xr("ElInput", "If you set the parser, you also need to set the formatter."), pe(), Ke(ee); }), t({ input: g, textarea: b, ref: _, textareaStyle: V, autosize: St(r, "autosize"), isComposing: De, focus: qe, blur: et, select: Qe, clear: I, resizeTextarea: ee }), (Y, ve) => (S(), L("div", Et(y(i), { class: [ y(s), { [y(v).bm("group", "append")]: Y.$slots.append, [y(v).bm("group", "prepend")]: Y.$slots.prepend } ], style: y(P), role: Y.containerRole, onMouseenter: ot, onMouseleave: He }), [ J(" input "), Y.type !== "textarea" ? (S(), L(Re, { key: 0 }, [ J(" prepend slot "), Y.$slots.prepend ? (S(), L("div", { key: 0, class: H(y(v).be("group", "prepend")) }, [ ue(Y.$slots, "prepend") ], 2)) : J("v-if", !0), D("div", { ref_key: "wrapperRef", ref: $, class: H(y(l)) }, [ J(" prefix slot "), Y.$slots.prefix || Y.prefixIcon ? (S(), L("span", { key: 0, class: H(y(v).e("prefix")) }, [ D("span", { class: H(y(v).e("prefix-inner")) }, [ ue(Y.$slots, "prefix"), Y.prefixIcon ? (S(), re(y(Er), { key: 0, class: H(y(v).e("icon")) }, { default: N(() => [ (S(), re(yt(Y.prefixIcon))) ]), _: 1 }, 8, ["class"])) : J("v-if", !0) ], 2) ], 2)) : J("v-if", !0), D("input", Et({ id: y(p), ref_key: "input", ref: g, class: y(v).e("inner") }, y(u), { minlength: Y.minlength, maxlength: Y.maxlength, type: Y.showPassword ? w.value ? "text" : "password" : Y.type, disabled: y(f), readonly: Y.readonly, autocomplete: Y.autocomplete, tabindex: Y.tabindex, "aria-label": Y.ariaLabel, placeholder: Y.placeholder, style: Y.inputStyle, form: Y.form, autofocus: Y.autofocus, onCompositionstart: y(_e), onCompositionupdate: y(Fe), onCompositionend: y(Ie), onInput: ke, onChange: Ne, onKeydown: tt }), null, 16, ["id", "minlength", "maxlength", "type", "disabled", "readonly", "autocomplete", "tabindex", "aria-label", "placeholder", "form", "autofocus", "onCompositionstart", "onCompositionupdate", "onCompositionend"]), J(" suffix slot "), y(te) ? (S(), L("span", { key: 1, class: H(y(v).e("suffix")) }, [ D("span", { class: H(y(v).e("suffix-inner")) }, [ !y(G) || !y(se) || !y(ae) ? (S(), L(Re, { key: 0 }, [ ue(Y.$slots, "suffix"), Y.suffixIcon ? (S(), re(y(Er), { key: 0, class: H(y(v).e("icon")) }, { default: N(() => [ (S(), re(yt(Y.suffixIcon))) ]), _: 1 }, 8, ["class"])) : J("v-if", !0) ], 64)) : J("v-if", !0), y(G) ? (S(), re(y(Er), { key: 1, class: H([y(v).e("icon"), y(v).e("clear")]), onMousedown: Ge(y(Tc), ["prevent"]), onClick: I }, { default: N(() => [ q(y($i)) ]), _: 1 }, 8, ["class", "onMousedown"])) : J("v-if", !0), y(se) ? (S(), re(y(Er), { key: 2, class: H([y(v).e("icon"), y(v).e("password")]), onClick: Ae }, { default: N(() => [ (S(), re(yt(y(j)))) ]), _: 1 }, 8, ["class"])) : J("v-if", !0), y(ae) ? (S(), L("span", { key: 3, class: H(y(v).e("count")) }, [ D("span", { class: H(y(v).e("count-inner")) }, ge(y(de)) + " / " + ge(Y.maxlength), 3) ], 2)) : J("v-if", !0), y(R) && y(M) && y(T) ? (S(), re(y(Er), { key: 4, class: H([ y(v).e("icon"), y(v).e("validateIcon"), y(v).is("loading", y(R) === "validating") ]) }, { default: N(() => [ (S(), re(yt(y(M)))) ]), _: 1 }, 8, ["class"])) : J("v-if", !0) ], 2) ], 2)) : J("v-if", !0) ], 2), J(" append slot "), Y.$slots.append ? (S(), L("div", { key: 1, class: H(y(v).be("group", "append")) }, [ ue(Y.$slots, "append") ], 2)) : J("v-if", !0) ], 64)) : (S(), L(Re, { key: 1 }, [ J(" textarea "), D("textarea", Et({ id: y(p), ref_key: "textarea", ref: b, class: [y(m).e("inner"), y(v).is("focus", y(O))] }, y(u), { minlength: Y.minlength, maxlength: Y.maxlength, tabindex: Y.tabindex, disabled: y(f), readonly: Y.readonly, autocomplete: Y.autocomplete, style: y(V), "aria-label": Y.ariaLabel, placeholder: Y.placeholder, form: Y.form, autofocus: Y.autofocus, rows: Y.rows, onCompositionstart: y(_e), onCompositionupdate: y(Fe), onCompositionend: y(Ie), onInput: ke, onFocus: y(F), onBlur: y(A), onChange: Ne, onKeydown: tt }), null, 16, ["id", "minlength", "maxlength", "tabindex", "disabled", "readonly", "autocomplete", "aria-label", "placeholder", "form", "autofocus", "rows", "onCompositionstart", "onCompositionupdate", "onCompositionend", "onFocus", "onBlur"]), y(ae) ? (S(), L("span", { key: 0, style: Ye(k.value), class: H(y(v).e("count")) }, ge(y(de)) + " / " + ge(Y.maxlength), 7)) : J("v-if", !0) ], 64)) ], 16, ["role"])); } }); var Ete = /* @__PURE__ */ Ot($te, [["__file", "input.vue"]]); const q0 = dr(Ete), Qu = 4, Ote = { 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" } }, Fte = ({ move: e, size: t, bar: n }) => ({ [n.size]: t, transform: `translate${n.axis}(${e}%)` }), CS = Symbol("scrollbarContextKey"), Tte = Vt({ vertical: Boolean, size: String, move: Number, ratio: { type: Number, required: !0 }, always: Boolean }), Ate = "Thumb", Ite = /* @__PURE__ */ W({ __name: "thumb", props: Tte, setup(e) { const t = e, n = be(CS), r = Mt("scrollbar"); n || cN(Ate, "can not inject scrollbar context"); const o = z(), a = z(), i = z({}), s = z(!1); let l = !1, u = !1, c = ur ? document.onselectstart : null; const d = E(() => Ote[t.vertical ? "vertical" : "horizontal"]), p = E(() => Fte({ size: t.size, move: t.move, bar: d.value })), h = E(() => o.value[d.value.offset] ** 2 / n.wrapElement[d.value.scrollSize] / t.ratio / a.value[d.value.offset]), f = (C) => { var _; if (C.stopPropagation(), C.ctrlKey || [1, 2].includes(C.button)) return; (_ = window.getSelection()) == null || _.removeAllRanges(), m(C); const $ = C.currentTarget; $ && (i.value[d.value.axis] = $[d.value.offset] - (C[d.value.client] - $.getBoundingClientRect()[d.value.direction])); }, v = (C) => { if (!a.value || !o.value || !n.wrapElement) return; const _ = Math.abs(C.target.getBoundingClientRect()[d.value.direction] - C[d.value.client]), $ = a.value[d.value.offset] / 2, O = (_ - $) * 100 * h.value / o.value[d.value.offset]; n.wrapElement[d.value.scroll] = O * n.wrapElement[d.value.scrollSize] / 100; }, m = (C) => { C.stopImmediatePropagation(), l = !0, document.addEventListener("mousemove", g), document.addEventListener("mouseup", b), c = document.onselectstart, document.onselectstart = () => !1; }, g = (C) => { if (!o.value || !a.value || l === !1) return; const _ = i.value[d.value.axis]; if (!_) return; const $ = (o.value.getBoundingClientRect()[d.value.direction] - C[d.value.client]) * -1, O = a.value[d.value.offset] - _, F = ($ - O) * 100 * h.value / o.value[d.value.offset]; n.wrapElement[d.value.scroll] = F * n.wrapElement[d.value.scrollSize] / 100; }, b = () => { l = !1, i.value[d.value.axis] = 0, document.removeEventListener("mousemove", g), document.removeEventListener("mouseup", b), k(), u && (s.value = !1); }, x = () => { u = !1, s.value = !!t.size; }, w = () => { u = !0, s.value = l; }; Tt(() => { k(), document.removeEventListener("mouseup", b); }); const k = () => { document.onselectstart !== c && (document.onselectstart = c); }; return Xo(St(n, "scrollbarElement"), "mousemove", x), Xo(St(n, "scrollbarElement"), "mouseleave", w), (C, _) => (S(), re(nr, { name: y(r).b("fade"), persisted: "" }, { default: N(() => [ Be(D("div", { ref_key: "instance", ref: o, class: H([y(r).e("bar"), y(r).is(y(d).key)]), onMousedown: v }, [ D("div", { ref_key: "thumb", ref: a, class: H(y(r).e("thumb")), style: Ye(y(p)), onMousedown: f }, null, 38) ], 34), [ [ht, C.always || s.value] ]) ]), _: 1 }, 8, ["name"])); } }); var D3 = /* @__PURE__ */ Ot(Ite, [["__file", "thumb.vue"]]); const Pte = Vt({ always: { type: Boolean, default: !0 }, minSize: { type: Number, required: !0 } }), Lte = /* @__PURE__ */ W({ __name: "bar", props: Pte, setup(e, { expose: t }) { const n = e, r = be(CS), o = z(0), a = z(0), i = z(""), s = z(""), l = z(1), u = z(1); return t({ handleScroll: (p) => { if (p) { const h = p.offsetHeight - Qu, f = p.offsetWidth - Qu; a.value = p.scrollTop * 100 / h * l.value, o.value = p.scrollLeft * 100 / f * u.value; } }, update: () => { const p = r == null ? void 0 : r.wrapElement; if (!p) return; const h = p.offsetHeight - Qu, f = p.offsetWidth - Qu, v = h ** 2 / p.scrollHeight, m = f ** 2 / p.scrollWidth, g = Math.max(v, n.minSize), b = Math.max(m, n.minSize); l.value = v / (h - v) / (g / (h - g)), u.value = m / (f - m) / (b / (f - b)), s.value = g + Qu < h ? `${g}px` : "", i.value = b + Qu < f ? `${b}px` : ""; } }), (p, h) => (S(), L(Re, null, [ q(D3, { move: o.value, ratio: u.value, size: i.value, always: p.always }, null, 8, ["move", "ratio", "size", "always"]), q(D3, { move: a.value, ratio: l.value, size: s.value, vertical: "", always: p.always }, null, 8, ["move", "ratio", "size", "always"]) ], 64)); } }); var Rte = /* @__PURE__ */ Ot(Lte, [["__file", "bar.vue"]]); const Nte = Vt({ height: { type: [String, Number], default: "" }, maxHeight: { type: [String, Number], default: "" }, native: { type: Boolean, default: !1 }, wrapStyle: { type: bt([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, ...ds(["ariaLabel", "ariaOrientation"]) }), Mte = { scroll: ({ scrollTop: e, scrollLeft: t }) => [e, t].every(Zn) }, wC = "ElScrollbar", Dte = W({ name: wC }), Bte = /* @__PURE__ */ W({ ...Dte, props: Nte, emits: Mte, setup(e, { expose: t, emit: n }) { const r = e, o = Mt("scrollbar"); let a, i, s = 0, l = 0; const u = z(), c = z(), d = z(), p = z(), h = E(() => { const k = {}; return r.height && (k.height = Kp(r.height)), r.maxHeight && (k.maxHeight = Kp(r.maxHeight)), [r.wrapStyle, k]; }), f = E(() => [ r.wrapClass, o.e("wrap"), { [o.em("wrap", "hidden-default")]: !r.native } ]), v = E(() => [o.e("view"), r.viewClass]), m = () => { var k; c.value && ((k = p.value) == null || k.handleScroll(c.value), s = c.value.scrollTop, l = c.value.scrollLeft, n("scroll", { scrollTop: c.value.scrollTop, scrollLeft: c.value.scrollLeft })); }; function g(k, C) { Fr(k) ? c.value.scrollTo(k) : Zn(k) && Zn(C) && c.value.scrollTo(k, C); } const b = (k) => { if (!Zn(k)) { xr(wC, "value must be a number"); return; } c.value.scrollTop = k; }, x = (k) => { if (!Zn(k)) { xr(wC, "value must be a number"); return; } c.value.scrollLeft = k; }, w = () => { var k; (k = p.value) == null || k.update(); }; return he(() => r.noresize, (k) => { k ? (a == null || a(), i == null || i()) : ({ stop: a } = ji(d, w), i = Xo("resize", w)); }, { immediate: !0 }), he(() => [r.maxHeight, r.height], () => { r.native || Ke(() => { var k; w(), c.value && ((k = p.value) == null || k.handleScroll(c.value)); }); }), nt(CS, en({ scrollbarElement: u, wrapElement: c })), Y_(() => { c.value && (c.value.scrollTop = s, c.value.scrollLeft = l); }), ut(() => { r.native || Ke(() => { w(); }); }), Nf(() => w()), t({ wrapRef: c, update: w, scrollTo: g, setScrollTop: b, setScrollLeft: x, handleScroll: m }), (k, C) => (S(), L("div", { ref_key: "scrollbarRef", ref: u, class: H(y(o).b()) }, [ D("div", { ref_key: "wrapRef", ref: c, class: H(y(f)), style: Ye(y(h)), tabindex: k.tabindex, onScroll: m }, [ (S(), re(yt(k.tag), { id: k.id, ref_key: "resizeRef", ref: d, class: H(y(v)), style: Ye(k.viewStyle), role: k.role, "aria-label": k.ariaLabel, "aria-orientation": k.ariaOrientation }, { default: N(() => [ ue(k.$slots, "default") ]), _: 3 }, 8, ["id", "class", "style", "role", "aria-label", "aria-orientation"])) ], 46, ["tabindex"]), k.native ? J("v-if", !0) : (S(), re(Rte, { key: 0, ref_key: "barRef", ref: p, always: k.always, "min-size": k.minSize }, null, 8, ["always", "min-size"])) ], 2)); } }); var zte = /* @__PURE__ */ Ot(Bte, [["__file", "scrollbar.vue"]]); const _S = dr(zte), SS = Symbol("popper"), KN = Symbol("popperContent"), jte = [ "dialog", "grid", "group", "listbox", "menu", "navigation", "tooltip", "tree" ], GN = Vt({ role: { type: String, values: jte, default: "tooltip" } }), Vte = W({ name: "ElPopper", inheritAttrs: !1 }), Hte = /* @__PURE__ */ W({ ...Vte, props: GN, setup(e, { expose: t }) { const n = e, r = z(), o = z(), a = z(), i = z(), s = E(() => n.role), l = { triggerRef: r, popperInstanceRef: o, contentRef: a, referenceRef: i, role: s }; return t(l), nt(SS, l), (u, c) => ue(u.$slots, "default"); } }); var Ute = /* @__PURE__ */ Ot(Hte, [["__file", "popper.vue"]]); const WN = Vt({ arrowOffset: { type: Number, default: 5 } }), qte = W({ name: "ElPopperArrow", inheritAttrs: !1 }), Kte = /* @__PURE__ */ W({ ...qte, props: WN, setup(e, { expose: t }) { const n = e, r = Mt("popper"), { arrowOffset: o, arrowRef: a, arrowStyle: i } = be(KN, void 0); return he(() => n.arrowOffset, (s) => { o.value = s; }), Tt(() => { a.value = void 0; }), t({ arrowRef: a }), (s, l) => (S(), L("span", { ref_key: "arrowRef", ref: a, class: H(y(r).e("arrow")), style: Ye(y(i)), "data-popper-arrow": "" }, null, 6)); } }); var Gte = /* @__PURE__ */ Ot(Kte, [["__file", "arrow.vue"]]); const U1 = "ElOnlyChild", YN = W({ name: U1, setup(e, { slots: t, attrs: n }) { var r; const o = be(MN), a = ote((r = o == null ? void 0 : o.setForwardRef) != null ? r : Tc); return () => { var i; const s = (i = t.default) == null ? void 0 : i.call(t, n); if (!s) return null; if (s.length > 1) return xr(U1, "requires exact only one valid child."), null; const l = XN(s); return l ? Be(_0(l, n), [[a]]) : (xr(U1, "no valid child node found"), null); }; } }); function XN(e) { if (!e) return null; const t = e; for (const n of t) { if (Fr(n)) switch (n.type) { case S0: continue; case hl: case "svg": return B3(n); case Re: return XN(n.children); default: return n; } return B3(n); } return null; } function B3(e) { const t = Mt("only-child"); return q("span", { class: t.e("content") }, [e]); } const ZN = Vt({ virtualRef: { type: bt(Object) }, virtualTriggering: Boolean, onMouseenter: { type: bt(Function) }, onMouseleave: { type: bt(Function) }, onClick: { type: bt(Function) }, onKeydown: { type: bt(Function) }, onFocus: { type: bt(Function) }, onBlur: { type: bt(Function) }, onContextmenu: { type: bt(Function) }, id: String, open: Boolean }), Wte = W({ name: "ElPopperTrigger", inheritAttrs: !1 }), Yte = /* @__PURE__ */ W({ ...Wte, props: ZN, setup(e, { expose: t }) { const n = e, { role: r, triggerRef: o } = be(SS, void 0); rte(o); const a = E(() => s.value ? n.id : void 0), i = E(() => { if (r && r.value === "tooltip") return n.open && n.id ? n.id : void 0; }), s = E(() => { if (r && r.value !== "tooltip") return r.value; }), l = E(() => s.value ? `${n.open}` : void 0); let u; const c = [ "onMouseenter", "onMouseleave", "onClick", "onKeydown", "onFocus", "onBlur", "onContextmenu" ]; return ut(() => { he(() => n.virtualRef, (d) => { d && (o.value = Wi(d)); }, { immediate: !0 }), he(o, (d, p) => { u == null || u(), u = void 0, Zl(d) && (c.forEach((h) => { var f; const v = n[h]; v && (d.addEventListener(h.slice(2).toLowerCase(), v), (f = p == null ? void 0 : p.removeEventListener) == null || f.call(p, h.slice(2).toLowerCase(), v)); }), u = he([a, i, s, l], (h) => { [ "aria-controls", "aria-describedby", "aria-haspopup", "aria-expanded" ].forEach((f, v) => { zf(h[v]) ? d.removeAttribute(f) : d.setAttribute(f, h[v]); }); }, { immediate: !0 })), Zl(p) && [ "aria-controls", "aria-describedby", "aria-haspopup", "aria-expanded" ].forEach((h) => p.removeAttribute(h)); }, { immediate: !0 }); }), Tt(() => { if (u == null || u(), u = void 0, o.value && Zl(o.value)) { const d = o.value; c.forEach((p) => { const h = n[p]; h && d.removeEventListener(p.slice(2).toLowerCase(), h); }), o.value = void 0; } }), t({ triggerRef: o }), (d, p) => d.virtualTriggering ? J("v-if", !0) : (S(), re(y(YN), Et({ key: 0 }, d.$attrs, { "aria-controls": y(a), "aria-describedby": y(i), "aria-expanded": y(l), "aria-haspopup": y(s) }), { default: N(() => [ ue(d.$slots, "default") ]), _: 3 }, 16, ["aria-controls", "aria-describedby", "aria-expanded", "aria-haspopup"])); } }); var Xte = /* @__PURE__ */ Ot(Yte, [["__file", "trigger.vue"]]); const q1 = "focus-trap.focus-after-trapped", K1 = "focus-trap.focus-after-released", Zte = "focus-trap.focusout-prevented", z3 = { cancelable: !0, bubbles: !1 }, Jte = { cancelable: !0, bubbles: !1 }, j3 = "focusAfterTrapped", V3 = "focusAfterReleased", JN = Symbol("elFocusTrap"), $S = z(), K0 = z(0), ES = z(0); let jh = 0; const QN = (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; }, H3 = (e, t) => { for (const n of e) if (!Qte(n, t)) return n; }, Qte = (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; }, ene = (e) => { const t = QN(e), n = H3(t, e), r = H3(t.reverse(), e); return [n, r]; }, tne = (e) => e instanceof HTMLInputElement && "select" in e, Os = (e, t) => { if (e && e.focus) { const n = document.activeElement; e.focus({ preventScroll: !0 }), ES.value = window.performance.now(), e !== n && tne(e) && t && e.select(); } }; function U3(e, t) { const n = [...e], r = e.indexOf(t); return r !== -1 && n.splice(r, 1), n; } const nne = () => { let e = []; return { push: (r) => { const o = e[0]; o && r !== o && o.pause(), e = U3(e, r), e.unshift(r); }, remove: (r) => { var o, a; e = U3(e, r), (a = (o = e[0]) == null ? void 0 : o.resume) == null || a.call(o); } }; }, rne = (e, t = !1) => { const n = document.activeElement; for (const r of e) if (Os(r, t), document.activeElement !== n) return; }, q3 = nne(), one = () => K0.value > ES.value, Vh = () => { $S.value = "pointer", K0.value = window.performance.now(); }, K3 = () => { $S.value = "keyboard", K0.value = window.performance.now(); }, ane = () => (ut(() => { jh === 0 && (document.addEventListener("mousedown", Vh), document.addEventListener("touchstart", Vh), document.addEventListener("keydown", K3)), jh++; }), Tt(() => { jh--, jh <= 0 && (document.removeEventListener("mousedown", Vh), document.removeEventListener("touchstart", Vh), document.removeEventListener("keydown", K3)); }), { focusReason: $S, lastUserFocusTimestamp: K0, lastAutomatedFocusTimestamp: ES }), Hh = (e) => new CustomEvent(Zte, { ...Jte, detail: e }), ine = W({ name: "ElFocusTrap", inheritAttrs: !1, props: { loop: Boolean, trapped: Boolean, focusTrapEl: Object, focusStartEl: { type: [Object, String], default: "first" } }, emits: [ j3, V3, "focusin", "focusout", "focusout-prevented", "release-requested" ], setup(e, { emit: t }) { const n = z(); let r, o; const { focusReason: a } = ane(); Jee((f) => { e.trapped && !i.paused && t("release-requested", f); }); const i = { paused: !1, pause() { this.paused = !0; }, resume() { this.paused = !1; } }, s = (f) => { if (!e.loop && !e.trapped || i.paused) return; const { key: v, altKey: m, ctrlKey: g, metaKey: b, currentTarget: x, shiftKey: w } = f, { loop: k } = e, C = v === kr.tab && !m && !g && !b, _ = document.activeElement; if (C && _) { const $ = x, [O, F] = ene($); if (O && F) { if (!w && _ === F) { const T = Hh({ focusReason: a.value }); t("focusout-prevented", T), T.defaultPrevented || (f.preventDefault(), k && Os(O, !0)); } else if (w && [O, $].includes(_)) { const T = Hh({ focusReason: a.value }); t("focusout-prevented", T), T.defaultPrevented || (f.preventDefault(), k && Os(F, !0)); } } else if (_ === $) { const T = Hh({ focusReason: a.value }); t("focusout-prevented", T), T.defaultPrevented || f.preventDefault(); } } }; nt(JN, { focusTrapRef: n, onKeydown: s }), he(() => e.focusTrapEl, (f) => { f && (n.value = f); }, { immediate: !0 }), he([n], ([f], [v]) => { f && (f.addEventListener("keydown", s), f.addEventListener("focusin", c), f.addEventListener("focusout", d)), v && (v.removeEventListener("keydown", s), v.removeEventListener("focusin", c), v.removeEventListener("focusout", d)); }); const l = (f) => { t(j3, f); }, u = (f) => t(V3, f), c = (f) => { const v = y(n); if (!v) return; const m = f.target, g = f.relatedTarget, b = m && v.contains(m); e.trapped || g && v.contains(g) || (r = g), b && t("focusin", f), !i.paused && e.trapped && (b ? o = m : Os(o, !0)); }, d = (f) => { const v = y(n); if (!(i.paused || !v)) if (e.trapped) { const m = f.relatedTarget; !zf(m) && !v.contains(m) && setTimeout(() => { if (!i.paused && e.trapped) { const g = Hh({ focusReason: a.value }); t("focusout-prevented", g), g.defaultPrevented || Os(o, !0); } }, 0); } else { const m = f.target; m && v.contains(m) || t("focusout", f); } }; async function p() { await Ke(); const f = y(n); if (f) { q3.push(i); const v = f.contains(document.activeElement) ? r : document.activeElement; if (r = v, !f.contains(v)) { const g = new Event(q1, z3); f.addEventListener(q1, l), f.dispatchEvent(g), g.defaultPrevented || Ke(() => { let b = e.focusStartEl; wr(b) || (Os(b), document.activeElement !== b && (b = "first")), b === "first" && rne(QN(f), !0), (document.activeElement === v || b === "container") && Os(f); }); } } } function h() { const f = y(n); if (f) { f.removeEventListener(q1, l); const v = new CustomEvent(K1, { ...z3, detail: { focusReason: a.value } }); f.addEventListener(K1, u), f.dispatchEvent(v), !v.defaultPrevented && (a.value == "keyboard" || !one() || f.contains(document.activeElement)) && Os(r ?? document.body), f.removeEventListener(K1, u), q3.remove(i); } } return ut(() => { e.trapped && p(), he(() => e.trapped, (f) => { f ? p() : h(); }); }), Tt(() => { e.trapped && h(), n.value && (n.value.removeEventListener("keydown", s), n.value.removeEventListener("focusin", c), n.value.removeEventListener("focusout", d), n.value = void 0); }), { onKeydown: s }; } }); function sne(e, t, n, r, o, a) { return ue(e.$slots, "default", { handleKeydown: e.onKeydown }); } var lne = /* @__PURE__ */ Ot(ine, [["render", sne], ["__file", "focus-trap.vue"]]); const une = ["fixed", "absolute"], cne = Vt({ boundariesPadding: { type: Number, default: 0 }, fallbackPlacements: { type: bt(Array), default: void 0 }, gpuAcceleration: { type: Boolean, default: !0 }, offset: { type: Number, default: 12 }, placement: { type: String, values: H0, default: "bottom" }, popperOptions: { type: bt(Object), default: () => ({}) }, strategy: { type: String, values: une, default: "absolute" } }), eM = Vt({ ...cne, id: String, style: { type: bt([String, Array, Object]) }, className: { type: bt([String, Array, Object]) }, effect: { type: bt(String), default: "dark" }, visible: Boolean, enterable: { type: Boolean, default: !0 }, pure: Boolean, focusOnShow: { type: Boolean, default: !1 }, trapping: { type: Boolean, default: !1 }, popperClass: { type: bt([String, Array, Object]) }, popperStyle: { type: bt([String, Array, Object]) }, referenceEl: { type: bt(Object) }, triggerTargetEl: { type: bt(Object) }, stopPopperMouseEvent: { type: Boolean, default: !0 }, virtualTriggering: Boolean, zIndex: Number, ...ds(["ariaLabel"]) }), dne = { mouseenter: (e) => e instanceof MouseEvent, mouseleave: (e) => e instanceof MouseEvent, focus: () => !0, blur: () => !0, close: () => !0 }, pne = (e, t = []) => { const { placement: n, strategy: r, popperOptions: o } = e, a = { placement: n, strategy: r, ...o, modifiers: [...hne(e), ...t] }; return vne(a, o == null ? void 0 : o.modifiers), a; }, fne = (e) => { if (ur) return Wi(e); }; function hne(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 vne(e, t) { t && (e.modifiers = [...e.modifiers, ...t ?? []]); } const gne = 0, mne = (e) => { const { popperInstanceRef: t, contentRef: n, triggerRef: r, role: o } = be(SS, void 0), a = z(), i = z(), s = E(() => ({ name: "eventListeners", enabled: !!e.visible })), l = E(() => { var g; const b = y(a), x = (g = y(i)) != null ? g : gne; return { name: "arrow", enabled: !AJ(b), options: { element: b, padding: x } }; }), u = E(() => ({ onFirstUpdate: () => { f(); }, ...pne(e, [ y(l), y(s) ]) })), c = E(() => fne(e.referenceEl) || y(r)), { attributes: d, state: p, styles: h, update: f, forceUpdate: v, instanceRef: m } = Yee(c, n, u); return he(m, (g) => t.value = g), ut(() => { he(() => { var g; return (g = y(c)) == null ? void 0 : g.getBoundingClientRect(); }, () => { f(); }); }), { attributes: d, arrowRef: a, contentRef: n, instanceRef: m, state: p, styles: h, role: o, forceUpdate: v, update: f }; }, yne = (e, { attributes: t, styles: n, role: r }) => { const { nextZIndex: o } = zN(), a = Mt("popper"), i = E(() => y(t).popper), s = z(Zn(e.zIndex) ? e.zIndex : o()), l = E(() => [ a.b(), a.is("pure", e.pure), a.is(e.effect), e.popperClass ]), u = E(() => [ { zIndex: y(s) }, y(n).popper, e.popperStyle || {} ]), c = E(() => r.value === "dialog" ? "false" : void 0), d = E(() => y(n).arrow || {}); return { ariaModal: c, arrowStyle: d, contentAttrs: i, contentClass: l, contentStyle: u, contentZIndex: s, updateZIndex: () => { s.value = Zn(e.zIndex) ? e.zIndex : o(); } }; }, bne = (e, t) => { const n = z(!1), r = z(); return { focusStartRef: r, trapped: n, onFocusAfterReleased: (u) => { var c; ((c = u.detail) == null ? void 0 : c.focusReason) !== "pointer" && (r.value = "first", t("blur")); }, onFocusAfterTrapped: () => { t("focus"); }, onFocusInTrap: (u) => { e.visible && !n.value && (u.target && (r.value = u.target), n.value = !0); }, onFocusoutPrevented: (u) => { e.trapping || (u.detail.focusReason === "pointer" && u.preventDefault(), n.value = !1); }, onReleaseRequested: () => { n.value = !1, t("close"); } }; }, wne = W({ name: "ElPopperContent" }), xne = /* @__PURE__ */ W({ ...wne, props: eM, emits: dne, setup(e, { expose: t, emit: n }) { const r = e, { focusStartRef: o, trapped: a, onFocusAfterReleased: i, onFocusAfterTrapped: s, onFocusInTrap: l, onFocusoutPrevented: u, onReleaseRequested: c } = bne(r, n), { attributes: d, arrowRef: p, contentRef: h, styles: f, instanceRef: v, role: m, update: g } = mne(r), { ariaModal: b, arrowStyle: x, contentAttrs: w, contentClass: k, contentStyle: C, updateZIndex: _ } = yne(r, { styles: f, attributes: d, role: m }), $ = be(Tg, void 0), O = z(); nt(KN, { arrowStyle: x, arrowRef: p, arrowOffset: O }), $ && nt(Tg, { ...$, addInputId: Tc, removeInputId: Tc }); let F; const A = (R = !0) => { g(), R && _(); }, T = () => { A(!1), r.visible && r.focusOnShow ? a.value = !0 : r.visible === !1 && (a.value = !1); }; return ut(() => { he(() => r.triggerTargetEl, (R, M) => { F == null || F(), F = void 0; const j = y(R || h.value), P = y(M || h.value); Zl(j) && (F = he([m, () => r.ariaLabel, b, () => r.id], (V) => { ["role", "aria-label", "aria-modal", "id"].forEach((U, G) => { zf(V[G]) ? j.removeAttribute(U) : j.setAttribute(U, V[G]); }); }, { immediate: !0 })), P !== j && Zl(P) && ["role", "aria-label", "aria-modal", "id"].forEach((V) => { P.removeAttribute(V); }); }, { immediate: !0 }), he(() => r.visible, T, { immediate: !0 }); }), Tt(() => { F == null || F(), F = void 0; }), t({ popperContentRef: h, popperInstanceRef: v, updatePopper: A, contentStyle: C }), (R, M) => (S(), L("div", Et({ ref_key: "contentRef", ref: h }, y(w), { style: y(C), class: y(k), tabindex: "-1", onMouseenter: (j) => R.$emit("mouseenter", j), onMouseleave: (j) => R.$emit("mouseleave", j) }), [ q(y(lne), { trapped: y(a), "trap-on-focus-in": !0, "focus-trap-el": y(h), "focus-start-el": y(o), onFocusAfterTrapped: y(s), onFocusAfterReleased: y(i), onFocusin: y(l), onFocusoutPrevented: y(u), onReleaseRequested: y(c) }, { default: N(() => [ ue(R.$slots, "default") ]), _: 3 }, 8, ["trapped", "focus-trap-el", "focus-start-el", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusin", "onFocusoutPrevented", "onReleaseRequested"]) ], 16, ["onMouseenter", "onMouseleave"])); } }); var kne = /* @__PURE__ */ Ot(xne, [["__file", "content.vue"]]); const Cne = dr(Ute), OS = Symbol("elTooltip"), co = Vt({ ...tte, ...eM, appendTo: { type: bt([String, Object]) }, content: { type: String, default: "" }, rawContent: Boolean, persistent: Boolean, visible: { type: bt(Boolean), default: null }, transition: String, teleported: { type: Boolean, default: !0 }, disabled: Boolean, ...ds(["ariaLabel"]) }), Yp = Vt({ ...ZN, disabled: Boolean, trigger: { type: bt([String, Array]), default: "hover" }, triggerKeys: { type: bt(Array), default: () => [kr.enter, kr.space] } }), { useModelToggleProps: _ne, useModelToggleEmits: Sne, useModelToggle: $ne } = KQ("visible"), Ene = Vt({ ...GN, ..._ne, ...co, ...Yp, ...WN, showArrow: { type: Boolean, default: !0 } }), One = [ ...Sne, "before-show", "before-hide", "show", "hide", "open", "close" ], Fne = (e, t) => yr(e) ? e.includes(t) : e === t, ec = (e, t, n) => (r) => { Fne(y(e), t) && n(r); }, Tne = W({ name: "ElTooltipTrigger" }), Ane = /* @__PURE__ */ W({ ...Tne, props: Yp, setup(e, { expose: t }) { const n = e, r = Mt("tooltip"), { controlled: o, id: a, open: i, onOpen: s, onClose: l, onToggle: u } = be(OS, void 0), c = z(null), d = () => { if (y(o) || n.disabled) return !0; }, p = St(n, "trigger"), h = Yn(d, ec(p, "hover", s)), f = Yn(d, ec(p, "hover", l)), v = Yn(d, ec(p, "click", (w) => { w.button === 0 && u(w); })), m = Yn(d, ec(p, "focus", s)), g = Yn(d, ec(p, "focus", l)), b = Yn(d, ec(p, "contextmenu", (w) => { w.preventDefault(), u(w); })), x = Yn(d, (w) => { const { code: k } = w; n.triggerKeys.includes(k) && (w.preventDefault(), u(w)); }); return t({ triggerRef: c }), (w, k) => (S(), re(y(Xte), { id: y(a), "virtual-ref": w.virtualRef, open: y(i), "virtual-triggering": w.virtualTriggering, class: H(y(r).e("trigger")), onBlur: y(g), onClick: y(v), onContextmenu: y(b), onFocus: y(m), onMouseenter: y(h), onMouseleave: y(f), onKeydown: y(x) }, { default: N(() => [ ue(w.$slots, "default") ]), _: 3 }, 8, ["id", "virtual-ref", "open", "virtual-triggering", "class", "onBlur", "onClick", "onContextmenu", "onFocus", "onMouseenter", "onMouseleave", "onKeydown"])); } }); var Ine = /* @__PURE__ */ Ot(Ane, [["__file", "trigger.vue"]]); const Pne = Vt({ to: { type: bt([String, Object]), required: !0 }, disabled: Boolean }), Lne = /* @__PURE__ */ W({ __name: "teleport", props: Pne, setup(e) { return (t, n) => t.disabled ? ue(t.$slots, "default", { key: 0 }) : (S(), re($0, { key: 1, to: t.to }, [ ue(t.$slots, "default") ], 8, ["to"])); } }); var Rne = /* @__PURE__ */ Ot(Lne, [["__file", "teleport.vue"]]); const Nne = dr(Rne), Mne = W({ name: "ElTooltipContent", inheritAttrs: !1 }), Dne = /* @__PURE__ */ W({ ...Mne, props: co, setup(e, { expose: t }) { const n = e, { selector: r } = NN(), o = Mt("tooltip"), a = z(null); let i; const { controlled: s, id: l, open: u, trigger: c, onClose: d, onOpen: p, onShow: h, onHide: f, onBeforeShow: v, onBeforeHide: m } = be(OS, void 0), g = E(() => n.transition || `${o.namespace.value}-fade-in-linear`), b = E(() => process.env.NODE_ENV === "test" ? !0 : n.persistent); Tt(() => { i == null || i(); }); const x = E(() => y(b) ? !0 : y(u)), w = E(() => n.disabled ? !1 : y(u)), k = E(() => n.appendTo || r.value), C = E(() => { var P; return (P = n.style) != null ? P : {}; }), _ = z(!0), $ = () => { f(), _.value = !0; }, O = () => { if (y(s)) return !0; }, F = Yn(O, () => { n.enterable && y(c) === "hover" && p(); }), A = Yn(O, () => { y(c) === "hover" && d(); }), T = () => { var P, V; (V = (P = a.value) == null ? void 0 : P.updatePopper) == null || V.call(P), v == null || v(); }, R = () => { m == null || m(); }, M = () => { h(), i = H9(E(() => { var P; return (P = a.value) == null ? void 0 : P.popperContentRef; }), () => { if (y(s)) return; y(c) !== "hover" && d(); }); }, j = () => { n.virtualTriggering || d(); }; return he(() => y(u), (P) => { P ? _.value = !1 : i == null || i(); }, { flush: "post" }), he(() => n.content, () => { var P, V; (V = (P = a.value) == null ? void 0 : P.updatePopper) == null || V.call(P); }), t({ contentRef: a }), (P, V) => (S(), re(y(Nne), { disabled: !P.teleported, to: y(k) }, { default: N(() => [ q(nr, { name: y(g), onAfterLeave: $, onBeforeEnter: T, onAfterEnter: M, onBeforeLeave: R }, { default: N(() => [ y(x) ? Be((S(), re(y(kne), Et({ key: 0, id: y(l), ref_key: "contentRef", ref: a }, P.$attrs, { "aria-label": P.ariaLabel, "aria-hidden": _.value, "boundaries-padding": P.boundariesPadding, "fallback-placements": P.fallbackPlacements, "gpu-acceleration": P.gpuAcceleration, offset: P.offset, placement: P.placement, "popper-options": P.popperOptions, strategy: P.strategy, effect: P.effect, enterable: P.enterable, pure: P.pure, "popper-class": P.popperClass, "popper-style": [P.popperStyle, y(C)], "reference-el": P.referenceEl, "trigger-target-el": P.triggerTargetEl, visible: y(w), "z-index": P.zIndex, onMouseenter: y(F), onMouseleave: y(A), onBlur: j, onClose: y(d) }), { default: N(() => [ ue(P.$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, y(w)] ]) : J("v-if", !0) ]), _: 3 }, 8, ["name"]) ]), _: 3 }, 8, ["disabled", "to"])); } }); var Bne = /* @__PURE__ */ Ot(Dne, [["__file", "content.vue"]]); const zne = W({ name: "ElTooltip" }), jne = /* @__PURE__ */ W({ ...zne, props: Ene, emits: One, setup(e, { expose: t, emit: n }) { const r = e; ete(); const o = ml(), a = z(), i = z(), s = () => { var g; const b = y(a); b && ((g = b.popperInstanceRef) == null || g.update()); }, l = z(!1), u = z(), { show: c, hide: d, hasUpdateHandler: p } = $ne({ indicator: l, toggleReason: u }), { onOpen: h, onClose: f } = nte({ showAfter: St(r, "showAfter"), hideAfter: St(r, "hideAfter"), autoClose: St(r, "autoClose"), open: c, close: d }), v = E(() => Qs(r.visible) && !p.value); nt(OS, { controlled: v, id: o, open: $u(l), trigger: St(r, "trigger"), onOpen: (g) => { h(g); }, onClose: (g) => { f(g); }, onToggle: (g) => { y(l) ? f(g) : h(g); }, onShow: () => { n("show", u.value); }, onHide: () => { n("hide", u.value); }, onBeforeShow: () => { n("before-show", u.value); }, onBeforeHide: () => { n("before-hide", u.value); }, updatePopper: s }), he(() => r.disabled, (g) => { g && l.value && (l.value = !1); }); const m = (g) => { var b, x; const w = (x = (b = i.value) == null ? void 0 : b.contentRef) == null ? void 0 : x.popperContentRef, k = (g == null ? void 0 : g.relatedTarget) || document.activeElement; return w && w.contains(k); }; return E0(() => l.value && d()), t({ popperRef: a, contentRef: i, isFocusInsideContent: m, updatePopper: s, onOpen: h, onClose: f, hide: d }), (g, b) => (S(), re(y(Cne), { ref_key: "popperRef", ref: a, role: g.role }, { default: N(() => [ q(Ine, { disabled: g.disabled, trigger: g.trigger, "trigger-keys": g.triggerKeys, "virtual-ref": g.virtualRef, "virtual-triggering": g.virtualTriggering }, { default: N(() => [ g.$slots.default ? ue(g.$slots, "default", { key: 0 }) : J("v-if", !0) ]), _: 3 }, 8, ["disabled", "trigger", "trigger-keys", "virtual-ref", "virtual-triggering"]), q(Bne, { ref_key: "contentRef", ref: i, "aria-label": g.ariaLabel, "boundaries-padding": g.boundariesPadding, content: g.content, disabled: g.disabled, effect: g.effect, enterable: g.enterable, "fallback-placements": g.fallbackPlacements, "hide-after": g.hideAfter, "gpu-acceleration": g.gpuAcceleration, offset: g.offset, persistent: g.persistent, "popper-class": g.popperClass, "popper-style": g.popperStyle, placement: g.placement, "popper-options": g.popperOptions, pure: g.pure, "raw-content": g.rawContent, "reference-el": g.referenceEl, "trigger-target-el": g.triggerTargetEl, "show-after": g.showAfter, strategy: g.strategy, teleported: g.teleported, transition: g.transition, "virtual-triggering": g.virtualTriggering, "z-index": g.zIndex, "append-to": g.appendTo }, { default: N(() => [ ue(g.$slots, "content", {}, () => [ g.rawContent ? (S(), L("span", { key: 0, innerHTML: g.content }, null, 8, ["innerHTML"])) : (S(), L("span", { key: 1 }, ge(g.content), 1)) ]), g.showArrow ? (S(), re(y(Gte), { key: 0, "arrow-offset": g.arrowOffset }, null, 8, ["arrow-offset"])) : J("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 Vne = /* @__PURE__ */ Ot(jne, [["__file", "tooltip.vue"]]); const G0 = dr(Vne), Hne = Vt({ valueKey: { type: String, default: "value" }, modelValue: { type: [String, Number], default: "" }, debounce: { type: Number, default: 300 }, placement: { type: bt(String), values: [ "top", "top-start", "top-end", "bottom", "bottom-start", "bottom-end" ], default: "bottom-start" }, fetchSuggestions: { type: bt([Function, Array]), default: Tc }, popperClass: { type: String, default: "" }, triggerOnFocus: { type: Boolean, default: !0 }, selectWhenUnmatched: { type: Boolean, default: !1 }, hideLoading: { type: Boolean, default: !1 }, teleported: co.teleported, highlightFirstItem: { type: Boolean, default: !1 }, fitInputWidth: { type: Boolean, default: !1 }, clearable: { type: Boolean, default: !1 }, disabled: { type: Boolean, default: !1 }, name: String, ...ds(["ariaLabel"]) }), Une = { [Vn]: (e) => wr(e), [mC]: (e) => wr(e), [Fu]: (e) => wr(e), focus: (e) => e instanceof FocusEvent, blur: (e) => e instanceof FocusEvent, clear: () => !0, select: (e) => Fr(e) }, tM = "ElAutocomplete", qne = W({ name: tM, inheritAttrs: !1 }), Kne = /* @__PURE__ */ W({ ...qne, props: Hne, emits: Une, setup(e, { expose: t, emit: n }) { const r = e, o = xN(), a = Rf(), i = dd(), s = Mt("autocomplete"), l = z(), u = z(), c = z(), d = z(); let p = !1, h = !1; const f = z([]), v = z(-1), m = z(""), g = z(!1), b = z(!1), x = z(!1), w = ml(), k = E(() => a.style), C = E(() => (f.value.length > 0 || x.value) && g.value), _ = E(() => !r.hideLoading && x.value), $ = E(() => l.value ? Array.from(l.value.$el.querySelectorAll("input")) : []), O = () => { C.value && (m.value = `${l.value.$el.offsetWidth}px`); }, F = () => { v.value = -1; }, A = async (ee) => { if (b.value) return; const Z = (le) => { x.value = !1, !b.value && (yr(le) ? (f.value = le, v.value = r.highlightFirstItem ? 0 : -1) : cN(tM, "autocomplete suggestions must be an array")); }; if (x.value = !0, yr(r.fetchSuggestions)) Z(r.fetchSuggestions); else { const le = await r.fetchSuggestions(ee, Z); yr(le) && Z(le); } }, T = sN(A, r.debounce), R = (ee) => { const Z = !!ee; if (n(mC, ee), n(Vn, ee), b.value = !1, g.value || (g.value = Z), !r.triggerOnFocus && !ee) { b.value = !0, f.value = []; return; } T(ee); }, M = (ee) => { var Z; i.value || (((Z = ee.target) == null ? void 0 : Z.tagName) !== "INPUT" || $.value.includes(document.activeElement)) && (g.value = !0); }, j = (ee) => { n(Fu, ee); }, P = (ee) => { h ? h = !1 : (g.value = !0, n("focus", ee), r.triggerOnFocus && !p && T(String(r.modelValue))); }, V = (ee) => { setTimeout(() => { var Z; if ((Z = c.value) != null && Z.isFocusInsideContent()) { h = !0; return; } g.value && ae(), n("blur", ee); }); }, U = () => { g.value = !1, n(Vn, ""), n("clear"); }, G = async () => { C.value && v.value >= 0 && v.value < f.value.length ? te(f.value[v.value]) : r.selectWhenUnmatched && (n("select", { value: r.modelValue }), f.value = [], v.value = -1); }, se = (ee) => { C.value && (ee.preventDefault(), ee.stopPropagation(), ae()); }, ae = () => { g.value = !1; }, de = () => { var ee; (ee = l.value) == null || ee.focus(); }, me = () => { var ee; (ee = l.value) == null || ee.blur(); }, te = async (ee) => { n(mC, ee[r.valueKey]), n(Vn, ee[r.valueKey]), n("select", ee), f.value = [], v.value = -1; }, oe = (ee) => { if (!C.value || x.value) return; if (ee < 0) { v.value = -1; return; } ee >= f.value.length && (ee = f.value.length - 1); const Z = u.value.querySelector(`.${s.be("suggestion", "wrap")}`), pe = Z.querySelectorAll(`.${s.be("suggestion", "list")} li`)[ee], ke = Z.scrollTop, { offsetTop: Ne, scrollHeight: De } = pe; Ne + De > ke + Z.clientHeight && (Z.scrollTop += De), Ne < ke && (Z.scrollTop -= De), v.value = ee, l.value.ref.setAttribute("aria-activedescendant", `${w.value}-item-${v.value}`); }, ne = H9(d, () => { C.value && ae(); }); return Tt(() => { ne == null || ne(); }), ut(() => { l.value.ref.setAttribute("role", "textbox"), l.value.ref.setAttribute("aria-autocomplete", "list"), l.value.ref.setAttribute("aria-controls", "id"), l.value.ref.setAttribute("aria-activedescendant", `${w.value}-item-${v.value}`), p = l.value.ref.hasAttribute("readonly"); }), t({ highlightedIndex: v, activated: g, loading: x, inputRef: l, popperRef: c, suggestions: f, handleSelect: te, handleKeyEnter: G, focus: de, blur: me, close: ae, highlight: oe, getData: A }), (ee, Z) => (S(), re(y(G0), { ref_key: "popperRef", ref: c, visible: y(C), placement: ee.placement, "fallback-placements": ["bottom-start", "top-start"], "popper-class": [y(s).e("popper"), ee.popperClass], teleported: ee.teleported, "gpu-acceleration": !1, pure: "", "manual-mode": "", effect: "light", trigger: "click", transition: `${y(s).namespace.value}-zoom-in-top`, persistent: "", role: "listbox", onBeforeShow: O, onHide: F }, { content: N(() => [ D("div", { ref_key: "regionRef", ref: u, class: H([y(s).b("suggestion"), y(s).is("loading", y(_))]), style: Ye({ [ee.fitInputWidth ? "width" : "minWidth"]: m.value, outline: "none" }), role: "region" }, [ q(y(_S), { id: y(w), tag: "ul", "wrap-class": y(s).be("suggestion", "wrap"), "view-class": y(s).be("suggestion", "list"), role: "listbox" }, { default: N(() => [ y(_) ? (S(), L("li", { key: 0 }, [ ue(ee.$slots, "loading", {}, () => [ q(y(Er), { class: H(y(s).is("loading")) }, { default: N(() => [ q(y(Ei)) ]), _: 1 }, 8, ["class"]) ]) ])) : (S(!0), L(Re, { key: 1 }, mt(f.value, (le, pe) => (S(), L("li", { id: `${y(w)}-item-${pe}`, key: pe, class: H({ highlighted: v.value === pe }), role: "option", "aria-selected": v.value === pe, onClick: (ke) => te(le) }, [ ue(ee.$slots, "default", { item: le }, () => [ Oe(ge(le[ee.valueKey]), 1) ]) ], 10, ["id", "aria-selected", "onClick"]))), 128)) ]), _: 3 }, 8, ["id", "wrap-class", "view-class"]) ], 6) ]), default: N(() => [ D("div", { ref_key: "listboxRef", ref: d, class: H([y(s).b(), ee.$attrs.class]), style: Ye(y(k)), role: "combobox", "aria-haspopup": "listbox", "aria-expanded": y(C), "aria-owns": y(w) }, [ q(y(q0), Et({ ref_key: "inputRef", ref: l }, y(o), { clearable: ee.clearable, disabled: y(i), name: ee.name, "model-value": ee.modelValue, "aria-label": ee.ariaLabel, onInput: R, onChange: j, onFocus: P, onBlur: V, onClear: U, onKeydown: [ wn(Ge((le) => oe(v.value - 1), ["prevent"]), ["up"]), wn(Ge((le) => oe(v.value + 1), ["prevent"]), ["down"]), wn(G, ["enter"]), wn(ae, ["tab"]), wn(se, ["esc"]) ], onMousedown: M }), O0({ _: 2 }, [ ee.$slots.prepend ? { name: "prepend", fn: N(() => [ ue(ee.$slots, "prepend") ]) } : void 0, ee.$slots.append ? { name: "append", fn: N(() => [ ue(ee.$slots, "append") ]) } : void 0, ee.$slots.prefix ? { name: "prefix", fn: N(() => [ ue(ee.$slots, "prefix") ]) } : void 0, ee.$slots.suffix ? { name: "suffix", fn: N(() => [ ue(ee.$slots, "suffix") ]) } : void 0 ]), 1040, ["clearable", "disabled", "name", "model-value", "aria-label", "onKeydown"]) ], 14, ["aria-expanded", "aria-owns"]) ]), _: 3 }, 8, ["visible", "placement", "popper-class", "teleported", "transition"])); } }); var Gne = /* @__PURE__ */ Ot(Kne, [["__file", "autocomplete.vue"]]); const nM = dr(Gne), rM = Symbol("buttonGroupContextKey"), Wne = (e, t) => { Sp({ from: "type.text", replacement: "link", version: "3.0.0", scope: "props", ref: "https://element-plus.org/en-US/component/button.html#button-attributes" }, E(() => e.type === "text")); const n = be(rM, void 0), r = xS("button"), { form: o } = Au(), a = tl(E(() => n == null ? void 0 : n.size)), i = dd(), s = z(), l = Dr(), u = E(() => e.type || (n == null ? void 0 : n.type) || ""), c = E(() => { var f, v, m; return (m = (v = e.autoInsertSpace) != null ? v : (f = r.value) == null ? void 0 : f.autoInsertSpace) != null ? m : !1; }), d = E(() => e.tag === "button" ? { ariaDisabled: i.value || e.loading, disabled: i.value || e.loading, autofocus: e.autofocus, type: e.nativeType } : {}), p = E(() => { var f; const v = (f = l.default) == null ? void 0 : f.call(l); if (c.value && (v == null ? void 0 : v.length) === 1) { const m = v[0]; if ((m == null ? void 0 : m.type) === hl) { const g = m.children; return new RegExp("^\\p{Unified_Ideograph}{2}$", "u").test(g.trim()); } } return !1; }); return { _disabled: i, _size: a, _type: u, _ref: s, _props: d, shouldAddSpace: p, handleClick: (f) => { if (i.value || e.loading) { f.stopPropagation(); return; } e.nativeType === "reset" && (o == null || o.resetFields()), t("click", f); } }; }, Yne = [ "default", "primary", "success", "warning", "info", "danger", "text", "" ], Xne = ["button", "submit", "reset"], xC = Vt({ size: Tu, disabled: Boolean, type: { type: String, values: Yne, default: "" }, icon: { type: el }, nativeType: { type: String, values: Xne, default: "button" }, loading: Boolean, loadingIcon: { type: el, default: () => Ei }, 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: bt([String, Object]), default: "button" } }), Zne = { click: (e) => e instanceof MouseEvent }; function Ir(e, t) { Jne(e) && (e = "100%"); var n = Qne(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 Uh(e) { return Math.min(1, Math.max(0, e)); } function Jne(e) { return typeof e == "string" && e.indexOf(".") !== -1 && parseFloat(e) === 1; } function Qne(e) { return typeof e == "string" && e.indexOf("%") !== -1; } function oM(e) { return e = parseFloat(e), (isNaN(e) || e < 0 || e > 1) && (e = 1), e; } function qh(e) { return e <= 1 ? "".concat(Number(e) * 100, "%") : e; } function Hl(e) { return e.length === 1 ? "0" + e : String(e); } function ere(e, t, n) { return { r: Ir(e, 255) * 255, g: Ir(t, 255) * 255, b: Ir(n, 255) * 255 }; } function G3(e, t, n) { e = Ir(e, 255), t = Ir(t, 255), n = Ir(n, 255); var r = Math.max(e, t, n), o = Math.min(e, t, n), a = 0, i = 0, s = (r + o) / 2; if (r === o) i = 0, a = 0; else { var l = r - o; switch (i = s > 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: i, l: s }; } function G1(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 tre(e, t, n) { var r, o, a; if (e = Ir(e, 360), t = Ir(t, 100), n = Ir(n, 100), t === 0) o = n, a = n, r = n; else { var i = n < 0.5 ? n * (1 + t) : n + t - n * t, s = 2 * n - i; r = G1(s, i, e + 1 / 3), o = G1(s, i, e), a = G1(s, i, e - 1 / 3); } return { r: r * 255, g: o * 255, b: a * 255 }; } function W3(e, t, n) { e = Ir(e, 255), t = Ir(t, 255), n = Ir(n, 255); var r = Math.max(e, t, n), o = Math.min(e, t, n), a = 0, i = r, s = r - o, l = r === 0 ? 0 : s / r; if (r === o) a = 0; else { switch (r) { case e: a = (t - n) / s + (t < n ? 6 : 0); break; case t: a = (n - e) / s + 2; break; case n: a = (e - t) / s + 4; break; } a /= 6; } return { h: a, s: l, v: i }; } function nre(e, t, n) { e = Ir(e, 360) * 6, t = Ir(t, 100), n = Ir(n, 100); var r = Math.floor(e), o = e - r, a = n * (1 - t), i = n * (1 - o * t), s = n * (1 - (1 - o) * t), l = r % 6, u = [n, i, a, a, s, n][l], c = [s, n, n, i, a, a][l], d = [a, a, s, n, n, i][l]; return { r: u * 255, g: c * 255, b: d * 255 }; } function Y3(e, t, n, r) { var o = [ Hl(Math.round(e).toString(16)), Hl(Math.round(t).toString(16)), Hl(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 rre(e, t, n, r, o) { var a = [ Hl(Math.round(e).toString(16)), Hl(Math.round(t).toString(16)), Hl(Math.round(n).toString(16)), Hl(ore(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 ore(e) { return Math.round(parseFloat(e) * 255).toString(16); } function X3(e) { return Io(e) / 255; } function Io(e) { return parseInt(e, 16); } function are(e) { return { r: e >> 16, g: (e & 65280) >> 8, b: e & 255 }; } var kC = { 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 ire(e) { var t = { r: 0, g: 0, b: 0 }, n = 1, r = null, o = null, a = null, i = !1, s = !1; return typeof e == "string" && (e = ure(e)), typeof e == "object" && (Pi(e.r) && Pi(e.g) && Pi(e.b) ? (t = ere(e.r, e.g, e.b), i = !0, s = String(e.r).substr(-1) === "%" ? "prgb" : "rgb") : Pi(e.h) && Pi(e.s) && Pi(e.v) ? (r = qh(e.s), o = qh(e.v), t = nre(e.h, r, o), i = !0, s = "hsv") : Pi(e.h) && Pi(e.s) && Pi(e.l) && (r = qh(e.s), a = qh(e.l), t = tre(e.h, r, a), i = !0, s = "hsl"), Object.prototype.hasOwnProperty.call(e, "a") && (n = e.a)), n = oM(n), { ok: i, format: e.format || s, 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 sre = "[-\\+]?\\d+%?", lre = "[-\\+]?\\d*\\.\\d+%?", Vs = "(?:".concat(lre, ")|(?:").concat(sre, ")"), W1 = "[\\s|\\(]+(".concat(Vs, ")[,|\\s]+(").concat(Vs, ")[,|\\s]+(").concat(Vs, ")\\s*\\)?"), Y1 = "[\\s|\\(]+(".concat(Vs, ")[,|\\s]+(").concat(Vs, ")[,|\\s]+(").concat(Vs, ")[,|\\s]+(").concat(Vs, ")\\s*\\)?"), Sa = { CSS_UNIT: new RegExp(Vs), rgb: new RegExp("rgb" + W1), rgba: new RegExp("rgba" + Y1), hsl: new RegExp("hsl" + W1), hsla: new RegExp("hsla" + Y1), hsv: new RegExp("hsv" + W1), hsva: new RegExp("hsva" + Y1), 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 ure(e) { if (e = e.trim().toLowerCase(), e.length === 0) return !1; var t = !1; if (kC[e]) e = kC[e], t = !0; else if (e === "transparent") return { r: 0, g: 0, b: 0, a: 0, format: "name" }; var n = Sa.rgb.exec(e); return n ? { r: n[1], g: n[2], b: n[3] } : (n = Sa.rgba.exec(e), n ? { r: n[1], g: n[2], b: n[3], a: n[4] } : (n = Sa.hsl.exec(e), n ? { h: n[1], s: n[2], l: n[3] } : (n = Sa.hsla.exec(e), n ? { h: n[1], s: n[2], l: n[3], a: n[4] } : (n = Sa.hsv.exec(e), n ? { h: n[1], s: n[2], v: n[3] } : (n = Sa.hsva.exec(e), n ? { h: n[1], s: n[2], v: n[3], a: n[4] } : (n = Sa.hex8.exec(e), n ? { r: Io(n[1]), g: Io(n[2]), b: Io(n[3]), a: X3(n[4]), format: t ? "name" : "hex8" } : (n = Sa.hex6.exec(e), n ? { r: Io(n[1]), g: Io(n[2]), b: Io(n[3]), format: t ? "name" : "hex" } : (n = Sa.hex4.exec(e), n ? { r: Io(n[1] + n[1]), g: Io(n[2] + n[2]), b: Io(n[3] + n[3]), a: X3(n[4] + n[4]), format: t ? "name" : "hex8" } : (n = Sa.hex3.exec(e), n ? { r: Io(n[1] + n[1]), g: Io(n[2] + n[2]), b: Io(n[3] + n[3]), format: t ? "name" : "hex" } : !1))))))))); } function Pi(e) { return !!Sa.CSS_UNIT.exec(String(e)); } var cre = ( /** @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 = are(t)), this.originalInput = t; var o = ire(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, i = t.g / 255, s = t.b / 255; return a <= 0.03928 ? n = a / 12.92 : n = Math.pow((a + 0.055) / 1.055, 2.4), i <= 0.03928 ? r = i / 12.92 : r = Math.pow((i + 0.055) / 1.055, 2.4), s <= 0.03928 ? o = s / 12.92 : o = Math.pow((s + 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 = oM(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 = W3(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 = W3(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 = G3(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 = G3(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), Y3(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), rre(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(Ir(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(Ir(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 = "#" + Y3(this.r, this.g, this.b, !1), n = 0, r = Object.entries(kC); n < r.length; n++) { var o = r[n], a = o[0], i = o[1]; if (t === i) 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 = Uh(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 = Uh(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 = Uh(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 = Uh(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, i = { 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(i); }, 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, i = [], s = 1 / t; t--; ) i.push(new e({ h: r, s: o, v: a })), a = (a + s) % 1; return i; }, 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, i = 1; i < t; i++) o.push(new e({ h: (r + i * a) % 360, s: n.s, l: n.l })); return o; }, e.prototype.equals = function(t) { return this.toRgbString() === new e(t).toRgbString(); }, e; }() ); function ks(e, t = 20) { return e.mix("#141414", t).toString(); } function dre(e) { const t = dd(), n = Mt("button"); return E(() => { let r = {}, o = e.color; if (o) { const a = o.match(/var\((.*?)\)/); a && (o = window.getComputedStyle(window.document.documentElement).getPropertyValue(a[1])); const i = new cre(o), s = e.dark ? i.tint(20).toString() : ks(i, 20); if (e.plain) r = n.cssVarBlock({ "bg-color": e.dark ? ks(i, 90) : i.tint(90).toString(), "text-color": o, "border-color": e.dark ? ks(i, 50) : i.tint(50).toString(), "hover-text-color": `var(${n.cssVarName("color-white")})`, "hover-bg-color": o, "hover-border-color": o, "active-bg-color": s, "active-text-color": `var(${n.cssVarName("color-white")})`, "active-border-color": s }), t.value && (r[n.cssVarBlockName("disabled-bg-color")] = e.dark ? ks(i, 90) : i.tint(90).toString(), r[n.cssVarBlockName("disabled-text-color")] = e.dark ? ks(i, 50) : i.tint(50).toString(), r[n.cssVarBlockName("disabled-border-color")] = e.dark ? ks(i, 80) : i.tint(80).toString()); else { const l = e.dark ? ks(i, 30) : i.tint(30).toString(), u = i.isDark() ? `var(${n.cssVarName("color-white")})` : `var(${n.cssVarName("color-black")})`; if (r = n.cssVarBlock({ "bg-color": o, "text-color": u, "border-color": o, "hover-bg-color": l, "hover-text-color": u, "hover-border-color": l, "active-bg-color": s, "active-border-color": s }), t.value) { const c = e.dark ? ks(i, 50) : i.tint(50).toString(); r[n.cssVarBlockName("disabled-bg-color")] = c, 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")] = c; } } } return r; }); } const pre = W({ name: "ElButton" }), fre = /* @__PURE__ */ W({ ...pre, props: xC, emits: Zne, setup(e, { expose: t, emit: n }) { const r = e, o = dre(r), a = Mt("button"), { _ref: i, _size: s, _type: l, _disabled: u, _props: c, shouldAddSpace: d, handleClick: p } = Wne(r, n), h = E(() => [ a.b(), a.m(l.value), a.m(s.value), a.is("disabled", u.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: i, size: s, type: l, disabled: u, shouldAddSpace: d }), (f, v) => (S(), re(yt(f.tag), Et({ ref_key: "_ref", ref: i }, y(c), { class: y(h), style: y(o), onClick: y(p) }), { default: N(() => [ f.loading ? (S(), L(Re, { key: 0 }, [ f.$slots.loading ? ue(f.$slots, "loading", { key: 0 }) : (S(), re(y(Er), { key: 1, class: H(y(a).is("loading")) }, { default: N(() => [ (S(), re(yt(f.loadingIcon))) ]), _: 1 }, 8, ["class"])) ], 64)) : f.icon || f.$slots.icon ? (S(), re(y(Er), { key: 1 }, { default: N(() => [ f.icon ? (S(), re(yt(f.icon), { key: 0 })) : ue(f.$slots, "icon", { key: 1 }) ]), _: 3 })) : J("v-if", !0), f.$slots.default ? (S(), L("span", { key: 2, class: H({ [y(a).em("text", "expand")]: y(d) }) }, [ ue(f.$slots, "default") ], 2)) : J("v-if", !0) ]), _: 3 }, 16, ["class", "style", "onClick"])); } }); var hre = /* @__PURE__ */ Ot(fre, [["__file", "button.vue"]]); const vre = { size: xC.size, type: xC.type }, gre = W({ name: "ElButtonGroup" }), mre = /* @__PURE__ */ W({ ...gre, props: vre, setup(e) { const t = e; nt(rM, en({ size: St(t, "size"), type: St(t, "type") })); const n = Mt("button"); return (r, o) => (S(), L("div", { class: H(y(n).b("group")) }, [ ue(r.$slots, "default") ], 2)); } }); var aM = /* @__PURE__ */ Ot(mre, [["__file", "button-group.vue"]]); const qf = dr(hre, { ButtonGroup: aM }); To(aM); var yre = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}; function iM(e) { return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e; } const Fs = /* @__PURE__ */ new Map(); if (ur) { let e; document.addEventListener("mousedown", (t) => e = t), document.addEventListener("mouseup", (t) => { if (e) { for (const n of Fs.values()) for (const { documentHandler: r } of n) r(t, e); e = void 0; } }); } function Z3(e, t) { let n = []; return Array.isArray(t.arg) ? n = t.arg : Zl(t.arg) && n.push(t.arg), function(r, o) { const a = t.instance.popperRef, i = r.target, s = o == null ? void 0 : o.target, l = !t || !t.instance, u = !i || !s, c = e.contains(i) || e.contains(s), d = e === i, p = n.length && n.some((f) => f == null ? void 0 : f.contains(i)) || n.length && n.includes(s), h = a && (a.contains(i) || a.contains(s)); l || u || c || d || p || h || t.value(r, o); }; } const bre = { beforeMount(e, t) { Fs.has(e) || Fs.set(e, []), Fs.get(e).push({ documentHandler: Z3(e, t), bindingFn: t.value }); }, updated(e, t) { Fs.has(e) || Fs.set(e, []); const n = Fs.get(e), r = n.findIndex((a) => a.bindingFn === t.oldValue), o = { documentHandler: Z3(e, t), bindingFn: t.value }; r >= 0 ? n.splice(r, 1, o) : n.push(o); }, unmounted(e) { Fs.delete(e); } }, sM = { 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: Tu, tabindex: [String, Number], validateEvent: { type: Boolean, default: !0 }, ...ds(["ariaControls"]) }, lM = { [Vn]: (e) => wr(e) || Zn(e) || Qs(e), change: (e) => wr(e) || Zn(e) || Qs(e) }, pd = Symbol("checkboxGroupContextKey"), wre = ({ model: e, isChecked: t }) => { const n = be(pd, void 0), r = E(() => { var a, i; const s = (a = n == null ? void 0 : n.max) == null ? void 0 : a.value, l = (i = n == null ? void 0 : n.min) == null ? void 0 : i.value; return !js(s) && e.value.length >= s && !t.value || !js(l) && e.value.length <= l && t.value; }); return { isDisabled: dd(E(() => (n == null ? void 0 : n.disabled.value) || r.value)), isLimitDisabled: r }; }, xre = (e, { model: t, isLimitExceeded: n, hasOwnLabel: r, isDisabled: o, isLabeledByFormItem: a }) => { const i = be(pd, void 0), { formItem: s } = Au(), { emit: l } = st(); function u(f) { var v, m, g, b; return [!0, e.trueValue, e.trueLabel].includes(f) ? (m = (v = e.trueValue) != null ? v : e.trueLabel) != null ? m : !0 : (b = (g = e.falseValue) != null ? g : e.falseLabel) != null ? b : !1; } function c(f, v) { l("change", u(f), v); } function d(f) { if (n.value) return; const v = f.target; l("change", u(v.checked), f); } async function p(f) { n.value || !r.value && !o.value && a.value && (f.composedPath().some((g) => g.tagName === "LABEL") || (t.value = u([!1, e.falseValue, e.falseLabel].includes(t.value)), await Ke(), c(t.value, f))); } const h = E(() => (i == null ? void 0 : i.validateEvent) || e.validateEvent); return he(() => e.modelValue, () => { h.value && (s == null || s.validate("change").catch((f) => xr(f))); }), { handleChange: d, onClickRoot: p }; }, kre = (e) => { const t = z(!1), { emit: n } = st(), r = be(pd, void 0), o = E(() => js(r) === !1), a = z(!1), i = E({ get() { var s, l; return o.value ? (s = r == null ? void 0 : r.modelValue) == null ? void 0 : s.value : (l = e.modelValue) != null ? l : t.value; }, set(s) { var l, u; o.value && yr(s) ? (a.value = ((l = r == null ? void 0 : r.max) == null ? void 0 : l.value) !== void 0 && s.length > (r == null ? void 0 : r.max.value) && s.length > i.value.length, a.value === !1 && ((u = r == null ? void 0 : r.changeEvent) == null || u.call(r, s))) : (n(Vn, s), t.value = s); } }); return { model: i, isGroup: o, isLimitExceeded: a }; }, Cre = (e, t, { model: n }) => { const r = be(pd, void 0), o = z(!1), a = E(() => qp(e.value) ? e.label : e.value), i = E(() => { const c = n.value; return Qs(c) ? c : yr(c) ? Fr(a.value) ? c.map(ra).some((d) => Sg(d, a.value)) : c.map(ra).includes(a.value) : c != null ? c === e.trueValue || c === e.trueLabel : !!c; }), s = tl(E(() => { var c; return (c = r == null ? void 0 : r.size) == null ? void 0 : c.value; }), { prop: !0 }), l = tl(E(() => { var c; return (c = r == null ? void 0 : r.size) == null ? void 0 : c.value; })), u = E(() => !!t.default || !qp(a.value)); return { checkboxButtonSize: s, isChecked: i, isFocused: o, checkboxSize: l, hasOwnLabel: u, actualValue: a }; }, uM = (e, t) => { const { formItem: n } = Au(), { model: r, isGroup: o, isLimitExceeded: a } = kre(e), { isFocused: i, isChecked: s, checkboxButtonSize: l, checkboxSize: u, hasOwnLabel: c, actualValue: d } = Cre(e, t, { model: r }), { isDisabled: p } = wre({ model: r, isChecked: s }), { inputId: h, isLabeledByFormItem: f } = Uf(e, { formItemContext: n, disableIdGeneration: c, disableIdManagement: o }), { handleChange: v, onClickRoot: m } = xre(e, { model: r, isLimitExceeded: a, hasOwnLabel: c, isDisabled: p, isLabeledByFormItem: f }); return (() => { function b() { var x, w; yr(r.value) && !r.value.includes(d.value) ? r.value.push(d.value) : r.value = (w = (x = e.trueValue) != null ? x : e.trueLabel) != null ? w : !0; } e.checked && b(); })(), Sp({ from: "label act as value", replacement: "value", version: "3.0.0", scope: "el-checkbox", ref: "https://element-plus.org/en-US/component/checkbox.html" }, E(() => o.value && qp(e.value))), Sp({ from: "true-label", replacement: "true-value", version: "3.0.0", scope: "el-checkbox", ref: "https://element-plus.org/en-US/component/checkbox.html" }, E(() => !!e.trueLabel)), Sp({ from: "false-label", replacement: "false-value", version: "3.0.0", scope: "el-checkbox", ref: "https://element-plus.org/en-US/component/checkbox.html" }, E(() => !!e.falseLabel)), { inputId: h, isLabeledByFormItem: f, isChecked: s, isDisabled: p, isFocused: i, checkboxButtonSize: l, checkboxSize: u, hasOwnLabel: c, model: r, actualValue: d, handleChange: v, onClickRoot: m }; }, _re = W({ name: "ElCheckbox" }), Sre = /* @__PURE__ */ W({ ..._re, props: sM, emits: lM, setup(e) { const t = e, n = Dr(), { inputId: r, isLabeledByFormItem: o, isChecked: a, isDisabled: i, isFocused: s, checkboxSize: l, hasOwnLabel: u, model: c, actualValue: d, handleChange: p, onClickRoot: h } = uM(t, n), f = Mt("checkbox"), v = E(() => [ f.b(), f.m(l.value), f.is("disabled", i.value), f.is("bordered", t.border), f.is("checked", a.value) ]), m = E(() => [ f.e("input"), f.is("disabled", i.value), f.is("checked", a.value), f.is("indeterminate", t.indeterminate), f.is("focus", s.value) ]); return (g, b) => (S(), re(yt(!y(u) && y(o) ? "span" : "label"), { class: H(y(v)), "aria-controls": g.indeterminate ? g.ariaControls : null, onClick: y(h) }, { default: N(() => { var x, w, k, C; return [ D("span", { class: H(y(m)) }, [ g.trueValue || g.falseValue || g.trueLabel || g.falseLabel ? Be((S(), L("input", { key: 0, id: y(r), "onUpdate:modelValue": (_) => xn(c) ? c.value = _ : null, class: H(y(f).e("original")), type: "checkbox", indeterminate: g.indeterminate, name: g.name, tabindex: g.tabindex, disabled: y(i), "true-value": (w = (x = g.trueValue) != null ? x : g.trueLabel) != null ? w : !0, "false-value": (C = (k = g.falseValue) != null ? k : g.falseLabel) != null ? C : !1, onChange: y(p), onFocus: (_) => s.value = !0, onBlur: (_) => s.value = !1, onClick: Ge(() => { }, ["stop"]) }, null, 42, ["id", "onUpdate:modelValue", "indeterminate", "name", "tabindex", "disabled", "true-value", "false-value", "onChange", "onFocus", "onBlur", "onClick"])), [ [oa, y(c)] ]) : Be((S(), L("input", { key: 1, id: y(r), "onUpdate:modelValue": (_) => xn(c) ? c.value = _ : null, class: H(y(f).e("original")), type: "checkbox", indeterminate: g.indeterminate, disabled: y(i), value: y(d), name: g.name, tabindex: g.tabindex, onChange: y(p), onFocus: (_) => s.value = !0, onBlur: (_) => s.value = !1, onClick: Ge(() => { }, ["stop"]) }, null, 42, ["id", "onUpdate:modelValue", "indeterminate", "disabled", "value", "name", "tabindex", "onChange", "onFocus", "onBlur", "onClick"])), [ [oa, y(c)] ]), D("span", { class: H(y(f).e("inner")) }, null, 2) ], 2), y(u) ? (S(), L("span", { key: 0, class: H(y(f).e("label")) }, [ ue(g.$slots, "default"), g.$slots.default ? J("v-if", !0) : (S(), L(Re, { key: 0 }, [ Oe(ge(g.label), 1) ], 64)) ], 2)) : J("v-if", !0) ]; }), _: 3 }, 8, ["class", "aria-controls", "onClick"])); } }); var $re = /* @__PURE__ */ Ot(Sre, [["__file", "checkbox.vue"]]); const Ere = W({ name: "ElCheckboxButton" }), Ore = /* @__PURE__ */ W({ ...Ere, props: sM, emits: lM, setup(e) { const t = e, n = Dr(), { isFocused: r, isChecked: o, isDisabled: a, checkboxButtonSize: i, model: s, actualValue: l, handleChange: u } = uM(t, n), c = be(pd, void 0), d = Mt("checkbox"), p = E(() => { var f, v, m, g; const b = (v = (f = c == null ? void 0 : c.fill) == null ? void 0 : f.value) != null ? v : ""; return { backgroundColor: b, borderColor: b, color: (g = (m = c == null ? void 0 : c.textColor) == null ? void 0 : m.value) != null ? g : "", boxShadow: b ? `-1px 0 0 0 ${b}` : void 0 }; }), h = E(() => [ d.b("button"), d.bm("button", i.value), d.is("disabled", a.value), d.is("checked", o.value), d.is("focus", r.value) ]); return (f, v) => { var m, g, b, x; return S(), L("label", { class: H(y(h)) }, [ f.trueValue || f.falseValue || f.trueLabel || f.falseLabel ? Be((S(), L("input", { key: 0, "onUpdate:modelValue": (w) => xn(s) ? s.value = w : null, class: H(y(d).be("button", "original")), type: "checkbox", name: f.name, tabindex: f.tabindex, disabled: y(a), "true-value": (g = (m = f.trueValue) != null ? m : f.trueLabel) != null ? g : !0, "false-value": (x = (b = f.falseValue) != null ? b : f.falseLabel) != null ? x : !1, onChange: y(u), onFocus: (w) => r.value = !0, onBlur: (w) => r.value = !1, onClick: Ge(() => { }, ["stop"]) }, null, 42, ["onUpdate:modelValue", "name", "tabindex", "disabled", "true-value", "false-value", "onChange", "onFocus", "onBlur", "onClick"])), [ [oa, y(s)] ]) : Be((S(), L("input", { key: 1, "onUpdate:modelValue": (w) => xn(s) ? s.value = w : null, class: H(y(d).be("button", "original")), type: "checkbox", name: f.name, tabindex: f.tabindex, disabled: y(a), value: y(l), onChange: y(u), onFocus: (w) => r.value = !0, onBlur: (w) => r.value = !1, onClick: Ge(() => { }, ["stop"]) }, null, 42, ["onUpdate:modelValue", "name", "tabindex", "disabled", "value", "onChange", "onFocus", "onBlur", "onClick"])), [ [oa, y(s)] ]), f.$slots.default || f.label ? (S(), L("span", { key: 2, class: H(y(d).be("button", "inner")), style: Ye(y(o) ? y(p) : void 0) }, [ ue(f.$slots, "default", {}, () => [ Oe(ge(f.label), 1) ]) ], 6)) : J("v-if", !0) ], 2); }; } }); var cM = /* @__PURE__ */ Ot(Ore, [["__file", "checkbox-button.vue"]]); const Fre = Vt({ modelValue: { type: bt(Array), default: () => [] }, disabled: Boolean, min: Number, max: Number, size: Tu, fill: String, textColor: String, tag: { type: String, default: "div" }, validateEvent: { type: Boolean, default: !0 }, ...ds(["ariaLabel"]) }), Tre = { [Vn]: (e) => yr(e), change: (e) => yr(e) }, Are = W({ name: "ElCheckboxGroup" }), Ire = /* @__PURE__ */ W({ ...Are, props: Fre, emits: Tre, setup(e, { emit: t }) { const n = e, r = Mt("checkbox"), { formItem: o } = Au(), { inputId: a, isLabeledByFormItem: i } = Uf(n, { formItemContext: o }), s = async (u) => { t(Vn, u), await Ke(), t("change", u); }, l = E({ get() { return n.modelValue; }, set(u) { s(u); } }); return nt(pd, { ...lN(Cr(n), [ "size", "min", "max", "disabled", "validateEvent", "fill", "textColor" ]), modelValue: l, changeEvent: s }), he(() => n.modelValue, () => { n.validateEvent && (o == null || o.validate("change").catch((u) => xr(u))); }), (u, c) => { var d; return S(), re(yt(u.tag), { id: y(a), class: H(y(r).b("group")), role: "group", "aria-label": y(i) ? void 0 : u.ariaLabel || "checkbox-group", "aria-labelledby": y(i) ? (d = y(o)) == null ? void 0 : d.labelId : void 0 }, { default: N(() => [ ue(u.$slots, "default") ]), _: 3 }, 8, ["id", "class", "aria-label", "aria-labelledby"]); }; } }); var dM = /* @__PURE__ */ Ot(Ire, [["__file", "checkbox-group.vue"]]); const pM = dr($re, { CheckboxButton: cM, CheckboxGroup: dM }); To(cM); To(dM); const fM = Vt({ modelValue: { type: [String, Number, Boolean], default: void 0 }, size: Tu, disabled: Boolean, label: { type: [String, Number, Boolean], default: void 0 }, value: { type: [String, Number, Boolean], default: void 0 }, name: { type: String, default: void 0 } }), Pre = Vt({ ...fM, border: Boolean }), hM = { [Vn]: (e) => wr(e) || Zn(e) || Qs(e), [Fu]: (e) => wr(e) || Zn(e) || Qs(e) }, vM = Symbol("radioGroupKey"), gM = (e, t) => { const n = z(), r = be(vM, void 0), o = E(() => !!r), a = E(() => qp(e.value) ? e.label : e.value), i = E({ get() { return o.value ? r.modelValue : e.modelValue; }, set(d) { o.value ? r.changeEvent(d) : t && t(Vn, d), n.value.checked = e.modelValue === a.value; } }), s = tl(E(() => r == null ? void 0 : r.size)), l = dd(E(() => r == null ? void 0 : r.disabled)), u = z(!1), c = E(() => l.value || o.value && i.value !== a.value ? -1 : 0); return Sp({ from: "label act as value", replacement: "value", version: "3.0.0", scope: "el-radio", ref: "https://element-plus.org/en-US/component/radio.html" }, E(() => o.value && qp(e.value))), { radioRef: n, isGroup: o, radioGroup: r, focus: u, size: s, disabled: l, tabIndex: c, modelValue: i, actualValue: a }; }, Lre = W({ name: "ElRadio" }), Rre = /* @__PURE__ */ W({ ...Lre, props: Pre, emits: hM, setup(e, { emit: t }) { const n = e, r = Mt("radio"), { radioRef: o, radioGroup: a, focus: i, size: s, disabled: l, modelValue: u, actualValue: c } = gM(n, t); function d() { Ke(() => t("change", u.value)); } return (p, h) => { var f; return S(), L("label", { class: H([ y(r).b(), y(r).is("disabled", y(l)), y(r).is("focus", y(i)), y(r).is("bordered", p.border), y(r).is("checked", y(u) === y(c)), y(r).m(y(s)) ]) }, [ D("span", { class: H([ y(r).e("input"), y(r).is("disabled", y(l)), y(r).is("checked", y(u) === y(c)) ]) }, [ Be(D("input", { ref_key: "radioRef", ref: o, "onUpdate:modelValue": (v) => xn(u) ? u.value = v : null, class: H(y(r).e("original")), value: y(c), name: p.name || ((f = y(a)) == null ? void 0 : f.name), disabled: y(l), checked: y(u) === y(c), type: "radio", onFocus: (v) => i.value = !0, onBlur: (v) => i.value = !1, onChange: d, onClick: Ge(() => { }, ["stop"]) }, null, 42, ["onUpdate:modelValue", "value", "name", "disabled", "checked", "onFocus", "onBlur", "onClick"]), [ [F0, y(u)] ]), D("span", { class: H(y(r).e("inner")) }, null, 2) ], 2), D("span", { class: H(y(r).e("label")), onKeydown: Ge(() => { }, ["stop"]) }, [ ue(p.$slots, "default", {}, () => [ Oe(ge(p.label), 1) ]) ], 42, ["onKeydown"]) ], 2); }; } }); var Nre = /* @__PURE__ */ Ot(Rre, [["__file", "radio.vue"]]); const Mre = Vt({ ...fM }), Dre = W({ name: "ElRadioButton" }), Bre = /* @__PURE__ */ W({ ...Dre, props: Mre, setup(e) { const t = e, n = Mt("radio"), { radioRef: r, focus: o, size: a, disabled: i, modelValue: s, radioGroup: l, actualValue: u } = gM(t), c = E(() => ({ 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 (d, p) => { var h; return S(), L("label", { class: H([ y(n).b("button"), y(n).is("active", y(s) === y(u)), y(n).is("disabled", y(i)), y(n).is("focus", y(o)), y(n).bm("button", y(a)) ]) }, [ Be(D("input", { ref_key: "radioRef", ref: r, "onUpdate:modelValue": (f) => xn(s) ? s.value = f : null, class: H(y(n).be("button", "original-radio")), value: y(u), type: "radio", name: d.name || ((h = y(l)) == null ? void 0 : h.name), disabled: y(i), onFocus: (f) => o.value = !0, onBlur: (f) => o.value = !1, onClick: Ge(() => { }, ["stop"]) }, null, 42, ["onUpdate:modelValue", "value", "name", "disabled", "onFocus", "onBlur", "onClick"]), [ [F0, y(s)] ]), D("span", { class: H(y(n).be("button", "inner")), style: Ye(y(s) === y(u) ? y(c) : {}), onKeydown: Ge(() => { }, ["stop"]) }, [ ue(d.$slots, "default", {}, () => [ Oe(ge(d.label), 1) ]) ], 46, ["onKeydown"]) ], 2); }; } }); var mM = /* @__PURE__ */ Ot(Bre, [["__file", "radio-button.vue"]]); const zre = Vt({ id: { type: String, default: void 0 }, size: Tu, 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 }, ...ds(["ariaLabel"]) }), jre = hM, Vre = W({ name: "ElRadioGroup" }), Hre = /* @__PURE__ */ W({ ...Vre, props: zre, emits: jre, setup(e, { emit: t }) { const n = e, r = Mt("radio"), o = ml(), a = z(), { formItem: i } = Au(), { inputId: s, isLabeledByFormItem: l } = Uf(n, { formItemContext: i }), u = (d) => { t(Vn, d), Ke(() => t("change", d)); }; ut(() => { const d = a.value.querySelectorAll("[type=radio]"), p = d[0]; !Array.from(d).some((h) => h.checked) && p && (p.tabIndex = 0); }); const c = E(() => n.name || o.value); return nt(vM, en({ ...Cr(n), changeEvent: u, name: c })), he(() => n.modelValue, () => { n.validateEvent && (i == null || i.validate("change").catch((d) => xr(d))); }), (d, p) => (S(), L("div", { id: y(s), ref_key: "radioGroupRef", ref: a, class: H(y(r).b("group")), role: "radiogroup", "aria-label": y(l) ? void 0 : d.ariaLabel || "radio-group", "aria-labelledby": y(l) ? y(i).labelId : void 0 }, [ ue(d.$slots, "default") ], 10, ["id", "aria-label", "aria-labelledby"])); } }); var yM = /* @__PURE__ */ Ot(Hre, [["__file", "radio-group.vue"]]); const bM = dr(Nre, { RadioButton: mM, RadioGroup: yM }), wM = To(yM), Ure = To(mM), CC = Vt({ type: { type: String, values: ["primary", "success", "info", "warning", "danger"], default: "primary" }, closable: Boolean, disableTransitions: Boolean, hit: Boolean, color: String, size: { type: String, values: wN }, effect: { type: String, values: ["dark", "light", "plain"], default: "light" }, round: Boolean }), qre = { close: (e) => e instanceof MouseEvent, click: (e) => e instanceof MouseEvent }, Kre = W({ name: "ElTag" }), Gre = /* @__PURE__ */ W({ ...Kre, props: CC, emits: qre, setup(e, { emit: t }) { const n = e, r = tl(), o = Mt("tag"), a = E(() => { const { type: u, hit: c, effect: d, closable: p, round: h } = n; return [ o.b(), o.is("closable", p), o.m(u || "primary"), o.m(r.value), o.m(d), o.is("hit", c), o.is("round", h) ]; }), i = (u) => { t("close", u); }, s = (u) => { t("click", u); }, l = (u) => { u.component.subTree.component.bum = null; }; return (u, c) => u.disableTransitions ? (S(), L("span", { key: 0, class: H(y(a)), style: Ye({ backgroundColor: u.color }), onClick: s }, [ D("span", { class: H(y(o).e("content")) }, [ ue(u.$slots, "default") ], 2), u.closable ? (S(), re(y(Er), { key: 0, class: H(y(o).e("close")), onClick: Ge(i, ["stop"]) }, { default: N(() => [ q(y(Bo)) ]), _: 1 }, 8, ["class", "onClick"])) : J("v-if", !0) ], 6)) : (S(), re(nr, { key: 1, name: `${y(o).namespace.value}-zoom-in-center`, appear: "", onVnodeMounted: l }, { default: N(() => [ D("span", { class: H(y(a)), style: Ye({ backgroundColor: u.color }), onClick: s }, [ D("span", { class: H(y(o).e("content")) }, [ ue(u.$slots, "default") ], 2), u.closable ? (S(), re(y(Er), { key: 0, class: H(y(o).e("close")), onClick: Ge(i, ["stop"]) }, { default: N(() => [ q(y(Bo)) ]), _: 1 }, 8, ["class", "onClick"])) : J("v-if", !0) ], 6) ]), _: 3 }, 8, ["name"])); } }); var Wre = /* @__PURE__ */ Ot(Gre, [["__file", "tag.vue"]]); const Yre = dr(Wre), xM = Symbol("rowContextKey"), Xre = [ "start", "center", "end", "space-around", "space-between", "space-evenly" ], Zre = ["top", "middle", "bottom"], Jre = Vt({ tag: { type: String, default: "div" }, gutter: { type: Number, default: 0 }, justify: { type: String, values: Xre, default: "start" }, align: { type: String, values: Zre } }), Qre = W({ name: "ElRow" }), eoe = /* @__PURE__ */ W({ ...Qre, props: Jre, setup(e) { const t = e, n = Mt("row"), r = E(() => t.gutter); nt(xM, { gutter: r }); const o = E(() => { const i = {}; return t.gutter && (i.marginRight = i.marginLeft = `-${t.gutter / 2}px`), i; }), a = E(() => [ n.b(), n.is(`justify-${t.justify}`, t.justify !== "start"), n.is(`align-${t.align}`, !!t.align) ]); return (i, s) => (S(), re(yt(i.tag), { class: H(y(a)), style: Ye(y(o)) }, { default: N(() => [ ue(i.$slots, "default") ]), _: 3 }, 8, ["class", "style"])); } }); var toe = /* @__PURE__ */ Ot(eoe, [["__file", "row.vue"]]); const W0 = dr(toe), noe = Vt({ 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: bt([Number, Object]), default: () => jl({}) }, sm: { type: bt([Number, Object]), default: () => jl({}) }, md: { type: bt([Number, Object]), default: () => jl({}) }, lg: { type: bt([Number, Object]), default: () => jl({}) }, xl: { type: bt([Number, Object]), default: () => jl({}) } }), roe = W({ name: "ElCol" }), ooe = /* @__PURE__ */ W({ ...roe, props: noe, setup(e) { const t = e, { gutter: n } = be(xM, { gutter: E(() => 0) }), r = Mt("col"), o = E(() => { const i = {}; return n.value && (i.paddingLeft = i.paddingRight = `${n.value / 2}px`), i; }), a = E(() => { const i = []; return ["span", "offset", "pull", "push"].forEach((u) => { const c = t[u]; Zn(c) && (u === "span" ? i.push(r.b(`${t[u]}`)) : c > 0 && i.push(r.b(`${u}-${t[u]}`))); }), ["xs", "sm", "md", "lg", "xl"].forEach((u) => { Zn(t[u]) ? i.push(r.b(`${u}-${t[u]}`)) : Fr(t[u]) && Object.entries(t[u]).forEach(([c, d]) => { i.push(c !== "span" ? r.b(`${u}-${c}-${d}`) : r.b(`${u}-${d}`)); }); }), n.value && i.push(r.is("guttered")), [r.b(), i]; }); return (i, s) => (S(), re(yt(i.tag), { class: H(y(a)), style: Ye(y(o)) }, { default: N(() => [ ue(i.$slots, "default") ]), _: 3 }, 8, ["class", "style"])); } }); var aoe = /* @__PURE__ */ Ot(ooe, [["__file", "col.vue"]]); const kM = dr(aoe), J3 = (e) => Zn(e) || wr(e) || yr(e), ioe = Vt({ accordion: Boolean, modelValue: { type: bt([Array, String, Number]), default: () => jl([]) } }), soe = { [Vn]: J3, [Fu]: J3 }, CM = Symbol("collapseContextKey"), loe = (e, t) => { const n = z(Ma(e.modelValue)), r = (a) => { n.value = a; const i = e.accordion ? n.value[0] : n.value; t(Vn, i), t(Fu, i); }, o = (a) => { if (e.accordion) r([n.value[0] === a ? "" : a]); else { const i = [...n.value], s = i.indexOf(a); s > -1 ? i.splice(s, 1) : i.push(a), r(i); } }; return he(() => e.modelValue, () => n.value = Ma(e.modelValue), { deep: !0 }), nt(CM, { activeNames: n, handleItemClick: o }), { activeNames: n, setActiveNames: r }; }, uoe = () => { const e = Mt("collapse"); return { rootKls: E(() => e.b()) }; }, coe = W({ name: "ElCollapse" }), doe = /* @__PURE__ */ W({ ...coe, props: ioe, emits: soe, setup(e, { expose: t, emit: n }) { const r = e, { activeNames: o, setActiveNames: a } = loe(r, n), { rootKls: i } = uoe(); return t({ activeNames: o, setActiveNames: a }), (s, l) => (S(), L("div", { class: H(y(i)) }, [ ue(s.$slots, "default") ], 2)); } }); var poe = /* @__PURE__ */ Ot(doe, [["__file", "collapse.vue"]]); const foe = W({ name: "ElCollapseTransition" }), hoe = /* @__PURE__ */ W({ ...foe, setup(e) { const t = Mt("collapse-transition"), n = (o) => { o.style.maxHeight = "", o.style.overflow = o.dataset.oldOverflow, o.style.paddingTop = o.dataset.oldPaddingTop, o.style.paddingBottom = o.dataset.oldPaddingBottom; }, r = { beforeEnter(o) { o.dataset || (o.dataset = {}), o.dataset.oldPaddingTop = o.style.paddingTop, o.dataset.oldPaddingBottom = o.style.paddingBottom, o.style.height && (o.dataset.elExistsHeight = o.style.height), o.style.maxHeight = 0, o.style.paddingTop = 0, o.style.paddingBottom = 0; }, enter(o) { requestAnimationFrame(() => { o.dataset.oldOverflow = o.style.overflow, o.dataset.elExistsHeight ? o.style.maxHeight = o.dataset.elExistsHeight : o.scrollHeight !== 0 ? o.style.maxHeight = `${o.scrollHeight}px` : o.style.maxHeight = 0, o.style.paddingTop = o.dataset.oldPaddingTop, o.style.paddingBottom = o.dataset.oldPaddingBottom, o.style.overflow = "hidden"; }); }, afterEnter(o) { o.style.maxHeight = "", o.style.overflow = o.dataset.oldOverflow; }, enterCancelled(o) { n(o); }, beforeLeave(o) { o.dataset || (o.dataset = {}), o.dataset.oldPaddingTop = o.style.paddingTop, o.dataset.oldPaddingBottom = o.style.paddingBottom, o.dataset.oldOverflow = o.style.overflow, o.style.maxHeight = `${o.scrollHeight}px`, o.style.overflow = "hidden"; }, leave(o) { o.scrollHeight !== 0 && (o.style.maxHeight = 0, o.style.paddingTop = 0, o.style.paddingBottom = 0); }, afterLeave(o) { n(o); }, leaveCancelled(o) { n(o); } }; return (o, a) => (S(), re(nr, Et({ name: y(t).b() }, M9(r)), { default: N(() => [ ue(o.$slots, "default") ]), _: 3 }, 16, ["name"])); } }); var voe = /* @__PURE__ */ Ot(hoe, [["__file", "collapse-transition.vue"]]); const goe = dr(voe), moe = Vt({ title: { type: String, default: "" }, name: { type: bt([String, Number]), default: void 0 }, icon: { type: el, default: jf }, disabled: Boolean }), yoe = (e) => { const t = be(CM), { namespace: n } = Mt("collapse"), r = z(!1), o = z(!1), a = wS(), i = E(() => a.current++), s = E(() => { var p; return (p = e.name) != null ? p : `${n.value}-id-${a.prefix}-${y(i)}`; }), l = E(() => t == null ? void 0 : t.activeNames.value.includes(y(s))); return { focusing: r, id: i, isActive: l, handleFocus: () => { setTimeout(() => { o.value ? o.value = !1 : r.value = !0; }, 50); }, handleHeaderClick: () => { e.disabled || (t == null || t.handleItemClick(y(s)), r.value = !1, o.value = !0); }, handleEnterClick: () => { t == null || t.handleItemClick(y(s)); } }; }, boe = (e, { focusing: t, isActive: n, id: r }) => { const o = Mt("collapse"), a = E(() => [ o.b("item"), o.is("active", y(n)), o.is("disabled", e.disabled) ]), i = E(() => [ o.be("item", "header"), o.is("active", y(n)), { focusing: y(t) && !e.disabled } ]), s = E(() => [ o.be("item", "arrow"), o.is("active", y(n)) ]), l = E(() => o.be("item", "wrap")), u = E(() => o.be("item", "content")), c = E(() => o.b(`content-${y(r)}`)), d = E(() => o.b(`head-${y(r)}`)); return { arrowKls: s, headKls: i, rootKls: a, itemWrapperKls: l, itemContentKls: u, scopedContentId: c, scopedHeadId: d }; }, woe = W({ name: "ElCollapseItem" }), xoe = /* @__PURE__ */ W({ ...woe, props: moe, setup(e, { expose: t }) { const n = e, { focusing: r, id: o, isActive: a, handleFocus: i, handleHeaderClick: s, handleEnterClick: l } = yoe(n), { arrowKls: u, headKls: c, rootKls: d, itemWrapperKls: p, itemContentKls: h, scopedContentId: f, scopedHeadId: v } = boe(n, { focusing: r, isActive: a, id: o }); return t({ isActive: a }), (m, g) => (S(), L("div", { class: H(y(d)) }, [ D("button", { id: y(v), class: H(y(c)), "aria-expanded": y(a), "aria-controls": y(f), "aria-describedby": y(f), tabindex: m.disabled ? -1 : 0, type: "button", onClick: y(s), onKeydown: wn(Ge(y(l), ["stop", "prevent"]), ["space", "enter"]), onFocus: y(i), onBlur: (b) => r.value = !1 }, [ ue(m.$slots, "title", {}, () => [ Oe(ge(m.title), 1) ]), ue(m.$slots, "icon", { isActive: y(a) }, () => [ q(y(Er), { class: H(y(u)) }, { default: N(() => [ (S(), re(yt(m.icon))) ]), _: 1 }, 8, ["class"]) ]) ], 42, ["id", "aria-expanded", "aria-controls", "aria-describedby", "tabindex", "onClick", "onKeydown", "onFocus", "onBlur"]), q(y(goe), null, { default: N(() => [ Be(D("div", { id: y(f), role: "region", class: H(y(p)), "aria-hidden": !y(a), "aria-labelledby": y(v) }, [ D("div", { class: H(y(h)) }, [ ue(m.$slots, "default") ], 2) ], 10, ["id", "aria-hidden", "aria-labelledby"]), [ [ht, y(a)] ]) ]), _: 3 }) ], 2)); } }); var _M = /* @__PURE__ */ Ot(xoe, [["__file", "collapse-item.vue"]]); const koe = dr(poe, { CollapseItem: _M }), Coe = To(_M), _oe = W({ name: "ElContainer" }), Soe = /* @__PURE__ */ W({ ..._oe, props: { direction: { type: String } }, setup(e) { const t = e, n = Dr(), r = Mt("container"), o = E(() => t.direction === "vertical" ? !0 : t.direction === "horizontal" ? !1 : n && n.default ? n.default().some((i) => { const s = i.type.name; return s === "ElHeader" || s === "ElFooter"; }) : !1); return (a, i) => (S(), L("section", { class: H([y(r).b(), y(r).is("vertical", y(o))]) }, [ ue(a.$slots, "default") ], 2)); } }); var $oe = /* @__PURE__ */ Ot(Soe, [["__file", "container.vue"]]); const Eoe = W({ name: "ElAside" }), Ooe = /* @__PURE__ */ W({ ...Eoe, props: { width: { type: String, default: null } }, setup(e) { const t = e, n = Mt("aside"), r = E(() => t.width ? n.cssVarBlock({ width: t.width }) : {}); return (o, a) => (S(), L("aside", { class: H(y(n).b()), style: Ye(y(r)) }, [ ue(o.$slots, "default") ], 6)); } }); var SM = /* @__PURE__ */ Ot(Ooe, [["__file", "aside.vue"]]); const Foe = W({ name: "ElFooter" }), Toe = /* @__PURE__ */ W({ ...Foe, props: { height: { type: String, default: null } }, setup(e) { const t = e, n = Mt("footer"), r = E(() => t.height ? n.cssVarBlock({ height: t.height }) : {}); return (o, a) => (S(), L("footer", { class: H(y(n).b()), style: Ye(y(r)) }, [ ue(o.$slots, "default") ], 6)); } }); var $M = /* @__PURE__ */ Ot(Toe, [["__file", "footer.vue"]]); const Aoe = W({ name: "ElHeader" }), Ioe = /* @__PURE__ */ W({ ...Aoe, props: { height: { type: String, default: null } }, setup(e) { const t = e, n = Mt("header"), r = E(() => t.height ? n.cssVarBlock({ height: t.height }) : {}); return (o, a) => (S(), L("header", { class: H(y(n).b()), style: Ye(y(r)) }, [ ue(o.$slots, "default") ], 6)); } }); var EM = /* @__PURE__ */ Ot(Ioe, [["__file", "header.vue"]]); const Poe = W({ name: "ElMain" }), Loe = /* @__PURE__ */ W({ ...Poe, setup(e) { const t = Mt("main"); return (n, r) => (S(), L("main", { class: H(y(t).b()) }, [ ue(n.$slots, "default") ], 2)); } }); var OM = /* @__PURE__ */ Ot(Loe, [["__file", "main.vue"]]); const FM = dr($oe, { Aside: SM, Footer: $M, Header: EM, Main: OM }); To(SM); To($M); const TM = To(EM), AM = To(OM), Roe = /* @__PURE__ */ W({ inheritAttrs: !1 }); function Noe(e, t, n, r, o, a) { return ue(e.$slots, "default"); } var Moe = /* @__PURE__ */ Ot(Roe, [["render", Noe], ["__file", "collection.vue"]]); const Doe = /* @__PURE__ */ W({ name: "ElCollectionItem", inheritAttrs: !1 }); function Boe(e, t, n, r, o, a) { return ue(e.$slots, "default"); } var zoe = /* @__PURE__ */ Ot(Doe, [["render", Boe], ["__file", "collection-item.vue"]]); const IM = "data-el-collection-item", PM = (e) => { const t = `El${e}Collection`, n = `${t}Item`, r = Symbol(t), o = Symbol(n), a = { ...Moe, name: t, setup() { const s = z(null), l = /* @__PURE__ */ new Map(); nt(r, { itemMap: l, getItems: () => { const c = y(s); if (!c) return []; const d = Array.from(c.querySelectorAll(`[${IM}]`)); return [...l.values()].sort((h, f) => d.indexOf(h.ref) - d.indexOf(f.ref)); }, collectionRef: s }); } }, i = { ...zoe, name: n, setup(s, { attrs: l }) { const u = z(null), c = be(r, void 0); nt(o, { collectionItemRef: u }), ut(() => { const d = y(u); d && c.itemMap.set(d, { ref: d, ...l }); }), Tt(() => { const d = y(u); c.itemMap.delete(d); }); } }; return { COLLECTION_INJECTION_KEY: r, COLLECTION_ITEM_INJECTION_KEY: o, ElCollection: a, ElCollectionItem: i }; }, joe = Vt({ style: { type: bt([String, Array, Object]) }, currentTabId: { type: bt(String) }, defaultCurrentTabId: String, loop: Boolean, dir: { type: String, values: ["ltr", "rtl"], default: "ltr" }, orientation: { type: bt(String) }, onBlur: Function, onFocus: Function, onMousedown: Function }), { ElCollection: Voe, ElCollectionItem: Hoe, COLLECTION_INJECTION_KEY: FS, COLLECTION_ITEM_INJECTION_KEY: Uoe } = PM("RovingFocusGroup"), TS = Symbol("elRovingFocusGroup"), LM = Symbol("elRovingFocusGroupItem"), qoe = { ArrowLeft: "prev", ArrowUp: "prev", ArrowRight: "next", ArrowDown: "next", PageUp: "first", Home: "first", PageDown: "last", End: "last" }, Koe = (e, t) => e, Goe = (e, t, n) => { const r = Koe(e.key); return qoe[r]; }, Woe = (e, t) => e.map((n, r) => e[(r + t) % e.length]), AS = (e) => { const { activeElement: t } = document; for (const n of e) if (n === t || (n.focus(), t !== document.activeElement)) return; }, Q3 = "currentTabIdChange", e4 = "rovingFocusGroup.entryFocus", Yoe = { bubbles: !1, cancelable: !0 }, Xoe = W({ name: "ElRovingFocusGroupImpl", inheritAttrs: !1, props: joe, emits: [Q3, "entryFocus"], setup(e, { emit: t }) { var n; const r = z((n = e.currentTabId || e.defaultCurrentTabId) != null ? n : null), o = z(!1), a = z(!1), i = z(null), { getItems: s } = be(FS, void 0), l = E(() => [ { outline: "none" }, e.style ]), u = (v) => { t(Q3, v); }, c = () => { o.value = !0; }, d = Yn((v) => { var m; (m = e.onMousedown) == null || m.call(e, v); }, () => { a.value = !0; }), p = Yn((v) => { var m; (m = e.onFocus) == null || m.call(e, v); }, (v) => { const m = !y(a), { target: g, currentTarget: b } = v; if (g === b && m && !y(o)) { const x = new Event(e4, Yoe); if (b == null || b.dispatchEvent(x), !x.defaultPrevented) { const w = s().filter((O) => O.focusable), k = w.find((O) => O.active), C = w.find((O) => O.id === y(r)), $ = [k, C, ...w].filter(Boolean).map((O) => O.ref); AS($); } } a.value = !1; }), h = Yn((v) => { var m; (m = e.onBlur) == null || m.call(e, v); }, () => { o.value = !1; }), f = (...v) => { t("entryFocus", ...v); }; nt(TS, { currentTabbedId: $u(r), loop: St(e, "loop"), tabIndex: E(() => y(o) ? -1 : 0), rovingFocusGroupRef: i, rovingFocusGroupRootStyle: l, orientation: St(e, "orientation"), dir: St(e, "dir"), onItemFocus: u, onItemShiftTab: c, onBlur: h, onFocus: p, onMousedown: d }), he(() => e.currentTabId, (v) => { r.value = v ?? null; }), Xo(i, e4, f); } }); function Zoe(e, t, n, r, o, a) { return ue(e.$slots, "default"); } var Joe = /* @__PURE__ */ Ot(Xoe, [["render", Zoe], ["__file", "roving-focus-group-impl.vue"]]); const Qoe = W({ name: "ElRovingFocusGroup", components: { ElFocusGroupCollection: Voe, ElRovingFocusGroupImpl: Joe } }); function eae(e, t, n, r, o, a) { const i = Ve("el-roving-focus-group-impl"), s = Ve("el-focus-group-collection"); return S(), re(s, null, { default: N(() => [ q(i, D9(B9(e.$attrs)), { default: N(() => [ ue(e.$slots, "default") ]), _: 3 }, 16) ]), _: 3 }); } var tae = /* @__PURE__ */ Ot(Qoe, [["render", eae], ["__file", "roving-focus-group.vue"]]); const nae = W({ components: { ElRovingFocusCollectionItem: Hoe }, 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 } = be(TS, void 0), { getItems: i } = be(FS, void 0), s = ml(), l = z(null), u = Yn((h) => { t("mousedown", h); }, (h) => { e.focusable ? o(y(s)) : h.preventDefault(); }), c = Yn((h) => { t("focus", h); }, () => { o(y(s)); }), d = Yn((h) => { t("keydown", h); }, (h) => { const { key: f, shiftKey: v, target: m, currentTarget: g } = h; if (f === kr.tab && v) { a(); return; } if (m !== g) return; const b = Goe(h); if (b) { h.preventDefault(); let w = i().filter((k) => k.focusable).map((k) => k.ref); switch (b) { case "last": { w.reverse(); break; } case "prev": case "next": { b === "prev" && w.reverse(); const k = w.indexOf(g); w = r.value ? Woe(w, k + 1) : w.slice(k + 1); break; } } Ke(() => { AS(w); }); } }), p = E(() => n.value === y(s)); return nt(LM, { rovingFocusGroupItemRef: l, tabIndex: E(() => y(p) ? 0 : -1), handleMousedown: u, handleFocus: c, handleKeydown: d }), { id: s, handleKeydown: d, handleFocus: c, handleMousedown: u }; } }); function rae(e, t, n, r, o, a) { const i = Ve("el-roving-focus-collection-item"); return S(), re(i, { id: e.id, focusable: e.focusable, active: e.active }, { default: N(() => [ ue(e.$slots, "default") ]), _: 3 }, 8, ["id", "focusable", "active"]); } var oae = /* @__PURE__ */ Ot(nae, [["render", rae], ["__file", "roving-focus-item.vue"]]); const Dv = Vt({ trigger: Yp.trigger, effect: { ...co.effect, default: "light" }, type: { type: bt(String) }, placement: { type: bt(String), default: "bottom" }, popperOptions: { type: bt(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: bt([Number, String]), default: 0 }, maxHeight: { type: bt([Number, String]), default: "" }, popperClass: { type: String, default: "" }, disabled: Boolean, role: { type: String, default: "menu" }, buttonProps: { type: bt(Object) }, teleported: co.teleported }), RM = Vt({ command: { type: [Object, String, Number], default: () => ({}) }, disabled: Boolean, divided: Boolean, textValue: String, icon: { type: el } }), aae = Vt({ onKeydown: { type: bt(Function) } }), iae = [ kr.down, kr.pageDown, kr.home ], NM = [kr.up, kr.pageUp, kr.end], sae = [...iae, ...NM], { ElCollection: lae, ElCollectionItem: uae, COLLECTION_INJECTION_KEY: cae, COLLECTION_ITEM_INJECTION_KEY: dae } = PM("Dropdown"), Y0 = Symbol("elDropdown"), { ButtonGroup: pae } = qf, fae = W({ name: "ElDropdown", components: { ElButton: qf, ElButtonGroup: pae, ElScrollbar: _S, ElDropdownCollection: lae, ElTooltip: G0, ElRovingFocusGroup: tae, ElOnlyChild: YN, ElIcon: Er, ArrowDown: ma }, props: Dv, emits: ["visible-change", "click", "command"], setup(e, { emit: t }) { const n = st(), r = Mt("dropdown"), { t: o } = cS(), a = z(), i = z(), s = z(null), l = z(null), u = z(null), c = z(null), d = z(!1), p = [kr.enter, kr.space, kr.down], h = E(() => ({ maxHeight: Kp(e.maxHeight) })), f = E(() => [r.m(k.value)]), v = E(() => Ma(e.trigger)), m = ml().value, g = E(() => e.id || m); he([a, v], ([V, U], [G]) => { var se, ae, de; (se = G == null ? void 0 : G.$el) != null && se.removeEventListener && G.$el.removeEventListener("pointerenter", _), (ae = V == null ? void 0 : V.$el) != null && ae.removeEventListener && V.$el.removeEventListener("pointerenter", _), (de = V == null ? void 0 : V.$el) != null && de.addEventListener && U.includes("hover") && V.$el.addEventListener("pointerenter", _); }, { immediate: !0 }), Tt(() => { var V, U; (U = (V = a.value) == null ? void 0 : V.$el) != null && U.removeEventListener && a.value.$el.removeEventListener("pointerenter", _); }); function b() { x(); } function x() { var V; (V = s.value) == null || V.onClose(); } function w() { var V; (V = s.value) == null || V.onOpen(); } const k = tl(); function C(...V) { t("command", ...V); } function _() { var V, U; (U = (V = a.value) == null ? void 0 : V.$el) == null || U.focus(); } function $() { } function O() { const V = y(l); v.value.includes("hover") && (V == null || V.focus()), c.value = null; } function F(V) { c.value = V; } function A(V) { d.value || (V.preventDefault(), V.stopImmediatePropagation()); } function T() { t("visible-change", !0); } function R(V) { (V == null ? void 0 : V.type) === "keydown" && l.value.focus(); } function M() { t("visible-change", !1); } return nt(Y0, { contentRef: l, role: E(() => e.role), triggerId: g, isUsingKeyboard: d, onItemEnter: $, onItemLeave: O }), nt("elDropdown", { instance: n, dropdownSize: k, handleClick: b, commandHandler: C, trigger: St(e, "trigger"), hideOnClick: St(e, "hideOnClick") }), { t: o, ns: r, scrollbar: u, wrapStyle: h, dropdownTriggerKls: f, dropdownSize: k, triggerId: g, triggerKeys: p, currentTabId: c, handleCurrentTabIdChange: F, handlerMainButtonClick: (V) => { t("click", V); }, handleEntryFocus: A, handleClose: x, handleOpen: w, handleBeforeShowTooltip: T, handleShowTooltip: R, handleBeforeHideTooltip: M, onFocusAfterTrapped: (V) => { var U, G; V.preventDefault(), (G = (U = l.value) == null ? void 0 : U.focus) == null || G.call(U, { preventScroll: !0 }); }, popperRef: s, contentRef: l, triggeringElementRef: a, referenceElementRef: i }; } }); function hae(e, t, n, r, o, a) { var i; const s = Ve("el-dropdown-collection"), l = Ve("el-roving-focus-group"), u = Ve("el-scrollbar"), c = Ve("el-only-child"), d = Ve("el-tooltip"), p = Ve("el-button"), h = Ve("arrow-down"), f = Ve("el-icon"), v = Ve("el-button-group"); return S(), L("div", { class: H([e.ns.b(), e.ns.is("disabled", e.disabled)]) }, [ q(d, { 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": (i = e.referenceElementRef) == null ? void 0 : i.$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 }, O0({ content: N(() => [ q(u, { ref: "scrollbar", "wrap-style": e.wrapStyle, tag: "div", "view-class": e.ns.e("list") }, { default: N(() => [ q(l, { loop: e.loop, "current-tab-id": e.currentTabId, orientation: "horizontal", onCurrentTabIdChange: e.handleCurrentTabIdChange, onEntryFocus: e.handleEntryFocus }, { default: N(() => [ q(s, null, { default: N(() => [ ue(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: N(() => [ q(c, { id: e.triggerId, ref: "triggeringElementRef", role: "button", tabindex: e.tabindex }, { default: N(() => [ ue(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 ? (S(), re(v, { key: 0 }, { default: N(() => [ q(p, Et({ ref: "referenceElementRef" }, e.buttonProps, { size: e.dropdownSize, type: e.type, disabled: e.disabled, tabindex: e.tabindex, onClick: e.handlerMainButtonClick }), { default: N(() => [ ue(e.$slots, "default") ]), _: 3 }, 16, ["size", "type", "disabled", "tabindex", "onClick"]), q(p, Et({ 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: N(() => [ q(f, { class: H(e.ns.e("icon")) }, { default: N(() => [ q(h) ]), _: 1 }, 8, ["class"]) ]), _: 1 }, 16, ["id", "size", "type", "class", "disabled", "tabindex", "aria-label"]) ]), _: 3 })) : J("v-if", !0) ], 2); } var vae = /* @__PURE__ */ Ot(fae, [["render", hae], ["__file", "dropdown.vue"]]); const gae = W({ name: "DropdownItemImpl", components: { ElIcon: Er }, props: RM, emits: ["pointermove", "pointerleave", "click", "clickimpl"], setup(e, { emit: t }) { const n = Mt("dropdown"), { role: r } = be(Y0, void 0), { collectionItemRef: o } = be(dae, void 0), { collectionItemRef: a } = be(Uoe, void 0), { rovingFocusGroupItemRef: i, tabIndex: s, handleFocus: l, handleKeydown: u, handleMousedown: c } = be(LM, void 0), d = bN(o, a, i), p = E(() => r.value === "menu" ? "menuitem" : r.value === "navigation" ? "link" : "button"), h = Yn((f) => { const { code: v } = f; if (v === kr.enter || v === kr.space) return f.preventDefault(), f.stopImmediatePropagation(), t("clickimpl", f), !0; }, u); return { ns: n, itemRef: d, dataset: { [IM]: "" }, role: p, tabIndex: s, handleFocus: l, handleKeydown: h, handleMousedown: c }; } }); function mae(e, t, n, r, o, a) { const i = Ve("el-icon"); return S(), L(Re, null, [ e.divided ? (S(), L("li", Et({ key: 0, role: "separator", class: e.ns.bem("menu", "item", "divided") }, e.$attrs), null, 16)) : J("v-if", !0), D("li", Et({ 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: (s) => e.$emit("clickimpl", s), onFocus: e.handleFocus, onKeydown: Ge(e.handleKeydown, ["self"]), onMousedown: e.handleMousedown, onPointermove: (s) => e.$emit("pointermove", s), onPointerleave: (s) => e.$emit("pointerleave", s) }), [ e.icon ? (S(), re(i, { key: 0 }, { default: N(() => [ (S(), re(yt(e.icon))) ]), _: 1 })) : J("v-if", !0), ue(e.$slots, "default") ], 16, ["aria-disabled", "tabindex", "role", "onClick", "onFocus", "onKeydown", "onMousedown", "onPointermove", "onPointerleave"]) ], 64); } var yae = /* @__PURE__ */ Ot(gae, [["render", mae], ["__file", "dropdown-item-impl.vue"]]); const MM = () => { const e = be("elDropdown", {}), t = E(() => e == null ? void 0 : e.dropdownSize); return { elDropdown: e, _elDropdownSize: t }; }, bae = W({ name: "ElDropdownItem", components: { ElDropdownCollectionItem: uae, ElRovingFocusItem: oae, ElDropdownItemImpl: yae }, inheritAttrs: !1, props: RM, emits: ["pointermove", "pointerleave", "click"], setup(e, { emit: t, attrs: n }) { const { elDropdown: r } = MM(), o = st(), a = z(null), i = E(() => { var h, f; return (f = (h = y(a)) == null ? void 0 : h.textContent) != null ? f : ""; }), { onItemEnter: s, onItemLeave: l } = be(Y0, void 0), u = Yn((h) => (t("pointermove", h), h.defaultPrevented), D5((h) => { if (e.disabled) { l(h); return; } const f = h.currentTarget; f === document.activeElement || f.contains(document.activeElement) || (s(h), h.defaultPrevented || f == null || f.focus()); })), c = Yn((h) => (t("pointerleave", h), h.defaultPrevented), D5(l)), d = Yn((h) => { if (!e.disabled) return t("click", h), h.type !== "keydown" && h.defaultPrevented; }, (h) => { var f, v, m; if (e.disabled) { h.stopImmediatePropagation(); return; } (f = r == null ? void 0 : r.hideOnClick) != null && f.value && ((v = r.handleClick) == null || v.call(r)), (m = r.commandHandler) == null || m.call(r, e.command, o, h); }), p = E(() => ({ ...e, ...n })); return { handleClick: d, handlePointerMove: u, handlePointerLeave: c, textContent: i, propsAndAttrs: p }; } }); function wae(e, t, n, r, o, a) { var i; const s = Ve("el-dropdown-item-impl"), l = Ve("el-roving-focus-item"), u = Ve("el-dropdown-collection-item"); return S(), re(u, { disabled: e.disabled, "text-value": (i = e.textValue) != null ? i : e.textContent }, { default: N(() => [ q(l, { focusable: !e.disabled }, { default: N(() => [ q(s, Et(e.propsAndAttrs, { onPointerleave: e.handlePointerLeave, onPointermove: e.handlePointerMove, onClickimpl: e.handleClick }), { default: N(() => [ ue(e.$slots, "default") ]), _: 3 }, 16, ["onPointerleave", "onPointermove", "onClickimpl"]) ]), _: 3 }, 8, ["focusable"]) ]), _: 3 }, 8, ["disabled", "text-value"]); } var DM = /* @__PURE__ */ Ot(bae, [["render", wae], ["__file", "dropdown-item.vue"]]); const xae = W({ name: "ElDropdownMenu", props: aae, setup(e) { const t = Mt("dropdown"), { _elDropdownSize: n } = MM(), r = n.value, { focusTrapRef: o, onKeydown: a } = be(JN, void 0), { contentRef: i, role: s, triggerId: l } = be(Y0, void 0), { collectionRef: u, getItems: c } = be(cae, void 0), { rovingFocusGroupRef: d, rovingFocusGroupRootStyle: p, tabIndex: h, onBlur: f, onFocus: v, onMousedown: m } = be(TS, void 0), { collectionRef: g } = be(FS, void 0), b = E(() => [t.b("menu"), t.bm("menu", r == null ? void 0 : r.value)]), x = bN(i, u, o, d, g), w = Yn((C) => { var _; (_ = e.onKeydown) == null || _.call(e, C); }, (C) => { const { currentTarget: _, code: $, target: O } = C; if (_.contains(O), kr.tab === $ && C.stopImmediatePropagation(), C.preventDefault(), O !== y(i) || !sae.includes($)) return; const A = c().filter((T) => !T.disabled).map((T) => T.ref); NM.includes($) && A.reverse(), AS(A); }); return { size: r, rovingFocusGroupRootStyle: p, tabIndex: h, dropdownKls: b, role: s, triggerId: l, dropdownListWrapperRef: x, handleKeydown: (C) => { w(C), a(C); }, onBlur: f, onFocus: v, onMousedown: m }; } }); function kae(e, t, n, r, o, a) { return S(), L("ul", { ref: e.dropdownListWrapperRef, class: H(e.dropdownKls), style: Ye(e.rovingFocusGroupRootStyle), tabindex: -1, role: e.role, "aria-labelledby": e.triggerId, onBlur: e.onBlur, onFocus: e.onFocus, onKeydown: Ge(e.handleKeydown, ["self"]), onMousedown: Ge(e.onMousedown, ["self"]) }, [ ue(e.$slots, "default") ], 46, ["role", "aria-labelledby", "onBlur", "onFocus", "onKeydown", "onMousedown"]); } var BM = /* @__PURE__ */ Ot(xae, [["render", kae], ["__file", "dropdown-menu.vue"]]); const Cae = dr(vae, { DropdownItem: DM, DropdownMenu: BM }), _ae = To(DM), Sae = To(BM), zM = Symbol("ElSelectGroup"), X0 = Symbol("ElSelect"); function $ae(e, t) { const n = be(X0), r = be(zM, { disabled: !1 }), o = E(() => c(Ma(n.props.modelValue), e.value)), a = E(() => { var h; if (n.props.multiple) { const f = Ma((h = n.props.modelValue) != null ? h : []); return !o.value && f.length >= n.props.multipleLimit && n.props.multipleLimit > 0; } else return !1; }), i = E(() => e.label || (Fr(e.value) ? "" : e.value)), s = E(() => e.value || e.label || ""), l = E(() => e.disabled || t.groupDisabled || a.value), u = st(), c = (h = [], f) => { if (Fr(e.value)) { const v = n.props.valueKey; return h && h.some((m) => ra(Hi(m, v)) === Hi(f, v)); } else return h && h.includes(f); }, d = () => { !e.disabled && !r.disabled && (n.states.hoveringIndex = n.optionsArray.indexOf(u.proxy)); }, p = (h) => { const f = new RegExp(NJ(h), "i"); t.visible = f.test(i.value) || e.created; }; return he(() => i.value, () => { !e.created && !n.props.remote && n.setSelected(); }), he(() => e.value, (h, f) => { const { remote: v, valueKey: m } = n.props; if (h !== f && (n.onOptionDestroy(f, u.proxy), n.onOptionCreate(u.proxy)), !e.created && !v) { if (m && Fr(h) && Fr(f) && h[m] === f[m]) return; n.setSelected(); } }), he(() => r.disabled, () => { t.groupDisabled = r.disabled; }, { immediate: !0 }), { select: n, currentLabel: i, currentValue: s, itemSelected: o, isDisabled: l, hoverItem: d, updateOption: p }; } const Eae = W({ name: "ElOption", componentName: "ElOption", props: { value: { required: !0, type: [String, Number, Boolean, Object] }, label: [String, Number], created: Boolean, disabled: Boolean }, setup(e) { const t = Mt("select"), n = ml(), r = E(() => [ t.be("dropdown", "item"), t.is("disabled", y(s)), t.is("selected", y(i)), t.is("hovering", y(p)) ]), o = en({ index: -1, groupDisabled: !1, visible: !0, hover: !1 }), { currentLabel: a, itemSelected: i, isDisabled: s, select: l, hoverItem: u, updateOption: c } = $ae(e, o), { visible: d, hover: p } = Cr(o), h = st().proxy; l.onOptionCreate(h), Tt(() => { const v = h.value, { selected: m } = l.states, b = (l.props.multiple ? m : [m]).some((x) => x.value === h.value); Ke(() => { l.states.cachedOptions.get(v) === h && !b && l.states.cachedOptions.delete(v); }), l.onOptionDestroy(v, h); }); function f() { s.value || l.handleOptionSelect(h); } return { ns: t, id: n, containerKls: r, currentLabel: a, itemSelected: i, isDisabled: s, select: l, hoverItem: u, updateOption: c, visible: d, hover: p, selectOptionClick: f, states: o }; } }); function Oae(e, t, n, r, o, a) { return Be((S(), L("li", { id: e.id, class: H(e.containerKls), role: "option", "aria-disabled": e.isDisabled || void 0, "aria-selected": e.itemSelected, onMouseenter: e.hoverItem, onClick: Ge(e.selectOptionClick, ["stop"]) }, [ ue(e.$slots, "default", {}, () => [ D("span", null, ge(e.currentLabel), 1) ]) ], 42, ["id", "aria-disabled", "aria-selected", "onMouseenter", "onClick"])), [ [ht, e.visible] ]); } var IS = /* @__PURE__ */ Ot(Eae, [["render", Oae], ["__file", "option.vue"]]); const Fae = W({ name: "ElSelectDropdown", componentName: "ElSelectDropdown", setup() { const e = be(X0), t = Mt("select"), n = E(() => e.props.popperClass), r = E(() => e.props.multiple), o = E(() => e.props.fitInputWidth), a = z(""); function i() { var s; a.value = `${(s = e.selectRef) == null ? void 0 : s.offsetWidth}px`; } return ut(() => { i(), ji(e.selectRef, i); }), { ns: t, minWidth: a, popperClass: n, isMultiple: r, isFitInputWidth: o }; } }); function Tae(e, t, n, r, o, a) { return S(), L("div", { class: H([e.ns.b("dropdown"), e.ns.is("multiple", e.isMultiple), e.popperClass]), style: Ye({ [e.isFitInputWidth ? "width" : "minWidth"]: e.minWidth }) }, [ e.$slots.header ? (S(), L("div", { key: 0, class: H(e.ns.be("dropdown", "header")) }, [ ue(e.$slots, "header") ], 2)) : J("v-if", !0), ue(e.$slots, "default"), e.$slots.footer ? (S(), L("div", { key: 1, class: H(e.ns.be("dropdown", "footer")) }, [ ue(e.$slots, "footer") ], 2)) : J("v-if", !0) ], 6); } var Aae = /* @__PURE__ */ Ot(Fae, [["render", Tae], ["__file", "select-dropdown.vue"]]); const Iae = 11, Pae = (e, t) => { const { t: n } = cS(), r = ml(), o = Mt("select"), a = Mt("input"), i = en({ 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 }), s = z(null), l = z(null), u = z(null), c = z(null), d = z(null), p = z(null), h = z(null), f = z(null), v = z(null), m = z(null), g = z(null), b = z(null), { isComposing: x, handleCompositionStart: w, handleCompositionUpdate: k, handleCompositionEnd: C } = HN({ afterComposition: (B) => we(B) }), { wrapperRef: _, isFocused: $ } = VN(d, { beforeFocus() { return P.value; }, afterFocus() { e.automaticDropdown && !O.value && (O.value = !0, i.menuVisibleOnFocus = !0); }, beforeBlur(B) { var ce, Le; return ((ce = u.value) == null ? void 0 : ce.isFocusInsideContent(B)) || ((Le = c.value) == null ? void 0 : Le.isFocusInsideContent(B)); }, afterBlur() { O.value = !1, i.menuVisibleOnFocus = !1; } }), O = z(!1), F = z(), { form: A, formItem: T } = Au(), { inputId: R } = Uf(e, { formItemContext: T }), { valueOnClear: M, isEmptyValue: j } = dte(e), P = E(() => e.disabled || (A == null ? void 0 : A.disabled)), V = E(() => yr(e.modelValue) ? e.modelValue.length > 0 : !j(e.modelValue)), U = E(() => e.clearable && !P.value && i.inputHovering && V.value), G = E(() => e.remote && e.filterable && !e.remoteShowSuffix ? "" : e.suffixIcon), se = E(() => o.is("reverse", G.value && O.value)), ae = E(() => (T == null ? void 0 : T.validateState) || ""), de = E(() => yN[ae.value]), me = E(() => e.remote ? 300 : 0), te = E(() => e.loading ? e.loadingText || n("el.select.loading") : e.remote && !i.inputValue && i.options.size === 0 ? !1 : e.filterable && i.inputValue && i.options.size > 0 && oe.value === 0 ? e.noMatchText || n("el.select.noMatch") : i.options.size === 0 ? e.noDataText || n("el.select.noData") : null), oe = E(() => ne.value.filter((B) => B.visible).length), ne = E(() => { const B = Array.from(i.options.values()), ce = []; return i.optionValues.forEach((Le) => { const We = B.findIndex((rn) => rn.value === Le); We > -1 && ce.push(B[We]); }), ce.length >= B.length ? ce : B; }), ee = E(() => Array.from(i.cachedOptions.values())), Z = E(() => { const B = ne.value.filter((ce) => !ce.created).some((ce) => ce.currentLabel === i.inputValue); return e.filterable && e.allowCreate && i.inputValue !== "" && !B; }), le = () => { e.filterable && oo(e.filterMethod) || e.filterable && e.remote && oo(e.remoteMethod) || ne.value.forEach((B) => { var ce; (ce = B.updateOption) == null || ce.call(B, i.inputValue); }); }, pe = tl(), ke = E(() => ["small"].includes(pe.value) ? "small" : "default"), Ne = E({ get() { return O.value && te.value !== !1; }, set(B) { O.value = B; } }), De = E(() => { if (e.multiple && !js(e.modelValue)) return Ma(e.modelValue).length === 0 && !i.inputValue; const B = yr(e.modelValue) ? e.modelValue[0] : e.modelValue; return e.filterable || js(B) ? !i.inputValue : !0; }), _e = E(() => { var B; const ce = (B = e.placeholder) != null ? B : n("el.select.placeholder"); return e.multiple || !V.value ? ce : i.selectedLabel; }), Fe = E(() => uC ? null : "mouseenter"); he(() => e.modelValue, (B, ce) => { e.multiple && e.filterable && !e.reserveKeyword && (i.inputValue = "", Ie("")), qe(), !Sg(B, ce) && e.validateEvent && (T == null || T.validate("change").catch((Le) => xr(Le))); }, { flush: "post", deep: !0 }), he(() => O.value, (B) => { B ? Ie(i.inputValue) : (i.inputValue = "", i.previousQuery = null, i.isBeforeHide = !0), t("visible-change", B); }), he(() => i.options.entries(), () => { var B; if (!ur) return; const ce = ((B = s.value) == null ? void 0 : B.querySelectorAll("input")) || []; (!e.filterable && !e.defaultFirstOption && !js(e.modelValue) || !Array.from(ce).includes(document.activeElement)) && qe(), e.defaultFirstOption && (e.filterable || e.remote) && oe.value && Ae(); }, { flush: "post" }), he(() => i.hoveringIndex, (B) => { Zn(B) && B > -1 ? F.value = ne.value[B] || {} : F.value = {}, ne.value.forEach((ce) => { ce.hover = F.value === ce; }); }), Mf(() => { i.isBeforeHide || le(); }); const Ie = (B) => { i.previousQuery === B || x.value || (i.previousQuery = B, e.filterable && oo(e.filterMethod) ? e.filterMethod(B) : e.filterable && e.remote && oo(e.remoteMethod) && e.remoteMethod(B), e.defaultFirstOption && (e.filterable || e.remote) && oe.value ? Ke(Ae) : Ke(He)); }, Ae = () => { const B = ne.value.filter((We) => We.visible && !We.disabled && !We.states.groupDisabled), ce = B.find((We) => We.created), Le = B[0]; i.hoveringIndex = Te(ne.value, ce || Le); }, qe = () => { if (e.multiple) i.selectedLabel = ""; else { const ce = yr(e.modelValue) ? e.modelValue[0] : e.modelValue, Le = et(ce); i.selectedLabel = Le.currentLabel, i.selected = [Le]; return; } const B = []; js(e.modelValue) || Ma(e.modelValue).forEach((ce) => { B.push(et(ce)); }), i.selected = B; }, et = (B) => { let ce; const Le = B1(B).toLowerCase() === "object", We = B1(B).toLowerCase() === "null", rn = B1(B).toLowerCase() === "undefined"; for (let un = i.cachedOptions.size - 1; un >= 0; un--) { const on = ee.value[un]; if (Le ? Hi(on.value, e.valueKey) === Hi(B, e.valueKey) : on.value === B) { ce = { value: B, currentLabel: on.currentLabel, get isDisabled() { return on.isDisabled; } }; break; } } if (ce) return ce; const Tn = Le ? B.label : !We && !rn ? B : ""; return { value: B, currentLabel: Tn }; }, He = () => { i.hoveringIndex = ne.value.findIndex((B) => i.selected.some((ce) => Cn(ce) === Cn(B))); }, ot = () => { i.selectionWidth = l.value.getBoundingClientRect().width; }, tt = () => { i.calculatorWidth = p.value.getBoundingClientRect().width; }, Qe = () => { i.collapseItemWidth = g.value.getBoundingClientRect().width; }, I = () => { var B, ce; (ce = (B = u.value) == null ? void 0 : B.updatePopper) == null || ce.call(B); }, Y = () => { var B, ce; (ce = (B = c.value) == null ? void 0 : B.updatePopper) == null || ce.call(B); }, ve = () => { i.inputValue.length > 0 && !O.value && (O.value = !0), Ie(i.inputValue); }, we = (B) => { if (i.inputValue = B.target.value, e.remote) ye(); else return ve(); }, ye = sN(() => { ve(); }, me.value), Pe = (B) => { Sg(e.modelValue, B) || t(Fu, B); }, Ce = (B) => TJ(B, (ce) => !i.disabledOptions.has(ce)), ze = (B) => { if (e.multiple && B.code !== kr.delete && B.target.value.length <= 0) { const ce = Ma(e.modelValue).slice(), Le = Ce(ce); if (Le < 0) return; const We = ce[Le]; ce.splice(Le, 1), t(Vn, ce), Pe(ce), t("remove-tag", We); } }, lt = (B, ce) => { const Le = i.selected.indexOf(ce); if (Le > -1 && !P.value) { const We = Ma(e.modelValue).slice(); We.splice(Le, 1), t(Vn, We), Pe(We), t("remove-tag", ce.value); } B.stopPropagation(), Ht(); }, rt = (B) => { B.stopPropagation(); const ce = e.multiple ? [] : M.value; if (e.multiple) for (const Le of i.selected) Le.isDisabled && ce.push(Le.value); t(Vn, ce), Pe(ce), i.hoveringIndex = -1, O.value = !1, t("clear"), Ht(); }, fe = (B) => { var ce; if (e.multiple) { const Le = Ma((ce = e.modelValue) != null ? ce : []).slice(), We = Te(Le, B.value); We > -1 ? Le.splice(We, 1) : (e.multipleLimit <= 0 || Le.length < e.multipleLimit) && Le.push(B.value), t(Vn, Le), Pe(Le), B.created && Ie(""), e.filterable && !e.reserveKeyword && (i.inputValue = ""); } else t(Vn, B.value), Pe(B.value), O.value = !1; Ht(), !O.value && Ke(() => { Se(B); }); }, Te = (B = [], ce) => { if (!Fr(ce)) return B.indexOf(ce); const Le = e.valueKey; let We = -1; return B.some((rn, Tn) => ra(Hi(rn, Le)) === Hi(ce, Le) ? (We = Tn, !0) : !1), We; }, Se = (B) => { var ce, Le, We, rn, Tn; const An = yr(B) ? B[0] : B; let un = null; if (An != null && An.value) { const on = ne.value.filter((qo) => qo.value === An.value); on.length > 0 && (un = on[0].$el); } if (u.value && un) { const on = (rn = (We = (Le = (ce = u.value) == null ? void 0 : ce.popperRef) == null ? void 0 : Le.contentRef) == null ? void 0 : We.querySelector) == null ? void 0 : rn.call(We, `.${o.be("dropdown", "wrap")}`); on && DJ(on, un); } (Tn = b.value) == null || Tn.handleScroll(); }, Ue = (B) => { i.options.set(B.value, B), i.cachedOptions.set(B.value, B), B.disabled && i.disabledOptions.set(B.value, B); }, zt = (B, ce) => { i.options.get(B) === ce && i.options.delete(B); }, Pt = E(() => { var B, ce; return (ce = (B = u.value) == null ? void 0 : B.popperRef) == null ? void 0 : ce.contentRef; }), qt = () => { i.isBeforeHide = !1, Ke(() => Se(i.selected)); }, Ht = () => { var B; (B = d.value) == null || B.focus(); }, tn = () => { var B; (B = d.value) == null || B.blur(); }, Dn = (B) => { rt(B); }, hn = () => { O.value = !1, $.value && tn(); }, vn = () => { i.inputValue.length > 0 ? i.inputValue = "" : O.value = !1; }, Pn = () => { P.value || (uC && (i.inputHovering = !0), i.menuVisibleOnFocus ? i.menuVisibleOnFocus = !1 : O.value = !O.value); }, Bn = () => { O.value ? ne.value[i.hoveringIndex] && fe(ne.value[i.hoveringIndex]) : Pn(); }, Cn = (B) => Fr(B.value) ? Hi(B.value, e.valueKey) : B.value, hr = E(() => ne.value.filter((B) => B.visible).every((B) => B.disabled)), or = E(() => e.multiple ? e.collapseTags ? i.selected.slice(0, e.maxCollapseTags) : i.selected : []), ar = E(() => e.multiple ? e.collapseTags ? i.selected.slice(e.maxCollapseTags) : [] : []), nn = (B) => { if (!O.value) { O.value = !0; return; } if (!(i.options.size === 0 || i.filteredOptionsCount === 0 || x.value) && !hr.value) { B === "next" ? (i.hoveringIndex++, i.hoveringIndex === i.options.size && (i.hoveringIndex = 0)) : B === "prev" && (i.hoveringIndex--, i.hoveringIndex < 0 && (i.hoveringIndex = i.options.size - 1)); const ce = ne.value[i.hoveringIndex]; (ce.disabled === !0 || ce.states.groupDisabled === !0 || !ce.visible) && nn(B), Ke(() => Se(F.value)); } }, gn = () => { if (!l.value) return 0; const B = window.getComputedStyle(l.value); return Number.parseFloat(B.gap || "6px"); }, Fn = E(() => { const B = gn(); return { maxWidth: `${g.value && e.maxCollapseTags === 1 ? i.selectionWidth - i.collapseItemWidth - B : i.selectionWidth}px` }; }), vr = E(() => ({ maxWidth: `${i.selectionWidth}px` })), Uo = E(() => ({ width: `${Math.max(i.calculatorWidth, Iae)}px` })); return ji(l, ot), ji(p, tt), ji(v, I), ji(_, I), ji(m, Y), ji(g, Qe), ut(() => { qe(); }), { inputId: R, contentId: r, nsSelect: o, nsInput: a, states: i, isFocused: $, expanded: O, optionsArray: ne, hoverOption: F, selectSize: pe, filteredOptionsCount: oe, resetCalculatorWidth: tt, updateTooltip: I, updateTagTooltip: Y, debouncedOnInputChange: ye, onInput: we, deletePrevTag: ze, deleteTag: lt, deleteSelected: rt, handleOptionSelect: fe, scrollToOption: Se, hasModelValue: V, shouldShowPlaceholder: De, currentPlaceholder: _e, mouseEnterEventName: Fe, showClose: U, iconComponent: G, iconReverse: se, validateState: ae, validateIcon: de, showNewOption: Z, updateOptions: le, collapseTagSize: ke, setSelected: qe, selectDisabled: P, emptyText: te, handleCompositionStart: w, handleCompositionUpdate: k, handleCompositionEnd: C, onOptionCreate: Ue, onOptionDestroy: zt, handleMenuEnter: qt, focus: Ht, blur: tn, handleClearClick: Dn, handleClickOutside: hn, handleEsc: vn, toggleMenu: Pn, selectOption: Bn, getValueKey: Cn, navigateOptions: nn, dropdownMenuVisible: Ne, showTagList: or, collapseTagList: ar, tagStyle: Fn, collapseTagStyle: vr, inputStyle: Uo, popperRef: Pt, inputRef: d, tooltipRef: u, tagTooltipRef: c, calculatorRef: p, prefixRef: h, suffixRef: f, selectRef: s, wrapperRef: _, selectionRef: l, scrollbarRef: b, menuRef: v, tagMenuRef: m, collapseItemRef: g }; }; var Lae = W({ name: "ElOptions", setup(e, { slots: t }) { const n = be(X0); let r = []; return () => { var o, a; const i = (o = t.default) == null ? void 0 : o.call(t), s = []; function l(u) { yr(u) && u.forEach((c) => { var d, p, h, f; const v = (d = (c == null ? void 0 : c.type) || {}) == null ? void 0 : d.name; v === "ElOptionGroup" ? l(!wr(c.children) && !yr(c.children) && oo((p = c.children) == null ? void 0 : p.default) ? (h = c.children) == null ? void 0 : h.default() : c.children) : v === "ElOption" ? s.push((f = c.props) == null ? void 0 : f.value) : yr(c.children) && l(c.children); }); } return i.length && l((a = i[0]) == null ? void 0 : a.children), Sg(s, r) || (r = s, n && (n.states.optionValues = s)), i; }; } }); const Rae = Vt({ name: String, id: String, modelValue: { type: [Array, String, Number, Boolean, Object], default: void 0 }, autocomplete: { type: String, default: "off" }, automaticDropdown: Boolean, size: Tu, effect: { type: bt(String), default: "light" }, disabled: Boolean, clearable: Boolean, filterable: Boolean, allowCreate: Boolean, loading: Boolean, popperClass: { type: String, default: "" }, popperOptions: { type: bt(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: co.teleported, persistent: { type: Boolean, default: !0 }, clearIcon: { type: el, default: $i }, fitInputWidth: Boolean, suffixIcon: { type: el, default: ma }, tagType: { ...CC.type, default: "info" }, tagEffect: { ...CC.effect, default: "light" }, validateEvent: { type: Boolean, default: !0 }, remoteShowSuffix: Boolean, placement: { type: bt(String), values: H0, default: "bottom-start" }, fallbackPlacements: { type: bt(Array), default: ["bottom-start", "top-start", "right", "left"] }, appendTo: String, ...cte, ...ds(["ariaLabel"]) }), t4 = "ElSelect", Nae = W({ name: t4, componentName: t4, components: { ElSelectMenu: Aae, ElOption: IS, ElOptions: Lae, ElTag: Yre, ElScrollbar: _S, ElTooltip: G0, ElIcon: Er }, directives: { ClickOutside: bre }, props: Rae, emits: [ Vn, Fu, "remove-tag", "clear", "visible-change", "focus", "blur" ], setup(e, { emit: t }) { const n = E(() => { const { modelValue: a, multiple: i } = e, s = i ? [] : void 0; return yr(a) ? i ? a : s : i ? s : a; }), r = en({ ...Cr(e), modelValue: n }), o = Pae(r, t); return nt(X0, en({ 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 Mae(e, t, n, r, o, a) { const i = Ve("el-tag"), s = Ve("el-tooltip"), l = Ve("el-icon"), u = Ve("el-option"), c = Ve("el-options"), d = Ve("el-scrollbar"), p = Ve("el-select-menu"), h = X_("click-outside"); return Be((S(), L("div", { ref: "selectRef", class: H([e.nsSelect.b(), e.nsSelect.m(e.selectSize)]), [Z_(e.mouseEnterEventName)]: (f) => e.states.inputHovering = !0, onMouseleave: (f) => e.states.inputHovering = !1 }, [ q(s, { 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: (f) => e.states.isBeforeHide = !1 }, { default: N(() => { var f; return [ D("div", { ref: "wrapperRef", class: H([ 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: Ge(e.toggleMenu, ["prevent"]) }, [ e.$slots.prefix ? (S(), L("div", { key: 0, ref: "prefixRef", class: H(e.nsSelect.e("prefix")) }, [ ue(e.$slots, "prefix") ], 2)) : J("v-if", !0), D("div", { ref: "selectionRef", class: H([ e.nsSelect.e("selection"), e.nsSelect.is("near", e.multiple && !e.$slots.prefix && !!e.states.selected.length) ]) }, [ e.multiple ? ue(e.$slots, "tag", { key: 0 }, () => [ (S(!0), L(Re, null, mt(e.showTagList, (v) => (S(), L("div", { key: e.getValueKey(v), class: H(e.nsSelect.e("selected-item")) }, [ q(i, { closable: !e.selectDisabled && !v.isDisabled, size: e.collapseTagSize, type: e.tagType, effect: e.tagEffect, "disable-transitions": "", style: Ye(e.tagStyle), onClose: (m) => e.deleteTag(m, v) }, { default: N(() => [ D("span", { class: H(e.nsSelect.e("tags-text")) }, [ ue(e.$slots, "label", { label: v.currentLabel, value: v.value }, () => [ Oe(ge(v.currentLabel), 1) ]) ], 2) ]), _: 2 }, 1032, ["closable", "size", "type", "effect", "style", "onClose"]) ], 2))), 128)), e.collapseTags && e.states.selected.length > e.maxCollapseTags ? (S(), re(s, { key: 0, ref: "tagTooltipRef", disabled: e.dropdownMenuVisible || !e.collapseTagsTooltip, "fallback-placements": ["bottom", "top", "right", "left"], effect: e.effect, placement: "bottom", teleported: e.teleported }, { default: N(() => [ D("div", { ref: "collapseItemRef", class: H(e.nsSelect.e("selected-item")) }, [ q(i, { closable: !1, size: e.collapseTagSize, type: e.tagType, effect: e.tagEffect, "disable-transitions": "", style: Ye(e.collapseTagStyle) }, { default: N(() => [ D("span", { class: H(e.nsSelect.e("tags-text")) }, " + " + ge(e.states.selected.length - e.maxCollapseTags), 3) ]), _: 1 }, 8, ["size", "type", "effect", "style"]) ], 2) ]), content: N(() => [ D("div", { ref: "tagMenuRef", class: H(e.nsSelect.e("selection")) }, [ (S(!0), L(Re, null, mt(e.collapseTagList, (v) => (S(), L("div", { key: e.getValueKey(v), class: H(e.nsSelect.e("selected-item")) }, [ q(i, { class: "in-tooltip", closable: !e.selectDisabled && !v.isDisabled, size: e.collapseTagSize, type: e.tagType, effect: e.tagEffect, "disable-transitions": "", onClose: (m) => e.deleteTag(m, v) }, { default: N(() => [ D("span", { class: H(e.nsSelect.e("tags-text")) }, [ ue(e.$slots, "label", { label: v.currentLabel, value: v.value }, () => [ Oe(ge(v.currentLabel), 1) ]) ], 2) ]), _: 2 }, 1032, ["closable", "size", "type", "effect", "onClose"]) ], 2))), 128)) ], 2) ]), _: 3 }, 8, ["disabled", "effect", "teleported"])) : J("v-if", !0) ]) : J("v-if", !0), e.selectDisabled ? J("v-if", !0) : (S(), L("div", { key: 1, class: H([ e.nsSelect.e("selected-item"), e.nsSelect.e("input-wrapper"), e.nsSelect.is("hidden", !e.filterable) ]) }, [ Be(D("input", { id: e.inputId, ref: "inputRef", "onUpdate:modelValue": (v) => e.states.inputValue = v, type: "text", name: e.name, class: H([e.nsSelect.e("input"), e.nsSelect.is(e.selectSize)]), disabled: e.selectDisabled, autocomplete: e.autocomplete, style: Ye(e.inputStyle), role: "combobox", readonly: !e.filterable, spellcheck: "false", "aria-activedescendant": ((f = e.hoverOption) == null ? void 0 : f.id) || "", "aria-controls": e.contentId, "aria-expanded": e.dropdownMenuVisible, "aria-label": e.ariaLabel, "aria-autocomplete": "none", "aria-haspopup": "listbox", onKeydown: [ wn(Ge((v) => e.navigateOptions("next"), ["stop", "prevent"]), ["down"]), wn(Ge((v) => e.navigateOptions("prev"), ["stop", "prevent"]), ["up"]), wn(Ge(e.handleEsc, ["stop", "prevent"]), ["esc"]), wn(Ge(e.selectOption, ["stop", "prevent"]), ["enter"]), wn(Ge(e.deletePrevTag, ["stop"]), ["delete"]) ], onCompositionstart: e.handleCompositionStart, onCompositionupdate: e.handleCompositionUpdate, onCompositionend: e.handleCompositionEnd, onInput: e.onInput, onClick: Ge(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"]), [ [T0, e.states.inputValue] ]), e.filterable ? (S(), L("span", { key: 0, ref: "calculatorRef", "aria-hidden": "true", class: H(e.nsSelect.e("input-calculator")), textContent: ge(e.states.inputValue) }, null, 10, ["textContent"])) : J("v-if", !0) ], 2)), e.shouldShowPlaceholder ? (S(), L("div", { key: 2, class: H([ e.nsSelect.e("selected-item"), e.nsSelect.e("placeholder"), e.nsSelect.is("transparent", !e.hasModelValue || e.expanded && !e.states.inputValue) ]) }, [ e.hasModelValue ? ue(e.$slots, "label", { key: 0, label: e.currentPlaceholder, value: e.modelValue }, () => [ D("span", null, ge(e.currentPlaceholder), 1) ]) : (S(), L("span", { key: 1 }, ge(e.currentPlaceholder), 1)) ], 2)) : J("v-if", !0) ], 2), D("div", { ref: "suffixRef", class: H(e.nsSelect.e("suffix")) }, [ e.iconComponent && !e.showClose ? (S(), re(l, { key: 0, class: H([e.nsSelect.e("caret"), e.nsSelect.e("icon"), e.iconReverse]) }, { default: N(() => [ (S(), re(yt(e.iconComponent))) ]), _: 1 }, 8, ["class"])) : J("v-if", !0), e.showClose && e.clearIcon ? (S(), re(l, { key: 1, class: H([ e.nsSelect.e("caret"), e.nsSelect.e("icon"), e.nsSelect.e("clear") ]), onClick: e.handleClearClick }, { default: N(() => [ (S(), re(yt(e.clearIcon))) ]), _: 1 }, 8, ["class", "onClick"])) : J("v-if", !0), e.validateState && e.validateIcon ? (S(), re(l, { key: 2, class: H([e.nsInput.e("icon"), e.nsInput.e("validateIcon")]) }, { default: N(() => [ (S(), re(yt(e.validateIcon))) ]), _: 1 }, 8, ["class"])) : J("v-if", !0) ], 2) ], 10, ["onClick"]) ]; }), content: N(() => [ q(p, { ref: "menuRef" }, { default: N(() => [ e.$slots.header ? (S(), L("div", { key: 0, class: H(e.nsSelect.be("dropdown", "header")), onClick: Ge(() => { }, ["stop"]) }, [ ue(e.$slots, "header") ], 10, ["onClick"])) : J("v-if", !0), Be(q(d, { id: e.contentId, ref: "scrollbarRef", tag: "ul", "wrap-class": e.nsSelect.be("dropdown", "wrap"), "view-class": e.nsSelect.be("dropdown", "list"), class: H([e.nsSelect.is("empty", e.filteredOptionsCount === 0)]), role: "listbox", "aria-label": e.ariaLabel, "aria-orientation": "vertical" }, { default: N(() => [ e.showNewOption ? (S(), re(u, { key: 0, value: e.states.inputValue, created: !0 }, null, 8, ["value"])) : J("v-if", !0), q(c, null, { default: N(() => [ ue(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 ? (S(), L("div", { key: 1, class: H(e.nsSelect.be("dropdown", "loading")) }, [ ue(e.$slots, "loading") ], 2)) : e.loading || e.filteredOptionsCount === 0 ? (S(), L("div", { key: 2, class: H(e.nsSelect.be("dropdown", "empty")) }, [ ue(e.$slots, "empty", {}, () => [ D("span", null, ge(e.emptyText), 1) ]) ], 2)) : J("v-if", !0), e.$slots.footer ? (S(), L("div", { key: 3, class: H(e.nsSelect.be("dropdown", "footer")), onClick: Ge(() => { }, ["stop"]) }, [ ue(e.$slots, "footer") ], 10, ["onClick"])) : J("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"])), [ [h, e.handleClickOutside, e.popperRef] ]); } var Dae = /* @__PURE__ */ Ot(Nae, [["render", Mae], ["__file", "select.vue"]]); const Bae = W({ name: "ElOptionGroup", componentName: "ElOptionGroup", props: { label: String, disabled: Boolean }, setup(e) { const t = Mt("select"), n = z(null), r = st(), o = z([]); nt(zM, en({ ...Cr(e) })); const a = E(() => o.value.some((u) => u.visible === !0)), i = (u) => { var c, d; return ((c = u.type) == null ? void 0 : c.name) === "ElOption" && !!((d = u.component) != null && d.proxy); }, s = (u) => { const c = Ma(u), d = []; return c.forEach((p) => { var h, f; i(p) ? d.push(p.component.proxy) : (h = p.children) != null && h.length ? d.push(...s(p.children)) : (f = p.component) != null && f.subTree && d.push(...s(p.component.subTree)); }), d; }, l = () => { o.value = s(r.subTree); }; return ut(() => { l(); }), AW(n, l, { attributes: !0, subtree: !0, childList: !0 }), { groupRef: n, visible: a, ns: t }; } }); function zae(e, t, n, r, o, a) { return Be((S(), L("ul", { ref: "groupRef", class: H(e.ns.be("group", "wrap")) }, [ D("li", { class: H(e.ns.be("group", "title")) }, ge(e.label), 3), D("li", null, [ D("ul", { class: H(e.ns.b("group")) }, [ ue(e.$slots, "default") ], 2) ]) ], 2)), [ [ht, e.visible] ]); } var jM = /* @__PURE__ */ Ot(Bae, [["render", zae], ["__file", "option-group.vue"]]); const VM = dr(Dae, { Option: IS, OptionGroup: jM }), HM = To(IS); To(jM); const jae = Vt({ trigger: Yp.trigger, placement: Dv.placement, disabled: Yp.disabled, visible: co.visible, transition: co.transition, popperOptions: Dv.popperOptions, tabindex: Dv.tabindex, content: co.content, popperStyle: co.popperStyle, popperClass: co.popperClass, enterable: { ...co.enterable, default: !0 }, effect: { ...co.effect, default: "light" }, teleported: co.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 } }), Vae = { "update:visible": (e) => Qs(e), "before-enter": () => !0, "before-leave": () => !0, "after-enter": () => !0, "after-leave": () => !0 }, Hae = "onUpdate:visible", Uae = W({ name: "ElPopover" }), qae = /* @__PURE__ */ W({ ...Uae, props: jae, emits: Vae, setup(e, { expose: t, emit: n }) { const r = e, o = E(() => r[Hae]), a = Mt("popover"), i = z(), s = E(() => { var m; return (m = y(i)) == null ? void 0 : m.popperRef; }), l = E(() => [ { width: Kp(r.width) }, r.popperStyle ]), u = E(() => [a.b(), r.popperClass, { [a.m("plain")]: !!r.content }]), c = E(() => r.transition === `${a.namespace.value}-fade-in-linear`), d = () => { var m; (m = i.value) == null || m.hide(); }, p = () => { n("before-enter"); }, h = () => { n("before-leave"); }, f = () => { n("after-enter"); }, v = () => { n("update:visible", !1), n("after-leave"); }; return t({ popperRef: s, hide: d }), (m, g) => (S(), re(y(G0), Et({ ref_key: "tooltipRef", ref: i }, 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": y(u), "popper-style": y(l), teleported: m.teleported, persistent: m.persistent, "gpu-acceleration": y(c), "onUpdate:visible": y(o), onBeforeShow: p, onBeforeHide: h, onShow: f, onHide: v }), { content: N(() => [ m.title ? (S(), L("div", { key: 0, class: H(y(a).e("title")), role: "title" }, ge(m.title), 3)) : J("v-if", !0), ue(m.$slots, "default", {}, () => [ Oe(ge(m.content), 1) ]) ]), default: N(() => [ m.$slots.reference ? ue(m.$slots, "reference", { key: 0 }) : J("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 Kae = /* @__PURE__ */ Ot(qae, [["__file", "popover.vue"]]); const n4 = (e, t) => { const n = t.arg || t.value, r = n == null ? void 0 : n.popperRef; r && (r.triggerRef = e); }; var Gae = { mounted(e, t) { n4(e, t); }, updated(e, t) { n4(e, t); } }; const Wae = "popover", Yae = RQ(Gae, Wae), Z0 = dr(Kae, { directive: Yae }); function Xae(e) { let t; const n = z(!1), r = en({ ...e, originalPosition: "", originalOverflow: "", visible: !1 }); function o(p) { r.text = p; } function a() { const p = r.parent, h = d.ns; if (!p.vLoadingAddClassList) { let f = p.getAttribute("loading-number"); f = Number.parseInt(f) - 1, f ? p.setAttribute("loading-number", f.toString()) : ($g(p, h.bm("parent", "relative")), p.removeAttribute("loading-number")), $g(p, h.bm("parent", "hidden")); } i(), c.unmount(); } function i() { var p, h; (h = (p = d.$el) == null ? void 0 : p.parentNode) == null || h.removeChild(d.$el); } function s() { var p; e.beforeClose && !e.beforeClose() || (n.value = !0, clearTimeout(t), t = setTimeout(l, 400), r.visible = !1, (p = e.closed) == null || p.call(e)); } function l() { if (!n.value) return; const p = r.parent; n.value = !1, p.vLoadingAddClassList = void 0, a(); } const u = W({ name: "ElLoading", setup(p, { expose: h }) { const { ns: f, zIndex: v } = fte("loading"); return h({ ns: f, zIndex: v }), () => { const m = r.spinner || r.svg, g = Gt("svg", { class: "circular", viewBox: r.svgViewBox ? r.svgViewBox : "0 0 50 50", ...m ? { innerHTML: m } : {} }, [ Gt("circle", { class: "path", cx: "25", cy: "25", r: "20", fill: "none" }) ]), b = r.text ? Gt("p", { class: f.b("text") }, [r.text]) : void 0; return Gt(nr, { name: f.b("fade"), onAfterLeave: l }, { default: N(() => [ Be(q("div", { style: { backgroundColor: r.background || "" }, class: [ f.b("mask"), r.customClass, r.fullscreen ? "is-fullscreen" : "" ] }, [ Gt("div", { class: f.b("spinner") }, [g, b]) ]), [[ht, r.visible]]) ]) }); }; } }), c = A0(u), d = c.mount(document.createElement("div")); return { ...Cr(r), setText: o, removeElLoadingChild: i, close: s, handleAfterLeave: l, vm: d, get $el() { return d.$el; } }; } let Kh; const _C = function(e = {}) { if (!ur) return; const t = Zae(e); if (t.fullscreen && Kh) return Kh; const n = Xae({ ...t, closed: () => { var o; (o = t.closed) == null || o.call(t), t.fullscreen && (Kh = void 0); } }); Jae(t, t.parent, n), r4(t, t.parent, n), t.parent.vLoadingAddClassList = () => r4(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), Ke(() => n.visible.value = t.visible), t.fullscreen && (Kh = n), n; }, Zae = (e) => { var t, n, r, o; let a; return wr(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 }; }, Jae = async (e, t, n) => { const { nextZIndex: r } = n.vm.zIndex || n.vm._.exposed.zIndex, o = {}; if (e.fullscreen) n.originalPosition.value = Gd(document.body, "position"), n.originalOverflow.value = Gd(document.body, "overflow"), o.zIndex = r(); else if (e.parent === document.body) { n.originalPosition.value = Gd(document.body, "position"), await Ke(); for (const a of ["top", "left"]) { const i = a === "top" ? "scrollTop" : "scrollLeft"; o[a] = `${e.target.getBoundingClientRect()[a] + document.body[i] + document.documentElement[i] - Number.parseInt(Gd(document.body, `margin-${a}`), 10)}px`; } for (const a of ["height", "width"]) o[a] = `${e.target.getBoundingClientRect()[a]}px`; } else n.originalPosition.value = Gd(t, "position"); for (const [a, i] of Object.entries(o)) n.$el.style[a] = i; }, r4 = (e, t, n) => { const r = n.vm.ns || n.vm._.exposed.ns; ["absolute", "fixed", "sticky"].includes(n.originalPosition.value) ? $g(t, r.bm("parent", "relative")) : x3(t, r.bm("parent", "relative")), e.fullscreen && e.lock ? x3(t, r.bm("parent", "hidden")) : $g(t, r.bm("parent", "hidden")); }, Bv = Symbol("ElLoading"), o4 = (e, t) => { var n, r, o, a; const i = t.instance, s = (p) => Fr(t.value) ? t.value[p] : void 0, l = (p) => { const h = wr(p) && (i == null ? void 0 : i[p]) || p; return h && z(h); }, u = (p) => l(s(p) || e.getAttribute(`element-loading-${UW(p)}`)), c = (n = s("fullscreen")) != null ? n : t.modifiers.fullscreen, d = { text: u("text"), svg: u("svg"), svgViewBox: u("svgViewBox"), spinner: u("spinner"), background: u("background"), customClass: u("customClass"), fullscreen: c, target: (r = s("target")) != null ? r : c ? void 0 : e, body: (o = s("body")) != null ? o : t.modifiers.body, lock: (a = s("lock")) != null ? a : t.modifiers.lock }; e[Bv] = { options: d, instance: _C(d) }; }, Qae = (e, t) => { for (const n of Object.keys(t)) xn(t[n]) && (t[n].value = e[n]); }, Mc = { mounted(e, t) { t.value && o4(e, t); }, updated(e, t) { const n = e[Bv]; t.oldValue !== t.value && (t.value && !t.oldValue ? o4(e, t) : t.value && t.oldValue ? Fr(t.value) && Qae(t.value, n.options) : n == null || n.instance.close()); }, unmounted(e) { var t; (t = e[Bv]) == null || t.instance.close(), e[Bv] = null; } }, UM = { install(e) { e.directive("loading", Mc), e.config.globalProperties.$loading = _C; }, directive: Mc, service: _C }; var eie = Object.defineProperty, tie = (e, t, n) => t in e ? eie(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Fa = (e, t, n) => tie(e, typeof t != "symbol" ? t + "" : t, n); const Bi = (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 a4; const Jn = typeof window < "u", nie = (e) => typeof e == "string", qM = () => { }, SC = Jn && ((a4 = window == null ? void 0 : window.navigator) == null ? void 0 : a4.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent); function KM(e) { return typeof e == "function" ? e() : y(e); } function rie(e) { return e; } function J0(e) { return x0() ? (Lf(e), !0) : !1; } function oie(e, t = !0) { st() ? ut(e) : t ? e() : Ke(e); } function Yi(e) { var t; const n = KM(e); return (t = n == null ? void 0 : n.$el) != null ? t : n; } const Q0 = Jn ? window : void 0; function Zo(...e) { let t, n, r, o; if (nie(e[0]) || Array.isArray(e[0]) ? ([n, r, o] = e, t = Q0) : [t, n, r, o] = e, !t) return qM; Array.isArray(n) || (n = [n]), Array.isArray(r) || (r = [r]); const a = [], i = () => { a.forEach((c) => c()), a.length = 0; }, s = (c, d, p, h) => (c.addEventListener(d, p, h), () => c.removeEventListener(d, p, h)), l = he(() => [Yi(t), KM(o)], ([c, d]) => { i(), c && a.push(...n.flatMap((p) => r.map((h) => s(c, p, h, d)))); }, { immediate: !0, flush: "post" }), u = () => { l(), i(); }; return J0(u), u; } let i4 = !1; function aie(e, t, n = {}) { const { window: r = Q0, ignore: o = [], capture: a = !0, detectIframe: i = !1 } = n; if (!r) return; SC && !i4 && (i4 = !0, Array.from(r.document.body.children).forEach((c) => c.addEventListener("click", qM))); let s = !0; const l = (c) => o.some((d) => { if (typeof d == "string") return Array.from(r.document.querySelectorAll(d)).some((p) => p === c.target || c.composedPath().includes(p)); { const p = Yi(d); return p && (c.target === p || c.composedPath().includes(p)); } }), u = [ Zo(r, "click", (c) => { const d = Yi(e); if (!(!d || d === c.target || c.composedPath().includes(d))) { if (c.detail === 0 && (s = !l(c)), !s) { s = !0; return; } t(c); } }, { passive: !0, capture: a }), Zo(r, "pointerdown", (c) => { const d = Yi(e); d && (s = !c.composedPath().includes(d) && !l(c)); }, { passive: !0 }), i && Zo(r, "blur", (c) => { var d; const p = Yi(e); ((d = r.document.activeElement) == null ? void 0 : d.tagName) === "IFRAME" && !(p != null && p.contains(r.document.activeElement)) && t(c); }) ].filter(Boolean); return () => u.forEach((c) => c()); } function GM(e, t = !1) { const n = z(), r = () => n.value = !!e(); return r(), oie(r, t), n; } const s4 = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, l4 = "__vueuse_ssr_handlers__"; s4[l4] = s4[l4] || {}; var u4 = Object.getOwnPropertySymbols, iie = Object.prototype.hasOwnProperty, sie = Object.prototype.propertyIsEnumerable, lie = (e, t) => { var n = {}; for (var r in e) iie.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]); if (e != null && u4) for (var r of u4(e)) t.indexOf(r) < 0 && sie.call(e, r) && (n[r] = e[r]); return n; }; function Vi(e, t, n = {}) { const r = n, { window: o = Q0 } = r, a = lie(r, ["window"]); let i; const s = GM(() => o && "ResizeObserver" in o), l = () => { i && (i.disconnect(), i = void 0); }, u = he(() => Yi(e), (d) => { l(), s.value && o && d && (i = new ResizeObserver(t), i.observe(d, a)); }, { immediate: !0, flush: "post" }), c = () => { l(), u(); }; return J0(c), { isSupported: s, stop: c }; } var c4 = Object.getOwnPropertySymbols, uie = Object.prototype.hasOwnProperty, cie = Object.prototype.propertyIsEnumerable, die = (e, t) => { var n = {}; for (var r in e) uie.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]); if (e != null && c4) for (var r of c4(e)) t.indexOf(r) < 0 && cie.call(e, r) && (n[r] = e[r]); return n; }; function pie(e, t, n = {}) { const r = n, { window: o = Q0 } = r, a = die(r, ["window"]); let i; const s = GM(() => o && "MutationObserver" in o), l = () => { i && (i.disconnect(), i = void 0); }, u = he(() => Yi(e), (d) => { l(), s.value && o && d && (i = new MutationObserver(t), i.observe(d, a)); }, { immediate: !0 }), c = () => { l(), u(); }; return J0(c), { isSupported: s, stop: c }; } var d4; (function(e) { e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE"; })(d4 || (d4 = {})); var fie = Object.defineProperty, p4 = Object.getOwnPropertySymbols, hie = Object.prototype.hasOwnProperty, vie = Object.prototype.propertyIsEnumerable, f4 = (e, t, n) => t in e ? fie(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, gie = (e, t) => { for (var n in t || (t = {})) hie.call(t, n) && f4(e, n, t[n]); if (p4) for (var n of p4(t)) vie.call(t, n) && f4(e, n, t[n]); return e; }; const mie = { 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] }; gie({ linear: rie }, mie); const yie = () => Jn && /firefox/i.test(window.navigator.userAgent), PS = (e) => { let t, n; return e.type === "touchend" ? (n = e.changedTouches[0].clientY, t = e.changedTouches[0].clientX) : e.type.startsWith("touch") ? (n = e.touches[0].clientY, t = e.touches[0].clientX) : (n = e.clientY, t = e.clientX), { clientX: t, clientY: n }; }; /** * @vue/shared v3.4.27 * (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 Xp = () => { }, bie = Object.prototype.hasOwnProperty, lu = (e, t) => bie.call(e, t), vo = Array.isArray, ao = (e) => typeof e == "function", Gr = (e) => typeof e == "string", Tr = (e) => e !== null && typeof e == "object", wie = Object.prototype.toString, xie = (e) => wie.call(e), X1 = (e) => xie(e).slice(8, -1), WM = (e) => { const t = /* @__PURE__ */ Object.create(null); return (n) => t[n] || (t[n] = e(n)); }, kie = /-(\w)/g, Cie = WM((e) => e.replace(kie, (t, n) => n ? n.toUpperCase() : "")), _ie = /\B([A-Z])/g, Sie = WM( (e) => e.replace(_ie, "-$1").toLowerCase() ); var YM = typeof global == "object" && global && global.Object === Object && global, $ie = typeof self == "object" && self && self.Object === Object && self, Oi = YM || $ie || Function("return this")(), gi = Oi.Symbol, XM = Object.prototype, Eie = XM.hasOwnProperty, Oie = XM.toString, Yd = gi ? gi.toStringTag : void 0; function Fie(e) { var t = Eie.call(e, Yd), n = e[Yd]; try { e[Yd] = void 0; var r = !0; } catch { } var o = Oie.call(e); return r && (t ? e[Yd] = n : delete e[Yd]), o; } var Tie = Object.prototype, Aie = Tie.toString; function Iie(e) { return Aie.call(e); } var Pie = "[object Null]", Lie = "[object Undefined]", h4 = gi ? gi.toStringTag : void 0; function fd(e) { return e == null ? e === void 0 ? Lie : Pie : h4 && h4 in Object(e) ? Fie(e) : Iie(e); } function Dc(e) { return e != null && typeof e == "object"; } var Rie = "[object Symbol]"; function em(e) { return typeof e == "symbol" || Dc(e) && fd(e) == Rie; } function Nie(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 ja = Array.isArray, Mie = 1 / 0, v4 = gi ? gi.prototype : void 0, g4 = v4 ? v4.toString : void 0; function ZM(e) { if (typeof e == "string") return e; if (ja(e)) return Nie(e, ZM) + ""; if (em(e)) return g4 ? g4.call(e) : ""; var t = e + ""; return t == "0" && 1 / e == -Mie ? "-0" : t; } var Die = /\s/; function Bie(e) { for (var t = e.length; t-- && Die.test(e.charAt(t)); ) ; return t; } var zie = /^\s+/; function jie(e) { return e && e.slice(0, Bie(e) + 1).replace(zie, ""); } function nl(e) { var t = typeof e; return e != null && (t == "object" || t == "function"); } var m4 = NaN, Vie = /^[-+]0x[0-9a-f]+$/i, Hie = /^0b[01]+$/i, Uie = /^0o[0-7]+$/i, qie = parseInt; function y4(e) { if (typeof e == "number") return e; if (em(e)) return m4; if (nl(e)) { var t = typeof e.valueOf == "function" ? e.valueOf() : e; e = nl(t) ? t + "" : t; } if (typeof e != "string") return e === 0 ? e : +e; e = jie(e); var n = Hie.test(e); return n || Uie.test(e) ? qie(e.slice(2), n ? 2 : 8) : Vie.test(e) ? m4 : +e; } function JM(e) { return e; } var Kie = "[object AsyncFunction]", Gie = "[object Function]", Wie = "[object GeneratorFunction]", Yie = "[object Proxy]"; function QM(e) { if (!nl(e)) return !1; var t = fd(e); return t == Gie || t == Wie || t == Kie || t == Yie; } var Z1 = Oi["__core-js_shared__"], b4 = function() { var e = /[^.]+$/.exec(Z1 && Z1.keys && Z1.keys.IE_PROTO || ""); return e ? "Symbol(src)_1." + e : ""; }(); function Xie(e) { return !!b4 && b4 in e; } var Zie = Function.prototype, Jie = Zie.toString; function Iu(e) { if (e != null) { try { return Jie.call(e); } catch { } try { return e + ""; } catch { } } return ""; } var Qie = /[\\^$.*+?()[\]{}|]/g, ese = /^\[object .+?Constructor\]$/, tse = Function.prototype, nse = Object.prototype, rse = tse.toString, ose = nse.hasOwnProperty, ase = RegExp( "^" + rse.call(ose).replace(Qie, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$" ); function ise(e) { if (!nl(e) || Xie(e)) return !1; var t = QM(e) ? ase : ese; return t.test(Iu(e)); } function sse(e, t) { return e == null ? void 0 : e[t]; } function Pu(e, t) { var n = sse(e, t); return ise(n) ? n : void 0; } var $C = Pu(Oi, "WeakMap"); function lse(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 use = 800, cse = 16, dse = Date.now; function pse(e) { var t = 0, n = 0; return function() { var r = dse(), o = cse - (r - n); if (n = r, o > 0) { if (++t >= use) return arguments[0]; } else t = 0; return e.apply(void 0, arguments); }; } function fse(e) { return function() { return e; }; } var Ag = function() { try { var e = Pu(Object, "defineProperty"); return e({}, "", {}), e; } catch { } }(), hse = Ag ? function(e, t) { return Ag(e, "toString", { configurable: !0, enumerable: !1, value: fse(t), writable: !0 }); } : JM, vse = pse(hse); function gse(e, t, n, r) { e.length; for (var o = n + 1; o--; ) if (t(e[o], o, e)) return o; return -1; } var mse = 9007199254740991, yse = /^(?:0|[1-9]\d*)$/; function LS(e, t) { var n = typeof e; return t = t ?? mse, !!t && (n == "number" || n != "symbol" && yse.test(e)) && e > -1 && e % 1 == 0 && e < t; } function bse(e, t, n) { t == "__proto__" && Ag ? Ag(e, t, { configurable: !0, enumerable: !0, value: n, writable: !0 }) : e[t] = n; } function RS(e, t) { return e === t || e !== e && t !== t; } var wse = Object.prototype, xse = wse.hasOwnProperty; function kse(e, t, n) { var r = e[t]; (!(xse.call(e, t) && RS(r, n)) || n === void 0 && !(t in e)) && bse(e, t, n); } var w4 = Math.max; function Cse(e, t, n) { return t = w4(t === void 0 ? e.length - 1 : t, 0), function() { for (var r = arguments, o = -1, a = w4(r.length - t, 0), i = Array(a); ++o < a; ) i[o] = r[t + o]; o = -1; for (var s = Array(t + 1); ++o < t; ) s[o] = r[o]; return s[t] = n(i), lse(e, this, s); }; } var _se = 9007199254740991; function NS(e) { return typeof e == "number" && e > -1 && e % 1 == 0 && e <= _se; } function Sse(e) { return e != null && NS(e.length) && !QM(e); } var $se = Object.prototype; function Ese(e) { var t = e && e.constructor, n = typeof t == "function" && t.prototype || $se; return e === n; } function Ose(e, t) { for (var n = -1, r = Array(e); ++n < e; ) r[n] = t(n); return r; } var Fse = "[object Arguments]"; function x4(e) { return Dc(e) && fd(e) == Fse; } var eD = Object.prototype, Tse = eD.hasOwnProperty, Ase = eD.propertyIsEnumerable, MS = x4(/* @__PURE__ */ function() { return arguments; }()) ? x4 : function(e) { return Dc(e) && Tse.call(e, "callee") && !Ase.call(e, "callee"); }; function Ise() { return !1; } var tD = typeof exports == "object" && exports && !exports.nodeType && exports, k4 = tD && typeof module == "object" && module && !module.nodeType && module, Pse = k4 && k4.exports === tD, C4 = Pse ? Oi.Buffer : void 0, Lse = C4 ? C4.isBuffer : void 0, EC = Lse || Ise, Rse = "[object Arguments]", Nse = "[object Array]", Mse = "[object Boolean]", Dse = "[object Date]", Bse = "[object Error]", zse = "[object Function]", jse = "[object Map]", Vse = "[object Number]", Hse = "[object Object]", Use = "[object RegExp]", qse = "[object Set]", Kse = "[object String]", Gse = "[object WeakMap]", Wse = "[object ArrayBuffer]", Yse = "[object DataView]", Xse = "[object Float32Array]", Zse = "[object Float64Array]", Jse = "[object Int8Array]", Qse = "[object Int16Array]", ele = "[object Int32Array]", tle = "[object Uint8Array]", nle = "[object Uint8ClampedArray]", rle = "[object Uint16Array]", ole = "[object Uint32Array]", Sn = {}; Sn[Xse] = Sn[Zse] = Sn[Jse] = Sn[Qse] = Sn[ele] = Sn[tle] = Sn[nle] = Sn[rle] = Sn[ole] = !0; Sn[Rse] = Sn[Nse] = Sn[Wse] = Sn[Mse] = Sn[Yse] = Sn[Dse] = Sn[Bse] = Sn[zse] = Sn[jse] = Sn[Vse] = Sn[Hse] = Sn[Use] = Sn[qse] = Sn[Kse] = Sn[Gse] = !1; function ale(e) { return Dc(e) && NS(e.length) && !!Sn[fd(e)]; } function ile(e) { return function(t) { return e(t); }; } var nD = typeof exports == "object" && exports && !exports.nodeType && exports, Op = nD && typeof module == "object" && module && !module.nodeType && module, sle = Op && Op.exports === nD, J1 = sle && YM.process, _4 = function() { try { var e = Op && Op.require && Op.require("util").types; return e || J1 && J1.binding && J1.binding("util"); } catch { } }(), S4 = _4 && _4.isTypedArray, rD = S4 ? ile(S4) : ale, lle = Object.prototype, ule = lle.hasOwnProperty; function cle(e, t) { var n = ja(e), r = !n && MS(e), o = !n && !r && EC(e), a = !n && !r && !o && rD(e), i = n || r || o || a, s = i ? Ose(e.length, String) : [], l = s.length; for (var u in e) ule.call(e, u) && !(i && // Safari 9 has enumerable `arguments.length` in strict mode. (u == "length" || // Node.js 0.10 has enumerable non-index properties on buffers. o && (u == "offset" || u == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays. a && (u == "buffer" || u == "byteLength" || u == "byteOffset") || // Skip index properties. LS(u, l))) && s.push(u); return s; } function dle(e, t) { return function(n) { return e(t(n)); }; } var ple = dle(Object.keys, Object), fle = Object.prototype, hle = fle.hasOwnProperty; function vle(e) { if (!Ese(e)) return ple(e); var t = []; for (var n in Object(e)) hle.call(e, n) && n != "constructor" && t.push(n); return t; } function oD(e) { return Sse(e) ? cle(e) : vle(e); } var gle = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, mle = /^\w*$/; function DS(e, t) { if (ja(e)) return !1; var n = typeof e; return n == "number" || n == "symbol" || n == "boolean" || e == null || em(e) ? !0 : mle.test(e) || !gle.test(e) || t != null && e in Object(t); } var Zp = Pu(Object, "create"); function yle() { this.__data__ = Zp ? Zp(null) : {}, this.size = 0; } function ble(e) { var t = this.has(e) && delete this.__data__[e]; return this.size -= t ? 1 : 0, t; } var wle = "__lodash_hash_undefined__", xle = Object.prototype, kle = xle.hasOwnProperty; function Cle(e) { var t = this.__data__; if (Zp) { var n = t[e]; return n === wle ? void 0 : n; } return kle.call(t, e) ? t[e] : void 0; } var _le = Object.prototype, Sle = _le.hasOwnProperty; function $le(e) { var t = this.__data__; return Zp ? t[e] !== void 0 : Sle.call(t, e); } var Ele = "__lodash_hash_undefined__"; function Ole(e, t) { var n = this.__data__; return this.size += this.has(e) ? 0 : 1, n[e] = Zp && t === void 0 ? Ele : t, this; } function uu(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]); } } uu.prototype.clear = yle; uu.prototype.delete = ble; uu.prototype.get = Cle; uu.prototype.has = $le; uu.prototype.set = Ole; function Fle() { this.__data__ = [], this.size = 0; } function tm(e, t) { for (var n = e.length; n--; ) if (RS(e[n][0], t)) return n; return -1; } var Tle = Array.prototype, Ale = Tle.splice; function Ile(e) { var t = this.__data__, n = tm(t, e); if (n < 0) return !1; var r = t.length - 1; return n == r ? t.pop() : Ale.call(t, n, 1), --this.size, !0; } function Ple(e) { var t = this.__data__, n = tm(t, e); return n < 0 ? void 0 : t[n][1]; } function Lle(e) { return tm(this.__data__, e) > -1; } function Rle(e, t) { var n = this.__data__, r = tm(n, e); return r < 0 ? (++this.size, n.push([e, t])) : n[r][1] = t, this; } function ps(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]); } } ps.prototype.clear = Fle; ps.prototype.delete = Ile; ps.prototype.get = Ple; ps.prototype.has = Lle; ps.prototype.set = Rle; var Jp = Pu(Oi, "Map"); function Nle() { this.size = 0, this.__data__ = { hash: new uu(), map: new (Jp || ps)(), string: new uu() }; } function Mle(e) { var t = typeof e; return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e !== "__proto__" : e === null; } function nm(e, t) { var n = e.__data__; return Mle(t) ? n[typeof t == "string" ? "string" : "hash"] : n.map; } function Dle(e) { var t = nm(this, e).delete(e); return this.size -= t ? 1 : 0, t; } function Ble(e) { return nm(this, e).get(e); } function zle(e) { return nm(this, e).has(e); } function jle(e, t) { var n = nm(this, e), r = n.size; return n.set(e, t), this.size += n.size == r ? 0 : 1, this; } function fs(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]); } } fs.prototype.clear = Nle; fs.prototype.delete = Dle; fs.prototype.get = Ble; fs.prototype.has = zle; fs.prototype.set = jle; var Vle = "Expected a function"; function BS(e, t) { if (typeof e != "function" || t != null && typeof t != "function") throw new TypeError(Vle); 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 i = e.apply(this, r); return n.cache = a.set(o, i) || a, i; }; return n.cache = new (BS.Cache || fs)(), n; } BS.Cache = fs; var Hle = 500; function Ule(e) { var t = BS(e, function(r) { return n.size === Hle && n.clear(), r; }), n = t.cache; return t; } var qle = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, Kle = /\\(\\)?/g, Gle = Ule(function(e) { var t = []; return e.charCodeAt(0) === 46 && t.push(""), e.replace(qle, function(n, r, o, a) { t.push(o ? a.replace(Kle, "$1") : r || n); }), t; }); function Wle(e) { return e == null ? "" : ZM(e); } function rm(e, t) { return ja(e) ? e : DS(e, t) ? [e] : Gle(Wle(e)); } var Yle = 1 / 0; function Kf(e) { if (typeof e == "string" || em(e)) return e; var t = e + ""; return t == "0" && 1 / e == -Yle ? "-0" : t; } function zS(e, t) { t = rm(t, e); for (var n = 0, r = t.length; e != null && n < r; ) e = e[Kf(t[n++])]; return n && n == r ? e : void 0; } function Ui(e, t, n) { var r = e == null ? void 0 : zS(e, t); return r === void 0 ? n : r; } function aD(e, t) { for (var n = -1, r = t.length, o = e.length; ++n < r; ) e[o + n] = t[n]; return e; } var $4 = gi ? gi.isConcatSpreadable : void 0; function Xle(e) { return ja(e) || MS(e) || !!($4 && e && e[$4]); } function Zle(e, t, n, r, o) { var a = -1, i = e.length; for (n || (n = Xle), o || (o = []); ++a < i; ) { var s = e[a]; n(s) ? aD(o, s) : o[o.length] = s; } return o; } function Jle(e) { var t = e == null ? 0 : e.length; return t ? Zle(e) : []; } function Qle(e) { return vse(Cse(e, void 0, Jle), e + ""); } function Bs() { if (!arguments.length) return []; var e = arguments[0]; return ja(e) ? e : [e]; } function eue() { this.__data__ = new ps(), this.size = 0; } function tue(e) { var t = this.__data__, n = t.delete(e); return this.size = t.size, n; } function nue(e) { return this.__data__.get(e); } function rue(e) { return this.__data__.has(e); } var oue = 200; function aue(e, t) { var n = this.__data__; if (n instanceof ps) { var r = n.__data__; if (!Jp || r.length < oue - 1) return r.push([e, t]), this.size = ++n.size, this; n = this.__data__ = new fs(r); } return n.set(e, t), this.size = n.size, this; } function Ji(e) { var t = this.__data__ = new ps(e); this.size = t.size; } Ji.prototype.clear = eue; Ji.prototype.delete = tue; Ji.prototype.get = nue; Ji.prototype.has = rue; Ji.prototype.set = aue; function iue(e, t) { for (var n = -1, r = e == null ? 0 : e.length, o = 0, a = []; ++n < r; ) { var i = e[n]; t(i, n, e) && (a[o++] = i); } return a; } function sue() { return []; } var lue = Object.prototype, uue = lue.propertyIsEnumerable, E4 = Object.getOwnPropertySymbols, cue = E4 ? function(e) { return e == null ? [] : (e = Object(e), iue(E4(e), function(t) { return uue.call(e, t); })); } : sue; function due(e, t, n) { var r = t(e); return ja(e) ? r : aD(r, n(e)); } function O4(e) { return due(e, oD, cue); } var OC = Pu(Oi, "DataView"), FC = Pu(Oi, "Promise"), TC = Pu(Oi, "Set"), F4 = "[object Map]", pue = "[object Object]", T4 = "[object Promise]", A4 = "[object Set]", I4 = "[object WeakMap]", P4 = "[object DataView]", fue = Iu(OC), hue = Iu(Jp), vue = Iu(FC), gue = Iu(TC), mue = Iu($C), Ms = fd; (OC && Ms(new OC(new ArrayBuffer(1))) != P4 || Jp && Ms(new Jp()) != F4 || FC && Ms(FC.resolve()) != T4 || TC && Ms(new TC()) != A4 || $C && Ms(new $C()) != I4) && (Ms = function(e) { var t = fd(e), n = t == pue ? e.constructor : void 0, r = n ? Iu(n) : ""; if (r) switch (r) { case fue: return P4; case hue: return F4; case vue: return T4; case gue: return A4; case mue: return I4; } return t; }); var L4 = Oi.Uint8Array, yue = "__lodash_hash_undefined__"; function bue(e) { return this.__data__.set(e, yue), this; } function wue(e) { return this.__data__.has(e); } function Ig(e) { var t = -1, n = e == null ? 0 : e.length; for (this.__data__ = new fs(); ++t < n; ) this.add(e[t]); } Ig.prototype.add = Ig.prototype.push = bue; Ig.prototype.has = wue; function xue(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 kue(e, t) { return e.has(t); } var Cue = 1, _ue = 2; function iD(e, t, n, r, o, a) { var i = n & Cue, s = e.length, l = t.length; if (s != l && !(i && l > s)) return !1; var u = a.get(e), c = a.get(t); if (u && c) return u == t && c == e; var d = -1, p = !0, h = n & _ue ? new Ig() : void 0; for (a.set(e, t), a.set(t, e); ++d < s; ) { var f = e[d], v = t[d]; if (r) var m = i ? r(v, f, d, t, e, a) : r(f, v, d, e, t, a); if (m !== void 0) { if (m) continue; p = !1; break; } if (h) { if (!xue(t, function(g, b) { if (!kue(h, b) && (f === g || o(f, g, n, r, a))) return h.push(b); })) { p = !1; break; } } else if (!(f === v || o(f, v, n, r, a))) { p = !1; break; } } return a.delete(e), a.delete(t), p; } function Sue(e) { var t = -1, n = Array(e.size); return e.forEach(function(r, o) { n[++t] = [o, r]; }), n; } function $ue(e) { var t = -1, n = Array(e.size); return e.forEach(function(r) { n[++t] = r; }), n; } var Eue = 1, Oue = 2, Fue = "[object Boolean]", Tue = "[object Date]", Aue = "[object Error]", Iue = "[object Map]", Pue = "[object Number]", Lue = "[object RegExp]", Rue = "[object Set]", Nue = "[object String]", Mue = "[object Symbol]", Due = "[object ArrayBuffer]", Bue = "[object DataView]", R4 = gi ? gi.prototype : void 0, Q1 = R4 ? R4.valueOf : void 0; function zue(e, t, n, r, o, a, i) { switch (n) { case Bue: if (e.byteLength != t.byteLength || e.byteOffset != t.byteOffset) return !1; e = e.buffer, t = t.buffer; case Due: return !(e.byteLength != t.byteLength || !a(new L4(e), new L4(t))); case Fue: case Tue: case Pue: return RS(+e, +t); case Aue: return e.name == t.name && e.message == t.message; case Lue: case Nue: return e == t + ""; case Iue: var s = Sue; case Rue: var l = r & Eue; if (s || (s = $ue), e.size != t.size && !l) return !1; var u = i.get(e); if (u) return u == t; r |= Oue, i.set(e, t); var c = iD(s(e), s(t), r, o, a, i); return i.delete(e), c; case Mue: if (Q1) return Q1.call(e) == Q1.call(t); } return !1; } var jue = 1, Vue = Object.prototype, Hue = Vue.hasOwnProperty; function Uue(e, t, n, r, o, a) { var i = n & jue, s = O4(e), l = s.length, u = O4(t), c = u.length; if (l != c && !i) return !1; for (var d = l; d--; ) { var p = s[d]; if (!(i ? p in t : Hue.call(t, p))) return !1; } var h = a.get(e), f = a.get(t); if (h && f) return h == t && f == e; var v = !0; a.set(e, t), a.set(t, e); for (var m = i; ++d < l; ) { p = s[d]; var g = e[p], b = t[p]; if (r) var x = i ? r(b, g, p, t, e, a) : r(g, b, p, e, t, a); if (!(x === void 0 ? g === b || o(g, b, n, r, a) : x)) { v = !1; break; } m || (m = p == "constructor"); } if (v && !m) { var w = e.constructor, k = t.constructor; w != k && "constructor" in e && "constructor" in t && !(typeof w == "function" && w instanceof w && typeof k == "function" && k instanceof k) && (v = !1); } return a.delete(e), a.delete(t), v; } var que = 1, N4 = "[object Arguments]", M4 = "[object Array]", Gh = "[object Object]", Kue = Object.prototype, D4 = Kue.hasOwnProperty; function Gue(e, t, n, r, o, a) { var i = ja(e), s = ja(t), l = i ? M4 : Ms(e), u = s ? M4 : Ms(t); l = l == N4 ? Gh : l, u = u == N4 ? Gh : u; var c = l == Gh, d = u == Gh, p = l == u; if (p && EC(e)) { if (!EC(t)) return !1; i = !0, c = !1; } if (p && !c) return a || (a = new Ji()), i || rD(e) ? iD(e, t, n, r, o, a) : zue(e, t, l, n, r, o, a); if (!(n & que)) { var h = c && D4.call(e, "__wrapped__"), f = d && D4.call(t, "__wrapped__"); if (h || f) { var v = h ? e.value() : e, m = f ? t.value() : t; return a || (a = new Ji()), o(v, m, n, r, a); } } return p ? (a || (a = new Ji()), Uue(e, t, n, r, o, a)) : !1; } function om(e, t, n, r, o) { return e === t ? !0 : e == null || t == null || !Dc(e) && !Dc(t) ? e !== e && t !== t : Gue(e, t, n, r, om, o); } var Wue = 1, Yue = 2; function Xue(e, t, n, r) { var o = n.length, a = o; if (e == null) return !a; for (e = Object(e); o--; ) { var i = n[o]; if (i[2] ? i[1] !== e[i[0]] : !(i[0] in e)) return !1; } for (; ++o < a; ) { i = n[o]; var s = i[0], l = e[s], u = i[1]; if (i[2]) { if (l === void 0 && !(s in e)) return !1; } else { var c = new Ji(), d; if (!(d === void 0 ? om(u, l, Wue | Yue, r, c) : d)) return !1; } } return !0; } function sD(e) { return e === e && !nl(e); } function Zue(e) { for (var t = oD(e), n = t.length; n--; ) { var r = t[n], o = e[r]; t[n] = [r, o, sD(o)]; } return t; } function lD(e, t) { return function(n) { return n == null ? !1 : n[e] === t && (t !== void 0 || e in Object(n)); }; } function Jue(e) { var t = Zue(e); return t.length == 1 && t[0][2] ? lD(t[0][0], t[0][1]) : function(n) { return n === e || Xue(n, e, t); }; } function Que(e, t) { return e != null && t in Object(e); } function ece(e, t, n) { t = rm(t, e); for (var r = -1, o = t.length, a = !1; ++r < o; ) { var i = Kf(t[r]); if (!(a = e != null && n(e, i))) break; e = e[i]; } return a || ++r != o ? a : (o = e == null ? 0 : e.length, !!o && NS(o) && LS(i, o) && (ja(e) || MS(e))); } function uD(e, t) { return e != null && ece(e, t, Que); } var tce = 1, nce = 2; function rce(e, t) { return DS(e) && sD(t) ? lD(Kf(e), t) : function(n) { var r = Ui(n, e); return r === void 0 && r === t ? uD(n, e) : om(t, r, tce | nce); }; } function oce(e) { return function(t) { return t == null ? void 0 : t[e]; }; } function ace(e) { return function(t) { return zS(t, e); }; } function ice(e) { return DS(e) ? oce(Kf(e)) : ace(e); } function sce(e) { return typeof e == "function" ? e : e == null ? JM : typeof e == "object" ? ja(e) ? rce(e[0], e[1]) : Jue(e) : ice(e); } var ey = function() { return Oi.Date.now(); }, lce = "Expected a function", uce = Math.max, cce = Math.min; function cD(e, t, n) { var r, o, a, i, s, l, u = 0, c = !1, d = !1, p = !0; if (typeof e != "function") throw new TypeError(lce); t = y4(t) || 0, nl(n) && (c = !!n.leading, d = "maxWait" in n, a = d ? uce(y4(n.maxWait) || 0, t) : a, p = "trailing" in n ? !!n.trailing : p); function h(C) { var _ = r, $ = o; return r = o = void 0, u = C, i = e.apply($, _), i; } function f(C) { return u = C, s = setTimeout(g, t), c ? h(C) : i; } function v(C) { var _ = C - l, $ = C - u, O = t - _; return d ? cce(O, a - $) : O; } function m(C) { var _ = C - l, $ = C - u; return l === void 0 || _ >= t || _ < 0 || d && $ >= a; } function g() { var C = ey(); if (m(C)) return b(C); s = setTimeout(g, v(C)); } function b(C) { return s = void 0, p && r ? h(C) : (r = o = void 0, i); } function x() { s !== void 0 && clearTimeout(s), u = 0, r = l = o = s = void 0; } function w() { return s === void 0 ? i : b(ey()); } function k() { var C = ey(), _ = m(C); if (r = arguments, o = this, l = C, _) { if (s === void 0) return f(l); if (d) return clearTimeout(s), s = setTimeout(g, t), h(l); } return s === void 0 && (s = setTimeout(g, t)), i; } return k.cancel = x, k.flush = w, k; } function dce(e, t, n) { var r = e == null ? 0 : e.length; if (!r) return -1; var o = r - 1; return gse(e, sce(t), o); } function Pg(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 Lg(e, t) { return om(e, t); } function Ws(e) { return e == null; } function pce(e) { return e === void 0; } function fce(e, t, n, r) { if (!nl(e)) return e; t = rm(t, e); for (var o = -1, a = t.length, i = a - 1, s = e; s != null && ++o < a; ) { var l = Kf(t[o]), u = n; if (l === "__proto__" || l === "constructor" || l === "prototype") return e; if (o != i) { var c = s[l]; u = void 0, u === void 0 && (u = nl(c) ? c : LS(t[o + 1]) ? [] : {}); } kse(s, l, u), s = s[l]; } return e; } function hce(e, t, n) { for (var r = -1, o = t.length, a = {}; ++r < o; ) { var i = t[r], s = zS(e, i); n(s, i) && fce(a, rm(i, e), s); } return a; } function vce(e, t) { return hce(e, t, function(n, r) { return uD(e, r); }); } var dD = Qle(function(e, t) { return e == null ? {} : vce(e, t); }); const Hs = (e) => e === void 0, Bc = (e) => typeof e == "boolean", Ar = (e) => typeof e == "number", Ql = (e) => typeof Element > "u" ? !1 : e instanceof Element, Rg = (e) => Ws(e), gce = (e) => Gr(e) ? !Number.isNaN(Number(e)) : !1, mce = (e = "") => e.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d"), B4 = (e) => Object.keys(e); let pD = class extends Error { constructor(t) { super(t), this.name = "ElementPlusError"; } }; function yce(e, t) { throw new pD(`[${e}] ${t}`); } function Qn(e, t) { if (process.env.NODE_ENV !== "production") { const n = Gr(e) ? new pD(`[${e}] ${t}`) : e; console.warn(n); } } const bce = "utils/dom/style", fD = (e = "") => e.split(" ").filter((t) => !!t.trim()), AC = (e, t) => { !e || !t.trim() || e.classList.add(...fD(t)); }, eu = (e, t) => { !e || !t.trim() || e.classList.remove(...fD(t)); }, Xd = (e, t) => { var n; if (!Jn || !e || !t) return ""; let r = Cie(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 zc(e, t = "px") { if (!e) return ""; if (Ar(e) || gce(e)) return `${e}${t}`; if (Gr(e)) return e; Qn(bce, "binding value must be a string or number"); } function wce(e, t) { if (!Jn) 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, u) => l + u.offsetTop, 0), a = o + t.offsetHeight, i = e.scrollTop, s = i + e.clientHeight; o < i ? e.scrollTop = o : a > s && (e.scrollTop = a - e.clientHeight); } const hD = "__epPropKey", Ct = (e) => e, xce = (e) => Tr(e) && !!e[hD], am = (e, t) => { if (!Tr(e) || xce(e)) return e; const { values: n, required: r, default: o, type: a, validator: i } = e, s = { type: a, required: !!r, validator: n || i ? (l) => { let u = !1, c = []; if (n && (c = Array.from(n), lu(e, "default") && c.push(o), u || (u = c.includes(l))), i && (u || (u = i(l))), !u && c.length > 0) { const d = [...new Set(c)].map((p) => JSON.stringify(p)).join(", "); k0(`Invalid prop: validation failed${t ? ` for prop "${t}"` : ""}. Expected one of [${d}], got value ${JSON.stringify(l)}.`); } return u; } : void 0, [hD]: !0 }; return lu(e, "default") && (s.default = o), s; }, ln = (e) => Pg(Object.entries(e).map(([t, n]) => [ t, am(n, t) ])), rl = Ct([ String, Object, Function ]), vD = { validating: Ei, success: sS, error: $i }, _r = (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; }, kce = (e, t) => (e.install = (n) => { n.directive(t, e); }, e), hs = (e) => (e.install = Xp, e), sr = { 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" }, Or = "update:modelValue", jS = "change", gD = ["", "default", "small", "large"], Cce = (e) => /([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(e), vc = (e) => e, _ce = ["class", "style"], Sce = /^on[A-Z]/, $ce = (e = {}) => { const { excludeListeners: t = !1, excludeKeys: n } = e, r = E(() => ((n == null ? void 0 : n.value) || []).concat(_ce)), o = st(); return o ? E(() => { var a; return Pg(Object.entries((a = o.proxy) == null ? void 0 : a.$attrs).filter(([i]) => !r.value.includes(i) && !(t && Sce.test(i)))); }) : (Qn("use-attrs", "getCurrentInstance() returned null. useAttrs() must be called at the top of a setup function"), E(() => ({}))); }, zv = ({ from: e, replacement: t, scope: n, version: r, ref: o, type: a = "API" }, i) => { he(() => y(i), (s) => { s && Qn(n, `[${a}] ${e} is about to be deprecated in version ${r}, please use ${t} instead. For more detail, please visit: ${o} `); }, { immediate: !0 }); }; var Ece = { 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 Oce = (e) => (t, n) => Fce(t, n, y(e)), Fce = (e, t, n) => Ui(n, e, e).replace(/\{(\w+)\}/g, (r, o) => { var a; return `${(a = t == null ? void 0 : t[o]) != null ? a : `{${o}}`}`; }), Tce = (e) => { const t = E(() => y(e).name), n = xn(e) ? e : z(e); return { lang: t, locale: n, t: Oce(e) }; }, mD = Symbol("localeContextKey"), Gf = (e) => { const t = e || be(mD, z()); return Tce(E(() => t.value || Ece)); }, jv = "el", Ace = "is-", Pl = (e, t, n, r, o) => { let a = `${e}-${t}`; return n && (a += `-${n}`), r && (a += `__${r}`), o && (a += `--${o}`), a; }, yD = Symbol("namespaceContextKey"), VS = (e) => { const t = e || (st() ? be(yD, z(jv)) : z(jv)); return E(() => y(t) || jv); }, Lt = (e, t) => { const n = VS(t); return { namespace: n, b: (r = "") => Pl(n.value, e, r, "", ""), e: (r) => r ? Pl(n.value, e, "", r, "") : "", m: (r) => r ? Pl(n.value, e, "", "", r) : "", be: (r, o) => r && o ? Pl(n.value, e, r, o, "") : "", em: (r, o) => r && o ? Pl(n.value, e, "", r, o) : "", bm: (r, o) => r && o ? Pl(n.value, e, r, "", o) : "", bem: (r, o, a) => r && o && a ? Pl(n.value, e, r, o, a) : "", is: (r, ...o) => { const a = o.length >= 1 ? o[0] : !0; return r && a ? `${Ace}${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}` }; }, Ice = am({ type: Ct(Boolean), default: null }), Pce = am({ type: Ct(Function) }), Lce = (e) => { const t = `update:${e}`, n = `onUpdate:${e}`, r = [t], o = { [e]: Ice, [n]: Pce }; return { useModelToggle: ({ indicator: a, toggleReason: i, shouldHideWhenRouteChanges: s, shouldProceed: l, onShow: u, onHide: c }) => { const d = st(), { emit: p } = d, h = d.props, f = E(() => ao(h[n])), v = E(() => h[e] === null), m = (C) => { a.value !== !0 && (a.value = !0, i && (i.value = C), ao(u) && u(C)); }, g = (C) => { a.value !== !1 && (a.value = !1, i && (i.value = C), ao(c) && c(C)); }, b = (C) => { if (h.disabled === !0 || ao(l) && !l()) return; const _ = f.value && Jn; _ && p(t, !0), (v.value || !_) && m(C); }, x = (C) => { if (h.disabled === !0 || !Jn) return; const _ = f.value && Jn; _ && p(t, !1), (v.value || !_) && g(C); }, w = (C) => { Bc(C) && (h.disabled && C ? f.value && p(t, !1) : a.value !== C && (C ? m() : g())); }, k = () => { a.value ? x() : b(); }; return he(() => h[e], w), s && d.appContext.config.globalProperties.$route !== void 0 && he(() => ({ ...d.proxy.$route }), () => { s.value && a.value && x(); }), ut(() => { w(h[e]); }), { hide: x, show: b, toggle: k, hasUpdateHandler: f }; }, useModelToggleProps: o, useModelToggleEmits: r }; }, bD = (e) => { const t = st(); return E(() => { var n, r; return (r = (n = t == null ? void 0 : t.proxy) == null ? void 0 : n.$props) == null ? void 0 : r[e]; }); }; var yo = "top", sa = "bottom", la = "right", bo = "left", HS = "auto", Wf = [yo, sa, la, bo], jc = "start", Qp = "end", Rce = "clippingParents", wD = "viewport", Zd = "popper", Nce = "reference", z4 = Wf.reduce(function(e, t) { return e.concat([t + "-" + jc, t + "-" + Qp]); }, []), im = [].concat(Wf, [HS]).reduce(function(e, t) { return e.concat([t, t + "-" + jc, t + "-" + Qp]); }, []), Mce = "beforeRead", Dce = "read", Bce = "afterRead", zce = "beforeMain", jce = "main", Vce = "afterMain", Hce = "beforeWrite", Uce = "write", qce = "afterWrite", Kce = [Mce, Dce, Bce, zce, jce, Vce, Hce, Uce, qce]; function mi(e) { return e ? (e.nodeName || "").toLowerCase() : null; } function Ua(e) { if (e == null) return window; if (e.toString() !== "[object Window]") { var t = e.ownerDocument; return t && t.defaultView || window; } return e; } function Vc(e) { var t = Ua(e).Element; return e instanceof t || e instanceof Element; } function ea(e) { var t = Ua(e).HTMLElement; return e instanceof t || e instanceof HTMLElement; } function US(e) { if (typeof ShadowRoot > "u") return !1; var t = Ua(e).ShadowRoot; return e instanceof t || e instanceof ShadowRoot; } function Gce(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]; !ea(a) || !mi(a) || (Object.assign(a.style, r), Object.keys(o).forEach(function(i) { var s = o[i]; s === !1 ? a.removeAttribute(i) : a.setAttribute(i, s === !0 ? "" : s); })); }); } function Wce(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] || {}, i = Object.keys(t.styles.hasOwnProperty(r) ? t.styles[r] : n[r]), s = i.reduce(function(l, u) { return l[u] = "", l; }, {}); !ea(o) || !mi(o) || (Object.assign(o.style, s), Object.keys(a).forEach(function(l) { o.removeAttribute(l); })); }); }; } var xD = { name: "applyStyles", enabled: !0, phase: "write", fn: Gce, effect: Wce, requires: ["computeStyles"] }; function ui(e) { return e.split("-")[0]; } var tu = Math.max, Ng = Math.min, Hc = Math.round; function Uc(e, t) { t === void 0 && (t = !1); var n = e.getBoundingClientRect(), r = 1, o = 1; if (ea(e) && t) { var a = e.offsetHeight, i = e.offsetWidth; i > 0 && (r = Hc(n.width) / i || 1), a > 0 && (o = Hc(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 qS(e) { var t = Uc(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 kD(e, t) { var n = t.getRootNode && t.getRootNode(); if (e.contains(t)) return !0; if (n && US(n)) { var r = t; do { if (r && e.isSameNode(r)) return !0; r = r.parentNode || r.host; } while (r); } return !1; } function ts(e) { return Ua(e).getComputedStyle(e); } function Yce(e) { return ["table", "td", "th"].indexOf(mi(e)) >= 0; } function yl(e) { return ((Vc(e) ? e.ownerDocument : e.document) || window.document).documentElement; } function sm(e) { return mi(e) === "html" ? e : e.assignedSlot || e.parentNode || (US(e) ? e.host : null) || yl(e); } function j4(e) { return !ea(e) || ts(e).position === "fixed" ? null : e.offsetParent; } function Xce(e) { var t = navigator.userAgent.toLowerCase().indexOf("firefox") !== -1, n = navigator.userAgent.indexOf("Trident") !== -1; if (n && ea(e)) { var r = ts(e); if (r.position === "fixed") return null; } var o = sm(e); for (US(o) && (o = o.host); ea(o) && ["html", "body"].indexOf(mi(o)) < 0; ) { var a = ts(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 Yf(e) { for (var t = Ua(e), n = j4(e); n && Yce(n) && ts(n).position === "static"; ) n = j4(n); return n && (mi(n) === "html" || mi(n) === "body" && ts(n).position === "static") ? t : n || Xce(e) || t; } function KS(e) { return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y"; } function Fp(e, t, n) { return tu(e, Ng(t, n)); } function Zce(e, t, n) { var r = Fp(e, t, n); return r > n ? n : r; } function CD() { return { top: 0, right: 0, bottom: 0, left: 0 }; } function _D(e) { return Object.assign({}, CD(), e); } function SD(e, t) { return t.reduce(function(n, r) { return n[r] = e, n; }, {}); } var Jce = function(e, t) { return e = typeof e == "function" ? e(Object.assign({}, t.rects, { placement: t.placement })) : e, _D(typeof e != "number" ? e : SD(e, Wf)); }; function Qce(e) { var t, n = e.state, r = e.name, o = e.options, a = n.elements.arrow, i = n.modifiersData.popperOffsets, s = ui(n.placement), l = KS(s), u = [bo, la].indexOf(s) >= 0, c = u ? "height" : "width"; if (!(!a || !i)) { var d = Jce(o.padding, n), p = qS(a), h = l === "y" ? yo : bo, f = l === "y" ? sa : la, v = n.rects.reference[c] + n.rects.reference[l] - i[l] - n.rects.popper[c], m = i[l] - n.rects.reference[l], g = Yf(a), b = g ? l === "y" ? g.clientHeight || 0 : g.clientWidth || 0 : 0, x = v / 2 - m / 2, w = d[h], k = b - p[c] - d[f], C = b / 2 - p[c] / 2 + x, _ = Fp(w, C, k), $ = l; n.modifiersData[r] = (t = {}, t[$] = _, t.centerOffset = _ - C, t); } } function ede(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) || !kD(t.elements.popper, o) || (t.elements.arrow = o)); } var tde = { name: "arrow", enabled: !0, phase: "main", fn: Qce, effect: ede, requires: ["popperOffsets"], requiresIfExists: ["preventOverflow"] }; function qc(e) { return e.split("-")[1]; } var nde = { top: "auto", right: "auto", bottom: "auto", left: "auto" }; function rde(e) { var t = e.x, n = e.y, r = window, o = r.devicePixelRatio || 1; return { x: Hc(t * o) / o || 0, y: Hc(n * o) / o || 0 }; } function V4(e) { var t, n = e.popper, r = e.popperRect, o = e.placement, a = e.variation, i = e.offsets, s = e.position, l = e.gpuAcceleration, u = e.adaptive, c = e.roundOffsets, d = e.isFixed, p = i.x, h = p === void 0 ? 0 : p, f = i.y, v = f === void 0 ? 0 : f, m = typeof c == "function" ? c({ x: h, y: v }) : { x: h, y: v }; h = m.x, v = m.y; var g = i.hasOwnProperty("x"), b = i.hasOwnProperty("y"), x = bo, w = yo, k = window; if (u) { var C = Yf(n), _ = "clientHeight", $ = "clientWidth"; if (C === Ua(n) && (C = yl(n), ts(C).position !== "static" && s === "absolute" && (_ = "scrollHeight", $ = "scrollWidth")), C = C, o === yo || (o === bo || o === la) && a === Qp) { w = sa; var O = d && C === k && k.visualViewport ? k.visualViewport.height : C[_]; v -= O - r.height, v *= l ? 1 : -1; } if (o === bo || (o === yo || o === sa) && a === Qp) { x = la; var F = d && C === k && k.visualViewport ? k.visualViewport.width : C[$]; h -= F - r.width, h *= l ? 1 : -1; } } var A = Object.assign({ position: s }, u && nde), T = c === !0 ? rde({ x: h, y: v }) : { x: h, y: v }; if (h = T.x, v = T.y, l) { var R; return Object.assign({}, A, (R = {}, R[w] = b ? "0" : "", R[x] = g ? "0" : "", R.transform = (k.devicePixelRatio || 1) <= 1 ? "translate(" + h + "px, " + v + "px)" : "translate3d(" + h + "px, " + v + "px, 0)", R)); } return Object.assign({}, A, (t = {}, t[w] = b ? v + "px" : "", t[x] = g ? h + "px" : "", t.transform = "", t)); } function ode(e) { var t = e.state, n = e.options, r = n.gpuAcceleration, o = r === void 0 ? !0 : r, a = n.adaptive, i = a === void 0 ? !0 : a, s = n.roundOffsets, l = s === void 0 ? !0 : s, u = { placement: ui(t.placement), variation: qc(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, V4(Object.assign({}, u, { offsets: t.modifiersData.popperOffsets, position: t.options.strategy, adaptive: i, roundOffsets: l })))), t.modifiersData.arrow != null && (t.styles.arrow = Object.assign({}, t.styles.arrow, V4(Object.assign({}, u, { offsets: t.modifiersData.arrow, position: "absolute", adaptive: !1, roundOffsets: l })))), t.attributes.popper = Object.assign({}, t.attributes.popper, { "data-popper-placement": t.placement }); } var $D = { name: "computeStyles", enabled: !0, phase: "beforeWrite", fn: ode, data: {} }, Wh = { passive: !0 }; function ade(e) { var t = e.state, n = e.instance, r = e.options, o = r.scroll, a = o === void 0 ? !0 : o, i = r.resize, s = i === void 0 ? !0 : i, l = Ua(t.elements.popper), u = [].concat(t.scrollParents.reference, t.scrollParents.popper); return a && u.forEach(function(c) { c.addEventListener("scroll", n.update, Wh); }), s && l.addEventListener("resize", n.update, Wh), function() { a && u.forEach(function(c) { c.removeEventListener("scroll", n.update, Wh); }), s && l.removeEventListener("resize", n.update, Wh); }; } var ED = { name: "eventListeners", enabled: !0, phase: "write", fn: function() { }, effect: ade, data: {} }, ide = { left: "right", right: "left", bottom: "top", top: "bottom" }; function Vv(e) { return e.replace(/left|right|bottom|top/g, function(t) { return ide[t]; }); } var sde = { start: "end", end: "start" }; function H4(e) { return e.replace(/start|end/g, function(t) { return sde[t]; }); } function GS(e) { var t = Ua(e), n = t.pageXOffset, r = t.pageYOffset; return { scrollLeft: n, scrollTop: r }; } function WS(e) { return Uc(yl(e)).left + GS(e).scrollLeft; } function lde(e) { var t = Ua(e), n = yl(e), r = t.visualViewport, o = n.clientWidth, a = n.clientHeight, i = 0, s = 0; return r && (o = r.width, a = r.height, /^((?!chrome|android).)*safari/i.test(navigator.userAgent) || (i = r.offsetLeft, s = r.offsetTop)), { width: o, height: a, x: i + WS(e), y: s }; } function ude(e) { var t, n = yl(e), r = GS(e), o = (t = e.ownerDocument) == null ? void 0 : t.body, a = tu(n.scrollWidth, n.clientWidth, o ? o.scrollWidth : 0, o ? o.clientWidth : 0), i = tu(n.scrollHeight, n.clientHeight, o ? o.scrollHeight : 0, o ? o.clientHeight : 0), s = -r.scrollLeft + WS(e), l = -r.scrollTop; return ts(o || n).direction === "rtl" && (s += tu(n.clientWidth, o ? o.clientWidth : 0) - a), { width: a, height: i, x: s, y: l }; } function YS(e) { var t = ts(e), n = t.overflow, r = t.overflowX, o = t.overflowY; return /auto|scroll|overlay|hidden/.test(n + o + r); } function OD(e) { return ["html", "body", "#document"].indexOf(mi(e)) >= 0 ? e.ownerDocument.body : ea(e) && YS(e) ? e : OD(sm(e)); } function Tp(e, t) { var n; t === void 0 && (t = []); var r = OD(e), o = r === ((n = e.ownerDocument) == null ? void 0 : n.body), a = Ua(r), i = o ? [a].concat(a.visualViewport || [], YS(r) ? r : []) : r, s = t.concat(i); return o ? s : s.concat(Tp(sm(i))); } function IC(e) { return Object.assign({}, e, { left: e.x, top: e.y, right: e.x + e.width, bottom: e.y + e.height }); } function cde(e) { var t = Uc(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 U4(e, t) { return t === wD ? IC(lde(e)) : Vc(t) ? cde(t) : IC(ude(yl(e))); } function dde(e) { var t = Tp(sm(e)), n = ["absolute", "fixed"].indexOf(ts(e).position) >= 0, r = n && ea(e) ? Yf(e) : e; return Vc(r) ? t.filter(function(o) { return Vc(o) && kD(o, r) && mi(o) !== "body"; }) : []; } function pde(e, t, n) { var r = t === "clippingParents" ? dde(e) : [].concat(t), o = [].concat(r, [n]), a = o[0], i = o.reduce(function(s, l) { var u = U4(e, l); return s.top = tu(u.top, s.top), s.right = Ng(u.right, s.right), s.bottom = Ng(u.bottom, s.bottom), s.left = tu(u.left, s.left), s; }, U4(e, a)); return i.width = i.right - i.left, i.height = i.bottom - i.top, i.x = i.left, i.y = i.top, i; } function FD(e) { var t = e.reference, n = e.element, r = e.placement, o = r ? ui(r) : null, a = r ? qc(r) : null, i = t.x + t.width / 2 - n.width / 2, s = t.y + t.height / 2 - n.height / 2, l; switch (o) { case yo: l = { x: i, y: t.y - n.height }; break; case sa: l = { x: i, y: t.y + t.height }; break; case la: l = { x: t.x + t.width, y: s }; break; case bo: l = { x: t.x - n.width, y: s }; break; default: l = { x: t.x, y: t.y }; } var u = o ? KS(o) : null; if (u != null) { var c = u === "y" ? "height" : "width"; switch (a) { case jc: l[u] = l[u] - (t[c] / 2 - n[c] / 2); break; case Qp: l[u] = l[u] + (t[c] / 2 - n[c] / 2); break; } } return l; } function ef(e, t) { t === void 0 && (t = {}); var n = t, r = n.placement, o = r === void 0 ? e.placement : r, a = n.boundary, i = a === void 0 ? Rce : a, s = n.rootBoundary, l = s === void 0 ? wD : s, u = n.elementContext, c = u === void 0 ? Zd : u, d = n.altBoundary, p = d === void 0 ? !1 : d, h = n.padding, f = h === void 0 ? 0 : h, v = _D(typeof f != "number" ? f : SD(f, Wf)), m = c === Zd ? Nce : Zd, g = e.rects.popper, b = e.elements[p ? m : c], x = pde(Vc(b) ? b : b.contextElement || yl(e.elements.popper), i, l), w = Uc(e.elements.reference), k = FD({ reference: w, element: g, strategy: "absolute", placement: o }), C = IC(Object.assign({}, g, k)), _ = c === Zd ? C : w, $ = { top: x.top - _.top + v.top, bottom: _.bottom - x.bottom + v.bottom, left: x.left - _.left + v.left, right: _.right - x.right + v.right }, O = e.modifiersData.offset; if (c === Zd && O) { var F = O[o]; Object.keys($).forEach(function(A) { var T = [la, sa].indexOf(A) >= 0 ? 1 : -1, R = [yo, sa].indexOf(A) >= 0 ? "y" : "x"; $[A] += F[R] * T; }); } return $; } function fde(e, t) { t === void 0 && (t = {}); var n = t, r = n.placement, o = n.boundary, a = n.rootBoundary, i = n.padding, s = n.flipVariations, l = n.allowedAutoPlacements, u = l === void 0 ? im : l, c = qc(r), d = c ? s ? z4 : z4.filter(function(f) { return qc(f) === c; }) : Wf, p = d.filter(function(f) { return u.indexOf(f) >= 0; }); p.length === 0 && (p = d); var h = p.reduce(function(f, v) { return f[v] = ef(e, { placement: v, boundary: o, rootBoundary: a, padding: i })[ui(v)], f; }, {}); return Object.keys(h).sort(function(f, v) { return h[f] - h[v]; }); } function hde(e) { if (ui(e) === HS) return []; var t = Vv(e); return [H4(e), t, H4(t)]; } function vde(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, i = n.altAxis, s = i === void 0 ? !0 : i, l = n.fallbackPlacements, u = n.padding, c = n.boundary, d = n.rootBoundary, p = n.altBoundary, h = n.flipVariations, f = h === void 0 ? !0 : h, v = n.allowedAutoPlacements, m = t.options.placement, g = ui(m), b = g === m, x = l || (b || !f ? [Vv(m)] : hde(m)), w = [m].concat(x).reduce(function(te, oe) { return te.concat(ui(oe) === HS ? fde(t, { placement: oe, boundary: c, rootBoundary: d, padding: u, flipVariations: f, allowedAutoPlacements: v }) : oe); }, []), k = t.rects.reference, C = t.rects.popper, _ = /* @__PURE__ */ new Map(), $ = !0, O = w[0], F = 0; F < w.length; F++) { var A = w[F], T = ui(A), R = qc(A) === jc, M = [yo, sa].indexOf(T) >= 0, j = M ? "width" : "height", P = ef(t, { placement: A, boundary: c, rootBoundary: d, altBoundary: p, padding: u }), V = M ? R ? la : bo : R ? sa : yo; k[j] > C[j] && (V = Vv(V)); var U = Vv(V), G = []; if (a && G.push(P[T] <= 0), s && G.push(P[V] <= 0, P[U] <= 0), G.every(function(te) { return te; })) { O = A, $ = !1; break; } _.set(A, G); } if ($) for (var se = f ? 3 : 1, ae = function(te) { var oe = w.find(function(ne) { var ee = _.get(ne); if (ee) return ee.slice(0, te).every(function(Z) { return Z; }); }); if (oe) return O = oe, "break"; }, de = se; de > 0; de--) { var me = ae(de); if (me === "break") break; } t.placement !== O && (t.modifiersData[r]._skip = !0, t.placement = O, t.reset = !0); } } var gde = { name: "flip", enabled: !0, phase: "main", fn: vde, requiresIfExists: ["offset"], data: { _skip: !1 } }; function q4(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 K4(e) { return [yo, la, sa, bo].some(function(t) { return e[t] >= 0; }); } function mde(e) { var t = e.state, n = e.name, r = t.rects.reference, o = t.rects.popper, a = t.modifiersData.preventOverflow, i = ef(t, { elementContext: "reference" }), s = ef(t, { altBoundary: !0 }), l = q4(i, r), u = q4(s, o, a), c = K4(l), d = K4(u); t.modifiersData[n] = { referenceClippingOffsets: l, popperEscapeOffsets: u, isReferenceHidden: c, hasPopperEscaped: d }, t.attributes.popper = Object.assign({}, t.attributes.popper, { "data-popper-reference-hidden": c, "data-popper-escaped": d }); } var yde = { name: "hide", enabled: !0, phase: "main", requiresIfExists: ["preventOverflow"], fn: mde }; function bde(e, t, n) { var r = ui(e), o = [bo, yo].indexOf(r) >= 0 ? -1 : 1, a = typeof n == "function" ? n(Object.assign({}, t, { placement: e })) : n, i = a[0], s = a[1]; return i = i || 0, s = (s || 0) * o, [bo, la].indexOf(r) >= 0 ? { x: s, y: i } : { x: i, y: s }; } function wde(e) { var t = e.state, n = e.options, r = e.name, o = n.offset, a = o === void 0 ? [0, 0] : o, i = im.reduce(function(c, d) { return c[d] = bde(d, t.rects, a), c; }, {}), s = i[t.placement], l = s.x, u = s.y; t.modifiersData.popperOffsets != null && (t.modifiersData.popperOffsets.x += l, t.modifiersData.popperOffsets.y += u), t.modifiersData[r] = i; } var xde = { name: "offset", enabled: !0, phase: "main", requires: ["popperOffsets"], fn: wde }; function kde(e) { var t = e.state, n = e.name; t.modifiersData[n] = FD({ reference: t.rects.reference, element: t.rects.popper, strategy: "absolute", placement: t.placement }); } var TD = { name: "popperOffsets", enabled: !0, phase: "read", fn: kde, data: {} }; function Cde(e) { return e === "x" ? "y" : "x"; } function _de(e) { var t = e.state, n = e.options, r = e.name, o = n.mainAxis, a = o === void 0 ? !0 : o, i = n.altAxis, s = i === void 0 ? !1 : i, l = n.boundary, u = n.rootBoundary, c = n.altBoundary, d = n.padding, p = n.tether, h = p === void 0 ? !0 : p, f = n.tetherOffset, v = f === void 0 ? 0 : f, m = ef(t, { boundary: l, rootBoundary: u, padding: d, altBoundary: c }), g = ui(t.placement), b = qc(t.placement), x = !b, w = KS(g), k = Cde(w), C = t.modifiersData.popperOffsets, _ = t.rects.reference, $ = t.rects.popper, O = typeof v == "function" ? v(Object.assign({}, t.rects, { placement: t.placement })) : v, F = typeof O == "number" ? { mainAxis: O, altAxis: O } : Object.assign({ mainAxis: 0, altAxis: 0 }, O), A = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, T = { x: 0, y: 0 }; if (C) { if (a) { var R, M = w === "y" ? yo : bo, j = w === "y" ? sa : la, P = w === "y" ? "height" : "width", V = C[w], U = V + m[M], G = V - m[j], se = h ? -$[P] / 2 : 0, ae = b === jc ? _[P] : $[P], de = b === jc ? -$[P] : -_[P], me = t.elements.arrow, te = h && me ? qS(me) : { width: 0, height: 0 }, oe = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : CD(), ne = oe[M], ee = oe[j], Z = Fp(0, _[P], te[P]), le = x ? _[P] / 2 - se - Z - ne - F.mainAxis : ae - Z - ne - F.mainAxis, pe = x ? -_[P] / 2 + se + Z + ee + F.mainAxis : de + Z + ee + F.mainAxis, ke = t.elements.arrow && Yf(t.elements.arrow), Ne = ke ? w === "y" ? ke.clientTop || 0 : ke.clientLeft || 0 : 0, De = (R = A == null ? void 0 : A[w]) != null ? R : 0, _e = V + le - De - Ne, Fe = V + pe - De, Ie = Fp(h ? Ng(U, _e) : U, V, h ? tu(G, Fe) : G); C[w] = Ie, T[w] = Ie - V; } if (s) { var Ae, qe = w === "x" ? yo : bo, et = w === "x" ? sa : la, He = C[k], ot = k === "y" ? "height" : "width", tt = He + m[qe], Qe = He - m[et], I = [yo, bo].indexOf(g) !== -1, Y = (Ae = A == null ? void 0 : A[k]) != null ? Ae : 0, ve = I ? tt : He - _[ot] - $[ot] - Y + F.altAxis, we = I ? He + _[ot] + $[ot] - Y - F.altAxis : Qe, ye = h && I ? Zce(ve, He, we) : Fp(h ? ve : tt, He, h ? we : Qe); C[k] = ye, T[k] = ye - He; } t.modifiersData[r] = T; } } var Sde = { name: "preventOverflow", enabled: !0, phase: "main", fn: _de, requiresIfExists: ["offset"] }; function $de(e) { return { scrollLeft: e.scrollLeft, scrollTop: e.scrollTop }; } function Ede(e) { return e === Ua(e) || !ea(e) ? GS(e) : $de(e); } function Ode(e) { var t = e.getBoundingClientRect(), n = Hc(t.width) / e.offsetWidth || 1, r = Hc(t.height) / e.offsetHeight || 1; return n !== 1 || r !== 1; } function Fde(e, t, n) { n === void 0 && (n = !1); var r = ea(t), o = ea(t) && Ode(t), a = yl(t), i = Uc(e, o), s = { scrollLeft: 0, scrollTop: 0 }, l = { x: 0, y: 0 }; return (r || !r && !n) && ((mi(t) !== "body" || YS(a)) && (s = Ede(t)), ea(t) ? (l = Uc(t, !0), l.x += t.clientLeft, l.y += t.clientTop) : a && (l.x = WS(a))), { x: i.left + s.scrollLeft - l.x, y: i.top + s.scrollTop - l.y, width: i.width, height: i.height }; } function Tde(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 i = [].concat(a.requires || [], a.requiresIfExists || []); i.forEach(function(s) { if (!n.has(s)) { var l = t.get(s); l && o(l); } }), r.push(a); } return e.forEach(function(a) { n.has(a.name) || o(a); }), r; } function Ade(e) { var t = Tde(e); return Kce.reduce(function(n, r) { return n.concat(t.filter(function(o) { return o.phase === r; })); }, []); } function Ide(e) { var t; return function() { return t || (t = new Promise(function(n) { Promise.resolve().then(function() { t = void 0, n(e()); }); })), t; }; } function Pde(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 G4 = { placement: "bottom", modifiers: [], strategy: "absolute" }; function W4() { 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 XS(e) { e === void 0 && (e = {}); var t = e, n = t.defaultModifiers, r = n === void 0 ? [] : n, o = t.defaultOptions, a = o === void 0 ? G4 : o; return function(i, s, l) { l === void 0 && (l = a); var u = { placement: "bottom", orderedModifiers: [], options: Object.assign({}, G4, a), modifiersData: {}, elements: { reference: i, popper: s }, attributes: {}, styles: {} }, c = [], d = !1, p = { state: u, setOptions: function(v) { var m = typeof v == "function" ? v(u.options) : v; f(), u.options = Object.assign({}, a, u.options, m), u.scrollParents = { reference: Vc(i) ? Tp(i) : i.contextElement ? Tp(i.contextElement) : [], popper: Tp(s) }; var g = Ade(Pde([].concat(r, u.options.modifiers))); return u.orderedModifiers = g.filter(function(b) { return b.enabled; }), h(), p.update(); }, forceUpdate: function() { if (!d) { var v = u.elements, m = v.reference, g = v.popper; if (W4(m, g)) { u.rects = { reference: Fde(m, Yf(g), u.options.strategy === "fixed"), popper: qS(g) }, u.reset = !1, u.placement = u.options.placement, u.orderedModifiers.forEach(function($) { return u.modifiersData[$.name] = Object.assign({}, $.data); }); for (var b = 0; b < u.orderedModifiers.length; b++) { if (u.reset === !0) { u.reset = !1, b = -1; continue; } var x = u.orderedModifiers[b], w = x.fn, k = x.options, C = k === void 0 ? {} : k, _ = x.name; typeof w == "function" && (u = w({ state: u, options: C, name: _, instance: p }) || u); } } } }, update: Ide(function() { return new Promise(function(v) { p.forceUpdate(), v(u); }); }), destroy: function() { f(), d = !0; } }; if (!W4(i, s)) return p; p.setOptions(l).then(function(v) { !d && l.onFirstUpdate && l.onFirstUpdate(v); }); function h() { u.orderedModifiers.forEach(function(v) { var m = v.name, g = v.options, b = g === void 0 ? {} : g, x = v.effect; if (typeof x == "function") { var w = x({ state: u, name: m, instance: p, options: b }), k = function() { }; c.push(w || k); } }); } function f() { c.forEach(function(v) { return v(); }), c = []; } return p; }; } XS(); var Lde = [ED, TD, $D, xD]; XS({ defaultModifiers: Lde }); var Rde = [ED, TD, $D, xD, xde, gde, Sde, tde, yde], Nde = XS({ defaultModifiers: Rde }); const Mde = (e, t, n = {}) => { const r = { name: "updateState", enabled: !0, phase: "write", fn: ({ state: l }) => { const u = Dde(l); Object.assign(i.value, u); }, requires: ["computeStyles"] }, o = E(() => { const { onFirstUpdate: l, placement: u, strategy: c, modifiers: d } = y(n); return { onFirstUpdate: l, placement: u || "bottom", strategy: c || "absolute", modifiers: [ ...d || [], r, { name: "applyStyles", enabled: !1 } ] }; }), a = En(), i = z({ styles: { popper: { position: y(o).strategy, left: "0", top: "0" }, arrow: { position: "absolute" } }, attributes: {} }), s = () => { a.value && (a.value.destroy(), a.value = void 0); }; return he(o, (l) => { const u = y(a); u && u.setOptions(l); }, { deep: !0 }), he([e, t], ([l, u]) => { s(), !(!l || !u) && (a.value = Nde(l, u, y(o))); }), Tt(() => { s(); }), { state: E(() => { var l; return { ...((l = y(a)) == null ? void 0 : l.state) || {} }; }), styles: E(() => y(i).styles), attributes: E(() => y(i).attributes), update: () => { var l; return (l = y(a)) == null ? void 0 : l.update(); }, forceUpdate: () => { var l; return (l = y(a)) == null ? void 0 : l.forceUpdate(); }, instanceRef: E(() => y(a)) }; }; function Dde(e) { const t = Object.keys(e.elements), n = Pg(t.map((o) => [o, e.styles[o] || {}])), r = Pg(t.map((o) => [o, e.attributes[o]])); return { styles: n, attributes: r }; } function Y4() { let e; const t = (r, o) => { n(), e = window.setTimeout(r, o); }, n = () => window.clearTimeout(e); return J0(() => n()), { registerTimeout: t, cancelTimeout: n }; } const PC = { prefix: Math.floor(Math.random() * 1e4), current: 0 }, Bde = Symbol("elIdInjection"), AD = () => st() ? be(Bde, PC) : PC, lm = (e) => { const t = AD(); !Jn && t === PC && Qn("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 = VS(); return E(() => y(e) || `${n.value}-id-${t.prefix}-${t.current++}`); }; let gc = []; const X4 = (e) => { const t = e; t.key === sr.esc && gc.forEach((n) => n(t)); }, zde = (e) => { ut(() => { gc.length === 0 && document.addEventListener("keydown", X4), Jn && gc.push(e); }), Tt(() => { gc = gc.filter((t) => t !== e), gc.length === 0 && Jn && document.removeEventListener("keydown", X4); }); }; let Z4; const ID = () => { const e = VS(), t = AD(), n = E(() => `${e.value}-popper-container-${t.prefix}`), r = E(() => `#${n.value}`); return { id: n, selector: r }; }, jde = (e) => { const t = document.createElement("div"); return t.id = e, document.body.appendChild(t), t; }, Vde = () => { const { id: e, selector: t } = ID(); return C0(() => { Jn && (process.env.NODE_ENV === "test" || !Z4 || !document.body.querySelector(t.value)) && (Z4 = jde(e.value)); }), { id: e, selector: t }; }, Hde = ln({ showAfter: { type: Number, default: 0 }, hideAfter: { type: Number, default: 200 }, autoClose: { type: Number, default: 0 } }), Ude = ({ showAfter: e, hideAfter: t, autoClose: n, open: r, close: o }) => { const { registerTimeout: a } = Y4(), { registerTimeout: i, cancelTimeout: s } = Y4(); return { onOpen: (l) => { a(() => { r(l); const u = y(n); Ar(u) && u > 0 && i(() => { o(l); }, u); }, y(e)); }, onClose: (l) => { s(), a(() => { o(l); }, y(t)); } }; }, PD = Symbol("elForwardRef"), qde = (e) => { nt(PD, { setForwardRef: (t) => { e.value = t; } }); }, Kde = (e) => ({ mounted(t) { e(t); }, updated(t) { e(t); }, unmounted() { e(null); } }), J4 = { current: 0 }, Q4 = z(0), LD = 2e3, eO = Symbol("elZIndexContextKey"), RD = Symbol("zIndexContextKey"), ND = (e) => { const t = st() ? be(eO, J4) : J4, n = e || (st() ? be(RD, void 0) : void 0), r = E(() => { const i = y(n); return Ar(i) ? i : LD; }), o = E(() => r.value + Q4.value), a = () => (t.current++, Q4.value = t.current, o.value); return !Jn && !be(eO) && Qn("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 Gde(e) { let t; function n() { if (e.value == null) return; const { selectionStart: o, selectionEnd: a, value: i } = e.value; if (o == null || a == null) return; const s = i.slice(0, Math.max(0, o)), l = i.slice(Math.max(0, a)); t = { selectionStart: o, selectionEnd: a, value: i, beforeTxt: s, afterTxt: l }; } function r() { if (e.value == null || t == null) return; const { value: o } = e.value, { beforeTxt: a, afterTxt: i, selectionStart: s } = t; if (a == null || i == null || s == null) return; let l = o.length; if (o.endsWith(i)) l = o.length - i.length; else if (o.startsWith(a)) l = a.length; else { const u = a[s - 1], c = o.indexOf(u, s - 1); c !== -1 && (l = c + 1); } e.value.setSelectionRange(l, l); } return [n, r]; } const hd = am({ type: String, values: gD, required: !1 }), MD = Symbol("size"), Wde = () => { const e = be(MD, {}); return E(() => y(e.size) || ""); }; function ZS(e, { beforeFocus: t, afterFocus: n, beforeBlur: r, afterBlur: o } = {}) { const a = st(), { emit: i } = a, s = En(), l = z(!1), u = (p) => { ao(t) && t(p) || l.value || (l.value = !0, i("focus", p), n == null || n()); }, c = (p) => { var h; ao(r) && r(p) || p.relatedTarget && (h = s.value) != null && h.contains(p.relatedTarget) || (l.value = !1, i("blur", p), o == null || o()); }, d = () => { var p, h; (p = s.value) != null && p.contains(document.activeElement) && s.value !== document.activeElement || (h = e.value) == null || h.focus(); }; return he(s, (p) => { p && p.setAttribute("tabindex", "-1"); }), Zo(s, "focus", u, !0), Zo(s, "blur", c, !0), Zo(s, "click", d, !0), process.env.NODE_ENV === "test" && ut(() => { const p = Ql(e.value) ? e.value : document.querySelector("input,textarea"); p && (Zo(p, "focus", u, !0), Zo(p, "blur", c, !0)); }), { isFocused: l, wrapperRef: s, handleFocus: u, handleBlur: c }; } function DD({ afterComposition: e, emit: t }) { const n = z(!1), r = (i) => { t == null || t("compositionstart", i), n.value = !0; }, o = (i) => { var s; t == null || t("compositionupdate", i); const l = (s = i.target) == null ? void 0 : s.value, u = l[l.length - 1] || ""; n.value = !Cce(u); }, a = (i) => { t == null || t("compositionend", i), n.value && (n.value = !1, Ke(() => e(i))); }; return { isComposing: n, handleComposition: (i) => { i.type === "compositionend" ? a(i) : o(i); }, handleCompositionStart: r, handleCompositionUpdate: o, handleCompositionEnd: a }; } const BD = Symbol("emptyValuesContextKey"), Yde = "use-empty-values", Xde = ["", void 0, null], Zde = void 0, Jde = ln({ emptyValues: Array, valueOnClear: { type: [String, Number, Boolean, Function], default: void 0, validator: (e) => ao(e) ? !e() : !e } }), Qde = (e, t) => { const n = st() ? be(BD, z({})) : z({}), r = E(() => e.emptyValues || n.value.emptyValues || Xde), o = E(() => ao(e.valueOnClear) ? e.valueOnClear() : e.valueOnClear !== void 0 ? e.valueOnClear : ao(n.value.valueOnClear) ? n.value.valueOnClear() : n.value.valueOnClear !== void 0 ? n.value.valueOnClear : Zde), a = (i) => r.value.includes(i); return r.value.includes(o.value) || Qn(Yde, "value-on-clear should be a value of empty-values"), { emptyValues: r, valueOnClear: o, isEmptyValue: a }; }, epe = ln({ ariaLabel: String, ariaOrientation: { type: String, values: ["horizontal", "vertical", "undefined"] }, ariaControls: String }), bl = (e) => dD(epe, e), zD = Symbol(), Mg = z(); function JS(e, t = void 0) { const n = st() ? be(zD, Mg) : Mg; return e ? E(() => { var r, o; return (o = (r = n.value) == null ? void 0 : r[e]) != null ? o : t; }) : n; } function tpe(e, t) { const n = JS(), r = Lt(e, E(() => { var s; return ((s = n.value) == null ? void 0 : s.namespace) || jv; })), o = Gf(E(() => { var s; return (s = n.value) == null ? void 0 : s.locale; })), a = ND(E(() => { var s; return ((s = n.value) == null ? void 0 : s.zIndex) || LD; })), i = E(() => { var s; return y(t) || ((s = n.value) == null ? void 0 : s.size) || ""; }); return npe(E(() => y(n) || {})), { ns: r, locale: o, zIndex: a, size: i }; } const npe = (e, t, n = !1) => { var r; const o = !!st(), a = o ? JS() : void 0, i = (r = void 0) != null ? r : o ? nt : void 0; if (!i) { Qn("provideGlobalConfig", "provideGlobalConfig() can only be used inside setup()."); return; } const s = E(() => { const l = y(e); return a != null && a.value ? rpe(a.value, l) : l; }); return i(zD, s), i(mD, E(() => s.value.locale)), i(yD, E(() => s.value.namespace)), i(RD, E(() => s.value.zIndex)), i(MD, { size: E(() => s.value.size || "") }), i(BD, E(() => ({ emptyValues: s.value.emptyValues, valueOnClear: s.value.valueOnClear }))), (n || !Mg.value) && (Mg.value = s.value), s; }, rpe = (e, t) => { const n = [.../* @__PURE__ */ new Set([...B4(e), ...B4(t)])], r = {}; for (const o of n) r[o] = t[o] !== void 0 ? t[o] : e[o]; return r; }; var It = (e, t) => { const n = e.__vccOpts || e; for (const [r, o] of t) n[r] = o; return n; }; const ope = ln({ size: { type: Ct([Number, String]) }, color: { type: String } }), ape = W({ name: "ElIcon", inheritAttrs: !1 }), ipe = /* @__PURE__ */ W({ ...ape, props: ope, setup(e) { const t = e, n = Lt("icon"), r = E(() => { const { size: o, color: a } = t; return !o && !a ? {} : { fontSize: Hs(o) ? void 0 : zc(o), "--color": a }; }); return (o, a) => (S(), L("i", Et({ class: y(n).b(), style: y(r) }, o.$attrs), [ ue(o.$slots, "default") ], 16)); } }); var spe = /* @__PURE__ */ It(ipe, [["__file", "icon.vue"]]); const mr = _r(spe), QS = Symbol("formContextKey"), tf = Symbol("formItemContextKey"), cu = (e, t = {}) => { const n = z(void 0), r = t.prop ? n : bD("size"), o = t.global ? n : Wde(), a = t.form ? { size: void 0 } : be(QS, void 0), i = t.formItem ? { size: void 0 } : be(tf, void 0); return E(() => r.value || y(e) || (i == null ? void 0 : i.size) || (a == null ? void 0 : a.size) || o.value || ""); }, Xf = (e) => { const t = bD("disabled"), n = be(QS, void 0); return E(() => t.value || y(e) || (n == null ? void 0 : n.disabled) || !1); }, Lu = () => { const e = be(QS, void 0), t = be(tf, void 0); return { form: e, formItem: t }; }, Zf = (e, { formItemContext: t, disableIdGeneration: n, disableIdManagement: r }) => { n || (n = z(!1)), r || (r = z(!1)); const o = z(); let a; const i = E(() => { var s; return !!(!(e.label || e.ariaLabel) && t && t.inputIds && ((s = t.inputIds) == null ? void 0 : s.length) <= 1); }); return ut(() => { a = he([St(e, "id"), n], ([s, l]) => { const u = s ?? (l ? void 0 : lm().value); u !== o.value && (t != null && t.removeInputId && (o.value && t.removeInputId(o.value), !(r != null && r.value) && !l && u && t.addInputId(u)), o.value = u); }, { immediate: !0 }); }), W_(() => { a && a(), t != null && t.removeInputId && o.value && t.removeInputId(o.value); }), { isLabeledByFormItem: i, inputId: o }; }; let Ca; const lpe = ` height:0 !important; visibility:hidden !important; ${yie() ? "" : "overflow:hidden !important;"} position:absolute !important; z-index:-1000 !important; top:0 !important; right:0 !important; `, upe = [ "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 cpe(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: upe.map((a) => `${a}:${t.getPropertyValue(a)}`).join(";"), paddingSize: r, borderSize: o, boxSizing: n }; } function tO(e, t = 1, n) { var r; Ca || (Ca = document.createElement("textarea"), document.body.appendChild(Ca)); const { paddingSize: o, borderSize: a, boxSizing: i, contextStyle: s } = cpe(e); Ca.setAttribute("style", `${s};${lpe}`), Ca.value = e.value || e.placeholder || ""; let l = Ca.scrollHeight; const u = {}; i === "border-box" ? l = l + a : i === "content-box" && (l = l - o), Ca.value = ""; const c = Ca.scrollHeight - o; if (Ar(t)) { let d = c * t; i === "border-box" && (d = d + o + a), l = Math.max(d, l), u.minHeight = `${d}px`; } if (Ar(n)) { let d = c * n; i === "border-box" && (d = d + o + a), l = Math.min(d, l); } return u.height = `${l}px`, (r = Ca.parentNode) == null || r.removeChild(Ca), Ca = void 0, u; } const dpe = ln({ id: { type: String, default: void 0 }, size: hd, disabled: Boolean, modelValue: { type: Ct([ 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: Ct([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: rl }, prefixIcon: { type: rl }, containerRole: { type: String, default: void 0 }, tabindex: { type: [String, Number], default: 0 }, validateEvent: { type: Boolean, default: !0 }, inputStyle: { type: Ct([Object, Array, String]), default: () => vc({}) }, autofocus: Boolean, rows: { type: Number, default: 2 }, ...bl(["ariaLabel"]) }), ppe = { [Or]: (e) => Gr(e), input: (e) => Gr(e), change: (e) => Gr(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 }, fpe = W({ name: "ElInput", inheritAttrs: !1 }), hpe = /* @__PURE__ */ W({ ...fpe, props: dpe, emits: ppe, setup(e, { expose: t, emit: n }) { const r = e, o = Rf(), a = Dr(), i = E(() => { const I = {}; return r.containerRole === "combobox" && (I["aria-haspopup"] = o["aria-haspopup"], I["aria-owns"] = o["aria-owns"], I["aria-expanded"] = o["aria-expanded"]), I; }), s = E(() => [ r.type === "textarea" ? m.b() : v.b(), v.m(h.value), v.is("disabled", f.value), v.is("exceed", me.value), { [v.b("group")]: a.prepend || a.append, [v.m("prefix")]: a.prefix || r.prefixIcon, [v.m("suffix")]: a.suffix || r.suffixIcon || r.clearable || r.showPassword, [v.bm("suffix", "password-clear")]: G.value && se.value, [v.b("hidden")]: r.type === "hidden" }, o.class ]), l = E(() => [ v.e("wrapper"), v.is("focus", O.value) ]), u = $ce({ excludeKeys: E(() => Object.keys(i.value)) }), { form: c, formItem: d } = Lu(), { inputId: p } = Zf(r, { formItemContext: d }), h = cu(), f = Xf(), v = Lt("input"), m = Lt("textarea"), g = En(), b = En(), x = z(!1), w = z(!1), k = z(), C = En(r.inputStyle), _ = E(() => g.value || b.value), { wrapperRef: $, isFocused: O, handleFocus: F, handleBlur: A } = ZS(_, { beforeFocus() { return f.value; }, afterBlur() { var I; r.validateEvent && ((I = d == null ? void 0 : d.validate) == null || I.call(d, "blur").catch((Y) => Qn(Y))); } }), T = E(() => { var I; return (I = c == null ? void 0 : c.statusIcon) != null ? I : !1; }), R = E(() => (d == null ? void 0 : d.validateState) || ""), M = E(() => R.value && vD[R.value]), j = E(() => w.value ? z0 : lS), P = E(() => [ o.style ]), V = E(() => [ r.inputStyle, C.value, { resize: r.resize } ]), U = E(() => Ws(r.modelValue) ? "" : String(r.modelValue)), G = E(() => r.clearable && !f.value && !r.readonly && !!U.value && (O.value || x.value)), se = E(() => r.showPassword && !f.value && !r.readonly && !!U.value && (!!U.value || O.value)), ae = E(() => r.showWordLimit && !!r.maxlength && (r.type === "text" || r.type === "textarea") && !f.value && !r.readonly && !r.showPassword), de = E(() => U.value.length), me = E(() => !!ae.value && de.value > Number(r.maxlength)), te = E(() => !!a.suffix || !!r.suffixIcon || G.value || r.showPassword || ae.value || !!R.value && T.value), [oe, ne] = Gde(g); Vi(b, (I) => { if (Z(), !ae.value || r.resize !== "both") return; const Y = I[0], { width: ve } = Y.contentRect; k.value = { right: `calc(100% - ${ve + 15 + 6}px)` }; }); const ee = () => { const { type: I, autosize: Y } = r; if (!(!Jn || I !== "textarea" || !b.value)) if (Y) { const ve = Tr(Y) ? Y.minRows : void 0, we = Tr(Y) ? Y.maxRows : void 0, ye = tO(b.value, ve, we); C.value = { overflowY: "hidden", ...ye }, Ke(() => { b.value.offsetHeight, C.value = ye; }); } else C.value = { minHeight: tO(b.value).minHeight }; }, Z = /* @__PURE__ */ ((I) => { let Y = !1; return () => { var ve; Y || !r.autosize || ((ve = b.value) == null ? void 0 : ve.offsetParent) === null || (I(), Y = !0); }; })(ee), le = () => { const I = _.value, Y = r.formatter ? r.formatter(U.value) : U.value; !I || I.value === Y || (I.value = Y); }, pe = async (I) => { oe(); let { value: Y } = I.target; if (r.formatter && (Y = r.parser ? r.parser(Y) : Y), !Ne.value) { if (Y === U.value) { le(); return; } n(Or, Y), n("input", Y), await Ke(), le(), ne(); } }, ke = (I) => { n("change", I.target.value); }, { isComposing: Ne, handleCompositionStart: De, handleCompositionUpdate: _e, handleCompositionEnd: Fe } = DD({ emit: n, afterComposition: pe }), Ie = () => { w.value = !w.value, Ae(); }, Ae = async () => { var I; await Ke(), (I = _.value) == null || I.focus(); }, qe = () => { var I; return (I = _.value) == null ? void 0 : I.blur(); }, et = (I) => { x.value = !1, n("mouseleave", I); }, He = (I) => { x.value = !0, n("mouseenter", I); }, ot = (I) => { n("keydown", I); }, tt = () => { var I; (I = _.value) == null || I.select(); }, Qe = () => { n(Or, ""), n("change", ""), n("clear"), n("input", ""); }; return he(() => r.modelValue, () => { var I; Ke(() => ee()), r.validateEvent && ((I = d == null ? void 0 : d.validate) == null || I.call(d, "change").catch((Y) => Qn(Y))); }), he(U, () => le()), he(() => r.type, async () => { await Ke(), le(), ee(); }), ut(() => { !r.formatter && r.parser && Qn("ElInput", "If you set the parser, you also need to set the formatter."), le(), Ke(ee); }), t({ input: g, textarea: b, ref: _, textareaStyle: V, autosize: St(r, "autosize"), isComposing: Ne, focus: Ae, blur: qe, select: tt, clear: Qe, resizeTextarea: ee }), (I, Y) => (S(), L("div", Et(y(i), { class: [ y(s), { [y(v).bm("group", "append")]: I.$slots.append, [y(v).bm("group", "prepend")]: I.$slots.prepend } ], style: y(P), role: I.containerRole, onMouseenter: He, onMouseleave: et }), [ J(" input "), I.type !== "textarea" ? (S(), L(Re, { key: 0 }, [ J(" prepend slot "), I.$slots.prepend ? (S(), L("div", { key: 0, class: H(y(v).be("group", "prepend")) }, [ ue(I.$slots, "prepend") ], 2)) : J("v-if", !0), D("div", { ref_key: "wrapperRef", ref: $, class: H(y(l)) }, [ J(" prefix slot "), I.$slots.prefix || I.prefixIcon ? (S(), L("span", { key: 0, class: H(y(v).e("prefix")) }, [ D("span", { class: H(y(v).e("prefix-inner")) }, [ ue(I.$slots, "prefix"), I.prefixIcon ? (S(), re(y(mr), { key: 0, class: H(y(v).e("icon")) }, { default: N(() => [ (S(), re(yt(I.prefixIcon))) ]), _: 1 }, 8, ["class"])) : J("v-if", !0) ], 2) ], 2)) : J("v-if", !0), D("input", Et({ id: y(p), ref_key: "input", ref: g, class: y(v).e("inner") }, y(u), { minlength: I.minlength, maxlength: I.maxlength, type: I.showPassword ? w.value ? "text" : "password" : I.type, disabled: y(f), readonly: I.readonly, autocomplete: I.autocomplete, tabindex: I.tabindex, "aria-label": I.ariaLabel, placeholder: I.placeholder, style: I.inputStyle, form: I.form, autofocus: I.autofocus, onCompositionstart: y(De), onCompositionupdate: y(_e), onCompositionend: y(Fe), onInput: pe, onChange: ke, onKeydown: ot }), null, 16, ["id", "minlength", "maxlength", "type", "disabled", "readonly", "autocomplete", "tabindex", "aria-label", "placeholder", "form", "autofocus", "onCompositionstart", "onCompositionupdate", "onCompositionend"]), J(" suffix slot "), y(te) ? (S(), L("span", { key: 1, class: H(y(v).e("suffix")) }, [ D("span", { class: H(y(v).e("suffix-inner")) }, [ !y(G) || !y(se) || !y(ae) ? (S(), L(Re, { key: 0 }, [ ue(I.$slots, "suffix"), I.suffixIcon ? (S(), re(y(mr), { key: 0, class: H(y(v).e("icon")) }, { default: N(() => [ (S(), re(yt(I.suffixIcon))) ]), _: 1 }, 8, ["class"])) : J("v-if", !0) ], 64)) : J("v-if", !0), y(G) ? (S(), re(y(mr), { key: 1, class: H([y(v).e("icon"), y(v).e("clear")]), onMousedown: Ge(y(Xp), ["prevent"]), onClick: Qe }, { default: N(() => [ q(y($i)) ]), _: 1 }, 8, ["class", "onMousedown"])) : J("v-if", !0), y(se) ? (S(), re(y(mr), { key: 2, class: H([y(v).e("icon"), y(v).e("password")]), onClick: Ie }, { default: N(() => [ (S(), re(yt(y(j)))) ]), _: 1 }, 8, ["class"])) : J("v-if", !0), y(ae) ? (S(), L("span", { key: 3, class: H(y(v).e("count")) }, [ D("span", { class: H(y(v).e("count-inner")) }, ge(y(de)) + " / " + ge(I.maxlength), 3) ], 2)) : J("v-if", !0), y(R) && y(M) && y(T) ? (S(), re(y(mr), { key: 4, class: H([ y(v).e("icon"), y(v).e("validateIcon"), y(v).is("loading", y(R) === "validating") ]) }, { default: N(() => [ (S(), re(yt(y(M)))) ]), _: 1 }, 8, ["class"])) : J("v-if", !0) ], 2) ], 2)) : J("v-if", !0) ], 2), J(" append slot "), I.$slots.append ? (S(), L("div", { key: 1, class: H(y(v).be("group", "append")) }, [ ue(I.$slots, "append") ], 2)) : J("v-if", !0) ], 64)) : (S(), L(Re, { key: 1 }, [ J(" textarea "), D("textarea", Et({ id: y(p), ref_key: "textarea", ref: b, class: [y(m).e("inner"), y(v).is("focus", y(O))] }, y(u), { minlength: I.minlength, maxlength: I.maxlength, tabindex: I.tabindex, disabled: y(f), readonly: I.readonly, autocomplete: I.autocomplete, style: y(V), "aria-label": I.ariaLabel, placeholder: I.placeholder, form: I.form, autofocus: I.autofocus, rows: I.rows, onCompositionstart: y(De), onCompositionupdate: y(_e), onCompositionend: y(Fe), onInput: pe, onFocus: y(F), onBlur: y(A), onChange: ke, onKeydown: ot }), null, 16, ["id", "minlength", "maxlength", "tabindex", "disabled", "readonly", "autocomplete", "aria-label", "placeholder", "form", "autofocus", "rows", "onCompositionstart", "onCompositionupdate", "onCompositionend", "onFocus", "onBlur"]), y(ae) ? (S(), L("span", { key: 0, style: Ye(k.value), class: H(y(v).e("count")) }, ge(y(de)) + " / " + ge(I.maxlength), 7)) : J("v-if", !0) ], 64)) ], 16, ["role"])); } }); var vpe = /* @__PURE__ */ It(hpe, [["__file", "input.vue"]]); const um = _r(vpe), tc = 4, gpe = { 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" } }, mpe = ({ move: e, size: t, bar: n }) => ({ [n.size]: t, transform: `translate${n.axis}(${e}%)` }), e$ = Symbol("scrollbarContextKey"), ype = ln({ vertical: Boolean, size: String, move: Number, ratio: { type: Number, required: !0 }, always: Boolean }), bpe = "Thumb", wpe = /* @__PURE__ */ W({ __name: "thumb", props: ype, setup(e) { const t = e, n = be(e$), r = Lt("scrollbar"); n || yce(bpe, "can not inject scrollbar context"); const o = z(), a = z(), i = z({}), s = z(!1); let l = !1, u = !1, c = Jn ? document.onselectstart : null; const d = E(() => gpe[t.vertical ? "vertical" : "horizontal"]), p = E(() => mpe({ size: t.size, move: t.move, bar: d.value })), h = E(() => o.value[d.value.offset] ** 2 / n.wrapElement[d.value.scrollSize] / t.ratio / a.value[d.value.offset]), f = (C) => { var _; if (C.stopPropagation(), C.ctrlKey || [1, 2].includes(C.button)) return; (_ = window.getSelection()) == null || _.removeAllRanges(), m(C); const $ = C.currentTarget; $ && (i.value[d.value.axis] = $[d.value.offset] - (C[d.value.client] - $.getBoundingClientRect()[d.value.direction])); }, v = (C) => { if (!a.value || !o.value || !n.wrapElement) return; const _ = Math.abs(C.target.getBoundingClientRect()[d.value.direction] - C[d.value.client]), $ = a.value[d.value.offset] / 2, O = (_ - $) * 100 * h.value / o.value[d.value.offset]; n.wrapElement[d.value.scroll] = O * n.wrapElement[d.value.scrollSize] / 100; }, m = (C) => { C.stopImmediatePropagation(), l = !0, document.addEventListener("mousemove", g), document.addEventListener("mouseup", b), c = document.onselectstart, document.onselectstart = () => !1; }, g = (C) => { if (!o.value || !a.value || l === !1) return; const _ = i.value[d.value.axis]; if (!_) return; const $ = (o.value.getBoundingClientRect()[d.value.direction] - C[d.value.client]) * -1, O = a.value[d.value.offset] - _, F = ($ - O) * 100 * h.value / o.value[d.value.offset]; n.wrapElement[d.value.scroll] = F * n.wrapElement[d.value.scrollSize] / 100; }, b = () => { l = !1, i.value[d.value.axis] = 0, document.removeEventListener("mousemove", g), document.removeEventListener("mouseup", b), k(), u && (s.value = !1); }, x = () => { u = !1, s.value = !!t.size; }, w = () => { u = !0, s.value = l; }; Tt(() => { k(), document.removeEventListener("mouseup", b); }); const k = () => { document.onselectstart !== c && (document.onselectstart = c); }; return Zo(St(n, "scrollbarElement"), "mousemove", x), Zo(St(n, "scrollbarElement"), "mouseleave", w), (C, _) => (S(), re(nr, { name: y(r).b("fade"), persisted: "" }, { default: N(() => [ Be(D("div", { ref_key: "instance", ref: o, class: H([y(r).e("bar"), y(r).is(y(d).key)]), onMousedown: v }, [ D("div", { ref_key: "thumb", ref: a, class: H(y(r).e("thumb")), style: Ye(y(p)), onMousedown: f }, null, 38) ], 34), [ [ht, C.always || s.value] ]) ]), _: 1 }, 8, ["name"])); } }); var nO = /* @__PURE__ */ It(wpe, [["__file", "thumb.vue"]]); const xpe = ln({ always: { type: Boolean, default: !0 }, minSize: { type: Number, required: !0 } }), kpe = /* @__PURE__ */ W({ __name: "bar", props: xpe, setup(e, { expose: t }) { const n = e, r = be(e$), o = z(0), a = z(0), i = z(""), s = z(""), l = z(1), u = z(1); return t({ handleScroll: (c) => { if (c) { const d = c.offsetHeight - tc, p = c.offsetWidth - tc; a.value = c.scrollTop * 100 / d * l.value, o.value = c.scrollLeft * 100 / p * u.value; } }, update: () => { const c = r == null ? void 0 : r.wrapElement; if (!c) return; const d = c.offsetHeight - tc, p = c.offsetWidth - tc, h = d ** 2 / c.scrollHeight, f = p ** 2 / c.scrollWidth, v = Math.max(h, n.minSize), m = Math.max(f, n.minSize); l.value = h / (d - h) / (v / (d - v)), u.value = f / (p - f) / (m / (p - m)), s.value = v + tc < d ? `${v}px` : "", i.value = m + tc < p ? `${m}px` : ""; } }), (c, d) => (S(), L(Re, null, [ q(nO, { move: o.value, ratio: u.value, size: i.value, always: c.always }, null, 8, ["move", "ratio", "size", "always"]), q(nO, { move: a.value, ratio: l.value, size: s.value, vertical: "", always: c.always }, null, 8, ["move", "ratio", "size", "always"]) ], 64)); } }); var Cpe = /* @__PURE__ */ It(kpe, [["__file", "bar.vue"]]); const _pe = ln({ height: { type: [String, Number], default: "" }, maxHeight: { type: [String, Number], default: "" }, native: { type: Boolean, default: !1 }, wrapStyle: { type: Ct([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, ...bl(["ariaLabel", "ariaOrientation"]) }), Spe = { scroll: ({ scrollTop: e, scrollLeft: t }) => [e, t].every(Ar) }, LC = "ElScrollbar", $pe = W({ name: LC }), Epe = /* @__PURE__ */ W({ ...$pe, props: _pe, emits: Spe, setup(e, { expose: t, emit: n }) { const r = e, o = Lt("scrollbar"); let a, i, s = 0, l = 0; const u = z(), c = z(), d = z(), p = z(), h = E(() => { const k = {}; return r.height && (k.height = zc(r.height)), r.maxHeight && (k.maxHeight = zc(r.maxHeight)), [r.wrapStyle, k]; }), f = E(() => [ r.wrapClass, o.e("wrap"), { [o.em("wrap", "hidden-default")]: !r.native } ]), v = E(() => [o.e("view"), r.viewClass]), m = () => { var k; c.value && ((k = p.value) == null || k.handleScroll(c.value), s = c.value.scrollTop, l = c.value.scrollLeft, n("scroll", { scrollTop: c.value.scrollTop, scrollLeft: c.value.scrollLeft })); }; function g(k, C) { Tr(k) ? c.value.scrollTo(k) : Ar(k) && Ar(C) && c.value.scrollTo(k, C); } const b = (k) => { if (!Ar(k)) { Qn(LC, "value must be a number"); return; } c.value.scrollTop = k; }, x = (k) => { if (!Ar(k)) { Qn(LC, "value must be a number"); return; } c.value.scrollLeft = k; }, w = () => { var k; (k = p.value) == null || k.update(); }; return he(() => r.noresize, (k) => { k ? (a == null || a(), i == null || i()) : ({ stop: a } = Vi(d, w), i = Zo("resize", w)); }, { immediate: !0 }), he(() => [r.maxHeight, r.height], () => { r.native || Ke(() => { var k; w(), c.value && ((k = p.value) == null || k.handleScroll(c.value)); }); }), nt(e$, en({ scrollbarElement: u, wrapElement: c })), Y_(() => { c.value && (c.value.scrollTop = s, c.value.scrollLeft = l); }), ut(() => { r.native || Ke(() => { w(); }); }), Nf(() => w()), t({ wrapRef: c, update: w, scrollTo: g, setScrollTop: b, setScrollLeft: x, handleScroll: m }), (k, C) => (S(), L("div", { ref_key: "scrollbarRef", ref: u, class: H(y(o).b()) }, [ D("div", { ref_key: "wrapRef", ref: c, class: H(y(f)), style: Ye(y(h)), tabindex: k.tabindex, onScroll: m }, [ (S(), re(yt(k.tag), { id: k.id, ref_key: "resizeRef", ref: d, class: H(y(v)), style: Ye(k.viewStyle), role: k.role, "aria-label": k.ariaLabel, "aria-orientation": k.ariaOrientation }, { default: N(() => [ ue(k.$slots, "default") ]), _: 3 }, 8, ["id", "class", "style", "role", "aria-label", "aria-orientation"])) ], 46, ["tabindex"]), k.native ? J("v-if", !0) : (S(), re(Cpe, { key: 0, ref_key: "barRef", ref: p, always: k.always, "min-size": k.minSize }, null, 8, ["always", "min-size"])) ], 2)); } }); var Ope = /* @__PURE__ */ It(Epe, [["__file", "scrollbar.vue"]]); const Fpe = _r(Ope), t$ = Symbol("popper"), jD = Symbol("popperContent"), Tpe = [ "dialog", "grid", "group", "listbox", "menu", "navigation", "tooltip", "tree" ], VD = ln({ role: { type: String, values: Tpe, default: "tooltip" } }), Ape = W({ name: "ElPopper", inheritAttrs: !1 }), Ipe = /* @__PURE__ */ W({ ...Ape, props: VD, setup(e, { expose: t }) { const n = e, r = z(), o = z(), a = z(), i = z(), s = E(() => n.role), l = { triggerRef: r, popperInstanceRef: o, contentRef: a, referenceRef: i, role: s }; return t(l), nt(t$, l), (u, c) => ue(u.$slots, "default"); } }); var Ppe = /* @__PURE__ */ It(Ipe, [["__file", "popper.vue"]]); const HD = ln({ arrowOffset: { type: Number, default: 5 } }), Lpe = W({ name: "ElPopperArrow", inheritAttrs: !1 }), Rpe = /* @__PURE__ */ W({ ...Lpe, props: HD, setup(e, { expose: t }) { const n = e, r = Lt("popper"), { arrowOffset: o, arrowRef: a, arrowStyle: i } = be(jD, void 0); return he(() => n.arrowOffset, (s) => { o.value = s; }), Tt(() => { a.value = void 0; }), t({ arrowRef: a }), (s, l) => (S(), L("span", { ref_key: "arrowRef", ref: a, class: H(y(r).e("arrow")), style: Ye(y(i)), "data-popper-arrow": "" }, null, 6)); } }); var Npe = /* @__PURE__ */ It(Rpe, [["__file", "arrow.vue"]]); const ty = "ElOnlyChild", Mpe = W({ name: ty, setup(e, { slots: t, attrs: n }) { var r; const o = be(PD), a = Kde((r = o == null ? void 0 : o.setForwardRef) != null ? r : Xp); return () => { var i; const s = (i = t.default) == null ? void 0 : i.call(t, n); if (!s) return null; if (s.length > 1) return Qn(ty, "requires exact only one valid child."), null; const l = UD(s); return l ? Be(_0(l, n), [[a]]) : (Qn(ty, "no valid child node found"), null); }; } }); function UD(e) { if (!e) return null; const t = e; for (const n of t) { if (Tr(n)) switch (n.type) { case S0: continue; case hl: case "svg": return rO(n); case Re: return UD(n.children); default: return n; } return rO(n); } return null; } function rO(e) { const t = Lt("only-child"); return q("span", { class: t.e("content") }, [e]); } const qD = ln({ virtualRef: { type: Ct(Object) }, virtualTriggering: Boolean, onMouseenter: { type: Ct(Function) }, onMouseleave: { type: Ct(Function) }, onClick: { type: Ct(Function) }, onKeydown: { type: Ct(Function) }, onFocus: { type: Ct(Function) }, onBlur: { type: Ct(Function) }, onContextmenu: { type: Ct(Function) }, id: String, open: Boolean }), Dpe = W({ name: "ElPopperTrigger", inheritAttrs: !1 }), Bpe = /* @__PURE__ */ W({ ...Dpe, props: qD, setup(e, { expose: t }) { const n = e, { role: r, triggerRef: o } = be(t$, void 0); qde(o); const a = E(() => s.value ? n.id : void 0), i = E(() => { if (r && r.value === "tooltip") return n.open && n.id ? n.id : void 0; }), s = E(() => { if (r && r.value !== "tooltip") return r.value; }), l = E(() => s.value ? `${n.open}` : void 0); let u; const c = [ "onMouseenter", "onMouseleave", "onClick", "onKeydown", "onFocus", "onBlur", "onContextmenu" ]; return ut(() => { he(() => n.virtualRef, (d) => { d && (o.value = Yi(d)); }, { immediate: !0 }), he(o, (d, p) => { u == null || u(), u = void 0, Ql(d) && (c.forEach((h) => { var f; const v = n[h]; v && (d.addEventListener(h.slice(2).toLowerCase(), v), (f = p == null ? void 0 : p.removeEventListener) == null || f.call(p, h.slice(2).toLowerCase(), v)); }), u = he([a, i, s, l], (h) => { [ "aria-controls", "aria-describedby", "aria-haspopup", "aria-expanded" ].forEach((f, v) => { Ws(h[v]) ? d.removeAttribute(f) : d.setAttribute(f, h[v]); }); }, { immediate: !0 })), Ql(p) && [ "aria-controls", "aria-describedby", "aria-haspopup", "aria-expanded" ].forEach((h) => p.removeAttribute(h)); }, { immediate: !0 }); }), Tt(() => { if (u == null || u(), u = void 0, o.value && Ql(o.value)) { const d = o.value; c.forEach((p) => { const h = n[p]; h && d.removeEventListener(p.slice(2).toLowerCase(), h); }), o.value = void 0; } }), t({ triggerRef: o }), (d, p) => d.virtualTriggering ? J("v-if", !0) : (S(), re(y(Mpe), Et({ key: 0 }, d.$attrs, { "aria-controls": y(a), "aria-describedby": y(i), "aria-expanded": y(l), "aria-haspopup": y(s) }), { default: N(() => [ ue(d.$slots, "default") ]), _: 3 }, 16, ["aria-controls", "aria-describedby", "aria-expanded", "aria-haspopup"])); } }); var zpe = /* @__PURE__ */ It(Bpe, [["__file", "trigger.vue"]]); const ny = "focus-trap.focus-after-trapped", ry = "focus-trap.focus-after-released", jpe = "focus-trap.focusout-prevented", oO = { cancelable: !0, bubbles: !1 }, Vpe = { cancelable: !0, bubbles: !1 }, aO = "focusAfterTrapped", iO = "focusAfterReleased", Hpe = Symbol("elFocusTrap"), n$ = z(), cm = z(0), r$ = z(0); let Yh = 0; const KD = (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; }, sO = (e, t) => { for (const n of e) if (!Upe(n, t)) return n; }, Upe = (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; }, qpe = (e) => { const t = KD(e), n = sO(t, e), r = sO(t.reverse(), e); return [n, r]; }, Kpe = (e) => e instanceof HTMLInputElement && "select" in e, Ts = (e, t) => { if (e && e.focus) { const n = document.activeElement; e.focus({ preventScroll: !0 }), r$.value = window.performance.now(), e !== n && Kpe(e) && t && e.select(); } }; function lO(e, t) { const n = [...e], r = e.indexOf(t); return r !== -1 && n.splice(r, 1), n; } const Gpe = () => { let e = []; return { push: (t) => { const n = e[0]; n && t !== n && n.pause(), e = lO(e, t), e.unshift(t); }, remove: (t) => { var n, r; e = lO(e, t), (r = (n = e[0]) == null ? void 0 : n.resume) == null || r.call(n); } }; }, Wpe = (e, t = !1) => { const n = document.activeElement; for (const r of e) if (Ts(r, t), document.activeElement !== n) return; }, uO = Gpe(), Ype = () => cm.value > r$.value, Xh = () => { n$.value = "pointer", cm.value = window.performance.now(); }, cO = () => { n$.value = "keyboard", cm.value = window.performance.now(); }, Xpe = () => (ut(() => { Yh === 0 && (document.addEventListener("mousedown", Xh), document.addEventListener("touchstart", Xh), document.addEventListener("keydown", cO)), Yh++; }), Tt(() => { Yh--, Yh <= 0 && (document.removeEventListener("mousedown", Xh), document.removeEventListener("touchstart", Xh), document.removeEventListener("keydown", cO)); }), { focusReason: n$, lastUserFocusTimestamp: cm, lastAutomatedFocusTimestamp: r$ }), Zh = (e) => new CustomEvent(jpe, { ...Vpe, detail: e }), Zpe = W({ name: "ElFocusTrap", inheritAttrs: !1, props: { loop: Boolean, trapped: Boolean, focusTrapEl: Object, focusStartEl: { type: [Object, String], default: "first" } }, emits: [ aO, iO, "focusin", "focusout", "focusout-prevented", "release-requested" ], setup(e, { emit: t }) { const n = z(); let r, o; const { focusReason: a } = Xpe(); zde((f) => { e.trapped && !i.paused && t("release-requested", f); }); const i = { paused: !1, pause() { this.paused = !0; }, resume() { this.paused = !1; } }, s = (f) => { if (!e.loop && !e.trapped || i.paused) return; const { key: v, altKey: m, ctrlKey: g, metaKey: b, currentTarget: x, shiftKey: w } = f, { loop: k } = e, C = v === sr.tab && !m && !g && !b, _ = document.activeElement; if (C && _) { const $ = x, [O, F] = qpe($); if (O && F) { if (!w && _ === F) { const A = Zh({ focusReason: a.value }); t("focusout-prevented", A), A.defaultPrevented || (f.preventDefault(), k && Ts(O, !0)); } else if (w && [O, $].includes(_)) { const A = Zh({ focusReason: a.value }); t("focusout-prevented", A), A.defaultPrevented || (f.preventDefault(), k && Ts(F, !0)); } } else if (_ === $) { const A = Zh({ focusReason: a.value }); t("focusout-prevented", A), A.defaultPrevented || f.preventDefault(); } } }; nt(Hpe, { focusTrapRef: n, onKeydown: s }), he(() => e.focusTrapEl, (f) => { f && (n.value = f); }, { immediate: !0 }), he([n], ([f], [v]) => { f && (f.addEventListener("keydown", s), f.addEventListener("focusin", c), f.addEventListener("focusout", d)), v && (v.removeEventListener("keydown", s), v.removeEventListener("focusin", c), v.removeEventListener("focusout", d)); }); const l = (f) => { t(aO, f); }, u = (f) => t(iO, f), c = (f) => { const v = y(n); if (!v) return; const m = f.target, g = f.relatedTarget, b = m && v.contains(m); e.trapped || g && v.contains(g) || (r = g), b && t("focusin", f), !i.paused && e.trapped && (b ? o = m : Ts(o, !0)); }, d = (f) => { const v = y(n); if (!(i.paused || !v)) if (e.trapped) { const m = f.relatedTarget; !Ws(m) && !v.contains(m) && setTimeout(() => { if (!i.paused && e.trapped) { const g = Zh({ focusReason: a.value }); t("focusout-prevented", g), g.defaultPrevented || Ts(o, !0); } }, 0); } else { const m = f.target; m && v.contains(m) || t("focusout", f); } }; async function p() { await Ke(); const f = y(n); if (f) { uO.push(i); const v = f.contains(document.activeElement) ? r : document.activeElement; if (r = v, !f.contains(v)) { const m = new Event(ny, oO); f.addEventListener(ny, l), f.dispatchEvent(m), m.defaultPrevented || Ke(() => { let g = e.focusStartEl; Gr(g) || (Ts(g), document.activeElement !== g && (g = "first")), g === "first" && Wpe(KD(f), !0), (document.activeElement === v || g === "container") && Ts(f); }); } } } function h() { const f = y(n); if (f) { f.removeEventListener(ny, l); const v = new CustomEvent(ry, { ...oO, detail: { focusReason: a.value } }); f.addEventListener(ry, u), f.dispatchEvent(v), !v.defaultPrevented && (a.value == "keyboard" || !Ype() || f.contains(document.activeElement)) && Ts(r ?? document.body), f.removeEventListener(ry, u), uO.remove(i); } } return ut(() => { e.trapped && p(), he(() => e.trapped, (f) => { f ? p() : h(); }); }), Tt(() => { e.trapped && h(), n.value && (n.value.removeEventListener("keydown", s), n.value.removeEventListener("focusin", c), n.value.removeEventListener("focusout", d), n.value = void 0); }), { onKeydown: s }; } }); function Jpe(e, t, n, r, o, a) { return ue(e.$slots, "default", { handleKeydown: e.onKeydown }); } var Qpe = /* @__PURE__ */ It(Zpe, [["render", Jpe], ["__file", "focus-trap.vue"]]); const efe = ["fixed", "absolute"], tfe = ln({ boundariesPadding: { type: Number, default: 0 }, fallbackPlacements: { type: Ct(Array), default: void 0 }, gpuAcceleration: { type: Boolean, default: !0 }, offset: { type: Number, default: 12 }, placement: { type: String, values: im, default: "bottom" }, popperOptions: { type: Ct(Object), default: () => ({}) }, strategy: { type: String, values: efe, default: "absolute" } }), GD = ln({ ...tfe, id: String, style: { type: Ct([String, Array, Object]) }, className: { type: Ct([String, Array, Object]) }, effect: { type: Ct(String), default: "dark" }, visible: Boolean, enterable: { type: Boolean, default: !0 }, pure: Boolean, focusOnShow: { type: Boolean, default: !1 }, trapping: { type: Boolean, default: !1 }, popperClass: { type: Ct([String, Array, Object]) }, popperStyle: { type: Ct([String, Array, Object]) }, referenceEl: { type: Ct(Object) }, triggerTargetEl: { type: Ct(Object) }, stopPopperMouseEvent: { type: Boolean, default: !0 }, virtualTriggering: Boolean, zIndex: Number, ...bl(["ariaLabel"]) }), nfe = { mouseenter: (e) => e instanceof MouseEvent, mouseleave: (e) => e instanceof MouseEvent, focus: () => !0, blur: () => !0, close: () => !0 }, rfe = (e, t = []) => { const { placement: n, strategy: r, popperOptions: o } = e, a = { placement: n, strategy: r, ...o, modifiers: [...afe(e), ...t] }; return ife(a, o == null ? void 0 : o.modifiers), a; }, ofe = (e) => { if (Jn) return Yi(e); }; function afe(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 ife(e, t) { t && (e.modifiers = [...e.modifiers, ...t ?? []]); } const sfe = 0, lfe = (e) => { const { popperInstanceRef: t, contentRef: n, triggerRef: r, role: o } = be(t$, void 0), a = z(), i = z(), s = E(() => ({ name: "eventListeners", enabled: !!e.visible })), l = E(() => { var g; const b = y(a), x = (g = y(i)) != null ? g : sfe; return { name: "arrow", enabled: !pce(b), options: { element: b, padding: x } }; }), u = E(() => ({ onFirstUpdate: () => { f(); }, ...rfe(e, [ y(l), y(s) ]) })), c = E(() => ofe(e.referenceEl) || y(r)), { attributes: d, state: p, styles: h, update: f, forceUpdate: v, instanceRef: m } = Mde(c, n, u); return he(m, (g) => t.value = g), ut(() => { he(() => { var g; return (g = y(c)) == null ? void 0 : g.getBoundingClientRect(); }, () => { f(); }); }), { attributes: d, arrowRef: a, contentRef: n, instanceRef: m, state: p, styles: h, role: o, forceUpdate: v, update: f }; }, ufe = (e, { attributes: t, styles: n, role: r }) => { const { nextZIndex: o } = ND(), a = Lt("popper"), i = E(() => y(t).popper), s = z(Ar(e.zIndex) ? e.zIndex : o()), l = E(() => [ a.b(), a.is("pure", e.pure), a.is(e.effect), e.popperClass ]), u = E(() => [ { zIndex: y(s) }, y(n).popper, e.popperStyle || {} ]), c = E(() => r.value === "dialog" ? "false" : void 0), d = E(() => y(n).arrow || {}); return { ariaModal: c, arrowStyle: d, contentAttrs: i, contentClass: l, contentStyle: u, contentZIndex: s, updateZIndex: () => { s.value = Ar(e.zIndex) ? e.zIndex : o(); } }; }, cfe = (e, t) => { const n = z(!1), r = z(); 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"); } }; }, dfe = W({ name: "ElPopperContent" }), pfe = /* @__PURE__ */ W({ ...dfe, props: GD, emits: nfe, setup(e, { expose: t, emit: n }) { const r = e, { focusStartRef: o, trapped: a, onFocusAfterReleased: i, onFocusAfterTrapped: s, onFocusInTrap: l, onFocusoutPrevented: u, onReleaseRequested: c } = cfe(r, n), { attributes: d, arrowRef: p, contentRef: h, styles: f, instanceRef: v, role: m, update: g } = lfe(r), { ariaModal: b, arrowStyle: x, contentAttrs: w, contentClass: k, contentStyle: C, updateZIndex: _ } = ufe(r, { styles: f, attributes: d, role: m }), $ = be(tf, void 0), O = z(); nt(jD, { arrowStyle: x, arrowRef: p, arrowOffset: O }), $ && nt(tf, { ...$, addInputId: Xp, removeInputId: Xp }); let F; const A = (R = !0) => { g(), R && _(); }, T = () => { A(!1), r.visible && r.focusOnShow ? a.value = !0 : r.visible === !1 && (a.value = !1); }; return ut(() => { he(() => r.triggerTargetEl, (R, M) => { F == null || F(), F = void 0; const j = y(R || h.value), P = y(M || h.value); Ql(j) && (F = he([m, () => r.ariaLabel, b, () => r.id], (V) => { ["role", "aria-label", "aria-modal", "id"].forEach((U, G) => { Ws(V[G]) ? j.removeAttribute(U) : j.setAttribute(U, V[G]); }); }, { immediate: !0 })), P !== j && Ql(P) && ["role", "aria-label", "aria-modal", "id"].forEach((V) => { P.removeAttribute(V); }); }, { immediate: !0 }), he(() => r.visible, T, { immediate: !0 }); }), Tt(() => { F == null || F(), F = void 0; }), t({ popperContentRef: h, popperInstanceRef: v, updatePopper: A, contentStyle: C }), (R, M) => (S(), L("div", Et({ ref_key: "contentRef", ref: h }, y(w), { style: y(C), class: y(k), tabindex: "-1", onMouseenter: (j) => R.$emit("mouseenter", j), onMouseleave: (j) => R.$emit("mouseleave", j) }), [ q(y(Qpe), { trapped: y(a), "trap-on-focus-in": !0, "focus-trap-el": y(h), "focus-start-el": y(o), onFocusAfterTrapped: y(s), onFocusAfterReleased: y(i), onFocusin: y(l), onFocusoutPrevented: y(u), onReleaseRequested: y(c) }, { default: N(() => [ ue(R.$slots, "default") ]), _: 3 }, 8, ["trapped", "focus-trap-el", "focus-start-el", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusin", "onFocusoutPrevented", "onReleaseRequested"]) ], 16, ["onMouseenter", "onMouseleave"])); } }); var ffe = /* @__PURE__ */ It(pfe, [["__file", "content.vue"]]); const hfe = _r(Ppe), o$ = Symbol("elTooltip"), po = ln({ ...Hde, ...GD, appendTo: { type: Ct([String, Object]) }, content: { type: String, default: "" }, rawContent: Boolean, persistent: Boolean, visible: { type: Ct(Boolean), default: null }, transition: String, teleported: { type: Boolean, default: !0 }, disabled: Boolean, ...bl(["ariaLabel"]) }), nf = ln({ ...qD, disabled: Boolean, trigger: { type: Ct([String, Array]), default: "hover" }, triggerKeys: { type: Ct(Array), default: () => [sr.enter, sr.space] } }), { useModelToggleProps: vfe, useModelToggleEmits: gfe, useModelToggle: mfe } = Lce("visible"), yfe = ln({ ...VD, ...vfe, ...po, ...nf, ...HD, showArrow: { type: Boolean, default: !0 } }), bfe = [ ...gfe, "before-show", "before-hide", "show", "hide", "open", "close" ], wfe = (e, t) => vo(e) ? e.includes(t) : e === t, nc = (e, t, n) => (r) => { wfe(y(e), t) && n(r); }, xfe = W({ name: "ElTooltipTrigger" }), kfe = /* @__PURE__ */ W({ ...xfe, props: nf, setup(e, { expose: t }) { const n = e, r = Lt("tooltip"), { controlled: o, id: a, open: i, onOpen: s, onClose: l, onToggle: u } = be(o$, void 0), c = z(null), d = () => { if (y(o) || n.disabled) return !0; }, p = St(n, "trigger"), h = Bi(d, nc(p, "hover", s)), f = Bi(d, nc(p, "hover", l)), v = Bi(d, nc(p, "click", (w) => { w.button === 0 && u(w); })), m = Bi(d, nc(p, "focus", s)), g = Bi(d, nc(p, "focus", l)), b = Bi(d, nc(p, "contextmenu", (w) => { w.preventDefault(), u(w); })), x = Bi(d, (w) => { const { code: k } = w; n.triggerKeys.includes(k) && (w.preventDefault(), u(w)); }); return t({ triggerRef: c }), (w, k) => (S(), re(y(zpe), { id: y(a), "virtual-ref": w.virtualRef, open: y(i), "virtual-triggering": w.virtualTriggering, class: H(y(r).e("trigger")), onBlur: y(g), onClick: y(v), onContextmenu: y(b), onFocus: y(m), onMouseenter: y(h), onMouseleave: y(f), onKeydown: y(x) }, { default: N(() => [ ue(w.$slots, "default") ]), _: 3 }, 8, ["id", "virtual-ref", "open", "virtual-triggering", "class", "onBlur", "onClick", "onContextmenu", "onFocus", "onMouseenter", "onMouseleave", "onKeydown"])); } }); var Cfe = /* @__PURE__ */ It(kfe, [["__file", "trigger.vue"]]); const _fe = ln({ to: { type: Ct([String, Object]), required: !0 }, disabled: Boolean }), Sfe = /* @__PURE__ */ W({ __name: "teleport", props: _fe, setup(e) { return (t, n) => t.disabled ? ue(t.$slots, "default", { key: 0 }) : (S(), re($0, { key: 1, to: t.to }, [ ue(t.$slots, "default") ], 8, ["to"])); } }); var $fe = /* @__PURE__ */ It(Sfe, [["__file", "teleport.vue"]]); const Efe = _r($fe), Ofe = W({ name: "ElTooltipContent", inheritAttrs: !1 }), Ffe = /* @__PURE__ */ W({ ...Ofe, props: po, setup(e, { expose: t }) { const n = e, { selector: r } = ID(), o = Lt("tooltip"), a = z(null); let i; const { controlled: s, id: l, open: u, trigger: c, onClose: d, onOpen: p, onShow: h, onHide: f, onBeforeShow: v, onBeforeHide: m } = be(o$, void 0), g = E(() => n.transition || `${o.namespace.value}-fade-in-linear`), b = E(() => process.env.NODE_ENV === "test" ? !0 : n.persistent); Tt(() => { i == null || i(); }); const x = E(() => y(b) ? !0 : y(u)), w = E(() => n.disabled ? !1 : y(u)), k = E(() => n.appendTo || r.value), C = E(() => { var P; return (P = n.style) != null ? P : {}; }), _ = z(!0), $ = () => { f(), _.value = !0; }, O = () => { if (y(s)) return !0; }, F = Bi(O, () => { n.enterable && y(c) === "hover" && p(); }), A = Bi(O, () => { y(c) === "hover" && d(); }), T = () => { var P, V; (V = (P = a.value) == null ? void 0 : P.updatePopper) == null || V.call(P), v == null || v(); }, R = () => { m == null || m(); }, M = () => { h(), i = aie(E(() => { var P; return (P = a.value) == null ? void 0 : P.popperContentRef; }), () => { y(s) || y(c) !== "hover" && d(); }); }, j = () => { n.virtualTriggering || d(); }; return he(() => y(u), (P) => { P ? _.value = !1 : i == null || i(); }, { flush: "post" }), he(() => n.content, () => { var P, V; (V = (P = a.value) == null ? void 0 : P.updatePopper) == null || V.call(P); }), t({ contentRef: a }), (P, V) => (S(), re(y(Efe), { disabled: !P.teleported, to: y(k) }, { default: N(() => [ q(nr, { name: y(g), onAfterLeave: $, onBeforeEnter: T, onAfterEnter: M, onBeforeLeave: R }, { default: N(() => [ y(x) ? Be((S(), re(y(ffe), Et({ key: 0, id: y(l), ref_key: "contentRef", ref: a }, P.$attrs, { "aria-label": P.ariaLabel, "aria-hidden": _.value, "boundaries-padding": P.boundariesPadding, "fallback-placements": P.fallbackPlacements, "gpu-acceleration": P.gpuAcceleration, offset: P.offset, placement: P.placement, "popper-options": P.popperOptions, strategy: P.strategy, effect: P.effect, enterable: P.enterable, pure: P.pure, "popper-class": P.popperClass, "popper-style": [P.popperStyle, y(C)], "reference-el": P.referenceEl, "trigger-target-el": P.triggerTargetEl, visible: y(w), "z-index": P.zIndex, onMouseenter: y(F), onMouseleave: y(A), onBlur: j, onClose: y(d) }), { default: N(() => [ ue(P.$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, y(w)] ]) : J("v-if", !0) ]), _: 3 }, 8, ["name"]) ]), _: 3 }, 8, ["disabled", "to"])); } }); var Tfe = /* @__PURE__ */ It(Ffe, [["__file", "content.vue"]]); const Afe = W({ name: "ElTooltip" }), Ife = /* @__PURE__ */ W({ ...Afe, props: yfe, emits: bfe, setup(e, { expose: t, emit: n }) { const r = e; Vde(); const o = lm(), a = z(), i = z(), s = () => { var g; const b = y(a); b && ((g = b.popperInstanceRef) == null || g.update()); }, l = z(!1), u = z(), { show: c, hide: d, hasUpdateHandler: p } = mfe({ indicator: l, toggleReason: u }), { onOpen: h, onClose: f } = Ude({ showAfter: St(r, "showAfter"), hideAfter: St(r, "hideAfter"), autoClose: St(r, "autoClose"), open: c, close: d }), v = E(() => Bc(r.visible) && !p.value); nt(o$, { controlled: v, id: o, open: $u(l), trigger: St(r, "trigger"), onOpen: (g) => { h(g); }, onClose: (g) => { f(g); }, onToggle: (g) => { y(l) ? f(g) : h(g); }, onShow: () => { n("show", u.value); }, onHide: () => { n("hide", u.value); }, onBeforeShow: () => { n("before-show", u.value); }, onBeforeHide: () => { n("before-hide", u.value); }, updatePopper: s }), he(() => r.disabled, (g) => { g && l.value && (l.value = !1); }); const m = (g) => { var b, x; const w = (x = (b = i.value) == null ? void 0 : b.contentRef) == null ? void 0 : x.popperContentRef, k = (g == null ? void 0 : g.relatedTarget) || document.activeElement; return w && w.contains(k); }; return E0(() => l.value && d()), t({ popperRef: a, contentRef: i, isFocusInsideContent: m, updatePopper: s, onOpen: h, onClose: f, hide: d }), (g, b) => (S(), re(y(hfe), { ref_key: "popperRef", ref: a, role: g.role }, { default: N(() => [ q(Cfe, { disabled: g.disabled, trigger: g.trigger, "trigger-keys": g.triggerKeys, "virtual-ref": g.virtualRef, "virtual-triggering": g.virtualTriggering }, { default: N(() => [ g.$slots.default ? ue(g.$slots, "default", { key: 0 }) : J("v-if", !0) ]), _: 3 }, 8, ["disabled", "trigger", "trigger-keys", "virtual-ref", "virtual-triggering"]), q(Tfe, { ref_key: "contentRef", ref: i, "aria-label": g.ariaLabel, "boundaries-padding": g.boundariesPadding, content: g.content, disabled: g.disabled, effect: g.effect, enterable: g.enterable, "fallback-placements": g.fallbackPlacements, "hide-after": g.hideAfter, "gpu-acceleration": g.gpuAcceleration, offset: g.offset, persistent: g.persistent, "popper-class": g.popperClass, "popper-style": g.popperStyle, placement: g.placement, "popper-options": g.popperOptions, pure: g.pure, "raw-content": g.rawContent, "reference-el": g.referenceEl, "trigger-target-el": g.triggerTargetEl, "show-after": g.showAfter, strategy: g.strategy, teleported: g.teleported, transition: g.transition, "virtual-triggering": g.virtualTriggering, "z-index": g.zIndex, "append-to": g.appendTo }, { default: N(() => [ ue(g.$slots, "content", {}, () => [ g.rawContent ? (S(), L("span", { key: 0, innerHTML: g.content }, null, 8, ["innerHTML"])) : (S(), L("span", { key: 1 }, ge(g.content), 1)) ]), g.showArrow ? (S(), re(y(Npe), { key: 0, "arrow-offset": g.arrowOffset }, null, 8, ["arrow-offset"])) : J("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 Pfe = /* @__PURE__ */ It(Ife, [["__file", "tooltip.vue"]]); const Jf = _r(Pfe), WD = Symbol("buttonGroupContextKey"), Lfe = (e, t) => { zv({ from: "type.text", replacement: "link", version: "3.0.0", scope: "props", ref: "https://element-plus.org/en-US/component/button.html#button-attributes" }, E(() => e.type === "text")); const n = be(WD, void 0), r = JS("button"), { form: o } = Lu(), a = cu(E(() => n == null ? void 0 : n.size)), i = Xf(), s = z(), l = Dr(), u = E(() => e.type || (n == null ? void 0 : n.type) || ""), c = E(() => { var h, f, v; return (v = (f = e.autoInsertSpace) != null ? f : (h = r.value) == null ? void 0 : h.autoInsertSpace) != null ? v : !1; }), d = E(() => e.tag === "button" ? { ariaDisabled: i.value || e.loading, disabled: i.value || e.loading, autofocus: e.autofocus, type: e.nativeType } : {}), p = E(() => { var h; const f = (h = l.default) == null ? void 0 : h.call(l); if (c.value && (f == null ? void 0 : f.length) === 1) { const v = f[0]; if ((v == null ? void 0 : v.type) === hl) { const m = v.children; return new RegExp("^\\p{Unified_Ideograph}{2}$", "u").test(m.trim()); } } return !1; }); return { _disabled: i, _size: a, _type: u, _ref: s, _props: d, shouldAddSpace: p, handleClick: (h) => { if (i.value || e.loading) { h.stopPropagation(); return; } e.nativeType === "reset" && (o == null || o.resetFields()), t("click", h); } }; }, Rfe = [ "default", "primary", "success", "warning", "info", "danger", "text", "" ], Nfe = ["button", "submit", "reset"], RC = ln({ size: hd, disabled: Boolean, type: { type: String, values: Rfe, default: "" }, icon: { type: rl }, nativeType: { type: String, values: Nfe, default: "button" }, loading: Boolean, loadingIcon: { type: rl, default: () => Ei }, 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: Ct([String, Object]), default: "button" } }), Mfe = { click: (e) => e instanceof MouseEvent }; function Pr(e, t) { Dfe(e) && (e = "100%"); var n = Bfe(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 Jh(e) { return Math.min(1, Math.max(0, e)); } function Dfe(e) { return typeof e == "string" && e.indexOf(".") !== -1 && parseFloat(e) === 1; } function Bfe(e) { return typeof e == "string" && e.indexOf("%") !== -1; } function YD(e) { return e = parseFloat(e), (isNaN(e) || e < 0 || e > 1) && (e = 1), e; } function Qh(e) { return e <= 1 ? "".concat(Number(e) * 100, "%") : e; } function Ul(e) { return e.length === 1 ? "0" + e : String(e); } function zfe(e, t, n) { return { r: Pr(e, 255) * 255, g: Pr(t, 255) * 255, b: Pr(n, 255) * 255 }; } function dO(e, t, n) { e = Pr(e, 255), t = Pr(t, 255), n = Pr(n, 255); var r = Math.max(e, t, n), o = Math.min(e, t, n), a = 0, i = 0, s = (r + o) / 2; if (r === o) i = 0, a = 0; else { var l = r - o; switch (i = s > 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: i, l: s }; } function oy(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 jfe(e, t, n) { var r, o, a; if (e = Pr(e, 360), t = Pr(t, 100), n = Pr(n, 100), t === 0) o = n, a = n, r = n; else { var i = n < 0.5 ? n * (1 + t) : n + t - n * t, s = 2 * n - i; r = oy(s, i, e + 1 / 3), o = oy(s, i, e), a = oy(s, i, e - 1 / 3); } return { r: r * 255, g: o * 255, b: a * 255 }; } function pO(e, t, n) { e = Pr(e, 255), t = Pr(t, 255), n = Pr(n, 255); var r = Math.max(e, t, n), o = Math.min(e, t, n), a = 0, i = r, s = r - o, l = r === 0 ? 0 : s / r; if (r === o) a = 0; else { switch (r) { case e: a = (t - n) / s + (t < n ? 6 : 0); break; case t: a = (n - e) / s + 2; break; case n: a = (e - t) / s + 4; break; } a /= 6; } return { h: a, s: l, v: i }; } function Vfe(e, t, n) { e = Pr(e, 360) * 6, t = Pr(t, 100), n = Pr(n, 100); var r = Math.floor(e), o = e - r, a = n * (1 - t), i = n * (1 - o * t), s = n * (1 - (1 - o) * t), l = r % 6, u = [n, i, a, a, s, n][l], c = [s, n, n, i, a, a][l], d = [a, a, s, n, n, i][l]; return { r: u * 255, g: c * 255, b: d * 255 }; } function fO(e, t, n, r) { var o = [ Ul(Math.round(e).toString(16)), Ul(Math.round(t).toString(16)), Ul(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 Hfe(e, t, n, r, o) { var a = [ Ul(Math.round(e).toString(16)), Ul(Math.round(t).toString(16)), Ul(Math.round(n).toString(16)), Ul(Ufe(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 Ufe(e) { return Math.round(parseFloat(e) * 255).toString(16); } function hO(e) { return Po(e) / 255; } function Po(e) { return parseInt(e, 16); } function qfe(e) { return { r: e >> 16, g: (e & 65280) >> 8, b: e & 255 }; } var NC = { 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 Kfe(e) { var t = { r: 0, g: 0, b: 0 }, n = 1, r = null, o = null, a = null, i = !1, s = !1; return typeof e == "string" && (e = Yfe(e)), typeof e == "object" && (Li(e.r) && Li(e.g) && Li(e.b) ? (t = zfe(e.r, e.g, e.b), i = !0, s = String(e.r).substr(-1) === "%" ? "prgb" : "rgb") : Li(e.h) && Li(e.s) && Li(e.v) ? (r = Qh(e.s), o = Qh(e.v), t = Vfe(e.h, r, o), i = !0, s = "hsv") : Li(e.h) && Li(e.s) && Li(e.l) && (r = Qh(e.s), a = Qh(e.l), t = jfe(e.h, r, a), i = !0, s = "hsl"), Object.prototype.hasOwnProperty.call(e, "a") && (n = e.a)), n = YD(n), { ok: i, format: e.format || s, 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 Gfe = "[-\\+]?\\d+%?", Wfe = "[-\\+]?\\d*\\.\\d+%?", Us = "(?:".concat(Wfe, ")|(?:").concat(Gfe, ")"), ay = "[\\s|\\(]+(".concat(Us, ")[,|\\s]+(").concat(Us, ")[,|\\s]+(").concat(Us, ")\\s*\\)?"), iy = "[\\s|\\(]+(".concat(Us, ")[,|\\s]+(").concat(Us, ")[,|\\s]+(").concat(Us, ")[,|\\s]+(").concat(Us, ")\\s*\\)?"), $a = { CSS_UNIT: new RegExp(Us), rgb: new RegExp("rgb" + ay), rgba: new RegExp("rgba" + iy), hsl: new RegExp("hsl" + ay), hsla: new RegExp("hsla" + iy), hsv: new RegExp("hsv" + ay), hsva: new RegExp("hsva" + iy), 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 Yfe(e) { if (e = e.trim().toLowerCase(), e.length === 0) return !1; var t = !1; if (NC[e]) e = NC[e], t = !0; else if (e === "transparent") return { r: 0, g: 0, b: 0, a: 0, format: "name" }; var n = $a.rgb.exec(e); return n ? { r: n[1], g: n[2], b: n[3] } : (n = $a.rgba.exec(e), n ? { r: n[1], g: n[2], b: n[3], a: n[4] } : (n = $a.hsl.exec(e), n ? { h: n[1], s: n[2], l: n[3] } : (n = $a.hsla.exec(e), n ? { h: n[1], s: n[2], l: n[3], a: n[4] } : (n = $a.hsv.exec(e), n ? { h: n[1], s: n[2], v: n[3] } : (n = $a.hsva.exec(e), n ? { h: n[1], s: n[2], v: n[3], a: n[4] } : (n = $a.hex8.exec(e), n ? { r: Po(n[1]), g: Po(n[2]), b: Po(n[3]), a: hO(n[4]), format: t ? "name" : "hex8" } : (n = $a.hex6.exec(e), n ? { r: Po(n[1]), g: Po(n[2]), b: Po(n[3]), format: t ? "name" : "hex" } : (n = $a.hex4.exec(e), n ? { r: Po(n[1] + n[1]), g: Po(n[2] + n[2]), b: Po(n[3] + n[3]), a: hO(n[4] + n[4]), format: t ? "name" : "hex8" } : (n = $a.hex3.exec(e), n ? { r: Po(n[1] + n[1]), g: Po(n[2] + n[2]), b: Po(n[3] + n[3]), format: t ? "name" : "hex" } : !1))))))))); } function Li(e) { return !!$a.CSS_UNIT.exec(String(e)); } var Xfe = ( /** @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 = qfe(t)), this.originalInput = t; var o = Kfe(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, i = t.g / 255, s = t.b / 255; return a <= 0.03928 ? n = a / 12.92 : n = Math.pow((a + 0.055) / 1.055, 2.4), i <= 0.03928 ? r = i / 12.92 : r = Math.pow((i + 0.055) / 1.055, 2.4), s <= 0.03928 ? o = s / 12.92 : o = Math.pow((s + 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 = YD(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 = pO(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 = pO(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 = dO(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 = dO(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), fO(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), Hfe(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(Pr(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(Pr(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 = "#" + fO(this.r, this.g, this.b, !1), n = 0, r = Object.entries(NC); n < r.length; n++) { var o = r[n], a = o[0], i = o[1]; if (t === i) 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 = Jh(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 = Jh(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 = Jh(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 = Jh(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, i = { 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(i); }, 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, i = [], s = 1 / t; t--; ) i.push(new e({ h: r, s: o, v: a })), a = (a + s) % 1; return i; }, 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, i = 1; i < t; i++) o.push(new e({ h: (r + i * a) % 360, s: n.s, l: n.l })); return o; }, e.prototype.equals = function(t) { return this.toRgbString() === new e(t).toRgbString(); }, e; }() ); function Cs(e, t = 20) { return e.mix("#141414", t).toString(); } function Zfe(e) { const t = Xf(), n = Lt("button"); return E(() => { let r = {}, o = e.color; if (o) { const a = o.match(/var\((.*?)\)/); a && (o = window.getComputedStyle(window.document.documentElement).getPropertyValue(a[1])); const i = new Xfe(o), s = e.dark ? i.tint(20).toString() : Cs(i, 20); if (e.plain) r = n.cssVarBlock({ "bg-color": e.dark ? Cs(i, 90) : i.tint(90).toString(), "text-color": o, "border-color": e.dark ? Cs(i, 50) : i.tint(50).toString(), "hover-text-color": `var(${n.cssVarName("color-white")})`, "hover-bg-color": o, "hover-border-color": o, "active-bg-color": s, "active-text-color": `var(${n.cssVarName("color-white")})`, "active-border-color": s }), t.value && (r[n.cssVarBlockName("disabled-bg-color")] = e.dark ? Cs(i, 90) : i.tint(90).toString(), r[n.cssVarBlockName("disabled-text-color")] = e.dark ? Cs(i, 50) : i.tint(50).toString(), r[n.cssVarBlockName("disabled-border-color")] = e.dark ? Cs(i, 80) : i.tint(80).toString()); else { const l = e.dark ? Cs(i, 30) : i.tint(30).toString(), u = i.isDark() ? `var(${n.cssVarName("color-white")})` : `var(${n.cssVarName("color-black")})`; if (r = n.cssVarBlock({ "bg-color": o, "text-color": u, "border-color": o, "hover-bg-color": l, "hover-text-color": u, "hover-border-color": l, "active-bg-color": s, "active-border-color": s }), t.value) { const c = e.dark ? Cs(i, 50) : i.tint(50).toString(); r[n.cssVarBlockName("disabled-bg-color")] = c, 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")] = c; } } } return r; }); } const Jfe = W({ name: "ElButton" }), Qfe = /* @__PURE__ */ W({ ...Jfe, props: RC, emits: Mfe, setup(e, { expose: t, emit: n }) { const r = e, o = Zfe(r), a = Lt("button"), { _ref: i, _size: s, _type: l, _disabled: u, _props: c, shouldAddSpace: d, handleClick: p } = Lfe(r, n), h = E(() => [ a.b(), a.m(l.value), a.m(s.value), a.is("disabled", u.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: i, size: s, type: l, disabled: u, shouldAddSpace: d }), (f, v) => (S(), re(yt(f.tag), Et({ ref_key: "_ref", ref: i }, y(c), { class: y(h), style: y(o), onClick: y(p) }), { default: N(() => [ f.loading ? (S(), L(Re, { key: 0 }, [ f.$slots.loading ? ue(f.$slots, "loading", { key: 0 }) : (S(), re(y(mr), { key: 1, class: H(y(a).is("loading")) }, { default: N(() => [ (S(), re(yt(f.loadingIcon))) ]), _: 1 }, 8, ["class"])) ], 64)) : f.icon || f.$slots.icon ? (S(), re(y(mr), { key: 1 }, { default: N(() => [ f.icon ? (S(), re(yt(f.icon), { key: 0 })) : ue(f.$slots, "icon", { key: 1 }) ]), _: 3 })) : J("v-if", !0), f.$slots.default ? (S(), L("span", { key: 2, class: H({ [y(a).em("text", "expand")]: y(d) }) }, [ ue(f.$slots, "default") ], 2)) : J("v-if", !0) ]), _: 3 }, 16, ["class", "style", "onClick"])); } }); var ehe = /* @__PURE__ */ It(Qfe, [["__file", "button.vue"]]); const the = { size: RC.size, type: RC.type }, nhe = W({ name: "ElButtonGroup" }), rhe = /* @__PURE__ */ W({ ...nhe, props: the, setup(e) { const t = e; nt(WD, en({ size: St(t, "size"), type: St(t, "type") })); const n = Lt("button"); return (r, o) => (S(), L("div", { class: H(y(n).b("group")) }, [ ue(r.$slots, "default") ], 2)); } }); var XD = /* @__PURE__ */ It(rhe, [["__file", "button-group.vue"]]); const ua = _r(ehe, { ButtonGroup: XD }); hs(XD); var vp = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}; function ohe(e) { return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e; } const As = /* @__PURE__ */ new Map(); if (Jn) { let e; document.addEventListener("mousedown", (t) => e = t), document.addEventListener("mouseup", (t) => { if (e) { for (const n of As.values()) for (const { documentHandler: r } of n) r(t, e); e = void 0; } }); } function vO(e, t) { let n = []; return Array.isArray(t.arg) ? n = t.arg : Ql(t.arg) && n.push(t.arg), function(r, o) { const a = t.instance.popperRef, i = r.target, s = o == null ? void 0 : o.target, l = !t || !t.instance, u = !i || !s, c = e.contains(i) || e.contains(s), d = e === i, p = n.length && n.some((f) => f == null ? void 0 : f.contains(i)) || n.length && n.includes(s), h = a && (a.contains(i) || a.contains(s)); l || u || c || d || p || h || t.value(r, o); }; } const ZD = { beforeMount(e, t) { As.has(e) || As.set(e, []), As.get(e).push({ documentHandler: vO(e, t), bindingFn: t.value }); }, updated(e, t) { As.has(e) || As.set(e, []); const n = As.get(e), r = n.findIndex((a) => a.bindingFn === t.oldValue), o = { documentHandler: vO(e, t), bindingFn: t.value }; r >= 0 ? n.splice(r, 1, o) : n.push(o); }, unmounted(e) { As.delete(e); } }, ahe = ln({ header: { type: String, default: "" }, footer: { type: String, default: "" }, bodyStyle: { type: Ct([String, Object, Array]), default: "" }, bodyClass: String, shadow: { type: String, values: ["always", "hover", "never"], default: "always" } }), ihe = W({ name: "ElCard" }), she = /* @__PURE__ */ W({ ...ihe, props: ahe, setup(e) { const t = Lt("card"); return (n, r) => (S(), L("div", { class: H([y(t).b(), y(t).is(`${n.shadow}-shadow`)]) }, [ n.$slots.header || n.header ? (S(), L("div", { key: 0, class: H(y(t).e("header")) }, [ ue(n.$slots, "header", {}, () => [ Oe(ge(n.header), 1) ]) ], 2)) : J("v-if", !0), D("div", { class: H([y(t).e("body"), n.bodyClass]), style: Ye(n.bodyStyle) }, [ ue(n.$slots, "default") ], 6), n.$slots.footer || n.footer ? (S(), L("div", { key: 1, class: H(y(t).e("footer")) }, [ ue(n.$slots, "footer", {}, () => [ Oe(ge(n.footer), 1) ]) ], 2)) : J("v-if", !0) ], 2)); } }); var lhe = /* @__PURE__ */ It(she, [["__file", "card.vue"]]); _r(lhe); const JD = { 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: hd, tabindex: [String, Number], validateEvent: { type: Boolean, default: !0 }, ...bl(["ariaControls"]) }, QD = { [Or]: (e) => Gr(e) || Ar(e) || Bc(e), change: (e) => Gr(e) || Ar(e) || Bc(e) }, vd = Symbol("checkboxGroupContextKey"), uhe = ({ model: e, isChecked: t }) => { const n = be(vd, void 0), r = E(() => { var o, a; const i = (o = n == null ? void 0 : n.max) == null ? void 0 : o.value, s = (a = n == null ? void 0 : n.min) == null ? void 0 : a.value; return !Hs(i) && e.value.length >= i && !t.value || !Hs(s) && e.value.length <= s && t.value; }); return { isDisabled: Xf(E(() => (n == null ? void 0 : n.disabled.value) || r.value)), isLimitDisabled: r }; }, che = (e, { model: t, isLimitExceeded: n, hasOwnLabel: r, isDisabled: o, isLabeledByFormItem: a }) => { const i = be(vd, void 0), { formItem: s } = Lu(), { emit: l } = st(); function u(f) { var v, m, g, b; return [!0, e.trueValue, e.trueLabel].includes(f) ? (m = (v = e.trueValue) != null ? v : e.trueLabel) != null ? m : !0 : (b = (g = e.falseValue) != null ? g : e.falseLabel) != null ? b : !1; } function c(f, v) { l("change", u(f), v); } function d(f) { if (n.value) return; const v = f.target; l("change", u(v.checked), f); } async function p(f) { n.value || !r.value && !o.value && a.value && (f.composedPath().some((v) => v.tagName === "LABEL") || (t.value = u([!1, e.falseValue, e.falseLabel].includes(t.value)), await Ke(), c(t.value, f))); } const h = E(() => (i == null ? void 0 : i.validateEvent) || e.validateEvent); return he(() => e.modelValue, () => { h.value && (s == null || s.validate("change").catch((f) => Qn(f))); }), { handleChange: d, onClickRoot: p }; }, dhe = (e) => { const t = z(!1), { emit: n } = st(), r = be(vd, void 0), o = E(() => Hs(r) === !1), a = z(!1), i = E({ get() { var s, l; return o.value ? (s = r == null ? void 0 : r.modelValue) == null ? void 0 : s.value : (l = e.modelValue) != null ? l : t.value; }, set(s) { var l, u; o.value && vo(s) ? (a.value = ((l = r == null ? void 0 : r.max) == null ? void 0 : l.value) !== void 0 && s.length > (r == null ? void 0 : r.max.value) && s.length > i.value.length, a.value === !1 && ((u = r == null ? void 0 : r.changeEvent) == null || u.call(r, s))) : (n(Or, s), t.value = s); } }); return { model: i, isGroup: o, isLimitExceeded: a }; }, phe = (e, t, { model: n }) => { const r = be(vd, void 0), o = z(!1), a = E(() => Rg(e.value) ? e.label : e.value), i = E(() => { const c = n.value; return Bc(c) ? c : vo(c) ? Tr(a.value) ? c.map(ra).some((d) => Lg(d, a.value)) : c.map(ra).includes(a.value) : c != null ? c === e.trueValue || c === e.trueLabel : !!c; }), s = cu(E(() => { var c; return (c = r == null ? void 0 : r.size) == null ? void 0 : c.value; }), { prop: !0 }), l = cu(E(() => { var c; return (c = r == null ? void 0 : r.size) == null ? void 0 : c.value; })), u = E(() => !!t.default || !Rg(a.value)); return { checkboxButtonSize: s, isChecked: i, isFocused: o, checkboxSize: l, hasOwnLabel: u, actualValue: a }; }, eB = (e, t) => { const { formItem: n } = Lu(), { model: r, isGroup: o, isLimitExceeded: a } = dhe(e), { isFocused: i, isChecked: s, checkboxButtonSize: l, checkboxSize: u, hasOwnLabel: c, actualValue: d } = phe(e, t, { model: r }), { isDisabled: p } = uhe({ model: r, isChecked: s }), { inputId: h, isLabeledByFormItem: f } = Zf(e, { formItemContext: n, disableIdGeneration: c, disableIdManagement: o }), { handleChange: v, onClickRoot: m } = che(e, { model: r, isLimitExceeded: a, hasOwnLabel: c, isDisabled: p, isLabeledByFormItem: f }); return (() => { function g() { var b, x; vo(r.value) && !r.value.includes(d.value) ? r.value.push(d.value) : r.value = (x = (b = e.trueValue) != null ? b : e.trueLabel) != null ? x : !0; } e.checked && g(); })(), zv({ from: "label act as value", replacement: "value", version: "3.0.0", scope: "el-checkbox", ref: "https://element-plus.org/en-US/component/checkbox.html" }, E(() => o.value && Rg(e.value))), zv({ from: "true-label", replacement: "true-value", version: "3.0.0", scope: "el-checkbox", ref: "https://element-plus.org/en-US/component/checkbox.html" }, E(() => !!e.trueLabel)), zv({ from: "false-label", replacement: "false-value", version: "3.0.0", scope: "el-checkbox", ref: "https://element-plus.org/en-US/component/checkbox.html" }, E(() => !!e.falseLabel)), { inputId: h, isLabeledByFormItem: f, isChecked: s, isDisabled: p, isFocused: i, checkboxButtonSize: l, checkboxSize: u, hasOwnLabel: c, model: r, actualValue: d, handleChange: v, onClickRoot: m }; }, fhe = W({ name: "ElCheckbox" }), hhe = /* @__PURE__ */ W({ ...fhe, props: JD, emits: QD, setup(e) { const t = e, n = Dr(), { inputId: r, isLabeledByFormItem: o, isChecked: a, isDisabled: i, isFocused: s, checkboxSize: l, hasOwnLabel: u, model: c, actualValue: d, handleChange: p, onClickRoot: h } = eB(t, n), f = Lt("checkbox"), v = E(() => [ f.b(), f.m(l.value), f.is("disabled", i.value), f.is("bordered", t.border), f.is("checked", a.value) ]), m = E(() => [ f.e("input"), f.is("disabled", i.value), f.is("checked", a.value), f.is("indeterminate", t.indeterminate), f.is("focus", s.value) ]); return (g, b) => (S(), re(yt(!y(u) && y(o) ? "span" : "label"), { class: H(y(v)), "aria-controls": g.indeterminate ? g.ariaControls : null, onClick: y(h) }, { default: N(() => { var x, w, k, C; return [ D("span", { class: H(y(m)) }, [ g.trueValue || g.falseValue || g.trueLabel || g.falseLabel ? Be((S(), L("input", { key: 0, id: y(r), "onUpdate:modelValue": (_) => xn(c) ? c.value = _ : null, class: H(y(f).e("original")), type: "checkbox", indeterminate: g.indeterminate, name: g.name, tabindex: g.tabindex, disabled: y(i), "true-value": (w = (x = g.trueValue) != null ? x : g.trueLabel) != null ? w : !0, "false-value": (C = (k = g.falseValue) != null ? k : g.falseLabel) != null ? C : !1, onChange: y(p), onFocus: (_) => s.value = !0, onBlur: (_) => s.value = !1, onClick: Ge(() => { }, ["stop"]) }, null, 42, ["id", "onUpdate:modelValue", "indeterminate", "name", "tabindex", "disabled", "true-value", "false-value", "onChange", "onFocus", "onBlur", "onClick"])), [ [oa, y(c)] ]) : Be((S(), L("input", { key: 1, id: y(r), "onUpdate:modelValue": (_) => xn(c) ? c.value = _ : null, class: H(y(f).e("original")), type: "checkbox", indeterminate: g.indeterminate, disabled: y(i), value: y(d), name: g.name, tabindex: g.tabindex, onChange: y(p), onFocus: (_) => s.value = !0, onBlur: (_) => s.value = !1, onClick: Ge(() => { }, ["stop"]) }, null, 42, ["id", "onUpdate:modelValue", "indeterminate", "disabled", "value", "name", "tabindex", "onChange", "onFocus", "onBlur", "onClick"])), [ [oa, y(c)] ]), D("span", { class: H(y(f).e("inner")) }, null, 2) ], 2), y(u) ? (S(), L("span", { key: 0, class: H(y(f).e("label")) }, [ ue(g.$slots, "default"), g.$slots.default ? J("v-if", !0) : (S(), L(Re, { key: 0 }, [ Oe(ge(g.label), 1) ], 64)) ], 2)) : J("v-if", !0) ]; }), _: 3 }, 8, ["class", "aria-controls", "onClick"])); } }); var vhe = /* @__PURE__ */ It(hhe, [["__file", "checkbox.vue"]]); const ghe = W({ name: "ElCheckboxButton" }), mhe = /* @__PURE__ */ W({ ...ghe, props: JD, emits: QD, setup(e) { const t = e, n = Dr(), { isFocused: r, isChecked: o, isDisabled: a, checkboxButtonSize: i, model: s, actualValue: l, handleChange: u } = eB(t, n), c = be(vd, void 0), d = Lt("checkbox"), p = E(() => { var f, v, m, g; const b = (v = (f = c == null ? void 0 : c.fill) == null ? void 0 : f.value) != null ? v : ""; return { backgroundColor: b, borderColor: b, color: (g = (m = c == null ? void 0 : c.textColor) == null ? void 0 : m.value) != null ? g : "", boxShadow: b ? `-1px 0 0 0 ${b}` : void 0 }; }), h = E(() => [ d.b("button"), d.bm("button", i.value), d.is("disabled", a.value), d.is("checked", o.value), d.is("focus", r.value) ]); return (f, v) => { var m, g, b, x; return S(), L("label", { class: H(y(h)) }, [ f.trueValue || f.falseValue || f.trueLabel || f.falseLabel ? Be((S(), L("input", { key: 0, "onUpdate:modelValue": (w) => xn(s) ? s.value = w : null, class: H(y(d).be("button", "original")), type: "checkbox", name: f.name, tabindex: f.tabindex, disabled: y(a), "true-value": (g = (m = f.trueValue) != null ? m : f.trueLabel) != null ? g : !0, "false-value": (x = (b = f.falseValue) != null ? b : f.falseLabel) != null ? x : !1, onChange: y(u), onFocus: (w) => r.value = !0, onBlur: (w) => r.value = !1, onClick: Ge(() => { }, ["stop"]) }, null, 42, ["onUpdate:modelValue", "name", "tabindex", "disabled", "true-value", "false-value", "onChange", "onFocus", "onBlur", "onClick"])), [ [oa, y(s)] ]) : Be((S(), L("input", { key: 1, "onUpdate:modelValue": (w) => xn(s) ? s.value = w : null, class: H(y(d).be("button", "original")), type: "checkbox", name: f.name, tabindex: f.tabindex, disabled: y(a), value: y(l), onChange: y(u), onFocus: (w) => r.value = !0, onBlur: (w) => r.value = !1, onClick: Ge(() => { }, ["stop"]) }, null, 42, ["onUpdate:modelValue", "name", "tabindex", "disabled", "value", "onChange", "onFocus", "onBlur", "onClick"])), [ [oa, y(s)] ]), f.$slots.default || f.label ? (S(), L("span", { key: 2, class: H(y(d).be("button", "inner")), style: Ye(y(o) ? y(p) : void 0) }, [ ue(f.$slots, "default", {}, () => [ Oe(ge(f.label), 1) ]) ], 6)) : J("v-if", !0) ], 2); }; } }); var tB = /* @__PURE__ */ It(mhe, [["__file", "checkbox-button.vue"]]); const yhe = ln({ modelValue: { type: Ct(Array), default: () => [] }, disabled: Boolean, min: Number, max: Number, size: hd, fill: String, textColor: String, tag: { type: String, default: "div" }, validateEvent: { type: Boolean, default: !0 }, ...bl(["ariaLabel"]) }), bhe = { [Or]: (e) => vo(e), change: (e) => vo(e) }, whe = W({ name: "ElCheckboxGroup" }), xhe = /* @__PURE__ */ W({ ...whe, props: yhe, emits: bhe, setup(e, { emit: t }) { const n = e, r = Lt("checkbox"), { formItem: o } = Lu(), { inputId: a, isLabeledByFormItem: i } = Zf(n, { formItemContext: o }), s = async (u) => { t(Or, u), await Ke(), t("change", u); }, l = E({ get() { return n.modelValue; }, set(u) { s(u); } }); return nt(vd, { ...dD(Cr(n), [ "size", "min", "max", "disabled", "validateEvent", "fill", "textColor" ]), modelValue: l, changeEvent: s }), he(() => n.modelValue, () => { n.validateEvent && (o == null || o.validate("change").catch((u) => Qn(u))); }), (u, c) => { var d; return S(), re(yt(u.tag), { id: y(a), class: H(y(r).b("group")), role: "group", "aria-label": y(i) ? void 0 : u.ariaLabel || "checkbox-group", "aria-labelledby": y(i) ? (d = y(o)) == null ? void 0 : d.labelId : void 0 }, { default: N(() => [ ue(u.$slots, "default") ]), _: 3 }, 8, ["id", "class", "aria-label", "aria-labelledby"]); }; } }); var nB = /* @__PURE__ */ It(xhe, [["__file", "checkbox-group.vue"]]); const khe = _r(vhe, { CheckboxButton: tB, CheckboxGroup: nB }); hs(tB); hs(nB); const MC = ln({ type: { type: String, values: ["primary", "success", "info", "warning", "danger"], default: "primary" }, closable: Boolean, disableTransitions: Boolean, hit: Boolean, color: String, size: { type: String, values: gD }, effect: { type: String, values: ["dark", "light", "plain"], default: "light" }, round: Boolean }), Che = { close: (e) => e instanceof MouseEvent, click: (e) => e instanceof MouseEvent }, _he = W({ name: "ElTag" }), She = /* @__PURE__ */ W({ ..._he, props: MC, emits: Che, setup(e, { emit: t }) { const n = e, r = cu(), o = Lt("tag"), a = E(() => { const { type: u, hit: c, effect: d, closable: p, round: h } = n; return [ o.b(), o.is("closable", p), o.m(u || "primary"), o.m(r.value), o.m(d), o.is("hit", c), o.is("round", h) ]; }), i = (u) => { t("close", u); }, s = (u) => { t("click", u); }, l = (u) => { u.component.subTree.component.bum = null; }; return (u, c) => u.disableTransitions ? (S(), L("span", { key: 0, class: H(y(a)), style: Ye({ backgroundColor: u.color }), onClick: s }, [ D("span", { class: H(y(o).e("content")) }, [ ue(u.$slots, "default") ], 2), u.closable ? (S(), re(y(mr), { key: 0, class: H(y(o).e("close")), onClick: Ge(i, ["stop"]) }, { default: N(() => [ q(y(Bo)) ]), _: 1 }, 8, ["class", "onClick"])) : J("v-if", !0) ], 6)) : (S(), re(nr, { key: 1, name: `${y(o).namespace.value}-zoom-in-center`, appear: "", onVnodeMounted: l }, { default: N(() => [ D("span", { class: H(y(a)), style: Ye({ backgroundColor: u.color }), onClick: s }, [ D("span", { class: H(y(o).e("content")) }, [ ue(u.$slots, "default") ], 2), u.closable ? (S(), re(y(mr), { key: 0, class: H(y(o).e("close")), onClick: Ge(i, ["stop"]) }, { default: N(() => [ q(y(Bo)) ]), _: 1 }, 8, ["class", "onClick"])) : J("v-if", !0) ], 6) ]), _: 3 }, 8, ["name"])); } }); var $he = /* @__PURE__ */ It(She, [["__file", "tag.vue"]]); const Ehe = _r($he), rB = Symbol("rowContextKey"), Ohe = [ "start", "center", "end", "space-around", "space-between", "space-evenly" ], Fhe = ["top", "middle", "bottom"], The = ln({ tag: { type: String, default: "div" }, gutter: { type: Number, default: 0 }, justify: { type: String, values: Ohe, default: "start" }, align: { type: String, values: Fhe } }), Ahe = W({ name: "ElRow" }), Ihe = /* @__PURE__ */ W({ ...Ahe, props: The, setup(e) { const t = e, n = Lt("row"), r = E(() => t.gutter); nt(rB, { gutter: r }); const o = E(() => { const i = {}; return t.gutter && (i.marginRight = i.marginLeft = `-${t.gutter / 2}px`), i; }), a = E(() => [ n.b(), n.is(`justify-${t.justify}`, t.justify !== "start"), n.is(`align-${t.align}`, !!t.align) ]); return (i, s) => (S(), re(yt(i.tag), { class: H(y(a)), style: Ye(y(o)) }, { default: N(() => [ ue(i.$slots, "default") ]), _: 3 }, 8, ["class", "style"])); } }); var Phe = /* @__PURE__ */ It(Ihe, [["__file", "row.vue"]]); const oB = _r(Phe), Lhe = ln({ 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: Ct([Number, Object]), default: () => vc({}) }, sm: { type: Ct([Number, Object]), default: () => vc({}) }, md: { type: Ct([Number, Object]), default: () => vc({}) }, lg: { type: Ct([Number, Object]), default: () => vc({}) }, xl: { type: Ct([Number, Object]), default: () => vc({}) } }), Rhe = W({ name: "ElCol" }), Nhe = /* @__PURE__ */ W({ ...Rhe, props: Lhe, setup(e) { const t = e, { gutter: n } = be(rB, { gutter: E(() => 0) }), r = Lt("col"), o = E(() => { const i = {}; return n.value && (i.paddingLeft = i.paddingRight = `${n.value / 2}px`), i; }), a = E(() => { const i = []; return ["span", "offset", "pull", "push"].forEach((s) => { const l = t[s]; Ar(l) && (s === "span" ? i.push(r.b(`${t[s]}`)) : l > 0 && i.push(r.b(`${s}-${t[s]}`))); }), ["xs", "sm", "md", "lg", "xl"].forEach((s) => { Ar(t[s]) ? i.push(r.b(`${s}-${t[s]}`)) : Tr(t[s]) && Object.entries(t[s]).forEach(([l, u]) => { i.push(l !== "span" ? r.b(`${s}-${l}-${u}`) : r.b(`${s}-${u}`)); }); }), n.value && i.push(r.is("guttered")), [r.b(), i]; }); return (i, s) => (S(), re(yt(i.tag), { class: H(y(a)), style: Ye(y(o)) }, { default: N(() => [ ue(i.$slots, "default") ]), _: 3 }, 8, ["class", "style"])); } }); var Mhe = /* @__PURE__ */ It(Nhe, [["__file", "col.vue"]]); const a$ = _r(Mhe), Dhe = W({ name: "ElCollapseTransition" }), Bhe = /* @__PURE__ */ W({ ...Dhe, setup(e) { const t = Lt("collapse-transition"), n = (o) => { o.style.maxHeight = "", o.style.overflow = o.dataset.oldOverflow, o.style.paddingTop = o.dataset.oldPaddingTop, o.style.paddingBottom = o.dataset.oldPaddingBottom; }, r = { beforeEnter(o) { o.dataset || (o.dataset = {}), o.dataset.oldPaddingTop = o.style.paddingTop, o.dataset.oldPaddingBottom = o.style.paddingBottom, o.style.height && (o.dataset.elExistsHeight = o.style.height), o.style.maxHeight = 0, o.style.paddingTop = 0, o.style.paddingBottom = 0; }, enter(o) { requestAnimationFrame(() => { o.dataset.oldOverflow = o.style.overflow, o.dataset.elExistsHeight ? o.style.maxHeight = o.dataset.elExistsHeight : o.scrollHeight !== 0 ? o.style.maxHeight = `${o.scrollHeight}px` : o.style.maxHeight = 0, o.style.paddingTop = o.dataset.oldPaddingTop, o.style.paddingBottom = o.dataset.oldPaddingBottom, o.style.overflow = "hidden"; }); }, afterEnter(o) { o.style.maxHeight = "", o.style.overflow = o.dataset.oldOverflow; }, enterCancelled(o) { n(o); }, beforeLeave(o) { o.dataset || (o.dataset = {}), o.dataset.oldPaddingTop = o.style.paddingTop, o.dataset.oldPaddingBottom = o.style.paddingBottom, o.dataset.oldOverflow = o.style.overflow, o.style.maxHeight = `${o.scrollHeight}px`, o.style.overflow = "hidden"; }, leave(o) { o.scrollHeight !== 0 && (o.style.maxHeight = 0, o.style.paddingTop = 0, o.style.paddingBottom = 0); }, afterLeave(o) { n(o); }, leaveCancelled(o) { n(o); } }; return (o, a) => (S(), re(nr, Et({ name: y(t).b() }, M9(r)), { default: N(() => [ ue(o.$slots, "default") ]), _: 3 }, 16, ["name"])); } }); var zhe = /* @__PURE__ */ It(Bhe, [["__file", "collapse-transition.vue"]]); const jhe = _r(zhe), Vhe = ln({ color: { type: Ct(Object), required: !0 }, vertical: { type: Boolean, default: !1 } }); let sy = !1; function rf(e, t) { if (!Jn) return; const n = function(a) { var i; (i = t.drag) == null || i.call(t, a); }, r = function(a) { var i; document.removeEventListener("mousemove", n), document.removeEventListener("mouseup", r), document.removeEventListener("touchmove", n), document.removeEventListener("touchend", r), document.onselectstart = null, document.ondragstart = null, sy = !1, (i = t.end) == null || i.call(t, a); }, o = function(a) { var i; sy || (a.preventDefault(), document.onselectstart = () => !1, document.ondragstart = () => !1, document.addEventListener("mousemove", n), document.addEventListener("mouseup", r), document.addEventListener("touchmove", n), document.addEventListener("touchend", r), sy = !0, (i = t.start) == null || i.call(t, a)); }; e.addEventListener("mousedown", o), e.addEventListener("touchstart", o, { passive: !1 }); } const Hhe = (e) => { const t = st(), { t: n } = Gf(), r = En(), o = En(), a = E(() => e.color.get("alpha")), i = E(() => n("el.colorpicker.alphaLabel")); function s(d) { var p; d.target !== r.value && l(d), (p = r.value) == null || p.focus(); } function l(d) { if (!o.value || !r.value) return; const p = t.vnode.el.getBoundingClientRect(), { clientX: h, clientY: f } = PS(d); if (e.vertical) { let v = f - p.top; v = Math.max(r.value.offsetHeight / 2, v), v = Math.min(v, p.height - r.value.offsetHeight / 2), e.color.set("alpha", Math.round((v - r.value.offsetHeight / 2) / (p.height - r.value.offsetHeight) * 100)); } else { let v = h - p.left; v = Math.max(r.value.offsetWidth / 2, v), v = Math.min(v, p.width - r.value.offsetWidth / 2), e.color.set("alpha", Math.round((v - r.value.offsetWidth / 2) / (p.width - r.value.offsetWidth) * 100)); } } function u(d) { const { code: p, shiftKey: h } = d, f = h ? 10 : 1; switch (p) { case sr.left: case sr.down: d.preventDefault(), d.stopPropagation(), c(-f); break; case sr.right: case sr.up: d.preventDefault(), d.stopPropagation(), c(f); break; } } function c(d) { let p = a.value + d; p = p < 0 ? 0 : p > 100 ? 100 : p, e.color.set("alpha", p); } return { thumb: r, bar: o, alpha: a, alphaLabel: i, handleDrag: l, handleClick: s, handleKeydown: u }; }, Uhe = (e, { bar: t, thumb: n, handleDrag: r }) => { const o = st(), a = Lt("color-alpha-slider"), i = z(0), s = z(0), l = z(); function u() { if (!n.value || e.vertical) return 0; const b = o.vnode.el, x = e.color.get("alpha"); return b ? Math.round(x * (b.offsetWidth - n.value.offsetWidth / 2) / 100) : 0; } function c() { if (!n.value) return 0; const b = o.vnode.el; if (!e.vertical) return 0; const x = e.color.get("alpha"); return b ? Math.round(x * (b.offsetHeight - n.value.offsetHeight / 2) / 100) : 0; } function d() { if (e.color && e.color.value) { const { r: b, g: x, b: w } = e.color.toRgb(); return `linear-gradient(to right, rgba(${b}, ${x}, ${w}, 0) 0%, rgba(${b}, ${x}, ${w}, 1) 100%)`; } return ""; } function p() { i.value = u(), s.value = c(), l.value = d(); } ut(() => { if (!t.value || !n.value) return; const b = { drag: (x) => { r(x); }, end: (x) => { r(x); } }; rf(t.value, b), rf(n.value, b), p(); }), he(() => e.color.get("alpha"), () => p()), he(() => e.color.value, () => p()); const h = E(() => [a.b(), a.is("vertical", e.vertical)]), f = E(() => a.e("bar")), v = E(() => a.e("thumb")), m = E(() => ({ background: l.value })), g = E(() => ({ left: zc(i.value), top: zc(s.value) })); return { rootKls: h, barKls: f, barStyle: m, thumbKls: v, thumbStyle: g, update: p }; }, qhe = "ElColorAlphaSlider", Khe = W({ name: qhe }), Ghe = /* @__PURE__ */ W({ ...Khe, props: Vhe, setup(e, { expose: t }) { const n = e, { alpha: r, alphaLabel: o, bar: a, thumb: i, handleDrag: s, handleClick: l, handleKeydown: u } = Hhe(n), { rootKls: c, barKls: d, barStyle: p, thumbKls: h, thumbStyle: f, update: v } = Uhe(n, { bar: a, thumb: i, handleDrag: s }); return t({ update: v, bar: a, thumb: i }), (m, g) => (S(), L("div", { class: H(y(c)) }, [ D("div", { ref_key: "bar", ref: a, class: H(y(d)), style: Ye(y(p)), onClick: y(l) }, null, 14, ["onClick"]), D("div", { ref_key: "thumb", ref: i, class: H(y(h)), style: Ye(y(f)), "aria-label": y(o), "aria-valuenow": y(r), "aria-orientation": m.vertical ? "vertical" : "horizontal", "aria-valuemin": "0", "aria-valuemax": "100", role: "slider", tabindex: "0", onKeydown: y(u) }, null, 46, ["aria-label", "aria-valuenow", "aria-orientation", "onKeydown"]) ], 2)); } }); var Whe = /* @__PURE__ */ It(Ghe, [["__file", "alpha-slider.vue"]]); const Yhe = W({ name: "ElColorHueSlider", props: { color: { type: Object, required: !0 }, vertical: Boolean }, setup(e) { const t = Lt("color-hue-slider"), n = st(), r = z(), o = z(), a = z(0), i = z(0), s = E(() => e.color.get("hue")); he(() => s.value, () => { p(); }); function l(h) { h.target !== r.value && u(h); } function u(h) { if (!o.value || !r.value) return; const f = n.vnode.el.getBoundingClientRect(), { clientX: v, clientY: m } = PS(h); let g; if (e.vertical) { let b = m - f.top; b = Math.min(b, f.height - r.value.offsetHeight / 2), b = Math.max(r.value.offsetHeight / 2, b), g = Math.round((b - r.value.offsetHeight / 2) / (f.height - r.value.offsetHeight) * 360); } else { let b = v - f.left; b = Math.min(b, f.width - r.value.offsetWidth / 2), b = Math.max(r.value.offsetWidth / 2, b), g = Math.round((b - r.value.offsetWidth / 2) / (f.width - r.value.offsetWidth) * 360); } e.color.set("hue", g); } function c() { if (!r.value) return 0; const h = n.vnode.el; if (e.vertical) return 0; const f = e.color.get("hue"); return h ? Math.round(f * (h.offsetWidth - r.value.offsetWidth / 2) / 360) : 0; } function d() { if (!r.value) return 0; const h = n.vnode.el; if (!e.vertical) return 0; const f = e.color.get("hue"); return h ? Math.round(f * (h.offsetHeight - r.value.offsetHeight / 2) / 360) : 0; } function p() { a.value = c(), i.value = d(); } return ut(() => { if (!o.value || !r.value) return; const h = { drag: (f) => { u(f); }, end: (f) => { u(f); } }; rf(o.value, h), rf(r.value, h), p(); }), { bar: o, thumb: r, thumbLeft: a, thumbTop: i, hueValue: s, handleClick: l, update: p, ns: t }; } }); function Xhe(e, t, n, r, o, a) { return S(), L("div", { class: H([e.ns.b(), e.ns.is("vertical", e.vertical)]) }, [ D("div", { ref: "bar", class: H(e.ns.e("bar")), onClick: e.handleClick }, null, 10, ["onClick"]), D("div", { ref: "thumb", class: H(e.ns.e("thumb")), style: Ye({ left: e.thumbLeft + "px", top: e.thumbTop + "px" }) }, null, 6) ], 2); } var Zhe = /* @__PURE__ */ It(Yhe, [["render", Xhe], ["__file", "hue-slider.vue"]]); const Jhe = ln({ modelValue: String, id: String, showAlpha: Boolean, colorFormat: String, disabled: Boolean, size: hd, popperClass: { type: String, default: "" }, tabindex: { type: [String, Number], default: 0 }, teleported: po.teleported, predefine: { type: Ct(Array) }, validateEvent: { type: Boolean, default: !0 }, ...bl(["ariaLabel"]) }), Qhe = { [Or]: (e) => Gr(e) || Ws(e), [jS]: (e) => Gr(e) || Ws(e), activeChange: (e) => Gr(e) || Ws(e), focus: (e) => e instanceof FocusEvent, blur: (e) => e instanceof FocusEvent }, aB = Symbol("colorPickerContextKey"), gO = function(e, t, n) { return [ e, t * n / ((e = (2 - t) * n) < 1 ? e : 2 - e) || 0, e / 2 ]; }, eve = function(e) { return typeof e == "string" && e.includes(".") && Number.parseFloat(e) === 1; }, tve = function(e) { return typeof e == "string" && e.includes("%"); }, Cc = function(e, t) { eve(e) && (e = "100%"); const n = tve(e); return e = Math.min(t, Math.max(0, Number.parseFloat(`${e}`))), n && (e = Number.parseInt(`${e * t}`, 10) / 100), Math.abs(e - t) < 1e-6 ? 1 : e % t / Number.parseFloat(t); }, mO = { 10: "A", 11: "B", 12: "C", 13: "D", 14: "E", 15: "F" }, Hv = (e) => { e = Math.min(Math.round(e), 255); const t = Math.floor(e / 16), n = e % 16; return `${mO[t] || t}${mO[n] || n}`; }, yO = function({ r: e, g: t, b: n }) { return Number.isNaN(+e) || Number.isNaN(+t) || Number.isNaN(+n) ? "" : `#${Hv(e)}${Hv(t)}${Hv(n)}`; }, ly = { A: 10, B: 11, C: 12, D: 13, E: 14, F: 15 }, Ll = function(e) { return e.length === 2 ? (ly[e[0].toUpperCase()] || +e[0]) * 16 + (ly[e[1].toUpperCase()] || +e[1]) : ly[e[1].toUpperCase()] || +e[1]; }, nve = function(e, t, n) { t = t / 100, n = n / 100; let r = t; const o = Math.max(n, 0.01); n *= 2, t *= n <= 1 ? n : 2 - n, r *= o <= 1 ? o : 2 - o; const a = (n + t) / 2, i = n === 0 ? 2 * r / (o + r) : 2 * t / (n + t); return { h: e, s: i * 100, v: a * 100 }; }, bO = (e, t, n) => { e = Cc(e, 255), t = Cc(t, 255), n = Cc(n, 255); const r = Math.max(e, t, n), o = Math.min(e, t, n); let a; const i = r, s = r - o, l = r === 0 ? 0 : s / r; if (r === o) a = 0; else { switch (r) { case e: { a = (t - n) / s + (t < n ? 6 : 0); break; } case t: { a = (n - e) / s + 2; break; } case n: { a = (e - t) / s + 4; break; } } a /= 6; } return { h: a * 360, s: l * 100, v: i * 100 }; }, Jd = function(e, t, n) { e = Cc(e, 360) * 6, t = Cc(t, 100), n = Cc(n, 100); const r = Math.floor(e), o = e - r, a = n * (1 - t), i = n * (1 - o * t), s = n * (1 - (1 - o) * t), l = r % 6, u = [n, i, a, a, s, n][l], c = [s, n, n, i, a, a][l], d = [a, a, s, n, n, i][l]; return { r: Math.round(u * 255), g: Math.round(c * 255), b: Math.round(d * 255) }; }; class Ap { constructor(t = {}) { this._hue = 0, this._saturation = 100, this._value = 100, this._alpha = 100, this.enableAlpha = !1, this.format = "hex", this.value = ""; for (const n in t) lu(t, n) && (this[n] = t[n]); t.value ? this.fromString(t.value) : this.doOnChange(); } set(t, n) { if (arguments.length === 1 && typeof t == "object") { for (const r in t) lu(t, r) && this.set(r, t[r]); return; } this[`_${t}`] = n, this.doOnChange(); } get(t) { return t === "alpha" ? Math.floor(this[`_${t}`]) : this[`_${t}`]; } toRgb() { return Jd(this._hue, this._saturation, this._value); } fromString(t) { if (!t) { this._hue = 0, this._saturation = 100, this._value = 100, this.doOnChange(); return; } const n = (r, o, a) => { this._hue = Math.max(0, Math.min(360, r)), this._saturation = Math.max(0, Math.min(100, o)), this._value = Math.max(0, Math.min(100, a)), this.doOnChange(); }; if (t.includes("hsl")) { const r = t.replace(/hsla|hsl|\(|\)/gm, "").split(/\s|,/g).filter((o) => o !== "").map((o, a) => a > 2 ? Number.parseFloat(o) : Number.parseInt(o, 10)); if (r.length === 4 ? this._alpha = Number.parseFloat(r[3]) * 100 : r.length === 3 && (this._alpha = 100), r.length >= 3) { const { h: o, s: a, v: i } = nve(r[0], r[1], r[2]); n(o, a, i); } } else if (t.includes("hsv")) { const r = t.replace(/hsva|hsv|\(|\)/gm, "").split(/\s|,/g).filter((o) => o !== "").map((o, a) => a > 2 ? Number.parseFloat(o) : Number.parseInt(o, 10)); r.length === 4 ? this._alpha = Number.parseFloat(r[3]) * 100 : r.length === 3 && (this._alpha = 100), r.length >= 3 && n(r[0], r[1], r[2]); } else if (t.includes("rgb")) { const r = t.replace(/rgba|rgb|\(|\)/gm, "").split(/\s|,/g).filter((o) => o !== "").map((o, a) => a > 2 ? Number.parseFloat(o) : Number.parseInt(o, 10)); if (r.length === 4 ? this._alpha = Number.parseFloat(r[3]) * 100 : r.length === 3 && (this._alpha = 100), r.length >= 3) { const { h: o, s: a, v: i } = bO(r[0], r[1], r[2]); n(o, a, i); } } else if (t.includes("#")) { const r = t.replace("#", "").trim(); if (!/^[0-9a-fA-F]{3}$|^[0-9a-fA-F]{6}$|^[0-9a-fA-F]{8}$/.test(r)) return; let o, a, i; r.length === 3 ? (o = Ll(r[0] + r[0]), a = Ll(r[1] + r[1]), i = Ll(r[2] + r[2])) : (r.length === 6 || r.length === 8) && (o = Ll(r.slice(0, 2)), a = Ll(r.slice(2, 4)), i = Ll(r.slice(4, 6))), r.length === 8 ? this._alpha = Ll(r.slice(6)) / 255 * 100 : (r.length === 3 || r.length === 6) && (this._alpha = 100); const { h: s, s: l, v: u } = bO(o, a, i); n(s, l, u); } } compare(t) { return Math.abs(t._hue - this._hue) < 2 && Math.abs(t._saturation - this._saturation) < 1 && Math.abs(t._value - this._value) < 1 && Math.abs(t._alpha - this._alpha) < 1; } doOnChange() { const { _hue: t, _saturation: n, _value: r, _alpha: o, format: a } = this; if (this.enableAlpha) switch (a) { case "hsl": { const i = gO(t, n / 100, r / 100); this.value = `hsla(${t}, ${Math.round(i[1] * 100)}%, ${Math.round(i[2] * 100)}%, ${this.get("alpha") / 100})`; break; } case "hsv": { this.value = `hsva(${t}, ${Math.round(n)}%, ${Math.round(r)}%, ${this.get("alpha") / 100})`; break; } case "hex": { this.value = `${yO(Jd(t, n, r))}${Hv(o * 255 / 100)}`; break; } default: { const { r: i, g: s, b: l } = Jd(t, n, r); this.value = `rgba(${i}, ${s}, ${l}, ${this.get("alpha") / 100})`; } } else switch (a) { case "hsl": { const i = gO(t, n / 100, r / 100); this.value = `hsl(${t}, ${Math.round(i[1] * 100)}%, ${Math.round(i[2] * 100)}%)`; break; } case "hsv": { this.value = `hsv(${t}, ${Math.round(n)}%, ${Math.round(r)}%)`; break; } case "rgb": { const { r: i, g: s, b: l } = Jd(t, n, r); this.value = `rgb(${i}, ${s}, ${l})`; break; } default: this.value = yO(Jd(t, n, r)); } } } const rve = W({ props: { colors: { type: Array, required: !0 }, color: { type: Object, required: !0 }, enableAlpha: { type: Boolean, required: !0 } }, setup(e) { const t = Lt("color-predefine"), { currentColor: n } = be(aB), r = z(a(e.colors, e.color)); he(() => n.value, (i) => { const s = new Ap(); s.fromString(i), r.value.forEach((l) => { l.selected = s.compare(l); }); }), Mf(() => { r.value = a(e.colors, e.color); }); function o(i) { e.color.fromString(e.colors[i]); } function a(i, s) { return i.map((l) => { const u = new Ap(); return u.enableAlpha = e.enableAlpha, u.format = "rgba", u.fromString(l), u.selected = u.value === s.value, u; }); } return { rgbaColors: r, handleSelect: o, ns: t }; } }); function ove(e, t, n, r, o, a) { return S(), L("div", { class: H(e.ns.b()) }, [ D("div", { class: H(e.ns.e("colors")) }, [ (S(!0), L(Re, null, mt(e.rgbaColors, (i, s) => (S(), L("div", { key: e.colors[s], class: H([ e.ns.e("color-selector"), e.ns.is("alpha", i._alpha < 100), { selected: i.selected } ]), onClick: (l) => e.handleSelect(s) }, [ D("div", { style: Ye({ backgroundColor: i.value }) }, null, 4) ], 10, ["onClick"]))), 128)) ], 2) ], 2); } var ave = /* @__PURE__ */ It(rve, [["render", ove], ["__file", "predefine.vue"]]); const ive = W({ name: "ElSlPanel", props: { color: { type: Object, required: !0 } }, setup(e) { const t = Lt("color-svpanel"), n = st(), r = z(0), o = z(0), a = z("hsl(0, 100%, 50%)"), i = E(() => { const u = e.color.get("hue"), c = e.color.get("value"); return { hue: u, value: c }; }); function s() { const u = e.color.get("saturation"), c = e.color.get("value"), d = n.vnode.el, { clientWidth: p, clientHeight: h } = d; o.value = u * p / 100, r.value = (100 - c) * h / 100, a.value = `hsl(${e.color.get("hue")}, 100%, 50%)`; } function l(u) { const c = n.vnode.el.getBoundingClientRect(), { clientX: d, clientY: p } = PS(u); let h = d - c.left, f = p - c.top; h = Math.max(0, h), h = Math.min(h, c.width), f = Math.max(0, f), f = Math.min(f, c.height), o.value = h, r.value = f, e.color.set({ saturation: h / c.width * 100, value: 100 - f / c.height * 100 }); } return he(() => i.value, () => { s(); }), ut(() => { rf(n.vnode.el, { drag: (u) => { l(u); }, end: (u) => { l(u); } }), s(); }), { cursorTop: r, cursorLeft: o, background: a, colorValue: i, handleDrag: l, update: s, ns: t }; } }); function sve(e, t, n, r, o, a) { return S(), L("div", { class: H(e.ns.b()), style: Ye({ backgroundColor: e.background }) }, [ D("div", { class: H(e.ns.e("white")) }, null, 2), D("div", { class: H(e.ns.e("black")) }, null, 2), D("div", { class: H(e.ns.e("cursor")), style: Ye({ top: e.cursorTop + "px", left: e.cursorLeft + "px" }) }, [ D("div") ], 6) ], 6); } var lve = /* @__PURE__ */ It(ive, [["render", sve], ["__file", "sv-panel.vue"]]); const uve = W({ name: "ElColorPicker" }), cve = /* @__PURE__ */ W({ ...uve, props: Jhe, emits: Qhe, setup(e, { expose: t, emit: n }) { const r = e, { t: o } = Gf(), a = Lt("color"), { formItem: i } = Lu(), s = cu(), l = Xf(), { inputId: u, isLabeledByFormItem: c } = Zf(r, { formItemContext: i }), d = z(), p = z(), h = z(), f = z(), v = z(), m = z(), { isFocused: g, handleFocus: b, handleBlur: x } = ZS(v, { beforeFocus() { return l.value; }, beforeBlur(le) { var pe; return (pe = f.value) == null ? void 0 : pe.isFocusInsideContent(le); }, afterBlur() { j(!1), G(); } }); let w = !0; const k = en(new Ap({ enableAlpha: r.showAlpha, format: r.colorFormat || "", value: r.modelValue })), C = z(!1), _ = z(!1), $ = z(""), O = E(() => !r.modelValue && !_.value ? "transparent" : M(k, r.showAlpha)), F = E(() => !r.modelValue && !_.value ? "" : k.value), A = E(() => c.value ? void 0 : r.ariaLabel || o("el.colorpicker.defaultLabel")), T = E(() => c.value ? i == null ? void 0 : i.labelId : void 0), R = E(() => [ a.b("picker"), a.is("disabled", l.value), a.bm("picker", s.value), a.is("focused", g.value) ]); function M(le, pe) { if (!(le instanceof Ap)) throw new TypeError("color should be instance of _color Class"); const { r: ke, g: Ne, b: De } = le.toRgb(); return pe ? `rgba(${ke}, ${Ne}, ${De}, ${le.get("alpha") / 100})` : `rgb(${ke}, ${Ne}, ${De})`; } function j(le) { C.value = le; } const P = cD(j, 100, { leading: !0 }); function V() { l.value || j(!0); } function U() { P(!1), G(); } function G() { Ke(() => { r.modelValue ? k.fromString(r.modelValue) : (k.value = "", Ke(() => { _.value = !1; })); }); } function se() { l.value || P(!C.value); } function ae() { k.fromString($.value); } function de() { const le = k.value; n(Or, le), n("change", le), r.validateEvent && (i == null || i.validate("change").catch((pe) => Qn(pe))), P(!1), Ke(() => { const pe = new Ap({ enableAlpha: r.showAlpha, format: r.colorFormat || "", value: r.modelValue }); k.compare(pe) || G(); }); } function me() { P(!1), n(Or, null), n("change", null), r.modelValue !== null && r.validateEvent && (i == null || i.validate("change").catch((le) => Qn(le))), G(); } function te() { C.value && (U(), g.value && ee()); } function oe(le) { le.preventDefault(), le.stopPropagation(), j(!1), G(); } function ne(le) { switch (le.code) { case sr.enter: case sr.space: le.preventDefault(), le.stopPropagation(), V(), m.value.focus(); break; case sr.esc: oe(le); break; } } function ee() { v.value.focus(); } function Z() { v.value.blur(); } return ut(() => { r.modelValue && ($.value = F.value); }), he(() => r.modelValue, (le) => { le ? le && le !== k.value && (w = !1, k.fromString(le)) : _.value = !1; }), he(() => [r.colorFormat, r.showAlpha], () => { k.enableAlpha = r.showAlpha, k.format = r.colorFormat || k.format, k.doOnChange(), n(Or, k.value); }), he(() => F.value, (le) => { $.value = le, w && n("activeChange", le), w = !0; }), he(() => k.value, () => { !r.modelValue && !_.value && (_.value = !0); }), he(() => C.value, () => { Ke(() => { var le, pe, ke; (le = d.value) == null || le.update(), (pe = p.value) == null || pe.update(), (ke = h.value) == null || ke.update(); }); }), nt(aB, { currentColor: F }), t({ color: k, show: V, hide: U, focus: ee, blur: Z }), (le, pe) => (S(), re(y(Jf), { ref_key: "popper", ref: f, visible: C.value, "show-arrow": !1, "fallback-placements": ["bottom", "top", "right", "left"], offset: 0, "gpu-acceleration": !1, "popper-class": [y(a).be("picker", "panel"), y(a).b("dropdown"), le.popperClass], "stop-popper-mouse-event": !1, effect: "light", trigger: "click", teleported: le.teleported, transition: `${y(a).namespace.value}-zoom-in-top`, persistent: "", onHide: (ke) => j(!1) }, { content: N(() => [ Be((S(), L("div", { onKeydown: wn(oe, ["esc"]) }, [ D("div", { class: H(y(a).be("dropdown", "main-wrapper")) }, [ q(Zhe, { ref_key: "hue", ref: d, class: "hue-slider", color: y(k), vertical: "" }, null, 8, ["color"]), q(lve, { ref_key: "sv", ref: p, color: y(k) }, null, 8, ["color"]) ], 2), le.showAlpha ? (S(), re(Whe, { key: 0, ref_key: "alpha", ref: h, color: y(k) }, null, 8, ["color"])) : J("v-if", !0), le.predefine ? (S(), re(ave, { key: 1, ref: "predefine", "enable-alpha": le.showAlpha, color: y(k), colors: le.predefine }, null, 8, ["enable-alpha", "color", "colors"])) : J("v-if", !0), D("div", { class: H(y(a).be("dropdown", "btns")) }, [ D("span", { class: H(y(a).be("dropdown", "value")) }, [ q(y(um), { ref_key: "inputRef", ref: m, modelValue: $.value, "onUpdate:modelValue": (ke) => $.value = ke, "validate-event": !1, size: "small", onKeyup: wn(ae, ["enter"]), onBlur: ae }, null, 8, ["modelValue", "onUpdate:modelValue", "onKeyup"]) ], 2), q(y(ua), { class: H(y(a).be("dropdown", "link-btn")), text: "", size: "small", onClick: me }, { default: N(() => [ Oe(ge(y(o)("el.colorpicker.clear")), 1) ]), _: 1 }, 8, ["class"]), q(y(ua), { plain: "", size: "small", class: H(y(a).be("dropdown", "btn")), onClick: de }, { default: N(() => [ Oe(ge(y(o)("el.colorpicker.confirm")), 1) ]), _: 1 }, 8, ["class"]) ], 2) ], 40, ["onKeydown"])), [ [y(ZD), te] ]) ]), default: N(() => [ D("div", Et({ id: y(u), ref_key: "triggerRef", ref: v }, le.$attrs, { class: y(R), role: "button", "aria-label": y(A), "aria-labelledby": y(T), "aria-description": y(o)("el.colorpicker.description", { color: le.modelValue || "" }), "aria-disabled": y(l), tabindex: y(l) ? -1 : le.tabindex, onKeydown: ne, onFocus: y(b), onBlur: y(x) }), [ y(l) ? (S(), L("div", { key: 0, class: H(y(a).be("picker", "mask")) }, null, 2)) : J("v-if", !0), D("div", { class: H(y(a).be("picker", "trigger")), onClick: se }, [ D("span", { class: H([y(a).be("picker", "color"), y(a).is("alpha", le.showAlpha)]) }, [ D("span", { class: H(y(a).be("picker", "color-inner")), style: Ye({ backgroundColor: y(O) }) }, [ Be(q(y(mr), { class: H([y(a).be("picker", "icon"), y(a).is("icon-arrow-down")]) }, { default: N(() => [ q(y(ma)) ]), _: 1 }, 8, ["class"]), [ [ht, le.modelValue || _.value] ]), Be(q(y(mr), { class: H([y(a).be("picker", "empty"), y(a).is("icon-close")]) }, { default: N(() => [ q(y(Bo)) ]), _: 1 }, 8, ["class"]), [ [ht, !le.modelValue && !_.value] ]) ], 6) ], 2) ], 2) ], 16, ["id", "aria-label", "aria-labelledby", "aria-description", "aria-disabled", "tabindex", "onFocus", "onBlur"]) ]), _: 1 }, 8, ["visible", "popper-class", "teleported", "transition", "onHide"])); } }); var dve = /* @__PURE__ */ It(cve, [["__file", "color-picker.vue"]]); _r(dve); const pve = W({ name: "ElContainer" }), fve = /* @__PURE__ */ W({ ...pve, props: { direction: { type: String } }, setup(e) { const t = e, n = Dr(), r = Lt("container"), o = E(() => t.direction === "vertical" ? !0 : t.direction === "horizontal" ? !1 : n && n.default ? n.default().some((a) => { const i = a.type.name; return i === "ElHeader" || i === "ElFooter"; }) : !1); return (a, i) => (S(), L("section", { class: H([y(r).b(), y(r).is("vertical", y(o))]) }, [ ue(a.$slots, "default") ], 2)); } }); var hve = /* @__PURE__ */ It(fve, [["__file", "container.vue"]]); const vve = W({ name: "ElAside" }), gve = /* @__PURE__ */ W({ ...vve, props: { width: { type: String, default: null } }, setup(e) { const t = e, n = Lt("aside"), r = E(() => t.width ? n.cssVarBlock({ width: t.width }) : {}); return (o, a) => (S(), L("aside", { class: H(y(n).b()), style: Ye(y(r)) }, [ ue(o.$slots, "default") ], 6)); } }); var iB = /* @__PURE__ */ It(gve, [["__file", "aside.vue"]]); const mve = W({ name: "ElFooter" }), yve = /* @__PURE__ */ W({ ...mve, props: { height: { type: String, default: null } }, setup(e) { const t = e, n = Lt("footer"), r = E(() => t.height ? n.cssVarBlock({ height: t.height }) : {}); return (o, a) => (S(), L("footer", { class: H(y(n).b()), style: Ye(y(r)) }, [ ue(o.$slots, "default") ], 6)); } }); var sB = /* @__PURE__ */ It(yve, [["__file", "footer.vue"]]); const bve = W({ name: "ElHeader" }), wve = /* @__PURE__ */ W({ ...bve, props: { height: { type: String, default: null } }, setup(e) { const t = e, n = Lt("header"), r = E(() => t.height ? n.cssVarBlock({ height: t.height }) : {}); return (o, a) => (S(), L("header", { class: H(y(n).b()), style: Ye(y(r)) }, [ ue(o.$slots, "default") ], 6)); } }); var lB = /* @__PURE__ */ It(wve, [["__file", "header.vue"]]); const xve = W({ name: "ElMain" }), kve = /* @__PURE__ */ W({ ...xve, setup(e) { const t = Lt("main"); return (n, r) => (S(), L("main", { class: H(y(t).b()) }, [ ue(n.$slots, "default") ], 2)); } }); var uB = /* @__PURE__ */ It(kve, [["__file", "main.vue"]]); const i$ = _r(hve, { Aside: iB, Footer: sB, Header: lB, Main: uB }); hs(iB); hs(sB); const cB = hs(lB), s$ = hs(uB), Cve = /* @__PURE__ */ W({ inheritAttrs: !1 }); function _ve(e, t, n, r, o, a) { return ue(e.$slots, "default"); } var Sve = /* @__PURE__ */ It(Cve, [["render", _ve], ["__file", "collection.vue"]]); const $ve = /* @__PURE__ */ W({ name: "ElCollectionItem", inheritAttrs: !1 }); function Eve(e, t, n, r, o, a) { return ue(e.$slots, "default"); } var Ove = /* @__PURE__ */ It($ve, [["render", Eve], ["__file", "collection-item.vue"]]); const Fve = "data-el-collection-item", Tve = (e) => { const t = `El${e}Collection`, n = `${t}Item`, r = Symbol(t), o = Symbol(n), a = { ...Sve, name: t, setup() { const s = z(null), l = /* @__PURE__ */ new Map(); nt(r, { itemMap: l, getItems: () => { const u = y(s); if (!u) return []; const c = Array.from(u.querySelectorAll(`[${Fve}]`)); return [...l.values()].sort((d, p) => c.indexOf(d.ref) - c.indexOf(p.ref)); }, collectionRef: s }); } }, i = { ...Ove, name: n, setup(s, { attrs: l }) { const u = z(null), c = be(r, void 0); nt(o, { collectionItemRef: u }), ut(() => { const d = y(u); d && c.itemMap.set(d, { ref: d, ...l }); }), Tt(() => { const d = y(u); c.itemMap.delete(d); }); } }; return { COLLECTION_INJECTION_KEY: r, COLLECTION_ITEM_INJECTION_KEY: o, ElCollection: a, ElCollectionItem: i }; }, uy = ln({ trigger: nf.trigger, effect: { ...po.effect, default: "light" }, type: { type: Ct(String) }, placement: { type: Ct(String), default: "bottom" }, popperOptions: { type: Ct(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: Ct([Number, String]), default: 0 }, maxHeight: { type: Ct([Number, String]), default: "" }, popperClass: { type: String, default: "" }, disabled: Boolean, role: { type: String, default: "menu" }, buttonProps: { type: Ct(Object) }, teleported: po.teleported }); ln({ command: { type: [Object, String, Number], default: () => ({}) }, disabled: Boolean, divided: Boolean, textValue: String, icon: { type: rl } }); ln({ onKeydown: { type: Ct(Function) } }); Tve("Dropdown"); const dB = Symbol("ElSelectGroup"), Qf = Symbol("ElSelect"); function Ave(e, t) { const n = be(Qf), r = be(dB, { disabled: !1 }), o = E(() => c(Bs(n.props.modelValue), e.value)), a = E(() => { var h; if (n.props.multiple) { const f = Bs((h = n.props.modelValue) != null ? h : []); return !o.value && f.length >= n.props.multipleLimit && n.props.multipleLimit > 0; } else return !1; }), i = E(() => e.label || (Tr(e.value) ? "" : e.value)), s = E(() => e.value || e.label || ""), l = E(() => e.disabled || t.groupDisabled || a.value), u = st(), c = (h = [], f) => { if (Tr(e.value)) { const v = n.props.valueKey; return h && h.some((m) => ra(Ui(m, v)) === Ui(f, v)); } else return h && h.includes(f); }, d = () => { !e.disabled && !r.disabled && (n.states.hoveringIndex = n.optionsArray.indexOf(u.proxy)); }, p = (h) => { const f = new RegExp(mce(h), "i"); t.visible = f.test(i.value) || e.created; }; return he(() => i.value, () => { !e.created && !n.props.remote && n.setSelected(); }), he(() => e.value, (h, f) => { const { remote: v, valueKey: m } = n.props; if (h !== f && (n.onOptionDestroy(f, u.proxy), n.onOptionCreate(u.proxy)), !e.created && !v) { if (m && Tr(h) && Tr(f) && h[m] === f[m]) return; n.setSelected(); } }), he(() => r.disabled, () => { t.groupDisabled = r.disabled; }, { immediate: !0 }), { select: n, currentLabel: i, currentValue: s, itemSelected: o, isDisabled: l, hoverItem: d, updateOption: p }; } const Ive = W({ name: "ElOption", componentName: "ElOption", props: { value: { required: !0, type: [String, Number, Boolean, Object] }, label: [String, Number], created: Boolean, disabled: Boolean }, setup(e) { const t = Lt("select"), n = lm(), r = E(() => [ t.be("dropdown", "item"), t.is("disabled", y(s)), t.is("selected", y(i)), t.is("hovering", y(p)) ]), o = en({ index: -1, groupDisabled: !1, visible: !0, hover: !1 }), { currentLabel: a, itemSelected: i, isDisabled: s, select: l, hoverItem: u, updateOption: c } = Ave(e, o), { visible: d, hover: p } = Cr(o), h = st().proxy; l.onOptionCreate(h), Tt(() => { const v = h.value, { selected: m } = l.states, g = (l.props.multiple ? m : [m]).some((b) => b.value === h.value); Ke(() => { l.states.cachedOptions.get(v) === h && !g && l.states.cachedOptions.delete(v); }), l.onOptionDestroy(v, h); }); function f() { s.value || l.handleOptionSelect(h); } return { ns: t, id: n, containerKls: r, currentLabel: a, itemSelected: i, isDisabled: s, select: l, hoverItem: u, updateOption: c, visible: d, hover: p, selectOptionClick: f, states: o }; } }); function Pve(e, t, n, r, o, a) { return Be((S(), L("li", { id: e.id, class: H(e.containerKls), role: "option", "aria-disabled": e.isDisabled || void 0, "aria-selected": e.itemSelected, onMouseenter: e.hoverItem, onClick: Ge(e.selectOptionClick, ["stop"]) }, [ ue(e.$slots, "default", {}, () => [ D("span", null, ge(e.currentLabel), 1) ]) ], 42, ["id", "aria-disabled", "aria-selected", "onMouseenter", "onClick"])), [ [ht, e.visible] ]); } var l$ = /* @__PURE__ */ It(Ive, [["render", Pve], ["__file", "option.vue"]]); const Lve = W({ name: "ElSelectDropdown", componentName: "ElSelectDropdown", setup() { const e = be(Qf), t = Lt("select"), n = E(() => e.props.popperClass), r = E(() => e.props.multiple), o = E(() => e.props.fitInputWidth), a = z(""); function i() { var s; a.value = `${(s = e.selectRef) == null ? void 0 : s.offsetWidth}px`; } return ut(() => { i(), Vi(e.selectRef, i); }), { ns: t, minWidth: a, popperClass: n, isMultiple: r, isFitInputWidth: o }; } }); function Rve(e, t, n, r, o, a) { return S(), L("div", { class: H([e.ns.b("dropdown"), e.ns.is("multiple", e.isMultiple), e.popperClass]), style: Ye({ [e.isFitInputWidth ? "width" : "minWidth"]: e.minWidth }) }, [ e.$slots.header ? (S(), L("div", { key: 0, class: H(e.ns.be("dropdown", "header")) }, [ ue(e.$slots, "header") ], 2)) : J("v-if", !0), ue(e.$slots, "default"), e.$slots.footer ? (S(), L("div", { key: 1, class: H(e.ns.be("dropdown", "footer")) }, [ ue(e.$slots, "footer") ], 2)) : J("v-if", !0) ], 6); } var Nve = /* @__PURE__ */ It(Lve, [["render", Rve], ["__file", "select-dropdown.vue"]]); const Mve = 11, Dve = (e, t) => { const { t: n } = Gf(), r = lm(), o = Lt("select"), a = Lt("input"), i = en({ 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 }), s = z(null), l = z(null), u = z(null), c = z(null), d = z(null), p = z(null), h = z(null), f = z(null), v = z(null), m = z(null), g = z(null), b = z(null), { isComposing: x, handleCompositionStart: w, handleCompositionUpdate: k, handleCompositionEnd: C } = DD({ afterComposition: (B) => we(B) }), { wrapperRef: _, isFocused: $ } = ZS(d, { beforeFocus() { return P.value; }, afterFocus() { e.automaticDropdown && !O.value && (O.value = !0, i.menuVisibleOnFocus = !0); }, beforeBlur(B) { var ce, Le; return ((ce = u.value) == null ? void 0 : ce.isFocusInsideContent(B)) || ((Le = c.value) == null ? void 0 : Le.isFocusInsideContent(B)); }, afterBlur() { O.value = !1, i.menuVisibleOnFocus = !1; } }), O = z(!1), F = z(), { form: A, formItem: T } = Lu(), { inputId: R } = Zf(e, { formItemContext: T }), { valueOnClear: M, isEmptyValue: j } = Qde(e), P = E(() => e.disabled || (A == null ? void 0 : A.disabled)), V = E(() => vo(e.modelValue) ? e.modelValue.length > 0 : !j(e.modelValue)), U = E(() => e.clearable && !P.value && i.inputHovering && V.value), G = E(() => e.remote && e.filterable && !e.remoteShowSuffix ? "" : e.suffixIcon), se = E(() => o.is("reverse", G.value && O.value)), ae = E(() => (T == null ? void 0 : T.validateState) || ""), de = E(() => vD[ae.value]), me = E(() => e.remote ? 300 : 0), te = E(() => e.loading ? e.loadingText || n("el.select.loading") : e.remote && !i.inputValue && i.options.size === 0 ? !1 : e.filterable && i.inputValue && i.options.size > 0 && oe.value === 0 ? e.noMatchText || n("el.select.noMatch") : i.options.size === 0 ? e.noDataText || n("el.select.noData") : null), oe = E(() => ne.value.filter((B) => B.visible).length), ne = E(() => { const B = Array.from(i.options.values()), ce = []; return i.optionValues.forEach((Le) => { const We = B.findIndex((rn) => rn.value === Le); We > -1 && ce.push(B[We]); }), ce.length >= B.length ? ce : B; }), ee = E(() => Array.from(i.cachedOptions.values())), Z = E(() => { const B = ne.value.filter((ce) => !ce.created).some((ce) => ce.currentLabel === i.inputValue); return e.filterable && e.allowCreate && i.inputValue !== "" && !B; }), le = () => { e.filterable && ao(e.filterMethod) || e.filterable && e.remote && ao(e.remoteMethod) || ne.value.forEach((B) => { var ce; (ce = B.updateOption) == null || ce.call(B, i.inputValue); }); }, pe = cu(), ke = E(() => ["small"].includes(pe.value) ? "small" : "default"), Ne = E({ get() { return O.value && te.value !== !1; }, set(B) { O.value = B; } }), De = E(() => { if (e.multiple && !Hs(e.modelValue)) return Bs(e.modelValue).length === 0 && !i.inputValue; const B = vo(e.modelValue) ? e.modelValue[0] : e.modelValue; return e.filterable || Hs(B) ? !i.inputValue : !0; }), _e = E(() => { var B; const ce = (B = e.placeholder) != null ? B : n("el.select.placeholder"); return e.multiple || !V.value ? ce : i.selectedLabel; }), Fe = E(() => SC ? null : "mouseenter"); he(() => e.modelValue, (B, ce) => { e.multiple && e.filterable && !e.reserveKeyword && (i.inputValue = "", Ie("")), qe(), !Lg(B, ce) && e.validateEvent && (T == null || T.validate("change").catch((Le) => Qn(Le))); }, { flush: "post", deep: !0 }), he(() => O.value, (B) => { B ? Ie(i.inputValue) : (i.inputValue = "", i.previousQuery = null, i.isBeforeHide = !0), t("visible-change", B); }), he(() => i.options.entries(), () => { var B; if (!Jn) return; const ce = ((B = s.value) == null ? void 0 : B.querySelectorAll("input")) || []; (!e.filterable && !e.defaultFirstOption && !Hs(e.modelValue) || !Array.from(ce).includes(document.activeElement)) && qe(), e.defaultFirstOption && (e.filterable || e.remote) && oe.value && Ae(); }, { flush: "post" }), he(() => i.hoveringIndex, (B) => { Ar(B) && B > -1 ? F.value = ne.value[B] || {} : F.value = {}, ne.value.forEach((ce) => { ce.hover = F.value === ce; }); }), Mf(() => { i.isBeforeHide || le(); }); const Ie = (B) => { i.previousQuery === B || x.value || (i.previousQuery = B, e.filterable && ao(e.filterMethod) ? e.filterMethod(B) : e.filterable && e.remote && ao(e.remoteMethod) && e.remoteMethod(B), e.defaultFirstOption && (e.filterable || e.remote) && oe.value ? Ke(Ae) : Ke(He)); }, Ae = () => { const B = ne.value.filter((We) => We.visible && !We.disabled && !We.states.groupDisabled), ce = B.find((We) => We.created), Le = B[0]; i.hoveringIndex = Te(ne.value, ce || Le); }, qe = () => { if (e.multiple) i.selectedLabel = ""; else { const ce = vo(e.modelValue) ? e.modelValue[0] : e.modelValue, Le = et(ce); i.selectedLabel = Le.currentLabel, i.selected = [Le]; return; } const B = []; Hs(e.modelValue) || Bs(e.modelValue).forEach((ce) => { B.push(et(ce)); }), i.selected = B; }, et = (B) => { let ce; const Le = X1(B).toLowerCase() === "object", We = X1(B).toLowerCase() === "null", rn = X1(B).toLowerCase() === "undefined"; for (let An = i.cachedOptions.size - 1; An >= 0; An--) { const un = ee.value[An]; if (Le ? Ui(un.value, e.valueKey) === Ui(B, e.valueKey) : un.value === B) { ce = { value: B, currentLabel: un.currentLabel, get isDisabled() { return un.isDisabled; } }; break; } } if (ce) return ce; const Tn = Le ? B.label : !We && !rn ? B : ""; return { value: B, currentLabel: Tn }; }, He = () => { i.hoveringIndex = ne.value.findIndex((B) => i.selected.some((ce) => Cn(ce) === Cn(B))); }, ot = () => { i.selectionWidth = l.value.getBoundingClientRect().width; }, tt = () => { i.calculatorWidth = p.value.getBoundingClientRect().width; }, Qe = () => { i.collapseItemWidth = g.value.getBoundingClientRect().width; }, I = () => { var B, ce; (ce = (B = u.value) == null ? void 0 : B.updatePopper) == null || ce.call(B); }, Y = () => { var B, ce; (ce = (B = c.value) == null ? void 0 : B.updatePopper) == null || ce.call(B); }, ve = () => { i.inputValue.length > 0 && !O.value && (O.value = !0), Ie(i.inputValue); }, we = (B) => { if (i.inputValue = B.target.value, e.remote) ye(); else return ve(); }, ye = cD(() => { ve(); }, me.value), Pe = (B) => { Lg(e.modelValue, B) || t(jS, B); }, Ce = (B) => dce(B, (ce) => !i.disabledOptions.has(ce)), ze = (B) => { if (e.multiple && B.code !== sr.delete && B.target.value.length <= 0) { const ce = Bs(e.modelValue).slice(), Le = Ce(ce); if (Le < 0) return; const We = ce[Le]; ce.splice(Le, 1), t(Or, ce), Pe(ce), t("remove-tag", We); } }, lt = (B, ce) => { const Le = i.selected.indexOf(ce); if (Le > -1 && !P.value) { const We = Bs(e.modelValue).slice(); We.splice(Le, 1), t(Or, We), Pe(We), t("remove-tag", ce.value); } B.stopPropagation(), Ht(); }, rt = (B) => { B.stopPropagation(); const ce = e.multiple ? [] : M.value; if (e.multiple) for (const Le of i.selected) Le.isDisabled && ce.push(Le.value); t(Or, ce), Pe(ce), i.hoveringIndex = -1, O.value = !1, t("clear"), Ht(); }, fe = (B) => { var ce; if (e.multiple) { const Le = Bs((ce = e.modelValue) != null ? ce : []).slice(), We = Te(Le, B.value); We > -1 ? Le.splice(We, 1) : (e.multipleLimit <= 0 || Le.length < e.multipleLimit) && Le.push(B.value), t(Or, Le), Pe(Le), B.created && Ie(""), e.filterable && !e.reserveKeyword && (i.inputValue = ""); } else t(Or, B.value), Pe(B.value), O.value = !1; Ht(), !O.value && Ke(() => { Se(B); }); }, Te = (B = [], ce) => { if (!Tr(ce)) return B.indexOf(ce); const Le = e.valueKey; let We = -1; return B.some((rn, Tn) => ra(Ui(rn, Le)) === Ui(ce, Le) ? (We = Tn, !0) : !1), We; }, Se = (B) => { var ce, Le, We, rn, Tn; const An = vo(B) ? B[0] : B; let un = null; if (An != null && An.value) { const on = ne.value.filter((qo) => qo.value === An.value); on.length > 0 && (un = on[0].$el); } if (u.value && un) { const on = (rn = (We = (Le = (ce = u.value) == null ? void 0 : ce.popperRef) == null ? void 0 : Le.contentRef) == null ? void 0 : We.querySelector) == null ? void 0 : rn.call(We, `.${o.be("dropdown", "wrap")}`); on && wce(on, un); } (Tn = b.value) == null || Tn.handleScroll(); }, Ue = (B) => { i.options.set(B.value, B), i.cachedOptions.set(B.value, B), B.disabled && i.disabledOptions.set(B.value, B); }, zt = (B, ce) => { i.options.get(B) === ce && i.options.delete(B); }, Pt = E(() => { var B, ce; return (ce = (B = u.value) == null ? void 0 : B.popperRef) == null ? void 0 : ce.contentRef; }), qt = () => { i.isBeforeHide = !1, Ke(() => Se(i.selected)); }, Ht = () => { var B; (B = d.value) == null || B.focus(); }, tn = () => { var B; (B = d.value) == null || B.blur(); }, Dn = (B) => { rt(B); }, hn = () => { O.value = !1, $.value && tn(); }, vn = () => { i.inputValue.length > 0 ? i.inputValue = "" : O.value = !1; }, Pn = () => { P.value || (SC && (i.inputHovering = !0), i.menuVisibleOnFocus ? i.menuVisibleOnFocus = !1 : O.value = !O.value); }, Bn = () => { O.value ? ne.value[i.hoveringIndex] && fe(ne.value[i.hoveringIndex]) : Pn(); }, Cn = (B) => Tr(B.value) ? Ui(B.value, e.valueKey) : B.value, hr = E(() => ne.value.filter((B) => B.visible).every((B) => B.disabled)), or = E(() => e.multiple ? e.collapseTags ? i.selected.slice(0, e.maxCollapseTags) : i.selected : []), ar = E(() => e.multiple ? e.collapseTags ? i.selected.slice(e.maxCollapseTags) : [] : []), nn = (B) => { if (!O.value) { O.value = !0; return; } if (!(i.options.size === 0 || i.filteredOptionsCount === 0 || x.value) && !hr.value) { B === "next" ? (i.hoveringIndex++, i.hoveringIndex === i.options.size && (i.hoveringIndex = 0)) : B === "prev" && (i.hoveringIndex--, i.hoveringIndex < 0 && (i.hoveringIndex = i.options.size - 1)); const ce = ne.value[i.hoveringIndex]; (ce.disabled === !0 || ce.states.groupDisabled === !0 || !ce.visible) && nn(B), Ke(() => Se(F.value)); } }, gn = () => { if (!l.value) return 0; const B = window.getComputedStyle(l.value); return Number.parseFloat(B.gap || "6px"); }, Fn = E(() => { const B = gn(); return { maxWidth: `${g.value && e.maxCollapseTags === 1 ? i.selectionWidth - i.collapseItemWidth - B : i.selectionWidth}px` }; }), vr = E(() => ({ maxWidth: `${i.selectionWidth}px` })), Uo = E(() => ({ width: `${Math.max(i.calculatorWidth, Mve)}px` })); return Vi(l, ot), Vi(p, tt), Vi(v, I), Vi(_, I), Vi(m, Y), Vi(g, Qe), ut(() => { qe(); }), { inputId: R, contentId: r, nsSelect: o, nsInput: a, states: i, isFocused: $, expanded: O, optionsArray: ne, hoverOption: F, selectSize: pe, filteredOptionsCount: oe, resetCalculatorWidth: tt, updateTooltip: I, updateTagTooltip: Y, debouncedOnInputChange: ye, onInput: we, deletePrevTag: ze, deleteTag: lt, deleteSelected: rt, handleOptionSelect: fe, scrollToOption: Se, hasModelValue: V, shouldShowPlaceholder: De, currentPlaceholder: _e, mouseEnterEventName: Fe, showClose: U, iconComponent: G, iconReverse: se, validateState: ae, validateIcon: de, showNewOption: Z, updateOptions: le, collapseTagSize: ke, setSelected: qe, selectDisabled: P, emptyText: te, handleCompositionStart: w, handleCompositionUpdate: k, handleCompositionEnd: C, onOptionCreate: Ue, onOptionDestroy: zt, handleMenuEnter: qt, focus: Ht, blur: tn, handleClearClick: Dn, handleClickOutside: hn, handleEsc: vn, toggleMenu: Pn, selectOption: Bn, getValueKey: Cn, navigateOptions: nn, dropdownMenuVisible: Ne, showTagList: or, collapseTagList: ar, tagStyle: Fn, collapseTagStyle: vr, inputStyle: Uo, popperRef: Pt, inputRef: d, tooltipRef: u, tagTooltipRef: c, calculatorRef: p, prefixRef: h, suffixRef: f, selectRef: s, wrapperRef: _, selectionRef: l, scrollbarRef: b, menuRef: v, tagMenuRef: m, collapseItemRef: g }; }; var Bve = W({ name: "ElOptions", setup(e, { slots: t }) { const n = be(Qf); let r = []; return () => { var o, a; const i = (o = t.default) == null ? void 0 : o.call(t), s = []; function l(u) { vo(u) && u.forEach((c) => { var d, p, h, f; const v = (d = (c == null ? void 0 : c.type) || {}) == null ? void 0 : d.name; v === "ElOptionGroup" ? l(!Gr(c.children) && !vo(c.children) && ao((p = c.children) == null ? void 0 : p.default) ? (h = c.children) == null ? void 0 : h.default() : c.children) : v === "ElOption" ? s.push((f = c.props) == null ? void 0 : f.value) : vo(c.children) && l(c.children); }); } return i.length && l((a = i[0]) == null ? void 0 : a.children), Lg(s, r) || (r = s, n && (n.states.optionValues = s)), i; }; } }); const zve = ln({ name: String, id: String, modelValue: { type: [Array, String, Number, Boolean, Object], default: void 0 }, autocomplete: { type: String, default: "off" }, automaticDropdown: Boolean, size: hd, effect: { type: Ct(String), default: "light" }, disabled: Boolean, clearable: Boolean, filterable: Boolean, allowCreate: Boolean, loading: Boolean, popperClass: { type: String, default: "" }, popperOptions: { type: Ct(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: po.teleported, persistent: { type: Boolean, default: !0 }, clearIcon: { type: rl, default: $i }, fitInputWidth: Boolean, suffixIcon: { type: rl, default: ma }, tagType: { ...MC.type, default: "info" }, tagEffect: { ...MC.effect, default: "light" }, validateEvent: { type: Boolean, default: !0 }, remoteShowSuffix: Boolean, placement: { type: Ct(String), values: im, default: "bottom-start" }, fallbackPlacements: { type: Ct(Array), default: ["bottom-start", "top-start", "right", "left"] }, appendTo: String, ...Jde, ...bl(["ariaLabel"]) }), wO = "ElSelect", jve = W({ name: wO, componentName: wO, components: { ElSelectMenu: Nve, ElOption: l$, ElOptions: Bve, ElTag: Ehe, ElScrollbar: Fpe, ElTooltip: Jf, ElIcon: mr }, directives: { ClickOutside: ZD }, props: zve, emits: [ Or, jS, "remove-tag", "clear", "visible-change", "focus", "blur" ], setup(e, { emit: t }) { const n = E(() => { const { modelValue: a, multiple: i } = e, s = i ? [] : void 0; return vo(a) ? i ? a : s : i ? s : a; }), r = en({ ...Cr(e), modelValue: n }), o = Dve(r, t); return nt(Qf, en({ 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 Vve(e, t, n, r, o, a) { const i = Ve("el-tag"), s = Ve("el-tooltip"), l = Ve("el-icon"), u = Ve("el-option"), c = Ve("el-options"), d = Ve("el-scrollbar"), p = Ve("el-select-menu"), h = X_("click-outside"); return Be((S(), L("div", { ref: "selectRef", class: H([e.nsSelect.b(), e.nsSelect.m(e.selectSize)]), [Z_(e.mouseEnterEventName)]: (f) => e.states.inputHovering = !0, onMouseleave: (f) => e.states.inputHovering = !1 }, [ q(s, { 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: (f) => e.states.isBeforeHide = !1 }, { default: N(() => { var f; return [ D("div", { ref: "wrapperRef", class: H([ 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: Ge(e.toggleMenu, ["prevent"]) }, [ e.$slots.prefix ? (S(), L("div", { key: 0, ref: "prefixRef", class: H(e.nsSelect.e("prefix")) }, [ ue(e.$slots, "prefix") ], 2)) : J("v-if", !0), D("div", { ref: "selectionRef", class: H([ e.nsSelect.e("selection"), e.nsSelect.is("near", e.multiple && !e.$slots.prefix && !!e.states.selected.length) ]) }, [ e.multiple ? ue(e.$slots, "tag", { key: 0 }, () => [ (S(!0), L(Re, null, mt(e.showTagList, (v) => (S(), L("div", { key: e.getValueKey(v), class: H(e.nsSelect.e("selected-item")) }, [ q(i, { closable: !e.selectDisabled && !v.isDisabled, size: e.collapseTagSize, type: e.tagType, effect: e.tagEffect, "disable-transitions": "", style: Ye(e.tagStyle), onClose: (m) => e.deleteTag(m, v) }, { default: N(() => [ D("span", { class: H(e.nsSelect.e("tags-text")) }, [ ue(e.$slots, "label", { label: v.currentLabel, value: v.value }, () => [ Oe(ge(v.currentLabel), 1) ]) ], 2) ]), _: 2 }, 1032, ["closable", "size", "type", "effect", "style", "onClose"]) ], 2))), 128)), e.collapseTags && e.states.selected.length > e.maxCollapseTags ? (S(), re(s, { key: 0, ref: "tagTooltipRef", disabled: e.dropdownMenuVisible || !e.collapseTagsTooltip, "fallback-placements": ["bottom", "top", "right", "left"], effect: e.effect, placement: "bottom", teleported: e.teleported }, { default: N(() => [ D("div", { ref: "collapseItemRef", class: H(e.nsSelect.e("selected-item")) }, [ q(i, { closable: !1, size: e.collapseTagSize, type: e.tagType, effect: e.tagEffect, "disable-transitions": "", style: Ye(e.collapseTagStyle) }, { default: N(() => [ D("span", { class: H(e.nsSelect.e("tags-text")) }, " + " + ge(e.states.selected.length - e.maxCollapseTags), 3) ]), _: 1 }, 8, ["size", "type", "effect", "style"]) ], 2) ]), content: N(() => [ D("div", { ref: "tagMenuRef", class: H(e.nsSelect.e("selection")) }, [ (S(!0), L(Re, null, mt(e.collapseTagList, (v) => (S(), L("div", { key: e.getValueKey(v), class: H(e.nsSelect.e("selected-item")) }, [ q(i, { class: "in-tooltip", closable: !e.selectDisabled && !v.isDisabled, size: e.collapseTagSize, type: e.tagType, effect: e.tagEffect, "disable-transitions": "", onClose: (m) => e.deleteTag(m, v) }, { default: N(() => [ D("span", { class: H(e.nsSelect.e("tags-text")) }, [ ue(e.$slots, "label", { label: v.currentLabel, value: v.value }, () => [ Oe(ge(v.currentLabel), 1) ]) ], 2) ]), _: 2 }, 1032, ["closable", "size", "type", "effect", "onClose"]) ], 2))), 128)) ], 2) ]), _: 3 }, 8, ["disabled", "effect", "teleported"])) : J("v-if", !0) ]) : J("v-if", !0), e.selectDisabled ? J("v-if", !0) : (S(), L("div", { key: 1, class: H([ e.nsSelect.e("selected-item"), e.nsSelect.e("input-wrapper"), e.nsSelect.is("hidden", !e.filterable) ]) }, [ Be(D("input", { id: e.inputId, ref: "inputRef", "onUpdate:modelValue": (v) => e.states.inputValue = v, type: "text", name: e.name, class: H([e.nsSelect.e("input"), e.nsSelect.is(e.selectSize)]), disabled: e.selectDisabled, autocomplete: e.autocomplete, style: Ye(e.inputStyle), role: "combobox", readonly: !e.filterable, spellcheck: "false", "aria-activedescendant": ((f = e.hoverOption) == null ? void 0 : f.id) || "", "aria-controls": e.contentId, "aria-expanded": e.dropdownMenuVisible, "aria-label": e.ariaLabel, "aria-autocomplete": "none", "aria-haspopup": "listbox", onKeydown: [ wn(Ge((v) => e.navigateOptions("next"), ["stop", "prevent"]), ["down"]), wn(Ge((v) => e.navigateOptions("prev"), ["stop", "prevent"]), ["up"]), wn(Ge(e.handleEsc, ["stop", "prevent"]), ["esc"]), wn(Ge(e.selectOption, ["stop", "prevent"]), ["enter"]), wn(Ge(e.deletePrevTag, ["stop"]), ["delete"]) ], onCompositionstart: e.handleCompositionStart, onCompositionupdate: e.handleCompositionUpdate, onCompositionend: e.handleCompositionEnd, onInput: e.onInput, onClick: Ge(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"]), [ [T0, e.states.inputValue] ]), e.filterable ? (S(), L("span", { key: 0, ref: "calculatorRef", "aria-hidden": "true", class: H(e.nsSelect.e("input-calculator")), textContent: ge(e.states.inputValue) }, null, 10, ["textContent"])) : J("v-if", !0) ], 2)), e.shouldShowPlaceholder ? (S(), L("div", { key: 2, class: H([ e.nsSelect.e("selected-item"), e.nsSelect.e("placeholder"), e.nsSelect.is("transparent", !e.hasModelValue || e.expanded && !e.states.inputValue) ]) }, [ e.hasModelValue ? ue(e.$slots, "label", { key: 0, label: e.currentPlaceholder, value: e.modelValue }, () => [ D("span", null, ge(e.currentPlaceholder), 1) ]) : (S(), L("span", { key: 1 }, ge(e.currentPlaceholder), 1)) ], 2)) : J("v-if", !0) ], 2), D("div", { ref: "suffixRef", class: H(e.nsSelect.e("suffix")) }, [ e.iconComponent && !e.showClose ? (S(), re(l, { key: 0, class: H([e.nsSelect.e("caret"), e.nsSelect.e("icon"), e.iconReverse]) }, { default: N(() => [ (S(), re(yt(e.iconComponent))) ]), _: 1 }, 8, ["class"])) : J("v-if", !0), e.showClose && e.clearIcon ? (S(), re(l, { key: 1, class: H([ e.nsSelect.e("caret"), e.nsSelect.e("icon"), e.nsSelect.e("clear") ]), onClick: e.handleClearClick }, { default: N(() => [ (S(), re(yt(e.clearIcon))) ]), _: 1 }, 8, ["class", "onClick"])) : J("v-if", !0), e.validateState && e.validateIcon ? (S(), re(l, { key: 2, class: H([e.nsInput.e("icon"), e.nsInput.e("validateIcon")]) }, { default: N(() => [ (S(), re(yt(e.validateIcon))) ]), _: 1 }, 8, ["class"])) : J("v-if", !0) ], 2) ], 10, ["onClick"]) ]; }), content: N(() => [ q(p, { ref: "menuRef" }, { default: N(() => [ e.$slots.header ? (S(), L("div", { key: 0, class: H(e.nsSelect.be("dropdown", "header")), onClick: Ge(() => { }, ["stop"]) }, [ ue(e.$slots, "header") ], 10, ["onClick"])) : J("v-if", !0), Be(q(d, { id: e.contentId, ref: "scrollbarRef", tag: "ul", "wrap-class": e.nsSelect.be("dropdown", "wrap"), "view-class": e.nsSelect.be("dropdown", "list"), class: H([e.nsSelect.is("empty", e.filteredOptionsCount === 0)]), role: "listbox", "aria-label": e.ariaLabel, "aria-orientation": "vertical" }, { default: N(() => [ e.showNewOption ? (S(), re(u, { key: 0, value: e.states.inputValue, created: !0 }, null, 8, ["value"])) : J("v-if", !0), q(c, null, { default: N(() => [ ue(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 ? (S(), L("div", { key: 1, class: H(e.nsSelect.be("dropdown", "loading")) }, [ ue(e.$slots, "loading") ], 2)) : e.loading || e.filteredOptionsCount === 0 ? (S(), L("div", { key: 2, class: H(e.nsSelect.be("dropdown", "empty")) }, [ ue(e.$slots, "empty", {}, () => [ D("span", null, ge(e.emptyText), 1) ]) ], 2)) : J("v-if", !0), e.$slots.footer ? (S(), L("div", { key: 3, class: H(e.nsSelect.be("dropdown", "footer")), onClick: Ge(() => { }, ["stop"]) }, [ ue(e.$slots, "footer") ], 10, ["onClick"])) : J("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"])), [ [h, e.handleClickOutside, e.popperRef] ]); } var Hve = /* @__PURE__ */ It(jve, [["render", Vve], ["__file", "select.vue"]]); const Uve = W({ name: "ElOptionGroup", componentName: "ElOptionGroup", props: { label: String, disabled: Boolean }, setup(e) { const t = Lt("select"), n = z(null), r = st(), o = z([]); nt(dB, en({ ...Cr(e) })); const a = E(() => o.value.some((u) => u.visible === !0)), i = (u) => { var c, d; return ((c = u.type) == null ? void 0 : c.name) === "ElOption" && !!((d = u.component) != null && d.proxy); }, s = (u) => { const c = Bs(u), d = []; return c.forEach((p) => { var h, f; i(p) ? d.push(p.component.proxy) : (h = p.children) != null && h.length ? d.push(...s(p.children)) : (f = p.component) != null && f.subTree && d.push(...s(p.component.subTree)); }), d; }, l = () => { o.value = s(r.subTree); }; return ut(() => { l(); }), pie(n, l, { attributes: !0, subtree: !0, childList: !0 }), { groupRef: n, visible: a, ns: t }; } }); function qve(e, t, n, r, o, a) { return Be((S(), L("ul", { ref: "groupRef", class: H(e.ns.be("group", "wrap")) }, [ D("li", { class: H(e.ns.be("group", "title")) }, ge(e.label), 3), D("li", null, [ D("ul", { class: H(e.ns.b("group")) }, [ ue(e.$slots, "default") ], 2) ]) ], 2)), [ [ht, e.visible] ]); } var pB = /* @__PURE__ */ It(Uve, [["render", qve], ["__file", "option-group.vue"]]); const Kve = _r(Hve, { Option: l$, OptionGroup: pB }), Gve = hs(l$); hs(pB); const Wve = ln({ trigger: nf.trigger, placement: uy.placement, disabled: nf.disabled, visible: po.visible, transition: po.transition, popperOptions: uy.popperOptions, tabindex: uy.tabindex, content: po.content, popperStyle: po.popperStyle, popperClass: po.popperClass, enterable: { ...po.enterable, default: !0 }, effect: { ...po.effect, default: "light" }, teleported: po.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 } }), Yve = { "update:visible": (e) => Bc(e), "before-enter": () => !0, "before-leave": () => !0, "after-enter": () => !0, "after-leave": () => !0 }, Xve = "onUpdate:visible", Zve = W({ name: "ElPopover" }), Jve = /* @__PURE__ */ W({ ...Zve, props: Wve, emits: Yve, setup(e, { expose: t, emit: n }) { const r = e, o = E(() => r[Xve]), a = Lt("popover"), i = z(), s = E(() => { var m; return (m = y(i)) == null ? void 0 : m.popperRef; }), l = E(() => [ { width: zc(r.width) }, r.popperStyle ]), u = E(() => [a.b(), r.popperClass, { [a.m("plain")]: !!r.content }]), c = E(() => r.transition === `${a.namespace.value}-fade-in-linear`), d = () => { var m; (m = i.value) == null || m.hide(); }, p = () => { n("before-enter"); }, h = () => { n("before-leave"); }, f = () => { n("after-enter"); }, v = () => { n("update:visible", !1), n("after-leave"); }; return t({ popperRef: s, hide: d }), (m, g) => (S(), re(y(Jf), Et({ ref_key: "tooltipRef", ref: i }, 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": y(u), "popper-style": y(l), teleported: m.teleported, persistent: m.persistent, "gpu-acceleration": y(c), "onUpdate:visible": y(o), onBeforeShow: p, onBeforeHide: h, onShow: f, onHide: v }), { content: N(() => [ m.title ? (S(), L("div", { key: 0, class: H(y(a).e("title")), role: "title" }, ge(m.title), 3)) : J("v-if", !0), ue(m.$slots, "default", {}, () => [ Oe(ge(m.content), 1) ]) ]), default: N(() => [ m.$slots.reference ? ue(m.$slots, "reference", { key: 0 }) : J("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 Qve = /* @__PURE__ */ It(Jve, [["__file", "popover.vue"]]); const xO = (e, t) => { const n = t.arg || t.value, r = n == null ? void 0 : n.popperRef; r && (r.triggerRef = e); }; var ege = { mounted(e, t) { xO(e, t); }, updated(e, t) { xO(e, t); } }; const tge = "popover", nge = kce(ege, tge), fB = _r(Qve, { directive: nge }), _c = "$treeNodeId", kO = function(e, t) { !t || t[_c] || Object.defineProperty(t, _c, { value: e.id, enumerable: !1, configurable: !1, writable: !1 }); }, u$ = function(e, t) { return e ? t[e] : t[_c]; }, DC = (e, t, n) => { const r = e.value.currentNode; n(); const o = e.value.currentNode; r !== o && t("current-change", o ? o.data : null, o); }, BC = (e) => { let t = !0, n = !0, r = !0; for (let o = 0, a = e.length; o < a; o++) { const i = e[o]; (i.checked !== !0 || i.indeterminate) && (t = !1, i.disabled || (r = !1)), (i.checked !== !1 || i.indeterminate) && (n = !1); } return { all: t, none: n, allWithoutDisable: r, half: !t && !n }; }, gp = function(e) { if (e.childNodes.length === 0 || e.loading) return; const { all: t, none: n, half: r } = BC(e.childNodes); t ? (e.checked = !0, e.indeterminate = !1) : r ? (e.checked = !1, e.indeterminate = !0) : n && (e.checked = !1, e.indeterminate = !1); const o = e.parent; !o || o.level === 0 || e.store.checkStrictly || gp(o); }, ev = function(e, t) { const n = e.store.props, r = e.data || {}, o = n[t]; if (typeof o == "function") return o(r, e); if (typeof o == "string") return r[o]; if (typeof o > "u") { const a = r[t]; return a === void 0 ? "" : a; } }; let rge = 0, zC = class Uv { constructor(t) { this.id = rge++, this.text = null, this.checked = !1, this.indeterminate = !1, this.data = null, this.expanded = !1, this.parent = null, this.visible = !0, this.isCurrent = !1, this.canFocus = !1; for (const n in t) lu(t, n) && (this[n] = t[n]); this.level = 0, this.loaded = !1, this.childNodes = [], this.loading = !1, this.parent && (this.level = this.parent.level + 1); } initialize() { const t = this.store; if (!t) throw new Error("[Node]store is required!"); t.registerNode(this); const n = t.props; if (n && typeof n.isLeaf < "u") { const a = ev(this, "isLeaf"); typeof a == "boolean" && (this.isLeafByUser = a); } if (t.lazy !== !0 && this.data ? (this.setData(this.data), t.defaultExpandAll && (this.expanded = !0, this.canFocus = !0)) : this.level > 0 && t.lazy && t.defaultExpandAll && !this.isLeafByUser && this.expand(), Array.isArray(this.data) || kO(this, this.data), !this.data) return; const r = t.defaultExpandedKeys, o = t.key; o && r && r.includes(this.key) && this.expand(null, t.autoExpandParent), o && t.currentNodeKey !== void 0 && this.key === t.currentNodeKey && (t.currentNode = this, t.currentNode.isCurrent = !0), t.lazy && t._initDefaultCheckedNode(this), this.updateLeafState(), this.parent && (this.level === 1 || this.parent.expanded === !0) && (this.canFocus = !0); } setData(t) { Array.isArray(t) || kO(this, t), this.data = t, this.childNodes = []; let n; this.level === 0 && Array.isArray(this.data) ? n = this.data : n = ev(this, "children") || []; for (let r = 0, o = n.length; r < o; r++) this.insertChild({ data: n[r] }); } get label() { return ev(this, "label"); } get key() { const t = this.store.key; return this.data ? this.data[t] : null; } get disabled() { return ev(this, "disabled"); } get nextSibling() { const t = this.parent; if (t) { const n = t.childNodes.indexOf(this); if (n > -1) return t.childNodes[n + 1]; } return null; } get previousSibling() { const t = this.parent; if (t) { const n = t.childNodes.indexOf(this); if (n > -1) return n > 0 ? t.childNodes[n - 1] : null; } return null; } contains(t, n = !0) { return (this.childNodes || []).some((r) => r === t || n && r.contains(t)); } remove() { const t = this.parent; t && t.removeChild(this); } insertChild(t, n, r) { if (!t) throw new Error("InsertChild error: child is required."); if (!(t instanceof Uv)) { if (!r) { const o = this.getChildren(!0); o.includes(t.data) || (typeof n > "u" || n < 0 ? o.push(t.data) : o.splice(n, 0, t.data)); } Object.assign(t, { parent: this, store: this.store }), t = en(new Uv(t)), t instanceof Uv && t.initialize(); } t.level = this.level + 1, typeof n > "u" || n < 0 ? this.childNodes.push(t) : this.childNodes.splice(n, 0, t), this.updateLeafState(); } insertBefore(t, n) { let r; n && (r = this.childNodes.indexOf(n)), this.insertChild(t, r); } insertAfter(t, n) { let r; n && (r = this.childNodes.indexOf(n), r !== -1 && (r += 1)), this.insertChild(t, r); } removeChild(t) { const n = this.getChildren() || [], r = n.indexOf(t.data); r > -1 && n.splice(r, 1); const o = this.childNodes.indexOf(t); o > -1 && (this.store && this.store.deregisterNode(t), t.parent = null, this.childNodes.splice(o, 1)), this.updateLeafState(); } removeChildByData(t) { let n = null; for (let r = 0; r < this.childNodes.length; r++) if (this.childNodes[r].data === t) { n = this.childNodes[r]; break; } n && this.removeChild(n); } expand(t, n) { const r = () => { if (n) { let o = this.parent; for (; o.level > 0; ) o.expanded = !0, o = o.parent; } this.expanded = !0, t && t(), this.childNodes.forEach((o) => { o.canFocus = !0; }); }; this.shouldLoadData() ? this.loadData((o) => { Array.isArray(o) && (this.checked ? this.setChecked(!0, !0) : this.store.checkStrictly || gp(this), r()); }) : r(); } doCreateChildren(t, n = {}) { t.forEach((r) => { this.insertChild(Object.assign({ data: r }, n), void 0, !0); }); } collapse() { this.expanded = !1, this.childNodes.forEach((t) => { t.canFocus = !1; }); } shouldLoadData() { return this.store.lazy === !0 && this.store.load && !this.loaded; } updateLeafState() { if (this.store.lazy === !0 && this.loaded !== !0 && typeof this.isLeafByUser < "u") { this.isLeaf = this.isLeafByUser; return; } const t = this.childNodes; if (!this.store.lazy || this.store.lazy === !0 && this.loaded === !0) { this.isLeaf = !t || t.length === 0; return; } this.isLeaf = !1; } setChecked(t, n, r, o) { if (this.indeterminate = t === "half", this.checked = t === !0, this.store.checkStrictly) return; if (!(this.shouldLoadData() && !this.store.checkDescendants)) { const { all: i, allWithoutDisable: s } = BC(this.childNodes); !this.isLeaf && !i && s && (this.checked = !1, t = !1); const l = () => { if (n) { const u = this.childNodes; for (let p = 0, h = u.length; p < h; p++) { const f = u[p]; o = o || t !== !1; const v = f.disabled ? f.checked : o; f.setChecked(v, n, !0, o); } const { half: c, all: d } = BC(u); d || (this.checked = d, this.indeterminate = c); } }; if (this.shouldLoadData()) { this.loadData(() => { l(), gp(this); }, { checked: t !== !1 }); return; } else l(); } const a = this.parent; !a || a.level === 0 || r || gp(a); } getChildren(t = !1) { if (this.level === 0) return this.data; const n = this.data; if (!n) return null; const r = this.store.props; let o = "children"; return r && (o = r.children || "children"), n[o] === void 0 && (n[o] = null), t && !n[o] && (n[o] = []), n[o]; } updateChildren() { const t = this.getChildren() || [], n = this.childNodes.map((a) => a.data), r = {}, o = []; t.forEach((a, i) => { const s = a[_c]; s && n.findIndex((l) => l[_c] === s) >= 0 ? r[s] = { index: i, data: a } : o.push({ index: i, data: a }); }), this.store.lazy || n.forEach((a) => { r[a[_c]] || this.removeChildByData(a); }), o.forEach(({ index: a, data: i }) => { this.insertChild({ data: i }, a); }), this.updateLeafState(); } loadData(t, n = {}) { if (this.store.lazy === !0 && this.store.load && !this.loaded && (!this.loading || Object.keys(n).length)) { this.loading = !0; const r = (a) => { this.childNodes = [], this.doCreateChildren(a, n), this.loaded = !0, this.loading = !1, this.updateLeafState(), t && t.call(this, a); }, o = () => { this.loading = !1; }; this.store.load(this, r, o); } else t && t.call(this); } eachNode(t) { const n = [this]; for (; n.length; ) { const r = n.shift(); n.unshift(...r.childNodes), t(r); } } reInitChecked() { this.store.checkStrictly || gp(this); } }, oge = class { constructor(t) { this.currentNode = null, this.currentNodeKey = null; for (const n in t) lu(t, n) && (this[n] = t[n]); this.nodesMap = {}; } initialize() { if (this.root = new zC({ data: this.data, store: this }), this.root.initialize(), this.lazy && this.load) { const t = this.load; t(this.root, (n) => { this.root.doCreateChildren(n), this._initDefaultCheckedNodes(); }); } else this._initDefaultCheckedNodes(); } filter(t) { const n = this.filterNodeMethod, r = this.lazy, o = function(a) { const i = a.root ? a.root.childNodes : a.childNodes; if (i.forEach((s) => { s.visible = n.call(s, t, s.data, s), o(s); }), !a.visible && i.length) { let s = !0; s = !i.some((l) => l.visible), a.root ? a.root.visible = s === !1 : a.visible = s === !1; } t && a.visible && !a.isLeaf && (!r || a.loaded) && a.expand(); }; o(this); } setData(t) { t !== this.root.data ? (this.nodesMap = {}, this.root.setData(t), this._initDefaultCheckedNodes()) : this.root.updateChildren(); } getNode(t) { if (t instanceof zC) return t; const n = Tr(t) ? u$(this.key, t) : t; return this.nodesMap[n] || null; } insertBefore(t, n) { const r = this.getNode(n); r.parent.insertBefore({ data: t }, r); } insertAfter(t, n) { const r = this.getNode(n); r.parent.insertAfter({ data: t }, r); } remove(t) { const n = this.getNode(t); n && n.parent && (n === this.currentNode && (this.currentNode = null), n.parent.removeChild(n)); } append(t, n) { const r = Rg(n) ? this.root : this.getNode(n); r && r.insertChild({ data: t }); } _initDefaultCheckedNodes() { const t = this.defaultCheckedKeys || [], n = this.nodesMap; t.forEach((r) => { const o = n[r]; o && o.setChecked(!0, !this.checkStrictly); }); } _initDefaultCheckedNode(t) { (this.defaultCheckedKeys || []).includes(t.key) && t.setChecked(!0, !this.checkStrictly); } setDefaultCheckedKey(t) { t !== this.defaultCheckedKeys && (this.defaultCheckedKeys = t, this._initDefaultCheckedNodes()); } registerNode(t) { const n = this.key; !t || !t.data || (n ? t.key !== void 0 && (this.nodesMap[t.key] = t) : this.nodesMap[t.id] = t); } deregisterNode(t) { !this.key || !t || !t.data || (t.childNodes.forEach((n) => { this.deregisterNode(n); }), delete this.nodesMap[t.key]); } getCheckedNodes(t = !1, n = !1) { const r = [], o = function(a) { (a.root ? a.root.childNodes : a.childNodes).forEach((i) => { (i.checked || n && i.indeterminate) && (!t || t && i.isLeaf) && r.push(i.data), o(i); }); }; return o(this), r; } getCheckedKeys(t = !1) { return this.getCheckedNodes(t).map((n) => (n || {})[this.key]); } getHalfCheckedNodes() { const t = [], n = function(r) { (r.root ? r.root.childNodes : r.childNodes).forEach((o) => { o.indeterminate && t.push(o.data), n(o); }); }; return n(this), t; } getHalfCheckedKeys() { return this.getHalfCheckedNodes().map((t) => (t || {})[this.key]); } _getAllNodes() { const t = [], n = this.nodesMap; for (const r in n) lu(n, r) && t.push(n[r]); return t; } updateChildren(t, n) { const r = this.nodesMap[t]; if (!r) return; const o = r.childNodes; for (let a = o.length - 1; a >= 0; a--) { const i = o[a]; this.remove(i.data); } for (let a = 0, i = n.length; a < i; a++) { const s = n[a]; this.append(s, r.data); } } _setCheckedKeys(t, n = !1, r) { const o = this._getAllNodes().sort((l, u) => l.level - u.level), a = /* @__PURE__ */ Object.create(null), i = Object.keys(r); o.forEach((l) => l.setChecked(!1, !1)); const s = (l) => { l.childNodes.forEach((u) => { var c; a[u.data[t]] = !0, (c = u.childNodes) != null && c.length && s(u); }); }; for (let l = 0, u = o.length; l < u; l++) { const c = o[l], d = c.data[t].toString(); if (!i.includes(d)) { c.checked && !a[d] && c.setChecked(!1, !1); continue; } if (c.childNodes.length && s(c), c.isLeaf || this.checkStrictly) { c.setChecked(!0, !1); continue; } if (c.setChecked(!0, !0), n) { c.setChecked(!1, !1); const p = function(h) { h.childNodes.forEach((f) => { f.isLeaf || f.setChecked(!1, !1), p(f); }); }; p(c); } } } setCheckedNodes(t, n = !1) { const r = this.key, o = {}; t.forEach((a) => { o[(a || {})[r]] = !0; }), this._setCheckedKeys(r, n, o); } setCheckedKeys(t, n = !1) { this.defaultCheckedKeys = t; const r = this.key, o = {}; t.forEach((a) => { o[a] = !0; }), this._setCheckedKeys(r, n, o); } setDefaultExpandedKeys(t) { t = t || [], this.defaultExpandedKeys = t, t.forEach((n) => { const r = this.getNode(n); r && r.expand(null, this.autoExpandParent); }); } setChecked(t, n, r) { const o = this.getNode(t); o && o.setChecked(!!n, r); } getCurrentNode() { return this.currentNode; } setCurrentNode(t) { const n = this.currentNode; n && (n.isCurrent = !1), this.currentNode = t, this.currentNode.isCurrent = !0; } setUserCurrentNode(t, n = !0) { const r = t[this.key], o = this.nodesMap[r]; this.setCurrentNode(o), n && this.currentNode.level > 1 && this.currentNode.parent.expand(null, !0); } setCurrentNodeKey(t, n = !0) { if (t == null) { this.currentNode && (this.currentNode.isCurrent = !1), this.currentNode = null; return; } const r = this.getNode(t); r && (this.setCurrentNode(r), n && this.currentNode.level > 1 && this.currentNode.parent.expand(null, !0)); } }; const age = W({ name: "ElTreeNodeContent", props: { node: { type: Object, required: !0 }, renderContent: Function }, setup(e) { const t = Lt("tree"), n = be("NodeInstance"), r = be("RootTree"); return () => { const o = e.node, { data: a, store: i } = o; return e.renderContent ? e.renderContent(Gt, { _self: n, node: o, data: a, store: i }) : ue(r.ctx.slots, "default", { node: o, data: a }, () => [ Gt("span", { class: t.be("node", "label") }, [o.label]) ]); }; } }); var ige = /* @__PURE__ */ It(age, [["__file", "tree-node-content.vue"]]); function hB(e) { const t = be("TreeNodeMap", null), n = { treeNodeExpand: (r) => { e.node !== r && e.node.collapse(); }, children: [] }; return t && t.children.push(n), nt("TreeNodeMap", n), { broadcastExpanded: (r) => { if (e.accordion) for (const o of n.children) o.treeNodeExpand(r); } }; } const vB = Symbol("dragEvents"); function sge({ props: e, ctx: t, el$: n, dropIndicator$: r, store: o }) { const a = Lt("tree"), i = z({ showDropIndicator: !1, draggingNode: null, dropNode: null, allowDrop: !0, dropType: null }); return nt(vB, { treeNodeDragStart: ({ event: s, treeNode: l }) => { if (typeof e.allowDrag == "function" && !e.allowDrag(l.node)) return s.preventDefault(), !1; s.dataTransfer.effectAllowed = "move"; try { s.dataTransfer.setData("text/plain", ""); } catch { } i.value.draggingNode = l, t.emit("node-drag-start", l.node, s); }, treeNodeDragOver: ({ event: s, treeNode: l }) => { const u = l, c = i.value.dropNode; c && c.node.id !== u.node.id && eu(c.$el, a.is("drop-inner")); const d = i.value.draggingNode; if (!d || !u) return; let p = !0, h = !0, f = !0, v = !0; typeof e.allowDrop == "function" && (p = e.allowDrop(d.node, u.node, "prev"), v = h = e.allowDrop(d.node, u.node, "inner"), f = e.allowDrop(d.node, u.node, "next")), s.dataTransfer.dropEffect = h || p || f ? "move" : "none", (p || h || f) && (c == null ? void 0 : c.node.id) !== u.node.id && (c && t.emit("node-drag-leave", d.node, c.node, s), t.emit("node-drag-enter", d.node, u.node, s)), p || h || f ? i.value.dropNode = u : i.value.dropNode = null, u.node.nextSibling === d.node && (f = !1), u.node.previousSibling === d.node && (p = !1), u.node.contains(d.node, !1) && (h = !1), (d.node === u.node || d.node.contains(u.node)) && (p = !1, h = !1, f = !1); const m = u.$el.querySelector(`.${a.be("node", "content")}`).getBoundingClientRect(), g = n.value.getBoundingClientRect(); let b; const x = p ? h ? 0.25 : f ? 0.45 : 1 : -1, w = f ? h ? 0.75 : p ? 0.55 : 0 : 1; let k = -9999; const C = s.clientY - m.top; C < m.height * x ? b = "before" : C > m.height * w ? b = "after" : h ? b = "inner" : b = "none"; const _ = u.$el.querySelector(`.${a.be("node", "expand-icon")}`).getBoundingClientRect(), $ = r.value; b === "before" ? k = _.top - g.top : b === "after" && (k = _.bottom - g.top), $.style.top = `${k}px`, $.style.left = `${_.right - g.left}px`, b === "inner" ? AC(u.$el, a.is("drop-inner")) : eu(u.$el, a.is("drop-inner")), i.value.showDropIndicator = b === "before" || b === "after", i.value.allowDrop = i.value.showDropIndicator || v, i.value.dropType = b, t.emit("node-drag-over", d.node, u.node, s); }, treeNodeDragEnd: (s) => { const { draggingNode: l, dropType: u, dropNode: c } = i.value; if (s.preventDefault(), s.dataTransfer && (s.dataTransfer.dropEffect = "move"), l && c) { const d = { data: l.node.data }; u !== "none" && l.node.remove(), u === "before" ? c.node.parent.insertBefore(d, c.node) : u === "after" ? c.node.parent.insertAfter(d, c.node) : u === "inner" && c.node.insertChild(d), u !== "none" && (o.value.registerNode(d), o.value.key && l.node.eachNode((p) => { var h; (h = o.value.nodesMap[p.data[o.value.key]]) == null || h.setChecked(p.checked, !o.value.checkStrictly); })), eu(c.$el, a.is("drop-inner")), t.emit("node-drag-end", l.node, c.node, u, s), u !== "none" && t.emit("node-drop", l.node, c.node, u, s); } l && !c && t.emit("node-drag-end", l.node, null, u, s), i.value.showDropIndicator = !1, i.value.draggingNode = null, i.value.dropNode = null, i.value.allowDrop = !0; } }), { dragState: i }; } const lge = W({ name: "ElTreeNode", components: { ElCollapseTransition: jhe, ElCheckbox: khe, NodeContent: ige, ElIcon: mr, Loading: Ei }, props: { node: { type: zC, default: () => ({}) }, props: { type: Object, default: () => ({}) }, accordion: Boolean, renderContent: Function, renderAfterExpand: Boolean, showCheckbox: { type: Boolean, default: !1 } }, emits: ["node-expand"], setup(e, t) { const n = Lt("tree"), { broadcastExpanded: r } = hB(e), o = be("RootTree"), a = z(!1), i = z(!1), s = z(null), l = z(null), u = z(null), c = be(vB), d = st(); nt("NodeInstance", d), o || Qn("Tree", "Can not find node's tree."), e.node.expanded && (a.value = !0, i.value = !0); const p = o.props.props.children || "children"; he(() => { const w = e.node.data[p]; return w && [...w]; }, () => { e.node.updateChildren(); }), he(() => e.node.indeterminate, (w) => { v(e.node.checked, w); }), he(() => e.node.checked, (w) => { v(w, e.node.indeterminate); }), he(() => e.node.childNodes.length, () => e.node.reInitChecked()), he(() => e.node.expanded, (w) => { Ke(() => a.value = w), w && (i.value = !0); }); const h = (w) => u$(o.props.nodeKey, w.data), f = (w) => { const k = e.props.class; if (!k) return {}; let C; if (ao(k)) { const { data: _ } = w; C = k(_, w); } else C = k; return Gr(C) ? { [C]: !0 } : C; }, v = (w, k) => { (s.value !== w || l.value !== k) && o.ctx.emit("check-change", e.node.data, w, k), s.value = w, l.value = k; }, m = (w) => { DC(o.store, o.ctx.emit, () => o.store.value.setCurrentNode(e.node)), o.currentNode.value = e.node, o.props.expandOnClickNode && b(), o.props.checkOnClickNode && !e.node.disabled && x(null, { target: { checked: !e.node.checked } }), o.ctx.emit("node-click", e.node.data, e.node, d, w); }, g = (w) => { o.instance.vnode.props.onNodeContextmenu && (w.stopPropagation(), w.preventDefault()), o.ctx.emit("node-contextmenu", w, e.node.data, e.node, d); }, b = () => { e.node.isLeaf || (a.value ? (o.ctx.emit("node-collapse", e.node.data, e.node, d), e.node.collapse()) : e.node.expand(() => { t.emit("node-expand", e.node.data, e.node, d); })); }, x = (w, k) => { e.node.setChecked(k.target.checked, !o.props.checkStrictly), Ke(() => { const C = o.store.value; o.ctx.emit("check", e.node.data, { checkedNodes: C.getCheckedNodes(), checkedKeys: C.getCheckedKeys(), halfCheckedNodes: C.getHalfCheckedNodes(), halfCheckedKeys: C.getHalfCheckedKeys() }); }); }; return { ns: n, node$: u, tree: o, expanded: a, childNodeRendered: i, oldChecked: s, oldIndeterminate: l, getNodeKey: h, getNodeClass: f, handleSelectChange: v, handleClick: m, handleContextMenu: g, handleExpandIconClick: b, handleCheckChange: x, handleChildNodeExpand: (w, k, C) => { r(k), o.ctx.emit("node-expand", w, k, C); }, handleDragStart: (w) => { o.props.draggable && c.treeNodeDragStart({ event: w, treeNode: e }); }, handleDragOver: (w) => { w.preventDefault(), o.props.draggable && c.treeNodeDragOver({ event: w, treeNode: { $el: u.value, node: e.node } }); }, handleDrop: (w) => { w.preventDefault(); }, handleDragEnd: (w) => { o.props.draggable && c.treeNodeDragEnd(w); }, CaretRight: KJ }; } }); function uge(e, t, n, r, o, a) { const i = Ve("el-icon"), s = Ve("el-checkbox"), l = Ve("loading"), u = Ve("node-content"), c = Ve("el-tree-node"), d = Ve("el-collapse-transition"); return Be((S(), L("div", { ref: "node$", class: H([ e.ns.b("node"), e.ns.is("expanded", e.expanded), e.ns.is("current", e.node.isCurrent), e.ns.is("hidden", !e.node.visible), e.ns.is("focusable", !e.node.disabled), e.ns.is("checked", !e.node.disabled && e.node.checked), e.getNodeClass(e.node) ]), role: "treeitem", tabindex: "-1", "aria-expanded": e.expanded, "aria-disabled": e.node.disabled, "aria-checked": e.node.checked, draggable: e.tree.props.draggable, "data-key": e.getNodeKey(e.node), onClick: Ge(e.handleClick, ["stop"]), onContextmenu: e.handleContextMenu, onDragstart: Ge(e.handleDragStart, ["stop"]), onDragover: Ge(e.handleDragOver, ["stop"]), onDragend: Ge(e.handleDragEnd, ["stop"]), onDrop: Ge(e.handleDrop, ["stop"]) }, [ D("div", { class: H(e.ns.be("node", "content")), style: Ye({ paddingLeft: (e.node.level - 1) * e.tree.props.indent + "px" }) }, [ e.tree.props.icon || e.CaretRight ? (S(), re(i, { key: 0, class: H([ e.ns.be("node", "expand-icon"), e.ns.is("leaf", e.node.isLeaf), { expanded: !e.node.isLeaf && e.expanded } ]), onClick: Ge(e.handleExpandIconClick, ["stop"]) }, { default: N(() => [ (S(), re(yt(e.tree.props.icon || e.CaretRight))) ]), _: 1 }, 8, ["class", "onClick"])) : J("v-if", !0), e.showCheckbox ? (S(), re(s, { key: 1, "model-value": e.node.checked, indeterminate: e.node.indeterminate, disabled: !!e.node.disabled, onClick: Ge(() => { }, ["stop"]), onChange: e.handleCheckChange }, null, 8, ["model-value", "indeterminate", "disabled", "onClick", "onChange"])) : J("v-if", !0), e.node.loading ? (S(), re(i, { key: 2, class: H([e.ns.be("node", "loading-icon"), e.ns.is("loading")]) }, { default: N(() => [ q(l) ]), _: 1 }, 8, ["class"])) : J("v-if", !0), q(u, { node: e.node, "render-content": e.renderContent }, null, 8, ["node", "render-content"]) ], 6), q(d, null, { default: N(() => [ !e.renderAfterExpand || e.childNodeRendered ? Be((S(), L("div", { key: 0, class: H(e.ns.be("node", "children")), role: "group", "aria-expanded": e.expanded }, [ (S(!0), L(Re, null, mt(e.node.childNodes, (p) => (S(), re(c, { key: e.getNodeKey(p), "render-content": e.renderContent, "render-after-expand": e.renderAfterExpand, "show-checkbox": e.showCheckbox, node: p, accordion: e.accordion, props: e.props, onNodeExpand: e.handleChildNodeExpand }, null, 8, ["render-content", "render-after-expand", "show-checkbox", "node", "accordion", "props", "onNodeExpand"]))), 128)) ], 10, ["aria-expanded"])), [ [ht, e.expanded] ]) : J("v-if", !0) ]), _: 1 }) ], 42, ["aria-expanded", "aria-disabled", "aria-checked", "draggable", "data-key", "onClick", "onContextmenu", "onDragstart", "onDragover", "onDragend", "onDrop"])), [ [ht, e.node.visible] ]); } var cge = /* @__PURE__ */ It(lge, [["render", uge], ["__file", "tree-node.vue"]]); function dge({ el$: e }, t) { const n = Lt("tree"), r = En([]), o = En([]); ut(() => { a(); }), Nf(() => { r.value = Array.from(e.value.querySelectorAll("[role=treeitem]")), o.value = Array.from(e.value.querySelectorAll("input[type=checkbox]")); }), he(o, (i) => { i.forEach((s) => { s.setAttribute("tabindex", "-1"); }); }), Zo(e, "keydown", (i) => { const s = i.target; if (!s.className.includes(n.b("node"))) return; const l = i.code; r.value = Array.from(e.value.querySelectorAll(`.${n.is("focusable")}[role=treeitem]`)); const u = r.value.indexOf(s); let c; if ([sr.up, sr.down].includes(l)) { if (i.preventDefault(), l === sr.up) { c = u === -1 ? 0 : u !== 0 ? u - 1 : r.value.length - 1; const p = c; for (; !t.value.getNode(r.value[c].dataset.key).canFocus; ) { if (c--, c === p) { c = -1; break; } c < 0 && (c = r.value.length - 1); } } else { c = u === -1 ? 0 : u < r.value.length - 1 ? u + 1 : 0; const p = c; for (; !t.value.getNode(r.value[c].dataset.key).canFocus; ) { if (c++, c === p) { c = -1; break; } c >= r.value.length && (c = 0); } } c !== -1 && r.value[c].focus(); } [sr.left, sr.right].includes(l) && (i.preventDefault(), s.click()); const d = s.querySelector('[type="checkbox"]'); [sr.enter, sr.space].includes(l) && d && (i.preventDefault(), d.click()); }); const a = () => { var i; r.value = Array.from(e.value.querySelectorAll(`.${n.is("focusable")}[role=treeitem]`)), o.value = Array.from(e.value.querySelectorAll("input[type=checkbox]")); const s = e.value.querySelectorAll(`.${n.is("checked")}[role=treeitem]`); if (s.length) { s[0].setAttribute("tabindex", "0"); return; } (i = r.value[0]) == null || i.setAttribute("tabindex", "0"); }; } const pge = W({ name: "ElTree", components: { ElTreeNode: cge }, props: { data: { type: Array, default: () => [] }, emptyText: { type: String }, renderAfterExpand: { type: Boolean, default: !0 }, nodeKey: String, checkStrictly: Boolean, defaultExpandAll: Boolean, expandOnClickNode: { type: Boolean, default: !0 }, checkOnClickNode: Boolean, checkDescendants: { type: Boolean, default: !1 }, autoExpandParent: { type: Boolean, default: !0 }, defaultCheckedKeys: Array, defaultExpandedKeys: Array, currentNodeKey: [String, Number], renderContent: Function, showCheckbox: { type: Boolean, default: !1 }, draggable: { type: Boolean, default: !1 }, allowDrag: Function, allowDrop: Function, props: { type: Object, default: () => ({ children: "children", label: "label", disabled: "disabled" }) }, lazy: { type: Boolean, default: !1 }, highlightCurrent: Boolean, load: Function, filterNodeMethod: Function, accordion: Boolean, indent: { type: Number, default: 18 }, icon: { type: rl } }, emits: [ "check-change", "current-change", "node-click", "node-contextmenu", "node-collapse", "node-expand", "check", "node-drag-start", "node-drag-end", "node-drop", "node-drag-leave", "node-drag-enter", "node-drag-over" ], setup(e, t) { const { t: n } = Gf(), r = Lt("tree"), o = be(Qf, null), a = z(new oge({ key: e.nodeKey, data: e.data, lazy: e.lazy, props: e.props, load: e.load, currentNodeKey: e.currentNodeKey, checkStrictly: e.checkStrictly, checkDescendants: e.checkDescendants, defaultCheckedKeys: e.defaultCheckedKeys, defaultExpandedKeys: e.defaultExpandedKeys, autoExpandParent: e.autoExpandParent, defaultExpandAll: e.defaultExpandAll, filterNodeMethod: e.filterNodeMethod })); a.value.initialize(); const i = z(a.value.root), s = z(null), l = z(null), u = z(null), { broadcastExpanded: c } = hB(e), { dragState: d } = sge({ props: e, ctx: t, el$: l, dropIndicator$: u, store: a }); dge({ el$: l }, a); const p = E(() => { const { childNodes: U } = i.value, G = o ? o.hasFilteredOptions !== 0 : !1; return (!U || U.length === 0 || U.every(({ visible: se }) => !se)) && !G; }); he(() => e.currentNodeKey, (U) => { a.value.setCurrentNodeKey(U); }), he(() => e.defaultCheckedKeys, (U) => { a.value.setDefaultCheckedKey(U); }), he(() => e.defaultExpandedKeys, (U) => { a.value.setDefaultExpandedKeys(U); }), he(() => e.data, (U) => { a.value.setData(U); }, { deep: !0 }), he(() => e.checkStrictly, (U) => { a.value.checkStrictly = U; }); const h = (U) => { if (!e.filterNodeMethod) throw new Error("[Tree] filterNodeMethod is required when filter"); a.value.filter(U); }, f = (U) => u$(e.nodeKey, U.data), v = (U) => { if (!e.nodeKey) throw new Error("[Tree] nodeKey is required in getNodePath"); const G = a.value.getNode(U); if (!G) return []; const se = [G.data]; let ae = G.parent; for (; ae && ae !== i.value; ) se.push(ae.data), ae = ae.parent; return se.reverse(); }, m = (U, G) => a.value.getCheckedNodes(U, G), g = (U) => a.value.getCheckedKeys(U), b = () => { const U = a.value.getCurrentNode(); return U ? U.data : null; }, x = () => { if (!e.nodeKey) throw new Error("[Tree] nodeKey is required in getCurrentKey"); const U = b(); return U ? U[e.nodeKey] : null; }, w = (U, G) => { if (!e.nodeKey) throw new Error("[Tree] nodeKey is required in setCheckedNodes"); a.value.setCheckedNodes(U, G); }, k = (U, G) => { if (!e.nodeKey) throw new Error("[Tree] nodeKey is required in setCheckedKeys"); a.value.setCheckedKeys(U, G); }, C = (U, G, se) => { a.value.setChecked(U, G, se); }, _ = () => a.value.getHalfCheckedNodes(), $ = () => a.value.getHalfCheckedKeys(), O = (U, G = !0) => { if (!e.nodeKey) throw new Error("[Tree] nodeKey is required in setCurrentNode"); DC(a, t.emit, () => { c(U), a.value.setUserCurrentNode(U, G); }); }, F = (U, G = !0) => { if (!e.nodeKey) throw new Error("[Tree] nodeKey is required in setCurrentKey"); DC(a, t.emit, () => { c(), a.value.setCurrentNodeKey(U, G); }); }, A = (U) => a.value.getNode(U), T = (U) => { a.value.remove(U); }, R = (U, G) => { a.value.append(U, G); }, M = (U, G) => { a.value.insertBefore(U, G); }, j = (U, G) => { a.value.insertAfter(U, G); }, P = (U, G, se) => { c(G), t.emit("node-expand", U, G, se); }, V = (U, G) => { if (!e.nodeKey) throw new Error("[Tree] nodeKey is required in updateKeyChild"); a.value.updateChildren(U, G); }; return nt("RootTree", { ctx: t, props: e, store: a, root: i, currentNode: s, instance: st() }), nt(tf, void 0), { ns: r, store: a, root: i, currentNode: s, dragState: d, el$: l, dropIndicator$: u, isEmpty: p, filter: h, getNodeKey: f, getNodePath: v, getCheckedNodes: m, getCheckedKeys: g, getCurrentNode: b, getCurrentKey: x, setCheckedNodes: w, setCheckedKeys: k, setChecked: C, getHalfCheckedNodes: _, getHalfCheckedKeys: $, setCurrentNode: O, setCurrentKey: F, t: n, getNode: A, remove: T, append: R, insertBefore: M, insertAfter: j, handleNodeExpand: P, updateKeyChildren: V }; } }); function fge(e, t, n, r, o, a) { const i = Ve("el-tree-node"); return S(), L("div", { ref: "el$", class: H([ e.ns.b(), e.ns.is("dragging", !!e.dragState.draggingNode), e.ns.is("drop-not-allow", !e.dragState.allowDrop), e.ns.is("drop-inner", e.dragState.dropType === "inner"), { [e.ns.m("highlight-current")]: e.highlightCurrent } ]), role: "tree" }, [ (S(!0), L(Re, null, mt(e.root.childNodes, (s) => (S(), re(i, { key: e.getNodeKey(s), node: s, props: e.props, accordion: e.accordion, "render-after-expand": e.renderAfterExpand, "show-checkbox": e.showCheckbox, "render-content": e.renderContent, onNodeExpand: e.handleNodeExpand }, null, 8, ["node", "props", "accordion", "render-after-expand", "show-checkbox", "render-content", "onNodeExpand"]))), 128)), e.isEmpty ? (S(), L("div", { key: 0, class: H(e.ns.e("empty-block")) }, [ ue(e.$slots, "empty", {}, () => { var s; return [ D("span", { class: H(e.ns.e("empty-text")) }, ge((s = e.emptyText) != null ? s : e.t("el.tree.emptyText")), 3) ]; }) ], 2)) : J("v-if", !0), Be(D("div", { ref: "dropIndicator$", class: H(e.ns.e("drop-indicator")) }, null, 2), [ [ht, e.dragState.showDropIndicator] ]) ], 2); } var hge = /* @__PURE__ */ It(pge, [["render", fge], ["__file", "tree.vue"]]); _r(hge); function vge(e) { let t; const n = z(!1), r = en({ ...e, originalPosition: "", originalOverflow: "", visible: !1 }); function o(p) { r.text = p; } function a() { const p = r.parent, h = d.ns; if (!p.vLoadingAddClassList) { let f = p.getAttribute("loading-number"); f = Number.parseInt(f) - 1, f ? p.setAttribute("loading-number", f.toString()) : (eu(p, h.bm("parent", "relative")), p.removeAttribute("loading-number")), eu(p, h.bm("parent", "hidden")); } i(), c.unmount(); } function i() { var p, h; (h = (p = d.$el) == null ? void 0 : p.parentNode) == null || h.removeChild(d.$el); } function s() { var p; e.beforeClose && !e.beforeClose() || (n.value = !0, clearTimeout(t), t = setTimeout(l, 400), r.visible = !1, (p = e.closed) == null || p.call(e)); } function l() { if (!n.value) return; const p = r.parent; n.value = !1, p.vLoadingAddClassList = void 0, a(); } const u = W({ name: "ElLoading", setup(p, { expose: h }) { const { ns: f, zIndex: v } = tpe("loading"); return h({ ns: f, zIndex: v }), () => { const m = r.spinner || r.svg, g = Gt("svg", { class: "circular", viewBox: r.svgViewBox ? r.svgViewBox : "0 0 50 50", ...m ? { innerHTML: m } : {} }, [ Gt("circle", { class: "path", cx: "25", cy: "25", r: "20", fill: "none" }) ]), b = r.text ? Gt("p", { class: f.b("text") }, [r.text]) : void 0; return Gt(nr, { name: f.b("fade"), onAfterLeave: l }, { default: N(() => [ Be(q("div", { style: { backgroundColor: r.background || "" }, class: [ f.b("mask"), r.customClass, r.fullscreen ? "is-fullscreen" : "" ] }, [ Gt("div", { class: f.b("spinner") }, [g, b]) ]), [[ht, r.visible]]) ]) }); }; } }), c = A0(u), d = c.mount(document.createElement("div")); return { ...Cr(r), setText: o, removeElLoadingChild: i, close: s, handleAfterLeave: l, vm: d, get $el() { return d.$el; } }; } let tv; const gge = function(e = {}) { if (!Jn) return; const t = mge(e); if (t.fullscreen && tv) return tv; const n = vge({ ...t, closed: () => { var o; (o = t.closed) == null || o.call(t), t.fullscreen && (tv = void 0); } }); yge(t, t.parent, n), CO(t, t.parent, n), t.parent.vLoadingAddClassList = () => CO(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), Ke(() => n.visible.value = t.visible), t.fullscreen && (tv = n), n; }, mge = (e) => { var t, n, r, o; let a; return Gr(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 }; }, yge = async (e, t, n) => { const { nextZIndex: r } = n.vm.zIndex || n.vm._.exposed.zIndex, o = {}; if (e.fullscreen) n.originalPosition.value = Xd(document.body, "position"), n.originalOverflow.value = Xd(document.body, "overflow"), o.zIndex = r(); else if (e.parent === document.body) { n.originalPosition.value = Xd(document.body, "position"), await Ke(); for (const a of ["top", "left"]) { const i = a === "top" ? "scrollTop" : "scrollLeft"; o[a] = `${e.target.getBoundingClientRect()[a] + document.body[i] + document.documentElement[i] - Number.parseInt(Xd(document.body, `margin-${a}`), 10)}px`; } for (const a of ["height", "width"]) o[a] = `${e.target.getBoundingClientRect()[a]}px`; } else n.originalPosition.value = Xd(t, "position"); for (const [a, i] of Object.entries(o)) n.$el.style[a] = i; }, CO = (e, t, n) => { const r = n.vm.ns || n.vm._.exposed.ns; ["absolute", "fixed", "sticky"].includes(n.originalPosition.value) ? eu(t, r.bm("parent", "relative")) : AC(t, r.bm("parent", "relative")), e.fullscreen && e.lock ? AC(t, r.bm("parent", "hidden")) : eu(t, r.bm("parent", "hidden")); }, qv = Symbol("ElLoading"), _O = (e, t) => { var n, r, o, a; const i = t.instance, s = (p) => Tr(t.value) ? t.value[p] : void 0, l = (p) => { const h = Gr(p) && (i == null ? void 0 : i[p]) || p; return h && z(h); }, u = (p) => l(s(p) || e.getAttribute(`element-loading-${Sie(p)}`)), c = (n = s("fullscreen")) != null ? n : t.modifiers.fullscreen, d = { text: u("text"), svg: u("svg"), svgViewBox: u("svgViewBox"), spinner: u("spinner"), background: u("background"), customClass: u("customClass"), fullscreen: c, target: (r = s("target")) != null ? r : c ? void 0 : e, body: (o = s("body")) != null ? o : t.modifiers.body, lock: (a = s("lock")) != null ? a : t.modifiers.lock }; e[qv] = { options: d, instance: gge(d) }; }, bge = (e, t) => { for (const n of Object.keys(t)) xn(t[n]) && (t[n].value = e[n]); }, wge = { mounted(e, t) { t.value && _O(e, t); }, updated(e, t) { const n = e[qv]; t.oldValue !== t.value && (t.value && !t.oldValue ? _O(e, t) : t.value && t.oldValue ? Tr(t.value) && bge(t.value, n.options) : n == null || n.instance.close()); }, unmounted(e) { var t; (t = e[qv]) == null || t.instance.close(), e[qv] = null; } }, wl = (e, t) => { const n = e.__vccOpts || e; for (const [r, o] of t) n[r] = o; return n; }, xge = "Copy to clipboard", kge = "Copied!", Cge = { name: "CopyToClipboard", props: { content: { type: String, default: "" }, label: { type: String, default: xge }, /** * `theme: light` will show white button, * to use when the button is over other readable text content. * Default button is transparent. */ theme: { type: String, default: "" } }, data: function() { return { textLabel: this.label, autoHideTimeout: 0, tooltipContainer: null }; }, mounted() { const e = document.querySelector(".mapcontent"); e ? this.tooltipContainer = e : this.tooltipContainer = document.body; }, methods: { copyToClipboard: async function() { let e = !0; this.autoHideTimeout = 600; try { const t = this.content.replaceAll(` `, ""), n = document.createElement("div"); n.innerHTML = this.content; const r = n.textContent || n.innerText || "", o = new Blob([t], { type: "text/html" }), a = new Blob([r], { type: "text/plain" }), i = new ClipboardItem({ "text/html": o, "text/plain": a }); await navigator.clipboard.write([i]); } catch (t) { console.error( "Error when trying to use navigator.clipboard.write()", t ), e = !1; } e ? this.textLabel = kge : this.textLabel = "Error trying to copy to clipboard!"; }, resetSettings: function() { this.autoHideTimeout = 0, this.textLabel = this.label; } } }, _ge = { class: "visually-hidden" }; function Sge(e, t, n, r, o, a) { const i = vC, s = mr, l = ua, u = Jf; return S(), re(u, { content: e.textLabel, placement: "bottom", "hide-after": e.autoHideTimeout, effect: "clipboard-tooltip", onHide: a.resetSettings, teleported: !0, "append-to": e.tooltipContainer }, { default: N(() => [ q(l, { class: H(["copy-clipboard-button", n.theme]), size: "small", onClick: a.copyToClipboard, disabled: !n.content }, { default: N(() => [ q(s, { color: n.content ? "#8300bf" : "#dab3ec" }, { default: N(() => [ q(i) ]), _: 1 }, 8, ["color"]), D("span", _ge, ge(e.textLabel), 1) ]), _: 1 }, 8, ["class", "onClick", "disabled"]) ]), _: 1 }, 8, ["content", "hide-after", "onHide", "append-to"]); } const Ru = /* @__PURE__ */ wl(Cge, [["render", Sge], ["__scopeId", "data-v-91c822cd"]]), $ge = { name: "AnnotationPopup", props: { annotationEntry: { type: Array } }, inject: ["$annotator", "userApiKey"], data: function() { return { displayPair: { "Feature ID": "featureId", Label: "label", Ontology: "models", Name: "name", Resource: "resourceId" }, editing: !1, evidencePrefixes: [ { value: "DOI:", label: "DOI:" }, { value: "PMID:", label: "PMID:" }, { value: "", label: "Other:" } ], evidencePrefix: "DOI:", evidence: [], authenticated: !1, newEvidence: "", comment: "", prevSubs: [], showSubmissions: !0, errorMessage: "", creator: void 0, copyContent: "", entryIndex: 0 }; }, computed: { entry: function() { return this.annotationEntry[this.entryIndex]; }, previousLabel: function() { var e; return this.entryIndex === 0 ? "This is the first item. Click 'Next' to see more information." : (e = this.annotationEntry[this.entryIndex - 1]) == null ? void 0 : e.label; }, nextLabel: function() { var e; return this.entryIndex === this.annotationEntry.length - 1 ? "This is the last item. Click 'Previous' to see more information." : (e = this.annotationEntry[this.entryIndex + 1]) == null ? void 0 : e.label; }, isEditable: function() { return this.entry.resourceId && this.entry.featureId; }, isPositionUpdated: function() { return this.entry.resourceId && this.entry.type === "updated" && this.entry.positionUpdated; }, isDeleted: function() { return this.entry.resourceId && this.entry.type === "deleted"; }, ontologyLink: function() { const e = this.entry.models; if (e && e.startsWith("UBERON")) return `http://purl.obolibrary.org/obo/${this.entry.models.replace(":", "_")}`; }, updatedCopyContent: function() { return this.getUpdateCopyContent(); }, offlineAnnotationEnabled: function() { return this.entry ? this.entry.offline : !1; } }, methods: { previous: function() { this.entryIndex !== 0 && (this.entryIndex = this.entryIndex - 1, this.emitActiveItemChange()); }, next: function() { this.entryIndex !== this.annotationEntry.length - 1 && (this.entryIndex = this.entryIndex + 1, this.emitActiveItemChange()); }, emitActiveItemChange: function() { const e = { tabType: "annotation" }, t = this.annotationEntry[this.entryIndex], n = { ...e, ...t }; this.$emit("hover-changed", n); }, processEvidences: function(e) { var t; const n = []; return (t = e == null ? void 0 : e.body) != null && t.evidence && e.body.evidence.forEach((r) => { if (typeof r == "object") n.push(r); else { const o = {}; if (r.includes("https://doi.org/")) { const a = r.replace("https://doi.org/", "DOI:"); o[a] = r; } else if (r.includes("https://pubmed.ncbi.nlm.nih.gov/")) { const a = r.replace("https://pubmed.ncbi.nlm.nih.gov/", "PMID:"); o[a] = r; } Object.keys(o).length > 0 ? n.push(o) : n.push(r); } }), n; }, evidenceEntered: function(e) { e && (this.evidence.push(this.evidencePrefix + e), this.newEvidence = ""); }, formatTime: function(e) { const t = { year: "numeric", month: "long", day: "numeric", hour: "numeric", minute: "numeric", second: "numeric" }; return new Date(e).toLocaleDateString(void 0, t); }, updatePrevSubmissions: function() { var e; if (this.offlineAnnotationEnabled) { const t = JSON.parse(sessionStorage.getItem("anonymous-annotation")) || []; this.prevSubs = t.filter((n) => n.resource === this.entry.resourceId && n.item.id === this.entry.featureId); } else this.$annotator && this.authenticated && this.entry.resourceId && this.entry.featureId && ((e = this.$annotator) == null || e.itemAnnotations( this.userApiKey, this.entry.resourceId, this.entry.featureId ).then((t) => { this.prevSubs = t; }).catch((t) => { console.log(t); })); }, submit: function() { var e; if (this.entry.type === "updated" && this.entry.positionUpdated ? this.comment = this.comment ? `Position Updated: ${this.comment}` : "Position Updated" : this.entry.type === "deleted" && (this.comment = this.comment ? `Feature Deleted: ${this.comment}` : "Feature Deleted"), (this.evidence.length > 0 || this.comment) && this.entry.resourceId && this.entry.featureId) { const t = []; this.evidence.forEach((r) => { if (r.includes("DOI:")) { const o = r.replace("DOI:", "https://doi.org/"); t.push(new URL(o)); } else if (r.includes("PMID:")) { const o = r.replace( "PMID:", "https://pubmed.ncbi.nlm.nih.gov/" ); t.push(new URL(o)); } else t.push(r); }); const n = { resource: this.entry.resourceId, item: Object.assign( { id: this.entry.featureId }, Object.fromEntries( Object.entries(this.entry).filter( ([r]) => ["label", "models"].includes(r) ) ) ), body: { evidence: t, comment: this.comment }, feature: this.entry.feature }; Object.assign(n.body, this.entry.body), this.entry.type === "deleted" && (n.feature = void 0), this.creator && (n.creator = this.creator), (e = this.$annotator) == null || e.addAnnotation(this.userApiKey, n).then(() => { this.errorMessage = "", this.resetSubmission(), this.updatePrevSubmissions(); }).catch(() => { this.errorMessage = "There is a problem with the submission, please try again later"; }), this.$emit("annotation", n); } }, removeEvidence: function(e) { this.evidence.splice(e, 1); }, resetSubmission: function() { this.editing = !1, this.evidence = [], this.newFeature = "", this.comment = ""; }, getUpdateCopyContent: function() { if (!this.entry) return ""; const e = []; if (this.entry.featureId && e.push(`
Feature ID:${this.entry.featureId}
`), this.entry.label && e.push(`
Label:${this.entry.label}
`), this.entry.models && (e.push(`
Ontology:${this.entry.models}
`), this.ontologyLink && e.push(`
Ontology Link:${this.ontologyLink}
`)), this.entry.resourceId && e.push(`
Resource:${this.entry.resourceId}
`), this.prevSubs.length) { let t = `
Annotations:

`; this.prevSubs.map((n, r) => { if (n.creator && (t += `
Created:${this.formatTime(n.created)}

`, t += `
Creator:${n.creator.name}

`, t += `
Email:${n.creator.email}

`), n.body.evidence.length) { let o = ""; n.body.evidence.forEach((a, i) => { o += `${typeof a == "object" ? Object.values(a)[0] : a}`, i !== n.body.evidence.length - 1 && (o += ", "); }), t += `
Evidence:${o}

`; } t += `
Comment:${n.body.comment}

`; }), e.push(`
${t}
`); } return e.join(`
`); } }, watch: { annotationEntry: { deep: !0, immediate: !0, handler: function(e, t) { e !== t && (this.entryIndex = 0, e != null && e.length && this.emitActiveItemChange()); } }, entry: { deep: !0, immediate: !0, handler: function(e, t) { e && e !== t && (this.resetSubmission(), this.updatePrevSubmissions()); } } }, mounted: function() { var e; (e = this.$annotator) == null || e.authenticate(this.userApiKey).then((t) => { t.name && t.email && t.canUpdate ? (this.creator = t, t.orcid || (this.creator.orcid = "0000-0000-0000-0000"), this.authenticated = !0) : this.errorMessage = "", this.updatePrevSubmissions(); }); } }, Nu = (e) => (Ci("data-v-52f81058"), e = e(), _i(), e), Ege = { key: 0, class: "toggle-button" }, Oge = { class: "block" }, Fge = /* @__PURE__ */ Nu(() => /* @__PURE__ */ D("div", { class: "title" }, "Feature Annotations", -1)), Tge = { class: "title-buttons" }, Age = { key: 0 }, Ige = ["href"], Pge = /* @__PURE__ */ Nu(() => /* @__PURE__ */ D("strong", { class: "sub-title" }, "Previous submissions:", -1)), Lge = /* @__PURE__ */ Nu(() => /* @__PURE__ */ D("strong", null, "Evidence:  ", -1)), Rge = ["href"], Nge = { key: 1 }, Mge = { key: 2 }, Dge = /* @__PURE__ */ Nu(() => /* @__PURE__ */ D("strong", null, "Comment:  ", -1)), Bge = /* @__PURE__ */ Nu(() => /* @__PURE__ */ D("strong", { class: "sub-title" }, "Suggest changes:", -1)), zge = /* @__PURE__ */ Nu(() => /* @__PURE__ */ D("strong", null, "Evidence:", -1)), jge = /* @__PURE__ */ Nu(() => /* @__PURE__ */ D("strong", null, "Comment:", -1)), Vge = { class: "sub-title" }; function Hge(e, t, n, r, o, a) { const i = ua, s = fB, l = Ru, u = oB, c = iS, d = mr, p = ma, h = uQ, f = Eg, v = dQ, m = a$, g = Bo, b = Gve, x = Kve, w = um, k = s$; return S(), re(k, { class: "main" }, { default: N(() => [ n.annotationEntry.length > 1 ? (S(), L("div", Ege, [ q(s, { width: "auto", trigger: "hover", teleported: !1 }, { reference: N(() => [ q(i, { class: "button", onClick: a.previous, disabled: this.entryIndex === 0 }, { default: N(() => [ Oe(" Previous ") ]), _: 1 }, 8, ["onClick", "disabled"]) ]), default: N(() => [ D("span", null, ge(a.previousLabel), 1) ]), _: 1 }), q(s, { width: "auto", trigger: "hover", teleported: !1 }, { reference: N(() => [ q(i, { class: "button", onClick: a.next, disabled: this.entryIndex === this.annotationEntry.length - 1 }, { default: N(() => [ Oe(" Next ") ]), _: 1 }, 8, ["onClick", "disabled"]) ]), default: N(() => [ D("span", null, ge(a.nextLabel), 1) ]), _: 1 }) ])) : J("", !0), D("div", Oge, [ q(u, { class: "info-field" }, { default: N(() => [ Fge, D("div", Tge, [ q(l, { content: a.updatedCopyContent }, null, 8, ["content"]) ]) ]), _: 1 }), a.entry ? (S(), L(Re, { key: 0 }, [ (S(!0), L(Re, null, mt(e.displayPair, (C, _) => Be((S(), re(u, { class: "dialog-text", key: C }, { default: N(() => [ D("strong", null, ge(_) + ": ", 1), Oe("  "), _ !== "Ontology" ? (S(), L("span", Age, ge(a.entry[C]), 1)) : (S(), L("a", { key: 1, href: a.ontologyLink, target: "_blank" }, ge(a.entry[C]), 9, Ige)) ]), _: 2 }, 1024)), [ [ht, a.entry[C]] ])), 128)), e.prevSubs.length > 0 ? (S(), L(Re, { key: 0 }, [ Be(D("div", { class: "hide", onClick: t[0] || (t[0] = (C) => e.showSubmissions = !1) }, [ Oe(" Hide previous submissions "), q(d, null, { default: N(() => [ q(c) ]), _: 1 }) ], 512), [ [ht, e.showSubmissions] ]), Be(D("div", { class: "hide", onClick: t[1] || (t[1] = (C) => e.showSubmissions = !0) }, [ Oe(" Show previous " + ge(e.prevSubs.length) + " submission(s) ", 1), q(d, null, { default: N(() => [ q(p) ]), _: 1 }) ], 512), [ [ht, !e.showSubmissions] ]), e.showSubmissions ? (S(), L(Re, { key: 0 }, [ q(u, { class: "dialog-spacer" }), q(u, { class: "dialog-text" }, { default: N(() => [ Pge ]), _: 1 }), (S(!0), L(Re, null, mt(e.prevSubs, (C, _) => (S(), L("div", { class: "entry", key: _ }, [ C.creator ? (S(), re(u, { key: 0, class: "dialog-text" }, { default: N(() => [ D("strong", null, ge(a.formatTime(C.created)), 1), Oe(" " + ge(C.creator.name), 1) ]), _: 2 }, 1024)) : J("", !0), q(u, { class: "dialog-text" }, { default: N(() => [ Lge, (S(!0), L(Re, null, mt(a.processEvidences(C), ($, O) => (S(), re(u, { key: $, class: "dialog-text" }, { default: N(() => [ typeof $ == "object" ? (S(), L("a", { key: 0, href: Object.values($)[0], target: "_blank" }, ge(Object.keys($)[0]), 9, Rge)) : (S(), L("span", Nge, ge($), 1)), O !== C.body.evidence.length - 1 ? (S(), L("span", Mge, ", ")) : J("", !0) ]), _: 2 }, 1024))), 128)) ]), _: 2 }, 1024), q(u, { class: "dialog-text" }, { default: N(() => [ Dge, Oe(" " + ge(C.body.comment), 1) ]), _: 2 }, 1024) ]))), 128)) ], 64)) : J("", !0) ], 64)) : J("", !0), e.authenticated || a.offlineAnnotationEnabled ? (S(), L(Re, { key: 1 }, [ a.isEditable ? (S(), L(Re, { key: 0 }, [ q(u, { class: "dialog-spacer" }), e.editing ? (S(), L(Re, { key: 1 }, [ q(u, { class: "dialog-text" }, { default: N(() => [ Bge ]), _: 1 }), a.isDeleted ? J("", !0) : (S(), L(Re, { key: 0 }, [ q(u, { class: "dialog-text" }, { default: N(() => [ zge ]), _: 1 }), (S(!0), L(Re, null, mt(e.evidence, (C, _) => (S(), re(u, { key: C }, { default: N(() => [ q(m, { span: 20 }, { default: N(() => [ Oe(ge(e.evidence[_]), 1) ]), _: 2 }, 1024), q(m, { span: 4 }, { default: N(() => [ q(d, { class: "standard-icon" }, { default: N(() => [ q(g, { onClick: ($) => a.removeEvidence(_) }, null, 8, ["onClick"]) ]), _: 2 }, 1024) ]), _: 2 }, 1024) ]), _: 2 }, 1024))), 128)), q(u, null, { default: N(() => [ q(w, { size: "small", placeholder: "Enter", modelValue: e.newEvidence, "onUpdate:modelValue": t[4] || (t[4] = (C) => e.newEvidence = C), onChange: t[5] || (t[5] = (C) => a.evidenceEntered(C)) }, { prepend: N(() => [ q(x, { teleported: !1, modelValue: e.evidencePrefix, "onUpdate:modelValue": t[3] || (t[3] = (C) => e.evidencePrefix = C), placeholder: "Other:", class: "select-box", "popper-class": "flatmap_dropdown" }, { default: N(() => [ (S(!0), L(Re, null, mt(e.evidencePrefixes, (C) => (S(), re(b, { key: C.label, value: C.value }, { default: N(() => [ q(u, null, { default: N(() => [ q(m, { span: 12 }, { default: N(() => [ Oe(ge(C.label), 1) ]), _: 2 }, 1024) ]), _: 2 }, 1024) ]), _: 2 }, 1032, ["value"]))), 128)) ]), _: 1 }, 8, ["modelValue"]) ]), _: 1 }, 8, ["modelValue"]) ]), _: 1 }) ], 64)), q(u, null, { default: N(() => [ jge ]), _: 1 }), q(u, { class: "dialog-text" }, { default: N(() => [ q(w, { type: "textarea", autosize: { minRows: 2, maxRows: 4 }, placeholder: "Enter", modelValue: e.comment, "onUpdate:modelValue": t[6] || (t[6] = (C) => e.comment = C) }, null, 8, ["modelValue"]) ]), _: 1 }), q(u, { class: "dialog-text" }, { default: N(() => [ q(i, { class: "button", type: "primary", plain: "", onClick: a.submit }, { default: N(() => [ Oe(" Submit ") ]), _: 1 }, 8, ["onClick"]) ]), _: 1 }) ], 64)) : (S(), re(u, { key: 0 }, { default: N(() => [ q(d, { class: "standard-icon" }, { default: N(() => [ q(h, { onClick: t[2] || (t[2] = (C) => e.editing = !0) }) ]), _: 1 }), a.isDeleted ? (S(), re(d, { key: 0, class: "standard-icon" }, { default: N(() => [ q(f, { onClick: a.submit }, null, 8, ["onClick"]) ]), _: 1 })) : a.isPositionUpdated ? (S(), re(d, { key: 1, class: "standard-icon" }, { default: N(() => [ q(v, { onClick: a.submit }, null, 8, ["onClick"]) ]), _: 1 })) : J("", !0) ]), _: 1 })), e.errorMessage ? (S(), re(u, { key: 2, class: "dialog-text" }, { default: N(() => [ D("strong", Vge, ge(e.errorMessage), 1) ]), _: 1 })) : J("", !0) ], 64)) : J("", !0) ], 64)) : J("", !0) ], 64)) : J("", !0) ]) ]), _: 1 }); } const Uge = /* @__PURE__ */ wl($ge, [["render", Hge], ["__scopeId", "data-v-52f81058"]]), qge = { name: "CreateTooltipContent", components: { Button: ua, Col: a$, Container: i$, Header: cB, Input: um, Main: s$ }, props: { createData: { type: Object } }, watch: { "createData.shape": { handler: function(e, t) { this.group = e, t !== void 0 && this.$emit("cancel-create"); }, immediate: !0 } }, computed: { confirmText: function() { return this.createData.editingIndex > -1 ? "Edit" : "Confirm"; } }, data: function() { return { group: "default", region: "", showPoint: !1 }; }, methods: { confirm: function() { this.$emit( "confirm-create", { region: "__annotation/" + this.region, group: this.group, shape: this.createData.shape, editingIndex: this.createData.editingIndex } ), this.group = this.createData.shape; }, cancel: function() { this.$emit("cancel-create"); } } }, Kge = (e) => (Ci("data-v-d61c5879"), e = e(), _i(), e), Gge = /* @__PURE__ */ Kge(() => /* @__PURE__ */ D("span", { class: "create-text" }, " Primitives will be created in the __annotation region ", -1)); function Wge(e, t, n, r, o, a) { const i = cB, s = a$, l = oB, u = um, c = ua, d = s$, p = i$; return S(), re(p, { class: "create-container" }, { default: N(() => [ q(i, { height: "30px", class: "header" }, { default: N(() => [ D("div", null, "Create " + ge(n.createData.shape), 1) ]), _: 1 }), q(d, { class: "slides-block" }, { default: N(() => [ Gge, Be(q(l, { class: "row" }, { default: N(() => [ q(s, { offset: 0, span: 8 }, { default: N(() => [ Oe(" Position: ") ]), _: 1 }), q(s, { offset: 0, span: 16 }, { default: N(() => [ (S(!0), L(Re, null, mt(n.createData.points, ({ value: h, i: f }) => (S(), re(l, { key: f, class: "value" }, { default: N(() => [ Oe(ge(f), 1) ]), _: 2 }, 1024))), 128)) ]), _: 1 }) ]), _: 1 }, 512), [ [ht, e.showPoint] ]), q(l, { class: "row" }, { default: N(() => [ q(s, { offset: 0, span: 8 }, { default: N(() => [ Oe(" Region: ") ]), _: 1 }), q(s, { offset: 0, span: 16 }, { default: N(() => [ q(u, { modelValue: e.region, "onUpdate:modelValue": t[0] || (t[0] = (h) => e.region = h), placeholder: "__annotation", size: "small" }, null, 8, ["modelValue"]) ]), _: 1 }) ]), _: 1 }), q(l, { class: "row" }, { default: N(() => [ q(s, { offset: 0, span: 8 }, { default: N(() => [ Oe(" Group: ") ]), _: 1 }), q(s, { offset: 0, span: 16 }, { default: N(() => [ q(u, { modelValue: e.group, "onUpdate:modelValue": t[1] || (t[1] = (h) => e.group = h), placeholder: n.createData.shape, size: "small" }, null, 8, ["modelValue", "placeholder"]) ]), _: 1 }) ]), _: 1 }), q(l, null, { default: N(() => [ q(s, { offset: 0, span: 12 }, { default: N(() => [ q(c, { type: "primary", plain: "", onClick: a.confirm }, { default: N(() => [ Oe(ge(a.confirmText), 1) ]), _: 1 }, 8, ["onClick"]) ]), _: 1 }), q(s, { offset: 0, span: 12 }, { default: N(() => [ q(c, { type: "primary", plain: "", onClick: a.cancel }, { default: N(() => [ Oe(" Cancel ") ]), _: 1 }, 8, ["onClick"]) ]), _: 1 }) ]), _: 1 }) ]), _: 1 }) ]), _: 1 }); } const Yge = /* @__PURE__ */ wl(qge, [["render", Wge], ["__scopeId", "data-v-d61c5879"]]); function cr(e) { "@babel/helpers - typeof"; return cr = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) { return typeof t; } : function(t) { return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t; }, cr(e); } function c$(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function"); } function Xge(e, t) { for (var n = 0; n < t.length; n++) { var r = t[n]; r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r); } } function d$(e, t, n) { return t && Xge(e.prototype, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } function gB(e, t, n) { return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e; } function Ta(e, t) { return Zge(e) || Jge(e, t) || mB(e, t) || Qge(); } function Zge(e) { if (Array.isArray(e)) return e; } function Jge(e, t) { var n = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"]; if (n != null) { var r = [], o = !0, a = !1, i, s; try { for (n = n.call(e); !(o = (i = n.next()).done) && (r.push(i.value), !(t && r.length === t)); o = !0) ; } catch (l) { a = !0, s = l; } finally { try { !o && n.return != null && n.return(); } finally { if (a) throw s; } } return r; } } function mB(e, t) { if (e) { if (typeof e == "string") return SO(e, t); var n = Object.prototype.toString.call(e).slice(8, -1); if (n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set") return Array.from(e); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return SO(e, t); } } function SO(e, t) { (t == null || t > e.length) && (t = e.length); for (var n = 0, r = new Array(t); n < t; n++) r[n] = e[n]; return r; } function Qge() { throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`); } function yB(e, t) { var n = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"]; if (!n) { if (Array.isArray(e) || (n = mB(e)) || t) { n && (e = n); var r = 0, o = function() { }; return { s: o, n: function() { return r >= e.length ? { done: !0 } : { done: !1, value: e[r++] }; }, e: function(l) { throw l; }, f: o }; } throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`); } var a = !0, i = !1, s; return { s: function() { n = n.call(e); }, n: function() { var l = n.next(); return a = l.done, l; }, e: function(l) { i = !0, s = l; }, f: function() { try { !a && n.return != null && n.return(); } finally { if (i) throw s; } } }; } var ir = typeof window > "u" ? null : window, $O = ir ? ir.navigator : null; ir && ir.document; var e0e = cr(""), bB = cr({}), t0e = cr(function() { }), n0e = typeof HTMLElement > "u" ? "undefined" : cr(HTMLElement), eh = function(e) { return e && e.instanceString && Nn(e.instanceString) ? e.instanceString() : null; }, gt = function(e) { return e != null && cr(e) == e0e; }, Nn = function(e) { return e != null && cr(e) === t0e; }, dn = function(e) { return !Mo(e) && (Array.isArray ? Array.isArray(e) : e != null && e instanceof Array); }, Xt = function(e) { return e != null && cr(e) === bB && !dn(e) && e.constructor === Object; }, r0e = function(e) { return e != null && cr(e) === bB; }, Ze = function(e) { return e != null && cr(e) === cr(1) && !isNaN(e); }, o0e = function(e) { return Ze(e) && Math.floor(e) === e; }, Dg = function(e) { if (n0e !== "undefined") return e != null && e instanceof HTMLElement; }, Mo = function(e) { return th(e) || wB(e); }, th = function(e) { return eh(e) === "collection" && e._private.single; }, wB = function(e) { return eh(e) === "collection" && !e._private.single; }, p$ = function(e) { return eh(e) === "core"; }, xB = function(e) { return eh(e) === "stylesheet"; }, a0e = function(e) { return eh(e) === "event"; }, ol = function(e) { return e == null ? !0 : !!(e === "" || e.match(/^\s+$/)); }, i0e = function(e) { return typeof HTMLElement > "u" ? !1 : e instanceof HTMLElement; }, s0e = function(e) { return Xt(e) && Ze(e.x1) && Ze(e.x2) && Ze(e.y1) && Ze(e.y2); }, l0e = function(e) { return r0e(e) && Nn(e.then); }, u0e = function() { return $O && $O.userAgent.match(/msie|trident|edge/i); }, of = function(e, t) { t || (t = function() { if (arguments.length === 1) return arguments[0]; if (arguments.length === 0) return "undefined"; for (var r = [], o = 0; o < arguments.length; o++) r.push(arguments[o]); return r.join("$"); }); var n = function r() { var o = this, a = arguments, i, s = t.apply(o, a), l = r.cache; return (i = l[s]) || (i = l[s] = e.apply(o, a)), i; }; return n.cache = {}, n; }, f$ = of(function(e) { return e.replace(/([A-Z])/g, function(t) { return "-" + t.toLowerCase(); }); }), dm = of(function(e) { return e.replace(/(-\w)/g, function(t) { return t[1].toUpperCase(); }); }), kB = of(function(e, t) { return e + t[0].toUpperCase() + t.substring(1); }, function(e, t) { return e + "$" + t; }), EO = function(e) { return ol(e) ? e : e.charAt(0).toUpperCase() + e.substring(1); }, lr = "(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))", c0e = "rgb[a]?\\((" + lr + "[%]?)\\s*,\\s*(" + lr + "[%]?)\\s*,\\s*(" + lr + "[%]?)(?:\\s*,\\s*(" + lr + "))?\\)", d0e = "rgb[a]?\\((?:" + lr + "[%]?)\\s*,\\s*(?:" + lr + "[%]?)\\s*,\\s*(?:" + lr + "[%]?)(?:\\s*,\\s*(?:" + lr + "))?\\)", p0e = "hsl[a]?\\((" + lr + ")\\s*,\\s*(" + lr + "[%])\\s*,\\s*(" + lr + "[%])(?:\\s*,\\s*(" + lr + "))?\\)", f0e = "hsl[a]?\\((?:" + lr + ")\\s*,\\s*(?:" + lr + "[%])\\s*,\\s*(?:" + lr + "[%])(?:\\s*,\\s*(?:" + lr + "))?\\)", h0e = "\\#[0-9a-fA-F]{3}", v0e = "\\#[0-9a-fA-F]{6}", CB = function(e, t) { return e < t ? -1 : e > t ? 1 : 0; }, g0e = function(e, t) { return -1 * CB(e, t); }, _t = Object.assign != null ? Object.assign.bind(Object) : function(e) { for (var t = arguments, n = 1; n < t.length; n++) { var r = t[n]; if (r != null) for (var o = Object.keys(r), a = 0; a < o.length; a++) { var i = o[a]; e[i] = r[i]; } } return e; }, m0e = function(e) { if (!(!(e.length === 4 || e.length === 7) || e[0] !== "#")) { var t = e.length === 4, n, r, o, a = 16; return t ? (n = parseInt(e[1] + e[1], a), r = parseInt(e[2] + e[2], a), o = parseInt(e[3] + e[3], a)) : (n = parseInt(e[1] + e[2], a), r = parseInt(e[3] + e[4], a), o = parseInt(e[5] + e[6], a)), [n, r, o]; } }, y0e = function(e) { var t, n, r, o, a, i, s, l; function u(h, f, v) { return v < 0 && (v += 1), v > 1 && (v -= 1), v < 1 / 6 ? h + (f - h) * 6 * v : v < 1 / 2 ? f : v < 2 / 3 ? h + (f - h) * (2 / 3 - v) * 6 : h; } var c = new RegExp("^" + p0e + "$").exec(e); if (c) { if (n = parseInt(c[1]), n < 0 ? n = (360 - -1 * n % 360) % 360 : n > 360 && (n = n % 360), n /= 360, r = parseFloat(c[2]), r < 0 || r > 100 || (r = r / 100, o = parseFloat(c[3]), o < 0 || o > 100) || (o = o / 100, a = c[4], a !== void 0 && (a = parseFloat(a), a < 0 || a > 1))) return; if (r === 0) i = s = l = Math.round(o * 255); else { var d = o < 0.5 ? o * (1 + r) : o + r - o * r, p = 2 * o - d; i = Math.round(255 * u(p, d, n + 1 / 3)), s = Math.round(255 * u(p, d, n)), l = Math.round(255 * u(p, d, n - 1 / 3)); } t = [i, s, l, a]; } return t; }, b0e = function(e) { var t, n = new RegExp("^" + c0e + "$").exec(e); if (n) { t = []; for (var r = [], o = 1; o <= 3; o++) { var a = n[o]; if (a[a.length - 1] === "%" && (r[o] = !0), a = parseFloat(a), r[o] && (a = a / 100 * 255), a < 0 || a > 255) return; t.push(Math.floor(a)); } var i = r[1] || r[2] || r[3], s = r[1] && r[2] && r[3]; if (i && !s) return; var l = n[4]; if (l !== void 0) { if (l = parseFloat(l), l < 0 || l > 1) return; t.push(l); } } return t; }, w0e = function(e) { return k0e[e.toLowerCase()]; }, x0e = function(e) { return (dn(e) ? e : null) || w0e(e) || m0e(e) || b0e(e) || y0e(e); }, k0e = { // special colour names transparent: [0, 0, 0, 0], // NB alpha === 0 // regular colours aliceblue: [240, 248, 255], antiquewhite: [250, 235, 215], aqua: [0, 255, 255], aquamarine: [127, 255, 212], azure: [240, 255, 255], beige: [245, 245, 220], bisque: [255, 228, 196], black: [0, 0, 0], blanchedalmond: [255, 235, 205], blue: [0, 0, 255], blueviolet: [138, 43, 226], brown: [165, 42, 42], burlywood: [222, 184, 135], cadetblue: [95, 158, 160], chartreuse: [127, 255, 0], chocolate: [210, 105, 30], coral: [255, 127, 80], cornflowerblue: [100, 149, 237], cornsilk: [255, 248, 220], crimson: [220, 20, 60], cyan: [0, 255, 255], darkblue: [0, 0, 139], darkcyan: [0, 139, 139], darkgoldenrod: [184, 134, 11], darkgray: [169, 169, 169], darkgreen: [0, 100, 0], darkgrey: [169, 169, 169], darkkhaki: [189, 183, 107], darkmagenta: [139, 0, 139], darkolivegreen: [85, 107, 47], darkorange: [255, 140, 0], darkorchid: [153, 50, 204], darkred: [139, 0, 0], darksalmon: [233, 150, 122], darkseagreen: [143, 188, 143], darkslateblue: [72, 61, 139], darkslategray: [47, 79, 79], darkslategrey: [47, 79, 79], darkturquoise: [0, 206, 209], darkviolet: [148, 0, 211], deeppink: [255, 20, 147], deepskyblue: [0, 191, 255], dimgray: [105, 105, 105], dimgrey: [105, 105, 105], dodgerblue: [30, 144, 255], firebrick: [178, 34, 34], floralwhite: [255, 250, 240], forestgreen: [34, 139, 34], fuchsia: [255, 0, 255], gainsboro: [220, 220, 220], ghostwhite: [248, 248, 255], gold: [255, 215, 0], goldenrod: [218, 165, 32], gray: [128, 128, 128], grey: [128, 128, 128], green: [0, 128, 0], greenyellow: [173, 255, 47], honeydew: [240, 255, 240], hotpink: [255, 105, 180], indianred: [205, 92, 92], indigo: [75, 0, 130], ivory: [255, 255, 240], khaki: [240, 230, 140], lavender: [230, 230, 250], lavenderblush: [255, 240, 245], lawngreen: [124, 252, 0], lemonchiffon: [255, 250, 205], lightblue: [173, 216, 230], lightcoral: [240, 128, 128], lightcyan: [224, 255, 255], lightgoldenrodyellow: [250, 250, 210], lightgray: [211, 211, 211], lightgreen: [144, 238, 144], lightgrey: [211, 211, 211], lightpink: [255, 182, 193], lightsalmon: [255, 160, 122], lightseagreen: [32, 178, 170], lightskyblue: [135, 206, 250], lightslategray: [119, 136, 153], lightslategrey: [119, 136, 153], lightsteelblue: [176, 196, 222], lightyellow: [255, 255, 224], lime: [0, 255, 0], limegreen: [50, 205, 50], linen: [250, 240, 230], magenta: [255, 0, 255], maroon: [128, 0, 0], mediumaquamarine: [102, 205, 170], mediumblue: [0, 0, 205], mediumorchid: [186, 85, 211], mediumpurple: [147, 112, 219], mediumseagreen: [60, 179, 113], mediumslateblue: [123, 104, 238], mediumspringgreen: [0, 250, 154], mediumturquoise: [72, 209, 204], mediumvioletred: [199, 21, 133], midnightblue: [25, 25, 112], mintcream: [245, 255, 250], mistyrose: [255, 228, 225], moccasin: [255, 228, 181], navajowhite: [255, 222, 173], navy: [0, 0, 128], oldlace: [253, 245, 230], olive: [128, 128, 0], olivedrab: [107, 142, 35], orange: [255, 165, 0], orangered: [255, 69, 0], orchid: [218, 112, 214], palegoldenrod: [238, 232, 170], palegreen: [152, 251, 152], paleturquoise: [175, 238, 238], palevioletred: [219, 112, 147], papayawhip: [255, 239, 213], peachpuff: [255, 218, 185], peru: [205, 133, 63], pink: [255, 192, 203], plum: [221, 160, 221], powderblue: [176, 224, 230], purple: [128, 0, 128], red: [255, 0, 0], rosybrown: [188, 143, 143], royalblue: [65, 105, 225], saddlebrown: [139, 69, 19], salmon: [250, 128, 114], sandybrown: [244, 164, 96], seagreen: [46, 139, 87], seashell: [255, 245, 238], sienna: [160, 82, 45], silver: [192, 192, 192], skyblue: [135, 206, 235], slateblue: [106, 90, 205], slategray: [112, 128, 144], slategrey: [112, 128, 144], snow: [255, 250, 250], springgreen: [0, 255, 127], steelblue: [70, 130, 180], tan: [210, 180, 140], teal: [0, 128, 128], thistle: [216, 191, 216], tomato: [255, 99, 71], turquoise: [64, 224, 208], violet: [238, 130, 238], wheat: [245, 222, 179], white: [255, 255, 255], whitesmoke: [245, 245, 245], yellow: [255, 255, 0], yellowgreen: [154, 205, 50] }, _B = function(e) { for (var t = e.map, n = e.keys, r = n.length, o = 0; o < r; o++) { var a = n[o]; if (Xt(a)) throw Error("Tried to set map with object key"); o < n.length - 1 ? (t[a] == null && (t[a] = {}), t = t[a]) : t[a] = e.value; } }, SB = function(e) { for (var t = e.map, n = e.keys, r = n.length, o = 0; o < r; o++) { var a = n[o]; if (Xt(a)) throw Error("Tried to get map with object key"); if (t = t[a], t == null) return t; } return t; }; function C0e(e) { var t = typeof e; return e != null && (t == "object" || t == "function"); } var du = C0e, mp = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}; function _0e(e, t) { return t = { exports: {} }, e(t, t.exports), t.exports; } var S0e = typeof mp == "object" && mp && mp.Object === Object && mp, $0e = S0e, E0e = typeof self == "object" && self && self.Object === Object && self, O0e = $0e || E0e || Function("return this")(), pm = O0e, F0e = function() { return pm.Date.now(); }, cy = F0e, T0e = /\s/; function A0e(e) { for (var t = e.length; t-- && T0e.test(e.charAt(t)); ) ; return t; } var I0e = A0e, P0e = /^\s+/; function L0e(e) { return e && e.slice(0, I0e(e) + 1).replace(P0e, ""); } var R0e = L0e, N0e = pm.Symbol, Kc = N0e, $B = Object.prototype, M0e = $B.hasOwnProperty, D0e = $B.toString, Qd = Kc ? Kc.toStringTag : void 0; function B0e(e) { var t = M0e.call(e, Qd), n = e[Qd]; try { e[Qd] = void 0; var r = !0; } catch { } var o = D0e.call(e); return r && (t ? e[Qd] = n : delete e[Qd]), o; } var z0e = B0e, j0e = Object.prototype, V0e = j0e.toString; function H0e(e) { return V0e.call(e); } var U0e = H0e, q0e = "[object Null]", K0e = "[object Undefined]", OO = Kc ? Kc.toStringTag : void 0; function G0e(e) { return e == null ? e === void 0 ? K0e : q0e : OO && OO in Object(e) ? z0e(e) : U0e(e); } var EB = G0e; function W0e(e) { return e != null && typeof e == "object"; } var Y0e = W0e, X0e = "[object Symbol]"; function Z0e(e) { return typeof e == "symbol" || Y0e(e) && EB(e) == X0e; } var nh = Z0e, FO = NaN, J0e = /^[-+]0x[0-9a-f]+$/i, Q0e = /^0b[01]+$/i, eme = /^0o[0-7]+$/i, tme = parseInt; function nme(e) { if (typeof e == "number") return e; if (nh(e)) return FO; if (du(e)) { var t = typeof e.valueOf == "function" ? e.valueOf() : e; e = du(t) ? t + "" : t; } if (typeof e != "string") return e === 0 ? e : +e; e = R0e(e); var n = Q0e.test(e); return n || eme.test(e) ? tme(e.slice(2), n ? 2 : 8) : J0e.test(e) ? FO : +e; } var TO = nme, rme = "Expected a function", ome = Math.max, ame = Math.min; function ime(e, t, n) { var r, o, a, i, s, l, u = 0, c = !1, d = !1, p = !0; if (typeof e != "function") throw new TypeError(rme); t = TO(t) || 0, du(n) && (c = !!n.leading, d = "maxWait" in n, a = d ? ome(TO(n.maxWait) || 0, t) : a, p = "trailing" in n ? !!n.trailing : p); function h(C) { var _ = r, $ = o; return r = o = void 0, u = C, i = e.apply($, _), i; } function f(C) { return u = C, s = setTimeout(g, t), c ? h(C) : i; } function v(C) { var _ = C - l, $ = C - u, O = t - _; return d ? ame(O, a - $) : O; } function m(C) { var _ = C - l, $ = C - u; return l === void 0 || _ >= t || _ < 0 || d && $ >= a; } function g() { var C = cy(); if (m(C)) return b(C); s = setTimeout(g, v(C)); } function b(C) { return s = void 0, p && r ? h(C) : (r = o = void 0, i); } function x() { s !== void 0 && clearTimeout(s), u = 0, r = l = o = s = void 0; } function w() { return s === void 0 ? i : b(cy()); } function k() { var C = cy(), _ = m(C); if (r = arguments, o = this, l = C, _) { if (s === void 0) return f(l); if (d) return clearTimeout(s), s = setTimeout(g, t), h(l); } return s === void 0 && (s = setTimeout(g, t)), i; } return k.cancel = x, k.flush = w, k; } var fm = ime, dy = ir ? ir.performance : null, OB = dy && dy.now ? function() { return dy.now(); } : function() { return Date.now(); }, sme = function() { if (ir) { if (ir.requestAnimationFrame) return function(e) { ir.requestAnimationFrame(e); }; if (ir.mozRequestAnimationFrame) return function(e) { ir.mozRequestAnimationFrame(e); }; if (ir.webkitRequestAnimationFrame) return function(e) { ir.webkitRequestAnimationFrame(e); }; if (ir.msRequestAnimationFrame) return function(e) { ir.msRequestAnimationFrame(e); }; } return function(e) { e && setTimeout(function() { e(OB()); }, 1e3 / 60); }; }(), Bg = function(e) { return sme(e); }, ns = OB, wc = 9261, FB = 65599, yp = 5381, TB = function(e) { for (var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : wc, n = t, r; r = e.next(), !r.done; ) n = n * FB + r.value | 0; return n; }, af = function(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : wc; return t * FB + e | 0; }, sf = function(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : yp; return (t << 5) + t + e | 0; }, lme = function(e, t) { return e * 2097152 + t; }, _s = function(e) { return e[0] * 2097152 + e[1]; }, nv = function(e, t) { return [af(e[0], t[0]), sf(e[1], t[1])]; }, ume = function(e, t) { var n = { value: 0, done: !1 }, r = 0, o = e.length, a = { next: function() { return r < o ? n.value = e[r++] : n.done = !0, n; } }; return TB(a, t); }, pu = function(e, t) { var n = { value: 0, done: !1 }, r = 0, o = e.length, a = { next: function() { return r < o ? n.value = e.charCodeAt(r++) : n.done = !0, n; } }; return TB(a, t); }, AB = function() { return cme(arguments); }, cme = function(e) { for (var t, n = 0; n < e.length; n++) { var r = e[n]; n === 0 ? t = pu(r) : t = pu(r, t); } return t; }, AO = !0, dme = console.warn != null, pme = console.trace != null, h$ = Number.MAX_SAFE_INTEGER || 9007199254740991, IB = function() { return !0; }, zg = function() { return !1; }, IO = function() { return 0; }, v$ = function() { }, Un = function(e) { throw new Error(e); }, PB = function(e) { if (e !== void 0) AO = !!e; else return AO; }, sn = function(e) { PB() && (dme ? console.warn(e) : (console.log(e), pme && console.trace())); }, fme = function(e) { return _t({}, e); }, ai = function(e) { return e == null ? e : dn(e) ? e.slice() : Xt(e) ? fme(e) : e; }, hme = function(e) { return e.slice(); }, LB = function(e, t) { for ( // loop :) t = e = ""; // b - result , a - numeric letiable e++ < 36; // t += e * 51 & 52 ? ( // return a random number or 4 (e ^ 15 ? ( // generate a random number from 0 to 15 8 ^ Math.random() * (e ^ 20 ? 16 : 4) ) : 4).toString(16) ) : "-" ) ; return t; }, vme = {}, RB = function() { return vme; }, Br = function(e) { var t = Object.keys(e); return function(n) { for (var r = {}, o = 0; o < t.length; o++) { var a = t[o], i = n == null ? void 0 : n[a]; r[a] = i === void 0 ? e[a] : i; } return r; }; }, al = function(e, t, n) { for (var r = e.length - 1; r >= 0; r--) e[r] === t && e.splice(r, 1); }, g$ = function(e) { e.splice(0, e.length); }, gme = function(e, t) { for (var n = 0; n < t.length; n++) { var r = t[n]; e.push(r); } }, La = function(e, t, n) { return n && (t = kB(n, t)), e[t]; }, zs = function(e, t, n, r) { n && (t = kB(n, t)), e[t] = r; }, mme = /* @__PURE__ */ function() { function e() { c$(this, e), this._obj = {}; } return d$(e, [{ key: "set", value: function(t, n) { return this._obj[t] = n, this; } }, { key: "delete", value: function(t) { return this._obj[t] = void 0, this; } }, { key: "clear", value: function() { this._obj = {}; } }, { key: "has", value: function(t) { return this._obj[t] !== void 0; } }, { key: "get", value: function(t) { return this._obj[t]; } }]), e; }(), ii = typeof Map < "u" ? Map : mme, yme = "undefined", bme = /* @__PURE__ */ function() { function e(t) { if (c$(this, e), this._obj = /* @__PURE__ */ Object.create(null), this.size = 0, t != null) { var n; t.instanceString != null && t.instanceString() === this.instanceString() ? n = t.toArray() : n = t; for (var r = 0; r < n.length; r++) this.add(n[r]); } } return d$(e, [{ key: "instanceString", value: function() { return "set"; } }, { key: "add", value: function(t) { var n = this._obj; n[t] !== 1 && (n[t] = 1, this.size++); } }, { key: "delete", value: function(t) { var n = this._obj; n[t] === 1 && (n[t] = 0, this.size--); } }, { key: "clear", value: function() { this._obj = /* @__PURE__ */ Object.create(null); } }, { key: "has", value: function(t) { return this._obj[t] === 1; } }, { key: "toArray", value: function() { var t = this; return Object.keys(this._obj).filter(function(n) { return t.has(n); }); } }, { key: "forEach", value: function(t, n) { return this.toArray().forEach(t, n); } }]), e; }(), gd = (typeof Set > "u" ? "undefined" : cr(Set)) !== yme ? Set : bme, hm = function(e, t) { var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !0; if (e === void 0 || t === void 0 || !p$(e)) { Un("An element must have a core reference and parameters set"); return; } var r = t.group; if (r == null && (t.data && t.data.source != null && t.data.target != null ? r = "edges" : r = "nodes"), r !== "nodes" && r !== "edges") { Un("An element must be of type `nodes` or `edges`; you specified `" + r + "`"); return; } this.length = 1, this[0] = this; var o = this._private = { cy: e, single: !0, // indicates this is an element data: t.data || {}, // data object position: t.position || { x: 0, y: 0 }, // (x, y) position pair autoWidth: void 0, // width and height of nodes calculated by the renderer when set to special 'auto' value autoHeight: void 0, autoPadding: void 0, compoundBoundsClean: !1, // whether the compound dimensions need to be recalculated the next time dimensions are read listeners: [], // array of bound listeners group: r, // string; 'nodes' or 'edges' style: {}, // properties as set by the style rstyle: {}, // properties for style sent from the renderer to the core styleCxts: [], // applied style contexts from the styler styleKeys: {}, // per-group keys of style property values removed: !0, // whether it's inside the vis; true if removed (set true here since we call restore) selected: !!t.selected, // whether it's selected selectable: t.selectable === void 0 ? !0 : !!t.selectable, // whether it's selectable locked: !!t.locked, // whether the element is locked (cannot be moved) grabbed: !1, // whether the element is grabbed by the mouse; renderer sets this privately grabbable: t.grabbable === void 0 ? !0 : !!t.grabbable, // whether the element can be grabbed pannable: t.pannable === void 0 ? r === "edges" : !!t.pannable, // whether the element has passthrough panning enabled active: !1, // whether the element is active from user interaction classes: new gd(), // map ( className => true ) animation: { // object for currently-running animations current: [], queue: [] }, rscratch: {}, // object in which the renderer can store information scratch: t.scratch || {}, // scratch objects edges: [], // array of connected edges children: [], // array of children parent: t.parent && t.parent.isNode() ? t.parent : null, // parent ref traversalCache: {}, // cache of output of traversal functions backgrounding: !1, // whether background images are loading bbCache: null, // cache of the current bounding box bbCacheShift: { x: 0, y: 0 }, // shift applied to cached bb to be applied on next get bodyBounds: null, // bounds cache of element body, w/o overlay overlayBounds: null, // bounds cache of element body, including overlay labelBounds: { // bounds cache of labels all: null, source: null, target: null, main: null }, arrowBounds: { // bounds cache of edge arrows source: null, target: null, "mid-source": null, "mid-target": null } }; if (o.position.x == null && (o.position.x = 0), o.position.y == null && (o.position.y = 0), t.renderedPosition) { var a = t.renderedPosition, i = e.pan(), s = e.zoom(); o.position = { x: (a.x - i.x) / s, y: (a.y - i.y) / s }; } var l = []; dn(t.classes) ? l = t.classes : gt(t.classes) && (l = t.classes.split(/\s+/)); for (var u = 0, c = l.length; u < c; u++) { var d = l[u]; !d || d === "" || o.classes.add(d); } this.createEmitter(); var p = t.style || t.css; p && (sn("Setting a `style` bypass at element creation should be done only when absolutely necessary. Try to use the stylesheet instead."), this.style(p)), (n === void 0 || n) && this.restore(); }, PO = function(e) { return e = { bfs: e.bfs || !e.dfs, dfs: e.dfs || !e.bfs }, function(t, n, r) { var o; Xt(t) && !Mo(t) && (o = t, t = o.roots || o.root, n = o.visit, r = o.directed), r = arguments.length === 2 && !Nn(n) ? n : r, n = Nn(n) ? n : function() { }; for (var a = this._private.cy, i = t = gt(t) ? this.filter(t) : t, s = [], l = [], u = {}, c = {}, d = {}, p = 0, h, f = this.byGroup(), v = f.nodes, m = f.edges, g = 0; g < i.length; g++) { var b = i[g], x = b.id(); b.isNode() && (s.unshift(b), e.bfs && (d[x] = !0, l.push(b)), c[x] = 0); } for (var w = function() { var F = e.bfs ? s.shift() : s.pop(), A = F.id(); if (e.dfs) { if (d[A]) return "continue"; d[A] = !0, l.push(F); } var T = c[A], R = u[A], M = R != null ? R.source() : null, j = R != null ? R.target() : null, P = R == null ? void 0 : F.same(M) ? j[0] : M[0], V = void 0; if (V = n(F, R, P, p++, T), V === !0) return h = F, "break"; if (V === !1) return "break"; for (var U = F.connectedEdges().filter(function(me) { return (!r || me.source().same(F)) && m.has(me); }), G = 0; G < U.length; G++) { var se = U[G], ae = se.connectedNodes().filter(function(me) { return !me.same(F) && v.has(me); }), de = ae.id(); ae.length !== 0 && !d[de] && (ae = ae[0], s.push(ae), e.bfs && (d[de] = !0, l.push(ae)), u[de] = se, c[de] = c[A] + 1); } }; s.length !== 0; ) { var k = w(); if (k !== "continue" && k === "break") break; } for (var C = a.collection(), _ = 0; _ < l.length; _++) { var $ = l[_], O = u[$.id()]; O != null && C.push(O), C.push($); } return { path: a.collection(C), found: a.collection(h) }; }; }, lf = { breadthFirstSearch: PO({ bfs: !0 }), depthFirstSearch: PO({ dfs: !0 }) }; lf.bfs = lf.breadthFirstSearch; lf.dfs = lf.depthFirstSearch; var wme = _0e(function(e, t) { (function() { var n, r, o, a, i, s, l, u, c, d, p, h, f, v, m; o = Math.floor, d = Math.min, r = function(g, b) { return g < b ? -1 : g > b ? 1 : 0; }, c = function(g, b, x, w, k) { var C; if (x == null && (x = 0), k == null && (k = r), x < 0) throw new Error("lo must be non-negative"); for (w == null && (w = g.length); x < w; ) C = o((x + w) / 2), k(b, g[C]) < 0 ? w = C : x = C + 1; return [].splice.apply(g, [x, x - x].concat(b)), b; }, s = function(g, b, x) { return x == null && (x = r), g.push(b), v(g, 0, g.length - 1, x); }, i = function(g, b) { var x, w; return b == null && (b = r), x = g.pop(), g.length ? (w = g[0], g[0] = x, m(g, 0, b)) : w = x, w; }, u = function(g, b, x) { var w; return x == null && (x = r), w = g[0], g[0] = b, m(g, 0, x), w; }, l = function(g, b, x) { var w; return x == null && (x = r), g.length && x(g[0], b) < 0 && (w = [g[0], b], b = w[0], g[0] = w[1], m(g, 0, x)), b; }, a = function(g, b) { var x, w, k, C, _, $; for (b == null && (b = r), C = (function() { $ = []; for (var O = 0, F = o(g.length / 2); 0 <= F ? O < F : O > F; 0 <= F ? O++ : O--) $.push(O); return $; }).apply(this).reverse(), _ = [], w = 0, k = C.length; w < k; w++) x = C[w], _.push(m(g, x, b)); return _; }, f = function(g, b, x) { var w; if (x == null && (x = r), w = g.indexOf(b), w !== -1) return v(g, 0, w, x), m(g, w, x); }, p = function(g, b, x) { var w, k, C, _, $; if (x == null && (x = r), k = g.slice(0, b), !k.length) return k; for (a(k, x), $ = g.slice(b), C = 0, _ = $.length; C < _; C++) w = $[C], l(k, w, x); return k.sort(x).reverse(); }, h = function(g, b, x) { var w, k, C, _, $, O, F, A, T; if (x == null && (x = r), b * 10 <= g.length) { if (C = g.slice(0, b).sort(x), !C.length) return C; for (k = C[C.length - 1], F = g.slice(b), _ = 0, O = F.length; _ < O; _++) w = F[_], x(w, k) < 0 && (c(C, w, 0, null, x), C.pop(), k = C[C.length - 1]); return C; } for (a(g, x), T = [], $ = 0, A = d(b, g.length); 0 <= A ? $ < A : $ > A; 0 <= A ? ++$ : --$) T.push(i(g, x)); return T; }, v = function(g, b, x, w) { var k, C, _; for (w == null && (w = r), k = g[x]; x > b; ) { if (_ = x - 1 >> 1, C = g[_], w(k, C) < 0) { g[x] = C, x = _; continue; } break; } return g[x] = k; }, m = function(g, b, x) { var w, k, C, _, $; for (x == null && (x = r), k = g.length, $ = b, C = g[b], w = 2 * b + 1; w < k; ) _ = w + 1, _ < k && !(x(g[w], g[_]) < 0) && (w = _), g[b] = g[w], b = w, w = 2 * b + 1; return g[b] = C, v(g, $, b, x); }, n = function() { g.push = s, g.pop = i, g.replace = u, g.pushpop = l, g.heapify = a, g.updateItem = f, g.nlargest = p, g.nsmallest = h; function g(b) { this.cmp = b ?? r, this.nodes = []; } return g.prototype.push = function(b) { return s(this.nodes, b, this.cmp); }, g.prototype.pop = function() { return i(this.nodes, this.cmp); }, g.prototype.peek = function() { return this.nodes[0]; }, g.prototype.contains = function(b) { return this.nodes.indexOf(b) !== -1; }, g.prototype.replace = function(b) { return u(this.nodes, b, this.cmp); }, g.prototype.pushpop = function(b) { return l(this.nodes, b, this.cmp); }, g.prototype.heapify = function() { return a(this.nodes, this.cmp); }, g.prototype.updateItem = function(b) { return f(this.nodes, b, this.cmp); }, g.prototype.clear = function() { return this.nodes = []; }, g.prototype.empty = function() { return this.nodes.length === 0; }, g.prototype.size = function() { return this.nodes.length; }, g.prototype.clone = function() { var b; return b = new g(), b.nodes = this.nodes.slice(0), b; }, g.prototype.toArray = function() { return this.nodes.slice(0); }, g.prototype.insert = g.prototype.push, g.prototype.top = g.prototype.peek, g.prototype.front = g.prototype.peek, g.prototype.has = g.prototype.contains, g.prototype.copy = g.prototype.clone, g; }(), function(g, b) { return e.exports = b(); }(this, function() { return n; }); }).call(mp); }), rh = wme, xme = Br({ root: null, weight: function(e) { return 1; }, directed: !1 }), kme = { dijkstra: function(e) { if (!Xt(e)) { var t = arguments; e = { root: t[0], weight: t[1], directed: t[2] }; } var n = xme(e), r = n.root, o = n.weight, a = n.directed, i = this, s = o, l = gt(r) ? this.filter(r)[0] : r[0], u = {}, c = {}, d = {}, p = this.byGroup(), h = p.nodes, f = p.edges; f.unmergeBy(function(M) { return M.isLoop(); }); for (var v = function(M) { return u[M.id()]; }, m = function(M, j) { u[M.id()] = j, g.updateItem(M); }, g = new rh(function(M, j) { return v(M) - v(j); }), b = 0; b < h.length; b++) { var x = h[b]; u[x.id()] = x.same(l) ? 0 : 1 / 0, g.push(x); } for (var w = function(M, j) { for (var P = (a ? M.edgesTo(j) : M.edgesWith(j)).intersect(f), V = 1 / 0, U, G = 0; G < P.length; G++) { var se = P[G], ae = s(se); (ae < V || !U) && (V = ae, U = se); } return { edge: U, dist: V }; }; g.size() > 0; ) { var k = g.pop(), C = v(k), _ = k.id(); if (d[_] = C, C !== 1 / 0) for (var $ = k.neighborhood().intersect(h), O = 0; O < $.length; O++) { var F = $[O], A = F.id(), T = w(k, F), R = C + T.dist; R < v(F) && (m(F, R), c[A] = { node: k, edge: T.edge }); } } return { distanceTo: function(M) { var j = gt(M) ? h.filter(M)[0] : M[0]; return d[j.id()]; }, pathTo: function(M) { var j = gt(M) ? h.filter(M)[0] : M[0], P = [], V = j, U = V.id(); if (j.length > 0) for (P.unshift(j); c[U]; ) { var G = c[U]; P.unshift(G.edge), P.unshift(G.node), V = G.node, U = V.id(); } return i.spawn(P); } }; } }, Cme = { // kruskal's algorithm (finds min spanning tree, assuming undirected graph) // implemented from pseudocode from wikipedia kruskal: function(e) { e = e || function(b) { return 1; }; for (var t = this.byGroup(), n = t.nodes, r = t.edges, o = n.length, a = new Array(o), i = n, s = function(b) { for (var x = 0; x < a.length; x++) { var w = a[x]; if (w.has(b)) return x; } }, l = 0; l < o; l++) a[l] = this.spawn(n[l]); for (var u = r.sort(function(b, x) { return e(b) - e(x); }), c = 0; c < u.length; c++) { var d = u[c], p = d.source()[0], h = d.target()[0], f = s(p), v = s(h), m = a[f], g = a[v]; f !== v && (i.merge(d), m.merge(g), a.splice(v, 1)); } return i; } }, _me = Br({ root: null, goal: null, weight: function(e) { return 1; }, heuristic: function(e) { return 0; }, directed: !1 }), Sme = { // Implemented from pseudocode from wikipedia aStar: function(e) { var t = this.cy(), n = _me(e), r = n.root, o = n.goal, a = n.heuristic, i = n.directed, s = n.weight; r = t.collection(r)[0], o = t.collection(o)[0]; var l = r.id(), u = o.id(), c = {}, d = {}, p = {}, h = new rh(function(G, se) { return d[G.id()] - d[se.id()]; }), f = new gd(), v = {}, m = {}, g = function(G, se) { h.push(G), f.add(se); }, b, x, w = function() { b = h.pop(), x = b.id(), f.delete(x); }, k = function(G) { return f.has(G); }; g(r, l), c[l] = 0, d[l] = a(r); for (var C = 0; h.size() > 0; ) { if (w(), C++, x === u) { for (var _ = [], $ = o, O = u, F = m[O]; _.unshift($), F != null && _.unshift(F), $ = v[O], $ != null; ) O = $.id(), F = m[O]; return { found: !0, distance: c[x], path: this.spawn(_), steps: C }; } p[x] = !0; for (var A = b._private.edges, T = 0; T < A.length; T++) { var R = A[T]; if (this.hasElementWithId(R.id()) && !(i && R.data("source") !== x)) { var M = R.source(), j = R.target(), P = M.id() !== x ? M : j, V = P.id(); if (this.hasElementWithId(V) && !p[V]) { var U = c[x] + s(R); if (!k(V)) { c[V] = U, d[V] = U + a(P), g(P, V), v[V] = b, m[V] = R; continue; } U < c[V] && (c[V] = U, d[V] = U + a(P), v[V] = b, m[V] = R); } } } } return { found: !1, distance: void 0, path: void 0, steps: C }; } }, $me = Br({ weight: function(e) { return 1; }, directed: !1 }), Eme = { // Implemented from pseudocode from wikipedia floydWarshall: function(e) { for (var t = this.cy(), n = $me(e), r = n.weight, o = n.directed, a = r, i = this.byGroup(), s = i.nodes, l = i.edges, u = s.length, c = u * u, d = function(ae) { return s.indexOf(ae); }, p = function(ae) { return s[ae]; }, h = new Array(c), f = 0; f < c; f++) { var v = f % u, m = (f - v) / u; m === v ? h[f] = 0 : h[f] = 1 / 0; } for (var g = new Array(c), b = new Array(c), x = 0; x < l.length; x++) { var w = l[x], k = w.source()[0], C = w.target()[0]; if (k !== C) { var _ = d(k), $ = d(C), O = _ * u + $, F = a(w); if (h[O] > F && (h[O] = F, g[O] = $, b[O] = w), !o) { var A = $ * u + _; !o && h[A] > F && (h[A] = F, g[A] = _, b[A] = w); } } } for (var T = 0; T < u; T++) for (var R = 0; R < u; R++) for (var M = R * u + T, j = 0; j < u; j++) { var P = R * u + j, V = T * u + j; h[M] + h[V] < h[P] && (h[P] = h[M] + h[V], g[P] = g[M]); } var U = function(ae) { return (gt(ae) ? t.filter(ae) : ae)[0]; }, G = function(ae) { return d(U(ae)); }, se = { distance: function(ae, de) { var me = G(ae), te = G(de); return h[me * u + te]; }, path: function(ae, de) { var me = G(ae), te = G(de), oe = p(me); if (me === te) return oe.collection(); if (g[me * u + te] == null) return t.collection(); var ne = t.collection(), ee = me, Z; for (ne.merge(oe); me !== te; ) ee = me, me = g[me * u + te], Z = b[ee * u + me], ne.merge(Z), ne.merge(p(me)); return ne; } }; return se; } // floydWarshall }, Ome = Br({ weight: function(e) { return 1; }, directed: !1, root: null }), Fme = { // Implemented from pseudocode from wikipedia bellmanFord: function(e) { var t = this, n = Ome(e), r = n.weight, o = n.directed, a = n.root, i = r, s = this, l = this.cy(), u = this.byGroup(), c = u.edges, d = u.nodes, p = d.length, h = new ii(), f = !1, v = []; a = l.collection(a)[0], c.unmergeBy(function(Ie) { return Ie.isLoop(); }); for (var m = c.length, g = function(Ie) { var Ae = h.get(Ie.id()); return Ae || (Ae = {}, h.set(Ie.id(), Ae)), Ae; }, b = function(Ie) { return (gt(Ie) ? l.$(Ie) : Ie)[0]; }, x = function(Ie) { return g(b(Ie)).dist; }, w = function(Ie) { for (var Ae = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : a, qe = b(Ie), et = [], He = qe; ; ) { if (He == null) return t.spawn(); var ot = g(He), tt = ot.edge, Qe = ot.pred; if (et.unshift(He[0]), He.same(Ae) && et.length > 0) break; tt != null && et.unshift(tt), He = Qe; } return s.spawn(et); }, k = 0; k < p; k++) { var C = d[k], _ = g(C); C.same(a) ? _.dist = 0 : _.dist = 1 / 0, _.pred = null, _.edge = null; } for (var $ = !1, O = function(Ie, Ae, qe, et, He, ot) { var tt = et.dist + ot; tt < He.dist && !qe.same(et.edge) && (He.dist = tt, He.pred = Ie, He.edge = qe, $ = !0); }, F = 1; F < p; F++) { $ = !1; for (var A = 0; A < m; A++) { var T = c[A], R = T.source(), M = T.target(), j = i(T), P = g(R), V = g(M); O(R, M, T, P, V, j), o || O(M, R, T, V, P, j); } if (!$) break; } if ($) for (var U = [], G = 0; G < m; G++) { var se = c[G], ae = se.source(), de = se.target(), me = i(se), te = g(ae).dist, oe = g(de).dist; if (te + me < oe || !o && oe + me < te) if (f || (sn("Graph contains a negative weight cycle for Bellman-Ford"), f = !0), e.findNegativeWeightCycles !== !1) { var ne = []; te + me < oe && ne.push(ae), !o && oe + me < te && ne.push(de); for (var ee = ne.length, Z = 0; Z < ee; Z++) { var le = ne[Z], pe = [le]; pe.push(g(le).edge); for (var ke = g(le).pred; pe.indexOf(ke) === -1; ) pe.push(ke), pe.push(g(ke).edge), ke = g(ke).pred; pe = pe.slice(pe.indexOf(ke)); for (var Ne = pe[0].id(), De = 0, _e = 2; _e < pe.length; _e += 2) pe[_e].id() < Ne && (Ne = pe[_e].id(), De = _e); pe = pe.slice(De).concat(pe.slice(0, De)), pe.push(pe[0]); var Fe = pe.map(function(Ie) { return Ie.id(); }).join(","); U.indexOf(Fe) === -1 && (v.push(s.spawn(pe)), U.push(Fe)); } } else break; } return { distanceTo: x, pathTo: w, hasNegativeWeightCycle: f, negativeWeightCycles: v }; } // bellmanFord }, Tme = Math.sqrt(2), Ame = function(e, t, n) { n.length === 0 && Un("Karger-Stein must be run on a connected (sub)graph"); for (var r = n[e], o = r[1], a = r[2], i = t[o], s = t[a], l = n, u = l.length - 1; u >= 0; u--) { var c = l[u], d = c[1], p = c[2]; (t[d] === i && t[p] === s || t[d] === s && t[p] === i) && l.splice(u, 1); } for (var h = 0; h < l.length; h++) { var f = l[h]; f[1] === s ? (l[h] = f.slice(), l[h][1] = i) : f[2] === s && (l[h] = f.slice(), l[h][2] = i); } for (var v = 0; v < t.length; v++) t[v] === s && (t[v] = i); return l; }, py = function(e, t, n, r) { for (; n > r; ) { var o = Math.floor(Math.random() * t.length); t = Ame(o, e, t), n--; } return t; }, Ime = { // Computes the minimum cut of an undirected graph // Returns the correct answer with high probability kargerStein: function() { var e = this, t = this.byGroup(), n = t.nodes, r = t.edges; r.unmergeBy(function(V) { return V.isLoop(); }); var o = n.length, a = r.length, i = Math.ceil(Math.pow(Math.log(o) / Math.LN2, 2)), s = Math.floor(o / Tme); if (o < 2) { Un("At least 2 nodes are required for Karger-Stein algorithm"); return; } for (var l = [], u = 0; u < a; u++) { var c = r[u]; l.push([u, n.indexOf(c.source()), n.indexOf(c.target())]); } for (var d = 1 / 0, p = [], h = new Array(o), f = new Array(o), v = new Array(o), m = function(V, U) { for (var G = 0; G < o; G++) U[G] = V[G]; }, g = 0; g <= i; g++) { for (var b = 0; b < o; b++) f[b] = b; var x = py(f, l.slice(), o, s), w = x.slice(); m(f, v); var k = py(f, x, s, 2), C = py(v, w, s, 2); k.length <= C.length && k.length < d ? (d = k.length, p = k, m(f, h)) : C.length <= k.length && C.length < d && (d = C.length, p = C, m(v, h)); } for (var _ = this.spawn(p.map(function(V) { return r[V[0]]; })), $ = this.spawn(), O = this.spawn(), F = h[0], A = 0; A < h.length; A++) { var T = h[A], R = n[A]; T === F ? $.merge(R) : O.merge(R); } var M = function(V) { var U = e.spawn(); return V.forEach(function(G) { U.merge(G), G.connectedEdges().forEach(function(se) { e.contains(se) && !_.contains(se) && U.merge(se); }); }), U; }, j = [M($), M(O)], P = { cut: _, components: j, // n.b. partitions are included to be compatible with the old api spec // (could be removed in a future major version) partition1: $, partition2: O }; return P; } }, Pme = function(e) { return { x: e.x, y: e.y }; }, vm = function(e, t, n) { return { x: e.x * t + n.x, y: e.y * t + n.y }; }, NB = function(e, t, n) { return { x: (e.x - n.x) / t, y: (e.y - n.y) / t }; }, xc = function(e) { return { x: e[0], y: e[1] }; }, Lme = function(e) { for (var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : e.length, r = 1 / 0, o = t; o < n; o++) { var a = e[o]; isFinite(a) && (r = Math.min(a, r)); } return r; }, Rme = function(e) { for (var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : e.length, r = -1 / 0, o = t; o < n; o++) { var a = e[o]; isFinite(a) && (r = Math.max(a, r)); } return r; }, Nme = function(e) { for (var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : e.length, r = 0, o = 0, a = t; a < n; a++) { var i = e[a]; isFinite(i) && (r += i, o++); } return r / o; }, Mme = function(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : e.length, r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !0, o = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !0, a = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : !0; r ? e = e.slice(t, n) : (n < e.length && e.splice(n, e.length - n), t > 0 && e.splice(0, t)); for (var i = 0, s = e.length - 1; s >= 0; s--) { var l = e[s]; a ? isFinite(l) || (e[s] = -1 / 0, i++) : e.splice(s, 1); } o && e.sort(function(d, p) { return d - p; }); var u = e.length, c = Math.floor(u / 2); return u % 2 !== 0 ? e[c + 1 + i] : (e[c - 1 + i] + e[c + i]) / 2; }, Dme = function(e) { return Math.PI * e / 180; }, rv = function(e, t) { return Math.atan2(t, e) - Math.PI / 2; }, m$ = Math.log2 || function(e) { return Math.log(e) / Math.log(2); }, MB = function(e) { return e > 0 ? 1 : e < 0 ? -1 : 0; }, fu = function(e, t) { return Math.sqrt(Dl(e, t)); }, Dl = function(e, t) { var n = t.x - e.x, r = t.y - e.y; return n * n + r * r; }, Bme = function(e) { for (var t = e.length, n = 0, r = 0; r < t; r++) n += e[r]; for (var o = 0; o < t; o++) e[o] = e[o] / n; return e; }, gr = function(e, t, n, r) { return (1 - r) * (1 - r) * e + 2 * (1 - r) * r * t + r * r * n; }, Sc = function(e, t, n, r) { return { x: gr(e.x, t.x, n.x, r), y: gr(e.y, t.y, n.y, r) }; }, zme = function(e, t, n, r) { var o = { x: t.x - e.x, y: t.y - e.y }, a = fu(e, t), i = { x: o.x / a, y: o.y / a }; return n = n ?? 0, r = r ?? n * a, { x: e.x + i.x * r, y: e.y + i.y * r }; }, uf = function(e, t, n) { return Math.max(e, Math.min(n, t)); }, Fo = function(e) { if (e == null) return { x1: 1 / 0, y1: 1 / 0, x2: -1 / 0, y2: -1 / 0, w: 0, h: 0 }; if (e.x1 != null && e.y1 != null) { if (e.x2 != null && e.y2 != null && e.x2 >= e.x1 && e.y2 >= e.y1) return { x1: e.x1, y1: e.y1, x2: e.x2, y2: e.y2, w: e.x2 - e.x1, h: e.y2 - e.y1 }; if (e.w != null && e.h != null && e.w >= 0 && e.h >= 0) return { x1: e.x1, y1: e.y1, x2: e.x1 + e.w, y2: e.y1 + e.h, w: e.w, h: e.h }; } }, jme = function(e) { return { x1: e.x1, x2: e.x2, w: e.w, y1: e.y1, y2: e.y2, h: e.h }; }, Vme = function(e) { e.x1 = 1 / 0, e.y1 = 1 / 0, e.x2 = -1 / 0, e.y2 = -1 / 0, e.w = 0, e.h = 0; }, Hme = function(e, t, n) { return { x1: e.x1 + t, x2: e.x2 + t, y1: e.y1 + n, y2: e.y2 + n, w: e.w, h: e.h }; }, DB = function(e, t) { e.x1 = Math.min(e.x1, t.x1), e.x2 = Math.max(e.x2, t.x2), e.w = e.x2 - e.x1, e.y1 = Math.min(e.y1, t.y1), e.y2 = Math.max(e.y2, t.y2), e.h = e.y2 - e.y1; }, Ume = function(e, t, n) { e.x1 = Math.min(e.x1, t), e.x2 = Math.max(e.x2, t), e.w = e.x2 - e.x1, e.y1 = Math.min(e.y1, n), e.y2 = Math.max(e.y2, n), e.h = e.y2 - e.y1; }, Kv = function(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0; return e.x1 -= t, e.x2 += t, e.y1 -= t, e.y2 += t, e.w = e.x2 - e.x1, e.h = e.y2 - e.y1, e; }, Gv = function(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [0], n, r, o, a; if (t.length === 1) n = r = o = a = t[0]; else if (t.length === 2) n = o = t[0], a = r = t[1]; else if (t.length === 4) { var i = Ta(t, 4); n = i[0], r = i[1], o = i[2], a = i[3]; } return e.x1 -= a, e.x2 += r, e.y1 -= n, e.y2 += o, e.w = e.x2 - e.x1, e.h = e.y2 - e.y1, e; }, LO = function(e, t) { e.x1 = t.x1, e.y1 = t.y1, e.x2 = t.x2, e.y2 = t.y2, e.w = e.x2 - e.x1, e.h = e.y2 - e.y1; }, y$ = function(e, t) { return !(e.x1 > t.x2 || t.x1 > e.x2 || e.x2 < t.x1 || t.x2 < e.x1 || e.y2 < t.y1 || t.y2 < e.y1 || e.y1 > t.y2 || t.y1 > e.y2); }, Gc = function(e, t, n) { return e.x1 <= t && t <= e.x2 && e.y1 <= n && n <= e.y2; }, qme = function(e, t) { return Gc(e, t.x, t.y); }, BB = function(e, t) { return Gc(e, t.x1, t.y1) && Gc(e, t.x2, t.y2); }, zB = function(e, t, n, r, o, a, i) { var s = arguments.length > 7 && arguments[7] !== void 0 ? arguments[7] : "auto", l = s === "auto" ? hu(o, a) : s, u = o / 2, c = a / 2; l = Math.min(l, u, c); var d = l !== u, p = l !== c, h; if (d) { var f = n - u + l - i, v = r - c - i, m = n + u - l + i, g = v; if (h = qs(e, t, n, r, f, v, m, g, !1), h.length > 0) return h; } if (p) { var b = n + u + i, x = r - c + l - i, w = b, k = r + c - l + i; if (h = qs(e, t, n, r, b, x, w, k, !1), h.length > 0) return h; } if (d) { var C = n - u + l - i, _ = r + c + i, $ = n + u - l + i, O = _; if (h = qs(e, t, n, r, C, _, $, O, !1), h.length > 0) return h; } if (p) { var F = n - u - i, A = r - c + l - i, T = F, R = r + c - l + i; if (h = qs(e, t, n, r, F, A, T, R, !1), h.length > 0) return h; } var M; { var j = n - u + l, P = r - c + l; if (M = bp(e, t, n, r, j, P, l + i), M.length > 0 && M[0] <= j && M[1] <= P) return [M[0], M[1]]; } { var V = n + u - l, U = r - c + l; if (M = bp(e, t, n, r, V, U, l + i), M.length > 0 && M[0] >= V && M[1] <= U) return [M[0], M[1]]; } { var G = n + u - l, se = r + c - l; if (M = bp(e, t, n, r, G, se, l + i), M.length > 0 && M[0] >= G && M[1] >= se) return [M[0], M[1]]; } { var ae = n - u + l, de = r + c - l; if (M = bp(e, t, n, r, ae, de, l + i), M.length > 0 && M[0] <= ae && M[1] >= de) return [M[0], M[1]]; } return []; }, Kme = function(e, t, n, r, o, a, i) { var s = i, l = Math.min(n, o), u = Math.max(n, o), c = Math.min(r, a), d = Math.max(r, a); return l - s <= e && e <= u + s && c - s <= t && t <= d + s; }, Gme = function(e, t, n, r, o, a, i, s, l) { var u = { x1: Math.min(n, i, o) - l, x2: Math.max(n, i, o) + l, y1: Math.min(r, s, a) - l, y2: Math.max(r, s, a) + l }; return !(e < u.x1 || e > u.x2 || t < u.y1 || t > u.y2); }, Wme = function(e, t, n, r) { n -= r; var o = t * t - 4 * e * n; if (o < 0) return []; var a = Math.sqrt(o), i = 2 * e, s = (-t + a) / i, l = (-t - a) / i; return [s, l]; }, Yme = function(e, t, n, r, o) { var a = 1e-5; e === 0 && (e = a), t /= e, n /= e, r /= e; var i, s, l, u, c, d, p, h; if (s = (3 * n - t * t) / 9, l = -(27 * r) + t * (9 * n - 2 * (t * t)), l /= 54, i = s * s * s + l * l, o[1] = 0, p = t / 3, i > 0) { c = l + Math.sqrt(i), c = c < 0 ? -Math.pow(-c, 1 / 3) : Math.pow(c, 1 / 3), d = l - Math.sqrt(i), d = d < 0 ? -Math.pow(-d, 1 / 3) : Math.pow(d, 1 / 3), o[0] = -p + c + d, p += (c + d) / 2, o[4] = o[2] = -p, p = Math.sqrt(3) * (-d + c) / 2, o[3] = p, o[5] = -p; return; } if (o[5] = o[3] = 0, i === 0) { h = l < 0 ? -Math.pow(-l, 1 / 3) : Math.pow(l, 1 / 3), o[0] = -p + 2 * h, o[4] = o[2] = -(h + p); return; } s = -s, u = s * s * s, u = Math.acos(l / Math.sqrt(u)), h = 2 * Math.sqrt(s), o[0] = -p + h * Math.cos(u / 3), o[2] = -p + h * Math.cos((u + 2 * Math.PI) / 3), o[4] = -p + h * Math.cos((u + 4 * Math.PI) / 3); }, Xme = function(e, t, n, r, o, a, i, s) { var l = 1 * n * n - 4 * n * o + 2 * n * i + 4 * o * o - 4 * o * i + i * i + r * r - 4 * r * a + 2 * r * s + 4 * a * a - 4 * a * s + s * s, u = 1 * 9 * n * o - 3 * n * n - 3 * n * i - 6 * o * o + 3 * o * i + 9 * r * a - 3 * r * r - 3 * r * s - 6 * a * a + 3 * a * s, c = 1 * 3 * n * n - 6 * n * o + n * i - n * e + 2 * o * o + 2 * o * e - i * e + 3 * r * r - 6 * r * a + r * s - r * t + 2 * a * a + 2 * a * t - s * t, d = 1 * n * o - n * n + n * e - o * e + r * a - r * r + r * t - a * t, p = []; Yme(l, u, c, d, p); for (var h = 1e-7, f = [], v = 0; v < 6; v += 2) Math.abs(p[v + 1]) < h && p[v] >= 0 && p[v] <= 1 && f.push(p[v]); f.push(1), f.push(0); for (var m = -1, g, b, x, w = 0; w < f.length; w++) g = Math.pow(1 - f[w], 2) * n + 2 * (1 - f[w]) * f[w] * o + f[w] * f[w] * i, b = Math.pow(1 - f[w], 2) * r + 2 * (1 - f[w]) * f[w] * a + f[w] * f[w] * s, x = Math.pow(g - e, 2) + Math.pow(b - t, 2), m >= 0 ? x < m && (m = x) : m = x; return m; }, Zme = function(e, t, n, r, o, a) { var i = [e - n, t - r], s = [o - n, a - r], l = s[0] * s[0] + s[1] * s[1], u = i[0] * i[0] + i[1] * i[1], c = i[0] * s[0] + i[1] * s[1], d = c * c / l; return c < 0 ? u : d > l ? (e - o) * (e - o) + (t - a) * (t - a) : u - d; }, ho = function(e, t, n) { for (var r, o, a, i, s, l = 0, u = 0; u < n.length / 2; u++) if (r = n[u * 2], o = n[u * 2 + 1], u + 1 < n.length / 2 ? (a = n[(u + 1) * 2], i = n[(u + 1) * 2 + 1]) : (a = n[(u + 1 - n.length / 2) * 2], i = n[(u + 1 - n.length / 2) * 2 + 1]), !(r == e && a == e)) if (r >= e && e >= a || r <= e && e <= a) s = (e - r) / (a - r) * (i - o) + o, s > t && l++; else continue; return l % 2 !== 0; }, rs = function(e, t, n, r, o, a, i, s, l) { var u = new Array(n.length), c; s[0] != null ? (c = Math.atan(s[1] / s[0]), s[0] < 0 ? c = c + Math.PI / 2 : c = -c - Math.PI / 2) : c = s; for (var d = Math.cos(-c), p = Math.sin(-c), h = 0; h < u.length / 2; h++) u[h * 2] = a / 2 * (n[h * 2] * d - n[h * 2 + 1] * p), u[h * 2 + 1] = i / 2 * (n[h * 2 + 1] * d + n[h * 2] * p), u[h * 2] += r, u[h * 2 + 1] += o; var f; if (l > 0) { var v = Vg(u, -l); f = jg(v); } else f = u; return ho(e, t, f); }, Jme = function(e, t, n, r, o, a, i, s) { for (var l = new Array(n.length * 2), u = 0; u < s.length; u++) { var c = s[u]; l[u * 4 + 0] = c.startX, l[u * 4 + 1] = c.startY, l[u * 4 + 2] = c.stopX, l[u * 4 + 3] = c.stopY; var d = Math.pow(c.cx - e, 2) + Math.pow(c.cy - t, 2); if (d <= Math.pow(c.radius, 2)) return !0; } return ho(e, t, l); }, jg = function(e) { for (var t = new Array(e.length / 2), n, r, o, a, i, s, l, u, c = 0; c < e.length / 4; c++) { n = e[c * 4], r = e[c * 4 + 1], o = e[c * 4 + 2], a = e[c * 4 + 3], c < e.length / 4 - 1 ? (i = e[(c + 1) * 4], s = e[(c + 1) * 4 + 1], l = e[(c + 1) * 4 + 2], u = e[(c + 1) * 4 + 3]) : (i = e[0], s = e[1], l = e[2], u = e[3]); var d = qs(n, r, o, a, i, s, l, u, !0); t[c * 2] = d[0], t[c * 2 + 1] = d[1]; } return t; }, Vg = function(e, t) { for (var n = new Array(e.length * 2), r, o, a, i, s = 0; s < e.length / 2; s++) { r = e[s * 2], o = e[s * 2 + 1], s < e.length / 2 - 1 ? (a = e[(s + 1) * 2], i = e[(s + 1) * 2 + 1]) : (a = e[0], i = e[1]); var l = i - o, u = -(a - r), c = Math.sqrt(l * l + u * u), d = l / c, p = u / c; n[s * 4] = r + d * t, n[s * 4 + 1] = o + p * t, n[s * 4 + 2] = a + d * t, n[s * 4 + 3] = i + p * t; } return n; }, Qme = function(e, t, n, r, o, a) { var i = n - e, s = r - t; i /= o, s /= a; var l = Math.sqrt(i * i + s * s), u = l - 1; if (u < 0) return []; var c = u / l; return [(n - e) * c + e, (r - t) * c + t]; }, ql = function(e, t, n, r, o, a, i) { return e -= o, t -= a, e /= n / 2 + i, t /= r / 2 + i, e * e + t * t <= 1; }, bp = function(e, t, n, r, o, a, i) { var s = [n - e, r - t], l = [e - o, t - a], u = s[0] * s[0] + s[1] * s[1], c = 2 * (l[0] * s[0] + l[1] * s[1]), d = l[0] * l[0] + l[1] * l[1] - i * i, p = c * c - 4 * u * d; if (p < 0) return []; var h = (-c + Math.sqrt(p)) / (2 * u), f = (-c - Math.sqrt(p)) / (2 * u), v = Math.min(h, f), m = Math.max(h, f), g = []; if (v >= 0 && v <= 1 && g.push(v), m >= 0 && m <= 1 && g.push(m), g.length === 0) return []; var b = g[0] * s[0] + e, x = g[0] * s[1] + t; if (g.length > 1) { if (g[0] == g[1]) return [b, x]; var w = g[1] * s[0] + e, k = g[1] * s[1] + t; return [b, x, w, k]; } else return [b, x]; }, fy = function(e, t, n) { return t <= e && e <= n || n <= e && e <= t ? e : e <= t && t <= n || n <= t && t <= e ? t : n; }, qs = function(e, t, n, r, o, a, i, s, l) { var u = e - o, c = n - e, d = i - o, p = t - a, h = r - t, f = s - a, v = d * p - f * u, m = c * p - h * u, g = f * c - d * h; if (g !== 0) { var b = v / g, x = m / g, w = 1e-3, k = 0 - w, C = 1 + w; return k <= b && b <= C && k <= x && x <= C ? [e + b * c, t + b * h] : l ? [e + b * c, t + b * h] : []; } else return v === 0 || m === 0 ? fy(e, n, i) === i ? [i, s] : fy(e, n, o) === o ? [o, a] : fy(o, i, n) === n ? [n, r] : [] : []; }, cf = function(e, t, n, r, o, a, i, s) { var l = [], u, c = new Array(n.length), d = !0; a == null && (d = !1); var p; if (d) { for (var h = 0; h < c.length / 2; h++) c[h * 2] = n[h * 2] * a + r, c[h * 2 + 1] = n[h * 2 + 1] * i + o; if (s > 0) { var f = Vg(c, -s); p = jg(f); } else p = c; } else p = n; for (var v, m, g, b, x = 0; x < p.length / 2; x++) v = p[x * 2], m = p[x * 2 + 1], x < p.length / 2 - 1 ? (g = p[(x + 1) * 2], b = p[(x + 1) * 2 + 1]) : (g = p[0], b = p[1]), u = qs(e, t, r, o, v, m, g, b), u.length !== 0 && l.push(u[0], u[1]); return l; }, e1e = function(e, t, n, r, o, a, i, s, l) { var u = [], c, d = new Array(n.length * 2); l.forEach(function(g, b) { b === 0 ? (d[d.length - 2] = g.startX, d[d.length - 1] = g.startY) : (d[b * 4 - 2] = g.startX, d[b * 4 - 1] = g.startY), d[b * 4] = g.stopX, d[b * 4 + 1] = g.stopY, c = bp(e, t, r, o, g.cx, g.cy, g.radius), c.length !== 0 && u.push(c[0], c[1]); }); for (var p = 0; p < d.length / 4; p++) c = qs(e, t, r, o, d[p * 4], d[p * 4 + 1], d[p * 4 + 2], d[p * 4 + 3], !1), c.length !== 0 && u.push(c[0], c[1]); if (u.length > 2) { for (var h = [u[0], u[1]], f = Math.pow(h[0] - e, 2) + Math.pow(h[1] - t, 2), v = 1; v < u.length / 2; v++) { var m = Math.pow(u[v * 2] - e, 2) + Math.pow(u[v * 2 + 1] - t, 2); m <= f && (h[0] = u[v * 2], h[1] = u[v * 2 + 1], f = m); } return h; } return u; }, ov = function(e, t, n) { var r = [e[0] - t[0], e[1] - t[1]], o = Math.sqrt(r[0] * r[0] + r[1] * r[1]), a = (o - n) / o; return a < 0 && (a = 1e-5), [t[0] + a * r[0], t[1] + a * r[1]]; }, ro = function(e, t) { var n = jC(e, t); return n = jB(n), n; }, jB = function(e) { for (var t, n, r = e.length / 2, o = 1 / 0, a = 1 / 0, i = -1 / 0, s = -1 / 0, l = 0; l < r; l++) t = e[2 * l], n = e[2 * l + 1], o = Math.min(o, t), i = Math.max(i, t), a = Math.min(a, n), s = Math.max(s, n); for (var u = 2 / (i - o), c = 2 / (s - a), d = 0; d < r; d++) t = e[2 * d] = e[2 * d] * u, n = e[2 * d + 1] = e[2 * d + 1] * c, o = Math.min(o, t), i = Math.max(i, t), a = Math.min(a, n), s = Math.max(s, n); if (a < -1) for (var p = 0; p < r; p++) n = e[2 * p + 1] = e[2 * p + 1] + (-1 - a); return e; }, jC = function(e, t) { var n = 1 / e * 2 * Math.PI, r = e % 2 === 0 ? Math.PI / 2 + n / 2 : Math.PI / 2; r += t; for (var o = new Array(e * 2), a, i = 0; i < e; i++) a = i * n + r, o[2 * i] = Math.cos(a), o[2 * i + 1] = Math.sin(-a); return o; }, hu = function(e, t) { return Math.min(e / 4, t / 4, 8); }, VB = function(e, t) { return Math.min(e / 10, t / 10, 8); }, b$ = function() { return 8; }, t1e = function(e, t, n) { return [e - 2 * t + n, 2 * (t - e), e]; }, VC = function(e, t) { return { heightOffset: Math.min(15, 0.05 * t), widthOffset: Math.min(100, 0.25 * e), ctrlPtOffsetPct: 0.05 }; }, n1e = Br({ dampingFactor: 0.8, precision: 1e-6, iterations: 200, weight: function(e) { return 1; } }), r1e = { pageRank: function(e) { for (var t = n1e(e), n = t.dampingFactor, r = t.precision, o = t.iterations, a = t.weight, i = this._private.cy, s = this.byGroup(), l = s.nodes, u = s.edges, c = l.length, d = c * c, p = u.length, h = new Array(d), f = new Array(c), v = (1 - n) / c, m = 0; m < c; m++) { for (var g = 0; g < c; g++) { var b = m * c + g; h[b] = 0; } f[m] = 0; } for (var x = 0; x < p; x++) { var w = u[x], k = w.data("source"), C = w.data("target"); if (k !== C) { var _ = l.indexOfId(k), $ = l.indexOfId(C), O = a(w), F = $ * c + _; h[F] += O, f[_] += O; } } for (var A = 1 / c + v, T = 0; T < c; T++) if (f[T] === 0) for (var R = 0; R < c; R++) { var M = R * c + T; h[M] = A; } else for (var j = 0; j < c; j++) { var P = j * c + T; h[P] = h[P] / f[T] + v; } for (var V = new Array(c), U = new Array(c), G, se = 0; se < c; se++) V[se] = 1; for (var ae = 0; ae < o; ae++) { for (var de = 0; de < c; de++) U[de] = 0; for (var me = 0; me < c; me++) for (var te = 0; te < c; te++) { var oe = me * c + te; U[me] += h[oe] * V[te]; } Bme(U), G = V, V = U, U = G; for (var ne = 0, ee = 0; ee < c; ee++) { var Z = G[ee] - V[ee]; ne += Z * Z; } if (ne < r) break; } var le = { rank: function(pe) { return pe = i.collection(pe)[0], V[l.indexOf(pe)]; } }; return le; } // pageRank }, RO = Br({ root: null, weight: function(e) { return 1; }, directed: !1, alpha: 0 }), $c = { degreeCentralityNormalized: function(e) { e = RO(e); var t = this.cy(), n = this.nodes(), r = n.length; if (e.directed) { for (var o = {}, a = {}, i = 0, s = 0, l = 0; l < r; l++) { var u = n[l], c = u.id(); e.root = u; var d = this.degreeCentrality(e); i < d.indegree && (i = d.indegree), s < d.outdegree && (s = d.outdegree), o[c] = d.indegree, a[c] = d.outdegree; } return { indegree: function(g) { return i == 0 ? 0 : (gt(g) && (g = t.filter(g)), o[g.id()] / i); }, outdegree: function(g) { return s === 0 ? 0 : (gt(g) && (g = t.filter(g)), a[g.id()] / s); } }; } else { for (var p = {}, h = 0, f = 0; f < r; f++) { var v = n[f]; e.root = v; var m = this.degreeCentrality(e); h < m.degree && (h = m.degree), p[v.id()] = m.degree; } return { degree: function(g) { return h === 0 ? 0 : (gt(g) && (g = t.filter(g)), p[g.id()] / h); } }; } }, // degreeCentralityNormalized // Implemented from the algorithm in Opsahl's paper // "Node centrality in weighted networks: Generalizing degree and shortest paths" // check the heading 2 "Degree" degreeCentrality: function(e) { e = RO(e); var t = this.cy(), n = this, r = e, o = r.root, a = r.weight, i = r.directed, s = r.alpha; if (o = t.collection(o)[0], i) { for (var l = o.connectedEdges(), u = l.filter(function(k) { return k.target().same(o) && n.has(k); }), c = l.filter(function(k) { return k.source().same(o) && n.has(k); }), d = u.length, p = c.length, h = 0, f = 0, v = 0; v < u.length; v++) h += a(u[v]); for (var m = 0; m < c.length; m++) f += a(c[m]); return { indegree: Math.pow(d, 1 - s) * Math.pow(h, s), outdegree: Math.pow(p, 1 - s) * Math.pow(f, s) }; } else { for (var g = o.connectedEdges().intersection(n), b = g.length, x = 0, w = 0; w < g.length; w++) x += a(g[w]); return { degree: Math.pow(b, 1 - s) * Math.pow(x, s) }; } } // degreeCentrality }; $c.dc = $c.degreeCentrality; $c.dcn = $c.degreeCentralityNormalised = $c.degreeCentralityNormalized; var NO = Br({ harmonic: !0, weight: function() { return 1; }, directed: !1, root: null }), Ec = { closenessCentralityNormalized: function(e) { for (var t = NO(e), n = t.harmonic, r = t.weight, o = t.directed, a = this.cy(), i = {}, s = 0, l = this.nodes(), u = this.floydWarshall({ weight: r, directed: o }), c = 0; c < l.length; c++) { for (var d = 0, p = l[c], h = 0; h < l.length; h++) if (c !== h) { var f = u.distance(p, l[h]); n ? d += 1 / f : d += f; } n || (d = 1 / d), s < d && (s = d), i[p.id()] = d; } return { closeness: function(v) { return s == 0 ? 0 : (gt(v) ? v = a.filter(v)[0].id() : v = v.id(), i[v] / s); } }; }, // Implemented from pseudocode from wikipedia closenessCentrality: function(e) { var t = NO(e), n = t.root, r = t.weight, o = t.directed, a = t.harmonic; n = this.filter(n)[0]; for (var i = this.dijkstra({ root: n, weight: r, directed: o }), s = 0, l = this.nodes(), u = 0; u < l.length; u++) { var c = l[u]; if (!c.same(n)) { var d = i.distanceTo(c); a ? s += 1 / d : s += d; } } return a ? s : 1 / s; } // closenessCentrality }; Ec.cc = Ec.closenessCentrality; Ec.ccn = Ec.closenessCentralityNormalised = Ec.closenessCentralityNormalized; var o1e = Br({ weight: null, directed: !1 }), HC = { // Implemented from the algorithm in the paper "On Variants of Shortest-Path Betweenness Centrality and their Generic Computation" by Ulrik Brandes betweennessCentrality: function(e) { for (var t = o1e(e), n = t.directed, r = t.weight, o = r != null, a = this.cy(), i = this.nodes(), s = {}, l = {}, u = 0, c = { set: function(g, b) { l[g] = b, b > u && (u = b); }, get: function(g) { return l[g]; } }, d = 0; d < i.length; d++) { var p = i[d], h = p.id(); n ? s[h] = p.outgoers().nodes() : s[h] = p.openNeighborhood().nodes(), c.set(h, 0); } for (var f = function(g) { for (var b = i[g].id(), x = [], w = {}, k = {}, C = {}, _ = new rh(function(me, te) { return C[me] - C[te]; }), $ = 0; $ < i.length; $++) { var O = i[$].id(); w[O] = [], k[O] = 0, C[O] = 1 / 0; } for (k[b] = 1, C[b] = 0, _.push(b); !_.empty(); ) { var F = _.pop(); if (x.push(F), o) for (var A = 0; A < s[F].length; A++) { var T = s[F][A], R = a.getElementById(F), M = void 0; R.edgesTo(T).length > 0 ? M = R.edgesTo(T)[0] : M = T.edgesTo(R)[0]; var j = r(M); T = T.id(), C[T] > C[F] + j && (C[T] = C[F] + j, _.nodes.indexOf(T) < 0 ? _.push(T) : _.updateItem(T), k[T] = 0, w[T] = []), C[T] == C[F] + j && (k[T] = k[T] + k[F], w[T].push(F)); } else for (var P = 0; P < s[F].length; P++) { var V = s[F][P].id(); C[V] == 1 / 0 && (_.push(V), C[V] = C[F] + 1), C[V] == C[F] + 1 && (k[V] = k[V] + k[F], w[V].push(F)); } } for (var U = {}, G = 0; G < i.length; G++) U[i[G].id()] = 0; for (; x.length > 0; ) { for (var se = x.pop(), ae = 0; ae < w[se].length; ae++) { var de = w[se][ae]; U[de] = U[de] + k[de] / k[se] * (1 + U[se]); } se != i[g].id() && c.set(se, c.get(se) + U[se]); } }, v = 0; v < i.length; v++) f(v); var m = { betweenness: function(g) { var b = a.collection(g).id(); return c.get(b); }, betweennessNormalized: function(g) { if (u == 0) return 0; var b = a.collection(g).id(); return c.get(b) / u; } }; return m.betweennessNormalised = m.betweennessNormalized, m; } // betweennessCentrality }; HC.bc = HC.betweennessCentrality; var a1e = Br({ expandFactor: 2, // affects time of computation and cluster granularity to some extent: M * M inflateFactor: 2, // affects cluster granularity (the greater the value, the more clusters): M(i,j) / E(j) multFactor: 1, // optional self loops for each node. Use a neutral value to improve cluster computations. maxIterations: 20, // maximum number of iterations of the MCL algorithm in a single run attributes: [ // attributes/features used to group nodes, ie. similarity values between nodes function(e) { return 1; } ] }), i1e = function(e) { return a1e(e); }, s1e = function(e, t) { for (var n = 0, r = 0; r < t.length; r++) n += t[r](e); return n; }, l1e = function(e, t, n) { for (var r = 0; r < t; r++) e[r * t + r] = n; }, HB = function(e, t) { for (var n, r = 0; r < t; r++) { n = 0; for (var o = 0; o < t; o++) n += e[o * t + r]; for (var a = 0; a < t; a++) e[a * t + r] = e[a * t + r] / n; } }, u1e = function(e, t, n) { for (var r = new Array(n * n), o = 0; o < n; o++) { for (var a = 0; a < n; a++) r[o * n + a] = 0; for (var i = 0; i < n; i++) for (var s = 0; s < n; s++) r[o * n + s] += e[o * n + i] * t[i * n + s]; } return r; }, c1e = function(e, t, n) { for (var r = e.slice(0), o = 1; o < n; o++) e = u1e(e, r, t); return e; }, d1e = function(e, t, n) { for (var r = new Array(t * t), o = 0; o < t * t; o++) r[o] = Math.pow(e[o], n); return HB(r, t), r; }, p1e = function(e, t, n, r) { for (var o = 0; o < n; o++) { var a = Math.round(e[o] * Math.pow(10, r)) / Math.pow(10, r), i = Math.round(t[o] * Math.pow(10, r)) / Math.pow(10, r); if (a !== i) return !1; } return !0; }, f1e = function(e, t, n, r) { for (var o = [], a = 0; a < t; a++) { for (var i = [], s = 0; s < t; s++) Math.round(e[a * t + s] * 1e3) / 1e3 > 0 && i.push(n[s]); i.length !== 0 && o.push(r.collection(i)); } return o; }, h1e = function(e, t) { for (var n = 0; n < e.length; n++) if (!t[n] || e[n].id() !== t[n].id()) return !1; return !0; }, v1e = function(e) { for (var t = 0; t < e.length; t++) for (var n = 0; n < e.length; n++) t != n && h1e(e[t], e[n]) && e.splice(n, 1); return e; }, MO = function(e) { for (var t = this.nodes(), n = this.edges(), r = this.cy(), o = i1e(e), a = {}, i = 0; i < t.length; i++) a[t[i].id()] = i; for (var s = t.length, l = s * s, u = new Array(l), c, d = 0; d < l; d++) u[d] = 0; for (var p = 0; p < n.length; p++) { var h = n[p], f = a[h.source().id()], v = a[h.target().id()], m = s1e(h, o.attributes); u[f * s + v] += m, u[v * s + f] += m; } l1e(u, s, o.multFactor), HB(u, s); for (var g = !0, b = 0; g && b < o.maxIterations; ) g = !1, c = c1e(u, s, o.expandFactor), u = d1e(c, s, o.inflateFactor), p1e(u, c, l, 4) || (g = !0), b++; var x = f1e(u, s, t, r); return x = v1e(x), x; }, g1e = { markovClustering: MO, mcl: MO }, m1e = function(e) { return e; }, UB = function(e, t) { return Math.abs(t - e); }, DO = function(e, t, n) { return e + UB(t, n); }, BO = function(e, t, n) { return e + Math.pow(n - t, 2); }, y1e = function(e) { return Math.sqrt(e); }, b1e = function(e, t, n) { return Math.max(e, UB(t, n)); }, ep = function(e, t, n, r, o) { for (var a = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : m1e, i = r, s, l, u = 0; u < e; u++) s = t(u), l = n(u), i = o(i, s, l); return a(i); }, Wc = { euclidean: function(e, t, n) { return e >= 2 ? ep(e, t, n, 0, BO, y1e) : ep(e, t, n, 0, DO); }, squaredEuclidean: function(e, t, n) { return ep(e, t, n, 0, BO); }, manhattan: function(e, t, n) { return ep(e, t, n, 0, DO); }, max: function(e, t, n) { return ep(e, t, n, -1 / 0, b1e); } }; Wc["squared-euclidean"] = Wc.squaredEuclidean; Wc.squaredeuclidean = Wc.squaredEuclidean; function gm(e, t, n, r, o, a) { var i; return Nn(e) ? i = e : i = Wc[e] || Wc.euclidean, t === 0 && Nn(e) ? i(o, a) : i(t, n, r, o, a); } var w1e = Br({ k: 2, m: 2, sensitivityThreshold: 1e-4, distance: "euclidean", maxIterations: 10, attributes: [], testMode: !1, testCentroids: null }), w$ = function(e) { return w1e(e); }, Hg = function(e, t, n, r, o) { var a = o !== "kMedoids", i = a ? function(c) { return n[c]; } : function(c) { return r[c](n); }, s = function(c) { return r[c](t); }, l = n, u = t; return gm(e, r.length, i, s, l, u); }, hy = function(e, t, n) { for (var r = n.length, o = new Array(r), a = new Array(r), i = new Array(t), s = null, l = 0; l < r; l++) o[l] = e.min(n[l]).value, a[l] = e.max(n[l]).value; for (var u = 0; u < t; u++) { s = []; for (var c = 0; c < r; c++) s[c] = Math.random() * (a[c] - o[c]) + o[c]; i[u] = s; } return i; }, qB = function(e, t, n, r, o) { for (var a = 1 / 0, i = 0, s = 0; s < t.length; s++) { var l = Hg(n, e, t[s], r, o); l < a && (a = l, i = s); } return i; }, KB = function(e, t, n) { for (var r = [], o = null, a = 0; a < t.length; a++) o = t[a], n[o.id()] === e && r.push(o); return r; }, x1e = function(e, t, n) { return Math.abs(t - e) <= n; }, k1e = function(e, t, n) { for (var r = 0; r < e.length; r++) for (var o = 0; o < e[r].length; o++) { var a = Math.abs(e[r][o] - t[r][o]); if (a > n) return !1; } return !0; }, C1e = function(e, t, n) { for (var r = 0; r < n; r++) if (e === t[r]) return !0; return !1; }, zO = function(e, t) { var n = new Array(t); if (e.length < 50) for (var r = 0; r < t; r++) { for (var o = e[Math.floor(Math.random() * e.length)]; C1e(o, n, r); ) o = e[Math.floor(Math.random() * e.length)]; n[r] = o; } else for (var a = 0; a < t; a++) n[a] = e[Math.floor(Math.random() * e.length)]; return n; }, jO = function(e, t, n) { for (var r = 0, o = 0; o < t.length; o++) r += Hg("manhattan", t[o], e, n, "kMedoids"); return r; }, _1e = function(e) { var t = this.cy(), n = this.nodes(), r = null, o = w$(e), a = new Array(o.k), i = {}, s; o.testMode ? typeof o.testCentroids == "number" ? (o.testCentroids, s = hy(n, o.k, o.attributes)) : cr(o.testCentroids) === "object" ? s = o.testCentroids : s = hy(n, o.k, o.attributes) : s = hy(n, o.k, o.attributes); for (var l = !0, u = 0; l && u < o.maxIterations; ) { for (var c = 0; c < n.length; c++) r = n[c], i[r.id()] = qB(r, s, o.distance, o.attributes, "kMeans"); l = !1; for (var d = 0; d < o.k; d++) { var p = KB(d, n, i); if (p.length !== 0) { for (var h = o.attributes.length, f = s[d], v = new Array(h), m = new Array(h), g = 0; g < h; g++) { m[g] = 0; for (var b = 0; b < p.length; b++) r = p[b], m[g] += o.attributes[g](r); v[g] = m[g] / p.length, x1e(v[g], f[g], o.sensitivityThreshold) || (l = !0); } s[d] = v, a[d] = t.collection(p); } } u++; } return a; }, S1e = function(e) { var t = this.cy(), n = this.nodes(), r = null, o = w$(e), a = new Array(o.k), i, s = {}, l, u = new Array(o.k); o.testMode ? typeof o.testCentroids == "number" || (cr(o.testCentroids) === "object" ? i = o.testCentroids : i = zO(n, o.k)) : i = zO(n, o.k); for (var c = !0, d = 0; c && d < o.maxIterations; ) { for (var p = 0; p < n.length; p++) r = n[p], s[r.id()] = qB(r, i, o.distance, o.attributes, "kMedoids"); c = !1; for (var h = 0; h < i.length; h++) { var f = KB(h, n, s); if (f.length !== 0) { u[h] = jO(i[h], f, o.attributes); for (var v = 0; v < f.length; v++) l = jO(f[v], f, o.attributes), l < u[h] && (u[h] = l, i[h] = f[v], c = !0); a[h] = t.collection(f); } } d++; } return a; }, $1e = function(e, t, n, r, o) { for (var a, i, s = 0; s < t.length; s++) for (var l = 0; l < e.length; l++) r[s][l] = Math.pow(n[s][l], o.m); for (var u = 0; u < e.length; u++) for (var c = 0; c < o.attributes.length; c++) { a = 0, i = 0; for (var d = 0; d < t.length; d++) a += r[d][u] * o.attributes[c](t[d]), i += r[d][u]; e[u][c] = a / i; } }, E1e = function(e, t, n, r, o) { for (var a = 0; a < e.length; a++) t[a] = e[a].slice(); for (var i, s, l, u = 2 / (o.m - 1), c = 0; c < n.length; c++) for (var d = 0; d < r.length; d++) { i = 0; for (var p = 0; p < n.length; p++) s = Hg(o.distance, r[d], n[c], o.attributes, "cmeans"), l = Hg(o.distance, r[d], n[p], o.attributes, "cmeans"), i += Math.pow(s / l, u); e[d][c] = 1 / i; } }, O1e = function(e, t, n, r) { for (var o = new Array(n.k), a = 0; a < o.length; a++) o[a] = []; for (var i, s, l = 0; l < t.length; l++) { i = -1 / 0, s = -1; for (var u = 0; u < t[0].length; u++) t[l][u] > i && (i = t[l][u], s = u); o[s].push(e[l]); } for (var c = 0; c < o.length; c++) o[c] = r.collection(o[c]); return o; }, VO = function(e) { var t = this.cy(), n = this.nodes(), r = w$(e), o, a, i, s, l; s = new Array(n.length); for (var u = 0; u < n.length; u++) s[u] = new Array(r.k); i = new Array(n.length); for (var c = 0; c < n.length; c++) i[c] = new Array(r.k); for (var d = 0; d < n.length; d++) { for (var p = 0, h = 0; h < r.k; h++) i[d][h] = Math.random(), p += i[d][h]; for (var f = 0; f < r.k; f++) i[d][f] = i[d][f] / p; } a = new Array(r.k); for (var v = 0; v < r.k; v++) a[v] = new Array(r.attributes.length); l = new Array(n.length); for (var m = 0; m < n.length; m++) l[m] = new Array(r.k); for (var g = !0, b = 0; g && b < r.maxIterations; ) g = !1, $1e(a, n, i, l, r), E1e(i, s, a, n, r), k1e(i, s, r.sensitivityThreshold) || (g = !0), b++; return o = O1e(n, i, r, t), { clusters: o, degreeOfMembership: i }; }, F1e = { kMeans: _1e, kMedoids: S1e, fuzzyCMeans: VO, fcm: VO }, T1e = Br({ distance: "euclidean", // distance metric to compare nodes linkage: "min", // linkage criterion : how to determine the distance between clusters of nodes mode: "threshold", // mode:'threshold' => clusters must be threshold distance apart threshold: 1 / 0, // the distance threshold // mode:'dendrogram' => the nodes are organised as leaves in a tree (siblings are close), merging makes clusters addDendrogram: !1, // whether to add the dendrogram to the graph for viz dendrogramDepth: 0, // depth at which dendrogram branches are merged into the returned clusters attributes: [] // array of attr functions }), A1e = { single: "min", complete: "max" }, I1e = function(e) { var t = T1e(e), n = A1e[t.linkage]; return n != null && (t.linkage = n), t; }, HO = function(e, t, n, r, o) { for (var a = 0, i = 1 / 0, s, l = o.attributes, u = function(_, $) { return gm(o.distance, l.length, function(O) { return l[O](_); }, function(O) { return l[O]($); }, _, $); }, c = 0; c < e.length; c++) { var d = e[c].key, p = n[d][r[d]]; p < i && (a = d, i = p); } if (o.mode === "threshold" && i >= o.threshold || o.mode === "dendrogram" && e.length === 1) return !1; var h = t[a], f = t[r[a]], v; o.mode === "dendrogram" ? v = { left: h, right: f, key: h.key } : v = { value: h.value.concat(f.value), key: h.key }, e[h.index] = v, e.splice(f.index, 1), t[h.key] = v; for (var m = 0; m < e.length; m++) { var g = e[m]; h.key === g.key ? s = 1 / 0 : o.linkage === "min" ? (s = n[h.key][g.key], n[h.key][g.key] > n[f.key][g.key] && (s = n[f.key][g.key])) : o.linkage === "max" ? (s = n[h.key][g.key], n[h.key][g.key] < n[f.key][g.key] && (s = n[f.key][g.key])) : o.linkage === "mean" ? s = (n[h.key][g.key] * h.size + n[f.key][g.key] * f.size) / (h.size + f.size) : o.mode === "dendrogram" ? s = u(g.value, h.value) : s = u(g.value[0], h.value[0]), n[h.key][g.key] = n[g.key][h.key] = s; } for (var b = 0; b < e.length; b++) { var x = e[b].key; if (r[x] === h.key || r[x] === f.key) { for (var w = x, k = 0; k < e.length; k++) { var C = e[k].key; n[x][C] < n[x][w] && (w = C); } r[x] = w; } e[b].index = b; } return h.key = f.key = h.index = f.index = null, !0; }, av = function e(t, n, r) { t && (t.value ? n.push(t.value) : (t.left && e(t.left, n), t.right && e(t.right, n))); }, P1e = function e(t, n) { if (!t) return ""; if (t.left && t.right) { var r = e(t.left, n), o = e(t.right, n), a = n.add({ group: "nodes", data: { id: r + "," + o } }); return n.add({ group: "edges", data: { source: r, target: a.id() } }), n.add({ group: "edges", data: { source: o, target: a.id() } }), a.id(); } else if (t.value) return t.value.id(); }, L1e = function e(t, n, r) { if (!t) return []; var o = [], a = [], i = []; return n === 0 ? (t.left && av(t.left, o), t.right && av(t.right, a), i = o.concat(a), [r.collection(i)]) : n === 1 ? t.value ? [r.collection(t.value)] : (t.left && av(t.left, o), t.right && av(t.right, a), [r.collection(o), r.collection(a)]) : t.value ? [r.collection(t.value)] : (t.left && (o = e(t.left, n - 1, r)), t.right && (a = e(t.right, n - 1, r)), o.concat(a)); }, UO = function(e) { for (var t = this.cy(), n = this.nodes(), r = I1e(e), o = r.attributes, a = function(g, b) { return gm(r.distance, o.length, function(x) { return o[x](g); }, function(x) { return o[x](b); }, g, b); }, i = [], s = [], l = [], u = [], c = 0; c < n.length; c++) { var d = { value: r.mode === "dendrogram" ? n[c] : [n[c]], key: c, index: c }; i[c] = d, u[c] = d, s[c] = [], l[c] = 0; } for (var p = 0; p < i.length; p++) for (var h = 0; h <= p; h++) { var f = void 0; r.mode === "dendrogram" ? f = p === h ? 1 / 0 : a(i[p].value, i[h].value) : f = p === h ? 1 / 0 : a(i[p].value[0], i[h].value[0]), s[p][h] = f, s[h][p] = f, f < s[p][l[p]] && (l[p] = h); } for (var v = HO(i, u, s, l, r); v; ) v = HO(i, u, s, l, r); var m; return r.mode === "dendrogram" ? (m = L1e(i[0], r.dendrogramDepth, t), r.addDendrogram && P1e(i[0], t)) : (m = new Array(i.length), i.forEach(function(g, b) { g.key = g.index = null, m[b] = t.collection(g.value); })), m; }, R1e = { hierarchicalClustering: UO, hca: UO }, N1e = Br({ distance: "euclidean", // distance metric to compare attributes between two nodes preference: "median", // suitability of a data point to serve as an exemplar damping: 0.8, // damping factor between [0.5, 1) maxIterations: 1e3, // max number of iterations to run minIterations: 100, // min number of iterations to run in order for clustering to stop attributes: [ // functions to quantify the similarity between any two points // e.g. node => node.data('weight') ] }), M1e = function(e) { var t = e.damping, n = e.preference; 0.5 <= t && t < 1 || Un("Damping must range on [0.5, 1). Got: ".concat(t)); var r = ["median", "mean", "min", "max"]; return r.some(function(o) { return o === n; }) || Ze(n) || Un("Preference must be one of [".concat(r.map(function(o) { return "'".concat(o, "'"); }).join(", "), "] or a number. Got: ").concat(n)), N1e(e); }, D1e = function(e, t, n, r) { var o = function(a, i) { return r[i](a); }; return -gm(e, r.length, function(a) { return o(t, a); }, function(a) { return o(n, a); }, t, n); }, B1e = function(e, t) { var n = null; return t === "median" ? n = Mme(e) : t === "mean" ? n = Nme(e) : t === "min" ? n = Lme(e) : t === "max" ? n = Rme(e) : n = t, n; }, z1e = function(e, t, n) { for (var r = [], o = 0; o < e; o++) t[o * e + o] + n[o * e + o] > 0 && r.push(o); return r; }, qO = function(e, t, n) { for (var r = [], o = 0; o < e; o++) { for (var a = -1, i = -1 / 0, s = 0; s < n.length; s++) { var l = n[s]; t[o * e + l] > i && (a = l, i = t[o * e + l]); } a > 0 && r.push(a); } for (var u = 0; u < n.length; u++) r[n[u]] = n[u]; return r; }, j1e = function(e, t, n) { for (var r = qO(e, t, n), o = 0; o < n.length; o++) { for (var a = [], i = 0; i < r.length; i++) r[i] === n[o] && a.push(i); for (var s = -1, l = -1 / 0, u = 0; u < a.length; u++) { for (var c = 0, d = 0; d < a.length; d++) c += t[a[d] * e + a[u]]; c > l && (s = u, l = c); } n[o] = a[s]; } return r = qO(e, t, n), r; }, KO = function(e) { for (var t = this.cy(), n = this.nodes(), r = M1e(e), o = {}, a = 0; a < n.length; a++) o[n[a].id()] = a; var i, s, l, u, c, d; i = n.length, s = i * i, l = new Array(s); for (var p = 0; p < s; p++) l[p] = -1 / 0; for (var h = 0; h < i; h++) for (var f = 0; f < i; f++) h !== f && (l[h * i + f] = D1e(r.distance, n[h], n[f], r.attributes)); u = B1e(l, r.preference); for (var v = 0; v < i; v++) l[v * i + v] = u; c = new Array(s); for (var m = 0; m < s; m++) c[m] = 0; d = new Array(s); for (var g = 0; g < s; g++) d[g] = 0; for (var b = new Array(i), x = new Array(i), w = new Array(i), k = 0; k < i; k++) b[k] = 0, x[k] = 0, w[k] = 0; for (var C = new Array(i * r.minIterations), _ = 0; _ < C.length; _++) C[_] = 0; var $; for ($ = 0; $ < r.maxIterations; $++) { for (var O = 0; O < i; O++) { for (var F = -1 / 0, A = -1 / 0, T = -1, R = 0, M = 0; M < i; M++) b[M] = c[O * i + M], R = d[O * i + M] + l[O * i + M], R >= F ? (A = F, F = R, T = M) : R > A && (A = R); for (var j = 0; j < i; j++) c[O * i + j] = (1 - r.damping) * (l[O * i + j] - F) + r.damping * b[j]; c[O * i + T] = (1 - r.damping) * (l[O * i + T] - A) + r.damping * b[T]; } for (var P = 0; P < i; P++) { for (var V = 0, U = 0; U < i; U++) b[U] = d[U * i + P], x[U] = Math.max(0, c[U * i + P]), V += x[U]; V -= x[P], x[P] = c[P * i + P], V += x[P]; for (var G = 0; G < i; G++) d[G * i + P] = (1 - r.damping) * Math.min(0, V - x[G]) + r.damping * b[G]; d[P * i + P] = (1 - r.damping) * (V - x[P]) + r.damping * b[P]; } for (var se = 0, ae = 0; ae < i; ae++) { var de = d[ae * i + ae] + c[ae * i + ae] > 0 ? 1 : 0; C[$ % r.minIterations * i + ae] = de, se += de; } if (se > 0 && ($ >= r.minIterations - 1 || $ == r.maxIterations - 1)) { for (var me = 0, te = 0; te < i; te++) { w[te] = 0; for (var oe = 0; oe < r.minIterations; oe++) w[te] += C[oe * i + te]; (w[te] === 0 || w[te] === r.minIterations) && me++; } if (me === i) break; } } for (var ne = z1e(i, c, d), ee = j1e(i, l, ne), Z = {}, le = 0; le < ne.length; le++) Z[ne[le]] = []; for (var pe = 0; pe < n.length; pe++) { var ke = o[n[pe].id()], Ne = ee[ke]; Ne != null && Z[Ne].push(n[pe]); } for (var De = new Array(ne.length), _e = 0; _e < ne.length; _e++) De[_e] = t.collection(Z[ne[_e]]); return De; }, V1e = { affinityPropagation: KO, ap: KO }, H1e = Br({ root: void 0, directed: !1 }), U1e = { hierholzer: function(e) { if (!Xt(e)) { var t = arguments; e = { root: t[0], directed: t[1] }; } var n = H1e(e), r = n.root, o = n.directed, a = this, i = !1, s, l, u; r && (u = gt(r) ? this.filter(r)[0].id() : r[0].id()); var c = {}, d = {}; o ? a.forEach(function(g) { var b = g.id(); if (g.isNode()) { var x = g.indegree(!0), w = g.outdegree(!0), k = x - w, C = w - x; k == 1 ? s ? i = !0 : s = b : C == 1 ? l ? i = !0 : l = b : (C > 1 || k > 1) && (i = !0), c[b] = [], g.outgoers().forEach(function(_) { _.isEdge() && c[b].push(_.id()); }); } else d[b] = [void 0, g.target().id()]; }) : a.forEach(function(g) { var b = g.id(); if (g.isNode()) { var x = g.degree(!0); x % 2 && (s ? l ? i = !0 : l = b : s = b), c[b] = [], g.connectedEdges().forEach(function(w) { return c[b].push(w.id()); }); } else d[b] = [g.source().id(), g.target().id()]; }); var p = { found: !1, trail: void 0 }; if (i) return p; if (l && s) if (o) { if (u && l != u) return p; u = l; } else { if (u && l != u && s != u) return p; u || (u = l); } else u || (u = a[0].id()); var h = function(g) { for (var b = g, x = [g], w, k, C; c[b].length; ) w = c[b].shift(), k = d[w][0], C = d[w][1], b != C ? (c[C] = c[C].filter(function(_) { return _ != w; }), b = C) : !o && b != k && (c[k] = c[k].filter(function(_) { return _ != w; }), b = k), x.unshift(w), x.unshift(b); return x; }, f = [], v = []; for (v = h(u); v.length != 1; ) c[v[0]].length == 0 ? (f.unshift(a.getElementById(v.shift())), f.unshift(a.getElementById(v.shift()))) : v = h(v.shift()).concat(v); f.unshift(a.getElementById(v.shift())); for (var m in c) if (c[m].length) return p; return p.found = !0, p.trail = this.spawn(f, !0), p; } }, iv = function() { var e = this, t = {}, n = 0, r = 0, o = [], a = [], i = {}, s = function(c, d) { for (var p = a.length - 1, h = [], f = e.spawn(); a[p].x != c || a[p].y != d; ) h.push(a.pop().edge), p--; h.push(a.pop().edge), h.forEach(function(v) { var m = v.connectedNodes().intersection(e); f.merge(v), m.forEach(function(g) { var b = g.id(), x = g.connectedEdges().intersection(e); f.merge(g), t[b].cutVertex ? f.merge(x.filter(function(w) { return w.isLoop(); })) : f.merge(x); }); }), o.push(f); }, l = function c(d, p, h) { d === h && (r += 1), t[p] = { id: n, low: n++, cutVertex: !1 }; var f = e.getElementById(p).connectedEdges().intersection(e); if (f.size() === 0) o.push(e.spawn(e.getElementById(p))); else { var v, m, g, b; f.forEach(function(x) { v = x.source().id(), m = x.target().id(), g = v === p ? m : v, g !== h && (b = x.id(), i[b] || (i[b] = !0, a.push({ x: p, y: g, edge: x })), g in t ? t[p].low = Math.min(t[p].low, t[g].id) : (c(d, g, p), t[p].low = Math.min(t[p].low, t[g].low), t[p].id <= t[g].low && (t[p].cutVertex = !0, s(p, g)))); }); } }; e.forEach(function(c) { if (c.isNode()) { var d = c.id(); d in t || (r = 0, l(d, d), t[d].cutVertex = r > 1); } }); var u = Object.keys(t).filter(function(c) { return t[c].cutVertex; }).map(function(c) { return e.getElementById(c); }); return { cut: e.spawn(u), components: o }; }, q1e = { hopcroftTarjanBiconnected: iv, htbc: iv, htb: iv, hopcroftTarjanBiconnectedComponents: iv }, sv = function() { var e = this, t = {}, n = 0, r = [], o = [], a = e.spawn(e), i = function s(l) { o.push(l), t[l] = { index: n, low: n++, explored: !1 }; var u = e.getElementById(l).connectedEdges().intersection(e); if (u.forEach(function(f) { var v = f.target().id(); v !== l && (v in t || s(v), t[v].explored || (t[l].low = Math.min(t[l].low, t[v].low))); }), t[l].index === t[l].low) { for (var c = e.spawn(); ; ) { var d = o.pop(); if (c.merge(e.getElementById(d)), t[d].low = t[l].index, t[d].explored = !0, d === l) break; } var p = c.edgesWith(c), h = c.merge(p); r.push(h), a = a.difference(h); } }; return e.forEach(function(s) { if (s.isNode()) { var l = s.id(); l in t || i(l); } }), { cut: a, components: r }; }, K1e = { tarjanStronglyConnected: sv, tsc: sv, tscc: sv, tarjanStronglyConnectedComponents: sv }, GB = {}; [lf, kme, Cme, Sme, Eme, Fme, Ime, r1e, $c, Ec, HC, g1e, F1e, R1e, V1e, U1e, q1e, K1e].forEach(function(e) { _t(GB, e); }); /*! Embeddable Minimum Strictly-Compliant Promises/A+ 1.1.1 Thenable Copyright (c) 2013-2014 Ralf S. Engelschall (http://engelschall.com) Licensed under The MIT License (http://opensource.org/licenses/MIT) */ var WB = 0, YB = 1, XB = 2, os = function e(t) { if (!(this instanceof e)) return new e(t); this.id = "Thenable/1.0.7", this.state = WB, this.fulfillValue = void 0, this.rejectReason = void 0, this.onFulfilled = [], this.onRejected = [], this.proxy = { then: this.then.bind(this) }, typeof t == "function" && t.call(this, this.fulfill.bind(this), this.reject.bind(this)); }; os.prototype = { /* promise resolving methods */ fulfill: function(e) { return GO(this, YB, "fulfillValue", e); }, reject: function(e) { return GO(this, XB, "rejectReason", e); }, /* "The then Method" [Promises/A+ 1.1, 1.2, 2.2] */ then: function(e, t) { var n = this, r = new os(); return n.onFulfilled.push(YO(e, r, "fulfill")), n.onRejected.push(YO(t, r, "reject")), ZB(n), r.proxy; } }; var GO = function(e, t, n, r) { return e.state === WB && (e.state = t, e[n] = r, ZB(e)), e; }, ZB = function(e) { e.state === YB ? WO(e, "onFulfilled", e.fulfillValue) : e.state === XB && WO(e, "onRejected", e.rejectReason); }, WO = function(e, t, n) { if (e[t].length !== 0) { var r = e[t]; e[t] = []; var o = function() { for (var a = 0; a < r.length; a++) r[a](n); }; typeof setImmediate == "function" ? setImmediate(o) : setTimeout(o, 0); } }, YO = function(e, t, n) { return function(r) { if (typeof e != "function") t[n].call(t, r); else { var o; try { o = e(r); } catch (a) { t.reject(a); return; } G1e(t, o); } }; }, G1e = function e(t, n) { if (t === n || t.proxy === n) { t.reject(new TypeError("cannot resolve promise with itself")); return; } var r; if (cr(n) === "object" && n !== null || typeof n == "function") try { r = n.then; } catch (a) { t.reject(a); return; } if (typeof r == "function") { var o = !1; try { r.call( n, /* resolvePromise */ /* [Promises/A+ 2.3.3.3.1] */ function(a) { o || (o = !0, a === n ? t.reject(new TypeError("circular thenable chain")) : e(t, a)); }, /* rejectPromise */ /* [Promises/A+ 2.3.3.3.2] */ function(a) { o || (o = !0, t.reject(a)); } ); } catch (a) { o || t.reject(a); } return; } t.fulfill(n); }; os.all = function(e) { return new os(function(t, n) { for (var r = new Array(e.length), o = 0, a = function(s, l) { r[s] = l, o++, o === e.length && t(r); }, i = 0; i < e.length; i++) (function(s) { var l = e[s], u = l != null && l.then != null; if (u) l.then(function(d) { a(s, d); }, function(d) { n(d); }); else { var c = l; a(s, c); } })(i); }); }; os.resolve = function(e) { return new os(function(t, n) { t(e); }); }; os.reject = function(e) { return new os(function(t, n) { n(e); }); }; var md = typeof Promise < "u" ? Promise : os, UC = function(e, t, n) { var r = p$(e), o = !r, a = this._private = _t({ duration: 1e3 }, t, n); if (a.target = e, a.style = a.style || a.css, a.started = !1, a.playing = !1, a.hooked = !1, a.applying = !1, a.progress = 0, a.completes = [], a.frames = [], a.complete && Nn(a.complete) && a.completes.push(a.complete), o) { var i = e.position(); a.startPosition = a.startPosition || { x: i.x, y: i.y }, a.startStyle = a.startStyle || e.cy().style().getAnimationStartStyle(e, a.style); } if (r) { var s = e.pan(); a.startPan = { x: s.x, y: s.y }, a.startZoom = e.zoom(); } this.length = 1, this[0] = this; }, vu = UC.prototype; _t(vu, { instanceString: function() { return "animation"; }, hook: function() { var e = this._private; if (!e.hooked) { var t, n = e.target._private.animation; e.queue ? t = n.queue : t = n.current, t.push(this), Mo(e.target) && e.target.cy().addToAnimationPool(e.target), e.hooked = !0; } return this; }, play: function() { var e = this._private; return e.progress === 1 && (e.progress = 0), e.playing = !0, e.started = !1, e.stopped = !1, this.hook(), this; }, playing: function() { return this._private.playing; }, apply: function() { var e = this._private; return e.applying = !0, e.started = !1, e.stopped = !1, this.hook(), this; }, applying: function() { return this._private.applying; }, pause: function() { var e = this._private; return e.playing = !1, e.started = !1, this; }, stop: function() { var e = this._private; return e.playing = !1, e.started = !1, e.stopped = !0, this; }, rewind: function() { return this.progress(0); }, fastforward: function() { return this.progress(1); }, time: function(e) { var t = this._private; return e === void 0 ? t.progress * t.duration : this.progress(e / t.duration); }, progress: function(e) { var t = this._private, n = t.playing; return e === void 0 ? t.progress : (n && this.pause(), t.progress = e, t.started = !1, n && this.play(), this); }, completed: function() { return this._private.progress === 1; }, reverse: function() { var e = this._private, t = e.playing; t && this.pause(), e.progress = 1 - e.progress, e.started = !1; var n = function(s, l) { var u = e[s]; u != null && (e[s] = e[l], e[l] = u); }; if (n("zoom", "startZoom"), n("pan", "startPan"), n("position", "startPosition"), e.style) for (var r = 0; r < e.style.length; r++) { var o = e.style[r], a = o.name, i = e.startStyle[a]; e.startStyle[a] = o, e.style[r] = i; } return t && this.play(), this; }, promise: function(e) { var t = this._private, n; switch (e) { case "frame": n = t.frames; break; default: case "complete": case "completed": n = t.completes; } return new md(function(r, o) { n.push(function() { r(); }); }); } }); vu.complete = vu.completed; vu.run = vu.play; vu.running = vu.playing; var W1e = { animated: function() { return function() { var e = this, t = e.length !== void 0, n = t ? e : [e], r = this._private.cy || this; if (!r.styleEnabled()) return !1; var o = n[0]; if (o) return o._private.animation.current.length > 0; }; }, // animated clearQueue: function() { return function() { var e = this, t = e.length !== void 0, n = t ? e : [e], r = this._private.cy || this; if (!r.styleEnabled()) return this; for (var o = 0; o < n.length; o++) { var a = n[o]; a._private.animation.queue = []; } return this; }; }, // clearQueue delay: function() { return function(e, t) { var n = this._private.cy || this; return n.styleEnabled() ? this.animate({ delay: e, duration: e, complete: t }) : this; }; }, // delay delayAnimation: function() { return function(e, t) { var n = this._private.cy || this; return n.styleEnabled() ? this.animation({ delay: e, duration: e, complete: t }) : this; }; }, // delay animation: function() { return function(e, t) { var n = this, r = n.length !== void 0, o = r ? n : [n], a = this._private.cy || this, i = !r, s = !i; if (!a.styleEnabled()) return this; var l = a.style(); e = _t({}, e, t); var u = Object.keys(e).length === 0; if (u) return new UC(o[0], e); switch (e.duration === void 0 && (e.duration = 400), e.duration) { case "slow": e.duration = 600; break; case "fast": e.duration = 200; break; } if (s && (e.style = l.getPropsList(e.style || e.css), e.css = void 0), s && e.renderedPosition != null) { var c = e.renderedPosition, d = a.pan(), p = a.zoom(); e.position = NB(c, p, d); } if (i && e.panBy != null) { var h = e.panBy, f = a.pan(); e.pan = { x: f.x + h.x, y: f.y + h.y }; } var v = e.center || e.centre; if (i && v != null) { var m = a.getCenterPan(v.eles, e.zoom); m != null && (e.pan = m); } if (i && e.fit != null) { var g = e.fit, b = a.getFitViewport(g.eles || g.boundingBox, g.padding); b != null && (e.pan = b.pan, e.zoom = b.zoom); } if (i && Xt(e.zoom)) { var x = a.getZoomedViewport(e.zoom); x != null ? (x.zoomed && (e.zoom = x.zoom), x.panned && (e.pan = x.pan)) : e.zoom = null; } return new UC(o[0], e); }; }, // animate animate: function() { return function(e, t) { var n = this, r = n.length !== void 0, o = r ? n : [n], a = this._private.cy || this; if (!a.styleEnabled()) return this; t && (e = _t({}, e, t)); for (var i = 0; i < o.length; i++) { var s = o[i], l = s.animated() && (e.queue === void 0 || e.queue), u = s.animation(e, l ? { queue: !0 } : void 0); u.play(); } return this; }; }, // animate stop: function() { return function(e, t) { var n = this, r = n.length !== void 0, o = r ? n : [n], a = this._private.cy || this; if (!a.styleEnabled()) return this; for (var i = 0; i < o.length; i++) { for (var s = o[i], l = s._private, u = l.animation.current, c = 0; c < u.length; c++) { var d = u[c], p = d._private; t && (p.duration = 0); } e && (l.animation.queue = []), t || (l.animation.current = []); } return a.notify("draw"), this; }; } // stop }, Y1e = Array.isArray, mm = Y1e, X1e = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, Z1e = /^\w*$/; function J1e(e, t) { if (mm(e)) return !1; var n = typeof e; return n == "number" || n == "symbol" || n == "boolean" || e == null || nh(e) ? !0 : Z1e.test(e) || !X1e.test(e) || t != null && e in Object(t); } var Q1e = J1e, eye = "[object AsyncFunction]", tye = "[object Function]", nye = "[object GeneratorFunction]", rye = "[object Proxy]"; function oye(e) { if (!du(e)) return !1; var t = EB(e); return t == tye || t == nye || t == eye || t == rye; } var aye = oye, iye = pm["__core-js_shared__"], vy = iye, XO = function() { var e = /[^.]+$/.exec(vy && vy.keys && vy.keys.IE_PROTO || ""); return e ? "Symbol(src)_1." + e : ""; }(); function sye(e) { return !!XO && XO in e; } var lye = sye, uye = Function.prototype, cye = uye.toString; function dye(e) { if (e != null) { try { return cye.call(e); } catch { } try { return e + ""; } catch { } } return ""; } var pye = dye, fye = /[\\^$.*+?()[\]{}|]/g, hye = /^\[object .+?Constructor\]$/, vye = Function.prototype, gye = Object.prototype, mye = vye.toString, yye = gye.hasOwnProperty, bye = RegExp( "^" + mye.call(yye).replace(fye, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$" ); function wye(e) { if (!du(e) || lye(e)) return !1; var t = aye(e) ? bye : hye; return t.test(pye(e)); } var xye = wye; function kye(e, t) { return e == null ? void 0 : e[t]; } var Cye = kye; function _ye(e, t) { var n = Cye(e, t); return xye(n) ? n : void 0; } var x$ = _ye, Sye = x$(Object, "create"), df = Sye; function $ye() { this.__data__ = df ? df(null) : {}, this.size = 0; } var Eye = $ye; function Oye(e) { var t = this.has(e) && delete this.__data__[e]; return this.size -= t ? 1 : 0, t; } var Fye = Oye, Tye = "__lodash_hash_undefined__", Aye = Object.prototype, Iye = Aye.hasOwnProperty; function Pye(e) { var t = this.__data__; if (df) { var n = t[e]; return n === Tye ? void 0 : n; } return Iye.call(t, e) ? t[e] : void 0; } var Lye = Pye, Rye = Object.prototype, Nye = Rye.hasOwnProperty; function Mye(e) { var t = this.__data__; return df ? t[e] !== void 0 : Nye.call(t, e); } var Dye = Mye, Bye = "__lodash_hash_undefined__"; function zye(e, t) { var n = this.__data__; return this.size += this.has(e) ? 0 : 1, n[e] = df && t === void 0 ? Bye : t, this; } var jye = zye; function yd(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]); } } yd.prototype.clear = Eye; yd.prototype.delete = Fye; yd.prototype.get = Lye; yd.prototype.has = Dye; yd.prototype.set = jye; var ZO = yd; function Vye() { this.__data__ = [], this.size = 0; } var Hye = Vye; function Uye(e, t) { return e === t || e !== e && t !== t; } var JB = Uye; function qye(e, t) { for (var n = e.length; n--; ) if (JB(e[n][0], t)) return n; return -1; } var ym = qye, Kye = Array.prototype, Gye = Kye.splice; function Wye(e) { var t = this.__data__, n = ym(t, e); if (n < 0) return !1; var r = t.length - 1; return n == r ? t.pop() : Gye.call(t, n, 1), --this.size, !0; } var Yye = Wye; function Xye(e) { var t = this.__data__, n = ym(t, e); return n < 0 ? void 0 : t[n][1]; } var Zye = Xye; function Jye(e) { return ym(this.__data__, e) > -1; } var Qye = Jye; function ebe(e, t) { var n = this.__data__, r = ym(n, e); return r < 0 ? (++this.size, n.push([e, t])) : n[r][1] = t, this; } var tbe = ebe; function bd(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]); } } bd.prototype.clear = Hye; bd.prototype.delete = Yye; bd.prototype.get = Zye; bd.prototype.has = Qye; bd.prototype.set = tbe; var nbe = bd, rbe = x$(pm, "Map"), obe = rbe; function abe() { this.size = 0, this.__data__ = { hash: new ZO(), map: new (obe || nbe)(), string: new ZO() }; } var ibe = abe; function sbe(e) { var t = typeof e; return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e !== "__proto__" : e === null; } var lbe = sbe; function ube(e, t) { var n = e.__data__; return lbe(t) ? n[typeof t == "string" ? "string" : "hash"] : n.map; } var bm = ube; function cbe(e) { var t = bm(this, e).delete(e); return this.size -= t ? 1 : 0, t; } var dbe = cbe; function pbe(e) { return bm(this, e).get(e); } var fbe = pbe; function hbe(e) { return bm(this, e).has(e); } var vbe = hbe; function gbe(e, t) { var n = bm(this, e), r = n.size; return n.set(e, t), this.size += n.size == r ? 0 : 1, this; } var mbe = gbe; function wd(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]); } } wd.prototype.clear = ibe; wd.prototype.delete = dbe; wd.prototype.get = fbe; wd.prototype.has = vbe; wd.prototype.set = mbe; var QB = wd, ybe = "Expected a function"; function k$(e, t) { if (typeof e != "function" || t != null && typeof t != "function") throw new TypeError(ybe); 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 i = e.apply(this, r); return n.cache = a.set(o, i) || a, i; }; return n.cache = new (k$.Cache || QB)(), n; } k$.Cache = QB; var bbe = k$, wbe = 500; function xbe(e) { var t = bbe(e, function(r) { return n.size === wbe && n.clear(), r; }), n = t.cache; return t; } var kbe = xbe, Cbe = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, _be = /\\(\\)?/g, Sbe = kbe(function(e) { var t = []; return e.charCodeAt(0) === 46 && t.push(""), e.replace(Cbe, function(n, r, o, a) { t.push(o ? a.replace(_be, "$1") : r || n); }), t; }), ez = Sbe; function $be(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 tz = $be, Ebe = 1 / 0, JO = Kc ? Kc.prototype : void 0, QO = JO ? JO.toString : void 0; function nz(e) { if (typeof e == "string") return e; if (mm(e)) return tz(e, nz) + ""; if (nh(e)) return QO ? QO.call(e) : ""; var t = e + ""; return t == "0" && 1 / e == -Ebe ? "-0" : t; } var Obe = nz; function Fbe(e) { return e == null ? "" : Obe(e); } var rz = Fbe; function Tbe(e, t) { return mm(e) ? e : Q1e(e, t) ? [e] : ez(rz(e)); } var oz = Tbe, Abe = 1 / 0; function Ibe(e) { if (typeof e == "string" || nh(e)) return e; var t = e + ""; return t == "0" && 1 / e == -Abe ? "-0" : t; } var C$ = Ibe; function Pbe(e, t) { t = oz(t, e); for (var n = 0, r = t.length; e != null && n < r; ) e = e[C$(t[n++])]; return n && n == r ? e : void 0; } var Lbe = Pbe; function Rbe(e, t, n) { var r = e == null ? void 0 : Lbe(e, t); return r === void 0 ? n : r; } var Nbe = Rbe, Mbe = function() { try { var e = x$(Object, "defineProperty"); return e({}, "", {}), e; } catch { } }(), eF = Mbe; function Dbe(e, t, n) { t == "__proto__" && eF ? eF(e, t, { configurable: !0, enumerable: !0, value: n, writable: !0 }) : e[t] = n; } var Bbe = Dbe, zbe = Object.prototype, jbe = zbe.hasOwnProperty; function Vbe(e, t, n) { var r = e[t]; (!(jbe.call(e, t) && JB(r, n)) || n === void 0 && !(t in e)) && Bbe(e, t, n); } var Hbe = Vbe, Ube = 9007199254740991, qbe = /^(?:0|[1-9]\d*)$/; function Kbe(e, t) { var n = typeof e; return t = t ?? Ube, !!t && (n == "number" || n != "symbol" && qbe.test(e)) && e > -1 && e % 1 == 0 && e < t; } var Gbe = Kbe; function Wbe(e, t, n, r) { if (!du(e)) return e; t = oz(t, e); for (var o = -1, a = t.length, i = a - 1, s = e; s != null && ++o < a; ) { var l = C$(t[o]), u = n; if (l === "__proto__" || l === "constructor" || l === "prototype") return e; if (o != i) { var c = s[l]; u = r ? r(c, l, s) : void 0, u === void 0 && (u = du(c) ? c : Gbe(t[o + 1]) ? [] : {}); } Hbe(s, l, u), s = s[l]; } return e; } var Ybe = Wbe; function Xbe(e, t, n) { return e == null ? e : Ybe(e, t, n); } var Zbe = Xbe; function Jbe(e, t) { var n = -1, r = e.length; for (t || (t = Array(r)); ++n < r; ) t[n] = e[n]; return t; } var Qbe = Jbe; function ewe(e) { return mm(e) ? tz(e, C$) : nh(e) ? [e] : Qbe(ez(rz(e))); } var twe = ewe, nwe = { // access data field data: function(e) { var t = { field: "data", bindingEvent: "data", allowBinding: !1, allowSetting: !1, allowGetting: !1, settingEvent: "data", settingTriggersEvent: !1, triggerFnName: "trigger", immutableKeys: {}, // key => true if immutable updateStyle: !1, beforeGet: function(n) { }, beforeSet: function(n, r) { }, onSet: function(n) { }, canSet: function(n) { return !0; } }; return e = _t({}, t, e), function(n, r) { var o = e, a = this, i = a.length !== void 0, s = i ? a : [a], l = i ? a[0] : a; if (gt(n)) { var u = n.indexOf(".") !== -1, c = u && twe(n); if (o.allowGetting && r === void 0) { var d; return l && (o.beforeGet(l), c && l._private[o.field][n] === void 0 ? d = Nbe(l._private[o.field], c) : d = l._private[o.field][n]), d; } else if (o.allowSetting && r !== void 0) { var p = !o.immutableKeys[n]; if (p) { var h = gB({}, n, r); o.beforeSet(a, h); for (var f = 0, v = s.length; f < v; f++) { var m = s[f]; o.canSet(m) && (c && l._private[o.field][n] === void 0 ? Zbe(m._private[o.field], c, r) : m._private[o.field][n] = r); } o.updateStyle && a.updateStyle(), o.onSet(a), o.settingTriggersEvent && a[o.triggerFnName](o.settingEvent); } } } else if (o.allowSetting && Xt(n)) { var g = n, b, x, w = Object.keys(g); o.beforeSet(a, g); for (var k = 0; k < w.length; k++) { b = w[k], x = g[b]; var C = !o.immutableKeys[b]; if (C) for (var _ = 0; _ < s.length; _++) { var $ = s[_]; o.canSet($) && ($._private[o.field][b] = x); } } o.updateStyle && a.updateStyle(), o.onSet(a), o.settingTriggersEvent && a[o.triggerFnName](o.settingEvent); } else if (o.allowBinding && Nn(n)) { var O = n; a.on(o.bindingEvent, O); } else if (o.allowGetting && n === void 0) { var F; return l && (o.beforeGet(l), F = l._private[o.field]), F; } return a; }; }, // data // remove data field removeData: function(e) { var t = { field: "data", event: "data", triggerFnName: "trigger", triggerEvent: !1, immutableKeys: {} // key => true if immutable }; return e = _t({}, t, e), function(n) { var r = e, o = this, a = o.length !== void 0, i = a ? o : [o]; if (gt(n)) { for (var s = n.split(/\s+/), l = s.length, u = 0; u < l; u++) { var c = s[u]; if (!ol(c)) { var d = !r.immutableKeys[c]; if (d) for (var p = 0, h = i.length; p < h; p++) i[p]._private[r.field][c] = void 0; } } r.triggerEvent && o[r.triggerFnName](r.event); } else if (n === void 0) { for (var f = 0, v = i.length; f < v; f++) for (var m = i[f]._private[r.field], g = Object.keys(m), b = 0; b < g.length; b++) { var x = g[b], w = !r.immutableKeys[x]; w && (m[x] = void 0); } r.triggerEvent && o[r.triggerFnName](r.event); } return o; }; } // removeData }, rwe = { eventAliasesOn: function(e) { var t = e; t.addListener = t.listen = t.bind = t.on, t.unlisten = t.unbind = t.off = t.removeListener, t.trigger = t.emit, t.pon = t.promiseOn = function(n, r) { var o = this, a = Array.prototype.slice.call(arguments, 0); return new md(function(i, s) { var l = function(d) { o.off.apply(o, c), i(d); }, u = a.concat([l]), c = u.concat([]); o.on.apply(o, u); }); }; } }, an = {}; [W1e, nwe, rwe].forEach(function(e) { _t(an, e); }); var owe = { animate: an.animate(), animation: an.animation(), animated: an.animated(), clearQueue: an.clearQueue(), delay: an.delay(), delayAnimation: an.delayAnimation(), stop: an.stop() }, Wv = { classes: function(e) { var t = this; if (e === void 0) { var n = []; return t[0]._private.classes.forEach(function(h) { return n.push(h); }), n; } else dn(e) || (e = (e || "").match(/\S+/g) || []); for (var r = [], o = new gd(e), a = 0; a < t.length; a++) { for (var i = t[a], s = i._private, l = s.classes, u = !1, c = 0; c < e.length; c++) { var d = e[c], p = l.has(d); if (!p) { u = !0; break; } } u || (u = l.size !== e.length), u && (s.classes = o, r.push(i)); } return r.length > 0 && this.spawn(r).updateStyle().emit("class"), t; }, addClass: function(e) { return this.toggleClass(e, !0); }, hasClass: function(e) { var t = this[0]; return t != null && t._private.classes.has(e); }, toggleClass: function(e, t) { dn(e) || (e = e.match(/\S+/g) || []); for (var n = this, r = t === void 0, o = [], a = 0, i = n.length; a < i; a++) for (var s = n[a], l = s._private.classes, u = !1, c = 0; c < e.length; c++) { var d = e[c], p = l.has(d), h = !1; t || r && !p ? (l.add(d), h = !0) : (!t || r && p) && (l.delete(d), h = !0), !u && h && (o.push(s), u = !0); } return o.length > 0 && this.spawn(o).updateStyle().emit("class"), n; }, removeClass: function(e) { return this.toggleClass(e, !1); }, flashClass: function(e, t) { var n = this; if (t == null) t = 250; else if (t === 0) return n; return n.addClass(e), setTimeout(function() { n.removeClass(e); }, t), n; } }; Wv.className = Wv.classNames = Wv.classes; var Kt = { metaChar: "[\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]", // chars we need to escape in let names, etc comparatorOp: "=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=", // binary comparison op (used in data selectors) boolOp: "\\?|\\!|\\^", // boolean (unary) operators (used in data selectors) string: `"(?:\\\\"|[^"])*"|'(?:\\\\'|[^'])*'`, // string literals (used in data selectors) -- doublequotes | singlequotes number: lr, // number literal (used in data selectors) --- e.g. 0.1234, 1234, 12e123 meta: "degree|indegree|outdegree", // allowed metadata fields (i.e. allowed functions to use from Collection) separator: "\\s*,\\s*", // queries are separated by commas, e.g. edge[foo = 'bar'], node.someClass descendant: "\\s+", child: "\\s+>\\s+", subject: "\\$", group: "node|edge|\\*", directedEdge: "\\s+->\\s+", undirectedEdge: "\\s+<->\\s+" }; Kt.variable = "(?:[\\w-.]|(?:\\\\" + Kt.metaChar + "))+"; Kt.className = "(?:[\\w-]|(?:\\\\" + Kt.metaChar + "))+"; Kt.value = Kt.string + "|" + Kt.number; Kt.id = Kt.variable; (function() { var e, t, n; for (e = Kt.comparatorOp.split("|"), n = 0; n < e.length; n++) t = e[n], Kt.comparatorOp += "|@" + t; for (e = Kt.comparatorOp.split("|"), n = 0; n < e.length; n++) t = e[n], !(t.indexOf("!") >= 0) && t !== "=" && (Kt.comparatorOp += "|\\!" + t); })(); var cn = function() { return { checks: [] }; }, ct = { /** E.g. node */ GROUP: 0, /** A collection of elements */ COLLECTION: 1, /** A filter(ele) function */ FILTER: 2, /** E.g. [foo > 1] */ DATA_COMPARE: 3, /** E.g. [foo] */ DATA_EXIST: 4, /** E.g. [?foo] */ DATA_BOOL: 5, /** E.g. [[degree > 2]] */ META_COMPARE: 6, /** E.g. :selected */ STATE: 7, /** E.g. #foo */ ID: 8, /** E.g. .foo */ CLASS: 9, /** E.g. #foo <-> #bar */ UNDIRECTED_EDGE: 10, /** E.g. #foo -> #bar */ DIRECTED_EDGE: 11, /** E.g. $#foo -> #bar */ NODE_SOURCE: 12, /** E.g. #foo -> $#bar */ NODE_TARGET: 13, /** E.g. $#foo <-> #bar */ NODE_NEIGHBOR: 14, /** E.g. #foo > #bar */ CHILD: 15, /** E.g. #foo #bar */ DESCENDANT: 16, /** E.g. $#foo > #bar */ PARENT: 17, /** E.g. $#foo #bar */ ANCESTOR: 18, /** E.g. #foo > $bar > #baz */ COMPOUND_SPLIT: 19, /** Always matches, useful placeholder for subject in `COMPOUND_SPLIT` */ TRUE: 20 }, qC = [{ selector: ":selected", matches: function(e) { return e.selected(); } }, { selector: ":unselected", matches: function(e) { return !e.selected(); } }, { selector: ":selectable", matches: function(e) { return e.selectable(); } }, { selector: ":unselectable", matches: function(e) { return !e.selectable(); } }, { selector: ":locked", matches: function(e) { return e.locked(); } }, { selector: ":unlocked", matches: function(e) { return !e.locked(); } }, { selector: ":visible", matches: function(e) { return e.visible(); } }, { selector: ":hidden", matches: function(e) { return !e.visible(); } }, { selector: ":transparent", matches: function(e) { return e.transparent(); } }, { selector: ":grabbed", matches: function(e) { return e.grabbed(); } }, { selector: ":free", matches: function(e) { return !e.grabbed(); } }, { selector: ":removed", matches: function(e) { return e.removed(); } }, { selector: ":inside", matches: function(e) { return !e.removed(); } }, { selector: ":grabbable", matches: function(e) { return e.grabbable(); } }, { selector: ":ungrabbable", matches: function(e) { return !e.grabbable(); } }, { selector: ":animated", matches: function(e) { return e.animated(); } }, { selector: ":unanimated", matches: function(e) { return !e.animated(); } }, { selector: ":parent", matches: function(e) { return e.isParent(); } }, { selector: ":childless", matches: function(e) { return e.isChildless(); } }, { selector: ":child", matches: function(e) { return e.isChild(); } }, { selector: ":orphan", matches: function(e) { return e.isOrphan(); } }, { selector: ":nonorphan", matches: function(e) { return e.isChild(); } }, { selector: ":compound", matches: function(e) { return e.isNode() ? e.isParent() : e.source().isParent() || e.target().isParent(); } }, { selector: ":loop", matches: function(e) { return e.isLoop(); } }, { selector: ":simple", matches: function(e) { return e.isSimple(); } }, { selector: ":active", matches: function(e) { return e.active(); } }, { selector: ":inactive", matches: function(e) { return !e.active(); } }, { selector: ":backgrounding", matches: function(e) { return e.backgrounding(); } }, { selector: ":nonbackgrounding", matches: function(e) { return !e.backgrounding(); } }].sort(function(e, t) { return g0e(e.selector, t.selector); }), awe = function() { for (var e = {}, t, n = 0; n < qC.length; n++) t = qC[n], e[t.selector] = t.matches; return e; }(), iwe = function(e, t) { return awe[e](t); }, swe = "(" + qC.map(function(e) { return e.selector; }).join("|") + ")", rc = function(e) { return e.replace(new RegExp("\\\\(" + Kt.metaChar + ")", "g"), function(t, n) { return n; }); }, Ss = function(e, t, n) { e[e.length - 1] = n; }, KC = [{ name: "group", // just used for identifying when debugging query: !0, regex: "(" + Kt.group + ")", populate: function(e, t, n) { var r = Ta(n, 1), o = r[0]; t.checks.push({ type: ct.GROUP, value: o === "*" ? o : o + "s" }); } }, { name: "state", query: !0, regex: swe, populate: function(e, t, n) { var r = Ta(n, 1), o = r[0]; t.checks.push({ type: ct.STATE, value: o }); } }, { name: "id", query: !0, regex: "\\#(" + Kt.id + ")", populate: function(e, t, n) { var r = Ta(n, 1), o = r[0]; t.checks.push({ type: ct.ID, value: rc(o) }); } }, { name: "className", query: !0, regex: "\\.(" + Kt.className + ")", populate: function(e, t, n) { var r = Ta(n, 1), o = r[0]; t.checks.push({ type: ct.CLASS, value: rc(o) }); } }, { name: "dataExists", query: !0, regex: "\\[\\s*(" + Kt.variable + ")\\s*\\]", populate: function(e, t, n) { var r = Ta(n, 1), o = r[0]; t.checks.push({ type: ct.DATA_EXIST, field: rc(o) }); } }, { name: "dataCompare", query: !0, regex: "\\[\\s*(" + Kt.variable + ")\\s*(" + Kt.comparatorOp + ")\\s*(" + Kt.value + ")\\s*\\]", populate: function(e, t, n) { var r = Ta(n, 3), o = r[0], a = r[1], i = r[2], s = new RegExp("^" + Kt.string + "$").exec(i) != null; s ? i = i.substring(1, i.length - 1) : i = parseFloat(i), t.checks.push({ type: ct.DATA_COMPARE, field: rc(o), operator: a, value: i }); } }, { name: "dataBool", query: !0, regex: "\\[\\s*(" + Kt.boolOp + ")\\s*(" + Kt.variable + ")\\s*\\]", populate: function(e, t, n) { var r = Ta(n, 2), o = r[0], a = r[1]; t.checks.push({ type: ct.DATA_BOOL, field: rc(a), operator: o }); } }, { name: "metaCompare", query: !0, regex: "\\[\\[\\s*(" + Kt.meta + ")\\s*(" + Kt.comparatorOp + ")\\s*(" + Kt.number + ")\\s*\\]\\]", populate: function(e, t, n) { var r = Ta(n, 3), o = r[0], a = r[1], i = r[2]; t.checks.push({ type: ct.META_COMPARE, field: rc(o), operator: a, value: parseFloat(i) }); } }, { name: "nextQuery", separator: !0, regex: Kt.separator, populate: function(e, t) { var n = e.currentSubject, r = e.edgeCount, o = e.compoundCount, a = e[e.length - 1]; n != null && (a.subject = n, e.currentSubject = null), a.edgeCount = r, a.compoundCount = o, e.edgeCount = 0, e.compoundCount = 0; var i = e[e.length++] = cn(); return i; } }, { name: "directedEdge", separator: !0, regex: Kt.directedEdge, populate: function(e, t) { if (e.currentSubject == null) { var n = cn(), r = t, o = cn(); return n.checks.push({ type: ct.DIRECTED_EDGE, source: r, target: o }), Ss(e, t, n), e.edgeCount++, o; } else { var a = cn(), i = t, s = cn(); return a.checks.push({ type: ct.NODE_SOURCE, source: i, target: s }), Ss(e, t, a), e.edgeCount++, s; } } }, { name: "undirectedEdge", separator: !0, regex: Kt.undirectedEdge, populate: function(e, t) { if (e.currentSubject == null) { var n = cn(), r = t, o = cn(); return n.checks.push({ type: ct.UNDIRECTED_EDGE, nodes: [r, o] }), Ss(e, t, n), e.edgeCount++, o; } else { var a = cn(), i = t, s = cn(); return a.checks.push({ type: ct.NODE_NEIGHBOR, node: i, neighbor: s }), Ss(e, t, a), s; } } }, { name: "child", separator: !0, regex: Kt.child, populate: function(e, t) { if (e.currentSubject == null) { var n = cn(), r = cn(), o = e[e.length - 1]; return n.checks.push({ type: ct.CHILD, parent: o, child: r }), Ss(e, t, n), e.compoundCount++, r; } else if (e.currentSubject === t) { var a = cn(), i = e[e.length - 1], s = cn(), l = cn(), u = cn(), c = cn(); return a.checks.push({ type: ct.COMPOUND_SPLIT, left: i, right: s, subject: l }), l.checks = t.checks, t.checks = [{ type: ct.TRUE }], c.checks.push({ type: ct.TRUE }), s.checks.push({ type: ct.PARENT, // type is swapped on right side queries parent: c, child: u // empty for now }), Ss(e, i, a), e.currentSubject = l, e.compoundCount++, u; } else { var d = cn(), p = cn(), h = [{ type: ct.PARENT, parent: d, child: p }]; return d.checks = t.checks, t.checks = h, e.compoundCount++, p; } } }, { name: "descendant", separator: !0, regex: Kt.descendant, populate: function(e, t) { if (e.currentSubject == null) { var n = cn(), r = cn(), o = e[e.length - 1]; return n.checks.push({ type: ct.DESCENDANT, ancestor: o, descendant: r }), Ss(e, t, n), e.compoundCount++, r; } else if (e.currentSubject === t) { var a = cn(), i = e[e.length - 1], s = cn(), l = cn(), u = cn(), c = cn(); return a.checks.push({ type: ct.COMPOUND_SPLIT, left: i, right: s, subject: l }), l.checks = t.checks, t.checks = [{ type: ct.TRUE }], c.checks.push({ type: ct.TRUE }), s.checks.push({ type: ct.ANCESTOR, // type is swapped on right side queries ancestor: c, descendant: u // empty for now }), Ss(e, i, a), e.currentSubject = l, e.compoundCount++, u; } else { var d = cn(), p = cn(), h = [{ type: ct.ANCESTOR, ancestor: d, descendant: p }]; return d.checks = t.checks, t.checks = h, e.compoundCount++, p; } } }, { name: "subject", modifier: !0, regex: Kt.subject, populate: function(e, t) { if (e.currentSubject != null && e.currentSubject !== t) return sn("Redefinition of subject in selector `" + e.toString() + "`"), !1; e.currentSubject = t; var n = e[e.length - 1], r = n.checks[0], o = r == null ? null : r.type; o === ct.DIRECTED_EDGE ? r.type = ct.NODE_TARGET : o === ct.UNDIRECTED_EDGE && (r.type = ct.NODE_NEIGHBOR, r.node = r.nodes[1], r.neighbor = r.nodes[0], r.nodes = null); } }]; KC.forEach(function(e) { return e.regexObj = new RegExp("^" + e.regex); }); var lwe = function(e) { for (var t, n, r, o = 0; o < KC.length; o++) { var a = KC[o], i = a.name, s = e.match(a.regexObj); if (s != null) { n = s, t = a, r = i; var l = s[0]; e = e.substring(l.length); break; } } return { expr: t, match: n, name: r, remaining: e }; }, uwe = function(e) { var t = e.match(/^\s+/); if (t) { var n = t[0]; e = e.substring(n.length); } return e; }, cwe = function(e) { var t = this, n = t.inputText = e, r = t[0] = cn(); for (t.length = 1, n = uwe(n); ; ) { var o = lwe(n); if (o.expr == null) return sn("The selector `" + e + "`is invalid"), !1; var a = o.match.slice(1), i = o.expr.populate(t, r, a); if (i === !1) return !1; if (i != null && (r = i), n = o.remaining, n.match(/^\s*$/)) break; } var s = t[t.length - 1]; t.currentSubject != null && (s.subject = t.currentSubject), s.edgeCount = t.edgeCount, s.compoundCount = t.compoundCount; for (var l = 0; l < t.length; l++) { var u = t[l]; if (u.compoundCount > 0 && u.edgeCount > 0) return sn("The selector `" + e + "` is invalid because it uses both a compound selector and an edge selector"), !1; if (u.edgeCount > 1) return sn("The selector `" + e + "` is invalid because it uses multiple edge selectors"), !1; u.edgeCount === 1 && sn("The selector `" + e + "` is deprecated. Edge selectors do not take effect on changes to source and target nodes after an edge is added, for performance reasons. Use a class or data selector on edges instead, updating the class or data of an edge when your app detects a change in source or target nodes."); } return !0; }, dwe = function() { if (this.toStringCache != null) return this.toStringCache; for (var e = function(l) { return l ?? ""; }, t = function(l) { return gt(l) ? '"' + l + '"' : e(l); }, n = function(l) { return " " + l + " "; }, r = function(l, u) { var c = l.type, d = l.value; switch (c) { case ct.GROUP: { var p = e(d); return p.substring(0, p.length - 1); } case ct.DATA_COMPARE: { var h = l.field, f = l.operator; return "[" + h + n(e(f)) + t(d) + "]"; } case ct.DATA_BOOL: { var v = l.operator, m = l.field; return "[" + e(v) + m + "]"; } case ct.DATA_EXIST: { var g = l.field; return "[" + g + "]"; } case ct.META_COMPARE: { var b = l.operator, x = l.field; return "[[" + x + n(e(b)) + t(d) + "]]"; } case ct.STATE: return d; case ct.ID: return "#" + d; case ct.CLASS: return "." + d; case ct.PARENT: case ct.CHILD: return o(l.parent, u) + n(">") + o(l.child, u); case ct.ANCESTOR: case ct.DESCENDANT: return o(l.ancestor, u) + " " + o(l.descendant, u); case ct.COMPOUND_SPLIT: { var w = o(l.left, u), k = o(l.subject, u), C = o(l.right, u); return w + (w.length > 0 ? " " : "") + k + C; } case ct.TRUE: return ""; } }, o = function(l, u) { return l.checks.reduce(function(c, d, p) { return c + (u === l && p === 0 ? "$" : "") + r(d, u); }, ""); }, a = "", i = 0; i < this.length; i++) { var s = this[i]; a += o(s, s.subject), this.length > 1 && i < this.length - 1 && (a += ", "); } return this.toStringCache = a, a; }, pwe = { parse: cwe, toString: dwe }, az = function(e, t, n) { var r, o = gt(e), a = Ze(e), i = gt(n), s, l, u = !1, c = !1, d = !1; switch (t.indexOf("!") >= 0 && (t = t.replace("!", ""), c = !0), t.indexOf("@") >= 0 && (t = t.replace("@", ""), u = !0), (o || i || u) && (s = !o && !a ? "" : "" + e, l = "" + n), u && (e = s = s.toLowerCase(), n = l = l.toLowerCase()), t) { case "*=": r = s.indexOf(l) >= 0; break; case "$=": r = s.indexOf(l, s.length - l.length) >= 0; break; case "^=": r = s.indexOf(l) === 0; break; case "=": r = e === n; break; case ">": d = !0, r = e > n; break; case ">=": d = !0, r = e >= n; break; case "<": d = !0, r = e < n; break; case "<=": d = !0, r = e <= n; break; default: r = !1; break; } return c && (e != null || !d) && (r = !r), r; }, fwe = function(e, t) { switch (t) { case "?": return !!e; case "!": return !e; case "^": return e === void 0; } }, hwe = function(e) { return e !== void 0; }, _$ = function(e, t) { return e.data(t); }, vwe = function(e, t) { return e[t](); }, qn = [], On = function(e, t) { return e.checks.every(function(n) { return qn[n.type](n, t); }); }; qn[ct.GROUP] = function(e, t) { var n = e.value; return n === "*" || n === t.group(); }; qn[ct.STATE] = function(e, t) { var n = e.value; return iwe(n, t); }; qn[ct.ID] = function(e, t) { var n = e.value; return t.id() === n; }; qn[ct.CLASS] = function(e, t) { var n = e.value; return t.hasClass(n); }; qn[ct.META_COMPARE] = function(e, t) { var n = e.field, r = e.operator, o = e.value; return az(vwe(t, n), r, o); }; qn[ct.DATA_COMPARE] = function(e, t) { var n = e.field, r = e.operator, o = e.value; return az(_$(t, n), r, o); }; qn[ct.DATA_BOOL] = function(e, t) { var n = e.field, r = e.operator; return fwe(_$(t, n), r); }; qn[ct.DATA_EXIST] = function(e, t) { var n = e.field; return e.operator, hwe(_$(t, n)); }; qn[ct.UNDIRECTED_EDGE] = function(e, t) { var n = e.nodes[0], r = e.nodes[1], o = t.source(), a = t.target(); return On(n, o) && On(r, a) || On(r, o) && On(n, a); }; qn[ct.NODE_NEIGHBOR] = function(e, t) { return On(e.node, t) && t.neighborhood().some(function(n) { return n.isNode() && On(e.neighbor, n); }); }; qn[ct.DIRECTED_EDGE] = function(e, t) { return On(e.source, t.source()) && On(e.target, t.target()); }; qn[ct.NODE_SOURCE] = function(e, t) { return On(e.source, t) && t.outgoers().some(function(n) { return n.isNode() && On(e.target, n); }); }; qn[ct.NODE_TARGET] = function(e, t) { return On(e.target, t) && t.incomers().some(function(n) { return n.isNode() && On(e.source, n); }); }; qn[ct.CHILD] = function(e, t) { return On(e.child, t) && On(e.parent, t.parent()); }; qn[ct.PARENT] = function(e, t) { return On(e.parent, t) && t.children().some(function(n) { return On(e.child, n); }); }; qn[ct.DESCENDANT] = function(e, t) { return On(e.descendant, t) && t.ancestors().some(function(n) { return On(e.ancestor, n); }); }; qn[ct.ANCESTOR] = function(e, t) { return On(e.ancestor, t) && t.descendants().some(function(n) { return On(e.descendant, n); }); }; qn[ct.COMPOUND_SPLIT] = function(e, t) { return On(e.subject, t) && On(e.left, t) && On(e.right, t); }; qn[ct.TRUE] = function() { return !0; }; qn[ct.COLLECTION] = function(e, t) { var n = e.value; return n.has(t); }; qn[ct.FILTER] = function(e, t) { var n = e.value; return n(t); }; var gwe = function(e) { var t = this; if (t.length === 1 && t[0].checks.length === 1 && t[0].checks[0].type === ct.ID) return e.getElementById(t[0].checks[0].value).collection(); var n = function(r) { for (var o = 0; o < t.length; o++) { var a = t[o]; if (On(a, r)) return !0; } return !1; }; return t.text() == null && (n = function() { return !0; }), e.filter(n); }, mwe = function(e) { for (var t = this, n = 0; n < t.length; n++) { var r = t[n]; if (On(r, e)) return !0; } return !1; }, ywe = { matches: mwe, filter: gwe }, il = function(e) { this.inputText = e, this.currentSubject = null, this.compoundCount = 0, this.edgeCount = 0, this.length = 0, e == null || gt(e) && e.match(/^\s*$/) || (Mo(e) ? this.addQuery({ checks: [{ type: ct.COLLECTION, value: e.collection() }] }) : Nn(e) ? this.addQuery({ checks: [{ type: ct.FILTER, value: e }] }) : gt(e) ? this.parse(e) || (this.invalid = !0) : Un("A selector must be created from a string; found ")); }, sl = il.prototype; [pwe, ywe].forEach(function(e) { return _t(sl, e); }); sl.text = function() { return this.inputText; }; sl.size = function() { return this.length; }; sl.eq = function(e) { return this[e]; }; sl.sameText = function(e) { return !this.invalid && !e.invalid && this.text() === e.text(); }; sl.addQuery = function(e) { this[this.length++] = e; }; sl.selector = sl.toString; var Ys = { allAre: function(e) { var t = new il(e); return this.every(function(n) { return t.matches(n); }); }, is: function(e) { var t = new il(e); return this.some(function(n) { return t.matches(n); }); }, some: function(e, t) { for (var n = 0; n < this.length; n++) { var r = t ? e.apply(t, [this[n], n, this]) : e(this[n], n, this); if (r) return !0; } return !1; }, every: function(e, t) { for (var n = 0; n < this.length; n++) { var r = t ? e.apply(t, [this[n], n, this]) : e(this[n], n, this); if (!r) return !1; } return !0; }, same: function(e) { if (this === e) return !0; e = this.cy().collection(e); var t = this.length, n = e.length; return t !== n ? !1 : t === 1 ? this[0] === e[0] : this.every(function(r) { return e.hasElementWithId(r.id()); }); }, anySame: function(e) { return e = this.cy().collection(e), this.some(function(t) { return e.hasElementWithId(t.id()); }); }, allAreNeighbors: function(e) { e = this.cy().collection(e); var t = this.neighborhood(); return e.every(function(n) { return t.hasElementWithId(n.id()); }); }, contains: function(e) { e = this.cy().collection(e); var t = this; return e.every(function(n) { return t.hasElementWithId(n.id()); }); } }; Ys.allAreNeighbours = Ys.allAreNeighbors; Ys.has = Ys.contains; Ys.equal = Ys.equals = Ys.same; var Jo = function(e, t) { return function(n, r, o, a) { var i = n, s = this, l; if (i == null ? l = "" : Mo(i) && i.length === 1 && (l = i.id()), s.length === 1 && l) { var u = s[0]._private, c = u.traversalCache = u.traversalCache || {}, d = c[t] = c[t] || [], p = pu(l), h = d[p]; return h || (d[p] = e.call(s, n, r, o, a)); } else return e.call(s, n, r, o, a); }; }, Yc = { parent: function(e) { var t = []; if (this.length === 1) { var n = this[0]._private.parent; if (n) return n; } for (var r = 0; r < this.length; r++) { var o = this[r], a = o._private.parent; a && t.push(a); } return this.spawn(t, !0).filter(e); }, parents: function(e) { for (var t = [], n = this.parent(); n.nonempty(); ) { for (var r = 0; r < n.length; r++) { var o = n[r]; t.push(o); } n = n.parent(); } return this.spawn(t, !0).filter(e); }, commonAncestors: function(e) { for (var t, n = 0; n < this.length; n++) { var r = this[n], o = r.parents(); t = t || o, t = t.intersect(o); } return t.filter(e); }, orphans: function(e) { return this.stdFilter(function(t) { return t.isOrphan(); }).filter(e); }, nonorphans: function(e) { return this.stdFilter(function(t) { return t.isChild(); }).filter(e); }, children: Jo(function(e) { for (var t = [], n = 0; n < this.length; n++) for (var r = this[n], o = r._private.children, a = 0; a < o.length; a++) t.push(o[a]); return this.spawn(t, !0).filter(e); }, "children"), siblings: function(e) { return this.parent().children().not(this).filter(e); }, isParent: function() { var e = this[0]; if (e) return e.isNode() && e._private.children.length !== 0; }, isChildless: function() { var e = this[0]; if (e) return e.isNode() && e._private.children.length === 0; }, isChild: function() { var e = this[0]; if (e) return e.isNode() && e._private.parent != null; }, isOrphan: function() { var e = this[0]; if (e) return e.isNode() && e._private.parent == null; }, descendants: function(e) { var t = []; function n(r) { for (var o = 0; o < r.length; o++) { var a = r[o]; t.push(a), a.children().nonempty() && n(a.children()); } } return n(this.children()), this.spawn(t, !0).filter(e); } }; function S$(e, t, n, r) { for (var o = [], a = new gd(), i = e.cy(), s = i.hasCompoundNodes(), l = 0; l < e.length; l++) { var u = e[l]; n ? o.push(u) : s && r(o, a, u); } for (; o.length > 0; ) { var c = o.shift(); t(c), a.add(c.id()), s && r(o, a, c); } return e; } function iz(e, t, n) { if (n.isParent()) for (var r = n._private.children, o = 0; o < r.length; o++) { var a = r[o]; t.has(a.id()) || e.push(a); } } Yc.forEachDown = function(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0; return S$(this, e, t, iz); }; function sz(e, t, n) { if (n.isChild()) { var r = n._private.parent; t.has(r.id()) || e.push(r); } } Yc.forEachUp = function(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0; return S$(this, e, t, sz); }; function bwe(e, t, n) { sz(e, t, n), iz(e, t, n); } Yc.forEachUpAndDown = function(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0; return S$(this, e, t, bwe); }; Yc.ancestors = Yc.parents; var pf, lz; pf = lz = { data: an.data({ field: "data", bindingEvent: "data", allowBinding: !0, allowSetting: !0, settingEvent: "data", settingTriggersEvent: !0, triggerFnName: "trigger", allowGetting: !0, immutableKeys: { id: !0, source: !0, target: !0, parent: !0 }, updateStyle: !0 }), removeData: an.removeData({ field: "data", event: "data", triggerFnName: "trigger", triggerEvent: !0, immutableKeys: { id: !0, source: !0, target: !0, parent: !0 }, updateStyle: !0 }), scratch: an.data({ field: "scratch", bindingEvent: "scratch", allowBinding: !0, allowSetting: !0, settingEvent: "scratch", settingTriggersEvent: !0, triggerFnName: "trigger", allowGetting: !0, updateStyle: !0 }), removeScratch: an.removeData({ field: "scratch", event: "scratch", triggerFnName: "trigger", triggerEvent: !0, updateStyle: !0 }), rscratch: an.data({ field: "rscratch", allowBinding: !1, allowSetting: !0, settingTriggersEvent: !1, allowGetting: !0 }), removeRscratch: an.removeData({ field: "rscratch", triggerEvent: !1 }), id: function() { var e = this[0]; if (e) return e._private.data.id; } }; pf.attr = pf.data; pf.removeAttr = pf.removeData; var wwe = lz, wm = {}; function gy(e) { return function(t) { var n = this; if (t === void 0 && (t = !0), n.length !== 0) if (n.isNode() && !n.removed()) { for (var r = 0, o = n[0], a = o._private.edges, i = 0; i < a.length; i++) { var s = a[i]; !t && s.isLoop() || (r += e(o, s)); } return r; } else return; }; } _t(wm, { degree: gy(function(e, t) { return t.source().same(t.target()) ? 2 : 1; }), indegree: gy(function(e, t) { return t.target().same(e) ? 1 : 0; }), outdegree: gy(function(e, t) { return t.source().same(e) ? 1 : 0; }) }); function oc(e, t) { return function(n) { for (var r, o = this.nodes(), a = 0; a < o.length; a++) { var i = o[a], s = i[e](n); s !== void 0 && (r === void 0 || t(s, r)) && (r = s); } return r; }; } _t(wm, { minDegree: oc("degree", function(e, t) { return e < t; }), maxDegree: oc("degree", function(e, t) { return e > t; }), minIndegree: oc("indegree", function(e, t) { return e < t; }), maxIndegree: oc("indegree", function(e, t) { return e > t; }), minOutdegree: oc("outdegree", function(e, t) { return e < t; }), maxOutdegree: oc("outdegree", function(e, t) { return e > t; }) }); _t(wm, { totalDegree: function(e) { for (var t = 0, n = this.nodes(), r = 0; r < n.length; r++) t += n[r].degree(e); return t; } }); var Ba, uz, cz = function(e, t, n) { for (var r = 0; r < e.length; r++) { var o = e[r]; if (!o.locked()) { var a = o._private.position, i = { x: t.x != null ? t.x - a.x : 0, y: t.y != null ? t.y - a.y : 0 }; o.isParent() && !(i.x === 0 && i.y === 0) && o.children().shift(i, n), o.dirtyBoundingBoxCache(); } } }, tF = { field: "position", bindingEvent: "position", allowBinding: !0, allowSetting: !0, settingEvent: "position", settingTriggersEvent: !0, triggerFnName: "emitAndNotify", allowGetting: !0, validKeys: ["x", "y"], beforeGet: function(e) { e.updateCompoundBounds(); }, beforeSet: function(e, t) { cz(e, t, !1); }, onSet: function(e) { e.dirtyCompoundBoundsCache(); }, canSet: function(e) { return !e.locked(); } }; Ba = uz = { position: an.data(tF), // position but no notification to renderer silentPosition: an.data(_t({}, tF, { allowBinding: !1, allowSetting: !0, settingTriggersEvent: !1, allowGetting: !1, beforeSet: function(e, t) { cz(e, t, !0); }, onSet: function(e) { e.dirtyCompoundBoundsCache(); } })), positions: function(e, t) { if (Xt(e)) t ? this.silentPosition(e) : this.position(e); else if (Nn(e)) { var n = e, r = this.cy(); r.startBatch(); for (var o = 0; o < this.length; o++) { var a = this[o], i = void 0; (i = n(a, o)) && (t ? a.silentPosition(i) : a.position(i)); } r.endBatch(); } return this; }, silentPositions: function(e) { return this.positions(e, !0); }, shift: function(e, t, n) { var r; if (Xt(e) ? (r = { x: Ze(e.x) ? e.x : 0, y: Ze(e.y) ? e.y : 0 }, n = t) : gt(e) && Ze(t) && (r = { x: 0, y: 0 }, r[e] = t), r != null) { var o = this.cy(); o.startBatch(); for (var a = 0; a < this.length; a++) { var i = this[a]; if (!(o.hasCompoundNodes() && i.isChild() && i.ancestors().anySame(this))) { var s = i.position(), l = { x: s.x + r.x, y: s.y + r.y }; n ? i.silentPosition(l) : i.position(l); } } o.endBatch(); } return this; }, silentShift: function(e, t) { return Xt(e) ? this.shift(e, !0) : gt(e) && Ze(t) && this.shift(e, t, !0), this; }, // get/set the rendered (i.e. on screen) positon of the element renderedPosition: function(e, t) { var n = this[0], r = this.cy(), o = r.zoom(), a = r.pan(), i = Xt(e) ? e : void 0, s = i !== void 0 || t !== void 0 && gt(e); if (n && n.isNode()) if (s) for (var l = 0; l < this.length; l++) { var u = this[l]; t !== void 0 ? u.position(e, (t - a[e]) / o) : i !== void 0 && u.position(NB(i, o, a)); } else { var c = n.position(); return i = vm(c, o, a), e === void 0 ? i : i[e]; } else if (!s) return; return this; }, // get/set the position relative to the parent relativePosition: function(e, t) { var n = this[0], r = this.cy(), o = Xt(e) ? e : void 0, a = o !== void 0 || t !== void 0 && gt(e), i = r.hasCompoundNodes(); if (n && n.isNode()) if (a) for (var s = 0; s < this.length; s++) { var l = this[s], u = i ? l.parent() : null, c = u && u.length > 0, d = c; c && (u = u[0]); var p = d ? u.position() : { x: 0, y: 0 }; t !== void 0 ? l.position(e, t + p[e]) : o !== void 0 && l.position({ x: o.x + p.x, y: o.y + p.y }); } else { var h = n.position(), f = i ? n.parent() : null, v = f && f.length > 0, m = v; v && (f = f[0]); var g = m ? f.position() : { x: 0, y: 0 }; return o = { x: h.x - g.x, y: h.y - g.y }, e === void 0 ? o : o[e]; } else if (!a) return; return this; } }; Ba.modelPosition = Ba.point = Ba.position; Ba.modelPositions = Ba.points = Ba.positions; Ba.renderedPoint = Ba.renderedPosition; Ba.relativePoint = Ba.relativePosition; var xwe = uz, Oc, xl; Oc = xl = {}; xl.renderedBoundingBox = function(e) { var t = this.boundingBox(e), n = this.cy(), r = n.zoom(), o = n.pan(), a = t.x1 * r + o.x, i = t.x2 * r + o.x, s = t.y1 * r + o.y, l = t.y2 * r + o.y; return { x1: a, x2: i, y1: s, y2: l, w: i - a, h: l - s }; }; xl.dirtyCompoundBoundsCache = function() { var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1, t = this.cy(); return !t.styleEnabled() || !t.hasCompoundNodes() ? this : (this.forEachUp(function(n) { if (n.isParent()) { var r = n._private; r.compoundBoundsClean = !1, r.bbCache = null, e || n.emitAndNotify("bounds"); } }), this); }; xl.updateCompoundBounds = function() { var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1, t = this.cy(); if (!t.styleEnabled() || !t.hasCompoundNodes()) return this; if (!e && t.batching()) return this; function n(i) { if (!i.isParent()) return; var s = i._private, l = i.children(), u = i.pstyle("compound-sizing-wrt-labels").value === "include", c = { width: { val: i.pstyle("min-width").pfValue, left: i.pstyle("min-width-bias-left"), right: i.pstyle("min-width-bias-right") }, height: { val: i.pstyle("min-height").pfValue, top: i.pstyle("min-height-bias-top"), bottom: i.pstyle("min-height-bias-bottom") } }, d = l.boundingBox({ includeLabels: u, includeOverlays: !1, // updating the compound bounds happens outside of the regular // cache cycle (i.e. before fired events) useCache: !1 }), p = s.position; (d.w === 0 || d.h === 0) && (d = { w: i.pstyle("width").pfValue, h: i.pstyle("height").pfValue }, d.x1 = p.x - d.w / 2, d.x2 = p.x + d.w / 2, d.y1 = p.y - d.h / 2, d.y2 = p.y + d.h / 2); function h(O, F, A) { var T = 0, R = 0, M = F + A; return O > 0 && M > 0 && (T = F / M * O, R = A / M * O), { biasDiff: T, biasComplementDiff: R }; } function f(O, F, A, T) { if (A.units === "%") switch (T) { case "width": return O > 0 ? A.pfValue * O : 0; case "height": return F > 0 ? A.pfValue * F : 0; case "average": return O > 0 && F > 0 ? A.pfValue * (O + F) / 2 : 0; case "min": return O > 0 && F > 0 ? O > F ? A.pfValue * F : A.pfValue * O : 0; case "max": return O > 0 && F > 0 ? O > F ? A.pfValue * O : A.pfValue * F : 0; default: return 0; } else return A.units === "px" ? A.pfValue : 0; } var v = c.width.left.value; c.width.left.units === "px" && c.width.val > 0 && (v = v * 100 / c.width.val); var m = c.width.right.value; c.width.right.units === "px" && c.width.val > 0 && (m = m * 100 / c.width.val); var g = c.height.top.value; c.height.top.units === "px" && c.height.val > 0 && (g = g * 100 / c.height.val); var b = c.height.bottom.value; c.height.bottom.units === "px" && c.height.val > 0 && (b = b * 100 / c.height.val); var x = h(c.width.val - d.w, v, m), w = x.biasDiff, k = x.biasComplementDiff, C = h(c.height.val - d.h, g, b), _ = C.biasDiff, $ = C.biasComplementDiff; s.autoPadding = f(d.w, d.h, i.pstyle("padding"), i.pstyle("padding-relative-to").value), s.autoWidth = Math.max(d.w, c.width.val), p.x = (-w + d.x1 + d.x2 + k) / 2, s.autoHeight = Math.max(d.h, c.height.val), p.y = (-_ + d.y1 + d.y2 + $) / 2; } for (var r = 0; r < this.length; r++) { var o = this[r], a = o._private; (!a.compoundBoundsClean || e) && (n(o), t.batching() || (a.compoundBoundsClean = !0)); } return this; }; var Yo = function(e) { return e === 1 / 0 || e === -1 / 0 ? 0 : e; }, Pa = function(e, t, n, r, o) { r - t === 0 || o - n === 0 || t == null || n == null || r == null || o == null || (e.x1 = t < e.x1 ? t : e.x1, e.x2 = r > e.x2 ? r : e.x2, e.y1 = n < e.y1 ? n : e.y1, e.y2 = o > e.y2 ? o : e.y2, e.w = e.x2 - e.x1, e.h = e.y2 - e.y1); }, Bl = function(e, t) { return t == null ? e : Pa(e, t.x1, t.y1, t.x2, t.y2); }, tp = function(e, t, n) { return La(e, t, n); }, lv = function(e, t, n) { if (!t.cy().headless()) { var r = t._private, o = r.rstyle, a = o.arrowWidth / 2, i = t.pstyle(n + "-arrow-shape").value, s, l; if (i !== "none") { n === "source" ? (s = o.srcX, l = o.srcY) : n === "target" ? (s = o.tgtX, l = o.tgtY) : (s = o.midX, l = o.midY); var u = r.arrowBounds = r.arrowBounds || {}, c = u[n] = u[n] || {}; c.x1 = s - a, c.y1 = l - a, c.x2 = s + a, c.y2 = l + a, c.w = c.x2 - c.x1, c.h = c.y2 - c.y1, Kv(c, 1), Pa(e, c.x1, c.y1, c.x2, c.y2); } } }, my = function(e, t, n) { if (!t.cy().headless()) { var r; n ? r = n + "-" : r = ""; var o = t._private, a = o.rstyle, i = t.pstyle(r + "label").strValue; if (i) { var s = t.pstyle("text-halign"), l = t.pstyle("text-valign"), u = tp(a, "labelWidth", n), c = tp(a, "labelHeight", n), d = tp(a, "labelX", n), p = tp(a, "labelY", n), h = t.pstyle(r + "text-margin-x").pfValue, f = t.pstyle(r + "text-margin-y").pfValue, v = t.isEdge(), m = t.pstyle(r + "text-rotation"), g = t.pstyle("text-outline-width").pfValue, b = t.pstyle("text-border-width").pfValue, x = b / 2, w = t.pstyle("text-background-padding").pfValue, k = 2, C = c, _ = u, $ = _ / 2, O = C / 2, F, A, T, R; if (v) F = d - $, A = d + $, T = p - O, R = p + O; else { switch (s.value) { case "left": F = d - _, A = d; break; case "center": F = d - $, A = d + $; break; case "right": F = d, A = d + _; break; } switch (l.value) { case "top": T = p - C, R = p; break; case "center": T = p - O, R = p + O; break; case "bottom": T = p, R = p + C; break; } } F += h - Math.max(g, x) - w - k, A += h + Math.max(g, x) + w + k, T += f - Math.max(g, x) - w - k, R += f + Math.max(g, x) + w + k; var M = n || "main", j = o.labelBounds, P = j[M] = j[M] || {}; P.x1 = F, P.y1 = T, P.x2 = A, P.y2 = R, P.w = A - F, P.h = R - T; var V = v && m.strValue === "autorotate", U = m.pfValue != null && m.pfValue !== 0; if (V || U) { var G = V ? tp(o.rstyle, "labelAngle", n) : m.pfValue, se = Math.cos(G), ae = Math.sin(G), de = (F + A) / 2, me = (T + R) / 2; if (!v) { switch (s.value) { case "left": de = A; break; case "right": de = F; break; } switch (l.value) { case "top": me = R; break; case "bottom": me = T; break; } } var te = function(ke, Ne) { return ke = ke - de, Ne = Ne - me, { x: ke * se - Ne * ae + de, y: ke * ae + Ne * se + me }; }, oe = te(F, T), ne = te(F, R), ee = te(A, T), Z = te(A, R); F = Math.min(oe.x, ne.x, ee.x, Z.x), A = Math.max(oe.x, ne.x, ee.x, Z.x), T = Math.min(oe.y, ne.y, ee.y, Z.y), R = Math.max(oe.y, ne.y, ee.y, Z.y); } var le = M + "Rot", pe = j[le] = j[le] || {}; pe.x1 = F, pe.y1 = T, pe.x2 = A, pe.y2 = R, pe.w = A - F, pe.h = R - T, Pa(e, F, T, A, R), Pa(o.labelBounds.all, F, T, A, R); } return e; } }, kwe = function(e, t) { if (!t.cy().headless()) { var n = t.pstyle("outline-opacity").value, r = t.pstyle("outline-width").value; if (n > 0 && r > 0) { var o = t.pstyle("outline-offset").value, a = t.pstyle("shape").value, i = r + o, s = (e.w + i * 2) / e.w, l = (e.h + i * 2) / e.h, u = 0, c = 0; ["diamond", "pentagon", "round-triangle"].includes(a) ? (s = (e.w + i * 2.4) / e.w, c = -i / 3.6) : ["concave-hexagon", "rhomboid", "right-rhomboid"].includes(a) ? s = (e.w + i * 2.4) / e.w : a === "star" ? (s = (e.w + i * 2.8) / e.w, l = (e.h + i * 2.6) / e.h, c = -i / 3.8) : a === "triangle" ? (s = (e.w + i * 2.8) / e.w, l = (e.h + i * 2.4) / e.h, c = -i / 1.4) : a === "vee" && (s = (e.w + i * 4.4) / e.w, l = (e.h + i * 3.8) / e.h, c = -i * 0.5); var d = e.h * l - e.h, p = e.w * s - e.w; if (Gv(e, [Math.ceil(d / 2), Math.ceil(p / 2)]), u != 0 || c !== 0) { var h = Hme(e, u, c); DB(e, h); } } } }, Cwe = function(e, t) { var n = e._private.cy, r = n.styleEnabled(), o = n.headless(), a = Fo(), i = e._private, s = e.isNode(), l = e.isEdge(), u, c, d, p, h, f, v = i.rstyle, m = s && r ? e.pstyle("bounds-expansion").pfValue : [0], g = function(_e) { return _e.pstyle("display").value !== "none"; }, b = !r || g(e) && (!l || g(e.source()) && g(e.target())); if (b) { var x = 0, w = 0; r && t.includeOverlays && (x = e.pstyle("overlay-opacity").value, x !== 0 && (w = e.pstyle("overlay-padding").value)); var k = 0, C = 0; r && t.includeUnderlays && (k = e.pstyle("underlay-opacity").value, k !== 0 && (C = e.pstyle("underlay-padding").value)); var _ = Math.max(w, C), $ = 0, O = 0; if (r && ($ = e.pstyle("width").pfValue, O = $ / 2), s && t.includeNodes) { var F = e.position(); h = F.x, f = F.y; var A = e.outerWidth(), T = A / 2, R = e.outerHeight(), M = R / 2; u = h - T, c = h + T, d = f - M, p = f + M, Pa(a, u, d, c, p), r && t.includeOutlines && kwe(a, e); } else if (l && t.includeEdges) if (r && !o) { var j = e.pstyle("curve-style").strValue; if (u = Math.min(v.srcX, v.midX, v.tgtX), c = Math.max(v.srcX, v.midX, v.tgtX), d = Math.min(v.srcY, v.midY, v.tgtY), p = Math.max(v.srcY, v.midY, v.tgtY), u -= O, c += O, d -= O, p += O, Pa(a, u, d, c, p), j === "haystack") { var P = v.haystackPts; if (P && P.length === 2) { if (u = P[0].x, d = P[0].y, c = P[1].x, p = P[1].y, u > c) { var V = u; u = c, c = V; } if (d > p) { var U = d; d = p, p = U; } Pa(a, u - O, d - O, c + O, p + O); } } else if (j === "bezier" || j === "unbundled-bezier" || j.endsWith("segments") || j.endsWith("taxi")) { var G; switch (j) { case "bezier": case "unbundled-bezier": G = v.bezierPts; break; case "segments": case "taxi": case "round-segments": case "round-taxi": G = v.linePts; break; } if (G != null) for (var se = 0; se < G.length; se++) { var ae = G[se]; u = ae.x - O, c = ae.x + O, d = ae.y - O, p = ae.y + O, Pa(a, u, d, c, p); } } } else { var de = e.source(), me = de.position(), te = e.target(), oe = te.position(); if (u = me.x, c = oe.x, d = me.y, p = oe.y, u > c) { var ne = u; u = c, c = ne; } if (d > p) { var ee = d; d = p, p = ee; } u -= O, c += O, d -= O, p += O, Pa(a, u, d, c, p); } if (r && t.includeEdges && l && (lv(a, e, "mid-source"), lv(a, e, "mid-target"), lv(a, e, "source"), lv(a, e, "target")), r) { var Z = e.pstyle("ghost").value === "yes"; if (Z) { var le = e.pstyle("ghost-offset-x").pfValue, pe = e.pstyle("ghost-offset-y").pfValue; Pa(a, a.x1 + le, a.y1 + pe, a.x2 + le, a.y2 + pe); } } var ke = i.bodyBounds = i.bodyBounds || {}; LO(ke, a), Gv(ke, m), Kv(ke, 1), r && (u = a.x1, c = a.x2, d = a.y1, p = a.y2, Pa(a, u - _, d - _, c + _, p + _)); var Ne = i.overlayBounds = i.overlayBounds || {}; LO(Ne, a), Gv(Ne, m), Kv(Ne, 1); var De = i.labelBounds = i.labelBounds || {}; De.all != null ? Vme(De.all) : De.all = Fo(), r && t.includeLabels && (t.includeMainLabels && my(a, e, null), l && (t.includeSourceLabels && my(a, e, "source"), t.includeTargetLabels && my(a, e, "target"))); } return a.x1 = Yo(a.x1), a.y1 = Yo(a.y1), a.x2 = Yo(a.x2), a.y2 = Yo(a.y2), a.w = Yo(a.x2 - a.x1), a.h = Yo(a.y2 - a.y1), a.w > 0 && a.h > 0 && b && (Gv(a, m), Kv(a, 1)), a; }, dz = function(e) { var t = 0, n = function(o) { return (o ? 1 : 0) << t++; }, r = 0; return r += n(e.incudeNodes), r += n(e.includeEdges), r += n(e.includeLabels), r += n(e.includeMainLabels), r += n(e.includeSourceLabels), r += n(e.includeTargetLabels), r += n(e.includeOverlays), r += n(e.includeOutlines), r; }, pz = function(e) { if (e.isEdge()) { var t = e.source().position(), n = e.target().position(), r = function(o) { return Math.round(o); }; return ume([r(t.x), r(t.y), r(n.x), r(n.y)]); } else return 0; }, nF = function(e, t) { var n = e._private, r, o = e.isEdge(), a = t == null ? rF : dz(t), i = a === rF, s = pz(e), l = n.bbCachePosKey === s, u = t.useCache && l, c = function(h) { return h._private.bbCache == null || h._private.styleDirty; }, d = !u || c(e) || o && c(e.source()) || c(e.target()); if (d ? (l || e.recalculateRenderedStyle(u), r = Cwe(e, ff), n.bbCache = r, n.bbCachePosKey = s) : r = n.bbCache, !i) { var p = e.isNode(); r = Fo(), (t.includeNodes && p || t.includeEdges && !p) && (t.includeOverlays ? Bl(r, n.overlayBounds) : Bl(r, n.bodyBounds)), t.includeLabels && (t.includeMainLabels && (!o || t.includeSourceLabels && t.includeTargetLabels) ? Bl(r, n.labelBounds.all) : (t.includeMainLabels && Bl(r, n.labelBounds.mainRot), t.includeSourceLabels && Bl(r, n.labelBounds.sourceRot), t.includeTargetLabels && Bl(r, n.labelBounds.targetRot))), r.w = r.x2 - r.x1, r.h = r.y2 - r.y1; } return r; }, ff = { includeNodes: !0, includeEdges: !0, includeLabels: !0, includeMainLabels: !0, includeSourceLabels: !0, includeTargetLabels: !0, includeOverlays: !0, includeUnderlays: !0, includeOutlines: !0, useCache: !0 }, rF = dz(ff), oF = Br(ff); xl.boundingBox = function(e) { var t; if (this.length === 1 && this[0]._private.bbCache != null && !this[0]._private.styleDirty && (e === void 0 || e.useCache === void 0 || e.useCache === !0)) e === void 0 ? e = ff : e = oF(e), t = nF(this[0], e); else { t = Fo(), e = e || ff; var n = oF(e), r = this, o = r.cy(), a = o.styleEnabled(); if (a) for (var i = 0; i < r.length; i++) { var s = r[i], l = s._private, u = pz(s), c = l.bbCachePosKey === u, d = n.useCache && c && !l.styleDirty; s.recalculateRenderedStyle(d); } this.updateCompoundBounds(!e.useCache); for (var p = 0; p < r.length; p++) { var h = r[p]; Bl(t, nF(h, n)); } } return t.x1 = Yo(t.x1), t.y1 = Yo(t.y1), t.x2 = Yo(t.x2), t.y2 = Yo(t.y2), t.w = Yo(t.x2 - t.x1), t.h = Yo(t.y2 - t.y1), t; }; xl.dirtyBoundingBoxCache = function() { for (var e = 0; e < this.length; e++) { var t = this[e]._private; t.bbCache = null, t.bbCachePosKey = null, t.bodyBounds = null, t.overlayBounds = null, t.labelBounds.all = null, t.labelBounds.source = null, t.labelBounds.target = null, t.labelBounds.main = null, t.labelBounds.sourceRot = null, t.labelBounds.targetRot = null, t.labelBounds.mainRot = null, t.arrowBounds.source = null, t.arrowBounds.target = null, t.arrowBounds["mid-source"] = null, t.arrowBounds["mid-target"] = null; } return this.emitAndNotify("bounds"), this; }; xl.boundingBoxAt = function(e) { var t = this.nodes(), n = this.cy(), r = n.hasCompoundNodes(), o = n.collection(); if (r && (o = t.filter(function(u) { return u.isParent(); }), t = t.not(o)), Xt(e)) { var a = e; e = function() { return a; }; } var i = function(u, c) { return u._private.bbAtOldPos = e(u, c); }, s = function(u) { return u._private.bbAtOldPos; }; n.startBatch(), t.forEach(i).silentPositions(e), r && (o.dirtyCompoundBoundsCache(), o.dirtyBoundingBoxCache(), o.updateCompoundBounds(!0)); var l = jme(this.boundingBox({ useCache: !1 })); return t.silentPositions(s), r && (o.dirtyCompoundBoundsCache(), o.dirtyBoundingBoxCache(), o.updateCompoundBounds(!0)), n.endBatch(), l; }; Oc.boundingbox = Oc.bb = Oc.boundingBox; Oc.renderedBoundingbox = Oc.renderedBoundingBox; var _we = xl, wp, oh; wp = oh = {}; var fz = function(e) { e.uppercaseName = EO(e.name), e.autoName = "auto" + e.uppercaseName, e.labelName = "label" + e.uppercaseName, e.outerName = "outer" + e.uppercaseName, e.uppercaseOuterName = EO(e.outerName), wp[e.name] = function() { var t = this[0], n = t._private, r = n.cy, o = r._private.styleEnabled; if (t) if (o) { if (t.isParent()) return t.updateCompoundBounds(), n[e.autoName] || 0; var a = t.pstyle(e.name); switch (a.strValue) { case "label": return t.recalculateRenderedStyle(), n.rstyle[e.labelName] || 0; default: return a.pfValue; } } else return 1; }, wp["outer" + e.uppercaseName] = function() { var t = this[0], n = t._private, r = n.cy, o = r._private.styleEnabled; if (t) if (o) { var a = t[e.name](), i = t.pstyle("border-width").pfValue, s = 2 * t.padding(); return a + i + s; } else return 1; }, wp["rendered" + e.uppercaseName] = function() { var t = this[0]; if (t) { var n = t[e.name](); return n * this.cy().zoom(); } }, wp["rendered" + e.uppercaseOuterName] = function() { var t = this[0]; if (t) { var n = t[e.outerName](); return n * this.cy().zoom(); } }; }; fz({ name: "width" }); fz({ name: "height" }); oh.padding = function() { var e = this[0], t = e._private; return e.isParent() ? (e.updateCompoundBounds(), t.autoPadding !== void 0 ? t.autoPadding : e.pstyle("padding").pfValue) : e.pstyle("padding").pfValue; }; oh.paddedHeight = function() { var e = this[0]; return e.height() + 2 * e.padding(); }; oh.paddedWidth = function() { var e = this[0]; return e.width() + 2 * e.padding(); }; var Swe = oh, $we = function(e, t) { if (e.isEdge()) return t(e); }, Ewe = function(e, t) { if (e.isEdge()) { var n = e.cy(); return vm(t(e), n.zoom(), n.pan()); } }, Owe = function(e, t) { if (e.isEdge()) { var n = e.cy(), r = n.pan(), o = n.zoom(); return t(e).map(function(a) { return vm(a, o, r); }); } }, Fwe = function(e) { return e.renderer().getControlPoints(e); }, Twe = function(e) { return e.renderer().getSegmentPoints(e); }, Awe = function(e) { return e.renderer().getSourceEndpoint(e); }, Iwe = function(e) { return e.renderer().getTargetEndpoint(e); }, Pwe = function(e) { return e.renderer().getEdgeMidpoint(e); }, aF = { controlPoints: { get: Fwe, mult: !0 }, segmentPoints: { get: Twe, mult: !0 }, sourceEndpoint: { get: Awe }, targetEndpoint: { get: Iwe }, midpoint: { get: Pwe } }, Lwe = function(e) { return "rendered" + e[0].toUpperCase() + e.substr(1); }, Rwe = Object.keys(aF).reduce(function(e, t) { var n = aF[t], r = Lwe(t); return e[t] = function() { return $we(this, n.get); }, n.mult ? e[r] = function() { return Owe(this, n.get); } : e[r] = function() { return Ewe(this, n.get); }, e; }, {}), Nwe = _t({}, xwe, _we, Swe, Rwe); /*! Event object based on jQuery events, MIT license https://jquery.org/license/ https://tldrlegal.com/license/mit-license https://github.com/jquery/jquery/blob/master/src/event.js */ var hz = function(e, t) { this.recycle(e, t); }; function np() { return !1; } function uv() { return !0; } hz.prototype = { instanceString: function() { return "event"; }, recycle: function(e, t) { if (this.isImmediatePropagationStopped = this.isPropagationStopped = this.isDefaultPrevented = np, e != null && e.preventDefault ? (this.type = e.type, this.isDefaultPrevented = e.defaultPrevented ? uv : np) : e != null && e.type ? t = e : this.type = e, t != null && (this.originalEvent = t.originalEvent, this.type = t.type != null ? t.type : this.type, this.cy = t.cy, this.target = t.target, this.position = t.position, this.renderedPosition = t.renderedPosition, this.namespace = t.namespace, this.layout = t.layout), this.cy != null && this.position != null && this.renderedPosition == null) { var n = this.position, r = this.cy.zoom(), o = this.cy.pan(); this.renderedPosition = { x: n.x * r + o.x, y: n.y * r + o.y }; } this.timeStamp = e && e.timeStamp || Date.now(); }, preventDefault: function() { this.isDefaultPrevented = uv; var e = this.originalEvent; e && e.preventDefault && e.preventDefault(); }, stopPropagation: function() { this.isPropagationStopped = uv; var e = this.originalEvent; e && e.stopPropagation && e.stopPropagation(); }, stopImmediatePropagation: function() { this.isImmediatePropagationStopped = uv, this.stopPropagation(); }, isDefaultPrevented: np, isPropagationStopped: np, isImmediatePropagationStopped: np }; var vz = /^([^.]+)(\.(?:[^.]+))?$/, Mwe = ".*", gz = { qualifierCompare: function(e, t) { return e === t; }, eventMatches: function() { return !0; }, addEventFields: function() { }, callbackContext: function(e) { return e; }, beforeEmit: function() { }, afterEmit: function() { }, bubble: function() { return !1; }, parent: function() { return null; }, context: null }, iF = Object.keys(gz), Dwe = {}; function xm() { for (var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Dwe, t = arguments.length > 1 ? arguments[1] : void 0, n = 0; n < iF.length; n++) { var r = iF[n]; this[r] = e[r] || gz[r]; } this.context = t || this.context, this.listeners = [], this.emitting = 0; } var ll = xm.prototype, mz = function(e, t, n, r, o, a, i) { Nn(r) && (o = r, r = null), i && (a == null ? a = i : a = _t({}, a, i)); for (var s = dn(n) ? n : n.split(/\s+/), l = 0; l < s.length; l++) { var u = s[l]; if (!ol(u)) { var c = u.match(vz); if (c) { var d = c[1], p = c[2] ? c[2] : null, h = t(e, u, d, p, r, o, a); if (h === !1) break; } } } }, sF = function(e, t) { return e.addEventFields(e.context, t), new hz(t.type, t); }, Bwe = function(e, t, n) { if (a0e(n)) { t(e, n); return; } else if (Xt(n)) { t(e, sF(e, n)); return; } for (var r = dn(n) ? n : n.split(/\s+/), o = 0; o < r.length; o++) { var a = r[o]; if (!ol(a)) { var i = a.match(vz); if (i) { var s = i[1], l = i[2] ? i[2] : null, u = sF(e, { type: s, namespace: l, target: e.context }); t(e, u); } } } }; ll.on = ll.addListener = function(e, t, n, r, o) { return mz(this, function(a, i, s, l, u, c, d) { Nn(c) && a.listeners.push({ event: i, // full event string callback: c, // callback to run type: s, // the event type (e.g. 'click') namespace: l, // the event namespace (e.g. ".foo") qualifier: u, // a restriction on whether to match this emitter conf: d // additional configuration }); }, e, t, n, r, o), this; }; ll.one = function(e, t, n, r) { return this.on(e, t, n, r, { one: !0 }); }; ll.removeListener = ll.off = function(e, t, n, r) { var o = this; this.emitting !== 0 && (this.listeners = hme(this.listeners)); for (var a = this.listeners, i = function(l) { var u = a[l]; mz(o, function(c, d, p, h, f, v) { if ((u.type === p || e === "*") && (!h && u.namespace !== ".*" || u.namespace === h) && (!f || c.qualifierCompare(u.qualifier, f)) && (!v || u.callback === v)) return a.splice(l, 1), !1; }, e, t, n, r); }, s = a.length - 1; s >= 0; s--) i(s); return this; }; ll.removeAllListeners = function() { return this.removeListener("*"); }; ll.emit = ll.trigger = function(e, t, n) { var r = this.listeners, o = r.length; return this.emitting++, dn(t) || (t = [t]), Bwe(this, function(a, i) { n != null && (r = [{ event: i.event, type: i.type, namespace: i.namespace, callback: n }], o = r.length); for (var s = function(u) { var c = r[u]; if (c.type === i.type && (!c.namespace || c.namespace === i.namespace || c.namespace === Mwe) && a.eventMatches(a.context, c, i)) { var d = [i]; t != null && gme(d, t), a.beforeEmit(a.context, c, i), c.conf && c.conf.one && (a.listeners = a.listeners.filter(function(f) { return f !== c; })); var p = a.callbackContext(a.context, c, i), h = c.callback.apply(p, d); a.afterEmit(a.context, c, i), h === !1 && (i.stopPropagation(), i.preventDefault()); } }, l = 0; l < o; l++) s(l); a.bubble(a.context) && !i.isPropagationStopped() && a.parent(a.context).emit(i, t); }, e), this.emitting--, this; }; var zwe = { qualifierCompare: function(e, t) { return e == null || t == null ? e == null && t == null : e.sameText(t); }, eventMatches: function(e, t, n) { var r = t.qualifier; return r != null ? e !== n.target && th(n.target) && r.matches(n.target) : !0; }, addEventFields: function(e, t) { t.cy = e.cy(), t.target = e; }, callbackContext: function(e, t, n) { return t.qualifier != null ? n.target : e; }, beforeEmit: function(e, t) { t.conf && t.conf.once && t.conf.onceCollection.removeListener(t.event, t.qualifier, t.callback); }, bubble: function() { return !0; }, parent: function(e) { return e.isChild() ? e.parent() : e.cy(); } }, cv = function(e) { return gt(e) ? new il(e) : e; }, yz = { createEmitter: function() { for (var e = 0; e < this.length; e++) { var t = this[e], n = t._private; n.emitter || (n.emitter = new xm(zwe, t)); } return this; }, emitter: function() { return this._private.emitter; }, on: function(e, t, n) { for (var r = cv(t), o = 0; o < this.length; o++) { var a = this[o]; a.emitter().on(e, r, n); } return this; }, removeListener: function(e, t, n) { for (var r = cv(t), o = 0; o < this.length; o++) { var a = this[o]; a.emitter().removeListener(e, r, n); } return this; }, removeAllListeners: function() { for (var e = 0; e < this.length; e++) { var t = this[e]; t.emitter().removeAllListeners(); } return this; }, one: function(e, t, n) { for (var r = cv(t), o = 0; o < this.length; o++) { var a = this[o]; a.emitter().one(e, r, n); } return this; }, once: function(e, t, n) { for (var r = cv(t), o = 0; o < this.length; o++) { var a = this[o]; a.emitter().on(e, r, n, { once: !0, onceCollection: this }); } }, emit: function(e, t) { for (var n = 0; n < this.length; n++) { var r = this[n]; r.emitter().emit(e, t); } return this; }, emitAndNotify: function(e, t) { if (this.length !== 0) return this.cy().notify(e, this), this.emit(e, t), this; } }; an.eventAliasesOn(yz); var bz = { nodes: function(e) { return this.filter(function(t) { return t.isNode(); }).filter(e); }, edges: function(e) { return this.filter(function(t) { return t.isEdge(); }).filter(e); }, // internal helper to get nodes and edges as separate collections with single iteration over elements byGroup: function() { for (var e = this.spawn(), t = this.spawn(), n = 0; n < this.length; n++) { var r = this[n]; r.isNode() ? e.push(r) : t.push(r); } return { nodes: e, edges: t }; }, filter: function(e, t) { if (e === void 0) return this; if (gt(e) || Mo(e)) return new il(e).filter(this); if (Nn(e)) { for (var n = this.spawn(), r = this, o = 0; o < r.length; o++) { var a = r[o], i = t ? e.apply(t, [a, o, r]) : e(a, o, r); i && n.push(a); } return n; } return this.spawn(); }, not: function(e) { if (e) { gt(e) && (e = this.filter(e)); for (var t = this.spawn(), n = 0; n < this.length; n++) { var r = this[n], o = e.has(r); o || t.push(r); } return t; } else return this; }, absoluteComplement: function() { var e = this.cy(); return e.mutableElements().not(this); }, intersect: function(e) { if (gt(e)) { var t = e; return this.filter(t); } for (var n = this.spawn(), r = this, o = e, a = this.length < e.length, i = a ? r : o, s = a ? o : r, l = 0; l < i.length; l++) { var u = i[l]; s.has(u) && n.push(u); } return n; }, xor: function(e) { var t = this._private.cy; gt(e) && (e = t.$(e)); var n = this.spawn(), r = this, o = e, a = function(i, s) { for (var l = 0; l < i.length; l++) { var u = i[l], c = u._private.data.id, d = s.hasElementWithId(c); d || n.push(u); } }; return a(r, o), a(o, r), n; }, diff: function(e) { var t = this._private.cy; gt(e) && (e = t.$(e)); var n = this.spawn(), r = this.spawn(), o = this.spawn(), a = this, i = e, s = function(l, u, c) { for (var d = 0; d < l.length; d++) { var p = l[d], h = p._private.data.id, f = u.hasElementWithId(h); f ? o.merge(p) : c.push(p); } }; return s(a, i, n), s(i, a, r), { left: n, right: r, both: o }; }, add: function(e) { var t = this._private.cy; if (!e) return this; if (gt(e)) { var n = e; e = t.mutableElements().filter(n); } for (var r = this.spawnSelf(), o = 0; o < e.length; o++) { var a = e[o], i = !this.has(a); i && r.push(a); } return r; }, // in place merge on calling collection merge: function(e) { var t = this._private, n = t.cy; if (!e) return this; if (e && gt(e)) { var r = e; e = n.mutableElements().filter(r); } for (var o = t.map, a = 0; a < e.length; a++) { var i = e[a], s = i._private.data.id, l = !o.has(s); if (l) { var u = this.length++; this[u] = i, o.set(s, { ele: i, index: u }); } } return this; }, unmergeAt: function(e) { var t = this[e], n = t.id(), r = this._private, o = r.map; this[e] = void 0, o.delete(n); var a = e === this.length - 1; if (this.length > 1 && !a) { var i = this.length - 1, s = this[i], l = s._private.data.id; this[i] = void 0, this[e] = s, o.set(l, { ele: s, index: e }); } return this.length--, this; }, // remove single ele in place in calling collection unmergeOne: function(e) { e = e[0]; var t = this._private, n = e._private.data.id, r = t.map, o = r.get(n); if (!o) return this; var a = o.index; return this.unmergeAt(a), this; }, // remove eles in place on calling collection unmerge: function(e) { var t = this._private.cy; if (!e) return this; if (e && gt(e)) { var n = e; e = t.mutableElements().filter(n); } for (var r = 0; r < e.length; r++) this.unmergeOne(e[r]); return this; }, unmergeBy: function(e) { for (var t = this.length - 1; t >= 0; t--) { var n = this[t]; e(n) && this.unmergeAt(t); } return this; }, map: function(e, t) { for (var n = [], r = this, o = 0; o < r.length; o++) { var a = r[o], i = t ? e.apply(t, [a, o, r]) : e(a, o, r); n.push(i); } return n; }, reduce: function(e, t) { for (var n = t, r = this, o = 0; o < r.length; o++) n = e(n, r[o], o, r); return n; }, max: function(e, t) { for (var n = -1 / 0, r, o = this, a = 0; a < o.length; a++) { var i = o[a], s = t ? e.apply(t, [i, a, o]) : e(i, a, o); s > n && (n = s, r = i); } return { value: n, ele: r }; }, min: function(e, t) { for (var n = 1 / 0, r, o = this, a = 0; a < o.length; a++) { var i = o[a], s = t ? e.apply(t, [i, a, o]) : e(i, a, o); s < n && (n = s, r = i); } return { value: n, ele: r }; } }, Jt = bz; Jt.u = Jt["|"] = Jt["+"] = Jt.union = Jt.or = Jt.add; Jt["\\"] = Jt["!"] = Jt["-"] = Jt.difference = Jt.relativeComplement = Jt.subtract = Jt.not; Jt.n = Jt["&"] = Jt["."] = Jt.and = Jt.intersection = Jt.intersect; Jt["^"] = Jt["(+)"] = Jt["(-)"] = Jt.symmetricDifference = Jt.symdiff = Jt.xor; Jt.fnFilter = Jt.filterFn = Jt.stdFilter = Jt.filter; Jt.complement = Jt.abscomp = Jt.absoluteComplement; var jwe = { isNode: function() { return this.group() === "nodes"; }, isEdge: function() { return this.group() === "edges"; }, isLoop: function() { return this.isEdge() && this.source()[0] === this.target()[0]; }, isSimple: function() { return this.isEdge() && this.source()[0] !== this.target()[0]; }, group: function() { var e = this[0]; if (e) return e._private.group; } }, wz = function(e, t) { var n = e.cy(), r = n.hasCompoundNodes(); function o(u) { var c = u.pstyle("z-compound-depth"); return c.value === "auto" ? r ? u.zDepth() : 0 : c.value === "bottom" ? -1 : c.value === "top" ? h$ : 0; } var a = o(e) - o(t); if (a !== 0) return a; function i(u) { var c = u.pstyle("z-index-compare"); return c.value === "auto" && u.isNode() ? 1 : 0; } var s = i(e) - i(t); if (s !== 0) return s; var l = e.pstyle("z-index").value - t.pstyle("z-index").value; return l !== 0 ? l : e.poolIndex() - t.poolIndex(); }, Ug = { forEach: function(e, t) { if (Nn(e)) for (var n = this.length, r = 0; r < n; r++) { var o = this[r], a = t ? e.apply(t, [o, r, this]) : e(o, r, this); if (a === !1) break; } return this; }, toArray: function() { for (var e = [], t = 0; t < this.length; t++) e.push(this[t]); return e; }, slice: function(e, t) { var n = [], r = this.length; t == null && (t = r), e == null && (e = 0), e < 0 && (e = r + e), t < 0 && (t = r + t); for (var o = e; o >= 0 && o < t && o < r; o++) n.push(this[o]); return this.spawn(n); }, size: function() { return this.length; }, eq: function(e) { return this[e] || this.spawn(); }, first: function() { return this[0] || this.spawn(); }, last: function() { return this[this.length - 1] || this.spawn(); }, empty: function() { return this.length === 0; }, nonempty: function() { return !this.empty(); }, sort: function(e) { if (!Nn(e)) return this; var t = this.toArray().sort(e); return this.spawn(t); }, sortByZIndex: function() { return this.sort(wz); }, zDepth: function() { var e = this[0]; if (e) { var t = e._private, n = t.group; if (n === "nodes") { var r = t.data.parent ? e.parents().size() : 0; return e.isParent() ? r : h$ - 1; } else { var o = t.source, a = t.target, i = o.zDepth(), s = a.zDepth(); return Math.max(i, s, 0); } } } }; Ug.each = Ug.forEach; var Vwe = function() { var e = "undefined", t = (typeof Symbol > "u" ? "undefined" : cr(Symbol)) != e && cr(Symbol.iterator) != e; t && (Ug[Symbol.iterator] = function() { var n = this, r = { value: void 0, done: !1 }, o = 0, a = this.length; return gB({ next: function() { return o < a ? r.value = n[o++] : (r.value = void 0, r.done = !0), r; } }, Symbol.iterator, function() { return this; }); }); }; Vwe(); var Hwe = Br({ nodeDimensionsIncludeLabels: !1 }), Yv = { // Calculates and returns node dimensions { x, y } based on options given layoutDimensions: function(e) { e = Hwe(e); var t; if (!this.takesUpSpace()) t = { w: 0, h: 0 }; else if (e.nodeDimensionsIncludeLabels) { var n = this.boundingBox(); t = { w: n.w, h: n.h }; } else t = { w: this.outerWidth(), h: this.outerHeight() }; return (t.w === 0 || t.h === 0) && (t.w = t.h = 1), t; }, // using standard layout options, apply position function (w/ or w/o animation) layoutPositions: function(e, t, n) { var r = this.nodes().filter(function(w) { return !w.isParent(); }), o = this.cy(), a = t.eles, i = function(w) { return w.id(); }, s = of(n, i); e.emit({ type: "layoutstart", layout: e }), e.animations = []; var l = function(w, k, C) { var _ = { x: k.x1 + k.w / 2, y: k.y1 + k.h / 2 }, $ = { // scale from center of bounding box (not necessarily 0,0) x: (C.x - _.x) * w, y: (C.y - _.y) * w }; return { x: _.x + $.x, y: _.y + $.y }; }, u = t.spacingFactor && t.spacingFactor !== 1, c = function() { if (!u) return null; for (var w = Fo(), k = 0; k < r.length; k++) { var C = r[k], _ = s(C, k); Ume(w, _.x, _.y); } return w; }, d = c(), p = of(function(w, k) { var C = s(w, k); if (u) { var _ = Math.abs(t.spacingFactor); C = l(_, d, C); } return t.transform != null && (C = t.transform(w, C)), C; }, i); if (t.animate) { for (var h = 0; h < r.length; h++) { var f = r[h], v = p(f, h), m = t.animateFilter == null || t.animateFilter(f, h); if (m) { var g = f.animation({ position: v, duration: t.animationDuration, easing: t.animationEasing }); e.animations.push(g); } else f.position(v); } if (t.fit) { var b = o.animation({ fit: { boundingBox: a.boundingBoxAt(p), padding: t.padding }, duration: t.animationDuration, easing: t.animationEasing }); e.animations.push(b); } else if (t.zoom !== void 0 && t.pan !== void 0) { var x = o.animation({ zoom: t.zoom, pan: t.pan, duration: t.animationDuration, easing: t.animationEasing }); e.animations.push(x); } e.animations.forEach(function(w) { return w.play(); }), e.one("layoutready", t.ready), e.emit({ type: "layoutready", layout: e }), md.all(e.animations.map(function(w) { return w.promise(); })).then(function() { e.one("layoutstop", t.stop), e.emit({ type: "layoutstop", layout: e }); }); } else r.positions(p), t.fit && o.fit(t.eles, t.padding), t.zoom != null && o.zoom(t.zoom), t.pan && o.pan(t.pan), e.one("layoutready", t.ready), e.emit({ type: "layoutready", layout: e }), e.one("layoutstop", t.stop), e.emit({ type: "layoutstop", layout: e }); return this; }, layout: function(e) { var t = this.cy(); return t.makeLayout(_t({}, e, { eles: this })); } }; Yv.createLayout = Yv.makeLayout = Yv.layout; function xz(e, t, n) { var r = n._private, o = r.styleCache = r.styleCache || [], a; return (a = o[e]) != null || (a = o[e] = t(n)), a; } function km(e, t) { return e = pu(e), function(n) { return xz(e, t, n); }; } function Cm(e, t) { e = pu(e); var n = function(r) { return t.call(r); }; return function() { var r = this[0]; if (r) return xz(e, n, r); }; } var Lr = { recalculateRenderedStyle: function(e) { var t = this.cy(), n = t.renderer(), r = t.styleEnabled(); return n && r && n.recalculateRenderedStyle(this, e), this; }, dirtyStyleCache: function() { var e = this.cy(), t = function(r) { return r._private.styleCache = null; }; if (e.hasCompoundNodes()) { var n; n = this.spawnSelf().merge(this.descendants()).merge(this.parents()), n.merge(n.connectedEdges()), n.forEach(t); } else this.forEach(function(r) { t(r), r.connectedEdges().forEach(t); }); return this; }, // fully updates (recalculates) the style for the elements updateStyle: function(e) { var t = this._private.cy; if (!t.styleEnabled()) return this; if (t.batching()) { var n = t._private.batchStyleEles; return n.merge(this), this; } var r = t.hasCompoundNodes(), o = this; e = !!(e || e === void 0), r && (o = this.spawnSelf().merge(this.descendants()).merge(this.parents())); var a = o; return e ? a.emitAndNotify("style") : a.emit("style"), o.forEach(function(i) { return i._private.styleDirty = !0; }), this; }, // private: clears dirty flag and recalculates style cleanStyle: function() { var e = this.cy(); if (e.styleEnabled()) for (var t = 0; t < this.length; t++) { var n = this[t]; n._private.styleDirty && (n._private.styleDirty = !1, e.style().apply(n)); } }, // get the internal parsed style object for the specified property parsedStyle: function(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, n = this[0], r = n.cy(); if (r.styleEnabled() && n) { this.cleanStyle(); var o = n._private.style[e]; return o ?? (t ? r.style().getDefaultProperty(e) : null); } }, numericStyle: function(e) { var t = this[0]; if (t.cy().styleEnabled() && t) { var n = t.pstyle(e); return n.pfValue !== void 0 ? n.pfValue : n.value; } }, numericStyleUnits: function(e) { var t = this[0]; if (t.cy().styleEnabled() && t) return t.pstyle(e).units; }, // get the specified css property as a rendered value (i.e. on-screen value) // or get the whole rendered style if no property specified (NB doesn't allow setting) renderedStyle: function(e) { var t = this.cy(); if (!t.styleEnabled()) return this; var n = this[0]; if (n) return t.style().getRenderedStyle(n, e); }, // read the calculated css style of the element or override the style (via a bypass) style: function(e, t) { var n = this.cy(); if (!n.styleEnabled()) return this; var r = !1, o = n.style(); if (Xt(e)) { var a = e; o.applyBypass(this, a, r), this.emitAndNotify("style"); } else if (gt(e)) if (t === void 0) { var i = this[0]; return i ? o.getStylePropertyValue(i, e) : void 0; } else o.applyBypass(this, e, t, r), this.emitAndNotify("style"); else if (e === void 0) { var s = this[0]; return s ? o.getRawStyle(s) : void 0; } return this; }, removeStyle: function(e) { var t = this.cy(); if (!t.styleEnabled()) return this; var n = !1, r = t.style(), o = this; if (e === void 0) for (var a = 0; a < o.length; a++) { var i = o[a]; r.removeAllBypasses(i, n); } else { e = e.split(/\s+/); for (var s = 0; s < o.length; s++) { var l = o[s]; r.removeBypasses(l, e, n); } } return this.emitAndNotify("style"), this; }, show: function() { return this.css("display", "element"), this; }, hide: function() { return this.css("display", "none"), this; }, effectiveOpacity: function() { var e = this.cy(); if (!e.styleEnabled()) return 1; var t = e.hasCompoundNodes(), n = this[0]; if (n) { var r = n._private, o = n.pstyle("opacity").value; if (!t) return o; var a = r.data.parent ? n.parents() : null; if (a) for (var i = 0; i < a.length; i++) { var s = a[i], l = s.pstyle("opacity").value; o = l * o; } return o; } }, transparent: function() { var e = this.cy(); if (!e.styleEnabled()) return !1; var t = this[0], n = t.cy().hasCompoundNodes(); if (t) return n ? t.effectiveOpacity() === 0 : t.pstyle("opacity").value === 0; }, backgrounding: function() { var e = this.cy(); if (!e.styleEnabled()) return !1; var t = this[0]; return !!t._private.backgrounding; } }; function yy(e, t) { var n = e._private, r = n.data.parent ? e.parents() : null; if (r) for (var o = 0; o < r.length; o++) { var a = r[o]; if (!t(a)) return !1; } return !0; } function $$(e) { var t = e.ok, n = e.edgeOkViaNode || e.ok, r = e.parentOk || e.ok; return function() { var o = this.cy(); if (!o.styleEnabled()) return !0; var a = this[0], i = o.hasCompoundNodes(); if (a) { var s = a._private; if (!t(a)) return !1; if (a.isNode()) return !i || yy(a, r); var l = s.source, u = s.target; return n(l) && (!i || yy(l, n)) && (l === u || n(u) && (!i || yy(u, n))); } }; } var xd = km("eleTakesUpSpace", function(e) { return e.pstyle("display").value === "element" && e.width() !== 0 && (e.isNode() ? e.height() !== 0 : !0); }); Lr.takesUpSpace = Cm("takesUpSpace", $$({ ok: xd })); var Uwe = km("eleInteractive", function(e) { return e.pstyle("events").value === "yes" && e.pstyle("visibility").value === "visible" && xd(e); }), qwe = km("parentInteractive", function(e) { return e.pstyle("visibility").value === "visible" && xd(e); }); Lr.interactive = Cm("interactive", $$({ ok: Uwe, parentOk: qwe, edgeOkViaNode: xd })); Lr.noninteractive = function() { var e = this[0]; if (e) return !e.interactive(); }; var Kwe = km("eleVisible", function(e) { return e.pstyle("visibility").value === "visible" && e.pstyle("opacity").pfValue !== 0 && xd(e); }), Gwe = xd; Lr.visible = Cm("visible", $$({ ok: Kwe, edgeOkViaNode: Gwe })); Lr.hidden = function() { var e = this[0]; if (e) return !e.visible(); }; Lr.isBundledBezier = Cm("isBundledBezier", function() { return this.cy().styleEnabled() ? !this.removed() && this.pstyle("curve-style").value === "bezier" && this.takesUpSpace() : !1; }); Lr.bypass = Lr.css = Lr.style; Lr.renderedCss = Lr.renderedStyle; Lr.removeBypass = Lr.removeCss = Lr.removeStyle; Lr.pstyle = Lr.parsedStyle; var Xs = {}; function lF(e) { return function() { var t = arguments, n = []; if (t.length === 2) { var r = t[0], o = t[1]; this.on(e.event, r, o); } else if (t.length === 1 && Nn(t[0])) { var a = t[0]; this.on(e.event, a); } else if (t.length === 0 || t.length === 1 && dn(t[0])) { for (var i = t.length === 1 ? t[0] : null, s = 0; s < this.length; s++) { var l = this[s], u = !e.ableField || l._private[e.ableField], c = l._private[e.field] != e.value; if (e.overrideAble) { var d = e.overrideAble(l); if (d !== void 0 && (u = d, !d)) return this; } u && (l._private[e.field] = e.value, c && n.push(l)); } var p = this.spawn(n); p.updateStyle(), p.emit(e.event), i && p.emit(i); } return this; }; } function kd(e) { Xs[e.field] = function() { var t = this[0]; if (t) { if (e.overrideField) { var n = e.overrideField(t); if (n !== void 0) return n; } return t._private[e.field]; } }, Xs[e.on] = lF({ event: e.on, field: e.field, ableField: e.ableField, overrideAble: e.overrideAble, value: !0 }), Xs[e.off] = lF({ event: e.off, field: e.field, ableField: e.ableField, overrideAble: e.overrideAble, value: !1 }); } kd({ field: "locked", overrideField: function(e) { return e.cy().autolock() ? !0 : void 0; }, on: "lock", off: "unlock" }); kd({ field: "grabbable", overrideField: function(e) { return e.cy().autoungrabify() || e.pannable() ? !1 : void 0; }, on: "grabify", off: "ungrabify" }); kd({ field: "selected", ableField: "selectable", overrideAble: function(e) { return e.cy().autounselectify() ? !1 : void 0; }, on: "select", off: "unselect" }); kd({ field: "selectable", overrideField: function(e) { return e.cy().autounselectify() ? !1 : void 0; }, on: "selectify", off: "unselectify" }); Xs.deselect = Xs.unselect; Xs.grabbed = function() { var e = this[0]; if (e) return e._private.grabbed; }; kd({ field: "active", on: "activate", off: "unactivate" }); kd({ field: "pannable", on: "panify", off: "unpanify" }); Xs.inactive = function() { var e = this[0]; if (e) return !e._private.active; }; var Xr = {}, uF = function(e) { return function(t) { for (var n = this, r = [], o = 0; o < n.length; o++) { var a = n[o]; if (a.isNode()) { for (var i = !1, s = a.connectedEdges(), l = 0; l < s.length; l++) { var u = s[l], c = u.source(), d = u.target(); if (e.noIncomingEdges && d === a && c !== a || e.noOutgoingEdges && c === a && d !== a) { i = !0; break; } } i || r.push(a); } } return this.spawn(r, !0).filter(t); }; }, cF = function(e) { return function(t) { for (var n = this, r = [], o = 0; o < n.length; o++) { var a = n[o]; if (a.isNode()) for (var i = a.connectedEdges(), s = 0; s < i.length; s++) { var l = i[s], u = l.source(), c = l.target(); e.outgoing && u === a ? (r.push(l), r.push(c)) : e.incoming && c === a && (r.push(l), r.push(u)); } } return this.spawn(r, !0).filter(t); }; }, dF = function(e) { return function(t) { for (var n = this, r = [], o = {}; ; ) { var a = e.outgoing ? n.outgoers() : n.incomers(); if (a.length === 0) break; for (var i = !1, s = 0; s < a.length; s++) { var l = a[s], u = l.id(); o[u] || (o[u] = !0, r.push(l), i = !0); } if (!i) break; n = a; } return this.spawn(r, !0).filter(t); }; }; Xr.clearTraversalCache = function() { for (var e = 0; e < this.length; e++) this[e]._private.traversalCache = null; }; _t(Xr, { // get the root nodes in the DAG roots: uF({ noIncomingEdges: !0 }), // get the leaf nodes in the DAG leaves: uF({ noOutgoingEdges: !0 }), // normally called children in graph theory // these nodes =edges=> outgoing nodes outgoers: Jo(cF({ outgoing: !0 }), "outgoers"), // aka DAG descendants successors: dF({ outgoing: !0 }), // normally called parents in graph theory // these nodes <=edges= incoming nodes incomers: Jo(cF({ incoming: !0 }), "incomers"), // aka DAG ancestors predecessors: dF({ incoming: !0 }) }); _t(Xr, { neighborhood: Jo(function(e) { for (var t = [], n = this.nodes(), r = 0; r < n.length; r++) for (var o = n[r], a = o.connectedEdges(), i = 0; i < a.length; i++) { var s = a[i], l = s.source(), u = s.target(), c = o === l ? u : l; c.length > 0 && t.push(c[0]), t.push(s[0]); } return this.spawn(t, !0).filter(e); }, "neighborhood"), closedNeighborhood: function(e) { return this.neighborhood().add(this).filter(e); }, openNeighborhood: function(e) { return this.neighborhood(e); } }); Xr.neighbourhood = Xr.neighborhood; Xr.closedNeighbourhood = Xr.closedNeighborhood; Xr.openNeighbourhood = Xr.openNeighborhood; _t(Xr, { source: Jo(function(e) { var t = this[0], n; return t && (n = t._private.source || t.cy().collection()), n && e ? n.filter(e) : n; }, "source"), target: Jo(function(e) { var t = this[0], n; return t && (n = t._private.target || t.cy().collection()), n && e ? n.filter(e) : n; }, "target"), sources: pF({ attr: "source" }), targets: pF({ attr: "target" }) }); function pF(e) { return function(t) { for (var n = [], r = 0; r < this.length; r++) { var o = this[r], a = o._private[e.attr]; a && n.push(a); } return this.spawn(n, !0).filter(t); }; } _t(Xr, { edgesWith: Jo(fF(), "edgesWith"), edgesTo: Jo(fF({ thisIsSrc: !0 }), "edgesTo") }); function fF(e) { return function(t) { var n = [], r = this._private.cy, o = e || {}; gt(t) && (t = r.$(t)); for (var a = 0; a < t.length; a++) for (var i = t[a]._private.edges, s = 0; s < i.length; s++) { var l = i[s], u = l._private.data, c = this.hasElementWithId(u.source) && t.hasElementWithId(u.target), d = t.hasElementWithId(u.source) && this.hasElementWithId(u.target), p = c || d; p && ((o.thisIsSrc || o.thisIsTgt) && (o.thisIsSrc && !c || o.thisIsTgt && !d) || n.push(l)); } return this.spawn(n, !0); }; } _t(Xr, { connectedEdges: Jo(function(e) { for (var t = [], n = this, r = 0; r < n.length; r++) { var o = n[r]; if (o.isNode()) for (var a = o._private.edges, i = 0; i < a.length; i++) { var s = a[i]; t.push(s); } } return this.spawn(t, !0).filter(e); }, "connectedEdges"), connectedNodes: Jo(function(e) { for (var t = [], n = this, r = 0; r < n.length; r++) { var o = n[r]; o.isEdge() && (t.push(o.source()[0]), t.push(o.target()[0])); } return this.spawn(t, !0).filter(e); }, "connectedNodes"), parallelEdges: Jo(hF(), "parallelEdges"), codirectedEdges: Jo(hF({ codirected: !0 }), "codirectedEdges") }); function hF(e) { var t = { codirected: !1 }; return e = _t({}, t, e), function(n) { for (var r = [], o = this.edges(), a = e, i = 0; i < o.length; i++) for (var s = o[i], l = s._private, u = l.source, c = u._private.data.id, d = l.data.target, p = u._private.edges, h = 0; h < p.length; h++) { var f = p[h], v = f._private.data, m = v.target, g = v.source, b = m === d && g === c, x = c === m && d === g; (a.codirected && b || !a.codirected && (b || x)) && r.push(f); } return this.spawn(r, !0).filter(n); }; } _t(Xr, { components: function(e) { var t = this, n = t.cy(), r = n.collection(), o = e == null ? t.nodes() : e.nodes(), a = []; e != null && o.empty() && (o = e.sources()); var i = function(l, u) { r.merge(l), o.unmerge(l), u.merge(l); }; if (o.empty()) return t.spawn(); var s = function() { var l = n.collection(); a.push(l); var u = o[0]; i(u, l), t.bfs({ directed: !1, roots: u, visit: function(c) { return i(c, l); } }), l.forEach(function(c) { c.connectedEdges().forEach(function(d) { t.has(d) && l.has(d.source()) && l.has(d.target()) && l.merge(d); }); }); }; do s(); while (o.length > 0); return a; }, component: function() { var e = this[0]; return e.cy().mutableElements().components(e)[0]; } }); Xr.componentsOf = Xr.components; var Rr = function(e, t) { var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1, r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1; if (e === void 0) { Un("A collection must have a reference to the core"); return; } var o = new ii(), a = !1; if (!t) t = []; else if (t.length > 0 && Xt(t[0]) && !th(t[0])) { a = !0; for (var i = [], s = new gd(), l = 0, u = t.length; l < u; l++) { var c = t[l]; c.data == null && (c.data = {}); var d = c.data; if (d.id == null) d.id = LB(); else if (e.hasElementWithId(d.id) || s.has(d.id)) continue; var p = new hm(e, c, !1); i.push(p), s.add(d.id); } t = i; } this.length = 0; for (var h = 0, f = t.length; h < f; h++) { var v = t[h][0]; if (v != null) { var m = v._private.data.id; (!n || !o.has(m)) && (n && o.set(m, { index: this.length, ele: v }), this[this.length] = v, this.length++); } } this._private = { eles: this, cy: e, get map() { return this.lazyMap == null && this.rebuildMap(), this.lazyMap; }, set map(g) { this.lazyMap = g; }, rebuildMap: function() { for (var g = this.lazyMap = new ii(), b = this.eles, x = 0; x < b.length; x++) { var w = b[x]; g.set(w.id(), { index: x, ele: w }); } } }, n && (this._private.map = o), a && !r && this.restore(); }, kn = hm.prototype = Rr.prototype = Object.create(Array.prototype); kn.instanceString = function() { return "collection"; }; kn.spawn = function(e, t) { return new Rr(this.cy(), e, t); }; kn.spawnSelf = function() { return this.spawn(this); }; kn.cy = function() { return this._private.cy; }; kn.renderer = function() { return this._private.cy.renderer(); }; kn.element = function() { return this[0]; }; kn.collection = function() { return wB(this) ? this : new Rr(this._private.cy, [this]); }; kn.unique = function() { return new Rr(this._private.cy, this, !0); }; kn.hasElementWithId = function(e) { return e = "" + e, this._private.map.has(e); }; kn.getElementById = function(e) { e = "" + e; var t = this._private.cy, n = this._private.map.get(e); return n ? n.ele : new Rr(t); }; kn.$id = kn.getElementById; kn.poolIndex = function() { var e = this._private.cy, t = e._private.elements, n = this[0]._private.data.id; return t._private.map.get(n).index; }; kn.indexOf = function(e) { var t = e[0]._private.data.id; return this._private.map.get(t).index; }; kn.indexOfId = function(e) { return e = "" + e, this._private.map.get(e).index; }; kn.json = function(e) { var t = this.element(), n = this.cy(); if (t == null && e) return this; if (t != null) { var r = t._private; if (Xt(e)) { if (n.startBatch(), e.data) { t.data(e.data); var o = r.data; if (t.isEdge()) { var a = !1, i = {}, s = e.data.source, l = e.data.target; s != null && s != o.source && (i.source = "" + s, a = !0), l != null && l != o.target && (i.target = "" + l, a = !0), a && (t = t.move(i)); } else { var u = "parent" in e.data, c = e.data.parent; u && (c != null || o.parent != null) && c != o.parent && (c === void 0 && (c = null), c != null && (c = "" + c), t = t.move({ parent: c })); } } e.position && t.position(e.position); var d = function(f, v, m) { var g = e[f]; g != null && g !== r[f] && (g ? t[v]() : t[m]()); }; return d("removed", "remove", "restore"), d("selected", "select", "unselect"), d("selectable", "selectify", "unselectify"), d("locked", "lock", "unlock"), d("grabbable", "grabify", "ungrabify"), d("pannable", "panify", "unpanify"), e.classes != null && t.classes(e.classes), n.endBatch(), this; } else if (e === void 0) { var p = { data: ai(r.data), position: ai(r.position), group: r.group, removed: r.removed, selected: r.selected, selectable: r.selectable, locked: r.locked, grabbable: r.grabbable, pannable: r.pannable, classes: null }; p.classes = ""; var h = 0; return r.classes.forEach(function(f) { return p.classes += h++ === 0 ? f : " " + f; }), p; } } }; kn.jsons = function() { for (var e = [], t = 0; t < this.length; t++) { var n = this[t], r = n.json(); e.push(r); } return e; }; kn.clone = function() { for (var e = this.cy(), t = [], n = 0; n < this.length; n++) { var r = this[n], o = r.json(), a = new hm(e, o, !1); t.push(a); } return new Rr(e, t); }; kn.copy = kn.clone; kn.restore = function() { for (var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, n = this, r = n.cy(), o = r._private, a = [], i = [], s, l = 0, u = n.length; l < u; l++) { var c = n[l]; t && !c.removed() || (c.isNode() ? a.push(c) : i.push(c)); } s = a.concat(i); var d, p = function() { s.splice(d, 1), d--; }; for (d = 0; d < s.length; d++) { var h = s[d], f = h._private, v = f.data; if (h.clearTraversalCache(), !(!t && !f.removed)) { if (v.id === void 0) v.id = LB(); else if (Ze(v.id)) v.id = "" + v.id; else if (ol(v.id) || !gt(v.id)) { Un("Can not create element with invalid string ID `" + v.id + "`"), p(); continue; } else if (r.hasElementWithId(v.id)) { Un("Can not create second element with ID `" + v.id + "`"), p(); continue; } } var m = v.id; if (h.isNode()) { var g = f.position; g.x == null && (g.x = 0), g.y == null && (g.y = 0); } if (h.isEdge()) { for (var b = h, x = ["source", "target"], w = x.length, k = !1, C = 0; C < w; C++) { var _ = x[C], $ = v[_]; Ze($) && ($ = v[_] = "" + v[_]), $ == null || $ === "" ? (Un("Can not create edge `" + m + "` with unspecified " + _), k = !0) : r.hasElementWithId($) || (Un("Can not create edge `" + m + "` with nonexistant " + _ + " `" + $ + "`"), k = !0); } if (k) { p(); continue; } var O = r.getElementById(v.source), F = r.getElementById(v.target); O.same(F) ? O._private.edges.push(b) : (O._private.edges.push(b), F._private.edges.push(b)), b._private.source = O, b._private.target = F; } f.map = new ii(), f.map.set(m, { ele: h, index: 0 }), f.removed = !1, t && r.addToPool(h); } for (var A = 0; A < a.length; A++) { var T = a[A], R = T._private.data; Ze(R.parent) && (R.parent = "" + R.parent); var M = R.parent, j = M != null; if (j || T._private.parent) { var P = T._private.parent ? r.collection().merge(T._private.parent) : r.getElementById(M); if (P.empty()) R.parent = void 0; else if (P[0].removed()) sn("Node added with missing parent, reference to parent removed"), R.parent = void 0, T._private.parent = null; else { for (var V = !1, U = P; !U.empty(); ) { if (T.same(U)) { V = !0, R.parent = void 0; break; } U = U.parent(); } V || (P[0]._private.children.push(T), T._private.parent = P[0], o.hasCompoundNodes = !0); } } } if (s.length > 0) { for (var G = s.length === n.length ? n : new Rr(r, s), se = 0; se < G.length; se++) { var ae = G[se]; ae.isNode() || (ae.parallelEdges().clearTraversalCache(), ae.source().clearTraversalCache(), ae.target().clearTraversalCache()); } var de; o.hasCompoundNodes ? de = r.collection().merge(G).merge(G.connectedNodes()).merge(G.parent()) : de = G, de.dirtyCompoundBoundsCache().dirtyBoundingBoxCache().updateStyle(e), e ? G.emitAndNotify("add") : t && G.emit("add"); } return n; }; kn.removed = function() { var e = this[0]; return e && e._private.removed; }; kn.inside = function() { var e = this[0]; return e && !e._private.removed; }; kn.remove = function() { var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, n = this, r = [], o = {}, a = n._private.cy; function i(M) { for (var j = M._private.edges, P = 0; P < j.length; P++) l(j[P]); } function s(M) { for (var j = M._private.children, P = 0; P < j.length; P++) l(j[P]); } function l(M) { var j = o[M.id()]; t && M.removed() || j || (o[M.id()] = !0, M.isNode() ? (r.push(M), i(M), s(M)) : r.unshift(M)); } for (var u = 0, c = n.length; u < c; u++) { var d = n[u]; l(d); } function p(M, j) { var P = M._private.edges; al(P, j), M.clearTraversalCache(); } function h(M) { M.clearTraversalCache(); } var f = []; f.ids = {}; function v(M, j) { j = j[0], M = M[0]; var P = M._private.children, V = M.id(); al(P, j), j._private.parent = null, f.ids[V] || (f.ids[V] = !0, f.push(M)); } n.dirtyCompoundBoundsCache(), t && a.removeFromPool(r); for (var m = 0; m < r.length; m++) { var g = r[m]; if (g.isEdge()) { var b = g.source()[0], x = g.target()[0]; p(b, g), p(x, g); for (var w = g.parallelEdges(), k = 0; k < w.length; k++) { var C = w[k]; h(C), C.isBundledBezier() && C.dirtyBoundingBoxCache(); } } else { var _ = g.parent(); _.length !== 0 && v(_, g); } t && (g._private.removed = !0); } var $ = a._private.elements; a._private.hasCompoundNodes = !1; for (var O = 0; O < $.length; O++) { var F = $[O]; if (F.isParent()) { a._private.hasCompoundNodes = !0; break; } } var A = new Rr(this.cy(), r); A.size() > 0 && (e ? A.emitAndNotify("remove") : t && A.emit("remove")); for (var T = 0; T < f.length; T++) { var R = f[T]; (!t || !R.removed()) && R.updateStyle(); } return A; }; kn.move = function(e) { var t = this._private.cy, n = this, r = !1, o = !1, a = function(h) { return h == null ? h : "" + h; }; if (e.source !== void 0 || e.target !== void 0) { var i = a(e.source), s = a(e.target), l = i != null && t.hasElementWithId(i), u = s != null && t.hasElementWithId(s); (l || u) && (t.batch(function() { n.remove(r, o), n.emitAndNotify("moveout"); for (var h = 0; h < n.length; h++) { var f = n[h], v = f._private.data; f.isEdge() && (l && (v.source = i), u && (v.target = s)); } n.restore(r, o); }), n.emitAndNotify("move")); } else if (e.parent !== void 0) { var c = a(e.parent), d = c === null || t.hasElementWithId(c); if (d) { var p = c === null ? void 0 : c; t.batch(function() { var h = n.remove(r, o); h.emitAndNotify("moveout"); for (var f = 0; f < n.length; f++) { var v = n[f], m = v._private.data; v.isNode() && (m.parent = p); } h.restore(r, o); }), n.emitAndNotify("move"); } } return this; }; [GB, owe, Wv, Ys, Yc, wwe, wm, Nwe, yz, bz, jwe, Ug, Yv, Lr, Xs, Xr].forEach(function(e) { _t(kn, e); }); var Wwe = { add: function(e) { var t, n = this; if (Mo(e)) { var r = e; if (r._private.cy === n) t = r.restore(); else { for (var o = [], a = 0; a < r.length; a++) { var i = r[a]; o.push(i.json()); } t = new Rr(n, o); } } else if (dn(e)) { var s = e; t = new Rr(n, s); } else if (Xt(e) && (dn(e.nodes) || dn(e.edges))) { for (var l = e, u = [], c = ["nodes", "edges"], d = 0, p = c.length; d < p; d++) { var h = c[d], f = l[h]; if (dn(f)) for (var v = 0, m = f.length; v < m; v++) { var g = _t({ group: h }, f[v]); u.push(g); } } t = new Rr(n, u); } else { var b = e; t = new hm(n, b).collection(); } return t; }, remove: function(e) { if (!Mo(e) && gt(e)) { var t = e; e = this.$(t); } return e.remove(); } }; /*! Bezier curve function generator. Copyright Gaetan Renaudeau. MIT License: http://en.wikipedia.org/wiki/MIT_License */ function Ywe(e, t, n, r) { var o = 4, a = 1e-3, i = 1e-7, s = 10, l = 11, u = 1 / (l - 1), c = typeof Float32Array < "u"; if (arguments.length !== 4) return !1; for (var d = 0; d < 4; ++d) if (typeof arguments[d] != "number" || isNaN(arguments[d]) || !isFinite(arguments[d])) return !1; e = Math.min(e, 1), n = Math.min(n, 1), e = Math.max(e, 0), n = Math.max(n, 0); var p = c ? new Float32Array(l) : new Array(l); function h(F, A) { return 1 - 3 * A + 3 * F; } function f(F, A) { return 3 * A - 6 * F; } function v(F) { return 3 * F; } function m(F, A, T) { return ((h(A, T) * F + f(A, T)) * F + v(A)) * F; } function g(F, A, T) { return 3 * h(A, T) * F * F + 2 * f(A, T) * F + v(A); } function b(F, A) { for (var T = 0; T < o; ++T) { var R = g(A, e, n); if (R === 0) return A; var M = m(A, e, n) - F; A -= M / R; } return A; } function x() { for (var F = 0; F < l; ++F) p[F] = m(F * u, e, n); } function w(F, A, T) { var R, M, j = 0; do M = A + (T - A) / 2, R = m(M, e, n) - F, R > 0 ? T = M : A = M; while (Math.abs(R) > i && ++j < s); return M; } function k(F) { for (var A = 0, T = 1, R = l - 1; T !== R && p[T] <= F; ++T) A += u; --T; var M = (F - p[T]) / (p[T + 1] - p[T]), j = A + M * u, P = g(j, e, n); return P >= a ? b(F, j) : P === 0 ? j : w(F, A, A + u); } var C = !1; function _() { C = !0, (e !== t || n !== r) && x(); } var $ = function(F) { return C || _(), e === t && n === r ? F : F === 0 ? 0 : F === 1 ? 1 : m(k(F), t, r); }; $.getControlPoints = function() { return [{ x: e, y: t }, { x: n, y: r }]; }; var O = "generateBezier(" + [e, t, n, r] + ")"; return $.toString = function() { return O; }, $; } /*! Runge-Kutta spring physics function generator. Adapted from Framer.js, copyright Koen Bok. MIT License: http://en.wikipedia.org/wiki/MIT_License */ var Xwe = /* @__PURE__ */ function() { function e(r) { return -r.tension * r.x - r.friction * r.v; } function t(r, o, a) { var i = { x: r.x + a.dx * o, v: r.v + a.dv * o, tension: r.tension, friction: r.friction }; return { dx: i.v, dv: e(i) }; } function n(r, o) { var a = { dx: r.v, dv: e(r) }, i = t(r, o * 0.5, a), s = t(r, o * 0.5, i), l = t(r, o, s), u = 1 / 6 * (a.dx + 2 * (i.dx + s.dx) + l.dx), c = 1 / 6 * (a.dv + 2 * (i.dv + s.dv) + l.dv); return r.x = r.x + u * o, r.v = r.v + c * o, r; } return function r(o, a, i) { var s = { x: -1, v: 0, tension: null, friction: null }, l = [0], u = 0, c = 1 / 1e4, d = 16 / 1e3, p, h, f; for (o = parseFloat(o) || 500, a = parseFloat(a) || 20, i = i || null, s.tension = o, s.friction = a, p = i !== null, p ? (u = r(o, a), h = u / i * d) : h = d; f = n(f || s, h), l.push(1 + f.x), u += 16, Math.abs(f.x) > c && Math.abs(f.v) > c; ) ; return p ? function(v) { return l[v * (l.length - 1) | 0]; } : u; }; }(), yn = function(e, t, n, r) { var o = Ywe(e, t, n, r); return function(a, i, s) { return a + (i - a) * o(s); }; }, Xv = { linear: function(e, t, n) { return e + (t - e) * n; }, // default easings ease: yn(0.25, 0.1, 0.25, 1), "ease-in": yn(0.42, 0, 1, 1), "ease-out": yn(0, 0, 0.58, 1), "ease-in-out": yn(0.42, 0, 0.58, 1), // sine "ease-in-sine": yn(0.47, 0, 0.745, 0.715), "ease-out-sine": yn(0.39, 0.575, 0.565, 1), "ease-in-out-sine": yn(0.445, 0.05, 0.55, 0.95), // quad "ease-in-quad": yn(0.55, 0.085, 0.68, 0.53), "ease-out-quad": yn(0.25, 0.46, 0.45, 0.94), "ease-in-out-quad": yn(0.455, 0.03, 0.515, 0.955), // cubic "ease-in-cubic": yn(0.55, 0.055, 0.675, 0.19), "ease-out-cubic": yn(0.215, 0.61, 0.355, 1), "ease-in-out-cubic": yn(0.645, 0.045, 0.355, 1), // quart "ease-in-quart": yn(0.895, 0.03, 0.685, 0.22), "ease-out-quart": yn(0.165, 0.84, 0.44, 1), "ease-in-out-quart": yn(0.77, 0, 0.175, 1), // quint "ease-in-quint": yn(0.755, 0.05, 0.855, 0.06), "ease-out-quint": yn(0.23, 1, 0.32, 1), "ease-in-out-quint": yn(0.86, 0, 0.07, 1), // expo "ease-in-expo": yn(0.95, 0.05, 0.795, 0.035), "ease-out-expo": yn(0.19, 1, 0.22, 1), "ease-in-out-expo": yn(1, 0, 0, 1), // circ "ease-in-circ": yn(0.6, 0.04, 0.98, 0.335), "ease-out-circ": yn(0.075, 0.82, 0.165, 1), "ease-in-out-circ": yn(0.785, 0.135, 0.15, 0.86), // user param easings... spring: function(e, t, n) { if (n === 0) return Xv.linear; var r = Xwe(e, t, n); return function(o, a, i) { return o + (a - o) * r(i); }; }, "cubic-bezier": yn }; function vF(e, t, n, r, o) { if (r === 1 || t === n) return n; var a = o(t, n, r); return e == null || ((e.roundValue || e.color) && (a = Math.round(a)), e.min !== void 0 && (a = Math.max(a, e.min)), e.max !== void 0 && (a = Math.min(a, e.max))), a; } function gF(e, t) { return e.pfValue != null || e.value != null ? e.pfValue != null && (t == null || t.type.units !== "%") ? e.pfValue : e.value : e; } function ac(e, t, n, r, o) { var a = o != null ? o.type : null; n < 0 ? n = 0 : n > 1 && (n = 1); var i = gF(e, o), s = gF(t, o); if (Ze(i) && Ze(s)) return vF(a, i, s, n, r); if (dn(i) && dn(s)) { for (var l = [], u = 0; u < s.length; u++) { var c = i[u], d = s[u]; if (c != null && d != null) { var p = vF(a, c, d, n, r); l.push(p); } else l.push(d); } return l; } } function Zwe(e, t, n, r) { var o = !r, a = e._private, i = t._private, s = i.easing, l = i.startTime, u = r ? e : e.cy(), c = u.style(); if (!i.easingImpl) if (s == null) i.easingImpl = Xv.linear; else { var d; if (gt(s)) { var p = c.parse("transition-timing-function", s); d = p.value; } else d = s; var h, f; gt(d) ? (h = d, f = []) : (h = d[1], f = d.slice(2).map(function(G) { return +G; })), f.length > 0 ? (h === "spring" && f.push(i.duration), i.easingImpl = Xv[h].apply(null, f)) : i.easingImpl = Xv[h]; } var v = i.easingImpl, m; if (i.duration === 0 ? m = 1 : m = (n - l) / i.duration, i.applying && (m = i.progress), m < 0 ? m = 0 : m > 1 && (m = 1), i.delay == null) { var g = i.startPosition, b = i.position; if (b && o && !e.locked()) { var x = {}; rp(g.x, b.x) && (x.x = ac(g.x, b.x, m, v)), rp(g.y, b.y) && (x.y = ac(g.y, b.y, m, v)), e.position(x); } var w = i.startPan, k = i.pan, C = a.pan, _ = k != null && r; _ && (rp(w.x, k.x) && (C.x = ac(w.x, k.x, m, v)), rp(w.y, k.y) && (C.y = ac(w.y, k.y, m, v)), e.emit("pan")); var $ = i.startZoom, O = i.zoom, F = O != null && r; F && (rp($, O) && (a.zoom = uf(a.minZoom, ac($, O, m, v), a.maxZoom)), e.emit("zoom")), (_ || F) && e.emit("viewport"); var A = i.style; if (A && A.length > 0 && o) { for (var T = 0; T < A.length; T++) { var R = A[T], M = R.name, j = R, P = i.startStyle[M], V = c.properties[P.name], U = ac(P, j, m, v, V); c.overrideBypass(e, M, U); } e.emit("style"); } } return i.progress = m, m; } function rp(e, t) { return e == null || t == null ? !1 : Ze(e) && Ze(t) ? !0 : !!(e && t); } function Jwe(e, t, n, r) { var o = t._private; o.started = !0, o.startTime = n - o.progress * o.duration; } function mF(e, t) { var n = t._private.aniEles, r = []; function o(c, d) { var p = c._private, h = p.animation.current, f = p.animation.queue, v = !1; if (h.length === 0) { var m = f.shift(); m && h.push(m); } for (var g = function(k) { for (var C = k.length - 1; C >= 0; C--) { var _ = k[C]; _(); } k.splice(0, k.length); }, b = h.length - 1; b >= 0; b--) { var x = h[b], w = x._private; if (w.stopped) { h.splice(b, 1), w.hooked = !1, w.playing = !1, w.started = !1, g(w.frames); continue; } !w.playing && !w.applying || (w.playing && w.applying && (w.applying = !1), w.started || Jwe(c, x, e), Zwe(c, x, e, d), w.applying && (w.applying = !1), g(w.frames), w.step != null && w.step(e), x.completed() && (h.splice(b, 1), w.hooked = !1, w.playing = !1, w.started = !1, g(w.completes)), v = !0); } return !d && h.length === 0 && f.length === 0 && r.push(c), v; } for (var a = !1, i = 0; i < n.length; i++) { var s = n[i], l = o(s); a = a || l; } var u = o(t, !0); (a || u) && (n.length > 0 ? t.notify("draw", n) : t.notify("draw")), n.unmerge(r), t.emit("step"); } var Qwe = { // pull in animation functions animate: an.animate(), animation: an.animation(), animated: an.animated(), clearQueue: an.clearQueue(), delay: an.delay(), delayAnimation: an.delayAnimation(), stop: an.stop(), addToAnimationPool: function(e) { var t = this; t.styleEnabled() && t._private.aniEles.merge(e); }, stopAnimationLoop: function() { this._private.animationsRunning = !1; }, startAnimationLoop: function() { var e = this; if (e._private.animationsRunning = !0, !e.styleEnabled()) return; function t() { e._private.animationsRunning && Bg(function(r) { mF(r, e), t(); }); } var n = e.renderer(); n && n.beforeRender ? n.beforeRender(function(r, o) { mF(o, e); }, n.beforeRenderPriorities.animations) : t(); } }, e2e = { qualifierCompare: function(e, t) { return e == null || t == null ? e == null && t == null : e.sameText(t); }, eventMatches: function(e, t, n) { var r = t.qualifier; return r != null ? e !== n.target && th(n.target) && r.matches(n.target) : !0; }, addEventFields: function(e, t) { t.cy = e, t.target = e; }, callbackContext: function(e, t, n) { return t.qualifier != null ? n.target : e; } }, dv = function(e) { return gt(e) ? new il(e) : e; }, kz = { createEmitter: function() { var e = this._private; return e.emitter || (e.emitter = new xm(e2e, this)), this; }, emitter: function() { return this._private.emitter; }, on: function(e, t, n) { return this.emitter().on(e, dv(t), n), this; }, removeListener: function(e, t, n) { return this.emitter().removeListener(e, dv(t), n), this; }, removeAllListeners: function() { return this.emitter().removeAllListeners(), this; }, one: function(e, t, n) { return this.emitter().one(e, dv(t), n), this; }, once: function(e, t, n) { return this.emitter().one(e, dv(t), n), this; }, emit: function(e, t) { return this.emitter().emit(e, t), this; }, emitAndNotify: function(e, t) { return this.emit(e), this.notify(e, t), this; } }; an.eventAliasesOn(kz); var GC = { png: function(e) { var t = this._private.renderer; return e = e || {}, t.png(e); }, jpg: function(e) { var t = this._private.renderer; return e = e || {}, e.bg = e.bg || "#fff", t.jpg(e); } }; GC.jpeg = GC.jpg; var Zv = { layout: function(e) { var t = this; if (e == null) { Un("Layout options must be specified to make a layout"); return; } if (e.name == null) { Un("A `name` must be specified to make a layout"); return; } var n = e.name, r = t.extension("layout", n); if (r == null) { Un("No such layout `" + n + "` found. Did you forget to import it and `cytoscape.use()` it?"); return; } var o; gt(e.eles) ? o = t.$(e.eles) : o = e.eles != null ? e.eles : t.$(); var a = new r(_t({}, e, { cy: t, eles: o })); return a; } }; Zv.createLayout = Zv.makeLayout = Zv.layout; var t2e = { notify: function(e, t) { var n = this._private; if (this.batching()) { n.batchNotifications = n.batchNotifications || {}; var r = n.batchNotifications[e] = n.batchNotifications[e] || this.collection(); t != null && r.merge(t); return; } if (n.notificationsEnabled) { var o = this.renderer(); this.destroyed() || !o || o.notify(e, t); } }, notifications: function(e) { var t = this._private; return e === void 0 ? t.notificationsEnabled : (t.notificationsEnabled = !!e, this); }, noNotifications: function(e) { this.notifications(!1), e(), this.notifications(!0); }, batching: function() { return this._private.batchCount > 0; }, startBatch: function() { var e = this._private; return e.batchCount == null && (e.batchCount = 0), e.batchCount === 0 && (e.batchStyleEles = this.collection(), e.batchNotifications = {}), e.batchCount++, this; }, endBatch: function() { var e = this._private; if (e.batchCount === 0) return this; if (e.batchCount--, e.batchCount === 0) { e.batchStyleEles.updateStyle(); var t = this.renderer(); Object.keys(e.batchNotifications).forEach(function(n) { var r = e.batchNotifications[n]; r.empty() ? t.notify(n) : t.notify(n, r); }); } return this; }, batch: function(e) { return this.startBatch(), e(), this.endBatch(), this; }, // for backwards compatibility batchData: function(e) { var t = this; return this.batch(function() { for (var n = Object.keys(e), r = 0; r < n.length; r++) { var o = n[r], a = e[o], i = t.getElementById(o); i.data(a); } }); } }, n2e = Br({ hideEdgesOnViewport: !1, textureOnViewport: !1, motionBlur: !1, motionBlurOpacity: 0.05, pixelRatio: void 0, desktopTapThreshold: 4, touchTapThreshold: 8, wheelSensitivity: 1, debug: !1, showFps: !1 }), WC = { renderTo: function(e, t, n, r) { var o = this._private.renderer; return o.renderTo(e, t, n, r), this; }, renderer: function() { return this._private.renderer; }, forceRender: function() { return this.notify("draw"), this; }, resize: function() { return this.invalidateSize(), this.emitAndNotify("resize"), this; }, initRenderer: function(e) { var t = this, n = t.extension("renderer", e.name); if (n == null) { Un("Can not initialise: No such renderer `".concat(e.name, "` found. Did you forget to import it and `cytoscape.use()` it?")); return; } e.wheelSensitivity !== void 0 && sn("You have set a custom wheel sensitivity. This will make your app zoom unnaturally when using mainstream mice. You should change this value from the default only if you can guarantee that all your users will use the same hardware and OS configuration as your current machine."); var r = n2e(e); r.cy = t, t._private.renderer = new n(r), this.notify("init"); }, destroyRenderer: function() { var e = this; e.notify("destroy"); var t = e.container(); if (t) for (t._cyreg = null; t.childNodes.length > 0; ) t.removeChild(t.childNodes[0]); e._private.renderer = null, e.mutableElements().forEach(function(n) { var r = n._private; r.rscratch = {}, r.rstyle = {}, r.animation.current = [], r.animation.queue = []; }); }, onRender: function(e) { return this.on("render", e); }, offRender: function(e) { return this.off("render", e); } }; WC.invalidateDimensions = WC.resize; var Jv = { // get a collection // - empty collection on no args // - collection of elements in the graph on selector arg // - guarantee a returned collection when elements or collection specified collection: function(e, t) { return gt(e) ? this.$(e) : Mo(e) ? e.collection() : dn(e) ? (t || (t = {}), new Rr(this, e, t.unique, t.removed)) : new Rr(this); }, nodes: function(e) { var t = this.$(function(n) { return n.isNode(); }); return e ? t.filter(e) : t; }, edges: function(e) { var t = this.$(function(n) { return n.isEdge(); }); return e ? t.filter(e) : t; }, // search the graph like jQuery $: function(e) { var t = this._private.elements; return e ? t.filter(e) : t.spawnSelf(); }, mutableElements: function() { return this._private.elements; } }; Jv.elements = Jv.filter = Jv.$; var Jr = {}, Ip = "t", r2e = "f"; Jr.apply = function(e) { for (var t = this, n = t._private, r = n.cy, o = r.collection(), a = 0; a < e.length; a++) { var i = e[a], s = t.getContextMeta(i); if (!s.empty) { var l = t.getContextStyle(s), u = t.applyContextStyle(s, l, i); i._private.appliedInitStyle ? t.updateTransitions(i, u.diffProps) : i._private.appliedInitStyle = !0; var c = t.updateStyleHints(i); c && o.push(i); } } return o; }; Jr.getPropertiesDiff = function(e, t) { var n = this, r = n._private.propDiffs = n._private.propDiffs || {}, o = e + "-" + t, a = r[o]; if (a) return a; for (var i = [], s = {}, l = 0; l < n.length; l++) { var u = n[l], c = e[l] === Ip, d = t[l] === Ip, p = c !== d, h = u.mappedProperties.length > 0; if (p || d && h) { var f = void 0; p && h || p ? f = u.properties : h && (f = u.mappedProperties); for (var v = 0; v < f.length; v++) { for (var m = f[v], g = m.name, b = !1, x = l + 1; x < n.length; x++) { var w = n[x], k = t[x] === Ip; if (k && (b = w.properties[m.name] != null, b)) break; } !s[g] && !b && (s[g] = !0, i.push(g)); } } } return r[o] = i, i; }; Jr.getContextMeta = function(e) { for (var t = this, n = "", r, o = e._private.styleCxtKey || "", a = 0; a < t.length; a++) { var i = t[a], s = i.selector && i.selector.matches(e); s ? n += Ip : n += r2e; } return r = t.getPropertiesDiff(o, n), e._private.styleCxtKey = n, { key: n, diffPropNames: r, empty: r.length === 0 }; }; Jr.getContextStyle = function(e) { var t = e.key, n = this, r = this._private.contextStyles = this._private.contextStyles || {}; if (r[t]) return r[t]; for (var o = { _private: { key: t } }, a = 0; a < n.length; a++) { var i = n[a], s = t[a] === Ip; if (s) for (var l = 0; l < i.properties.length; l++) { var u = i.properties[l]; o[u.name] = u; } } return r[t] = o, o; }; Jr.applyContextStyle = function(e, t, n) { for (var r = this, o = e.diffPropNames, a = {}, i = r.types, s = 0; s < o.length; s++) { var l = o[s], u = t[l], c = n.pstyle(l); if (!u) if (c) c.bypass ? u = { name: l, deleteBypassed: !0 } : u = { name: l, delete: !0 }; else continue; if (c !== u) { if (u.mapped === i.fn && c != null && c.mapping != null && c.mapping.value === u.value) { var d = c.mapping, p = d.fnValue = u.value(n); if (p === d.prevFnValue) continue; } var h = a[l] = { prev: c }; r.applyParsedProperty(n, u), h.next = n.pstyle(l), h.next && h.next.bypass && (h.next = h.next.bypassed); } } return { diffProps: a }; }; Jr.updateStyleHints = function(e) { var t = e._private, n = this, r = n.propertyGroupNames, o = n.propertyGroupKeys, a = function(pe, ke, Ne) { return n.getPropertiesHash(pe, ke, Ne); }, i = t.styleKey; if (e.removed()) return !1; var s = t.group === "nodes", l = e._private.style; r = Object.keys(l); for (var u = 0; u < o.length; u++) { var c = o[u]; t.styleKeys[c] = [wc, yp]; } for (var d = function(pe, ke) { return t.styleKeys[ke][0] = af(pe, t.styleKeys[ke][0]); }, p = function(pe, ke) { return t.styleKeys[ke][1] = sf(pe, t.styleKeys[ke][1]); }, h = function(pe, ke) { d(pe, ke), p(pe, ke); }, f = function(pe, ke) { for (var Ne = 0; Ne < pe.length; Ne++) { var De = pe.charCodeAt(Ne); d(De, ke), p(De, ke); } }, v = 2e9, m = function(pe) { return -128 < pe && pe < 128 && Math.floor(pe) !== pe ? v - (pe * 1024 | 0) : pe; }, g = 0; g < r.length; g++) { var b = r[g], x = l[b]; if (x != null) { var w = this.properties[b], k = w.type, C = w.groupKey, _ = void 0; w.hashOverride != null ? _ = w.hashOverride(e, x) : x.pfValue != null && (_ = x.pfValue); var $ = w.enums == null ? x.value : null, O = _ != null, F = $ != null, A = O || F, T = x.units; if (k.number && A && !k.multiple) { var R = O ? _ : $; h(m(R), C), !O && T != null && f(T, C); } else f(x.strValue, C); } } for (var M = [wc, yp], j = 0; j < o.length; j++) { var P = o[j], V = t.styleKeys[P]; M[0] = af(V[0], M[0]), M[1] = sf(V[1], M[1]); } t.styleKey = lme(M[0], M[1]); var U = t.styleKeys; t.labelDimsKey = _s(U.labelDimensions); var G = a(e, ["label"], U.labelDimensions); if (t.labelKey = _s(G), t.labelStyleKey = _s(nv(U.commonLabel, G)), !s) { var se = a(e, ["source-label"], U.labelDimensions); t.sourceLabelKey = _s(se), t.sourceLabelStyleKey = _s(nv(U.commonLabel, se)); var ae = a(e, ["target-label"], U.labelDimensions); t.targetLabelKey = _s(ae), t.targetLabelStyleKey = _s(nv(U.commonLabel, ae)); } if (s) { var de = t.styleKeys, me = de.nodeBody, te = de.nodeBorder, oe = de.nodeOutline, ne = de.backgroundImage, ee = de.compound, Z = de.pie, le = [me, te, oe, ne, ee, Z].filter(function(pe) { return pe != null; }).reduce(nv, [wc, yp]); t.nodeKey = _s(le), t.hasPie = Z != null && Z[0] !== wc && Z[1] !== yp; } return i !== t.styleKey; }; Jr.clearStyleHints = function(e) { var t = e._private; t.styleCxtKey = "", t.styleKeys = {}, t.styleKey = null, t.labelKey = null, t.labelStyleKey = null, t.sourceLabelKey = null, t.sourceLabelStyleKey = null, t.targetLabelKey = null, t.targetLabelStyleKey = null, t.nodeKey = null, t.hasPie = null; }; Jr.applyParsedProperty = function(e, t) { var n = this, r = t, o = e._private.style, a, i = n.types, s = n.properties[r.name].type, l = r.bypass, u = o[r.name], c = u && u.bypass, d = e._private, p = "mapping", h = function(de) { return de == null ? null : de.pfValue != null ? de.pfValue : de.value; }, f = function() { var de = h(u), me = h(r); n.checkTriggers(e, r.name, de, me); }; if (t.name === "curve-style" && e.isEdge() && // loops must be bundled beziers (t.value !== "bezier" && e.isLoop() || // edges connected to compound nodes can not be haystacks t.value === "haystack" && (e.source().isParent() || e.target().isParent())) && (r = t = this.parse(t.name, "bezier", l)), r.delete) return o[r.name] = void 0, f(), !0; if (r.deleteBypassed) return u ? u.bypass ? (u.bypassed = void 0, f(), !0) : !1 : (f(), !0); if (r.deleteBypass) return u ? u.bypass ? (o[r.name] = u.bypassed, f(), !0) : !1 : (f(), !0); var v = function() { sn("Do not assign mappings to elements without corresponding data (i.e. ele `" + e.id() + "` has no mapping for property `" + r.name + "` with data field `" + r.field + "`); try a `[" + r.field + "]` selector to limit scope to elements with `" + r.field + "` defined"); }; switch (r.mapped) { case i.mapData: { for (var m = r.field.split("."), g = d.data, b = 0; b < m.length && g; b++) { var x = m[b]; g = g[x]; } if (g == null) return v(), !1; var w; if (Ze(g)) { var k = r.fieldMax - r.fieldMin; k === 0 ? w = 0 : w = (g - r.fieldMin) / k; } else return sn("Do not use continuous mappers without specifying numeric data (i.e. `" + r.field + ": " + g + "` for `" + e.id() + "` is non-numeric)"), !1; if (w < 0 ? w = 0 : w > 1 && (w = 1), s.color) { var C = r.valueMin[0], _ = r.valueMax[0], $ = r.valueMin[1], O = r.valueMax[1], F = r.valueMin[2], A = r.valueMax[2], T = r.valueMin[3] == null ? 1 : r.valueMin[3], R = r.valueMax[3] == null ? 1 : r.valueMax[3], M = [Math.round(C + (_ - C) * w), Math.round($ + (O - $) * w), Math.round(F + (A - F) * w), Math.round(T + (R - T) * w)]; a = { // colours are simple, so just create the flat property instead of expensive string parsing bypass: r.bypass, // we're a bypass if the mapping property is a bypass name: r.name, value: M, strValue: "rgb(" + M[0] + ", " + M[1] + ", " + M[2] + ")" }; } else if (s.number) { var j = r.valueMin + (r.valueMax - r.valueMin) * w; a = this.parse(r.name, j, r.bypass, p); } else return !1; if (!a) return v(), !1; a.mapping = r, r = a; break; } case i.data: { for (var P = r.field.split("."), V = d.data, U = 0; U < P.length && V; U++) { var G = P[U]; V = V[G]; } if (V != null && (a = this.parse(r.name, V, r.bypass, p)), !a) return v(), !1; a.mapping = r, r = a; break; } case i.fn: { var se = r.value, ae = r.fnValue != null ? r.fnValue : se(e); if (r.prevFnValue = ae, ae == null) return sn("Custom function mappers may not return null (i.e. `" + r.name + "` for ele `" + e.id() + "` is null)"), !1; if (a = this.parse(r.name, ae, r.bypass, p), !a) return sn("Custom function mappers may not return invalid values for the property type (i.e. `" + r.name + "` for ele `" + e.id() + "` is invalid)"), !1; a.mapping = ai(r), r = a; break; } case void 0: break; default: return !1; } return l ? (c ? r.bypassed = u.bypassed : r.bypassed = u, o[r.name] = r) : c ? u.bypassed = r : o[r.name] = r, f(), !0; }; Jr.cleanElements = function(e, t) { for (var n = 0; n < e.length; n++) { var r = e[n]; if (this.clearStyleHints(r), r.dirtyCompoundBoundsCache(), r.dirtyBoundingBoxCache(), !t) r._private.style = {}; else for (var o = r._private.style, a = Object.keys(o), i = 0; i < a.length; i++) { var s = a[i], l = o[s]; l != null && (l.bypass ? l.bypassed = null : o[s] = null); } } }; Jr.update = function() { var e = this._private.cy, t = e.mutableElements(); t.updateStyle(); }; Jr.updateTransitions = function(e, t) { var n = this, r = e._private, o = e.pstyle("transition-property").value, a = e.pstyle("transition-duration").pfValue, i = e.pstyle("transition-delay").pfValue; if (o.length > 0 && a > 0) { for (var s = {}, l = !1, u = 0; u < o.length; u++) { var c = o[u], d = e.pstyle(c), p = t[c]; if (p) { var h = p.prev, f = h, v = p.next != null ? p.next : d, m = !1, g = void 0, b = 1e-6; f && (Ze(f.pfValue) && Ze(v.pfValue) ? (m = v.pfValue - f.pfValue, g = f.pfValue + b * m) : Ze(f.value) && Ze(v.value) ? (m = v.value - f.value, g = f.value + b * m) : dn(f.value) && dn(v.value) && (m = f.value[0] !== v.value[0] || f.value[1] !== v.value[1] || f.value[2] !== v.value[2], g = f.strValue), m && (s[c] = v.strValue, this.applyBypass(e, c, g), l = !0)); } } if (!l) return; r.transitioning = !0, new md(function(x) { i > 0 ? e.delayAnimation(i).play().promise().then(x) : x(); }).then(function() { return e.animation({ style: s, duration: a, easing: e.pstyle("transition-timing-function").value, queue: !1 }).play().promise(); }).then(function() { n.removeBypasses(e, o), e.emitAndNotify("style"), r.transitioning = !1; }); } else r.transitioning && (this.removeBypasses(e, o), e.emitAndNotify("style"), r.transitioning = !1); }; Jr.checkTrigger = function(e, t, n, r, o, a) { var i = this.properties[t], s = o(i); s != null && s(n, r) && a(i); }; Jr.checkZOrderTrigger = function(e, t, n, r) { var o = this; this.checkTrigger(e, t, n, r, function(a) { return a.triggersZOrder; }, function() { o._private.cy.notify("zorder", e); }); }; Jr.checkBoundsTrigger = function(e, t, n, r) { this.checkTrigger(e, t, n, r, function(o) { return o.triggersBounds; }, function(o) { e.dirtyCompoundBoundsCache(), e.dirtyBoundingBoxCache(), // only for beziers -- so performance of other edges isn't affected o.triggersBoundsOfParallelBeziers && t === "curve-style" && (n === "bezier" || r === "bezier") && e.parallelEdges().forEach(function(a) { a.isBundledBezier() && a.dirtyBoundingBoxCache(); }), o.triggersBoundsOfConnectedEdges && t === "display" && (n === "none" || r === "none") && e.connectedEdges().forEach(function(a) { a.dirtyBoundingBoxCache(); }); }); }; Jr.checkTriggers = function(e, t, n, r) { e.dirtyStyleCache(), this.checkZOrderTrigger(e, t, n, r), this.checkBoundsTrigger(e, t, n, r); }; var ah = {}; ah.applyBypass = function(e, t, n, r) { var o = this, a = [], i = !0; if (t === "*" || t === "**") { if (n !== void 0) for (var s = 0; s < o.properties.length; s++) { var l = o.properties[s], u = l.name, c = this.parse(u, n, !0); c && a.push(c); } } else if (gt(t)) { var d = this.parse(t, n, !0); d && a.push(d); } else if (Xt(t)) { var p = t; r = n; for (var h = Object.keys(p), f = 0; f < h.length; f++) { var v = h[f], m = p[v]; if (m === void 0 && (m = p[dm(v)]), m !== void 0) { var g = this.parse(v, m, !0); g && a.push(g); } } } else return !1; if (a.length === 0) return !1; for (var b = !1, x = 0; x < e.length; x++) { for (var w = e[x], k = {}, C = void 0, _ = 0; _ < a.length; _++) { var $ = a[_]; if (r) { var O = w.pstyle($.name); C = k[$.name] = { prev: O }; } b = this.applyParsedProperty(w, ai($)) || b, r && (C.next = w.pstyle($.name)); } b && this.updateStyleHints(w), r && this.updateTransitions(w, k, i); } return b; }; ah.overrideBypass = function(e, t, n) { t = f$(t); for (var r = 0; r < e.length; r++) { var o = e[r], a = o._private.style[t], i = this.properties[t].type, s = i.color, l = i.mutiple, u = a ? a.pfValue != null ? a.pfValue : a.value : null; !a || !a.bypass ? this.applyBypass(o, t, n) : (a.value = n, a.pfValue != null && (a.pfValue = n), s ? a.strValue = "rgb(" + n.join(",") + ")" : l ? a.strValue = n.join(" ") : a.strValue = "" + n, this.updateStyleHints(o)), this.checkTriggers(o, t, u, n); } }; ah.removeAllBypasses = function(e, t) { return this.removeBypasses(e, this.propertyNames, t); }; ah.removeBypasses = function(e, t, n) { for (var r = !0, o = 0; o < e.length; o++) { for (var a = e[o], i = {}, s = 0; s < t.length; s++) { var l = t[s], u = this.properties[l], c = a.pstyle(u.name); if (!(!c || !c.bypass)) { var d = "", p = this.parse(l, d, !0), h = i[u.name] = { prev: c }; this.applyParsedProperty(a, p), h.next = a.pstyle(u.name); } } this.updateStyleHints(a), n && this.updateTransitions(a, i, r); } }; var E$ = {}; E$.getEmSizeInPixels = function() { var e = this.containerCss("font-size"); return e != null ? parseFloat(e) : 1; }; E$.containerCss = function(e) { var t = this._private.cy, n = t.container(), r = t.window(); if (r && n && r.getComputedStyle) return r.getComputedStyle(n).getPropertyValue(e); }; var yi = {}; yi.getRenderedStyle = function(e, t) { return t ? this.getStylePropertyValue(e, t, !0) : this.getRawStyle(e, !0); }; yi.getRawStyle = function(e, t) { var n = this; if (e = e[0], e) { for (var r = {}, o = 0; o < n.properties.length; o++) { var a = n.properties[o], i = n.getStylePropertyValue(e, a.name, t); i != null && (r[a.name] = i, r[dm(a.name)] = i); } return r; } }; yi.getIndexedStyle = function(e, t, n, r) { var o = e.pstyle(t)[n][r]; return o ?? e.cy().style().getDefaultProperty(t)[n][0]; }; yi.getStylePropertyValue = function(e, t, n) { var r = this; if (e = e[0], e) { var o = r.properties[t]; o.alias && (o = o.pointsTo); var a = o.type, i = e.pstyle(o.name); if (i) { var s = i.value, l = i.units, u = i.strValue; if (n && a.number && s != null && Ze(s)) { var c = e.cy().zoom(), d = function(v) { return v * c; }, p = function(v, m) { return d(v) + m; }, h = dn(s), f = h ? l.every(function(v) { return v != null; }) : l != null; return f ? h ? s.map(function(v, m) { return p(v, l[m]); }).join(" ") : p(s, l) : h ? s.map(function(v) { return gt(v) ? v : "" + d(v); }).join(" ") : "" + d(s); } else if (u != null) return u; } return null; } }; yi.getAnimationStartStyle = function(e, t) { for (var n = {}, r = 0; r < t.length; r++) { var o = t[r], a = o.name, i = e.pstyle(a); i !== void 0 && (Xt(i) ? i = this.parse(a, i.strValue) : i = this.parse(a, i)), i && (n[a] = i); } return n; }; yi.getPropsList = function(e) { var t = this, n = [], r = e, o = t.properties; if (r) for (var a = Object.keys(r), i = 0; i < a.length; i++) { var s = a[i], l = r[s], u = o[s] || o[f$(s)], c = this.parse(u.name, l); c && n.push(c); } return n; }; yi.getNonDefaultPropertiesHash = function(e, t, n) { var r = n.slice(), o, a, i, s, l, u; for (l = 0; l < t.length; l++) if (o = t[l], a = e.pstyle(o, !1), a != null) if (a.pfValue != null) r[0] = af(s, r[0]), r[1] = sf(s, r[1]); else for (i = a.strValue, u = 0; u < i.length; u++) s = i.charCodeAt(u), r[0] = af(s, r[0]), r[1] = sf(s, r[1]); return r; }; yi.getPropertiesHash = yi.getNonDefaultPropertiesHash; var _m = {}; _m.appendFromJson = function(e) { for (var t = this, n = 0; n < e.length; n++) { var r = e[n], o = r.selector, a = r.style || r.css, i = Object.keys(a); t.selector(o); for (var s = 0; s < i.length; s++) { var l = i[s], u = a[l]; t.css(l, u); } } return t; }; _m.fromJson = function(e) { var t = this; return t.resetToDefault(), t.appendFromJson(e), t; }; _m.json = function() { for (var e = [], t = this.defaultLength; t < this.length; t++) { for (var n = this[t], r = n.selector, o = n.properties, a = {}, i = 0; i < o.length; i++) { var s = o[i]; a[s.name] = s.strValue; } e.push({ selector: r ? r.toString() : "core", style: a }); } return e; }; var O$ = {}; O$.appendFromString = function(e) { var t = this, n = this, r = "" + e, o, a, i; r = r.replace(/[/][*](\s|.)+?[*][/]/g, ""); function s() { r.length > o.length ? r = r.substr(o.length) : r = ""; } function l() { a.length > i.length ? a = a.substr(i.length) : a = ""; } for (; ; ) { var u = r.match(/^\s*$/); if (u) break; var c = r.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/); if (!c) { sn("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: " + r); break; } o = c[0]; var d = c[1]; if (d !== "core") { var p = new il(d); if (p.invalid) { sn("Skipping parsing of block: Invalid selector found in string stylesheet: " + d), s(); continue; } } var h = c[2], f = !1; a = h; for (var v = []; ; ) { var m = a.match(/^\s*$/); if (m) break; var g = a.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/); if (!g) { sn("Skipping parsing of block: Invalid formatting of style property and value definitions found in:" + h), f = !0; break; } i = g[0]; var b = g[1], x = g[2], w = t.properties[b]; if (!w) { sn("Skipping property: Invalid property name in: " + i), l(); continue; } var k = n.parse(b, x); if (!k) { sn("Skipping property: Invalid property definition in: " + i), l(); continue; } v.push({ name: b, val: x }), l(); } if (f) { s(); break; } n.selector(d); for (var C = 0; C < v.length; C++) { var _ = v[C]; n.css(_.name, _.val); } s(); } return n; }; O$.fromString = function(e) { var t = this; return t.resetToDefault(), t.appendFromString(e), t; }; var Sr = {}; (function() { var e = lr, t = d0e, n = f0e, r = h0e, o = v0e, a = function(Z) { return "^" + Z + "\\s*\\(\\s*([\\w\\.]+)\\s*\\)$"; }, i = function(Z) { var le = e + "|\\w+|" + t + "|" + n + "|" + r + "|" + o; return "^" + Z + "\\s*\\(([\\w\\.]+)\\s*\\,\\s*(" + e + ")\\s*\\,\\s*(" + e + ")\\s*,\\s*(" + le + ")\\s*\\,\\s*(" + le + ")\\)$"; }, s = [`^url\\s*\\(\\s*['"]?(.+?)['"]?\\s*\\)$`, "^(none)$", "^(.+)$"]; Sr.types = { time: { number: !0, min: 0, units: "s|ms", implicitUnits: "ms" }, percent: { number: !0, min: 0, max: 100, units: "%", implicitUnits: "%" }, percentages: { number: !0, min: 0, max: 100, units: "%", implicitUnits: "%", multiple: !0 }, zeroOneNumber: { number: !0, min: 0, max: 1, unitless: !0 }, zeroOneNumbers: { number: !0, min: 0, max: 1, unitless: !0, multiple: !0 }, nOneOneNumber: { number: !0, min: -1, max: 1, unitless: !0 }, nonNegativeInt: { number: !0, min: 0, integer: !0, unitless: !0 }, nonNegativeNumber: { number: !0, min: 0, unitless: !0 }, position: { enums: ["parent", "origin"] }, nodeSize: { number: !0, min: 0, enums: ["label"] }, number: { number: !0, unitless: !0 }, numbers: { number: !0, unitless: !0, multiple: !0 }, positiveNumber: { number: !0, unitless: !0, min: 0, strictMin: !0 }, size: { number: !0, min: 0 }, bidirectionalSize: { number: !0 }, // allows negative bidirectionalSizeMaybePercent: { number: !0, allowPercent: !0 }, // allows negative bidirectionalSizes: { number: !0, multiple: !0 }, // allows negative sizeMaybePercent: { number: !0, min: 0, allowPercent: !0 }, axisDirection: { enums: ["horizontal", "leftward", "rightward", "vertical", "upward", "downward", "auto"] }, paddingRelativeTo: { enums: ["width", "height", "average", "min", "max"] }, bgWH: { number: !0, min: 0, allowPercent: !0, enums: ["auto"], multiple: !0 }, bgPos: { number: !0, allowPercent: !0, multiple: !0 }, bgRelativeTo: { enums: ["inner", "include-padding"], multiple: !0 }, bgRepeat: { enums: ["repeat", "repeat-x", "repeat-y", "no-repeat"], multiple: !0 }, bgFit: { enums: ["none", "contain", "cover"], multiple: !0 }, bgCrossOrigin: { enums: ["anonymous", "use-credentials", "null"], multiple: !0 }, bgClip: { enums: ["none", "node"], multiple: !0 }, bgContainment: { enums: ["inside", "over"], multiple: !0 }, color: { color: !0 }, colors: { color: !0, multiple: !0 }, fill: { enums: ["solid", "linear-gradient", "radial-gradient"] }, bool: { enums: ["yes", "no"] }, bools: { enums: ["yes", "no"], multiple: !0 }, lineStyle: { enums: ["solid", "dotted", "dashed"] }, lineCap: { enums: ["butt", "round", "square"] }, linePosition: { enums: ["center", "inside", "outside"] }, lineJoin: { enums: ["round", "bevel", "miter"] }, borderStyle: { enums: ["solid", "dotted", "dashed", "double"] }, curveStyle: { enums: ["bezier", "unbundled-bezier", "haystack", "segments", "straight", "straight-triangle", "taxi", "round-segments", "round-taxi"] }, radiusType: { enums: ["arc-radius", "influence-radius"], multiple: !0 }, fontFamily: { regex: '^([\\w- \\"]+(?:\\s*,\\s*[\\w- \\"]+)*)$' }, fontStyle: { enums: ["italic", "normal", "oblique"] }, fontWeight: { enums: ["normal", "bold", "bolder", "lighter", "100", "200", "300", "400", "500", "600", "800", "900", 100, 200, 300, 400, 500, 600, 700, 800, 900] }, textDecoration: { enums: ["none", "underline", "overline", "line-through"] }, textTransform: { enums: ["none", "uppercase", "lowercase"] }, textWrap: { enums: ["none", "wrap", "ellipsis"] }, textOverflowWrap: { enums: ["whitespace", "anywhere"] }, textBackgroundShape: { enums: ["rectangle", "roundrectangle", "round-rectangle"] }, nodeShape: { enums: ["rectangle", "roundrectangle", "round-rectangle", "cutrectangle", "cut-rectangle", "bottomroundrectangle", "bottom-round-rectangle", "barrel", "ellipse", "triangle", "round-triangle", "square", "pentagon", "round-pentagon", "hexagon", "round-hexagon", "concavehexagon", "concave-hexagon", "heptagon", "round-heptagon", "octagon", "round-octagon", "tag", "round-tag", "star", "diamond", "round-diamond", "vee", "rhomboid", "right-rhomboid", "polygon"] }, overlayShape: { enums: ["roundrectangle", "round-rectangle", "ellipse"] }, cornerRadius: { number: !0, min: 0, units: "px|em", implicitUnits: "px", enums: ["auto"] }, compoundIncludeLabels: { enums: ["include", "exclude"] }, arrowShape: { enums: ["tee", "triangle", "triangle-tee", "circle-triangle", "triangle-cross", "triangle-backcurve", "vee", "square", "circle", "diamond", "chevron", "none"] }, arrowFill: { enums: ["filled", "hollow"] }, arrowWidth: { number: !0, units: "%|px|em", implicitUnits: "px", enums: ["match-line"] }, display: { enums: ["element", "none"] }, visibility: { enums: ["hidden", "visible"] }, zCompoundDepth: { enums: ["bottom", "orphan", "auto", "top"] }, zIndexCompare: { enums: ["auto", "manual"] }, valign: { enums: ["top", "center", "bottom"] }, halign: { enums: ["left", "center", "right"] }, justification: { enums: ["left", "center", "right", "auto"] }, text: { string: !0 }, data: { mapping: !0, regex: a("data") }, layoutData: { mapping: !0, regex: a("layoutData") }, scratch: { mapping: !0, regex: a("scratch") }, mapData: { mapping: !0, regex: i("mapData") }, mapLayoutData: { mapping: !0, regex: i("mapLayoutData") }, mapScratch: { mapping: !0, regex: i("mapScratch") }, fn: { mapping: !0, fn: !0 }, url: { regexes: s, singleRegexMatchValue: !0 }, urls: { regexes: s, singleRegexMatchValue: !0, multiple: !0 }, propList: { propList: !0 }, angle: { number: !0, units: "deg|rad", implicitUnits: "rad" }, textRotation: { number: !0, units: "deg|rad", implicitUnits: "rad", enums: ["none", "autorotate"] }, polygonPointList: { number: !0, multiple: !0, evenMultiple: !0, min: -1, max: 1, unitless: !0 }, edgeDistances: { enums: ["intersection", "node-position", "endpoints"] }, edgeEndpoint: { number: !0, multiple: !0, units: "%|px|em|deg|rad", implicitUnits: "px", enums: ["inside-to-node", "outside-to-node", "outside-to-node-or-label", "outside-to-line", "outside-to-line-or-label"], singleEnum: !0, validate: function(Z, le) { switch (Z.length) { case 2: return le[0] !== "deg" && le[0] !== "rad" && le[1] !== "deg" && le[1] !== "rad"; case 1: return gt(Z[0]) || le[0] === "deg" || le[0] === "rad"; default: return !1; } } }, easing: { regexes: ["^(spring)\\s*\\(\\s*(" + e + ")\\s*,\\s*(" + e + ")\\s*\\)$", "^(cubic-bezier)\\s*\\(\\s*(" + e + ")\\s*,\\s*(" + e + ")\\s*,\\s*(" + e + ")\\s*,\\s*(" + e + ")\\s*\\)$"], enums: ["linear", "ease", "ease-in", "ease-out", "ease-in-out", "ease-in-sine", "ease-out-sine", "ease-in-out-sine", "ease-in-quad", "ease-out-quad", "ease-in-out-quad", "ease-in-cubic", "ease-out-cubic", "ease-in-out-cubic", "ease-in-quart", "ease-out-quart", "ease-in-out-quart", "ease-in-quint", "ease-out-quint", "ease-in-out-quint", "ease-in-expo", "ease-out-expo", "ease-in-out-expo", "ease-in-circ", "ease-out-circ", "ease-in-out-circ"] }, gradientDirection: { enums: [ "to-bottom", "to-top", "to-left", "to-right", "to-bottom-right", "to-bottom-left", "to-top-right", "to-top-left", "to-right-bottom", "to-left-bottom", "to-right-top", "to-left-top" // different order ] }, boundsExpansion: { number: !0, multiple: !0, min: 0, validate: function(Z) { var le = Z.length; return le === 1 || le === 2 || le === 4; } } }; var l = { zeroNonZero: function(Z, le) { return (Z == null || le == null) && Z !== le || Z == 0 && le != 0 ? !0 : Z != 0 && le == 0; }, any: function(Z, le) { return Z != le; }, emptyNonEmpty: function(Z, le) { var pe = ol(Z), ke = ol(le); return pe && !ke || !pe && ke; } }, u = Sr.types, c = [{ name: "label", type: u.text, triggersBounds: l.any, triggersZOrder: l.emptyNonEmpty }, { name: "text-rotation", type: u.textRotation, triggersBounds: l.any }, { name: "text-margin-x", type: u.bidirectionalSize, triggersBounds: l.any }, { name: "text-margin-y", type: u.bidirectionalSize, triggersBounds: l.any }], d = [{ name: "source-label", type: u.text, triggersBounds: l.any }, { name: "source-text-rotation", type: u.textRotation, triggersBounds: l.any }, { name: "source-text-margin-x", type: u.bidirectionalSize, triggersBounds: l.any }, { name: "source-text-margin-y", type: u.bidirectionalSize, triggersBounds: l.any }, { name: "source-text-offset", type: u.size, triggersBounds: l.any }], p = [{ name: "target-label", type: u.text, triggersBounds: l.any }, { name: "target-text-rotation", type: u.textRotation, triggersBounds: l.any }, { name: "target-text-margin-x", type: u.bidirectionalSize, triggersBounds: l.any }, { name: "target-text-margin-y", type: u.bidirectionalSize, triggersBounds: l.any }, { name: "target-text-offset", type: u.size, triggersBounds: l.any }], h = [{ name: "font-family", type: u.fontFamily, triggersBounds: l.any }, { name: "font-style", type: u.fontStyle, triggersBounds: l.any }, { name: "font-weight", type: u.fontWeight, triggersBounds: l.any }, { name: "font-size", type: u.size, triggersBounds: l.any }, { name: "text-transform", type: u.textTransform, triggersBounds: l.any }, { name: "text-wrap", type: u.textWrap, triggersBounds: l.any }, { name: "text-overflow-wrap", type: u.textOverflowWrap, triggersBounds: l.any }, { name: "text-max-width", type: u.size, triggersBounds: l.any }, { name: "text-outline-width", type: u.size, triggersBounds: l.any }, { name: "line-height", type: u.positiveNumber, triggersBounds: l.any }], f = [{ name: "text-valign", type: u.valign, triggersBounds: l.any }, { name: "text-halign", type: u.halign, triggersBounds: l.any }, { name: "color", type: u.color }, { name: "text-outline-color", type: u.color }, { name: "text-outline-opacity", type: u.zeroOneNumber }, { name: "text-background-color", type: u.color }, { name: "text-background-opacity", type: u.zeroOneNumber }, { name: "text-background-padding", type: u.size, triggersBounds: l.any }, { name: "text-border-opacity", type: u.zeroOneNumber }, { name: "text-border-color", type: u.color }, { name: "text-border-width", type: u.size, triggersBounds: l.any }, { name: "text-border-style", type: u.borderStyle, triggersBounds: l.any }, { name: "text-background-shape", type: u.textBackgroundShape, triggersBounds: l.any }, { name: "text-justification", type: u.justification }], v = [{ name: "events", type: u.bool, triggersZOrder: l.any }, { name: "text-events", type: u.bool, triggersZOrder: l.any }], m = [{ name: "display", type: u.display, triggersZOrder: l.any, triggersBounds: l.any, triggersBoundsOfConnectedEdges: !0 }, { name: "visibility", type: u.visibility, triggersZOrder: l.any }, { name: "opacity", type: u.zeroOneNumber, triggersZOrder: l.zeroNonZero }, { name: "text-opacity", type: u.zeroOneNumber }, { name: "min-zoomed-font-size", type: u.size }, { name: "z-compound-depth", type: u.zCompoundDepth, triggersZOrder: l.any }, { name: "z-index-compare", type: u.zIndexCompare, triggersZOrder: l.any }, { name: "z-index", type: u.number, triggersZOrder: l.any }], g = [{ name: "overlay-padding", type: u.size, triggersBounds: l.any }, { name: "overlay-color", type: u.color }, { name: "overlay-opacity", type: u.zeroOneNumber, triggersBounds: l.zeroNonZero }, { name: "overlay-shape", type: u.overlayShape, triggersBounds: l.any }, { name: "overlay-corner-radius", type: u.cornerRadius }], b = [{ name: "underlay-padding", type: u.size, triggersBounds: l.any }, { name: "underlay-color", type: u.color }, { name: "underlay-opacity", type: u.zeroOneNumber, triggersBounds: l.zeroNonZero }, { name: "underlay-shape", type: u.overlayShape, triggersBounds: l.any }, { name: "underlay-corner-radius", type: u.cornerRadius }], x = [{ name: "transition-property", type: u.propList }, { name: "transition-duration", type: u.time }, { name: "transition-delay", type: u.time }, { name: "transition-timing-function", type: u.easing }], w = function(Z, le) { return le.value === "label" ? -Z.poolIndex() : le.pfValue; }, k = [{ name: "height", type: u.nodeSize, triggersBounds: l.any, hashOverride: w }, { name: "width", type: u.nodeSize, triggersBounds: l.any, hashOverride: w }, { name: "shape", type: u.nodeShape, triggersBounds: l.any }, { name: "shape-polygon-points", type: u.polygonPointList, triggersBounds: l.any }, { name: "corner-radius", type: u.cornerRadius }, { name: "background-color", type: u.color }, { name: "background-fill", type: u.fill }, { name: "background-opacity", type: u.zeroOneNumber }, { name: "background-blacken", type: u.nOneOneNumber }, { name: "background-gradient-stop-colors", type: u.colors }, { name: "background-gradient-stop-positions", type: u.percentages }, { name: "background-gradient-direction", type: u.gradientDirection }, { name: "padding", type: u.sizeMaybePercent, triggersBounds: l.any }, { name: "padding-relative-to", type: u.paddingRelativeTo, triggersBounds: l.any }, { name: "bounds-expansion", type: u.boundsExpansion, triggersBounds: l.any }], C = [{ name: "border-color", type: u.color }, { name: "border-opacity", type: u.zeroOneNumber }, { name: "border-width", type: u.size, triggersBounds: l.any }, { name: "border-style", type: u.borderStyle }, { name: "border-cap", type: u.lineCap }, { name: "border-join", type: u.lineJoin }, { name: "border-dash-pattern", type: u.numbers }, { name: "border-dash-offset", type: u.number }, { name: "border-position", type: u.linePosition }], _ = [{ name: "outline-color", type: u.color }, { name: "outline-opacity", type: u.zeroOneNumber }, { name: "outline-width", type: u.size, triggersBounds: l.any }, { name: "outline-style", type: u.borderStyle }, { name: "outline-offset", type: u.size, triggersBounds: l.any }], $ = [{ name: "background-image", type: u.urls }, { name: "background-image-crossorigin", type: u.bgCrossOrigin }, { name: "background-image-opacity", type: u.zeroOneNumbers }, { name: "background-image-containment", type: u.bgContainment }, { name: "background-image-smoothing", type: u.bools }, { name: "background-position-x", type: u.bgPos }, { name: "background-position-y", type: u.bgPos }, { name: "background-width-relative-to", type: u.bgRelativeTo }, { name: "background-height-relative-to", type: u.bgRelativeTo }, { name: "background-repeat", type: u.bgRepeat }, { name: "background-fit", type: u.bgFit }, { name: "background-clip", type: u.bgClip }, { name: "background-width", type: u.bgWH }, { name: "background-height", type: u.bgWH }, { name: "background-offset-x", type: u.bgPos }, { name: "background-offset-y", type: u.bgPos }], O = [{ name: "position", type: u.position, triggersBounds: l.any }, { name: "compound-sizing-wrt-labels", type: u.compoundIncludeLabels, triggersBounds: l.any }, { name: "min-width", type: u.size, triggersBounds: l.any }, { name: "min-width-bias-left", type: u.sizeMaybePercent, triggersBounds: l.any }, { name: "min-width-bias-right", type: u.sizeMaybePercent, triggersBounds: l.any }, { name: "min-height", type: u.size, triggersBounds: l.any }, { name: "min-height-bias-top", type: u.sizeMaybePercent, triggersBounds: l.any }, { name: "min-height-bias-bottom", type: u.sizeMaybePercent, triggersBounds: l.any }], F = [{ name: "line-style", type: u.lineStyle }, { name: "line-color", type: u.color }, { name: "line-fill", type: u.fill }, { name: "line-cap", type: u.lineCap }, { name: "line-opacity", type: u.zeroOneNumber }, { name: "line-dash-pattern", type: u.numbers }, { name: "line-dash-offset", type: u.number }, { name: "line-outline-width", type: u.size }, { name: "line-outline-color", type: u.color }, { name: "line-gradient-stop-colors", type: u.colors }, { name: "line-gradient-stop-positions", type: u.percentages }, { name: "curve-style", type: u.curveStyle, triggersBounds: l.any, triggersBoundsOfParallelBeziers: !0 }, { name: "haystack-radius", type: u.zeroOneNumber, triggersBounds: l.any }, { name: "source-endpoint", type: u.edgeEndpoint, triggersBounds: l.any }, { name: "target-endpoint", type: u.edgeEndpoint, triggersBounds: l.any }, { name: "control-point-step-size", type: u.size, triggersBounds: l.any }, { name: "control-point-distances", type: u.bidirectionalSizes, triggersBounds: l.any }, { name: "control-point-weights", type: u.numbers, triggersBounds: l.any }, { name: "segment-distances", type: u.bidirectionalSizes, triggersBounds: l.any }, { name: "segment-weights", type: u.numbers, triggersBounds: l.any }, { name: "segment-radii", type: u.numbers, triggersBounds: l.any }, { name: "radius-type", type: u.radiusType, triggersBounds: l.any }, { name: "taxi-turn", type: u.bidirectionalSizeMaybePercent, triggersBounds: l.any }, { name: "taxi-turn-min-distance", type: u.size, triggersBounds: l.any }, { name: "taxi-direction", type: u.axisDirection, triggersBounds: l.any }, { name: "taxi-radius", type: u.number, triggersBounds: l.any }, { name: "edge-distances", type: u.edgeDistances, triggersBounds: l.any }, { name: "arrow-scale", type: u.positiveNumber, triggersBounds: l.any }, { name: "loop-direction", type: u.angle, triggersBounds: l.any }, { name: "loop-sweep", type: u.angle, triggersBounds: l.any }, { name: "source-distance-from-node", type: u.size, triggersBounds: l.any }, { name: "target-distance-from-node", type: u.size, triggersBounds: l.any }], A = [{ name: "ghost", type: u.bool, triggersBounds: l.any }, { name: "ghost-offset-x", type: u.bidirectionalSize, triggersBounds: l.any }, { name: "ghost-offset-y", type: u.bidirectionalSize, triggersBounds: l.any }, { name: "ghost-opacity", type: u.zeroOneNumber }], T = [{ name: "selection-box-color", type: u.color }, { name: "selection-box-opacity", type: u.zeroOneNumber }, { name: "selection-box-border-color", type: u.color }, { name: "selection-box-border-width", type: u.size }, { name: "active-bg-color", type: u.color }, { name: "active-bg-opacity", type: u.zeroOneNumber }, { name: "active-bg-size", type: u.size }, { name: "outside-texture-bg-color", type: u.color }, { name: "outside-texture-bg-opacity", type: u.zeroOneNumber }], R = []; Sr.pieBackgroundN = 16, R.push({ name: "pie-size", type: u.sizeMaybePercent }); for (var M = 1; M <= Sr.pieBackgroundN; M++) R.push({ name: "pie-" + M + "-background-color", type: u.color }), R.push({ name: "pie-" + M + "-background-size", type: u.percent }), R.push({ name: "pie-" + M + "-background-opacity", type: u.zeroOneNumber }); var j = [], P = Sr.arrowPrefixes = ["source", "mid-source", "target", "mid-target"]; [{ name: "arrow-shape", type: u.arrowShape, triggersBounds: l.any }, { name: "arrow-color", type: u.color }, { name: "arrow-fill", type: u.arrowFill }, { name: "arrow-width", type: u.arrowWidth }].forEach(function(Z) { P.forEach(function(le) { var pe = le + "-" + Z.name, ke = Z.type, Ne = Z.triggersBounds; j.push({ name: pe, type: ke, triggersBounds: Ne }); }); }, {}); var V = Sr.properties = [].concat(v, x, m, g, b, A, f, h, c, d, p, k, C, _, $, R, O, F, j, T), U = Sr.propertyGroups = { // common to all eles behavior: v, transition: x, visibility: m, overlay: g, underlay: b, ghost: A, // labels commonLabel: f, labelDimensions: h, mainLabel: c, sourceLabel: d, targetLabel: p, // node props nodeBody: k, nodeBorder: C, nodeOutline: _, backgroundImage: $, pie: R, compound: O, // edge props edgeLine: F, edgeArrow: j, core: T }, G = Sr.propertyGroupNames = {}, se = Sr.propertyGroupKeys = Object.keys(U); se.forEach(function(Z) { G[Z] = U[Z].map(function(le) { return le.name; }), U[Z].forEach(function(le) { return le.groupKey = Z; }); }); var ae = Sr.aliases = [{ name: "content", pointsTo: "label" }, { name: "control-point-distance", pointsTo: "control-point-distances" }, { name: "control-point-weight", pointsTo: "control-point-weights" }, { name: "segment-distance", pointsTo: "segment-distances" }, { name: "segment-weight", pointsTo: "segment-weights" }, { name: "segment-radius", pointsTo: "segment-radii" }, { name: "edge-text-rotation", pointsTo: "text-rotation" }, { name: "padding-left", pointsTo: "padding" }, { name: "padding-right", pointsTo: "padding" }, { name: "padding-top", pointsTo: "padding" }, { name: "padding-bottom", pointsTo: "padding" }]; Sr.propertyNames = V.map(function(Z) { return Z.name; }); for (var de = 0; de < V.length; de++) { var me = V[de]; V[me.name] = me; } for (var te = 0; te < ae.length; te++) { var oe = ae[te], ne = V[oe.pointsTo], ee = { name: oe.name, alias: !0, pointsTo: ne }; V.push(ee), V[oe.name] = ee; } })(); Sr.getDefaultProperty = function(e) { return this.getDefaultProperties()[e]; }; Sr.getDefaultProperties = function() { var e = this._private; if (e.defaultProperties != null) return e.defaultProperties; for (var t = _t({ // core props "selection-box-color": "#ddd", "selection-box-opacity": 0.65, "selection-box-border-color": "#aaa", "selection-box-border-width": 1, "active-bg-color": "black", "active-bg-opacity": 0.15, "active-bg-size": 30, "outside-texture-bg-color": "#000", "outside-texture-bg-opacity": 0.125, // common node/edge props events: "yes", "text-events": "no", "text-valign": "top", "text-halign": "center", "text-justification": "auto", "line-height": 1, color: "#000", "text-outline-color": "#000", "text-outline-width": 0, "text-outline-opacity": 1, "text-opacity": 1, "text-decoration": "none", "text-transform": "none", "text-wrap": "none", "text-overflow-wrap": "whitespace", "text-max-width": 9999, "text-background-color": "#000", "text-background-opacity": 0, "text-background-shape": "rectangle", "text-background-padding": 0, "text-border-opacity": 0, "text-border-width": 0, "text-border-style": "solid", "text-border-color": "#000", "font-family": "Helvetica Neue, Helvetica, sans-serif", "font-style": "normal", "font-weight": "normal", "font-size": 16, "min-zoomed-font-size": 0, "text-rotation": "none", "source-text-rotation": "none", "target-text-rotation": "none", visibility: "visible", display: "element", opacity: 1, "z-compound-depth": "auto", "z-index-compare": "auto", "z-index": 0, label: "", "text-margin-x": 0, "text-margin-y": 0, "source-label": "", "source-text-offset": 0, "source-text-margin-x": 0, "source-text-margin-y": 0, "target-label": "", "target-text-offset": 0, "target-text-margin-x": 0, "target-text-margin-y": 0, "overlay-opacity": 0, "overlay-color": "#000", "overlay-padding": 10, "overlay-shape": "round-rectangle", "overlay-corner-radius": "auto", "underlay-opacity": 0, "underlay-color": "#000", "underlay-padding": 10, "underlay-shape": "round-rectangle", "underlay-corner-radius": "auto", "transition-property": "none", "transition-duration": 0, "transition-delay": 0, "transition-timing-function": "linear", // node props "background-blacken": 0, "background-color": "#999", "background-fill": "solid", "background-opacity": 1, "background-image": "none", "background-image-crossorigin": "anonymous", "background-image-opacity": 1, "background-image-containment": "inside", "background-image-smoothing": "yes", "background-position-x": "50%", "background-position-y": "50%", "background-offset-x": 0, "background-offset-y": 0, "background-width-relative-to": "include-padding", "background-height-relative-to": "include-padding", "background-repeat": "no-repeat", "background-fit": "none", "background-clip": "node", "background-width": "auto", "background-height": "auto", "border-color": "#000", "border-opacity": 1, "border-width": 0, "border-style": "solid", "border-dash-pattern": [4, 2], "border-dash-offset": 0, "border-cap": "butt", "border-join": "miter", "border-position": "center", "outline-color": "#999", "outline-opacity": 1, "outline-width": 0, "outline-offset": 0, "outline-style": "solid", height: 30, width: 30, shape: "ellipse", "shape-polygon-points": "-1, -1, 1, -1, 1, 1, -1, 1", "corner-radius": "auto", "bounds-expansion": 0, // node gradient "background-gradient-direction": "to-bottom", "background-gradient-stop-colors": "#999", "background-gradient-stop-positions": "0%", // ghost props ghost: "no", "ghost-offset-y": 0, "ghost-offset-x": 0, "ghost-opacity": 0, // compound props padding: 0, "padding-relative-to": "width", position: "origin", "compound-sizing-wrt-labels": "include", "min-width": 0, "min-width-bias-left": 0, "min-width-bias-right": 0, "min-height": 0, "min-height-bias-top": 0, "min-height-bias-bottom": 0 }, { // node pie bg "pie-size": "100%" }, [{ name: "pie-{{i}}-background-color", value: "black" }, { name: "pie-{{i}}-background-size", value: "0%" }, { name: "pie-{{i}}-background-opacity", value: 1 }].reduce(function(l, u) { for (var c = 1; c <= Sr.pieBackgroundN; c++) { var d = u.name.replace("{{i}}", c), p = u.value; l[d] = p; } return l; }, {}), { // edge props "line-style": "solid", "line-color": "#999", "line-fill": "solid", "line-cap": "butt", "line-opacity": 1, "line-outline-width": 0, "line-outline-color": "#000", "line-gradient-stop-colors": "#999", "line-gradient-stop-positions": "0%", "control-point-step-size": 40, "control-point-weights": 0.5, "segment-weights": 0.5, "segment-distances": 20, "segment-radii": 15, "radius-type": "arc-radius", "taxi-turn": "50%", "taxi-radius": 15, "taxi-turn-min-distance": 10, "taxi-direction": "auto", "edge-distances": "intersection", "curve-style": "haystack", "haystack-radius": 0, "arrow-scale": 1, "loop-direction": "-45deg", "loop-sweep": "-90deg", "source-distance-from-node": 0, "target-distance-from-node": 0, "source-endpoint": "outside-to-node", "target-endpoint": "outside-to-node", "line-dash-pattern": [6, 3], "line-dash-offset": 0 }, [{ name: "arrow-shape", value: "none" }, { name: "arrow-color", value: "#999" }, { name: "arrow-fill", value: "filled" }, { name: "arrow-width", value: 1 }].reduce(function(l, u) { return Sr.arrowPrefixes.forEach(function(c) { var d = c + "-" + u.name, p = u.value; l[d] = p; }), l; }, {})), n = {}, r = 0; r < this.properties.length; r++) { var o = this.properties[r]; if (!o.pointsTo) { var a = o.name, i = t[a], s = this.parse(a, i); n[a] = s; } } return e.defaultProperties = n, e.defaultProperties; }; Sr.addDefaultStylesheet = function() { this.selector(":parent").css({ shape: "rectangle", padding: 10, "background-color": "#eee", "border-color": "#ccc", "border-width": 1 }).selector("edge").css({ width: 3 }).selector(":loop").css({ "curve-style": "bezier" }).selector("edge:compound").css({ "curve-style": "bezier", "source-endpoint": "outside-to-line", "target-endpoint": "outside-to-line" }).selector(":selected").css({ "background-color": "#0169D9", "line-color": "#0169D9", "source-arrow-color": "#0169D9", "target-arrow-color": "#0169D9", "mid-source-arrow-color": "#0169D9", "mid-target-arrow-color": "#0169D9" }).selector(":parent:selected").css({ "background-color": "#CCE1F9", "border-color": "#aec8e5" }).selector(":active").css({ "overlay-color": "black", "overlay-padding": 10, "overlay-opacity": 0.25 }), this.defaultLength = this.length; }; var Sm = {}; Sm.parse = function(e, t, n, r) { var o = this; if (Nn(t)) return o.parseImplWarn(e, t, n, r); var a = r === "mapping" || r === !0 || r === !1 || r == null ? "dontcare" : r, i = n ? "t" : "f", s = "" + t, l = AB(e, s, i, a), u = o.propCache = o.propCache || [], c; return (c = u[l]) || (c = u[l] = o.parseImplWarn(e, t, n, r)), (n || r === "mapping") && (c = ai(c), c && (c.value = ai(c.value))), c; }; Sm.parseImplWarn = function(e, t, n, r) { var o = this.parseImpl(e, t, n, r); return !o && t != null && sn("The style property `".concat(e, ": ").concat(t, "` is invalid")), o && (o.name === "width" || o.name === "height") && t === "label" && sn("The style value of `label` is deprecated for `" + o.name + "`"), o; }; Sm.parseImpl = function(e, t, n, r) { var o = this; e = f$(e); var a = o.properties[e], i = t, s = o.types; if (!a || t === void 0) return null; a.alias && (a = a.pointsTo, e = a.name); var l = gt(t); l && (t = t.trim()); var u = a.type; if (!u) return null; if (n && (t === "" || t === null)) return { name: e, value: t, bypass: !0, deleteBypass: !0 }; if (Nn(t)) return { name: e, value: t, strValue: "fn", mapped: s.fn, bypass: n }; var c, d; if (!(!l || r || t.length < 7 || t[1] !== "a")) { if (t.length >= 7 && t[0] === "d" && (c = new RegExp(s.data.regex).exec(t))) { if (n) return !1; var p = s.data; return { name: e, value: c, strValue: "" + t, mapped: p, field: c[1], bypass: n }; } else if (t.length >= 10 && t[0] === "m" && (d = new RegExp(s.mapData.regex).exec(t))) { if (n || u.multiple) return !1; var h = s.mapData; if (!(u.color || u.number)) return !1; var f = this.parse(e, d[4]); if (!f || f.mapped) return !1; var v = this.parse(e, d[5]); if (!v || v.mapped) return !1; if (f.pfValue === v.pfValue || f.strValue === v.strValue) return sn("`" + e + ": " + t + "` is not a valid mapper because the output range is zero; converting to `" + e + ": " + f.strValue + "`"), this.parse(e, f.strValue); if (u.color) { var m = f.value, g = v.value, b = m[0] === g[0] && m[1] === g[1] && m[2] === g[2] && // optional alpha (m[3] === g[3] || (m[3] == null || m[3] === 1) && (g[3] == null || g[3] === 1)); if (b) return !1; } return { name: e, value: d, strValue: "" + t, mapped: h, field: d[1], fieldMin: parseFloat(d[2]), // min & max are numeric fieldMax: parseFloat(d[3]), valueMin: f.value, valueMax: v.value, bypass: n }; } } if (u.multiple && r !== "multiple") { var x; if (l ? x = t.split(/\s+/) : dn(t) ? x = t : x = [t], u.evenMultiple && x.length % 2 !== 0) return null; for (var w = [], k = [], C = [], _ = "", $ = !1, O = 0; O < x.length; O++) { var F = o.parse(e, x[O], n, "multiple"); $ = $ || gt(F.value), w.push(F.value), C.push(F.pfValue != null ? F.pfValue : F.value), k.push(F.units), _ += (O > 0 ? " " : "") + F.strValue; } return u.validate && !u.validate(w, k) ? null : u.singleEnum && $ ? w.length === 1 && gt(w[0]) ? { name: e, value: w[0], strValue: w[0], bypass: n } : null : { name: e, value: w, pfValue: C, strValue: _, bypass: n, units: k }; } var A = function() { for (var Z = 0; Z < u.enums.length; Z++) { var le = u.enums[Z]; if (le === t) return { name: e, value: t, strValue: "" + t, bypass: n }; } return null; }; if (u.number) { var T, R = "px"; if (u.units && (T = u.units), u.implicitUnits && (R = u.implicitUnits), !u.unitless) if (l) { var M = "px|em" + (u.allowPercent ? "|\\%" : ""); T && (M = T); var j = t.match("^(" + lr + ")(" + M + ")?$"); j && (t = j[1], T = j[2] || R); } else (!T || u.implicitUnits) && (T = R); if (t = parseFloat(t), isNaN(t) && u.enums === void 0) return null; if (isNaN(t) && u.enums !== void 0) return t = i, A(); if (u.integer && !o0e(t) || u.min !== void 0 && (t < u.min || u.strictMin && t === u.min) || u.max !== void 0 && (t > u.max || u.strictMax && t === u.max)) return null; var P = { name: e, value: t, strValue: "" + t + (T || ""), units: T, bypass: n }; return u.unitless || T !== "px" && T !== "em" ? P.pfValue = t : P.pfValue = T === "px" || !T ? t : this.getEmSizeInPixels() * t, (T === "ms" || T === "s") && (P.pfValue = T === "ms" ? t : 1e3 * t), (T === "deg" || T === "rad") && (P.pfValue = T === "rad" ? t : Dme(t)), T === "%" && (P.pfValue = t / 100), P; } else if (u.propList) { var V = [], U = "" + t; if (U !== "none") { for (var G = U.split(/\s*,\s*|\s+/), se = 0; se < G.length; se++) { var ae = G[se].trim(); o.properties[ae] ? V.push(ae) : sn("`" + ae + "` is not a valid property name"); } if (V.length === 0) return null; } return { name: e, value: V, strValue: V.length === 0 ? "none" : V.join(" "), bypass: n }; } else if (u.color) { var de = x0e(t); return de ? { name: e, value: de, pfValue: de, strValue: "rgb(" + de[0] + "," + de[1] + "," + de[2] + ")", // n.b. no spaces b/c of multiple support bypass: n } : null; } else if (u.regex || u.regexes) { if (u.enums) { var me = A(); if (me) return me; } for (var te = u.regexes ? u.regexes : [u.regex], oe = 0; oe < te.length; oe++) { var ne = new RegExp(te[oe]), ee = ne.exec(t); if (ee) return { name: e, value: u.singleRegexMatchValue ? ee[1] : ee, strValue: "" + t, bypass: n }; } return null; } else return u.string ? { name: e, value: "" + t, strValue: "" + t, bypass: n } : u.enums ? A() : null; }; var Wr = function e(t) { if (!(this instanceof e)) return new e(t); if (!p$(t)) { Un("A style must have a core reference"); return; } this._private = { cy: t, coreStyle: {} }, this.length = 0, this.resetToDefault(); }, Zr = Wr.prototype; Zr.instanceString = function() { return "style"; }; Zr.clear = function() { for (var e = this._private, t = e.cy, n = t.elements(), r = 0; r < this.length; r++) this[r] = void 0; return this.length = 0, e.contextStyles = {}, e.propDiffs = {}, this.cleanElements(n, !0), n.forEach(function(o) { var a = o[0]._private; a.styleDirty = !0, a.appliedInitStyle = !1; }), this; }; Zr.resetToDefault = function() { return this.clear(), this.addDefaultStylesheet(), this; }; Zr.core = function(e) { return this._private.coreStyle[e] || this.getDefaultProperty(e); }; Zr.selector = function(e) { var t = e === "core" ? null : new il(e), n = this.length++; return this[n] = { selector: t, properties: [], mappedProperties: [], index: n }, this; }; Zr.css = function() { var e = this, t = arguments; if (t.length === 1) for (var n = t[0], r = 0; r < e.properties.length; r++) { var o = e.properties[r], a = n[o.name]; a === void 0 && (a = n[dm(o.name)]), a !== void 0 && this.cssRule(o.name, a); } else t.length === 2 && this.cssRule(t[0], t[1]); return this; }; Zr.style = Zr.css; Zr.cssRule = function(e, t) { var n = this.parse(e, t); if (n) { var r = this.length - 1; this[r].properties.push(n), this[r].properties[n.name] = n, n.name.match(/pie-(\d+)-background-size/) && n.value && (this._private.hasPie = !0), n.mapped && this[r].mappedProperties.push(n); var o = !this[r].selector; o && (this._private.coreStyle[n.name] = n); } return this; }; Zr.append = function(e) { return xB(e) ? e.appendToStyle(this) : dn(e) ? this.appendFromJson(e) : gt(e) && this.appendFromString(e), this; }; Wr.fromJson = function(e, t) { var n = new Wr(e); return n.fromJson(t), n; }; Wr.fromString = function(e, t) { return new Wr(e).fromString(t); }; [Jr, ah, E$, yi, _m, O$, Sr, Sm].forEach(function(e) { _t(Zr, e); }); Wr.types = Zr.types; Wr.properties = Zr.properties; Wr.propertyGroups = Zr.propertyGroups; Wr.propertyGroupNames = Zr.propertyGroupNames; Wr.propertyGroupKeys = Zr.propertyGroupKeys; var o2e = { style: function(e) { if (e) { var t = this.setStyle(e); t.update(); } return this._private.style; }, setStyle: function(e) { var t = this._private; return xB(e) ? t.style = e.generateStyle(this) : dn(e) ? t.style = Wr.fromJson(this, e) : gt(e) ? t.style = Wr.fromString(this, e) : t.style = Wr(this), t.style; }, // e.g. cy.data() changed => recalc ele mappers updateStyle: function() { this.mutableElements().updateStyle(); } }, a2e = "single", gu = { autolock: function(e) { if (e !== void 0) this._private.autolock = !!e; else return this._private.autolock; return this; }, autoungrabify: function(e) { if (e !== void 0) this._private.autoungrabify = !!e; else return this._private.autoungrabify; return this; }, autounselectify: function(e) { if (e !== void 0) this._private.autounselectify = !!e; else return this._private.autounselectify; return this; }, selectionType: function(e) { var t = this._private; if (t.selectionType == null && (t.selectionType = a2e), e !== void 0) (e === "additive" || e === "single") && (t.selectionType = e); else return t.selectionType; return this; }, panningEnabled: function(e) { if (e !== void 0) this._private.panningEnabled = !!e; else return this._private.panningEnabled; return this; }, userPanningEnabled: function(e) { if (e !== void 0) this._private.userPanningEnabled = !!e; else return this._private.userPanningEnabled; return this; }, zoomingEnabled: function(e) { if (e !== void 0) this._private.zoomingEnabled = !!e; else return this._private.zoomingEnabled; return this; }, userZoomingEnabled: function(e) { if (e !== void 0) this._private.userZoomingEnabled = !!e; else return this._private.userZoomingEnabled; return this; }, boxSelectionEnabled: function(e) { if (e !== void 0) this._private.boxSelectionEnabled = !!e; else return this._private.boxSelectionEnabled; return this; }, pan: function() { var e = arguments, t = this._private.pan, n, r, o, a, i; switch (e.length) { case 0: return t; case 1: if (gt(e[0])) return n = e[0], t[n]; if (Xt(e[0])) { if (!this._private.panningEnabled) return this; o = e[0], a = o.x, i = o.y, Ze(a) && (t.x = a), Ze(i) && (t.y = i), this.emit("pan viewport"); } break; case 2: if (!this._private.panningEnabled) return this; n = e[0], r = e[1], (n === "x" || n === "y") && Ze(r) && (t[n] = r), this.emit("pan viewport"); break; } return this.notify("viewport"), this; }, panBy: function(e, t) { var n = arguments, r = this._private.pan, o, a, i, s, l; if (!this._private.panningEnabled) return this; switch (n.length) { case 1: Xt(e) && (i = n[0], s = i.x, l = i.y, Ze(s) && (r.x += s), Ze(l) && (r.y += l), this.emit("pan viewport")); break; case 2: o = e, a = t, (o === "x" || o === "y") && Ze(a) && (r[o] += a), this.emit("pan viewport"); break; } return this.notify("viewport"), this; }, fit: function(e, t) { var n = this.getFitViewport(e, t); if (n) { var r = this._private; r.zoom = n.zoom, r.pan = n.pan, this.emit("pan zoom viewport"), this.notify("viewport"); } return this; }, getFitViewport: function(e, t) { if (Ze(e) && t === void 0 && (t = e, e = void 0), !(!this._private.panningEnabled || !this._private.zoomingEnabled)) { var n; if (gt(e)) { var r = e; e = this.$(r); } else if (s0e(e)) { var o = e; n = { x1: o.x1, y1: o.y1, x2: o.x2, y2: o.y2 }, n.w = n.x2 - n.x1, n.h = n.y2 - n.y1; } else Mo(e) || (e = this.mutableElements()); if (!(Mo(e) && e.empty())) { n = n || e.boundingBox(); var a = this.width(), i = this.height(), s; if (t = Ze(t) ? t : 0, !isNaN(a) && !isNaN(i) && a > 0 && i > 0 && !isNaN(n.w) && !isNaN(n.h) && n.w > 0 && n.h > 0) { s = Math.min((a - 2 * t) / n.w, (i - 2 * t) / n.h), s = s > this._private.maxZoom ? this._private.maxZoom : s, s = s < this._private.minZoom ? this._private.minZoom : s; var l = { // now pan to middle x: (a - s * (n.x1 + n.x2)) / 2, y: (i - s * (n.y1 + n.y2)) / 2 }; return { zoom: s, pan: l }; } } } }, zoomRange: function(e, t) { var n = this._private; if (t == null) { var r = e; e = r.min, t = r.max; } return Ze(e) && Ze(t) && e <= t ? (n.minZoom = e, n.maxZoom = t) : Ze(e) && t === void 0 && e <= n.maxZoom ? n.minZoom = e : Ze(t) && e === void 0 && t >= n.minZoom && (n.maxZoom = t), this; }, minZoom: function(e) { return e === void 0 ? this._private.minZoom : this.zoomRange({ min: e }); }, maxZoom: function(e) { return e === void 0 ? this._private.maxZoom : this.zoomRange({ max: e }); }, getZoomedViewport: function(e) { var t = this._private, n = t.pan, r = t.zoom, o, a, i = !1; if (t.zoomingEnabled || (i = !0), Ze(e) ? a = e : Xt(e) && (a = e.level, e.position != null ? o = vm(e.position, r, n) : e.renderedPosition != null && (o = e.renderedPosition), o != null && !t.panningEnabled && (i = !0)), a = a > t.maxZoom ? t.maxZoom : a, a = a < t.minZoom ? t.minZoom : a, i || !Ze(a) || a === r || o != null && (!Ze(o.x) || !Ze(o.y))) return null; if (o != null) { var s = n, l = r, u = a, c = { x: -u / l * (o.x - s.x) + o.x, y: -u / l * (o.y - s.y) + o.y }; return { zoomed: !0, panned: !0, zoom: u, pan: c }; } else return { zoomed: !0, panned: !1, zoom: a, pan: n }; }, zoom: function(e) { if (e === void 0) return this._private.zoom; var t = this.getZoomedViewport(e), n = this._private; return t == null || !t.zoomed ? this : (n.zoom = t.zoom, t.panned && (n.pan.x = t.pan.x, n.pan.y = t.pan.y), this.emit("zoom" + (t.panned ? " pan" : "") + " viewport"), this.notify("viewport"), this); }, viewport: function(e) { var t = this._private, n = !0, r = !0, o = [], a = !1, i = !1; if (!e) return this; if (Ze(e.zoom) || (n = !1), Xt(e.pan) || (r = !1), !n && !r) return this; if (n) { var s = e.zoom; s < t.minZoom || s > t.maxZoom || !t.zoomingEnabled ? a = !0 : (t.zoom = s, o.push("zoom")); } if (r && (!a || !e.cancelOnFailedZoom) && t.panningEnabled) { var l = e.pan; Ze(l.x) && (t.pan.x = l.x, i = !1), Ze(l.y) && (t.pan.y = l.y, i = !1), i || o.push("pan"); } return o.length > 0 && (o.push("viewport"), this.emit(o.join(" ")), this.notify("viewport")), this; }, center: function(e) { var t = this.getCenterPan(e); return t && (this._private.pan = t, this.emit("pan viewport"), this.notify("viewport")), this; }, getCenterPan: function(e, t) { if (this._private.panningEnabled) { if (gt(e)) { var n = e; e = this.mutableElements().filter(n); } else Mo(e) || (e = this.mutableElements()); if (e.length !== 0) { var r = e.boundingBox(), o = this.width(), a = this.height(); t = t === void 0 ? this._private.zoom : t; var i = { // middle x: (o - t * (r.x1 + r.x2)) / 2, y: (a - t * (r.y1 + r.y2)) / 2 }; return i; } } }, reset: function() { return !this._private.panningEnabled || !this._private.zoomingEnabled ? this : (this.viewport({ pan: { x: 0, y: 0 }, zoom: 1 }), this); }, invalidateSize: function() { this._private.sizeCache = null; }, size: function() { var e = this._private, t = e.container, n = this; return e.sizeCache = e.sizeCache || (t ? function() { var r = n.window().getComputedStyle(t), o = function(a) { return parseFloat(r.getPropertyValue(a)); }; return { width: t.clientWidth - o("padding-left") - o("padding-right"), height: t.clientHeight - o("padding-top") - o("padding-bottom") }; }() : { // fallback if no container (not 0 b/c can be used for dividing etc) width: 1, height: 1 }); }, width: function() { return this.size().width; }, height: function() { return this.size().height; }, extent: function() { var e = this._private.pan, t = this._private.zoom, n = this.renderedExtent(), r = { x1: (n.x1 - e.x) / t, x2: (n.x2 - e.x) / t, y1: (n.y1 - e.y) / t, y2: (n.y2 - e.y) / t }; return r.w = r.x2 - r.x1, r.h = r.y2 - r.y1, r; }, renderedExtent: function() { var e = this.width(), t = this.height(); return { x1: 0, y1: 0, x2: e, y2: t, w: e, h: t }; }, multiClickDebounceTime: function(e) { if (e) this._private.multiClickDebounceTime = e; else return this._private.multiClickDebounceTime; return this; } }; gu.centre = gu.center; gu.autolockNodes = gu.autolock; gu.autoungrabifyNodes = gu.autoungrabify; var hf = { data: an.data({ field: "data", bindingEvent: "data", allowBinding: !0, allowSetting: !0, settingEvent: "data", settingTriggersEvent: !0, triggerFnName: "trigger", allowGetting: !0, updateStyle: !0 }), removeData: an.removeData({ field: "data", event: "data", triggerFnName: "trigger", triggerEvent: !0, updateStyle: !0 }), scratch: an.data({ field: "scratch", bindingEvent: "scratch", allowBinding: !0, allowSetting: !0, settingEvent: "scratch", settingTriggersEvent: !0, triggerFnName: "trigger", allowGetting: !0, updateStyle: !0 }), removeScratch: an.removeData({ field: "scratch", event: "scratch", triggerFnName: "trigger", triggerEvent: !0, updateStyle: !0 }) }; hf.attr = hf.data; hf.removeAttr = hf.removeData; var vf = function(e) { var t = this; e = _t({}, e); var n = e.container; n && !Dg(n) && Dg(n[0]) && (n = n[0]); var r = n ? n._cyreg : null; r = r || {}, r && r.cy && (r.cy.destroy(), r = {}); var o = r.readies = r.readies || []; n && (n._cyreg = r), r.cy = t; var a = ir !== void 0 && n !== void 0 && !e.headless, i = e; i.layout = _t({ name: a ? "grid" : "null" }, i.layout), i.renderer = _t({ name: a ? "canvas" : "null" }, i.renderer); var s = function(p, h, f) { return h !== void 0 ? h : f !== void 0 ? f : p; }, l = this._private = { container: n, // html dom ele container ready: !1, // whether ready has been triggered options: i, // cached options elements: new Rr(this), // elements in the graph listeners: [], // list of listeners aniEles: new Rr(this), // elements being animated data: i.data || {}, // data for the core scratch: {}, // scratch object for core layout: null, renderer: null, destroyed: !1, // whether destroy was called notificationsEnabled: !0, // whether notifications are sent to the renderer minZoom: 1e-50, maxZoom: 1e50, zoomingEnabled: s(!0, i.zoomingEnabled), userZoomingEnabled: s(!0, i.userZoomingEnabled), panningEnabled: s(!0, i.panningEnabled), userPanningEnabled: s(!0, i.userPanningEnabled), boxSelectionEnabled: s(!0, i.boxSelectionEnabled), autolock: s(!1, i.autolock, i.autolockNodes), autoungrabify: s(!1, i.autoungrabify, i.autoungrabifyNodes), autounselectify: s(!1, i.autounselectify), styleEnabled: i.styleEnabled === void 0 ? a : i.styleEnabled, zoom: Ze(i.zoom) ? i.zoom : 1, pan: { x: Xt(i.pan) && Ze(i.pan.x) ? i.pan.x : 0, y: Xt(i.pan) && Ze(i.pan.y) ? i.pan.y : 0 }, animation: { // object for currently-running animations current: [], queue: [] }, hasCompoundNodes: !1, multiClickDebounceTime: s(250, i.multiClickDebounceTime) }; this.createEmitter(), this.selectionType(i.selectionType), this.zoomRange({ min: i.minZoom, max: i.maxZoom }); var u = function(p, h) { var f = p.some(l0e); if (f) return md.all(p).then(h); h(p); }; l.styleEnabled && t.setStyle([]); var c = _t({}, i, i.renderer); t.initRenderer(c); var d = function(p, h, f) { t.notifications(!1); var v = t.mutableElements(); v.length > 0 && v.remove(), p != null && (Xt(p) || dn(p)) && t.add(p), t.one("layoutready", function(g) { t.notifications(!0), t.emit(g), t.one("load", h), t.emitAndNotify("load"); }).one("layoutstop", function() { t.one("done", f), t.emit("done"); }); var m = _t({}, t._private.options.layout); m.eles = t.elements(), t.layout(m).run(); }; u([i.style, i.elements], function(p) { var h = p[0], f = p[1]; l.styleEnabled && t.style().append(h), d(f, function() { t.startAnimationLoop(), l.ready = !0, Nn(i.ready) && t.on("ready", i.ready); for (var v = 0; v < o.length; v++) { var m = o[v]; t.on("ready", m); } r && (r.readies = []), t.emit("ready"); }, i.done); }); }, qg = vf.prototype; _t(qg, { instanceString: function() { return "core"; }, isReady: function() { return this._private.ready; }, destroyed: function() { return this._private.destroyed; }, ready: function(e) { return this.isReady() ? this.emitter().emit("ready", [], e) : this.on("ready", e), this; }, destroy: function() { var e = this; if (!e.destroyed()) return e.stopAnimationLoop(), e.destroyRenderer(), this.emit("destroy"), e._private.destroyed = !0, e; }, hasElementWithId: function(e) { return this._private.elements.hasElementWithId(e); }, getElementById: function(e) { return this._private.elements.getElementById(e); }, hasCompoundNodes: function() { return this._private.hasCompoundNodes; }, headless: function() { return this._private.renderer.isHeadless(); }, styleEnabled: function() { return this._private.styleEnabled; }, addToPool: function(e) { return this._private.elements.merge(e), this; }, removeFromPool: function(e) { return this._private.elements.unmerge(e), this; }, container: function() { return this._private.container || null; }, window: function() { var e = this._private.container; if (e == null) return ir; var t = this._private.container.ownerDocument; return t === void 0 || t == null ? ir : t.defaultView || ir; }, mount: function(e) { if (e != null) { var t = this, n = t._private, r = n.options; return !Dg(e) && Dg(e[0]) && (e = e[0]), t.stopAnimationLoop(), t.destroyRenderer(), n.container = e, n.styleEnabled = !0, t.invalidateSize(), t.initRenderer(_t({}, r, r.renderer, { // allow custom renderer name to be re-used, otherwise use canvas name: r.renderer.name === "null" ? "canvas" : r.renderer.name })), t.startAnimationLoop(), t.style(r.style), t.emit("mount"), t; } }, unmount: function() { var e = this; return e.stopAnimationLoop(), e.destroyRenderer(), e.initRenderer({ name: "null" }), e.emit("unmount"), e; }, options: function() { return ai(this._private.options); }, json: function(e) { var t = this, n = t._private, r = t.mutableElements(), o = function(b) { return t.getElementById(b.id()); }; if (Xt(e)) { if (t.startBatch(), e.elements) { var a = {}, i = function(b, x) { for (var w = [], k = [], C = 0; C < b.length; C++) { var _ = b[C]; if (!_.data.id) { sn("cy.json() cannot handle elements without an ID attribute"); continue; } var $ = "" + _.data.id, O = t.getElementById($); a[$] = !0, O.length !== 0 ? k.push({ ele: O, json: _ }) : (x && (_.group = x), w.push(_)); } t.add(w); for (var F = 0; F < k.length; F++) { var A = k[F], T = A.ele, R = A.json; T.json(R); } }; if (dn(e.elements)) i(e.elements); else for (var s = ["nodes", "edges"], l = 0; l < s.length; l++) { var u = s[l], c = e.elements[u]; dn(c) && i(c, u); } var d = t.collection(); r.filter(function(b) { return !a[b.id()]; }).forEach(function(b) { b.isParent() ? d.merge(b) : b.remove(); }), d.forEach(function(b) { return b.children().move({ parent: null }); }), d.forEach(function(b) { return o(b).remove(); }); } e.style && t.style(e.style), e.zoom != null && e.zoom !== n.zoom && t.zoom(e.zoom), e.pan && (e.pan.x !== n.pan.x || e.pan.y !== n.pan.y) && t.pan(e.pan), e.data && t.data(e.data); for (var p = ["minZoom", "maxZoom", "zoomingEnabled", "userZoomingEnabled", "panningEnabled", "userPanningEnabled", "boxSelectionEnabled", "autolock", "autoungrabify", "autounselectify", "multiClickDebounceTime"], h = 0; h < p.length; h++) { var f = p[h]; e[f] != null && t[f](e[f]); } return t.endBatch(), this; } else { var v = !!e, m = {}; v ? m.elements = this.elements().map(function(b) { return b.json(); }) : (m.elements = {}, r.forEach(function(b) { var x = b.group(); m.elements[x] || (m.elements[x] = []), m.elements[x].push(b.json()); })), this._private.styleEnabled && (m.style = t.style().json()), m.data = ai(t.data()); var g = n.options; return m.zoomingEnabled = n.zoomingEnabled, m.userZoomingEnabled = n.userZoomingEnabled, m.zoom = n.zoom, m.minZoom = n.minZoom, m.maxZoom = n.maxZoom, m.panningEnabled = n.panningEnabled, m.userPanningEnabled = n.userPanningEnabled, m.pan = ai(n.pan), m.boxSelectionEnabled = n.boxSelectionEnabled, m.renderer = ai(g.renderer), m.hideEdgesOnViewport = g.hideEdgesOnViewport, m.textureOnViewport = g.textureOnViewport, m.wheelSensitivity = g.wheelSensitivity, m.motionBlur = g.motionBlur, m.multiClickDebounceTime = g.multiClickDebounceTime, m; } } }); qg.$id = qg.getElementById; [Wwe, Qwe, kz, GC, Zv, t2e, WC, Jv, o2e, gu, hf].forEach(function(e) { _t(qg, e); }); var i2e = { fit: !0, // whether to fit the viewport to the graph directed: !1, // whether the tree is directed downwards (or edges can point in any direction if false) padding: 30, // padding on fit circle: !1, // put depths in concentric circles if true, put depths top down if false grid: !1, // whether to create an even grid into which the DAG is placed (circle:false only) spacingFactor: 1.75, // positive spacing factor, larger => more space between nodes (N.B. n/a if causes overlap) boundingBox: void 0, // constrain layout bounds; { x1, y1, x2, y2 } or { x1, y1, w, h } avoidOverlap: !0, // prevents node overlap, may overflow boundingBox if not enough space nodeDimensionsIncludeLabels: !1, // Excludes the label when calculating node bounding boxes for the layout algorithm roots: void 0, // the roots of the trees depthSort: void 0, // a sorting function to order nodes at equal depth. e.g. function(a, b){ return a.data('weight') - b.data('weight') } animate: !1, // whether to transition the node positions animationDuration: 500, // duration of animation in ms if enabled animationEasing: void 0, // easing of animation if enabled, animateFilter: function(e, t) { return !0; }, // a function that determines whether the node should be animated. All nodes animated by default on animate enabled. Non-animated nodes are positioned immediately when the layout starts ready: void 0, // callback on layoutready stop: void 0, // callback on layoutstop transform: function(e, t) { return t; } // transform a given node position. Useful for changing flow direction in discrete layouts }, s2e = { maximal: !1, // whether to shift nodes down their natural BFS depths in order to avoid upwards edges (DAGS only); setting acyclic to true sets maximal to true also acyclic: !1 // whether the tree is acyclic and thus a node could be shifted (due to the maximal option) multiple times without causing an infinite loop; setting to true sets maximal to true also; if you are uncertain whether a tree is acyclic, set to false to avoid potential infinite loops }, ic = function(e) { return e.scratch("breadthfirst"); }, yF = function(e, t) { return e.scratch("breadthfirst", t); }; function Cz(e) { this.options = _t({}, i2e, s2e, e); } Cz.prototype.run = function() { var e = this.options, t = e, n = e.cy, r = t.eles, o = r.nodes().filter(function(_e) { return !_e.isParent(); }), a = r, i = t.directed, s = t.acyclic || t.maximal || t.maximalAdjustments > 0, l = Fo(t.boundingBox ? t.boundingBox : { x1: 0, y1: 0, w: n.width(), h: n.height() }), u; if (Mo(t.roots)) u = t.roots; else if (dn(t.roots)) { for (var c = [], d = 0; d < t.roots.length; d++) { var p = t.roots[d], h = n.getElementById(p); c.push(h); } u = n.collection(c); } else if (gt(t.roots)) u = n.$(t.roots); else if (i) u = o.roots(); else { var f = r.components(); u = n.collection(); for (var v = function(_e) { var Fe = f[_e], Ie = Fe.maxDegree(!1), Ae = Fe.filter(function(qe) { return qe.degree(!1) === Ie; }); u = u.add(Ae); }, m = 0; m < f.length; m++) v(m); } var g = [], b = {}, x = function(_e, Fe) { g[Fe] == null && (g[Fe] = []); var Ie = g[Fe].length; g[Fe].push(_e), yF(_e, { index: Ie, depth: Fe }); }, w = function(_e, Fe) { var Ie = ic(_e), Ae = Ie.depth, qe = Ie.index; g[Ae][qe] = null, x(_e, Fe); }; a.bfs({ roots: u, directed: t.directed, visit: function(_e, Fe, Ie, Ae, qe) { var et = _e[0], He = et.id(); x(et, qe), b[He] = !0; } }); for (var k = [], C = 0; C < o.length; C++) { var _ = o[C]; b[_.id()] || k.push(_); } var $ = function(_e) { for (var Fe = g[_e], Ie = 0; Ie < Fe.length; Ie++) { var Ae = Fe[Ie]; if (Ae == null) { Fe.splice(Ie, 1), Ie--; continue; } yF(Ae, { depth: _e, index: Ie }); } }, O = function() { for (var _e = 0; _e < g.length; _e++) $(_e); }, F = function(_e, Fe) { for (var Ie = ic(_e), Ae = _e.incomers().filter(function(I) { return I.isNode() && r.has(I); }), qe = -1, et = _e.id(), He = 0; He < Ae.length; He++) { var ot = Ae[He], tt = ic(ot); qe = Math.max(qe, tt.depth); } if (Ie.depth <= qe) { if (!t.acyclic && Fe[et]) return null; var Qe = qe + 1; return w(_e, Qe), Fe[et] = Qe, !0; } return !1; }; if (i && s) { var A = [], T = {}, R = function(_e) { return A.push(_e); }, M = function() { return A.shift(); }; for (o.forEach(function(_e) { return A.push(_e); }); A.length > 0; ) { var j = M(), P = F(j, T); if (P) j.outgoers().filter(function(_e) { return _e.isNode() && r.has(_e); }).forEach(R); else if (P === null) { sn("Detected double maximal shift for node `" + j.id() + "`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs."); break; } } } O(); var V = 0; if (t.avoidOverlap) for (var U = 0; U < o.length; U++) { var G = o[U], se = G.layoutDimensions(t), ae = se.w, de = se.h; V = Math.max(V, ae, de); } var me = {}, te = function(_e) { if (me[_e.id()]) return me[_e.id()]; for (var Fe = ic(_e).depth, Ie = _e.neighborhood(), Ae = 0, qe = 0, et = 0; et < Ie.length; et++) { var He = Ie[et]; if (!(He.isEdge() || He.isParent() || !o.has(He))) { var ot = ic(He); if (ot != null) { var tt = ot.index, Qe = ot.depth; if (!(tt == null || Qe == null)) { var I = g[Qe].length; Qe < Fe && (Ae += tt / I, qe++); } } } } return qe = Math.max(1, qe), Ae = Ae / qe, qe === 0 && (Ae = 0), me[_e.id()] = Ae, Ae; }, oe = function(_e, Fe) { var Ie = te(_e), Ae = te(Fe), qe = Ie - Ae; return qe === 0 ? CB(_e.id(), Fe.id()) : qe; }; t.depthSort !== void 0 && (oe = t.depthSort); for (var ne = 0; ne < g.length; ne++) g[ne].sort(oe), $(ne); for (var ee = [], Z = 0; Z < k.length; Z++) ee.push(k[Z]); g.unshift(ee), O(); for (var le = 0, pe = 0; pe < g.length; pe++) le = Math.max(g[pe].length, le); var ke = { x: l.x1 + l.w / 2, y: l.x1 + l.h / 2 }, Ne = g.reduce(function(_e, Fe) { return Math.max(_e, Fe.length); }, 0), De = function(_e) { var Fe = ic(_e), Ie = Fe.depth, Ae = Fe.index, qe = g[Ie].length, et = Math.max(l.w / ((t.grid ? Ne : qe) + 1), V), He = Math.max(l.h / (g.length + 1), V), ot = Math.min(l.w / 2 / g.length, l.h / 2 / g.length); if (ot = Math.max(ot, V), t.circle) { var tt = ot * Ie + ot - (g.length > 0 && g[0].length <= 3 ? ot / 2 : 0), Qe = 2 * Math.PI / g[Ie].length * Ae; return Ie === 0 && g[0].length === 1 && (tt = 1), { x: ke.x + tt * Math.cos(Qe), y: ke.y + tt * Math.sin(Qe) }; } else { var I = { x: ke.x + (Ae + 1 - (qe + 1) / 2) * et, y: (Ie + 1) * He }; return I; } }; return r.nodes().layoutPositions(this, t, De), this; }; var l2e = { fit: !0, // whether to fit the viewport to the graph padding: 30, // the padding on fit boundingBox: void 0, // constrain layout bounds; { x1, y1, x2, y2 } or { x1, y1, w, h } avoidOverlap: !0, // prevents node overlap, may overflow boundingBox and radius if not enough space nodeDimensionsIncludeLabels: !1, // Excludes the label when calculating node bounding boxes for the layout algorithm spacingFactor: void 0, // Applies a multiplicative factor (>0) to expand or compress the overall area that the nodes take up radius: void 0, // the radius of the circle startAngle: 3 / 2 * Math.PI, // where nodes start in radians sweep: void 0, // how many radians should be between the first and last node (defaults to full circle) clockwise: !0, // whether the layout should go clockwise (true) or counterclockwise/anticlockwise (false) sort: void 0, // a sorting function to order the nodes; e.g. function(a, b){ return a.data('weight') - b.data('weight') } animate: !1, // whether to transition the node positions animationDuration: 500, // duration of animation in ms if enabled animationEasing: void 0, // easing of animation if enabled animateFilter: function(e, t) { return !0; }, // a function that determines whether the node should be animated. All nodes animated by default on animate enabled. Non-animated nodes are positioned immediately when the layout starts ready: void 0, // callback on layoutready stop: void 0, // callback on layoutstop transform: function(e, t) { return t; } // transform a given node position. Useful for changing flow direction in discrete layouts }; function _z(e) { this.options = _t({}, l2e, e); } _z.prototype.run = function() { var e = this.options, t = e, n = e.cy, r = t.eles, o = t.counterclockwise !== void 0 ? !t.counterclockwise : t.clockwise, a = r.nodes().not(":parent"); t.sort && (a = a.sort(t.sort)); for (var i = Fo(t.boundingBox ? t.boundingBox : { x1: 0, y1: 0, w: n.width(), h: n.height() }), s = { x: i.x1 + i.w / 2, y: i.y1 + i.h / 2 }, l = t.sweep === void 0 ? 2 * Math.PI - 2 * Math.PI / a.length : t.sweep, u = l / Math.max(1, a.length - 1), c, d = 0, p = 0; p < a.length; p++) { var h = a[p], f = h.layoutDimensions(t), v = f.w, m = f.h; d = Math.max(d, v, m); } if (Ze(t.radius) ? c = t.radius : a.length <= 1 ? c = 0 : c = Math.min(i.h, i.w) / 2 - d, a.length > 1 && t.avoidOverlap) { d *= 1.75; var g = Math.cos(u) - Math.cos(0), b = Math.sin(u) - Math.sin(0), x = Math.sqrt(d * d / (g * g + b * b)); c = Math.max(x, c); } var w = function(k, C) { var _ = t.startAngle + C * u * (o ? 1 : -1), $ = c * Math.cos(_), O = c * Math.sin(_), F = { x: s.x + $, y: s.y + O }; return F; }; return r.nodes().layoutPositions(this, t, w), this; }; var u2e = { fit: !0, // whether to fit the viewport to the graph padding: 30, // the padding on fit startAngle: 3 / 2 * Math.PI, // where nodes start in radians sweep: void 0, // how many radians should be between the first and last node (defaults to full circle) clockwise: !0, // whether the layout should go clockwise (true) or counterclockwise/anticlockwise (false) equidistant: !1, // whether levels have an equal radial distance betwen them, may cause bounding box overflow minNodeSpacing: 10, // min spacing between outside of nodes (used for radius adjustment) boundingBox: void 0, // constrain layout bounds; { x1, y1, x2, y2 } or { x1, y1, w, h } avoidOverlap: !0, // prevents node overlap, may overflow boundingBox if not enough space nodeDimensionsIncludeLabels: !1, // Excludes the label when calculating node bounding boxes for the layout algorithm height: void 0, // height of layout area (overrides container height) width: void 0, // width of layout area (overrides container width) spacingFactor: void 0, // Applies a multiplicative factor (>0) to expand or compress the overall area that the nodes take up concentric: function(e) { return e.degree(); }, levelWidth: function(e) { return e.maxDegree() / 4; }, animate: !1, // whether to transition the node positions animationDuration: 500, // duration of animation in ms if enabled animationEasing: void 0, // easing of animation if enabled animateFilter: function(e, t) { return !0; }, // a function that determines whether the node should be animated. All nodes animated by default on animate enabled. Non-animated nodes are positioned immediately when the layout starts ready: void 0, // callback on layoutready stop: void 0, // callback on layoutstop transform: function(e, t) { return t; } // transform a given node position. Useful for changing flow direction in discrete layouts }; function Sz(e) { this.options = _t({}, u2e, e); } Sz.prototype.run = function() { for (var e = this.options, t = e, n = t.counterclockwise !== void 0 ? !t.counterclockwise : t.clockwise, r = e.cy, o = t.eles, a = o.nodes().not(":parent"), i = Fo(t.boundingBox ? t.boundingBox : { x1: 0, y1: 0, w: r.width(), h: r.height() }), s = { x: i.x1 + i.w / 2, y: i.y1 + i.h / 2 }, l = [], u = 0, c = 0; c < a.length; c++) { var d = a[c], p = void 0; p = t.concentric(d), l.push({ value: p, node: d }), d._private.scratch.concentric = p; } a.updateStyle(); for (var h = 0; h < a.length; h++) { var f = a[h], v = f.layoutDimensions(t); u = Math.max(u, v.w, v.h); } l.sort(function(_e, Fe) { return Fe.value - _e.value; }); for (var m = t.levelWidth(a), g = [[]], b = g[0], x = 0; x < l.length; x++) { var w = l[x]; if (b.length > 0) { var k = Math.abs(b[0].value - w.value); k >= m && (b = [], g.push(b)); } b.push(w); } var C = u + t.minNodeSpacing; if (!t.avoidOverlap) { var _ = g.length > 0 && g[0].length > 1, $ = Math.min(i.w, i.h) / 2 - C, O = $ / (g.length + _ ? 1 : 0); C = Math.min(C, O); } for (var F = 0, A = 0; A < g.length; A++) { var T = g[A], R = t.sweep === void 0 ? 2 * Math.PI - 2 * Math.PI / T.length : t.sweep, M = T.dTheta = R / Math.max(1, T.length - 1); if (T.length > 1 && t.avoidOverlap) { var j = Math.cos(M) - Math.cos(0), P = Math.sin(M) - Math.sin(0), V = Math.sqrt(C * C / (j * j + P * P)); F = Math.max(V, F); } T.r = F, F += C; } if (t.equidistant) { for (var U = 0, G = 0, se = 0; se < g.length; se++) { var ae = g[se], de = ae.r - G; U = Math.max(U, de); } G = 0; for (var me = 0; me < g.length; me++) { var te = g[me]; me === 0 && (G = te.r), te.r = G, G += U; } } for (var oe = {}, ne = 0; ne < g.length; ne++) for (var ee = g[ne], Z = ee.dTheta, le = ee.r, pe = 0; pe < ee.length; pe++) { var ke = ee[pe], Ne = t.startAngle + (n ? 1 : -1) * Z * pe, De = { x: s.x + le * Math.cos(Ne), y: s.y + le * Math.sin(Ne) }; oe[ke.node.id()] = De; } return o.nodes().layoutPositions(this, t, function(_e) { var Fe = _e.id(); return oe[Fe]; }), this; }; var by, c2e = { // Called on `layoutready` ready: function() { }, // Called on `layoutstop` stop: function() { }, // Whether to animate while running the layout // true : Animate continuously as the layout is running // false : Just show the end result // 'end' : Animate with the end result, from the initial positions to the end positions animate: !0, // Easing of the animation for animate:'end' animationEasing: void 0, // The duration of the animation for animate:'end' animationDuration: void 0, // A function that determines whether the node should be animated // All nodes animated by default on animate enabled // Non-animated nodes are positioned immediately when the layout starts animateFilter: function(e, t) { return !0; }, // The layout animates only after this many milliseconds for animate:true // (prevents flashing on fast runs) animationThreshold: 250, // Number of iterations between consecutive screen positions update refresh: 20, // Whether to fit the network view after when done fit: !0, // Padding on fit padding: 30, // Constrain layout bounds; { x1, y1, x2, y2 } or { x1, y1, w, h } boundingBox: void 0, // Excludes the label when calculating node bounding boxes for the layout algorithm nodeDimensionsIncludeLabels: !1, // Randomize the initial positions of the nodes (true) or use existing positions (false) randomize: !1, // Extra spacing between components in non-compound graphs componentSpacing: 40, // Node repulsion (non overlapping) multiplier nodeRepulsion: function(e) { return 2048; }, // Node repulsion (overlapping) multiplier nodeOverlap: 4, // Ideal edge (non nested) length idealEdgeLength: function(e) { return 32; }, // Divisor to compute edge forces edgeElasticity: function(e) { return 32; }, // Nesting factor (multiplier) to compute ideal edge length for nested edges nestingFactor: 1.2, // Gravity force (constant) gravity: 1, // Maximum number of iterations to perform numIter: 1e3, // Initial temperature (maximum node displacement) initialTemp: 1e3, // Cooling factor (how the temperature is reduced between consecutive iterations coolingFactor: 0.99, // Lower temperature threshold (below this point the layout will end) minTemp: 1 }; function $m(e) { this.options = _t({}, c2e, e), this.options.layout = this; var t = this.options.eles.nodes(), n = this.options.eles.edges(), r = n.filter(function(o) { var a = o.source().data("id"), i = o.target().data("id"), s = t.some(function(u) { return u.data("id") === a; }), l = t.some(function(u) { return u.data("id") === i; }); return !s || !l; }); this.options.eles = this.options.eles.not(r); } $m.prototype.run = function() { var e = this.options, t = e.cy, n = this; n.stopped = !1, (e.animate === !0 || e.animate === !1) && n.emit({ type: "layoutstart", layout: n }), e.debug === !0 ? by = !0 : by = !1; var r = d2e(t, n, e); by && h2e(r), e.randomize && v2e(r); var o = ns(), a = function() { g2e(r, t, e), e.fit === !0 && t.fit(e.padding); }, i = function(d) { return !(n.stopped || d >= e.numIter || (m2e(r, e), r.temperature = r.temperature * e.coolingFactor, r.temperature < e.minTemp)); }, s = function() { if (e.animate === !0 || e.animate === !1) a(), n.one("layoutstop", e.stop), n.emit({ type: "layoutstop", layout: n }); else { var d = e.eles.nodes(), p = $z(r, e, d); d.layoutPositions(n, e, p); } }, l = 0, u = !0; if (e.animate === !0) { var c = function d() { for (var p = 0; u && p < e.refresh; ) u = i(l), l++, p++; if (!u) wF(r, e), s(); else { var h = ns(); h - o >= e.animationThreshold && a(), Bg(d); } }; c(); } else { for (; u; ) u = i(l), l++; wF(r, e), s(); } return this; }; $m.prototype.stop = function() { return this.stopped = !0, this.thread && this.thread.stop(), this.emit("layoutstop"), this; }; $m.prototype.destroy = function() { return this.thread && this.thread.stop(), this; }; var d2e = function(e, t, n) { for (var r = n.eles.edges(), o = n.eles.nodes(), a = Fo(n.boundingBox ? n.boundingBox : { x1: 0, y1: 0, w: e.width(), h: e.height() }), i = { isCompound: e.hasCompoundNodes(), layoutNodes: [], idToIndex: {}, nodeSize: o.size(), graphSet: [], indexToGraph: [], layoutEdges: [], edgeSize: r.size(), temperature: n.initialTemp, clientWidth: a.w, clientHeight: a.h, boundingBox: a }, s = n.eles.components(), l = {}, u = 0; u < s.length; u++) for (var c = s[u], d = 0; d < c.length; d++) { var p = c[d]; l[p.id()] = u; } for (var u = 0; u < i.nodeSize; u++) { var h = o[u], f = h.layoutDimensions(n), v = {}; v.isLocked = h.locked(), v.id = h.data("id"), v.parentId = h.data("parent"), v.cmptId = l[h.id()], v.children = [], v.positionX = h.position("x"), v.positionY = h.position("y"), v.offsetX = 0, v.offsetY = 0, v.height = f.w, v.width = f.h, v.maxX = v.positionX + v.width / 2, v.minX = v.positionX - v.width / 2, v.maxY = v.positionY + v.height / 2, v.minY = v.positionY - v.height / 2, v.padLeft = parseFloat(h.style("padding")), v.padRight = parseFloat(h.style("padding")), v.padTop = parseFloat(h.style("padding")), v.padBottom = parseFloat(h.style("padding")), v.nodeRepulsion = Nn(n.nodeRepulsion) ? n.nodeRepulsion(h) : n.nodeRepulsion, i.layoutNodes.push(v), i.idToIndex[v.id] = u; } for (var m = [], g = 0, b = -1, x = [], u = 0; u < i.nodeSize; u++) { var h = i.layoutNodes[u], w = h.parentId; w != null ? i.layoutNodes[i.idToIndex[w]].children.push(h.id) : (m[++b] = h.id, x.push(h.id)); } for (i.graphSet.push(x); g <= b; ) { var k = m[g++], C = i.idToIndex[k], p = i.layoutNodes[C], _ = p.children; if (_.length > 0) { i.graphSet.push(_); for (var u = 0; u < _.length; u++) m[++b] = _[u]; } } for (var u = 0; u < i.graphSet.length; u++) for (var $ = i.graphSet[u], d = 0; d < $.length; d++) { var O = i.idToIndex[$[d]]; i.indexToGraph[O] = u; } for (var u = 0; u < i.edgeSize; u++) { var F = r[u], A = {}; A.id = F.data("id"), A.sourceId = F.data("source"), A.targetId = F.data("target"); var T = Nn(n.idealEdgeLength) ? n.idealEdgeLength(F) : n.idealEdgeLength, R = Nn(n.edgeElasticity) ? n.edgeElasticity(F) : n.edgeElasticity, M = i.idToIndex[A.sourceId], j = i.idToIndex[A.targetId], P = i.indexToGraph[M], V = i.indexToGraph[j]; if (P != V) { for (var U = p2e(A.sourceId, A.targetId, i), G = i.graphSet[U], se = 0, v = i.layoutNodes[M]; G.indexOf(v.id) === -1; ) v = i.layoutNodes[i.idToIndex[v.parentId]], se++; for (v = i.layoutNodes[j]; G.indexOf(v.id) === -1; ) v = i.layoutNodes[i.idToIndex[v.parentId]], se++; T *= se * n.nestingFactor; } A.idealLength = T, A.elasticity = R, i.layoutEdges.push(A); } return i; }, p2e = function(e, t, n) { var r = f2e(e, t, 0, n); return 2 > r.count ? 0 : r.graph; }, f2e = function e(t, n, r, o) { var a = o.graphSet[r]; if (-1 < a.indexOf(t) && -1 < a.indexOf(n)) return { count: 2, graph: r }; for (var i = 0, s = 0; s < a.length; s++) { var l = a[s], u = o.idToIndex[l], c = o.layoutNodes[u].children; if (c.length !== 0) { var d = o.indexToGraph[o.idToIndex[c[0]]], p = e(t, n, d, o); if (p.count !== 0) if (p.count === 1) { if (i++, i === 2) break; } else return p; } } return { count: i, graph: r }; }, h2e, v2e = function(e, t) { for (var n = e.clientWidth, r = e.clientHeight, o = 0; o < e.nodeSize; o++) { var a = e.layoutNodes[o]; a.children.length === 0 && !a.isLocked && (a.positionX = Math.random() * n, a.positionY = Math.random() * r); } }, $z = function(e, t, n) { var r = e.boundingBox, o = { x1: 1 / 0, x2: -1 / 0, y1: 1 / 0, y2: -1 / 0 }; return t.boundingBox && (n.forEach(function(a) { var i = e.layoutNodes[e.idToIndex[a.data("id")]]; o.x1 = Math.min(o.x1, i.positionX), o.x2 = Math.max(o.x2, i.positionX), o.y1 = Math.min(o.y1, i.positionY), o.y2 = Math.max(o.y2, i.positionY); }), o.w = o.x2 - o.x1, o.h = o.y2 - o.y1), function(a, i) { var s = e.layoutNodes[e.idToIndex[a.data("id")]]; if (t.boundingBox) { var l = (s.positionX - o.x1) / o.w, u = (s.positionY - o.y1) / o.h; return { x: r.x1 + l * r.w, y: r.y1 + u * r.h }; } else return { x: s.positionX, y: s.positionY }; }; }, g2e = function(e, t, n) { var r = n.layout, o = n.eles.nodes(), a = $z(e, n, o); o.positions(a), e.ready !== !0 && (e.ready = !0, r.one("layoutready", n.ready), r.emit({ type: "layoutready", layout: this })); }, m2e = function(e, t, n) { y2e(e, t), x2e(e), k2e(e, t), C2e(e), _2e(e); }, y2e = function(e, t) { for (var n = 0; n < e.graphSet.length; n++) for (var r = e.graphSet[n], o = r.length, a = 0; a < o; a++) for (var i = e.layoutNodes[e.idToIndex[r[a]]], s = a + 1; s < o; s++) { var l = e.layoutNodes[e.idToIndex[r[s]]]; b2e(i, l, e, t); } }, bF = function(e) { return -e + 2 * e * Math.random(); }, b2e = function(e, t, n, r) { var o = e.cmptId, a = t.cmptId; if (!(o !== a && !n.isCompound)) { var i = t.positionX - e.positionX, s = t.positionY - e.positionY, l = 1; i === 0 && s === 0 && (i = bF(l), s = bF(l)); var u = w2e(e, t, i, s); if (u > 0) var m = r.nodeOverlap * u, v = Math.sqrt(i * i + s * s), g = m * i / v, b = m * s / v; else var c = Kg(e, i, s), d = Kg(t, -1 * i, -1 * s), p = d.x - c.x, h = d.y - c.y, f = p * p + h * h, v = Math.sqrt(f), m = (e.nodeRepulsion + t.nodeRepulsion) / f, g = m * p / v, b = m * h / v; e.isLocked || (e.offsetX -= g, e.offsetY -= b), t.isLocked || (t.offsetX += g, t.offsetY += b); } }, w2e = function(e, t, n, r) { if (n > 0) var o = e.maxX - t.minX; else var o = t.maxX - e.minX; if (r > 0) var a = e.maxY - t.minY; else var a = t.maxY - e.minY; return o >= 0 && a >= 0 ? Math.sqrt(o * o + a * a) : 0; }, Kg = function(e, t, n) { var r = e.positionX, o = e.positionY, a = e.height || 1, i = e.width || 1, s = n / t, l = a / i, u = {}; return t === 0 && 0 < n || t === 0 && 0 > n ? (u.x = r, u.y = o + a / 2, u) : 0 < t && -1 * l <= s && s <= l ? (u.x = r + i / 2, u.y = o + i * n / 2 / t, u) : 0 > t && -1 * l <= s && s <= l ? (u.x = r - i / 2, u.y = o - i * n / 2 / t, u) : 0 < n && (s <= -1 * l || s >= l) ? (u.x = r + a * t / 2 / n, u.y = o + a / 2, u) : (0 > n && (s <= -1 * l || s >= l) && (u.x = r - a * t / 2 / n, u.y = o - a / 2), u); }, x2e = function(e, t) { for (var n = 0; n < e.edgeSize; n++) { var r = e.layoutEdges[n], o = e.idToIndex[r.sourceId], a = e.layoutNodes[o], i = e.idToIndex[r.targetId], s = e.layoutNodes[i], l = s.positionX - a.positionX, u = s.positionY - a.positionY; if (!(l === 0 && u === 0)) { var c = Kg(a, l, u), d = Kg(s, -1 * l, -1 * u), p = d.x - c.x, h = d.y - c.y, f = Math.sqrt(p * p + h * h), v = Math.pow(r.idealLength - f, 2) / r.elasticity; if (f !== 0) var m = v * p / f, g = v * h / f; else var m = 0, g = 0; a.isLocked || (a.offsetX += m, a.offsetY += g), s.isLocked || (s.offsetX -= m, s.offsetY -= g); } } }, k2e = function(e, t) { if (t.gravity !== 0) for (var n = 1, r = 0; r < e.graphSet.length; r++) { var o = e.graphSet[r], a = o.length; if (r === 0) var l = e.clientHeight / 2, u = e.clientWidth / 2; else var i = e.layoutNodes[e.idToIndex[o[0]]], s = e.layoutNodes[e.idToIndex[i.parentId]], l = s.positionX, u = s.positionY; for (var c = 0; c < a; c++) { var d = e.layoutNodes[e.idToIndex[o[c]]]; if (!d.isLocked) { var p = l - d.positionX, h = u - d.positionY, f = Math.sqrt(p * p + h * h); if (f > n) { var v = t.gravity * p / f, m = t.gravity * h / f; d.offsetX += v, d.offsetY += m; } } } } }, C2e = function(e, t) { var n = [], r = 0, o = -1; for (n.push.apply(n, e.graphSet[0]), o += e.graphSet[0].length; r <= o; ) { var a = n[r++], i = e.idToIndex[a], s = e.layoutNodes[i], l = s.children; if (0 < l.length && !s.isLocked) { for (var u = s.offsetX, c = s.offsetY, d = 0; d < l.length; d++) { var p = e.layoutNodes[e.idToIndex[l[d]]]; p.offsetX += u, p.offsetY += c, n[++o] = l[d]; } s.offsetX = 0, s.offsetY = 0; } } }, _2e = function(e, t) { for (var n = 0; n < e.nodeSize; n++) { var r = e.layoutNodes[n]; 0 < r.children.length && (r.maxX = void 0, r.minX = void 0, r.maxY = void 0, r.minY = void 0); } for (var n = 0; n < e.nodeSize; n++) { var r = e.layoutNodes[n]; if (!(0 < r.children.length || r.isLocked)) { var o = S2e(r.offsetX, r.offsetY, e.temperature); r.positionX += o.x, r.positionY += o.y, r.offsetX = 0, r.offsetY = 0, r.minX = r.positionX - r.width, r.maxX = r.positionX + r.width, r.minY = r.positionY - r.height, r.maxY = r.positionY + r.height, $2e(r, e); } } for (var n = 0; n < e.nodeSize; n++) { var r = e.layoutNodes[n]; 0 < r.children.length && !r.isLocked && (r.positionX = (r.maxX + r.minX) / 2, r.positionY = (r.maxY + r.minY) / 2, r.width = r.maxX - r.minX, r.height = r.maxY - r.minY); } }, S2e = function(e, t, n) { var r = Math.sqrt(e * e + t * t); if (r > n) var o = { x: n * e / r, y: n * t / r }; else var o = { x: e, y: t }; return o; }, $2e = function e(t, n) { var r = t.parentId; if (r != null) { var o = n.layoutNodes[n.idToIndex[r]], a = !1; if ((o.maxX == null || t.maxX + o.padRight > o.maxX) && (o.maxX = t.maxX + o.padRight, a = !0), (o.minX == null || t.minX - o.padLeft < o.minX) && (o.minX = t.minX - o.padLeft, a = !0), (o.maxY == null || t.maxY + o.padBottom > o.maxY) && (o.maxY = t.maxY + o.padBottom, a = !0), (o.minY == null || t.minY - o.padTop < o.minY) && (o.minY = t.minY - o.padTop, a = !0), a) return e(o, n); } }, wF = function(e, t) { for (var n = e.layoutNodes, r = [], o = 0; o < n.length; o++) { var a = n[o], i = a.cmptId, s = r[i] = r[i] || []; s.push(a); } for (var l = 0, o = 0; o < r.length; o++) { var u = r[o]; if (u) { u.x1 = 1 / 0, u.x2 = -1 / 0, u.y1 = 1 / 0, u.y2 = -1 / 0; for (var c = 0; c < u.length; c++) { var d = u[c]; u.x1 = Math.min(u.x1, d.positionX - d.width / 2), u.x2 = Math.max(u.x2, d.positionX + d.width / 2), u.y1 = Math.min(u.y1, d.positionY - d.height / 2), u.y2 = Math.max(u.y2, d.positionY + d.height / 2); } u.w = u.x2 - u.x1, u.h = u.y2 - u.y1, l += u.w * u.h; } } r.sort(function(g, b) { return b.w * b.h - g.w * g.h; }); for (var p = 0, h = 0, f = 0, v = 0, m = Math.sqrt(l) * e.clientWidth / e.clientHeight, o = 0; o < r.length; o++) { var u = r[o]; if (u) { for (var c = 0; c < u.length; c++) { var d = u[c]; d.isLocked || (d.positionX += p - u.x1, d.positionY += h - u.y1); } p += u.w + t.componentSpacing, f += u.w + t.componentSpacing, v = Math.max(v, u.h), f > m && (h += v + t.componentSpacing, p = 0, f = 0, v = 0); } } }, E2e = { fit: !0, // whether to fit the viewport to the graph padding: 30, // padding used on fit boundingBox: void 0, // constrain layout bounds; { x1, y1, x2, y2 } or { x1, y1, w, h } avoidOverlap: !0, // prevents node overlap, may overflow boundingBox if not enough space avoidOverlapPadding: 10, // extra spacing around nodes when avoidOverlap: true nodeDimensionsIncludeLabels: !1, // Excludes the label when calculating node bounding boxes for the layout algorithm spacingFactor: void 0, // Applies a multiplicative factor (>0) to expand or compress the overall area that the nodes take up condense: !1, // uses all available space on false, uses minimal space on true rows: void 0, // force num of rows in the grid cols: void 0, // force num of columns in the grid position: function(e) { }, // returns { row, col } for element sort: void 0, // a sorting function to order the nodes; e.g. function(a, b){ return a.data('weight') - b.data('weight') } animate: !1, // whether to transition the node positions animationDuration: 500, // duration of animation in ms if enabled animationEasing: void 0, // easing of animation if enabled animateFilter: function(e, t) { return !0; }, // a function that determines whether the node should be animated. All nodes animated by default on animate enabled. Non-animated nodes are positioned immediately when the layout starts ready: void 0, // callback on layoutready stop: void 0, // callback on layoutstop transform: function(e, t) { return t; } // transform a given node position. Useful for changing flow direction in discrete layouts }; function Ez(e) { this.options = _t({}, E2e, e); } Ez.prototype.run = function() { var e = this.options, t = e, n = e.cy, r = t.eles, o = r.nodes().not(":parent"); t.sort && (o = o.sort(t.sort)); var a = Fo(t.boundingBox ? t.boundingBox : { x1: 0, y1: 0, w: n.width(), h: n.height() }); if (a.h === 0 || a.w === 0) r.nodes().layoutPositions(this, t, function(me) { return { x: a.x1, y: a.y1 }; }); else { var i = o.size(), s = Math.sqrt(i * a.h / a.w), l = Math.round(s), u = Math.round(a.w / a.h * s), c = function(me) { if (me == null) return Math.min(l, u); var te = Math.min(l, u); te == l ? l = me : u = me; }, d = function(me) { if (me == null) return Math.max(l, u); var te = Math.max(l, u); te == l ? l = me : u = me; }, p = t.rows, h = t.cols != null ? t.cols : t.columns; if (p != null && h != null) l = p, u = h; else if (p != null && h == null) l = p, u = Math.ceil(i / l); else if (p == null && h != null) u = h, l = Math.ceil(i / u); else if (u * l > i) { var f = c(), v = d(); (f - 1) * v >= i ? c(f - 1) : (v - 1) * f >= i && d(v - 1); } else for (; u * l < i; ) { var m = c(), g = d(); (g + 1) * m >= i ? d(g + 1) : c(m + 1); } var b = a.w / u, x = a.h / l; if (t.condense && (b = 0, x = 0), t.avoidOverlap) for (var w = 0; w < o.length; w++) { var k = o[w], C = k._private.position; (C.x == null || C.y == null) && (C.x = 0, C.y = 0); var _ = k.layoutDimensions(t), $ = t.avoidOverlapPadding, O = _.w + $, F = _.h + $; b = Math.max(b, O), x = Math.max(x, F); } for (var A = {}, T = function(me, te) { return !!A["c-" + me + "-" + te]; }, R = function(me, te) { A["c-" + me + "-" + te] = !0; }, M = 0, j = 0, P = function() { j++, j >= u && (j = 0, M++); }, V = {}, U = 0; U < o.length; U++) { var G = o[U], se = t.position(G); if (se && (se.row !== void 0 || se.col !== void 0)) { var ae = { row: se.row, col: se.col }; if (ae.col === void 0) for (ae.col = 0; T(ae.row, ae.col); ) ae.col++; else if (ae.row === void 0) for (ae.row = 0; T(ae.row, ae.col); ) ae.row++; V[G.id()] = ae, R(ae.row, ae.col); } } var de = function(me, te) { var oe, ne; if (me.locked() || me.isParent()) return !1; var ee = V[me.id()]; if (ee) oe = ee.col * b + b / 2 + a.x1, ne = ee.row * x + x / 2 + a.y1; else { for (; T(M, j); ) P(); oe = j * b + b / 2 + a.x1, ne = M * x + x / 2 + a.y1, R(M, j), P(); } return { x: oe, y: ne }; }; o.layoutPositions(this, t, de); } return this; }; var O2e = { ready: function() { }, // on layoutready stop: function() { } // on layoutstop }; function F$(e) { this.options = _t({}, O2e, e); } F$.prototype.run = function() { var e = this.options, t = e.eles, n = this; return e.cy, n.emit("layoutstart"), t.nodes().positions(function() { return { x: 0, y: 0 }; }), n.one("layoutready", e.ready), n.emit("layoutready"), n.one("layoutstop", e.stop), n.emit("layoutstop"), this; }; F$.prototype.stop = function() { return this; }; var F2e = { positions: void 0, // map of (node id) => (position obj); or function(node){ return somPos; } zoom: void 0, // the zoom level to set (prob want fit = false if set) pan: void 0, // the pan level to set (prob want fit = false if set) fit: !0, // whether to fit to viewport padding: 30, // padding on fit spacingFactor: void 0, // Applies a multiplicative factor (>0) to expand or compress the overall area that the nodes take up animate: !1, // whether to transition the node positions animationDuration: 500, // duration of animation in ms if enabled animationEasing: void 0, // easing of animation if enabled animateFilter: function(e, t) { return !0; }, // a function that determines whether the node should be animated. All nodes animated by default on animate enabled. Non-animated nodes are positioned immediately when the layout starts ready: void 0, // callback on layoutready stop: void 0, // callback on layoutstop transform: function(e, t) { return t; } // transform a given node position. Useful for changing flow direction in discrete layouts }; function Oz(e) { this.options = _t({}, F2e, e); } Oz.prototype.run = function() { var e = this.options, t = e.eles, n = t.nodes(), r = Nn(e.positions); function o(a) { if (e.positions == null) return Pme(a.position()); if (r) return e.positions(a); var i = e.positions[a._private.data.id]; return i ?? null; } return n.layoutPositions(this, e, function(a, i) { var s = o(a); return a.locked() || s == null ? !1 : s; }), this; }; var T2e = { fit: !0, // whether to fit to viewport padding: 30, // fit padding boundingBox: void 0, // constrain layout bounds; { x1, y1, x2, y2 } or { x1, y1, w, h } animate: !1, // whether to transition the node positions animationDuration: 500, // duration of animation in ms if enabled animationEasing: void 0, // easing of animation if enabled animateFilter: function(e, t) { return !0; }, // a function that determines whether the node should be animated. All nodes animated by default on animate enabled. Non-animated nodes are positioned immediately when the layout starts ready: void 0, // callback on layoutready stop: void 0, // callback on layoutstop transform: function(e, t) { return t; } // transform a given node position. Useful for changing flow direction in discrete layouts }; function Fz(e) { this.options = _t({}, T2e, e); } Fz.prototype.run = function() { var e = this.options, t = e.cy, n = e.eles, r = Fo(e.boundingBox ? e.boundingBox : { x1: 0, y1: 0, w: t.width(), h: t.height() }), o = function(a, i) { return { x: r.x1 + Math.round(Math.random() * r.w), y: r.y1 + Math.round(Math.random() * r.h) }; }; return n.nodes().layoutPositions(this, e, o), this; }; var A2e = [{ name: "breadthfirst", impl: Cz }, { name: "circle", impl: _z }, { name: "concentric", impl: Sz }, { name: "cose", impl: $m }, { name: "grid", impl: Ez }, { name: "null", impl: F$ }, { name: "preset", impl: Oz }, { name: "random", impl: Fz }]; function Tz(e) { this.options = e, this.notifications = 0; } var xF = function() { }, kF = function() { throw new Error("A headless instance can not render images"); }; Tz.prototype = { recalculateRenderedStyle: xF, notify: function() { this.notifications++; }, init: xF, isHeadless: function() { return !0; }, png: kF, jpg: kF }; var T$ = {}; T$.arrowShapeWidth = 0.3; T$.registerArrowShapes = function() { var e = this.arrowShapes = {}, t = this, n = function(l, u, c, d, p, h, f) { var v = p.x - c / 2 - f, m = p.x + c / 2 + f, g = p.y - c / 2 - f, b = p.y + c / 2 + f, x = v <= l && l <= m && g <= u && u <= b; return x; }, r = function(l, u, c, d, p) { var h = l * Math.cos(d) - u * Math.sin(d), f = l * Math.sin(d) + u * Math.cos(d), v = h * c, m = f * c, g = v + p.x, b = m + p.y; return { x: g, y: b }; }, o = function(l, u, c, d) { for (var p = [], h = 0; h < l.length; h += 2) { var f = l[h], v = l[h + 1]; p.push(r(f, v, u, c, d)); } return p; }, a = function(l) { for (var u = [], c = 0; c < l.length; c++) { var d = l[c]; u.push(d.x, d.y); } return u; }, i = function(l) { return l.pstyle("width").pfValue * l.pstyle("arrow-scale").pfValue * 2; }, s = function(l, u) { gt(u) && (u = e[u]), e[l] = _t({ name: l, points: [-0.15, -0.3, 0.15, -0.3, 0.15, 0.3, -0.15, 0.3], collide: function(c, d, p, h, f, v) { var m = a(o(this.points, p + 2 * v, h, f)), g = ho(c, d, m); return g; }, roughCollide: n, draw: function(c, d, p, h) { var f = o(this.points, d, p, h); t.arrowShapeImpl("polygon")(c, f); }, spacing: function(c) { return 0; }, gap: i }, u); }; s("none", { collide: zg, roughCollide: zg, draw: v$, spacing: IO, gap: IO }), s("triangle", { points: [-0.15, -0.3, 0, 0, 0.15, -0.3] }), s("arrow", "triangle"), s("triangle-backcurve", { points: e.triangle.points, controlPoint: [0, -0.15], roughCollide: n, draw: function(l, u, c, d, p) { var h = o(this.points, u, c, d), f = this.controlPoint, v = r(f[0], f[1], u, c, d); t.arrowShapeImpl(this.name)(l, h, v); }, gap: function(l) { return i(l) * 0.8; } }), s("triangle-tee", { points: [0, 0, 0.15, -0.3, -0.15, -0.3, 0, 0], pointsTee: [-0.15, -0.4, -0.15, -0.5, 0.15, -0.5, 0.15, -0.4], collide: function(l, u, c, d, p, h, f) { var v = a(o(this.points, c + 2 * f, d, p)), m = a(o(this.pointsTee, c + 2 * f, d, p)), g = ho(l, u, v) || ho(l, u, m); return g; }, draw: function(l, u, c, d, p) { var h = o(this.points, u, c, d), f = o(this.pointsTee, u, c, d); t.arrowShapeImpl(this.name)(l, h, f); } }), s("circle-triangle", { radius: 0.15, pointsTr: [0, -0.15, 0.15, -0.45, -0.15, -0.45, 0, -0.15], collide: function(l, u, c, d, p, h, f) { var v = p, m = Math.pow(v.x - l, 2) + Math.pow(v.y - u, 2) <= Math.pow((c + 2 * f) * this.radius, 2), g = a(o(this.points, c + 2 * f, d, p)); return ho(l, u, g) || m; }, draw: function(l, u, c, d, p) { var h = o(this.pointsTr, u, c, d); t.arrowShapeImpl(this.name)(l, h, d.x, d.y, this.radius * u); }, spacing: function(l) { return t.getArrowWidth(l.pstyle("width").pfValue, l.pstyle("arrow-scale").value) * this.radius; } }), s("triangle-cross", { points: [0, 0, 0.15, -0.3, -0.15, -0.3, 0, 0], baseCrossLinePts: [ -0.15, -0.4, // first half of the rectangle -0.15, -0.4, 0.15, -0.4, // second half of the rectangle 0.15, -0.4 ], crossLinePts: function(l, u) { var c = this.baseCrossLinePts.slice(), d = u / l, p = 3, h = 5; return c[p] = c[p] - d, c[h] = c[h] - d, c; }, collide: function(l, u, c, d, p, h, f) { var v = a(o(this.points, c + 2 * f, d, p)), m = a(o(this.crossLinePts(c, h), c + 2 * f, d, p)), g = ho(l, u, v) || ho(l, u, m); return g; }, draw: function(l, u, c, d, p) { var h = o(this.points, u, c, d), f = o(this.crossLinePts(u, p), u, c, d); t.arrowShapeImpl(this.name)(l, h, f); } }), s("vee", { points: [-0.15, -0.3, 0, 0, 0.15, -0.3, 0, -0.15], gap: function(l) { return i(l) * 0.525; } }), s("circle", { radius: 0.15, collide: function(l, u, c, d, p, h, f) { var v = p, m = Math.pow(v.x - l, 2) + Math.pow(v.y - u, 2) <= Math.pow((c + 2 * f) * this.radius, 2); return m; }, draw: function(l, u, c, d, p) { t.arrowShapeImpl(this.name)(l, d.x, d.y, this.radius * u); }, spacing: function(l) { return t.getArrowWidth(l.pstyle("width").pfValue, l.pstyle("arrow-scale").value) * this.radius; } }), s("tee", { points: [-0.15, 0, -0.15, -0.1, 0.15, -0.1, 0.15, 0], spacing: function(l) { return 1; }, gap: function(l) { return 1; } }), s("square", { points: [-0.15, 0, 0.15, 0, 0.15, -0.3, -0.15, -0.3] }), s("diamond", { points: [-0.15, -0.15, 0, -0.3, 0.15, -0.15, 0, 0], gap: function(l) { return l.pstyle("width").pfValue * l.pstyle("arrow-scale").value; } }), s("chevron", { points: [0, 0, -0.15, -0.15, -0.1, -0.2, 0, -0.1, 0.1, -0.2, 0.15, -0.15], gap: function(l) { return 0.95 * l.pstyle("width").pfValue * l.pstyle("arrow-scale").value; } }); }; var Mu = {}; Mu.projectIntoViewport = function(e, t) { var n = this.cy, r = this.findContainerClientCoords(), o = r[0], a = r[1], i = r[4], s = n.pan(), l = n.zoom(), u = ((e - o) / i - s.x) / l, c = ((t - a) / i - s.y) / l; return [u, c]; }; Mu.findContainerClientCoords = function() { if (this.containerBB) return this.containerBB; var e = this.container, t = e.getBoundingClientRect(), n = this.cy.window().getComputedStyle(e), r = function(m) { return parseFloat(n.getPropertyValue(m)); }, o = { left: r("padding-left"), right: r("padding-right"), top: r("padding-top"), bottom: r("padding-bottom") }, a = { left: r("border-left-width"), right: r("border-right-width"), top: r("border-top-width"), bottom: r("border-bottom-width") }, i = e.clientWidth, s = e.clientHeight, l = o.left + o.right, u = o.top + o.bottom, c = a.left + a.right, d = t.width / (i + c), p = i - l, h = s - u, f = t.left + o.left + a.left, v = t.top + o.top + a.top; return this.containerBB = [f, v, p, h, d]; }; Mu.invalidateContainerClientCoordsCache = function() { this.containerBB = null; }; Mu.findNearestElement = function(e, t, n, r) { return this.findNearestElements(e, t, n, r)[0]; }; Mu.findNearestElements = function(e, t, n, r) { var o = this, a = this, i = a.getCachedZSortedEles(), s = [], l = a.cy.zoom(), u = a.cy.hasCompoundNodes(), c = (r ? 24 : 8) / l, d = (r ? 8 : 2) / l, p = (r ? 8 : 2) / l, h = 1 / 0, f, v; n && (i = i.interactive); function m(_, $) { if (_.isNode()) { if (v) return; v = _, s.push(_); } if (_.isEdge() && ($ == null || $ < h)) if (f) { if (f.pstyle("z-compound-depth").value === _.pstyle("z-compound-depth").value && f.pstyle("z-compound-depth").value === _.pstyle("z-compound-depth").value) { for (var O = 0; O < s.length; O++) if (s[O].isEdge()) { s[O] = _, f = _, h = $ ?? h; break; } } } else s.push(_), f = _, h = $ ?? h; } function g(_) { var $ = _.outerWidth() + 2 * d, O = _.outerHeight() + 2 * d, F = $ / 2, A = O / 2, T = _.position(), R = _.pstyle("corner-radius").value === "auto" ? "auto" : _.pstyle("corner-radius").pfValue, M = _._private.rscratch; if (T.x - F <= e && e <= T.x + F && T.y - A <= t && t <= T.y + A) { var j = a.nodeShapes[o.getNodeShape(_)]; if (j.checkPoint(e, t, 0, $, O, T.x, T.y, R, M)) return m(_, 0), !0; } } function b(_) { var $ = _._private, O = $.rscratch, F = _.pstyle("width").pfValue, A = _.pstyle("arrow-scale").value, T = F / 2 + c, R = T * T, M = T * 2, j = $.source, P = $.target, V; if (O.edgeType === "segments" || O.edgeType === "straight" || O.edgeType === "haystack") { for (var U = O.allpts, G = 0; G + 3 < U.length; G += 2) if (Kme(e, t, U[G], U[G + 1], U[G + 2], U[G + 3], M) && R > (V = Zme(e, t, U[G], U[G + 1], U[G + 2], U[G + 3]))) return m(_, V), !0; } else if (O.edgeType === "bezier" || O.edgeType === "multibezier" || O.edgeType === "self" || O.edgeType === "compound") { for (var U = O.allpts, G = 0; G + 5 < O.allpts.length; G += 4) if (Gme(e, t, U[G], U[G + 1], U[G + 2], U[G + 3], U[G + 4], U[G + 5], M) && R > (V = Xme(e, t, U[G], U[G + 1], U[G + 2], U[G + 3], U[G + 4], U[G + 5]))) return m(_, V), !0; } for (var j = j || $.source, P = P || $.target, se = o.getArrowWidth(F, A), ae = [{ name: "source", x: O.arrowStartX, y: O.arrowStartY, angle: O.srcArrowAngle }, { name: "target", x: O.arrowEndX, y: O.arrowEndY, angle: O.tgtArrowAngle }, { name: "mid-source", x: O.midX, y: O.midY, angle: O.midsrcArrowAngle }, { name: "mid-target", x: O.midX, y: O.midY, angle: O.midtgtArrowAngle }], G = 0; G < ae.length; G++) { var de = ae[G], me = a.arrowShapes[_.pstyle(de.name + "-arrow-shape").value], te = _.pstyle("width").pfValue; if (me.roughCollide(e, t, se, de.angle, { x: de.x, y: de.y }, te, c) && me.collide(e, t, se, de.angle, { x: de.x, y: de.y }, te, c)) return m(_), !0; } u && s.length > 0 && (g(j), g(P)); } function x(_, $, O) { return La(_, $, O); } function w(_, $) { var O = _._private, F = p, A; $ ? A = $ + "-" : A = "", _.boundingBox(); var T = O.labelBounds[$ || "main"], R = _.pstyle(A + "label").value, M = _.pstyle("text-events").strValue === "yes"; if (!(!M || !R)) { var j = x(O.rscratch, "labelX", $), P = x(O.rscratch, "labelY", $), V = x(O.rscratch, "labelAngle", $), U = _.pstyle(A + "text-margin-x").pfValue, G = _.pstyle(A + "text-margin-y").pfValue, se = T.x1 - F - U, ae = T.x2 + F - U, de = T.y1 - F - G, me = T.y2 + F - G; if (V) { var te = Math.cos(V), oe = Math.sin(V), ne = function(Ne, De) { return Ne = Ne - j, De = De - P, { x: Ne * te - De * oe + j, y: Ne * oe + De * te + P }; }, ee = ne(se, de), Z = ne(se, me), le = ne(ae, de), pe = ne(ae, me), ke = [ // with the margin added after the rotation is applied ee.x + U, ee.y + G, le.x + U, le.y + G, pe.x + U, pe.y + G, Z.x + U, Z.y + G ]; if (ho(e, t, ke)) return m(_), !0; } else if (Gc(T, e, t)) return m(_), !0; } } for (var k = i.length - 1; k >= 0; k--) { var C = i[k]; C.isNode() ? g(C) || w(C) : b(C) || w(C) || w(C, "source") || w(C, "target"); } return s; }; Mu.getAllInBox = function(e, t, n, r) { var o = this.getCachedZSortedEles().interactive, a = [], i = Math.min(e, n), s = Math.max(e, n), l = Math.min(t, r), u = Math.max(t, r); e = i, n = s, t = l, r = u; for (var c = Fo({ x1: e, y1: t, x2: n, y2: r }), d = 0; d < o.length; d++) { var p = o[d]; if (p.isNode()) { var h = p, f = h.boundingBox({ includeNodes: !0, includeEdges: !1, includeLabels: !1 }); y$(c, f) && !BB(f, c) && a.push(h); } else { var v = p, m = v._private, g = m.rscratch; if (g.startX != null && g.startY != null && !Gc(c, g.startX, g.startY) || g.endX != null && g.endY != null && !Gc(c, g.endX, g.endY)) continue; if (g.edgeType === "bezier" || g.edgeType === "multibezier" || g.edgeType === "self" || g.edgeType === "compound" || g.edgeType === "segments" || g.edgeType === "haystack") { for (var b = m.rstyle.bezierPts || m.rstyle.linePts || m.rstyle.haystackPts, x = !0, w = 0; w < b.length; w++) if (!qme(c, b[w])) { x = !1; break; } x && a.push(v); } else (g.edgeType === "haystack" || g.edgeType === "straight") && a.push(v); } } return a; }; var Gg = {}; Gg.calculateArrowAngles = function(e) { var t = e._private.rscratch, n = t.edgeType === "haystack", r = t.edgeType === "bezier", o = t.edgeType === "multibezier", a = t.edgeType === "segments", i = t.edgeType === "compound", s = t.edgeType === "self", l, u, c, d, p, h, g, b; if (n ? (c = t.haystackPts[0], d = t.haystackPts[1], p = t.haystackPts[2], h = t.haystackPts[3]) : (c = t.arrowStartX, d = t.arrowStartY, p = t.arrowEndX, h = t.arrowEndY), g = t.midX, b = t.midY, a) l = c - t.segpts[0], u = d - t.segpts[1]; else if (o || i || s || r) { var f = t.allpts, v = gr(f[0], f[2], f[4], 0.1), m = gr(f[1], f[3], f[5], 0.1); l = c - v, u = d - m; } else l = c - g, u = d - b; t.srcArrowAngle = rv(l, u); var g = t.midX, b = t.midY; if (n && (g = (c + p) / 2, b = (d + h) / 2), l = p - c, u = h - d, a) { var f = t.allpts; if (f.length / 2 % 2 === 0) { var x = f.length / 2, w = x - 2; l = f[x] - f[w], u = f[x + 1] - f[w + 1]; } else if (t.isRound) l = t.midVector[1], u = -t.midVector[0]; else { var x = f.length / 2 - 1, w = x - 2; l = f[x] - f[w], u = f[x + 1] - f[w + 1]; } } else if (o || i || s) { var f = t.allpts, k = t.ctrlpts, C, _, $, O; if (k.length / 2 % 2 === 0) { var F = f.length / 2 - 1, A = F + 2, T = A + 2; C = gr(f[F], f[A], f[T], 0), _ = gr(f[F + 1], f[A + 1], f[T + 1], 0), $ = gr(f[F], f[A], f[T], 1e-4), O = gr(f[F + 1], f[A + 1], f[T + 1], 1e-4); } else { var A = f.length / 2 - 1, F = A - 2, T = A + 2; C = gr(f[F], f[A], f[T], 0.4999), _ = gr(f[F + 1], f[A + 1], f[T + 1], 0.4999), $ = gr(f[F], f[A], f[T], 0.5), O = gr(f[F + 1], f[A + 1], f[T + 1], 0.5); } l = $ - C, u = O - _; } if (t.midtgtArrowAngle = rv(l, u), t.midDispX = l, t.midDispY = u, l *= -1, u *= -1, a) { var f = t.allpts; if (f.length / 2 % 2 !== 0 && !t.isRound) { var x = f.length / 2 - 1, R = x + 2; l = -(f[R] - f[x]), u = -(f[R + 1] - f[x + 1]); } } if (t.midsrcArrowAngle = rv(l, u), a) l = p - t.segpts[t.segpts.length - 2], u = h - t.segpts[t.segpts.length - 1]; else if (o || i || s || r) { var f = t.allpts, M = f.length, v = gr(f[M - 6], f[M - 4], f[M - 2], 0.9), m = gr(f[M - 5], f[M - 3], f[M - 1], 0.9); l = p - v, u = h - m; } else l = p - g, u = h - b; t.tgtArrowAngle = rv(l, u); }; Gg.getArrowWidth = Gg.getArrowHeight = function(e, t) { var n = this.arrowWidthCache = this.arrowWidthCache || {}, r = n[e + ", " + t]; return r || (r = Math.max(Math.pow(e * 13.37, 0.9), 29) * t, n[e + ", " + t] = r, r); }; var YC, XC, ni = {}, Ko = {}, CF, _F, Vl, Qv, Ri, Rl, zl, Qa, sc, pv, Az, Iz, ZC, JC, SF, $F = function(e, t, n) { n.x = t.x - e.x, n.y = t.y - e.y, n.len = Math.sqrt(n.x * n.x + n.y * n.y), n.nx = n.x / n.len, n.ny = n.y / n.len, n.ang = Math.atan2(n.ny, n.nx); }, I2e = function(e, t) { t.x = e.x * -1, t.y = e.y * -1, t.nx = e.nx * -1, t.ny = e.ny * -1, t.ang = e.ang > 0 ? -(Math.PI - e.ang) : Math.PI + e.ang; }, P2e = function(e, t, n, r, o) { if (e !== SF ? $F(t, e, ni) : I2e(Ko, ni), $F(t, n, Ko), CF = ni.nx * Ko.ny - ni.ny * Ko.nx, _F = ni.nx * Ko.nx - ni.ny * -Ko.ny, Ri = Math.asin(Math.max(-1, Math.min(1, CF))), Math.abs(Ri) < 1e-6) { YC = t.x, XC = t.y, zl = sc = 0; return; } Vl = 1, Qv = !1, _F < 0 ? Ri < 0 ? Ri = Math.PI + Ri : (Ri = Math.PI - Ri, Vl = -1, Qv = !0) : Ri > 0 && (Vl = -1, Qv = !0), t.radius !== void 0 ? sc = t.radius : sc = r, Rl = Ri / 2, pv = Math.min(ni.len / 2, Ko.len / 2), o ? (Qa = Math.abs(Math.cos(Rl) * sc / Math.sin(Rl)), Qa > pv ? (Qa = pv, zl = Math.abs(Qa * Math.sin(Rl) / Math.cos(Rl))) : zl = sc) : (Qa = Math.min(pv, sc), zl = Math.abs(Qa * Math.sin(Rl) / Math.cos(Rl))), ZC = t.x + Ko.nx * Qa, JC = t.y + Ko.ny * Qa, YC = ZC - Ko.ny * zl * Vl, XC = JC + Ko.nx * zl * Vl, Az = t.x + ni.nx * Qa, Iz = t.y + ni.ny * Qa, SF = t; }; function Pz(e, t) { t.radius === 0 ? e.lineTo(t.cx, t.cy) : e.arc(t.cx, t.cy, t.radius, t.startAngle, t.endAngle, t.counterClockwise); } function A$(e, t, n, r) { var o = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !0; return r === 0 || t.radius === 0 ? { cx: t.x, cy: t.y, radius: 0, startX: t.x, startY: t.y, stopX: t.x, stopY: t.y, startAngle: void 0, endAngle: void 0, counterClockwise: void 0 } : (P2e(e, t, n, r, o), { cx: YC, cy: XC, radius: zl, startX: Az, startY: Iz, stopX: ZC, stopY: JC, startAngle: ni.ang + Math.PI / 2 * Vl, endAngle: Ko.ang - Math.PI / 2 * Vl, counterClockwise: Qv }); } var Qr = {}; Qr.findMidptPtsEtc = function(e, t) { var n = t.posPts, r = t.intersectionPts, o = t.vectorNormInverse, a, i = e.pstyle("source-endpoint"), s = e.pstyle("target-endpoint"), l = i.units != null && s.units != null, u = function(w, k, C, _) { var $ = _ - k, O = C - w, F = Math.sqrt(O * O + $ * $); return { x: -$ / F, y: O / F }; }, c = e.pstyle("edge-distances").value; switch (c) { case "node-position": a = n; break; case "intersection": a = r; break; case "endpoints": { if (l) { var d = this.manualEndptToPx(e.source()[0], i), p = Ta(d, 2), h = p[0], f = p[1], v = this.manualEndptToPx(e.target()[0], s), m = Ta(v, 2), g = m[0], b = m[1], x = { x1: h, y1: f, x2: g, y2: b }; o = u(h, f, g, b), a = x; } else sn("Edge ".concat(e.id(), " has edge-distances:endpoints specified without manual endpoints specified via source-endpoint and target-endpoint. Falling back on edge-distances:intersection (default).")), a = r; break; } } return { midptPts: a, vectorNormInverse: o }; }; Qr.findHaystackPoints = function(e) { for (var t = 0; t < e.length; t++) { var n = e[t], r = n._private, o = r.rscratch; if (!o.haystack) { var a = Math.random() * 2 * Math.PI; o.source = { x: Math.cos(a), y: Math.sin(a) }, a = Math.random() * 2 * Math.PI, o.target = { x: Math.cos(a), y: Math.sin(a) }; } var i = r.source, s = r.target, l = i.position(), u = s.position(), c = i.width(), d = s.width(), p = i.height(), h = s.height(), f = n.pstyle("haystack-radius").value, v = f / 2; o.haystackPts = o.allpts = [o.source.x * c * v + l.x, o.source.y * p * v + l.y, o.target.x * d * v + u.x, o.target.y * h * v + u.y], o.midX = (o.allpts[0] + o.allpts[2]) / 2, o.midY = (o.allpts[1] + o.allpts[3]) / 2, o.edgeType = "haystack", o.haystack = !0, this.storeEdgeProjections(n), this.calculateArrowAngles(n), this.recalculateEdgeLabelProjections(n), this.calculateLabelAngles(n); } }; Qr.findSegmentsPoints = function(e, t) { var n = e._private.rscratch, r = e.pstyle("segment-weights"), o = e.pstyle("segment-distances"), a = e.pstyle("segment-radii"), i = e.pstyle("radius-type"), s = Math.min(r.pfValue.length, o.pfValue.length), l = a.pfValue[a.pfValue.length - 1], u = i.pfValue[i.pfValue.length - 1]; n.edgeType = "segments", n.segpts = [], n.radii = [], n.isArcRadius = []; for (var c = 0; c < s; c++) { var d = r.pfValue[c], p = o.pfValue[c], h = 1 - d, f = d, v = this.findMidptPtsEtc(e, t), m = v.midptPts, g = v.vectorNormInverse, b = { x: m.x1 * h + m.x2 * f, y: m.y1 * h + m.y2 * f }; n.segpts.push(b.x + g.x * p, b.y + g.y * p), n.radii.push(a.pfValue[c] !== void 0 ? a.pfValue[c] : l), n.isArcRadius.push((i.pfValue[c] !== void 0 ? i.pfValue[c] : u) === "arc-radius"); } }; Qr.findLoopPoints = function(e, t, n, r) { var o = e._private.rscratch, a = t.dirCounts, i = t.srcPos, s = e.pstyle("control-point-distances"), l = s ? s.pfValue[0] : void 0, u = e.pstyle("loop-direction").pfValue, c = e.pstyle("loop-sweep").pfValue, d = e.pstyle("control-point-step-size").pfValue; o.edgeType = "self"; var p = n, h = d; r && (p = 0, h = l); var f = u - Math.PI / 2, v = f - c / 2, m = f + c / 2, g = u + "_" + c; p = a[g] === void 0 ? a[g] = 0 : ++a[g], o.ctrlpts = [i.x + Math.cos(v) * 1.4 * h * (p / 3 + 1), i.y + Math.sin(v) * 1.4 * h * (p / 3 + 1), i.x + Math.cos(m) * 1.4 * h * (p / 3 + 1), i.y + Math.sin(m) * 1.4 * h * (p / 3 + 1)]; }; Qr.findCompoundLoopPoints = function(e, t, n, r) { var o = e._private.rscratch; o.edgeType = "compound"; var a = t.srcPos, i = t.tgtPos, s = t.srcW, l = t.srcH, u = t.tgtW, c = t.tgtH, d = e.pstyle("control-point-step-size").pfValue, p = e.pstyle("control-point-distances"), h = p ? p.pfValue[0] : void 0, f = n, v = d; r && (f = 0, v = h); var m = 50, g = { x: a.x - s / 2, y: a.y - l / 2 }, b = { x: i.x - u / 2, y: i.y - c / 2 }, x = { x: Math.min(g.x, b.x), y: Math.min(g.y, b.y) }, w = 0.5, k = Math.max(w, Math.log(s * 0.01)), C = Math.max(w, Math.log(u * 0.01)); o.ctrlpts = [x.x, x.y - (1 + Math.pow(m, 1.12) / 100) * v * (f / 3 + 1) * k, x.x - (1 + Math.pow(m, 1.12) / 100) * v * (f / 3 + 1) * C, x.y]; }; Qr.findStraightEdgePoints = function(e) { e._private.rscratch.edgeType = "straight"; }; Qr.findBezierPoints = function(e, t, n, r, o) { var a = e._private.rscratch, i = e.pstyle("control-point-step-size").pfValue, s = e.pstyle("control-point-distances"), l = e.pstyle("control-point-weights"), u = s && l ? Math.min(s.value.length, l.value.length) : 1, c = s ? s.pfValue[0] : void 0, d = l.value[0], p = r; a.edgeType = p ? "multibezier" : "bezier", a.ctrlpts = []; for (var h = 0; h < u; h++) { var f = (0.5 - t.eles.length / 2 + n) * i * (o ? -1 : 1), v = void 0, m = MB(f); p && (c = s ? s.pfValue[h] : i, d = l.value[h]), r ? v = c : v = c !== void 0 ? m * c : void 0; var g = v !== void 0 ? v : f, b = 1 - d, x = d, w = this.findMidptPtsEtc(e, t), k = w.midptPts, C = w.vectorNormInverse, _ = { x: k.x1 * b + k.x2 * x, y: k.y1 * b + k.y2 * x }; a.ctrlpts.push(_.x + C.x * g, _.y + C.y * g); } }; Qr.findTaxiPoints = function(e, t) { var n = e._private.rscratch; n.edgeType = "segments"; var r = "vertical", o = "horizontal", a = "leftward", i = "rightward", s = "downward", l = "upward", u = "auto", c = t.posPts, d = t.srcW, p = t.srcH, h = t.tgtW, f = t.tgtH, v = e.pstyle("edge-distances").value, m = v !== "node-position", g = e.pstyle("taxi-direction").value, b = g, x = e.pstyle("taxi-turn"), w = x.units === "%", k = x.pfValue, C = k < 0, _ = e.pstyle("taxi-turn-min-distance").pfValue, $ = m ? (d + h) / 2 : 0, O = m ? (p + f) / 2 : 0, F = c.x2 - c.x1, A = c.y2 - c.y1, T = function(lt, rt) { return lt > 0 ? Math.max(lt - rt, 0) : Math.min(lt + rt, 0); }, R = T(F, $), M = T(A, O), j = !1; b === u ? g = Math.abs(R) > Math.abs(M) ? o : r : b === l || b === s ? (g = r, j = !0) : (b === a || b === i) && (g = o, j = !0); var P = g === r, V = P ? M : R, U = P ? A : F, G = MB(U), se = !1; !(j && (w || C)) && (b === s && U < 0 || b === l && U > 0 || b === a && U > 0 || b === i && U < 0) && (G *= -1, V = G * Math.abs(V), se = !0); var ae; if (w) { var de = k < 0 ? 1 + k : k; ae = de * V; } else { var me = k < 0 ? V : 0; ae = me + k * G; } var te = function(lt) { return Math.abs(lt) < _ || Math.abs(lt) >= Math.abs(V); }, oe = te(ae), ne = te(Math.abs(V) - Math.abs(ae)), ee = oe || ne; if (ee && !se) if (P) { var Z = Math.abs(U) <= p / 2, le = Math.abs(F) <= h / 2; if (Z) { var pe = (c.x1 + c.x2) / 2, ke = c.y1, Ne = c.y2; n.segpts = [pe, ke, pe, Ne]; } else if (le) { var De = (c.y1 + c.y2) / 2, _e = c.x1, Fe = c.x2; n.segpts = [_e, De, Fe, De]; } else n.segpts = [c.x1, c.y2]; } else { var Ie = Math.abs(U) <= d / 2, Ae = Math.abs(A) <= f / 2; if (Ie) { var qe = (c.y1 + c.y2) / 2, et = c.x1, He = c.x2; n.segpts = [et, qe, He, qe]; } else if (Ae) { var ot = (c.x1 + c.x2) / 2, tt = c.y1, Qe = c.y2; n.segpts = [ot, tt, ot, Qe]; } else n.segpts = [c.x2, c.y1]; } else if (P) { var I = c.y1 + ae + (m ? p / 2 * G : 0), Y = c.x1, ve = c.x2; n.segpts = [Y, I, ve, I]; } else { var we = c.x1 + ae + (m ? d / 2 * G : 0), ye = c.y1, Pe = c.y2; n.segpts = [we, ye, we, Pe]; } if (n.isRound) { var Ce = e.pstyle("taxi-radius").value, ze = e.pstyle("radius-type").value[0] === "arc-radius"; n.radii = new Array(n.segpts.length / 2).fill(Ce), n.isArcRadius = new Array(n.segpts.length / 2).fill(ze); } }; Qr.tryToCorrectInvalidPoints = function(e, t) { var n = e._private.rscratch; if (n.edgeType === "bezier") { var r = t.srcPos, o = t.tgtPos, a = t.srcW, i = t.srcH, s = t.tgtW, l = t.tgtH, u = t.srcShape, c = t.tgtShape, d = t.srcCornerRadius, p = t.tgtCornerRadius, h = t.srcRs, f = t.tgtRs, v = !Ze(n.startX) || !Ze(n.startY), m = !Ze(n.arrowStartX) || !Ze(n.arrowStartY), g = !Ze(n.endX) || !Ze(n.endY), b = !Ze(n.arrowEndX) || !Ze(n.arrowEndY), x = 3, w = this.getArrowWidth(e.pstyle("width").pfValue, e.pstyle("arrow-scale").value) * this.arrowShapeWidth, k = x * w, C = fu({ x: n.ctrlpts[0], y: n.ctrlpts[1] }, { x: n.startX, y: n.startY }), _ = C < k, $ = fu({ x: n.ctrlpts[0], y: n.ctrlpts[1] }, { x: n.endX, y: n.endY }), O = $ < k, F = !1; if (v || m || _) { F = !0; var A = { // delta x: n.ctrlpts[0] - r.x, y: n.ctrlpts[1] - r.y }, T = Math.sqrt(A.x * A.x + A.y * A.y), R = { // normalised delta x: A.x / T, y: A.y / T }, M = Math.max(a, i), j = { // *2 radius guarantees outside shape x: n.ctrlpts[0] + R.x * 2 * M, y: n.ctrlpts[1] + R.y * 2 * M }, P = u.intersectLine(r.x, r.y, a, i, j.x, j.y, 0, d, h); _ ? (n.ctrlpts[0] = n.ctrlpts[0] + R.x * (k - C), n.ctrlpts[1] = n.ctrlpts[1] + R.y * (k - C)) : (n.ctrlpts[0] = P[0] + R.x * k, n.ctrlpts[1] = P[1] + R.y * k); } if (g || b || O) { F = !0; var V = { // delta x: n.ctrlpts[0] - o.x, y: n.ctrlpts[1] - o.y }, U = Math.sqrt(V.x * V.x + V.y * V.y), G = { // normalised delta x: V.x / U, y: V.y / U }, se = Math.max(a, i), ae = { // *2 radius guarantees outside shape x: n.ctrlpts[0] + G.x * 2 * se, y: n.ctrlpts[1] + G.y * 2 * se }, de = c.intersectLine(o.x, o.y, s, l, ae.x, ae.y, 0, p, f); O ? (n.ctrlpts[0] = n.ctrlpts[0] + G.x * (k - $), n.ctrlpts[1] = n.ctrlpts[1] + G.y * (k - $)) : (n.ctrlpts[0] = de[0] + G.x * k, n.ctrlpts[1] = de[1] + G.y * k); } F && this.findEndpoints(e); } }; Qr.storeAllpts = function(e) { var t = e._private.rscratch; if (t.edgeType === "multibezier" || t.edgeType === "bezier" || t.edgeType === "self" || t.edgeType === "compound") { t.allpts = [], t.allpts.push(t.startX, t.startY); for (var n = 0; n + 1 < t.ctrlpts.length; n += 2) t.allpts.push(t.ctrlpts[n], t.ctrlpts[n + 1]), n + 3 < t.ctrlpts.length && t.allpts.push((t.ctrlpts[n] + t.ctrlpts[n + 2]) / 2, (t.ctrlpts[n + 1] + t.ctrlpts[n + 3]) / 2); t.allpts.push(t.endX, t.endY); var r, o; t.ctrlpts.length / 2 % 2 === 0 ? (r = t.allpts.length / 2 - 1, t.midX = t.allpts[r], t.midY = t.allpts[r + 1]) : (r = t.allpts.length / 2 - 3, o = 0.5, t.midX = gr(t.allpts[r], t.allpts[r + 2], t.allpts[r + 4], o), t.midY = gr(t.allpts[r + 1], t.allpts[r + 3], t.allpts[r + 5], o)); } else if (t.edgeType === "straight") t.allpts = [t.startX, t.startY, t.endX, t.endY], t.midX = (t.startX + t.endX + t.arrowStartX + t.arrowEndX) / 4, t.midY = (t.startY + t.endY + t.arrowStartY + t.arrowEndY) / 4; else if (t.edgeType === "segments") { if (t.allpts = [], t.allpts.push(t.startX, t.startY), t.allpts.push.apply(t.allpts, t.segpts), t.allpts.push(t.endX, t.endY), t.isRound) { t.roundCorners = []; for (var a = 2; a + 3 < t.allpts.length; a += 2) { var i = t.radii[a / 2 - 1], s = t.isArcRadius[a / 2 - 1]; t.roundCorners.push(A$({ x: t.allpts[a - 2], y: t.allpts[a - 1] }, { x: t.allpts[a], y: t.allpts[a + 1], radius: i }, { x: t.allpts[a + 2], y: t.allpts[a + 3] }, i, s)); } } if (t.segpts.length % 4 === 0) { var l = t.segpts.length / 2, u = l - 2; t.midX = (t.segpts[u] + t.segpts[l]) / 2, t.midY = (t.segpts[u + 1] + t.segpts[l + 1]) / 2; } else { var c = t.segpts.length / 2 - 1; if (!t.isRound) t.midX = t.segpts[c], t.midY = t.segpts[c + 1]; else { var d = { x: t.segpts[c], y: t.segpts[c + 1] }, p = t.roundCorners[c / 2], h = [d.x - p.cx, d.y - p.cy], f = p.radius / Math.sqrt(Math.pow(h[0], 2) + Math.pow(h[1], 2)); h = h.map(function(v) { return v * f; }), t.midX = p.cx + h[0], t.midY = p.cy + h[1], t.midVector = h; } } } }; Qr.checkForInvalidEdgeWarning = function(e) { var t = e[0]._private.rscratch; t.nodesOverlap || Ze(t.startX) && Ze(t.startY) && Ze(t.endX) && Ze(t.endY) ? t.loggedErr = !1 : t.loggedErr || (t.loggedErr = !0, sn("Edge `" + e.id() + "` has invalid endpoints and so it is impossible to draw. Adjust your edge style (e.g. control points) accordingly or use an alternative edge type. This is expected behaviour when the source node and the target node overlap.")); }; Qr.findEdgeControlPoints = function(e) { var t = this; if (!(!e || e.length === 0)) { for (var n = this, r = n.cy, o = r.hasCompoundNodes(), a = { map: new ii(), get: function(C) { var _ = this.map.get(C[0]); return _ != null ? _.get(C[1]) : null; }, set: function(C, _) { var $ = this.map.get(C[0]); $ == null && ($ = new ii(), this.map.set(C[0], $)), $.set(C[1], _); } }, i = [], s = [], l = 0; l < e.length; l++) { var u = e[l], c = u._private, d = u.pstyle("curve-style").value; if (!(u.removed() || !u.takesUpSpace())) { if (d === "haystack") { s.push(u); continue; } var p = d === "unbundled-bezier" || d.endsWith("segments") || d === "straight" || d === "straight-triangle" || d.endsWith("taxi"), h = d === "unbundled-bezier" || d === "bezier", f = c.source, v = c.target, m = f.poolIndex(), g = v.poolIndex(), b = [m, g].sort(), x = a.get(b); x == null && (x = { eles: [] }, a.set(b, x), i.push(b)), x.eles.push(u), p && (x.hasUnbundled = !0), h && (x.hasBezier = !0); } } for (var w = function(C) { var _ = i[C], $ = a.get(_), O = void 0; if (!$.hasUnbundled) { var F = $.eles[0].parallelEdges().filter(function(ve) { return ve.isBundledBezier(); }); g$($.eles), F.forEach(function(ve) { return $.eles.push(ve); }), $.eles.sort(function(ve, we) { return ve.poolIndex() - we.poolIndex(); }); } var A = $.eles[0], T = A.source(), R = A.target(); if (T.poolIndex() > R.poolIndex()) { var M = T; T = R, R = M; } var j = $.srcPos = T.position(), P = $.tgtPos = R.position(), V = $.srcW = T.outerWidth(), U = $.srcH = T.outerHeight(), G = $.tgtW = R.outerWidth(), se = $.tgtH = R.outerHeight(), ae = $.srcShape = n.nodeShapes[t.getNodeShape(T)], de = $.tgtShape = n.nodeShapes[t.getNodeShape(R)], me = $.srcCornerRadius = T.pstyle("corner-radius").value === "auto" ? "auto" : T.pstyle("corner-radius").pfValue, te = $.tgtCornerRadius = R.pstyle("corner-radius").value === "auto" ? "auto" : R.pstyle("corner-radius").pfValue, oe = $.tgtRs = R._private.rscratch, ne = $.srcRs = T._private.rscratch; $.dirCounts = { north: 0, west: 0, south: 0, east: 0, northwest: 0, southwest: 0, northeast: 0, southeast: 0 }; for (var ee = 0; ee < $.eles.length; ee++) { var Z = $.eles[ee], le = Z[0]._private.rscratch, pe = Z.pstyle("curve-style").value, ke = pe === "unbundled-bezier" || pe.endsWith("segments") || pe.endsWith("taxi"), Ne = !T.same(Z.source()); if (!$.calculatedIntersection && T !== R && ($.hasBezier || $.hasUnbundled)) { $.calculatedIntersection = !0; var De = ae.intersectLine(j.x, j.y, V, U, P.x, P.y, 0, me, ne), _e = $.srcIntn = De, Fe = de.intersectLine(P.x, P.y, G, se, j.x, j.y, 0, te, oe), Ie = $.tgtIntn = Fe, Ae = $.intersectionPts = { x1: De[0], x2: Fe[0], y1: De[1], y2: Fe[1] }, qe = $.posPts = { x1: j.x, x2: P.x, y1: j.y, y2: P.y }, et = Fe[1] - De[1], He = Fe[0] - De[0], ot = Math.sqrt(He * He + et * et), tt = $.vector = { x: He, y: et }, Qe = $.vectorNorm = { x: tt.x / ot, y: tt.y / ot }, I = { x: -Qe.y, y: Qe.x }; $.nodesOverlap = !Ze(ot) || de.checkPoint(De[0], De[1], 0, G, se, P.x, P.y, te, oe) || ae.checkPoint(Fe[0], Fe[1], 0, V, U, j.x, j.y, me, ne), $.vectorNormInverse = I, O = { nodesOverlap: $.nodesOverlap, dirCounts: $.dirCounts, calculatedIntersection: !0, hasBezier: $.hasBezier, hasUnbundled: $.hasUnbundled, eles: $.eles, srcPos: P, tgtPos: j, srcW: G, srcH: se, tgtW: V, tgtH: U, srcIntn: Ie, tgtIntn: _e, srcShape: de, tgtShape: ae, posPts: { x1: qe.x2, y1: qe.y2, x2: qe.x1, y2: qe.y1 }, intersectionPts: { x1: Ae.x2, y1: Ae.y2, x2: Ae.x1, y2: Ae.y1 }, vector: { x: -tt.x, y: -tt.y }, vectorNorm: { x: -Qe.x, y: -Qe.y }, vectorNormInverse: { x: -I.x, y: -I.y } }; } var Y = Ne ? O : $; le.nodesOverlap = Y.nodesOverlap, le.srcIntn = Y.srcIntn, le.tgtIntn = Y.tgtIntn, le.isRound = pe.startsWith("round"), o && (T.isParent() || T.isChild() || R.isParent() || R.isChild()) && (T.parents().anySame(R) || R.parents().anySame(T) || T.same(R) && T.isParent()) ? t.findCompoundLoopPoints(Z, Y, ee, ke) : T === R ? t.findLoopPoints(Z, Y, ee, ke) : pe.endsWith("segments") ? t.findSegmentsPoints(Z, Y) : pe.endsWith("taxi") ? t.findTaxiPoints(Z, Y) : pe === "straight" || !ke && $.eles.length % 2 === 1 && ee === Math.floor($.eles.length / 2) ? t.findStraightEdgePoints(Z) : t.findBezierPoints(Z, Y, ee, ke, Ne), t.findEndpoints(Z), t.tryToCorrectInvalidPoints(Z, Y), t.checkForInvalidEdgeWarning(Z), t.storeAllpts(Z), t.storeEdgeProjections(Z), t.calculateArrowAngles(Z), t.recalculateEdgeLabelProjections(Z), t.calculateLabelAngles(Z); } }, k = 0; k < i.length; k++) w(k); this.findHaystackPoints(s); } }; function Lz(e) { var t = []; if (e != null) { for (var n = 0; n < e.length; n += 2) { var r = e[n], o = e[n + 1]; t.push({ x: r, y: o }); } return t; } } Qr.getSegmentPoints = function(e) { var t = e[0]._private.rscratch, n = t.edgeType; if (n === "segments") return this.recalculateRenderedStyle(e), Lz(t.segpts); }; Qr.getControlPoints = function(e) { var t = e[0]._private.rscratch, n = t.edgeType; if (n === "bezier" || n === "multibezier" || n === "self" || n === "compound") return this.recalculateRenderedStyle(e), Lz(t.ctrlpts); }; Qr.getEdgeMidpoint = function(e) { var t = e[0]._private.rscratch; return this.recalculateRenderedStyle(e), { x: t.midX, y: t.midY }; }; var ih = {}; ih.manualEndptToPx = function(e, t) { var n = this, r = e.position(), o = e.outerWidth(), a = e.outerHeight(), i = e._private.rscratch; if (t.value.length === 2) { var s = [t.pfValue[0], t.pfValue[1]]; return t.units[0] === "%" && (s[0] = s[0] * o), t.units[1] === "%" && (s[1] = s[1] * a), s[0] += r.x, s[1] += r.y, s; } else { var l = t.pfValue[0]; l = -Math.PI / 2 + l; var u = 2 * Math.max(o, a), c = [r.x + Math.cos(l) * u, r.y + Math.sin(l) * u]; return n.nodeShapes[this.getNodeShape(e)].intersectLine(r.x, r.y, o, a, c[0], c[1], 0, e.pstyle("corner-radius").value === "auto" ? "auto" : e.pstyle("corner-radius").pfValue, i); } }; ih.findEndpoints = function(e) { var t = this, n, r = e.source()[0], o = e.target()[0], a = r.position(), i = o.position(), s = e.pstyle("target-arrow-shape").value, l = e.pstyle("source-arrow-shape").value, u = e.pstyle("target-distance-from-node").pfValue, c = e.pstyle("source-distance-from-node").pfValue, d = r._private.rscratch, p = o._private.rscratch, h = e.pstyle("curve-style").value, f = e._private.rscratch, v = f.edgeType, m = h === "taxi", g = v === "self" || v === "compound", b = v === "bezier" || v === "multibezier" || g, x = v !== "bezier", w = v === "straight" || v === "segments", k = v === "segments", C = b || x || w, _ = g || m, $ = e.pstyle("source-endpoint"), O = _ ? "outside-to-node" : $.value, F = r.pstyle("corner-radius").value === "auto" ? "auto" : r.pstyle("corner-radius").pfValue, A = e.pstyle("target-endpoint"), T = _ ? "outside-to-node" : A.value, R = o.pstyle("corner-radius").value === "auto" ? "auto" : o.pstyle("corner-radius").pfValue; f.srcManEndpt = $, f.tgtManEndpt = A; var M, j, P, V; if (b) { var U = [f.ctrlpts[0], f.ctrlpts[1]], G = x ? [f.ctrlpts[f.ctrlpts.length - 2], f.ctrlpts[f.ctrlpts.length - 1]] : U; M = G, j = U; } else if (w) { var se = k ? f.segpts.slice(0, 2) : [i.x, i.y], ae = k ? f.segpts.slice(f.segpts.length - 2) : [a.x, a.y]; M = ae, j = se; } if (T === "inside-to-node") n = [i.x, i.y]; else if (A.units) n = this.manualEndptToPx(o, A); else if (T === "outside-to-line") n = f.tgtIntn; else if (T === "outside-to-node" || T === "outside-to-node-or-label" ? P = M : (T === "outside-to-line" || T === "outside-to-line-or-label") && (P = [a.x, a.y]), n = t.nodeShapes[this.getNodeShape(o)].intersectLine(i.x, i.y, o.outerWidth(), o.outerHeight(), P[0], P[1], 0, R, p), T === "outside-to-node-or-label" || T === "outside-to-line-or-label") { var de = o._private.rscratch, me = de.labelWidth, te = de.labelHeight, oe = de.labelX, ne = de.labelY, ee = me / 2, Z = te / 2, le = o.pstyle("text-valign").value; le === "top" ? ne -= Z : le === "bottom" && (ne += Z); var pe = o.pstyle("text-halign").value; pe === "left" ? oe -= ee : pe === "right" && (oe += ee); var ke = cf(P[0], P[1], [oe - ee, ne - Z, oe + ee, ne - Z, oe + ee, ne + Z, oe - ee, ne + Z], i.x, i.y); if (ke.length > 0) { var Ne = a, De = Dl(Ne, xc(n)), _e = Dl(Ne, xc(ke)), Fe = De; if (_e < De && (n = ke, Fe = _e), ke.length > 2) { var Ie = Dl(Ne, { x: ke[2], y: ke[3] }); Ie < Fe && (n = [ke[2], ke[3]]); } } } var Ae = ov(n, M, t.arrowShapes[s].spacing(e) + u), qe = ov(n, M, t.arrowShapes[s].gap(e) + u); if (f.endX = qe[0], f.endY = qe[1], f.arrowEndX = Ae[0], f.arrowEndY = Ae[1], O === "inside-to-node") n = [a.x, a.y]; else if ($.units) n = this.manualEndptToPx(r, $); else if (O === "outside-to-line") n = f.srcIntn; else if (O === "outside-to-node" || O === "outside-to-node-or-label" ? V = j : (O === "outside-to-line" || O === "outside-to-line-or-label") && (V = [i.x, i.y]), n = t.nodeShapes[this.getNodeShape(r)].intersectLine(a.x, a.y, r.outerWidth(), r.outerHeight(), V[0], V[1], 0, F, d), O === "outside-to-node-or-label" || O === "outside-to-line-or-label") { var et = r._private.rscratch, He = et.labelWidth, ot = et.labelHeight, tt = et.labelX, Qe = et.labelY, I = He / 2, Y = ot / 2, ve = r.pstyle("text-valign").value; ve === "top" ? Qe -= Y : ve === "bottom" && (Qe += Y); var we = r.pstyle("text-halign").value; we === "left" ? tt -= I : we === "right" && (tt += I); var ye = cf(V[0], V[1], [tt - I, Qe - Y, tt + I, Qe - Y, tt + I, Qe + Y, tt - I, Qe + Y], a.x, a.y); if (ye.length > 0) { var Pe = i, Ce = Dl(Pe, xc(n)), ze = Dl(Pe, xc(ye)), lt = Ce; if (ze < Ce && (n = [ye[0], ye[1]], lt = ze), ye.length > 2) { var rt = Dl(Pe, { x: ye[2], y: ye[3] }); rt < lt && (n = [ye[2], ye[3]]); } } } var fe = ov(n, j, t.arrowShapes[l].spacing(e) + c), Te = ov(n, j, t.arrowShapes[l].gap(e) + c); f.startX = Te[0], f.startY = Te[1], f.arrowStartX = fe[0], f.arrowStartY = fe[1], C && (!Ze(f.startX) || !Ze(f.startY) || !Ze(f.endX) || !Ze(f.endY) ? f.badLine = !0 : f.badLine = !1); }; ih.getSourceEndpoint = function(e) { var t = e[0]._private.rscratch; switch (this.recalculateRenderedStyle(e), t.edgeType) { case "haystack": return { x: t.haystackPts[0], y: t.haystackPts[1] }; default: return { x: t.arrowStartX, y: t.arrowStartY }; } }; ih.getTargetEndpoint = function(e) { var t = e[0]._private.rscratch; switch (this.recalculateRenderedStyle(e), t.edgeType) { case "haystack": return { x: t.haystackPts[2], y: t.haystackPts[3] }; default: return { x: t.arrowEndX, y: t.arrowEndY }; } }; var I$ = {}; function L2e(e, t, n) { for (var r = function(l, u, c, d) { return gr(l, u, c, d); }, o = t._private, a = o.rstyle.bezierPts, i = 0; i < e.bezierProjPcts.length; i++) { var s = e.bezierProjPcts[i]; a.push({ x: r(n[0], n[2], n[4], s), y: r(n[1], n[3], n[5], s) }); } } I$.storeEdgeProjections = function(e) { var t = e._private, n = t.rscratch, r = n.edgeType; if (t.rstyle.bezierPts = null, t.rstyle.linePts = null, t.rstyle.haystackPts = null, r === "multibezier" || r === "bezier" || r === "self" || r === "compound") { t.rstyle.bezierPts = []; for (var o = 0; o + 5 < n.allpts.length; o += 4) L2e(this, e, n.allpts.slice(o, o + 6)); } else if (r === "segments") for (var a = t.rstyle.linePts = [], o = 0; o + 1 < n.allpts.length; o += 2) a.push({ x: n.allpts[o], y: n.allpts[o + 1] }); else if (r === "haystack") { var i = n.haystackPts; t.rstyle.haystackPts = [{ x: i[0], y: i[1] }, { x: i[2], y: i[3] }]; } t.rstyle.arrowWidth = this.getArrowWidth(e.pstyle("width").pfValue, e.pstyle("arrow-scale").value) * this.arrowShapeWidth; }; I$.recalculateEdgeProjections = function(e) { this.findEdgeControlPoints(e); }; var Fi = {}; Fi.recalculateNodeLabelProjection = function(e) { var t = e.pstyle("label").strValue; if (!ol(t)) { var n, r, o = e._private, a = e.width(), i = e.height(), s = e.padding(), l = e.position(), u = e.pstyle("text-halign").strValue, c = e.pstyle("text-valign").strValue, d = o.rscratch, p = o.rstyle; switch (u) { case "left": n = l.x - a / 2 - s; break; case "right": n = l.x + a / 2 + s; break; default: n = l.x; } switch (c) { case "top": r = l.y - i / 2 - s; break; case "bottom": r = l.y + i / 2 + s; break; default: r = l.y; } d.labelX = n, d.labelY = r, p.labelX = n, p.labelY = r, this.calculateLabelAngles(e), this.applyLabelDimensions(e); } }; var Rz = function(e, t) { var n = Math.atan(t / e); return e === 0 && n < 0 && (n = n * -1), n; }, Nz = function(e, t) { var n = t.x - e.x, r = t.y - e.y; return Rz(n, r); }, R2e = function(e, t, n, r) { var o = uf(0, r - 1e-3, 1), a = uf(0, r + 1e-3, 1), i = Sc(e, t, n, o), s = Sc(e, t, n, a); return Nz(i, s); }; Fi.recalculateEdgeLabelProjections = function(e) { var t, n = e._private, r = n.rscratch, o = this, a = { mid: e.pstyle("label").strValue, source: e.pstyle("source-label").strValue, target: e.pstyle("target-label").strValue }; if (a.mid || a.source || a.target) { t = { x: r.midX, y: r.midY }; var i = function(c, d, p) { zs(n.rscratch, c, d, p), zs(n.rstyle, c, d, p); }; i("labelX", null, t.x), i("labelY", null, t.y); var s = Rz(r.midDispX, r.midDispY); i("labelAutoAngle", null, s); var l = function c() { if (c.cache) return c.cache; for (var d = [], p = 0; p + 5 < r.allpts.length; p += 4) { var h = { x: r.allpts[p], y: r.allpts[p + 1] }, f = { x: r.allpts[p + 2], y: r.allpts[p + 3] }, v = { x: r.allpts[p + 4], y: r.allpts[p + 5] }; d.push({ p0: h, p1: f, p2: v, startDist: 0, length: 0, segments: [] }); } var m = n.rstyle.bezierPts, g = o.bezierProjPcts.length; function b(_, $, O, F, A) { var T = fu($, O), R = _.segments[_.segments.length - 1], M = { p0: $, p1: O, t0: F, t1: A, startDist: R ? R.startDist + R.length : 0, length: T }; _.segments.push(M), _.length += T; } for (var x = 0; x < d.length; x++) { var w = d[x], k = d[x - 1]; k && (w.startDist = k.startDist + k.length), b(w, w.p0, m[x * g], 0, o.bezierProjPcts[0]); for (var C = 0; C < g - 1; C++) b(w, m[x * g + C], m[x * g + C + 1], o.bezierProjPcts[C], o.bezierProjPcts[C + 1]); b(w, m[x * g + g - 1], w.p2, o.bezierProjPcts[g - 1], 1); } return c.cache = d; }, u = function(c) { var d, p = c === "source"; if (a[c]) { var h = e.pstyle(c + "-text-offset").pfValue; switch (r.edgeType) { case "self": case "compound": case "bezier": case "multibezier": { for (var f = l(), v, m = 0, g = 0, b = 0; b < f.length; b++) { for (var x = f[p ? b : f.length - 1 - b], w = 0; w < x.segments.length; w++) { var k = x.segments[p ? w : x.segments.length - 1 - w], C = b === f.length - 1 && w === x.segments.length - 1; if (m = g, g += k.length, g >= h || C) { v = { cp: x, segment: k }; break; } } if (v) break; } var _ = v.cp, $ = v.segment, O = (h - m) / $.length, F = $.t1 - $.t0, A = p ? $.t0 + F * O : $.t1 - F * O; A = uf(0, A, 1), t = Sc(_.p0, _.p1, _.p2, A), d = R2e(_.p0, _.p1, _.p2, A); break; } case "straight": case "segments": case "haystack": { for (var T = 0, R, M, j, P, V = r.allpts.length, U = 0; U + 3 < V && (p ? (j = { x: r.allpts[U], y: r.allpts[U + 1] }, P = { x: r.allpts[U + 2], y: r.allpts[U + 3] }) : (j = { x: r.allpts[V - 2 - U], y: r.allpts[V - 1 - U] }, P = { x: r.allpts[V - 4 - U], y: r.allpts[V - 3 - U] }), R = fu(j, P), M = T, T += R, !(T >= h)); U += 2) ; var G = h - M, se = G / R; se = uf(0, se, 1), t = zme(j, P, se), d = Nz(j, P); break; } } i("labelX", c, t.x), i("labelY", c, t.y), i("labelAutoAngle", c, d); } }; u("source"), u("target"), this.applyLabelDimensions(e); } }; Fi.applyLabelDimensions = function(e) { this.applyPrefixedLabelDimensions(e), e.isEdge() && (this.applyPrefixedLabelDimensions(e, "source"), this.applyPrefixedLabelDimensions(e, "target")); }; Fi.applyPrefixedLabelDimensions = function(e, t) { var n = e._private, r = this.getLabelText(e, t), o = this.calculateLabelDimensions(e, r), a = e.pstyle("line-height").pfValue, i = e.pstyle("text-wrap").strValue, s = La(n.rscratch, "labelWrapCachedLines", t) || [], l = i !== "wrap" ? 1 : Math.max(s.length, 1), u = o.height / l, c = u * a, d = o.width, p = o.height + (l - 1) * (a - 1) * u; zs(n.rstyle, "labelWidth", t, d), zs(n.rscratch, "labelWidth", t, d), zs(n.rstyle, "labelHeight", t, p), zs(n.rscratch, "labelHeight", t, p), zs(n.rscratch, "labelLineHeight", t, c); }; Fi.getLabelText = function(e, t) { var n = e._private, r = t ? t + "-" : "", o = e.pstyle(r + "label").strValue, a = e.pstyle("text-transform").value, i = function(de, me) { return me ? (zs(n.rscratch, de, t, me), me) : La(n.rscratch, de, t); }; if (!o) return ""; a == "none" || (a == "uppercase" ? o = o.toUpperCase() : a == "lowercase" && (o = o.toLowerCase())); var s = e.pstyle("text-wrap").value; if (s === "wrap") { var l = i("labelKey"); if (l != null && i("labelWrapKey") === l) return i("labelWrapCachedText"); for (var u = "​", c = o.split(` `), d = e.pstyle("text-max-width").pfValue, p = e.pstyle("text-overflow-wrap").value, h = p === "anywhere", f = [], v = /[\s\u200b]+|$/g, m = 0; m < c.length; m++) { var g = c[m], b = this.calculateLabelDimensions(e, g), x = b.width; if (h) { var w = g.split("").join(u); g = w; } if (x > d) { var k = g.matchAll(v), C = "", _ = 0, $ = yB(k), O; try { for ($.s(); !(O = $.n()).done; ) { var F = O.value, A = F[0], T = g.substring(_, F.index); _ = F.index + A.length; var R = C.length === 0 ? T : C + T + A, M = this.calculateLabelDimensions(e, R), j = M.width; j <= d ? C += T + A : (C && f.push(C), C = T + A); } } catch (de) { $.e(de); } finally { $.f(); } C.match(/^[\s\u200b]+$/) || f.push(C); } else f.push(g); } i("labelWrapCachedLines", f), o = i("labelWrapCachedText", f.join(` `)), i("labelWrapKey", l); } else if (s === "ellipsis") { var P = e.pstyle("text-max-width").pfValue, V = "", U = "…", G = !1; if (this.calculateLabelDimensions(e, o).width < P) return o; for (var se = 0; se < o.length; se++) { var ae = this.calculateLabelDimensions(e, V + o[se] + U).width; if (ae > P) break; V += o[se], se === o.length - 1 && (G = !0); } return G || (V += U), V; } return o; }; Fi.getLabelJustification = function(e) { var t = e.pstyle("text-justification").strValue, n = e.pstyle("text-halign").strValue; if (t === "auto") if (e.isNode()) switch (n) { case "left": return "right"; case "right": return "left"; default: return "center"; } else return "center"; else return t; }; Fi.calculateLabelDimensions = function(e, t) { var n = this, r = n.cy.window(), o = r.document, a = pu(t, e._private.labelDimsKey), i = n.labelDimCache || (n.labelDimCache = []), s = i[a]; if (s != null) return s; var l = 0, u = e.pstyle("font-style").strValue, c = e.pstyle("font-size").pfValue, d = e.pstyle("font-family").strValue, p = e.pstyle("font-weight").strValue, h = this.labelCalcCanvas, f = this.labelCalcCanvasContext; if (!h) { h = this.labelCalcCanvas = o.createElement("canvas"), f = this.labelCalcCanvasContext = h.getContext("2d"); var v = h.style; v.position = "absolute", v.left = "-9999px", v.top = "-9999px", v.zIndex = "-1", v.visibility = "hidden", v.pointerEvents = "none"; } f.font = "".concat(u, " ").concat(p, " ").concat(c, "px ").concat(d); for (var m = 0, g = 0, b = t.split(` `), x = 0; x < b.length; x++) { var w = b[x], k = f.measureText(w), C = Math.ceil(k.width), _ = c; m = Math.max(C, m), g += _; } return m += l, g += l, i[a] = { width: m, height: g }; }; Fi.calculateLabelAngle = function(e, t) { var n = e._private, r = n.rscratch, o = e.isEdge(), a = t ? t + "-" : "", i = e.pstyle(a + "text-rotation"), s = i.strValue; return s === "none" ? 0 : o && s === "autorotate" ? r.labelAutoAngle : s === "autorotate" ? 0 : i.pfValue; }; Fi.calculateLabelAngles = function(e) { var t = this, n = e.isEdge(), r = e._private, o = r.rscratch; o.labelAngle = t.calculateLabelAngle(e), n && (o.sourceLabelAngle = t.calculateLabelAngle(e, "source"), o.targetLabelAngle = t.calculateLabelAngle(e, "target")); }; var Mz = {}, EF = 28, OF = !1; Mz.getNodeShape = function(e) { var t = this, n = e.pstyle("shape").value; if (n === "cutrectangle" && (e.width() < EF || e.height() < EF)) return OF || (sn("The `cutrectangle` node shape can not be used at small sizes so `rectangle` is used instead"), OF = !0), "rectangle"; if (e.isParent()) return n === "rectangle" || n === "roundrectangle" || n === "round-rectangle" || n === "cutrectangle" || n === "cut-rectangle" || n === "barrel" ? n : "rectangle"; if (n === "polygon") { var r = e.pstyle("shape-polygon-points").value; return t.nodeShapes.makePolygon(r).name; } return n; }; var Em = {}; Em.registerCalculationListeners = function() { var e = this.cy, t = e.collection(), n = this, r = function(a) { var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0; if (t.merge(a), i) for (var s = 0; s < a.length; s++) { var l = a[s], u = l._private, c = u.rstyle; c.clean = !1, c.cleanConnected = !1; } }; n.binder(e).on("bounds.* dirty.*", function(a) { var i = a.target; r(i); }).on("style.* background.*", function(a) { var i = a.target; r(i, !1); }); var o = function(a) { if (a) { var i = n.onUpdateEleCalcsFns; t.cleanStyle(); for (var s = 0; s < t.length; s++) { var l = t[s], u = l._private.rstyle; l.isNode() && !u.cleanConnected && (r(l.connectedEdges()), u.cleanConnected = !0); } if (i) for (var c = 0; c < i.length; c++) { var d = i[c]; d(a, t); } n.recalculateRenderedStyle(t), t = e.collection(); } }; n.flushRenderedStyleQueue = function() { o(!0); }, n.beforeRender(o, n.beforeRenderPriorities.eleCalcs); }; Em.onUpdateEleCalcs = function(e) { var t = this.onUpdateEleCalcsFns = this.onUpdateEleCalcsFns || []; t.push(e); }; Em.recalculateRenderedStyle = function(e, t) { var n = function(x) { return x._private.rstyle.cleanConnected; }, r = [], o = []; if (!this.destroyed) { t === void 0 && (t = !0); for (var a = 0; a < e.length; a++) { var i = e[a], s = i._private, l = s.rstyle; i.isEdge() && (!n(i.source()) || !n(i.target())) && (l.clean = !1), !(t && l.clean || i.removed()) && i.pstyle("display").value !== "none" && (s.group === "nodes" ? o.push(i) : r.push(i), l.clean = !0); } for (var u = 0; u < o.length; u++) { var c = o[u], d = c._private, p = d.rstyle, h = c.position(); this.recalculateNodeLabelProjection(c), p.nodeX = h.x, p.nodeY = h.y, p.nodeW = c.pstyle("width").pfValue, p.nodeH = c.pstyle("height").pfValue; } this.recalculateEdgeProjections(r); for (var f = 0; f < r.length; f++) { var v = r[f], m = v._private, g = m.rstyle, b = m.rscratch; g.srcX = b.arrowStartX, g.srcY = b.arrowStartY, g.tgtX = b.arrowEndX, g.tgtY = b.arrowEndY, g.midX = b.midX, g.midY = b.midY, g.labelAngle = b.labelAngle, g.sourceLabelAngle = b.sourceLabelAngle, g.targetLabelAngle = b.targetLabelAngle; } } }; var Om = {}; Om.updateCachedGrabbedEles = function() { var e = this.cachedZSortedEles; if (e) { e.drag = [], e.nondrag = []; for (var t = [], n = 0; n < e.length; n++) { var r = e[n], o = r._private.rscratch; r.grabbed() && !r.isParent() ? t.push(r) : o.inDragLayer ? e.drag.push(r) : e.nondrag.push(r); } for (var n = 0; n < t.length; n++) { var r = t[n]; e.drag.push(r); } } }; Om.invalidateCachedZSortedEles = function() { this.cachedZSortedEles = null; }; Om.getCachedZSortedEles = function(e) { if (e || !this.cachedZSortedEles) { var t = this.cy.mutableElements().toArray(); t.sort(wz), t.interactive = t.filter(function(n) { return n.interactive(); }), this.cachedZSortedEles = t, this.updateCachedGrabbedEles(); } else t = this.cachedZSortedEles; return t; }; var Dz = {}; [Mu, Gg, Qr, ih, I$, Fi, Mz, Em, Om].forEach(function(e) { _t(Dz, e); }); var Bz = {}; Bz.getCachedImage = function(e, t, n) { var r = this, o = r.imageCache = r.imageCache || {}, a = o[e]; if (a) return a.image.complete || a.image.addEventListener("load", n), a.image; a = o[e] = o[e] || {}; var i = a.image = new Image(); i.addEventListener("load", n), i.addEventListener("error", function() { i.error = !0; }); var s = "data:", l = e.substring(0, s.length).toLowerCase() === s; return l || (t = t === "null" ? null : t, i.crossOrigin = t), i.src = e, i; }; var Cd = {}; Cd.registerBinding = function(e, t, n, r) { var o = Array.prototype.slice.apply(arguments, [1]), a = this.binder(e); return a.on.apply(a, o); }; Cd.binder = function(e) { var t = this, n = t.cy.window(), r = e === n || e === n.document || e === n.document.body || i0e(e); if (t.supportsPassiveEvents == null) { var o = !1; try { var a = Object.defineProperty({}, "passive", { get: function() { return o = !0, !0; } }); n.addEventListener("test", null, a); } catch { } t.supportsPassiveEvents = o; } var i = function(s, l, u) { var c = Array.prototype.slice.call(arguments); return r && t.supportsPassiveEvents && (c[2] = { capture: u ?? !1, passive: !1, once: !1 }), t.bindings.push({ target: e, args: c }), (e.addEventListener || e.on).apply(e, c), this; }; return { on: i, addEventListener: i, addListener: i, bind: i }; }; Cd.nodeIsDraggable = function(e) { return e && e.isNode() && !e.locked() && e.grabbable(); }; Cd.nodeIsGrabbable = function(e) { return this.nodeIsDraggable(e) && e.interactive(); }; Cd.load = function() { var e = this, t = e.cy.window(), n = function(I) { return I.selected(); }, r = function(I, Y, ve, we) { I == null && (I = e.cy); for (var ye = 0; ye < Y.length; ye++) { var Pe = Y[ye]; I.emit({ originalEvent: ve, type: Pe, position: we }); } }, o = function(I) { return I.shiftKey || I.metaKey || I.ctrlKey; }, a = function(I, Y) { var ve = !0; if (e.cy.hasCompoundNodes() && I && I.pannable()) for (var we = 0; Y && we < Y.length; we++) { var I = Y[we]; if (I.isNode() && I.isParent() && !I.pannable()) { ve = !1; break; } } else ve = !0; return ve; }, i = function(I) { I[0]._private.grabbed = !0; }, s = function(I) { I[0]._private.grabbed = !1; }, l = function(I) { I[0]._private.rscratch.inDragLayer = !0; }, u = function(I) { I[0]._private.rscratch.inDragLayer = !1; }, c = function(I) { I[0]._private.rscratch.isGrabTarget = !0; }, d = function(I) { I[0]._private.rscratch.isGrabTarget = !1; }, p = function(I, Y) { var ve = Y.addToList, we = ve.has(I); !we && I.grabbable() && !I.locked() && (ve.merge(I), i(I)); }, h = function(I, Y) { if (I.cy().hasCompoundNodes() && !(Y.inDragLayer == null && Y.addToList == null)) { var ve = I.descendants(); Y.inDragLayer && (ve.forEach(l), ve.connectedEdges().forEach(l)), Y.addToList && p(ve, Y); } }, f = function(I, Y) { Y = Y || {}; var ve = I.cy().hasCompoundNodes(); Y.inDragLayer && (I.forEach(l), I.neighborhood().stdFilter(function(we) { return !ve || we.isEdge(); }).forEach(l)), Y.addToList && I.forEach(function(we) { p(we, Y); }), h(I, Y), g(I, { inDragLayer: Y.inDragLayer }), e.updateCachedGrabbedEles(); }, v = f, m = function(I) { I && (e.getCachedZSortedEles().forEach(function(Y) { s(Y), u(Y), d(Y); }), e.updateCachedGrabbedEles()); }, g = function(I, Y) { if (!(Y.inDragLayer == null && Y.addToList == null) && I.cy().hasCompoundNodes()) { var ve = I.ancestors().orphans(); if (!ve.same(I)) { var we = ve.descendants().spawnSelf().merge(ve).unmerge(I).unmerge(I.descendants()), ye = we.connectedEdges(); Y.inDragLayer && (ye.forEach(l), we.forEach(l)), Y.addToList && we.forEach(function(Pe) { p(Pe, Y); }); } } }, b = function() { document.activeElement != null && document.activeElement.blur != null && document.activeElement.blur(); }, x = typeof MutationObserver < "u", w = typeof ResizeObserver < "u"; x ? (e.removeObserver = new MutationObserver(function(I) { for (var Y = 0; Y < I.length; Y++) { var ve = I[Y], we = ve.removedNodes; if (we) for (var ye = 0; ye < we.length; ye++) { var Pe = we[ye]; if (Pe === e.container) { e.destroy(); break; } } } }), e.container.parentNode && e.removeObserver.observe(e.container.parentNode, { childList: !0 })) : e.registerBinding(e.container, "DOMNodeRemoved", function(I) { e.destroy(); }); var k = fm(function() { e.cy.resize(); }, 100); x && (e.styleObserver = new MutationObserver(k), e.styleObserver.observe(e.container, { attributes: !0 })), e.registerBinding(t, "resize", k), w && (e.resizeObserver = new ResizeObserver(k), e.resizeObserver.observe(e.container)); var C = function(I, Y) { for (; I != null; ) Y(I), I = I.parentNode; }, _ = function() { e.invalidateContainerClientCoordsCache(); }; C(e.container, function(I) { e.registerBinding(I, "transitionend", _), e.registerBinding(I, "animationend", _), e.registerBinding(I, "scroll", _); }), e.registerBinding(e.container, "contextmenu", function(I) { I.preventDefault(); }); var $ = function() { return e.selection[4] !== 0; }, O = function(I) { for (var Y = e.findContainerClientCoords(), ve = Y[0], we = Y[1], ye = Y[2], Pe = Y[3], Ce = I.touches ? I.touches : [I], ze = !1, lt = 0; lt < Ce.length; lt++) { var rt = Ce[lt]; if (ve <= rt.clientX && rt.clientX <= ve + ye && we <= rt.clientY && rt.clientY <= we + Pe) { ze = !0; break; } } if (!ze) return !1; for (var fe = e.container, Te = I.target, Se = Te.parentNode, Ue = !1; Se; ) { if (Se === fe) { Ue = !0; break; } Se = Se.parentNode; } return !!Ue; }; e.registerBinding(e.container, "mousedown", function(I) { if (O(I) && !(e.hoverData.which === 1 && I.which !== 1)) { I.preventDefault(), b(), e.hoverData.capture = !0, e.hoverData.which = I.which; var Y = e.cy, ve = [I.clientX, I.clientY], we = e.projectIntoViewport(ve[0], ve[1]), ye = e.selection, Pe = e.findNearestElements(we[0], we[1], !0, !1), Ce = Pe[0], ze = e.dragData.possibleDragElements; e.hoverData.mdownPos = we, e.hoverData.mdownGPos = ve; var lt = function() { e.hoverData.tapholdCancelled = !1, clearTimeout(e.hoverData.tapholdTimeout), e.hoverData.tapholdTimeout = setTimeout(function() { if (!e.hoverData.tapholdCancelled) { var Ue = e.hoverData.down; Ue ? Ue.emit({ originalEvent: I, type: "taphold", position: { x: we[0], y: we[1] } }) : Y.emit({ originalEvent: I, type: "taphold", position: { x: we[0], y: we[1] } }); } }, e.tapholdDuration); }; if (I.which == 3) { e.hoverData.cxtStarted = !0; var rt = { originalEvent: I, type: "cxttapstart", position: { x: we[0], y: we[1] } }; Ce ? (Ce.activate(), Ce.emit(rt), e.hoverData.down = Ce) : Y.emit(rt), e.hoverData.downTime = (/* @__PURE__ */ new Date()).getTime(), e.hoverData.cxtDragged = !1; } else if (I.which == 1) { Ce && Ce.activate(); { if (Ce != null && e.nodeIsGrabbable(Ce)) { var fe = function(Ue) { return { originalEvent: I, type: Ue, position: { x: we[0], y: we[1] } }; }, Te = function(Ue) { Ue.emit(fe("grab")); }; if (c(Ce), !Ce.selected()) ze = e.dragData.possibleDragElements = Y.collection(), v(Ce, { addToList: ze }), Ce.emit(fe("grabon")).emit(fe("grab")); else { ze = e.dragData.possibleDragElements = Y.collection(); var Se = Y.$(function(Ue) { return Ue.isNode() && Ue.selected() && e.nodeIsGrabbable(Ue); }); f(Se, { addToList: ze }), Ce.emit(fe("grabon")), Se.forEach(Te); } e.redrawHint("eles", !0), e.redrawHint("drag", !0); } e.hoverData.down = Ce, e.hoverData.downs = Pe, e.hoverData.downTime = (/* @__PURE__ */ new Date()).getTime(); } r(Ce, ["mousedown", "tapstart", "vmousedown"], I, { x: we[0], y: we[1] }), Ce == null ? (ye[4] = 1, e.data.bgActivePosistion = { x: we[0], y: we[1] }, e.redrawHint("select", !0), e.redraw()) : Ce.pannable() && (ye[4] = 1), lt(); } ye[0] = ye[2] = we[0], ye[1] = ye[3] = we[1]; } }, !1), e.registerBinding(t, "mousemove", function(I) { var Y = e.hoverData.capture; if (!(!Y && !O(I))) { var ve = !1, we = e.cy, ye = we.zoom(), Pe = [I.clientX, I.clientY], Ce = e.projectIntoViewport(Pe[0], Pe[1]), ze = e.hoverData.mdownPos, lt = e.hoverData.mdownGPos, rt = e.selection, fe = null; !e.hoverData.draggingEles && !e.hoverData.dragging && !e.hoverData.selecting && (fe = e.findNearestElement(Ce[0], Ce[1], !0, !1)); var Te = e.hoverData.last, Se = e.hoverData.down, Ue = [Ce[0] - rt[2], Ce[1] - rt[3]], zt = e.dragData.possibleDragElements, Pt; if (lt) { var qt = Pe[0] - lt[0], Ht = qt * qt, tn = Pe[1] - lt[1], Dn = tn * tn, hn = Ht + Dn; e.hoverData.isOverThresholdDrag = Pt = hn >= e.desktopTapThreshold2; } var vn = o(I); Pt && (e.hoverData.tapholdCancelled = !0); var Pn = function() { var vr = e.hoverData.dragDelta = e.hoverData.dragDelta || []; vr.length === 0 ? (vr.push(Ue[0]), vr.push(Ue[1])) : (vr[0] += Ue[0], vr[1] += Ue[1]); }; ve = !0, r(fe, ["mousemove", "vmousemove", "tapdrag"], I, { x: Ce[0], y: Ce[1] }); var Bn = function() { e.data.bgActivePosistion = void 0, e.hoverData.selecting || we.emit({ originalEvent: I, type: "boxstart", position: { x: Ce[0], y: Ce[1] } }), rt[4] = 1, e.hoverData.selecting = !0, e.redrawHint("select", !0), e.redraw(); }; if (e.hoverData.which === 3) { if (Pt) { var Cn = { originalEvent: I, type: "cxtdrag", position: { x: Ce[0], y: Ce[1] } }; Se ? Se.emit(Cn) : we.emit(Cn), e.hoverData.cxtDragged = !0, (!e.hoverData.cxtOver || fe !== e.hoverData.cxtOver) && (e.hoverData.cxtOver && e.hoverData.cxtOver.emit({ originalEvent: I, type: "cxtdragout", position: { x: Ce[0], y: Ce[1] } }), e.hoverData.cxtOver = fe, fe && fe.emit({ originalEvent: I, type: "cxtdragover", position: { x: Ce[0], y: Ce[1] } })); } } else if (e.hoverData.dragging) { if (ve = !0, we.panningEnabled() && we.userPanningEnabled()) { var hr; if (e.hoverData.justStartedPan) { var or = e.hoverData.mdownPos; hr = { x: (Ce[0] - or[0]) * ye, y: (Ce[1] - or[1]) * ye }, e.hoverData.justStartedPan = !1; } else hr = { x: Ue[0] * ye, y: Ue[1] * ye }; we.panBy(hr), we.emit("dragpan"), e.hoverData.dragged = !0; } Ce = e.projectIntoViewport(I.clientX, I.clientY); } else if (rt[4] == 1 && (Se == null || Se.pannable())) { if (Pt) { if (!e.hoverData.dragging && we.boxSelectionEnabled() && (vn || !we.panningEnabled() || !we.userPanningEnabled())) Bn(); else if (!e.hoverData.selecting && we.panningEnabled() && we.userPanningEnabled()) { var ar = a(Se, e.hoverData.downs); ar && (e.hoverData.dragging = !0, e.hoverData.justStartedPan = !0, rt[4] = 0, e.data.bgActivePosistion = xc(ze), e.redrawHint("select", !0), e.redraw()); } Se && Se.pannable() && Se.active() && Se.unactivate(); } } else { if (Se && Se.pannable() && Se.active() && Se.unactivate(), (!Se || !Se.grabbed()) && fe != Te && (Te && r(Te, ["mouseout", "tapdragout"], I, { x: Ce[0], y: Ce[1] }), fe && r(fe, ["mouseover", "tapdragover"], I, { x: Ce[0], y: Ce[1] }), e.hoverData.last = fe), Se) if (Pt) { if (we.boxSelectionEnabled() && vn) Se && Se.grabbed() && (m(zt), Se.emit("freeon"), zt.emit("free"), e.dragData.didDrag && (Se.emit("dragfreeon"), zt.emit("dragfree"))), Bn(); else if (Se && Se.grabbed() && e.nodeIsDraggable(Se)) { var nn = !e.dragData.didDrag; nn && e.redrawHint("eles", !0), e.dragData.didDrag = !0, e.hoverData.draggingEles || f(zt, { inDragLayer: !0 }); var gn = { x: 0, y: 0 }; if (Ze(Ue[0]) && Ze(Ue[1]) && (gn.x += Ue[0], gn.y += Ue[1], nn)) { var Fn = e.hoverData.dragDelta; Fn && Ze(Fn[0]) && Ze(Fn[1]) && (gn.x += Fn[0], gn.y += Fn[1]); } e.hoverData.draggingEles = !0, zt.silentShift(gn).emit("position drag"), e.redrawHint("drag", !0), e.redraw(); } } else Pn(); ve = !0; } if (rt[2] = Ce[0], rt[3] = Ce[1], ve) return I.stopPropagation && I.stopPropagation(), I.preventDefault && I.preventDefault(), !1; } }, !1); var F, A, T; e.registerBinding(t, "mouseup", function(I) { if (!(e.hoverData.which === 1 && I.which !== 1 && e.hoverData.capture)) { var Y = e.hoverData.capture; if (Y) { e.hoverData.capture = !1; var ve = e.cy, we = e.projectIntoViewport(I.clientX, I.clientY), ye = e.selection, Pe = e.findNearestElement(we[0], we[1], !0, !1), Ce = e.dragData.possibleDragElements, ze = e.hoverData.down, lt = o(I); if (e.data.bgActivePosistion && (e.redrawHint("select", !0), e.redraw()), e.hoverData.tapholdCancelled = !0, e.data.bgActivePosistion = void 0, ze && ze.unactivate(), e.hoverData.which === 3) { var rt = { originalEvent: I, type: "cxttapend", position: { x: we[0], y: we[1] } }; if (ze ? ze.emit(rt) : ve.emit(rt), !e.hoverData.cxtDragged) { var fe = { originalEvent: I, type: "cxttap", position: { x: we[0], y: we[1] } }; ze ? ze.emit(fe) : ve.emit(fe); } e.hoverData.cxtDragged = !1, e.hoverData.which = null; } else if (e.hoverData.which === 1) { if (r(Pe, ["mouseup", "tapend", "vmouseup"], I, { x: we[0], y: we[1] }), !e.dragData.didDrag && // didn't move a node around !e.hoverData.dragged && // didn't pan !e.hoverData.selecting && // not box selection !e.hoverData.isOverThresholdDrag && (r(ze, ["click", "tap", "vclick"], I, { x: we[0], y: we[1] }), A = !1, I.timeStamp - T <= ve.multiClickDebounceTime() ? (F && clearTimeout(F), A = !0, T = null, r(ze, ["dblclick", "dbltap", "vdblclick"], I, { x: we[0], y: we[1] })) : (F = setTimeout(function() { A || r(ze, ["oneclick", "onetap", "voneclick"], I, { x: we[0], y: we[1] }); }, ve.multiClickDebounceTime()), T = I.timeStamp)), ze == null && !e.dragData.didDrag && !e.hoverData.selecting && !e.hoverData.dragged && !o(I) && (ve.$(n).unselect(["tapunselect"]), Ce.length > 0 && e.redrawHint("eles", !0), e.dragData.possibleDragElements = Ce = ve.collection()), Pe == ze && !e.dragData.didDrag && !e.hoverData.selecting && Pe != null && Pe._private.selectable && (e.hoverData.dragging || (ve.selectionType() === "additive" || lt ? Pe.selected() ? Pe.unselect(["tapunselect"]) : Pe.select(["tapselect"]) : lt || (ve.$(n).unmerge(Pe).unselect(["tapunselect"]), Pe.select(["tapselect"]))), e.redrawHint("eles", !0)), e.hoverData.selecting) { var Te = ve.collection(e.getAllInBox(ye[0], ye[1], ye[2], ye[3])); e.redrawHint("select", !0), Te.length > 0 && e.redrawHint("eles", !0), ve.emit({ type: "boxend", originalEvent: I, position: { x: we[0], y: we[1] } }); var Se = function(zt) { return zt.selectable() && !zt.selected(); }; ve.selectionType() === "additive" || lt || ve.$(n).unmerge(Te).unselect(), Te.emit("box").stdFilter(Se).select().emit("boxselect"), e.redraw(); } if (e.hoverData.dragging && (e.hoverData.dragging = !1, e.redrawHint("select", !0), e.redrawHint("eles", !0), e.redraw()), !ye[4]) { e.redrawHint("drag", !0), e.redrawHint("eles", !0); var Ue = ze && ze.grabbed(); m(Ce), Ue && (ze.emit("freeon"), Ce.emit("free"), e.dragData.didDrag && (ze.emit("dragfreeon"), Ce.emit("dragfree"))); } } ye[4] = 0, e.hoverData.down = null, e.hoverData.cxtStarted = !1, e.hoverData.draggingEles = !1, e.hoverData.selecting = !1, e.hoverData.isOverThresholdDrag = !1, e.dragData.didDrag = !1, e.hoverData.dragged = !1, e.hoverData.dragDelta = [], e.hoverData.mdownPos = null, e.hoverData.mdownGPos = null, e.hoverData.which = null; } } }, !1); var R = function(I) { if (!e.scrollingPage) { var Y = e.cy, ve = Y.zoom(), we = Y.pan(), ye = e.projectIntoViewport(I.clientX, I.clientY), Pe = [ye[0] * ve + we.x, ye[1] * ve + we.y]; if (e.hoverData.draggingEles || e.hoverData.dragging || e.hoverData.cxtStarted || $()) { I.preventDefault(); return; } if (Y.panningEnabled() && Y.userPanningEnabled() && Y.zoomingEnabled() && Y.userZoomingEnabled()) { I.preventDefault(), e.data.wheelZooming = !0, clearTimeout(e.data.wheelTimeout), e.data.wheelTimeout = setTimeout(function() { e.data.wheelZooming = !1, e.redrawHint("eles", !0), e.redraw(); }, 150); var Ce; I.deltaY != null ? Ce = I.deltaY / -250 : I.wheelDeltaY != null ? Ce = I.wheelDeltaY / 1e3 : Ce = I.wheelDelta / 1e3, Ce = Ce * e.wheelSensitivity; var ze = I.deltaMode === 1; ze && (Ce *= 33); var lt = Y.zoom() * Math.pow(10, Ce); I.type === "gesturechange" && (lt = e.gestureStartZoom * I.scale), Y.zoom({ level: lt, renderedPosition: { x: Pe[0], y: Pe[1] } }), Y.emit(I.type === "gesturechange" ? "pinchzoom" : "scrollzoom"); } } }; e.registerBinding(e.container, "wheel", R, !0), e.registerBinding(t, "scroll", function(I) { e.scrollingPage = !0, clearTimeout(e.scrollingPageTimeout), e.scrollingPageTimeout = setTimeout(function() { e.scrollingPage = !1; }, 250); }, !0), e.registerBinding(e.container, "gesturestart", function(I) { e.gestureStartZoom = e.cy.zoom(), e.hasTouchStarted || I.preventDefault(); }, !0), e.registerBinding(e.container, "gesturechange", function(I) { e.hasTouchStarted || R(I); }, !0), e.registerBinding(e.container, "mouseout", function(I) { var Y = e.projectIntoViewport(I.clientX, I.clientY); e.cy.emit({ originalEvent: I, type: "mouseout", position: { x: Y[0], y: Y[1] } }); }, !1), e.registerBinding(e.container, "mouseover", function(I) { var Y = e.projectIntoViewport(I.clientX, I.clientY); e.cy.emit({ originalEvent: I, type: "mouseover", position: { x: Y[0], y: Y[1] } }); }, !1); var M, j, P, V, U, G, se, ae, de, me, te, oe, ne, ee = function(I, Y, ve, we) { return Math.sqrt((ve - I) * (ve - I) + (we - Y) * (we - Y)); }, Z = function(I, Y, ve, we) { return (ve - I) * (ve - I) + (we - Y) * (we - Y); }, le; e.registerBinding(e.container, "touchstart", le = function(I) { if (e.hasTouchStarted = !0, !!O(I)) { b(), e.touchData.capture = !0, e.data.bgActivePosistion = void 0; var Y = e.cy, ve = e.touchData.now, we = e.touchData.earlier; if (I.touches[0]) { var ye = e.projectIntoViewport(I.touches[0].clientX, I.touches[0].clientY); ve[0] = ye[0], ve[1] = ye[1]; } if (I.touches[1]) { var ye = e.projectIntoViewport(I.touches[1].clientX, I.touches[1].clientY); ve[2] = ye[0], ve[3] = ye[1]; } if (I.touches[2]) { var ye = e.projectIntoViewport(I.touches[2].clientX, I.touches[2].clientY); ve[4] = ye[0], ve[5] = ye[1]; } if (I.touches[1]) { e.touchData.singleTouchMoved = !0, m(e.dragData.touchDragEles); var Pe = e.findContainerClientCoords(); de = Pe[0], me = Pe[1], te = Pe[2], oe = Pe[3], M = I.touches[0].clientX - de, j = I.touches[0].clientY - me, P = I.touches[1].clientX - de, V = I.touches[1].clientY - me, ne = 0 <= M && M <= te && 0 <= P && P <= te && 0 <= j && j <= oe && 0 <= V && V <= oe; var Ce = Y.pan(), ze = Y.zoom(); U = ee(M, j, P, V), G = Z(M, j, P, V), se = [(M + P) / 2, (j + V) / 2], ae = [(se[0] - Ce.x) / ze, (se[1] - Ce.y) / ze]; var lt = 200, rt = lt * lt; if (G < rt && !I.touches[2]) { var fe = e.findNearestElement(ve[0], ve[1], !0, !0), Te = e.findNearestElement(ve[2], ve[3], !0, !0); fe && fe.isNode() ? (fe.activate().emit({ originalEvent: I, type: "cxttapstart", position: { x: ve[0], y: ve[1] } }), e.touchData.start = fe) : Te && Te.isNode() ? (Te.activate().emit({ originalEvent: I, type: "cxttapstart", position: { x: ve[0], y: ve[1] } }), e.touchData.start = Te) : Y.emit({ originalEvent: I, type: "cxttapstart", position: { x: ve[0], y: ve[1] } }), e.touchData.start && (e.touchData.start._private.grabbed = !1), e.touchData.cxt = !0, e.touchData.cxtDragged = !1, e.data.bgActivePosistion = void 0, e.redraw(); return; } } if (I.touches[2]) Y.boxSelectionEnabled() && I.preventDefault(); else if (!I.touches[1] && I.touches[0]) { var Se = e.findNearestElements(ve[0], ve[1], !0, !0), Ue = Se[0]; if (Ue != null && (Ue.activate(), e.touchData.start = Ue, e.touchData.starts = Se, e.nodeIsGrabbable(Ue))) { var zt = e.dragData.touchDragEles = Y.collection(), Pt = null; e.redrawHint("eles", !0), e.redrawHint("drag", !0), Ue.selected() ? (Pt = Y.$(function(hn) { return hn.selected() && e.nodeIsGrabbable(hn); }), f(Pt, { addToList: zt })) : v(Ue, { addToList: zt }), c(Ue); var qt = function(hn) { return { originalEvent: I, type: hn, position: { x: ve[0], y: ve[1] } }; }; Ue.emit(qt("grabon")), Pt ? Pt.forEach(function(hn) { hn.emit(qt("grab")); }) : Ue.emit(qt("grab")); } r(Ue, ["touchstart", "tapstart", "vmousedown"], I, { x: ve[0], y: ve[1] }), Ue == null && (e.data.bgActivePosistion = { x: ye[0], y: ye[1] }, e.redrawHint("select", !0), e.redraw()), e.touchData.singleTouchMoved = !1, e.touchData.singleTouchStartTime = +/* @__PURE__ */ new Date(), clearTimeout(e.touchData.tapholdTimeout), e.touchData.tapholdTimeout = setTimeout(function() { e.touchData.singleTouchMoved === !1 && !e.pinching && !e.touchData.selecting && r(e.touchData.start, ["taphold"], I, { x: ve[0], y: ve[1] }); }, e.tapholdDuration); } if (I.touches.length >= 1) { for (var Ht = e.touchData.startPosition = [null, null, null, null, null, null], tn = 0; tn < ve.length; tn++) Ht[tn] = we[tn] = ve[tn]; var Dn = I.touches[0]; e.touchData.startGPosition = [Dn.clientX, Dn.clientY]; } } }, !1); var pe; e.registerBinding(t, "touchmove", pe = function(I) { var Y = e.touchData.capture; if (!(!Y && !O(I))) { var ve = e.selection, we = e.cy, ye = e.touchData.now, Pe = e.touchData.earlier, Ce = we.zoom(); if (I.touches[0]) { var ze = e.projectIntoViewport(I.touches[0].clientX, I.touches[0].clientY); ye[0] = ze[0], ye[1] = ze[1]; } if (I.touches[1]) { var ze = e.projectIntoViewport(I.touches[1].clientX, I.touches[1].clientY); ye[2] = ze[0], ye[3] = ze[1]; } if (I.touches[2]) { var ze = e.projectIntoViewport(I.touches[2].clientX, I.touches[2].clientY); ye[4] = ze[0], ye[5] = ze[1]; } var lt = e.touchData.startGPosition, rt; if (Y && I.touches[0] && lt) { for (var fe = [], Te = 0; Te < ye.length; Te++) fe[Te] = ye[Te] - Pe[Te]; var Se = I.touches[0].clientX - lt[0], Ue = Se * Se, zt = I.touches[0].clientY - lt[1], Pt = zt * zt, qt = Ue + Pt; rt = qt >= e.touchTapThreshold2; } if (Y && e.touchData.cxt) { I.preventDefault(); var Ht = I.touches[0].clientX - de, tn = I.touches[0].clientY - me, Dn = I.touches[1].clientX - de, hn = I.touches[1].clientY - me, vn = Z(Ht, tn, Dn, hn), Pn = vn / G, Bn = 150, Cn = Bn * Bn, hr = 1.5, or = hr * hr; if (Pn >= or || vn >= Cn) { e.touchData.cxt = !1, e.data.bgActivePosistion = void 0, e.redrawHint("select", !0); var ar = { originalEvent: I, type: "cxttapend", position: { x: ye[0], y: ye[1] } }; e.touchData.start ? (e.touchData.start.unactivate().emit(ar), e.touchData.start = null) : we.emit(ar); } } if (Y && e.touchData.cxt) { var ar = { originalEvent: I, type: "cxtdrag", position: { x: ye[0], y: ye[1] } }; e.data.bgActivePosistion = void 0, e.redrawHint("select", !0), e.touchData.start ? e.touchData.start.emit(ar) : we.emit(ar), e.touchData.start && (e.touchData.start._private.grabbed = !1), e.touchData.cxtDragged = !0; var nn = e.findNearestElement(ye[0], ye[1], !0, !0); (!e.touchData.cxtOver || nn !== e.touchData.cxtOver) && (e.touchData.cxtOver && e.touchData.cxtOver.emit({ originalEvent: I, type: "cxtdragout", position: { x: ye[0], y: ye[1] } }), e.touchData.cxtOver = nn, nn && nn.emit({ originalEvent: I, type: "cxtdragover", position: { x: ye[0], y: ye[1] } })); } else if (Y && I.touches[2] && we.boxSelectionEnabled()) I.preventDefault(), e.data.bgActivePosistion = void 0, this.lastThreeTouch = +/* @__PURE__ */ new Date(), e.touchData.selecting || we.emit({ originalEvent: I, type: "boxstart", position: { x: ye[0], y: ye[1] } }), e.touchData.selecting = !0, e.touchData.didSelect = !0, ve[4] = 1, !ve || ve.length === 0 || ve[0] === void 0 ? (ve[0] = (ye[0] + ye[2] + ye[4]) / 3, ve[1] = (ye[1] + ye[3] + ye[5]) / 3, ve[2] = (ye[0] + ye[2] + ye[4]) / 3 + 1, ve[3] = (ye[1] + ye[3] + ye[5]) / 3 + 1) : (ve[2] = (ye[0] + ye[2] + ye[4]) / 3, ve[3] = (ye[1] + ye[3] + ye[5]) / 3), e.redrawHint("select", !0), e.redraw(); else if (Y && I.touches[1] && !e.touchData.didSelect && we.zoomingEnabled() && we.panningEnabled() && we.userZoomingEnabled() && we.userPanningEnabled()) { I.preventDefault(), e.data.bgActivePosistion = void 0, e.redrawHint("select", !0); var gn = e.dragData.touchDragEles; if (gn) { e.redrawHint("drag", !0); for (var Fn = 0; Fn < gn.length; Fn++) { var vr = gn[Fn]._private; vr.grabbed = !1, vr.rscratch.inDragLayer = !1; } } var Uo = e.touchData.start, Ht = I.touches[0].clientX - de, tn = I.touches[0].clientY - me, Dn = I.touches[1].clientX - de, hn = I.touches[1].clientY - me, B = ee(Ht, tn, Dn, hn), ce = B / U; if (ne) { var Le = Ht - M, We = tn - j, rn = Dn - P, Tn = hn - V, An = (Le + rn) / 2, un = (We + Tn) / 2, on = we.zoom(), qo = on * ce, Fl = we.pan(), Lh = ae[0] * on + Fl.x, Rh = ae[1] * on + Fl.y, Nh = { x: -qo / on * (Lh - Fl.x - An) + Lh, y: -qo / on * (Rh - Fl.y - un) + Rh }; if (Uo && Uo.active()) { var gn = e.dragData.touchDragEles; m(gn), e.redrawHint("drag", !0), e.redrawHint("eles", !0), Uo.unactivate().emit("freeon"), gn.emit("free"), e.dragData.didDrag && (Uo.emit("dragfreeon"), gn.emit("dragfree")); } we.viewport({ zoom: qo, pan: Nh, cancelOnFailedZoom: !0 }), we.emit("pinchzoom"), U = B, M = Ht, j = tn, P = Dn, V = hn, e.pinching = !0; } if (I.touches[0]) { var ze = e.projectIntoViewport(I.touches[0].clientX, I.touches[0].clientY); ye[0] = ze[0], ye[1] = ze[1]; } if (I.touches[1]) { var ze = e.projectIntoViewport(I.touches[1].clientX, I.touches[1].clientY); ye[2] = ze[0], ye[3] = ze[1]; } if (I.touches[2]) { var ze = e.projectIntoViewport(I.touches[2].clientX, I.touches[2].clientY); ye[4] = ze[0], ye[5] = ze[1]; } } else if (I.touches[0] && !e.touchData.didSelect) { var Ao = e.touchData.start, Hd = e.touchData.last, nn; if (!e.hoverData.draggingEles && !e.swipePanning && (nn = e.findNearestElement(ye[0], ye[1], !0, !0)), Y && Ao != null && I.preventDefault(), Y && Ao != null && e.nodeIsDraggable(Ao)) if (rt) { var gn = e.dragData.touchDragEles, Mh = !e.dragData.didDrag; Mh && f(gn, { inDragLayer: !0 }), e.dragData.didDrag = !0; var Tl = { x: 0, y: 0 }; if (Ze(fe[0]) && Ze(fe[1]) && (Tl.x += fe[0], Tl.y += fe[1], Mh)) { e.redrawHint("eles", !0); var to = e.touchData.dragDelta; to && Ze(to[0]) && Ze(to[1]) && (Tl.x += to[0], Tl.y += to[1]); } e.hoverData.draggingEles = !0, gn.silentShift(Tl).emit("position drag"), e.redrawHint("drag", !0), e.touchData.startPosition[0] == Pe[0] && e.touchData.startPosition[1] == Pe[1] && e.redrawHint("eles", !0), e.redraw(); } else { var to = e.touchData.dragDelta = e.touchData.dragDelta || []; to.length === 0 ? (to.push(fe[0]), to.push(fe[1])) : (to[0] += fe[0], to[1] += fe[1]); } if (r(Ao || nn, ["touchmove", "tapdrag", "vmousemove"], I, { x: ye[0], y: ye[1] }), (!Ao || !Ao.grabbed()) && nn != Hd && (Hd && Hd.emit({ originalEvent: I, type: "tapdragout", position: { x: ye[0], y: ye[1] } }), nn && nn.emit({ originalEvent: I, type: "tapdragover", position: { x: ye[0], y: ye[1] } })), e.touchData.last = nn, Y) for (var Fn = 0; Fn < ye.length; Fn++) ye[Fn] && e.touchData.startPosition[Fn] && rt && (e.touchData.singleTouchMoved = !0); if (Y && (Ao == null || Ao.pannable()) && we.panningEnabled() && we.userPanningEnabled()) { var P1 = a(Ao, e.touchData.starts); P1 && (I.preventDefault(), e.data.bgActivePosistion || (e.data.bgActivePosistion = xc(e.touchData.startPosition)), e.swipePanning ? (we.panBy({ x: fe[0] * Ce, y: fe[1] * Ce }), we.emit("dragpan")) : rt && (e.swipePanning = !0, we.panBy({ x: Se * Ce, y: zt * Ce }), we.emit("dragpan"), Ao && (Ao.unactivate(), e.redrawHint("select", !0), e.touchData.start = null))); var ze = e.projectIntoViewport(I.touches[0].clientX, I.touches[0].clientY); ye[0] = ze[0], ye[1] = ze[1]; } } for (var Te = 0; Te < ye.length; Te++) Pe[Te] = ye[Te]; Y && I.touches.length > 0 && !e.hoverData.draggingEles && !e.swipePanning && e.data.bgActivePosistion != null && (e.data.bgActivePosistion = void 0, e.redrawHint("select", !0), e.redraw()); } }, !1); var ke; e.registerBinding(t, "touchcancel", ke = function(I) { var Y = e.touchData.start; e.touchData.capture = !1, Y && Y.unactivate(); }); var Ne, De, _e, Fe; if (e.registerBinding(t, "touchend", Ne = function(I) { var Y = e.touchData.start, ve = e.touchData.capture; if (ve) I.touches.length === 0 && (e.touchData.capture = !1), I.preventDefault(); else return; var we = e.selection; e.swipePanning = !1, e.hoverData.draggingEles = !1; var ye = e.cy, Pe = ye.zoom(), Ce = e.touchData.now, ze = e.touchData.earlier; if (I.touches[0]) { var lt = e.projectIntoViewport(I.touches[0].clientX, I.touches[0].clientY); Ce[0] = lt[0], Ce[1] = lt[1]; } if (I.touches[1]) { var lt = e.projectIntoViewport(I.touches[1].clientX, I.touches[1].clientY); Ce[2] = lt[0], Ce[3] = lt[1]; } if (I.touches[2]) { var lt = e.projectIntoViewport(I.touches[2].clientX, I.touches[2].clientY); Ce[4] = lt[0], Ce[5] = lt[1]; } Y && Y.unactivate(); var rt; if (e.touchData.cxt) { if (rt = { originalEvent: I, type: "cxttapend", position: { x: Ce[0], y: Ce[1] } }, Y ? Y.emit(rt) : ye.emit(rt), !e.touchData.cxtDragged) { var fe = { originalEvent: I, type: "cxttap", position: { x: Ce[0], y: Ce[1] } }; Y ? Y.emit(fe) : ye.emit(fe); } e.touchData.start && (e.touchData.start._private.grabbed = !1), e.touchData.cxt = !1, e.touchData.start = null, e.redraw(); return; } if (!I.touches[2] && ye.boxSelectionEnabled() && e.touchData.selecting) { e.touchData.selecting = !1; var Te = ye.collection(e.getAllInBox(we[0], we[1], we[2], we[3])); we[0] = void 0, we[1] = void 0, we[2] = void 0, we[3] = void 0, we[4] = 0, e.redrawHint("select", !0), ye.emit({ type: "boxend", originalEvent: I, position: { x: Ce[0], y: Ce[1] } }); var Se = function(Bn) { return Bn.selectable() && !Bn.selected(); }; Te.emit("box").stdFilter(Se).select().emit("boxselect"), Te.nonempty() && e.redrawHint("eles", !0), e.redraw(); } if (Y != null && Y.unactivate(), I.touches[2]) e.data.bgActivePosistion = void 0, e.redrawHint("select", !0); else if (!I.touches[1] && !I.touches[0] && !I.touches[0]) { e.data.bgActivePosistion = void 0, e.redrawHint("select", !0); var Ue = e.dragData.touchDragEles; if (Y != null) { var zt = Y._private.grabbed; m(Ue), e.redrawHint("drag", !0), e.redrawHint("eles", !0), zt && (Y.emit("freeon"), Ue.emit("free"), e.dragData.didDrag && (Y.emit("dragfreeon"), Ue.emit("dragfree"))), r(Y, ["touchend", "tapend", "vmouseup", "tapdragout"], I, { x: Ce[0], y: Ce[1] }), Y.unactivate(), e.touchData.start = null; } else { var Pt = e.findNearestElement(Ce[0], Ce[1], !0, !0); r(Pt, ["touchend", "tapend", "vmouseup", "tapdragout"], I, { x: Ce[0], y: Ce[1] }); } var qt = e.touchData.startPosition[0] - Ce[0], Ht = qt * qt, tn = e.touchData.startPosition[1] - Ce[1], Dn = tn * tn, hn = Ht + Dn, vn = hn * Pe * Pe; e.touchData.singleTouchMoved || (Y || ye.$(":selected").unselect(["tapunselect"]), r(Y, ["tap", "vclick"], I, { x: Ce[0], y: Ce[1] }), De = !1, I.timeStamp - Fe <= ye.multiClickDebounceTime() ? (_e && clearTimeout(_e), De = !0, Fe = null, r(Y, ["dbltap", "vdblclick"], I, { x: Ce[0], y: Ce[1] })) : (_e = setTimeout(function() { De || r(Y, ["onetap", "voneclick"], I, { x: Ce[0], y: Ce[1] }); }, ye.multiClickDebounceTime()), Fe = I.timeStamp)), Y != null && !e.dragData.didDrag && Y._private.selectable && vn < e.touchTapThreshold2 && !e.pinching && (ye.selectionType() === "single" ? (ye.$(n).unmerge(Y).unselect(["tapunselect"]), Y.select(["tapselect"])) : Y.selected() ? Y.unselect(["tapunselect"]) : Y.select(["tapselect"]), e.redrawHint("eles", !0)), e.touchData.singleTouchMoved = !0; } for (var Pn = 0; Pn < Ce.length; Pn++) ze[Pn] = Ce[Pn]; e.dragData.didDrag = !1, I.touches.length === 0 && (e.touchData.dragDelta = [], e.touchData.startPosition = [null, null, null, null, null, null], e.touchData.startGPosition = null, e.touchData.didSelect = !1), I.touches.length < 2 && (I.touches.length === 1 && (e.touchData.startGPosition = [I.touches[0].clientX, I.touches[0].clientY]), e.pinching = !1, e.redrawHint("eles", !0), e.redraw()); }, !1), typeof TouchEvent > "u") { var Ie = [], Ae = function(I) { return { clientX: I.clientX, clientY: I.clientY, force: 1, identifier: I.pointerId, pageX: I.pageX, pageY: I.pageY, radiusX: I.width / 2, radiusY: I.height / 2, screenX: I.screenX, screenY: I.screenY, target: I.target }; }, qe = function(I) { return { event: I, touch: Ae(I) }; }, et = function(I) { Ie.push(qe(I)); }, He = function(I) { for (var Y = 0; Y < Ie.length; Y++) { var ve = Ie[Y]; if (ve.event.pointerId === I.pointerId) { Ie.splice(Y, 1); return; } } }, ot = function(I) { var Y = Ie.filter(function(ve) { return ve.event.pointerId === I.pointerId; })[0]; Y.event = I, Y.touch = Ae(I); }, tt = function(I) { I.touches = Ie.map(function(Y) { return Y.touch; }); }, Qe = function(I) { return I.pointerType === "mouse" || I.pointerType === 4; }; e.registerBinding(e.container, "pointerdown", function(I) { Qe(I) || (I.preventDefault(), et(I), tt(I), le(I)); }), e.registerBinding(e.container, "pointerup", function(I) { Qe(I) || (He(I), tt(I), Ne(I)); }), e.registerBinding(e.container, "pointercancel", function(I) { Qe(I) || (He(I), tt(I), ke(I)); }), e.registerBinding(e.container, "pointermove", function(I) { Qe(I) || (I.preventDefault(), ot(I), tt(I), pe(I)); }); } }; var vs = {}; vs.generatePolygon = function(e, t) { return this.nodeShapes[e] = { renderer: this, name: e, points: t, draw: function(n, r, o, a, i, s) { this.renderer.nodeShapeImpl("polygon", n, r, o, a, i, this.points); }, intersectLine: function(n, r, o, a, i, s, l, u) { return cf(i, s, this.points, n, r, o / 2, a / 2, l); }, checkPoint: function(n, r, o, a, i, s, l, u) { return rs(n, r, this.points, s, l, a, i, [0, -1], o); } }; }; vs.generateEllipse = function() { return this.nodeShapes.ellipse = { renderer: this, name: "ellipse", draw: function(e, t, n, r, o, a) { this.renderer.nodeShapeImpl(this.name, e, t, n, r, o); }, intersectLine: function(e, t, n, r, o, a, i, s) { return Qme(o, a, e, t, n / 2 + i, r / 2 + i); }, checkPoint: function(e, t, n, r, o, a, i, s) { return ql(e, t, r, o, a, i, n); } }; }; vs.generateRoundPolygon = function(e, t) { return this.nodeShapes[e] = { renderer: this, name: e, points: t, getOrCreateCorners: function(n, r, o, a, i, s, l) { if (s[l] !== void 0 && s[l + "-cx"] === n && s[l + "-cy"] === r) return s[l]; s[l] = new Array(t.length / 2), s[l + "-cx"] = n, s[l + "-cy"] = r; var u = o / 2, c = a / 2; i = i === "auto" ? VB(o, a) : i; for (var d = new Array(t.length / 2), p = 0; p < t.length / 2; p++) d[p] = { x: n + u * t[p * 2], y: r + c * t[p * 2 + 1] }; var h, f, v, m, g = d.length; for (f = d[g - 1], h = 0; h < g; h++) v = d[h % g], m = d[(h + 1) % g], s[l][h] = A$(f, v, m, i), f = v, v = m; return s[l]; }, draw: function(n, r, o, a, i, s, l) { this.renderer.nodeShapeImpl("round-polygon", n, r, o, a, i, this.points, this.getOrCreateCorners(r, o, a, i, s, l, "drawCorners")); }, intersectLine: function(n, r, o, a, i, s, l, u, c) { return e1e(i, s, this.points, n, r, o, a, l, this.getOrCreateCorners(n, r, o, a, u, c, "corners")); }, checkPoint: function(n, r, o, a, i, s, l, u, c) { return Jme(n, r, this.points, s, l, a, i, this.getOrCreateCorners(s, l, a, i, u, c, "corners")); } }; }; vs.generateRoundRectangle = function() { return this.nodeShapes["round-rectangle"] = this.nodeShapes.roundrectangle = { renderer: this, name: "round-rectangle", points: ro(4, 0), draw: function(e, t, n, r, o, a) { this.renderer.nodeShapeImpl(this.name, e, t, n, r, o, this.points, a); }, intersectLine: function(e, t, n, r, o, a, i, s) { return zB(o, a, e, t, n, r, i, s); }, checkPoint: function(e, t, n, r, o, a, i, s) { var l = r / 2, u = o / 2; s = s === "auto" ? hu(r, o) : s, s = Math.min(l, u, s); var c = s * 2; return !!(rs(e, t, this.points, a, i, r, o - c, [0, -1], n) || rs(e, t, this.points, a, i, r - c, o, [0, -1], n) || ql(e, t, c, c, a - l + s, i - u + s, n) || ql(e, t, c, c, a + l - s, i - u + s, n) || ql(e, t, c, c, a + l - s, i + u - s, n) || ql(e, t, c, c, a - l + s, i + u - s, n)); } }; }; vs.generateCutRectangle = function() { return this.nodeShapes["cut-rectangle"] = this.nodeShapes.cutrectangle = { renderer: this, name: "cut-rectangle", cornerLength: b$(), points: ro(4, 0), draw: function(e, t, n, r, o, a) { this.renderer.nodeShapeImpl(this.name, e, t, n, r, o, null, a); }, generateCutTrianglePts: function(e, t, n, r, o) { var a = o === "auto" ? this.cornerLength : o, i = t / 2, s = e / 2, l = n - s, u = n + s, c = r - i, d = r + i; return { topLeft: [l, c + a, l + a, c, l + a, c + a], topRight: [u - a, c, u, c + a, u - a, c + a], bottomRight: [u, d - a, u - a, d, u - a, d - a], bottomLeft: [l + a, d, l, d - a, l + a, d - a] }; }, intersectLine: function(e, t, n, r, o, a, i, s) { var l = this.generateCutTrianglePts(n + 2 * i, r + 2 * i, e, t, s), u = [].concat.apply([], [l.topLeft.splice(0, 4), l.topRight.splice(0, 4), l.bottomRight.splice(0, 4), l.bottomLeft.splice(0, 4)]); return cf(o, a, u, e, t); }, checkPoint: function(e, t, n, r, o, a, i, s) { var l = s === "auto" ? this.cornerLength : s; if (rs(e, t, this.points, a, i, r, o - 2 * l, [0, -1], n) || rs(e, t, this.points, a, i, r - 2 * l, o, [0, -1], n)) return !0; var u = this.generateCutTrianglePts(r, o, a, i); return ho(e, t, u.topLeft) || ho(e, t, u.topRight) || ho(e, t, u.bottomRight) || ho(e, t, u.bottomLeft); } }; }; vs.generateBarrel = function() { return this.nodeShapes.barrel = { renderer: this, name: "barrel", points: ro(4, 0), draw: function(e, t, n, r, o, a) { this.renderer.nodeShapeImpl(this.name, e, t, n, r, o); }, intersectLine: function(e, t, n, r, o, a, i, s) { var l = 0.15, u = 0.5, c = 0.85, d = this.generateBarrelBezierPts(n + 2 * i, r + 2 * i, e, t), p = function(f) { var v = Sc({ x: f[0], y: f[1] }, { x: f[2], y: f[3] }, { x: f[4], y: f[5] }, l), m = Sc({ x: f[0], y: f[1] }, { x: f[2], y: f[3] }, { x: f[4], y: f[5] }, u), g = Sc({ x: f[0], y: f[1] }, { x: f[2], y: f[3] }, { x: f[4], y: f[5] }, c); return [f[0], f[1], v.x, v.y, m.x, m.y, g.x, g.y, f[4], f[5]]; }, h = [].concat(p(d.topLeft), p(d.topRight), p(d.bottomRight), p(d.bottomLeft)); return cf(o, a, h, e, t); }, generateBarrelBezierPts: function(e, t, n, r) { var o = t / 2, a = e / 2, i = n - a, s = n + a, l = r - o, u = r + o, c = VC(e, t), d = c.heightOffset, p = c.widthOffset, h = c.ctrlPtOffsetPct * e, f = { topLeft: [i, l + d, i + h, l, i + p, l], topRight: [s - p, l, s - h, l, s, l + d], bottomRight: [s, u - d, s - h, u, s - p, u], bottomLeft: [i + p, u, i + h, u, i, u - d] }; return f.topLeft.isTop = !0, f.topRight.isTop = !0, f.bottomLeft.isBottom = !0, f.bottomRight.isBottom = !0, f; }, checkPoint: function(e, t, n, r, o, a, i, s) { var l = VC(r, o), u = l.heightOffset, c = l.widthOffset; if (rs(e, t, this.points, a, i, r, o - 2 * u, [0, -1], n) || rs(e, t, this.points, a, i, r - 2 * c, o, [0, -1], n)) return !0; for (var d = this.generateBarrelBezierPts(r, o, a, i), p = function(C, _, $) { var O = $[4], F = $[2], A = $[0], T = $[5], R = $[1], M = Math.min(O, A), j = Math.max(O, A), P = Math.min(T, R), V = Math.max(T, R); if (M <= C && C <= j && P <= _ && _ <= V) { var U = t1e(O, F, A), G = Wme(U[0], U[1], U[2], C), se = G.filter(function(ae) { return 0 <= ae && ae <= 1; }); if (se.length > 0) return se[0]; } return null; }, h = Object.keys(d), f = 0; f < h.length; f++) { var v = h[f], m = d[v], g = p(e, t, m); if (g != null) { var b = m[5], x = m[3], w = m[1], k = gr(b, x, w, g); if (m.isTop && k <= t || m.isBottom && t <= k) return !0; } } return !1; } }; }; vs.generateBottomRoundrectangle = function() { return this.nodeShapes["bottom-round-rectangle"] = this.nodeShapes.bottomroundrectangle = { renderer: this, name: "bottom-round-rectangle", points: ro(4, 0), draw: function(e, t, n, r, o, a) { this.renderer.nodeShapeImpl(this.name, e, t, n, r, o, this.points, a); }, intersectLine: function(e, t, n, r, o, a, i, s) { var l = e - (n / 2 + i), u = t - (r / 2 + i), c = u, d = e + (n / 2 + i), p = qs(o, a, e, t, l, u, d, c, !1); return p.length > 0 ? p : zB(o, a, e, t, n, r, i, s); }, checkPoint: function(e, t, n, r, o, a, i, s) { s = s === "auto" ? hu(r, o) : s; var l = 2 * s; if (rs(e, t, this.points, a, i, r, o - l, [0, -1], n) || rs(e, t, this.points, a, i, r - l, o, [0, -1], n)) return !0; var u = r / 2 + 2 * n, c = o / 2 + 2 * n, d = [a - u, i - c, a - u, i, a + u, i, a + u, i - c]; return !!(ho(e, t, d) || ql(e, t, l, l, a + r / 2 - s, i + o / 2 - s, n) || ql(e, t, l, l, a - r / 2 + s, i + o / 2 - s, n)); } }; }; vs.registerNodeShapes = function() { var e = this.nodeShapes = {}, t = this; this.generateEllipse(), this.generatePolygon("triangle", ro(3, 0)), this.generateRoundPolygon("round-triangle", ro(3, 0)), this.generatePolygon("rectangle", ro(4, 0)), e.square = e.rectangle, this.generateRoundRectangle(), this.generateCutRectangle(), this.generateBarrel(), this.generateBottomRoundrectangle(); { var n = [0, 1, 1, 0, 0, -1, -1, 0]; this.generatePolygon("diamond", n), this.generateRoundPolygon("round-diamond", n); } this.generatePolygon("pentagon", ro(5, 0)), this.generateRoundPolygon("round-pentagon", ro(5, 0)), this.generatePolygon("hexagon", ro(6, 0)), this.generateRoundPolygon("round-hexagon", ro(6, 0)), this.generatePolygon("heptagon", ro(7, 0)), this.generateRoundPolygon("round-heptagon", ro(7, 0)), this.generatePolygon("octagon", ro(8, 0)), this.generateRoundPolygon("round-octagon", ro(8, 0)); var r = new Array(20); { var o = jC(5, 0), a = jC(5, Math.PI / 5), i = 0.5 * (3 - Math.sqrt(5)); i *= 1.57; for (var s = 0; s < a.length / 2; s++) a[s * 2] *= i, a[s * 2 + 1] *= i; for (var s = 0; s < 20 / 4; s++) r[s * 4] = o[s * 2], r[s * 4 + 1] = o[s * 2 + 1], r[s * 4 + 2] = a[s * 2], r[s * 4 + 3] = a[s * 2 + 1]; } r = jB(r), this.generatePolygon("star", r), this.generatePolygon("vee", [-1, -1, 0, -0.333, 1, -1, 0, 1]), this.generatePolygon("rhomboid", [-1, -1, 0.333, -1, 1, 1, -0.333, 1]), this.generatePolygon("right-rhomboid", [-0.333, -1, 1, -1, 0.333, 1, -1, 1]), this.nodeShapes.concavehexagon = this.generatePolygon("concave-hexagon", [-1, -0.95, -0.75, 0, -1, 0.95, 1, 0.95, 0.75, 0, 1, -0.95]); { var l = [-1, -1, 0.25, -1, 1, 0, 0.25, 1, -1, 1]; this.generatePolygon("tag", l), this.generateRoundPolygon("round-tag", l); } e.makePolygon = function(u) { var c = u.join("$"), d = "polygon-" + c, p; return (p = this[d]) ? p : t.generatePolygon(d, u); }; }; var sh = {}; sh.timeToRender = function() { return this.redrawTotalTime / this.redrawCount; }; sh.redraw = function(e) { e = e || RB(); var t = this; t.averageRedrawTime === void 0 && (t.averageRedrawTime = 0), t.lastRedrawTime === void 0 && (t.lastRedrawTime = 0), t.lastDrawTime === void 0 && (t.lastDrawTime = 0), t.requestedFrame = !0, t.renderOptions = e; }; sh.beforeRender = function(e, t) { if (!this.destroyed) { t == null && Un("Priority is not optional for beforeRender"); var n = this.beforeRenderCallbacks; n.push({ fn: e, priority: t }), n.sort(function(r, o) { return o.priority - r.priority; }); } }; var FF = function(e, t, n) { for (var r = e.beforeRenderCallbacks, o = 0; o < r.length; o++) r[o].fn(t, n); }; sh.startRenderLoop = function() { var e = this, t = e.cy; if (!e.renderLoopStarted) { e.renderLoopStarted = !0; var n = function r(o) { if (!e.destroyed) { if (!t.batching()) if (e.requestedFrame && !e.skipFrame) { FF(e, !0, o); var a = ns(); e.render(e.renderOptions); var i = e.lastDrawTime = ns(); e.averageRedrawTime === void 0 && (e.averageRedrawTime = i - a), e.redrawCount === void 0 && (e.redrawCount = 0), e.redrawCount++, e.redrawTotalTime === void 0 && (e.redrawTotalTime = 0); var s = i - a; e.redrawTotalTime += s, e.lastRedrawTime = s, e.averageRedrawTime = e.averageRedrawTime / 2 + s / 2, e.requestedFrame = !1; } else FF(e, !1, o); e.skipFrame = !1, Bg(r); } }; Bg(n); } }; var N2e = function(e) { this.init(e); }, zz = N2e, _d = zz.prototype; _d.clientFunctions = ["redrawHint", "render", "renderTo", "matchCanvasSize", "nodeShapeImpl", "arrowShapeImpl"]; _d.init = function(e) { var t = this; t.options = e, t.cy = e.cy; var n = t.container = e.cy.container(), r = t.cy.window(); if (r) { var o = r.document, a = o.head, i = "__________cytoscape_stylesheet", s = "__________cytoscape_container", l = o.getElementById(i) != null; if (n.className.indexOf(s) < 0 && (n.className = (n.className || "") + " " + s), !l) { var u = o.createElement("style"); u.id = i, u.textContent = "." + s + " { position: relative; }", a.insertBefore(u, a.children[0]); } var c = r.getComputedStyle(n), d = c.getPropertyValue("position"); d === "static" && sn("A Cytoscape container has style position:static and so can not use UI extensions properly"); } t.selection = [void 0, void 0, void 0, void 0, 0], t.bezierProjPcts = [0.05, 0.225, 0.4, 0.5, 0.6, 0.775, 0.95], t.hoverData = { down: null, last: null, downTime: null, triggerMode: null, dragging: !1, initialPan: [null, null], capture: !1 }, t.dragData = { possibleDragElements: [] }, t.touchData = { start: null, capture: !1, // These 3 fields related to tap, taphold events startPosition: [null, null, null, null, null, null], singleTouchStartTime: null, singleTouchMoved: !0, now: [null, null, null, null, null, null], earlier: [null, null, null, null, null, null] }, t.redraws = 0, t.showFps = e.showFps, t.debug = e.debug, t.hideEdgesOnViewport = e.hideEdgesOnViewport, t.textureOnViewport = e.textureOnViewport, t.wheelSensitivity = e.wheelSensitivity, t.motionBlurEnabled = e.motionBlur, t.forcedPixelRatio = Ze(e.pixelRatio) ? e.pixelRatio : null, t.motionBlur = e.motionBlur, t.motionBlurOpacity = e.motionBlurOpacity, t.motionBlurTransparency = 1 - t.motionBlurOpacity, t.motionBlurPxRatio = 1, t.mbPxRBlurry = 1, t.minMbLowQualFrames = 4, t.fullQualityMb = !1, t.clearedForMotionBlur = [], t.desktopTapThreshold = e.desktopTapThreshold, t.desktopTapThreshold2 = e.desktopTapThreshold * e.desktopTapThreshold, t.touchTapThreshold = e.touchTapThreshold, t.touchTapThreshold2 = e.touchTapThreshold * e.touchTapThreshold, t.tapholdDuration = 500, t.bindings = [], t.beforeRenderCallbacks = [], t.beforeRenderPriorities = { // higher priority execs before lower one animations: 400, eleCalcs: 300, eleTxrDeq: 200, lyrTxrDeq: 150, lyrTxrSkip: 100 }, t.registerNodeShapes(), t.registerArrowShapes(), t.registerCalculationListeners(); }; _d.notify = function(e, t) { var n = this, r = n.cy; if (!this.destroyed) { if (e === "init") { n.load(); return; } if (e === "destroy") { n.destroy(); return; } (e === "add" || e === "remove" || e === "move" && r.hasCompoundNodes() || e === "load" || e === "zorder" || e === "mount") && n.invalidateCachedZSortedEles(), e === "viewport" && n.redrawHint("select", !0), (e === "load" || e === "resize" || e === "mount") && (n.invalidateContainerClientCoordsCache(), n.matchCanvasSize(n.container)), n.redrawHint("eles", !0), n.redrawHint("drag", !0), this.startRenderLoop(), this.redraw(); } }; _d.destroy = function() { var e = this; e.destroyed = !0, e.cy.stopAnimationLoop(); for (var t = 0; t < e.bindings.length; t++) { var n = e.bindings[t], r = n, o = r.target; (o.off || o.removeEventListener).apply(o, r.args); } if (e.bindings = [], e.beforeRenderCallbacks = [], e.onUpdateEleCalcsFns = [], e.removeObserver && e.removeObserver.disconnect(), e.styleObserver && e.styleObserver.disconnect(), e.resizeObserver && e.resizeObserver.disconnect(), e.labelCalcDiv) try { document.body.removeChild(e.labelCalcDiv); } catch { } }; _d.isHeadless = function() { return !1; }; [T$, Dz, Bz, Cd, vs, sh].forEach(function(e) { _t(_d, e); }); var wy = 1e3 / 60, jz = { setupDequeueing: function(e) { return function() { var t = this, n = this.renderer; if (!t.dequeueingSetup) { t.dequeueingSetup = !0; var r = fm(function() { n.redrawHint("eles", !0), n.redrawHint("drag", !0), n.redraw(); }, e.deqRedrawThreshold), o = function(i, s) { var l = ns(), u = n.averageRedrawTime, c = n.lastRedrawTime, d = [], p = n.cy.extent(), h = n.getPixelRatio(); for (i || n.flushRenderedStyleQueue(); ; ) { var f = ns(), v = f - l, m = f - s; if (c < wy) { var g = wy - (i ? u : 0); if (m >= e.deqFastCost * g) break; } else if (i) { if (v >= e.deqCost * c || v >= e.deqAvgCost * u) break; } else if (m >= e.deqNoDrawCost * wy) break; var b = e.deq(t, h, p); if (b.length > 0) for (var x = 0; x < b.length; x++) d.push(b[x]); else break; } d.length > 0 && (e.onDeqd(t, d), !i && e.shouldRedraw(t, d, h, p) && r()); }, a = e.priority || v$; n.beforeRender(o, a(t)); } }; } }, M2e = /* @__PURE__ */ function() { function e(t) { var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : zg; c$(this, e), this.idsByKey = new ii(), this.keyForId = new ii(), this.cachesByLvl = new ii(), this.lvls = [], this.getKey = t, this.doesEleInvalidateKey = n; } return d$(e, [{ key: "getIdsFor", value: function(t) { t == null && Un("Can not get id list for null key"); var n = this.idsByKey, r = this.idsByKey.get(t); return r || (r = new gd(), n.set(t, r)), r; } }, { key: "addIdForKey", value: function(t, n) { t != null && this.getIdsFor(t).add(n); } }, { key: "deleteIdForKey", value: function(t, n) { t != null && this.getIdsFor(t).delete(n); } }, { key: "getNumberOfIdsForKey", value: function(t) { return t == null ? 0 : this.getIdsFor(t).size; } }, { key: "updateKeyMappingFor", value: function(t) { var n = t.id(), r = this.keyForId.get(n), o = this.getKey(t); this.deleteIdForKey(r, n), this.addIdForKey(o, n), this.keyForId.set(n, o); } }, { key: "deleteKeyMappingFor", value: function(t) { var n = t.id(), r = this.keyForId.get(n); this.deleteIdForKey(r, n), this.keyForId.delete(n); } }, { key: "keyHasChangedFor", value: function(t) { var n = t.id(), r = this.keyForId.get(n), o = this.getKey(t); return r !== o; } }, { key: "isInvalid", value: function(t) { return this.keyHasChangedFor(t) || this.doesEleInvalidateKey(t); } }, { key: "getCachesAt", value: function(t) { var n = this.cachesByLvl, r = this.lvls, o = n.get(t); return o || (o = new ii(), n.set(t, o), r.push(t)), o; } }, { key: "getCache", value: function(t, n) { return this.getCachesAt(n).get(t); } }, { key: "get", value: function(t, n) { var r = this.getKey(t), o = this.getCache(r, n); return o != null && this.updateKeyMappingFor(t), o; } }, { key: "getForCachedKey", value: function(t, n) { var r = this.keyForId.get(t.id()), o = this.getCache(r, n); return o; } }, { key: "hasCache", value: function(t, n) { return this.getCachesAt(n).has(t); } }, { key: "has", value: function(t, n) { var r = this.getKey(t); return this.hasCache(r, n); } }, { key: "setCache", value: function(t, n, r) { r.key = t, this.getCachesAt(n).set(t, r); } }, { key: "set", value: function(t, n, r) { var o = this.getKey(t); this.setCache(o, n, r), this.updateKeyMappingFor(t); } }, { key: "deleteCache", value: function(t, n) { this.getCachesAt(n).delete(t); } }, { key: "delete", value: function(t, n) { var r = this.getKey(t); this.deleteCache(r, n); } }, { key: "invalidateKey", value: function(t) { var n = this; this.lvls.forEach(function(r) { return n.deleteCache(t, r); }); } // returns true if no other eles reference the invalidated cache (n.b. other eles may need the cache with the same key) }, { key: "invalidate", value: function(t) { var n = t.id(), r = this.keyForId.get(n); this.deleteKeyMappingFor(t); var o = this.doesEleInvalidateKey(t); return o && this.invalidateKey(r), o || this.getNumberOfIdsForKey(r) === 0; } }]), e; }(), TF = 25, fv = 50, eg = -4, QC = 3, D2e = 7.99, B2e = 8, z2e = 1024, j2e = 1024, V2e = 1024, H2e = 0.2, U2e = 0.8, q2e = 10, K2e = 0.15, G2e = 0.1, W2e = 0.9, Y2e = 0.9, X2e = 100, Z2e = 1, kc = { dequeue: "dequeue", downscale: "downscale", highQuality: "highQuality" }, J2e = Br({ getKey: null, doesEleInvalidateKey: zg, drawElement: null, getBoundingBox: null, getRotationPoint: null, getRotationOffset: null, isVisible: IB, allowEdgeTxrCaching: !0, allowParentTxrCaching: !0 }), xp = function(e, t) { var n = this; n.renderer = e, n.onDequeues = []; var r = J2e(t); _t(n, r), n.lookup = new M2e(r.getKey, r.doesEleInvalidateKey), n.setupDequeueing(); }, pr = xp.prototype; pr.reasons = kc; pr.getTextureQueue = function(e) { var t = this; return t.eleImgCaches = t.eleImgCaches || {}, t.eleImgCaches[e] = t.eleImgCaches[e] || []; }; pr.getRetiredTextureQueue = function(e) { var t = this, n = t.eleImgCaches.retired = t.eleImgCaches.retired || {}, r = n[e] = n[e] || []; return r; }; pr.getElementQueue = function() { var e = this, t = e.eleCacheQueue = e.eleCacheQueue || new rh(function(n, r) { return r.reqs - n.reqs; }); return t; }; pr.getElementKeyToQueue = function() { var e = this, t = e.eleKeyToCacheQueue = e.eleKeyToCacheQueue || {}; return t; }; pr.getElement = function(e, t, n, r, o) { var a = this, i = this.renderer, s = i.cy.zoom(), l = this.lookup; if (!t || t.w === 0 || t.h === 0 || isNaN(t.w) || isNaN(t.h) || !e.visible() || e.removed() || !a.allowEdgeTxrCaching && e.isEdge() || !a.allowParentTxrCaching && e.isParent()) return null; if (r == null && (r = Math.ceil(m$(s * n))), r < eg) r = eg; else if (s >= D2e || r > QC) return null; var u = Math.pow(2, r), c = t.h * u, d = t.w * u, p = i.eleTextBiggerThanMin(e, u); if (!this.isVisible(e, p)) return null; var h = l.get(e, r); if (h && h.invalidated && (h.invalidated = !1, h.texture.invalidatedWidth -= h.width), h) return h; var f; if (c <= TF ? f = TF : c <= fv ? f = fv : f = Math.ceil(c / fv) * fv, c > V2e || d > j2e) return null; var v = a.getTextureQueue(f), m = v[v.length - 2], g = function() { return a.recycleTexture(f, d) || a.addTexture(f, d); }; m || (m = v[v.length - 1]), m || (m = g()), m.width - m.usedWidth < d && (m = g()); for (var b = function(j) { return j && j.scaledLabelShown === p; }, x = o && o === kc.dequeue, w = o && o === kc.highQuality, k = o && o === kc.downscale, C, _ = r + 1; _ <= QC; _++) { var $ = l.get(e, _); if ($) { C = $; break; } } var O = C && C.level === r + 1 ? C : null, F = function() { m.context.drawImage(O.texture.canvas, O.x, 0, O.width, O.height, m.usedWidth, 0, d, c); }; if (m.context.setTransform(1, 0, 0, 1, 0, 0), m.context.clearRect(m.usedWidth, 0, d, f), b(O)) F(); else if (b(C)) if (w) { for (var A = C.level; A > r; A--) O = a.getElement(e, t, n, A, kc.downscale); F(); } else return a.queueElement(e, C.level - 1), C; else { var T; if (!x && !w && !k) for (var R = r - 1; R >= eg; R--) { var M = l.get(e, R); if (M) { T = M; break; } } if (b(T)) return a.queueElement(e, r), T; m.context.translate(m.usedWidth, 0), m.context.scale(u, u), this.drawElement(m.context, e, t, p, !1), m.context.scale(1 / u, 1 / u), m.context.translate(-m.usedWidth, 0); } return h = { x: m.usedWidth, texture: m, level: r, scale: u, width: d, height: c, scaledLabelShown: p }, m.usedWidth += Math.ceil(d + B2e), m.eleCaches.push(h), l.set(e, r, h), a.checkTextureFullness(m), h; }; pr.invalidateElements = function(e) { for (var t = 0; t < e.length; t++) this.invalidateElement(e[t]); }; pr.invalidateElement = function(e) { var t = this, n = t.lookup, r = [], o = n.isInvalid(e); if (o) { for (var a = eg; a <= QC; a++) { var i = n.getForCachedKey(e, a); i && r.push(i); } var s = n.invalidate(e); if (s) for (var l = 0; l < r.length; l++) { var u = r[l], c = u.texture; c.invalidatedWidth += u.width, u.invalidated = !0, t.checkTextureUtility(c); } t.removeFromQueue(e); } }; pr.checkTextureUtility = function(e) { e.invalidatedWidth >= H2e * e.width && this.retireTexture(e); }; pr.checkTextureFullness = function(e) { var t = this, n = t.getTextureQueue(e.height); e.usedWidth / e.width > U2e && e.fullnessChecks >= q2e ? al(n, e) : e.fullnessChecks++; }; pr.retireTexture = function(e) { var t = this, n = e.height, r = t.getTextureQueue(n), o = this.lookup; al(r, e), e.retired = !0; for (var a = e.eleCaches, i = 0; i < a.length; i++) { var s = a[i]; o.deleteCache(s.key, s.level); } g$(a); var l = t.getRetiredTextureQueue(n); l.push(e); }; pr.addTexture = function(e, t) { var n = this, r = n.getTextureQueue(e), o = {}; return r.push(o), o.eleCaches = [], o.height = e, o.width = Math.max(z2e, t), o.usedWidth = 0, o.invalidatedWidth = 0, o.fullnessChecks = 0, o.canvas = n.renderer.makeOffscreenCanvas(o.width, o.height), o.context = o.canvas.getContext("2d"), o; }; pr.recycleTexture = function(e, t) { for (var n = this, r = n.getTextureQueue(e), o = n.getRetiredTextureQueue(e), a = 0; a < o.length; a++) { var i = o[a]; if (i.width >= t) return i.retired = !1, i.usedWidth = 0, i.invalidatedWidth = 0, i.fullnessChecks = 0, g$(i.eleCaches), i.context.setTransform(1, 0, 0, 1, 0, 0), i.context.clearRect(0, 0, i.width, i.height), al(o, i), r.push(i), i; } }; pr.queueElement = function(e, t) { var n = this, r = n.getElementQueue(), o = n.getElementKeyToQueue(), a = this.getKey(e), i = o[a]; if (i) i.level = Math.max(i.level, t), i.eles.merge(e), i.reqs++, r.updateItem(i); else { var s = { eles: e.spawn().merge(e), level: t, reqs: 1, key: a }; r.push(s), o[a] = s; } }; pr.dequeue = function(e) { for (var t = this, n = t.getElementQueue(), r = t.getElementKeyToQueue(), o = [], a = t.lookup, i = 0; i < Z2e && n.size() > 0; i++) { var s = n.pop(), l = s.key, u = s.eles[0], c = a.hasCache(u, s.level); if (r[l] = null, !c) { o.push(s); var d = t.getBoundingBox(u); t.getElement(u, d, e, s.level, kc.dequeue); } } return o; }; pr.removeFromQueue = function(e) { var t = this, n = t.getElementQueue(), r = t.getElementKeyToQueue(), o = this.getKey(e), a = r[o]; a != null && (a.eles.length === 1 ? (a.reqs = h$, n.updateItem(a), n.pop(), r[o] = null) : a.eles.unmerge(e)); }; pr.onDequeue = function(e) { this.onDequeues.push(e); }; pr.offDequeue = function(e) { al(this.onDequeues, e); }; pr.setupDequeueing = jz.setupDequeueing({ deqRedrawThreshold: X2e, deqCost: K2e, deqAvgCost: G2e, deqNoDrawCost: W2e, deqFastCost: Y2e, deq: function(e, t, n) { return e.dequeue(t, n); }, onDeqd: function(e, t) { for (var n = 0; n < e.onDequeues.length; n++) { var r = e.onDequeues[n]; r(t); } }, shouldRedraw: function(e, t, n, r) { for (var o = 0; o < t.length; o++) for (var a = t[o].eles, i = 0; i < a.length; i++) { var s = a[i].boundingBox(); if (y$(s, r)) return !0; } return !1; }, priority: function(e) { return e.renderer.beforeRenderPriorities.eleTxrDeq; } }); var Q2e = 1, Pp = -4, Wg = 2, exe = 3.99, txe = 50, nxe = 50, rxe = 0.15, oxe = 0.1, axe = 0.9, ixe = 0.9, sxe = 1, AF = 250, lxe = 4e3 * 4e3, uxe = !0, Vz = function(e) { var t = this, n = t.renderer = e, r = n.cy; t.layersByLevel = {}, t.firstGet = !0, t.lastInvalidationTime = ns() - 2 * AF, t.skipping = !1, t.eleTxrDeqs = r.collection(), t.scheduleElementRefinement = fm(function() { t.refineElementTextures(t.eleTxrDeqs), t.eleTxrDeqs.unmerge(t.eleTxrDeqs); }, nxe), n.beforeRender(function(a, i) { i - t.lastInvalidationTime <= AF ? t.skipping = !0 : t.skipping = !1; }, n.beforeRenderPriorities.lyrTxrSkip); var o = function(a, i) { return i.reqs - a.reqs; }; t.layersQueue = new rh(o), t.setupDequeueing(); }, zr = Vz.prototype, IF = 0, cxe = Math.pow(2, 53) - 1; zr.makeLayer = function(e, t) { var n = Math.pow(2, t), r = Math.ceil(e.w * n), o = Math.ceil(e.h * n), a = this.renderer.makeOffscreenCanvas(r, o), i = { id: IF = ++IF % cxe, bb: e, level: t, width: r, height: o, canvas: a, context: a.getContext("2d"), eles: [], elesQueue: [], reqs: 0 }, s = i.context, l = -i.bb.x1, u = -i.bb.y1; return s.scale(n, n), s.translate(l, u), i; }; zr.getLayers = function(e, t, n) { var r = this, o = r.renderer, a = o.cy, i = a.zoom(), s = r.firstGet; if (r.firstGet = !1, n == null) { if (n = Math.ceil(m$(i * t)), n < Pp) n = Pp; else if (i >= exe || n > Wg) return null; } r.validateLayersElesOrdering(n, e); var l = r.layersByLevel, u = Math.pow(2, n), c = l[n] = l[n] || [], d, p = r.levelIsComplete(n, e), h, f = function() { var O = function(R) { if (r.validateLayersElesOrdering(R, e), r.levelIsComplete(R, e)) return h = l[R], !0; }, F = function(R) { if (!h) for (var M = n + R; Pp <= M && M <= Wg && !O(M); M += R) ; }; F(1), F(-1); for (var A = c.length - 1; A >= 0; A--) { var T = c[A]; T.invalid && al(c, T); } }; if (!p) f(); else return c; var v = function() { if (!d) { d = Fo(); for (var O = 0; O < e.length; O++) DB(d, e[O].boundingBox()); } return d; }, m = function(O) { O = O || {}; var F = O.after; v(); var A = d.w * u * (d.h * u); if (A > lxe) return null; var T = r.makeLayer(d, n); if (F != null) { var R = c.indexOf(F) + 1; c.splice(R, 0, T); } else (O.insert === void 0 || O.insert) && c.unshift(T); return T; }; if (r.skipping && !s) return null; for (var g = null, b = e.length / Q2e, x = !s, w = 0; w < e.length; w++) { var k = e[w], C = k._private.rscratch, _ = C.imgLayerCaches = C.imgLayerCaches || {}, $ = _[n]; if ($) { g = $; continue; } if ((!g || g.eles.length >= b || !BB(g.bb, k.boundingBox())) && (g = m({ insert: !0, after: g }), !g)) return null; h || x ? r.queueLayer(g, k) : r.drawEleInLayer(g, k, n, t), g.eles.push(k), _[n] = g; } return h || (x ? null : c); }; zr.getEleLevelForLayerLevel = function(e, t) { return e; }; zr.drawEleInLayer = function(e, t, n, r) { var o = this, a = this.renderer, i = e.context, s = t.boundingBox(); s.w === 0 || s.h === 0 || !t.visible() || (n = o.getEleLevelForLayerLevel(n, r), a.setImgSmoothing(i, !1), a.drawCachedElement(i, t, null, null, n, uxe), a.setImgSmoothing(i, !0)); }; zr.levelIsComplete = function(e, t) { var n = this, r = n.layersByLevel[e]; if (!r || r.length === 0) return !1; for (var o = 0, a = 0; a < r.length; a++) { var i = r[a]; if (i.reqs > 0 || i.invalid) return !1; o += i.eles.length; } return o === t.length; }; zr.validateLayersElesOrdering = function(e, t) { var n = this.layersByLevel[e]; if (n) for (var r = 0; r < n.length; r++) { for (var o = n[r], a = -1, i = 0; i < t.length; i++) if (o.eles[0] === t[i]) { a = i; break; } if (a < 0) { this.invalidateLayer(o); continue; } for (var s = a, i = 0; i < o.eles.length; i++) if (o.eles[i] !== t[s + i]) { this.invalidateLayer(o); break; } } }; zr.updateElementsInLayers = function(e, t) { for (var n = this, r = th(e[0]), o = 0; o < e.length; o++) for (var a = r ? null : e[o], i = r ? e[o] : e[o].ele, s = i._private.rscratch, l = s.imgLayerCaches = s.imgLayerCaches || {}, u = Pp; u <= Wg; u++) { var c = l[u]; c && (a && n.getEleLevelForLayerLevel(c.level) !== a.level || t(c, i, a)); } }; zr.haveLayers = function() { for (var e = this, t = !1, n = Pp; n <= Wg; n++) { var r = e.layersByLevel[n]; if (r && r.length > 0) { t = !0; break; } } return t; }; zr.invalidateElements = function(e) { var t = this; e.length !== 0 && (t.lastInvalidationTime = ns(), !(e.length === 0 || !t.haveLayers()) && t.updateElementsInLayers(e, function(n, r, o) { t.invalidateLayer(n); })); }; zr.invalidateLayer = function(e) { if (this.lastInvalidationTime = ns(), !e.invalid) { var t = e.level, n = e.eles, r = this.layersByLevel[t]; al(r, e), e.elesQueue = [], e.invalid = !0, e.replacement && (e.replacement.invalid = !0); for (var o = 0; o < n.length; o++) { var a = n[o]._private.rscratch.imgLayerCaches; a && (a[t] = null); } } }; zr.refineElementTextures = function(e) { var t = this; t.updateElementsInLayers(e, function(n, r, o) { var a = n.replacement; if (a || (a = n.replacement = t.makeLayer(n.bb, n.level), a.replaces = n, a.eles = n.eles), !a.reqs) for (var i = 0; i < a.eles.length; i++) t.queueLayer(a, a.eles[i]); }); }; zr.enqueueElementRefinement = function(e) { this.eleTxrDeqs.merge(e), this.scheduleElementRefinement(); }; zr.queueLayer = function(e, t) { var n = this, r = n.layersQueue, o = e.elesQueue, a = o.hasId = o.hasId || {}; if (!e.replacement) { if (t) { if (a[t.id()]) return; o.push(t), a[t.id()] = !0; } e.reqs ? (e.reqs++, r.updateItem(e)) : (e.reqs = 1, r.push(e)); } }; zr.dequeue = function(e) { for (var t = this, n = t.layersQueue, r = [], o = 0; o < sxe && n.size() !== 0; ) { var a = n.peek(); if (a.replacement) { n.pop(); continue; } if (a.replaces && a !== a.replaces.replacement) { n.pop(); continue; } if (a.invalid) { n.pop(); continue; } var i = a.elesQueue.shift(); i && (t.drawEleInLayer(a, i, a.level, e), o++), r.length === 0 && r.push(!0), a.elesQueue.length === 0 && (n.pop(), a.reqs = 0, a.replaces && t.applyLayerReplacement(a), t.requestRedraw()); } return r; }; zr.applyLayerReplacement = function(e) { var t = this, n = t.layersByLevel[e.level], r = e.replaces, o = n.indexOf(r); if (!(o < 0 || r.invalid)) { n[o] = e; for (var a = 0; a < e.eles.length; a++) { var i = e.eles[a]._private, s = i.imgLayerCaches = i.imgLayerCaches || {}; s && (s[e.level] = e); } t.requestRedraw(); } }; zr.requestRedraw = fm(function() { var e = this.renderer; e.redrawHint("eles", !0), e.redrawHint("drag", !0), e.redraw(); }, 100); zr.setupDequeueing = jz.setupDequeueing({ deqRedrawThreshold: txe, deqCost: rxe, deqAvgCost: oxe, deqNoDrawCost: axe, deqFastCost: ixe, deq: function(e, t) { return e.dequeue(t); }, onDeqd: v$, shouldRedraw: IB, priority: function(e) { return e.renderer.beforeRenderPriorities.lyrTxrDeq; } }); var Hz = {}, PF; function dxe(e, t) { for (var n = 0; n < t.length; n++) { var r = t[n]; e.lineTo(r.x, r.y); } } function pxe(e, t, n) { for (var r, o = 0; o < t.length; o++) { var a = t[o]; o === 0 && (r = a), e.lineTo(a.x, a.y); } e.quadraticCurveTo(n.x, n.y, r.x, r.y); } function LF(e, t, n) { e.beginPath && e.beginPath(); for (var r = t, o = 0; o < r.length; o++) { var a = r[o]; e.lineTo(a.x, a.y); } var i = n, s = n[0]; e.moveTo(s.x, s.y); for (var o = 1; o < i.length; o++) { var a = i[o]; e.lineTo(a.x, a.y); } e.closePath && e.closePath(); } function fxe(e, t, n, r, o) { e.beginPath && e.beginPath(), e.arc(n, r, o, 0, Math.PI * 2, !1); var a = t, i = a[0]; e.moveTo(i.x, i.y); for (var s = 0; s < a.length; s++) { var l = a[s]; e.lineTo(l.x, l.y); } e.closePath && e.closePath(); } function hxe(e, t, n, r) { e.arc(t, n, r, 0, Math.PI * 2, !1); } Hz.arrowShapeImpl = function(e) { return (PF || (PF = { polygon: dxe, "triangle-backcurve": pxe, "triangle-tee": LF, "circle-triangle": fxe, "triangle-cross": LF, circle: hxe }))[e]; }; var Ti = {}; Ti.drawElement = function(e, t, n, r, o, a) { var i = this; t.isNode() ? i.drawNode(e, t, n, r, o, a) : i.drawEdge(e, t, n, r, o, a); }; Ti.drawElementOverlay = function(e, t) { var n = this; t.isNode() ? n.drawNodeOverlay(e, t) : n.drawEdgeOverlay(e, t); }; Ti.drawElementUnderlay = function(e, t) { var n = this; t.isNode() ? n.drawNodeUnderlay(e, t) : n.drawEdgeUnderlay(e, t); }; Ti.drawCachedElementPortion = function(e, t, n, r, o, a, i, s) { var l = this, u = n.getBoundingBox(t); if (!(u.w === 0 || u.h === 0)) { var c = n.getElement(t, u, r, o, a); if (c != null) { var d = s(l, t); if (d === 0) return; var p = i(l, t), h = u.x1, f = u.y1, v = u.w, m = u.h, g, b, x, w, k; if (p !== 0) { var C = n.getRotationPoint(t); x = C.x, w = C.y, e.translate(x, w), e.rotate(p), k = l.getImgSmoothing(e), k || l.setImgSmoothing(e, !0); var _ = n.getRotationOffset(t); g = _.x, b = _.y; } else g = h, b = f; var $; d !== 1 && ($ = e.globalAlpha, e.globalAlpha = $ * d), e.drawImage(c.texture.canvas, c.x, 0, c.width, c.height, g, b, v, m), d !== 1 && (e.globalAlpha = $), p !== 0 && (e.rotate(-p), e.translate(-x, -w), k || l.setImgSmoothing(e, !1)); } else n.drawElement(e, t); } }; var vxe = function() { return 0; }, gxe = function(e, t) { return e.getTextAngle(t, null); }, mxe = function(e, t) { return e.getTextAngle(t, "source"); }, yxe = function(e, t) { return e.getTextAngle(t, "target"); }, bxe = function(e, t) { return t.effectiveOpacity(); }, xy = function(e, t) { return t.pstyle("text-opacity").pfValue * t.effectiveOpacity(); }; Ti.drawCachedElement = function(e, t, n, r, o, a) { var i = this, s = i.data, l = s.eleTxrCache, u = s.lblTxrCache, c = s.slbTxrCache, d = s.tlbTxrCache, p = t.boundingBox(), h = a === !0 ? l.reasons.highQuality : null; if (!(p.w === 0 || p.h === 0 || !t.visible()) && (!r || y$(p, r))) { var f = t.isEdge(), v = t.element()._private.rscratch.badLine; i.drawElementUnderlay(e, t), i.drawCachedElementPortion(e, t, l, n, o, h, vxe, bxe), (!f || !v) && i.drawCachedElementPortion(e, t, u, n, o, h, gxe, xy), f && !v && (i.drawCachedElementPortion(e, t, c, n, o, h, mxe, xy), i.drawCachedElementPortion(e, t, d, n, o, h, yxe, xy)), i.drawElementOverlay(e, t); } }; Ti.drawElements = function(e, t) { for (var n = this, r = 0; r < t.length; r++) { var o = t[r]; n.drawElement(e, o); } }; Ti.drawCachedElements = function(e, t, n, r) { for (var o = this, a = 0; a < t.length; a++) { var i = t[a]; o.drawCachedElement(e, i, n, r); } }; Ti.drawCachedNodes = function(e, t, n, r) { for (var o = this, a = 0; a < t.length; a++) { var i = t[a]; i.isNode() && o.drawCachedElement(e, i, n, r); } }; Ti.drawLayeredElements = function(e, t, n, r) { var o = this, a = o.data.lyrTxrCache.getLayers(t, n); if (a) for (var i = 0; i < a.length; i++) { var s = a[i], l = s.bb; l.w === 0 || l.h === 0 || e.drawImage(s.canvas, l.x1, l.y1, l.w, l.h); } else o.drawCachedElements(e, t, n, r); }; var gs = {}; gs.drawEdge = function(e, t, n) { var r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !0, o = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !0, a = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : !0, i = this, s = t._private.rscratch; if (!(a && !t.visible()) && !(s.badLine || s.allpts == null || isNaN(s.allpts[0]))) { var l; n && (l = n, e.translate(-l.x1, -l.y1)); var u = a ? t.pstyle("opacity").value : 1, c = a ? t.pstyle("line-opacity").value : 1, d = t.pstyle("curve-style").value, p = t.pstyle("line-style").value, h = t.pstyle("width").pfValue, f = t.pstyle("line-cap").value, v = t.pstyle("line-outline-width").value, m = t.pstyle("line-outline-color").value, g = u * c, b = u * c, x = function() { var M = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : g; d === "straight-triangle" ? (i.eleStrokeStyle(e, t, M), i.drawEdgeTrianglePath(t, e, s.allpts)) : (e.lineWidth = h, e.lineCap = f, i.eleStrokeStyle(e, t, M), i.drawEdgePath(t, e, s.allpts, p), e.lineCap = "butt"); }, w = function() { var M = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : g; if (e.lineWidth = h + v, e.lineCap = f, v > 0) i.colorStrokeStyle(e, m[0], m[1], m[2], M); else { e.lineCap = "butt"; return; } d === "straight-triangle" ? i.drawEdgeTrianglePath(t, e, s.allpts) : (i.drawEdgePath(t, e, s.allpts, p), e.lineCap = "butt"); }, k = function() { o && i.drawEdgeOverlay(e, t); }, C = function() { o && i.drawEdgeUnderlay(e, t); }, _ = function() { var M = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : b; i.drawArrowheads(e, t, M); }, $ = function() { i.drawElementText(e, t, null, r); }; e.lineJoin = "round"; var O = t.pstyle("ghost").value === "yes"; if (O) { var F = t.pstyle("ghost-offset-x").pfValue, A = t.pstyle("ghost-offset-y").pfValue, T = t.pstyle("ghost-opacity").value, R = g * T; e.translate(F, A), x(R), _(R), e.translate(-F, -A); } else w(); C(), x(), _(), k(), $(), n && e.translate(l.x1, l.y1); } }; var Uz = function(e) { if (!["overlay", "underlay"].includes(e)) throw new Error("Invalid state"); return function(t, n) { if (n.visible()) { var r = n.pstyle("".concat(e, "-opacity")).value; if (r !== 0) { var o = this, a = o.usePaths(), i = n._private.rscratch, s = n.pstyle("".concat(e, "-padding")).pfValue, l = 2 * s, u = n.pstyle("".concat(e, "-color")).value; t.lineWidth = l, i.edgeType === "self" && !a ? t.lineCap = "butt" : t.lineCap = "round", o.colorStrokeStyle(t, u[0], u[1], u[2], r), o.drawEdgePath(n, t, i.allpts, "solid"); } } }; }; gs.drawEdgeOverlay = Uz("overlay"); gs.drawEdgeUnderlay = Uz("underlay"); gs.drawEdgePath = function(e, t, n, r) { var o = e._private.rscratch, a = t, i, s = !1, l = this.usePaths(), u = e.pstyle("line-dash-pattern").pfValue, c = e.pstyle("line-dash-offset").pfValue; if (l) { var d = n.join("$"), p = o.pathCacheKey && o.pathCacheKey === d; p ? (i = t = o.pathCache, s = !0) : (i = t = new Path2D(), o.pathCacheKey = d, o.pathCache = i); } if (a.setLineDash) switch (r) { case "dotted": a.setLineDash([1, 1]); break; case "dashed": a.setLineDash(u), a.lineDashOffset = c; break; case "solid": a.setLineDash([]); break; } if (!s && !o.badLine) switch (t.beginPath && t.beginPath(), t.moveTo(n[0], n[1]), o.edgeType) { case "bezier": case "self": case "compound": case "multibezier": for (var h = 2; h + 3 < n.length; h += 4) t.quadraticCurveTo(n[h], n[h + 1], n[h + 2], n[h + 3]); break; case "straight": case "haystack": for (var f = 2; f + 1 < n.length; f += 2) t.lineTo(n[f], n[f + 1]); break; case "segments": if (o.isRound) { var v = yB(o.roundCorners), m; try { for (v.s(); !(m = v.n()).done; ) { var g = m.value; Pz(t, g); } } catch (x) { v.e(x); } finally { v.f(); } t.lineTo(n[n.length - 2], n[n.length - 1]); } else for (var b = 2; b + 1 < n.length; b += 2) t.lineTo(n[b], n[b + 1]); break; } t = a, l ? t.stroke(i) : t.stroke(), t.setLineDash && t.setLineDash([]); }; gs.drawEdgeTrianglePath = function(e, t, n) { t.fillStyle = t.strokeStyle; for (var r = e.pstyle("width").pfValue, o = 0; o + 1 < n.length; o += 2) { var a = [n[o + 2] - n[o], n[o + 3] - n[o + 1]], i = Math.sqrt(a[0] * a[0] + a[1] * a[1]), s = [a[1] / i, -a[0] / i], l = [s[0] * r / 2, s[1] * r / 2]; t.beginPath(), t.moveTo(n[o] - l[0], n[o + 1] - l[1]), t.lineTo(n[o] + l[0], n[o + 1] + l[1]), t.lineTo(n[o + 2], n[o + 3]), t.closePath(), t.fill(); } }; gs.drawArrowheads = function(e, t, n) { var r = t._private.rscratch, o = r.edgeType === "haystack"; o || this.drawArrowhead(e, t, "source", r.arrowStartX, r.arrowStartY, r.srcArrowAngle, n), this.drawArrowhead(e, t, "mid-target", r.midX, r.midY, r.midtgtArrowAngle, n), this.drawArrowhead(e, t, "mid-source", r.midX, r.midY, r.midsrcArrowAngle, n), o || this.drawArrowhead(e, t, "target", r.arrowEndX, r.arrowEndY, r.tgtArrowAngle, n); }; gs.drawArrowhead = function(e, t, n, r, o, a, i) { if (!(isNaN(r) || r == null || isNaN(o) || o == null || isNaN(a) || a == null)) { var s = this, l = t.pstyle(n + "-arrow-shape").value; if (l !== "none") { var u = t.pstyle(n + "-arrow-fill").value === "hollow" ? "both" : "filled", c = t.pstyle(n + "-arrow-fill").value, d = t.pstyle("width").pfValue, p = t.pstyle(n + "-arrow-width"), h = p.value === "match-line" ? d : p.pfValue; p.units === "%" && (h *= d); var f = t.pstyle("opacity").value; i === void 0 && (i = f); var v = e.globalCompositeOperation; (i !== 1 || c === "hollow") && (e.globalCompositeOperation = "destination-out", s.colorFillStyle(e, 255, 255, 255, 1), s.colorStrokeStyle(e, 255, 255, 255, 1), s.drawArrowShape(t, e, u, d, l, h, r, o, a), e.globalCompositeOperation = v); var m = t.pstyle(n + "-arrow-color").value; s.colorFillStyle(e, m[0], m[1], m[2], i), s.colorStrokeStyle(e, m[0], m[1], m[2], i), s.drawArrowShape(t, e, c, d, l, h, r, o, a); } } }; gs.drawArrowShape = function(e, t, n, r, o, a, i, s, l) { var u = this, c = this.usePaths() && o !== "triangle-cross", d = !1, p, h = t, f = { x: i, y: s }, v = e.pstyle("arrow-scale").value, m = this.getArrowWidth(r, v), g = u.arrowShapes[o]; if (c) { var b = u.arrowPathCache = u.arrowPathCache || [], x = pu(o), w = b[x]; w != null ? (p = t = w, d = !0) : (p = t = new Path2D(), b[x] = p); } d || (t.beginPath && t.beginPath(), c ? g.draw(t, 1, 0, { x: 0, y: 0 }, 1) : g.draw(t, m, l, f, r), t.closePath && t.closePath()), t = h, c && (t.translate(i, s), t.rotate(l), t.scale(m, m)), (n === "filled" || n === "both") && (c ? t.fill(p) : t.fill()), (n === "hollow" || n === "both") && (t.lineWidth = a / (c ? m : 1), t.lineJoin = "miter", c ? t.stroke(p) : t.stroke()), c && (t.scale(1 / m, 1 / m), t.rotate(-l), t.translate(-i, -s)); }; var P$ = {}; P$.safeDrawImage = function(e, t, n, r, o, a, i, s, l, u) { if (!(o <= 0 || a <= 0 || l <= 0 || u <= 0)) try { e.drawImage(t, n, r, o, a, i, s, l, u); } catch (c) { sn(c); } }; P$.drawInscribedImage = function(e, t, n, r, o) { var a = this, i = n.position(), s = i.x, l = i.y, u = n.cy().style(), c = u.getIndexedStyle.bind(u), d = c(n, "background-fit", "value", r), p = c(n, "background-repeat", "value", r), h = n.width(), f = n.height(), v = n.padding() * 2, m = h + (c(n, "background-width-relative-to", "value", r) === "inner" ? 0 : v), g = f + (c(n, "background-height-relative-to", "value", r) === "inner" ? 0 : v), b = n._private.rscratch, x = c(n, "background-clip", "value", r), w = x === "node", k = c(n, "background-image-opacity", "value", r) * o, C = c(n, "background-image-smoothing", "value", r), _ = n.pstyle("corner-radius").value; _ !== "auto" && (_ = n.pstyle("corner-radius").pfValue); var $ = t.width || t.cachedW, O = t.height || t.cachedH; ($ == null || O == null) && (document.body.appendChild(t), $ = t.cachedW = t.width || t.offsetWidth, O = t.cachedH = t.height || t.offsetHeight, document.body.removeChild(t)); var F = $, A = O; if (c(n, "background-width", "value", r) !== "auto" && (c(n, "background-width", "units", r) === "%" ? F = c(n, "background-width", "pfValue", r) * m : F = c(n, "background-width", "pfValue", r)), c(n, "background-height", "value", r) !== "auto" && (c(n, "background-height", "units", r) === "%" ? A = c(n, "background-height", "pfValue", r) * g : A = c(n, "background-height", "pfValue", r)), !(F === 0 || A === 0)) { if (d === "contain") { var T = Math.min(m / F, g / A); F *= T, A *= T; } else if (d === "cover") { var T = Math.max(m / F, g / A); F *= T, A *= T; } var R = s - m / 2, M = c(n, "background-position-x", "units", r), j = c(n, "background-position-x", "pfValue", r); M === "%" ? R += (m - F) * j : R += j; var P = c(n, "background-offset-x", "units", r), V = c(n, "background-offset-x", "pfValue", r); P === "%" ? R += (m - F) * V : R += V; var U = l - g / 2, G = c(n, "background-position-y", "units", r), se = c(n, "background-position-y", "pfValue", r); G === "%" ? U += (g - A) * se : U += se; var ae = c(n, "background-offset-y", "units", r), de = c(n, "background-offset-y", "pfValue", r); ae === "%" ? U += (g - A) * de : U += de, b.pathCache && (R -= s, U -= l, s = 0, l = 0); var me = e.globalAlpha; e.globalAlpha = k; var te = a.getImgSmoothing(e), oe = !1; if (C === "no" && te ? (a.setImgSmoothing(e, !1), oe = !0) : C === "yes" && !te && (a.setImgSmoothing(e, !0), oe = !0), p === "no-repeat") w && (e.save(), b.pathCache ? e.clip(b.pathCache) : (a.nodeShapes[a.getNodeShape(n)].draw(e, s, l, m, g, _, b), e.clip())), a.safeDrawImage(e, t, 0, 0, $, O, R, U, F, A), w && e.restore(); else { var ne = e.createPattern(t, p); e.fillStyle = ne, a.nodeShapes[a.getNodeShape(n)].draw(e, s, l, m, g, _, b), e.translate(R, U), e.fill(), e.translate(-R, -U); } e.globalAlpha = me, oe && a.setImgSmoothing(e, te); } }; var Du = {}; Du.eleTextBiggerThanMin = function(e, t) { if (!t) { var n = e.cy().zoom(), r = this.getPixelRatio(), o = Math.ceil(m$(n * r)); t = Math.pow(2, o); } var a = e.pstyle("font-size").pfValue * t, i = e.pstyle("min-zoomed-font-size").pfValue; return !(a < i); }; Du.drawElementText = function(e, t, n, r, o) { var a = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : !0, i = this; if (r == null) { if (a && !i.eleTextBiggerThanMin(t)) return; } else if (r === !1) return; if (t.isNode()) { var s = t.pstyle("label"); if (!s || !s.value) return; var l = i.getLabelJustification(t); e.textAlign = l, e.textBaseline = "bottom"; } else { var u = t.element()._private.rscratch.badLine, c = t.pstyle("label"), d = t.pstyle("source-label"), p = t.pstyle("target-label"); if (u || (!c || !c.value) && (!d || !d.value) && (!p || !p.value)) return; e.textAlign = "center", e.textBaseline = "bottom"; } var h = !n, f; n && (f = n, e.translate(-f.x1, -f.y1)), o == null ? (i.drawText(e, t, null, h, a), t.isEdge() && (i.drawText(e, t, "source", h, a), i.drawText(e, t, "target", h, a))) : i.drawText(e, t, o, h, a), n && e.translate(f.x1, f.y1); }; Du.getFontCache = function(e) { var t; this.fontCaches = this.fontCaches || []; for (var n = 0; n < this.fontCaches.length; n++) if (t = this.fontCaches[n], t.context === e) return t; return t = { context: e }, this.fontCaches.push(t), t; }; Du.setupTextStyle = function(e, t) { var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !0, r = t.pstyle("font-style").strValue, o = t.pstyle("font-size").pfValue + "px", a = t.pstyle("font-family").strValue, i = t.pstyle("font-weight").strValue, s = n ? t.effectiveOpacity() * t.pstyle("text-opacity").value : 1, l = t.pstyle("text-outline-opacity").value * s, u = t.pstyle("color").value, c = t.pstyle("text-outline-color").value; e.font = r + " " + i + " " + o + " " + a, e.lineJoin = "round", this.colorFillStyle(e, u[0], u[1], u[2], s), this.colorStrokeStyle(e, c[0], c[1], c[2], l); }; function ky(e, t, n, r, o) { var a = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : 5, i = arguments.length > 6 ? arguments[6] : void 0; e.beginPath(), e.moveTo(t + a, n), e.lineTo(t + r - a, n), e.quadraticCurveTo(t + r, n, t + r, n + a), e.lineTo(t + r, n + o - a), e.quadraticCurveTo(t + r, n + o, t + r - a, n + o), e.lineTo(t + a, n + o), e.quadraticCurveTo(t, n + o, t, n + o - a), e.lineTo(t, n + a), e.quadraticCurveTo(t, n, t + a, n), e.closePath(), i ? e.stroke() : e.fill(); } Du.getTextAngle = function(e, t) { var n, r = e._private, o = r.rscratch, a = t ? t + "-" : "", i = e.pstyle(a + "text-rotation"), s = La(o, "labelAngle", t); return i.strValue === "autorotate" ? n = e.isEdge() ? s : 0 : i.strValue === "none" ? n = 0 : n = i.pfValue, n; }; Du.drawText = function(e, t, n) { var r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !0, o = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !0, a = t._private, i = a.rscratch, s = o ? t.effectiveOpacity() : 1; if (!(o && (s === 0 || t.pstyle("text-opacity").value === 0))) { n === "main" && (n = null); var l = La(i, "labelX", n), u = La(i, "labelY", n), c, d, p = this.getLabelText(t, n); if (p != null && p !== "" && !isNaN(l) && !isNaN(u)) { this.setupTextStyle(e, t, o); var h = n ? n + "-" : "", f = La(i, "labelWidth", n), v = La(i, "labelHeight", n), m = t.pstyle(h + "text-margin-x").pfValue, g = t.pstyle(h + "text-margin-y").pfValue, b = t.isEdge(), x = t.pstyle("text-halign").value, w = t.pstyle("text-valign").value; b && (x = "center", w = "center"), l += m, u += g; var k; switch (r ? k = this.getTextAngle(t, n) : k = 0, k !== 0 && (c = l, d = u, e.translate(c, d), e.rotate(k), l = 0, u = 0), w) { case "top": break; case "center": u += v / 2; break; case "bottom": u += v; break; } var C = t.pstyle("text-background-opacity").value, _ = t.pstyle("text-border-opacity").value, $ = t.pstyle("text-border-width").pfValue, O = t.pstyle("text-background-padding").pfValue, F = t.pstyle("text-background-shape").strValue, A = F.indexOf("round") === 0, T = 2; if (C > 0 || $ > 0 && _ > 0) { var R = l - O; switch (x) { case "left": R -= f; break; case "center": R -= f / 2; break; } var M = u - v - O, j = f + 2 * O, P = v + 2 * O; if (C > 0) { var V = e.fillStyle, U = t.pstyle("text-background-color").value; e.fillStyle = "rgba(" + U[0] + "," + U[1] + "," + U[2] + "," + C * s + ")", A ? ky(e, R, M, j, P, T) : e.fillRect(R, M, j, P), e.fillStyle = V; } if ($ > 0 && _ > 0) { var G = e.strokeStyle, se = e.lineWidth, ae = t.pstyle("text-border-color").value, de = t.pstyle("text-border-style").value; if (e.strokeStyle = "rgba(" + ae[0] + "," + ae[1] + "," + ae[2] + "," + _ * s + ")", e.lineWidth = $, e.setLineDash) switch (de) { case "dotted": e.setLineDash([1, 1]); break; case "dashed": e.setLineDash([4, 2]); break; case "double": e.lineWidth = $ / 4, e.setLineDash([]); break; case "solid": e.setLineDash([]); break; } if (A ? ky(e, R, M, j, P, T, "stroke") : e.strokeRect(R, M, j, P), de === "double") { var me = $ / 2; A ? ky(e, R + me, M + me, j - me * 2, P - me * 2, T, "stroke") : e.strokeRect(R + me, M + me, j - me * 2, P - me * 2); } e.setLineDash && e.setLineDash([]), e.lineWidth = se, e.strokeStyle = G; } } var te = 2 * t.pstyle("text-outline-width").pfValue; if (te > 0 && (e.lineWidth = te), t.pstyle("text-wrap").value === "wrap") { var oe = La(i, "labelWrapCachedLines", n), ne = La(i, "labelLineHeight", n), ee = f / 2, Z = this.getLabelJustification(t); switch (Z === "auto" || (x === "left" ? Z === "left" ? l += -f : Z === "center" && (l += -ee) : x === "center" ? Z === "left" ? l += -ee : Z === "right" && (l += ee) : x === "right" && (Z === "center" ? l += ee : Z === "right" && (l += f))), w) { case "top": u -= (oe.length - 1) * ne; break; case "center": case "bottom": u -= (oe.length - 1) * ne; break; } for (var le = 0; le < oe.length; le++) te > 0 && e.strokeText(oe[le], l, u), e.fillText(oe[le], l, u), u += ne; } else te > 0 && e.strokeText(p, l, u), e.fillText(p, l, u); k !== 0 && (e.rotate(-k), e.translate(-c, -d)); } } }; var Sd = {}; Sd.drawNode = function(e, t, n) { var r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !0, o = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !0, a = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : !0, i = this, s, l, u = t._private, c = u.rscratch, d = t.position(); if (!(!Ze(d.x) || !Ze(d.y)) && !(a && !t.visible())) { var p = a ? t.effectiveOpacity() : 1, h = i.usePaths(), f, v = !1, m = t.padding(); s = t.width() + 2 * m, l = t.height() + 2 * m; var g; n && (g = n, e.translate(-g.x1, -g.y1)); for (var b = t.pstyle("background-image"), x = b.value, w = new Array(x.length), k = new Array(x.length), C = 0, _ = 0; _ < x.length; _++) { var $ = x[_], O = w[_] = $ != null && $ !== "none"; if (O) { var F = t.cy().style().getIndexedStyle(t, "background-image-crossorigin", "value", _); C++, k[_] = i.getCachedImage($, F, function() { u.backgroundTimestamp = Date.now(), t.emitAndNotify("background"); }); } } var A = t.pstyle("background-blacken").value, T = t.pstyle("border-width").pfValue, R = t.pstyle("background-opacity").value * p, M = t.pstyle("border-color").value, j = t.pstyle("border-style").value, P = t.pstyle("border-join").value, V = t.pstyle("border-cap").value, U = t.pstyle("border-position").value, G = t.pstyle("border-dash-pattern").pfValue, se = t.pstyle("border-dash-offset").pfValue, ae = t.pstyle("border-opacity").value * p, de = t.pstyle("outline-width").pfValue, me = t.pstyle("outline-color").value, te = t.pstyle("outline-style").value, oe = t.pstyle("outline-opacity").value * p, ne = t.pstyle("outline-offset").value, ee = t.pstyle("corner-radius").value; ee !== "auto" && (ee = t.pstyle("corner-radius").pfValue); var Z = function() { var Pe = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : R; i.eleFillStyle(e, t, Pe); }, le = function() { var Pe = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : ae; i.colorStrokeStyle(e, M[0], M[1], M[2], Pe); }, pe = function() { var Pe = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : oe; i.colorStrokeStyle(e, me[0], me[1], me[2], Pe); }, ke = function(Pe, Ce, ze, lt) { var rt = i.nodePathCache = i.nodePathCache || [], fe = AB(ze === "polygon" ? ze + "," + lt.join(",") : ze, "" + Ce, "" + Pe, "" + ee), Te = rt[fe], Se, Ue = !1; return Te != null ? (Se = Te, Ue = !0, c.pathCache = Se) : (Se = new Path2D(), rt[fe] = c.pathCache = Se), { path: Se, cacheHit: Ue }; }, Ne = t.pstyle("shape").strValue, De = t.pstyle("shape-polygon-points").pfValue; if (h) { e.translate(d.x, d.y); var _e = ke(s, l, Ne, De); f = _e.path, v = _e.cacheHit; } var Fe = function() { if (!v) { var Pe = d; h && (Pe = { x: 0, y: 0 }), i.nodeShapes[i.getNodeShape(t)].draw(f || e, Pe.x, Pe.y, s, l, ee, c); } h ? e.fill(f) : e.fill(); }, Ie = function() { for (var Pe = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : p, Ce = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, ze = u.backgrounding, lt = 0, rt = 0; rt < k.length; rt++) { var fe = t.cy().style().getIndexedStyle(t, "background-image-containment", "value", rt); if (Ce && fe === "over" || !Ce && fe === "inside") { lt++; continue; } w[rt] && k[rt].complete && !k[rt].error && (lt++, i.drawInscribedImage(e, k[rt], t, rt, Pe)); } u.backgrounding = lt !== C, ze !== u.backgrounding && t.updateStyle(!1); }, Ae = function() { var Pe = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1, Ce = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : p; i.hasPie(t) && (i.drawPie(e, t, Ce), Pe && (h || i.nodeShapes[i.getNodeShape(t)].draw(e, d.x, d.y, s, l, ee, c))); }, qe = function() { var Pe = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : p, Ce = (A > 0 ? A : -A) * Pe, ze = A > 0 ? 0 : 255; A !== 0 && (i.colorFillStyle(e, ze, ze, ze, Ce), h ? e.fill(f) : e.fill()); }, et = function() { if (T > 0) { if (e.lineWidth = T, e.lineCap = V, e.lineJoin = P, e.setLineDash) switch (j) { case "dotted": e.setLineDash([1, 1]); break; case "dashed": e.setLineDash(G), e.lineDashOffset = se; break; case "solid": case "double": e.setLineDash([]); break; } if (U !== "center") { if (e.save(), e.lineWidth *= 2, U === "inside") h ? e.clip(f) : e.clip(); else { var Pe = new Path2D(); Pe.rect(-s / 2 - T, -l / 2 - T, s + 2 * T, l + 2 * T), Pe.addPath(f), e.clip(Pe, "evenodd"); } h ? e.stroke(f) : e.stroke(), e.restore(); } else h ? e.stroke(f) : e.stroke(); if (j === "double") { e.lineWidth = T / 3; var Ce = e.globalCompositeOperation; e.globalCompositeOperation = "destination-out", h ? e.stroke(f) : e.stroke(), e.globalCompositeOperation = Ce; } e.setLineDash && e.setLineDash([]); } }, He = function() { if (de > 0) { if (e.lineWidth = de, e.lineCap = "butt", e.setLineDash) switch (te) { case "dotted": e.setLineDash([1, 1]); break; case "dashed": e.setLineDash([4, 2]); break; case "solid": case "double": e.setLineDash([]); break; } var Pe = d; h && (Pe = { x: 0, y: 0 }); var Ce = i.getNodeShape(t), ze = T; U === "inside" && (ze = 0), U === "outside" && (ze *= 2); var lt = (s + ze + (de + ne)) / s, rt = (l + ze + (de + ne)) / l, fe = s * lt, Te = l * rt, Se = i.nodeShapes[Ce].points, Ue; if (h) { var zt = ke(fe, Te, Ce, Se); Ue = zt.path; } if (Ce === "ellipse") i.drawEllipsePath(Ue || e, Pe.x, Pe.y, fe, Te); else if (["round-diamond", "round-heptagon", "round-hexagon", "round-octagon", "round-pentagon", "round-polygon", "round-triangle", "round-tag"].includes(Ce)) { var Pt = 0, qt = 0, Ht = 0; Ce === "round-diamond" ? Pt = (ze + ne + de) * 1.4 : Ce === "round-heptagon" ? (Pt = (ze + ne + de) * 1.075, Ht = -(ze / 2 + ne + de) / 35) : Ce === "round-hexagon" ? Pt = (ze + ne + de) * 1.12 : Ce === "round-pentagon" ? (Pt = (ze + ne + de) * 1.13, Ht = -(ze / 2 + ne + de) / 15) : Ce === "round-tag" ? (Pt = (ze + ne + de) * 1.12, qt = (ze / 2 + de + ne) * 0.07) : Ce === "round-triangle" && (Pt = (ze + ne + de) * (Math.PI / 2), Ht = -(ze + ne / 2 + de) / Math.PI), Pt !== 0 && (lt = (s + Pt) / s, fe = s * lt, ["round-hexagon", "round-tag"].includes(Ce) || (rt = (l + Pt) / l, Te = l * rt)), ee = ee === "auto" ? VB(fe, Te) : ee; for (var tn = fe / 2, Dn = Te / 2, hn = ee + (ze + de + ne) / 2, vn = new Array(Se.length / 2), Pn = new Array(Se.length / 2), Bn = 0; Bn < Se.length / 2; Bn++) vn[Bn] = { x: Pe.x + qt + tn * Se[Bn * 2], y: Pe.y + Ht + Dn * Se[Bn * 2 + 1] }; var Cn, hr, or, ar, nn = vn.length; for (hr = vn[nn - 1], Cn = 0; Cn < nn; Cn++) or = vn[Cn % nn], ar = vn[(Cn + 1) % nn], Pn[Cn] = A$(hr, or, ar, hn), hr = or, or = ar; i.drawRoundPolygonPath(Ue || e, Pe.x + qt, Pe.y + Ht, s * lt, l * rt, Se, Pn); } else if (["roundrectangle", "round-rectangle"].includes(Ce)) ee = ee === "auto" ? hu(fe, Te) : ee, i.drawRoundRectanglePath(Ue || e, Pe.x, Pe.y, fe, Te, ee + (ze + de + ne) / 2); else if (["cutrectangle", "cut-rectangle"].includes(Ce)) ee = ee === "auto" ? b$() : ee, i.drawCutRectanglePath(Ue || e, Pe.x, Pe.y, fe, Te, null, ee + (ze + de + ne) / 4); else if (["bottomroundrectangle", "bottom-round-rectangle"].includes(Ce)) ee = ee === "auto" ? hu(fe, Te) : ee, i.drawBottomRoundRectanglePath(Ue || e, Pe.x, Pe.y, fe, Te, ee + (ze + de + ne) / 2); else if (Ce === "barrel") i.drawBarrelPath(Ue || e, Pe.x, Pe.y, fe, Te); else if (Ce.startsWith("polygon") || ["rhomboid", "right-rhomboid", "round-tag", "tag", "vee"].includes(Ce)) { var gn = (ze + de + ne) / s; Se = jg(Vg(Se, gn)), i.drawPolygonPath(Ue || e, Pe.x, Pe.y, s, l, Se); } else { var Fn = (ze + de + ne) / s; Se = jg(Vg(Se, -Fn)), i.drawPolygonPath(Ue || e, Pe.x, Pe.y, s, l, Se); } if (h ? e.stroke(Ue) : e.stroke(), te === "double") { e.lineWidth = ze / 3; var vr = e.globalCompositeOperation; e.globalCompositeOperation = "destination-out", h ? e.stroke(Ue) : e.stroke(), e.globalCompositeOperation = vr; } e.setLineDash && e.setLineDash([]); } }, ot = function() { o && i.drawNodeOverlay(e, t, d, s, l); }, tt = function() { o && i.drawNodeUnderlay(e, t, d, s, l); }, Qe = function() { i.drawElementText(e, t, null, r); }, I = t.pstyle("ghost").value === "yes"; if (I) { var Y = t.pstyle("ghost-offset-x").pfValue, ve = t.pstyle("ghost-offset-y").pfValue, we = t.pstyle("ghost-opacity").value, ye = we * p; e.translate(Y, ve), pe(), He(), Z(we * R), Fe(), Ie(ye, !0), le(we * ae), et(), Ae(A !== 0 || T !== 0), Ie(ye, !1), qe(ye), e.translate(-Y, -ve); } h && e.translate(-d.x, -d.y), tt(), h && e.translate(d.x, d.y), pe(), He(), Z(), Fe(), Ie(p, !0), le(), et(), Ae(A !== 0 || T !== 0), Ie(p, !1), qe(), h && e.translate(-d.x, -d.y), Qe(), ot(), n && e.translate(g.x1, g.y1); } }; var qz = function(e) { if (!["overlay", "underlay"].includes(e)) throw new Error("Invalid state"); return function(t, n, r, o, a) { var i = this; if (n.visible()) { var s = n.pstyle("".concat(e, "-padding")).pfValue, l = n.pstyle("".concat(e, "-opacity")).value, u = n.pstyle("".concat(e, "-color")).value, c = n.pstyle("".concat(e, "-shape")).value, d = n.pstyle("".concat(e, "-corner-radius")).value; if (l > 0) { if (r = r || n.position(), o == null || a == null) { var p = n.padding(); o = n.width() + 2 * p, a = n.height() + 2 * p; } i.colorFillStyle(t, u[0], u[1], u[2], l), i.nodeShapes[c].draw(t, r.x, r.y, o + s * 2, a + s * 2, d), t.fill(); } } }; }; Sd.drawNodeOverlay = qz("overlay"); Sd.drawNodeUnderlay = qz("underlay"); Sd.hasPie = function(e) { return e = e[0], e._private.hasPie; }; Sd.drawPie = function(e, t, n, r) { t = t[0], r = r || t.position(); var o = t.cy().style(), a = t.pstyle("pie-size"), i = r.x, s = r.y, l = t.width(), u = t.height(), c = Math.min(l, u) / 2, d = 0, p = this.usePaths(); p && (i = 0, s = 0), a.units === "%" ? c = c * a.pfValue : a.pfValue !== void 0 && (c = a.pfValue / 2); for (var h = 1; h <= o.pieBackgroundN; h++) { var f = t.pstyle("pie-" + h + "-background-size").value, v = t.pstyle("pie-" + h + "-background-color").value, m = t.pstyle("pie-" + h + "-background-opacity").value * n, g = f / 100; g + d > 1 && (g = 1 - d); var b = 1.5 * Math.PI + 2 * Math.PI * d, x = 2 * Math.PI * g, w = b + x; f === 0 || d >= 1 || d + g > 1 || (e.beginPath(), e.moveTo(i, s), e.arc(i, s, c, b, w), e.closePath(), this.colorFillStyle(e, v[0], v[1], v[2], m), e.fill(), d += g); } }; var jo = {}, wxe = 100; jo.getPixelRatio = function() { var e = this.data.contexts[0]; if (this.forcedPixelRatio != null) return this.forcedPixelRatio; var t = this.cy.window(), n = e.backingStorePixelRatio || e.webkitBackingStorePixelRatio || e.mozBackingStorePixelRatio || e.msBackingStorePixelRatio || e.oBackingStorePixelRatio || e.backingStorePixelRatio || 1; return (t.devicePixelRatio || 1) / n; }; jo.paintCache = function(e) { for (var t = this.paintCaches = this.paintCaches || [], n = !0, r, o = 0; o < t.length; o++) if (r = t[o], r.context === e) { n = !1; break; } return n && (r = { context: e }, t.push(r)), r; }; jo.createGradientStyleFor = function(e, t, n, r, o) { var a, i = this.usePaths(), s = n.pstyle(t + "-gradient-stop-colors").value, l = n.pstyle(t + "-gradient-stop-positions").pfValue; if (r === "radial-gradient") if (n.isEdge()) { var u = n.sourceEndpoint(), c = n.targetEndpoint(), d = n.midpoint(), p = fu(u, d), h = fu(c, d); a = e.createRadialGradient(d.x, d.y, 0, d.x, d.y, Math.max(p, h)); } else { var f = i ? { x: 0, y: 0 } : n.position(), v = n.paddedWidth(), m = n.paddedHeight(); a = e.createRadialGradient(f.x, f.y, 0, f.x, f.y, Math.max(v, m)); } else if (n.isEdge()) { var g = n.sourceEndpoint(), b = n.targetEndpoint(); a = e.createLinearGradient(g.x, g.y, b.x, b.y); } else { var x = i ? { x: 0, y: 0 } : n.position(), w = n.paddedWidth(), k = n.paddedHeight(), C = w / 2, _ = k / 2, $ = n.pstyle("background-gradient-direction").value; switch ($) { case "to-bottom": a = e.createLinearGradient(x.x, x.y - _, x.x, x.y + _); break; case "to-top": a = e.createLinearGradient(x.x, x.y + _, x.x, x.y - _); break; case "to-left": a = e.createLinearGradient(x.x + C, x.y, x.x - C, x.y); break; case "to-right": a = e.createLinearGradient(x.x - C, x.y, x.x + C, x.y); break; case "to-bottom-right": case "to-right-bottom": a = e.createLinearGradient(x.x - C, x.y - _, x.x + C, x.y + _); break; case "to-top-right": case "to-right-top": a = e.createLinearGradient(x.x - C, x.y + _, x.x + C, x.y - _); break; case "to-bottom-left": case "to-left-bottom": a = e.createLinearGradient(x.x + C, x.y - _, x.x - C, x.y + _); break; case "to-top-left": case "to-left-top": a = e.createLinearGradient(x.x + C, x.y + _, x.x - C, x.y - _); break; } } if (!a) return null; for (var O = l.length === s.length, F = s.length, A = 0; A < F; A++) a.addColorStop(O ? l[A] : A / (F - 1), "rgba(" + s[A][0] + "," + s[A][1] + "," + s[A][2] + "," + o + ")"); return a; }; jo.gradientFillStyle = function(e, t, n, r) { var o = this.createGradientStyleFor(e, "background", t, n, r); if (!o) return null; e.fillStyle = o; }; jo.colorFillStyle = function(e, t, n, r, o) { e.fillStyle = "rgba(" + t + "," + n + "," + r + "," + o + ")"; }; jo.eleFillStyle = function(e, t, n) { var r = t.pstyle("background-fill").value; if (r === "linear-gradient" || r === "radial-gradient") this.gradientFillStyle(e, t, r, n); else { var o = t.pstyle("background-color").value; this.colorFillStyle(e, o[0], o[1], o[2], n); } }; jo.gradientStrokeStyle = function(e, t, n, r) { var o = this.createGradientStyleFor(e, "line", t, n, r); if (!o) return null; e.strokeStyle = o; }; jo.colorStrokeStyle = function(e, t, n, r, o) { e.strokeStyle = "rgba(" + t + "," + n + "," + r + "," + o + ")"; }; jo.eleStrokeStyle = function(e, t, n) { var r = t.pstyle("line-fill").value; if (r === "linear-gradient" || r === "radial-gradient") this.gradientStrokeStyle(e, t, r, n); else { var o = t.pstyle("line-color").value; this.colorStrokeStyle(e, o[0], o[1], o[2], n); } }; jo.matchCanvasSize = function(e) { var t = this, n = t.data, r = t.findContainerClientCoords(), o = r[2], a = r[3], i = t.getPixelRatio(), s = t.motionBlurPxRatio; (e === t.data.bufferCanvases[t.MOTIONBLUR_BUFFER_NODE] || e === t.data.bufferCanvases[t.MOTIONBLUR_BUFFER_DRAG]) && (i = s); var l = o * i, u = a * i, c; if (!(l === t.canvasWidth && u === t.canvasHeight)) { t.fontCaches = null; var d = n.canvasContainer; d.style.width = o + "px", d.style.height = a + "px"; for (var p = 0; p < t.CANVAS_LAYERS; p++) c = n.canvases[p], c.width = l, c.height = u, c.style.width = o + "px", c.style.height = a + "px"; for (var p = 0; p < t.BUFFER_COUNT; p++) c = n.bufferCanvases[p], c.width = l, c.height = u, c.style.width = o + "px", c.style.height = a + "px"; t.textureMult = 1, i <= 1 && (c = n.bufferCanvases[t.TEXTURE_BUFFER], t.textureMult = 2, c.width = l * t.textureMult, c.height = u * t.textureMult), t.canvasWidth = l, t.canvasHeight = u; } }; jo.renderTo = function(e, t, n, r) { this.render({ forcedContext: e, forcedZoom: t, forcedPan: n, drawAllLayers: !0, forcedPxRatio: r }); }; jo.render = function(e) { e = e || RB(); var t = e.forcedContext, n = e.drawAllLayers, r = e.drawOnlyNodeLayer, o = e.forcedZoom, a = e.forcedPan, i = this, s = e.forcedPxRatio === void 0 ? this.getPixelRatio() : e.forcedPxRatio, l = i.cy, u = i.data, c = u.canvasNeedsRedraw, d = i.textureOnViewport && !t && (i.pinching || i.hoverData.dragging || i.swipePanning || i.data.wheelZooming), p = e.motionBlur !== void 0 ? e.motionBlur : i.motionBlur, h = i.motionBlurPxRatio, f = l.hasCompoundNodes(), v = i.hoverData.draggingEles, m = !!(i.hoverData.selecting || i.touchData.selecting); p = p && !t && i.motionBlurEnabled && !m; var g = p; t || (i.prevPxRatio !== s && (i.invalidateContainerClientCoordsCache(), i.matchCanvasSize(i.container), i.redrawHint("eles", !0), i.redrawHint("drag", !0)), i.prevPxRatio = s), !t && i.motionBlurTimeout && clearTimeout(i.motionBlurTimeout), p && (i.mbFrames == null && (i.mbFrames = 0), i.mbFrames++, i.mbFrames < 3 && (g = !1), i.mbFrames > i.minMbLowQualFrames && (i.motionBlurPxRatio = i.mbPxRBlurry)), i.clearingMotionBlur && (i.motionBlurPxRatio = 1), i.textureDrawLastFrame && !d && (c[i.NODE] = !0, c[i.SELECT_BOX] = !0); var b = l.style(), x = l.zoom(), w = o !== void 0 ? o : x, k = l.pan(), C = { x: k.x, y: k.y }, _ = { zoom: x, pan: { x: k.x, y: k.y } }, $ = i.prevViewport, O = $ === void 0 || _.zoom !== $.zoom || _.pan.x !== $.pan.x || _.pan.y !== $.pan.y; !O && !(v && !f) && (i.motionBlurPxRatio = 1), a && (C = a), w *= s, C.x *= s, C.y *= s; var F = i.getCachedZSortedEles(); function A(_e, Fe, Ie, Ae, qe) { var et = _e.globalCompositeOperation; _e.globalCompositeOperation = "destination-out", i.colorFillStyle(_e, 255, 255, 255, i.motionBlurTransparency), _e.fillRect(Fe, Ie, Ae, qe), _e.globalCompositeOperation = et; } function T(_e, Fe) { var Ie, Ae, qe, et; !i.clearingMotionBlur && (_e === u.bufferContexts[i.MOTIONBLUR_BUFFER_NODE] || _e === u.bufferContexts[i.MOTIONBLUR_BUFFER_DRAG]) ? (Ie = { x: k.x * h, y: k.y * h }, Ae = x * h, qe = i.canvasWidth * h, et = i.canvasHeight * h) : (Ie = C, Ae = w, qe = i.canvasWidth, et = i.canvasHeight), _e.setTransform(1, 0, 0, 1, 0, 0), Fe === "motionBlur" ? A(_e, 0, 0, qe, et) : !t && (Fe === void 0 || Fe) && _e.clearRect(0, 0, qe, et), n || (_e.translate(Ie.x, Ie.y), _e.scale(Ae, Ae)), a && _e.translate(a.x, a.y), o && _e.scale(o, o); } if (d || (i.textureDrawLastFrame = !1), d) { if (i.textureDrawLastFrame = !0, !i.textureCache) { i.textureCache = {}, i.textureCache.bb = l.mutableElements().boundingBox(), i.textureCache.texture = i.data.bufferCanvases[i.TEXTURE_BUFFER]; var R = i.data.bufferContexts[i.TEXTURE_BUFFER]; R.setTransform(1, 0, 0, 1, 0, 0), R.clearRect(0, 0, i.canvasWidth * i.textureMult, i.canvasHeight * i.textureMult), i.render({ forcedContext: R, drawOnlyNodeLayer: !0, forcedPxRatio: s * i.textureMult }); var _ = i.textureCache.viewport = { zoom: l.zoom(), pan: l.pan(), width: i.canvasWidth, height: i.canvasHeight }; _.mpan = { x: (0 - _.pan.x) / _.zoom, y: (0 - _.pan.y) / _.zoom }; } c[i.DRAG] = !1, c[i.NODE] = !1; var M = u.contexts[i.NODE], j = i.textureCache.texture, _ = i.textureCache.viewport; M.setTransform(1, 0, 0, 1, 0, 0), p ? A(M, 0, 0, _.width, _.height) : M.clearRect(0, 0, _.width, _.height); var P = b.core("outside-texture-bg-color").value, V = b.core("outside-texture-bg-opacity").value; i.colorFillStyle(M, P[0], P[1], P[2], V), M.fillRect(0, 0, _.width, _.height); var x = l.zoom(); T(M, !1), M.clearRect(_.mpan.x, _.mpan.y, _.width / _.zoom / s, _.height / _.zoom / s), M.drawImage(j, _.mpan.x, _.mpan.y, _.width / _.zoom / s, _.height / _.zoom / s); } else i.textureOnViewport && !t && (i.textureCache = null); var U = l.extent(), G = i.pinching || i.hoverData.dragging || i.swipePanning || i.data.wheelZooming || i.hoverData.draggingEles || i.cy.animated(), se = i.hideEdgesOnViewport && G, ae = []; if (ae[i.NODE] = !c[i.NODE] && p && !i.clearedForMotionBlur[i.NODE] || i.clearingMotionBlur, ae[i.NODE] && (i.clearedForMotionBlur[i.NODE] = !0), ae[i.DRAG] = !c[i.DRAG] && p && !i.clearedForMotionBlur[i.DRAG] || i.clearingMotionBlur, ae[i.DRAG] && (i.clearedForMotionBlur[i.DRAG] = !0), c[i.NODE] || n || r || ae[i.NODE]) { var de = p && !ae[i.NODE] && h !== 1, M = t || (de ? i.data.bufferContexts[i.MOTIONBLUR_BUFFER_NODE] : u.contexts[i.NODE]), me = p && !de ? "motionBlur" : void 0; T(M, me), se ? i.drawCachedNodes(M, F.nondrag, s, U) : i.drawLayeredElements(M, F.nondrag, s, U), i.debug && i.drawDebugPoints(M, F.nondrag), !n && !p && (c[i.NODE] = !1); } if (!r && (c[i.DRAG] || n || ae[i.DRAG])) { var de = p && !ae[i.DRAG] && h !== 1, M = t || (de ? i.data.bufferContexts[i.MOTIONBLUR_BUFFER_DRAG] : u.contexts[i.DRAG]); T(M, p && !de ? "motionBlur" : void 0), se ? i.drawCachedNodes(M, F.drag, s, U) : i.drawCachedElements(M, F.drag, s, U), i.debug && i.drawDebugPoints(M, F.drag), !n && !p && (c[i.DRAG] = !1); } if (i.showFps || !r && c[i.SELECT_BOX] && !n) { var M = t || u.contexts[i.SELECT_BOX]; if (T(M), i.selection[4] == 1 && (i.hoverData.selecting || i.touchData.selecting)) { var x = i.cy.zoom(), te = b.core("selection-box-border-width").value / x; M.lineWidth = te, M.fillStyle = "rgba(" + b.core("selection-box-color").value[0] + "," + b.core("selection-box-color").value[1] + "," + b.core("selection-box-color").value[2] + "," + b.core("selection-box-opacity").value + ")", M.fillRect(i.selection[0], i.selection[1], i.selection[2] - i.selection[0], i.selection[3] - i.selection[1]), te > 0 && (M.strokeStyle = "rgba(" + b.core("selection-box-border-color").value[0] + "," + b.core("selection-box-border-color").value[1] + "," + b.core("selection-box-border-color").value[2] + "," + b.core("selection-box-opacity").value + ")", M.strokeRect(i.selection[0], i.selection[1], i.selection[2] - i.selection[0], i.selection[3] - i.selection[1])); } if (u.bgActivePosistion && !i.hoverData.selecting) { var x = i.cy.zoom(), oe = u.bgActivePosistion; M.fillStyle = "rgba(" + b.core("active-bg-color").value[0] + "," + b.core("active-bg-color").value[1] + "," + b.core("active-bg-color").value[2] + "," + b.core("active-bg-opacity").value + ")", M.beginPath(), M.arc(oe.x, oe.y, b.core("active-bg-size").pfValue / x, 0, 2 * Math.PI), M.fill(); } var ne = i.lastRedrawTime; if (i.showFps && ne) { ne = Math.round(ne); var ee = Math.round(1e3 / ne); M.setTransform(1, 0, 0, 1, 0, 0), M.fillStyle = "rgba(255, 0, 0, 0.75)", M.strokeStyle = "rgba(255, 0, 0, 0.75)", M.lineWidth = 1, M.fillText("1 frame = " + ne + " ms = " + ee + " fps", 0, 20); var Z = 60; M.strokeRect(0, 30, 250, 20), M.fillRect(0, 30, 250 * Math.min(ee / Z, 1), 20); } n || (c[i.SELECT_BOX] = !1); } if (p && h !== 1) { var le = u.contexts[i.NODE], pe = i.data.bufferCanvases[i.MOTIONBLUR_BUFFER_NODE], ke = u.contexts[i.DRAG], Ne = i.data.bufferCanvases[i.MOTIONBLUR_BUFFER_DRAG], De = function(_e, Fe, Ie) { _e.setTransform(1, 0, 0, 1, 0, 0), Ie || !g ? _e.clearRect(0, 0, i.canvasWidth, i.canvasHeight) : A(_e, 0, 0, i.canvasWidth, i.canvasHeight); var Ae = h; _e.drawImage( Fe, // img 0, 0, // sx, sy i.canvasWidth * Ae, i.canvasHeight * Ae, // sw, sh 0, 0, // x, y i.canvasWidth, i.canvasHeight // w, h ); }; (c[i.NODE] || ae[i.NODE]) && (De(le, pe, ae[i.NODE]), c[i.NODE] = !1), (c[i.DRAG] || ae[i.DRAG]) && (De(ke, Ne, ae[i.DRAG]), c[i.DRAG] = !1); } i.prevViewport = _, i.clearingMotionBlur && (i.clearingMotionBlur = !1, i.motionBlurCleared = !0, i.motionBlur = !0), p && (i.motionBlurTimeout = setTimeout(function() { i.motionBlurTimeout = null, i.clearedForMotionBlur[i.NODE] = !1, i.clearedForMotionBlur[i.DRAG] = !1, i.motionBlur = !1, i.clearingMotionBlur = !d, i.mbFrames = 0, c[i.NODE] = !0, c[i.DRAG] = !0, i.redraw(); }, wxe)), t || l.emit("render"); }; var kl = {}; kl.drawPolygonPath = function(e, t, n, r, o, a) { var i = r / 2, s = o / 2; e.beginPath && e.beginPath(), e.moveTo(t + i * a[0], n + s * a[1]); for (var l = 1; l < a.length / 2; l++) e.lineTo(t + i * a[l * 2], n + s * a[l * 2 + 1]); e.closePath(); }; kl.drawRoundPolygonPath = function(e, t, n, r, o, a, i) { i.forEach(function(s) { return Pz(e, s); }), e.closePath(); }; kl.drawRoundRectanglePath = function(e, t, n, r, o, a) { var i = r / 2, s = o / 2, l = a === "auto" ? hu(r, o) : Math.min(a, s, i); e.beginPath && e.beginPath(), e.moveTo(t, n - s), e.arcTo(t + i, n - s, t + i, n, l), e.arcTo(t + i, n + s, t, n + s, l), e.arcTo(t - i, n + s, t - i, n, l), e.arcTo(t - i, n - s, t, n - s, l), e.lineTo(t, n - s), e.closePath(); }; kl.drawBottomRoundRectanglePath = function(e, t, n, r, o, a) { var i = r / 2, s = o / 2, l = a === "auto" ? hu(r, o) : a; e.beginPath && e.beginPath(), e.moveTo(t, n - s), e.lineTo(t + i, n - s), e.lineTo(t + i, n), e.arcTo(t + i, n + s, t, n + s, l), e.arcTo(t - i, n + s, t - i, n, l), e.lineTo(t - i, n - s), e.lineTo(t, n - s), e.closePath(); }; kl.drawCutRectanglePath = function(e, t, n, r, o, a, i) { var s = r / 2, l = o / 2, u = i === "auto" ? b$() : i; e.beginPath && e.beginPath(), e.moveTo(t - s + u, n - l), e.lineTo(t + s - u, n - l), e.lineTo(t + s, n - l + u), e.lineTo(t + s, n + l - u), e.lineTo(t + s - u, n + l), e.lineTo(t - s + u, n + l), e.lineTo(t - s, n + l - u), e.lineTo(t - s, n - l + u), e.closePath(); }; kl.drawBarrelPath = function(e, t, n, r, o) { var a = r / 2, i = o / 2, s = t - a, l = t + a, u = n - i, c = n + i, d = VC(r, o), p = d.widthOffset, h = d.heightOffset, f = d.ctrlPtOffsetPct * p; e.beginPath && e.beginPath(), e.moveTo(s, u + h), e.lineTo(s, c - h), e.quadraticCurveTo(s + f, c, s + p, c), e.lineTo(l - p, c), e.quadraticCurveTo(l - f, c, l, c - h), e.lineTo(l, u + h), e.quadraticCurveTo(l - f, u, l - p, u), e.lineTo(s + p, u), e.quadraticCurveTo(s + f, u, s, u + h), e.closePath(); }; var RF = Math.sin(0), NF = Math.cos(0), e_ = {}, t_ = {}, Kz = Math.PI / 40; for (var lc = 0 * Math.PI; lc < 2 * Math.PI; lc += Kz) e_[lc] = Math.sin(lc), t_[lc] = Math.cos(lc); kl.drawEllipsePath = function(e, t, n, r, o) { if (e.beginPath && e.beginPath(), e.ellipse) e.ellipse(t, n, r / 2, o / 2, 0, 0, 2 * Math.PI); else for (var a, i, s = r / 2, l = o / 2, u = 0 * Math.PI; u < 2 * Math.PI; u += Kz) a = t - s * e_[u] * RF + s * t_[u] * NF, i = n + l * t_[u] * RF + l * e_[u] * NF, u === 0 ? e.moveTo(a, i) : e.lineTo(a, i); e.closePath(); }; var lh = {}; lh.createBuffer = function(e, t) { var n = document.createElement("canvas"); return n.width = e, n.height = t, [n, n.getContext("2d")]; }; lh.bufferCanvasImage = function(e) { var t = this.cy, n = t.mutableElements(), r = n.boundingBox(), o = this.findContainerClientCoords(), a = e.full ? Math.ceil(r.w) : o[2], i = e.full ? Math.ceil(r.h) : o[3], s = Ze(e.maxWidth) || Ze(e.maxHeight), l = this.getPixelRatio(), u = 1; if (e.scale !== void 0) a *= e.scale, i *= e.scale, u = e.scale; else if (s) { var c = 1 / 0, d = 1 / 0; Ze(e.maxWidth) && (c = u * e.maxWidth / a), Ze(e.maxHeight) && (d = u * e.maxHeight / i), u = Math.min(c, d), a *= u, i *= u; } s || (a *= l, i *= l, u *= l); var p = document.createElement("canvas"); p.width = a, p.height = i, p.style.width = a + "px", p.style.height = i + "px"; var h = p.getContext("2d"); if (a > 0 && i > 0) { h.clearRect(0, 0, a, i), h.globalCompositeOperation = "source-over"; var f = this.getCachedZSortedEles(); if (e.full) h.translate(-r.x1 * u, -r.y1 * u), h.scale(u, u), this.drawElements(h, f), h.scale(1 / u, 1 / u), h.translate(r.x1 * u, r.y1 * u); else { var v = t.pan(), m = { x: v.x * u, y: v.y * u }; u *= t.zoom(), h.translate(m.x, m.y), h.scale(u, u), this.drawElements(h, f), h.scale(1 / u, 1 / u), h.translate(-m.x, -m.y); } e.bg && (h.globalCompositeOperation = "destination-over", h.fillStyle = e.bg, h.rect(0, 0, a, i), h.fill()); } return p; }; function xxe(e, t) { for (var n = atob(e), r = new ArrayBuffer(n.length), o = new Uint8Array(r), a = 0; a < n.length; a++) o[a] = n.charCodeAt(a); return new Blob([r], { type: t }); } function MF(e) { var t = e.indexOf(","); return e.substr(t + 1); } function Gz(e, t, n) { var r = function() { return t.toDataURL(n, e.quality); }; switch (e.output) { case "blob-promise": return new md(function(o, a) { try { t.toBlob(function(i) { i != null ? o(i) : a(new Error("`canvas.toBlob()` sent a null value in its callback")); }, n, e.quality); } catch (i) { a(i); } }); case "blob": return xxe(MF(r()), n); case "base64": return MF(r()); case "base64uri": default: return r(); } } lh.png = function(e) { return Gz(e, this.bufferCanvasImage(e), "image/png"); }; lh.jpg = function(e) { return Gz(e, this.bufferCanvasImage(e), "image/jpeg"); }; var Wz = {}; Wz.nodeShapeImpl = function(e, t, n, r, o, a, i, s) { switch (e) { case "ellipse": return this.drawEllipsePath(t, n, r, o, a); case "polygon": return this.drawPolygonPath(t, n, r, o, a, i); case "round-polygon": return this.drawRoundPolygonPath(t, n, r, o, a, i, s); case "roundrectangle": case "round-rectangle": return this.drawRoundRectanglePath(t, n, r, o, a, s); case "cutrectangle": case "cut-rectangle": return this.drawCutRectanglePath(t, n, r, o, a, i, s); case "bottomroundrectangle": case "bottom-round-rectangle": return this.drawBottomRoundRectanglePath(t, n, r, o, a, s); case "barrel": return this.drawBarrelPath(t, n, r, o, a); } }; var kxe = Yz, Zt = Yz.prototype; Zt.CANVAS_LAYERS = 3; Zt.SELECT_BOX = 0; Zt.DRAG = 1; Zt.NODE = 2; Zt.BUFFER_COUNT = 3; Zt.TEXTURE_BUFFER = 0; Zt.MOTIONBLUR_BUFFER_NODE = 1; Zt.MOTIONBLUR_BUFFER_DRAG = 2; function Yz(e) { var t = this, n = t.cy.window(), r = n.document; t.data = { canvases: new Array(Zt.CANVAS_LAYERS), contexts: new Array(Zt.CANVAS_LAYERS), canvasNeedsRedraw: new Array(Zt.CANVAS_LAYERS), bufferCanvases: new Array(Zt.BUFFER_COUNT), bufferContexts: new Array(Zt.CANVAS_LAYERS) }; var o = "-webkit-tap-highlight-color", a = "rgba(0,0,0,0)"; t.data.canvasContainer = r.createElement("div"); var i = t.data.canvasContainer.style; t.data.canvasContainer.style[o] = a, i.position = "relative", i.zIndex = "0", i.overflow = "hidden"; var s = e.cy.container(); s.appendChild(t.data.canvasContainer), s.style[o] = a; var l = { "-webkit-user-select": "none", "-moz-user-select": "-moz-none", "user-select": "none", "-webkit-tap-highlight-color": "rgba(0,0,0,0)", "outline-style": "none" }; u0e() && (l["-ms-touch-action"] = "none", l["touch-action"] = "none"); for (var u = 0; u < Zt.CANVAS_LAYERS; u++) { var c = t.data.canvases[u] = r.createElement("canvas"); t.data.contexts[u] = c.getContext("2d"), Object.keys(l).forEach(function(Z) { c.style[Z] = l[Z]; }), c.style.position = "absolute", c.setAttribute("data-id", "layer" + u), c.style.zIndex = String(Zt.CANVAS_LAYERS - u), t.data.canvasContainer.appendChild(c), t.data.canvasNeedsRedraw[u] = !1; } t.data.topCanvas = t.data.canvases[0], t.data.canvases[Zt.NODE].setAttribute("data-id", "layer" + Zt.NODE + "-node"), t.data.canvases[Zt.SELECT_BOX].setAttribute("data-id", "layer" + Zt.SELECT_BOX + "-selectbox"), t.data.canvases[Zt.DRAG].setAttribute("data-id", "layer" + Zt.DRAG + "-drag"); for (var u = 0; u < Zt.BUFFER_COUNT; u++) t.data.bufferCanvases[u] = r.createElement("canvas"), t.data.bufferContexts[u] = t.data.bufferCanvases[u].getContext("2d"), t.data.bufferCanvases[u].style.position = "absolute", t.data.bufferCanvases[u].setAttribute("data-id", "buffer" + u), t.data.bufferCanvases[u].style.zIndex = String(-u - 1), t.data.bufferCanvases[u].style.visibility = "hidden"; t.pathsEnabled = !0; var d = Fo(), p = function(Z) { return { x: (Z.x1 + Z.x2) / 2, y: (Z.y1 + Z.y2) / 2 }; }, h = function(Z) { return { x: -Z.w / 2, y: -Z.h / 2 }; }, f = function(Z) { var le = Z[0]._private, pe = le.oldBackgroundTimestamp === le.backgroundTimestamp; return !pe; }, v = function(Z) { return Z[0]._private.nodeKey; }, m = function(Z) { return Z[0]._private.labelStyleKey; }, g = function(Z) { return Z[0]._private.sourceLabelStyleKey; }, b = function(Z) { return Z[0]._private.targetLabelStyleKey; }, x = function(Z, le, pe, ke, Ne) { return t.drawElement(Z, le, pe, !1, !1, Ne); }, w = function(Z, le, pe, ke, Ne) { return t.drawElementText(Z, le, pe, ke, "main", Ne); }, k = function(Z, le, pe, ke, Ne) { return t.drawElementText(Z, le, pe, ke, "source", Ne); }, C = function(Z, le, pe, ke, Ne) { return t.drawElementText(Z, le, pe, ke, "target", Ne); }, _ = function(Z) { return Z.boundingBox(), Z[0]._private.bodyBounds; }, $ = function(Z) { return Z.boundingBox(), Z[0]._private.labelBounds.main || d; }, O = function(Z) { return Z.boundingBox(), Z[0]._private.labelBounds.source || d; }, F = function(Z) { return Z.boundingBox(), Z[0]._private.labelBounds.target || d; }, A = function(Z, le) { return le; }, T = function(Z) { return p(_(Z)); }, R = function(Z, le, pe) { var ke = Z ? Z + "-" : ""; return { x: le.x + pe.pstyle(ke + "text-margin-x").pfValue, y: le.y + pe.pstyle(ke + "text-margin-y").pfValue }; }, M = function(Z, le, pe) { var ke = Z[0]._private.rscratch; return { x: ke[le], y: ke[pe] }; }, j = function(Z) { return R("", M(Z, "labelX", "labelY"), Z); }, P = function(Z) { return R("source", M(Z, "sourceLabelX", "sourceLabelY"), Z); }, V = function(Z) { return R("target", M(Z, "targetLabelX", "targetLabelY"), Z); }, U = function(Z) { return h(_(Z)); }, G = function(Z) { return h(O(Z)); }, se = function(Z) { return h(F(Z)); }, ae = function(Z) { var le = $(Z), pe = h($(Z)); if (Z.isNode()) { switch (Z.pstyle("text-halign").value) { case "left": pe.x = -le.w; break; case "right": pe.x = 0; break; } switch (Z.pstyle("text-valign").value) { case "top": pe.y = -le.h; break; case "bottom": pe.y = 0; break; } } return pe; }, de = t.data.eleTxrCache = new xp(t, { getKey: v, doesEleInvalidateKey: f, drawElement: x, getBoundingBox: _, getRotationPoint: T, getRotationOffset: U, allowEdgeTxrCaching: !1, allowParentTxrCaching: !1 }), me = t.data.lblTxrCache = new xp(t, { getKey: m, drawElement: w, getBoundingBox: $, getRotationPoint: j, getRotationOffset: ae, isVisible: A }), te = t.data.slbTxrCache = new xp(t, { getKey: g, drawElement: k, getBoundingBox: O, getRotationPoint: P, getRotationOffset: G, isVisible: A }), oe = t.data.tlbTxrCache = new xp(t, { getKey: b, drawElement: C, getBoundingBox: F, getRotationPoint: V, getRotationOffset: se, isVisible: A }), ne = t.data.lyrTxrCache = new Vz(t); t.onUpdateEleCalcs(function(Z, le) { de.invalidateElements(le), me.invalidateElements(le), te.invalidateElements(le), oe.invalidateElements(le), ne.invalidateElements(le); for (var pe = 0; pe < le.length; pe++) { var ke = le[pe]._private; ke.oldBackgroundTimestamp = ke.backgroundTimestamp; } }); var ee = function(Z) { for (var le = 0; le < Z.length; le++) ne.enqueueElementRefinement(Z[le].ele); }; de.onDequeue(ee), me.onDequeue(ee), te.onDequeue(ee), oe.onDequeue(ee); } Zt.redrawHint = function(e, t) { var n = this; switch (e) { case "eles": n.data.canvasNeedsRedraw[Zt.NODE] = t; break; case "drag": n.data.canvasNeedsRedraw[Zt.DRAG] = t; break; case "select": n.data.canvasNeedsRedraw[Zt.SELECT_BOX] = t; break; } }; var Cxe = typeof Path2D < "u"; Zt.path2dEnabled = function(e) { if (e === void 0) return this.pathsEnabled; this.pathsEnabled = !!e; }; Zt.usePaths = function() { return Cxe && this.pathsEnabled; }; Zt.setImgSmoothing = function(e, t) { e.imageSmoothingEnabled != null ? e.imageSmoothingEnabled = t : (e.webkitImageSmoothingEnabled = t, e.mozImageSmoothingEnabled = t, e.msImageSmoothingEnabled = t); }; Zt.getImgSmoothing = function(e) { return e.imageSmoothingEnabled != null ? e.imageSmoothingEnabled : e.webkitImageSmoothingEnabled || e.mozImageSmoothingEnabled || e.msImageSmoothingEnabled; }; Zt.makeOffscreenCanvas = function(e, t) { var n; if ((typeof OffscreenCanvas > "u" ? "undefined" : cr(OffscreenCanvas)) !== "undefined") n = new OffscreenCanvas(e, t); else { var r = this.cy.window(), o = r.document; n = o.createElement("canvas"), n.width = e, n.height = t; } return n; }; [Hz, Ti, gs, P$, Du, Sd, jo, kl, lh, Wz].forEach(function(e) { _t(Zt, e); }); var _xe = [{ name: "null", impl: Tz }, { name: "base", impl: zz }, { name: "canvas", impl: kxe }], Sxe = [{ type: "layout", extensions: A2e }, { type: "renderer", extensions: _xe }], Xz = {}, Zz = {}; function Jz(e, t, n) { var r = n, o = function(_) { sn("Can not register `" + t + "` for `" + e + "` since `" + _ + "` already exists in the prototype and can not be overridden"); }; if (e === "core") { if (vf.prototype[t]) return o(t); vf.prototype[t] = n; } else if (e === "collection") { if (Rr.prototype[t]) return o(t); Rr.prototype[t] = n; } else if (e === "layout") { for (var a = function(_) { this.options = _, n.call(this, _), Xt(this._private) || (this._private = {}), this._private.cy = _.cy, this._private.listeners = [], this.createEmitter(); }, i = a.prototype = Object.create(n.prototype), s = [], l = 0; l < s.length; l++) { var u = s[l]; i[u] = i[u] || function() { return this; }; } i.start && !i.run ? i.run = function() { return this.start(), this; } : !i.start && i.run && (i.start = function() { return this.run(), this; }); var c = n.prototype.stop; i.stop = function() { var _ = this.options; if (_ && _.animate) { var $ = this.animations; if ($) for (var O = 0; O < $.length; O++) $[O].stop(); } return c ? c.call(this) : this.emit("layoutstop"), this; }, i.destroy || (i.destroy = function() { return this; }), i.cy = function() { return this._private.cy; }; var d = function(_) { return _._private.cy; }, p = { addEventFields: function(_, $) { $.layout = _, $.cy = d(_), $.target = _; }, bubble: function() { return !0; }, parent: function(_) { return d(_); } }; _t(i, { createEmitter: function() { return this._private.emitter = new xm(p, this), this; }, emitter: function() { return this._private.emitter; }, on: function(_, $) { return this.emitter().on(_, $), this; }, one: function(_, $) { return this.emitter().one(_, $), this; }, once: function(_, $) { return this.emitter().one(_, $), this; }, removeListener: function(_, $) { return this.emitter().removeListener(_, $), this; }, removeAllListeners: function() { return this.emitter().removeAllListeners(), this; }, emit: function(_, $) { return this.emitter().emit(_, $), this; } }), an.eventAliasesOn(i), r = a; } else if (e === "renderer" && t !== "null" && t !== "base") { var h = Qz("renderer", "base"), f = h.prototype, v = n, m = n.prototype, g = function() { h.apply(this, arguments), v.apply(this, arguments); }, b = g.prototype; for (var x in f) { var w = f[x], k = m[x] != null; if (k) return o(x); b[x] = w; } for (var C in m) b[C] = m[C]; f.clientFunctions.forEach(function(_) { b[_] = b[_] || function() { Un("Renderer does not implement `renderer." + _ + "()` on its prototype"); }; }), r = g; } else if (e === "__proto__" || e === "constructor" || e === "prototype") return Un(e + " is an illegal type to be registered, possibly lead to prototype pollutions"); return _B({ map: Xz, keys: [e, t], value: r }); } function Qz(e, t) { return SB({ map: Xz, keys: [e, t] }); } function $xe(e, t, n, r, o) { return _B({ map: Zz, keys: [e, t, n, r], value: o }); } function Exe(e, t, n, r) { return SB({ map: Zz, keys: [e, t, n, r] }); } var n_ = function() { if (arguments.length === 2) return Qz.apply(null, arguments); if (arguments.length === 3) return Jz.apply(null, arguments); if (arguments.length === 4) return Exe.apply(null, arguments); if (arguments.length === 5) return $xe.apply(null, arguments); Un("Invalid extension access syntax"); }; vf.prototype.extension = n_; Sxe.forEach(function(e) { e.extensions.forEach(function(t) { Jz(e.type, t.name, t.impl); }); }); var e7 = function e() { if (!(this instanceof e)) return new e(); this.length = 0; }, mu = e7.prototype; mu.instanceString = function() { return "stylesheet"; }; mu.selector = function(e) { var t = this.length++; return this[t] = { selector: e, properties: [] }, this; }; mu.css = function(e, t) { var n = this.length - 1; if (gt(e)) this[n].properties.push({ name: e, value: t }); else if (Xt(e)) for (var r = e, o = Object.keys(r), a = 0; a < o.length; a++) { var i = o[a], s = r[i]; if (s != null) { var l = Wr.properties[i] || Wr.properties[dm(i)]; if (l != null) { var u = l.name, c = s; this[n].properties.push({ name: u, value: c }); } } } return this; }; mu.style = mu.css; mu.generateStyle = function(e) { var t = new Wr(e); return this.appendToStyle(t); }; mu.appendToStyle = function(e) { for (var t = 0; t < this.length; t++) { var n = this[t], r = n.selector, o = n.properties; e.selector(r); for (var a = 0; a < o.length; a++) { var i = o[a]; e.css(i.name, i.value); } } return e; }; var Oxe = "3.30.2", ul = function(e) { if (e === void 0 && (e = {}), Xt(e)) return new vf(e); if (gt(e)) return n_.apply(n_, arguments); }; ul.use = function(e) { var t = Array.prototype.slice.call(arguments, 1); return t.unshift(ul), e.apply(null, t), this; }; ul.warnings = function(e) { return PB(e); }; ul.version = Oxe; ul.stylesheet = ul.Stylesheet = e7; var t7 = { exports: {} }; function L$(e) { throw new Error('Could not dynamically require "' + e + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.'); } var Cy, DF; function Fxe() { if (DF) return Cy; DF = 1; function e() { this.__data__ = [], this.size = 0; } return Cy = e, Cy; } var _y, BF; function $d() { if (BF) return _y; BF = 1; function e(t, n) { return t === n || t !== t && n !== n; } return _y = e, _y; } var Sy, zF; function Fm() { if (zF) return Sy; zF = 1; var e = $d(); function t(n, r) { for (var o = n.length; o--; ) if (e(n[o][0], r)) return o; return -1; } return Sy = t, Sy; } var $y, jF; function Txe() { if (jF) return $y; jF = 1; var e = Fm(), t = Array.prototype, n = t.splice; function r(o) { var a = this.__data__, i = e(a, o); if (i < 0) return !1; var s = a.length - 1; return i == s ? a.pop() : n.call(a, i, 1), --this.size, !0; } return $y = r, $y; } var Ey, VF; function Axe() { if (VF) return Ey; VF = 1; var e = Fm(); function t(n) { var r = this.__data__, o = e(r, n); return o < 0 ? void 0 : r[o][1]; } return Ey = t, Ey; } var Oy, HF; function Ixe() { if (HF) return Oy; HF = 1; var e = Fm(); function t(n) { return e(this.__data__, n) > -1; } return Oy = t, Oy; } var Fy, UF; function Pxe() { if (UF) return Fy; UF = 1; var e = Fm(); function t(n, r) { var o = this.__data__, a = e(o, n); return a < 0 ? (++this.size, o.push([n, r])) : o[a][1] = r, this; } return Fy = t, Fy; } var Ty, qF; function Tm() { if (qF) return Ty; qF = 1; var e = Fxe(), t = Txe(), n = Axe(), r = Ixe(), o = Pxe(); function a(i) { var s = -1, l = i == null ? 0 : i.length; for (this.clear(); ++s < l; ) { var u = i[s]; this.set(u[0], u[1]); } } return a.prototype.clear = e, a.prototype.delete = t, a.prototype.get = n, a.prototype.has = r, a.prototype.set = o, Ty = a, Ty; } var Ay, KF; function Lxe() { if (KF) return Ay; KF = 1; var e = Tm(); function t() { this.__data__ = new e(), this.size = 0; } return Ay = t, Ay; } var Iy, GF; function Rxe() { if (GF) return Iy; GF = 1; function e(t) { var n = this.__data__, r = n.delete(t); return this.size = n.size, r; } return Iy = e, Iy; } var Py, WF; function Nxe() { if (WF) return Py; WF = 1; function e(t) { return this.__data__.get(t); } return Py = e, Py; } var Ly, YF; function Mxe() { if (YF) return Ly; YF = 1; function e(t) { return this.__data__.has(t); } return Ly = e, Ly; } var Ry, XF; function n7() { if (XF) return Ry; XF = 1; var e = typeof vp == "object" && vp && vp.Object === Object && vp; return Ry = e, Ry; } var Ny, ZF; function qa() { if (ZF) return Ny; ZF = 1; var e = n7(), t = typeof self == "object" && self && self.Object === Object && self, n = e || t || Function("return this")(); return Ny = n, Ny; } var My, JF; function Ed() { if (JF) return My; JF = 1; var e = qa(), t = e.Symbol; return My = t, My; } var Dy, QF; function Dxe() { if (QF) return Dy; QF = 1; var e = Ed(), t = Object.prototype, n = t.hasOwnProperty, r = t.toString, o = e ? e.toStringTag : void 0; function a(i) { var s = n.call(i, o), l = i[o]; try { i[o] = void 0; var u = !0; } catch { } var c = r.call(i); return u && (s ? i[o] = l : delete i[o]), c; } return Dy = a, Dy; } var By, eT; function Bxe() { if (eT) return By; eT = 1; var e = Object.prototype, t = e.toString; function n(r) { return t.call(r); } return By = n, By; } var zy, tT; function Bu() { if (tT) return zy; tT = 1; var e = Ed(), t = Dxe(), n = Bxe(), r = "[object Null]", o = "[object Undefined]", a = e ? e.toStringTag : void 0; function i(s) { return s == null ? s === void 0 ? o : r : a && a in Object(s) ? t(s) : n(s); } return zy = i, zy; } var jy, nT; function ya() { if (nT) return jy; nT = 1; function e(t) { var n = typeof t; return t != null && (n == "object" || n == "function"); } return jy = e, jy; } var Vy, rT; function uh() { if (rT) return Vy; rT = 1; var e = Bu(), t = ya(), n = "[object AsyncFunction]", r = "[object Function]", o = "[object GeneratorFunction]", a = "[object Proxy]"; function i(s) { if (!t(s)) return !1; var l = e(s); return l == r || l == o || l == n || l == a; } return Vy = i, Vy; } var Hy, oT; function zxe() { if (oT) return Hy; oT = 1; var e = qa(), t = e["__core-js_shared__"]; return Hy = t, Hy; } var Uy, aT; function jxe() { if (aT) return Uy; aT = 1; var e = zxe(), t = function() { var r = /[^.]+$/.exec(e && e.keys && e.keys.IE_PROTO || ""); return r ? "Symbol(src)_1." + r : ""; }(); function n(r) { return !!t && t in r; } return Uy = n, Uy; } var qy, iT; function r7() { if (iT) return qy; iT = 1; var e = Function.prototype, t = e.toString; function n(r) { if (r != null) { try { return t.call(r); } catch { } try { return r + ""; } catch { } } return ""; } return qy = n, qy; } var Ky, sT; function Vxe() { if (sT) return Ky; sT = 1; var e = uh(), t = jxe(), n = ya(), r = r7(), o = /[\\^$.*+?()[\]{}|]/g, a = /^\[object .+?Constructor\]$/, i = Function.prototype, s = Object.prototype, l = i.toString, u = s.hasOwnProperty, c = RegExp( "^" + l.call(u).replace(o, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$" ); function d(p) { if (!n(p) || t(p)) return !1; var h = e(p) ? c : a; return h.test(r(p)); } return Ky = d, Ky; } var Gy, lT; function Hxe() { if (lT) return Gy; lT = 1; function e(t, n) { return t == null ? void 0 : t[n]; } return Gy = e, Gy; } var Wy, uT; function zu() { if (uT) return Wy; uT = 1; var e = Vxe(), t = Hxe(); function n(r, o) { var a = t(r, o); return e(a) ? a : void 0; } return Wy = n, Wy; } var Yy, cT; function R$() { if (cT) return Yy; cT = 1; var e = zu(), t = qa(), n = e(t, "Map"); return Yy = n, Yy; } var Xy, dT; function Am() { if (dT) return Xy; dT = 1; var e = zu(), t = e(Object, "create"); return Xy = t, Xy; } var Zy, pT; function Uxe() { if (pT) return Zy; pT = 1; var e = Am(); function t() { this.__data__ = e ? e(null) : {}, this.size = 0; } return Zy = t, Zy; } var Jy, fT; function qxe() { if (fT) return Jy; fT = 1; function e(t) { var n = this.has(t) && delete this.__data__[t]; return this.size -= n ? 1 : 0, n; } return Jy = e, Jy; } var Qy, hT; function Kxe() { if (hT) return Qy; hT = 1; var e = Am(), t = "__lodash_hash_undefined__", n = Object.prototype, r = n.hasOwnProperty; function o(a) { var i = this.__data__; if (e) { var s = i[a]; return s === t ? void 0 : s; } return r.call(i, a) ? i[a] : void 0; } return Qy = o, Qy; } var eb, vT; function Gxe() { if (vT) return eb; vT = 1; var e = Am(), t = Object.prototype, n = t.hasOwnProperty; function r(o) { var a = this.__data__; return e ? a[o] !== void 0 : n.call(a, o); } return eb = r, eb; } var tb, gT; function Wxe() { if (gT) return tb; gT = 1; var e = Am(), t = "__lodash_hash_undefined__"; function n(r, o) { var a = this.__data__; return this.size += this.has(r) ? 0 : 1, a[r] = e && o === void 0 ? t : o, this; } return tb = n, tb; } var nb, mT; function Yxe() { if (mT) return nb; mT = 1; var e = Uxe(), t = qxe(), n = Kxe(), r = Gxe(), o = Wxe(); function a(i) { var s = -1, l = i == null ? 0 : i.length; for (this.clear(); ++s < l; ) { var u = i[s]; this.set(u[0], u[1]); } } return a.prototype.clear = e, a.prototype.delete = t, a.prototype.get = n, a.prototype.has = r, a.prototype.set = o, nb = a, nb; } var rb, yT; function Xxe() { if (yT) return rb; yT = 1; var e = Yxe(), t = Tm(), n = R$(); function r() { this.size = 0, this.__data__ = { hash: new e(), map: new (n || t)(), string: new e() }; } return rb = r, rb; } var ob, bT; function Zxe() { if (bT) return ob; bT = 1; function e(t) { var n = typeof t; return n == "string" || n == "number" || n == "symbol" || n == "boolean" ? t !== "__proto__" : t === null; } return ob = e, ob; } var ab, wT; function Im() { if (wT) return ab; wT = 1; var e = Zxe(); function t(n, r) { var o = n.__data__; return e(r) ? o[typeof r == "string" ? "string" : "hash"] : o.map; } return ab = t, ab; } var ib, xT; function Jxe() { if (xT) return ib; xT = 1; var e = Im(); function t(n) { var r = e(this, n).delete(n); return this.size -= r ? 1 : 0, r; } return ib = t, ib; } var sb, kT; function Qxe() { if (kT) return sb; kT = 1; var e = Im(); function t(n) { return e(this, n).get(n); } return sb = t, sb; } var lb, CT; function eke() { if (CT) return lb; CT = 1; var e = Im(); function t(n) { return e(this, n).has(n); } return lb = t, lb; } var ub, _T; function tke() { if (_T) return ub; _T = 1; var e = Im(); function t(n, r) { var o = e(this, n), a = o.size; return o.set(n, r), this.size += o.size == a ? 0 : 1, this; } return ub = t, ub; } var cb, ST; function N$() { if (ST) return cb; ST = 1; var e = Xxe(), t = Jxe(), n = Qxe(), r = eke(), o = tke(); function a(i) { var s = -1, l = i == null ? 0 : i.length; for (this.clear(); ++s < l; ) { var u = i[s]; this.set(u[0], u[1]); } } return a.prototype.clear = e, a.prototype.delete = t, a.prototype.get = n, a.prototype.has = r, a.prototype.set = o, cb = a, cb; } var db, $T; function nke() { if ($T) return db; $T = 1; var e = Tm(), t = R$(), n = N$(), r = 200; function o(a, i) { var s = this.__data__; if (s instanceof e) { var l = s.__data__; if (!t || l.length < r - 1) return l.push([a, i]), this.size = ++s.size, this; s = this.__data__ = new n(l); } return s.set(a, i), this.size = s.size, this; } return db = o, db; } var pb, ET; function Pm() { if (ET) return pb; ET = 1; var e = Tm(), t = Lxe(), n = Rxe(), r = Nxe(), o = Mxe(), a = nke(); function i(s) { var l = this.__data__ = new e(s); this.size = l.size; } return i.prototype.clear = t, i.prototype.delete = n, i.prototype.get = r, i.prototype.has = o, i.prototype.set = a, pb = i, pb; } var fb, OT; function M$() { if (OT) return fb; OT = 1; function e(t, n) { for (var r = -1, o = t == null ? 0 : t.length; ++r < o && n(t[r], r, t) !== !1; ) ; return t; } return fb = e, fb; } var hb, FT; function o7() { if (FT) return hb; FT = 1; var e = zu(), t = function() { try { var n = e(Object, "defineProperty"); return n({}, "", {}), n; } catch { } }(); return hb = t, hb; } var vb, TT; function Lm() { if (TT) return vb; TT = 1; var e = o7(); function t(n, r, o) { r == "__proto__" && e ? e(n, r, { configurable: !0, enumerable: !0, value: o, writable: !0 }) : n[r] = o; } return vb = t, vb; } var gb, AT; function Rm() { if (AT) return gb; AT = 1; var e = Lm(), t = $d(), n = Object.prototype, r = n.hasOwnProperty; function o(a, i, s) { var l = a[i]; (!(r.call(a, i) && t(l, s)) || s === void 0 && !(i in a)) && e(a, i, s); } return gb = o, gb; } var mb, IT; function ch() { if (IT) return mb; IT = 1; var e = Rm(), t = Lm(); function n(r, o, a, i) { var s = !a; a || (a = {}); for (var l = -1, u = o.length; ++l < u; ) { var c = o[l], d = i ? i(a[c], r[c], c, a, r) : void 0; d === void 0 && (d = r[c]), s ? t(a, c, d) : e(a, c, d); } return a; } return mb = n, mb; } var yb, PT; function rke() { if (PT) return yb; PT = 1; function e(t, n) { for (var r = -1, o = Array(t); ++r < t; ) o[r] = n(r); return o; } return yb = e, yb; } var bb, LT; function Ai() { if (LT) return bb; LT = 1; function e(t) { return t != null && typeof t == "object"; } return bb = e, bb; } var wb, RT; function oke() { if (RT) return wb; RT = 1; var e = Bu(), t = Ai(), n = "[object Arguments]"; function r(o) { return t(o) && e(o) == n; } return wb = r, wb; } var xb, NT; function dh() { if (NT) return xb; NT = 1; var e = oke(), t = Ai(), n = Object.prototype, r = n.hasOwnProperty, o = n.propertyIsEnumerable, a = e(/* @__PURE__ */ function() { return arguments; }()) ? e : function(i) { return t(i) && r.call(i, "callee") && !o.call(i, "callee"); }; return xb = a, xb; } var kb, MT; function rr() { if (MT) return kb; MT = 1; var e = Array.isArray; return kb = e, kb; } var tg = { exports: {} }, Cb, DT; function ake() { if (DT) return Cb; DT = 1; function e() { return !1; } return Cb = e, Cb; } tg.exports; var BT; function Od() { return BT || (BT = 1, function(e, t) { var n = qa(), r = ake(), o = t && !t.nodeType && t, a = o && !0 && e && !e.nodeType && e, i = a && a.exports === o, s = i ? n.Buffer : void 0, l = s ? s.isBuffer : void 0, u = l || r; e.exports = u; }(tg, tg.exports)), tg.exports; } var _b, zT; function Nm() { if (zT) return _b; zT = 1; var e = 9007199254740991, t = /^(?:0|[1-9]\d*)$/; function n(r, o) { var a = typeof r; return o = o ?? e, !!o && (a == "number" || a != "symbol" && t.test(r)) && r > -1 && r % 1 == 0 && r < o; } return _b = n, _b; } var Sb, jT; function D$() { if (jT) return Sb; jT = 1; var e = 9007199254740991; function t(n) { return typeof n == "number" && n > -1 && n % 1 == 0 && n <= e; } return Sb = t, Sb; } var $b, VT; function ike() { if (VT) return $b; VT = 1; var e = Bu(), t = D$(), n = Ai(), r = "[object Arguments]", o = "[object Array]", a = "[object Boolean]", i = "[object Date]", s = "[object Error]", l = "[object Function]", u = "[object Map]", c = "[object Number]", d = "[object Object]", p = "[object RegExp]", h = "[object Set]", f = "[object String]", v = "[object WeakMap]", m = "[object ArrayBuffer]", g = "[object DataView]", b = "[object Float32Array]", x = "[object Float64Array]", w = "[object Int8Array]", k = "[object Int16Array]", C = "[object Int32Array]", _ = "[object Uint8Array]", $ = "[object Uint8ClampedArray]", O = "[object Uint16Array]", F = "[object Uint32Array]", A = {}; A[b] = A[x] = A[w] = A[k] = A[C] = A[_] = A[$] = A[O] = A[F] = !0, A[r] = A[o] = A[m] = A[a] = A[g] = A[i] = A[s] = A[l] = A[u] = A[c] = A[d] = A[p] = A[h] = A[f] = A[v] = !1; function T(R) { return n(R) && t(R.length) && !!A[e(R)]; } return $b = T, $b; } var Eb, HT; function Mm() { if (HT) return Eb; HT = 1; function e(t) { return function(n) { return t(n); }; } return Eb = e, Eb; } var ng = { exports: {} }; ng.exports; var UT; function B$() { return UT || (UT = 1, function(e, t) { var n = n7(), r = t && !t.nodeType && t, o = r && !0 && e && !e.nodeType && e, a = o && o.exports === r, i = a && n.process, s = function() { try { var l = o && o.require && o.require("util").types; return l || i && i.binding && i.binding("util"); } catch { } }(); e.exports = s; }(ng, ng.exports)), ng.exports; } var Ob, qT; function ph() { if (qT) return Ob; qT = 1; var e = ike(), t = Mm(), n = B$(), r = n && n.isTypedArray, o = r ? t(r) : e; return Ob = o, Ob; } var Fb, KT; function a7() { if (KT) return Fb; KT = 1; var e = rke(), t = dh(), n = rr(), r = Od(), o = Nm(), a = ph(), i = Object.prototype, s = i.hasOwnProperty; function l(u, c) { var d = n(u), p = !d && t(u), h = !d && !p && r(u), f = !d && !p && !h && a(u), v = d || p || h || f, m = v ? e(u.length, String) : [], g = m.length; for (var b in u) (c || s.call(u, b)) && !(v && // Safari 9 has enumerable `arguments.length` in strict mode. (b == "length" || // Node.js 0.10 has enumerable non-index properties on buffers. h && (b == "offset" || b == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays. f && (b == "buffer" || b == "byteLength" || b == "byteOffset") || // Skip index properties. o(b, g))) && m.push(b); return m; } return Fb = l, Fb; } var Tb, GT; function Dm() { if (GT) return Tb; GT = 1; var e = Object.prototype; function t(n) { var r = n && n.constructor, o = typeof r == "function" && r.prototype || e; return n === o; } return Tb = t, Tb; } var Ab, WT; function i7() { if (WT) return Ab; WT = 1; function e(t, n) { return function(r) { return t(n(r)); }; } return Ab = e, Ab; } var Ib, YT; function ske() { if (YT) return Ib; YT = 1; var e = i7(), t = e(Object.keys, Object); return Ib = t, Ib; } var Pb, XT; function z$() { if (XT) return Pb; XT = 1; var e = Dm(), t = ske(), n = Object.prototype, r = n.hasOwnProperty; function o(a) { if (!e(a)) return t(a); var i = []; for (var s in Object(a)) r.call(a, s) && s != "constructor" && i.push(s); return i; } return Pb = o, Pb; } var Lb, ZT; function ms() { if (ZT) return Lb; ZT = 1; var e = uh(), t = D$(); function n(r) { return r != null && t(r.length) && !e(r); } return Lb = n, Lb; } var Rb, JT; function Cl() { if (JT) return Rb; JT = 1; var e = a7(), t = z$(), n = ms(); function r(o) { return n(o) ? e(o) : t(o); } return Rb = r, Rb; } var Nb, QT; function lke() { if (QT) return Nb; QT = 1; var e = ch(), t = Cl(); function n(r, o) { return r && e(o, t(o), r); } return Nb = n, Nb; } var Mb, e8; function uke() { if (e8) return Mb; e8 = 1; function e(t) { var n = []; if (t != null) for (var r in Object(t)) n.push(r); return n; } return Mb = e, Mb; } var Db, t8; function cke() { if (t8) return Db; t8 = 1; var e = ya(), t = Dm(), n = uke(), r = Object.prototype, o = r.hasOwnProperty; function a(i) { if (!e(i)) return n(i); var s = t(i), l = []; for (var u in i) u == "constructor" && (s || !o.call(i, u)) || l.push(u); return l; } return Db = a, Db; } var Bb, n8; function ju() { if (n8) return Bb; n8 = 1; var e = a7(), t = cke(), n = ms(); function r(o) { return n(o) ? e(o, !0) : t(o); } return Bb = r, Bb; } var zb, r8; function dke() { if (r8) return zb; r8 = 1; var e = ch(), t = ju(); function n(r, o) { return r && e(o, t(o), r); } return zb = n, zb; } var rg = { exports: {} }; rg.exports; var o8; function s7() { return o8 || (o8 = 1, function(e, t) { var n = qa(), r = t && !t.nodeType && t, o = r && !0 && e && !e.nodeType && e, a = o && o.exports === r, i = a ? n.Buffer : void 0, s = i ? i.allocUnsafe : void 0; function l(u, c) { if (c) return u.slice(); var d = u.length, p = s ? s(d) : new u.constructor(d); return u.copy(p), p; } e.exports = l; }(rg, rg.exports)), rg.exports; } var jb, a8; function l7() { if (a8) return jb; a8 = 1; function e(t, n) { var r = -1, o = t.length; for (n || (n = Array(o)); ++r < o; ) n[r] = t[r]; return n; } return jb = e, jb; } var Vb, i8; function u7() { if (i8) return Vb; i8 = 1; function e(t, n) { for (var r = -1, o = t == null ? 0 : t.length, a = 0, i = []; ++r < o; ) { var s = t[r]; n(s, r, t) && (i[a++] = s); } return i; } return Vb = e, Vb; } var Hb, s8; function c7() { if (s8) return Hb; s8 = 1; function e() { return []; } return Hb = e, Hb; } var Ub, l8; function j$() { if (l8) return Ub; l8 = 1; var e = u7(), t = c7(), n = Object.prototype, r = n.propertyIsEnumerable, o = Object.getOwnPropertySymbols, a = o ? function(i) { return i == null ? [] : (i = Object(i), e(o(i), function(s) { return r.call(i, s); })); } : t; return Ub = a, Ub; } var qb, u8; function pke() { if (u8) return qb; u8 = 1; var e = ch(), t = j$(); function n(r, o) { return e(r, t(r), o); } return qb = n, qb; } var Kb, c8; function V$() { if (c8) return Kb; c8 = 1; function e(t, n) { for (var r = -1, o = n.length, a = t.length; ++r < o; ) t[a + r] = n[r]; return t; } return Kb = e, Kb; } var Gb, d8; function Bm() { if (d8) return Gb; d8 = 1; var e = i7(), t = e(Object.getPrototypeOf, Object); return Gb = t, Gb; } var Wb, p8; function d7() { if (p8) return Wb; p8 = 1; var e = V$(), t = Bm(), n = j$(), r = c7(), o = Object.getOwnPropertySymbols, a = o ? function(i) { for (var s = []; i; ) e(s, n(i)), i = t(i); return s; } : r; return Wb = a, Wb; } var Yb, f8; function fke() { if (f8) return Yb; f8 = 1; var e = ch(), t = d7(); function n(r, o) { return e(r, t(r), o); } return Yb = n, Yb; } var Xb, h8; function p7() { if (h8) return Xb; h8 = 1; var e = V$(), t = rr(); function n(r, o, a) { var i = o(r); return t(r) ? i : e(i, a(r)); } return Xb = n, Xb; } var Zb, v8; function f7() { if (v8) return Zb; v8 = 1; var e = p7(), t = j$(), n = Cl(); function r(o) { return e(o, n, t); } return Zb = r, Zb; } var Jb, g8; function hke() { if (g8) return Jb; g8 = 1; var e = p7(), t = d7(), n = ju(); function r(o) { return e(o, n, t); } return Jb = r, Jb; } var Qb, m8; function vke() { if (m8) return Qb; m8 = 1; var e = zu(), t = qa(), n = e(t, "DataView"); return Qb = n, Qb; } var ew, y8; function gke() { if (y8) return ew; y8 = 1; var e = zu(), t = qa(), n = e(t, "Promise"); return ew = n, ew; } var tw, b8; function h7() { if (b8) return tw; b8 = 1; var e = zu(), t = qa(), n = e(t, "Set"); return tw = n, tw; } var nw, w8; function mke() { if (w8) return nw; w8 = 1; var e = zu(), t = qa(), n = e(t, "WeakMap"); return nw = n, nw; } var rw, x8; function Fd() { if (x8) return rw; x8 = 1; var e = vke(), t = R$(), n = gke(), r = h7(), o = mke(), a = Bu(), i = r7(), s = "[object Map]", l = "[object Object]", u = "[object Promise]", c = "[object Set]", d = "[object WeakMap]", p = "[object DataView]", h = i(e), f = i(t), v = i(n), m = i(r), g = i(o), b = a; return (e && b(new e(new ArrayBuffer(1))) != p || t && b(new t()) != s || n && b(n.resolve()) != u || r && b(new r()) != c || o && b(new o()) != d) && (b = function(x) { var w = a(x), k = w == l ? x.constructor : void 0, C = k ? i(k) : ""; if (C) switch (C) { case h: return p; case f: return s; case v: return u; case m: return c; case g: return d; } return w; }), rw = b, rw; } var ow, k8; function yke() { if (k8) return ow; k8 = 1; var e = Object.prototype, t = e.hasOwnProperty; function n(r) { var o = r.length, a = new r.constructor(o); return o && typeof r[0] == "string" && t.call(r, "index") && (a.index = r.index, a.input = r.input), a; } return ow = n, ow; } var aw, C8; function v7() { if (C8) return aw; C8 = 1; var e = qa(), t = e.Uint8Array; return aw = t, aw; } var iw, _8; function H$() { if (_8) return iw; _8 = 1; var e = v7(); function t(n) { var r = new n.constructor(n.byteLength); return new e(r).set(new e(n)), r; } return iw = t, iw; } var sw, S8; function bke() { if (S8) return sw; S8 = 1; var e = H$(); function t(n, r) { var o = r ? e(n.buffer) : n.buffer; return new n.constructor(o, n.byteOffset, n.byteLength); } return sw = t, sw; } var lw, $8; function wke() { if ($8) return lw; $8 = 1; var e = /\w*$/; function t(n) { var r = new n.constructor(n.source, e.exec(n)); return r.lastIndex = n.lastIndex, r; } return lw = t, lw; } var uw, E8; function xke() { if (E8) return uw; E8 = 1; var e = Ed(), t = e ? e.prototype : void 0, n = t ? t.valueOf : void 0; function r(o) { return n ? Object(n.call(o)) : {}; } return uw = r, uw; } var cw, O8; function g7() { if (O8) return cw; O8 = 1; var e = H$(); function t(n, r) { var o = r ? e(n.buffer) : n.buffer; return new n.constructor(o, n.byteOffset, n.length); } return cw = t, cw; } var dw, F8; function kke() { if (F8) return dw; F8 = 1; var e = H$(), t = bke(), n = wke(), r = xke(), o = g7(), a = "[object Boolean]", i = "[object Date]", s = "[object Map]", l = "[object Number]", u = "[object RegExp]", c = "[object Set]", d = "[object String]", p = "[object Symbol]", h = "[object ArrayBuffer]", f = "[object DataView]", v = "[object Float32Array]", m = "[object Float64Array]", g = "[object Int8Array]", b = "[object Int16Array]", x = "[object Int32Array]", w = "[object Uint8Array]", k = "[object Uint8ClampedArray]", C = "[object Uint16Array]", _ = "[object Uint32Array]"; function $(O, F, A) { var T = O.constructor; switch (F) { case h: return e(O); case a: case i: return new T(+O); case f: return t(O, A); case v: case m: case g: case b: case x: case w: case k: case C: case _: return o(O, A); case s: return new T(); case l: case d: return new T(O); case u: return n(O); case c: return new T(); case p: return r(O); } } return dw = $, dw; } var pw, T8; function m7() { if (T8) return pw; T8 = 1; var e = ya(), t = Object.create, n = /* @__PURE__ */ function() { function r() { } return function(o) { if (!e(o)) return {}; if (t) return t(o); r.prototype = o; var a = new r(); return r.prototype = void 0, a; }; }(); return pw = n, pw; } var fw, A8; function y7() { if (A8) return fw; A8 = 1; var e = m7(), t = Bm(), n = Dm(); function r(o) { return typeof o.constructor == "function" && !n(o) ? e(t(o)) : {}; } return fw = r, fw; } var hw, I8; function Cke() { if (I8) return hw; I8 = 1; var e = Fd(), t = Ai(), n = "[object Map]"; function r(o) { return t(o) && e(o) == n; } return hw = r, hw; } var vw, P8; function _ke() { if (P8) return vw; P8 = 1; var e = Cke(), t = Mm(), n = B$(), r = n && n.isMap, o = r ? t(r) : e; return vw = o, vw; } var gw, L8; function Ske() { if (L8) return gw; L8 = 1; var e = Fd(), t = Ai(), n = "[object Set]"; function r(o) { return t(o) && e(o) == n; } return gw = r, gw; } var mw, R8; function $ke() { if (R8) return mw; R8 = 1; var e = Ske(), t = Mm(), n = B$(), r = n && n.isSet, o = r ? t(r) : e; return mw = o, mw; } var yw, N8; function b7() { if (N8) return yw; N8 = 1; var e = Pm(), t = M$(), n = Rm(), r = lke(), o = dke(), a = s7(), i = l7(), s = pke(), l = fke(), u = f7(), c = hke(), d = Fd(), p = yke(), h = kke(), f = y7(), v = rr(), m = Od(), g = _ke(), b = ya(), x = $ke(), w = Cl(), k = ju(), C = 1, _ = 2, $ = 4, O = "[object Arguments]", F = "[object Array]", A = "[object Boolean]", T = "[object Date]", R = "[object Error]", M = "[object Function]", j = "[object GeneratorFunction]", P = "[object Map]", V = "[object Number]", U = "[object Object]", G = "[object RegExp]", se = "[object Set]", ae = "[object String]", de = "[object Symbol]", me = "[object WeakMap]", te = "[object ArrayBuffer]", oe = "[object DataView]", ne = "[object Float32Array]", ee = "[object Float64Array]", Z = "[object Int8Array]", le = "[object Int16Array]", pe = "[object Int32Array]", ke = "[object Uint8Array]", Ne = "[object Uint8ClampedArray]", De = "[object Uint16Array]", _e = "[object Uint32Array]", Fe = {}; Fe[O] = Fe[F] = Fe[te] = Fe[oe] = Fe[A] = Fe[T] = Fe[ne] = Fe[ee] = Fe[Z] = Fe[le] = Fe[pe] = Fe[P] = Fe[V] = Fe[U] = Fe[G] = Fe[se] = Fe[ae] = Fe[de] = Fe[ke] = Fe[Ne] = Fe[De] = Fe[_e] = !0, Fe[R] = Fe[M] = Fe[me] = !1; function Ie(Ae, qe, et, He, ot, tt) { var Qe, I = qe & C, Y = qe & _, ve = qe & $; if (et && (Qe = ot ? et(Ae, He, ot, tt) : et(Ae)), Qe !== void 0) return Qe; if (!b(Ae)) return Ae; var we = v(Ae); if (we) { if (Qe = p(Ae), !I) return i(Ae, Qe); } else { var ye = d(Ae), Pe = ye == M || ye == j; if (m(Ae)) return a(Ae, I); if (ye == U || ye == O || Pe && !ot) { if (Qe = Y || Pe ? {} : f(Ae), !I) return Y ? l(Ae, o(Qe, Ae)) : s(Ae, r(Qe, Ae)); } else { if (!Fe[ye]) return ot ? Ae : {}; Qe = h(Ae, ye, I); } } tt || (tt = new e()); var Ce = tt.get(Ae); if (Ce) return Ce; tt.set(Ae, Qe), x(Ae) ? Ae.forEach(function(rt) { Qe.add(Ie(rt, qe, et, rt, Ae, tt)); }) : g(Ae) && Ae.forEach(function(rt, fe) { Qe.set(fe, Ie(rt, qe, et, fe, Ae, tt)); }); var ze = ve ? Y ? c : u : Y ? k : w, lt = we ? void 0 : ze(Ae); return t(lt || Ae, function(rt, fe) { lt && (fe = rt, rt = Ae[fe]), n(Qe, fe, Ie(rt, qe, et, fe, Ae, tt)); }), Qe; } return yw = Ie, yw; } var bw, M8; function Eke() { if (M8) return bw; M8 = 1; var e = b7(), t = 4; function n(r) { return e(r, t); } return bw = n, bw; } var ww, D8; function U$() { if (D8) return ww; D8 = 1; function e(t) { return function() { return t; }; } return ww = e, ww; } var xw, B8; function Oke() { if (B8) return xw; B8 = 1; function e(t) { return function(n, r, o) { for (var a = -1, i = Object(n), s = o(n), l = s.length; l--; ) { var u = s[t ? l : ++a]; if (r(i[u], u, i) === !1) break; } return n; }; } return xw = e, xw; } var kw, z8; function q$() { if (z8) return kw; z8 = 1; var e = Oke(), t = e(); return kw = t, kw; } var Cw, j8; function K$() { if (j8) return Cw; j8 = 1; var e = q$(), t = Cl(); function n(r, o) { return r && e(r, o, t); } return Cw = n, Cw; } var _w, V8; function Fke() { if (V8) return _w; V8 = 1; var e = ms(); function t(n, r) { return function(o, a) { if (o == null) return o; if (!e(o)) return n(o, a); for (var i = o.length, s = r ? i : -1, l = Object(o); (r ? s-- : ++s < i) && a(l[s], s, l) !== !1; ) ; return o; }; } return _w = t, _w; } var Sw, H8; function zm() { if (H8) return Sw; H8 = 1; var e = K$(), t = Fke(), n = t(e); return Sw = n, Sw; } var $w, U8; function Vu() { if (U8) return $w; U8 = 1; function e(t) { return t; } return $w = e, $w; } var Ew, q8; function w7() { if (q8) return Ew; q8 = 1; var e = Vu(); function t(n) { return typeof n == "function" ? n : e; } return Ew = t, Ew; } var Ow, K8; function x7() { if (K8) return Ow; K8 = 1; var e = M$(), t = zm(), n = w7(), r = rr(); function o(a, i) { var s = r(a) ? e : t; return s(a, n(i)); } return Ow = o, Ow; } var G8, W8; function k7() { return W8 || (W8 = 1, G8 = x7()), G8; } var Fw, Y8; function Tke() { if (Y8) return Fw; Y8 = 1; var e = zm(); function t(n, r) { var o = []; return e(n, function(a, i, s) { r(a, i, s) && o.push(a); }), o; } return Fw = t, Fw; } var Tw, X8; function Ake() { if (X8) return Tw; X8 = 1; var e = "__lodash_hash_undefined__"; function t(n) { return this.__data__.set(n, e), this; } return Tw = t, Tw; } var Aw, Z8; function Ike() { if (Z8) return Aw; Z8 = 1; function e(t) { return this.__data__.has(t); } return Aw = e, Aw; } var Iw, J8; function C7() { if (J8) return Iw; J8 = 1; var e = N$(), t = Ake(), n = Ike(); function r(o) { var a = -1, i = o == null ? 0 : o.length; for (this.__data__ = new e(); ++a < i; ) this.add(o[a]); } return r.prototype.add = r.prototype.push = t, r.prototype.has = n, Iw = r, Iw; } var Pw, Q8; function Pke() { if (Q8) return Pw; Q8 = 1; function e(t, n) { for (var r = -1, o = t == null ? 0 : t.length; ++r < o; ) if (n(t[r], r, t)) return !0; return !1; } return Pw = e, Pw; } var Lw, eA; function _7() { if (eA) return Lw; eA = 1; function e(t, n) { return t.has(n); } return Lw = e, Lw; } var Rw, tA; function S7() { if (tA) return Rw; tA = 1; var e = C7(), t = Pke(), n = _7(), r = 1, o = 2; function a(i, s, l, u, c, d) { var p = l & r, h = i.length, f = s.length; if (h != f && !(p && f > h)) return !1; var v = d.get(i), m = d.get(s); if (v && m) return v == s && m == i; var g = -1, b = !0, x = l & o ? new e() : void 0; for (d.set(i, s), d.set(s, i); ++g < h; ) { var w = i[g], k = s[g]; if (u) var C = p ? u(k, w, g, s, i, d) : u(w, k, g, i, s, d); if (C !== void 0) { if (C) continue; b = !1; break; } if (x) { if (!t(s, function(_, $) { if (!n(x, $) && (w === _ || c(w, _, l, u, d))) return x.push($); })) { b = !1; break; } } else if (!(w === k || c(w, k, l, u, d))) { b = !1; break; } } return d.delete(i), d.delete(s), b; } return Rw = a, Rw; } var Nw, nA; function Lke() { if (nA) return Nw; nA = 1; function e(t) { var n = -1, r = Array(t.size); return t.forEach(function(o, a) { r[++n] = [a, o]; }), r; } return Nw = e, Nw; } var Mw, rA; function G$() { if (rA) return Mw; rA = 1; function e(t) { var n = -1, r = Array(t.size); return t.forEach(function(o) { r[++n] = o; }), r; } return Mw = e, Mw; } var Dw, oA; function Rke() { if (oA) return Dw; oA = 1; var e = Ed(), t = v7(), n = $d(), r = S7(), o = Lke(), a = G$(), i = 1, s = 2, l = "[object Boolean]", u = "[object Date]", c = "[object Error]", d = "[object Map]", p = "[object Number]", h = "[object RegExp]", f = "[object Set]", v = "[object String]", m = "[object Symbol]", g = "[object ArrayBuffer]", b = "[object DataView]", x = e ? e.prototype : void 0, w = x ? x.valueOf : void 0; function k(C, _, $, O, F, A, T) { switch ($) { case b: if (C.byteLength != _.byteLength || C.byteOffset != _.byteOffset) return !1; C = C.buffer, _ = _.buffer; case g: return !(C.byteLength != _.byteLength || !A(new t(C), new t(_))); case l: case u: case p: return n(+C, +_); case c: return C.name == _.name && C.message == _.message; case h: case v: return C == _ + ""; case d: var R = o; case f: var M = O & i; if (R || (R = a), C.size != _.size && !M) return !1; var j = T.get(C); if (j) return j == _; O |= s, T.set(C, _); var P = r(R(C), R(_), O, F, A, T); return T.delete(C), P; case m: if (w) return w.call(C) == w.call(_); } return !1; } return Dw = k, Dw; } var Bw, aA; function Nke() { if (aA) return Bw; aA = 1; var e = f7(), t = 1, n = Object.prototype, r = n.hasOwnProperty; function o(a, i, s, l, u, c) { var d = s & t, p = e(a), h = p.length, f = e(i), v = f.length; if (h != v && !d) return !1; for (var m = h; m--; ) { var g = p[m]; if (!(d ? g in i : r.call(i, g))) return !1; } var b = c.get(a), x = c.get(i); if (b && x) return b == i && x == a; var w = !0; c.set(a, i), c.set(i, a); for (var k = d; ++m < h; ) { g = p[m]; var C = a[g], _ = i[g]; if (l) var $ = d ? l(_, C, g, i, a, c) : l(C, _, g, a, i, c); if (!($ === void 0 ? C === _ || u(C, _, s, l, c) : $)) { w = !1; break; } k || (k = g == "constructor"); } if (w && !k) { var O = a.constructor, F = i.constructor; O != F && "constructor" in a && "constructor" in i && !(typeof O == "function" && O instanceof O && typeof F == "function" && F instanceof F) && (w = !1); } return c.delete(a), c.delete(i), w; } return Bw = o, Bw; } var zw, iA; function Mke() { if (iA) return zw; iA = 1; var e = Pm(), t = S7(), n = Rke(), r = Nke(), o = Fd(), a = rr(), i = Od(), s = ph(), l = 1, u = "[object Arguments]", c = "[object Array]", d = "[object Object]", p = Object.prototype, h = p.hasOwnProperty; function f(v, m, g, b, x, w) { var k = a(v), C = a(m), _ = k ? c : o(v), $ = C ? c : o(m); _ = _ == u ? d : _, $ = $ == u ? d : $; var O = _ == d, F = $ == d, A = _ == $; if (A && i(v)) { if (!i(m)) return !1; k = !0, O = !1; } if (A && !O) return w || (w = new e()), k || s(v) ? t(v, m, g, b, x, w) : n(v, m, _, g, b, x, w); if (!(g & l)) { var T = O && h.call(v, "__wrapped__"), R = F && h.call(m, "__wrapped__"); if (T || R) { var M = T ? v.value() : v, j = R ? m.value() : m; return w || (w = new e()), x(M, j, g, b, w); } } return A ? (w || (w = new e()), r(v, m, g, b, x, w)) : !1; } return zw = f, zw; } var jw, sA; function $7() { if (sA) return jw; sA = 1; var e = Mke(), t = Ai(); function n(r, o, a, i, s) { return r === o ? !0 : r == null || o == null || !t(r) && !t(o) ? r !== r && o !== o : e(r, o, a, i, n, s); } return jw = n, jw; } var Vw, lA; function Dke() { if (lA) return Vw; lA = 1; var e = Pm(), t = $7(), n = 1, r = 2; function o(a, i, s, l) { var u = s.length, c = u, d = !l; if (a == null) return !c; for (a = Object(a); u--; ) { var p = s[u]; if (d && p[2] ? p[1] !== a[p[0]] : !(p[0] in a)) return !1; } for (; ++u < c; ) { p = s[u]; var h = p[0], f = a[h], v = p[1]; if (d && p[2]) { if (f === void 0 && !(h in a)) return !1; } else { var m = new e(); if (l) var g = l(f, v, h, a, i, m); if (!(g === void 0 ? t(v, f, n | r, l, m) : g)) return !1; } } return !0; } return Vw = o, Vw; } var Hw, uA; function E7() { if (uA) return Hw; uA = 1; var e = ya(); function t(n) { return n === n && !e(n); } return Hw = t, Hw; } var Uw, cA; function Bke() { if (cA) return Uw; cA = 1; var e = E7(), t = Cl(); function n(r) { for (var o = t(r), a = o.length; a--; ) { var i = o[a], s = r[i]; o[a] = [i, s, e(s)]; } return o; } return Uw = n, Uw; } var qw, dA; function O7() { if (dA) return qw; dA = 1; function e(t, n) { return function(r) { return r == null ? !1 : r[t] === n && (n !== void 0 || t in Object(r)); }; } return qw = e, qw; } var Kw, pA; function zke() { if (pA) return Kw; pA = 1; var e = Dke(), t = Bke(), n = O7(); function r(o) { var a = t(o); return a.length == 1 && a[0][2] ? n(a[0][0], a[0][1]) : function(i) { return i === o || e(i, o, a); }; } return Kw = r, Kw; } var Gw, fA; function Td() { if (fA) return Gw; fA = 1; var e = Bu(), t = Ai(), n = "[object Symbol]"; function r(o) { return typeof o == "symbol" || t(o) && e(o) == n; } return Gw = r, Gw; } var Ww, hA; function W$() { if (hA) return Ww; hA = 1; var e = rr(), t = Td(), n = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, r = /^\w*$/; function o(a, i) { if (e(a)) return !1; var s = typeof a; return s == "number" || s == "symbol" || s == "boolean" || a == null || t(a) ? !0 : r.test(a) || !n.test(a) || i != null && a in Object(i); } return Ww = o, Ww; } var Yw, vA; function jke() { if (vA) return Yw; vA = 1; var e = N$(), t = "Expected a function"; function n(r, o) { if (typeof r != "function" || o != null && typeof o != "function") throw new TypeError(t); var a = function() { var i = arguments, s = o ? o.apply(this, i) : i[0], l = a.cache; if (l.has(s)) return l.get(s); var u = r.apply(this, i); return a.cache = l.set(s, u) || l, u; }; return a.cache = new (n.Cache || e)(), a; } return n.Cache = e, Yw = n, Yw; } var Xw, gA; function Vke() { if (gA) return Xw; gA = 1; var e = jke(), t = 500; function n(r) { var o = e(r, function(i) { return a.size === t && a.clear(), i; }), a = o.cache; return o; } return Xw = n, Xw; } var Zw, mA; function Hke() { if (mA) return Zw; mA = 1; var e = Vke(), t = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, n = /\\(\\)?/g, r = e(function(o) { var a = []; return o.charCodeAt(0) === 46 && a.push(""), o.replace(t, function(i, s, l, u) { a.push(l ? u.replace(n, "$1") : s || i); }), a; }); return Zw = r, Zw; } var Jw, yA; function jm() { if (yA) return Jw; yA = 1; function e(t, n) { for (var r = -1, o = t == null ? 0 : t.length, a = Array(o); ++r < o; ) a[r] = n(t[r], r, t); return a; } return Jw = e, Jw; } var Qw, bA; function Uke() { if (bA) return Qw; bA = 1; var e = Ed(), t = jm(), n = rr(), r = Td(), o = 1 / 0, a = e ? e.prototype : void 0, i = a ? a.toString : void 0; function s(l) { if (typeof l == "string") return l; if (n(l)) return t(l, s) + ""; if (r(l)) return i ? i.call(l) : ""; var u = l + ""; return u == "0" && 1 / l == -o ? "-0" : u; } return Qw = s, Qw; } var e2, wA; function F7() { if (wA) return e2; wA = 1; var e = Uke(); function t(n) { return n == null ? "" : e(n); } return e2 = t, e2; } var t2, xA; function Vm() { if (xA) return t2; xA = 1; var e = rr(), t = W$(), n = Hke(), r = F7(); function o(a, i) { return e(a) ? a : t(a, i) ? [a] : n(r(a)); } return t2 = o, t2; } var n2, kA; function fh() { if (kA) return n2; kA = 1; var e = Td(), t = 1 / 0; function n(r) { if (typeof r == "string" || e(r)) return r; var o = r + ""; return o == "0" && 1 / r == -t ? "-0" : o; } return n2 = n, n2; } var r2, CA; function Hm() { if (CA) return r2; CA = 1; var e = Vm(), t = fh(); function n(r, o) { o = e(o, r); for (var a = 0, i = o.length; r != null && a < i; ) r = r[t(o[a++])]; return a && a == i ? r : void 0; } return r2 = n, r2; } var o2, _A; function qke() { if (_A) return o2; _A = 1; var e = Hm(); function t(n, r, o) { var a = n == null ? void 0 : e(n, r); return a === void 0 ? o : a; } return o2 = t, o2; } var a2, SA; function Kke() { if (SA) return a2; SA = 1; function e(t, n) { return t != null && n in Object(t); } return a2 = e, a2; } var i2, $A; function T7() { if ($A) return i2; $A = 1; var e = Vm(), t = dh(), n = rr(), r = Nm(), o = D$(), a = fh(); function i(s, l, u) { l = e(l, s); for (var c = -1, d = l.length, p = !1; ++c < d; ) { var h = a(l[c]); if (!(p = s != null && u(s, h))) break; s = s[h]; } return p || ++c != d ? p : (d = s == null ? 0 : s.length, !!d && o(d) && r(h, d) && (n(s) || t(s))); } return i2 = i, i2; } var s2, EA; function A7() { if (EA) return s2; EA = 1; var e = Kke(), t = T7(); function n(r, o) { return r != null && t(r, o, e); } return s2 = n, s2; } var l2, OA; function Gke() { if (OA) return l2; OA = 1; var e = $7(), t = qke(), n = A7(), r = W$(), o = E7(), a = O7(), i = fh(), s = 1, l = 2; function u(c, d) { return r(c) && o(d) ? a(i(c), d) : function(p) { var h = t(p, c); return h === void 0 && h === d ? n(p, c) : e(d, h, s | l); }; } return l2 = u, l2; } var u2, FA; function I7() { if (FA) return u2; FA = 1; function e(t) { return function(n) { return n == null ? void 0 : n[t]; }; } return u2 = e, u2; } var c2, TA; function Wke() { if (TA) return c2; TA = 1; var e = Hm(); function t(n) { return function(r) { return e(r, n); }; } return c2 = t, c2; } var d2, AA; function Yke() { if (AA) return d2; AA = 1; var e = I7(), t = Wke(), n = W$(), r = fh(); function o(a) { return n(a) ? e(r(a)) : t(a); } return d2 = o, d2; } var p2, IA; function ys() { if (IA) return p2; IA = 1; var e = zke(), t = Gke(), n = Vu(), r = rr(), o = Yke(); function a(i) { return typeof i == "function" ? i : i == null ? n : typeof i == "object" ? r(i) ? t(i[0], i[1]) : e(i) : o(i); } return p2 = a, p2; } var f2, PA; function P7() { if (PA) return f2; PA = 1; var e = u7(), t = Tke(), n = ys(), r = rr(); function o(a, i) { var s = r(a) ? e : t; return s(a, n(i, 3)); } return f2 = o, f2; } var h2, LA; function Xke() { if (LA) return h2; LA = 1; var e = Object.prototype, t = e.hasOwnProperty; function n(r, o) { return r != null && t.call(r, o); } return h2 = n, h2; } var v2, RA; function L7() { if (RA) return v2; RA = 1; var e = Xke(), t = T7(); function n(r, o) { return r != null && t(r, o, e); } return v2 = n, v2; } var g2, NA; function Zke() { if (NA) return g2; NA = 1; var e = z$(), t = Fd(), n = dh(), r = rr(), o = ms(), a = Od(), i = Dm(), s = ph(), l = "[object Map]", u = "[object Set]", c = Object.prototype, d = c.hasOwnProperty; function p(h) { if (h == null) return !0; if (o(h) && (r(h) || typeof h == "string" || typeof h.splice == "function" || a(h) || s(h) || n(h))) return !h.length; var f = t(h); if (f == l || f == u) return !h.size; if (i(h)) return !e(h).length; for (var v in h) if (d.call(h, v)) return !1; return !0; } return g2 = p, g2; } var m2, MA; function R7() { if (MA) return m2; MA = 1; function e(t) { return t === void 0; } return m2 = e, m2; } var y2, DA; function N7() { if (DA) return y2; DA = 1; var e = zm(), t = ms(); function n(r, o) { var a = -1, i = t(r) ? Array(r.length) : []; return e(r, function(s, l, u) { i[++a] = o(s, l, u); }), i; } return y2 = n, y2; } var b2, BA; function M7() { if (BA) return b2; BA = 1; var e = jm(), t = ys(), n = N7(), r = rr(); function o(a, i) { var s = r(a) ? e : n; return s(a, t(i, 3)); } return b2 = o, b2; } var w2, zA; function Jke() { if (zA) return w2; zA = 1; function e(t, n, r, o) { var a = -1, i = t == null ? 0 : t.length; for (o && i && (r = t[++a]); ++a < i; ) r = n(r, t[a], a, t); return r; } return w2 = e, w2; } var x2, jA; function Qke() { if (jA) return x2; jA = 1; function e(t, n, r, o, a) { return a(t, function(i, s, l) { r = o ? (o = !1, i) : n(r, i, s, l); }), r; } return x2 = e, x2; } var k2, VA; function D7() { if (VA) return k2; VA = 1; var e = Jke(), t = zm(), n = ys(), r = Qke(), o = rr(); function a(i, s, l) { var u = o(i) ? e : r, c = arguments.length < 3; return u(i, n(s, 4), l, c, t); } return k2 = a, k2; } var C2, HA; function eCe() { if (HA) return C2; HA = 1; var e = Bu(), t = rr(), n = Ai(), r = "[object String]"; function o(a) { return typeof a == "string" || !t(a) && n(a) && e(a) == r; } return C2 = o, C2; } var _2, UA; function tCe() { if (UA) return _2; UA = 1; var e = I7(), t = e("length"); return _2 = t, _2; } var S2, qA; function nCe() { if (qA) return S2; qA = 1; var e = "\\ud800-\\udfff", t = "\\u0300-\\u036f", n = "\\ufe20-\\ufe2f", r = "\\u20d0-\\u20ff", o = t + n + r, a = "\\ufe0e\\ufe0f", i = "\\u200d", s = RegExp("[" + i + e + o + a + "]"); function l(u) { return s.test(u); } return S2 = l, S2; } var $2, KA; function rCe() { if (KA) return $2; KA = 1; var e = "\\ud800-\\udfff", t = "\\u0300-\\u036f", n = "\\ufe20-\\ufe2f", r = "\\u20d0-\\u20ff", o = t + n + r, a = "\\ufe0e\\ufe0f", i = "[" + e + "]", s = "[" + o + "]", l = "\\ud83c[\\udffb-\\udfff]", u = "(?:" + s + "|" + l + ")", c = "[^" + e + "]", d = "(?:\\ud83c[\\udde6-\\uddff]){2}", p = "[\\ud800-\\udbff][\\udc00-\\udfff]", h = "\\u200d", f = u + "?", v = "[" + a + "]?", m = "(?:" + h + "(?:" + [c, d, p].join("|") + ")" + v + f + ")*", g = v + f + m, b = "(?:" + [c + s + "?", s, d, p, i].join("|") + ")", x = RegExp(l + "(?=" + l + ")|" + b + g, "g"); function w(k) { for (var C = x.lastIndex = 0; x.test(k); ) ++C; return C; } return $2 = w, $2; } var E2, GA; function oCe() { if (GA) return E2; GA = 1; var e = tCe(), t = nCe(), n = rCe(); function r(o) { return t(o) ? n(o) : e(o); } return E2 = r, E2; } var O2, WA; function aCe() { if (WA) return O2; WA = 1; var e = z$(), t = Fd(), n = ms(), r = eCe(), o = oCe(), a = "[object Map]", i = "[object Set]"; function s(l) { if (l == null) return 0; if (n(l)) return r(l) ? o(l) : l.length; var u = t(l); return u == a || u == i ? l.size : e(l).length; } return O2 = s, O2; } var F2, YA; function iCe() { if (YA) return F2; YA = 1; var e = M$(), t = m7(), n = K$(), r = ys(), o = Bm(), a = rr(), i = Od(), s = uh(), l = ya(), u = ph(); function c(d, p, h) { var f = a(d), v = f || i(d) || u(d); if (p = r(p, 4), h == null) { var m = d && d.constructor; v ? h = f ? new m() : [] : l(d) ? h = s(m) ? t(o(d)) : {} : h = {}; } return (v ? e : n)(d, function(g, b, x) { return p(h, g, b, x); }), h; } return F2 = c, F2; } var T2, XA; function sCe() { if (XA) return T2; XA = 1; var e = Ed(), t = dh(), n = rr(), r = e ? e.isConcatSpreadable : void 0; function o(a) { return n(a) || t(a) || !!(r && a && a[r]); } return T2 = o, T2; } var A2, ZA; function Y$() { if (ZA) return A2; ZA = 1; var e = V$(), t = sCe(); function n(r, o, a, i, s) { var l = -1, u = r.length; for (a || (a = t), s || (s = []); ++l < u; ) { var c = r[l]; o > 0 && a(c) ? o > 1 ? n(c, o - 1, a, i, s) : e(s, c) : i || (s[s.length] = c); } return s; } return A2 = n, A2; } var I2, JA; function lCe() { if (JA) return I2; JA = 1; function e(t, n, r) { switch (r.length) { case 0: return t.call(n); case 1: return t.call(n, r[0]); case 2: return t.call(n, r[0], r[1]); case 3: return t.call(n, r[0], r[1], r[2]); } return t.apply(n, r); } return I2 = e, I2; } var P2, QA; function B7() { if (QA) return P2; QA = 1; var e = lCe(), t = Math.max; function n(r, o, a) { return o = t(o === void 0 ? r.length - 1 : o, 0), function() { for (var i = arguments, s = -1, l = t(i.length - o, 0), u = Array(l); ++s < l; ) u[s] = i[o + s]; s = -1; for (var c = Array(o + 1); ++s < o; ) c[s] = i[s]; return c[o] = a(u), e(r, this, c); }; } return P2 = n, P2; } var L2, e6; function uCe() { if (e6) return L2; e6 = 1; var e = U$(), t = o7(), n = Vu(), r = t ? function(o, a) { return t(o, "toString", { configurable: !0, enumerable: !1, value: e(a), writable: !0 }); } : n; return L2 = r, L2; } var R2, t6; function cCe() { if (t6) return R2; t6 = 1; var e = 800, t = 16, n = Date.now; function r(o) { var a = 0, i = 0; return function() { var s = n(), l = t - (s - i); if (i = s, l > 0) { if (++a >= e) return arguments[0]; } else a = 0; return o.apply(void 0, arguments); }; } return R2 = r, R2; } var N2, n6; function z7() { if (n6) return N2; n6 = 1; var e = uCe(), t = cCe(), n = t(e); return N2 = n, N2; } var M2, r6; function Um() { if (r6) return M2; r6 = 1; var e = Vu(), t = B7(), n = z7(); function r(o, a) { return n(t(o, a, e), o + ""); } return M2 = r, M2; } var D2, o6; function j7() { if (o6) return D2; o6 = 1; function e(t, n, r, o) { for (var a = t.length, i = r + (o ? 1 : -1); o ? i-- : ++i < a; ) if (n(t[i], i, t)) return i; return -1; } return D2 = e, D2; } var B2, a6; function dCe() { if (a6) return B2; a6 = 1; function e(t) { return t !== t; } return B2 = e, B2; } var z2, i6; function pCe() { if (i6) return z2; i6 = 1; function e(t, n, r) { for (var o = r - 1, a = t.length; ++o < a; ) if (t[o] === n) return o; return -1; } return z2 = e, z2; } var j2, s6; function fCe() { if (s6) return j2; s6 = 1; var e = j7(), t = dCe(), n = pCe(); function r(o, a, i) { return a === a ? n(o, a, i) : e(o, t, i); } return j2 = r, j2; } var V2, l6; function hCe() { if (l6) return V2; l6 = 1; var e = fCe(); function t(n, r) { var o = n == null ? 0 : n.length; return !!o && e(n, r, 0) > -1; } return V2 = t, V2; } var H2, u6; function vCe() { if (u6) return H2; u6 = 1; function e(t, n, r) { for (var o = -1, a = t == null ? 0 : t.length; ++o < a; ) if (r(n, t[o])) return !0; return !1; } return H2 = e, H2; } var U2, c6; function gCe() { if (c6) return U2; c6 = 1; function e() { } return U2 = e, U2; } var q2, d6; function mCe() { if (d6) return q2; d6 = 1; var e = h7(), t = gCe(), n = G$(), r = 1 / 0, o = e && 1 / n(new e([, -0]))[1] == r ? function(a) { return new e(a); } : t; return q2 = o, q2; } var K2, p6; function yCe() { if (p6) return K2; p6 = 1; var e = C7(), t = hCe(), n = vCe(), r = _7(), o = mCe(), a = G$(), i = 200; function s(l, u, c) { var d = -1, p = t, h = l.length, f = !0, v = [], m = v; if (c) f = !1, p = n; else if (h >= i) { var g = u ? null : o(l); if (g) return a(g); f = !1, p = r, m = new e(); } else m = u ? [] : v; e: for (; ++d < h; ) { var b = l[d], x = u ? u(b) : b; if (b = c || b !== 0 ? b : 0, f && x === x) { for (var w = m.length; w--; ) if (m[w] === x) continue e; u && m.push(x), v.push(b); } else p(m, x, c) || (m !== v && m.push(x), v.push(b)); } return v; } return K2 = s, K2; } var G2, f6; function V7() { if (f6) return G2; f6 = 1; var e = ms(), t = Ai(); function n(r) { return t(r) && e(r); } return G2 = n, G2; } var W2, h6; function bCe() { if (h6) return W2; h6 = 1; var e = Y$(), t = Um(), n = yCe(), r = V7(), o = t(function(a) { return n(e(a, 1, r, !0)); }); return W2 = o, W2; } var Y2, v6; function wCe() { if (v6) return Y2; v6 = 1; var e = jm(); function t(n, r) { return e(r, function(o) { return n[o]; }); } return Y2 = t, Y2; } var X2, g6; function H7() { if (g6) return X2; g6 = 1; var e = wCe(), t = Cl(); function n(r) { return r == null ? [] : e(r, t(r)); } return X2 = n, X2; } var Z2, m6; function ba() { if (m6) return Z2; m6 = 1; var e; if (typeof L$ == "function") try { e = { clone: Eke(), constant: U$(), each: k7(), filter: P7(), has: L7(), isArray: rr(), isEmpty: Zke(), isFunction: uh(), isUndefined: R7(), keys: Cl(), map: M7(), reduce: D7(), size: aCe(), transform: iCe(), union: bCe(), values: H7() }; } catch { } return e || (e = window._), Z2 = e, Z2; } var J2, y6; function X$() { if (y6) return J2; y6 = 1; var e = ba(); J2 = o; var t = "\0", n = "\0", r = ""; function o(c) { this._isDirected = e.has(c, "directed") ? c.directed : !0, this._isMultigraph = e.has(c, "multigraph") ? c.multigraph : !1, this._isCompound = e.has(c, "compound") ? c.compound : !1, this._label = void 0, this._defaultNodeLabelFn = e.constant(void 0), this._defaultEdgeLabelFn = e.constant(void 0), this._nodes = {}, this._isCompound && (this._parent = {}, this._children = {}, this._children[n] = {}), this._in = {}, this._preds = {}, this._out = {}, this._sucs = {}, this._edgeObjs = {}, this._edgeLabels = {}; } o.prototype._nodeCount = 0, o.prototype._edgeCount = 0, o.prototype.isDirected = function() { return this._isDirected; }, o.prototype.isMultigraph = function() { return this._isMultigraph; }, o.prototype.isCompound = function() { return this._isCompound; }, o.prototype.setGraph = function(c) { return this._label = c, this; }, o.prototype.graph = function() { return this._label; }, o.prototype.setDefaultNodeLabel = function(c) { return e.isFunction(c) || (c = e.constant(c)), this._defaultNodeLabelFn = c, this; }, o.prototype.nodeCount = function() { return this._nodeCount; }, o.prototype.nodes = function() { return e.keys(this._nodes); }, o.prototype.sources = function() { var c = this; return e.filter(this.nodes(), function(d) { return e.isEmpty(c._in[d]); }); }, o.prototype.sinks = function() { var c = this; return e.filter(this.nodes(), function(d) { return e.isEmpty(c._out[d]); }); }, o.prototype.setNodes = function(c, d) { var p = arguments, h = this; return e.each(c, function(f) { p.length > 1 ? h.setNode(f, d) : h.setNode(f); }), this; }, o.prototype.setNode = function(c, d) { return e.has(this._nodes, c) ? (arguments.length > 1 && (this._nodes[c] = d), this) : (this._nodes[c] = arguments.length > 1 ? d : this._defaultNodeLabelFn(c), this._isCompound && (this._parent[c] = n, this._children[c] = {}, this._children[n][c] = !0), this._in[c] = {}, this._preds[c] = {}, this._out[c] = {}, this._sucs[c] = {}, ++this._nodeCount, this); }, o.prototype.node = function(c) { return this._nodes[c]; }, o.prototype.hasNode = function(c) { return e.has(this._nodes, c); }, o.prototype.removeNode = function(c) { var d = this; if (e.has(this._nodes, c)) { var p = function(h) { d.removeEdge(d._edgeObjs[h]); }; delete this._nodes[c], this._isCompound && (this._removeFromParentsChildList(c), delete this._parent[c], e.each(this.children(c), function(h) { d.setParent(h); }), delete this._children[c]), e.each(e.keys(this._in[c]), p), delete this._in[c], delete this._preds[c], e.each(e.keys(this._out[c]), p), delete this._out[c], delete this._sucs[c], --this._nodeCount; } return this; }, o.prototype.setParent = function(c, d) { if (!this._isCompound) throw new Error("Cannot set parent in a non-compound graph"); if (e.isUndefined(d)) d = n; else { d += ""; for (var p = d; !e.isUndefined(p); p = this.parent(p)) if (p === c) throw new Error("Setting " + d + " as parent of " + c + " would create a cycle"); this.setNode(d); } return this.setNode(c), this._removeFromParentsChildList(c), this._parent[c] = d, this._children[d][c] = !0, this; }, o.prototype._removeFromParentsChildList = function(c) { delete this._children[this._parent[c]][c]; }, o.prototype.parent = function(c) { if (this._isCompound) { var d = this._parent[c]; if (d !== n) return d; } }, o.prototype.children = function(c) { if (e.isUndefined(c) && (c = n), this._isCompound) { var d = this._children[c]; if (d) return e.keys(d); } else { if (c === n) return this.nodes(); if (this.hasNode(c)) return []; } }, o.prototype.predecessors = function(c) { var d = this._preds[c]; if (d) return e.keys(d); }, o.prototype.successors = function(c) { var d = this._sucs[c]; if (d) return e.keys(d); }, o.prototype.neighbors = function(c) { var d = this.predecessors(c); if (d) return e.union(d, this.successors(c)); }, o.prototype.isLeaf = function(c) { var d; return this.isDirected() ? d = this.successors(c) : d = this.neighbors(c), d.length === 0; }, o.prototype.filterNodes = function(c) { var d = new this.constructor({ directed: this._isDirected, multigraph: this._isMultigraph, compound: this._isCompound }); d.setGraph(this.graph()); var p = this; e.each(this._nodes, function(v, m) { c(m) && d.setNode(m, v); }), e.each(this._edgeObjs, function(v) { d.hasNode(v.v) && d.hasNode(v.w) && d.setEdge(v, p.edge(v)); }); var h = {}; function f(v) { var m = p.parent(v); return m === void 0 || d.hasNode(m) ? (h[v] = m, m) : m in h ? h[m] : f(m); } return this._isCompound && e.each(d.nodes(), function(v) { d.setParent(v, f(v)); }), d; }, o.prototype.setDefaultEdgeLabel = function(c) { return e.isFunction(c) || (c = e.constant(c)), this._defaultEdgeLabelFn = c, this; }, o.prototype.edgeCount = function() { return this._edgeCount; }, o.prototype.edges = function() { return e.values(this._edgeObjs); }, o.prototype.setPath = function(c, d) { var p = this, h = arguments; return e.reduce(c, function(f, v) { return h.length > 1 ? p.setEdge(f, v, d) : p.setEdge(f, v), v; }), this; }, o.prototype.setEdge = function() { var c, d, p, h, f = !1, v = arguments[0]; typeof v == "object" && v !== null && "v" in v ? (c = v.v, d = v.w, p = v.name, arguments.length === 2 && (h = arguments[1], f = !0)) : (c = v, d = arguments[1], p = arguments[3], arguments.length > 2 && (h = arguments[2], f = !0)), c = "" + c, d = "" + d, e.isUndefined(p) || (p = "" + p); var m = s(this._isDirected, c, d, p); if (e.has(this._edgeLabels, m)) return f && (this._edgeLabels[m] = h), this; if (!e.isUndefined(p) && !this._isMultigraph) throw new Error("Cannot set a named edge when isMultigraph = false"); this.setNode(c), this.setNode(d), this._edgeLabels[m] = f ? h : this._defaultEdgeLabelFn(c, d, p); var g = l(this._isDirected, c, d, p); return c = g.v, d = g.w, Object.freeze(g), this._edgeObjs[m] = g, a(this._preds[d], c), a(this._sucs[c], d), this._in[d][m] = g, this._out[c][m] = g, this._edgeCount++, this; }, o.prototype.edge = function(c, d, p) { var h = arguments.length === 1 ? u(this._isDirected, arguments[0]) : s(this._isDirected, c, d, p); return this._edgeLabels[h]; }, o.prototype.hasEdge = function(c, d, p) { var h = arguments.length === 1 ? u(this._isDirected, arguments[0]) : s(this._isDirected, c, d, p); return e.has(this._edgeLabels, h); }, o.prototype.removeEdge = function(c, d, p) { var h = arguments.length === 1 ? u(this._isDirected, arguments[0]) : s(this._isDirected, c, d, p), f = this._edgeObjs[h]; return f && (c = f.v, d = f.w, delete this._edgeLabels[h], delete this._edgeObjs[h], i(this._preds[d], c), i(this._sucs[c], d), delete this._in[d][h], delete this._out[c][h], this._edgeCount--), this; }, o.prototype.inEdges = function(c, d) { var p = this._in[c]; if (p) { var h = e.values(p); return d ? e.filter(h, function(f) { return f.v === d; }) : h; } }, o.prototype.outEdges = function(c, d) { var p = this._out[c]; if (p) { var h = e.values(p); return d ? e.filter(h, function(f) { return f.w === d; }) : h; } }, o.prototype.nodeEdges = function(c, d) { var p = this.inEdges(c, d); if (p) return p.concat(this.outEdges(c, d)); }; function a(c, d) { c[d] ? c[d]++ : c[d] = 1; } function i(c, d) { --c[d] || delete c[d]; } function s(c, d, p, h) { var f = "" + d, v = "" + p; if (!c && f > v) { var m = f; f = v, v = m; } return f + r + v + r + (e.isUndefined(h) ? t : h); } function l(c, d, p, h) { var f = "" + d, v = "" + p; if (!c && f > v) { var m = f; f = v, v = m; } var g = { v: f, w: v }; return h && (g.name = h), g; } function u(c, d) { return s(c, d.v, d.w, d.name); } return J2; } var b6, w6; function xCe() { return w6 || (w6 = 1, b6 = "2.1.8"), b6; } var x6, k6; function kCe() { return k6 || (k6 = 1, x6 = { Graph: X$(), version: xCe() }), x6; } var Q2, C6; function CCe() { if (C6) return Q2; C6 = 1; var e = ba(), t = X$(); Q2 = { write: n, read: a }; function n(i) { var s = { options: { directed: i.isDirected(), multigraph: i.isMultigraph(), compound: i.isCompound() }, nodes: r(i), edges: o(i) }; return e.isUndefined(i.graph()) || (s.value = e.clone(i.graph())), s; } function r(i) { return e.map(i.nodes(), function(s) { var l = i.node(s), u = i.parent(s), c = { v: s }; return e.isUndefined(l) || (c.value = l), e.isUndefined(u) || (c.parent = u), c; }); } function o(i) { return e.map(i.edges(), function(s) { var l = i.edge(s), u = { v: s.v, w: s.w }; return e.isUndefined(s.name) || (u.name = s.name), e.isUndefined(l) || (u.value = l), u; }); } function a(i) { var s = new t(i.options).setGraph(i.value); return e.each(i.nodes, function(l) { s.setNode(l.v, l.value), l.parent && s.setParent(l.v, l.parent); }), e.each(i.edges, function(l) { s.setEdge({ v: l.v, w: l.w, name: l.name }, l.value); }), s; } return Q2; } var ex, _6; function _Ce() { if (_6) return ex; _6 = 1; var e = ba(); ex = t; function t(n) { var r = {}, o = [], a; function i(s) { e.has(r, s) || (r[s] = !0, a.push(s), e.each(n.successors(s), i), e.each(n.predecessors(s), i)); } return e.each(n.nodes(), function(s) { a = [], i(s), a.length && o.push(a); }), o; } return ex; } var tx, S6; function U7() { if (S6) return tx; S6 = 1; var e = ba(); tx = t; function t() { this._arr = [], this._keyIndices = {}; } return t.prototype.size = function() { return this._arr.length; }, t.prototype.keys = function() { return this._arr.map(function(n) { return n.key; }); }, t.prototype.has = function(n) { return e.has(this._keyIndices, n); }, t.prototype.priority = function(n) { var r = this._keyIndices[n]; if (r !== void 0) return this._arr[r].priority; }, t.prototype.min = function() { if (this.size() === 0) throw new Error("Queue underflow"); return this._arr[0].key; }, t.prototype.add = function(n, r) { var o = this._keyIndices; if (n = String(n), !e.has(o, n)) { var a = this._arr, i = a.length; return o[n] = i, a.push({ key: n, priority: r }), this._decrease(i), !0; } return !1; }, t.prototype.removeMin = function() { this._swap(0, this._arr.length - 1); var n = this._arr.pop(); return delete this._keyIndices[n.key], this._heapify(0), n.key; }, t.prototype.decrease = function(n, r) { var o = this._keyIndices[n]; if (r > this._arr[o].priority) throw new Error("New priority is greater than current priority. Key: " + n + " Old: " + this._arr[o].priority + " New: " + r); this._arr[o].priority = r, this._decrease(o); }, t.prototype._heapify = function(n) { var r = this._arr, o = 2 * n, a = o + 1, i = n; o < r.length && (i = r[o].priority < r[i].priority ? o : i, a < r.length && (i = r[a].priority < r[i].priority ? a : i), i !== n && (this._swap(n, i), this._heapify(i))); }, t.prototype._decrease = function(n) { for (var r = this._arr, o = r[n].priority, a; n !== 0 && (a = n >> 1, !(r[a].priority < o)); ) this._swap(n, a), n = a; }, t.prototype._swap = function(n, r) { var o = this._arr, a = this._keyIndices, i = o[n], s = o[r]; o[n] = s, o[r] = i, a[s.key] = n, a[i.key] = r; }, tx; } var nx, $6; function q7() { if ($6) return nx; $6 = 1; var e = ba(), t = U7(); nx = r; var n = e.constant(1); function r(a, i, s, l) { return o( a, String(i), s || n, l || function(u) { return a.outEdges(u); } ); } function o(a, i, s, l) { var u = {}, c = new t(), d, p, h = function(f) { var v = f.v !== d ? f.v : f.w, m = u[v], g = s(f), b = p.distance + g; if (g < 0) throw new Error("dijkstra does not allow negative edge weights. Bad edge: " + f + " Weight: " + g); b < m.distance && (m.distance = b, m.predecessor = d, c.decrease(v, b)); }; for (a.nodes().forEach(function(f) { var v = f === i ? 0 : Number.POSITIVE_INFINITY; u[f] = { distance: v }, c.add(f, v); }); c.size() > 0 && (d = c.removeMin(), p = u[d], p.distance !== Number.POSITIVE_INFINITY); ) l(d).forEach(h); return u; } return nx; } var rx, E6; function SCe() { if (E6) return rx; E6 = 1; var e = q7(), t = ba(); rx = n; function n(r, o, a) { return t.transform(r.nodes(), function(i, s) { i[s] = e(r, s, o, a); }, {}); } return rx; } var ox, O6; function K7() { if (O6) return ox; O6 = 1; var e = ba(); ox = t; function t(n) { var r = 0, o = [], a = {}, i = []; function s(l) { var u = a[l] = { onStack: !0, lowlink: r, index: r++ }; if (o.push(l), n.successors(l).forEach(function(p) { e.has(a, p) ? a[p].onStack && (u.lowlink = Math.min(u.lowlink, a[p].index)) : (s(p), u.lowlink = Math.min(u.lowlink, a[p].lowlink)); }), u.lowlink === u.index) { var c = [], d; do d = o.pop(), a[d].onStack = !1, c.push(d); while (l !== d); i.push(c); } } return n.nodes().forEach(function(l) { e.has(a, l) || s(l); }), i; } return ox; } var ax, F6; function $Ce() { if (F6) return ax; F6 = 1; var e = ba(), t = K7(); ax = n; function n(r) { return e.filter(t(r), function(o) { return o.length > 1 || o.length === 1 && r.hasEdge(o[0], o[0]); }); } return ax; } var ix, T6; function ECe() { if (T6) return ix; T6 = 1; var e = ba(); ix = n; var t = e.constant(1); function n(o, a, i) { return r( o, a || t, i || function(s) { return o.outEdges(s); } ); } function r(o, a, i) { var s = {}, l = o.nodes(); return l.forEach(function(u) { s[u] = {}, s[u][u] = { distance: 0 }, l.forEach(function(c) { u !== c && (s[u][c] = { distance: Number.POSITIVE_INFINITY }); }), i(u).forEach(function(c) { var d = c.v === u ? c.w : c.v, p = a(c); s[u][d] = { distance: p, predecessor: u }; }); }), l.forEach(function(u) { var c = s[u]; l.forEach(function(d) { var p = s[d]; l.forEach(function(h) { var f = p[u], v = c[h], m = p[h], g = f.distance + v.distance; g < m.distance && (m.distance = g, m.predecessor = v.predecessor); }); }); }), s; } return ix; } var sx, A6; function G7() { if (A6) return sx; A6 = 1; var e = ba(); sx = t, t.CycleException = n; function t(r) { var o = {}, a = {}, i = []; function s(l) { if (e.has(a, l)) throw new n(); e.has(o, l) || (a[l] = !0, o[l] = !0, e.each(r.predecessors(l), s), delete a[l], i.push(l)); } if (e.each(r.sinks(), s), e.size(o) !== r.nodeCount()) throw new n(); return i; } function n() { } return n.prototype = new Error(), sx; } var lx, I6; function OCe() { if (I6) return lx; I6 = 1; var e = G7(); lx = t; function t(n) { try { e(n); } catch (r) { if (r instanceof e.CycleException) return !1; throw r; } return !0; } return lx; } var ux, P6; function W7() { if (P6) return ux; P6 = 1; var e = ba(); ux = t; function t(r, o, a) { e.isArray(o) || (o = [o]); var i = (r.isDirected() ? r.successors : r.neighbors).bind(r), s = [], l = {}; return e.each(o, function(u) { if (!r.hasNode(u)) throw new Error("Graph does not have node: " + u); n(r, u, a === "post", l, i, s); }), s; } function n(r, o, a, i, s, l) { e.has(i, o) || (i[o] = !0, a || l.push(o), e.each(s(o), function(u) { n(r, u, a, i, s, l); }), a && l.push(o)); } return ux; } var cx, L6; function FCe() { if (L6) return cx; L6 = 1; var e = W7(); cx = t; function t(n, r) { return e(n, r, "post"); } return cx; } var dx, R6; function TCe() { if (R6) return dx; R6 = 1; var e = W7(); dx = t; function t(n, r) { return e(n, r, "pre"); } return dx; } var px, N6; function ACe() { if (N6) return px; N6 = 1; var e = ba(), t = X$(), n = U7(); px = r; function r(o, a) { var i = new t(), s = {}, l = new n(), u; function c(p) { var h = p.v === u ? p.w : p.v, f = l.priority(h); if (f !== void 0) { var v = a(p); v < f && (s[h] = u, l.decrease(h, v)); } } if (o.nodeCount() === 0) return i; e.each(o.nodes(), function(p) { l.add(p, Number.POSITIVE_INFINITY), i.setNode(p); }), l.decrease(o.nodes()[0], 0); for (var d = !1; l.size() > 0; ) { if (u = l.removeMin(), e.has(s, u)) i.setEdge(u, s[u]); else { if (d) throw new Error("Input graph is not connected: " + o); d = !0; } o.nodeEdges(u).forEach(c); } return i; } return px; } var M6, D6; function ICe() { return D6 || (D6 = 1, M6 = { components: _Ce(), dijkstra: q7(), dijkstraAll: SCe(), findCycles: $Ce(), floydWarshall: ECe(), isAcyclic: OCe(), postorder: FCe(), preorder: TCe(), prim: ACe(), tarjan: K7(), topsort: G7() }), M6; } var fx, B6; function PCe() { if (B6) return fx; B6 = 1; var e = kCe(); return fx = { Graph: e.Graph, json: CCe(), alg: ICe(), version: e.version }, fx; } var hx, z6; function Va() { if (z6) return hx; z6 = 1; var e; if (typeof L$ == "function") try { e = PCe(); } catch { } return e || (e = window.graphlib), hx = e, hx; } var vx, j6; function LCe() { if (j6) return vx; j6 = 1; var e = b7(), t = 1, n = 4; function r(o) { return e(o, t | n); } return vx = r, vx; } var gx, V6; function qm() { if (V6) return gx; V6 = 1; var e = $d(), t = ms(), n = Nm(), r = ya(); function o(a, i, s) { if (!r(s)) return !1; var l = typeof i; return (l == "number" ? t(s) && n(i, s.length) : l == "string" && i in s) ? e(s[i], a) : !1; } return gx = o, gx; } var mx, H6; function RCe() { if (H6) return mx; H6 = 1; var e = Um(), t = $d(), n = qm(), r = ju(), o = Object.prototype, a = o.hasOwnProperty, i = e(function(s, l) { s = Object(s); var u = -1, c = l.length, d = c > 2 ? l[2] : void 0; for (d && n(l[0], l[1], d) && (c = 1); ++u < c; ) for (var p = l[u], h = r(p), f = -1, v = h.length; ++f < v; ) { var m = h[f], g = s[m]; (g === void 0 || t(g, o[m]) && !a.call(s, m)) && (s[m] = p[m]); } return s; }); return mx = i, mx; } var yx, U6; function NCe() { if (U6) return yx; U6 = 1; var e = ys(), t = ms(), n = Cl(); function r(o) { return function(a, i, s) { var l = Object(a); if (!t(a)) { var u = e(i, 3); a = n(a), i = function(d) { return u(l[d], d, l); }; } var c = o(a, i, s); return c > -1 ? l[u ? a[c] : c] : void 0; }; } return yx = r, yx; } var bx, q6; function MCe() { if (q6) return bx; q6 = 1; var e = /\s/; function t(n) { for (var r = n.length; r-- && e.test(n.charAt(r)); ) ; return r; } return bx = t, bx; } var wx, K6; function DCe() { if (K6) return wx; K6 = 1; var e = MCe(), t = /^\s+/; function n(r) { return r && r.slice(0, e(r) + 1).replace(t, ""); } return wx = n, wx; } var xx, G6; function BCe() { if (G6) return xx; G6 = 1; var e = DCe(), t = ya(), n = Td(), r = NaN, o = /^[-+]0x[0-9a-f]+$/i, a = /^0b[01]+$/i, i = /^0o[0-7]+$/i, s = parseInt; function l(u) { if (typeof u == "number") return u; if (n(u)) return r; if (t(u)) { var c = typeof u.valueOf == "function" ? u.valueOf() : u; u = t(c) ? c + "" : c; } if (typeof u != "string") return u === 0 ? u : +u; u = e(u); var d = a.test(u); return d || i.test(u) ? s(u.slice(2), d ? 2 : 8) : o.test(u) ? r : +u; } return xx = l, xx; } var kx, W6; function Y7() { if (W6) return kx; W6 = 1; var e = BCe(), t = 1 / 0, n = 17976931348623157e292; function r(o) { if (!o) return o === 0 ? o : 0; if (o = e(o), o === t || o === -t) { var a = o < 0 ? -1 : 1; return a * n; } return o === o ? o : 0; } return kx = r, kx; } var Cx, Y6; function zCe() { if (Y6) return Cx; Y6 = 1; var e = Y7(); function t(n) { var r = e(n), o = r % 1; return r === r ? o ? r - o : r : 0; } return Cx = t, Cx; } var _x, X6; function jCe() { if (X6) return _x; X6 = 1; var e = j7(), t = ys(), n = zCe(), r = Math.max; function o(a, i, s) { var l = a == null ? 0 : a.length; if (!l) return -1; var u = s == null ? 0 : n(s); return u < 0 && (u = r(l + u, 0)), e(a, t(i, 3), u); } return _x = o, _x; } var Sx, Z6; function VCe() { if (Z6) return Sx; Z6 = 1; var e = NCe(), t = jCe(), n = e(t); return Sx = n, Sx; } var $x, J6; function X7() { if (J6) return $x; J6 = 1; var e = Y$(); function t(n) { var r = n == null ? 0 : n.length; return r ? e(n, 1) : []; } return $x = t, $x; } var Ex, Q6; function HCe() { if (Q6) return Ex; Q6 = 1; var e = q$(), t = w7(), n = ju(); function r(o, a) { return o == null ? o : e(o, t(a), n); } return Ex = r, Ex; } var Ox, eI; function UCe() { if (eI) return Ox; eI = 1; function e(t) { var n = t == null ? 0 : t.length; return n ? t[n - 1] : void 0; } return Ox = e, Ox; } var Fx, tI; function qCe() { if (tI) return Fx; tI = 1; var e = Lm(), t = K$(), n = ys(); function r(o, a) { var i = {}; return a = n(a, 3), t(o, function(s, l, u) { e(i, l, a(s, l, u)); }), i; } return Fx = r, Fx; } var Tx, nI; function Z$() { if (nI) return Tx; nI = 1; var e = Td(); function t(n, r, o) { for (var a = -1, i = n.length; ++a < i; ) { var s = n[a], l = r(s); if (l != null && (u === void 0 ? l === l && !e(l) : o(l, u))) var u = l, c = s; } return c; } return Tx = t, Tx; } var Ax, rI; function KCe() { if (rI) return Ax; rI = 1; function e(t, n) { return t > n; } return Ax = e, Ax; } var Ix, oI; function GCe() { if (oI) return Ix; oI = 1; var e = Z$(), t = KCe(), n = Vu(); function r(o) { return o && o.length ? e(o, n, t) : void 0; } return Ix = r, Ix; } var Px, aI; function Z7() { if (aI) return Px; aI = 1; var e = Lm(), t = $d(); function n(r, o, a) { (a !== void 0 && !t(r[o], a) || a === void 0 && !(o in r)) && e(r, o, a); } return Px = n, Px; } var Lx, iI; function WCe() { if (iI) return Lx; iI = 1; var e = Bu(), t = Bm(), n = Ai(), r = "[object Object]", o = Function.prototype, a = Object.prototype, i = o.toString, s = a.hasOwnProperty, l = i.call(Object); function u(c) { if (!n(c) || e(c) != r) return !1; var d = t(c); if (d === null) return !0; var p = s.call(d, "constructor") && d.constructor; return typeof p == "function" && p instanceof p && i.call(p) == l; } return Lx = u, Lx; } var Rx, sI; function J7() { if (sI) return Rx; sI = 1; function e(t, n) { if (!(n === "constructor" && typeof t[n] == "function") && n != "__proto__") return t[n]; } return Rx = e, Rx; } var Nx, lI; function YCe() { if (lI) return Nx; lI = 1; var e = ch(), t = ju(); function n(r) { return e(r, t(r)); } return Nx = n, Nx; } var Mx, uI; function XCe() { if (uI) return Mx; uI = 1; var e = Z7(), t = s7(), n = g7(), r = l7(), o = y7(), a = dh(), i = rr(), s = V7(), l = Od(), u = uh(), c = ya(), d = WCe(), p = ph(), h = J7(), f = YCe(); function v(m, g, b, x, w, k, C) { var _ = h(m, b), $ = h(g, b), O = C.get($); if (O) { e(m, b, O); return; } var F = k ? k(_, $, b + "", m, g, C) : void 0, A = F === void 0; if (A) { var T = i($), R = !T && l($), M = !T && !R && p($); F = $, T || R || M ? i(_) ? F = _ : s(_) ? F = r(_) : R ? (A = !1, F = t($, !0)) : M ? (A = !1, F = n($, !0)) : F = [] : d($) || a($) ? (F = _, a(_) ? F = f(_) : (!c(_) || u(_)) && (F = o($))) : A = !1; } A && (C.set($, F), w(F, $, x, k, C), C.delete($)), e(m, b, F); } return Mx = v, Mx; } var Dx, cI; function ZCe() { if (cI) return Dx; cI = 1; var e = Pm(), t = Z7(), n = q$(), r = XCe(), o = ya(), a = ju(), i = J7(); function s(l, u, c, d, p) { l !== u && n(u, function(h, f) { if (p || (p = new e()), o(h)) r(l, u, f, c, s, d, p); else { var v = d ? d(i(l, f), h, f + "", l, u, p) : void 0; v === void 0 && (v = h), t(l, f, v); } }, a); } return Dx = s, Dx; } var Bx, dI; function JCe() { if (dI) return Bx; dI = 1; var e = Um(), t = qm(); function n(r) { return e(function(o, a) { var i = -1, s = a.length, l = s > 1 ? a[s - 1] : void 0, u = s > 2 ? a[2] : void 0; for (l = r.length > 3 && typeof l == "function" ? (s--, l) : void 0, u && t(a[0], a[1], u) && (l = s < 3 ? void 0 : l, s = 1), o = Object(o); ++i < s; ) { var c = a[i]; c && r(o, c, i, l); } return o; }); } return Bx = n, Bx; } var zx, pI; function QCe() { if (pI) return zx; pI = 1; var e = ZCe(), t = JCe(), n = t(function(r, o, a) { e(r, o, a); }); return zx = n, zx; } var jx, fI; function Q7() { if (fI) return jx; fI = 1; function e(t, n) { return t < n; } return jx = e, jx; } var Vx, hI; function e_e() { if (hI) return Vx; hI = 1; var e = Z$(), t = Q7(), n = Vu(); function r(o) { return o && o.length ? e(o, n, t) : void 0; } return Vx = r, Vx; } var Hx, vI; function t_e() { if (vI) return Hx; vI = 1; var e = Z$(), t = ys(), n = Q7(); function r(o, a) { return o && o.length ? e(o, t(a, 2), n) : void 0; } return Hx = r, Hx; } var Ux, gI; function n_e() { if (gI) return Ux; gI = 1; var e = qa(), t = function() { return e.Date.now(); }; return Ux = t, Ux; } var qx, mI; function r_e() { if (mI) return qx; mI = 1; var e = Rm(), t = Vm(), n = Nm(), r = ya(), o = fh(); function a(i, s, l, u) { if (!r(i)) return i; s = t(s, i); for (var c = -1, d = s.length, p = d - 1, h = i; h != null && ++c < d; ) { var f = o(s[c]), v = l; if (f === "__proto__" || f === "constructor" || f === "prototype") return i; if (c != p) { var m = h[f]; v = u ? u(m, f, h) : void 0, v === void 0 && (v = r(m) ? m : n(s[c + 1]) ? [] : {}); } e(h, f, v), h = h[f]; } return i; } return qx = a, qx; } var Kx, yI; function o_e() { if (yI) return Kx; yI = 1; var e = Hm(), t = r_e(), n = Vm(); function r(o, a, i) { for (var s = -1, l = a.length, u = {}; ++s < l; ) { var c = a[s], d = e(o, c); i(d, c) && t(u, n(c, o), d); } return u; } return Kx = r, Kx; } var Gx, bI; function a_e() { if (bI) return Gx; bI = 1; var e = o_e(), t = A7(); function n(r, o) { return e(r, o, function(a, i) { return t(r, i); }); } return Gx = n, Gx; } var Wx, wI; function i_e() { if (wI) return Wx; wI = 1; var e = X7(), t = B7(), n = z7(); function r(o) { return n(t(o, void 0, e), o + ""); } return Wx = r, Wx; } var Yx, xI; function s_e() { if (xI) return Yx; xI = 1; var e = a_e(), t = i_e(), n = t(function(r, o) { return r == null ? {} : e(r, o); }); return Yx = n, Yx; } var Xx, kI; function l_e() { if (kI) return Xx; kI = 1; var e = Math.ceil, t = Math.max; function n(r, o, a, i) { for (var s = -1, l = t(e((o - r) / (a || 1)), 0), u = Array(l); l--; ) u[i ? l : ++s] = r, r += a; return u; } return Xx = n, Xx; } var Zx, CI; function u_e() { if (CI) return Zx; CI = 1; var e = l_e(), t = qm(), n = Y7(); function r(o) { return function(a, i, s) { return s && typeof s != "number" && t(a, i, s) && (i = s = void 0), a = n(a), i === void 0 ? (i = a, a = 0) : i = n(i), s = s === void 0 ? a < i ? 1 : -1 : n(s), e(a, i, s, o); }; } return Zx = r, Zx; } var Jx, _I; function c_e() { if (_I) return Jx; _I = 1; var e = u_e(), t = e(); return Jx = t, Jx; } var Qx, SI; function d_e() { if (SI) return Qx; SI = 1; function e(t, n) { var r = t.length; for (t.sort(n); r--; ) t[r] = t[r].value; return t; } return Qx = e, Qx; } var ek, $I; function p_e() { if ($I) return ek; $I = 1; var e = Td(); function t(n, r) { if (n !== r) { var o = n !== void 0, a = n === null, i = n === n, s = e(n), l = r !== void 0, u = r === null, c = r === r, d = e(r); if (!u && !d && !s && n > r || s && l && c && !u && !d || a && l && c || !o && c || !i) return 1; if (!a && !s && !d && n < r || d && o && i && !a && !s || u && o && i || !l && i || !c) return -1; } return 0; } return ek = t, ek; } var tk, EI; function f_e() { if (EI) return tk; EI = 1; var e = p_e(); function t(n, r, o) { for (var a = -1, i = n.criteria, s = r.criteria, l = i.length, u = o.length; ++a < l; ) { var c = e(i[a], s[a]); if (c) { if (a >= u) return c; var d = o[a]; return c * (d == "desc" ? -1 : 1); } } return n.index - r.index; } return tk = t, tk; } var nk, OI; function h_e() { if (OI) return nk; OI = 1; var e = jm(), t = Hm(), n = ys(), r = N7(), o = d_e(), a = Mm(), i = f_e(), s = Vu(), l = rr(); function u(c, d, p) { d.length ? d = e(d, function(v) { return l(v) ? function(m) { return t(m, v.length === 1 ? v[0] : v); } : v; }) : d = [s]; var h = -1; d = e(d, a(n)); var f = r(c, function(v, m, g) { var b = e(d, function(x) { return x(v); }); return { criteria: b, index: ++h, value: v }; }); return o(f, function(v, m) { return i(v, m, p); }); } return nk = u, nk; } var rk, FI; function v_e() { if (FI) return rk; FI = 1; var e = Y$(), t = h_e(), n = Um(), r = qm(), o = n(function(a, i) { if (a == null) return []; var s = i.length; return s > 1 && r(a, i[0], i[1]) ? i = [] : s > 2 && r(i[0], i[1], i[2]) && (i = [i[0]]), t(a, e(i, 1), []); }); return rk = o, rk; } var ok, TI; function g_e() { if (TI) return ok; TI = 1; var e = F7(), t = 0; function n(r) { var o = ++t; return e(r) + o; } return ok = n, ok; } var ak, AI; function m_e() { if (AI) return ak; AI = 1; function e(t, n, r) { for (var o = -1, a = t.length, i = n.length, s = {}; ++o < a; ) { var l = o < i ? n[o] : void 0; r(s, t[o], l); } return s; } return ak = e, ak; } var ik, II; function y_e() { if (II) return ik; II = 1; var e = Rm(), t = m_e(); function n(r, o) { return t(r || [], o || [], e); } return ik = n, ik; } var sk, PI; function In() { if (PI) return sk; PI = 1; var e; if (typeof L$ == "function") try { e = { cloneDeep: LCe(), constant: U$(), defaults: RCe(), each: k7(), filter: P7(), find: VCe(), flatten: X7(), forEach: x7(), forIn: HCe(), has: L7(), isUndefined: R7(), last: UCe(), map: M7(), mapValues: qCe(), max: GCe(), merge: QCe(), min: e_e(), minBy: t_e(), now: n_e(), pick: s_e(), range: c_e(), reduce: D7(), sortBy: v_e(), uniqueId: g_e(), values: H7(), zipObject: y_e() }; } catch { } return e || (e = window._), sk = e, sk; } var lk, LI; function b_e() { if (LI) return lk; LI = 1, lk = e; function e() { var r = {}; r._next = r._prev = r, this._sentinel = r; } e.prototype.dequeue = function() { var r = this._sentinel, o = r._prev; if (o !== r) return t(o), o; }, e.prototype.enqueue = function(r) { var o = this._sentinel; r._prev && r._next && t(r), r._next = o._next, o._next._prev = r, o._next = r, r._prev = o; }, e.prototype.toString = function() { for (var r = [], o = this._sentinel, a = o._prev; a !== o; ) r.push(JSON.stringify(a, n)), a = a._prev; return "[" + r.join(", ") + "]"; }; function t(r) { r._prev._next = r._next, r._next._prev = r._prev, delete r._next, delete r._prev; } function n(r, o) { if (r !== "_next" && r !== "_prev") return o; } return lk; } var uk, RI; function w_e() { if (RI) return uk; RI = 1; var e = In(), t = Va().Graph, n = b_e(); uk = o; var r = e.constant(1); function o(u, c) { if (u.nodeCount() <= 1) return []; var d = s(u, c || r), p = a(d.graph, d.buckets, d.zeroIdx); return e.flatten(e.map(p, function(h) { return u.outEdges(h.v, h.w); }), !0); } function a(u, c, d) { for (var p = [], h = c[c.length - 1], f = c[0], v; u.nodeCount(); ) { for (; v = f.dequeue(); ) i(u, c, d, v); for (; v = h.dequeue(); ) i(u, c, d, v); if (u.nodeCount()) { for (var m = c.length - 2; m > 0; --m) if (v = c[m].dequeue(), v) { p = p.concat(i(u, c, d, v, !0)); break; } } } return p; } function i(u, c, d, p, h) { var f = h ? [] : void 0; return e.forEach(u.inEdges(p.v), function(v) { var m = u.edge(v), g = u.node(v.v); h && f.push({ v: v.v, w: v.w }), g.out -= m, l(c, d, g); }), e.forEach(u.outEdges(p.v), function(v) { var m = u.edge(v), g = v.w, b = u.node(g); b.in -= m, l(c, d, b); }), u.removeNode(p.v), f; } function s(u, c) { var d = new t(), p = 0, h = 0; e.forEach(u.nodes(), function(m) { d.setNode(m, { v: m, in: 0, out: 0 }); }), e.forEach(u.edges(), function(m) { var g = d.edge(m.v, m.w) || 0, b = c(m), x = g + b; d.setEdge(m.v, m.w, x), h = Math.max(h, d.node(m.v).out += b), p = Math.max(p, d.node(m.w).in += b); }); var f = e.range(h + p + 3).map(function() { return new n(); }), v = p + 1; return e.forEach(d.nodes(), function(m) { l(f, v, d.node(m)); }), { graph: d, buckets: f, zeroIdx: v }; } function l(u, c, d) { d.out ? d.in ? u[d.out - d.in + c].enqueue(d) : u[u.length - 1].enqueue(d) : u[0].enqueue(d); } return uk; } var ck, NI; function x_e() { if (NI) return ck; NI = 1; var e = In(), t = w_e(); ck = { run: n, undo: o }; function n(a) { var i = a.graph().acyclicer === "greedy" ? t(a, s(a)) : r(a); e.forEach(i, function(l) { var u = a.edge(l); a.removeEdge(l), u.forwardName = l.name, u.reversed = !0, a.setEdge(l.w, l.v, u, e.uniqueId("rev")); }); function s(l) { return function(u) { return l.edge(u).weight; }; } } function r(a) { var i = [], s = {}, l = {}; function u(c) { e.has(l, c) || (l[c] = !0, s[c] = !0, e.forEach(a.outEdges(c), function(d) { e.has(s, d.w) ? i.push(d) : u(d.w); }), delete s[c]); } return e.forEach(a.nodes(), u), i; } function o(a) { e.forEach(a.edges(), function(i) { var s = a.edge(i); if (s.reversed) { a.removeEdge(i); var l = s.forwardName; delete s.reversed, delete s.forwardName, a.setEdge(i.w, i.v, s, l); } }); } return ck; } var dk, MI; function wo() { if (MI) return dk; MI = 1; var e = In(), t = Va().Graph; dk = { addDummyNode: n, simplify: r, asNonCompoundGraph: o, successorWeights: a, predecessorWeights: i, intersectRect: s, buildLayerMatrix: l, normalizeRanks: u, removeEmptyRanks: c, addBorderNode: d, maxRank: p, partition: h, time: f, notime: v }; function n(m, g, b, x) { var w; do w = e.uniqueId(x); while (m.hasNode(w)); return b.dummy = g, m.setNode(w, b), w; } function r(m) { var g = new t().setGraph(m.graph()); return e.forEach(m.nodes(), function(b) { g.setNode(b, m.node(b)); }), e.forEach(m.edges(), function(b) { var x = g.edge(b.v, b.w) || { weight: 0, minlen: 1 }, w = m.edge(b); g.setEdge(b.v, b.w, { weight: x.weight + w.weight, minlen: Math.max(x.minlen, w.minlen) }); }), g; } function o(m) { var g = new t({ multigraph: m.isMultigraph() }).setGraph(m.graph()); return e.forEach(m.nodes(), function(b) { m.children(b).length || g.setNode(b, m.node(b)); }), e.forEach(m.edges(), function(b) { g.setEdge(b, m.edge(b)); }), g; } function a(m) { var g = e.map(m.nodes(), function(b) { var x = {}; return e.forEach(m.outEdges(b), function(w) { x[w.w] = (x[w.w] || 0) + m.edge(w).weight; }), x; }); return e.zipObject(m.nodes(), g); } function i(m) { var g = e.map(m.nodes(), function(b) { var x = {}; return e.forEach(m.inEdges(b), function(w) { x[w.v] = (x[w.v] || 0) + m.edge(w).weight; }), x; }); return e.zipObject(m.nodes(), g); } function s(m, g) { var b = m.x, x = m.y, w = g.x - b, k = g.y - x, C = m.width / 2, _ = m.height / 2; if (!w && !k) throw new Error("Not possible to find intersection inside of the rectangle"); var $, O; return Math.abs(k) * C > Math.abs(w) * _ ? (k < 0 && (_ = -_), $ = _ * w / k, O = _) : (w < 0 && (C = -C), $ = C, O = C * k / w), { x: b + $, y: x + O }; } function l(m) { var g = e.map(e.range(p(m) + 1), function() { return []; }); return e.forEach(m.nodes(), function(b) { var x = m.node(b), w = x.rank; e.isUndefined(w) || (g[w][x.order] = b); }), g; } function u(m) { var g = e.min(e.map(m.nodes(), function(b) { return m.node(b).rank; })); e.forEach(m.nodes(), function(b) { var x = m.node(b); e.has(x, "rank") && (x.rank -= g); }); } function c(m) { var g = e.min(e.map(m.nodes(), function(k) { return m.node(k).rank; })), b = []; e.forEach(m.nodes(), function(k) { var C = m.node(k).rank - g; b[C] || (b[C] = []), b[C].push(k); }); var x = 0, w = m.graph().nodeRankFactor; e.forEach(b, function(k, C) { e.isUndefined(k) && C % w !== 0 ? --x : x && e.forEach(k, function(_) { m.node(_).rank += x; }); }); } function d(m, g, b, x) { var w = { width: 0, height: 0 }; return arguments.length >= 4 && (w.rank = b, w.order = x), n(m, "border", w, g); } function p(m) { return e.max(e.map(m.nodes(), function(g) { var b = m.node(g).rank; if (!e.isUndefined(b)) return b; })); } function h(m, g) { var b = { lhs: [], rhs: [] }; return e.forEach(m, function(x) { g(x) ? b.lhs.push(x) : b.rhs.push(x); }), b; } function f(m, g) { var b = e.now(); try { return g(); } finally { console.log(m + " time: " + (e.now() - b) + "ms"); } } function v(m, g) { return g(); } return dk; } var pk, DI; function k_e() { if (DI) return pk; DI = 1; var e = In(), t = wo(); pk = { run: n, undo: o }; function n(a) { a.graph().dummyChains = [], e.forEach(a.edges(), function(i) { r(a, i); }); } function r(a, i) { var s = i.v, l = a.node(s).rank, u = i.w, c = a.node(u).rank, d = i.name, p = a.edge(i), h = p.labelRank; if (c !== l + 1) { a.removeEdge(i); var f, v, m; for (m = 0, ++l; l < c; ++m, ++l) p.points = [], v = { width: 0, height: 0, edgeLabel: p, edgeObj: i, rank: l }, f = t.addDummyNode(a, "edge", v, "_d"), l === h && (v.width = p.width, v.height = p.height, v.dummy = "edge-label", v.labelpos = p.labelpos), a.setEdge(s, f, { weight: p.weight }, d), m === 0 && a.graph().dummyChains.push(f), s = f; a.setEdge(s, u, { weight: p.weight }, d); } } function o(a) { e.forEach(a.graph().dummyChains, function(i) { var s = a.node(i), l = s.edgeLabel, u; for (a.setEdge(s.edgeObj, l); s.dummy; ) u = a.successors(i)[0], a.removeNode(i), l.points.push({ x: s.x, y: s.y }), s.dummy === "edge-label" && (l.x = s.x, l.y = s.y, l.width = s.width, l.height = s.height), i = u, s = a.node(i); }); } return pk; } var fk, BI; function Yg() { if (BI) return fk; BI = 1; var e = In(); fk = { longestPath: t, slack: n }; function t(r) { var o = {}; function a(i) { var s = r.node(i); if (e.has(o, i)) return s.rank; o[i] = !0; var l = e.min(e.map(r.outEdges(i), function(u) { return a(u.w) - r.edge(u).minlen; })); return (l === Number.POSITIVE_INFINITY || // return value of _.map([]) for Lodash 3 l === void 0 || // return value of _.map([]) for Lodash 4 l === null) && (l = 0), s.rank = l; } e.forEach(r.sources(), a); } function n(r, o) { return r.node(o.w).rank - r.node(o.v).rank - r.edge(o).minlen; } return fk; } var hk, zI; function ej() { if (zI) return hk; zI = 1; var e = In(), t = Va().Graph, n = Yg().slack; hk = r; function r(s) { var l = new t({ directed: !1 }), u = s.nodes()[0], c = s.nodeCount(); l.setNode(u, {}); for (var d, p; o(l, s) < c; ) d = a(l, s), p = l.hasNode(d.v) ? n(s, d) : -n(s, d), i(l, s, p); return l; } function o(s, l) { function u(c) { e.forEach(l.nodeEdges(c), function(d) { var p = d.v, h = c === p ? d.w : p; !s.hasNode(h) && !n(l, d) && (s.setNode(h, {}), s.setEdge(c, h, {}), u(h)); }); } return e.forEach(s.nodes(), u), s.nodeCount(); } function a(s, l) { return e.minBy(l.edges(), function(u) { if (s.hasNode(u.v) !== s.hasNode(u.w)) return n(l, u); }); } function i(s, l, u) { e.forEach(s.nodes(), function(c) { l.node(c).rank += u; }); } return hk; } var vk, jI; function C_e() { if (jI) return vk; jI = 1; var e = In(), t = ej(), n = Yg().slack, r = Yg().longestPath, o = Va().alg.preorder, a = Va().alg.postorder, i = wo().simplify; vk = s, s.initLowLimValues = d, s.initCutValues = l, s.calcCutValue = c, s.leaveEdge = h, s.enterEdge = f, s.exchangeEdges = v; function s(x) { x = i(x), r(x); var w = t(x); d(w), l(w, x); for (var k, C; k = h(w); ) C = f(w, x, k), v(w, x, k, C); } function l(x, w) { var k = a(x, x.nodes()); k = k.slice(0, k.length - 1), e.forEach(k, function(C) { u(x, w, C); }); } function u(x, w, k) { var C = x.node(k), _ = C.parent; x.edge(k, _).cutvalue = c(x, w, k); } function c(x, w, k) { var C = x.node(k), _ = C.parent, $ = !0, O = w.edge(k, _), F = 0; return O || ($ = !1, O = w.edge(_, k)), F = O.weight, e.forEach(w.nodeEdges(k), function(A) { var T = A.v === k, R = T ? A.w : A.v; if (R !== _) { var M = T === $, j = w.edge(A).weight; if (F += M ? j : -j, g(x, k, R)) { var P = x.edge(k, R).cutvalue; F += M ? -P : P; } } }), F; } function d(x, w) { arguments.length < 2 && (w = x.nodes()[0]), p(x, {}, 1, w); } function p(x, w, k, C, _) { var $ = k, O = x.node(C); return w[C] = !0, e.forEach(x.neighbors(C), function(F) { e.has(w, F) || (k = p(x, w, k, F, C)); }), O.low = $, O.lim = k++, _ ? O.parent = _ : delete O.parent, k; } function h(x) { return e.find(x.edges(), function(w) { return x.edge(w).cutvalue < 0; }); } function f(x, w, k) { var C = k.v, _ = k.w; w.hasEdge(C, _) || (C = k.w, _ = k.v); var $ = x.node(C), O = x.node(_), F = $, A = !1; $.lim > O.lim && (F = O, A = !0); var T = e.filter(w.edges(), function(R) { return A === b(x, x.node(R.v), F) && A !== b(x, x.node(R.w), F); }); return e.minBy(T, function(R) { return n(w, R); }); } function v(x, w, k, C) { var _ = k.v, $ = k.w; x.removeEdge(_, $), x.setEdge(C.v, C.w, {}), d(x), l(x, w), m(x, w); } function m(x, w) { var k = e.find(x.nodes(), function(_) { return !w.node(_).parent; }), C = o(x, k); C = C.slice(1), e.forEach(C, function(_) { var $ = x.node(_).parent, O = w.edge(_, $), F = !1; O || (O = w.edge($, _), F = !0), w.node(_).rank = w.node($).rank + (F ? O.minlen : -O.minlen); }); } function g(x, w, k) { return x.hasEdge(w, k); } function b(x, w, k) { return k.low <= w.lim && w.lim <= k.lim; } return vk; } var gk, VI; function __e() { if (VI) return gk; VI = 1; var e = Yg(), t = e.longestPath, n = ej(), r = C_e(); gk = o; function o(l) { switch (l.graph().ranker) { case "network-simplex": s(l); break; case "tight-tree": i(l); break; case "longest-path": a(l); break; default: s(l); } } var a = t; function i(l) { t(l), n(l); } function s(l) { r(l); } return gk; } var mk, HI; function S_e() { if (HI) return mk; HI = 1; var e = In(); mk = t; function t(o) { var a = r(o); e.forEach(o.graph().dummyChains, function(i) { for (var s = o.node(i), l = s.edgeObj, u = n(o, a, l.v, l.w), c = u.path, d = u.lca, p = 0, h = c[p], f = !0; i !== l.w; ) { if (s = o.node(i), f) { for (; (h = c[p]) !== d && o.node(h).maxRank < s.rank; ) p++; h === d && (f = !1); } if (!f) { for (; p < c.length - 1 && o.node(h = c[p + 1]).minRank <= s.rank; ) p++; h = c[p]; } o.setParent(i, h), i = o.successors(i)[0]; } }); } function n(o, a, i, s) { var l = [], u = [], c = Math.min(a[i].low, a[s].low), d = Math.max(a[i].lim, a[s].lim), p, h; p = i; do p = o.parent(p), l.push(p); while (p && (a[p].low > c || d > a[p].lim)); for (h = p, p = s; (p = o.parent(p)) !== h; ) u.push(p); return { path: l.concat(u.reverse()), lca: h }; } function r(o) { var a = {}, i = 0; function s(l) { var u = i; e.forEach(o.children(l), s), a[l] = { low: u, lim: i++ }; } return e.forEach(o.children(), s), a; } return mk; } var yk, UI; function $_e() { if (UI) return yk; UI = 1; var e = In(), t = wo(); yk = { run: n, cleanup: i }; function n(s) { var l = t.addDummyNode(s, "root", {}, "_root"), u = o(s), c = e.max(e.values(u)) - 1, d = 2 * c + 1; s.graph().nestingRoot = l, e.forEach(s.edges(), function(h) { s.edge(h).minlen *= d; }); var p = a(s) + 1; e.forEach(s.children(), function(h) { r(s, l, d, p, c, u, h); }), s.graph().nodeRankFactor = d; } function r(s, l, u, c, d, p, h) { var f = s.children(h); if (!f.length) { h !== l && s.setEdge(l, h, { weight: 0, minlen: u }); return; } var v = t.addBorderNode(s, "_bt"), m = t.addBorderNode(s, "_bb"), g = s.node(h); s.setParent(v, h), g.borderTop = v, s.setParent(m, h), g.borderBottom = m, e.forEach(f, function(b) { r(s, l, u, c, d, p, b); var x = s.node(b), w = x.borderTop ? x.borderTop : b, k = x.borderBottom ? x.borderBottom : b, C = x.borderTop ? c : 2 * c, _ = w !== k ? 1 : d - p[h] + 1; s.setEdge(v, w, { weight: C, minlen: _, nestingEdge: !0 }), s.setEdge(k, m, { weight: C, minlen: _, nestingEdge: !0 }); }), s.parent(h) || s.setEdge(l, v, { weight: 0, minlen: d + p[h] }); } function o(s) { var l = {}; function u(c, d) { var p = s.children(c); p && p.length && e.forEach(p, function(h) { u(h, d + 1); }), l[c] = d; } return e.forEach(s.children(), function(c) { u(c, 1); }), l; } function a(s) { return e.reduce(s.edges(), function(l, u) { return l + s.edge(u).weight; }, 0); } function i(s) { var l = s.graph(); s.removeNode(l.nestingRoot), delete l.nestingRoot, e.forEach(s.edges(), function(u) { var c = s.edge(u); c.nestingEdge && s.removeEdge(u); }); } return yk; } var bk, qI; function E_e() { if (qI) return bk; qI = 1; var e = In(), t = wo(); bk = n; function n(o) { function a(i) { var s = o.children(i), l = o.node(i); if (s.length && e.forEach(s, a), e.has(l, "minRank")) { l.borderLeft = [], l.borderRight = []; for (var u = l.minRank, c = l.maxRank + 1; u < c; ++u) r(o, "borderLeft", "_bl", i, l, u), r(o, "borderRight", "_br", i, l, u); } } e.forEach(o.children(), a); } function r(o, a, i, s, l, u) { var c = { width: 0, height: 0, rank: u, borderType: a }, d = l[a][u - 1], p = t.addDummyNode(o, "border", c, i); l[a][u] = p, o.setParent(p, s), d && o.setEdge(d, p, { weight: 1 }); } return bk; } var wk, KI; function O_e() { if (KI) return wk; KI = 1; var e = In(); wk = { adjust: t, undo: n }; function t(u) { var c = u.graph().rankdir.toLowerCase(); (c === "lr" || c === "rl") && r(u); } function n(u) { var c = u.graph().rankdir.toLowerCase(); (c === "bt" || c === "rl") && a(u), (c === "lr" || c === "rl") && (s(u), r(u)); } function r(u) { e.forEach(u.nodes(), function(c) { o(u.node(c)); }), e.forEach(u.edges(), function(c) { o(u.edge(c)); }); } function o(u) { var c = u.width; u.width = u.height, u.height = c; } function a(u) { e.forEach(u.nodes(), function(c) { i(u.node(c)); }), e.forEach(u.edges(), function(c) { var d = u.edge(c); e.forEach(d.points, i), e.has(d, "y") && i(d); }); } function i(u) { u.y = -u.y; } function s(u) { e.forEach(u.nodes(), function(c) { l(u.node(c)); }), e.forEach(u.edges(), function(c) { var d = u.edge(c); e.forEach(d.points, l), e.has(d, "x") && l(d); }); } function l(u) { var c = u.x; u.x = u.y, u.y = c; } return wk; } var xk, GI; function F_e() { if (GI) return xk; GI = 1; var e = In(); xk = t; function t(n) { var r = {}, o = e.filter(n.nodes(), function(u) { return !n.children(u).length; }), a = e.max(e.map(o, function(u) { return n.node(u).rank; })), i = e.map(e.range(a + 1), function() { return []; }); function s(u) { if (!e.has(r, u)) { r[u] = !0; var c = n.node(u); i[c.rank].push(u), e.forEach(n.successors(u), s); } } var l = e.sortBy(o, function(u) { return n.node(u).rank; }); return e.forEach(l, s), i; } return xk; } var kk, WI; function T_e() { if (WI) return kk; WI = 1; var e = In(); kk = t; function t(r, o) { for (var a = 0, i = 1; i < o.length; ++i) a += n(r, o[i - 1], o[i]); return a; } function n(r, o, a) { for (var i = e.zipObject( a, e.map(a, function(p, h) { return h; }) ), s = e.flatten(e.map(o, function(p) { return e.sortBy(e.map(r.outEdges(p), function(h) { return { pos: i[h.w], weight: r.edge(h).weight }; }), "pos"); }), !0), l = 1; l < a.length; ) l <<= 1; var u = 2 * l - 1; l -= 1; var c = e.map(new Array(u), function() { return 0; }), d = 0; return e.forEach(s.forEach(function(p) { var h = p.pos + l; c[h] += p.weight; for (var f = 0; h > 0; ) h % 2 && (f += c[h + 1]), h = h - 1 >> 1, c[h] += p.weight; d += p.weight * f; })), d; } return kk; } var Ck, YI; function A_e() { if (YI) return Ck; YI = 1; var e = In(); Ck = t; function t(n, r) { return e.map(r, function(o) { var a = n.inEdges(o); if (a.length) { var i = e.reduce(a, function(s, l) { var u = n.edge(l), c = n.node(l.v); return { sum: s.sum + u.weight * c.order, weight: s.weight + u.weight }; }, { sum: 0, weight: 0 }); return { v: o, barycenter: i.sum / i.weight, weight: i.weight }; } else return { v: o }; }); } return Ck; } var _k, XI; function I_e() { if (XI) return _k; XI = 1; var e = In(); _k = t; function t(o, a) { var i = {}; e.forEach(o, function(l, u) { var c = i[l.v] = { indegree: 0, in: [], out: [], vs: [l.v], i: u }; e.isUndefined(l.barycenter) || (c.barycenter = l.barycenter, c.weight = l.weight); }), e.forEach(a.edges(), function(l) { var u = i[l.v], c = i[l.w]; !e.isUndefined(u) && !e.isUndefined(c) && (c.indegree++, u.out.push(i[l.w])); }); var s = e.filter(i, function(l) { return !l.indegree; }); return n(s); } function n(o) { var a = []; function i(u) { return function(c) { c.merged || (e.isUndefined(c.barycenter) || e.isUndefined(u.barycenter) || c.barycenter >= u.barycenter) && r(u, c); }; } function s(u) { return function(c) { c.in.push(u), --c.indegree === 0 && o.push(c); }; } for (; o.length; ) { var l = o.pop(); a.push(l), e.forEach(l.in.reverse(), i(l)), e.forEach(l.out, s(l)); } return e.map( e.filter(a, function(u) { return !u.merged; }), function(u) { return e.pick(u, ["vs", "i", "barycenter", "weight"]); } ); } function r(o, a) { var i = 0, s = 0; o.weight && (i += o.barycenter * o.weight, s += o.weight), a.weight && (i += a.barycenter * a.weight, s += a.weight), o.vs = a.vs.concat(o.vs), o.barycenter = i / s, o.weight = s, o.i = Math.min(a.i, o.i), a.merged = !0; } return _k; } var Sk, ZI; function P_e() { if (ZI) return Sk; ZI = 1; var e = In(), t = wo(); Sk = n; function n(a, i) { var s = t.partition(a, function(v) { return e.has(v, "barycenter"); }), l = s.lhs, u = e.sortBy(s.rhs, function(v) { return -v.i; }), c = [], d = 0, p = 0, h = 0; l.sort(o(!!i)), h = r(c, u, h), e.forEach(l, function(v) { h += v.vs.length, c.push(v.vs), d += v.barycenter * v.weight, p += v.weight, h = r(c, u, h); }); var f = { vs: e.flatten(c, !0) }; return p && (f.barycenter = d / p, f.weight = p), f; } function r(a, i, s) { for (var l; i.length && (l = e.last(i)).i <= s; ) i.pop(), a.push(l.vs), s++; return s; } function o(a) { return function(i, s) { return i.barycenter < s.barycenter ? -1 : i.barycenter > s.barycenter ? 1 : a ? s.i - i.i : i.i - s.i; }; } return Sk; } var $k, JI; function L_e() { if (JI) return $k; JI = 1; var e = In(), t = A_e(), n = I_e(), r = P_e(); $k = o; function o(s, l, u, c) { var d = s.children(l), p = s.node(l), h = p ? p.borderLeft : void 0, f = p ? p.borderRight : void 0, v = {}; h && (d = e.filter(d, function(k) { return k !== h && k !== f; })); var m = t(s, d); e.forEach(m, function(k) { if (s.children(k.v).length) { var C = o(s, k.v, u, c); v[k.v] = C, e.has(C, "barycenter") && i(k, C); } }); var g = n(m, u); a(g, v); var b = r(g, c); if (h && (b.vs = e.flatten([h, b.vs, f], !0), s.predecessors(h).length)) { var x = s.node(s.predecessors(h)[0]), w = s.node(s.predecessors(f)[0]); e.has(b, "barycenter") || (b.barycenter = 0, b.weight = 0), b.barycenter = (b.barycenter * b.weight + x.order + w.order) / (b.weight + 2), b.weight += 2; } return b; } function a(s, l) { e.forEach(s, function(u) { u.vs = e.flatten(u.vs.map(function(c) { return l[c] ? l[c].vs : c; }), !0); }); } function i(s, l) { e.isUndefined(s.barycenter) ? (s.barycenter = l.barycenter, s.weight = l.weight) : (s.barycenter = (s.barycenter * s.weight + l.barycenter * l.weight) / (s.weight + l.weight), s.weight += l.weight); } return $k; } var Ek, QI; function R_e() { if (QI) return Ek; QI = 1; var e = In(), t = Va().Graph; Ek = n; function n(o, a, i) { var s = r(o), l = new t({ compound: !0 }).setGraph({ root: s }).setDefaultNodeLabel(function(u) { return o.node(u); }); return e.forEach(o.nodes(), function(u) { var c = o.node(u), d = o.parent(u); (c.rank === a || c.minRank <= a && a <= c.maxRank) && (l.setNode(u), l.setParent(u, d || s), e.forEach(o[i](u), function(p) { var h = p.v === u ? p.w : p.v, f = l.edge(h, u), v = e.isUndefined(f) ? 0 : f.weight; l.setEdge(h, u, { weight: o.edge(p).weight + v }); }), e.has(c, "minRank") && l.setNode(u, { borderLeft: c.borderLeft[a], borderRight: c.borderRight[a] })); }), l; } function r(o) { for (var a; o.hasNode(a = e.uniqueId("_root")); ) ; return a; } return Ek; } var Ok, eP; function N_e() { if (eP) return Ok; eP = 1; var e = In(); Ok = t; function t(n, r, o) { var a = {}, i; e.forEach(o, function(s) { for (var l = n.parent(s), u, c; l; ) { if (u = n.parent(l), u ? (c = a[u], a[u] = l) : (c = i, i = l), c && c !== l) { r.setEdge(c, l); return; } l = u; } }); } return Ok; } var Fk, tP; function M_e() { if (tP) return Fk; tP = 1; var e = In(), t = F_e(), n = T_e(), r = L_e(), o = R_e(), a = N_e(), i = Va().Graph, s = wo(); Fk = l; function l(p) { var h = s.maxRank(p), f = u(p, e.range(1, h + 1), "inEdges"), v = u(p, e.range(h - 1, -1, -1), "outEdges"), m = t(p); d(p, m); for (var g = Number.POSITIVE_INFINITY, b, x = 0, w = 0; w < 4; ++x, ++w) { c(x % 2 ? f : v, x % 4 >= 2), m = s.buildLayerMatrix(p); var k = n(p, m); k < g && (w = 0, b = e.cloneDeep(m), g = k); } d(p, b); } function u(p, h, f) { return e.map(h, function(v) { return o(p, v, f); }); } function c(p, h) { var f = new i(); e.forEach(p, function(v) { var m = v.graph().root, g = r(v, m, f, h); e.forEach(g.vs, function(b, x) { v.node(b).order = x; }), a(v, f, g.vs); }); } function d(p, h) { e.forEach(h, function(f) { e.forEach(f, function(v, m) { p.node(v).order = m; }); }); } return Fk; } var Tk, nP; function D_e() { if (nP) return Tk; nP = 1; var e = In(), t = Va().Graph, n = wo(); Tk = { positionX: f, findType1Conflicts: r, findType2Conflicts: o, addConflict: i, hasConflict: s, verticalAlignment: l, horizontalCompaction: u, alignCoordinates: p, findSmallestWidthAlignment: d, balance: h }; function r(g, b) { var x = {}; function w(k, C) { var _ = 0, $ = 0, O = k.length, F = e.last(C); return e.forEach(C, function(A, T) { var R = a(g, A), M = R ? g.node(R).order : O; (R || A === F) && (e.forEach(C.slice($, T + 1), function(j) { e.forEach(g.predecessors(j), function(P) { var V = g.node(P), U = V.order; (U < _ || M < U) && !(V.dummy && g.node(j).dummy) && i(x, P, j); }); }), $ = T + 1, _ = M); }), C; } return e.reduce(b, w), x; } function o(g, b) { var x = {}; function w(C, _, $, O, F) { var A; e.forEach(e.range(_, $), function(T) { A = C[T], g.node(A).dummy && e.forEach(g.predecessors(A), function(R) { var M = g.node(R); M.dummy && (M.order < O || M.order > F) && i(x, R, A); }); }); } function k(C, _) { var $ = -1, O, F = 0; return e.forEach(_, function(A, T) { if (g.node(A).dummy === "border") { var R = g.predecessors(A); R.length && (O = g.node(R[0]).order, w(_, F, T, $, O), F = T, $ = O); } w(_, F, _.length, O, C.length); }), _; } return e.reduce(b, k), x; } function a(g, b) { if (g.node(b).dummy) return e.find(g.predecessors(b), function(x) { return g.node(x).dummy; }); } function i(g, b, x) { if (b > x) { var w = b; b = x, x = w; } var k = g[b]; k || (g[b] = k = {}), k[x] = !0; } function s(g, b, x) { if (b > x) { var w = b; b = x, x = w; } return e.has(g[b], x); } function l(g, b, x, w) { var k = {}, C = {}, _ = {}; return e.forEach(b, function($) { e.forEach($, function(O, F) { k[O] = O, C[O] = O, _[O] = F; }); }), e.forEach(b, function($) { var O = -1; e.forEach($, function(F) { var A = w(F); if (A.length) { A = e.sortBy(A, function(P) { return _[P]; }); for (var T = (A.length - 1) / 2, R = Math.floor(T), M = Math.ceil(T); R <= M; ++R) { var j = A[R]; C[F] === F && O < _[j] && !s(x, F, j) && (C[j] = F, C[F] = k[F] = k[j], O = _[j]); } } }); }), { root: k, align: C }; } function u(g, b, x, w, k) { var C = {}, _ = c(g, b, x, k), $ = k ? "borderLeft" : "borderRight"; function O(T, R) { for (var M = _.nodes(), j = M.pop(), P = {}; j; ) P[j] ? T(j) : (P[j] = !0, M.push(j), M = M.concat(R(j))), j = M.pop(); } function F(T) { C[T] = _.inEdges(T).reduce(function(R, M) { return Math.max(R, C[M.v] + _.edge(M)); }, 0); } function A(T) { var R = _.outEdges(T).reduce(function(j, P) { return Math.min(j, C[P.w] - _.edge(P)); }, Number.POSITIVE_INFINITY), M = g.node(T); R !== Number.POSITIVE_INFINITY && M.borderType !== $ && (C[T] = Math.max(C[T], R)); } return O(F, _.predecessors.bind(_)), O(A, _.successors.bind(_)), e.forEach(w, function(T) { C[T] = C[x[T]]; }), C; } function c(g, b, x, w) { var k = new t(), C = g.graph(), _ = v(C.nodesep, C.edgesep, w); return e.forEach(b, function($) { var O; e.forEach($, function(F) { var A = x[F]; if (k.setNode(A), O) { var T = x[O], R = k.edge(T, A); k.setEdge(T, A, Math.max(_(g, F, O), R || 0)); } O = F; }); }), k; } function d(g, b) { return e.minBy(e.values(b), function(x) { var w = Number.NEGATIVE_INFINITY, k = Number.POSITIVE_INFINITY; return e.forIn(x, function(C, _) { var $ = m(g, _) / 2; w = Math.max(C + $, w), k = Math.min(C - $, k); }), w - k; }); } function p(g, b) { var x = e.values(b), w = e.min(x), k = e.max(x); e.forEach(["u", "d"], function(C) { e.forEach(["l", "r"], function(_) { var $ = C + _, O = g[$], F; if (O !== b) { var A = e.values(O); F = _ === "l" ? w - e.min(A) : k - e.max(A), F && (g[$] = e.mapValues(O, function(T) { return T + F; })); } }); }); } function h(g, b) { return e.mapValues(g.ul, function(x, w) { if (b) return g[b.toLowerCase()][w]; var k = e.sortBy(e.map(g, w)); return (k[1] + k[2]) / 2; }); } function f(g) { var b = n.buildLayerMatrix(g), x = e.merge( r(g, b), o(g, b) ), w = {}, k; e.forEach(["u", "d"], function(_) { k = _ === "u" ? b : e.values(b).reverse(), e.forEach(["l", "r"], function($) { $ === "r" && (k = e.map(k, function(T) { return e.values(T).reverse(); })); var O = (_ === "u" ? g.predecessors : g.successors).bind(g), F = l(g, k, x, O), A = u( g, k, F.root, F.align, $ === "r" ); $ === "r" && (A = e.mapValues(A, function(T) { return -T; })), w[_ + $] = A; }); }); var C = d(g, w); return p(w, C), h(w, g.graph().align); } function v(g, b, x) { return function(w, k, C) { var _ = w.node(k), $ = w.node(C), O = 0, F; if (O += _.width / 2, e.has(_, "labelpos")) switch (_.labelpos.toLowerCase()) { case "l": F = -_.width / 2; break; case "r": F = _.width / 2; break; } if (F && (O += x ? F : -F), F = 0, O += (_.dummy ? b : g) / 2, O += ($.dummy ? b : g) / 2, O += $.width / 2, e.has($, "labelpos")) switch ($.labelpos.toLowerCase()) { case "l": F = $.width / 2; break; case "r": F = -$.width / 2; break; } return F && (O += x ? F : -F), F = 0, O; }; } function m(g, b) { return g.node(b).width; } return Tk; } var Ak, rP; function B_e() { if (rP) return Ak; rP = 1; var e = In(), t = wo(), n = D_e().positionX; Ak = r; function r(a) { a = t.asNonCompoundGraph(a), o(a), e.forEach(n(a), function(i, s) { a.node(s).x = i; }); } function o(a) { var i = t.buildLayerMatrix(a), s = a.graph().ranksep, l = 0; e.forEach(i, function(u) { var c = e.max(e.map(u, function(d) { return a.node(d).height; })); e.forEach(u, function(d) { a.node(d).y = l + c / 2; }), l += c + s; }); } return Ak; } var Ik, oP; function z_e() { if (oP) return Ik; oP = 1; var e = In(), t = x_e(), n = k_e(), r = __e(), o = wo().normalizeRanks, a = S_e(), i = wo().removeEmptyRanks, s = $_e(), l = E_e(), u = O_e(), c = M_e(), d = B_e(), p = wo(), h = Va().Graph; Ik = f; function f(te, oe) { var ne = oe && oe.debugTiming ? p.time : p.notime; ne("layout", function() { var ee = ne(" buildLayoutGraph", function() { return O(te); }); ne(" runLayout", function() { v(ee, ne); }), ne(" updateInputGraph", function() { m(te, ee); }); }); } function v(te, oe) { oe(" makeSpaceForEdgeLabels", function() { F(te); }), oe(" removeSelfEdges", function() { G(te); }), oe(" acyclic", function() { t.run(te); }), oe(" nestingGraph.run", function() { s.run(te); }), oe(" rank", function() { r(p.asNonCompoundGraph(te)); }), oe(" injectEdgeLabelProxies", function() { A(te); }), oe(" removeEmptyRanks", function() { i(te); }), oe(" nestingGraph.cleanup", function() { s.cleanup(te); }), oe(" normalizeRanks", function() { o(te); }), oe(" assignRankMinMax", function() { T(te); }), oe(" removeEdgeLabelProxies", function() { R(te); }), oe(" normalize.run", function() { n.run(te); }), oe(" parentDummyChains", function() { a(te); }), oe(" addBorderSegments", function() { l(te); }), oe(" order", function() { c(te); }), oe(" insertSelfEdges", function() { se(te); }), oe(" adjustCoordinateSystem", function() { u.adjust(te); }), oe(" position", function() { d(te); }), oe(" positionSelfEdges", function() { ae(te); }), oe(" removeBorderNodes", function() { U(te); }), oe(" normalize.undo", function() { n.undo(te); }), oe(" fixupEdgeLabelCoords", function() { P(te); }), oe(" undoCoordinateSystem", function() { u.undo(te); }), oe(" translateGraph", function() { M(te); }), oe(" assignNodeIntersects", function() { j(te); }), oe(" reversePoints", function() { V(te); }), oe(" acyclic.undo", function() { t.undo(te); }); } function m(te, oe) { e.forEach(te.nodes(), function(ne) { var ee = te.node(ne), Z = oe.node(ne); ee && (ee.x = Z.x, ee.y = Z.y, oe.children(ne).length && (ee.width = Z.width, ee.height = Z.height)); }), e.forEach(te.edges(), function(ne) { var ee = te.edge(ne), Z = oe.edge(ne); ee.points = Z.points, e.has(Z, "x") && (ee.x = Z.x, ee.y = Z.y); }), te.graph().width = oe.graph().width, te.graph().height = oe.graph().height; } var g = ["nodesep", "edgesep", "ranksep", "marginx", "marginy"], b = { ranksep: 50, edgesep: 20, nodesep: 50, rankdir: "tb" }, x = ["acyclicer", "ranker", "rankdir", "align"], w = ["width", "height"], k = { width: 0, height: 0 }, C = ["minlen", "weight", "width", "height", "labeloffset"], _ = { minlen: 1, weight: 1, width: 0, height: 0, labeloffset: 10, labelpos: "r" }, $ = ["labelpos"]; function O(te) { var oe = new h({ multigraph: !0, compound: !0 }), ne = me(te.graph()); return oe.setGraph(e.merge( {}, b, de(ne, g), e.pick(ne, x) )), e.forEach(te.nodes(), function(ee) { var Z = me(te.node(ee)); oe.setNode(ee, e.defaults(de(Z, w), k)), oe.setParent(ee, te.parent(ee)); }), e.forEach(te.edges(), function(ee) { var Z = me(te.edge(ee)); oe.setEdge(ee, e.merge( {}, _, de(Z, C), e.pick(Z, $) )); }), oe; } function F(te) { var oe = te.graph(); oe.ranksep /= 2, e.forEach(te.edges(), function(ne) { var ee = te.edge(ne); ee.minlen *= 2, ee.labelpos.toLowerCase() !== "c" && (oe.rankdir === "TB" || oe.rankdir === "BT" ? ee.width += ee.labeloffset : ee.height += ee.labeloffset); }); } function A(te) { e.forEach(te.edges(), function(oe) { var ne = te.edge(oe); if (ne.width && ne.height) { var ee = te.node(oe.v), Z = te.node(oe.w), le = { rank: (Z.rank - ee.rank) / 2 + ee.rank, e: oe }; p.addDummyNode(te, "edge-proxy", le, "_ep"); } }); } function T(te) { var oe = 0; e.forEach(te.nodes(), function(ne) { var ee = te.node(ne); ee.borderTop && (ee.minRank = te.node(ee.borderTop).rank, ee.maxRank = te.node(ee.borderBottom).rank, oe = e.max(oe, ee.maxRank)); }), te.graph().maxRank = oe; } function R(te) { e.forEach(te.nodes(), function(oe) { var ne = te.node(oe); ne.dummy === "edge-proxy" && (te.edge(ne.e).labelRank = ne.rank, te.removeNode(oe)); }); } function M(te) { var oe = Number.POSITIVE_INFINITY, ne = 0, ee = Number.POSITIVE_INFINITY, Z = 0, le = te.graph(), pe = le.marginx || 0, ke = le.marginy || 0; function Ne(De) { var _e = De.x, Fe = De.y, Ie = De.width, Ae = De.height; oe = Math.min(oe, _e - Ie / 2), ne = Math.max(ne, _e + Ie / 2), ee = Math.min(ee, Fe - Ae / 2), Z = Math.max(Z, Fe + Ae / 2); } e.forEach(te.nodes(), function(De) { Ne(te.node(De)); }), e.forEach(te.edges(), function(De) { var _e = te.edge(De); e.has(_e, "x") && Ne(_e); }), oe -= pe, ee -= ke, e.forEach(te.nodes(), function(De) { var _e = te.node(De); _e.x -= oe, _e.y -= ee; }), e.forEach(te.edges(), function(De) { var _e = te.edge(De); e.forEach(_e.points, function(Fe) { Fe.x -= oe, Fe.y -= ee; }), e.has(_e, "x") && (_e.x -= oe), e.has(_e, "y") && (_e.y -= ee); }), le.width = ne - oe + pe, le.height = Z - ee + ke; } function j(te) { e.forEach(te.edges(), function(oe) { var ne = te.edge(oe), ee = te.node(oe.v), Z = te.node(oe.w), le, pe; ne.points ? (le = ne.points[0], pe = ne.points[ne.points.length - 1]) : (ne.points = [], le = Z, pe = ee), ne.points.unshift(p.intersectRect(ee, le)), ne.points.push(p.intersectRect(Z, pe)); }); } function P(te) { e.forEach(te.edges(), function(oe) { var ne = te.edge(oe); if (e.has(ne, "x")) switch ((ne.labelpos === "l" || ne.labelpos === "r") && (ne.width -= ne.labeloffset), ne.labelpos) { case "l": ne.x -= ne.width / 2 + ne.labeloffset; break; case "r": ne.x += ne.width / 2 + ne.labeloffset; break; } }); } function V(te) { e.forEach(te.edges(), function(oe) { var ne = te.edge(oe); ne.reversed && ne.points.reverse(); }); } function U(te) { e.forEach(te.nodes(), function(oe) { if (te.children(oe).length) { var ne = te.node(oe), ee = te.node(ne.borderTop), Z = te.node(ne.borderBottom), le = te.node(e.last(ne.borderLeft)), pe = te.node(e.last(ne.borderRight)); ne.width = Math.abs(pe.x - le.x), ne.height = Math.abs(Z.y - ee.y), ne.x = le.x + ne.width / 2, ne.y = ee.y + ne.height / 2; } }), e.forEach(te.nodes(), function(oe) { te.node(oe).dummy === "border" && te.removeNode(oe); }); } function G(te) { e.forEach(te.edges(), function(oe) { if (oe.v === oe.w) { var ne = te.node(oe.v); ne.selfEdges || (ne.selfEdges = []), ne.selfEdges.push({ e: oe, label: te.edge(oe) }), te.removeEdge(oe); } }); } function se(te) { var oe = p.buildLayerMatrix(te); e.forEach(oe, function(ne) { var ee = 0; e.forEach(ne, function(Z, le) { var pe = te.node(Z); pe.order = le + ee, e.forEach(pe.selfEdges, function(ke) { p.addDummyNode(te, "selfedge", { width: ke.label.width, height: ke.label.height, rank: pe.rank, order: le + ++ee, e: ke.e, label: ke.label }, "_se"); }), delete pe.selfEdges; }); }); } function ae(te) { e.forEach(te.nodes(), function(oe) { var ne = te.node(oe); if (ne.dummy === "selfedge") { var ee = te.node(ne.e.v), Z = ee.x + ee.width / 2, le = ee.y, pe = ne.x - Z, ke = ee.height / 2; te.setEdge(ne.e, ne.label), te.removeNode(oe), ne.label.points = [ { x: Z + 2 * pe / 3, y: le - ke }, { x: Z + 5 * pe / 6, y: le - ke }, { x: Z + pe, y: le }, { x: Z + 5 * pe / 6, y: le + ke }, { x: Z + 2 * pe / 3, y: le + ke } ], ne.label.x = ne.x, ne.label.y = ne.y; } }); } function de(te, oe) { return e.mapValues(e.pick(te, oe), Number); } function me(te) { var oe = {}; return e.forEach(te, function(ne, ee) { oe[ee.toLowerCase()] = ne; }), oe; } return Ik; } var Pk, aP; function j_e() { if (aP) return Pk; aP = 1; var e = In(), t = wo(), n = Va().Graph; Pk = { debugOrdering: r }; function r(o) { var a = t.buildLayerMatrix(o), i = new n({ compound: !0, multigraph: !0 }).setGraph({}); return e.forEach(o.nodes(), function(s) { i.setNode(s, { label: s }), i.setParent(s, "layer" + o.node(s).rank); }), e.forEach(o.edges(), function(s) { i.setEdge(s.v, s.w, {}, s.name); }), e.forEach(a, function(s, l) { var u = "layer" + l; i.setNode(u, { rank: "same" }), e.reduce(s, function(c, d) { return i.setEdge(c, d, { style: "invis" }), d; }); }), i; } return Pk; } var iP, sP; function V_e() { return sP || (sP = 1, iP = "0.8.5"), iP; } var lP, uP; function H_e() { return uP || (uP = 1, lP = { graphlib: Va(), layout: z_e(), debug: j_e(), util: { time: wo().time, notime: wo().notime }, version: V_e() }), lP; } (function(e, t) { (function(n, r) { e.exports = r(H_e()); })(vp, function(n) { return ( /******/ function(r) { var o = {}; function a(i) { if (o[i]) return o[i].exports; var s = o[i] = { /******/ i, /******/ l: !1, /******/ exports: {} /******/ }; return r[i].call(s.exports, s, s.exports, a), s.l = !0, s.exports; } return a.m = r, a.c = o, a.d = function(i, s, l) { a.o(i, s) || Object.defineProperty(i, s, { enumerable: !0, get: l }); }, a.r = function(i) { typeof Symbol < "u" && Symbol.toStringTag && Object.defineProperty(i, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(i, "__esModule", { value: !0 }); }, a.t = function(i, s) { if (s & 1 && (i = a(i)), s & 8 || s & 4 && typeof i == "object" && i && i.__esModule) return i; var l = /* @__PURE__ */ Object.create(null); if (a.r(l), Object.defineProperty(l, "default", { enumerable: !0, value: i }), s & 2 && typeof i != "string") for (var u in i) a.d(l, u, (function(c) { return i[c]; }).bind(null, u)); return l; }, a.n = function(i) { var s = i && i.__esModule ? ( /******/ function() { return i.default; } ) : ( /******/ function() { return i; } ); return a.d(s, "a", s), s; }, a.o = function(i, s) { return Object.prototype.hasOwnProperty.call(i, s); }, a.p = "", a(a.s = 0); }([ /* 0 */ /***/ function(r, o, a) { var i = a(1), s = function(l) { l && l("layout", "dagre", i); }; typeof cytoscape < "u" && s(cytoscape), r.exports = s; }, /* 1 */ /***/ function(r, o, a) { function i(p) { "@babel/helpers - typeof"; return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? i = function(h) { return typeof h; } : i = function(h) { return h && typeof Symbol == "function" && h.constructor === Symbol && h !== Symbol.prototype ? "symbol" : typeof h; }, i(p); } var s = function(p) { return typeof p == "function"; }, l = a(2), u = a(3), c = a(4); function d(p) { this.options = u({}, l, p); } d.prototype.run = function() { var p = this.options, h = this, f = p.cy, v = p.eles, m = function(se, ae) { return s(ae) ? ae.apply(se, [se]) : ae; }, g = p.boundingBox || { x1: 0, y1: 0, w: f.width(), h: f.height() }; g.x2 === void 0 && (g.x2 = g.x1 + g.w), g.w === void 0 && (g.w = g.x2 - g.x1), g.y2 === void 0 && (g.y2 = g.y1 + g.h), g.h === void 0 && (g.h = g.y2 - g.y1); var b = new c.graphlib.Graph({ multigraph: !0, compound: !0 }), x = {}, w = function(se, ae) { ae != null && (x[se] = ae); }; w("nodesep", p.nodeSep), w("edgesep", p.edgeSep), w("ranksep", p.rankSep), w("rankdir", p.rankDir), w("align", p.align), w("ranker", p.ranker), w("acyclicer", p.acyclicer), b.setGraph(x), b.setDefaultEdgeLabel(function() { return {}; }), b.setDefaultNodeLabel(function() { return {}; }); var k = v.nodes(); s(p.sort) && (k = k.sort(p.sort)); for (var C = 0; C < k.length; C++) { var _ = k[C], $ = _.layoutDimensions(p); b.setNode(_.id(), { width: $.w, height: $.h, name: _.id() }); } for (var O = 0; O < k.length; O++) { var F = k[O]; F.isChild() && b.setParent(F.id(), F.parent().id()); } var A = v.edges().stdFilter(function(se) { return !se.source().isParent() && !se.target().isParent(); }); s(p.sort) && (A = A.sort(p.sort)); for (var T = 0; T < A.length; T++) { var R = A[T]; b.setEdge(R.source().id(), R.target().id(), { minlen: m(R, p.minLen), weight: m(R, p.edgeWeight), name: R.id() }, R.id()); } c.layout(b); for (var M = b.nodes(), j = 0; j < M.length; j++) { var P = M[j], V = b.node(P); f.getElementById(P).scratch().dagre = V; } var U; p.boundingBox ? (U = { x1: 1 / 0, x2: -1 / 0, y1: 1 / 0, y2: -1 / 0 }, k.forEach(function(se) { var ae = se.scratch().dagre; U.x1 = Math.min(U.x1, ae.x), U.x2 = Math.max(U.x2, ae.x), U.y1 = Math.min(U.y1, ae.y), U.y2 = Math.max(U.y2, ae.y); }), U.w = U.x2 - U.x1, U.h = U.y2 - U.y1) : U = g; var G = function(se) { if (p.boundingBox) { var ae = U.w === 0 ? 0 : (se.x - U.x1) / U.w, de = U.h === 0 ? 0 : (se.y - U.y1) / U.h; return { x: g.x1 + ae * g.w, y: g.y1 + de * g.h }; } else return se; }; return k.layoutPositions(h, p, function(se) { se = i(se) === "object" ? se : this; var ae = se.scratch().dagre; return G({ x: ae.x, y: ae.y }); }), this; }, r.exports = d; }, /* 2 */ /***/ function(r, o) { var a = { // dagre algo options, uses default value on undefined nodeSep: void 0, // the separation between adjacent nodes in the same rank edgeSep: void 0, // the separation between adjacent edges in the same rank rankSep: void 0, // the separation between adjacent nodes in the same rank rankDir: void 0, // 'TB' for top to bottom flow, 'LR' for left to right, align: void 0, // alignment for rank nodes. Can be 'UL', 'UR', 'DL', or 'DR', where U = up, D = down, L = left, and R = right acyclicer: void 0, // If set to 'greedy', uses a greedy heuristic for finding a feedback arc set for a graph. // A feedback arc set is a set of edges that can be removed to make a graph acyclic. ranker: void 0, // Type of algorithm to assigns a rank to each node in the input graph. // Possible values: network-simplex, tight-tree or longest-path minLen: function(i) { return 1; }, // number of ranks to keep between the source and target of the edge edgeWeight: function(i) { return 1; }, // higher weight edges are generally made shorter and straighter than lower weight edges // general layout options fit: !0, // whether to fit to viewport padding: 30, // fit padding spacingFactor: void 0, // Applies a multiplicative factor (>0) to expand or compress the overall area that the nodes take up nodeDimensionsIncludeLabels: !1, // whether labels should be included in determining the space used by a node animate: !1, // whether to transition the node positions animateFilter: function(i, s) { return !0; }, // whether to animate specific nodes when animation is on; non-animated nodes immediately go to their final positions animationDuration: 500, // duration of animation in ms if enabled animationEasing: void 0, // easing of animation if enabled boundingBox: void 0, // constrain layout bounds; { x1, y1, x2, y2 } or { x1, y1, w, h } transform: function(i, s) { return s; }, // a function that applies a transform to the final node position ready: function() { }, // on layoutready sort: void 0, // a sorting function to order the nodes and edges; e.g. function(a, b){ return a.data('weight') - b.data('weight') } // because cytoscape dagre creates a directed graph, and directed graphs use the node order as a tie breaker when // defining the topology of a graph, this sort function can help ensure the correct order of the nodes/edges. // this feature is most useful when adding and removing the same nodes and edges multiple times in a graph. stop: function() { } // on layoutstop }; r.exports = a; }, /* 3 */ /***/ function(r, o) { r.exports = Object.assign != null ? Object.assign.bind(Object) : function(a) { for (var i = arguments.length, s = new Array(i > 1 ? i - 1 : 0), l = 1; l < i; l++) s[l - 1] = arguments[l]; return s.forEach(function(u) { Object.keys(u).forEach(function(c) { return a[c] = u[c]; }); }), a; }; }, /* 4 */ /***/ function(r, o) { r.exports = n; } /******/ ]) ); }); })(t7); var U_e = t7.exports; const q_e = /* @__PURE__ */ ohe(U_e); ul.use(q_e); const cP = function(e, t) { if (!e || !t) return !1; let n = JSON.stringify(e), r = JSON.stringify(t); return n.indexOf(r) !== -1; }, K_e = function(e) { return e ? [...new Set(e.map((t) => JSON.stringify(t)))].map( (t) => JSON.parse(t) ) : []; }, G_e = function(e, t, n) { let r = e.connectivity.flat(), o = K_e(r), a = [], i = !1; return o.forEach((s) => { i = !1, cP(t, s) && (i = !0), cP(n, s) && (i = !0), i || a.push(s); }), a; }; let W_e = class extends EventTarget { constructor(e, t) { super(), Fa(this, "cyg", null), Fa(this, "nodes", []), Fa(this, "edges", []), Fa(this, "axons", []), Fa(this, "dendrites", []), Fa(this, "somas", []), Fa(this, "labelCache", /* @__PURE__ */ new Map()), Fa(this, "graphCanvas", null), Fa(this, "hasPhenotypes", !1), this.labelCache = e, this.graphCanvas = t; } async addConnectivity(e) { var t; if (e && e["node-phenotypes"]) { const n = ["ilxtr:hasSomaLocatedIn"], r = ["ilxtr:hasAxonPresynapticElementIn", "ilxtr:hasAxonSensorySubcellularElementIn"], o = [], a = []; n.forEach((s) => { o.push(...e["node-phenotypes"][s]); }), r.forEach((s) => { a.push(...e["node-phenotypes"][s]); }); const i = G_e(e, o, a); this.dendrites = o.map((s) => JSON.stringify(s)), this.axons = a.map((s) => JSON.stringify(s)), i != null && i.length && (this.somas = i.map((s) => JSON.stringify(s))), this.hasPhenotypes = !0; } else this.axons = e.axons.map((n) => JSON.stringify(n)), this.dendrites = e.dendrites.map((n) => JSON.stringify(n)), (t = e.somas) != null && t.length && (this.somas = e.somas.map((n) => JSON.stringify(n))), this.hasPhenotypes = !1; if (e.connectivity.length) for (const n of e.connectivity) { const r = await this.graphNode(n[0]), o = await this.graphNode(n[1]); this.nodes.push(r), this.nodes.push(o), this.edges.push({ id: `${r.id}_${o.id}`, source: r.id, target: o.id }); } else this.nodes.push({ id: "MISSING", label: "NO PATHS" }); } showConnectivity(e) { this.cyg = new eSe(this, e), this.cyg.on("tap-node", (t) => { const n = new CustomEvent("tap-node", { detail: t.detail }); this.dispatchEvent(n); }); } selectConnectivity(e) { var t; if ((t = this.cyg) != null && t.cy) { let n = ""; this.cyg.cy.elements().forEach((r) => { const o = r.data("label"), a = r_(o); Q_e(e, a) && (n = r.id()); }), n && this.cyg.cy.$id(n).select(); } } clearConnectivity() { var e; (e = this.cyg) != null && e.cy && (this.cyg.cy.remove(), this.cyg.cy = null); } reset() { var e; (e = this.cyg) != null && e.cy && this.cyg.cy.reset(); } zoom(e) { var t; if ((t = this.cyg) != null && t.cy) { const n = this.cyg.cy.zoom(), r = this.cyg.cy.width(), o = this.cyg.cy.height(), a = { x: r / 2, y: o / 2 }; this.cyg.cy.zoom({ level: n + e, renderedPosition: a }); } } enableZoom(e) { var t; (t = this.cyg) != null && t.cy && this.cyg.cy.userZoomingEnabled(e); } get elements() { return [ ...this.nodes.map((e) => ({ data: e })), ...this.edges.map((e) => ({ data: e })) ]; } get roots() { return this.hasPhenotypes ? [ ...this.dendrites ] : [ ...this.dendrites, ...this.somas ]; } async graphNode(e) { const t = JSON.stringify(e), n = [e[0], ...e[1]], r = []; for (const a of n) { const i = this.labelCache.has(a) ? this.labelCache.get(a) : ""; r.push(i); } n.push(...r); const o = { id: t, label: n.join(` `) }; return this.hasPhenotypes ? this.axons.includes(t) ? o.axon = !0 : this.dendrites.includes(t) ? o.dendrite = !0 : o.somas = !0 : this.axons.includes(t) ? this.dendrites.includes(t) || this.somas.includes(t) ? o.somas = !0 : o.axon = !0 : (this.dendrites.includes(t) || this.somas.includes(t)) && (o.dendrite = !0), o; } on(e, t) { this.addEventListener(e, t); } }; const Y_e = "#8300bf", X_e = "#f3ecf6", Z_e = [ { selector: "node", style: { label: function(e) { return J_e(e.data("label")); }, // 'background-color': '#80F0F0', "background-color": "transparent", "background-opacity": "0", "text-valign": "center", "text-wrap": "wrap", width: "80px", height: "80px", "text-max-width": "80px", "font-size": "6px", shape: "round-rectangle", "border-width": 1, "border-style": "solid", "border-color": "gray" } }, { selector: "node[axon]", style: { // 'background-color': 'green', shape: "round-diamond", width: "100px", height: "100px" } }, { selector: "node[dendrite]", style: { // 'background-color': 'red', shape: "ellipse" } }, { selector: "node[somas]", style: { // 'background-color': 'gray', shape: "round-rectangle" } }, { selector: "edge", style: { width: 1, "line-color": "dimgray", "curve-style": "bezier" } }, { selector: "node.active", style: { "border-color": Y_e, "background-color": X_e, "background-opacity": 0.75 } } ]; function J_e(e) { const t = e.split(` `), n = t.length / 2, r = t.slice(n); return tj(r.join(` `)); } function tj(e) { return e.split(` `).map((t) => t && t[0] >= "a" && t[0] <= "z" ? t.charAt(0).toUpperCase() + t.slice(1) : t).join(` `); } function r_(e) { const t = e ? e.split(` `) : [], n = []; for (let r = 0; r < t.length / 2; r++) n.push({ id: t[r], label: t[r + t.length / 2] }); return n; } function Q_e(e, t) { e.sort((n, r) => n.id < r.id ? -1 : n.id > r.id ? 1 : 0), t.sort((n, r) => n.id < r.id ? -1 : n.id > r.id ? 1 : 0); for (let n = 0; n < e.length; n++) if (JSON.stringify(e[n]) !== JSON.stringify(t[n])) return !1; return !0; } class eSe extends EventTarget { constructor(t, n) { var r; super(), Fa(this, "cy"), Fa(this, "tooltip"), this.cy = ul({ container: n, elements: t.elements, layout: { name: "dagre", nodeSep: 150, edgeSep: 50, rankSep: 100, rankDir: "TB", roots: t.roots.length ? t.roots : void 0 }, style: Z_e, minZoom: 0.1, maxZoom: 10, wheelSensitivity: 0.4 }).on("mouseover", "node", this.overNode.bind(this)).on("mouseout", "node", this.exitNode.bind(this)).on("position", "node", this.moveNode.bind(this)), this.tooltip = document.createElement("div"), this.tooltip.className = "cy-graph-tooltip", this.tooltip.hidden = !0, (r = n == null ? void 0 : n.lastChild) == null || r.appendChild(this.tooltip); } remove() { this.cy && this.cy.destroy(); } checkRightBoundary(t) { var n; t + this.tooltip.offsetWidth >= ((n = this.tooltip.parentElement) == null ? void 0 : n.offsetWidth) && (this.tooltip.style.left = `${t - this.tooltip.offsetWidth}px`); } overNode(t) { const n = t.target.data(), { label: r } = n, o = r_(r).map((a) => a.label + " (" + a.id + ")"); this.tooltip.innerText = tj(o.join(` `)), this.tooltip.style.left = `${t.renderedPosition.x}px`, this.tooltip.style.top = `${t.renderedPosition.y}px`, this.tooltip.style.maxWidth = "240px", this.tooltip.style.zIndex = 2, this.tooltip.hidden = !1, this.checkRightBoundary(t.renderedPosition.x), this.tapNode(t, !0); } moveNode(t) { const n = t.target; this.tooltip.style.left = `${n.renderedPosition().x}px`, this.tooltip.style.top = `${n.renderedPosition().y}px`, this.checkRightBoundary(n.renderedPosition().x); } exitNode(t) { this.tooltip.hidden = !0, this.tapNode(t, !1); } tapNode(t, n) { const r = t.target, o = r.data(); let { label: a } = o; n ? r.addClass("active") : (r.removeClass("active"), a = "", setTimeout(() => { r.unselect(); })); const i = r_(a), s = new CustomEvent("tap-node", { detail: i }); this.dispatchEvent(s); } on(t, n) { this.addEventListener(t, n); } } const tSe = 1.3, nSe = 24 * 60 * 60 * 1e3, rSe = "Reset position", dP = "Lock zoom", oSe = "Unlock zoom", aSe = "Zoom in", iSe = "Zoom out", pP = 0.25, sSe = "#8300bf", lSe = { name: "ConnectivityGraph", props: { /** * Entity to load its connectivity graph. */ entry: { type: String, default: "" }, mapServer: { type: String, default: "" }, sckanVersion: { type: String, default: "" }, selectedConnectivityData: { type: Array, default: [] }, connectivityFromMap: { type: Object, default: () => null }, connectivityError: { type: Object, default: () => { } } }, data: function() { return { loading: !0, loadingError: "", connectivityGraph: null, selectedSource: "", availableSources: [], pathList: [], schemaVersion: "", knowledgeByPath: /* @__PURE__ */ new Map(), labelledTerms: /* @__PURE__ */ new Set(), labelCache: /* @__PURE__ */ new Map(), resetLabel: rSe, zoomLockLabel: dP, zoomInLabel: aSe, zoomOutLabel: iSe, iconColor: sSe, zoomEnabled: !1, connectivityGraphContainer: null }; }, watch: { connectivityFromMap: function(e, t) { e != t && (this.showSpinner(), this.start()); } }, mounted() { this.showSpinner(), this.updateTooltipContainer(), this.refreshCache(), this.loadCacheData(), this.start(); }, methods: { updateTooltipContainer: function() { this.connectivityGraphContainer = this.$refs.connectivityGraphRef; }, loadCacheData: function() { const e = sessionStorage.getItem("connectivity-graph-sources"), t = sessionStorage.getItem("connectivity-graph-labels"), n = sessionStorage.getItem("connectivity-graph-pathlist"), r = sessionStorage.getItem("connectivity-graph-schema-version"); if (this.sckanVersion && (this.selectedSource = this.sckanVersion), sessionStorage.setItem("connectivity-graph-selected-source", this.selectedSource), this.updateCacheExpiry(), e && (this.availableSources = JSON.parse(e)), n && (this.pathList = JSON.parse(n)), t) { const o = JSON.parse(t); this.labelCache = new Map(Object.entries(o)); } r && (this.schemaVersion = r); }, isValidKnowledgeSource: function() { const e = sessionStorage.getItem("connectivity-graph-selected-source"); return !(this.sckanVersion && this.sckanVersion !== e); }, removeAllCacheData: function() { [ "connectivity-graph-expiry", "connectivity-graph-selected-source", "connectivity-graph-source", // to clear old data "connectivity-graph-sources", "connectivity-graph-labels", "connectivity-graph-pathlist", "connectivity-graph-schema-version" ].forEach((e) => { sessionStorage.removeItem(e); }); }, refreshCache: function() { const e = sessionStorage.getItem("connectivity-graph-expiry"), t = /* @__PURE__ */ new Date(), n = this.isValidKnowledgeSource(); (t.getTime() > e || !n) && this.removeAllCacheData(); }, updateCacheExpiry: function() { const e = (/* @__PURE__ */ new Date()).getTime() + nSe; sessionStorage.setItem("connectivity-graph-expiry", e); }, start: function() { this.run().then((e) => { e != null && e.success ? this.showGraph(this.entry) : e != null && e.error ? this.loadingError = e.error : this.loadingError = "Loading error!"; }).catch((e) => { this.loadingError = "Loading error!", this.hideSpinner(); }); }, run: async function() { return this.schemaVersion || (this.schemaVersion = await this.getSchemaVersion(), sessionStorage.setItem("connectivity-graph-schema-version", this.schemaVersion), this.updateCacheExpiry()), this.schemaVersion < tSe ? { error: `No server available for schema-version ${this.schemaVersion}.` } : (this.availableSources.length || (this.availableSources = await this.loadAvailableSources()), this.isSCKANVersionAvailable() ? (await this.setPathList(this.selectedSource), { success: !0 }) : { error: `No data available for SCKAN version ${this.selectedSource}.` }); }, showGraph: async function(e) { const t = this.$refs.graphCanvas; this.connectivityFromMap && (this.cacheLabels(this.connectivityFromMap), await this.getCachedTermLabels()), this.connectivityGraph = new W_e(this.labelCache, t); const n = this.knowledgeByPath.get(e); this.connectivityFromMap && (n.axons = this.connectivityFromMap.axons, n.connectivity = this.connectivityFromMap.connectivity, n.dendrites = this.connectivityFromMap.dendrites, n.somas = this.connectivityFromMap.somas), await this.connectivityGraph.addConnectivity(n), this.connectivityGraph.showConnectivity(t), this.selectedConnectivityData.length && this.connectivityGraph.selectConnectivity(this.selectedConnectivityData), this.connectivityGraph.on("tap-node", (r) => { const o = r.detail; this.$emit("tap-node", o); }), this.hideSpinner(); }, query: async function(e, t) { const n = `${this.mapServer}knowledge/query/`, r = { sql: e, params: t }; try { const o = await fetch(n, { method: "POST", headers: { Accept: "application/json; charset=utf-8", "Cache-Control": "no-store", "Content-Type": "application/json" }, body: JSON.stringify(r) }); if (!o.ok) throw new Error(`Cannot access ${n}`); return await o.json(); } catch { return { values: [] }; } }, isSCKANVersionAvailable: function() { return this.availableSources.includes(this.selectedSource); }, loadAvailableSources: async function() { const e = await this.getJsonData(`${this.mapServer}knowledge/sources`), t = (e ? e.sources || [] : []).filter((n) => n); return sessionStorage.setItem("connectivity-graph-sources", JSON.stringify(t)), this.updateCacheExpiry(), t; }, loadPathData: async function(e) { const t = await this.query( `select entity, knowledge from knowledge where entity like 'ilxtr:%' and source=? order by entity`, [e] ); return t ? t.values : []; }, setPathList: async function(e) { this.pathList.length || (this.pathList = await this.loadPathData(e), sessionStorage.setItem("connectivity-graph-pathlist", JSON.stringify(this.pathList)), this.updateCacheExpiry()), this.knowledgeByPath.clear(), this.labelledTerms = /* @__PURE__ */ new Set(); for (const [t, n] of this.pathList) { const r = JSON.parse(n); "connectivity" in r && (this.knowledgeByPath.set(t, r), this.cacheLabels(r)); } return this.labelCache.size || await this.getCachedTermLabels(), ""; }, getSchemaVersion: async function() { const e = await this.getJsonData(`${this.mapServer}knowledge/schema-version`); return e && +e.version || 0; }, getJsonData: async function(e) { try { const t = await fetch(e, { method: "GET", headers: { Accept: "application/json; charset=utf-8", "Cache-Control": "no-store", "Content-Type": "application/json" } }); return t.ok || console.error(`Cannot access ${e}`), await t.json(); } catch { return null; } }, getCachedTermLabels: async function() { if (this.labelledTerms.size) { const e = await this.query( `select entity, knowledge from knowledge where entity in (?${", ?".repeat(this.labelledTerms.size - 1)}) order by source desc`, [...this.labelledTerms.values()] ); let t = null; for (const [r, o] of e.values) if (r !== t) { const a = JSON.parse(o); this.labelCache.set(r, a.label || r), t = r; } const n = Object.fromEntries(this.labelCache); sessionStorage.setItem("connectivity-graph-labels", JSON.stringify(n)), this.updateCacheExpiry(); } }, cacheNodeLabels: function(e) { for (const t of [e[0], ...e[1]]) this.labelledTerms.add(t); }, cacheLabels: async function(e) { for (const t of e.connectivity) this.cacheNodeLabels(t[0]), this.cacheNodeLabels(t[1]); }, showSpinner: function() { this.loading = !0; }, hideSpinner: function() { this.loading = !1; }, reset: function() { this.connectivityGraph.reset(); }, zoomIn: function() { this.connectivityGraph.zoom(pP); }, zoomOut: function() { this.connectivityGraph.zoom(-pP); }, /** * Enable/disable user zoom for scrolling */ toggleZoom: function() { this.zoomEnabled = !this.zoomEnabled, this.zoomLockLabel = this.zoomEnabled ? oSe : dP, this.connectivityGraph.enableZoom(!this.zoomEnabled); } } }, uSe = { class: "connectivity-graph", ref: "connectivityGraphRef" }, cSe = { ref: "graphCanvas", class: "graph-canvas" }, dSe = { class: "control-panel control-panel-tools" }, pSe = { class: "visually-hidden" }, fSe = { class: "visually-hidden" }, hSe = { class: "visually-hidden" }, vSe = { class: "visually-hidden" }, gSe = /* @__PURE__ */ yW('
Origin
Components
Destination
', 1), mSe = { class: "connectivity-graph-error" }, ySe = { key: 0, class: "loading-error" }; function bSe(e, t, n, r, o, a) { const i = zJ, s = mr, l = ua, u = Jf, c = mQ, d = _Q, p = AQ, h = PQ, f = wge; return Be((S(), L("div", uSe, [ D("div", cSe, null, 512), D("div", dSe, [ D("div", { class: H(["tools", { "zoom-locked": e.zoomEnabled }]) }, [ q(u, { content: e.resetLabel, placement: "top", effect: "control-tooltip", teleported: !0, "append-to": e.connectivityGraphContainer }, { default: N(() => [ q(l, { class: "control-button", size: "small", onClick: a.reset }, { default: N(() => [ q(s, { color: "white" }, { default: N(() => [ q(i) ]), _: 1 }), D("span", pSe, ge(e.resetLabel), 1) ]), _: 1 }, 8, ["onClick"]) ]), _: 1 }, 8, ["content", "append-to"]), q(u, { content: e.zoomLockLabel, placement: "top", effect: "control-tooltip", teleported: !0, "append-to": e.connectivityGraphContainer }, { default: N(() => [ q(l, { class: "control-button", size: "small", onClick: a.toggleZoom }, { default: N(() => [ q(s, { color: "white" }, { default: N(() => [ e.zoomEnabled ? (S(), re(c, { key: 0 })) : (S(), re(d, { key: 1 })) ]), _: 1 }), D("span", fSe, ge(e.zoomLockLabel), 1) ]), _: 1 }, 8, ["onClick"]) ]), _: 1 }, 8, ["content", "append-to"]), q(u, { content: e.zoomInLabel, placement: "left", effect: "control-tooltip", teleported: !0, "append-to": e.connectivityGraphContainer }, { default: N(() => [ q(l, { class: "control-button", size: "small", onClick: a.zoomIn }, { default: N(() => [ q(s, { color: "white" }, { default: N(() => [ q(p) ]), _: 1 }), D("span", hSe, ge(e.zoomInLabel), 1) ]), _: 1 }, 8, ["onClick"]) ]), _: 1 }, 8, ["content", "append-to"]), q(u, { content: e.zoomOutLabel, placement: "left", effect: "control-tooltip", teleported: !0, "append-to": e.connectivityGraphContainer }, { default: N(() => [ q(l, { class: "control-button", size: "small", onClick: a.zoomOut }, { default: N(() => [ q(s, { color: "white" }, { default: N(() => [ q(h) ]), _: 1 }), D("span", vSe, ge(e.zoomOutLabel), 1) ]), _: 1 }, 8, ["onClick"]) ]), _: 1 }, 8, ["content", "append-to"]) ], 2) ]), gSe, Be(D("div", mSe, [ D("strong", null, ge(n.connectivityError.errorConnectivities), 1), Oe(" " + ge(n.connectivityError.errorMessage), 1) ], 512), [ [ht, n.connectivityError.errorConnectivities] ]), e.loadingError ? (S(), L("div", ySe, ge(e.loadingError), 1)) : J("", !0) ])), [ [f, e.loading] ]); } const wSe = /* @__PURE__ */ wl(lSe, [["render", bSe], ["__scopeId", "data-v-1239b5ce"]]), xSe = (e) => e && e.charAt(0).toUpperCase() + e.slice(1), kSe = (e) => new Promise((t) => setTimeout(t, e)), CSe = { name: "ConnectivityList", components: { Button: ua, Container: i$, Icon: mr, ElIconWarning: j0, ElIconSearch: B0 }, props: { entry: { type: Object, default: () => ({ destinations: [], origins: [], components: [], destinationsWithDatasets: [], originsWithDatasets: [], componentsWithDatasets: [], resource: void 0, featuresAlert: void 0 }) }, origins: { type: Array, default: () => [] }, components: { type: Array, default: () => [] }, destinations: { type: Array, default: () => [] }, originsWithDatasets: { type: Array, default: () => [] }, componentsWithDatasets: { type: Array, default: () => [] }, destinationsWithDatasets: { type: Array, default: () => [] }, availableAnatomyFacets: { type: Array, default: () => [] }, connectivityError: { type: Object, default: () => { } } }, data: function() { return { alertTop: 0, originDescriptions: { motor: "is the location of the initial cell body of the circuit", sensory: "is the location of the initial cell body in the PNS circuit" }, facetList: [] }; }, watch: { availableAnatomyFacets: { handler: function(e) { this.convertFacetsToList(e); }, immediate: !0, deep: !0 } }, computed: { originDescription: function() { return this.entry && this.entry.title && this.entry.title.toLowerCase().includes("motor") ? this.originDescriptions.motor : this.originDescriptions.sensory; } }, methods: { capitalise: function(e) { return xSe(e); }, onConnectivityHovered: function(e, t) { this.$emit("connectivity-hovered", e), t && (this.alertTop = t.srcElement.offsetParent.offsetTop + t.srcElement.offsetTop); }, onConnectivityClicked: function(e) { const t = this.connectivityError.errorConnectivities, n = t ? e.replace(new RegExp(`\\s*,?\\s*${t}\\s*,?\\s*`, "gi"), "").trim() : e; this.$emit("connectivity-clicked", n); }, // shouldShowMagnifyGlass: Checks whether the hovered terms contain valid term or not shouldShowMagnifyGlass: function(e) { const t = this.connectivityError.errorConnectivities; return (t == null ? void 0 : t.toLowerCase()) !== e.toLowerCase(); }, // shouldShowExploreButton: Checks if the feature is in the list of available anatomy facets shouldShowExploreButton: function(e) { if (!this.facetList.length) return !0; for (let t = 0; t < e.length; t++) if (this.facetList.includes(e[t].name.toLowerCase())) return !0; return !1; }, // convertFacetsToList: Converts the available anatomy facets to a list for easy searching convertFacetsToList: function(e) { e.forEach((t) => { t.children ? this.convertFacetsToList(t.children) : this.facetList.push(t.label.toLowerCase()); }); }, openAll: function() { this.$emit("connectivity-action-click", { type: "Facets", labels: this.componentsWithDatasets.map((e) => e.name.toLowerCase()) }); }, openAxons: function() { this.$emit("connectivity-action-click", { type: "Facets", labels: this.destinationsWithDatasets.map((e) => e.name.toLowerCase()) }); }, openDendrites: function() { this.$emit("connectivity-action-click", { type: "Facets", labels: this.originsWithDatasets.map((e) => e.name.toLowerCase()) }); } } }, _l = (e) => (Ci("data-v-81bbd5ff"), e = e(), _i(), e), _Se = { ref: "connectivityList", class: "connectivity-list" }, SSe = { key: 0, class: "block" }, $Se = { class: "attribute-title-container" }, ESe = /* @__PURE__ */ _l(() => /* @__PURE__ */ D("span", { class: "attribute-title" }, "Origin", -1)), OSe = { style: { "word-break": "keep-all" } }, FSe = /* @__PURE__ */ _l(() => /* @__PURE__ */ D("i", null, "Origin", -1)), TSe = ["origin-item-label", "onMouseenter"], ASe = /* @__PURE__ */ _l(() => /* @__PURE__ */ D("span", null, "Search connectivity", -1)), ISe = { key: 1, class: "block" }, PSe = /* @__PURE__ */ _l(() => /* @__PURE__ */ D("div", { class: "attribute-title-container" }, [ /* @__PURE__ */ D("span", { class: "attribute-title" }, "Components") ], -1)), LSe = ["component-item-label", "onMouseenter"], RSe = /* @__PURE__ */ _l(() => /* @__PURE__ */ D("span", null, "Search connectivity", -1)), NSe = { key: 2, class: "block" }, MSe = { class: "attribute-title-container" }, DSe = /* @__PURE__ */ _l(() => /* @__PURE__ */ D("span", { class: "attribute-title" }, "Destination", -1)), BSe = /* @__PURE__ */ _l(() => /* @__PURE__ */ D("span", { style: { "word-break": "keep-all" } }, [ /* @__PURE__ */ D("i", null, "Destination"), /* @__PURE__ */ Oe(" is where the axons terminate ") ], -1)), zSe = ["destination-item-label", "onMouseenter"], jSe = /* @__PURE__ */ _l(() => /* @__PURE__ */ D("span", null, "Search connectivity", -1)), VSe = { class: "block" }; function HSe(e, t, n, r, o, a) { const i = fB, s = j0, l = mr, u = B0, c = ua; return S(), L("div", _Se, [ q(i, { width: "250", "show-arrow": !1, trigger: "manual", teleported: !1, placement: "left-start", visible: !!n.connectivityError.errorConnectivities, "popper-class": "connectivity-error-container" }, { reference: N(() => [ D("div", { class: "connectivity-alert", style: Ye({ top: e.alertTop + "px" }) }, null, 4) ]), default: N(() => [ D("strong", null, ge(n.connectivityError.errorConnectivities), 1), Oe(" " + ge(n.connectivityError.errorMessage), 1) ]), _: 1 }, 8, ["visible"]), Oe(" " + ge(n.entry.paths) + " ", 1), n.origins && n.origins.length > 0 ? (S(), L("div", SSe, [ D("div", $Se, [ ESe, q(i, { width: "250", trigger: "hover", teleported: !1, "popper-class": "popover-origin-help" }, { reference: N(() => [ q(l, { class: "info" }, { default: N(() => [ q(s) ]), _: 1 }) ]), default: N(() => [ D("span", OSe, [ FSe, Oe(" " + ge(a.originDescription), 1) ]) ]), _: 1 }) ]), (S(!0), L(Re, null, mt(n.origins, (d, p) => (S(), L("div", { class: "attribute-content", "origin-item-label": d, key: d, onMouseenter: (h) => a.onConnectivityHovered(d, h), onMouseleave: t[0] || (t[0] = (h) => a.onConnectivityHovered()) }, [ q(i, { width: "150", trigger: "hover", teleported: !1, "popper-class": "popover-origin-help" }, { reference: N(() => [ Be(q(l, { class: "magnify-glass", onClick: (h) => a.onConnectivityClicked(d) }, { default: N(() => [ q(u) ]), _: 2 }, 1032, ["onClick"]), [ [ht, a.shouldShowMagnifyGlass(d)] ]) ]), default: N(() => [ ASe ]), _: 2 }, 1024), D("span", null, ge(a.capitalise(d)), 1) ], 40, TSe))), 128)), Be(q(c, { class: "button", id: "open-dendrites-button", onClick: a.openDendrites }, { default: N(() => [ Oe(" Explore origin data ") ]), _: 1 }, 8, ["onClick"]), [ [ ht, n.originsWithDatasets && n.originsWithDatasets.length > 0 && a.shouldShowExploreButton(n.originsWithDatasets) ] ]) ])) : J("", !0), n.components && n.components.length > 0 ? (S(), L("div", ISe, [ PSe, (S(!0), L(Re, null, mt(n.components, (d, p) => (S(), L("div", { class: "attribute-content", "component-item-label": d, key: d, onMouseenter: (h) => a.onConnectivityHovered(d, h), onMouseleave: t[1] || (t[1] = (h) => a.onConnectivityHovered()) }, [ q(i, { width: "150", trigger: "hover", teleported: !1, "popper-class": "popover-origin-help" }, { reference: N(() => [ Be(q(l, { class: "magnify-glass", onClick: (h) => a.onConnectivityClicked(d) }, { default: N(() => [ q(u) ]), _: 2 }, 1032, ["onClick"]), [ [ht, a.shouldShowMagnifyGlass(d)] ]) ]), default: N(() => [ RSe ]), _: 2 }, 1024), D("span", null, ge(a.capitalise(d)), 1) ], 40, LSe))), 128)) ])) : J("", !0), n.destinations && n.destinations.length > 0 ? (S(), L("div", NSe, [ D("div", MSe, [ DSe, q(i, { width: "250", trigger: "hover", teleported: !1, "popper-class": "popover-origin-help" }, { reference: N(() => [ q(l, { class: "info" }, { default: N(() => [ q(s) ]), _: 1 }) ]), default: N(() => [ BSe ]), _: 1 }) ]), (S(!0), L(Re, null, mt(n.destinations, (d, p) => (S(), L("div", { class: "attribute-content", "destination-item-label": d, key: d, onMouseenter: (h) => a.onConnectivityHovered(d, h), onMouseleave: t[2] || (t[2] = (h) => a.onConnectivityHovered()) }, [ q(i, { width: "150", trigger: "hover", teleported: !1, "popper-class": "popover-origin-help" }, { reference: N(() => [ Be(q(l, { class: "magnify-glass", onClick: (h) => a.onConnectivityClicked(d) }, { default: N(() => [ q(u) ]), _: 2 }, 1032, ["onClick"]), [ [ht, a.shouldShowMagnifyGlass(d)] ]) ]), default: N(() => [ jSe ]), _: 2 }, 1024), D("span", null, ge(a.capitalise(d)), 1) ], 40, zSe))), 128)), Be(q(c, { class: "button", onClick: a.openAxons }, { default: N(() => [ Oe(" Explore destination data ") ]), _: 1 }, 8, ["onClick"]), [ [ ht, n.destinationsWithDatasets && n.destinationsWithDatasets.length > 0 && a.shouldShowExploreButton(n.destinationsWithDatasets) ] ]) ])) : J("", !0), Be(D("div", VSe, [ q(c, { class: "button", onClick: a.openAll }, { default: N(() => [ Oe(" Search for data on components ") ]), _: 1 }, 8, ["onClick"]) ], 512), [ [ ht, n.componentsWithDatasets && n.componentsWithDatasets.length > 0 && a.shouldShowExploreButton(n.componentsWithDatasets) ] ]) ], 512); } const USe = /* @__PURE__ */ wl(CSe, [["render", HSe], ["__scopeId", "data-v-81bbd5ff"]]), nj = ` 2horpanel ? `, rj = ` 2vertpanel ? `, oj = ` 3panel ? `, aj = ` 4panel ? `, ij = ` 2horpanel ? `, sj = ` 2horpanel ? `, lj = ` 4panel ? `, uj = ` changeBckgd `, cj = ` close no bk `, dj = ` close `, pj = ` closeFullScreen `, fj = ` Comment `, hj = ` Connection `, vj = ` dock `, gj = ` drawLine `, mj = ` drawPoint `, yj = ` drawPolygon `, bj = ` drawTrash `, wj = ` fitWindow `, xj = ` fullScreen `, kj = 'DataPortal-Icons', Cj = ` magnifyingGlass `, _j = `Created by Wahyu Prihantorofrom the Noun Project`, Sj = ` openMap `, $j = ` Artboard Copy 6 `, Ej = ` permalink `, Oj = ` play `, Fj = ` resetZoom `, Tj = ` singlepanel ? `, Aj = ` tooltips ? `, Ij = ` undock `, Pj = ` zoomIn `, Lj = ` zoomOut `, Rj = (e, t, n, r) => { const o = ["title", "desc", "defs", "style"], a = ["width", "height"], i = r || []; let s = document.createElement("div"); s.innerHTML = e, o.map((u) => { const c = s.querySelector(u); c && c.remove(); }), a.map((u) => { s.querySelector("svg").removeAttribute(u); }), r && i.map((u) => { Object.values(s.querySelectorAll(`[${u}]`)).map((c) => { c.removeAttribute(u); }); }); const l = s.innerHTML; return s = null, l; }, Nj = (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(), qSe = !0, KSe = !0, GSe = ["fill"], fP = /* @__PURE__ */ Object.assign({ "/assets/icons/2horpanel.svg": nj, "/assets/icons/2vertpanel.svg": rj, "/assets/icons/3panel.svg": oj, "/assets/icons/4panel.svg": aj, "/assets/icons/5panel.svg": ij, "/assets/icons/6panel.svg": sj, "/assets/icons/6panelVertical.svg": lj, "/assets/icons/changeBckgd.svg": uj, "/assets/icons/close-no-bk.svg": cj, "/assets/icons/close.svg": dj, "/assets/icons/closeFullScreen.svg": pj, "/assets/icons/comment.svg": fj, "/assets/icons/connection.svg": hj, "/assets/icons/dock.svg": vj, "/assets/icons/drawLine.svg": gj, "/assets/icons/drawPoint.svg": mj, "/assets/icons/drawPolygon.svg": yj, "/assets/icons/drawTrash.svg": bj, "/assets/icons/fitWindow.svg": wj, "/assets/icons/fullScreen.svg": xj, "/assets/icons/help.svg": kj, "/assets/icons/magnifyingGlass.svg": Cj, "/assets/icons/noun-filter.svg": _j, "/assets/icons/openMap.svg": Sj, "/assets/icons/pause.svg": $j, "/assets/icons/permalink.svg": Ej, "/assets/icons/play.svg": Oj, "/assets/icons/resetZoom.svg": Fj, "/assets/icons/singlepanel.svg": Tj, "/assets/icons/tooltips.svg": Aj, "/assets/icons/undock.svg": Ij, "/assets/icons/zoomIn.svg": Pj, "/assets/icons/zoomOut.svg": Lj }), WSe = Object.keys(fP).map((e) => { const t = Rj(fP[e], qSe, KSe, GSe), n = e.replace(/^.+\/(\w+).svg$/, "$1"); return Nj(t).replace("", "symbol>"); }); WSe.join(` `); const o_ = /* @__PURE__ */ Object.assign({ "/assets/icons/2horpanel.svg": nj, "/assets/icons/2vertpanel.svg": rj, "/assets/icons/3panel.svg": oj, "/assets/icons/4panel.svg": aj, "/assets/icons/5panel.svg": ij, "/assets/icons/6panel.svg": sj, "/assets/icons/6panelVertical.svg": lj, "/assets/icons/changeBckgd.svg": uj, "/assets/icons/close-no-bk.svg": cj, "/assets/icons/close.svg": dj, "/assets/icons/closeFullScreen.svg": pj, "/assets/icons/comment.svg": fj, "/assets/icons/connection.svg": hj, "/assets/icons/dock.svg": vj, "/assets/icons/drawLine.svg": gj, "/assets/icons/drawPoint.svg": mj, "/assets/icons/drawPolygon.svg": yj, "/assets/icons/drawTrash.svg": bj, "/assets/icons/fitWindow.svg": wj, "/assets/icons/fullScreen.svg": xj, "/assets/icons/help.svg": kj, "/assets/icons/magnifyingGlass.svg": Cj, "/assets/icons/noun-filter.svg": _j, "/assets/icons/openMap.svg": Sj, "/assets/icons/pause.svg": $j, "/assets/icons/permalink.svg": Ej, "/assets/icons/play.svg": Oj, "/assets/icons/resetZoom.svg": Fj, "/assets/icons/singlepanel.svg": Tj, "/assets/icons/tooltips.svg": Aj, "/assets/icons/undock.svg": Ij, "/assets/icons/zoomIn.svg": Pj, "/assets/icons/zoomOut.svg": Lj }), YSe = Object.keys(o_).map((e) => { const t = Rj(o_[e]), n = e.replace(/^.+\/(\w+).svg$/, "$1"); return Nj(t).replace("", "symbol>"); }); YSe.join(` `); const XSe = { name: "HelpModeDialog", props: { /** * MultiFlatmapRef from multiflatmapvuer. Provide this when using with MultiFlatmap. */ multiflatmapRef: { type: Object, default: null }, /** * FlatmapRef from flatmapvuer. Provide this when using with Flatmap. */ flatmapRef: { type: Object, default: null }, /** * ScaffoldRef from scaffoldvuer. Provide this when using with Scaffold. */ scaffoldRef: { type: Object, default: null }, /** * The flag for last tooltip item. */ lastItem: { type: Boolean, default: !1, required: !1 } }, mounted: function() { this.toggleHelpModeHighlight(!0), this.toggleTooltipHighlight(); }, unmounted: function() { this.toggleHelpModeHighlight(!1); }, watch: { lastItem: function(e) { e && this.toggleTooltipHighlight(); } }, methods: { /** * This function will be called on clicking Next button. * * @public */ showNext: function() { this.$emit("show-next"); }, /** * This function will be called on clicking Finish button. * * @public */ finishHelpMode: function() { this.$emit("finish-help-mode"); }, /** * This function must be called on 'shown-map-tooltip' event. * * @public */ toggleTooltipPinHighlight: function() { const e = this.getCurrentFlatmap(); this.resetHighlightedItems(), this.$nextTick(() => { var t; const n = e.querySelectorAll(".maplibregl-marker"), r = e.querySelector( ".flatmap-popup-popper" ), o = ((t = r == null ? void 0 : r.style) == null ? void 0 : t.transform) || "", a = this.extractMarkerPosition(o); n.forEach((i) => { const s = i.style.transform; this.extractMarkerPosition(s) === a && i.classList.add("in-help-highlight"); }); }); }, /** * This function must be called on 'shown-tooltip' event. * * @public */ toggleTooltipHighlight: function() { this.resetHighlightedItems(), this.$nextTick(() => { document.querySelectorAll( '.el-popper:not([style*="none"])' ).forEach((e) => { const t = e.classList.contains("flatmap-popper"), n = e.classList.contains( "el-fade-in-linear-enter-active" ); (t || n) && this.toggleHighlight(e); }); }); }, toggleHighlight: function(e) { const t = (e == null ? void 0 : e.id) || "", n = document.querySelector( `[aria-describedby="${t}"]` ); n && n.classList.add("in-help-highlight"); }, resetHighlightedItems: function() { document.querySelectorAll(".in-help-highlight").forEach((e) => { e.classList.remove("in-help-highlight"); }); }, getCurrentScaffold: function() { var e; return ((e = this.scaffoldRef) == null ? void 0 : e.$el) || null; }, getCurrentMultiflatmap: function() { var e; return ((e = this.multiflatmapRef) == null ? void 0 : e.$el) || null; }, getCurrentFlatmap: function() { var e; const t = this.flatmapRef || ((e = this.multiflatmapRef) == null ? void 0 : e.getCurrentFlatmap()); return (t == null ? void 0 : t.$el) || null; }, toggleHelpModeHighlight: function(e) { const t = this.getCurrentMultiflatmap(), n = this.getCurrentFlatmap(), r = this.getCurrentScaffold(), o = document.querySelectorAll(".in-help-highlight"); t && (e ? t.classList.add("in-help") : t.classList.remove("in-help")), n && (e ? n.classList.add("in-help") : n.classList.remove("in-help")), r && (e ? r.classList.add("in-help") : r.classList.remove("in-help")), e || o.forEach((a) => { a.classList.remove("in-help-highlight"); }); }, /** * Temporary solution to find the position of map marker from popover */ extractMarkerPosition: function(e) { const t = /translate\((.*?)\)/g, n = e.match(t); return n ? n[n.length - 1].slice(10, -1) : ""; } } }, J$ = (e) => (Ci("data-v-3efb89fb"), e = e(), _i(), e), ZSe = /* @__PURE__ */ J$(() => /* @__PURE__ */ D("h4", null, "Help Mode", -1)), JSe = /* @__PURE__ */ J$(() => /* @__PURE__ */ D("p", null, [ /* @__PURE__ */ Oe(" All caught up! "), /* @__PURE__ */ D("br"), /* @__PURE__ */ Oe(" Click 'Help' to restart. ") ], -1)), QSe = /* @__PURE__ */ J$(() => /* @__PURE__ */ D("p", null, 'Click "Next" to see the next item.', -1)); function e$e(e, t, n, r, o, a) { const i = ua; return S(), L("div", { class: H(["help-mode-dialog", { finish: n.lastItem }]) }, [ ZSe, n.lastItem ? (S(), L(Re, { key: 0 }, [ JSe, D("div", null, [ q(i, { class: "button", onClick: a.finishHelpMode }, { default: N(() => [ Oe(" Finish ") ]), _: 1 }, 8, ["onClick"]) ]) ], 64)) : (S(), L(Re, { key: 1 }, [ QSe, D("div", null, [ q(i, { class: "button", onClick: a.showNext }, { default: N(() => [ Oe(" Next ") ]), _: 1 }, 8, ["onClick"]), q(i, { class: "button secondary", onClick: a.finishHelpMode }, { default: N(() => [ Oe(" Exit Help Mode ") ]), _: 1 }, 8, ["onClick"]) ]) ], 64)) ], 2); } const JWe = /* @__PURE__ */ wl(XSe, [["render", e$e], ["__scopeId", "data-v-3efb89fb"]]), t$e = { name: "RelatedConnectivitiesButton", props: { resource: { type: String, required: !0 } } }, n$e = { class: "reference-button-container" }; function r$e(e, t, n, r, o, a) { const i = ua; return S(), L("div", n$e, [ q(i, { class: "reference-icon-button", size: "small", onClick: t[0] || (t[0] = (s) => e.$emit("show-related-connectivities", n.resource)) }, { default: N(() => [ Oe(" Show related connectivities ") ]), _: 1 }) ]); } const Mj = /* @__PURE__ */ wl(t$e, [["render", r$e], ["__scopeId", "data-v-2f3dd1db"]]), o$e = "https://citation.doi.org", a$e = [ { label: "APA", value: "apa" }, { label: "Chicago", value: "chicago-author-date" }, { label: "IEEE", value: "ieee" }, { label: "Bibtex", value: "bibtex" } ], Lk = "apa", i$e = 600, s$e = { name: "ExternalResourceCard", components: { CopyToClipboard: Ru, RelatedConnectivitiesButton: Mj }, props: { resources: { type: Array, default: () => [] } }, data: function() { return { pubMedReferences: [], openLibReferences: [], isbnDBReferences: [], referecesListContent: "", citationOptions: a$e, citationType: Lk, crosscite_host: o$e }; }, watch: { resources: function(e) { this.formatReferences([...e]), this.getCitationText(Lk); } }, computed: { referencesWithDOI: function() { return this.pubMedReferences.filter((e) => e.type === "doi" || e.doi).length; } }, mounted: function() { this.formatReferences([...this.resources]), this.getCitationText(Lk); }, methods: { showRelatedConnectivities: function(e) { this.$emit("show-reference-connectivities", e); }, formatReferences: function(e) { const t = this.extractNonPubMedReferences(e), n = e.filter((r) => !t.includes(r)); this.pubMedReferences = n.map( (r) => typeof r == "object" ? this.extractPublicationIdFromURLString(r[0]) : this.extractPublicationIdFromURLString(r) ), this.pubMedReferences.forEach((r) => { if (r.type === "pmc") { const o = r.id; this.searchPMID(o).then((a) => { if (a && a.esearchresult) { const i = a.esearchresult.idlist || []; r.id = i[0], r.type = "pmid"; } }); } }), this.formatNonPubMedReferences(t).then((r) => { this.openLibReferences = r.filter((o) => o.type === "openlib"), this.isbnDBReferences = r.filter((o) => o.type === "isbndb"), this.formatOpenLibReferences(); }); }, extractNonPubMedReferences: function(e) { const t = [], n = this.getPubMedDomains(); return e.forEach((r) => { let o = 0; n.forEach((a) => { r.includes(a) && o++; }), o || t.push(r); }), t; }, formatNonPubMedReferences: async function(e) { const t = [], n = e.filter((u) => u.indexOf("isbn") !== -1), r = n.map((u) => "ISBN:" + u.split("/").pop()), o = r.join(","), a = r.slice(), i = (u) => n.find((c) => c.includes(u)), s = `https://openlibrary.org/api/books?bibkeys=${o}&format=json`, l = await this.fetchData(s); for (const u in l) { const c = a.indexOf(u); a.splice(c, 1); const d = l[u].info_url, p = d.split("/"), h = p.indexOf("books"), f = p[h + 1], v = u.split(":")[1], m = i(v); t.push({ id: v, type: "openlib", url: d, bookId: f, resource: m }); } return a.forEach((u) => { const c = u.split(":")[1], d = `https://isbndb.com/book/${c}`, p = i(c); t.push({ id: c, url: d, type: "isbndb", resource: p }); }), t; }, extractPublicationIdFromURLString: function(e) { if (!e) return; const t = decodeURIComponent(e); let n = { id: "", type: "", citation: {}, resource: e }; return this.getPubMedDomains().forEach((r) => { const o = t.lastIndexOf(r); o !== -1 && (n.id = t.slice(o + r.length), r === "doi.org/" ? n.type = "doi" : r === "pmc/articles/" ? n.type = "pmc" : n.type = "pmid"); }), n.id === "" && (e.includes("doi:") ? (n.id = this.stripPMIDPrefix(e), n.type = "doi") : e.includes("PMID:") && (n.id = this.stripPMIDPrefix(e), n.type = "pmid")), n.id.endsWith("/") && (n.id = n.id.slice(0, -1)), n; }, getPubMedDomains: function() { return [ "doi.org/", "nih.gov/pubmed/", "pmc/articles/", "pubmed.ncbi.nlm.nih.gov/" ]; }, stripPMIDPrefix: function(e) { return e.split(":")[1]; }, onCitationFormatChange: function(e) { this.citationType = e, this.getCitationText(e); }, generateCitationText: function(e, t) { const { id: n, type: r, doi: o } = e; if (!(e.citation && e.citation[t]) && n) if (e.citation[t] = "", e.citation.error = null, r === "doi" || o) { const a = r === "doi" ? n : o; this.getCitationTextByDOI(a).then((i) => { const s = this.replaceLinkInText(i); e.citation[t] = s, this.updateCopyContents(); }).catch((i) => { e.citation.error = { type: t, ref: "doi" }; }); } else r === "pmid" && this.getDOIFromPubMedID(n).then((a) => { if (a != null && a.result) { const i = a.result[n], s = ((i == null ? void 0 : i.articleids) || []).find((u) => u.idtype === "doi"), l = s == null ? void 0 : s.value; if (l) e.doi = l, this.getCitationTextByDOI(l).then((u) => { const c = this.replaceLinkInText(u); e.citation[t] = c, this.updateCopyContents(); }).catch((u) => { e.citation.error = { type: t, ref: "doi" }; }); else { const { title: u, pubdate: c, authors: d } = i, p = d ? d.map((f) => f.name) : [], h = this.formatCopyReference({ title: u || "", date: c || "", authors: p, url: `https://pubmed.ncbi.nlm.nih.gov/${n}` }); e.citation[t] = h, this.updateCopyContents(); } } }).catch((a) => { e.citation.error = { type: t, ref: "pubmed" }; }); }, getCitationText: function(e) { async function t(n) { for (let r = 0; r < n.pubMedReferences.length; r++) n.generateCitationText(n.pubMedReferences[r], e), n.pubMedReferences.length > 3 && r < n.pubMedReferences.length - 1 && await kSe(i$e); } t(this); }, reloadCitation: function(e) { this.generateCitationText(e, this.citationType); }, isCitationLoading: function(e) { return e && !e[this.citationType] && !e.error; }, isCitationError: function(e) { return e && e.error && e.error.type === this.citationType; }, updateCopyContents: function() { const e = this.citationOptions.find((r) => r.value === this.citationType); let t = ""; const n = []; if (this.referencesWithDOI && (t = e == null ? void 0 : e.label), this.pubMedReferences.forEach((r) => { n.push(r.citation[this.citationType]); }), this.openLibReferences.forEach((r) => { n.push(this.formatCopyReference(r)); }), this.isbnDBReferences.forEach((r) => { n.push(r.url); }), n.length) { const r = ``, o = "
References
"; this.referecesListContent = o + ` ` + r; } this.$emit("references-loaded", { style: t, list: n }); }, replaceLinkInText: function(e) { const t = "https://"; let n = e.split(t)[1]; if (n) { n = n.split(" ")[0], n = n.trim(), n.endsWith(".") && (n = n.substring(0, n.length - 1)); const r = t + n, o = `${r}`; return e.replace(r, o); } return e; }, searchPMID: async function(e) { const t = `https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=pubmed&term=${e}&format=json`; return await this.fetchData(t); }, getCitationTextByDOI: async function(e) { const t = `${this.crosscite_host}/format?doi=${e}&style=${this.citationType}&lang=en-US`; return await this.fetchData(t, "text"); }, getDOIFromPubMedID: async function(e) { const t = `https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esummary.fcgi?db=pubmed&id=${e}&format=json`; return await this.fetchData(t); }, formatOpenLibReferences: function() { this.openLibReferences.forEach((e) => { const { bookId: t } = e; this.getBookData(t).then((n) => { const { title: r, authors: o, publish_date: a } = n; r && (e.title = r), a && (e.date = a), o && (e.authors = [], o.forEach((i) => { this.getBookAuthor(i.key).then((s) => { const { name: l } = s; l && (e.authors.push(l), this.updateCopyContents()); }); })), this.updateCopyContents(); }); }); }, getBookData: async function(e) { const t = `https://openlibrary.org/books/${e}.json`; return await this.fetchData(t); }, getBookAuthor: async function(e) { const t = `https://openlibrary.org${e}.json`; return await this.fetchData(t); }, formatCopyReference: function(e) { const t = [], { title: n, date: r, authors: o, url: a } = e; return n && t.push(n), r && t.push(`(${r})`), o && t.push(`- ${o.join(", ")}`), t.push(`
${a}
`), t.join(" "); }, fetchData: async function(e, t) { try { const n = await fetch(e); if (!n.ok) throw new Error(`Response status: ${n.status}`); return t === "text" ? await n.text() : await n.json(); } catch (n) { throw new Error(n); } } } }, Hu = (e) => (Ci("data-v-a49d7266"), e = e(), _i(), e), l$e = { class: "resource-container" }, u$e = { class: "attribute-title-container" }, c$e = /* @__PURE__ */ Hu(() => /* @__PURE__ */ D("div", { class: "attribute-title" }, "References", -1)), d$e = { class: "copy-button" }, p$e = { key: 0, class: "citation-tabs" }, f$e = { class: "citation-list" }, h$e = /* @__PURE__ */ Hu(() => /* @__PURE__ */ D("span", null, "Internal Server Error", -1)), v$e = /* @__PURE__ */ Hu(() => /* @__PURE__ */ D("br", null, null, -1)), g$e = /* @__PURE__ */ Hu(() => /* @__PURE__ */ D("br", null, null, -1)), m$e = ["href"], y$e = /* @__PURE__ */ Hu(() => /* @__PURE__ */ D("br", null, null, -1)), b$e = /* @__PURE__ */ Hu(() => /* @__PURE__ */ D("span", null, "Sorry, something went wrong.", -1)), w$e = /* @__PURE__ */ Hu(() => /* @__PURE__ */ D("br", null, null, -1)), x$e = ["onClick"], k$e = ["innerHTML"], C$e = ["innerHTML"], _$e = ["href"]; function S$e(e, t, n, r, o, a) { const i = Ru, s = ua, l = Mj; return S(), L("div", l$e, [ D("div", u$e, [ c$e, D("div", d$e, [ q(i, { label: "Copy list to clipboard", content: e.referecesListContent }, null, 8, ["content"]) ]) ]), a.referencesWithDOI ? (S(), L("div", p$e, [ (S(!0), L(Re, null, mt(e.citationOptions, (u) => (S(), re(s, { link: "", key: u.value, type: e.citationType === u.value ? "primary" : "", onClick: (c) => a.onCitationFormatChange(u.value) }, { default: N(() => [ Oe(ge(u.label), 1) ]), _: 2 }, 1032, ["type", "onClick"]))), 128)) ])) : J("", !0), D("ul", f$e, [ (S(!0), L(Re, null, mt(e.pubMedReferences, (u) => { var c, d, p, h; return S(), L("li", { key: u.id, class: H({ loading: a.isCitationLoading(u.citation), error: a.isCitationError(u.citation) }) }, [ u.citation ? (S(), L(Re, { key: 0 }, [ ((c = u.citation.error) == null ? void 0 : c.ref) === "doi" && ((d = u.citation.error) == null ? void 0 : d.type) === e.citationType ? (S(), L(Re, { key: 0 }, [ h$e, v$e, Oe(" Sorry, something went wrong."), g$e, Oe(" The dataset citation generator ("), D("a", { href: e.crosscite_host, target: "_blank" }, ge(e.crosscite_host), 9, m$e), Oe(") encountered an internal error and was unable to complete your request."), y$e, Oe(" Please come back later. ") ], 64)) : ((p = u.citation.error) == null ? void 0 : p.ref) === "pubmed" && ((h = u.citation.error) == null ? void 0 : h.type) === e.citationType ? (S(), L(Re, { key: 1 }, [ b$e, w$e, Oe(" Please try again. "), D("span", { class: "reload-button", onClick: (f) => a.reloadCitation(u) }, "Reload", 8, x$e) ], 64)) : (S(), L(Re, { key: 2 }, [ D("span", { innerHTML: u.citation[e.citationType] }, null, 8, k$e), q(l, { resource: u.resource, onShowRelatedConnectivities: a.showRelatedConnectivities }, null, 8, ["resource", "onShowRelatedConnectivities"]), q(i, { content: u.citation[e.citationType] }, null, 8, ["content"]) ], 64)) ], 64)) : J("", !0) ], 2); }), 128)), (S(!0), L(Re, null, mt(e.openLibReferences, (u) => (S(), L("li", { key: u.id }, [ D("div", { innerHTML: a.formatCopyReference(u) }, null, 8, C$e), q(l, { resource: u.resource, onShowRelatedConnectivities: a.showRelatedConnectivities }, null, 8, ["resource", "onShowRelatedConnectivities"]), q(i, { content: a.formatCopyReference(u) }, null, 8, ["content"]) ]))), 128)), (S(!0), L(Re, null, mt(e.isbnDBReferences, (u) => (S(), L("li", { key: u.id }, [ D("a", { href: u.url, target: "_blank" }, ge(u.url), 9, _$e), q(l, { resource: u.resource, onShowRelatedConnectivities: a.showRelatedConnectivities }, null, 8, ["resource", "onShowRelatedConnectivities"]), q(i, { content: u.url }, null, 8, ["content"]) ]))), 128)) ]) ]); } const $$e = /* @__PURE__ */ wl(s$e, [["render", S$e], ["__scopeId", "data-v-a49d7266"]]); async function E$e(e, t) { try { const n = await fetch(e, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify(t) }); if (!n.ok) throw new Error(`API Error: ${n.status} ${n.statusText}`); return await n.json(); } catch (n) { throw console.error("Request failed:", n), n; } } async function Xg(e) { const { flatmapAPI: t, knowledgeSource: n, queryId: r, parameters: o, orderId: a } = e, i = `${t}competency/query`, s = Array.isArray(o) ? [...o] : []; s.push({ column: "source_id", value: n }); let l; if (typeof r == "number") l = r.toString(); else if (typeof r == "string") l = r; else throw new TypeError("queryId must be a string or a number convertible to string."); const u = { query_id: l, parameters: s }; return a && (u.order = [a]), E$e(i, u); } async function hP(e, t, n) { var r, o; const a = Array.isArray(n) ? n : [n], i = a[0].startsWith("ilxtr:"), s = i ? 23 : 1, l = i ? "path_id" : "feature_id", u = i ? a : [], c = await Xg({ flatmapAPI: e, knowledgeSource: t, queryId: s, parameters: [ { column: l, value: a } ] }), d = ((o = (r = c == null ? void 0 : c.results) == null ? void 0 : r.values) == null ? void 0 : o.map((f) => f[1])) || [], p = [.../* @__PURE__ */ new Set([...u, ...d])]; let h = []; return p.length && (h = await Dj(e, t, p)), [.../* @__PURE__ */ new Set([...p, ...h])]; } function Rk(e) { const t = []; for (const n of e) { const r = JSON.parse(n); Array.isArray(r) && r.length >= 2 && Array.isArray(r[1]) && r[1].length === 0 && t.push(r[0]); } return t; } async function Dj(e, t, n) { var r; const o = await Xg({ flatmapAPI: e, knowledgeSource: t, queryId: 26, parameters: [ { column: "path_id", value: n } ] }); if ((r = o == null ? void 0 : o.results) != null && r.values) { const a = o.results.values.map((i) => i[2]); return [...new Set(a)]; } return []; } async function O$e({ flatmapAPI: e, knowledgeSource: t, origins: n, destinations: r, vias: o }) { var a, i, s, l; const u = Rk(n), c = Rk(r), d = Rk(o), p = [ { column: "source_feature_id", value: u }, { column: "via_feature_id", value: d }, { column: "dest_feature_id", value: c } ], h = [ { column: "source_node_id", value: n }, { column: "via_node_id", value: o }, { column: "dest_node_id", value: r } ], f = p.some((C) => Array.isArray(C.value) && C.value.length > 0), v = [ Xg({ flatmapAPI: e, knowledgeSource: t, queryId: 24, parameters: h }) ]; f && v.push( Xg({ flatmapAPI: e, knowledgeSource: t, queryId: 25, parameters: p }) ); const m = await Promise.all(v); let g = [], b; if (f) { const C = m[0]; b = m[1], g = ((i = (a = C == null ? void 0 : C.results) == null ? void 0 : a.values) == null ? void 0 : i.map((_) => _[1])) || []; } else b = m[0]; const x = ((l = (s = b == null ? void 0 : b.results) == null ? void 0 : s.values) == null ? void 0 : l.map((C) => C[1])) || [], w = [.../* @__PURE__ */ new Set([...g, ...x])]; let k = []; return w.length && (k = await Dj(e, t, w)), [.../* @__PURE__ */ new Set([...w, ...k])]; } const Nk = []; async function F$e(e, t) { const n = t.filter( (a) => Nk.some((i) => i.taxon === a) ), r = Nk.filter( (a) => n.includes(a.taxon) ), o = t.filter( (a) => !n.includes(a) ); if (o.length) { const a = await e.queryLabels(o); if (a.length) return a.forEach((i) => { let { entity: s, label: l } = i; l === "Mammalia" && (l = "Mammalia not otherwise specified"); const u = { taxon: s, label: l }; r.push(u), Nk.push(u); }), r; } else return r; } async function T$e(e, t, n) { const r = `${e}knowledge/query/`, o = { sql: t, params: n }; try { const a = await fetch(r, { method: "POST", headers: { Accept: "application/json; charset=utf-8", "Content-Type": "application/json" }, body: JSON.stringify(o) }); if (!a.ok) throw new Error(`Cannot access ${r}`); return await a.json(); } catch { return { values: [] }; } } async function A$e(e, t) { return t.length ? await (await T$e( e, `select entity, knowledge from knowledge where entity in (?${", ?".repeat(t.length - 1)}) order by source desc`, [...t] )).values : []; } function Q$(e) { if (!Array.isArray(e.connectivity)) return []; const t = /* @__PURE__ */ new Set(); return e.connectivity.forEach((n) => { Array.isArray(n) && n.length && n.forEach((r) => { if (Array.isArray(r) && typeof r[0] == "string") { const o = JSON.stringify(r); t.add(o); } }); }), Array.from(t); } function gf(e, t) { var n; const r = (n = e["node-phenotypes"]) == null ? void 0 : n[t]; return Array.isArray(r) ? r : []; } async function eE(e, t, n) { const r = Array.from( new Map(n.map((l) => [JSON.stringify(l), l])).values() ), o = r.flat(1 / 0), a = [...new Set(o)], i = (await A$e(e, a)).reduce((l, u) => { const c = u[0], d = JSON.parse(u[1]); return d.source === t && l.push({ id: c, label: d.label }), l; }, []), s = []; return [...r.map((l) => { const u = l.flat(), c = []; for (let d = 0; d < u.length; d++) { const p = i.find((h) => h.id === u[d]); p && (c.push(p.label), d > 0 && s.push({ key: [u[d], []], label: p.label })); } return { key: l, label: c.join(", ") }; }), ...s].filter( (l, u, c) => u === c.findIndex((d) => d.label === l.label) ); } async function I$e(e, t, n) { const r = []; return n.forEach((o) => { if (!Array.isArray(o.connectivity) || o.connectivity.length === 0) return; const a = new Set(Q$(o)); gf(o, "ilxtr:hasSomaLocatedIn").forEach((i) => { const s = JSON.stringify(i); a.has(s) && r.push(i); }); }), await eE(e, t, r); } async function P$e(e, t, n) { const r = []; return n.forEach((o) => { if (!Array.isArray(o.connectivity) || o.connectivity.length === 0) return; const a = new Set(Q$(o)); [ ...gf(o, "ilxtr:hasAxonPresynapticElementIn"), ...gf(o, "ilxtr:hasAxonSensorySubcellularElementIn") ].forEach((i) => { const s = JSON.stringify(i); a.has(s) && r.push(i); }); }), await eE(e, t, r); } async function L$e(e, t, n) { const r = []; return n.forEach((o) => { if (!Array.isArray(o.connectivity) || o.connectivity.length === 0) return; const a = new Set(Q$(o)); [ ...gf(o, "ilxtr:hasAxonLeadingToSensorySubcellularElementIn"), ...gf(o, "ilxtr:hasAxonLocatedIn") ].forEach((i) => { const s = JSON.stringify(i); a.has(s) && r.push(i); }); }), await eE(e, t, r); } async function QWe(e, t, n, r) { let o = []; const a = []; if (t) { if (t && typeof t.featureFilterRanges == "function") { const h = t.featureFilterRanges(); for (const [f, v] of Object.entries(h)) { let m = { key: `flatmap.connectivity.${f}`, label: "", children: [] }, g = []; if (f === "kind") { m.label = "Pathways"; for (const b of v) { const x = r.find((w) => w.type === b); x && g.push({ key: `${m.key}.${b}`, label: x.label, colour: x.colour, colourStyle: "line", dashed: x.dashed }); } } else if (f === "taxons") { m.label = "Studied in"; const b = await F$e(t, t.taxonIdentifiers); if (b.length) for (const x of v) { const w = b.find((k) => k.taxon === x); w && g.push({ key: `${m.key}.${x}`, // space added at the end of label to make sure the display name will not be updated // prevent sidebar searchfilter convertReadableLabel label: `${w.label} ` }); } } else if (f === "alert") { m.label = "Alert"; for (const b of ["with", "without"]) g.push({ key: `${m.key}.${b}`, label: `${b} alerts` }); } m.children = g.sort((b, x) => b.label.localeCompare(x.label)), m.label && m.children.length && o.push(m); } } const i = t.pathways.paths, s = n.reduce((h, f) => { const v = f.id; if (v) { const m = i[v]; if (m && m.connectivity && m["node-phenotypes"]) { const g = m.connectivity, b = m["node-phenotypes"]; f.connectivity = [...g]; for (let x in f["node-phenotypes"]) b[x] && (f["node-phenotypes"][x] = [...b[x]]); h.push(JSON.parse(JSON.stringify(f))); } } return h; }, []), l = t.knowledgeSource, u = await I$e(e, l, s), c = await L$e(e, l, s), d = await P$e(e, l, s), p = (h, f) => { const v = JSON.stringify(f.key); return { key: `flatmap.connectivity.source.${h}.${v}`, label: f.label || v }; }; for (const h of ["origin", "via", "destination", "all"]) { let f = []; if (h === "origin") f = u.map((v) => p(h, v)); else if (h === "via") f = c.map((v) => p(h, v)); else if (h === "destination") f = d.map((v) => p(h, v)); else { const v = [ ...u.map((g) => p(h, g)), ...c.map((g) => p(h, g)), ...d.map((g) => p(h, g)) ], m = /* @__PURE__ */ new Set(); f = v.filter((g) => m.has(g.key) ? !1 : (m.add(g.key), !0)); } f = f.sort((v, m) => { const g = (w) => /^[a-zA-Z]/.test(w), b = g(v.label), x = g(m.label); return b && !x ? -1 : !b && x ? 1 : v.label.localeCompare(m.label); }), f.length && a.push({ key: `flatmap.connectivity.source.${h}`, label: h, children: f }); } a.length && o.push(...a); } return o; } function R$e(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 ft = new R$e(), jn = { sendEvent: function(e) { const t = { event: e.event || "", event_name: e.event_name || "", files: e.files || "", file_name: e.file_name || "", file_path: e.file_path || "", file_type: e.file_type || "", category: e.category || "", dataset_id: e.dataset_id || "", version_id: e.version_id || "", doi: e.doi || "", citation_type: e.citation_type || "", location: e.location || "" }; localStorage.getItem("debugTagging") === "yes" && console.table(t), ft.emit("trackEvent", t); } }, N$e = { 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; } } }, yu = Df("settings", { state: () => ({ shareLink: void 0, sparcApi: void 0, algoliaIndex: "k-core_dev_published_time_desc", algoliaKey: void 0, algoliaId: void 0, pennsieveApi: void 0, flatmapAPI: void 0, nlLinkPrefix: void 0, mapManager: void 0, rootUrl: void 0, facets: { species: [], gender: [], organ: [] }, appliedFacets: [], numberOfDatasetsForFacets: [], markers: [], hoverAnatomies: [], hoverOrgans: [], hoverDOI: "", hoverConnectivity: [], featuredMarkers: [], featuredMarkerIdentifiers: [], featuredMarkerDois: [], featuredMarkerSpecies: [], featuredDatasetIdentifiers: [], helpDelay: 0, useHelpModeDialog: !1, connectivityInfoSidebar: !0, annotationSidebar: !0, allClosable: !0, offlineAnnotationEnabled: !1, globalSettings: { displayMarkers: !0, // comment out to hide in settings // highlightConnectedPaths: false, // comment out to hide in settings // highlightDOIPaths: false, // comment out to hide in settings interactiveMode: "dataset", // dataset, connectivity, multiscale // comment out to hide in settings viewingMode: "Exploration", flightPathDisplay: !1, organsDisplay: !0, outlinesDisplay: !0, backgroundDisplay: "white", connectionType: "All" // 'Origin', 'Via', 'Destination', 'All } }), getters: { isFeaturedMarkerIdentifier: (e) => (t) => e.featuredMarkerIdentifiers.flat(1 / 0).includes(t), featuredMarkerDoi: (e) => (t) => { const n = e.featuredMarkerIdentifiers.findIndex( (r) => r == t ); return e.featuredMarkerDois[n]; }, getGlobalSettings: (e) => () => { const t = {}; for (const [n, r] of Object.entries(e.globalSettings)) t[n] = r; return t; }, getUpdatedGlobalSettingsKey: (e) => (t) => { let n = []; for (const [r, o] of Object.entries(t)) { const a = e.globalSettings[r]; (a === void 0 || a !== o) && n.push(r); } return n; }, hasAppliedFacets: (e) => (t) => { for (const n of t) for (const r of e.appliedFacets) if (n.toLowerCase() === r.toLowerCase()) return !0; return !1; } }, actions: { updateShareLink(e) { this.shareLink = e; }, updateSparcAPI(e) { this.sparcApi = e; }, updateAlgoliaIndex(e) { this.algoliaIndex = e; }, updateAlgoliaKey(e) { this.algoliaKey = e; }, updateAlgoliaId(e) { this.algoliaId = e; }, updatePennsieveApi(e) { this.pennsieveApi = e; }, updateFlatmapAPI(e) { this.flatmapAPI = e; }, updateMapManager(e) { this.mapManager = e; }, updateNLLinkPrefix(e) { this.nlLinkPrefix = e; }, updateRootUrl(e) { this.rootUrl = e; }, updateMarkers(e) { this.markers = e; }, updateHoverFeatures(e, t, n, r) { this.hoverAnatomies = e, this.hoverOrgans = t, this.hoverDOI = n, this.hoverConnectivity = r; }, updateFeatured(e) { this.featuredMarkerIdentifiers = new Array(e.length), this.featuredMarkers = new Array(e.length), this.featuredMarkerDois = new Array(e.length), this.featuredMarkerSpecies = new Array(e.length), this.featuredDatasetIdentifiers = e; }, updateFeaturedMarker(e) { const t = this.featuredDatasetIdentifiers.findIndex( (n) => n == e.identifier ); this.featuredMarkers[t] = e.marker, this.featuredMarkerDois[t] = e.doi, this.featuredMarkerSpecies[t] = e.species; }, updateFeaturedMarkerIdentifier(e) { this.featuredMarkerIdentifiers[e.index] = e.markerIdentifier; }, resetFeaturedMarkerIdentifier() { this.featuredMarkerIdentifiers = new Array( this.featuredDatasetIdentifiers.length ); }, updateAppliedFacets(e) { this.appliedFacets = e; }, updateFacets(e) { let t = { species: [], gender: [], organ: [] }; if (e) { e.forEach((n) => { switch (n.term.toLowerCase()) { case "species": n.facet.toLowerCase() !== "show all" ? (t.species.push(n.facet), this.facets.species.includes(n.facet) || this.facets.species.push(n.facet)) : this.facets.species = []; break; case "gender": n.facet.toLowerCase() !== "show all" && (t.gender.push(n.facet), this.facets.species.includes(n.facet) || this.facets.gender.push(n.facet)); break; case "organ": n.facet.toLowerCase() !== "show all" && (t.organ.push(n.facet), this.facets.species.includes(n.facet) || this.facets.organ.push(n.facet)); break; } }); for (const [n, r] of Object.entries(this.facets)) { let o = 0; for (o = r.length - 1; o >= 0; o -= 1) t[n].indexOf(r[o]) == -1 && r.splice(o, 1); } } }, updateNumberOfDatasetsForFacets(e) { this.numberOfDatasetsForFacets = e; }, updateUseHelpModeDialog(e) { this.useHelpModeDialog = e; }, updateConnectivityInfoSidebar(e) { this.connectivityInfoSidebar = e; }, updateAnnotationSidebar(e) { this.annotationSidebar = e; }, updateAllClosable(e) { this.allClosable = e; }, updateOfflineAnnotationEnabled(e) { this.offlineAnnotationEnabled = e; }, updateGlobalSettings(e) { for (const [t, n] of Object.entries(e)) this.globalSettings[t] = n; localStorage.setItem("mapviewer.globalSettings", JSON.stringify(this.globalSettings)); } } }); function Bj() { return { async: !1, baseUrl: null, breaks: !1, extensions: null, gfm: !0, headerIds: !0, headerPrefix: "", highlight: null, hooks: null, langPrefix: "language-", mangle: !0, pedantic: !1, renderer: null, sanitize: !1, sanitizer: null, silent: !1, smartypants: !1, tokenizer: null, walkTokens: null, xhtml: !1 }; } let Uu = Bj(); function M$e(e) { Uu = e; } const zj = /[&<>"']/, D$e = new RegExp(zj.source, "g"), jj = /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, B$e = new RegExp(jj.source, "g"), z$e = { "&": "&", "<": "<", ">": ">", '"': """, "'": "'" }, vP = (e) => z$e[e]; function Ur(e, t) { if (t) { if (zj.test(e)) return e.replace(D$e, vP); } else if (jj.test(e)) return e.replace(B$e, vP); return e; } const j$e = /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig; function Vj(e) { return e.replace(j$e, (t, n) => (n = n.toLowerCase(), n === "colon" ? ":" : n.charAt(0) === "#" ? n.charAt(1) === "x" ? String.fromCharCode(parseInt(n.substring(2), 16)) : String.fromCharCode(+n.substring(1)) : "")); } const V$e = /(^|[^\[])\^/g; function fn(e, t) { e = typeof e == "string" ? e : e.source, t = t || ""; const n = { replace: (r, o) => (o = o.source || o, o = o.replace(V$e, "$1"), e = e.replace(r, o), n), getRegex: () => new RegExp(e, t) }; return n; } const H$e = /[^\w:]/g, U$e = /^$|^[a-z][a-z0-9+.-]*:|^[?#]/i; function gP(e, t, n) { if (e) { let r; try { r = decodeURIComponent(Vj(n)).replace(H$e, "").toLowerCase(); } catch { return null; } if (r.indexOf("javascript:") === 0 || r.indexOf("vbscript:") === 0 || r.indexOf("data:") === 0) return null; } t && !U$e.test(n) && (n = W$e(t, n)); try { n = encodeURI(n).replace(/%25/g, "%"); } catch { return null; } return n; } const hv = {}, q$e = /^[^:]+:\/*[^/]*$/, K$e = /^([^:]+:)[\s\S]*$/, G$e = /^([^:]+:\/*[^/]*)[\s\S]*$/; function W$e(e, t) { hv[" " + e] || (q$e.test(e) ? hv[" " + e] = e + "/" : hv[" " + e] = og(e, "/", !0)), e = hv[" " + e]; const n = e.indexOf(":") === -1; return t.substring(0, 2) === "//" ? n ? t : e.replace(K$e, "$1") + t : t.charAt(0) === "/" ? n ? t : e.replace(G$e, "$1") + t : e + t; } const Zg = { exec: function() { } }; function mP(e, t) { const n = e.replace(/\|/g, (a, i, s) => { let l = !1, u = i; for (; --u >= 0 && s[u] === "\\"; ) l = !l; return l ? "|" : " |"; }), r = n.split(/ \|/); let o = 0; if (r[0].trim() || r.shift(), r.length > 0 && !r[r.length - 1].trim() && r.pop(), r.length > t) r.splice(t); else for (; r.length < t; ) r.push(""); for (; o < r.length; o++) r[o] = r[o].trim().replace(/\\\|/g, "|"); return r; } function og(e, t, n) { const r = e.length; if (r === 0) return ""; let o = 0; for (; o < r; ) { const a = e.charAt(r - o - 1); if (a === t && !n) o++; else if (a !== t && n) o++; else break; } return e.slice(0, r - o); } function Y$e(e, t) { if (e.indexOf(t[1]) === -1) return -1; const n = e.length; let r = 0, o = 0; for (; o < n; o++) if (e[o] === "\\") o++; else if (e[o] === t[0]) r++; else if (e[o] === t[1] && (r--, r < 0)) return o; return -1; } function X$e(e) { e && e.sanitize && !e.silent && console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options"); } function yP(e, t) { if (t < 1) return ""; let n = ""; for (; t > 1; ) t & 1 && (n += e), t >>= 1, e += e; return n + e; } function bP(e, t, n, r) { const o = t.href, a = t.title ? Ur(t.title) : null, i = e[1].replace(/\\([\[\]])/g, "$1"); if (e[0].charAt(0) !== "!") { r.state.inLink = !0; const s = { type: "link", raw: n, href: o, title: a, text: i, tokens: r.inlineTokens(i) }; return r.state.inLink = !1, s; } return { type: "image", raw: n, href: o, title: a, text: Ur(i) }; } function Z$e(e, t) { const n = e.match(/^(\s+)(?:```)/); if (n === null) return t; const r = n[1]; return t.split(` `).map((o) => { const a = o.match(/^\s+/); if (a === null) return o; const [i] = a; return i.length >= r.length ? o.slice(r.length) : o; }).join(` `); } class tE { constructor(t) { this.options = t || Uu; } space(t) { const n = this.rules.block.newline.exec(t); if (n && n[0].length > 0) return { type: "space", raw: n[0] }; } code(t) { const n = this.rules.block.code.exec(t); if (n) { const r = n[0].replace(/^ {1,4}/gm, ""); return { type: "code", raw: n[0], codeBlockStyle: "indented", text: this.options.pedantic ? r : og(r, ` `) }; } } fences(t) { const n = this.rules.block.fences.exec(t); if (n) { const r = n[0], o = Z$e(r, n[3] || ""); return { type: "code", raw: r, lang: n[2] ? n[2].trim().replace(this.rules.inline._escapes, "$1") : n[2], text: o }; } } heading(t) { const n = this.rules.block.heading.exec(t); if (n) { let r = n[2].trim(); if (/#$/.test(r)) { const o = og(r, "#"); (this.options.pedantic || !o || / $/.test(o)) && (r = o.trim()); } return { type: "heading", raw: n[0], depth: n[1].length, text: r, tokens: this.lexer.inline(r) }; } } hr(t) { const n = this.rules.block.hr.exec(t); if (n) return { type: "hr", raw: n[0] }; } blockquote(t) { const n = this.rules.block.blockquote.exec(t); if (n) { const r = n[0].replace(/^ *>[ \t]?/gm, ""), o = this.lexer.state.top; this.lexer.state.top = !0; const a = this.lexer.blockTokens(r); return this.lexer.state.top = o, { type: "blockquote", raw: n[0], tokens: a, text: r }; } } list(t) { let n = this.rules.block.list.exec(t); if (n) { let r, o, a, i, s, l, u, c, d, p, h, f, v = n[1].trim(); const m = v.length > 1, g = { type: "list", raw: "", ordered: m, start: m ? +v.slice(0, -1) : "", loose: !1, items: [] }; v = m ? `\\d{1,9}\\${v.slice(-1)}` : `\\${v}`, this.options.pedantic && (v = m ? v : "[*+-]"); const b = new RegExp(`^( {0,3}${v})((?:[ ][^\\n]*)?(?:\\n|$))`); for (; t && (f = !1, !(!(n = b.exec(t)) || this.rules.block.hr.test(t))); ) { if (r = n[0], t = t.substring(r.length), c = n[2].split(` `, 1)[0].replace(/^\t+/, (w) => " ".repeat(3 * w.length)), d = t.split(` `, 1)[0], this.options.pedantic ? (i = 2, h = c.trimLeft()) : (i = n[2].search(/[^ ]/), i = i > 4 ? 1 : i, h = c.slice(i), i += n[1].length), l = !1, !c && /^ *$/.test(d) && (r += d + ` `, t = t.substring(d.length + 1), f = !0), !f) { const w = new RegExp(`^ {0,${Math.min(3, i - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), k = new RegExp(`^ {0,${Math.min(3, i - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), C = new RegExp(`^ {0,${Math.min(3, i - 1)}}(?:\`\`\`|~~~)`), _ = new RegExp(`^ {0,${Math.min(3, i - 1)}}#`); for (; t && (p = t.split(` `, 1)[0], d = p, this.options.pedantic && (d = d.replace(/^ {1,4}(?=( {4})*[^ ])/g, " ")), !(C.test(d) || _.test(d) || w.test(d) || k.test(t))); ) { if (d.search(/[^ ]/) >= i || !d.trim()) h += ` ` + d.slice(i); else { if (l || c.search(/[^ ]/) >= 4 || C.test(c) || _.test(c) || k.test(c)) break; h += ` ` + d; } !l && !d.trim() && (l = !0), r += p + ` `, t = t.substring(p.length + 1), c = d.slice(i); } } g.loose || (u ? g.loose = !0 : /\n *\n *$/.test(r) && (u = !0)), this.options.gfm && (o = /^\[[ xX]\] /.exec(h), o && (a = o[0] !== "[ ] ", h = h.replace(/^\[[ xX]\] +/, ""))), g.items.push({ type: "list_item", raw: r, task: !!o, checked: a, loose: !1, text: h }), g.raw += r; } g.items[g.items.length - 1].raw = r.trimRight(), g.items[g.items.length - 1].text = h.trimRight(), g.raw = g.raw.trimRight(); const x = g.items.length; for (s = 0; s < x; s++) if (this.lexer.state.top = !1, g.items[s].tokens = this.lexer.blockTokens(g.items[s].text, []), !g.loose) { const w = g.items[s].tokens.filter((C) => C.type === "space"), k = w.length > 0 && w.some((C) => /\n.*\n/.test(C.raw)); g.loose = k; } if (g.loose) for (s = 0; s < x; s++) g.items[s].loose = !0; return g; } } html(t) { const n = this.rules.block.html.exec(t); if (n) { const r = { type: "html", raw: n[0], pre: !this.options.sanitizer && (n[1] === "pre" || n[1] === "script" || n[1] === "style"), text: n[0] }; if (this.options.sanitize) { const o = this.options.sanitizer ? this.options.sanitizer(n[0]) : Ur(n[0]); r.type = "paragraph", r.text = o, r.tokens = this.lexer.inline(o); } return r; } } def(t) { const n = this.rules.block.def.exec(t); if (n) { const r = n[1].toLowerCase().replace(/\s+/g, " "), o = n[2] ? n[2].replace(/^<(.*)>$/, "$1").replace(this.rules.inline._escapes, "$1") : "", a = n[3] ? n[3].substring(1, n[3].length - 1).replace(this.rules.inline._escapes, "$1") : n[3]; return { type: "def", tag: r, raw: n[0], href: o, title: a }; } } table(t) { const n = this.rules.block.table.exec(t); if (n) { const r = { type: "table", header: mP(n[1]).map((o) => ({ text: o })), align: n[2].replace(/^ *|\| *$/g, "").split(/ *\| */), rows: n[3] && n[3].trim() ? n[3].replace(/\n[ \t]*$/, "").split(` `) : [] }; if (r.header.length === r.align.length) { r.raw = n[0]; let o = r.align.length, a, i, s, l; for (a = 0; a < o; a++) /^ *-+: *$/.test(r.align[a]) ? r.align[a] = "right" : /^ *:-+: *$/.test(r.align[a]) ? r.align[a] = "center" : /^ *:-+ *$/.test(r.align[a]) ? r.align[a] = "left" : r.align[a] = null; for (o = r.rows.length, a = 0; a < o; a++) r.rows[a] = mP(r.rows[a], r.header.length).map((u) => ({ text: u })); for (o = r.header.length, i = 0; i < o; i++) r.header[i].tokens = this.lexer.inline(r.header[i].text); for (o = r.rows.length, i = 0; i < o; i++) for (l = r.rows[i], s = 0; s < l.length; s++) l[s].tokens = this.lexer.inline(l[s].text); return r; } } } lheading(t) { const n = this.rules.block.lheading.exec(t); if (n) return { type: "heading", raw: n[0], depth: n[2].charAt(0) === "=" ? 1 : 2, text: n[1], tokens: this.lexer.inline(n[1]) }; } paragraph(t) { const n = this.rules.block.paragraph.exec(t); if (n) { const r = n[1].charAt(n[1].length - 1) === ` ` ? n[1].slice(0, -1) : n[1]; return { type: "paragraph", raw: n[0], text: r, tokens: this.lexer.inline(r) }; } } text(t) { const n = this.rules.block.text.exec(t); if (n) return { type: "text", raw: n[0], text: n[0], tokens: this.lexer.inline(n[0]) }; } escape(t) { const n = this.rules.inline.escape.exec(t); if (n) return { type: "escape", raw: n[0], text: Ur(n[1]) }; } tag(t) { const n = this.rules.inline.tag.exec(t); if (n) return !this.lexer.state.inLink && /^/i.test(n[0]) && (this.lexer.state.inLink = !1), !this.lexer.state.inRawBlock && /^<(pre|code|kbd|script)(\s|>)/i.test(n[0]) ? this.lexer.state.inRawBlock = !0 : this.lexer.state.inRawBlock && /^<\/(pre|code|kbd|script)(\s|>)/i.test(n[0]) && (this.lexer.state.inRawBlock = !1), { type: this.options.sanitize ? "text" : "html", raw: n[0], inLink: this.lexer.state.inLink, inRawBlock: this.lexer.state.inRawBlock, text: this.options.sanitize ? this.options.sanitizer ? this.options.sanitizer(n[0]) : Ur(n[0]) : n[0] }; } link(t) { const n = this.rules.inline.link.exec(t); if (n) { const r = n[2].trim(); if (!this.options.pedantic && /^$/.test(r)) return; const i = og(r.slice(0, -1), "\\"); if ((r.length - i.length) % 2 === 0) return; } else { const i = Y$e(n[2], "()"); if (i > -1) { const l = (n[0].indexOf("!") === 0 ? 5 : 4) + n[1].length + i; n[2] = n[2].substring(0, i), n[0] = n[0].substring(0, l).trim(), n[3] = ""; } } let o = n[2], a = ""; if (this.options.pedantic) { const i = /^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(o); i && (o = i[1], a = i[3]); } else a = n[3] ? n[3].slice(1, -1) : ""; return o = o.trim(), /^$/.test(r) ? o = o.slice(1) : o = o.slice(1, -1)), bP(n, { href: o && o.replace(this.rules.inline._escapes, "$1"), title: a && a.replace(this.rules.inline._escapes, "$1") }, n[0], this.lexer); } } reflink(t, n) { let r; if ((r = this.rules.inline.reflink.exec(t)) || (r = this.rules.inline.nolink.exec(t))) { let o = (r[2] || r[1]).replace(/\s+/g, " "); if (o = n[o.toLowerCase()], !o) { const a = r[0].charAt(0); return { type: "text", raw: a, text: a }; } return bP(r, o, r[0], this.lexer); } } emStrong(t, n, r = "") { let o = this.rules.inline.emStrong.lDelim.exec(t); if (!o || o[3] && r.match(/[\p{L}\p{N}]/u)) return; const a = o[1] || o[2] || ""; if (!a || a && (r === "" || this.rules.inline.punctuation.exec(r))) { const i = o[0].length - 1; let s, l, u = i, c = 0; const d = o[0][0] === "*" ? this.rules.inline.emStrong.rDelimAst : this.rules.inline.emStrong.rDelimUnd; for (d.lastIndex = 0, n = n.slice(-1 * t.length + i); (o = d.exec(n)) != null; ) { if (s = o[1] || o[2] || o[3] || o[4] || o[5] || o[6], !s) continue; if (l = s.length, o[3] || o[4]) { u += l; continue; } else if ((o[5] || o[6]) && i % 3 && !((i + l) % 3)) { c += l; continue; } if (u -= l, u > 0) continue; l = Math.min(l, l + u + c); const p = t.slice(0, i + o.index + (o[0].length - s.length) + l); if (Math.min(i, l) % 2) { const f = p.slice(1, -1); return { type: "em", raw: p, text: f, tokens: this.lexer.inlineTokens(f) }; } const h = p.slice(2, -2); return { type: "strong", raw: p, text: h, tokens: this.lexer.inlineTokens(h) }; } } } codespan(t) { const n = this.rules.inline.code.exec(t); if (n) { let r = n[2].replace(/\n/g, " "); const o = /[^ ]/.test(r), a = /^ /.test(r) && / $/.test(r); return o && a && (r = r.substring(1, r.length - 1)), r = Ur(r, !0), { type: "codespan", raw: n[0], text: r }; } } br(t) { const n = this.rules.inline.br.exec(t); if (n) return { type: "br", raw: n[0] }; } del(t) { const n = this.rules.inline.del.exec(t); if (n) return { type: "del", raw: n[0], text: n[2], tokens: this.lexer.inlineTokens(n[2]) }; } autolink(t, n) { const r = this.rules.inline.autolink.exec(t); if (r) { let o, a; return r[2] === "@" ? (o = Ur(this.options.mangle ? n(r[1]) : r[1]), a = "mailto:" + o) : (o = Ur(r[1]), a = o), { type: "link", raw: r[0], text: o, href: a, tokens: [ { type: "text", raw: o, text: o } ] }; } } url(t, n) { let r; if (r = this.rules.inline.url.exec(t)) { let o, a; if (r[2] === "@") o = Ur(this.options.mangle ? n(r[0]) : r[0]), a = "mailto:" + o; else { let i; do i = r[0], r[0] = this.rules.inline._backpedal.exec(r[0])[0]; while (i !== r[0]); o = Ur(r[0]), r[1] === "www." ? a = "http://" + r[0] : a = r[0]; } return { type: "link", raw: r[0], text: o, href: a, tokens: [ { type: "text", raw: o, text: o } ] }; } } inlineText(t, n) { const r = this.rules.inline.text.exec(t); if (r) { let o; return this.lexer.state.inRawBlock ? o = this.options.sanitize ? this.options.sanitizer ? this.options.sanitizer(r[0]) : Ur(r[0]) : r[0] : o = Ur(this.options.smartypants ? n(r[0]) : r[0]), { type: "text", raw: r[0], text: o }; } } } const xt = { newline: /^(?: *(?:\n|$))+/, code: /^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/, fences: /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, hr: /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, heading: /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, blockquote: /^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/, list: /^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/, html: "^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))", def: /^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/, table: Zg, lheading: /^((?:.|\n(?!\n))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, // regex template, placeholders will be replaced according to different paragraph // interruption rules of commonmark and the original markdown spec: _paragraph: /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, text: /^[^\n]+/ }; xt._label = /(?!\s*\])(?:\\.|[^\[\]\\])+/; xt._title = /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/; xt.def = fn(xt.def).replace("label", xt._label).replace("title", xt._title).getRegex(); xt.bullet = /(?:[*+-]|\d{1,9}[.)])/; xt.listItemStart = fn(/^( *)(bull) */).replace("bull", xt.bullet).getRegex(); xt.list = fn(xt.list).replace(/bull/g, xt.bullet).replace("hr", "\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def", "\\n+(?=" + xt.def.source + ")").getRegex(); xt._tag = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul"; xt._comment = /|$)/; xt.html = fn(xt.html, "i").replace("comment", xt._comment).replace("tag", xt._tag).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(); xt.paragraph = fn(xt._paragraph).replace("hr", xt.hr).replace("heading", " {0,3}#{1,6} ").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", ")|<(?:script|pre|style|textarea|!--)").replace("tag", xt._tag).getRegex(); xt.blockquote = fn(xt.blockquote).replace("paragraph", xt.paragraph).getRegex(); xt.normal = { ...xt }; xt.gfm = { ...xt.normal, table: "^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)" // Cells }; xt.gfm.table = fn(xt.gfm.table).replace("hr", xt.hr).replace("heading", " {0,3}#{1,6} ").replace("blockquote", " {0,3}>").replace("code", " {4}[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", ")|<(?:script|pre|style|textarea|!--)").replace("tag", xt._tag).getRegex(); xt.gfm.paragraph = fn(xt._paragraph).replace("hr", xt.hr).replace("heading", " {0,3}#{1,6} ").replace("|lheading", "").replace("table", xt.gfm.table).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", ")|<(?:script|pre|style|textarea|!--)").replace("tag", xt._tag).getRegex(); xt.pedantic = { ...xt.normal, html: fn( `^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))` ).replace("comment", xt._comment).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), def: /^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, heading: /^(#{1,6})(.*)(?:\n+|$)/, fences: Zg, // fences not supported lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: fn(xt.normal._paragraph).replace("hr", xt.hr).replace("heading", ` *#{1,6} *[^ ]`).replace("lheading", xt.lheading).replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").getRegex() }; const dt = { escape: /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, autolink: /^<(scheme:[^\s\x00-\x1f<>]*|email)>/, url: Zg, tag: "^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^", // CDATA section link: /^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/, reflink: /^!?\[(label)\]\[(ref)\]/, nolink: /^!?\[(ref)\](?:\[\])?/, reflinkSearch: "reflink|nolink(?!\\()", emStrong: { lDelim: /^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/, // (1) and (2) can only be a Right Delimiter. (3) and (4) can only be Left. (5) and (6) can be either Left or Right. // () Skip orphan inside strong () Consume to delim (1) #*** (2) a***#, a*** (3) #***a, ***a (4) ***# (5) #***# (6) a***a rDelimAst: /^(?:[^_*\\]|\\.)*?\_\_(?:[^_*\\]|\\.)*?\*(?:[^_*\\]|\\.)*?(?=\_\_)|(?:[^*\\]|\\.)+(?=[^*])|[punct_](\*+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|(?:[^punct*_\s\\]|\\.)(\*+)(?=[^punct*_\s])/, rDelimUnd: /^(?:[^_*\\]|\\.)*?\*\*(?:[^_*\\]|\\.)*?\_(?:[^_*\\]|\\.)*?(?=\*\*)|(?:[^_\\]|\\.)+(?=[^_])|[punct*](\_+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/ // ^- Not allowed for _ }, code: /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, br: /^( {2,}|\\)\n(?!\s*$)/, del: Zg, text: /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~"; dt.punctuation = fn(dt.punctuation).replace(/punctuation/g, dt._punctuation).getRegex(); dt.blockSkip = /\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g; dt.escapedEmSt = /(?:^|[^\\])(?:\\\\)*\\[*_]/g; dt._comment = fn(xt._comment).replace("(?:-->|$)", "-->").getRegex(); dt.emStrong.lDelim = fn(dt.emStrong.lDelim).replace(/punct/g, dt._punctuation).getRegex(); dt.emStrong.rDelimAst = fn(dt.emStrong.rDelimAst, "g").replace(/punct/g, dt._punctuation).getRegex(); dt.emStrong.rDelimUnd = fn(dt.emStrong.rDelimUnd, "g").replace(/punct/g, dt._punctuation).getRegex(); dt._escapes = /\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g; dt._scheme = /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/; dt._email = /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/; dt.autolink = fn(dt.autolink).replace("scheme", dt._scheme).replace("email", dt._email).getRegex(); dt._attribute = /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/; dt.tag = fn(dt.tag).replace("comment", dt._comment).replace("attribute", dt._attribute).getRegex(); dt._label = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/; dt._href = /<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/; dt._title = /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/; dt.link = fn(dt.link).replace("label", dt._label).replace("href", dt._href).replace("title", dt._title).getRegex(); dt.reflink = fn(dt.reflink).replace("label", dt._label).replace("ref", xt._label).getRegex(); dt.nolink = fn(dt.nolink).replace("ref", xt._label).getRegex(); dt.reflinkSearch = fn(dt.reflinkSearch, "g").replace("reflink", dt.reflink).replace("nolink", dt.nolink).getRegex(); dt.normal = { ...dt }; dt.pedantic = { ...dt.normal, strong: { start: /^__|\*\*/, middle: /^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/, endAst: /\*\*(?!\*)/g, endUnd: /__(?!_)/g }, em: { start: /^_|\*/, middle: /^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/, endAst: /\*(?!\*)/g, endUnd: /_(?!_)/g }, link: fn(/^!?\[(label)\]\((.*?)\)/).replace("label", dt._label).getRegex(), reflink: fn(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", dt._label).getRegex() }; dt.gfm = { ...dt.normal, escape: fn(dt.escape).replace("])", "~|])").getRegex(), _extended_email: /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/, url: /^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/, _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, del: /^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/, text: /^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\ 0.5 && (r = "x" + r.toString(16)), t += "&#" + r + ";"; return t; } class cl { constructor(t) { this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = t || Uu, this.options.tokenizer = this.options.tokenizer || new tE(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: !1, inRawBlock: !1, top: !0 }; const n = { block: xt.normal, inline: dt.normal }; this.options.pedantic ? (n.block = xt.pedantic, n.inline = dt.pedantic) : this.options.gfm && (n.block = xt.gfm, this.options.breaks ? n.inline = dt.breaks : n.inline = dt.gfm), this.tokenizer.rules = n; } /** * Expose Rules */ static get rules() { return { block: xt, inline: dt }; } /** * Static Lex Method */ static lex(t, n) { return new cl(n).lex(t); } /** * Static Lex Inline Method */ static lexInline(t, n) { return new cl(n).inlineTokens(t); } /** * Preprocessing */ lex(t) { t = t.replace(/\r\n|\r/g, ` `), this.blockTokens(t, this.tokens); let n; for (; n = this.inlineQueue.shift(); ) this.inlineTokens(n.src, n.tokens); return this.tokens; } /** * Lexing */ blockTokens(t, n = []) { this.options.pedantic ? t = t.replace(/\t/g, " ").replace(/^ +$/gm, "") : t = t.replace(/^( *)(\t+)/gm, (s, l, u) => l + " ".repeat(u.length)); let r, o, a, i; for (; t; ) if (!(this.options.extensions && this.options.extensions.block && this.options.extensions.block.some((s) => (r = s.call({ lexer: this }, t, n)) ? (t = t.substring(r.raw.length), n.push(r), !0) : !1))) { if (r = this.tokenizer.space(t)) { t = t.substring(r.raw.length), r.raw.length === 1 && n.length > 0 ? n[n.length - 1].raw += ` ` : n.push(r); continue; } if (r = this.tokenizer.code(t)) { t = t.substring(r.raw.length), o = n[n.length - 1], o && (o.type === "paragraph" || o.type === "text") ? (o.raw += ` ` + r.raw, o.text += ` ` + r.text, this.inlineQueue[this.inlineQueue.length - 1].src = o.text) : n.push(r); continue; } if (r = this.tokenizer.fences(t)) { t = t.substring(r.raw.length), n.push(r); continue; } if (r = this.tokenizer.heading(t)) { t = t.substring(r.raw.length), n.push(r); continue; } if (r = this.tokenizer.hr(t)) { t = t.substring(r.raw.length), n.push(r); continue; } if (r = this.tokenizer.blockquote(t)) { t = t.substring(r.raw.length), n.push(r); continue; } if (r = this.tokenizer.list(t)) { t = t.substring(r.raw.length), n.push(r); continue; } if (r = this.tokenizer.html(t)) { t = t.substring(r.raw.length), n.push(r); continue; } if (r = this.tokenizer.def(t)) { t = t.substring(r.raw.length), o = n[n.length - 1], o && (o.type === "paragraph" || o.type === "text") ? (o.raw += ` ` + r.raw, o.text += ` ` + r.raw, this.inlineQueue[this.inlineQueue.length - 1].src = o.text) : this.tokens.links[r.tag] || (this.tokens.links[r.tag] = { href: r.href, title: r.title }); continue; } if (r = this.tokenizer.table(t)) { t = t.substring(r.raw.length), n.push(r); continue; } if (r = this.tokenizer.lheading(t)) { t = t.substring(r.raw.length), n.push(r); continue; } if (a = t, this.options.extensions && this.options.extensions.startBlock) { let s = 1 / 0; const l = t.slice(1); let u; this.options.extensions.startBlock.forEach(function(c) { u = c.call({ lexer: this }, l), typeof u == "number" && u >= 0 && (s = Math.min(s, u)); }), s < 1 / 0 && s >= 0 && (a = t.substring(0, s + 1)); } if (this.state.top && (r = this.tokenizer.paragraph(a))) { o = n[n.length - 1], i && o.type === "paragraph" ? (o.raw += ` ` + r.raw, o.text += ` ` + r.text, this.inlineQueue.pop(), this.inlineQueue[this.inlineQueue.length - 1].src = o.text) : n.push(r), i = a.length !== t.length, t = t.substring(r.raw.length); continue; } if (r = this.tokenizer.text(t)) { t = t.substring(r.raw.length), o = n[n.length - 1], o && o.type === "text" ? (o.raw += ` ` + r.raw, o.text += ` ` + r.text, this.inlineQueue.pop(), this.inlineQueue[this.inlineQueue.length - 1].src = o.text) : n.push(r); continue; } if (t) { const s = "Infinite loop on byte: " + t.charCodeAt(0); if (this.options.silent) { console.error(s); break; } else throw new Error(s); } } return this.state.top = !0, n; } inline(t, n = []) { return this.inlineQueue.push({ src: t, tokens: n }), n; } /** * Lexing/Compiling */ inlineTokens(t, n = []) { let r, o, a, i = t, s, l, u; if (this.tokens.links) { const c = Object.keys(this.tokens.links); if (c.length > 0) for (; (s = this.tokenizer.rules.inline.reflinkSearch.exec(i)) != null; ) c.includes(s[0].slice(s[0].lastIndexOf("[") + 1, -1)) && (i = i.slice(0, s.index) + "[" + yP("a", s[0].length - 2) + "]" + i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex)); } for (; (s = this.tokenizer.rules.inline.blockSkip.exec(i)) != null; ) i = i.slice(0, s.index) + "[" + yP("a", s[0].length - 2) + "]" + i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex); for (; (s = this.tokenizer.rules.inline.escapedEmSt.exec(i)) != null; ) i = i.slice(0, s.index + s[0].length - 2) + "++" + i.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex), this.tokenizer.rules.inline.escapedEmSt.lastIndex--; for (; t; ) if (l || (u = ""), l = !1, !(this.options.extensions && this.options.extensions.inline && this.options.extensions.inline.some((c) => (r = c.call({ lexer: this }, t, n)) ? (t = t.substring(r.raw.length), n.push(r), !0) : !1))) { if (r = this.tokenizer.escape(t)) { t = t.substring(r.raw.length), n.push(r); continue; } if (r = this.tokenizer.tag(t)) { t = t.substring(r.raw.length), o = n[n.length - 1], o && r.type === "text" && o.type === "text" ? (o.raw += r.raw, o.text += r.text) : n.push(r); continue; } if (r = this.tokenizer.link(t)) { t = t.substring(r.raw.length), n.push(r); continue; } if (r = this.tokenizer.reflink(t, this.tokens.links)) { t = t.substring(r.raw.length), o = n[n.length - 1], o && r.type === "text" && o.type === "text" ? (o.raw += r.raw, o.text += r.text) : n.push(r); continue; } if (r = this.tokenizer.emStrong(t, i, u)) { t = t.substring(r.raw.length), n.push(r); continue; } if (r = this.tokenizer.codespan(t)) { t = t.substring(r.raw.length), n.push(r); continue; } if (r = this.tokenizer.br(t)) { t = t.substring(r.raw.length), n.push(r); continue; } if (r = this.tokenizer.del(t)) { t = t.substring(r.raw.length), n.push(r); continue; } if (r = this.tokenizer.autolink(t, wP)) { t = t.substring(r.raw.length), n.push(r); continue; } if (!this.state.inLink && (r = this.tokenizer.url(t, wP))) { t = t.substring(r.raw.length), n.push(r); continue; } if (a = t, this.options.extensions && this.options.extensions.startInline) { let c = 1 / 0; const d = t.slice(1); let p; this.options.extensions.startInline.forEach(function(h) { p = h.call({ lexer: this }, d), typeof p == "number" && p >= 0 && (c = Math.min(c, p)); }), c < 1 / 0 && c >= 0 && (a = t.substring(0, c + 1)); } if (r = this.tokenizer.inlineText(a, J$e)) { t = t.substring(r.raw.length), r.raw.slice(-1) !== "_" && (u = r.raw.slice(-1)), l = !0, o = n[n.length - 1], o && o.type === "text" ? (o.raw += r.raw, o.text += r.text) : n.push(r); continue; } if (t) { const c = "Infinite loop on byte: " + t.charCodeAt(0); if (this.options.silent) { console.error(c); break; } else throw new Error(c); } } return n; } } class nE { constructor(t) { this.options = t || Uu; } code(t, n, r) { const o = (n || "").match(/\S*/)[0]; if (this.options.highlight) { const a = this.options.highlight(t, o); a != null && a !== t && (r = !0, t = a); } return t = t.replace(/\n$/, "") + ` `, o ? '
' + (r ? t : Ur(t, !0)) + `
` : "
" + (r ? t : Ur(t, !0)) + `
`; } /** * @param {string} quote */ blockquote(t) { return `
${t}
`; } html(t) { return t; } /** * @param {string} text * @param {string} level * @param {string} raw * @param {any} slugger */ heading(t, n, r, o) { if (this.options.headerIds) { const a = this.options.headerPrefix + o.slug(r); return `${t} `; } return `${t} `; } hr() { return this.options.xhtml ? `
` : `
`; } list(t, n, r) { const o = n ? "ol" : "ul", a = n && r !== 1 ? ' start="' + r + '"' : ""; return "<" + o + a + `> ` + t + " `; } /** * @param {string} text */ listitem(t) { return `
  • ${t}
  • `; } checkbox(t) { return " "; } /** * @param {string} text */ paragraph(t) { return `

    ${t}

    `; } /** * @param {string} header * @param {string} body */ table(t, n) { return n && (n = `${n}`), ` ` + t + ` ` + n + `
    `; } /** * @param {string} content */ tablerow(t) { return ` ${t} `; } tablecell(t, n) { const r = n.header ? "th" : "td"; return (n.align ? `<${r} align="${n.align}">` : `<${r}>`) + t + ` `; } /** * span level renderer * @param {string} text */ strong(t) { return `${t}`; } /** * @param {string} text */ em(t) { return `${t}`; } /** * @param {string} text */ codespan(t) { return `${t}`; } br() { return this.options.xhtml ? "
    " : "
    "; } /** * @param {string} text */ del(t) { return `${t}`; } /** * @param {string} href * @param {string} title * @param {string} text */ link(t, n, r) { if (t = gP(this.options.sanitize, this.options.baseUrl, t), t === null) return r; let o = '
    ", o; } /** * @param {string} href * @param {string} title * @param {string} text */ image(t, n, r) { if (t = gP(this.options.sanitize, this.options.baseUrl, t), t === null) return r; let o = `${r}" : ">", o; } text(t) { return t; } } class Hj { // no need for block level renderers strong(t) { return t; } em(t) { return t; } codespan(t) { return t; } del(t) { return t; } html(t) { return t; } text(t) { return t; } link(t, n, r) { return "" + r; } image(t, n, r) { return "" + r; } br() { return ""; } } class Uj { constructor() { this.seen = {}; } /** * @param {string} value */ serialize(t) { return t.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig, "").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g, "").replace(/\s/g, "-"); } /** * Finds the next safe (unique) slug to use * @param {string} originalSlug * @param {boolean} isDryRun */ getNextSafeSlug(t, n) { let r = t, o = 0; if (this.seen.hasOwnProperty(r)) { o = this.seen[t]; do o++, r = t + "-" + o; while (this.seen.hasOwnProperty(r)); } return n || (this.seen[t] = o, this.seen[r] = 0), r; } /** * Convert string to unique id * @param {object} [options] * @param {boolean} [options.dryrun] Generates the next unique slug without * updating the internal accumulator. */ slug(t, n = {}) { const r = this.serialize(t); return this.getNextSafeSlug(r, n.dryrun); } } class dl { constructor(t) { this.options = t || Uu, this.options.renderer = this.options.renderer || new nE(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.textRenderer = new Hj(), this.slugger = new Uj(); } /** * Static Parse Method */ static parse(t, n) { return new dl(n).parse(t); } /** * Static Parse Inline Method */ static parseInline(t, n) { return new dl(n).parseInline(t); } /** * Parse Loop */ parse(t, n = !0) { let r = "", o, a, i, s, l, u, c, d, p, h, f, v, m, g, b, x, w, k, C; const _ = t.length; for (o = 0; o < _; o++) { if (h = t[o], this.options.extensions && this.options.extensions.renderers && this.options.extensions.renderers[h.type] && (C = this.options.extensions.renderers[h.type].call({ parser: this }, h), C !== !1 || !["space", "hr", "heading", "code", "table", "blockquote", "list", "html", "paragraph", "text"].includes(h.type))) { r += C || ""; continue; } switch (h.type) { case "space": continue; case "hr": { r += this.renderer.hr(); continue; } case "heading": { r += this.renderer.heading( this.parseInline(h.tokens), h.depth, Vj(this.parseInline(h.tokens, this.textRenderer)), this.slugger ); continue; } case "code": { r += this.renderer.code( h.text, h.lang, h.escaped ); continue; } case "table": { for (d = "", c = "", s = h.header.length, a = 0; a < s; a++) c += this.renderer.tablecell( this.parseInline(h.header[a].tokens), { header: !0, align: h.align[a] } ); for (d += this.renderer.tablerow(c), p = "", s = h.rows.length, a = 0; a < s; a++) { for (u = h.rows[a], c = "", l = u.length, i = 0; i < l; i++) c += this.renderer.tablecell( this.parseInline(u[i].tokens), { header: !1, align: h.align[i] } ); p += this.renderer.tablerow(c); } r += this.renderer.table(d, p); continue; } case "blockquote": { p = this.parse(h.tokens), r += this.renderer.blockquote(p); continue; } case "list": { for (f = h.ordered, v = h.start, m = h.loose, s = h.items.length, p = "", a = 0; a < s; a++) b = h.items[a], x = b.checked, w = b.task, g = "", b.task && (k = this.renderer.checkbox(x), m ? b.tokens.length > 0 && b.tokens[0].type === "paragraph" ? (b.tokens[0].text = k + " " + b.tokens[0].text, b.tokens[0].tokens && b.tokens[0].tokens.length > 0 && b.tokens[0].tokens[0].type === "text" && (b.tokens[0].tokens[0].text = k + " " + b.tokens[0].tokens[0].text)) : b.tokens.unshift({ type: "text", text: k }) : g += k), g += this.parse(b.tokens, m), p += this.renderer.listitem(g, w, x); r += this.renderer.list(p, f, v); continue; } case "html": { r += this.renderer.html(h.text); continue; } case "paragraph": { r += this.renderer.paragraph(this.parseInline(h.tokens)); continue; } case "text": { for (p = h.tokens ? this.parseInline(h.tokens) : h.text; o + 1 < _ && t[o + 1].type === "text"; ) h = t[++o], p += ` ` + (h.tokens ? this.parseInline(h.tokens) : h.text); r += n ? this.renderer.paragraph(p) : p; continue; } default: { const $ = 'Token with "' + h.type + '" type was not found.'; if (this.options.silent) { console.error($); return; } else throw new Error($); } } } return r; } /** * Parse Inline Tokens */ parseInline(t, n) { n = n || this.renderer; let r = "", o, a, i; const s = t.length; for (o = 0; o < s; o++) { if (a = t[o], this.options.extensions && this.options.extensions.renderers && this.options.extensions.renderers[a.type] && (i = this.options.extensions.renderers[a.type].call({ parser: this }, a), i !== !1 || !["escape", "html", "link", "image", "strong", "em", "codespan", "br", "del", "text"].includes(a.type))) { r += i || ""; continue; } switch (a.type) { case "escape": { r += n.text(a.text); break; } case "html": { r += n.html(a.text); break; } case "link": { r += n.link(a.href, a.title, this.parseInline(a.tokens, n)); break; } case "image": { r += n.image(a.href, a.title, a.text); break; } case "strong": { r += n.strong(this.parseInline(a.tokens, n)); break; } case "em": { r += n.em(this.parseInline(a.tokens, n)); break; } case "codespan": { r += n.codespan(a.text); break; } case "br": { r += n.br(); break; } case "del": { r += n.del(this.parseInline(a.tokens, n)); break; } case "text": { r += n.text(a.text); break; } default: { const l = 'Token with "' + a.type + '" type was not found.'; if (this.options.silent) { console.error(l); return; } else throw new Error(l); } } } return r; } } class Jg { constructor(t) { this.options = t || Uu; } /** * Process markdown before marked */ preprocess(t) { return t; } /** * Process HTML after marked is finished */ postprocess(t) { return t; } } N5(Jg, "passThroughHooks", /* @__PURE__ */ new Set([ "preprocess", "postprocess" ])); function Q$e(e, t, n) { return (r) => { if (r.message += ` Please report this to https://github.com/markedjs/marked.`, e) { const o = "

    An error occurred:

    " + Ur(r.message + "", !0) + "
    "; if (t) return Promise.resolve(o); if (n) { n(null, o); return; } return o; } if (t) return Promise.reject(r); if (n) { n(r); return; } throw r; }; } function qj(e, t) { return (n, r, o) => { typeof r == "function" && (o = r, r = null); const a = { ...r }; r = { ...kt.defaults, ...a }; const i = Q$e(r.silent, r.async, o); if (typeof n > "u" || n === null) return i(new Error("marked(): input parameter is undefined or null")); if (typeof n != "string") return i(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(n) + ", string expected")); if (X$e(r), r.hooks && (r.hooks.options = r), o) { const s = r.highlight; let l; try { r.hooks && (n = r.hooks.preprocess(n)), l = e(n, r); } catch (d) { return i(d); } const u = function(d) { let p; if (!d) try { r.walkTokens && kt.walkTokens(l, r.walkTokens), p = t(l, r), r.hooks && (p = r.hooks.postprocess(p)); } catch (h) { d = h; } return r.highlight = s, d ? i(d) : o(null, p); }; if (!s || s.length < 3 || (delete r.highlight, !l.length)) return u(); let c = 0; kt.walkTokens(l, function(d) { d.type === "code" && (c++, setTimeout(() => { s(d.text, d.lang, function(p, h) { if (p) return u(p); h != null && h !== d.text && (d.text = h, d.escaped = !0), c--, c === 0 && u(); }); }, 0)); }), c === 0 && u(); return; } if (r.async) return Promise.resolve(r.hooks ? r.hooks.preprocess(n) : n).then((s) => e(s, r)).then((s) => r.walkTokens ? Promise.all(kt.walkTokens(s, r.walkTokens)).then(() => s) : s).then((s) => t(s, r)).then((s) => r.hooks ? r.hooks.postprocess(s) : s).catch(i); try { r.hooks && (n = r.hooks.preprocess(n)); const s = e(n, r); r.walkTokens && kt.walkTokens(s, r.walkTokens); let l = t(s, r); return r.hooks && (l = r.hooks.postprocess(l)), l; } catch (s) { return i(s); } }; } function kt(e, t, n) { return qj(cl.lex, dl.parse)(e, t, n); } kt.options = kt.setOptions = function(e) { return kt.defaults = { ...kt.defaults, ...e }, M$e(kt.defaults), kt; }; kt.getDefaults = Bj; kt.defaults = Uu; kt.use = function(...e) { const t = kt.defaults.extensions || { renderers: {}, childTokens: {} }; e.forEach((n) => { const r = { ...n }; if (r.async = kt.defaults.async || r.async || !1, n.extensions && (n.extensions.forEach((o) => { if (!o.name) throw new Error("extension name required"); if (o.renderer) { const a = t.renderers[o.name]; a ? t.renderers[o.name] = function(...i) { let s = o.renderer.apply(this, i); return s === !1 && (s = a.apply(this, i)), s; } : t.renderers[o.name] = o.renderer; } if (o.tokenizer) { if (!o.level || o.level !== "block" && o.level !== "inline") throw new Error("extension level must be 'block' or 'inline'"); t[o.level] ? t[o.level].unshift(o.tokenizer) : t[o.level] = [o.tokenizer], o.start && (o.level === "block" ? t.startBlock ? t.startBlock.push(o.start) : t.startBlock = [o.start] : o.level === "inline" && (t.startInline ? t.startInline.push(o.start) : t.startInline = [o.start])); } o.childTokens && (t.childTokens[o.name] = o.childTokens); }), r.extensions = t), n.renderer) { const o = kt.defaults.renderer || new nE(); for (const a in n.renderer) { const i = o[a]; o[a] = (...s) => { let l = n.renderer[a].apply(o, s); return l === !1 && (l = i.apply(o, s)), l; }; } r.renderer = o; } if (n.tokenizer) { const o = kt.defaults.tokenizer || new tE(); for (const a in n.tokenizer) { const i = o[a]; o[a] = (...s) => { let l = n.tokenizer[a].apply(o, s); return l === !1 && (l = i.apply(o, s)), l; }; } r.tokenizer = o; } if (n.hooks) { const o = kt.defaults.hooks || new Jg(); for (const a in n.hooks) { const i = o[a]; Jg.passThroughHooks.has(a) ? o[a] = (s) => { if (kt.defaults.async) return Promise.resolve(n.hooks[a].call(o, s)).then((u) => i.call(o, u)); const l = n.hooks[a].call(o, s); return i.call(o, l); } : o[a] = (...s) => { let l = n.hooks[a].apply(o, s); return l === !1 && (l = i.apply(o, s)), l; }; } r.hooks = o; } if (n.walkTokens) { const o = kt.defaults.walkTokens; r.walkTokens = function(a) { let i = []; return i.push(n.walkTokens.call(this, a)), o && (i = i.concat(o.call(this, a))), i; }; } kt.setOptions(r); }); }; kt.walkTokens = function(e, t) { let n = []; for (const r of e) switch (n = n.concat(t.call(kt, r)), r.type) { case "table": { for (const o of r.header) n = n.concat(kt.walkTokens(o.tokens, t)); for (const o of r.rows) for (const a of o) n = n.concat(kt.walkTokens(a.tokens, t)); break; } case "list": { n = n.concat(kt.walkTokens(r.items, t)); break; } default: kt.defaults.extensions && kt.defaults.extensions.childTokens && kt.defaults.extensions.childTokens[r.type] ? kt.defaults.extensions.childTokens[r.type].forEach(function(o) { n = n.concat(kt.walkTokens(r[o], t)); }) : r.tokens && (n = n.concat(kt.walkTokens(r.tokens, t))); } return n; }; kt.parseInline = qj(cl.lexInline, dl.parseInline); kt.Parser = dl; kt.parser = dl.parse; kt.Renderer = nE; kt.TextRenderer = Hj; kt.Lexer = cl; kt.lexer = cl.lex; kt.Tokenizer = tE; kt.Slugger = Uj; kt.Hooks = Jg; kt.parse = kt; kt.options; kt.setOptions; kt.use; kt.walkTokens; kt.parseInline; dl.parse; cl.lex; var a_ = { exports: {} }, Mn = {}, i_ = { exports: {} }, qu = {}; function Kj() { var e = {}; return e["align-content"] = !1, e["align-items"] = !1, e["align-self"] = !1, e["alignment-adjust"] = !1, e["alignment-baseline"] = !1, e.all = !1, e["anchor-point"] = !1, e.animation = !1, e["animation-delay"] = !1, e["animation-direction"] = !1, e["animation-duration"] = !1, e["animation-fill-mode"] = !1, e["animation-iteration-count"] = !1, e["animation-name"] = !1, e["animation-play-state"] = !1, e["animation-timing-function"] = !1, e.azimuth = !1, e["backface-visibility"] = !1, e.background = !0, e["background-attachment"] = !0, e["background-clip"] = !0, e["background-color"] = !0, e["background-image"] = !0, e["background-origin"] = !0, e["background-position"] = !0, e["background-repeat"] = !0, e["background-size"] = !0, e["baseline-shift"] = !1, e.binding = !1, e.bleed = !1, e["bookmark-label"] = !1, e["bookmark-level"] = !1, e["bookmark-state"] = !1, e.border = !0, e["border-bottom"] = !0, e["border-bottom-color"] = !0, e["border-bottom-left-radius"] = !0, e["border-bottom-right-radius"] = !0, e["border-bottom-style"] = !0, e["border-bottom-width"] = !0, e["border-collapse"] = !0, e["border-color"] = !0, e["border-image"] = !0, e["border-image-outset"] = !0, e["border-image-repeat"] = !0, e["border-image-slice"] = !0, e["border-image-source"] = !0, e["border-image-width"] = !0, e["border-left"] = !0, e["border-left-color"] = !0, e["border-left-style"] = !0, e["border-left-width"] = !0, e["border-radius"] = !0, e["border-right"] = !0, e["border-right-color"] = !0, e["border-right-style"] = !0, e["border-right-width"] = !0, e["border-spacing"] = !0, e["border-style"] = !0, e["border-top"] = !0, e["border-top-color"] = !0, e["border-top-left-radius"] = !0, e["border-top-right-radius"] = !0, e["border-top-style"] = !0, e["border-top-width"] = !0, e["border-width"] = !0, e.bottom = !1, e["box-decoration-break"] = !0, e["box-shadow"] = !0, e["box-sizing"] = !0, e["box-snap"] = !0, e["box-suppress"] = !0, e["break-after"] = !0, e["break-before"] = !0, e["break-inside"] = !0, e["caption-side"] = !1, e.chains = !1, e.clear = !0, e.clip = !1, e["clip-path"] = !1, e["clip-rule"] = !1, e.color = !0, e["color-interpolation-filters"] = !0, e["column-count"] = !1, e["column-fill"] = !1, e["column-gap"] = !1, e["column-rule"] = !1, e["column-rule-color"] = !1, e["column-rule-style"] = !1, e["column-rule-width"] = !1, e["column-span"] = !1, e["column-width"] = !1, e.columns = !1, e.contain = !1, e.content = !1, e["counter-increment"] = !1, e["counter-reset"] = !1, e["counter-set"] = !1, e.crop = !1, e.cue = !1, e["cue-after"] = !1, e["cue-before"] = !1, e.cursor = !1, e.direction = !1, e.display = !0, e["display-inside"] = !0, e["display-list"] = !0, e["display-outside"] = !0, e["dominant-baseline"] = !1, e.elevation = !1, e["empty-cells"] = !1, e.filter = !1, e.flex = !1, e["flex-basis"] = !1, e["flex-direction"] = !1, e["flex-flow"] = !1, e["flex-grow"] = !1, e["flex-shrink"] = !1, e["flex-wrap"] = !1, e.float = !1, e["float-offset"] = !1, e["flood-color"] = !1, e["flood-opacity"] = !1, e["flow-from"] = !1, e["flow-into"] = !1, e.font = !0, e["font-family"] = !0, e["font-feature-settings"] = !0, e["font-kerning"] = !0, e["font-language-override"] = !0, e["font-size"] = !0, e["font-size-adjust"] = !0, e["font-stretch"] = !0, e["font-style"] = !0, e["font-synthesis"] = !0, e["font-variant"] = !0, e["font-variant-alternates"] = !0, e["font-variant-caps"] = !0, e["font-variant-east-asian"] = !0, e["font-variant-ligatures"] = !0, e["font-variant-numeric"] = !0, e["font-variant-position"] = !0, e["font-weight"] = !0, e.grid = !1, e["grid-area"] = !1, e["grid-auto-columns"] = !1, e["grid-auto-flow"] = !1, e["grid-auto-rows"] = !1, e["grid-column"] = !1, e["grid-column-end"] = !1, e["grid-column-start"] = !1, e["grid-row"] = !1, e["grid-row-end"] = !1, e["grid-row-start"] = !1, e["grid-template"] = !1, e["grid-template-areas"] = !1, e["grid-template-columns"] = !1, e["grid-template-rows"] = !1, e["hanging-punctuation"] = !1, e.height = !0, e.hyphens = !1, e.icon = !1, e["image-orientation"] = !1, e["image-resolution"] = !1, e["ime-mode"] = !1, e["initial-letters"] = !1, e["inline-box-align"] = !1, e["justify-content"] = !1, e["justify-items"] = !1, e["justify-self"] = !1, e.left = !1, e["letter-spacing"] = !0, e["lighting-color"] = !0, e["line-box-contain"] = !1, e["line-break"] = !1, e["line-grid"] = !1, e["line-height"] = !1, e["line-snap"] = !1, e["line-stacking"] = !1, e["line-stacking-ruby"] = !1, e["line-stacking-shift"] = !1, e["line-stacking-strategy"] = !1, e["list-style"] = !0, e["list-style-image"] = !0, e["list-style-position"] = !0, e["list-style-type"] = !0, e.margin = !0, e["margin-bottom"] = !0, e["margin-left"] = !0, e["margin-right"] = !0, e["margin-top"] = !0, e["marker-offset"] = !1, e["marker-side"] = !1, e.marks = !1, e.mask = !1, e["mask-box"] = !1, e["mask-box-outset"] = !1, e["mask-box-repeat"] = !1, e["mask-box-slice"] = !1, e["mask-box-source"] = !1, e["mask-box-width"] = !1, e["mask-clip"] = !1, e["mask-image"] = !1, e["mask-origin"] = !1, e["mask-position"] = !1, e["mask-repeat"] = !1, e["mask-size"] = !1, e["mask-source-type"] = !1, e["mask-type"] = !1, e["max-height"] = !0, e["max-lines"] = !1, e["max-width"] = !0, e["min-height"] = !0, e["min-width"] = !0, e["move-to"] = !1, e["nav-down"] = !1, e["nav-index"] = !1, e["nav-left"] = !1, e["nav-right"] = !1, e["nav-up"] = !1, e["object-fit"] = !1, e["object-position"] = !1, e.opacity = !1, e.order = !1, e.orphans = !1, e.outline = !1, e["outline-color"] = !1, e["outline-offset"] = !1, e["outline-style"] = !1, e["outline-width"] = !1, e.overflow = !1, e["overflow-wrap"] = !1, e["overflow-x"] = !1, e["overflow-y"] = !1, e.padding = !0, e["padding-bottom"] = !0, e["padding-left"] = !0, e["padding-right"] = !0, e["padding-top"] = !0, e.page = !1, e["page-break-after"] = !1, e["page-break-before"] = !1, e["page-break-inside"] = !1, e["page-policy"] = !1, e.pause = !1, e["pause-after"] = !1, e["pause-before"] = !1, e.perspective = !1, e["perspective-origin"] = !1, e.pitch = !1, e["pitch-range"] = !1, e["play-during"] = !1, e.position = !1, e["presentation-level"] = !1, e.quotes = !1, e["region-fragment"] = !1, e.resize = !1, e.rest = !1, e["rest-after"] = !1, e["rest-before"] = !1, e.richness = !1, e.right = !1, e.rotation = !1, e["rotation-point"] = !1, e["ruby-align"] = !1, e["ruby-merge"] = !1, e["ruby-position"] = !1, e["shape-image-threshold"] = !1, e["shape-outside"] = !1, e["shape-margin"] = !1, e.size = !1, e.speak = !1, e["speak-as"] = !1, e["speak-header"] = !1, e["speak-numeral"] = !1, e["speak-punctuation"] = !1, e["speech-rate"] = !1, e.stress = !1, e["string-set"] = !1, e["tab-size"] = !1, e["table-layout"] = !1, e["text-align"] = !0, e["text-align-last"] = !0, e["text-combine-upright"] = !0, e["text-decoration"] = !0, e["text-decoration-color"] = !0, e["text-decoration-line"] = !0, e["text-decoration-skip"] = !0, e["text-decoration-style"] = !0, e["text-emphasis"] = !0, e["text-emphasis-color"] = !0, e["text-emphasis-position"] = !0, e["text-emphasis-style"] = !0, e["text-height"] = !0, e["text-indent"] = !0, e["text-justify"] = !0, e["text-orientation"] = !0, e["text-overflow"] = !0, e["text-shadow"] = !0, e["text-space-collapse"] = !0, e["text-transform"] = !0, e["text-underline-position"] = !0, e["text-wrap"] = !0, e.top = !1, e.transform = !1, e["transform-origin"] = !1, e["transform-style"] = !1, e.transition = !1, e["transition-delay"] = !1, e["transition-duration"] = !1, e["transition-property"] = !1, e["transition-timing-function"] = !1, e["unicode-bidi"] = !1, e["vertical-align"] = !1, e.visibility = !1, e["voice-balance"] = !1, e["voice-duration"] = !1, e["voice-family"] = !1, e["voice-pitch"] = !1, e["voice-range"] = !1, e["voice-rate"] = !1, e["voice-stress"] = !1, e["voice-volume"] = !1, e.volume = !1, e["white-space"] = !1, e.widows = !1, e.width = !0, e["will-change"] = !1, e["word-break"] = !0, e["word-spacing"] = !0, e["word-wrap"] = !0, e["wrap-flow"] = !1, e["wrap-through"] = !1, e["writing-mode"] = !1, e["z-index"] = !1, e; } function eEe(e, t, n) { } function tEe(e, t, n) { } var nEe = /javascript\s*\:/img; function rEe(e, t) { return nEe.test(t) ? "" : t; } qu.whiteList = Kj(); qu.getDefaultWhiteList = Kj; qu.onAttr = eEe; qu.onIgnoreAttr = tEe; qu.safeAttrValue = rEe; var oEe = { indexOf: function(e, t) { var n, r; if (Array.prototype.indexOf) return e.indexOf(t); for (n = 0, r = e.length; n < r; n++) if (e[n] === t) return n; return -1; }, forEach: function(e, t, n) { var r, o; if (Array.prototype.forEach) return e.forEach(t, n); for (r = 0, o = e.length; r < o; r++) t.call(n, e[r], r, e); }, trim: function(e) { return String.prototype.trim ? e.trim() : e.replace(/(^\s*)|(\s*$)/g, ""); }, trimRight: function(e) { return String.prototype.trimRight ? e.trimRight() : e.replace(/(\s*$)/g, ""); } }, op = oEe; function aEe(e, t) { e = op.trimRight(e), e[e.length - 1] !== ";" && (e += ";"); var n = e.length, r = !1, o = 0, a = 0, i = ""; function s() { if (!r) { var c = op.trim(e.slice(o, a)), d = c.indexOf(":"); if (d !== -1) { var p = op.trim(c.slice(0, d)), h = op.trim(c.slice(d + 1)); if (p) { var f = t(o, i.length, p, h, c); f && (i += f + "; "); } } } o = a + 1; } for (; a < n; a++) { var l = e[a]; if (l === "/" && e[a + 1] === "*") { var u = e.indexOf("*/", a + 2); if (u === -1) break; a = u + 1, o = a + 1, r = !1; } else l === "(" ? r = !0 : l === ")" ? r = !1 : l === ";" ? r || s() : l === ` ` && s(); } return op.trim(i); } var iEe = aEe, vv = qu, sEe = iEe; function xP(e) { return e == null; } function lEe(e) { var t = {}; for (var n in e) t[n] = e[n]; return t; } function Gj(e) { e = lEe(e || {}), e.whiteList = e.whiteList || vv.whiteList, e.onAttr = e.onAttr || vv.onAttr, e.onIgnoreAttr = e.onIgnoreAttr || vv.onIgnoreAttr, e.safeAttrValue = e.safeAttrValue || vv.safeAttrValue, this.options = e; } Gj.prototype.process = function(e) { if (e = e || "", e = e.toString(), !e) return ""; var t = this, n = t.options, r = n.whiteList, o = n.onAttr, a = n.onIgnoreAttr, i = n.safeAttrValue, s = sEe(e, function(l, u, c, d, p) { var h = r[c], f = !1; if (h === !0 ? f = h : typeof h == "function" ? f = h(d) : h instanceof RegExp && (f = h.test(d)), f !== !0 && (f = !1), d = i(c, d), !!d) { var v = { position: u, sourcePosition: l, source: p, isWhite: f }; if (f) { var m = o(c, d, v); return xP(m) ? c + ":" + d : m; } else { var m = a(c, d, v); if (!xP(m)) return m; } } }); return s; }; var uEe = Gj; (function(e, t) { var n = qu, r = uEe; function o(i, s) { var l = new r(s); return l.process(i); } t = e.exports = o, t.FilterCSS = r; for (var a in n) t[a] = n[a]; typeof window < "u" && (window.filterCSS = e.exports); })(i_, i_.exports); var rE = i_.exports, oE = { indexOf: function(e, t) { var n, r; if (Array.prototype.indexOf) return e.indexOf(t); for (n = 0, r = e.length; n < r; n++) if (e[n] === t) return n; return -1; }, forEach: function(e, t, n) { var r, o; if (Array.prototype.forEach) return e.forEach(t, n); for (r = 0, o = e.length; r < o; r++) t.call(n, e[r], r, e); }, trim: function(e) { return String.prototype.trim ? e.trim() : e.replace(/(^\s*)|(\s*$)/g, ""); }, spaceIndex: function(e) { var t = /\s|\n|\t/, n = t.exec(e); return n ? n.index : -1; } }, cEe = rE.FilterCSS, dEe = rE.getDefaultWhiteList, Qg = oE; function Wj() { return { a: ["target", "href", "title"], abbr: ["title"], address: [], area: ["shape", "coords", "href", "alt"], article: [], aside: [], audio: [ "autoplay", "controls", "crossorigin", "loop", "muted", "preload", "src" ], b: [], bdi: ["dir"], bdo: ["dir"], big: [], blockquote: ["cite"], br: [], caption: [], center: [], cite: [], code: [], col: ["align", "valign", "span", "width"], colgroup: ["align", "valign", "span", "width"], dd: [], del: ["datetime"], details: ["open"], div: [], dl: [], dt: [], em: [], figcaption: [], figure: [], font: ["color", "size", "face"], footer: [], h1: [], h2: [], h3: [], h4: [], h5: [], h6: [], header: [], hr: [], i: [], img: ["src", "alt", "title", "width", "height"], ins: ["datetime"], li: [], mark: [], nav: [], ol: [], p: [], pre: [], s: [], section: [], small: [], span: [], sub: [], summary: [], sup: [], strong: [], strike: [], table: ["width", "border", "align", "valign"], tbody: ["align", "valign"], td: ["width", "rowspan", "colspan", "align", "valign"], tfoot: ["align", "valign"], th: ["width", "rowspan", "colspan", "align", "valign"], thead: ["align", "valign"], tr: ["rowspan", "align", "valign"], tt: [], u: [], ul: [], video: [ "autoplay", "controls", "crossorigin", "loop", "muted", "playsinline", "poster", "preload", "src", "height", "width" ] }; } var Yj = new cEe(); function pEe(e, t, n) { } function fEe(e, t, n) { } function hEe(e, t, n) { } function vEe(e, t, n) { } function Xj(e) { return e.replace(mEe, "<").replace(yEe, ">"); } function gEe(e, t, n, r) { if (n = nV(n), t === "href" || t === "src") { if (n = Qg.trim(n), n === "#") return "#"; if (!(n.substr(0, 7) === "http://" || n.substr(0, 8) === "https://" || n.substr(0, 7) === "mailto:" || n.substr(0, 4) === "tel:" || n.substr(0, 11) === "data:image/" || n.substr(0, 6) === "ftp://" || n.substr(0, 2) === "./" || n.substr(0, 3) === "../" || n[0] === "#" || n[0] === "/")) return ""; } else if (t === "background") { if (gv.lastIndex = 0, gv.test(n)) return ""; } else if (t === "style") { if (kP.lastIndex = 0, kP.test(n) || (CP.lastIndex = 0, CP.test(n) && (gv.lastIndex = 0, gv.test(n)))) return ""; r !== !1 && (r = r || Yj, n = r.process(n)); } return n = rV(n), n; } var mEe = //g, bEe = /"/g, wEe = /"/g, xEe = /&#([a-zA-Z0-9]*);?/gim, kEe = /:?/gim, CEe = /&newline;?/gim, gv = /((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a):/gi, kP = /e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi, CP = /u\s*r\s*l\s*\(.*/gi; function Zj(e) { return e.replace(bEe, """); } function Jj(e) { return e.replace(wEe, '"'); } function Qj(e) { return e.replace(xEe, function(n, r) { return r[0] === "x" || r[0] === "X" ? String.fromCharCode(parseInt(r.substr(1), 16)) : String.fromCharCode(parseInt(r, 10)); }); } function eV(e) { return e.replace(kEe, ":").replace(CEe, " "); } function tV(e) { for (var t = "", n = 0, r = e.length; n < r; n++) t += e.charCodeAt(n) < 32 ? " " : e.charAt(n); return Qg.trim(t); } function nV(e) { return e = Jj(e), e = Qj(e), e = eV(e), e = tV(e), e; } function rV(e) { return e = Zj(e), e = Xj(e), e; } function _Ee() { return ""; } function SEe(e, t) { typeof t != "function" && (t = function() { }); var n = !Array.isArray(e); function r(i) { return n ? !0 : Qg.indexOf(e, i) !== -1; } var o = [], a = !1; return { onIgnoreTag: function(i, s, l) { if (r(i)) if (l.isClosing) { var u = "[/removed]", c = l.position + u.length; return o.push([ a !== !1 ? a : l.position, c ]), a = !1, u; } else return a || (a = l.position), "[removed]"; else return t(i, s, l); }, remove: function(i) { var s = "", l = 0; return Qg.forEach(o, function(u) { s += i.slice(l, u[0]), l = u[1]; }), s += i.slice(l), s; } }; } function $Ee(e) { for (var t = "", n = 0; n < e.length; ) { var r = e.indexOf("", r); if (o === -1) break; n = o + 3; } return t; } function EEe(e) { var t = e.split(""); return t = t.filter(function(n) { var r = n.charCodeAt(0); return r === 127 ? !1 : r <= 31 ? r === 10 || r === 13 : !0; }), t.join(""); } Mn.whiteList = Wj(); Mn.getDefaultWhiteList = Wj; Mn.onTag = pEe; Mn.onIgnoreTag = fEe; Mn.onTagAttr = hEe; Mn.onIgnoreTagAttr = vEe; Mn.safeAttrValue = gEe; Mn.escapeHtml = Xj; Mn.escapeQuote = Zj; Mn.unescapeQuote = Jj; Mn.escapeHtmlEntities = Qj; Mn.escapeDangerHtml5Entities = eV; Mn.clearNonPrintableCharacter = tV; Mn.friendlyAttrValue = nV; Mn.escapeAttrValue = rV; Mn.onIgnoreTagStripAll = _Ee; Mn.StripTagBody = SEe; Mn.stripCommentTag = $Ee; Mn.stripBlankChar = EEe; Mn.cssFilter = Yj; Mn.getDefaultCSSWhiteList = dEe; var Km = {}, Ds = oE; function OEe(e) { var t = Ds.spaceIndex(e), n; return t === -1 ? n = e.slice(1, -1) : n = e.slice(1, t + 1), n = Ds.trim(n).toLowerCase(), n.slice(0, 1) === "/" && (n = n.slice(1)), n.slice(-1) === "/" && (n = n.slice(0, -1)), n; } function FEe(e) { return e.slice(0, 2) === "" || s === l - 1) { r += n(e.slice(o, a)), c = e.slice(a, s + 1), u = OEe(c), r += t( a, r.length, u, c, FEe(c) ), o = s + 1, a = !1; continue; } if (d === '"' || d === "'") for (var p = 1, h = e.charAt(s - p); h.trim() === "" || h === "="; ) { if (h === "=") { i = d; continue e; } h = e.charAt(s - ++p); } } else if (d === i) { i = !1; continue; } } return o < l && (r += n(e.substr(o))), r; } var AEe = /[^a-zA-Z0-9\\_:.-]/gim; function IEe(e, t) { var n = 0, r = 0, o = [], a = !1, i = e.length; function s(p, h) { if (p = Ds.trim(p), p = p.replace(AEe, "").toLowerCase(), !(p.length < 1)) { var f = t(p, h || ""); f && o.push(f); } } for (var l = 0; l < i; l++) { var u = e.charAt(l), c, d; if (a === !1 && u === "=") { a = e.slice(n, l), n = l + 1, r = e.charAt(n) === '"' || e.charAt(n) === "'" ? n : LEe(e, l + 1); continue; } if (a !== !1 && l === r) { if (d = e.indexOf(u, l + 1), d === -1) break; c = Ds.trim(e.slice(r + 1, d)), s(a, c), a = !1, l = d, n = l + 1; continue; } if (/\s|\n|\t/.test(u)) if (e = e.replace(/\s|\n|\t/g, " "), a === !1) if (d = PEe(e, l), d === -1) { c = Ds.trim(e.slice(n, l)), s(c), a = !1, n = l + 1; continue; } else { l = d - 1; continue; } else if (d = REe(e, l - 1), d === -1) { c = Ds.trim(e.slice(n, l)), c = _P(c), s(a, c), a = !1, n = l + 1; continue; } else continue; } return n < e.length && (a === !1 ? s(e.slice(n)) : s(a, _P(Ds.trim(e.slice(n))))), Ds.trim(o.join(" ")); } function PEe(e, t) { for (; t < e.length; t++) { var n = e[t]; if (n !== " ") return n === "=" ? t : -1; } } function LEe(e, t) { for (; t < e.length; t++) { var n = e[t]; if (n !== " ") return n === "'" || n === '"' ? t : -1; } } function REe(e, t) { for (; t > 0; t--) { var n = e[t]; if (n !== " ") return n === "=" ? t : -1; } } function NEe(e) { return e[0] === '"' && e[e.length - 1] === '"' || e[0] === "'" && e[e.length - 1] === "'"; } function _P(e) { return NEe(e) ? e.substr(1, e.length - 2) : e; } Km.parseTag = TEe; Km.parseAttr = IEe; var MEe = rE.FilterCSS, Aa = Mn, oV = Km, DEe = oV.parseTag, BEe = oV.parseAttr, ag = oE; function mv(e) { return e == null; } function zEe(e) { var t = ag.spaceIndex(e); if (t === -1) return { html: "", closing: e[e.length - 2] === "/" }; e = ag.trim(e.slice(t + 1, -1)); var n = e[e.length - 1] === "/"; return n && (e = ag.trim(e.slice(0, -1))), { html: e, closing: n }; } function jEe(e) { var t = {}; for (var n in e) t[n] = e[n]; return t; } function VEe(e) { var t = {}; for (var n in e) Array.isArray(e[n]) ? t[n.toLowerCase()] = e[n].map(function(r) { return r.toLowerCase(); }) : t[n.toLowerCase()] = e[n]; return t; } function aV(e) { e = jEe(e || {}), e.stripIgnoreTag && (e.onIgnoreTag && console.error( 'Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time' ), e.onIgnoreTag = Aa.onIgnoreTagStripAll), e.whiteList || e.allowList ? e.whiteList = VEe(e.whiteList || e.allowList) : e.whiteList = Aa.whiteList, e.onTag = e.onTag || Aa.onTag, e.onTagAttr = e.onTagAttr || Aa.onTagAttr, e.onIgnoreTag = e.onIgnoreTag || Aa.onIgnoreTag, e.onIgnoreTagAttr = e.onIgnoreTagAttr || Aa.onIgnoreTagAttr, e.safeAttrValue = e.safeAttrValue || Aa.safeAttrValue, e.escapeHtml = e.escapeHtml || Aa.escapeHtml, this.options = e, e.css === !1 ? this.cssFilter = !1 : (e.css = e.css || {}, this.cssFilter = new MEe(e.css)); } aV.prototype.process = function(e) { if (e = e || "", e = e.toString(), !e) return ""; var t = this, n = t.options, r = n.whiteList, o = n.onTag, a = n.onIgnoreTag, i = n.onTagAttr, s = n.onIgnoreTagAttr, l = n.safeAttrValue, u = n.escapeHtml, c = t.cssFilter; n.stripBlankChar && (e = Aa.stripBlankChar(e)), n.allowCommentTag || (e = Aa.stripCommentTag(e)); var d = !1; n.stripIgnoreTagBody && (d = Aa.StripTagBody( n.stripIgnoreTagBody, a ), a = d.onIgnoreTag); var p = DEe( e, function(h, f, v, m, g) { var b = { sourcePosition: h, position: f, isClosing: g, isWhite: Object.prototype.hasOwnProperty.call(r, v) }, x = o(v, m, b); if (!mv(x)) return x; if (b.isWhite) { if (b.isClosing) return ""; var w = zEe(m), k = r[v], C = BEe(w.html, function(_, $) { var O = ag.indexOf(k, _) !== -1, F = i(v, _, $, O); return mv(F) ? O ? ($ = l(v, _, $, c), $ ? _ + '="' + $ + '"' : _) : (F = s(v, _, $, O), mv(F) ? void 0 : F) : F; }); return m = "<" + v, C && (m += " " + C), w.closing && (m += " /"), m += ">", m; } else return x = a(v, m, b), mv(x) ? u(m) : x; }, u ); return d && (p = d.remove(p)), p; }; var HEe = aV; (function(e, t) { var n = Mn, r = Km, o = HEe; function a(s, l) { var u = new o(l); return u.process(s); } t = e.exports = a, t.filterXSS = a, t.FilterXSS = o, function() { for (var s in n) t[s] = n[s]; for (var l in r) t[l] = r[l]; }(), typeof window < "u" && (window.filterXSS = e.exports); function i() { return typeof self < "u" && typeof DedicatedWorkerGlobalScope < "u" && self instanceof DedicatedWorkerGlobalScope; } i() && (self.filterXSS = e.exports); })(a_, a_.exports); var UEe = a_.exports; const qEe = /* @__PURE__ */ iM(UEe), Ka = (e, t) => { const n = e.__vccOpts || e; for (const [r, o] of t) n[r] = o; return n; }, KEe = function(e) { return e.includes("files") ? e : "files/" + e; }, GEe = function(e) { return e = e.replaceAll("\\", "/"), e = e.replaceAll("\\\\", "/"), e; }, WEe = { name: "contextCard", components: { CopyToClipboard: Ru }, mixins: [N$e], props: { /** * Object containing information for * the required viewing. */ entry: Object, envVars: Object }, data: function() { return { contextData: {}, showDetails: !0, showContextCard: !0, sampleDetails: {}, loading: !1, loadingOriginalSource: !0, originalSource: [], flatmapSource: [], activeName: "", copyContent: "" }; }, watch: { "entry.contextCardUrl": { handler(e) { e ? e === !0 ? console.error("asked for hardcoding but none provided") : (this.getContextFile(e), this.showContextCard = !0) : this.showContextCard = !1; }, immediate: !0 }, "entry.s3uri": { handler(e) { this.updateS3Bucket(e); }, immediate: !0 } }, computed: { ...vl(yu), flatmapAPI: function() { return this.settingsStore.flatmapAPI; }, samplesUnderViews: function() { var e, t; if (this.contextData) { if (this.contextData.samplesUnderViews) return !0; { let n = ((e = this.contextData.views) == null ? void 0 : e.map((a) => a.id)) || [], r = ((t = this.contextData.samples) == null ? void 0 : t.map((a) => a.view)) || [], o = n.filter((a) => r.includes(a)); if (n.length === o.length && o.length === r.length) return !0; } } return !1; }, banner: function() { return this.contextData.banner ? this.getFileFromPath(this.contextData.banner) : this.contextData && this.contextData.views && this.contextData.views.length > 0 && this.contextData.views[0].thumbnail ? this.getFileFromPath(this.contextData.views[0].thumbnail) : this.entry.banner; } }, methods: { flatmapClick: function(e) { const t = { type: "Flatmap", resource: e.flatmapUUID, label: this.contextData.heading }; ft.emit("CreateNewEntry", t); }, updateCopyContent: function() { var t, n; const e = []; if (this.contextData.heading && e.push(`
    ${this.contextData.heading}
    `), this.contextData.description && e.push(`
    ${this.contextData.description}
    `), this.originalSource && this.originalSource.length) { let r = "
    Source data links
    "; const o = []; this.originalSource.forEach((a, i) => { const s = this.generateFileLink(a); let l = `
    ${a.name}
    `; l += ` `, l += `
    ${s}
    `, o.push(`
  • ${l}
  • `); }), r += ` `, r += ``, e.push(r); } if (this.flatmapSource && this.flatmapSource.length) { let r = "
    Associated flatmaps from source
    "; const o = []; this.flatmapSource.forEach((a, i) => { this.generateFileLink(a); let s = `
    ${a.name}
    `, l = this.flatmapAPI ? `${this.flatmapAPI}viewer?id=${a.flatmapUUID}` : a.flatmapUUID; s += ` `, s += `
    ${l}
    `, o.push(`
  • ${s}
  • `); }), r += ` `, r += ``, e.push(r); } if ((t = this.contextData.views) != null && t.length) { let r = "
    Scaffold Views
    "; const o = []; this.contextData.views.forEach((a, i) => { const s = [], l = this.getFileFromPath(a.path); let u = `
    ${a.description}
    `; if (u += ` `, u += `
    ${l}
    `, s.push(u), this.samplesUnderViews) { let p = `
    ${this.samplesMatching(a.id).description}
    `; if (this.samplesMatching(a.id).path) { p += ` `; const h = this.generateFileLink(this.samplesMatching(a.id)); p += `
    ${h}
    `; } s.push(p); } const c = s.join(` `); o.push(`
  • ${c}
  • `); }), r += ` `, r += ``, e.push(r); } if (!this.samplesUnderViews && (n = this.contextData.samples) != null && n.length) { let r = "
    Samples on Scaffold
    "; const o = []; this.contextData.samples.forEach((a, i) => { let s = ""; if (s += `
    ${a.heading}
    `, s += ` `, s += `
    ${a.description}
    `, a.path) { const l = this.generateFileLink(a); s += ` `, s += `
    ${l}
    `; } o.push(`
  • ${s}
  • `); }), r += ` `, r += ``, e.push(r); } return e.join(`
    `); }, samplesMatching: function(e) { return this.contextData && this.contextData.samples ? this.contextData.samples.filter((t) => t.view == e)[0] : []; }, viewClicked: function(e, t) { this.openViewFile(e), this.toggleSampleDetails(t); }, getContextFile: function(e) { this.loading = !0, fetch(e).then((t) => { if (t.ok) return t.json(); throw Error(t.statusText); }).then((t) => { this.contextData = t, this.loading = !1, this.addDiscoverIdsToContextData(); }).catch((t) => { console.error("caught error!", t), this.loading = !1; }); }, removeDoubleFilesPath: function(e) { if (e) return e.includes("files/") ? e.replace("files/", "") : e.includes("files\\") ? e.replace("files\\", "") : e; }, toggleSampleDetails: function(e) { this.sampleDetails[e] === void 0 ? this.sampleDetails[e] = !0 : this.sampleDetails[e] = !this.sampleDetails[e]; }, getFileFromPath: function(e) { return this.entry.contextCardUrl === !0 ? e : (e = this.removeDoubleFilesPath(e), `${this.envVars.API_LOCATION}s3-resource/${this.getS3Prefix()}files/${e}${this.getS3Args()}`); }, // This is used later when generateing links to the resource on sparc.science (see generateFileLink) addDiscoverIdsToContextData() { this.contextData.samples.forEach((e, t) => { e && e.doi && e.doi !== "" ? fetch(`${this.envVars.PENNSIEVE_API_LOCATION}/discover/datasets/doi/${this.splitDoiFromUrl(e.doi)}`).then((n) => n.json()).then((n) => { this.contextData.samples[t].discoverId = n.id, this.contextData.samples[t].version = n.version; }) : (this.contextData.samples[t].discoverId = this.entry.discoverId, this.contextData.samples[t].version = this.entry.version); }); }, processPathForUrl(e) { return e = GEe(e), e = KEe(e), encodeURIComponent(e); }, splitDoiFromUrl(e) { return e.split("https://doi.org/").pop(); }, generateFileLink(e) { const t = this.processPathForUrl(e.path); let n = `${this.envVars.ROOT_URL}/datasets/file/${e.discoverId}/${e.version}?path=`; return n = n + t, n; }, parseMarkdown(e) { const t = qEe(kt.parse(e)); return this.$emit("context-ready"), t; }, openViewFile: function(e) { const t = this.getFileFromPath(e.path); this.$emit("scaffold-view-clicked", t); }, getOriginalSource: function() { const e = this.entry.discoverId, n = this.entry.resource.substring( this.entry.resource.indexOf("files/") + 6, this.entry.resource.lastIndexOf("?") ), r = new URLSearchParams({ discoverId: e, path: n }), o = `${this.envVars.API_LOCATION}/file_info/get_original_source?${r.toString()}`; fetch(o).then((a) => { if (a.ok) return a.json(); throw Error(a.statusText); }).then((a) => { this.loadingOriginalSource = !1, a.result && (a.result.forEach((i) => { i.flatmapUUID ? this.flatmapSource.push(i) : this.originalSource.push(i); }), (this.flatmapSource.length || this.originalSource.length) && (this.copyContent = this.updateCopyContent())), this.loadingOriginalSource = !1; }).catch((a) => { console.error("caught error!", a), this.loadingOriginalSource = !1; }); }, onCopied: function() { const { label: e, type: t, discoverId: n } = this.entry, r = t ? `${e} ${t}` : e; jn.sendEvent({ event: "interaction_event", event_name: "portal_maps_context_card_copy", category: r || "", location: "map_toolbar", dataset_id: n ? n + "" : "" }); } }, mounted: function() { this.copyContent = this.updateCopyContent(), this.getOriginalSource(); } }, Ad = (e) => (Ci("data-v-1ea67783"), e = e(), _i(), e), YEe = { class: "context-card-container", ref: "container" }, XEe = { key: 0, class: "context-card" }, ZEe = { class: "card-left" }, JEe = ["src"], QEe = { class: "card-right scrollbar" }, e5e = { class: "title" }, t5e = ["innerHTML"], n5e = { class: "card-bottom" }, r5e = { class: "source-data-list" }, o5e = ["href"], a5e = { key: 0, class: "flatmap-entry" }, i5e = { class: "source-data-list" }, s5e = ["onClick"], l5e = { key: 0, class: "subtitle" }, u5e = ["onClick"], c5e = ["src"], d5e = { class: "view-description" }, p5e = /* @__PURE__ */ Ad(() => /* @__PURE__ */ D("div", { class: "padding" }, null, -1)), f5e = /* @__PURE__ */ Ad(() => /* @__PURE__ */ D("div", { style: { "margin-bottom": "16px" } }, null, -1)), h5e = { key: 1, class: "subtitle" }, v5e = ["onClick"], g5e = ["src"], m5e = /* @__PURE__ */ Ad(() => /* @__PURE__ */ D("i", { class: "el-icon-warning-outline info" }, null, -1)), y5e = ["innerHTML"], b5e = ["href"], w5e = /* @__PURE__ */ Ad(() => /* @__PURE__ */ D("div", { class: "padding" }, null, -1)), x5e = { key: 0, class: "subtitle" }, k5e = ["onClick"], C5e = ["src"], _5e = { class: "view-description" }, S5e = /* @__PURE__ */ Ad(() => /* @__PURE__ */ D("i", { class: "el-icon-warning-outline info" }, null, -1)), $5e = ["innerHTML"], E5e = ["href"], O5e = /* @__PURE__ */ Ad(() => /* @__PURE__ */ D("div", { class: "padding" }, null, -1)), F5e = { key: 2, class: "padding" }, T5e = { class: "float-button-container" }; function A5e(e, t, n, r, o, a) { const i = Coe, s = koe, l = Ve("CopyToClipboard"), u = Mc; return S(), L("div", YEe, [ Be(D("div", null, [ e.showDetails && Object.keys(e.contextData).length !== 0 ? Be((S(), L("div", XEe, [ D("div", ZEe, [ D("img", { src: a.banner, class: "context-image" }, null, 8, JEe) ]), D("div", QEe, [ D("div", null, [ D("div", e5e, ge(e.contextData.heading), 1), D("div", { innerHTML: a.parseMarkdown(e.contextData.description) }, null, 8, t5e) ]) ]), D("div", n5e, [ Be((S(), L("div", null, [ e.originalSource && e.originalSource.length ? (S(), re(s, { key: 0, modelValue: e.activeName, "onUpdate:modelValue": t[0] || (t[0] = (c) => e.activeName = c) }, { default: N(() => [ q(i, { title: "View/Hide source data links", name: "sourceDataLinks" }, { default: N(() => [ D("ul", r5e, [ (S(!0), L(Re, null, mt(e.originalSource, (c, d) => (S(), L("li", { key: "source-" + d }, [ c && c.path ? (S(), L("a", { key: 0, href: a.generateFileLink(c), target: "_blank" }, "View " + ge(c.name), 9, o5e)) : J("", !0) ]))), 128)) ]) ]), _: 1 }) ]), _: 1 }, 8, ["modelValue"])) : J("", !0) ])), [ [u, e.loadingOriginalSource] ]), e.flatmapSource && e.flatmapSource.length ? (S(), L("div", a5e, [ Oe(" Associated flatmaps from source: "), D("ul", i5e, [ (S(!0), L(Re, null, mt(e.flatmapSource, (c, d) => (S(), L("li", { key: "flatmap-" + d }, [ D("span", { onClick: (p) => a.flatmapClick(c) }, " For " + ge(c.name), 9, s5e) ]))), 128)) ]) ])) : J("", !0), D("div", null, [ a.samplesUnderViews ? (S(), L(Re, { key: 1 }, [ e.contextData.views && e.contextData.views.length > 0 ? (S(), L("div", x5e, "Scaffold Views")) : J("", !0), (S(!0), L(Re, null, mt(e.contextData.views, (c, d) => (S(), L(Re, { key: d + "_1" }, [ D("span", { onClick: (p) => a.viewClicked(c, d), class: "context-card-view" }, [ D("img", { class: "view-image", src: a.getFileFromPath(c.thumbnail) }, null, 8, C5e), D("div", _5e, [ Oe(ge(c.description), 1), S5e ]) ], 8, k5e), e.sampleDetails[d] ? (S(), L("div", { key: 0, innerHTML: a.samplesMatching(c.id).description }, null, 8, $5e)) : J("", !0), e.sampleDetails[d] && a.samplesMatching(c.id).path ? (S(), L("a", { key: d + "_5", href: a.generateFileLink(a.samplesMatching(c.id)), target: "_blank" }, "View Source", 8, E5e)) : J("", !0), O5e, e.sampleDetails[d] ? (S(), L("div", F5e)) : J("", !0) ], 64))), 128)) ], 64)) : (S(), L(Re, { key: 0 }, [ e.contextData.views && e.contextData.views.length > 0 ? (S(), L("div", l5e, "Scaffold Views")) : J("", !0), (S(!0), L(Re, null, mt(e.contextData.views, (c, d) => (S(), L(Re, { key: d + "_1" }, [ D("div", { onClick: (p) => a.openViewFile(c), class: "context-card-view" }, [ D("img", { class: "view-image", src: a.getFileFromPath(c.thumbnail) }, null, 8, c5e), D("div", d5e, ge(c.description), 1) ], 8, u5e), p5e ], 64))), 128)), f5e, e.contextData.samples && e.contextData.samples.length > 0 ? (S(), L("div", h5e, "Samples on Scaffold")) : J("", !0), (S(!0), L(Re, null, mt(e.contextData.samples, (c, d) => (S(), L(Re, { key: d + "_3" }, [ D("span", { class: "context-card-item cursor-pointer", onClick: (p) => a.toggleSampleDetails(d) }, [ (S(), L("div", { key: d + "_6", style: { display: "flex" } }, [ c.color ? (S(), L("div", { key: 0, class: "color-box", style: Ye("background-color:" + c.color) }, null, 4)) : c.thumbnail ? (S(), L("img", { key: 1, class: "key-image", src: a.getFileFromPath(c.thumbnail) }, null, 8, g5e)) : J("", !0), Oe(" " + ge(c.heading) + " ", 1), m5e ])) ], 8, v5e), e.sampleDetails[d] ? (S(), L("div", { key: 0, innerHTML: c.description }, null, 8, y5e)) : J("", !0), e.sampleDetails[d] && c.path ? (S(), L("a", { key: 1, href: a.generateFileLink(c), target: "_blank" }, "View Source", 8, b5e)) : J("", !0), w5e ], 64))), 128)) ], 64)) ]) ]) ])), [ [u, e.loading] ]) : J("", !0), D("div", T5e, [ q(l, { content: e.copyContent, onCopied: a.onCopied, theme: "light" }, null, 8, ["content", "onCopied"]) ]) ], 512), [ [ht, e.showContextCard] ]) ], 512); } const iV = /* @__PURE__ */ Ka(WEe, [["render", A5e], ["__scopeId", "data-v-1ea67783"]]), I5e = { name: "FlatmapContextCard", components: { Loading: UM, CopyToClipboard: Ru }, props: { /** * Object containing information for * the required viewing. Can be retrieved from a flatmap */ mapImpProv: Object }, data: function() { return { contextData: {}, showDetails: !0, showContextCard: !0, sampleDetails: {}, loading: !1 }; }, computed: { flatmapPublishedDisplay: function() { let e = "Unknown"; return this.mapImpProv && (e = new Date(this.mapImpProv.created).toLocaleDateString("en-US", { day: "2-digit", month: "long", year: "numeric" })), e; }, sckanReleaseDisplay: function() { var t, n, r; let e = "Unknown"; if (this.mapImpProv) { if (e = (n = (t = this.mapImpProv.connectivity) == null ? void 0 : t.npo) == null ? void 0 : n.date, !e) { let o = (r = this.mapImpProv.sckan) != null && r.created ? this.mapImpProv.sckan.created : this.mapImpProv.sckan; if (o) { let a = o.replace(",", "."); e = new Date(a).toLocaleDateString("en-US", { day: "2-digit", month: "long", year: "numeric" }); } } e || (e = "Unknown"); } return e; }, sckanReleaseLink: function() { var t, n, r; let e = "Unknown"; return this.mapImpProv && (e = (n = (t = this.mapImpProv.connectivity) == null ? void 0 : t.npo) == null ? void 0 : n.path, e || (e = (r = this.mapImpProv.sckan) == null ? void 0 : r.release), e || (e = "Unknown")), e; }, flatmapSource: function() { let e = "Unknown"; return this.mapImpProv && (e = this.mapImpProv.source), e; }, updatedCopyContent: function() { const e = []; e.push("
    Flatmap Provenance
    "); let t = "
    SCKAN version:
    "; t += ` `, t += `
    ${this.sckanReleaseLink}
    `, e.push(t); let n = "
    Published on:
    "; n += ` `, n += `
    ${this.flatmapPublishedDisplay}
    `, e.push(n); let r = "
    View publication:
    "; return r += ` `, r += `
    ${this.flatmapSource}
    `, e.push(r), e.join(`
    `); } }, methods: { onCopied: function() { var e; jn.sendEvent({ event: "interaction_event", event_name: "portal_maps_context_card_copy", category: ((e = this.mapImpProv) == null ? void 0 : e.id) || "Flatmap Provenance", location: "map_toolbar" }); } } }, Gm = (e) => (Ci("data-v-fd897aa0"), e = e(), _i(), e), P5e = { class: "flatmap-context-card" }, L5e = { class: "card-right scrollbar" }, R5e = /* @__PURE__ */ Gm(() => /* @__PURE__ */ D("div", { class: "title" }, "Flatmap Provenance", -1)), N5e = ["href"], M5e = /* @__PURE__ */ Gm(() => /* @__PURE__ */ D("br", null, null, -1)), D5e = /* @__PURE__ */ Gm(() => /* @__PURE__ */ D("br", null, null, -1)), B5e = ["href"], z5e = /* @__PURE__ */ Gm(() => /* @__PURE__ */ D("br", null, null, -1)), j5e = { class: "float-button-container" }; function V5e(e, t, n, r, o, a) { const i = Ve("CopyToClipboard"), s = Mc; return Be((S(), L("div", P5e, [ D("div", L5e, [ R5e, Oe(" SCKAN version: "), D("a", { href: a.sckanReleaseLink, target: "_blank" }, ge(a.sckanReleaseDisplay), 9, N5e), M5e, Oe(" Published on: " + ge(a.flatmapPublishedDisplay) + " ", 1), D5e, Oe(" View publication "), D("a", { href: a.flatmapSource, class: "publication-link", target: "_blank" }, "here", 8, B5e), z5e ]), D("div", j5e, [ q(i, { content: a.updatedCopyContent, onCopied: a.onCopied, theme: "light" }, null, 8, ["content", "onCopied"]) ]) ])), [ [s, e.loading] ]); } const sV = /* @__PURE__ */ Ka(I5e, [["render", V5e], ["__scopeId", "data-v-fd897aa0"]]), lV = (e, t) => { const n = e.__vccOpts || e; for (const [r, o] of t) n[r] = o; return n; }, H5e = ["xlink:href"], U5e = { __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) => (S(), L("svg", { class: H(["map-icon", { "map-icon-spin": e.spin }]) }, [ D("use", { "xlink:href": `#${e.icon}` }, null, 8, H5e) ], 2)); } }, aE = /* @__PURE__ */ lV(U5e, [["__scopeId", "data-v-e172d5ff"]]), uV = ` 2horpanel ? `, cV = ` 2vertpanel ? `, dV = ` 3panel ? `, pV = ` 4panel ? `, fV = ` 2horpanel ? `, hV = ` 2horpanel ? `, vV = ` 4panel ? `, gV = ` changeBckgd `, mV = ` close no bk `, yV = ` close `, bV = ` closeFullScreen `, wV = ` Comment `, xV = ` Connection `, kV = ` dock `, CV = ` drawLine `, _V = ` drawPoint `, SV = ` drawPolygon `, $V = ` drawTrash `, EV = ` fitWindow `, OV = ` fullScreen `, FV = 'DataPortal-Icons', TV = ` magnifyingGlass `, AV = `Created by Wahyu Prihantorofrom the Noun Project`, IV = ` openMap `, PV = ` Artboard Copy 6 `, LV = ` permalink `, RV = ` play `, NV = ` resetZoom `, MV = ` singlepanel ? `, DV = ` tooltips ? `, BV = ` undock `, zV = ` zoomIn `, jV = ` zoomOut `, VV = (e, t, n, r) => { const o = ["title", "desc", "defs", "style"], a = ["width", "height"], i = r || []; let s = document.createElement("div"); s.innerHTML = e, o.map((u) => { const c = s.querySelector(u); c && c.remove(); }), a.map((u) => { s.querySelector("svg").removeAttribute(u); }), r && i.map((u) => { Object.values(s.querySelectorAll(`[${u}]`)).map((c) => { c.removeAttribute(u); }); }); const l = s.innerHTML; return s = null, l; }, HV = (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(), q5e = !0, K5e = !0, G5e = ["fill"], s_ = /* @__PURE__ */ Object.assign({ "/assets/icons/2horpanel.svg": uV, "/assets/icons/2vertpanel.svg": cV, "/assets/icons/3panel.svg": dV, "/assets/icons/4panel.svg": pV, "/assets/icons/5panel.svg": fV, "/assets/icons/6panel.svg": hV, "/assets/icons/6panelVertical.svg": vV, "/assets/icons/changeBckgd.svg": gV, "/assets/icons/close-no-bk.svg": mV, "/assets/icons/close.svg": yV, "/assets/icons/closeFullScreen.svg": bV, "/assets/icons/comment.svg": wV, "/assets/icons/connection.svg": xV, "/assets/icons/dock.svg": kV, "/assets/icons/drawLine.svg": CV, "/assets/icons/drawPoint.svg": _V, "/assets/icons/drawPolygon.svg": SV, "/assets/icons/drawTrash.svg": $V, "/assets/icons/fitWindow.svg": EV, "/assets/icons/fullScreen.svg": OV, "/assets/icons/help.svg": FV, "/assets/icons/magnifyingGlass.svg": TV, "/assets/icons/noun-filter.svg": AV, "/assets/icons/openMap.svg": IV, "/assets/icons/pause.svg": PV, "/assets/icons/permalink.svg": LV, "/assets/icons/play.svg": RV, "/assets/icons/resetZoom.svg": NV, "/assets/icons/singlepanel.svg": MV, "/assets/icons/tooltips.svg": DV, "/assets/icons/undock.svg": BV, "/assets/icons/zoomIn.svg": zV, "/assets/icons/zoomOut.svg": jV }), W5e = Object.keys(s_).map((e) => { const t = VV(s_[e], q5e, K5e, G5e), n = e.replace(/^.+\/(\w+).svg$/, "$1"); return HV(t).replace("", "symbol>"); }); W5e.join(` `); const l_ = /* @__PURE__ */ Object.assign({ "/assets/icons/2horpanel.svg": uV, "/assets/icons/2vertpanel.svg": cV, "/assets/icons/3panel.svg": dV, "/assets/icons/4panel.svg": pV, "/assets/icons/5panel.svg": fV, "/assets/icons/6panel.svg": hV, "/assets/icons/6panelVertical.svg": vV, "/assets/icons/changeBckgd.svg": gV, "/assets/icons/close-no-bk.svg": mV, "/assets/icons/close.svg": yV, "/assets/icons/closeFullScreen.svg": bV, "/assets/icons/comment.svg": wV, "/assets/icons/connection.svg": xV, "/assets/icons/dock.svg": kV, "/assets/icons/drawLine.svg": CV, "/assets/icons/drawPoint.svg": _V, "/assets/icons/drawPolygon.svg": SV, "/assets/icons/drawTrash.svg": $V, "/assets/icons/fitWindow.svg": EV, "/assets/icons/fullScreen.svg": OV, "/assets/icons/help.svg": FV, "/assets/icons/magnifyingGlass.svg": TV, "/assets/icons/noun-filter.svg": AV, "/assets/icons/openMap.svg": IV, "/assets/icons/pause.svg": PV, "/assets/icons/permalink.svg": LV, "/assets/icons/play.svg": RV, "/assets/icons/resetZoom.svg": NV, "/assets/icons/singlepanel.svg": MV, "/assets/icons/tooltips.svg": DV, "/assets/icons/undock.svg": BV, "/assets/icons/zoomIn.svg": zV, "/assets/icons/zoomOut.svg": jV }), Y5e = Object.keys(l_).map((e) => { const t = VV(l_[e]), n = e.replace(/^.+\/(\w+).svg$/, "$1"); return HV(t).replace("", "symbol>"); }), X5e = { name: "MapSvgSpriteColor", svgContext: l_, svgSprite: Y5e.join(` `) // concatenate all symbols into $options.svgSprite }, Z5e = ["innerHTML"]; function J5e(e, t, n, r, o, a) { return S(), L("svg", { width: "0", height: "0", style: { display: "none" }, innerHTML: e.$options.svgSprite }, null, 8, Z5e); } const UV = /* @__PURE__ */ lV(X5e, [["render", J5e]]), iE = () => ({ entries: [ { resource: "Human Male", type: "MultiFlatmap", mode: "main", id: 1, state: void 0, label: "", discoverId: void 0 } ] }), Q5e = async (e, t) => { let n = {}; if (e === "AC") n = { resource: "Human Male", type: "MultiFlatmap", mode: "main", state: void 0, label: "", discoverId: void 0 }; else if (e === "FC") n = { resource: "FunctionalConnectivity", type: "Flatmap", mode: "main", state: void 0, label: "Functional", discoverId: void 0 }; else if (e === "3D") { const r = await sE(t, "human"); n = { resource: r.url, type: "Scaffold", mode: "main", state: void 0, label: "Human", discoverId: r.datasetInfo.discoverId, contextCardUrl: r.datasetInfo.contextCardUrl, s3uri: r.datasetInfo.s3uri, version: r.datasetInfo.version, isBodyScaffold: !0 }; } return n; }, e3e = async (e, t) => { const n = iE(); if (e === "FC") n.entries[0].resource = "FunctionalConnectivity", n.entries[0].type = "Flatmap", n.entries[0].label = "Functional"; else if (e === "WholeBody") { const r = await sE(t, "human"); n.entries[0].resource = r.url, n.entries[0].contextCardUrl = r.datasetInfo.contextCardUrl, n.entries[0].discoverId = r.datasetInfo.discoverId, n.entries[0].s3uri = r.datasetInfo.s3uri, n.entries[0].version = r.datasetInfo.version, n.entries[0].type = "Scaffold", n.entries[0].label = "Human", n.entries[0].isBodyScaffold = !0; } return n; }, SP = (e) => e && e.charAt(0).toUpperCase() + e.slice(1), t3e = () => ({ "Human Female": { taxo: "NCBITaxon:9606", biologicalSex: "PATO:0000383", iconClass: "mapicon-icon_human", displayLatestChanges: !0, displayWarning: !1 }, "Human Male": { taxo: "NCBITaxon:9606", biologicalSex: "PATO:0000384", iconClass: "mapicon-icon_human", displayLatestChanges: !0, displayWarning: !1 }, Rat: { taxo: "NCBITaxon:10114", iconClass: "mapicon-icon_rat", displayLatestChanges: !0, displayWarning: !1 }, Mouse: { taxo: "NCBITaxon:10090", iconClass: "mapicon-icon_mouse", displayLatestChanges: !0, displayWarning: !1 }, Pig: { taxo: "NCBITaxon:9823", iconClass: "mapicon-icon_pig", displayLatestChanges: !0, displayWarning: !1 }, Cat: { taxo: "NCBITaxon:9685", iconClass: "mapicon-icon_cat", displayLatestChanges: !0, displayWarning: !0 } }), n3e = (e) => { if (e) { const t = t3e(); for (let n in t) if (e.taxo === t[n].taxo) if (e.biologicalSex && t[n].biologicalSex) { if (e.biologicalSex === t[n].biologicalSex) return n; } else return n; } return ""; }, r3e = (e) => { if (e) { const t = e.split("//")[1]; if (t) { const n = t.split("/")[0], r = t.indexOf("/"), o = t.substring(r + 1); return { s3Bucket: n, s3Prefix: o }; } } }, sE = async (e, t) => { let n = "", r; const o = await fetch(`${e}get_body_scaffold_info/${t}`); if (o.ok) { const a = await o.json(), i = r3e(a.s3uri); n = `${e}s3-resource/${i.s3Prefix}files/${a.path}?s3BucketName=${i.s3Bucket}`; const s = `${e}s3-resource/${i.s3Prefix}files/${a.contextinfo}?s3BucketName=${i.s3Bucket}`; r = { s3uri: a.s3uri, contextCardUrl: s, discoverId: a.id, version: a.version }; } else t === "rat" ? n = "https://mapcore-bucket1.s3.us-west-2.amazonaws.com/WholeBody/31-May-2021/ratBody/ratBody_syncmap_metadata.json" : t === "human" && (n = "https://mapcore-bucket1.s3.us-west-2.amazonaws.com/WholeBody/27-4-23-human/human_body_metadata.json"); return { url: n, datasetInfo: r }; }, o3e = (e, t) => { const n = t.map((r) => typeof r == "string" ? r.toLowerCase() : r); return e.filter( (r) => typeof r == "string" ? n.includes(r.toLowerCase()) : n.includes(r) ); }, eYe = (e) => Object.keys(e).map((t) => `${t}=${e[t]}`).join("&"); async function tYe(e) { const t = sessionStorage.getItem("flatmap-knowledge"); if (t) { const o = JSON.parse(t).filter((a) => a.references && a.references.length).filter((a) => a.references.includes(e)); if (o.length) return o.map((i) => i.id); } return []; } async function nYe(e, t, n) { const o = `select knowledge from knowledge where source="${qV(e)}" and knowledge like "%${t}%" order by source desc`; return (await n.queryKnowledge(o)).map((l) => JSON.parse(l)).map((l) => l.id); } function qV(e) { return KV(e.provenance); } function KV(e) { let t = ""; if (e != null && e.connectivity) { const n = e.connectivity; "knowledge-source" in n ? t = n["knowledge-source"] : "npo" in n && (t = `${n.npo.release}-npo`); } return t; } async function rYe(e, t) { const n = qV(e), r = `select knowledge from knowledge where source="${n}" order by source desc`; s3e(); const o = sessionStorage.getItem("flatmap-knowledge"), a = sessionStorage.getItem("flatmap-knowledge-source"); if (!o || a !== n) { const s = (await t.queryKnowledge(r)).map((l) => JSON.parse(l)); return sessionStorage.setItem("flatmap-knowledge", JSON.stringify(s)), sessionStorage.setItem("flatmap-knowledge-source", n), a3e(), s; } return JSON.parse(o); } function a3e() { const n = (/* @__PURE__ */ new Date()).getTime() + 864e5; sessionStorage.setItem("flatmap-knowledge-expiry", n); } function i3e() { [ "flatmap-knowledge", "flatmap-knowledge-expiry", "flatmap-knowledge-source" ].forEach((t) => { sessionStorage.removeItem(t); }); } function s3e() { const e = sessionStorage.getItem("flatmap-knowledge-expiry"); (/* @__PURE__ */ new Date()).getTime() > e && i3e(); } const Wm = Df("entries", { state: () => iE(), getters: { findIndexOfId: (e) => (t) => { for (let n = 0; n < e.entries.length; n++) if (e.entries[n].id == t) return n; return -1; } }, actions: { addNewEntry(e) { this.entries.push(e); }, destroyEntry(e) { e > -1 && this.entries.splice(e, 1); }, setAll(e) { this.entries = [], Object.assign(this.entries, e); }, updateViewForEntry({ id: e, viewUrl: t }) { const n = this.entries.find((r) => r.id === e); n.viewUrl = t; }, updateMapForEntry(e, t) { if (e.id === t.id) { const n = KV(t.prov); e.uuid = t.prov.uuid, e.sckanVersion = n; } } } }), ap = [ { id: "ilxtr:neuron-type-keast-13", centrelines: [ "n_71" ] }, { id: "ilxtr:neuron-type-keast-2", centrelines: [ "bladder_n" ] }, { id: "ilxtr:neuron-type-keast-3", centrelines: [ "bladder_n", "hypogastric_n" ] }, { id: "ilxtr:neuron-type-keast-15", centrelines: [ "n_73" ] }, { id: "ilxtr:neuron-type-keast-1", centrelines: [ "bladder_n" ] }, { id: "ilxtr:neuron-type-keast-7", centrelines: [ "L1_ventral_root_ramus", "L1_spinal_n-1", "lumbar_splanchnic_n", "L2_spinal_n", "L2_ventral_root_ramus" ] }, { id: "ilxtr:neuron-type-keast-9", centrelines: [ "L6_spinal_n-1", "L6_ventral_root", "pudendal_n", "L5_spinal_n", "L5_ventral_root" ] }, { id: "ilxtr:neuron-type-keast-10", centrelines: [ "S1_dorsal_root", "S1_spinal_n-2", "pelvic_splanchnic_n", "L6_spinal_n-2", "L6_dorsal_root", "bladder_n" ] }, { id: "ilxtr:neuron-type-keast-11", centrelines: [ "lumbar_splanchnic_n", "L2_spinal_n", "L1_spinal_n-1", "hypogastric_n", "bladder_n", "L1_dorsal_root", "L2_dorsal_root" ] }, { id: "ilxtr:neuron-type-keast-12", centrelines: [ "L6_spinal_n-1", "L6_dorsal_root", "pudendal_n", "S1_spinal_n-1", "S1_dorsal_root" ] }, { id: "ilxtr:neuron-type-keast-8", centrelines: [ "L1_ventral_root_paravertebral_ganglion", "L1-L2_interganglionic_segment", "sympathetic_trunk_T13-L1", "L2_ventral_root_paravertebral_ganglion", "sympathetic_trunk_L2-L3", "sympathetic_trunk_L4-L5", "sympathetic_trunk_L3-L4", "sympathetic_trunk_L5-L6", "sympathetic_trunk_T12-T13" ] }, { id: "ilxtr:neuron-type-keast-20", centrelines: [ "T1_T2_cns", "C8_T1_cns", "T2_T3_cns", "T10_T11_cns", "T9_T10_cns", "T11_T12_cns", "T8_T9_cns", "C7_C8_cns", "C6_C7_cns", "C4_C5_cns", "C3_C4_cns", "C5_C6_cns", "medulla_C1_cns", "pons_medulla_cns", "C1_C2_cns", "T5_T6_cns", "T4_T5_cns", "T6_T7_cns", "L3_L4_cns", "L2_L3_cns", "L4_L5_cns", "L5_L6_cns", "T13_L1_cns", "T12_T13_cns", "L1_L2_cns", "T3_T4_cns", "n_69", "C2_C3_cns", "T7_T8_cns" ] }, { id: "ilxtr:neuron-type-keast-16", centrelines: [ "n_74" ] }, { id: "ilxtr:neuron-type-keast-4", centrelines: [ "sympathetic_trunk_L6-S1", "L6_gray_ramus-spinal_n", "sympathetic_trunk_L5-L6", "S1_gray_ramus-spinal_n", "S1_spinal_n-2", "pelvic_splanchnic_n", "L6_spinal_n-2", "L1-L2_interganglionic_segment", "sympathetic_trunk_T13-L1", "sympathetic_trunk_L2-L3", "bladder_n", "sympathetic_trunk_L4-L5", "sympathetic_trunk_L3-L4", "sympathetic_trunk_T12-T13" ] }, { id: "ilxtr:neuron-type-keast-17", centrelines: [ "n_75" ] }, { id: "ilxtr:neuron-type-keast-5", centrelines: [ "S1_ventral_root", "S1_spinal_n-2", "pelvic_splanchnic_n", "L6_spinal_n-2", "L6_ventral_root" ] }, { id: "ilxtr:neuron-type-keast-18", centrelines: [ "n_70" ] }, { id: "ilxtr:neuron-type-keast-6", centrelines: [ "L1_ventral_root_ramus", "L1_spinal_n-1", "lumbar_splanchnic_n", "L2_spinal_n", "hypogastric_n", "L2_ventral_root_ramus" ] }, { id: "ilxtr:neuron-type-keast-19", centrelines: [ "n_69" ] }, { id: "ilxtr:neuron-type-keast-14", centrelines: [ "n_72" ] } ]; function l3e() { return [ { id: "UBERON:0000948", name: "Heart", type: "simulation" }, { id: "UBERON:0001156", name: "Colon", type: "simulation" }, { id: "UBERON:0001255", name: "Bladder", type: "simulation" }, { id: "UBERON:0000945", name: "Stomach", type: "simulation" }, { id: "UBERON:0001759", name: "Vagus nerve", type: "simulation" }, { id: "UBERON:0002108", name: "Small intestines", type: "simulation" }, { id: "UBERON:0002107", name: "Liver", type: "simulation" } ]; } function u3e() { return l3e(); } function oYe(e) { if (e) for (let t = 0; t < ap.length; t++) { if (ap[t].id == e) return ap[t].centrelines; if (ap[t].centrelines.find((r) => r === e)) return [ap[t].id]; } return []; } function aYe(e) { if (e) { const t = e.toLowerCase(); if (t.includes("heart")) return { id: "UBERON:0000948", name: "Heart" }; if (t.includes("liver")) return { id: "UBERON:0002107", name: "Liver" }; if (t.includes("stomach")) return { id: "UBERON:0000945", name: "Stomach" }; if (t.includes("colon")) return { id: "UBERON:0001156", name: "Colon" }; if (t.includes("bladder")) return { id: "UBERON:0001255", name: "Bladder" }; } } const u_ = (e) => { switch (e) { case "2horpanel": return { "split-1": { content: !1, horizontal: !0, children: ["pane-1", "pane-2"] }, "pane-1": { content: !0, id: 1 }, "pane-2": { content: !0, id: 2 } }; case "2vertpanel": return { "split-1": { content: !1, horizontal: !1, children: ["pane-1", "pane-2"] }, "pane-1": { content: !0, id: 1 }, "pane-2": { content: !0, id: 2 } }; case "3panel": return { "split-1": { content: !1, horizontal: !1, children: ["pane-1", "split-2"] }, "split-2": { content: !1, horizontal: !0, children: ["pane-2", "pane-3"] }, "pane-1": { content: !0, id: 1 }, "pane-2": { content: !0, id: 2 }, "pane-3": { content: !0, id: 3 } }; case "4panel": return { "split-1": { content: !1, horizontal: !1, children: ["split-3", "split-2"] }, "split-2": { content: !1, horizontal: !0, children: ["pane-2", "pane-3"] }, "split-3": { content: !1, horizontal: !0, children: ["pane-1", "pane-4"] }, "pane-1": { content: !0, id: 1 }, "pane-2": { content: !0, id: 2 }, "pane-3": { content: !0, id: 3 }, "pane-4": { content: !0, id: 4 } }; case "5panel": return { "split-1": { content: !1, horizontal: !0, children: ["split-3", "split-2"] }, "split-2": { content: !1, horizontal: !1, children: ["pane-2", "pane-3"] }, "split-3": { content: !1, horizontal: !1, children: ["pane-1", "pane-4", "pane-5"] }, "pane-1": { content: !0, id: 1 }, "pane-2": { content: !0, id: 2 }, "pane-3": { content: !0, id: 3 }, "pane-4": { content: !0, id: 4 }, "pane-5": { content: !0, id: 5 } }; case "6panel": return { "split-1": { content: !1, horizontal: !0, children: ["split-3", "split-2"] }, "split-2": { content: !1, horizontal: !1, children: ["pane-2", "pane-3", "pane-5"] }, "split-3": { content: !1, horizontal: !1, children: ["pane-1", "pane-4", "pane-6"] }, "pane-1": { content: !0, id: 1 }, "pane-2": { content: !0, id: 2 }, "pane-3": { content: !0, id: 3 }, "pane-4": { content: !0, id: 4 }, "pane-5": { content: !0, id: 5 }, "pane-6": { content: !0, id: 6 } }; case "6panelVertical": return { "split-1": { content: !1, horizontal: !1, children: ["split-3", "split-2"] }, "split-2": { content: !1, horizontal: !0, children: ["pane-2", "pane-3", "pane-5"] }, "split-3": { content: !1, horizontal: !0, children: ["pane-1", "pane-4", "pane-6"] }, "pane-1": { content: !0, id: 1 }, "pane-2": { content: !0, id: 2 }, "pane-3": { content: !0, id: 3 }, "pane-4": { content: !0, id: 4 }, "pane-5": { content: !0, id: 5 }, "pane-6": { content: !0, id: 6 } }; case "singlepanel": default: return { "split-1": { content: !1, horizontal: !1, children: ["pane-1"] }, "pane-1": { content: !0, id: 1 } }; } }, c3e = (e, t) => { const n = [], r = []; for (const [o, a] of Object.entries(t)) a.content && (1 > a.id || n.includes(a.id) ? r.push(o) : n.push(a.id)); r.forEach((o) => { let a = !1; for (let i = 0; i < e.length && !a; i++) n.includes(e[i].id) || (t[o].id = e[i].id, n.push(e.id), a = !0); }); }, d3e = (e) => { const t = {}; for (const [n, r] of Object.entries(e)) r.content && (t[n] = r); return t; }, $P = (e, t) => { const n = d3e(e), r = u_(t); for (const [o, a] of Object.entries(n)) r[o] = a; return r; }, uc = (e, t) => Object.keys(e).find((n) => e[n].id === t), EP = () => ({ activeView: "singlepanel", idNamePair: {}, viewIcons: [ { icon: "singlepanel", name: "Single view", min: 1 }, { icon: "2horpanel", name: "Horizontal split", min: 2 }, { icon: "2vertpanel", name: "Vertical split", min: 2 }, { icon: "3panel", name: "Three panes", min: 3 }, { icon: "4panel", name: "Four panes", min: 4 }, { icon: "5panel", name: "Five panes", min: 5 }, { icon: "6panel", name: "Six (horizontal)", min: 6 }, { icon: "6panelVertical", name: "Six (vertical)", min: 6 } //{ icon: "customise", name: "Customise", min: 2 } ], customLayout: { "split-1": { content: !1, horizontal: !1, children: ["pane-1"] }, "pane-1": { content: !0, id: 1 } /* Example layout "split-1": {content: false, horizontal: true, children: ["split-2", "pane-1"]}, "split-2": {content: false, horizontal: false, children: ["pane-2", "pane-3"]}, "pane-1": {content: true, id: 1}, "pane-2": {content: true, id: 2}, "pane-3": {content: true, id: 3}, */ }, splitters: { first: 50, second: 50, third: 50 } }), Ku = Df("splitFlow", { state: () => EP(), getters: { getActivePaneIds: (e) => () => { const t = []; let n; for (const r in e.customLayout) e.customLayout[r].id && t.push(e.customLayout[r].id); switch (e.activeView) { case "singlepanel": n = t.slice(0, 1); break; case "2horpanel": case "2vertpanel": n = t.slice(0, 2); break; case "3panel": n = t.slice(0, 3); break; case "4panel": n = t.slice(0, 4); break; case "5panel": n = t.slice(0, 5); break; case "6panelVertical": case "6panel": n = t.slice(0, 6); break; default: n = []; break; } return n; }, getPaneNameById: (e) => (t) => uc(e.customLayout, t), getState: (e) => () => ({ activeView: e.activeView, splitters: e.splitters, customLayout: e.customLayout }), isPaneActive: (e) => (t) => { const n = u_(e.activeView); return Object.keys(n).includes(t); } }, actions: { assignOrSwapPaneWithIds(e) { let t = uc(this.customLayout, e.source), n = uc(this.customLayout, e.target); n && (this.customLayout[n].id = e.source), t && (this.customLayout[t].id = e.target), this.updateSplitPanels(); }, getAvailableTerms(e) { let t = u3e(); for (let n = 0; n < t.length; n++) this.idNamePair[t[n].id] = t[n].name; if (e) { this._controller && this._controller.abort(), this._controller = new AbortController(); let n = this._controller.signal; fetch(`${e}get-organ-curies`, { signal: n }).then((r) => r.json()).then((r) => { this._controller = void 0, r.uberon.array.forEach((o) => { this.idNamePair[o.id.toUpperCase()] = o.name.charAt(0).toUpperCase() + o.name.slice(1); }); }); } }, updateActiveView(e) { this.activeView = e.view; const t = $P( this.customLayout, this.activeView ); c3e(e.entries, t); for (const [n, r] of Object.entries(t)) this.customLayout[n] = r; this.updateSplitPanels(); }, setSplitter(e) { this.splitters[e.name] && (this.splitters[e.name] = e.value); }, setState(e) { if (e) { let t; if (e.activeView && (this.activeView = e.activeView), e.customLayout) t = e.customLayout; else if (t = u_(this.activeView), e.slotInfo) for (let n = 0; n < e.slotInfo.length; n++) switch (e.slotInfo[n].name) { case "first": t["pane-1"].id = e.slotInfo[n].id; break; case "second": "pane-2" in t && (t["pane-2"].id = e.slotInfo[n].id); break; case "thrid": "pane-3" in t && (t["pane-3"].id = e.slotInfo[n].id); break; case "fourth": "pane-4" in t && (t["pane-4"].id = e.slotInfo[n].id); break; case "fifth": "pane-5" in t && (t["pane-5"].id = e.slotInfo[n].id); break; case "sixth": "pane-6" in t && (t["pane-6"].id = e.slotInfo[n].id); break; } for (const [n, r] of Object.entries(t)) this.customLayout[n] = r; for (const [n, r] of Object.entries(e.splitters)) this.splitters[n] = r; } }, setIdToPrimaryPane(e) { const t = uc(this.customLayout, e), n = this.customLayout["pane-1"].id; this.customLayout["pane-1"].id = e, t && (this.customLayout[t].id = n); }, reset() { const e = EP(); this.activeView = e.activeView, this.customLayout = e.customLayout, this.splitters = e.splitters; }, closeSlot(e) { if (e) { let t = 0; if (e.entries) for (let n = 0; n < e.entries.length && t == 0; n++) e.entries[n].id !== e.id && uc(this.customLayout, e.entries[n].id) === void 0 && (t = e.entries[n].id); if (this.activeView !== "customise") { const n = this.activeView; switch (this.activeView) { case "2horpanel": case "2vertpanel": this.activeView = "singlepanel"; break; case "3panel": this.activeView = "2vertpanel"; break; case "4panel": this.activeView = "3panel"; break; case "5panel": this.activeView = "4panel"; break; case "6panelVertical": case "6panel": this.activeView = "5panel"; break; } const r = $P( this.customLayout, this.activeView ); switch (uc(this.customLayout, e.id)) { case "pane-1": switch (n) { case "2horpanel": case "2vertpanel": r["pane-1"].id = r["pane-2"].id, r["pane-2"].id = t; break; case "3panel": r["pane-1"].id = r["pane-2"].id, r["pane-2"].id = r["pane-3"].id, r["pane-3"].id = t; break; case "4panel": r["pane-1"].id = r["pane-2"].id, r["pane-2"].id = r["pane-3"].id, r["pane-3"].id = r["pane-4"].id, r["pane-4"].id = t; break; case "5panel": r["pane-1"].id = r["pane-2"].id, r["pane-2"].id = r["pane-3"].id, r["pane-3"].id = r["pane-4"].id, r["pane-4"].id = r["pane-5"].id, r["pane-5"].id = t; break; case "6panelVertical": case "6panel": r["pane-1"].id = r["pane-2"].id, r["pane-2"].id = r["pane-3"].id, r["pane-3"].id = r["pane-4"].id, r["pane-4"].id = r["pane-5"].id, r["pane-5"].id = r["pane-6"].id, r["pane-6"].id = t; break; } break; case "pane-2": switch (n) { case "2horpanel": case "2vertpanel": r["pane-2"].id = t; break; case "3panel": r["pane-2"].id = r["pane-3"].id, r["pane-3"].id = t; break; case "4panel": r["pane-2"].id = r["pane-3"].id, r["pane-3"].id = r["pane-4"].id, r["pane-4"].id = t; break; case "5panel": r["pane-2"].id = r["pane-3"].id, r["pane-3"].id = r["pane-4"].id, r["pane-4"].id = r["pane-5"].id, r["pane-5"].id = t; break; case "6panelVertical": case "6panel": r["pane-2"].id = r["pane-3"].id, r["pane-3"].id = r["pane-4"].id, r["pane-4"].id = r["pane-5"].id, r["pane-5"].id = r["pane-6"].id, r["pane-6"].id = t; break; } break; case "pane-3": switch (n) { case "3panel": r["pane-3"].id = t; break; case "4panel": r["pane-3"].id = r["pane-4"].id, r["pane-4"].id = t; break; case "5panel": r["pane-3"].id = r["pane-4"].id, r["pane-4"].id = r["pane-5"].id, r["pane-5"].id = t; break; case "6panelVertical": case "6panel": r["pane-3"].id = r["pane-4"].id, r["pane-4"].id = r["pane-5"].id, r["pane-5"].id = r["pane-6"].id, r["pane-6"].id = t; break; } break; case "pane-4": switch (n) { case "4panel": r["pane-4"].id = t; break; case "5panel": r["pane-4"].id = r["pane-5"].id, r["pane-5"].id = t; break; case "6panelVertical": case "6panel": r["pane-4"].id = r["pane-5"].id, r["pane-5"].id = r["pane-6"].id, r["pane-6"].id = t; break; } break; case "pane-5": switch (n) { case "5panel": r["pane-5"].id = t; break; case "6panelVertical": case "6panel": r["pane-5"].id = r["pane-6"].id, r["pane-6"].id = t; break; } break; case "pane-6": switch (n) { case "6panelVertical": case "6panel": r["pane-6"].id = t; break; } break; } for (const [a, i] of Object.entries(r)) this.customLayout[a] = i; } } }, updateSplitPanels() { ft.emit("species-layout-connectivity-update"); } } }), p3e = { name: "ContentBar", components: { ElIconArrowDown: ma, ElIconArrowUp: iS, ElIconInfoFilled: uS, Input: q0, Option: HM, Popover: Z0, Row: W0, Select: VM, ContextCard: iV, FlatmapContextCard: sV, MapSvgIcon: aE }, props: { entry: Object }, data: function() { return { contextCardVisible: !1, slot: {}, boundariesElement: null, // this is set @vue:mounted by the parent component via the 'setBoundary' method showDetails: !0, contextCardEntry: void 0, titles: [] }; }, computed: { ...vl(Wm, yu, Ku), allClosable() { return this.settingsStore.allClosable; }, helpDelay() { return this.settingsStore.helpDelay; }, activeView: function() { return this.splitFlowStore.activeView; }, envVars: function() { return { API_LOCATION: this.settingsStore.sparcApi, ALGOLIA_INDEX: this.settingsStore.algoliaIndex, ALGOLIA_KEY: this.settingsStore.algoliaKey, ALGOLIA_ID: this.settingsStore.algoliaId, PENNSIEVE_API_LOCATION: this.settingsStore.pennsieveApi, NL_LINK_PREFIX: this.settingsStore.nlLinkPrefix, ROOT_URL: this.settingsStore.rootUrl }; }, popperOptions: function() { return { modifiers: [ { name: "preventOverflow", options: { boundary: this.boundariesElement } }, { name: "flip", options: { boundary: this.boundariesElement, flipVariations: !1, allowedAutoPlacements: ["bottom"] } } ] }; }, entries: function() { return this.titles = [], this.entriesStore.entries.map((e) => { const t = this.getEntryTitle(e); return this.titles.push({ id: e.id, title: t }), { ...e, title: t }; }); } }, methods: { closeAndRemove: function() { this.splitFlowStore.closeSlot({ id: this.entry.id, entries: this.entries }), ft.emit("RemoveEntryRequest", this.entry.id), this.$nextTick(() => { this.splitFlowStore.updateSplitPanels(); }); }, getEntryTitle: function(e) { if (e) { let t = e.label ? e.label + " " : "", n = e.type; return n == "Scaffold" && (n = "3D Scaffold"), t += n, e.datasetId ? t += " - " + e.datasetId : e.discoverId && (t += " - " + e.discoverId), t; } return "Viewer"; }, getTitle: function(e) { const { id: t, title: n } = e, r = this.titles.filter((o) => o.title === n); if (r.length > 1) { const o = []; for (let i = 0; i < r.length; i++) { const s = this.getCharById(i); o.push({ id: r[i].id, title: r[i].title + s }); } const a = o.find((i) => i.id === t); if (a) return a.title; } return n; }, getCharById: function(e) { return " (" + String.fromCharCode(65 + e) + ")"; }, viewerChanged: function(e) { if (this.entry.id && this.entry.id != e) { this.splitFlowStore.assignOrSwapPaneWithIds({ source: this.entry.id, target: e }), this.$nextTick(() => { setTimeout(() => { this.$emit("chooser-changed"); }, 1200); }); const t = this.entries.find((n) => n.id === e); jn.sendEvent({ event: "interaction_event", event_name: "portal_maps_toolbar_viewer_changed", category: (t == null ? void 0 : t.title) || "", location: "map_toolbar" }); } }, // setPopper with is needed as the flatmap context card does not have an image and has smaller with setPopperWidth: function(e) { let t = this.entries.find((n) => n.id === e); if (t) return t.type == "Flatmap" || t.type == "MultiFlatmap" ? "240px" : "440px"; }, // Set the boundaries element for the popper setBoundary: function(e) { this.boundariesElement = e; }, setupFlatmapContextCard: function(e) { this.contextCardVisible = !1; let t = Object.assign({ mapImpProv: e.prov }, this.entry); this.contextCardEntry = t; }, setupScaffoldContextCard: function() { this.entry.contextCardUrl && (this.contextCardEntry = { ...this.entry }); } }, mounted: function() { this.setupScaffoldContextCard(); } }, f3e = { class: "toolbar-flex-container" }, h3e = { key: 1, class: "toolbar-title" }; function v3e(e, t, n, r, o, a) { const i = HM, s = VM, l = sV, u = iV, c = iS, d = Er, p = ma, h = Z0, f = Ve("map-svg-icon"), v = W0; return S(), L("div", null, [ D("div", f3e, [ a.entries.length > 1 ? (S(), re(s, { key: 0, teleported: !1, "model-value": n.entry.id, placeholder: "Select", class: "select-box", "popper-class": "viewer_dropdown", onChange: t[0] || (t[0] = (m) => a.viewerChanged(m)) }, { default: N(() => [ (S(!0), L(Re, null, mt(a.entries, (m) => (S(), re(i, { key: m.id, label: a.getTitle(m), value: m.id }, null, 8, ["label", "value"]))), 128)) ]), _: 1 }, 8, ["model-value"])) : (S(), L("div", h3e, ge(a.getEntryTitle(n.entry)), 1)) ]), q(v, { class: "icon-group" }, { default: N(() => [ q(h, { placement: "bottom", teleported: !1, trigger: "manual", width: a.setPopperWidth(e.slot.id), offset: 0, "popper-class": "context-card-popover", "popper-options": a.popperOptions, visible: e.contextCardVisible }, O0({ reference: N(() => [ Be(D("div", null, [ Be(D("div", { class: "hide", onClick: t[3] || (t[3] = (m) => e.contextCardVisible = !1) }, [ Oe(" Hide information "), q(d, null, { default: N(() => [ q(c) ]), _: 1 }) ], 512), [ [ht, e.contextCardVisible] ]), Be(D("div", { class: "hide", onClick: t[4] || (t[4] = (m) => e.contextCardVisible = !0) }, [ Oe(" Show information "), q(d, null, { default: N(() => [ q(p) ]), _: 1 }) ], 512), [ [ht, !e.contextCardVisible] ]) ], 512), [ [ht, e.contextCardEntry] ]) ]), _: 2 }, [ e.contextCardEntry ? { name: "default", fn: N(() => [ e.contextCardEntry.type == "Flatmap" || e.contextCardEntry.type == "MultiFlatmap" ? (S(), re(l, { key: 0, class: "flatmap-context-card", mapImpProv: e.contextCardEntry.mapImpProv }, null, 8, ["mapImpProv"])) : J("", !0), e.contextCardEntry.type.toLowerCase() == "scaffold" ? (S(), re(u, { key: 1, entry: e.contextCardEntry, envVars: a.envVars, class: "context-card", onContextReady: t[1] || (t[1] = (m) => e.contextCardVisible = !0), onScaffoldViewClicked: t[2] || (t[2] = (m) => e.$emit("scaffold-view-clicked", m)) }, null, 8, ["entry", "envVars"])) : J("", !0) ]), key: "0" } : void 0 ]), 1032, ["width", "popper-options", "visible"]), q(h, { class: "tooltip", content: "Close and remove", placement: "bottom-end", "show-after": a.helpDelay, teleported: !1, trigger: "hover", "popper-class": "header-popper" }, { reference: N(() => [ Be(q(f, { icon: "close", class: "header-icon", onClick: t[5] || (t[5] = (m) => a.closeAndRemove()) }, null, 512), [ [ht, a.activeView !== "singlepanel" && (n.entry.mode !== "main" || a.allClosable)] ]) ]), _: 1 }, 8, ["show-after"]) ]), _: 1 }) ]); } const GV = /* @__PURE__ */ Ka(p3e, [["render", v3e], ["__scopeId", "data-v-61f2f88c"]]), g3e = ud(() => import("./Flatmap-DVKtL4Mf.js")), m3e = ud(() => import("./Iframe-CaupzeXP.js")), y3e = ud(() => import("./MultiFlatmap-BZvdNGcj.js")), b3e = ud(() => import("./Plot-BBfa4yfG.js")), w3e = ud(() => import("./Scaffold-B0JP635N.js")), x3e = ud(() => import("./Simulation-C_lPIxgC.js")), k3e = { name: "ContentVuer", props: { /** * Object containing information for * the required viewing. */ entry: Object, visible: { type: Boolean, default: !0 } }, components: { //DatasetHeader, Button: qf, ContentBar: GV, Flatmap: g3e, Iframe: m3e, MultiFlatmap: y3e, Plot: b3e, Scaffold: w3e, Simulation: x3e }, methods: { flatmapProvenanceReady: function(e) { var t; (t = this.$refs.contentBar) == null || t.setupFlatmapContextCard(e), this.entriesStore.updateMapForEntry(this.entry, e); }, getId: function() { return this.entry.id; }, getState: function() { var e; return (e = this.$refs.viewer) == null ? void 0 : e.getState(); }, resourceSelected: function(e) { this.$emit("resource-selected", e); }, scaffoldViewClicked: function(e) { var t; this.entry.viewUrl !== e ? this.entriesStore.updateViewForEntry({ id: this.entry.id, viewUrl: e }) : (t = this.$refs.viewer) == null || t.updateWithViewUrl(e); }, /** * Perform a local search on this contentvuer * @param {string} term - The search term to look for */ search: function(e) { var t; return (t = this.$refs.viewer) == null ? void 0 : t.search(e); }, /** * Push the suggested terms into the suggestions array */ searchSuggestions: function(e, t) { var n; (n = this.$refs.viewer) == null || n.searchSuggestions(e, t); }, setPanesBoundary: function() { var e; (e = this.$refs.contentBar) == null || e.setBoundary(this.$refs.container); }, speciesChanged: function(e) { this.activeSpecies = e, this.$emit("species-changed", e); }, /** * Check if this viewer is currently visible */ isVisible: function() { const e = this.splitFlowStore.getPaneNameById(this.entry.id); let t = !1; return e !== void 0 && (t = this.splitFlowStore.isPaneActive(e)), t; }, onResize: function() { var e; (e = this.$refs.viewer) == null || e.onResize(); }, //The following handle EventBus.on from SplitDialog onConnectivityItemClose: function() { var e; (e = this.$refs.viewer) == null || e.onConnectivityItemClose(); }, onConnectivitySourceChange: function(e) { var t; (t = this.$refs.viewer) == null || t.changeConnectivitySource(e); }, onFlatmapMarkerUpdate: function() { var e; (e = this.$refs.viewer) == null || e.flatmapMarkerUpdate(); }, onGlobalViewerSettingsUpdate: function() { var e; (e = this.$refs.viewer) == null || e.updateViewerSettings(); }, onHoverUpdate: function(e) { var t; (t = this.$refs.viewer) == null || t.sidebarHoverHighlight(e); }, onShowConnectivity: function(e) { var t; (t = this.$refs.viewer) == null || t.showConnectivity(e); }, onShowConnectivityTooltips: function(e) { var t; (t = this.$refs.viewer) == null || t.showConnectivityTooltips(e); }, onShowReferenceConnectivity: function(e) { var t; (t = this.$refs.viewer) == null || t.showConnectivitiesByReference(e); }, onSidebarAnnotationClose: function() { var e; (e = this.$refs.viewer) == null || e.onSidebarAnnotationClose(); }, onStartHelp: function() { var e; (e = this.$refs.viewer) == null || e.startHelp(); }, onFilterVisibility: function(e) { var t; (t = this.$refs.viewer) == null || t.setVisibilityFilter(e); }, onLoadConnectivityDetail: function(e) { var t; (t = this.$refs.viewer) == null || t.getKnowledgeTooltip(e); } }, data: function() { return { mouseHovered: !1, activeSpecies: "Rat" }; }, computed: { ...vl(Wm, Ku), viewerType() { switch (this.entry.type) { case "Biolucida": case "Iframe": case "Segmentation": return "Iframe"; default: return this.entry.type; } } } }, C3e = { class: "component-container", ref: "container" }; function _3e(e, t, n, r, o, a) { const i = GV; return S(), L("div", { class: "content-container", onMouseover: t[0] || (t[0] = (s) => e.mouseHovered = !0), onMouseleave: t[1] || (t[1] = (s) => e.mouseHovered = !1) }, [ q(i, { class: "toolbar", entry: n.entry, ref: "contentBar", onChooserChanged: a.onResize, onScaffoldViewClicked: a.scaffoldViewClicked, onVnodeMounted: a.setPanesBoundary }, null, 8, ["entry", "onChooserChanged", "onScaffoldViewClicked", "onVnodeMounted"]), D("div", C3e, [ (S(), re(bW, null, { default: N(() => [ (S(), re(yt(a.viewerType), { entry: n.entry, mouseHovered: e.mouseHovered, visible: n.visible, lazy: !0, ref: "viewer", onFlatmapProvenanceReady: a.flatmapProvenanceReady, onResourceSelected: a.resourceSelected, onSpeciesChanged: a.speciesChanged }, null, 40, ["entry", "mouseHovered", "visible", "onFlatmapProvenanceReady", "onResourceSelected", "onSpeciesChanged"])) ]), _: 1 })) ], 512) ], 32); } const WV = /* @__PURE__ */ Ka(k3e, [["render", _3e], ["__scopeId", "data-v-b017dd1e"]]); var YV = { exports: {} }; (function(e, t) { (function(n, r) { e.exports = r(); })(typeof window < "u" ? window : yre, function() { if (typeof window > "u") return null; var n = typeof window < "u" && window.Math == Math ? window : typeof self < "u" && self.Math == Math ? self : Function("return this")(), r = n.requestAnimationFrame || n.mozRequestAnimationFrame || n.webkitRequestAnimationFrame || function(c) { return n.setTimeout(c, 20); }, o = n.cancelAnimationFrame || n.mozCancelAnimationFrame || n.webkitCancelAnimationFrame || function(c) { n.clearTimeout(c); }; function a(c, d) { var p = Object.prototype.toString.call(c), h = p === "[object Array]" || p === "[object NodeList]" || p === "[object HTMLCollection]" || p === "[object Object]" || typeof jQuery < "u" && c instanceof jQuery || typeof Elements < "u" && c instanceof Elements, f = 0, v = c.length; if (h) for (; f < v; f++) d(c[f]); else d(c); } function i(c) { if (!c.getBoundingClientRect) return { width: c.offsetWidth, height: c.offsetHeight }; var d = c.getBoundingClientRect(); return { width: Math.round(d.width), height: Math.round(d.height) }; } function s(c, d) { Object.keys(d).forEach(function(p) { c.style[p] = d[p]; }); } var l = function(c, d) { var p = 0; function h() { var v = []; this.add = function(b) { v.push(b); }; var m, g; this.call = function(b) { for (m = 0, g = v.length; m < g; m++) v[m].call(this, b); }, this.remove = function(b) { var x = []; for (m = 0, g = v.length; m < g; m++) v[m] !== b && x.push(v[m]); v = x; }, this.length = function() { return v.length; }; } function f(v, m) { if (v) { if (v.resizedAttached) { v.resizedAttached.add(m); return; } v.resizedAttached = new h(), v.resizedAttached.add(m), v.resizeSensor = document.createElement("div"), v.resizeSensor.dir = "ltr", v.resizeSensor.className = "resize-sensor"; var g = { pointerEvents: "none", position: "absolute", left: "0px", top: "0px", right: "0px", bottom: "0px", overflow: "hidden", zIndex: "-1", visibility: "hidden", maxWidth: "100%" }, b = { position: "absolute", left: "0px", top: "0px", transition: "0s" }; s(v.resizeSensor, g); var x = document.createElement("div"); x.className = "resize-sensor-expand", s(x, g); var w = document.createElement("div"); s(w, b), x.appendChild(w); var k = document.createElement("div"); k.className = "resize-sensor-shrink", s(k, g); var C = document.createElement("div"); s(C, b), s(C, { width: "200%", height: "200%" }), k.appendChild(C), v.resizeSensor.appendChild(x), v.resizeSensor.appendChild(k), v.appendChild(v.resizeSensor); var _ = window.getComputedStyle(v), $ = _ ? _.getPropertyValue("position") : null; $ !== "absolute" && $ !== "relative" && $ !== "fixed" && $ !== "sticky" && (v.style.position = "relative"); var O = !1, F = 0, A = i(v), T = 0, R = 0, M = !0; p = 0; var j = function() { var se = v.offsetWidth, ae = v.offsetHeight; w.style.width = se + 10 + "px", w.style.height = ae + 10 + "px", x.scrollLeft = se + 10, x.scrollTop = ae + 10, k.scrollLeft = se + 10, k.scrollTop = ae + 10; }, P = function() { if (M) { var se = v.offsetWidth === 0 && v.offsetHeight === 0; if (se) { p || (p = r(function() { p = 0, P(); })); return; } else M = !1; } j(); }; v.resizeSensor.resetSensor = P; var V = function() { F = 0, O && (T = A.width, R = A.height, v.resizedAttached && v.resizedAttached.call(A)); }, U = function() { A = i(v), O = A.width !== T || A.height !== R, O && !F && (F = r(V)), P(); }, G = function(se, ae, de) { se.attachEvent ? se.attachEvent("on" + ae, de) : se.addEventListener(ae, de); }; G(x, "scroll", U), G(k, "scroll", U), p = r(function() { p = 0, P(); }); } } a(c, function(v) { f(v, d); }), this.detach = function(v) { p || (o(p), p = 0), l.detach(c, v); }, this.reset = function() { c.resizeSensor.resetSensor(); }; }; if (l.reset = function(c) { a(c, function(d) { d.resizeSensor.resetSensor(); }); }, l.detach = function(c, d) { a(c, function(p) { p && (p.resizedAttached && typeof d == "function" && (p.resizedAttached.remove(d), p.resizedAttached.length()) || p.resizeSensor && (p.contains(p.resizeSensor) && p.removeChild(p.resizeSensor), delete p.resizeSensor, delete p.resizedAttached)); }); }, typeof MutationObserver < "u") { var u = new MutationObserver(function(c) { for (var d in c) if (c.hasOwnProperty(d)) for (var p = c[d].addedNodes, h = 0; h < p.length; h++) p[h].resizeSensor && l.reset(p[h]); }); document.addEventListener("DOMContentLoaded", function(c) { u.observe(document.body, { childList: !0, subtree: !0 }); }); } return l; }); })(YV); var S3e = YV.exports; const $3e = /* @__PURE__ */ iM(S3e), E3e = { name: "ResizeSensor", methods: { activate: function() { this._sensor || (this._sensor = new $3e(this.$refs.display, this.displayResize), this.displayResize()); }, deactivate: function() { this._sensor && (this._sensor.detach(this.$refs.display, this.displayResize), delete this._sensor, this._sensor = void 0, this.displayResize()); }, displayResize: function() { this.$emit("resize"); } }, unmounted() { this.deactivate(); }, activated() { this.activate(); }, deactivated() { this.deactivate(); }, mounted: function() { this.activate(); } }, O3e = { style: { height: "100%", width: "100%", position: "absolute" }, ref: "display" }; function F3e(e, t, n, r, o, a) { return S(), L("div", O3e, null, 512); } const XV = /* @__PURE__ */ Ka(E3e, [["render", F3e]]), T3e = { name: "splitpanes", emits: ["ready", "resize", "resized", "pane-click", "pane-maximize", "pane-add", "pane-remove", "splitter-click"], props: { horizontal: { type: Boolean }, pushOtherPanes: { type: Boolean, default: !0 }, dblClickSplitter: { type: Boolean, default: !0 }, rtl: { type: Boolean, default: !1 }, firstSplitter: { type: Boolean } }, provide() { return { requestUpdate: this.requestUpdate, onPaneAdd: this.onPaneAdd, onPaneRemove: this.onPaneRemove, onPaneClick: this.onPaneClick }; }, data: () => ({ container: null, ready: !1, panes: [], touch: { mouseDown: !1, dragging: !1, activeSplitter: null }, splitterTaps: { splitter: null, timeoutId: null } }), computed: { panesCount() { return this.panes.length; }, indexedPanes() { return this.panes.reduce((e, t) => (e[t.id] = t) && e, {}); } }, methods: { updatePaneComponents() { this.panes.forEach((e) => { e.update && e.update({ [this.horizontal ? "height" : "width"]: `${this.indexedPanes[e.id].size}%` }); }); }, bindEvents() { document.addEventListener("mousemove", this.onMouseMove, { passive: !1 }), document.addEventListener("mouseup", this.onMouseUp), "ontouchstart" in window && (document.addEventListener("touchmove", this.onMouseMove, { passive: !1 }), document.addEventListener("touchend", this.onMouseUp)); }, unbindEvents() { document.removeEventListener("mousemove", this.onMouseMove, { passive: !1 }), document.removeEventListener("mouseup", this.onMouseUp), "ontouchstart" in window && (document.removeEventListener("touchmove", this.onMouseMove, { passive: !1 }), document.removeEventListener("touchend", this.onMouseUp)); }, onMouseDown(e, t) { this.bindEvents(), this.touch.mouseDown = !0, this.touch.activeSplitter = t; }, onMouseMove(e) { this.touch.mouseDown && (e.preventDefault(), this.touch.dragging = !0, this.calculatePanesSize(this.getCurrentMouseDrag(e)), this.$emit("resize", this.panes.map((t) => ({ min: t.min, max: t.max, size: t.size })))); }, onMouseUp() { this.touch.dragging && this.$emit("resized", this.panes.map((e) => ({ min: e.min, max: e.max, size: e.size }))), this.touch.mouseDown = !1, setTimeout(() => { this.touch.dragging = !1, this.unbindEvents(); }, 100); }, onSplitterClick(e, t) { "ontouchstart" in window && (e.preventDefault(), this.dblClickSplitter && (this.splitterTaps.splitter === t ? (clearTimeout(this.splitterTaps.timeoutId), this.splitterTaps.timeoutId = null, this.onSplitterDblClick(e, t), this.splitterTaps.splitter = null) : (this.splitterTaps.splitter = t, this.splitterTaps.timeoutId = setTimeout(() => { this.splitterTaps.splitter = null; }, 500)))), this.touch.dragging || this.$emit("splitter-click", this.panes[t]); }, onSplitterDblClick(e, t) { let n = 0; this.panes = this.panes.map((r, o) => (r.size = o === t ? r.max : r.min, o !== t && (n += r.min), r)), this.panes[t].size -= n, this.$emit("pane-maximize", this.panes[t]), this.$emit("resized", this.panes.map((r) => ({ min: r.min, max: r.max, size: r.size }))); }, onPaneClick(e, t) { this.$emit("pane-click", this.indexedPanes[t]); }, getCurrentMouseDrag(e) { const t = this.container.getBoundingClientRect(), { clientX: n, clientY: r } = "ontouchstart" in window && e.touches ? e.touches[0] : e; return { x: n - t.left, y: r - t.top }; }, getCurrentDragPercentage(e) { e = e[this.horizontal ? "y" : "x"]; const t = this.container[this.horizontal ? "clientHeight" : "clientWidth"]; return this.rtl && !this.horizontal && (e = t - e), e * 100 / t; }, calculatePanesSize(e) { const t = this.touch.activeSplitter; let n = { prevPanesSize: this.sumPrevPanesSize(t), nextPanesSize: this.sumNextPanesSize(t), prevReachedMinPanes: 0, nextReachedMinPanes: 0 }; const r = 0 + (this.pushOtherPanes ? 0 : n.prevPanesSize), o = 100 - (this.pushOtherPanes ? 0 : n.nextPanesSize), a = Math.max(Math.min(this.getCurrentDragPercentage(e), o), r); let i = [t, t + 1], s = this.panes[i[0]] || null, l = this.panes[i[1]] || null; const u = s.max < 100 && a >= s.max + n.prevPanesSize, c = l.max < 100 && a <= 100 - (l.max + this.sumNextPanesSize(t + 1)); if (u || c) { u ? (s.size = s.max, l.size = Math.max(100 - s.max - n.prevPanesSize - n.nextPanesSize, 0)) : (s.size = Math.max(100 - l.max - n.prevPanesSize - this.sumNextPanesSize(t + 1), 0), l.size = l.max); return; } if (this.pushOtherPanes) { const d = this.doPushOtherPanes(n, a); if (!d) return; ({ sums: n, panesToResize: i } = d), s = this.panes[i[0]] || null, l = this.panes[i[1]] || null; } s !== null && (s.size = Math.min(Math.max(a - n.prevPanesSize - n.prevReachedMinPanes, s.min), s.max)), l !== null && (l.size = Math.min(Math.max(100 - a - n.nextPanesSize - n.nextReachedMinPanes, l.min), l.max)); }, doPushOtherPanes(e, t) { const n = this.touch.activeSplitter, r = [n, n + 1]; return t < e.prevPanesSize + this.panes[r[0]].min && (r[0] = this.findPrevExpandedPane(n).index, e.prevReachedMinPanes = 0, r[0] < n && this.panes.forEach((o, a) => { a > r[0] && a <= n && (o.size = o.min, e.prevReachedMinPanes += o.min); }), e.prevPanesSize = this.sumPrevPanesSize(r[0]), r[0] === void 0) ? (e.prevReachedMinPanes = 0, this.panes[0].size = this.panes[0].min, this.panes.forEach((o, a) => { a > 0 && a <= n && (o.size = o.min, e.prevReachedMinPanes += o.min); }), this.panes[r[1]].size = 100 - e.prevReachedMinPanes - this.panes[0].min - e.prevPanesSize - e.nextPanesSize, null) : t > 100 - e.nextPanesSize - this.panes[r[1]].min && (r[1] = this.findNextExpandedPane(n).index, e.nextReachedMinPanes = 0, r[1] > n + 1 && this.panes.forEach((o, a) => { a > n && a < r[1] && (o.size = o.min, e.nextReachedMinPanes += o.min); }), e.nextPanesSize = this.sumNextPanesSize(r[1] - 1), r[1] === void 0) ? (e.nextReachedMinPanes = 0, this.panes[this.panesCount - 1].size = this.panes[this.panesCount - 1].min, this.panes.forEach((o, a) => { a < this.panesCount - 1 && a >= n + 1 && (o.size = o.min, e.nextReachedMinPanes += o.min); }), this.panes[r[0]].size = 100 - e.prevPanesSize - e.nextReachedMinPanes - this.panes[this.panesCount - 1].min - e.nextPanesSize, null) : { sums: e, panesToResize: r }; }, sumPrevPanesSize(e) { return this.panes.reduce((t, n, r) => t + (r < e ? n.size : 0), 0); }, sumNextPanesSize(e) { return this.panes.reduce((t, n, r) => t + (r > e + 1 ? n.size : 0), 0); }, findPrevExpandedPane(e) { return [...this.panes].reverse().find((t) => t.index < e && t.size > t.min) || {}; }, findNextExpandedPane(e) { return this.panes.find((t) => t.index > e + 1 && t.size > t.min) || {}; }, checkSplitpanesNodes() { Array.from(this.container.children).forEach((e) => { const t = e.classList.contains("splitpanes__pane"), n = e.classList.contains("splitpanes__splitter"); !t && !n && (e.parentNode.removeChild(e), console.warn("Splitpanes: Only elements are allowed at the root of . One of your DOM nodes was removed.")); }); }, addSplitter(e, t, n = !1) { const r = e - 1, o = document.createElement("div"); o.classList.add("splitpanes__splitter"), n || (o.onmousedown = (a) => this.onMouseDown(a, r), typeof window < "u" && "ontouchstart" in window && (o.ontouchstart = (a) => this.onMouseDown(a, r)), o.onclick = (a) => this.onSplitterClick(a, r + 1)), this.dblClickSplitter && (o.ondblclick = (a) => this.onSplitterDblClick(a, r + 1)), t.parentNode.insertBefore(o, t); }, removeSplitter(e) { e.onmousedown = void 0, e.onclick = void 0, e.ondblclick = void 0, e.parentNode.removeChild(e); }, redoSplitters() { const e = Array.from(this.container.children); e.forEach((n) => { n.className.includes("splitpanes__splitter") && this.removeSplitter(n); }); let t = 0; e.forEach((n) => { n.className.includes("splitpanes__pane") && (!t && this.firstSplitter ? this.addSplitter(t, n, !0) : t && this.addSplitter(t, n), t++); }); }, requestUpdate({ target: e, ...t }) { const n = this.indexedPanes[e._.uid]; Object.entries(t).forEach(([r, o]) => n[r] = o); }, onPaneAdd(e) { let t = -1; Array.from(e.$el.parentNode.children).some((o) => (o.className.includes("splitpanes__pane") && t++, o === e.$el)); const n = parseFloat(e.minSize), r = parseFloat(e.maxSize); this.panes.splice(t, 0, { id: e._.uid, index: t, min: isNaN(n) ? 0 : n, max: isNaN(r) ? 100 : r, size: e.size === null ? null : parseFloat(e.size), givenSize: e.size, update: e.update }), this.panes.forEach((o, a) => o.index = a), this.ready && this.$nextTick(() => { this.redoSplitters(), this.resetPaneSizes({ addedPane: this.panes[t] }), this.$emit("pane-add", { index: t, panes: this.panes.map((o) => ({ min: o.min, max: o.max, size: o.size })) }); }); }, onPaneRemove(e) { const t = this.panes.findIndex((r) => r.id === e._.uid), n = this.panes.splice(t, 1)[0]; this.panes.forEach((r, o) => r.index = o), this.$nextTick(() => { this.redoSplitters(), this.resetPaneSizes({ removedPane: { ...n, index: t } }), this.$emit("pane-remove", { removed: n, panes: this.panes.map((r) => ({ min: r.min, max: r.max, size: r.size })) }); }); }, resetPaneSizes(e = {}) { !e.addedPane && !e.removedPane ? this.initialPanesSizing() : this.panes.some((t) => t.givenSize !== null || t.min || t.max < 100) ? this.equalizeAfterAddOrRemove(e) : this.equalize(), this.ready && this.$emit("resized", this.panes.map((t) => ({ min: t.min, max: t.max, size: t.size }))); }, equalize() { const e = 100 / this.panesCount; let t = 0; const n = [], r = []; this.panes.forEach((o) => { o.size = Math.max(Math.min(e, o.max), o.min), t -= o.size, o.size >= o.max && n.push(o.id), o.size <= o.min && r.push(o.id); }), t > 0.1 && this.readjustSizes(t, n, r); }, initialPanesSizing() { let e = 100; const t = [], n = []; let r = 0; this.panes.forEach((a) => { e -= a.size, a.size !== null && r++, a.size >= a.max && t.push(a.id), a.size <= a.min && n.push(a.id); }); let o = 100; e > 0.1 && (this.panes.forEach((a) => { a.size === null && (a.size = Math.max(Math.min(e / (this.panesCount - r), a.max), a.min)), o -= a.size; }), o > 0.1 && this.readjustSizes(e, t, n)); }, equalizeAfterAddOrRemove({ addedPane: e, removedPane: t } = {}) { let n = 100 / this.panesCount, r = 0; const o = [], a = []; e && e.givenSize !== null && (n = (100 - e.givenSize) / (this.panesCount - 1)), this.panes.forEach((i) => { r -= i.size, i.size >= i.max && o.push(i.id), i.size <= i.min && a.push(i.id); }), !(Math.abs(r) < 0.1) && (this.panes.forEach((i) => { e && e.givenSize !== null && e.id === i.id || (i.size = Math.max(Math.min(n, i.max), i.min)), r -= i.size, i.size >= i.max && o.push(i.id), i.size <= i.min && a.push(i.id); }), r > 0.1 && this.readjustSizes(r, o, a)); }, readjustSizes(e, t, n) { let r; e > 0 ? r = e / (this.panesCount - t.length) : r = e / (this.panesCount - n.length), this.panes.forEach((o, a) => { if (e > 0 && !t.includes(o.id)) { const i = Math.max(Math.min(o.size + r, o.max), o.min), s = i - o.size; e -= s, o.size = i; } else if (!n.includes(o.id)) { const i = Math.max(Math.min(o.size + r, o.max), o.min), s = i - o.size; e -= s, o.size = i; } o.update({ [this.horizontal ? "height" : "width"]: `${this.indexedPanes[o.id].size}%` }); }), Math.abs(e) > 0.1 && this.$nextTick(() => { this.ready && console.warn("Splitpanes: Could not resize panes correctly due to their constraints."); }); } }, watch: { panes: { deep: !0, immediate: !1, handler() { this.updatePaneComponents(); } }, horizontal() { this.updatePaneComponents(); }, firstSplitter() { this.redoSplitters(); }, dblClickSplitter(e) { [...this.container.querySelectorAll(".splitpanes__splitter")].forEach((t, n) => { t.ondblclick = e ? (r) => this.onSplitterDblClick(r, n) : void 0; }); } }, beforeUnmount() { this.ready = !1; }, mounted() { this.container = this.$refs.container, this.checkSplitpanesNodes(), this.redoSplitters(), this.resetPaneSizes(), this.$emit("ready"), this.ready = !0; }, render() { return Gt( "div", { ref: "container", class: [ "splitpanes", `splitpanes--${this.horizontal ? "horizontal" : "vertical"}`, { "splitpanes--dragging": this.touch.dragging } ] }, this.$slots.default() ); } }, A3e = (e, t) => { const n = e.__vccOpts || e; for (const [r, o] of t) n[r] = o; return n; }, I3e = { name: "pane", inject: ["requestUpdate", "onPaneAdd", "onPaneRemove", "onPaneClick"], props: { size: { type: [Number, String], default: null }, minSize: { type: [Number, String], default: 0 }, maxSize: { type: [Number, String], default: 100 } }, data: () => ({ style: {} }), mounted() { this.onPaneAdd(this); }, beforeUnmount() { this.onPaneRemove(this); }, methods: { update(e) { this.style = e; } }, computed: { sizeNumber() { return this.size || this.size === 0 ? parseFloat(this.size) : null; }, minSizeNumber() { return parseFloat(this.minSize); }, maxSizeNumber() { return parseFloat(this.maxSize); } }, watch: { sizeNumber(e) { this.requestUpdate({ target: this, size: e }); }, minSizeNumber(e) { this.requestUpdate({ target: this, min: e }); }, maxSizeNumber(e) { this.requestUpdate({ target: this, max: e }); } } }; function P3e(e, t, n, r, o, a) { return S(), L("div", { class: "splitpanes__pane", onClick: t[0] || (t[0] = (i) => a.onPaneClick(i, e._.uid)), style: Ye(e.style) }, [ ue(e.$slots, "default") ], 4); } const L3e = /* @__PURE__ */ A3e(I3e, [["render", P3e]]), R3e = { name: "CustomSplitter", components: { Splitpanes: T3e, Pane: L3e, ResizeSensor: XV }, props: { index: { type: String, default: function() { return "split-1"; } } }, methods: { requestStylesUpdate: function(e) { if (this.$refs && e in this.$refs && this.$refs[e] && this.$refs[e][0] && this.$refs[e][0].$el) { const n = this.$refs[e][0].$el.getBoundingClientRect(); ft.emit("PaneResize", { refName: e, rect: n }); } }, /** * Callback when the vuers emit a selected event. */ calculateStyles: function(e) { this.$refs && (e.startsWith("pane") ? this.requestStylesUpdate(e) : e.startsWith("split") && this.customLayout[e].children.forEach((t) => { t.startsWith("pane") && this.requestStylesUpdate(t); })); }, childUnmounted: function(e) { ft.emit("PaneUnmounted", { refName: e }); } }, computed: { ...vl(Ku), children() { return this.customLayout[this.index].children; }, customLayout() { return this.splitFlowStore.customLayout; }, isHorizontal() { return this.customLayout[this.index].horizontal; } } }, N3e = { style: { height: "100%", width: "100%" } }; function M3e(e, t, n, r, o, a) { const i = XV, s = Ve("custom-splitter", !0), l = Ve("pane"), u = Ve("splitpanes"); return S(), L("div", N3e, [ q(i, { onResize: t[0] || (t[0] = (c) => a.calculateStyles(n.index)) }), q(u, { class: "default-theme", horizontal: a.isHorizontal, "dbl-click-splitter": !1 }, { default: N(() => [ (S(!0), L(Re, null, mt(a.children, (c) => (S(), re(l, { key: c, ref_for: !0, ref: c, onVnodeBeforeUnmount: (d) => a.childUnmounted(c) }, { default: N(() => [ a.customLayout[c].content ? (S(), re(i, { key: 0, onResize: (d) => a.calculateStyles(c) }, null, 8, ["onResize"])) : (S(), re(s, { key: c, index: c }, null, 8, ["index"])) ]), _: 2 }, 1032, ["onVnodeBeforeUnmount"]))), 128)) ]), _: 1 }, 8, ["horizontal"]) ]); } const ZV = /* @__PURE__ */ Ka(R3e, [["render", M3e], ["__scopeId", "data-v-0667e71f"]]), D3e = Df("connectivities", { state: () => ({ activeConnectivityKeys: [], globalConnectivities: {}, filterOptions: {}, filterSources: {} }), getters: { getUniqueConnectivitiesByKeys: (e) => { const t = e.activeConnectivityKeys.reduce((n, r) => { const o = e.globalConnectivities[r]; if (!o) return n; for (const a of o) { const i = a.id; n[i] = n[i] ? { ...n[i], ...a } : { ...a }; } return n; }, {}); return Object.values(t).sort((n, r) => n.label.localeCompare(r.label)); }, getUniqueFilterOptionsByKeys: (e) => { const t = e.activeConnectivityKeys.reduce((n, r) => { const o = e.filterOptions[r]; if (!o) return n; for (const a of o) if (n[a.key]) { const i = [...n[a.key].children, ...a.children], s = Array.from( new Map(i.map((l) => [l.key, l])).values() ); n[a.key].children = s; } else n[a.key] = { ...a }; return n; }, {}); return Object.values(t); }, getUniqueFilterSourcesByKeys: (e) => e.activeConnectivityKeys.reduce((n, r) => { const o = e.filterSources[r]; if (!o) return n; for (const [a, i] of Object.entries(o)) { n[a] || (n[a] = {}); for (const [s, l] of Object.entries(i)) n[a][s] = n[a][s] ? Array.from(/* @__PURE__ */ new Set([...n[a][s], ...l])) : [...l]; } return n; }, {}) }, actions: { updateActiveConnectivityKeys(e) { this.activeConnectivityKeys = e; }, updateGlobalConnectivities(e) { this.globalConnectivities = e; }, updateFilterOptions(e) { this.filterOptions = e; }, updateFilterSources(e) { this.filterSources = e; } } }), B3e = { name: "SplitDialog", components: { ContentVuer: WV, CustomSplitter: ZV }, props: { entries: { type: Array, default: function() { return []; } } }, data: function() { return { styles: {}, query: "", filter: [] }; }, methods: { /** * Callback when the vuers emit a selected event. */ resourceSelected: function(e) { this.$emit("resource-selected", e); }, speciesChanged: function(e) { this.$emit("species-changed", e); }, getClass: function(e) { return this.isIdVisible(e) ? this.getRefsName(e) : "inactive"; }, getRefsName: function(e) { const t = this.splitFlowStore.getPaneNameById(e); return t && (t in this.styles || (this.styles[t] = {})), t; }, getStyle: function(e) { const t = this.getRefsName(e); return t && t in this.styles && this.styles[t] ? this.styles[t] : {}; }, getActiveContents: function() { const e = [], t = this.$refs.content; return t && t.forEach((n) => { n.isVisible() && e.push(n); }), e; }, isIdVisible: function(e) { return this.splitFlowStore.getPaneNameById(e) !== void 0; }, getContentsWithId: function(e) { let t = this.$refs.content; for (let n = 0; n < t.length; n++) if (t[n].getId() == e) return t[n]; }, getContentsState: function() { let e = [], t = this.$refs.content; for (let n = 0; n < t.length; n++) e.push(t[n].getState()); return e; }, setStyles: function(e, t) { if (this.$refs && this.$refs.tabContainer) { const n = this.$refs.tabContainer.getBoundingClientRect(), r = {}; r.width = `${t.width}px`, r.left = `${t.left - n.left}px`, r.height = `${t.height}px`, r.top = `${t.top - n.top}px`, r.display = "block", this.styles[e] = r; } }, hidePane: function(e) { if (this.$refs && "tabContainer" in this.$refs) { const t = {}; t.display = "none", this.styles[e] = t; } }, resize: function() { this.__userResize__ = !0; }, resized: function(e, t) { this.__userResize__ && this.splitFlowStore.setSplitter({ name: e, value: t[0].size }), this.__userResize__ = !1; }, onSpeciesLayoutConnectivityUpdate: function() { let e = this.splitFlowStore.getActivePaneIds(); const t = [307, "307"], n = Object.keys(this.connectivitiesStore.globalConnectivities).find((o) => o.includes("sckan")), r = Array.from( new Set( this.entries.filter((o) => e.includes(o.id) && (o.uuid && (o.type === "Flatmap" || o.type === "MultiFlatmap") || o.type === "Scaffold" && o.resource && (o.isBodyScaffold || t.includes(o.discoverId)))).map((o) => { if (o.type === "Flatmap" || o.type === "MultiFlatmap") return o.uuid; if (o.type === "Scaffold") return o.resource; }) ) ); if (r.length) { this.connectivitiesStore.updateActiveConnectivityKeys(r); const o = this.connectivitiesStore.getUniqueFilterOptionsByKeys; ft.emit("connectivity-filter-options", o); } else ft.emit("connectivity-knowledge", { data: this.connectivitiesStore.globalConnectivities[n], highlight: [], processed: !1 }), ft.emit("connectivity-filter-options", []), this.connectivitiesStore.updateActiveConnectivityKeys([n]); }, getGeneralSearchedId: function(e, t, n = "query") { const r = []; return e.forEach((o) => { let a = [ JSON.stringify(o["nerve-label"]) ]; (n = "query") && (a = [ ...a, o.id, o.label, o["long-label"], JSON.stringify(o.nerves) ]), a.some((s) => s == null ? void 0 : s.toLowerCase().includes(t.toLowerCase())) && !r.includes(o.id) && r.push(o.id); }), r; }, getFlatmapSearchedId: function(e, t) { const n = [], r = e.mapImp.search(t); return (r.__featureIds || r.featureIds).forEach((a) => { const i = e.mapImp.annotation(a); [ i.id, i.name, i.label, i.models, i.source ].some((u) => u && u.toLowerCase().includes(t.toLowerCase())) && i.models && !n.includes(i.models) && n.push(i.models); }), n; }, getLatestFlatmapUUID: async function(e, t) { return (await (await fetch(e)).json()).filter((i) => i.id === t).sort((i, s) => s.created.localeCompare(i.created))[0].uuid; }, connectivityQueryFilter: async function(e) { this.query = "", this.filter = []; const t = this.getActiveContents(), n = this.settingsStore.flatmapAPI, r = [], o = []; let a = [], i = !1, s = [], l = [], u = ""; const c = this.connectivitiesStore.getUniqueFilterOptionsByKeys, d = this.connectivitiesStore.getUniqueFilterSourcesByKeys; let p = this.connectivitiesStore.getUniqueConnectivitiesByKeys; for (const b of t) { const x = b.$refs.viewer; if (x) { const w = x.$refs.multiflatmap, k = x.$refs.flatmap, C = x.$refs.scaffold, _ = x.$refs.iframe, $ = x.$refs.plot, O = x.$refs.simulation; let F = null; if (w) { const T = w.getCurrentFlatmap(); T && T.mapImp && (F = T, u = F.mapImp.uuid); } else k && k.mapImp ? (F = k, u = F.mapImp.uuid) : (F = C || _ || $ || O, u = await this.getLatestFlatmapUUID(n, "human-flatmap_male")); const A = k || w; if (e) { if (this.query = e.query, e.query) { const P = this.query.replace(/["']/g, "").split(",").map((G) => G.trim()).filter((G) => G), V = []; for (let G = 0; G < P.length; G++) A ? V.push(this.getFlatmapSearchedId(F, P[G])) : V.push(this.getGeneralSearchedId(p, P[G], "query")); const U = [...new Set(V.flat())]; if (U.length) { r.push(...U); const G = A ? await hP(n, u, U) : U; s.push(...G); } } const T = { origins: [], vias: [], destinations: [], all: [] }; let R = {}; if (C && x.syncFilter(e.filter), e.filter.forEach((P) => { var G, se; const V = P.facetPropPath.split(".").pop(), U = P.facetPropPath.includes("flatmap.connectivity.source"); if (U && ((G = P.facet) == null ? void 0 : G.toLowerCase()) !== "show all") { const ae = P.facet.replace(",[", ", ["), de = P.facetPropPath.split(".").pop(); if (de === "origin") T.origins.push(ae); else if (de === "destination") T.destinations.push(ae); else if (de === "via") T.vias.push(ae); else { const me = JSON.parse(ae).flat(1 / 0); T.all.push(...me); } } if (C) !U && ((se = P.facet) == null ? void 0 : se.toLowerCase()) !== "show all" && (V in R || (R[V] = []), R[V].push(...this.getGeneralSearchedId(p, P.facet, "facet"))); else if (A && !U) { const ae = c.find((de) => de.key.includes(V)); ae && ae.children.forEach((de) => { if (de.label === P.facet && de.key) { const me = de.key.split(".").pop(); V in R || (R[V] = []), R[V].push(...d[V][me]); } }); } }), T.origins.length || T.destinations.length || T.vias.length) { const P = { flatmapAPI: n, knowledgeSource: u, origins: T.origins, destinations: T.destinations, vias: T.vias }; "ovd" in R || (R.ovd = []), R.ovd.push(...await O$e(P)); } else T.all.length && ("all" in R || (R.all = []), R.all.push(...await hP(n, u, T.all))); const M = Object.values(R); this.filter = [...this.filter, ...M]; const j = this.filter.length ? this.filter.reduce((P, V) => P.filter((U) => V.includes(U))) : []; l.push(...j); } } } let h; this.query && !this.filter.length ? h = s : !this.query && this.filter.length ? h = l : this.query && this.filter.length && (h = s.filter((b) => l.includes(b))), h && (a.push(...h), p = p.filter((b) => h.includes(b.id)), i = !0), o.push(...p); const f = [...new Set(r)], v = [...new Set(a)]; let m = Array.from( new Map(o.map((b) => [b.id, b])).values() ); m = [ ...m.filter((b) => f.includes(b.id)), ...m.filter((b) => !f.includes(b.id)) ]; const g = { data: m, highlight: v, processed: i }; ft.emit("connectivity-knowledge", g); } }, computed: { ...vl(Ku, D3e, yu), horizontal() { return this.splitFlowStore.activeView === "2horpanel"; }, splitters() { return this.splitFlowStore.splitters; } }, mounted: function() { ft.on("PaneResize", (e) => { this.setStyles(e.refName, e.rect); }), ft.on("PaneUnmounted", (e) => { this.hidePane(e.refName); }), ft.on("species-layout-connectivity-update", () => { this.onSpeciesLayoutConnectivityUpdate(); }), ft.on("connectivity-query-filter", (e) => { this.connectivityQueryFilter(e); }), ft.on("hoverUpdate", (e) => { this.getActiveContents().forEach((n) => { n.onHoverUpdate(e); }); }), ft.on("startHelp", () => { this.getActiveContents().forEach((t) => { t.onStartHelp(); }); }), ft.on("connectivity-item-close", () => { this.getActiveContents().forEach((t) => { t.onConnectivityItemClose(); }); }), ft.on("sidebar-annotation-close", () => { this.getActiveContents().forEach((t) => { t.onSidebarAnnotationClose(); }); }), ft.on("globalViewerSettingsUpdate", () => { this.$refs.content.forEach((t) => { t.onGlobalViewerSettingsUpdate(); }); }), ft.on("markerUpdate", () => { this.$refs.content.forEach((t) => { t.onFlatmapMarkerUpdate(); }); }), ft.on("connectivity-hovered", (e) => { this.getActiveContents().forEach((n) => { n.onShowConnectivityTooltips(e); }); }), ft.on("connectivity-source-change", (e) => { this.getActiveContents().forEach((n) => { n.onConnectivitySourceChange(e); }); }), ft.on("show-connectivity", (e) => { this.getActiveContents().forEach((n) => { n.onShowConnectivity(e); }); }), ft.on("show-reference-connectivities", (e) => { this.getActiveContents().forEach((n) => { n.onShowReferenceConnectivity(e); }); }), ft.on("filter-visibility", (e) => { this.getActiveContents().forEach((n) => { n.onFilterVisibility(e); }); }); } }, z3e = { class: "tab-container", ref: "tabContainer" }; function j3e(e, t, n, r, o, a) { const i = ZV, s = WV; return S(), L("div", z3e, [ q(i, { index: "split-1", key: "split-1" }), (S(!0), L(Re, null, mt(n.entries, (l) => (S(), L("div", { key: l.id, style: Ye(a.getStyle(l.id)), class: H([a.getClass(l.id), "contentvuer"]) }, [ (S(), re(s, { key: l.id, entry: l, ref_for: !0, ref: "content", onResourceSelected: a.resourceSelected, onSpeciesChanged: a.speciesChanged, visible: a.isIdVisible(l.id) }, null, 8, ["entry", "onResourceSelected", "onSpeciesChanged", "visible"])) ], 6))), 128)) ], 512); } const JV = /* @__PURE__ */ Ka(B3e, [["render", j3e], ["__scopeId", "data-v-56aab347"]]), V3e = { name: "SearchControls", props: { failedSearch: void 0 }, components: { Autocomplete: nM, MapSvgIcon: aE }, methods: { fetchSuggestions: function(e, t) { e === "" ? t([]) : this.$emit("fetch-suggestions", { term: e, cb: t }); } }, data: function() { return { searchText: "" }; } }, H3e = (e) => (Ci("data-v-eb3db1ae"), e = e(), _i(), e), U3e = { class: "search-container" }, q3e = /* @__PURE__ */ H3e(() => /* @__PURE__ */ D("div", { class: "text search-text" }, " Search within display ", -1)), K3e = { key: 0, class: "text not-found-text" }; function G3e(e, t, n, r, o, a) { const i = nM, s = Ve("map-svg-icon"); return S(), L("div", U3e, [ q3e, q(i, { class: "search-box", placeholder: "Search", modelValue: e.searchText, "onUpdate:modelValue": t[0] || (t[0] = (l) => e.searchText = l), "fetch-suggestions": a.fetchSuggestions, onKeyup: t[1] || (t[1] = wn((l) => e.$emit("search", e.searchText), ["enter"])), onSelect: t[2] || (t[2] = (l) => e.$emit("search", l.value)), teleported: !1, "popper-class": "autocomplete-popper" }, null, 8, ["modelValue", "fetch-suggestions"]), q(s, { icon: "magnifyingGlass", class: "magnify", onClick: t[3] || (t[3] = (l) => e.$emit("search", e.searchText)) }), n.failedSearch ? (S(), L("div", K3e, " '" + ge(n.failedSearch) + "' not found ", 1)) : J("", !0) ]); } const QV = /* @__PURE__ */ Ka(V3e, [["render", G3e], ["__scopeId", "data-v-eb3db1ae"]]), W3e = { name: "DialogToolbarContent", components: { Button: qf, Checkbox: pM, Col: kM, Icon: Er, Input: q0, Popover: Z0, Radio: bM, RadioGroup: wM, Row: W0, MapSvgIcon: aE, MapSvgSpriteColor: UV, SearchControls: QV, ElIconCopyDocument: vC }, props: { /** * Array of titles. */ numberOfEntries: { type: Number, default: 0 }, /** * Display icons for docking, undocking and etc. */ showIcons: { type: Boolean, default: !1 } }, inject: ["showGlobalSettings"], computed: { ...vl(Wm, yu, Ku), activeView() { return this.splitFlowStore.activeView; }, helpDelay() { return this.settingsStore.helpDelay; }, shareLink() { return this.settingsStore.shareLink; }, offlineAnnotationEnabled() { return this.settingsStore.offlineAnnotationEnabled; }, viewIcons() { return this.splitFlowStore.viewIcons; } }, watch: { shareLink: function() { this.loadingLink = !1; } }, data: function() { return { activeViewRef: void 0, displayShareOptions: !1, ElIconCopyDocument: En(vC), exportAnnotation: !1, failedSearch: void 0, globalSettings: {}, globalSettingRef: void 0, isFullscreen: !1, loadingLink: !0, permalinkRef: void 0, viewingModes: { Exploration: "Find relevant research and view detail of neural pathways by selecting a pathway to view its connections and data sources", "Neuron Connection": "Discover neuron connections by selecting a feature and viewing its associated network connections", Annotation: ["View feature annotations", "Add, comment on and view feature annotations"] }, authorisedUser: !1, mapLoaded: !1 }; }, methods: { loadGlobalSettings: function() { this.globalSettings = { ...this.globalSettings, ...this.settingsStore.globalSettings }; }, updateViewingMode: function(e, t) { const { target: n } = e; n.closest(".el-checkbox") || (this.globalSettings.viewingMode = t, t === "Exploration" ? (this.globalSettings.displayMarkers = !0, this.globalSettings.interactiveMode = "dataset") : t === "Annotation" ? (this.globalSettings.displayMarkers = !1, this.globalSettings.interactiveMode = "dataset") : (this.globalSettings.displayMarkers = !1, this.globalSettings.interactiveMode = "connectivity"), this.updateGlobalSettings("viewingMode")); }, updateGlobalSettings: function(e) { const t = this.settingsStore.getUpdatedGlobalSettingsKey(this.globalSettings); this.settingsStore.updateGlobalSettings(this.globalSettings), t.includes("displayMarkers") && ft.emit("markerUpdate"), t.includes("interactiveMode") && ft.emit("modeUpdate", this.globalSettings.interactiveMode), (t.includes("viewingMode") || t.includes("connectionType") || t.includes("flightPathDisplay") || t.includes("organsDisplay") || t.includes("outlinesDisplay") || t.includes("backgroundDisplay")) && ft.emit("globalViewerSettingsUpdate"); let n = this.globalSettings[e]; e === "flightPathDisplay" && (n = this.globalSettings.flightPathDisplay ? "3D" : "2D"), e === "organsDisplay" && (n = this.globalSettings.organsDisplay ? "Color" : "Grayscale"), e === "outlinesDisplay" && (n = this.globalSettings.outlinesDisplay ? "Show" : "Hide"), t.length && jn.sendEvent({ event: "interaction_event", event_name: `portal_maps_settings_${e}`, category: n, location: "map_toolbar" }); }, titleClicked: function(e) { this.$emit("titleClicked", e); }, startHelp: function() { ft.emit("startHelp"), jn.sendEvent({ event: "interaction_event", event_name: "portal_maps_toolbar_help", category: "help_mode_start", location: "map_toolbar" }); }, onFullscreen: function() { this.$emit("onFullscreen"), this.isFullscreen = !this.isFullscreen, this.isFullscreen && jn.sendEvent({ event: "interaction_event", event_name: "portal_maps_toolbar_fullscreen", category: this.isFullscreen ? "enter" : "exit", location: "map_toolbar" }); }, onFullscreenEsc: function() { document.fullscreenElement || (this.isFullscreen = !1, jn.sendEvent({ event: "interaction_event", event_name: "portal_maps_toolbar_fullscreen", category: this.isFullscreen ? "enter" : "exit", location: "map_toolbar" })); }, close: function() { this.$emit("close"); }, copyShareLink: function() { document && (this.$refs.linkInput.$el.querySelector("input").select(), document.execCommand("copy"), jn.sendEvent({ event: "interaction_event", event_name: "portal_maps_permalink", category: "permalink_copy", location: "map_toolbar" })); }, setFailedSearch: function(e) { this.failedSearch = e; }, requestShareLink: function() { sessionStorage.getItem("anonymous-annotation") ? this.displayShareOptions = !0 : this.getShareLink(!1); }, getShareLink: function(e) { this.displayShareOptions = !1, this.loadingLink = !0, ft.emit("updateShareLinkRequested", e), jn.sendEvent({ event: "interaction_event", event_name: "portal_maps_permalink", category: "permalink_generate", location: "map_toolbar" }); }, viewClicked: function(e) { const t = this.activeView; if (this.splitFlowStore.updateActiveView({ view: e, entries: this.entriesStore.entries }), e !== t) { const n = this.viewIcons.find((r) => r.icon === e); jn.sendEvent({ event: "interaction_event", event_name: "portal_maps_toolbar_split_view", category: (n == null ? void 0 : n.name) || "", location: "map_toolbar" }); } this.$refs.viewPopover && this.$refs.viewPopover.hide(); } }, mounted: function() { this.activeViewRef = En(this.$refs.activeViewRef), this.permalinkRef = En(this.$refs.permalinkRef), this.globalSettingRef = En(this.$refs.globalSettingRef), ft.on("mapLoaded", (e) => { this.mapLoaded = !0; }), document.addEventListener("fullscreenchange", this.onFullscreenEsc), this.loadGlobalSettings(); }, unmounted: function() { document.removeEventListener("fullscreenchange", this.onFullscreenEsc); } }, Ga = (e) => (Ci("data-v-1cc10ca9"), e = e(), _i(), e), Y3e = { class: "header" }, X3e = { class: "viewing-mode-selector" }, Z3e = { class: "el-dropdown-link" }, J3e = { class: "toolbar-dropdown-badge" }, Q3e = /* @__PURE__ */ Ga(() => /* @__PURE__ */ D("h4", null, "Viewing Mode:", -1)), e4e = { class: "el-option__description" }, t4e = { key: 0, class: "setting-popover-block" }, n4e = { class: "el-radio__description" }, r4e = { key: 0 }, o4e = { key: 1 }, a4e = { key: 2 }, i4e = { key: 3 }, s4e = /* @__PURE__ */ Ga(() => /* @__PURE__ */ D("br", null, null, -1)), l4e = /* @__PURE__ */ Ga(() => /* @__PURE__ */ D("br", null, null, -1)), u4e = { class: "setting-popover-inner" }, c4e = /* @__PURE__ */ Ga(() => /* @__PURE__ */ D("h4", null, "Display options:", -1)), d4e = { key: 0, class: "setting-popover-block" }, p4e = /* @__PURE__ */ Ga(() => /* @__PURE__ */ D("h5", null, "Flight path", -1)), f4e = { key: 1, class: "setting-popover-block" }, h4e = /* @__PURE__ */ Ga(() => /* @__PURE__ */ D("h5", null, "Organs", -1)), v4e = { key: 2, class: "setting-popover-block" }, g4e = /* @__PURE__ */ Ga(() => /* @__PURE__ */ D("h5", null, "Apply outlines", -1)), m4e = { key: 3, class: "setting-popover-block" }, y4e = /* @__PURE__ */ Ga(() => /* @__PURE__ */ D("h5", null, "Background color", -1)), b4e = /* @__PURE__ */ Ga(() => /* @__PURE__ */ D("span", { style: { "--bg-color": "white" } }, "white", -1)), w4e = /* @__PURE__ */ Ga(() => /* @__PURE__ */ D("span", { style: { "--bg-color": "lightskyblue" } }, "lightskyblue", -1)), x4e = /* @__PURE__ */ Ga(() => /* @__PURE__ */ D("span", { style: { "--bg-color": "black" } }, "black", -1)); function k4e(e, t, n, r, o, a) { const i = Ve("map-svg-sprite-color"), s = QV, l = QJ, u = Er, c = xQ, d = sQ, p = ma, h = Ure, f = wM, v = _ae, m = Sae, g = Cae, b = Ve("map-svg-icon"), x = kM, w = W0, k = Z0, C = qf, _ = pM, $ = q0, O = bM, F = gC, A = Mc; return S(), L("div", Y3e, [ q(i), q(s, { onSearch: t[0] || (t[0] = (T) => { e.$emit("local-search", { term: T }); }), onFetchSuggestions: t[1] || (t[1] = (T) => { e.$emit("fetch-suggestions", { data: T }); }), failedSearch: e.failedSearch }, null, 8, ["failedSearch"]), q(w, { class: "icon-group" }, { default: N(() => [ D("div", X3e, [ Oe(" Viewing Mode: "), q(g, { teleported: !1, trigger: "hover", class: "toolbar-dropdown", "popper-class": "toolbar-dropdown-popper", "hide-on-click": !1, disabled: !e.mapLoaded, placement: "bottom-end" }, { dropdown: N(() => [ Q3e, q(m, null, { default: N(() => [ (S(!0), L(Re, null, mt(e.viewingModes, (T, R, M) => (S(), re(v, { key: R, onClick: (j) => a.updateViewingMode(j, R), class: H({ "is-selected": e.globalSettings.viewingMode === R }) }, { default: N(() => [ D("h5", null, [ R === "Exploration" ? (S(), re(u, { key: 0, class: "el-icon--left" }, { default: N(() => [ q(l) ]), _: 1 })) : J("", !0), R === "Neuron Connection" ? (S(), re(u, { key: 1, class: "el-icon--left" }, { default: N(() => [ q(c) ]), _: 1 })) : J("", !0), R === "Annotation" ? (S(), re(u, { key: 2, class: "el-icon--left" }, { default: N(() => [ q(d) ]), _: 1 })) : J("", !0), Oe(" " + ge(R), 1) ]), D("small", e4e, [ R === "Annotation" ? (S(), L(Re, { key: 0 }, [ e.authorisedUser ? (S(), L(Re, { key: 0 }, [ Oe(ge(T[1]), 1) ], 64)) : (S(), L(Re, { key: 1 }, [ Oe(ge(T[0]), 1) ], 64)), a.offlineAnnotationEnabled ? (S(), L(Re, { key: 2 }, [ Oe(" (Anonymous annotate) ") ], 64)) : J("", !0) ], 64)) : (S(), L(Re, { key: 1 }, [ Oe(ge(T), 1) ], 64)) ]), R === "Neuron Connection" ? (S(), L(Re, { key: 0 }, [ "connectionType" in e.globalSettings ? (S(), L("div", t4e, [ q(f, { modelValue: e.globalSettings.connectionType, "onUpdate:modelValue": t[2] || (t[2] = (j) => e.globalSettings.connectionType = j), onChange: t[3] || (t[3] = (j) => a.updateGlobalSettings("connectionType")) }, { default: N(() => [ q(h, { value: "Origin", size: "small" }, { default: N(() => [ Oe("Origin") ]), _: 1 }), q(h, { value: "Via", size: "small" }, { default: N(() => [ Oe("Via") ]), _: 1 }), q(h, { value: "Destination", size: "small" }, { default: N(() => [ Oe("Destination") ]), _: 1 }), q(h, { value: "All", size: "small" }, { default: N(() => [ Oe("All") ]), _: 1 }) ]), _: 1 }, 8, ["modelValue"]), D("div", n4e, [ e.globalSettings.connectionType === "Origin" ? (S(), L("small", r4e, " Neuron populations beginning at a location. ")) : e.globalSettings.connectionType === "Via" ? (S(), L("small", o4e, " Neuron populations that run through a location. ")) : e.globalSettings.connectionType === "Destination" ? (S(), L("small", a4e, " Neuron populations terminating at a location. ")) : (S(), L("small", i4e, " Neuron populations associated with a location (or) Neuron populations that share at least one edge with another neuron population. ")) ]) ])) : J("", !0) ], 64)) : J("", !0) ]), _: 2 }, 1032, ["onClick", "class"]))), 128)) ]), _: 1 }) ]), default: N(() => [ D("span", Z3e, [ e.globalSettings.viewingMode === "Exploration" ? (S(), re(u, { key: 0, class: "el-icon--left" }, { default: N(() => [ q(l) ]), _: 1 })) : J("", !0), e.globalSettings.viewingMode === "Neuron Connection" ? (S(), re(u, { key: 1, class: "el-icon--left" }, { default: N(() => [ q(c) ]), _: 1 })) : J("", !0), e.globalSettings.viewingMode === "Annotation" ? (S(), re(u, { key: 2, class: "el-icon--left" }, { default: N(() => [ q(d) ]), _: 1 })) : J("", !0), Oe(" " + ge(e.globalSettings.viewingMode) + " ", 1), e.globalSettings.viewingMode === "Neuron Connection" ? (S(), L(Re, { key: 3 }, [ Oe("   "), D("small", J3e, [ D("em", null, ge(e.globalSettings.connectionType), 1) ]) ], 64)) : J("", !0), q(u, { class: "el-icon--right" }, { default: N(() => [ q(p) ]), _: 1 }) ]) ]), _: 1 }, 8, ["disabled"]) ]), e.activeViewRef ? (S(), re(k, { key: 0, "virtual-ref": e.activeViewRef, ref: "viewPopover", placement: "bottom", width: "133", teleported: !1, trigger: "click", "popper-class": "view-icon-popover", "virtual-triggering": "" }, { default: N(() => [ (S(!0), L(Re, null, mt(a.viewIcons, (T) => (S(), re(w, { gutter: 20, key: T.name, class: H([ { active: T.icon == a.activeView }, { disabled: T.min > n.numberOfEntries }, "view-icon-row" ]), onClick: (R) => a.viewClicked(T.icon) }, { default: N(() => [ q(x, { span: 4 }, { default: N(() => [ q(b, { icon: T.icon, class: "view-icon" }, null, 8, ["icon"]) ]), _: 2 }, 1024), q(x, { offset: 2, span: 18, class: "view-text" }, { default: N(() => [ Oe(ge(T.name), 1) ]), _: 2 }, 1024) ]), _: 2 }, 1032, ["class", "onClick"]))), 128)) ]), _: 1 }, 8, ["virtual-ref"])) : J("", !0), q(k, { class: "tooltip", content: "Split screen", placement: "bottom-end", "show-after": a.helpDelay, teleported: !1, trigger: "hover", "popper-class": "header-popper" }, { reference: N(() => [ q(b, { icon: a.activeView, ref: "activeViewRef", class: H([ { disabled: 1 >= n.numberOfEntries }, "header-icon", "splitscreen-icon" ]) }, null, 8, ["icon", "class"]) ]), _: 1 }, 8, ["show-after"]), q(k, { class: "tooltip", content: "Help", placement: "bottom-end", "show-after": a.helpDelay, teleported: !1, trigger: "hover", "popper-class": "header-popper" }, { reference: N(() => [ q(b, { icon: "tooltips", class: "header-icon", onClick: t[4] || (t[4] = (T) => a.startHelp()) }) ]), _: 1 }, 8, ["show-after"]), q(k, { class: "tooltip", content: "Fullscreen", placement: "bottom-end", "show-after": a.helpDelay, teleported: !1, trigger: "hover", "popper-class": "header-popper" }, { reference: N(() => [ Be(q(b, { icon: "fullScreen", class: "header-icon", onClick: a.onFullscreen }, null, 8, ["onClick"]), [ [ht, !e.isFullscreen] ]) ]), _: 1 }, 8, ["show-after"]), q(k, { class: "tooltip", content: "Exit fullscreen", placement: "bottom-end", "show-after": a.helpDelay, teleported: !1, trigger: "hover", "popper-class": "header-popper" }, { reference: N(() => [ Be(q(b, { icon: "closeFullScreen", class: "header-icon", onClick: a.onFullscreen }, null, 8, ["onClick"]), [ [ht, e.isFullscreen] ]) ]), _: 1 }, 8, ["show-after"]), e.permalinkRef ? (S(), re(k, { key: 1, ref: "linkPopover", "virtual-ref": e.permalinkRef, placement: "bottom-end", width: "400", teleported: !1, trigger: "click", "popper-class": "link-popover", "virtual-triggering": "" }, { default: N(() => [ e.displayShareOptions ? (S(), re(w, { key: 0 }, { default: N(() => [ q(x, { offset: 3, span: 8 }, { default: N(() => [ q(C, { type: "primary", size: "small", onClick: t[5] || (t[5] = (T) => a.getShareLink(e.exportAnnotation)), class: "share-options" }, { default: N(() => [ Oe(" Create Permalink ") ]), _: 1 }) ]), _: 1 }), q(x, { span: 10 }, { default: N(() => [ q(k, { class: "tooltip", placement: "bottom-end", "show-after": a.helpDelay, teleported: !1, trigger: "hover", "popper-class": "header-popper" }, { reference: N(() => [ q(_, { modelValue: e.exportAnnotation, "onUpdate:modelValue": t[6] || (t[6] = (T) => e.exportAnnotation = T), size: "small" }, { default: N(() => [ Oe(" Export Annotations ") ]), _: 1 }, 8, ["modelValue"]) ]), default: N(() => [ Oe(" Create a permalink with anonymous annotations. "), s4e, Oe(" NOTE: Annotations will only be stored for "), l4e, Oe(" 30 days on the server. ") ]), _: 1 }, 8, ["show-after"]) ]), _: 1 }) ]), _: 1 })) : Be((S(), re(w, { key: 1, gutter: 20, "element-loading-text": "Creating link..." }, { default: N(() => [ q(x, { span: 20 }, { default: N(() => [ q($, { class: "link-input", size: "small", placeholder: "Permanant Link Here", readonly: !0, modelValue: a.shareLink, "onUpdate:modelValue": t[7] || (t[7] = (T) => a.shareLink = T), ref: "linkInput" }, null, 8, ["modelValue"]) ]), _: 1 }), q(x, { span: 4 }, { default: N(() => [ q(k, { class: "tooltip", content: "Copy link", placement: "bottom-end", "show-after": a.helpDelay, teleported: !1, trigger: "hover", "popper-class": "header-popper" }, { reference: N(() => [ q(C, { class: "copy-button", icon: e.ElIconCopyDocument, size: "small", onClick: a.copyShareLink }, null, 8, ["icon", "onClick"]) ]), _: 1 }, 8, ["show-after"]) ]), _: 1 }) ]), _: 1 })), [ [A, e.loadingLink] ]) ]), _: 1 }, 8, ["virtual-ref"])) : J("", !0), q(k, { class: "tooltip", content: "Get permalink", placement: "bottom-end", "show-after": a.helpDelay, teleported: !1, trigger: "hover", "popper-class": "header-popper" }, { reference: N(() => [ Be(q(b, { icon: "permalink", ref: "permalinkRef", class: "header-icon", onClick: a.requestShareLink }, null, 8, ["onClick"]), [ [ht, a.shareLink] ]) ]), _: 1 }, 8, ["show-after"]), q(k, { class: "tooltip", content: "Close", placement: "bottom-end", "show-after": a.helpDelay, teleported: !1, trigger: "hover", "popper-class": "header-popper" }, { reference: N(() => [ Be(q(b, { icon: "close", class: "header-icon", onClick: a.close }, null, 8, ["onClick"]), [ [ht, n.showIcons] ]) ]), _: 1 }, 8, ["show-after"]), e.globalSettingRef ? (S(), re(k, { key: 2, "virtual-ref": e.globalSettingRef, ref: "settingPopover", placement: "bottom", width: "230", teleported: !1, trigger: "click", "popper-class": "setting-popover", "virtual-triggering": "", disabled: !e.mapLoaded }, { default: N(() => [ D("div", u4e, [ c4e, "flightPathDisplay" in e.globalSettings ? (S(), L("div", d4e, [ p4e, q(f, { modelValue: e.globalSettings.flightPathDisplay, "onUpdate:modelValue": t[8] || (t[8] = (T) => e.globalSettings.flightPathDisplay = T), onChange: t[9] || (t[9] = (T) => a.updateGlobalSettings("flightPathDisplay")) }, { default: N(() => [ q(O, { value: !1 }, { default: N(() => [ Oe("2D") ]), _: 1 }), q(O, { value: !0 }, { default: N(() => [ Oe("3D") ]), _: 1 }) ]), _: 1 }, 8, ["modelValue"]) ])) : J("", !0), "organsDisplay" in e.globalSettings ? (S(), L("div", f4e, [ h4e, q(f, { modelValue: e.globalSettings.organsDisplay, "onUpdate:modelValue": t[10] || (t[10] = (T) => e.globalSettings.organsDisplay = T), onChange: t[11] || (t[11] = (T) => a.updateGlobalSettings("organsDisplay")) }, { default: N(() => [ q(O, { value: !0 }, { default: N(() => [ Oe("Color") ]), _: 1 }), q(O, { value: !1 }, { default: N(() => [ Oe("Grayscale") ]), _: 1 }) ]), _: 1 }, 8, ["modelValue"]) ])) : J("", !0), "outlinesDisplay" in e.globalSettings ? (S(), L("div", v4e, [ g4e, q(f, { modelValue: e.globalSettings.outlinesDisplay, "onUpdate:modelValue": t[12] || (t[12] = (T) => e.globalSettings.outlinesDisplay = T), onChange: t[13] || (t[13] = (T) => a.updateGlobalSettings("outlinesDisplay")) }, { default: N(() => [ q(O, { value: !0 }, { default: N(() => [ Oe("Show") ]), _: 1 }), q(O, { value: !1 }, { default: N(() => [ Oe("Hide") ]), _: 1 }) ]), _: 1 }, 8, ["modelValue"]) ])) : J("", !0), "backgroundDisplay" in e.globalSettings ? (S(), L("div", m4e, [ y4e, q(f, { class: "bg-color-radio-group", modelValue: e.globalSettings.backgroundDisplay, "onUpdate:modelValue": t[14] || (t[14] = (T) => e.globalSettings.backgroundDisplay = T), onChange: t[15] || (t[15] = (T) => a.updateGlobalSettings("backgroundDisplay")) }, { default: N(() => [ q(O, { value: "white", class: "bg-color-radio" }, { default: N(() => [ b4e ]), _: 1 }), q(O, { value: "lightskyblue", class: "bg-color-radio" }, { default: N(() => [ w4e ]), _: 1 }), q(O, { value: "black", class: "bg-color-radio" }, { default: N(() => [ x4e ]), _: 1 }) ]), _: 1 }, 8, ["modelValue"]) ])) : J("", !0) ]) ]), _: 1 }, 8, ["virtual-ref", "disabled"])) : J("", !0), a.showGlobalSettings ? (S(), re(k, { key: 3, class: "tooltip", content: "Global Settings", placement: "bottom-end", "show-after": a.helpDelay, teleported: !1, trigger: "hover", "popper-class": "header-popper", disabled: !e.mapLoaded }, { reference: N(() => [ q(u, { ref: "globalSettingRef", disabled: !e.mapLoaded, class: H(["header-icon", { disabled: !e.mapLoaded }]) }, { default: N(() => [ q(F) ]), _: 1 }, 8, ["disabled", "class"]) ]), _: 1 }, 8, ["show-after", "disabled"])) : J("", !0) ]), _: 1 }) ]); } const eH = /* @__PURE__ */ Ka(W3e, [["render", k4e], ["__scopeId", "data-v-1cc10ca9"]]), tH = (e) => !e.getAttribute("aria-owns"), nH = (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; }, ig = (e) => { e && (e.focus(), !tH(e) && e.click()); }, Xn = (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); }, OP = (e) => (t) => t.pointerType === "mouse" ? e(t) : void 0; var FP; const pn = typeof window < "u", C4e = (e) => typeof e == "string", rH = () => { }, c_ = pn && ((FP = window == null ? void 0 : window.navigator) == null ? void 0 : FP.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent); function mf(e) { return typeof e == "function" ? e() : y(e); } function _4e(e) { return e; } function hh(e) { return x0() ? (Lf(e), !0) : !1; } function S4e(e, t = !0) { st() ? ut(e) : t ? e() : Ke(e); } function d_(e, t, n = {}) { const { immediate: r = !0 } = n, o = z(!1); let a = null; function i() { a && (clearTimeout(a), a = null); } function s() { o.value = !1, i(); } function l(...u) { i(), o.value = !0, a = setTimeout(() => { o.value = !1, a = null, e(...u); }, mf(t)); } return r && (o.value = !0, pn && l()), hh(s), { isPending: $u(o), start: l, stop: s }; } function si(e) { var t; const n = mf(e); return (t = n == null ? void 0 : n.$el) != null ? t : n; } const vh = pn ? window : void 0; function No(...e) { let t, n, r, o; if (C4e(e[0]) || Array.isArray(e[0]) ? ([n, r, o] = e, t = vh) : [t, n, r, o] = e, !t) return rH; Array.isArray(n) || (n = [n]), Array.isArray(r) || (r = [r]); const a = [], i = () => { a.forEach((c) => c()), a.length = 0; }, s = (c, d, p, h) => (c.addEventListener(d, p, h), () => c.removeEventListener(d, p, h)), l = he(() => [si(t), mf(o)], ([c, d]) => { i(), c && a.push(...n.flatMap((p) => r.map((h) => s(c, p, h, d)))); }, { immediate: !0, flush: "post" }), u = () => { l(), i(); }; return hh(u), u; } let TP = !1; function $4e(e, t, n = {}) { const { window: r = vh, ignore: o = [], capture: a = !0, detectIframe: i = !1 } = n; if (!r) return; c_ && !TP && (TP = !0, Array.from(r.document.body.children).forEach((c) => c.addEventListener("click", rH))); let s = !0; const l = (c) => o.some((d) => { if (typeof d == "string") return Array.from(r.document.querySelectorAll(d)).some((p) => p === c.target || c.composedPath().includes(p)); { const p = si(d); return p && (c.target === p || c.composedPath().includes(p)); } }), u = [ No(r, "click", (c) => { const d = si(e); if (!(!d || d === c.target || c.composedPath().includes(d))) { if (c.detail === 0 && (s = !l(c)), !s) { s = !0; return; } t(c); } }, { passive: !0, capture: a }), No(r, "pointerdown", (c) => { const d = si(e); d && (s = !c.composedPath().includes(d) && !l(c)); }, { passive: !0 }), i && No(r, "blur", (c) => { var d; const p = si(e); ((d = r.document.activeElement) == null ? void 0 : d.tagName) === "IFRAME" && !(p != null && p.contains(r.document.activeElement)) && t(c); }) ].filter(Boolean); return () => u.forEach((c) => c()); } function oH(e, t = !1) { const n = z(), r = () => n.value = !!e(); return r(), S4e(r, t), n; } const AP = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, IP = "__vueuse_ssr_handlers__"; AP[IP] = AP[IP] || {}; function E4e(e, t, { window: n = vh, initialValue: r = "" } = {}) { const o = z(r), a = E(() => { var i; return si(t) || ((i = n == null ? void 0 : n.document) == null ? void 0 : i.documentElement); }); return he([a, () => mf(e)], ([i, s]) => { var l; if (i && n) { const u = (l = n.getComputedStyle(i).getPropertyValue(s)) == null ? void 0 : l.trim(); o.value = u || r; } }, { immediate: !0 }), he(o, (i) => { var s; (s = a.value) != null && s.style && a.value.style.setProperty(mf(e), i); }), o; } var PP = Object.getOwnPropertySymbols, O4e = Object.prototype.hasOwnProperty, F4e = Object.prototype.propertyIsEnumerable, T4e = (e, t) => { var n = {}; for (var r in e) O4e.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]); if (e != null && PP) for (var r of PP(e)) t.indexOf(r) < 0 && F4e.call(e, r) && (n[r] = e[r]); return n; }; function Ra(e, t, n = {}) { const r = n, { window: o = vh } = r, a = T4e(r, ["window"]); let i; const s = oH(() => o && "ResizeObserver" in o), l = () => { i && (i.disconnect(), i = void 0); }, u = he(() => si(e), (d) => { l(), s.value && o && d && (i = new ResizeObserver(t), i.observe(d, a)); }, { immediate: !0, flush: "post" }), c = () => { l(), u(); }; return hh(c), { isSupported: s, stop: c }; } var LP = Object.getOwnPropertySymbols, A4e = Object.prototype.hasOwnProperty, I4e = Object.prototype.propertyIsEnumerable, P4e = (e, t) => { var n = {}; for (var r in e) A4e.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]); if (e != null && LP) for (var r of LP(e)) t.indexOf(r) < 0 && I4e.call(e, r) && (n[r] = e[r]); return n; }; function L4e(e, t, n = {}) { const r = n, { window: o = vh } = r, a = P4e(r, ["window"]); let i; const s = oH(() => o && "MutationObserver" in o), l = () => { i && (i.disconnect(), i = void 0); }, u = he(() => si(e), (d) => { l(), s.value && o && d && (i = new MutationObserver(t), i.observe(d, a)); }, { immediate: !0 }), c = () => { l(), u(); }; return hh(c), { isSupported: s, stop: c }; } var RP; (function(e) { e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE"; })(RP || (RP = {})); var R4e = Object.defineProperty, NP = Object.getOwnPropertySymbols, N4e = Object.prototype.hasOwnProperty, M4e = Object.prototype.propertyIsEnumerable, MP = (e, t, n) => t in e ? R4e(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, D4e = (e, t) => { for (var n in t || (t = {})) N4e.call(t, n) && MP(e, n, t[n]); if (NP) for (var n of NP(t)) M4e.call(t, n) && MP(e, n, t[n]); return e; }; const B4e = { 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] }; D4e({ linear: _4e }, B4e); const z4e = () => pn && /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 Qi = () => { }, j4e = Object.prototype.hasOwnProperty, DP = (e, t) => j4e.call(e, t), io = Array.isArray, Rn = (e) => typeof e == "function", Yr = (e) => typeof e == "string", br = (e) => e !== null && typeof e == "object", V4e = (e) => (br(e) || Rn(e)) && Rn(e.then) && Rn(e.catch), H4e = Object.prototype.toString, U4e = (e) => H4e.call(e), Mk = (e) => U4e(e).slice(8, -1), lE = (e) => { const t = /* @__PURE__ */ Object.create(null); return (n) => t[n] || (t[n] = e(n)); }, q4e = /-(\w)/g, K4e = lE( (e) => e.replace(q4e, (t, n) => n ? n.toUpperCase() : "") ), G4e = /\B([A-Z])/g, W4e = lE( (e) => e.replace(G4e, "-$1").toLowerCase() ), Y4e = lE((e) => e.charAt(0).toUpperCase() + e.slice(1)); var aH = typeof global == "object" && global && global.Object === Object && global, X4e = typeof self == "object" && self && self.Object === Object && self, Wa = aH || X4e || Function("return this")(), ca = Wa.Symbol, iH = Object.prototype, Z4e = iH.hasOwnProperty, J4e = iH.toString, ip = ca ? ca.toStringTag : void 0; function Q4e(e) { var t = Z4e.call(e, ip), n = e[ip]; try { e[ip] = void 0; var r = !0; } catch { } var o = J4e.call(e); return r && (t ? e[ip] = n : delete e[ip]), o; } var eOe = Object.prototype, tOe = eOe.toString; function nOe(e) { return tOe.call(e); } var rOe = "[object Null]", oOe = "[object Undefined]", BP = ca ? ca.toStringTag : void 0; function Id(e) { return e == null ? e === void 0 ? oOe : rOe : BP && BP in Object(e) ? Q4e(e) : nOe(e); } function pl(e) { return e != null && typeof e == "object"; } var aOe = "[object Symbol]"; function Ym(e) { return typeof e == "symbol" || pl(e) && Id(e) == aOe; } function iOe(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 da = Array.isArray, sOe = 1 / 0, zP = ca ? ca.prototype : void 0, jP = zP ? zP.toString : void 0; function sH(e) { if (typeof e == "string") return e; if (da(e)) return iOe(e, sH) + ""; if (Ym(e)) return jP ? jP.call(e) : ""; var t = e + ""; return t == "0" && 1 / e == -sOe ? "-0" : t; } var lOe = /\s/; function uOe(e) { for (var t = e.length; t-- && lOe.test(e.charAt(t)); ) ; return t; } var cOe = /^\s+/; function dOe(e) { return e && e.slice(0, uOe(e) + 1).replace(cOe, ""); } function bi(e) { var t = typeof e; return e != null && (t == "object" || t == "function"); } var VP = NaN, pOe = /^[-+]0x[0-9a-f]+$/i, fOe = /^0b[01]+$/i, hOe = /^0o[0-7]+$/i, vOe = parseInt; function HP(e) { if (typeof e == "number") return e; if (Ym(e)) return VP; if (bi(e)) { var t = typeof e.valueOf == "function" ? e.valueOf() : e; e = bi(t) ? t + "" : t; } if (typeof e != "string") return e === 0 ? e : +e; e = dOe(e); var n = fOe.test(e); return n || hOe.test(e) ? vOe(e.slice(2), n ? 2 : 8) : pOe.test(e) ? VP : +e; } function lH(e) { return e; } var gOe = "[object AsyncFunction]", mOe = "[object Function]", yOe = "[object GeneratorFunction]", bOe = "[object Proxy]"; function uH(e) { if (!bi(e)) return !1; var t = Id(e); return t == mOe || t == yOe || t == gOe || t == bOe; } var Dk = Wa["__core-js_shared__"], UP = function() { var e = /[^.]+$/.exec(Dk && Dk.keys && Dk.keys.IE_PROTO || ""); return e ? "Symbol(src)_1." + e : ""; }(); function wOe(e) { return !!UP && UP in e; } var xOe = Function.prototype, kOe = xOe.toString; function Gu(e) { if (e != null) { try { return kOe.call(e); } catch { } try { return e + ""; } catch { } } return ""; } var COe = /[\\^$.*+?()[\]{}|]/g, _Oe = /^\[object .+?Constructor\]$/, SOe = Function.prototype, $Oe = Object.prototype, EOe = SOe.toString, OOe = $Oe.hasOwnProperty, FOe = RegExp( "^" + EOe.call(OOe).replace(COe, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$" ); function TOe(e) { if (!bi(e) || wOe(e)) return !1; var t = uH(e) ? FOe : _Oe; return t.test(Gu(e)); } function AOe(e, t) { return e == null ? void 0 : e[t]; } function Wu(e, t) { var n = AOe(e, t); return TOe(n) ? n : void 0; } var p_ = Wu(Wa, "WeakMap"), qP = Object.create, IOe = /* @__PURE__ */ function() { function e() { } return function(t) { if (!bi(t)) return {}; if (qP) return qP(t); e.prototype = t; var n = new e(); return e.prototype = void 0, n; }; }(); function POe(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 LOe = 800, ROe = 16, NOe = Date.now; function MOe(e) { var t = 0, n = 0; return function() { var r = NOe(), o = ROe - (r - n); if (n = r, o > 0) { if (++t >= LOe) return arguments[0]; } else t = 0; return e.apply(void 0, arguments); }; } function DOe(e) { return function() { return e; }; } var e0 = function() { try { var e = Wu(Object, "defineProperty"); return e({}, "", {}), e; } catch { } }(), BOe = e0 ? function(e, t) { return e0(e, "toString", { configurable: !0, enumerable: !1, value: DOe(t), writable: !0 }); } : lH, zOe = MOe(BOe); function jOe(e, t) { for (var n = -1, r = e == null ? 0 : e.length; ++n < r && t(e[n], n, e) !== !1; ) ; return e; } function VOe(e, t, n, r) { e.length; for (var o = n + 1; o--; ) if (t(e[o], o, e)) return o; return -1; } var HOe = 9007199254740991, UOe = /^(?:0|[1-9]\d*)$/; function uE(e, t) { var n = typeof e; return t = t ?? HOe, !!t && (n == "number" || n != "symbol" && UOe.test(e)) && e > -1 && e % 1 == 0 && e < t; } function qOe(e, t, n) { t == "__proto__" && e0 ? e0(e, t, { configurable: !0, enumerable: !0, value: n, writable: !0 }) : e[t] = n; } function cE(e, t) { return e === t || e !== e && t !== t; } var KOe = Object.prototype, GOe = KOe.hasOwnProperty; function cH(e, t, n) { var r = e[t]; (!(GOe.call(e, t) && cE(r, n)) || n === void 0 && !(t in e)) && qOe(e, t, n); } var KP = Math.max; function WOe(e, t, n) { return t = KP(t === void 0 ? e.length - 1 : t, 0), function() { for (var r = arguments, o = -1, a = KP(r.length - t, 0), i = Array(a); ++o < a; ) i[o] = r[t + o]; o = -1; for (var s = Array(t + 1); ++o < t; ) s[o] = r[o]; return s[t] = n(i), POe(e, this, s); }; } var YOe = 9007199254740991; function dE(e) { return typeof e == "number" && e > -1 && e % 1 == 0 && e <= YOe; } function XOe(e) { return e != null && dE(e.length) && !uH(e); } var ZOe = Object.prototype; function dH(e) { var t = e && e.constructor, n = typeof t == "function" && t.prototype || ZOe; return e === n; } function JOe(e, t) { for (var n = -1, r = Array(e); ++n < e; ) r[n] = t(n); return r; } var QOe = "[object Arguments]"; function GP(e) { return pl(e) && Id(e) == QOe; } var pH = Object.prototype, eFe = pH.hasOwnProperty, tFe = pH.propertyIsEnumerable, pE = GP(/* @__PURE__ */ function() { return arguments; }()) ? GP : function(e) { return pl(e) && eFe.call(e, "callee") && !tFe.call(e, "callee"); }; function nFe() { return !1; } var fH = typeof exports == "object" && exports && !exports.nodeType && exports, WP = fH && typeof module == "object" && module && !module.nodeType && module, rFe = WP && WP.exports === fH, YP = rFe ? Wa.Buffer : void 0, oFe = YP ? YP.isBuffer : void 0, t0 = oFe || nFe, aFe = "[object Arguments]", iFe = "[object Array]", sFe = "[object Boolean]", lFe = "[object Date]", uFe = "[object Error]", cFe = "[object Function]", dFe = "[object Map]", pFe = "[object Number]", fFe = "[object Object]", hFe = "[object RegExp]", vFe = "[object Set]", gFe = "[object String]", mFe = "[object WeakMap]", yFe = "[object ArrayBuffer]", bFe = "[object DataView]", wFe = "[object Float32Array]", xFe = "[object Float64Array]", kFe = "[object Int8Array]", CFe = "[object Int16Array]", _Fe = "[object Int32Array]", SFe = "[object Uint8Array]", $Fe = "[object Uint8ClampedArray]", EFe = "[object Uint16Array]", OFe = "[object Uint32Array]", $n = {}; $n[wFe] = $n[xFe] = $n[kFe] = $n[CFe] = $n[_Fe] = $n[SFe] = $n[$Fe] = $n[EFe] = $n[OFe] = !0; $n[aFe] = $n[iFe] = $n[yFe] = $n[sFe] = $n[bFe] = $n[lFe] = $n[uFe] = $n[cFe] = $n[dFe] = $n[pFe] = $n[fFe] = $n[hFe] = $n[vFe] = $n[gFe] = $n[mFe] = !1; function FFe(e) { return pl(e) && dE(e.length) && !!$n[Id(e)]; } function fE(e) { return function(t) { return e(t); }; } var hH = typeof exports == "object" && exports && !exports.nodeType && exports, Lp = hH && typeof module == "object" && module && !module.nodeType && module, TFe = Lp && Lp.exports === hH, Bk = TFe && aH.process, Xc = function() { try { var e = Lp && Lp.require && Lp.require("util").types; return e || Bk && Bk.binding && Bk.binding("util"); } catch { } }(), XP = Xc && Xc.isTypedArray, vH = XP ? fE(XP) : FFe, AFe = Object.prototype, IFe = AFe.hasOwnProperty; function PFe(e, t) { var n = da(e), r = !n && pE(e), o = !n && !r && t0(e), a = !n && !r && !o && vH(e), i = n || r || o || a, s = i ? JOe(e.length, String) : [], l = s.length; for (var u in e) IFe.call(e, u) && !(i && // Safari 9 has enumerable `arguments.length` in strict mode. (u == "length" || // Node.js 0.10 has enumerable non-index properties on buffers. o && (u == "offset" || u == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays. a && (u == "buffer" || u == "byteLength" || u == "byteOffset") || // Skip index properties. uE(u, l))) && s.push(u); return s; } function gH(e, t) { return function(n) { return e(t(n)); }; } var LFe = gH(Object.keys, Object), RFe = Object.prototype, NFe = RFe.hasOwnProperty; function MFe(e) { if (!dH(e)) return LFe(e); var t = []; for (var n in Object(e)) NFe.call(e, n) && n != "constructor" && t.push(n); return t; } function mH(e) { return XOe(e) ? PFe(e) : MFe(e); } var DFe = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, BFe = /^\w*$/; function hE(e, t) { if (da(e)) return !1; var n = typeof e; return n == "number" || n == "symbol" || n == "boolean" || e == null || Ym(e) ? !0 : BFe.test(e) || !DFe.test(e) || t != null && e in Object(t); } var yf = Wu(Object, "create"); function zFe() { this.__data__ = yf ? yf(null) : {}, this.size = 0; } function jFe(e) { var t = this.has(e) && delete this.__data__[e]; return this.size -= t ? 1 : 0, t; } var VFe = "__lodash_hash_undefined__", HFe = Object.prototype, UFe = HFe.hasOwnProperty; function qFe(e) { var t = this.__data__; if (yf) { var n = t[e]; return n === VFe ? void 0 : n; } return UFe.call(t, e) ? t[e] : void 0; } var KFe = Object.prototype, GFe = KFe.hasOwnProperty; function WFe(e) { var t = this.__data__; return yf ? t[e] !== void 0 : GFe.call(t, e); } var YFe = "__lodash_hash_undefined__"; function XFe(e, t) { var n = this.__data__; return this.size += this.has(e) ? 0 : 1, n[e] = yf && t === void 0 ? YFe : t, this; } function bu(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]); } } bu.prototype.clear = zFe; bu.prototype.delete = jFe; bu.prototype.get = qFe; bu.prototype.has = WFe; bu.prototype.set = XFe; function ZFe() { this.__data__ = [], this.size = 0; } function Xm(e, t) { for (var n = e.length; n--; ) if (cE(e[n][0], t)) return n; return -1; } var JFe = Array.prototype, QFe = JFe.splice; function eTe(e) { var t = this.__data__, n = Xm(t, e); if (n < 0) return !1; var r = t.length - 1; return n == r ? t.pop() : QFe.call(t, n, 1), --this.size, !0; } function tTe(e) { var t = this.__data__, n = Xm(t, e); return n < 0 ? void 0 : t[n][1]; } function nTe(e) { return Xm(this.__data__, e) > -1; } function rTe(e, t) { var n = this.__data__, r = Xm(n, e); return r < 0 ? (++this.size, n.push([e, t])) : n[r][1] = t, this; } function bs(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]); } } bs.prototype.clear = ZFe; bs.prototype.delete = eTe; bs.prototype.get = tTe; bs.prototype.has = nTe; bs.prototype.set = rTe; var bf = Wu(Wa, "Map"); function oTe() { this.size = 0, this.__data__ = { hash: new bu(), map: new (bf || bs)(), string: new bu() }; } function aTe(e) { var t = typeof e; return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e !== "__proto__" : e === null; } function Zm(e, t) { var n = e.__data__; return aTe(t) ? n[typeof t == "string" ? "string" : "hash"] : n.map; } function iTe(e) { var t = Zm(this, e).delete(e); return this.size -= t ? 1 : 0, t; } function sTe(e) { return Zm(this, e).get(e); } function lTe(e) { return Zm(this, e).has(e); } function uTe(e, t) { var n = Zm(this, e), r = n.size; return n.set(e, t), this.size += n.size == r ? 0 : 1, this; } function ws(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]); } } ws.prototype.clear = oTe; ws.prototype.delete = iTe; ws.prototype.get = sTe; ws.prototype.has = lTe; ws.prototype.set = uTe; var cTe = "Expected a function"; function vE(e, t) { if (typeof e != "function" || t != null && typeof t != "function") throw new TypeError(cTe); 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 i = e.apply(this, r); return n.cache = a.set(o, i) || a, i; }; return n.cache = new (vE.Cache || ws)(), n; } vE.Cache = ws; var dTe = 500; function pTe(e) { var t = vE(e, function(r) { return n.size === dTe && n.clear(), r; }), n = t.cache; return t; } var fTe = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, hTe = /\\(\\)?/g, vTe = pTe(function(e) { var t = []; return e.charCodeAt(0) === 46 && t.push(""), e.replace(fTe, function(n, r, o, a) { t.push(o ? a.replace(hTe, "$1") : r || n); }), t; }); function gTe(e) { return e == null ? "" : sH(e); } function Jm(e, t) { return da(e) ? e : hE(e, t) ? [e] : vTe(gTe(e)); } var mTe = 1 / 0; function gh(e) { if (typeof e == "string" || Ym(e)) return e; var t = e + ""; return t == "0" && 1 / e == -mTe ? "-0" : t; } function gE(e, t) { t = Jm(t, e); for (var n = 0, r = t.length; e != null && n < r; ) e = e[gh(t[n++])]; return n && n == r ? e : void 0; } function qi(e, t, n) { var r = e == null ? void 0 : gE(e, t); return r === void 0 ? n : r; } function yH(e, t) { for (var n = -1, r = t.length, o = e.length; ++n < r; ) e[o + n] = t[n]; return e; } var ZP = ca ? ca.isConcatSpreadable : void 0; function yTe(e) { return da(e) || pE(e) || !!(ZP && e && e[ZP]); } function mE(e, t, n, r, o) { var a = -1, i = e.length; for (n || (n = yTe), o || (o = []); ++a < i; ) { var s = e[a]; t > 0 && n(s) ? t > 1 ? mE(s, t - 1, n, r, o) : yH(o, s) : o[o.length] = s; } return o; } function bTe(e) { var t = e == null ? 0 : e.length; return t ? mE(e, 1) : []; } function wTe(e) { return zOe(WOe(e, void 0, bTe), e + ""); } var xTe = gH(Object.getPrototypeOf, Object); function Ki() { if (!arguments.length) return []; var e = arguments[0]; return da(e) ? e : [e]; } function kTe() { this.__data__ = new bs(), this.size = 0; } function CTe(e) { var t = this.__data__, n = t.delete(e); return this.size = t.size, n; } function _Te(e) { return this.__data__.get(e); } function STe(e) { return this.__data__.has(e); } var $Te = 200; function ETe(e, t) { var n = this.__data__; if (n instanceof bs) { var r = n.__data__; if (!bf || r.length < $Te - 1) return r.push([e, t]), this.size = ++n.size, this; n = this.__data__ = new ws(r); } return n.set(e, t), this.size = n.size, this; } function ci(e) { var t = this.__data__ = new bs(e); this.size = t.size; } ci.prototype.clear = kTe; ci.prototype.delete = CTe; ci.prototype.get = _Te; ci.prototype.has = STe; ci.prototype.set = ETe; var bH = typeof exports == "object" && exports && !exports.nodeType && exports, JP = bH && typeof module == "object" && module && !module.nodeType && module, OTe = JP && JP.exports === bH, QP = OTe ? Wa.Buffer : void 0; QP && QP.allocUnsafe; function FTe(e, t) { return e.slice(); } function TTe(e, t) { for (var n = -1, r = e == null ? 0 : e.length, o = 0, a = []; ++n < r; ) { var i = e[n]; t(i, n, e) && (a[o++] = i); } return a; } function ATe() { return []; } var ITe = Object.prototype, PTe = ITe.propertyIsEnumerable, eL = Object.getOwnPropertySymbols, LTe = eL ? function(e) { return e == null ? [] : (e = Object(e), TTe(eL(e), function(t) { return PTe.call(e, t); })); } : ATe; function RTe(e, t, n) { var r = t(e); return da(e) ? r : yH(r, n(e)); } function f_(e) { return RTe(e, mH, LTe); } var h_ = Wu(Wa, "DataView"), v_ = Wu(Wa, "Promise"), g_ = Wu(Wa, "Set"), tL = "[object Map]", NTe = "[object Object]", nL = "[object Promise]", rL = "[object Set]", oL = "[object WeakMap]", aL = "[object DataView]", MTe = Gu(h_), DTe = Gu(bf), BTe = Gu(v_), zTe = Gu(g_), jTe = Gu(p_), Na = Id; (h_ && Na(new h_(new ArrayBuffer(1))) != aL || bf && Na(new bf()) != tL || v_ && Na(v_.resolve()) != nL || g_ && Na(new g_()) != rL || p_ && Na(new p_()) != oL) && (Na = function(e) { var t = Id(e), n = t == NTe ? e.constructor : void 0, r = n ? Gu(n) : ""; if (r) switch (r) { case MTe: return aL; case DTe: return tL; case BTe: return nL; case zTe: return rL; case jTe: return oL; } return t; }); var VTe = Object.prototype, HTe = VTe.hasOwnProperty; function UTe(e) { var t = e.length, n = new e.constructor(t); return t && typeof e[0] == "string" && HTe.call(e, "index") && (n.index = e.index, n.input = e.input), n; } var n0 = Wa.Uint8Array; function yE(e) { var t = new e.constructor(e.byteLength); return new n0(t).set(new n0(e)), t; } function qTe(e, t) { var n = yE(e.buffer); return new e.constructor(n, e.byteOffset, e.byteLength); } var KTe = /\w*$/; function GTe(e) { var t = new e.constructor(e.source, KTe.exec(e)); return t.lastIndex = e.lastIndex, t; } var iL = ca ? ca.prototype : void 0, sL = iL ? iL.valueOf : void 0; function WTe(e) { return sL ? Object(sL.call(e)) : {}; } function YTe(e, t) { var n = yE(e.buffer); return new e.constructor(n, e.byteOffset, e.length); } var XTe = "[object Boolean]", ZTe = "[object Date]", JTe = "[object Map]", QTe = "[object Number]", e8e = "[object RegExp]", t8e = "[object Set]", n8e = "[object String]", r8e = "[object Symbol]", o8e = "[object ArrayBuffer]", a8e = "[object DataView]", i8e = "[object Float32Array]", s8e = "[object Float64Array]", l8e = "[object Int8Array]", u8e = "[object Int16Array]", c8e = "[object Int32Array]", d8e = "[object Uint8Array]", p8e = "[object Uint8ClampedArray]", f8e = "[object Uint16Array]", h8e = "[object Uint32Array]"; function v8e(e, t, n) { var r = e.constructor; switch (t) { case o8e: return yE(e); case XTe: case ZTe: return new r(+e); case a8e: return qTe(e); case i8e: case s8e: case l8e: case u8e: case c8e: case d8e: case p8e: case f8e: case h8e: return YTe(e); case JTe: return new r(); case QTe: case n8e: return new r(e); case e8e: return GTe(e); case t8e: return new r(); case r8e: return WTe(e); } } function g8e(e) { return typeof e.constructor == "function" && !dH(e) ? IOe(xTe(e)) : {}; } var m8e = "[object Map]"; function y8e(e) { return pl(e) && Na(e) == m8e; } var lL = Xc && Xc.isMap, b8e = lL ? fE(lL) : y8e, w8e = "[object Set]"; function x8e(e) { return pl(e) && Na(e) == w8e; } var uL = Xc && Xc.isSet, k8e = uL ? fE(uL) : x8e, C8e = 1, wH = "[object Arguments]", _8e = "[object Array]", S8e = "[object Boolean]", $8e = "[object Date]", E8e = "[object Error]", xH = "[object Function]", O8e = "[object GeneratorFunction]", F8e = "[object Map]", T8e = "[object Number]", kH = "[object Object]", A8e = "[object RegExp]", I8e = "[object Set]", P8e = "[object String]", L8e = "[object Symbol]", R8e = "[object WeakMap]", N8e = "[object ArrayBuffer]", M8e = "[object DataView]", D8e = "[object Float32Array]", B8e = "[object Float64Array]", z8e = "[object Int8Array]", j8e = "[object Int16Array]", V8e = "[object Int32Array]", H8e = "[object Uint8Array]", U8e = "[object Uint8ClampedArray]", q8e = "[object Uint16Array]", K8e = "[object Uint32Array]", bn = {}; bn[wH] = bn[_8e] = bn[N8e] = bn[M8e] = bn[S8e] = bn[$8e] = bn[D8e] = bn[B8e] = bn[z8e] = bn[j8e] = bn[V8e] = bn[F8e] = bn[T8e] = bn[kH] = bn[A8e] = bn[I8e] = bn[P8e] = bn[L8e] = bn[H8e] = bn[U8e] = bn[q8e] = bn[K8e] = !0; bn[E8e] = bn[xH] = bn[R8e] = !1; function sg(e, t, n, r, o, a) { var i, s = t & C8e; if (i !== void 0) return i; if (!bi(e)) return e; var l = da(e); if (l) i = UTe(e); else { var u = Na(e), c = u == xH || u == O8e; if (t0(e)) return FTe(e); if (u == kH || u == wH || c && !o) i = c ? {} : g8e(e); else { if (!bn[u]) return o ? e : {}; i = v8e(e, u); } } a || (a = new ci()); var d = a.get(e); if (d) return d; a.set(e, i), k8e(e) ? e.forEach(function(f) { i.add(sg(f, t, n, f, e, a)); }) : b8e(e) && e.forEach(function(f, v) { i.set(v, sg(f, t, n, v, e, a)); }); var p = f_, h = l ? void 0 : p(e); return jOe(h || e, function(f, v) { h && (v = f, f = e[v]), cH(i, v, sg(f, t, n, v, e, a)); }), i; } var G8e = 1, W8e = 4; function CH(e) { return sg(e, G8e | W8e); } var Y8e = "__lodash_hash_undefined__"; function X8e(e) { return this.__data__.set(e, Y8e), this; } function Z8e(e) { return this.__data__.has(e); } function r0(e) { var t = -1, n = e == null ? 0 : e.length; for (this.__data__ = new ws(); ++t < n; ) this.add(e[t]); } r0.prototype.add = r0.prototype.push = X8e; r0.prototype.has = Z8e; function J8e(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 Q8e(e, t) { return e.has(t); } var eAe = 1, tAe = 2; function _H(e, t, n, r, o, a) { var i = n & eAe, s = e.length, l = t.length; if (s != l && !(i && l > s)) return !1; var u = a.get(e), c = a.get(t); if (u && c) return u == t && c == e; var d = -1, p = !0, h = n & tAe ? new r0() : void 0; for (a.set(e, t), a.set(t, e); ++d < s; ) { var f = e[d], v = t[d]; if (r) var m = i ? r(v, f, d, t, e, a) : r(f, v, d, e, t, a); if (m !== void 0) { if (m) continue; p = !1; break; } if (h) { if (!J8e(t, function(g, b) { if (!Q8e(h, b) && (f === g || o(f, g, n, r, a))) return h.push(b); })) { p = !1; break; } } else if (!(f === v || o(f, v, n, r, a))) { p = !1; break; } } return a.delete(e), a.delete(t), p; } function nAe(e) { var t = -1, n = Array(e.size); return e.forEach(function(r, o) { n[++t] = [o, r]; }), n; } function rAe(e) { var t = -1, n = Array(e.size); return e.forEach(function(r) { n[++t] = r; }), n; } var oAe = 1, aAe = 2, iAe = "[object Boolean]", sAe = "[object Date]", lAe = "[object Error]", uAe = "[object Map]", cAe = "[object Number]", dAe = "[object RegExp]", pAe = "[object Set]", fAe = "[object String]", hAe = "[object Symbol]", vAe = "[object ArrayBuffer]", gAe = "[object DataView]", cL = ca ? ca.prototype : void 0, zk = cL ? cL.valueOf : void 0; function mAe(e, t, n, r, o, a, i) { switch (n) { case gAe: if (e.byteLength != t.byteLength || e.byteOffset != t.byteOffset) return !1; e = e.buffer, t = t.buffer; case vAe: return !(e.byteLength != t.byteLength || !a(new n0(e), new n0(t))); case iAe: case sAe: case cAe: return cE(+e, +t); case lAe: return e.name == t.name && e.message == t.message; case dAe: case fAe: return e == t + ""; case uAe: var s = nAe; case pAe: var l = r & oAe; if (s || (s = rAe), e.size != t.size && !l) return !1; var u = i.get(e); if (u) return u == t; r |= aAe, i.set(e, t); var c = _H(s(e), s(t), r, o, a, i); return i.delete(e), c; case hAe: if (zk) return zk.call(e) == zk.call(t); } return !1; } var yAe = 1, bAe = Object.prototype, wAe = bAe.hasOwnProperty; function xAe(e, t, n, r, o, a) { var i = n & yAe, s = f_(e), l = s.length, u = f_(t), c = u.length; if (l != c && !i) return !1; for (var d = l; d--; ) { var p = s[d]; if (!(i ? p in t : wAe.call(t, p))) return !1; } var h = a.get(e), f = a.get(t); if (h && f) return h == t && f == e; var v = !0; a.set(e, t), a.set(t, e); for (var m = i; ++d < l; ) { p = s[d]; var g = e[p], b = t[p]; if (r) var x = i ? r(b, g, p, t, e, a) : r(g, b, p, e, t, a); if (!(x === void 0 ? g === b || o(g, b, n, r, a) : x)) { v = !1; break; } m || (m = p == "constructor"); } if (v && !m) { var w = e.constructor, k = t.constructor; w != k && "constructor" in e && "constructor" in t && !(typeof w == "function" && w instanceof w && typeof k == "function" && k instanceof k) && (v = !1); } return a.delete(e), a.delete(t), v; } var kAe = 1, dL = "[object Arguments]", pL = "[object Array]", yv = "[object Object]", CAe = Object.prototype, fL = CAe.hasOwnProperty; function _Ae(e, t, n, r, o, a) { var i = da(e), s = da(t), l = i ? pL : Na(e), u = s ? pL : Na(t); l = l == dL ? yv : l, u = u == dL ? yv : u; var c = l == yv, d = u == yv, p = l == u; if (p && t0(e)) { if (!t0(t)) return !1; i = !0, c = !1; } if (p && !c) return a || (a = new ci()), i || vH(e) ? _H(e, t, n, r, o, a) : mAe(e, t, l, n, r, o, a); if (!(n & kAe)) { var h = c && fL.call(e, "__wrapped__"), f = d && fL.call(t, "__wrapped__"); if (h || f) { var v = h ? e.value() : e, m = f ? t.value() : t; return a || (a = new ci()), o(v, m, n, r, a); } } return p ? (a || (a = new ci()), xAe(e, t, n, r, o, a)) : !1; } function Qm(e, t, n, r, o) { return e === t ? !0 : e == null || t == null || !pl(e) && !pl(t) ? e !== e && t !== t : _Ae(e, t, n, r, Qm, o); } var SAe = 1, $Ae = 2; function EAe(e, t, n, r) { var o = n.length, a = o; if (e == null) return !a; for (e = Object(e); o--; ) { var i = n[o]; if (i[2] ? i[1] !== e[i[0]] : !(i[0] in e)) return !1; } for (; ++o < a; ) { i = n[o]; var s = i[0], l = e[s], u = i[1]; if (i[2]) { if (l === void 0 && !(s in e)) return !1; } else { var c = new ci(), d; if (!(d === void 0 ? Qm(u, l, SAe | $Ae, r, c) : d)) return !1; } } return !0; } function SH(e) { return e === e && !bi(e); } function OAe(e) { for (var t = mH(e), n = t.length; n--; ) { var r = t[n], o = e[r]; t[n] = [r, o, SH(o)]; } return t; } function $H(e, t) { return function(n) { return n == null ? !1 : n[e] === t && (t !== void 0 || e in Object(n)); }; } function FAe(e) { var t = OAe(e); return t.length == 1 && t[0][2] ? $H(t[0][0], t[0][1]) : function(n) { return n === e || EAe(n, e, t); }; } function TAe(e, t) { return e != null && t in Object(e); } function AAe(e, t, n) { t = Jm(t, e); for (var r = -1, o = t.length, a = !1; ++r < o; ) { var i = gh(t[r]); if (!(a = e != null && n(e, i))) break; e = e[i]; } return a || ++r != o ? a : (o = e == null ? 0 : e.length, !!o && dE(o) && uE(i, o) && (da(e) || pE(e))); } function EH(e, t) { return e != null && AAe(e, t, TAe); } var IAe = 1, PAe = 2; function LAe(e, t) { return hE(e) && SH(t) ? $H(gh(e), t) : function(n) { var r = qi(n, e); return r === void 0 && r === t ? EH(n, e) : Qm(t, r, IAe | PAe); }; } function RAe(e) { return function(t) { return t == null ? void 0 : t[e]; }; } function NAe(e) { return function(t) { return gE(t, e); }; } function MAe(e) { return hE(e) ? RAe(gh(e)) : NAe(e); } function DAe(e) { return typeof e == "function" ? e : e == null ? lH : typeof e == "object" ? da(e) ? LAe(e[0], e[1]) : FAe(e) : MAe(e); } var jk = function() { return Wa.Date.now(); }, BAe = "Expected a function", zAe = Math.max, jAe = Math.min; function OH(e, t, n) { var r, o, a, i, s, l, u = 0, c = !1, d = !1, p = !0; if (typeof e != "function") throw new TypeError(BAe); t = HP(t) || 0, bi(n) && (c = !!n.leading, d = "maxWait" in n, a = d ? zAe(HP(n.maxWait) || 0, t) : a, p = "trailing" in n ? !!n.trailing : p); function h(C) { var _ = r, $ = o; return r = o = void 0, u = C, i = e.apply($, _), i; } function f(C) { return u = C, s = setTimeout(g, t), c ? h(C) : i; } function v(C) { var _ = C - l, $ = C - u, O = t - _; return d ? jAe(O, a - $) : O; } function m(C) { var _ = C - l, $ = C - u; return l === void 0 || _ >= t || _ < 0 || d && $ >= a; } function g() { var C = jk(); if (m(C)) return b(C); s = setTimeout(g, v(C)); } function b(C) { return s = void 0, p && r ? h(C) : (r = o = void 0, i); } function x() { s !== void 0 && clearTimeout(s), u = 0, r = l = o = s = void 0; } function w() { return s === void 0 ? i : b(jk()); } function k() { var C = jk(), _ = m(C); if (r = arguments, o = this, l = C, _) { if (s === void 0) return f(l); if (d) return clearTimeout(s), s = setTimeout(g, t), h(l); } return s === void 0 && (s = setTimeout(g, t)), i; } return k.cancel = x, k.flush = w, k; } function VAe(e, t, n) { var r = e == null ? 0 : e.length; if (!r) return -1; var o = r - 1; return VOe(e, DAe(t), o); } var HAe = 1 / 0; function UAe(e) { var t = e == null ? 0 : e.length; return t ? mE(e, HAe) : []; } function o0(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 di(e, t) { return Qm(e, t); } function mh(e) { return e == null; } function FH(e) { return e === void 0; } function qAe(e, t, n, r) { if (!bi(e)) return e; t = Jm(t, e); for (var o = -1, a = t.length, i = a - 1, s = e; s != null && ++o < a; ) { var l = gh(t[o]), u = n; if (l === "__proto__" || l === "constructor" || l === "prototype") return e; if (o != i) { var c = s[l]; u = void 0, u === void 0 && (u = bi(c) ? c : uE(t[o + 1]) ? [] : {}); } cH(s, l, u), s = s[l]; } return e; } function KAe(e, t, n) { for (var r = -1, o = t.length, a = {}; ++r < o; ) { var i = t[r], s = gE(e, i); n(s, i) && qAe(a, Jm(i, e), s); } return a; } function GAe(e, t) { return KAe(e, t, function(n, r) { return EH(e, r); }); } var TH = wTe(function(e, t) { return e == null ? {} : GAe(e, t); }); const Xi = (e) => e === void 0, pa = (e) => typeof e == "boolean", Wt = (e) => typeof e == "number", m_ = (e) => !e && e !== 0 || io(e) && e.length === 0 || br(e) && !Object.keys(e).length, Zs = (e) => typeof Element > "u" ? !1 : e instanceof Element, wf = (e) => mh(e), WAe = (e) => Yr(e) ? !Number.isNaN(Number(e)) : !1, YAe = (e = "") => e.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d"), hL = (e) => Y4e(e), vL = (e) => Object.keys(e); class AH extends Error { constructor(t) { super(t), this.name = "ElementPlusError"; } } function IH(e, t) { throw new AH(`[${e}] ${t}`); } function Gn(e, t) { if (process.env.NODE_ENV !== "production") { const n = Yr(e) ? new AH(`[${e}] ${t}`) : e; console.warn(n); } } const XAe = "utils/dom/style", PH = (e = "") => e.split(" ").filter((t) => !!t.trim()), gL = (e, t) => { if (!e || !t) return !1; if (t.includes(" ")) throw new Error("className should not contain space."); return e.classList.contains(t); }, y_ = (e, t) => { !e || !t.trim() || e.classList.add(...PH(t)); }, xf = (e, t) => { !e || !t.trim() || e.classList.remove(...PH(t)); }, mc = (e, t) => { var n; if (!pn || !e || !t) return ""; let r = K4e(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 as(e, t = "px") { if (!e) return ""; if (Wt(e) || WAe(e)) return `${e}${t}`; if (Yr(e)) return e; Gn(XAe, "binding value must be a string or number"); } let bv; const ZAe = (e) => { var t; if (!pn) return 0; if (bv !== void 0) return bv; 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), bv = r - a, bv; }; function LH(e, t) { if (!pn) 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, u) => l + u.offsetTop, 0), a = o + t.offsetHeight, i = e.scrollTop, s = i + e.clientHeight; o < i ? e.scrollTop = o : a > s && (e.scrollTop = a - e.clientHeight); } const RH = "__epPropKey", at = (e) => e, JAe = (e) => br(e) && !!e[RH], e1 = (e, t) => { if (!br(e) || JAe(e)) return e; const { values: n, required: r, default: o, type: a, validator: i } = e, s = { type: a, required: !!r, validator: n || i ? (l) => { let u = !1, c = []; if (n && (c = Array.from(n), DP(e, "default") && c.push(o), u || (u = c.includes(l))), i && (u || (u = i(l))), !u && c.length > 0) { const d = [...new Set(c)].map((p) => JSON.stringify(p)).join(", "); k0(`Invalid prop: validation failed${t ? ` for prop "${t}"` : ""}. Expected one of [${d}], got value ${JSON.stringify(l)}.`); } return u; } : void 0, [RH]: !0 }; return DP(e, "default") && (s.default = o), s; }, $t = (e) => o0(Object.entries(e).map(([t, n]) => [ t, e1(n, t) ])), zo = at([ String, Object, Function ]), QAe = { Close: Bo, SuccessFilled: vN, InfoFilled: uS, WarningFilled: gN, CircleCloseFilled: fN }, mL = { success: vN, warning: gN, error: fN, info: uS }, NH = { validating: Ei, success: sS, error: $i }, Kn = (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; }, e6e = (e, t) => (e.install = (n) => { e._context = n._context, n.config.globalProperties[t] = e; }, e), t6e = (e, t) => (e.install = (n) => { n.directive(t, e); }, e), Vo = (e) => (e.install = Qi, e), MH = (...e) => (t) => { e.forEach((n) => { Rn(n) ? n(t) : n.value = t; }); }, Yt = { 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" }, Hn = "update:modelValue", wu = "change", t1 = ["", "default", "small", "large"]; var lg = /* @__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))(lg || {}); const yL = (e) => [...new Set(e)], bL = (e) => !e && e !== 0 ? [] : Array.isArray(e) ? e : [e], n6e = (e) => /([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(e), Gi = (e) => e, r6e = ["class", "style"], o6e = /^on[A-Z]/, a6e = (e = {}) => { const { excludeListeners: t = !1, excludeKeys: n } = e, r = E(() => ((n == null ? void 0 : n.value) || []).concat(r6e)), o = st(); return o ? E(() => { var a; return o0(Object.entries((a = o.proxy) == null ? void 0 : a.$attrs).filter(([i]) => !r.value.includes(i) && !(t && o6e.test(i)))); }) : (Gn("use-attrs", "getCurrentInstance() returned null. useAttrs() must be called at the top of a setup function"), E(() => ({}))); }, nu = ({ from: e, replacement: t, scope: n, version: r, ref: o, type: a = "API" }, i) => { he(() => y(i), (s) => { s && Gn(n, `[${a}] ${e} is about to be deprecated in version ${r}, please use ${t} instead. For more detail, please visit: ${o} `); }, { immediate: !0 }); }; var i6e = { 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 s6e = (e) => (t, n) => l6e(t, n, y(e)), l6e = (e, t, n) => qi(n, e, e).replace(/\{(\w+)\}/g, (r, o) => { var a; return `${(a = t == null ? void 0 : t[o]) != null ? a : `{${o}}`}`; }), u6e = (e) => { const t = E(() => y(e).name), n = xn(e) ? e : z(e); return { lang: t, locale: n, t: s6e(e) }; }, DH = Symbol("localeContextKey"), Ho = (e) => { const t = e || be(DH, z()); return u6e(E(() => t.value || i6e)); }, Rp = "el", c6e = "is-", Nl = (e, t, n, r, o) => { let a = `${e}-${t}`; return n && (a += `-${n}`), r && (a += `__${r}`), o && (a += `--${o}`), a; }, BH = Symbol("namespaceContextKey"), bE = (e) => { const t = e || (st() ? be(BH, z(Rp)) : z(Rp)); return E(() => y(t) || Rp); }, wt = (e, t) => { const n = bE(t); return { namespace: n, b: (r = "") => Nl(n.value, e, r, "", ""), e: (r) => r ? Nl(n.value, e, "", r, "") : "", m: (r) => r ? Nl(n.value, e, "", "", r) : "", be: (r, o) => r && o ? Nl(n.value, e, r, o, "") : "", em: (r, o) => r && o ? Nl(n.value, e, "", r, o) : "", bm: (r, o) => r && o ? Nl(n.value, e, r, "", o) : "", bem: (r, o, a) => r && o && a ? Nl(n.value, e, r, o, a) : "", is: (r, ...o) => { const a = o.length >= 1 ? o[0] : !0; return r && a ? `${c6e}${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}` }; }, d6e = (e, t = {}) => { xn(e) || IH("[useLockscreen]", "You need to pass a ref param to this function"); const n = t.ns || wt("popup"), r = E(() => n.bm("parent", "hidden")); if (!pn || gL(document.body, r.value)) return; let o = 0, a = !1, i = "0"; const s = () => { setTimeout(() => { xf(document == null ? void 0 : document.body, r.value), a && document && (document.body.style.width = i); }, 200); }; he(e, (l) => { if (!l) { s(); return; } a = !gL(document.body, r.value), a && (i = document.body.style.width), o = ZAe(n.namespace.value); const u = document.documentElement.clientHeight < document.body.scrollHeight, c = mc(document.body, "overflowY"); o > 0 && (u || c === "scroll") && a && (document.body.style.width = `calc(100% - ${o}px)`), y_(document.body, r.value); }), Lf(() => s()); }, p6e = e1({ type: at(Boolean), default: null }), f6e = e1({ type: at(Function) }), h6e = (e) => { const t = `update:${e}`, n = `onUpdate:${e}`, r = [t], o = { [e]: p6e, [n]: f6e }; return { useModelToggle: ({ indicator: a, toggleReason: i, shouldHideWhenRouteChanges: s, shouldProceed: l, onShow: u, onHide: c }) => { const d = st(), { emit: p } = d, h = d.props, f = E(() => Rn(h[n])), v = E(() => h[e] === null), m = (C) => { a.value !== !0 && (a.value = !0, i && (i.value = C), Rn(u) && u(C)); }, g = (C) => { a.value !== !1 && (a.value = !1, i && (i.value = C), Rn(c) && c(C)); }, b = (C) => { if (h.disabled === !0 || Rn(l) && !l()) return; const _ = f.value && pn; _ && p(t, !0), (v.value || !_) && m(C); }, x = (C) => { if (h.disabled === !0 || !pn) return; const _ = f.value && pn; _ && p(t, !1), (v.value || !_) && g(C); }, w = (C) => { pa(C) && (h.disabled && C ? f.value && p(t, !1) : a.value !== C && (C ? m() : g())); }, k = () => { a.value ? x() : b(); }; return he(() => h[e], w), s && d.appContext.config.globalProperties.$route !== void 0 && he(() => ({ ...d.proxy.$route }), () => { s.value && a.value && x(); }), ut(() => { w(h[e]); }), { hide: x, show: b, toggle: k, hasUpdateHandler: f }; }, useModelToggleProps: o, useModelToggleEmits: r }; }, zH = (e) => { const t = st(); return E(() => { var n, r; return (r = (n = t == null ? void 0 : t.proxy) == null ? void 0 : n.$props) == null ? void 0 : r[e]; }); }; var xo = "top", fa = "bottom", ha = "right", ko = "left", wE = "auto", yh = [xo, fa, ha, ko], Zc = "start", kf = "end", v6e = "clippingParents", jH = "viewport", sp = "popper", g6e = "reference", wL = yh.reduce(function(e, t) { return e.concat([t + "-" + Zc, t + "-" + kf]); }, []), bh = [].concat(yh, [wE]).reduce(function(e, t) { return e.concat([t, t + "-" + Zc, t + "-" + kf]); }, []), m6e = "beforeRead", y6e = "read", b6e = "afterRead", w6e = "beforeMain", x6e = "main", k6e = "afterMain", C6e = "beforeWrite", _6e = "write", S6e = "afterWrite", $6e = [m6e, y6e, b6e, w6e, x6e, k6e, C6e, _6e, S6e]; function wi(e) { return e ? (e.nodeName || "").toLowerCase() : null; } function Ya(e) { if (e == null) return window; if (e.toString() !== "[object Window]") { var t = e.ownerDocument; return t && t.defaultView || window; } return e; } function Jc(e) { var t = Ya(e).Element; return e instanceof t || e instanceof Element; } function ta(e) { var t = Ya(e).HTMLElement; return e instanceof t || e instanceof HTMLElement; } function xE(e) { if (typeof ShadowRoot > "u") return !1; var t = Ya(e).ShadowRoot; return e instanceof t || e instanceof ShadowRoot; } function E6e(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]; !ta(a) || !wi(a) || (Object.assign(a.style, r), Object.keys(o).forEach(function(i) { var s = o[i]; s === !1 ? a.removeAttribute(i) : a.setAttribute(i, s === !0 ? "" : s); })); }); } function O6e(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] || {}, i = Object.keys(t.styles.hasOwnProperty(r) ? t.styles[r] : n[r]), s = i.reduce(function(l, u) { return l[u] = "", l; }, {}); !ta(o) || !wi(o) || (Object.assign(o.style, s), Object.keys(a).forEach(function(l) { o.removeAttribute(l); })); }); }; } var VH = { name: "applyStyles", enabled: !0, phase: "write", fn: E6e, effect: O6e, requires: ["computeStyles"] }; function pi(e) { return e.split("-")[0]; } var ru = Math.max, a0 = Math.min, Qc = Math.round; function ed(e, t) { t === void 0 && (t = !1); var n = e.getBoundingClientRect(), r = 1, o = 1; if (ta(e) && t) { var a = e.offsetHeight, i = e.offsetWidth; i > 0 && (r = Qc(n.width) / i || 1), a > 0 && (o = Qc(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 kE(e) { var t = ed(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 HH(e, t) { var n = t.getRootNode && t.getRootNode(); if (e.contains(t)) return !0; if (n && xE(n)) { var r = t; do { if (r && e.isSameNode(r)) return !0; r = r.parentNode || r.host; } while (r); } return !1; } function is(e) { return Ya(e).getComputedStyle(e); } function F6e(e) { return ["table", "td", "th"].indexOf(wi(e)) >= 0; } function Sl(e) { return ((Jc(e) ? e.ownerDocument : e.document) || window.document).documentElement; } function n1(e) { return wi(e) === "html" ? e : e.assignedSlot || e.parentNode || (xE(e) ? e.host : null) || Sl(e); } function xL(e) { return !ta(e) || is(e).position === "fixed" ? null : e.offsetParent; } function T6e(e) { var t = navigator.userAgent.toLowerCase().indexOf("firefox") !== -1, n = navigator.userAgent.indexOf("Trident") !== -1; if (n && ta(e)) { var r = is(e); if (r.position === "fixed") return null; } var o = n1(e); for (xE(o) && (o = o.host); ta(o) && ["html", "body"].indexOf(wi(o)) < 0; ) { var a = is(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 wh(e) { for (var t = Ya(e), n = xL(e); n && F6e(n) && is(n).position === "static"; ) n = xL(n); return n && (wi(n) === "html" || wi(n) === "body" && is(n).position === "static") ? t : n || T6e(e) || t; } function CE(e) { return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y"; } function Np(e, t, n) { return ru(e, a0(t, n)); } function A6e(e, t, n) { var r = Np(e, t, n); return r > n ? n : r; } function UH() { return { top: 0, right: 0, bottom: 0, left: 0 }; } function qH(e) { return Object.assign({}, UH(), e); } function KH(e, t) { return t.reduce(function(n, r) { return n[r] = e, n; }, {}); } var I6e = function(e, t) { return e = typeof e == "function" ? e(Object.assign({}, t.rects, { placement: t.placement })) : e, qH(typeof e != "number" ? e : KH(e, yh)); }; function P6e(e) { var t, n = e.state, r = e.name, o = e.options, a = n.elements.arrow, i = n.modifiersData.popperOffsets, s = pi(n.placement), l = CE(s), u = [ko, ha].indexOf(s) >= 0, c = u ? "height" : "width"; if (!(!a || !i)) { var d = I6e(o.padding, n), p = kE(a), h = l === "y" ? xo : ko, f = l === "y" ? fa : ha, v = n.rects.reference[c] + n.rects.reference[l] - i[l] - n.rects.popper[c], m = i[l] - n.rects.reference[l], g = wh(a), b = g ? l === "y" ? g.clientHeight || 0 : g.clientWidth || 0 : 0, x = v / 2 - m / 2, w = d[h], k = b - p[c] - d[f], C = b / 2 - p[c] / 2 + x, _ = Np(w, C, k), $ = l; n.modifiersData[r] = (t = {}, t[$] = _, t.centerOffset = _ - C, t); } } function L6e(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) || !HH(t.elements.popper, o) || (t.elements.arrow = o)); } var R6e = { name: "arrow", enabled: !0, phase: "main", fn: P6e, effect: L6e, requires: ["popperOffsets"], requiresIfExists: ["preventOverflow"] }; function td(e) { return e.split("-")[1]; } var N6e = { top: "auto", right: "auto", bottom: "auto", left: "auto" }; function M6e(e) { var t = e.x, n = e.y, r = window, o = r.devicePixelRatio || 1; return { x: Qc(t * o) / o || 0, y: Qc(n * o) / o || 0 }; } function kL(e) { var t, n = e.popper, r = e.popperRect, o = e.placement, a = e.variation, i = e.offsets, s = e.position, l = e.gpuAcceleration, u = e.adaptive, c = e.roundOffsets, d = e.isFixed, p = i.x, h = p === void 0 ? 0 : p, f = i.y, v = f === void 0 ? 0 : f, m = typeof c == "function" ? c({ x: h, y: v }) : { x: h, y: v }; h = m.x, v = m.y; var g = i.hasOwnProperty("x"), b = i.hasOwnProperty("y"), x = ko, w = xo, k = window; if (u) { var C = wh(n), _ = "clientHeight", $ = "clientWidth"; if (C === Ya(n) && (C = Sl(n), is(C).position !== "static" && s === "absolute" && (_ = "scrollHeight", $ = "scrollWidth")), C = C, o === xo || (o === ko || o === ha) && a === kf) { w = fa; var O = d && C === k && k.visualViewport ? k.visualViewport.height : C[_]; v -= O - r.height, v *= l ? 1 : -1; } if (o === ko || (o === xo || o === fa) && a === kf) { x = ha; var F = d && C === k && k.visualViewport ? k.visualViewport.width : C[$]; h -= F - r.width, h *= l ? 1 : -1; } } var A = Object.assign({ position: s }, u && N6e), T = c === !0 ? M6e({ x: h, y: v }) : { x: h, y: v }; if (h = T.x, v = T.y, l) { var R; return Object.assign({}, A, (R = {}, R[w] = b ? "0" : "", R[x] = g ? "0" : "", R.transform = (k.devicePixelRatio || 1) <= 1 ? "translate(" + h + "px, " + v + "px)" : "translate3d(" + h + "px, " + v + "px, 0)", R)); } return Object.assign({}, A, (t = {}, t[w] = b ? v + "px" : "", t[x] = g ? h + "px" : "", t.transform = "", t)); } function D6e(e) { var t = e.state, n = e.options, r = n.gpuAcceleration, o = r === void 0 ? !0 : r, a = n.adaptive, i = a === void 0 ? !0 : a, s = n.roundOffsets, l = s === void 0 ? !0 : s, u = { placement: pi(t.placement), variation: td(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, kL(Object.assign({}, u, { offsets: t.modifiersData.popperOffsets, position: t.options.strategy, adaptive: i, roundOffsets: l })))), t.modifiersData.arrow != null && (t.styles.arrow = Object.assign({}, t.styles.arrow, kL(Object.assign({}, u, { offsets: t.modifiersData.arrow, position: "absolute", adaptive: !1, roundOffsets: l })))), t.attributes.popper = Object.assign({}, t.attributes.popper, { "data-popper-placement": t.placement }); } var GH = { name: "computeStyles", enabled: !0, phase: "beforeWrite", fn: D6e, data: {} }, wv = { passive: !0 }; function B6e(e) { var t = e.state, n = e.instance, r = e.options, o = r.scroll, a = o === void 0 ? !0 : o, i = r.resize, s = i === void 0 ? !0 : i, l = Ya(t.elements.popper), u = [].concat(t.scrollParents.reference, t.scrollParents.popper); return a && u.forEach(function(c) { c.addEventListener("scroll", n.update, wv); }), s && l.addEventListener("resize", n.update, wv), function() { a && u.forEach(function(c) { c.removeEventListener("scroll", n.update, wv); }), s && l.removeEventListener("resize", n.update, wv); }; } var WH = { name: "eventListeners", enabled: !0, phase: "write", fn: function() { }, effect: B6e, data: {} }, z6e = { left: "right", right: "left", bottom: "top", top: "bottom" }; function ug(e) { return e.replace(/left|right|bottom|top/g, function(t) { return z6e[t]; }); } var j6e = { start: "end", end: "start" }; function CL(e) { return e.replace(/start|end/g, function(t) { return j6e[t]; }); } function _E(e) { var t = Ya(e), n = t.pageXOffset, r = t.pageYOffset; return { scrollLeft: n, scrollTop: r }; } function SE(e) { return ed(Sl(e)).left + _E(e).scrollLeft; } function V6e(e) { var t = Ya(e), n = Sl(e), r = t.visualViewport, o = n.clientWidth, a = n.clientHeight, i = 0, s = 0; return r && (o = r.width, a = r.height, /^((?!chrome|android).)*safari/i.test(navigator.userAgent) || (i = r.offsetLeft, s = r.offsetTop)), { width: o, height: a, x: i + SE(e), y: s }; } function H6e(e) { var t, n = Sl(e), r = _E(e), o = (t = e.ownerDocument) == null ? void 0 : t.body, a = ru(n.scrollWidth, n.clientWidth, o ? o.scrollWidth : 0, o ? o.clientWidth : 0), i = ru(n.scrollHeight, n.clientHeight, o ? o.scrollHeight : 0, o ? o.clientHeight : 0), s = -r.scrollLeft + SE(e), l = -r.scrollTop; return is(o || n).direction === "rtl" && (s += ru(n.clientWidth, o ? o.clientWidth : 0) - a), { width: a, height: i, x: s, y: l }; } function $E(e) { var t = is(e), n = t.overflow, r = t.overflowX, o = t.overflowY; return /auto|scroll|overlay|hidden/.test(n + o + r); } function YH(e) { return ["html", "body", "#document"].indexOf(wi(e)) >= 0 ? e.ownerDocument.body : ta(e) && $E(e) ? e : YH(n1(e)); } function Mp(e, t) { var n; t === void 0 && (t = []); var r = YH(e), o = r === ((n = e.ownerDocument) == null ? void 0 : n.body), a = Ya(r), i = o ? [a].concat(a.visualViewport || [], $E(r) ? r : []) : r, s = t.concat(i); return o ? s : s.concat(Mp(n1(i))); } function b_(e) { return Object.assign({}, e, { left: e.x, top: e.y, right: e.x + e.width, bottom: e.y + e.height }); } function U6e(e) { var t = ed(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 _L(e, t) { return t === jH ? b_(V6e(e)) : Jc(t) ? U6e(t) : b_(H6e(Sl(e))); } function q6e(e) { var t = Mp(n1(e)), n = ["absolute", "fixed"].indexOf(is(e).position) >= 0, r = n && ta(e) ? wh(e) : e; return Jc(r) ? t.filter(function(o) { return Jc(o) && HH(o, r) && wi(o) !== "body"; }) : []; } function K6e(e, t, n) { var r = t === "clippingParents" ? q6e(e) : [].concat(t), o = [].concat(r, [n]), a = o[0], i = o.reduce(function(s, l) { var u = _L(e, l); return s.top = ru(u.top, s.top), s.right = a0(u.right, s.right), s.bottom = a0(u.bottom, s.bottom), s.left = ru(u.left, s.left), s; }, _L(e, a)); return i.width = i.right - i.left, i.height = i.bottom - i.top, i.x = i.left, i.y = i.top, i; } function XH(e) { var t = e.reference, n = e.element, r = e.placement, o = r ? pi(r) : null, a = r ? td(r) : null, i = t.x + t.width / 2 - n.width / 2, s = t.y + t.height / 2 - n.height / 2, l; switch (o) { case xo: l = { x: i, y: t.y - n.height }; break; case fa: l = { x: i, y: t.y + t.height }; break; case ha: l = { x: t.x + t.width, y: s }; break; case ko: l = { x: t.x - n.width, y: s }; break; default: l = { x: t.x, y: t.y }; } var u = o ? CE(o) : null; if (u != null) { var c = u === "y" ? "height" : "width"; switch (a) { case Zc: l[u] = l[u] - (t[c] / 2 - n[c] / 2); break; case kf: l[u] = l[u] + (t[c] / 2 - n[c] / 2); break; } } return l; } function Cf(e, t) { t === void 0 && (t = {}); var n = t, r = n.placement, o = r === void 0 ? e.placement : r, a = n.boundary, i = a === void 0 ? v6e : a, s = n.rootBoundary, l = s === void 0 ? jH : s, u = n.elementContext, c = u === void 0 ? sp : u, d = n.altBoundary, p = d === void 0 ? !1 : d, h = n.padding, f = h === void 0 ? 0 : h, v = qH(typeof f != "number" ? f : KH(f, yh)), m = c === sp ? g6e : sp, g = e.rects.popper, b = e.elements[p ? m : c], x = K6e(Jc(b) ? b : b.contextElement || Sl(e.elements.popper), i, l), w = ed(e.elements.reference), k = XH({ reference: w, element: g, strategy: "absolute", placement: o }), C = b_(Object.assign({}, g, k)), _ = c === sp ? C : w, $ = { top: x.top - _.top + v.top, bottom: _.bottom - x.bottom + v.bottom, left: x.left - _.left + v.left, right: _.right - x.right + v.right }, O = e.modifiersData.offset; if (c === sp && O) { var F = O[o]; Object.keys($).forEach(function(A) { var T = [ha, fa].indexOf(A) >= 0 ? 1 : -1, R = [xo, fa].indexOf(A) >= 0 ? "y" : "x"; $[A] += F[R] * T; }); } return $; } function G6e(e, t) { t === void 0 && (t = {}); var n = t, r = n.placement, o = n.boundary, a = n.rootBoundary, i = n.padding, s = n.flipVariations, l = n.allowedAutoPlacements, u = l === void 0 ? bh : l, c = td(r), d = c ? s ? wL : wL.filter(function(f) { return td(f) === c; }) : yh, p = d.filter(function(f) { return u.indexOf(f) >= 0; }); p.length === 0 && (p = d); var h = p.reduce(function(f, v) { return f[v] = Cf(e, { placement: v, boundary: o, rootBoundary: a, padding: i })[pi(v)], f; }, {}); return Object.keys(h).sort(function(f, v) { return h[f] - h[v]; }); } function W6e(e) { if (pi(e) === wE) return []; var t = ug(e); return [CL(e), t, CL(t)]; } function Y6e(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, i = n.altAxis, s = i === void 0 ? !0 : i, l = n.fallbackPlacements, u = n.padding, c = n.boundary, d = n.rootBoundary, p = n.altBoundary, h = n.flipVariations, f = h === void 0 ? !0 : h, v = n.allowedAutoPlacements, m = t.options.placement, g = pi(m), b = g === m, x = l || (b || !f ? [ug(m)] : W6e(m)), w = [m].concat(x).reduce(function(te, oe) { return te.concat(pi(oe) === wE ? G6e(t, { placement: oe, boundary: c, rootBoundary: d, padding: u, flipVariations: f, allowedAutoPlacements: v }) : oe); }, []), k = t.rects.reference, C = t.rects.popper, _ = /* @__PURE__ */ new Map(), $ = !0, O = w[0], F = 0; F < w.length; F++) { var A = w[F], T = pi(A), R = td(A) === Zc, M = [xo, fa].indexOf(T) >= 0, j = M ? "width" : "height", P = Cf(t, { placement: A, boundary: c, rootBoundary: d, altBoundary: p, padding: u }), V = M ? R ? ha : ko : R ? fa : xo; k[j] > C[j] && (V = ug(V)); var U = ug(V), G = []; if (a && G.push(P[T] <= 0), s && G.push(P[V] <= 0, P[U] <= 0), G.every(function(te) { return te; })) { O = A, $ = !1; break; } _.set(A, G); } if ($) for (var se = f ? 3 : 1, ae = function(te) { var oe = w.find(function(ne) { var ee = _.get(ne); if (ee) return ee.slice(0, te).every(function(Z) { return Z; }); }); if (oe) return O = oe, "break"; }, de = se; de > 0; de--) { var me = ae(de); if (me === "break") break; } t.placement !== O && (t.modifiersData[r]._skip = !0, t.placement = O, t.reset = !0); } } var X6e = { name: "flip", enabled: !0, phase: "main", fn: Y6e, requiresIfExists: ["offset"], data: { _skip: !1 } }; function SL(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 $L(e) { return [xo, ha, fa, ko].some(function(t) { return e[t] >= 0; }); } function Z6e(e) { var t = e.state, n = e.name, r = t.rects.reference, o = t.rects.popper, a = t.modifiersData.preventOverflow, i = Cf(t, { elementContext: "reference" }), s = Cf(t, { altBoundary: !0 }), l = SL(i, r), u = SL(s, o, a), c = $L(l), d = $L(u); t.modifiersData[n] = { referenceClippingOffsets: l, popperEscapeOffsets: u, isReferenceHidden: c, hasPopperEscaped: d }, t.attributes.popper = Object.assign({}, t.attributes.popper, { "data-popper-reference-hidden": c, "data-popper-escaped": d }); } var J6e = { name: "hide", enabled: !0, phase: "main", requiresIfExists: ["preventOverflow"], fn: Z6e }; function Q6e(e, t, n) { var r = pi(e), o = [ko, xo].indexOf(r) >= 0 ? -1 : 1, a = typeof n == "function" ? n(Object.assign({}, t, { placement: e })) : n, i = a[0], s = a[1]; return i = i || 0, s = (s || 0) * o, [ko, ha].indexOf(r) >= 0 ? { x: s, y: i } : { x: i, y: s }; } function eIe(e) { var t = e.state, n = e.options, r = e.name, o = n.offset, a = o === void 0 ? [0, 0] : o, i = bh.reduce(function(c, d) { return c[d] = Q6e(d, t.rects, a), c; }, {}), s = i[t.placement], l = s.x, u = s.y; t.modifiersData.popperOffsets != null && (t.modifiersData.popperOffsets.x += l, t.modifiersData.popperOffsets.y += u), t.modifiersData[r] = i; } var tIe = { name: "offset", enabled: !0, phase: "main", requires: ["popperOffsets"], fn: eIe }; function nIe(e) { var t = e.state, n = e.name; t.modifiersData[n] = XH({ reference: t.rects.reference, element: t.rects.popper, strategy: "absolute", placement: t.placement }); } var ZH = { name: "popperOffsets", enabled: !0, phase: "read", fn: nIe, data: {} }; function rIe(e) { return e === "x" ? "y" : "x"; } function oIe(e) { var t = e.state, n = e.options, r = e.name, o = n.mainAxis, a = o === void 0 ? !0 : o, i = n.altAxis, s = i === void 0 ? !1 : i, l = n.boundary, u = n.rootBoundary, c = n.altBoundary, d = n.padding, p = n.tether, h = p === void 0 ? !0 : p, f = n.tetherOffset, v = f === void 0 ? 0 : f, m = Cf(t, { boundary: l, rootBoundary: u, padding: d, altBoundary: c }), g = pi(t.placement), b = td(t.placement), x = !b, w = CE(g), k = rIe(w), C = t.modifiersData.popperOffsets, _ = t.rects.reference, $ = t.rects.popper, O = typeof v == "function" ? v(Object.assign({}, t.rects, { placement: t.placement })) : v, F = typeof O == "number" ? { mainAxis: O, altAxis: O } : Object.assign({ mainAxis: 0, altAxis: 0 }, O), A = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, T = { x: 0, y: 0 }; if (C) { if (a) { var R, M = w === "y" ? xo : ko, j = w === "y" ? fa : ha, P = w === "y" ? "height" : "width", V = C[w], U = V + m[M], G = V - m[j], se = h ? -$[P] / 2 : 0, ae = b === Zc ? _[P] : $[P], de = b === Zc ? -$[P] : -_[P], me = t.elements.arrow, te = h && me ? kE(me) : { width: 0, height: 0 }, oe = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : UH(), ne = oe[M], ee = oe[j], Z = Np(0, _[P], te[P]), le = x ? _[P] / 2 - se - Z - ne - F.mainAxis : ae - Z - ne - F.mainAxis, pe = x ? -_[P] / 2 + se + Z + ee + F.mainAxis : de + Z + ee + F.mainAxis, ke = t.elements.arrow && wh(t.elements.arrow), Ne = ke ? w === "y" ? ke.clientTop || 0 : ke.clientLeft || 0 : 0, De = (R = A == null ? void 0 : A[w]) != null ? R : 0, _e = V + le - De - Ne, Fe = V + pe - De, Ie = Np(h ? a0(U, _e) : U, V, h ? ru(G, Fe) : G); C[w] = Ie, T[w] = Ie - V; } if (s) { var Ae, qe = w === "x" ? xo : ko, et = w === "x" ? fa : ha, He = C[k], ot = k === "y" ? "height" : "width", tt = He + m[qe], Qe = He - m[et], I = [xo, ko].indexOf(g) !== -1, Y = (Ae = A == null ? void 0 : A[k]) != null ? Ae : 0, ve = I ? tt : He - _[ot] - $[ot] - Y + F.altAxis, we = I ? He + _[ot] + $[ot] - Y - F.altAxis : Qe, ye = h && I ? A6e(ve, He, we) : Np(h ? ve : tt, He, h ? we : Qe); C[k] = ye, T[k] = ye - He; } t.modifiersData[r] = T; } } var aIe = { name: "preventOverflow", enabled: !0, phase: "main", fn: oIe, requiresIfExists: ["offset"] }; function iIe(e) { return { scrollLeft: e.scrollLeft, scrollTop: e.scrollTop }; } function sIe(e) { return e === Ya(e) || !ta(e) ? _E(e) : iIe(e); } function lIe(e) { var t = e.getBoundingClientRect(), n = Qc(t.width) / e.offsetWidth || 1, r = Qc(t.height) / e.offsetHeight || 1; return n !== 1 || r !== 1; } function uIe(e, t, n) { n === void 0 && (n = !1); var r = ta(t), o = ta(t) && lIe(t), a = Sl(t), i = ed(e, o), s = { scrollLeft: 0, scrollTop: 0 }, l = { x: 0, y: 0 }; return (r || !r && !n) && ((wi(t) !== "body" || $E(a)) && (s = sIe(t)), ta(t) ? (l = ed(t, !0), l.x += t.clientLeft, l.y += t.clientTop) : a && (l.x = SE(a))), { x: i.left + s.scrollLeft - l.x, y: i.top + s.scrollTop - l.y, width: i.width, height: i.height }; } function cIe(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 i = [].concat(a.requires || [], a.requiresIfExists || []); i.forEach(function(s) { if (!n.has(s)) { var l = t.get(s); l && o(l); } }), r.push(a); } return e.forEach(function(a) { n.has(a.name) || o(a); }), r; } function dIe(e) { var t = cIe(e); return $6e.reduce(function(n, r) { return n.concat(t.filter(function(o) { return o.phase === r; })); }, []); } function pIe(e) { var t; return function() { return t || (t = new Promise(function(n) { Promise.resolve().then(function() { t = void 0, n(e()); }); })), t; }; } function fIe(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 EL = { placement: "bottom", modifiers: [], strategy: "absolute" }; function OL() { 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 EE(e) { e === void 0 && (e = {}); var t = e, n = t.defaultModifiers, r = n === void 0 ? [] : n, o = t.defaultOptions, a = o === void 0 ? EL : o; return function(i, s, l) { l === void 0 && (l = a); var u = { placement: "bottom", orderedModifiers: [], options: Object.assign({}, EL, a), modifiersData: {}, elements: { reference: i, popper: s }, attributes: {}, styles: {} }, c = [], d = !1, p = { state: u, setOptions: function(v) { var m = typeof v == "function" ? v(u.options) : v; f(), u.options = Object.assign({}, a, u.options, m), u.scrollParents = { reference: Jc(i) ? Mp(i) : i.contextElement ? Mp(i.contextElement) : [], popper: Mp(s) }; var g = dIe(fIe([].concat(r, u.options.modifiers))); return u.orderedModifiers = g.filter(function(b) { return b.enabled; }), h(), p.update(); }, forceUpdate: function() { if (!d) { var v = u.elements, m = v.reference, g = v.popper; if (OL(m, g)) { u.rects = { reference: uIe(m, wh(g), u.options.strategy === "fixed"), popper: kE(g) }, u.reset = !1, u.placement = u.options.placement, u.orderedModifiers.forEach(function($) { return u.modifiersData[$.name] = Object.assign({}, $.data); }); for (var b = 0; b < u.orderedModifiers.length; b++) { if (u.reset === !0) { u.reset = !1, b = -1; continue; } var x = u.orderedModifiers[b], w = x.fn, k = x.options, C = k === void 0 ? {} : k, _ = x.name; typeof w == "function" && (u = w({ state: u, options: C, name: _, instance: p }) || u); } } } }, update: pIe(function() { return new Promise(function(v) { p.forceUpdate(), v(u); }); }), destroy: function() { f(), d = !0; } }; if (!OL(i, s)) return p; p.setOptions(l).then(function(v) { !d && l.onFirstUpdate && l.onFirstUpdate(v); }); function h() { u.orderedModifiers.forEach(function(v) { var m = v.name, g = v.options, b = g === void 0 ? {} : g, x = v.effect; if (typeof x == "function") { var w = x({ state: u, name: m, instance: p, options: b }), k = function() { }; c.push(w || k); } }); } function f() { c.forEach(function(v) { return v(); }), c = []; } return p; }; } EE(); var hIe = [WH, ZH, GH, VH]; EE({ defaultModifiers: hIe }); var vIe = [WH, ZH, GH, VH, tIe, X6e, aIe, R6e, J6e], gIe = EE({ defaultModifiers: vIe }); const mIe = (e, t, n = {}) => { const r = { name: "updateState", enabled: !0, phase: "write", fn: ({ state: l }) => { const u = yIe(l); Object.assign(i.value, u); }, requires: ["computeStyles"] }, o = E(() => { const { onFirstUpdate: l, placement: u, strategy: c, modifiers: d } = y(n); return { onFirstUpdate: l, placement: u || "bottom", strategy: c || "absolute", modifiers: [ ...d || [], r, { name: "applyStyles", enabled: !1 } ] }; }), a = En(), i = z({ styles: { popper: { position: y(o).strategy, left: "0", top: "0" }, arrow: { position: "absolute" } }, attributes: {} }), s = () => { a.value && (a.value.destroy(), a.value = void 0); }; return he(o, (l) => { const u = y(a); u && u.setOptions(l); }, { deep: !0 }), he([e, t], ([l, u]) => { s(), !(!l || !u) && (a.value = gIe(l, u, y(o))); }), Tt(() => { s(); }), { state: E(() => { var l; return { ...((l = y(a)) == null ? void 0 : l.state) || {} }; }), styles: E(() => y(i).styles), attributes: E(() => y(i).attributes), update: () => { var l; return (l = y(a)) == null ? void 0 : l.update(); }, forceUpdate: () => { var l; return (l = y(a)) == null ? void 0 : l.forceUpdate(); }, instanceRef: E(() => y(a)) }; }; function yIe(e) { const t = Object.keys(e.elements), n = o0(t.map((o) => [o, e.styles[o] || {}])), r = o0(t.map((o) => [o, e.attributes[o]])); return { styles: n, attributes: r }; } const bIe = (e) => { if (!e) return { onClick: Qi, onMousedown: Qi, onMouseup: Qi }; let t = !1, n = !1; return { onClick: (r) => { t && n && e(r), t = n = !1; }, onMousedown: (r) => { t = r.target === r.currentTarget; }, onMouseup: (r) => { n = r.target === r.currentTarget; } }; }; function FL() { let e; const t = (r, o) => { n(), e = window.setTimeout(r, o); }, n = () => window.clearTimeout(e); return hh(() => n()), { registerTimeout: t, cancelTimeout: n }; } const w_ = { prefix: Math.floor(Math.random() * 1e4), current: 0 }, wIe = Symbol("elIdInjection"), JH = () => st() ? be(wIe, w_) : w_, xi = (e) => { const t = JH(); !pn && t === w_ && Gn("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 = bE(); return E(() => y(e) || `${n.value}-id-${t.prefix}-${t.current++}`); }; let yc = []; const TL = (e) => { const t = e; t.key === Yt.esc && yc.forEach((n) => n(t)); }, xIe = (e) => { ut(() => { yc.length === 0 && document.addEventListener("keydown", TL), pn && yc.push(e); }), Tt(() => { yc = yc.filter((t) => t !== e), yc.length === 0 && pn && document.removeEventListener("keydown", TL); }); }; let AL; const QH = () => { const e = bE(), t = JH(), n = E(() => `${e.value}-popper-container-${t.prefix}`), r = E(() => `#${n.value}`); return { id: n, selector: r }; }, kIe = (e) => { const t = document.createElement("div"); return t.id = e, document.body.appendChild(t), t; }, CIe = () => { const { id: e, selector: t } = QH(); return C0(() => { pn && (process.env.NODE_ENV === "test" || !AL || !document.body.querySelector(t.value)) && (AL = kIe(e.value)); }), { id: e, selector: t }; }, _Ie = $t({ showAfter: { type: Number, default: 0 }, hideAfter: { type: Number, default: 200 }, autoClose: { type: Number, default: 0 } }), SIe = ({ showAfter: e, hideAfter: t, autoClose: n, open: r, close: o }) => { const { registerTimeout: a } = FL(), { registerTimeout: i, cancelTimeout: s } = FL(); return { onOpen: (l) => { a(() => { r(l); const u = y(n); Wt(u) && u > 0 && i(() => { o(l); }, u); }, y(e)); }, onClose: (l) => { s(), a(() => { o(l); }, y(t)); } }; }, eU = Symbol("elForwardRef"), $Ie = (e) => { nt(eU, { setForwardRef: (t) => { e.value = t; } }); }, EIe = (e) => ({ mounted(t) { e(t); }, updated(t) { e(t); }, unmounted() { e(null); } }), IL = { current: 0 }, PL = z(0), tU = 2e3, LL = Symbol("elZIndexContextKey"), nU = Symbol("zIndexContextKey"), OE = (e) => { const t = st() ? be(LL, IL) : IL, n = e || (st() ? be(nU, void 0) : void 0), r = E(() => { const i = y(n); return Wt(i) ? i : tU; }), o = E(() => r.value + PL.value), a = () => (t.current++, PL.value = t.current, o.value); return !pn && !be(LL) && Gn("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 OIe(e) { let t; function n() { if (e.value == null) return; const { selectionStart: o, selectionEnd: a, value: i } = e.value; if (o == null || a == null) return; const s = i.slice(0, Math.max(0, o)), l = i.slice(Math.max(0, a)); t = { selectionStart: o, selectionEnd: a, value: i, beforeTxt: s, afterTxt: l }; } function r() { if (e.value == null || t == null) return; const { value: o } = e.value, { beforeTxt: a, afterTxt: i, selectionStart: s } = t; if (a == null || i == null || s == null) return; let l = o.length; if (o.endsWith(i)) l = o.length - i.length; else if (o.startsWith(a)) l = a.length; else { const u = a[s - 1], c = o.indexOf(u, s - 1); c !== -1 && (l = c + 1); } e.value.setSelectionRange(l, l); } return [n, r]; } const Ii = e1({ type: String, values: t1, required: !1 }), rU = Symbol("size"), oU = () => { const e = be(rU, {}); return E(() => y(e.size) || ""); }; function aU(e, { beforeFocus: t, afterFocus: n, beforeBlur: r, afterBlur: o } = {}) { const a = st(), { emit: i } = a, s = En(), l = z(!1), u = (p) => { Rn(t) && t(p) || l.value || (l.value = !0, i("focus", p), n == null || n()); }, c = (p) => { var h; Rn(r) && r(p) || p.relatedTarget && (h = s.value) != null && h.contains(p.relatedTarget) || (l.value = !1, i("blur", p), o == null || o()); }, d = () => { var p, h; (p = s.value) != null && p.contains(document.activeElement) && s.value !== document.activeElement || (h = e.value) == null || h.focus(); }; return he(s, (p) => { p && p.setAttribute("tabindex", "-1"); }), No(s, "focus", u, !0), No(s, "blur", c, !0), No(s, "click", d, !0), process.env.NODE_ENV === "test" && ut(() => { const p = Zs(e.value) ? e.value : document.querySelector("input,textarea"); p && (No(p, "focus", u, !0), No(p, "blur", c, !0)); }), { isFocused: l, wrapperRef: s, handleFocus: u, handleBlur: c }; } function FE({ afterComposition: e, emit: t }) { const n = z(!1), r = (i) => { t == null || t("compositionstart", i), n.value = !0; }, o = (i) => { var s; t == null || t("compositionupdate", i); const l = (s = i.target) == null ? void 0 : s.value, u = l[l.length - 1] || ""; n.value = !n6e(u); }, a = (i) => { t == null || t("compositionend", i), n.value && (n.value = !1, Ke(() => e(i))); }; return { isComposing: n, handleComposition: (i) => { i.type === "compositionend" ? a(i) : o(i); }, handleCompositionStart: r, handleCompositionUpdate: o, handleCompositionEnd: a }; } const iU = Symbol("emptyValuesContextKey"), FIe = "use-empty-values", TIe = ["", void 0, null], AIe = void 0, TE = $t({ emptyValues: Array, valueOnClear: { type: [String, Number, Boolean, Function], default: void 0, validator: (e) => Rn(e) ? !e() : !e } }), sU = (e, t) => { const n = st() ? be(iU, z({})) : z({}), r = E(() => e.emptyValues || n.value.emptyValues || TIe), o = E(() => Rn(e.valueOnClear) ? e.valueOnClear() : e.valueOnClear !== void 0 ? e.valueOnClear : Rn(n.value.valueOnClear) ? n.value.valueOnClear() : n.value.valueOnClear !== void 0 ? n.value.valueOnClear : AIe), a = (i) => r.value.includes(i); return r.value.includes(o.value) || Gn(FIe, "value-on-clear should be a value of empty-values"), { emptyValues: r, valueOnClear: o, isEmptyValue: a }; }, IIe = $t({ ariaLabel: String, ariaOrientation: { type: String, values: ["horizontal", "vertical", "undefined"] }, ariaControls: String }), $l = (e) => TH(IIe, e), lU = Symbol(), i0 = z(); function r1(e, t = void 0) { const n = st() ? be(lU, i0) : i0; return e ? E(() => { var r, o; return (o = (r = n.value) == null ? void 0 : r[e]) != null ? o : t; }) : n; } function uU(e, t) { const n = r1(), r = wt(e, E(() => { var s; return ((s = n.value) == null ? void 0 : s.namespace) || Rp; })), o = Ho(E(() => { var s; return (s = n.value) == null ? void 0 : s.locale; })), a = OE(E(() => { var s; return ((s = n.value) == null ? void 0 : s.zIndex) || tU; })), i = E(() => { var s; return y(t) || ((s = n.value) == null ? void 0 : s.size) || ""; }); return cU(E(() => y(n) || {})), { ns: r, locale: o, zIndex: a, size: i }; } const cU = (e, t, n = !1) => { var r; const o = !!st(), a = o ? r1() : void 0, i = (r = void 0) != null ? r : o ? nt : void 0; if (!i) { Gn("provideGlobalConfig", "provideGlobalConfig() can only be used inside setup()."); return; } const s = E(() => { const l = y(e); return a != null && a.value ? PIe(a.value, l) : l; }); return i(lU, s), i(DH, E(() => s.value.locale)), i(BH, E(() => s.value.namespace)), i(nU, E(() => s.value.zIndex)), i(rU, { size: E(() => s.value.size || "") }), i(iU, E(() => ({ emptyValues: s.value.emptyValues, valueOnClear: s.value.valueOnClear }))), (n || !i0.value) && (i0.value = s.value), s; }, PIe = (e, t) => { const n = [.../* @__PURE__ */ new Set([...vL(e), ...vL(t)])], r = {}; for (const o of n) r[o] = t[o] !== void 0 ? t[o] : e[o]; return r; }, LIe = $t({ a11y: { type: Boolean, default: !0 }, locale: { type: at(Object) }, size: Ii, button: { type: at(Object) }, experimentalFeatures: { type: at(Object) }, keyboardNavigation: { type: Boolean, default: !0 }, message: { type: at(Object) }, zIndex: Number, namespace: { type: String, default: "el" }, ...TE }), Ia = {}; W({ name: "ElConfigProvider", props: LIe, setup(e, { slots: t }) { he(() => e.message, (r) => { Object.assign(Ia, r ?? {}); }, { immediate: !0, deep: !0 }); const n = cU(e); return () => ue(t, "default", { config: n == null ? void 0 : n.value }); } }); var vt = (e, t) => { const n = e.__vccOpts || e; for (const [r, o] of t) n[r] = o; return n; }; const RIe = $t({ size: { type: at([Number, String]) }, color: { type: String } }), NIe = W({ name: "ElIcon", inheritAttrs: !1 }), MIe = /* @__PURE__ */ W({ ...NIe, props: RIe, setup(e) { const t = e, n = wt("icon"), r = E(() => { const { size: o, color: a } = t; return !o && !a ? {} : { fontSize: Xi(o) ? void 0 : as(o), "--color": a }; }); return (o, a) => (S(), L("i", Et({ class: y(n).b(), style: y(r) }, o.$attrs), [ ue(o.$slots, "default") ], 16)); } }); var DIe = /* @__PURE__ */ vt(MIe, [["__file", "icon.vue"]]); const Qt = Kn(DIe), AE = Symbol("formContextKey"), s0 = Symbol("formItemContextKey"), ss = (e, t = {}) => { const n = z(void 0), r = t.prop ? n : zH("size"), o = t.global ? n : oU(), a = t.form ? { size: void 0 } : be(AE, void 0), i = t.formItem ? { size: void 0 } : be(s0, void 0); return E(() => r.value || y(e) || (i == null ? void 0 : i.size) || (a == null ? void 0 : a.size) || o.value || ""); }, xh = (e) => { const t = zH("disabled"), n = be(AE, void 0); return E(() => t.value || y(e) || (n == null ? void 0 : n.disabled) || !1); }, El = () => { const e = be(AE, void 0), t = be(s0, void 0); return { form: e, formItem: t }; }, kh = (e, { formItemContext: t, disableIdGeneration: n, disableIdManagement: r }) => { n || (n = z(!1)), r || (r = z(!1)); const o = z(); let a; const i = E(() => { var s; return !!(!(e.label || e.ariaLabel) && t && t.inputIds && ((s = t.inputIds) == null ? void 0 : s.length) <= 1); }); return ut(() => { a = he([St(e, "id"), n], ([s, l]) => { const u = s ?? (l ? void 0 : xi().value); u !== o.value && (t != null && t.removeInputId && (o.value && t.removeInputId(o.value), !(r != null && r.value) && !l && u && t.addInputId(u)), o.value = u); }, { immediate: !0 }); }), W_(() => { a && a(), t != null && t.removeInputId && o.value && t.removeInputId(o.value); }), { isLabeledByFormItem: i, inputId: o }; }; let _a; const BIe = ` height:0 !important; visibility:hidden !important; ${z4e() ? "" : "overflow:hidden !important;"} position:absolute !important; z-index:-1000 !important; top:0 !important; right:0 !important; `, zIe = [ "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 jIe(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: zIe.map((a) => `${a}:${t.getPropertyValue(a)}`).join(";"), paddingSize: r, borderSize: o, boxSizing: n }; } function RL(e, t = 1, n) { var r; _a || (_a = document.createElement("textarea"), document.body.appendChild(_a)); const { paddingSize: o, borderSize: a, boxSizing: i, contextStyle: s } = jIe(e); _a.setAttribute("style", `${s};${BIe}`), _a.value = e.value || e.placeholder || ""; let l = _a.scrollHeight; const u = {}; i === "border-box" ? l = l + a : i === "content-box" && (l = l - o), _a.value = ""; const c = _a.scrollHeight - o; if (Wt(t)) { let d = c * t; i === "border-box" && (d = d + o + a), l = Math.max(d, l), u.minHeight = `${d}px`; } if (Wt(n)) { let d = c * n; i === "border-box" && (d = d + o + a), l = Math.min(d, l); } return u.height = `${l}px`, (r = _a.parentNode) == null || r.removeChild(_a), _a = void 0, u; } const VIe = $t({ id: { type: String, default: void 0 }, size: Ii, disabled: Boolean, modelValue: { type: at([ 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: at([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: zo }, prefixIcon: { type: zo }, containerRole: { type: String, default: void 0 }, tabindex: { type: [String, Number], default: 0 }, validateEvent: { type: Boolean, default: !0 }, inputStyle: { type: at([Object, Array, String]), default: () => Gi({}) }, autofocus: Boolean, rows: { type: Number, default: 2 }, ...$l(["ariaLabel"]) }), HIe = { [Hn]: (e) => Yr(e), input: (e) => Yr(e), change: (e) => Yr(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 }, UIe = W({ name: "ElInput", inheritAttrs: !1 }), qIe = /* @__PURE__ */ W({ ...UIe, props: VIe, emits: HIe, setup(e, { expose: t, emit: n }) { const r = e, o = Rf(), a = Dr(), i = E(() => { const I = {}; return r.containerRole === "combobox" && (I["aria-haspopup"] = o["aria-haspopup"], I["aria-owns"] = o["aria-owns"], I["aria-expanded"] = o["aria-expanded"]), I; }), s = E(() => [ r.type === "textarea" ? m.b() : v.b(), v.m(h.value), v.is("disabled", f.value), v.is("exceed", me.value), { [v.b("group")]: a.prepend || a.append, [v.m("prefix")]: a.prefix || r.prefixIcon, [v.m("suffix")]: a.suffix || r.suffixIcon || r.clearable || r.showPassword, [v.bm("suffix", "password-clear")]: G.value && se.value, [v.b("hidden")]: r.type === "hidden" }, o.class ]), l = E(() => [ v.e("wrapper"), v.is("focus", O.value) ]), u = a6e({ excludeKeys: E(() => Object.keys(i.value)) }), { form: c, formItem: d } = El(), { inputId: p } = kh(r, { formItemContext: d }), h = ss(), f = xh(), v = wt("input"), m = wt("textarea"), g = En(), b = En(), x = z(!1), w = z(!1), k = z(), C = En(r.inputStyle), _ = E(() => g.value || b.value), { wrapperRef: $, isFocused: O, handleFocus: F, handleBlur: A } = aU(_, { beforeFocus() { return f.value; }, afterBlur() { var I; r.validateEvent && ((I = d == null ? void 0 : d.validate) == null || I.call(d, "blur").catch((Y) => Gn(Y))); } }), T = E(() => { var I; return (I = c == null ? void 0 : c.statusIcon) != null ? I : !1; }), R = E(() => (d == null ? void 0 : d.validateState) || ""), M = E(() => R.value && NH[R.value]), j = E(() => w.value ? z0 : lS), P = E(() => [ o.style ]), V = E(() => [ r.inputStyle, C.value, { resize: r.resize } ]), U = E(() => mh(r.modelValue) ? "" : String(r.modelValue)), G = E(() => r.clearable && !f.value && !r.readonly && !!U.value && (O.value || x.value)), se = E(() => r.showPassword && !f.value && !r.readonly && !!U.value && (!!U.value || O.value)), ae = E(() => r.showWordLimit && !!r.maxlength && (r.type === "text" || r.type === "textarea") && !f.value && !r.readonly && !r.showPassword), de = E(() => U.value.length), me = E(() => !!ae.value && de.value > Number(r.maxlength)), te = E(() => !!a.suffix || !!r.suffixIcon || G.value || r.showPassword || ae.value || !!R.value && T.value), [oe, ne] = OIe(g); Ra(b, (I) => { if (Z(), !ae.value || r.resize !== "both") return; const Y = I[0], { width: ve } = Y.contentRect; k.value = { right: `calc(100% - ${ve + 15 + 6}px)` }; }); const ee = () => { const { type: I, autosize: Y } = r; if (!(!pn || I !== "textarea" || !b.value)) if (Y) { const ve = br(Y) ? Y.minRows : void 0, we = br(Y) ? Y.maxRows : void 0, ye = RL(b.value, ve, we); C.value = { overflowY: "hidden", ...ye }, Ke(() => { b.value.offsetHeight, C.value = ye; }); } else C.value = { minHeight: RL(b.value).minHeight }; }, Z = /* @__PURE__ */ ((I) => { let Y = !1; return () => { var ve; Y || !r.autosize || ((ve = b.value) == null ? void 0 : ve.offsetParent) === null || (I(), Y = !0); }; })(ee), le = () => { const I = _.value, Y = r.formatter ? r.formatter(U.value) : U.value; !I || I.value === Y || (I.value = Y); }, pe = async (I) => { oe(); let { value: Y } = I.target; if (r.formatter && (Y = r.parser ? r.parser(Y) : Y), !Ne.value) { if (Y === U.value) { le(); return; } n(Hn, Y), n("input", Y), await Ke(), le(), ne(); } }, ke = (I) => { n("change", I.target.value); }, { isComposing: Ne, handleCompositionStart: De, handleCompositionUpdate: _e, handleCompositionEnd: Fe } = FE({ emit: n, afterComposition: pe }), Ie = () => { w.value = !w.value, Ae(); }, Ae = async () => { var I; await Ke(), (I = _.value) == null || I.focus(); }, qe = () => { var I; return (I = _.value) == null ? void 0 : I.blur(); }, et = (I) => { x.value = !1, n("mouseleave", I); }, He = (I) => { x.value = !0, n("mouseenter", I); }, ot = (I) => { n("keydown", I); }, tt = () => { var I; (I = _.value) == null || I.select(); }, Qe = () => { n(Hn, ""), n("change", ""), n("clear"), n("input", ""); }; return he(() => r.modelValue, () => { var I; Ke(() => ee()), r.validateEvent && ((I = d == null ? void 0 : d.validate) == null || I.call(d, "change").catch((Y) => Gn(Y))); }), he(U, () => le()), he(() => r.type, async () => { await Ke(), le(), ee(); }), ut(() => { !r.formatter && r.parser && Gn("ElInput", "If you set the parser, you also need to set the formatter."), le(), Ke(ee); }), t({ input: g, textarea: b, ref: _, textareaStyle: V, autosize: St(r, "autosize"), isComposing: Ne, focus: Ae, blur: qe, select: tt, clear: Qe, resizeTextarea: ee }), (I, Y) => (S(), L("div", Et(y(i), { class: [ y(s), { [y(v).bm("group", "append")]: I.$slots.append, [y(v).bm("group", "prepend")]: I.$slots.prepend } ], style: y(P), role: I.containerRole, onMouseenter: He, onMouseleave: et }), [ J(" input "), I.type !== "textarea" ? (S(), L(Re, { key: 0 }, [ J(" prepend slot "), I.$slots.prepend ? (S(), L("div", { key: 0, class: H(y(v).be("group", "prepend")) }, [ ue(I.$slots, "prepend") ], 2)) : J("v-if", !0), D("div", { ref_key: "wrapperRef", ref: $, class: H(y(l)) }, [ J(" prefix slot "), I.$slots.prefix || I.prefixIcon ? (S(), L("span", { key: 0, class: H(y(v).e("prefix")) }, [ D("span", { class: H(y(v).e("prefix-inner")) }, [ ue(I.$slots, "prefix"), I.prefixIcon ? (S(), re(y(Qt), { key: 0, class: H(y(v).e("icon")) }, { default: N(() => [ (S(), re(yt(I.prefixIcon))) ]), _: 1 }, 8, ["class"])) : J("v-if", !0) ], 2) ], 2)) : J("v-if", !0), D("input", Et({ id: y(p), ref_key: "input", ref: g, class: y(v).e("inner") }, y(u), { minlength: I.minlength, maxlength: I.maxlength, type: I.showPassword ? w.value ? "text" : "password" : I.type, disabled: y(f), readonly: I.readonly, autocomplete: I.autocomplete, tabindex: I.tabindex, "aria-label": I.ariaLabel, placeholder: I.placeholder, style: I.inputStyle, form: I.form, autofocus: I.autofocus, onCompositionstart: y(De), onCompositionupdate: y(_e), onCompositionend: y(Fe), onInput: pe, onChange: ke, onKeydown: ot }), null, 16, ["id", "minlength", "maxlength", "type", "disabled", "readonly", "autocomplete", "tabindex", "aria-label", "placeholder", "form", "autofocus", "onCompositionstart", "onCompositionupdate", "onCompositionend"]), J(" suffix slot "), y(te) ? (S(), L("span", { key: 1, class: H(y(v).e("suffix")) }, [ D("span", { class: H(y(v).e("suffix-inner")) }, [ !y(G) || !y(se) || !y(ae) ? (S(), L(Re, { key: 0 }, [ ue(I.$slots, "suffix"), I.suffixIcon ? (S(), re(y(Qt), { key: 0, class: H(y(v).e("icon")) }, { default: N(() => [ (S(), re(yt(I.suffixIcon))) ]), _: 1 }, 8, ["class"])) : J("v-if", !0) ], 64)) : J("v-if", !0), y(G) ? (S(), re(y(Qt), { key: 1, class: H([y(v).e("icon"), y(v).e("clear")]), onMousedown: Ge(y(Qi), ["prevent"]), onClick: Qe }, { default: N(() => [ q(y($i)) ]), _: 1 }, 8, ["class", "onMousedown"])) : J("v-if", !0), y(se) ? (S(), re(y(Qt), { key: 2, class: H([y(v).e("icon"), y(v).e("password")]), onClick: Ie }, { default: N(() => [ (S(), re(yt(y(j)))) ]), _: 1 }, 8, ["class"])) : J("v-if", !0), y(ae) ? (S(), L("span", { key: 3, class: H(y(v).e("count")) }, [ D("span", { class: H(y(v).e("count-inner")) }, ge(y(de)) + " / " + ge(I.maxlength), 3) ], 2)) : J("v-if", !0), y(R) && y(M) && y(T) ? (S(), re(y(Qt), { key: 4, class: H([ y(v).e("icon"), y(v).e("validateIcon"), y(v).is("loading", y(R) === "validating") ]) }, { default: N(() => [ (S(), re(yt(y(M)))) ]), _: 1 }, 8, ["class"])) : J("v-if", !0) ], 2) ], 2)) : J("v-if", !0) ], 2), J(" append slot "), I.$slots.append ? (S(), L("div", { key: 1, class: H(y(v).be("group", "append")) }, [ ue(I.$slots, "append") ], 2)) : J("v-if", !0) ], 64)) : (S(), L(Re, { key: 1 }, [ J(" textarea "), D("textarea", Et({ id: y(p), ref_key: "textarea", ref: b, class: [y(m).e("inner"), y(v).is("focus", y(O))] }, y(u), { minlength: I.minlength, maxlength: I.maxlength, tabindex: I.tabindex, disabled: y(f), readonly: I.readonly, autocomplete: I.autocomplete, style: y(V), "aria-label": I.ariaLabel, placeholder: I.placeholder, form: I.form, autofocus: I.autofocus, rows: I.rows, onCompositionstart: y(De), onCompositionupdate: y(_e), onCompositionend: y(Fe), onInput: pe, onFocus: y(F), onBlur: y(A), onChange: ke, onKeydown: ot }), null, 16, ["id", "minlength", "maxlength", "tabindex", "disabled", "readonly", "autocomplete", "aria-label", "placeholder", "form", "autofocus", "rows", "onCompositionstart", "onCompositionupdate", "onCompositionend", "onFocus", "onBlur"]), y(ae) ? (S(), L("span", { key: 0, style: Ye(k.value), class: H(y(v).e("count")) }, ge(y(de)) + " / " + ge(I.maxlength), 7)) : J("v-if", !0) ], 64)) ], 16, ["role"])); } }); var KIe = /* @__PURE__ */ vt(qIe, [["__file", "input.vue"]]); const Pd = Kn(KIe), cc = 4, GIe = { 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" } }, WIe = ({ move: e, size: t, bar: n }) => ({ [n.size]: t, transform: `translate${n.axis}(${e}%)` }), IE = Symbol("scrollbarContextKey"), YIe = $t({ vertical: Boolean, size: String, move: Number, ratio: { type: Number, required: !0 }, always: Boolean }), XIe = "Thumb", ZIe = /* @__PURE__ */ W({ __name: "thumb", props: YIe, setup(e) { const t = e, n = be(IE), r = wt("scrollbar"); n || IH(XIe, "can not inject scrollbar context"); const o = z(), a = z(), i = z({}), s = z(!1); let l = !1, u = !1, c = pn ? document.onselectstart : null; const d = E(() => GIe[t.vertical ? "vertical" : "horizontal"]), p = E(() => WIe({ size: t.size, move: t.move, bar: d.value })), h = E(() => o.value[d.value.offset] ** 2 / n.wrapElement[d.value.scrollSize] / t.ratio / a.value[d.value.offset]), f = (C) => { var _; if (C.stopPropagation(), C.ctrlKey || [1, 2].includes(C.button)) return; (_ = window.getSelection()) == null || _.removeAllRanges(), m(C); const $ = C.currentTarget; $ && (i.value[d.value.axis] = $[d.value.offset] - (C[d.value.client] - $.getBoundingClientRect()[d.value.direction])); }, v = (C) => { if (!a.value || !o.value || !n.wrapElement) return; const _ = Math.abs(C.target.getBoundingClientRect()[d.value.direction] - C[d.value.client]), $ = a.value[d.value.offset] / 2, O = (_ - $) * 100 * h.value / o.value[d.value.offset]; n.wrapElement[d.value.scroll] = O * n.wrapElement[d.value.scrollSize] / 100; }, m = (C) => { C.stopImmediatePropagation(), l = !0, document.addEventListener("mousemove", g), document.addEventListener("mouseup", b), c = document.onselectstart, document.onselectstart = () => !1; }, g = (C) => { if (!o.value || !a.value || l === !1) return; const _ = i.value[d.value.axis]; if (!_) return; const $ = (o.value.getBoundingClientRect()[d.value.direction] - C[d.value.client]) * -1, O = a.value[d.value.offset] - _, F = ($ - O) * 100 * h.value / o.value[d.value.offset]; n.wrapElement[d.value.scroll] = F * n.wrapElement[d.value.scrollSize] / 100; }, b = () => { l = !1, i.value[d.value.axis] = 0, document.removeEventListener("mousemove", g), document.removeEventListener("mouseup", b), k(), u && (s.value = !1); }, x = () => { u = !1, s.value = !!t.size; }, w = () => { u = !0, s.value = l; }; Tt(() => { k(), document.removeEventListener("mouseup", b); }); const k = () => { document.onselectstart !== c && (document.onselectstart = c); }; return No(St(n, "scrollbarElement"), "mousemove", x), No(St(n, "scrollbarElement"), "mouseleave", w), (C, _) => (S(), re(nr, { name: y(r).b("fade"), persisted: "" }, { default: N(() => [ Be(D("div", { ref_key: "instance", ref: o, class: H([y(r).e("bar"), y(r).is(y(d).key)]), onMousedown: v }, [ D("div", { ref_key: "thumb", ref: a, class: H(y(r).e("thumb")), style: Ye(y(p)), onMousedown: f }, null, 38) ], 34), [ [ht, C.always || s.value] ]) ]), _: 1 }, 8, ["name"])); } }); var NL = /* @__PURE__ */ vt(ZIe, [["__file", "thumb.vue"]]); const JIe = $t({ always: { type: Boolean, default: !0 }, minSize: { type: Number, required: !0 } }), QIe = /* @__PURE__ */ W({ __name: "bar", props: JIe, setup(e, { expose: t }) { const n = e, r = be(IE), o = z(0), a = z(0), i = z(""), s = z(""), l = z(1), u = z(1); return t({ handleScroll: (c) => { if (c) { const d = c.offsetHeight - cc, p = c.offsetWidth - cc; a.value = c.scrollTop * 100 / d * l.value, o.value = c.scrollLeft * 100 / p * u.value; } }, update: () => { const c = r == null ? void 0 : r.wrapElement; if (!c) return; const d = c.offsetHeight - cc, p = c.offsetWidth - cc, h = d ** 2 / c.scrollHeight, f = p ** 2 / c.scrollWidth, v = Math.max(h, n.minSize), m = Math.max(f, n.minSize); l.value = h / (d - h) / (v / (d - v)), u.value = f / (p - f) / (m / (p - m)), s.value = v + cc < d ? `${v}px` : "", i.value = m + cc < p ? `${m}px` : ""; } }), (c, d) => (S(), L(Re, null, [ q(NL, { move: o.value, ratio: u.value, size: i.value, always: c.always }, null, 8, ["move", "ratio", "size", "always"]), q(NL, { move: a.value, ratio: l.value, size: s.value, vertical: "", always: c.always }, null, 8, ["move", "ratio", "size", "always"]) ], 64)); } }); var ePe = /* @__PURE__ */ vt(QIe, [["__file", "bar.vue"]]); const tPe = $t({ height: { type: [String, Number], default: "" }, maxHeight: { type: [String, Number], default: "" }, native: { type: Boolean, default: !1 }, wrapStyle: { type: at([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, ...$l(["ariaLabel", "ariaOrientation"]) }), nPe = { scroll: ({ scrollTop: e, scrollLeft: t }) => [e, t].every(Wt) }, x_ = "ElScrollbar", rPe = W({ name: x_ }), oPe = /* @__PURE__ */ W({ ...rPe, props: tPe, emits: nPe, setup(e, { expose: t, emit: n }) { const r = e, o = wt("scrollbar"); let a, i, s = 0, l = 0; const u = z(), c = z(), d = z(), p = z(), h = E(() => { const k = {}; return r.height && (k.height = as(r.height)), r.maxHeight && (k.maxHeight = as(r.maxHeight)), [r.wrapStyle, k]; }), f = E(() => [ r.wrapClass, o.e("wrap"), { [o.em("wrap", "hidden-default")]: !r.native } ]), v = E(() => [o.e("view"), r.viewClass]), m = () => { var k; c.value && ((k = p.value) == null || k.handleScroll(c.value), s = c.value.scrollTop, l = c.value.scrollLeft, n("scroll", { scrollTop: c.value.scrollTop, scrollLeft: c.value.scrollLeft })); }; function g(k, C) { br(k) ? c.value.scrollTo(k) : Wt(k) && Wt(C) && c.value.scrollTo(k, C); } const b = (k) => { if (!Wt(k)) { Gn(x_, "value must be a number"); return; } c.value.scrollTop = k; }, x = (k) => { if (!Wt(k)) { Gn(x_, "value must be a number"); return; } c.value.scrollLeft = k; }, w = () => { var k; (k = p.value) == null || k.update(); }; return he(() => r.noresize, (k) => { k ? (a == null || a(), i == null || i()) : ({ stop: a } = Ra(d, w), i = No("resize", w)); }, { immediate: !0 }), he(() => [r.maxHeight, r.height], () => { r.native || Ke(() => { var k; w(), c.value && ((k = p.value) == null || k.handleScroll(c.value)); }); }), nt(IE, en({ scrollbarElement: u, wrapElement: c })), Y_(() => { c.value && (c.value.scrollTop = s, c.value.scrollLeft = l); }), ut(() => { r.native || Ke(() => { w(); }); }), Nf(() => w()), t({ wrapRef: c, update: w, scrollTo: g, setScrollTop: b, setScrollLeft: x, handleScroll: m }), (k, C) => (S(), L("div", { ref_key: "scrollbarRef", ref: u, class: H(y(o).b()) }, [ D("div", { ref_key: "wrapRef", ref: c, class: H(y(f)), style: Ye(y(h)), tabindex: k.tabindex, onScroll: m }, [ (S(), re(yt(k.tag), { id: k.id, ref_key: "resizeRef", ref: d, class: H(y(v)), style: Ye(k.viewStyle), role: k.role, "aria-label": k.ariaLabel, "aria-orientation": k.ariaOrientation }, { default: N(() => [ ue(k.$slots, "default") ]), _: 3 }, 8, ["id", "class", "style", "role", "aria-label", "aria-orientation"])) ], 46, ["tabindex"]), k.native ? J("v-if", !0) : (S(), re(ePe, { key: 0, ref_key: "barRef", ref: p, always: k.always, "min-size": k.minSize }, null, 8, ["always", "min-size"])) ], 2)); } }); var aPe = /* @__PURE__ */ vt(oPe, [["__file", "scrollbar.vue"]]); const o1 = Kn(aPe), PE = Symbol("popper"), dU = Symbol("popperContent"), iPe = [ "dialog", "grid", "group", "listbox", "menu", "navigation", "tooltip", "tree" ], pU = $t({ role: { type: String, values: iPe, default: "tooltip" } }), sPe = W({ name: "ElPopper", inheritAttrs: !1 }), lPe = /* @__PURE__ */ W({ ...sPe, props: pU, setup(e, { expose: t }) { const n = e, r = z(), o = z(), a = z(), i = z(), s = E(() => n.role), l = { triggerRef: r, popperInstanceRef: o, contentRef: a, referenceRef: i, role: s }; return t(l), nt(PE, l), (u, c) => ue(u.$slots, "default"); } }); var uPe = /* @__PURE__ */ vt(lPe, [["__file", "popper.vue"]]); const fU = $t({ arrowOffset: { type: Number, default: 5 } }), cPe = W({ name: "ElPopperArrow", inheritAttrs: !1 }), dPe = /* @__PURE__ */ W({ ...cPe, props: fU, setup(e, { expose: t }) { const n = e, r = wt("popper"), { arrowOffset: o, arrowRef: a, arrowStyle: i } = be(dU, void 0); return he(() => n.arrowOffset, (s) => { o.value = s; }), Tt(() => { a.value = void 0; }), t({ arrowRef: a }), (s, l) => (S(), L("span", { ref_key: "arrowRef", ref: a, class: H(y(r).e("arrow")), style: Ye(y(i)), "data-popper-arrow": "" }, null, 6)); } }); var pPe = /* @__PURE__ */ vt(dPe, [["__file", "arrow.vue"]]); const Vk = "ElOnlyChild", hU = W({ name: Vk, setup(e, { slots: t, attrs: n }) { var r; const o = be(eU), a = EIe((r = o == null ? void 0 : o.setForwardRef) != null ? r : Qi); return () => { var i; const s = (i = t.default) == null ? void 0 : i.call(t, n); if (!s) return null; if (s.length > 1) return Gn(Vk, "requires exact only one valid child."), null; const l = vU(s); return l ? Be(_0(l, n), [[a]]) : (Gn(Vk, "no valid child node found"), null); }; } }); function vU(e) { if (!e) return null; const t = e; for (const n of t) { if (br(n)) switch (n.type) { case S0: continue; case hl: case "svg": return ML(n); case Re: return vU(n.children); default: return n; } return ML(n); } return null; } function ML(e) { const t = wt("only-child"); return q("span", { class: t.e("content") }, [e]); } const gU = $t({ virtualRef: { type: at(Object) }, virtualTriggering: Boolean, onMouseenter: { type: at(Function) }, onMouseleave: { type: at(Function) }, onClick: { type: at(Function) }, onKeydown: { type: at(Function) }, onFocus: { type: at(Function) }, onBlur: { type: at(Function) }, onContextmenu: { type: at(Function) }, id: String, open: Boolean }), fPe = W({ name: "ElPopperTrigger", inheritAttrs: !1 }), hPe = /* @__PURE__ */ W({ ...fPe, props: gU, setup(e, { expose: t }) { const n = e, { role: r, triggerRef: o } = be(PE, void 0); $Ie(o); const a = E(() => s.value ? n.id : void 0), i = E(() => { if (r && r.value === "tooltip") return n.open && n.id ? n.id : void 0; }), s = E(() => { if (r && r.value !== "tooltip") return r.value; }), l = E(() => s.value ? `${n.open}` : void 0); let u; const c = [ "onMouseenter", "onMouseleave", "onClick", "onKeydown", "onFocus", "onBlur", "onContextmenu" ]; return ut(() => { he(() => n.virtualRef, (d) => { d && (o.value = si(d)); }, { immediate: !0 }), he(o, (d, p) => { u == null || u(), u = void 0, Zs(d) && (c.forEach((h) => { var f; const v = n[h]; v && (d.addEventListener(h.slice(2).toLowerCase(), v), (f = p == null ? void 0 : p.removeEventListener) == null || f.call(p, h.slice(2).toLowerCase(), v)); }), u = he([a, i, s, l], (h) => { [ "aria-controls", "aria-describedby", "aria-haspopup", "aria-expanded" ].forEach((f, v) => { mh(h[v]) ? d.removeAttribute(f) : d.setAttribute(f, h[v]); }); }, { immediate: !0 })), Zs(p) && [ "aria-controls", "aria-describedby", "aria-haspopup", "aria-expanded" ].forEach((h) => p.removeAttribute(h)); }, { immediate: !0 }); }), Tt(() => { if (u == null || u(), u = void 0, o.value && Zs(o.value)) { const d = o.value; c.forEach((p) => { const h = n[p]; h && d.removeEventListener(p.slice(2).toLowerCase(), h); }), o.value = void 0; } }), t({ triggerRef: o }), (d, p) => d.virtualTriggering ? J("v-if", !0) : (S(), re(y(hU), Et({ key: 0 }, d.$attrs, { "aria-controls": y(a), "aria-describedby": y(i), "aria-expanded": y(l), "aria-haspopup": y(s) }), { default: N(() => [ ue(d.$slots, "default") ]), _: 3 }, 16, ["aria-controls", "aria-describedby", "aria-expanded", "aria-haspopup"])); } }); var vPe = /* @__PURE__ */ vt(hPe, [["__file", "trigger.vue"]]); const Hk = "focus-trap.focus-after-trapped", Uk = "focus-trap.focus-after-released", gPe = "focus-trap.focusout-prevented", DL = { cancelable: !0, bubbles: !1 }, mPe = { cancelable: !0, bubbles: !1 }, BL = "focusAfterTrapped", zL = "focusAfterReleased", mU = Symbol("elFocusTrap"), LE = z(), a1 = z(0), RE = z(0); let xv = 0; const yU = (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; }, jL = (e, t) => { for (const n of e) if (!yPe(n, t)) return n; }, yPe = (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; }, bPe = (e) => { const t = yU(e), n = jL(t, e), r = jL(t.reverse(), e); return [n, r]; }, wPe = (e) => e instanceof HTMLInputElement && "select" in e, Is = (e, t) => { if (e && e.focus) { const n = document.activeElement; e.focus({ preventScroll: !0 }), RE.value = window.performance.now(), e !== n && wPe(e) && t && e.select(); } }; function VL(e, t) { const n = [...e], r = e.indexOf(t); return r !== -1 && n.splice(r, 1), n; } const xPe = () => { let e = []; return { push: (t) => { const n = e[0]; n && t !== n && n.pause(), e = VL(e, t), e.unshift(t); }, remove: (t) => { var n, r; e = VL(e, t), (r = (n = e[0]) == null ? void 0 : n.resume) == null || r.call(n); } }; }, kPe = (e, t = !1) => { const n = document.activeElement; for (const r of e) if (Is(r, t), document.activeElement !== n) return; }, HL = xPe(), CPe = () => a1.value > RE.value, kv = () => { LE.value = "pointer", a1.value = window.performance.now(); }, UL = () => { LE.value = "keyboard", a1.value = window.performance.now(); }, _Pe = () => (ut(() => { xv === 0 && (document.addEventListener("mousedown", kv), document.addEventListener("touchstart", kv), document.addEventListener("keydown", UL)), xv++; }), Tt(() => { xv--, xv <= 0 && (document.removeEventListener("mousedown", kv), document.removeEventListener("touchstart", kv), document.removeEventListener("keydown", UL)); }), { focusReason: LE, lastUserFocusTimestamp: a1, lastAutomatedFocusTimestamp: RE }), Cv = (e) => new CustomEvent(gPe, { ...mPe, detail: e }), SPe = W({ name: "ElFocusTrap", inheritAttrs: !1, props: { loop: Boolean, trapped: Boolean, focusTrapEl: Object, focusStartEl: { type: [Object, String], default: "first" } }, emits: [ BL, zL, "focusin", "focusout", "focusout-prevented", "release-requested" ], setup(e, { emit: t }) { const n = z(); let r, o; const { focusReason: a } = _Pe(); xIe((f) => { e.trapped && !i.paused && t("release-requested", f); }); const i = { paused: !1, pause() { this.paused = !0; }, resume() { this.paused = !1; } }, s = (f) => { if (!e.loop && !e.trapped || i.paused) return; const { key: v, altKey: m, ctrlKey: g, metaKey: b, currentTarget: x, shiftKey: w } = f, { loop: k } = e, C = v === Yt.tab && !m && !g && !b, _ = document.activeElement; if (C && _) { const $ = x, [O, F] = bPe($); if (O && F) { if (!w && _ === F) { const A = Cv({ focusReason: a.value }); t("focusout-prevented", A), A.defaultPrevented || (f.preventDefault(), k && Is(O, !0)); } else if (w && [O, $].includes(_)) { const A = Cv({ focusReason: a.value }); t("focusout-prevented", A), A.defaultPrevented || (f.preventDefault(), k && Is(F, !0)); } } else if (_ === $) { const A = Cv({ focusReason: a.value }); t("focusout-prevented", A), A.defaultPrevented || f.preventDefault(); } } }; nt(mU, { focusTrapRef: n, onKeydown: s }), he(() => e.focusTrapEl, (f) => { f && (n.value = f); }, { immediate: !0 }), he([n], ([f], [v]) => { f && (f.addEventListener("keydown", s), f.addEventListener("focusin", c), f.addEventListener("focusout", d)), v && (v.removeEventListener("keydown", s), v.removeEventListener("focusin", c), v.removeEventListener("focusout", d)); }); const l = (f) => { t(BL, f); }, u = (f) => t(zL, f), c = (f) => { const v = y(n); if (!v) return; const m = f.target, g = f.relatedTarget, b = m && v.contains(m); e.trapped || g && v.contains(g) || (r = g), b && t("focusin", f), !i.paused && e.trapped && (b ? o = m : Is(o, !0)); }, d = (f) => { const v = y(n); if (!(i.paused || !v)) if (e.trapped) { const m = f.relatedTarget; !mh(m) && !v.contains(m) && setTimeout(() => { if (!i.paused && e.trapped) { const g = Cv({ focusReason: a.value }); t("focusout-prevented", g), g.defaultPrevented || Is(o, !0); } }, 0); } else { const m = f.target; m && v.contains(m) || t("focusout", f); } }; async function p() { await Ke(); const f = y(n); if (f) { HL.push(i); const v = f.contains(document.activeElement) ? r : document.activeElement; if (r = v, !f.contains(v)) { const m = new Event(Hk, DL); f.addEventListener(Hk, l), f.dispatchEvent(m), m.defaultPrevented || Ke(() => { let g = e.focusStartEl; Yr(g) || (Is(g), document.activeElement !== g && (g = "first")), g === "first" && kPe(yU(f), !0), (document.activeElement === v || g === "container") && Is(f); }); } } } function h() { const f = y(n); if (f) { f.removeEventListener(Hk, l); const v = new CustomEvent(Uk, { ...DL, detail: { focusReason: a.value } }); f.addEventListener(Uk, u), f.dispatchEvent(v), !v.defaultPrevented && (a.value == "keyboard" || !CPe() || f.contains(document.activeElement)) && Is(r ?? document.body), f.removeEventListener(Uk, u), HL.remove(i); } } return ut(() => { e.trapped && p(), he(() => e.trapped, (f) => { f ? p() : h(); }); }), Tt(() => { e.trapped && h(), n.value && (n.value.removeEventListener("keydown", s), n.value.removeEventListener("focusin", c), n.value.removeEventListener("focusout", d), n.value = void 0); }), { onKeydown: s }; } }); function $Pe(e, t, n, r, o, a) { return ue(e.$slots, "default", { handleKeydown: e.onKeydown }); } var bU = /* @__PURE__ */ vt(SPe, [["render", $Pe], ["__file", "focus-trap.vue"]]); const EPe = ["fixed", "absolute"], OPe = $t({ boundariesPadding: { type: Number, default: 0 }, fallbackPlacements: { type: at(Array), default: void 0 }, gpuAcceleration: { type: Boolean, default: !0 }, offset: { type: Number, default: 12 }, placement: { type: String, values: bh, default: "bottom" }, popperOptions: { type: at(Object), default: () => ({}) }, strategy: { type: String, values: EPe, default: "absolute" } }), wU = $t({ ...OPe, id: String, style: { type: at([String, Array, Object]) }, className: { type: at([String, Array, Object]) }, effect: { type: at(String), default: "dark" }, visible: Boolean, enterable: { type: Boolean, default: !0 }, pure: Boolean, focusOnShow: { type: Boolean, default: !1 }, trapping: { type: Boolean, default: !1 }, popperClass: { type: at([String, Array, Object]) }, popperStyle: { type: at([String, Array, Object]) }, referenceEl: { type: at(Object) }, triggerTargetEl: { type: at(Object) }, stopPopperMouseEvent: { type: Boolean, default: !0 }, virtualTriggering: Boolean, zIndex: Number, ...$l(["ariaLabel"]) }), FPe = { mouseenter: (e) => e instanceof MouseEvent, mouseleave: (e) => e instanceof MouseEvent, focus: () => !0, blur: () => !0, close: () => !0 }, TPe = (e, t = []) => { const { placement: n, strategy: r, popperOptions: o } = e, a = { placement: n, strategy: r, ...o, modifiers: [...IPe(e), ...t] }; return PPe(a, o == null ? void 0 : o.modifiers), a; }, APe = (e) => { if (pn) return si(e); }; function IPe(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 PPe(e, t) { t && (e.modifiers = [...e.modifiers, ...t ?? []]); } const LPe = 0, RPe = (e) => { const { popperInstanceRef: t, contentRef: n, triggerRef: r, role: o } = be(PE, void 0), a = z(), i = z(), s = E(() => ({ name: "eventListeners", enabled: !!e.visible })), l = E(() => { var g; const b = y(a), x = (g = y(i)) != null ? g : LPe; return { name: "arrow", enabled: !FH(b), options: { element: b, padding: x } }; }), u = E(() => ({ onFirstUpdate: () => { f(); }, ...TPe(e, [ y(l), y(s) ]) })), c = E(() => APe(e.referenceEl) || y(r)), { attributes: d, state: p, styles: h, update: f, forceUpdate: v, instanceRef: m } = mIe(c, n, u); return he(m, (g) => t.value = g), ut(() => { he(() => { var g; return (g = y(c)) == null ? void 0 : g.getBoundingClientRect(); }, () => { f(); }); }), { attributes: d, arrowRef: a, contentRef: n, instanceRef: m, state: p, styles: h, role: o, forceUpdate: v, update: f }; }, NPe = (e, { attributes: t, styles: n, role: r }) => { const { nextZIndex: o } = OE(), a = wt("popper"), i = E(() => y(t).popper), s = z(Wt(e.zIndex) ? e.zIndex : o()), l = E(() => [ a.b(), a.is("pure", e.pure), a.is(e.effect), e.popperClass ]), u = E(() => [ { zIndex: y(s) }, y(n).popper, e.popperStyle || {} ]), c = E(() => r.value === "dialog" ? "false" : void 0), d = E(() => y(n).arrow || {}); return { ariaModal: c, arrowStyle: d, contentAttrs: i, contentClass: l, contentStyle: u, contentZIndex: s, updateZIndex: () => { s.value = Wt(e.zIndex) ? e.zIndex : o(); } }; }, MPe = (e, t) => { const n = z(!1), r = z(); 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"); } }; }, DPe = W({ name: "ElPopperContent" }), BPe = /* @__PURE__ */ W({ ...DPe, props: wU, emits: FPe, setup(e, { expose: t, emit: n }) { const r = e, { focusStartRef: o, trapped: a, onFocusAfterReleased: i, onFocusAfterTrapped: s, onFocusInTrap: l, onFocusoutPrevented: u, onReleaseRequested: c } = MPe(r, n), { attributes: d, arrowRef: p, contentRef: h, styles: f, instanceRef: v, role: m, update: g } = RPe(r), { ariaModal: b, arrowStyle: x, contentAttrs: w, contentClass: k, contentStyle: C, updateZIndex: _ } = NPe(r, { styles: f, attributes: d, role: m }), $ = be(s0, void 0), O = z(); nt(dU, { arrowStyle: x, arrowRef: p, arrowOffset: O }), $ && nt(s0, { ...$, addInputId: Qi, removeInputId: Qi }); let F; const A = (R = !0) => { g(), R && _(); }, T = () => { A(!1), r.visible && r.focusOnShow ? a.value = !0 : r.visible === !1 && (a.value = !1); }; return ut(() => { he(() => r.triggerTargetEl, (R, M) => { F == null || F(), F = void 0; const j = y(R || h.value), P = y(M || h.value); Zs(j) && (F = he([m, () => r.ariaLabel, b, () => r.id], (V) => { ["role", "aria-label", "aria-modal", "id"].forEach((U, G) => { mh(V[G]) ? j.removeAttribute(U) : j.setAttribute(U, V[G]); }); }, { immediate: !0 })), P !== j && Zs(P) && ["role", "aria-label", "aria-modal", "id"].forEach((V) => { P.removeAttribute(V); }); }, { immediate: !0 }), he(() => r.visible, T, { immediate: !0 }); }), Tt(() => { F == null || F(), F = void 0; }), t({ popperContentRef: h, popperInstanceRef: v, updatePopper: A, contentStyle: C }), (R, M) => (S(), L("div", Et({ ref_key: "contentRef", ref: h }, y(w), { style: y(C), class: y(k), tabindex: "-1", onMouseenter: (j) => R.$emit("mouseenter", j), onMouseleave: (j) => R.$emit("mouseleave", j) }), [ q(y(bU), { trapped: y(a), "trap-on-focus-in": !0, "focus-trap-el": y(h), "focus-start-el": y(o), onFocusAfterTrapped: y(s), onFocusAfterReleased: y(i), onFocusin: y(l), onFocusoutPrevented: y(u), onReleaseRequested: y(c) }, { default: N(() => [ ue(R.$slots, "default") ]), _: 3 }, 8, ["trapped", "focus-trap-el", "focus-start-el", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusin", "onFocusoutPrevented", "onReleaseRequested"]) ], 16, ["onMouseenter", "onMouseleave"])); } }); var zPe = /* @__PURE__ */ vt(BPe, [["__file", "content.vue"]]); const jPe = Kn(uPe), NE = Symbol("elTooltip"), fo = $t({ ..._Ie, ...wU, appendTo: { type: at([String, Object]) }, content: { type: String, default: "" }, rawContent: Boolean, persistent: Boolean, visible: { type: at(Boolean), default: null }, transition: String, teleported: { type: Boolean, default: !0 }, disabled: Boolean, ...$l(["ariaLabel"]) }), _f = $t({ ...gU, disabled: Boolean, trigger: { type: at([String, Array]), default: "hover" }, triggerKeys: { type: at(Array), default: () => [Yt.enter, Yt.space] } }), { useModelToggleProps: VPe, useModelToggleEmits: HPe, useModelToggle: UPe } = h6e("visible"), qPe = $t({ ...pU, ...VPe, ...fo, ..._f, ...fU, showArrow: { type: Boolean, default: !0 } }), KPe = [ ...HPe, "before-show", "before-hide", "show", "hide", "open", "close" ], GPe = (e, t) => io(e) ? e.includes(t) : e === t, dc = (e, t, n) => (r) => { GPe(y(e), t) && n(r); }, WPe = W({ name: "ElTooltipTrigger" }), YPe = /* @__PURE__ */ W({ ...WPe, props: _f, setup(e, { expose: t }) { const n = e, r = wt("tooltip"), { controlled: o, id: a, open: i, onOpen: s, onClose: l, onToggle: u } = be(NE, void 0), c = z(null), d = () => { if (y(o) || n.disabled) return !0; }, p = St(n, "trigger"), h = Xn(d, dc(p, "hover", s)), f = Xn(d, dc(p, "hover", l)), v = Xn(d, dc(p, "click", (w) => { w.button === 0 && u(w); })), m = Xn(d, dc(p, "focus", s)), g = Xn(d, dc(p, "focus", l)), b = Xn(d, dc(p, "contextmenu", (w) => { w.preventDefault(), u(w); })), x = Xn(d, (w) => { const { code: k } = w; n.triggerKeys.includes(k) && (w.preventDefault(), u(w)); }); return t({ triggerRef: c }), (w, k) => (S(), re(y(vPe), { id: y(a), "virtual-ref": w.virtualRef, open: y(i), "virtual-triggering": w.virtualTriggering, class: H(y(r).e("trigger")), onBlur: y(g), onClick: y(v), onContextmenu: y(b), onFocus: y(m), onMouseenter: y(h), onMouseleave: y(f), onKeydown: y(x) }, { default: N(() => [ ue(w.$slots, "default") ]), _: 3 }, 8, ["id", "virtual-ref", "open", "virtual-triggering", "class", "onBlur", "onClick", "onContextmenu", "onFocus", "onMouseenter", "onMouseleave", "onKeydown"])); } }); var XPe = /* @__PURE__ */ vt(YPe, [["__file", "trigger.vue"]]); const ZPe = $t({ to: { type: at([String, Object]), required: !0 }, disabled: Boolean }), JPe = /* @__PURE__ */ W({ __name: "teleport", props: ZPe, setup(e) { return (t, n) => t.disabled ? ue(t.$slots, "default", { key: 0 }) : (S(), re($0, { key: 1, to: t.to }, [ ue(t.$slots, "default") ], 8, ["to"])); } }); var QPe = /* @__PURE__ */ vt(JPe, [["__file", "teleport.vue"]]); const xU = Kn(QPe), eLe = W({ name: "ElTooltipContent", inheritAttrs: !1 }), tLe = /* @__PURE__ */ W({ ...eLe, props: fo, setup(e, { expose: t }) { const n = e, { selector: r } = QH(), o = wt("tooltip"), a = z(null); let i; const { controlled: s, id: l, open: u, trigger: c, onClose: d, onOpen: p, onShow: h, onHide: f, onBeforeShow: v, onBeforeHide: m } = be(NE, void 0), g = E(() => n.transition || `${o.namespace.value}-fade-in-linear`), b = E(() => process.env.NODE_ENV === "test" ? !0 : n.persistent); Tt(() => { i == null || i(); }); const x = E(() => y(b) ? !0 : y(u)), w = E(() => n.disabled ? !1 : y(u)), k = E(() => n.appendTo || r.value), C = E(() => { var P; return (P = n.style) != null ? P : {}; }), _ = z(!0), $ = () => { f(), _.value = !0; }, O = () => { if (y(s)) return !0; }, F = Xn(O, () => { n.enterable && y(c) === "hover" && p(); }), A = Xn(O, () => { y(c) === "hover" && d(); }), T = () => { var P, V; (V = (P = a.value) == null ? void 0 : P.updatePopper) == null || V.call(P), v == null || v(); }, R = () => { m == null || m(); }, M = () => { h(), i = $4e(E(() => { var P; return (P = a.value) == null ? void 0 : P.popperContentRef; }), () => { y(s) || y(c) !== "hover" && d(); }); }, j = () => { n.virtualTriggering || d(); }; return he(() => y(u), (P) => { P ? _.value = !1 : i == null || i(); }, { flush: "post" }), he(() => n.content, () => { var P, V; (V = (P = a.value) == null ? void 0 : P.updatePopper) == null || V.call(P); }), t({ contentRef: a }), (P, V) => (S(), re(y(xU), { disabled: !P.teleported, to: y(k) }, { default: N(() => [ q(nr, { name: y(g), onAfterLeave: $, onBeforeEnter: T, onAfterEnter: M, onBeforeLeave: R }, { default: N(() => [ y(x) ? Be((S(), re(y(zPe), Et({ key: 0, id: y(l), ref_key: "contentRef", ref: a }, P.$attrs, { "aria-label": P.ariaLabel, "aria-hidden": _.value, "boundaries-padding": P.boundariesPadding, "fallback-placements": P.fallbackPlacements, "gpu-acceleration": P.gpuAcceleration, offset: P.offset, placement: P.placement, "popper-options": P.popperOptions, strategy: P.strategy, effect: P.effect, enterable: P.enterable, pure: P.pure, "popper-class": P.popperClass, "popper-style": [P.popperStyle, y(C)], "reference-el": P.referenceEl, "trigger-target-el": P.triggerTargetEl, visible: y(w), "z-index": P.zIndex, onMouseenter: y(F), onMouseleave: y(A), onBlur: j, onClose: y(d) }), { default: N(() => [ ue(P.$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, y(w)] ]) : J("v-if", !0) ]), _: 3 }, 8, ["name"]) ]), _: 3 }, 8, ["disabled", "to"])); } }); var nLe = /* @__PURE__ */ vt(tLe, [["__file", "content.vue"]]); const rLe = W({ name: "ElTooltip" }), oLe = /* @__PURE__ */ W({ ...rLe, props: qPe, emits: KPe, setup(e, { expose: t, emit: n }) { const r = e; CIe(); const o = xi(), a = z(), i = z(), s = () => { var g; const b = y(a); b && ((g = b.popperInstanceRef) == null || g.update()); }, l = z(!1), u = z(), { show: c, hide: d, hasUpdateHandler: p } = UPe({ indicator: l, toggleReason: u }), { onOpen: h, onClose: f } = SIe({ showAfter: St(r, "showAfter"), hideAfter: St(r, "hideAfter"), autoClose: St(r, "autoClose"), open: c, close: d }), v = E(() => pa(r.visible) && !p.value); nt(NE, { controlled: v, id: o, open: $u(l), trigger: St(r, "trigger"), onOpen: (g) => { h(g); }, onClose: (g) => { f(g); }, onToggle: (g) => { y(l) ? f(g) : h(g); }, onShow: () => { n("show", u.value); }, onHide: () => { n("hide", u.value); }, onBeforeShow: () => { n("before-show", u.value); }, onBeforeHide: () => { n("before-hide", u.value); }, updatePopper: s }), he(() => r.disabled, (g) => { g && l.value && (l.value = !1); }); const m = (g) => { var b, x; const w = (x = (b = i.value) == null ? void 0 : b.contentRef) == null ? void 0 : x.popperContentRef, k = (g == null ? void 0 : g.relatedTarget) || document.activeElement; return w && w.contains(k); }; return E0(() => l.value && d()), t({ popperRef: a, contentRef: i, isFocusInsideContent: m, updatePopper: s, onOpen: h, onClose: f, hide: d }), (g, b) => (S(), re(y(jPe), { ref_key: "popperRef", ref: a, role: g.role }, { default: N(() => [ q(XPe, { disabled: g.disabled, trigger: g.trigger, "trigger-keys": g.triggerKeys, "virtual-ref": g.virtualRef, "virtual-triggering": g.virtualTriggering }, { default: N(() => [ g.$slots.default ? ue(g.$slots, "default", { key: 0 }) : J("v-if", !0) ]), _: 3 }, 8, ["disabled", "trigger", "trigger-keys", "virtual-ref", "virtual-triggering"]), q(nLe, { ref_key: "contentRef", ref: i, "aria-label": g.ariaLabel, "boundaries-padding": g.boundariesPadding, content: g.content, disabled: g.disabled, effect: g.effect, enterable: g.enterable, "fallback-placements": g.fallbackPlacements, "hide-after": g.hideAfter, "gpu-acceleration": g.gpuAcceleration, offset: g.offset, persistent: g.persistent, "popper-class": g.popperClass, "popper-style": g.popperStyle, placement: g.placement, "popper-options": g.popperOptions, pure: g.pure, "raw-content": g.rawContent, "reference-el": g.referenceEl, "trigger-target-el": g.triggerTargetEl, "show-after": g.showAfter, strategy: g.strategy, teleported: g.teleported, transition: g.transition, "virtual-triggering": g.virtualTriggering, "z-index": g.zIndex, "append-to": g.appendTo }, { default: N(() => [ ue(g.$slots, "content", {}, () => [ g.rawContent ? (S(), L("span", { key: 0, innerHTML: g.content }, null, 8, ["innerHTML"])) : (S(), L("span", { key: 1 }, ge(g.content), 1)) ]), g.showArrow ? (S(), re(y(pPe), { key: 0, "arrow-offset": g.arrowOffset }, null, 8, ["arrow-offset"])) : J("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 aLe = /* @__PURE__ */ vt(oLe, [["__file", "tooltip.vue"]]); const Sf = Kn(aLe), iLe = $t({ 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: at([String, Object, Array]) }, offset: { type: at(Array), default: [0, 0] }, badgeClass: { type: String } }), sLe = W({ name: "ElBadge" }), lLe = /* @__PURE__ */ W({ ...sLe, props: iLe, setup(e, { expose: t }) { const n = e, r = wt("badge"), o = E(() => n.isDot ? "" : Wt(n.value) && Wt(n.max) ? n.max < n.value ? `${n.max}+` : n.value === 0 && !n.showZero ? "" : `${n.value}` : `${n.value}`), a = E(() => { var i, s, l, u, c; return [ { backgroundColor: n.color, marginRight: as(-((s = (i = n.offset) == null ? void 0 : i[0]) != null ? s : 0)), marginTop: as((u = (l = n.offset) == null ? void 0 : l[1]) != null ? u : 0) }, (c = n.badgeStyle) != null ? c : {} ]; }); return t({ content: o }), (i, s) => (S(), L("div", { class: H(y(r).b()) }, [ ue(i.$slots, "default"), q(nr, { name: `${y(r).namespace.value}-zoom-in-center`, persisted: "" }, { default: N(() => [ Be(D("sup", { class: H([ y(r).e("content"), y(r).em("content", i.type), y(r).is("fixed", !!i.$slots.default), y(r).is("dot", i.isDot), i.badgeClass ]), style: Ye(y(a)), textContent: ge(y(o)) }, null, 14, ["textContent"]), [ [ht, !i.hidden && (y(o) || i.isDot)] ]) ]), _: 1 }, 8, ["name"]) ], 2)); } }); var uLe = /* @__PURE__ */ vt(lLe, [["__file", "badge.vue"]]); const cLe = Kn(uLe), kU = Symbol("buttonGroupContextKey"), dLe = (e, t) => { nu({ from: "type.text", replacement: "link", version: "3.0.0", scope: "props", ref: "https://element-plus.org/en-US/component/button.html#button-attributes" }, E(() => e.type === "text")); const n = be(kU, void 0), r = r1("button"), { form: o } = El(), a = ss(E(() => n == null ? void 0 : n.size)), i = xh(), s = z(), l = Dr(), u = E(() => e.type || (n == null ? void 0 : n.type) || ""), c = E(() => { var h, f, v; return (v = (f = e.autoInsertSpace) != null ? f : (h = r.value) == null ? void 0 : h.autoInsertSpace) != null ? v : !1; }), d = E(() => e.tag === "button" ? { ariaDisabled: i.value || e.loading, disabled: i.value || e.loading, autofocus: e.autofocus, type: e.nativeType } : {}), p = E(() => { var h; const f = (h = l.default) == null ? void 0 : h.call(l); if (c.value && (f == null ? void 0 : f.length) === 1) { const v = f[0]; if ((v == null ? void 0 : v.type) === hl) { const m = v.children; return new RegExp("^\\p{Unified_Ideograph}{2}$", "u").test(m.trim()); } } return !1; }); return { _disabled: i, _size: a, _type: u, _ref: s, _props: d, shouldAddSpace: p, handleClick: (h) => { if (i.value || e.loading) { h.stopPropagation(); return; } e.nativeType === "reset" && (o == null || o.resetFields()), t("click", h); } }; }, pLe = [ "default", "primary", "success", "warning", "info", "danger", "text", "" ], fLe = ["button", "submit", "reset"], k_ = $t({ size: Ii, disabled: Boolean, type: { type: String, values: pLe, default: "" }, icon: { type: zo }, nativeType: { type: String, values: fLe, default: "button" }, loading: Boolean, loadingIcon: { type: zo, default: () => Ei }, 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: at([String, Object]), default: "button" } }), hLe = { click: (e) => e instanceof MouseEvent }; function Nr(e, t) { vLe(e) && (e = "100%"); var n = gLe(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 _v(e) { return Math.min(1, Math.max(0, e)); } function vLe(e) { return typeof e == "string" && e.indexOf(".") !== -1 && parseFloat(e) === 1; } function gLe(e) { return typeof e == "string" && e.indexOf("%") !== -1; } function CU(e) { return e = parseFloat(e), (isNaN(e) || e < 0 || e > 1) && (e = 1), e; } function Sv(e) { return e <= 1 ? "".concat(Number(e) * 100, "%") : e; } function Kl(e) { return e.length === 1 ? "0" + e : String(e); } function mLe(e, t, n) { return { r: Nr(e, 255) * 255, g: Nr(t, 255) * 255, b: Nr(n, 255) * 255 }; } function qL(e, t, n) { e = Nr(e, 255), t = Nr(t, 255), n = Nr(n, 255); var r = Math.max(e, t, n), o = Math.min(e, t, n), a = 0, i = 0, s = (r + o) / 2; if (r === o) i = 0, a = 0; else { var l = r - o; switch (i = s > 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: i, l: s }; } function qk(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 yLe(e, t, n) { var r, o, a; if (e = Nr(e, 360), t = Nr(t, 100), n = Nr(n, 100), t === 0) o = n, a = n, r = n; else { var i = n < 0.5 ? n * (1 + t) : n + t - n * t, s = 2 * n - i; r = qk(s, i, e + 1 / 3), o = qk(s, i, e), a = qk(s, i, e - 1 / 3); } return { r: r * 255, g: o * 255, b: a * 255 }; } function KL(e, t, n) { e = Nr(e, 255), t = Nr(t, 255), n = Nr(n, 255); var r = Math.max(e, t, n), o = Math.min(e, t, n), a = 0, i = r, s = r - o, l = r === 0 ? 0 : s / r; if (r === o) a = 0; else { switch (r) { case e: a = (t - n) / s + (t < n ? 6 : 0); break; case t: a = (n - e) / s + 2; break; case n: a = (e - t) / s + 4; break; } a /= 6; } return { h: a, s: l, v: i }; } function bLe(e, t, n) { e = Nr(e, 360) * 6, t = Nr(t, 100), n = Nr(n, 100); var r = Math.floor(e), o = e - r, a = n * (1 - t), i = n * (1 - o * t), s = n * (1 - (1 - o) * t), l = r % 6, u = [n, i, a, a, s, n][l], c = [s, n, n, i, a, a][l], d = [a, a, s, n, n, i][l]; return { r: u * 255, g: c * 255, b: d * 255 }; } function GL(e, t, n, r) { var o = [ Kl(Math.round(e).toString(16)), Kl(Math.round(t).toString(16)), Kl(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 wLe(e, t, n, r, o) { var a = [ Kl(Math.round(e).toString(16)), Kl(Math.round(t).toString(16)), Kl(Math.round(n).toString(16)), Kl(xLe(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 xLe(e) { return Math.round(parseFloat(e) * 255).toString(16); } function WL(e) { return Lo(e) / 255; } function Lo(e) { return parseInt(e, 16); } function kLe(e) { return { r: e >> 16, g: (e & 65280) >> 8, b: e & 255 }; } var C_ = { 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 CLe(e) { var t = { r: 0, g: 0, b: 0 }, n = 1, r = null, o = null, a = null, i = !1, s = !1; return typeof e == "string" && (e = $Le(e)), typeof e == "object" && (Ni(e.r) && Ni(e.g) && Ni(e.b) ? (t = mLe(e.r, e.g, e.b), i = !0, s = String(e.r).substr(-1) === "%" ? "prgb" : "rgb") : Ni(e.h) && Ni(e.s) && Ni(e.v) ? (r = Sv(e.s), o = Sv(e.v), t = bLe(e.h, r, o), i = !0, s = "hsv") : Ni(e.h) && Ni(e.s) && Ni(e.l) && (r = Sv(e.s), a = Sv(e.l), t = yLe(e.h, r, a), i = !0, s = "hsl"), Object.prototype.hasOwnProperty.call(e, "a") && (n = e.a)), n = CU(n), { ok: i, format: e.format || s, 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 _Le = "[-\\+]?\\d+%?", SLe = "[-\\+]?\\d*\\.\\d+%?", Ks = "(?:".concat(SLe, ")|(?:").concat(_Le, ")"), Kk = "[\\s|\\(]+(".concat(Ks, ")[,|\\s]+(").concat(Ks, ")[,|\\s]+(").concat(Ks, ")\\s*\\)?"), Gk = "[\\s|\\(]+(".concat(Ks, ")[,|\\s]+(").concat(Ks, ")[,|\\s]+(").concat(Ks, ")[,|\\s]+(").concat(Ks, ")\\s*\\)?"), Ea = { CSS_UNIT: new RegExp(Ks), rgb: new RegExp("rgb" + Kk), rgba: new RegExp("rgba" + Gk), hsl: new RegExp("hsl" + Kk), hsla: new RegExp("hsla" + Gk), hsv: new RegExp("hsv" + Kk), hsva: new RegExp("hsva" + Gk), 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 $Le(e) { if (e = e.trim().toLowerCase(), e.length === 0) return !1; var t = !1; if (C_[e]) e = C_[e], t = !0; else if (e === "transparent") return { r: 0, g: 0, b: 0, a: 0, format: "name" }; var n = Ea.rgb.exec(e); return n ? { r: n[1], g: n[2], b: n[3] } : (n = Ea.rgba.exec(e), n ? { r: n[1], g: n[2], b: n[3], a: n[4] } : (n = Ea.hsl.exec(e), n ? { h: n[1], s: n[2], l: n[3] } : (n = Ea.hsla.exec(e), n ? { h: n[1], s: n[2], l: n[3], a: n[4] } : (n = Ea.hsv.exec(e), n ? { h: n[1], s: n[2], v: n[3] } : (n = Ea.hsva.exec(e), n ? { h: n[1], s: n[2], v: n[3], a: n[4] } : (n = Ea.hex8.exec(e), n ? { r: Lo(n[1]), g: Lo(n[2]), b: Lo(n[3]), a: WL(n[4]), format: t ? "name" : "hex8" } : (n = Ea.hex6.exec(e), n ? { r: Lo(n[1]), g: Lo(n[2]), b: Lo(n[3]), format: t ? "name" : "hex" } : (n = Ea.hex4.exec(e), n ? { r: Lo(n[1] + n[1]), g: Lo(n[2] + n[2]), b: Lo(n[3] + n[3]), a: WL(n[4] + n[4]), format: t ? "name" : "hex8" } : (n = Ea.hex3.exec(e), n ? { r: Lo(n[1] + n[1]), g: Lo(n[2] + n[2]), b: Lo(n[3] + n[3]), format: t ? "name" : "hex" } : !1))))))))); } function Ni(e) { return !!Ea.CSS_UNIT.exec(String(e)); } var ELe = ( /** @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 = kLe(t)), this.originalInput = t; var o = CLe(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, i = t.g / 255, s = t.b / 255; return a <= 0.03928 ? n = a / 12.92 : n = Math.pow((a + 0.055) / 1.055, 2.4), i <= 0.03928 ? r = i / 12.92 : r = Math.pow((i + 0.055) / 1.055, 2.4), s <= 0.03928 ? o = s / 12.92 : o = Math.pow((s + 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 = CU(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 = KL(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 = KL(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 = qL(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 = qL(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), GL(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), wLe(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(Nr(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(Nr(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 = "#" + GL(this.r, this.g, this.b, !1), n = 0, r = Object.entries(C_); n < r.length; n++) { var o = r[n], a = o[0], i = o[1]; if (t === i) 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 = _v(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 = _v(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 = _v(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 = _v(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, i = { 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(i); }, 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, i = [], s = 1 / t; t--; ) i.push(new e({ h: r, s: o, v: a })), a = (a + s) % 1; return i; }, 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, i = 1; i < t; i++) o.push(new e({ h: (r + i * a) % 360, s: n.s, l: n.l })); return o; }, e.prototype.equals = function(t) { return this.toRgbString() === new e(t).toRgbString(); }, e; }() ); function $s(e, t = 20) { return e.mix("#141414", t).toString(); } function OLe(e) { const t = xh(), n = wt("button"); return E(() => { let r = {}, o = e.color; if (o) { const a = o.match(/var\((.*?)\)/); a && (o = window.getComputedStyle(window.document.documentElement).getPropertyValue(a[1])); const i = new ELe(o), s = e.dark ? i.tint(20).toString() : $s(i, 20); if (e.plain) r = n.cssVarBlock({ "bg-color": e.dark ? $s(i, 90) : i.tint(90).toString(), "text-color": o, "border-color": e.dark ? $s(i, 50) : i.tint(50).toString(), "hover-text-color": `var(${n.cssVarName("color-white")})`, "hover-bg-color": o, "hover-border-color": o, "active-bg-color": s, "active-text-color": `var(${n.cssVarName("color-white")})`, "active-border-color": s }), t.value && (r[n.cssVarBlockName("disabled-bg-color")] = e.dark ? $s(i, 90) : i.tint(90).toString(), r[n.cssVarBlockName("disabled-text-color")] = e.dark ? $s(i, 50) : i.tint(50).toString(), r[n.cssVarBlockName("disabled-border-color")] = e.dark ? $s(i, 80) : i.tint(80).toString()); else { const l = e.dark ? $s(i, 30) : i.tint(30).toString(), u = i.isDark() ? `var(${n.cssVarName("color-white")})` : `var(${n.cssVarName("color-black")})`; if (r = n.cssVarBlock({ "bg-color": o, "text-color": u, "border-color": o, "hover-bg-color": l, "hover-text-color": u, "hover-border-color": l, "active-bg-color": s, "active-border-color": s }), t.value) { const c = e.dark ? $s(i, 50) : i.tint(50).toString(); r[n.cssVarBlockName("disabled-bg-color")] = c, 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")] = c; } } } return r; }); } const FLe = W({ name: "ElButton" }), TLe = /* @__PURE__ */ W({ ...FLe, props: k_, emits: hLe, setup(e, { expose: t, emit: n }) { const r = e, o = OLe(r), a = wt("button"), { _ref: i, _size: s, _type: l, _disabled: u, _props: c, shouldAddSpace: d, handleClick: p } = dLe(r, n), h = E(() => [ a.b(), a.m(l.value), a.m(s.value), a.is("disabled", u.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: i, size: s, type: l, disabled: u, shouldAddSpace: d }), (f, v) => (S(), re(yt(f.tag), Et({ ref_key: "_ref", ref: i }, y(c), { class: y(h), style: y(o), onClick: y(p) }), { default: N(() => [ f.loading ? (S(), L(Re, { key: 0 }, [ f.$slots.loading ? ue(f.$slots, "loading", { key: 0 }) : (S(), re(y(Qt), { key: 1, class: H(y(a).is("loading")) }, { default: N(() => [ (S(), re(yt(f.loadingIcon))) ]), _: 1 }, 8, ["class"])) ], 64)) : f.icon || f.$slots.icon ? (S(), re(y(Qt), { key: 1 }, { default: N(() => [ f.icon ? (S(), re(yt(f.icon), { key: 0 })) : ue(f.$slots, "icon", { key: 1 }) ]), _: 3 })) : J("v-if", !0), f.$slots.default ? (S(), L("span", { key: 2, class: H({ [y(a).em("text", "expand")]: y(d) }) }, [ ue(f.$slots, "default") ], 2)) : J("v-if", !0) ]), _: 3 }, 16, ["class", "style", "onClick"])); } }); var ALe = /* @__PURE__ */ vt(TLe, [["__file", "button.vue"]]); const ILe = { size: k_.size, type: k_.type }, PLe = W({ name: "ElButtonGroup" }), LLe = /* @__PURE__ */ W({ ...PLe, props: ILe, setup(e) { const t = e; nt(kU, en({ size: St(t, "size"), type: St(t, "type") })); const n = wt("button"); return (r, o) => (S(), L("div", { class: H(y(n).b("group")) }, [ ue(r.$slots, "default") ], 2)); } }); var _U = /* @__PURE__ */ vt(LLe, [["__file", "button-group.vue"]]); const so = Kn(ALe, { ButtonGroup: _U }); Vo(_U); var RLe = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}; function NLe(e) { return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e; } const Ps = /* @__PURE__ */ new Map(); if (pn) { let e; document.addEventListener("mousedown", (t) => e = t), document.addEventListener("mouseup", (t) => { if (e) { for (const n of Ps.values()) for (const { documentHandler: r } of n) r(t, e); e = void 0; } }); } function YL(e, t) { let n = []; return Array.isArray(t.arg) ? n = t.arg : Zs(t.arg) && n.push(t.arg), function(r, o) { const a = t.instance.popperRef, i = r.target, s = o == null ? void 0 : o.target, l = !t || !t.instance, u = !i || !s, c = e.contains(i) || e.contains(s), d = e === i, p = n.length && n.some((f) => f == null ? void 0 : f.contains(i)) || n.length && n.includes(s), h = a && (a.contains(i) || a.contains(s)); l || u || c || d || p || h || t.value(r, o); }; } const SU = { beforeMount(e, t) { Ps.has(e) || Ps.set(e, []), Ps.get(e).push({ documentHandler: YL(e, t), bindingFn: t.value }); }, updated(e, t) { Ps.has(e) || Ps.set(e, []); const n = Ps.get(e), r = n.findIndex((a) => a.bindingFn === t.oldValue), o = { documentHandler: YL(e, t), bindingFn: t.value }; r >= 0 ? n.splice(r, 1, o) : n.push(o); }, unmounted(e) { Ps.delete(e); } }, MLe = $t({ header: { type: String, default: "" }, footer: { type: String, default: "" }, bodyStyle: { type: at([String, Object, Array]), default: "" }, bodyClass: String, shadow: { type: String, values: ["always", "hover", "never"], default: "always" } }), DLe = W({ name: "ElCard" }), BLe = /* @__PURE__ */ W({ ...DLe, props: MLe, setup(e) { const t = wt("card"); return (n, r) => (S(), L("div", { class: H([y(t).b(), y(t).is(`${n.shadow}-shadow`)]) }, [ n.$slots.header || n.header ? (S(), L("div", { key: 0, class: H(y(t).e("header")) }, [ ue(n.$slots, "header", {}, () => [ Oe(ge(n.header), 1) ]) ], 2)) : J("v-if", !0), D("div", { class: H([y(t).e("body"), n.bodyClass]), style: Ye(n.bodyStyle) }, [ ue(n.$slots, "default") ], 6), n.$slots.footer || n.footer ? (S(), L("div", { key: 1, class: H(y(t).e("footer")) }, [ ue(n.$slots, "footer", {}, () => [ Oe(ge(n.footer), 1) ]) ], 2)) : J("v-if", !0) ], 2)); } }); var zLe = /* @__PURE__ */ vt(BLe, [["__file", "card.vue"]]); const i1 = Kn(zLe), $U = { 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: Ii, tabindex: [String, Number], validateEvent: { type: Boolean, default: !0 }, ...$l(["ariaControls"]) }, EU = { [Hn]: (e) => Yr(e) || Wt(e) || pa(e), change: (e) => Yr(e) || Wt(e) || pa(e) }, Ld = Symbol("checkboxGroupContextKey"), jLe = ({ model: e, isChecked: t }) => { const n = be(Ld, void 0), r = E(() => { var o, a; const i = (o = n == null ? void 0 : n.max) == null ? void 0 : o.value, s = (a = n == null ? void 0 : n.min) == null ? void 0 : a.value; return !Xi(i) && e.value.length >= i && !t.value || !Xi(s) && e.value.length <= s && t.value; }); return { isDisabled: xh(E(() => (n == null ? void 0 : n.disabled.value) || r.value)), isLimitDisabled: r }; }, VLe = (e, { model: t, isLimitExceeded: n, hasOwnLabel: r, isDisabled: o, isLabeledByFormItem: a }) => { const i = be(Ld, void 0), { formItem: s } = El(), { emit: l } = st(); function u(f) { var v, m, g, b; return [!0, e.trueValue, e.trueLabel].includes(f) ? (m = (v = e.trueValue) != null ? v : e.trueLabel) != null ? m : !0 : (b = (g = e.falseValue) != null ? g : e.falseLabel) != null ? b : !1; } function c(f, v) { l("change", u(f), v); } function d(f) { if (n.value) return; const v = f.target; l("change", u(v.checked), f); } async function p(f) { n.value || !r.value && !o.value && a.value && (f.composedPath().some((v) => v.tagName === "LABEL") || (t.value = u([!1, e.falseValue, e.falseLabel].includes(t.value)), await Ke(), c(t.value, f))); } const h = E(() => (i == null ? void 0 : i.validateEvent) || e.validateEvent); return he(() => e.modelValue, () => { h.value && (s == null || s.validate("change").catch((f) => Gn(f))); }), { handleChange: d, onClickRoot: p }; }, HLe = (e) => { const t = z(!1), { emit: n } = st(), r = be(Ld, void 0), o = E(() => Xi(r) === !1), a = z(!1), i = E({ get() { var s, l; return o.value ? (s = r == null ? void 0 : r.modelValue) == null ? void 0 : s.value : (l = e.modelValue) != null ? l : t.value; }, set(s) { var l, u; o.value && io(s) ? (a.value = ((l = r == null ? void 0 : r.max) == null ? void 0 : l.value) !== void 0 && s.length > (r == null ? void 0 : r.max.value) && s.length > i.value.length, a.value === !1 && ((u = r == null ? void 0 : r.changeEvent) == null || u.call(r, s))) : (n(Hn, s), t.value = s); } }); return { model: i, isGroup: o, isLimitExceeded: a }; }, ULe = (e, t, { model: n }) => { const r = be(Ld, void 0), o = z(!1), a = E(() => wf(e.value) ? e.label : e.value), i = E(() => { const c = n.value; return pa(c) ? c : io(c) ? br(a.value) ? c.map(ra).some((d) => di(d, a.value)) : c.map(ra).includes(a.value) : c != null ? c === e.trueValue || c === e.trueLabel : !!c; }), s = ss(E(() => { var c; return (c = r == null ? void 0 : r.size) == null ? void 0 : c.value; }), { prop: !0 }), l = ss(E(() => { var c; return (c = r == null ? void 0 : r.size) == null ? void 0 : c.value; })), u = E(() => !!t.default || !wf(a.value)); return { checkboxButtonSize: s, isChecked: i, isFocused: o, checkboxSize: l, hasOwnLabel: u, actualValue: a }; }, OU = (e, t) => { const { formItem: n } = El(), { model: r, isGroup: o, isLimitExceeded: a } = HLe(e), { isFocused: i, isChecked: s, checkboxButtonSize: l, checkboxSize: u, hasOwnLabel: c, actualValue: d } = ULe(e, t, { model: r }), { isDisabled: p } = jLe({ model: r, isChecked: s }), { inputId: h, isLabeledByFormItem: f } = kh(e, { formItemContext: n, disableIdGeneration: c, disableIdManagement: o }), { handleChange: v, onClickRoot: m } = VLe(e, { model: r, isLimitExceeded: a, hasOwnLabel: c, isDisabled: p, isLabeledByFormItem: f }); return (() => { function g() { var b, x; io(r.value) && !r.value.includes(d.value) ? r.value.push(d.value) : r.value = (x = (b = e.trueValue) != null ? b : e.trueLabel) != null ? x : !0; } e.checked && g(); })(), nu({ from: "label act as value", replacement: "value", version: "3.0.0", scope: "el-checkbox", ref: "https://element-plus.org/en-US/component/checkbox.html" }, E(() => o.value && wf(e.value))), nu({ from: "true-label", replacement: "true-value", version: "3.0.0", scope: "el-checkbox", ref: "https://element-plus.org/en-US/component/checkbox.html" }, E(() => !!e.trueLabel)), nu({ from: "false-label", replacement: "false-value", version: "3.0.0", scope: "el-checkbox", ref: "https://element-plus.org/en-US/component/checkbox.html" }, E(() => !!e.falseLabel)), { inputId: h, isLabeledByFormItem: f, isChecked: s, isDisabled: p, isFocused: i, checkboxButtonSize: l, checkboxSize: u, hasOwnLabel: c, model: r, actualValue: d, handleChange: v, onClickRoot: m }; }, qLe = W({ name: "ElCheckbox" }), KLe = /* @__PURE__ */ W({ ...qLe, props: $U, emits: EU, setup(e) { const t = e, n = Dr(), { inputId: r, isLabeledByFormItem: o, isChecked: a, isDisabled: i, isFocused: s, checkboxSize: l, hasOwnLabel: u, model: c, actualValue: d, handleChange: p, onClickRoot: h } = OU(t, n), f = wt("checkbox"), v = E(() => [ f.b(), f.m(l.value), f.is("disabled", i.value), f.is("bordered", t.border), f.is("checked", a.value) ]), m = E(() => [ f.e("input"), f.is("disabled", i.value), f.is("checked", a.value), f.is("indeterminate", t.indeterminate), f.is("focus", s.value) ]); return (g, b) => (S(), re(yt(!y(u) && y(o) ? "span" : "label"), { class: H(y(v)), "aria-controls": g.indeterminate ? g.ariaControls : null, onClick: y(h) }, { default: N(() => { var x, w, k, C; return [ D("span", { class: H(y(m)) }, [ g.trueValue || g.falseValue || g.trueLabel || g.falseLabel ? Be((S(), L("input", { key: 0, id: y(r), "onUpdate:modelValue": (_) => xn(c) ? c.value = _ : null, class: H(y(f).e("original")), type: "checkbox", indeterminate: g.indeterminate, name: g.name, tabindex: g.tabindex, disabled: y(i), "true-value": (w = (x = g.trueValue) != null ? x : g.trueLabel) != null ? w : !0, "false-value": (C = (k = g.falseValue) != null ? k : g.falseLabel) != null ? C : !1, onChange: y(p), onFocus: (_) => s.value = !0, onBlur: (_) => s.value = !1, onClick: Ge(() => { }, ["stop"]) }, null, 42, ["id", "onUpdate:modelValue", "indeterminate", "name", "tabindex", "disabled", "true-value", "false-value", "onChange", "onFocus", "onBlur", "onClick"])), [ [oa, y(c)] ]) : Be((S(), L("input", { key: 1, id: y(r), "onUpdate:modelValue": (_) => xn(c) ? c.value = _ : null, class: H(y(f).e("original")), type: "checkbox", indeterminate: g.indeterminate, disabled: y(i), value: y(d), name: g.name, tabindex: g.tabindex, onChange: y(p), onFocus: (_) => s.value = !0, onBlur: (_) => s.value = !1, onClick: Ge(() => { }, ["stop"]) }, null, 42, ["id", "onUpdate:modelValue", "indeterminate", "disabled", "value", "name", "tabindex", "onChange", "onFocus", "onBlur", "onClick"])), [ [oa, y(c)] ]), D("span", { class: H(y(f).e("inner")) }, null, 2) ], 2), y(u) ? (S(), L("span", { key: 0, class: H(y(f).e("label")) }, [ ue(g.$slots, "default"), g.$slots.default ? J("v-if", !0) : (S(), L(Re, { key: 0 }, [ Oe(ge(g.label), 1) ], 64)) ], 2)) : J("v-if", !0) ]; }), _: 3 }, 8, ["class", "aria-controls", "onClick"])); } }); var GLe = /* @__PURE__ */ vt(KLe, [["__file", "checkbox.vue"]]); const WLe = W({ name: "ElCheckboxButton" }), YLe = /* @__PURE__ */ W({ ...WLe, props: $U, emits: EU, setup(e) { const t = e, n = Dr(), { isFocused: r, isChecked: o, isDisabled: a, checkboxButtonSize: i, model: s, actualValue: l, handleChange: u } = OU(t, n), c = be(Ld, void 0), d = wt("checkbox"), p = E(() => { var f, v, m, g; const b = (v = (f = c == null ? void 0 : c.fill) == null ? void 0 : f.value) != null ? v : ""; return { backgroundColor: b, borderColor: b, color: (g = (m = c == null ? void 0 : c.textColor) == null ? void 0 : m.value) != null ? g : "", boxShadow: b ? `-1px 0 0 0 ${b}` : void 0 }; }), h = E(() => [ d.b("button"), d.bm("button", i.value), d.is("disabled", a.value), d.is("checked", o.value), d.is("focus", r.value) ]); return (f, v) => { var m, g, b, x; return S(), L("label", { class: H(y(h)) }, [ f.trueValue || f.falseValue || f.trueLabel || f.falseLabel ? Be((S(), L("input", { key: 0, "onUpdate:modelValue": (w) => xn(s) ? s.value = w : null, class: H(y(d).be("button", "original")), type: "checkbox", name: f.name, tabindex: f.tabindex, disabled: y(a), "true-value": (g = (m = f.trueValue) != null ? m : f.trueLabel) != null ? g : !0, "false-value": (x = (b = f.falseValue) != null ? b : f.falseLabel) != null ? x : !1, onChange: y(u), onFocus: (w) => r.value = !0, onBlur: (w) => r.value = !1, onClick: Ge(() => { }, ["stop"]) }, null, 42, ["onUpdate:modelValue", "name", "tabindex", "disabled", "true-value", "false-value", "onChange", "onFocus", "onBlur", "onClick"])), [ [oa, y(s)] ]) : Be((S(), L("input", { key: 1, "onUpdate:modelValue": (w) => xn(s) ? s.value = w : null, class: H(y(d).be("button", "original")), type: "checkbox", name: f.name, tabindex: f.tabindex, disabled: y(a), value: y(l), onChange: y(u), onFocus: (w) => r.value = !0, onBlur: (w) => r.value = !1, onClick: Ge(() => { }, ["stop"]) }, null, 42, ["onUpdate:modelValue", "name", "tabindex", "disabled", "value", "onChange", "onFocus", "onBlur", "onClick"])), [ [oa, y(s)] ]), f.$slots.default || f.label ? (S(), L("span", { key: 2, class: H(y(d).be("button", "inner")), style: Ye(y(o) ? y(p) : void 0) }, [ ue(f.$slots, "default", {}, () => [ Oe(ge(f.label), 1) ]) ], 6)) : J("v-if", !0) ], 2); }; } }); var FU = /* @__PURE__ */ vt(YLe, [["__file", "checkbox-button.vue"]]); const XLe = $t({ modelValue: { type: at(Array), default: () => [] }, disabled: Boolean, min: Number, max: Number, size: Ii, fill: String, textColor: String, tag: { type: String, default: "div" }, validateEvent: { type: Boolean, default: !0 }, ...$l(["ariaLabel"]) }), ZLe = { [Hn]: (e) => io(e), change: (e) => io(e) }, JLe = W({ name: "ElCheckboxGroup" }), QLe = /* @__PURE__ */ W({ ...JLe, props: XLe, emits: ZLe, setup(e, { emit: t }) { const n = e, r = wt("checkbox"), { formItem: o } = El(), { inputId: a, isLabeledByFormItem: i } = kh(n, { formItemContext: o }), s = async (u) => { t(Hn, u), await Ke(), t("change", u); }, l = E({ get() { return n.modelValue; }, set(u) { s(u); } }); return nt(Ld, { ...TH(Cr(n), [ "size", "min", "max", "disabled", "validateEvent", "fill", "textColor" ]), modelValue: l, changeEvent: s }), he(() => n.modelValue, () => { n.validateEvent && (o == null || o.validate("change").catch((u) => Gn(u))); }), (u, c) => { var d; return S(), re(yt(u.tag), { id: y(a), class: H(y(r).b("group")), role: "group", "aria-label": y(i) ? void 0 : u.ariaLabel || "checkbox-group", "aria-labelledby": y(i) ? (d = y(o)) == null ? void 0 : d.labelId : void 0 }, { default: N(() => [ ue(u.$slots, "default") ]), _: 3 }, 8, ["id", "class", "aria-label", "aria-labelledby"]); }; } }); var TU = /* @__PURE__ */ vt(QLe, [["__file", "checkbox-group.vue"]]); const ME = Kn(GLe, { CheckboxButton: FU, CheckboxGroup: TU }); Vo(FU); Vo(TU); const AU = $t({ modelValue: { type: [String, Number, Boolean], default: void 0 }, size: Ii, disabled: Boolean, label: { type: [String, Number, Boolean], default: void 0 }, value: { type: [String, Number, Boolean], default: void 0 }, name: { type: String, default: void 0 } }), eRe = $t({ ...AU, border: Boolean }), IU = { [Hn]: (e) => Yr(e) || Wt(e) || pa(e), [wu]: (e) => Yr(e) || Wt(e) || pa(e) }, PU = Symbol("radioGroupKey"), LU = (e, t) => { const n = z(), r = be(PU, void 0), o = E(() => !!r), a = E(() => wf(e.value) ? e.label : e.value), i = E({ get() { return o.value ? r.modelValue : e.modelValue; }, set(d) { o.value ? r.changeEvent(d) : t && t(Hn, d), n.value.checked = e.modelValue === a.value; } }), s = ss(E(() => r == null ? void 0 : r.size)), l = xh(E(() => r == null ? void 0 : r.disabled)), u = z(!1), c = E(() => l.value || o.value && i.value !== a.value ? -1 : 0); return nu({ from: "label act as value", replacement: "value", version: "3.0.0", scope: "el-radio", ref: "https://element-plus.org/en-US/component/radio.html" }, E(() => o.value && wf(e.value))), { radioRef: n, isGroup: o, radioGroup: r, focus: u, size: s, disabled: l, tabIndex: c, modelValue: i, actualValue: a }; }, tRe = W({ name: "ElRadio" }), nRe = /* @__PURE__ */ W({ ...tRe, props: eRe, emits: IU, setup(e, { emit: t }) { const n = e, r = wt("radio"), { radioRef: o, radioGroup: a, focus: i, size: s, disabled: l, modelValue: u, actualValue: c } = LU(n, t); function d() { Ke(() => t("change", u.value)); } return (p, h) => { var f; return S(), L("label", { class: H([ y(r).b(), y(r).is("disabled", y(l)), y(r).is("focus", y(i)), y(r).is("bordered", p.border), y(r).is("checked", y(u) === y(c)), y(r).m(y(s)) ]) }, [ D("span", { class: H([ y(r).e("input"), y(r).is("disabled", y(l)), y(r).is("checked", y(u) === y(c)) ]) }, [ Be(D("input", { ref_key: "radioRef", ref: o, "onUpdate:modelValue": (v) => xn(u) ? u.value = v : null, class: H(y(r).e("original")), value: y(c), name: p.name || ((f = y(a)) == null ? void 0 : f.name), disabled: y(l), checked: y(u) === y(c), type: "radio", onFocus: (v) => i.value = !0, onBlur: (v) => i.value = !1, onChange: d, onClick: Ge(() => { }, ["stop"]) }, null, 42, ["onUpdate:modelValue", "value", "name", "disabled", "checked", "onFocus", "onBlur", "onClick"]), [ [F0, y(u)] ]), D("span", { class: H(y(r).e("inner")) }, null, 2) ], 2), D("span", { class: H(y(r).e("label")), onKeydown: Ge(() => { }, ["stop"]) }, [ ue(p.$slots, "default", {}, () => [ Oe(ge(p.label), 1) ]) ], 42, ["onKeydown"]) ], 2); }; } }); var rRe = /* @__PURE__ */ vt(nRe, [["__file", "radio.vue"]]); const oRe = $t({ ...AU }), aRe = W({ name: "ElRadioButton" }), iRe = /* @__PURE__ */ W({ ...aRe, props: oRe, setup(e) { const t = e, n = wt("radio"), { radioRef: r, focus: o, size: a, disabled: i, modelValue: s, radioGroup: l, actualValue: u } = LU(t), c = E(() => ({ 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 (d, p) => { var h; return S(), L("label", { class: H([ y(n).b("button"), y(n).is("active", y(s) === y(u)), y(n).is("disabled", y(i)), y(n).is("focus", y(o)), y(n).bm("button", y(a)) ]) }, [ Be(D("input", { ref_key: "radioRef", ref: r, "onUpdate:modelValue": (f) => xn(s) ? s.value = f : null, class: H(y(n).be("button", "original-radio")), value: y(u), type: "radio", name: d.name || ((h = y(l)) == null ? void 0 : h.name), disabled: y(i), onFocus: (f) => o.value = !0, onBlur: (f) => o.value = !1, onClick: Ge(() => { }, ["stop"]) }, null, 42, ["onUpdate:modelValue", "value", "name", "disabled", "onFocus", "onBlur", "onClick"]), [ [F0, y(s)] ]), D("span", { class: H(y(n).be("button", "inner")), style: Ye(y(s) === y(u) ? y(c) : {}), onKeydown: Ge(() => { }, ["stop"]) }, [ ue(d.$slots, "default", {}, () => [ Oe(ge(d.label), 1) ]) ], 46, ["onKeydown"]) ], 2); }; } }); var RU = /* @__PURE__ */ vt(iRe, [["__file", "radio-button.vue"]]); const sRe = $t({ id: { type: String, default: void 0 }, size: Ii, 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 }, ...$l(["ariaLabel"]) }), lRe = IU, uRe = W({ name: "ElRadioGroup" }), cRe = /* @__PURE__ */ W({ ...uRe, props: sRe, emits: lRe, setup(e, { emit: t }) { const n = e, r = wt("radio"), o = xi(), a = z(), { formItem: i } = El(), { inputId: s, isLabeledByFormItem: l } = kh(n, { formItemContext: i }), u = (d) => { t(Hn, d), Ke(() => t("change", d)); }; ut(() => { const d = a.value.querySelectorAll("[type=radio]"), p = d[0]; !Array.from(d).some((h) => h.checked) && p && (p.tabIndex = 0); }); const c = E(() => n.name || o.value); return nt(PU, en({ ...Cr(n), changeEvent: u, name: c })), he(() => n.modelValue, () => { n.validateEvent && (i == null || i.validate("change").catch((d) => Gn(d))); }), (d, p) => (S(), L("div", { id: y(s), ref_key: "radioGroupRef", ref: a, class: H(y(r).b("group")), role: "radiogroup", "aria-label": y(l) ? void 0 : d.ariaLabel || "radio-group", "aria-labelledby": y(l) ? y(i).labelId : void 0 }, [ ue(d.$slots, "default") ], 10, ["id", "aria-label", "aria-labelledby"])); } }); var NU = /* @__PURE__ */ vt(cRe, [["__file", "radio-group.vue"]]); const MU = Kn(rRe, { RadioButton: RU, RadioGroup: NU }), dRe = Vo(NU); Vo(RU); var pRe = W({ name: "NodeContent", setup() { return { ns: wt("cascader-node") }; }, render() { const { ns: e } = this, { node: t, panel: n } = this.$parent, { data: r, label: o } = t, { renderLabelFn: a } = n; return Gt("span", { class: e.e("label") }, a ? a({ node: t, data: r }) : o); } }); const DE = Symbol(), fRe = W({ name: "ElCascaderNode", components: { ElCheckbox: ME, ElRadio: MU, NodeContent: pRe, ElIcon: Qt, Check: pN, Loading: Ei, ArrowRight: jf }, props: { node: { type: Object, required: !0 }, menuId: String }, emits: ["expand"], setup(e, { emit: t }) { const n = be(DE), r = wt("cascader-node"), o = E(() => n.isHoverMenu), a = E(() => n.config.multiple), i = E(() => n.config.checkStrictly), s = E(() => { var C; return (C = n.checkedNodes[0]) == null ? void 0 : C.uid; }), l = E(() => e.node.isDisabled), u = E(() => e.node.isLeaf), c = E(() => i.value && !u.value || !l.value), d = E(() => h(n.expandingNode)), p = E(() => i.value && n.checkedNodes.some(h)), h = (C) => { var _; const { level: $, uid: O } = e.node; return ((_ = C == null ? void 0 : C.pathNodes[$ - 1]) == null ? void 0 : _.uid) === O; }, f = () => { d.value || n.expandNode(e.node); }, v = (C) => { const { node: _ } = e; C !== _.checked && n.handleCheckChange(_, C); }, m = () => { n.lazyLoad(e.node, () => { u.value || f(); }); }, g = (C) => { o.value && (b(), !u.value && t("expand", C)); }, b = () => { const { node: C } = e; !c.value || C.loading || (C.loaded ? f() : m()); }, x = () => { o.value && !u.value || (u.value && !l.value && !i.value && !a.value ? k(!0) : b()); }, w = (C) => { i.value ? (v(C), e.node.loaded && f()) : k(C); }, k = (C) => { e.node.loaded ? (v(C), !i.value && f()) : m(); }; return { panel: n, isHoverMenu: o, multiple: a, checkStrictly: i, checkedNodeId: s, isDisabled: l, isLeaf: u, expandable: c, inExpandingPath: d, inCheckedPath: p, ns: r, handleHoverExpand: g, handleExpand: b, handleClick: x, handleCheck: k, handleSelectCheck: w }; } }); function hRe(e, t, n, r, o, a) { const i = Ve("el-checkbox"), s = Ve("el-radio"), l = Ve("check"), u = Ve("el-icon"), c = Ve("node-content"), d = Ve("loading"), p = Ve("arrow-right"); return S(), L("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: H([ 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 }, [ J(" prefix "), e.multiple ? (S(), re(i, { key: 0, "model-value": e.node.checked, indeterminate: e.node.indeterminate, disabled: e.isDisabled, onClick: Ge(() => { }, ["stop"]), "onUpdate:modelValue": e.handleSelectCheck }, null, 8, ["model-value", "indeterminate", "disabled", "onClick", "onUpdate:modelValue"])) : e.checkStrictly ? (S(), re(s, { key: 1, "model-value": e.checkedNodeId, label: e.node.uid, disabled: e.isDisabled, "onUpdate:modelValue": e.handleSelectCheck, onClick: Ge(() => { }, ["stop"]) }, { default: N(() => [ J(` Add an empty element to avoid render label, do not use empty fragment here for https://github.com/vuejs/vue-next/pull/2485 `), D("span") ]), _: 1 }, 8, ["model-value", "label", "disabled", "onUpdate:modelValue", "onClick"])) : e.isLeaf && e.node.checked ? (S(), re(u, { key: 2, class: H(e.ns.e("prefix")) }, { default: N(() => [ q(l) ]), _: 1 }, 8, ["class"])) : J("v-if", !0), J(" content "), q(c), J(" postfix "), e.isLeaf ? J("v-if", !0) : (S(), L(Re, { key: 3 }, [ e.node.loading ? (S(), re(u, { key: 0, class: H([e.ns.is("loading"), e.ns.e("postfix")]) }, { default: N(() => [ q(d) ]), _: 1 }, 8, ["class"])) : (S(), re(u, { key: 1, class: H(["arrow-right", e.ns.e("postfix")]) }, { default: N(() => [ q(p) ]), _: 1 }, 8, ["class"])) ], 64)) ], 42, ["id", "aria-haspopup", "aria-owns", "aria-expanded", "tabindex", "onMouseenter", "onFocus", "onClick"]); } var vRe = /* @__PURE__ */ vt(fRe, [["render", hRe], ["__file", "node.vue"]]); const gRe = W({ name: "ElCascaderMenu", components: { Loading: Ei, ElIcon: Qt, ElScrollbar: o1, ElCascaderNode: vRe }, props: { nodes: { type: Array, required: !0 }, index: { type: Number, required: !0 } }, setup(e) { const t = st(), n = wt("cascader-menu"), { t: r } = Ho(), o = xi(); let a = null, i = null; const s = be(DE), l = z(null), u = E(() => !e.nodes.length), c = E(() => !s.initialLoaded), d = E(() => `${o.value}-${e.index}`), p = (m) => { a = m.target; }, h = (m) => { if (!(!s.isHoverMenu || !a || !l.value)) if (a.contains(m.target)) { f(); const g = t.vnode.el, { left: b } = g.getBoundingClientRect(), { offsetWidth: x, offsetHeight: w } = g, k = m.clientX - b, C = a.offsetTop, _ = C + a.offsetHeight; l.value.innerHTML = ` `; } else i || (i = window.setTimeout(v, s.config.hoverThreshold)); }, f = () => { i && (clearTimeout(i), i = null); }, v = () => { l.value && (l.value.innerHTML = "", f()); }; return { ns: n, panel: s, hoverZone: l, isEmpty: u, isLoading: c, menuId: d, t: r, handleExpand: p, handleMouseMove: h, clearHoverZone: v }; } }); function mRe(e, t, n, r, o, a) { const i = Ve("el-cascader-node"), s = Ve("loading"), l = Ve("el-icon"), u = Ve("el-scrollbar"); return S(), re(u, { key: e.menuId, tag: "ul", role: "menu", class: H(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: N(() => { var c; return [ (S(!0), L(Re, null, mt(e.nodes, (d) => (S(), re(i, { key: d.uid, node: d, "menu-id": e.menuId, onExpand: e.handleExpand }, null, 8, ["node", "menu-id", "onExpand"]))), 128)), e.isLoading ? (S(), L("div", { key: 0, class: H(e.ns.e("empty-text")) }, [ q(l, { size: "14", class: H(e.ns.is("loading")) }, { default: N(() => [ q(s) ]), _: 1 }, 8, ["class"]), Oe(" " + ge(e.t("el.cascader.loading")), 1) ], 2)) : e.isEmpty ? (S(), L("div", { key: 1, class: H(e.ns.e("empty-text")) }, [ ue(e.$slots, "empty", {}, () => [ Oe(ge(e.t("el.cascader.noData")), 1) ]) ], 2)) : (c = e.panel) != null && c.isHoverMenu ? (S(), L("svg", { key: 2, ref: "hoverZone", class: H(e.ns.e("hover-zone")) }, null, 2)) : J("v-if", !0) ]; }), _: 3 }, 8, ["class", "wrap-class", "view-class", "onMousemove", "onMouseleave"]); } var yRe = /* @__PURE__ */ vt(gRe, [["render", mRe], ["__file", "menu.vue"]]); let bRe = 0; const wRe = (e) => { const t = [e]; let { parent: n } = e; for (; n; ) t.unshift(n), n = n.parent; return t; }; class nd { constructor(t, n, r, o = !1) { this.data = t, this.config = n, this.parent = r, this.root = o, this.uid = bRe++, this.checked = !1, this.indeterminate = !1, this.loading = !1; const { value: a, label: i, children: s } = n, l = t[s], u = wRe(this); this.level = o ? 0 : r ? r.level + 1 : 1, this.value = t[a], this.label = t[i], this.pathNodes = u, this.pathValues = u.map((c) => c.value), this.pathLabels = u.map((c) => c.label), this.childrenData = l, this.children = (l || []).map((c) => new nd(c, n, this)), this.loaded = !n.lazy || this.isLeaf || !m_(l); } get isDisabled() { const { data: t, parent: n, config: r } = this, { disabled: o, checkStrictly: a } = r; return (Rn(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: i } = n, s = Rn(i) ? i(t, this) : t[i]; return Xi(s) ? a && !o ? !1 : !(Array.isArray(r) && r.length) : !!s; } get valueByOption() { return this.config.emitPath ? this.pathValues : this.value; } appendChild(t) { const { childrenData: n, children: r } = this, o = new nd(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${hL(t)}`; this.children.forEach((o) => { o && (o.broadcast(t, ...n), o[r] && o[r](...n)); }); } emit(t, ...n) { const { parent: r } = this, o = `onChild${hL(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 i = a.checked ? 1 : a.indeterminate ? 0.5 : 0; return o + i; }, 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 __ = (e, t) => e.reduce((n, r) => (r.isLeaf ? n.push(r) : (!t && n.push(r), n = n.concat(__(r.children, t))), n), []); class XL { constructor(t, n) { this.config = n; const r = (t || []).map((o) => new nd(o, this.config)); this.nodes = r, this.allNodes = __(r, !1), this.leafNodes = __(r, !0); } getNodes() { return this.nodes; } getFlattedNodes(t) { return t ? this.leafNodes : this.allNodes; } appendNode(t, n) { const r = n ? n.appendChild(t) : new nd(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((r) => di(r.value, t) || di(r.pathValues, t)) || null; } getSameNode(t) { return t && this.getFlattedNodes(!1).find(({ value: n, level: r }) => di(t.value, n) && t.level === r) || null; } } const DU = $t({ modelValue: { type: at([Number, String, Array]) }, options: { type: at(Array), default: () => [] }, props: { type: at(Object), default: () => ({}) } }), xRe = { expandTrigger: "click", multiple: !1, checkStrictly: !1, emitPath: !0, lazy: !1, lazyLoad: Qi, value: "value", label: "label", children: "children", leaf: "leaf", disabled: "disabled", hoverThreshold: 500 }, kRe = (e) => E(() => ({ ...xRe, ...e.props })), ZL = (e) => { if (!e) return 0; const t = e.id.split("-"); return Number(t[t.length - 2]); }, CRe = (e) => { if (!e) return; const t = e.querySelector("input"); t ? t.click() : tH(e) && e.click(); }, _Re = (e, t) => { const n = t.slice(0), r = n.map((a) => a.uid), o = e.reduce((a, i) => { const s = r.indexOf(i.uid); return s > -1 && (a.push(i), n.splice(s, 1), r.splice(s, 1)), a; }, []); return o.push(...n), o; }, SRe = W({ name: "ElCascaderPanel", components: { ElCascaderMenu: yRe }, props: { ...DU, border: { type: Boolean, default: !0 }, renderLabel: Function }, emits: [Hn, wu, "close", "expand-change"], setup(e, { emit: t, slots: n }) { let r = !1; const o = wt("cascader"), a = kRe(e); let i = null; const s = z(!0), l = z([]), u = z(null), c = z([]), d = z(null), p = z([]), h = E(() => a.value.expandTrigger === "hover"), f = E(() => e.renderLabel || n.default), v = () => { const { options: T } = e, R = a.value; r = !1, i = new XL(T, R), c.value = [i.getNodes()], R.lazy && m_(e.options) ? (s.value = !1, m(void 0, (M) => { M && (i = new XL(M, R), c.value = [i.getNodes()]), s.value = !0, $(!1, !0); })) : $(!1, !0); }, m = (T, R) => { const M = a.value; T = T || new nd({}, M, void 0, !0), T.loading = !0; const j = (P) => { const V = T, U = V.root ? null : V; P && (i == null || i.appendNodes(P, U)), V.loading = !1, V.loaded = !0, V.childrenData = V.childrenData || [], R && R(P); }; M.lazyLoad(T, j); }, g = (T, R) => { var M; const { level: j } = T, P = c.value.slice(0, j); let V; T.isLeaf ? V = T.pathNodes[j - 2] : (V = T, P.push(T.children)), ((M = d.value) == null ? void 0 : M.uid) !== (V == null ? void 0 : V.uid) && (d.value = T, c.value = P, !R && t("expand-change", (T == null ? void 0 : T.pathValues) || [])); }, b = (T, R, M = !0) => { const { checkStrictly: j, multiple: P } = a.value, V = p.value[0]; r = !0, !P && (V == null || V.doCheck(!1)), T.doCheck(R), _(), M && !P && !j && t("close"), !M && !P && !j && x(T); }, x = (T) => { T && (T = T.parent, x(T), T && g(T)); }, w = (T) => i == null ? void 0 : i.getFlattedNodes(T), k = (T) => { var R; return (R = w(T)) == null ? void 0 : R.filter((M) => M.checked !== !1); }, C = () => { p.value.forEach((T) => T.doCheck(!1)), _(), c.value = c.value.slice(0, 1), d.value = null, t("expand-change", []); }, _ = () => { var T; const { checkStrictly: R, multiple: M } = a.value, j = p.value, P = k(!R), V = _Re(j, P), U = V.map((G) => G.valueByOption); p.value = V, u.value = M ? U : (T = U[0]) != null ? T : null; }, $ = (T = !1, R = !1) => { const { modelValue: M } = e, { lazy: j, multiple: P, checkStrictly: V } = a.value, U = !V; if (!(!s.value || r || !R && di(M, u.value))) if (j && !T) { const G = yL(UAe(bL(M))).map((se) => i == null ? void 0 : i.getNodeByValue(se)).filter((se) => !!se && !se.loaded && !se.loading); G.length ? G.forEach((se) => { m(se, () => $(!1, R)); }) : $(!0, R); } else { const G = P ? bL(M) : [M], se = yL(G.map((ae) => i == null ? void 0 : i.getNodeByValue(ae, U))); O(se, R), u.value = CH(M); } }, O = (T, R = !0) => { const { checkStrictly: M } = a.value, j = p.value, P = T.filter((G) => !!G && (M || G.isLeaf)), V = i == null ? void 0 : i.getSameNode(d.value), U = R && V || P[0]; U ? U.pathNodes.forEach((G) => g(G, !0)) : d.value = null, j.forEach((G) => G.doCheck(!1)), en(P).forEach((G) => G.doCheck(!0)), p.value = P, Ke(F); }, F = () => { pn && l.value.forEach((T) => { const R = T == null ? void 0 : T.$el; if (R) { const M = R.querySelector(`.${o.namespace.value}-scrollbar__wrap`), j = R.querySelector(`.${o.b("node")}.${o.is("active")}`) || R.querySelector(`.${o.b("node")}.in-active-path`); LH(M, j); } }); }, A = (T) => { const R = T.target, { code: M } = T; switch (M) { case Yt.up: case Yt.down: { T.preventDefault(); const j = M === Yt.up ? -1 : 1; ig(nH(R, j, `.${o.b("node")}[tabindex="-1"]`)); break; } case Yt.left: { T.preventDefault(); const j = l.value[ZL(R) - 1], P = j == null ? void 0 : j.$el.querySelector(`.${o.b("node")}[aria-expanded="true"]`); ig(P); break; } case Yt.right: { T.preventDefault(); const j = l.value[ZL(R) + 1], P = j == null ? void 0 : j.$el.querySelector(`.${o.b("node")}[tabindex="-1"]`); ig(P); break; } case Yt.enter: CRe(R); break; } }; return nt(DE, en({ config: a, expandingNode: d, checkedNodes: p, isHoverMenu: h, initialLoaded: s, renderLabelFn: f, lazyLoad: m, expandNode: g, handleCheckChange: b })), he([a, () => e.options], v, { deep: !0, immediate: !0 }), he(() => e.modelValue, () => { r = !1, $(); }, { deep: !0 }), he(() => u.value, (T) => { di(T, e.modelValue) || (t(Hn, T), t(wu, T)); }), wW(() => l.value = []), ut(() => !m_(e.modelValue) && $()), { ns: o, menuList: l, menus: c, checkedNodes: p, handleKeyDown: A, handleCheckChange: b, getFlattedNodes: w, getCheckedNodes: k, clearCheckedNodes: C, calculateCheckedValue: _, scrollToExpandingNode: F }; } }); function $Re(e, t, n, r, o, a) { const i = Ve("el-cascader-menu"); return S(), L("div", { class: H([e.ns.b("panel"), e.ns.is("bordered", e.border)]), onKeydown: e.handleKeyDown }, [ (S(!0), L(Re, null, mt(e.menus, (s, l) => (S(), re(i, { key: l, ref_for: !0, ref: (u) => e.menuList[l] = u, index: l, nodes: [...s] }, { empty: N(() => [ ue(e.$slots, "empty") ]), _: 2 }, 1032, ["index", "nodes"]))), 128)) ], 42, ["onKeydown"]); } var ERe = /* @__PURE__ */ vt(SRe, [["render", $Re], ["__file", "index.vue"]]); const ORe = Kn(ERe), $f = $t({ type: { type: String, values: ["primary", "success", "info", "warning", "danger"], default: "primary" }, closable: Boolean, disableTransitions: Boolean, hit: Boolean, color: String, size: { type: String, values: t1 }, effect: { type: String, values: ["dark", "light", "plain"], default: "light" }, round: Boolean }), FRe = { close: (e) => e instanceof MouseEvent, click: (e) => e instanceof MouseEvent }, TRe = W({ name: "ElTag" }), ARe = /* @__PURE__ */ W({ ...TRe, props: $f, emits: FRe, setup(e, { emit: t }) { const n = e, r = ss(), o = wt("tag"), a = E(() => { const { type: u, hit: c, effect: d, closable: p, round: h } = n; return [ o.b(), o.is("closable", p), o.m(u || "primary"), o.m(r.value), o.m(d), o.is("hit", c), o.is("round", h) ]; }), i = (u) => { t("close", u); }, s = (u) => { t("click", u); }, l = (u) => { u.component.subTree.component.bum = null; }; return (u, c) => u.disableTransitions ? (S(), L("span", { key: 0, class: H(y(a)), style: Ye({ backgroundColor: u.color }), onClick: s }, [ D("span", { class: H(y(o).e("content")) }, [ ue(u.$slots, "default") ], 2), u.closable ? (S(), re(y(Qt), { key: 0, class: H(y(o).e("close")), onClick: Ge(i, ["stop"]) }, { default: N(() => [ q(y(Bo)) ]), _: 1 }, 8, ["class", "onClick"])) : J("v-if", !0) ], 6)) : (S(), re(nr, { key: 1, name: `${y(o).namespace.value}-zoom-in-center`, appear: "", onVnodeMounted: l }, { default: N(() => [ D("span", { class: H(y(a)), style: Ye({ backgroundColor: u.color }), onClick: s }, [ D("span", { class: H(y(o).e("content")) }, [ ue(u.$slots, "default") ], 2), u.closable ? (S(), re(y(Qt), { key: 0, class: H(y(o).e("close")), onClick: Ge(i, ["stop"]) }, { default: N(() => [ q(y(Bo)) ]), _: 1 }, 8, ["class", "onClick"])) : J("v-if", !0) ], 6) ]), _: 3 }, 8, ["name"])); } }); var IRe = /* @__PURE__ */ vt(ARe, [["__file", "tag.vue"]]); const xu = Kn(IRe), PRe = $t({ ...DU, size: Ii, placeholder: String, disabled: Boolean, clearable: Boolean, filterable: Boolean, filterMethod: { type: at(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: at(Function), default: () => !0 }, placement: { type: at(String), values: bh, default: "bottom-start" }, fallbackPlacements: { type: at(Array), default: ["bottom-start", "bottom", "top-start", "top", "right", "left"] }, popperClass: { type: String, default: "" }, teleported: fo.teleported, tagType: { ...$f.type, default: "info" }, tagEffect: { ...$f.effect, default: "light" }, validateEvent: { type: Boolean, default: !0 }, persistent: { type: Boolean, default: !0 }, ...TE }), LRe = { [Hn]: (e) => !0, [wu]: (e) => !0, focus: (e) => e instanceof FocusEvent, blur: (e) => e instanceof FocusEvent, clear: () => !0, visibleChange: (e) => pa(e), expandChange: (e) => !!e, removeTag: (e) => !!e }, RRe = "ElCascader", NRe = W({ name: RRe }), MRe = /* @__PURE__ */ W({ ...NRe, props: PRe, emits: LRe, setup(e, { expose: t, emit: n }) { const r = e, o = { modifiers: [ { name: "arrowPosition", enabled: !0, phase: "main", fn: ({ state: fe }) => { const { modifiersData: Te, placement: Se } = fe; ["right", "left", "bottom", "top"].includes(Se) || (Te.arrow.x = 35); }, requires: ["arrow"] } ] }, a = Rf(); let i = 0, s = 0; const l = wt("cascader"), u = wt("input"), { t: c } = Ho(), { form: d, formItem: p } = El(), { valueOnClear: h } = sU(r), { isComposing: f, handleComposition: v } = FE({ afterComposition(fe) { var Te; const Se = (Te = fe.target) == null ? void 0 : Te.value; lt(Se); } }), m = z(null), g = z(null), b = z(null), x = z(null), w = z(null), k = z(!1), C = z(!1), _ = z(!1), $ = z(!1), O = z(""), F = z(""), A = z([]), T = z([]), R = z([]), M = E(() => a.style), j = E(() => r.disabled || (d == null ? void 0 : d.disabled)), P = E(() => r.placeholder || c("el.cascader.placeholder")), V = E(() => F.value || A.value.length > 0 || f.value ? "" : P.value), U = ss(), G = E(() => ["small"].includes(U.value) ? "small" : "default"), se = E(() => !!r.props.multiple), ae = E(() => !r.filterable || se.value), de = E(() => se.value ? F.value : O.value), me = E(() => { var fe; return ((fe = x.value) == null ? void 0 : fe.checkedNodes) || []; }), te = E(() => !r.clearable || j.value || _.value || !C.value ? !1 : !!me.value.length), oe = E(() => { const { showAllLevels: fe, separator: Te } = r, Se = me.value; return Se.length ? se.value ? "" : Se[0].calcText(fe, Te) : ""; }), ne = E(() => (p == null ? void 0 : p.validateState) || ""), ee = E({ get() { return CH(r.modelValue); }, set(fe) { const Te = fe ?? h.value; n(Hn, Te), n(wu, Te), r.validateEvent && (p == null || p.validate("change").catch((Se) => Gn(Se))); } }), Z = E(() => [ l.b(), l.m(U.value), l.is("disabled", j.value), a.class ]), le = E(() => [ u.e("icon"), "icon-arrow-down", l.is("reverse", k.value) ]), pe = E(() => l.is("focus", k.value || $.value)), ke = E(() => { var fe, Te; return (Te = (fe = m.value) == null ? void 0 : fe.popperRef) == null ? void 0 : Te.contentRef; }), Ne = (fe) => { var Te, Se, Ue; j.value || (fe = fe ?? !k.value, fe !== k.value && (k.value = fe, (Se = (Te = g.value) == null ? void 0 : Te.input) == null || Se.setAttribute("aria-expanded", `${fe}`), fe ? (De(), Ke((Ue = x.value) == null ? void 0 : Ue.scrollToExpandingNode)) : r.filterable && Y(), n("visibleChange", fe))); }, De = () => { Ke(() => { var fe; (fe = m.value) == null || fe.updatePopper(); }); }, _e = () => { _.value = !1; }, Fe = (fe) => { const { showAllLevels: Te, separator: Se } = r; return { node: fe, key: fe.uid, text: fe.calcText(Te, Se), hitState: !1, closable: !j.value && !fe.isDisabled, isCollapseTag: !1 }; }, Ie = (fe) => { var Te; const Se = fe.node; Se.doCheck(!1), (Te = x.value) == null || Te.calculateCheckedValue(), n("removeTag", Se.valueByOption); }, Ae = () => { if (!se.value) return; const fe = me.value, Te = [], Se = []; if (fe.forEach((Ue) => Se.push(Fe(Ue))), T.value = Se, fe.length) { fe.slice(0, r.maxCollapseTags).forEach((Pt) => Te.push(Fe(Pt))); const Ue = fe.slice(r.maxCollapseTags), zt = Ue.length; zt && (r.collapseTags ? Te.push({ key: -1, text: `+ ${zt}`, closable: !1, isCollapseTag: !0 }) : Ue.forEach((Pt) => Te.push(Fe(Pt)))); } A.value = Te; }, qe = () => { var fe, Te; const { filterMethod: Se, showAllLevels: Ue, separator: zt } = r, Pt = (Te = (fe = x.value) == null ? void 0 : fe.getFlattedNodes(!r.props.checkStrictly)) == null ? void 0 : Te.filter((qt) => qt.isDisabled ? !1 : (qt.calcText(Ue, zt), Se(qt, de.value))); se.value && (A.value.forEach((qt) => { qt.hitState = !1; }), T.value.forEach((qt) => { qt.hitState = !1; })), _.value = !0, R.value = Pt, De(); }, et = () => { var fe; let Te; _.value && w.value ? Te = w.value.$el.querySelector(`.${l.e("suggestion-item")}`) : Te = (fe = x.value) == null ? void 0 : fe.$el.querySelector(`.${l.b("node")}[tabindex="-1"]`), Te && (Te.focus(), !_.value && Te.click()); }, He = () => { var fe, Te; const Se = (fe = g.value) == null ? void 0 : fe.input, Ue = b.value, zt = (Te = w.value) == null ? void 0 : Te.$el; if (!(!pn || !Se)) { if (zt) { const Pt = zt.querySelector(`.${l.e("suggestion-list")}`); Pt.style.minWidth = `${Se.offsetWidth}px`; } if (Ue) { const { offsetHeight: Pt } = Ue, qt = A.value.length > 0 ? `${Math.max(Pt + 6, i)}px` : `${i}px`; Se.style.height = qt, De(); } } }, ot = (fe) => { var Te; return (Te = x.value) == null ? void 0 : Te.getCheckedNodes(fe); }, tt = (fe) => { De(), n("expandChange", fe); }, Qe = (fe) => { if (!f.value) switch (fe.code) { case Yt.enter: Ne(); break; case Yt.down: Ne(!0), Ke(et), fe.preventDefault(); break; case Yt.esc: k.value === !0 && (fe.preventDefault(), fe.stopPropagation(), Ne(!1)); break; case Yt.tab: Ne(!1); break; } }, I = () => { var fe; (fe = x.value) == null || fe.clearCheckedNodes(), !k.value && r.filterable && Y(), Ne(!1), n("clear"); }, Y = () => { const { value: fe } = oe; O.value = fe, F.value = fe; }, ve = (fe) => { var Te, Se; const { checked: Ue } = fe; se.value ? (Te = x.value) == null || Te.handleCheckChange(fe, !Ue, !1) : (!Ue && ((Se = x.value) == null || Se.handleCheckChange(fe, !0, !1)), Ne(!1)); }, we = (fe) => { const Te = fe.target, { code: Se } = fe; switch (Se) { case Yt.up: case Yt.down: { const Ue = Se === Yt.up ? -1 : 1; ig(nH(Te, Ue, `.${l.e("suggestion-item")}[tabindex="-1"]`)); break; } case Yt.enter: Te.click(); break; } }, ye = () => { const fe = A.value, Te = fe[fe.length - 1]; s = F.value ? 0 : s + 1, !(!Te || !s || r.collapseTags && fe.length > 1) && (Te.hitState ? Ie(Te) : Te.hitState = !0); }, Pe = (fe) => { const Te = fe.target, Se = l.e("search-input"); Te.className === Se && ($.value = !0), n("focus", fe); }, Ce = (fe) => { $.value = !1, n("blur", fe); }, ze = OH(() => { const { value: fe } = de; if (!fe) return; const Te = r.beforeFilter(fe); V4e(Te) ? Te.then(qe).catch(() => { }) : Te !== !1 ? qe() : _e(); }, r.debounce), lt = (fe, Te) => { !k.value && Ne(!0), !(Te != null && Te.isComposing) && (fe ? ze() : _e()); }, rt = (fe) => Number.parseFloat(E4e(u.cssVarName("input-height"), fe).value) - 2; return he(_, De), he([me, j, () => r.collapseTags], Ae), he(A, () => { Ke(() => He()); }), he(U, async () => { await Ke(); const fe = g.value.input; i = rt(fe) || i, He(); }), he(oe, Y, { immediate: !0 }), ut(() => { const fe = g.value.input, Te = rt(fe); i = fe.offsetHeight || Te, Ra(fe, He); }), t({ getCheckedNodes: ot, cascaderPanelRef: x, togglePopperVisible: Ne, contentRef: ke, presentText: oe }), (fe, Te) => (S(), re(y(Sf), { ref_key: "tooltipRef", ref: m, visible: k.value, teleported: fe.teleported, "popper-class": [y(l).e("dropdown"), fe.popperClass], "popper-options": o, "fallback-placements": fe.fallbackPlacements, "stop-popper-mouse-event": !1, "gpu-acceleration": !1, placement: fe.placement, transition: `${y(l).namespace.value}-zoom-in-top`, effect: "light", pure: "", persistent: fe.persistent, onHide: _e }, { default: N(() => [ Be((S(), L("div", { class: H(y(Z)), style: Ye(y(M)), onClick: () => Ne(y(ae) ? void 0 : !0), onKeydown: Qe, onMouseenter: (Se) => C.value = !0, onMouseleave: (Se) => C.value = !1 }, [ q(y(Pd), { ref_key: "input", ref: g, modelValue: O.value, "onUpdate:modelValue": (Se) => O.value = Se, placeholder: y(V), readonly: y(ae), disabled: y(j), "validate-event": !1, size: y(U), class: H(y(pe)), tabindex: y(se) && fe.filterable && !y(j) ? -1 : void 0, onCompositionstart: y(v), onCompositionupdate: y(v), onCompositionend: y(v), onFocus: Pe, onBlur: Ce, onInput: lt }, { suffix: N(() => [ y(te) ? (S(), re(y(Qt), { key: "clear", class: H([y(u).e("icon"), "icon-circle-close"]), onClick: Ge(I, ["stop"]) }, { default: N(() => [ q(y($i)) ]), _: 1 }, 8, ["class", "onClick"])) : (S(), re(y(Qt), { key: "arrow-down", class: H(y(le)), onClick: Ge((Se) => Ne(), ["stop"]) }, { default: N(() => [ q(y(ma)) ]), _: 1 }, 8, ["class", "onClick"])) ]), _: 1 }, 8, ["modelValue", "onUpdate:modelValue", "placeholder", "readonly", "disabled", "size", "class", "tabindex", "onCompositionstart", "onCompositionupdate", "onCompositionend"]), y(se) ? (S(), L("div", { key: 0, ref_key: "tagWrapper", ref: b, class: H([ y(l).e("tags"), y(l).is("validate", !!y(ne)) ]) }, [ (S(!0), L(Re, null, mt(A.value, (Se) => (S(), re(y(xu), { key: Se.key, type: fe.tagType, size: y(G), effect: fe.tagEffect, hit: Se.hitState, closable: Se.closable, "disable-transitions": "", onClose: (Ue) => Ie(Se) }, { default: N(() => [ Se.isCollapseTag === !1 ? (S(), L("span", { key: 0 }, ge(Se.text), 1)) : (S(), re(y(Sf), { key: 1, disabled: k.value || !fe.collapseTagsTooltip, "fallback-placements": ["bottom", "top", "right", "left"], placement: "bottom", effect: "light" }, { default: N(() => [ D("span", null, ge(Se.text), 1) ]), content: N(() => [ D("div", { class: H(y(l).e("collapse-tags")) }, [ (S(!0), L(Re, null, mt(T.value.slice(fe.maxCollapseTags), (Ue, zt) => (S(), L("div", { key: zt, class: H(y(l).e("collapse-tag")) }, [ (S(), re(y(xu), { key: Ue.key, class: "in-tooltip", type: fe.tagType, size: y(G), effect: fe.tagEffect, hit: Ue.hitState, closable: Ue.closable, "disable-transitions": "", onClose: (Pt) => Ie(Ue) }, { default: N(() => [ D("span", null, ge(Ue.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)), fe.filterable && !y(j) ? Be((S(), L("input", { key: 0, "onUpdate:modelValue": (Se) => F.value = Se, type: "text", class: H(y(l).e("search-input")), placeholder: y(oe) ? "" : y(P), onInput: (Se) => lt(F.value, Se), onClick: Ge((Se) => Ne(!0), ["stop"]), onKeydown: wn(ye, ["delete"]), onCompositionstart: y(v), onCompositionupdate: y(v), onCompositionend: y(v), onFocus: Pe, onBlur: Ce }, null, 42, ["onUpdate:modelValue", "placeholder", "onInput", "onClick", "onKeydown", "onCompositionstart", "onCompositionupdate", "onCompositionend"])), [ [T0, F.value] ]) : J("v-if", !0) ], 2)) : J("v-if", !0) ], 46, ["onClick", "onMouseenter", "onMouseleave"])), [ [y(SU), () => Ne(!1), y(ke)] ]) ]), content: N(() => [ Be(q(y(ORe), { ref_key: "cascaderPanelRef", ref: x, modelValue: y(ee), "onUpdate:modelValue": (Se) => xn(ee) ? ee.value = Se : null, options: fe.options, props: r.props, border: !1, "render-label": fe.$slots.default, onExpandChange: tt, onClose: (Se) => fe.$nextTick(() => Ne(!1)) }, { empty: N(() => [ ue(fe.$slots, "empty") ]), _: 3 }, 8, ["modelValue", "onUpdate:modelValue", "options", "props", "render-label", "onClose"]), [ [ht, !_.value] ]), fe.filterable ? Be((S(), re(y(o1), { key: 0, ref_key: "suggestionPanel", ref: w, tag: "ul", class: H(y(l).e("suggestion-panel")), "view-class": y(l).e("suggestion-list"), onKeydown: we }, { default: N(() => [ R.value.length ? (S(!0), L(Re, { key: 0 }, mt(R.value, (Se) => (S(), L("li", { key: Se.uid, class: H([ y(l).e("suggestion-item"), y(l).is("checked", Se.checked) ]), tabindex: -1, onClick: (Ue) => ve(Se) }, [ D("span", null, ge(Se.text), 1), Se.checked ? (S(), re(y(Qt), { key: 0 }, { default: N(() => [ q(y(pN)) ]), _: 1 })) : J("v-if", !0) ], 10, ["onClick"]))), 128)) : ue(fe.$slots, "empty", { key: 1 }, () => [ D("li", { class: H(y(l).e("empty-text")) }, ge(y(c)("el.cascader.noMatch")), 3) ]) ]), _: 3 }, 8, ["class", "view-class"])), [ [ht, _.value] ]) : J("v-if", !0) ]), _: 3 }, 8, ["visible", "teleported", "popper-class", "fallback-placements", "placement", "transition", "persistent"])); } }); var DRe = /* @__PURE__ */ vt(MRe, [["__file", "cascader.vue"]]); const BU = Kn(DRe), zU = Symbol("rowContextKey"), BRe = [ "start", "center", "end", "space-around", "space-between", "space-evenly" ], zRe = ["top", "middle", "bottom"], jRe = $t({ tag: { type: String, default: "div" }, gutter: { type: Number, default: 0 }, justify: { type: String, values: BRe, default: "start" }, align: { type: String, values: zRe } }), VRe = W({ name: "ElRow" }), HRe = /* @__PURE__ */ W({ ...VRe, props: jRe, setup(e) { const t = e, n = wt("row"), r = E(() => t.gutter); nt(zU, { gutter: r }); const o = E(() => { const i = {}; return t.gutter && (i.marginRight = i.marginLeft = `-${t.gutter / 2}px`), i; }), a = E(() => [ n.b(), n.is(`justify-${t.justify}`, t.justify !== "start"), n.is(`align-${t.align}`, !!t.align) ]); return (i, s) => (S(), re(yt(i.tag), { class: H(y(a)), style: Ye(y(o)) }, { default: N(() => [ ue(i.$slots, "default") ]), _: 3 }, 8, ["class", "style"])); } }); var URe = /* @__PURE__ */ vt(HRe, [["__file", "row.vue"]]); const BE = Kn(URe), qRe = $t({ 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: at([Number, Object]), default: () => Gi({}) }, sm: { type: at([Number, Object]), default: () => Gi({}) }, md: { type: at([Number, Object]), default: () => Gi({}) }, lg: { type: at([Number, Object]), default: () => Gi({}) }, xl: { type: at([Number, Object]), default: () => Gi({}) } }), KRe = W({ name: "ElCol" }), GRe = /* @__PURE__ */ W({ ...KRe, props: qRe, setup(e) { const t = e, { gutter: n } = be(zU, { gutter: E(() => 0) }), r = wt("col"), o = E(() => { const i = {}; return n.value && (i.paddingLeft = i.paddingRight = `${n.value / 2}px`), i; }), a = E(() => { const i = []; return ["span", "offset", "pull", "push"].forEach((s) => { const l = t[s]; Wt(l) && (s === "span" ? i.push(r.b(`${t[s]}`)) : l > 0 && i.push(r.b(`${s}-${t[s]}`))); }), ["xs", "sm", "md", "lg", "xl"].forEach((s) => { Wt(t[s]) ? i.push(r.b(`${s}-${t[s]}`)) : br(t[s]) && Object.entries(t[s]).forEach(([l, u]) => { i.push(l !== "span" ? r.b(`${s}-${l}-${u}`) : r.b(`${s}-${u}`)); }); }), n.value && i.push(r.is("guttered")), [r.b(), i]; }); return (i, s) => (S(), re(yt(i.tag), { class: H(y(a)), style: Ye(y(o)) }, { default: N(() => [ ue(i.$slots, "default") ]), _: 3 }, 8, ["class", "style"])); } }); var WRe = /* @__PURE__ */ vt(GRe, [["__file", "col.vue"]]); const zE = Kn(WRe), YRe = W({ name: "ElContainer" }), XRe = /* @__PURE__ */ W({ ...YRe, props: { direction: { type: String } }, setup(e) { const t = e, n = Dr(), r = wt("container"), o = E(() => t.direction === "vertical" ? !0 : t.direction === "horizontal" ? !1 : n && n.default ? n.default().some((a) => { const i = a.type.name; return i === "ElHeader" || i === "ElFooter"; }) : !1); return (a, i) => (S(), L("section", { class: H([y(r).b(), y(r).is("vertical", y(o))]) }, [ ue(a.$slots, "default") ], 2)); } }); var ZRe = /* @__PURE__ */ vt(XRe, [["__file", "container.vue"]]); const JRe = W({ name: "ElAside" }), QRe = /* @__PURE__ */ W({ ...JRe, props: { width: { type: String, default: null } }, setup(e) { const t = e, n = wt("aside"), r = E(() => t.width ? n.cssVarBlock({ width: t.width }) : {}); return (o, a) => (S(), L("aside", { class: H(y(n).b()), style: Ye(y(r)) }, [ ue(o.$slots, "default") ], 6)); } }); var jU = /* @__PURE__ */ vt(QRe, [["__file", "aside.vue"]]); const e9e = W({ name: "ElFooter" }), t9e = /* @__PURE__ */ W({ ...e9e, props: { height: { type: String, default: null } }, setup(e) { const t = e, n = wt("footer"), r = E(() => t.height ? n.cssVarBlock({ height: t.height }) : {}); return (o, a) => (S(), L("footer", { class: H(y(n).b()), style: Ye(y(r)) }, [ ue(o.$slots, "default") ], 6)); } }); var VU = /* @__PURE__ */ vt(t9e, [["__file", "footer.vue"]]); const n9e = W({ name: "ElHeader" }), r9e = /* @__PURE__ */ W({ ...n9e, props: { height: { type: String, default: null } }, setup(e) { const t = e, n = wt("header"), r = E(() => t.height ? n.cssVarBlock({ height: t.height }) : {}); return (o, a) => (S(), L("header", { class: H(y(n).b()), style: Ye(y(r)) }, [ ue(o.$slots, "default") ], 6)); } }); var HU = /* @__PURE__ */ vt(r9e, [["__file", "header.vue"]]); const o9e = W({ name: "ElMain" }), a9e = /* @__PURE__ */ W({ ...o9e, setup(e) { const t = wt("main"); return (n, r) => (S(), L("main", { class: H(y(t).b()) }, [ ue(n.$slots, "default") ], 2)); } }); var UU = /* @__PURE__ */ vt(a9e, [["__file", "main.vue"]]); const i9e = Kn(ZRe, { Aside: jU, Footer: VU, Header: HU, Main: UU }); Vo(jU); Vo(VU); Vo(HU); Vo(UU); const s9e = $t({ mask: { type: Boolean, default: !0 }, customMaskEvent: Boolean, overlayClass: { type: at([ String, Array, Object ]) }, zIndex: { type: at([String, Number]) } }), l9e = { click: (e) => e instanceof MouseEvent }, u9e = "overlay"; var c9e = W({ name: "ElOverlay", props: s9e, emits: l9e, setup(e, { slots: t, emit: n }) { const r = wt(u9e), o = (l) => { n("click", l); }, { onClick: a, onMousedown: i, onMouseup: s } = bIe(e.customMaskEvent ? void 0 : o); return () => e.mask ? q("div", { class: [r.b(), e.overlayClass], style: { zIndex: e.zIndex }, onClick: a, onMousedown: i, onMouseup: s }, [ue(t, "default")], lg.STYLE | lg.CLASS | lg.PROPS, ["onClick", "onMouseup", "onMousedown"]) : Gt("div", { class: e.overlayClass, style: { zIndex: e.zIndex, position: "fixed", top: "0px", right: "0px", bottom: "0px", left: "0px" } }, [ue(t, "default")]); } }); const d9e = c9e, p9e = $t({ center: Boolean, alignCenter: Boolean, closeIcon: { type: zo }, draggable: Boolean, overflow: Boolean, fullscreen: Boolean, showClose: { type: Boolean, default: !0 }, title: { type: String, default: "" }, ariaLevel: { type: String, default: "2" } }), f9e = $t({ ...p9e, appendToBody: Boolean, appendTo: { type: at([String, Object]), default: "body" }, beforeClose: { type: at(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" } }), h9e = { open: () => !0, opened: () => !0, close: () => !0, closed: () => !0, [Hn]: (e) => pa(e), openAutoFocus: () => !0, closeAutoFocus: () => !0 }, v9e = (e, t) => { var n; const r = st().emit, { nextZIndex: o } = OE(); let a = ""; const i = xi(), s = xi(), l = z(!1), u = z(!1), c = z(!1), d = z((n = e.zIndex) != null ? n : o()); let p, h; const f = r1("namespace", Rp), v = E(() => { const M = {}, j = `--${f.value}-dialog`; return e.fullscreen || (e.top && (M[`${j}-margin-top`] = e.top), e.width && (M[`${j}-width`] = as(e.width))), M; }), m = E(() => e.alignCenter ? { display: "flex" } : {}); function g() { r("opened"); } function b() { r("closed"), r(Hn, !1), e.destroyOnClose && (c.value = !1); } function x() { r("close"); } function w() { h == null || h(), p == null || p(), e.openDelay && e.openDelay > 0 ? { stop: p } = d_(() => $(), e.openDelay) : $(); } function k() { p == null || p(), h == null || h(), e.closeDelay && e.closeDelay > 0 ? { stop: h } = d_(() => O(), e.closeDelay) : O(); } function C() { function M(j) { j || (u.value = !0, l.value = !1); } e.beforeClose ? e.beforeClose(M) : k(); } function _() { e.closeOnClickModal && C(); } function $() { pn && (l.value = !0); } function O() { l.value = !1; } function F() { r("openAutoFocus"); } function A() { r("closeAutoFocus"); } function T(M) { var j; ((j = M.detail) == null ? void 0 : j.focusReason) === "pointer" && M.preventDefault(); } e.lockScroll && d6e(l); function R() { e.closeOnPressEscape && C(); } return he(() => e.modelValue, (M) => { M ? (u.value = !1, w(), c.value = !0, d.value = FH(e.zIndex) ? o() : d.value++, Ke(() => { r("open"), t.value && (t.value.scrollTop = 0); })) : l.value && k(); }), he(() => e.fullscreen, (M) => { t.value && (M ? (a = t.value.style.transform, t.value.style.transform = "") : t.value.style.transform = a); }), ut(() => { e.modelValue && (l.value = !0, c.value = !0, w()); }), { afterEnter: g, afterLeave: b, beforeLeave: x, handleClose: C, onModalClick: _, close: k, doClose: O, onOpenAutoFocus: F, onCloseAutoFocus: A, onCloseRequested: R, onFocusoutPrevented: T, titleId: i, bodyId: s, closed: u, style: v, overlayDialogStyle: m, rendered: c, visible: l, zIndex: d }; }, g9e = $t({ ...f9e, 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" } }), m9e = h9e, y9e = W({ name: "ElDrawer", inheritAttrs: !1 }), b9e = /* @__PURE__ */ W({ ...y9e, props: g9e, emits: m9e, setup(e, { expose: t }) { const n = e, r = Dr(); nu({ 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" }, E(() => !!r.title)); const o = z(), a = z(), i = wt("drawer"), { t: s } = Ho(), { afterEnter: l, afterLeave: u, beforeLeave: c, visible: d, rendered: p, titleId: h, bodyId: f, zIndex: v, onModalClick: m, onOpenAutoFocus: g, onCloseAutoFocus: b, onFocusoutPrevented: x, onCloseRequested: w, handleClose: k } = v9e(n, o), C = E(() => n.direction === "rtl" || n.direction === "ltr"), _ = E(() => as(n.size)); return t({ handleClose: k, afterEnter: l, afterLeave: u }), ($, O) => (S(), re(y(xU), { to: $.appendTo, disabled: $.appendTo !== "body" ? !1 : !$.appendToBody }, { default: N(() => [ q(nr, { name: y(i).b("fade"), onAfterEnter: y(l), onAfterLeave: y(u), onBeforeLeave: y(c), persisted: "" }, { default: N(() => [ Be(q(y(d9e), { mask: $.modal, "overlay-class": $.modalClass, "z-index": y(v), onClick: y(m) }, { default: N(() => [ q(y(bU), { loop: "", trapped: y(d), "focus-trap-el": o.value, "focus-start-el": a.value, onFocusAfterTrapped: y(g), onFocusAfterReleased: y(b), onFocusoutPrevented: y(x), onReleaseRequested: y(w) }, { default: N(() => [ D("div", Et({ ref_key: "drawerRef", ref: o, "aria-modal": "true", "aria-label": $.title || void 0, "aria-labelledby": $.title ? void 0 : y(h), "aria-describedby": y(f) }, $.$attrs, { class: [y(i).b(), $.direction, y(d) && "open"], style: y(C) ? "width: " + y(_) : "height: " + y(_), role: "dialog", onClick: Ge(() => { }, ["stop"]) }), [ D("span", { ref_key: "focusStartRef", ref: a, class: H(y(i).e("sr-focus")), tabindex: "-1" }, null, 2), $.withHeader ? (S(), L("header", { key: 0, class: H(y(i).e("header")) }, [ $.$slots.title ? ue($.$slots, "title", { key: 1 }, () => [ J(" DEPRECATED SLOT ") ]) : ue($.$slots, "header", { key: 0, close: y(k), titleId: y(h), titleClass: y(i).e("title") }, () => [ $.$slots.title ? J("v-if", !0) : (S(), L("span", { key: 0, id: y(h), role: "heading", "aria-level": $.headerAriaLevel, class: H(y(i).e("title")) }, ge($.title), 11, ["id", "aria-level"])) ]), $.showClose ? (S(), L("button", { key: 2, "aria-label": y(s)("el.drawer.close"), class: H(y(i).e("close-btn")), type: "button", onClick: y(k) }, [ q(y(Qt), { class: H(y(i).e("close")) }, { default: N(() => [ q(y(Bo)) ]), _: 1 }, 8, ["class"]) ], 10, ["aria-label", "onClick"])) : J("v-if", !0) ], 2)) : J("v-if", !0), y(p) ? (S(), L("div", { key: 1, id: y(f), class: H(y(i).e("body")) }, [ ue($.$slots, "default") ], 10, ["id"])) : J("v-if", !0), $.$slots.footer ? (S(), L("div", { key: 2, class: H(y(i).e("footer")) }, [ ue($.$slots, "footer") ], 2)) : J("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, y(d)] ]) ]), _: 3 }, 8, ["name", "onAfterEnter", "onAfterLeave", "onBeforeLeave"]) ]), _: 3 }, 8, ["to", "disabled"])); } }); var w9e = /* @__PURE__ */ vt(b9e, [["__file", "drawer.vue"]]); const jE = Kn(w9e), x9e = /* @__PURE__ */ W({ inheritAttrs: !1 }); function k9e(e, t, n, r, o, a) { return ue(e.$slots, "default"); } var C9e = /* @__PURE__ */ vt(x9e, [["render", k9e], ["__file", "collection.vue"]]); const _9e = /* @__PURE__ */ W({ name: "ElCollectionItem", inheritAttrs: !1 }); function S9e(e, t, n, r, o, a) { return ue(e.$slots, "default"); } var $9e = /* @__PURE__ */ vt(_9e, [["render", S9e], ["__file", "collection-item.vue"]]); const qU = "data-el-collection-item", KU = (e) => { const t = `El${e}Collection`, n = `${t}Item`, r = Symbol(t), o = Symbol(n), a = { ...C9e, name: t, setup() { const s = z(null), l = /* @__PURE__ */ new Map(); nt(r, { itemMap: l, getItems: () => { const u = y(s); if (!u) return []; const c = Array.from(u.querySelectorAll(`[${qU}]`)); return [...l.values()].sort((d, p) => c.indexOf(d.ref) - c.indexOf(p.ref)); }, collectionRef: s }); } }, i = { ...$9e, name: n, setup(s, { attrs: l }) { const u = z(null), c = be(r, void 0); nt(o, { collectionItemRef: u }), ut(() => { const d = y(u); d && c.itemMap.set(d, { ref: d, ...l }); }), Tt(() => { const d = y(u); c.itemMap.delete(d); }); } }; return { COLLECTION_INJECTION_KEY: r, COLLECTION_ITEM_INJECTION_KEY: o, ElCollection: a, ElCollectionItem: i }; }, E9e = $t({ style: { type: at([String, Array, Object]) }, currentTabId: { type: at(String) }, defaultCurrentTabId: String, loop: Boolean, dir: { type: String, values: ["ltr", "rtl"], default: "ltr" }, orientation: { type: at(String) }, onBlur: Function, onFocus: Function, onMousedown: Function }), { ElCollection: O9e, ElCollectionItem: F9e, COLLECTION_INJECTION_KEY: VE, COLLECTION_ITEM_INJECTION_KEY: T9e } = KU("RovingFocusGroup"), HE = Symbol("elRovingFocusGroup"), GU = Symbol("elRovingFocusGroupItem"), A9e = { ArrowLeft: "prev", ArrowUp: "prev", ArrowRight: "next", ArrowDown: "next", PageUp: "first", Home: "first", PageDown: "last", End: "last" }, I9e = (e, t) => e, P9e = (e, t, n) => { const r = I9e(e.key); return A9e[r]; }, L9e = (e, t) => e.map((n, r) => e[(r + t) % e.length]), UE = (e) => { const { activeElement: t } = document; for (const n of e) if (n === t || (n.focus(), t !== document.activeElement)) return; }, JL = "currentTabIdChange", QL = "rovingFocusGroup.entryFocus", R9e = { bubbles: !1, cancelable: !0 }, N9e = W({ name: "ElRovingFocusGroupImpl", inheritAttrs: !1, props: E9e, emits: [JL, "entryFocus"], setup(e, { emit: t }) { var n; const r = z((n = e.currentTabId || e.defaultCurrentTabId) != null ? n : null), o = z(!1), a = z(!1), i = z(null), { getItems: s } = be(VE, void 0), l = E(() => [ { outline: "none" }, e.style ]), u = (v) => { t(JL, v); }, c = () => { o.value = !0; }, d = Xn((v) => { var m; (m = e.onMousedown) == null || m.call(e, v); }, () => { a.value = !0; }), p = Xn((v) => { var m; (m = e.onFocus) == null || m.call(e, v); }, (v) => { const m = !y(a), { target: g, currentTarget: b } = v; if (g === b && m && !y(o)) { const x = new Event(QL, R9e); if (b == null || b.dispatchEvent(x), !x.defaultPrevented) { const w = s().filter(($) => $.focusable), k = w.find(($) => $.active), C = w.find(($) => $.id === y(r)), _ = [k, C, ...w].filter(Boolean).map(($) => $.ref); UE(_); } } a.value = !1; }), h = Xn((v) => { var m; (m = e.onBlur) == null || m.call(e, v); }, () => { o.value = !1; }), f = (...v) => { t("entryFocus", ...v); }; nt(HE, { currentTabbedId: $u(r), loop: St(e, "loop"), tabIndex: E(() => y(o) ? -1 : 0), rovingFocusGroupRef: i, rovingFocusGroupRootStyle: l, orientation: St(e, "orientation"), dir: St(e, "dir"), onItemFocus: u, onItemShiftTab: c, onBlur: h, onFocus: p, onMousedown: d }), he(() => e.currentTabId, (v) => { r.value = v ?? null; }), No(i, QL, f); } }); function M9e(e, t, n, r, o, a) { return ue(e.$slots, "default"); } var D9e = /* @__PURE__ */ vt(N9e, [["render", M9e], ["__file", "roving-focus-group-impl.vue"]]); const B9e = W({ name: "ElRovingFocusGroup", components: { ElFocusGroupCollection: O9e, ElRovingFocusGroupImpl: D9e } }); function z9e(e, t, n, r, o, a) { const i = Ve("el-roving-focus-group-impl"), s = Ve("el-focus-group-collection"); return S(), re(s, null, { default: N(() => [ q(i, D9(B9(e.$attrs)), { default: N(() => [ ue(e.$slots, "default") ]), _: 3 }, 16) ]), _: 3 }); } var j9e = /* @__PURE__ */ vt(B9e, [["render", z9e], ["__file", "roving-focus-group.vue"]]); const V9e = W({ components: { ElRovingFocusCollectionItem: F9e }, 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 } = be(HE, void 0), { getItems: i } = be(VE, void 0), s = xi(), l = z(null), u = Xn((h) => { t("mousedown", h); }, (h) => { e.focusable ? o(y(s)) : h.preventDefault(); }), c = Xn((h) => { t("focus", h); }, () => { o(y(s)); }), d = Xn((h) => { t("keydown", h); }, (h) => { const { key: f, shiftKey: v, target: m, currentTarget: g } = h; if (f === Yt.tab && v) { a(); return; } if (m !== g) return; const b = P9e(h); if (b) { h.preventDefault(); let x = i().filter((w) => w.focusable).map((w) => w.ref); switch (b) { case "last": { x.reverse(); break; } case "prev": case "next": { b === "prev" && x.reverse(); const w = x.indexOf(g); x = r.value ? L9e(x, w + 1) : x.slice(w + 1); break; } } Ke(() => { UE(x); }); } }), p = E(() => n.value === y(s)); return nt(GU, { rovingFocusGroupItemRef: l, tabIndex: E(() => y(p) ? 0 : -1), handleMousedown: u, handleFocus: c, handleKeydown: d }), { id: s, handleKeydown: d, handleFocus: c, handleMousedown: u }; } }); function H9e(e, t, n, r, o, a) { const i = Ve("el-roving-focus-collection-item"); return S(), re(i, { id: e.id, focusable: e.focusable, active: e.active }, { default: N(() => [ ue(e.$slots, "default") ]), _: 3 }, 8, ["id", "focusable", "active"]); } var U9e = /* @__PURE__ */ vt(V9e, [["render", H9e], ["__file", "roving-focus-item.vue"]]); const cg = $t({ trigger: _f.trigger, effect: { ...fo.effect, default: "light" }, type: { type: at(String) }, placement: { type: at(String), default: "bottom" }, popperOptions: { type: at(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: at([Number, String]), default: 0 }, maxHeight: { type: at([Number, String]), default: "" }, popperClass: { type: String, default: "" }, disabled: Boolean, role: { type: String, default: "menu" }, buttonProps: { type: at(Object) }, teleported: fo.teleported }), WU = $t({ command: { type: [Object, String, Number], default: () => ({}) }, disabled: Boolean, divided: Boolean, textValue: String, icon: { type: zo } }), q9e = $t({ onKeydown: { type: at(Function) } }), K9e = [ Yt.down, Yt.pageDown, Yt.home ], YU = [Yt.up, Yt.pageUp, Yt.end], G9e = [...K9e, ...YU], { ElCollection: W9e, ElCollectionItem: Y9e, COLLECTION_INJECTION_KEY: X9e, COLLECTION_ITEM_INJECTION_KEY: Z9e } = KU("Dropdown"), s1 = Symbol("elDropdown"), { ButtonGroup: J9e } = so, Q9e = W({ name: "ElDropdown", components: { ElButton: so, ElButtonGroup: J9e, ElScrollbar: o1, ElDropdownCollection: W9e, ElTooltip: Sf, ElRovingFocusGroup: j9e, ElOnlyChild: hU, ElIcon: Qt, ArrowDown: ma }, props: cg, emits: ["visible-change", "click", "command"], setup(e, { emit: t }) { const n = st(), r = wt("dropdown"), { t: o } = Ho(), a = z(), i = z(), s = z(null), l = z(null), u = z(null), c = z(null), d = z(!1), p = [Yt.enter, Yt.space, Yt.down], h = E(() => ({ maxHeight: as(e.maxHeight) })), f = E(() => [r.m(k.value)]), v = E(() => Ki(e.trigger)), m = xi().value, g = E(() => e.id || m); he([a, v], ([j, P], [V]) => { var U, G, se; (U = V == null ? void 0 : V.$el) != null && U.removeEventListener && V.$el.removeEventListener("pointerenter", _), (G = j == null ? void 0 : j.$el) != null && G.removeEventListener && j.$el.removeEventListener("pointerenter", _), (se = j == null ? void 0 : j.$el) != null && se.addEventListener && P.includes("hover") && j.$el.addEventListener("pointerenter", _); }, { immediate: !0 }), Tt(() => { var j, P; (P = (j = a.value) == null ? void 0 : j.$el) != null && P.removeEventListener && a.value.$el.removeEventListener("pointerenter", _); }); function b() { x(); } function x() { var j; (j = s.value) == null || j.onClose(); } function w() { var j; (j = s.value) == null || j.onOpen(); } const k = ss(); function C(...j) { t("command", ...j); } function _() { var j, P; (P = (j = a.value) == null ? void 0 : j.$el) == null || P.focus(); } function $() { } function O() { const j = y(l); v.value.includes("hover") && (j == null || j.focus()), c.value = null; } function F(j) { c.value = j; } function A(j) { d.value || (j.preventDefault(), j.stopImmediatePropagation()); } function T() { t("visible-change", !0); } function R(j) { (j == null ? void 0 : j.type) === "keydown" && l.value.focus(); } function M() { t("visible-change", !1); } return nt(s1, { contentRef: l, role: E(() => e.role), triggerId: g, isUsingKeyboard: d, onItemEnter: $, onItemLeave: O }), nt("elDropdown", { instance: n, dropdownSize: k, handleClick: b, commandHandler: C, trigger: St(e, "trigger"), hideOnClick: St(e, "hideOnClick") }), { t: o, ns: r, scrollbar: u, wrapStyle: h, dropdownTriggerKls: f, dropdownSize: k, triggerId: g, triggerKeys: p, currentTabId: c, handleCurrentTabIdChange: F, handlerMainButtonClick: (j) => { t("click", j); }, handleEntryFocus: A, handleClose: x, handleOpen: w, handleBeforeShowTooltip: T, handleShowTooltip: R, handleBeforeHideTooltip: M, onFocusAfterTrapped: (j) => { var P, V; j.preventDefault(), (V = (P = l.value) == null ? void 0 : P.focus) == null || V.call(P, { preventScroll: !0 }); }, popperRef: s, contentRef: l, triggeringElementRef: a, referenceElementRef: i }; } }); function eNe(e, t, n, r, o, a) { var i; const s = Ve("el-dropdown-collection"), l = Ve("el-roving-focus-group"), u = Ve("el-scrollbar"), c = Ve("el-only-child"), d = Ve("el-tooltip"), p = Ve("el-button"), h = Ve("arrow-down"), f = Ve("el-icon"), v = Ve("el-button-group"); return S(), L("div", { class: H([e.ns.b(), e.ns.is("disabled", e.disabled)]) }, [ q(d, { 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": (i = e.referenceElementRef) == null ? void 0 : i.$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 }, O0({ content: N(() => [ q(u, { ref: "scrollbar", "wrap-style": e.wrapStyle, tag: "div", "view-class": e.ns.e("list") }, { default: N(() => [ q(l, { loop: e.loop, "current-tab-id": e.currentTabId, orientation: "horizontal", onCurrentTabIdChange: e.handleCurrentTabIdChange, onEntryFocus: e.handleEntryFocus }, { default: N(() => [ q(s, null, { default: N(() => [ ue(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: N(() => [ q(c, { id: e.triggerId, ref: "triggeringElementRef", role: "button", tabindex: e.tabindex }, { default: N(() => [ ue(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 ? (S(), re(v, { key: 0 }, { default: N(() => [ q(p, Et({ ref: "referenceElementRef" }, e.buttonProps, { size: e.dropdownSize, type: e.type, disabled: e.disabled, tabindex: e.tabindex, onClick: e.handlerMainButtonClick }), { default: N(() => [ ue(e.$slots, "default") ]), _: 3 }, 16, ["size", "type", "disabled", "tabindex", "onClick"]), q(p, Et({ 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: N(() => [ q(f, { class: H(e.ns.e("icon")) }, { default: N(() => [ q(h) ]), _: 1 }, 8, ["class"]) ]), _: 1 }, 16, ["id", "size", "type", "class", "disabled", "tabindex", "aria-label"]) ]), _: 3 })) : J("v-if", !0) ], 2); } var tNe = /* @__PURE__ */ vt(Q9e, [["render", eNe], ["__file", "dropdown.vue"]]); const nNe = W({ name: "DropdownItemImpl", components: { ElIcon: Qt }, props: WU, emits: ["pointermove", "pointerleave", "click", "clickimpl"], setup(e, { emit: t }) { const n = wt("dropdown"), { role: r } = be(s1, void 0), { collectionItemRef: o } = be(Z9e, void 0), { collectionItemRef: a } = be(T9e, void 0), { rovingFocusGroupItemRef: i, tabIndex: s, handleFocus: l, handleKeydown: u, handleMousedown: c } = be(GU, void 0), d = MH(o, a, i), p = E(() => r.value === "menu" ? "menuitem" : r.value === "navigation" ? "link" : "button"), h = Xn((f) => { const { code: v } = f; if (v === Yt.enter || v === Yt.space) return f.preventDefault(), f.stopImmediatePropagation(), t("clickimpl", f), !0; }, u); return { ns: n, itemRef: d, dataset: { [qU]: "" }, role: p, tabIndex: s, handleFocus: l, handleKeydown: h, handleMousedown: c }; } }); function rNe(e, t, n, r, o, a) { const i = Ve("el-icon"); return S(), L(Re, null, [ e.divided ? (S(), L("li", Et({ key: 0, role: "separator", class: e.ns.bem("menu", "item", "divided") }, e.$attrs), null, 16)) : J("v-if", !0), D("li", Et({ 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: (s) => e.$emit("clickimpl", s), onFocus: e.handleFocus, onKeydown: Ge(e.handleKeydown, ["self"]), onMousedown: e.handleMousedown, onPointermove: (s) => e.$emit("pointermove", s), onPointerleave: (s) => e.$emit("pointerleave", s) }), [ e.icon ? (S(), re(i, { key: 0 }, { default: N(() => [ (S(), re(yt(e.icon))) ]), _: 1 })) : J("v-if", !0), ue(e.$slots, "default") ], 16, ["aria-disabled", "tabindex", "role", "onClick", "onFocus", "onKeydown", "onMousedown", "onPointermove", "onPointerleave"]) ], 64); } var oNe = /* @__PURE__ */ vt(nNe, [["render", rNe], ["__file", "dropdown-item-impl.vue"]]); const XU = () => { const e = be("elDropdown", {}), t = E(() => e == null ? void 0 : e.dropdownSize); return { elDropdown: e, _elDropdownSize: t }; }, aNe = W({ name: "ElDropdownItem", components: { ElDropdownCollectionItem: Y9e, ElRovingFocusItem: U9e, ElDropdownItemImpl: oNe }, inheritAttrs: !1, props: WU, emits: ["pointermove", "pointerleave", "click"], setup(e, { emit: t, attrs: n }) { const { elDropdown: r } = XU(), o = st(), a = z(null), i = E(() => { var h, f; return (f = (h = y(a)) == null ? void 0 : h.textContent) != null ? f : ""; }), { onItemEnter: s, onItemLeave: l } = be(s1, void 0), u = Xn((h) => (t("pointermove", h), h.defaultPrevented), OP((h) => { if (e.disabled) { l(h); return; } const f = h.currentTarget; f === document.activeElement || f.contains(document.activeElement) || (s(h), h.defaultPrevented || f == null || f.focus()); })), c = Xn((h) => (t("pointerleave", h), h.defaultPrevented), OP(l)), d = Xn((h) => { if (!e.disabled) return t("click", h), h.type !== "keydown" && h.defaultPrevented; }, (h) => { var f, v, m; if (e.disabled) { h.stopImmediatePropagation(); return; } (f = r == null ? void 0 : r.hideOnClick) != null && f.value && ((v = r.handleClick) == null || v.call(r)), (m = r.commandHandler) == null || m.call(r, e.command, o, h); }), p = E(() => ({ ...e, ...n })); return { handleClick: d, handlePointerMove: u, handlePointerLeave: c, textContent: i, propsAndAttrs: p }; } }); function iNe(e, t, n, r, o, a) { var i; const s = Ve("el-dropdown-item-impl"), l = Ve("el-roving-focus-item"), u = Ve("el-dropdown-collection-item"); return S(), re(u, { disabled: e.disabled, "text-value": (i = e.textValue) != null ? i : e.textContent }, { default: N(() => [ q(l, { focusable: !e.disabled }, { default: N(() => [ q(s, Et(e.propsAndAttrs, { onPointerleave: e.handlePointerLeave, onPointermove: e.handlePointerMove, onClickimpl: e.handleClick }), { default: N(() => [ ue(e.$slots, "default") ]), _: 3 }, 16, ["onPointerleave", "onPointermove", "onClickimpl"]) ]), _: 3 }, 8, ["focusable"]) ]), _: 3 }, 8, ["disabled", "text-value"]); } var ZU = /* @__PURE__ */ vt(aNe, [["render", iNe], ["__file", "dropdown-item.vue"]]); const sNe = W({ name: "ElDropdownMenu", props: q9e, setup(e) { const t = wt("dropdown"), { _elDropdownSize: n } = XU(), r = n.value, { focusTrapRef: o, onKeydown: a } = be(mU, void 0), { contentRef: i, role: s, triggerId: l } = be(s1, void 0), { collectionRef: u, getItems: c } = be(X9e, void 0), { rovingFocusGroupRef: d, rovingFocusGroupRootStyle: p, tabIndex: h, onBlur: f, onFocus: v, onMousedown: m } = be(HE, void 0), { collectionRef: g } = be(VE, void 0), b = E(() => [t.b("menu"), t.bm("menu", r == null ? void 0 : r.value)]), x = MH(i, u, o, d, g), w = Xn((k) => { var C; (C = e.onKeydown) == null || C.call(e, k); }, (k) => { const { currentTarget: C, code: _, target: $ } = k; if (C.contains($), Yt.tab === _ && k.stopImmediatePropagation(), k.preventDefault(), $ !== y(i) || !G9e.includes(_)) return; const O = c().filter((F) => !F.disabled).map((F) => F.ref); YU.includes(_) && O.reverse(), UE(O); }); return { size: r, rovingFocusGroupRootStyle: p, tabIndex: h, dropdownKls: b, role: s, triggerId: l, dropdownListWrapperRef: x, handleKeydown: (k) => { w(k), a(k); }, onBlur: f, onFocus: v, onMousedown: m }; } }); function lNe(e, t, n, r, o, a) { return S(), L("ul", { ref: e.dropdownListWrapperRef, class: H(e.dropdownKls), style: Ye(e.rovingFocusGroupRootStyle), tabindex: -1, role: e.role, "aria-labelledby": e.triggerId, onBlur: e.onBlur, onFocus: e.onFocus, onKeydown: Ge(e.handleKeydown, ["self"]), onMousedown: Ge(e.onMousedown, ["self"]) }, [ ue(e.$slots, "default") ], 46, ["role", "aria-labelledby", "onBlur", "onFocus", "onKeydown", "onMousedown"]); } var JU = /* @__PURE__ */ vt(sNe, [["render", lNe], ["__file", "dropdown-menu.vue"]]); const uNe = Kn(tNe, { DropdownItem: ZU, DropdownMenu: JU }), cNe = Vo(ZU), dNe = Vo(JU), QU = Symbol("elPaginationKey"), pNe = $t({ disabled: Boolean, currentPage: { type: Number, default: 1 }, prevText: { type: String }, prevIcon: { type: zo } }), fNe = { click: (e) => e instanceof MouseEvent }, hNe = W({ name: "ElPaginationPrev" }), vNe = /* @__PURE__ */ W({ ...hNe, props: pNe, emits: fNe, setup(e) { const t = e, { t: n } = Ho(), r = E(() => t.disabled || t.currentPage <= 1); return (o, a) => (S(), L("button", { type: "button", class: "btn-prev", disabled: y(r), "aria-label": o.prevText || y(n)("el.pagination.prev"), "aria-disabled": y(r), onClick: (i) => o.$emit("click", i) }, [ o.prevText ? (S(), L("span", { key: 0 }, ge(o.prevText), 1)) : (S(), re(y(Qt), { key: 1 }, { default: N(() => [ (S(), re(yt(o.prevIcon))) ]), _: 1 })) ], 8, ["disabled", "aria-label", "aria-disabled", "onClick"])); } }); var gNe = /* @__PURE__ */ vt(vNe, [["__file", "prev.vue"]]); const mNe = $t({ disabled: Boolean, currentPage: { type: Number, default: 1 }, pageCount: { type: Number, default: 50 }, nextText: { type: String }, nextIcon: { type: zo } }), yNe = W({ name: "ElPaginationNext" }), bNe = /* @__PURE__ */ W({ ...yNe, props: mNe, emits: ["click"], setup(e) { const t = e, { t: n } = Ho(), r = E(() => t.disabled || t.currentPage === t.pageCount || t.pageCount === 0); return (o, a) => (S(), L("button", { type: "button", class: "btn-next", disabled: y(r), "aria-label": o.nextText || y(n)("el.pagination.next"), "aria-disabled": y(r), onClick: (i) => o.$emit("click", i) }, [ o.nextText ? (S(), L("span", { key: 0 }, ge(o.nextText), 1)) : (S(), re(y(Qt), { key: 1 }, { default: N(() => [ (S(), re(yt(o.nextIcon))) ]), _: 1 })) ], 8, ["disabled", "aria-label", "aria-disabled", "onClick"])); } }); var wNe = /* @__PURE__ */ vt(bNe, [["__file", "next.vue"]]); const eq = Symbol("ElSelectGroup"), l1 = Symbol("ElSelect"); function xNe(e, t) { const n = be(l1), r = be(eq, { disabled: !1 }), o = E(() => c(Ki(n.props.modelValue), e.value)), a = E(() => { var h; if (n.props.multiple) { const f = Ki((h = n.props.modelValue) != null ? h : []); return !o.value && f.length >= n.props.multipleLimit && n.props.multipleLimit > 0; } else return !1; }), i = E(() => e.label || (br(e.value) ? "" : e.value)), s = E(() => e.value || e.label || ""), l = E(() => e.disabled || t.groupDisabled || a.value), u = st(), c = (h = [], f) => { if (br(e.value)) { const v = n.props.valueKey; return h && h.some((m) => ra(qi(m, v)) === qi(f, v)); } else return h && h.includes(f); }, d = () => { !e.disabled && !r.disabled && (n.states.hoveringIndex = n.optionsArray.indexOf(u.proxy)); }, p = (h) => { const f = new RegExp(YAe(h), "i"); t.visible = f.test(i.value) || e.created; }; return he(() => i.value, () => { !e.created && !n.props.remote && n.setSelected(); }), he(() => e.value, (h, f) => { const { remote: v, valueKey: m } = n.props; if (h !== f && (n.onOptionDestroy(f, u.proxy), n.onOptionCreate(u.proxy)), !e.created && !v) { if (m && br(h) && br(f) && h[m] === f[m]) return; n.setSelected(); } }), he(() => r.disabled, () => { t.groupDisabled = r.disabled; }, { immediate: !0 }), { select: n, currentLabel: i, currentValue: s, itemSelected: o, isDisabled: l, hoverItem: d, updateOption: p }; } const kNe = W({ name: "ElOption", componentName: "ElOption", props: { value: { required: !0, type: [String, Number, Boolean, Object] }, label: [String, Number], created: Boolean, disabled: Boolean }, setup(e) { const t = wt("select"), n = xi(), r = E(() => [ t.be("dropdown", "item"), t.is("disabled", y(s)), t.is("selected", y(i)), t.is("hovering", y(p)) ]), o = en({ index: -1, groupDisabled: !1, visible: !0, hover: !1 }), { currentLabel: a, itemSelected: i, isDisabled: s, select: l, hoverItem: u, updateOption: c } = xNe(e, o), { visible: d, hover: p } = Cr(o), h = st().proxy; l.onOptionCreate(h), Tt(() => { const v = h.value, { selected: m } = l.states, g = (l.props.multiple ? m : [m]).some((b) => b.value === h.value); Ke(() => { l.states.cachedOptions.get(v) === h && !g && l.states.cachedOptions.delete(v); }), l.onOptionDestroy(v, h); }); function f() { s.value || l.handleOptionSelect(h); } return { ns: t, id: n, containerKls: r, currentLabel: a, itemSelected: i, isDisabled: s, select: l, hoverItem: u, updateOption: c, visible: d, hover: p, selectOptionClick: f, states: o }; } }); function CNe(e, t, n, r, o, a) { return Be((S(), L("li", { id: e.id, class: H(e.containerKls), role: "option", "aria-disabled": e.isDisabled || void 0, "aria-selected": e.itemSelected, onMouseenter: e.hoverItem, onClick: Ge(e.selectOptionClick, ["stop"]) }, [ ue(e.$slots, "default", {}, () => [ D("span", null, ge(e.currentLabel), 1) ]) ], 42, ["id", "aria-disabled", "aria-selected", "onMouseenter", "onClick"])), [ [ht, e.visible] ]); } var qE = /* @__PURE__ */ vt(kNe, [["render", CNe], ["__file", "option.vue"]]); const _Ne = W({ name: "ElSelectDropdown", componentName: "ElSelectDropdown", setup() { const e = be(l1), t = wt("select"), n = E(() => e.props.popperClass), r = E(() => e.props.multiple), o = E(() => e.props.fitInputWidth), a = z(""); function i() { var s; a.value = `${(s = e.selectRef) == null ? void 0 : s.offsetWidth}px`; } return ut(() => { i(), Ra(e.selectRef, i); }), { ns: t, minWidth: a, popperClass: n, isMultiple: r, isFitInputWidth: o }; } }); function SNe(e, t, n, r, o, a) { return S(), L("div", { class: H([e.ns.b("dropdown"), e.ns.is("multiple", e.isMultiple), e.popperClass]), style: Ye({ [e.isFitInputWidth ? "width" : "minWidth"]: e.minWidth }) }, [ e.$slots.header ? (S(), L("div", { key: 0, class: H(e.ns.be("dropdown", "header")) }, [ ue(e.$slots, "header") ], 2)) : J("v-if", !0), ue(e.$slots, "default"), e.$slots.footer ? (S(), L("div", { key: 1, class: H(e.ns.be("dropdown", "footer")) }, [ ue(e.$slots, "footer") ], 2)) : J("v-if", !0) ], 6); } var $Ne = /* @__PURE__ */ vt(_Ne, [["render", SNe], ["__file", "select-dropdown.vue"]]); const ENe = 11, ONe = (e, t) => { const { t: n } = Ho(), r = xi(), o = wt("select"), a = wt("input"), i = en({ 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 }), s = z(null), l = z(null), u = z(null), c = z(null), d = z(null), p = z(null), h = z(null), f = z(null), v = z(null), m = z(null), g = z(null), b = z(null), { isComposing: x, handleCompositionStart: w, handleCompositionUpdate: k, handleCompositionEnd: C } = FE({ afterComposition: (B) => we(B) }), { wrapperRef: _, isFocused: $ } = aU(d, { beforeFocus() { return P.value; }, afterFocus() { e.automaticDropdown && !O.value && (O.value = !0, i.menuVisibleOnFocus = !0); }, beforeBlur(B) { var ce, Le; return ((ce = u.value) == null ? void 0 : ce.isFocusInsideContent(B)) || ((Le = c.value) == null ? void 0 : Le.isFocusInsideContent(B)); }, afterBlur() { O.value = !1, i.menuVisibleOnFocus = !1; } }), O = z(!1), F = z(), { form: A, formItem: T } = El(), { inputId: R } = kh(e, { formItemContext: T }), { valueOnClear: M, isEmptyValue: j } = sU(e), P = E(() => e.disabled || (A == null ? void 0 : A.disabled)), V = E(() => io(e.modelValue) ? e.modelValue.length > 0 : !j(e.modelValue)), U = E(() => e.clearable && !P.value && i.inputHovering && V.value), G = E(() => e.remote && e.filterable && !e.remoteShowSuffix ? "" : e.suffixIcon), se = E(() => o.is("reverse", G.value && O.value)), ae = E(() => (T == null ? void 0 : T.validateState) || ""), de = E(() => NH[ae.value]), me = E(() => e.remote ? 300 : 0), te = E(() => e.loading ? e.loadingText || n("el.select.loading") : e.remote && !i.inputValue && i.options.size === 0 ? !1 : e.filterable && i.inputValue && i.options.size > 0 && oe.value === 0 ? e.noMatchText || n("el.select.noMatch") : i.options.size === 0 ? e.noDataText || n("el.select.noData") : null), oe = E(() => ne.value.filter((B) => B.visible).length), ne = E(() => { const B = Array.from(i.options.values()), ce = []; return i.optionValues.forEach((Le) => { const We = B.findIndex((rn) => rn.value === Le); We > -1 && ce.push(B[We]); }), ce.length >= B.length ? ce : B; }), ee = E(() => Array.from(i.cachedOptions.values())), Z = E(() => { const B = ne.value.filter((ce) => !ce.created).some((ce) => ce.currentLabel === i.inputValue); return e.filterable && e.allowCreate && i.inputValue !== "" && !B; }), le = () => { e.filterable && Rn(e.filterMethod) || e.filterable && e.remote && Rn(e.remoteMethod) || ne.value.forEach((B) => { var ce; (ce = B.updateOption) == null || ce.call(B, i.inputValue); }); }, pe = ss(), ke = E(() => ["small"].includes(pe.value) ? "small" : "default"), Ne = E({ get() { return O.value && te.value !== !1; }, set(B) { O.value = B; } }), De = E(() => { if (e.multiple && !Xi(e.modelValue)) return Ki(e.modelValue).length === 0 && !i.inputValue; const B = io(e.modelValue) ? e.modelValue[0] : e.modelValue; return e.filterable || Xi(B) ? !i.inputValue : !0; }), _e = E(() => { var B; const ce = (B = e.placeholder) != null ? B : n("el.select.placeholder"); return e.multiple || !V.value ? ce : i.selectedLabel; }), Fe = E(() => c_ ? null : "mouseenter"); he(() => e.modelValue, (B, ce) => { e.multiple && e.filterable && !e.reserveKeyword && (i.inputValue = "", Ie("")), qe(), !di(B, ce) && e.validateEvent && (T == null || T.validate("change").catch((Le) => Gn(Le))); }, { flush: "post", deep: !0 }), he(() => O.value, (B) => { B ? Ie(i.inputValue) : (i.inputValue = "", i.previousQuery = null, i.isBeforeHide = !0), t("visible-change", B); }), he(() => i.options.entries(), () => { var B; if (!pn) return; const ce = ((B = s.value) == null ? void 0 : B.querySelectorAll("input")) || []; (!e.filterable && !e.defaultFirstOption && !Xi(e.modelValue) || !Array.from(ce).includes(document.activeElement)) && qe(), e.defaultFirstOption && (e.filterable || e.remote) && oe.value && Ae(); }, { flush: "post" }), he(() => i.hoveringIndex, (B) => { Wt(B) && B > -1 ? F.value = ne.value[B] || {} : F.value = {}, ne.value.forEach((ce) => { ce.hover = F.value === ce; }); }), Mf(() => { i.isBeforeHide || le(); }); const Ie = (B) => { i.previousQuery === B || x.value || (i.previousQuery = B, e.filterable && Rn(e.filterMethod) ? e.filterMethod(B) : e.filterable && e.remote && Rn(e.remoteMethod) && e.remoteMethod(B), e.defaultFirstOption && (e.filterable || e.remote) && oe.value ? Ke(Ae) : Ke(He)); }, Ae = () => { const B = ne.value.filter((We) => We.visible && !We.disabled && !We.states.groupDisabled), ce = B.find((We) => We.created), Le = B[0]; i.hoveringIndex = Te(ne.value, ce || Le); }, qe = () => { if (e.multiple) i.selectedLabel = ""; else { const ce = io(e.modelValue) ? e.modelValue[0] : e.modelValue, Le = et(ce); i.selectedLabel = Le.currentLabel, i.selected = [Le]; return; } const B = []; Xi(e.modelValue) || Ki(e.modelValue).forEach((ce) => { B.push(et(ce)); }), i.selected = B; }, et = (B) => { let ce; const Le = Mk(B).toLowerCase() === "object", We = Mk(B).toLowerCase() === "null", rn = Mk(B).toLowerCase() === "undefined"; for (let An = i.cachedOptions.size - 1; An >= 0; An--) { const un = ee.value[An]; if (Le ? qi(un.value, e.valueKey) === qi(B, e.valueKey) : un.value === B) { ce = { value: B, currentLabel: un.currentLabel, get isDisabled() { return un.isDisabled; } }; break; } } if (ce) return ce; const Tn = Le ? B.label : !We && !rn ? B : ""; return { value: B, currentLabel: Tn }; }, He = () => { i.hoveringIndex = ne.value.findIndex((B) => i.selected.some((ce) => Cn(ce) === Cn(B))); }, ot = () => { i.selectionWidth = l.value.getBoundingClientRect().width; }, tt = () => { i.calculatorWidth = p.value.getBoundingClientRect().width; }, Qe = () => { i.collapseItemWidth = g.value.getBoundingClientRect().width; }, I = () => { var B, ce; (ce = (B = u.value) == null ? void 0 : B.updatePopper) == null || ce.call(B); }, Y = () => { var B, ce; (ce = (B = c.value) == null ? void 0 : B.updatePopper) == null || ce.call(B); }, ve = () => { i.inputValue.length > 0 && !O.value && (O.value = !0), Ie(i.inputValue); }, we = (B) => { if (i.inputValue = B.target.value, e.remote) ye(); else return ve(); }, ye = OH(() => { ve(); }, me.value), Pe = (B) => { di(e.modelValue, B) || t(wu, B); }, Ce = (B) => VAe(B, (ce) => !i.disabledOptions.has(ce)), ze = (B) => { if (e.multiple && B.code !== Yt.delete && B.target.value.length <= 0) { const ce = Ki(e.modelValue).slice(), Le = Ce(ce); if (Le < 0) return; const We = ce[Le]; ce.splice(Le, 1), t(Hn, ce), Pe(ce), t("remove-tag", We); } }, lt = (B, ce) => { const Le = i.selected.indexOf(ce); if (Le > -1 && !P.value) { const We = Ki(e.modelValue).slice(); We.splice(Le, 1), t(Hn, We), Pe(We), t("remove-tag", ce.value); } B.stopPropagation(), Ht(); }, rt = (B) => { B.stopPropagation(); const ce = e.multiple ? [] : M.value; if (e.multiple) for (const Le of i.selected) Le.isDisabled && ce.push(Le.value); t(Hn, ce), Pe(ce), i.hoveringIndex = -1, O.value = !1, t("clear"), Ht(); }, fe = (B) => { var ce; if (e.multiple) { const Le = Ki((ce = e.modelValue) != null ? ce : []).slice(), We = Te(Le, B.value); We > -1 ? Le.splice(We, 1) : (e.multipleLimit <= 0 || Le.length < e.multipleLimit) && Le.push(B.value), t(Hn, Le), Pe(Le), B.created && Ie(""), e.filterable && !e.reserveKeyword && (i.inputValue = ""); } else t(Hn, B.value), Pe(B.value), O.value = !1; Ht(), !O.value && Ke(() => { Se(B); }); }, Te = (B = [], ce) => { if (!br(ce)) return B.indexOf(ce); const Le = e.valueKey; let We = -1; return B.some((rn, Tn) => ra(qi(rn, Le)) === qi(ce, Le) ? (We = Tn, !0) : !1), We; }, Se = (B) => { var ce, Le, We, rn, Tn; const An = io(B) ? B[0] : B; let un = null; if (An != null && An.value) { const on = ne.value.filter((qo) => qo.value === An.value); on.length > 0 && (un = on[0].$el); } if (u.value && un) { const on = (rn = (We = (Le = (ce = u.value) == null ? void 0 : ce.popperRef) == null ? void 0 : Le.contentRef) == null ? void 0 : We.querySelector) == null ? void 0 : rn.call(We, `.${o.be("dropdown", "wrap")}`); on && LH(on, un); } (Tn = b.value) == null || Tn.handleScroll(); }, Ue = (B) => { i.options.set(B.value, B), i.cachedOptions.set(B.value, B), B.disabled && i.disabledOptions.set(B.value, B); }, zt = (B, ce) => { i.options.get(B) === ce && i.options.delete(B); }, Pt = E(() => { var B, ce; return (ce = (B = u.value) == null ? void 0 : B.popperRef) == null ? void 0 : ce.contentRef; }), qt = () => { i.isBeforeHide = !1, Ke(() => Se(i.selected)); }, Ht = () => { var B; (B = d.value) == null || B.focus(); }, tn = () => { var B; (B = d.value) == null || B.blur(); }, Dn = (B) => { rt(B); }, hn = () => { O.value = !1, $.value && tn(); }, vn = () => { i.inputValue.length > 0 ? i.inputValue = "" : O.value = !1; }, Pn = () => { P.value || (c_ && (i.inputHovering = !0), i.menuVisibleOnFocus ? i.menuVisibleOnFocus = !1 : O.value = !O.value); }, Bn = () => { O.value ? ne.value[i.hoveringIndex] && fe(ne.value[i.hoveringIndex]) : Pn(); }, Cn = (B) => br(B.value) ? qi(B.value, e.valueKey) : B.value, hr = E(() => ne.value.filter((B) => B.visible).every((B) => B.disabled)), or = E(() => e.multiple ? e.collapseTags ? i.selected.slice(0, e.maxCollapseTags) : i.selected : []), ar = E(() => e.multiple ? e.collapseTags ? i.selected.slice(e.maxCollapseTags) : [] : []), nn = (B) => { if (!O.value) { O.value = !0; return; } if (!(i.options.size === 0 || i.filteredOptionsCount === 0 || x.value) && !hr.value) { B === "next" ? (i.hoveringIndex++, i.hoveringIndex === i.options.size && (i.hoveringIndex = 0)) : B === "prev" && (i.hoveringIndex--, i.hoveringIndex < 0 && (i.hoveringIndex = i.options.size - 1)); const ce = ne.value[i.hoveringIndex]; (ce.disabled === !0 || ce.states.groupDisabled === !0 || !ce.visible) && nn(B), Ke(() => Se(F.value)); } }, gn = () => { if (!l.value) return 0; const B = window.getComputedStyle(l.value); return Number.parseFloat(B.gap || "6px"); }, Fn = E(() => { const B = gn(); return { maxWidth: `${g.value && e.maxCollapseTags === 1 ? i.selectionWidth - i.collapseItemWidth - B : i.selectionWidth}px` }; }), vr = E(() => ({ maxWidth: `${i.selectionWidth}px` })), Uo = E(() => ({ width: `${Math.max(i.calculatorWidth, ENe)}px` })); return Ra(l, ot), Ra(p, tt), Ra(v, I), Ra(_, I), Ra(m, Y), Ra(g, Qe), ut(() => { qe(); }), { inputId: R, contentId: r, nsSelect: o, nsInput: a, states: i, isFocused: $, expanded: O, optionsArray: ne, hoverOption: F, selectSize: pe, filteredOptionsCount: oe, resetCalculatorWidth: tt, updateTooltip: I, updateTagTooltip: Y, debouncedOnInputChange: ye, onInput: we, deletePrevTag: ze, deleteTag: lt, deleteSelected: rt, handleOptionSelect: fe, scrollToOption: Se, hasModelValue: V, shouldShowPlaceholder: De, currentPlaceholder: _e, mouseEnterEventName: Fe, showClose: U, iconComponent: G, iconReverse: se, validateState: ae, validateIcon: de, showNewOption: Z, updateOptions: le, collapseTagSize: ke, setSelected: qe, selectDisabled: P, emptyText: te, handleCompositionStart: w, handleCompositionUpdate: k, handleCompositionEnd: C, onOptionCreate: Ue, onOptionDestroy: zt, handleMenuEnter: qt, focus: Ht, blur: tn, handleClearClick: Dn, handleClickOutside: hn, handleEsc: vn, toggleMenu: Pn, selectOption: Bn, getValueKey: Cn, navigateOptions: nn, dropdownMenuVisible: Ne, showTagList: or, collapseTagList: ar, tagStyle: Fn, collapseTagStyle: vr, inputStyle: Uo, popperRef: Pt, inputRef: d, tooltipRef: u, tagTooltipRef: c, calculatorRef: p, prefixRef: h, suffixRef: f, selectRef: s, wrapperRef: _, selectionRef: l, scrollbarRef: b, menuRef: v, tagMenuRef: m, collapseItemRef: g }; }; var FNe = W({ name: "ElOptions", setup(e, { slots: t }) { const n = be(l1); let r = []; return () => { var o, a; const i = (o = t.default) == null ? void 0 : o.call(t), s = []; function l(u) { io(u) && u.forEach((c) => { var d, p, h, f; const v = (d = (c == null ? void 0 : c.type) || {}) == null ? void 0 : d.name; v === "ElOptionGroup" ? l(!Yr(c.children) && !io(c.children) && Rn((p = c.children) == null ? void 0 : p.default) ? (h = c.children) == null ? void 0 : h.default() : c.children) : v === "ElOption" ? s.push((f = c.props) == null ? void 0 : f.value) : io(c.children) && l(c.children); }); } return i.length && l((a = i[0]) == null ? void 0 : a.children), di(s, r) || (r = s, n && (n.states.optionValues = s)), i; }; } }); const TNe = $t({ name: String, id: String, modelValue: { type: [Array, String, Number, Boolean, Object], default: void 0 }, autocomplete: { type: String, default: "off" }, automaticDropdown: Boolean, size: Ii, effect: { type: at(String), default: "light" }, disabled: Boolean, clearable: Boolean, filterable: Boolean, allowCreate: Boolean, loading: Boolean, popperClass: { type: String, default: "" }, popperOptions: { type: at(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: fo.teleported, persistent: { type: Boolean, default: !0 }, clearIcon: { type: zo, default: $i }, fitInputWidth: Boolean, suffixIcon: { type: zo, default: ma }, tagType: { ...$f.type, default: "info" }, tagEffect: { ...$f.effect, default: "light" }, validateEvent: { type: Boolean, default: !0 }, remoteShowSuffix: Boolean, placement: { type: at(String), values: bh, default: "bottom-start" }, fallbackPlacements: { type: at(Array), default: ["bottom-start", "top-start", "right", "left"] }, appendTo: String, ...TE, ...$l(["ariaLabel"]) }), eR = "ElSelect", ANe = W({ name: eR, componentName: eR, components: { ElSelectMenu: $Ne, ElOption: qE, ElOptions: FNe, ElTag: xu, ElScrollbar: o1, ElTooltip: Sf, ElIcon: Qt }, directives: { ClickOutside: SU }, props: TNe, emits: [ Hn, wu, "remove-tag", "clear", "visible-change", "focus", "blur" ], setup(e, { emit: t }) { const n = E(() => { const { modelValue: a, multiple: i } = e, s = i ? [] : void 0; return io(a) ? i ? a : s : i ? s : a; }), r = en({ ...Cr(e), modelValue: n }), o = ONe(r, t); return nt(l1, en({ 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 INe(e, t, n, r, o, a) { const i = Ve("el-tag"), s = Ve("el-tooltip"), l = Ve("el-icon"), u = Ve("el-option"), c = Ve("el-options"), d = Ve("el-scrollbar"), p = Ve("el-select-menu"), h = X_("click-outside"); return Be((S(), L("div", { ref: "selectRef", class: H([e.nsSelect.b(), e.nsSelect.m(e.selectSize)]), [Z_(e.mouseEnterEventName)]: (f) => e.states.inputHovering = !0, onMouseleave: (f) => e.states.inputHovering = !1 }, [ q(s, { 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: (f) => e.states.isBeforeHide = !1 }, { default: N(() => { var f; return [ D("div", { ref: "wrapperRef", class: H([ 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: Ge(e.toggleMenu, ["prevent"]) }, [ e.$slots.prefix ? (S(), L("div", { key: 0, ref: "prefixRef", class: H(e.nsSelect.e("prefix")) }, [ ue(e.$slots, "prefix") ], 2)) : J("v-if", !0), D("div", { ref: "selectionRef", class: H([ e.nsSelect.e("selection"), e.nsSelect.is("near", e.multiple && !e.$slots.prefix && !!e.states.selected.length) ]) }, [ e.multiple ? ue(e.$slots, "tag", { key: 0 }, () => [ (S(!0), L(Re, null, mt(e.showTagList, (v) => (S(), L("div", { key: e.getValueKey(v), class: H(e.nsSelect.e("selected-item")) }, [ q(i, { closable: !e.selectDisabled && !v.isDisabled, size: e.collapseTagSize, type: e.tagType, effect: e.tagEffect, "disable-transitions": "", style: Ye(e.tagStyle), onClose: (m) => e.deleteTag(m, v) }, { default: N(() => [ D("span", { class: H(e.nsSelect.e("tags-text")) }, [ ue(e.$slots, "label", { label: v.currentLabel, value: v.value }, () => [ Oe(ge(v.currentLabel), 1) ]) ], 2) ]), _: 2 }, 1032, ["closable", "size", "type", "effect", "style", "onClose"]) ], 2))), 128)), e.collapseTags && e.states.selected.length > e.maxCollapseTags ? (S(), re(s, { key: 0, ref: "tagTooltipRef", disabled: e.dropdownMenuVisible || !e.collapseTagsTooltip, "fallback-placements": ["bottom", "top", "right", "left"], effect: e.effect, placement: "bottom", teleported: e.teleported }, { default: N(() => [ D("div", { ref: "collapseItemRef", class: H(e.nsSelect.e("selected-item")) }, [ q(i, { closable: !1, size: e.collapseTagSize, type: e.tagType, effect: e.tagEffect, "disable-transitions": "", style: Ye(e.collapseTagStyle) }, { default: N(() => [ D("span", { class: H(e.nsSelect.e("tags-text")) }, " + " + ge(e.states.selected.length - e.maxCollapseTags), 3) ]), _: 1 }, 8, ["size", "type", "effect", "style"]) ], 2) ]), content: N(() => [ D("div", { ref: "tagMenuRef", class: H(e.nsSelect.e("selection")) }, [ (S(!0), L(Re, null, mt(e.collapseTagList, (v) => (S(), L("div", { key: e.getValueKey(v), class: H(e.nsSelect.e("selected-item")) }, [ q(i, { class: "in-tooltip", closable: !e.selectDisabled && !v.isDisabled, size: e.collapseTagSize, type: e.tagType, effect: e.tagEffect, "disable-transitions": "", onClose: (m) => e.deleteTag(m, v) }, { default: N(() => [ D("span", { class: H(e.nsSelect.e("tags-text")) }, [ ue(e.$slots, "label", { label: v.currentLabel, value: v.value }, () => [ Oe(ge(v.currentLabel), 1) ]) ], 2) ]), _: 2 }, 1032, ["closable", "size", "type", "effect", "onClose"]) ], 2))), 128)) ], 2) ]), _: 3 }, 8, ["disabled", "effect", "teleported"])) : J("v-if", !0) ]) : J("v-if", !0), e.selectDisabled ? J("v-if", !0) : (S(), L("div", { key: 1, class: H([ e.nsSelect.e("selected-item"), e.nsSelect.e("input-wrapper"), e.nsSelect.is("hidden", !e.filterable) ]) }, [ Be(D("input", { id: e.inputId, ref: "inputRef", "onUpdate:modelValue": (v) => e.states.inputValue = v, type: "text", name: e.name, class: H([e.nsSelect.e("input"), e.nsSelect.is(e.selectSize)]), disabled: e.selectDisabled, autocomplete: e.autocomplete, style: Ye(e.inputStyle), role: "combobox", readonly: !e.filterable, spellcheck: "false", "aria-activedescendant": ((f = e.hoverOption) == null ? void 0 : f.id) || "", "aria-controls": e.contentId, "aria-expanded": e.dropdownMenuVisible, "aria-label": e.ariaLabel, "aria-autocomplete": "none", "aria-haspopup": "listbox", onKeydown: [ wn(Ge((v) => e.navigateOptions("next"), ["stop", "prevent"]), ["down"]), wn(Ge((v) => e.navigateOptions("prev"), ["stop", "prevent"]), ["up"]), wn(Ge(e.handleEsc, ["stop", "prevent"]), ["esc"]), wn(Ge(e.selectOption, ["stop", "prevent"]), ["enter"]), wn(Ge(e.deletePrevTag, ["stop"]), ["delete"]) ], onCompositionstart: e.handleCompositionStart, onCompositionupdate: e.handleCompositionUpdate, onCompositionend: e.handleCompositionEnd, onInput: e.onInput, onClick: Ge(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"]), [ [T0, e.states.inputValue] ]), e.filterable ? (S(), L("span", { key: 0, ref: "calculatorRef", "aria-hidden": "true", class: H(e.nsSelect.e("input-calculator")), textContent: ge(e.states.inputValue) }, null, 10, ["textContent"])) : J("v-if", !0) ], 2)), e.shouldShowPlaceholder ? (S(), L("div", { key: 2, class: H([ e.nsSelect.e("selected-item"), e.nsSelect.e("placeholder"), e.nsSelect.is("transparent", !e.hasModelValue || e.expanded && !e.states.inputValue) ]) }, [ e.hasModelValue ? ue(e.$slots, "label", { key: 0, label: e.currentPlaceholder, value: e.modelValue }, () => [ D("span", null, ge(e.currentPlaceholder), 1) ]) : (S(), L("span", { key: 1 }, ge(e.currentPlaceholder), 1)) ], 2)) : J("v-if", !0) ], 2), D("div", { ref: "suffixRef", class: H(e.nsSelect.e("suffix")) }, [ e.iconComponent && !e.showClose ? (S(), re(l, { key: 0, class: H([e.nsSelect.e("caret"), e.nsSelect.e("icon"), e.iconReverse]) }, { default: N(() => [ (S(), re(yt(e.iconComponent))) ]), _: 1 }, 8, ["class"])) : J("v-if", !0), e.showClose && e.clearIcon ? (S(), re(l, { key: 1, class: H([ e.nsSelect.e("caret"), e.nsSelect.e("icon"), e.nsSelect.e("clear") ]), onClick: e.handleClearClick }, { default: N(() => [ (S(), re(yt(e.clearIcon))) ]), _: 1 }, 8, ["class", "onClick"])) : J("v-if", !0), e.validateState && e.validateIcon ? (S(), re(l, { key: 2, class: H([e.nsInput.e("icon"), e.nsInput.e("validateIcon")]) }, { default: N(() => [ (S(), re(yt(e.validateIcon))) ]), _: 1 }, 8, ["class"])) : J("v-if", !0) ], 2) ], 10, ["onClick"]) ]; }), content: N(() => [ q(p, { ref: "menuRef" }, { default: N(() => [ e.$slots.header ? (S(), L("div", { key: 0, class: H(e.nsSelect.be("dropdown", "header")), onClick: Ge(() => { }, ["stop"]) }, [ ue(e.$slots, "header") ], 10, ["onClick"])) : J("v-if", !0), Be(q(d, { id: e.contentId, ref: "scrollbarRef", tag: "ul", "wrap-class": e.nsSelect.be("dropdown", "wrap"), "view-class": e.nsSelect.be("dropdown", "list"), class: H([e.nsSelect.is("empty", e.filteredOptionsCount === 0)]), role: "listbox", "aria-label": e.ariaLabel, "aria-orientation": "vertical" }, { default: N(() => [ e.showNewOption ? (S(), re(u, { key: 0, value: e.states.inputValue, created: !0 }, null, 8, ["value"])) : J("v-if", !0), q(c, null, { default: N(() => [ ue(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 ? (S(), L("div", { key: 1, class: H(e.nsSelect.be("dropdown", "loading")) }, [ ue(e.$slots, "loading") ], 2)) : e.loading || e.filteredOptionsCount === 0 ? (S(), L("div", { key: 2, class: H(e.nsSelect.be("dropdown", "empty")) }, [ ue(e.$slots, "empty", {}, () => [ D("span", null, ge(e.emptyText), 1) ]) ], 2)) : J("v-if", !0), e.$slots.footer ? (S(), L("div", { key: 3, class: H(e.nsSelect.be("dropdown", "footer")), onClick: Ge(() => { }, ["stop"]) }, [ ue(e.$slots, "footer") ], 10, ["onClick"])) : J("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"])), [ [h, e.handleClickOutside, e.popperRef] ]); } var PNe = /* @__PURE__ */ vt(ANe, [["render", INe], ["__file", "select.vue"]]); const LNe = W({ name: "ElOptionGroup", componentName: "ElOptionGroup", props: { label: String, disabled: Boolean }, setup(e) { const t = wt("select"), n = z(null), r = st(), o = z([]); nt(eq, en({ ...Cr(e) })); const a = E(() => o.value.some((u) => u.visible === !0)), i = (u) => { var c, d; return ((c = u.type) == null ? void 0 : c.name) === "ElOption" && !!((d = u.component) != null && d.proxy); }, s = (u) => { const c = Ki(u), d = []; return c.forEach((p) => { var h, f; i(p) ? d.push(p.component.proxy) : (h = p.children) != null && h.length ? d.push(...s(p.children)) : (f = p.component) != null && f.subTree && d.push(...s(p.component.subTree)); }), d; }, l = () => { o.value = s(r.subTree); }; return ut(() => { l(); }), L4e(n, l, { attributes: !0, subtree: !0, childList: !0 }), { groupRef: n, visible: a, ns: t }; } }); function RNe(e, t, n, r, o, a) { return Be((S(), L("ul", { ref: "groupRef", class: H(e.ns.be("group", "wrap")) }, [ D("li", { class: H(e.ns.be("group", "title")) }, ge(e.label), 3), D("li", null, [ D("ul", { class: H(e.ns.b("group")) }, [ ue(e.$slots, "default") ], 2) ]) ], 2)), [ [ht, e.visible] ]); } var tq = /* @__PURE__ */ vt(LNe, [["render", RNe], ["__file", "option-group.vue"]]); const u1 = Kn(PNe, { Option: qE, OptionGroup: tq }), KE = Vo(qE); Vo(tq); const GE = () => be(QU, {}), NNe = $t({ pageSize: { type: Number, required: !0 }, pageSizes: { type: at(Array), default: () => Gi([10, 20, 30, 40, 50, 100]) }, popperClass: { type: String }, disabled: Boolean, teleported: Boolean, size: { type: String, values: t1 }, appendSizeTo: String }), MNe = W({ name: "ElPaginationSizes" }), DNe = /* @__PURE__ */ W({ ...MNe, props: NNe, emits: ["page-size-change"], setup(e, { emit: t }) { const n = e, { t: r } = Ho(), o = wt("pagination"), a = GE(), i = z(n.pageSize); he(() => n.pageSizes, (u, c) => { if (!di(u, c) && Array.isArray(u)) { const d = u.includes(n.pageSize) ? n.pageSize : n.pageSizes[0]; t("page-size-change", d); } }), he(() => n.pageSize, (u) => { i.value = u; }); const s = E(() => n.pageSizes); function l(u) { var c; u !== i.value && (i.value = u, (c = a.handleSizeChange) == null || c.call(a, Number(u))); } return (u, c) => (S(), L("span", { class: H(y(o).e("sizes")) }, [ q(y(u1), { "model-value": i.value, disabled: u.disabled, "popper-class": u.popperClass, size: u.size, teleported: u.teleported, "validate-event": !1, "append-to": u.appendSizeTo, onChange: l }, { default: N(() => [ (S(!0), L(Re, null, mt(y(s), (d) => (S(), re(y(KE), { key: d, value: d, label: d + y(r)("el.pagination.pagesize") }, null, 8, ["value", "label"]))), 128)) ]), _: 1 }, 8, ["model-value", "disabled", "popper-class", "size", "teleported", "append-to"]) ], 2)); } }); var BNe = /* @__PURE__ */ vt(DNe, [["__file", "sizes.vue"]]); const zNe = $t({ size: { type: String, values: t1 } }), jNe = W({ name: "ElPaginationJumper" }), VNe = /* @__PURE__ */ W({ ...jNe, props: zNe, setup(e) { const { t } = Ho(), n = wt("pagination"), { pageCount: r, disabled: o, currentPage: a, changeEvent: i } = GE(), s = z(), l = E(() => { var d; return (d = s.value) != null ? d : a == null ? void 0 : a.value; }); function u(d) { s.value = d ? +d : ""; } function c(d) { d = Math.trunc(+d), i == null || i(d), s.value = void 0; } return (d, p) => (S(), L("span", { class: H(y(n).e("jump")), disabled: y(o) }, [ D("span", { class: H([y(n).e("goto")]) }, ge(y(t)("el.pagination.goto")), 3), q(y(Pd), { size: d.size, class: H([y(n).e("editor"), y(n).is("in-pagination")]), min: 1, max: y(r), disabled: y(o), "model-value": y(l), "validate-event": !1, "aria-label": y(t)("el.pagination.page"), type: "number", "onUpdate:modelValue": u, onChange: c }, null, 8, ["size", "class", "max", "disabled", "model-value", "aria-label"]), D("span", { class: H([y(n).e("classifier")]) }, ge(y(t)("el.pagination.pageClassifier")), 3) ], 10, ["disabled"])); } }); var HNe = /* @__PURE__ */ vt(VNe, [["__file", "jumper.vue"]]); const UNe = $t({ total: { type: Number, default: 1e3 } }), qNe = W({ name: "ElPaginationTotal" }), KNe = /* @__PURE__ */ W({ ...qNe, props: UNe, setup(e) { const { t } = Ho(), n = wt("pagination"), { disabled: r } = GE(); return (o, a) => (S(), L("span", { class: H(y(n).e("total")), disabled: y(r) }, ge(y(t)("el.pagination.total", { total: o.total })), 11, ["disabled"])); } }); var GNe = /* @__PURE__ */ vt(KNe, [["__file", "total.vue"]]); const WNe = $t({ currentPage: { type: Number, default: 1 }, pageCount: { type: Number, required: !0 }, pagerCount: { type: Number, default: 7 }, disabled: Boolean }), YNe = W({ name: "ElPaginationPager" }), XNe = /* @__PURE__ */ W({ ...YNe, props: WNe, emits: ["change"], setup(e, { emit: t }) { const n = e, r = wt("pager"), o = wt("icon"), { t: a } = Ho(), i = z(!1), s = z(!1), l = z(!1), u = z(!1), c = z(!1), d = z(!1), p = E(() => { const w = n.pagerCount, k = (w - 1) / 2, C = Number(n.currentPage), _ = Number(n.pageCount); let $ = !1, O = !1; _ > w && (C > w - k && ($ = !0), C < _ - k && (O = !0)); const F = []; if ($ && !O) { const A = _ - (w - 2); for (let T = A; T < _; T++) F.push(T); } else if (!$ && O) for (let A = 2; A < w; A++) F.push(A); else if ($ && O) { const A = Math.floor(w / 2) - 1; for (let T = C - A; T <= C + A; T++) F.push(T); } else for (let A = 2; A < _; A++) F.push(A); return F; }), h = E(() => [ "more", "btn-quickprev", o.b(), r.is("disabled", n.disabled) ]), f = E(() => [ "more", "btn-quicknext", o.b(), r.is("disabled", n.disabled) ]), v = E(() => n.disabled ? -1 : 0); Mf(() => { const w = (n.pagerCount - 1) / 2; i.value = !1, s.value = !1, n.pageCount > n.pagerCount && (n.currentPage > n.pagerCount - w && (i.value = !0), n.currentPage < n.pageCount - w && (s.value = !0)); }); function m(w = !1) { n.disabled || (w ? l.value = !0 : u.value = !0); } function g(w = !1) { w ? c.value = !0 : d.value = !0; } function b(w) { const k = w.target; if (k.tagName.toLowerCase() === "li" && Array.from(k.classList).includes("number")) { const C = Number(k.textContent); C !== n.currentPage && t("change", C); } else k.tagName.toLowerCase() === "li" && Array.from(k.classList).includes("more") && x(w); } function x(w) { const k = w.target; if (k.tagName.toLowerCase() === "ul" || n.disabled) return; let C = Number(k.textContent); const _ = n.pageCount, $ = n.currentPage, O = n.pagerCount - 2; k.className.includes("more") && (k.className.includes("quickprev") ? C = $ - O : k.className.includes("quicknext") && (C = $ + O)), Number.isNaN(+C) || (C < 1 && (C = 1), C > _ && (C = _)), C !== $ && t("change", C); } return (w, k) => (S(), L("ul", { class: H(y(r).b()), onClick: x, onKeyup: wn(b, ["enter"]) }, [ w.pageCount > 0 ? (S(), L("li", { key: 0, class: H([[ y(r).is("active", w.currentPage === 1), y(r).is("disabled", w.disabled) ], "number"]), "aria-current": w.currentPage === 1, "aria-label": y(a)("el.pagination.currentPage", { pager: 1 }), tabindex: y(v) }, " 1 ", 10, ["aria-current", "aria-label", "tabindex"])) : J("v-if", !0), i.value ? (S(), L("li", { key: 1, class: H(y(h)), tabindex: y(v), "aria-label": y(a)("el.pagination.prevPages", { pager: w.pagerCount - 2 }), onMouseenter: (C) => m(!0), onMouseleave: (C) => l.value = !1, onFocus: (C) => g(!0), onBlur: (C) => c.value = !1 }, [ (l.value || c.value) && !w.disabled ? (S(), re(y(nQ), { key: 0 })) : (S(), re(y(gC), { key: 1 })) ], 42, ["tabindex", "aria-label", "onMouseenter", "onMouseleave", "onFocus", "onBlur"])) : J("v-if", !0), (S(!0), L(Re, null, mt(y(p), (C) => (S(), L("li", { key: C, class: H([[ y(r).is("active", w.currentPage === C), y(r).is("disabled", w.disabled) ], "number"]), "aria-current": w.currentPage === C, "aria-label": y(a)("el.pagination.currentPage", { pager: C }), tabindex: y(v) }, ge(C), 11, ["aria-current", "aria-label", "tabindex"]))), 128)), s.value ? (S(), L("li", { key: 2, class: H(y(f)), tabindex: y(v), "aria-label": y(a)("el.pagination.nextPages", { pager: w.pagerCount - 2 }), onMouseenter: (C) => m(), onMouseleave: (C) => u.value = !1, onFocus: (C) => g(), onBlur: (C) => d.value = !1 }, [ (u.value || d.value) && !w.disabled ? (S(), re(y(oQ), { key: 0 })) : (S(), re(y(gC), { key: 1 })) ], 42, ["tabindex", "aria-label", "onMouseenter", "onMouseleave", "onFocus", "onBlur"])) : J("v-if", !0), w.pageCount > 1 ? (S(), L("li", { key: 3, class: H([[ y(r).is("active", w.currentPage === w.pageCount), y(r).is("disabled", w.disabled) ], "number"]), "aria-current": w.currentPage === w.pageCount, "aria-label": y(a)("el.pagination.currentPage", { pager: w.pageCount }), tabindex: y(v) }, ge(w.pageCount), 11, ["aria-current", "aria-label", "tabindex"])) : J("v-if", !0) ], 42, ["onKeyup"])); } }); var ZNe = /* @__PURE__ */ vt(XNe, [["__file", "pager.vue"]]); const no = (e) => typeof e != "number", JNe = $t({ pageSize: Number, defaultPageSize: Number, total: Number, pageCount: Number, pagerCount: { type: Number, validator: (e) => Wt(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: at(Array), default: () => Gi([10, 20, 30, 40, 50, 100]) }, popperClass: { type: String, default: "" }, prevText: { type: String, default: "" }, prevIcon: { type: zo, default: () => aS }, nextText: { type: String, default: "" }, nextIcon: { type: zo, default: () => jf }, teleported: { type: Boolean, default: !0 }, small: Boolean, size: Ii, background: Boolean, disabled: Boolean, hideOnSinglePage: Boolean, appendSizeTo: String }), QNe = { "update:current-page": (e) => Wt(e), "update:page-size": (e) => Wt(e), "size-change": (e) => Wt(e), change: (e, t) => Wt(e) && Wt(t), "current-change": (e) => Wt(e), "prev-click": (e) => Wt(e), "next-click": (e) => Wt(e) }, tR = "ElPagination"; var eMe = W({ name: tR, props: JNe, emits: QNe, setup(e, { emit: t, slots: n }) { const { t: r } = Ho(), o = wt("pagination"), a = st().vnode.props || {}, i = oU(), s = E(() => { var k; return e.small ? "small" : (k = e.size) != null ? k : i.value; }); nu({ from: "small", replacement: "size", version: "3.0.0", scope: "el-pagination", ref: "https://element-plus.org/zh-CN/component/pagination.html" }, E(() => !!e.small)); const l = "onUpdate:currentPage" in a || "onUpdate:current-page" in a || "onCurrentChange" in a, u = "onUpdate:pageSize" in a || "onUpdate:page-size" in a || "onSizeChange" in a, c = E(() => { if (no(e.total) && no(e.pageCount) || !no(e.currentPage) && !l) return !1; if (e.layout.includes("sizes")) { if (no(e.pageCount)) { if (!no(e.total) && !no(e.pageSize) && !u) return !1; } else if (!u) return !1; } return !0; }), d = z(no(e.defaultPageSize) ? 10 : e.defaultPageSize), p = z(no(e.defaultCurrentPage) ? 1 : e.defaultCurrentPage), h = E({ get() { return no(e.pageSize) ? d.value : e.pageSize; }, set(k) { no(e.pageSize) && (d.value = k), u && (t("update:page-size", k), t("size-change", k)); } }), f = E(() => { let k = 0; return no(e.pageCount) ? no(e.total) || (k = Math.max(1, Math.ceil(e.total / h.value))) : k = e.pageCount, k; }), v = E({ get() { return no(e.currentPage) ? p.value : e.currentPage; }, set(k) { let C = k; k < 1 ? C = 1 : k > f.value && (C = f.value), no(e.currentPage) && (p.value = C), l && (t("update:current-page", C), t("current-change", C)); } }); he(f, (k) => { v.value > k && (v.value = k); }), he([v, h], (k) => { t("change", ...k); }, { flush: "post" }); function m(k) { v.value = k; } function g(k) { h.value = k; const C = f.value; v.value > C && (v.value = C); } function b() { e.disabled || (v.value -= 1, t("prev-click", v.value)); } function x() { e.disabled || (v.value += 1, t("next-click", v.value)); } function w(k, C) { k && (k.props || (k.props = {}), k.props.class = [k.props.class, C].join(" ")); } return nt(QU, { pageCount: f, disabled: E(() => e.disabled), currentPage: v, changeEvent: m, handleSizeChange: g }), () => { var k, C; if (!c.value) return Gn(tR, r("el.pagination.deprecationWarning")), null; if (!e.layout || e.hideOnSinglePage && f.value <= 1) return null; const _ = [], $ = [], O = Gt("div", { class: o.e("rightwrapper") }, $), F = { prev: Gt(gNe, { disabled: e.disabled, currentPage: v.value, prevText: e.prevText, prevIcon: e.prevIcon, onClick: b }), jumper: Gt(HNe, { size: s.value }), pager: Gt(ZNe, { currentPage: v.value, pageCount: f.value, pagerCount: e.pagerCount, onChange: m, disabled: e.disabled }), next: Gt(wNe, { disabled: e.disabled, currentPage: v.value, pageCount: f.value, nextText: e.nextText, nextIcon: e.nextIcon, onClick: x }), sizes: Gt(BNe, { pageSize: h.value, pageSizes: e.pageSizes, popperClass: e.popperClass, disabled: e.disabled, teleported: e.teleported, size: s.value, appendSizeTo: e.appendSizeTo }), slot: (C = (k = n == null ? void 0 : n.default) == null ? void 0 : k.call(n)) != null ? C : null, total: Gt(GNe, { total: no(e.total) ? 0 : e.total }) }, A = e.layout.split(",").map((R) => R.trim()); let T = !1; return A.forEach((R) => { if (R === "->") { T = !0; return; } T ? $.push(F[R]) : _.push(F[R]); }), w(_[0], o.is("first")), w(_[_.length - 1], o.is("last")), T && $.length > 0 && (w($[0], o.is("first")), w($[$.length - 1], o.is("last")), _.push(O)), Gt("div", { class: [ o.b(), o.is("background", e.background), o.m(s.value) ] }, _); }; } }); const c1 = Kn(eMe), tMe = $t({ trigger: _f.trigger, placement: cg.placement, disabled: _f.disabled, visible: fo.visible, transition: fo.transition, popperOptions: cg.popperOptions, tabindex: cg.tabindex, content: fo.content, popperStyle: fo.popperStyle, popperClass: fo.popperClass, enterable: { ...fo.enterable, default: !0 }, effect: { ...fo.effect, default: "light" }, teleported: fo.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 } }), nMe = { "update:visible": (e) => pa(e), "before-enter": () => !0, "before-leave": () => !0, "after-enter": () => !0, "after-leave": () => !0 }, rMe = "onUpdate:visible", oMe = W({ name: "ElPopover" }), aMe = /* @__PURE__ */ W({ ...oMe, props: tMe, emits: nMe, setup(e, { expose: t, emit: n }) { const r = e, o = E(() => r[rMe]), a = wt("popover"), i = z(), s = E(() => { var m; return (m = y(i)) == null ? void 0 : m.popperRef; }), l = E(() => [ { width: as(r.width) }, r.popperStyle ]), u = E(() => [a.b(), r.popperClass, { [a.m("plain")]: !!r.content }]), c = E(() => r.transition === `${a.namespace.value}-fade-in-linear`), d = () => { var m; (m = i.value) == null || m.hide(); }, p = () => { n("before-enter"); }, h = () => { n("before-leave"); }, f = () => { n("after-enter"); }, v = () => { n("update:visible", !1), n("after-leave"); }; return t({ popperRef: s, hide: d }), (m, g) => (S(), re(y(Sf), Et({ ref_key: "tooltipRef", ref: i }, 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": y(u), "popper-style": y(l), teleported: m.teleported, persistent: m.persistent, "gpu-acceleration": y(c), "onUpdate:visible": y(o), onBeforeShow: p, onBeforeHide: h, onShow: f, onHide: v }), { content: N(() => [ m.title ? (S(), L("div", { key: 0, class: H(y(a).e("title")), role: "title" }, ge(m.title), 3)) : J("v-if", !0), ue(m.$slots, "default", {}, () => [ Oe(ge(m.content), 1) ]) ]), default: N(() => [ m.$slots.reference ? ue(m.$slots, "reference", { key: 0 }) : J("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 iMe = /* @__PURE__ */ vt(aMe, [["__file", "popover.vue"]]); const nR = (e, t) => { const n = t.arg || t.value, r = n == null ? void 0 : n.popperRef; r && (r.triggerRef = e); }; var sMe = { mounted(e, t) { nR(e, t); }, updated(e, t) { nR(e, t); } }; const lMe = "popover", uMe = t6e(sMe, lMe), Ch = Kn(iMe, { directive: uMe }); function cMe(e) { let t; const n = z(!1), r = en({ ...e, originalPosition: "", originalOverflow: "", visible: !1 }); function o(p) { r.text = p; } function a() { const p = r.parent, h = d.ns; if (!p.vLoadingAddClassList) { let f = p.getAttribute("loading-number"); f = Number.parseInt(f) - 1, f ? p.setAttribute("loading-number", f.toString()) : (xf(p, h.bm("parent", "relative")), p.removeAttribute("loading-number")), xf(p, h.bm("parent", "hidden")); } i(), c.unmount(); } function i() { var p, h; (h = (p = d.$el) == null ? void 0 : p.parentNode) == null || h.removeChild(d.$el); } function s() { var p; e.beforeClose && !e.beforeClose() || (n.value = !0, clearTimeout(t), t = setTimeout(l, 400), r.visible = !1, (p = e.closed) == null || p.call(e)); } function l() { if (!n.value) return; const p = r.parent; n.value = !1, p.vLoadingAddClassList = void 0, a(); } const u = W({ name: "ElLoading", setup(p, { expose: h }) { const { ns: f, zIndex: v } = uU("loading"); return h({ ns: f, zIndex: v }), () => { const m = r.spinner || r.svg, g = Gt("svg", { class: "circular", viewBox: r.svgViewBox ? r.svgViewBox : "0 0 50 50", ...m ? { innerHTML: m } : {} }, [ Gt("circle", { class: "path", cx: "25", cy: "25", r: "20", fill: "none" }) ]), b = r.text ? Gt("p", { class: f.b("text") }, [r.text]) : void 0; return Gt(nr, { name: f.b("fade"), onAfterLeave: l }, { default: N(() => [ Be(q("div", { style: { backgroundColor: r.background || "" }, class: [ f.b("mask"), r.customClass, r.fullscreen ? "is-fullscreen" : "" ] }, [ Gt("div", { class: f.b("spinner") }, [g, b]) ]), [[ht, r.visible]]) ]) }); }; } }), c = A0(u), d = c.mount(document.createElement("div")); return { ...Cr(r), setText: o, removeElLoadingChild: i, close: s, handleAfterLeave: l, vm: d, get $el() { return d.$el; } }; } let $v; const dMe = function(e = {}) { if (!pn) return; const t = pMe(e); if (t.fullscreen && $v) return $v; const n = cMe({ ...t, closed: () => { var o; (o = t.closed) == null || o.call(t), t.fullscreen && ($v = void 0); } }); fMe(t, t.parent, n), rR(t, t.parent, n), t.parent.vLoadingAddClassList = () => rR(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), Ke(() => n.visible.value = t.visible), t.fullscreen && ($v = n), n; }, pMe = (e) => { var t, n, r, o; let a; return Yr(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 }; }, fMe = async (e, t, n) => { const { nextZIndex: r } = n.vm.zIndex || n.vm._.exposed.zIndex, o = {}; if (e.fullscreen) n.originalPosition.value = mc(document.body, "position"), n.originalOverflow.value = mc(document.body, "overflow"), o.zIndex = r(); else if (e.parent === document.body) { n.originalPosition.value = mc(document.body, "position"), await Ke(); for (const a of ["top", "left"]) { const i = a === "top" ? "scrollTop" : "scrollLeft"; o[a] = `${e.target.getBoundingClientRect()[a] + document.body[i] + document.documentElement[i] - Number.parseInt(mc(document.body, `margin-${a}`), 10)}px`; } for (const a of ["height", "width"]) o[a] = `${e.target.getBoundingClientRect()[a]}px`; } else n.originalPosition.value = mc(t, "position"); for (const [a, i] of Object.entries(o)) n.$el.style[a] = i; }, rR = (e, t, n) => { const r = n.vm.ns || n.vm._.exposed.ns; ["absolute", "fixed", "sticky"].includes(n.originalPosition.value) ? xf(t, r.bm("parent", "relative")) : y_(t, r.bm("parent", "relative")), e.fullscreen && e.lock ? y_(t, r.bm("parent", "hidden")) : xf(t, r.bm("parent", "hidden")); }, dg = Symbol("ElLoading"), oR = (e, t) => { var n, r, o, a; const i = t.instance, s = (p) => br(t.value) ? t.value[p] : void 0, l = (p) => { const h = Yr(p) && (i == null ? void 0 : i[p]) || p; return h && z(h); }, u = (p) => l(s(p) || e.getAttribute(`element-loading-${W4e(p)}`)), c = (n = s("fullscreen")) != null ? n : t.modifiers.fullscreen, d = { text: u("text"), svg: u("svg"), svgViewBox: u("svgViewBox"), spinner: u("spinner"), background: u("background"), customClass: u("customClass"), fullscreen: c, target: (r = s("target")) != null ? r : c ? void 0 : e, body: (o = s("body")) != null ? o : t.modifiers.body, lock: (a = s("lock")) != null ? a : t.modifiers.lock }; e[dg] = { options: d, instance: dMe(d) }; }, hMe = (e, t) => { for (const n of Object.keys(t)) xn(t[n]) && (t[n].value = e[n]); }, Rd = { mounted(e, t) { t.value && oR(e, t); }, updated(e, t) { const n = e[dg]; t.oldValue !== t.value && (t.value && !t.oldValue ? oR(e, t) : t.value && t.oldValue ? br(t.value) && hMe(t.value, n.options) : n == null || n.instance.close()); }, unmounted(e) { var t; (t = e[dg]) == null || t.instance.close(), e[dg] = null; } }, nq = ["success", "info", "warning", "error"], Vr = Gi({ 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: pn ? document.body : void 0 }), vMe = $t({ customClass: { type: String, default: Vr.customClass }, center: { type: Boolean, default: Vr.center }, dangerouslyUseHTMLString: { type: Boolean, default: Vr.dangerouslyUseHTMLString }, duration: { type: Number, default: Vr.duration }, icon: { type: zo, default: Vr.icon }, id: { type: String, default: Vr.id }, message: { type: at([ String, Object, Function ]), default: Vr.message }, onClose: { type: at(Function), default: Vr.onClose }, showClose: { type: Boolean, default: Vr.showClose }, type: { type: String, values: nq, default: Vr.type }, plain: { type: Boolean, default: Vr.plain }, offset: { type: Number, default: Vr.offset }, zIndex: { type: Number, default: Vr.zIndex }, grouping: { type: Boolean, default: Vr.grouping }, repeatNum: { type: Number, default: Vr.repeatNum } }), gMe = { destroy: () => !0 }, Da = xW([]), mMe = (e) => { const t = Da.findIndex((o) => o.id === e), n = Da[t]; let r; return t > 0 && (r = Da[t - 1]), { current: n, prev: r }; }, yMe = (e) => { const { prev: t } = mMe(e); return t ? t.vm.exposed.bottom.value : 0; }, bMe = (e, t) => Da.findIndex((n) => n.id === e) > 0 ? 16 : t, wMe = W({ name: "ElMessage" }), xMe = /* @__PURE__ */ W({ ...wMe, props: vMe, emits: gMe, setup(e, { expose: t }) { const n = e, { Close: r } = QAe, { ns: o, zIndex: a } = uU("message"), { currentZIndex: i, nextZIndex: s } = a, l = z(), u = z(!1), c = z(0); let d; const p = E(() => n.type ? n.type === "error" ? "danger" : n.type : "info"), h = E(() => { const _ = n.type; return { [o.bm("icon", _)]: _ && mL[_] }; }), f = E(() => n.icon || mL[n.type] || ""), v = E(() => yMe(n.id)), m = E(() => bMe(n.id, n.offset) + v.value), g = E(() => c.value + m.value), b = E(() => ({ top: `${m.value}px`, zIndex: i.value })); function x() { n.duration !== 0 && ({ stop: d } = d_(() => { k(); }, n.duration)); } function w() { d == null || d(); } function k() { u.value = !1; } function C({ code: _ }) { _ === Yt.esc && k(); } return ut(() => { x(), s(), u.value = !0; }), he(() => n.repeatNum, () => { w(), x(); }), No(document, "keydown", C), Ra(l, () => { c.value = l.value.getBoundingClientRect().height; }), t({ visible: u, bottom: g, close: k }), (_, $) => (S(), re(nr, { name: y(o).b("fade"), onBeforeLeave: _.onClose, onAfterLeave: (O) => _.$emit("destroy"), persisted: "" }, { default: N(() => [ Be(D("div", { id: _.id, ref_key: "messageRef", ref: l, class: H([ y(o).b(), { [y(o).m(_.type)]: _.type }, y(o).is("center", _.center), y(o).is("closable", _.showClose), y(o).is("plain", _.plain), _.customClass ]), style: Ye(y(b)), role: "alert", onMouseenter: w, onMouseleave: x }, [ _.repeatNum > 1 ? (S(), re(y(cLe), { key: 0, value: _.repeatNum, type: y(p), class: H(y(o).e("badge")) }, null, 8, ["value", "type", "class"])) : J("v-if", !0), y(f) ? (S(), re(y(Qt), { key: 1, class: H([y(o).e("icon"), y(h)]) }, { default: N(() => [ (S(), re(yt(y(f)))) ]), _: 1 }, 8, ["class"])) : J("v-if", !0), ue(_.$slots, "default", {}, () => [ _.dangerouslyUseHTMLString ? (S(), L(Re, { key: 1 }, [ J(" Caution here, message could've been compromised, never use user's input as message "), D("p", { class: H(y(o).e("content")), innerHTML: _.message }, null, 10, ["innerHTML"]) ], 2112)) : (S(), L("p", { key: 0, class: H(y(o).e("content")) }, ge(_.message), 3)) ]), _.showClose ? (S(), re(y(Qt), { key: 2, class: H(y(o).e("closeBtn")), onClick: Ge(k, ["stop"]) }, { default: N(() => [ q(y(r)) ]), _: 1 }, 8, ["class", "onClick"])) : J("v-if", !0) ], 46, ["id"]), [ [ht, u.value] ]) ]), _: 3 }, 8, ["name", "onBeforeLeave", "onAfterLeave"])); } }); var kMe = /* @__PURE__ */ vt(xMe, [["__file", "message.vue"]]); let CMe = 1; const rq = (e) => { const t = !e || Yr(e) || z9(e) || Rn(e) ? { message: e } : e, n = { ...Vr, ...t }; if (!n.appendTo) n.appendTo = document.body; else if (Yr(n.appendTo)) { let r = document.querySelector(n.appendTo); Zs(r) || (Gn("ElMessage", "the appendTo option is not an HTMLElement. Falling back to document.body."), r = document.body), n.appendTo = r; } return pa(Ia.grouping) && !n.grouping && (n.grouping = Ia.grouping), Wt(Ia.duration) && n.duration === 3e3 && (n.duration = Ia.duration), Wt(Ia.offset) && n.offset === 16 && (n.offset = Ia.offset), pa(Ia.showClose) && !n.showClose && (n.showClose = Ia.showClose), n; }, _Me = (e) => { const t = Da.indexOf(e); if (t === -1) return; Da.splice(t, 1); const { handler: n } = e; n.close(); }, SMe = ({ appendTo: e, ...t }, n) => { const r = `message_${CMe++}`, o = t.onClose, a = document.createElement("div"), i = { ...t, id: r, onClose: () => { o == null || o(), _Me(u); }, onDestroy: () => { M5(null, a); } }, s = q(kMe, i, Rn(i.message) || z9(i.message) ? { default: Rn(i.message) ? i.message : () => i.message } : null); s.appContext = n || rd._context, M5(s, a), e.appendChild(a.firstElementChild); const l = s.component, u = { id: r, vnode: s, vm: l, handler: { close: () => { l.exposed.visible.value = !1; } }, props: s.component.props }; return u; }, rd = (e = {}, t) => { if (!pn) return { close: () => { } }; const n = rq(e); if (n.grouping && Da.length) { const o = Da.find(({ vnode: a }) => { var i; return ((i = a.props) == null ? void 0 : i.message) === n.message; }); if (o) return o.props.repeatNum += 1, o.props.type = n.type, o.handler; } if (Wt(Ia.max) && Da.length >= Ia.max) return { close: () => { } }; const r = SMe(n, t); return Da.push(r), r.handler; }; nq.forEach((e) => { rd[e] = (t = {}, n) => { const r = rq(t); return rd({ ...r, type: e }, n); }; }); function $Me(e) { for (const t of Da) (!e || e === t.props.type) && t.handler.close(); } rd.closeAll = $Me; rd._context = null; const oq = e6e(rd, "$message"), wa = (e, t) => { const n = e.__vccOpts || e; for (const [r, o] of t) n[r] = o; return n; }, EMe = { name: "BadgesGroup", components: { Button: so }, 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) { e && e.length > 0 && (this.categories.Simulations = { size: 1 }, this.categories.All.size += 1); }, 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.scaffolds, "Scaffolds"), this.addToCategories(this.entry.segmentation, "Segmentations"), this.addToCategories(this.entry.plots, "Plots"), this.addSimulationsToCategories(this.entry.simulation); } } } }, OMe = { key: 0, class: "container", ref: "container" }; function FMe(e, t, n, r, o, a) { const i = so; return e.categories.All.size > 1 ? (S(), L("div", OMe, [ t[0] || (t[0] = D("div", null, "View data types:", -1)), (S(!0), L(Re, null, mt(e.categories, (s, l) => (S(), L(Re, null, [ s.size > 0 ? (S(), re(i, { class: H([{ active: l == e.active }, "tag-button"]), onClick: (u) => a.categoryClicked(l), size: "small", key: l }, { default: N(() => [ Oe(ge(l + " (" + s.size + ")"), 1) ]), _: 2 }, 1032, ["class", "onClick"])) : J("", !0) ], 64))), 256)) ], 512)) : J("", !0); } const aq = /* @__PURE__ */ wa(EMe, [["render", FMe], ["__scopeId", "data-v-da8a77c1"]]); function iq(e, t) { return function() { return e.apply(t, arguments); }; } const { toString: TMe } = Object.prototype, { getPrototypeOf: WE } = Object, { iterator: d1, toStringTag: sq } = Symbol, p1 = /* @__PURE__ */ ((e) => (t) => { const n = TMe.call(t); return e[n] || (e[n] = n.slice(8, -1).toLowerCase()); })(/* @__PURE__ */ Object.create(null)), Xa = (e) => (e = e.toLowerCase(), (t) => p1(t) === e), f1 = (e) => (t) => typeof t === e, { isArray: Nd } = Array, Ef = f1("undefined"); function AMe(e) { return e !== null && !Ef(e) && e.constructor !== null && !Ef(e.constructor) && Co(e.constructor.isBuffer) && e.constructor.isBuffer(e); } const lq = Xa("ArrayBuffer"); function IMe(e) { let t; return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && lq(e.buffer), t; } const PMe = f1("string"), Co = f1("function"), uq = f1("number"), h1 = (e) => e !== null && typeof e == "object", LMe = (e) => e === !0 || e === !1, pg = (e) => { if (p1(e) !== "object") return !1; const t = WE(e); return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(sq in e) && !(d1 in e); }, RMe = Xa("Date"), NMe = Xa("File"), MMe = Xa("Blob"), DMe = Xa("FileList"), BMe = (e) => h1(e) && Co(e.pipe), zMe = (e) => { let t; return e && (typeof FormData == "function" && e instanceof FormData || Co(e.append) && ((t = p1(e)) === "formdata" || // detect form-data instance t === "object" && Co(e.toString) && e.toString() === "[object FormData]")); }, jMe = Xa("URLSearchParams"), [VMe, HMe, UMe, qMe] = ["ReadableStream", "Request", "Response", "Headers"].map(Xa), KMe = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ""); function _h(e, t, { allOwnKeys: n = !1 } = {}) { if (e === null || typeof e > "u") return; let r, o; if (typeof e != "object" && (e = [e]), Nd(e)) for (r = 0, o = e.length; r < o; r++) t.call(null, e[r], r, e); else { const a = n ? Object.getOwnPropertyNames(e) : Object.keys(e), i = a.length; let s; for (r = 0; r < i; r++) s = a[r], t.call(null, e[s], s, e); } } function cq(e, t) { 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 Gl = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, dq = (e) => !Ef(e) && e !== Gl; function S_() { const { caseless: e } = dq(this) && this || {}, t = {}, n = (r, o) => { const a = e && cq(t, o) || o; pg(t[a]) && pg(r) ? t[a] = S_(t[a], r) : pg(r) ? t[a] = S_({}, r) : Nd(r) ? t[a] = r.slice() : t[a] = r; }; for (let r = 0, o = arguments.length; r < o; r++) arguments[r] && _h(arguments[r], n); return t; } const GMe = (e, t, n, { allOwnKeys: r } = {}) => (_h(t, (o, a) => { n && Co(o) ? e[a] = iq(o, n) : e[a] = o; }, { allOwnKeys: r }), e), WMe = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), YMe = (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); }, XMe = (e, t, n, r) => { let o, a, i; const s = {}; if (t = t || {}, e == null) return t; do { for (o = Object.getOwnPropertyNames(e), a = o.length; a-- > 0; ) i = o[a], (!r || r(i, e, t)) && !s[i] && (t[i] = e[i], s[i] = !0); e = n !== !1 && WE(e); } while (e && (!n || n(e, t)) && e !== Object.prototype); return t; }, ZMe = (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; }, JMe = (e) => { if (!e) return null; if (Nd(e)) return e; let t = e.length; if (!uq(t)) return null; const n = new Array(t); for (; t-- > 0; ) n[t] = e[t]; return n; }, QMe = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && WE(Uint8Array)), eDe = (e, t) => { const n = (e && e[d1]).call(e); let r; for (; (r = n.next()) && !r.done; ) { const o = r.value; t.call(e, o[0], o[1]); } }, tDe = (e, t) => { let n; const r = []; for (; (n = e.exec(t)) !== null; ) r.push(n); return r; }, nDe = Xa("HTMLFormElement"), rDe = (e) => e.toLowerCase().replace( /[-_\s]([a-z\d])(\w*)/g, function(t, n, r) { return n.toUpperCase() + r; } ), aR = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), oDe = Xa("RegExp"), pq = (e, t) => { const n = Object.getOwnPropertyDescriptors(e), r = {}; _h(n, (o, a) => { let i; (i = t(o, a, e)) !== !1 && (r[a] = i || o); }), Object.defineProperties(e, r); }, aDe = (e) => { pq(e, (t, n) => { if (Co(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1) return !1; const r = e[n]; if (Co(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 + "'"); }); } }); }, iDe = (e, t) => { const n = {}, r = (o) => { o.forEach((a) => { n[a] = !0; }); }; return Nd(e) ? r(e) : r(String(e).split(t)), n; }, sDe = () => { }, lDe = (e, t) => e != null && Number.isFinite(e = +e) ? e : t; function uDe(e) { return !!(e && Co(e.append) && e[sq] === "FormData" && e[d1]); } const cDe = (e) => { const t = new Array(10), n = (r, o) => { if (h1(r)) { if (t.indexOf(r) >= 0) return; if (!("toJSON" in r)) { t[o] = r; const a = Nd(r) ? [] : {}; return _h(r, (i, s) => { const l = n(i, o + 1); !Ef(l) && (a[s] = l); }), t[o] = void 0, a; } } return r; }; return n(e, 0); }, dDe = Xa("AsyncFunction"), pDe = (e) => e && (h1(e) || Co(e)) && Co(e.then) && Co(e.catch), fq = ((e, t) => e ? setImmediate : t ? ((n, r) => (Gl.addEventListener("message", ({ source: o, data: a }) => { o === Gl && a === n && r.length && r.shift()(); }, !1), (o) => { r.push(o), Gl.postMessage(n, "*"); }))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))( typeof setImmediate == "function", Co(Gl.postMessage) ), fDe = typeof queueMicrotask < "u" ? queueMicrotask.bind(Gl) : typeof process < "u" && process.nextTick || fq, hDe = (e) => e != null && Co(e[d1]), Ee = { isArray: Nd, isArrayBuffer: lq, isBuffer: AMe, isFormData: zMe, isArrayBufferView: IMe, isString: PMe, isNumber: uq, isBoolean: LMe, isObject: h1, isPlainObject: pg, isReadableStream: VMe, isRequest: HMe, isResponse: UMe, isHeaders: qMe, isUndefined: Ef, isDate: RMe, isFile: NMe, isBlob: MMe, isRegExp: oDe, isFunction: Co, isStream: BMe, isURLSearchParams: jMe, isTypedArray: QMe, isFileList: DMe, forEach: _h, merge: S_, extend: GMe, trim: KMe, stripBOM: WMe, inherits: YMe, toFlatObject: XMe, kindOf: p1, kindOfTest: Xa, endsWith: ZMe, toArray: JMe, forEachEntry: eDe, matchAll: tDe, isHTMLForm: nDe, hasOwnProperty: aR, hasOwnProp: aR, // an alias to avoid ESLint no-prototype-builtins detection reduceDescriptors: pq, freezeMethods: aDe, toObjectSet: iDe, toCamelCase: rDe, noop: sDe, toFiniteNumber: lDe, findKey: cq, global: Gl, isContextDefined: dq, isSpecCompliantForm: uDe, toJSONObject: cDe, isAsyncFn: dDe, isThenable: pDe, setImmediate: fq, asap: fDe, isIterable: hDe }; function Rt(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); } Ee.inherits(Rt, 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: Ee.toJSONObject(this.config), code: this.code, status: this.status }; } }); const hq = Rt.prototype, vq = {}; [ "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) => { vq[e] = { value: e }; }); Object.defineProperties(Rt, vq); Object.defineProperty(hq, "isAxiosError", { value: !0 }); Rt.from = (e, t, n, r, o, a) => { const i = Object.create(hq); return Ee.toFlatObject(e, i, function(s) { return s !== Error.prototype; }, (s) => s !== "isAxiosError"), Rt.call(i, e.message, t, n, r, o), i.cause = e, i.name = e.name, a && Object.assign(i, a), i; }; const vDe = null; function $_(e) { return Ee.isPlainObject(e) || Ee.isArray(e); } function gq(e) { return Ee.endsWith(e, "[]") ? e.slice(0, -2) : e; } function iR(e, t, n) { return e ? e.concat(t).map(function(r, o) { return r = gq(r), !n && o ? "[" + r + "]" : r; }).join(n ? "." : "") : t; } function gDe(e) { return Ee.isArray(e) && !e.some($_); } const mDe = Ee.toFlatObject(Ee, {}, null, function(e) { return /^is[A-Z]/.test(e); }); function v1(e, t, n) { if (!Ee.isObject(e)) throw new TypeError("target must be an object"); t = t || new FormData(), n = Ee.toFlatObject(n, { metaTokens: !0, dots: !1, indexes: !1 }, !1, function(h, f) { return !Ee.isUndefined(f[h]); }); const r = n.metaTokens, o = n.visitor || u, a = n.dots, i = n.indexes, s = (n.Blob || typeof Blob < "u" && Blob) && Ee.isSpecCompliantForm(t); if (!Ee.isFunction(o)) throw new TypeError("visitor must be a function"); function l(h) { if (h === null) return ""; if (Ee.isDate(h)) return h.toISOString(); if (!s && Ee.isBlob(h)) throw new Rt("Blob is not supported. Use a Buffer instead."); return Ee.isArrayBuffer(h) || Ee.isTypedArray(h) ? s && typeof Blob == "function" ? new Blob([h]) : Buffer.from(h) : h; } function u(h, f, v) { let m = h; if (h && !v && typeof h == "object") { if (Ee.endsWith(f, "{}")) f = r ? f : f.slice(0, -2), h = JSON.stringify(h); else if (Ee.isArray(h) && gDe(h) || (Ee.isFileList(h) || Ee.endsWith(f, "[]")) && (m = Ee.toArray(h))) return f = gq(f), m.forEach(function(g, b) { !(Ee.isUndefined(g) || g === null) && t.append( // eslint-disable-next-line no-nested-ternary i === !0 ? iR([f], b, a) : i === null ? f : f + "[]", l(g) ); }), !1; } return $_(h) ? !0 : (t.append(iR(v, f, a), l(h)), !1); } const c = [], d = Object.assign(mDe, { defaultVisitor: u, convertValue: l, isVisitable: $_ }); function p(h, f) { if (!Ee.isUndefined(h)) { if (c.indexOf(h) !== -1) throw Error("Circular reference detected in " + f.join(".")); c.push(h), Ee.forEach(h, function(v, m) { (!(Ee.isUndefined(v) || v === null) && o.call( t, v, Ee.isString(m) ? m.trim() : m, f, d )) === !0 && p(v, f ? f.concat(m) : [m]); }), c.pop(); } } if (!Ee.isObject(e)) throw new TypeError("data must be an object"); return p(e), t; } function sR(e) { const t = { "!": "%21", "'": "%27", "(": "%28", ")": "%29", "~": "%7E", "%20": "+", "%00": "\0" }; return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(n) { return t[n]; }); } function YE(e, t) { this._pairs = [], e && v1(e, this, t); } const mq = YE.prototype; mq.append = function(e, t) { this._pairs.push([e, t]); }; mq.toString = function(e) { const t = e ? function(n) { return e.call(this, n, sR); } : sR; return this._pairs.map(function(n) { return t(n[0]) + "=" + t(n[1]); }, "").join("&"); }; function yDe(e) { return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]"); } function yq(e, t, n) { if (!t) return e; const r = n && n.encode || yDe; Ee.isFunction(n) && (n = { serialize: n }); const o = n && n.serialize; let a; if (o ? a = o(t, n) : a = Ee.isURLSearchParams(t) ? t.toString() : new YE(t, n).toString(r), a) { const i = e.indexOf("#"); i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + a; } return e; } class lR { 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) { Ee.forEach(this.handlers, function(n) { n !== null && t(n); }); } } const bq = { silentJSONParsing: !0, forcedJSONParsing: !0, clarifyTimeoutError: !1 }, bDe = typeof URLSearchParams < "u" ? URLSearchParams : YE, wDe = typeof FormData < "u" ? FormData : null, xDe = typeof Blob < "u" ? Blob : null, kDe = { isBrowser: !0, classes: { URLSearchParams: bDe, FormData: wDe, Blob: xDe }, protocols: ["http", "https", "file", "blob", "url", "data"] }, XE = typeof window < "u" && typeof document < "u", E_ = typeof navigator == "object" && navigator || void 0, CDe = XE && (!E_ || ["ReactNative", "NativeScript", "NS"].indexOf(E_.product) < 0), _De = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef self instanceof WorkerGlobalScope && typeof self.importScripts == "function", SDe = XE && window.location.href || "http://localhost", $De = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, hasBrowserEnv: XE, hasStandardBrowserEnv: CDe, hasStandardBrowserWebWorkerEnv: _De, navigator: E_, origin: SDe }, Symbol.toStringTag, { value: "Module" })), qr = { ...$De, ...kDe }; function EDe(e, t) { return v1(e, new qr.classes.URLSearchParams(), Object.assign({ visitor: function(n, r, o, a) { return qr.isNode && Ee.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : a.defaultVisitor.apply(this, arguments); } }, t)); } function ODe(e) { return Ee.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]); } function FDe(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 wq(e) { function t(n, r, o, a) { let i = n[a++]; if (i === "__proto__") return !0; const s = Number.isFinite(+i), l = a >= n.length; return i = !i && Ee.isArray(o) ? o.length : i, l ? (Ee.hasOwnProp(o, i) ? o[i] = [o[i], r] : o[i] = r, !s) : ((!o[i] || !Ee.isObject(o[i])) && (o[i] = []), t(n, r, o[i], a) && Ee.isArray(o[i]) && (o[i] = FDe(o[i])), !s); } if (Ee.isFormData(e) && Ee.isFunction(e.entries)) { const n = {}; return Ee.forEachEntry(e, (r, o) => { t(ODe(r), o, n, 0); }), n; } return null; } function TDe(e, t, n) { if (Ee.isString(e)) try { return (t || JSON.parse)(e), Ee.trim(e); } catch (r) { if (r.name !== "SyntaxError") throw r; } return (0, JSON.stringify)(e); } const Sh = { transitional: bq, adapter: ["xhr", "http", "fetch"], transformRequest: [function(e, t) { const n = t.getContentType() || "", r = n.indexOf("application/json") > -1, o = Ee.isObject(e); if (o && Ee.isHTMLForm(e) && (e = new FormData(e)), Ee.isFormData(e)) return r ? JSON.stringify(wq(e)) : e; if (Ee.isArrayBuffer(e) || Ee.isBuffer(e) || Ee.isStream(e) || Ee.isFile(e) || Ee.isBlob(e) || Ee.isReadableStream(e)) return e; if (Ee.isArrayBufferView(e)) return e.buffer; if (Ee.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 EDe(e, this.formSerializer).toString(); if ((a = Ee.isFileList(e)) || n.indexOf("multipart/form-data") > -1) { const i = this.env && this.env.FormData; return v1( a ? { "files[]": e } : e, i && new i(), this.formSerializer ); } } return o || r ? (t.setContentType("application/json", !1), TDe(e)) : e; }], transformResponse: [function(e) { const t = this.transitional || Sh.transitional, n = t && t.forcedJSONParsing, r = this.responseType === "json"; if (Ee.isResponse(e) || Ee.isReadableStream(e)) return e; if (e && Ee.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" ? Rt.from(a, Rt.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: qr.classes.FormData, Blob: qr.classes.Blob }, validateStatus: function(e) { return e >= 200 && e < 300; }, headers: { common: { Accept: "application/json, text/plain, */*", "Content-Type": void 0 } } }; Ee.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => { Sh.headers[e] = {}; }); const ADe = Ee.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" ]), IDe = (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] && ADe[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r); }), t; }, uR = Symbol("internals"); function lp(e) { return e && String(e).trim().toLowerCase(); } function fg(e) { return e === !1 || e == null ? e : Ee.isArray(e) ? e.map(fg) : String(e); } function PDe(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 LDe = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()); function Wk(e, t, n, r, o) { if (Ee.isFunction(r)) return r.call(this, t, n); if (o && (t = n), !!Ee.isString(t)) { if (Ee.isString(r)) return t.indexOf(r) !== -1; if (Ee.isRegExp(r)) return r.test(t); } } function RDe(e) { return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r); } function NDe(e, t) { const n = Ee.toCamelCase(" " + t); ["get", "set", "has"].forEach((r) => { Object.defineProperty(e, r + n, { value: function(o, a, i) { return this[r].call(this, t, o, a, i); }, configurable: !0 }); }); } class _o { constructor(t) { t && this.set(t); } set(t, n, r) { const o = this; function a(s, l, u) { const c = lp(l); if (!c) throw new Error("header name must be a non-empty string"); const d = Ee.findKey(o, c); (!d || o[d] === void 0 || u === !0 || u === void 0 && o[d] !== !1) && (o[d || l] = fg(s)); } const i = (s, l) => Ee.forEach(s, (u, c) => a(u, c, l)); if (Ee.isPlainObject(t) || t instanceof this.constructor) i(t, n); else if (Ee.isString(t) && (t = t.trim()) && !LDe(t)) i(IDe(t), n); else if (Ee.isObject(t) && Ee.isIterable(t)) { let s = {}, l, u; for (const c of t) { if (!Ee.isArray(c)) throw TypeError("Object iterator must return a key-value pair"); s[u = c[0]] = (l = s[u]) ? Ee.isArray(l) ? [...l, c[1]] : [l, c[1]] : c[1]; } i(s, n); } else t != null && a(n, t, r); return this; } get(t, n) { if (t = lp(t), t) { const r = Ee.findKey(this, t); if (r) { const o = this[r]; if (!n) return o; if (n === !0) return PDe(o); if (Ee.isFunction(n)) return n.call(this, o, r); if (Ee.isRegExp(n)) return n.exec(o); throw new TypeError("parser must be boolean|regexp|function"); } } } has(t, n) { if (t = lp(t), t) { const r = Ee.findKey(this, t); return !!(r && this[r] !== void 0 && (!n || Wk(this, this[r], r, n))); } return !1; } delete(t, n) { const r = this; let o = !1; function a(i) { if (i = lp(i), i) { const s = Ee.findKey(r, i); s && (!n || Wk(r, r[s], s, n)) && (delete r[s], o = !0); } } return Ee.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 || Wk(this, this[a], a, t, !0)) && (delete this[a], o = !0); } return o; } normalize(t) { const n = this, r = {}; return Ee.forEach(this, (o, a) => { const i = Ee.findKey(r, a); if (i) { n[i] = fg(o), delete n[a]; return; } const s = t ? RDe(a) : String(a).trim(); s !== a && delete n[a], n[s] = fg(o), r[s] = !0; }), this; } concat(...t) { return this.constructor.concat(this, ...t); } toJSON(t) { const n = /* @__PURE__ */ Object.create(null); return Ee.forEach(this, (r, o) => { r != null && r !== !1 && (n[o] = t && Ee.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[uR] = this[uR] = { accessors: {} }).accessors, r = this.prototype; function o(a) { const i = lp(a); n[i] || (NDe(r, a), n[i] = !0); } return Ee.isArray(t) ? t.forEach(o) : o(t), this; } } _o.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]); Ee.reduceDescriptors(_o.prototype, ({ value: e }, t) => { let n = t[0].toUpperCase() + t.slice(1); return { get: () => e, set(r) { this[n] = r; } }; }); Ee.freezeMethods(_o); function Yk(e, t) { const n = this || Sh, r = t || n, o = _o.from(r.headers); let a = r.data; return Ee.forEach(e, function(i) { a = i.call(n, a, o.normalize(), t ? t.status : void 0); }), o.normalize(), a; } function xq(e) { return !!(e && e.__CANCEL__); } function Md(e, t, n) { Rt.call(this, e ?? "canceled", Rt.ERR_CANCELED, t, n), this.name = "CanceledError"; } Ee.inherits(Md, Rt, { __CANCEL__: !0 }); function kq(e, t, n) { const r = n.config.validateStatus; !n.status || !r || r(n.status) ? e(n) : t(new Rt( "Request failed with status code " + n.status, [Rt.ERR_BAD_REQUEST, Rt.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4], n.config, n.request, n )); } function MDe(e) { const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e); return t && t[1] || ""; } function DDe(e, t) { e = e || 10; const n = new Array(e), r = new Array(e); let o = 0, a = 0, i; return t = t !== void 0 ? t : 1e3, function(s) { const l = Date.now(), u = r[a]; i || (i = l), n[o] = s, r[o] = l; let c = a, d = 0; for (; c !== o; ) d += n[c++], c = c % e; if (o = (o + 1) % e, o === a && (a = (a + 1) % e), l - i < t) return; const p = u && l - u; return p ? Math.round(d * 1e3 / p) : void 0; }; } function BDe(e, t) { let n = 0, r = 1e3 / t, o, a; const i = (s, l = Date.now()) => { n = l, o = null, a && (clearTimeout(a), a = null), e.apply(null, s); }; return [(...s) => { const l = Date.now(), u = l - n; u >= r ? i(s, l) : (o = s, a || (a = setTimeout(() => { a = null, i(o); }, r - u))); }, () => o && i(o)]; } const l0 = (e, t, n = 3) => { let r = 0; const o = DDe(50, 250); return BDe((a) => { const i = a.loaded, s = a.lengthComputable ? a.total : void 0, l = i - r, u = o(l), c = i <= s; r = i; const d = { loaded: i, total: s, progress: s ? i / s : void 0, bytes: l, rate: u || void 0, estimated: u && s && c ? (s - i) / u : void 0, event: a, lengthComputable: s != null, [t ? "download" : "upload"]: !0 }; e(d); }, n); }, cR = (e, t) => { const n = e != null; return [(r) => t[0]({ lengthComputable: n, total: e, loaded: r }), t[1]]; }, dR = (e) => (...t) => Ee.asap(() => e(...t)), zDe = qr.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, qr.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))( new URL(qr.origin), qr.navigator && /(msie|trident)/i.test(qr.navigator.userAgent) ) : () => !0, jDe = qr.hasStandardBrowserEnv ? ( // Standard browser envs support document.cookie { write(e, t, n, r, o, a) { const i = [e + "=" + encodeURIComponent(t)]; Ee.isNumber(n) && i.push("expires=" + new Date(n).toGMTString()), Ee.isString(r) && i.push("path=" + r), Ee.isString(o) && i.push("domain=" + o), a === !0 && i.push("secure"), document.cookie = i.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 VDe(e) { return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e); } function HDe(e, t) { return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e; } function Cq(e, t, n) { let r = !VDe(t); return e && (r || n == !1) ? HDe(e, t) : t; } const pR = (e) => e instanceof _o ? { ...e } : e; function ku(e, t) { t = t || {}; const n = {}; function r(u, c, d, p) { return Ee.isPlainObject(u) && Ee.isPlainObject(c) ? Ee.merge.call({ caseless: p }, u, c) : Ee.isPlainObject(c) ? Ee.merge({}, c) : Ee.isArray(c) ? c.slice() : c; } function o(u, c, d, p) { if (Ee.isUndefined(c)) { if (!Ee.isUndefined(u)) return r(void 0, u, d, p); } else return r(u, c, d, p); } function a(u, c) { if (!Ee.isUndefined(c)) return r(void 0, c); } function i(u, c) { if (Ee.isUndefined(c)) { if (!Ee.isUndefined(u)) return r(void 0, u); } else return r(void 0, c); } function s(u, c, d) { if (d in t) return r(u, c); if (d in e) return r(void 0, u); } const l = { url: a, method: a, data: a, baseURL: i, transformRequest: i, transformResponse: i, paramsSerializer: i, timeout: i, timeoutMessage: i, withCredentials: i, withXSRFToken: i, adapter: i, responseType: i, xsrfCookieName: i, xsrfHeaderName: i, onUploadProgress: i, onDownloadProgress: i, decompress: i, maxContentLength: i, maxBodyLength: i, beforeRedirect: i, transport: i, httpAgent: i, httpsAgent: i, cancelToken: i, socketPath: i, responseEncoding: i, validateStatus: s, headers: (u, c, d) => o(pR(u), pR(c), d, !0) }; return Ee.forEach(Object.keys(Object.assign({}, e, t)), function(u) { const c = l[u] || o, d = c(e[u], t[u], u); Ee.isUndefined(d) && c !== s || (n[u] = d); }), n; } const _q = (e) => { const t = ku({}, e); let { data: n, withXSRFToken: r, xsrfHeaderName: o, xsrfCookieName: a, headers: i, auth: s } = t; t.headers = i = _o.from(i), t.url = yq(Cq(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), s && i.set( "Authorization", "Basic " + btoa((s.username || "") + ":" + (s.password ? unescape(encodeURIComponent(s.password)) : "")) ); let l; if (Ee.isFormData(n)) { if (qr.hasStandardBrowserEnv || qr.hasStandardBrowserWebWorkerEnv) i.setContentType(void 0); else if ((l = i.getContentType()) !== !1) { const [u, ...c] = l ? l.split(";").map((d) => d.trim()).filter(Boolean) : []; i.setContentType([u || "multipart/form-data", ...c].join("; ")); } } if (qr.hasStandardBrowserEnv && (r && Ee.isFunction(r) && (r = r(t)), r || r !== !1 && zDe(t.url))) { const u = o && a && jDe.read(a); u && i.set(o, u); } return t; }, UDe = typeof XMLHttpRequest < "u", qDe = UDe && function(e) { return new Promise(function(t, n) { const r = _q(e); let o = r.data; const a = _o.from(r.headers).normalize(); let { responseType: i, onUploadProgress: s, onDownloadProgress: l } = r, u, c, d, p, h; function f() { p && p(), h && h(), r.cancelToken && r.cancelToken.unsubscribe(u), r.signal && r.signal.removeEventListener("abort", u); } let v = new XMLHttpRequest(); v.open(r.method.toUpperCase(), r.url, !0), v.timeout = r.timeout; function m() { if (!v) return; const b = _o.from( "getAllResponseHeaders" in v && v.getAllResponseHeaders() ), x = { data: !i || i === "text" || i === "json" ? v.responseText : v.response, status: v.status, statusText: v.statusText, headers: b, config: e, request: v }; kq(function(w) { t(w), f(); }, function(w) { n(w), f(); }, x), v = null; } "onloadend" in v ? v.onloadend = m : v.onreadystatechange = function() { !v || v.readyState !== 4 || v.status === 0 && !(v.responseURL && v.responseURL.indexOf("file:") === 0) || setTimeout(m); }, v.onabort = function() { v && (n(new Rt("Request aborted", Rt.ECONNABORTED, e, v)), v = null); }, v.onerror = function() { n(new Rt("Network Error", Rt.ERR_NETWORK, e, v)), v = null; }, v.ontimeout = function() { let b = r.timeout ? "timeout of " + r.timeout + "ms exceeded" : "timeout exceeded"; const x = r.transitional || bq; r.timeoutErrorMessage && (b = r.timeoutErrorMessage), n(new Rt( b, x.clarifyTimeoutError ? Rt.ETIMEDOUT : Rt.ECONNABORTED, e, v )), v = null; }, o === void 0 && a.setContentType(null), "setRequestHeader" in v && Ee.forEach(a.toJSON(), function(b, x) { v.setRequestHeader(x, b); }), Ee.isUndefined(r.withCredentials) || (v.withCredentials = !!r.withCredentials), i && i !== "json" && (v.responseType = r.responseType), l && ([d, h] = l0(l, !0), v.addEventListener("progress", d)), s && v.upload && ([c, p] = l0(s), v.upload.addEventListener("progress", c), v.upload.addEventListener("loadend", p)), (r.cancelToken || r.signal) && (u = (b) => { v && (n(!b || b.type ? new Md(null, e, v) : b), v.abort(), v = null); }, r.cancelToken && r.cancelToken.subscribe(u), r.signal && (r.signal.aborted ? u() : r.signal.addEventListener("abort", u))); const g = MDe(r.url); if (g && qr.protocols.indexOf(g) === -1) { n(new Rt("Unsupported protocol " + g + ":", Rt.ERR_BAD_REQUEST, e)); return; } v.send(o || null); }); }, KDe = (e, t) => { const { length: n } = e = e ? e.filter(Boolean) : []; if (t || n) { let r = new AbortController(), o; const a = function(u) { if (!o) { o = !0, s(); const c = u instanceof Error ? u : this.reason; r.abort(c instanceof Rt ? c : new Md(c instanceof Error ? c.message : c)); } }; let i = t && setTimeout(() => { i = null, a(new Rt(`timeout ${t} of ms exceeded`, Rt.ETIMEDOUT)); }, t); const s = () => { e && (i && clearTimeout(i), i = null, e.forEach((u) => { u.unsubscribe ? u.unsubscribe(a) : u.removeEventListener("abort", a); }), e = null); }; e.forEach((u) => u.addEventListener("abort", a)); const { signal: l } = r; return l.unsubscribe = () => Ee.asap(s), l; } }, GDe = 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; }, WDe = async function* (e, t) { for await (const n of YDe(e)) yield* GDe(n, t); }, YDe = 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(); } }, fR = (e, t, n, r) => { const o = WDe(e, t); let a = 0, i, s = (l) => { i || (i = !0, r && r(l)); }; return new ReadableStream({ async pull(l) { try { const { done: u, value: c } = await o.next(); if (u) { s(), l.close(); return; } let d = c.byteLength; if (n) { let p = a += d; n(p); } l.enqueue(new Uint8Array(c)); } catch (u) { throw s(u), u; } }, cancel(l) { return s(l), o.return(); } }, { highWaterMark: 2 }); }, g1 = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", Sq = g1 && typeof ReadableStream == "function", XDe = g1 && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), $q = (e, ...t) => { try { return !!e(...t); } catch { return !1; } }, ZDe = Sq && $q(() => { let e = !1; const t = new Request(qr.origin, { body: new ReadableStream(), method: "POST", get duplex() { return e = !0, "half"; } }).headers.has("Content-Type"); return e && !t; }), hR = 64 * 1024, O_ = Sq && $q(() => Ee.isReadableStream(new Response("").body)), u0 = { stream: O_ && ((e) => e.body) }; g1 && ((e) => { ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => { !u0[t] && (u0[t] = Ee.isFunction(e[t]) ? (n) => n[t]() : (n, r) => { throw new Rt(`Response type '${t}' is not supported`, Rt.ERR_NOT_SUPPORT, r); }); }); })(new Response()); const JDe = async (e) => { if (e == null) return 0; if (Ee.isBlob(e)) return e.size; if (Ee.isSpecCompliantForm(e)) return (await new Request(qr.origin, { method: "POST", body: e }).arrayBuffer()).byteLength; if (Ee.isArrayBufferView(e) || Ee.isArrayBuffer(e)) return e.byteLength; if (Ee.isURLSearchParams(e) && (e = e + ""), Ee.isString(e)) return (await XDe(e)).byteLength; }, QDe = async (e, t) => Ee.toFiniteNumber(e.getContentLength()) ?? JDe(t), eBe = g1 && (async (e) => { let { url: t, method: n, data: r, signal: o, cancelToken: a, timeout: i, onDownloadProgress: s, onUploadProgress: l, responseType: u, headers: c, withCredentials: d = "same-origin", fetchOptions: p } = _q(e); u = u ? (u + "").toLowerCase() : "text"; let h = KDe([o, a && a.toAbortSignal()], i), f; const v = h && h.unsubscribe && (() => { h.unsubscribe(); }); let m; try { if (l && ZDe && n !== "get" && n !== "head" && (m = await QDe(c, r)) !== 0) { let k = new Request(t, { method: "POST", body: r, duplex: "half" }), C; if (Ee.isFormData(r) && (C = k.headers.get("content-type")) && c.setContentType(C), k.body) { const [_, $] = cR( m, l0(dR(l)) ); r = fR(k.body, hR, _, $); } } Ee.isString(d) || (d = d ? "include" : "omit"); const g = "credentials" in Request.prototype; f = new Request(t, { ...p, signal: h, method: n.toUpperCase(), headers: c.normalize().toJSON(), body: r, duplex: "half", credentials: g ? d : void 0 }); let b = await fetch(f); const x = O_ && (u === "stream" || u === "response"); if (O_ && (s || x && v)) { const k = {}; ["status", "statusText", "headers"].forEach((O) => { k[O] = b[O]; }); const C = Ee.toFiniteNumber(b.headers.get("content-length")), [_, $] = s && cR( C, l0(dR(s), !0) ) || []; b = new Response( fR(b.body, hR, _, () => { $ && $(), v && v(); }), k ); } u = u || "text"; let w = await u0[Ee.findKey(u0, u) || "text"](b, e); return !x && v && v(), await new Promise((k, C) => { kq(k, C, { data: w, headers: _o.from(b.headers), status: b.status, statusText: b.statusText, config: e, request: f }); }); } catch (g) { throw v && v(), g && g.name === "TypeError" && /Load failed|fetch/i.test(g.message) ? Object.assign( new Rt("Network Error", Rt.ERR_NETWORK, e, f), { cause: g.cause || g } ) : Rt.from(g, g && g.code, e, f); } }), F_ = { http: vDe, xhr: qDe, fetch: eBe }; Ee.forEach(F_, (e, t) => { if (e) { try { Object.defineProperty(e, "name", { value: t }); } catch { } Object.defineProperty(e, "adapterName", { value: t }); } }); const vR = (e) => `- ${e}`, tBe = (e) => Ee.isFunction(e) || e === null || e === !1, Eq = { getAdapter: (e) => { e = Ee.isArray(e) ? e : [e]; const { length: t } = e; let n, r; const o = {}; for (let a = 0; a < t; a++) { n = e[a]; let i; if (r = n, !tBe(n) && (r = F_[(i = String(n)).toLowerCase()], r === void 0)) throw new Rt(`Unknown adapter '${i}'`); if (r) break; o[i || "#" + a] = r; } if (!r) { const a = Object.entries(o).map( ([s, l]) => `adapter ${s} ` + (l === !1 ? "is not supported by the environment" : "is not available in the build") ); let i = t ? a.length > 1 ? `since : ` + a.map(vR).join(` `) : " " + vR(a[0]) : "as no adapter specified"; throw new Rt( "There is no suitable adapter to dispatch the request " + i, "ERR_NOT_SUPPORT" ); } return r; }, adapters: F_ }; function Xk(e) { if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted) throw new Md(null, e); } function gR(e) { return Xk(e), e.headers = _o.from(e.headers), e.data = Yk.call( e, e.transformRequest ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Eq.getAdapter(e.adapter || Sh.adapter)(e).then(function(t) { return Xk(e), t.data = Yk.call( e, e.transformResponse, t ), t.headers = _o.from(t.headers), t; }, function(t) { return xq(t) || (Xk(e), t && t.response && (t.response.data = Yk.call( e, e.transformResponse, t.response ), t.response.headers = _o.from(t.response.headers))), Promise.reject(t); }); } const Oq = "1.9.0", m1 = {}; ["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => { m1[e] = function(n) { return typeof n === e || "a" + (t < 1 ? "n " : " ") + e; }; }); const mR = {}; m1.transitional = function(e, t, n) { function r(o, a) { return "[Axios v" + Oq + "] Transitional option '" + o + "'" + a + (n ? ". " + n : ""); } return (o, a, i) => { if (e === !1) throw new Rt( r(a, " has been removed" + (t ? " in " + t : "")), Rt.ERR_DEPRECATED ); return t && !mR[a] && (mR[a] = !0, console.warn( r( a, " has been deprecated since v" + t + " and will be removed in the near future" ) )), e ? e(o, a, i) : !0; }; }; m1.spelling = function(e) { return (t, n) => (console.warn(`${n} is likely a misspelling of ${e}`), !0); }; function nBe(e, t, n) { if (typeof e != "object") throw new Rt("options must be an object", Rt.ERR_BAD_OPTION_VALUE); const r = Object.keys(e); let o = r.length; for (; o-- > 0; ) { const a = r[o], i = t[a]; if (i) { const s = e[a], l = s === void 0 || i(s, a, e); if (l !== !0) throw new Rt("option " + a + " must be " + l, Rt.ERR_BAD_OPTION_VALUE); continue; } if (n !== !0) throw new Rt("Unknown option " + a, Rt.ERR_BAD_OPTION); } } const hg = { assertOptions: nBe, validators: m1 }, ei = hg.validators; class ou { constructor(t) { this.defaults = t || {}, this.interceptors = { request: new lR(), response: new lR() }; } /** * 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 = ku(this.defaults, n); const { transitional: r, paramsSerializer: o, headers: a } = n; r !== void 0 && hg.assertOptions(r, { silentJSONParsing: ei.transitional(ei.boolean), forcedJSONParsing: ei.transitional(ei.boolean), clarifyTimeoutError: ei.transitional(ei.boolean) }, !1), o != null && (Ee.isFunction(o) ? n.paramsSerializer = { serialize: o } : hg.assertOptions(o, { encode: ei.function, serialize: ei.function }, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), hg.assertOptions(n, { baseUrl: ei.spelling("baseURL"), withXsrfToken: ei.spelling("withXSRFToken") }, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase(); let i = a && Ee.merge( a.common, a[n.method] ); a && Ee.forEach( ["delete", "get", "head", "post", "put", "patch", "common"], (f) => { delete a[f]; } ), n.headers = _o.concat(i, a); const s = []; let l = !0; this.interceptors.request.forEach(function(f) { typeof f.runWhen == "function" && f.runWhen(n) === !1 || (l = l && f.synchronous, s.unshift(f.fulfilled, f.rejected)); }); const u = []; this.interceptors.response.forEach(function(f) { u.push(f.fulfilled, f.rejected); }); let c, d = 0, p; if (!l) { const f = [gR.bind(this), void 0]; for (f.unshift.apply(f, s), f.push.apply(f, u), p = f.length, c = Promise.resolve(n); d < p; ) c = c.then(f[d++], f[d++]); return c; } p = s.length; let h = n; for (d = 0; d < p; ) { const f = s[d++], v = s[d++]; try { h = f(h); } catch (m) { v.call(this, m); break; } } try { c = gR.call(this, h); } catch (f) { return Promise.reject(f); } for (d = 0, p = u.length; d < p; ) c = c.then(u[d++], u[d++]); return c; } getUri(t) { t = ku(this.defaults, t); const n = Cq(t.baseURL, t.url, t.allowAbsoluteUrls); return yq(n, t.params, t.paramsSerializer); } } Ee.forEach(["delete", "get", "head", "options"], function(e) { ou.prototype[e] = function(t, n) { return this.request(ku(n || {}, { method: e, url: t, data: (n || {}).data })); }; }); Ee.forEach(["post", "put", "patch"], function(e) { function t(n) { return function(r, o, a) { return this.request(ku(a || {}, { method: e, headers: n ? { "Content-Type": "multipart/form-data" } : {}, url: r, data: o })); }; } ou.prototype[e] = t(), ou.prototype[e + "Form"] = t(!0); }); class ZE { 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 i = new Promise((s) => { r.subscribe(s), a = s; }).then(o); return i.cancel = function() { r.unsubscribe(a); }, i; }, t(function(o, a, i) { r.reason || (r.reason = new Md(o, a, 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 ZE(function(n) { t = n; }), cancel: t }; } } function rBe(e) { return function(t) { return e.apply(null, t); }; } function oBe(e) { return Ee.isObject(e) && e.isAxiosError === !0; } const T_ = { 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(T_).forEach(([e, t]) => { T_[t] = e; }); function Fq(e) { const t = new ou(e), n = iq(ou.prototype.request, t); return Ee.extend(n, ou.prototype, t, { allOwnKeys: !0 }), Ee.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(r) { return Fq(ku(e, r)); }, n; } const er = Fq(Sh); er.Axios = ou; er.CanceledError = Md; er.CancelToken = ZE; er.isCancel = xq; er.VERSION = Oq; er.toFormData = v1; er.AxiosError = Rt; er.Cancel = er.CanceledError; er.all = function(e) { return Promise.all(e); }; er.spread = rBe; er.isAxiosError = oBe; er.mergeConfig = ku; er.AxiosHeaders = _o; er.formToJSON = (e) => wq(Ee.isHTMLForm(e) ? new FormData(e) : e); er.getAdapter = Eq.getAdapter; er.HttpStatusCode = T_; er.default = er; const aBe = "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", iBe = { //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: aBe }; }, methods: { async getRequest(e, t, n) { return await er({ 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 i = t.find((l) => l.id === n.id); const s = a.name; s && (i.title = s); }, (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.")) ); } } }, JE = (e, t) => { const n = e.__vccOpts || e; for (const [r, o] of t) n[r] = o; return n; }, sBe = { class: "indicator-container" }, lBe = ["onClick"], uBe = { __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) => (S(), L("div", sBe, [ (S(!0), L(Re, null, mt(e.count, (a, i) => (S(), L("div", { key: "indicator_" + a, class: H(["indicator", { active: e.current === i }]), onClick: (s) => n("clicked", i) }, null, 10, lBe))), 128)) ])); } }, cBe = /* @__PURE__ */ JE(uBe, [["__scopeId", "data-v-afcfce15"]]), zi = (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 yR; const Do = typeof window < "u", dBe = (e) => typeof e == "string", Tq = () => { }, pBe = Do && ((yR = window == null ? void 0 : window.navigator) == null ? void 0 : yR.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent); function Aq(e) { return typeof e == "function" ? e() : y(e); } function fBe(e) { return e; } function Iq(e) { return x0() ? (Lf(e), !0) : !1; } function Wl(e) { var t; const n = Aq(e); return (t = n == null ? void 0 : n.$el) != null ? t : n; } const Pq = Do ? window : void 0; function Zk(...e) { let t, n, r, o; if (dBe(e[0]) || Array.isArray(e[0]) ? ([n, r, o] = e, t = Pq) : [t, n, r, o] = e, !t) return Tq; Array.isArray(n) || (n = [n]), Array.isArray(r) || (r = [r]); const a = [], i = () => { a.forEach((c) => c()), a.length = 0; }, s = (c, d, p, h) => (c.addEventListener(d, p, h), () => c.removeEventListener(d, p, h)), l = he(() => [Wl(t), Aq(o)], ([c, d]) => { i(), c && a.push(...n.flatMap((p) => r.map((h) => s(c, p, h, d)))); }, { immediate: !0, flush: "post" }), u = () => { l(), i(); }; return Iq(u), u; } let bR = !1; function hBe(e, t, n = {}) { const { window: r = Pq, ignore: o = [], capture: a = !0, detectIframe: i = !1 } = n; if (!r) return; pBe && !bR && (bR = !0, Array.from(r.document.body.children).forEach((c) => c.addEventListener("click", Tq))); let s = !0; const l = (c) => o.some((d) => { if (typeof d == "string") return Array.from(r.document.querySelectorAll(d)).some((p) => p === c.target || c.composedPath().includes(p)); { const p = Wl(d); return p && (c.target === p || c.composedPath().includes(p)); } }), u = [ Zk(r, "click", (c) => { const d = Wl(e); if (!(!d || d === c.target || c.composedPath().includes(d))) { if (c.detail === 0 && (s = !l(c)), !s) { s = !0; return; } t(c); } }, { passive: !0, capture: a }), Zk(r, "pointerdown", (c) => { const d = Wl(e); d && (s = !c.composedPath().includes(d) && !l(c)); }, { passive: !0 }), i && Zk(r, "blur", (c) => { var d; const p = Wl(e); ((d = r.document.activeElement) == null ? void 0 : d.tagName) === "IFRAME" && !(p != null && p.contains(r.document.activeElement)) && t(c); }) ].filter(Boolean); return () => u.forEach((c) => c()); } const wR = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, xR = "__vueuse_ssr_handlers__"; wR[xR] = wR[xR] || {}; var kR; (function(e) { e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE"; })(kR || (kR = {})); var vBe = Object.defineProperty, CR = Object.getOwnPropertySymbols, gBe = Object.prototype.hasOwnProperty, mBe = Object.prototype.propertyIsEnumerable, _R = (e, t, n) => t in e ? vBe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, yBe = (e, t) => { for (var n in t || (t = {})) gBe.call(t, n) && _R(e, n, t[n]); if (CR) for (var n of CR(t)) mBe.call(t, n) && _R(e, n, t[n]); return e; }; const bBe = { 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] }; yBe({ linear: fBe }, bBe); /** * @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 c0 = () => { }, wBe = Object.prototype.hasOwnProperty, SR = (e, t) => wBe.call(e, t), xBe = Array.isArray, kp = (e) => typeof e == "function", Dd = (e) => typeof e == "string", $h = (e) => e !== null && typeof e == "object", Lq = (e) => { const t = /* @__PURE__ */ Object.create(null); return (n) => t[n] || (t[n] = e(n)); }, kBe = /-(\w)/g, CBe = Lq((e) => e.replace(kBe, (t, n) => n ? n.toUpperCase() : "")), _Be = /\B([A-Z])/g, SBe = Lq( (e) => e.replace(_Be, "-$1").toLowerCase() ); var $Be = typeof global == "object" && global && global.Object === Object && global, EBe = typeof self == "object" && self && self.Object === Object && self, QE = $Be || EBe || Function("return this")(), fl = QE.Symbol, Rq = Object.prototype, OBe = Rq.hasOwnProperty, FBe = Rq.toString, up = fl ? fl.toStringTag : void 0; function TBe(e) { var t = OBe.call(e, up), n = e[up]; try { e[up] = void 0; var r = !0; } catch { } var o = FBe.call(e); return r && (t ? e[up] = n : delete e[up]), o; } var ABe = Object.prototype, IBe = ABe.toString; function PBe(e) { return IBe.call(e); } var LBe = "[object Null]", RBe = "[object Undefined]", $R = fl ? fl.toStringTag : void 0; function e5(e) { return e == null ? e === void 0 ? RBe : LBe : $R && $R in Object(e) ? TBe(e) : PBe(e); } function t5(e) { return e != null && typeof e == "object"; } var NBe = "[object Symbol]"; function n5(e) { return typeof e == "symbol" || t5(e) && e5(e) == NBe; } function MBe(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 Eh = Array.isArray, DBe = 1 / 0, ER = fl ? fl.prototype : void 0, OR = ER ? ER.toString : void 0; function Nq(e) { if (typeof e == "string") return e; if (Eh(e)) return MBe(e, Nq) + ""; if (n5(e)) return OR ? OR.call(e) : ""; var t = e + ""; return t == "0" && 1 / e == -DBe ? "-0" : t; } function d0(e) { var t = typeof e; return e != null && (t == "object" || t == "function"); } function BBe(e) { return e; } var zBe = "[object AsyncFunction]", jBe = "[object Function]", VBe = "[object GeneratorFunction]", HBe = "[object Proxy]"; function UBe(e) { if (!d0(e)) return !1; var t = e5(e); return t == jBe || t == VBe || t == zBe || t == HBe; } var Jk = QE["__core-js_shared__"], FR = function() { var e = /[^.]+$/.exec(Jk && Jk.keys && Jk.keys.IE_PROTO || ""); return e ? "Symbol(src)_1." + e : ""; }(); function qBe(e) { return !!FR && FR in e; } var KBe = Function.prototype, GBe = KBe.toString; function WBe(e) { if (e != null) { try { return GBe.call(e); } catch { } try { return e + ""; } catch { } } return ""; } var YBe = /[\\^$.*+?()[\]{}|]/g, XBe = /^\[object .+?Constructor\]$/, ZBe = Function.prototype, JBe = Object.prototype, QBe = ZBe.toString, eze = JBe.hasOwnProperty, tze = RegExp( "^" + QBe.call(eze).replace(YBe, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$" ); function nze(e) { if (!d0(e) || qBe(e)) return !1; var t = UBe(e) ? tze : XBe; return t.test(WBe(e)); } function rze(e, t) { return e == null ? void 0 : e[t]; } function r5(e, t) { var n = rze(e, t); return nze(n) ? n : void 0; } function oze(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 aze = 800, ize = 16, sze = Date.now; function lze(e) { var t = 0, n = 0; return function() { var r = sze(), o = ize - (r - n); if (n = r, o > 0) { if (++t >= aze) return arguments[0]; } else t = 0; return e.apply(void 0, arguments); }; } function uze(e) { return function() { return e; }; } var p0 = function() { try { var e = r5(Object, "defineProperty"); return e({}, "", {}), e; } catch { } }(), cze = p0 ? function(e, t) { return p0(e, "toString", { configurable: !0, enumerable: !1, value: uze(t), writable: !0 }); } : BBe, dze = lze(cze), pze = 9007199254740991, fze = /^(?:0|[1-9]\d*)$/; function Mq(e, t) { var n = typeof e; return t = t ?? pze, !!t && (n == "number" || n != "symbol" && fze.test(e)) && e > -1 && e % 1 == 0 && e < t; } function hze(e, t, n) { t == "__proto__" && p0 ? p0(e, t, { configurable: !0, enumerable: !0, value: n, writable: !0 }) : e[t] = n; } function Dq(e, t) { return e === t || e !== e && t !== t; } var vze = Object.prototype, gze = vze.hasOwnProperty; function mze(e, t, n) { var r = e[t]; (!(gze.call(e, t) && Dq(r, n)) || n === void 0 && !(t in e)) && hze(e, t, n); } var TR = Math.max; function yze(e, t, n) { return t = TR(t === void 0 ? e.length - 1 : t, 0), function() { for (var r = arguments, o = -1, a = TR(r.length - t, 0), i = Array(a); ++o < a; ) i[o] = r[t + o]; o = -1; for (var s = Array(t + 1); ++o < t; ) s[o] = r[o]; return s[t] = n(i), oze(e, this, s); }; } var bze = 9007199254740991; function wze(e) { return typeof e == "number" && e > -1 && e % 1 == 0 && e <= bze; } var xze = "[object Arguments]"; function AR(e) { return t5(e) && e5(e) == xze; } var Bq = Object.prototype, kze = Bq.hasOwnProperty, Cze = Bq.propertyIsEnumerable, zq = AR(/* @__PURE__ */ function() { return arguments; }()) ? AR : function(e) { return t5(e) && kze.call(e, "callee") && !Cze.call(e, "callee"); }, _ze = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, Sze = /^\w*$/; function $ze(e, t) { if (Eh(e)) return !1; var n = typeof e; return n == "number" || n == "symbol" || n == "boolean" || e == null || n5(e) ? !0 : Sze.test(e) || !_ze.test(e) || t != null && e in Object(t); } var Of = r5(Object, "create"); function Eze() { this.__data__ = Of ? Of(null) : {}, this.size = 0; } function Oze(e) { var t = this.has(e) && delete this.__data__[e]; return this.size -= t ? 1 : 0, t; } var Fze = "__lodash_hash_undefined__", Tze = Object.prototype, Aze = Tze.hasOwnProperty; function Ize(e) { var t = this.__data__; if (Of) { var n = t[e]; return n === Fze ? void 0 : n; } return Aze.call(t, e) ? t[e] : void 0; } var Pze = Object.prototype, Lze = Pze.hasOwnProperty; function Rze(e) { var t = this.__data__; return Of ? t[e] !== void 0 : Lze.call(t, e); } var Nze = "__lodash_hash_undefined__"; function Mze(e, t) { var n = this.__data__; return this.size += this.has(e) ? 0 : 1, n[e] = Of && t === void 0 ? Nze : t, this; } function Cu(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]); } } Cu.prototype.clear = Eze; Cu.prototype.delete = Oze; Cu.prototype.get = Ize; Cu.prototype.has = Rze; Cu.prototype.set = Mze; function Dze() { this.__data__ = [], this.size = 0; } function y1(e, t) { for (var n = e.length; n--; ) if (Dq(e[n][0], t)) return n; return -1; } var Bze = Array.prototype, zze = Bze.splice; function jze(e) { var t = this.__data__, n = y1(t, e); if (n < 0) return !1; var r = t.length - 1; return n == r ? t.pop() : zze.call(t, n, 1), --this.size, !0; } function Vze(e) { var t = this.__data__, n = y1(t, e); return n < 0 ? void 0 : t[n][1]; } function Hze(e) { return y1(this.__data__, e) > -1; } function Uze(e, t) { var n = this.__data__, r = y1(n, e); return r < 0 ? (++this.size, n.push([e, t])) : n[r][1] = t, this; } function Bd(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]); } } Bd.prototype.clear = Dze; Bd.prototype.delete = jze; Bd.prototype.get = Vze; Bd.prototype.has = Hze; Bd.prototype.set = Uze; var qze = r5(QE, "Map"); function Kze() { this.size = 0, this.__data__ = { hash: new Cu(), map: new (qze || Bd)(), string: new Cu() }; } function Gze(e) { var t = typeof e; return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e !== "__proto__" : e === null; } function b1(e, t) { var n = e.__data__; return Gze(t) ? n[typeof t == "string" ? "string" : "hash"] : n.map; } function Wze(e) { var t = b1(this, e).delete(e); return this.size -= t ? 1 : 0, t; } function Yze(e) { return b1(this, e).get(e); } function Xze(e) { return b1(this, e).has(e); } function Zze(e, t) { var n = b1(this, e), r = n.size; return n.set(e, t), this.size += n.size == r ? 0 : 1, this; } function Yu(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]); } } Yu.prototype.clear = Kze; Yu.prototype.delete = Wze; Yu.prototype.get = Yze; Yu.prototype.has = Xze; Yu.prototype.set = Zze; var Jze = "Expected a function"; function o5(e, t) { if (typeof e != "function" || t != null && typeof t != "function") throw new TypeError(Jze); 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 i = e.apply(this, r); return n.cache = a.set(o, i) || a, i; }; return n.cache = new (o5.Cache || Yu)(), n; } o5.Cache = Yu; var Qze = 500; function e7e(e) { var t = o5(e, function(r) { return n.size === Qze && n.clear(), r; }), n = t.cache; return t; } var t7e = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, n7e = /\\(\\)?/g, r7e = e7e(function(e) { var t = []; return e.charCodeAt(0) === 46 && t.push(""), e.replace(t7e, function(n, r, o, a) { t.push(o ? a.replace(n7e, "$1") : r || n); }), t; }); function o7e(e) { return e == null ? "" : Nq(e); } function w1(e, t) { return Eh(e) ? e : $ze(e, t) ? [e] : r7e(o7e(e)); } var a7e = 1 / 0; function a5(e) { if (typeof e == "string" || n5(e)) return e; var t = e + ""; return t == "0" && 1 / e == -a7e ? "-0" : t; } function jq(e, t) { t = w1(t, e); for (var n = 0, r = t.length; e != null && n < r; ) e = e[a5(t[n++])]; return n && n == r ? e : void 0; } function i7e(e, t, n) { var r = e == null ? void 0 : jq(e, t); return r === void 0 ? n : r; } function s7e(e, t) { for (var n = -1, r = t.length, o = e.length; ++n < r; ) e[o + n] = t[n]; return e; } var IR = fl ? fl.isConcatSpreadable : void 0; function l7e(e) { return Eh(e) || zq(e) || !!(IR && e && e[IR]); } function u7e(e, t, n, r, o) { var a = -1, i = e.length; for (n || (n = l7e), o || (o = []); ++a < i; ) { var s = e[a]; n(s) ? s7e(o, s) : o[o.length] = s; } return o; } function c7e(e) { var t = e == null ? 0 : e.length; return t ? u7e(e) : []; } function d7e(e) { return dze(yze(e, void 0, c7e), e + ""); } function p7e(e, t) { return e != null && t in Object(e); } function f7e(e, t, n) { t = w1(t, e); for (var r = -1, o = t.length, a = !1; ++r < o; ) { var i = a5(t[r]); if (!(a = e != null && n(e, i))) break; e = e[i]; } return a || ++r != o ? a : (o = e == null ? 0 : e.length, !!o && wze(o) && Mq(i, o) && (Eh(e) || zq(e))); } function h7e(e, t) { return e != null && f7e(e, t, p7e); } function A_(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 i5(e) { return e == null; } function v7e(e) { return e === void 0; } function g7e(e, t, n, r) { if (!d0(e)) return e; t = w1(t, e); for (var o = -1, a = t.length, i = a - 1, s = e; s != null && ++o < a; ) { var l = a5(t[o]), u = n; if (l === "__proto__" || l === "constructor" || l === "prototype") return e; if (o != i) { var c = s[l]; u = void 0, u === void 0 && (u = d0(c) ? c : Mq(t[o + 1]) ? [] : {}); } mze(s, l, u), s = s[l]; } return e; } function m7e(e, t, n) { for (var r = -1, o = t.length, a = {}; ++r < o; ) { var i = t[r], s = jq(e, i); n(s, i) && g7e(a, w1(i, e), s); } return a; } function y7e(e, t) { return m7e(e, t, function(n, r) { return h7e(e, r); }); } var b7e = d7e(function(e, t) { return e == null ? {} : y7e(e, t); }); const w7e = (e) => e === void 0, s5 = (e) => typeof e == "boolean", Ff = (e) => typeof e == "number", Dp = (e) => typeof Element > "u" ? !1 : e instanceof Element, x7e = (e) => Dd(e) ? !Number.isNaN(Number(e)) : !1, PR = (e) => Object.keys(e); class k7e extends Error { constructor(t) { super(t), this.name = "ElementPlusError"; } } function _u(e, t) { if (process.env.NODE_ENV !== "production") { const n = Dd(e) ? new k7e(`[${e}] ${t}`) : e; console.warn(n); } } const C7e = "utils/dom/style", Vq = (e = "") => e.split(" ").filter((t) => !!t.trim()), LR = (e, t) => { !e || !t.trim() || e.classList.add(...Vq(t)); }, f0 = (e, t) => { !e || !t.trim() || e.classList.remove(...Vq(t)); }, cp = (e, t) => { var n; if (!Do || !e || !t) return ""; let r = CBe(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 Hq(e, t = "px") { if (!e) return ""; if (Ff(e) || x7e(e)) return `${e}${t}`; if (Dd(e)) return e; _u(C7e, "binding value must be a string or number"); } /*! Element Plus Icons Vue v2.3.1 */ var _7e = /* @__PURE__ */ W({ name: "Loading", __name: "loading", setup(e) { return (t, n) => (S(), L("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ D("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" }) ])); } }), S7e = _7e; const Uq = "__epPropKey", jt = (e) => e, $7e = (e) => $h(e) && !!e[Uq], x1 = (e, t) => { if (!$h(e) || $7e(e)) return e; const { values: n, required: r, default: o, type: a, validator: i } = e, s = { type: a, required: !!r, validator: n || i ? (l) => { let u = !1, c = []; if (n && (c = Array.from(n), SR(e, "default") && c.push(o), u || (u = c.includes(l))), i && (u || (u = i(l))), !u && c.length > 0) { const d = [...new Set(c)].map((p) => JSON.stringify(p)).join(", "); k0(`Invalid prop: validation failed${t ? ` for prop "${t}"` : ""}. Expected one of [${d}], got value ${JSON.stringify(l)}.`); } return u; } : void 0, [Uq]: !0 }; return SR(e, "default") && (s.default = o), s; }, fr = (e) => A_(Object.entries(e).map(([t, n]) => [ t, x1(n, t) ])), I_ = jt([ String, Object, Function ]), Xu = (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; }, E7e = (e, t) => (e.install = (n) => { n.directive(t, e); }, e), O7e = (e) => (e.install = c0, e), h0 = { 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" }, F7e = ["", "default", "small", "large"], T7e = ({ from: e, replacement: t, scope: n, version: r, ref: o, type: a = "API" }, i) => { he(() => y(i), (s) => { s && _u(n, `[${a}] ${e} is about to be deprecated in version ${r}, please use ${t} instead. For more detail, please visit: ${o} `); }, { immediate: !0 }); }; var A7e = { 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 I7e = (e) => (t, n) => P7e(t, n, y(e)), P7e = (e, t, n) => i7e(n, e, e).replace(/\{(\w+)\}/g, (r, o) => { var a; return `${(a = t == null ? void 0 : t[o]) != null ? a : `{${o}}`}`; }), L7e = (e) => { const t = E(() => y(e).name), n = xn(e) ? e : z(e); return { lang: t, locale: n, t: I7e(e) }; }, qq = Symbol("localeContextKey"), R7e = (e) => { const t = e || be(qq, z()); return L7e(E(() => t.value || A7e)); }, vg = "el", N7e = "is-", Ml = (e, t, n, r, o) => { let a = `${e}-${t}`; return n && (a += `-${n}`), r && (a += `__${r}`), o && (a += `--${o}`), a; }, Kq = Symbol("namespaceContextKey"), l5 = (e) => { const t = e || (st() ? be(Kq, z(vg)) : z(vg)); return E(() => y(t) || vg); }, xa = (e, t) => { const n = l5(t); return { namespace: n, b: (r = "") => Ml(n.value, e, r, "", ""), e: (r) => r ? Ml(n.value, e, "", r, "") : "", m: (r) => r ? Ml(n.value, e, "", "", r) : "", be: (r, o) => r && o ? Ml(n.value, e, r, o, "") : "", em: (r, o) => r && o ? Ml(n.value, e, "", r, o) : "", bm: (r, o) => r && o ? Ml(n.value, e, r, "", o) : "", bem: (r, o, a) => r && o && a ? Ml(n.value, e, r, o, a) : "", is: (r, ...o) => { const a = o.length >= 1 ? o[0] : !0; return r && a ? `${N7e}${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}` }; }, M7e = x1({ type: jt(Boolean), default: null }), D7e = x1({ type: jt(Function) }), B7e = (e) => { const t = `update:${e}`, n = `onUpdate:${e}`, r = [t], o = { [e]: M7e, [n]: D7e }; return { useModelToggle: ({ indicator: a, toggleReason: i, shouldHideWhenRouteChanges: s, shouldProceed: l, onShow: u, onHide: c }) => { const d = st(), { emit: p } = d, h = d.props, f = E(() => kp(h[n])), v = E(() => h[e] === null), m = (C) => { a.value !== !0 && (a.value = !0, i && (i.value = C), kp(u) && u(C)); }, g = (C) => { a.value !== !1 && (a.value = !1, i && (i.value = C), kp(c) && c(C)); }, b = (C) => { if (h.disabled === !0 || kp(l) && !l()) return; const _ = f.value && Do; _ && p(t, !0), (v.value || !_) && m(C); }, x = (C) => { if (h.disabled === !0 || !Do) return; const _ = f.value && Do; _ && p(t, !1), (v.value || !_) && g(C); }, w = (C) => { s5(C) && (h.disabled && C ? f.value && p(t, !1) : a.value !== C && (C ? m() : g())); }, k = () => { a.value ? x() : b(); }; return he(() => h[e], w), s && d.appContext.config.globalProperties.$route !== void 0 && he(() => ({ ...d.proxy.$route }), () => { s.value && a.value && x(); }), ut(() => { w(h[e]); }), { hide: x, show: b, toggle: k, hasUpdateHandler: f }; }, useModelToggleProps: o, useModelToggleEmits: r }; }, Gq = (e) => { const t = st(); return E(() => { var n, r; return (r = (n = t == null ? void 0 : t.proxy) == null ? void 0 : n.$props) == null ? void 0 : r[e]; }); }; var So = "top", va = "bottom", ga = "right", $o = "left", u5 = "auto", Oh = [So, va, ga, $o], od = "start", Tf = "end", z7e = "clippingParents", Wq = "viewport", dp = "popper", j7e = "reference", RR = Oh.reduce(function(e, t) { return e.concat([t + "-" + od, t + "-" + Tf]); }, []), c5 = [].concat(Oh, [u5]).reduce(function(e, t) { return e.concat([t, t + "-" + od, t + "-" + Tf]); }, []), V7e = "beforeRead", H7e = "read", U7e = "afterRead", q7e = "beforeMain", K7e = "main", G7e = "afterMain", W7e = "beforeWrite", Y7e = "write", X7e = "afterWrite", Z7e = [V7e, H7e, U7e, q7e, K7e, G7e, W7e, Y7e, X7e]; function ki(e) { return e ? (e.nodeName || "").toLowerCase() : null; } function Za(e) { if (e == null) return window; if (e.toString() !== "[object Window]") { var t = e.ownerDocument; return t && t.defaultView || window; } return e; } function ad(e) { var t = Za(e).Element; return e instanceof t || e instanceof Element; } function na(e) { var t = Za(e).HTMLElement; return e instanceof t || e instanceof HTMLElement; } function d5(e) { if (typeof ShadowRoot > "u") return !1; var t = Za(e).ShadowRoot; return e instanceof t || e instanceof ShadowRoot; } function J7e(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]; !na(a) || !ki(a) || (Object.assign(a.style, r), Object.keys(o).forEach(function(i) { var s = o[i]; s === !1 ? a.removeAttribute(i) : a.setAttribute(i, s === !0 ? "" : s); })); }); } function Q7e(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] || {}, i = Object.keys(t.styles.hasOwnProperty(r) ? t.styles[r] : n[r]), s = i.reduce(function(l, u) { return l[u] = "", l; }, {}); !na(o) || !ki(o) || (Object.assign(o.style, s), Object.keys(a).forEach(function(l) { o.removeAttribute(l); })); }); }; } var Yq = { name: "applyStyles", enabled: !0, phase: "write", fn: J7e, effect: Q7e, requires: ["computeStyles"] }; function fi(e) { return e.split("-")[0]; } var au = Math.max, v0 = Math.min, id = Math.round; function sd(e, t) { t === void 0 && (t = !1); var n = e.getBoundingClientRect(), r = 1, o = 1; if (na(e) && t) { var a = e.offsetHeight, i = e.offsetWidth; i > 0 && (r = id(n.width) / i || 1), a > 0 && (o = id(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 p5(e) { var t = sd(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 Xq(e, t) { var n = t.getRootNode && t.getRootNode(); if (e.contains(t)) return !0; if (n && d5(n)) { var r = t; do { if (r && e.isSameNode(r)) return !0; r = r.parentNode || r.host; } while (r); } return !1; } function ls(e) { return Za(e).getComputedStyle(e); } function eje(e) { return ["table", "td", "th"].indexOf(ki(e)) >= 0; } function Ol(e) { return ((ad(e) ? e.ownerDocument : e.document) || window.document).documentElement; } function k1(e) { return ki(e) === "html" ? e : e.assignedSlot || e.parentNode || (d5(e) ? e.host : null) || Ol(e); } function NR(e) { return !na(e) || ls(e).position === "fixed" ? null : e.offsetParent; } function tje(e) { var t = navigator.userAgent.toLowerCase().indexOf("firefox") !== -1, n = navigator.userAgent.indexOf("Trident") !== -1; if (n && na(e)) { var r = ls(e); if (r.position === "fixed") return null; } var o = k1(e); for (d5(o) && (o = o.host); na(o) && ["html", "body"].indexOf(ki(o)) < 0; ) { var a = ls(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 Fh(e) { for (var t = Za(e), n = NR(e); n && eje(n) && ls(n).position === "static"; ) n = NR(n); return n && (ki(n) === "html" || ki(n) === "body" && ls(n).position === "static") ? t : n || tje(e) || t; } function f5(e) { return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y"; } function Bp(e, t, n) { return au(e, v0(t, n)); } function nje(e, t, n) { var r = Bp(e, t, n); return r > n ? n : r; } function Zq() { return { top: 0, right: 0, bottom: 0, left: 0 }; } function Jq(e) { return Object.assign({}, Zq(), e); } function Qq(e, t) { return t.reduce(function(n, r) { return n[r] = e, n; }, {}); } var rje = function(e, t) { return e = typeof e == "function" ? e(Object.assign({}, t.rects, { placement: t.placement })) : e, Jq(typeof e != "number" ? e : Qq(e, Oh)); }; function oje(e) { var t, n = e.state, r = e.name, o = e.options, a = n.elements.arrow, i = n.modifiersData.popperOffsets, s = fi(n.placement), l = f5(s), u = [$o, ga].indexOf(s) >= 0, c = u ? "height" : "width"; if (!(!a || !i)) { var d = rje(o.padding, n), p = p5(a), h = l === "y" ? So : $o, f = l === "y" ? va : ga, v = n.rects.reference[c] + n.rects.reference[l] - i[l] - n.rects.popper[c], m = i[l] - n.rects.reference[l], g = Fh(a), b = g ? l === "y" ? g.clientHeight || 0 : g.clientWidth || 0 : 0, x = v / 2 - m / 2, w = d[h], k = b - p[c] - d[f], C = b / 2 - p[c] / 2 + x, _ = Bp(w, C, k), $ = l; n.modifiersData[r] = (t = {}, t[$] = _, t.centerOffset = _ - C, t); } } function aje(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) || !Xq(t.elements.popper, o) || (t.elements.arrow = o)); } var ije = { name: "arrow", enabled: !0, phase: "main", fn: oje, effect: aje, requires: ["popperOffsets"], requiresIfExists: ["preventOverflow"] }; function ld(e) { return e.split("-")[1]; } var sje = { top: "auto", right: "auto", bottom: "auto", left: "auto" }; function lje(e) { var t = e.x, n = e.y, r = window, o = r.devicePixelRatio || 1; return { x: id(t * o) / o || 0, y: id(n * o) / o || 0 }; } function MR(e) { var t, n = e.popper, r = e.popperRect, o = e.placement, a = e.variation, i = e.offsets, s = e.position, l = e.gpuAcceleration, u = e.adaptive, c = e.roundOffsets, d = e.isFixed, p = i.x, h = p === void 0 ? 0 : p, f = i.y, v = f === void 0 ? 0 : f, m = typeof c == "function" ? c({ x: h, y: v }) : { x: h, y: v }; h = m.x, v = m.y; var g = i.hasOwnProperty("x"), b = i.hasOwnProperty("y"), x = $o, w = So, k = window; if (u) { var C = Fh(n), _ = "clientHeight", $ = "clientWidth"; if (C === Za(n) && (C = Ol(n), ls(C).position !== "static" && s === "absolute" && (_ = "scrollHeight", $ = "scrollWidth")), C = C, o === So || (o === $o || o === ga) && a === Tf) { w = va; var O = d && C === k && k.visualViewport ? k.visualViewport.height : C[_]; v -= O - r.height, v *= l ? 1 : -1; } if (o === $o || (o === So || o === va) && a === Tf) { x = ga; var F = d && C === k && k.visualViewport ? k.visualViewport.width : C[$]; h -= F - r.width, h *= l ? 1 : -1; } } var A = Object.assign({ position: s }, u && sje), T = c === !0 ? lje({ x: h, y: v }) : { x: h, y: v }; if (h = T.x, v = T.y, l) { var R; return Object.assign({}, A, (R = {}, R[w] = b ? "0" : "", R[x] = g ? "0" : "", R.transform = (k.devicePixelRatio || 1) <= 1 ? "translate(" + h + "px, " + v + "px)" : "translate3d(" + h + "px, " + v + "px, 0)", R)); } return Object.assign({}, A, (t = {}, t[w] = b ? v + "px" : "", t[x] = g ? h + "px" : "", t.transform = "", t)); } function uje(e) { var t = e.state, n = e.options, r = n.gpuAcceleration, o = r === void 0 ? !0 : r, a = n.adaptive, i = a === void 0 ? !0 : a, s = n.roundOffsets, l = s === void 0 ? !0 : s, u = { placement: fi(t.placement), variation: ld(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, MR(Object.assign({}, u, { offsets: t.modifiersData.popperOffsets, position: t.options.strategy, adaptive: i, roundOffsets: l })))), t.modifiersData.arrow != null && (t.styles.arrow = Object.assign({}, t.styles.arrow, MR(Object.assign({}, u, { offsets: t.modifiersData.arrow, position: "absolute", adaptive: !1, roundOffsets: l })))), t.attributes.popper = Object.assign({}, t.attributes.popper, { "data-popper-placement": t.placement }); } var eK = { name: "computeStyles", enabled: !0, phase: "beforeWrite", fn: uje, data: {} }, Ev = { passive: !0 }; function cje(e) { var t = e.state, n = e.instance, r = e.options, o = r.scroll, a = o === void 0 ? !0 : o, i = r.resize, s = i === void 0 ? !0 : i, l = Za(t.elements.popper), u = [].concat(t.scrollParents.reference, t.scrollParents.popper); return a && u.forEach(function(c) { c.addEventListener("scroll", n.update, Ev); }), s && l.addEventListener("resize", n.update, Ev), function() { a && u.forEach(function(c) { c.removeEventListener("scroll", n.update, Ev); }), s && l.removeEventListener("resize", n.update, Ev); }; } var tK = { name: "eventListeners", enabled: !0, phase: "write", fn: function() { }, effect: cje, data: {} }, dje = { left: "right", right: "left", bottom: "top", top: "bottom" }; function gg(e) { return e.replace(/left|right|bottom|top/g, function(t) { return dje[t]; }); } var pje = { start: "end", end: "start" }; function DR(e) { return e.replace(/start|end/g, function(t) { return pje[t]; }); } function h5(e) { var t = Za(e), n = t.pageXOffset, r = t.pageYOffset; return { scrollLeft: n, scrollTop: r }; } function v5(e) { return sd(Ol(e)).left + h5(e).scrollLeft; } function fje(e) { var t = Za(e), n = Ol(e), r = t.visualViewport, o = n.clientWidth, a = n.clientHeight, i = 0, s = 0; return r && (o = r.width, a = r.height, /^((?!chrome|android).)*safari/i.test(navigator.userAgent) || (i = r.offsetLeft, s = r.offsetTop)), { width: o, height: a, x: i + v5(e), y: s }; } function hje(e) { var t, n = Ol(e), r = h5(e), o = (t = e.ownerDocument) == null ? void 0 : t.body, a = au(n.scrollWidth, n.clientWidth, o ? o.scrollWidth : 0, o ? o.clientWidth : 0), i = au(n.scrollHeight, n.clientHeight, o ? o.scrollHeight : 0, o ? o.clientHeight : 0), s = -r.scrollLeft + v5(e), l = -r.scrollTop; return ls(o || n).direction === "rtl" && (s += au(n.clientWidth, o ? o.clientWidth : 0) - a), { width: a, height: i, x: s, y: l }; } function g5(e) { var t = ls(e), n = t.overflow, r = t.overflowX, o = t.overflowY; return /auto|scroll|overlay|hidden/.test(n + o + r); } function nK(e) { return ["html", "body", "#document"].indexOf(ki(e)) >= 0 ? e.ownerDocument.body : na(e) && g5(e) ? e : nK(k1(e)); } function zp(e, t) { var n; t === void 0 && (t = []); var r = nK(e), o = r === ((n = e.ownerDocument) == null ? void 0 : n.body), a = Za(r), i = o ? [a].concat(a.visualViewport || [], g5(r) ? r : []) : r, s = t.concat(i); return o ? s : s.concat(zp(k1(i))); } function P_(e) { return Object.assign({}, e, { left: e.x, top: e.y, right: e.x + e.width, bottom: e.y + e.height }); } function vje(e) { var t = sd(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 BR(e, t) { return t === Wq ? P_(fje(e)) : ad(t) ? vje(t) : P_(hje(Ol(e))); } function gje(e) { var t = zp(k1(e)), n = ["absolute", "fixed"].indexOf(ls(e).position) >= 0, r = n && na(e) ? Fh(e) : e; return ad(r) ? t.filter(function(o) { return ad(o) && Xq(o, r) && ki(o) !== "body"; }) : []; } function mje(e, t, n) { var r = t === "clippingParents" ? gje(e) : [].concat(t), o = [].concat(r, [n]), a = o[0], i = o.reduce(function(s, l) { var u = BR(e, l); return s.top = au(u.top, s.top), s.right = v0(u.right, s.right), s.bottom = v0(u.bottom, s.bottom), s.left = au(u.left, s.left), s; }, BR(e, a)); return i.width = i.right - i.left, i.height = i.bottom - i.top, i.x = i.left, i.y = i.top, i; } function rK(e) { var t = e.reference, n = e.element, r = e.placement, o = r ? fi(r) : null, a = r ? ld(r) : null, i = t.x + t.width / 2 - n.width / 2, s = t.y + t.height / 2 - n.height / 2, l; switch (o) { case So: l = { x: i, y: t.y - n.height }; break; case va: l = { x: i, y: t.y + t.height }; break; case ga: l = { x: t.x + t.width, y: s }; break; case $o: l = { x: t.x - n.width, y: s }; break; default: l = { x: t.x, y: t.y }; } var u = o ? f5(o) : null; if (u != null) { var c = u === "y" ? "height" : "width"; switch (a) { case od: l[u] = l[u] - (t[c] / 2 - n[c] / 2); break; case Tf: l[u] = l[u] + (t[c] / 2 - n[c] / 2); break; } } return l; } function Af(e, t) { t === void 0 && (t = {}); var n = t, r = n.placement, o = r === void 0 ? e.placement : r, a = n.boundary, i = a === void 0 ? z7e : a, s = n.rootBoundary, l = s === void 0 ? Wq : s, u = n.elementContext, c = u === void 0 ? dp : u, d = n.altBoundary, p = d === void 0 ? !1 : d, h = n.padding, f = h === void 0 ? 0 : h, v = Jq(typeof f != "number" ? f : Qq(f, Oh)), m = c === dp ? j7e : dp, g = e.rects.popper, b = e.elements[p ? m : c], x = mje(ad(b) ? b : b.contextElement || Ol(e.elements.popper), i, l), w = sd(e.elements.reference), k = rK({ reference: w, element: g, strategy: "absolute", placement: o }), C = P_(Object.assign({}, g, k)), _ = c === dp ? C : w, $ = { top: x.top - _.top + v.top, bottom: _.bottom - x.bottom + v.bottom, left: x.left - _.left + v.left, right: _.right - x.right + v.right }, O = e.modifiersData.offset; if (c === dp && O) { var F = O[o]; Object.keys($).forEach(function(A) { var T = [ga, va].indexOf(A) >= 0 ? 1 : -1, R = [So, va].indexOf(A) >= 0 ? "y" : "x"; $[A] += F[R] * T; }); } return $; } function yje(e, t) { t === void 0 && (t = {}); var n = t, r = n.placement, o = n.boundary, a = n.rootBoundary, i = n.padding, s = n.flipVariations, l = n.allowedAutoPlacements, u = l === void 0 ? c5 : l, c = ld(r), d = c ? s ? RR : RR.filter(function(f) { return ld(f) === c; }) : Oh, p = d.filter(function(f) { return u.indexOf(f) >= 0; }); p.length === 0 && (p = d); var h = p.reduce(function(f, v) { return f[v] = Af(e, { placement: v, boundary: o, rootBoundary: a, padding: i })[fi(v)], f; }, {}); return Object.keys(h).sort(function(f, v) { return h[f] - h[v]; }); } function bje(e) { if (fi(e) === u5) return []; var t = gg(e); return [DR(e), t, DR(t)]; } function wje(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, i = n.altAxis, s = i === void 0 ? !0 : i, l = n.fallbackPlacements, u = n.padding, c = n.boundary, d = n.rootBoundary, p = n.altBoundary, h = n.flipVariations, f = h === void 0 ? !0 : h, v = n.allowedAutoPlacements, m = t.options.placement, g = fi(m), b = g === m, x = l || (b || !f ? [gg(m)] : bje(m)), w = [m].concat(x).reduce(function(te, oe) { return te.concat(fi(oe) === u5 ? yje(t, { placement: oe, boundary: c, rootBoundary: d, padding: u, flipVariations: f, allowedAutoPlacements: v }) : oe); }, []), k = t.rects.reference, C = t.rects.popper, _ = /* @__PURE__ */ new Map(), $ = !0, O = w[0], F = 0; F < w.length; F++) { var A = w[F], T = fi(A), R = ld(A) === od, M = [So, va].indexOf(T) >= 0, j = M ? "width" : "height", P = Af(t, { placement: A, boundary: c, rootBoundary: d, altBoundary: p, padding: u }), V = M ? R ? ga : $o : R ? va : So; k[j] > C[j] && (V = gg(V)); var U = gg(V), G = []; if (a && G.push(P[T] <= 0), s && G.push(P[V] <= 0, P[U] <= 0), G.every(function(te) { return te; })) { O = A, $ = !1; break; } _.set(A, G); } if ($) for (var se = f ? 3 : 1, ae = function(te) { var oe = w.find(function(ne) { var ee = _.get(ne); if (ee) return ee.slice(0, te).every(function(Z) { return Z; }); }); if (oe) return O = oe, "break"; }, de = se; de > 0; de--) { var me = ae(de); if (me === "break") break; } t.placement !== O && (t.modifiersData[r]._skip = !0, t.placement = O, t.reset = !0); } } var xje = { name: "flip", enabled: !0, phase: "main", fn: wje, requiresIfExists: ["offset"], data: { _skip: !1 } }; function zR(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 jR(e) { return [So, ga, va, $o].some(function(t) { return e[t] >= 0; }); } function kje(e) { var t = e.state, n = e.name, r = t.rects.reference, o = t.rects.popper, a = t.modifiersData.preventOverflow, i = Af(t, { elementContext: "reference" }), s = Af(t, { altBoundary: !0 }), l = zR(i, r), u = zR(s, o, a), c = jR(l), d = jR(u); t.modifiersData[n] = { referenceClippingOffsets: l, popperEscapeOffsets: u, isReferenceHidden: c, hasPopperEscaped: d }, t.attributes.popper = Object.assign({}, t.attributes.popper, { "data-popper-reference-hidden": c, "data-popper-escaped": d }); } var Cje = { name: "hide", enabled: !0, phase: "main", requiresIfExists: ["preventOverflow"], fn: kje }; function _je(e, t, n) { var r = fi(e), o = [$o, So].indexOf(r) >= 0 ? -1 : 1, a = typeof n == "function" ? n(Object.assign({}, t, { placement: e })) : n, i = a[0], s = a[1]; return i = i || 0, s = (s || 0) * o, [$o, ga].indexOf(r) >= 0 ? { x: s, y: i } : { x: i, y: s }; } function Sje(e) { var t = e.state, n = e.options, r = e.name, o = n.offset, a = o === void 0 ? [0, 0] : o, i = c5.reduce(function(c, d) { return c[d] = _je(d, t.rects, a), c; }, {}), s = i[t.placement], l = s.x, u = s.y; t.modifiersData.popperOffsets != null && (t.modifiersData.popperOffsets.x += l, t.modifiersData.popperOffsets.y += u), t.modifiersData[r] = i; } var $je = { name: "offset", enabled: !0, phase: "main", requires: ["popperOffsets"], fn: Sje }; function Eje(e) { var t = e.state, n = e.name; t.modifiersData[n] = rK({ reference: t.rects.reference, element: t.rects.popper, strategy: "absolute", placement: t.placement }); } var oK = { name: "popperOffsets", enabled: !0, phase: "read", fn: Eje, data: {} }; function Oje(e) { return e === "x" ? "y" : "x"; } function Fje(e) { var t = e.state, n = e.options, r = e.name, o = n.mainAxis, a = o === void 0 ? !0 : o, i = n.altAxis, s = i === void 0 ? !1 : i, l = n.boundary, u = n.rootBoundary, c = n.altBoundary, d = n.padding, p = n.tether, h = p === void 0 ? !0 : p, f = n.tetherOffset, v = f === void 0 ? 0 : f, m = Af(t, { boundary: l, rootBoundary: u, padding: d, altBoundary: c }), g = fi(t.placement), b = ld(t.placement), x = !b, w = f5(g), k = Oje(w), C = t.modifiersData.popperOffsets, _ = t.rects.reference, $ = t.rects.popper, O = typeof v == "function" ? v(Object.assign({}, t.rects, { placement: t.placement })) : v, F = typeof O == "number" ? { mainAxis: O, altAxis: O } : Object.assign({ mainAxis: 0, altAxis: 0 }, O), A = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, T = { x: 0, y: 0 }; if (C) { if (a) { var R, M = w === "y" ? So : $o, j = w === "y" ? va : ga, P = w === "y" ? "height" : "width", V = C[w], U = V + m[M], G = V - m[j], se = h ? -$[P] / 2 : 0, ae = b === od ? _[P] : $[P], de = b === od ? -$[P] : -_[P], me = t.elements.arrow, te = h && me ? p5(me) : { width: 0, height: 0 }, oe = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : Zq(), ne = oe[M], ee = oe[j], Z = Bp(0, _[P], te[P]), le = x ? _[P] / 2 - se - Z - ne - F.mainAxis : ae - Z - ne - F.mainAxis, pe = x ? -_[P] / 2 + se + Z + ee + F.mainAxis : de + Z + ee + F.mainAxis, ke = t.elements.arrow && Fh(t.elements.arrow), Ne = ke ? w === "y" ? ke.clientTop || 0 : ke.clientLeft || 0 : 0, De = (R = A == null ? void 0 : A[w]) != null ? R : 0, _e = V + le - De - Ne, Fe = V + pe - De, Ie = Bp(h ? v0(U, _e) : U, V, h ? au(G, Fe) : G); C[w] = Ie, T[w] = Ie - V; } if (s) { var Ae, qe = w === "x" ? So : $o, et = w === "x" ? va : ga, He = C[k], ot = k === "y" ? "height" : "width", tt = He + m[qe], Qe = He - m[et], I = [So, $o].indexOf(g) !== -1, Y = (Ae = A == null ? void 0 : A[k]) != null ? Ae : 0, ve = I ? tt : He - _[ot] - $[ot] - Y + F.altAxis, we = I ? He + _[ot] + $[ot] - Y - F.altAxis : Qe, ye = h && I ? nje(ve, He, we) : Bp(h ? ve : tt, He, h ? we : Qe); C[k] = ye, T[k] = ye - He; } t.modifiersData[r] = T; } } var Tje = { name: "preventOverflow", enabled: !0, phase: "main", fn: Fje, requiresIfExists: ["offset"] }; function Aje(e) { return { scrollLeft: e.scrollLeft, scrollTop: e.scrollTop }; } function Ije(e) { return e === Za(e) || !na(e) ? h5(e) : Aje(e); } function Pje(e) { var t = e.getBoundingClientRect(), n = id(t.width) / e.offsetWidth || 1, r = id(t.height) / e.offsetHeight || 1; return n !== 1 || r !== 1; } function Lje(e, t, n) { n === void 0 && (n = !1); var r = na(t), o = na(t) && Pje(t), a = Ol(t), i = sd(e, o), s = { scrollLeft: 0, scrollTop: 0 }, l = { x: 0, y: 0 }; return (r || !r && !n) && ((ki(t) !== "body" || g5(a)) && (s = Ije(t)), na(t) ? (l = sd(t, !0), l.x += t.clientLeft, l.y += t.clientTop) : a && (l.x = v5(a))), { x: i.left + s.scrollLeft - l.x, y: i.top + s.scrollTop - l.y, width: i.width, height: i.height }; } function Rje(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 i = [].concat(a.requires || [], a.requiresIfExists || []); i.forEach(function(s) { if (!n.has(s)) { var l = t.get(s); l && o(l); } }), r.push(a); } return e.forEach(function(a) { n.has(a.name) || o(a); }), r; } function Nje(e) { var t = Rje(e); return Z7e.reduce(function(n, r) { return n.concat(t.filter(function(o) { return o.phase === r; })); }, []); } function Mje(e) { var t; return function() { return t || (t = new Promise(function(n) { Promise.resolve().then(function() { t = void 0, n(e()); }); })), t; }; } function Dje(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 VR = { placement: "bottom", modifiers: [], strategy: "absolute" }; function HR() { 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 m5(e) { e === void 0 && (e = {}); var t = e, n = t.defaultModifiers, r = n === void 0 ? [] : n, o = t.defaultOptions, a = o === void 0 ? VR : o; return function(i, s, l) { l === void 0 && (l = a); var u = { placement: "bottom", orderedModifiers: [], options: Object.assign({}, VR, a), modifiersData: {}, elements: { reference: i, popper: s }, attributes: {}, styles: {} }, c = [], d = !1, p = { state: u, setOptions: function(v) { var m = typeof v == "function" ? v(u.options) : v; f(), u.options = Object.assign({}, a, u.options, m), u.scrollParents = { reference: ad(i) ? zp(i) : i.contextElement ? zp(i.contextElement) : [], popper: zp(s) }; var g = Nje(Dje([].concat(r, u.options.modifiers))); return u.orderedModifiers = g.filter(function(b) { return b.enabled; }), h(), p.update(); }, forceUpdate: function() { if (!d) { var v = u.elements, m = v.reference, g = v.popper; if (HR(m, g)) { u.rects = { reference: Lje(m, Fh(g), u.options.strategy === "fixed"), popper: p5(g) }, u.reset = !1, u.placement = u.options.placement, u.orderedModifiers.forEach(function($) { return u.modifiersData[$.name] = Object.assign({}, $.data); }); for (var b = 0; b < u.orderedModifiers.length; b++) { if (u.reset === !0) { u.reset = !1, b = -1; continue; } var x = u.orderedModifiers[b], w = x.fn, k = x.options, C = k === void 0 ? {} : k, _ = x.name; typeof w == "function" && (u = w({ state: u, options: C, name: _, instance: p }) || u); } } } }, update: Mje(function() { return new Promise(function(v) { p.forceUpdate(), v(u); }); }), destroy: function() { f(), d = !0; } }; if (!HR(i, s)) return p; p.setOptions(l).then(function(v) { !d && l.onFirstUpdate && l.onFirstUpdate(v); }); function h() { u.orderedModifiers.forEach(function(v) { var m = v.name, g = v.options, b = g === void 0 ? {} : g, x = v.effect; if (typeof x == "function") { var w = x({ state: u, name: m, instance: p, options: b }), k = function() { }; c.push(w || k); } }); } function f() { c.forEach(function(v) { return v(); }), c = []; } return p; }; } m5(); var Bje = [tK, oK, eK, Yq]; m5({ defaultModifiers: Bje }); var zje = [tK, oK, eK, Yq, $je, xje, Tje, ije, Cje], jje = m5({ defaultModifiers: zje }); const Vje = (e, t, n = {}) => { const r = { name: "updateState", enabled: !0, phase: "write", fn: ({ state: l }) => { const u = Hje(l); Object.assign(i.value, u); }, requires: ["computeStyles"] }, o = E(() => { const { onFirstUpdate: l, placement: u, strategy: c, modifiers: d } = y(n); return { onFirstUpdate: l, placement: u || "bottom", strategy: c || "absolute", modifiers: [ ...d || [], r, { name: "applyStyles", enabled: !1 } ] }; }), a = En(), i = z({ styles: { popper: { position: y(o).strategy, left: "0", top: "0" }, arrow: { position: "absolute" } }, attributes: {} }), s = () => { a.value && (a.value.destroy(), a.value = void 0); }; return he(o, (l) => { const u = y(a); u && u.setOptions(l); }, { deep: !0 }), he([e, t], ([l, u]) => { s(), !(!l || !u) && (a.value = jje(l, u, y(o))); }), Tt(() => { s(); }), { state: E(() => { var l; return { ...((l = y(a)) == null ? void 0 : l.state) || {} }; }), styles: E(() => y(i).styles), attributes: E(() => y(i).attributes), update: () => { var l; return (l = y(a)) == null ? void 0 : l.update(); }, forceUpdate: () => { var l; return (l = y(a)) == null ? void 0 : l.forceUpdate(); }, instanceRef: E(() => y(a)) }; }; function Hje(e) { const t = Object.keys(e.elements), n = A_(t.map((o) => [o, e.styles[o] || {}])), r = A_(t.map((o) => [o, e.attributes[o]])); return { styles: n, attributes: r }; } function UR() { let e; const t = (r, o) => { n(), e = window.setTimeout(r, o); }, n = () => window.clearTimeout(e); return Iq(() => n()), { registerTimeout: t, cancelTimeout: n }; } const L_ = { prefix: Math.floor(Math.random() * 1e4), current: 0 }, Uje = Symbol("elIdInjection"), aK = () => st() ? be(Uje, L_) : L_, qje = (e) => { const t = aK(); !Do && t === L_ && _u("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 = l5(); return E(() => y(e) || `${n.value}-id-${t.prefix}-${t.current++}`); }; let bc = []; const qR = (e) => { const t = e; t.key === h0.esc && bc.forEach((n) => n(t)); }, Kje = (e) => { ut(() => { bc.length === 0 && document.addEventListener("keydown", qR), Do && bc.push(e); }), Tt(() => { bc = bc.filter((t) => t !== e), bc.length === 0 && Do && document.removeEventListener("keydown", qR); }); }; let KR; const iK = () => { const e = l5(), t = aK(), n = E(() => `${e.value}-popper-container-${t.prefix}`), r = E(() => `#${n.value}`); return { id: n, selector: r }; }, Gje = (e) => { const t = document.createElement("div"); return t.id = e, document.body.appendChild(t), t; }, Wje = () => { const { id: e, selector: t } = iK(); return C0(() => { Do && (process.env.NODE_ENV === "test" || !KR || !document.body.querySelector(t.value)) && (KR = Gje(e.value)); }), { id: e, selector: t }; }, Yje = fr({ showAfter: { type: Number, default: 0 }, hideAfter: { type: Number, default: 200 }, autoClose: { type: Number, default: 0 } }), Xje = ({ showAfter: e, hideAfter: t, autoClose: n, open: r, close: o }) => { const { registerTimeout: a } = UR(), { registerTimeout: i, cancelTimeout: s } = UR(); return { onOpen: (l) => { a(() => { r(l); const u = y(n); Ff(u) && u > 0 && i(() => { o(l); }, u); }, y(e)); }, onClose: (l) => { s(), a(() => { o(l); }, y(t)); } }; }, sK = Symbol("elForwardRef"), Zje = (e) => { nt(sK, { setForwardRef: (t) => { e.value = t; } }); }, Jje = (e) => ({ mounted(t) { e(t); }, updated(t) { e(t); }, unmounted() { e(null); } }), GR = { current: 0 }, WR = z(0), lK = 2e3, YR = Symbol("elZIndexContextKey"), uK = Symbol("zIndexContextKey"), cK = (e) => { const t = st() ? be(YR, GR) : GR, n = e || (st() ? be(uK, void 0) : void 0), r = E(() => { const i = y(n); return Ff(i) ? i : lK; }), o = E(() => r.value + WR.value), a = () => (t.current++, WR.value = t.current, o.value); return !Do && !be(YR) && _u("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 }; }, Qje = x1({ type: String, values: F7e, required: !1 }), dK = Symbol("size"), eVe = () => { const e = be(dK, {}); return E(() => y(e.size) || ""); }, tVe = Symbol("emptyValuesContextKey"); fr({ emptyValues: Array, valueOnClear: { type: [String, Number, Boolean, Function], default: void 0, validator: (e) => kp(e) ? !e() : !e } }); const nVe = fr({ ariaLabel: String, ariaOrientation: { type: String, values: ["horizontal", "vertical", "undefined"] }, ariaControls: String }), pK = (e) => b7e(nVe, e), fK = Symbol(), g0 = z(); function y5(e, t = void 0) { const n = st() ? be(fK, g0) : g0; return e ? E(() => { var r, o; return (o = (r = n.value) == null ? void 0 : r[e]) != null ? o : t; }) : n; } function rVe(e, t) { const n = y5(), r = xa(e, E(() => { var s; return ((s = n.value) == null ? void 0 : s.namespace) || vg; })), o = R7e(E(() => { var s; return (s = n.value) == null ? void 0 : s.locale; })), a = cK(E(() => { var s; return ((s = n.value) == null ? void 0 : s.zIndex) || lK; })), i = E(() => { var s; return y(t) || ((s = n.value) == null ? void 0 : s.size) || ""; }); return oVe(E(() => y(n) || {})), { ns: r, locale: o, zIndex: a, size: i }; } const oVe = (e, t, n = !1) => { var r; const o = !!st(), a = o ? y5() : void 0, i = (r = void 0) != null ? r : o ? nt : void 0; if (!i) { _u("provideGlobalConfig", "provideGlobalConfig() can only be used inside setup()."); return; } const s = E(() => { const l = y(e); return a != null && a.value ? aVe(a.value, l) : l; }); return i(fK, s), i(qq, E(() => s.value.locale)), i(Kq, E(() => s.value.namespace)), i(uK, E(() => s.value.zIndex)), i(dK, { size: E(() => s.value.size || "") }), i(tVe, E(() => ({ emptyValues: s.value.emptyValues, valueOnClear: s.value.valueOnClear }))), (n || !g0.value) && (g0.value = s.value), s; }, aVe = (e, t) => { const n = [.../* @__PURE__ */ new Set([...PR(e), ...PR(t)])], r = {}; for (const o of n) r[o] = t[o] !== void 0 ? t[o] : e[o]; return r; }; var eo = (e, t) => { const n = e.__vccOpts || e; for (const [r, o] of t) n[r] = o; return n; }; const iVe = fr({ size: { type: jt([Number, String]) }, color: { type: String } }), sVe = W({ name: "ElIcon", inheritAttrs: !1 }), lVe = /* @__PURE__ */ W({ ...sVe, props: iVe, setup(e) { const t = e, n = xa("icon"), r = E(() => { const { size: o, color: a } = t; return !o && !a ? {} : { fontSize: w7e(o) ? void 0 : Hq(o), "--color": a }; }); return (o, a) => (S(), L("i", Et({ class: y(n).b(), style: y(r) }, o.$attrs), [ ue(o.$slots, "default") ], 16)); } }); var uVe = /* @__PURE__ */ eo(lVe, [["__file", "icon.vue"]]); const XR = Xu(uVe), b5 = Symbol("formContextKey"), m0 = Symbol("formItemContextKey"), cVe = (e, t = {}) => { const n = z(void 0), r = t.prop ? n : Gq("size"), o = t.global ? n : eVe(), a = t.form ? { size: void 0 } : be(b5, void 0), i = t.formItem ? { size: void 0 } : be(m0, void 0); return E(() => r.value || y(e) || (i == null ? void 0 : i.size) || (a == null ? void 0 : a.size) || o.value || ""); }, hK = (e) => { const t = Gq("disabled"), n = be(b5, void 0); return E(() => t.value || y(e) || (n == null ? void 0 : n.disabled) || !1); }, dVe = () => { const e = be(b5, void 0), t = be(m0, void 0); return { form: e, formItem: t }; }, w5 = Symbol("popper"), vK = Symbol("popperContent"), pVe = [ "dialog", "grid", "group", "listbox", "menu", "navigation", "tooltip", "tree" ], gK = fr({ role: { type: String, values: pVe, default: "tooltip" } }), fVe = W({ name: "ElPopper", inheritAttrs: !1 }), hVe = /* @__PURE__ */ W({ ...fVe, props: gK, setup(e, { expose: t }) { const n = e, r = z(), o = z(), a = z(), i = z(), s = E(() => n.role), l = { triggerRef: r, popperInstanceRef: o, contentRef: a, referenceRef: i, role: s }; return t(l), nt(w5, l), (u, c) => ue(u.$slots, "default"); } }); var vVe = /* @__PURE__ */ eo(hVe, [["__file", "popper.vue"]]); const mK = fr({ arrowOffset: { type: Number, default: 5 } }), gVe = W({ name: "ElPopperArrow", inheritAttrs: !1 }), mVe = /* @__PURE__ */ W({ ...gVe, props: mK, setup(e, { expose: t }) { const n = e, r = xa("popper"), { arrowOffset: o, arrowRef: a, arrowStyle: i } = be(vK, void 0); return he(() => n.arrowOffset, (s) => { o.value = s; }), Tt(() => { a.value = void 0; }), t({ arrowRef: a }), (s, l) => (S(), L("span", { ref_key: "arrowRef", ref: a, class: H(y(r).e("arrow")), style: Ye(y(i)), "data-popper-arrow": "" }, null, 6)); } }); var yVe = /* @__PURE__ */ eo(mVe, [["__file", "arrow.vue"]]); const Qk = "ElOnlyChild", bVe = W({ name: Qk, setup(e, { slots: t, attrs: n }) { var r; const o = be(sK), a = Jje((r = o == null ? void 0 : o.setForwardRef) != null ? r : c0); return () => { var i; const s = (i = t.default) == null ? void 0 : i.call(t, n); if (!s) return null; if (s.length > 1) return _u(Qk, "requires exact only one valid child."), null; const l = yK(s); return l ? Be(_0(l, n), [[a]]) : (_u(Qk, "no valid child node found"), null); }; } }); function yK(e) { if (!e) return null; const t = e; for (const n of t) { if ($h(n)) switch (n.type) { case S0: continue; case hl: case "svg": return ZR(n); case Re: return yK(n.children); default: return n; } return ZR(n); } return null; } function ZR(e) { const t = xa("only-child"); return q("span", { class: t.e("content") }, [e]); } const bK = fr({ virtualRef: { type: jt(Object) }, virtualTriggering: Boolean, onMouseenter: { type: jt(Function) }, onMouseleave: { type: jt(Function) }, onClick: { type: jt(Function) }, onKeydown: { type: jt(Function) }, onFocus: { type: jt(Function) }, onBlur: { type: jt(Function) }, onContextmenu: { type: jt(Function) }, id: String, open: Boolean }), wVe = W({ name: "ElPopperTrigger", inheritAttrs: !1 }), xVe = /* @__PURE__ */ W({ ...wVe, props: bK, setup(e, { expose: t }) { const n = e, { role: r, triggerRef: o } = be(w5, void 0); Zje(o); const a = E(() => s.value ? n.id : void 0), i = E(() => { if (r && r.value === "tooltip") return n.open && n.id ? n.id : void 0; }), s = E(() => { if (r && r.value !== "tooltip") return r.value; }), l = E(() => s.value ? `${n.open}` : void 0); let u; const c = [ "onMouseenter", "onMouseleave", "onClick", "onKeydown", "onFocus", "onBlur", "onContextmenu" ]; return ut(() => { he(() => n.virtualRef, (d) => { d && (o.value = Wl(d)); }, { immediate: !0 }), he(o, (d, p) => { u == null || u(), u = void 0, Dp(d) && (c.forEach((h) => { var f; const v = n[h]; v && (d.addEventListener(h.slice(2).toLowerCase(), v), (f = p == null ? void 0 : p.removeEventListener) == null || f.call(p, h.slice(2).toLowerCase(), v)); }), u = he([a, i, s, l], (h) => { [ "aria-controls", "aria-describedby", "aria-haspopup", "aria-expanded" ].forEach((f, v) => { i5(h[v]) ? d.removeAttribute(f) : d.setAttribute(f, h[v]); }); }, { immediate: !0 })), Dp(p) && [ "aria-controls", "aria-describedby", "aria-haspopup", "aria-expanded" ].forEach((h) => p.removeAttribute(h)); }, { immediate: !0 }); }), Tt(() => { if (u == null || u(), u = void 0, o.value && Dp(o.value)) { const d = o.value; c.forEach((p) => { const h = n[p]; h && d.removeEventListener(p.slice(2).toLowerCase(), h); }), o.value = void 0; } }), t({ triggerRef: o }), (d, p) => d.virtualTriggering ? J("v-if", !0) : (S(), re(y(bVe), Et({ key: 0 }, d.$attrs, { "aria-controls": y(a), "aria-describedby": y(i), "aria-expanded": y(l), "aria-haspopup": y(s) }), { default: N(() => [ ue(d.$slots, "default") ]), _: 3 }, 16, ["aria-controls", "aria-describedby", "aria-expanded", "aria-haspopup"])); } }); var kVe = /* @__PURE__ */ eo(xVe, [["__file", "trigger.vue"]]); const eC = "focus-trap.focus-after-trapped", tC = "focus-trap.focus-after-released", CVe = "focus-trap.focusout-prevented", JR = { cancelable: !0, bubbles: !1 }, _Ve = { cancelable: !0, bubbles: !1 }, QR = "focusAfterTrapped", e9 = "focusAfterReleased", SVe = Symbol("elFocusTrap"), x5 = z(), C1 = z(0), k5 = z(0); let Ov = 0; const wK = (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; }, t9 = (e, t) => { for (const n of e) if (!$Ve(n, t)) return n; }, $Ve = (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; }, EVe = (e) => { const t = wK(e), n = t9(t, e), r = t9(t.reverse(), e); return [n, r]; }, OVe = (e) => e instanceof HTMLInputElement && "select" in e, Ls = (e, t) => { if (e && e.focus) { const n = document.activeElement; e.focus({ preventScroll: !0 }), k5.value = window.performance.now(), e !== n && OVe(e) && t && e.select(); } }; function n9(e, t) { const n = [...e], r = e.indexOf(t); return r !== -1 && n.splice(r, 1), n; } const FVe = () => { let e = []; return { push: (t) => { const n = e[0]; n && t !== n && n.pause(), e = n9(e, t), e.unshift(t); }, remove: (t) => { var n, r; e = n9(e, t), (r = (n = e[0]) == null ? void 0 : n.resume) == null || r.call(n); } }; }, TVe = (e, t = !1) => { const n = document.activeElement; for (const r of e) if (Ls(r, t), document.activeElement !== n) return; }, r9 = FVe(), AVe = () => C1.value > k5.value, Fv = () => { x5.value = "pointer", C1.value = window.performance.now(); }, o9 = () => { x5.value = "keyboard", C1.value = window.performance.now(); }, IVe = () => (ut(() => { Ov === 0 && (document.addEventListener("mousedown", Fv), document.addEventListener("touchstart", Fv), document.addEventListener("keydown", o9)), Ov++; }), Tt(() => { Ov--, Ov <= 0 && (document.removeEventListener("mousedown", Fv), document.removeEventListener("touchstart", Fv), document.removeEventListener("keydown", o9)); }), { focusReason: x5, lastUserFocusTimestamp: C1, lastAutomatedFocusTimestamp: k5 }), Tv = (e) => new CustomEvent(CVe, { ..._Ve, detail: e }), PVe = W({ name: "ElFocusTrap", inheritAttrs: !1, props: { loop: Boolean, trapped: Boolean, focusTrapEl: Object, focusStartEl: { type: [Object, String], default: "first" } }, emits: [ QR, e9, "focusin", "focusout", "focusout-prevented", "release-requested" ], setup(e, { emit: t }) { const n = z(); let r, o; const { focusReason: a } = IVe(); Kje((f) => { e.trapped && !i.paused && t("release-requested", f); }); const i = { paused: !1, pause() { this.paused = !0; }, resume() { this.paused = !1; } }, s = (f) => { if (!e.loop && !e.trapped || i.paused) return; const { key: v, altKey: m, ctrlKey: g, metaKey: b, currentTarget: x, shiftKey: w } = f, { loop: k } = e, C = v === h0.tab && !m && !g && !b, _ = document.activeElement; if (C && _) { const $ = x, [O, F] = EVe($); if (O && F) { if (!w && _ === F) { const A = Tv({ focusReason: a.value }); t("focusout-prevented", A), A.defaultPrevented || (f.preventDefault(), k && Ls(O, !0)); } else if (w && [O, $].includes(_)) { const A = Tv({ focusReason: a.value }); t("focusout-prevented", A), A.defaultPrevented || (f.preventDefault(), k && Ls(F, !0)); } } else if (_ === $) { const A = Tv({ focusReason: a.value }); t("focusout-prevented", A), A.defaultPrevented || f.preventDefault(); } } }; nt(SVe, { focusTrapRef: n, onKeydown: s }), he(() => e.focusTrapEl, (f) => { f && (n.value = f); }, { immediate: !0 }), he([n], ([f], [v]) => { f && (f.addEventListener("keydown", s), f.addEventListener("focusin", c), f.addEventListener("focusout", d)), v && (v.removeEventListener("keydown", s), v.removeEventListener("focusin", c), v.removeEventListener("focusout", d)); }); const l = (f) => { t(QR, f); }, u = (f) => t(e9, f), c = (f) => { const v = y(n); if (!v) return; const m = f.target, g = f.relatedTarget, b = m && v.contains(m); e.trapped || g && v.contains(g) || (r = g), b && t("focusin", f), !i.paused && e.trapped && (b ? o = m : Ls(o, !0)); }, d = (f) => { const v = y(n); if (!(i.paused || !v)) if (e.trapped) { const m = f.relatedTarget; !i5(m) && !v.contains(m) && setTimeout(() => { if (!i.paused && e.trapped) { const g = Tv({ focusReason: a.value }); t("focusout-prevented", g), g.defaultPrevented || Ls(o, !0); } }, 0); } else { const m = f.target; m && v.contains(m) || t("focusout", f); } }; async function p() { await Ke(); const f = y(n); if (f) { r9.push(i); const v = f.contains(document.activeElement) ? r : document.activeElement; if (r = v, !f.contains(v)) { const m = new Event(eC, JR); f.addEventListener(eC, l), f.dispatchEvent(m), m.defaultPrevented || Ke(() => { let g = e.focusStartEl; Dd(g) || (Ls(g), document.activeElement !== g && (g = "first")), g === "first" && TVe(wK(f), !0), (document.activeElement === v || g === "container") && Ls(f); }); } } } function h() { const f = y(n); if (f) { f.removeEventListener(eC, l); const v = new CustomEvent(tC, { ...JR, detail: { focusReason: a.value } }); f.addEventListener(tC, u), f.dispatchEvent(v), !v.defaultPrevented && (a.value == "keyboard" || !AVe() || f.contains(document.activeElement)) && Ls(r ?? document.body), f.removeEventListener(tC, u), r9.remove(i); } } return ut(() => { e.trapped && p(), he(() => e.trapped, (f) => { f ? p() : h(); }); }), Tt(() => { e.trapped && h(), n.value && (n.value.removeEventListener("keydown", s), n.value.removeEventListener("focusin", c), n.value.removeEventListener("focusout", d), n.value = void 0); }), { onKeydown: s }; } }); function LVe(e, t, n, r, o, a) { return ue(e.$slots, "default", { handleKeydown: e.onKeydown }); } var RVe = /* @__PURE__ */ eo(PVe, [["render", LVe], ["__file", "focus-trap.vue"]]); const NVe = ["fixed", "absolute"], MVe = fr({ boundariesPadding: { type: Number, default: 0 }, fallbackPlacements: { type: jt(Array), default: void 0 }, gpuAcceleration: { type: Boolean, default: !0 }, offset: { type: Number, default: 12 }, placement: { type: String, values: c5, default: "bottom" }, popperOptions: { type: jt(Object), default: () => ({}) }, strategy: { type: String, values: NVe, default: "absolute" } }), xK = fr({ ...MVe, id: String, style: { type: jt([String, Array, Object]) }, className: { type: jt([String, Array, Object]) }, effect: { type: jt(String), default: "dark" }, visible: Boolean, enterable: { type: Boolean, default: !0 }, pure: Boolean, focusOnShow: { type: Boolean, default: !1 }, trapping: { type: Boolean, default: !1 }, popperClass: { type: jt([String, Array, Object]) }, popperStyle: { type: jt([String, Array, Object]) }, referenceEl: { type: jt(Object) }, triggerTargetEl: { type: jt(Object) }, stopPopperMouseEvent: { type: Boolean, default: !0 }, virtualTriggering: Boolean, zIndex: Number, ...pK(["ariaLabel"]) }), DVe = { mouseenter: (e) => e instanceof MouseEvent, mouseleave: (e) => e instanceof MouseEvent, focus: () => !0, blur: () => !0, close: () => !0 }, BVe = (e, t = []) => { const { placement: n, strategy: r, popperOptions: o } = e, a = { placement: n, strategy: r, ...o, modifiers: [...jVe(e), ...t] }; return VVe(a, o == null ? void 0 : o.modifiers), a; }, zVe = (e) => { if (Do) return Wl(e); }; function jVe(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 VVe(e, t) { t && (e.modifiers = [...e.modifiers, ...t ?? []]); } const HVe = 0, UVe = (e) => { const { popperInstanceRef: t, contentRef: n, triggerRef: r, role: o } = be(w5, void 0), a = z(), i = z(), s = E(() => ({ name: "eventListeners", enabled: !!e.visible })), l = E(() => { var g; const b = y(a), x = (g = y(i)) != null ? g : HVe; return { name: "arrow", enabled: !v7e(b), options: { element: b, padding: x } }; }), u = E(() => ({ onFirstUpdate: () => { f(); }, ...BVe(e, [ y(l), y(s) ]) })), c = E(() => zVe(e.referenceEl) || y(r)), { attributes: d, state: p, styles: h, update: f, forceUpdate: v, instanceRef: m } = Vje(c, n, u); return he(m, (g) => t.value = g), ut(() => { he(() => { var g; return (g = y(c)) == null ? void 0 : g.getBoundingClientRect(); }, () => { f(); }); }), { attributes: d, arrowRef: a, contentRef: n, instanceRef: m, state: p, styles: h, role: o, forceUpdate: v, update: f }; }, qVe = (e, { attributes: t, styles: n, role: r }) => { const { nextZIndex: o } = cK(), a = xa("popper"), i = E(() => y(t).popper), s = z(Ff(e.zIndex) ? e.zIndex : o()), l = E(() => [ a.b(), a.is("pure", e.pure), a.is(e.effect), e.popperClass ]), u = E(() => [ { zIndex: y(s) }, y(n).popper, e.popperStyle || {} ]), c = E(() => r.value === "dialog" ? "false" : void 0), d = E(() => y(n).arrow || {}); return { ariaModal: c, arrowStyle: d, contentAttrs: i, contentClass: l, contentStyle: u, contentZIndex: s, updateZIndex: () => { s.value = Ff(e.zIndex) ? e.zIndex : o(); } }; }, KVe = (e, t) => { const n = z(!1), r = z(); 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"); } }; }, GVe = W({ name: "ElPopperContent" }), WVe = /* @__PURE__ */ W({ ...GVe, props: xK, emits: DVe, setup(e, { expose: t, emit: n }) { const r = e, { focusStartRef: o, trapped: a, onFocusAfterReleased: i, onFocusAfterTrapped: s, onFocusInTrap: l, onFocusoutPrevented: u, onReleaseRequested: c } = KVe(r, n), { attributes: d, arrowRef: p, contentRef: h, styles: f, instanceRef: v, role: m, update: g } = UVe(r), { ariaModal: b, arrowStyle: x, contentAttrs: w, contentClass: k, contentStyle: C, updateZIndex: _ } = qVe(r, { styles: f, attributes: d, role: m }), $ = be(m0, void 0), O = z(); nt(vK, { arrowStyle: x, arrowRef: p, arrowOffset: O }), $ && nt(m0, { ...$, addInputId: c0, removeInputId: c0 }); let F; const A = (R = !0) => { g(), R && _(); }, T = () => { A(!1), r.visible && r.focusOnShow ? a.value = !0 : r.visible === !1 && (a.value = !1); }; return ut(() => { he(() => r.triggerTargetEl, (R, M) => { F == null || F(), F = void 0; const j = y(R || h.value), P = y(M || h.value); Dp(j) && (F = he([m, () => r.ariaLabel, b, () => r.id], (V) => { ["role", "aria-label", "aria-modal", "id"].forEach((U, G) => { i5(V[G]) ? j.removeAttribute(U) : j.setAttribute(U, V[G]); }); }, { immediate: !0 })), P !== j && Dp(P) && ["role", "aria-label", "aria-modal", "id"].forEach((V) => { P.removeAttribute(V); }); }, { immediate: !0 }), he(() => r.visible, T, { immediate: !0 }); }), Tt(() => { F == null || F(), F = void 0; }), t({ popperContentRef: h, popperInstanceRef: v, updatePopper: A, contentStyle: C }), (R, M) => (S(), L("div", Et({ ref_key: "contentRef", ref: h }, y(w), { style: y(C), class: y(k), tabindex: "-1", onMouseenter: (j) => R.$emit("mouseenter", j), onMouseleave: (j) => R.$emit("mouseleave", j) }), [ q(y(RVe), { trapped: y(a), "trap-on-focus-in": !0, "focus-trap-el": y(h), "focus-start-el": y(o), onFocusAfterTrapped: y(s), onFocusAfterReleased: y(i), onFocusin: y(l), onFocusoutPrevented: y(u), onReleaseRequested: y(c) }, { default: N(() => [ ue(R.$slots, "default") ]), _: 3 }, 8, ["trapped", "focus-trap-el", "focus-start-el", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusin", "onFocusoutPrevented", "onReleaseRequested"]) ], 16, ["onMouseenter", "onMouseleave"])); } }); var YVe = /* @__PURE__ */ eo(WVe, [["__file", "content.vue"]]); const XVe = Xu(vVe), C5 = Symbol("elTooltip"), Wo = fr({ ...Yje, ...xK, appendTo: { type: jt([String, Object]) }, content: { type: String, default: "" }, rawContent: Boolean, persistent: Boolean, visible: { type: jt(Boolean), default: null }, transition: String, teleported: { type: Boolean, default: !0 }, disabled: Boolean, ...pK(["ariaLabel"]) }), If = fr({ ...bK, disabled: Boolean, trigger: { type: jt([String, Array]), default: "hover" }, triggerKeys: { type: jt(Array), default: () => [h0.enter, h0.space] } }), { useModelToggleProps: ZVe, useModelToggleEmits: JVe, useModelToggle: QVe } = B7e("visible"), eHe = fr({ ...gK, ...ZVe, ...Wo, ...If, ...mK, showArrow: { type: Boolean, default: !0 } }), tHe = [ ...JVe, "before-show", "before-hide", "show", "hide", "open", "close" ], nHe = (e, t) => xBe(e) ? e.includes(t) : e === t, pc = (e, t, n) => (r) => { nHe(y(e), t) && n(r); }, rHe = W({ name: "ElTooltipTrigger" }), oHe = /* @__PURE__ */ W({ ...rHe, props: If, setup(e, { expose: t }) { const n = e, r = xa("tooltip"), { controlled: o, id: a, open: i, onOpen: s, onClose: l, onToggle: u } = be(C5, void 0), c = z(null), d = () => { if (y(o) || n.disabled) return !0; }, p = St(n, "trigger"), h = zi(d, pc(p, "hover", s)), f = zi(d, pc(p, "hover", l)), v = zi(d, pc(p, "click", (w) => { w.button === 0 && u(w); })), m = zi(d, pc(p, "focus", s)), g = zi(d, pc(p, "focus", l)), b = zi(d, pc(p, "contextmenu", (w) => { w.preventDefault(), u(w); })), x = zi(d, (w) => { const { code: k } = w; n.triggerKeys.includes(k) && (w.preventDefault(), u(w)); }); return t({ triggerRef: c }), (w, k) => (S(), re(y(kVe), { id: y(a), "virtual-ref": w.virtualRef, open: y(i), "virtual-triggering": w.virtualTriggering, class: H(y(r).e("trigger")), onBlur: y(g), onClick: y(v), onContextmenu: y(b), onFocus: y(m), onMouseenter: y(h), onMouseleave: y(f), onKeydown: y(x) }, { default: N(() => [ ue(w.$slots, "default") ]), _: 3 }, 8, ["id", "virtual-ref", "open", "virtual-triggering", "class", "onBlur", "onClick", "onContextmenu", "onFocus", "onMouseenter", "onMouseleave", "onKeydown"])); } }); var aHe = /* @__PURE__ */ eo(oHe, [["__file", "trigger.vue"]]); const iHe = fr({ to: { type: jt([String, Object]), required: !0 }, disabled: Boolean }), sHe = /* @__PURE__ */ W({ __name: "teleport", props: iHe, setup(e) { return (t, n) => t.disabled ? ue(t.$slots, "default", { key: 0 }) : (S(), re($0, { key: 1, to: t.to }, [ ue(t.$slots, "default") ], 8, ["to"])); } }); var lHe = /* @__PURE__ */ eo(sHe, [["__file", "teleport.vue"]]); const uHe = Xu(lHe), cHe = W({ name: "ElTooltipContent", inheritAttrs: !1 }), dHe = /* @__PURE__ */ W({ ...cHe, props: Wo, setup(e, { expose: t }) { const n = e, { selector: r } = iK(), o = xa("tooltip"), a = z(null); let i; const { controlled: s, id: l, open: u, trigger: c, onClose: d, onOpen: p, onShow: h, onHide: f, onBeforeShow: v, onBeforeHide: m } = be(C5, void 0), g = E(() => n.transition || `${o.namespace.value}-fade-in-linear`), b = E(() => process.env.NODE_ENV === "test" ? !0 : n.persistent); Tt(() => { i == null || i(); }); const x = E(() => y(b) ? !0 : y(u)), w = E(() => n.disabled ? !1 : y(u)), k = E(() => n.appendTo || r.value), C = E(() => { var P; return (P = n.style) != null ? P : {}; }), _ = z(!0), $ = () => { f(), _.value = !0; }, O = () => { if (y(s)) return !0; }, F = zi(O, () => { n.enterable && y(c) === "hover" && p(); }), A = zi(O, () => { y(c) === "hover" && d(); }), T = () => { var P, V; (V = (P = a.value) == null ? void 0 : P.updatePopper) == null || V.call(P), v == null || v(); }, R = () => { m == null || m(); }, M = () => { h(), i = hBe(E(() => { var P; return (P = a.value) == null ? void 0 : P.popperContentRef; }), () => { y(s) || y(c) !== "hover" && d(); }); }, j = () => { n.virtualTriggering || d(); }; return he(() => y(u), (P) => { P ? _.value = !1 : i == null || i(); }, { flush: "post" }), he(() => n.content, () => { var P, V; (V = (P = a.value) == null ? void 0 : P.updatePopper) == null || V.call(P); }), t({ contentRef: a }), (P, V) => (S(), re(y(uHe), { disabled: !P.teleported, to: y(k) }, { default: N(() => [ q(nr, { name: y(g), onAfterLeave: $, onBeforeEnter: T, onAfterEnter: M, onBeforeLeave: R }, { default: N(() => [ y(x) ? Be((S(), re(y(YVe), Et({ key: 0, id: y(l), ref_key: "contentRef", ref: a }, P.$attrs, { "aria-label": P.ariaLabel, "aria-hidden": _.value, "boundaries-padding": P.boundariesPadding, "fallback-placements": P.fallbackPlacements, "gpu-acceleration": P.gpuAcceleration, offset: P.offset, placement: P.placement, "popper-options": P.popperOptions, strategy: P.strategy, effect: P.effect, enterable: P.enterable, pure: P.pure, "popper-class": P.popperClass, "popper-style": [P.popperStyle, y(C)], "reference-el": P.referenceEl, "trigger-target-el": P.triggerTargetEl, visible: y(w), "z-index": P.zIndex, onMouseenter: y(F), onMouseleave: y(A), onBlur: j, onClose: y(d) }), { default: N(() => [ ue(P.$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, y(w)] ]) : J("v-if", !0) ]), _: 3 }, 8, ["name"]) ]), _: 3 }, 8, ["disabled", "to"])); } }); var pHe = /* @__PURE__ */ eo(dHe, [["__file", "content.vue"]]); const fHe = W({ name: "ElTooltip" }), hHe = /* @__PURE__ */ W({ ...fHe, props: eHe, emits: tHe, setup(e, { expose: t, emit: n }) { const r = e; Wje(); const o = qje(), a = z(), i = z(), s = () => { var g; const b = y(a); b && ((g = b.popperInstanceRef) == null || g.update()); }, l = z(!1), u = z(), { show: c, hide: d, hasUpdateHandler: p } = QVe({ indicator: l, toggleReason: u }), { onOpen: h, onClose: f } = Xje({ showAfter: St(r, "showAfter"), hideAfter: St(r, "hideAfter"), autoClose: St(r, "autoClose"), open: c, close: d }), v = E(() => s5(r.visible) && !p.value); nt(C5, { controlled: v, id: o, open: $u(l), trigger: St(r, "trigger"), onOpen: (g) => { h(g); }, onClose: (g) => { f(g); }, onToggle: (g) => { y(l) ? f(g) : h(g); }, onShow: () => { n("show", u.value); }, onHide: () => { n("hide", u.value); }, onBeforeShow: () => { n("before-show", u.value); }, onBeforeHide: () => { n("before-hide", u.value); }, updatePopper: s }), he(() => r.disabled, (g) => { g && l.value && (l.value = !1); }); const m = (g) => { var b, x; const w = (x = (b = i.value) == null ? void 0 : b.contentRef) == null ? void 0 : x.popperContentRef, k = (g == null ? void 0 : g.relatedTarget) || document.activeElement; return w && w.contains(k); }; return E0(() => l.value && d()), t({ popperRef: a, contentRef: i, isFocusInsideContent: m, updatePopper: s, onOpen: h, onClose: f, hide: d }), (g, b) => (S(), re(y(XVe), { ref_key: "popperRef", ref: a, role: g.role }, { default: N(() => [ q(aHe, { disabled: g.disabled, trigger: g.trigger, "trigger-keys": g.triggerKeys, "virtual-ref": g.virtualRef, "virtual-triggering": g.virtualTriggering }, { default: N(() => [ g.$slots.default ? ue(g.$slots, "default", { key: 0 }) : J("v-if", !0) ]), _: 3 }, 8, ["disabled", "trigger", "trigger-keys", "virtual-ref", "virtual-triggering"]), q(pHe, { ref_key: "contentRef", ref: i, "aria-label": g.ariaLabel, "boundaries-padding": g.boundariesPadding, content: g.content, disabled: g.disabled, effect: g.effect, enterable: g.enterable, "fallback-placements": g.fallbackPlacements, "hide-after": g.hideAfter, "gpu-acceleration": g.gpuAcceleration, offset: g.offset, persistent: g.persistent, "popper-class": g.popperClass, "popper-style": g.popperStyle, placement: g.placement, "popper-options": g.popperOptions, pure: g.pure, "raw-content": g.rawContent, "reference-el": g.referenceEl, "trigger-target-el": g.triggerTargetEl, "show-after": g.showAfter, strategy: g.strategy, teleported: g.teleported, transition: g.transition, "virtual-triggering": g.virtualTriggering, "z-index": g.zIndex, "append-to": g.appendTo }, { default: N(() => [ ue(g.$slots, "content", {}, () => [ g.rawContent ? (S(), L("span", { key: 0, innerHTML: g.content }, null, 8, ["innerHTML"])) : (S(), L("span", { key: 1 }, ge(g.content), 1)) ]), g.showArrow ? (S(), re(y(yVe), { key: 0, "arrow-offset": g.arrowOffset }, null, 8, ["arrow-offset"])) : J("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 vHe = /* @__PURE__ */ eo(hHe, [["__file", "tooltip.vue"]]); const gHe = Xu(vHe), kK = Symbol("buttonGroupContextKey"), mHe = (e, t) => { T7e({ from: "type.text", replacement: "link", version: "3.0.0", scope: "props", ref: "https://element-plus.org/en-US/component/button.html#button-attributes" }, E(() => e.type === "text")); const n = be(kK, void 0), r = y5("button"), { form: o } = dVe(), a = cVe(E(() => n == null ? void 0 : n.size)), i = hK(), s = z(), l = Dr(), u = E(() => e.type || (n == null ? void 0 : n.type) || ""), c = E(() => { var h, f, v; return (v = (f = e.autoInsertSpace) != null ? f : (h = r.value) == null ? void 0 : h.autoInsertSpace) != null ? v : !1; }), d = E(() => e.tag === "button" ? { ariaDisabled: i.value || e.loading, disabled: i.value || e.loading, autofocus: e.autofocus, type: e.nativeType } : {}), p = E(() => { var h; const f = (h = l.default) == null ? void 0 : h.call(l); if (c.value && (f == null ? void 0 : f.length) === 1) { const v = f[0]; if ((v == null ? void 0 : v.type) === hl) { const m = v.children; return new RegExp("^\\p{Unified_Ideograph}{2}$", "u").test(m.trim()); } } return !1; }); return { _disabled: i, _size: a, _type: u, _ref: s, _props: d, shouldAddSpace: p, handleClick: (h) => { if (i.value || e.loading) { h.stopPropagation(); return; } e.nativeType === "reset" && (o == null || o.resetFields()), t("click", h); } }; }, yHe = [ "default", "primary", "success", "warning", "info", "danger", "text", "" ], bHe = ["button", "submit", "reset"], R_ = fr({ size: Qje, disabled: Boolean, type: { type: String, values: yHe, default: "" }, icon: { type: I_ }, nativeType: { type: String, values: bHe, default: "button" }, loading: Boolean, loadingIcon: { type: I_, default: () => S7e }, 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: jt([String, Object]), default: "button" } }), wHe = { click: (e) => e instanceof MouseEvent }; function Mr(e, t) { xHe(e) && (e = "100%"); var n = kHe(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 Av(e) { return Math.min(1, Math.max(0, e)); } function xHe(e) { return typeof e == "string" && e.indexOf(".") !== -1 && parseFloat(e) === 1; } function kHe(e) { return typeof e == "string" && e.indexOf("%") !== -1; } function CK(e) { return e = parseFloat(e), (isNaN(e) || e < 0 || e > 1) && (e = 1), e; } function Iv(e) { return e <= 1 ? "".concat(Number(e) * 100, "%") : e; } function Yl(e) { return e.length === 1 ? "0" + e : String(e); } function CHe(e, t, n) { return { r: Mr(e, 255) * 255, g: Mr(t, 255) * 255, b: Mr(n, 255) * 255 }; } function a9(e, t, n) { e = Mr(e, 255), t = Mr(t, 255), n = Mr(n, 255); var r = Math.max(e, t, n), o = Math.min(e, t, n), a = 0, i = 0, s = (r + o) / 2; if (r === o) i = 0, a = 0; else { var l = r - o; switch (i = s > 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: i, l: s }; } function nC(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 _He(e, t, n) { var r, o, a; if (e = Mr(e, 360), t = Mr(t, 100), n = Mr(n, 100), t === 0) o = n, a = n, r = n; else { var i = n < 0.5 ? n * (1 + t) : n + t - n * t, s = 2 * n - i; r = nC(s, i, e + 1 / 3), o = nC(s, i, e), a = nC(s, i, e - 1 / 3); } return { r: r * 255, g: o * 255, b: a * 255 }; } function i9(e, t, n) { e = Mr(e, 255), t = Mr(t, 255), n = Mr(n, 255); var r = Math.max(e, t, n), o = Math.min(e, t, n), a = 0, i = r, s = r - o, l = r === 0 ? 0 : s / r; if (r === o) a = 0; else { switch (r) { case e: a = (t - n) / s + (t < n ? 6 : 0); break; case t: a = (n - e) / s + 2; break; case n: a = (e - t) / s + 4; break; } a /= 6; } return { h: a, s: l, v: i }; } function SHe(e, t, n) { e = Mr(e, 360) * 6, t = Mr(t, 100), n = Mr(n, 100); var r = Math.floor(e), o = e - r, a = n * (1 - t), i = n * (1 - o * t), s = n * (1 - (1 - o) * t), l = r % 6, u = [n, i, a, a, s, n][l], c = [s, n, n, i, a, a][l], d = [a, a, s, n, n, i][l]; return { r: u * 255, g: c * 255, b: d * 255 }; } function s9(e, t, n, r) { var o = [ Yl(Math.round(e).toString(16)), Yl(Math.round(t).toString(16)), Yl(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 $He(e, t, n, r, o) { var a = [ Yl(Math.round(e).toString(16)), Yl(Math.round(t).toString(16)), Yl(Math.round(n).toString(16)), Yl(EHe(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 EHe(e) { return Math.round(parseFloat(e) * 255).toString(16); } function l9(e) { return Ro(e) / 255; } function Ro(e) { return parseInt(e, 16); } function OHe(e) { return { r: e >> 16, g: (e & 65280) >> 8, b: e & 255 }; } var N_ = { 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 FHe(e) { var t = { r: 0, g: 0, b: 0 }, n = 1, r = null, o = null, a = null, i = !1, s = !1; return typeof e == "string" && (e = IHe(e)), typeof e == "object" && (Mi(e.r) && Mi(e.g) && Mi(e.b) ? (t = CHe(e.r, e.g, e.b), i = !0, s = String(e.r).substr(-1) === "%" ? "prgb" : "rgb") : Mi(e.h) && Mi(e.s) && Mi(e.v) ? (r = Iv(e.s), o = Iv(e.v), t = SHe(e.h, r, o), i = !0, s = "hsv") : Mi(e.h) && Mi(e.s) && Mi(e.l) && (r = Iv(e.s), a = Iv(e.l), t = _He(e.h, r, a), i = !0, s = "hsl"), Object.prototype.hasOwnProperty.call(e, "a") && (n = e.a)), n = CK(n), { ok: i, format: e.format || s, 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 THe = "[-\\+]?\\d+%?", AHe = "[-\\+]?\\d*\\.\\d+%?", Gs = "(?:".concat(AHe, ")|(?:").concat(THe, ")"), rC = "[\\s|\\(]+(".concat(Gs, ")[,|\\s]+(").concat(Gs, ")[,|\\s]+(").concat(Gs, ")\\s*\\)?"), oC = "[\\s|\\(]+(".concat(Gs, ")[,|\\s]+(").concat(Gs, ")[,|\\s]+(").concat(Gs, ")[,|\\s]+(").concat(Gs, ")\\s*\\)?"), Oa = { CSS_UNIT: new RegExp(Gs), rgb: new RegExp("rgb" + rC), rgba: new RegExp("rgba" + oC), hsl: new RegExp("hsl" + rC), hsla: new RegExp("hsla" + oC), hsv: new RegExp("hsv" + rC), hsva: new RegExp("hsva" + oC), 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 IHe(e) { if (e = e.trim().toLowerCase(), e.length === 0) return !1; var t = !1; if (N_[e]) e = N_[e], t = !0; else if (e === "transparent") return { r: 0, g: 0, b: 0, a: 0, format: "name" }; var n = Oa.rgb.exec(e); return n ? { r: n[1], g: n[2], b: n[3] } : (n = Oa.rgba.exec(e), n ? { r: n[1], g: n[2], b: n[3], a: n[4] } : (n = Oa.hsl.exec(e), n ? { h: n[1], s: n[2], l: n[3] } : (n = Oa.hsla.exec(e), n ? { h: n[1], s: n[2], l: n[3], a: n[4] } : (n = Oa.hsv.exec(e), n ? { h: n[1], s: n[2], v: n[3] } : (n = Oa.hsva.exec(e), n ? { h: n[1], s: n[2], v: n[3], a: n[4] } : (n = Oa.hex8.exec(e), n ? { r: Ro(n[1]), g: Ro(n[2]), b: Ro(n[3]), a: l9(n[4]), format: t ? "name" : "hex8" } : (n = Oa.hex6.exec(e), n ? { r: Ro(n[1]), g: Ro(n[2]), b: Ro(n[3]), format: t ? "name" : "hex" } : (n = Oa.hex4.exec(e), n ? { r: Ro(n[1] + n[1]), g: Ro(n[2] + n[2]), b: Ro(n[3] + n[3]), a: l9(n[4] + n[4]), format: t ? "name" : "hex8" } : (n = Oa.hex3.exec(e), n ? { r: Ro(n[1] + n[1]), g: Ro(n[2] + n[2]), b: Ro(n[3] + n[3]), format: t ? "name" : "hex" } : !1))))))))); } function Mi(e) { return !!Oa.CSS_UNIT.exec(String(e)); } var PHe = ( /** @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 = OHe(t)), this.originalInput = t; var o = FHe(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, i = t.g / 255, s = t.b / 255; return a <= 0.03928 ? n = a / 12.92 : n = Math.pow((a + 0.055) / 1.055, 2.4), i <= 0.03928 ? r = i / 12.92 : r = Math.pow((i + 0.055) / 1.055, 2.4), s <= 0.03928 ? o = s / 12.92 : o = Math.pow((s + 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 = CK(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 = i9(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 = i9(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 = a9(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 = a9(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), s9(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), $He(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(Mr(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(Mr(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 = "#" + s9(this.r, this.g, this.b, !1), n = 0, r = Object.entries(N_); n < r.length; n++) { var o = r[n], a = o[0], i = o[1]; if (t === i) 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 = Av(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 = Av(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 = Av(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 = Av(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, i = { 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(i); }, 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, i = [], s = 1 / t; t--; ) i.push(new e({ h: r, s: o, v: a })), a = (a + s) % 1; return i; }, 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, i = 1; i < t; i++) o.push(new e({ h: (r + i * a) % 360, s: n.s, l: n.l })); return o; }, e.prototype.equals = function(t) { return this.toRgbString() === new e(t).toRgbString(); }, e; }() ); function Es(e, t = 20) { return e.mix("#141414", t).toString(); } function LHe(e) { const t = hK(), n = xa("button"); return E(() => { let r = {}, o = e.color; if (o) { const a = o.match(/var\((.*?)\)/); a && (o = window.getComputedStyle(window.document.documentElement).getPropertyValue(a[1])); const i = new PHe(o), s = e.dark ? i.tint(20).toString() : Es(i, 20); if (e.plain) r = n.cssVarBlock({ "bg-color": e.dark ? Es(i, 90) : i.tint(90).toString(), "text-color": o, "border-color": e.dark ? Es(i, 50) : i.tint(50).toString(), "hover-text-color": `var(${n.cssVarName("color-white")})`, "hover-bg-color": o, "hover-border-color": o, "active-bg-color": s, "active-text-color": `var(${n.cssVarName("color-white")})`, "active-border-color": s }), t.value && (r[n.cssVarBlockName("disabled-bg-color")] = e.dark ? Es(i, 90) : i.tint(90).toString(), r[n.cssVarBlockName("disabled-text-color")] = e.dark ? Es(i, 50) : i.tint(50).toString(), r[n.cssVarBlockName("disabled-border-color")] = e.dark ? Es(i, 80) : i.tint(80).toString()); else { const l = e.dark ? Es(i, 30) : i.tint(30).toString(), u = i.isDark() ? `var(${n.cssVarName("color-white")})` : `var(${n.cssVarName("color-black")})`; if (r = n.cssVarBlock({ "bg-color": o, "text-color": u, "border-color": o, "hover-bg-color": l, "hover-text-color": u, "hover-border-color": l, "active-bg-color": s, "active-border-color": s }), t.value) { const c = e.dark ? Es(i, 50) : i.tint(50).toString(); r[n.cssVarBlockName("disabled-bg-color")] = c, 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")] = c; } } } return r; }); } const RHe = W({ name: "ElButton" }), NHe = /* @__PURE__ */ W({ ...RHe, props: R_, emits: wHe, setup(e, { expose: t, emit: n }) { const r = e, o = LHe(r), a = xa("button"), { _ref: i, _size: s, _type: l, _disabled: u, _props: c, shouldAddSpace: d, handleClick: p } = mHe(r, n), h = E(() => [ a.b(), a.m(l.value), a.m(s.value), a.is("disabled", u.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: i, size: s, type: l, disabled: u, shouldAddSpace: d }), (f, v) => (S(), re(yt(f.tag), Et({ ref_key: "_ref", ref: i }, y(c), { class: y(h), style: y(o), onClick: y(p) }), { default: N(() => [ f.loading ? (S(), L(Re, { key: 0 }, [ f.$slots.loading ? ue(f.$slots, "loading", { key: 0 }) : (S(), re(y(XR), { key: 1, class: H(y(a).is("loading")) }, { default: N(() => [ (S(), re(yt(f.loadingIcon))) ]), _: 1 }, 8, ["class"])) ], 64)) : f.icon || f.$slots.icon ? (S(), re(y(XR), { key: 1 }, { default: N(() => [ f.icon ? (S(), re(yt(f.icon), { key: 0 })) : ue(f.$slots, "icon", { key: 1 }) ]), _: 3 })) : J("v-if", !0), f.$slots.default ? (S(), L("span", { key: 2, class: H({ [y(a).em("text", "expand")]: y(d) }) }, [ ue(f.$slots, "default") ], 2)) : J("v-if", !0) ]), _: 3 }, 16, ["class", "style", "onClick"])); } }); var MHe = /* @__PURE__ */ eo(NHe, [["__file", "button.vue"]]); const DHe = { size: R_.size, type: R_.type }, BHe = W({ name: "ElButtonGroup" }), zHe = /* @__PURE__ */ W({ ...BHe, props: DHe, setup(e) { const t = e; nt(kK, en({ size: St(t, "size"), type: St(t, "type") })); const n = xa("button"); return (r, o) => (S(), L("div", { class: H(y(n).b("group")) }, [ ue(r.$slots, "default") ], 2)); } }); var _K = /* @__PURE__ */ eo(zHe, [["__file", "button-group.vue"]]); const jHe = Xu(MHe, { ButtonGroup: _K }); O7e(_K); const VHe = fr({ header: { type: String, default: "" }, footer: { type: String, default: "" }, bodyStyle: { type: jt([String, Object, Array]), default: "" }, bodyClass: String, shadow: { type: String, values: ["always", "hover", "never"], default: "always" } }), HHe = W({ name: "ElCard" }), UHe = /* @__PURE__ */ W({ ...HHe, props: VHe, setup(e) { const t = xa("card"); return (n, r) => (S(), L("div", { class: H([y(t).b(), y(t).is(`${n.shadow}-shadow`)]) }, [ n.$slots.header || n.header ? (S(), L("div", { key: 0, class: H(y(t).e("header")) }, [ ue(n.$slots, "header", {}, () => [ Oe(ge(n.header), 1) ]) ], 2)) : J("v-if", !0), D("div", { class: H([y(t).e("body"), n.bodyClass]), style: Ye(n.bodyStyle) }, [ ue(n.$slots, "default") ], 6), n.$slots.footer || n.footer ? (S(), L("div", { key: 1, class: H(y(t).e("footer")) }, [ ue(n.$slots, "footer", {}, () => [ Oe(ge(n.footer), 1) ]) ], 2)) : J("v-if", !0) ], 2)); } }); var qHe = /* @__PURE__ */ eo(UHe, [["__file", "card.vue"]]); const KHe = Xu(qHe), GHe = /* @__PURE__ */ W({ inheritAttrs: !1 }); function WHe(e, t, n, r, o, a) { return ue(e.$slots, "default"); } var YHe = /* @__PURE__ */ eo(GHe, [["render", WHe], ["__file", "collection.vue"]]); const XHe = /* @__PURE__ */ W({ name: "ElCollectionItem", inheritAttrs: !1 }); function ZHe(e, t, n, r, o, a) { return ue(e.$slots, "default"); } var JHe = /* @__PURE__ */ eo(XHe, [["render", ZHe], ["__file", "collection-item.vue"]]); const QHe = "data-el-collection-item", eUe = (e) => { const t = `El${e}Collection`, n = `${t}Item`, r = Symbol(t), o = Symbol(n), a = { ...YHe, name: t, setup() { const s = z(null), l = /* @__PURE__ */ new Map(); nt(r, { itemMap: l, getItems: () => { const u = y(s); if (!u) return []; const c = Array.from(u.querySelectorAll(`[${QHe}]`)); return [...l.values()].sort((d, p) => c.indexOf(d.ref) - c.indexOf(p.ref)); }, collectionRef: s }); } }, i = { ...JHe, name: n, setup(s, { attrs: l }) { const u = z(null), c = be(r, void 0); nt(o, { collectionItemRef: u }), ut(() => { const d = y(u); d && c.itemMap.set(d, { ref: d, ...l }); }), Tt(() => { const d = y(u); c.itemMap.delete(d); }); } }; return { COLLECTION_INJECTION_KEY: r, COLLECTION_ITEM_INJECTION_KEY: o, ElCollection: a, ElCollectionItem: i }; }, aC = fr({ trigger: If.trigger, effect: { ...Wo.effect, default: "light" }, type: { type: jt(String) }, placement: { type: jt(String), default: "bottom" }, popperOptions: { type: jt(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: jt([Number, String]), default: 0 }, maxHeight: { type: jt([Number, String]), default: "" }, popperClass: { type: String, default: "" }, disabled: Boolean, role: { type: String, default: "menu" }, buttonProps: { type: jt(Object) }, teleported: Wo.teleported }); fr({ command: { type: [Object, String, Number], default: () => ({}) }, disabled: Boolean, divided: Boolean, textValue: String, icon: { type: I_ } }); fr({ onKeydown: { type: jt(Function) } }); eUe("Dropdown"); const tUe = fr({ trigger: If.trigger, placement: aC.placement, disabled: If.disabled, visible: Wo.visible, transition: Wo.transition, popperOptions: aC.popperOptions, tabindex: aC.tabindex, content: Wo.content, popperStyle: Wo.popperStyle, popperClass: Wo.popperClass, enterable: { ...Wo.enterable, default: !0 }, effect: { ...Wo.effect, default: "light" }, teleported: Wo.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 } }), nUe = { "update:visible": (e) => s5(e), "before-enter": () => !0, "before-leave": () => !0, "after-enter": () => !0, "after-leave": () => !0 }, rUe = "onUpdate:visible", oUe = W({ name: "ElPopover" }), aUe = /* @__PURE__ */ W({ ...oUe, props: tUe, emits: nUe, setup(e, { expose: t, emit: n }) { const r = e, o = E(() => r[rUe]), a = xa("popover"), i = z(), s = E(() => { var m; return (m = y(i)) == null ? void 0 : m.popperRef; }), l = E(() => [ { width: Hq(r.width) }, r.popperStyle ]), u = E(() => [a.b(), r.popperClass, { [a.m("plain")]: !!r.content }]), c = E(() => r.transition === `${a.namespace.value}-fade-in-linear`), d = () => { var m; (m = i.value) == null || m.hide(); }, p = () => { n("before-enter"); }, h = () => { n("before-leave"); }, f = () => { n("after-enter"); }, v = () => { n("update:visible", !1), n("after-leave"); }; return t({ popperRef: s, hide: d }), (m, g) => (S(), re(y(gHe), Et({ ref_key: "tooltipRef", ref: i }, 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": y(u), "popper-style": y(l), teleported: m.teleported, persistent: m.persistent, "gpu-acceleration": y(c), "onUpdate:visible": y(o), onBeforeShow: p, onBeforeHide: h, onShow: f, onHide: v }), { content: N(() => [ m.title ? (S(), L("div", { key: 0, class: H(y(a).e("title")), role: "title" }, ge(m.title), 3)) : J("v-if", !0), ue(m.$slots, "default", {}, () => [ Oe(ge(m.content), 1) ]) ]), default: N(() => [ m.$slots.reference ? ue(m.$slots, "reference", { key: 0 }) : J("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 iUe = /* @__PURE__ */ eo(aUe, [["__file", "popover.vue"]]); const u9 = (e, t) => { const n = t.arg || t.value, r = n == null ? void 0 : n.popperRef; r && (r.triggerRef = e); }; var sUe = { mounted(e, t) { u9(e, t); }, updated(e, t) { u9(e, t); } }; const lUe = "popover", uUe = E7e(sUe, lUe), cUe = Xu(iUe, { directive: uUe }); function dUe(e) { let t; const n = z(!1), r = en({ ...e, originalPosition: "", originalOverflow: "", visible: !1 }); function o(p) { r.text = p; } function a() { const p = r.parent, h = d.ns; if (!p.vLoadingAddClassList) { let f = p.getAttribute("loading-number"); f = Number.parseInt(f) - 1, f ? p.setAttribute("loading-number", f.toString()) : (f0(p, h.bm("parent", "relative")), p.removeAttribute("loading-number")), f0(p, h.bm("parent", "hidden")); } i(), c.unmount(); } function i() { var p, h; (h = (p = d.$el) == null ? void 0 : p.parentNode) == null || h.removeChild(d.$el); } function s() { var p; e.beforeClose && !e.beforeClose() || (n.value = !0, clearTimeout(t), t = setTimeout(l, 400), r.visible = !1, (p = e.closed) == null || p.call(e)); } function l() { if (!n.value) return; const p = r.parent; n.value = !1, p.vLoadingAddClassList = void 0, a(); } const u = W({ name: "ElLoading", setup(p, { expose: h }) { const { ns: f, zIndex: v } = rVe("loading"); return h({ ns: f, zIndex: v }), () => { const m = r.spinner || r.svg, g = Gt("svg", { class: "circular", viewBox: r.svgViewBox ? r.svgViewBox : "0 0 50 50", ...m ? { innerHTML: m } : {} }, [ Gt("circle", { class: "path", cx: "25", cy: "25", r: "20", fill: "none" }) ]), b = r.text ? Gt("p", { class: f.b("text") }, [r.text]) : void 0; return Gt(nr, { name: f.b("fade"), onAfterLeave: l }, { default: N(() => [ Be(q("div", { style: { backgroundColor: r.background || "" }, class: [ f.b("mask"), r.customClass, r.fullscreen ? "is-fullscreen" : "" ] }, [ Gt("div", { class: f.b("spinner") }, [g, b]) ]), [[ht, r.visible]]) ]) }); }; } }), c = A0(u), d = c.mount(document.createElement("div")); return { ...Cr(r), setText: o, removeElLoadingChild: i, close: s, handleAfterLeave: l, vm: d, get $el() { return d.$el; } }; } let Pv; const pUe = function(e = {}) { if (!Do) return; const t = fUe(e); if (t.fullscreen && Pv) return Pv; const n = dUe({ ...t, closed: () => { var o; (o = t.closed) == null || o.call(t), t.fullscreen && (Pv = void 0); } }); hUe(t, t.parent, n), c9(t, t.parent, n), t.parent.vLoadingAddClassList = () => c9(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), Ke(() => n.visible.value = t.visible), t.fullscreen && (Pv = n), n; }, fUe = (e) => { var t, n, r, o; let a; return Dd(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 }; }, hUe = async (e, t, n) => { const { nextZIndex: r } = n.vm.zIndex || n.vm._.exposed.zIndex, o = {}; if (e.fullscreen) n.originalPosition.value = cp(document.body, "position"), n.originalOverflow.value = cp(document.body, "overflow"), o.zIndex = r(); else if (e.parent === document.body) { n.originalPosition.value = cp(document.body, "position"), await Ke(); for (const a of ["top", "left"]) { const i = a === "top" ? "scrollTop" : "scrollLeft"; o[a] = `${e.target.getBoundingClientRect()[a] + document.body[i] + document.documentElement[i] - Number.parseInt(cp(document.body, `margin-${a}`), 10)}px`; } for (const a of ["height", "width"]) o[a] = `${e.target.getBoundingClientRect()[a]}px`; } else n.originalPosition.value = cp(t, "position"); for (const [a, i] of Object.entries(o)) n.$el.style[a] = i; }, c9 = (e, t, n) => { const r = n.vm.ns || n.vm._.exposed.ns; ["absolute", "fixed", "sticky"].includes(n.originalPosition.value) ? f0(t, r.bm("parent", "relative")) : LR(t, r.bm("parent", "relative")), e.fullscreen && e.lock ? LR(t, r.bm("parent", "hidden")) : f0(t, r.bm("parent", "hidden")); }, mg = Symbol("ElLoading"), d9 = (e, t) => { var n, r, o, a; const i = t.instance, s = (p) => $h(t.value) ? t.value[p] : void 0, l = (p) => { const h = Dd(p) && (i == null ? void 0 : i[p]) || p; return h && z(h); }, u = (p) => l(s(p) || e.getAttribute(`element-loading-${SBe(p)}`)), c = (n = s("fullscreen")) != null ? n : t.modifiers.fullscreen, d = { text: u("text"), svg: u("svg"), svgViewBox: u("svgViewBox"), spinner: u("spinner"), background: u("background"), customClass: u("customClass"), fullscreen: c, target: (r = s("target")) != null ? r : c ? void 0 : e, body: (o = s("body")) != null ? o : t.modifiers.body, lock: (a = s("lock")) != null ? a : t.modifiers.lock }; e[mg] = { options: d, instance: pUe(d) }; }, vUe = (e, t) => { for (const n of Object.keys(t)) xn(t[n]) && (t[n].value = e[n]); }, gUe = { mounted(e, t) { t.value && d9(e, t); }, updated(e, t) { const n = e[mg]; t.oldValue !== t.value && (t.value && !t.oldValue ? d9(e, t) : t.value && t.oldValue ? $h(t.value) && vUe(t.value, n.options) : n == null || n.instance.close()); }, unmounted(e) { var t; (t = e[mg]) == null || t.instance.close(), e[mg] = null; } }; function SK(e, t) { return function() { return e.apply(t, arguments); }; } const { toString: mUe } = Object.prototype, { getPrototypeOf: _5 } = Object, { iterator: _1, toStringTag: $K } = Symbol, S1 = /* @__PURE__ */ ((e) => (t) => { const n = mUe.call(t); return e[n] || (e[n] = n.slice(8, -1).toLowerCase()); })(/* @__PURE__ */ Object.create(null)), Ja = (e) => (e = e.toLowerCase(), (t) => S1(t) === e), $1 = (e) => (t) => typeof t === e, { isArray: zd } = Array, Pf = $1("undefined"); function Th(e) { return e !== null && !Pf(e) && e.constructor !== null && !Pf(e.constructor) && Eo(e.constructor.isBuffer) && e.constructor.isBuffer(e); } const EK = Ja("ArrayBuffer"); function yUe(e) { let t; return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && EK(e.buffer), t; } const bUe = $1("string"), Eo = $1("function"), OK = $1("number"), Ah = (e) => e !== null && typeof e == "object", wUe = (e) => e === !0 || e === !1, yg = (e) => { if (S1(e) !== "object") return !1; const t = _5(e); return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !($K in e) && !(_1 in e); }, xUe = (e) => { if (!Ah(e) || Th(e)) return !1; try { return Object.keys(e).length === 0 && Object.getPrototypeOf(e) === Object.prototype; } catch { return !1; } }, kUe = Ja("Date"), CUe = Ja("File"), _Ue = Ja("Blob"), SUe = Ja("FileList"), $Ue = (e) => Ah(e) && Eo(e.pipe), EUe = (e) => { let t; return e && (typeof FormData == "function" && e instanceof FormData || Eo(e.append) && ((t = S1(e)) === "formdata" || // detect form-data instance t === "object" && Eo(e.toString) && e.toString() === "[object FormData]")); }, OUe = Ja("URLSearchParams"), [FUe, TUe, AUe, IUe] = ["ReadableStream", "Request", "Response", "Headers"].map(Ja), PUe = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ""); function Ih(e, t, { allOwnKeys: n = !1 } = {}) { if (e === null || typeof e > "u") return; let r, o; if (typeof e != "object" && (e = [e]), zd(e)) for (r = 0, o = e.length; r < o; r++) t.call(null, e[r], r, e); else { if (Th(e)) return; const a = n ? Object.getOwnPropertyNames(e) : Object.keys(e), i = a.length; let s; for (r = 0; r < i; r++) s = a[r], t.call(null, e[s], s, e); } } function FK(e, t) { if (Th(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 Xl = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, TK = (e) => !Pf(e) && e !== Xl; function M_() { const { caseless: e } = TK(this) && this || {}, t = {}, n = (r, o) => { const a = e && FK(t, o) || o; yg(t[a]) && yg(r) ? t[a] = M_(t[a], r) : yg(r) ? t[a] = M_({}, r) : zd(r) ? t[a] = r.slice() : t[a] = r; }; for (let r = 0, o = arguments.length; r < o; r++) arguments[r] && Ih(arguments[r], n); return t; } const LUe = (e, t, n, { allOwnKeys: r } = {}) => (Ih(t, (o, a) => { n && Eo(o) ? e[a] = SK(o, n) : e[a] = o; }, { allOwnKeys: r }), e), RUe = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), NUe = (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); }, MUe = (e, t, n, r) => { let o, a, i; const s = {}; if (t = t || {}, e == null) return t; do { for (o = Object.getOwnPropertyNames(e), a = o.length; a-- > 0; ) i = o[a], (!r || r(i, e, t)) && !s[i] && (t[i] = e[i], s[i] = !0); e = n !== !1 && _5(e); } while (e && (!n || n(e, t)) && e !== Object.prototype); return t; }, DUe = (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; }, BUe = (e) => { if (!e) return null; if (zd(e)) return e; let t = e.length; if (!OK(t)) return null; const n = new Array(t); for (; t-- > 0; ) n[t] = e[t]; return n; }, zUe = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && _5(Uint8Array)), jUe = (e, t) => { const n = (e && e[_1]).call(e); let r; for (; (r = n.next()) && !r.done; ) { const o = r.value; t.call(e, o[0], o[1]); } }, VUe = (e, t) => { let n; const r = []; for (; (n = e.exec(t)) !== null; ) r.push(n); return r; }, HUe = Ja("HTMLFormElement"), UUe = (e) => e.toLowerCase().replace( /[-_\s]([a-z\d])(\w*)/g, function(t, n, r) { return n.toUpperCase() + r; } ), p9 = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), qUe = Ja("RegExp"), AK = (e, t) => { const n = Object.getOwnPropertyDescriptors(e), r = {}; Ih(n, (o, a) => { let i; (i = t(o, a, e)) !== !1 && (r[a] = i || o); }), Object.defineProperties(e, r); }, KUe = (e) => { AK(e, (t, n) => { if (Eo(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1) return !1; const r = e[n]; if (Eo(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 + "'"); }); } }); }, GUe = (e, t) => { const n = {}, r = (o) => { o.forEach((a) => { n[a] = !0; }); }; return zd(e) ? r(e) : r(String(e).split(t)), n; }, WUe = () => { }, YUe = (e, t) => e != null && Number.isFinite(e = +e) ? e : t; function XUe(e) { return !!(e && Eo(e.append) && e[$K] === "FormData" && e[_1]); } const ZUe = (e) => { const t = new Array(10), n = (r, o) => { if (Ah(r)) { if (t.indexOf(r) >= 0) return; if (Th(r)) return r; if (!("toJSON" in r)) { t[o] = r; const a = zd(r) ? [] : {}; return Ih(r, (i, s) => { const l = n(i, o + 1); !Pf(l) && (a[s] = l); }), t[o] = void 0, a; } } return r; }; return n(e, 0); }, JUe = Ja("AsyncFunction"), QUe = (e) => e && (Ah(e) || Eo(e)) && Eo(e.then) && Eo(e.catch), IK = ((e, t) => e ? setImmediate : t ? ((n, r) => (Xl.addEventListener("message", ({ source: o, data: a }) => { o === Xl && a === n && r.length && r.shift()(); }, !1), (o) => { r.push(o), Xl.postMessage(n, "*"); }))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))( typeof setImmediate == "function", Eo(Xl.postMessage) ), eqe = typeof queueMicrotask < "u" ? queueMicrotask.bind(Xl) : typeof process < "u" && process.nextTick || IK, tqe = (e) => e != null && Eo(e[_1]), $e = { isArray: zd, isArrayBuffer: EK, isBuffer: Th, isFormData: EUe, isArrayBufferView: yUe, isString: bUe, isNumber: OK, isBoolean: wUe, isObject: Ah, isPlainObject: yg, isEmptyObject: xUe, isReadableStream: FUe, isRequest: TUe, isResponse: AUe, isHeaders: IUe, isUndefined: Pf, isDate: kUe, isFile: CUe, isBlob: _Ue, isRegExp: qUe, isFunction: Eo, isStream: $Ue, isURLSearchParams: OUe, isTypedArray: zUe, isFileList: SUe, forEach: Ih, merge: M_, extend: LUe, trim: PUe, stripBOM: RUe, inherits: NUe, toFlatObject: MUe, kindOf: S1, kindOfTest: Ja, endsWith: DUe, toArray: BUe, forEachEntry: jUe, matchAll: VUe, isHTMLForm: HUe, hasOwnProperty: p9, hasOwnProp: p9, // an alias to avoid ESLint no-prototype-builtins detection reduceDescriptors: AK, freezeMethods: KUe, toObjectSet: GUe, toCamelCase: UUe, noop: WUe, toFiniteNumber: YUe, findKey: FK, global: Xl, isContextDefined: TK, isSpecCompliantForm: XUe, toJSONObject: ZUe, isAsyncFn: JUe, isThenable: QUe, setImmediate: IK, asap: eqe, isIterable: tqe }; function Nt(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); } $e.inherits(Nt, 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: $e.toJSONObject(this.config), code: this.code, status: this.status }; } }); const PK = Nt.prototype, LK = {}; [ "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) => { LK[e] = { value: e }; }); Object.defineProperties(Nt, LK); Object.defineProperty(PK, "isAxiosError", { value: !0 }); Nt.from = (e, t, n, r, o, a) => { const i = Object.create(PK); return $e.toFlatObject(e, i, function(s) { return s !== Error.prototype; }, (s) => s !== "isAxiosError"), Nt.call(i, e.message, t, n, r, o), i.cause = e, i.name = e.name, a && Object.assign(i, a), i; }; const nqe = null; function D_(e) { return $e.isPlainObject(e) || $e.isArray(e); } function RK(e) { return $e.endsWith(e, "[]") ? e.slice(0, -2) : e; } function f9(e, t, n) { return e ? e.concat(t).map(function(r, o) { return r = RK(r), !n && o ? "[" + r + "]" : r; }).join(n ? "." : "") : t; } function rqe(e) { return $e.isArray(e) && !e.some(D_); } const oqe = $e.toFlatObject($e, {}, null, function(e) { return /^is[A-Z]/.test(e); }); function E1(e, t, n) { if (!$e.isObject(e)) throw new TypeError("target must be an object"); t = t || new FormData(), n = $e.toFlatObject(n, { metaTokens: !0, dots: !1, indexes: !1 }, !1, function(h, f) { return !$e.isUndefined(f[h]); }); const r = n.metaTokens, o = n.visitor || u, a = n.dots, i = n.indexes, s = (n.Blob || typeof Blob < "u" && Blob) && $e.isSpecCompliantForm(t); if (!$e.isFunction(o)) throw new TypeError("visitor must be a function"); function l(h) { if (h === null) return ""; if ($e.isDate(h)) return h.toISOString(); if ($e.isBoolean(h)) return h.toString(); if (!s && $e.isBlob(h)) throw new Nt("Blob is not supported. Use a Buffer instead."); return $e.isArrayBuffer(h) || $e.isTypedArray(h) ? s && typeof Blob == "function" ? new Blob([h]) : Buffer.from(h) : h; } function u(h, f, v) { let m = h; if (h && !v && typeof h == "object") { if ($e.endsWith(f, "{}")) f = r ? f : f.slice(0, -2), h = JSON.stringify(h); else if ($e.isArray(h) && rqe(h) || ($e.isFileList(h) || $e.endsWith(f, "[]")) && (m = $e.toArray(h))) return f = RK(f), m.forEach(function(g, b) { !($e.isUndefined(g) || g === null) && t.append( // eslint-disable-next-line no-nested-ternary i === !0 ? f9([f], b, a) : i === null ? f : f + "[]", l(g) ); }), !1; } return D_(h) ? !0 : (t.append(f9(v, f, a), l(h)), !1); } const c = [], d = Object.assign(oqe, { defaultVisitor: u, convertValue: l, isVisitable: D_ }); function p(h, f) { if (!$e.isUndefined(h)) { if (c.indexOf(h) !== -1) throw Error("Circular reference detected in " + f.join(".")); c.push(h), $e.forEach(h, function(v, m) { (!($e.isUndefined(v) || v === null) && o.call( t, v, $e.isString(m) ? m.trim() : m, f, d )) === !0 && p(v, f ? f.concat(m) : [m]); }), c.pop(); } } if (!$e.isObject(e)) throw new TypeError("data must be an object"); return p(e), t; } function h9(e) { const t = { "!": "%21", "'": "%27", "(": "%28", ")": "%29", "~": "%7E", "%20": "+", "%00": "\0" }; return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(n) { return t[n]; }); } function S5(e, t) { this._pairs = [], e && E1(e, this, t); } const NK = S5.prototype; NK.append = function(e, t) { this._pairs.push([e, t]); }; NK.toString = function(e) { const t = e ? function(n) { return e.call(this, n, h9); } : h9; return this._pairs.map(function(n) { return t(n[0]) + "=" + t(n[1]); }, "").join("&"); }; function aqe(e) { return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]"); } function MK(e, t, n) { if (!t) return e; const r = n && n.encode || aqe; $e.isFunction(n) && (n = { serialize: n }); const o = n && n.serialize; let a; if (o ? a = o(t, n) : a = $e.isURLSearchParams(t) ? t.toString() : new S5(t, n).toString(r), a) { const i = e.indexOf("#"); i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + a; } return e; } class v9 { 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) { $e.forEach(this.handlers, function(n) { n !== null && t(n); }); } } const DK = { silentJSONParsing: !0, forcedJSONParsing: !0, clarifyTimeoutError: !1 }, iqe = typeof URLSearchParams < "u" ? URLSearchParams : S5, sqe = typeof FormData < "u" ? FormData : null, lqe = typeof Blob < "u" ? Blob : null, uqe = { isBrowser: !0, classes: { URLSearchParams: iqe, FormData: sqe, Blob: lqe }, protocols: ["http", "https", "file", "blob", "url", "data"] }, $5 = typeof window < "u" && typeof document < "u", B_ = typeof navigator == "object" && navigator || void 0, cqe = $5 && (!B_ || ["ReactNative", "NativeScript", "NS"].indexOf(B_.product) < 0), dqe = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef self instanceof WorkerGlobalScope && typeof self.importScripts == "function", pqe = $5 && window.location.href || "http://localhost", fqe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, hasBrowserEnv: $5, hasStandardBrowserEnv: cqe, hasStandardBrowserWebWorkerEnv: dqe, navigator: B_, origin: pqe }, Symbol.toStringTag, { value: "Module" })), Kr = { ...fqe, ...uqe }; function hqe(e, t) { return E1(e, new Kr.classes.URLSearchParams(), { visitor: function(n, r, o, a) { return Kr.isNode && $e.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : a.defaultVisitor.apply(this, arguments); }, ...t }); } function vqe(e) { return $e.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]); } function gqe(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 BK(e) { function t(n, r, o, a) { let i = n[a++]; if (i === "__proto__") return !0; const s = Number.isFinite(+i), l = a >= n.length; return i = !i && $e.isArray(o) ? o.length : i, l ? ($e.hasOwnProp(o, i) ? o[i] = [o[i], r] : o[i] = r, !s) : ((!o[i] || !$e.isObject(o[i])) && (o[i] = []), t(n, r, o[i], a) && $e.isArray(o[i]) && (o[i] = gqe(o[i])), !s); } if ($e.isFormData(e) && $e.isFunction(e.entries)) { const n = {}; return $e.forEachEntry(e, (r, o) => { t(vqe(r), o, n, 0); }), n; } return null; } function mqe(e, t, n) { if ($e.isString(e)) try { return (t || JSON.parse)(e), $e.trim(e); } catch (r) { if (r.name !== "SyntaxError") throw r; } return (0, JSON.stringify)(e); } const Ph = { transitional: DK, adapter: ["xhr", "http", "fetch"], transformRequest: [function(e, t) { const n = t.getContentType() || "", r = n.indexOf("application/json") > -1, o = $e.isObject(e); if (o && $e.isHTMLForm(e) && (e = new FormData(e)), $e.isFormData(e)) return r ? JSON.stringify(BK(e)) : e; if ($e.isArrayBuffer(e) || $e.isBuffer(e) || $e.isStream(e) || $e.isFile(e) || $e.isBlob(e) || $e.isReadableStream(e)) return e; if ($e.isArrayBufferView(e)) return e.buffer; if ($e.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 hqe(e, this.formSerializer).toString(); if ((a = $e.isFileList(e)) || n.indexOf("multipart/form-data") > -1) { const i = this.env && this.env.FormData; return E1( a ? { "files[]": e } : e, i && new i(), this.formSerializer ); } } return o || r ? (t.setContentType("application/json", !1), mqe(e)) : e; }], transformResponse: [function(e) { const t = this.transitional || Ph.transitional, n = t && t.forcedJSONParsing, r = this.responseType === "json"; if ($e.isResponse(e) || $e.isReadableStream(e)) return e; if (e && $e.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" ? Nt.from(a, Nt.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: Kr.classes.FormData, Blob: Kr.classes.Blob }, validateStatus: function(e) { return e >= 200 && e < 300; }, headers: { common: { Accept: "application/json, text/plain, */*", "Content-Type": void 0 } } }; $e.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => { Ph.headers[e] = {}; }); const yqe = $e.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" ]), bqe = (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] && yqe[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r); }), t; }, g9 = Symbol("internals"); function pp(e) { return e && String(e).trim().toLowerCase(); } function bg(e) { return e === !1 || e == null ? e : $e.isArray(e) ? e.map(bg) : String(e); } function wqe(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 xqe = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()); function iC(e, t, n, r, o) { if ($e.isFunction(r)) return r.call(this, t, n); if (o && (t = n), !!$e.isString(t)) { if ($e.isString(r)) return t.indexOf(r) !== -1; if ($e.isRegExp(r)) return r.test(t); } } function kqe(e) { return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r); } function Cqe(e, t) { const n = $e.toCamelCase(" " + t); ["get", "set", "has"].forEach((r) => { Object.defineProperty(e, r + n, { value: function(o, a, i) { return this[r].call(this, t, o, a, i); }, configurable: !0 }); }); } class Oo { constructor(t) { t && this.set(t); } set(t, n, r) { const o = this; function a(s, l, u) { const c = pp(l); if (!c) throw new Error("header name must be a non-empty string"); const d = $e.findKey(o, c); (!d || o[d] === void 0 || u === !0 || u === void 0 && o[d] !== !1) && (o[d || l] = bg(s)); } const i = (s, l) => $e.forEach(s, (u, c) => a(u, c, l)); if ($e.isPlainObject(t) || t instanceof this.constructor) i(t, n); else if ($e.isString(t) && (t = t.trim()) && !xqe(t)) i(bqe(t), n); else if ($e.isObject(t) && $e.isIterable(t)) { let s = {}, l, u; for (const c of t) { if (!$e.isArray(c)) throw TypeError("Object iterator must return a key-value pair"); s[u = c[0]] = (l = s[u]) ? $e.isArray(l) ? [...l, c[1]] : [l, c[1]] : c[1]; } i(s, n); } else t != null && a(n, t, r); return this; } get(t, n) { if (t = pp(t), t) { const r = $e.findKey(this, t); if (r) { const o = this[r]; if (!n) return o; if (n === !0) return wqe(o); if ($e.isFunction(n)) return n.call(this, o, r); if ($e.isRegExp(n)) return n.exec(o); throw new TypeError("parser must be boolean|regexp|function"); } } } has(t, n) { if (t = pp(t), t) { const r = $e.findKey(this, t); return !!(r && this[r] !== void 0 && (!n || iC(this, this[r], r, n))); } return !1; } delete(t, n) { const r = this; let o = !1; function a(i) { if (i = pp(i), i) { const s = $e.findKey(r, i); s && (!n || iC(r, r[s], s, n)) && (delete r[s], o = !0); } } return $e.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 || iC(this, this[a], a, t, !0)) && (delete this[a], o = !0); } return o; } normalize(t) { const n = this, r = {}; return $e.forEach(this, (o, a) => { const i = $e.findKey(r, a); if (i) { n[i] = bg(o), delete n[a]; return; } const s = t ? kqe(a) : String(a).trim(); s !== a && delete n[a], n[s] = bg(o), r[s] = !0; }), this; } concat(...t) { return this.constructor.concat(this, ...t); } toJSON(t) { const n = /* @__PURE__ */ Object.create(null); return $e.forEach(this, (r, o) => { r != null && r !== !1 && (n[o] = t && $e.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[g9] = this[g9] = { accessors: {} }).accessors, r = this.prototype; function o(a) { const i = pp(a); n[i] || (Cqe(r, a), n[i] = !0); } return $e.isArray(t) ? t.forEach(o) : o(t), this; } } Oo.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]); $e.reduceDescriptors(Oo.prototype, ({ value: e }, t) => { let n = t[0].toUpperCase() + t.slice(1); return { get: () => e, set(r) { this[n] = r; } }; }); $e.freezeMethods(Oo); function sC(e, t) { const n = this || Ph, r = t || n, o = Oo.from(r.headers); let a = r.data; return $e.forEach(e, function(i) { a = i.call(n, a, o.normalize(), t ? t.status : void 0); }), o.normalize(), a; } function zK(e) { return !!(e && e.__CANCEL__); } function jd(e, t, n) { Nt.call(this, e ?? "canceled", Nt.ERR_CANCELED, t, n), this.name = "CanceledError"; } $e.inherits(jd, Nt, { __CANCEL__: !0 }); function jK(e, t, n) { const r = n.config.validateStatus; !n.status || !r || r(n.status) ? e(n) : t(new Nt( "Request failed with status code " + n.status, [Nt.ERR_BAD_REQUEST, Nt.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4], n.config, n.request, n )); } function _qe(e) { const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e); return t && t[1] || ""; } function Sqe(e, t) { e = e || 10; const n = new Array(e), r = new Array(e); let o = 0, a = 0, i; return t = t !== void 0 ? t : 1e3, function(s) { const l = Date.now(), u = r[a]; i || (i = l), n[o] = s, r[o] = l; let c = a, d = 0; for (; c !== o; ) d += n[c++], c = c % e; if (o = (o + 1) % e, o === a && (a = (a + 1) % e), l - i < t) return; const p = u && l - u; return p ? Math.round(d * 1e3 / p) : void 0; }; } function $qe(e, t) { let n = 0, r = 1e3 / t, o, a; const i = (s, l = Date.now()) => { n = l, o = null, a && (clearTimeout(a), a = null), e(...s); }; return [(...s) => { const l = Date.now(), u = l - n; u >= r ? i(s, l) : (o = s, a || (a = setTimeout(() => { a = null, i(o); }, r - u))); }, () => o && i(o)]; } const y0 = (e, t, n = 3) => { let r = 0; const o = Sqe(50, 250); return $qe((a) => { const i = a.loaded, s = a.lengthComputable ? a.total : void 0, l = i - r, u = o(l), c = i <= s; r = i; const d = { loaded: i, total: s, progress: s ? i / s : void 0, bytes: l, rate: u || void 0, estimated: u && s && c ? (s - i) / u : void 0, event: a, lengthComputable: s != null, [t ? "download" : "upload"]: !0 }; e(d); }, n); }, m9 = (e, t) => { const n = e != null; return [(r) => t[0]({ lengthComputable: n, total: e, loaded: r }), t[1]]; }, y9 = (e) => (...t) => $e.asap(() => e(...t)), Eqe = Kr.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, Kr.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))( new URL(Kr.origin), Kr.navigator && /(msie|trident)/i.test(Kr.navigator.userAgent) ) : () => !0, Oqe = Kr.hasStandardBrowserEnv ? ( // Standard browser envs support document.cookie { write(e, t, n, r, o, a) { const i = [e + "=" + encodeURIComponent(t)]; $e.isNumber(n) && i.push("expires=" + new Date(n).toGMTString()), $e.isString(r) && i.push("path=" + r), $e.isString(o) && i.push("domain=" + o), a === !0 && i.push("secure"), document.cookie = i.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 Fqe(e) { return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e); } function Tqe(e, t) { return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e; } function VK(e, t, n) { let r = !Fqe(t); return e && (r || n == !1) ? Tqe(e, t) : t; } const b9 = (e) => e instanceof Oo ? { ...e } : e; function Su(e, t) { t = t || {}; const n = {}; function r(u, c, d, p) { return $e.isPlainObject(u) && $e.isPlainObject(c) ? $e.merge.call({ caseless: p }, u, c) : $e.isPlainObject(c) ? $e.merge({}, c) : $e.isArray(c) ? c.slice() : c; } function o(u, c, d, p) { if ($e.isUndefined(c)) { if (!$e.isUndefined(u)) return r(void 0, u, d, p); } else return r(u, c, d, p); } function a(u, c) { if (!$e.isUndefined(c)) return r(void 0, c); } function i(u, c) { if ($e.isUndefined(c)) { if (!$e.isUndefined(u)) return r(void 0, u); } else return r(void 0, c); } function s(u, c, d) { if (d in t) return r(u, c); if (d in e) return r(void 0, u); } const l = { url: a, method: a, data: a, baseURL: i, transformRequest: i, transformResponse: i, paramsSerializer: i, timeout: i, timeoutMessage: i, withCredentials: i, withXSRFToken: i, adapter: i, responseType: i, xsrfCookieName: i, xsrfHeaderName: i, onUploadProgress: i, onDownloadProgress: i, decompress: i, maxContentLength: i, maxBodyLength: i, beforeRedirect: i, transport: i, httpAgent: i, httpsAgent: i, cancelToken: i, socketPath: i, responseEncoding: i, validateStatus: s, headers: (u, c, d) => o(b9(u), b9(c), d, !0) }; return $e.forEach(Object.keys({ ...e, ...t }), function(u) { const c = l[u] || o, d = c(e[u], t[u], u); $e.isUndefined(d) && c !== s || (n[u] = d); }), n; } const HK = (e) => { const t = Su({}, e); let { data: n, withXSRFToken: r, xsrfHeaderName: o, xsrfCookieName: a, headers: i, auth: s } = t; t.headers = i = Oo.from(i), t.url = MK(VK(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), s && i.set( "Authorization", "Basic " + btoa((s.username || "") + ":" + (s.password ? unescape(encodeURIComponent(s.password)) : "")) ); let l; if ($e.isFormData(n)) { if (Kr.hasStandardBrowserEnv || Kr.hasStandardBrowserWebWorkerEnv) i.setContentType(void 0); else if ((l = i.getContentType()) !== !1) { const [u, ...c] = l ? l.split(";").map((d) => d.trim()).filter(Boolean) : []; i.setContentType([u || "multipart/form-data", ...c].join("; ")); } } if (Kr.hasStandardBrowserEnv && (r && $e.isFunction(r) && (r = r(t)), r || r !== !1 && Eqe(t.url))) { const u = o && a && Oqe.read(a); u && i.set(o, u); } return t; }, Aqe = typeof XMLHttpRequest < "u", Iqe = Aqe && function(e) { return new Promise(function(t, n) { const r = HK(e); let o = r.data; const a = Oo.from(r.headers).normalize(); let { responseType: i, onUploadProgress: s, onDownloadProgress: l } = r, u, c, d, p, h; function f() { p && p(), h && h(), r.cancelToken && r.cancelToken.unsubscribe(u), r.signal && r.signal.removeEventListener("abort", u); } let v = new XMLHttpRequest(); v.open(r.method.toUpperCase(), r.url, !0), v.timeout = r.timeout; function m() { if (!v) return; const b = Oo.from( "getAllResponseHeaders" in v && v.getAllResponseHeaders() ), x = { data: !i || i === "text" || i === "json" ? v.responseText : v.response, status: v.status, statusText: v.statusText, headers: b, config: e, request: v }; jK(function(w) { t(w), f(); }, function(w) { n(w), f(); }, x), v = null; } "onloadend" in v ? v.onloadend = m : v.onreadystatechange = function() { !v || v.readyState !== 4 || v.status === 0 && !(v.responseURL && v.responseURL.indexOf("file:") === 0) || setTimeout(m); }, v.onabort = function() { v && (n(new Nt("Request aborted", Nt.ECONNABORTED, e, v)), v = null); }, v.onerror = function() { n(new Nt("Network Error", Nt.ERR_NETWORK, e, v)), v = null; }, v.ontimeout = function() { let b = r.timeout ? "timeout of " + r.timeout + "ms exceeded" : "timeout exceeded"; const x = r.transitional || DK; r.timeoutErrorMessage && (b = r.timeoutErrorMessage), n(new Nt( b, x.clarifyTimeoutError ? Nt.ETIMEDOUT : Nt.ECONNABORTED, e, v )), v = null; }, o === void 0 && a.setContentType(null), "setRequestHeader" in v && $e.forEach(a.toJSON(), function(b, x) { v.setRequestHeader(x, b); }), $e.isUndefined(r.withCredentials) || (v.withCredentials = !!r.withCredentials), i && i !== "json" && (v.responseType = r.responseType), l && ([d, h] = y0(l, !0), v.addEventListener("progress", d)), s && v.upload && ([c, p] = y0(s), v.upload.addEventListener("progress", c), v.upload.addEventListener("loadend", p)), (r.cancelToken || r.signal) && (u = (b) => { v && (n(!b || b.type ? new jd(null, e, v) : b), v.abort(), v = null); }, r.cancelToken && r.cancelToken.subscribe(u), r.signal && (r.signal.aborted ? u() : r.signal.addEventListener("abort", u))); const g = _qe(r.url); if (g && Kr.protocols.indexOf(g) === -1) { n(new Nt("Unsupported protocol " + g + ":", Nt.ERR_BAD_REQUEST, e)); return; } v.send(o || null); }); }, Pqe = (e, t) => { const { length: n } = e = e ? e.filter(Boolean) : []; if (t || n) { let r = new AbortController(), o; const a = function(u) { if (!o) { o = !0, s(); const c = u instanceof Error ? u : this.reason; r.abort(c instanceof Nt ? c : new jd(c instanceof Error ? c.message : c)); } }; let i = t && setTimeout(() => { i = null, a(new Nt(`timeout ${t} of ms exceeded`, Nt.ETIMEDOUT)); }, t); const s = () => { e && (i && clearTimeout(i), i = null, e.forEach((u) => { u.unsubscribe ? u.unsubscribe(a) : u.removeEventListener("abort", a); }), e = null); }; e.forEach((u) => u.addEventListener("abort", a)); const { signal: l } = r; return l.unsubscribe = () => $e.asap(s), l; } }, Lqe = 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; }, Rqe = async function* (e, t) { for await (const n of Nqe(e)) yield* Lqe(n, t); }, Nqe = 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(); } }, w9 = (e, t, n, r) => { const o = Rqe(e, t); let a = 0, i, s = (l) => { i || (i = !0, r && r(l)); }; return new ReadableStream({ async pull(l) { try { const { done: u, value: c } = await o.next(); if (u) { s(), l.close(); return; } let d = c.byteLength; if (n) { let p = a += d; n(p); } l.enqueue(new Uint8Array(c)); } catch (u) { throw s(u), u; } }, cancel(l) { return s(l), o.return(); } }, { highWaterMark: 2 }); }, O1 = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", UK = O1 && typeof ReadableStream == "function", Mqe = O1 && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), qK = (e, ...t) => { try { return !!e(...t); } catch { return !1; } }, Dqe = UK && qK(() => { let e = !1; const t = new Request(Kr.origin, { body: new ReadableStream(), method: "POST", get duplex() { return e = !0, "half"; } }).headers.has("Content-Type"); return e && !t; }), x9 = 64 * 1024, z_ = UK && qK(() => $e.isReadableStream(new Response("").body)), b0 = { stream: z_ && ((e) => e.body) }; O1 && ((e) => { ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => { !b0[t] && (b0[t] = $e.isFunction(e[t]) ? (n) => n[t]() : (n, r) => { throw new Nt(`Response type '${t}' is not supported`, Nt.ERR_NOT_SUPPORT, r); }); }); })(new Response()); const Bqe = async (e) => { if (e == null) return 0; if ($e.isBlob(e)) return e.size; if ($e.isSpecCompliantForm(e)) return (await new Request(Kr.origin, { method: "POST", body: e }).arrayBuffer()).byteLength; if ($e.isArrayBufferView(e) || $e.isArrayBuffer(e)) return e.byteLength; if ($e.isURLSearchParams(e) && (e = e + ""), $e.isString(e)) return (await Mqe(e)).byteLength; }, zqe = async (e, t) => $e.toFiniteNumber(e.getContentLength()) ?? Bqe(t), jqe = O1 && (async (e) => { let { url: t, method: n, data: r, signal: o, cancelToken: a, timeout: i, onDownloadProgress: s, onUploadProgress: l, responseType: u, headers: c, withCredentials: d = "same-origin", fetchOptions: p } = HK(e); u = u ? (u + "").toLowerCase() : "text"; let h = Pqe([o, a && a.toAbortSignal()], i), f; const v = h && h.unsubscribe && (() => { h.unsubscribe(); }); let m; try { if (l && Dqe && n !== "get" && n !== "head" && (m = await zqe(c, r)) !== 0) { let k = new Request(t, { method: "POST", body: r, duplex: "half" }), C; if ($e.isFormData(r) && (C = k.headers.get("content-type")) && c.setContentType(C), k.body) { const [_, $] = m9( m, y0(y9(l)) ); r = w9(k.body, x9, _, $); } } $e.isString(d) || (d = d ? "include" : "omit"); const g = "credentials" in Request.prototype; f = new Request(t, { ...p, signal: h, method: n.toUpperCase(), headers: c.normalize().toJSON(), body: r, duplex: "half", credentials: g ? d : void 0 }); let b = await fetch(f, p); const x = z_ && (u === "stream" || u === "response"); if (z_ && (s || x && v)) { const k = {}; ["status", "statusText", "headers"].forEach((O) => { k[O] = b[O]; }); const C = $e.toFiniteNumber(b.headers.get("content-length")), [_, $] = s && m9( C, y0(y9(s), !0) ) || []; b = new Response( w9(b.body, x9, _, () => { $ && $(), v && v(); }), k ); } u = u || "text"; let w = await b0[$e.findKey(b0, u) || "text"](b, e); return !x && v && v(), await new Promise((k, C) => { jK(k, C, { data: w, headers: Oo.from(b.headers), status: b.status, statusText: b.statusText, config: e, request: f }); }); } catch (g) { throw v && v(), g && g.name === "TypeError" && /Load failed|fetch/i.test(g.message) ? Object.assign( new Nt("Network Error", Nt.ERR_NETWORK, e, f), { cause: g.cause || g } ) : Nt.from(g, g && g.code, e, f); } }), j_ = { http: nqe, xhr: Iqe, fetch: jqe }; $e.forEach(j_, (e, t) => { if (e) { try { Object.defineProperty(e, "name", { value: t }); } catch { } Object.defineProperty(e, "adapterName", { value: t }); } }); const k9 = (e) => `- ${e}`, Vqe = (e) => $e.isFunction(e) || e === null || e === !1, KK = { getAdapter: (e) => { e = $e.isArray(e) ? e : [e]; const { length: t } = e; let n, r; const o = {}; for (let a = 0; a < t; a++) { n = e[a]; let i; if (r = n, !Vqe(n) && (r = j_[(i = String(n)).toLowerCase()], r === void 0)) throw new Nt(`Unknown adapter '${i}'`); if (r) break; o[i || "#" + a] = r; } if (!r) { const a = Object.entries(o).map( ([s, l]) => `adapter ${s} ` + (l === !1 ? "is not supported by the environment" : "is not available in the build") ); let i = t ? a.length > 1 ? `since : ` + a.map(k9).join(` `) : " " + k9(a[0]) : "as no adapter specified"; throw new Nt( "There is no suitable adapter to dispatch the request " + i, "ERR_NOT_SUPPORT" ); } return r; }, adapters: j_ }; function lC(e) { if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted) throw new jd(null, e); } function C9(e) { return lC(e), e.headers = Oo.from(e.headers), e.data = sC.call( e, e.transformRequest ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), KK.getAdapter(e.adapter || Ph.adapter)(e).then(function(t) { return lC(e), t.data = sC.call( e, e.transformResponse, t ), t.headers = Oo.from(t.headers), t; }, function(t) { return zK(t) || (lC(e), t && t.response && (t.response.data = sC.call( e, e.transformResponse, t.response ), t.response.headers = Oo.from(t.response.headers))), Promise.reject(t); }); } const GK = "1.11.0", F1 = {}; ["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => { F1[e] = function(n) { return typeof n === e || "a" + (t < 1 ? "n " : " ") + e; }; }); const _9 = {}; F1.transitional = function(e, t, n) { function r(o, a) { return "[Axios v" + GK + "] Transitional option '" + o + "'" + a + (n ? ". " + n : ""); } return (o, a, i) => { if (e === !1) throw new Nt( r(a, " has been removed" + (t ? " in " + t : "")), Nt.ERR_DEPRECATED ); return t && !_9[a] && (_9[a] = !0, console.warn( r( a, " has been deprecated since v" + t + " and will be removed in the near future" ) )), e ? e(o, a, i) : !0; }; }; F1.spelling = function(e) { return (t, n) => (console.warn(`${n} is likely a misspelling of ${e}`), !0); }; function Hqe(e, t, n) { if (typeof e != "object") throw new Nt("options must be an object", Nt.ERR_BAD_OPTION_VALUE); const r = Object.keys(e); let o = r.length; for (; o-- > 0; ) { const a = r[o], i = t[a]; if (i) { const s = e[a], l = s === void 0 || i(s, a, e); if (l !== !0) throw new Nt("option " + a + " must be " + l, Nt.ERR_BAD_OPTION_VALUE); continue; } if (n !== !0) throw new Nt("Unknown option " + a, Nt.ERR_BAD_OPTION); } } const wg = { assertOptions: Hqe, validators: F1 }, ti = wg.validators; class iu { constructor(t) { this.defaults = t || {}, this.interceptors = { request: new v9(), response: new v9() }; } /** * 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 = Su(this.defaults, n); const { transitional: r, paramsSerializer: o, headers: a } = n; r !== void 0 && wg.assertOptions(r, { silentJSONParsing: ti.transitional(ti.boolean), forcedJSONParsing: ti.transitional(ti.boolean), clarifyTimeoutError: ti.transitional(ti.boolean) }, !1), o != null && ($e.isFunction(o) ? n.paramsSerializer = { serialize: o } : wg.assertOptions(o, { encode: ti.function, serialize: ti.function }, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), wg.assertOptions(n, { baseUrl: ti.spelling("baseURL"), withXsrfToken: ti.spelling("withXSRFToken") }, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase(); let i = a && $e.merge( a.common, a[n.method] ); a && $e.forEach( ["delete", "get", "head", "post", "put", "patch", "common"], (f) => { delete a[f]; } ), n.headers = Oo.concat(i, a); const s = []; let l = !0; this.interceptors.request.forEach(function(f) { typeof f.runWhen == "function" && f.runWhen(n) === !1 || (l = l && f.synchronous, s.unshift(f.fulfilled, f.rejected)); }); const u = []; this.interceptors.response.forEach(function(f) { u.push(f.fulfilled, f.rejected); }); let c, d = 0, p; if (!l) { const f = [C9.bind(this), void 0]; for (f.unshift(...s), f.push(...u), p = f.length, c = Promise.resolve(n); d < p; ) c = c.then(f[d++], f[d++]); return c; } p = s.length; let h = n; for (d = 0; d < p; ) { const f = s[d++], v = s[d++]; try { h = f(h); } catch (m) { v.call(this, m); break; } } try { c = C9.call(this, h); } catch (f) { return Promise.reject(f); } for (d = 0, p = u.length; d < p; ) c = c.then(u[d++], u[d++]); return c; } getUri(t) { t = Su(this.defaults, t); const n = VK(t.baseURL, t.url, t.allowAbsoluteUrls); return MK(n, t.params, t.paramsSerializer); } } $e.forEach(["delete", "get", "head", "options"], function(e) { iu.prototype[e] = function(t, n) { return this.request(Su(n || {}, { method: e, url: t, data: (n || {}).data })); }; }); $e.forEach(["post", "put", "patch"], function(e) { function t(n) { return function(r, o, a) { return this.request(Su(a || {}, { method: e, headers: n ? { "Content-Type": "multipart/form-data" } : {}, url: r, data: o })); }; } iu.prototype[e] = t(), iu.prototype[e + "Form"] = t(!0); }); class E5 { 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 i = new Promise((s) => { r.subscribe(s), a = s; }).then(o); return i.cancel = function() { r.unsubscribe(a); }, i; }, t(function(o, a, i) { r.reason || (r.reason = new jd(o, a, 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 E5(function(n) { t = n; }), cancel: t }; } } function Uqe(e) { return function(t) { return e.apply(null, t); }; } function qqe(e) { return $e.isObject(e) && e.isAxiosError === !0; } const V_ = { 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(V_).forEach(([e, t]) => { V_[t] = e; }); function WK(e) { const t = new iu(e), n = SK(iu.prototype.request, t); return $e.extend(n, iu.prototype, t, { allOwnKeys: !0 }), $e.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(r) { return WK(Su(e, r)); }, n; } const tr = WK(Ph); tr.Axios = iu; tr.CanceledError = jd; tr.CancelToken = E5; tr.isCancel = zK; tr.VERSION = GK; tr.toFormData = E1; tr.AxiosError = Nt; tr.Cancel = tr.CanceledError; tr.all = function(e) { return Promise.all(e); }; tr.spread = Uqe; tr.isAxiosError = qqe; tr.mergeConfig = Su; tr.AxiosHeaders = Oo; tr.formToJSON = (e) => BK($e.isHTMLForm(e) ? new FormData(e) : e); tr.getAdapter = KK.getAdapter; tr.HttpStatusCode = V_; tr.default = tr; const Kqe = "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 Gqe() { const e = Kqe; async function t(n, r, o) { return await tr({ method: "get", url: n, params: r, timeout: o }); } return { defaultImg: e, getRequest: t }; } const Wqe = ["src"], Yqe = ["src"], Xqe = { key: 1, class: "details" }, Zqe = { key: 0 }, Jqe = { class: "title text-placeholder" }, Qqe = { __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(g) { let b; try { b = new URL(g); } catch { return !1; } return b.protocol === "http:" || b.protocol === "https:"; } const { defaultImg: r, getRequest: o } = Gqe(), a = z(); z(null), z(4); const i = z(void 0), s = z(!1), l = z(!1), u = z(!1), c = e, d = t, p = E(() => c.data.title && ((i ? i.value : !1) || s.value) && (c.data.link || c.data.userData)); E(() => showCardDetails ? height * 0.525 : height), E(() => width - 2 * h), E(() => height * 0.237); const h = E(() => height * 0.076); E(() => showCardDetails ? height * 0.525 : height), he( () => c.data, () => { i.value = void 0, s.value = !1, u.value = !1, l.value = !1, c.data.thumbnail ? n(c.data.thumbnail) && c.data.mimetype ? v(c.data.thumbnail, { fetchAttempts: 0 }) : i.value = c.data.thumbnail : s.value = !0, Ke(() => { m(); }); }, { immediate: !0 } ), Nf(() => { Ke(() => { m(); }); }); function f() { if (c.data.link) { const g = document.createElement("a"); g.href = c.data.link, g.target = "_blank", document.body.appendChild(g), g.click(), d("datalink-clicked", c.data.link), g.remove(); } c.data.userData && d("card-clicked", c.data.userData); } function v(g, b) { o(g, {}, 11e3).then( (x) => { let w = x.data; typeof w == "string" && w.startsWith("data:") ? i.value = x.data : c.data.mimetype ? i.value = `data:${c.data.mimetype};base64,${x.data}` : i.value = x.data; }, (x) => { x.message.includes("timeout") && x.message.includes("exceeded") && b.fetchAttempts < 3 ? (b.fetchAttempts += 1, v(g, b)) : s.value = !0; } ); } function m() { if (c.data.hideTitle) l.value = !0, u.value = !0; else { const g = a; g && g.offsetParent ? (u.value = !0, g.offsetWidth >= g.scrollWidth ? l.value = !0 : l.value = !1) : c.data.title.length > 20 ? l.value = !1 : l.value = !0; } } return (g, b) => { const x = cUe, w = jHe, k = KHe, C = gUe; return S(), re(k, { shadow: e.shadow, "body-style": e.bodyStyle, style: Ye({ padding: "0px", maxWidth: e.width + "rem" }), class: "card" }, { default: N(() => [ Be((S(), L("div", null, [ D("div", { class: "cursor-pointer", style: Ye(e.imageContainerStyle), onClick: Ge(f, ["prevent"]) }, [ s.value ? (S(), L("img", { key: 0, src: y(r), style: Ye(e.imageStyle) }, null, 12, Wqe)) : (S(), L("img", { key: 1, src: i.value, alt: "thumbnail loading ...", style: Ye(e.imageStyle) }, null, 12, Yqe)) ], 4), J("", !0), e.showCardDetails ? (S(), L("div", Xqe, [ e.data.hideType ? J("", !0) : (S(), L("p", Zqe, [ D("b", null, ge(e.data.type), 1) ])), q(x, { "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"]), Be(D("p", { ref_key: "titleText", ref: a, class: "title" }, ge(e.data.title), 513), [ [ht, !e.data.hideTitle] ]), Be(D("p", Jqe, null, 512), [ [ht, e.data.hideTitle] ]), q(w, { class: "button", onClick: Ge(f, ["prevent"]), size: "large" }, { default: N(() => [ Oe(" View " + ge(e.data.type), 1) ]), _: 1 }) ])) : J("", !0) ])), [ [C, !p.value] ]) ]), _: 1 }, 8, ["shadow", "body-style", "style"]); }; } }, eKe = /* @__PURE__ */ JE(Qqe, [["__scopeId", "data-v-8306387d"]]), T1 = (e) => (Ci("data-v-e745b327"), e = e(), _i(), e), tKe = { ref: "myButton", class: "gallery" }, nKe = { class: "gallery-strip" }, rKe = /* @__PURE__ */ T1(() => /* @__PURE__ */ D("span", { class: "progress-button" }, "‹", -1)), oKe = [ rKe ], aKe = { key: 1, style: { width: "2rem" } }, iKe = /* @__PURE__ */ T1(() => /* @__PURE__ */ D("div", { class: "filler" }, null, -1)), sKe = { class: "card-line" }, lKe = /* @__PURE__ */ T1(() => /* @__PURE__ */ D("div", { class: "filler" }, null, -1)), uKe = /* @__PURE__ */ T1(() => /* @__PURE__ */ D("span", { class: "progress-button" }, "›", -1)), cKe = [ uKe ], dKe = { key: 3, style: { width: "2rem" } }, pKe = { __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($) { return typeof window < "u" ? $ * parseFloat(window.getComputedStyle(document.documentElement).fontSize) : $ * 16; } const o = e, a = n, i = z(0), s = z(0), l = z(2), u = z(2), c = E(() => o.items.length), d = E(() => s.value > 0), p = E(() => s.value < c.value - 1), h = E(() => 0.78 * o.cardWidth); E(() => c.value * (o.cardWidth + 0.25) - 0.25); const f = E(() => { const $ = r(0.5), O = r(2), F = r(o.cardWidth), A = (o.maxWidth - 2 * O - 2 * $) / (1.1 * F); return Math.max(1, Math.floor(A)); }), v = E(() => { const $ = r(1), O = o.maxWidth / ($ * c.value); return o.showIndicatorBar && O > 0.1 && c.value > 1; }), m = E(() => { const $ = Math.floor(f.value / 2); let O = s.value - $; return O < 0 ? O = 0 : O + f.value > c.value && (O = c.value - f.value), O; }), g = E(() => { let $ = []; for (let O = 0; O < f.value; O++) $.push(o.items[O + m.value]); return $; }); function b($) { a("card-clicked", $); } function x($) { a("datalink-clicked", $); } function w($) { return s.value - m.value === $ && o.highlightActive; } function k() { s.value += 1; } function C() { s.value -= 1; } function _($) { s.value !== $ && (s.value = $); } return t({ count: i, currentIndex: s, controlHeight: l, controlWidth: u, cardClicked: b, isActive: w, goNext: k, goPrev: C, indicatorClicked: _ }), ($, O) => (S(), L("div", tKe, [ D("div", nKe, [ e.items.length > 1 ? (S(), L("a", { key: 0, href: "#", class: H(["oval", "prev", { disabled: !d.value }]), onClick: Ge(C, ["prevent"]) }, oKe, 2)) : (S(), L("div", aKe)), iKe, D("div", sKe, [ (S(!0), L(Re, null, mt(g.value, (F, A) => (S(), L("span", { key: "card_" + A, class: H(["key-image-span", { active: w(A) }]) }, [ F ? (S(), re(eKe, { key: 0, data: F, "body-style": e.bodyStyle, "image-container-style": e.imageContainerStyle, "image-style": e.imageStyle, width: e.cardWidth, height: h.value, shadow: e.shadow, "show-card-details": e.showCardDetails, onCardClicked: b, onDatalinkClicked: x }, null, 8, ["data", "body-style", "image-container-style", "image-style", "width", "height", "shadow", "show-card-details"])) : J("", !0) ], 2))), 128)) ]), lKe, e.items.length > 1 ? (S(), L("a", { key: 2, href: "#", class: H(["oval", "next", { disabled: !p.value }]), onClick: Ge(k, ["prevent"]) }, cKe, 2)) : (S(), L("div", dKe)) ]), D("div", { style: Ye(e.bottomSpacer) }, null, 4), v.value ? (S(), re(cBe, { key: 0, count: c.value, current: s.value, onClicked: _ }, null, 8, ["count", "current"])) : J("", !0) ], 512)); } }, fKe = /* @__PURE__ */ JE(pKe, [["__scopeId", "data-v-e745b327"]]), hKe = { 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; } } }, fp = (e) => e.split("\\").pop().split("/").pop(), fc = function(e) { return e.replace(/\b\w/g, (t) => t.toUpperCase()); }, vKe = { name: "ImageGallery", components: { Gallery: fKe }, mixins: [iBe, hKe], 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: [], 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.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 }); }, 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: fp(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 i = e.datacite, s = `${this.envVars.API_LOCATION}/s3-resource/${this.getS3Prefix()}files/`, l = s + e.dataset.path + this.getS3Args(); let u = {}; try { u = JSON.parse( i.supplemental_json_metadata.description ); } catch (h) { console.warn(h); } let c = []; i.isDescribedBy && c.push({ url: s + i.isDescribedBy.path }); const d = { dataSource: { url: l }, metadata: u, supplementalData: c }; let p = { label: fc(this.label), resource: d, s3uri: this.entry.s3uri, title: "View plot", type: "Plot", discoverId: this.discoverId, version: this.datasetVersion }; this.items.Plots.push({ id: n, title: fp(t), type: "Plot", thumbnail: o, userData: p, 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 i = "", s; a && (s = this.getImageURL(this.envVars.API_LOCATION, { id: o, prefix: this.getS3Prefix(), file_path: a.dataset.path, s3Bucket: this.s3Bucket }), i = a.mimetype.name); let l = { label: fc(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: fp(r), type: "Scaffold", thumbnail: s, userData: l, hideType: !0, mimetype: i }); }); } }, 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 r = { share_link: `${this.envVars.NL_LINK_PREFIX}/dataviewer?datasetId=${this.datasetId}&version=${this.datasetVersion}&path=files/${n}` }; let o = { label: fc(this.label), resource: r, datasetId: this.datasetId, s3uri: this.entry.s3uri, title: "View segmentation", type: "Segmentation" }; const a = 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: fp(n), type: "Segmentation", thumbnail: a, userData: o, 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 i = `${this.envVars.API_LOCATION}s3-resource/${this.getS3Prefix()}files/${t}${this.getS3Args()}`; let s = { label: fc(this.label), resource: i, s3uri: this.entry.s3uri, title: "View simulation", type: "Simulation", discoverId: this.discoverId, version: this.datasetVersion }; this.items.Simulations.push({ id: n, title: fp(t), type: "Simulation", thumbnail: o, userData: s, 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: fc(this.label), resource: o, datasetId: this.datasetId, title: "View image", name: fc(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; } }, gKe = { class: "full-size" }; function mKe(e, t, n, r, o, a) { const i = Ve("Gallery"); return S(), L("div", gKe, [ q(i, { 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 YK = /* @__PURE__ */ wa(vKe, [["render", mKe], ["__scopeId", "data-v-7b7e8d20"]]), XK = "3.7.7", yKe = XK, Vd = typeof Buffer == "function", S9 = typeof TextDecoder == "function" ? new TextDecoder() : void 0, $9 = typeof TextEncoder == "function" ? new TextEncoder() : void 0, bKe = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", Cp = Array.prototype.slice.call(bKe), Lv = ((e) => { let t = {}; return e.forEach((n, r) => t[n] = r), t; })(Cp), wKe = /^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/, $r = String.fromCharCode.bind(String), E9 = typeof Uint8Array.from == "function" ? Uint8Array.from.bind(Uint8Array) : (e) => new Uint8Array(Array.prototype.slice.call(e, 0)), ZK = (e) => e.replace(/=/g, "").replace(/[+\/]/g, (t) => t == "+" ? "-" : "_"), JK = (e) => e.replace(/[^A-Za-z0-9\+\/]/g, ""), QK = (e) => { let t, n, r, o, a = ""; const i = e.length % 3; for (let s = 0; s < e.length; ) { if ((n = e.charCodeAt(s++)) > 255 || (r = e.charCodeAt(s++)) > 255 || (o = e.charCodeAt(s++)) > 255) throw new TypeError("invalid character found"); t = n << 16 | r << 8 | o, a += Cp[t >> 18 & 63] + Cp[t >> 12 & 63] + Cp[t >> 6 & 63] + Cp[t & 63]; } return i ? a.slice(0, i - 3) + "===".substring(i) : a; }, O5 = typeof btoa == "function" ? (e) => btoa(e) : Vd ? (e) => Buffer.from(e, "binary").toString("base64") : QK, H_ = Vd ? (e) => Buffer.from(e).toString("base64") : (e) => { let t = []; for (let n = 0, r = e.length; n < r; n += 4096) t.push($r.apply(null, e.subarray(n, n + 4096))); return O5(t.join("")); }, xg = (e, t = !1) => t ? ZK(H_(e)) : H_(e), xKe = (e) => { if (e.length < 2) { var t = e.charCodeAt(0); return t < 128 ? e : t < 2048 ? $r(192 | t >>> 6) + $r(128 | t & 63) : $r(224 | t >>> 12 & 15) + $r(128 | t >>> 6 & 63) + $r(128 | t & 63); } else { var t = 65536 + (e.charCodeAt(0) - 55296) * 1024 + (e.charCodeAt(1) - 56320); return $r(240 | t >>> 18 & 7) + $r(128 | t >>> 12 & 63) + $r(128 | t >>> 6 & 63) + $r(128 | t & 63); } }, kKe = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g, eG = (e) => e.replace(kKe, xKe), O9 = Vd ? (e) => Buffer.from(e, "utf8").toString("base64") : $9 ? (e) => H_($9.encode(e)) : (e) => O5(eG(e)), Fc = (e, t = !1) => t ? ZK(O9(e)) : O9(e), F9 = (e) => Fc(e, !0), CKe = /[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g, _Ke = (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 $r((n >>> 10) + 55296) + $r((n & 1023) + 56320); case 3: return $r((15 & e.charCodeAt(0)) << 12 | (63 & e.charCodeAt(1)) << 6 | 63 & e.charCodeAt(2)); default: return $r((31 & e.charCodeAt(0)) << 6 | 63 & e.charCodeAt(1)); } }, tG = (e) => e.replace(CKe, _Ke), nG = (e) => { if (e = e.replace(/\s+/g, ""), !wKe.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 = Lv[e.charAt(a++)] << 18 | Lv[e.charAt(a++)] << 12 | (r = Lv[e.charAt(a++)]) << 6 | (o = Lv[e.charAt(a++)]), n += r === 64 ? $r(t >> 16 & 255) : o === 64 ? $r(t >> 16 & 255, t >> 8 & 255) : $r(t >> 16 & 255, t >> 8 & 255, t & 255); return n; }, F5 = typeof atob == "function" ? (e) => atob(JK(e)) : Vd ? (e) => Buffer.from(e, "base64").toString("binary") : nG, rG = Vd ? (e) => E9(Buffer.from(e, "base64")) : (e) => E9(F5(e).split("").map((t) => t.charCodeAt(0))), oG = (e) => rG(aG(e)), SKe = Vd ? (e) => Buffer.from(e, "base64").toString("utf8") : S9 ? (e) => S9.decode(rG(e)) : (e) => tG(F5(e)), aG = (e) => JK(e.replace(/[-_]/g, (t) => t == "-" ? "+" : "/")), U_ = (e) => SKe(aG(e)), $Ke = (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); }, iG = (e) => ({ value: e, enumerable: !1, writable: !0, configurable: !0 }), sG = function() { const e = (t, n) => Object.defineProperty(String.prototype, t, iG(n)); e("fromBase64", function() { return U_(this); }), e("toBase64", function(t) { return Fc(this, t); }), e("toBase64URI", function() { return Fc(this, !0); }), e("toBase64URL", function() { return Fc(this, !0); }), e("toUint8Array", function() { return oG(this); }); }, lG = function() { const e = (t, n) => Object.defineProperty(Uint8Array.prototype, t, iG(n)); e("toBase64", function(t) { return xg(this, t); }), e("toBase64URI", function() { return xg(this, !0); }), e("toBase64URL", function() { return xg(this, !0); }); }, EKe = () => { sG(), lG(); }, OKe = { version: XK, VERSION: yKe, atob: F5, atobPolyfill: nG, btoa: O5, btoaPolyfill: QK, fromBase64: U_, toBase64: Fc, encode: Fc, encodeURI: F9, encodeURL: F9, utob: eG, btou: tG, decode: U_, isValid: $Ke, fromUint8Array: xg, toUint8Array: oG, extendString: sG, extendUint8Array: lG, extendBuiltins: EKe }; function FKe(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 Bt = new FKe(), w0 = { "homo sapiens": "Human", "rattus norvegicus": "Rat", "mus musculus": "Mouse", "sus scrofa domesticus": "Pig", "sus scrofa": "Boar", "felis catus": "Cat" }, T9 = "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", TKe = { data() { return { ElIconView: z0 }; }, name: "DatasetCard", components: { BadgesGroup: aq, ImageGallery: YK, Button: so, Icon: Qt, CopyToClipboard: Ru }, props: { /** * Object containing information for * the required viewing. */ entry: { type: Object, default: () => { } }, envVars: { type: Object, default: () => { } } }, data: function() { return { thumbnail: T9, 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 && (w0[this.entry.species[0].toLowerCase()] ? e = `${w0[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) { Bt.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) { Bt.emit("PopoverActionClick", e), Bt.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 = T9, 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 o; const a = (o = r.biolucida) == null ? void 0 : o.identifier; if (a) { const i = "identifier" in r ? r.identifier : "", s = `https://sparc.biolucida.net/image?c=${encodeURIComponent(OKe.encode(`${a}-col-260`))}`; e.push({ share_link: s, image_id: a, sourcepkg_id: i }); } }), 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(); } } }, AKe = { class: "dataset-card-container", ref: "container" }, IKe = { class: "dataset-card", ref: "card" }, PKe = { class: "card" }, LKe = { class: "card-left" }, RKe = { class: "card-right" }, NKe = { class: "details" }, MKe = { class: "details" }, DKe = { key: 0, class: "details loading-icon" }, BKe = { class: "badges-container" }, zKe = { class: "float-button-container" }; function jKe(e, t, n, r, o, a) { const i = YK, s = so, l = aq, u = Ve("CopyToClipboard"), c = Rd; return S(), L("div", AKe, [ D("div", IKe, [ t[2] || (t[2] = D("div", { class: "seperator-path" }, null, -1)), Be((S(), L("div", PKe, [ D("span", LKe, [ !e.loading && e.discoverId ? (S(), re(i, { 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"])) : J("", !0) ]), D("div", RKe, [ D("div", { class: "title", onClick: t[0] || (t[0] = (...d) => a.cardClicked && a.cardClicked(...d)) }, ge(n.entry.name), 1), D("div", NKe, ge(a.contributors) + " " + ge(n.entry.publishDate ? `(${a.publishYear})` : ""), 1), D("div", MKe, ge(a.samples), 1), n.entry.detailsReady ? J("", !0) : Be((S(), L("div", DKe, null, 512)), [ [c, !n.entry.detailsReady] ]), D("div", null, [ n.entry.simulation ? (S(), re(s, { key: 0, onClick: a.openRepository, size: "small", class: "button", icon: o.ElIconView }, { default: N(() => t[1] || (t[1] = [ Oe("View repository") ])), _: 1 }, 8, ["onClick", "icon"])) : J("", !0) ]), D("div", BKe, [ q(l, { entry: n.entry, "dataset-biolucida": e.biolucidaData, onCategoryChanged: a.categoryChanged }, null, 8, ["entry", "dataset-biolucida", "onCategoryChanged"]) ]), D("div", zKe, [ q(u, { content: e.copyContent }, null, 8, ["content"]) ]) ]) ])), [ [c, e.loading] ]) ], 512) ], 512); } const uG = /* @__PURE__ */ wa(TKe, [["render", jKe], ["__scopeId", "data-v-8c3bc5e0"]]), A9 = 12; function I9() { 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 VKe = { name: "SearchHistory", components: { Tag: xu, Select: u1 }, props: { localStorageKey: { type: String, default: "" } }, data() { return { searchHistory: [], savedSearchHistory: [] }; }, mounted: function() { this.getSearchHistory(), Bt.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((n) => { let r = n.filters, o = e; r = r.sort(this.sortFilters), o = o.sort(this.sortFilters); const a = JSON.stringify(r), i = JSON.stringify(o); return n.search === t && a === i; })) { const { label: n, longLabel: r } = this.searchHistoryItemLabel(t, e); if (n || r) { const o = { filters: e, search: t, saved: !1, label: n, longLabel: r, id: I9(), updated: (/* @__PURE__ */ new Date()).getTime() }; this.searchHistory.push(o), 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 > A9) { const e = this.searchHistory.filter((r) => r.saved), t = this.searchHistory.filter((r) => !r.saved), n = A9 - this.searchHistory.length; this.searchHistory = [ ...e, ...t.slice(0, n) ]; } }, updateSearchHistory: function() { this.searchHistory.forEach((e) => { if (e.id || (e.id = I9()), !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 e, t; const n = ((e = this.localStorageKey) == null ? void 0 : e.indexOf("connectivity")) !== -1, r = ((t = this.localStorageKey) == null ? void 0 : t.indexOf("dataset")) !== -1; return n ? "connectivity" : r ? "dataset" : ""; }, search: function(e) { this.$emit("search", e); const t = this.getParentComponentName(); Bt.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((i) => i.facet !== "Show all"), a = o.map((i) => i.tagLabel || i.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(); Bt.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(); Bt.emit("trackEvent", { event_name: "portal_maps_search_history_removed", category: e.longLabel || e.label, location: `map_sidebar_${n}` }); } } }, HKe = { key: 0, class: "history-container" }, UKe = { key: 0, class: "saved-search-history" }, qKe = { key: 1 }, KKe = { class: "el-dropdown-select" }, GKe = ["onClick"], WKe = ["onClick"], YKe = { key: 0, viewBox: "0 0 24 24" }, XKe = { key: 1, viewBox: "0 0 24 24" }, ZKe = { key: 0 }, JKe = { key: 1 }, QKe = { key: 2 }; function eGe(e, t, n, r, o, a) { const i = Ch, s = xu, l = ma, u = Qt, c = so, d = Eg, p = cNe, h = dNe, f = uNe; return o.searchHistory.length ? (S(), L("div", HKe, [ o.savedSearchHistory.length ? (S(), L("div", UKe, [ (S(!0), L(Re, null, mt(o.savedSearchHistory, (v, m) => (S(), L(Re, { key: v.id }, [ m < 2 ? (S(), re(s, { class: "search-tag", key: m, onClick: (g) => a.search(v), size: "large" }, { default: N(() => [ v.longLabel ? (S(), re(i, { key: 0, width: "auto", trigger: "hover", "show-after": 200, persistent: !1, "popper-class": "popover-dropdown" }, { reference: N(() => [ Oe(ge(v.label), 1) ]), default: N(() => [ Oe(" " + ge(v.longLabel), 1) ]), _: 2 }, 1024)) : (S(), L(Re, { key: 1 }, [ Oe(ge(v.label), 1) ], 64)) ]), _: 2 }, 1032, ["onClick"])) : J("", !0) ], 64))), 128)) ])) : (S(), L("div", qKe, t[0] || (t[0] = [ D("span", { class: "empty-saved-search" }, "No Saved Searches", -1) ]))), q(f, { trigger: "click", "hide-on-click": !1 }, { dropdown: N(() => [ q(h, null, { default: N(() => [ (S(!0), L(Re, null, mt(o.searchHistory, (v) => (S(), re(p, { key: v.id }, { default: N(() => [ D("div", null, [ v.longLabel ? (S(), re(i, { key: 0, width: "auto", trigger: "hover", "show-after": 200, persistent: !1, "popper-class": "popover-dropdown" }, { reference: N(() => [ D("span", { class: "dropdown-clickable-item", onClick: (m) => a.search(v) }, ge(v.label), 9, GKe) ]), default: N(() => [ Oe(" " + ge(v.longLabel), 1) ]), _: 2 }, 1024)) : (S(), L("span", { key: 1, class: "dropdown-clickable-item", onClick: (m) => a.search(v) }, ge(v.label), 9, WKe)) ]), D("div", null, [ q(i, { width: "auto", trigger: "hover", "show-after": 200, persistent: !1, "popper-class": "popover-dropdown" }, { reference: N(() => [ q(c, { circle: "", text: "", size: "small", onClick: (m) => a.toggleSavedSearch(v), disabled: o.savedSearchHistory.length > 1 && !v.saved }, { default: N(() => [ q(u, { color: "#8300BF" }, { default: N(() => [ v.saved ? (S(), L("svg", YKe, t[2] || (t[2] = [ D("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) ]))) : (S(), L("svg", XKe, t[3] || (t[3] = [ D("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: N(() => [ o.savedSearchHistory.length > 1 && !v.saved ? (S(), L("span", ZKe, " Limit 2: Please remove a saved search before adding another. ")) : v.saved ? (S(), L("span", JKe, " Remove from saved searches. ")) : (S(), L("span", QKe, " Add up to two saved searches. ")) ]), _: 2 }, 1024), q(i, { width: "auto", trigger: "hover", "show-after": 200, persistent: !1, "popper-class": "popover-dropdown" }, { reference: N(() => [ q(c, { circle: "", text: "", size: "small", onClick: (m) => a.removeFromSavedSearch(v) }, { default: N(() => [ q(u, { color: "#8300BF" }, { default: N(() => [ q(d) ]), _: 1 }) ]), _: 2 }, 1032, ["onClick"]) ]), default: N(() => [ t[4] || (t[4] = D("span", null, " Remove from search history. ", -1)) ]), _: 2 }, 1024) ]) ]), _: 2 }, 1024))), 128)) ]), _: 1 }) ]), default: N(() => [ D("span", KKe, [ t[1] || (t[1] = Oe(" Search history ")), q(u, { class: "el-icon--right" }, { default: N(() => [ q(l) ]), _: 1 }) ]) ]), _: 1 }) ])) : J("", !0); } const A1 = /* @__PURE__ */ wa(VKe, [["render", eGe], ["__scopeId", "data-v-e1b89e20"]]), cG = (e, t) => { const n = e.__vccOpts || e; for (const [r, o] of t) n[r] = o; return n; }, tGe = ["xlink:href"], nGe = { __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) => (S(), L("svg", { class: H(["map-icon", { "map-icon-spin": e.spin }]) }, [ D("use", { "xlink:href": `#${e.icon}` }, null, 8, tGe) ], 2)); } }, dG = /* @__PURE__ */ cG(nGe, [["__scopeId", "data-v-e172d5ff"]]), pG = ` 2horpanel ? `, fG = ` 2vertpanel ? `, hG = ` 3panel ? `, vG = ` 4panel ? `, gG = ` 2horpanel ? `, mG = ` 2horpanel ? `, yG = ` 4panel ? `, bG = ` changeBckgd `, wG = ` close no bk `, xG = ` close `, kG = ` closeFullScreen `, CG = ` Comment `, _G = ` Connection `, SG = ` dock `, $G = ` drawLine `, EG = ` drawPoint `, OG = ` drawPolygon `, FG = ` drawTrash `, TG = ` fitWindow `, AG = ` fullScreen `, IG = 'DataPortal-Icons', PG = ` magnifyingGlass `, LG = `Created by Wahyu Prihantorofrom the Noun Project`, RG = ` openMap `, NG = ` Artboard Copy 6 `, MG = ` permalink `, DG = ` play `, BG = ` resetZoom `, zG = ` singlepanel ? `, jG = ` tooltips ? `, VG = ` undock `, HG = ` zoomIn `, UG = ` zoomOut `, qG = (e, t, n, r) => { const o = ["title", "desc", "defs", "style"], a = ["width", "height"], i = r || []; let s = document.createElement("div"); s.innerHTML = e, o.map((u) => { const c = s.querySelector(u); c && c.remove(); }), a.map((u) => { s.querySelector("svg").removeAttribute(u); }), r && i.map((u) => { Object.values(s.querySelectorAll(`[${u}]`)).map((c) => { c.removeAttribute(u); }); }); const l = s.innerHTML; return s = null, l; }, KG = (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(), rGe = !0, oGe = !0, aGe = ["fill"], P9 = /* @__PURE__ */ Object.assign({ "/assets/icons/2horpanel.svg": pG, "/assets/icons/2vertpanel.svg": fG, "/assets/icons/3panel.svg": hG, "/assets/icons/4panel.svg": vG, "/assets/icons/5panel.svg": gG, "/assets/icons/6panel.svg": mG, "/assets/icons/6panelVertical.svg": yG, "/assets/icons/changeBckgd.svg": bG, "/assets/icons/close-no-bk.svg": wG, "/assets/icons/close.svg": xG, "/assets/icons/closeFullScreen.svg": kG, "/assets/icons/comment.svg": CG, "/assets/icons/connection.svg": _G, "/assets/icons/dock.svg": SG, "/assets/icons/drawLine.svg": $G, "/assets/icons/drawPoint.svg": EG, "/assets/icons/drawPolygon.svg": OG, "/assets/icons/drawTrash.svg": FG, "/assets/icons/fitWindow.svg": TG, "/assets/icons/fullScreen.svg": AG, "/assets/icons/help.svg": IG, "/assets/icons/magnifyingGlass.svg": PG, "/assets/icons/noun-filter.svg": LG, "/assets/icons/openMap.svg": RG, "/assets/icons/pause.svg": NG, "/assets/icons/permalink.svg": MG, "/assets/icons/play.svg": DG, "/assets/icons/resetZoom.svg": BG, "/assets/icons/singlepanel.svg": zG, "/assets/icons/tooltips.svg": jG, "/assets/icons/undock.svg": VG, "/assets/icons/zoomIn.svg": HG, "/assets/icons/zoomOut.svg": UG }), iGe = Object.keys(P9).map((e) => { const t = qG(P9[e], rGe, oGe, aGe), n = e.replace(/^.+\/(\w+).svg$/, "$1"); return KG(t).replace("", "symbol>"); }); iGe.join(` `); const q_ = /* @__PURE__ */ Object.assign({ "/assets/icons/2horpanel.svg": pG, "/assets/icons/2vertpanel.svg": fG, "/assets/icons/3panel.svg": hG, "/assets/icons/4panel.svg": vG, "/assets/icons/5panel.svg": gG, "/assets/icons/6panel.svg": mG, "/assets/icons/6panelVertical.svg": yG, "/assets/icons/changeBckgd.svg": bG, "/assets/icons/close-no-bk.svg": wG, "/assets/icons/close.svg": xG, "/assets/icons/closeFullScreen.svg": kG, "/assets/icons/comment.svg": CG, "/assets/icons/connection.svg": _G, "/assets/icons/dock.svg": SG, "/assets/icons/drawLine.svg": $G, "/assets/icons/drawPoint.svg": EG, "/assets/icons/drawPolygon.svg": OG, "/assets/icons/drawTrash.svg": FG, "/assets/icons/fitWindow.svg": TG, "/assets/icons/fullScreen.svg": AG, "/assets/icons/help.svg": IG, "/assets/icons/magnifyingGlass.svg": PG, "/assets/icons/noun-filter.svg": LG, "/assets/icons/openMap.svg": RG, "/assets/icons/pause.svg": NG, "/assets/icons/permalink.svg": MG, "/assets/icons/play.svg": DG, "/assets/icons/resetZoom.svg": BG, "/assets/icons/singlepanel.svg": zG, "/assets/icons/tooltips.svg": jG, "/assets/icons/undock.svg": VG, "/assets/icons/zoomIn.svg": HG, "/assets/icons/zoomOut.svg": UG }), sGe = Object.keys(q_).map((e) => { const t = qG(q_[e]), n = e.replace(/^.+\/(\w+).svg$/, "$1"); return KG(t).replace("", "symbol>"); }), lGe = { name: "MapSvgSpriteColor", svgContext: q_, svgSprite: sGe.join(` `) // concatenate all symbols into $options.svgSprite }, uGe = ["innerHTML"]; function cGe(e, t, n, r, o, a) { return S(), L("svg", { width: "0", height: "0", style: { display: "none" }, innerHTML: e.$options.svgSprite }, null, 8, uGe); } const GG = /* @__PURE__ */ cG(lGe, [["render", cGe]]); var WG = { 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(); })(RLe, function() { function n(K, X, Q) { return X in K ? Object.defineProperty(K, X, { value: Q, enumerable: !0, configurable: !0, writable: !0 }) : K[X] = Q, K; } function r(K, X) { var Q = Object.keys(K); if (Object.getOwnPropertySymbols) { var ie = Object.getOwnPropertySymbols(K); X && (ie = ie.filter(function(xe) { return Object.getOwnPropertyDescriptor(K, xe).enumerable; })), Q.push.apply(Q, ie); } return Q; } function o(K) { for (var X = 1; X < arguments.length; X++) { var Q = arguments[X] != null ? arguments[X] : {}; X % 2 ? r(Object(Q), !0).forEach(function(ie) { n(K, ie, Q[ie]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(K, Object.getOwnPropertyDescriptors(Q)) : r(Object(Q)).forEach(function(ie) { Object.defineProperty(K, ie, Object.getOwnPropertyDescriptor(Q, ie)); }); } return K; } function a(K, X) { if (K == null) return {}; var Q, ie, xe = function(Je, Me) { if (Je == null) return {}; var Xe, pt, it = {}, At = Object.keys(Je); for (pt = 0; pt < At.length; pt++) Xe = At[pt], Me.indexOf(Xe) >= 0 || (it[Xe] = Je[Xe]); return it; }(K, X); if (Object.getOwnPropertySymbols) { var je = Object.getOwnPropertySymbols(K); for (ie = 0; ie < je.length; ie++) Q = je[ie], X.indexOf(Q) >= 0 || Object.prototype.propertyIsEnumerable.call(K, Q) && (xe[Q] = K[Q]); } return xe; } function i(K, X) { return function(Q) { if (Array.isArray(Q)) return Q; }(K) || function(Q, ie) { if (Symbol.iterator in Object(Q) || Object.prototype.toString.call(Q) === "[object Arguments]") { var xe = [], je = !0, Je = !1, Me = void 0; try { for (var Xe, pt = Q[Symbol.iterator](); !(je = (Xe = pt.next()).done) && (xe.push(Xe.value), !ie || xe.length !== ie); je = !0) ; } catch (it) { Je = !0, Me = it; } finally { try { je || pt.return == null || pt.return(); } finally { if (Je) throw Me; } } return xe; } }(K, X) || function() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }(); } function s(K) { return function(X) { if (Array.isArray(X)) { for (var Q = 0, ie = new Array(X.length); Q < X.length; Q++) ie[Q] = X[Q]; return ie; } }(K) || function(X) { if (Symbol.iterator in Object(X) || Object.prototype.toString.call(X) === "[object Arguments]") return Array.from(X); }(K) || function() { throw new TypeError("Invalid attempt to spread non-iterable instance"); }(); } function l(K) { var X, Q = "algoliasearch-client-js-".concat(K.key), ie = function() { return X === void 0 && (X = K.localStorage || window.localStorage), X; }, xe = function() { return JSON.parse(ie().getItem(Q) || "{}"); }, je = function(Me) { ie().setItem(Q, JSON.stringify(Me)); }, Je = function() { var Me = K.timeToLive ? 1e3 * K.timeToLive : null, Xe = xe(), pt = Object.fromEntries(Object.entries(Xe).filter(function(At) { return i(At, 2)[1].timestamp !== void 0; })); if (je(pt), Me) { var it = Object.fromEntries(Object.entries(pt).filter(function(At) { var Ft = i(At, 2)[1], Ut = (/* @__PURE__ */ new Date()).getTime(); return !(Ft.timestamp + Me < Ut); })); je(it); } }; return { get: function(Me, Xe) { var pt = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : { miss: function() { return Promise.resolve(); } }; return Promise.resolve().then(function() { Je(); var it = JSON.stringify(Me); return xe()[it]; }).then(function(it) { return Promise.all([it ? it.value : Xe(), it !== void 0]); }).then(function(it) { var At = i(it, 2), Ft = At[0], Ut = At[1]; return Promise.all([Ft, Ut || pt.miss(Ft)]); }).then(function(it) { return i(it, 1)[0]; }); }, set: function(Me, Xe) { return Promise.resolve().then(function() { var pt = xe(); return pt[JSON.stringify(Me)] = { timestamp: (/* @__PURE__ */ new Date()).getTime(), value: Xe }, ie().setItem(Q, JSON.stringify(pt)), Xe; }); }, delete: function(Me) { return Promise.resolve().then(function() { var Xe = xe(); delete Xe[JSON.stringify(Me)], ie().setItem(Q, JSON.stringify(Xe)); }); }, clear: function() { return Promise.resolve().then(function() { ie().removeItem(Q); }); } }; } function u(K) { var X = s(K.caches), Q = X.shift(); return Q === void 0 ? { get: function(ie, xe) { var je = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : { miss: function() { return Promise.resolve(); } }, Je = xe(); return Je.then(function(Me) { return Promise.all([Me, je.miss(Me)]); }).then(function(Me) { return i(Me, 1)[0]; }); }, set: function(ie, xe) { return Promise.resolve(xe); }, delete: function(ie) { return Promise.resolve(); }, clear: function() { return Promise.resolve(); } } : { get: function(ie, xe) { var je = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : { miss: function() { return Promise.resolve(); } }; return Q.get(ie, xe, je).catch(function() { return u({ caches: X }).get(ie, xe, je); }); }, set: function(ie, xe) { return Q.set(ie, xe).catch(function() { return u({ caches: X }).set(ie, xe); }); }, delete: function(ie) { return Q.delete(ie).catch(function() { return u({ caches: X }).delete(ie); }); }, clear: function() { return Q.clear().catch(function() { return u({ caches: X }).clear(); }); } }; } function c() { var K = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : { serializable: !0 }, X = {}; return { get: function(Q, ie) { var xe = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : { miss: function() { return Promise.resolve(); } }, je = JSON.stringify(Q); if (je in X) return Promise.resolve(K.serializable ? JSON.parse(X[je]) : X[je]); var Je = ie(), Me = xe && xe.miss || function() { return Promise.resolve(); }; return Je.then(function(Xe) { return Me(Xe); }).then(function() { return Je; }); }, set: function(Q, ie) { return X[JSON.stringify(Q)] = K.serializable ? JSON.stringify(ie) : ie, Promise.resolve(ie); }, delete: function(Q) { return delete X[JSON.stringify(Q)], Promise.resolve(); }, clear: function() { return X = {}, Promise.resolve(); } }; } function d(K, X, Q) { var ie = { "x-algolia-api-key": Q, "x-algolia-application-id": X }; return { headers: function() { return K === g.WithinHeaders ? ie : {}; }, queryParameters: function() { return K === g.WithinQueryParameters ? ie : {}; } }; } function p(K) { var X = 0; return K(function Q() { return X++, new Promise(function(ie) { setTimeout(function() { ie(K(Q)); }, Math.min(100 * X, 1e3)); }); }); } function h(K) { var X = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : function(Q, ie) { return Promise.resolve(); }; return Object.assign(K, { wait: function(Q) { return h(K.then(function(ie) { return Promise.all([X(ie, Q), ie]); }).then(function(ie) { return ie[1]; })); } }); } function f(K) { for (var X = K.length - 1; X > 0; X--) { var Q = Math.floor(Math.random() * (X + 1)), ie = K[X]; K[X] = K[Q], K[Q] = ie; } return K; } function v(K, X) { return X && Object.keys(X).forEach(function(Q) { K[Q] = X[Q](K); }), K; } function m(K) { for (var X = arguments.length, Q = new Array(X > 1 ? X - 1 : 0), ie = 1; ie < X; ie++) Q[ie - 1] = arguments[ie]; var xe = 0; return K.replace(/%s/g, function() { return encodeURIComponent(Q[xe++]); }); } var g = { WithinQueryParameters: 0, WithinHeaders: 1 }; function b(K, X) { var Q = K || {}, ie = Q.data || {}; return Object.keys(Q).forEach(function(xe) { ["timeout", "headers", "queryParameters", "data", "cacheable"].indexOf(xe) === -1 && (ie[xe] = Q[xe]); }), { data: Object.entries(ie).length > 0 ? ie : void 0, timeout: Q.timeout || X, headers: Q.headers || {}, queryParameters: Q.queryParameters || {}, cacheable: Q.cacheable }; } var x = { Read: 1, Write: 2, Any: 3 }, w = 1, k = 2, C = 3; function _(K) { var X = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : w; return o(o({}, K), {}, { status: X, lastUpdate: Date.now() }); } function $(K) { return typeof K == "string" ? { protocol: "https", url: K, accept: x.Any } : { protocol: K.protocol || "https", url: K.url, accept: K.accept || x.Any }; } var O = "DELETE", F = "GET", A = "POST", T = "PUT"; function R(K, X) { return Promise.all(X.map(function(Q) { return K.get(Q, function() { return Promise.resolve(_(Q)); }); })).then(function(Q) { var ie = Q.filter(function(Je) { return function(Me) { return Me.status === w || Date.now() - Me.lastUpdate > 12e4; }(Je); }), xe = Q.filter(function(Je) { return function(Me) { return Me.status === C && Date.now() - Me.lastUpdate <= 12e4; }(Je); }), je = [].concat(s(ie), s(xe)); return { getTimeout: function(Je, Me) { return (xe.length === 0 && Je === 0 ? 1 : xe.length + 3 + Je) * Me; }, statelessHosts: je.length > 0 ? je.map(function(Je) { return $(Je); }) : X }; }); } function M(K, X, Q, ie) { var xe = [], je = function(Ft, Ut) { if (!(Ft.method === F || Ft.data === void 0 && Ut.data === void 0)) { var Dt = Array.isArray(Ft.data) ? Ft.data : o(o({}, Ft.data), Ut.data); return JSON.stringify(Dt); } }(Q, ie), Je = function(Ft, Ut) { var Dt = o(o({}, Ft.headers), Ut.headers), mn = {}; return Object.keys(Dt).forEach(function(Ln) { var lo = Dt[Ln]; mn[Ln.toLowerCase()] = lo; }), mn; }(K, ie), Me = Q.method, Xe = Q.method !== F ? {} : o(o({}, Q.data), ie.data), pt = o(o(o({ "x-algolia-agent": K.userAgent.value }, K.queryParameters), Xe), ie.queryParameters), it = 0, At = function Ft(Ut, Dt) { var mn = Ut.pop(); if (mn === void 0) throw { name: "RetryError", message: "Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.", transporterStackTrace: G(xe) }; var Ln = { data: je, headers: Je, method: Me, url: V(mn, Q.path, pt), connectTimeout: Dt(it, K.timeouts.connect), responseTimeout: Dt(it, ie.timeout) }, lo = function(uo) { var jr = { request: Ln, response: uo, host: mn, triesLeft: Ut.length }; return xe.push(jr), jr; }, Ud = { onSuccess: function(uo) { return function(jr) { try { return JSON.parse(jr.content); } catch (Al) { throw /* @__PURE__ */ function(xs, Ju) { return { name: "DeserializationError", message: xs, response: Ju }; }(Al.message, jr); } }(uo); }, onRetry: function(uo) { var jr = lo(uo); return uo.isTimedOut && it++, Promise.all([K.logger.info("Retryable failure", se(jr)), K.hostsCache.set(mn, _(mn, uo.isTimedOut ? C : k))]).then(function() { return Ft(Ut, Dt); }); }, onFail: function(uo) { throw lo(uo), function(jr, Al) { var xs = jr.content, Ju = jr.status, qd = xs; try { qd = JSON.parse(xs).message; } catch { } return /* @__PURE__ */ function(M1, D1, vW) { return { name: "ApiError", message: M1, status: D1, transporterStackTrace: vW }; }(qd, Ju, Al); }(uo, G(xe)); } }; return K.requester.send(Ln).then(function(uo) { return function(jr, Al) { return function(xs) { var Ju = xs.status; return xs.isTimedOut || function(qd) { var M1 = qd.isTimedOut, D1 = qd.status; return !M1 && ~~D1 == 0; }(xs) || ~~(Ju / 100) != 2 && ~~(Ju / 100) != 4; }(jr) ? Al.onRetry(jr) : ~~(jr.status / 100) == 2 ? Al.onSuccess(jr) : Al.onFail(jr); }(uo, Ud); }); }; return R(K.hostsCache, X).then(function(Ft) { return At(s(Ft.statelessHosts).reverse(), Ft.getTimeout); }); } function j(K) { var X = K.hostsCache, Q = K.logger, ie = K.requester, xe = K.requestsCache, je = K.responsesCache, Je = K.timeouts, Me = K.userAgent, Xe = K.hosts, pt = K.queryParameters, it = { hostsCache: X, logger: Q, requester: ie, requestsCache: xe, responsesCache: je, timeouts: Je, userAgent: Me, headers: K.headers, queryParameters: pt, hosts: Xe.map(function(At) { return $(At); }), read: function(At, Ft) { var Ut = b(Ft, it.timeouts.read), Dt = function() { return M(it, it.hosts.filter(function(Ln) { return (Ln.accept & x.Read) != 0; }), At, Ut); }; if ((Ut.cacheable !== void 0 ? Ut.cacheable : At.cacheable) !== !0) return Dt(); var mn = { request: At, mappedRequestOptions: Ut, transporter: { queryParameters: it.queryParameters, headers: it.headers } }; return it.responsesCache.get(mn, function() { return it.requestsCache.get(mn, function() { return it.requestsCache.set(mn, Dt()).then(function(Ln) { return Promise.all([it.requestsCache.delete(mn), Ln]); }, function(Ln) { return Promise.all([it.requestsCache.delete(mn), Promise.reject(Ln)]); }).then(function(Ln) { var lo = i(Ln, 2); return lo[0], lo[1]; }); }); }, { miss: function(Ln) { return it.responsesCache.set(mn, Ln); } }); }, write: function(At, Ft) { return M(it, it.hosts.filter(function(Ut) { return (Ut.accept & x.Write) != 0; }), At, b(Ft, it.timeouts.write)); } }; return it; } function P(K) { var X = { value: "Algolia for JavaScript (".concat(K, ")"), add: function(Q) { var ie = "; ".concat(Q.segment).concat(Q.version !== void 0 ? " (".concat(Q.version, ")") : ""); return X.value.indexOf(ie) === -1 && (X.value = "".concat(X.value).concat(ie)), X; } }; return X; } function V(K, X, Q) { var ie = U(Q), xe = "".concat(K.protocol, "://").concat(K.url, "/").concat(X.charAt(0) === "/" ? X.substr(1) : X); return ie.length && (xe += "?".concat(ie)), xe; } function U(K) { return Object.keys(K).map(function(X) { return m("%s=%s", X, (Q = K[X], Object.prototype.toString.call(Q) === "[object Object]" || Object.prototype.toString.call(Q) === "[object Array]" ? JSON.stringify(K[X]) : K[X])); var Q; }).join("&"); } function G(K) { return K.map(function(X) { return se(X); }); } function se(K) { var X = K.request.headers["x-algolia-api-key"] ? { "x-algolia-api-key": "*****" } : {}; return o(o({}, K), {}, { request: o(o({}, K.request), {}, { headers: o(o({}, K.request.headers), X) }) }); } var ae = function(K) { return function(X, Q) { return K.transporter.write({ method: A, path: "2/abtests", data: X }, Q); }; }, de = function(K) { return function(X, Q) { return K.transporter.write({ method: O, path: m("2/abtests/%s", X) }, Q); }; }, me = function(K) { return function(X, Q) { return K.transporter.read({ method: F, path: m("2/abtests/%s", X) }, Q); }; }, te = function(K) { return function(X) { return K.transporter.read({ method: F, path: "2/abtests" }, X); }; }, oe = function(K) { return function(X, Q) { return K.transporter.write({ method: A, path: m("2/abtests/%s/stop", X) }, Q); }; }, ne = function(K) { return function(X) { return K.transporter.read({ method: F, path: "1/strategies/personalization" }, X); }; }, ee = function(K) { return function(X, Q) { return K.transporter.write({ method: A, path: "1/strategies/personalization", data: X }, Q); }; }; function Z(K) { return function X(Q) { return K.request(Q).then(function(ie) { if (K.batch !== void 0 && K.batch(ie.hits), !K.shouldStop(ie)) return ie.cursor ? X({ cursor: ie.cursor }) : X({ page: (Q.page || 0) + 1 }); }); }({}); } var le = function(K) { return function(X, Q) { var ie = Q || {}, xe = ie.queryParameters, je = a(ie, ["queryParameters"]), Je = o({ acl: X }, xe !== void 0 ? { queryParameters: xe } : {}); return h(K.transporter.write({ method: A, path: "1/keys", data: Je }, je), function(Me, Xe) { return p(function(pt) { return He(K)(Me.key, Xe).catch(function(it) { if (it.status !== 404) throw it; return pt(); }); }); }); }; }, pe = function(K) { return function(X, Q, ie) { var xe = b(ie); return xe.queryParameters["X-Algolia-User-ID"] = X, K.transporter.write({ method: A, path: "1/clusters/mapping", data: { cluster: Q } }, xe); }; }, ke = function(K) { return function(X, Q, ie) { return K.transporter.write({ method: A, path: "1/clusters/mapping/batch", data: { users: X, cluster: Q } }, ie); }; }, Ne = function(K) { return function(X, Q) { return h(K.transporter.write({ method: A, path: m("/1/dictionaries/%s/batch", X), data: { clearExistingDictionaryEntries: !0, requests: { action: "addEntry", body: [] } } }, Q), function(ie, xe) { return vn(K)(ie.taskID, xe); }); }; }, De = function(K) { return function(X, Q, ie) { return h(K.transporter.write({ method: A, path: m("1/indexes/%s/operation", X), data: { operation: "copy", destination: Q } }, ie), function(xe, je) { return we(K)(X, { methods: { waitTask: Wn } }).waitTask(xe.taskID, je); }); }; }, _e = function(K) { return function(X, Q, ie) { return De(K)(X, Q, o(o({}, ie), {}, { scope: [N1.Rules] })); }; }, Fe = function(K) { return function(X, Q, ie) { return De(K)(X, Q, o(o({}, ie), {}, { scope: [N1.Settings] })); }; }, Ie = function(K) { return function(X, Q, ie) { return De(K)(X, Q, o(o({}, ie), {}, { scope: [N1.Synonyms] })); }; }, Ae = function(K) { return function(X, Q) { return X.method === F ? K.transporter.read(X, Q) : K.transporter.write(X, Q); }; }, qe = function(K) { return function(X, Q) { return h(K.transporter.write({ method: O, path: m("1/keys/%s", X) }, Q), function(ie, xe) { return p(function(je) { return He(K)(X, xe).then(je).catch(function(Je) { if (Je.status !== 404) throw Je; }); }); }); }; }, et = function(K) { return function(X, Q, ie) { var xe = Q.map(function(je) { return { action: "deleteEntry", body: { objectID: je } }; }); return h(K.transporter.write({ method: A, path: m("/1/dictionaries/%s/batch", X), data: { clearExistingDictionaryEntries: !1, requests: xe } }, ie), function(je, Je) { return vn(K)(je.taskID, Je); }); }; }, He = function(K) { return function(X, Q) { return K.transporter.read({ method: F, path: m("1/keys/%s", X) }, Q); }; }, ot = function(K) { return function(X, Q) { return K.transporter.read({ method: F, path: m("1/task/%s", X.toString()) }, Q); }; }, tt = function(K) { return function(X) { return K.transporter.read({ method: F, path: "/1/dictionaries/*/settings" }, X); }; }, Qe = function(K) { return function(X) { return K.transporter.read({ method: F, path: "1/logs" }, X); }; }, I = function(K) { return function(X) { return K.transporter.read({ method: F, path: "1/clusters/mapping/top" }, X); }; }, Y = function(K) { return function(X, Q) { return K.transporter.read({ method: F, path: m("1/clusters/mapping/%s", X) }, Q); }; }, ve = function(K) { return function(X) { var Q = X || {}, ie = Q.retrieveMappings, xe = a(Q, ["retrieveMappings"]); return ie === !0 && (xe.getClusters = !0), K.transporter.read({ method: F, path: "1/clusters/mapping/pending" }, xe); }; }, we = function(K) { return function(X) { var Q = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, ie = { transporter: K.transporter, appId: K.appId, indexName: X }; return v(ie, Q.methods); }; }, ye = function(K) { return function(X) { return K.transporter.read({ method: F, path: "1/keys" }, X); }; }, Pe = function(K) { return function(X) { return K.transporter.read({ method: F, path: "1/clusters" }, X); }; }, Ce = function(K) { return function(X) { return K.transporter.read({ method: F, path: "1/indexes" }, X); }; }, ze = function(K) { return function(X) { return K.transporter.read({ method: F, path: "1/clusters/mapping" }, X); }; }, lt = function(K) { return function(X, Q, ie) { return h(K.transporter.write({ method: A, path: m("1/indexes/%s/operation", X), data: { operation: "move", destination: Q } }, ie), function(xe, je) { return we(K)(X, { methods: { waitTask: Wn } }).waitTask(xe.taskID, je); }); }; }, rt = function(K) { return function(X, Q) { return h(K.transporter.write({ method: A, path: "1/indexes/*/batch", data: { requests: X } }, Q), function(ie, xe) { return Promise.all(Object.keys(ie.taskID).map(function(je) { return we(K)(je, { methods: { waitTask: Wn } }).waitTask(ie.taskID[je], xe); })); }); }; }, fe = function(K) { return function(X, Q) { return K.transporter.read({ method: A, path: "1/indexes/*/objects", data: { requests: X } }, Q); }; }, Te = function(K) { return function(X, Q) { var ie = X.map(function(xe) { return o(o({}, xe), {}, { params: U(xe.params || {}) }); }); return K.transporter.read({ method: A, path: "1/indexes/*/queries", data: { requests: ie }, cacheable: !0 }, Q); }; }, Se = function(K) { return function(X, Q) { return Promise.all(X.map(function(ie) { var xe = ie.params, je = xe.facetName, Je = xe.facetQuery, Me = a(xe, ["facetName", "facetQuery"]); return we(K)(ie.indexName, { methods: { searchForFacetValues: I5 } }).searchForFacetValues(je, Je, o(o({}, Q), Me)); })); }; }, Ue = function(K) { return function(X, Q) { var ie = b(Q); return ie.queryParameters["X-Algolia-User-ID"] = X, K.transporter.write({ method: O, path: "1/clusters/mapping" }, ie); }; }, zt = function(K) { return function(X, Q, ie) { var xe = Q.map(function(je) { return { action: "addEntry", body: je }; }); return h(K.transporter.write({ method: A, path: m("/1/dictionaries/%s/batch", X), data: { clearExistingDictionaryEntries: !0, requests: xe } }, ie), function(je, Je) { return vn(K)(je.taskID, Je); }); }; }, Pt = function(K) { return function(X, Q) { return h(K.transporter.write({ method: A, path: m("1/keys/%s/restore", X) }, Q), function(ie, xe) { return p(function(je) { return He(K)(X, xe).catch(function(Je) { if (Je.status !== 404) throw Je; return je(); }); }); }); }; }, qt = function(K) { return function(X, Q, ie) { var xe = Q.map(function(je) { return { action: "addEntry", body: je }; }); return h(K.transporter.write({ method: A, path: m("/1/dictionaries/%s/batch", X), data: { clearExistingDictionaryEntries: !1, requests: xe } }, ie), function(je, Je) { return vn(K)(je.taskID, Je); }); }; }, Ht = function(K) { return function(X, Q, ie) { return K.transporter.read({ method: A, path: m("/1/dictionaries/%s/search", X), data: { query: Q }, cacheable: !0 }, ie); }; }, tn = function(K) { return function(X, Q) { return K.transporter.read({ method: A, path: "1/clusters/mapping/search", data: { query: X } }, Q); }; }, Dn = function(K) { return function(X, Q) { return h(K.transporter.write({ method: T, path: "/1/dictionaries/*/settings", data: X }, Q), function(ie, xe) { return vn(K)(ie.taskID, xe); }); }; }, hn = function(K) { return function(X, Q) { var ie = Object.assign({}, Q), xe = Q || {}, je = xe.queryParameters, Je = a(xe, ["queryParameters"]), Me = je ? { queryParameters: je } : {}, Xe = ["acl", "indexes", "referers", "restrictSources", "queryParameters", "description", "maxQueriesPerIPPerHour", "maxHitsPerQuery"]; return h(K.transporter.write({ method: T, path: m("1/keys/%s", X), data: Me }, Je), function(pt, it) { return p(function(At) { return He(K)(X, it).then(function(Ft) { return function(Ut) { return Object.keys(ie).filter(function(Dt) { return Xe.indexOf(Dt) !== -1; }).every(function(Dt) { if (Array.isArray(Ut[Dt]) && Array.isArray(ie[Dt])) { var mn = Ut[Dt]; return mn.length === ie[Dt].length && mn.every(function(Ln, lo) { return Ln === ie[Dt][lo]; }); } return Ut[Dt] === ie[Dt]; }); }(Ft) ? Promise.resolve() : At(); }); }); }); }; }, vn = function(K) { return function(X, Q) { return p(function(ie) { return ot(K)(X, Q).then(function(xe) { return xe.status !== "published" ? ie() : void 0; }); }); }; }, Pn = function(K) { return function(X, Q) { return h(K.transporter.write({ method: A, path: m("1/indexes/%s/batch", K.indexName), data: { requests: X } }, Q), function(ie, xe) { return Wn(K)(ie.taskID, xe); }); }; }, Bn = function(K) { return function(X) { return Z(o(o({ shouldStop: function(Q) { return Q.cursor === void 0; } }, X), {}, { request: function(Q) { return K.transporter.read({ method: A, path: m("1/indexes/%s/browse", K.indexName), data: Q }, X); } })); }; }, Cn = function(K) { return function(X) { var Q = o({ hitsPerPage: 1e3 }, X); return Z(o(o({ shouldStop: function(ie) { return ie.hits.length < Q.hitsPerPage; } }, Q), {}, { request: function(ie) { return P5(K)("", o(o({}, Q), ie)).then(function(xe) { return o(o({}, xe), {}, { hits: xe.hits.map(function(je) { return delete je._highlightResult, je; }) }); }); } })); }; }, hr = function(K) { return function(X) { var Q = o({ hitsPerPage: 1e3 }, X); return Z(o(o({ shouldStop: function(ie) { return ie.hits.length < Q.hitsPerPage; } }, Q), {}, { request: function(ie) { return L5(K)("", o(o({}, Q), ie)).then(function(xe) { return o(o({}, xe), {}, { hits: xe.hits.map(function(je) { return delete je._highlightResult, je; }) }); }); } })); }; }, or = function(K) { return function(X, Q, ie) { var xe = ie || {}, je = xe.batchSize, Je = a(xe, ["batchSize"]), Me = { taskIDs: [], objectIDs: [] }; return h(function Xe() { var pt, it = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0, At = []; for (pt = it; pt < X.length && (At.push(X[pt]), At.length !== (je || 1e3)); pt++) ; return At.length === 0 ? Promise.resolve(Me) : Pn(K)(At.map(function(Ft) { return { action: Q, body: Ft }; }), Je).then(function(Ft) { return Me.objectIDs = Me.objectIDs.concat(Ft.objectIDs), Me.taskIDs.push(Ft.taskID), pt++, Xe(pt); }); }(), function(Xe, pt) { return Promise.all(Xe.taskIDs.map(function(it) { return Wn(K)(it, pt); })); }); }; }, ar = function(K) { return function(X) { return h(K.transporter.write({ method: A, path: m("1/indexes/%s/clear", K.indexName) }, X), function(Q, ie) { return Wn(K)(Q.taskID, ie); }); }; }, nn = function(K) { return function(X) { var Q = X || {}, ie = Q.forwardToReplicas, xe = b(a(Q, ["forwardToReplicas"])); return ie && (xe.queryParameters.forwardToReplicas = 1), h(K.transporter.write({ method: A, path: m("1/indexes/%s/rules/clear", K.indexName) }, xe), function(je, Je) { return Wn(K)(je.taskID, Je); }); }; }, gn = function(K) { return function(X) { var Q = X || {}, ie = Q.forwardToReplicas, xe = b(a(Q, ["forwardToReplicas"])); return ie && (xe.queryParameters.forwardToReplicas = 1), h(K.transporter.write({ method: A, path: m("1/indexes/%s/synonyms/clear", K.indexName) }, xe), function(je, Je) { return Wn(K)(je.taskID, Je); }); }; }, Fn = function(K) { return function(X, Q) { return h(K.transporter.write({ method: A, path: m("1/indexes/%s/deleteByQuery", K.indexName), data: X }, Q), function(ie, xe) { return Wn(K)(ie.taskID, xe); }); }; }, vr = function(K) { return function(X) { return h(K.transporter.write({ method: O, path: m("1/indexes/%s", K.indexName) }, X), function(Q, ie) { return Wn(K)(Q.taskID, ie); }); }; }, Uo = function(K) { return function(X, Q) { return h(B(K)([X], Q).then(function(ie) { return { taskID: ie.taskIDs[0] }; }), function(ie, xe) { return Wn(K)(ie.taskID, xe); }); }; }, B = function(K) { return function(X, Q) { var ie = X.map(function(xe) { return { objectID: xe }; }); return or(K)(ie, Zu.DeleteObject, Q); }; }, ce = function(K) { return function(X, Q) { var ie = Q || {}, xe = ie.forwardToReplicas, je = b(a(ie, ["forwardToReplicas"])); return xe && (je.queryParameters.forwardToReplicas = 1), h(K.transporter.write({ method: O, path: m("1/indexes/%s/rules/%s", K.indexName, X) }, je), function(Je, Me) { return Wn(K)(Je.taskID, Me); }); }; }, Le = function(K) { return function(X, Q) { var ie = Q || {}, xe = ie.forwardToReplicas, je = b(a(ie, ["forwardToReplicas"])); return xe && (je.queryParameters.forwardToReplicas = 1), h(K.transporter.write({ method: O, path: m("1/indexes/%s/synonyms/%s", K.indexName, X) }, je), function(Je, Me) { return Wn(K)(Je.taskID, Me); }); }; }, We = function(K) { return function(X) { return Fl(K)(X).then(function() { return !0; }).catch(function(Q) { if (Q.status !== 404) throw Q; return !1; }); }; }, rn = function(K) { return function(X, Q, ie) { return K.transporter.read({ method: A, path: m("1/answers/%s/prediction", K.indexName), data: { query: X, queryLanguages: Q }, cacheable: !0 }, ie); }; }, Tn = function(K) { return function(X, Q) { var ie = Q || {}, xe = ie.query, je = ie.paginate, Je = a(ie, ["query", "paginate"]), Me = 0; return function Xe() { return A5(K)(xe || "", o(o({}, Je), {}, { page: Me })).then(function(pt) { for (var it = 0, At = Object.entries(pt.hits); it < At.length; it++) { var Ft = i(At[it], 2), Ut = Ft[0], Dt = Ft[1]; if (X(Dt)) return { object: Dt, position: parseInt(Ut, 10), page: Me }; } if (Me++, je === !1 || Me >= pt.nbPages) throw { name: "ObjectNotFoundError", message: "Object not found." }; return Xe(); }); }(); }; }, An = function(K) { return function(X, Q) { return K.transporter.read({ method: F, path: m("1/indexes/%s/%s", K.indexName, X) }, Q); }; }, un = function() { return function(K, X) { for (var Q = 0, ie = Object.entries(K.hits); Q < ie.length; Q++) { var xe = i(ie[Q], 2), je = xe[0]; if (xe[1].objectID === X) return parseInt(je, 10); } return -1; }; }, on = function(K) { return function(X, Q) { var ie = Q || {}, xe = ie.attributesToRetrieve, je = a(ie, ["attributesToRetrieve"]), Je = X.map(function(Me) { return o({ indexName: K.indexName, objectID: Me }, xe ? { attributesToRetrieve: xe } : {}); }); return K.transporter.read({ method: A, path: "1/indexes/*/objects", data: { requests: Je } }, je); }; }, qo = function(K) { return function(X, Q) { return K.transporter.read({ method: F, path: m("1/indexes/%s/rules/%s", K.indexName, X) }, Q); }; }, Fl = function(K) { return function(X) { return K.transporter.read({ method: F, path: m("1/indexes/%s/settings", K.indexName), data: { getVersion: 2 } }, X); }; }, Lh = function(K) { return function(X, Q) { return K.transporter.read({ method: F, path: m("1/indexes/%s/synonyms/%s", K.indexName, X) }, Q); }; }, Rh = function(K) { return function(X, Q) { return h(Nh(K)([X], Q).then(function(ie) { return { objectID: ie.objectIDs[0], taskID: ie.taskIDs[0] }; }), function(ie, xe) { return Wn(K)(ie.taskID, xe); }); }; }, Nh = function(K) { return function(X, Q) { var ie = Q || {}, xe = ie.createIfNotExists, je = a(ie, ["createIfNotExists"]), Je = xe ? Zu.PartialUpdateObject : Zu.PartialUpdateObjectNoCreate; return or(K)(X, Je, je); }; }, Ao = function(K) { return function(X, Q) { var ie = Q || {}, xe = ie.safe, je = ie.autoGenerateObjectIDIfNotExist, Je = ie.batchSize, Me = a(ie, ["safe", "autoGenerateObjectIDIfNotExist", "batchSize"]), Xe = function(Dt, mn, Ln, lo) { return h(K.transporter.write({ method: A, path: m("1/indexes/%s/operation", Dt), data: { operation: Ln, destination: mn } }, lo), function(Ud, uo) { return Wn(K)(Ud.taskID, uo); }); }, pt = Math.random().toString(36).substring(7), it = "".concat(K.indexName, "_tmp_").concat(pt), At = to({ appId: K.appId, transporter: K.transporter, indexName: it }), Ft = [], Ut = Xe(K.indexName, it, "copy", o(o({}, Me), {}, { scope: ["settings", "synonyms", "rules"] })); return Ft.push(Ut), h((xe ? Ut.wait(Me) : Ut).then(function() { var Dt = At(X, o(o({}, Me), {}, { autoGenerateObjectIDIfNotExist: je, batchSize: Je })); return Ft.push(Dt), xe ? Dt.wait(Me) : Dt; }).then(function() { var Dt = Xe(it, K.indexName, "move", Me); return Ft.push(Dt), xe ? Dt.wait(Me) : Dt; }).then(function() { return Promise.all(Ft); }).then(function(Dt) { var mn = i(Dt, 3), Ln = mn[0], lo = mn[1], Ud = mn[2]; return { objectIDs: lo.objectIDs, taskIDs: [Ln.taskID].concat(s(lo.taskIDs), [Ud.taskID]) }; }), function(Dt, mn) { return Promise.all(Ft.map(function(Ln) { return Ln.wait(mn); })); }); }; }, Hd = function(K) { return function(X, Q) { return L1(K)(X, o(o({}, Q), {}, { clearExistingRules: !0 })); }; }, Mh = function(K) { return function(X, Q) { return R1(K)(X, o(o({}, Q), {}, { clearExistingSynonyms: !0 })); }; }, Tl = function(K) { return function(X, Q) { return h(to(K)([X], Q).then(function(ie) { return { objectID: ie.objectIDs[0], taskID: ie.taskIDs[0] }; }), function(ie, xe) { return Wn(K)(ie.taskID, xe); }); }; }, to = function(K) { return function(X, Q) { var ie = Q || {}, xe = ie.autoGenerateObjectIDIfNotExist, je = a(ie, ["autoGenerateObjectIDIfNotExist"]), Je = xe ? Zu.AddObject : Zu.UpdateObject; if (Je === Zu.UpdateObject) { var Me = !0, Xe = !1, pt = void 0; try { for (var it, At = X[Symbol.iterator](); !(Me = (it = At.next()).done); Me = !0) if (it.value.objectID === void 0) return h(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 (Ft) { Xe = !0, pt = Ft; } finally { try { Me || At.return == null || At.return(); } finally { if (Xe) throw pt; } } } return or(K)(X, Je, je); }; }, P1 = function(K) { return function(X, Q) { return L1(K)([X], Q); }; }, L1 = function(K) { return function(X, Q) { var ie = Q || {}, xe = ie.forwardToReplicas, je = ie.clearExistingRules, Je = b(a(ie, ["forwardToReplicas", "clearExistingRules"])); return xe && (Je.queryParameters.forwardToReplicas = 1), je && (Je.queryParameters.clearExistingRules = 1), h(K.transporter.write({ method: A, path: m("1/indexes/%s/rules/batch", K.indexName), data: X }, Je), function(Me, Xe) { return Wn(K)(Me.taskID, Xe); }); }; }, oW = function(K) { return function(X, Q) { return R1(K)([X], Q); }; }, R1 = function(K) { return function(X, Q) { var ie = Q || {}, xe = ie.forwardToReplicas, je = ie.clearExistingSynonyms, Je = ie.replaceExistingSynonyms, Me = b(a(ie, ["forwardToReplicas", "clearExistingSynonyms", "replaceExistingSynonyms"])); return xe && (Me.queryParameters.forwardToReplicas = 1), (Je || je) && (Me.queryParameters.replaceExistingSynonyms = 1), h(K.transporter.write({ method: A, path: m("1/indexes/%s/synonyms/batch", K.indexName), data: X }, Me), function(Xe, pt) { return Wn(K)(Xe.taskID, pt); }); }; }, A5 = function(K) { return function(X, Q) { return K.transporter.read({ method: A, path: m("1/indexes/%s/query", K.indexName), data: { query: X }, cacheable: !0 }, Q); }; }, I5 = function(K) { return function(X, Q, ie) { return K.transporter.read({ method: A, path: m("1/indexes/%s/facets/%s/query", K.indexName, X), data: { facetQuery: Q }, cacheable: !0 }, ie); }; }, P5 = function(K) { return function(X, Q) { return K.transporter.read({ method: A, path: m("1/indexes/%s/rules/search", K.indexName), data: { query: X } }, Q); }; }, L5 = function(K) { return function(X, Q) { return K.transporter.read({ method: A, path: m("1/indexes/%s/synonyms/search", K.indexName), data: { query: X } }, Q); }; }, aW = function(K) { return function(X, Q) { var ie = Q || {}, xe = ie.forwardToReplicas, je = b(a(ie, ["forwardToReplicas"])); return xe && (je.queryParameters.forwardToReplicas = 1), h(K.transporter.write({ method: T, path: m("1/indexes/%s/settings", K.indexName), data: X }, je), function(Je, Me) { return Wn(K)(Je.taskID, Me); }); }; }, Wn = function(K) { return function(X, Q) { return p(function(ie) { return (/* @__PURE__ */ function(xe) { return function(je, Je) { return xe.transporter.read({ method: F, path: m("1/indexes/%s/task/%s", xe.indexName, je.toString()) }, Je); }; }(K))(X, Q).then(function(xe) { return xe.status !== "published" ? ie() : void 0; }); }); }; }, Zu = { AddObject: "addObject", UpdateObject: "updateObject", PartialUpdateObject: "partialUpdateObject", PartialUpdateObjectNoCreate: "partialUpdateObjectNoCreate", DeleteObject: "deleteObject", DeleteIndex: "delete", ClearIndex: "clear" }, N1 = { Settings: "settings", Synonyms: "synonyms", Rules: "rules" }, iW = 1, sW = 2, lW = 3, Dh = function(K) { return function(X, Q) { var ie = X.map(function(xe) { return o(o({}, xe), {}, { threshold: xe.threshold || 0 }); }); return K.transporter.read({ method: A, path: "1/indexes/*/recommendations", data: { requests: ie }, cacheable: !0 }, Q); }; }, uW = function(K) { return function(X, Q) { return Dh(K)(X.map(function(ie) { return o(o({}, ie), {}, { fallbackParameters: {}, model: "bought-together" }); }), Q); }; }, cW = function(K) { return function(X, Q) { return Dh(K)(X.map(function(ie) { return o(o({}, ie), {}, { model: "related-products" }); }), Q); }; }, dW = function(K) { return function(X, Q) { var ie = X.map(function(xe) { return o(o({}, xe), {}, { model: "trending-facets", threshold: xe.threshold || 0 }); }); return K.transporter.read({ method: A, path: "1/indexes/*/recommendations", data: { requests: ie }, cacheable: !0 }, Q); }; }, pW = function(K) { return function(X, Q) { var ie = X.map(function(xe) { return o(o({}, xe), {}, { model: "trending-items", threshold: xe.threshold || 0 }); }); return K.transporter.read({ method: A, path: "1/indexes/*/recommendations", data: { requests: ie }, cacheable: !0 }, Q); }; }, fW = function(K) { return function(X, Q) { return Dh(K)(X.map(function(ie) { return o(o({}, ie), {}, { model: "looking-similar" }); }), Q); }; }, hW = function(K) { return function(X, Q) { var ie = X.map(function(xe) { return o(o({}, xe), {}, { model: "recommended-for-you", threshold: xe.threshold || 0 }); }); return K.transporter.read({ method: A, path: "1/indexes/*/recommendations", data: { requests: ie }, cacheable: !0 }, Q); }; }; function R5(K, X, Q) { var ie, xe = { appId: K, apiKey: X, timeouts: { connect: 1, read: 2, write: 30 }, requester: { send: function(Me) { return new Promise(function(Xe) { var pt = new XMLHttpRequest(); pt.open(Me.method, Me.url, !0), Object.keys(Me.headers).forEach(function(Ut) { return pt.setRequestHeader(Ut, Me.headers[Ut]); }); var it, At = function(Ut, Dt) { return setTimeout(function() { pt.abort(), Xe({ status: 0, content: Dt, isTimedOut: !0 }); }, 1e3 * Ut); }, Ft = At(Me.connectTimeout, "Connection timeout"); pt.onreadystatechange = function() { pt.readyState > pt.OPENED && it === void 0 && (clearTimeout(Ft), it = At(Me.responseTimeout, "Socket timeout")); }, pt.onerror = function() { pt.status === 0 && (clearTimeout(Ft), clearTimeout(it), Xe({ content: pt.responseText || "Network request failed", status: pt.status, isTimedOut: !1 })); }, pt.onload = function() { clearTimeout(Ft), clearTimeout(it), Xe({ content: pt.responseText, status: pt.status, isTimedOut: !1 }); }, pt.send(Me.data); }); } }, logger: (ie = lW, { debug: function(Me, Xe) { return iW >= ie && console.debug(Me, Xe), Promise.resolve(); }, info: function(Me, Xe) { return sW >= ie && console.info(Me, Xe), Promise.resolve(); }, error: function(Me, Xe) { return console.error(Me, Xe), Promise.resolve(); } }), responsesCache: c(), requestsCache: c({ serializable: !1 }), hostsCache: u({ caches: [l({ key: "".concat("4.23.2", "-").concat(K) }), c()] }), userAgent: P("4.23.2").add({ segment: "Browser" }) }, je = o(o({}, xe), Q), Je = function() { return function(Me) { return function(Xe) { var pt = Xe.region || "us", it = d(g.WithinHeaders, Xe.appId, Xe.apiKey), At = j(o(o({ hosts: [{ url: "personalization.".concat(pt, ".algolia.com") }] }, Xe), {}, { headers: o(o(o({}, it.headers()), { "content-type": "application/json" }), Xe.headers), queryParameters: o(o({}, it.queryParameters()), Xe.queryParameters) })); return v({ appId: Xe.appId, transporter: At }, Xe.methods); }(o(o(o({}, xe), Me), {}, { methods: { getPersonalizationStrategy: ne, setPersonalizationStrategy: ee } })); }; }; return function(Me) { var Xe = Me.appId, pt = d(Me.authMode !== void 0 ? Me.authMode : g.WithinHeaders, Xe, Me.apiKey), it = j(o(o({ hosts: [{ url: "".concat(Xe, "-dsn.algolia.net"), accept: x.Read }, { url: "".concat(Xe, ".algolia.net"), accept: x.Write }].concat(f([{ url: "".concat(Xe, "-1.algolianet.com") }, { url: "".concat(Xe, "-2.algolianet.com") }, { url: "".concat(Xe, "-3.algolianet.com") }])) }, Me), {}, { headers: o(o(o({}, pt.headers()), { "content-type": "application/x-www-form-urlencoded" }), Me.headers), queryParameters: o(o({}, pt.queryParameters()), Me.queryParameters) })); return v({ transporter: it, appId: Xe, addAlgoliaAgent: function(At, Ft) { it.userAgent.add({ segment: At, version: Ft }); }, clearCache: function() { return Promise.all([it.requestsCache.clear(), it.responsesCache.clear()]).then(function() { }); } }, Me.methods); }(o(o({}, je), {}, { methods: { search: Te, searchForFacetValues: Se, multipleBatch: rt, multipleGetObjects: fe, multipleQueries: Te, copyIndex: De, copySettings: Fe, copySynonyms: Ie, copyRules: _e, moveIndex: lt, listIndices: Ce, getLogs: Qe, listClusters: Pe, multipleSearchForFacetValues: Se, getApiKey: He, addApiKey: le, listApiKeys: ye, updateApiKey: hn, deleteApiKey: qe, restoreApiKey: Pt, assignUserID: pe, assignUserIDs: ke, getUserID: Y, searchUserIDs: tn, listUserIDs: ze, getTopUserIDs: I, removeUserID: Ue, hasPendingMappings: ve, clearDictionaryEntries: Ne, deleteDictionaryEntries: et, getDictionarySettings: tt, getAppTask: ot, replaceDictionaryEntries: zt, saveDictionaryEntries: qt, searchDictionaryEntries: Ht, setDictionarySettings: Dn, waitAppTask: vn, customRequest: Ae, initIndex: function(Me) { return function(Xe) { return we(Me)(Xe, { methods: { batch: Pn, delete: vr, findAnswers: rn, getObject: An, getObjects: on, saveObject: Tl, saveObjects: to, search: A5, searchForFacetValues: I5, waitTask: Wn, setSettings: aW, getSettings: Fl, partialUpdateObject: Rh, partialUpdateObjects: Nh, deleteObject: Uo, deleteObjects: B, deleteBy: Fn, clearObjects: ar, browseObjects: Bn, getObjectPosition: un, findObject: Tn, exists: We, saveSynonym: oW, saveSynonyms: R1, getSynonym: Lh, searchSynonyms: L5, browseSynonyms: hr, deleteSynonym: Le, clearSynonyms: gn, replaceAllObjects: Ao, replaceAllSynonyms: Mh, searchRules: P5, getRule: qo, deleteRule: ce, saveRule: P1, saveRules: L1, replaceAllRules: Hd, browseRules: Cn, clearRules: nn } }); }; }, initAnalytics: function() { return function(Me) { return function(Xe) { var pt = Xe.region || "us", it = d(g.WithinHeaders, Xe.appId, Xe.apiKey), At = j(o(o({ hosts: [{ url: "analytics.".concat(pt, ".algolia.com") }] }, Xe), {}, { headers: o(o(o({}, it.headers()), { "content-type": "application/json" }), Xe.headers), queryParameters: o(o({}, it.queryParameters()), Xe.queryParameters) })); return v({ appId: Xe.appId, transporter: At }, Xe.methods); }(o(o(o({}, xe), Me), {}, { methods: { addABTest: ae, getABTest: me, getABTests: te, stopABTest: oe, deleteABTest: de } })); }; }, initPersonalization: Je, initRecommendation: function() { return function(Me) { return je.logger.info("The `initRecommendation` method is deprecated. Use `initPersonalization` instead."), Je()(Me); }; }, getRecommendations: Dh, getFrequentlyBoughtTogether: uW, getLookingSimilar: fW, getRecommendedForYou: hW, getRelatedProducts: cW, getTrendingFacets: dW, getTrendingItems: pW } })); } return R5.version = "4.23.2", R5; }); })(WG); var dGe = WG.exports; const pGe = /* @__PURE__ */ NLe(dGe), L9 = (e, t) => { const n = {}; return e.forEach((r) => { const o = r.split("."); if (o.length !== t) return; const a = r.substring(0, r.lastIndexOf(".")), i = o[o.length - 1]; Object.keys(n).includes(a) ? n[a].push(i) : n[a] = [i]; }), n; }; class YG { constructor(t, n, r = "https://api.pennsieve.io") { this.client = pGe( t, n ), this.PENNSIEVE_API_LOCATION = r, this.anatomyFacetLabels = []; } 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 i = [], s = 0; return n.map((l) => { const u = t.find((g) => g.facetPropPath == l); var c = []; const d = a.facets; if (d === void 0) return; const p = d[l] == null ? {} : d[l], h = u && d[u.facetSubpropPath] ? Object.keys(d[u.facetSubpropPath]) : [], f = u && u.facetSubsubpropPath && d[u.facetSubsubpropPath] ? Object.keys(d[u.facetSubsubpropPath]) : [], v = L9(h, 2), m = L9(f, 3); Object.keys(p).map((g) => { const b = []; Object.keys(v).includes(g) && v[g].forEach((w) => { const k = `${g}.${w}`, C = []; Object.keys(m).includes(k) && (m[k].forEach((_) => { C.push( { label: _, id: s++, facetPropPath: `${u ? u.facetSubsubpropPath : void 0}` } ); }), k === "nerves and ganglia.dorsal root ganglion" && C.push( { label: "Non specific", id: s++, facetPropPath: `${u ? u.facetSubsubpropPath : void 0}` } )), b.push( { label: w, id: s++, facetPropPath: `${u ? u.facetSubpropPath : void 0}`, children: C.length ? C : void 0 } ); }); let x = { label: g, id: s++, facetPropPath: l }; b.length > 0 && (x.children = b), c.push(x); }), c.length > 0 && i.push({ label: u ? u.label : "", id: s++, children: c, key: l }); }), i; }); } // 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) { let n = [], r = [], o = [], a = []; return t.forEach((i) => { i.item && i.item.keywords && i.item.keywords.forEach((s) => { let l = s.keyword.toUpperCase(); (l.includes("UBERON") || l.includes("ILX")) && n.push(this._processUberonURL(l)); }), i.anatomy && i.anatomy.organ && i.anatomy.organ.forEach((s) => { s.curie && (n.push(s.curie), r.push(s.name)); }); }), a = [...new Set(n)], o = [...new Set(r)], this.anatomyFacetLabels = o, a; } _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((i) => { let s = { items: this._processResultsForCards(i.hits), total: i.nbHits, discoverIds: i.hits.map((l) => l.pennsieve ? l.pennsieve.identifier : l.objectID), dois: i.hits.map((l) => l.item.curie.split(":")[1]) }; a(s); }); }); } /** * 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((i) => { a({ forFlatmap: this.processResultsForFlatmap(i.facets, i.hits), forScaffold: this.processResultsForScaffold(i.hits) }); }); }); } processResultsForFlatmap(t, n) { const r = this.filterAvailableAnatomies(t); return n.map((o) => ({ id: o.objectID, terms: o.anatomy ? o.anatomy.organ.map((a) => { if (r.includes(a.name.toLowerCase())) return a.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"], i = n ? Object.keys(n) : [], s = r ? Object.keys(r) : [], l = o ? Object.keys(o) : [], u = a ? Object.keys(a) : [], c = []; return s.forEach((d) => { const p = d.toLowerCase(); i.forEach((h) => { const f = h.toLowerCase(), v = `${p}.${f}`, m = [], g = l.some((b) => { const x = b.toLowerCase(); if (x === v) { const w = u.find((k) => k.toLocaleLowerCase().includes(x)); if (w) { const k = w.replace(`${x}.`, ""); i.map((C) => C.toLowerCase()).includes(k) && m.push(k); } return !0; } }); m.length && c.push(...m.map((b) => b.toLowerCase())), g && c.push(f); }); }), c; } 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 T5 = [ { 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: "Funding Program", id: "pennsieve.organization", facetPropPath: "pennsieve.organization.name", facetSubpropPath: "pennsieve.organization.subcategory.name" } ]; function R9(e = void 0) { if (e === void 0) return "NOT item.published.status:embargo"; e.forEach((r) => { r.label = r.facet3 ? r.facet3 : r.facet2 ? r.facet2 : r.facet; }); let t = XG(e); t.forEach((r) => { r.facet3 && r.facet3 === "Non specific" && (r.label = r.facet2); }); let n = "NOT item.published.status:embargo"; return n = `(${n}) AND `, T5.map( (r) => [r.facetPropPath, r.facetFilterPath] ).map(([r, o]) => { let a = t.filter( (l) => l.facetPropPath == r ), i = "", s = ""; a.map((l) => { let u = l.facetSubPropPath ? l.facetSubPropPath : o || r; l.AND ? s += `AND "${u}":"${l.label}"` : i += `"${u}":"${l.label}" OR `; }), !(i == "" && s == "") && (i = `(${i.substring(0, i.lastIndexOf(" OR "))})`, n += `${i + s} AND `, n = n.split("()AND ").join("")); }), n.substring(0, n.lastIndexOf(" AND ")); } function XG(e) { return e.filter((t) => t.label !== "Show all"); } const jp = function(e) { return e.charAt(0).toUpperCase() + e.slice(1); }, N9 = function(e) { const t = e.toLowerCase(); return w0[t] ? jp(w0[t]) : e === e.toUpperCase() ? e : jp(t); }, fGe = { name: "SearchFilters", components: { MapSvgIcon: dG, MapSvgSpriteColor: GG, Option: KE, Select: u1, Popover: Ch, Cascader: BU }, 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 = Go({}), t = Go({ 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) { e != null && e.length && e.forEach((r, o) => { if (e[o].facetPropPath !== "pennsieve.organization.name" && (e[o].label = N9( r.label )), r.key && t.key.includes("flatmap.connectivity.source.")) { const a = r.key, i = t.key, s = a.replace(`${i}.`, ""); e[o].value = this.createCascaderItemValue([t.label, s]); } else { const a = n.slice(); a.push(r.label), e[o].value = this.createCascaderItemValue(a), this.createChildrenCascaderValue(r.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() { this.options.forEach((e, t) => { this.options[t].total = this.countTotalFacet(e), this.options[t].label = N9(e.label), this.options[t].value = this.createCascaderItemValue( [e.key] ), this.options[t].children.find((n) => n.label === "Show all") || this.options[t].children.unshift({ value: this.createCascaderItemValue(["Show all"]), label: "Show all" }), e.key.includes("flatmap.connectivity.source") && this.options[t].children.unshift({ value: this.createCascaderItemValue(["ConnectivityFilters"]), label: "Filters", disabled: !0 }), this.createChildrenCascaderValue(this.options[t].children, e, [e.label]); }); }, 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(T5).then((t) => { this.facets = t, Bt.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, i] of Object.entries(t)) { const s = n.find((l) => l.label === a); if (Object.entries(i).length) { const l = s.key || r, u = this.flattenToEvents(e, i, s.children, l); o.push(...u); } else a !== e && o.push([r, s.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 i; this.correctnessCheck.facet2.add(a.label), (i = a.children) == null || i.map((s) => { this.correctnessCheck.facet3.add(s.label); }); }); }); }), this.cascaderTags = {}, this.cascaderTagsClone = {}, this.presentTags = [], e.map((t) => { const { facet: n, facet2: r, facet3: o, term: a, tagLabel: i, facetPropPath: s } = t; let l = n, u = ""; s && s.includes("flatmap.connectivity.source.") && i && (l = i, u = 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] = {}, u ? this.cascaderTagsClone[a][u + ":" + 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((t, n) => (t = typeof t == "number" ? t : t.children.length, t + n.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((i) => i.label === "Show all")[0].value, a = n.total; t[r] === a && (e = e.filter((i) => i[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, r = (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 s = t.filter((u) => u[i] == this.__expandItem__[i]), l = t.filter((u) => u[i] !== this.__expandItem__[i]); t = [...s, ...l]; } let o = t.filter((i) => i !== void 0).map((i) => { let { hString: s, bString: l } = this.findHierarachyStringAndBooleanString(i), { facet: u, facet2: c, facet3: d, term: p } = this.getFacetsFromHierarchyString(s); const h = r.find( (v) => i.join() === v.pathValues.join() ), f = h ? h.label : void 0; return { facetPropPath: i[0], facet: u, facet2: c, facet3: d, term: p, AND: l, // for setting the boolean tagLabel: f // for connectivity filter's cascader tag }; }), a = t.filter((i) => i !== void 0).map((i) => { let s = i[0].includes("duplicate") ? i[0].split("duplicate")[0] : i[0], { hString: l, bString: u } = this.findHierarachyStringAndBooleanString(i), { facet: c, facet2: d, facet3: p, term: h } = this.getFacetsFromHierarchyString(l); p ? p === "Non specific" ? c = d : c = p : d && (c = d); const f = r.find( (m) => i.join() === m.pathValues.join() ), v = f ? f.label : void 0; return { facetPropPath: s, facet: c, term: h, AND: u, // for setting the boolean tagLabel: v // for connectivity filter's cascader tag }; }); this.filterTimeout && clearTimeout(this.filterTimeout), this.$emit("loading", !0), this.setCascader(o), this.filterTimeout = setTimeout(() => { this.$emit("filterResults", a), 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((t) => t ? t[1].toLowerCase().includes("show all") : !1).includes(!0)) { let t = [], n = {}; for (const r in e) n[e[r][0]] === void 0 && (n[e[r][0]] = []), n[e[r][0]].push(e[r]); for (const r in n) { let o; for (let a = n[r].length - 1; a >= 0; a--) if (n[r][a][1].toLowerCase().includes("show all")) { o = n[r].splice(a, 1)[0]; break; } o ? this.previousShowAllChecked[r] && n[r].length > 0 ? t.push(...n[r]) : t.push(o) : t.push(...n[r]); } return t.sort((r, o) => this.__expandItem__ ? r[0] == this.__expandItem__ ? o[0] == this.__expandItem__ ? 0 : -1 : o[0] == this.__expandItem__ ? r[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]; n && (n.closest(".el-cascader-menu__list").querySelectorAll(".el-cascader-node").forEach((r, o) => { o > 1 && (r.querySelector(".el-cascader-node__label").textContent.toLowerCase().includes(t.toLowerCase()) ? r.classList.remove("hide") : r.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([jp(n.term), n.facet]) ]; return n.facet2 && (r.push( this.createCascaderItemValue([jp(n.term), n.facet, n.facet2]) ), n.facet3 && r.push( this.createCascaderItemValue([jp(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 i of t) { const s = e.facetPropPath.includes("flatmap.connectivity.source.") && i.key, l = s ? i.key.replace(`${e.facetPropPath}.`, "").toLowerCase() === o : i.label.toLowerCase() === o; if (i.children && i.children.length) { const u = l || n, c = this.flattenToFilters(e, i.children, u); r.push(...c); } else if (i.facetPropPath || i.key) { const [u, c, d, p] = i.value.split(">"); p === "Non specific" && (a = !0); const h = { term: u, facet: c, facetPropPath: e.facetPropPath, ...d && { facet2: d }, ...p && { facet3: p } }; "AND" in e && (h.AND = e.AND), (n || l) && (s ? r.push(e) : r.push(h)); } } n && a && (r = r.filter((i) => !i.facet3 || i.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((i) => { t.push(i), n.push(i.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 = Go(new YG( this.envVars.ALGOLIA_ID, this.envVars.ALGOLIA_KEY, this.envVars.PENNSIEVE_API_LOCATION )), this.algoliaClient.initIndex(this.envVars.ALGOLIA_INDEX)), this.populateCascader().then(() => { this.cascaderIsReady = !0, this.checkShowAllBoxes(), this.setCascader(this.entry.filterFacets), this.cssMods(), this.$emit("cascaderReady"); }); } }, hGe = { class: "filters" }, vGe = { key: 0 }, gGe = { key: 0, class: "cascader-tag" }, mGe = { class: "el-tags-container" }, yGe = { class: "el-tags-container" }, bGe = { class: "search-filters transition-box" }, wGe = { key: 0 }, xGe = { class: "sidebar-cascader-search el-input" }, kGe = { class: "el-input__wrapper" }, CGe = ["value", "onInput"], _Ge = { key: 1 }, SGe = { key: 0, class: "sr-only" }, $Ge = { key: 0, class: "filter-default-value" }, EGe = { class: "dataset-shown" }, OGe = { class: "dataset-results-feedback" }; function FGe(e, t, n, r, o, a) { const i = Ve("MapSvgSpriteColor"), s = xu, l = Ch, u = zE, c = BE, d = BU, p = Ve("MapSvgIcon"), h = KE, f = u1, v = Rd; return S(), L("div", hGe, [ q(i), a.showFilters && e.options.length > 0 ? (S(), L("div", vGe, [ e.presentTags.length > 0 ? (S(), L("div", gGe, [ q(s, { class: "ml-2", type: "info", closable: "", onClose: t[0] || (t[0] = (m) => a.cascadeTagClose(e.presentTags[0])) }, { default: N(() => [ D("span", { class: H(["tag-text", a.modifyCascaderTagStyle(e.presentTags[0])]) }, ge(e.presentTags[0]), 3) ]), _: 1 }), e.presentTags.length > 1 ? (S(), re(l, { key: 0, placement: "bottom-start", width: 250, trigger: "hover", "popper-class": "cascade-tags-popover" }, { default: N(() => [ D("div", mGe, [ (S(!0), L(Re, null, mt(e.presentTags.slice(1), (m, g) => (S(), re(s, { key: g, class: H(["ml-2", a.modifyCascaderTagStyle(m)]), type: "info", closable: "", onClose: (b) => a.cascadeTagClose(m) }, { default: N(() => [ Oe(ge(m), 1) ]), _: 2 }, 1032, ["class", "onClose"]))), 128)) ]) ]), reference: N(() => [ D("div", yGe, [ e.presentTags.length > 1 ? (S(), re(s, { key: 0, class: "ml-2", type: "info" }, { default: N(() => [ Oe(" +" + ge(e.presentTags.length - 1), 1) ]), _: 1 })) : J("", !0) ]) ]), _: 1 })) : J("", !0) ])) : J("", !0), q(nr, { name: "el-zoom-in-top" }, { default: N(() => [ Be((S(), L("span", bGe, [ q(d, { 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: N(({ node: m, data: g }) => [ a.isFlatmapConnectionsFilterNode(m) ? (S(), L("div", wGe, [ D("div", xGe, [ D("div", kGe, [ D("input", { class: "el-input__inner", ref: "searchInput_" + m.pathValues[0], value: e.searchInputs[m.pathValues[0]], onInput: (b) => a.searchInputChange(b, m), onFocus: t[1] || (t[1] = (b) => a.searchInputFocusToggle(b, !0)), onBlur: t[2] || (t[2] = (b) => a.searchInputFocusToggle(b, !1)), style: { width: "100%" }, autocomplete: "off", placeholder: "Search" }, null, 40, CGe) ]) ]) ])) : (S(), L("div", _Ge, [ q(c, null, { default: N(() => [ a.hasLineStyles(g) ? (S(), re(u, { key: 0, span: 4 }, { default: N(() => [ D("div", { class: "path-visual", style: Ye(a.getLineStyles(g)) }, null, 4) ]), _: 2 }, 1024)) : J("", !0), q(u, { span: 20 }, { default: N(() => [ a.isFlatmapConnectionsNode(m) ? (S(), L("span", SGe, ge(a.getNodeKey(m.value)), 1)) : J("", !0), D("div", { style: Ye(a.getBackgroundStyles(g)) }, ge(g.label), 5) ]), _: 2 }, 1024) ]), _: 2 }, 1024) ])) ]), _: 1 }, 8, ["modelValue", "options", "props", "onExpandChange"]), e.showFiltersText ? (S(), L("div", $Ge, "Filters")) : J("", !0), q(l, { title: "How do filters work?", width: "250", trigger: "hover", "popper-class": "filter-help-popover" }, { reference: N(() => [ q(p, { icon: "help", class: "help" }) ]), default: N(() => [ D("div", null, [ t[7] || (t[7] = D("strong", null, "Within categories:", -1)), t[8] || (t[8] = Oe(" OR ")), t[9] || (t[9] = D("br", null, null, -1)), Oe(" example: " + ge(n.entry.helper.within) + " ", 1), t[10] || (t[10] = D("br", null, null, -1)), t[11] || (t[11] = D("br", null, null, -1)), t[12] || (t[12] = D("strong", null, "Between categories:", -1)), t[13] || (t[13] = Oe(" AND ")), t[14] || (t[14] = D("br", null, null, -1)), Oe(" example: " + ge(n.entry.helper.between), 1) ]) ]), _: 1 }) ])), [ [v, !e.cascaderIsReady] ]) ]), _: 1 }) ])) : J("", !0), D("div", EGe, [ D("span", OGe, ge(a.numberOfResultsText), 1), q(f, { 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: N(() => [ (S(!0), L(Re, null, mt(e.numberDatasetsShown, (m) => (S(), re(h, { key: m, label: m, value: m }, null, 8, ["label", "value"]))), 128)) ]), _: 1 }, 8, ["modelValue"]) ]) ]); } const I1 = /* @__PURE__ */ wa(fGe, [["render", FGe], ["__scopeId", "data-v-f5d573d2"]]); var TGe = async function(e) { if (!e.ok) { let t = await e.json(); throw t ? new Error(t.message) : new Error(e); } return e; }, AGe = { searchInput: "", lastSearch: "", results: [], numberOfHits: 0, filter: [], loadingCards: !1, numberPerPage: 10, page: 1, pageModel: 1, start: 0, hasSearched: !1, contextCardEnabled: !1 }; const IGe = { components: { SearchFilters: I1, DatasetCard: uG, SearchHistory: A1, Button: so, Card: i1, Drawer: jE, Icon: Qt, Input: Pd, Pagination: c1 }, name: "DatasetExplorer", props: { visible: { type: Boolean, default: !1 }, isDrawer: { type: Boolean, default: !0 }, entry: { type: Object, default: () => AGe }, 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) => { oq({ 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" }), Bt.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(R9(e), t).then((n) => { Bt.emit("anatomy-in-datasets", n.forFlatmap), Bt.emit("number-of-datasets-for-anatomies", n.forScaffold); }), this.algoliaClient.search(R9(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, Bt.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 || Bt.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 n = this._dois.shift(); n && (t.count++, this.callSciCrunch(this.envVars.API_LOCATION, { dois: [n] }, e).then((r) => { r.numberOfHits === 0 ? this.handleMissingData(n) : this.resultsProcessing(r), this.$refs.content.style["overflow-y"] = "scroll", t.count--, this.perItemSearch(e, t); }).catch((r) => { r.name !== "AbortError" && (this.handleMissingData(n), 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"], simulation: t["abi-simulation-omex-file"] ? t["abi-simulation-omex-file"] : t["abi-simulation-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(TGe).then((i) => i.json()).then((i) => r(i)).catch((i) => o(i)); }); }, getAlgoliaFacets: async function() { return await this.algoliaClient.getAlgoliaFacets( T5 ); }, 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((e) => e.facet.toLowerCase() !== "show all") ? this.filter : []; } }, mounted: function() { this.algoliaClient = Go(new YG( 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/"; } }, PGe = { class: "header" }, LGe = { class: "content scrollbar", ref: "content" }, RGe = { key: 0, class: "error-feedback" }; function NGe(e, t, n, r, o, a) { const i = Pd, s = so, l = I1, u = A1, c = uG, d = c1, p = i1, h = Rd; return S(), re(p, { "body-style": e.bodyStyle, class: "content-card" }, { header: N(() => [ D("div", PGe, [ q(i, { class: "search-input", placeholder: "Search", modelValue: e.searchInput, "onUpdate:modelValue": t[0] || (t[0] = (f) => e.searchInput = f), onKeyup: a.searchEvent, clearable: "", onClear: a.clearSearchClicked }, null, 8, ["modelValue", "onKeyup", "onClear"]), q(s, { type: "primary", class: "button", onClick: a.searchEvent, size: "large" }, { default: N(() => t[3] || (t[3] = [ Oe(" Search ") ])), _: 1 }, 8, ["onClick"]), q(s, { link: "", class: "el-button-link", onClick: a.onResetClick, size: "large" }, { default: N(() => t[4] || (t[4] = [ Oe(" Reset ") ])), _: 1 }, 8, ["onClick"]) ]) ]), default: N(() => [ q(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"]), q(u, { ref: "searchHistory", localStorageKey: "sparc.science-dataset-search-history", onSearch: a.searchHistorySearch }, null, 8, ["onSearch"]), Be((S(), L("div", LGe, [ e.results.length === 0 && !e.loadingCards ? (S(), L("div", RGe, " No results found - Please change your search / filter criteria. ")) : J("", !0), (S(!0), L(Re, null, mt(e.results, (f) => (S(), L("div", { key: f.doi, class: "step-item" }, [ q(c, { class: "dataset-card", entry: f, envVars: n.envVars, onMouseenter: (v) => a.hoverChanged(f), onMouseleave: t[1] || (t[1] = (v) => a.hoverChanged(void 0)) }, null, 8, ["entry", "envVars", "onMouseenter"]) ]))), 128)), q(d, { class: "pagination", "current-page": e.page, "onUpdate:currentPage": t[2] || (t[2] = (f) => e.page = f), "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"]) ])), [ [h, e.loadingCards] ]) ]), _: 1 }, 8, ["body-style"]); } const ZG = /* @__PURE__ */ wa(IGe, [["render", NGe], ["__scopeId", "data-v-68235ba7"]]), MGe = (e) => e.replace(/\w\S*/g, (t) => t.charAt(0).toUpperCase() + t.substr(1).toLowerCase()), hp = function(e) { return e ? e.charAt(0).toUpperCase() + e.slice(1) : ""; }, DGe = { name: "ConnectivityInfo", components: { Button: so, Container: i9e, Icon: Qt, ElIconWarning: j0, ElIconLocation: hN, ElIconSearch: B0, ExternalResourceCard: $$e, CopyToClipboard: Ru, ConnectivityGraph: wSe, ConnectivityList: USe }, 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 MGe(e); }, capitalise: function(e) { return hp(e); }, showConnectivity: function() { const e = this.entry.featureId || []; this.$emit("show-connectivity", e), Bt.emit("trackEvent", { event_name: "portal_maps_show_connectivity_on_map", category: this.entry.id || "", location: "map_sidebar_connectivity" }); }, onCopied: function() { Bt.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; }), Bt.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 t, n, r, o, a; if (!this.entry) return ""; const i = []; let s = this.entry.title, l = this.entry.featureId; const u = []; s && u.push(`${hp(this.entry.title)}`), l != null && l.length && (typeof l == "object" ? u.push(`(${l[0]})`) : u.push(`(${l})`)), i.push(`
    ${u.join(" ")}
    `), (t = this.entry.provenanceTaxonomyLabel) != null && t.length && i.push(`
    ${this.provSpeciesDescription}
    `), this.entry.paths && i.push(`
    ${this.entry.paths}
    `); function c(d, p, h = []) { let f = `
    ${d}
    `; const v = []; p.forEach((g) => { let b = []; g.split(",").forEach((x) => { const w = h.find((k) => k.name === x.trim()); w ? b.push(`${hp(x)} (${w.id})`) : b.push(`${hp(x)}`); }), v.push(b.join(",")); }); const m = v.map((g) => `
  • ${g}
  • `).join(` `); return f += ` `, f += `
      ${m}
    `, f; } if ((n = this.entry["nerve-label"]) != null && n.length) { const d = "Nerves", p = this.entry["nerve-label"].map((f) => Object.values(f)).flat(1 / 0), h = c(d, p); i.push(h); } if ((r = this.origins) != null && r.length) { const d = "Origin", p = this.origins, h = this.originsWithDatasets, f = c(d, p, h); i.push(f); } if ((o = this.components) != null && o.length) { const d = "Components", p = this.components, h = this.componentsWithDatasets, f = c(d, p, h); i.push(f); } if ((a = this.destinations) != null && a.length) { const d = "Destination", p = this.destinations, h = this.destinationsWithDatasets, f = c(d, p, h); i.push(f); } if (e) { let d = "
    References
    "; d += ` `; const p = e.list.map((h) => `
  • ${h}
  • `).join(` `); d += `
      ${p}
    `, i.push(d); } return i.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( (i) => i.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((r) => hp(r.label)).join(", ").replace(/, ([^,]*)$/, " and $1"), errorMessage: n }; }, onConnectivitySourceChange: function(e) { this.connectivityLoading = !0, this.activeView !== "graphView" && (this.graphViewLoaded = !1), this.updateGraphConnectivity(), Bt.emit("connectivity-source-change", { entry: this.entry, connectivitySource: e }), Bt.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 Bt.emit("connectivity-source-change", { entry: this.entry, connectivitySource: "sckan" }), new Error(t); } } }, onConnectivityActionClick: function(e) { Bt.emit("onConnectivityActionClick", e); }, closeConnectivity: function() { this.$emit("close-connectivity"), Bt.emit("trackEvent", { event_name: "portal_maps_connectivity_close", category: this.entry.id || "", location: "map_sidebar_connectivity" }); }, onTrackEvent: function(e) { Bt.emit("trackEvent", e); } }, mounted: function() { this.updatedCopyContent = this.getUpdateCopyContent(), Bt.on("connectivity-error", (e) => { const t = this.getConnectivityError(e); this.connectivityError = { ...t }; }); } }, BGe = { key: 0, class: "main" }, zGe = { class: "connectivity-info-title" }, jGe = { class: "title-content" }, VGe = { key: 0, class: "block" }, HGe = { class: "title" }, UGe = { style: { "word-break": "keep-all" } }, qGe = { class: "subtitle" }, KGe = { key: 0, class: "subtitle" }, GGe = { key: 1, class: "block" }, WGe = { class: "title" }, YGe = { class: "title-buttons" }, XGe = { class: "content-container population-display" }, ZGe = { class: "block attribute-title-container" }, JGe = { class: "block buttons-row" }, QGe = { key: 0, class: "block" }, eWe = ["origin-item-label"], tWe = ["origin-item-label", "onMouseenter"], nWe = { class: "content-container content-container-connectivity" }, rWe = { class: "content-container content-container-connectivity" }, oWe = { key: 1, class: "content-container content-container-references" }; function aWe(e, t, n, r, o, a) { const i = EQ, s = Qt, l = Ch, u = hN, c = so, d = Ve("CopyToClipboard"), p = Bo, h = j0, f = MU, v = dRe, m = B0, g = Ve("connectivity-list"), b = Ve("connectivity-graph"), x = Ve("ExternalResourceCard"), w = Rd; return a.entry ? (S(), L("div", BGe, [ D("div", zGe, [ D("div", jGe, [ a.entry.title ? (S(), L("div", VGe, [ D("div", HGe, [ D("span", null, ge(a.capitalise(a.entry.title)), 1), a.entry.featuresAlert ? (S(), re(l, { key: 0, width: "250", trigger: "hover", teleported: !1, "popper-class": "popover-origin-help" }, { reference: N(() => [ q(s, { class: "alert" }, { default: N(() => [ q(i) ]), _: 1 }) ]), default: N(() => [ D("span", UGe, ge(a.entry.featuresAlert), 1) ]), _: 1 })) : J("", !0) ]), D("div", qGe, [ t[4] || (t[4] = D("strong", null, "id: ", -1)), Oe(ge(a.entry.featureId[0]), 1) ]), a.hasProvenanceTaxonomyLabel ? (S(), L("div", KGe, ge(a.provSpeciesDescription), 1)) : J("", !0) ])) : (S(), L("div", GGe, [ D("div", WGe, ge(a.entry.featureId), 1) ])) ]), D("div", YGe, [ q(l, { width: "auto", trigger: "hover", teleported: !1, "popper-class": "popover-map-pin" }, { reference: N(() => [ q(c, { class: "button-circle secondary", circle: "", onClick: a.showConnectivity }, { default: N(() => [ q(s, { color: "#8300bf" }, { default: N(() => [ q(u) ]), _: 1 }) ]), _: 1 }, 8, ["onClick"]) ]), default: N(() => [ t[5] || (t[5] = D("span", null, " Show connectivity on map ", -1)) ]), _: 1 }), q(d, { onCopied: a.onCopied, content: e.updatedCopyContent }, null, 8, ["onCopied", "content"]), n.withCloseButton ? (S(), re(l, { key: 0, width: "auto", trigger: "hover", teleported: !1, "popper-class": "popover-map-pin" }, { reference: N(() => [ q(c, { class: "button-circle", circle: "", onClick: a.closeConnectivity }, { default: N(() => [ q(s, { color: "white" }, { default: N(() => [ q(p) ]), _: 1 }) ]), _: 1 }, 8, ["onClick"]) ]), default: N(() => [ t[6] || (t[6] = D("span", null, "Close", -1)) ]), _: 1 })) : J("", !0) ]) ]), D("div", XGe, [ D("div", ZGe, [ t[8] || (t[8] = D("span", { class: "attribute-title" }, "Population Display", -1)), e.activeView === "listView" ? (S(), re(l, { key: 0, width: "250", trigger: "hover", teleported: !1, "popper-class": "popover-origin-help" }, { reference: N(() => [ q(s, { class: "info" }, { default: N(() => [ q(h) ]), _: 1 }) ]), default: N(() => [ t[7] || (t[7] = D("span", { style: { "word-break": "keep-all" } }, " This list is ordered alphabetically, switch to graph view for path details. ", -1)) ]), _: 1 })) : J("", !0) ]), D("div", JGe, [ t[13] || (t[13] = D("span", null, "Connectivity from:", -1)), q(v, { modelValue: e.connectivitySource, "onUpdate:modelValue": t[0] || (t[0] = (k) => e.connectivitySource = k), onChange: a.onConnectivitySourceChange }, { default: N(() => [ q(f, { value: "map", disabled: e.noMapConnectivity }, { default: N(() => t[9] || (t[9] = [ Oe("Map") ])), _: 1 }, 8, ["disabled"]), q(f, { value: "sckan" }, { default: N(() => t[10] || (t[10] = [ Oe("SCKAN") ])), _: 1 }) ]), _: 1 }, 8, ["modelValue", "onChange"]), q(c, { class: H(e.activeView === "listView" ? "button" : "el-button-secondary"), onClick: t[1] || (t[1] = (k) => a.switchConnectivityView("listView")) }, { default: N(() => t[11] || (t[11] = [ Oe(" List view ") ])), _: 1 }, 8, ["class"]), q(c, { class: H(e.activeView === "graphView" ? "button" : "el-button-secondary"), onClick: t[2] || (t[2] = (k) => a.switchConnectivityView("graphView")) }, { default: N(() => t[12] || (t[12] = [ Oe(" Graph view ") ])), _: 1 }, 8, ["class"]) ]) ]), a.entry["nerve-label"] ? (S(), L("div", QGe, [ t[15] || (t[15] = D("div", { class: "attribute-title-container" }, [ D("span", { class: "attribute-title" }, "Nerves") ], -1)), (S(!0), L(Re, null, mt(a.entry["nerve-label"], (k, C) => (S(), L("div", null, [ (S(), L("div", { class: "attribute-content", "origin-item-label": k.nerve, key: k.nerve }, [ D("span", null, ge(a.capitalise(k.nerve)), 1) ], 8, eWe)), (S(!0), L(Re, null, mt(k.subNerves, (_, $) => (S(), L("div", { class: "attribute-content", style: { "margin-left": "1rem" }, "origin-item-label": _, key: _, onMouseenter: (O) => a.onConnectivityHovered(_), onMouseleave: t[3] || (t[3] = (O) => a.onConnectivityHovered()) }, [ q(l, { width: "150", trigger: "hover", teleported: !1, "popper-class": "popover-origin-help" }, { reference: N(() => [ q(s, { class: "magnify-glass", onClick: (O) => a.onConnectivityClicked(_) }, { default: N(() => [ q(m) ]), _: 2 }, 1032, ["onClick"]) ]), default: N(() => [ t[14] || (t[14] = D("span", null, "Search sub nerve", -1)) ]), _: 2 }, 1024), D("span", null, ge(a.capitalise(_)), 1) ], 40, tWe))), 128)) ]))), 256)) ])) : J("", !0), Be(D("div", nWe, [ Be((S(), re(g, { 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"])), [ [w, e.connectivityLoading] ]) ], 512), [ [ht, e.activeView === "listView"] ]), Be(D("div", rWe, [ e.graphViewLoaded ? Be((S(), re(b, { 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"])), [ [w, e.connectivityLoading] ]) : J("", !0) ], 512), [ [ht, e.activeView === "graphView"] ]), a.resources.length ? (S(), L("div", oWe, [ q(x, { resources: a.resources, onReferencesLoaded: a.onReferencesLoaded, onShowReferenceConnectivities: a.onShowReferenceConnectivities, onTrackEvent: a.onTrackEvent }, null, 8, ["resources", "onReferencesLoaded", "onShowReferenceConnectivities", "onTrackEvent"]) ])) : J("", !0) ])) : J("", !0); } const JG = /* @__PURE__ */ wa(DGe, [["render", aWe], ["__scopeId", "data-v-589e4c5c"]]), iWe = { 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), Bt.emit("trackEvent", { event_name: "portal_maps_connectivity_open", category: e.id || "", location: "map_sidebar_connectivity" })); } } }, sWe = { class: "connectivity-card-container", ref: "container" }, lWe = { class: "connectivity-card", ref: "card" }, uWe = { class: "card-title" }, cWe = { key: 0, class: "card-details" }, dWe = { key: 0, class: "card-tags" }, pWe = { key: 1 }; function fWe(e, t, n, r, o, a) { const i = xu, s = Rd; return S(), L("div", sWe, [ D("div", lWe, [ t[1] || (t[1] = D("div", { class: "seperator-path" }, null, -1)), Be((S(), L("div", { class: "card-content", onClick: t[0] || (t[0] = (l) => a.cardClicked(n.entry)) }, [ D("div", uWe, ge(a.capitalise(n.entry.label)), 1), (S(!0), L(Re, null, mt(o.displayFields, (l) => (S(), L(Re, { key: l }, [ n.entry[l] ? (S(), L("div", cWe, [ D("strong", null, ge(l) + ":", 1), l === "nerve-label" ? (S(), L("div", dWe, [ (S(!0), L(Re, null, mt(n.entry[l], (u) => (S(), L("div", { key: u.nerve }, [ q(i, { type: "primary", size: "small" }, { default: N(() => [ Oe(ge(u.nerve), 1) ]), _: 2 }, 1024), (S(!0), L(Re, null, mt(u.subNerves, (c) => (S(), re(i, { type: "primary", size: "small" }, { default: N(() => [ Oe(ge(c), 1) ]), _: 2 }, 1024))), 256)) ]))), 128)) ])) : (S(), L("span", pWe, ge(n.entry[l]), 1)) ])) : J("", !0) ], 64))), 128)) ])), [ [s, a.loading] ]) ], 512) ], 512); } const QG = /* @__PURE__ */ wa(iWe, [["render", fWe], ["__scopeId", "data-v-4c16c9d7"]]); var hWe = { searchInput: "", lastSearch: "", results: [], numberOfHits: 0, filter: [], loadingCards: !1, numberPerPage: 10, page: 1, start: 0 }; const vWe = { components: { SearchFilters: I1, SearchHistory: A1, ConnectivityCard: QG, ConnectivityInfo: JG, Button: so, Card: i1, Checkbox: ME, Icon: Qt, Input: Pd, Pagination: c1, MapSvgIcon: dG, MapSvgSpriteColor: GG }, name: "ConnectivityExplorer", props: { connectivityKnowledge: { type: Array, default: [] }, entry: { type: Object, default: () => hWe }, 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" }), Bt.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, i = a.charAt(0).toLowerCase() + a.slice(1); let s = ""; o.term.toLowerCase() === "origin" ? s = `There are no neuron populations beginning at ${i}.` : o.term.toLowerCase() === "via" ? s = `There are no neuron populations that run through ${i}.` : o.term.toLowerCase() === "destination" ? s = `There are no neuron populations terminating at ${i}.` : s = `There are no neuron populations beginning, terminating, or running through ${i}.`, oq({ dangerouslyUseHTMLString: !0, message: s, 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, Bt.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 || Bt.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((e) => e.facet.toLowerCase() !== "show all") ? this.filter : []; } }, mounted: function() { localStorage.removeItem("connectivity-active-view"), this.openSearch(this.filter, this.searchInput), Bt.on("close-connectivity", () => { this.expanded = "", this.expandedData = null; }); } }, gWe = { class: "header" }, mWe = { key: 0, class: "visibility-filter" }, yWe = { key: 0, class: "error-feedback" }, bWe = ["onMouseenter"]; function wWe(e, t, n, r, o, a) { const i = Ve("MapSvgSpriteColor"), s = Pd, l = so, u = ME, c = Ve("MapSvgIcon"), d = Ch, p = I1, h = A1, f = QG, v = JG, m = c1, g = i1, b = Rd; return S(), re(g, { "body-style": e.bodyStyle, class: "content-card" }, { header: N(() => [ D("div", gWe, [ q(s, { class: "search-input", placeholder: "Search", modelValue: e.searchInput, "onUpdate:modelValue": t[0] || (t[0] = (x) => e.searchInput = x), onKeyup: a.searchEvent, clearable: "", onClear: a.clearSearchClicked }, null, 8, ["modelValue", "onKeyup", "onClear"]), q(l, { type: "primary", class: "button", onClick: a.searchEvent, size: "large" }, { default: N(() => t[5] || (t[5] = [ Oe(" Search ") ])), _: 1 }, 8, ["onClick"]), q(l, { link: "", class: "el-button-link", onClick: a.onResetClick, size: "large" }, { default: N(() => t[6] || (t[6] = [ Oe(" Reset ") ])), _: 1 }, 8, ["onClick"]), n.showVisibilityFilter ? (S(), L("div", mWe, [ q(u, { modelValue: e.filterVisibility, "onUpdate:modelValue": t[1] || (t[1] = (x) => e.filterVisibility = x) }, { default: N(() => t[7] || (t[7] = [ Oe(" Focused ") ])), _: 1 }, 8, ["modelValue"]), q(d, { title: "How does focused checkbox work?", width: "250", trigger: "hover", "popper-class": "filter-help-popover" }, { reference: N(() => [ q(c, { icon: "help", class: "help" }) ]), default: N(() => [ t[8] || (t[8] = D("div", null, [ D("strong", null, "Checked:"), D("br"), Oe(" Display listed or highlighted items only. "), D("br"), D("br"), D("strong", null, "Unchecked:"), D("br"), Oe(" Display listed or highlighted items in full colour and non-listed items in greyscale. ") ], -1)) ]), _: 1 }) ])) : J("", !0) ]) ]), default: N(() => [ q(i), q(p, { 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"]), q(h, { ref: "searchHistory", localStorageKey: "sparc.science-connectivity-search-history", onSearch: a.searchHistorySearch }, null, 8, ["onSearch"]), Be((S(), L("div", { class: "content scrollbar", ref: "content", onMouseleave: t[4] || (t[4] = (x) => a.onHoverChanged(x, void 0)) }, [ e.results.length === 0 && !e.loadingCards ? (S(), L("div", yWe, " No results found - Please change your search / filter criteria. ")) : J("", !0), (S(!0), L(Re, null, mt(a.paginatedResults, (x) => (S(), L("div", { key: x.id, ref_for: !0, ref: "stepItem-" + x.id, class: "step-item", onMouseenter: (w) => a.onHoverChanged(w, x) }, [ Be(q(f, { class: "connectivity-card", entry: x, connectivityEntry: n.connectivityEntry, onOpenConnectivity: a.onConnectivityCollapseChange }, null, 8, ["entry", "connectivityEntry", "onOpenConnectivity"]), [ [ht, e.expanded !== x.id] ]), e.expanded === x.id ? (S(), re(v, { key: 0, class: "connectivity-info", entryId: x.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] = (w) => e.$emit("connectivity-hovered", w)), onLoaded: (w) => a.onConnectivityInfoLoaded(x), onCloseConnectivity: (w) => a.onConnectivityCollapseChange(x) }, null, 8, ["entryId", "connectivityEntry", "availableAnatomyFacets", "envVars", "onShowConnectivity", "onShowReferenceConnectivities", "onConnectivityClicked", "onLoaded", "onCloseConnectivity"])) : J("", !0) ], 40, bWe))), 128)), q(m, { class: "pagination", "current-page": e.page, "onUpdate:currentPage": t[3] || (t[3] = (x) => e.page = x), "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)), [ [b, e.loadingCards || e.initLoading] ]) ]), _: 1 }, 8, ["body-style"]); } const eW = /* @__PURE__ */ wa(vWe, [["render", wWe], ["__scopeId", "data-v-54947ae4"]]), xWe = { name: "AnnotationTool", components: { AnnotationPopup: Uge, Button: so, CreateTooltipContent: Yge, Col: zE, ElIconDelete: Eg, Icon: Qt, Row: BE }, props: { annotationEntry: { type: Array }, createData: { type: Object, default: {} } }, data: function() { return { ElIconDelete: En(Eg), annotationPopupData: null }; } }, kWe = { class: "annotation-tool scrollbar" }, CWe = { key: 1, class: "delete-container" }; function _We(e, t, n, r, o, a) { const i = Ve("CreateTooltipContent"), s = Ve("annotation-popup"), l = zE, u = so, c = BE; return S(), L("div", kWe, [ Be(q(i, { createData: n.createData, onConfirmCreate: t[0] || (t[0] = (d) => e.$emit("confirm-create", d)), onCancelCreate: t[1] || (t[1] = (d) => e.$emit("cancel-create")), class: "create-tooltip-content" }, null, 8, ["createData"]), [ [ht, n.createData && n.createData.toBeConfirmed] ]), n.annotationEntry && (!n.createData || !n.createData.toBeConfirmed) ? (S(), re(s, { key: 0, class: "annotation-popup", annotationEntry: n.annotationEntry, onAnnotation: t[2] || (t[2] = (d) => e.$emit("annotation", d)), onHoverChanged: t[3] || (t[3] = (d) => e.$emit("hover-changed", d)), onTrackEvent: t[4] || (t[4] = (d) => e.$emit("trackEvent", d)) }, null, 8, ["annotationEntry"])) : J("", !0), n.createData && n.createData.toBeDeleted ? (S(), L("div", CWe, [ q(c, null, { default: N(() => [ q(l, { offset: 1, span: 6 }, { default: N(() => t[7] || (t[7] = [ Oe("Delete this feature?") ])), _: 1 }), q(l, { offset: 1, span: 3 }, { default: N(() => [ q(u, { class: "delete-button", icon: e.ElIconDelete, onClick: t[5] || (t[5] = (d) => e.$emit("confirm-delete")) }, { default: N(() => t[8] || (t[8] = [ Oe(" Delete ") ])), _: 1 }, 8, ["icon"]) ]), _: 1 }), q(l, { offset: 1, span: 2 }, { default: N(() => [ q(u, { class: "delete-button", onClick: t[6] || (t[6] = (d) => e.$emit("cancel-create")) }, { default: N(() => t[9] || (t[9] = [ Oe(" Dismiss ") ])), _: 1 }) ]), _: 1 }) ]), _: 1 }) ])) : J("", !0) ]); } const tW = /* @__PURE__ */ wa(xWe, [["render", _We], ["__scopeId", "data-v-7acfbf0c"]]), SWe = { name: "Tabs", components: { ElIconClose: Bo }, 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 }); } } }, $We = { class: "tabs-container" }, EWe = ["onClick"], OWe = { class: "tab-title" }; function FWe(e, t, n, r, o, a) { const i = Bo, s = Qt; return S(), L("div", $We, [ (S(!0), L(Re, null, mt(a.tabs, (l) => (S(), L("div", { class: H(["tab", { "active-tab": l.id == n.activeId }]), key: l.id, onClick: (u) => a.tabClicked(l) }, [ D("span", OWe, ge(l.title), 1), l.closable ? (S(), re(s, { key: 0, onClick: Ge((u) => a.tabClosed(l), ["stop"]), class: "tab-close-icon" }, { default: N(() => [ q(i) ]), _: 2 }, 1032, ["onClick"])) : J("", !0) ], 10, EWe))), 128)) ]); } const nW = /* @__PURE__ */ wa(SWe, [["render", FWe], ["__scopeId", "data-v-744b6365"]]), TWe = { components: { DatasetExplorer: ZG, Tabs: nW, ElIconArrowLeft: aS, ElIconArrowRight: jf, Drawer: jE, Icon: Qt, AnnotationTool: tW, ConnectivityExplorer: eW }, 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((i) => (e === void 0 || i.id === e) && (t === void 0 || i.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][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) { Bt.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() { Bt.emit("close-connectivity"); }, updateState: function() { const e = this.getTabRef(void 0, "datasetExplorer"), t = this.getTabRef(void 0, "connectivityExplorer"); this.state.activeTabId = this.activeTabId, this.state.dataset.search = e.getSearch(), this.state.dataset.filters = XG(e.getFilters()), this.state.connectivity.search = t.getSearch(), this.state.connectivity.filters = t.getFilters(), this.state.connectivityEntries = this.connectivityEntry.map((n) => n.id), 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((a) => a.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() { Bt.on("PopoverActionClick", (e) => { this.$emit("actionClick", e); }), Bt.on("number-of-datasets-for-anatomies", (e) => { this.$emit("number-of-datasets-for-anatomies", e); }), Bt.on("anatomy-in-datasets", (e) => { this.$emit("anatomy-in-datasets", e); }), Bt.on("contextUpdate", (e) => { this.$emit("contextUpdate", e); }), Bt.on("datalink-clicked", (e) => { this.$emit("datalink-clicked", e); }), Bt.on("onConnectivityActionClick", (e) => { this.tabClicked({ id: 1, type: "datasetExplorer" }), this.$emit("actionClick", e); }), Bt.on("connectivity-source-change", (e) => { this.$emit("connectivity-source-change", e); }), Bt.on("available-facets", (e) => { this.availableAnatomyFacets = e.find((t) => t.label === "Anatomical Structure").children, this.storeAvailableAnatomyFacets(this.availableAnatomyFacets); }), Bt.on("trackEvent", (e) => { this.trackEvent(e); }); } }, AWe = { ref: "container" }, IWe = { class: "box-card" }, PWe = { class: "sidebar-container" }; function LWe(e, t, n, r, o, a) { const i = aS, s = Qt, l = jf, u = nW, c = tW, d = eW, p = ZG, h = jE; return S(), L("div", AWe, [ e.drawerOpen ? J("", !0) : (S(), L("div", { key: 0, onClick: t[0] || (t[0] = (...f) => a.toggleDrawer && a.toggleDrawer(...f)), class: "open-tab" }, [ q(s, null, { default: N(() => [ q(i) ]), _: 1 }) ])), q(h, { class: "side-bar my-drawer", modelValue: e.drawerOpen, "onUpdate:modelValue": t[7] || (t[7] = (f) => e.drawerOpen = f), 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: N(() => [ D("div", IWe, [ e.drawerOpen ? (S(), L("div", { key: 0, onClick: t[1] || (t[1] = (...f) => a.close && a.close(...f)), class: "close-tab" }, [ q(s, null, { default: N(() => [ q(l) ]), _: 1 }) ])) : J("", !0), D("div", PWe, [ a.tabEntries.length > 1 ? (S(), re(u, { key: 0, tabEntries: a.tabEntries, activeId: e.activeTabId, onTabClicked: a.tabClicked, onTabClosed: a.tabClosed, onTrackEvent: a.trackEvent }, null, 8, ["tabEntries", "activeId", "onTabClicked", "onTabClosed", "onTrackEvent"])) : J("", !0), (S(!0), L(Re, null, mt(n.tabs, (f) => (S(), L(Re, { key: "tab.id" }, [ f.type === "annotation" ? Be((S(), re(c, { key: 0, ref_for: !0, ref: "annotationTab_" + f.id, annotationEntry: n.annotationEntry, createData: n.createData, onAnnotation: t[2] || (t[2] = (v) => e.$emit("annotation-submitted", v)), onConfirmCreate: t[3] || (t[3] = (v) => e.$emit("confirm-create", v)), onCancelCreate: t[4] || (t[4] = (v) => e.$emit("cancel-create")), onConfirmDelete: t[5] || (t[5] = (v) => e.$emit("confirm-delete", v)), onHoverChanged: (v) => a.hoverChanged(f.id, v), onTrackEvent: a.trackEvent }, null, 8, ["annotationEntry", "createData", "onHoverChanged", "onTrackEvent"])), [ [ht, f.id === e.activeTabId] ]) : f.type === "connectivityExplorer" ? Be((S(), re(d, { key: 1, ref_for: !0, ref: "connectivityExplorerTab_" + f.id, connectivityKnowledge: n.connectivityKnowledge, envVars: n.envVars, connectivityEntry: n.connectivityEntry, availableAnatomyFacets: e.availableAnatomyFacets, onFilterVisibility: t[6] || (t[6] = (v) => e.$emit("filter-visibility", v)), connectivityFilterOptions: n.filterOptions, showVisibilityFilter: n.showVisibilityFilter, onSearchChanged: (v) => a.searchChanged(f.id, v), onHoverChanged: (v) => a.hoverChanged(f.id, v), 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, f.id === e.activeTabId] ]) : Be((S(), re(p, { key: 2, class: "sidebar-content-container", contextCardEntry: f.contextCard, envVars: n.envVars, ref_for: !0, ref: "datasetExplorerTab_" + f.id, onSearchChanged: (v) => a.searchChanged(f.id, v), onHoverChanged: (v) => a.hoverChanged(f.id, v) }, null, 8, ["contextCardEntry", "envVars", "onSearchChanged", "onHoverChanged"])), [ [ht, f.id === e.activeTabId] ]) ], 64))), 128)) ]) ]) ]), _: 1 }, 8, ["modelValue"]) ], 512); } const RWe = /* @__PURE__ */ wa(TWe, [["render", LWe], ["__scopeId", "data-v-bc4ad4fb"]]); /*! js-cookie v3.0.5 | MIT */ function Rv(e) { for (var t = 1; t < arguments.length; t++) { var n = arguments[t]; for (var r in n) e[r] = n[r]; } return e; } var NWe = { read: function(e) { return e[0] === '"' && (e = e.slice(1, -1)), e.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent); }, write: function(e) { return encodeURIComponent(e).replace( /%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g, decodeURIComponent ); } }; function K_(e, t) { function n(o, a, i) { if (!(typeof document > "u")) { i = Rv({}, t, i), typeof i.expires == "number" && (i.expires = new Date(Date.now() + i.expires * 864e5)), i.expires && (i.expires = i.expires.toUTCString()), o = encodeURIComponent(o).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape); var s = ""; for (var l in i) i[l] && (s += "; " + l, i[l] !== !0 && (s += "=" + i[l].split(";")[0])); return document.cookie = o + "=" + e.write(a, o) + s; } } function r(o) { if (!(typeof document > "u" || arguments.length && !o)) { for (var a = document.cookie ? document.cookie.split("; ") : [], i = {}, s = 0; s < a.length; s++) { var l = a[s].split("="), u = l.slice(1).join("="); try { var c = decodeURIComponent(l[0]); if (i[c] = e.read(u, c), o === c) break; } catch { } } return o ? i[o] : i; } } return Object.create( { set: n, get: r, remove: function(o, a) { n( o, "", Rv({}, a, { expires: -1 }) ); }, withAttributes: function(o) { return K_(this.converter, Rv({}, this.attributes, o)); }, withConverter: function(o) { return K_(Rv({}, this.converter, o), this.attributes); } }, { attributes: { value: Object.freeze(t) }, converter: { value: Object.freeze(e) } } ); } var G_ = K_(NWe, { path: "/" }), ri = function(e, t, n, r, o) { if (r === "m") throw new TypeError("Private method is not writable"); if (r === "a" && !o) throw new TypeError("Private accessor was defined without a setter"); if (typeof t == "function" ? e !== t || !o : !t.has(e)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); return r === "a" ? o.call(e, n) : o ? o.value = n : t.set(e, n), n; }, zn = function(e, t, n, r) { if (n === "a" && !r) throw new TypeError("Private accessor was defined without a getter"); if (typeof t == "function" ? e !== t || !r : !t.has(e)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); return n === "m" ? r : n === "a" ? r.call(e) : r ? r.value : t.get(e); }, Di, Vp, oi, Hr, Rs; const MWe = 1e4; class DWe { /** * @param serverEndpoint The URL of a map annotation service. */ constructor(t) { Di.add(this), Vp.set(this, void 0), oi.set(this, null), Hr.set( this, null /** * @param serverEndpoint The URL of a map annotation service. */ ), t.slice(-1) === "/" ? ri(this, Vp, t.slice(0, -1), "f") : ri(this, Vp, t, "f"); } /** * Get information about the logged-in SPARC user. * * Requires {@linkcode authenticate} to first be called. */ get currentUser() { return zn(this, oi, "f"); } /** * Get information about any error from the last call * to {@linkcode authenticate}. */ get currentError() { return zn(this, Hr, "f"); } /** * Authenticate the logged-in SPARC user. * * @param userApiKey The Api token of the logged-in Pennsieve user * @return A Promise resolving to either data about a valid user * or a reason why the user is invalid. */ async authenticate(t) { ri(this, Hr, null, "f"), ri(this, oi, null, "f"); const n = await zn(this, Di, "m", Rs).call(this, t, "authenticate"); return "error" in n ? (G_.remove("annotation-key"), Promise.resolve(zn(this, Hr, "f"))) : (G_.set("annotation-key", n.session, { secure: !0, expires: 1 }), ri(this, oi, n.data, "f"), Promise.resolve(zn(this, oi, "f"))); } /** * Unauthenticate with the annotation service. * * @param userApiKey The Api token of the logged-in Pennsieve user * @return A Promise with data about the call. */ async unauthenticate(t) { ri(this, Hr, null, "f"), ri(this, oi, null, "f"); const n = await zn(this, Di, "m", Rs).call(this, t, "unauthenticate"); return "success" in n ? Promise.resolve(n) : Promise.resolve(zn(this, Hr, "f")); } /** * Get identifiers of all annotated items in a resource. * * @param userApiKey The Api token of the logged-in Pennsieve user * @param resourceId The resource's identifier * @param userId A user identifier (ORCID). Optional * @param participated Get items the user was involved in annotating or not. * Optional, default ``true`` * @return A Promise resolving to either a list of identifiers of annotated * items or a reason why identifiers couldn't be retrieved. */ async annotatedItemIds(t, n, r, o) { const a = { resource: n }; r !== void 0 && (a.user = r), o !== void 0 && (a.participated = o); const i = await zn(this, Di, "m", Rs).call(this, t, "items/", "GET", a); return "error" in i ? Promise.resolve(zn(this, Hr, "f")) : Promise.resolve(i); } /** * Get all annotated features drawn on a resource. * * @param userApiKey The Api token of the logged-in Pennsieve user * @param resourceId The resource's identifier * @return A Promise resolving to either a list of annotated * features drawn on the resource or a reason why * features couldn't be retrieved. */ async drawnFeatures(t, n, r) { const o = { resource: n }; r !== void 0 && (o.items = r); const a = await zn(this, Di, "m", Rs).call(this, t, "features/", "GET", o); return "error" in a ? Promise.resolve(zn(this, Hr, "f")) : Promise.resolve(a); } /** * Get all annotations about a specific item in a resource. * * @param userApiKey The Api token of the logged-in Pennsieve user * @param resourceId The resource's identifier * @param itemId The item's identifier within the resource * @return A Promise resolving to either a list of * annotations about the item or a reason * why annotations couldn't be retrieved. */ async itemAnnotations(t, n, r) { const o = await zn(this, Di, "m", Rs).call(this, t, "annotations/", "GET", { resource: n, item: r }); return "error" in o ? Promise.resolve(zn(this, Hr, "f")) : Promise.resolve(o); } /** * Get details of a specific annotation. * * @param userApiKey The Api token of the logged-in Pennsieve user * @param annotationId The annotation's URI * @return A Promise resolving to either an annotation * with the given URI or a reason why the * annotation couldn't be retrieved. */ async annotation(t, n) { const r = await zn(this, Di, "m", Rs).call(this, t, "annotation/", "GET", { annotation: n }); return "error" in r ? Promise.resolve(zn(this, Hr, "f")) : Promise.resolve(r); } /** * Add an annotation about a specific item in a resource. * * @param userApiKey The Api token of the logged-in Pennsieve user * @param annotation Annotation about the feature * @return A Promise resolving to either the resulting * full annotation or a reason why the * annotation couldn't be added */ async addAnnotation(t, n) { if (zn(this, oi, "f") && zn(this, oi, "f").canUpdate) { const r = Object.assign({ creator: zn(this, oi, "f"), created: (/* @__PURE__ */ new Date()).toISOString() }, n), o = await zn(this, Di, "m", Rs).call(this, t, "annotation/", "POST", { data: r }); if (!("error" in o)) return Promise.resolve(o); ri(this, Hr, o, "f"); } else ri(this, Hr, { error: "user cannot add annotation" }, "f"); return Promise.resolve(zn(this, Hr, "f")); } } Vp = /* @__PURE__ */ new WeakMap(), oi = /* @__PURE__ */ new WeakMap(), Hr = /* @__PURE__ */ new WeakMap(), Di = /* @__PURE__ */ new WeakSet(), Rs = async function(t, n, r = "GET", o = {}) { let a = !0; const i = new AbortController(); setTimeout(() => { a && (console.log("Annotation server timeout..."), i.abort()); }, MWe); const s = { method: r, signal: i.signal }; let l = `${zn(this, Vp, "f")}/${n}`; const u = G_.get("annotation-key") || ""; if (r === "GET") { const d = []; for (const [p, h] of Object.entries(o)) d.push(`${p}=${encodeURIComponent(JSON.stringify(h))}`); d.push(`key=${encodeURIComponent(t)}`), d.push(`session=${encodeURIComponent(u)}`), l += "?" + d.join("&"), s.headers = { Accept: "application/json; charset=utf-8", "Cache-Control": "no-store" }; } else if (r === "POST") { const d = Object.assign({ key: t, session: u }, o); s.body = JSON.stringify(d), s.headers = { Accept: "application/json; charset=utf-8", "Content-Type": "application/json; charset=utf-8", "Cache-Control": "no-store" }; } const c = await fetch(l, s); return a = !1, c.ok ? Promise.resolve(await c.json()) : (ri(this, Hr, { error: `${c.status} ${c.statusText}` }, "f"), Promise.resolve(zn(this, Hr, "f"))); }; const BWe = Df("main", { state: () => ({ userProfile: { token: "" } }), getters: { userToken(e) { return e.userProfile.token; } }, actions: { setUserToken(e) { this.userProfile.token = e; } } }), zWe = { name: "SplitFlow", components: { Container: FM, Header: TM, Main: AM, DialogToolbarContent: eH, SplitDialog: JV, SideBar: RWe }, setup() { const e = BWe(); nt("userApiKey", e.userToken); const t = yu(); let n = Go(new DWe(`${t.flatmapAPI}annotator`)); return nt("$annotator", n), { annotator: n }; }, props: { state: { type: Object, default: void 0 } }, data: function() { return { sideBarVisibility: !0, startUp: !0, sidebarStateRestored: !1, sidebarAnnotationState: !1, search: "", expanded: "", filterTriggered: !1, connectivityEntry: [], annotationEntry: [], annotationCallback: void 0, confirmCreateCallback: void 0, cancelCreateCallback: void 0, confirmDeleteCallback: void 0, confirmCommentCallback: void 0, createData: {}, connectivityProcessed: !1, connectivityHighlight: [], connectivityKnowledge: [], connectivityExplorerClicked: [], // to support multi views showVisibilityFilter: !1, filterVisibility: !0, filterOptions: [], annotationHighlight: [] }; }, watch: { state: { handler: function(e) { e && (this._externalStateSet || this.setState(e), this._externalStateSet = !0, this.updateGlobalSettingsFromState(e)); }, immediate: !0 }, connectivityHighlight: { handler: function() { this.hoverChanged({ tabType: "connectivity" }), this.onFilterVisibility(this.filterVisibility); } }, annotationHighlight: { handler: function() { this.hoverChanged({ tabType: "annotation" }); } } }, methods: { onFilterVisibility: function(e) { this.filterVisibility = e; const t = { OR: [ { NOT: { "tile-layer": "pathways" } }, { AND: [ { "tile-layer": "pathways" }, { models: this.connectivityHighlight } ] } ] }, r = this.filterVisibility && this.connectivityProcessed ? t : void 0; ft.emit("filter-visibility", r); }, onConnectivityCollapseChange: function(e) { this.expanded = e.id; const t = this.$refs.splitdialog; if (t) { const n = t.getActiveContents(), r = n.find((i) => i.viewerType.includes("Flatmap")), o = n.find((i) => i.activeSpecies === "Human Male"); let a = !1; n.forEach((i) => { const s = i.viewerType === "Flatmap" || i.viewerType === "MultiFlatmap"; (r && s || r && !o && !s && !a || !r && !a) && (this.connectivityExplorerClicked.push(!0), i.onLoadConnectivityDetail({ data: [e] }), s || (a = !0)); }); } }, onConnectivityItemClose: function() { ft.emit("connectivity-item-close"); }, getActiveFlatmaps: function() { const e = []; let t = this.$refs.splitdialog; return t && t.getActiveContents().forEach((r) => { if (r != null && r.$refs.viewer) { const o = r.$refs.viewer, a = o.flatmapRef, i = o.multiflatmapRef; let s = null; a && (s = a), i && (s = i.getCurrentFlatmap()), s && e.push(s); } }), e; }, /** * Callback when an action is performed (open new dialogs). */ actionClick: function(e) { if (e) if (e.type == "Search") if (e.nervePath) this.openSearch([e.filter], e.label); else { this.openSearch([], e.term); const t = e.featuredDataset ? "portal_maps_featured_dataset_search" : "portal_maps_action_search"; jn.sendEvent({ event: "interaction_event", event_name: t, category: e.term || "filter", location: "map_location_pin" }), this.filterTriggered = !0; } else if (e.type == "URL") window.open(e.resource, "_blank"); else if (e.type == "Facet") { if (this.$refs.sideBar) { const t = { facetPropPath: "anatomy.organ.category.name", facetSubPropPath: "anatomy.organ.name", term: "Anatomical structure" }, n = [], r = e.facets.join(", "); e.facets.forEach((o) => n.push({ ...t, facet: o })), this.$refs.sideBar.addFilter(n), jn.sendEvent({ event: "interaction_event", event_name: "portal_maps_action_filter", category: r || "filter_reset", location: "map_location_pin" }), this.filterTriggered = !0; } } else if (e.type == "Facets") { const t = [], n = e.facets ? e.facets : e.labels, r = localStorage.getItem("available-anatomy-facets"); let a = (r ? JSON.parse(r) : []).flatMap((l) => l.children && l.children.length ? [l.label, ...l.children.map((u) => u.label)] : l.label).map((l) => l.toLowerCase()); a = [...new Set(a)]; const i = o3e(a, n), s = i.join(", "); this.settingsStore.facets.species.forEach((l) => { t.push({ facet: SP(l), term: "Species", facetPropPath: "organisms.primary.species.name" }); }), t.push( ...i.map((l) => ({ facet: SP(l), term: "Anatomical structure", facetPropPath: "anatomy.organ.category.name", facetSubPropPath: "anatomy.organ.name" })) ), this.openSearch(t, ""), jn.sendEvent({ event: "interaction_event", event_name: "portal_maps_action_filter", category: s || "filter_reset", location: "map_popup_button" }), this.filterTriggered = !0; } else this.trackGalleryClick(e), this.createNewEntry(e); }, trackGalleryClick: function(e) { const t = [], { label: n, type: r, datasetId: o, discoverId: a, resource: i } = e; let s = "", l = o || a; n && t.push(n), r && t.push(r), o && t.push("(" + l + ")"), i && (r === "Plot" ? s = i.dataSource.url : s = typeof i == "string" ? i : i.share_link), jn.sendEvent({ event: "interaction_event", event_name: "portal_maps_gallery_click", category: t.join(" "), location: "map_sidebar_gallery", dataset_id: l ? l + "" : "", // change to string format file_path: s }); }, onDisplaySearch: function(e, t = !0) { let n = !1, r = this.$refs.splitdialog; r && r.getActiveContents().forEach((a) => { a.search(e.term) && (n = !0); }), this.$refs.dialogToolbar.setFailedSearch(n ? void 0 : e.term), t && jn.sendEvent({ event: "interaction_event", event_name: "portal_maps_display_search", category: e.term, location: "map_toolbar" }); }, fetchSuggestions: function(e) { const t = []; this.$refs.splitdialog.getActiveContents().forEach((i) => i.searchSuggestions(e.data.term, t)); const o = []; t.forEach((i) => { o.push(i.replaceAll('"', "")); }); const a = new Set(o); t.length = 0; for (const i of a) t.push({ value: '"' + i + '"' }); e.data.cb(t); }, /** * This event is emitted when the show connectivity button in sidebar is clicked. * This will move the map to the highlighted connectivity area. * @arg featureIds */ onShowConnectivity: function(e) { if (e.length) { const t = this.splitFlowStore.getState(), n = (t == null ? void 0 : t.activeView) || ""; ft.emit("show-connectivity", { featureIds: e, offset: n === "singlepanel" || n === "2horpanel" }); } }, openConnectivityInfo: function(e) { const t = e.some((n) => n.featureId[0] === this.expanded); if (this.expanded && this.connectivityExplorerClicked.length && !t) { this.connectivityExplorerClicked.pop(); return; } this.connectivityEntry = e.map((n) => { let r = { ...n, label: n.title, id: n.featureId[0] }; const o = this.connectivityKnowledge.find((a) => a.id === r.id); return n.ready && (r["nerve-label"] = n["nerve-label"] || o["nerve-label"]), r; }), this.connectivityExplorerClicked.length ? this.connectivityEntry.every((n) => n.ready) && this.connectivityExplorerClicked.pop() : (this.connectivityKnowledge = this.connectivityEntry, this.connectivityKnowledge.every((n) => n.ready) && (this.connectivityHighlight = this.connectivityKnowledge.map((n) => n.id), this.connectivityProcessed = !0), this.$refs.sideBar && (this.$refs.sideBar.tabClicked({ id: 2, type: "connectivityExplorer" }), this.$refs.sideBar.setDrawerOpen(!0))); }, openAnnotation: function(e) { this.annotationEntry = e.annotationEntry, this.annotationHighlight = this.annotationEntry.map((t) => t.models).filter(Boolean), e.commitCallback && (this.annotationCallback = Go(e.commitCallback)), e.createData ? this.createData = Go(e.createData) : this.createData = Go({}), e.confirmCreate && (this.confirmCreateCallback = Go(e.confirmCreate)), e.cancelCreate && (this.cancelCreateCallback = Go(e.cancelCreate)), e.confirmDelete && (this.confirmDeleteCallback = Go(e.confirmDelete)), e.confirmComment && (this.confirmCommentCallback = Go(e.confirmComment)), this.$refs.sideBar && (this.$refs.sideBar.tabClicked({ id: 3, type: "annotation" }), this.$refs.sideBar.setDrawerOpen(!0)); }, onShowReferenceConnectivities: function(e) { ft.emit("show-reference-connectivities", e); }, onConnectivityHovered: function(e) { ft.emit("connectivity-hovered", e); }, onConnectivitySourceChange: function(e) { this.connectivityExplorerClicked.push(!0), ft.emit("connectivity-source-change", e); }, hoverChanged: function(e) { let t = [], n = [], r = "", o = []; e.tabType === "dataset" ? (t = e.anatomy ? e.anatomy : [], n = e.organs ? e.organs : [], r = e.doi ? e.doi : "") : e.tabType === "connectivity" ? (o = e.id ? [e.id] : this.connectivityHighlight, n = e["nerve-label"] ? e["nerve-label"].flatMap((a) => a.subNerves) : []) : e.tabType === "annotation" && (o = e.models ? [e.models] : this.annotationHighlight), this.settingsStore.updateHoverFeatures(t, n, r, o), ft.emit("hoverUpdate", { connectivityProcessed: this.connectivityProcessed }); }, searchChanged: function(e) { if (e.tabType === "dataset") { if (e && e.type == "reset-update" && this.settingsStore.updateAppliedFacets([]), e && e.type == "query-update" && (this.search = e.value, this.search && !this.filterTriggered && jn.sendEvent({ event: "interaction_event", event_name: "portal_maps_action_search", category: this.search, location: "map_sidebar_dataset_search" }), this.filterTriggered = !1), e && e.type == "filter-update") { if (this.settingsStore.updateFacets(e.value), !this.filterTriggered) { const t = e.value.filter((a) => a.facet && a.facet.toLowerCase() !== "show all").map((a) => a.facet), n = t.map((a) => a.toLowerCase()), r = [.../* @__PURE__ */ new Set([...n])]; this.settingsStore.updateAppliedFacets(r); const o = t.join(", "); jn.sendEvent({ event: "interaction_event", event_name: "portal_maps_action_filter", category: o || "filter_reset", location: "map_sidebar_dataset_filter" }); } this.filterTriggered = !1; } } else if (e.tabType === "connectivity") if (e && e.type == "reset-update") this.getActiveFlatmaps().forEach((n) => { n.resetConnectivityfilters(e.value); }); else { this.expanded = "", this.connectivityEntry = [], this.getActiveFlatmaps().forEach((o) => { o.updateConnectivityFilters(e.filter); }), ft.emit("connectivity-query-filter", e); const n = e.filter.filter((o) => o.facet && o.facet.toLowerCase() !== "show all").map((o) => o.tagLabel).join(", "), r = e.query; n && jn.sendEvent({ event: "interaction_event", event_name: "portal_maps_action_filter", category: n, location: "map_sidebar_connectivity_filter" }), r && jn.sendEvent({ event: "interaction_event", event_name: "portal_maps_action_search", category: r, location: "map_sidebar_connectivity_search" }); } }, updateMarkers: function(e) { this.settingsStore.updateMarkers(e), ft.emit("markerUpdate"); }, updateScaffoldMarkers: function(e) { this.settingsStore.updateNumberOfDatasetsForFacets(e); }, getNewEntryId: function() { return this.entries.length ? this.entries[this.entries.length - 1].id + 1 : 1; }, /** * Add new entry which will sequentially create a * new dialog. */ createNewEntry: function(e) { let t = {}; return t.viewUrl = void 0, t.state = void 0, Object.assign(t, e), t.mode = "normal", t.id = this.getNewEntryId(), t.discoverId = e.discoverId, this.entriesStore.addNewEntry(t), this.splitFlowStore.setIdToPrimaryPane(t.id), this.$refs.sideBar && this.$refs.sideBar.setDrawerOpen(!1), t.id; }, openNewMap: async function(e) { const t = await Q5e(e, this.settingsStore.sparcApi); this.createNewEntry(t), t.contextCard && ft.emit("contextUpdate", t.contextCard); }, openSearch: function(e, t) { this.search = t, this._facets = e, this.$refs && this.$refs.sideBar && (this.$refs.sideBar.openSearch(e, t), this.$refs.sideBar.tabClicked({ id: 1, type: "datasetExplorer" })), this.startUp = !1; }, onFullscreen: function(e) { this.$emit("onFullscreen", e); }, resetApp: function() { this.setState(iE()); }, setIdToPrimaryPane: function(e) { this.splitFlowStore.setIdToPrimaryPane(e); }, restoreConnectivityEntries: function(e) { this.getActiveFlatmaps().forEach((n) => { const r = e.map((o) => { const a = n.mapImp.modelFeatureIds(o)[0], i = n.mapImp.featureProperties(a); return { resource: [i.models], feature: i, label: i.label, provenanceTaxonomy: i.taxons, alert: i.alert }; }); n.checkAndCreatePopups(r, !0); }); }, restoreSidebarState: function(e) { var n, r, o; const t = e == null ? void 0 : e.sidebar; !this.sidebarStateRestored && t && this.$refs.sideBar && ((n = this.connectivityKnowledge) != null && n.length) && ((r = t.connectivityEntries) != null && r.length ? this.restoreConnectivityEntries(t.connectivityEntries) : (o = t.annotationEntries) != null && o.length && e.annotationId ? (this.restoreConnectivityEntries(t.annotationEntries), this.sidebarAnnotationState = !0) : this.$refs.sideBar.setState(t), this.sidebarStateRestored = !0); }, setState: function(e) { this.entriesStore.setAll(e.entries), e.splitFlow ? this.splitFlowStore.setState(e.splitFlow) : this.entries.forEach((t) => this.splitFlowStore.setIdToPrimaryPane(t.id)), this.restoreSidebarState(e), this.updateGlobalSettingsFromState(e); }, getState: function(e = !1) { var o, a, i; let t = JSON.parse(JSON.stringify(this.entriesStore.$state)), r = this.$refs.splitdialog.getContentsState(); if (t.entries.length === r.length) for (let s = 0; s < r.length; s++) { const l = t.entries[s]; l.state = r[s], l.type === "Scaffold" && "viewUrl" in l && delete l.viewUrl, l.type === "MultiFlatmap" && "uberonId" in l && delete l.uberonId, e === !1 && (l.type === "Scaffold" && ((o = l == null ? void 0 : l.state) != null && o.offlineAnnotations) ? delete l.state.offlineAnnotations : (i = (a = l == null ? void 0 : l.state) == null ? void 0 : a.state) != null && i.offlineAnnotations && delete l.state.state.offlineAnnotations); } return t.splitFlow = this.splitFlowStore.getState(), t.globalSettings = this.settingsStore.getGlobalSettings(), this.$refs.sideBar && (t.sidebar = this.$refs.sideBar.getState()), t; }, removeEntry: function(e) { let t = this.entriesStore.findIndexOfId(e); this.entriesStore.destroyEntry(t); }, resourceSelected: function(e) { this.$emit("resource-selected", e); }, speciesChanged: function(e) { this.$refs.sideBar && this.$nextTick(() => { ft.emit("species-layout-connectivity-update"), this.$refs.sideBar.close(); }); }, contextUpdate: function(e) { ft.emit("contextUpdate", e); }, datalinkClicked: function(e) { const t = e || "", n = "datasets/", o = t.substring( t.indexOf(n) + n.length, t.indexOf("?type=dataset") ); jn.sendEvent({ event: "interaction_event", event_name: "portal_maps_gallery_click", category: t, location: "map_sidebar_gallery", dataset_id: o || "" }); }, onAnnotationSubmitted: function(e) { this.annotationCallback ? this.annotationCallback(e) : this.confirmCommentCallback && this.confirmCommentCallback(e); }, onConfirmCreate: function(e) { this.confirmCreateCallback && this.confirmCreateCallback(e); }, onCancelCreate: function() { this.cancelCreateCallback && this.cancelCreateCallback(); }, onConfirmDelete: function(e) { this.confirmDeleteCallback && this.confirmDeleteCallback(e); }, onSidebarTabClicked: function(e) { let t = { ...this.settingsStore.globalSettings }; "interactiveMode" in t && (e.id === 1 && e.type === "datasetExplorer" ? t.interactiveMode = "dataset" : e.id === 2 && e.type === "connectivityExplorer" && (t.interactiveMode = "connectivity"), this.settingsStore.updateGlobalSettings(t)), this.$refs.dialogToolbar.loadGlobalSettings(); }, onSidebarTabClosed: function(e) { e.id === 3 && e.type === "annotation" && ft.emit("sidebar-annotation-close"); }, updateGlobalSettingsFromStorage: function() { const e = localStorage.getItem("mapviewer.globalSettings"); e && this.settingsStore.updateGlobalSettings(JSON.parse(e)); }, updateGlobalSettingsFromState: function(e) { e != null && e.globalSettings && this.settingsStore.updateGlobalSettings(e.globalSettings); }, trackEvent: function(e) { jn.sendEvent(e); } }, created: function() { this._facets = [], this._externalStateSet = !1; }, mounted: function() { ft.on("CreateNewEntry", (e) => { this.createNewEntry(e); }), ft.on("RemoveEntryRequest", (e) => { this.removeEntry(e); }), ft.on("PopoverActionClick", (e) => { this.actionClick(e); }), ft.on("annotation-open", (e) => { this.openAnnotation(e); }), ft.on("sidebar-annotation-close", () => { const e = { ...this.settingsStore.globalSettings }, { interactiveMode: t, viewingMode: n } = e; if (this.sidebarAnnotationState && n === "Annotation") { this.sidebarAnnotationState = !1, this.$refs.sideBar.tabClicked({ id: 3, type: "annotation" }); return; } this.annotationEntry = [], this.createData = {}, this.$refs.sideBar && (t === "dataset" ? this.$refs.sideBar.tabClicked({ id: 1, type: "datasetExplorer" }) : t === "connectivity" && this.$refs.sideBar.tabClicked({ id: 2, type: "connectivityExplorer" }), this.$refs.sideBar.closeConnectivity(), ft.emit("connectivity-item-close")); }), ft.on("update-offline-annotation-enabled", (e) => { this.settingsStore.updateOfflineAnnotationEnabled(e); }), ft.on("connectivity-info-open", (e) => { this.openConnectivityInfo(e); }), ft.on("connectivity-info-close", (e) => { this.$refs.sideBar && (this.connectivityProcessed = !1, this.$refs.sideBar.resetConnectivitySearch()); }), ft.on("connectivity-error", (e) => { this.$refs.sideBar && this.$refs.sideBar.updateConnectivityError(e.data); }), ft.on("neuron-connection-feature-click", (e) => { if (this.$refs.sideBar) { const { filters: t, search: n } = e; this.$refs.sideBar.openConnectivitySearch(t, n), this.$refs.sideBar.tabClicked({ id: 2, type: "connectivityExplorer" }), this.$refs.sideBar.setDrawerOpen(!0); } }), ft.on("OpenNewMap", (e) => { this.openNewMap(e); }), ft.on("startHelp", () => { this.$refs.sideBar && this.$refs.sideBar.close(); }), ft.on("connectivity-knowledge", (e) => { this.connectivityKnowledge = e.data, this.connectivityHighlight = e.highlight, this.connectivityProcessed = e.processed, this.restoreSidebarState(this.state); }), ft.on("modeUpdate", (e) => { e === "dataset" ? this.$refs.sideBar.tabClicked({ id: 1, type: "datasetExplorer" }) : e === "connectivity" && this.$refs.sideBar.tabClicked({ id: 2, type: "connectivityExplorer" }); }), this.updateGlobalSettingsFromStorage(), ft.on("connectivity-filter-options", (e) => { this.filterOptions = e; }), this.$nextTick(() => { this.search === "" && this._facets.length === 0 ? (this.$refs.sideBar && this.$refs.sideBar.close(), setTimeout(() => { this.startUp = !1; }, 2e3)) : this.openSearch(this._facets, this.search); }); }, computed: { ...vl(Wm, yu, Ku), envVars: function() { return { API_LOCATION: this.settingsStore.sparcApi, ALGOLIA_INDEX: this.settingsStore.algoliaIndex, ALGOLIA_KEY: this.settingsStore.algoliaKey, ALGOLIA_ID: this.settingsStore.algoliaId, PENNSIEVE_API_LOCATION: this.settingsStore.pennsieveApi, NL_LINK_PREFIX: this.settingsStore.nlLinkPrefix, ROOT_URL: this.settingsStore.rootUrl, FLATMAPAPI_LOCATION: this.settingsStore.flatmapAPI }; }, entries: function() { return this.entriesStore.entries; } } }, jWe = { style: { width: "100%", height: "100%", position: "relative", overflow: "hidden" } }; function VWe(e, t, n, r, o, a) { const i = eH, s = TM, l = Ve("SideBar"), u = JV, c = AM, d = FM; return S(), re(d, { style: { height: "100%", background: "white" } }, { default: N(() => [ q(s, { ref: "header", style: { "text-align": "left", "font-size": "14px", padding: "0" }, height: "32px", class: "dialog-header" }, { default: N(() => [ q(i, { numberOfEntries: a.entries.length, onOnFullscreen: a.onFullscreen, onLocalSearch: a.onDisplaySearch, onFetchSuggestions: a.fetchSuggestions, ref: "dialogToolbar" }, null, 8, ["numberOfEntries", "onOnFullscreen", "onLocalSearch", "onFetchSuggestions"]) ]), _: 1 }, 512), q(c, { class: "dialog-main" }, { default: N(() => [ D("div", jWe, [ q(l, { ref: "sideBar", envVars: a.envVars, visible: e.sideBarVisibility, class: H(["side-bar", { "start-up": e.startUp }]), "open-at-start": e.startUp, annotationEntry: e.annotationEntry, createData: e.createData, connectivityEntry: e.connectivityEntry, connectivityKnowledge: e.connectivityKnowledge, filterOptions: e.filterOptions, showVisibilityFilter: e.showVisibilityFilter, onTabClicked: a.onSidebarTabClicked, onTabClosed: a.onSidebarTabClosed, onActionClick: a.actionClick, onSearchChanged: t[0] || (t[0] = (p) => a.searchChanged(p)), onAnatomyInDatasets: t[1] || (t[1] = (p) => a.updateMarkers(p)), onAnnotationSubmitted: a.onAnnotationSubmitted, onConfirmCreate: a.onConfirmCreate, onCancelCreate: a.onCancelCreate, onConfirmDelete: a.onConfirmDelete, onNumberOfDatasetsForAnatomies: t[2] || (t[2] = (p) => a.updateScaffoldMarkers(p)), onHoverChanged: t[3] || (t[3] = (p) => a.hoverChanged(p)), onContextUpdate: t[4] || (t[4] = (p) => a.contextUpdate(p)), onDatalinkClicked: t[5] || (t[5] = (p) => a.datalinkClicked(p)), onShowConnectivity: a.onShowConnectivity, onShowReferenceConnectivities: a.onShowReferenceConnectivities, onConnectivityHovered: a.onConnectivityHovered, onConnectivityCollapseChange: a.onConnectivityCollapseChange, onConnectivitySourceChange: a.onConnectivitySourceChange, onFilterVisibility: a.onFilterVisibility, onConnectivityItemClose: a.onConnectivityItemClose, onTrackEvent: a.trackEvent }, null, 8, ["envVars", "visible", "class", "open-at-start", "annotationEntry", "createData", "connectivityEntry", "connectivityKnowledge", "filterOptions", "showVisibilityFilter", "onTabClicked", "onTabClosed", "onActionClick", "onAnnotationSubmitted", "onConfirmCreate", "onCancelCreate", "onConfirmDelete", "onShowConnectivity", "onShowReferenceConnectivities", "onConnectivityHovered", "onConnectivityCollapseChange", "onConnectivitySourceChange", "onFilterVisibility", "onConnectivityItemClose", "onTrackEvent"]), q(u, { entries: a.entries, ref: "splitdialog", onResourceSelected: a.resourceSelected, onSpeciesChanged: a.speciesChanged }, null, 8, ["entries", "onResourceSelected", "onSpeciesChanged"]) ]) ]), _: 1 }) ]), _: 1 }); } const rW = /* @__PURE__ */ Ka(zWe, [["render", VWe], ["__scopeId", "data-v-49b7c858"]]), HWe = { // Note that the setting store is included in MapContent.vue methods: { retrieveContextCardFromUrl: async function(e) { const [t, n, r, o] = this.splitInfoFromUrl(e), a = await this.getContextFileFromScicrunch(t, r); if (!a.success) return {}; const i = n + a.contextFile + o; return { s3uri: a.s3uri, contextCardUrl: i }; }, splitInfoFromUrl: function(e) { let t = e.split("s3-resource")[1], n = e.split("files/")[0] + "files/", r = e.split("files/")[1].split("?")[0], o = "?" + e.split("?")[1]; const a = t.split("/"); return a.shift(), [a[0], n, r, o]; }, getContextFileFromScicrunch: async function(e, t) { return await fetch(`${this.settingsStore.sparcApi}/dataset_info/using_multiple_discoverIds/?discoverIds=${e}`).then((r) => r.json()).then((r) => { if (r.numberOfHits === 1) { const o = r.results[0]["abi-contextual-information"]; if (o && o.length === 1) return { success: !0, contextFile: o[0], s3uri: r.results[0].s3uri }; if (o && o.length > 1) { let a = this.findContextInforForFilePath(r.results[0]["abi-context-file"], t); if (a) return { success: !0, contextFile: a, s3uri: r.results[0].s3uri }; } } return { success: !1 }; }).catch((r) => (console.error("Error:", r), { success: !1 })); }, findContextInforForFilePath: function(e, t) { var r; let n = e.find((o) => o.datacite.isDerivedFrom.path.includes(t)); return (r = n == null ? void 0 : n.dataset) == null ? void 0 : r.path; } } }, UWe = { name: "MapContent", components: { MapSvgSpriteColor: UV, Loading: UM, SplitFlow: rW }, mixins: [HWe], props: { /** * A link (URL) to share. */ shareLink: { type: String, default: void 0 }, /** * State containing state of the scaffold. */ state: { type: Object, default: void 0 }, /** * The options include APIs and Keys. */ options: { type: Object, default: () => ({}), required: !0 }, /** * New option to start the map in AC, FC or WholeBody. */ startingMap: { type: String, default: "AC" }, /** * To use help-mode-dialog when user clicks "Help". * This option is available on Flatmap, MultiFlatmap, and Scaffold. * When this is set to `true`, "Help" tooltips will be shown one by one. */ useHelpModeDialog: { type: Boolean, default: !1 }, /** * The option to show connectivity info in sidebar. * Default is `true`. Set `false` to show as popup on map. */ connectivityInfoSidebar: { type: Boolean, default: !0 }, /** * The option to show annotation in sidebar. * Default is `true`. Set `false` to show as popup on map. */ annotationSidebar: { type: Boolean, default: !0 }, /** * All panes including primary default viewer will be closable * when this is set to true. */ allClosable: { type: Boolean, default: !0 }, /** * The option to show global settings UI. * Set to `false` to hide the global settings and show local settings for flatmap and scaffold viewers. * Default is `true`. */ showGlobalSettings: { type: Boolean, default: !0 }, /** * The option to show open new map button */ showOpenMapButton: { type: Boolean, default: !0 } }, provide: function() { return { showGlobalSettings: this.showGlobalSettings, showOpenMapButton: this.showOpenMapButton }; }, data: function() { return { isReady: !1, initialState: void 0 }; }, methods: { /** * @public * Function to check whether it is in fullscreen mode or not. * */ isFullscreen: function() { return document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement; }, /** * @public * Function to toggle fullscreen. * @arg `fullscreenReq` */ onFullscreen: function(e) { e !== void 0 ? (e && !this.isFullscreen() && this.goFullscreen(), !e && this.isFullscreen() && this.leaveFullscreen()) : this.isFullscreen() ? this.leaveFullscreen() : this.goFullscreen(); }, /** * @public * Function to leave fullscreen mode. */ leaveFullscreen: function() { if (this.isFullscreen()) { document.exitFullscreen ? document.exitFullscreen() : document.mozCancelFullScreen ? document.mozCancelFullScreen() : document.webkitExitFullscreen ? document.webkitExitFullscreen() : document.msExitFullscreen && document.msExitFullscreen(); let e = this.$refs.MapApp; this.replacePopupsOnFullscreen(e, document.body); } }, /** * @public * Function to go to fullscreen mode. */ goFullscreen: function() { let e = this.$refs.MapApp; e.requestFullscreen ? e.requestFullscreen() : e.mozRequestFullScreen ? e.mozRequestFullScreen() : e.webkitRequestFullscreen ? e.webkitRequestFullscreen() : parent.msRequestFullscreen && e.msRequestFullscreen(), this.replacePopupsOnFullscreen(document.body, e); }, replacePopupsOnFullscreen: function(e, t) { e.querySelectorAll('[id^="el-popper-container"]').forEach((r) => { t.append(r); }); }, /** * @public * Restore state of the map viewer from a state provided in the * state argument, use the getState method to get the current state. * * @arg `state` */ setState: function(e) { return this.$refs.flow.setState(e); }, /** * @public * Get the current state of the map viewer, these states can be used to * restore settings and viewers using the setState method. * Set anonymousAnnotations to true if the user would like to perserve the * state of anonymous annotations. * @arg `anonymousAnnotations` */ getState: function(e = !1) { return this.$refs.flow.getState(e); }, /** * @public * Provide a way to set the current view, this is currently limited * to setting view for flatmapm, multiflatmap or scaffold. * In the case of the multiflatmap, it will not create a new entry and * instead change the current entry by setting the state. * @arg `state` */ setCurrentEntry: async function(e) { if (e && e.type) { if (e.type === "Scaffold" && (e.url || e.isBodyScaffold)) { let t = { type: e.type, label: e.label, region: e.region, resource: e.url, state: e.state, viewUrl: e.viewUrl }; if (e.isBodyScaffold) { const n = await sE(this.options.sparcApi, e.label); t = { ...t, ...n.datasetInfo, resource: n.url }; } else { const n = await this.retrieveContextCardFromUrl(e.url); t = { ...t, ...n }; } this.$refs.flow.createNewEntry(t); } else if (e.type === "MultiFlatmap") if (e.resource) { const t = { type: e.type, resource: e.resource, state: e.state, label: e.label }; this.$refs.flow.createNewEntry(t); } else { const t = n3e(e); if (t) { const n = this.getState(); if (n && n.entries) for (let r = 0; r < n.entries.length; r++) { const o = n.entries[r]; if (o.type === "MultiFlatmap") { o.resource = t, o.state = { species: t }, (e.organ || e.uuid) && (o.state.state = { searchTerm: e.organ, uuid: e.uuid }, e.uuid && (o.state.state.entry = e.taxo)), this.$refs.flow.setState(n), this.$refs.flow.setIdToPrimaryPane(o.id); break; } } } } else if (e.type === "Flatmap") { const t = { type: e.type, resource: e.resource, state: e.state, label: e.label }; this.$refs.flow.createNewEntry(t); } } }, /** * @public * Open the sidebar with the specified facets and query. * @arg `facets`, * @arg `query` */ openSearch: function(e, t) { return this.$refs.flow.openSearch(e, t); }, /** * @public * Function to run when the component is mounted. */ flowMounted: function() { this._flowMounted = !0, this.$emit("isReady"), jn.sendEvent({ event: "interaction_event", event_name: "portal_maps_page_view", category: this.startingMap }); } }, computed: { ...vl(yu, Ku), stateToSet() { return this.state ? this.state : this.initialState; } }, watch: { shareLink: { handler: function(e) { this.settingsStore.updateShareLink(e); }, immediate: !0 } }, beforeMount: function() { var e, t; this.options && (this.options.sparcApi && this.settingsStore.updateSparcAPI(this.options.sparcApi), this.options.algoliaIndex && this.settingsStore.updateAlgoliaIndex(this.options.algoliaIndex), this.options.algoliaKey && this.settingsStore.updateAlgoliaKey(this.options.algoliaKey), this.options.algoliaId && this.settingsStore.updateAlgoliaId(this.options.algoliaId), this.options.pennsieveApi && this.settingsStore.updatePennsieveApi(this.options.pennsieveApi), this.options.flatmapAPI && this.settingsStore.updateFlatmapAPI(this.options.flatmapAPI), this.options.nlLinkPrefix && this.settingsStore.updateNLLinkPrefix(this.options.nlLinkPrefix), this.options.rootUrl && this.settingsStore.updateRootUrl(this.options.rootUrl)), this.settingsStore.updateAllClosable(this.allClosable), (e = this.splitFlowStore) == null || e.reset(), (t = this.splitFlowStore) == null || t.getAvailableTerms(this.settingsStore.sparcApi); }, mounted: async function() { ft.on("updateShareLinkRequested", (e) => { this.$emit("updateShareLinkRequested", e); }), ft.on("trackEvent", (e) => { this.$emit("trackEvent", e); }), this.state || (this.initialState = await e3e(this.startingMap, this.options.sparcApi)), ft.on("mapLoaded", (e) => { this.$emit("mapLoaded", e); }), this.isReady = !0, this.settingsStore.updateUseHelpModeDialog(this.useHelpModeDialog), this.settingsStore.updateConnectivityInfoSidebar(this.connectivityInfoSidebar), this.settingsStore.updateAnnotationSidebar(this.annotationSidebar); } }, qWe = { ref: "MapApp", class: "mapcontent", "element-loading-text": "Loading...", "element-loading-background": "rgba(0, 0, 0, 0.3)" }; function KWe(e, t, n, r, o, a) { const i = Ve("map-svg-sprite-color"), s = rW, l = Mc; return Be((S(), L("div", qWe, [ q(i), e.isReady ? (S(), re(s, { key: 0, onOnFullscreen: a.onFullscreen, state: a.stateToSet, ref: "flow", onVnodeMounted: a.flowMounted }, null, 8, ["onOnFullscreen", "state", "onVnodeMounted"])) : J("", !0) ])), [ [l, !e.isReady] ]); } const iYe = /* @__PURE__ */ Ka(UWe, [["render", KWe], ["__scopeId", "data-v-8b100b76"]]); export { ft as E, QWe as J, iYe as M, jn as T, Ka as _, t3e as a, nYe as b, Ku as c, D3e as d, oYe as e, aYe as f, tYe as g, qV as h, rYe as l, JWe as q, eYe as t, yu as u };