var VK = Object.defineProperty; var jK = (e, t, n) => t in e ? VK(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n; var L_ = (e, t, n) => jK(e, typeof t != "symbol" ? t + "" : t, n); import { getCurrentScope as hg, onScopeDispose as ah, unref as b, getCurrentInstance as tt, onMounted as nt, nextTick as Ue, watch as be, ref as U, defineComponent as X, openBlock as I, createElementBlock as j, createElementVNode as W, warn as vg, computed as F, inject as Te, isRef as ar, shallowRef as dn, onBeforeUnmount as kt, onBeforeMount as gg, provide as rt, mergeProps as Bt, renderSlot as he, toRef as It, onUnmounted as Yb, useAttrs as oh, useSlots as Cr, createCommentVNode as ne, Fragment as Qe, normalizeClass as H, createBlock as de, withCtx as K, resolveDynamicComponent as ct, withModifiers as Je, createVNode as ue, toDisplayString as Fe, normalizeStyle as Ye, Transition as vr, withDirectives as Xe, vShow as mt, reactive as tn, onActivated as Zb, onUpdated as jd, cloneVNode as mg, Text as Ps, Comment as yg, Teleport as bg, readonly as ih, onDeactivated as wg, renderList as Nt, createTextVNode as et, withKeys as gn, createSlots as PP, toRaw as bo, toRefs as Sr, watchEffect as Hd, resolveComponent as lt, resolveDirective as Qb, toHandlerKey as Jb, vModelText as xg, h as sn, createApp as e2, vModelCheckbox as ti, toHandlers as LP, pushScopeId as No, popScopeId as Mo, defineAsyncComponent as sh, Suspense as HK, vModelRadio as NP, onBeforeUpdate as UK, markRaw as $i, createStaticVNode as qK } from "vue"; import { defineStore as t2, mapStores as Ud } from "pinia"; const Zs = (e, t, { checkForDefaultPrevented: n = !0 } = {}) => (a) => { const o = e == null ? void 0 : e(a); if (n === !1 || !o) return t == null ? void 0 : t(a); }; var N_; const Mr = typeof window < "u", WK = (e) => typeof e == "string", MP = () => { }, uC = Mr && ((N_ = window == null ? void 0 : window.navigator) == null ? void 0 : N_.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent); function BP(e) { return typeof e == "function" ? e() : b(e); } function KK(e) { return e; } function n2(e) { return hg() ? (ah(e), !0) : !1; } function GK(e, t = !0) { tt() ? nt(e) : t ? e() : Ue(e); } function ul(e) { var t; const n = BP(e); return (t = n == null ? void 0 : n.$el) != null ? t : n; } const r2 = Mr ? window : void 0; function Ni(...e) { let t, n, r, a; if (WK(e[0]) || Array.isArray(e[0]) ? ([n, r, a] = e, t = r2) : [t, n, r, a] = e, !t) return MP; Array.isArray(n) || (n = [n]), Array.isArray(r) || (r = [r]); const o = [], i = () => { o.forEach((c) => c()), o.length = 0; }, s = (c, d, f, h) => (c.addEventListener(d, f, h), () => c.removeEventListener(d, f, h)), l = be(() => [ul(t), BP(a)], ([c, d]) => { i(), c && o.push(...n.flatMap((f) => r.map((h) => s(c, f, h, d)))); }, { immediate: !0, flush: "post" }), u = () => { l(), i(); }; return n2(u), u; } let M_ = !1; function DP(e, t, n = {}) { const { window: r = r2, ignore: a = [], capture: o = !0, detectIframe: i = !1 } = n; if (!r) return; uC && !M_ && (M_ = !0, Array.from(r.document.body.children).forEach((f) => f.addEventListener("click", MP))); let s = !0; const l = (f) => a.some((h) => { if (typeof h == "string") return Array.from(r.document.querySelectorAll(h)).some((p) => p === f.target || f.composedPath().includes(p)); { const p = ul(h); return p && (f.target === p || f.composedPath().includes(p)); } }), c = [ Ni(r, "click", (f) => { const h = ul(e); if (!(!h || h === f.target || f.composedPath().includes(h))) { if (f.detail === 0 && (s = !l(f)), !s) { s = !0; return; } t(f); } }, { passive: !0, capture: o }), Ni(r, "pointerdown", (f) => { const h = ul(e); h && (s = !f.composedPath().includes(h) && !l(f)); }, { passive: !0 }), i && Ni(r, "blur", (f) => { var h; const p = ul(e); ((h = r.document.activeElement) == null ? void 0 : h.tagName) === "IFRAME" && !(p != null && p.contains(r.document.activeElement)) && t(f); }) ].filter(Boolean); return () => c.forEach((f) => f()); } function RP(e, t = !1) { const n = U(), r = () => n.value = !!e(); return r(), GK(r, t), n; } const B_ = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, D_ = "__vueuse_ssr_handlers__"; B_[D_] = B_[D_] || {}; var R_ = Object.getOwnPropertySymbols, XK = Object.prototype.hasOwnProperty, YK = Object.prototype.propertyIsEnumerable, ZK = (e, t) => { var n = {}; for (var r in e) XK.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]); if (e != null && R_) for (var r of R_(e)) t.indexOf(r) < 0 && YK.call(e, r) && (n[r] = e[r]); return n; }; function nl(e, t, n = {}) { const r = n, { window: a = r2 } = r, o = ZK(r, ["window"]); let i; const s = RP(() => a && "ResizeObserver" in a), l = () => { i && (i.disconnect(), i = void 0); }, u = be(() => ul(e), (d) => { l(), s.value && a && d && (i = new ResizeObserver(t), i.observe(d, o)); }, { immediate: !0, flush: "post" }), c = () => { l(), u(); }; return n2(c), { isSupported: s, stop: c }; } var z_ = Object.getOwnPropertySymbols, QK = Object.prototype.hasOwnProperty, JK = Object.prototype.propertyIsEnumerable, eG = (e, t) => { var n = {}; for (var r in e) QK.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]); if (e != null && z_) for (var r of z_(e)) t.indexOf(r) < 0 && JK.call(e, r) && (n[r] = e[r]); return n; }; function tG(e, t, n = {}) { const r = n, { window: a = r2 } = r, o = eG(r, ["window"]); let i; const s = RP(() => a && "MutationObserver" in a), l = () => { i && (i.disconnect(), i = void 0); }, u = be(() => ul(e), (d) => { l(), s.value && a && d && (i = new MutationObserver(t), i.observe(d, o)); }, { immediate: !0 }), c = () => { l(), u(); }; return n2(c), { isSupported: s, stop: c }; } var V_; (function(e) { e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE"; })(V_ || (V_ = {})); var nG = Object.defineProperty, j_ = Object.getOwnPropertySymbols, rG = Object.prototype.hasOwnProperty, aG = Object.prototype.propertyIsEnumerable, H_ = (e, t, n) => t in e ? nG(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, oG = (e, t) => { for (var n in t || (t = {})) rG.call(t, n) && H_(e, n, t[n]); if (j_) for (var n of j_(t)) aG.call(t, n) && H_(e, n, t[n]); return e; }; const iG = { 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] }; oG({ linear: KK }, iG); const sG = () => Mr && /firefox/i.test(window.navigator.userAgent); /** * @vue/shared v3.4.15 * (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 pf = () => { }, lG = Object.prototype.hasOwnProperty, U_ = (e, t) => lG.call(e, t), Go = Array.isArray, ta = (e) => typeof e == "function", Ea = (e) => typeof e == "string", na = (e) => e !== null && typeof e == "object", q_ = (e) => (na(e) || ta(e)) && ta(e.then) && ta(e.catch), uG = Object.prototype.toString, cG = (e) => uG.call(e), bx = (e) => cG(e).slice(8, -1), zP = (e) => { const t = /* @__PURE__ */ Object.create(null); return (n) => t[n] || (t[n] = e(n)); }, dG = /-(\w)/g, pG = zP((e) => e.replace(dG, (t, n) => n ? n.toUpperCase() : "")), fG = /\B([A-Z])/g, hG = zP( (e) => e.replace(fG, "-$1").toLowerCase() ); var VP = typeof global == "object" && global && global.Object === Object && global, vG = typeof self == "object" && self && self.Object === Object && self, Ls = VP || vG || Function("return this")(), xs = Ls.Symbol, jP = Object.prototype, gG = jP.hasOwnProperty, mG = jP.toString, Kh = xs ? xs.toStringTag : void 0; function yG(e) { var t = gG.call(e, Kh), n = e[Kh]; try { e[Kh] = void 0; var r = !0; } catch { } var a = mG.call(e); return r && (t ? e[Kh] = n : delete e[Kh]), a; } var bG = Object.prototype, wG = bG.toString; function xG(e) { return wG.call(e); } var kG = "[object Null]", CG = "[object Undefined]", W_ = xs ? xs.toStringTag : void 0; function lh(e) { return e == null ? e === void 0 ? CG : kG : W_ && W_ in Object(e) ? yG(e) : xG(e); } function ff(e) { return e != null && typeof e == "object"; } var SG = "[object Symbol]"; function a2(e) { return typeof e == "symbol" || ff(e) && lh(e) == SG; } function EG(e, t) { for (var n = -1, r = e == null ? 0 : e.length, a = Array(r); ++n < r; ) a[n] = t(e[n], n, e); return a; } var ji = Array.isArray, _G = 1 / 0, K_ = xs ? xs.prototype : void 0, G_ = K_ ? K_.toString : void 0; function HP(e) { if (typeof e == "string") return e; if (ji(e)) return EG(e, HP) + ""; if (a2(e)) return G_ ? G_.call(e) : ""; var t = e + ""; return t == "0" && 1 / e == -_G ? "-0" : t; } var TG = /\s/; function OG(e) { for (var t = e.length; t-- && TG.test(e.charAt(t)); ) ; return t; } var $G = /^\s+/; function FG(e) { return e && e.slice(0, OG(e) + 1).replace($G, ""); } function Bu(e) { var t = typeof e; return e != null && (t == "object" || t == "function"); } var X_ = NaN, AG = /^[-+]0x[0-9a-f]+$/i, IG = /^0b[01]+$/i, PG = /^0o[0-7]+$/i, LG = parseInt; function Y_(e) { if (typeof e == "number") return e; if (a2(e)) return X_; if (Bu(e)) { var t = typeof e.valueOf == "function" ? e.valueOf() : e; e = Bu(t) ? t + "" : t; } if (typeof e != "string") return e === 0 ? e : +e; e = FG(e); var n = IG.test(e); return n || PG.test(e) ? LG(e.slice(2), n ? 2 : 8) : AG.test(e) ? X_ : +e; } function UP(e) { return e; } var NG = "[object AsyncFunction]", MG = "[object Function]", BG = "[object GeneratorFunction]", DG = "[object Proxy]"; function qP(e) { if (!Bu(e)) return !1; var t = lh(e); return t == MG || t == BG || t == NG || t == DG; } var wx = Ls["__core-js_shared__"], Z_ = function() { var e = /[^.]+$/.exec(wx && wx.keys && wx.keys.IE_PROTO || ""); return e ? "Symbol(src)_1." + e : ""; }(); function RG(e) { return !!Z_ && Z_ in e; } var zG = Function.prototype, VG = zG.toString; function qd(e) { if (e != null) { try { return VG.call(e); } catch { } try { return e + ""; } catch { } } return ""; } var jG = /[\\^$.*+?()[\]{}|]/g, HG = /^\[object .+?Constructor\]$/, UG = Function.prototype, qG = Object.prototype, WG = UG.toString, KG = qG.hasOwnProperty, GG = RegExp( "^" + WG.call(KG).replace(jG, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$" ); function XG(e) { if (!Bu(e) || RG(e)) return !1; var t = qP(e) ? GG : HG; return t.test(qd(e)); } function YG(e, t) { return e == null ? void 0 : e[t]; } function Wd(e, t) { var n = YG(e, t); return XG(n) ? n : void 0; } var cC = Wd(Ls, "WeakMap"); function ZG(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 QG = 800, JG = 16, eX = Date.now; function tX(e) { var t = 0, n = 0; return function() { var r = eX(), a = JG - (r - n); if (n = r, a > 0) { if (++t >= QG) return arguments[0]; } else t = 0; return e.apply(void 0, arguments); }; } function nX(e) { return function() { return e; }; } var Py = function() { try { var e = Wd(Object, "defineProperty"); return e({}, "", {}), e; } catch { } }(), rX = Py ? function(e, t) { return Py(e, "toString", { configurable: !0, enumerable: !1, value: nX(t), writable: !0 }); } : UP, aX = tX(rX); function oX(e, t, n, r) { e.length; for (var a = n + 1; a--; ) if (t(e[a], a, e)) return a; return -1; } var iX = 9007199254740991, sX = /^(?:0|[1-9]\d*)$/; function SS(e, t) { var n = typeof e; return t = t ?? iX, !!t && (n == "number" || n != "symbol" && sX.test(e)) && e > -1 && e % 1 == 0 && e < t; } function lX(e, t, n) { t == "__proto__" && Py ? Py(e, t, { configurable: !0, enumerable: !0, value: n, writable: !0 }) : e[t] = n; } function ES(e, t) { return e === t || e !== e && t !== t; } var uX = Object.prototype, cX = uX.hasOwnProperty; function dX(e, t, n) { var r = e[t]; (!(cX.call(e, t) && ES(r, n)) || n === void 0 && !(t in e)) && lX(e, t, n); } var Q_ = Math.max; function pX(e, t, n) { return t = Q_(t === void 0 ? e.length - 1 : t, 0), function() { for (var r = arguments, a = -1, o = Q_(r.length - t, 0), i = Array(o); ++a < o; ) i[a] = r[t + a]; a = -1; for (var s = Array(t + 1); ++a < t; ) s[a] = r[a]; return s[t] = n(i), ZG(e, this, s); }; } var fX = 9007199254740991; function _S(e) { return typeof e == "number" && e > -1 && e % 1 == 0 && e <= fX; } function hX(e) { return e != null && _S(e.length) && !qP(e); } var vX = Object.prototype; function gX(e) { var t = e && e.constructor, n = typeof t == "function" && t.prototype || vX; return e === n; } function mX(e, t) { for (var n = -1, r = Array(e); ++n < e; ) r[n] = t(n); return r; } var yX = "[object Arguments]"; function J_(e) { return ff(e) && lh(e) == yX; } var WP = Object.prototype, bX = WP.hasOwnProperty, wX = WP.propertyIsEnumerable, TS = J_(/* @__PURE__ */ function() { return arguments; }()) ? J_ : function(e) { return ff(e) && bX.call(e, "callee") && !wX.call(e, "callee"); }; function xX() { return !1; } var KP = typeof exports == "object" && exports && !exports.nodeType && exports, e8 = KP && typeof module == "object" && module && !module.nodeType && module, kX = e8 && e8.exports === KP, t8 = kX ? Ls.Buffer : void 0, CX = t8 ? t8.isBuffer : void 0, dC = CX || xX, SX = "[object Arguments]", EX = "[object Array]", _X = "[object Boolean]", TX = "[object Date]", OX = "[object Error]", $X = "[object Function]", FX = "[object Map]", AX = "[object Number]", IX = "[object Object]", PX = "[object RegExp]", LX = "[object Set]", NX = "[object String]", MX = "[object WeakMap]", BX = "[object ArrayBuffer]", DX = "[object DataView]", RX = "[object Float32Array]", zX = "[object Float64Array]", VX = "[object Int8Array]", jX = "[object Int16Array]", HX = "[object Int32Array]", UX = "[object Uint8Array]", qX = "[object Uint8ClampedArray]", WX = "[object Uint16Array]", KX = "[object Uint32Array]", Yn = {}; Yn[RX] = Yn[zX] = Yn[VX] = Yn[jX] = Yn[HX] = Yn[UX] = Yn[qX] = Yn[WX] = Yn[KX] = !0; Yn[SX] = Yn[EX] = Yn[BX] = Yn[_X] = Yn[DX] = Yn[TX] = Yn[OX] = Yn[$X] = Yn[FX] = Yn[AX] = Yn[IX] = Yn[PX] = Yn[LX] = Yn[NX] = Yn[MX] = !1; function GX(e) { return ff(e) && _S(e.length) && !!Yn[lh(e)]; } function XX(e) { return function(t) { return e(t); }; } var GP = typeof exports == "object" && exports && !exports.nodeType && exports, Dv = GP && typeof module == "object" && module && !module.nodeType && module, YX = Dv && Dv.exports === GP, xx = YX && VP.process, n8 = function() { try { var e = Dv && Dv.require && Dv.require("util").types; return e || xx && xx.binding && xx.binding("util"); } catch { } }(), r8 = n8 && n8.isTypedArray, XP = r8 ? XX(r8) : GX, ZX = Object.prototype, QX = ZX.hasOwnProperty; function JX(e, t) { var n = ji(e), r = !n && TS(e), a = !n && !r && dC(e), o = !n && !r && !a && XP(e), i = n || r || a || o, s = i ? mX(e.length, String) : [], l = s.length; for (var u in e) QX.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. a && (u == "offset" || u == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays. o && (u == "buffer" || u == "byteLength" || u == "byteOffset") || // Skip index properties. SS(u, l))) && s.push(u); return s; } function eY(e, t) { return function(n) { return e(t(n)); }; } var tY = eY(Object.keys, Object), nY = Object.prototype, rY = nY.hasOwnProperty; function aY(e) { if (!gX(e)) return tY(e); var t = []; for (var n in Object(e)) rY.call(e, n) && n != "constructor" && t.push(n); return t; } function YP(e) { return hX(e) ? JX(e) : aY(e); } var oY = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, iY = /^\w*$/; function OS(e, t) { if (ji(e)) return !1; var n = typeof e; return n == "number" || n == "symbol" || n == "boolean" || e == null || a2(e) ? !0 : iY.test(e) || !oY.test(e) || t != null && e in Object(t); } var s0 = Wd(Object, "create"); function sY() { this.__data__ = s0 ? s0(null) : {}, this.size = 0; } function lY(e) { var t = this.has(e) && delete this.__data__[e]; return this.size -= t ? 1 : 0, t; } var uY = "__lodash_hash_undefined__", cY = Object.prototype, dY = cY.hasOwnProperty; function pY(e) { var t = this.__data__; if (s0) { var n = t[e]; return n === uY ? void 0 : n; } return dY.call(t, e) ? t[e] : void 0; } var fY = Object.prototype, hY = fY.hasOwnProperty; function vY(e) { var t = this.__data__; return s0 ? t[e] !== void 0 : hY.call(t, e); } var gY = "__lodash_hash_undefined__"; function mY(e, t) { var n = this.__data__; return this.size += this.has(e) ? 0 : 1, n[e] = s0 && t === void 0 ? gY : t, this; } function dd(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]); } } dd.prototype.clear = sY; dd.prototype.delete = lY; dd.prototype.get = pY; dd.prototype.has = vY; dd.prototype.set = mY; function yY() { this.__data__ = [], this.size = 0; } function o2(e, t) { for (var n = e.length; n--; ) if (ES(e[n][0], t)) return n; return -1; } var bY = Array.prototype, wY = bY.splice; function xY(e) { var t = this.__data__, n = o2(t, e); if (n < 0) return !1; var r = t.length - 1; return n == r ? t.pop() : wY.call(t, n, 1), --this.size, !0; } function kY(e) { var t = this.__data__, n = o2(t, e); return n < 0 ? void 0 : t[n][1]; } function CY(e) { return o2(this.__data__, e) > -1; } function SY(e, t) { var n = this.__data__, r = o2(n, e); return r < 0 ? (++this.size, n.push([e, t])) : n[r][1] = t, this; } function Tl(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]); } } Tl.prototype.clear = yY; Tl.prototype.delete = xY; Tl.prototype.get = kY; Tl.prototype.has = CY; Tl.prototype.set = SY; var l0 = Wd(Ls, "Map"); function EY() { this.size = 0, this.__data__ = { hash: new dd(), map: new (l0 || Tl)(), string: new dd() }; } function _Y(e) { var t = typeof e; return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e !== "__proto__" : e === null; } function i2(e, t) { var n = e.__data__; return _Y(t) ? n[typeof t == "string" ? "string" : "hash"] : n.map; } function TY(e) { var t = i2(this, e).delete(e); return this.size -= t ? 1 : 0, t; } function OY(e) { return i2(this, e).get(e); } function $Y(e) { return i2(this, e).has(e); } function FY(e, t) { var n = i2(this, e), r = n.size; return n.set(e, t), this.size += n.size == r ? 0 : 1, this; } function Ol(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]); } } Ol.prototype.clear = EY; Ol.prototype.delete = TY; Ol.prototype.get = OY; Ol.prototype.has = $Y; Ol.prototype.set = FY; var AY = "Expected a function"; function $S(e, t) { if (typeof e != "function" || t != null && typeof t != "function") throw new TypeError(AY); var n = function() { var r = arguments, a = t ? t.apply(this, r) : r[0], o = n.cache; if (o.has(a)) return o.get(a); var i = e.apply(this, r); return n.cache = o.set(a, i) || o, i; }; return n.cache = new ($S.Cache || Ol)(), n; } $S.Cache = Ol; var IY = 500; function PY(e) { var t = $S(e, function(r) { return n.size === IY && n.clear(), r; }), n = t.cache; return t; } var LY = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, NY = /\\(\\)?/g, MY = PY(function(e) { var t = []; return e.charCodeAt(0) === 46 && t.push(""), e.replace(LY, function(n, r, a, o) { t.push(a ? o.replace(NY, "$1") : r || n); }), t; }); function BY(e) { return e == null ? "" : HP(e); } function s2(e, t) { return ji(e) ? e : OS(e, t) ? [e] : MY(BY(e)); } var DY = 1 / 0; function kg(e) { if (typeof e == "string" || a2(e)) return e; var t = e + ""; return t == "0" && 1 / e == -DY ? "-0" : t; } function FS(e, t) { t = s2(t, e); for (var n = 0, r = t.length; e != null && n < r; ) e = e[kg(t[n++])]; return n && n == r ? e : void 0; } function ol(e, t, n) { var r = e == null ? void 0 : FS(e, t); return r === void 0 ? n : r; } function ZP(e, t) { for (var n = -1, r = t.length, a = e.length; ++n < r; ) e[a + n] = t[n]; return e; } var a8 = xs ? xs.isConcatSpreadable : void 0; function RY(e) { return ji(e) || TS(e) || !!(a8 && e && e[a8]); } function zY(e, t, n, r, a) { var o = -1, i = e.length; for (n || (n = RY), a || (a = []); ++o < i; ) { var s = e[o]; n(s) ? ZP(a, s) : a[a.length] = s; } return a; } function VY(e) { var t = e == null ? 0 : e.length; return t ? zY(e) : []; } function jY(e) { return aX(pX(e, void 0, VY), e + ""); } function vu() { if (!arguments.length) return []; var e = arguments[0]; return ji(e) ? e : [e]; } function HY() { this.__data__ = new Tl(), this.size = 0; } function UY(e) { var t = this.__data__, n = t.delete(e); return this.size = t.size, n; } function qY(e) { return this.__data__.get(e); } function WY(e) { return this.__data__.has(e); } var KY = 200; function GY(e, t) { var n = this.__data__; if (n instanceof Tl) { var r = n.__data__; if (!l0 || r.length < KY - 1) return r.push([e, t]), this.size = ++n.size, this; n = this.__data__ = new Ol(r); } return n.set(e, t), this.size = n.size, this; } function fl(e) { var t = this.__data__ = new Tl(e); this.size = t.size; } fl.prototype.clear = HY; fl.prototype.delete = UY; fl.prototype.get = qY; fl.prototype.has = WY; fl.prototype.set = GY; function XY(e, t) { for (var n = -1, r = e == null ? 0 : e.length, a = 0, o = []; ++n < r; ) { var i = e[n]; t(i, n, e) && (o[a++] = i); } return o; } function YY() { return []; } var ZY = Object.prototype, QY = ZY.propertyIsEnumerable, o8 = Object.getOwnPropertySymbols, JY = o8 ? function(e) { return e == null ? [] : (e = Object(e), XY(o8(e), function(t) { return QY.call(e, t); })); } : YY; function eZ(e, t, n) { var r = t(e); return ji(e) ? r : ZP(r, n(e)); } function i8(e) { return eZ(e, YP, JY); } var pC = Wd(Ls, "DataView"), fC = Wd(Ls, "Promise"), hC = Wd(Ls, "Set"), s8 = "[object Map]", tZ = "[object Object]", l8 = "[object Promise]", u8 = "[object Set]", c8 = "[object WeakMap]", d8 = "[object DataView]", nZ = qd(pC), rZ = qd(l0), aZ = qd(fC), oZ = qd(hC), iZ = qd(cC), du = lh; (pC && du(new pC(new ArrayBuffer(1))) != d8 || l0 && du(new l0()) != s8 || fC && du(fC.resolve()) != l8 || hC && du(new hC()) != u8 || cC && du(new cC()) != c8) && (du = function(e) { var t = lh(e), n = t == tZ ? e.constructor : void 0, r = n ? qd(n) : ""; if (r) switch (r) { case nZ: return d8; case rZ: return s8; case aZ: return l8; case oZ: return u8; case iZ: return c8; } return t; }); var p8 = Ls.Uint8Array, sZ = "__lodash_hash_undefined__"; function lZ(e) { return this.__data__.set(e, sZ), this; } function uZ(e) { return this.__data__.has(e); } function Ly(e) { var t = -1, n = e == null ? 0 : e.length; for (this.__data__ = new Ol(); ++t < n; ) this.add(e[t]); } Ly.prototype.add = Ly.prototype.push = lZ; Ly.prototype.has = uZ; function cZ(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 dZ(e, t) { return e.has(t); } var pZ = 1, fZ = 2; function QP(e, t, n, r, a, o) { var i = n & pZ, s = e.length, l = t.length; if (s != l && !(i && l > s)) return !1; var u = o.get(e), c = o.get(t); if (u && c) return u == t && c == e; var d = -1, f = !0, h = n & fZ ? new Ly() : void 0; for (o.set(e, t), o.set(t, e); ++d < s; ) { var p = e[d], v = t[d]; if (r) var m = i ? r(v, p, d, t, e, o) : r(p, v, d, e, t, o); if (m !== void 0) { if (m) continue; f = !1; break; } if (h) { if (!cZ(t, function(g, y) { if (!dZ(h, y) && (p === g || a(p, g, n, r, o))) return h.push(y); })) { f = !1; break; } } else if (!(p === v || a(p, v, n, r, o))) { f = !1; break; } } return o.delete(e), o.delete(t), f; } function hZ(e) { var t = -1, n = Array(e.size); return e.forEach(function(r, a) { n[++t] = [a, r]; }), n; } function vZ(e) { var t = -1, n = Array(e.size); return e.forEach(function(r) { n[++t] = r; }), n; } var gZ = 1, mZ = 2, yZ = "[object Boolean]", bZ = "[object Date]", wZ = "[object Error]", xZ = "[object Map]", kZ = "[object Number]", CZ = "[object RegExp]", SZ = "[object Set]", EZ = "[object String]", _Z = "[object Symbol]", TZ = "[object ArrayBuffer]", OZ = "[object DataView]", f8 = xs ? xs.prototype : void 0, kx = f8 ? f8.valueOf : void 0; function $Z(e, t, n, r, a, o, i) { switch (n) { case OZ: if (e.byteLength != t.byteLength || e.byteOffset != t.byteOffset) return !1; e = e.buffer, t = t.buffer; case TZ: return !(e.byteLength != t.byteLength || !o(new p8(e), new p8(t))); case yZ: case bZ: case kZ: return ES(+e, +t); case wZ: return e.name == t.name && e.message == t.message; case CZ: case EZ: return e == t + ""; case xZ: var s = hZ; case SZ: var l = r & gZ; if (s || (s = vZ), e.size != t.size && !l) return !1; var u = i.get(e); if (u) return u == t; r |= mZ, i.set(e, t); var c = QP(s(e), s(t), r, a, o, i); return i.delete(e), c; case _Z: if (kx) return kx.call(e) == kx.call(t); } return !1; } var FZ = 1, AZ = Object.prototype, IZ = AZ.hasOwnProperty; function PZ(e, t, n, r, a, o) { var i = n & FZ, s = i8(e), l = s.length, u = i8(t), c = u.length; if (l != c && !i) return !1; for (var d = l; d--; ) { var f = s[d]; if (!(i ? f in t : IZ.call(t, f))) return !1; } var h = o.get(e), p = o.get(t); if (h && p) return h == t && p == e; var v = !0; o.set(e, t), o.set(t, e); for (var m = i; ++d < l; ) { f = s[d]; var g = e[f], y = t[f]; if (r) var x = i ? r(y, g, f, t, e, o) : r(g, y, f, e, t, o); if (!(x === void 0 ? g === y || a(g, y, n, r, o) : x)) { v = !1; break; } m || (m = f == "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 o.delete(e), o.delete(t), v; } var LZ = 1, h8 = "[object Arguments]", v8 = "[object Array]", Em = "[object Object]", NZ = Object.prototype, g8 = NZ.hasOwnProperty; function MZ(e, t, n, r, a, o) { var i = ji(e), s = ji(t), l = i ? v8 : du(e), u = s ? v8 : du(t); l = l == h8 ? Em : l, u = u == h8 ? Em : u; var c = l == Em, d = u == Em, f = l == u; if (f && dC(e)) { if (!dC(t)) return !1; i = !0, c = !1; } if (f && !c) return o || (o = new fl()), i || XP(e) ? QP(e, t, n, r, a, o) : $Z(e, t, l, n, r, a, o); if (!(n & LZ)) { var h = c && g8.call(e, "__wrapped__"), p = d && g8.call(t, "__wrapped__"); if (h || p) { var v = h ? e.value() : e, m = p ? t.value() : t; return o || (o = new fl()), a(v, m, n, r, o); } } return f ? (o || (o = new fl()), PZ(e, t, n, r, a, o)) : !1; } function l2(e, t, n, r, a) { return e === t ? !0 : e == null || t == null || !ff(e) && !ff(t) ? e !== e && t !== t : MZ(e, t, n, r, l2, a); } var BZ = 1, DZ = 2; function RZ(e, t, n, r) { var a = n.length, o = a; if (e == null) return !o; for (e = Object(e); a--; ) { var i = n[a]; if (i[2] ? i[1] !== e[i[0]] : !(i[0] in e)) return !1; } for (; ++a < o; ) { i = n[a]; 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 fl(), d; if (!(d === void 0 ? l2(u, l, BZ | DZ, r, c) : d)) return !1; } } return !0; } function JP(e) { return e === e && !Bu(e); } function zZ(e) { for (var t = YP(e), n = t.length; n--; ) { var r = t[n], a = e[r]; t[n] = [r, a, JP(a)]; } return t; } function eL(e, t) { return function(n) { return n == null ? !1 : n[e] === t && (t !== void 0 || e in Object(n)); }; } function VZ(e) { var t = zZ(e); return t.length == 1 && t[0][2] ? eL(t[0][0], t[0][1]) : function(n) { return n === e || RZ(n, e, t); }; } function jZ(e, t) { return e != null && t in Object(e); } function HZ(e, t, n) { t = s2(t, e); for (var r = -1, a = t.length, o = !1; ++r < a; ) { var i = kg(t[r]); if (!(o = e != null && n(e, i))) break; e = e[i]; } return o || ++r != a ? o : (a = e == null ? 0 : e.length, !!a && _S(a) && SS(i, a) && (ji(e) || TS(e))); } function tL(e, t) { return e != null && HZ(e, t, jZ); } var UZ = 1, qZ = 2; function WZ(e, t) { return OS(e) && JP(t) ? eL(kg(e), t) : function(n) { var r = ol(n, e); return r === void 0 && r === t ? tL(n, e) : l2(t, r, UZ | qZ); }; } function KZ(e) { return function(t) { return t == null ? void 0 : t[e]; }; } function GZ(e) { return function(t) { return FS(t, e); }; } function XZ(e) { return OS(e) ? KZ(kg(e)) : GZ(e); } function YZ(e) { return typeof e == "function" ? e : e == null ? UP : typeof e == "object" ? ji(e) ? WZ(e[0], e[1]) : VZ(e) : XZ(e); } var Cx = function() { return Ls.Date.now(); }, ZZ = "Expected a function", QZ = Math.max, JZ = Math.min; function nL(e, t, n) { var r, a, o, i, s, l, u = 0, c = !1, d = !1, f = !0; if (typeof e != "function") throw new TypeError(ZZ); t = Y_(t) || 0, Bu(n) && (c = !!n.leading, d = "maxWait" in n, o = d ? QZ(Y_(n.maxWait) || 0, t) : o, f = "trailing" in n ? !!n.trailing : f); function h(C) { var S = r, _ = a; return r = a = void 0, u = C, i = e.apply(_, S), i; } function p(C) { return u = C, s = setTimeout(g, t), c ? h(C) : i; } function v(C) { var S = C - l, _ = C - u, T = t - S; return d ? JZ(T, o - _) : T; } function m(C) { var S = C - l, _ = C - u; return l === void 0 || S >= t || S < 0 || d && _ >= o; } function g() { var C = Cx(); if (m(C)) return y(C); s = setTimeout(g, v(C)); } function y(C) { return s = void 0, f && r ? h(C) : (r = a = void 0, i); } function x() { s !== void 0 && clearTimeout(s), u = 0, r = l = a = s = void 0; } function w() { return s === void 0 ? i : y(Cx()); } function k() { var C = Cx(), S = m(C); if (r = arguments, a = this, l = C, S) { if (s === void 0) return p(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 eQ(e, t, n) { var r = e == null ? 0 : e.length; if (!r) return -1; var a = r - 1; return oX(e, YZ(t), a); } function Ny(e) { for (var t = -1, n = e == null ? 0 : e.length, r = {}; ++t < n; ) { var a = e[t]; r[a[0]] = a[1]; } return r; } function vC(e, t) { return l2(e, t); } function u2(e) { return e == null; } function tQ(e) { return e === void 0; } function nQ(e, t, n, r) { if (!Bu(e)) return e; t = s2(t, e); for (var a = -1, o = t.length, i = o - 1, s = e; s != null && ++a < o; ) { var l = kg(t[a]), u = n; if (l === "__proto__" || l === "constructor" || l === "prototype") return e; if (a != i) { var c = s[l]; u = void 0, u === void 0 && (u = Bu(c) ? c : SS(t[a + 1]) ? [] : {}); } dX(s, l, u), s = s[l]; } return e; } function rQ(e, t, n) { for (var r = -1, a = t.length, o = {}; ++r < a; ) { var i = t[r], s = FS(e, i); n(s, i) && nQ(o, s2(i, e), s); } return o; } function aQ(e, t) { return rQ(e, t, function(n, r) { return tL(e, r); }); } var oQ = jY(function(e, t) { return e == null ? {} : aQ(e, t); }); const Sv = (e) => e === void 0, Yc = (e) => typeof e == "boolean", Wr = (e) => typeof e == "number", Zc = (e) => typeof Element > "u" ? !1 : e instanceof Element, iQ = (e) => Ea(e) ? !Number.isNaN(Number(e)) : !1, sQ = (e = "") => e.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d"), m8 = (e) => Object.keys(e); class rL extends Error { constructor(t) { super(t), this.name = "ElementPlusError"; } } function AS(e, t) { throw new rL(`[${e}] ${t}`); } function ia(e, t) { if (process.env.NODE_ENV !== "production") { const n = Ea(e) ? new rL(`[${e}] ${t}`) : e; console.warn(n); } } const lQ = "utils/dom/style", aL = (e = "") => e.split(" ").filter((t) => !!t.trim()), y8 = (e, t) => { !e || !t.trim() || e.classList.add(...aL(t)); }, My = (e, t) => { !e || !t.trim() || e.classList.remove(...aL(t)); }, Gh = (e, t) => { var n; if (!Mr || !e || !t) return ""; let r = pG(t); r === "float" && (r = "cssFloat"); try { const a = e.style[r]; if (a) return a; const o = (n = document.defaultView) == null ? void 0 : n.getComputedStyle(e, ""); return o ? o[r] : ""; } catch { return e.style[r]; } }; function u0(e, t = "px") { if (!e) return ""; if (Wr(e) || iQ(e)) return `${e}${t}`; if (Ea(e)) return e; ia(lQ, "binding value must be a string or number"); } function uQ(e, t) { if (!Mr) 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 a = t.offsetTop + n.reduce((l, u) => l + u.offsetTop, 0), o = a + t.offsetHeight, i = e.scrollTop, s = i + e.clientHeight; a < i ? e.scrollTop = a : o > s && (e.scrollTop = o - e.clientHeight); } /*! Element Plus Icons Vue v2.3.1 */ var cQ = /* @__PURE__ */ X({ name: "ArrowDown", __name: "arrow-down", setup(e) { return (t, n) => (I(), j("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ W("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" }) ])); } }), IS = cQ, dQ = /* @__PURE__ */ X({ name: "ArrowUp", __name: "arrow-up", setup(e) { return (t, n) => (I(), j("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ W("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" }) ])); } }), oL = dQ, pQ = /* @__PURE__ */ X({ name: "CircleCheck", __name: "circle-check", setup(e) { return (t, n) => (I(), j("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ W("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" }), W("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" }) ])); } }), fQ = pQ, hQ = /* @__PURE__ */ X({ name: "CircleClose", __name: "circle-close", setup(e) { return (t, n) => (I(), j("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ W("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" }), W("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" }) ])); } }), PS = hQ, vQ = /* @__PURE__ */ X({ name: "Close", __name: "close", setup(e) { return (t, n) => (I(), j("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ W("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" }) ])); } }), b8 = vQ, gQ = /* @__PURE__ */ X({ name: "CopyDocument", __name: "copy-document", setup(e) { return (t, n) => (I(), j("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ W("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" }), W("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" }) ])); } }), w8 = gQ, mQ = /* @__PURE__ */ X({ name: "Hide", __name: "hide", setup(e) { return (t, n) => (I(), j("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ W("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" }), W("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" }) ])); } }), yQ = mQ, bQ = /* @__PURE__ */ X({ name: "InfoFilled", __name: "info-filled", setup(e) { return (t, n) => (I(), j("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ W("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" }) ])); } }), wQ = bQ, xQ = /* @__PURE__ */ X({ name: "Loading", __name: "loading", setup(e) { return (t, n) => (I(), j("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ W("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" }) ])); } }), c2 = xQ, kQ = /* @__PURE__ */ X({ name: "View", __name: "view", setup(e) { return (t, n) => (I(), j("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ W("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" }) ])); } }), CQ = kQ; const iL = "__epPropKey", Pt = (e) => e, SQ = (e) => na(e) && !!e[iL], d2 = (e, t) => { if (!na(e) || SQ(e)) return e; const { values: n, required: r, default: a, type: o, validator: i } = e, l = { type: o, required: !!r, validator: n || i ? (u) => { let c = !1, d = []; if (n && (d = Array.from(n), U_(e, "default") && d.push(a), c || (c = d.includes(u))), i && (c || (c = i(u))), !c && d.length > 0) { const f = [...new Set(d)].map((h) => JSON.stringify(h)).join(", "); vg(`Invalid prop: validation failed${t ? ` for prop "${t}"` : ""}. Expected one of [${f}], got value ${JSON.stringify(u)}.`); } return c; } : void 0, [iL]: !0 }; return U_(e, "default") && (l.default = a), l; }, Dn = (e) => Ny(Object.entries(e).map(([t, n]) => [ t, d2(n, t) ])), Bi = Pt([ String, Object, Function ]), sL = { validating: c2, success: fQ, error: PS }, qa = (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; }, EQ = (e, t) => (e.install = (n) => { n.directive(t, e); }, e), Kd = (e) => (e.install = pf, e), c0 = { 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" }, Ca = "update:modelValue", pd = "change", hf = "input", LS = ["", "default", "small", "large"], _Q = (e) => ["", ...LS].includes(e), TQ = (e) => /([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(e), Dp = (e) => e, OQ = ["class", "style"], $Q = /^on[A-Z]/, lL = (e = {}) => { const { excludeListeners: t = !1, excludeKeys: n } = e, r = F(() => ((n == null ? void 0 : n.value) || []).concat(OQ)), a = tt(); return a ? F(() => { var o; return Ny(Object.entries((o = a.proxy) == null ? void 0 : o.$attrs).filter(([i]) => !r.value.includes(i) && !(t && $Q.test(i)))); }) : (ia("use-attrs", "getCurrentInstance() returned null. useAttrs() must be called at the top of a setup function"), F(() => ({}))); }, FQ = ({ from: e, replacement: t, scope: n, version: r, ref: a, type: o = "API" }, i) => { be(() => b(i), (s) => { s && ia(n, `[${o}] ${e} is about to be deprecated in version ${r}, please use ${t} instead. For more detail, please visit: ${a} `); }, { immediate: !0 }); }; var AQ = { 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 IQ = (e) => (t, n) => PQ(t, n, b(e)), PQ = (e, t, n) => ol(n, e, e).replace(/\{(\w+)\}/g, (r, a) => { var o; return `${(o = t == null ? void 0 : t[a]) != null ? o : `{${a}}`}`; }), LQ = (e) => { const t = F(() => b(e).name), n = ar(e) ? e : U(e); return { lang: t, locale: n, t: IQ(e) }; }, uL = Symbol("localeContextKey"), cL = (e) => { const t = e || Te(uL, U()); return LQ(F(() => t.value || AQ)); }, H1 = "el", NQ = "is-", xc = (e, t, n, r, a) => { let o = `${e}-${t}`; return n && (o += `-${n}`), r && (o += `__${r}`), a && (o += `--${a}`), o; }, dL = Symbol("namespaceContextKey"), NS = (e) => { const t = e || (tt() ? Te(dL, U(H1)) : U(H1)); return F(() => b(t) || H1); }, In = (e, t) => { const n = NS(t); return { namespace: n, b: (v = "") => xc(n.value, e, v, "", ""), e: (v) => v ? xc(n.value, e, "", v, "") : "", m: (v) => v ? xc(n.value, e, "", "", v) : "", be: (v, m) => v && m ? xc(n.value, e, v, m, "") : "", em: (v, m) => v && m ? xc(n.value, e, "", v, m) : "", bm: (v, m) => v && m ? xc(n.value, e, v, "", m) : "", bem: (v, m, g) => v && m && g ? xc(n.value, e, v, m, g) : "", is: (v, ...m) => { const g = m.length >= 1 ? m[0] : !0; return v && g ? `${NQ}${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}` }; }, MQ = d2({ type: Pt(Boolean), default: null }), BQ = d2({ type: Pt(Function) }), DQ = (e) => { const t = `update:${e}`, n = `onUpdate:${e}`, r = [t], a = { [e]: MQ, [n]: BQ }; return { useModelToggle: ({ indicator: i, toggleReason: s, shouldHideWhenRouteChanges: l, shouldProceed: u, onShow: c, onHide: d }) => { const f = tt(), { emit: h } = f, p = f.props, v = F(() => ta(p[n])), m = F(() => p[e] === null), g = (S) => { i.value !== !0 && (i.value = !0, s && (s.value = S), ta(c) && c(S)); }, y = (S) => { i.value !== !1 && (i.value = !1, s && (s.value = S), ta(d) && d(S)); }, x = (S) => { if (p.disabled === !0 || ta(u) && !u()) return; const _ = v.value && Mr; _ && h(t, !0), (m.value || !_) && g(S); }, w = (S) => { if (p.disabled === !0 || !Mr) return; const _ = v.value && Mr; _ && h(t, !1), (m.value || !_) && y(S); }, k = (S) => { Yc(S) && (p.disabled && S ? v.value && h(t, !1) : i.value !== S && (S ? g() : y())); }, C = () => { i.value ? w() : x(); }; return be(() => p[e], k), l && f.appContext.config.globalProperties.$route !== void 0 && be(() => ({ ...f.proxy.$route }), () => { l.value && i.value && w(); }), nt(() => { k(p[e]); }), { hide: w, show: x, toggle: C, hasUpdateHandler: v }; }, useModelToggleProps: a, useModelToggleEmits: r }; }, pL = (e) => { const t = tt(); return F(() => { var n, r; return (r = (n = t == null ? void 0 : t.proxy) == null ? void 0 : n.$props) == null ? void 0 : r[e]; }); }; var ro = "top", ni = "bottom", ri = "right", ao = "left", p2 = "auto", Cg = [ro, ni, ri, ao], vf = "start", d0 = "end", RQ = "clippingParents", fL = "viewport", Xh = "popper", zQ = "reference", x8 = /* @__PURE__ */ Cg.reduce(function(e, t) { return e.concat([t + "-" + vf, t + "-" + d0]); }, []), f2 = /* @__PURE__ */ [].concat(Cg, [p2]).reduce(function(e, t) { return e.concat([t, t + "-" + vf, t + "-" + d0]); }, []), VQ = "beforeRead", jQ = "read", HQ = "afterRead", UQ = "beforeMain", qQ = "main", WQ = "afterMain", KQ = "beforeWrite", GQ = "write", XQ = "afterWrite", gC = [VQ, jQ, HQ, UQ, qQ, WQ, KQ, GQ, XQ]; function ks(e) { return e ? (e.nodeName || "").toLowerCase() : null; } function Lo(e) { if (e == null) return window; if (e.toString() !== "[object Window]") { var t = e.ownerDocument; return t && t.defaultView || window; } return e; } function fd(e) { var t = Lo(e).Element; return e instanceof t || e instanceof Element; } function Oo(e) { var t = Lo(e).HTMLElement; return e instanceof t || e instanceof HTMLElement; } function MS(e) { if (typeof ShadowRoot > "u") return !1; var t = Lo(e).ShadowRoot; return e instanceof t || e instanceof ShadowRoot; } function YQ(e) { var t = e.state; Object.keys(t.elements).forEach(function(n) { var r = t.styles[n] || {}, a = t.attributes[n] || {}, o = t.elements[n]; !Oo(o) || !ks(o) || (Object.assign(o.style, r), Object.keys(a).forEach(function(i) { var s = a[i]; s === !1 ? o.removeAttribute(i) : o.setAttribute(i, s === !0 ? "" : s); })); }); } function ZQ(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 a = t.elements[r], o = 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; }, {}); !Oo(a) || !ks(a) || (Object.assign(a.style, s), Object.keys(o).forEach(function(l) { a.removeAttribute(l); })); }); }; } const QQ = { name: "applyStyles", enabled: !0, phase: "write", fn: YQ, effect: ZQ, requires: ["computeStyles"] }; function Di(e) { return e.split("-")[0]; } var Qc = Math.max, By = Math.min, gf = Math.round; function mC() { var e = navigator.userAgentData; return e != null && e.brands && Array.isArray(e.brands) ? e.brands.map(function(t) { return t.brand + "/" + t.version; }).join(" ") : navigator.userAgent; } function hL() { return !/^((?!chrome|android).)*safari/i.test(mC()); } function mf(e, t, n) { t === void 0 && (t = !1), n === void 0 && (n = !1); var r = e.getBoundingClientRect(), a = 1, o = 1; t && Oo(e) && (a = e.offsetWidth > 0 && gf(r.width) / e.offsetWidth || 1, o = e.offsetHeight > 0 && gf(r.height) / e.offsetHeight || 1); var i = fd(e) ? Lo(e) : window, s = i.visualViewport, l = !hL() && n, u = (r.left + (l && s ? s.offsetLeft : 0)) / a, c = (r.top + (l && s ? s.offsetTop : 0)) / o, d = r.width / a, f = r.height / o; return { width: d, height: f, top: c, right: u + d, bottom: c + f, left: u, x: u, y: c }; } function BS(e) { var t = mf(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 vL(e, t) { var n = t.getRootNode && t.getRootNode(); if (e.contains(t)) return !0; if (n && MS(n)) { var r = t; do { if (r && e.isSameNode(r)) return !0; r = r.parentNode || r.host; } while (r); } return !1; } function Hi(e) { return Lo(e).getComputedStyle(e); } function JQ(e) { return ["table", "td", "th"].indexOf(ks(e)) >= 0; } function ac(e) { return ((fd(e) ? e.ownerDocument : ( // $FlowFixMe[prop-missing] e.document )) || window.document).documentElement; } function h2(e) { return ks(e) === "html" ? e : ( // this is a quicker (but less type safe) way to save quite some bytes from the bundle // $FlowFixMe[incompatible-return] // $FlowFixMe[prop-missing] e.assignedSlot || // step into the shadow DOM of the parent of a slotted node e.parentNode || // DOM Element detected (MS(e) ? e.host : null) || // ShadowRoot detected // $FlowFixMe[incompatible-call]: HTMLElement is a Node ac(e) ); } function k8(e) { return !Oo(e) || // https://github.com/popperjs/popper-core/issues/837 Hi(e).position === "fixed" ? null : e.offsetParent; } function eJ(e) { var t = /firefox/i.test(mC()), n = /Trident/i.test(mC()); if (n && Oo(e)) { var r = Hi(e); if (r.position === "fixed") return null; } var a = h2(e); for (MS(a) && (a = a.host); Oo(a) && ["html", "body"].indexOf(ks(a)) < 0; ) { var o = Hi(a); if (o.transform !== "none" || o.perspective !== "none" || o.contain === "paint" || ["transform", "perspective"].indexOf(o.willChange) !== -1 || t && o.willChange === "filter" || t && o.filter && o.filter !== "none") return a; a = a.parentNode; } return null; } function Sg(e) { for (var t = Lo(e), n = k8(e); n && JQ(n) && Hi(n).position === "static"; ) n = k8(n); return n && (ks(n) === "html" || ks(n) === "body" && Hi(n).position === "static") ? t : n || eJ(e) || t; } function DS(e) { return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y"; } function Rv(e, t, n) { return Qc(e, By(t, n)); } function tJ(e, t, n) { var r = Rv(e, t, n); return r > n ? n : r; } function gL() { return { top: 0, right: 0, bottom: 0, left: 0 }; } function mL(e) { return Object.assign({}, gL(), e); } function yL(e, t) { return t.reduce(function(n, r) { return n[r] = e, n; }, {}); } var nJ = function(t, n) { return t = typeof t == "function" ? t(Object.assign({}, n.rects, { placement: n.placement })) : t, mL(typeof t != "number" ? t : yL(t, Cg)); }; function rJ(e) { var t, n = e.state, r = e.name, a = e.options, o = n.elements.arrow, i = n.modifiersData.popperOffsets, s = Di(n.placement), l = DS(s), u = [ao, ri].indexOf(s) >= 0, c = u ? "height" : "width"; if (!(!o || !i)) { var d = nJ(a.padding, n), f = BS(o), h = l === "y" ? ro : ao, p = l === "y" ? ni : ri, v = n.rects.reference[c] + n.rects.reference[l] - i[l] - n.rects.popper[c], m = i[l] - n.rects.reference[l], g = Sg(o), y = g ? l === "y" ? g.clientHeight || 0 : g.clientWidth || 0 : 0, x = v / 2 - m / 2, w = d[h], k = y - f[c] - d[p], C = y / 2 - f[c] / 2 + x, S = Rv(w, C, k), _ = l; n.modifiersData[r] = (t = {}, t[_] = S, t.centerOffset = S - C, t); } } function aJ(e) { var t = e.state, n = e.options, r = n.element, a = r === void 0 ? "[data-popper-arrow]" : r; if (a != null && !(typeof a == "string" && (a = t.elements.popper.querySelector(a), !a))) { if (process.env.NODE_ENV !== "production" && (Oo(a) || console.error(['Popper: "arrow" element must be an HTMLElement (not an SVGElement).', "To use an SVG arrow, wrap it in an HTMLElement that will be used as", "the arrow."].join(" "))), !vL(t.elements.popper, a)) { process.env.NODE_ENV !== "production" && console.error(['Popper: "arrow" modifier\'s `element` must be a child of the popper', "element."].join(" ")); return; } t.elements.arrow = a; } } const oJ = { name: "arrow", enabled: !0, phase: "main", fn: rJ, effect: aJ, requires: ["popperOffsets"], requiresIfExists: ["preventOverflow"] }; function yf(e) { return e.split("-")[1]; } var iJ = { top: "auto", right: "auto", bottom: "auto", left: "auto" }; function sJ(e, t) { var n = e.x, r = e.y, a = t.devicePixelRatio || 1; return { x: gf(n * a) / a || 0, y: gf(r * a) / a || 0 }; } function C8(e) { var t, n = e.popper, r = e.popperRect, a = e.placement, o = e.variation, i = e.offsets, s = e.position, l = e.gpuAcceleration, u = e.adaptive, c = e.roundOffsets, d = e.isFixed, f = i.x, h = f === void 0 ? 0 : f, p = i.y, v = p === void 0 ? 0 : p, m = typeof c == "function" ? c({ x: h, y: v }) : { x: h, y: v }; h = m.x, v = m.y; var g = i.hasOwnProperty("x"), y = i.hasOwnProperty("y"), x = ao, w = ro, k = window; if (u) { var C = Sg(n), S = "clientHeight", _ = "clientWidth"; if (C === Lo(n) && (C = ac(n), Hi(C).position !== "static" && s === "absolute" && (S = "scrollHeight", _ = "scrollWidth")), C = C, a === ro || (a === ao || a === ri) && o === d0) { w = ni; var T = d && C === k && k.visualViewport ? k.visualViewport.height : ( // $FlowFixMe[prop-missing] C[S] ); v -= T - r.height, v *= l ? 1 : -1; } if (a === ao || (a === ro || a === ni) && o === d0) { x = ri; var O = d && C === k && k.visualViewport ? k.visualViewport.width : ( // $FlowFixMe[prop-missing] C[_] ); h -= O - r.width, h *= l ? 1 : -1; } } var $ = Object.assign({ position: s }, u && iJ), A = c === !0 ? sJ({ x: h, y: v }, Lo(n)) : { x: h, y: v }; if (h = A.x, v = A.y, l) { var N; return Object.assign({}, $, (N = {}, N[w] = y ? "0" : "", N[x] = g ? "0" : "", N.transform = (k.devicePixelRatio || 1) <= 1 ? "translate(" + h + "px, " + v + "px)" : "translate3d(" + h + "px, " + v + "px, 0)", N)); } return Object.assign({}, $, (t = {}, t[w] = y ? v + "px" : "", t[x] = g ? h + "px" : "", t.transform = "", t)); } function lJ(e) { var t = e.state, n = e.options, r = n.gpuAcceleration, a = r === void 0 ? !0 : r, o = n.adaptive, i = o === void 0 ? !0 : o, s = n.roundOffsets, l = s === void 0 ? !0 : s; if (process.env.NODE_ENV !== "production") { var u = Hi(t.elements.popper).transitionProperty || ""; i && ["transform", "top", "right", "bottom", "left"].some(function(d) { return u.indexOf(d) >= 0; }) && console.warn(["Popper: Detected CSS transitions on at least one of the following", 'CSS properties: "transform", "top", "right", "bottom", "left".', ` `, 'Disable the "computeStyles" modifier\'s `adaptive` option to allow', "for smooth transitions, or remove these properties from the CSS", "transition declaration on the popper element if only transitioning", "opacity or background-color for example.", ` `, "We recommend using the popper element as a wrapper around an inner", "element that can have any CSS property transitioned for animations."].join(" ")); } var c = { placement: Di(t.placement), variation: yf(t.placement), popper: t.elements.popper, popperRect: t.rects.popper, gpuAcceleration: a, isFixed: t.options.strategy === "fixed" }; t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper, C8(Object.assign({}, c, { offsets: t.modifiersData.popperOffsets, position: t.options.strategy, adaptive: i, roundOffsets: l })))), t.modifiersData.arrow != null && (t.styles.arrow = Object.assign({}, t.styles.arrow, C8(Object.assign({}, c, { offsets: t.modifiersData.arrow, position: "absolute", adaptive: !1, roundOffsets: l })))), t.attributes.popper = Object.assign({}, t.attributes.popper, { "data-popper-placement": t.placement }); } const uJ = { name: "computeStyles", enabled: !0, phase: "beforeWrite", fn: lJ, data: {} }; var _m = { passive: !0 }; function cJ(e) { var t = e.state, n = e.instance, r = e.options, a = r.scroll, o = a === void 0 ? !0 : a, i = r.resize, s = i === void 0 ? !0 : i, l = Lo(t.elements.popper), u = [].concat(t.scrollParents.reference, t.scrollParents.popper); return o && u.forEach(function(c) { c.addEventListener("scroll", n.update, _m); }), s && l.addEventListener("resize", n.update, _m), function() { o && u.forEach(function(c) { c.removeEventListener("scroll", n.update, _m); }), s && l.removeEventListener("resize", n.update, _m); }; } const dJ = { name: "eventListeners", enabled: !0, phase: "write", fn: function() { }, effect: cJ, data: {} }; var pJ = { left: "right", right: "left", bottom: "top", top: "bottom" }; function U1(e) { return e.replace(/left|right|bottom|top/g, function(t) { return pJ[t]; }); } var fJ = { start: "end", end: "start" }; function S8(e) { return e.replace(/start|end/g, function(t) { return fJ[t]; }); } function RS(e) { var t = Lo(e), n = t.pageXOffset, r = t.pageYOffset; return { scrollLeft: n, scrollTop: r }; } function zS(e) { return mf(ac(e)).left + RS(e).scrollLeft; } function hJ(e, t) { var n = Lo(e), r = ac(e), a = n.visualViewport, o = r.clientWidth, i = r.clientHeight, s = 0, l = 0; if (a) { o = a.width, i = a.height; var u = hL(); (u || !u && t === "fixed") && (s = a.offsetLeft, l = a.offsetTop); } return { width: o, height: i, x: s + zS(e), y: l }; } function vJ(e) { var t, n = ac(e), r = RS(e), a = (t = e.ownerDocument) == null ? void 0 : t.body, o = Qc(n.scrollWidth, n.clientWidth, a ? a.scrollWidth : 0, a ? a.clientWidth : 0), i = Qc(n.scrollHeight, n.clientHeight, a ? a.scrollHeight : 0, a ? a.clientHeight : 0), s = -r.scrollLeft + zS(e), l = -r.scrollTop; return Hi(a || n).direction === "rtl" && (s += Qc(n.clientWidth, a ? a.clientWidth : 0) - o), { width: o, height: i, x: s, y: l }; } function VS(e) { var t = Hi(e), n = t.overflow, r = t.overflowX, a = t.overflowY; return /auto|scroll|overlay|hidden/.test(n + a + r); } function bL(e) { return ["html", "body", "#document"].indexOf(ks(e)) >= 0 ? e.ownerDocument.body : Oo(e) && VS(e) ? e : bL(h2(e)); } function zv(e, t) { var n; t === void 0 && (t = []); var r = bL(e), a = r === ((n = e.ownerDocument) == null ? void 0 : n.body), o = Lo(r), i = a ? [o].concat(o.visualViewport || [], VS(r) ? r : []) : r, s = t.concat(i); return a ? s : ( // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here s.concat(zv(h2(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 gJ(e, t) { var n = mf(e, !1, t === "fixed"); return n.top = n.top + e.clientTop, n.left = n.left + e.clientLeft, n.bottom = n.top + e.clientHeight, n.right = n.left + e.clientWidth, n.width = e.clientWidth, n.height = e.clientHeight, n.x = n.left, n.y = n.top, n; } function E8(e, t, n) { return t === fL ? yC(hJ(e, n)) : fd(t) ? gJ(t, n) : yC(vJ(ac(e))); } function mJ(e) { var t = zv(h2(e)), n = ["absolute", "fixed"].indexOf(Hi(e).position) >= 0, r = n && Oo(e) ? Sg(e) : e; return fd(r) ? t.filter(function(a) { return fd(a) && vL(a, r) && ks(a) !== "body"; }) : []; } function yJ(e, t, n, r) { var a = t === "clippingParents" ? mJ(e) : [].concat(t), o = [].concat(a, [n]), i = o[0], s = o.reduce(function(l, u) { var c = E8(e, u, r); return l.top = Qc(c.top, l.top), l.right = By(c.right, l.right), l.bottom = By(c.bottom, l.bottom), l.left = Qc(c.left, l.left), l; }, E8(e, i, r)); return s.width = s.right - s.left, s.height = s.bottom - s.top, s.x = s.left, s.y = s.top, s; } function wL(e) { var t = e.reference, n = e.element, r = e.placement, a = r ? Di(r) : null, o = r ? yf(r) : null, i = t.x + t.width / 2 - n.width / 2, s = t.y + t.height / 2 - n.height / 2, l; switch (a) { case ro: l = { x: i, y: t.y - n.height }; break; case ni: l = { x: i, y: t.y + t.height }; break; case ri: l = { x: t.x + t.width, y: s }; break; case ao: l = { x: t.x - n.width, y: s }; break; default: l = { x: t.x, y: t.y }; } var u = a ? DS(a) : null; if (u != null) { var c = u === "y" ? "height" : "width"; switch (o) { case vf: l[u] = l[u] - (t[c] / 2 - n[c] / 2); break; case d0: l[u] = l[u] + (t[c] / 2 - n[c] / 2); break; } } return l; } function p0(e, t) { t === void 0 && (t = {}); var n = t, r = n.placement, a = r === void 0 ? e.placement : r, o = n.strategy, i = o === void 0 ? e.strategy : o, s = n.boundary, l = s === void 0 ? RQ : s, u = n.rootBoundary, c = u === void 0 ? fL : u, d = n.elementContext, f = d === void 0 ? Xh : d, h = n.altBoundary, p = h === void 0 ? !1 : h, v = n.padding, m = v === void 0 ? 0 : v, g = mL(typeof m != "number" ? m : yL(m, Cg)), y = f === Xh ? zQ : Xh, x = e.rects.popper, w = e.elements[p ? y : f], k = yJ(fd(w) ? w : w.contextElement || ac(e.elements.popper), l, c, i), C = mf(e.elements.reference), S = wL({ reference: C, element: x, strategy: "absolute", placement: a }), _ = yC(Object.assign({}, x, S)), T = f === Xh ? _ : C, O = { top: k.top - T.top + g.top, bottom: T.bottom - k.bottom + g.bottom, left: k.left - T.left + g.left, right: T.right - k.right + g.right }, $ = e.modifiersData.offset; if (f === Xh && $) { var A = $[a]; Object.keys(O).forEach(function(N) { var L = [ri, ni].indexOf(N) >= 0 ? 1 : -1, R = [ro, ni].indexOf(N) >= 0 ? "y" : "x"; O[N] += A[R] * L; }); } return O; } function bJ(e, t) { t === void 0 && (t = {}); var n = t, r = n.placement, a = n.boundary, o = n.rootBoundary, i = n.padding, s = n.flipVariations, l = n.allowedAutoPlacements, u = l === void 0 ? f2 : l, c = yf(r), d = c ? s ? x8 : x8.filter(function(p) { return yf(p) === c; }) : Cg, f = d.filter(function(p) { return u.indexOf(p) >= 0; }); f.length === 0 && (f = d, process.env.NODE_ENV !== "production" && console.error(["Popper: The `allowedAutoPlacements` option did not allow any", "placements. Ensure the `placement` option matches the variation", "of the allowed placements.", 'For example, "auto" cannot be used to allow "bottom-start".', 'Use "auto-start" instead.'].join(" "))); var h = f.reduce(function(p, v) { return p[v] = p0(e, { placement: v, boundary: a, rootBoundary: o, padding: i })[Di(v)], p; }, {}); return Object.keys(h).sort(function(p, v) { return h[p] - h[v]; }); } function wJ(e) { if (Di(e) === p2) return []; var t = U1(e); return [S8(e), t, S8(t)]; } function xJ(e) { var t = e.state, n = e.options, r = e.name; if (!t.modifiersData[r]._skip) { for (var a = n.mainAxis, o = a === void 0 ? !0 : a, i = n.altAxis, s = i === void 0 ? !0 : i, l = n.fallbackPlacements, u = n.padding, c = n.boundary, d = n.rootBoundary, f = n.altBoundary, h = n.flipVariations, p = h === void 0 ? !0 : h, v = n.allowedAutoPlacements, m = t.options.placement, g = Di(m), y = g === m, x = l || (y || !p ? [U1(m)] : wJ(m)), w = [m].concat(x).reduce(function(ve, ge) { return ve.concat(Di(ge) === p2 ? bJ(t, { placement: ge, boundary: c, rootBoundary: d, padding: u, flipVariations: p, allowedAutoPlacements: v }) : ge); }, []), k = t.rects.reference, C = t.rects.popper, S = /* @__PURE__ */ new Map(), _ = !0, T = w[0], O = 0; O < w.length; O++) { var $ = w[O], A = Di($), N = yf($) === vf, L = [ro, ni].indexOf(A) >= 0, R = L ? "width" : "height", P = p0(t, { placement: $, boundary: c, rootBoundary: d, altBoundary: f, padding: u }), B = L ? N ? ri : ao : N ? ni : ro; k[R] > C[R] && (B = U1(B)); var M = U1(B), z = []; if (o && z.push(P[A] <= 0), s && z.push(P[B] <= 0, P[M] <= 0), z.every(function(ve) { return ve; })) { T = $, _ = !1; break; } S.set($, z); } if (_) for (var Z = p ? 3 : 1, G = function(ge) { var oe = w.find(function(ee) { var q = S.get(ee); if (q) return q.slice(0, ge).every(function(Y) { return Y; }); }); if (oe) return T = oe, "break"; }, J = Z; J > 0; J--) { var se = G(J); if (se === "break") break; } t.placement !== T && (t.modifiersData[r]._skip = !0, t.placement = T, t.reset = !0); } } const kJ = { name: "flip", enabled: !0, phase: "main", fn: xJ, requiresIfExists: ["offset"], data: { _skip: !1 } }; function _8(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 T8(e) { return [ro, ri, ni, ao].some(function(t) { return e[t] >= 0; }); } function CJ(e) { var t = e.state, n = e.name, r = t.rects.reference, a = t.rects.popper, o = t.modifiersData.preventOverflow, i = p0(t, { elementContext: "reference" }), s = p0(t, { altBoundary: !0 }), l = _8(i, r), u = _8(s, a, o), c = T8(l), d = T8(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 }); } const SJ = { name: "hide", enabled: !0, phase: "main", requiresIfExists: ["preventOverflow"], fn: CJ }; function EJ(e, t, n) { var r = Di(e), a = [ao, ro].indexOf(r) >= 0 ? -1 : 1, o = typeof n == "function" ? n(Object.assign({}, t, { placement: e })) : n, i = o[0], s = o[1]; return i = i || 0, s = (s || 0) * a, [ao, ri].indexOf(r) >= 0 ? { x: s, y: i } : { x: i, y: s }; } function _J(e) { var t = e.state, n = e.options, r = e.name, a = n.offset, o = a === void 0 ? [0, 0] : a, i = f2.reduce(function(c, d) { return c[d] = EJ(d, t.rects, o), 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; } const TJ = { name: "offset", enabled: !0, phase: "main", requires: ["popperOffsets"], fn: _J }; function OJ(e) { var t = e.state, n = e.name; t.modifiersData[n] = wL({ reference: t.rects.reference, element: t.rects.popper, strategy: "absolute", placement: t.placement }); } const $J = { name: "popperOffsets", enabled: !0, phase: "read", fn: OJ, data: {} }; function FJ(e) { return e === "x" ? "y" : "x"; } function AJ(e) { var t = e.state, n = e.options, r = e.name, a = n.mainAxis, o = a === void 0 ? !0 : a, i = n.altAxis, s = i === void 0 ? !1 : i, l = n.boundary, u = n.rootBoundary, c = n.altBoundary, d = n.padding, f = n.tether, h = f === void 0 ? !0 : f, p = n.tetherOffset, v = p === void 0 ? 0 : p, m = p0(t, { boundary: l, rootBoundary: u, padding: d, altBoundary: c }), g = Di(t.placement), y = yf(t.placement), x = !y, w = DS(g), k = FJ(w), C = t.modifiersData.popperOffsets, S = t.rects.reference, _ = t.rects.popper, T = typeof v == "function" ? v(Object.assign({}, t.rects, { placement: t.placement })) : v, O = typeof T == "number" ? { mainAxis: T, altAxis: T } : Object.assign({ mainAxis: 0, altAxis: 0 }, T), $ = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, A = { x: 0, y: 0 }; if (C) { if (o) { var N, L = w === "y" ? ro : ao, R = w === "y" ? ni : ri, P = w === "y" ? "height" : "width", B = C[w], M = B + m[L], z = B - m[R], Z = h ? -_[P] / 2 : 0, G = y === vf ? S[P] : _[P], J = y === vf ? -_[P] : -S[P], se = t.elements.arrow, ve = h && se ? BS(se) : { width: 0, height: 0 }, ge = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : gL(), oe = ge[L], ee = ge[R], q = Rv(0, S[P], ve[P]), Y = x ? S[P] / 2 - Z - q - oe - O.mainAxis : G - q - oe - O.mainAxis, te = x ? -S[P] / 2 + Z + q + ee + O.mainAxis : J + q + ee + O.mainAxis, we = t.elements.arrow && Sg(t.elements.arrow), Oe = we ? w === "y" ? we.clientTop || 0 : we.clientLeft || 0 : 0, Ne = (N = $ == null ? void 0 : $[w]) != null ? N : 0, xe = B + Y - Ne - Oe, $e = B + te - Ne, Se = Rv(h ? By(M, xe) : M, B, h ? Qc(z, $e) : z); C[w] = Se, A[w] = Se - B; } if (s) { var Pe, Me = w === "x" ? ro : ao, je = w === "x" ? ni : ri, Be = C[k], We = k === "y" ? "height" : "width", qe = Be + m[Me], Ge = Be - m[je], E = [ro, ao].indexOf(g) !== -1, V = (Pe = $ == null ? void 0 : $[k]) != null ? Pe : 0, ie = E ? qe : Be - S[We] - _[We] - V + O.altAxis, le = E ? Be + S[We] + _[We] - V - O.altAxis : Ge, re = h && E ? tJ(ie, Be, le) : Rv(h ? ie : qe, Be, h ? le : Ge); C[k] = re, A[k] = re - Be; } t.modifiersData[r] = A; } } const IJ = { name: "preventOverflow", enabled: !0, phase: "main", fn: AJ, requiresIfExists: ["offset"] }; function PJ(e) { return { scrollLeft: e.scrollLeft, scrollTop: e.scrollTop }; } function LJ(e) { return e === Lo(e) || !Oo(e) ? RS(e) : PJ(e); } function NJ(e) { var t = e.getBoundingClientRect(), n = gf(t.width) / e.offsetWidth || 1, r = gf(t.height) / e.offsetHeight || 1; return n !== 1 || r !== 1; } function MJ(e, t, n) { n === void 0 && (n = !1); var r = Oo(t), a = Oo(t) && NJ(t), o = ac(t), i = mf(e, a, n), s = { scrollLeft: 0, scrollTop: 0 }, l = { x: 0, y: 0 }; return (r || !r && !n) && ((ks(t) !== "body" || // https://github.com/popperjs/popper-core/issues/1078 VS(o)) && (s = LJ(t)), Oo(t) ? (l = mf(t, !0), l.x += t.clientLeft, l.y += t.clientTop) : o && (l.x = zS(o))), { x: i.left + s.scrollLeft - l.x, y: i.top + s.scrollTop - l.y, width: i.width, height: i.height }; } function BJ(e) { var t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set(), r = []; e.forEach(function(o) { t.set(o.name, o); }); function a(o) { n.add(o.name); var i = [].concat(o.requires || [], o.requiresIfExists || []); i.forEach(function(s) { if (!n.has(s)) { var l = t.get(s); l && a(l); } }), r.push(o); } return e.forEach(function(o) { n.has(o.name) || a(o); }), r; } function DJ(e) { var t = BJ(e); return gC.reduce(function(n, r) { return n.concat(t.filter(function(a) { return a.phase === r; })); }, []); } function RJ(e) { var t; return function() { return t || (t = new Promise(function(n) { Promise.resolve().then(function() { t = void 0, n(e()); }); })), t; }; } function Hl(e) { for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), r = 1; r < t; r++) n[r - 1] = arguments[r]; return [].concat(n).reduce(function(a, o) { return a.replace(/%s/, o); }, e); } var kc = 'Popper: modifier "%s" provided an invalid %s property, expected %s but got %s', zJ = 'Popper: modifier "%s" requires "%s", but "%s" modifier is not available', O8 = ["name", "enabled", "phase", "fn", "effect", "requires", "options"]; function VJ(e) { e.forEach(function(t) { [].concat(Object.keys(t), O8).filter(function(n, r, a) { return a.indexOf(n) === r; }).forEach(function(n) { switch (n) { case "name": typeof t.name != "string" && console.error(Hl(kc, String(t.name), '"name"', '"string"', '"' + String(t.name) + '"')); break; case "enabled": typeof t.enabled != "boolean" && console.error(Hl(kc, t.name, '"enabled"', '"boolean"', '"' + String(t.enabled) + '"')); break; case "phase": gC.indexOf(t.phase) < 0 && console.error(Hl(kc, t.name, '"phase"', "either " + gC.join(", "), '"' + String(t.phase) + '"')); break; case "fn": typeof t.fn != "function" && console.error(Hl(kc, t.name, '"fn"', '"function"', '"' + String(t.fn) + '"')); break; case "effect": t.effect != null && typeof t.effect != "function" && console.error(Hl(kc, t.name, '"effect"', '"function"', '"' + String(t.fn) + '"')); break; case "requires": t.requires != null && !Array.isArray(t.requires) && console.error(Hl(kc, t.name, '"requires"', '"array"', '"' + String(t.requires) + '"')); break; case "requiresIfExists": Array.isArray(t.requiresIfExists) || console.error(Hl(kc, t.name, '"requiresIfExists"', '"array"', '"' + String(t.requiresIfExists) + '"')); break; case "options": case "data": break; default: console.error('PopperJS: an invalid property has been provided to the "' + t.name + '" modifier, valid properties are ' + O8.map(function(r) { return '"' + r + '"'; }).join(", ") + '; but "' + n + '" was provided.'); } t.requires && t.requires.forEach(function(r) { e.find(function(a) { return a.name === r; }) == null && console.error(Hl(zJ, String(t.name), r, r)); }); }); }); } function jJ(e, t) { var n = /* @__PURE__ */ new Set(); return e.filter(function(r) { var a = t(r); if (!n.has(a)) return n.add(a), !0; }); } function HJ(e) { var t = e.reduce(function(n, r) { var a = n[r.name]; return n[r.name] = a ? Object.assign({}, a, r, { options: Object.assign({}, a.options, r.options), data: Object.assign({}, a.data, r.data) }) : r, n; }, {}); return Object.keys(t).map(function(n) { return t[n]; }); } var $8 = "Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.", UJ = "Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.", F8 = { placement: "bottom", modifiers: [], strategy: "absolute" }; function A8() { 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 qJ(e) { e === void 0 && (e = {}); var t = e, n = t.defaultModifiers, r = n === void 0 ? [] : n, a = t.defaultOptions, o = a === void 0 ? F8 : a; return function(s, l, u) { u === void 0 && (u = o); var c = { placement: "bottom", orderedModifiers: [], options: Object.assign({}, F8, o), modifiersData: {}, elements: { reference: s, popper: l }, attributes: {}, styles: {} }, d = [], f = !1, h = { state: c, setOptions: function(g) { var y = typeof g == "function" ? g(c.options) : g; v(), c.options = Object.assign({}, o, c.options, y), c.scrollParents = { reference: fd(s) ? zv(s) : s.contextElement ? zv(s.contextElement) : [], popper: zv(l) }; var x = DJ(HJ([].concat(r, c.options.modifiers))); if (c.orderedModifiers = x.filter(function($) { return $.enabled; }), process.env.NODE_ENV !== "production") { var w = jJ([].concat(x, c.options.modifiers), function($) { var A = $.name; return A; }); if (VJ(w), Di(c.options.placement) === p2) { var k = c.orderedModifiers.find(function($) { var A = $.name; return A === "flip"; }); k || console.error(['Popper: "auto" placements require the "flip" modifier be', "present and enabled to work."].join(" ")); } var C = Hi(l), S = C.marginTop, _ = C.marginRight, T = C.marginBottom, O = C.marginLeft; [S, _, T, O].some(function($) { return parseFloat($); }) && console.warn(['Popper: CSS "margin" styles cannot be used to apply padding', "between the popper and its reference element or boundary.", "To replicate margin, use the `offset` modifier, as well as", "the `padding` option in the `preventOverflow` and `flip`", "modifiers."].join(" ")); } return p(), h.update(); }, // Sync update – it will always be executed, even if not necessary. This // is useful for low frequency updates where sync behavior simplifies the // logic. // For high frequency updates (e.g. `resize` and `scroll` events), always // prefer the async Popper#update method forceUpdate: function() { if (!f) { var g = c.elements, y = g.reference, x = g.popper; if (!A8(y, x)) { process.env.NODE_ENV !== "production" && console.error($8); return; } c.rects = { reference: MJ(y, Sg(x), c.options.strategy === "fixed"), popper: BS(x) }, c.reset = !1, c.placement = c.options.placement, c.orderedModifiers.forEach(function($) { return c.modifiersData[$.name] = Object.assign({}, $.data); }); for (var w = 0, k = 0; k < c.orderedModifiers.length; k++) { if (process.env.NODE_ENV !== "production" && (w += 1, w > 100)) { console.error(UJ); break; } if (c.reset === !0) { c.reset = !1, k = -1; continue; } var C = c.orderedModifiers[k], S = C.fn, _ = C.options, T = _ === void 0 ? {} : _, O = C.name; typeof S == "function" && (c = S({ state: c, options: T, name: O, instance: h }) || c); } } }, // Async and optimistically optimized update – it will not be executed if // not necessary (debounced to run at most once-per-tick) update: RJ(function() { return new Promise(function(m) { h.forceUpdate(), m(c); }); }), destroy: function() { v(), f = !0; } }; if (!A8(s, l)) return process.env.NODE_ENV !== "production" && console.error($8), h; h.setOptions(u).then(function(m) { !f && u.onFirstUpdate && u.onFirstUpdate(m); }); function p() { c.orderedModifiers.forEach(function(m) { var g = m.name, y = m.options, x = y === void 0 ? {} : y, w = m.effect; if (typeof w == "function") { var k = w({ state: c, name: g, instance: h, options: x }), C = function() { }; d.push(k || C); } }); } function v() { d.forEach(function(m) { return m(); }), d = []; } return h; }; } var WJ = [dJ, $J, uJ, QQ, TJ, kJ, IJ, oJ, SJ], KJ = /* @__PURE__ */ qJ({ defaultModifiers: WJ }); const GJ = (e, t, n = {}) => { const r = { name: "updateState", enabled: !0, phase: "write", fn: ({ state: l }) => { const u = XJ(l); Object.assign(i.value, u); }, requires: ["computeStyles"] }, a = F(() => { const { onFirstUpdate: l, placement: u, strategy: c, modifiers: d } = b(n); return { onFirstUpdate: l, placement: u || "bottom", strategy: c || "absolute", modifiers: [ ...d || [], r, { name: "applyStyles", enabled: !1 } ] }; }), o = dn(), i = U({ styles: { popper: { position: b(a).strategy, left: "0", top: "0" }, arrow: { position: "absolute" } }, attributes: {} }), s = () => { o.value && (o.value.destroy(), o.value = void 0); }; return be(a, (l) => { const u = b(o); u && u.setOptions(l); }, { deep: !0 }), be([e, t], ([l, u]) => { s(), !(!l || !u) && (o.value = KJ(l, u, b(a))); }), kt(() => { s(); }), { state: F(() => { var l; return { ...((l = b(o)) == null ? void 0 : l.state) || {} }; }), styles: F(() => b(i).styles), attributes: F(() => b(i).attributes), update: () => { var l; return (l = b(o)) == null ? void 0 : l.update(); }, forceUpdate: () => { var l; return (l = b(o)) == null ? void 0 : l.forceUpdate(); }, instanceRef: F(() => b(o)) }; }; function XJ(e) { const t = Object.keys(e.elements), n = Ny(t.map((a) => [a, e.styles[a] || {}])), r = Ny(t.map((a) => [a, e.attributes[a]])); return { styles: n, attributes: r }; } function I8() { let e; const t = (r, a) => { n(), e = window.setTimeout(r, a); }, n = () => window.clearTimeout(e); return n2(() => n()), { registerTimeout: t, cancelTimeout: n }; } const bC = { prefix: Math.floor(Math.random() * 1e4), current: 0 }, YJ = Symbol("elIdInjection"), xL = () => tt() ? Te(YJ, bC) : bC, Eg = (e) => { const t = xL(); !Mr && t === bC && ia("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 = NS(); return F(() => b(e) || `${n.value}-id-${t.prefix}-${t.current++}`); }; let Rp = []; const P8 = (e) => { const t = e; t.key === c0.esc && Rp.forEach((n) => n(t)); }, ZJ = (e) => { nt(() => { Rp.length === 0 && document.addEventListener("keydown", P8), Mr && Rp.push(e); }), kt(() => { Rp = Rp.filter((t) => t !== e), Rp.length === 0 && Mr && document.removeEventListener("keydown", P8); }); }; let L8; const kL = () => { const e = NS(), t = xL(), n = F(() => `${e.value}-popper-container-${t.prefix}`), r = F(() => `#${n.value}`); return { id: n, selector: r }; }, QJ = (e) => { const t = document.createElement("div"); return t.id = e, document.body.appendChild(t), t; }, JJ = () => { const { id: e, selector: t } = kL(); return gg(() => { Mr && (process.env.NODE_ENV === "test" || !L8 || !document.body.querySelector(t.value)) && (L8 = QJ(e.value)); }), { id: e, selector: t }; }, eee = Dn({ showAfter: { type: Number, default: 0 }, hideAfter: { type: Number, default: 200 }, autoClose: { type: Number, default: 0 } }), tee = ({ showAfter: e, hideAfter: t, autoClose: n, open: r, close: a }) => { const { registerTimeout: o } = I8(), { registerTimeout: i, cancelTimeout: s } = I8(); return { onOpen: (c) => { o(() => { r(c); const d = b(n); Wr(d) && d > 0 && i(() => { a(c); }, d); }, b(e)); }, onClose: (c) => { s(), o(() => { a(c); }, b(t)); } }; }, CL = Symbol("elForwardRef"), nee = (e) => { rt(CL, { setForwardRef: (n) => { e.value = n; } }); }, ree = (e) => ({ mounted(t) { e(t); }, updated(t) { e(t); }, unmounted() { e(null); } }), N8 = { current: 0 }, M8 = U(0), SL = 2e3, B8 = Symbol("elZIndexContextKey"), EL = Symbol("zIndexContextKey"), _L = (e) => { const t = tt() ? Te(B8, N8) : N8, n = e || (tt() ? Te(EL, void 0) : void 0), r = F(() => { const i = b(n); return Wr(i) ? i : SL; }), a = F(() => r.value + M8.value), o = () => (t.current++, M8.value = t.current, a.value); return !Mr && !Te(B8) && ia("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: a, nextZIndex: o }; }; function aee(e) { let t; function n() { if (e.value == null) return; const { selectionStart: a, selectionEnd: o, value: i } = e.value; if (a == null || o == null) return; const s = i.slice(0, Math.max(0, a)), l = i.slice(Math.max(0, o)); t = { selectionStart: a, selectionEnd: o, value: i, beforeTxt: s, afterTxt: l }; } function r() { if (e.value == null || t == null) return; const { value: a } = e.value, { beforeTxt: o, afterTxt: i, selectionStart: s } = t; if (o == null || i == null || s == null) return; let l = a.length; if (a.endsWith(i)) l = a.length - i.length; else if (a.startsWith(o)) l = o.length; else { const u = o[s - 1], c = a.indexOf(u, s - 1); c !== -1 && (l = c + 1); } e.value.setSelectionRange(l, l); } return [n, r]; } const jS = d2({ type: String, values: LS, required: !1 }), TL = Symbol("size"), oee = () => { const e = Te(TL, {}); return F(() => b(e.size) || ""); }; function OL(e, { beforeFocus: t, afterFocus: n, beforeBlur: r, afterBlur: a } = {}) { const o = tt(), { emit: i } = o, s = dn(), l = U(!1), u = (f) => { ta(t) && t(f) || l.value || (l.value = !0, i("focus", f), n == null || n()); }, c = (f) => { var h; ta(r) && r(f) || f.relatedTarget && ((h = s.value) != null && h.contains(f.relatedTarget)) || (l.value = !1, i("blur", f), a == null || a()); }, d = () => { var f, h; (f = s.value) != null && f.contains(document.activeElement) && s.value !== document.activeElement || (h = e.value) == null || h.focus(); }; return be(s, (f) => { f && f.setAttribute("tabindex", "-1"); }), Ni(s, "focus", u, !0), Ni(s, "blur", c, !0), Ni(s, "click", d, !0), process.env.NODE_ENV === "test" && nt(() => { const f = Zc(e.value) ? e.value : document.querySelector("input,textarea"); f && (Ni(f, "focus", u, !0), Ni(f, "blur", c, !0)); }), { isFocused: l, wrapperRef: s, handleFocus: u, handleBlur: c }; } function $L({ afterComposition: e, emit: t }) { const n = U(!1), r = (s) => { t == null || t("compositionstart", s), n.value = !0; }, a = (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 = !TQ(c); }, o = (s) => { t == null || t("compositionend", s), n.value && (n.value = !1, Ue(() => e(s))); }; return { isComposing: n, handleComposition: (s) => { s.type === "compositionend" ? o(s) : a(s); }, handleCompositionStart: r, handleCompositionUpdate: a, handleCompositionEnd: o }; } const FL = Symbol("emptyValuesContextKey"), iee = "use-empty-values", see = ["", void 0, null], lee = void 0, uee = Dn({ emptyValues: Array, valueOnClear: { type: [String, Number, Boolean, Function], default: void 0, validator: (e) => ta(e) ? !e() : !e } }), cee = (e, t) => { const n = tt() ? Te(FL, U({})) : U({}), r = F(() => e.emptyValues || n.value.emptyValues || see), a = F(() => ta(e.valueOnClear) ? e.valueOnClear() : e.valueOnClear !== void 0 ? e.valueOnClear : ta(n.value.valueOnClear) ? n.value.valueOnClear() : n.value.valueOnClear !== void 0 ? n.value.valueOnClear : lee), o = (i) => r.value.includes(i); return r.value.includes(a.value) || ia(iee, "value-on-clear should be a value of empty-values"), { emptyValues: r, valueOnClear: a, isEmptyValue: o }; }, dee = Dn({ ariaLabel: String, ariaOrientation: { type: String, values: ["horizontal", "vertical", "undefined"] }, ariaControls: String }), Gd = (e) => oQ(dee, e), AL = Symbol(), Dy = U(); function HS(e, t = void 0) { const n = tt() ? Te(AL, Dy) : Dy; return e ? F(() => { var r, a; return (a = (r = n.value) == null ? void 0 : r[e]) != null ? a : t; }) : n; } function pee(e, t) { const n = HS(), r = In(e, F(() => { var s; return ((s = n.value) == null ? void 0 : s.namespace) || H1; })), a = cL(F(() => { var s; return (s = n.value) == null ? void 0 : s.locale; })), o = _L(F(() => { var s; return ((s = n.value) == null ? void 0 : s.zIndex) || SL; })), i = F(() => { var s; return b(t) || ((s = n.value) == null ? void 0 : s.size) || ""; }); return fee(F(() => b(n) || {})), { ns: r, locale: a, zIndex: o, size: i }; } const fee = (e, t, n = !1) => { var r; const a = !!tt(), o = a ? HS() : void 0, i = (r = void 0) != null ? r : a ? rt : void 0; if (!i) { ia("provideGlobalConfig", "provideGlobalConfig() can only be used inside setup()."); return; } const s = F(() => { const l = b(e); return o != null && o.value ? hee(o.value, l) : l; }); return i(AL, s), i(uL, F(() => s.value.locale)), i(dL, F(() => s.value.namespace)), i(EL, F(() => s.value.zIndex)), i(TL, { size: F(() => s.value.size || "") }), i(FL, F(() => ({ emptyValues: s.value.emptyValues, valueOnClear: s.value.valueOnClear }))), (n || !Dy.value) && (Dy.value = s.value), s; }, hee = (e, t) => { const n = [.../* @__PURE__ */ new Set([...m8(e), ...m8(t)])], r = {}; for (const a of n) r[a] = t[a] !== void 0 ? t[a] : e[a]; return r; }; var yn = (e, t) => { const n = e.__vccOpts || e; for (const [r, a] of t) n[r] = a; return n; }; const vee = Dn({ size: { type: Pt([Number, String]) }, color: { type: String } }), gee = X({ name: "ElIcon", inheritAttrs: !1 }), mee = /* @__PURE__ */ X({ ...gee, props: vee, setup(e) { const t = e, n = In("icon"), r = F(() => { const { size: a, color: o } = t; return !a && !o ? {} : { fontSize: Sv(a) ? void 0 : u0(a), "--color": o }; }); return (a, o) => (I(), j("i", Bt({ class: b(n).b(), style: b(r) }, a.$attrs), [ he(a.$slots, "default") ], 16)); } }); var yee = /* @__PURE__ */ yn(mee, [["__file", "icon.vue"]]); const Ir = qa(yee), US = Symbol("formContextKey"), Ry = Symbol("formItemContextKey"), _g = (e, t = {}) => { const n = U(void 0), r = t.prop ? n : pL("size"), a = t.global ? n : oee(), o = t.form ? { size: void 0 } : Te(US, void 0), i = t.formItem ? { size: void 0 } : Te(Ry, void 0); return F(() => r.value || b(e) || (i == null ? void 0 : i.size) || (o == null ? void 0 : o.size) || a.value || ""); }, Tg = (e) => { const t = pL("disabled"), n = Te(US, void 0); return F(() => t.value || b(e) || (n == null ? void 0 : n.disabled) || !1); }, v2 = () => { const e = Te(US, void 0), t = Te(Ry, void 0); return { form: e, formItem: t }; }, qS = (e, { formItemContext: t, disableIdGeneration: n, disableIdManagement: r }) => { n || (n = U(!1)), r || (r = U(!1)); const a = U(); let o; const i = F(() => { var s; return !!(!(e.label || e.ariaLabel) && t && t.inputIds && ((s = t.inputIds) == null ? void 0 : s.length) <= 1); }); return nt(() => { o = be([It(e, "id"), n], ([s, l]) => { const u = s ?? (l ? void 0 : Eg().value); u !== a.value && (t != null && t.removeInputId && (a.value && t.removeInputId(a.value), !(r != null && r.value) && !l && u && t.addInputId(u)), a.value = u); }, { immediate: !0 }); }), Yb(() => { o && o(), t != null && t.removeInputId && a.value && t.removeInputId(a.value); }), { isLabeledByFormItem: i, inputId: a }; }; let mi; const bee = ` height:0 !important; visibility:hidden !important; ${sG() ? "" : "overflow:hidden !important;"} position:absolute !important; z-index:-1000 !important; top:0 !important; right:0 !important; `, wee = [ "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 xee(e) { const t = window.getComputedStyle(e), n = t.getPropertyValue("box-sizing"), r = Number.parseFloat(t.getPropertyValue("padding-bottom")) + Number.parseFloat(t.getPropertyValue("padding-top")), a = Number.parseFloat(t.getPropertyValue("border-bottom-width")) + Number.parseFloat(t.getPropertyValue("border-top-width")); return { contextStyle: wee.map((i) => `${i}:${t.getPropertyValue(i)}`).join(";"), paddingSize: r, borderSize: a, boxSizing: n }; } function D8(e, t = 1, n) { var r; mi || (mi = document.createElement("textarea"), document.body.appendChild(mi)); const { paddingSize: a, borderSize: o, boxSizing: i, contextStyle: s } = xee(e); mi.setAttribute("style", `${s};${bee}`), mi.value = e.value || e.placeholder || ""; let l = mi.scrollHeight; const u = {}; i === "border-box" ? l = l + o : i === "content-box" && (l = l - a), mi.value = ""; const c = mi.scrollHeight - a; if (Wr(t)) { let d = c * t; i === "border-box" && (d = d + a + o), l = Math.max(d, l), u.minHeight = `${d}px`; } if (Wr(n)) { let d = c * n; i === "border-box" && (d = d + a + o), l = Math.min(d, l); } return u.height = `${l}px`, (r = mi.parentNode) == null || r.removeChild(mi), mi = void 0, u; } const kee = Dn({ id: { type: String, default: void 0 }, size: jS, disabled: Boolean, modelValue: { type: Pt([ 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: Pt([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: Bi }, prefixIcon: { type: Bi }, containerRole: { type: String, default: void 0 }, tabindex: { type: [String, Number], default: 0 }, validateEvent: { type: Boolean, default: !0 }, inputStyle: { type: Pt([Object, Array, String]), default: () => Dp({}) }, autofocus: Boolean, rows: { type: Number, default: 2 }, ...Gd(["ariaLabel"]) }), Cee = { [Ca]: (e) => Ea(e), input: (e) => Ea(e), change: (e) => Ea(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 }, See = X({ name: "ElInput", inheritAttrs: !1 }), Eee = /* @__PURE__ */ X({ ...See, props: kee, emits: Cee, setup(e, { expose: t, emit: n }) { const r = e, a = oh(), o = Cr(), i = F(() => { const V = {}; return r.containerRole === "combobox" && (V["aria-haspopup"] = a["aria-haspopup"], V["aria-owns"] = a["aria-owns"], V["aria-expanded"] = a["aria-expanded"]), V; }), s = F(() => [ r.type === "textarea" ? m.b() : v.b(), v.m(h.value), v.is("disabled", p.value), v.is("exceed", se.value), { [v.b("group")]: o.prepend || o.append, [v.m("prefix")]: o.prefix || r.prefixIcon, [v.m("suffix")]: o.suffix || r.suffixIcon || r.clearable || r.showPassword, [v.bm("suffix", "password-clear")]: z.value && Z.value, [v.b("hidden")]: r.type === "hidden" }, a.class ]), l = F(() => [ v.e("wrapper"), v.is("focus", T.value) ]), u = lL({ excludeKeys: F(() => Object.keys(i.value)) }), { form: c, formItem: d } = v2(), { inputId: f } = qS(r, { formItemContext: d }), h = _g(), p = Tg(), v = In("input"), m = In("textarea"), g = dn(), y = dn(), x = U(!1), w = U(!1), k = U(), C = dn(r.inputStyle), S = F(() => g.value || y.value), { wrapperRef: _, isFocused: T, handleFocus: O, handleBlur: $ } = OL(S, { beforeFocus() { return p.value; }, afterBlur() { var V; r.validateEvent && ((V = d == null ? void 0 : d.validate) == null || V.call(d, "blur").catch((ie) => ia(ie))); } }), A = F(() => { var V; return (V = c == null ? void 0 : c.statusIcon) != null ? V : !1; }), N = F(() => (d == null ? void 0 : d.validateState) || ""), L = F(() => N.value && sL[N.value]), R = F(() => w.value ? CQ : yQ), P = F(() => [ a.style ]), B = F(() => [ r.inputStyle, C.value, { resize: r.resize } ]), M = F(() => u2(r.modelValue) ? "" : String(r.modelValue)), z = F(() => r.clearable && !p.value && !r.readonly && !!M.value && (T.value || x.value)), Z = F(() => r.showPassword && !p.value && !r.readonly && !!M.value && (!!M.value || T.value)), G = F(() => r.showWordLimit && !!r.maxlength && (r.type === "text" || r.type === "textarea") && !p.value && !r.readonly && !r.showPassword), J = F(() => M.value.length), se = F(() => !!G.value && J.value > Number(r.maxlength)), ve = F(() => !!o.suffix || !!r.suffixIcon || z.value || r.showPassword || G.value || !!N.value && A.value), [ge, oe] = aee(g); nl(y, (V) => { if (Y(), !G.value || r.resize !== "both") return; const ie = V[0], { width: le } = ie.contentRect; k.value = { right: `calc(100% - ${le + 15 + 6}px)` }; }); const ee = () => { const { type: V, autosize: ie } = r; if (!(!Mr || V !== "textarea" || !y.value)) if (ie) { const le = na(ie) ? ie.minRows : void 0, re = na(ie) ? ie.maxRows : void 0, ke = D8(y.value, le, re); C.value = { overflowY: "hidden", ...ke }, Ue(() => { y.value.offsetHeight, C.value = ke; }); } else C.value = { minHeight: D8(y.value).minHeight }; }, Y = ((V) => { let ie = !1; return () => { var le; if (ie || !r.autosize) return; ((le = y.value) == null ? void 0 : le.offsetParent) === null || (V(), ie = !0); }; })(ee), te = () => { const V = S.value, ie = r.formatter ? r.formatter(M.value) : M.value; !V || V.value === ie || (V.value = ie); }, we = async (V) => { ge(); let { value: ie } = V.target; if (r.formatter && (ie = r.parser ? r.parser(ie) : ie), !Ne.value) { if (ie === M.value) { te(); return; } n(Ca, ie), n("input", ie), await Ue(), te(), oe(); } }, Oe = (V) => { n("change", V.target.value); }, { isComposing: Ne, handleCompositionStart: xe, handleCompositionUpdate: $e, handleCompositionEnd: Se } = $L({ emit: n, afterComposition: we }), Pe = () => { w.value = !w.value, Me(); }, Me = async () => { var V; await Ue(), (V = S.value) == null || V.focus(); }, je = () => { var V; return (V = S.value) == null ? void 0 : V.blur(); }, Be = (V) => { x.value = !1, n("mouseleave", V); }, We = (V) => { x.value = !0, n("mouseenter", V); }, qe = (V) => { n("keydown", V); }, Ge = () => { var V; (V = S.value) == null || V.select(); }, E = () => { n(Ca, ""), n("change", ""), n("clear"), n("input", ""); }; return be(() => r.modelValue, () => { var V; Ue(() => ee()), r.validateEvent && ((V = d == null ? void 0 : d.validate) == null || V.call(d, "change").catch((ie) => ia(ie))); }), be(M, () => te()), be(() => r.type, async () => { await Ue(), te(), ee(); }), nt(() => { !r.formatter && r.parser && ia("ElInput", "If you set the parser, you also need to set the formatter."), te(), Ue(ee); }), t({ input: g, textarea: y, ref: S, textareaStyle: B, autosize: It(r, "autosize"), isComposing: Ne, focus: Me, blur: je, select: Ge, clear: E, resizeTextarea: ee }), (V, ie) => (I(), j("div", Bt(b(i), { class: [ b(s), { [b(v).bm("group", "append")]: V.$slots.append, [b(v).bm("group", "prepend")]: V.$slots.prepend } ], style: b(P), role: V.containerRole, onMouseenter: We, onMouseleave: Be }), [ ne(" input "), V.type !== "textarea" ? (I(), j(Qe, { key: 0 }, [ ne(" prepend slot "), V.$slots.prepend ? (I(), j("div", { key: 0, class: H(b(v).be("group", "prepend")) }, [ he(V.$slots, "prepend") ], 2)) : ne("v-if", !0), W("div", { ref_key: "wrapperRef", ref: _, class: H(b(l)) }, [ ne(" prefix slot "), V.$slots.prefix || V.prefixIcon ? (I(), j("span", { key: 0, class: H(b(v).e("prefix")) }, [ W("span", { class: H(b(v).e("prefix-inner")) }, [ he(V.$slots, "prefix"), V.prefixIcon ? (I(), de(b(Ir), { key: 0, class: H(b(v).e("icon")) }, { default: K(() => [ (I(), de(ct(V.prefixIcon))) ]), _: 1 }, 8, ["class"])) : ne("v-if", !0) ], 2) ], 2)) : ne("v-if", !0), W("input", Bt({ id: b(f), ref_key: "input", ref: g, class: b(v).e("inner") }, b(u), { minlength: V.minlength, maxlength: V.maxlength, type: V.showPassword ? w.value ? "text" : "password" : V.type, disabled: b(p), readonly: V.readonly, autocomplete: V.autocomplete, tabindex: V.tabindex, "aria-label": V.ariaLabel, placeholder: V.placeholder, style: V.inputStyle, form: V.form, autofocus: V.autofocus, onCompositionstart: b(xe), onCompositionupdate: b($e), onCompositionend: b(Se), onInput: we, onChange: Oe, onKeydown: qe }), null, 16, ["id", "minlength", "maxlength", "type", "disabled", "readonly", "autocomplete", "tabindex", "aria-label", "placeholder", "form", "autofocus", "onCompositionstart", "onCompositionupdate", "onCompositionend"]), ne(" suffix slot "), b(ve) ? (I(), j("span", { key: 1, class: H(b(v).e("suffix")) }, [ W("span", { class: H(b(v).e("suffix-inner")) }, [ !b(z) || !b(Z) || !b(G) ? (I(), j(Qe, { key: 0 }, [ he(V.$slots, "suffix"), V.suffixIcon ? (I(), de(b(Ir), { key: 0, class: H(b(v).e("icon")) }, { default: K(() => [ (I(), de(ct(V.suffixIcon))) ]), _: 1 }, 8, ["class"])) : ne("v-if", !0) ], 64)) : ne("v-if", !0), b(z) ? (I(), de(b(Ir), { key: 1, class: H([b(v).e("icon"), b(v).e("clear")]), onMousedown: Je(b(pf), ["prevent"]), onClick: E }, { default: K(() => [ ue(b(PS)) ]), _: 1 }, 8, ["class", "onMousedown"])) : ne("v-if", !0), b(Z) ? (I(), de(b(Ir), { key: 2, class: H([b(v).e("icon"), b(v).e("password")]), onClick: Pe }, { default: K(() => [ (I(), de(ct(b(R)))) ]), _: 1 }, 8, ["class"])) : ne("v-if", !0), b(G) ? (I(), j("span", { key: 3, class: H(b(v).e("count")) }, [ W("span", { class: H(b(v).e("count-inner")) }, Fe(b(J)) + " / " + Fe(V.maxlength), 3) ], 2)) : ne("v-if", !0), b(N) && b(L) && b(A) ? (I(), de(b(Ir), { key: 4, class: H([ b(v).e("icon"), b(v).e("validateIcon"), b(v).is("loading", b(N) === "validating") ]) }, { default: K(() => [ (I(), de(ct(b(L)))) ]), _: 1 }, 8, ["class"])) : ne("v-if", !0) ], 2) ], 2)) : ne("v-if", !0) ], 2), ne(" append slot "), V.$slots.append ? (I(), j("div", { key: 1, class: H(b(v).be("group", "append")) }, [ he(V.$slots, "append") ], 2)) : ne("v-if", !0) ], 64)) : (I(), j(Qe, { key: 1 }, [ ne(" textarea "), W("textarea", Bt({ id: b(f), ref_key: "textarea", ref: y, class: [b(m).e("inner"), b(v).is("focus", b(T))] }, b(u), { minlength: V.minlength, maxlength: V.maxlength, tabindex: V.tabindex, disabled: b(p), readonly: V.readonly, autocomplete: V.autocomplete, style: b(B), "aria-label": V.ariaLabel, placeholder: V.placeholder, form: V.form, autofocus: V.autofocus, rows: V.rows, onCompositionstart: b(xe), onCompositionupdate: b($e), onCompositionend: b(Se), onInput: we, onFocus: b(O), onBlur: b($), onChange: Oe, onKeydown: qe }), null, 16, ["id", "minlength", "maxlength", "tabindex", "disabled", "readonly", "autocomplete", "aria-label", "placeholder", "form", "autofocus", "rows", "onCompositionstart", "onCompositionupdate", "onCompositionend", "onFocus", "onBlur"]), b(G) ? (I(), j("span", { key: 0, style: Ye(k.value), class: H(b(v).e("count")) }, Fe(b(J)) + " / " + Fe(V.maxlength), 7)) : ne("v-if", !0) ], 64)) ], 16, ["role"])); } }); var _ee = /* @__PURE__ */ yn(Eee, [["__file", "input.vue"]]); const g2 = qa(_ee), mp = 4, Tee = { 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" } }, Oee = ({ move: e, size: t, bar: n }) => ({ [n.size]: t, transform: `translate${n.axis}(${e}%)` }), WS = Symbol("scrollbarContextKey"), $ee = Dn({ vertical: Boolean, size: String, move: Number, ratio: { type: Number, required: !0 }, always: Boolean }), Fee = "Thumb", Aee = /* @__PURE__ */ X({ __name: "thumb", props: $ee, setup(e) { const t = e, n = Te(WS), r = In("scrollbar"); n || AS(Fee, "can not inject scrollbar context"); const a = U(), o = U(), i = U({}), s = U(!1); let l = !1, u = !1, c = Mr ? document.onselectstart : null; const d = F(() => Tee[t.vertical ? "vertical" : "horizontal"]), f = F(() => Oee({ size: t.size, move: t.move, bar: d.value })), h = F(() => a.value[d.value.offset] ** 2 / n.wrapElement[d.value.scrollSize] / t.ratio / o.value[d.value.offset]), p = (C) => { var S; if (C.stopPropagation(), C.ctrlKey || [1, 2].includes(C.button)) return; (S = window.getSelection()) == null || S.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 (!o.value || !a.value || !n.wrapElement) return; const S = Math.abs(C.target.getBoundingClientRect()[d.value.direction] - C[d.value.client]), _ = o.value[d.value.offset] / 2, T = (S - _) * 100 * h.value / a.value[d.value.offset]; n.wrapElement[d.value.scroll] = T * n.wrapElement[d.value.scrollSize] / 100; }, m = (C) => { C.stopImmediatePropagation(), l = !0, document.addEventListener("mousemove", g), document.addEventListener("mouseup", y), c = document.onselectstart, document.onselectstart = () => !1; }, g = (C) => { if (!a.value || !o.value || l === !1) return; const S = i.value[d.value.axis]; if (!S) return; const _ = (a.value.getBoundingClientRect()[d.value.direction] - C[d.value.client]) * -1, T = o.value[d.value.offset] - S, O = (_ - T) * 100 * h.value / a.value[d.value.offset]; n.wrapElement[d.value.scroll] = O * n.wrapElement[d.value.scrollSize] / 100; }, y = () => { l = !1, i.value[d.value.axis] = 0, document.removeEventListener("mousemove", g), document.removeEventListener("mouseup", y), k(), u && (s.value = !1); }, x = () => { u = !1, s.value = !!t.size; }, w = () => { u = !0, s.value = l; }; kt(() => { k(), document.removeEventListener("mouseup", y); }); const k = () => { document.onselectstart !== c && (document.onselectstart = c); }; return Ni(It(n, "scrollbarElement"), "mousemove", x), Ni(It(n, "scrollbarElement"), "mouseleave", w), (C, S) => (I(), de(vr, { name: b(r).b("fade"), persisted: "" }, { default: K(() => [ Xe(W("div", { ref_key: "instance", ref: a, class: H([b(r).e("bar"), b(r).is(b(d).key)]), onMousedown: v }, [ W("div", { ref_key: "thumb", ref: o, class: H(b(r).e("thumb")), style: Ye(b(f)), onMousedown: p }, null, 38) ], 34), [ [mt, C.always || s.value] ]) ]), _: 1 }, 8, ["name"])); } }); var R8 = /* @__PURE__ */ yn(Aee, [["__file", "thumb.vue"]]); const Iee = Dn({ always: { type: Boolean, default: !0 }, minSize: { type: Number, required: !0 } }), Pee = /* @__PURE__ */ X({ __name: "bar", props: Iee, setup(e, { expose: t }) { const n = e, r = Te(WS), a = U(0), o = U(0), i = U(""), s = U(""), l = U(1), u = U(1); return t({ handleScroll: (f) => { if (f) { const h = f.offsetHeight - mp, p = f.offsetWidth - mp; o.value = f.scrollTop * 100 / h * l.value, a.value = f.scrollLeft * 100 / p * u.value; } }, update: () => { const f = r == null ? void 0 : r.wrapElement; if (!f) return; const h = f.offsetHeight - mp, p = f.offsetWidth - mp, v = h ** 2 / f.scrollHeight, m = p ** 2 / f.scrollWidth, g = Math.max(v, n.minSize), y = Math.max(m, n.minSize); l.value = v / (h - v) / (g / (h - g)), u.value = m / (p - m) / (y / (p - y)), s.value = g + mp < h ? `${g}px` : "", i.value = y + mp < p ? `${y}px` : ""; } }), (f, h) => (I(), j(Qe, null, [ ue(R8, { move: a.value, ratio: u.value, size: i.value, always: f.always }, null, 8, ["move", "ratio", "size", "always"]), ue(R8, { move: o.value, ratio: l.value, size: s.value, vertical: "", always: f.always }, null, 8, ["move", "ratio", "size", "always"]) ], 64)); } }); var Lee = /* @__PURE__ */ yn(Pee, [["__file", "bar.vue"]]); const Nee = Dn({ height: { type: [String, Number], default: "" }, maxHeight: { type: [String, Number], default: "" }, native: { type: Boolean, default: !1 }, wrapStyle: { type: Pt([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, ...Gd(["ariaLabel", "ariaOrientation"]) }), Mee = { scroll: ({ scrollTop: e, scrollLeft: t }) => [e, t].every(Wr) }, wC = "ElScrollbar", Bee = X({ name: wC }), Dee = /* @__PURE__ */ X({ ...Bee, props: Nee, emits: Mee, setup(e, { expose: t, emit: n }) { const r = e, a = In("scrollbar"); let o, i, s = 0, l = 0; const u = U(), c = U(), d = U(), f = U(), h = F(() => { const k = {}; return r.height && (k.height = u0(r.height)), r.maxHeight && (k.maxHeight = u0(r.maxHeight)), [r.wrapStyle, k]; }), p = F(() => [ r.wrapClass, a.e("wrap"), { [a.em("wrap", "hidden-default")]: !r.native } ]), v = F(() => [a.e("view"), r.viewClass]), m = () => { var k; c.value && ((k = f.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) { na(k) ? c.value.scrollTo(k) : Wr(k) && Wr(C) && c.value.scrollTo(k, C); } const y = (k) => { if (!Wr(k)) { ia(wC, "value must be a number"); return; } c.value.scrollTop = k; }, x = (k) => { if (!Wr(k)) { ia(wC, "value must be a number"); return; } c.value.scrollLeft = k; }, w = () => { var k; (k = f.value) == null || k.update(); }; return be(() => r.noresize, (k) => { k ? (o == null || o(), i == null || i()) : ({ stop: o } = nl(d, w), i = Ni("resize", w)); }, { immediate: !0 }), be(() => [r.maxHeight, r.height], () => { r.native || Ue(() => { var k; w(), c.value && ((k = f.value) == null || k.handleScroll(c.value)); }); }), rt(WS, tn({ scrollbarElement: u, wrapElement: c })), Zb(() => { c.value && (c.value.scrollTop = s, c.value.scrollLeft = l); }), nt(() => { r.native || Ue(() => { w(); }); }), jd(() => w()), t({ wrapRef: c, update: w, scrollTo: g, setScrollTop: y, setScrollLeft: x, handleScroll: m }), (k, C) => (I(), j("div", { ref_key: "scrollbarRef", ref: u, class: H(b(a).b()) }, [ W("div", { ref_key: "wrapRef", ref: c, class: H(b(p)), style: Ye(b(h)), tabindex: k.tabindex, onScroll: m }, [ (I(), de(ct(k.tag), { id: k.id, ref_key: "resizeRef", ref: d, class: H(b(v)), style: Ye(k.viewStyle), role: k.role, "aria-label": k.ariaLabel, "aria-orientation": k.ariaOrientation }, { default: K(() => [ he(k.$slots, "default") ]), _: 3 }, 8, ["id", "class", "style", "role", "aria-label", "aria-orientation"])) ], 46, ["tabindex"]), k.native ? ne("v-if", !0) : (I(), de(Lee, { key: 0, ref_key: "barRef", ref: f, always: k.always, "min-size": k.minSize }, null, 8, ["always", "min-size"])) ], 2)); } }); var Ree = /* @__PURE__ */ yn(Dee, [["__file", "scrollbar.vue"]]); const IL = qa(Ree), KS = Symbol("popper"), PL = Symbol("popperContent"), zee = [ "dialog", "grid", "group", "listbox", "menu", "navigation", "tooltip", "tree" ], LL = Dn({ role: { type: String, values: zee, default: "tooltip" } }), Vee = X({ name: "ElPopper", inheritAttrs: !1 }), jee = /* @__PURE__ */ X({ ...Vee, props: LL, setup(e, { expose: t }) { const n = e, r = U(), a = U(), o = U(), i = U(), s = F(() => n.role), l = { triggerRef: r, popperInstanceRef: a, contentRef: o, referenceRef: i, role: s }; return t(l), rt(KS, l), (u, c) => he(u.$slots, "default"); } }); var Hee = /* @__PURE__ */ yn(jee, [["__file", "popper.vue"]]); const NL = Dn({ arrowOffset: { type: Number, default: 5 } }), Uee = X({ name: "ElPopperArrow", inheritAttrs: !1 }), qee = /* @__PURE__ */ X({ ...Uee, props: NL, setup(e, { expose: t }) { const n = e, r = In("popper"), { arrowOffset: a, arrowRef: o, arrowStyle: i } = Te(PL, void 0); return be(() => n.arrowOffset, (s) => { a.value = s; }), kt(() => { o.value = void 0; }), t({ arrowRef: o }), (s, l) => (I(), j("span", { ref_key: "arrowRef", ref: o, class: H(b(r).e("arrow")), style: Ye(b(i)), "data-popper-arrow": "" }, null, 6)); } }); var Wee = /* @__PURE__ */ yn(qee, [["__file", "arrow.vue"]]); const Sx = "ElOnlyChild", Kee = X({ name: Sx, setup(e, { slots: t, attrs: n }) { var r; const a = Te(CL), o = ree((r = a == null ? void 0 : a.setForwardRef) != null ? r : pf); return () => { var i; const s = (i = t.default) == null ? void 0 : i.call(t, n); if (!s) return null; if (s.length > 1) return ia(Sx, "requires exact only one valid child."), null; const l = ML(s); return l ? Xe(mg(l, n), [[o]]) : (ia(Sx, "no valid child node found"), null); }; } }); function ML(e) { if (!e) return null; const t = e; for (const n of t) { if (na(n)) switch (n.type) { case yg: continue; case Ps: case "svg": return z8(n); case Qe: return ML(n.children); default: return n; } return z8(n); } return null; } function z8(e) { const t = In("only-child"); return ue("span", { class: t.e("content") }, [e]); } const BL = Dn({ virtualRef: { type: Pt(Object) }, virtualTriggering: Boolean, onMouseenter: { type: Pt(Function) }, onMouseleave: { type: Pt(Function) }, onClick: { type: Pt(Function) }, onKeydown: { type: Pt(Function) }, onFocus: { type: Pt(Function) }, onBlur: { type: Pt(Function) }, onContextmenu: { type: Pt(Function) }, id: String, open: Boolean }), Gee = X({ name: "ElPopperTrigger", inheritAttrs: !1 }), Xee = /* @__PURE__ */ X({ ...Gee, props: BL, setup(e, { expose: t }) { const n = e, { role: r, triggerRef: a } = Te(KS, void 0); nee(a); const o = F(() => s.value ? n.id : void 0), i = F(() => { if (r && r.value === "tooltip") return n.open && n.id ? n.id : void 0; }), s = F(() => { if (r && r.value !== "tooltip") return r.value; }), l = F(() => s.value ? `${n.open}` : void 0); let u; const c = [ "onMouseenter", "onMouseleave", "onClick", "onKeydown", "onFocus", "onBlur", "onContextmenu" ]; return nt(() => { be(() => n.virtualRef, (d) => { d && (a.value = ul(d)); }, { immediate: !0 }), be(a, (d, f) => { u == null || u(), u = void 0, Zc(d) && (c.forEach((h) => { var p; const v = n[h]; v && (d.addEventListener(h.slice(2).toLowerCase(), v), (p = f == null ? void 0 : f.removeEventListener) == null || p.call(f, h.slice(2).toLowerCase(), v)); }), u = be([o, i, s, l], (h) => { [ "aria-controls", "aria-describedby", "aria-haspopup", "aria-expanded" ].forEach((p, v) => { u2(h[v]) ? d.removeAttribute(p) : d.setAttribute(p, h[v]); }); }, { immediate: !0 })), Zc(f) && [ "aria-controls", "aria-describedby", "aria-haspopup", "aria-expanded" ].forEach((h) => f.removeAttribute(h)); }, { immediate: !0 }); }), kt(() => { if (u == null || u(), u = void 0, a.value && Zc(a.value)) { const d = a.value; c.forEach((f) => { const h = n[f]; h && d.removeEventListener(f.slice(2).toLowerCase(), h); }), a.value = void 0; } }), t({ triggerRef: a }), (d, f) => d.virtualTriggering ? ne("v-if", !0) : (I(), de(b(Kee), Bt({ key: 0 }, d.$attrs, { "aria-controls": b(o), "aria-describedby": b(i), "aria-expanded": b(l), "aria-haspopup": b(s) }), { default: K(() => [ he(d.$slots, "default") ]), _: 3 }, 16, ["aria-controls", "aria-describedby", "aria-expanded", "aria-haspopup"])); } }); var Yee = /* @__PURE__ */ yn(Xee, [["__file", "trigger.vue"]]); const Ex = "focus-trap.focus-after-trapped", _x = "focus-trap.focus-after-released", Zee = "focus-trap.focusout-prevented", V8 = { cancelable: !0, bubbles: !1 }, Qee = { cancelable: !0, bubbles: !1 }, j8 = "focusAfterTrapped", H8 = "focusAfterReleased", Jee = Symbol("elFocusTrap"), GS = U(), m2 = U(0), XS = U(0); let Tm = 0; const DL = (e) => { const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, { acceptNode: (r) => { const a = r.tagName === "INPUT" && r.type === "hidden"; return r.disabled || r.hidden || a ? NodeFilter.FILTER_SKIP : r.tabIndex >= 0 || r === document.activeElement ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP; } }); for (; n.nextNode(); ) t.push(n.currentNode); return t; }, U8 = (e, t) => { for (const n of e) if (!ete(n, t)) return n; }, ete = (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; }, tte = (e) => { const t = DL(e), n = U8(t, e), r = U8(t.reverse(), e); return [n, r]; }, nte = (e) => e instanceof HTMLInputElement && "select" in e, tu = (e, t) => { if (e && e.focus) { const n = document.activeElement; e.focus({ preventScroll: !0 }), XS.value = window.performance.now(), e !== n && nte(e) && t && e.select(); } }; function q8(e, t) { const n = [...e], r = e.indexOf(t); return r !== -1 && n.splice(r, 1), n; } const rte = () => { let e = []; return { push: (r) => { const a = e[0]; a && r !== a && a.pause(), e = q8(e, r), e.unshift(r); }, remove: (r) => { var a, o; e = q8(e, r), (o = (a = e[0]) == null ? void 0 : a.resume) == null || o.call(a); } }; }, ate = (e, t = !1) => { const n = document.activeElement; for (const r of e) if (tu(r, t), document.activeElement !== n) return; }, W8 = rte(), ote = () => m2.value > XS.value, Om = () => { GS.value = "pointer", m2.value = window.performance.now(); }, K8 = () => { GS.value = "keyboard", m2.value = window.performance.now(); }, ite = () => (nt(() => { Tm === 0 && (document.addEventListener("mousedown", Om), document.addEventListener("touchstart", Om), document.addEventListener("keydown", K8)), Tm++; }), kt(() => { Tm--, Tm <= 0 && (document.removeEventListener("mousedown", Om), document.removeEventListener("touchstart", Om), document.removeEventListener("keydown", K8)); }), { focusReason: GS, lastUserFocusTimestamp: m2, lastAutomatedFocusTimestamp: XS }), $m = (e) => new CustomEvent(Zee, { ...Qee, detail: e }), ste = X({ name: "ElFocusTrap", inheritAttrs: !1, props: { loop: Boolean, trapped: Boolean, focusTrapEl: Object, focusStartEl: { type: [Object, String], default: "first" } }, emits: [ j8, H8, "focusin", "focusout", "focusout-prevented", "release-requested" ], setup(e, { emit: t }) { const n = U(); let r, a; const { focusReason: o } = ite(); ZJ((p) => { e.trapped && !i.paused && t("release-requested", p); }); const i = { paused: !1, pause() { this.paused = !0; }, resume() { this.paused = !1; } }, s = (p) => { if (!e.loop && !e.trapped || i.paused) return; const { key: v, altKey: m, ctrlKey: g, metaKey: y, currentTarget: x, shiftKey: w } = p, { loop: k } = e, C = v === c0.tab && !m && !g && !y, S = document.activeElement; if (C && S) { const _ = x, [T, O] = tte(_); if (T && O) { if (!w && S === O) { const A = $m({ focusReason: o.value }); t("focusout-prevented", A), A.defaultPrevented || (p.preventDefault(), k && tu(T, !0)); } else if (w && [T, _].includes(S)) { const A = $m({ focusReason: o.value }); t("focusout-prevented", A), A.defaultPrevented || (p.preventDefault(), k && tu(O, !0)); } } else if (S === _) { const A = $m({ focusReason: o.value }); t("focusout-prevented", A), A.defaultPrevented || p.preventDefault(); } } }; rt(Jee, { focusTrapRef: n, onKeydown: s }), be(() => e.focusTrapEl, (p) => { p && (n.value = p); }, { immediate: !0 }), be([n], ([p], [v]) => { p && (p.addEventListener("keydown", s), p.addEventListener("focusin", c), p.addEventListener("focusout", d)), v && (v.removeEventListener("keydown", s), v.removeEventListener("focusin", c), v.removeEventListener("focusout", d)); }); const l = (p) => { t(j8, p); }, u = (p) => t(H8, p), c = (p) => { const v = b(n); if (!v) return; const m = p.target, g = p.relatedTarget, y = m && v.contains(m); e.trapped || g && v.contains(g) || (r = g), y && t("focusin", p), !i.paused && e.trapped && (y ? a = m : tu(a, !0)); }, d = (p) => { const v = b(n); if (!(i.paused || !v)) if (e.trapped) { const m = p.relatedTarget; !u2(m) && !v.contains(m) && setTimeout(() => { if (!i.paused && e.trapped) { const g = $m({ focusReason: o.value }); t("focusout-prevented", g), g.defaultPrevented || tu(a, !0); } }, 0); } else { const m = p.target; m && v.contains(m) || t("focusout", p); } }; async function f() { await Ue(); const p = b(n); if (p) { W8.push(i); const v = p.contains(document.activeElement) ? r : document.activeElement; if (r = v, !p.contains(v)) { const g = new Event(Ex, V8); p.addEventListener(Ex, l), p.dispatchEvent(g), g.defaultPrevented || Ue(() => { let y = e.focusStartEl; Ea(y) || (tu(y), document.activeElement !== y && (y = "first")), y === "first" && ate(DL(p), !0), (document.activeElement === v || y === "container") && tu(p); }); } } } function h() { const p = b(n); if (p) { p.removeEventListener(Ex, l); const v = new CustomEvent(_x, { ...V8, detail: { focusReason: o.value } }); p.addEventListener(_x, u), p.dispatchEvent(v), !v.defaultPrevented && (o.value == "keyboard" || !ote() || p.contains(document.activeElement)) && tu(r ?? document.body), p.removeEventListener(_x, u), W8.remove(i); } } return nt(() => { e.trapped && f(), be(() => e.trapped, (p) => { p ? f() : h(); }); }), kt(() => { 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 lte(e, t, n, r, a, o) { return he(e.$slots, "default", { handleKeydown: e.onKeydown }); } var ute = /* @__PURE__ */ yn(ste, [["render", lte], ["__file", "focus-trap.vue"]]); const cte = ["fixed", "absolute"], dte = Dn({ boundariesPadding: { type: Number, default: 0 }, fallbackPlacements: { type: Pt(Array), default: void 0 }, gpuAcceleration: { type: Boolean, default: !0 }, offset: { type: Number, default: 12 }, placement: { type: String, values: f2, default: "bottom" }, popperOptions: { type: Pt(Object), default: () => ({}) }, strategy: { type: String, values: cte, default: "absolute" } }), RL = Dn({ ...dte, id: String, style: { type: Pt([String, Array, Object]) }, className: { type: Pt([String, Array, Object]) }, effect: { type: Pt(String), default: "dark" }, visible: Boolean, enterable: { type: Boolean, default: !0 }, pure: Boolean, focusOnShow: { type: Boolean, default: !1 }, trapping: { type: Boolean, default: !1 }, popperClass: { type: Pt([String, Array, Object]) }, popperStyle: { type: Pt([String, Array, Object]) }, referenceEl: { type: Pt(Object) }, triggerTargetEl: { type: Pt(Object) }, stopPopperMouseEvent: { type: Boolean, default: !0 }, virtualTriggering: Boolean, zIndex: Number, ...Gd(["ariaLabel"]) }), pte = { mouseenter: (e) => e instanceof MouseEvent, mouseleave: (e) => e instanceof MouseEvent, focus: () => !0, blur: () => !0, close: () => !0 }, fte = (e, t = []) => { const { placement: n, strategy: r, popperOptions: a } = e, o = { placement: n, strategy: r, ...a, modifiers: [...vte(e), ...t] }; return gte(o, a == null ? void 0 : a.modifiers), o; }, hte = (e) => { if (Mr) return ul(e); }; function vte(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 gte(e, t) { t && (e.modifiers = [...e.modifiers, ...t ?? []]); } const mte = 0, yte = (e) => { const { popperInstanceRef: t, contentRef: n, triggerRef: r, role: a } = Te(KS, void 0), o = U(), i = U(), s = F(() => ({ name: "eventListeners", enabled: !!e.visible })), l = F(() => { var g; const y = b(o), x = (g = b(i)) != null ? g : mte; return { name: "arrow", enabled: !tQ(y), options: { element: y, padding: x } }; }), u = F(() => ({ onFirstUpdate: () => { p(); }, ...fte(e, [ b(l), b(s) ]) })), c = F(() => hte(e.referenceEl) || b(r)), { attributes: d, state: f, styles: h, update: p, forceUpdate: v, instanceRef: m } = GJ(c, n, u); return be(m, (g) => t.value = g), nt(() => { be(() => { var g; return (g = b(c)) == null ? void 0 : g.getBoundingClientRect(); }, () => { p(); }); }), { attributes: d, arrowRef: o, contentRef: n, instanceRef: m, state: f, styles: h, role: a, forceUpdate: v, update: p }; }, bte = (e, { attributes: t, styles: n, role: r }) => { const { nextZIndex: a } = _L(), o = In("popper"), i = F(() => b(t).popper), s = U(Wr(e.zIndex) ? e.zIndex : a()), l = F(() => [ o.b(), o.is("pure", e.pure), o.is(e.effect), e.popperClass ]), u = F(() => [ { zIndex: b(s) }, b(n).popper, e.popperStyle || {} ]), c = F(() => r.value === "dialog" ? "false" : void 0), d = F(() => b(n).arrow || {}); return { ariaModal: c, arrowStyle: d, contentAttrs: i, contentClass: l, contentStyle: u, contentZIndex: s, updateZIndex: () => { s.value = Wr(e.zIndex) ? e.zIndex : a(); } }; }, wte = (e, t) => { const n = U(!1), r = U(); 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"); } }; }, xte = X({ name: "ElPopperContent" }), kte = /* @__PURE__ */ X({ ...xte, props: RL, emits: pte, setup(e, { expose: t, emit: n }) { const r = e, { focusStartRef: a, trapped: o, onFocusAfterReleased: i, onFocusAfterTrapped: s, onFocusInTrap: l, onFocusoutPrevented: u, onReleaseRequested: c } = wte(r, n), { attributes: d, arrowRef: f, contentRef: h, styles: p, instanceRef: v, role: m, update: g } = yte(r), { ariaModal: y, arrowStyle: x, contentAttrs: w, contentClass: k, contentStyle: C, updateZIndex: S } = bte(r, { styles: p, attributes: d, role: m }), _ = Te(Ry, void 0), T = U(); rt(PL, { arrowStyle: x, arrowRef: f, arrowOffset: T }), _ && rt(Ry, { ..._, addInputId: pf, removeInputId: pf }); let O; const $ = (N = !0) => { g(), N && S(); }, A = () => { $(!1), r.visible && r.focusOnShow ? o.value = !0 : r.visible === !1 && (o.value = !1); }; return nt(() => { be(() => r.triggerTargetEl, (N, L) => { O == null || O(), O = void 0; const R = b(N || h.value), P = b(L || h.value); Zc(R) && (O = be([m, () => r.ariaLabel, y, () => r.id], (B) => { ["role", "aria-label", "aria-modal", "id"].forEach((M, z) => { u2(B[z]) ? R.removeAttribute(M) : R.setAttribute(M, B[z]); }); }, { immediate: !0 })), P !== R && Zc(P) && ["role", "aria-label", "aria-modal", "id"].forEach((B) => { P.removeAttribute(B); }); }, { immediate: !0 }), be(() => r.visible, A, { immediate: !0 }); }), kt(() => { O == null || O(), O = void 0; }), t({ popperContentRef: h, popperInstanceRef: v, updatePopper: $, contentStyle: C }), (N, L) => (I(), j("div", Bt({ ref_key: "contentRef", ref: h }, b(w), { style: b(C), class: b(k), tabindex: "-1", onMouseenter: (R) => N.$emit("mouseenter", R), onMouseleave: (R) => N.$emit("mouseleave", R) }), [ ue(b(ute), { trapped: b(o), "trap-on-focus-in": !0, "focus-trap-el": b(h), "focus-start-el": b(a), onFocusAfterTrapped: b(s), onFocusAfterReleased: b(i), onFocusin: b(l), onFocusoutPrevented: b(u), onReleaseRequested: b(c) }, { default: K(() => [ he(N.$slots, "default") ]), _: 3 }, 8, ["trapped", "focus-trap-el", "focus-start-el", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusin", "onFocusoutPrevented", "onReleaseRequested"]) ], 16, ["onMouseenter", "onMouseleave"])); } }); var Cte = /* @__PURE__ */ yn(kte, [["__file", "content.vue"]]); const Ste = qa(Hee), YS = Symbol("elTooltip"), Ga = Dn({ ...eee, ...RL, appendTo: { type: Pt([String, Object]) }, content: { type: String, default: "" }, rawContent: Boolean, persistent: Boolean, visible: { type: Pt(Boolean), default: null }, transition: String, teleported: { type: Boolean, default: !0 }, disabled: Boolean, ...Gd(["ariaLabel"]) }), f0 = Dn({ ...BL, disabled: Boolean, trigger: { type: Pt([String, Array]), default: "hover" }, triggerKeys: { type: Pt(Array), default: () => [c0.enter, c0.space] } }), { useModelToggleProps: Ete, useModelToggleEmits: _te, useModelToggle: Tte } = DQ("visible"), Ote = Dn({ ...LL, ...Ete, ...Ga, ...f0, ...NL, showArrow: { type: Boolean, default: !0 } }), $te = [ ..._te, "before-show", "before-hide", "show", "hide", "open", "close" ], Fte = (e, t) => Go(e) ? e.includes(t) : e === t, yp = (e, t, n) => (r) => { Fte(b(e), t) && n(r); }, Ate = X({ name: "ElTooltipTrigger" }), Ite = /* @__PURE__ */ X({ ...Ate, props: f0, setup(e, { expose: t }) { const n = e, r = In("tooltip"), { controlled: a, id: o, open: i, onOpen: s, onClose: l, onToggle: u } = Te(YS, void 0), c = U(null), d = () => { if (b(a) || n.disabled) return !0; }, f = It(n, "trigger"), h = Zs(d, yp(f, "hover", s)), p = Zs(d, yp(f, "hover", l)), v = Zs(d, yp(f, "click", (w) => { w.button === 0 && u(w); })), m = Zs(d, yp(f, "focus", s)), g = Zs(d, yp(f, "focus", l)), y = Zs(d, yp(f, "contextmenu", (w) => { w.preventDefault(), u(w); })), x = Zs(d, (w) => { const { code: k } = w; n.triggerKeys.includes(k) && (w.preventDefault(), u(w)); }); return t({ triggerRef: c }), (w, k) => (I(), de(b(Yee), { id: b(o), "virtual-ref": w.virtualRef, open: b(i), "virtual-triggering": w.virtualTriggering, class: H(b(r).e("trigger")), onBlur: b(g), onClick: b(v), onContextmenu: b(y), onFocus: b(m), onMouseenter: b(h), onMouseleave: b(p), onKeydown: b(x) }, { default: K(() => [ he(w.$slots, "default") ]), _: 3 }, 8, ["id", "virtual-ref", "open", "virtual-triggering", "class", "onBlur", "onClick", "onContextmenu", "onFocus", "onMouseenter", "onMouseleave", "onKeydown"])); } }); var Pte = /* @__PURE__ */ yn(Ite, [["__file", "trigger.vue"]]); const Lte = Dn({ to: { type: Pt([String, Object]), required: !0 }, disabled: Boolean }), Nte = /* @__PURE__ */ X({ __name: "teleport", props: Lte, setup(e) { return (t, n) => t.disabled ? he(t.$slots, "default", { key: 0 }) : (I(), de(bg, { key: 1, to: t.to }, [ he(t.$slots, "default") ], 8, ["to"])); } }); var Mte = /* @__PURE__ */ yn(Nte, [["__file", "teleport.vue"]]); const Bte = qa(Mte), Dte = X({ name: "ElTooltipContent", inheritAttrs: !1 }), Rte = /* @__PURE__ */ X({ ...Dte, props: Ga, setup(e, { expose: t }) { const n = e, { selector: r } = kL(), a = In("tooltip"), o = U(null); let i; const { controlled: s, id: l, open: u, trigger: c, onClose: d, onOpen: f, onShow: h, onHide: p, onBeforeShow: v, onBeforeHide: m } = Te(YS, void 0), g = F(() => n.transition || `${a.namespace.value}-fade-in-linear`), y = F(() => process.env.NODE_ENV === "test" ? !0 : n.persistent); kt(() => { i == null || i(); }); const x = F(() => b(y) ? !0 : b(u)), w = F(() => n.disabled ? !1 : b(u)), k = F(() => n.appendTo || r.value), C = F(() => { var P; return (P = n.style) != null ? P : {}; }), S = U(!0), _ = () => { p(), S.value = !0; }, T = () => { if (b(s)) return !0; }, O = Zs(T, () => { n.enterable && b(c) === "hover" && f(); }), $ = Zs(T, () => { b(c) === "hover" && d(); }), A = () => { var P, B; (B = (P = o.value) == null ? void 0 : P.updatePopper) == null || B.call(P), v == null || v(); }, N = () => { m == null || m(); }, L = () => { h(), i = DP(F(() => { var P; return (P = o.value) == null ? void 0 : P.popperContentRef; }), () => { if (b(s)) return; b(c) !== "hover" && d(); }); }, R = () => { n.virtualTriggering || d(); }; return be(() => b(u), (P) => { P ? S.value = !1 : i == null || i(); }, { flush: "post" }), be(() => n.content, () => { var P, B; (B = (P = o.value) == null ? void 0 : P.updatePopper) == null || B.call(P); }), t({ contentRef: o }), (P, B) => (I(), de(b(Bte), { disabled: !P.teleported, to: b(k) }, { default: K(() => [ ue(vr, { name: b(g), onAfterLeave: _, onBeforeEnter: A, onAfterEnter: L, onBeforeLeave: N }, { default: K(() => [ b(x) ? Xe((I(), de(b(Cte), Bt({ key: 0, id: b(l), ref_key: "contentRef", ref: o }, P.$attrs, { "aria-label": P.ariaLabel, "aria-hidden": S.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, b(C)], "reference-el": P.referenceEl, "trigger-target-el": P.triggerTargetEl, visible: b(w), "z-index": P.zIndex, onMouseenter: b(O), onMouseleave: b($), onBlur: R, onClose: b(d) }), { default: K(() => [ he(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"])), [ [mt, b(w)] ]) : ne("v-if", !0) ]), _: 3 }, 8, ["name"]) ]), _: 3 }, 8, ["disabled", "to"])); } }); var zte = /* @__PURE__ */ yn(Rte, [["__file", "content.vue"]]); const Vte = X({ name: "ElTooltip" }), jte = /* @__PURE__ */ X({ ...Vte, props: Ote, emits: $te, setup(e, { expose: t, emit: n }) { const r = e; JJ(); const a = Eg(), o = U(), i = U(), s = () => { var g; const y = b(o); y && ((g = y.popperInstanceRef) == null || g.update()); }, l = U(!1), u = U(), { show: c, hide: d, hasUpdateHandler: f } = Tte({ indicator: l, toggleReason: u }), { onOpen: h, onClose: p } = tee({ showAfter: It(r, "showAfter"), hideAfter: It(r, "hideAfter"), autoClose: It(r, "autoClose"), open: c, close: d }), v = F(() => Yc(r.visible) && !f.value); rt(YS, { controlled: v, id: a, open: ih(l), trigger: It(r, "trigger"), onOpen: (g) => { h(g); }, onClose: (g) => { p(g); }, onToggle: (g) => { b(l) ? p(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 }), be(() => r.disabled, (g) => { g && l.value && (l.value = !1); }); const m = (g) => { var y, x; const w = (x = (y = i.value) == null ? void 0 : y.contentRef) == null ? void 0 : x.popperContentRef, k = (g == null ? void 0 : g.relatedTarget) || document.activeElement; return w && w.contains(k); }; return wg(() => l.value && d()), t({ popperRef: o, contentRef: i, isFocusInsideContent: m, updatePopper: s, onOpen: h, onClose: p, hide: d }), (g, y) => (I(), de(b(Ste), { ref_key: "popperRef", ref: o, role: g.role }, { default: K(() => [ ue(Pte, { disabled: g.disabled, trigger: g.trigger, "trigger-keys": g.triggerKeys, "virtual-ref": g.virtualRef, "virtual-triggering": g.virtualTriggering }, { default: K(() => [ g.$slots.default ? he(g.$slots, "default", { key: 0 }) : ne("v-if", !0) ]), _: 3 }, 8, ["disabled", "trigger", "trigger-keys", "virtual-ref", "virtual-triggering"]), ue(zte, { 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: K(() => [ he(g.$slots, "content", {}, () => [ g.rawContent ? (I(), j("span", { key: 0, innerHTML: g.content }, null, 8, ["innerHTML"])) : (I(), j("span", { key: 1 }, Fe(g.content), 1)) ]), g.showArrow ? (I(), de(b(Wee), { key: 0, "arrow-offset": g.arrowOffset }, null, 8, ["arrow-offset"])) : ne("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 Hte = /* @__PURE__ */ yn(jte, [["__file", "tooltip.vue"]]); const ZS = qa(Hte), Ute = Dn({ valueKey: { type: String, default: "value" }, modelValue: { type: [String, Number], default: "" }, debounce: { type: Number, default: 300 }, placement: { type: Pt(String), values: [ "top", "top-start", "top-end", "bottom", "bottom-start", "bottom-end" ], default: "bottom-start" }, fetchSuggestions: { type: Pt([Function, Array]), default: pf }, popperClass: { type: String, default: "" }, triggerOnFocus: { type: Boolean, default: !0 }, selectWhenUnmatched: { type: Boolean, default: !1 }, hideLoading: { type: Boolean, default: !1 }, teleported: Ga.teleported, highlightFirstItem: { type: Boolean, default: !1 }, fitInputWidth: { type: Boolean, default: !1 }, clearable: { type: Boolean, default: !1 }, disabled: { type: Boolean, default: !1 }, name: String, ...Gd(["ariaLabel"]) }), qte = { [Ca]: (e) => Ea(e), [hf]: (e) => Ea(e), [pd]: (e) => Ea(e), focus: (e) => e instanceof FocusEvent, blur: (e) => e instanceof FocusEvent, clear: () => !0, select: (e) => na(e) }, zL = "ElAutocomplete", Wte = X({ name: zL, inheritAttrs: !1 }), Kte = /* @__PURE__ */ X({ ...Wte, props: Ute, emits: qte, setup(e, { expose: t, emit: n }) { const r = e, a = lL(), o = oh(), i = Tg(), s = In("autocomplete"), l = U(), u = U(), c = U(), d = U(); let f = !1, h = !1; const p = U([]), v = U(-1), m = U(""), g = U(!1), y = U(!1), x = U(!1), w = Eg(), k = F(() => o.style), C = F(() => (p.value.length > 0 || x.value) && g.value), S = F(() => !r.hideLoading && x.value), _ = F(() => l.value ? Array.from(l.value.$el.querySelectorAll("input")) : []), T = () => { C.value && (m.value = `${l.value.$el.offsetWidth}px`); }, O = () => { v.value = -1; }, $ = async (ee) => { if (y.value) return; const q = (Y) => { x.value = !1, !y.value && (Go(Y) ? (p.value = Y, v.value = r.highlightFirstItem ? 0 : -1) : AS(zL, "autocomplete suggestions must be an array")); }; if (x.value = !0, Go(r.fetchSuggestions)) q(r.fetchSuggestions); else { const Y = await r.fetchSuggestions(ee, q); Go(Y) && q(Y); } }, A = nL($, r.debounce), N = (ee) => { const q = !!ee; if (n(hf, ee), n(Ca, ee), y.value = !1, g.value || (g.value = q), !r.triggerOnFocus && !ee) { y.value = !0, p.value = []; return; } A(ee); }, L = (ee) => { var q; i.value || (((q = ee.target) == null ? void 0 : q.tagName) !== "INPUT" || _.value.includes(document.activeElement)) && (g.value = !0); }, R = (ee) => { n(pd, ee); }, P = (ee) => { h ? h = !1 : (g.value = !0, n("focus", ee), r.triggerOnFocus && !f && A(String(r.modelValue))); }, B = (ee) => { setTimeout(() => { var q; if ((q = c.value) != null && q.isFocusInsideContent()) { h = !0; return; } g.value && G(), n("blur", ee); }); }, M = () => { g.value = !1, n(Ca, ""), n("clear"); }, z = async () => { C.value && v.value >= 0 && v.value < p.value.length ? ve(p.value[v.value]) : r.selectWhenUnmatched && (n("select", { value: r.modelValue }), p.value = [], v.value = -1); }, Z = (ee) => { C.value && (ee.preventDefault(), ee.stopPropagation(), G()); }, G = () => { g.value = !1; }, J = () => { var ee; (ee = l.value) == null || ee.focus(); }, se = () => { var ee; (ee = l.value) == null || ee.blur(); }, ve = async (ee) => { n(hf, ee[r.valueKey]), n(Ca, ee[r.valueKey]), n("select", ee), p.value = [], v.value = -1; }, ge = (ee) => { if (!C.value || x.value) return; if (ee < 0) { v.value = -1; return; } ee >= p.value.length && (ee = p.value.length - 1); const q = u.value.querySelector(`.${s.be("suggestion", "wrap")}`), te = q.querySelectorAll(`.${s.be("suggestion", "list")} li`)[ee], we = q.scrollTop, { offsetTop: Oe, scrollHeight: Ne } = te; Oe + Ne > we + q.clientHeight && (q.scrollTop += Ne), Oe < we && (q.scrollTop -= Ne), v.value = ee, l.value.ref.setAttribute("aria-activedescendant", `${w.value}-item-${v.value}`); }, oe = DP(d, () => { C.value && G(); }); return kt(() => { oe == null || oe(); }), nt(() => { 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}`), f = l.value.ref.hasAttribute("readonly"); }), t({ highlightedIndex: v, activated: g, loading: x, inputRef: l, popperRef: c, suggestions: p, handleSelect: ve, handleKeyEnter: z, focus: J, blur: se, close: G, highlight: ge, getData: $ }), (ee, q) => (I(), de(b(ZS), { ref_key: "popperRef", ref: c, visible: b(C), placement: ee.placement, "fallback-placements": ["bottom-start", "top-start"], "popper-class": [b(s).e("popper"), ee.popperClass], teleported: ee.teleported, "gpu-acceleration": !1, pure: "", "manual-mode": "", effect: "light", trigger: "click", transition: `${b(s).namespace.value}-zoom-in-top`, persistent: "", role: "listbox", onBeforeShow: T, onHide: O }, { content: K(() => [ W("div", { ref_key: "regionRef", ref: u, class: H([b(s).b("suggestion"), b(s).is("loading", b(S))]), style: Ye({ [ee.fitInputWidth ? "width" : "minWidth"]: m.value, outline: "none" }), role: "region" }, [ ue(b(IL), { id: b(w), tag: "ul", "wrap-class": b(s).be("suggestion", "wrap"), "view-class": b(s).be("suggestion", "list"), role: "listbox" }, { default: K(() => [ b(S) ? (I(), j("li", { key: 0 }, [ he(ee.$slots, "loading", {}, () => [ ue(b(Ir), { class: H(b(s).is("loading")) }, { default: K(() => [ ue(b(c2)) ]), _: 1 }, 8, ["class"]) ]) ])) : (I(!0), j(Qe, { key: 1 }, Nt(p.value, (Y, te) => (I(), j("li", { id: `${b(w)}-item-${te}`, key: te, class: H({ highlighted: v.value === te }), role: "option", "aria-selected": v.value === te, onClick: (we) => ve(Y) }, [ he(ee.$slots, "default", { item: Y }, () => [ et(Fe(Y[ee.valueKey]), 1) ]) ], 10, ["id", "aria-selected", "onClick"]))), 128)) ]), _: 3 }, 8, ["id", "wrap-class", "view-class"]) ], 6) ]), default: K(() => [ W("div", { ref_key: "listboxRef", ref: d, class: H([b(s).b(), ee.$attrs.class]), style: Ye(b(k)), role: "combobox", "aria-haspopup": "listbox", "aria-expanded": b(C), "aria-owns": b(w) }, [ ue(b(g2), Bt({ ref_key: "inputRef", ref: l }, b(a), { clearable: ee.clearable, disabled: b(i), name: ee.name, "model-value": ee.modelValue, "aria-label": ee.ariaLabel, onInput: N, onChange: R, onFocus: P, onBlur: B, onClear: M, onKeydown: [ gn(Je((Y) => ge(v.value - 1), ["prevent"]), ["up"]), gn(Je((Y) => ge(v.value + 1), ["prevent"]), ["down"]), gn(z, ["enter"]), gn(G, ["tab"]), gn(Z, ["esc"]) ], onMousedown: L }), PP({ _: 2 }, [ ee.$slots.prepend ? { name: "prepend", fn: K(() => [ he(ee.$slots, "prepend") ]) } : void 0, ee.$slots.append ? { name: "append", fn: K(() => [ he(ee.$slots, "append") ]) } : void 0, ee.$slots.prefix ? { name: "prefix", fn: K(() => [ he(ee.$slots, "prefix") ]) } : void 0, ee.$slots.suffix ? { name: "suffix", fn: K(() => [ he(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 Gte = /* @__PURE__ */ yn(Kte, [["__file", "autocomplete.vue"]]); const VL = qa(Gte), jL = Symbol("buttonGroupContextKey"), Xte = (e, t) => { FQ({ from: "type.text", replacement: "link", version: "3.0.0", scope: "props", ref: "https://element-plus.org/en-US/component/button.html#button-attributes" }, F(() => e.type === "text")); const n = Te(jL, void 0), r = HS("button"), { form: a } = v2(), o = _g(F(() => n == null ? void 0 : n.size)), i = Tg(), s = U(), l = Cr(), u = F(() => e.type || (n == null ? void 0 : n.type) || ""), c = F(() => { var p, v, m; return (m = (v = e.autoInsertSpace) != null ? v : (p = r.value) == null ? void 0 : p.autoInsertSpace) != null ? m : !1; }), d = F(() => e.tag === "button" ? { ariaDisabled: i.value || e.loading, disabled: i.value || e.loading, autofocus: e.autofocus, type: e.nativeType } : {}), f = F(() => { var p; const v = (p = l.default) == null ? void 0 : p.call(l); if (c.value && (v == null ? void 0 : v.length) === 1) { const m = v[0]; if ((m == null ? void 0 : m.type) === Ps) { const g = m.children; return new RegExp("^\\p{Unified_Ideograph}{2}$", "u").test(g.trim()); } } return !1; }); return { _disabled: i, _size: o, _type: u, _ref: s, _props: d, shouldAddSpace: f, handleClick: (p) => { if (i.value || e.loading) { p.stopPropagation(); return; } e.nativeType === "reset" && (a == null || a.resetFields()), t("click", p); } }; }, Yte = [ "default", "primary", "success", "warning", "info", "danger", "text", "" ], Zte = ["button", "submit", "reset"], xC = Dn({ size: jS, disabled: Boolean, type: { type: String, values: Yte, default: "" }, icon: { type: Bi }, nativeType: { type: String, values: Zte, default: "button" }, loading: Boolean, loadingIcon: { type: Bi, default: () => c2 }, 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: Pt([String, Object]), default: "button" } }), Qte = { click: (e) => e instanceof MouseEvent }; function sa(e, t) { Jte(e) && (e = "100%"); var n = ene(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 Fm(e) { return Math.min(1, Math.max(0, e)); } function Jte(e) { return typeof e == "string" && e.indexOf(".") !== -1 && parseFloat(e) === 1; } function ene(e) { return typeof e == "string" && e.indexOf("%") !== -1; } function HL(e) { return e = parseFloat(e), (isNaN(e) || e < 0 || e > 1) && (e = 1), e; } function Am(e) { return e <= 1 ? "".concat(Number(e) * 100, "%") : e; } function zc(e) { return e.length === 1 ? "0" + e : String(e); } function tne(e, t, n) { return { r: sa(e, 255) * 255, g: sa(t, 255) * 255, b: sa(n, 255) * 255 }; } function G8(e, t, n) { e = sa(e, 255), t = sa(t, 255), n = sa(n, 255); var r = Math.max(e, t, n), a = Math.min(e, t, n), o = 0, i = 0, s = (r + a) / 2; if (r === a) i = 0, o = 0; else { var l = r - a; switch (i = s > 0.5 ? l / (2 - r - a) : l / (r + a), r) { case e: o = (t - n) / l + (t < n ? 6 : 0); break; case t: o = (n - e) / l + 2; break; case n: o = (e - t) / l + 4; break; } o /= 6; } return { h: o, s: i, l: s }; } function Tx(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 nne(e, t, n) { var r, a, o; if (e = sa(e, 360), t = sa(t, 100), n = sa(n, 100), t === 0) a = n, o = n, r = n; else { var i = n < 0.5 ? n * (1 + t) : n + t - n * t, s = 2 * n - i; r = Tx(s, i, e + 1 / 3), a = Tx(s, i, e), o = Tx(s, i, e - 1 / 3); } return { r: r * 255, g: a * 255, b: o * 255 }; } function X8(e, t, n) { e = sa(e, 255), t = sa(t, 255), n = sa(n, 255); var r = Math.max(e, t, n), a = Math.min(e, t, n), o = 0, i = r, s = r - a, l = r === 0 ? 0 : s / r; if (r === a) o = 0; else { switch (r) { case e: o = (t - n) / s + (t < n ? 6 : 0); break; case t: o = (n - e) / s + 2; break; case n: o = (e - t) / s + 4; break; } o /= 6; } return { h: o, s: l, v: i }; } function rne(e, t, n) { e = sa(e, 360) * 6, t = sa(t, 100), n = sa(n, 100); var r = Math.floor(e), a = e - r, o = n * (1 - t), i = n * (1 - a * t), s = n * (1 - (1 - a) * t), l = r % 6, u = [n, i, o, o, s, n][l], c = [s, n, n, i, o, o][l], d = [o, o, s, n, n, i][l]; return { r: u * 255, g: c * 255, b: d * 255 }; } function Y8(e, t, n, r) { var a = [ zc(Math.round(e).toString(16)), zc(Math.round(t).toString(16)), zc(Math.round(n).toString(16)) ]; return r && a[0].startsWith(a[0].charAt(1)) && a[1].startsWith(a[1].charAt(1)) && a[2].startsWith(a[2].charAt(1)) ? a[0].charAt(0) + a[1].charAt(0) + a[2].charAt(0) : a.join(""); } function ane(e, t, n, r, a) { var o = [ zc(Math.round(e).toString(16)), zc(Math.round(t).toString(16)), zc(Math.round(n).toString(16)), zc(one(r)) ]; return a && o[0].startsWith(o[0].charAt(1)) && o[1].startsWith(o[1].charAt(1)) && o[2].startsWith(o[2].charAt(1)) && o[3].startsWith(o[3].charAt(1)) ? o[0].charAt(0) + o[1].charAt(0) + o[2].charAt(0) + o[3].charAt(0) : o.join(""); } function one(e) { return Math.round(parseFloat(e) * 255).toString(16); } function Z8(e) { return Co(e) / 255; } function Co(e) { return parseInt(e, 16); } function ine(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 sne(e) { var t = { r: 0, g: 0, b: 0 }, n = 1, r = null, a = null, o = null, i = !1, s = !1; return typeof e == "string" && (e = cne(e)), typeof e == "object" && (js(e.r) && js(e.g) && js(e.b) ? (t = tne(e.r, e.g, e.b), i = !0, s = String(e.r).substr(-1) === "%" ? "prgb" : "rgb") : js(e.h) && js(e.s) && js(e.v) ? (r = Am(e.s), a = Am(e.v), t = rne(e.h, r, a), i = !0, s = "hsv") : js(e.h) && js(e.s) && js(e.l) && (r = Am(e.s), o = Am(e.l), t = nne(e.h, r, o), i = !0, s = "hsl"), Object.prototype.hasOwnProperty.call(e, "a") && (n = e.a)), n = HL(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 lne = "[-\\+]?\\d+%?", une = "[-\\+]?\\d*\\.\\d+%?", ku = "(?:".concat(une, ")|(?:").concat(lne, ")"), Ox = "[\\s|\\(]+(".concat(ku, ")[,|\\s]+(").concat(ku, ")[,|\\s]+(").concat(ku, ")\\s*\\)?"), $x = "[\\s|\\(]+(".concat(ku, ")[,|\\s]+(").concat(ku, ")[,|\\s]+(").concat(ku, ")[,|\\s]+(").concat(ku, ")\\s*\\)?"), xi = { CSS_UNIT: new RegExp(ku), rgb: new RegExp("rgb" + Ox), rgba: new RegExp("rgba" + $x), hsl: new RegExp("hsl" + Ox), hsla: new RegExp("hsla" + $x), hsv: new RegExp("hsv" + Ox), hsva: new RegExp("hsva" + $x), 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 cne(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 = xi.rgb.exec(e); return n ? { r: n[1], g: n[2], b: n[3] } : (n = xi.rgba.exec(e), n ? { r: n[1], g: n[2], b: n[3], a: n[4] } : (n = xi.hsl.exec(e), n ? { h: n[1], s: n[2], l: n[3] } : (n = xi.hsla.exec(e), n ? { h: n[1], s: n[2], l: n[3], a: n[4] } : (n = xi.hsv.exec(e), n ? { h: n[1], s: n[2], v: n[3] } : (n = xi.hsva.exec(e), n ? { h: n[1], s: n[2], v: n[3], a: n[4] } : (n = xi.hex8.exec(e), n ? { r: Co(n[1]), g: Co(n[2]), b: Co(n[3]), a: Z8(n[4]), format: t ? "name" : "hex8" } : (n = xi.hex6.exec(e), n ? { r: Co(n[1]), g: Co(n[2]), b: Co(n[3]), format: t ? "name" : "hex" } : (n = xi.hex4.exec(e), n ? { r: Co(n[1] + n[1]), g: Co(n[2] + n[2]), b: Co(n[3] + n[3]), a: Z8(n[4] + n[4]), format: t ? "name" : "hex8" } : (n = xi.hex3.exec(e), n ? { r: Co(n[1] + n[1]), g: Co(n[2] + n[2]), b: Co(n[3] + n[3]), format: t ? "name" : "hex" } : !1))))))))); } function js(e) { return !!xi.CSS_UNIT.exec(String(e)); } var dne = ( /** @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 = ine(t)), this.originalInput = t; var a = sne(t); this.originalInput = t, this.r = a.r, this.g = a.g, this.b = a.b, this.a = a.a, this.roundA = Math.round(100 * this.a) / 100, this.format = (r = n.format) !== null && r !== void 0 ? r : a.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 = a.ok; } return e.prototype.isDark = function() { return this.getBrightness() < 128; }, e.prototype.isLight = function() { return !this.isDark(); }, e.prototype.getBrightness = function() { var t = this.toRgb(); return (t.r * 299 + t.g * 587 + t.b * 114) / 1e3; }, e.prototype.getLuminance = function() { var t = this.toRgb(), n, r, a, o = t.r / 255, i = t.g / 255, s = t.b / 255; return o <= 0.03928 ? n = o / 12.92 : n = Math.pow((o + 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 ? a = s / 12.92 : a = Math.pow((s + 0.055) / 1.055, 2.4), 0.2126 * n + 0.7152 * r + 0.0722 * a; }, e.prototype.getAlpha = function() { return this.a; }, e.prototype.setAlpha = function(t) { return this.a = HL(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 = X8(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 = X8(this.r, this.g, this.b), n = Math.round(t.h * 360), r = Math.round(t.s * 100), a = Math.round(t.v * 100); return this.a === 1 ? "hsv(".concat(n, ", ").concat(r, "%, ").concat(a, "%)") : "hsva(".concat(n, ", ").concat(r, "%, ").concat(a, "%, ").concat(this.roundA, ")"); }, e.prototype.toHsl = function() { var t = G8(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 = G8(this.r, this.g, this.b), n = Math.round(t.h * 360), r = Math.round(t.s * 100), a = Math.round(t.l * 100); return this.a === 1 ? "hsl(".concat(n, ", ").concat(r, "%, ").concat(a, "%)") : "hsla(".concat(n, ", ").concat(r, "%, ").concat(a, "%, ").concat(this.roundA, ")"); }, e.prototype.toHex = function(t) { return t === void 0 && (t = !1), Y8(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), ane(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(sa(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(sa(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 = "#" + Y8(this.r, this.g, this.b, !1), n = 0, r = Object.entries(kC); n < r.length; n++) { var a = r[n], o = a[0], i = a[1]; if (t === i) return o; } return !1; }, e.prototype.toString = function(t) { var n = !!t; t = t ?? this.format; var r = !1, a = this.a < 1 && this.a >= 0, o = !n && a && (t.startsWith("hex") || t === "name"); return o ? 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 = Fm(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 = Fm(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 = Fm(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 = Fm(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(), a = new e(t).toRgb(), o = n / 100, i = { r: (a.r - r.r) * o + r.r, g: (a.g - r.g) * o + r.g, b: (a.b - r.b) * o + r.b, a: (a.a - r.a) * o + 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(), a = 360 / n, o = [this]; for (r.h = (r.h - (a * t >> 1) + 720) % 360; --t; ) r.h = (r.h + a) % 360, o.push(new e(r)); return o; }, 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, a = n.s, o = n.v, i = [], s = 1 / t; t--; ) i.push(new e({ h: r, s: a, v: o })), o = (o + 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(), a = n.a + r.a * (1 - n.a); return new e({ r: (n.r * n.a + r.r * r.a * (1 - n.a)) / a, g: (n.g * n.a + r.g * r.a * (1 - n.a)) / a, b: (n.b * n.a + r.b * r.a * (1 - n.a)) / a, a }); }, e.prototype.triad = function() { return this.polyad(3); }, e.prototype.tetrad = function() { return this.polyad(4); }, e.prototype.polyad = function(t) { for (var n = this.toHsl(), r = n.h, a = [this], o = 360 / t, i = 1; i < t; i++) a.push(new e({ h: (r + i * o) % 360, s: n.s, l: n.l })); return a; }, e.prototype.equals = function(t) { return this.toRgbString() === new e(t).toRgbString(); }, e; }() ); function Ul(e, t = 20) { return e.mix("#141414", t).toString(); } function pne(e) { const t = Tg(), n = In("button"); return F(() => { let r = {}, a = e.color; if (a) { const o = a.match(/var\((.*?)\)/); o && (a = window.getComputedStyle(window.document.documentElement).getPropertyValue(o[1])); const i = new dne(a), s = e.dark ? i.tint(20).toString() : Ul(i, 20); if (e.plain) r = n.cssVarBlock({ "bg-color": e.dark ? Ul(i, 90) : i.tint(90).toString(), "text-color": a, "border-color": e.dark ? Ul(i, 50) : i.tint(50).toString(), "hover-text-color": `var(${n.cssVarName("color-white")})`, "hover-bg-color": a, "hover-border-color": a, "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 ? Ul(i, 90) : i.tint(90).toString(), r[n.cssVarBlockName("disabled-text-color")] = e.dark ? Ul(i, 50) : i.tint(50).toString(), r[n.cssVarBlockName("disabled-border-color")] = e.dark ? Ul(i, 80) : i.tint(80).toString()); else { const l = e.dark ? Ul(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": a, "text-color": u, "border-color": a, "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 ? Ul(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 fne = X({ name: "ElButton" }), hne = /* @__PURE__ */ X({ ...fne, props: xC, emits: Qte, setup(e, { expose: t, emit: n }) { const r = e, a = pne(r), o = In("button"), { _ref: i, _size: s, _type: l, _disabled: u, _props: c, shouldAddSpace: d, handleClick: f } = Xte(r, n), h = F(() => [ o.b(), o.m(l.value), o.m(s.value), o.is("disabled", u.value), o.is("loading", r.loading), o.is("plain", r.plain), o.is("round", r.round), o.is("circle", r.circle), o.is("text", r.text), o.is("link", r.link), o.is("has-bg", r.bg) ]); return t({ ref: i, size: s, type: l, disabled: u, shouldAddSpace: d }), (p, v) => (I(), de(ct(p.tag), Bt({ ref_key: "_ref", ref: i }, b(c), { class: b(h), style: b(a), onClick: b(f) }), { default: K(() => [ p.loading ? (I(), j(Qe, { key: 0 }, [ p.$slots.loading ? he(p.$slots, "loading", { key: 0 }) : (I(), de(b(Ir), { key: 1, class: H(b(o).is("loading")) }, { default: K(() => [ (I(), de(ct(p.loadingIcon))) ]), _: 1 }, 8, ["class"])) ], 64)) : p.icon || p.$slots.icon ? (I(), de(b(Ir), { key: 1 }, { default: K(() => [ p.icon ? (I(), de(ct(p.icon), { key: 0 })) : he(p.$slots, "icon", { key: 1 }) ]), _: 3 })) : ne("v-if", !0), p.$slots.default ? (I(), j("span", { key: 2, class: H({ [b(o).em("text", "expand")]: b(d) }) }, [ he(p.$slots, "default") ], 2)) : ne("v-if", !0) ]), _: 3 }, 16, ["class", "style", "onClick"])); } }); var vne = /* @__PURE__ */ yn(hne, [["__file", "button.vue"]]); const gne = { size: xC.size, type: xC.type }, mne = X({ name: "ElButtonGroup" }), yne = /* @__PURE__ */ X({ ...mne, props: gne, setup(e) { const t = e; rt(jL, tn({ size: It(t, "size"), type: It(t, "type") })); const n = In("button"); return (r, a) => (I(), j("div", { class: H(b(n).b("group")) }, [ he(r.$slots, "default") ], 2)); } }); var UL = /* @__PURE__ */ yn(yne, [["__file", "button-group.vue"]]); const QS = qa(vne, { ButtonGroup: UL }); Kd(UL); var bne = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}; function qL(e) { return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e; } const nu = /* @__PURE__ */ new Map(); if (Mr) { let e; document.addEventListener("mousedown", (t) => e = t), document.addEventListener("mouseup", (t) => { if (e) { for (const n of nu.values()) for (const { documentHandler: r } of n) r(t, e); e = void 0; } }); } function Q8(e, t) { let n = []; return Array.isArray(t.arg) ? n = t.arg : Zc(t.arg) && n.push(t.arg), function(r, a) { const o = t.instance.popperRef, i = r.target, s = a == null ? void 0 : a.target, l = !t || !t.instance, u = !i || !s, c = e.contains(i) || e.contains(s), d = e === i, f = n.length && n.some((p) => p == null ? void 0 : p.contains(i)) || n.length && n.includes(s), h = o && (o.contains(i) || o.contains(s)); l || u || c || d || f || h || t.value(r, a); }; } const wne = { beforeMount(e, t) { nu.has(e) || nu.set(e, []), nu.get(e).push({ documentHandler: Q8(e, t), bindingFn: t.value }); }, updated(e, t) { nu.has(e) || nu.set(e, []); const n = nu.get(e), r = n.findIndex((o) => o.bindingFn === t.oldValue), a = { documentHandler: Q8(e, t), bindingFn: t.value }; r >= 0 ? n.splice(r, 1, a) : n.push(a); }, unmounted(e) { nu.delete(e); } }, CC = Dn({ type: { type: String, values: ["primary", "success", "info", "warning", "danger"], default: "primary" }, closable: Boolean, disableTransitions: Boolean, hit: Boolean, color: String, size: { type: String, values: LS }, effect: { type: String, values: ["dark", "light", "plain"], default: "light" }, round: Boolean }), xne = { close: (e) => e instanceof MouseEvent, click: (e) => e instanceof MouseEvent }, kne = X({ name: "ElTag" }), Cne = /* @__PURE__ */ X({ ...kne, props: CC, emits: xne, setup(e, { emit: t }) { const n = e, r = _g(), a = In("tag"), o = F(() => { const { type: u, hit: c, effect: d, closable: f, round: h } = n; return [ a.b(), a.is("closable", f), a.m(u || "primary"), a.m(r.value), a.m(d), a.is("hit", c), a.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 ? (I(), j("span", { key: 0, class: H(b(o)), style: Ye({ backgroundColor: u.color }), onClick: s }, [ W("span", { class: H(b(a).e("content")) }, [ he(u.$slots, "default") ], 2), u.closable ? (I(), de(b(Ir), { key: 0, class: H(b(a).e("close")), onClick: Je(i, ["stop"]) }, { default: K(() => [ ue(b(b8)) ]), _: 1 }, 8, ["class", "onClick"])) : ne("v-if", !0) ], 6)) : (I(), de(vr, { key: 1, name: `${b(a).namespace.value}-zoom-in-center`, appear: "", onVnodeMounted: l }, { default: K(() => [ W("span", { class: H(b(o)), style: Ye({ backgroundColor: u.color }), onClick: s }, [ W("span", { class: H(b(a).e("content")) }, [ he(u.$slots, "default") ], 2), u.closable ? (I(), de(b(Ir), { key: 0, class: H(b(a).e("close")), onClick: Je(i, ["stop"]) }, { default: K(() => [ ue(b(b8)) ]), _: 1 }, 8, ["class", "onClick"])) : ne("v-if", !0) ], 6) ]), _: 3 }, 8, ["name"])); } }); var Sne = /* @__PURE__ */ yn(Cne, [["__file", "tag.vue"]]); const Ene = qa(Sne), WL = Symbol("rowContextKey"), _ne = [ "start", "center", "end", "space-around", "space-between", "space-evenly" ], Tne = ["top", "middle", "bottom"], One = Dn({ tag: { type: String, default: "div" }, gutter: { type: Number, default: 0 }, justify: { type: String, values: _ne, default: "start" }, align: { type: String, values: Tne } }), $ne = X({ name: "ElRow" }), Fne = /* @__PURE__ */ X({ ...$ne, props: One, setup(e) { const t = e, n = In("row"), r = F(() => t.gutter); rt(WL, { gutter: r }); const a = F(() => { const i = {}; return t.gutter && (i.marginRight = i.marginLeft = `-${t.gutter / 2}px`), i; }), o = F(() => [ n.b(), n.is(`justify-${t.justify}`, t.justify !== "start"), n.is(`align-${t.align}`, !!t.align) ]); return (i, s) => (I(), de(ct(i.tag), { class: H(b(o)), style: Ye(b(a)) }, { default: K(() => [ he(i.$slots, "default") ]), _: 3 }, 8, ["class", "style"])); } }); var Ane = /* @__PURE__ */ yn(Fne, [["__file", "row.vue"]]); const y2 = qa(Ane), Ine = Dn({ 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: Pt([Number, Object]), default: () => Dp({}) }, sm: { type: Pt([Number, Object]), default: () => Dp({}) }, md: { type: Pt([Number, Object]), default: () => Dp({}) }, lg: { type: Pt([Number, Object]), default: () => Dp({}) }, xl: { type: Pt([Number, Object]), default: () => Dp({}) } }), Pne = X({ name: "ElCol" }), Lne = /* @__PURE__ */ X({ ...Pne, props: Ine, setup(e) { const t = e, { gutter: n } = Te(WL, { gutter: F(() => 0) }), r = In("col"), a = F(() => { const i = {}; return n.value && (i.paddingLeft = i.paddingRight = `${n.value / 2}px`), i; }), o = F(() => { const i = []; return ["span", "offset", "pull", "push"].forEach((u) => { const c = t[u]; Wr(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) => { Wr(t[u]) ? i.push(r.b(`${u}-${t[u]}`)) : na(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) => (I(), de(ct(i.tag), { class: H(b(o)), style: Ye(b(a)) }, { default: K(() => [ he(i.$slots, "default") ]), _: 3 }, 8, ["class", "style"])); } }); var Nne = /* @__PURE__ */ yn(Lne, [["__file", "col.vue"]]); const KL = qa(Nne), Mne = X({ name: "ElContainer" }), Bne = /* @__PURE__ */ X({ ...Mne, props: { direction: { type: String } }, setup(e) { const t = e, n = Cr(), r = In("container"), a = F(() => 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 (o, i) => (I(), j("section", { class: H([b(r).b(), b(r).is("vertical", b(a))]) }, [ he(o.$slots, "default") ], 2)); } }); var Dne = /* @__PURE__ */ yn(Bne, [["__file", "container.vue"]]); const Rne = X({ name: "ElAside" }), zne = /* @__PURE__ */ X({ ...Rne, props: { width: { type: String, default: null } }, setup(e) { const t = e, n = In("aside"), r = F(() => t.width ? n.cssVarBlock({ width: t.width }) : {}); return (a, o) => (I(), j("aside", { class: H(b(n).b()), style: Ye(b(r)) }, [ he(a.$slots, "default") ], 6)); } }); var GL = /* @__PURE__ */ yn(zne, [["__file", "aside.vue"]]); const Vne = X({ name: "ElFooter" }), jne = /* @__PURE__ */ X({ ...Vne, props: { height: { type: String, default: null } }, setup(e) { const t = e, n = In("footer"), r = F(() => t.height ? n.cssVarBlock({ height: t.height }) : {}); return (a, o) => (I(), j("footer", { class: H(b(n).b()), style: Ye(b(r)) }, [ he(a.$slots, "default") ], 6)); } }); var XL = /* @__PURE__ */ yn(jne, [["__file", "footer.vue"]]); const Hne = X({ name: "ElHeader" }), Une = /* @__PURE__ */ X({ ...Hne, props: { height: { type: String, default: null } }, setup(e) { const t = e, n = In("header"), r = F(() => t.height ? n.cssVarBlock({ height: t.height }) : {}); return (a, o) => (I(), j("header", { class: H(b(n).b()), style: Ye(b(r)) }, [ he(a.$slots, "default") ], 6)); } }); var YL = /* @__PURE__ */ yn(Une, [["__file", "header.vue"]]); const qne = X({ name: "ElMain" }), Wne = /* @__PURE__ */ X({ ...qne, setup(e) { const t = In("main"); return (n, r) => (I(), j("main", { class: H(b(t).b()) }, [ he(n.$slots, "default") ], 2)); } }); var ZL = /* @__PURE__ */ yn(Wne, [["__file", "main.vue"]]); const QL = qa(Dne, { Aside: GL, Footer: XL, Header: YL, Main: ZL }); Kd(GL); Kd(XL); const JL = Kd(YL), eN = Kd(ZL), Kne = /* @__PURE__ */ X({ inheritAttrs: !1 }); function Gne(e, t, n, r, a, o) { return he(e.$slots, "default"); } var Xne = /* @__PURE__ */ yn(Kne, [["render", Gne], ["__file", "collection.vue"]]); const Yne = /* @__PURE__ */ X({ name: "ElCollectionItem", inheritAttrs: !1 }); function Zne(e, t, n, r, a, o) { return he(e.$slots, "default"); } var Qne = /* @__PURE__ */ yn(Yne, [["render", Zne], ["__file", "collection-item.vue"]]); const Jne = "data-el-collection-item", ere = (e) => { const t = `El${e}Collection`, n = `${t}Item`, r = Symbol(t), a = Symbol(n), o = { ...Xne, name: t, setup() { const s = U(null), l = /* @__PURE__ */ new Map(); rt(r, { itemMap: l, getItems: () => { const c = b(s); if (!c) return []; const d = Array.from(c.querySelectorAll(`[${Jne}]`)); return [...l.values()].sort((h, p) => d.indexOf(h.ref) - d.indexOf(p.ref)); }, collectionRef: s }); } }, i = { ...Qne, name: n, setup(s, { attrs: l }) { const u = U(null), c = Te(r, void 0); rt(a, { collectionItemRef: u }), nt(() => { const d = b(u); d && c.itemMap.set(d, { ref: d, ...l }); }), kt(() => { const d = b(u); c.itemMap.delete(d); }); } }; return { COLLECTION_INJECTION_KEY: r, COLLECTION_ITEM_INJECTION_KEY: a, ElCollection: o, ElCollectionItem: i }; }, Fx = Dn({ trigger: f0.trigger, effect: { ...Ga.effect, default: "light" }, type: { type: Pt(String) }, placement: { type: Pt(String), default: "bottom" }, popperOptions: { type: Pt(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: Pt([Number, String]), default: 0 }, maxHeight: { type: Pt([Number, String]), default: "" }, popperClass: { type: String, default: "" }, disabled: Boolean, role: { type: String, default: "menu" }, buttonProps: { type: Pt(Object) }, teleported: Ga.teleported }); Dn({ command: { type: [Object, String, Number], default: () => ({}) }, disabled: Boolean, divided: Boolean, textValue: String, icon: { type: Bi } }); Dn({ onKeydown: { type: Pt(Function) } }); ere("Dropdown"); const tN = Symbol("ElSelectGroup"), b2 = Symbol("ElSelect"); function tre(e, t) { const n = Te(b2), r = Te(tN, { disabled: !1 }), a = F(() => c(vu(n.props.modelValue), e.value)), o = F(() => { var h; if (n.props.multiple) { const p = vu((h = n.props.modelValue) != null ? h : []); return !a.value && p.length >= n.props.multipleLimit && n.props.multipleLimit > 0; } else return !1; }), i = F(() => e.label || (na(e.value) ? "" : e.value)), s = F(() => e.value || e.label || ""), l = F(() => e.disabled || t.groupDisabled || o.value), u = tt(), c = (h = [], p) => { if (na(e.value)) { const v = n.props.valueKey; return h && h.some((m) => bo(ol(m, v)) === ol(p, v)); } else return h && h.includes(p); }, d = () => { !e.disabled && !r.disabled && (n.states.hoveringIndex = n.optionsArray.indexOf(u.proxy)); }, f = (h) => { const p = new RegExp(sQ(h), "i"); t.visible = p.test(i.value) || e.created; }; return be(() => i.value, () => { !e.created && !n.props.remote && n.setSelected(); }), be(() => e.value, (h, p) => { const { remote: v, valueKey: m } = n.props; if (h !== p && (n.onOptionDestroy(p, u.proxy), n.onOptionCreate(u.proxy)), !e.created && !v) { if (m && na(h) && na(p) && h[m] === p[m]) return; n.setSelected(); } }), be(() => r.disabled, () => { t.groupDisabled = r.disabled; }, { immediate: !0 }), { select: n, currentLabel: i, currentValue: s, itemSelected: a, isDisabled: l, hoverItem: d, updateOption: f }; } const nre = X({ name: "ElOption", componentName: "ElOption", props: { value: { required: !0, type: [String, Number, Boolean, Object] }, label: [String, Number], created: Boolean, disabled: Boolean }, setup(e) { const t = In("select"), n = Eg(), r = F(() => [ t.be("dropdown", "item"), t.is("disabled", b(s)), t.is("selected", b(i)), t.is("hovering", b(f)) ]), a = tn({ index: -1, groupDisabled: !1, visible: !0, hover: !1 }), { currentLabel: o, itemSelected: i, isDisabled: s, select: l, hoverItem: u, updateOption: c } = tre(e, a), { visible: d, hover: f } = Sr(a), h = tt().proxy; l.onOptionCreate(h), kt(() => { const v = h.value, { selected: m } = l.states, y = (l.props.multiple ? m : [m]).some((x) => x.value === h.value); Ue(() => { l.states.cachedOptions.get(v) === h && !y && l.states.cachedOptions.delete(v); }), l.onOptionDestroy(v, h); }); function p() { s.value || l.handleOptionSelect(h); } return { ns: t, id: n, containerKls: r, currentLabel: o, itemSelected: i, isDisabled: s, select: l, hoverItem: u, updateOption: c, visible: d, hover: f, selectOptionClick: p, states: a }; } }); function rre(e, t, n, r, a, o) { return Xe((I(), j("li", { id: e.id, class: H(e.containerKls), role: "option", "aria-disabled": e.isDisabled || void 0, "aria-selected": e.itemSelected, onMouseenter: e.hoverItem, onClick: Je(e.selectOptionClick, ["stop"]) }, [ he(e.$slots, "default", {}, () => [ W("span", null, Fe(e.currentLabel), 1) ]) ], 42, ["id", "aria-disabled", "aria-selected", "onMouseenter", "onClick"])), [ [mt, e.visible] ]); } var JS = /* @__PURE__ */ yn(nre, [["render", rre], ["__file", "option.vue"]]); const are = X({ name: "ElSelectDropdown", componentName: "ElSelectDropdown", setup() { const e = Te(b2), t = In("select"), n = F(() => e.props.popperClass), r = F(() => e.props.multiple), a = F(() => e.props.fitInputWidth), o = U(""); function i() { var s; o.value = `${(s = e.selectRef) == null ? void 0 : s.offsetWidth}px`; } return nt(() => { i(), nl(e.selectRef, i); }), { ns: t, minWidth: o, popperClass: n, isMultiple: r, isFitInputWidth: a }; } }); function ore(e, t, n, r, a, o) { return I(), j("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 ? (I(), j("div", { key: 0, class: H(e.ns.be("dropdown", "header")) }, [ he(e.$slots, "header") ], 2)) : ne("v-if", !0), he(e.$slots, "default"), e.$slots.footer ? (I(), j("div", { key: 1, class: H(e.ns.be("dropdown", "footer")) }, [ he(e.$slots, "footer") ], 2)) : ne("v-if", !0) ], 6); } var ire = /* @__PURE__ */ yn(are, [["render", ore], ["__file", "select-dropdown.vue"]]); const sre = 11, lre = (e, t) => { const { t: n } = cL(), r = Eg(), a = In("select"), o = In("input"), i = tn({ 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 = U(null), l = U(null), u = U(null), c = U(null), d = U(null), f = U(null), h = U(null), p = U(null), v = U(null), m = U(null), g = U(null), y = U(null), { isComposing: x, handleCompositionStart: w, handleCompositionUpdate: k, handleCompositionEnd: C } = $L({ afterComposition: (D) => le(D) }), { wrapperRef: S, isFocused: _ } = OL(d, { beforeFocus() { return P.value; }, afterFocus() { e.automaticDropdown && !T.value && (T.value = !0, i.menuVisibleOnFocus = !0); }, beforeBlur(D) { var ae, Ie; return ((ae = u.value) == null ? void 0 : ae.isFocusInsideContent(D)) || ((Ie = c.value) == null ? void 0 : Ie.isFocusInsideContent(D)); }, afterBlur() { T.value = !1, i.menuVisibleOnFocus = !1; } }), T = U(!1), O = U(), { form: $, formItem: A } = v2(), { inputId: N } = qS(e, { formItemContext: A }), { valueOnClear: L, isEmptyValue: R } = cee(e), P = F(() => e.disabled || ($ == null ? void 0 : $.disabled)), B = F(() => Go(e.modelValue) ? e.modelValue.length > 0 : !R(e.modelValue)), M = F(() => e.clearable && !P.value && i.inputHovering && B.value), z = F(() => e.remote && e.filterable && !e.remoteShowSuffix ? "" : e.suffixIcon), Z = F(() => a.is("reverse", z.value && T.value)), G = F(() => (A == null ? void 0 : A.validateState) || ""), J = F(() => sL[G.value]), se = F(() => e.remote ? 300 : 0), ve = F(() => 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 && ge.value === 0 ? e.noMatchText || n("el.select.noMatch") : i.options.size === 0 ? e.noDataText || n("el.select.noData") : null), ge = F(() => oe.value.filter((D) => D.visible).length), oe = F(() => { const D = Array.from(i.options.values()), ae = []; return i.optionValues.forEach((Ie) => { const He = D.findIndex((Jt) => Jt.value === Ie); He > -1 && ae.push(D[He]); }), ae.length >= D.length ? ae : D; }), ee = F(() => Array.from(i.cachedOptions.values())), q = F(() => { const D = oe.value.filter((ae) => !ae.created).some((ae) => ae.currentLabel === i.inputValue); return e.filterable && e.allowCreate && i.inputValue !== "" && !D; }), Y = () => { e.filterable && ta(e.filterMethod) || e.filterable && e.remote && ta(e.remoteMethod) || oe.value.forEach((D) => { var ae; (ae = D.updateOption) == null || ae.call(D, i.inputValue); }); }, te = _g(), we = F(() => ["small"].includes(te.value) ? "small" : "default"), Oe = F({ get() { return T.value && ve.value !== !1; }, set(D) { T.value = D; } }), Ne = F(() => { if (e.multiple && !Sv(e.modelValue)) return vu(e.modelValue).length === 0 && !i.inputValue; const D = Go(e.modelValue) ? e.modelValue[0] : e.modelValue; return e.filterable || Sv(D) ? !i.inputValue : !0; }), xe = F(() => { var D; const ae = (D = e.placeholder) != null ? D : n("el.select.placeholder"); return e.multiple || !B.value ? ae : i.selectedLabel; }), $e = F(() => uC ? null : "mouseenter"); be(() => e.modelValue, (D, ae) => { e.multiple && e.filterable && !e.reserveKeyword && (i.inputValue = "", Se("")), Me(), !vC(D, ae) && e.validateEvent && (A == null || A.validate("change").catch((Ie) => ia(Ie))); }, { flush: "post", deep: !0 }), be(() => T.value, (D) => { D ? Se(i.inputValue) : (i.inputValue = "", i.previousQuery = null, i.isBeforeHide = !0), t("visible-change", D); }), be(() => i.options.entries(), () => { var D; if (!Mr) return; const ae = ((D = s.value) == null ? void 0 : D.querySelectorAll("input")) || []; (!e.filterable && !e.defaultFirstOption && !Sv(e.modelValue) || !Array.from(ae).includes(document.activeElement)) && Me(), e.defaultFirstOption && (e.filterable || e.remote) && ge.value && Pe(); }, { flush: "post" }), be(() => i.hoveringIndex, (D) => { Wr(D) && D > -1 ? O.value = oe.value[D] || {} : O.value = {}, oe.value.forEach((ae) => { ae.hover = O.value === ae; }); }), Hd(() => { i.isBeforeHide || Y(); }); const Se = (D) => { i.previousQuery === D || x.value || (i.previousQuery = D, e.filterable && ta(e.filterMethod) ? e.filterMethod(D) : e.filterable && e.remote && ta(e.remoteMethod) && e.remoteMethod(D), e.defaultFirstOption && (e.filterable || e.remote) && ge.value ? Ue(Pe) : Ue(Be)); }, Pe = () => { const D = oe.value.filter((He) => He.visible && !He.disabled && !He.states.groupDisabled), ae = D.find((He) => He.created), Ie = D[0]; i.hoveringIndex = _e(oe.value, ae || Ie); }, Me = () => { if (e.multiple) i.selectedLabel = ""; else { const ae = Go(e.modelValue) ? e.modelValue[0] : e.modelValue, Ie = je(ae); i.selectedLabel = Ie.currentLabel, i.selected = [Ie]; return; } const D = []; Sv(e.modelValue) || vu(e.modelValue).forEach((ae) => { D.push(je(ae)); }), i.selected = D; }, je = (D) => { let ae; const Ie = bx(D).toLowerCase() === "object", He = bx(D).toLowerCase() === "null", Jt = bx(D).toLowerCase() === "undefined"; for (let en = i.cachedOptions.size - 1; en >= 0; en--) { const Gt = ee.value[en]; if (Ie ? ol(Gt.value, e.valueKey) === ol(D, e.valueKey) : Gt.value === D) { ae = { value: D, currentLabel: Gt.currentLabel, get isDisabled() { return Gt.isDisabled; } }; break; } } if (ae) return ae; const fn = Ie ? D.label : !He && !Jt ? D : ""; return { value: D, currentLabel: fn }; }, Be = () => { i.hoveringIndex = oe.value.findIndex((D) => i.selected.some((ae) => Qt(ae) === Qt(D))); }, We = () => { i.selectionWidth = l.value.getBoundingClientRect().width; }, qe = () => { i.calculatorWidth = f.value.getBoundingClientRect().width; }, Ge = () => { i.collapseItemWidth = g.value.getBoundingClientRect().width; }, E = () => { var D, ae; (ae = (D = u.value) == null ? void 0 : D.updatePopper) == null || ae.call(D); }, V = () => { var D, ae; (ae = (D = c.value) == null ? void 0 : D.updatePopper) == null || ae.call(D); }, ie = () => { i.inputValue.length > 0 && !T.value && (T.value = !0), Se(i.inputValue); }, le = (D) => { if (i.inputValue = D.target.value, e.remote) re(); else return ie(); }, re = nL(() => { ie(); }, se.value), ke = (D) => { vC(e.modelValue, D) || t(pd, D); }, fe = (D) => eQ(D, (ae) => !i.disabledOptions.has(ae)), Ee = (D) => { if (e.multiple && D.code !== c0.delete && D.target.value.length <= 0) { const ae = vu(e.modelValue).slice(), Ie = fe(ae); if (Ie < 0) return; const He = ae[Ie]; ae.splice(Ie, 1), t(Ca, ae), ke(ae), t("remove-tag", He); } }, ze = (D, ae) => { const Ie = i.selected.indexOf(ae); if (Ie > -1 && !P.value) { const He = vu(e.modelValue).slice(); He.splice(Ie, 1), t(Ca, He), ke(He), t("remove-tag", ae.value); } D.stopPropagation(), bt(); }, Ve = (D) => { D.stopPropagation(); const ae = e.multiple ? [] : L.value; if (e.multiple) for (const Ie of i.selected) Ie.isDisabled && ae.push(Ie.value); t(Ca, ae), ke(ae), i.hoveringIndex = -1, T.value = !1, t("clear"), bt(); }, me = (D) => { var ae; if (e.multiple) { const Ie = vu((ae = e.modelValue) != null ? ae : []).slice(), He = _e(Ie, D.value); He > -1 ? Ie.splice(He, 1) : (e.multipleLimit <= 0 || Ie.length < e.multipleLimit) && Ie.push(D.value), t(Ca, Ie), ke(Ie), D.created && Se(""), e.filterable && !e.reserveKeyword && (i.inputValue = ""); } else t(Ca, D.value), ke(D.value), T.value = !1; bt(), !T.value && Ue(() => { Ce(D); }); }, _e = (D = [], ae) => { if (!na(ae)) return D.indexOf(ae); const Ie = e.valueKey; let He = -1; return D.some((Jt, fn) => bo(ol(Jt, Ie)) === ol(ae, Ie) ? (He = fn, !0) : !1), He; }, Ce = (D) => { var ae, Ie, He, Jt, fn; const un = Go(D) ? D[0] : D; let en = null; if (un != null && un.value) { const Gt = oe.value.filter((Hr) => Hr.value === un.value); Gt.length > 0 && (en = Gt[0].$el); } if (u.value && en) { const Gt = (Jt = (He = (Ie = (ae = u.value) == null ? void 0 : ae.popperRef) == null ? void 0 : Ie.contentRef) == null ? void 0 : He.querySelector) == null ? void 0 : Jt.call(He, `.${a.be("dropdown", "wrap")}`); Gt && uQ(Gt, en); } (fn = y.value) == null || fn.handleScroll(); }, Le = (D) => { i.options.set(D.value, D), i.cachedOptions.set(D.value, D), D.disabled && i.disabledOptions.set(D.value, D); }, yt = (D, ae) => { i.options.get(D) === ae && i.options.delete(D); }, dt = F(() => { var D, ae; return (ae = (D = u.value) == null ? void 0 : D.popperRef) == null ? void 0 : ae.contentRef; }), _t = () => { i.isBeforeHide = !1, Ue(() => Ce(i.selected)); }, bt = () => { var D; (D = d.value) == null || D.focus(); }, Ct = () => { var D; (D = d.value) == null || D.blur(); }, nn = (D) => { Ve(D); }, Dt = () => { T.value = !1, _.value && Ct(); }, Kt = () => { i.inputValue.length > 0 ? i.inputValue = "" : T.value = !1; }, on = () => { P.value || (uC && (i.inputHovering = !0), i.menuVisibleOnFocus ? i.menuVisibleOnFocus = !1 : T.value = !T.value); }, rn = () => { T.value ? oe.value[i.hoveringIndex] && me(oe.value[i.hoveringIndex]) : on(); }, Qt = (D) => na(D.value) ? ol(D.value, e.valueKey) : D.value, Sn = F(() => oe.value.filter((D) => D.visible).every((D) => D.disabled)), En = F(() => e.multiple ? e.collapseTags ? i.selected.slice(0, e.maxCollapseTags) : i.selected : []), pn = F(() => e.multiple ? e.collapseTags ? i.selected.slice(e.maxCollapseTags) : [] : []), St = (D) => { if (!T.value) { T.value = !0; return; } if (!(i.options.size === 0 || i.filteredOptionsCount === 0 || x.value) && !Sn.value) { D === "next" ? (i.hoveringIndex++, i.hoveringIndex === i.options.size && (i.hoveringIndex = 0)) : D === "prev" && (i.hoveringIndex--, i.hoveringIndex < 0 && (i.hoveringIndex = i.options.size - 1)); const ae = oe.value[i.hoveringIndex]; (ae.disabled === !0 || ae.states.groupDisabled === !0 || !ae.visible) && St(D), Ue(() => Ce(O.value)); } }, Rt = () => { if (!l.value) return 0; const D = window.getComputedStyle(l.value); return Number.parseFloat(D.gap || "6px"); }, qt = F(() => { const D = Rt(); return { maxWidth: `${g.value && e.maxCollapseTags === 1 ? i.selectionWidth - i.collapseItemWidth - D : i.selectionWidth}px` }; }), _n = F(() => ({ maxWidth: `${i.selectionWidth}px` })), _r = F(() => ({ width: `${Math.max(i.calculatorWidth, sre)}px` })); return nl(l, We), nl(f, qe), nl(v, E), nl(S, E), nl(m, V), nl(g, Ge), nt(() => { Me(); }), { inputId: N, contentId: r, nsSelect: a, nsInput: o, states: i, isFocused: _, expanded: T, optionsArray: oe, hoverOption: O, selectSize: te, filteredOptionsCount: ge, resetCalculatorWidth: qe, updateTooltip: E, updateTagTooltip: V, debouncedOnInputChange: re, onInput: le, deletePrevTag: Ee, deleteTag: ze, deleteSelected: Ve, handleOptionSelect: me, scrollToOption: Ce, hasModelValue: B, shouldShowPlaceholder: Ne, currentPlaceholder: xe, mouseEnterEventName: $e, showClose: M, iconComponent: z, iconReverse: Z, validateState: G, validateIcon: J, showNewOption: q, updateOptions: Y, collapseTagSize: we, setSelected: Me, selectDisabled: P, emptyText: ve, handleCompositionStart: w, handleCompositionUpdate: k, handleCompositionEnd: C, onOptionCreate: Le, onOptionDestroy: yt, handleMenuEnter: _t, focus: bt, blur: Ct, handleClearClick: nn, handleClickOutside: Dt, handleEsc: Kt, toggleMenu: on, selectOption: rn, getValueKey: Qt, navigateOptions: St, dropdownMenuVisible: Oe, showTagList: En, collapseTagList: pn, tagStyle: qt, collapseTagStyle: _n, inputStyle: _r, popperRef: dt, inputRef: d, tooltipRef: u, tagTooltipRef: c, calculatorRef: f, prefixRef: h, suffixRef: p, selectRef: s, wrapperRef: S, selectionRef: l, scrollbarRef: y, menuRef: v, tagMenuRef: m, collapseItemRef: g }; }; var ure = X({ name: "ElOptions", setup(e, { slots: t }) { const n = Te(b2); let r = []; return () => { var a, o; const i = (a = t.default) == null ? void 0 : a.call(t), s = []; function l(u) { Go(u) && u.forEach((c) => { var d, f, h, p; const v = (d = (c == null ? void 0 : c.type) || {}) == null ? void 0 : d.name; v === "ElOptionGroup" ? l(!Ea(c.children) && !Go(c.children) && ta((f = c.children) == null ? void 0 : f.default) ? (h = c.children) == null ? void 0 : h.default() : c.children) : v === "ElOption" ? s.push((p = c.props) == null ? void 0 : p.value) : Go(c.children) && l(c.children); }); } return i.length && l((o = i[0]) == null ? void 0 : o.children), vC(s, r) || (r = s, n && (n.states.optionValues = s)), i; }; } }); const cre = Dn({ name: String, id: String, modelValue: { type: [Array, String, Number, Boolean, Object], default: void 0 }, autocomplete: { type: String, default: "off" }, automaticDropdown: Boolean, size: jS, effect: { type: Pt(String), default: "light" }, disabled: Boolean, clearable: Boolean, filterable: Boolean, allowCreate: Boolean, loading: Boolean, popperClass: { type: String, default: "" }, popperOptions: { type: Pt(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: Ga.teleported, persistent: { type: Boolean, default: !0 }, clearIcon: { type: Bi, default: PS }, fitInputWidth: Boolean, suffixIcon: { type: Bi, default: IS }, tagType: { ...CC.type, default: "info" }, tagEffect: { ...CC.effect, default: "light" }, validateEvent: { type: Boolean, default: !0 }, remoteShowSuffix: Boolean, placement: { type: Pt(String), values: f2, default: "bottom-start" }, fallbackPlacements: { type: Pt(Array), default: ["bottom-start", "top-start", "right", "left"] }, appendTo: String, ...uee, ...Gd(["ariaLabel"]) }), J8 = "ElSelect", dre = X({ name: J8, componentName: J8, components: { ElSelectMenu: ire, ElOption: JS, ElOptions: ure, ElTag: Ene, ElScrollbar: IL, ElTooltip: ZS, ElIcon: Ir }, directives: { ClickOutside: wne }, props: cre, emits: [ Ca, pd, "remove-tag", "clear", "visible-change", "focus", "blur" ], setup(e, { emit: t }) { const n = F(() => { const { modelValue: o, multiple: i } = e, s = i ? [] : void 0; return Go(o) ? i ? o : s : i ? s : o; }), r = tn({ ...Sr(e), modelValue: n }), a = lre(r, t); return rt(b2, tn({ props: r, states: a.states, optionsArray: a.optionsArray, handleOptionSelect: a.handleOptionSelect, onOptionCreate: a.onOptionCreate, onOptionDestroy: a.onOptionDestroy, selectRef: a.selectRef, setSelected: a.setSelected })), { ...a, modelValue: n }; } }); function pre(e, t, n, r, a, o) { const i = lt("el-tag"), s = lt("el-tooltip"), l = lt("el-icon"), u = lt("el-option"), c = lt("el-options"), d = lt("el-scrollbar"), f = lt("el-select-menu"), h = Qb("click-outside"); return Xe((I(), j("div", { ref: "selectRef", class: H([e.nsSelect.b(), e.nsSelect.m(e.selectSize)]), [Jb(e.mouseEnterEventName)]: (p) => e.states.inputHovering = !0, onMouseleave: (p) => e.states.inputHovering = !1 }, [ ue(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: (p) => e.states.isBeforeHide = !1 }, { default: K(() => { var p; return [ W("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: Je(e.toggleMenu, ["prevent"]) }, [ e.$slots.prefix ? (I(), j("div", { key: 0, ref: "prefixRef", class: H(e.nsSelect.e("prefix")) }, [ he(e.$slots, "prefix") ], 2)) : ne("v-if", !0), W("div", { ref: "selectionRef", class: H([ e.nsSelect.e("selection"), e.nsSelect.is("near", e.multiple && !e.$slots.prefix && !!e.states.selected.length) ]) }, [ e.multiple ? he(e.$slots, "tag", { key: 0 }, () => [ (I(!0), j(Qe, null, Nt(e.showTagList, (v) => (I(), j("div", { key: e.getValueKey(v), class: H(e.nsSelect.e("selected-item")) }, [ ue(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: K(() => [ W("span", { class: H(e.nsSelect.e("tags-text")) }, [ he(e.$slots, "label", { label: v.currentLabel, value: v.value }, () => [ et(Fe(v.currentLabel), 1) ]) ], 2) ]), _: 2 }, 1032, ["closable", "size", "type", "effect", "style", "onClose"]) ], 2))), 128)), e.collapseTags && e.states.selected.length > e.maxCollapseTags ? (I(), de(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: K(() => [ W("div", { ref: "collapseItemRef", class: H(e.nsSelect.e("selected-item")) }, [ ue(i, { closable: !1, size: e.collapseTagSize, type: e.tagType, effect: e.tagEffect, "disable-transitions": "", style: Ye(e.collapseTagStyle) }, { default: K(() => [ W("span", { class: H(e.nsSelect.e("tags-text")) }, " + " + Fe(e.states.selected.length - e.maxCollapseTags), 3) ]), _: 1 }, 8, ["size", "type", "effect", "style"]) ], 2) ]), content: K(() => [ W("div", { ref: "tagMenuRef", class: H(e.nsSelect.e("selection")) }, [ (I(!0), j(Qe, null, Nt(e.collapseTagList, (v) => (I(), j("div", { key: e.getValueKey(v), class: H(e.nsSelect.e("selected-item")) }, [ ue(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: K(() => [ W("span", { class: H(e.nsSelect.e("tags-text")) }, [ he(e.$slots, "label", { label: v.currentLabel, value: v.value }, () => [ et(Fe(v.currentLabel), 1) ]) ], 2) ]), _: 2 }, 1032, ["closable", "size", "type", "effect", "onClose"]) ], 2))), 128)) ], 2) ]), _: 3 }, 8, ["disabled", "effect", "teleported"])) : ne("v-if", !0) ]) : ne("v-if", !0), e.selectDisabled ? ne("v-if", !0) : (I(), j("div", { key: 1, class: H([ e.nsSelect.e("selected-item"), e.nsSelect.e("input-wrapper"), e.nsSelect.is("hidden", !e.filterable) ]) }, [ Xe(W("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": ((p = e.hoverOption) == null ? void 0 : p.id) || "", "aria-controls": e.contentId, "aria-expanded": e.dropdownMenuVisible, "aria-label": e.ariaLabel, "aria-autocomplete": "none", "aria-haspopup": "listbox", onKeydown: [ gn(Je((v) => e.navigateOptions("next"), ["stop", "prevent"]), ["down"]), gn(Je((v) => e.navigateOptions("prev"), ["stop", "prevent"]), ["up"]), gn(Je(e.handleEsc, ["stop", "prevent"]), ["esc"]), gn(Je(e.selectOption, ["stop", "prevent"]), ["enter"]), gn(Je(e.deletePrevTag, ["stop"]), ["delete"]) ], onCompositionstart: e.handleCompositionStart, onCompositionupdate: e.handleCompositionUpdate, onCompositionend: e.handleCompositionEnd, onInput: e.onInput, onClick: Je(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"]), [ [xg, e.states.inputValue] ]), e.filterable ? (I(), j("span", { key: 0, ref: "calculatorRef", "aria-hidden": "true", class: H(e.nsSelect.e("input-calculator")), textContent: Fe(e.states.inputValue) }, null, 10, ["textContent"])) : ne("v-if", !0) ], 2)), e.shouldShowPlaceholder ? (I(), j("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 ? he(e.$slots, "label", { key: 0, label: e.currentPlaceholder, value: e.modelValue }, () => [ W("span", null, Fe(e.currentPlaceholder), 1) ]) : (I(), j("span", { key: 1 }, Fe(e.currentPlaceholder), 1)) ], 2)) : ne("v-if", !0) ], 2), W("div", { ref: "suffixRef", class: H(e.nsSelect.e("suffix")) }, [ e.iconComponent && !e.showClose ? (I(), de(l, { key: 0, class: H([e.nsSelect.e("caret"), e.nsSelect.e("icon"), e.iconReverse]) }, { default: K(() => [ (I(), de(ct(e.iconComponent))) ]), _: 1 }, 8, ["class"])) : ne("v-if", !0), e.showClose && e.clearIcon ? (I(), de(l, { key: 1, class: H([ e.nsSelect.e("caret"), e.nsSelect.e("icon"), e.nsSelect.e("clear") ]), onClick: e.handleClearClick }, { default: K(() => [ (I(), de(ct(e.clearIcon))) ]), _: 1 }, 8, ["class", "onClick"])) : ne("v-if", !0), e.validateState && e.validateIcon ? (I(), de(l, { key: 2, class: H([e.nsInput.e("icon"), e.nsInput.e("validateIcon")]) }, { default: K(() => [ (I(), de(ct(e.validateIcon))) ]), _: 1 }, 8, ["class"])) : ne("v-if", !0) ], 2) ], 10, ["onClick"]) ]; }), content: K(() => [ ue(f, { ref: "menuRef" }, { default: K(() => [ e.$slots.header ? (I(), j("div", { key: 0, class: H(e.nsSelect.be("dropdown", "header")), onClick: Je(() => { }, ["stop"]) }, [ he(e.$slots, "header") ], 10, ["onClick"])) : ne("v-if", !0), Xe(ue(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: K(() => [ e.showNewOption ? (I(), de(u, { key: 0, value: e.states.inputValue, created: !0 }, null, 8, ["value"])) : ne("v-if", !0), ue(c, null, { default: K(() => [ he(e.$slots, "default") ]), _: 3 }) ]), _: 3 }, 8, ["id", "wrap-class", "view-class", "class", "aria-label"]), [ [mt, e.states.options.size > 0 && !e.loading] ]), e.$slots.loading && e.loading ? (I(), j("div", { key: 1, class: H(e.nsSelect.be("dropdown", "loading")) }, [ he(e.$slots, "loading") ], 2)) : e.loading || e.filteredOptionsCount === 0 ? (I(), j("div", { key: 2, class: H(e.nsSelect.be("dropdown", "empty")) }, [ he(e.$slots, "empty", {}, () => [ W("span", null, Fe(e.emptyText), 1) ]) ], 2)) : ne("v-if", !0), e.$slots.footer ? (I(), j("div", { key: 3, class: H(e.nsSelect.be("dropdown", "footer")), onClick: Je(() => { }, ["stop"]) }, [ he(e.$slots, "footer") ], 10, ["onClick"])) : ne("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 fre = /* @__PURE__ */ yn(dre, [["render", pre], ["__file", "select.vue"]]); const hre = X({ name: "ElOptionGroup", componentName: "ElOptionGroup", props: { label: String, disabled: Boolean }, setup(e) { const t = In("select"), n = U(null), r = tt(), a = U([]); rt(tN, tn({ ...Sr(e) })); const o = F(() => a.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 = vu(u), d = []; return c.forEach((f) => { var h, p; i(f) ? d.push(f.component.proxy) : (h = f.children) != null && h.length ? d.push(...s(f.children)) : (p = f.component) != null && p.subTree && d.push(...s(f.component.subTree)); }), d; }, l = () => { a.value = s(r.subTree); }; return nt(() => { l(); }), tG(n, l, { attributes: !0, subtree: !0, childList: !0 }), { groupRef: n, visible: o, ns: t }; } }); function vre(e, t, n, r, a, o) { return Xe((I(), j("ul", { ref: "groupRef", class: H(e.ns.be("group", "wrap")) }, [ W("li", { class: H(e.ns.be("group", "title")) }, Fe(e.label), 3), W("li", null, [ W("ul", { class: H(e.ns.b("group")) }, [ he(e.$slots, "default") ], 2) ]) ], 2)), [ [mt, e.visible] ]); } var nN = /* @__PURE__ */ yn(hre, [["render", vre], ["__file", "option-group.vue"]]); const rN = qa(fre, { Option: JS, OptionGroup: nN }), aN = Kd(JS); Kd(nN); const gre = Dn({ trigger: f0.trigger, placement: Fx.placement, disabled: f0.disabled, visible: Ga.visible, transition: Ga.transition, popperOptions: Fx.popperOptions, tabindex: Fx.tabindex, content: Ga.content, popperStyle: Ga.popperStyle, popperClass: Ga.popperClass, enterable: { ...Ga.enterable, default: !0 }, effect: { ...Ga.effect, default: "light" }, teleported: Ga.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 } }), mre = { "update:visible": (e) => Yc(e), "before-enter": () => !0, "before-leave": () => !0, "after-enter": () => !0, "after-leave": () => !0 }, yre = "onUpdate:visible", bre = X({ name: "ElPopover" }), wre = /* @__PURE__ */ X({ ...bre, props: gre, emits: mre, setup(e, { expose: t, emit: n }) { const r = e, a = F(() => r[yre]), o = In("popover"), i = U(), s = F(() => { var m; return (m = b(i)) == null ? void 0 : m.popperRef; }), l = F(() => [ { width: u0(r.width) }, r.popperStyle ]), u = F(() => [o.b(), r.popperClass, { [o.m("plain")]: !!r.content }]), c = F(() => r.transition === `${o.namespace.value}-fade-in-linear`), d = () => { var m; (m = i.value) == null || m.hide(); }, f = () => { n("before-enter"); }, h = () => { n("before-leave"); }, p = () => { n("after-enter"); }, v = () => { n("update:visible", !1), n("after-leave"); }; return t({ popperRef: s, hide: d }), (m, g) => (I(), de(b(ZS), Bt({ 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": b(u), "popper-style": b(l), teleported: m.teleported, persistent: m.persistent, "gpu-acceleration": b(c), "onUpdate:visible": b(a), onBeforeShow: f, onBeforeHide: h, onShow: p, onHide: v }), { content: K(() => [ m.title ? (I(), j("div", { key: 0, class: H(b(o).e("title")), role: "title" }, Fe(m.title), 3)) : ne("v-if", !0), he(m.$slots, "default", {}, () => [ et(Fe(m.content), 1) ]) ]), default: K(() => [ m.$slots.reference ? he(m.$slots, "reference", { key: 0 }) : ne("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 xre = /* @__PURE__ */ yn(wre, [["__file", "popover.vue"]]); const eT = (e, t) => { const n = t.arg || t.value, r = n == null ? void 0 : n.popperRef; r && (r.triggerRef = e); }; var kre = { mounted(e, t) { eT(e, t); }, updated(e, t) { eT(e, t); } }; const Cre = "popover", Sre = EQ(kre, Cre), w2 = qa(xre, { directive: Sre }), Ere = Dn({ modelValue: { type: [Boolean, String, Number], default: !1 }, disabled: Boolean, loading: Boolean, size: { type: String, validator: _Q }, width: { type: [String, Number], default: "" }, inlinePrompt: Boolean, inactiveActionIcon: { type: Bi }, activeActionIcon: { type: Bi }, activeIcon: { type: Bi }, inactiveIcon: { type: Bi }, activeText: { type: String, default: "" }, inactiveText: { type: String, default: "" }, activeValue: { type: [Boolean, String, Number], default: !0 }, inactiveValue: { type: [Boolean, String, Number], default: !1 }, name: { type: String, default: "" }, validateEvent: { type: Boolean, default: !0 }, beforeChange: { type: Pt(Function) }, id: String, tabindex: { type: [String, Number] }, ...Gd(["ariaLabel"]) }), _re = { [Ca]: (e) => Yc(e) || Ea(e) || Wr(e), [pd]: (e) => Yc(e) || Ea(e) || Wr(e), [hf]: (e) => Yc(e) || Ea(e) || Wr(e) }, SC = "ElSwitch", Tre = X({ name: SC }), Ore = /* @__PURE__ */ X({ ...Tre, props: Ere, emits: _re, setup(e, { expose: t, emit: n }) { const r = e, { formItem: a } = v2(), o = _g(), i = In("switch"), { inputId: s } = qS(r, { formItemContext: a }), l = Tg(F(() => r.loading)), u = U(r.modelValue !== !1), c = U(), d = U(), f = F(() => [ i.b(), i.m(o.value), i.is("disabled", l.value), i.is("checked", g.value) ]), h = F(() => [ i.e("label"), i.em("label", "left"), i.is("active", !g.value) ]), p = F(() => [ i.e("label"), i.em("label", "right"), i.is("active", g.value) ]), v = F(() => ({ width: u0(r.width) })); be(() => r.modelValue, () => { u.value = !0; }); const m = F(() => u.value ? r.modelValue : !1), g = F(() => m.value === r.activeValue); [r.activeValue, r.inactiveValue].includes(m.value) || (n(Ca, r.inactiveValue), n(pd, r.inactiveValue), n(hf, r.inactiveValue)), be(g, (k) => { var C; c.value.checked = k, r.validateEvent && ((C = a == null ? void 0 : a.validate) == null || C.call(a, "change").catch((S) => ia(S))); }); const y = () => { const k = g.value ? r.inactiveValue : r.activeValue; n(Ca, k), n(pd, k), n(hf, k), Ue(() => { c.value.checked = g.value; }); }, x = () => { if (l.value) return; const { beforeChange: k } = r; if (!k) { y(); return; } const C = k(); [ q_(C), Yc(C) ].includes(!0) || AS(SC, "beforeChange must return type `Promise` or `boolean`"), q_(C) ? C.then((_) => { _ && y(); }).catch((_) => { ia(SC, `some error occurred: ${_}`); }) : C && y(); }, w = () => { var k, C; (C = (k = c.value) == null ? void 0 : k.focus) == null || C.call(k); }; return nt(() => { c.value.checked = g.value; }), t({ focus: w, checked: g }), (k, C) => (I(), j("div", { class: H(b(f)), onClick: Je(x, ["prevent"]) }, [ W("input", { id: b(s), ref_key: "input", ref: c, class: H(b(i).e("input")), type: "checkbox", role: "switch", "aria-checked": b(g), "aria-disabled": b(l), "aria-label": k.ariaLabel, name: k.name, "true-value": k.activeValue, "false-value": k.inactiveValue, disabled: b(l), tabindex: k.tabindex, onChange: y, onKeydown: gn(x, ["enter"]) }, null, 42, ["id", "aria-checked", "aria-disabled", "aria-label", "name", "true-value", "false-value", "disabled", "tabindex", "onKeydown"]), !k.inlinePrompt && (k.inactiveIcon || k.inactiveText) ? (I(), j("span", { key: 0, class: H(b(h)) }, [ k.inactiveIcon ? (I(), de(b(Ir), { key: 0 }, { default: K(() => [ (I(), de(ct(k.inactiveIcon))) ]), _: 1 })) : ne("v-if", !0), !k.inactiveIcon && k.inactiveText ? (I(), j("span", { key: 1, "aria-hidden": b(g) }, Fe(k.inactiveText), 9, ["aria-hidden"])) : ne("v-if", !0) ], 2)) : ne("v-if", !0), W("span", { ref_key: "core", ref: d, class: H(b(i).e("core")), style: Ye(b(v)) }, [ k.inlinePrompt ? (I(), j("div", { key: 0, class: H(b(i).e("inner")) }, [ k.activeIcon || k.inactiveIcon ? (I(), de(b(Ir), { key: 0, class: H(b(i).is("icon")) }, { default: K(() => [ (I(), de(ct(b(g) ? k.activeIcon : k.inactiveIcon))) ]), _: 1 }, 8, ["class"])) : k.activeText || k.inactiveText ? (I(), j("span", { key: 1, class: H(b(i).is("text")), "aria-hidden": !b(g) }, Fe(b(g) ? k.activeText : k.inactiveText), 11, ["aria-hidden"])) : ne("v-if", !0) ], 2)) : ne("v-if", !0), W("div", { class: H(b(i).e("action")) }, [ k.loading ? (I(), de(b(Ir), { key: 0, class: H(b(i).is("loading")) }, { default: K(() => [ ue(b(c2)) ]), _: 1 }, 8, ["class"])) : b(g) ? he(k.$slots, "active-action", { key: 1 }, () => [ k.activeActionIcon ? (I(), de(b(Ir), { key: 0 }, { default: K(() => [ (I(), de(ct(k.activeActionIcon))) ]), _: 1 })) : ne("v-if", !0) ]) : b(g) ? ne("v-if", !0) : he(k.$slots, "inactive-action", { key: 2 }, () => [ k.inactiveActionIcon ? (I(), de(b(Ir), { key: 0 }, { default: K(() => [ (I(), de(ct(k.inactiveActionIcon))) ]), _: 1 })) : ne("v-if", !0) ]) ], 2) ], 6), !k.inlinePrompt && (k.activeIcon || k.activeText) ? (I(), j("span", { key: 1, class: H(b(p)) }, [ k.activeIcon ? (I(), de(b(Ir), { key: 0 }, { default: K(() => [ (I(), de(ct(k.activeIcon))) ]), _: 1 })) : ne("v-if", !0), !k.activeIcon && k.activeText ? (I(), j("span", { key: 1, "aria-hidden": !b(g) }, Fe(k.activeText), 9, ["aria-hidden"])) : ne("v-if", !0) ], 2)) : ne("v-if", !0) ], 10, ["onClick"])); } }); var $re = /* @__PURE__ */ yn(Ore, [["__file", "switch.vue"]]); const oN = qa($re); function Fre(e) { let t; const n = U(!1), r = tn({ ...e, originalPosition: "", originalOverflow: "", visible: !1 }); function a(f) { r.text = f; } function o() { const f = r.parent, h = d.ns; if (!f.vLoadingAddClassList) { let p = f.getAttribute("loading-number"); p = Number.parseInt(p) - 1, p ? f.setAttribute("loading-number", p.toString()) : (My(f, h.bm("parent", "relative")), f.removeAttribute("loading-number")), My(f, h.bm("parent", "hidden")); } i(), c.unmount(); } function i() { var f, h; (h = (f = d.$el) == null ? void 0 : f.parentNode) == null || h.removeChild(d.$el); } function s() { var f; e.beforeClose && !e.beforeClose() || (n.value = !0, clearTimeout(t), t = setTimeout(l, 400), r.visible = !1, (f = e.closed) == null || f.call(e)); } function l() { if (!n.value) return; const f = r.parent; n.value = !1, f.vLoadingAddClassList = void 0, o(); } const u = X({ name: "ElLoading", setup(f, { expose: h }) { const { ns: p, zIndex: v } = pee("loading"); return h({ ns: p, zIndex: v }), () => { const m = r.spinner || r.svg, g = sn("svg", { class: "circular", viewBox: r.svgViewBox ? r.svgViewBox : "0 0 50 50", ...m ? { innerHTML: m } : {} }, [ sn("circle", { class: "path", cx: "25", cy: "25", r: "20", fill: "none" }) ]), y = r.text ? sn("p", { class: p.b("text") }, [r.text]) : void 0; return sn(vr, { name: p.b("fade"), onAfterLeave: l }, { default: K(() => [ Xe(ue("div", { style: { backgroundColor: r.background || "" }, class: [ p.b("mask"), r.customClass, r.fullscreen ? "is-fullscreen" : "" ] }, [ sn("div", { class: p.b("spinner") }, [g, y]) ]), [[mt, r.visible]]) ]) }); }; } }), c = e2(u), d = c.mount(document.createElement("div")); return { ...Sr(r), setText: a, removeElLoadingChild: i, close: s, handleAfterLeave: l, vm: d, get $el() { return d.$el; } }; } let Im; const EC = function(e = {}) { if (!Mr) return; const t = Are(e); if (t.fullscreen && Im) return Im; const n = Fre({ ...t, closed: () => { var a; (a = t.closed) == null || a.call(t), t.fullscreen && (Im = void 0); } }); Ire(t, t.parent, n), tT(t, t.parent, n), t.parent.vLoadingAddClassList = () => tT(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), Ue(() => n.visible.value = t.visible), t.fullscreen && (Im = n), n; }, Are = (e) => { var t, n, r, a; let o; return Ea(e.target) ? o = (t = document.querySelector(e.target)) != null ? t : document.body : o = e.target || document.body, { parent: o === document.body || e.body ? document.body : o, background: e.background || "", svg: e.svg || "", svgViewBox: e.svgViewBox || "", spinner: e.spinner || !1, text: e.text || "", fullscreen: o === document.body && ((n = e.fullscreen) != null ? n : !0), lock: (r = e.lock) != null ? r : !1, customClass: e.customClass || "", visible: (a = e.visible) != null ? a : !0, beforeClose: e.beforeClose, closed: e.closed, target: o }; }, Ire = async (e, t, n) => { const { nextZIndex: r } = n.vm.zIndex || n.vm._.exposed.zIndex, a = {}; if (e.fullscreen) n.originalPosition.value = Gh(document.body, "position"), n.originalOverflow.value = Gh(document.body, "overflow"), a.zIndex = r(); else if (e.parent === document.body) { n.originalPosition.value = Gh(document.body, "position"), await Ue(); for (const o of ["top", "left"]) { const i = o === "top" ? "scrollTop" : "scrollLeft"; a[o] = `${e.target.getBoundingClientRect()[o] + document.body[i] + document.documentElement[i] - Number.parseInt(Gh(document.body, `margin-${o}`), 10)}px`; } for (const o of ["height", "width"]) a[o] = `${e.target.getBoundingClientRect()[o]}px`; } else n.originalPosition.value = Gh(t, "position"); for (const [o, i] of Object.entries(a)) n.$el.style[o] = i; }, tT = (e, t, n) => { const r = n.vm.ns || n.vm._.exposed.ns; ["absolute", "fixed", "sticky"].includes(n.originalPosition.value) ? My(t, r.bm("parent", "relative")) : y8(t, r.bm("parent", "relative")), e.fullscreen && e.lock ? y8(t, r.bm("parent", "hidden")) : My(t, r.bm("parent", "hidden")); }, q1 = Symbol("ElLoading"), nT = (e, t) => { var n, r, a, o; const i = t.instance, s = (f) => na(t.value) ? t.value[f] : void 0, l = (f) => { const h = Ea(f) && (i == null ? void 0 : i[f]) || f; return h && U(h); }, u = (f) => l(s(f) || e.getAttribute(`element-loading-${hG(f)}`)), 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: (a = s("body")) != null ? a : t.modifiers.body, lock: (o = s("lock")) != null ? o : t.modifiers.lock }; e[q1] = { options: d, instance: EC(d) }; }, Pre = (e, t) => { for (const n of Object.keys(t)) ar(t[n]) && (t[n].value = e[n]); }, bf = { mounted(e, t) { t.value && nT(e, t); }, updated(e, t) { const n = e[q1]; t.oldValue !== t.value && (t.value && !t.oldValue ? nT(e, t) : t.value && t.oldValue ? na(t.value) && Pre(t.value, n.options) : n == null || n.instance.close()); }, unmounted(e) { var t; (t = e[q1]) == null || t.instance.close(), e[q1] = null; } }, iN = { install(e) { e.directive("loading", bf), e.config.globalProperties.$loading = EC; }, directive: bf, service: EC }, Qs = (e, t, { checkForDefaultPrevented: n = !0 } = {}) => (r) => { const a = e == null ? void 0 : e(r); if (n === !1 || !a) return t == null ? void 0 : t(r); }; var rT; const Gr = typeof window < "u", Lre = (e) => typeof e == "string", sN = () => { }, _C = Gr && ((rT = window == null ? void 0 : window.navigator) == null ? void 0 : rT.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent); function lN(e) { return typeof e == "function" ? e() : b(e); } function Nre(e) { return e; } function x2(e) { return hg() ? (ah(e), !0) : !1; } function Mre(e, t = !0) { tt() ? nt(e) : t ? e() : Ue(e); } function cl(e) { var t; const n = lN(e); return (t = n == null ? void 0 : n.$el) != null ? t : n; } const k2 = Gr ? window : void 0; function Wo(...e) { let t, n, r, a; if (Lre(e[0]) || Array.isArray(e[0]) ? ([n, r, a] = e, t = k2) : [t, n, r, a] = e, !t) return sN; Array.isArray(n) || (n = [n]), Array.isArray(r) || (r = [r]); const o = [], i = () => { o.forEach((c) => c()), o.length = 0; }, s = (c, d, f, h) => (c.addEventListener(d, f, h), () => c.removeEventListener(d, f, h)), l = be(() => [cl(t), lN(a)], ([c, d]) => { i(), c && o.push(...n.flatMap((f) => r.map((h) => s(c, f, h, d)))); }, { immediate: !0, flush: "post" }), u = () => { l(), i(); }; return x2(u), u; } let aT = !1; function Bre(e, t, n = {}) { const { window: r = k2, ignore: a = [], capture: o = !0, detectIframe: i = !1 } = n; if (!r) return; _C && !aT && (aT = !0, Array.from(r.document.body.children).forEach((c) => c.addEventListener("click", sN))); let s = !0; const l = (c) => a.some((d) => { if (typeof d == "string") return Array.from(r.document.querySelectorAll(d)).some((f) => f === c.target || c.composedPath().includes(f)); { const f = cl(d); return f && (c.target === f || c.composedPath().includes(f)); } }), u = [ Wo(r, "click", (c) => { const d = cl(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: o }), Wo(r, "pointerdown", (c) => { const d = cl(e); d && (s = !c.composedPath().includes(d) && !l(c)); }, { passive: !0 }), i && Wo(r, "blur", (c) => { var d; const f = cl(e); ((d = r.document.activeElement) == null ? void 0 : d.tagName) === "IFRAME" && !(f != null && f.contains(r.document.activeElement)) && t(c); }) ].filter(Boolean); return () => u.forEach((c) => c()); } function uN(e, t = !1) { const n = U(), r = () => n.value = !!e(); return r(), Mre(r, t), n; } const oT = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, iT = "__vueuse_ssr_handlers__"; oT[iT] = oT[iT] || {}; var sT = Object.getOwnPropertySymbols, Dre = Object.prototype.hasOwnProperty, Rre = Object.prototype.propertyIsEnumerable, zre = (e, t) => { var n = {}; for (var r in e) Dre.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]); if (e != null && sT) for (var r of sT(e)) t.indexOf(r) < 0 && Rre.call(e, r) && (n[r] = e[r]); return n; }; function rl(e, t, n = {}) { const r = n, { window: a = k2 } = r, o = zre(r, ["window"]); let i; const s = uN(() => a && "ResizeObserver" in a), l = () => { i && (i.disconnect(), i = void 0); }, u = be(() => cl(e), (d) => { l(), s.value && a && d && (i = new ResizeObserver(t), i.observe(d, o)); }, { immediate: !0, flush: "post" }), c = () => { l(), u(); }; return x2(c), { isSupported: s, stop: c }; } var lT = Object.getOwnPropertySymbols, Vre = Object.prototype.hasOwnProperty, jre = Object.prototype.propertyIsEnumerable, Hre = (e, t) => { var n = {}; for (var r in e) Vre.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]); if (e != null && lT) for (var r of lT(e)) t.indexOf(r) < 0 && jre.call(e, r) && (n[r] = e[r]); return n; }; function Ure(e, t, n = {}) { const r = n, { window: a = k2 } = r, o = Hre(r, ["window"]); let i; const s = uN(() => a && "MutationObserver" in a), l = () => { i && (i.disconnect(), i = void 0); }, u = be(() => cl(e), (d) => { l(), s.value && a && d && (i = new MutationObserver(t), i.observe(d, o)); }, { immediate: !0 }), c = () => { l(), u(); }; return x2(c), { isSupported: s, stop: c }; } var uT; (function(e) { e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE"; })(uT || (uT = {})); var qre = Object.defineProperty, cT = Object.getOwnPropertySymbols, Wre = Object.prototype.hasOwnProperty, Kre = Object.prototype.propertyIsEnumerable, dT = (e, t, n) => t in e ? qre(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Gre = (e, t) => { for (var n in t || (t = {})) Wre.call(t, n) && dT(e, n, t[n]); if (cT) for (var n of cT(t)) Kre.call(t, n) && dT(e, n, t[n]); return e; }; const Xre = { 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] }; Gre({ linear: Nre }, Xre); const Yre = () => Gr && /firefox/i.test(window.navigator.userAgent), e4 = (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 h0 = () => { }, Zre = Object.prototype.hasOwnProperty, hd = (e, t) => Zre.call(e, t), to = Array.isArray, Va = (e) => typeof e == "function", oo = (e) => typeof e == "string", ja = (e) => e !== null && typeof e == "object", Qre = Object.prototype.toString, Jre = (e) => Qre.call(e), Ax = (e) => Jre(e).slice(8, -1); var cN = typeof global == "object" && global && global.Object === Object && global, eae = typeof self == "object" && self && self.Object === Object && self, Ns = cN || eae || Function("return this")(), Cs = Ns.Symbol, dN = Object.prototype, tae = dN.hasOwnProperty, nae = dN.toString, Yh = Cs ? Cs.toStringTag : void 0; function rae(e) { var t = tae.call(e, Yh), n = e[Yh]; try { e[Yh] = void 0; var r = !0; } catch { } var a = nae.call(e); return r && (t ? e[Yh] = n : delete e[Yh]), a; } var aae = Object.prototype, oae = aae.toString; function iae(e) { return oae.call(e); } var sae = "[object Null]", lae = "[object Undefined]", pT = Cs ? Cs.toStringTag : void 0; function uh(e) { return e == null ? e === void 0 ? lae : sae : pT && pT in Object(e) ? rae(e) : iae(e); } function wf(e) { return e != null && typeof e == "object"; } var uae = "[object Symbol]"; function C2(e) { return typeof e == "symbol" || wf(e) && uh(e) == uae; } function cae(e, t) { for (var n = -1, r = e == null ? 0 : e.length, a = Array(r); ++n < r; ) a[n] = t(e[n], n, e); return a; } var Ui = Array.isArray, dae = 1 / 0, fT = Cs ? Cs.prototype : void 0, hT = fT ? fT.toString : void 0; function pN(e) { if (typeof e == "string") return e; if (Ui(e)) return cae(e, pN) + ""; if (C2(e)) return hT ? hT.call(e) : ""; var t = e + ""; return t == "0" && 1 / e == -dae ? "-0" : t; } var pae = /\s/; function fae(e) { for (var t = e.length; t-- && pae.test(e.charAt(t)); ) ; return t; } var hae = /^\s+/; function vae(e) { return e && e.slice(0, fae(e) + 1).replace(hae, ""); } function Du(e) { var t = typeof e; return e != null && (t == "object" || t == "function"); } var vT = NaN, gae = /^[-+]0x[0-9a-f]+$/i, mae = /^0b[01]+$/i, yae = /^0o[0-7]+$/i, bae = parseInt; function gT(e) { if (typeof e == "number") return e; if (C2(e)) return vT; 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 = vae(e); var n = mae.test(e); return n || yae.test(e) ? bae(e.slice(2), n ? 2 : 8) : gae.test(e) ? vT : +e; } function fN(e) { return e; } var wae = "[object AsyncFunction]", xae = "[object Function]", kae = "[object GeneratorFunction]", Cae = "[object Proxy]"; function hN(e) { if (!Du(e)) return !1; var t = uh(e); return t == xae || t == kae || t == wae || t == Cae; } var Ix = Ns["__core-js_shared__"], mT = function() { var e = /[^.]+$/.exec(Ix && Ix.keys && Ix.keys.IE_PROTO || ""); return e ? "Symbol(src)_1." + e : ""; }(); function Sae(e) { return !!mT && mT in e; } var Eae = Function.prototype, _ae = Eae.toString; function Xd(e) { if (e != null) { try { return _ae.call(e); } catch { } try { return e + ""; } catch { } } return ""; } var Tae = /[\\^$.*+?()[\]{}|]/g, Oae = /^\[object .+?Constructor\]$/, $ae = Function.prototype, Fae = Object.prototype, Aae = $ae.toString, Iae = Fae.hasOwnProperty, Pae = RegExp( "^" + Aae.call(Iae).replace(Tae, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$" ); function Lae(e) { if (!Du(e) || Sae(e)) return !1; var t = hN(e) ? Pae : Oae; return t.test(Xd(e)); } function Nae(e, t) { return e == null ? void 0 : e[t]; } function Yd(e, t) { var n = Nae(e, t); return Lae(n) ? n : void 0; } var TC = Yd(Ns, "WeakMap"); function Mae(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 Bae = 800, Dae = 16, Rae = Date.now; function zae(e) { var t = 0, n = 0; return function() { var r = Rae(), a = Dae - (r - n); if (n = r, a > 0) { if (++t >= Bae) return arguments[0]; } else t = 0; return e.apply(void 0, arguments); }; } function Vae(e) { return function() { return e; }; } var zy = function() { try { var e = Yd(Object, "defineProperty"); return e({}, "", {}), e; } catch { } }(), jae = zy ? function(e, t) { return zy(e, "toString", { configurable: !0, enumerable: !1, value: Vae(t), writable: !0 }); } : fN, Hae = zae(jae); function Uae(e, t, n, r) { e.length; for (var a = n + 1; a--; ) if (t(e[a], a, e)) return a; return -1; } var qae = 9007199254740991, Wae = /^(?:0|[1-9]\d*)$/; function t4(e, t) { var n = typeof e; return t = t ?? qae, !!t && (n == "number" || n != "symbol" && Wae.test(e)) && e > -1 && e % 1 == 0 && e < t; } function Kae(e, t, n) { t == "__proto__" && zy ? zy(e, t, { configurable: !0, enumerable: !0, value: n, writable: !0 }) : e[t] = n; } function n4(e, t) { return e === t || e !== e && t !== t; } var Gae = Object.prototype, Xae = Gae.hasOwnProperty; function Yae(e, t, n) { var r = e[t]; (!(Xae.call(e, t) && n4(r, n)) || n === void 0 && !(t in e)) && Kae(e, t, n); } var yT = Math.max; function Zae(e, t, n) { return t = yT(t === void 0 ? e.length - 1 : t, 0), function() { for (var r = arguments, a = -1, o = yT(r.length - t, 0), i = Array(o); ++a < o; ) i[a] = r[t + a]; a = -1; for (var s = Array(t + 1); ++a < t; ) s[a] = r[a]; return s[t] = n(i), Mae(e, this, s); }; } var Qae = 9007199254740991; function r4(e) { return typeof e == "number" && e > -1 && e % 1 == 0 && e <= Qae; } function Jae(e) { return e != null && r4(e.length) && !hN(e); } var eoe = Object.prototype; function toe(e) { var t = e && e.constructor, n = typeof t == "function" && t.prototype || eoe; return e === n; } function noe(e, t) { for (var n = -1, r = Array(e); ++n < e; ) r[n] = t(n); return r; } var roe = "[object Arguments]"; function bT(e) { return wf(e) && uh(e) == roe; } var vN = Object.prototype, aoe = vN.hasOwnProperty, ooe = vN.propertyIsEnumerable, a4 = bT(/* @__PURE__ */ function() { return arguments; }()) ? bT : function(e) { return wf(e) && aoe.call(e, "callee") && !ooe.call(e, "callee"); }; function ioe() { return !1; } var gN = typeof exports == "object" && exports && !exports.nodeType && exports, wT = gN && typeof module == "object" && module && !module.nodeType && module, soe = wT && wT.exports === gN, xT = soe ? Ns.Buffer : void 0, loe = xT ? xT.isBuffer : void 0, OC = loe || ioe, uoe = "[object Arguments]", coe = "[object Array]", doe = "[object Boolean]", poe = "[object Date]", foe = "[object Error]", hoe = "[object Function]", voe = "[object Map]", goe = "[object Number]", moe = "[object Object]", yoe = "[object RegExp]", boe = "[object Set]", woe = "[object String]", xoe = "[object WeakMap]", koe = "[object ArrayBuffer]", Coe = "[object DataView]", Soe = "[object Float32Array]", Eoe = "[object Float64Array]", _oe = "[object Int8Array]", Toe = "[object Int16Array]", Ooe = "[object Int32Array]", $oe = "[object Uint8Array]", Foe = "[object Uint8ClampedArray]", Aoe = "[object Uint16Array]", Ioe = "[object Uint32Array]", Zn = {}; Zn[Soe] = Zn[Eoe] = Zn[_oe] = Zn[Toe] = Zn[Ooe] = Zn[$oe] = Zn[Foe] = Zn[Aoe] = Zn[Ioe] = !0; Zn[uoe] = Zn[coe] = Zn[koe] = Zn[doe] = Zn[Coe] = Zn[poe] = Zn[foe] = Zn[hoe] = Zn[voe] = Zn[goe] = Zn[moe] = Zn[yoe] = Zn[boe] = Zn[woe] = Zn[xoe] = !1; function Poe(e) { return wf(e) && r4(e.length) && !!Zn[uh(e)]; } function Loe(e) { return function(t) { return e(t); }; } var mN = typeof exports == "object" && exports && !exports.nodeType && exports, Vv = mN && typeof module == "object" && module && !module.nodeType && module, Noe = Vv && Vv.exports === mN, Px = Noe && cN.process, kT = function() { try { var e = Vv && Vv.require && Vv.require("util").types; return e || Px && Px.binding && Px.binding("util"); } catch { } }(), CT = kT && kT.isTypedArray, yN = CT ? Loe(CT) : Poe, Moe = Object.prototype, Boe = Moe.hasOwnProperty; function Doe(e, t) { var n = Ui(e), r = !n && a4(e), a = !n && !r && OC(e), o = !n && !r && !a && yN(e), i = n || r || a || o, s = i ? noe(e.length, String) : [], l = s.length; for (var u in e) Boe.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. a && (u == "offset" || u == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays. o && (u == "buffer" || u == "byteLength" || u == "byteOffset") || // Skip index properties. t4(u, l))) && s.push(u); return s; } function Roe(e, t) { return function(n) { return e(t(n)); }; } var zoe = Roe(Object.keys, Object), Voe = Object.prototype, joe = Voe.hasOwnProperty; function Hoe(e) { if (!toe(e)) return zoe(e); var t = []; for (var n in Object(e)) joe.call(e, n) && n != "constructor" && t.push(n); return t; } function bN(e) { return Jae(e) ? Doe(e) : Hoe(e); } var Uoe = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, qoe = /^\w*$/; function o4(e, t) { if (Ui(e)) return !1; var n = typeof e; return n == "number" || n == "symbol" || n == "boolean" || e == null || C2(e) ? !0 : qoe.test(e) || !Uoe.test(e) || t != null && e in Object(t); } var v0 = Yd(Object, "create"); function Woe() { this.__data__ = v0 ? v0(null) : {}, this.size = 0; } function Koe(e) { var t = this.has(e) && delete this.__data__[e]; return this.size -= t ? 1 : 0, t; } var Goe = "__lodash_hash_undefined__", Xoe = Object.prototype, Yoe = Xoe.hasOwnProperty; function Zoe(e) { var t = this.__data__; if (v0) { var n = t[e]; return n === Goe ? void 0 : n; } return Yoe.call(t, e) ? t[e] : void 0; } var Qoe = Object.prototype, Joe = Qoe.hasOwnProperty; function eie(e) { var t = this.__data__; return v0 ? t[e] !== void 0 : Joe.call(t, e); } var tie = "__lodash_hash_undefined__"; function nie(e, t) { var n = this.__data__; return this.size += this.has(e) ? 0 : 1, n[e] = v0 && t === void 0 ? tie : t, this; } function vd(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]); } } vd.prototype.clear = Woe; vd.prototype.delete = Koe; vd.prototype.get = Zoe; vd.prototype.has = eie; vd.prototype.set = nie; function rie() { this.__data__ = [], this.size = 0; } function S2(e, t) { for (var n = e.length; n--; ) if (n4(e[n][0], t)) return n; return -1; } var aie = Array.prototype, oie = aie.splice; function iie(e) { var t = this.__data__, n = S2(t, e); if (n < 0) return !1; var r = t.length - 1; return n == r ? t.pop() : oie.call(t, n, 1), --this.size, !0; } function sie(e) { var t = this.__data__, n = S2(t, e); return n < 0 ? void 0 : t[n][1]; } function lie(e) { return S2(this.__data__, e) > -1; } function uie(e, t) { var n = this.__data__, r = S2(n, e); return r < 0 ? (++this.size, n.push([e, t])) : n[r][1] = t, this; } function $l(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]); } } $l.prototype.clear = rie; $l.prototype.delete = iie; $l.prototype.get = sie; $l.prototype.has = lie; $l.prototype.set = uie; var g0 = Yd(Ns, "Map"); function cie() { this.size = 0, this.__data__ = { hash: new vd(), map: new (g0 || $l)(), string: new vd() }; } function die(e) { var t = typeof e; return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e !== "__proto__" : e === null; } function E2(e, t) { var n = e.__data__; return die(t) ? n[typeof t == "string" ? "string" : "hash"] : n.map; } function pie(e) { var t = E2(this, e).delete(e); return this.size -= t ? 1 : 0, t; } function fie(e) { return E2(this, e).get(e); } function hie(e) { return E2(this, e).has(e); } function vie(e, t) { var n = E2(this, e), r = n.size; return n.set(e, t), this.size += n.size == r ? 0 : 1, this; } function Fl(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]); } } Fl.prototype.clear = cie; Fl.prototype.delete = pie; Fl.prototype.get = fie; Fl.prototype.has = hie; Fl.prototype.set = vie; var gie = "Expected a function"; function i4(e, t) { if (typeof e != "function" || t != null && typeof t != "function") throw new TypeError(gie); var n = function() { var r = arguments, a = t ? t.apply(this, r) : r[0], o = n.cache; if (o.has(a)) return o.get(a); var i = e.apply(this, r); return n.cache = o.set(a, i) || o, i; }; return n.cache = new (i4.Cache || Fl)(), n; } i4.Cache = Fl; var mie = 500; function yie(e) { var t = i4(e, function(r) { return n.size === mie && n.clear(), r; }), n = t.cache; return t; } var bie = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, wie = /\\(\\)?/g, xie = yie(function(e) { var t = []; return e.charCodeAt(0) === 46 && t.push(""), e.replace(bie, function(n, r, a, o) { t.push(a ? o.replace(wie, "$1") : r || n); }), t; }); function kie(e) { return e == null ? "" : pN(e); } function _2(e, t) { return Ui(e) ? e : o4(e, t) ? [e] : xie(kie(e)); } var Cie = 1 / 0; function Og(e) { if (typeof e == "string" || C2(e)) return e; var t = e + ""; return t == "0" && 1 / e == -Cie ? "-0" : t; } function s4(e, t) { t = _2(t, e); for (var n = 0, r = t.length; e != null && n < r; ) e = e[Og(t[n++])]; return n && n == r ? e : void 0; } function il(e, t, n) { var r = e == null ? void 0 : s4(e, t); return r === void 0 ? n : r; } function wN(e, t) { for (var n = -1, r = t.length, a = e.length; ++n < r; ) e[a + n] = t[n]; return e; } var ST = Cs ? Cs.isConcatSpreadable : void 0; function Sie(e) { return Ui(e) || a4(e) || !!(ST && e && e[ST]); } function Eie(e, t, n, r, a) { var o = -1, i = e.length; for (n || (n = Sie), a || (a = []); ++o < i; ) { var s = e[o]; n(s) ? wN(a, s) : a[a.length] = s; } return a; } function _ie(e) { var t = e == null ? 0 : e.length; return t ? Eie(e) : []; } function Tie(e) { return Hae(Zae(e, void 0, _ie), e + ""); } function gu() { if (!arguments.length) return []; var e = arguments[0]; return Ui(e) ? e : [e]; } function Oie() { this.__data__ = new $l(), this.size = 0; } function $ie(e) { var t = this.__data__, n = t.delete(e); return this.size = t.size, n; } function Fie(e) { return this.__data__.get(e); } function Aie(e) { return this.__data__.has(e); } var Iie = 200; function Pie(e, t) { var n = this.__data__; if (n instanceof $l) { var r = n.__data__; if (!g0 || r.length < Iie - 1) return r.push([e, t]), this.size = ++n.size, this; n = this.__data__ = new Fl(r); } return n.set(e, t), this.size = n.size, this; } function hl(e) { var t = this.__data__ = new $l(e); this.size = t.size; } hl.prototype.clear = Oie; hl.prototype.delete = $ie; hl.prototype.get = Fie; hl.prototype.has = Aie; hl.prototype.set = Pie; function Lie(e, t) { for (var n = -1, r = e == null ? 0 : e.length, a = 0, o = []; ++n < r; ) { var i = e[n]; t(i, n, e) && (o[a++] = i); } return o; } function Nie() { return []; } var Mie = Object.prototype, Bie = Mie.propertyIsEnumerable, ET = Object.getOwnPropertySymbols, Die = ET ? function(e) { return e == null ? [] : (e = Object(e), Lie(ET(e), function(t) { return Bie.call(e, t); })); } : Nie; function Rie(e, t, n) { var r = t(e); return Ui(e) ? r : wN(r, n(e)); } function _T(e) { return Rie(e, bN, Die); } var $C = Yd(Ns, "DataView"), FC = Yd(Ns, "Promise"), AC = Yd(Ns, "Set"), TT = "[object Map]", zie = "[object Object]", OT = "[object Promise]", $T = "[object Set]", FT = "[object WeakMap]", AT = "[object DataView]", Vie = Xd($C), jie = Xd(g0), Hie = Xd(FC), Uie = Xd(AC), qie = Xd(TC), pu = uh; ($C && pu(new $C(new ArrayBuffer(1))) != AT || g0 && pu(new g0()) != TT || FC && pu(FC.resolve()) != OT || AC && pu(new AC()) != $T || TC && pu(new TC()) != FT) && (pu = function(e) { var t = uh(e), n = t == zie ? e.constructor : void 0, r = n ? Xd(n) : ""; if (r) switch (r) { case Vie: return AT; case jie: return TT; case Hie: return OT; case Uie: return $T; case qie: return FT; } return t; }); var IT = Ns.Uint8Array, Wie = "__lodash_hash_undefined__"; function Kie(e) { return this.__data__.set(e, Wie), this; } function Gie(e) { return this.__data__.has(e); } function Vy(e) { var t = -1, n = e == null ? 0 : e.length; for (this.__data__ = new Fl(); ++t < n; ) this.add(e[t]); } Vy.prototype.add = Vy.prototype.push = Kie; Vy.prototype.has = Gie; function Xie(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 Yie(e, t) { return e.has(t); } var Zie = 1, Qie = 2; function xN(e, t, n, r, a, o) { var i = n & Zie, s = e.length, l = t.length; if (s != l && !(i && l > s)) return !1; var u = o.get(e), c = o.get(t); if (u && c) return u == t && c == e; var d = -1, f = !0, h = n & Qie ? new Vy() : void 0; for (o.set(e, t), o.set(t, e); ++d < s; ) { var p = e[d], v = t[d]; if (r) var m = i ? r(v, p, d, t, e, o) : r(p, v, d, e, t, o); if (m !== void 0) { if (m) continue; f = !1; break; } if (h) { if (!Xie(t, function(g, y) { if (!Yie(h, y) && (p === g || a(p, g, n, r, o))) return h.push(y); })) { f = !1; break; } } else if (!(p === v || a(p, v, n, r, o))) { f = !1; break; } } return o.delete(e), o.delete(t), f; } function Jie(e) { var t = -1, n = Array(e.size); return e.forEach(function(r, a) { n[++t] = [a, r]; }), n; } function ese(e) { var t = -1, n = Array(e.size); return e.forEach(function(r) { n[++t] = r; }), n; } var tse = 1, nse = 2, rse = "[object Boolean]", ase = "[object Date]", ose = "[object Error]", ise = "[object Map]", sse = "[object Number]", lse = "[object RegExp]", use = "[object Set]", cse = "[object String]", dse = "[object Symbol]", pse = "[object ArrayBuffer]", fse = "[object DataView]", PT = Cs ? Cs.prototype : void 0, Lx = PT ? PT.valueOf : void 0; function hse(e, t, n, r, a, o, i) { switch (n) { case fse: if (e.byteLength != t.byteLength || e.byteOffset != t.byteOffset) return !1; e = e.buffer, t = t.buffer; case pse: return !(e.byteLength != t.byteLength || !o(new IT(e), new IT(t))); case rse: case ase: case sse: return n4(+e, +t); case ose: return e.name == t.name && e.message == t.message; case lse: case cse: return e == t + ""; case ise: var s = Jie; case use: var l = r & tse; if (s || (s = ese), e.size != t.size && !l) return !1; var u = i.get(e); if (u) return u == t; r |= nse, i.set(e, t); var c = xN(s(e), s(t), r, a, o, i); return i.delete(e), c; case dse: if (Lx) return Lx.call(e) == Lx.call(t); } return !1; } var vse = 1, gse = Object.prototype, mse = gse.hasOwnProperty; function yse(e, t, n, r, a, o) { var i = n & vse, s = _T(e), l = s.length, u = _T(t), c = u.length; if (l != c && !i) return !1; for (var d = l; d--; ) { var f = s[d]; if (!(i ? f in t : mse.call(t, f))) return !1; } var h = o.get(e), p = o.get(t); if (h && p) return h == t && p == e; var v = !0; o.set(e, t), o.set(t, e); for (var m = i; ++d < l; ) { f = s[d]; var g = e[f], y = t[f]; if (r) var x = i ? r(y, g, f, t, e, o) : r(g, y, f, e, t, o); if (!(x === void 0 ? g === y || a(g, y, n, r, o) : x)) { v = !1; break; } m || (m = f == "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 o.delete(e), o.delete(t), v; } var bse = 1, LT = "[object Arguments]", NT = "[object Array]", Pm = "[object Object]", wse = Object.prototype, MT = wse.hasOwnProperty; function xse(e, t, n, r, a, o) { var i = Ui(e), s = Ui(t), l = i ? NT : pu(e), u = s ? NT : pu(t); l = l == LT ? Pm : l, u = u == LT ? Pm : u; var c = l == Pm, d = u == Pm, f = l == u; if (f && OC(e)) { if (!OC(t)) return !1; i = !0, c = !1; } if (f && !c) return o || (o = new hl()), i || yN(e) ? xN(e, t, n, r, a, o) : hse(e, t, l, n, r, a, o); if (!(n & bse)) { var h = c && MT.call(e, "__wrapped__"), p = d && MT.call(t, "__wrapped__"); if (h || p) { var v = h ? e.value() : e, m = p ? t.value() : t; return o || (o = new hl()), a(v, m, n, r, o); } } return f ? (o || (o = new hl()), yse(e, t, n, r, a, o)) : !1; } function T2(e, t, n, r, a) { return e === t ? !0 : e == null || t == null || !wf(e) && !wf(t) ? e !== e && t !== t : xse(e, t, n, r, T2, a); } var kse = 1, Cse = 2; function Sse(e, t, n, r) { var a = n.length, o = a; if (e == null) return !o; for (e = Object(e); a--; ) { var i = n[a]; if (i[2] ? i[1] !== e[i[0]] : !(i[0] in e)) return !1; } for (; ++a < o; ) { i = n[a]; 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 hl(), d; if (!(d === void 0 ? T2(u, l, kse | Cse, r, c) : d)) return !1; } } return !0; } function kN(e) { return e === e && !Du(e); } function Ese(e) { for (var t = bN(e), n = t.length; n--; ) { var r = t[n], a = e[r]; t[n] = [r, a, kN(a)]; } return t; } function CN(e, t) { return function(n) { return n == null ? !1 : n[e] === t && (t !== void 0 || e in Object(n)); }; } function _se(e) { var t = Ese(e); return t.length == 1 && t[0][2] ? CN(t[0][0], t[0][1]) : function(n) { return n === e || Sse(n, e, t); }; } function Tse(e, t) { return e != null && t in Object(e); } function Ose(e, t, n) { t = _2(t, e); for (var r = -1, a = t.length, o = !1; ++r < a; ) { var i = Og(t[r]); if (!(o = e != null && n(e, i))) break; e = e[i]; } return o || ++r != a ? o : (a = e == null ? 0 : e.length, !!a && r4(a) && t4(i, a) && (Ui(e) || a4(e))); } function SN(e, t) { return e != null && Ose(e, t, Tse); } var $se = 1, Fse = 2; function Ase(e, t) { return o4(e) && kN(t) ? CN(Og(e), t) : function(n) { var r = il(n, e); return r === void 0 && r === t ? SN(n, e) : T2(t, r, $se | Fse); }; } function Ise(e) { return function(t) { return t == null ? void 0 : t[e]; }; } function Pse(e) { return function(t) { return s4(t, e); }; } function Lse(e) { return o4(e) ? Ise(Og(e)) : Pse(e); } function Nse(e) { return typeof e == "function" ? e : e == null ? fN : typeof e == "object" ? Ui(e) ? Ase(e[0], e[1]) : _se(e) : Lse(e); } var Nx = function() { return Ns.Date.now(); }, Mse = "Expected a function", Bse = Math.max, Dse = Math.min; function EN(e, t, n) { var r, a, o, i, s, l, u = 0, c = !1, d = !1, f = !0; if (typeof e != "function") throw new TypeError(Mse); t = gT(t) || 0, Du(n) && (c = !!n.leading, d = "maxWait" in n, o = d ? Bse(gT(n.maxWait) || 0, t) : o, f = "trailing" in n ? !!n.trailing : f); function h(C) { var S = r, _ = a; return r = a = void 0, u = C, i = e.apply(_, S), i; } function p(C) { return u = C, s = setTimeout(g, t), c ? h(C) : i; } function v(C) { var S = C - l, _ = C - u, T = t - S; return d ? Dse(T, o - _) : T; } function m(C) { var S = C - l, _ = C - u; return l === void 0 || S >= t || S < 0 || d && _ >= o; } function g() { var C = Nx(); if (m(C)) return y(C); s = setTimeout(g, v(C)); } function y(C) { return s = void 0, f && r ? h(C) : (r = a = void 0, i); } function x() { s !== void 0 && clearTimeout(s), u = 0, r = l = a = s = void 0; } function w() { return s === void 0 ? i : y(Nx()); } function k() { var C = Nx(), S = m(C); if (r = arguments, a = this, l = C, S) { if (s === void 0) return p(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 Rse(e, t, n) { var r = e == null ? 0 : e.length; if (!r) return -1; var a = r - 1; return Uae(e, Nse(t), a); } function jy(e) { for (var t = -1, n = e == null ? 0 : e.length, r = {}; ++t < n; ) { var a = e[t]; r[a[0]] = a[1]; } return r; } function Hy(e, t) { return T2(e, t); } function Au(e) { return e == null; } function zse(e) { return e === void 0; } function Vse(e, t, n, r) { if (!Du(e)) return e; t = _2(t, e); for (var a = -1, o = t.length, i = o - 1, s = e; s != null && ++a < o; ) { var l = Og(t[a]), u = n; if (l === "__proto__" || l === "constructor" || l === "prototype") return e; if (a != i) { var c = s[l]; u = void 0, u === void 0 && (u = Du(c) ? c : t4(t[a + 1]) ? [] : {}); } Yae(s, l, u), s = s[l]; } return e; } function jse(e, t, n) { for (var r = -1, a = t.length, o = {}; ++r < a; ) { var i = t[r], s = s4(e, i); n(s, i) && Vse(o, _2(i, e), s); } return o; } function Hse(e, t) { return jse(e, t, function(n, r) { return SN(e, r); }); } var _N = Tie(function(e, t) { return e == null ? {} : Hse(e, t); }); const Cu = (e) => e === void 0, xf = (e) => typeof e == "boolean", ra = (e) => typeof e == "number", Jc = (e) => typeof Element > "u" ? !1 : e instanceof Element, Uy = (e) => Au(e), Use = (e) => oo(e) ? !Number.isNaN(Number(e)) : !1, qse = (e = "") => e.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d"); let TN = class extends Error { constructor(t) { super(t), this.name = "ElementPlusError"; } }; function Wse(e, t) { throw new TN(`[${e}] ${t}`); } function Br(e, t) { if (process.env.NODE_ENV !== "production") { const n = oo(e) ? new TN(`[${e}] ${t}`) : e; console.warn(n); } } const Kse = "utils/dom/style", ON = (e = "") => e.split(" ").filter((t) => !!t.trim()), Gse = (e, t) => { !e || !t.trim() || e.classList.add(...ON(t)); }, Mx = (e, t) => { !e || !t.trim() || e.classList.remove(...ON(t)); }; function kf(e, t = "px") { if (!e) return ""; if (ra(e) || Use(e)) return `${e}${t}`; if (oo(e)) return e; Br(Kse, "binding value must be a string or number"); } function Xse(e, t) { if (!Gr) 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 a = t.offsetTop + n.reduce((l, u) => l + u.offsetTop, 0), o = a + t.offsetHeight, i = e.scrollTop, s = i + e.clientHeight; a < i ? e.scrollTop = a : o > s && (e.scrollTop = o - e.clientHeight); } /*! Element Plus Icons Vue v2.3.1 */ var Yse = /* @__PURE__ */ X({ name: "ArrowDown", __name: "arrow-down", setup(e) { return (t, n) => (I(), j("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ W("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" }) ])); } }), $N = Yse, Zse = /* @__PURE__ */ X({ name: "CaretRight", __name: "caret-right", setup(e) { return (t, n) => (I(), j("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ W("path", { fill: "currentColor", d: "M384 192v640l384-320.064z" }) ])); } }), Qse = Zse, Jse = /* @__PURE__ */ X({ name: "CircleCheck", __name: "circle-check", setup(e) { return (t, n) => (I(), j("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ W("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" }), W("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" }) ])); } }), ele = Jse, tle = /* @__PURE__ */ X({ name: "CircleClose", __name: "circle-close", setup(e) { return (t, n) => (I(), j("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ W("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" }), W("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" }) ])); } }), l4 = tle, nle = /* @__PURE__ */ X({ name: "Close", __name: "close", setup(e) { return (t, n) => (I(), j("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ W("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" }) ])); } }), IC = nle, rle = /* @__PURE__ */ X({ name: "CopyDocument", __name: "copy-document", setup(e) { return (t, n) => (I(), j("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ W("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" }), W("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" }) ])); } }), ale = rle, ole = /* @__PURE__ */ X({ name: "Hide", __name: "hide", setup(e) { return (t, n) => (I(), j("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ W("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" }), W("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" }) ])); } }), ile = ole, sle = /* @__PURE__ */ X({ name: "Loading", __name: "loading", setup(e) { return (t, n) => (I(), j("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ W("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" }) ])); } }), u4 = sle, lle = /* @__PURE__ */ X({ name: "View", __name: "view", setup(e) { return (t, n) => (I(), j("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ W("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" }) ])); } }), ule = lle; const FN = "__epPropKey", Ot = (e) => e, cle = (e) => ja(e) && !!e[FN], O2 = (e, t) => { if (!ja(e) || cle(e)) return e; const { values: n, required: r, default: a, type: o, validator: i } = e, s = { type: o, required: !!r, validator: n || i ? (l) => { let u = !1, c = []; if (n && (c = Array.from(n), hd(e, "default") && c.push(a), u || (u = c.includes(l))), i && (u || (u = i(l))), !u && c.length > 0) { const d = [...new Set(c)].map((f) => JSON.stringify(f)).join(", "); vg(`Invalid prop: validation failed${t ? ` for prop "${t}"` : ""}. Expected one of [${d}], got value ${JSON.stringify(l)}.`); } return u; } : void 0, [FN]: !0 }; return hd(e, "default") && (s.default = a), s; }, Pn = (e) => jy(Object.entries(e).map(([t, n]) => [ t, O2(n, t) ])), Ru = Ot([ String, Object, Function ]), AN = { validating: u4, success: ele, error: l4 }, Xr = (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; }, dle = (e, t) => (e.install = (n) => { n.directive(t, e); }, e), Al = (e) => (e.install = h0, e), Fr = { 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" }, Jr = "update:modelValue", c4 = "change", IN = ["", "default", "small", "large"], ple = (e) => /([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(e), zp = (e) => e, fle = ["class", "style"], hle = /^on[A-Z]/, vle = (e = {}) => { const { excludeListeners: t = !1, excludeKeys: n } = e, r = F(() => ((n == null ? void 0 : n.value) || []).concat(fle)), a = tt(); return a ? F(() => { var o; return jy(Object.entries((o = a.proxy) == null ? void 0 : o.$attrs).filter(([i]) => !r.value.includes(i) && !(t && hle.test(i)))); }) : (Br("use-attrs", "getCurrentInstance() returned null. useAttrs() must be called at the top of a setup function"), F(() => ({}))); }, W1 = ({ from: e, replacement: t, scope: n, version: r, ref: a, type: o = "API" }, i) => { be(() => b(i), (s) => { s && Br(n, `[${o}] ${e} is about to be deprecated in version ${r}, please use ${t} instead. For more detail, please visit: ${a} `); }, { immediate: !0 }); }; var gle = { 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 mle = (e) => (t, n) => yle(t, n, b(e)), yle = (e, t, n) => il(n, e, e).replace(/\{(\w+)\}/g, (r, a) => { var o; return `${(o = t == null ? void 0 : t[a]) != null ? o : `{${a}}`}`; }), ble = (e) => { const t = F(() => b(e).name), n = ar(e) ? e : U(e); return { lang: t, locale: n, t: mle(e) }; }, wle = Symbol("localeContextKey"), $2 = (e) => { const t = Te(wle, U()); return ble(F(() => t.value || gle)); }, Bx = "el", xle = "is-", Cc = (e, t, n, r, a) => { let o = `${e}-${t}`; return n && (o += `-${n}`), r && (o += `__${r}`), a && (o += `--${a}`), o; }, kle = Symbol("namespaceContextKey"), d4 = (e) => { const t = tt() ? Te(kle, U(Bx)) : U(Bx); return F(() => b(t) || Bx); }, Zt = (e, t) => { const n = d4(); return { namespace: n, b: (r = "") => Cc(n.value, e, r, "", ""), e: (r) => r ? Cc(n.value, e, "", r, "") : "", m: (r) => r ? Cc(n.value, e, "", "", r) : "", be: (r, a) => r && a ? Cc(n.value, e, r, a, "") : "", em: (r, a) => r && a ? Cc(n.value, e, "", r, a) : "", bm: (r, a) => r && a ? Cc(n.value, e, r, "", a) : "", bem: (r, a, o) => r && a && o ? Cc(n.value, e, r, a, o) : "", is: (r, ...a) => { const o = a.length >= 1 ? a[0] : !0; return r && o ? `${xle}${r}` : ""; }, cssVar: (r) => { const a = {}; for (const o in r) r[o] && (a[`--${n.value}-${o}`] = r[o]); return a; }, cssVarName: (r) => `--${n.value}-${r}`, cssVarBlock: (r) => { const a = {}; for (const o in r) r[o] && (a[`--${n.value}-${e}-${o}`] = r[o]); return a; }, cssVarBlockName: (r) => `--${n.value}-${e}-${r}` }; }, Cle = O2({ type: Ot(Boolean), default: null }), Sle = O2({ type: Ot(Function) }), Ele = (e) => { const t = `update:${e}`, n = `onUpdate:${e}`, r = [t], a = { [e]: Cle, [n]: Sle }; return { useModelToggle: ({ indicator: o, toggleReason: i, shouldHideWhenRouteChanges: s, shouldProceed: l, onShow: u, onHide: c }) => { const d = tt(), { emit: f } = d, h = d.props, p = F(() => Va(h[n])), v = F(() => h[e] === null), m = (C) => { o.value !== !0 && (o.value = !0, i && (i.value = C), Va(u) && u(C)); }, g = (C) => { o.value !== !1 && (o.value = !1, i && (i.value = C), Va(c) && c(C)); }, y = (C) => { if (h.disabled === !0 || Va(l) && !l()) return; const S = p.value && Gr; S && f(t, !0), (v.value || !S) && m(C); }, x = (C) => { if (h.disabled === !0 || !Gr) return; const S = p.value && Gr; S && f(t, !1), (v.value || !S) && g(C); }, w = (C) => { xf(C) && (h.disabled && C ? p.value && f(t, !1) : o.value !== C && (C ? m() : g())); }, k = () => { o.value ? x() : y(); }; return be(() => h[e], w), s && d.appContext.config.globalProperties.$route !== void 0 && be(() => ({ ...d.proxy.$route }), () => { s.value && o.value && x(); }), nt(() => { w(h[e]); }), { hide: x, show: y, toggle: k, hasUpdateHandler: p }; }, useModelToggleProps: a, useModelToggleEmits: r }; }, PN = (e) => { const t = tt(); return F(() => { var n, r; return (r = (n = t == null ? void 0 : t.proxy) == null ? void 0 : n.$props) == null ? void 0 : r[e]; }); }; var io = "top", ai = "bottom", oi = "right", so = "left", p4 = "auto", $g = [io, ai, oi, so], Cf = "start", m0 = "end", _le = "clippingParents", LN = "viewport", Zh = "popper", Tle = "reference", BT = $g.reduce(function(e, t) { return e.concat([t + "-" + Cf, t + "-" + m0]); }, []), F2 = [].concat($g, [p4]).reduce(function(e, t) { return e.concat([t, t + "-" + Cf, t + "-" + m0]); }, []), Ole = "beforeRead", $le = "read", Fle = "afterRead", Ale = "beforeMain", Ile = "main", Ple = "afterMain", Lle = "beforeWrite", Nle = "write", Mle = "afterWrite", Ble = [Ole, $le, Fle, Ale, Ile, Ple, Lle, Nle, Mle]; function Ss(e) { return e ? (e.nodeName || "").toLowerCase() : null; } function Wi(e) { if (e == null) return window; if (e.toString() !== "[object Window]") { var t = e.ownerDocument; return t && t.defaultView || window; } return e; } function Sf(e) { var t = Wi(e).Element; return e instanceof t || e instanceof Element; } function Zo(e) { var t = Wi(e).HTMLElement; return e instanceof t || e instanceof HTMLElement; } function f4(e) { if (typeof ShadowRoot > "u") return !1; var t = Wi(e).ShadowRoot; return e instanceof t || e instanceof ShadowRoot; } function Dle(e) { var t = e.state; Object.keys(t.elements).forEach(function(n) { var r = t.styles[n] || {}, a = t.attributes[n] || {}, o = t.elements[n]; !Zo(o) || !Ss(o) || (Object.assign(o.style, r), Object.keys(a).forEach(function(i) { var s = a[i]; s === !1 ? o.removeAttribute(i) : o.setAttribute(i, s === !0 ? "" : s); })); }); } function Rle(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 a = t.elements[r], o = 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; }, {}); !Zo(a) || !Ss(a) || (Object.assign(a.style, s), Object.keys(o).forEach(function(l) { a.removeAttribute(l); })); }); }; } var NN = { name: "applyStyles", enabled: !0, phase: "write", fn: Dle, effect: Rle, requires: ["computeStyles"] }; function vs(e) { return e.split("-")[0]; } var ed = Math.max, qy = Math.min, Ef = Math.round; function _f(e, t) { t === void 0 && (t = !1); var n = e.getBoundingClientRect(), r = 1, a = 1; if (Zo(e) && t) { var o = e.offsetHeight, i = e.offsetWidth; i > 0 && (r = Ef(n.width) / i || 1), o > 0 && (a = Ef(n.height) / o || 1); } return { width: n.width / r, height: n.height / a, top: n.top / a, right: n.right / r, bottom: n.bottom / a, left: n.left / r, x: n.left / r, y: n.top / a }; } function h4(e) { var t = _f(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 MN(e, t) { var n = t.getRootNode && t.getRootNode(); if (e.contains(t)) return !0; if (n && f4(n)) { var r = t; do { if (r && e.isSameNode(r)) return !0; r = r.parentNode || r.host; } while (r); } return !1; } function ml(e) { return Wi(e).getComputedStyle(e); } function zle(e) { return ["table", "td", "th"].indexOf(Ss(e)) >= 0; } function oc(e) { return ((Sf(e) ? e.ownerDocument : e.document) || window.document).documentElement; } function A2(e) { return Ss(e) === "html" ? e : e.assignedSlot || e.parentNode || (f4(e) ? e.host : null) || oc(e); } function DT(e) { return !Zo(e) || ml(e).position === "fixed" ? null : e.offsetParent; } function Vle(e) { var t = navigator.userAgent.toLowerCase().indexOf("firefox") !== -1, n = navigator.userAgent.indexOf("Trident") !== -1; if (n && Zo(e)) { var r = ml(e); if (r.position === "fixed") return null; } var a = A2(e); for (f4(a) && (a = a.host); Zo(a) && ["html", "body"].indexOf(Ss(a)) < 0; ) { var o = ml(a); if (o.transform !== "none" || o.perspective !== "none" || o.contain === "paint" || ["transform", "perspective"].indexOf(o.willChange) !== -1 || t && o.willChange === "filter" || t && o.filter && o.filter !== "none") return a; a = a.parentNode; } return null; } function Fg(e) { for (var t = Wi(e), n = DT(e); n && zle(n) && ml(n).position === "static"; ) n = DT(n); return n && (Ss(n) === "html" || Ss(n) === "body" && ml(n).position === "static") ? t : n || Vle(e) || t; } function v4(e) { return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y"; } function jv(e, t, n) { return ed(e, qy(t, n)); } function jle(e, t, n) { var r = jv(e, t, n); return r > n ? n : r; } function BN() { return { top: 0, right: 0, bottom: 0, left: 0 }; } function DN(e) { return Object.assign({}, BN(), e); } function RN(e, t) { return t.reduce(function(n, r) { return n[r] = e, n; }, {}); } var Hle = function(e, t) { return e = typeof e == "function" ? e(Object.assign({}, t.rects, { placement: t.placement })) : e, DN(typeof e != "number" ? e : RN(e, $g)); }; function Ule(e) { var t, n = e.state, r = e.name, a = e.options, o = n.elements.arrow, i = n.modifiersData.popperOffsets, s = vs(n.placement), l = v4(s), u = [so, oi].indexOf(s) >= 0, c = u ? "height" : "width"; if (!(!o || !i)) { var d = Hle(a.padding, n), f = h4(o), h = l === "y" ? io : so, p = l === "y" ? ai : oi, v = n.rects.reference[c] + n.rects.reference[l] - i[l] - n.rects.popper[c], m = i[l] - n.rects.reference[l], g = Fg(o), y = g ? l === "y" ? g.clientHeight || 0 : g.clientWidth || 0 : 0, x = v / 2 - m / 2, w = d[h], k = y - f[c] - d[p], C = y / 2 - f[c] / 2 + x, S = jv(w, C, k), _ = l; n.modifiersData[r] = (t = {}, t[_] = S, t.centerOffset = S - C, t); } } function qle(e) { var t = e.state, n = e.options, r = n.element, a = r === void 0 ? "[data-popper-arrow]" : r; a != null && (typeof a == "string" && (a = t.elements.popper.querySelector(a), !a) || !MN(t.elements.popper, a) || (t.elements.arrow = a)); } var Wle = { name: "arrow", enabled: !0, phase: "main", fn: Ule, effect: qle, requires: ["popperOffsets"], requiresIfExists: ["preventOverflow"] }; function Tf(e) { return e.split("-")[1]; } var Kle = { top: "auto", right: "auto", bottom: "auto", left: "auto" }; function Gle(e) { var t = e.x, n = e.y, r = window, a = r.devicePixelRatio || 1; return { x: Ef(t * a) / a || 0, y: Ef(n * a) / a || 0 }; } function RT(e) { var t, n = e.popper, r = e.popperRect, a = e.placement, o = e.variation, i = e.offsets, s = e.position, l = e.gpuAcceleration, u = e.adaptive, c = e.roundOffsets, d = e.isFixed, f = i.x, h = f === void 0 ? 0 : f, p = i.y, v = p === void 0 ? 0 : p, m = typeof c == "function" ? c({ x: h, y: v }) : { x: h, y: v }; h = m.x, v = m.y; var g = i.hasOwnProperty("x"), y = i.hasOwnProperty("y"), x = so, w = io, k = window; if (u) { var C = Fg(n), S = "clientHeight", _ = "clientWidth"; if (C === Wi(n) && (C = oc(n), ml(C).position !== "static" && s === "absolute" && (S = "scrollHeight", _ = "scrollWidth")), C = C, a === io || (a === so || a === oi) && o === m0) { w = ai; var T = d && C === k && k.visualViewport ? k.visualViewport.height : C[S]; v -= T - r.height, v *= l ? 1 : -1; } if (a === so || (a === io || a === ai) && o === m0) { x = oi; var O = d && C === k && k.visualViewport ? k.visualViewport.width : C[_]; h -= O - r.width, h *= l ? 1 : -1; } } var $ = Object.assign({ position: s }, u && Kle), A = c === !0 ? Gle({ x: h, y: v }) : { x: h, y: v }; if (h = A.x, v = A.y, l) { var N; return Object.assign({}, $, (N = {}, N[w] = y ? "0" : "", N[x] = g ? "0" : "", N.transform = (k.devicePixelRatio || 1) <= 1 ? "translate(" + h + "px, " + v + "px)" : "translate3d(" + h + "px, " + v + "px, 0)", N)); } return Object.assign({}, $, (t = {}, t[w] = y ? v + "px" : "", t[x] = g ? h + "px" : "", t.transform = "", t)); } function Xle(e) { var t = e.state, n = e.options, r = n.gpuAcceleration, a = r === void 0 ? !0 : r, o = n.adaptive, i = o === void 0 ? !0 : o, s = n.roundOffsets, l = s === void 0 ? !0 : s, u = { placement: vs(t.placement), variation: Tf(t.placement), popper: t.elements.popper, popperRect: t.rects.popper, gpuAcceleration: a, isFixed: t.options.strategy === "fixed" }; t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper, RT(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, RT(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 zN = { name: "computeStyles", enabled: !0, phase: "beforeWrite", fn: Xle, data: {} }, Lm = { passive: !0 }; function Yle(e) { var t = e.state, n = e.instance, r = e.options, a = r.scroll, o = a === void 0 ? !0 : a, i = r.resize, s = i === void 0 ? !0 : i, l = Wi(t.elements.popper), u = [].concat(t.scrollParents.reference, t.scrollParents.popper); return o && u.forEach(function(c) { c.addEventListener("scroll", n.update, Lm); }), s && l.addEventListener("resize", n.update, Lm), function() { o && u.forEach(function(c) { c.removeEventListener("scroll", n.update, Lm); }), s && l.removeEventListener("resize", n.update, Lm); }; } var VN = { name: "eventListeners", enabled: !0, phase: "write", fn: function() { }, effect: Yle, data: {} }, Zle = { left: "right", right: "left", bottom: "top", top: "bottom" }; function K1(e) { return e.replace(/left|right|bottom|top/g, function(t) { return Zle[t]; }); } var Qle = { start: "end", end: "start" }; function zT(e) { return e.replace(/start|end/g, function(t) { return Qle[t]; }); } function g4(e) { var t = Wi(e), n = t.pageXOffset, r = t.pageYOffset; return { scrollLeft: n, scrollTop: r }; } function m4(e) { return _f(oc(e)).left + g4(e).scrollLeft; } function Jle(e) { var t = Wi(e), n = oc(e), r = t.visualViewport, a = n.clientWidth, o = n.clientHeight, i = 0, s = 0; return r && (a = r.width, o = r.height, /^((?!chrome|android).)*safari/i.test(navigator.userAgent) || (i = r.offsetLeft, s = r.offsetTop)), { width: a, height: o, x: i + m4(e), y: s }; } function eue(e) { var t, n = oc(e), r = g4(e), a = (t = e.ownerDocument) == null ? void 0 : t.body, o = ed(n.scrollWidth, n.clientWidth, a ? a.scrollWidth : 0, a ? a.clientWidth : 0), i = ed(n.scrollHeight, n.clientHeight, a ? a.scrollHeight : 0, a ? a.clientHeight : 0), s = -r.scrollLeft + m4(e), l = -r.scrollTop; return ml(a || n).direction === "rtl" && (s += ed(n.clientWidth, a ? a.clientWidth : 0) - o), { width: o, height: i, x: s, y: l }; } function y4(e) { var t = ml(e), n = t.overflow, r = t.overflowX, a = t.overflowY; return /auto|scroll|overlay|hidden/.test(n + a + r); } function jN(e) { return ["html", "body", "#document"].indexOf(Ss(e)) >= 0 ? e.ownerDocument.body : Zo(e) && y4(e) ? e : jN(A2(e)); } function Hv(e, t) { var n; t === void 0 && (t = []); var r = jN(e), a = r === ((n = e.ownerDocument) == null ? void 0 : n.body), o = Wi(r), i = a ? [o].concat(o.visualViewport || [], y4(r) ? r : []) : r, s = t.concat(i); return a ? s : s.concat(Hv(A2(i))); } function PC(e) { return Object.assign({}, e, { left: e.x, top: e.y, right: e.x + e.width, bottom: e.y + e.height }); } function tue(e) { var t = _f(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 VT(e, t) { return t === LN ? PC(Jle(e)) : Sf(t) ? tue(t) : PC(eue(oc(e))); } function nue(e) { var t = Hv(A2(e)), n = ["absolute", "fixed"].indexOf(ml(e).position) >= 0, r = n && Zo(e) ? Fg(e) : e; return Sf(r) ? t.filter(function(a) { return Sf(a) && MN(a, r) && Ss(a) !== "body"; }) : []; } function rue(e, t, n) { var r = t === "clippingParents" ? nue(e) : [].concat(t), a = [].concat(r, [n]), o = a[0], i = a.reduce(function(s, l) { var u = VT(e, l); return s.top = ed(u.top, s.top), s.right = qy(u.right, s.right), s.bottom = qy(u.bottom, s.bottom), s.left = ed(u.left, s.left), s; }, VT(e, o)); return i.width = i.right - i.left, i.height = i.bottom - i.top, i.x = i.left, i.y = i.top, i; } function HN(e) { var t = e.reference, n = e.element, r = e.placement, a = r ? vs(r) : null, o = r ? Tf(r) : null, i = t.x + t.width / 2 - n.width / 2, s = t.y + t.height / 2 - n.height / 2, l; switch (a) { case io: l = { x: i, y: t.y - n.height }; break; case ai: l = { x: i, y: t.y + t.height }; break; case oi: l = { x: t.x + t.width, y: s }; break; case so: l = { x: t.x - n.width, y: s }; break; default: l = { x: t.x, y: t.y }; } var u = a ? v4(a) : null; if (u != null) { var c = u === "y" ? "height" : "width"; switch (o) { case Cf: l[u] = l[u] - (t[c] / 2 - n[c] / 2); break; case m0: l[u] = l[u] + (t[c] / 2 - n[c] / 2); break; } } return l; } function y0(e, t) { t === void 0 && (t = {}); var n = t, r = n.placement, a = r === void 0 ? e.placement : r, o = n.boundary, i = o === void 0 ? _le : o, s = n.rootBoundary, l = s === void 0 ? LN : s, u = n.elementContext, c = u === void 0 ? Zh : u, d = n.altBoundary, f = d === void 0 ? !1 : d, h = n.padding, p = h === void 0 ? 0 : h, v = DN(typeof p != "number" ? p : RN(p, $g)), m = c === Zh ? Tle : Zh, g = e.rects.popper, y = e.elements[f ? m : c], x = rue(Sf(y) ? y : y.contextElement || oc(e.elements.popper), i, l), w = _f(e.elements.reference), k = HN({ reference: w, element: g, strategy: "absolute", placement: a }), C = PC(Object.assign({}, g, k)), S = c === Zh ? C : w, _ = { top: x.top - S.top + v.top, bottom: S.bottom - x.bottom + v.bottom, left: x.left - S.left + v.left, right: S.right - x.right + v.right }, T = e.modifiersData.offset; if (c === Zh && T) { var O = T[a]; Object.keys(_).forEach(function($) { var A = [oi, ai].indexOf($) >= 0 ? 1 : -1, N = [io, ai].indexOf($) >= 0 ? "y" : "x"; _[$] += O[N] * A; }); } return _; } function aue(e, t) { t === void 0 && (t = {}); var n = t, r = n.placement, a = n.boundary, o = n.rootBoundary, i = n.padding, s = n.flipVariations, l = n.allowedAutoPlacements, u = l === void 0 ? F2 : l, c = Tf(r), d = c ? s ? BT : BT.filter(function(p) { return Tf(p) === c; }) : $g, f = d.filter(function(p) { return u.indexOf(p) >= 0; }); f.length === 0 && (f = d); var h = f.reduce(function(p, v) { return p[v] = y0(e, { placement: v, boundary: a, rootBoundary: o, padding: i })[vs(v)], p; }, {}); return Object.keys(h).sort(function(p, v) { return h[p] - h[v]; }); } function oue(e) { if (vs(e) === p4) return []; var t = K1(e); return [zT(e), t, zT(t)]; } function iue(e) { var t = e.state, n = e.options, r = e.name; if (!t.modifiersData[r]._skip) { for (var a = n.mainAxis, o = a === void 0 ? !0 : a, i = n.altAxis, s = i === void 0 ? !0 : i, l = n.fallbackPlacements, u = n.padding, c = n.boundary, d = n.rootBoundary, f = n.altBoundary, h = n.flipVariations, p = h === void 0 ? !0 : h, v = n.allowedAutoPlacements, m = t.options.placement, g = vs(m), y = g === m, x = l || (y || !p ? [K1(m)] : oue(m)), w = [m].concat(x).reduce(function(ve, ge) { return ve.concat(vs(ge) === p4 ? aue(t, { placement: ge, boundary: c, rootBoundary: d, padding: u, flipVariations: p, allowedAutoPlacements: v }) : ge); }, []), k = t.rects.reference, C = t.rects.popper, S = /* @__PURE__ */ new Map(), _ = !0, T = w[0], O = 0; O < w.length; O++) { var $ = w[O], A = vs($), N = Tf($) === Cf, L = [io, ai].indexOf(A) >= 0, R = L ? "width" : "height", P = y0(t, { placement: $, boundary: c, rootBoundary: d, altBoundary: f, padding: u }), B = L ? N ? oi : so : N ? ai : io; k[R] > C[R] && (B = K1(B)); var M = K1(B), z = []; if (o && z.push(P[A] <= 0), s && z.push(P[B] <= 0, P[M] <= 0), z.every(function(ve) { return ve; })) { T = $, _ = !1; break; } S.set($, z); } if (_) for (var Z = p ? 3 : 1, G = function(ve) { var ge = w.find(function(oe) { var ee = S.get(oe); if (ee) return ee.slice(0, ve).every(function(q) { return q; }); }); if (ge) return T = ge, "break"; }, J = Z; J > 0; J--) { var se = G(J); if (se === "break") break; } t.placement !== T && (t.modifiersData[r]._skip = !0, t.placement = T, t.reset = !0); } } var sue = { name: "flip", enabled: !0, phase: "main", fn: iue, requiresIfExists: ["offset"], data: { _skip: !1 } }; function jT(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 HT(e) { return [io, oi, ai, so].some(function(t) { return e[t] >= 0; }); } function lue(e) { var t = e.state, n = e.name, r = t.rects.reference, a = t.rects.popper, o = t.modifiersData.preventOverflow, i = y0(t, { elementContext: "reference" }), s = y0(t, { altBoundary: !0 }), l = jT(i, r), u = jT(s, a, o), c = HT(l), d = HT(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 uue = { name: "hide", enabled: !0, phase: "main", requiresIfExists: ["preventOverflow"], fn: lue }; function cue(e, t, n) { var r = vs(e), a = [so, io].indexOf(r) >= 0 ? -1 : 1, o = typeof n == "function" ? n(Object.assign({}, t, { placement: e })) : n, i = o[0], s = o[1]; return i = i || 0, s = (s || 0) * a, [so, oi].indexOf(r) >= 0 ? { x: s, y: i } : { x: i, y: s }; } function due(e) { var t = e.state, n = e.options, r = e.name, a = n.offset, o = a === void 0 ? [0, 0] : a, i = F2.reduce(function(c, d) { return c[d] = cue(d, t.rects, o), 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 pue = { name: "offset", enabled: !0, phase: "main", requires: ["popperOffsets"], fn: due }; function fue(e) { var t = e.state, n = e.name; t.modifiersData[n] = HN({ reference: t.rects.reference, element: t.rects.popper, strategy: "absolute", placement: t.placement }); } var UN = { name: "popperOffsets", enabled: !0, phase: "read", fn: fue, data: {} }; function hue(e) { return e === "x" ? "y" : "x"; } function vue(e) { var t = e.state, n = e.options, r = e.name, a = n.mainAxis, o = a === void 0 ? !0 : a, i = n.altAxis, s = i === void 0 ? !1 : i, l = n.boundary, u = n.rootBoundary, c = n.altBoundary, d = n.padding, f = n.tether, h = f === void 0 ? !0 : f, p = n.tetherOffset, v = p === void 0 ? 0 : p, m = y0(t, { boundary: l, rootBoundary: u, padding: d, altBoundary: c }), g = vs(t.placement), y = Tf(t.placement), x = !y, w = v4(g), k = hue(w), C = t.modifiersData.popperOffsets, S = t.rects.reference, _ = t.rects.popper, T = typeof v == "function" ? v(Object.assign({}, t.rects, { placement: t.placement })) : v, O = typeof T == "number" ? { mainAxis: T, altAxis: T } : Object.assign({ mainAxis: 0, altAxis: 0 }, T), $ = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, A = { x: 0, y: 0 }; if (C) { if (o) { var N, L = w === "y" ? io : so, R = w === "y" ? ai : oi, P = w === "y" ? "height" : "width", B = C[w], M = B + m[L], z = B - m[R], Z = h ? -_[P] / 2 : 0, G = y === Cf ? S[P] : _[P], J = y === Cf ? -_[P] : -S[P], se = t.elements.arrow, ve = h && se ? h4(se) : { width: 0, height: 0 }, ge = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : BN(), oe = ge[L], ee = ge[R], q = jv(0, S[P], ve[P]), Y = x ? S[P] / 2 - Z - q - oe - O.mainAxis : G - q - oe - O.mainAxis, te = x ? -S[P] / 2 + Z + q + ee + O.mainAxis : J + q + ee + O.mainAxis, we = t.elements.arrow && Fg(t.elements.arrow), Oe = we ? w === "y" ? we.clientTop || 0 : we.clientLeft || 0 : 0, Ne = (N = $ == null ? void 0 : $[w]) != null ? N : 0, xe = B + Y - Ne - Oe, $e = B + te - Ne, Se = jv(h ? qy(M, xe) : M, B, h ? ed(z, $e) : z); C[w] = Se, A[w] = Se - B; } if (s) { var Pe, Me = w === "x" ? io : so, je = w === "x" ? ai : oi, Be = C[k], We = k === "y" ? "height" : "width", qe = Be + m[Me], Ge = Be - m[je], E = [io, so].indexOf(g) !== -1, V = (Pe = $ == null ? void 0 : $[k]) != null ? Pe : 0, ie = E ? qe : Be - S[We] - _[We] - V + O.altAxis, le = E ? Be + S[We] + _[We] - V - O.altAxis : Ge, re = h && E ? jle(ie, Be, le) : jv(h ? ie : qe, Be, h ? le : Ge); C[k] = re, A[k] = re - Be; } t.modifiersData[r] = A; } } var gue = { name: "preventOverflow", enabled: !0, phase: "main", fn: vue, requiresIfExists: ["offset"] }; function mue(e) { return { scrollLeft: e.scrollLeft, scrollTop: e.scrollTop }; } function yue(e) { return e === Wi(e) || !Zo(e) ? g4(e) : mue(e); } function bue(e) { var t = e.getBoundingClientRect(), n = Ef(t.width) / e.offsetWidth || 1, r = Ef(t.height) / e.offsetHeight || 1; return n !== 1 || r !== 1; } function wue(e, t, n) { n === void 0 && (n = !1); var r = Zo(t), a = Zo(t) && bue(t), o = oc(t), i = _f(e, a), s = { scrollLeft: 0, scrollTop: 0 }, l = { x: 0, y: 0 }; return (r || !r && !n) && ((Ss(t) !== "body" || y4(o)) && (s = yue(t)), Zo(t) ? (l = _f(t, !0), l.x += t.clientLeft, l.y += t.clientTop) : o && (l.x = m4(o))), { x: i.left + s.scrollLeft - l.x, y: i.top + s.scrollTop - l.y, width: i.width, height: i.height }; } function xue(e) { var t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set(), r = []; e.forEach(function(o) { t.set(o.name, o); }); function a(o) { n.add(o.name); var i = [].concat(o.requires || [], o.requiresIfExists || []); i.forEach(function(s) { if (!n.has(s)) { var l = t.get(s); l && a(l); } }), r.push(o); } return e.forEach(function(o) { n.has(o.name) || a(o); }), r; } function kue(e) { var t = xue(e); return Ble.reduce(function(n, r) { return n.concat(t.filter(function(a) { return a.phase === r; })); }, []); } function Cue(e) { var t; return function() { return t || (t = new Promise(function(n) { Promise.resolve().then(function() { t = void 0, n(e()); }); })), t; }; } function Sue(e) { var t = e.reduce(function(n, r) { var a = n[r.name]; return n[r.name] = a ? Object.assign({}, a, r, { options: Object.assign({}, a.options, r.options), data: Object.assign({}, a.data, r.data) }) : r, n; }, {}); return Object.keys(t).map(function(n) { return t[n]; }); } var UT = { placement: "bottom", modifiers: [], strategy: "absolute" }; function qT() { 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 b4(e) { e === void 0 && (e = {}); var t = e, n = t.defaultModifiers, r = n === void 0 ? [] : n, a = t.defaultOptions, o = a === void 0 ? UT : a; return function(i, s, l) { l === void 0 && (l = o); var u = { placement: "bottom", orderedModifiers: [], options: Object.assign({}, UT, o), modifiersData: {}, elements: { reference: i, popper: s }, attributes: {}, styles: {} }, c = [], d = !1, f = { state: u, setOptions: function(v) { var m = typeof v == "function" ? v(u.options) : v; p(), u.options = Object.assign({}, o, u.options, m), u.scrollParents = { reference: Sf(i) ? Hv(i) : i.contextElement ? Hv(i.contextElement) : [], popper: Hv(s) }; var g = kue(Sue([].concat(r, u.options.modifiers))); return u.orderedModifiers = g.filter(function(y) { return y.enabled; }), h(), f.update(); }, forceUpdate: function() { if (!d) { var v = u.elements, m = v.reference, g = v.popper; if (qT(m, g)) { u.rects = { reference: wue(m, Fg(g), u.options.strategy === "fixed"), popper: h4(g) }, u.reset = !1, u.placement = u.options.placement, u.orderedModifiers.forEach(function(_) { return u.modifiersData[_.name] = Object.assign({}, _.data); }); for (var y = 0; y < u.orderedModifiers.length; y++) { if (u.reset === !0) { u.reset = !1, y = -1; continue; } var x = u.orderedModifiers[y], w = x.fn, k = x.options, C = k === void 0 ? {} : k, S = x.name; typeof w == "function" && (u = w({ state: u, options: C, name: S, instance: f }) || u); } } } }, update: Cue(function() { return new Promise(function(v) { f.forceUpdate(), v(u); }); }), destroy: function() { p(), d = !0; } }; if (!qT(i, s)) return f; f.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, y = g === void 0 ? {} : g, x = v.effect; if (typeof x == "function") { var w = x({ state: u, name: m, instance: f, options: y }), k = function() { }; c.push(w || k); } }); } function p() { c.forEach(function(v) { return v(); }), c = []; } return f; }; } b4(); var Eue = [VN, UN, zN, NN]; b4({ defaultModifiers: Eue }); var _ue = [VN, UN, zN, NN, pue, sue, gue, Wle, uue], Tue = b4({ defaultModifiers: _ue }); const Oue = (e, t, n = {}) => { const r = { name: "updateState", enabled: !0, phase: "write", fn: ({ state: l }) => { const u = $ue(l); Object.assign(i.value, u); }, requires: ["computeStyles"] }, a = F(() => { const { onFirstUpdate: l, placement: u, strategy: c, modifiers: d } = b(n); return { onFirstUpdate: l, placement: u || "bottom", strategy: c || "absolute", modifiers: [ ...d || [], r, { name: "applyStyles", enabled: !1 } ] }; }), o = dn(), i = U({ styles: { popper: { position: b(a).strategy, left: "0", top: "0" }, arrow: { position: "absolute" } }, attributes: {} }), s = () => { o.value && (o.value.destroy(), o.value = void 0); }; return be(a, (l) => { const u = b(o); u && u.setOptions(l); }, { deep: !0 }), be([e, t], ([l, u]) => { s(), !(!l || !u) && (o.value = Tue(l, u, b(a))); }), kt(() => { s(); }), { state: F(() => { var l; return { ...((l = b(o)) == null ? void 0 : l.state) || {} }; }), styles: F(() => b(i).styles), attributes: F(() => b(i).attributes), update: () => { var l; return (l = b(o)) == null ? void 0 : l.update(); }, forceUpdate: () => { var l; return (l = b(o)) == null ? void 0 : l.forceUpdate(); }, instanceRef: F(() => b(o)) }; }; function $ue(e) { const t = Object.keys(e.elements), n = jy(t.map((a) => [a, e.styles[a] || {}])), r = jy(t.map((a) => [a, e.attributes[a]])); return { styles: n, attributes: r }; } function WT() { let e; const t = (r, a) => { n(), e = window.setTimeout(r, a); }, n = () => window.clearTimeout(e); return x2(() => n()), { registerTimeout: t, cancelTimeout: n }; } const LC = { prefix: Math.floor(Math.random() * 1e4), current: 0 }, Fue = Symbol("elIdInjection"), qN = () => tt() ? Te(Fue, LC) : LC, I2 = (e) => { const t = qN(); !Gr && t === LC && Br("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 = d4(); return F(() => b(e) || `${n.value}-id-${t.prefix}-${t.current++}`); }; let Vp = []; const KT = (e) => { const t = e; t.key === Fr.esc && Vp.forEach((n) => n(t)); }, Aue = (e) => { nt(() => { Vp.length === 0 && document.addEventListener("keydown", KT), Gr && Vp.push(e); }), kt(() => { Vp = Vp.filter((t) => t !== e), Vp.length === 0 && Gr && document.removeEventListener("keydown", KT); }); }; let GT; const WN = () => { const e = d4(), t = qN(), n = F(() => `${e.value}-popper-container-${t.prefix}`), r = F(() => `#${n.value}`); return { id: n, selector: r }; }, Iue = (e) => { const t = document.createElement("div"); return t.id = e, document.body.appendChild(t), t; }, Pue = () => { const { id: e, selector: t } = WN(); return gg(() => { Gr && (process.env.NODE_ENV === "test" || !GT || !document.body.querySelector(t.value)) && (GT = Iue(e.value)); }), { id: e, selector: t }; }, Lue = Pn({ showAfter: { type: Number, default: 0 }, hideAfter: { type: Number, default: 200 }, autoClose: { type: Number, default: 0 } }), Nue = ({ showAfter: e, hideAfter: t, autoClose: n, open: r, close: a }) => { const { registerTimeout: o } = WT(), { registerTimeout: i, cancelTimeout: s } = WT(); return { onOpen: (l) => { o(() => { r(l); const u = b(n); ra(u) && u > 0 && i(() => { a(l); }, u); }, b(e)); }, onClose: (l) => { s(), o(() => { a(l); }, b(t)); } }; }, KN = Symbol("elForwardRef"), Mue = (e) => { rt(KN, { setForwardRef: (t) => { e.value = t; } }); }, Bue = (e) => ({ mounted(t) { e(t); }, updated(t) { e(t); }, unmounted() { e(null); } }), XT = { current: 0 }, YT = U(0), Due = 2e3, ZT = Symbol("elZIndexContextKey"), Rue = Symbol("zIndexContextKey"), zue = (e) => { const t = tt() ? Te(ZT, XT) : XT, n = tt() ? Te(Rue, void 0) : void 0, r = F(() => { const i = b(n); return ra(i) ? i : Due; }), a = F(() => r.value + YT.value), o = () => (t.current++, YT.value = t.current, a.value); return !Gr && !Te(ZT) && Br("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: a, nextZIndex: o }; }; function Vue(e) { let t; function n() { if (e.value == null) return; const { selectionStart: a, selectionEnd: o, value: i } = e.value; if (a == null || o == null) return; const s = i.slice(0, Math.max(0, a)), l = i.slice(Math.max(0, o)); t = { selectionStart: a, selectionEnd: o, value: i, beforeTxt: s, afterTxt: l }; } function r() { if (e.value == null || t == null) return; const { value: a } = e.value, { beforeTxt: o, afterTxt: i, selectionStart: s } = t; if (o == null || i == null || s == null) return; let l = a.length; if (a.endsWith(i)) l = a.length - i.length; else if (a.startsWith(o)) l = o.length; else { const u = o[s - 1], c = a.indexOf(u, s - 1); c !== -1 && (l = c + 1); } e.value.setSelectionRange(l, l); } return [n, r]; } const ch = O2({ type: String, values: IN, required: !1 }), jue = Symbol("size"), Hue = () => { const e = Te(jue, {}); return F(() => b(e.size) || ""); }; function w4(e, { beforeFocus: t, afterFocus: n, beforeBlur: r, afterBlur: a } = {}) { const o = tt(), { emit: i } = o, s = dn(), l = U(!1), u = (f) => { Va(t) && t(f) || l.value || (l.value = !0, i("focus", f), n == null || n()); }, c = (f) => { var h; Va(r) && r(f) || f.relatedTarget && (h = s.value) != null && h.contains(f.relatedTarget) || (l.value = !1, i("blur", f), a == null || a()); }, d = () => { var f, h; (f = s.value) != null && f.contains(document.activeElement) && s.value !== document.activeElement || (h = e.value) == null || h.focus(); }; return be(s, (f) => { f && f.setAttribute("tabindex", "-1"); }), Wo(s, "focus", u, !0), Wo(s, "blur", c, !0), Wo(s, "click", d, !0), process.env.NODE_ENV === "test" && nt(() => { const f = Jc(e.value) ? e.value : document.querySelector("input,textarea"); f && (Wo(f, "focus", u, !0), Wo(f, "blur", c, !0)); }), { isFocused: l, wrapperRef: s, handleFocus: u, handleBlur: c }; } function GN({ afterComposition: e, emit: t }) { const n = U(!1), r = (i) => { t == null || t("compositionstart", i), n.value = !0; }, a = (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 = !ple(u); }, o = (i) => { t == null || t("compositionend", i), n.value && (n.value = !1, Ue(() => e(i))); }; return { isComposing: n, handleComposition: (i) => { i.type === "compositionend" ? o(i) : a(i); }, handleCompositionStart: r, handleCompositionUpdate: a, handleCompositionEnd: o }; } const Uue = Symbol("emptyValuesContextKey"), que = "use-empty-values", Wue = ["", void 0, null], Kue = void 0, Gue = Pn({ emptyValues: Array, valueOnClear: { type: [String, Number, Boolean, Function], default: void 0, validator: (e) => Va(e) ? !e() : !e } }), Xue = (e, t) => { const n = tt() ? Te(Uue, U({})) : U({}), r = F(() => e.emptyValues || n.value.emptyValues || Wue), a = F(() => Va(e.valueOnClear) ? e.valueOnClear() : e.valueOnClear !== void 0 ? e.valueOnClear : Va(n.value.valueOnClear) ? n.value.valueOnClear() : n.value.valueOnClear !== void 0 ? n.value.valueOnClear : Kue), o = (i) => r.value.includes(i); return r.value.includes(a.value) || Br(que, "value-on-clear should be a value of empty-values"), { emptyValues: r, valueOnClear: a, isEmptyValue: o }; }, Yue = Pn({ ariaLabel: String, ariaOrientation: { type: String, values: ["horizontal", "vertical", "undefined"] }, ariaControls: String }), ic = (e) => _N(Yue, e), Zue = Symbol(), QT = U(); function Que(e, t = void 0) { const n = tt() ? Te(Zue, QT) : QT; return F(() => { var r, a; return (a = (r = n.value) == null ? void 0 : r[e]) != null ? a : t; }); } var Ht = (e, t) => { const n = e.__vccOpts || e; for (const [r, a] of t) n[r] = a; return n; }; const Jue = Pn({ size: { type: Ot([Number, String]) }, color: { type: String } }), ece = X({ name: "ElIcon", inheritAttrs: !1 }), tce = /* @__PURE__ */ X({ ...ece, props: Jue, setup(e) { const t = e, n = Zt("icon"), r = F(() => { const { size: a, color: o } = t; return !a && !o ? {} : { fontSize: Cu(a) ? void 0 : kf(a), "--color": o }; }); return (a, o) => (I(), j("i", Bt({ class: b(n).b(), style: b(r) }, a.$attrs), [ he(a.$slots, "default") ], 16)); } }); var nce = /* @__PURE__ */ Ht(tce, [["__file", "icon.vue"]]); const eo = Xr(nce), x4 = Symbol("formContextKey"), b0 = Symbol("formItemContextKey"), gd = (e, t = {}) => { const n = U(void 0), r = t.prop ? n : PN("size"), a = t.global ? n : Hue(), o = t.form ? { size: void 0 } : Te(x4, void 0), i = t.formItem ? { size: void 0 } : Te(b0, void 0); return F(() => r.value || b(e) || (i == null ? void 0 : i.size) || (o == null ? void 0 : o.size) || a.value || ""); }, Ag = (e) => { const t = PN("disabled"), n = Te(x4, void 0); return F(() => t.value || b(e) || (n == null ? void 0 : n.disabled) || !1); }, Zd = () => { const e = Te(x4, void 0), t = Te(b0, void 0); return { form: e, formItem: t }; }, Ig = (e, { formItemContext: t, disableIdGeneration: n, disableIdManagement: r }) => { n || (n = U(!1)), r || (r = U(!1)); const a = U(); let o; const i = F(() => { var s; return !!(!(e.label || e.ariaLabel) && t && t.inputIds && ((s = t.inputIds) == null ? void 0 : s.length) <= 1); }); return nt(() => { o = be([It(e, "id"), n], ([s, l]) => { const u = s ?? (l ? void 0 : I2().value); u !== a.value && (t != null && t.removeInputId && (a.value && t.removeInputId(a.value), !(r != null && r.value) && !l && u && t.addInputId(u)), a.value = u); }, { immediate: !0 }); }), Yb(() => { o && o(), t != null && t.removeInputId && a.value && t.removeInputId(a.value); }), { isLabeledByFormItem: i, inputId: a }; }; let yi; const rce = ` height:0 !important; visibility:hidden !important; ${Yre() ? "" : "overflow:hidden !important;"} position:absolute !important; z-index:-1000 !important; top:0 !important; right:0 !important; `, ace = [ "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 oce(e) { const t = window.getComputedStyle(e), n = t.getPropertyValue("box-sizing"), r = Number.parseFloat(t.getPropertyValue("padding-bottom")) + Number.parseFloat(t.getPropertyValue("padding-top")), a = Number.parseFloat(t.getPropertyValue("border-bottom-width")) + Number.parseFloat(t.getPropertyValue("border-top-width")); return { contextStyle: ace.map((o) => `${o}:${t.getPropertyValue(o)}`).join(";"), paddingSize: r, borderSize: a, boxSizing: n }; } function JT(e, t = 1, n) { var r; yi || (yi = document.createElement("textarea"), document.body.appendChild(yi)); const { paddingSize: a, borderSize: o, boxSizing: i, contextStyle: s } = oce(e); yi.setAttribute("style", `${s};${rce}`), yi.value = e.value || e.placeholder || ""; let l = yi.scrollHeight; const u = {}; i === "border-box" ? l = l + o : i === "content-box" && (l = l - a), yi.value = ""; const c = yi.scrollHeight - a; if (ra(t)) { let d = c * t; i === "border-box" && (d = d + a + o), l = Math.max(d, l), u.minHeight = `${d}px`; } if (ra(n)) { let d = c * n; i === "border-box" && (d = d + a + o), l = Math.min(d, l); } return u.height = `${l}px`, (r = yi.parentNode) == null || r.removeChild(yi), yi = void 0, u; } const ice = Pn({ id: { type: String, default: void 0 }, size: ch, disabled: Boolean, modelValue: { type: Ot([ 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: Ot([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: Ru }, prefixIcon: { type: Ru }, containerRole: { type: String, default: void 0 }, tabindex: { type: [String, Number], default: 0 }, validateEvent: { type: Boolean, default: !0 }, inputStyle: { type: Ot([Object, Array, String]), default: () => zp({}) }, autofocus: Boolean, rows: { type: Number, default: 2 }, ...ic(["ariaLabel"]) }), sce = { [Jr]: (e) => oo(e), input: (e) => oo(e), change: (e) => oo(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 }, lce = X({ name: "ElInput", inheritAttrs: !1 }), uce = /* @__PURE__ */ X({ ...lce, props: ice, emits: sce, setup(e, { expose: t, emit: n }) { const r = e, a = oh(), o = Cr(), i = F(() => { const E = {}; return r.containerRole === "combobox" && (E["aria-haspopup"] = a["aria-haspopup"], E["aria-owns"] = a["aria-owns"], E["aria-expanded"] = a["aria-expanded"]), E; }), s = F(() => [ r.type === "textarea" ? m.b() : v.b(), v.m(h.value), v.is("disabled", p.value), v.is("exceed", se.value), { [v.b("group")]: o.prepend || o.append, [v.m("prefix")]: o.prefix || r.prefixIcon, [v.m("suffix")]: o.suffix || r.suffixIcon || r.clearable || r.showPassword, [v.bm("suffix", "password-clear")]: z.value && Z.value, [v.b("hidden")]: r.type === "hidden" }, a.class ]), l = F(() => [ v.e("wrapper"), v.is("focus", T.value) ]), u = vle({ excludeKeys: F(() => Object.keys(i.value)) }), { form: c, formItem: d } = Zd(), { inputId: f } = Ig(r, { formItemContext: d }), h = gd(), p = Ag(), v = Zt("input"), m = Zt("textarea"), g = dn(), y = dn(), x = U(!1), w = U(!1), k = U(), C = dn(r.inputStyle), S = F(() => g.value || y.value), { wrapperRef: _, isFocused: T, handleFocus: O, handleBlur: $ } = w4(S, { beforeFocus() { return p.value; }, afterBlur() { var E; r.validateEvent && ((E = d == null ? void 0 : d.validate) == null || E.call(d, "blur").catch((V) => Br(V))); } }), A = F(() => { var E; return (E = c == null ? void 0 : c.statusIcon) != null ? E : !1; }), N = F(() => (d == null ? void 0 : d.validateState) || ""), L = F(() => N.value && AN[N.value]), R = F(() => w.value ? ule : ile), P = F(() => [ a.style ]), B = F(() => [ r.inputStyle, C.value, { resize: r.resize } ]), M = F(() => Au(r.modelValue) ? "" : String(r.modelValue)), z = F(() => r.clearable && !p.value && !r.readonly && !!M.value && (T.value || x.value)), Z = F(() => r.showPassword && !p.value && !r.readonly && !!M.value && (!!M.value || T.value)), G = F(() => r.showWordLimit && !!r.maxlength && (r.type === "text" || r.type === "textarea") && !p.value && !r.readonly && !r.showPassword), J = F(() => M.value.length), se = F(() => !!G.value && J.value > Number(r.maxlength)), ve = F(() => !!o.suffix || !!r.suffixIcon || z.value || r.showPassword || G.value || !!N.value && A.value), [ge, oe] = Vue(g); rl(y, (E) => { if (q(), !G.value || r.resize !== "both") return; const V = E[0], { width: ie } = V.contentRect; k.value = { right: `calc(100% - ${ie + 15 + 6}px)` }; }); const ee = () => { const { type: E, autosize: V } = r; if (!(!Gr || E !== "textarea" || !y.value)) if (V) { const ie = ja(V) ? V.minRows : void 0, le = ja(V) ? V.maxRows : void 0, re = JT(y.value, ie, le); C.value = { overflowY: "hidden", ...re }, Ue(() => { y.value.offsetHeight, C.value = re; }); } else C.value = { minHeight: JT(y.value).minHeight }; }, q = /* @__PURE__ */ ((E) => { let V = !1; return () => { var ie; V || !r.autosize || ((ie = y.value) == null ? void 0 : ie.offsetParent) === null || (E(), V = !0); }; })(ee), Y = () => { const E = S.value, V = r.formatter ? r.formatter(M.value) : M.value; !E || E.value === V || (E.value = V); }, te = async (E) => { ge(); let { value: V } = E.target; if (r.formatter && (V = r.parser ? r.parser(V) : V), !Oe.value) { if (V === M.value) { Y(); return; } n(Jr, V), n("input", V), await Ue(), Y(), oe(); } }, we = (E) => { n("change", E.target.value); }, { isComposing: Oe, handleCompositionStart: Ne, handleCompositionUpdate: xe, handleCompositionEnd: $e } = GN({ emit: n, afterComposition: te }), Se = () => { w.value = !w.value, Pe(); }, Pe = async () => { var E; await Ue(), (E = S.value) == null || E.focus(); }, Me = () => { var E; return (E = S.value) == null ? void 0 : E.blur(); }, je = (E) => { x.value = !1, n("mouseleave", E); }, Be = (E) => { x.value = !0, n("mouseenter", E); }, We = (E) => { n("keydown", E); }, qe = () => { var E; (E = S.value) == null || E.select(); }, Ge = () => { n(Jr, ""), n("change", ""), n("clear"), n("input", ""); }; return be(() => r.modelValue, () => { var E; Ue(() => ee()), r.validateEvent && ((E = d == null ? void 0 : d.validate) == null || E.call(d, "change").catch((V) => Br(V))); }), be(M, () => Y()), be(() => r.type, async () => { await Ue(), Y(), ee(); }), nt(() => { !r.formatter && r.parser && Br("ElInput", "If you set the parser, you also need to set the formatter."), Y(), Ue(ee); }), t({ input: g, textarea: y, ref: S, textareaStyle: B, autosize: It(r, "autosize"), isComposing: Oe, focus: Pe, blur: Me, select: qe, clear: Ge, resizeTextarea: ee }), (E, V) => (I(), j("div", Bt(b(i), { class: [ b(s), { [b(v).bm("group", "append")]: E.$slots.append, [b(v).bm("group", "prepend")]: E.$slots.prepend } ], style: b(P), role: E.containerRole, onMouseenter: Be, onMouseleave: je }), [ ne(" input "), E.type !== "textarea" ? (I(), j(Qe, { key: 0 }, [ ne(" prepend slot "), E.$slots.prepend ? (I(), j("div", { key: 0, class: H(b(v).be("group", "prepend")) }, [ he(E.$slots, "prepend") ], 2)) : ne("v-if", !0), W("div", { ref_key: "wrapperRef", ref: _, class: H(b(l)) }, [ ne(" prefix slot "), E.$slots.prefix || E.prefixIcon ? (I(), j("span", { key: 0, class: H(b(v).e("prefix")) }, [ W("span", { class: H(b(v).e("prefix-inner")) }, [ he(E.$slots, "prefix"), E.prefixIcon ? (I(), de(b(eo), { key: 0, class: H(b(v).e("icon")) }, { default: K(() => [ (I(), de(ct(E.prefixIcon))) ]), _: 1 }, 8, ["class"])) : ne("v-if", !0) ], 2) ], 2)) : ne("v-if", !0), W("input", Bt({ id: b(f), ref_key: "input", ref: g, class: b(v).e("inner") }, b(u), { minlength: E.minlength, maxlength: E.maxlength, type: E.showPassword ? w.value ? "text" : "password" : E.type, disabled: b(p), readonly: E.readonly, autocomplete: E.autocomplete, tabindex: E.tabindex, "aria-label": E.ariaLabel, placeholder: E.placeholder, style: E.inputStyle, form: E.form, autofocus: E.autofocus, onCompositionstart: b(Ne), onCompositionupdate: b(xe), onCompositionend: b($e), onInput: te, onChange: we, onKeydown: We }), null, 16, ["id", "minlength", "maxlength", "type", "disabled", "readonly", "autocomplete", "tabindex", "aria-label", "placeholder", "form", "autofocus", "onCompositionstart", "onCompositionupdate", "onCompositionend"]), ne(" suffix slot "), b(ve) ? (I(), j("span", { key: 1, class: H(b(v).e("suffix")) }, [ W("span", { class: H(b(v).e("suffix-inner")) }, [ !b(z) || !b(Z) || !b(G) ? (I(), j(Qe, { key: 0 }, [ he(E.$slots, "suffix"), E.suffixIcon ? (I(), de(b(eo), { key: 0, class: H(b(v).e("icon")) }, { default: K(() => [ (I(), de(ct(E.suffixIcon))) ]), _: 1 }, 8, ["class"])) : ne("v-if", !0) ], 64)) : ne("v-if", !0), b(z) ? (I(), de(b(eo), { key: 1, class: H([b(v).e("icon"), b(v).e("clear")]), onMousedown: Je(b(h0), ["prevent"]), onClick: Ge }, { default: K(() => [ ue(b(l4)) ]), _: 1 }, 8, ["class", "onMousedown"])) : ne("v-if", !0), b(Z) ? (I(), de(b(eo), { key: 2, class: H([b(v).e("icon"), b(v).e("password")]), onClick: Se }, { default: K(() => [ (I(), de(ct(b(R)))) ]), _: 1 }, 8, ["class"])) : ne("v-if", !0), b(G) ? (I(), j("span", { key: 3, class: H(b(v).e("count")) }, [ W("span", { class: H(b(v).e("count-inner")) }, Fe(b(J)) + " / " + Fe(E.maxlength), 3) ], 2)) : ne("v-if", !0), b(N) && b(L) && b(A) ? (I(), de(b(eo), { key: 4, class: H([ b(v).e("icon"), b(v).e("validateIcon"), b(v).is("loading", b(N) === "validating") ]) }, { default: K(() => [ (I(), de(ct(b(L)))) ]), _: 1 }, 8, ["class"])) : ne("v-if", !0) ], 2) ], 2)) : ne("v-if", !0) ], 2), ne(" append slot "), E.$slots.append ? (I(), j("div", { key: 1, class: H(b(v).be("group", "append")) }, [ he(E.$slots, "append") ], 2)) : ne("v-if", !0) ], 64)) : (I(), j(Qe, { key: 1 }, [ ne(" textarea "), W("textarea", Bt({ id: b(f), ref_key: "textarea", ref: y, class: [b(m).e("inner"), b(v).is("focus", b(T))] }, b(u), { minlength: E.minlength, maxlength: E.maxlength, tabindex: E.tabindex, disabled: b(p), readonly: E.readonly, autocomplete: E.autocomplete, style: b(B), "aria-label": E.ariaLabel, placeholder: E.placeholder, form: E.form, autofocus: E.autofocus, rows: E.rows, onCompositionstart: b(Ne), onCompositionupdate: b(xe), onCompositionend: b($e), onInput: te, onFocus: b(O), onBlur: b($), onChange: we, onKeydown: We }), null, 16, ["id", "minlength", "maxlength", "tabindex", "disabled", "readonly", "autocomplete", "aria-label", "placeholder", "form", "autofocus", "rows", "onCompositionstart", "onCompositionupdate", "onCompositionend", "onFocus", "onBlur"]), b(G) ? (I(), j("span", { key: 0, style: Ye(k.value), class: H(b(v).e("count")) }, Fe(b(J)) + " / " + Fe(E.maxlength), 7)) : ne("v-if", !0) ], 64)) ], 16, ["role"])); } }); var cce = /* @__PURE__ */ Ht(uce, [["__file", "input.vue"]]); const dce = Xr(cce), bp = 4, pce = { 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" } }, fce = ({ move: e, size: t, bar: n }) => ({ [n.size]: t, transform: `translate${n.axis}(${e}%)` }), k4 = Symbol("scrollbarContextKey"), hce = Pn({ vertical: Boolean, size: String, move: Number, ratio: { type: Number, required: !0 }, always: Boolean }), vce = "Thumb", gce = /* @__PURE__ */ X({ __name: "thumb", props: hce, setup(e) { const t = e, n = Te(k4), r = Zt("scrollbar"); n || Wse(vce, "can not inject scrollbar context"); const a = U(), o = U(), i = U({}), s = U(!1); let l = !1, u = !1, c = Gr ? document.onselectstart : null; const d = F(() => pce[t.vertical ? "vertical" : "horizontal"]), f = F(() => fce({ size: t.size, move: t.move, bar: d.value })), h = F(() => a.value[d.value.offset] ** 2 / n.wrapElement[d.value.scrollSize] / t.ratio / o.value[d.value.offset]), p = (C) => { var S; if (C.stopPropagation(), C.ctrlKey || [1, 2].includes(C.button)) return; (S = window.getSelection()) == null || S.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 (!o.value || !a.value || !n.wrapElement) return; const S = Math.abs(C.target.getBoundingClientRect()[d.value.direction] - C[d.value.client]), _ = o.value[d.value.offset] / 2, T = (S - _) * 100 * h.value / a.value[d.value.offset]; n.wrapElement[d.value.scroll] = T * n.wrapElement[d.value.scrollSize] / 100; }, m = (C) => { C.stopImmediatePropagation(), l = !0, document.addEventListener("mousemove", g), document.addEventListener("mouseup", y), c = document.onselectstart, document.onselectstart = () => !1; }, g = (C) => { if (!a.value || !o.value || l === !1) return; const S = i.value[d.value.axis]; if (!S) return; const _ = (a.value.getBoundingClientRect()[d.value.direction] - C[d.value.client]) * -1, T = o.value[d.value.offset] - S, O = (_ - T) * 100 * h.value / a.value[d.value.offset]; n.wrapElement[d.value.scroll] = O * n.wrapElement[d.value.scrollSize] / 100; }, y = () => { l = !1, i.value[d.value.axis] = 0, document.removeEventListener("mousemove", g), document.removeEventListener("mouseup", y), k(), u && (s.value = !1); }, x = () => { u = !1, s.value = !!t.size; }, w = () => { u = !0, s.value = l; }; kt(() => { k(), document.removeEventListener("mouseup", y); }); const k = () => { document.onselectstart !== c && (document.onselectstart = c); }; return Wo(It(n, "scrollbarElement"), "mousemove", x), Wo(It(n, "scrollbarElement"), "mouseleave", w), (C, S) => (I(), de(vr, { name: b(r).b("fade"), persisted: "" }, { default: K(() => [ Xe(W("div", { ref_key: "instance", ref: a, class: H([b(r).e("bar"), b(r).is(b(d).key)]), onMousedown: v }, [ W("div", { ref_key: "thumb", ref: o, class: H(b(r).e("thumb")), style: Ye(b(f)), onMousedown: p }, null, 38) ], 34), [ [mt, C.always || s.value] ]) ]), _: 1 }, 8, ["name"])); } }); var e6 = /* @__PURE__ */ Ht(gce, [["__file", "thumb.vue"]]); const mce = Pn({ always: { type: Boolean, default: !0 }, minSize: { type: Number, required: !0 } }), yce = /* @__PURE__ */ X({ __name: "bar", props: mce, setup(e, { expose: t }) { const n = e, r = Te(k4), a = U(0), o = U(0), i = U(""), s = U(""), l = U(1), u = U(1); return t({ handleScroll: (c) => { if (c) { const d = c.offsetHeight - bp, f = c.offsetWidth - bp; o.value = c.scrollTop * 100 / d * l.value, a.value = c.scrollLeft * 100 / f * u.value; } }, update: () => { const c = r == null ? void 0 : r.wrapElement; if (!c) return; const d = c.offsetHeight - bp, f = c.offsetWidth - bp, h = d ** 2 / c.scrollHeight, p = f ** 2 / c.scrollWidth, v = Math.max(h, n.minSize), m = Math.max(p, n.minSize); l.value = h / (d - h) / (v / (d - v)), u.value = p / (f - p) / (m / (f - m)), s.value = v + bp < d ? `${v}px` : "", i.value = m + bp < f ? `${m}px` : ""; } }), (c, d) => (I(), j(Qe, null, [ ue(e6, { move: a.value, ratio: u.value, size: i.value, always: c.always }, null, 8, ["move", "ratio", "size", "always"]), ue(e6, { move: o.value, ratio: l.value, size: s.value, vertical: "", always: c.always }, null, 8, ["move", "ratio", "size", "always"]) ], 64)); } }); var bce = /* @__PURE__ */ Ht(yce, [["__file", "bar.vue"]]); const wce = Pn({ height: { type: [String, Number], default: "" }, maxHeight: { type: [String, Number], default: "" }, native: { type: Boolean, default: !1 }, wrapStyle: { type: Ot([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, ...ic(["ariaLabel", "ariaOrientation"]) }), xce = { scroll: ({ scrollTop: e, scrollLeft: t }) => [e, t].every(ra) }, NC = "ElScrollbar", kce = X({ name: NC }), Cce = /* @__PURE__ */ X({ ...kce, props: wce, emits: xce, setup(e, { expose: t, emit: n }) { const r = e, a = Zt("scrollbar"); let o, i, s = 0, l = 0; const u = U(), c = U(), d = U(), f = U(), h = F(() => { const k = {}; return r.height && (k.height = kf(r.height)), r.maxHeight && (k.maxHeight = kf(r.maxHeight)), [r.wrapStyle, k]; }), p = F(() => [ r.wrapClass, a.e("wrap"), { [a.em("wrap", "hidden-default")]: !r.native } ]), v = F(() => [a.e("view"), r.viewClass]), m = () => { var k; c.value && ((k = f.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) { ja(k) ? c.value.scrollTo(k) : ra(k) && ra(C) && c.value.scrollTo(k, C); } const y = (k) => { if (!ra(k)) { Br(NC, "value must be a number"); return; } c.value.scrollTop = k; }, x = (k) => { if (!ra(k)) { Br(NC, "value must be a number"); return; } c.value.scrollLeft = k; }, w = () => { var k; (k = f.value) == null || k.update(); }; return be(() => r.noresize, (k) => { k ? (o == null || o(), i == null || i()) : ({ stop: o } = rl(d, w), i = Wo("resize", w)); }, { immediate: !0 }), be(() => [r.maxHeight, r.height], () => { r.native || Ue(() => { var k; w(), c.value && ((k = f.value) == null || k.handleScroll(c.value)); }); }), rt(k4, tn({ scrollbarElement: u, wrapElement: c })), Zb(() => { c.value && (c.value.scrollTop = s, c.value.scrollLeft = l); }), nt(() => { r.native || Ue(() => { w(); }); }), jd(() => w()), t({ wrapRef: c, update: w, scrollTo: g, setScrollTop: y, setScrollLeft: x, handleScroll: m }), (k, C) => (I(), j("div", { ref_key: "scrollbarRef", ref: u, class: H(b(a).b()) }, [ W("div", { ref_key: "wrapRef", ref: c, class: H(b(p)), style: Ye(b(h)), tabindex: k.tabindex, onScroll: m }, [ (I(), de(ct(k.tag), { id: k.id, ref_key: "resizeRef", ref: d, class: H(b(v)), style: Ye(k.viewStyle), role: k.role, "aria-label": k.ariaLabel, "aria-orientation": k.ariaOrientation }, { default: K(() => [ he(k.$slots, "default") ]), _: 3 }, 8, ["id", "class", "style", "role", "aria-label", "aria-orientation"])) ], 46, ["tabindex"]), k.native ? ne("v-if", !0) : (I(), de(bce, { key: 0, ref_key: "barRef", ref: f, always: k.always, "min-size": k.minSize }, null, 8, ["always", "min-size"])) ], 2)); } }); var Sce = /* @__PURE__ */ Ht(Cce, [["__file", "scrollbar.vue"]]); const Ece = Xr(Sce), C4 = Symbol("popper"), XN = Symbol("popperContent"), _ce = [ "dialog", "grid", "group", "listbox", "menu", "navigation", "tooltip", "tree" ], YN = Pn({ role: { type: String, values: _ce, default: "tooltip" } }), Tce = X({ name: "ElPopper", inheritAttrs: !1 }), Oce = /* @__PURE__ */ X({ ...Tce, props: YN, setup(e, { expose: t }) { const n = e, r = U(), a = U(), o = U(), i = U(), s = F(() => n.role), l = { triggerRef: r, popperInstanceRef: a, contentRef: o, referenceRef: i, role: s }; return t(l), rt(C4, l), (u, c) => he(u.$slots, "default"); } }); var $ce = /* @__PURE__ */ Ht(Oce, [["__file", "popper.vue"]]); const ZN = Pn({ arrowOffset: { type: Number, default: 5 } }), Fce = X({ name: "ElPopperArrow", inheritAttrs: !1 }), Ace = /* @__PURE__ */ X({ ...Fce, props: ZN, setup(e, { expose: t }) { const n = e, r = Zt("popper"), { arrowOffset: a, arrowRef: o, arrowStyle: i } = Te(XN, void 0); return be(() => n.arrowOffset, (s) => { a.value = s; }), kt(() => { o.value = void 0; }), t({ arrowRef: o }), (s, l) => (I(), j("span", { ref_key: "arrowRef", ref: o, class: H(b(r).e("arrow")), style: Ye(b(i)), "data-popper-arrow": "" }, null, 6)); } }); var Ice = /* @__PURE__ */ Ht(Ace, [["__file", "arrow.vue"]]); const Dx = "ElOnlyChild", Pce = X({ name: Dx, setup(e, { slots: t, attrs: n }) { var r; const a = Te(KN), o = Bue((r = a == null ? void 0 : a.setForwardRef) != null ? r : h0); return () => { var i; const s = (i = t.default) == null ? void 0 : i.call(t, n); if (!s) return null; if (s.length > 1) return Br(Dx, "requires exact only one valid child."), null; const l = QN(s); return l ? Xe(mg(l, n), [[o]]) : (Br(Dx, "no valid child node found"), null); }; } }); function QN(e) { if (!e) return null; const t = e; for (const n of t) { if (ja(n)) switch (n.type) { case yg: continue; case Ps: case "svg": return t6(n); case Qe: return QN(n.children); default: return n; } return t6(n); } return null; } function t6(e) { const t = Zt("only-child"); return ue("span", { class: t.e("content") }, [e]); } const JN = Pn({ virtualRef: { type: Ot(Object) }, virtualTriggering: Boolean, onMouseenter: { type: Ot(Function) }, onMouseleave: { type: Ot(Function) }, onClick: { type: Ot(Function) }, onKeydown: { type: Ot(Function) }, onFocus: { type: Ot(Function) }, onBlur: { type: Ot(Function) }, onContextmenu: { type: Ot(Function) }, id: String, open: Boolean }), Lce = X({ name: "ElPopperTrigger", inheritAttrs: !1 }), Nce = /* @__PURE__ */ X({ ...Lce, props: JN, setup(e, { expose: t }) { const n = e, { role: r, triggerRef: a } = Te(C4, void 0); Mue(a); const o = F(() => s.value ? n.id : void 0), i = F(() => { if (r && r.value === "tooltip") return n.open && n.id ? n.id : void 0; }), s = F(() => { if (r && r.value !== "tooltip") return r.value; }), l = F(() => s.value ? `${n.open}` : void 0); let u; const c = [ "onMouseenter", "onMouseleave", "onClick", "onKeydown", "onFocus", "onBlur", "onContextmenu" ]; return nt(() => { be(() => n.virtualRef, (d) => { d && (a.value = cl(d)); }, { immediate: !0 }), be(a, (d, f) => { u == null || u(), u = void 0, Jc(d) && (c.forEach((h) => { var p; const v = n[h]; v && (d.addEventListener(h.slice(2).toLowerCase(), v), (p = f == null ? void 0 : f.removeEventListener) == null || p.call(f, h.slice(2).toLowerCase(), v)); }), u = be([o, i, s, l], (h) => { [ "aria-controls", "aria-describedby", "aria-haspopup", "aria-expanded" ].forEach((p, v) => { Au(h[v]) ? d.removeAttribute(p) : d.setAttribute(p, h[v]); }); }, { immediate: !0 })), Jc(f) && [ "aria-controls", "aria-describedby", "aria-haspopup", "aria-expanded" ].forEach((h) => f.removeAttribute(h)); }, { immediate: !0 }); }), kt(() => { if (u == null || u(), u = void 0, a.value && Jc(a.value)) { const d = a.value; c.forEach((f) => { const h = n[f]; h && d.removeEventListener(f.slice(2).toLowerCase(), h); }), a.value = void 0; } }), t({ triggerRef: a }), (d, f) => d.virtualTriggering ? ne("v-if", !0) : (I(), de(b(Pce), Bt({ key: 0 }, d.$attrs, { "aria-controls": b(o), "aria-describedby": b(i), "aria-expanded": b(l), "aria-haspopup": b(s) }), { default: K(() => [ he(d.$slots, "default") ]), _: 3 }, 16, ["aria-controls", "aria-describedby", "aria-expanded", "aria-haspopup"])); } }); var Mce = /* @__PURE__ */ Ht(Nce, [["__file", "trigger.vue"]]); const Rx = "focus-trap.focus-after-trapped", zx = "focus-trap.focus-after-released", Bce = "focus-trap.focusout-prevented", n6 = { cancelable: !0, bubbles: !1 }, Dce = { cancelable: !0, bubbles: !1 }, r6 = "focusAfterTrapped", a6 = "focusAfterReleased", Rce = Symbol("elFocusTrap"), S4 = U(), P2 = U(0), E4 = U(0); let Nm = 0; const eM = (e) => { const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, { acceptNode: (r) => { const a = r.tagName === "INPUT" && r.type === "hidden"; return r.disabled || r.hidden || a ? NodeFilter.FILTER_SKIP : r.tabIndex >= 0 || r === document.activeElement ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP; } }); for (; n.nextNode(); ) t.push(n.currentNode); return t; }, o6 = (e, t) => { for (const n of e) if (!zce(n, t)) return n; }, zce = (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; }, Vce = (e) => { const t = eM(e), n = o6(t, e), r = o6(t.reverse(), e); return [n, r]; }, jce = (e) => e instanceof HTMLInputElement && "select" in e, ru = (e, t) => { if (e && e.focus) { const n = document.activeElement; e.focus({ preventScroll: !0 }), E4.value = window.performance.now(), e !== n && jce(e) && t && e.select(); } }; function i6(e, t) { const n = [...e], r = e.indexOf(t); return r !== -1 && n.splice(r, 1), n; } const Hce = () => { let e = []; return { push: (t) => { const n = e[0]; n && t !== n && n.pause(), e = i6(e, t), e.unshift(t); }, remove: (t) => { var n, r; e = i6(e, t), (r = (n = e[0]) == null ? void 0 : n.resume) == null || r.call(n); } }; }, Uce = (e, t = !1) => { const n = document.activeElement; for (const r of e) if (ru(r, t), document.activeElement !== n) return; }, s6 = Hce(), qce = () => P2.value > E4.value, Mm = () => { S4.value = "pointer", P2.value = window.performance.now(); }, l6 = () => { S4.value = "keyboard", P2.value = window.performance.now(); }, Wce = () => (nt(() => { Nm === 0 && (document.addEventListener("mousedown", Mm), document.addEventListener("touchstart", Mm), document.addEventListener("keydown", l6)), Nm++; }), kt(() => { Nm--, Nm <= 0 && (document.removeEventListener("mousedown", Mm), document.removeEventListener("touchstart", Mm), document.removeEventListener("keydown", l6)); }), { focusReason: S4, lastUserFocusTimestamp: P2, lastAutomatedFocusTimestamp: E4 }), Bm = (e) => new CustomEvent(Bce, { ...Dce, detail: e }), Kce = X({ name: "ElFocusTrap", inheritAttrs: !1, props: { loop: Boolean, trapped: Boolean, focusTrapEl: Object, focusStartEl: { type: [Object, String], default: "first" } }, emits: [ r6, a6, "focusin", "focusout", "focusout-prevented", "release-requested" ], setup(e, { emit: t }) { const n = U(); let r, a; const { focusReason: o } = Wce(); Aue((p) => { e.trapped && !i.paused && t("release-requested", p); }); const i = { paused: !1, pause() { this.paused = !0; }, resume() { this.paused = !1; } }, s = (p) => { if (!e.loop && !e.trapped || i.paused) return; const { key: v, altKey: m, ctrlKey: g, metaKey: y, currentTarget: x, shiftKey: w } = p, { loop: k } = e, C = v === Fr.tab && !m && !g && !y, S = document.activeElement; if (C && S) { const _ = x, [T, O] = Vce(_); if (T && O) { if (!w && S === O) { const $ = Bm({ focusReason: o.value }); t("focusout-prevented", $), $.defaultPrevented || (p.preventDefault(), k && ru(T, !0)); } else if (w && [T, _].includes(S)) { const $ = Bm({ focusReason: o.value }); t("focusout-prevented", $), $.defaultPrevented || (p.preventDefault(), k && ru(O, !0)); } } else if (S === _) { const $ = Bm({ focusReason: o.value }); t("focusout-prevented", $), $.defaultPrevented || p.preventDefault(); } } }; rt(Rce, { focusTrapRef: n, onKeydown: s }), be(() => e.focusTrapEl, (p) => { p && (n.value = p); }, { immediate: !0 }), be([n], ([p], [v]) => { p && (p.addEventListener("keydown", s), p.addEventListener("focusin", c), p.addEventListener("focusout", d)), v && (v.removeEventListener("keydown", s), v.removeEventListener("focusin", c), v.removeEventListener("focusout", d)); }); const l = (p) => { t(r6, p); }, u = (p) => t(a6, p), c = (p) => { const v = b(n); if (!v) return; const m = p.target, g = p.relatedTarget, y = m && v.contains(m); e.trapped || g && v.contains(g) || (r = g), y && t("focusin", p), !i.paused && e.trapped && (y ? a = m : ru(a, !0)); }, d = (p) => { const v = b(n); if (!(i.paused || !v)) if (e.trapped) { const m = p.relatedTarget; !Au(m) && !v.contains(m) && setTimeout(() => { if (!i.paused && e.trapped) { const g = Bm({ focusReason: o.value }); t("focusout-prevented", g), g.defaultPrevented || ru(a, !0); } }, 0); } else { const m = p.target; m && v.contains(m) || t("focusout", p); } }; async function f() { await Ue(); const p = b(n); if (p) { s6.push(i); const v = p.contains(document.activeElement) ? r : document.activeElement; if (r = v, !p.contains(v)) { const m = new Event(Rx, n6); p.addEventListener(Rx, l), p.dispatchEvent(m), m.defaultPrevented || Ue(() => { let g = e.focusStartEl; oo(g) || (ru(g), document.activeElement !== g && (g = "first")), g === "first" && Uce(eM(p), !0), (document.activeElement === v || g === "container") && ru(p); }); } } } function h() { const p = b(n); if (p) { p.removeEventListener(Rx, l); const v = new CustomEvent(zx, { ...n6, detail: { focusReason: o.value } }); p.addEventListener(zx, u), p.dispatchEvent(v), !v.defaultPrevented && (o.value == "keyboard" || !qce() || p.contains(document.activeElement)) && ru(r ?? document.body), p.removeEventListener(zx, u), s6.remove(i); } } return nt(() => { e.trapped && f(), be(() => e.trapped, (p) => { p ? f() : h(); }); }), kt(() => { 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 Gce(e, t, n, r, a, o) { return he(e.$slots, "default", { handleKeydown: e.onKeydown }); } var Xce = /* @__PURE__ */ Ht(Kce, [["render", Gce], ["__file", "focus-trap.vue"]]); const Yce = ["fixed", "absolute"], Zce = Pn({ boundariesPadding: { type: Number, default: 0 }, fallbackPlacements: { type: Ot(Array), default: void 0 }, gpuAcceleration: { type: Boolean, default: !0 }, offset: { type: Number, default: 12 }, placement: { type: String, values: F2, default: "bottom" }, popperOptions: { type: Ot(Object), default: () => ({}) }, strategy: { type: String, values: Yce, default: "absolute" } }), tM = Pn({ ...Zce, id: String, style: { type: Ot([String, Array, Object]) }, className: { type: Ot([String, Array, Object]) }, effect: { type: Ot(String), default: "dark" }, visible: Boolean, enterable: { type: Boolean, default: !0 }, pure: Boolean, focusOnShow: { type: Boolean, default: !1 }, trapping: { type: Boolean, default: !1 }, popperClass: { type: Ot([String, Array, Object]) }, popperStyle: { type: Ot([String, Array, Object]) }, referenceEl: { type: Ot(Object) }, triggerTargetEl: { type: Ot(Object) }, stopPopperMouseEvent: { type: Boolean, default: !0 }, virtualTriggering: Boolean, zIndex: Number, ...ic(["ariaLabel"]) }), Qce = { mouseenter: (e) => e instanceof MouseEvent, mouseleave: (e) => e instanceof MouseEvent, focus: () => !0, blur: () => !0, close: () => !0 }, Jce = (e, t = []) => { const { placement: n, strategy: r, popperOptions: a } = e, o = { placement: n, strategy: r, ...a, modifiers: [...tde(e), ...t] }; return nde(o, a == null ? void 0 : a.modifiers), o; }, ede = (e) => { if (Gr) return cl(e); }; function tde(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 nde(e, t) { t && (e.modifiers = [...e.modifiers, ...t ?? []]); } const rde = 0, ade = (e) => { const { popperInstanceRef: t, contentRef: n, triggerRef: r, role: a } = Te(C4, void 0), o = U(), i = U(), s = F(() => ({ name: "eventListeners", enabled: !!e.visible })), l = F(() => { var g; const y = b(o), x = (g = b(i)) != null ? g : rde; return { name: "arrow", enabled: !zse(y), options: { element: y, padding: x } }; }), u = F(() => ({ onFirstUpdate: () => { p(); }, ...Jce(e, [ b(l), b(s) ]) })), c = F(() => ede(e.referenceEl) || b(r)), { attributes: d, state: f, styles: h, update: p, forceUpdate: v, instanceRef: m } = Oue(c, n, u); return be(m, (g) => t.value = g), nt(() => { be(() => { var g; return (g = b(c)) == null ? void 0 : g.getBoundingClientRect(); }, () => { p(); }); }), { attributes: d, arrowRef: o, contentRef: n, instanceRef: m, state: f, styles: h, role: a, forceUpdate: v, update: p }; }, ode = (e, { attributes: t, styles: n, role: r }) => { const { nextZIndex: a } = zue(), o = Zt("popper"), i = F(() => b(t).popper), s = U(ra(e.zIndex) ? e.zIndex : a()), l = F(() => [ o.b(), o.is("pure", e.pure), o.is(e.effect), e.popperClass ]), u = F(() => [ { zIndex: b(s) }, b(n).popper, e.popperStyle || {} ]), c = F(() => r.value === "dialog" ? "false" : void 0), d = F(() => b(n).arrow || {}); return { ariaModal: c, arrowStyle: d, contentAttrs: i, contentClass: l, contentStyle: u, contentZIndex: s, updateZIndex: () => { s.value = ra(e.zIndex) ? e.zIndex : a(); } }; }, ide = (e, t) => { const n = U(!1), r = U(); return { focusStartRef: r, trapped: n, onFocusAfterReleased: (a) => { var o; ((o = a.detail) == null ? void 0 : o.focusReason) !== "pointer" && (r.value = "first", t("blur")); }, onFocusAfterTrapped: () => { t("focus"); }, onFocusInTrap: (a) => { e.visible && !n.value && (a.target && (r.value = a.target), n.value = !0); }, onFocusoutPrevented: (a) => { e.trapping || (a.detail.focusReason === "pointer" && a.preventDefault(), n.value = !1); }, onReleaseRequested: () => { n.value = !1, t("close"); } }; }, sde = X({ name: "ElPopperContent" }), lde = /* @__PURE__ */ X({ ...sde, props: tM, emits: Qce, setup(e, { expose: t, emit: n }) { const r = e, { focusStartRef: a, trapped: o, onFocusAfterReleased: i, onFocusAfterTrapped: s, onFocusInTrap: l, onFocusoutPrevented: u, onReleaseRequested: c } = ide(r, n), { attributes: d, arrowRef: f, contentRef: h, styles: p, instanceRef: v, role: m, update: g } = ade(r), { ariaModal: y, arrowStyle: x, contentAttrs: w, contentClass: k, contentStyle: C, updateZIndex: S } = ode(r, { styles: p, attributes: d, role: m }), _ = Te(b0, void 0), T = U(); rt(XN, { arrowStyle: x, arrowRef: f, arrowOffset: T }), _ && rt(b0, { ..._, addInputId: h0, removeInputId: h0 }); let O; const $ = (N = !0) => { g(), N && S(); }, A = () => { $(!1), r.visible && r.focusOnShow ? o.value = !0 : r.visible === !1 && (o.value = !1); }; return nt(() => { be(() => r.triggerTargetEl, (N, L) => { O == null || O(), O = void 0; const R = b(N || h.value), P = b(L || h.value); Jc(R) && (O = be([m, () => r.ariaLabel, y, () => r.id], (B) => { ["role", "aria-label", "aria-modal", "id"].forEach((M, z) => { Au(B[z]) ? R.removeAttribute(M) : R.setAttribute(M, B[z]); }); }, { immediate: !0 })), P !== R && Jc(P) && ["role", "aria-label", "aria-modal", "id"].forEach((B) => { P.removeAttribute(B); }); }, { immediate: !0 }), be(() => r.visible, A, { immediate: !0 }); }), kt(() => { O == null || O(), O = void 0; }), t({ popperContentRef: h, popperInstanceRef: v, updatePopper: $, contentStyle: C }), (N, L) => (I(), j("div", Bt({ ref_key: "contentRef", ref: h }, b(w), { style: b(C), class: b(k), tabindex: "-1", onMouseenter: (R) => N.$emit("mouseenter", R), onMouseleave: (R) => N.$emit("mouseleave", R) }), [ ue(b(Xce), { trapped: b(o), "trap-on-focus-in": !0, "focus-trap-el": b(h), "focus-start-el": b(a), onFocusAfterTrapped: b(s), onFocusAfterReleased: b(i), onFocusin: b(l), onFocusoutPrevented: b(u), onReleaseRequested: b(c) }, { default: K(() => [ he(N.$slots, "default") ]), _: 3 }, 8, ["trapped", "focus-trap-el", "focus-start-el", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusin", "onFocusoutPrevented", "onReleaseRequested"]) ], 16, ["onMouseenter", "onMouseleave"])); } }); var ude = /* @__PURE__ */ Ht(lde, [["__file", "content.vue"]]); const cde = Xr($ce), _4 = Symbol("elTooltip"), Xa = Pn({ ...Lue, ...tM, appendTo: { type: Ot([String, Object]) }, content: { type: String, default: "" }, rawContent: Boolean, persistent: Boolean, visible: { type: Ot(Boolean), default: null }, transition: String, teleported: { type: Boolean, default: !0 }, disabled: Boolean, ...ic(["ariaLabel"]) }), w0 = Pn({ ...JN, disabled: Boolean, trigger: { type: Ot([String, Array]), default: "hover" }, triggerKeys: { type: Ot(Array), default: () => [Fr.enter, Fr.space] } }), { useModelToggleProps: dde, useModelToggleEmits: pde, useModelToggle: fde } = Ele("visible"), hde = Pn({ ...YN, ...dde, ...Xa, ...w0, ...ZN, showArrow: { type: Boolean, default: !0 } }), vde = [ ...pde, "before-show", "before-hide", "show", "hide", "open", "close" ], gde = (e, t) => to(e) ? e.includes(t) : e === t, wp = (e, t, n) => (r) => { gde(b(e), t) && n(r); }, mde = X({ name: "ElTooltipTrigger" }), yde = /* @__PURE__ */ X({ ...mde, props: w0, setup(e, { expose: t }) { const n = e, r = Zt("tooltip"), { controlled: a, id: o, open: i, onOpen: s, onClose: l, onToggle: u } = Te(_4, void 0), c = U(null), d = () => { if (b(a) || n.disabled) return !0; }, f = It(n, "trigger"), h = Qs(d, wp(f, "hover", s)), p = Qs(d, wp(f, "hover", l)), v = Qs(d, wp(f, "click", (w) => { w.button === 0 && u(w); })), m = Qs(d, wp(f, "focus", s)), g = Qs(d, wp(f, "focus", l)), y = Qs(d, wp(f, "contextmenu", (w) => { w.preventDefault(), u(w); })), x = Qs(d, (w) => { const { code: k } = w; n.triggerKeys.includes(k) && (w.preventDefault(), u(w)); }); return t({ triggerRef: c }), (w, k) => (I(), de(b(Mce), { id: b(o), "virtual-ref": w.virtualRef, open: b(i), "virtual-triggering": w.virtualTriggering, class: H(b(r).e("trigger")), onBlur: b(g), onClick: b(v), onContextmenu: b(y), onFocus: b(m), onMouseenter: b(h), onMouseleave: b(p), onKeydown: b(x) }, { default: K(() => [ he(w.$slots, "default") ]), _: 3 }, 8, ["id", "virtual-ref", "open", "virtual-triggering", "class", "onBlur", "onClick", "onContextmenu", "onFocus", "onMouseenter", "onMouseleave", "onKeydown"])); } }); var bde = /* @__PURE__ */ Ht(yde, [["__file", "trigger.vue"]]); const wde = Pn({ to: { type: Ot([String, Object]), required: !0 }, disabled: Boolean }), xde = /* @__PURE__ */ X({ __name: "teleport", props: wde, setup(e) { return (t, n) => t.disabled ? he(t.$slots, "default", { key: 0 }) : (I(), de(bg, { key: 1, to: t.to }, [ he(t.$slots, "default") ], 8, ["to"])); } }); var kde = /* @__PURE__ */ Ht(xde, [["__file", "teleport.vue"]]); const Cde = Xr(kde), Sde = X({ name: "ElTooltipContent", inheritAttrs: !1 }), Ede = /* @__PURE__ */ X({ ...Sde, props: Xa, setup(e, { expose: t }) { const n = e, { selector: r } = WN(), a = Zt("tooltip"), o = U(null); let i; const { controlled: s, id: l, open: u, trigger: c, onClose: d, onOpen: f, onShow: h, onHide: p, onBeforeShow: v, onBeforeHide: m } = Te(_4, void 0), g = F(() => n.transition || `${a.namespace.value}-fade-in-linear`), y = F(() => process.env.NODE_ENV === "test" ? !0 : n.persistent); kt(() => { i == null || i(); }); const x = F(() => b(y) ? !0 : b(u)), w = F(() => n.disabled ? !1 : b(u)), k = F(() => n.appendTo || r.value), C = F(() => { var P; return (P = n.style) != null ? P : {}; }), S = U(!0), _ = () => { p(), S.value = !0; }, T = () => { if (b(s)) return !0; }, O = Qs(T, () => { n.enterable && b(c) === "hover" && f(); }), $ = Qs(T, () => { b(c) === "hover" && d(); }), A = () => { var P, B; (B = (P = o.value) == null ? void 0 : P.updatePopper) == null || B.call(P), v == null || v(); }, N = () => { m == null || m(); }, L = () => { h(), i = Bre(F(() => { var P; return (P = o.value) == null ? void 0 : P.popperContentRef; }), () => { b(s) || b(c) !== "hover" && d(); }); }, R = () => { n.virtualTriggering || d(); }; return be(() => b(u), (P) => { P ? S.value = !1 : i == null || i(); }, { flush: "post" }), be(() => n.content, () => { var P, B; (B = (P = o.value) == null ? void 0 : P.updatePopper) == null || B.call(P); }), t({ contentRef: o }), (P, B) => (I(), de(b(Cde), { disabled: !P.teleported, to: b(k) }, { default: K(() => [ ue(vr, { name: b(g), onAfterLeave: _, onBeforeEnter: A, onAfterEnter: L, onBeforeLeave: N }, { default: K(() => [ b(x) ? Xe((I(), de(b(ude), Bt({ key: 0, id: b(l), ref_key: "contentRef", ref: o }, P.$attrs, { "aria-label": P.ariaLabel, "aria-hidden": S.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, b(C)], "reference-el": P.referenceEl, "trigger-target-el": P.triggerTargetEl, visible: b(w), "z-index": P.zIndex, onMouseenter: b(O), onMouseleave: b($), onBlur: R, onClose: b(d) }), { default: K(() => [ he(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"])), [ [mt, b(w)] ]) : ne("v-if", !0) ]), _: 3 }, 8, ["name"]) ]), _: 3 }, 8, ["disabled", "to"])); } }); var _de = /* @__PURE__ */ Ht(Ede, [["__file", "content.vue"]]); const Tde = X({ name: "ElTooltip" }), Ode = /* @__PURE__ */ X({ ...Tde, props: hde, emits: vde, setup(e, { expose: t, emit: n }) { const r = e; Pue(); const a = I2(), o = U(), i = U(), s = () => { var g; const y = b(o); y && ((g = y.popperInstanceRef) == null || g.update()); }, l = U(!1), u = U(), { show: c, hide: d, hasUpdateHandler: f } = fde({ indicator: l, toggleReason: u }), { onOpen: h, onClose: p } = Nue({ showAfter: It(r, "showAfter"), hideAfter: It(r, "hideAfter"), autoClose: It(r, "autoClose"), open: c, close: d }), v = F(() => xf(r.visible) && !f.value); rt(_4, { controlled: v, id: a, open: ih(l), trigger: It(r, "trigger"), onOpen: (g) => { h(g); }, onClose: (g) => { p(g); }, onToggle: (g) => { b(l) ? p(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 }), be(() => r.disabled, (g) => { g && l.value && (l.value = !1); }); const m = (g) => { var y, x; const w = (x = (y = i.value) == null ? void 0 : y.contentRef) == null ? void 0 : x.popperContentRef, k = (g == null ? void 0 : g.relatedTarget) || document.activeElement; return w && w.contains(k); }; return wg(() => l.value && d()), t({ popperRef: o, contentRef: i, isFocusInsideContent: m, updatePopper: s, onOpen: h, onClose: p, hide: d }), (g, y) => (I(), de(b(cde), { ref_key: "popperRef", ref: o, role: g.role }, { default: K(() => [ ue(bde, { disabled: g.disabled, trigger: g.trigger, "trigger-keys": g.triggerKeys, "virtual-ref": g.virtualRef, "virtual-triggering": g.virtualTriggering }, { default: K(() => [ g.$slots.default ? he(g.$slots, "default", { key: 0 }) : ne("v-if", !0) ]), _: 3 }, 8, ["disabled", "trigger", "trigger-keys", "virtual-ref", "virtual-triggering"]), ue(_de, { 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: K(() => [ he(g.$slots, "content", {}, () => [ g.rawContent ? (I(), j("span", { key: 0, innerHTML: g.content }, null, 8, ["innerHTML"])) : (I(), j("span", { key: 1 }, Fe(g.content), 1)) ]), g.showArrow ? (I(), de(b(Ice), { key: 0, "arrow-offset": g.arrowOffset }, null, 8, ["arrow-offset"])) : ne("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 $de = /* @__PURE__ */ Ht(Ode, [["__file", "tooltip.vue"]]); const L2 = Xr($de), nM = Symbol("buttonGroupContextKey"), Fde = (e, t) => { W1({ from: "type.text", replacement: "link", version: "3.0.0", scope: "props", ref: "https://element-plus.org/en-US/component/button.html#button-attributes" }, F(() => e.type === "text")); const n = Te(nM, void 0), r = Que("button"), { form: a } = Zd(), o = gd(F(() => n == null ? void 0 : n.size)), i = Ag(), s = U(), l = Cr(), u = F(() => e.type || (n == null ? void 0 : n.type) || ""), c = F(() => { var h, p, v; return (v = (p = e.autoInsertSpace) != null ? p : (h = r.value) == null ? void 0 : h.autoInsertSpace) != null ? v : !1; }), d = F(() => e.tag === "button" ? { ariaDisabled: i.value || e.loading, disabled: i.value || e.loading, autofocus: e.autofocus, type: e.nativeType } : {}), f = F(() => { var h; const p = (h = l.default) == null ? void 0 : h.call(l); if (c.value && (p == null ? void 0 : p.length) === 1) { const v = p[0]; if ((v == null ? void 0 : v.type) === Ps) { const m = v.children; return new RegExp("^\\p{Unified_Ideograph}{2}$", "u").test(m.trim()); } } return !1; }); return { _disabled: i, _size: o, _type: u, _ref: s, _props: d, shouldAddSpace: f, handleClick: (h) => { if (i.value || e.loading) { h.stopPropagation(); return; } e.nativeType === "reset" && (a == null || a.resetFields()), t("click", h); } }; }, Ade = [ "default", "primary", "success", "warning", "info", "danger", "text", "" ], Ide = ["button", "submit", "reset"], MC = Pn({ size: ch, disabled: Boolean, type: { type: String, values: Ade, default: "" }, icon: { type: Ru }, nativeType: { type: String, values: Ide, default: "button" }, loading: Boolean, loadingIcon: { type: Ru, default: () => u4 }, 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: Ot([String, Object]), default: "button" } }), Pde = { click: (e) => e instanceof MouseEvent }; function la(e, t) { Lde(e) && (e = "100%"); var n = Nde(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 Dm(e) { return Math.min(1, Math.max(0, e)); } function Lde(e) { return typeof e == "string" && e.indexOf(".") !== -1 && parseFloat(e) === 1; } function Nde(e) { return typeof e == "string" && e.indexOf("%") !== -1; } function rM(e) { return e = parseFloat(e), (isNaN(e) || e < 0 || e > 1) && (e = 1), e; } function Rm(e) { return e <= 1 ? "".concat(Number(e) * 100, "%") : e; } function Vc(e) { return e.length === 1 ? "0" + e : String(e); } function Mde(e, t, n) { return { r: la(e, 255) * 255, g: la(t, 255) * 255, b: la(n, 255) * 255 }; } function u6(e, t, n) { e = la(e, 255), t = la(t, 255), n = la(n, 255); var r = Math.max(e, t, n), a = Math.min(e, t, n), o = 0, i = 0, s = (r + a) / 2; if (r === a) i = 0, o = 0; else { var l = r - a; switch (i = s > 0.5 ? l / (2 - r - a) : l / (r + a), r) { case e: o = (t - n) / l + (t < n ? 6 : 0); break; case t: o = (n - e) / l + 2; break; case n: o = (e - t) / l + 4; break; } o /= 6; } return { h: o, s: i, l: s }; } function Vx(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 Bde(e, t, n) { var r, a, o; if (e = la(e, 360), t = la(t, 100), n = la(n, 100), t === 0) a = n, o = n, r = n; else { var i = n < 0.5 ? n * (1 + t) : n + t - n * t, s = 2 * n - i; r = Vx(s, i, e + 1 / 3), a = Vx(s, i, e), o = Vx(s, i, e - 1 / 3); } return { r: r * 255, g: a * 255, b: o * 255 }; } function c6(e, t, n) { e = la(e, 255), t = la(t, 255), n = la(n, 255); var r = Math.max(e, t, n), a = Math.min(e, t, n), o = 0, i = r, s = r - a, l = r === 0 ? 0 : s / r; if (r === a) o = 0; else { switch (r) { case e: o = (t - n) / s + (t < n ? 6 : 0); break; case t: o = (n - e) / s + 2; break; case n: o = (e - t) / s + 4; break; } o /= 6; } return { h: o, s: l, v: i }; } function Dde(e, t, n) { e = la(e, 360) * 6, t = la(t, 100), n = la(n, 100); var r = Math.floor(e), a = e - r, o = n * (1 - t), i = n * (1 - a * t), s = n * (1 - (1 - a) * t), l = r % 6, u = [n, i, o, o, s, n][l], c = [s, n, n, i, o, o][l], d = [o, o, s, n, n, i][l]; return { r: u * 255, g: c * 255, b: d * 255 }; } function d6(e, t, n, r) { var a = [ Vc(Math.round(e).toString(16)), Vc(Math.round(t).toString(16)), Vc(Math.round(n).toString(16)) ]; return r && a[0].startsWith(a[0].charAt(1)) && a[1].startsWith(a[1].charAt(1)) && a[2].startsWith(a[2].charAt(1)) ? a[0].charAt(0) + a[1].charAt(0) + a[2].charAt(0) : a.join(""); } function Rde(e, t, n, r, a) { var o = [ Vc(Math.round(e).toString(16)), Vc(Math.round(t).toString(16)), Vc(Math.round(n).toString(16)), Vc(zde(r)) ]; return a && o[0].startsWith(o[0].charAt(1)) && o[1].startsWith(o[1].charAt(1)) && o[2].startsWith(o[2].charAt(1)) && o[3].startsWith(o[3].charAt(1)) ? o[0].charAt(0) + o[1].charAt(0) + o[2].charAt(0) + o[3].charAt(0) : o.join(""); } function zde(e) { return Math.round(parseFloat(e) * 255).toString(16); } function p6(e) { return So(e) / 255; } function So(e) { return parseInt(e, 16); } function Vde(e) { return { r: e >> 16, g: (e & 65280) >> 8, b: e & 255 }; } var BC = { 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 jde(e) { var t = { r: 0, g: 0, b: 0 }, n = 1, r = null, a = null, o = null, i = !1, s = !1; return typeof e == "string" && (e = qde(e)), typeof e == "object" && (Hs(e.r) && Hs(e.g) && Hs(e.b) ? (t = Mde(e.r, e.g, e.b), i = !0, s = String(e.r).substr(-1) === "%" ? "prgb" : "rgb") : Hs(e.h) && Hs(e.s) && Hs(e.v) ? (r = Rm(e.s), a = Rm(e.v), t = Dde(e.h, r, a), i = !0, s = "hsv") : Hs(e.h) && Hs(e.s) && Hs(e.l) && (r = Rm(e.s), o = Rm(e.l), t = Bde(e.h, r, o), i = !0, s = "hsl"), Object.prototype.hasOwnProperty.call(e, "a") && (n = e.a)), n = rM(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 Hde = "[-\\+]?\\d+%?", Ude = "[-\\+]?\\d*\\.\\d+%?", Su = "(?:".concat(Ude, ")|(?:").concat(Hde, ")"), jx = "[\\s|\\(]+(".concat(Su, ")[,|\\s]+(").concat(Su, ")[,|\\s]+(").concat(Su, ")\\s*\\)?"), Hx = "[\\s|\\(]+(".concat(Su, ")[,|\\s]+(").concat(Su, ")[,|\\s]+(").concat(Su, ")[,|\\s]+(").concat(Su, ")\\s*\\)?"), ki = { CSS_UNIT: new RegExp(Su), rgb: new RegExp("rgb" + jx), rgba: new RegExp("rgba" + Hx), hsl: new RegExp("hsl" + jx), hsla: new RegExp("hsla" + Hx), hsv: new RegExp("hsv" + jx), hsva: new RegExp("hsva" + Hx), 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 qde(e) { if (e = e.trim().toLowerCase(), e.length === 0) return !1; var t = !1; if (BC[e]) e = BC[e], t = !0; else if (e === "transparent") return { r: 0, g: 0, b: 0, a: 0, format: "name" }; var n = ki.rgb.exec(e); return n ? { r: n[1], g: n[2], b: n[3] } : (n = ki.rgba.exec(e), n ? { r: n[1], g: n[2], b: n[3], a: n[4] } : (n = ki.hsl.exec(e), n ? { h: n[1], s: n[2], l: n[3] } : (n = ki.hsla.exec(e), n ? { h: n[1], s: n[2], l: n[3], a: n[4] } : (n = ki.hsv.exec(e), n ? { h: n[1], s: n[2], v: n[3] } : (n = ki.hsva.exec(e), n ? { h: n[1], s: n[2], v: n[3], a: n[4] } : (n = ki.hex8.exec(e), n ? { r: So(n[1]), g: So(n[2]), b: So(n[3]), a: p6(n[4]), format: t ? "name" : "hex8" } : (n = ki.hex6.exec(e), n ? { r: So(n[1]), g: So(n[2]), b: So(n[3]), format: t ? "name" : "hex" } : (n = ki.hex4.exec(e), n ? { r: So(n[1] + n[1]), g: So(n[2] + n[2]), b: So(n[3] + n[3]), a: p6(n[4] + n[4]), format: t ? "name" : "hex8" } : (n = ki.hex3.exec(e), n ? { r: So(n[1] + n[1]), g: So(n[2] + n[2]), b: So(n[3] + n[3]), format: t ? "name" : "hex" } : !1))))))))); } function Hs(e) { return !!ki.CSS_UNIT.exec(String(e)); } var Wde = ( /** @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 = Vde(t)), this.originalInput = t; var a = jde(t); this.originalInput = t, this.r = a.r, this.g = a.g, this.b = a.b, this.a = a.a, this.roundA = Math.round(100 * this.a) / 100, this.format = (r = n.format) !== null && r !== void 0 ? r : a.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 = a.ok; } return e.prototype.isDark = function() { return this.getBrightness() < 128; }, e.prototype.isLight = function() { return !this.isDark(); }, e.prototype.getBrightness = function() { var t = this.toRgb(); return (t.r * 299 + t.g * 587 + t.b * 114) / 1e3; }, e.prototype.getLuminance = function() { var t = this.toRgb(), n, r, a, o = t.r / 255, i = t.g / 255, s = t.b / 255; return o <= 0.03928 ? n = o / 12.92 : n = Math.pow((o + 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 ? a = s / 12.92 : a = Math.pow((s + 0.055) / 1.055, 2.4), 0.2126 * n + 0.7152 * r + 0.0722 * a; }, e.prototype.getAlpha = function() { return this.a; }, e.prototype.setAlpha = function(t) { return this.a = rM(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 = c6(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 = c6(this.r, this.g, this.b), n = Math.round(t.h * 360), r = Math.round(t.s * 100), a = Math.round(t.v * 100); return this.a === 1 ? "hsv(".concat(n, ", ").concat(r, "%, ").concat(a, "%)") : "hsva(".concat(n, ", ").concat(r, "%, ").concat(a, "%, ").concat(this.roundA, ")"); }, e.prototype.toHsl = function() { var t = u6(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 = u6(this.r, this.g, this.b), n = Math.round(t.h * 360), r = Math.round(t.s * 100), a = Math.round(t.l * 100); return this.a === 1 ? "hsl(".concat(n, ", ").concat(r, "%, ").concat(a, "%)") : "hsla(".concat(n, ", ").concat(r, "%, ").concat(a, "%, ").concat(this.roundA, ")"); }, e.prototype.toHex = function(t) { return t === void 0 && (t = !1), d6(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), Rde(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(la(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(la(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 = "#" + d6(this.r, this.g, this.b, !1), n = 0, r = Object.entries(BC); n < r.length; n++) { var a = r[n], o = a[0], i = a[1]; if (t === i) return o; } return !1; }, e.prototype.toString = function(t) { var n = !!t; t = t ?? this.format; var r = !1, a = this.a < 1 && this.a >= 0, o = !n && a && (t.startsWith("hex") || t === "name"); return o ? 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 = Dm(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 = Dm(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 = Dm(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 = Dm(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(), a = new e(t).toRgb(), o = n / 100, i = { r: (a.r - r.r) * o + r.r, g: (a.g - r.g) * o + r.g, b: (a.b - r.b) * o + r.b, a: (a.a - r.a) * o + 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(), a = 360 / n, o = [this]; for (r.h = (r.h - (a * t >> 1) + 720) % 360; --t; ) r.h = (r.h + a) % 360, o.push(new e(r)); return o; }, 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, a = n.s, o = n.v, i = [], s = 1 / t; t--; ) i.push(new e({ h: r, s: a, v: o })), o = (o + 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(), a = n.a + r.a * (1 - n.a); return new e({ r: (n.r * n.a + r.r * r.a * (1 - n.a)) / a, g: (n.g * n.a + r.g * r.a * (1 - n.a)) / a, b: (n.b * n.a + r.b * r.a * (1 - n.a)) / a, a }); }, e.prototype.triad = function() { return this.polyad(3); }, e.prototype.tetrad = function() { return this.polyad(4); }, e.prototype.polyad = function(t) { for (var n = this.toHsl(), r = n.h, a = [this], o = 360 / t, i = 1; i < t; i++) a.push(new e({ h: (r + i * o) % 360, s: n.s, l: n.l })); return a; }, e.prototype.equals = function(t) { return this.toRgbString() === new e(t).toRgbString(); }, e; }() ); function ql(e, t = 20) { return e.mix("#141414", t).toString(); } function Kde(e) { const t = Ag(), n = Zt("button"); return F(() => { let r = {}, a = e.color; if (a) { const o = a.match(/var\((.*?)\)/); o && (a = window.getComputedStyle(window.document.documentElement).getPropertyValue(o[1])); const i = new Wde(a), s = e.dark ? i.tint(20).toString() : ql(i, 20); if (e.plain) r = n.cssVarBlock({ "bg-color": e.dark ? ql(i, 90) : i.tint(90).toString(), "text-color": a, "border-color": e.dark ? ql(i, 50) : i.tint(50).toString(), "hover-text-color": `var(${n.cssVarName("color-white")})`, "hover-bg-color": a, "hover-border-color": a, "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 ? ql(i, 90) : i.tint(90).toString(), r[n.cssVarBlockName("disabled-text-color")] = e.dark ? ql(i, 50) : i.tint(50).toString(), r[n.cssVarBlockName("disabled-border-color")] = e.dark ? ql(i, 80) : i.tint(80).toString()); else { const l = e.dark ? ql(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": a, "text-color": u, "border-color": a, "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 ? ql(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 Gde = X({ name: "ElButton" }), Xde = /* @__PURE__ */ X({ ...Gde, props: MC, emits: Pde, setup(e, { expose: t, emit: n }) { const r = e, a = Kde(r), o = Zt("button"), { _ref: i, _size: s, _type: l, _disabled: u, _props: c, shouldAddSpace: d, handleClick: f } = Fde(r, n), h = F(() => [ o.b(), o.m(l.value), o.m(s.value), o.is("disabled", u.value), o.is("loading", r.loading), o.is("plain", r.plain), o.is("round", r.round), o.is("circle", r.circle), o.is("text", r.text), o.is("link", r.link), o.is("has-bg", r.bg) ]); return t({ ref: i, size: s, type: l, disabled: u, shouldAddSpace: d }), (p, v) => (I(), de(ct(p.tag), Bt({ ref_key: "_ref", ref: i }, b(c), { class: b(h), style: b(a), onClick: b(f) }), { default: K(() => [ p.loading ? (I(), j(Qe, { key: 0 }, [ p.$slots.loading ? he(p.$slots, "loading", { key: 0 }) : (I(), de(b(eo), { key: 1, class: H(b(o).is("loading")) }, { default: K(() => [ (I(), de(ct(p.loadingIcon))) ]), _: 1 }, 8, ["class"])) ], 64)) : p.icon || p.$slots.icon ? (I(), de(b(eo), { key: 1 }, { default: K(() => [ p.icon ? (I(), de(ct(p.icon), { key: 0 })) : he(p.$slots, "icon", { key: 1 }) ]), _: 3 })) : ne("v-if", !0), p.$slots.default ? (I(), j("span", { key: 2, class: H({ [b(o).em("text", "expand")]: b(d) }) }, [ he(p.$slots, "default") ], 2)) : ne("v-if", !0) ]), _: 3 }, 16, ["class", "style", "onClick"])); } }); var Yde = /* @__PURE__ */ Ht(Xde, [["__file", "button.vue"]]); const Zde = { size: MC.size, type: MC.type }, Qde = X({ name: "ElButtonGroup" }), Jde = /* @__PURE__ */ X({ ...Qde, props: Zde, setup(e) { const t = e; rt(nM, tn({ size: It(t, "size"), type: It(t, "type") })); const n = Zt("button"); return (r, a) => (I(), j("div", { class: H(b(n).b("group")) }, [ he(r.$slots, "default") ], 2)); } }); var aM = /* @__PURE__ */ Ht(Jde, [["__file", "button-group.vue"]]); const Wy = Xr(Yde, { ButtonGroup: aM }); Al(aM); const au = /* @__PURE__ */ new Map(); if (Gr) { let e; document.addEventListener("mousedown", (t) => e = t), document.addEventListener("mouseup", (t) => { if (e) { for (const n of au.values()) for (const { documentHandler: r } of n) r(t, e); e = void 0; } }); } function f6(e, t) { let n = []; return Array.isArray(t.arg) ? n = t.arg : Jc(t.arg) && n.push(t.arg), function(r, a) { const o = t.instance.popperRef, i = r.target, s = a == null ? void 0 : a.target, l = !t || !t.instance, u = !i || !s, c = e.contains(i) || e.contains(s), d = e === i, f = n.length && n.some((p) => p == null ? void 0 : p.contains(i)) || n.length && n.includes(s), h = o && (o.contains(i) || o.contains(s)); l || u || c || d || f || h || t.value(r, a); }; } const oM = { beforeMount(e, t) { au.has(e) || au.set(e, []), au.get(e).push({ documentHandler: f6(e, t), bindingFn: t.value }); }, updated(e, t) { au.has(e) || au.set(e, []); const n = au.get(e), r = n.findIndex((o) => o.bindingFn === t.oldValue), a = { documentHandler: f6(e, t), bindingFn: t.value }; r >= 0 ? n.splice(r, 1, a) : n.push(a); }, unmounted(e) { au.delete(e); } }, epe = Pn({ header: { type: String, default: "" }, footer: { type: String, default: "" }, bodyStyle: { type: Ot([String, Object, Array]), default: "" }, bodyClass: String, shadow: { type: String, values: ["always", "hover", "never"], default: "always" } }), tpe = X({ name: "ElCard" }), npe = /* @__PURE__ */ X({ ...tpe, props: epe, setup(e) { const t = Zt("card"); return (n, r) => (I(), j("div", { class: H([b(t).b(), b(t).is(`${n.shadow}-shadow`)]) }, [ n.$slots.header || n.header ? (I(), j("div", { key: 0, class: H(b(t).e("header")) }, [ he(n.$slots, "header", {}, () => [ et(Fe(n.header), 1) ]) ], 2)) : ne("v-if", !0), W("div", { class: H([b(t).e("body"), n.bodyClass]), style: Ye(n.bodyStyle) }, [ he(n.$slots, "default") ], 6), n.$slots.footer || n.footer ? (I(), j("div", { key: 1, class: H(b(t).e("footer")) }, [ he(n.$slots, "footer", {}, () => [ et(Fe(n.footer), 1) ]) ], 2)) : ne("v-if", !0) ], 2)); } }); var rpe = /* @__PURE__ */ Ht(npe, [["__file", "card.vue"]]); Xr(rpe); const iM = { 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: ch, tabindex: [String, Number], validateEvent: { type: Boolean, default: !0 }, ...ic(["ariaControls"]) }, sM = { [Jr]: (e) => oo(e) || ra(e) || xf(e), change: (e) => oo(e) || ra(e) || xf(e) }, dh = Symbol("checkboxGroupContextKey"), ape = ({ model: e, isChecked: t }) => { const n = Te(dh, void 0), r = F(() => { var a, o; const i = (a = n == null ? void 0 : n.max) == null ? void 0 : a.value, s = (o = n == null ? void 0 : n.min) == null ? void 0 : o.value; return !Cu(i) && e.value.length >= i && !t.value || !Cu(s) && e.value.length <= s && t.value; }); return { isDisabled: Ag(F(() => (n == null ? void 0 : n.disabled.value) || r.value)), isLimitDisabled: r }; }, ope = (e, { model: t, isLimitExceeded: n, hasOwnLabel: r, isDisabled: a, isLabeledByFormItem: o }) => { const i = Te(dh, void 0), { formItem: s } = Zd(), { emit: l } = tt(); function u(p) { var v, m, g, y; return [!0, e.trueValue, e.trueLabel].includes(p) ? (m = (v = e.trueValue) != null ? v : e.trueLabel) != null ? m : !0 : (y = (g = e.falseValue) != null ? g : e.falseLabel) != null ? y : !1; } function c(p, v) { l("change", u(p), v); } function d(p) { if (n.value) return; const v = p.target; l("change", u(v.checked), p); } async function f(p) { n.value || !r.value && !a.value && o.value && (p.composedPath().some((v) => v.tagName === "LABEL") || (t.value = u([!1, e.falseValue, e.falseLabel].includes(t.value)), await Ue(), c(t.value, p))); } const h = F(() => (i == null ? void 0 : i.validateEvent) || e.validateEvent); return be(() => e.modelValue, () => { h.value && (s == null || s.validate("change").catch((p) => Br(p))); }), { handleChange: d, onClickRoot: f }; }, ipe = (e) => { const t = U(!1), { emit: n } = tt(), r = Te(dh, void 0), a = F(() => Cu(r) === !1), o = U(!1), i = F({ get() { var s, l; return a.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; a.value && to(s) ? (o.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, o.value === !1 && ((u = r == null ? void 0 : r.changeEvent) == null || u.call(r, s))) : (n(Jr, s), t.value = s); } }); return { model: i, isGroup: a, isLimitExceeded: o }; }, spe = (e, t, { model: n }) => { const r = Te(dh, void 0), a = U(!1), o = F(() => Uy(e.value) ? e.label : e.value), i = F(() => { const c = n.value; return xf(c) ? c : to(c) ? ja(o.value) ? c.map(bo).some((d) => Hy(d, o.value)) : c.map(bo).includes(o.value) : c != null ? c === e.trueValue || c === e.trueLabel : !!c; }), s = gd(F(() => { var c; return (c = r == null ? void 0 : r.size) == null ? void 0 : c.value; }), { prop: !0 }), l = gd(F(() => { var c; return (c = r == null ? void 0 : r.size) == null ? void 0 : c.value; })), u = F(() => !!t.default || !Uy(o.value)); return { checkboxButtonSize: s, isChecked: i, isFocused: a, checkboxSize: l, hasOwnLabel: u, actualValue: o }; }, lM = (e, t) => { const { formItem: n } = Zd(), { model: r, isGroup: a, isLimitExceeded: o } = ipe(e), { isFocused: i, isChecked: s, checkboxButtonSize: l, checkboxSize: u, hasOwnLabel: c, actualValue: d } = spe(e, t, { model: r }), { isDisabled: f } = ape({ model: r, isChecked: s }), { inputId: h, isLabeledByFormItem: p } = Ig(e, { formItemContext: n, disableIdGeneration: c, disableIdManagement: a }), { handleChange: v, onClickRoot: m } = ope(e, { model: r, isLimitExceeded: o, hasOwnLabel: c, isDisabled: f, isLabeledByFormItem: p }); return (() => { function g() { var y, x; to(r.value) && !r.value.includes(d.value) ? r.value.push(d.value) : r.value = (x = (y = e.trueValue) != null ? y : e.trueLabel) != null ? x : !0; } e.checked && g(); })(), W1({ from: "label act as value", replacement: "value", version: "3.0.0", scope: "el-checkbox", ref: "https://element-plus.org/en-US/component/checkbox.html" }, F(() => a.value && Uy(e.value))), W1({ from: "true-label", replacement: "true-value", version: "3.0.0", scope: "el-checkbox", ref: "https://element-plus.org/en-US/component/checkbox.html" }, F(() => !!e.trueLabel)), W1({ from: "false-label", replacement: "false-value", version: "3.0.0", scope: "el-checkbox", ref: "https://element-plus.org/en-US/component/checkbox.html" }, F(() => !!e.falseLabel)), { inputId: h, isLabeledByFormItem: p, isChecked: s, isDisabled: f, isFocused: i, checkboxButtonSize: l, checkboxSize: u, hasOwnLabel: c, model: r, actualValue: d, handleChange: v, onClickRoot: m }; }, lpe = X({ name: "ElCheckbox" }), upe = /* @__PURE__ */ X({ ...lpe, props: iM, emits: sM, setup(e) { const t = e, n = Cr(), { inputId: r, isLabeledByFormItem: a, isChecked: o, isDisabled: i, isFocused: s, checkboxSize: l, hasOwnLabel: u, model: c, actualValue: d, handleChange: f, onClickRoot: h } = lM(t, n), p = Zt("checkbox"), v = F(() => [ p.b(), p.m(l.value), p.is("disabled", i.value), p.is("bordered", t.border), p.is("checked", o.value) ]), m = F(() => [ p.e("input"), p.is("disabled", i.value), p.is("checked", o.value), p.is("indeterminate", t.indeterminate), p.is("focus", s.value) ]); return (g, y) => (I(), de(ct(!b(u) && b(a) ? "span" : "label"), { class: H(b(v)), "aria-controls": g.indeterminate ? g.ariaControls : null, onClick: b(h) }, { default: K(() => { var x, w, k, C; return [ W("span", { class: H(b(m)) }, [ g.trueValue || g.falseValue || g.trueLabel || g.falseLabel ? Xe((I(), j("input", { key: 0, id: b(r), "onUpdate:modelValue": (S) => ar(c) ? c.value = S : null, class: H(b(p).e("original")), type: "checkbox", indeterminate: g.indeterminate, name: g.name, tabindex: g.tabindex, disabled: b(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: b(f), onFocus: (S) => s.value = !0, onBlur: (S) => s.value = !1, onClick: Je(() => { }, ["stop"]) }, null, 42, ["id", "onUpdate:modelValue", "indeterminate", "name", "tabindex", "disabled", "true-value", "false-value", "onChange", "onFocus", "onBlur", "onClick"])), [ [ti, b(c)] ]) : Xe((I(), j("input", { key: 1, id: b(r), "onUpdate:modelValue": (S) => ar(c) ? c.value = S : null, class: H(b(p).e("original")), type: "checkbox", indeterminate: g.indeterminate, disabled: b(i), value: b(d), name: g.name, tabindex: g.tabindex, onChange: b(f), onFocus: (S) => s.value = !0, onBlur: (S) => s.value = !1, onClick: Je(() => { }, ["stop"]) }, null, 42, ["id", "onUpdate:modelValue", "indeterminate", "disabled", "value", "name", "tabindex", "onChange", "onFocus", "onBlur", "onClick"])), [ [ti, b(c)] ]), W("span", { class: H(b(p).e("inner")) }, null, 2) ], 2), b(u) ? (I(), j("span", { key: 0, class: H(b(p).e("label")) }, [ he(g.$slots, "default"), g.$slots.default ? ne("v-if", !0) : (I(), j(Qe, { key: 0 }, [ et(Fe(g.label), 1) ], 64)) ], 2)) : ne("v-if", !0) ]; }), _: 3 }, 8, ["class", "aria-controls", "onClick"])); } }); var cpe = /* @__PURE__ */ Ht(upe, [["__file", "checkbox.vue"]]); const dpe = X({ name: "ElCheckboxButton" }), ppe = /* @__PURE__ */ X({ ...dpe, props: iM, emits: sM, setup(e) { const t = e, n = Cr(), { isFocused: r, isChecked: a, isDisabled: o, checkboxButtonSize: i, model: s, actualValue: l, handleChange: u } = lM(t, n), c = Te(dh, void 0), d = Zt("checkbox"), f = F(() => { var p, v, m, g; const y = (v = (p = c == null ? void 0 : c.fill) == null ? void 0 : p.value) != null ? v : ""; return { backgroundColor: y, borderColor: y, color: (g = (m = c == null ? void 0 : c.textColor) == null ? void 0 : m.value) != null ? g : "", boxShadow: y ? `-1px 0 0 0 ${y}` : void 0 }; }), h = F(() => [ d.b("button"), d.bm("button", i.value), d.is("disabled", o.value), d.is("checked", a.value), d.is("focus", r.value) ]); return (p, v) => { var m, g, y, x; return I(), j("label", { class: H(b(h)) }, [ p.trueValue || p.falseValue || p.trueLabel || p.falseLabel ? Xe((I(), j("input", { key: 0, "onUpdate:modelValue": (w) => ar(s) ? s.value = w : null, class: H(b(d).be("button", "original")), type: "checkbox", name: p.name, tabindex: p.tabindex, disabled: b(o), "true-value": (g = (m = p.trueValue) != null ? m : p.trueLabel) != null ? g : !0, "false-value": (x = (y = p.falseValue) != null ? y : p.falseLabel) != null ? x : !1, onChange: b(u), onFocus: (w) => r.value = !0, onBlur: (w) => r.value = !1, onClick: Je(() => { }, ["stop"]) }, null, 42, ["onUpdate:modelValue", "name", "tabindex", "disabled", "true-value", "false-value", "onChange", "onFocus", "onBlur", "onClick"])), [ [ti, b(s)] ]) : Xe((I(), j("input", { key: 1, "onUpdate:modelValue": (w) => ar(s) ? s.value = w : null, class: H(b(d).be("button", "original")), type: "checkbox", name: p.name, tabindex: p.tabindex, disabled: b(o), value: b(l), onChange: b(u), onFocus: (w) => r.value = !0, onBlur: (w) => r.value = !1, onClick: Je(() => { }, ["stop"]) }, null, 42, ["onUpdate:modelValue", "name", "tabindex", "disabled", "value", "onChange", "onFocus", "onBlur", "onClick"])), [ [ti, b(s)] ]), p.$slots.default || p.label ? (I(), j("span", { key: 2, class: H(b(d).be("button", "inner")), style: Ye(b(a) ? b(f) : void 0) }, [ he(p.$slots, "default", {}, () => [ et(Fe(p.label), 1) ]) ], 6)) : ne("v-if", !0) ], 2); }; } }); var uM = /* @__PURE__ */ Ht(ppe, [["__file", "checkbox-button.vue"]]); const fpe = Pn({ modelValue: { type: Ot(Array), default: () => [] }, disabled: Boolean, min: Number, max: Number, size: ch, fill: String, textColor: String, tag: { type: String, default: "div" }, validateEvent: { type: Boolean, default: !0 }, ...ic(["ariaLabel"]) }), hpe = { [Jr]: (e) => to(e), change: (e) => to(e) }, vpe = X({ name: "ElCheckboxGroup" }), gpe = /* @__PURE__ */ X({ ...vpe, props: fpe, emits: hpe, setup(e, { emit: t }) { const n = e, r = Zt("checkbox"), { formItem: a } = Zd(), { inputId: o, isLabeledByFormItem: i } = Ig(n, { formItemContext: a }), s = async (u) => { t(Jr, u), await Ue(), t("change", u); }, l = F({ get() { return n.modelValue; }, set(u) { s(u); } }); return rt(dh, { ..._N(Sr(n), [ "size", "min", "max", "disabled", "validateEvent", "fill", "textColor" ]), modelValue: l, changeEvent: s }), be(() => n.modelValue, () => { n.validateEvent && (a == null || a.validate("change").catch((u) => Br(u))); }), (u, c) => { var d; return I(), de(ct(u.tag), { id: b(o), class: H(b(r).b("group")), role: "group", "aria-label": b(i) ? void 0 : u.ariaLabel || "checkbox-group", "aria-labelledby": b(i) ? (d = b(a)) == null ? void 0 : d.labelId : void 0 }, { default: K(() => [ he(u.$slots, "default") ]), _: 3 }, 8, ["id", "class", "aria-label", "aria-labelledby"]); }; } }); var cM = /* @__PURE__ */ Ht(gpe, [["__file", "checkbox-group.vue"]]); const mpe = Xr(cpe, { CheckboxButton: uM, CheckboxGroup: cM }); Al(uM); Al(cM); const DC = Pn({ type: { type: String, values: ["primary", "success", "info", "warning", "danger"], default: "primary" }, closable: Boolean, disableTransitions: Boolean, hit: Boolean, color: String, size: { type: String, values: IN }, effect: { type: String, values: ["dark", "light", "plain"], default: "light" }, round: Boolean }), ype = { close: (e) => e instanceof MouseEvent, click: (e) => e instanceof MouseEvent }, bpe = X({ name: "ElTag" }), wpe = /* @__PURE__ */ X({ ...bpe, props: DC, emits: ype, setup(e, { emit: t }) { const n = e, r = gd(), a = Zt("tag"), o = F(() => { const { type: u, hit: c, effect: d, closable: f, round: h } = n; return [ a.b(), a.is("closable", f), a.m(u || "primary"), a.m(r.value), a.m(d), a.is("hit", c), a.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 ? (I(), j("span", { key: 0, class: H(b(o)), style: Ye({ backgroundColor: u.color }), onClick: s }, [ W("span", { class: H(b(a).e("content")) }, [ he(u.$slots, "default") ], 2), u.closable ? (I(), de(b(eo), { key: 0, class: H(b(a).e("close")), onClick: Je(i, ["stop"]) }, { default: K(() => [ ue(b(IC)) ]), _: 1 }, 8, ["class", "onClick"])) : ne("v-if", !0) ], 6)) : (I(), de(vr, { key: 1, name: `${b(a).namespace.value}-zoom-in-center`, appear: "", onVnodeMounted: l }, { default: K(() => [ W("span", { class: H(b(o)), style: Ye({ backgroundColor: u.color }), onClick: s }, [ W("span", { class: H(b(a).e("content")) }, [ he(u.$slots, "default") ], 2), u.closable ? (I(), de(b(eo), { key: 0, class: H(b(a).e("close")), onClick: Je(i, ["stop"]) }, { default: K(() => [ ue(b(IC)) ]), _: 1 }, 8, ["class", "onClick"])) : ne("v-if", !0) ], 6) ]), _: 3 }, 8, ["name"])); } }); var xpe = /* @__PURE__ */ Ht(wpe, [["__file", "tag.vue"]]); const kpe = Xr(xpe), dM = Symbol("rowContextKey"), Cpe = [ "start", "center", "end", "space-around", "space-between", "space-evenly" ], Spe = ["top", "middle", "bottom"], Epe = Pn({ tag: { type: String, default: "div" }, gutter: { type: Number, default: 0 }, justify: { type: String, values: Cpe, default: "start" }, align: { type: String, values: Spe } }), _pe = X({ name: "ElRow" }), Tpe = /* @__PURE__ */ X({ ..._pe, props: Epe, setup(e) { const t = e, n = Zt("row"), r = F(() => t.gutter); rt(dM, { gutter: r }); const a = F(() => { const i = {}; return t.gutter && (i.marginRight = i.marginLeft = `-${t.gutter / 2}px`), i; }), o = F(() => [ n.b(), n.is(`justify-${t.justify}`, t.justify !== "start"), n.is(`align-${t.align}`, !!t.align) ]); return (i, s) => (I(), de(ct(i.tag), { class: H(b(o)), style: Ye(b(a)) }, { default: K(() => [ he(i.$slots, "default") ]), _: 3 }, 8, ["class", "style"])); } }); var Ope = /* @__PURE__ */ Ht(Tpe, [["__file", "row.vue"]]); Xr(Ope); const $pe = Pn({ 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: Ot([Number, Object]), default: () => zp({}) }, sm: { type: Ot([Number, Object]), default: () => zp({}) }, md: { type: Ot([Number, Object]), default: () => zp({}) }, lg: { type: Ot([Number, Object]), default: () => zp({}) }, xl: { type: Ot([Number, Object]), default: () => zp({}) } }), Fpe = X({ name: "ElCol" }), Ape = /* @__PURE__ */ X({ ...Fpe, props: $pe, setup(e) { const t = e, { gutter: n } = Te(dM, { gutter: F(() => 0) }), r = Zt("col"), a = F(() => { const i = {}; return n.value && (i.paddingLeft = i.paddingRight = `${n.value / 2}px`), i; }), o = F(() => { const i = []; return ["span", "offset", "pull", "push"].forEach((s) => { const l = t[s]; ra(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) => { ra(t[s]) ? i.push(r.b(`${s}-${t[s]}`)) : ja(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) => (I(), de(ct(i.tag), { class: H(b(o)), style: Ye(b(a)) }, { default: K(() => [ he(i.$slots, "default") ]), _: 3 }, 8, ["class", "style"])); } }); var Ipe = /* @__PURE__ */ Ht(Ape, [["__file", "col.vue"]]); Xr(Ipe); const Ppe = X({ name: "ElCollapseTransition" }), Lpe = /* @__PURE__ */ X({ ...Ppe, setup(e) { const t = Zt("collapse-transition"), n = (a) => { a.style.maxHeight = "", a.style.overflow = a.dataset.oldOverflow, a.style.paddingTop = a.dataset.oldPaddingTop, a.style.paddingBottom = a.dataset.oldPaddingBottom; }, r = { beforeEnter(a) { a.dataset || (a.dataset = {}), a.dataset.oldPaddingTop = a.style.paddingTop, a.dataset.oldPaddingBottom = a.style.paddingBottom, a.style.height && (a.dataset.elExistsHeight = a.style.height), a.style.maxHeight = 0, a.style.paddingTop = 0, a.style.paddingBottom = 0; }, enter(a) { requestAnimationFrame(() => { a.dataset.oldOverflow = a.style.overflow, a.dataset.elExistsHeight ? a.style.maxHeight = a.dataset.elExistsHeight : a.scrollHeight !== 0 ? a.style.maxHeight = `${a.scrollHeight}px` : a.style.maxHeight = 0, a.style.paddingTop = a.dataset.oldPaddingTop, a.style.paddingBottom = a.dataset.oldPaddingBottom, a.style.overflow = "hidden"; }); }, afterEnter(a) { a.style.maxHeight = "", a.style.overflow = a.dataset.oldOverflow; }, enterCancelled(a) { n(a); }, beforeLeave(a) { a.dataset || (a.dataset = {}), a.dataset.oldPaddingTop = a.style.paddingTop, a.dataset.oldPaddingBottom = a.style.paddingBottom, a.dataset.oldOverflow = a.style.overflow, a.style.maxHeight = `${a.scrollHeight}px`, a.style.overflow = "hidden"; }, leave(a) { a.scrollHeight !== 0 && (a.style.maxHeight = 0, a.style.paddingTop = 0, a.style.paddingBottom = 0); }, afterLeave(a) { n(a); }, leaveCancelled(a) { n(a); } }; return (a, o) => (I(), de(vr, Bt({ name: b(t).b() }, LP(r)), { default: K(() => [ he(a.$slots, "default") ]), _: 3 }, 16, ["name"])); } }); var Npe = /* @__PURE__ */ Ht(Lpe, [["__file", "collapse-transition.vue"]]); const Mpe = Xr(Npe), Bpe = Pn({ color: { type: Ot(Object), required: !0 }, vertical: { type: Boolean, default: !1 } }); let Ux = !1; function x0(e, t) { if (!Gr) return; const n = function(o) { var i; (i = t.drag) == null || i.call(t, o); }, r = function(o) { var i; document.removeEventListener("mousemove", n), document.removeEventListener("mouseup", r), document.removeEventListener("touchmove", n), document.removeEventListener("touchend", r), document.onselectstart = null, document.ondragstart = null, Ux = !1, (i = t.end) == null || i.call(t, o); }, a = function(o) { var i; Ux || (o.preventDefault(), document.onselectstart = () => !1, document.ondragstart = () => !1, document.addEventListener("mousemove", n), document.addEventListener("mouseup", r), document.addEventListener("touchmove", n), document.addEventListener("touchend", r), Ux = !0, (i = t.start) == null || i.call(t, o)); }; e.addEventListener("mousedown", a), e.addEventListener("touchstart", a, { passive: !1 }); } const Dpe = (e) => { const t = tt(), { t: n } = $2(), r = dn(), a = dn(), o = F(() => e.color.get("alpha")), i = F(() => n("el.colorpicker.alphaLabel")); function s(d) { var f; d.target !== r.value && l(d), (f = r.value) == null || f.focus(); } function l(d) { if (!a.value || !r.value) return; const f = t.vnode.el.getBoundingClientRect(), { clientX: h, clientY: p } = e4(d); if (e.vertical) { let v = p - f.top; v = Math.max(r.value.offsetHeight / 2, v), v = Math.min(v, f.height - r.value.offsetHeight / 2), e.color.set("alpha", Math.round((v - r.value.offsetHeight / 2) / (f.height - r.value.offsetHeight) * 100)); } else { let v = h - f.left; v = Math.max(r.value.offsetWidth / 2, v), v = Math.min(v, f.width - r.value.offsetWidth / 2), e.color.set("alpha", Math.round((v - r.value.offsetWidth / 2) / (f.width - r.value.offsetWidth) * 100)); } } function u(d) { const { code: f, shiftKey: h } = d, p = h ? 10 : 1; switch (f) { case Fr.left: case Fr.down: d.preventDefault(), d.stopPropagation(), c(-p); break; case Fr.right: case Fr.up: d.preventDefault(), d.stopPropagation(), c(p); break; } } function c(d) { let f = o.value + d; f = f < 0 ? 0 : f > 100 ? 100 : f, e.color.set("alpha", f); } return { thumb: r, bar: a, alpha: o, alphaLabel: i, handleDrag: l, handleClick: s, handleKeydown: u }; }, Rpe = (e, { bar: t, thumb: n, handleDrag: r }) => { const a = tt(), o = Zt("color-alpha-slider"), i = U(0), s = U(0), l = U(); function u() { if (!n.value || e.vertical) return 0; const y = a.vnode.el, x = e.color.get("alpha"); return y ? Math.round(x * (y.offsetWidth - n.value.offsetWidth / 2) / 100) : 0; } function c() { if (!n.value) return 0; const y = a.vnode.el; if (!e.vertical) return 0; const x = e.color.get("alpha"); return y ? Math.round(x * (y.offsetHeight - n.value.offsetHeight / 2) / 100) : 0; } function d() { if (e.color && e.color.value) { const { r: y, g: x, b: w } = e.color.toRgb(); return `linear-gradient(to right, rgba(${y}, ${x}, ${w}, 0) 0%, rgba(${y}, ${x}, ${w}, 1) 100%)`; } return ""; } function f() { i.value = u(), s.value = c(), l.value = d(); } nt(() => { if (!t.value || !n.value) return; const y = { drag: (x) => { r(x); }, end: (x) => { r(x); } }; x0(t.value, y), x0(n.value, y), f(); }), be(() => e.color.get("alpha"), () => f()), be(() => e.color.value, () => f()); const h = F(() => [o.b(), o.is("vertical", e.vertical)]), p = F(() => o.e("bar")), v = F(() => o.e("thumb")), m = F(() => ({ background: l.value })), g = F(() => ({ left: kf(i.value), top: kf(s.value) })); return { rootKls: h, barKls: p, barStyle: m, thumbKls: v, thumbStyle: g, update: f }; }, zpe = "ElColorAlphaSlider", Vpe = X({ name: zpe }), jpe = /* @__PURE__ */ X({ ...Vpe, props: Bpe, setup(e, { expose: t }) { const n = e, { alpha: r, alphaLabel: a, bar: o, thumb: i, handleDrag: s, handleClick: l, handleKeydown: u } = Dpe(n), { rootKls: c, barKls: d, barStyle: f, thumbKls: h, thumbStyle: p, update: v } = Rpe(n, { bar: o, thumb: i, handleDrag: s }); return t({ update: v, bar: o, thumb: i }), (m, g) => (I(), j("div", { class: H(b(c)) }, [ W("div", { ref_key: "bar", ref: o, class: H(b(d)), style: Ye(b(f)), onClick: b(l) }, null, 14, ["onClick"]), W("div", { ref_key: "thumb", ref: i, class: H(b(h)), style: Ye(b(p)), "aria-label": b(a), "aria-valuenow": b(r), "aria-orientation": m.vertical ? "vertical" : "horizontal", "aria-valuemin": "0", "aria-valuemax": "100", role: "slider", tabindex: "0", onKeydown: b(u) }, null, 46, ["aria-label", "aria-valuenow", "aria-orientation", "onKeydown"]) ], 2)); } }); var Hpe = /* @__PURE__ */ Ht(jpe, [["__file", "alpha-slider.vue"]]); const Upe = X({ name: "ElColorHueSlider", props: { color: { type: Object, required: !0 }, vertical: Boolean }, setup(e) { const t = Zt("color-hue-slider"), n = tt(), r = U(), a = U(), o = U(0), i = U(0), s = F(() => e.color.get("hue")); be(() => s.value, () => { f(); }); function l(h) { h.target !== r.value && u(h); } function u(h) { if (!a.value || !r.value) return; const p = n.vnode.el.getBoundingClientRect(), { clientX: v, clientY: m } = e4(h); let g; if (e.vertical) { let y = m - p.top; y = Math.min(y, p.height - r.value.offsetHeight / 2), y = Math.max(r.value.offsetHeight / 2, y), g = Math.round((y - r.value.offsetHeight / 2) / (p.height - r.value.offsetHeight) * 360); } else { let y = v - p.left; y = Math.min(y, p.width - r.value.offsetWidth / 2), y = Math.max(r.value.offsetWidth / 2, y), g = Math.round((y - r.value.offsetWidth / 2) / (p.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 p = e.color.get("hue"); return h ? Math.round(p * (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 p = e.color.get("hue"); return h ? Math.round(p * (h.offsetHeight - r.value.offsetHeight / 2) / 360) : 0; } function f() { o.value = c(), i.value = d(); } return nt(() => { if (!a.value || !r.value) return; const h = { drag: (p) => { u(p); }, end: (p) => { u(p); } }; x0(a.value, h), x0(r.value, h), f(); }), { bar: a, thumb: r, thumbLeft: o, thumbTop: i, hueValue: s, handleClick: l, update: f, ns: t }; } }); function qpe(e, t, n, r, a, o) { return I(), j("div", { class: H([e.ns.b(), e.ns.is("vertical", e.vertical)]) }, [ W("div", { ref: "bar", class: H(e.ns.e("bar")), onClick: e.handleClick }, null, 10, ["onClick"]), W("div", { ref: "thumb", class: H(e.ns.e("thumb")), style: Ye({ left: e.thumbLeft + "px", top: e.thumbTop + "px" }) }, null, 6) ], 2); } var Wpe = /* @__PURE__ */ Ht(Upe, [["render", qpe], ["__file", "hue-slider.vue"]]); const Kpe = Pn({ modelValue: String, id: String, showAlpha: Boolean, colorFormat: String, disabled: Boolean, size: ch, popperClass: { type: String, default: "" }, tabindex: { type: [String, Number], default: 0 }, teleported: Xa.teleported, predefine: { type: Ot(Array) }, validateEvent: { type: Boolean, default: !0 }, ...ic(["ariaLabel"]) }), Gpe = { [Jr]: (e) => oo(e) || Au(e), [c4]: (e) => oo(e) || Au(e), activeChange: (e) => oo(e) || Au(e), focus: (e) => e instanceof FocusEvent, blur: (e) => e instanceof FocusEvent }, pM = Symbol("colorPickerContextKey"), h6 = function(e, t, n) { return [ e, t * n / ((e = (2 - t) * n) < 1 ? e : 2 - e) || 0, e / 2 ]; }, Xpe = function(e) { return typeof e == "string" && e.includes(".") && Number.parseFloat(e) === 1; }, Ype = function(e) { return typeof e == "string" && e.includes("%"); }, Jp = function(e, t) { Xpe(e) && (e = "100%"); const n = Ype(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); }, v6 = { 10: "A", 11: "B", 12: "C", 13: "D", 14: "E", 15: "F" }, G1 = (e) => { e = Math.min(Math.round(e), 255); const t = Math.floor(e / 16), n = e % 16; return `${v6[t] || t}${v6[n] || n}`; }, g6 = function({ r: e, g: t, b: n }) { return Number.isNaN(+e) || Number.isNaN(+t) || Number.isNaN(+n) ? "" : `#${G1(e)}${G1(t)}${G1(n)}`; }, qx = { A: 10, B: 11, C: 12, D: 13, E: 14, F: 15 }, Sc = function(e) { return e.length === 2 ? (qx[e[0].toUpperCase()] || +e[0]) * 16 + (qx[e[1].toUpperCase()] || +e[1]) : qx[e[1].toUpperCase()] || +e[1]; }, Zpe = function(e, t, n) { t = t / 100, n = n / 100; let r = t; const a = Math.max(n, 0.01); n *= 2, t *= n <= 1 ? n : 2 - n, r *= a <= 1 ? a : 2 - a; const o = (n + t) / 2, i = n === 0 ? 2 * r / (a + r) : 2 * t / (n + t); return { h: e, s: i * 100, v: o * 100 }; }, m6 = (e, t, n) => { e = Jp(e, 255), t = Jp(t, 255), n = Jp(n, 255); const r = Math.max(e, t, n), a = Math.min(e, t, n); let o; const i = r, s = r - a, l = r === 0 ? 0 : s / r; if (r === a) o = 0; else { switch (r) { case e: { o = (t - n) / s + (t < n ? 6 : 0); break; } case t: { o = (n - e) / s + 2; break; } case n: { o = (e - t) / s + 4; break; } } o /= 6; } return { h: o * 360, s: l * 100, v: i * 100 }; }, Qh = function(e, t, n) { e = Jp(e, 360) * 6, t = Jp(t, 100), n = Jp(n, 100); const r = Math.floor(e), a = e - r, o = n * (1 - t), i = n * (1 - a * t), s = n * (1 - (1 - a) * t), l = r % 6, u = [n, i, o, o, s, n][l], c = [s, n, n, i, o, o][l], d = [o, o, s, n, n, i][l]; return { r: Math.round(u * 255), g: Math.round(c * 255), b: Math.round(d * 255) }; }; let Uv = class { 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) hd(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) hd(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 Qh(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, a, o) => { this._hue = Math.max(0, Math.min(360, r)), this._saturation = Math.max(0, Math.min(100, a)), this._value = Math.max(0, Math.min(100, o)), this.doOnChange(); }; if (t.includes("hsl")) { const r = t.replace(/hsla|hsl|\(|\)/gm, "").split(/\s|,/g).filter((a) => a !== "").map((a, o) => o > 2 ? Number.parseFloat(a) : Number.parseInt(a, 10)); if (r.length === 4 ? this._alpha = Number.parseFloat(r[3]) * 100 : r.length === 3 && (this._alpha = 100), r.length >= 3) { const { h: a, s: o, v: i } = Zpe(r[0], r[1], r[2]); n(a, o, i); } } else if (t.includes("hsv")) { const r = t.replace(/hsva|hsv|\(|\)/gm, "").split(/\s|,/g).filter((a) => a !== "").map((a, o) => o > 2 ? Number.parseFloat(a) : Number.parseInt(a, 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((a) => a !== "").map((a, o) => o > 2 ? Number.parseFloat(a) : Number.parseInt(a, 10)); if (r.length === 4 ? this._alpha = Number.parseFloat(r[3]) * 100 : r.length === 3 && (this._alpha = 100), r.length >= 3) { const { h: a, s: o, v: i } = m6(r[0], r[1], r[2]); n(a, o, 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 a, o, i; r.length === 3 ? (a = Sc(r[0] + r[0]), o = Sc(r[1] + r[1]), i = Sc(r[2] + r[2])) : (r.length === 6 || r.length === 8) && (a = Sc(r.slice(0, 2)), o = Sc(r.slice(2, 4)), i = Sc(r.slice(4, 6))), r.length === 8 ? this._alpha = Sc(r.slice(6)) / 255 * 100 : (r.length === 3 || r.length === 6) && (this._alpha = 100); const { h: s, s: l, v: u } = m6(a, o, 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: a, format: o } = this; if (this.enableAlpha) switch (o) { case "hsl": { const i = h6(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 = `${g6(Qh(t, n, r))}${G1(a * 255 / 100)}`; break; } default: { const { r: i, g: s, b: l } = Qh(t, n, r); this.value = `rgba(${i}, ${s}, ${l}, ${this.get("alpha") / 100})`; } } else switch (o) { case "hsl": { const i = h6(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 } = Qh(t, n, r); this.value = `rgb(${i}, ${s}, ${l})`; break; } default: this.value = g6(Qh(t, n, r)); } } }; const Qpe = X({ props: { colors: { type: Array, required: !0 }, color: { type: Object, required: !0 }, enableAlpha: { type: Boolean, required: !0 } }, setup(e) { const t = Zt("color-predefine"), { currentColor: n } = Te(pM), r = U(o(e.colors, e.color)); be(() => n.value, (i) => { const s = new Uv(); s.fromString(i), r.value.forEach((l) => { l.selected = s.compare(l); }); }), Hd(() => { r.value = o(e.colors, e.color); }); function a(i) { e.color.fromString(e.colors[i]); } function o(i, s) { return i.map((l) => { const u = new Uv(); return u.enableAlpha = e.enableAlpha, u.format = "rgba", u.fromString(l), u.selected = u.value === s.value, u; }); } return { rgbaColors: r, handleSelect: a, ns: t }; } }); function Jpe(e, t, n, r, a, o) { return I(), j("div", { class: H(e.ns.b()) }, [ W("div", { class: H(e.ns.e("colors")) }, [ (I(!0), j(Qe, null, Nt(e.rgbaColors, (i, s) => (I(), j("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) }, [ W("div", { style: Ye({ backgroundColor: i.value }) }, null, 4) ], 10, ["onClick"]))), 128)) ], 2) ], 2); } var efe = /* @__PURE__ */ Ht(Qpe, [["render", Jpe], ["__file", "predefine.vue"]]); const tfe = X({ name: "ElSlPanel", props: { color: { type: Object, required: !0 } }, setup(e) { const t = Zt("color-svpanel"), n = tt(), r = U(0), a = U(0), o = U("hsl(0, 100%, 50%)"), i = F(() => { 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: f, clientHeight: h } = d; a.value = u * f / 100, r.value = (100 - c) * h / 100, o.value = `hsl(${e.color.get("hue")}, 100%, 50%)`; } function l(u) { const c = n.vnode.el.getBoundingClientRect(), { clientX: d, clientY: f } = e4(u); let h = d - c.left, p = f - c.top; h = Math.max(0, h), h = Math.min(h, c.width), p = Math.max(0, p), p = Math.min(p, c.height), a.value = h, r.value = p, e.color.set({ saturation: h / c.width * 100, value: 100 - p / c.height * 100 }); } return be(() => i.value, () => { s(); }), nt(() => { x0(n.vnode.el, { drag: (u) => { l(u); }, end: (u) => { l(u); } }), s(); }), { cursorTop: r, cursorLeft: a, background: o, colorValue: i, handleDrag: l, update: s, ns: t }; } }); function nfe(e, t, n, r, a, o) { return I(), j("div", { class: H(e.ns.b()), style: Ye({ backgroundColor: e.background }) }, [ W("div", { class: H(e.ns.e("white")) }, null, 2), W("div", { class: H(e.ns.e("black")) }, null, 2), W("div", { class: H(e.ns.e("cursor")), style: Ye({ top: e.cursorTop + "px", left: e.cursorLeft + "px" }) }, [ W("div") ], 6) ], 6); } var rfe = /* @__PURE__ */ Ht(tfe, [["render", nfe], ["__file", "sv-panel.vue"]]); const afe = X({ name: "ElColorPicker" }), ofe = /* @__PURE__ */ X({ ...afe, props: Kpe, emits: Gpe, setup(e, { expose: t, emit: n }) { const r = e, { t: a } = $2(), o = Zt("color"), { formItem: i } = Zd(), s = gd(), l = Ag(), { inputId: u, isLabeledByFormItem: c } = Ig(r, { formItemContext: i }), d = U(), f = U(), h = U(), p = U(), v = U(), m = U(), { isFocused: g, handleFocus: y, handleBlur: x } = w4(v, { beforeFocus() { return l.value; }, beforeBlur(Y) { var te; return (te = p.value) == null ? void 0 : te.isFocusInsideContent(Y); }, afterBlur() { R(!1), z(); } }); let w = !0; const k = tn(new Uv({ enableAlpha: r.showAlpha, format: r.colorFormat || "", value: r.modelValue })), C = U(!1), S = U(!1), _ = U(""), T = F(() => !r.modelValue && !S.value ? "transparent" : L(k, r.showAlpha)), O = F(() => !r.modelValue && !S.value ? "" : k.value), $ = F(() => c.value ? void 0 : r.ariaLabel || a("el.colorpicker.defaultLabel")), A = F(() => c.value ? i == null ? void 0 : i.labelId : void 0), N = F(() => [ o.b("picker"), o.is("disabled", l.value), o.bm("picker", s.value), o.is("focused", g.value) ]); function L(Y, te) { if (!(Y instanceof Uv)) throw new TypeError("color should be instance of _color Class"); const { r: we, g: Oe, b: Ne } = Y.toRgb(); return te ? `rgba(${we}, ${Oe}, ${Ne}, ${Y.get("alpha") / 100})` : `rgb(${we}, ${Oe}, ${Ne})`; } function R(Y) { C.value = Y; } const P = EN(R, 100, { leading: !0 }); function B() { l.value || R(!0); } function M() { P(!1), z(); } function z() { Ue(() => { r.modelValue ? k.fromString(r.modelValue) : (k.value = "", Ue(() => { S.value = !1; })); }); } function Z() { l.value || P(!C.value); } function G() { k.fromString(_.value); } function J() { const Y = k.value; n(Jr, Y), n("change", Y), r.validateEvent && (i == null || i.validate("change").catch((te) => Br(te))), P(!1), Ue(() => { const te = new Uv({ enableAlpha: r.showAlpha, format: r.colorFormat || "", value: r.modelValue }); k.compare(te) || z(); }); } function se() { P(!1), n(Jr, null), n("change", null), r.modelValue !== null && r.validateEvent && (i == null || i.validate("change").catch((Y) => Br(Y))), z(); } function ve() { C.value && (M(), g.value && ee()); } function ge(Y) { Y.preventDefault(), Y.stopPropagation(), R(!1), z(); } function oe(Y) { switch (Y.code) { case Fr.enter: case Fr.space: Y.preventDefault(), Y.stopPropagation(), B(), m.value.focus(); break; case Fr.esc: ge(Y); break; } } function ee() { v.value.focus(); } function q() { v.value.blur(); } return nt(() => { r.modelValue && (_.value = O.value); }), be(() => r.modelValue, (Y) => { Y ? Y && Y !== k.value && (w = !1, k.fromString(Y)) : S.value = !1; }), be(() => [r.colorFormat, r.showAlpha], () => { k.enableAlpha = r.showAlpha, k.format = r.colorFormat || k.format, k.doOnChange(), n(Jr, k.value); }), be(() => O.value, (Y) => { _.value = Y, w && n("activeChange", Y), w = !0; }), be(() => k.value, () => { !r.modelValue && !S.value && (S.value = !0); }), be(() => C.value, () => { Ue(() => { var Y, te, we; (Y = d.value) == null || Y.update(), (te = f.value) == null || te.update(), (we = h.value) == null || we.update(); }); }), rt(pM, { currentColor: O }), t({ color: k, show: B, hide: M, focus: ee, blur: q }), (Y, te) => (I(), de(b(L2), { ref_key: "popper", ref: p, visible: C.value, "show-arrow": !1, "fallback-placements": ["bottom", "top", "right", "left"], offset: 0, "gpu-acceleration": !1, "popper-class": [b(o).be("picker", "panel"), b(o).b("dropdown"), Y.popperClass], "stop-popper-mouse-event": !1, effect: "light", trigger: "click", teleported: Y.teleported, transition: `${b(o).namespace.value}-zoom-in-top`, persistent: "", onHide: (we) => R(!1) }, { content: K(() => [ Xe((I(), j("div", { onKeydown: gn(ge, ["esc"]) }, [ W("div", { class: H(b(o).be("dropdown", "main-wrapper")) }, [ ue(Wpe, { ref_key: "hue", ref: d, class: "hue-slider", color: b(k), vertical: "" }, null, 8, ["color"]), ue(rfe, { ref_key: "sv", ref: f, color: b(k) }, null, 8, ["color"]) ], 2), Y.showAlpha ? (I(), de(Hpe, { key: 0, ref_key: "alpha", ref: h, color: b(k) }, null, 8, ["color"])) : ne("v-if", !0), Y.predefine ? (I(), de(efe, { key: 1, ref: "predefine", "enable-alpha": Y.showAlpha, color: b(k), colors: Y.predefine }, null, 8, ["enable-alpha", "color", "colors"])) : ne("v-if", !0), W("div", { class: H(b(o).be("dropdown", "btns")) }, [ W("span", { class: H(b(o).be("dropdown", "value")) }, [ ue(b(dce), { ref_key: "inputRef", ref: m, modelValue: _.value, "onUpdate:modelValue": (we) => _.value = we, "validate-event": !1, size: "small", onKeyup: gn(G, ["enter"]), onBlur: G }, null, 8, ["modelValue", "onUpdate:modelValue", "onKeyup"]) ], 2), ue(b(Wy), { class: H(b(o).be("dropdown", "link-btn")), text: "", size: "small", onClick: se }, { default: K(() => [ et(Fe(b(a)("el.colorpicker.clear")), 1) ]), _: 1 }, 8, ["class"]), ue(b(Wy), { plain: "", size: "small", class: H(b(o).be("dropdown", "btn")), onClick: J }, { default: K(() => [ et(Fe(b(a)("el.colorpicker.confirm")), 1) ]), _: 1 }, 8, ["class"]) ], 2) ], 40, ["onKeydown"])), [ [b(oM), ve] ]) ]), default: K(() => [ W("div", Bt({ id: b(u), ref_key: "triggerRef", ref: v }, Y.$attrs, { class: b(N), role: "button", "aria-label": b($), "aria-labelledby": b(A), "aria-description": b(a)("el.colorpicker.description", { color: Y.modelValue || "" }), "aria-disabled": b(l), tabindex: b(l) ? -1 : Y.tabindex, onKeydown: oe, onFocus: b(y), onBlur: b(x) }), [ b(l) ? (I(), j("div", { key: 0, class: H(b(o).be("picker", "mask")) }, null, 2)) : ne("v-if", !0), W("div", { class: H(b(o).be("picker", "trigger")), onClick: Z }, [ W("span", { class: H([b(o).be("picker", "color"), b(o).is("alpha", Y.showAlpha)]) }, [ W("span", { class: H(b(o).be("picker", "color-inner")), style: Ye({ backgroundColor: b(T) }) }, [ Xe(ue(b(eo), { class: H([b(o).be("picker", "icon"), b(o).is("icon-arrow-down")]) }, { default: K(() => [ ue(b($N)) ]), _: 1 }, 8, ["class"]), [ [mt, Y.modelValue || S.value] ]), Xe(ue(b(eo), { class: H([b(o).be("picker", "empty"), b(o).is("icon-close")]) }, { default: K(() => [ ue(b(IC)) ]), _: 1 }, 8, ["class"]), [ [mt, !Y.modelValue && !S.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 ife = /* @__PURE__ */ Ht(ofe, [["__file", "color-picker.vue"]]); Xr(ife); const sfe = X({ name: "ElContainer" }), lfe = /* @__PURE__ */ X({ ...sfe, props: { direction: { type: String } }, setup(e) { const t = e, n = Cr(), r = Zt("container"), a = F(() => t.direction === "vertical" ? !0 : t.direction === "horizontal" ? !1 : n && n.default ? n.default().some((o) => { const i = o.type.name; return i === "ElHeader" || i === "ElFooter"; }) : !1); return (o, i) => (I(), j("section", { class: H([b(r).b(), b(r).is("vertical", b(a))]) }, [ he(o.$slots, "default") ], 2)); } }); var ufe = /* @__PURE__ */ Ht(lfe, [["__file", "container.vue"]]); const cfe = X({ name: "ElAside" }), dfe = /* @__PURE__ */ X({ ...cfe, props: { width: { type: String, default: null } }, setup(e) { const t = e, n = Zt("aside"), r = F(() => t.width ? n.cssVarBlock({ width: t.width }) : {}); return (a, o) => (I(), j("aside", { class: H(b(n).b()), style: Ye(b(r)) }, [ he(a.$slots, "default") ], 6)); } }); var fM = /* @__PURE__ */ Ht(dfe, [["__file", "aside.vue"]]); const pfe = X({ name: "ElFooter" }), ffe = /* @__PURE__ */ X({ ...pfe, props: { height: { type: String, default: null } }, setup(e) { const t = e, n = Zt("footer"), r = F(() => t.height ? n.cssVarBlock({ height: t.height }) : {}); return (a, o) => (I(), j("footer", { class: H(b(n).b()), style: Ye(b(r)) }, [ he(a.$slots, "default") ], 6)); } }); var hM = /* @__PURE__ */ Ht(ffe, [["__file", "footer.vue"]]); const hfe = X({ name: "ElHeader" }), vfe = /* @__PURE__ */ X({ ...hfe, props: { height: { type: String, default: null } }, setup(e) { const t = e, n = Zt("header"), r = F(() => t.height ? n.cssVarBlock({ height: t.height }) : {}); return (a, o) => (I(), j("header", { class: H(b(n).b()), style: Ye(b(r)) }, [ he(a.$slots, "default") ], 6)); } }); var vM = /* @__PURE__ */ Ht(vfe, [["__file", "header.vue"]]); const gfe = X({ name: "ElMain" }), mfe = /* @__PURE__ */ X({ ...gfe, setup(e) { const t = Zt("main"); return (n, r) => (I(), j("main", { class: H(b(t).b()) }, [ he(n.$slots, "default") ], 2)); } }); var gM = /* @__PURE__ */ Ht(mfe, [["__file", "main.vue"]]); Xr(ufe, { Aside: fM, Footer: hM, Header: vM, Main: gM }); Al(fM); Al(hM); Al(vM); Al(gM); const yfe = /* @__PURE__ */ X({ inheritAttrs: !1 }); function bfe(e, t, n, r, a, o) { return he(e.$slots, "default"); } var wfe = /* @__PURE__ */ Ht(yfe, [["render", bfe], ["__file", "collection.vue"]]); const xfe = /* @__PURE__ */ X({ name: "ElCollectionItem", inheritAttrs: !1 }); function kfe(e, t, n, r, a, o) { return he(e.$slots, "default"); } var Cfe = /* @__PURE__ */ Ht(xfe, [["render", kfe], ["__file", "collection-item.vue"]]); const Sfe = "data-el-collection-item", Efe = (e) => { const t = `El${e}Collection`, n = `${t}Item`, r = Symbol(t), a = Symbol(n), o = { ...wfe, name: t, setup() { const s = U(null), l = /* @__PURE__ */ new Map(); rt(r, { itemMap: l, getItems: () => { const u = b(s); if (!u) return []; const c = Array.from(u.querySelectorAll(`[${Sfe}]`)); return [...l.values()].sort((d, f) => c.indexOf(d.ref) - c.indexOf(f.ref)); }, collectionRef: s }); } }, i = { ...Cfe, name: n, setup(s, { attrs: l }) { const u = U(null), c = Te(r, void 0); rt(a, { collectionItemRef: u }), nt(() => { const d = b(u); d && c.itemMap.set(d, { ref: d, ...l }); }), kt(() => { const d = b(u); c.itemMap.delete(d); }); } }; return { COLLECTION_INJECTION_KEY: r, COLLECTION_ITEM_INJECTION_KEY: a, ElCollection: o, ElCollectionItem: i }; }, Wx = Pn({ trigger: w0.trigger, effect: { ...Xa.effect, default: "light" }, type: { type: Ot(String) }, placement: { type: Ot(String), default: "bottom" }, popperOptions: { type: Ot(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: Ot([Number, String]), default: 0 }, maxHeight: { type: Ot([Number, String]), default: "" }, popperClass: { type: String, default: "" }, disabled: Boolean, role: { type: String, default: "menu" }, buttonProps: { type: Ot(Object) }, teleported: Xa.teleported }); Pn({ command: { type: [Object, String, Number], default: () => ({}) }, disabled: Boolean, divided: Boolean, textValue: String, icon: { type: Ru } }); Pn({ onKeydown: { type: Ot(Function) } }); Efe("Dropdown"); const mM = Symbol("ElSelectGroup"), Pg = Symbol("ElSelect"); function _fe(e, t) { const n = Te(Pg), r = Te(mM, { disabled: !1 }), a = F(() => c(gu(n.props.modelValue), e.value)), o = F(() => { var h; if (n.props.multiple) { const p = gu((h = n.props.modelValue) != null ? h : []); return !a.value && p.length >= n.props.multipleLimit && n.props.multipleLimit > 0; } else return !1; }), i = F(() => e.label || (ja(e.value) ? "" : e.value)), s = F(() => e.value || e.label || ""), l = F(() => e.disabled || t.groupDisabled || o.value), u = tt(), c = (h = [], p) => { if (ja(e.value)) { const v = n.props.valueKey; return h && h.some((m) => bo(il(m, v)) === il(p, v)); } else return h && h.includes(p); }, d = () => { !e.disabled && !r.disabled && (n.states.hoveringIndex = n.optionsArray.indexOf(u.proxy)); }, f = (h) => { const p = new RegExp(qse(h), "i"); t.visible = p.test(i.value) || e.created; }; return be(() => i.value, () => { !e.created && !n.props.remote && n.setSelected(); }), be(() => e.value, (h, p) => { const { remote: v, valueKey: m } = n.props; if (h !== p && (n.onOptionDestroy(p, u.proxy), n.onOptionCreate(u.proxy)), !e.created && !v) { if (m && ja(h) && ja(p) && h[m] === p[m]) return; n.setSelected(); } }), be(() => r.disabled, () => { t.groupDisabled = r.disabled; }, { immediate: !0 }), { select: n, currentLabel: i, currentValue: s, itemSelected: a, isDisabled: l, hoverItem: d, updateOption: f }; } const Tfe = X({ name: "ElOption", componentName: "ElOption", props: { value: { required: !0, type: [String, Number, Boolean, Object] }, label: [String, Number], created: Boolean, disabled: Boolean }, setup(e) { const t = Zt("select"), n = I2(), r = F(() => [ t.be("dropdown", "item"), t.is("disabled", b(s)), t.is("selected", b(i)), t.is("hovering", b(f)) ]), a = tn({ index: -1, groupDisabled: !1, visible: !0, hover: !1 }), { currentLabel: o, itemSelected: i, isDisabled: s, select: l, hoverItem: u, updateOption: c } = _fe(e, a), { visible: d, hover: f } = Sr(a), h = tt().proxy; l.onOptionCreate(h), kt(() => { const v = h.value, { selected: m } = l.states, g = (l.props.multiple ? m : [m]).some((y) => y.value === h.value); Ue(() => { l.states.cachedOptions.get(v) === h && !g && l.states.cachedOptions.delete(v); }), l.onOptionDestroy(v, h); }); function p() { s.value || l.handleOptionSelect(h); } return { ns: t, id: n, containerKls: r, currentLabel: o, itemSelected: i, isDisabled: s, select: l, hoverItem: u, updateOption: c, visible: d, hover: f, selectOptionClick: p, states: a }; } }); function Ofe(e, t, n, r, a, o) { return Xe((I(), j("li", { id: e.id, class: H(e.containerKls), role: "option", "aria-disabled": e.isDisabled || void 0, "aria-selected": e.itemSelected, onMouseenter: e.hoverItem, onClick: Je(e.selectOptionClick, ["stop"]) }, [ he(e.$slots, "default", {}, () => [ W("span", null, Fe(e.currentLabel), 1) ]) ], 42, ["id", "aria-disabled", "aria-selected", "onMouseenter", "onClick"])), [ [mt, e.visible] ]); } var T4 = /* @__PURE__ */ Ht(Tfe, [["render", Ofe], ["__file", "option.vue"]]); const $fe = X({ name: "ElSelectDropdown", componentName: "ElSelectDropdown", setup() { const e = Te(Pg), t = Zt("select"), n = F(() => e.props.popperClass), r = F(() => e.props.multiple), a = F(() => e.props.fitInputWidth), o = U(""); function i() { var s; o.value = `${(s = e.selectRef) == null ? void 0 : s.offsetWidth}px`; } return nt(() => { i(), rl(e.selectRef, i); }), { ns: t, minWidth: o, popperClass: n, isMultiple: r, isFitInputWidth: a }; } }); function Ffe(e, t, n, r, a, o) { return I(), j("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 ? (I(), j("div", { key: 0, class: H(e.ns.be("dropdown", "header")) }, [ he(e.$slots, "header") ], 2)) : ne("v-if", !0), he(e.$slots, "default"), e.$slots.footer ? (I(), j("div", { key: 1, class: H(e.ns.be("dropdown", "footer")) }, [ he(e.$slots, "footer") ], 2)) : ne("v-if", !0) ], 6); } var Afe = /* @__PURE__ */ Ht($fe, [["render", Ffe], ["__file", "select-dropdown.vue"]]); const Ife = 11, Pfe = (e, t) => { const { t: n } = $2(), r = I2(), a = Zt("select"), o = Zt("input"), i = tn({ 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 = U(null), l = U(null), u = U(null), c = U(null), d = U(null), f = U(null), h = U(null), p = U(null), v = U(null), m = U(null), g = U(null), y = U(null), { isComposing: x, handleCompositionStart: w, handleCompositionUpdate: k, handleCompositionEnd: C } = GN({ afterComposition: (D) => le(D) }), { wrapperRef: S, isFocused: _ } = w4(d, { beforeFocus() { return P.value; }, afterFocus() { e.automaticDropdown && !T.value && (T.value = !0, i.menuVisibleOnFocus = !0); }, beforeBlur(D) { var ae, Ie; return ((ae = u.value) == null ? void 0 : ae.isFocusInsideContent(D)) || ((Ie = c.value) == null ? void 0 : Ie.isFocusInsideContent(D)); }, afterBlur() { T.value = !1, i.menuVisibleOnFocus = !1; } }), T = U(!1), O = U(), { form: $, formItem: A } = Zd(), { inputId: N } = Ig(e, { formItemContext: A }), { valueOnClear: L, isEmptyValue: R } = Xue(e), P = F(() => e.disabled || ($ == null ? void 0 : $.disabled)), B = F(() => to(e.modelValue) ? e.modelValue.length > 0 : !R(e.modelValue)), M = F(() => e.clearable && !P.value && i.inputHovering && B.value), z = F(() => e.remote && e.filterable && !e.remoteShowSuffix ? "" : e.suffixIcon), Z = F(() => a.is("reverse", z.value && T.value)), G = F(() => (A == null ? void 0 : A.validateState) || ""), J = F(() => AN[G.value]), se = F(() => e.remote ? 300 : 0), ve = F(() => 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 && ge.value === 0 ? e.noMatchText || n("el.select.noMatch") : i.options.size === 0 ? e.noDataText || n("el.select.noData") : null), ge = F(() => oe.value.filter((D) => D.visible).length), oe = F(() => { const D = Array.from(i.options.values()), ae = []; return i.optionValues.forEach((Ie) => { const He = D.findIndex((Jt) => Jt.value === Ie); He > -1 && ae.push(D[He]); }), ae.length >= D.length ? ae : D; }), ee = F(() => Array.from(i.cachedOptions.values())), q = F(() => { const D = oe.value.filter((ae) => !ae.created).some((ae) => ae.currentLabel === i.inputValue); return e.filterable && e.allowCreate && i.inputValue !== "" && !D; }), Y = () => { e.filterable && Va(e.filterMethod) || e.filterable && e.remote && Va(e.remoteMethod) || oe.value.forEach((D) => { var ae; (ae = D.updateOption) == null || ae.call(D, i.inputValue); }); }, te = gd(), we = F(() => ["small"].includes(te.value) ? "small" : "default"), Oe = F({ get() { return T.value && ve.value !== !1; }, set(D) { T.value = D; } }), Ne = F(() => { if (e.multiple && !Cu(e.modelValue)) return gu(e.modelValue).length === 0 && !i.inputValue; const D = to(e.modelValue) ? e.modelValue[0] : e.modelValue; return e.filterable || Cu(D) ? !i.inputValue : !0; }), xe = F(() => { var D; const ae = (D = e.placeholder) != null ? D : n("el.select.placeholder"); return e.multiple || !B.value ? ae : i.selectedLabel; }), $e = F(() => _C ? null : "mouseenter"); be(() => e.modelValue, (D, ae) => { e.multiple && e.filterable && !e.reserveKeyword && (i.inputValue = "", Se("")), Me(), !Hy(D, ae) && e.validateEvent && (A == null || A.validate("change").catch((Ie) => Br(Ie))); }, { flush: "post", deep: !0 }), be(() => T.value, (D) => { D ? Se(i.inputValue) : (i.inputValue = "", i.previousQuery = null, i.isBeforeHide = !0), t("visible-change", D); }), be(() => i.options.entries(), () => { var D; if (!Gr) return; const ae = ((D = s.value) == null ? void 0 : D.querySelectorAll("input")) || []; (!e.filterable && !e.defaultFirstOption && !Cu(e.modelValue) || !Array.from(ae).includes(document.activeElement)) && Me(), e.defaultFirstOption && (e.filterable || e.remote) && ge.value && Pe(); }, { flush: "post" }), be(() => i.hoveringIndex, (D) => { ra(D) && D > -1 ? O.value = oe.value[D] || {} : O.value = {}, oe.value.forEach((ae) => { ae.hover = O.value === ae; }); }), Hd(() => { i.isBeforeHide || Y(); }); const Se = (D) => { i.previousQuery === D || x.value || (i.previousQuery = D, e.filterable && Va(e.filterMethod) ? e.filterMethod(D) : e.filterable && e.remote && Va(e.remoteMethod) && e.remoteMethod(D), e.defaultFirstOption && (e.filterable || e.remote) && ge.value ? Ue(Pe) : Ue(Be)); }, Pe = () => { const D = oe.value.filter((He) => He.visible && !He.disabled && !He.states.groupDisabled), ae = D.find((He) => He.created), Ie = D[0]; i.hoveringIndex = _e(oe.value, ae || Ie); }, Me = () => { if (e.multiple) i.selectedLabel = ""; else { const ae = to(e.modelValue) ? e.modelValue[0] : e.modelValue, Ie = je(ae); i.selectedLabel = Ie.currentLabel, i.selected = [Ie]; return; } const D = []; Cu(e.modelValue) || gu(e.modelValue).forEach((ae) => { D.push(je(ae)); }), i.selected = D; }, je = (D) => { let ae; const Ie = Ax(D).toLowerCase() === "object", He = Ax(D).toLowerCase() === "null", Jt = Ax(D).toLowerCase() === "undefined"; for (let un = i.cachedOptions.size - 1; un >= 0; un--) { const en = ee.value[un]; if (Ie ? il(en.value, e.valueKey) === il(D, e.valueKey) : en.value === D) { ae = { value: D, currentLabel: en.currentLabel, get isDisabled() { return en.isDisabled; } }; break; } } if (ae) return ae; const fn = Ie ? D.label : !He && !Jt ? D : ""; return { value: D, currentLabel: fn }; }, Be = () => { i.hoveringIndex = oe.value.findIndex((D) => i.selected.some((ae) => Qt(ae) === Qt(D))); }, We = () => { i.selectionWidth = l.value.getBoundingClientRect().width; }, qe = () => { i.calculatorWidth = f.value.getBoundingClientRect().width; }, Ge = () => { i.collapseItemWidth = g.value.getBoundingClientRect().width; }, E = () => { var D, ae; (ae = (D = u.value) == null ? void 0 : D.updatePopper) == null || ae.call(D); }, V = () => { var D, ae; (ae = (D = c.value) == null ? void 0 : D.updatePopper) == null || ae.call(D); }, ie = () => { i.inputValue.length > 0 && !T.value && (T.value = !0), Se(i.inputValue); }, le = (D) => { if (i.inputValue = D.target.value, e.remote) re(); else return ie(); }, re = EN(() => { ie(); }, se.value), ke = (D) => { Hy(e.modelValue, D) || t(c4, D); }, fe = (D) => Rse(D, (ae) => !i.disabledOptions.has(ae)), Ee = (D) => { if (e.multiple && D.code !== Fr.delete && D.target.value.length <= 0) { const ae = gu(e.modelValue).slice(), Ie = fe(ae); if (Ie < 0) return; const He = ae[Ie]; ae.splice(Ie, 1), t(Jr, ae), ke(ae), t("remove-tag", He); } }, ze = (D, ae) => { const Ie = i.selected.indexOf(ae); if (Ie > -1 && !P.value) { const He = gu(e.modelValue).slice(); He.splice(Ie, 1), t(Jr, He), ke(He), t("remove-tag", ae.value); } D.stopPropagation(), bt(); }, Ve = (D) => { D.stopPropagation(); const ae = e.multiple ? [] : L.value; if (e.multiple) for (const Ie of i.selected) Ie.isDisabled && ae.push(Ie.value); t(Jr, ae), ke(ae), i.hoveringIndex = -1, T.value = !1, t("clear"), bt(); }, me = (D) => { var ae; if (e.multiple) { const Ie = gu((ae = e.modelValue) != null ? ae : []).slice(), He = _e(Ie, D.value); He > -1 ? Ie.splice(He, 1) : (e.multipleLimit <= 0 || Ie.length < e.multipleLimit) && Ie.push(D.value), t(Jr, Ie), ke(Ie), D.created && Se(""), e.filterable && !e.reserveKeyword && (i.inputValue = ""); } else t(Jr, D.value), ke(D.value), T.value = !1; bt(), !T.value && Ue(() => { Ce(D); }); }, _e = (D = [], ae) => { if (!ja(ae)) return D.indexOf(ae); const Ie = e.valueKey; let He = -1; return D.some((Jt, fn) => bo(il(Jt, Ie)) === il(ae, Ie) ? (He = fn, !0) : !1), He; }, Ce = (D) => { var ae, Ie, He, Jt, fn; const un = to(D) ? D[0] : D; let en = null; if (un != null && un.value) { const Gt = oe.value.filter((Hr) => Hr.value === un.value); Gt.length > 0 && (en = Gt[0].$el); } if (u.value && en) { const Gt = (Jt = (He = (Ie = (ae = u.value) == null ? void 0 : ae.popperRef) == null ? void 0 : Ie.contentRef) == null ? void 0 : He.querySelector) == null ? void 0 : Jt.call(He, `.${a.be("dropdown", "wrap")}`); Gt && Xse(Gt, en); } (fn = y.value) == null || fn.handleScroll(); }, Le = (D) => { i.options.set(D.value, D), i.cachedOptions.set(D.value, D), D.disabled && i.disabledOptions.set(D.value, D); }, yt = (D, ae) => { i.options.get(D) === ae && i.options.delete(D); }, dt = F(() => { var D, ae; return (ae = (D = u.value) == null ? void 0 : D.popperRef) == null ? void 0 : ae.contentRef; }), _t = () => { i.isBeforeHide = !1, Ue(() => Ce(i.selected)); }, bt = () => { var D; (D = d.value) == null || D.focus(); }, Ct = () => { var D; (D = d.value) == null || D.blur(); }, nn = (D) => { Ve(D); }, Dt = () => { T.value = !1, _.value && Ct(); }, Kt = () => { i.inputValue.length > 0 ? i.inputValue = "" : T.value = !1; }, on = () => { P.value || (_C && (i.inputHovering = !0), i.menuVisibleOnFocus ? i.menuVisibleOnFocus = !1 : T.value = !T.value); }, rn = () => { T.value ? oe.value[i.hoveringIndex] && me(oe.value[i.hoveringIndex]) : on(); }, Qt = (D) => ja(D.value) ? il(D.value, e.valueKey) : D.value, Sn = F(() => oe.value.filter((D) => D.visible).every((D) => D.disabled)), En = F(() => e.multiple ? e.collapseTags ? i.selected.slice(0, e.maxCollapseTags) : i.selected : []), pn = F(() => e.multiple ? e.collapseTags ? i.selected.slice(e.maxCollapseTags) : [] : []), St = (D) => { if (!T.value) { T.value = !0; return; } if (!(i.options.size === 0 || i.filteredOptionsCount === 0 || x.value) && !Sn.value) { D === "next" ? (i.hoveringIndex++, i.hoveringIndex === i.options.size && (i.hoveringIndex = 0)) : D === "prev" && (i.hoveringIndex--, i.hoveringIndex < 0 && (i.hoveringIndex = i.options.size - 1)); const ae = oe.value[i.hoveringIndex]; (ae.disabled === !0 || ae.states.groupDisabled === !0 || !ae.visible) && St(D), Ue(() => Ce(O.value)); } }, Rt = () => { if (!l.value) return 0; const D = window.getComputedStyle(l.value); return Number.parseFloat(D.gap || "6px"); }, qt = F(() => { const D = Rt(); return { maxWidth: `${g.value && e.maxCollapseTags === 1 ? i.selectionWidth - i.collapseItemWidth - D : i.selectionWidth}px` }; }), _n = F(() => ({ maxWidth: `${i.selectionWidth}px` })), _r = F(() => ({ width: `${Math.max(i.calculatorWidth, Ife)}px` })); return rl(l, We), rl(f, qe), rl(v, E), rl(S, E), rl(m, V), rl(g, Ge), nt(() => { Me(); }), { inputId: N, contentId: r, nsSelect: a, nsInput: o, states: i, isFocused: _, expanded: T, optionsArray: oe, hoverOption: O, selectSize: te, filteredOptionsCount: ge, resetCalculatorWidth: qe, updateTooltip: E, updateTagTooltip: V, debouncedOnInputChange: re, onInput: le, deletePrevTag: Ee, deleteTag: ze, deleteSelected: Ve, handleOptionSelect: me, scrollToOption: Ce, hasModelValue: B, shouldShowPlaceholder: Ne, currentPlaceholder: xe, mouseEnterEventName: $e, showClose: M, iconComponent: z, iconReverse: Z, validateState: G, validateIcon: J, showNewOption: q, updateOptions: Y, collapseTagSize: we, setSelected: Me, selectDisabled: P, emptyText: ve, handleCompositionStart: w, handleCompositionUpdate: k, handleCompositionEnd: C, onOptionCreate: Le, onOptionDestroy: yt, handleMenuEnter: _t, focus: bt, blur: Ct, handleClearClick: nn, handleClickOutside: Dt, handleEsc: Kt, toggleMenu: on, selectOption: rn, getValueKey: Qt, navigateOptions: St, dropdownMenuVisible: Oe, showTagList: En, collapseTagList: pn, tagStyle: qt, collapseTagStyle: _n, inputStyle: _r, popperRef: dt, inputRef: d, tooltipRef: u, tagTooltipRef: c, calculatorRef: f, prefixRef: h, suffixRef: p, selectRef: s, wrapperRef: S, selectionRef: l, scrollbarRef: y, menuRef: v, tagMenuRef: m, collapseItemRef: g }; }; var Lfe = X({ name: "ElOptions", setup(e, { slots: t }) { const n = Te(Pg); let r = []; return () => { var a, o; const i = (a = t.default) == null ? void 0 : a.call(t), s = []; function l(u) { to(u) && u.forEach((c) => { var d, f, h, p; const v = (d = (c == null ? void 0 : c.type) || {}) == null ? void 0 : d.name; v === "ElOptionGroup" ? l(!oo(c.children) && !to(c.children) && Va((f = c.children) == null ? void 0 : f.default) ? (h = c.children) == null ? void 0 : h.default() : c.children) : v === "ElOption" ? s.push((p = c.props) == null ? void 0 : p.value) : to(c.children) && l(c.children); }); } return i.length && l((o = i[0]) == null ? void 0 : o.children), Hy(s, r) || (r = s, n && (n.states.optionValues = s)), i; }; } }); const Nfe = Pn({ name: String, id: String, modelValue: { type: [Array, String, Number, Boolean, Object], default: void 0 }, autocomplete: { type: String, default: "off" }, automaticDropdown: Boolean, size: ch, effect: { type: Ot(String), default: "light" }, disabled: Boolean, clearable: Boolean, filterable: Boolean, allowCreate: Boolean, loading: Boolean, popperClass: { type: String, default: "" }, popperOptions: { type: Ot(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: Xa.teleported, persistent: { type: Boolean, default: !0 }, clearIcon: { type: Ru, default: l4 }, fitInputWidth: Boolean, suffixIcon: { type: Ru, default: $N }, tagType: { ...DC.type, default: "info" }, tagEffect: { ...DC.effect, default: "light" }, validateEvent: { type: Boolean, default: !0 }, remoteShowSuffix: Boolean, placement: { type: Ot(String), values: F2, default: "bottom-start" }, fallbackPlacements: { type: Ot(Array), default: ["bottom-start", "top-start", "right", "left"] }, appendTo: String, ...Gue, ...ic(["ariaLabel"]) }), y6 = "ElSelect", Mfe = X({ name: y6, componentName: y6, components: { ElSelectMenu: Afe, ElOption: T4, ElOptions: Lfe, ElTag: kpe, ElScrollbar: Ece, ElTooltip: L2, ElIcon: eo }, directives: { ClickOutside: oM }, props: Nfe, emits: [ Jr, c4, "remove-tag", "clear", "visible-change", "focus", "blur" ], setup(e, { emit: t }) { const n = F(() => { const { modelValue: o, multiple: i } = e, s = i ? [] : void 0; return to(o) ? i ? o : s : i ? s : o; }), r = tn({ ...Sr(e), modelValue: n }), a = Pfe(r, t); return rt(Pg, tn({ props: r, states: a.states, optionsArray: a.optionsArray, handleOptionSelect: a.handleOptionSelect, onOptionCreate: a.onOptionCreate, onOptionDestroy: a.onOptionDestroy, selectRef: a.selectRef, setSelected: a.setSelected })), { ...a, modelValue: n }; } }); function Bfe(e, t, n, r, a, o) { const i = lt("el-tag"), s = lt("el-tooltip"), l = lt("el-icon"), u = lt("el-option"), c = lt("el-options"), d = lt("el-scrollbar"), f = lt("el-select-menu"), h = Qb("click-outside"); return Xe((I(), j("div", { ref: "selectRef", class: H([e.nsSelect.b(), e.nsSelect.m(e.selectSize)]), [Jb(e.mouseEnterEventName)]: (p) => e.states.inputHovering = !0, onMouseleave: (p) => e.states.inputHovering = !1 }, [ ue(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: (p) => e.states.isBeforeHide = !1 }, { default: K(() => { var p; return [ W("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: Je(e.toggleMenu, ["prevent"]) }, [ e.$slots.prefix ? (I(), j("div", { key: 0, ref: "prefixRef", class: H(e.nsSelect.e("prefix")) }, [ he(e.$slots, "prefix") ], 2)) : ne("v-if", !0), W("div", { ref: "selectionRef", class: H([ e.nsSelect.e("selection"), e.nsSelect.is("near", e.multiple && !e.$slots.prefix && !!e.states.selected.length) ]) }, [ e.multiple ? he(e.$slots, "tag", { key: 0 }, () => [ (I(!0), j(Qe, null, Nt(e.showTagList, (v) => (I(), j("div", { key: e.getValueKey(v), class: H(e.nsSelect.e("selected-item")) }, [ ue(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: K(() => [ W("span", { class: H(e.nsSelect.e("tags-text")) }, [ he(e.$slots, "label", { label: v.currentLabel, value: v.value }, () => [ et(Fe(v.currentLabel), 1) ]) ], 2) ]), _: 2 }, 1032, ["closable", "size", "type", "effect", "style", "onClose"]) ], 2))), 128)), e.collapseTags && e.states.selected.length > e.maxCollapseTags ? (I(), de(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: K(() => [ W("div", { ref: "collapseItemRef", class: H(e.nsSelect.e("selected-item")) }, [ ue(i, { closable: !1, size: e.collapseTagSize, type: e.tagType, effect: e.tagEffect, "disable-transitions": "", style: Ye(e.collapseTagStyle) }, { default: K(() => [ W("span", { class: H(e.nsSelect.e("tags-text")) }, " + " + Fe(e.states.selected.length - e.maxCollapseTags), 3) ]), _: 1 }, 8, ["size", "type", "effect", "style"]) ], 2) ]), content: K(() => [ W("div", { ref: "tagMenuRef", class: H(e.nsSelect.e("selection")) }, [ (I(!0), j(Qe, null, Nt(e.collapseTagList, (v) => (I(), j("div", { key: e.getValueKey(v), class: H(e.nsSelect.e("selected-item")) }, [ ue(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: K(() => [ W("span", { class: H(e.nsSelect.e("tags-text")) }, [ he(e.$slots, "label", { label: v.currentLabel, value: v.value }, () => [ et(Fe(v.currentLabel), 1) ]) ], 2) ]), _: 2 }, 1032, ["closable", "size", "type", "effect", "onClose"]) ], 2))), 128)) ], 2) ]), _: 3 }, 8, ["disabled", "effect", "teleported"])) : ne("v-if", !0) ]) : ne("v-if", !0), e.selectDisabled ? ne("v-if", !0) : (I(), j("div", { key: 1, class: H([ e.nsSelect.e("selected-item"), e.nsSelect.e("input-wrapper"), e.nsSelect.is("hidden", !e.filterable) ]) }, [ Xe(W("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": ((p = e.hoverOption) == null ? void 0 : p.id) || "", "aria-controls": e.contentId, "aria-expanded": e.dropdownMenuVisible, "aria-label": e.ariaLabel, "aria-autocomplete": "none", "aria-haspopup": "listbox", onKeydown: [ gn(Je((v) => e.navigateOptions("next"), ["stop", "prevent"]), ["down"]), gn(Je((v) => e.navigateOptions("prev"), ["stop", "prevent"]), ["up"]), gn(Je(e.handleEsc, ["stop", "prevent"]), ["esc"]), gn(Je(e.selectOption, ["stop", "prevent"]), ["enter"]), gn(Je(e.deletePrevTag, ["stop"]), ["delete"]) ], onCompositionstart: e.handleCompositionStart, onCompositionupdate: e.handleCompositionUpdate, onCompositionend: e.handleCompositionEnd, onInput: e.onInput, onClick: Je(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"]), [ [xg, e.states.inputValue] ]), e.filterable ? (I(), j("span", { key: 0, ref: "calculatorRef", "aria-hidden": "true", class: H(e.nsSelect.e("input-calculator")), textContent: Fe(e.states.inputValue) }, null, 10, ["textContent"])) : ne("v-if", !0) ], 2)), e.shouldShowPlaceholder ? (I(), j("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 ? he(e.$slots, "label", { key: 0, label: e.currentPlaceholder, value: e.modelValue }, () => [ W("span", null, Fe(e.currentPlaceholder), 1) ]) : (I(), j("span", { key: 1 }, Fe(e.currentPlaceholder), 1)) ], 2)) : ne("v-if", !0) ], 2), W("div", { ref: "suffixRef", class: H(e.nsSelect.e("suffix")) }, [ e.iconComponent && !e.showClose ? (I(), de(l, { key: 0, class: H([e.nsSelect.e("caret"), e.nsSelect.e("icon"), e.iconReverse]) }, { default: K(() => [ (I(), de(ct(e.iconComponent))) ]), _: 1 }, 8, ["class"])) : ne("v-if", !0), e.showClose && e.clearIcon ? (I(), de(l, { key: 1, class: H([ e.nsSelect.e("caret"), e.nsSelect.e("icon"), e.nsSelect.e("clear") ]), onClick: e.handleClearClick }, { default: K(() => [ (I(), de(ct(e.clearIcon))) ]), _: 1 }, 8, ["class", "onClick"])) : ne("v-if", !0), e.validateState && e.validateIcon ? (I(), de(l, { key: 2, class: H([e.nsInput.e("icon"), e.nsInput.e("validateIcon")]) }, { default: K(() => [ (I(), de(ct(e.validateIcon))) ]), _: 1 }, 8, ["class"])) : ne("v-if", !0) ], 2) ], 10, ["onClick"]) ]; }), content: K(() => [ ue(f, { ref: "menuRef" }, { default: K(() => [ e.$slots.header ? (I(), j("div", { key: 0, class: H(e.nsSelect.be("dropdown", "header")), onClick: Je(() => { }, ["stop"]) }, [ he(e.$slots, "header") ], 10, ["onClick"])) : ne("v-if", !0), Xe(ue(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: K(() => [ e.showNewOption ? (I(), de(u, { key: 0, value: e.states.inputValue, created: !0 }, null, 8, ["value"])) : ne("v-if", !0), ue(c, null, { default: K(() => [ he(e.$slots, "default") ]), _: 3 }) ]), _: 3 }, 8, ["id", "wrap-class", "view-class", "class", "aria-label"]), [ [mt, e.states.options.size > 0 && !e.loading] ]), e.$slots.loading && e.loading ? (I(), j("div", { key: 1, class: H(e.nsSelect.be("dropdown", "loading")) }, [ he(e.$slots, "loading") ], 2)) : e.loading || e.filteredOptionsCount === 0 ? (I(), j("div", { key: 2, class: H(e.nsSelect.be("dropdown", "empty")) }, [ he(e.$slots, "empty", {}, () => [ W("span", null, Fe(e.emptyText), 1) ]) ], 2)) : ne("v-if", !0), e.$slots.footer ? (I(), j("div", { key: 3, class: H(e.nsSelect.be("dropdown", "footer")), onClick: Je(() => { }, ["stop"]) }, [ he(e.$slots, "footer") ], 10, ["onClick"])) : ne("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 Dfe = /* @__PURE__ */ Ht(Mfe, [["render", Bfe], ["__file", "select.vue"]]); const Rfe = X({ name: "ElOptionGroup", componentName: "ElOptionGroup", props: { label: String, disabled: Boolean }, setup(e) { const t = Zt("select"), n = U(null), r = tt(), a = U([]); rt(mM, tn({ ...Sr(e) })); const o = F(() => a.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 = gu(u), d = []; return c.forEach((f) => { var h, p; i(f) ? d.push(f.component.proxy) : (h = f.children) != null && h.length ? d.push(...s(f.children)) : (p = f.component) != null && p.subTree && d.push(...s(f.component.subTree)); }), d; }, l = () => { a.value = s(r.subTree); }; return nt(() => { l(); }), Ure(n, l, { attributes: !0, subtree: !0, childList: !0 }), { groupRef: n, visible: o, ns: t }; } }); function zfe(e, t, n, r, a, o) { return Xe((I(), j("ul", { ref: "groupRef", class: H(e.ns.be("group", "wrap")) }, [ W("li", { class: H(e.ns.be("group", "title")) }, Fe(e.label), 3), W("li", null, [ W("ul", { class: H(e.ns.b("group")) }, [ he(e.$slots, "default") ], 2) ]) ], 2)), [ [mt, e.visible] ]); } var yM = /* @__PURE__ */ Ht(Rfe, [["render", zfe], ["__file", "option-group.vue"]]); Xr(Dfe, { Option: T4, OptionGroup: yM }); Al(T4); Al(yM); const Vfe = Pn({ trigger: w0.trigger, placement: Wx.placement, disabled: w0.disabled, visible: Xa.visible, transition: Xa.transition, popperOptions: Wx.popperOptions, tabindex: Wx.tabindex, content: Xa.content, popperStyle: Xa.popperStyle, popperClass: Xa.popperClass, enterable: { ...Xa.enterable, default: !0 }, effect: { ...Xa.effect, default: "light" }, teleported: Xa.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 } }), jfe = { "update:visible": (e) => xf(e), "before-enter": () => !0, "before-leave": () => !0, "after-enter": () => !0, "after-leave": () => !0 }, Hfe = "onUpdate:visible", Ufe = X({ name: "ElPopover" }), qfe = /* @__PURE__ */ X({ ...Ufe, props: Vfe, emits: jfe, setup(e, { expose: t, emit: n }) { const r = e, a = F(() => r[Hfe]), o = Zt("popover"), i = U(), s = F(() => { var m; return (m = b(i)) == null ? void 0 : m.popperRef; }), l = F(() => [ { width: kf(r.width) }, r.popperStyle ]), u = F(() => [o.b(), r.popperClass, { [o.m("plain")]: !!r.content }]), c = F(() => r.transition === `${o.namespace.value}-fade-in-linear`), d = () => { var m; (m = i.value) == null || m.hide(); }, f = () => { n("before-enter"); }, h = () => { n("before-leave"); }, p = () => { n("after-enter"); }, v = () => { n("update:visible", !1), n("after-leave"); }; return t({ popperRef: s, hide: d }), (m, g) => (I(), de(b(L2), Bt({ 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": b(u), "popper-style": b(l), teleported: m.teleported, persistent: m.persistent, "gpu-acceleration": b(c), "onUpdate:visible": b(a), onBeforeShow: f, onBeforeHide: h, onShow: p, onHide: v }), { content: K(() => [ m.title ? (I(), j("div", { key: 0, class: H(b(o).e("title")), role: "title" }, Fe(m.title), 3)) : ne("v-if", !0), he(m.$slots, "default", {}, () => [ et(Fe(m.content), 1) ]) ]), default: K(() => [ m.$slots.reference ? he(m.$slots, "reference", { key: 0 }) : ne("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 Wfe = /* @__PURE__ */ Ht(qfe, [["__file", "popover.vue"]]); const b6 = (e, t) => { const n = t.arg || t.value, r = n == null ? void 0 : n.popperRef; r && (r.triggerRef = e); }; var Kfe = { mounted(e, t) { b6(e, t); }, updated(e, t) { b6(e, t); } }; const Gfe = "popover", Xfe = dle(Kfe, Gfe); Xr(Wfe, { directive: Xfe }); const ef = "$treeNodeId", w6 = function(e, t) { !t || t[ef] || Object.defineProperty(t, ef, { value: e.id, enumerable: !1, configurable: !1, writable: !1 }); }, O4 = function(e, t) { return e ? t[e] : t[ef]; }, RC = (e, t, n) => { const r = e.value.currentNode; n(); const a = e.value.currentNode; r !== a && t("current-change", a ? a.data : null, a); }, zC = (e) => { let t = !0, n = !0, r = !0; for (let a = 0, o = e.length; a < o; a++) { const i = e[a]; (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 }; }, Ev = function(e) { if (e.childNodes.length === 0 || e.loading) return; const { all: t, none: n, half: r } = zC(e.childNodes); t ? (e.checked = !0, e.indeterminate = !1) : r ? (e.checked = !1, e.indeterminate = !0) : n && (e.checked = !1, e.indeterminate = !1); const a = e.parent; !a || a.level === 0 || e.store.checkStrictly || Ev(a); }, zm = function(e, t) { const n = e.store.props, r = e.data || {}, a = n[t]; if (typeof a == "function") return a(r, e); if (typeof a == "string") return r[a]; if (typeof a > "u") { const o = r[t]; return o === void 0 ? "" : o; } }; let Yfe = 0, VC = class X1 { constructor(t) { this.id = Yfe++, 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) hd(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 o = zm(this, "isLeaf"); typeof o == "boolean" && (this.isLeafByUser = o); } 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) || w6(this, this.data), !this.data) return; const r = t.defaultExpandedKeys, a = t.key; a && r && r.includes(this.key) && this.expand(null, t.autoExpandParent), a && 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) || w6(this, t), this.data = t, this.childNodes = []; let n; this.level === 0 && Array.isArray(this.data) ? n = this.data : n = zm(this, "children") || []; for (let r = 0, a = n.length; r < a; r++) this.insertChild({ data: n[r] }); } get label() { return zm(this, "label"); } get key() { const t = this.store.key; return this.data ? this.data[t] : null; } get disabled() { return zm(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 X1)) { if (!r) { const a = this.getChildren(!0); a.includes(t.data) || (typeof n > "u" || n < 0 ? a.push(t.data) : a.splice(n, 0, t.data)); } Object.assign(t, { parent: this, store: this.store }), t = tn(new X1(t)), t instanceof X1 && 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 a = this.childNodes.indexOf(t); a > -1 && (this.store && this.store.deregisterNode(t), t.parent = null, this.childNodes.splice(a, 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 a = this.parent; for (; a.level > 0; ) a.expanded = !0, a = a.parent; } this.expanded = !0, t && t(), this.childNodes.forEach((a) => { a.canFocus = !0; }); }; this.shouldLoadData() ? this.loadData((a) => { Array.isArray(a) && (this.checked ? this.setChecked(!0, !0) : this.store.checkStrictly || Ev(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, a) { if (this.indeterminate = t === "half", this.checked = t === !0, this.store.checkStrictly) return; if (!(this.shouldLoadData() && !this.store.checkDescendants)) { const { all: i, allWithoutDisable: s } = zC(this.childNodes); !this.isLeaf && !i && s && (this.checked = !1, t = !1); const l = () => { if (n) { const u = this.childNodes; for (let f = 0, h = u.length; f < h; f++) { const p = u[f]; a = a || t !== !1; const v = p.disabled ? p.checked : a; p.setChecked(v, n, !0, a); } const { half: c, all: d } = zC(u); d || (this.checked = d, this.indeterminate = c); } }; if (this.shouldLoadData()) { this.loadData(() => { l(), Ev(this); }, { checked: t !== !1 }); return; } else l(); } const o = this.parent; !o || o.level === 0 || r || Ev(o); } getChildren(t = !1) { if (this.level === 0) return this.data; const n = this.data; if (!n) return null; const r = this.store.props; let a = "children"; return r && (a = r.children || "children"), n[a] === void 0 && (n[a] = null), t && !n[a] && (n[a] = []), n[a]; } updateChildren() { const t = this.getChildren() || [], n = this.childNodes.map((o) => o.data), r = {}, a = []; t.forEach((o, i) => { const s = o[ef]; s && n.findIndex((l) => l[ef] === s) >= 0 ? r[s] = { index: i, data: o } : a.push({ index: i, data: o }); }), this.store.lazy || n.forEach((o) => { r[o[ef]] || this.removeChildByData(o); }), a.forEach(({ index: o, data: i }) => { this.insertChild({ data: i }, o); }), 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 = (o) => { this.childNodes = [], this.doCreateChildren(o, n), this.loaded = !0, this.loading = !1, this.updateLeafState(), t && t.call(this, o); }, a = () => { this.loading = !1; }; this.store.load(this, r, a); } 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 || Ev(this); } }, Zfe = class { constructor(t) { this.currentNode = null, this.currentNodeKey = null; for (const n in t) hd(t, n) && (this[n] = t[n]); this.nodesMap = {}; } initialize() { if (this.root = new VC({ 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, a = function(o) { const i = o.root ? o.root.childNodes : o.childNodes; if (i.forEach((s) => { s.visible = n.call(s, t, s.data, s), a(s); }), !o.visible && i.length) { let s = !0; s = !i.some((l) => l.visible), o.root ? o.root.visible = s === !1 : o.visible = s === !1; } t && o.visible && !o.isLeaf && (!r || o.loaded) && o.expand(); }; a(this); } setData(t) { t !== this.root.data ? (this.nodesMap = {}, this.root.setData(t), this._initDefaultCheckedNodes()) : this.root.updateChildren(); } getNode(t) { if (t instanceof VC) return t; const n = ja(t) ? O4(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 = Uy(n) ? this.root : this.getNode(n); r && r.insertChild({ data: t }); } _initDefaultCheckedNodes() { const t = this.defaultCheckedKeys || [], n = this.nodesMap; t.forEach((r) => { const a = n[r]; a && a.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 = [], a = function(o) { (o.root ? o.root.childNodes : o.childNodes).forEach((i) => { (i.checked || n && i.indeterminate) && (!t || t && i.isLeaf) && r.push(i.data), a(i); }); }; return a(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((a) => { a.indeterminate && t.push(a.data), n(a); }); }; return n(this), t; } getHalfCheckedKeys() { return this.getHalfCheckedNodes().map((t) => (t || {})[this.key]); } _getAllNodes() { const t = [], n = this.nodesMap; for (const r in n) hd(n, r) && t.push(n[r]); return t; } updateChildren(t, n) { const r = this.nodesMap[t]; if (!r) return; const a = r.childNodes; for (let o = a.length - 1; o >= 0; o--) { const i = a[o]; this.remove(i.data); } for (let o = 0, i = n.length; o < i; o++) { const s = n[o]; this.append(s, r.data); } } _setCheckedKeys(t, n = !1, r) { const a = this._getAllNodes().sort((l, u) => l.level - u.level), o = /* @__PURE__ */ Object.create(null), i = Object.keys(r); a.forEach((l) => l.setChecked(!1, !1)); const s = (l) => { l.childNodes.forEach((u) => { var c; o[u.data[t]] = !0, (c = u.childNodes) != null && c.length && s(u); }); }; for (let l = 0, u = a.length; l < u; l++) { const c = a[l], d = c.data[t].toString(); if (!i.includes(d)) { c.checked && !o[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 f = function(h) { h.childNodes.forEach((p) => { p.isLeaf || p.setChecked(!1, !1), f(p); }); }; f(c); } } } setCheckedNodes(t, n = !1) { const r = this.key, a = {}; t.forEach((o) => { a[(o || {})[r]] = !0; }), this._setCheckedKeys(r, n, a); } setCheckedKeys(t, n = !1) { this.defaultCheckedKeys = t; const r = this.key, a = {}; t.forEach((o) => { a[o] = !0; }), this._setCheckedKeys(r, n, a); } 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 a = this.getNode(t); a && a.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], a = this.nodesMap[r]; this.setCurrentNode(a), 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 Qfe = X({ name: "ElTreeNodeContent", props: { node: { type: Object, required: !0 }, renderContent: Function }, setup(e) { const t = Zt("tree"), n = Te("NodeInstance"), r = Te("RootTree"); return () => { const a = e.node, { data: o, store: i } = a; return e.renderContent ? e.renderContent(sn, { _self: n, node: a, data: o, store: i }) : he(r.ctx.slots, "default", { node: a, data: o }, () => [ sn("span", { class: t.be("node", "label") }, [a.label]) ]); }; } }); var Jfe = /* @__PURE__ */ Ht(Qfe, [["__file", "tree-node-content.vue"]]); function bM(e) { const t = Te("TreeNodeMap", null), n = { treeNodeExpand: (r) => { e.node !== r && e.node.collapse(); }, children: [] }; return t && t.children.push(n), rt("TreeNodeMap", n), { broadcastExpanded: (r) => { if (e.accordion) for (const a of n.children) a.treeNodeExpand(r); } }; } const wM = Symbol("dragEvents"); function ehe({ props: e, ctx: t, el$: n, dropIndicator$: r, store: a }) { const o = Zt("tree"), i = U({ showDropIndicator: !1, draggingNode: null, dropNode: null, allowDrop: !0, dropType: null }); return rt(wM, { 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 && Mx(c.$el, o.is("drop-inner")); const d = i.value.draggingNode; if (!d || !u) return; let f = !0, h = !0, p = !0, v = !0; typeof e.allowDrop == "function" && (f = e.allowDrop(d.node, u.node, "prev"), v = h = e.allowDrop(d.node, u.node, "inner"), p = e.allowDrop(d.node, u.node, "next")), s.dataTransfer.dropEffect = h || f || p ? "move" : "none", (f || h || p) && (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)), f || h || p ? i.value.dropNode = u : i.value.dropNode = null, u.node.nextSibling === d.node && (p = !1), u.node.previousSibling === d.node && (f = !1), u.node.contains(d.node, !1) && (h = !1), (d.node === u.node || d.node.contains(u.node)) && (f = !1, h = !1, p = !1); const m = u.$el.querySelector(`.${o.be("node", "content")}`).getBoundingClientRect(), g = n.value.getBoundingClientRect(); let y; const x = f ? h ? 0.25 : p ? 0.45 : 1 : -1, w = p ? h ? 0.75 : f ? 0.55 : 0 : 1; let k = -9999; const C = s.clientY - m.top; C < m.height * x ? y = "before" : C > m.height * w ? y = "after" : h ? y = "inner" : y = "none"; const S = u.$el.querySelector(`.${o.be("node", "expand-icon")}`).getBoundingClientRect(), _ = r.value; y === "before" ? k = S.top - g.top : y === "after" && (k = S.bottom - g.top), _.style.top = `${k}px`, _.style.left = `${S.right - g.left}px`, y === "inner" ? Gse(u.$el, o.is("drop-inner")) : Mx(u.$el, o.is("drop-inner")), i.value.showDropIndicator = y === "before" || y === "after", i.value.allowDrop = i.value.showDropIndicator || v, i.value.dropType = y, 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" && (a.value.registerNode(d), a.value.key && l.node.eachNode((f) => { var h; (h = a.value.nodesMap[f.data[a.value.key]]) == null || h.setChecked(f.checked, !a.value.checkStrictly); })), Mx(c.$el, o.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 the = X({ name: "ElTreeNode", components: { ElCollapseTransition: Mpe, ElCheckbox: mpe, NodeContent: Jfe, ElIcon: eo, Loading: u4 }, props: { node: { type: VC, default: () => ({}) }, props: { type: Object, default: () => ({}) }, accordion: Boolean, renderContent: Function, renderAfterExpand: Boolean, showCheckbox: { type: Boolean, default: !1 } }, emits: ["node-expand"], setup(e, t) { const n = Zt("tree"), { broadcastExpanded: r } = bM(e), a = Te("RootTree"), o = U(!1), i = U(!1), s = U(null), l = U(null), u = U(null), c = Te(wM), d = tt(); rt("NodeInstance", d), a || Br("Tree", "Can not find node's tree."), e.node.expanded && (o.value = !0, i.value = !0); const f = a.props.props.children || "children"; be(() => { const w = e.node.data[f]; return w && [...w]; }, () => { e.node.updateChildren(); }), be(() => e.node.indeterminate, (w) => { v(e.node.checked, w); }), be(() => e.node.checked, (w) => { v(w, e.node.indeterminate); }), be(() => e.node.childNodes.length, () => e.node.reInitChecked()), be(() => e.node.expanded, (w) => { Ue(() => o.value = w), w && (i.value = !0); }); const h = (w) => O4(a.props.nodeKey, w.data), p = (w) => { const k = e.props.class; if (!k) return {}; let C; if (Va(k)) { const { data: S } = w; C = k(S, w); } else C = k; return oo(C) ? { [C]: !0 } : C; }, v = (w, k) => { (s.value !== w || l.value !== k) && a.ctx.emit("check-change", e.node.data, w, k), s.value = w, l.value = k; }, m = (w) => { RC(a.store, a.ctx.emit, () => a.store.value.setCurrentNode(e.node)), a.currentNode.value = e.node, a.props.expandOnClickNode && y(), a.props.checkOnClickNode && !e.node.disabled && x(null, { target: { checked: !e.node.checked } }), a.ctx.emit("node-click", e.node.data, e.node, d, w); }, g = (w) => { a.instance.vnode.props.onNodeContextmenu && (w.stopPropagation(), w.preventDefault()), a.ctx.emit("node-contextmenu", w, e.node.data, e.node, d); }, y = () => { e.node.isLeaf || (o.value ? (a.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, !a.props.checkStrictly), Ue(() => { const C = a.store.value; a.ctx.emit("check", e.node.data, { checkedNodes: C.getCheckedNodes(), checkedKeys: C.getCheckedKeys(), halfCheckedNodes: C.getHalfCheckedNodes(), halfCheckedKeys: C.getHalfCheckedKeys() }); }); }; return { ns: n, node$: u, tree: a, expanded: o, childNodeRendered: i, oldChecked: s, oldIndeterminate: l, getNodeKey: h, getNodeClass: p, handleSelectChange: v, handleClick: m, handleContextMenu: g, handleExpandIconClick: y, handleCheckChange: x, handleChildNodeExpand: (w, k, C) => { r(k), a.ctx.emit("node-expand", w, k, C); }, handleDragStart: (w) => { a.props.draggable && c.treeNodeDragStart({ event: w, treeNode: e }); }, handleDragOver: (w) => { w.preventDefault(), a.props.draggable && c.treeNodeDragOver({ event: w, treeNode: { $el: u.value, node: e.node } }); }, handleDrop: (w) => { w.preventDefault(); }, handleDragEnd: (w) => { a.props.draggable && c.treeNodeDragEnd(w); }, CaretRight: Qse }; } }); function nhe(e, t, n, r, a, o) { const i = lt("el-icon"), s = lt("el-checkbox"), l = lt("loading"), u = lt("node-content"), c = lt("el-tree-node"), d = lt("el-collapse-transition"); return Xe((I(), j("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: Je(e.handleClick, ["stop"]), onContextmenu: e.handleContextMenu, onDragstart: Je(e.handleDragStart, ["stop"]), onDragover: Je(e.handleDragOver, ["stop"]), onDragend: Je(e.handleDragEnd, ["stop"]), onDrop: Je(e.handleDrop, ["stop"]) }, [ W("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 ? (I(), de(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: Je(e.handleExpandIconClick, ["stop"]) }, { default: K(() => [ (I(), de(ct(e.tree.props.icon || e.CaretRight))) ]), _: 1 }, 8, ["class", "onClick"])) : ne("v-if", !0), e.showCheckbox ? (I(), de(s, { key: 1, "model-value": e.node.checked, indeterminate: e.node.indeterminate, disabled: !!e.node.disabled, onClick: Je(() => { }, ["stop"]), onChange: e.handleCheckChange }, null, 8, ["model-value", "indeterminate", "disabled", "onClick", "onChange"])) : ne("v-if", !0), e.node.loading ? (I(), de(i, { key: 2, class: H([e.ns.be("node", "loading-icon"), e.ns.is("loading")]) }, { default: K(() => [ ue(l) ]), _: 1 }, 8, ["class"])) : ne("v-if", !0), ue(u, { node: e.node, "render-content": e.renderContent }, null, 8, ["node", "render-content"]) ], 6), ue(d, null, { default: K(() => [ !e.renderAfterExpand || e.childNodeRendered ? Xe((I(), j("div", { key: 0, class: H(e.ns.be("node", "children")), role: "group", "aria-expanded": e.expanded }, [ (I(!0), j(Qe, null, Nt(e.node.childNodes, (f) => (I(), de(c, { key: e.getNodeKey(f), "render-content": e.renderContent, "render-after-expand": e.renderAfterExpand, "show-checkbox": e.showCheckbox, node: f, 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"])), [ [mt, e.expanded] ]) : ne("v-if", !0) ]), _: 1 }) ], 42, ["aria-expanded", "aria-disabled", "aria-checked", "draggable", "data-key", "onClick", "onContextmenu", "onDragstart", "onDragover", "onDragend", "onDrop"])), [ [mt, e.node.visible] ]); } var rhe = /* @__PURE__ */ Ht(the, [["render", nhe], ["__file", "tree-node.vue"]]); function ahe({ el$: e }, t) { const n = Zt("tree"), r = dn([]), a = dn([]); nt(() => { o(); }), jd(() => { r.value = Array.from(e.value.querySelectorAll("[role=treeitem]")), a.value = Array.from(e.value.querySelectorAll("input[type=checkbox]")); }), be(a, (i) => { i.forEach((s) => { s.setAttribute("tabindex", "-1"); }); }), Wo(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 ([Fr.up, Fr.down].includes(l)) { if (i.preventDefault(), l === Fr.up) { c = u === -1 ? 0 : u !== 0 ? u - 1 : r.value.length - 1; const f = c; for (; !t.value.getNode(r.value[c].dataset.key).canFocus; ) { if (c--, c === f) { c = -1; break; } c < 0 && (c = r.value.length - 1); } } else { c = u === -1 ? 0 : u < r.value.length - 1 ? u + 1 : 0; const f = c; for (; !t.value.getNode(r.value[c].dataset.key).canFocus; ) { if (c++, c === f) { c = -1; break; } c >= r.value.length && (c = 0); } } c !== -1 && r.value[c].focus(); } [Fr.left, Fr.right].includes(l) && (i.preventDefault(), s.click()); const d = s.querySelector('[type="checkbox"]'); [Fr.enter, Fr.space].includes(l) && d && (i.preventDefault(), d.click()); }); const o = () => { var i; r.value = Array.from(e.value.querySelectorAll(`.${n.is("focusable")}[role=treeitem]`)), a.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 ohe = X({ name: "ElTree", components: { ElTreeNode: rhe }, 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: Ru } }, 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 } = $2(), r = Zt("tree"), a = Te(Pg, null), o = U(new Zfe({ 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 })); o.value.initialize(); const i = U(o.value.root), s = U(null), l = U(null), u = U(null), { broadcastExpanded: c } = bM(e), { dragState: d } = ehe({ props: e, ctx: t, el$: l, dropIndicator$: u, store: o }); ahe({ el$: l }, o); const f = F(() => { const { childNodes: M } = i.value, z = a ? a.hasFilteredOptions !== 0 : !1; return (!M || M.length === 0 || M.every(({ visible: Z }) => !Z)) && !z; }); be(() => e.currentNodeKey, (M) => { o.value.setCurrentNodeKey(M); }), be(() => e.defaultCheckedKeys, (M) => { o.value.setDefaultCheckedKey(M); }), be(() => e.defaultExpandedKeys, (M) => { o.value.setDefaultExpandedKeys(M); }), be(() => e.data, (M) => { o.value.setData(M); }, { deep: !0 }), be(() => e.checkStrictly, (M) => { o.value.checkStrictly = M; }); const h = (M) => { if (!e.filterNodeMethod) throw new Error("[Tree] filterNodeMethod is required when filter"); o.value.filter(M); }, p = (M) => O4(e.nodeKey, M.data), v = (M) => { if (!e.nodeKey) throw new Error("[Tree] nodeKey is required in getNodePath"); const z = o.value.getNode(M); if (!z) return []; const Z = [z.data]; let G = z.parent; for (; G && G !== i.value; ) Z.push(G.data), G = G.parent; return Z.reverse(); }, m = (M, z) => o.value.getCheckedNodes(M, z), g = (M) => o.value.getCheckedKeys(M), y = () => { const M = o.value.getCurrentNode(); return M ? M.data : null; }, x = () => { if (!e.nodeKey) throw new Error("[Tree] nodeKey is required in getCurrentKey"); const M = y(); return M ? M[e.nodeKey] : null; }, w = (M, z) => { if (!e.nodeKey) throw new Error("[Tree] nodeKey is required in setCheckedNodes"); o.value.setCheckedNodes(M, z); }, k = (M, z) => { if (!e.nodeKey) throw new Error("[Tree] nodeKey is required in setCheckedKeys"); o.value.setCheckedKeys(M, z); }, C = (M, z, Z) => { o.value.setChecked(M, z, Z); }, S = () => o.value.getHalfCheckedNodes(), _ = () => o.value.getHalfCheckedKeys(), T = (M, z = !0) => { if (!e.nodeKey) throw new Error("[Tree] nodeKey is required in setCurrentNode"); RC(o, t.emit, () => { c(M), o.value.setUserCurrentNode(M, z); }); }, O = (M, z = !0) => { if (!e.nodeKey) throw new Error("[Tree] nodeKey is required in setCurrentKey"); RC(o, t.emit, () => { c(), o.value.setCurrentNodeKey(M, z); }); }, $ = (M) => o.value.getNode(M), A = (M) => { o.value.remove(M); }, N = (M, z) => { o.value.append(M, z); }, L = (M, z) => { o.value.insertBefore(M, z); }, R = (M, z) => { o.value.insertAfter(M, z); }, P = (M, z, Z) => { c(z), t.emit("node-expand", M, z, Z); }, B = (M, z) => { if (!e.nodeKey) throw new Error("[Tree] nodeKey is required in updateKeyChild"); o.value.updateChildren(M, z); }; return rt("RootTree", { ctx: t, props: e, store: o, root: i, currentNode: s, instance: tt() }), rt(b0, void 0), { ns: r, store: o, root: i, currentNode: s, dragState: d, el$: l, dropIndicator$: u, isEmpty: f, filter: h, getNodeKey: p, getNodePath: v, getCheckedNodes: m, getCheckedKeys: g, getCurrentNode: y, getCurrentKey: x, setCheckedNodes: w, setCheckedKeys: k, setChecked: C, getHalfCheckedNodes: S, getHalfCheckedKeys: _, setCurrentNode: T, setCurrentKey: O, t: n, getNode: $, remove: A, append: N, insertBefore: L, insertAfter: R, handleNodeExpand: P, updateKeyChildren: B }; } }); function ihe(e, t, n, r, a, o) { const i = lt("el-tree-node"); return I(), j("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" }, [ (I(!0), j(Qe, null, Nt(e.root.childNodes, (s) => (I(), de(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 ? (I(), j("div", { key: 0, class: H(e.ns.e("empty-block")) }, [ he(e.$slots, "empty", {}, () => { var s; return [ W("span", { class: H(e.ns.e("empty-text")) }, Fe((s = e.emptyText) != null ? s : e.t("el.tree.emptyText")), 3) ]; }) ], 2)) : ne("v-if", !0), Xe(W("div", { ref: "dropIndicator$", class: H(e.ns.e("drop-indicator")) }, null, 2), [ [mt, e.dragState.showDropIndicator] ]) ], 2); } var she = /* @__PURE__ */ Ht(ohe, [["render", ihe], ["__file", "tree.vue"]]); Xr(she); const xM = (e, t) => { const n = e.__vccOpts || e; for (const [r, a] of t) n[r] = a; return n; }; function Dr(e) { "@babel/helpers - typeof"; return Dr = 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; }, Dr(e); } function $4(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function"); } function lhe(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 F4(e, t, n) { return t && lhe(e.prototype, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } function kM(e, t, n) { return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e; } function _i(e, t) { return uhe(e) || che(e, t) || CM(e, t) || dhe(); } function uhe(e) { if (Array.isArray(e)) return e; } function che(e, t) { var n = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"]; if (n != null) { var r = [], a = !0, o = !1, i, s; try { for (n = n.call(e); !(a = (i = n.next()).done) && (r.push(i.value), !(t && r.length === t)); a = !0) ; } catch (l) { o = !0, s = l; } finally { try { !a && n.return != null && n.return(); } finally { if (o) throw s; } } return r; } } function CM(e, t) { if (e) { if (typeof e == "string") return x6(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 x6(e, t); } } function x6(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 dhe() { 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 SM(e, t) { var n = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"]; if (!n) { if (Array.isArray(e) || (n = CM(e)) || t) { n && (e = n); var r = 0, a = function() { }; return { s: a, n: function() { return r >= e.length ? { done: !0 } : { done: !1, value: e[r++] }; }, e: function(l) { throw l; }, f: a }; } 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 o = !0, i = !1, s; return { s: function() { n = n.call(e); }, n: function() { var l = n.next(); return o = l.done, l; }, e: function(l) { i = !0, s = l; }, f: function() { try { !o && n.return != null && n.return(); } finally { if (i) throw s; } } }; } var Tr = typeof window > "u" ? null : window, k6 = Tr ? Tr.navigator : null; Tr && Tr.document; var phe = Dr(""), EM = Dr({}), fhe = Dr(function() { }), hhe = typeof HTMLElement > "u" ? "undefined" : Dr(HTMLElement), Lg = function(e) { return e && e.instanceString && ir(e.instanceString) ? e.instanceString() : null; }, xt = function(e) { return e != null && Dr(e) == phe; }, ir = function(e) { return e != null && Dr(e) === fhe; }, zn = function(e) { return !$o(e) && (Array.isArray ? Array.isArray(e) : e != null && e instanceof Array); }, Cn = function(e) { return e != null && Dr(e) === EM && !zn(e) && e.constructor === Object; }, vhe = function(e) { return e != null && Dr(e) === EM; }, ot = function(e) { return e != null && Dr(e) === Dr(1) && !isNaN(e); }, ghe = function(e) { return ot(e) && Math.floor(e) === e; }, Ky = function(e) { if (hhe !== "undefined") return e != null && e instanceof HTMLElement; }, $o = function(e) { return Ng(e) || _M(e); }, Ng = function(e) { return Lg(e) === "collection" && e._private.single; }, _M = function(e) { return Lg(e) === "collection" && !e._private.single; }, A4 = function(e) { return Lg(e) === "core"; }, TM = function(e) { return Lg(e) === "stylesheet"; }, mhe = function(e) { return Lg(e) === "event"; }, zu = function(e) { return e == null ? !0 : !!(e === "" || e.match(/^\s+$/)); }, yhe = function(e) { return typeof HTMLElement > "u" ? !1 : e instanceof HTMLElement; }, bhe = function(e) { return Cn(e) && ot(e.x1) && ot(e.x2) && ot(e.y1) && ot(e.y2); }, whe = function(e) { return vhe(e) && ir(e.then); }, xhe = function() { return k6 && k6.userAgent.match(/msie|trident|edge/i); }, k0 = function(e, t) { t || (t = function() { if (arguments.length === 1) return arguments[0]; if (arguments.length === 0) return "undefined"; for (var r = [], a = 0; a < arguments.length; a++) r.push(arguments[a]); return r.join("$"); }); var n = function r() { var a = this, o = arguments, i, s = t.apply(a, o), l = r.cache; return (i = l[s]) || (i = l[s] = e.apply(a, o)), i; }; return n.cache = {}, n; }, I4 = k0(function(e) { return e.replace(/([A-Z])/g, function(t) { return "-" + t.toLowerCase(); }); }), N2 = k0(function(e) { return e.replace(/(-\w)/g, function(t) { return t[1].toUpperCase(); }); }), OM = k0(function(e, t) { return e + t[0].toUpperCase() + t.substring(1); }, function(e, t) { return e + "$" + t; }), C6 = function(e) { return zu(e) ? e : e.charAt(0).toUpperCase() + e.substring(1); }, Pr = "(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))", khe = "rgb[a]?\\((" + Pr + "[%]?)\\s*,\\s*(" + Pr + "[%]?)\\s*,\\s*(" + Pr + "[%]?)(?:\\s*,\\s*(" + Pr + "))?\\)", Che = "rgb[a]?\\((?:" + Pr + "[%]?)\\s*,\\s*(?:" + Pr + "[%]?)\\s*,\\s*(?:" + Pr + "[%]?)(?:\\s*,\\s*(?:" + Pr + "))?\\)", She = "hsl[a]?\\((" + Pr + ")\\s*,\\s*(" + Pr + "[%])\\s*,\\s*(" + Pr + "[%])(?:\\s*,\\s*(" + Pr + "))?\\)", Ehe = "hsl[a]?\\((?:" + Pr + ")\\s*,\\s*(?:" + Pr + "[%])\\s*,\\s*(?:" + Pr + "[%])(?:\\s*,\\s*(?:" + Pr + "))?\\)", _he = "\\#[0-9a-fA-F]{3}", The = "\\#[0-9a-fA-F]{6}", $M = function(e, t) { return e < t ? -1 : e > t ? 1 : 0; }, Ohe = function(e, t) { return -1 * $M(e, t); }, Ft = 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 a = Object.keys(r), o = 0; o < a.length; o++) { var i = a[o]; e[i] = r[i]; } } return e; }, $he = function(e) { if (!(!(e.length === 4 || e.length === 7) || e[0] !== "#")) { var t = e.length === 4, n, r, a, o = 16; return t ? (n = parseInt(e[1] + e[1], o), r = parseInt(e[2] + e[2], o), a = parseInt(e[3] + e[3], o)) : (n = parseInt(e[1] + e[2], o), r = parseInt(e[3] + e[4], o), a = parseInt(e[5] + e[6], o)), [n, r, a]; } }, Fhe = function(e) { var t, n, r, a, o, i, s, l; function u(h, p, v) { return v < 0 && (v += 1), v > 1 && (v -= 1), v < 1 / 6 ? h + (p - h) * 6 * v : v < 1 / 2 ? p : v < 2 / 3 ? h + (p - h) * (2 / 3 - v) * 6 : h; } var c = new RegExp("^" + She + "$").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, a = parseFloat(c[3]), a < 0 || a > 100) || (a = a / 100, o = c[4], o !== void 0 && (o = parseFloat(o), o < 0 || o > 1))) return; if (r === 0) i = s = l = Math.round(a * 255); else { var d = a < 0.5 ? a * (1 + r) : a + r - a * r, f = 2 * a - d; i = Math.round(255 * u(f, d, n + 1 / 3)), s = Math.round(255 * u(f, d, n)), l = Math.round(255 * u(f, d, n - 1 / 3)); } t = [i, s, l, o]; } return t; }, Ahe = function(e) { var t, n = new RegExp("^" + khe + "$").exec(e); if (n) { t = []; for (var r = [], a = 1; a <= 3; a++) { var o = n[a]; if (o[o.length - 1] === "%" && (r[a] = !0), o = parseFloat(o), r[a] && (o = o / 100 * 255), o < 0 || o > 255) return; t.push(Math.floor(o)); } 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; }, Ihe = function(e) { return Lhe[e.toLowerCase()]; }, Phe = function(e) { return (zn(e) ? e : null) || Ihe(e) || $he(e) || Ahe(e) || Fhe(e); }, Lhe = { // 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] }, FM = function(e) { for (var t = e.map, n = e.keys, r = n.length, a = 0; a < r; a++) { var o = n[a]; if (Cn(o)) throw Error("Tried to set map with object key"); a < n.length - 1 ? (t[o] == null && (t[o] = {}), t = t[o]) : t[o] = e.value; } }, AM = function(e) { for (var t = e.map, n = e.keys, r = n.length, a = 0; a < r; a++) { var o = n[a]; if (Cn(o)) throw Error("Tried to get map with object key"); if (t = t[o], t == null) return t; } return t; }; function Nhe(e) { var t = typeof e; return e != null && (t == "object" || t == "function"); } var md = Nhe, _v = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}; function Mhe(e, t) { return t = { exports: {} }, e(t, t.exports), t.exports; } var Bhe = typeof _v == "object" && _v && _v.Object === Object && _v, Dhe = Bhe, Rhe = typeof self == "object" && self && self.Object === Object && self, zhe = Dhe || Rhe || Function("return this")(), M2 = zhe, Vhe = function() { return M2.Date.now(); }, Kx = Vhe, jhe = /\s/; function Hhe(e) { for (var t = e.length; t-- && jhe.test(e.charAt(t)); ) ; return t; } var Uhe = Hhe, qhe = /^\s+/; function Whe(e) { return e && e.slice(0, Uhe(e) + 1).replace(qhe, ""); } var Khe = Whe, Ghe = M2.Symbol, Of = Ghe, IM = Object.prototype, Xhe = IM.hasOwnProperty, Yhe = IM.toString, Jh = Of ? Of.toStringTag : void 0; function Zhe(e) { var t = Xhe.call(e, Jh), n = e[Jh]; try { e[Jh] = void 0; var r = !0; } catch { } var a = Yhe.call(e); return r && (t ? e[Jh] = n : delete e[Jh]), a; } var Qhe = Zhe, Jhe = Object.prototype, eve = Jhe.toString; function tve(e) { return eve.call(e); } var nve = tve, rve = "[object Null]", ave = "[object Undefined]", S6 = Of ? Of.toStringTag : void 0; function ove(e) { return e == null ? e === void 0 ? ave : rve : S6 && S6 in Object(e) ? Qhe(e) : nve(e); } var PM = ove; function ive(e) { return e != null && typeof e == "object"; } var sve = ive, lve = "[object Symbol]"; function uve(e) { return typeof e == "symbol" || sve(e) && PM(e) == lve; } var Mg = uve, E6 = NaN, cve = /^[-+]0x[0-9a-f]+$/i, dve = /^0b[01]+$/i, pve = /^0o[0-7]+$/i, fve = parseInt; function hve(e) { if (typeof e == "number") return e; if (Mg(e)) return E6; if (md(e)) { var t = typeof e.valueOf == "function" ? e.valueOf() : e; e = md(t) ? t + "" : t; } if (typeof e != "string") return e === 0 ? e : +e; e = Khe(e); var n = dve.test(e); return n || pve.test(e) ? fve(e.slice(2), n ? 2 : 8) : cve.test(e) ? E6 : +e; } var _6 = hve, vve = "Expected a function", gve = Math.max, mve = Math.min; function yve(e, t, n) { var r, a, o, i, s, l, u = 0, c = !1, d = !1, f = !0; if (typeof e != "function") throw new TypeError(vve); t = _6(t) || 0, md(n) && (c = !!n.leading, d = "maxWait" in n, o = d ? gve(_6(n.maxWait) || 0, t) : o, f = "trailing" in n ? !!n.trailing : f); function h(C) { var S = r, _ = a; return r = a = void 0, u = C, i = e.apply(_, S), i; } function p(C) { return u = C, s = setTimeout(g, t), c ? h(C) : i; } function v(C) { var S = C - l, _ = C - u, T = t - S; return d ? mve(T, o - _) : T; } function m(C) { var S = C - l, _ = C - u; return l === void 0 || S >= t || S < 0 || d && _ >= o; } function g() { var C = Kx(); if (m(C)) return y(C); s = setTimeout(g, v(C)); } function y(C) { return s = void 0, f && r ? h(C) : (r = a = void 0, i); } function x() { s !== void 0 && clearTimeout(s), u = 0, r = l = a = s = void 0; } function w() { return s === void 0 ? i : y(Kx()); } function k() { var C = Kx(), S = m(C); if (r = arguments, a = this, l = C, S) { if (s === void 0) return p(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 B2 = yve, Gx = Tr ? Tr.performance : null, LM = Gx && Gx.now ? function() { return Gx.now(); } : function() { return Date.now(); }, bve = function() { if (Tr) { if (Tr.requestAnimationFrame) return function(e) { Tr.requestAnimationFrame(e); }; if (Tr.mozRequestAnimationFrame) return function(e) { Tr.mozRequestAnimationFrame(e); }; if (Tr.webkitRequestAnimationFrame) return function(e) { Tr.webkitRequestAnimationFrame(e); }; if (Tr.msRequestAnimationFrame) return function(e) { Tr.msRequestAnimationFrame(e); }; } return function(e) { e && setTimeout(function() { e(LM()); }, 1e3 / 60); }; }(), Gy = function(e) { return bve(e); }, yl = LM, Kp = 9261, NM = 65599, Tv = 5381, MM = function(e) { for (var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Kp, n = t, r; r = e.next(), !r.done; ) n = n * NM + r.value | 0; return n; }, C0 = function(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Kp; return t * NM + e | 0; }, S0 = function(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Tv; return (t << 5) + t + e | 0; }, wve = function(e, t) { return e * 2097152 + t; }, Wl = function(e) { return e[0] * 2097152 + e[1]; }, Vm = function(e, t) { return [C0(e[0], t[0]), S0(e[1], t[1])]; }, xve = function(e, t) { var n = { value: 0, done: !1 }, r = 0, a = e.length, o = { next: function() { return r < a ? n.value = e[r++] : n.done = !0, n; } }; return MM(o, t); }, yd = function(e, t) { var n = { value: 0, done: !1 }, r = 0, a = e.length, o = { next: function() { return r < a ? n.value = e.charCodeAt(r++) : n.done = !0, n; } }; return MM(o, t); }, BM = function() { return kve(arguments); }, kve = function(e) { for (var t, n = 0; n < e.length; n++) { var r = e[n]; n === 0 ? t = yd(r) : t = yd(r, t); } return t; }, Cve = !0, Sve = console.warn != null, Eve = console.trace != null, P4 = Number.MAX_SAFE_INTEGER || 9007199254740991, DM = function() { return !0; }, Xy = function() { return !1; }, T6 = function() { return 0; }, L4 = function() { }, dr = function(e) { throw new Error(e); }, _ve = function(e) { return Cve; }, Fn = function(e) { _ve() && (Sve ? console.warn(e) : (console.log(e), Eve && console.trace())); }, Tve = function(e) { return Ft({}, e); }, cs = function(e) { return e == null ? e : zn(e) ? e.slice() : Cn(e) ? Tve(e) : e; }, Ove = function(e) { return e.slice(); }, RM = 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; }, $ve = {}, zM = function() { return $ve; }, ga = function(e) { var t = Object.keys(e); return function(n) { for (var r = {}, a = 0; a < t.length; a++) { var o = t[a], i = n == null ? void 0 : n[o]; r[o] = i === void 0 ? e[o] : i; } return r; }; }, Vu = function(e, t, n) { for (var r = e.length - 1; r >= 0; r--) e[r] === t && e.splice(r, 1); }, N4 = function(e) { e.splice(0, e.length); }, Fve = function(e, t) { for (var n = 0; n < t.length; n++) { var r = t[n]; e.push(r); } }, Ii = function(e, t, n) { return n && (t = OM(n, t)), e[t]; }, mu = function(e, t, n, r) { n && (t = OM(n, t)), e[t] = r; }, Ave = /* @__PURE__ */ function() { function e() { $4(this, e), this._obj = {}; } return F4(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; }(), ds = typeof Map < "u" ? Map : Ave, Ive = "undefined", Pve = /* @__PURE__ */ function() { function e(t) { if ($4(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 F4(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; }(), ph = (typeof Set > "u" ? "undefined" : Dr(Set)) !== Ive ? Set : Pve, D2 = function(e, t) { var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !0; if (e === void 0 || t === void 0 || !A4(e)) { dr("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") { dr("An element must be of type `nodes` or `edges`; you specified `" + r + "`"); return; } this.length = 1, this[0] = this; var a = 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 ph(), // 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 (a.position.x == null && (a.position.x = 0), a.position.y == null && (a.position.y = 0), t.renderedPosition) { var o = t.renderedPosition, i = e.pan(), s = e.zoom(); a.position = { x: (o.x - i.x) / s, y: (o.y - i.y) / s }; } var l = []; zn(t.classes) ? l = t.classes : xt(t.classes) && (l = t.classes.split(/\s+/)); for (var u = 0, c = l.length; u < c; u++) { var d = l[u]; !d || d === "" || a.classes.add(d); } this.createEmitter(); var f = t.style || t.css; f && (Fn("Setting a `style` bypass at element creation should be done only when absolutely necessary. Try to use the stylesheet instead."), this.style(f)), (n === void 0 || n) && this.restore(); }, O6 = function(e) { return e = { bfs: e.bfs || !e.dfs, dfs: e.dfs || !e.bfs }, function(t, n, r) { var a; Cn(t) && !$o(t) && (a = t, t = a.roots || a.root, n = a.visit, r = a.directed), r = arguments.length === 2 && !ir(n) ? n : r, n = ir(n) ? n : function() { }; for (var o = this._private.cy, i = t = xt(t) ? this.filter(t) : t, s = [], l = [], u = {}, c = {}, d = {}, f = 0, h, p = this.byGroup(), v = p.nodes, m = p.edges, g = 0; g < i.length; g++) { var y = i[g], x = y.id(); y.isNode() && (s.unshift(y), e.bfs && (d[x] = !0, l.push(y)), c[x] = 0); } for (var w = function() { var O = e.bfs ? s.shift() : s.pop(), $ = O.id(); if (e.dfs) { if (d[$]) return "continue"; d[$] = !0, l.push(O); } var A = c[$], N = u[$], L = N != null ? N.source() : null, R = N != null ? N.target() : null, P = N == null ? void 0 : O.same(L) ? R[0] : L[0], B = void 0; if (B = n(O, N, P, f++, A), B === !0) return h = O, "break"; if (B === !1) return "break"; for (var M = O.connectedEdges().filter(function(se) { return (!r || se.source().same(O)) && m.has(se); }), z = 0; z < M.length; z++) { var Z = M[z], G = Z.connectedNodes().filter(function(se) { return !se.same(O) && v.has(se); }), J = G.id(); G.length !== 0 && !d[J] && (G = G[0], s.push(G), e.bfs && (d[J] = !0, l.push(G)), u[J] = Z, c[J] = c[$] + 1); } }; s.length !== 0; ) { var k = w(); if (k !== "continue" && k === "break") break; } for (var C = o.collection(), S = 0; S < l.length; S++) { var _ = l[S], T = u[_.id()]; T != null && C.push(T), C.push(_); } return { path: o.collection(C), found: o.collection(h) }; }; }, E0 = { breadthFirstSearch: O6({ bfs: !0 }), depthFirstSearch: O6({ dfs: !0 }) }; E0.bfs = E0.breadthFirstSearch; E0.dfs = E0.depthFirstSearch; var Lve = Mhe(function(e, t) { (function() { var n, r, a, o, i, s, l, u, c, d, f, h, p, v, m; a = Math.floor, d = Math.min, r = function(g, y) { return g < y ? -1 : g > y ? 1 : 0; }, c = function(g, y, 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 = a((x + w) / 2), k(y, g[C]) < 0 ? w = C : x = C + 1; return [].splice.apply(g, [x, x - x].concat(y)), y; }, s = function(g, y, x) { return x == null && (x = r), g.push(y), v(g, 0, g.length - 1, x); }, i = function(g, y) { var x, w; return y == null && (y = r), x = g.pop(), g.length ? (w = g[0], g[0] = x, m(g, 0, y)) : w = x, w; }, u = function(g, y, x) { var w; return x == null && (x = r), w = g[0], g[0] = y, m(g, 0, x), w; }, l = function(g, y, x) { var w; return x == null && (x = r), g.length && x(g[0], y) < 0 && (w = [g[0], y], y = w[0], g[0] = w[1], m(g, 0, x)), y; }, o = function(g, y) { var x, w, k, C, S, _; for (y == null && (y = r), C = (function() { _ = []; for (var T = 0, O = a(g.length / 2); 0 <= O ? T < O : T > O; 0 <= O ? T++ : T--) _.push(T); return _; }).apply(this).reverse(), S = [], w = 0, k = C.length; w < k; w++) x = C[w], S.push(m(g, x, y)); return S; }, p = function(g, y, x) { var w; if (x == null && (x = r), w = g.indexOf(y), w !== -1) return v(g, 0, w, x), m(g, w, x); }, f = function(g, y, x) { var w, k, C, S, _; if (x == null && (x = r), k = g.slice(0, y), !k.length) return k; for (o(k, x), _ = g.slice(y), C = 0, S = _.length; C < S; C++) w = _[C], l(k, w, x); return k.sort(x).reverse(); }, h = function(g, y, x) { var w, k, C, S, _, T, O, $, A; if (x == null && (x = r), y * 10 <= g.length) { if (C = g.slice(0, y).sort(x), !C.length) return C; for (k = C[C.length - 1], O = g.slice(y), S = 0, T = O.length; S < T; S++) w = O[S], x(w, k) < 0 && (c(C, w, 0, null, x), C.pop(), k = C[C.length - 1]); return C; } for (o(g, x), A = [], _ = 0, $ = d(y, g.length); 0 <= $ ? _ < $ : _ > $; 0 <= $ ? ++_ : --_) A.push(i(g, x)); return A; }, v = function(g, y, x, w) { var k, C, S; for (w == null && (w = r), k = g[x]; x > y; ) { if (S = x - 1 >> 1, C = g[S], w(k, C) < 0) { g[x] = C, x = S; continue; } break; } return g[x] = k; }, m = function(g, y, x) { var w, k, C, S, _; for (x == null && (x = r), k = g.length, _ = y, C = g[y], w = 2 * y + 1; w < k; ) S = w + 1, S < k && !(x(g[w], g[S]) < 0) && (w = S), g[y] = g[w], y = w, w = 2 * y + 1; return g[y] = C, v(g, _, y, x); }, n = function() { g.push = s, g.pop = i, g.replace = u, g.pushpop = l, g.heapify = o, g.updateItem = p, g.nlargest = f, g.nsmallest = h; function g(y) { this.cmp = y ?? r, this.nodes = []; } return g.prototype.push = function(y) { return s(this.nodes, y, this.cmp); }, g.prototype.pop = function() { return i(this.nodes, this.cmp); }, g.prototype.peek = function() { return this.nodes[0]; }, g.prototype.contains = function(y) { return this.nodes.indexOf(y) !== -1; }, g.prototype.replace = function(y) { return u(this.nodes, y, this.cmp); }, g.prototype.pushpop = function(y) { return l(this.nodes, y, this.cmp); }, g.prototype.heapify = function() { return o(this.nodes, this.cmp); }, g.prototype.updateItem = function(y) { return p(this.nodes, y, 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 y; return y = new g(), y.nodes = this.nodes.slice(0), y; }, 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, y) { return e.exports = y(); }(this, function() { return n; }); }).call(_v); }), Bg = Lve, Nve = ga({ root: null, weight: function(e) { return 1; }, directed: !1 }), Mve = { dijkstra: function(e) { if (!Cn(e)) { var t = arguments; e = { root: t[0], weight: t[1], directed: t[2] }; } var n = Nve(e), r = n.root, a = n.weight, o = n.directed, i = this, s = a, l = xt(r) ? this.filter(r)[0] : r[0], u = {}, c = {}, d = {}, f = this.byGroup(), h = f.nodes, p = f.edges; p.unmergeBy(function(L) { return L.isLoop(); }); for (var v = function(L) { return u[L.id()]; }, m = function(L, R) { u[L.id()] = R, g.updateItem(L); }, g = new Bg(function(L, R) { return v(L) - v(R); }), y = 0; y < h.length; y++) { var x = h[y]; u[x.id()] = x.same(l) ? 0 : 1 / 0, g.push(x); } for (var w = function(L, R) { for (var P = (o ? L.edgesTo(R) : L.edgesWith(R)).intersect(p), B = 1 / 0, M, z = 0; z < P.length; z++) { var Z = P[z], G = s(Z); (G < B || !M) && (B = G, M = Z); } return { edge: M, dist: B }; }; g.size() > 0; ) { var k = g.pop(), C = v(k), S = k.id(); if (d[S] = C, C !== 1 / 0) for (var _ = k.neighborhood().intersect(h), T = 0; T < _.length; T++) { var O = _[T], $ = O.id(), A = w(k, O), N = C + A.dist; N < v(O) && (m(O, N), c[$] = { node: k, edge: A.edge }); } } return { distanceTo: function(L) { var R = xt(L) ? h.filter(L)[0] : L[0]; return d[R.id()]; }, pathTo: function(L) { var R = xt(L) ? h.filter(L)[0] : L[0], P = [], B = R, M = B.id(); if (R.length > 0) for (P.unshift(R); c[M]; ) { var z = c[M]; P.unshift(z.edge), P.unshift(z.node), B = z.node, M = B.id(); } return i.spawn(P); } }; } }, Bve = { // kruskal's algorithm (finds min spanning tree, assuming undirected graph) // implemented from pseudocode from wikipedia kruskal: function(e) { e = e || function(y) { return 1; }; for (var t = this.byGroup(), n = t.nodes, r = t.edges, a = n.length, o = new Array(a), i = n, s = function(y) { for (var x = 0; x < o.length; x++) { var w = o[x]; if (w.has(y)) return x; } }, l = 0; l < a; l++) o[l] = this.spawn(n[l]); for (var u = r.sort(function(y, x) { return e(y) - e(x); }), c = 0; c < u.length; c++) { var d = u[c], f = d.source()[0], h = d.target()[0], p = s(f), v = s(h), m = o[p], g = o[v]; p !== v && (i.merge(d), m.merge(g), o.splice(v, 1)); } return i; } }, Dve = ga({ root: null, goal: null, weight: function(e) { return 1; }, heuristic: function(e) { return 0; }, directed: !1 }), Rve = { // Implemented from pseudocode from wikipedia aStar: function(e) { var t = this.cy(), n = Dve(e), r = n.root, a = n.goal, o = n.heuristic, i = n.directed, s = n.weight; r = t.collection(r)[0], a = t.collection(a)[0]; var l = r.id(), u = a.id(), c = {}, d = {}, f = {}, h = new Bg(function(z, Z) { return d[z.id()] - d[Z.id()]; }), p = new ph(), v = {}, m = {}, g = function(z, Z) { h.push(z), p.add(Z); }, y, x, w = function() { y = h.pop(), x = y.id(), p.delete(x); }, k = function(z) { return p.has(z); }; g(r, l), c[l] = 0, d[l] = o(r); for (var C = 0; h.size() > 0; ) { if (w(), C++, x === u) { for (var S = [], _ = a, T = u, O = m[T]; S.unshift(_), O != null && S.unshift(O), _ = v[T], _ != null; ) T = _.id(), O = m[T]; return { found: !0, distance: c[x], path: this.spawn(S), steps: C }; } f[x] = !0; for (var $ = y._private.edges, A = 0; A < $.length; A++) { var N = $[A]; if (this.hasElementWithId(N.id()) && !(i && N.data("source") !== x)) { var L = N.source(), R = N.target(), P = L.id() !== x ? L : R, B = P.id(); if (this.hasElementWithId(B) && !f[B]) { var M = c[x] + s(N); if (!k(B)) { c[B] = M, d[B] = M + o(P), g(P, B), v[B] = y, m[B] = N; continue; } M < c[B] && (c[B] = M, d[B] = M + o(P), v[B] = y, m[B] = N); } } } } return { found: !1, distance: void 0, path: void 0, steps: C }; } }, zve = ga({ weight: function(e) { return 1; }, directed: !1 }), Vve = { // Implemented from pseudocode from wikipedia floydWarshall: function(e) { for (var t = this.cy(), n = zve(e), r = n.weight, a = n.directed, o = r, i = this.byGroup(), s = i.nodes, l = i.edges, u = s.length, c = u * u, d = function(G) { return s.indexOf(G); }, f = function(G) { return s[G]; }, h = new Array(c), p = 0; p < c; p++) { var v = p % u, m = (p - v) / u; m === v ? h[p] = 0 : h[p] = 1 / 0; } for (var g = new Array(c), y = 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 S = d(k), _ = d(C), T = S * u + _, O = o(w); if (h[T] > O && (h[T] = O, g[T] = _, y[T] = w), !a) { var $ = _ * u + S; !a && h[$] > O && (h[$] = O, g[$] = S, y[$] = w); } } } for (var A = 0; A < u; A++) for (var N = 0; N < u; N++) for (var L = N * u + A, R = 0; R < u; R++) { var P = N * u + R, B = A * u + R; h[L] + h[B] < h[P] && (h[P] = h[L] + h[B], g[P] = g[L]); } var M = function(G) { return (xt(G) ? t.filter(G) : G)[0]; }, z = function(G) { return d(M(G)); }, Z = { distance: function(G, J) { var se = z(G), ve = z(J); return h[se * u + ve]; }, path: function(G, J) { var se = z(G), ve = z(J), ge = f(se); if (se === ve) return ge.collection(); if (g[se * u + ve] == null) return t.collection(); var oe = t.collection(), ee = se, q; for (oe.merge(ge); se !== ve; ) ee = se, se = g[se * u + ve], q = y[ee * u + se], oe.merge(q), oe.merge(f(se)); return oe; } }; return Z; } // floydWarshall }, jve = ga({ weight: function(e) { return 1; }, directed: !1, root: null }), Hve = { // Implemented from pseudocode from wikipedia bellmanFord: function(e) { var t = this, n = jve(e), r = n.weight, a = n.directed, o = n.root, i = r, s = this, l = this.cy(), u = this.byGroup(), c = u.edges, d = u.nodes, f = d.length, h = new ds(), p = !1, v = []; o = l.collection(o)[0], c.unmergeBy(function(Se) { return Se.isLoop(); }); for (var m = c.length, g = function(Se) { var Pe = h.get(Se.id()); return Pe || (Pe = {}, h.set(Se.id(), Pe)), Pe; }, y = function(Se) { return (xt(Se) ? l.$(Se) : Se)[0]; }, x = function(Se) { return g(y(Se)).dist; }, w = function(Se) { for (var Pe = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : o, Me = y(Se), je = [], Be = Me; ; ) { if (Be == null) return t.spawn(); var We = g(Be), qe = We.edge, Ge = We.pred; if (je.unshift(Be[0]), Be.same(Pe) && je.length > 0) break; qe != null && je.unshift(qe), Be = Ge; } return s.spawn(je); }, k = 0; k < f; k++) { var C = d[k], S = g(C); C.same(o) ? S.dist = 0 : S.dist = 1 / 0, S.pred = null, S.edge = null; } for (var _ = !1, T = function(Se, Pe, Me, je, Be, We) { var qe = je.dist + We; qe < Be.dist && !Me.same(je.edge) && (Be.dist = qe, Be.pred = Se, Be.edge = Me, _ = !0); }, O = 1; O < f; O++) { _ = !1; for (var $ = 0; $ < m; $++) { var A = c[$], N = A.source(), L = A.target(), R = i(A), P = g(N), B = g(L); T(N, L, A, P, B, R), a || T(L, N, A, B, P, R); } if (!_) break; } if (_) for (var M = [], z = 0; z < m; z++) { var Z = c[z], G = Z.source(), J = Z.target(), se = i(Z), ve = g(G).dist, ge = g(J).dist; if (ve + se < ge || !a && ge + se < ve) if (p || (Fn("Graph contains a negative weight cycle for Bellman-Ford"), p = !0), e.findNegativeWeightCycles !== !1) { var oe = []; ve + se < ge && oe.push(G), !a && ge + se < ve && oe.push(J); for (var ee = oe.length, q = 0; q < ee; q++) { var Y = oe[q], te = [Y]; te.push(g(Y).edge); for (var we = g(Y).pred; te.indexOf(we) === -1; ) te.push(we), te.push(g(we).edge), we = g(we).pred; te = te.slice(te.indexOf(we)); for (var Oe = te[0].id(), Ne = 0, xe = 2; xe < te.length; xe += 2) te[xe].id() < Oe && (Oe = te[xe].id(), Ne = xe); te = te.slice(Ne).concat(te.slice(0, Ne)), te.push(te[0]); var $e = te.map(function(Se) { return Se.id(); }).join(","); M.indexOf($e) === -1 && (v.push(s.spawn(te)), M.push($e)); } } else break; } return { distanceTo: x, pathTo: w, hasNegativeWeightCycle: p, negativeWeightCycles: v }; } // bellmanFord }, Uve = Math.sqrt(2), qve = function(e, t, n) { n.length === 0 && dr("Karger-Stein must be run on a connected (sub)graph"); for (var r = n[e], a = r[1], o = r[2], i = t[a], s = t[o], l = n, u = l.length - 1; u >= 0; u--) { var c = l[u], d = c[1], f = c[2]; (t[d] === i && t[f] === s || t[d] === s && t[f] === i) && l.splice(u, 1); } for (var h = 0; h < l.length; h++) { var p = l[h]; p[1] === s ? (l[h] = p.slice(), l[h][1] = i) : p[2] === s && (l[h] = p.slice(), l[h][2] = i); } for (var v = 0; v < t.length; v++) t[v] === s && (t[v] = i); return l; }, Xx = function(e, t, n, r) { for (; n > r; ) { var a = Math.floor(Math.random() * t.length); t = qve(a, e, t), n--; } return t; }, Wve = { // 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(B) { return B.isLoop(); }); var a = n.length, o = r.length, i = Math.ceil(Math.pow(Math.log(a) / Math.LN2, 2)), s = Math.floor(a / Uve); if (a < 2) { dr("At least 2 nodes are required for Karger-Stein algorithm"); return; } for (var l = [], u = 0; u < o; u++) { var c = r[u]; l.push([u, n.indexOf(c.source()), n.indexOf(c.target())]); } for (var d = 1 / 0, f = [], h = new Array(a), p = new Array(a), v = new Array(a), m = function(B, M) { for (var z = 0; z < a; z++) M[z] = B[z]; }, g = 0; g <= i; g++) { for (var y = 0; y < a; y++) p[y] = y; var x = Xx(p, l.slice(), a, s), w = x.slice(); m(p, v); var k = Xx(p, x, s, 2), C = Xx(v, w, s, 2); k.length <= C.length && k.length < d ? (d = k.length, f = k, m(p, h)) : C.length <= k.length && C.length < d && (d = C.length, f = C, m(v, h)); } for (var S = this.spawn(f.map(function(B) { return r[B[0]]; })), _ = this.spawn(), T = this.spawn(), O = h[0], $ = 0; $ < h.length; $++) { var A = h[$], N = n[$]; A === O ? _.merge(N) : T.merge(N); } var L = function(B) { var M = e.spawn(); return B.forEach(function(z) { M.merge(z), z.connectedEdges().forEach(function(Z) { e.contains(Z) && !S.contains(Z) && M.merge(Z); }); }), M; }, R = [L(_), L(T)], P = { cut: S, components: R, // n.b. partitions are included to be compatible with the old api spec // (could be removed in a future major version) partition1: _, partition2: T }; return P; } }, Kve = function(e) { return { x: e.x, y: e.y }; }, R2 = function(e, t, n) { return { x: e.x * t + n.x, y: e.y * t + n.y }; }, VM = function(e, t, n) { return { x: (e.x - n.x) / t, y: (e.y - n.y) / t }; }, Gp = function(e) { return { x: e[0], y: e[1] }; }, Gve = 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, a = t; a < n; a++) { var o = e[a]; isFinite(o) && (r = Math.min(o, r)); } return r; }, Xve = 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, a = t; a < n; a++) { var o = e[a]; isFinite(o) && (r = Math.max(o, r)); } return r; }, Yve = 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, a = 0, o = t; o < n; o++) { var i = e[o]; isFinite(i) && (r += i, a++); } return r / a; }, Zve = 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, a = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !0, o = 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]; o ? isFinite(l) || (e[s] = -1 / 0, i++) : e.splice(s, 1); } a && e.sort(function(d, f) { return d - f; }); 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; }, Qve = function(e) { return Math.PI * e / 180; }, jm = function(e, t) { return Math.atan2(t, e) - Math.PI / 2; }, M4 = Math.log2 || function(e) { return Math.log(e) / Math.log(2); }, jM = function(e) { return e > 0 ? 1 : e < 0 ? -1 : 0; }, bd = function(e, t) { return Math.sqrt(Ic(e, t)); }, Ic = function(e, t) { var n = t.x - e.x, r = t.y - e.y; return n * n + r * r; }, Jve = function(e) { for (var t = e.length, n = 0, r = 0; r < t; r++) n += e[r]; for (var a = 0; a < t; a++) e[a] = e[a] / n; return e; }, Ur = function(e, t, n, r) { return (1 - r) * (1 - r) * e + 2 * (1 - r) * r * t + r * r * n; }, tf = function(e, t, n, r) { return { x: Ur(e.x, t.x, n.x, r), y: Ur(e.y, t.y, n.y, r) }; }, e0e = function(e, t, n, r) { var a = { x: t.x - e.x, y: t.y - e.y }, o = bd(e, t), i = { x: a.x / o, y: a.y / o }; return n = n ?? 0, r = r ?? n * o, { x: e.x + i.x * r, y: e.y + i.y * r }; }, _0 = function(e, t, n) { return Math.max(e, Math.min(n, t)); }, wo = 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 }; } }, t0e = function(e) { return { x1: e.x1, x2: e.x2, w: e.w, y1: e.y1, y2: e.y2, h: e.h }; }, n0e = function(e) { e.x1 = 1 / 0, e.y1 = 1 / 0, e.x2 = -1 / 0, e.y2 = -1 / 0, e.w = 0, e.h = 0; }, r0e = 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 }; }, HM = 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; }, a0e = 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; }, Y1 = 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; }, Z1 = function(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [0], n, r, a, o; if (t.length === 1) n = r = a = o = t[0]; else if (t.length === 2) n = a = t[0], o = r = t[1]; else if (t.length === 4) { var i = _i(t, 4); n = i[0], r = i[1], a = i[2], o = i[3]; } return e.x1 -= o, e.x2 += r, e.y1 -= n, e.y2 += a, e.w = e.x2 - e.x1, e.h = e.y2 - e.y1, e; }, $6 = 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; }, B4 = 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); }, $f = function(e, t, n) { return e.x1 <= t && t <= e.x2 && e.y1 <= n && n <= e.y2; }, o0e = function(e, t) { return $f(e, t.x, t.y); }, UM = function(e, t) { return $f(e, t.x1, t.y1) && $f(e, t.x2, t.y2); }, qM = function(e, t, n, r, a, o, i) { var s = arguments.length > 7 && arguments[7] !== void 0 ? arguments[7] : "auto", l = s === "auto" ? wd(a, o) : s, u = a / 2, c = o / 2; l = Math.min(l, u, c); var d = l !== u, f = l !== c, h; if (d) { var p = n - u + l - i, v = r - c - i, m = n + u - l + i, g = v; if (h = Eu(e, t, n, r, p, v, m, g, !1), h.length > 0) return h; } if (f) { var y = n + u + i, x = r - c + l - i, w = y, k = r + c - l + i; if (h = Eu(e, t, n, r, y, x, w, k, !1), h.length > 0) return h; } if (d) { var C = n - u + l - i, S = r + c + i, _ = n + u - l + i, T = S; if (h = Eu(e, t, n, r, C, S, _, T, !1), h.length > 0) return h; } if (f) { var O = n - u - i, $ = r - c + l - i, A = O, N = r + c - l + i; if (h = Eu(e, t, n, r, O, $, A, N, !1), h.length > 0) return h; } var L; { var R = n - u + l, P = r - c + l; if (L = Ov(e, t, n, r, R, P, l + i), L.length > 0 && L[0] <= R && L[1] <= P) return [L[0], L[1]]; } { var B = n + u - l, M = r - c + l; if (L = Ov(e, t, n, r, B, M, l + i), L.length > 0 && L[0] >= B && L[1] <= M) return [L[0], L[1]]; } { var z = n + u - l, Z = r + c - l; if (L = Ov(e, t, n, r, z, Z, l + i), L.length > 0 && L[0] >= z && L[1] >= Z) return [L[0], L[1]]; } { var G = n - u + l, J = r + c - l; if (L = Ov(e, t, n, r, G, J, l + i), L.length > 0 && L[0] <= G && L[1] >= J) return [L[0], L[1]]; } return []; }, i0e = function(e, t, n, r, a, o, i) { var s = i, l = Math.min(n, a), u = Math.max(n, a), c = Math.min(r, o), d = Math.max(r, o); return l - s <= e && e <= u + s && c - s <= t && t <= d + s; }, s0e = function(e, t, n, r, a, o, i, s, l) { var u = { x1: Math.min(n, i, a) - l, x2: Math.max(n, i, a) + l, y1: Math.min(r, s, o) - l, y2: Math.max(r, s, o) + l }; return !(e < u.x1 || e > u.x2 || t < u.y1 || t > u.y2); }, l0e = function(e, t, n, r) { n -= r; var a = t * t - 4 * e * n; if (a < 0) return []; var o = Math.sqrt(a), i = 2 * e, s = (-t + o) / i, l = (-t - o) / i; return [s, l]; }, u0e = function(e, t, n, r, a) { var o = 1e-5; e === 0 && (e = o), t /= e, n /= e, r /= e; var i, s, l, u, c, d, f, 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, a[1] = 0, f = 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), a[0] = -f + c + d, f += (c + d) / 2, a[4] = a[2] = -f, f = Math.sqrt(3) * (-d + c) / 2, a[3] = f, a[5] = -f; return; } if (a[5] = a[3] = 0, i === 0) { h = l < 0 ? -Math.pow(-l, 1 / 3) : Math.pow(l, 1 / 3), a[0] = -f + 2 * h, a[4] = a[2] = -(h + f); return; } s = -s, u = s * s * s, u = Math.acos(l / Math.sqrt(u)), h = 2 * Math.sqrt(s), a[0] = -f + h * Math.cos(u / 3), a[2] = -f + h * Math.cos((u + 2 * Math.PI) / 3), a[4] = -f + h * Math.cos((u + 4 * Math.PI) / 3); }, c0e = function(e, t, n, r, a, o, i, s) { var l = 1 * n * n - 4 * n * a + 2 * n * i + 4 * a * a - 4 * a * i + i * i + r * r - 4 * r * o + 2 * r * s + 4 * o * o - 4 * o * s + s * s, u = 1 * 9 * n * a - 3 * n * n - 3 * n * i - 6 * a * a + 3 * a * i + 9 * r * o - 3 * r * r - 3 * r * s - 6 * o * o + 3 * o * s, c = 1 * 3 * n * n - 6 * n * a + n * i - n * e + 2 * a * a + 2 * a * e - i * e + 3 * r * r - 6 * r * o + r * s - r * t + 2 * o * o + 2 * o * t - s * t, d = 1 * n * a - n * n + n * e - a * e + r * o - r * r + r * t - o * t, f = []; u0e(l, u, c, d, f); for (var h = 1e-7, p = [], v = 0; v < 6; v += 2) Math.abs(f[v + 1]) < h && f[v] >= 0 && f[v] <= 1 && p.push(f[v]); p.push(1), p.push(0); for (var m = -1, g, y, x, w = 0; w < p.length; w++) g = Math.pow(1 - p[w], 2) * n + 2 * (1 - p[w]) * p[w] * a + p[w] * p[w] * i, y = Math.pow(1 - p[w], 2) * r + 2 * (1 - p[w]) * p[w] * o + p[w] * p[w] * s, x = Math.pow(g - e, 2) + Math.pow(y - t, 2), m >= 0 ? x < m && (m = x) : m = x; return m; }, d0e = function(e, t, n, r, a, o) { var i = [e - n, t - r], s = [a - n, o - 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 - a) * (e - a) + (t - o) * (t - o) : u - d; }, Qa = function(e, t, n) { for (var r, a, o, i, s, l = 0, u = 0; u < n.length / 2; u++) if (r = n[u * 2], a = n[u * 2 + 1], u + 1 < n.length / 2 ? (o = n[(u + 1) * 2], i = n[(u + 1) * 2 + 1]) : (o = n[(u + 1 - n.length / 2) * 2], i = n[(u + 1 - n.length / 2) * 2 + 1]), !(r == e && o == e)) if (r >= e && e >= o || r <= e && e <= o) s = (e - r) / (o - r) * (i - a) + a, s > t && l++; else continue; return l % 2 !== 0; }, bl = function(e, t, n, r, a, o, 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), f = Math.sin(-c), h = 0; h < u.length / 2; h++) u[h * 2] = o / 2 * (n[h * 2] * d - n[h * 2 + 1] * f), u[h * 2 + 1] = i / 2 * (n[h * 2 + 1] * d + n[h * 2] * f), u[h * 2] += r, u[h * 2 + 1] += a; var p; if (l > 0) { var v = Zy(u, -l); p = Yy(v); } else p = u; return Qa(e, t, p); }, p0e = function(e, t, n, r, a, o, 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 Qa(e, t, l); }, Yy = function(e) { for (var t = new Array(e.length / 2), n, r, a, o, i, s, l, u, c = 0; c < e.length / 4; c++) { n = e[c * 4], r = e[c * 4 + 1], a = e[c * 4 + 2], o = 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 = Eu(n, r, a, o, i, s, l, u, !0); t[c * 2] = d[0], t[c * 2 + 1] = d[1]; } return t; }, Zy = function(e, t) { for (var n = new Array(e.length * 2), r, a, o, i, s = 0; s < e.length / 2; s++) { r = e[s * 2], a = e[s * 2 + 1], s < e.length / 2 - 1 ? (o = e[(s + 1) * 2], i = e[(s + 1) * 2 + 1]) : (o = e[0], i = e[1]); var l = i - a, u = -(o - r), c = Math.sqrt(l * l + u * u), d = l / c, f = u / c; n[s * 4] = r + d * t, n[s * 4 + 1] = a + f * t, n[s * 4 + 2] = o + d * t, n[s * 4 + 3] = i + f * t; } return n; }, f0e = function(e, t, n, r, a, o) { var i = n - e, s = r - t; i /= a, s /= o; 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]; }, jc = function(e, t, n, r, a, o, i) { return e -= a, t -= o, e /= n / 2 + i, t /= r / 2 + i, e * e + t * t <= 1; }, Ov = function(e, t, n, r, a, o, i) { var s = [n - e, r - t], l = [e - a, t - o], 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, f = c * c - 4 * u * d; if (f < 0) return []; var h = (-c + Math.sqrt(f)) / (2 * u), p = (-c - Math.sqrt(f)) / (2 * u), v = Math.min(h, p), m = Math.max(h, p), g = []; if (v >= 0 && v <= 1 && g.push(v), m >= 0 && m <= 1 && g.push(m), g.length === 0) return []; var y = g[0] * s[0] + e, x = g[0] * s[1] + t; if (g.length > 1) { if (g[0] == g[1]) return [y, x]; var w = g[1] * s[0] + e, k = g[1] * s[1] + t; return [y, x, w, k]; } else return [y, x]; }, Yx = function(e, t, n) { return t <= e && e <= n || n <= e && e <= t ? e : e <= t && t <= n || n <= t && t <= e ? t : n; }, Eu = function(e, t, n, r, a, o, i, s, l) { var u = e - a, c = n - e, d = i - a, f = t - o, h = r - t, p = s - o, v = d * f - p * u, m = c * f - h * u, g = p * c - d * h; if (g !== 0) { var y = v / g, x = m / g, w = 1e-3, k = 0 - w, C = 1 + w; return k <= y && y <= C && k <= x && x <= C ? [e + y * c, t + y * h] : l ? [e + y * c, t + y * h] : []; } else return v === 0 || m === 0 ? Yx(e, n, i) === i ? [i, s] : Yx(e, n, a) === a ? [a, o] : Yx(a, i, n) === n ? [n, r] : [] : []; }, T0 = function(e, t, n, r, a, o, i, s) { var l = [], u, c = new Array(n.length), d = !0; o == null && (d = !1); var f; if (d) { for (var h = 0; h < c.length / 2; h++) c[h * 2] = n[h * 2] * o + r, c[h * 2 + 1] = n[h * 2 + 1] * i + a; if (s > 0) { var p = Zy(c, -s); f = Yy(p); } else f = c; } else f = n; for (var v, m, g, y, x = 0; x < f.length / 2; x++) v = f[x * 2], m = f[x * 2 + 1], x < f.length / 2 - 1 ? (g = f[(x + 1) * 2], y = f[(x + 1) * 2 + 1]) : (g = f[0], y = f[1]), u = Eu(e, t, r, a, v, m, g, y), u.length !== 0 && l.push(u[0], u[1]); return l; }, h0e = function(e, t, n, r, a, o, i, s, l) { var u = [], c, d = new Array(n.length * 2); l.forEach(function(g, y) { y === 0 ? (d[d.length - 2] = g.startX, d[d.length - 1] = g.startY) : (d[y * 4 - 2] = g.startX, d[y * 4 - 1] = g.startY), d[y * 4] = g.stopX, d[y * 4 + 1] = g.stopY, c = Ov(e, t, r, a, g.cx, g.cy, g.radius), c.length !== 0 && u.push(c[0], c[1]); }); for (var f = 0; f < d.length / 4; f++) c = Eu(e, t, r, a, d[f * 4], d[f * 4 + 1], d[f * 4 + 2], d[f * 4 + 3], !1), c.length !== 0 && u.push(c[0], c[1]); if (u.length > 2) { for (var h = [u[0], u[1]], p = 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 <= p && (h[0] = u[v * 2], h[1] = u[v * 2 + 1], p = m); } return h; } return u; }, Hm = function(e, t, n) { var r = [e[0] - t[0], e[1] - t[1]], a = Math.sqrt(r[0] * r[0] + r[1] * r[1]), o = (a - n) / a; return o < 0 && (o = 1e-5), [t[0] + o * r[0], t[1] + o * r[1]]; }, Ra = function(e, t) { var n = jC(e, t); return n = WM(n), n; }, WM = function(e) { for (var t, n, r = e.length / 2, a = 1 / 0, o = 1 / 0, i = -1 / 0, s = -1 / 0, l = 0; l < r; l++) t = e[2 * l], n = e[2 * l + 1], a = Math.min(a, t), i = Math.max(i, t), o = Math.min(o, n), s = Math.max(s, n); for (var u = 2 / (i - a), c = 2 / (s - o), d = 0; d < r; d++) t = e[2 * d] = e[2 * d] * u, n = e[2 * d + 1] = e[2 * d + 1] * c, a = Math.min(a, t), i = Math.max(i, t), o = Math.min(o, n), s = Math.max(s, n); if (o < -1) for (var f = 0; f < r; f++) n = e[2 * f + 1] = e[2 * f + 1] + (-1 - o); 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 a = new Array(e * 2), o, i = 0; i < e; i++) o = i * n + r, a[2 * i] = Math.cos(o), a[2 * i + 1] = Math.sin(-o); return a; }, wd = function(e, t) { return Math.min(e / 4, t / 4, 8); }, KM = function(e, t) { return Math.min(e / 10, t / 10, 8); }, D4 = function() { return 8; }, v0e = function(e, t, n) { return [e - 2 * t + n, 2 * (t - e), e]; }, HC = function(e, t) { return { heightOffset: Math.min(15, 0.05 * t), widthOffset: Math.min(100, 0.25 * e), ctrlPtOffsetPct: 0.05 }; }, g0e = ga({ dampingFactor: 0.8, precision: 1e-6, iterations: 200, weight: function(e) { return 1; } }), m0e = { pageRank: function(e) { for (var t = g0e(e), n = t.dampingFactor, r = t.precision, a = t.iterations, o = t.weight, i = this._private.cy, s = this.byGroup(), l = s.nodes, u = s.edges, c = l.length, d = c * c, f = u.length, h = new Array(d), p = new Array(c), v = (1 - n) / c, m = 0; m < c; m++) { for (var g = 0; g < c; g++) { var y = m * c + g; h[y] = 0; } p[m] = 0; } for (var x = 0; x < f; x++) { var w = u[x], k = w.data("source"), C = w.data("target"); if (k !== C) { var S = l.indexOfId(k), _ = l.indexOfId(C), T = o(w), O = _ * c + S; h[O] += T, p[S] += T; } } for (var $ = 1 / c + v, A = 0; A < c; A++) if (p[A] === 0) for (var N = 0; N < c; N++) { var L = N * c + A; h[L] = $; } else for (var R = 0; R < c; R++) { var P = R * c + A; h[P] = h[P] / p[A] + v; } for (var B = new Array(c), M = new Array(c), z, Z = 0; Z < c; Z++) B[Z] = 1; for (var G = 0; G < a; G++) { for (var J = 0; J < c; J++) M[J] = 0; for (var se = 0; se < c; se++) for (var ve = 0; ve < c; ve++) { var ge = se * c + ve; M[se] += h[ge] * B[ve]; } Jve(M), z = B, B = M, M = z; for (var oe = 0, ee = 0; ee < c; ee++) { var q = z[ee] - B[ee]; oe += q * q; } if (oe < r) break; } var Y = { rank: function(te) { return te = i.collection(te)[0], B[l.indexOf(te)]; } }; return Y; } // pageRank }, F6 = ga({ root: null, weight: function(e) { return 1; }, directed: !1, alpha: 0 }), nf = { degreeCentralityNormalized: function(e) { e = F6(e); var t = this.cy(), n = this.nodes(), r = n.length; if (e.directed) { for (var a = {}, o = {}, 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), a[c] = d.indegree, o[c] = d.outdegree; } return { indegree: function(g) { return i == 0 ? 0 : (xt(g) && (g = t.filter(g)), a[g.id()] / i); }, outdegree: function(g) { return s === 0 ? 0 : (xt(g) && (g = t.filter(g)), o[g.id()] / s); } }; } else { for (var f = {}, h = 0, p = 0; p < r; p++) { var v = n[p]; e.root = v; var m = this.degreeCentrality(e); h < m.degree && (h = m.degree), f[v.id()] = m.degree; } return { degree: function(g) { return h === 0 ? 0 : (xt(g) && (g = t.filter(g)), f[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 = F6(e); var t = this.cy(), n = this, r = e, a = r.root, o = r.weight, i = r.directed, s = r.alpha; if (a = t.collection(a)[0], i) { for (var l = a.connectedEdges(), u = l.filter(function(k) { return k.target().same(a) && n.has(k); }), c = l.filter(function(k) { return k.source().same(a) && n.has(k); }), d = u.length, f = c.length, h = 0, p = 0, v = 0; v < u.length; v++) h += o(u[v]); for (var m = 0; m < c.length; m++) p += o(c[m]); return { indegree: Math.pow(d, 1 - s) * Math.pow(h, s), outdegree: Math.pow(f, 1 - s) * Math.pow(p, s) }; } else { for (var g = a.connectedEdges().intersection(n), y = g.length, x = 0, w = 0; w < g.length; w++) x += o(g[w]); return { degree: Math.pow(y, 1 - s) * Math.pow(x, s) }; } } // degreeCentrality }; nf.dc = nf.degreeCentrality; nf.dcn = nf.degreeCentralityNormalised = nf.degreeCentralityNormalized; var A6 = ga({ harmonic: !0, weight: function() { return 1; }, directed: !1, root: null }), rf = { closenessCentralityNormalized: function(e) { for (var t = A6(e), n = t.harmonic, r = t.weight, a = t.directed, o = this.cy(), i = {}, s = 0, l = this.nodes(), u = this.floydWarshall({ weight: r, directed: a }), c = 0; c < l.length; c++) { for (var d = 0, f = l[c], h = 0; h < l.length; h++) if (c !== h) { var p = u.distance(f, l[h]); n ? d += 1 / p : d += p; } n || (d = 1 / d), s < d && (s = d), i[f.id()] = d; } return { closeness: function(v) { return s == 0 ? 0 : (xt(v) ? v = o.filter(v)[0].id() : v = v.id(), i[v] / s); } }; }, // Implemented from pseudocode from wikipedia closenessCentrality: function(e) { var t = A6(e), n = t.root, r = t.weight, a = t.directed, o = t.harmonic; n = this.filter(n)[0]; for (var i = this.dijkstra({ root: n, weight: r, directed: a }), s = 0, l = this.nodes(), u = 0; u < l.length; u++) { var c = l[u]; if (!c.same(n)) { var d = i.distanceTo(c); o ? s += 1 / d : s += d; } } return o ? s : 1 / s; } // closenessCentrality }; rf.cc = rf.closenessCentrality; rf.ccn = rf.closenessCentralityNormalised = rf.closenessCentralityNormalized; var y0e = ga({ weight: null, directed: !1 }), UC = { // 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 = y0e(e), n = t.directed, r = t.weight, a = r != null, o = this.cy(), i = this.nodes(), s = {}, l = {}, u = 0, c = { set: function(g, y) { l[g] = y, y > u && (u = y); }, get: function(g) { return l[g]; } }, d = 0; d < i.length; d++) { var f = i[d], h = f.id(); n ? s[h] = f.outgoers().nodes() : s[h] = f.openNeighborhood().nodes(), c.set(h, 0); } for (var p = function(g) { for (var y = i[g].id(), x = [], w = {}, k = {}, C = {}, S = new Bg(function(se, ve) { return C[se] - C[ve]; }), _ = 0; _ < i.length; _++) { var T = i[_].id(); w[T] = [], k[T] = 0, C[T] = 1 / 0; } for (k[y] = 1, C[y] = 0, S.push(y); !S.empty(); ) { var O = S.pop(); if (x.push(O), a) for (var $ = 0; $ < s[O].length; $++) { var A = s[O][$], N = o.getElementById(O), L = void 0; N.edgesTo(A).length > 0 ? L = N.edgesTo(A)[0] : L = A.edgesTo(N)[0]; var R = r(L); A = A.id(), C[A] > C[O] + R && (C[A] = C[O] + R, S.nodes.indexOf(A) < 0 ? S.push(A) : S.updateItem(A), k[A] = 0, w[A] = []), C[A] == C[O] + R && (k[A] = k[A] + k[O], w[A].push(O)); } else for (var P = 0; P < s[O].length; P++) { var B = s[O][P].id(); C[B] == 1 / 0 && (S.push(B), C[B] = C[O] + 1), C[B] == C[O] + 1 && (k[B] = k[B] + k[O], w[B].push(O)); } } for (var M = {}, z = 0; z < i.length; z++) M[i[z].id()] = 0; for (; x.length > 0; ) { for (var Z = x.pop(), G = 0; G < w[Z].length; G++) { var J = w[Z][G]; M[J] = M[J] + k[J] / k[Z] * (1 + M[Z]); } Z != i[g].id() && c.set(Z, c.get(Z) + M[Z]); } }, v = 0; v < i.length; v++) p(v); var m = { betweenness: function(g) { var y = o.collection(g).id(); return c.get(y); }, betweennessNormalized: function(g) { if (u == 0) return 0; var y = o.collection(g).id(); return c.get(y) / u; } }; return m.betweennessNormalised = m.betweennessNormalized, m; } // betweennessCentrality }; UC.bc = UC.betweennessCentrality; var b0e = ga({ 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; } ] }), w0e = function(e) { return b0e(e); }, x0e = function(e, t) { for (var n = 0, r = 0; r < t.length; r++) n += t[r](e); return n; }, k0e = function(e, t, n) { for (var r = 0; r < t; r++) e[r * t + r] = n; }, GM = function(e, t) { for (var n, r = 0; r < t; r++) { n = 0; for (var a = 0; a < t; a++) n += e[a * t + r]; for (var o = 0; o < t; o++) e[o * t + r] = e[o * t + r] / n; } }, C0e = function(e, t, n) { for (var r = new Array(n * n), a = 0; a < n; a++) { for (var o = 0; o < n; o++) r[a * n + o] = 0; for (var i = 0; i < n; i++) for (var s = 0; s < n; s++) r[a * n + s] += e[a * n + i] * t[i * n + s]; } return r; }, S0e = function(e, t, n) { for (var r = e.slice(0), a = 1; a < n; a++) e = C0e(e, r, t); return e; }, E0e = function(e, t, n) { for (var r = new Array(t * t), a = 0; a < t * t; a++) r[a] = Math.pow(e[a], n); return GM(r, t), r; }, _0e = function(e, t, n, r) { for (var a = 0; a < n; a++) { var o = Math.round(e[a] * Math.pow(10, r)) / Math.pow(10, r), i = Math.round(t[a] * Math.pow(10, r)) / Math.pow(10, r); if (o !== i) return !1; } return !0; }, T0e = function(e, t, n, r) { for (var a = [], o = 0; o < t; o++) { for (var i = [], s = 0; s < t; s++) Math.round(e[o * t + s] * 1e3) / 1e3 > 0 && i.push(n[s]); i.length !== 0 && a.push(r.collection(i)); } return a; }, O0e = function(e, t) { for (var n = 0; n < e.length; n++) if (!t[n] || e[n].id() !== t[n].id()) return !1; return !0; }, $0e = function(e) { for (var t = 0; t < e.length; t++) for (var n = 0; n < e.length; n++) t != n && O0e(e[t], e[n]) && e.splice(n, 1); return e; }, I6 = function(e) { for (var t = this.nodes(), n = this.edges(), r = this.cy(), a = w0e(e), o = {}, i = 0; i < t.length; i++) o[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 f = 0; f < n.length; f++) { var h = n[f], p = o[h.source().id()], v = o[h.target().id()], m = x0e(h, a.attributes); u[p * s + v] += m, u[v * s + p] += m; } k0e(u, s, a.multFactor), GM(u, s); for (var g = !0, y = 0; g && y < a.maxIterations; ) g = !1, c = S0e(u, s, a.expandFactor), u = E0e(c, s, a.inflateFactor), _0e(u, c, l, 4) || (g = !0), y++; var x = T0e(u, s, t, r); return x = $0e(x), x; }, F0e = { markovClustering: I6, mcl: I6 }, A0e = function(e) { return e; }, XM = function(e, t) { return Math.abs(t - e); }, P6 = function(e, t, n) { return e + XM(t, n); }, L6 = function(e, t, n) { return e + Math.pow(n - t, 2); }, I0e = function(e) { return Math.sqrt(e); }, P0e = function(e, t, n) { return Math.max(e, XM(t, n)); }, ev = function(e, t, n, r, a) { for (var o = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : A0e, i = r, s, l, u = 0; u < e; u++) s = t(u), l = n(u), i = a(i, s, l); return o(i); }, Ff = { euclidean: function(e, t, n) { return e >= 2 ? ev(e, t, n, 0, L6, I0e) : ev(e, t, n, 0, P6); }, squaredEuclidean: function(e, t, n) { return ev(e, t, n, 0, L6); }, manhattan: function(e, t, n) { return ev(e, t, n, 0, P6); }, max: function(e, t, n) { return ev(e, t, n, -1 / 0, P0e); } }; Ff["squared-euclidean"] = Ff.squaredEuclidean; Ff.squaredeuclidean = Ff.squaredEuclidean; function z2(e, t, n, r, a, o) { var i; return ir(e) ? i = e : i = Ff[e] || Ff.euclidean, t === 0 && ir(e) ? i(a, o) : i(t, n, r, a, o); } var L0e = ga({ k: 2, m: 2, sensitivityThreshold: 1e-4, distance: "euclidean", maxIterations: 10, attributes: [], testMode: !1, testCentroids: null }), R4 = function(e) { return L0e(e); }, Qy = function(e, t, n, r, a) { var o = a !== "kMedoids", i = o ? function(c) { return n[c]; } : function(c) { return r[c](n); }, s = function(c) { return r[c](t); }, l = n, u = t; return z2(e, r.length, i, s, l, u); }, Zx = function(e, t, n) { for (var r = n.length, a = new Array(r), o = new Array(r), i = new Array(t), s = null, l = 0; l < r; l++) a[l] = e.min(n[l]).value, o[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() * (o[c] - a[c]) + a[c]; i[u] = s; } return i; }, YM = function(e, t, n, r, a) { for (var o = 1 / 0, i = 0, s = 0; s < t.length; s++) { var l = Qy(n, e, t[s], r, a); l < o && (o = l, i = s); } return i; }, ZM = function(e, t, n) { for (var r = [], a = null, o = 0; o < t.length; o++) a = t[o], n[a.id()] === e && r.push(a); return r; }, N0e = function(e, t, n) { return Math.abs(t - e) <= n; }, M0e = function(e, t, n) { for (var r = 0; r < e.length; r++) for (var a = 0; a < e[r].length; a++) { var o = Math.abs(e[r][a] - t[r][a]); if (o > n) return !1; } return !0; }, B0e = function(e, t, n) { for (var r = 0; r < n; r++) if (e === t[r]) return !0; return !1; }, N6 = function(e, t) { var n = new Array(t); if (e.length < 50) for (var r = 0; r < t; r++) { for (var a = e[Math.floor(Math.random() * e.length)]; B0e(a, n, r); ) a = e[Math.floor(Math.random() * e.length)]; n[r] = a; } else for (var o = 0; o < t; o++) n[o] = e[Math.floor(Math.random() * e.length)]; return n; }, M6 = function(e, t, n) { for (var r = 0, a = 0; a < t.length; a++) r += Qy("manhattan", t[a], e, n, "kMedoids"); return r; }, D0e = function(e) { var t = this.cy(), n = this.nodes(), r = null, a = R4(e), o = new Array(a.k), i = {}, s; a.testMode ? typeof a.testCentroids == "number" ? (a.testCentroids, s = Zx(n, a.k, a.attributes)) : Dr(a.testCentroids) === "object" ? s = a.testCentroids : s = Zx(n, a.k, a.attributes) : s = Zx(n, a.k, a.attributes); for (var l = !0, u = 0; l && u < a.maxIterations; ) { for (var c = 0; c < n.length; c++) r = n[c], i[r.id()] = YM(r, s, a.distance, a.attributes, "kMeans"); l = !1; for (var d = 0; d < a.k; d++) { var f = ZM(d, n, i); if (f.length !== 0) { for (var h = a.attributes.length, p = s[d], v = new Array(h), m = new Array(h), g = 0; g < h; g++) { m[g] = 0; for (var y = 0; y < f.length; y++) r = f[y], m[g] += a.attributes[g](r); v[g] = m[g] / f.length, N0e(v[g], p[g], a.sensitivityThreshold) || (l = !0); } s[d] = v, o[d] = t.collection(f); } } u++; } return o; }, R0e = function(e) { var t = this.cy(), n = this.nodes(), r = null, a = R4(e), o = new Array(a.k), i, s = {}, l, u = new Array(a.k); a.testMode ? typeof a.testCentroids == "number" || (Dr(a.testCentroids) === "object" ? i = a.testCentroids : i = N6(n, a.k)) : i = N6(n, a.k); for (var c = !0, d = 0; c && d < a.maxIterations; ) { for (var f = 0; f < n.length; f++) r = n[f], s[r.id()] = YM(r, i, a.distance, a.attributes, "kMedoids"); c = !1; for (var h = 0; h < i.length; h++) { var p = ZM(h, n, s); if (p.length !== 0) { u[h] = M6(i[h], p, a.attributes); for (var v = 0; v < p.length; v++) l = M6(p[v], p, a.attributes), l < u[h] && (u[h] = l, i[h] = p[v], c = !0); o[h] = t.collection(p); } } d++; } return o; }, z0e = function(e, t, n, r, a) { for (var o, i, s = 0; s < t.length; s++) for (var l = 0; l < e.length; l++) r[s][l] = Math.pow(n[s][l], a.m); for (var u = 0; u < e.length; u++) for (var c = 0; c < a.attributes.length; c++) { o = 0, i = 0; for (var d = 0; d < t.length; d++) o += r[d][u] * a.attributes[c](t[d]), i += r[d][u]; e[u][c] = o / i; } }, V0e = function(e, t, n, r, a) { for (var o = 0; o < e.length; o++) t[o] = e[o].slice(); for (var i, s, l, u = 2 / (a.m - 1), c = 0; c < n.length; c++) for (var d = 0; d < r.length; d++) { i = 0; for (var f = 0; f < n.length; f++) s = Qy(a.distance, r[d], n[c], a.attributes, "cmeans"), l = Qy(a.distance, r[d], n[f], a.attributes, "cmeans"), i += Math.pow(s / l, u); e[d][c] = 1 / i; } }, j0e = function(e, t, n, r) { for (var a = new Array(n.k), o = 0; o < a.length; o++) a[o] = []; 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); a[s].push(e[l]); } for (var c = 0; c < a.length; c++) a[c] = r.collection(a[c]); return a; }, B6 = function(e) { var t = this.cy(), n = this.nodes(), r = R4(e), a, o, 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 f = 0, h = 0; h < r.k; h++) i[d][h] = Math.random(), f += i[d][h]; for (var p = 0; p < r.k; p++) i[d][p] = i[d][p] / f; } o = new Array(r.k); for (var v = 0; v < r.k; v++) o[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, y = 0; g && y < r.maxIterations; ) g = !1, z0e(o, n, i, l, r), V0e(i, s, o, n, r), M0e(i, s, r.sensitivityThreshold) || (g = !0), y++; return a = j0e(n, i, r, t), { clusters: a, degreeOfMembership: i }; }, H0e = { kMeans: D0e, kMedoids: R0e, fuzzyCMeans: B6, fcm: B6 }, U0e = ga({ 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 }), q0e = { single: "min", complete: "max" }, W0e = function(e) { var t = U0e(e), n = q0e[t.linkage]; return n != null && (t.linkage = n), t; }, D6 = function(e, t, n, r, a) { for (var o = 0, i = 1 / 0, s, l = a.attributes, u = function(S, _) { return z2(a.distance, l.length, function(T) { return l[T](S); }, function(T) { return l[T](_); }, S, _); }, c = 0; c < e.length; c++) { var d = e[c].key, f = n[d][r[d]]; f < i && (o = d, i = f); } if (a.mode === "threshold" && i >= a.threshold || a.mode === "dendrogram" && e.length === 1) return !1; var h = t[o], p = t[r[o]], v; a.mode === "dendrogram" ? v = { left: h, right: p, key: h.key } : v = { value: h.value.concat(p.value), key: h.key }, e[h.index] = v, e.splice(p.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 : a.linkage === "min" ? (s = n[h.key][g.key], n[h.key][g.key] > n[p.key][g.key] && (s = n[p.key][g.key])) : a.linkage === "max" ? (s = n[h.key][g.key], n[h.key][g.key] < n[p.key][g.key] && (s = n[p.key][g.key])) : a.linkage === "mean" ? s = (n[h.key][g.key] * h.size + n[p.key][g.key] * p.size) / (h.size + p.size) : a.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 y = 0; y < e.length; y++) { var x = e[y].key; if (r[x] === h.key || r[x] === p.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[y].index = y; } return h.key = p.key = h.index = p.index = null, !0; }, Um = function e(t, n, r) { t && (t.value ? n.push(t.value) : (t.left && e(t.left, n), t.right && e(t.right, n))); }, K0e = function e(t, n) { if (!t) return ""; if (t.left && t.right) { var r = e(t.left, n), a = e(t.right, n), o = n.add({ group: "nodes", data: { id: r + "," + a } }); return n.add({ group: "edges", data: { source: r, target: o.id() } }), n.add({ group: "edges", data: { source: a, target: o.id() } }), o.id(); } else if (t.value) return t.value.id(); }, G0e = function e(t, n, r) { if (!t) return []; var a = [], o = [], i = []; return n === 0 ? (t.left && Um(t.left, a), t.right && Um(t.right, o), i = a.concat(o), [r.collection(i)]) : n === 1 ? t.value ? [r.collection(t.value)] : (t.left && Um(t.left, a), t.right && Um(t.right, o), [r.collection(a), r.collection(o)]) : t.value ? [r.collection(t.value)] : (t.left && (a = e(t.left, n - 1, r)), t.right && (o = e(t.right, n - 1, r)), a.concat(o)); }, R6 = function(e) { for (var t = this.cy(), n = this.nodes(), r = W0e(e), a = r.attributes, o = function(g, y) { return z2(r.distance, a.length, function(x) { return a[x](g); }, function(x) { return a[x](y); }, g, y); }, 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 f = 0; f < i.length; f++) for (var h = 0; h <= f; h++) { var p = void 0; r.mode === "dendrogram" ? p = f === h ? 1 / 0 : o(i[f].value, i[h].value) : p = f === h ? 1 / 0 : o(i[f].value[0], i[h].value[0]), s[f][h] = p, s[h][f] = p, p < s[f][l[f]] && (l[f] = h); } for (var v = D6(i, u, s, l, r); v; ) v = D6(i, u, s, l, r); var m; return r.mode === "dendrogram" ? (m = G0e(i[0], r.dendrogramDepth, t), r.addDendrogram && K0e(i[0], t)) : (m = new Array(i.length), i.forEach(function(g, y) { g.key = g.index = null, m[y] = t.collection(g.value); })), m; }, X0e = { hierarchicalClustering: R6, hca: R6 }, Y0e = ga({ 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') ] }), Z0e = function(e) { var t = e.damping, n = e.preference; 0.5 <= t && t < 1 || dr("Damping must range on [0.5, 1). Got: ".concat(t)); var r = ["median", "mean", "min", "max"]; return r.some(function(a) { return a === n; }) || ot(n) || dr("Preference must be one of [".concat(r.map(function(a) { return "'".concat(a, "'"); }).join(", "), "] or a number. Got: ").concat(n)), Y0e(e); }, Q0e = function(e, t, n, r) { var a = function(o, i) { return r[i](o); }; return -z2(e, r.length, function(o) { return a(t, o); }, function(o) { return a(n, o); }, t, n); }, J0e = function(e, t) { var n = null; return t === "median" ? n = Zve(e) : t === "mean" ? n = Yve(e) : t === "min" ? n = Gve(e) : t === "max" ? n = Xve(e) : n = t, n; }, ege = function(e, t, n) { for (var r = [], a = 0; a < e; a++) t[a * e + a] + n[a * e + a] > 0 && r.push(a); return r; }, z6 = function(e, t, n) { for (var r = [], a = 0; a < e; a++) { for (var o = -1, i = -1 / 0, s = 0; s < n.length; s++) { var l = n[s]; t[a * e + l] > i && (o = l, i = t[a * e + l]); } o > 0 && r.push(o); } for (var u = 0; u < n.length; u++) r[n[u]] = n[u]; return r; }, tge = function(e, t, n) { for (var r = z6(e, t, n), a = 0; a < n.length; a++) { for (var o = [], i = 0; i < r.length; i++) r[i] === n[a] && o.push(i); for (var s = -1, l = -1 / 0, u = 0; u < o.length; u++) { for (var c = 0, d = 0; d < o.length; d++) c += t[o[d] * e + o[u]]; c > l && (s = u, l = c); } n[a] = o[s]; } return r = z6(e, t, n), r; }, V6 = function(e) { for (var t = this.cy(), n = this.nodes(), r = Z0e(e), a = {}, o = 0; o < n.length; o++) a[n[o].id()] = o; var i, s, l, u, c, d; i = n.length, s = i * i, l = new Array(s); for (var f = 0; f < s; f++) l[f] = -1 / 0; for (var h = 0; h < i; h++) for (var p = 0; p < i; p++) h !== p && (l[h * i + p] = Q0e(r.distance, n[h], n[p], r.attributes)); u = J0e(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 y = new Array(i), x = new Array(i), w = new Array(i), k = 0; k < i; k++) y[k] = 0, x[k] = 0, w[k] = 0; for (var C = new Array(i * r.minIterations), S = 0; S < C.length; S++) C[S] = 0; var _; for (_ = 0; _ < r.maxIterations; _++) { for (var T = 0; T < i; T++) { for (var O = -1 / 0, $ = -1 / 0, A = -1, N = 0, L = 0; L < i; L++) y[L] = c[T * i + L], N = d[T * i + L] + l[T * i + L], N >= O ? ($ = O, O = N, A = L) : N > $ && ($ = N); for (var R = 0; R < i; R++) c[T * i + R] = (1 - r.damping) * (l[T * i + R] - O) + r.damping * y[R]; c[T * i + A] = (1 - r.damping) * (l[T * i + A] - $) + r.damping * y[A]; } for (var P = 0; P < i; P++) { for (var B = 0, M = 0; M < i; M++) y[M] = d[M * i + P], x[M] = Math.max(0, c[M * i + P]), B += x[M]; B -= x[P], x[P] = c[P * i + P], B += x[P]; for (var z = 0; z < i; z++) d[z * i + P] = (1 - r.damping) * Math.min(0, B - x[z]) + r.damping * y[z]; d[P * i + P] = (1 - r.damping) * (B - x[P]) + r.damping * y[P]; } for (var Z = 0, G = 0; G < i; G++) { var J = d[G * i + G] + c[G * i + G] > 0 ? 1 : 0; C[_ % r.minIterations * i + G] = J, Z += J; } if (Z > 0 && (_ >= r.minIterations - 1 || _ == r.maxIterations - 1)) { for (var se = 0, ve = 0; ve < i; ve++) { w[ve] = 0; for (var ge = 0; ge < r.minIterations; ge++) w[ve] += C[ge * i + ve]; (w[ve] === 0 || w[ve] === r.minIterations) && se++; } if (se === i) break; } } for (var oe = ege(i, c, d), ee = tge(i, l, oe), q = {}, Y = 0; Y < oe.length; Y++) q[oe[Y]] = []; for (var te = 0; te < n.length; te++) { var we = a[n[te].id()], Oe = ee[we]; Oe != null && q[Oe].push(n[te]); } for (var Ne = new Array(oe.length), xe = 0; xe < oe.length; xe++) Ne[xe] = t.collection(q[oe[xe]]); return Ne; }, nge = { affinityPropagation: V6, ap: V6 }, rge = ga({ root: void 0, directed: !1 }), age = { hierholzer: function(e) { if (!Cn(e)) { var t = arguments; e = { root: t[0], directed: t[1] }; } var n = rge(e), r = n.root, a = n.directed, o = this, i = !1, s, l, u; r && (u = xt(r) ? this.filter(r)[0].id() : r[0].id()); var c = {}, d = {}; a ? o.forEach(function(g) { var y = 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 = y : C == 1 ? l ? i = !0 : l = y : (C > 1 || k > 1) && (i = !0), c[y] = [], g.outgoers().forEach(function(S) { S.isEdge() && c[y].push(S.id()); }); } else d[y] = [void 0, g.target().id()]; }) : o.forEach(function(g) { var y = g.id(); if (g.isNode()) { var x = g.degree(!0); x % 2 && (s ? l ? i = !0 : l = y : s = y), c[y] = [], g.connectedEdges().forEach(function(w) { return c[y].push(w.id()); }); } else d[y] = [g.source().id(), g.target().id()]; }); var f = { found: !1, trail: void 0 }; if (i) return f; if (l && s) if (a) { if (u && l != u) return f; u = l; } else { if (u && l != u && s != u) return f; u || (u = l); } else u || (u = o[0].id()); var h = function(g) { for (var y = g, x = [g], w, k, C; c[y].length; ) w = c[y].shift(), k = d[w][0], C = d[w][1], y != C ? (c[C] = c[C].filter(function(S) { return S != w; }), y = C) : !a && y != k && (c[k] = c[k].filter(function(S) { return S != w; }), y = k), x.unshift(w), x.unshift(y); return x; }, p = [], v = []; for (v = h(u); v.length != 1; ) c[v[0]].length == 0 ? (p.unshift(o.getElementById(v.shift())), p.unshift(o.getElementById(v.shift()))) : v = h(v.shift()).concat(v); p.unshift(o.getElementById(v.shift())); for (var m in c) if (c[m].length) return f; return f.found = !0, f.trail = this.spawn(p, !0), f; } }, qm = function() { var e = this, t = {}, n = 0, r = 0, a = [], o = [], i = {}, s = function(c, d) { for (var f = o.length - 1, h = [], p = e.spawn(); o[f].x != c || o[f].y != d; ) h.push(o.pop().edge), f--; h.push(o.pop().edge), h.forEach(function(v) { var m = v.connectedNodes().intersection(e); p.merge(v), m.forEach(function(g) { var y = g.id(), x = g.connectedEdges().intersection(e); p.merge(g), t[y].cutVertex ? p.merge(x.filter(function(w) { return w.isLoop(); })) : p.merge(x); }); }), a.push(p); }, l = function c(d, f, h) { d === h && (r += 1), t[f] = { id: n, low: n++, cutVertex: !1 }; var p = e.getElementById(f).connectedEdges().intersection(e); if (p.size() === 0) a.push(e.spawn(e.getElementById(f))); else { var v, m, g, y; p.forEach(function(x) { v = x.source().id(), m = x.target().id(), g = v === f ? m : v, g !== h && (y = x.id(), i[y] || (i[y] = !0, o.push({ x: f, y: g, edge: x })), g in t ? t[f].low = Math.min(t[f].low, t[g].id) : (c(d, g, f), t[f].low = Math.min(t[f].low, t[g].low), t[f].id <= t[g].low && (t[f].cutVertex = !0, s(f, 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: a }; }, oge = { hopcroftTarjanBiconnected: qm, htbc: qm, htb: qm, hopcroftTarjanBiconnectedComponents: qm }, Wm = function() { var e = this, t = {}, n = 0, r = [], a = [], o = e.spawn(e), i = function s(l) { a.push(l), t[l] = { index: n, low: n++, explored: !1 }; var u = e.getElementById(l).connectedEdges().intersection(e); if (u.forEach(function(p) { var v = p.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 = a.pop(); if (c.merge(e.getElementById(d)), t[d].low = t[l].index, t[d].explored = !0, d === l) break; } var f = c.edgesWith(c), h = c.merge(f); r.push(h), o = o.difference(h); } }; return e.forEach(function(s) { if (s.isNode()) { var l = s.id(); l in t || i(l); } }), { cut: o, components: r }; }, ige = { tarjanStronglyConnected: Wm, tsc: Wm, tscc: Wm, tarjanStronglyConnectedComponents: Wm }, QM = {}; [E0, Mve, Bve, Rve, Vve, Hve, Wve, m0e, nf, rf, UC, F0e, H0e, X0e, nge, age, oge, ige].forEach(function(e) { Ft(QM, 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 JM = 0, eB = 1, tB = 2, wl = function e(t) { if (!(this instanceof e)) return new e(t); this.id = "Thenable/1.0.7", this.state = JM, 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)); }; wl.prototype = { /* promise resolving methods */ fulfill: function(e) { return j6(this, eB, "fulfillValue", e); }, reject: function(e) { return j6(this, tB, "rejectReason", e); }, /* "The then Method" [Promises/A+ 1.1, 1.2, 2.2] */ then: function(e, t) { var n = this, r = new wl(); return n.onFulfilled.push(U6(e, r, "fulfill")), n.onRejected.push(U6(t, r, "reject")), nB(n), r.proxy; } }; var j6 = function(e, t, n, r) { return e.state === JM && (e.state = t, e[n] = r, nB(e)), e; }, nB = function(e) { e.state === eB ? H6(e, "onFulfilled", e.fulfillValue) : e.state === tB && H6(e, "onRejected", e.rejectReason); }, H6 = function(e, t, n) { if (e[t].length !== 0) { var r = e[t]; e[t] = []; var a = function() { for (var o = 0; o < r.length; o++) r[o](n); }; typeof setImmediate == "function" ? setImmediate(a) : setTimeout(a, 0); } }, U6 = function(e, t, n) { return function(r) { if (typeof e != "function") t[n].call(t, r); else { var a; try { a = e(r); } catch (o) { t.reject(o); return; } sge(t, a); } }; }, sge = function e(t, n) { if (t === n || t.proxy === n) { t.reject(new TypeError("cannot resolve promise with itself")); return; } var r; if (Dr(n) === "object" && n !== null || typeof n == "function") try { r = n.then; } catch (o) { t.reject(o); return; } if (typeof r == "function") { var a = !1; try { r.call( n, /* resolvePromise */ /* [Promises/A+ 2.3.3.3.1] */ function(o) { a || (a = !0, o === n ? t.reject(new TypeError("circular thenable chain")) : e(t, o)); }, /* rejectPromise */ /* [Promises/A+ 2.3.3.3.2] */ function(o) { a || (a = !0, t.reject(o)); } ); } catch (o) { a || t.reject(o); } return; } t.fulfill(n); }; wl.all = function(e) { return new wl(function(t, n) { for (var r = new Array(e.length), a = 0, o = function(s, l) { r[s] = l, a++, a === 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) { o(s, d); }, function(d) { n(d); }); else { var c = l; o(s, c); } })(i); }); }; wl.resolve = function(e) { return new wl(function(t, n) { t(e); }); }; wl.reject = function(e) { return new wl(function(t, n) { n(e); }); }; var fh = typeof Promise < "u" ? Promise : wl, qC = function(e, t, n) { var r = A4(e), a = !r, o = this._private = Ft({ duration: 1e3 }, t, n); if (o.target = e, o.style = o.style || o.css, o.started = !1, o.playing = !1, o.hooked = !1, o.applying = !1, o.progress = 0, o.completes = [], o.frames = [], o.complete && ir(o.complete) && o.completes.push(o.complete), a) { var i = e.position(); o.startPosition = o.startPosition || { x: i.x, y: i.y }, o.startStyle = o.startStyle || e.cy().style().getAnimationStartStyle(e, o.style); } if (r) { var s = e.pan(); o.startPan = { x: s.x, y: s.y }, o.startZoom = e.zoom(); } this.length = 1, this[0] = this; }, xd = qC.prototype; Ft(xd, { 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), $o(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 a = e.style[r], o = a.name, i = e.startStyle[o]; e.startStyle[o] = a, 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 fh(function(r, a) { n.push(function() { r(); }); }); } }); xd.complete = xd.completed; xd.run = xd.play; xd.running = xd.playing; var lge = { 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 a = n[0]; if (a) return a._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 a = 0; a < n.length; a++) { var o = n[a]; o._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, a = r ? n : [n], o = this._private.cy || this, i = !r, s = !i; if (!o.styleEnabled()) return this; var l = o.style(); e = Ft({}, e, t); var u = Object.keys(e).length === 0; if (u) return new qC(a[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 = o.pan(), f = o.zoom(); e.position = VM(c, f, d); } if (i && e.panBy != null) { var h = e.panBy, p = o.pan(); e.pan = { x: p.x + h.x, y: p.y + h.y }; } var v = e.center || e.centre; if (i && v != null) { var m = o.getCenterPan(v.eles, e.zoom); m != null && (e.pan = m); } if (i && e.fit != null) { var g = e.fit, y = o.getFitViewport(g.eles || g.boundingBox, g.padding); y != null && (e.pan = y.pan, e.zoom = y.zoom); } if (i && Cn(e.zoom)) { var x = o.getZoomedViewport(e.zoom); x != null ? (x.zoomed && (e.zoom = x.zoom), x.panned && (e.pan = x.pan)) : e.zoom = null; } return new qC(a[0], e); }; }, // animate animate: function() { return function(e, t) { var n = this, r = n.length !== void 0, a = r ? n : [n], o = this._private.cy || this; if (!o.styleEnabled()) return this; t && (e = Ft({}, e, t)); for (var i = 0; i < a.length; i++) { var s = a[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, a = r ? n : [n], o = this._private.cy || this; if (!o.styleEnabled()) return this; for (var i = 0; i < a.length; i++) { for (var s = a[i], l = s._private, u = l.animation.current, c = 0; c < u.length; c++) { var d = u[c], f = d._private; t && (f.duration = 0); } e && (l.animation.queue = []), t || (l.animation.current = []); } return o.notify("draw"), this; }; } // stop }, uge = Array.isArray, V2 = uge, cge = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, dge = /^\w*$/; function pge(e, t) { if (V2(e)) return !1; var n = typeof e; return n == "number" || n == "symbol" || n == "boolean" || e == null || Mg(e) ? !0 : dge.test(e) || !cge.test(e) || t != null && e in Object(t); } var fge = pge, hge = "[object AsyncFunction]", vge = "[object Function]", gge = "[object GeneratorFunction]", mge = "[object Proxy]"; function yge(e) { if (!md(e)) return !1; var t = PM(e); return t == vge || t == gge || t == hge || t == mge; } var bge = yge, wge = M2["__core-js_shared__"], Qx = wge, q6 = function() { var e = /[^.]+$/.exec(Qx && Qx.keys && Qx.keys.IE_PROTO || ""); return e ? "Symbol(src)_1." + e : ""; }(); function xge(e) { return !!q6 && q6 in e; } var kge = xge, Cge = Function.prototype, Sge = Cge.toString; function Ege(e) { if (e != null) { try { return Sge.call(e); } catch { } try { return e + ""; } catch { } } return ""; } var _ge = Ege, Tge = /[\\^$.*+?()[\]{}|]/g, Oge = /^\[object .+?Constructor\]$/, $ge = Function.prototype, Fge = Object.prototype, Age = $ge.toString, Ige = Fge.hasOwnProperty, Pge = RegExp( "^" + Age.call(Ige).replace(Tge, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$" ); function Lge(e) { if (!md(e) || kge(e)) return !1; var t = bge(e) ? Pge : Oge; return t.test(_ge(e)); } var Nge = Lge; function Mge(e, t) { return e == null ? void 0 : e[t]; } var Bge = Mge; function Dge(e, t) { var n = Bge(e, t); return Nge(n) ? n : void 0; } var z4 = Dge, Rge = z4(Object, "create"), O0 = Rge; function zge() { this.__data__ = O0 ? O0(null) : {}, this.size = 0; } var Vge = zge; function jge(e) { var t = this.has(e) && delete this.__data__[e]; return this.size -= t ? 1 : 0, t; } var Hge = jge, Uge = "__lodash_hash_undefined__", qge = Object.prototype, Wge = qge.hasOwnProperty; function Kge(e) { var t = this.__data__; if (O0) { var n = t[e]; return n === Uge ? void 0 : n; } return Wge.call(t, e) ? t[e] : void 0; } var Gge = Kge, Xge = Object.prototype, Yge = Xge.hasOwnProperty; function Zge(e) { var t = this.__data__; return O0 ? t[e] !== void 0 : Yge.call(t, e); } var Qge = Zge, Jge = "__lodash_hash_undefined__"; function eme(e, t) { var n = this.__data__; return this.size += this.has(e) ? 0 : 1, n[e] = O0 && t === void 0 ? Jge : t, this; } var tme = eme; function hh(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]); } } hh.prototype.clear = Vge; hh.prototype.delete = Hge; hh.prototype.get = Gge; hh.prototype.has = Qge; hh.prototype.set = tme; var W6 = hh; function nme() { this.__data__ = [], this.size = 0; } var rme = nme; function ame(e, t) { return e === t || e !== e && t !== t; } var rB = ame; function ome(e, t) { for (var n = e.length; n--; ) if (rB(e[n][0], t)) return n; return -1; } var j2 = ome, ime = Array.prototype, sme = ime.splice; function lme(e) { var t = this.__data__, n = j2(t, e); if (n < 0) return !1; var r = t.length - 1; return n == r ? t.pop() : sme.call(t, n, 1), --this.size, !0; } var ume = lme; function cme(e) { var t = this.__data__, n = j2(t, e); return n < 0 ? void 0 : t[n][1]; } var dme = cme; function pme(e) { return j2(this.__data__, e) > -1; } var fme = pme; function hme(e, t) { var n = this.__data__, r = j2(n, e); return r < 0 ? (++this.size, n.push([e, t])) : n[r][1] = t, this; } var vme = hme; function vh(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]); } } vh.prototype.clear = rme; vh.prototype.delete = ume; vh.prototype.get = dme; vh.prototype.has = fme; vh.prototype.set = vme; var gme = vh, mme = z4(M2, "Map"), yme = mme; function bme() { this.size = 0, this.__data__ = { hash: new W6(), map: new (yme || gme)(), string: new W6() }; } var wme = bme; function xme(e) { var t = typeof e; return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e !== "__proto__" : e === null; } var kme = xme; function Cme(e, t) { var n = e.__data__; return kme(t) ? n[typeof t == "string" ? "string" : "hash"] : n.map; } var H2 = Cme; function Sme(e) { var t = H2(this, e).delete(e); return this.size -= t ? 1 : 0, t; } var Eme = Sme; function _me(e) { return H2(this, e).get(e); } var Tme = _me; function Ome(e) { return H2(this, e).has(e); } var $me = Ome; function Fme(e, t) { var n = H2(this, e), r = n.size; return n.set(e, t), this.size += n.size == r ? 0 : 1, this; } var Ame = Fme; function gh(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]); } } gh.prototype.clear = wme; gh.prototype.delete = Eme; gh.prototype.get = Tme; gh.prototype.has = $me; gh.prototype.set = Ame; var aB = gh, Ime = "Expected a function"; function V4(e, t) { if (typeof e != "function" || t != null && typeof t != "function") throw new TypeError(Ime); var n = function() { var r = arguments, a = t ? t.apply(this, r) : r[0], o = n.cache; if (o.has(a)) return o.get(a); var i = e.apply(this, r); return n.cache = o.set(a, i) || o, i; }; return n.cache = new (V4.Cache || aB)(), n; } V4.Cache = aB; var Pme = V4, Lme = 500; function Nme(e) { var t = Pme(e, function(r) { return n.size === Lme && n.clear(), r; }), n = t.cache; return t; } var Mme = Nme, Bme = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, Dme = /\\(\\)?/g, Rme = Mme(function(e) { var t = []; return e.charCodeAt(0) === 46 && t.push(""), e.replace(Bme, function(n, r, a, o) { t.push(a ? o.replace(Dme, "$1") : r || n); }), t; }), oB = Rme; function zme(e, t) { for (var n = -1, r = e == null ? 0 : e.length, a = Array(r); ++n < r; ) a[n] = t(e[n], n, e); return a; } var iB = zme, Vme = 1 / 0, K6 = Of ? Of.prototype : void 0, G6 = K6 ? K6.toString : void 0; function sB(e) { if (typeof e == "string") return e; if (V2(e)) return iB(e, sB) + ""; if (Mg(e)) return G6 ? G6.call(e) : ""; var t = e + ""; return t == "0" && 1 / e == -Vme ? "-0" : t; } var jme = sB; function Hme(e) { return e == null ? "" : jme(e); } var lB = Hme; function Ume(e, t) { return V2(e) ? e : fge(e, t) ? [e] : oB(lB(e)); } var uB = Ume, qme = 1 / 0; function Wme(e) { if (typeof e == "string" || Mg(e)) return e; var t = e + ""; return t == "0" && 1 / e == -qme ? "-0" : t; } var j4 = Wme; function Kme(e, t) { t = uB(t, e); for (var n = 0, r = t.length; e != null && n < r; ) e = e[j4(t[n++])]; return n && n == r ? e : void 0; } var Gme = Kme; function Xme(e, t, n) { var r = e == null ? void 0 : Gme(e, t); return r === void 0 ? n : r; } var Yme = Xme, Zme = function() { try { var e = z4(Object, "defineProperty"); return e({}, "", {}), e; } catch { } }(), X6 = Zme; function Qme(e, t, n) { t == "__proto__" && X6 ? X6(e, t, { configurable: !0, enumerable: !0, value: n, writable: !0 }) : e[t] = n; } var Jme = Qme, e1e = Object.prototype, t1e = e1e.hasOwnProperty; function n1e(e, t, n) { var r = e[t]; (!(t1e.call(e, t) && rB(r, n)) || n === void 0 && !(t in e)) && Jme(e, t, n); } var r1e = n1e, a1e = 9007199254740991, o1e = /^(?:0|[1-9]\d*)$/; function i1e(e, t) { var n = typeof e; return t = t ?? a1e, !!t && (n == "number" || n != "symbol" && o1e.test(e)) && e > -1 && e % 1 == 0 && e < t; } var s1e = i1e; function l1e(e, t, n, r) { if (!md(e)) return e; t = uB(t, e); for (var a = -1, o = t.length, i = o - 1, s = e; s != null && ++a < o; ) { var l = j4(t[a]), u = n; if (l === "__proto__" || l === "constructor" || l === "prototype") return e; if (a != i) { var c = s[l]; u = r ? r(c, l, s) : void 0, u === void 0 && (u = md(c) ? c : s1e(t[a + 1]) ? [] : {}); } r1e(s, l, u), s = s[l]; } return e; } var u1e = l1e; function c1e(e, t, n) { return e == null ? e : u1e(e, t, n); } var d1e = c1e; function p1e(e, t) { var n = -1, r = e.length; for (t || (t = Array(r)); ++n < r; ) t[n] = e[n]; return t; } var f1e = p1e; function h1e(e) { return V2(e) ? iB(e, j4) : Mg(e) ? [e] : f1e(oB(lB(e))); } var v1e = h1e, g1e = { // 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 = Ft({}, t, e), function(n, r) { var a = e, o = this, i = o.length !== void 0, s = i ? o : [o], l = i ? o[0] : o; if (xt(n)) { var u = n.indexOf(".") !== -1, c = u && v1e(n); if (a.allowGetting && r === void 0) { var d; return l && (a.beforeGet(l), c && l._private[a.field][n] === void 0 ? d = Yme(l._private[a.field], c) : d = l._private[a.field][n]), d; } else if (a.allowSetting && r !== void 0) { var f = !a.immutableKeys[n]; if (f) { var h = kM({}, n, r); a.beforeSet(o, h); for (var p = 0, v = s.length; p < v; p++) { var m = s[p]; a.canSet(m) && (c && l._private[a.field][n] === void 0 ? d1e(m._private[a.field], c, r) : m._private[a.field][n] = r); } a.updateStyle && o.updateStyle(), a.onSet(o), a.settingTriggersEvent && o[a.triggerFnName](a.settingEvent); } } } else if (a.allowSetting && Cn(n)) { var g = n, y, x, w = Object.keys(g); a.beforeSet(o, g); for (var k = 0; k < w.length; k++) { y = w[k], x = g[y]; var C = !a.immutableKeys[y]; if (C) for (var S = 0; S < s.length; S++) { var _ = s[S]; a.canSet(_) && (_._private[a.field][y] = x); } } a.updateStyle && o.updateStyle(), a.onSet(o), a.settingTriggersEvent && o[a.triggerFnName](a.settingEvent); } else if (a.allowBinding && ir(n)) { var T = n; o.on(a.bindingEvent, T); } else if (a.allowGetting && n === void 0) { var O; return l && (a.beforeGet(l), O = l._private[a.field]), O; } return o; }; }, // data // remove data field removeData: function(e) { var t = { field: "data", event: "data", triggerFnName: "trigger", triggerEvent: !1, immutableKeys: {} // key => true if immutable }; return e = Ft({}, t, e), function(n) { var r = e, a = this, o = a.length !== void 0, i = o ? a : [a]; if (xt(n)) { for (var s = n.split(/\s+/), l = s.length, u = 0; u < l; u++) { var c = s[u]; if (!zu(c)) { var d = !r.immutableKeys[c]; if (d) for (var f = 0, h = i.length; f < h; f++) i[f]._private[r.field][c] = void 0; } } r.triggerEvent && a[r.triggerFnName](r.event); } else if (n === void 0) { for (var p = 0, v = i.length; p < v; p++) for (var m = i[p]._private[r.field], g = Object.keys(m), y = 0; y < g.length; y++) { var x = g[y], w = !r.immutableKeys[x]; w && (m[x] = void 0); } r.triggerEvent && a[r.triggerFnName](r.event); } return a; }; } // removeData }, m1e = { 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 a = this, o = Array.prototype.slice.call(arguments, 0); return new fh(function(i, s) { var l = function(d) { a.off.apply(a, c), i(d); }, u = o.concat([l]), c = u.concat([]); a.on.apply(a, u); }); }; } }, On = {}; [lge, g1e, m1e].forEach(function(e) { Ft(On, e); }); var y1e = { animate: On.animate(), animation: On.animation(), animated: On.animated(), clearQueue: On.clearQueue(), delay: On.delay(), delayAnimation: On.delayAnimation(), stop: On.stop() }, Q1 = { 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 zn(e) || (e = (e || "").match(/\S+/g) || []); for (var r = [], a = new ph(e), o = 0; o < t.length; o++) { for (var i = t[o], s = i._private, l = s.classes, u = !1, c = 0; c < e.length; c++) { var d = e[c], f = l.has(d); if (!f) { u = !0; break; } } u || (u = l.size !== e.length), u && (s.classes = a, 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) { zn(e) || (e = e.match(/\S+/g) || []); for (var n = this, r = t === void 0, a = [], o = 0, i = n.length; o < i; o++) for (var s = n[o], l = s._private.classes, u = !1, c = 0; c < e.length; c++) { var d = e[c], f = l.has(d), h = !1; t || r && !f ? (l.add(d), h = !0) : (!t || r && f) && (l.delete(d), h = !0), !u && h && (a.push(s), u = !0); } return a.length > 0 && this.spawn(a).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; } }; Q1.className = Q1.classNames = Q1.classes; var hn = { 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: Pr, // 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+" }; hn.variable = "(?:[\\w-.]|(?:\\\\" + hn.metaChar + "))+"; hn.className = "(?:[\\w-]|(?:\\\\" + hn.metaChar + "))+"; hn.value = hn.string + "|" + hn.number; hn.id = hn.variable; (function() { var e, t, n; for (e = hn.comparatorOp.split("|"), n = 0; n < e.length; n++) t = e[n], hn.comparatorOp += "|@" + t; for (e = hn.comparatorOp.split("|"), n = 0; n < e.length; n++) t = e[n], !(t.indexOf("!") >= 0) && t !== "=" && (hn.comparatorOp += "|\\!" + t); })(); var Nn = function() { return { checks: [] }; }, pt = { /** 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 }, WC = [{ 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 Ohe(e.selector, t.selector); }), b1e = function() { for (var e = {}, t, n = 0; n < WC.length; n++) t = WC[n], e[t.selector] = t.matches; return e; }(), w1e = function(e, t) { return b1e[e](t); }, x1e = "(" + WC.map(function(e) { return e.selector; }).join("|") + ")", xp = function(e) { return e.replace(new RegExp("\\\\(" + hn.metaChar + ")", "g"), function(t, n) { return n; }); }, Kl = function(e, t, n) { e[e.length - 1] = n; }, KC = [{ name: "group", // just used for identifying when debugging query: !0, regex: "(" + hn.group + ")", populate: function(e, t, n) { var r = _i(n, 1), a = r[0]; t.checks.push({ type: pt.GROUP, value: a === "*" ? a : a + "s" }); } }, { name: "state", query: !0, regex: x1e, populate: function(e, t, n) { var r = _i(n, 1), a = r[0]; t.checks.push({ type: pt.STATE, value: a }); } }, { name: "id", query: !0, regex: "\\#(" + hn.id + ")", populate: function(e, t, n) { var r = _i(n, 1), a = r[0]; t.checks.push({ type: pt.ID, value: xp(a) }); } }, { name: "className", query: !0, regex: "\\.(" + hn.className + ")", populate: function(e, t, n) { var r = _i(n, 1), a = r[0]; t.checks.push({ type: pt.CLASS, value: xp(a) }); } }, { name: "dataExists", query: !0, regex: "\\[\\s*(" + hn.variable + ")\\s*\\]", populate: function(e, t, n) { var r = _i(n, 1), a = r[0]; t.checks.push({ type: pt.DATA_EXIST, field: xp(a) }); } }, { name: "dataCompare", query: !0, regex: "\\[\\s*(" + hn.variable + ")\\s*(" + hn.comparatorOp + ")\\s*(" + hn.value + ")\\s*\\]", populate: function(e, t, n) { var r = _i(n, 3), a = r[0], o = r[1], i = r[2], s = new RegExp("^" + hn.string + "$").exec(i) != null; s ? i = i.substring(1, i.length - 1) : i = parseFloat(i), t.checks.push({ type: pt.DATA_COMPARE, field: xp(a), operator: o, value: i }); } }, { name: "dataBool", query: !0, regex: "\\[\\s*(" + hn.boolOp + ")\\s*(" + hn.variable + ")\\s*\\]", populate: function(e, t, n) { var r = _i(n, 2), a = r[0], o = r[1]; t.checks.push({ type: pt.DATA_BOOL, field: xp(o), operator: a }); } }, { name: "metaCompare", query: !0, regex: "\\[\\[\\s*(" + hn.meta + ")\\s*(" + hn.comparatorOp + ")\\s*(" + hn.number + ")\\s*\\]\\]", populate: function(e, t, n) { var r = _i(n, 3), a = r[0], o = r[1], i = r[2]; t.checks.push({ type: pt.META_COMPARE, field: xp(a), operator: o, value: parseFloat(i) }); } }, { name: "nextQuery", separator: !0, regex: hn.separator, populate: function(e, t) { var n = e.currentSubject, r = e.edgeCount, a = e.compoundCount, o = e[e.length - 1]; n != null && (o.subject = n, e.currentSubject = null), o.edgeCount = r, o.compoundCount = a, e.edgeCount = 0, e.compoundCount = 0; var i = e[e.length++] = Nn(); return i; } }, { name: "directedEdge", separator: !0, regex: hn.directedEdge, populate: function(e, t) { if (e.currentSubject == null) { var n = Nn(), r = t, a = Nn(); return n.checks.push({ type: pt.DIRECTED_EDGE, source: r, target: a }), Kl(e, t, n), e.edgeCount++, a; } else { var o = Nn(), i = t, s = Nn(); return o.checks.push({ type: pt.NODE_SOURCE, source: i, target: s }), Kl(e, t, o), e.edgeCount++, s; } } }, { name: "undirectedEdge", separator: !0, regex: hn.undirectedEdge, populate: function(e, t) { if (e.currentSubject == null) { var n = Nn(), r = t, a = Nn(); return n.checks.push({ type: pt.UNDIRECTED_EDGE, nodes: [r, a] }), Kl(e, t, n), e.edgeCount++, a; } else { var o = Nn(), i = t, s = Nn(); return o.checks.push({ type: pt.NODE_NEIGHBOR, node: i, neighbor: s }), Kl(e, t, o), s; } } }, { name: "child", separator: !0, regex: hn.child, populate: function(e, t) { if (e.currentSubject == null) { var n = Nn(), r = Nn(), a = e[e.length - 1]; return n.checks.push({ type: pt.CHILD, parent: a, child: r }), Kl(e, t, n), e.compoundCount++, r; } else if (e.currentSubject === t) { var o = Nn(), i = e[e.length - 1], s = Nn(), l = Nn(), u = Nn(), c = Nn(); return o.checks.push({ type: pt.COMPOUND_SPLIT, left: i, right: s, subject: l }), l.checks = t.checks, t.checks = [{ type: pt.TRUE }], c.checks.push({ type: pt.TRUE }), s.checks.push({ type: pt.PARENT, // type is swapped on right side queries parent: c, child: u // empty for now }), Kl(e, i, o), e.currentSubject = l, e.compoundCount++, u; } else { var d = Nn(), f = Nn(), h = [{ type: pt.PARENT, parent: d, child: f }]; return d.checks = t.checks, t.checks = h, e.compoundCount++, f; } } }, { name: "descendant", separator: !0, regex: hn.descendant, populate: function(e, t) { if (e.currentSubject == null) { var n = Nn(), r = Nn(), a = e[e.length - 1]; return n.checks.push({ type: pt.DESCENDANT, ancestor: a, descendant: r }), Kl(e, t, n), e.compoundCount++, r; } else if (e.currentSubject === t) { var o = Nn(), i = e[e.length - 1], s = Nn(), l = Nn(), u = Nn(), c = Nn(); return o.checks.push({ type: pt.COMPOUND_SPLIT, left: i, right: s, subject: l }), l.checks = t.checks, t.checks = [{ type: pt.TRUE }], c.checks.push({ type: pt.TRUE }), s.checks.push({ type: pt.ANCESTOR, // type is swapped on right side queries ancestor: c, descendant: u // empty for now }), Kl(e, i, o), e.currentSubject = l, e.compoundCount++, u; } else { var d = Nn(), f = Nn(), h = [{ type: pt.ANCESTOR, ancestor: d, descendant: f }]; return d.checks = t.checks, t.checks = h, e.compoundCount++, f; } } }, { name: "subject", modifier: !0, regex: hn.subject, populate: function(e, t) { if (e.currentSubject != null && e.currentSubject !== t) return Fn("Redefinition of subject in selector `" + e.toString() + "`"), !1; e.currentSubject = t; var n = e[e.length - 1], r = n.checks[0], a = r == null ? null : r.type; a === pt.DIRECTED_EDGE ? r.type = pt.NODE_TARGET : a === pt.UNDIRECTED_EDGE && (r.type = pt.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 k1e = function(e) { for (var t, n, r, a = 0; a < KC.length; a++) { var o = KC[a], i = o.name, s = e.match(o.regexObj); if (s != null) { n = s, t = o, r = i; var l = s[0]; e = e.substring(l.length); break; } } return { expr: t, match: n, name: r, remaining: e }; }, C1e = function(e) { var t = e.match(/^\s+/); if (t) { var n = t[0]; e = e.substring(n.length); } return e; }, S1e = function(e) { var t = this, n = t.inputText = e, r = t[0] = Nn(); for (t.length = 1, n = C1e(n); ; ) { var a = k1e(n); if (a.expr == null) return Fn("The selector `" + e + "`is invalid"), !1; var o = a.match.slice(1), i = a.expr.populate(t, r, o); if (i === !1) return !1; if (i != null && (r = i), n = a.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 Fn("The selector `" + e + "` is invalid because it uses both a compound selector and an edge selector"), !1; if (u.edgeCount > 1) return Fn("The selector `" + e + "` is invalid because it uses multiple edge selectors"), !1; u.edgeCount === 1 && Fn("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; }, E1e = function() { if (this.toStringCache != null) return this.toStringCache; for (var e = function(l) { return l ?? ""; }, t = function(l) { return xt(l) ? '"' + l + '"' : e(l); }, n = function(l) { return " " + l + " "; }, r = function(l, u) { var c = l.type, d = l.value; switch (c) { case pt.GROUP: { var f = e(d); return f.substring(0, f.length - 1); } case pt.DATA_COMPARE: { var h = l.field, p = l.operator; return "[" + h + n(e(p)) + t(d) + "]"; } case pt.DATA_BOOL: { var v = l.operator, m = l.field; return "[" + e(v) + m + "]"; } case pt.DATA_EXIST: { var g = l.field; return "[" + g + "]"; } case pt.META_COMPARE: { var y = l.operator, x = l.field; return "[[" + x + n(e(y)) + t(d) + "]]"; } case pt.STATE: return d; case pt.ID: return "#" + d; case pt.CLASS: return "." + d; case pt.PARENT: case pt.CHILD: return a(l.parent, u) + n(">") + a(l.child, u); case pt.ANCESTOR: case pt.DESCENDANT: return a(l.ancestor, u) + " " + a(l.descendant, u); case pt.COMPOUND_SPLIT: { var w = a(l.left, u), k = a(l.subject, u), C = a(l.right, u); return w + (w.length > 0 ? " " : "") + k + C; } case pt.TRUE: return ""; } }, a = function(l, u) { return l.checks.reduce(function(c, d, f) { return c + (u === l && f === 0 ? "$" : "") + r(d, u); }, ""); }, o = "", i = 0; i < this.length; i++) { var s = this[i]; o += a(s, s.subject), this.length > 1 && i < this.length - 1 && (o += ", "); } return this.toStringCache = o, o; }, _1e = { parse: S1e, toString: E1e }, cB = function(e, t, n) { var r, a = xt(e), o = ot(e), i = xt(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), (a || i || u) && (s = !a && !o ? "" : "" + 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; }, T1e = function(e, t) { switch (t) { case "?": return !!e; case "!": return !e; case "^": return e === void 0; } }, O1e = function(e) { return e !== void 0; }, H4 = function(e, t) { return e.data(t); }, $1e = function(e, t) { return e[t](); }, fr = [], tr = function(e, t) { return e.checks.every(function(n) { return fr[n.type](n, t); }); }; fr[pt.GROUP] = function(e, t) { var n = e.value; return n === "*" || n === t.group(); }; fr[pt.STATE] = function(e, t) { var n = e.value; return w1e(n, t); }; fr[pt.ID] = function(e, t) { var n = e.value; return t.id() === n; }; fr[pt.CLASS] = function(e, t) { var n = e.value; return t.hasClass(n); }; fr[pt.META_COMPARE] = function(e, t) { var n = e.field, r = e.operator, a = e.value; return cB($1e(t, n), r, a); }; fr[pt.DATA_COMPARE] = function(e, t) { var n = e.field, r = e.operator, a = e.value; return cB(H4(t, n), r, a); }; fr[pt.DATA_BOOL] = function(e, t) { var n = e.field, r = e.operator; return T1e(H4(t, n), r); }; fr[pt.DATA_EXIST] = function(e, t) { var n = e.field; return e.operator, O1e(H4(t, n)); }; fr[pt.UNDIRECTED_EDGE] = function(e, t) { var n = e.nodes[0], r = e.nodes[1], a = t.source(), o = t.target(); return tr(n, a) && tr(r, o) || tr(r, a) && tr(n, o); }; fr[pt.NODE_NEIGHBOR] = function(e, t) { return tr(e.node, t) && t.neighborhood().some(function(n) { return n.isNode() && tr(e.neighbor, n); }); }; fr[pt.DIRECTED_EDGE] = function(e, t) { return tr(e.source, t.source()) && tr(e.target, t.target()); }; fr[pt.NODE_SOURCE] = function(e, t) { return tr(e.source, t) && t.outgoers().some(function(n) { return n.isNode() && tr(e.target, n); }); }; fr[pt.NODE_TARGET] = function(e, t) { return tr(e.target, t) && t.incomers().some(function(n) { return n.isNode() && tr(e.source, n); }); }; fr[pt.CHILD] = function(e, t) { return tr(e.child, t) && tr(e.parent, t.parent()); }; fr[pt.PARENT] = function(e, t) { return tr(e.parent, t) && t.children().some(function(n) { return tr(e.child, n); }); }; fr[pt.DESCENDANT] = function(e, t) { return tr(e.descendant, t) && t.ancestors().some(function(n) { return tr(e.ancestor, n); }); }; fr[pt.ANCESTOR] = function(e, t) { return tr(e.ancestor, t) && t.descendants().some(function(n) { return tr(e.descendant, n); }); }; fr[pt.COMPOUND_SPLIT] = function(e, t) { return tr(e.subject, t) && tr(e.left, t) && tr(e.right, t); }; fr[pt.TRUE] = function() { return !0; }; fr[pt.COLLECTION] = function(e, t) { var n = e.value; return n.has(t); }; fr[pt.FILTER] = function(e, t) { var n = e.value; return n(t); }; var F1e = function(e) { var t = this; if (t.length === 1 && t[0].checks.length === 1 && t[0].checks[0].type === pt.ID) return e.getElementById(t[0].checks[0].value).collection(); var n = function(r) { for (var a = 0; a < t.length; a++) { var o = t[a]; if (tr(o, r)) return !0; } return !1; }; return t.text() == null && (n = function() { return !0; }), e.filter(n); }, A1e = function(e) { for (var t = this, n = 0; n < t.length; n++) { var r = t[n]; if (tr(r, e)) return !0; } return !1; }, I1e = { matches: A1e, filter: F1e }, ju = function(e) { this.inputText = e, this.currentSubject = null, this.compoundCount = 0, this.edgeCount = 0, this.length = 0, e == null || xt(e) && e.match(/^\s*$/) || ($o(e) ? this.addQuery({ checks: [{ type: pt.COLLECTION, value: e.collection() }] }) : ir(e) ? this.addQuery({ checks: [{ type: pt.FILTER, value: e }] }) : xt(e) ? this.parse(e) || (this.invalid = !0) : dr("A selector must be created from a string; found ")); }, Hu = ju.prototype; [_1e, I1e].forEach(function(e) { return Ft(Hu, e); }); Hu.text = function() { return this.inputText; }; Hu.size = function() { return this.length; }; Hu.eq = function(e) { return this[e]; }; Hu.sameText = function(e) { return !this.invalid && !e.invalid && this.text() === e.text(); }; Hu.addQuery = function(e) { this[this.length++] = e; }; Hu.selector = Hu.toString; var Iu = { allAre: function(e) { var t = new ju(e); return this.every(function(n) { return t.matches(n); }); }, is: function(e) { var t = new ju(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()); }); } }; Iu.allAreNeighbours = Iu.allAreNeighbors; Iu.has = Iu.contains; Iu.equal = Iu.equals = Iu.same; var Xo = function(e, t) { return function(n, r, a, o) { var i = n, s = this, l; if (i == null ? l = "" : $o(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] || [], f = yd(l), h = d[f]; return h || (d[f] = e.call(s, n, r, a, o)); } else return e.call(s, n, r, a, o); }; }, Af = { 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 a = this[r], o = a._private.parent; o && t.push(o); } 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 a = n[r]; t.push(a); } 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], a = r.parents(); t = t || a, t = t.intersect(a); } 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: Xo(function(e) { for (var t = [], n = 0; n < this.length; n++) for (var r = this[n], a = r._private.children, o = 0; o < a.length; o++) t.push(a[o]); 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 a = 0; a < r.length; a++) { var o = r[a]; t.push(o), o.children().nonempty() && n(o.children()); } } return n(this.children()), this.spawn(t, !0).filter(e); } }; function U4(e, t, n, r) { for (var a = [], o = new ph(), i = e.cy(), s = i.hasCompoundNodes(), l = 0; l < e.length; l++) { var u = e[l]; n ? a.push(u) : s && r(a, o, u); } for (; a.length > 0; ) { var c = a.shift(); t(c), o.add(c.id()), s && r(a, o, c); } return e; } function dB(e, t, n) { if (n.isParent()) for (var r = n._private.children, a = 0; a < r.length; a++) { var o = r[a]; t.has(o.id()) || e.push(o); } } Af.forEachDown = function(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0; return U4(this, e, t, dB); }; function pB(e, t, n) { if (n.isChild()) { var r = n._private.parent; t.has(r.id()) || e.push(r); } } Af.forEachUp = function(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0; return U4(this, e, t, pB); }; function P1e(e, t, n) { pB(e, t, n), dB(e, t, n); } Af.forEachUpAndDown = function(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0; return U4(this, e, t, P1e); }; Af.ancestors = Af.parents; var $0, fB; $0 = fB = { data: On.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: On.removeData({ field: "data", event: "data", triggerFnName: "trigger", triggerEvent: !0, immutableKeys: { id: !0, source: !0, target: !0, parent: !0 }, updateStyle: !0 }), scratch: On.data({ field: "scratch", bindingEvent: "scratch", allowBinding: !0, allowSetting: !0, settingEvent: "scratch", settingTriggersEvent: !0, triggerFnName: "trigger", allowGetting: !0, updateStyle: !0 }), removeScratch: On.removeData({ field: "scratch", event: "scratch", triggerFnName: "trigger", triggerEvent: !0, updateStyle: !0 }), rscratch: On.data({ field: "rscratch", allowBinding: !1, allowSetting: !0, settingTriggersEvent: !1, allowGetting: !0 }), removeRscratch: On.removeData({ field: "rscratch", triggerEvent: !1 }), id: function() { var e = this[0]; if (e) return e._private.data.id; } }; $0.attr = $0.data; $0.removeAttr = $0.removeData; var L1e = fB, U2 = {}; function Jx(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, a = n[0], o = a._private.edges, i = 0; i < o.length; i++) { var s = o[i]; !t && s.isLoop() || (r += e(a, s)); } return r; } else return; }; } Ft(U2, { degree: Jx(function(e, t) { return t.source().same(t.target()) ? 2 : 1; }), indegree: Jx(function(e, t) { return t.target().same(e) ? 1 : 0; }), outdegree: Jx(function(e, t) { return t.source().same(e) ? 1 : 0; }) }); function kp(e, t) { return function(n) { for (var r, a = this.nodes(), o = 0; o < a.length; o++) { var i = a[o], s = i[e](n); s !== void 0 && (r === void 0 || t(s, r)) && (r = s); } return r; }; } Ft(U2, { minDegree: kp("degree", function(e, t) { return e < t; }), maxDegree: kp("degree", function(e, t) { return e > t; }), minIndegree: kp("indegree", function(e, t) { return e < t; }), maxIndegree: kp("indegree", function(e, t) { return e > t; }), minOutdegree: kp("outdegree", function(e, t) { return e < t; }), maxOutdegree: kp("outdegree", function(e, t) { return e > t; }) }); Ft(U2, { totalDegree: function(e) { for (var t = 0, n = this.nodes(), r = 0; r < n.length; r++) t += n[r].degree(e); return t; } }); var Ri, hB, vB = function(e, t, n) { for (var r = 0; r < e.length; r++) { var a = e[r]; if (!a.locked()) { var o = a._private.position, i = { x: t.x != null ? t.x - o.x : 0, y: t.y != null ? t.y - o.y : 0 }; a.isParent() && !(i.x === 0 && i.y === 0) && a.children().shift(i, n), a.dirtyBoundingBoxCache(); } } }, Y6 = { 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) { vB(e, t, !1); }, onSet: function(e) { e.dirtyCompoundBoundsCache(); }, canSet: function(e) { return !e.locked(); } }; Ri = hB = { position: On.data(Y6), // position but no notification to renderer silentPosition: On.data(Ft({}, Y6, { allowBinding: !1, allowSetting: !0, settingTriggersEvent: !1, allowGetting: !1, beforeSet: function(e, t) { vB(e, t, !0); }, onSet: function(e) { e.dirtyCompoundBoundsCache(); } })), positions: function(e, t) { if (Cn(e)) t ? this.silentPosition(e) : this.position(e); else if (ir(e)) { var n = e, r = this.cy(); r.startBatch(); for (var a = 0; a < this.length; a++) { var o = this[a], i = void 0; (i = n(o, a)) && (t ? o.silentPosition(i) : o.position(i)); } r.endBatch(); } return this; }, silentPositions: function(e) { return this.positions(e, !0); }, shift: function(e, t, n) { var r; if (Cn(e) ? (r = { x: ot(e.x) ? e.x : 0, y: ot(e.y) ? e.y : 0 }, n = t) : xt(e) && ot(t) && (r = { x: 0, y: 0 }, r[e] = t), r != null) { var a = this.cy(); a.startBatch(); for (var o = 0; o < this.length; o++) { var i = this[o]; if (!(a.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); } } a.endBatch(); } return this; }, silentShift: function(e, t) { return Cn(e) ? this.shift(e, !0) : xt(e) && ot(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(), a = r.zoom(), o = r.pan(), i = Cn(e) ? e : void 0, s = i !== void 0 || t !== void 0 && xt(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 - o[e]) / a) : i !== void 0 && u.position(VM(i, a, o)); } else { var c = n.position(); return i = R2(c, a, o), 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(), a = Cn(e) ? e : void 0, o = a !== void 0 || t !== void 0 && xt(e), i = r.hasCompoundNodes(); if (n && n.isNode()) if (o) 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 f = d ? u.position() : { x: 0, y: 0 }; t !== void 0 ? l.position(e, t + f[e]) : a !== void 0 && l.position({ x: a.x + f.x, y: a.y + f.y }); } else { var h = n.position(), p = i ? n.parent() : null, v = p && p.length > 0, m = v; v && (p = p[0]); var g = m ? p.position() : { x: 0, y: 0 }; return a = { x: h.x - g.x, y: h.y - g.y }, e === void 0 ? a : a[e]; } else if (!o) return; return this; } }; Ri.modelPosition = Ri.point = Ri.position; Ri.modelPositions = Ri.points = Ri.positions; Ri.renderedPoint = Ri.renderedPosition; Ri.relativePoint = Ri.relativePosition; var N1e = hB, af, sc; af = sc = {}; sc.renderedBoundingBox = function(e) { var t = this.boundingBox(e), n = this.cy(), r = n.zoom(), a = n.pan(), o = t.x1 * r + a.x, i = t.x2 * r + a.x, s = t.y1 * r + a.y, l = t.y2 * r + a.y; return { x1: o, x2: i, y1: s, y2: l, w: i - o, h: l - s }; }; sc.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); }; sc.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 }), f = s.position; (d.w === 0 || d.h === 0) && (d = { w: i.pstyle("width").pfValue, h: i.pstyle("height").pfValue }, d.x1 = f.x - d.w / 2, d.x2 = f.x + d.w / 2, d.y1 = f.y - d.h / 2, d.y2 = f.y + d.h / 2); function h(T, O, $) { var A = 0, N = 0, L = O + $; return T > 0 && L > 0 && (A = O / L * T, N = $ / L * T), { biasDiff: A, biasComplementDiff: N }; } function p(T, O, $, A) { if ($.units === "%") switch (A) { case "width": return T > 0 ? $.pfValue * T : 0; case "height": return O > 0 ? $.pfValue * O : 0; case "average": return T > 0 && O > 0 ? $.pfValue * (T + O) / 2 : 0; case "min": return T > 0 && O > 0 ? T > O ? $.pfValue * O : $.pfValue * T : 0; case "max": return T > 0 && O > 0 ? T > O ? $.pfValue * T : $.pfValue * O : 0; default: return 0; } else return $.units === "px" ? $.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 y = c.height.bottom.value; c.height.bottom.units === "px" && c.height.val > 0 && (y = y * 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, y), S = C.biasDiff, _ = C.biasComplementDiff; s.autoPadding = p(d.w, d.h, i.pstyle("padding"), i.pstyle("padding-relative-to").value), s.autoWidth = Math.max(d.w, c.width.val), f.x = (-w + d.x1 + d.x2 + k) / 2, s.autoHeight = Math.max(d.h, c.height.val), f.y = (-S + d.y1 + d.y2 + _) / 2; } for (var r = 0; r < this.length; r++) { var a = this[r], o = a._private; (!o.compoundBoundsClean || e) && (n(a), t.batching() || (o.compoundBoundsClean = !0)); } return this; }; var Uo = function(e) { return e === 1 / 0 || e === -1 / 0 ? 0 : e; }, Fi = function(e, t, n, r, a) { r - t === 0 || a - n === 0 || t == null || n == null || r == null || a == 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 = a > e.y2 ? a : e.y2, e.w = e.x2 - e.x1, e.h = e.y2 - e.y1); }, Pc = function(e, t) { return t == null ? e : Fi(e, t.x1, t.y1, t.x2, t.y2); }, tv = function(e, t, n) { return Ii(e, t, n); }, Km = function(e, t, n) { if (!t.cy().headless()) { var r = t._private, a = r.rstyle, o = a.arrowWidth / 2, i = t.pstyle(n + "-arrow-shape").value, s, l; if (i !== "none") { n === "source" ? (s = a.srcX, l = a.srcY) : n === "target" ? (s = a.tgtX, l = a.tgtY) : (s = a.midX, l = a.midY); var u = r.arrowBounds = r.arrowBounds || {}, c = u[n] = u[n] || {}; c.x1 = s - o, c.y1 = l - o, c.x2 = s + o, c.y2 = l + o, c.w = c.x2 - c.x1, c.h = c.y2 - c.y1, Y1(c, 1), Fi(e, c.x1, c.y1, c.x2, c.y2); } } }, ek = function(e, t, n) { if (!t.cy().headless()) { var r; n ? r = n + "-" : r = ""; var a = t._private, o = a.rstyle, i = t.pstyle(r + "label").strValue; if (i) { var s = t.pstyle("text-halign"), l = t.pstyle("text-valign"), u = tv(o, "labelWidth", n), c = tv(o, "labelHeight", n), d = tv(o, "labelX", n), f = tv(o, "labelY", n), h = t.pstyle(r + "text-margin-x").pfValue, p = t.pstyle(r + "text-margin-y").pfValue, v = t.isEdge(), m = t.pstyle(r + "text-rotation"), g = t.pstyle("text-outline-width").pfValue, y = t.pstyle("text-border-width").pfValue, x = y / 2, w = t.pstyle("text-background-padding").pfValue, k = 2, C = c, S = u, _ = S / 2, T = C / 2, O, $, A, N; if (v) O = d - _, $ = d + _, A = f - T, N = f + T; else { switch (s.value) { case "left": O = d - S, $ = d; break; case "center": O = d - _, $ = d + _; break; case "right": O = d, $ = d + S; break; } switch (l.value) { case "top": A = f - C, N = f; break; case "center": A = f - T, N = f + T; break; case "bottom": A = f, N = f + C; break; } } O += h - Math.max(g, x) - w - k, $ += h + Math.max(g, x) + w + k, A += p - Math.max(g, x) - w - k, N += p + Math.max(g, x) + w + k; var L = n || "main", R = a.labelBounds, P = R[L] = R[L] || {}; P.x1 = O, P.y1 = A, P.x2 = $, P.y2 = N, P.w = $ - O, P.h = N - A; var B = v && m.strValue === "autorotate", M = m.pfValue != null && m.pfValue !== 0; if (B || M) { var z = B ? tv(a.rstyle, "labelAngle", n) : m.pfValue, Z = Math.cos(z), G = Math.sin(z), J = (O + $) / 2, se = (A + N) / 2; if (!v) { switch (s.value) { case "left": J = $; break; case "right": J = O; break; } switch (l.value) { case "top": se = N; break; case "bottom": se = A; break; } } var ve = function(we, Oe) { return we = we - J, Oe = Oe - se, { x: we * Z - Oe * G + J, y: we * G + Oe * Z + se }; }, ge = ve(O, A), oe = ve(O, N), ee = ve($, A), q = ve($, N); O = Math.min(ge.x, oe.x, ee.x, q.x), $ = Math.max(ge.x, oe.x, ee.x, q.x), A = Math.min(ge.y, oe.y, ee.y, q.y), N = Math.max(ge.y, oe.y, ee.y, q.y); } var Y = L + "Rot", te = R[Y] = R[Y] || {}; te.x1 = O, te.y1 = A, te.x2 = $, te.y2 = N, te.w = $ - O, te.h = N - A, Fi(e, O, A, $, N), Fi(a.labelBounds.all, O, A, $, N); } return e; } }, M1e = 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 a = t.pstyle("outline-offset").value, o = t.pstyle("shape").value, i = r + a, s = (e.w + i * 2) / e.w, l = (e.h + i * 2) / e.h, u = 0, c = 0; ["diamond", "pentagon", "round-triangle"].includes(o) ? (s = (e.w + i * 2.4) / e.w, c = -i / 3.6) : ["concave-hexagon", "rhomboid", "right-rhomboid"].includes(o) ? s = (e.w + i * 2.4) / e.w : o === "star" ? (s = (e.w + i * 2.8) / e.w, l = (e.h + i * 2.6) / e.h, c = -i / 3.8) : o === "triangle" ? (s = (e.w + i * 2.8) / e.w, l = (e.h + i * 2.4) / e.h, c = -i / 1.4) : o === "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, f = e.w * s - e.w; if (Z1(e, [Math.ceil(d / 2), Math.ceil(f / 2)]), u != 0 || c !== 0) { var h = r0e(e, u, c); HM(e, h); } } } }, B1e = function(e, t) { var n = e._private.cy, r = n.styleEnabled(), a = n.headless(), o = wo(), i = e._private, s = e.isNode(), l = e.isEdge(), u, c, d, f, h, p, v = i.rstyle, m = s && r ? e.pstyle("bounds-expansion").pfValue : [0], g = function(xe) { return xe.pstyle("display").value !== "none"; }, y = !r || g(e) && (!l || g(e.source()) && g(e.target())); if (y) { 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 S = Math.max(w, C), _ = 0, T = 0; if (r && (_ = e.pstyle("width").pfValue, T = _ / 2), s && t.includeNodes) { var O = e.position(); h = O.x, p = O.y; var $ = e.outerWidth(), A = $ / 2, N = e.outerHeight(), L = N / 2; u = h - A, c = h + A, d = p - L, f = p + L, Fi(o, u, d, c, f), r && t.includeOutlines && M1e(o, e); } else if (l && t.includeEdges) if (r && !a) { var R = 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), f = Math.max(v.srcY, v.midY, v.tgtY), u -= T, c += T, d -= T, f += T, Fi(o, u, d, c, f), R === "haystack") { var P = v.haystackPts; if (P && P.length === 2) { if (u = P[0].x, d = P[0].y, c = P[1].x, f = P[1].y, u > c) { var B = u; u = c, c = B; } if (d > f) { var M = d; d = f, f = M; } Fi(o, u - T, d - T, c + T, f + T); } } else if (R === "bezier" || R === "unbundled-bezier" || R.endsWith("segments") || R.endsWith("taxi")) { var z; switch (R) { case "bezier": case "unbundled-bezier": z = v.bezierPts; break; case "segments": case "taxi": case "round-segments": case "round-taxi": z = v.linePts; break; } if (z != null) for (var Z = 0; Z < z.length; Z++) { var G = z[Z]; u = G.x - T, c = G.x + T, d = G.y - T, f = G.y + T, Fi(o, u, d, c, f); } } } else { var J = e.source(), se = J.position(), ve = e.target(), ge = ve.position(); if (u = se.x, c = ge.x, d = se.y, f = ge.y, u > c) { var oe = u; u = c, c = oe; } if (d > f) { var ee = d; d = f, f = ee; } u -= T, c += T, d -= T, f += T, Fi(o, u, d, c, f); } if (r && t.includeEdges && l && (Km(o, e, "mid-source"), Km(o, e, "mid-target"), Km(o, e, "source"), Km(o, e, "target")), r) { var q = e.pstyle("ghost").value === "yes"; if (q) { var Y = e.pstyle("ghost-offset-x").pfValue, te = e.pstyle("ghost-offset-y").pfValue; Fi(o, o.x1 + Y, o.y1 + te, o.x2 + Y, o.y2 + te); } } var we = i.bodyBounds = i.bodyBounds || {}; $6(we, o), Z1(we, m), Y1(we, 1), r && (u = o.x1, c = o.x2, d = o.y1, f = o.y2, Fi(o, u - S, d - S, c + S, f + S)); var Oe = i.overlayBounds = i.overlayBounds || {}; $6(Oe, o), Z1(Oe, m), Y1(Oe, 1); var Ne = i.labelBounds = i.labelBounds || {}; Ne.all != null ? n0e(Ne.all) : Ne.all = wo(), r && t.includeLabels && (t.includeMainLabels && ek(o, e, null), l && (t.includeSourceLabels && ek(o, e, "source"), t.includeTargetLabels && ek(o, e, "target"))); } return o.x1 = Uo(o.x1), o.y1 = Uo(o.y1), o.x2 = Uo(o.x2), o.y2 = Uo(o.y2), o.w = Uo(o.x2 - o.x1), o.h = Uo(o.y2 - o.y1), o.w > 0 && o.h > 0 && y && (Z1(o, m), Y1(o, 1)), o; }, gB = function(e) { var t = 0, n = function(a) { return (a ? 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; }, mB = function(e) { if (e.isEdge()) { var t = e.source().position(), n = e.target().position(), r = function(a) { return Math.round(a); }; return xve([r(t.x), r(t.y), r(n.x), r(n.y)]); } else return 0; }, Z6 = function(e, t) { var n = e._private, r, a = e.isEdge(), o = t == null ? Q6 : gB(t), i = o === Q6, s = mB(e), l = n.bbCachePosKey === s, u = t.useCache && l, c = function(h) { return h._private.bbCache == null || h._private.styleDirty; }, d = !u || c(e) || a && c(e.source()) || c(e.target()); if (d ? (l || e.recalculateRenderedStyle(u), r = B1e(e, F0), n.bbCache = r, n.bbCachePosKey = s) : r = n.bbCache, !i) { var f = e.isNode(); r = wo(), (t.includeNodes && f || t.includeEdges && !f) && (t.includeOverlays ? Pc(r, n.overlayBounds) : Pc(r, n.bodyBounds)), t.includeLabels && (t.includeMainLabels && (!a || t.includeSourceLabels && t.includeTargetLabels) ? Pc(r, n.labelBounds.all) : (t.includeMainLabels && Pc(r, n.labelBounds.mainRot), t.includeSourceLabels && Pc(r, n.labelBounds.sourceRot), t.includeTargetLabels && Pc(r, n.labelBounds.targetRot))), r.w = r.x2 - r.x1, r.h = r.y2 - r.y1; } return r; }, F0 = { includeNodes: !0, includeEdges: !0, includeLabels: !0, includeMainLabels: !0, includeSourceLabels: !0, includeTargetLabels: !0, includeOverlays: !0, includeUnderlays: !0, includeOutlines: !0, useCache: !0 }, Q6 = gB(F0), J6 = ga(F0); sc.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 = F0 : e = J6(e), t = Z6(this[0], e); else { t = wo(), e = e || F0; var n = J6(e), r = this, a = r.cy(), o = a.styleEnabled(); if (o) for (var i = 0; i < r.length; i++) { var s = r[i], l = s._private, u = mB(s), c = l.bbCachePosKey === u, d = n.useCache && c && !l.styleDirty; s.recalculateRenderedStyle(d); } this.updateCompoundBounds(!e.useCache); for (var f = 0; f < r.length; f++) { var h = r[f]; Pc(t, Z6(h, n)); } } return t.x1 = Uo(t.x1), t.y1 = Uo(t.y1), t.x2 = Uo(t.x2), t.y2 = Uo(t.y2), t.w = Uo(t.x2 - t.x1), t.h = Uo(t.y2 - t.y1), t; }; sc.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; }; sc.boundingBoxAt = function(e) { var t = this.nodes(), n = this.cy(), r = n.hasCompoundNodes(), a = n.collection(); if (r && (a = t.filter(function(u) { return u.isParent(); }), t = t.not(a)), Cn(e)) { var o = e; e = function() { return o; }; } 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 && (a.dirtyCompoundBoundsCache(), a.dirtyBoundingBoxCache(), a.updateCompoundBounds(!0)); var l = t0e(this.boundingBox({ useCache: !1 })); return t.silentPositions(s), r && (a.dirtyCompoundBoundsCache(), a.dirtyBoundingBoxCache(), a.updateCompoundBounds(!0)), n.endBatch(), l; }; af.boundingbox = af.bb = af.boundingBox; af.renderedBoundingbox = af.renderedBoundingBox; var D1e = sc, $v, Dg; $v = Dg = {}; var yB = function(e) { e.uppercaseName = C6(e.name), e.autoName = "auto" + e.uppercaseName, e.labelName = "label" + e.uppercaseName, e.outerName = "outer" + e.uppercaseName, e.uppercaseOuterName = C6(e.outerName), $v[e.name] = function() { var t = this[0], n = t._private, r = n.cy, a = r._private.styleEnabled; if (t) if (a) { if (t.isParent()) return t.updateCompoundBounds(), n[e.autoName] || 0; var o = t.pstyle(e.name); switch (o.strValue) { case "label": return t.recalculateRenderedStyle(), n.rstyle[e.labelName] || 0; default: return o.pfValue; } } else return 1; }, $v["outer" + e.uppercaseName] = function() { var t = this[0], n = t._private, r = n.cy, a = r._private.styleEnabled; if (t) if (a) { var o = t[e.name](), i = t.pstyle("border-width").pfValue, s = 2 * t.padding(); return o + i + s; } else return 1; }, $v["rendered" + e.uppercaseName] = function() { var t = this[0]; if (t) { var n = t[e.name](); return n * this.cy().zoom(); } }, $v["rendered" + e.uppercaseOuterName] = function() { var t = this[0]; if (t) { var n = t[e.outerName](); return n * this.cy().zoom(); } }; }; yB({ name: "width" }); yB({ name: "height" }); Dg.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; }; Dg.paddedHeight = function() { var e = this[0]; return e.height() + 2 * e.padding(); }; Dg.paddedWidth = function() { var e = this[0]; return e.width() + 2 * e.padding(); }; var R1e = Dg, z1e = function(e, t) { if (e.isEdge()) return t(e); }, V1e = function(e, t) { if (e.isEdge()) { var n = e.cy(); return R2(t(e), n.zoom(), n.pan()); } }, j1e = function(e, t) { if (e.isEdge()) { var n = e.cy(), r = n.pan(), a = n.zoom(); return t(e).map(function(o) { return R2(o, a, r); }); } }, H1e = function(e) { return e.renderer().getControlPoints(e); }, U1e = function(e) { return e.renderer().getSegmentPoints(e); }, q1e = function(e) { return e.renderer().getSourceEndpoint(e); }, W1e = function(e) { return e.renderer().getTargetEndpoint(e); }, K1e = function(e) { return e.renderer().getEdgeMidpoint(e); }, eO = { controlPoints: { get: H1e, mult: !0 }, segmentPoints: { get: U1e, mult: !0 }, sourceEndpoint: { get: q1e }, targetEndpoint: { get: W1e }, midpoint: { get: K1e } }, G1e = function(e) { return "rendered" + e[0].toUpperCase() + e.substr(1); }, X1e = Object.keys(eO).reduce(function(e, t) { var n = eO[t], r = G1e(t); return e[t] = function() { return z1e(this, n.get); }, n.mult ? e[r] = function() { return j1e(this, n.get); } : e[r] = function() { return V1e(this, n.get); }, e; }, {}), Y1e = Ft({}, N1e, D1e, R1e, X1e); /*! 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 bB = function(e, t) { this.recycle(e, t); }; function nv() { return !1; } function Gm() { return !0; } bB.prototype = { instanceString: function() { return "event"; }, recycle: function(e, t) { if (this.isImmediatePropagationStopped = this.isPropagationStopped = this.isDefaultPrevented = nv, e != null && e.preventDefault ? (this.type = e.type, this.isDefaultPrevented = e.defaultPrevented ? Gm : nv) : 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(), a = this.cy.pan(); this.renderedPosition = { x: n.x * r + a.x, y: n.y * r + a.y }; } this.timeStamp = e && e.timeStamp || Date.now(); }, preventDefault: function() { this.isDefaultPrevented = Gm; var e = this.originalEvent; e && e.preventDefault && e.preventDefault(); }, stopPropagation: function() { this.isPropagationStopped = Gm; var e = this.originalEvent; e && e.stopPropagation && e.stopPropagation(); }, stopImmediatePropagation: function() { this.isImmediatePropagationStopped = Gm, this.stopPropagation(); }, isDefaultPrevented: nv, isPropagationStopped: nv, isImmediatePropagationStopped: nv }; var wB = /^([^.]+)(\.(?:[^.]+))?$/, Z1e = ".*", xB = { 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 }, tO = Object.keys(xB), Q1e = {}; function q2() { for (var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Q1e, t = arguments.length > 1 ? arguments[1] : void 0, n = 0; n < tO.length; n++) { var r = tO[n]; this[r] = e[r] || xB[r]; } this.context = t || this.context, this.listeners = [], this.emitting = 0; } var Uu = q2.prototype, kB = function(e, t, n, r, a, o, i) { ir(r) && (a = r, r = null), i && (o == null ? o = i : o = Ft({}, o, i)); for (var s = zn(n) ? n : n.split(/\s+/), l = 0; l < s.length; l++) { var u = s[l]; if (!zu(u)) { var c = u.match(wB); if (c) { var d = c[1], f = c[2] ? c[2] : null, h = t(e, u, d, f, r, a, o); if (h === !1) break; } } } }, nO = function(e, t) { return e.addEventFields(e.context, t), new bB(t.type, t); }, J1e = function(e, t, n) { if (mhe(n)) { t(e, n); return; } else if (Cn(n)) { t(e, nO(e, n)); return; } for (var r = zn(n) ? n : n.split(/\s+/), a = 0; a < r.length; a++) { var o = r[a]; if (!zu(o)) { var i = o.match(wB); if (i) { var s = i[1], l = i[2] ? i[2] : null, u = nO(e, { type: s, namespace: l, target: e.context }); t(e, u); } } } }; Uu.on = Uu.addListener = function(e, t, n, r, a) { return kB(this, function(o, i, s, l, u, c, d) { ir(c) && o.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, a), this; }; Uu.one = function(e, t, n, r) { return this.on(e, t, n, r, { one: !0 }); }; Uu.removeListener = Uu.off = function(e, t, n, r) { var a = this; this.emitting !== 0 && (this.listeners = Ove(this.listeners)); for (var o = this.listeners, i = function(l) { var u = o[l]; kB(a, function(c, d, f, h, p, v) { if ((u.type === f || e === "*") && (!h && u.namespace !== ".*" || u.namespace === h) && (!p || c.qualifierCompare(u.qualifier, p)) && (!v || u.callback === v)) return o.splice(l, 1), !1; }, e, t, n, r); }, s = o.length - 1; s >= 0; s--) i(s); return this; }; Uu.removeAllListeners = function() { return this.removeListener("*"); }; Uu.emit = Uu.trigger = function(e, t, n) { var r = this.listeners, a = r.length; return this.emitting++, zn(t) || (t = [t]), J1e(this, function(o, i) { n != null && (r = [{ event: i.event, type: i.type, namespace: i.namespace, callback: n }], a = r.length); for (var s = function(u) { var c = r[u]; if (c.type === i.type && (!c.namespace || c.namespace === i.namespace || c.namespace === Z1e) && o.eventMatches(o.context, c, i)) { var d = [i]; t != null && Fve(d, t), o.beforeEmit(o.context, c, i), c.conf && c.conf.one && (o.listeners = o.listeners.filter(function(p) { return p !== c; })); var f = o.callbackContext(o.context, c, i), h = c.callback.apply(f, d); o.afterEmit(o.context, c, i), h === !1 && (i.stopPropagation(), i.preventDefault()); } }, l = 0; l < a; l++) s(l); o.bubble(o.context) && !i.isPropagationStopped() && o.parent(o.context).emit(i, t); }, e), this.emitting--, this; }; var eye = { 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 && Ng(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(); } }, Xm = function(e) { return xt(e) ? new ju(e) : e; }, CB = { createEmitter: function() { for (var e = 0; e < this.length; e++) { var t = this[e], n = t._private; n.emitter || (n.emitter = new q2(eye, t)); } return this; }, emitter: function() { return this._private.emitter; }, on: function(e, t, n) { for (var r = Xm(t), a = 0; a < this.length; a++) { var o = this[a]; o.emitter().on(e, r, n); } return this; }, removeListener: function(e, t, n) { for (var r = Xm(t), a = 0; a < this.length; a++) { var o = this[a]; o.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 = Xm(t), a = 0; a < this.length; a++) { var o = this[a]; o.emitter().one(e, r, n); } return this; }, once: function(e, t, n) { for (var r = Xm(t), a = 0; a < this.length; a++) { var o = this[a]; o.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; } }; On.eventAliasesOn(CB); var SB = { 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 (xt(e) || $o(e)) return new ju(e).filter(this); if (ir(e)) { for (var n = this.spawn(), r = this, a = 0; a < r.length; a++) { var o = r[a], i = t ? e.apply(t, [o, a, r]) : e(o, a, r); i && n.push(o); } return n; } return this.spawn(); }, not: function(e) { if (e) { xt(e) && (e = this.filter(e)); for (var t = this.spawn(), n = 0; n < this.length; n++) { var r = this[n], a = e.has(r); a || t.push(r); } return t; } else return this; }, absoluteComplement: function() { var e = this.cy(); return e.mutableElements().not(this); }, intersect: function(e) { if (xt(e)) { var t = e; return this.filter(t); } for (var n = this.spawn(), r = this, a = e, o = this.length < e.length, i = o ? r : a, s = o ? a : 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; xt(e) && (e = t.$(e)); var n = this.spawn(), r = this, a = e, o = 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 o(r, a), o(a, r), n; }, diff: function(e) { var t = this._private.cy; xt(e) && (e = t.$(e)); var n = this.spawn(), r = this.spawn(), a = this.spawn(), o = this, i = e, s = function(l, u, c) { for (var d = 0; d < l.length; d++) { var f = l[d], h = f._private.data.id, p = u.hasElementWithId(h); p ? a.merge(f) : c.push(f); } }; return s(o, i, n), s(i, o, r), { left: n, right: r, both: a }; }, add: function(e) { var t = this._private.cy; if (!e) return this; if (xt(e)) { var n = e; e = t.mutableElements().filter(n); } for (var r = this.spawnSelf(), a = 0; a < e.length; a++) { var o = e[a], i = !this.has(o); i && r.push(o); } return r; }, // in place merge on calling collection merge: function(e) { var t = this._private, n = t.cy; if (!e) return this; if (e && xt(e)) { var r = e; e = n.mutableElements().filter(r); } for (var a = t.map, o = 0; o < e.length; o++) { var i = e[o], s = i._private.data.id, l = !a.has(s); if (l) { var u = this.length++; this[u] = i, a.set(s, { ele: i, index: u }); } } return this; }, unmergeAt: function(e) { var t = this[e], n = t.id(), r = this._private, a = r.map; this[e] = void 0, a.delete(n); var o = e === this.length - 1; if (this.length > 1 && !o) { var i = this.length - 1, s = this[i], l = s._private.data.id; this[i] = void 0, this[e] = s, a.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, a = r.get(n); if (!a) return this; var o = a.index; return this.unmergeAt(o), this; }, // remove eles in place on calling collection unmerge: function(e) { var t = this._private.cy; if (!e) return this; if (e && xt(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, a = 0; a < r.length; a++) { var o = r[a], i = t ? e.apply(t, [o, a, r]) : e(o, a, r); n.push(i); } return n; }, reduce: function(e, t) { for (var n = t, r = this, a = 0; a < r.length; a++) n = e(n, r[a], a, r); return n; }, max: function(e, t) { for (var n = -1 / 0, r, a = this, o = 0; o < a.length; o++) { var i = a[o], s = t ? e.apply(t, [i, o, a]) : e(i, o, a); s > n && (n = s, r = i); } return { value: n, ele: r }; }, min: function(e, t) { for (var n = 1 / 0, r, a = this, o = 0; o < a.length; o++) { var i = a[o], s = t ? e.apply(t, [i, o, a]) : e(i, o, a); s < n && (n = s, r = i); } return { value: n, ele: r }; } }, xn = SB; xn.u = xn["|"] = xn["+"] = xn.union = xn.or = xn.add; xn["\\"] = xn["!"] = xn["-"] = xn.difference = xn.relativeComplement = xn.subtract = xn.not; xn.n = xn["&"] = xn["."] = xn.and = xn.intersection = xn.intersect; xn["^"] = xn["(+)"] = xn["(-)"] = xn.symmetricDifference = xn.symdiff = xn.xor; xn.fnFilter = xn.filterFn = xn.stdFilter = xn.filter; xn.complement = xn.abscomp = xn.absoluteComplement; var tye = { 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; } }, EB = function(e, t) { var n = e.cy(), r = n.hasCompoundNodes(); function a(u) { var c = u.pstyle("z-compound-depth"); return c.value === "auto" ? r ? u.zDepth() : 0 : c.value === "bottom" ? -1 : c.value === "top" ? P4 : 0; } var o = a(e) - a(t); if (o !== 0) return o; 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(); }, Jy = { forEach: function(e, t) { if (ir(e)) for (var n = this.length, r = 0; r < n; r++) { var a = this[r], o = t ? e.apply(t, [a, r, this]) : e(a, r, this); if (o === !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 a = e; a >= 0 && a < t && a < r; a++) n.push(this[a]); 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 (!ir(e)) return this; var t = this.toArray().sort(e); return this.spawn(t); }, sortByZIndex: function() { return this.sort(EB); }, 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 : P4 - 1; } else { var a = t.source, o = t.target, i = a.zDepth(), s = o.zDepth(); return Math.max(i, s, 0); } } } }; Jy.each = Jy.forEach; var nye = function() { var e = "undefined", t = (typeof Symbol > "u" ? "undefined" : Dr(Symbol)) != e && Dr(Symbol.iterator) != e; t && (Jy[Symbol.iterator] = function() { var n = this, r = { value: void 0, done: !1 }, a = 0, o = this.length; return kM({ next: function() { return a < o ? r.value = n[a++] : (r.value = void 0, r.done = !0), r; } }, Symbol.iterator, function() { return this; }); }); }; nye(); var rye = ga({ nodeDimensionsIncludeLabels: !1 }), J1 = { // Calculates and returns node dimensions { x, y } based on options given layoutDimensions: function(e) { e = rye(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(); }), a = this.cy(), o = t.eles, i = function(w) { return w.id(); }, s = k0(n, i); e.emit({ type: "layoutstart", layout: e }), e.animations = []; var l = function(w, k, C) { var S = { 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 - S.x) * w, y: (C.y - S.y) * w }; return { x: S.x + _.x, y: S.y + _.y }; }, u = t.spacingFactor && t.spacingFactor !== 1, c = function() { if (!u) return null; for (var w = wo(), k = 0; k < r.length; k++) { var C = r[k], S = s(C, k); a0e(w, S.x, S.y); } return w; }, d = c(), f = k0(function(w, k) { var C = s(w, k); if (u) { var S = Math.abs(t.spacingFactor); C = l(S, 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 p = r[h], v = f(p, h), m = t.animateFilter == null || t.animateFilter(p, h); if (m) { var g = p.animation({ position: v, duration: t.animationDuration, easing: t.animationEasing }); e.animations.push(g); } else p.position(v); } if (t.fit) { var y = a.animation({ fit: { boundingBox: o.boundingBoxAt(f), padding: t.padding }, duration: t.animationDuration, easing: t.animationEasing }); e.animations.push(y); } else if (t.zoom !== void 0 && t.pan !== void 0) { var x = a.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 }), fh.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(f), t.fit && a.fit(t.eles, t.padding), t.zoom != null && a.zoom(t.zoom), t.pan && a.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(Ft({}, e, { eles: this })); } }; J1.createLayout = J1.makeLayout = J1.layout; function _B(e, t, n) { var r = n._private, a = r.styleCache = r.styleCache || [], o; return (o = a[e]) != null || (o = a[e] = t(n)), o; } function W2(e, t) { return e = yd(e), function(n) { return _B(e, t, n); }; } function K2(e, t) { e = yd(e); var n = function(r) { return t.call(r); }; return function() { var r = this[0]; if (r) return _B(e, n, r); }; } var ua = { 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(), a = this; e = !!(e || e === void 0), r && (a = this.spawnSelf().merge(this.descendants()).merge(this.parents())); var o = a; return e ? o.emitAndNotify("style") : o.emit("style"), a.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 a = n._private.style[e]; return a ?? (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, a = n.style(); if (Cn(e)) { var o = e; a.applyBypass(this, o, r), this.emitAndNotify("style"); } else if (xt(e)) if (t === void 0) { var i = this[0]; return i ? a.getStylePropertyValue(i, e) : void 0; } else a.applyBypass(this, e, t, r), this.emitAndNotify("style"); else if (e === void 0) { var s = this[0]; return s ? a.getRawStyle(s) : void 0; } return this; }, removeStyle: function(e) { var t = this.cy(); if (!t.styleEnabled()) return this; var n = !1, r = t.style(), a = this; if (e === void 0) for (var o = 0; o < a.length; o++) { var i = a[o]; r.removeAllBypasses(i, n); } else { e = e.split(/\s+/); for (var s = 0; s < a.length; s++) { var l = a[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, a = n.pstyle("opacity").value; if (!t) return a; var o = r.data.parent ? n.parents() : null; if (o) for (var i = 0; i < o.length; i++) { var s = o[i], l = s.pstyle("opacity").value; a = l * a; } return a; } }, 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 tk(e, t) { var n = e._private, r = n.data.parent ? e.parents() : null; if (r) for (var a = 0; a < r.length; a++) { var o = r[a]; if (!t(o)) return !1; } return !0; } function q4(e) { var t = e.ok, n = e.edgeOkViaNode || e.ok, r = e.parentOk || e.ok; return function() { var a = this.cy(); if (!a.styleEnabled()) return !0; var o = this[0], i = a.hasCompoundNodes(); if (o) { var s = o._private; if (!t(o)) return !1; if (o.isNode()) return !i || tk(o, r); var l = s.source, u = s.target; return n(l) && (!i || tk(l, n)) && (l === u || n(u) && (!i || tk(u, n))); } }; } var mh = W2("eleTakesUpSpace", function(e) { return e.pstyle("display").value === "element" && e.width() !== 0 && (e.isNode() ? e.height() !== 0 : !0); }); ua.takesUpSpace = K2("takesUpSpace", q4({ ok: mh })); var aye = W2("eleInteractive", function(e) { return e.pstyle("events").value === "yes" && e.pstyle("visibility").value === "visible" && mh(e); }), oye = W2("parentInteractive", function(e) { return e.pstyle("visibility").value === "visible" && mh(e); }); ua.interactive = K2("interactive", q4({ ok: aye, parentOk: oye, edgeOkViaNode: mh })); ua.noninteractive = function() { var e = this[0]; if (e) return !e.interactive(); }; var iye = W2("eleVisible", function(e) { return e.pstyle("visibility").value === "visible" && e.pstyle("opacity").pfValue !== 0 && mh(e); }), sye = mh; ua.visible = K2("visible", q4({ ok: iye, edgeOkViaNode: sye })); ua.hidden = function() { var e = this[0]; if (e) return !e.visible(); }; ua.isBundledBezier = K2("isBundledBezier", function() { return this.cy().styleEnabled() ? !this.removed() && this.pstyle("curve-style").value === "bezier" && this.takesUpSpace() : !1; }); ua.bypass = ua.css = ua.style; ua.renderedCss = ua.renderedStyle; ua.removeBypass = ua.removeCss = ua.removeStyle; ua.pstyle = ua.parsedStyle; var Pu = {}; function rO(e) { return function() { var t = arguments, n = []; if (t.length === 2) { var r = t[0], a = t[1]; this.on(e.event, r, a); } else if (t.length === 1 && ir(t[0])) { var o = t[0]; this.on(e.event, o); } else if (t.length === 0 || t.length === 1 && zn(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 f = this.spawn(n); f.updateStyle(), f.emit(e.event), i && f.emit(i); } return this; }; } function yh(e) { Pu[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]; } }, Pu[e.on] = rO({ event: e.on, field: e.field, ableField: e.ableField, overrideAble: e.overrideAble, value: !0 }), Pu[e.off] = rO({ event: e.off, field: e.field, ableField: e.ableField, overrideAble: e.overrideAble, value: !1 }); } yh({ field: "locked", overrideField: function(e) { return e.cy().autolock() ? !0 : void 0; }, on: "lock", off: "unlock" }); yh({ field: "grabbable", overrideField: function(e) { return e.cy().autoungrabify() || e.pannable() ? !1 : void 0; }, on: "grabify", off: "ungrabify" }); yh({ field: "selected", ableField: "selectable", overrideAble: function(e) { return e.cy().autounselectify() ? !1 : void 0; }, on: "select", off: "unselect" }); yh({ field: "selectable", overrideField: function(e) { return e.cy().autounselectify() ? !1 : void 0; }, on: "selectify", off: "unselectify" }); Pu.deselect = Pu.unselect; Pu.grabbed = function() { var e = this[0]; if (e) return e._private.grabbed; }; yh({ field: "active", on: "activate", off: "unactivate" }); yh({ field: "pannable", on: "panify", off: "unpanify" }); Pu.inactive = function() { var e = this[0]; if (e) return !e._private.active; }; var $a = {}, aO = function(e) { return function(t) { for (var n = this, r = [], a = 0; a < n.length; a++) { var o = n[a]; if (o.isNode()) { for (var i = !1, s = o.connectedEdges(), l = 0; l < s.length; l++) { var u = s[l], c = u.source(), d = u.target(); if (e.noIncomingEdges && d === o && c !== o || e.noOutgoingEdges && c === o && d !== o) { i = !0; break; } } i || r.push(o); } } return this.spawn(r, !0).filter(t); }; }, oO = function(e) { return function(t) { for (var n = this, r = [], a = 0; a < n.length; a++) { var o = n[a]; if (o.isNode()) for (var i = o.connectedEdges(), s = 0; s < i.length; s++) { var l = i[s], u = l.source(), c = l.target(); e.outgoing && u === o ? (r.push(l), r.push(c)) : e.incoming && c === o && (r.push(l), r.push(u)); } } return this.spawn(r, !0).filter(t); }; }, iO = function(e) { return function(t) { for (var n = this, r = [], a = {}; ; ) { var o = e.outgoing ? n.outgoers() : n.incomers(); if (o.length === 0) break; for (var i = !1, s = 0; s < o.length; s++) { var l = o[s], u = l.id(); a[u] || (a[u] = !0, r.push(l), i = !0); } if (!i) break; n = o; } return this.spawn(r, !0).filter(t); }; }; $a.clearTraversalCache = function() { for (var e = 0; e < this.length; e++) this[e]._private.traversalCache = null; }; Ft($a, { // get the root nodes in the DAG roots: aO({ noIncomingEdges: !0 }), // get the leaf nodes in the DAG leaves: aO({ noOutgoingEdges: !0 }), // normally called children in graph theory // these nodes =edges=> outgoing nodes outgoers: Xo(oO({ outgoing: !0 }), "outgoers"), // aka DAG descendants successors: iO({ outgoing: !0 }), // normally called parents in graph theory // these nodes <=edges= incoming nodes incomers: Xo(oO({ incoming: !0 }), "incomers"), // aka DAG ancestors predecessors: iO({ incoming: !0 }) }); Ft($a, { neighborhood: Xo(function(e) { for (var t = [], n = this.nodes(), r = 0; r < n.length; r++) for (var a = n[r], o = a.connectedEdges(), i = 0; i < o.length; i++) { var s = o[i], l = s.source(), u = s.target(), c = a === 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); } }); $a.neighbourhood = $a.neighborhood; $a.closedNeighbourhood = $a.closedNeighborhood; $a.openNeighbourhood = $a.openNeighborhood; Ft($a, { source: Xo(function(e) { var t = this[0], n; return t && (n = t._private.source || t.cy().collection()), n && e ? n.filter(e) : n; }, "source"), target: Xo(function(e) { var t = this[0], n; return t && (n = t._private.target || t.cy().collection()), n && e ? n.filter(e) : n; }, "target"), sources: sO({ attr: "source" }), targets: sO({ attr: "target" }) }); function sO(e) { return function(t) { for (var n = [], r = 0; r < this.length; r++) { var a = this[r], o = a._private[e.attr]; o && n.push(o); } return this.spawn(n, !0).filter(t); }; } Ft($a, { edgesWith: Xo(lO(), "edgesWith"), edgesTo: Xo(lO({ thisIsSrc: !0 }), "edgesTo") }); function lO(e) { return function(t) { var n = [], r = this._private.cy, a = e || {}; xt(t) && (t = r.$(t)); for (var o = 0; o < t.length; o++) for (var i = t[o]._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), f = c || d; f && ((a.thisIsSrc || a.thisIsTgt) && (a.thisIsSrc && !c || a.thisIsTgt && !d) || n.push(l)); } return this.spawn(n, !0); }; } Ft($a, { connectedEdges: Xo(function(e) { for (var t = [], n = this, r = 0; r < n.length; r++) { var a = n[r]; if (a.isNode()) for (var o = a._private.edges, i = 0; i < o.length; i++) { var s = o[i]; t.push(s); } } return this.spawn(t, !0).filter(e); }, "connectedEdges"), connectedNodes: Xo(function(e) { for (var t = [], n = this, r = 0; r < n.length; r++) { var a = n[r]; a.isEdge() && (t.push(a.source()[0]), t.push(a.target()[0])); } return this.spawn(t, !0).filter(e); }, "connectedNodes"), parallelEdges: Xo(uO(), "parallelEdges"), codirectedEdges: Xo(uO({ codirected: !0 }), "codirectedEdges") }); function uO(e) { var t = { codirected: !1 }; return e = Ft({}, t, e), function(n) { for (var r = [], a = this.edges(), o = e, i = 0; i < a.length; i++) for (var s = a[i], l = s._private, u = l.source, c = u._private.data.id, d = l.data.target, f = u._private.edges, h = 0; h < f.length; h++) { var p = f[h], v = p._private.data, m = v.target, g = v.source, y = m === d && g === c, x = c === m && d === g; (o.codirected && y || !o.codirected && (y || x)) && r.push(p); } return this.spawn(r, !0).filter(n); }; } Ft($a, { components: function(e) { var t = this, n = t.cy(), r = n.collection(), a = e == null ? t.nodes() : e.nodes(), o = []; e != null && a.empty() && (a = e.sources()); var i = function(l, u) { r.merge(l), a.unmerge(l), u.merge(l); }; if (a.empty()) return t.spawn(); var s = function() { var l = n.collection(); o.push(l); var u = a[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 (a.length > 0); return o; }, component: function() { var e = this[0]; return e.cy().mutableElements().components(e)[0]; } }); $a.componentsOf = $a.components; var ca = 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) { dr("A collection must have a reference to the core"); return; } var a = new ds(), o = !1; if (!t) t = []; else if (t.length > 0 && Cn(t[0]) && !Ng(t[0])) { o = !0; for (var i = [], s = new ph(), 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 = RM(); else if (e.hasElementWithId(d.id) || s.has(d.id)) continue; var f = new D2(e, c, !1); i.push(f), s.add(d.id); } t = i; } this.length = 0; for (var h = 0, p = t.length; h < p; h++) { var v = t[h][0]; if (v != null) { var m = v._private.data.id; (!n || !a.has(m)) && (n && a.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 ds(), y = this.eles, x = 0; x < y.length; x++) { var w = y[x]; g.set(w.id(), { index: x, ele: w }); } } }, n && (this._private.map = a), o && !r && this.restore(); }, Kn = D2.prototype = ca.prototype = Object.create(Array.prototype); Kn.instanceString = function() { return "collection"; }; Kn.spawn = function(e, t) { return new ca(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 _M(this) ? this : new ca(this._private.cy, [this]); }; Kn.unique = function() { return new ca(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 ca(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 (Cn(e)) { if (n.startBatch(), e.data) { t.data(e.data); var a = r.data; if (t.isEdge()) { var o = !1, i = {}, s = e.data.source, l = e.data.target; s != null && s != a.source && (i.source = "" + s, o = !0), l != null && l != a.target && (i.target = "" + l, o = !0), o && (t = t.move(i)); } else { var u = "parent" in e.data, c = e.data.parent; u && (c != null || a.parent != null) && c != a.parent && (c === void 0 && (c = null), c != null && (c = "" + c), t = t.move({ parent: c })); } } e.position && t.position(e.position); var d = function(p, v, m) { var g = e[p]; g != null && g !== r[p] && (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 f = { data: cs(r.data), position: cs(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 }; f.classes = ""; var h = 0; return r.classes.forEach(function(p) { return f.classes += h++ === 0 ? p : " " + p; }), f; } } }; 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], a = r.json(), o = new D2(e, a, !1); t.push(o); } return new ca(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(), a = r._private, o = [], i = [], s, l = 0, u = n.length; l < u; l++) { var c = n[l]; t && !c.removed() || (c.isNode() ? o.push(c) : i.push(c)); } s = o.concat(i); var d, f = function() { s.splice(d, 1), d--; }; for (d = 0; d < s.length; d++) { var h = s[d], p = h._private, v = p.data; if (h.clearTraversalCache(), !(!t && !p.removed)) { if (v.id === void 0) v.id = RM(); else if (ot(v.id)) v.id = "" + v.id; else if (zu(v.id) || !xt(v.id)) { dr("Can not create element with invalid string ID `" + v.id + "`"), f(); continue; } else if (r.hasElementWithId(v.id)) { dr("Can not create second element with ID `" + v.id + "`"), f(); continue; } } var m = v.id; if (h.isNode()) { var g = p.position; g.x == null && (g.x = 0), g.y == null && (g.y = 0); } if (h.isEdge()) { for (var y = h, x = ["source", "target"], w = x.length, k = !1, C = 0; C < w; C++) { var S = x[C], _ = v[S]; ot(_) && (_ = v[S] = "" + v[S]), _ == null || _ === "" ? (dr("Can not create edge `" + m + "` with unspecified " + S), k = !0) : r.hasElementWithId(_) || (dr("Can not create edge `" + m + "` with nonexistant " + S + " `" + _ + "`"), k = !0); } if (k) { f(); continue; } var T = r.getElementById(v.source), O = r.getElementById(v.target); T.same(O) ? T._private.edges.push(y) : (T._private.edges.push(y), O._private.edges.push(y)), y._private.source = T, y._private.target = O; } p.map = new ds(), p.map.set(m, { ele: h, index: 0 }), p.removed = !1, t && r.addToPool(h); } for (var $ = 0; $ < o.length; $++) { var A = o[$], N = A._private.data; ot(N.parent) && (N.parent = "" + N.parent); var L = N.parent, R = L != null; if (R || A._private.parent) { var P = A._private.parent ? r.collection().merge(A._private.parent) : r.getElementById(L); if (P.empty()) N.parent = void 0; else if (P[0].removed()) Fn("Node added with missing parent, reference to parent removed"), N.parent = void 0, A._private.parent = null; else { for (var B = !1, M = P; !M.empty(); ) { if (A.same(M)) { B = !0, N.parent = void 0; break; } M = M.parent(); } B || (P[0]._private.children.push(A), A._private.parent = P[0], a.hasCompoundNodes = !0); } } } if (s.length > 0) { for (var z = s.length === n.length ? n : new ca(r, s), Z = 0; Z < z.length; Z++) { var G = z[Z]; G.isNode() || (G.parallelEdges().clearTraversalCache(), G.source().clearTraversalCache(), G.target().clearTraversalCache()); } var J; a.hasCompoundNodes ? J = r.collection().merge(z).merge(z.connectedNodes()).merge(z.parent()) : J = z, J.dirtyCompoundBoundsCache().dirtyBoundingBoxCache().updateStyle(e), e ? z.emitAndNotify("add") : t && z.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 = [], a = {}, o = n._private.cy; function i(L) { for (var R = L._private.edges, P = 0; P < R.length; P++) l(R[P]); } function s(L) { for (var R = L._private.children, P = 0; P < R.length; P++) l(R[P]); } function l(L) { var R = a[L.id()]; t && L.removed() || R || (a[L.id()] = !0, L.isNode() ? (r.push(L), i(L), s(L)) : r.unshift(L)); } for (var u = 0, c = n.length; u < c; u++) { var d = n[u]; l(d); } function f(L, R) { var P = L._private.edges; Vu(P, R), L.clearTraversalCache(); } function h(L) { L.clearTraversalCache(); } var p = []; p.ids = {}; function v(L, R) { R = R[0], L = L[0]; var P = L._private.children, B = L.id(); Vu(P, R), R._private.parent = null, p.ids[B] || (p.ids[B] = !0, p.push(L)); } n.dirtyCompoundBoundsCache(), t && o.removeFromPool(r); for (var m = 0; m < r.length; m++) { var g = r[m]; if (g.isEdge()) { var y = g.source()[0], x = g.target()[0]; f(y, g), f(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 S = g.parent(); S.length !== 0 && v(S, g); } t && (g._private.removed = !0); } var _ = o._private.elements; o._private.hasCompoundNodes = !1; for (var T = 0; T < _.length; T++) { var O = _[T]; if (O.isParent()) { o._private.hasCompoundNodes = !0; break; } } var $ = new ca(this.cy(), r); $.size() > 0 && (e ? $.emitAndNotify("remove") : t && $.emit("remove")); for (var A = 0; A < p.length; A++) { var N = p[A]; (!t || !N.removed()) && N.updateStyle(); } return $; }; Kn.move = function(e) { var t = this._private.cy, n = this, r = !1, a = !1, o = function(h) { return h == null ? h : "" + h; }; if (e.source !== void 0 || e.target !== void 0) { var i = o(e.source), s = o(e.target), l = i != null && t.hasElementWithId(i), u = s != null && t.hasElementWithId(s); (l || u) && (t.batch(function() { n.remove(r, a), n.emitAndNotify("moveout"); for (var h = 0; h < n.length; h++) { var p = n[h], v = p._private.data; p.isEdge() && (l && (v.source = i), u && (v.target = s)); } n.restore(r, a); }), n.emitAndNotify("move")); } else if (e.parent !== void 0) { var c = o(e.parent), d = c === null || t.hasElementWithId(c); if (d) { var f = c === null ? void 0 : c; t.batch(function() { var h = n.remove(r, a); h.emitAndNotify("moveout"); for (var p = 0; p < n.length; p++) { var v = n[p], m = v._private.data; v.isNode() && (m.parent = f); } h.restore(r, a); }), n.emitAndNotify("move"); } } return this; }; [QM, y1e, Q1, Iu, Af, L1e, U2, Y1e, CB, SB, tye, Jy, J1, ua, Pu, $a].forEach(function(e) { Ft(Kn, e); }); var lye = { add: function(e) { var t, n = this; if ($o(e)) { var r = e; if (r._private.cy === n) t = r.restore(); else { for (var a = [], o = 0; o < r.length; o++) { var i = r[o]; a.push(i.json()); } t = new ca(n, a); } } else if (zn(e)) { var s = e; t = new ca(n, s); } else if (Cn(e) && (zn(e.nodes) || zn(e.edges))) { for (var l = e, u = [], c = ["nodes", "edges"], d = 0, f = c.length; d < f; d++) { var h = c[d], p = l[h]; if (zn(p)) for (var v = 0, m = p.length; v < m; v++) { var g = Ft({ group: h }, p[v]); u.push(g); } } t = new ca(n, u); } else { var y = e; t = new D2(n, y).collection(); } return t; }, remove: function(e) { if (!$o(e) && xt(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 uye(e, t, n, r) { var a = 4, o = 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 f = c ? new Float32Array(l) : new Array(l); function h(O, $) { return 1 - 3 * $ + 3 * O; } function p(O, $) { return 3 * $ - 6 * O; } function v(O) { return 3 * O; } function m(O, $, A) { return ((h($, A) * O + p($, A)) * O + v($)) * O; } function g(O, $, A) { return 3 * h($, A) * O * O + 2 * p($, A) * O + v($); } function y(O, $) { for (var A = 0; A < a; ++A) { var N = g($, e, n); if (N === 0) return $; var L = m($, e, n) - O; $ -= L / N; } return $; } function x() { for (var O = 0; O < l; ++O) f[O] = m(O * u, e, n); } function w(O, $, A) { var N, L, R = 0; do L = $ + (A - $) / 2, N = m(L, e, n) - O, N > 0 ? A = L : $ = L; while (Math.abs(N) > i && ++R < s); return L; } function k(O) { for (var $ = 0, A = 1, N = l - 1; A !== N && f[A] <= O; ++A) $ += u; --A; var L = (O - f[A]) / (f[A + 1] - f[A]), R = $ + L * u, P = g(R, e, n); return P >= o ? y(O, R) : P === 0 ? R : w(O, $, $ + u); } var C = !1; function S() { C = !0, (e !== t || n !== r) && x(); } var _ = function(O) { return C || S(), e === t && n === r ? O : O === 0 ? 0 : O === 1 ? 1 : m(k(O), t, r); }; _.getControlPoints = function() { return [{ x: e, y: t }, { x: n, y: r }]; }; var T = "generateBezier(" + [e, t, n, r] + ")"; return _.toString = function() { return T; }, _; } /*! Runge-Kutta spring physics function generator. Adapted from Framer.js, copyright Koen Bok. MIT License: http://en.wikipedia.org/wiki/MIT_License */ var cye = /* @__PURE__ */ function() { function e(r) { return -r.tension * r.x - r.friction * r.v; } function t(r, a, o) { var i = { x: r.x + o.dx * a, v: r.v + o.dv * a, tension: r.tension, friction: r.friction }; return { dx: i.v, dv: e(i) }; } function n(r, a) { var o = { dx: r.v, dv: e(r) }, i = t(r, a * 0.5, o), s = t(r, a * 0.5, i), l = t(r, a, s), u = 1 / 6 * (o.dx + 2 * (i.dx + s.dx) + l.dx), c = 1 / 6 * (o.dv + 2 * (i.dv + s.dv) + l.dv); return r.x = r.x + u * a, r.v = r.v + c * a, r; } return function r(a, o, i) { var s = { x: -1, v: 0, tension: null, friction: null }, l = [0], u = 0, c = 1 / 1e4, d = 16 / 1e3, f, h, p; for (a = parseFloat(a) || 500, o = parseFloat(o) || 20, i = i || null, s.tension = a, s.friction = o, f = i !== null, f ? (u = r(a, o), h = u / i * d) : h = d; p = n(p || s, h), l.push(1 + p.x), u += 16, Math.abs(p.x) > c && Math.abs(p.v) > c; ) ; return f ? function(v) { return l[v * (l.length - 1) | 0]; } : u; }; }(), Un = function(e, t, n, r) { var a = uye(e, t, n, r); return function(o, i, s) { return o + (i - o) * a(s); }; }, ey = { linear: function(e, t, n) { return e + (t - e) * n; }, // default easings ease: Un(0.25, 0.1, 0.25, 1), "ease-in": Un(0.42, 0, 1, 1), "ease-out": Un(0, 0, 0.58, 1), "ease-in-out": Un(0.42, 0, 0.58, 1), // sine "ease-in-sine": Un(0.47, 0, 0.745, 0.715), "ease-out-sine": Un(0.39, 0.575, 0.565, 1), "ease-in-out-sine": Un(0.445, 0.05, 0.55, 0.95), // quad "ease-in-quad": Un(0.55, 0.085, 0.68, 0.53), "ease-out-quad": Un(0.25, 0.46, 0.45, 0.94), "ease-in-out-quad": Un(0.455, 0.03, 0.515, 0.955), // cubic "ease-in-cubic": Un(0.55, 0.055, 0.675, 0.19), "ease-out-cubic": Un(0.215, 0.61, 0.355, 1), "ease-in-out-cubic": Un(0.645, 0.045, 0.355, 1), // quart "ease-in-quart": Un(0.895, 0.03, 0.685, 0.22), "ease-out-quart": Un(0.165, 0.84, 0.44, 1), "ease-in-out-quart": Un(0.77, 0, 0.175, 1), // quint "ease-in-quint": Un(0.755, 0.05, 0.855, 0.06), "ease-out-quint": Un(0.23, 1, 0.32, 1), "ease-in-out-quint": Un(0.86, 0, 0.07, 1), // expo "ease-in-expo": Un(0.95, 0.05, 0.795, 0.035), "ease-out-expo": Un(0.19, 1, 0.22, 1), "ease-in-out-expo": Un(1, 0, 0, 1), // circ "ease-in-circ": Un(0.6, 0.04, 0.98, 0.335), "ease-out-circ": Un(0.075, 0.82, 0.165, 1), "ease-in-out-circ": Un(0.785, 0.135, 0.15, 0.86), // user param easings... spring: function(e, t, n) { if (n === 0) return ey.linear; var r = cye(e, t, n); return function(a, o, i) { return a + (o - a) * r(i); }; }, "cubic-bezier": Un }; function cO(e, t, n, r, a) { if (r === 1 || t === n) return n; var o = a(t, n, r); return e == null || ((e.roundValue || e.color) && (o = Math.round(o)), e.min !== void 0 && (o = Math.max(o, e.min)), e.max !== void 0 && (o = Math.min(o, e.max))), o; } function dO(e, t) { return e.pfValue != null || e.value != null ? e.pfValue != null && (t == null || t.type.units !== "%") ? e.pfValue : e.value : e; } function Cp(e, t, n, r, a) { var o = a != null ? a.type : null; n < 0 ? n = 0 : n > 1 && (n = 1); var i = dO(e, a), s = dO(t, a); if (ot(i) && ot(s)) return cO(o, i, s, n, r); if (zn(i) && zn(s)) { for (var l = [], u = 0; u < s.length; u++) { var c = i[u], d = s[u]; if (c != null && d != null) { var f = cO(o, c, d, n, r); l.push(f); } else l.push(d); } return l; } } function dye(e, t, n, r) { var a = !r, o = 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 = ey.linear; else { var d; if (xt(s)) { var f = c.parse("transition-timing-function", s); d = f.value; } else d = s; var h, p; xt(d) ? (h = d, p = []) : (h = d[1], p = d.slice(2).map(function(z) { return +z; })), p.length > 0 ? (h === "spring" && p.push(i.duration), i.easingImpl = ey[h].apply(null, p)) : i.easingImpl = ey[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, y = i.position; if (y && a && !e.locked()) { var x = {}; rv(g.x, y.x) && (x.x = Cp(g.x, y.x, m, v)), rv(g.y, y.y) && (x.y = Cp(g.y, y.y, m, v)), e.position(x); } var w = i.startPan, k = i.pan, C = o.pan, S = k != null && r; S && (rv(w.x, k.x) && (C.x = Cp(w.x, k.x, m, v)), rv(w.y, k.y) && (C.y = Cp(w.y, k.y, m, v)), e.emit("pan")); var _ = i.startZoom, T = i.zoom, O = T != null && r; O && (rv(_, T) && (o.zoom = _0(o.minZoom, Cp(_, T, m, v), o.maxZoom)), e.emit("zoom")), (S || O) && e.emit("viewport"); var $ = i.style; if ($ && $.length > 0 && a) { for (var A = 0; A < $.length; A++) { var N = $[A], L = N.name, R = N, P = i.startStyle[L], B = c.properties[P.name], M = Cp(P, R, m, v, B); c.overrideBypass(e, L, M); } e.emit("style"); } } return i.progress = m, m; } function rv(e, t) { return e == null || t == null ? !1 : ot(e) && ot(t) ? !0 : !!(e && t); } function pye(e, t, n, r) { var a = t._private; a.started = !0, a.startTime = n - a.progress * a.duration; } function pO(e, t) { var n = t._private.aniEles, r = []; function a(c, d) { var f = c._private, h = f.animation.current, p = f.animation.queue, v = !1; if (h.length === 0) { var m = p.shift(); m && h.push(m); } for (var g = function(k) { for (var C = k.length - 1; C >= 0; C--) { var S = k[C]; S(); } k.splice(0, k.length); }, y = h.length - 1; y >= 0; y--) { var x = h[y], w = x._private; if (w.stopped) { h.splice(y, 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 || pye(c, x, e), dye(c, x, e, d), w.applying && (w.applying = !1), g(w.frames), w.step != null && w.step(e), x.completed() && (h.splice(y, 1), w.hooked = !1, w.playing = !1, w.started = !1, g(w.completes)), v = !0); } return !d && h.length === 0 && p.length === 0 && r.push(c), v; } for (var o = !1, i = 0; i < n.length; i++) { var s = n[i], l = a(s); o = o || l; } var u = a(t, !0); (o || u) && (n.length > 0 ? t.notify("draw", n) : t.notify("draw")), n.unmerge(r), t.emit("step"); } var fye = { // pull in animation functions animate: On.animate(), animation: On.animation(), animated: On.animated(), clearQueue: On.clearQueue(), delay: On.delay(), delayAnimation: On.delayAnimation(), stop: On.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 && Gy(function(r) { pO(r, e), t(); }); } var n = e.renderer(); n && n.beforeRender ? n.beforeRender(function(r, a) { pO(a, e); }, n.beforeRenderPriorities.animations) : t(); } }, hye = { 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 && Ng(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; } }, Ym = function(e) { return xt(e) ? new ju(e) : e; }, TB = { createEmitter: function() { var e = this._private; return e.emitter || (e.emitter = new q2(hye, this)), this; }, emitter: function() { return this._private.emitter; }, on: function(e, t, n) { return this.emitter().on(e, Ym(t), n), this; }, removeListener: function(e, t, n) { return this.emitter().removeListener(e, Ym(t), n), this; }, removeAllListeners: function() { return this.emitter().removeAllListeners(), this; }, one: function(e, t, n) { return this.emitter().one(e, Ym(t), n), this; }, once: function(e, t, n) { return this.emitter().one(e, Ym(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; } }; On.eventAliasesOn(TB); 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 ty = { layout: function(e) { var t = this; if (e == null) { dr("Layout options must be specified to make a layout"); return; } if (e.name == null) { dr("A `name` must be specified to make a layout"); return; } var n = e.name, r = t.extension("layout", n); if (r == null) { dr("No such layout `" + n + "` found. Did you forget to import it and `cytoscape.use()` it?"); return; } var a; xt(e.eles) ? a = t.$(e.eles) : a = e.eles != null ? e.eles : t.$(); var o = new r(Ft({}, e, { cy: t, eles: a })); return o; } }; ty.createLayout = ty.makeLayout = ty.layout; var vye = { 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 a = this.renderer(); this.destroyed() || !a || a.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 a = n[r], o = e[a], i = t.getElementById(a); i.data(o); } }); } }, gye = ga({ hideEdgesOnViewport: !1, textureOnViewport: !1, motionBlur: !1, motionBlurOpacity: 0.05, pixelRatio: void 0, desktopTapThreshold: 4, touchTapThreshold: 8, wheelSensitivity: 1, debug: !1, showFps: !1 }), XC = { renderTo: function(e, t, n, r) { var a = this._private.renderer; return a.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) { dr("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 && Fn("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 = gye(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); } }; XC.invalidateDimensions = XC.resize; var ny = { // 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 xt(e) ? this.$(e) : $o(e) ? e.collection() : zn(e) ? (t || (t = {}), new ca(this, e, t.unique, t.removed)) : new ca(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; } }; ny.elements = ny.filter = ny.$; var Pa = {}, qv = "t", mye = "f"; Pa.apply = function(e) { for (var t = this, n = t._private, r = n.cy, a = r.collection(), o = 0; o < e.length; o++) { var i = e[o], 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 && a.push(i); } } return a; }; Pa.getPropertiesDiff = function(e, t) { var n = this, r = n._private.propDiffs = n._private.propDiffs || {}, a = e + "-" + t, o = r[a]; if (o) return o; for (var i = [], s = {}, l = 0; l < n.length; l++) { var u = n[l], c = e[l] === qv, d = t[l] === qv, f = c !== d, h = u.mappedProperties.length > 0; if (f || d && h) { var p = void 0; f && h || f ? p = u.properties : h && (p = u.mappedProperties); for (var v = 0; v < p.length; v++) { for (var m = p[v], g = m.name, y = !1, x = l + 1; x < n.length; x++) { var w = n[x], k = t[x] === qv; if (k && (y = w.properties[m.name] != null, y)) break; } !s[g] && !y && (s[g] = !0, i.push(g)); } } } return r[a] = i, i; }; Pa.getContextMeta = function(e) { for (var t = this, n = "", r, a = e._private.styleCxtKey || "", o = 0; o < t.length; o++) { var i = t[o], s = i.selector && i.selector.matches(e); s ? n += qv : n += mye; } return r = t.getPropertiesDiff(a, n), e._private.styleCxtKey = n, { key: n, diffPropNames: r, empty: r.length === 0 }; }; Pa.getContextStyle = function(e) { var t = e.key, n = this, r = this._private.contextStyles = this._private.contextStyles || {}; if (r[t]) return r[t]; for (var a = { _private: { key: t } }, o = 0; o < n.length; o++) { var i = n[o], s = t[o] === qv; if (s) for (var l = 0; l < i.properties.length; l++) { var u = i.properties[l]; a[u.name] = u; } } return r[t] = a, a; }; Pa.applyContextStyle = function(e, t, n) { for (var r = this, a = e.diffPropNames, o = {}, i = r.types, s = 0; s < a.length; s++) { var l = a[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, f = d.fnValue = u.value(n); if (f === d.prevFnValue) continue; } var h = o[l] = { prev: c }; r.applyParsedProperty(n, u), h.next = n.pstyle(l), h.next && h.next.bypass && (h.next = h.next.bypassed); } } return { diffProps: o }; }; Pa.updateStyleHints = function(e) { var t = e._private, n = this, r = n.propertyGroupNames, a = n.propertyGroupKeys, o = function(te, we, Oe) { return n.getPropertiesHash(te, we, Oe); }, 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 < a.length; u++) { var c = a[u]; t.styleKeys[c] = [Kp, Tv]; } for (var d = function(te, we) { return t.styleKeys[we][0] = C0(te, t.styleKeys[we][0]); }, f = function(te, we) { return t.styleKeys[we][1] = S0(te, t.styleKeys[we][1]); }, h = function(te, we) { d(te, we), f(te, we); }, p = function(te, we) { for (var Oe = 0; Oe < te.length; Oe++) { var Ne = te.charCodeAt(Oe); d(Ne, we), f(Ne, we); } }, v = 2e9, m = function(te) { return -128 < te && te < 128 && Math.floor(te) !== te ? v - (te * 1024 | 0) : te; }, g = 0; g < r.length; g++) { var y = r[g], x = l[y]; if (x != null) { var w = this.properties[y], k = w.type, C = w.groupKey, S = void 0; w.hashOverride != null ? S = w.hashOverride(e, x) : x.pfValue != null && (S = x.pfValue); var _ = w.enums == null ? x.value : null, T = S != null, O = _ != null, $ = T || O, A = x.units; if (k.number && $ && !k.multiple) { var N = T ? S : _; h(m(N), C), !T && A != null && p(A, C); } else p(x.strValue, C); } } for (var L = [Kp, Tv], R = 0; R < a.length; R++) { var P = a[R], B = t.styleKeys[P]; L[0] = C0(B[0], L[0]), L[1] = S0(B[1], L[1]); } t.styleKey = wve(L[0], L[1]); var M = t.styleKeys; t.labelDimsKey = Wl(M.labelDimensions); var z = o(e, ["label"], M.labelDimensions); if (t.labelKey = Wl(z), t.labelStyleKey = Wl(Vm(M.commonLabel, z)), !s) { var Z = o(e, ["source-label"], M.labelDimensions); t.sourceLabelKey = Wl(Z), t.sourceLabelStyleKey = Wl(Vm(M.commonLabel, Z)); var G = o(e, ["target-label"], M.labelDimensions); t.targetLabelKey = Wl(G), t.targetLabelStyleKey = Wl(Vm(M.commonLabel, G)); } if (s) { var J = t.styleKeys, se = J.nodeBody, ve = J.nodeBorder, ge = J.nodeOutline, oe = J.backgroundImage, ee = J.compound, q = J.pie, Y = [se, ve, ge, oe, ee, q].filter(function(te) { return te != null; }).reduce(Vm, [Kp, Tv]); t.nodeKey = Wl(Y), t.hasPie = q != null && q[0] !== Kp && q[1] !== Tv; } return i !== t.styleKey; }; Pa.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; }; Pa.applyParsedProperty = function(e, t) { var n = this, r = t, a = e._private.style, o, i = n.types, s = n.properties[r.name].type, l = r.bypass, u = a[r.name], c = u && u.bypass, d = e._private, f = "mapping", h = function(J) { return J == null ? null : J.pfValue != null ? J.pfValue : J.value; }, p = function() { var J = h(u), se = h(r); n.checkTriggers(e, r.name, J, se); }; 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 a[r.name] = void 0, p(), !0; if (r.deleteBypassed) return u ? u.bypass ? (u.bypassed = void 0, p(), !0) : !1 : (p(), !0); if (r.deleteBypass) return u ? u.bypass ? (a[r.name] = u.bypassed, p(), !0) : !1 : (p(), !0); var v = function() { Fn("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, y = 0; y < m.length && g; y++) { var x = m[y]; g = g[x]; } if (g == null) return v(), !1; var w; if (ot(g)) { var k = r.fieldMax - r.fieldMin; k === 0 ? w = 0 : w = (g - r.fieldMin) / k; } else return Fn("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], S = r.valueMax[0], _ = r.valueMin[1], T = r.valueMax[1], O = r.valueMin[2], $ = r.valueMax[2], A = r.valueMin[3] == null ? 1 : r.valueMin[3], N = r.valueMax[3] == null ? 1 : r.valueMax[3], L = [Math.round(C + (S - C) * w), Math.round(_ + (T - _) * w), Math.round(O + ($ - O) * w), Math.round(A + (N - A) * w)]; o = { // 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: L, strValue: "rgb(" + L[0] + ", " + L[1] + ", " + L[2] + ")" }; } else if (s.number) { var R = r.valueMin + (r.valueMax - r.valueMin) * w; o = this.parse(r.name, R, r.bypass, f); } else return !1; if (!o) return v(), !1; o.mapping = r, r = o; break; } case i.data: { for (var P = r.field.split("."), B = d.data, M = 0; M < P.length && B; M++) { var z = P[M]; B = B[z]; } if (B != null && (o = this.parse(r.name, B, r.bypass, f)), !o) return v(), !1; o.mapping = r, r = o; break; } case i.fn: { var Z = r.value, G = r.fnValue != null ? r.fnValue : Z(e); if (r.prevFnValue = G, G == null) return Fn("Custom function mappers may not return null (i.e. `" + r.name + "` for ele `" + e.id() + "` is null)"), !1; if (o = this.parse(r.name, G, r.bypass, f), !o) return Fn("Custom function mappers may not return invalid values for the property type (i.e. `" + r.name + "` for ele `" + e.id() + "` is invalid)"), !1; o.mapping = cs(r), r = o; break; } case void 0: break; default: return !1; } return l ? (c ? r.bypassed = u.bypassed : r.bypassed = u, a[r.name] = r) : c ? u.bypassed = r : a[r.name] = r, p(), !0; }; Pa.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 a = r._private.style, o = Object.keys(a), i = 0; i < o.length; i++) { var s = o[i], l = a[s]; l != null && (l.bypass ? l.bypassed = null : a[s] = null); } } }; Pa.update = function() { var e = this._private.cy, t = e.mutableElements(); t.updateStyle(); }; Pa.updateTransitions = function(e, t) { var n = this, r = e._private, a = e.pstyle("transition-property").value, o = e.pstyle("transition-duration").pfValue, i = e.pstyle("transition-delay").pfValue; if (a.length > 0 && o > 0) { for (var s = {}, l = !1, u = 0; u < a.length; u++) { var c = a[u], d = e.pstyle(c), f = t[c]; if (f) { var h = f.prev, p = h, v = f.next != null ? f.next : d, m = !1, g = void 0, y = 1e-6; p && (ot(p.pfValue) && ot(v.pfValue) ? (m = v.pfValue - p.pfValue, g = p.pfValue + y * m) : ot(p.value) && ot(v.value) ? (m = v.value - p.value, g = p.value + y * m) : zn(p.value) && zn(v.value) && (m = p.value[0] !== v.value[0] || p.value[1] !== v.value[1] || p.value[2] !== v.value[2], g = p.strValue), m && (s[c] = v.strValue, this.applyBypass(e, c, g), l = !0)); } } if (!l) return; r.transitioning = !0, new fh(function(x) { i > 0 ? e.delayAnimation(i).play().promise().then(x) : x(); }).then(function() { return e.animation({ style: s, duration: o, easing: e.pstyle("transition-timing-function").value, queue: !1 }).play().promise(); }).then(function() { n.removeBypasses(e, a), e.emitAndNotify("style"), r.transitioning = !1; }); } else r.transitioning && (this.removeBypasses(e, a), e.emitAndNotify("style"), r.transitioning = !1); }; Pa.checkTrigger = function(e, t, n, r, a, o) { var i = this.properties[t], s = a(i); s != null && s(n, r) && o(i); }; Pa.checkZOrderTrigger = function(e, t, n, r) { var a = this; this.checkTrigger(e, t, n, r, function(o) { return o.triggersZOrder; }, function() { a._private.cy.notify("zorder", e); }); }; Pa.checkBoundsTrigger = function(e, t, n, r) { this.checkTrigger(e, t, n, r, function(a) { return a.triggersBounds; }, function(a) { e.dirtyCompoundBoundsCache(), e.dirtyBoundingBoxCache(), // only for beziers -- so performance of other edges isn't affected a.triggersBoundsOfParallelBeziers && t === "curve-style" && (n === "bezier" || r === "bezier") && e.parallelEdges().forEach(function(o) { o.isBundledBezier() && o.dirtyBoundingBoxCache(); }), a.triggersBoundsOfConnectedEdges && t === "display" && (n === "none" || r === "none") && e.connectedEdges().forEach(function(o) { o.dirtyBoundingBoxCache(); }); }); }; Pa.checkTriggers = function(e, t, n, r) { e.dirtyStyleCache(), this.checkZOrderTrigger(e, t, n, r), this.checkBoundsTrigger(e, t, n, r); }; var Rg = {}; Rg.applyBypass = function(e, t, n, r) { var a = this, o = [], i = !0; if (t === "*" || t === "**") { if (n !== void 0) for (var s = 0; s < a.properties.length; s++) { var l = a.properties[s], u = l.name, c = this.parse(u, n, !0); c && o.push(c); } } else if (xt(t)) { var d = this.parse(t, n, !0); d && o.push(d); } else if (Cn(t)) { var f = t; r = n; for (var h = Object.keys(f), p = 0; p < h.length; p++) { var v = h[p], m = f[v]; if (m === void 0 && (m = f[N2(v)]), m !== void 0) { var g = this.parse(v, m, !0); g && o.push(g); } } } else return !1; if (o.length === 0) return !1; for (var y = !1, x = 0; x < e.length; x++) { for (var w = e[x], k = {}, C = void 0, S = 0; S < o.length; S++) { var _ = o[S]; if (r) { var T = w.pstyle(_.name); C = k[_.name] = { prev: T }; } y = this.applyParsedProperty(w, cs(_)) || y, r && (C.next = w.pstyle(_.name)); } y && this.updateStyleHints(w), r && this.updateTransitions(w, k, i); } return y; }; Rg.overrideBypass = function(e, t, n) { t = I4(t); for (var r = 0; r < e.length; r++) { var a = e[r], o = a._private.style[t], i = this.properties[t].type, s = i.color, l = i.mutiple, u = o ? o.pfValue != null ? o.pfValue : o.value : null; !o || !o.bypass ? this.applyBypass(a, t, n) : (o.value = n, o.pfValue != null && (o.pfValue = n), s ? o.strValue = "rgb(" + n.join(",") + ")" : l ? o.strValue = n.join(" ") : o.strValue = "" + n, this.updateStyleHints(a)), this.checkTriggers(a, t, u, n); } }; Rg.removeAllBypasses = function(e, t) { return this.removeBypasses(e, this.propertyNames, t); }; Rg.removeBypasses = function(e, t, n) { for (var r = !0, a = 0; a < e.length; a++) { for (var o = e[a], i = {}, s = 0; s < t.length; s++) { var l = t[s], u = this.properties[l], c = o.pstyle(u.name); if (!(!c || !c.bypass)) { var d = "", f = this.parse(l, d, !0), h = i[u.name] = { prev: c }; this.applyParsedProperty(o, f), h.next = o.pstyle(u.name); } } this.updateStyleHints(o), n && this.updateTransitions(o, i, r); } }; var W4 = {}; W4.getEmSizeInPixels = function() { var e = this.containerCss("font-size"); return e != null ? parseFloat(e) : 1; }; W4.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 Es = {}; Es.getRenderedStyle = function(e, t) { return t ? this.getStylePropertyValue(e, t, !0) : this.getRawStyle(e, !0); }; Es.getRawStyle = function(e, t) { var n = this; if (e = e[0], e) { for (var r = {}, a = 0; a < n.properties.length; a++) { var o = n.properties[a], i = n.getStylePropertyValue(e, o.name, t); i != null && (r[o.name] = i, r[N2(o.name)] = i); } return r; } }; Es.getIndexedStyle = function(e, t, n, r) { var a = e.pstyle(t)[n][r]; return a ?? e.cy().style().getDefaultProperty(t)[n][0]; }; Es.getStylePropertyValue = function(e, t, n) { var r = this; if (e = e[0], e) { var a = r.properties[t]; a.alias && (a = a.pointsTo); var o = a.type, i = e.pstyle(a.name); if (i) { var s = i.value, l = i.units, u = i.strValue; if (n && o.number && s != null && ot(s)) { var c = e.cy().zoom(), d = function(v) { return v * c; }, f = function(v, m) { return d(v) + m; }, h = zn(s), p = h ? l.every(function(v) { return v != null; }) : l != null; return p ? h ? s.map(function(v, m) { return f(v, l[m]); }).join(" ") : f(s, l) : h ? s.map(function(v) { return xt(v) ? v : "" + d(v); }).join(" ") : "" + d(s); } else if (u != null) return u; } return null; } }; Es.getAnimationStartStyle = function(e, t) { for (var n = {}, r = 0; r < t.length; r++) { var a = t[r], o = a.name, i = e.pstyle(o); i !== void 0 && (Cn(i) ? i = this.parse(o, i.strValue) : i = this.parse(o, i)), i && (n[o] = i); } return n; }; Es.getPropsList = function(e) { var t = this, n = [], r = e, a = t.properties; if (r) for (var o = Object.keys(r), i = 0; i < o.length; i++) { var s = o[i], l = r[s], u = a[s] || a[I4(s)], c = this.parse(u.name, l); c && n.push(c); } return n; }; Es.getNonDefaultPropertiesHash = function(e, t, n) { var r = n.slice(), a, o, i, s, l, u; for (l = 0; l < t.length; l++) if (a = t[l], o = e.pstyle(a, !1), o != null) if (o.pfValue != null) r[0] = C0(s, r[0]), r[1] = S0(s, r[1]); else for (i = o.strValue, u = 0; u < i.length; u++) s = i.charCodeAt(u), r[0] = C0(s, r[0]), r[1] = S0(s, r[1]); return r; }; Es.getPropertiesHash = Es.getNonDefaultPropertiesHash; var G2 = {}; G2.appendFromJson = function(e) { for (var t = this, n = 0; n < e.length; n++) { var r = e[n], a = r.selector, o = r.style || r.css, i = Object.keys(o); t.selector(a); for (var s = 0; s < i.length; s++) { var l = i[s], u = o[l]; t.css(l, u); } } return t; }; G2.fromJson = function(e) { var t = this; return t.resetToDefault(), t.appendFromJson(e), t; }; G2.json = function() { for (var e = [], t = this.defaultLength; t < this.length; t++) { for (var n = this[t], r = n.selector, a = n.properties, o = {}, i = 0; i < a.length; i++) { var s = a[i]; o[s.name] = s.strValue; } e.push({ selector: r ? r.toString() : "core", style: o }); } return e; }; var K4 = {}; K4.appendFromString = function(e) { var t = this, n = this, r = "" + e, a, o, i; r = r.replace(/[/][*](\s|.)+?[*][/]/g, ""); function s() { r.length > a.length ? r = r.substr(a.length) : r = ""; } function l() { o.length > i.length ? o = o.substr(i.length) : o = ""; } for (; ; ) { var u = r.match(/^\s*$/); if (u) break; var c = r.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/); if (!c) { Fn("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: " + r); break; } a = c[0]; var d = c[1]; if (d !== "core") { var f = new ju(d); if (f.invalid) { Fn("Skipping parsing of block: Invalid selector found in string stylesheet: " + d), s(); continue; } } var h = c[2], p = !1; o = h; for (var v = []; ; ) { var m = o.match(/^\s*$/); if (m) break; var g = o.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/); if (!g) { Fn("Skipping parsing of block: Invalid formatting of style property and value definitions found in:" + h), p = !0; break; } i = g[0]; var y = g[1], x = g[2], w = t.properties[y]; if (!w) { Fn("Skipping property: Invalid property name in: " + i), l(); continue; } var k = n.parse(y, x); if (!k) { Fn("Skipping property: Invalid property definition in: " + i), l(); continue; } v.push({ name: y, val: x }), l(); } if (p) { s(); break; } n.selector(d); for (var C = 0; C < v.length; C++) { var S = v[C]; n.css(S.name, S.val); } s(); } return n; }; K4.fromString = function(e) { var t = this; return t.resetToDefault(), t.appendFromString(e), t; }; var Zr = {}; (function() { var e = Pr, t = Che, n = Ehe, r = _he, a = The, o = function(q) { return "^" + q + "\\s*\\(\\s*([\\w\\.]+)\\s*\\)$"; }, i = function(q) { var Y = e + "|\\w+|" + t + "|" + n + "|" + r + "|" + a; return "^" + q + "\\s*\\(([\\w\\.]+)\\s*\\,\\s*(" + e + ")\\s*\\,\\s*(" + e + ")\\s*,\\s*(" + Y + ")\\s*\\,\\s*(" + Y + ")\\)$"; }, s = [`^url\\s*\\(\\s*['"]?(.+?)['"]?\\s*\\)$`, "^(none)$", "^(.+)$"]; Zr.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: o("data") }, layoutData: { mapping: !0, regex: o("layoutData") }, scratch: { mapping: !0, regex: o("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(q, Y) { switch (q.length) { case 2: return Y[0] !== "deg" && Y[0] !== "rad" && Y[1] !== "deg" && Y[1] !== "rad"; case 1: return xt(q[0]) || Y[0] === "deg" || Y[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(q) { var Y = q.length; return Y === 1 || Y === 2 || Y === 4; } } }; var l = { zeroNonZero: function(q, Y) { return (q == null || Y == null) && q !== Y || q == 0 && Y != 0 ? !0 : q != 0 && Y == 0; }, any: function(q, Y) { return q != Y; }, emptyNonEmpty: function(q, Y) { var te = zu(q), we = zu(Y); return te && !we || !te && we; } }, u = Zr.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 }], f = [{ 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 }], p = [{ 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 }], y = [{ 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(q, Y) { return Y.value === "label" ? -q.poolIndex() : Y.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 }], S = [{ 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 }], T = [{ 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 }], O = [{ 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 }], $ = [{ 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 }], A = [{ 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 }], N = []; Zr.pieBackgroundN = 16, N.push({ name: "pie-size", type: u.sizeMaybePercent }); for (var L = 1; L <= Zr.pieBackgroundN; L++) N.push({ name: "pie-" + L + "-background-color", type: u.color }), N.push({ name: "pie-" + L + "-background-size", type: u.percent }), N.push({ name: "pie-" + L + "-background-opacity", type: u.zeroOneNumber }); var R = [], P = Zr.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(q) { P.forEach(function(Y) { var te = Y + "-" + q.name, we = q.type, Oe = q.triggersBounds; R.push({ name: te, type: we, triggersBounds: Oe }); }); }, {}); var B = Zr.properties = [].concat(v, x, m, g, y, $, p, h, c, d, f, k, C, S, _, N, T, O, R, A), M = Zr.propertyGroups = { // common to all eles behavior: v, transition: x, visibility: m, overlay: g, underlay: y, ghost: $, // labels commonLabel: p, labelDimensions: h, mainLabel: c, sourceLabel: d, targetLabel: f, // node props nodeBody: k, nodeBorder: C, nodeOutline: S, backgroundImage: _, pie: N, compound: T, // edge props edgeLine: O, edgeArrow: R, core: A }, z = Zr.propertyGroupNames = {}, Z = Zr.propertyGroupKeys = Object.keys(M); Z.forEach(function(q) { z[q] = M[q].map(function(Y) { return Y.name; }), M[q].forEach(function(Y) { return Y.groupKey = q; }); }); var G = Zr.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" }]; Zr.propertyNames = B.map(function(q) { return q.name; }); for (var J = 0; J < B.length; J++) { var se = B[J]; B[se.name] = se; } for (var ve = 0; ve < G.length; ve++) { var ge = G[ve], oe = B[ge.pointsTo], ee = { name: ge.name, alias: !0, pointsTo: oe }; B.push(ee), B[ge.name] = ee; } })(); Zr.getDefaultProperty = function(e) { return this.getDefaultProperties()[e]; }; Zr.getDefaultProperties = function() { var e = this._private; if (e.defaultProperties != null) return e.defaultProperties; for (var t = Ft({ // 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 <= Zr.pieBackgroundN; c++) { var d = u.name.replace("{{i}}", c), f = u.value; l[d] = f; } 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 Zr.arrowPrefixes.forEach(function(c) { var d = c + "-" + u.name, f = u.value; l[d] = f; }), l; }, {})), n = {}, r = 0; r < this.properties.length; r++) { var a = this.properties[r]; if (!a.pointsTo) { var o = a.name, i = t[o], s = this.parse(o, i); n[o] = s; } } return e.defaultProperties = n, e.defaultProperties; }; Zr.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 X2 = {}; X2.parse = function(e, t, n, r) { var a = this; if (ir(t)) return a.parseImplWarn(e, t, n, r); var o = r === "mapping" || r === !0 || r === !1 || r == null ? "dontcare" : r, i = n ? "t" : "f", s = "" + t, l = BM(e, s, i, o), u = a.propCache = a.propCache || [], c; return (c = u[l]) || (c = u[l] = a.parseImplWarn(e, t, n, r)), (n || r === "mapping") && (c = cs(c), c && (c.value = cs(c.value))), c; }; X2.parseImplWarn = function(e, t, n, r) { var a = this.parseImpl(e, t, n, r); return !a && t != null && Fn("The style property `".concat(e, ": ").concat(t, "` is invalid")), a && (a.name === "width" || a.name === "height") && t === "label" && Fn("The style value of `label` is deprecated for `" + a.name + "`"), a; }; X2.parseImpl = function(e, t, n, r) { var a = this; e = I4(e); var o = a.properties[e], i = t, s = a.types; if (!o || t === void 0) return null; o.alias && (o = o.pointsTo, e = o.name); var l = xt(t); l && (t = t.trim()); var u = o.type; if (!u) return null; if (n && (t === "" || t === null)) return { name: e, value: t, bypass: !0, deleteBypass: !0 }; if (ir(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 f = s.data; return { name: e, value: c, strValue: "" + t, mapped: f, 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 p = this.parse(e, d[4]); if (!p || p.mapped) return !1; var v = this.parse(e, d[5]); if (!v || v.mapped) return !1; if (p.pfValue === v.pfValue || p.strValue === v.strValue) return Fn("`" + e + ": " + t + "` is not a valid mapper because the output range is zero; converting to `" + e + ": " + p.strValue + "`"), this.parse(e, p.strValue); if (u.color) { var m = p.value, g = v.value, y = 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 (y) 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: p.value, valueMax: v.value, bypass: n }; } } if (u.multiple && r !== "multiple") { var x; if (l ? x = t.split(/\s+/) : zn(t) ? x = t : x = [t], u.evenMultiple && x.length % 2 !== 0) return null; for (var w = [], k = [], C = [], S = "", _ = !1, T = 0; T < x.length; T++) { var O = a.parse(e, x[T], n, "multiple"); _ = _ || xt(O.value), w.push(O.value), C.push(O.pfValue != null ? O.pfValue : O.value), k.push(O.units), S += (T > 0 ? " " : "") + O.strValue; } return u.validate && !u.validate(w, k) ? null : u.singleEnum && _ ? w.length === 1 && xt(w[0]) ? { name: e, value: w[0], strValue: w[0], bypass: n } : null : { name: e, value: w, pfValue: C, strValue: S, bypass: n, units: k }; } var $ = function() { for (var q = 0; q < u.enums.length; q++) { var Y = u.enums[q]; if (Y === t) return { name: e, value: t, strValue: "" + t, bypass: n }; } return null; }; if (u.number) { var A, N = "px"; if (u.units && (A = u.units), u.implicitUnits && (N = u.implicitUnits), !u.unitless) if (l) { var L = "px|em" + (u.allowPercent ? "|\\%" : ""); A && (L = A); var R = t.match("^(" + Pr + ")(" + L + ")?$"); R && (t = R[1], A = R[2] || N); } else (!A || u.implicitUnits) && (A = N); if (t = parseFloat(t), isNaN(t) && u.enums === void 0) return null; if (isNaN(t) && u.enums !== void 0) return t = i, $(); if (u.integer && !ghe(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 + (A || ""), units: A, bypass: n }; return u.unitless || A !== "px" && A !== "em" ? P.pfValue = t : P.pfValue = A === "px" || !A ? t : this.getEmSizeInPixels() * t, (A === "ms" || A === "s") && (P.pfValue = A === "ms" ? t : 1e3 * t), (A === "deg" || A === "rad") && (P.pfValue = A === "rad" ? t : Qve(t)), A === "%" && (P.pfValue = t / 100), P; } else if (u.propList) { var B = [], M = "" + t; if (M !== "none") { for (var z = M.split(/\s*,\s*|\s+/), Z = 0; Z < z.length; Z++) { var G = z[Z].trim(); a.properties[G] ? B.push(G) : Fn("`" + G + "` is not a valid property name"); } if (B.length === 0) return null; } return { name: e, value: B, strValue: B.length === 0 ? "none" : B.join(" "), bypass: n }; } else if (u.color) { var J = Phe(t); return J ? { name: e, value: J, pfValue: J, strValue: "rgb(" + J[0] + "," + J[1] + "," + J[2] + ")", // n.b. no spaces b/c of multiple support bypass: n } : null; } else if (u.regex || u.regexes) { if (u.enums) { var se = $(); if (se) return se; } for (var ve = u.regexes ? u.regexes : [u.regex], ge = 0; ge < ve.length; ge++) { var oe = new RegExp(ve[ge]), ee = oe.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 ? $() : null; }; var _a = function e(t) { if (!(this instanceof e)) return new e(t); if (!A4(t)) { dr("A style must have a core reference"); return; } this._private = { cy: t, coreStyle: {} }, this.length = 0, this.resetToDefault(); }, Fa = _a.prototype; Fa.instanceString = function() { return "style"; }; Fa.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(a) { var o = a[0]._private; o.styleDirty = !0, o.appliedInitStyle = !1; }), this; }; Fa.resetToDefault = function() { return this.clear(), this.addDefaultStylesheet(), this; }; Fa.core = function(e) { return this._private.coreStyle[e] || this.getDefaultProperty(e); }; Fa.selector = function(e) { var t = e === "core" ? null : new ju(e), n = this.length++; return this[n] = { selector: t, properties: [], mappedProperties: [], index: n }, this; }; Fa.css = function() { var e = this, t = arguments; if (t.length === 1) for (var n = t[0], r = 0; r < e.properties.length; r++) { var a = e.properties[r], o = n[a.name]; o === void 0 && (o = n[N2(a.name)]), o !== void 0 && this.cssRule(a.name, o); } else t.length === 2 && this.cssRule(t[0], t[1]); return this; }; Fa.style = Fa.css; Fa.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 a = !this[r].selector; a && (this._private.coreStyle[n.name] = n); } return this; }; Fa.append = function(e) { return TM(e) ? e.appendToStyle(this) : zn(e) ? this.appendFromJson(e) : xt(e) && this.appendFromString(e), this; }; _a.fromJson = function(e, t) { var n = new _a(e); return n.fromJson(t), n; }; _a.fromString = function(e, t) { return new _a(e).fromString(t); }; [Pa, Rg, W4, Es, G2, K4, Zr, X2].forEach(function(e) { Ft(Fa, e); }); _a.types = Fa.types; _a.properties = Fa.properties; _a.propertyGroups = Fa.propertyGroups; _a.propertyGroupNames = Fa.propertyGroupNames; _a.propertyGroupKeys = Fa.propertyGroupKeys; var yye = { style: function(e) { if (e) { var t = this.setStyle(e); t.update(); } return this._private.style; }, setStyle: function(e) { var t = this._private; return TM(e) ? t.style = e.generateStyle(this) : zn(e) ? t.style = _a.fromJson(this, e) : xt(e) ? t.style = _a.fromString(this, e) : t.style = _a(this), t.style; }, // e.g. cy.data() changed => recalc ele mappers updateStyle: function() { this.mutableElements().updateStyle(); } }, bye = "single", kd = { 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 = bye), 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, a, o, i; switch (e.length) { case 0: return t; case 1: if (xt(e[0])) return n = e[0], t[n]; if (Cn(e[0])) { if (!this._private.panningEnabled) return this; a = e[0], o = a.x, i = a.y, ot(o) && (t.x = o), ot(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") && ot(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, a, o, i, s, l; if (!this._private.panningEnabled) return this; switch (n.length) { case 1: Cn(e) && (i = n[0], s = i.x, l = i.y, ot(s) && (r.x += s), ot(l) && (r.y += l), this.emit("pan viewport")); break; case 2: a = e, o = t, (a === "x" || a === "y") && ot(o) && (r[a] += o), 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 (ot(e) && t === void 0 && (t = e, e = void 0), !(!this._private.panningEnabled || !this._private.zoomingEnabled)) { var n; if (xt(e)) { var r = e; e = this.$(r); } else if (bhe(e)) { var a = e; n = { x1: a.x1, y1: a.y1, x2: a.x2, y2: a.y2 }, n.w = n.x2 - n.x1, n.h = n.y2 - n.y1; } else $o(e) || (e = this.mutableElements()); if (!($o(e) && e.empty())) { n = n || e.boundingBox(); var o = this.width(), i = this.height(), s; if (t = ot(t) ? t : 0, !isNaN(o) && !isNaN(i) && o > 0 && i > 0 && !isNaN(n.w) && !isNaN(n.h) && n.w > 0 && n.h > 0) { s = Math.min((o - 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: (o - 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 ot(e) && ot(t) && e <= t ? (n.minZoom = e, n.maxZoom = t) : ot(e) && t === void 0 && e <= n.maxZoom ? n.minZoom = e : ot(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, a, o, i = !1; if (t.zoomingEnabled || (i = !0), ot(e) ? o = e : Cn(e) && (o = e.level, e.position != null ? a = R2(e.position, r, n) : e.renderedPosition != null && (a = e.renderedPosition), a != null && !t.panningEnabled && (i = !0)), o = o > t.maxZoom ? t.maxZoom : o, o = o < t.minZoom ? t.minZoom : o, i || !ot(o) || o === r || a != null && (!ot(a.x) || !ot(a.y))) return null; if (a != null) { var s = n, l = r, u = o, c = { x: -u / l * (a.x - s.x) + a.x, y: -u / l * (a.y - s.y) + a.y }; return { zoomed: !0, panned: !0, zoom: u, pan: c }; } else return { zoomed: !0, panned: !1, zoom: o, 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, a = [], o = !1, i = !1; if (!e) return this; if (ot(e.zoom) || (n = !1), Cn(e.pan) || (r = !1), !n && !r) return this; if (n) { var s = e.zoom; s < t.minZoom || s > t.maxZoom || !t.zoomingEnabled ? o = !0 : (t.zoom = s, a.push("zoom")); } if (r && (!o || !e.cancelOnFailedZoom) && t.panningEnabled) { var l = e.pan; ot(l.x) && (t.pan.x = l.x, i = !1), ot(l.y) && (t.pan.y = l.y, i = !1), i || a.push("pan"); } return a.length > 0 && (a.push("viewport"), this.emit(a.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 (xt(e)) { var n = e; e = this.mutableElements().filter(n); } else $o(e) || (e = this.mutableElements()); if (e.length !== 0) { var r = e.boundingBox(), a = this.width(), o = this.height(); t = t === void 0 ? this._private.zoom : t; var i = { // middle x: (a - t * (r.x1 + r.x2)) / 2, y: (o - 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), a = function(o) { return parseFloat(r.getPropertyValue(o)); }; return { width: t.clientWidth - a("padding-left") - a("padding-right"), height: t.clientHeight - a("padding-top") - a("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; } }; kd.centre = kd.center; kd.autolockNodes = kd.autolock; kd.autoungrabifyNodes = kd.autoungrabify; var A0 = { data: On.data({ field: "data", bindingEvent: "data", allowBinding: !0, allowSetting: !0, settingEvent: "data", settingTriggersEvent: !0, triggerFnName: "trigger", allowGetting: !0, updateStyle: !0 }), removeData: On.removeData({ field: "data", event: "data", triggerFnName: "trigger", triggerEvent: !0, updateStyle: !0 }), scratch: On.data({ field: "scratch", bindingEvent: "scratch", allowBinding: !0, allowSetting: !0, settingEvent: "scratch", settingTriggersEvent: !0, triggerFnName: "trigger", allowGetting: !0, updateStyle: !0 }), removeScratch: On.removeData({ field: "scratch", event: "scratch", triggerFnName: "trigger", triggerEvent: !0, updateStyle: !0 }) }; A0.attr = A0.data; A0.removeAttr = A0.removeData; var eb = function(e) { var t = this; e = Ft({}, e); var n = e.container; n && !Ky(n) && Ky(n[0]) && (n = n[0]); var r = n ? n._cyreg : null; r = r || {}, r && r.cy && (r.cy.destroy(), r = {}); var a = r.readies = r.readies || []; n && (n._cyreg = r), r.cy = t; var o = Tr !== void 0 && n !== void 0 && !e.headless, i = e; i.layout = Ft({ name: o ? "grid" : "null" }, i.layout), i.renderer = Ft({ name: o ? "canvas" : "null" }, i.renderer); var s = function(f, h, p) { return h !== void 0 ? h : p !== void 0 ? p : f; }, l = this._private = { container: n, // html dom ele container ready: !1, // whether ready has been triggered options: i, // cached options elements: new ca(this), // elements in the graph listeners: [], // list of listeners aniEles: new ca(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 ? o : i.styleEnabled, zoom: ot(i.zoom) ? i.zoom : 1, pan: { x: Cn(i.pan) && ot(i.pan.x) ? i.pan.x : 0, y: Cn(i.pan) && ot(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(f, h) { var p = f.some(whe); if (p) return fh.all(f).then(h); h(f); }; l.styleEnabled && t.setStyle([]); var c = Ft({}, i, i.renderer); t.initRenderer(c); var d = function(f, h, p) { t.notifications(!1); var v = t.mutableElements(); v.length > 0 && v.remove(), f != null && (Cn(f) || zn(f)) && t.add(f), t.one("layoutready", function(g) { t.notifications(!0), t.emit(g), t.one("load", h), t.emitAndNotify("load"); }).one("layoutstop", function() { t.one("done", p), t.emit("done"); }); var m = Ft({}, t._private.options.layout); m.eles = t.elements(), t.layout(m).run(); }; u([i.style, i.elements], function(f) { var h = f[0], p = f[1]; l.styleEnabled && t.style().append(h), d(p, function() { t.startAnimationLoop(), l.ready = !0, ir(i.ready) && t.on("ready", i.ready); for (var v = 0; v < a.length; v++) { var m = a[v]; t.on("ready", m); } r && (r.readies = []), t.emit("ready"); }, i.done); }); }, tb = eb.prototype; Ft(tb, { 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 Tr; var t = this._private.container.ownerDocument; return t === void 0 || t == null ? Tr : t.defaultView || Tr; }, mount: function(e) { if (e != null) { var t = this, n = t._private, r = n.options; return !Ky(e) && Ky(e[0]) && (e = e[0]), t.stopAnimationLoop(), t.destroyRenderer(), n.container = e, n.styleEnabled = !0, t.invalidateSize(), t.initRenderer(Ft({}, 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 cs(this._private.options); }, json: function(e) { var t = this, n = t._private, r = t.mutableElements(), a = function(y) { return t.getElementById(y.id()); }; if (Cn(e)) { if (t.startBatch(), e.elements) { var o = {}, i = function(y, x) { for (var w = [], k = [], C = 0; C < y.length; C++) { var S = y[C]; if (!S.data.id) { Fn("cy.json() cannot handle elements without an ID attribute"); continue; } var _ = "" + S.data.id, T = t.getElementById(_); o[_] = !0, T.length !== 0 ? k.push({ ele: T, json: S }) : (x && (S.group = x), w.push(S)); } t.add(w); for (var O = 0; O < k.length; O++) { var $ = k[O], A = $.ele, N = $.json; A.json(N); } }; if (zn(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]; zn(c) && i(c, u); } var d = t.collection(); r.filter(function(y) { return !o[y.id()]; }).forEach(function(y) { y.isParent() ? d.merge(y) : y.remove(); }), d.forEach(function(y) { return y.children().move({ parent: null }); }), d.forEach(function(y) { return a(y).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 f = ["minZoom", "maxZoom", "zoomingEnabled", "userZoomingEnabled", "panningEnabled", "userPanningEnabled", "boxSelectionEnabled", "autolock", "autoungrabify", "autounselectify", "multiClickDebounceTime"], h = 0; h < f.length; h++) { var p = f[h]; e[p] != null && t[p](e[p]); } return t.endBatch(), this; } else { var v = !!e, m = {}; v ? m.elements = this.elements().map(function(y) { return y.json(); }) : (m.elements = {}, r.forEach(function(y) { var x = y.group(); m.elements[x] || (m.elements[x] = []), m.elements[x].push(y.json()); })), this._private.styleEnabled && (m.style = t.style().json()), m.data = cs(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 = cs(n.pan), m.boxSelectionEnabled = n.boxSelectionEnabled, m.renderer = cs(g.renderer), m.hideEdgesOnViewport = g.hideEdgesOnViewport, m.textureOnViewport = g.textureOnViewport, m.wheelSensitivity = g.wheelSensitivity, m.motionBlur = g.motionBlur, m.multiClickDebounceTime = g.multiClickDebounceTime, m; } } }); tb.$id = tb.getElementById; [lye, fye, TB, GC, ty, vye, XC, ny, yye, kd, A0].forEach(function(e) { Ft(tb, e); }); var wye = { 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 }, xye = { 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 }, Sp = function(e) { return e.scratch("breadthfirst"); }, fO = function(e, t) { return e.scratch("breadthfirst", t); }; function OB(e) { this.options = Ft({}, wye, xye, e); } OB.prototype.run = function() { var e = this.options, t = e, n = e.cy, r = t.eles, a = r.nodes().filter(function(xe) { return !xe.isParent(); }), o = r, i = t.directed, s = t.acyclic || t.maximal || t.maximalAdjustments > 0, l = wo(t.boundingBox ? t.boundingBox : { x1: 0, y1: 0, w: n.width(), h: n.height() }), u; if ($o(t.roots)) u = t.roots; else if (zn(t.roots)) { for (var c = [], d = 0; d < t.roots.length; d++) { var f = t.roots[d], h = n.getElementById(f); c.push(h); } u = n.collection(c); } else if (xt(t.roots)) u = n.$(t.roots); else if (i) u = a.roots(); else { var p = r.components(); u = n.collection(); for (var v = function(xe) { var $e = p[xe], Se = $e.maxDegree(!1), Pe = $e.filter(function(Me) { return Me.degree(!1) === Se; }); u = u.add(Pe); }, m = 0; m < p.length; m++) v(m); } var g = [], y = {}, x = function(xe, $e) { g[$e] == null && (g[$e] = []); var Se = g[$e].length; g[$e].push(xe), fO(xe, { index: Se, depth: $e }); }, w = function(xe, $e) { var Se = Sp(xe), Pe = Se.depth, Me = Se.index; g[Pe][Me] = null, x(xe, $e); }; o.bfs({ roots: u, directed: t.directed, visit: function(xe, $e, Se, Pe, Me) { var je = xe[0], Be = je.id(); x(je, Me), y[Be] = !0; } }); for (var k = [], C = 0; C < a.length; C++) { var S = a[C]; y[S.id()] || k.push(S); } var _ = function(xe) { for (var $e = g[xe], Se = 0; Se < $e.length; Se++) { var Pe = $e[Se]; if (Pe == null) { $e.splice(Se, 1), Se--; continue; } fO(Pe, { depth: xe, index: Se }); } }, T = function() { for (var xe = 0; xe < g.length; xe++) _(xe); }, O = function(xe, $e) { for (var Se = Sp(xe), Pe = xe.incomers().filter(function(E) { return E.isNode() && r.has(E); }), Me = -1, je = xe.id(), Be = 0; Be < Pe.length; Be++) { var We = Pe[Be], qe = Sp(We); Me = Math.max(Me, qe.depth); } if (Se.depth <= Me) { if (!t.acyclic && $e[je]) return null; var Ge = Me + 1; return w(xe, Ge), $e[je] = Ge, !0; } return !1; }; if (i && s) { var $ = [], A = {}, N = function(xe) { return $.push(xe); }, L = function() { return $.shift(); }; for (a.forEach(function(xe) { return $.push(xe); }); $.length > 0; ) { var R = L(), P = O(R, A); if (P) R.outgoers().filter(function(xe) { return xe.isNode() && r.has(xe); }).forEach(N); else if (P === null) { Fn("Detected double maximal shift for node `" + R.id() + "`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs."); break; } } } T(); var B = 0; if (t.avoidOverlap) for (var M = 0; M < a.length; M++) { var z = a[M], Z = z.layoutDimensions(t), G = Z.w, J = Z.h; B = Math.max(B, G, J); } var se = {}, ve = function(xe) { if (se[xe.id()]) return se[xe.id()]; for (var $e = Sp(xe).depth, Se = xe.neighborhood(), Pe = 0, Me = 0, je = 0; je < Se.length; je++) { var Be = Se[je]; if (!(Be.isEdge() || Be.isParent() || !a.has(Be))) { var We = Sp(Be); if (We != null) { var qe = We.index, Ge = We.depth; if (!(qe == null || Ge == null)) { var E = g[Ge].length; Ge < $e && (Pe += qe / E, Me++); } } } } return Me = Math.max(1, Me), Pe = Pe / Me, Me === 0 && (Pe = 0), se[xe.id()] = Pe, Pe; }, ge = function(xe, $e) { var Se = ve(xe), Pe = ve($e), Me = Se - Pe; return Me === 0 ? $M(xe.id(), $e.id()) : Me; }; t.depthSort !== void 0 && (ge = t.depthSort); for (var oe = 0; oe < g.length; oe++) g[oe].sort(ge), _(oe); for (var ee = [], q = 0; q < k.length; q++) ee.push(k[q]); g.unshift(ee), T(); for (var Y = 0, te = 0; te < g.length; te++) Y = Math.max(g[te].length, Y); var we = { x: l.x1 + l.w / 2, y: l.x1 + l.h / 2 }, Oe = g.reduce(function(xe, $e) { return Math.max(xe, $e.length); }, 0), Ne = function(xe) { var $e = Sp(xe), Se = $e.depth, Pe = $e.index, Me = g[Se].length, je = Math.max(l.w / ((t.grid ? Oe : Me) + 1), B), Be = Math.max(l.h / (g.length + 1), B), We = Math.min(l.w / 2 / g.length, l.h / 2 / g.length); if (We = Math.max(We, B), t.circle) { var qe = We * Se + We - (g.length > 0 && g[0].length <= 3 ? We / 2 : 0), Ge = 2 * Math.PI / g[Se].length * Pe; return Se === 0 && g[0].length === 1 && (qe = 1), { x: we.x + qe * Math.cos(Ge), y: we.y + qe * Math.sin(Ge) }; } else { var E = { x: we.x + (Pe + 1 - (Me + 1) / 2) * je, y: (Se + 1) * Be }; return E; } }; return r.nodes().layoutPositions(this, t, Ne), this; }; var kye = { 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 $B(e) { this.options = Ft({}, kye, e); } $B.prototype.run = function() { var e = this.options, t = e, n = e.cy, r = t.eles, a = t.counterclockwise !== void 0 ? !t.counterclockwise : t.clockwise, o = r.nodes().not(":parent"); t.sort && (o = o.sort(t.sort)); for (var i = wo(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 / o.length : t.sweep, u = l / Math.max(1, o.length - 1), c, d = 0, f = 0; f < o.length; f++) { var h = o[f], p = h.layoutDimensions(t), v = p.w, m = p.h; d = Math.max(d, v, m); } if (ot(t.radius) ? c = t.radius : o.length <= 1 ? c = 0 : c = Math.min(i.h, i.w) / 2 - d, o.length > 1 && t.avoidOverlap) { d *= 1.75; var g = Math.cos(u) - Math.cos(0), y = Math.sin(u) - Math.sin(0), x = Math.sqrt(d * d / (g * g + y * y)); c = Math.max(x, c); } var w = function(k, C) { var S = t.startAngle + C * u * (a ? 1 : -1), _ = c * Math.cos(S), T = c * Math.sin(S), O = { x: s.x + _, y: s.y + T }; return O; }; return r.nodes().layoutPositions(this, t, w), this; }; var Cye = { 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 FB(e) { this.options = Ft({}, Cye, e); } FB.prototype.run = function() { for (var e = this.options, t = e, n = t.counterclockwise !== void 0 ? !t.counterclockwise : t.clockwise, r = e.cy, a = t.eles, o = a.nodes().not(":parent"), i = wo(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 < o.length; c++) { var d = o[c], f = void 0; f = t.concentric(d), l.push({ value: f, node: d }), d._private.scratch.concentric = f; } o.updateStyle(); for (var h = 0; h < o.length; h++) { var p = o[h], v = p.layoutDimensions(t); u = Math.max(u, v.w, v.h); } l.sort(function(xe, $e) { return $e.value - xe.value; }); for (var m = t.levelWidth(o), g = [[]], y = g[0], x = 0; x < l.length; x++) { var w = l[x]; if (y.length > 0) { var k = Math.abs(y[0].value - w.value); k >= m && (y = [], g.push(y)); } y.push(w); } var C = u + t.minNodeSpacing; if (!t.avoidOverlap) { var S = g.length > 0 && g[0].length > 1, _ = Math.min(i.w, i.h) / 2 - C, T = _ / (g.length + S ? 1 : 0); C = Math.min(C, T); } for (var O = 0, $ = 0; $ < g.length; $++) { var A = g[$], N = t.sweep === void 0 ? 2 * Math.PI - 2 * Math.PI / A.length : t.sweep, L = A.dTheta = N / Math.max(1, A.length - 1); if (A.length > 1 && t.avoidOverlap) { var R = Math.cos(L) - Math.cos(0), P = Math.sin(L) - Math.sin(0), B = Math.sqrt(C * C / (R * R + P * P)); O = Math.max(B, O); } A.r = O, O += C; } if (t.equidistant) { for (var M = 0, z = 0, Z = 0; Z < g.length; Z++) { var G = g[Z], J = G.r - z; M = Math.max(M, J); } z = 0; for (var se = 0; se < g.length; se++) { var ve = g[se]; se === 0 && (z = ve.r), ve.r = z, z += M; } } for (var ge = {}, oe = 0; oe < g.length; oe++) for (var ee = g[oe], q = ee.dTheta, Y = ee.r, te = 0; te < ee.length; te++) { var we = ee[te], Oe = t.startAngle + (n ? 1 : -1) * q * te, Ne = { x: s.x + Y * Math.cos(Oe), y: s.y + Y * Math.sin(Oe) }; ge[we.node.id()] = Ne; } return a.nodes().layoutPositions(this, t, function(xe) { var $e = xe.id(); return ge[$e]; }), this; }; var nk, Sye = { // 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 Y2(e) { this.options = Ft({}, Sye, e), this.options.layout = this; var t = this.options.eles.nodes(), n = this.options.eles.edges(), r = n.filter(function(a) { var o = a.source().data("id"), i = a.target().data("id"), s = t.some(function(u) { return u.data("id") === o; }), l = t.some(function(u) { return u.data("id") === i; }); return !s || !l; }); this.options.eles = this.options.eles.not(r); } Y2.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 ? nk = !0 : nk = !1; var r = Eye(t, n, e); nk && Oye(r), e.randomize && $ye(r); var a = yl(), o = function() { Fye(r, t, e), e.fit === !0 && t.fit(e.padding); }, i = function(d) { return !(n.stopped || d >= e.numIter || (Aye(r, e), r.temperature = r.temperature * e.coolingFactor, r.temperature < e.minTemp)); }, s = function() { if (e.animate === !0 || e.animate === !1) o(), n.one("layoutstop", e.stop), n.emit({ type: "layoutstop", layout: n }); else { var d = e.eles.nodes(), f = AB(r, e, d); d.layoutPositions(n, e, f); } }, l = 0, u = !0; if (e.animate === !0) { var c = function d() { for (var f = 0; u && f < e.refresh; ) u = i(l), l++, f++; if (!u) vO(r, e), s(); else { var h = yl(); h - a >= e.animationThreshold && o(), Gy(d); } }; c(); } else { for (; u; ) u = i(l), l++; vO(r, e), s(); } return this; }; Y2.prototype.stop = function() { return this.stopped = !0, this.thread && this.thread.stop(), this.emit("layoutstop"), this; }; Y2.prototype.destroy = function() { return this.thread && this.thread.stop(), this; }; var Eye = function(e, t, n) { for (var r = n.eles.edges(), a = n.eles.nodes(), o = wo(n.boundingBox ? n.boundingBox : { x1: 0, y1: 0, w: e.width(), h: e.height() }), i = { isCompound: e.hasCompoundNodes(), layoutNodes: [], idToIndex: {}, nodeSize: a.size(), graphSet: [], indexToGraph: [], layoutEdges: [], edgeSize: r.size(), temperature: n.initialTemp, clientWidth: o.w, clientHeight: o.h, boundingBox: o }, s = n.eles.components(), l = {}, u = 0; u < s.length; u++) for (var c = s[u], d = 0; d < c.length; d++) { var f = c[d]; l[f.id()] = u; } for (var u = 0; u < i.nodeSize; u++) { var h = a[u], p = 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 = p.w, v.width = p.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 = ir(n.nodeRepulsion) ? n.nodeRepulsion(h) : n.nodeRepulsion, i.layoutNodes.push(v), i.idToIndex[v.id] = u; } for (var m = [], g = 0, y = -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[++y] = h.id, x.push(h.id)); } for (i.graphSet.push(x); g <= y; ) { var k = m[g++], C = i.idToIndex[k], f = i.layoutNodes[C], S = f.children; if (S.length > 0) { i.graphSet.push(S); for (var u = 0; u < S.length; u++) m[++y] = S[u]; } } for (var u = 0; u < i.graphSet.length; u++) for (var _ = i.graphSet[u], d = 0; d < _.length; d++) { var T = i.idToIndex[_[d]]; i.indexToGraph[T] = u; } for (var u = 0; u < i.edgeSize; u++) { var O = r[u], $ = {}; $.id = O.data("id"), $.sourceId = O.data("source"), $.targetId = O.data("target"); var A = ir(n.idealEdgeLength) ? n.idealEdgeLength(O) : n.idealEdgeLength, N = ir(n.edgeElasticity) ? n.edgeElasticity(O) : n.edgeElasticity, L = i.idToIndex[$.sourceId], R = i.idToIndex[$.targetId], P = i.indexToGraph[L], B = i.indexToGraph[R]; if (P != B) { for (var M = _ye($.sourceId, $.targetId, i), z = i.graphSet[M], Z = 0, v = i.layoutNodes[L]; z.indexOf(v.id) === -1; ) v = i.layoutNodes[i.idToIndex[v.parentId]], Z++; for (v = i.layoutNodes[R]; z.indexOf(v.id) === -1; ) v = i.layoutNodes[i.idToIndex[v.parentId]], Z++; A *= Z * n.nestingFactor; } $.idealLength = A, $.elasticity = N, i.layoutEdges.push($); } return i; }, _ye = function(e, t, n) { var r = Tye(e, t, 0, n); return 2 > r.count ? 0 : r.graph; }, Tye = function e(t, n, r, a) { var o = a.graphSet[r]; if (-1 < o.indexOf(t) && -1 < o.indexOf(n)) return { count: 2, graph: r }; for (var i = 0, s = 0; s < o.length; s++) { var l = o[s], u = a.idToIndex[l], c = a.layoutNodes[u].children; if (c.length !== 0) { var d = a.indexToGraph[a.idToIndex[c[0]]], f = e(t, n, d, a); if (f.count !== 0) if (f.count === 1) { if (i++, i === 2) break; } else return f; } } return { count: i, graph: r }; }, Oye, $ye = function(e, t) { for (var n = e.clientWidth, r = e.clientHeight, a = 0; a < e.nodeSize; a++) { var o = e.layoutNodes[a]; o.children.length === 0 && !o.isLocked && (o.positionX = Math.random() * n, o.positionY = Math.random() * r); } }, AB = function(e, t, n) { var r = e.boundingBox, a = { x1: 1 / 0, x2: -1 / 0, y1: 1 / 0, y2: -1 / 0 }; return t.boundingBox && (n.forEach(function(o) { var i = e.layoutNodes[e.idToIndex[o.data("id")]]; a.x1 = Math.min(a.x1, i.positionX), a.x2 = Math.max(a.x2, i.positionX), a.y1 = Math.min(a.y1, i.positionY), a.y2 = Math.max(a.y2, i.positionY); }), a.w = a.x2 - a.x1, a.h = a.y2 - a.y1), function(o, i) { var s = e.layoutNodes[e.idToIndex[o.data("id")]]; if (t.boundingBox) { var l = (s.positionX - a.x1) / a.w, u = (s.positionY - a.y1) / a.h; return { x: r.x1 + l * r.w, y: r.y1 + u * r.h }; } else return { x: s.positionX, y: s.positionY }; }; }, Fye = function(e, t, n) { var r = n.layout, a = n.eles.nodes(), o = AB(e, n, a); a.positions(o), e.ready !== !0 && (e.ready = !0, r.one("layoutready", n.ready), r.emit({ type: "layoutready", layout: this })); }, Aye = function(e, t, n) { Iye(e, t), Nye(e), Mye(e, t), Bye(e), Dye(e); }, Iye = function(e, t) { for (var n = 0; n < e.graphSet.length; n++) for (var r = e.graphSet[n], a = r.length, o = 0; o < a; o++) for (var i = e.layoutNodes[e.idToIndex[r[o]]], s = o + 1; s < a; s++) { var l = e.layoutNodes[e.idToIndex[r[s]]]; Pye(i, l, e, t); } }, hO = function(e) { return -e + 2 * e * Math.random(); }, Pye = function(e, t, n, r) { var a = e.cmptId, o = t.cmptId; if (!(a !== o && !n.isCompound)) { var i = t.positionX - e.positionX, s = t.positionY - e.positionY, l = 1; i === 0 && s === 0 && (i = hO(l), s = hO(l)); var u = Lye(e, t, i, s); if (u > 0) var m = r.nodeOverlap * u, v = Math.sqrt(i * i + s * s), g = m * i / v, y = m * s / v; else var c = nb(e, i, s), d = nb(t, -1 * i, -1 * s), f = d.x - c.x, h = d.y - c.y, p = f * f + h * h, v = Math.sqrt(p), m = (e.nodeRepulsion + t.nodeRepulsion) / p, g = m * f / v, y = m * h / v; e.isLocked || (e.offsetX -= g, e.offsetY -= y), t.isLocked || (t.offsetX += g, t.offsetY += y); } }, Lye = function(e, t, n, r) { if (n > 0) var a = e.maxX - t.minX; else var a = t.maxX - e.minX; if (r > 0) var o = e.maxY - t.minY; else var o = t.maxY - e.minY; return a >= 0 && o >= 0 ? Math.sqrt(a * a + o * o) : 0; }, nb = function(e, t, n) { var r = e.positionX, a = e.positionY, o = e.height || 1, i = e.width || 1, s = n / t, l = o / i, u = {}; return t === 0 && 0 < n || t === 0 && 0 > n ? (u.x = r, u.y = a + o / 2, u) : 0 < t && -1 * l <= s && s <= l ? (u.x = r + i / 2, u.y = a + i * n / 2 / t, u) : 0 > t && -1 * l <= s && s <= l ? (u.x = r - i / 2, u.y = a - i * n / 2 / t, u) : 0 < n && (s <= -1 * l || s >= l) ? (u.x = r + o * t / 2 / n, u.y = a + o / 2, u) : (0 > n && (s <= -1 * l || s >= l) && (u.x = r - o * t / 2 / n, u.y = a - o / 2), u); }, Nye = function(e, t) { for (var n = 0; n < e.edgeSize; n++) { var r = e.layoutEdges[n], a = e.idToIndex[r.sourceId], o = e.layoutNodes[a], i = e.idToIndex[r.targetId], s = e.layoutNodes[i], l = s.positionX - o.positionX, u = s.positionY - o.positionY; if (!(l === 0 && u === 0)) { var c = nb(o, l, u), d = nb(s, -1 * l, -1 * u), f = d.x - c.x, h = d.y - c.y, p = Math.sqrt(f * f + h * h), v = Math.pow(r.idealLength - p, 2) / r.elasticity; if (p !== 0) var m = v * f / p, g = v * h / p; else var m = 0, g = 0; o.isLocked || (o.offsetX += m, o.offsetY += g), s.isLocked || (s.offsetX -= m, s.offsetY -= g); } } }, Mye = function(e, t) { if (t.gravity !== 0) for (var n = 1, r = 0; r < e.graphSet.length; r++) { var a = e.graphSet[r], o = a.length; if (r === 0) var l = e.clientHeight / 2, u = e.clientWidth / 2; else var i = e.layoutNodes[e.idToIndex[a[0]]], s = e.layoutNodes[e.idToIndex[i.parentId]], l = s.positionX, u = s.positionY; for (var c = 0; c < o; c++) { var d = e.layoutNodes[e.idToIndex[a[c]]]; if (!d.isLocked) { var f = l - d.positionX, h = u - d.positionY, p = Math.sqrt(f * f + h * h); if (p > n) { var v = t.gravity * f / p, m = t.gravity * h / p; d.offsetX += v, d.offsetY += m; } } } } }, Bye = function(e, t) { var n = [], r = 0, a = -1; for (n.push.apply(n, e.graphSet[0]), a += e.graphSet[0].length; r <= a; ) { var o = n[r++], i = e.idToIndex[o], 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 f = e.layoutNodes[e.idToIndex[l[d]]]; f.offsetX += u, f.offsetY += c, n[++a] = l[d]; } s.offsetX = 0, s.offsetY = 0; } } }, Dye = 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 a = Rye(r.offsetX, r.offsetY, e.temperature); r.positionX += a.x, r.positionY += a.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, zye(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); } }, Rye = function(e, t, n) { var r = Math.sqrt(e * e + t * t); if (r > n) var a = { x: n * e / r, y: n * t / r }; else var a = { x: e, y: t }; return a; }, zye = function e(t, n) { var r = t.parentId; if (r != null) { var a = n.layoutNodes[n.idToIndex[r]], o = !1; if ((a.maxX == null || t.maxX + a.padRight > a.maxX) && (a.maxX = t.maxX + a.padRight, o = !0), (a.minX == null || t.minX - a.padLeft < a.minX) && (a.minX = t.minX - a.padLeft, o = !0), (a.maxY == null || t.maxY + a.padBottom > a.maxY) && (a.maxY = t.maxY + a.padBottom, o = !0), (a.minY == null || t.minY - a.padTop < a.minY) && (a.minY = t.minY - a.padTop, o = !0), o) return e(a, n); } }, vO = function(e, t) { for (var n = e.layoutNodes, r = [], a = 0; a < n.length; a++) { var o = n[a], i = o.cmptId, s = r[i] = r[i] || []; s.push(o); } for (var l = 0, a = 0; a < r.length; a++) { var u = r[a]; 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, y) { return y.w * y.h - g.w * g.h; }); for (var f = 0, h = 0, p = 0, v = 0, m = Math.sqrt(l) * e.clientWidth / e.clientHeight, a = 0; a < r.length; a++) { var u = r[a]; if (u) { for (var c = 0; c < u.length; c++) { var d = u[c]; d.isLocked || (d.positionX += f - u.x1, d.positionY += h - u.y1); } f += u.w + t.componentSpacing, p += u.w + t.componentSpacing, v = Math.max(v, u.h), p > m && (h += v + t.componentSpacing, f = 0, p = 0, v = 0); } } }, Vye = { 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 IB(e) { this.options = Ft({}, Vye, e); } IB.prototype.run = function() { var e = this.options, t = e, n = e.cy, r = t.eles, a = r.nodes().not(":parent"); t.sort && (a = a.sort(t.sort)); var o = wo(t.boundingBox ? t.boundingBox : { x1: 0, y1: 0, w: n.width(), h: n.height() }); if (o.h === 0 || o.w === 0) r.nodes().layoutPositions(this, t, function(se) { return { x: o.x1, y: o.y1 }; }); else { var i = a.size(), s = Math.sqrt(i * o.h / o.w), l = Math.round(s), u = Math.round(o.w / o.h * s), c = function(se) { if (se == null) return Math.min(l, u); var ve = Math.min(l, u); ve == l ? l = se : u = se; }, d = function(se) { if (se == null) return Math.max(l, u); var ve = Math.max(l, u); ve == l ? l = se : u = se; }, f = t.rows, h = t.cols != null ? t.cols : t.columns; if (f != null && h != null) l = f, u = h; else if (f != null && h == null) l = f, u = Math.ceil(i / l); else if (f == null && h != null) u = h, l = Math.ceil(i / u); else if (u * l > i) { var p = c(), v = d(); (p - 1) * v >= i ? c(p - 1) : (v - 1) * p >= 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 y = o.w / u, x = o.h / l; if (t.condense && (y = 0, x = 0), t.avoidOverlap) for (var w = 0; w < a.length; w++) { var k = a[w], C = k._private.position; (C.x == null || C.y == null) && (C.x = 0, C.y = 0); var S = k.layoutDimensions(t), _ = t.avoidOverlapPadding, T = S.w + _, O = S.h + _; y = Math.max(y, T), x = Math.max(x, O); } for (var $ = {}, A = function(se, ve) { return !!$["c-" + se + "-" + ve]; }, N = function(se, ve) { $["c-" + se + "-" + ve] = !0; }, L = 0, R = 0, P = function() { R++, R >= u && (R = 0, L++); }, B = {}, M = 0; M < a.length; M++) { var z = a[M], Z = t.position(z); if (Z && (Z.row !== void 0 || Z.col !== void 0)) { var G = { row: Z.row, col: Z.col }; if (G.col === void 0) for (G.col = 0; A(G.row, G.col); ) G.col++; else if (G.row === void 0) for (G.row = 0; A(G.row, G.col); ) G.row++; B[z.id()] = G, N(G.row, G.col); } } var J = function(se, ve) { var ge, oe; if (se.locked() || se.isParent()) return !1; var ee = B[se.id()]; if (ee) ge = ee.col * y + y / 2 + o.x1, oe = ee.row * x + x / 2 + o.y1; else { for (; A(L, R); ) P(); ge = R * y + y / 2 + o.x1, oe = L * x + x / 2 + o.y1, N(L, R), P(); } return { x: ge, y: oe }; }; a.layoutPositions(this, t, J); } return this; }; var jye = { ready: function() { }, // on layoutready stop: function() { } // on layoutstop }; function G4(e) { this.options = Ft({}, jye, e); } G4.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; }; G4.prototype.stop = function() { return this; }; var Hye = { 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 PB(e) { this.options = Ft({}, Hye, e); } PB.prototype.run = function() { var e = this.options, t = e.eles, n = t.nodes(), r = ir(e.positions); function a(o) { if (e.positions == null) return Kve(o.position()); if (r) return e.positions(o); var i = e.positions[o._private.data.id]; return i ?? null; } return n.layoutPositions(this, e, function(o, i) { var s = a(o); return o.locked() || s == null ? !1 : s; }), this; }; var Uye = { 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 LB(e) { this.options = Ft({}, Uye, e); } LB.prototype.run = function() { var e = this.options, t = e.cy, n = e.eles, r = wo(e.boundingBox ? e.boundingBox : { x1: 0, y1: 0, w: t.width(), h: t.height() }), a = function(o, 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, a), this; }; var qye = [{ name: "breadthfirst", impl: OB }, { name: "circle", impl: $B }, { name: "concentric", impl: FB }, { name: "cose", impl: Y2 }, { name: "grid", impl: IB }, { name: "null", impl: G4 }, { name: "preset", impl: PB }, { name: "random", impl: LB }]; function NB(e) { this.options = e, this.notifications = 0; } var gO = function() { }, mO = function() { throw new Error("A headless instance can not render images"); }; NB.prototype = { recalculateRenderedStyle: gO, notify: function() { this.notifications++; }, init: gO, isHeadless: function() { return !0; }, png: mO, jpg: mO }; var X4 = {}; X4.arrowShapeWidth = 0.3; X4.registerArrowShapes = function() { var e = this.arrowShapes = {}, t = this, n = function(l, u, c, d, f, h, p) { var v = f.x - c / 2 - p, m = f.x + c / 2 + p, g = f.y - c / 2 - p, y = f.y + c / 2 + p, x = v <= l && l <= m && g <= u && u <= y; return x; }, r = function(l, u, c, d, f) { var h = l * Math.cos(d) - u * Math.sin(d), p = l * Math.sin(d) + u * Math.cos(d), v = h * c, m = p * c, g = v + f.x, y = m + f.y; return { x: g, y }; }, a = function(l, u, c, d) { for (var f = [], h = 0; h < l.length; h += 2) { var p = l[h], v = l[h + 1]; f.push(r(p, v, u, c, d)); } return f; }, o = 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) { xt(u) && (u = e[u]), e[l] = Ft({ name: l, points: [-0.15, -0.3, 0.15, -0.3, 0.15, 0.3, -0.15, 0.3], collide: function(c, d, f, h, p, v) { var m = o(a(this.points, f + 2 * v, h, p)), g = Qa(c, d, m); return g; }, roughCollide: n, draw: function(c, d, f, h) { var p = a(this.points, d, f, h); t.arrowShapeImpl("polygon")(c, p); }, spacing: function(c) { return 0; }, gap: i }, u); }; s("none", { collide: Xy, roughCollide: Xy, draw: L4, spacing: T6, gap: T6 }), 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, f) { var h = a(this.points, u, c, d), p = this.controlPoint, v = r(p[0], p[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, f, h, p) { var v = o(a(this.points, c + 2 * p, d, f)), m = o(a(this.pointsTee, c + 2 * p, d, f)), g = Qa(l, u, v) || Qa(l, u, m); return g; }, draw: function(l, u, c, d, f) { var h = a(this.points, u, c, d), p = a(this.pointsTee, u, c, d); t.arrowShapeImpl(this.name)(l, h, p); } }), 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, f, h, p) { var v = f, m = Math.pow(v.x - l, 2) + Math.pow(v.y - u, 2) <= Math.pow((c + 2 * p) * this.radius, 2), g = o(a(this.points, c + 2 * p, d, f)); return Qa(l, u, g) || m; }, draw: function(l, u, c, d, f) { var h = a(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, f = 3, h = 5; return c[f] = c[f] - d, c[h] = c[h] - d, c; }, collide: function(l, u, c, d, f, h, p) { var v = o(a(this.points, c + 2 * p, d, f)), m = o(a(this.crossLinePts(c, h), c + 2 * p, d, f)), g = Qa(l, u, v) || Qa(l, u, m); return g; }, draw: function(l, u, c, d, f) { var h = a(this.points, u, c, d), p = a(this.crossLinePts(u, f), u, c, d); t.arrowShapeImpl(this.name)(l, h, p); } }), 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, f, h, p) { var v = f, m = Math.pow(v.x - l, 2) + Math.pow(v.y - u, 2) <= Math.pow((c + 2 * p) * this.radius, 2); return m; }, draw: function(l, u, c, d, f) { 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 Qd = {}; Qd.projectIntoViewport = function(e, t) { var n = this.cy, r = this.findContainerClientCoords(), a = r[0], o = r[1], i = r[4], s = n.pan(), l = n.zoom(), u = ((e - a) / i - s.x) / l, c = ((t - o) / i - s.y) / l; return [u, c]; }; Qd.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)); }, a = { left: r("padding-left"), right: r("padding-right"), top: r("padding-top"), bottom: r("padding-bottom") }, o = { 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 = a.left + a.right, u = a.top + a.bottom, c = o.left + o.right, d = t.width / (i + c), f = i - l, h = s - u, p = t.left + a.left + o.left, v = t.top + a.top + o.top; return this.containerBB = [p, v, f, h, d]; }; Qd.invalidateContainerClientCoordsCache = function() { this.containerBB = null; }; Qd.findNearestElement = function(e, t, n, r) { return this.findNearestElements(e, t, n, r)[0]; }; Qd.findNearestElements = function(e, t, n, r) { var a = this, o = this, i = o.getCachedZSortedEles(), s = [], l = o.cy.zoom(), u = o.cy.hasCompoundNodes(), c = (r ? 24 : 8) / l, d = (r ? 8 : 2) / l, f = (r ? 8 : 2) / l, h = 1 / 0, p, v; n && (i = i.interactive); function m(S, _) { if (S.isNode()) { if (v) return; v = S, s.push(S); } if (S.isEdge() && (_ == null || _ < h)) if (p) { if (p.pstyle("z-compound-depth").value === S.pstyle("z-compound-depth").value && p.pstyle("z-compound-depth").value === S.pstyle("z-compound-depth").value) { for (var T = 0; T < s.length; T++) if (s[T].isEdge()) { s[T] = S, p = S, h = _ ?? h; break; } } } else s.push(S), p = S, h = _ ?? h; } function g(S) { var _ = S.outerWidth() + 2 * d, T = S.outerHeight() + 2 * d, O = _ / 2, $ = T / 2, A = S.position(), N = S.pstyle("corner-radius").value === "auto" ? "auto" : S.pstyle("corner-radius").pfValue, L = S._private.rscratch; if (A.x - O <= e && e <= A.x + O && A.y - $ <= t && t <= A.y + $) { var R = o.nodeShapes[a.getNodeShape(S)]; if (R.checkPoint(e, t, 0, _, T, A.x, A.y, N, L)) return m(S, 0), !0; } } function y(S) { var _ = S._private, T = _.rscratch, O = S.pstyle("width").pfValue, $ = S.pstyle("arrow-scale").value, A = O / 2 + c, N = A * A, L = A * 2, R = _.source, P = _.target, B; if (T.edgeType === "segments" || T.edgeType === "straight" || T.edgeType === "haystack") { for (var M = T.allpts, z = 0; z + 3 < M.length; z += 2) if (i0e(e, t, M[z], M[z + 1], M[z + 2], M[z + 3], L) && N > (B = d0e(e, t, M[z], M[z + 1], M[z + 2], M[z + 3]))) return m(S, B), !0; } else if (T.edgeType === "bezier" || T.edgeType === "multibezier" || T.edgeType === "self" || T.edgeType === "compound") { for (var M = T.allpts, z = 0; z + 5 < T.allpts.length; z += 4) if (s0e(e, t, M[z], M[z + 1], M[z + 2], M[z + 3], M[z + 4], M[z + 5], L) && N > (B = c0e(e, t, M[z], M[z + 1], M[z + 2], M[z + 3], M[z + 4], M[z + 5]))) return m(S, B), !0; } for (var R = R || _.source, P = P || _.target, Z = a.getArrowWidth(O, $), G = [{ name: "source", x: T.arrowStartX, y: T.arrowStartY, angle: T.srcArrowAngle }, { name: "target", x: T.arrowEndX, y: T.arrowEndY, angle: T.tgtArrowAngle }, { name: "mid-source", x: T.midX, y: T.midY, angle: T.midsrcArrowAngle }, { name: "mid-target", x: T.midX, y: T.midY, angle: T.midtgtArrowAngle }], z = 0; z < G.length; z++) { var J = G[z], se = o.arrowShapes[S.pstyle(J.name + "-arrow-shape").value], ve = S.pstyle("width").pfValue; if (se.roughCollide(e, t, Z, J.angle, { x: J.x, y: J.y }, ve, c) && se.collide(e, t, Z, J.angle, { x: J.x, y: J.y }, ve, c)) return m(S), !0; } u && s.length > 0 && (g(R), g(P)); } function x(S, _, T) { return Ii(S, _, T); } function w(S, _) { var T = S._private, O = f, $; _ ? $ = _ + "-" : $ = "", S.boundingBox(); var A = T.labelBounds[_ || "main"], N = S.pstyle($ + "label").value, L = S.pstyle("text-events").strValue === "yes"; if (!(!L || !N)) { var R = x(T.rscratch, "labelX", _), P = x(T.rscratch, "labelY", _), B = x(T.rscratch, "labelAngle", _), M = S.pstyle($ + "text-margin-x").pfValue, z = S.pstyle($ + "text-margin-y").pfValue, Z = A.x1 - O - M, G = A.x2 + O - M, J = A.y1 - O - z, se = A.y2 + O - z; if (B) { var ve = Math.cos(B), ge = Math.sin(B), oe = function(Oe, Ne) { return Oe = Oe - R, Ne = Ne - P, { x: Oe * ve - Ne * ge + R, y: Oe * ge + Ne * ve + P }; }, ee = oe(Z, J), q = oe(Z, se), Y = oe(G, J), te = oe(G, se), we = [ // with the margin added after the rotation is applied ee.x + M, ee.y + z, Y.x + M, Y.y + z, te.x + M, te.y + z, q.x + M, q.y + z ]; if (Qa(e, t, we)) return m(S), !0; } else if ($f(A, e, t)) return m(S), !0; } } for (var k = i.length - 1; k >= 0; k--) { var C = i[k]; C.isNode() ? g(C) || w(C) : y(C) || w(C) || w(C, "source") || w(C, "target"); } return s; }; Qd.getAllInBox = function(e, t, n, r) { var a = this.getCachedZSortedEles().interactive, o = [], 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 = wo({ x1: e, y1: t, x2: n, y2: r }), d = 0; d < a.length; d++) { var f = a[d]; if (f.isNode()) { var h = f, p = h.boundingBox({ includeNodes: !0, includeEdges: !1, includeLabels: !1 }); B4(c, p) && !UM(p, c) && o.push(h); } else { var v = f, m = v._private, g = m.rscratch; if (g.startX != null && g.startY != null && !$f(c, g.startX, g.startY) || g.endX != null && g.endY != null && !$f(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 y = m.rstyle.bezierPts || m.rstyle.linePts || m.rstyle.haystackPts, x = !0, w = 0; w < y.length; w++) if (!o0e(c, y[w])) { x = !1; break; } x && o.push(v); } else (g.edgeType === "haystack" || g.edgeType === "straight") && o.push(v); } } return o; }; var rb = {}; rb.calculateArrowAngles = function(e) { var t = e._private.rscratch, n = t.edgeType === "haystack", r = t.edgeType === "bezier", a = t.edgeType === "multibezier", o = t.edgeType === "segments", i = t.edgeType === "compound", s = t.edgeType === "self", l, u, c, d, f, h, g, y; if (n ? (c = t.haystackPts[0], d = t.haystackPts[1], f = t.haystackPts[2], h = t.haystackPts[3]) : (c = t.arrowStartX, d = t.arrowStartY, f = t.arrowEndX, h = t.arrowEndY), g = t.midX, y = t.midY, o) l = c - t.segpts[0], u = d - t.segpts[1]; else if (a || i || s || r) { var p = t.allpts, v = Ur(p[0], p[2], p[4], 0.1), m = Ur(p[1], p[3], p[5], 0.1); l = c - v, u = d - m; } else l = c - g, u = d - y; t.srcArrowAngle = jm(l, u); var g = t.midX, y = t.midY; if (n && (g = (c + f) / 2, y = (d + h) / 2), l = f - c, u = h - d, o) { var p = t.allpts; if (p.length / 2 % 2 === 0) { var x = p.length / 2, w = x - 2; l = p[x] - p[w], u = p[x + 1] - p[w + 1]; } else if (t.isRound) l = t.midVector[1], u = -t.midVector[0]; else { var x = p.length / 2 - 1, w = x - 2; l = p[x] - p[w], u = p[x + 1] - p[w + 1]; } } else if (a || i || s) { var p = t.allpts, k = t.ctrlpts, C, S, _, T; if (k.length / 2 % 2 === 0) { var O = p.length / 2 - 1, $ = O + 2, A = $ + 2; C = Ur(p[O], p[$], p[A], 0), S = Ur(p[O + 1], p[$ + 1], p[A + 1], 0), _ = Ur(p[O], p[$], p[A], 1e-4), T = Ur(p[O + 1], p[$ + 1], p[A + 1], 1e-4); } else { var $ = p.length / 2 - 1, O = $ - 2, A = $ + 2; C = Ur(p[O], p[$], p[A], 0.4999), S = Ur(p[O + 1], p[$ + 1], p[A + 1], 0.4999), _ = Ur(p[O], p[$], p[A], 0.5), T = Ur(p[O + 1], p[$ + 1], p[A + 1], 0.5); } l = _ - C, u = T - S; } if (t.midtgtArrowAngle = jm(l, u), t.midDispX = l, t.midDispY = u, l *= -1, u *= -1, o) { var p = t.allpts; if (p.length / 2 % 2 !== 0 && !t.isRound) { var x = p.length / 2 - 1, N = x + 2; l = -(p[N] - p[x]), u = -(p[N + 1] - p[x + 1]); } } if (t.midsrcArrowAngle = jm(l, u), o) l = f - t.segpts[t.segpts.length - 2], u = h - t.segpts[t.segpts.length - 1]; else if (a || i || s || r) { var p = t.allpts, L = p.length, v = Ur(p[L - 6], p[L - 4], p[L - 2], 0.9), m = Ur(p[L - 5], p[L - 3], p[L - 1], 0.9); l = f - v, u = h - m; } else l = f - g, u = h - y; t.tgtArrowAngle = jm(l, u); }; rb.getArrowWidth = rb.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, ZC, as = {}, Vo = {}, yO, bO, Dc, ry, Us, Ec, Lc, ns, Ep, Zm, MB, BB, QC, JC, wO, xO = 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); }, Wye = 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; }, Kye = function(e, t, n, r, a) { if (e !== wO ? xO(t, e, as) : Wye(Vo, as), xO(t, n, Vo), yO = as.nx * Vo.ny - as.ny * Vo.nx, bO = as.nx * Vo.nx - as.ny * -Vo.ny, Us = Math.asin(Math.max(-1, Math.min(1, yO))), Math.abs(Us) < 1e-6) { YC = t.x, ZC = t.y, Lc = Ep = 0; return; } Dc = 1, ry = !1, bO < 0 ? Us < 0 ? Us = Math.PI + Us : (Us = Math.PI - Us, Dc = -1, ry = !0) : Us > 0 && (Dc = -1, ry = !0), t.radius !== void 0 ? Ep = t.radius : Ep = r, Ec = Us / 2, Zm = Math.min(as.len / 2, Vo.len / 2), a ? (ns = Math.abs(Math.cos(Ec) * Ep / Math.sin(Ec)), ns > Zm ? (ns = Zm, Lc = Math.abs(ns * Math.sin(Ec) / Math.cos(Ec))) : Lc = Ep) : (ns = Math.min(Zm, Ep), Lc = Math.abs(ns * Math.sin(Ec) / Math.cos(Ec))), QC = t.x + Vo.nx * ns, JC = t.y + Vo.ny * ns, YC = QC - Vo.ny * Lc * Dc, ZC = JC + Vo.nx * Lc * Dc, MB = t.x + as.nx * ns, BB = t.y + as.ny * ns, wO = t; }; function DB(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 Y4(e, t, n, r) { var a = 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 } : (Kye(e, t, n, r, a), { cx: YC, cy: ZC, radius: Lc, startX: MB, startY: BB, stopX: QC, stopY: JC, startAngle: as.ang + Math.PI / 2 * Dc, endAngle: Vo.ang - Math.PI / 2 * Dc, counterClockwise: ry }); } var La = {}; La.findMidptPtsEtc = function(e, t) { var n = t.posPts, r = t.intersectionPts, a = t.vectorNormInverse, o, i = e.pstyle("source-endpoint"), s = e.pstyle("target-endpoint"), l = i.units != null && s.units != null, u = function(w, k, C, S) { var _ = S - k, T = C - w, O = Math.sqrt(T * T + _ * _); return { x: -_ / O, y: T / O }; }, c = e.pstyle("edge-distances").value; switch (c) { case "node-position": o = n; break; case "intersection": o = r; break; case "endpoints": { if (l) { var d = this.manualEndptToPx(e.source()[0], i), f = _i(d, 2), h = f[0], p = f[1], v = this.manualEndptToPx(e.target()[0], s), m = _i(v, 2), g = m[0], y = m[1], x = { x1: h, y1: p, x2: g, y2: y }; a = u(h, p, g, y), o = x; } else Fn("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).")), o = r; break; } } return { midptPts: o, vectorNormInverse: a }; }; La.findHaystackPoints = function(e) { for (var t = 0; t < e.length; t++) { var n = e[t], r = n._private, a = r.rscratch; if (!a.haystack) { var o = Math.random() * 2 * Math.PI; a.source = { x: Math.cos(o), y: Math.sin(o) }, o = Math.random() * 2 * Math.PI, a.target = { x: Math.cos(o), y: Math.sin(o) }; } var i = r.source, s = r.target, l = i.position(), u = s.position(), c = i.width(), d = s.width(), f = i.height(), h = s.height(), p = n.pstyle("haystack-radius").value, v = p / 2; a.haystackPts = a.allpts = [a.source.x * c * v + l.x, a.source.y * f * v + l.y, a.target.x * d * v + u.x, a.target.y * h * v + u.y], a.midX = (a.allpts[0] + a.allpts[2]) / 2, a.midY = (a.allpts[1] + a.allpts[3]) / 2, a.edgeType = "haystack", a.haystack = !0, this.storeEdgeProjections(n), this.calculateArrowAngles(n), this.recalculateEdgeLabelProjections(n), this.calculateLabelAngles(n); } }; La.findSegmentsPoints = function(e, t) { var n = e._private.rscratch, r = e.pstyle("segment-weights"), a = e.pstyle("segment-distances"), o = e.pstyle("segment-radii"), i = e.pstyle("radius-type"), s = Math.min(r.pfValue.length, a.pfValue.length), l = o.pfValue[o.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], f = a.pfValue[c], h = 1 - d, p = d, v = this.findMidptPtsEtc(e, t), m = v.midptPts, g = v.vectorNormInverse, y = { x: m.x1 * h + m.x2 * p, y: m.y1 * h + m.y2 * p }; n.segpts.push(y.x + g.x * f, y.y + g.y * f), n.radii.push(o.pfValue[c] !== void 0 ? o.pfValue[c] : l), n.isArcRadius.push((i.pfValue[c] !== void 0 ? i.pfValue[c] : u) === "arc-radius"); } }; La.findLoopPoints = function(e, t, n, r) { var a = e._private.rscratch, o = 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; a.edgeType = "self"; var f = n, h = d; r && (f = 0, h = l); var p = u - Math.PI / 2, v = p - c / 2, m = p + c / 2, g = u + "_" + c; f = o[g] === void 0 ? o[g] = 0 : ++o[g], a.ctrlpts = [i.x + Math.cos(v) * 1.4 * h * (f / 3 + 1), i.y + Math.sin(v) * 1.4 * h * (f / 3 + 1), i.x + Math.cos(m) * 1.4 * h * (f / 3 + 1), i.y + Math.sin(m) * 1.4 * h * (f / 3 + 1)]; }; La.findCompoundLoopPoints = function(e, t, n, r) { var a = e._private.rscratch; a.edgeType = "compound"; var o = 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, f = e.pstyle("control-point-distances"), h = f ? f.pfValue[0] : void 0, p = n, v = d; r && (p = 0, v = h); var m = 50, g = { x: o.x - s / 2, y: o.y - l / 2 }, y = { x: i.x - u / 2, y: i.y - c / 2 }, x = { x: Math.min(g.x, y.x), y: Math.min(g.y, y.y) }, w = 0.5, k = Math.max(w, Math.log(s * 0.01)), C = Math.max(w, Math.log(u * 0.01)); a.ctrlpts = [x.x, x.y - (1 + Math.pow(m, 1.12) / 100) * v * (p / 3 + 1) * k, x.x - (1 + Math.pow(m, 1.12) / 100) * v * (p / 3 + 1) * C, x.y]; }; La.findStraightEdgePoints = function(e) { e._private.rscratch.edgeType = "straight"; }; La.findBezierPoints = function(e, t, n, r, a) { var o = 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], f = r; o.edgeType = f ? "multibezier" : "bezier", o.ctrlpts = []; for (var h = 0; h < u; h++) { var p = (0.5 - t.eles.length / 2 + n) * i * (a ? -1 : 1), v = void 0, m = jM(p); f && (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 : p, y = 1 - d, x = d, w = this.findMidptPtsEtc(e, t), k = w.midptPts, C = w.vectorNormInverse, S = { x: k.x1 * y + k.x2 * x, y: k.y1 * y + k.y2 * x }; o.ctrlpts.push(S.x + C.x * g, S.y + C.y * g); } }; La.findTaxiPoints = function(e, t) { var n = e._private.rscratch; n.edgeType = "segments"; var r = "vertical", a = "horizontal", o = "leftward", i = "rightward", s = "downward", l = "upward", u = "auto", c = t.posPts, d = t.srcW, f = t.srcH, h = t.tgtW, p = t.tgtH, v = e.pstyle("edge-distances").value, m = v !== "node-position", g = e.pstyle("taxi-direction").value, y = g, x = e.pstyle("taxi-turn"), w = x.units === "%", k = x.pfValue, C = k < 0, S = e.pstyle("taxi-turn-min-distance").pfValue, _ = m ? (d + h) / 2 : 0, T = m ? (f + p) / 2 : 0, O = c.x2 - c.x1, $ = c.y2 - c.y1, A = function(ze, Ve) { return ze > 0 ? Math.max(ze - Ve, 0) : Math.min(ze + Ve, 0); }, N = A(O, _), L = A($, T), R = !1; y === u ? g = Math.abs(N) > Math.abs(L) ? a : r : y === l || y === s ? (g = r, R = !0) : (y === o || y === i) && (g = a, R = !0); var P = g === r, B = P ? L : N, M = P ? $ : O, z = jM(M), Z = !1; !(R && (w || C)) && (y === s && M < 0 || y === l && M > 0 || y === o && M > 0 || y === i && M < 0) && (z *= -1, B = z * Math.abs(B), Z = !0); var G; if (w) { var J = k < 0 ? 1 + k : k; G = J * B; } else { var se = k < 0 ? B : 0; G = se + k * z; } var ve = function(ze) { return Math.abs(ze) < S || Math.abs(ze) >= Math.abs(B); }, ge = ve(G), oe = ve(Math.abs(B) - Math.abs(G)), ee = ge || oe; if (ee && !Z) if (P) { var q = Math.abs(M) <= f / 2, Y = Math.abs(O) <= h / 2; if (q) { var te = (c.x1 + c.x2) / 2, we = c.y1, Oe = c.y2; n.segpts = [te, we, te, Oe]; } else if (Y) { var Ne = (c.y1 + c.y2) / 2, xe = c.x1, $e = c.x2; n.segpts = [xe, Ne, $e, Ne]; } else n.segpts = [c.x1, c.y2]; } else { var Se = Math.abs(M) <= d / 2, Pe = Math.abs($) <= p / 2; if (Se) { var Me = (c.y1 + c.y2) / 2, je = c.x1, Be = c.x2; n.segpts = [je, Me, Be, Me]; } else if (Pe) { var We = (c.x1 + c.x2) / 2, qe = c.y1, Ge = c.y2; n.segpts = [We, qe, We, Ge]; } else n.segpts = [c.x2, c.y1]; } else if (P) { var E = c.y1 + G + (m ? f / 2 * z : 0), V = c.x1, ie = c.x2; n.segpts = [V, E, ie, E]; } else { var le = c.x1 + G + (m ? d / 2 * z : 0), re = c.y1, ke = c.y2; n.segpts = [le, re, le, ke]; } if (n.isRound) { var fe = e.pstyle("taxi-radius").value, Ee = e.pstyle("radius-type").value[0] === "arc-radius"; n.radii = new Array(n.segpts.length / 2).fill(fe), n.isArcRadius = new Array(n.segpts.length / 2).fill(Ee); } }; La.tryToCorrectInvalidPoints = function(e, t) { var n = e._private.rscratch; if (n.edgeType === "bezier") { var r = t.srcPos, a = t.tgtPos, o = t.srcW, i = t.srcH, s = t.tgtW, l = t.tgtH, u = t.srcShape, c = t.tgtShape, d = t.srcCornerRadius, f = t.tgtCornerRadius, h = t.srcRs, p = t.tgtRs, v = !ot(n.startX) || !ot(n.startY), m = !ot(n.arrowStartX) || !ot(n.arrowStartY), g = !ot(n.endX) || !ot(n.endY), y = !ot(n.arrowEndX) || !ot(n.arrowEndY), x = 3, w = this.getArrowWidth(e.pstyle("width").pfValue, e.pstyle("arrow-scale").value) * this.arrowShapeWidth, k = x * w, C = bd({ x: n.ctrlpts[0], y: n.ctrlpts[1] }, { x: n.startX, y: n.startY }), S = C < k, _ = bd({ x: n.ctrlpts[0], y: n.ctrlpts[1] }, { x: n.endX, y: n.endY }), T = _ < k, O = !1; if (v || m || S) { O = !0; var $ = { // delta x: n.ctrlpts[0] - r.x, y: n.ctrlpts[1] - r.y }, A = Math.sqrt($.x * $.x + $.y * $.y), N = { // normalised delta x: $.x / A, y: $.y / A }, L = Math.max(o, i), R = { // *2 radius guarantees outside shape x: n.ctrlpts[0] + N.x * 2 * L, y: n.ctrlpts[1] + N.y * 2 * L }, P = u.intersectLine(r.x, r.y, o, i, R.x, R.y, 0, d, h); S ? (n.ctrlpts[0] = n.ctrlpts[0] + N.x * (k - C), n.ctrlpts[1] = n.ctrlpts[1] + N.y * (k - C)) : (n.ctrlpts[0] = P[0] + N.x * k, n.ctrlpts[1] = P[1] + N.y * k); } if (g || y || T) { O = !0; var B = { // delta x: n.ctrlpts[0] - a.x, y: n.ctrlpts[1] - a.y }, M = Math.sqrt(B.x * B.x + B.y * B.y), z = { // normalised delta x: B.x / M, y: B.y / M }, Z = Math.max(o, i), G = { // *2 radius guarantees outside shape x: n.ctrlpts[0] + z.x * 2 * Z, y: n.ctrlpts[1] + z.y * 2 * Z }, J = c.intersectLine(a.x, a.y, s, l, G.x, G.y, 0, f, p); T ? (n.ctrlpts[0] = n.ctrlpts[0] + z.x * (k - _), n.ctrlpts[1] = n.ctrlpts[1] + z.y * (k - _)) : (n.ctrlpts[0] = J[0] + z.x * k, n.ctrlpts[1] = J[1] + z.y * k); } O && this.findEndpoints(e); } }; La.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, a; 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, a = 0.5, t.midX = Ur(t.allpts[r], t.allpts[r + 2], t.allpts[r + 4], a), t.midY = Ur(t.allpts[r + 1], t.allpts[r + 3], t.allpts[r + 5], a)); } 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 o = 2; o + 3 < t.allpts.length; o += 2) { var i = t.radii[o / 2 - 1], s = t.isArcRadius[o / 2 - 1]; t.roundCorners.push(Y4({ x: t.allpts[o - 2], y: t.allpts[o - 1] }, { x: t.allpts[o], y: t.allpts[o + 1], radius: i }, { x: t.allpts[o + 2], y: t.allpts[o + 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] }, f = t.roundCorners[c / 2], h = [d.x - f.cx, d.y - f.cy], p = f.radius / Math.sqrt(Math.pow(h[0], 2) + Math.pow(h[1], 2)); h = h.map(function(v) { return v * p; }), t.midX = f.cx + h[0], t.midY = f.cy + h[1], t.midVector = h; } } } }; La.checkForInvalidEdgeWarning = function(e) { var t = e[0]._private.rscratch; t.nodesOverlap || ot(t.startX) && ot(t.startY) && ot(t.endX) && ot(t.endY) ? t.loggedErr = !1 : t.loggedErr || (t.loggedErr = !0, Fn("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.")); }; La.findEdgeControlPoints = function(e) { var t = this; if (!(!e || e.length === 0)) { for (var n = this, r = n.cy, a = r.hasCompoundNodes(), o = { map: new ds(), get: function(C) { var S = this.map.get(C[0]); return S != null ? S.get(C[1]) : null; }, set: function(C, S) { var _ = this.map.get(C[0]); _ == null && (_ = new ds(), this.map.set(C[0], _)), _.set(C[1], S); } }, 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 f = d === "unbundled-bezier" || d.endsWith("segments") || d === "straight" || d === "straight-triangle" || d.endsWith("taxi"), h = d === "unbundled-bezier" || d === "bezier", p = c.source, v = c.target, m = p.poolIndex(), g = v.poolIndex(), y = [m, g].sort(), x = o.get(y); x == null && (x = { eles: [] }, o.set(y, x), i.push(y)), x.eles.push(u), f && (x.hasUnbundled = !0), h && (x.hasBezier = !0); } } for (var w = function(C) { var S = i[C], _ = o.get(S), T = void 0; if (!_.hasUnbundled) { var O = _.eles[0].parallelEdges().filter(function(ie) { return ie.isBundledBezier(); }); N4(_.eles), O.forEach(function(ie) { return _.eles.push(ie); }), _.eles.sort(function(ie, le) { return ie.poolIndex() - le.poolIndex(); }); } var $ = _.eles[0], A = $.source(), N = $.target(); if (A.poolIndex() > N.poolIndex()) { var L = A; A = N, N = L; } var R = _.srcPos = A.position(), P = _.tgtPos = N.position(), B = _.srcW = A.outerWidth(), M = _.srcH = A.outerHeight(), z = _.tgtW = N.outerWidth(), Z = _.tgtH = N.outerHeight(), G = _.srcShape = n.nodeShapes[t.getNodeShape(A)], J = _.tgtShape = n.nodeShapes[t.getNodeShape(N)], se = _.srcCornerRadius = A.pstyle("corner-radius").value === "auto" ? "auto" : A.pstyle("corner-radius").pfValue, ve = _.tgtCornerRadius = N.pstyle("corner-radius").value === "auto" ? "auto" : N.pstyle("corner-radius").pfValue, ge = _.tgtRs = N._private.rscratch, oe = _.srcRs = A._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 q = _.eles[ee], Y = q[0]._private.rscratch, te = q.pstyle("curve-style").value, we = te === "unbundled-bezier" || te.endsWith("segments") || te.endsWith("taxi"), Oe = !A.same(q.source()); if (!_.calculatedIntersection && A !== N && (_.hasBezier || _.hasUnbundled)) { _.calculatedIntersection = !0; var Ne = G.intersectLine(R.x, R.y, B, M, P.x, P.y, 0, se, oe), xe = _.srcIntn = Ne, $e = J.intersectLine(P.x, P.y, z, Z, R.x, R.y, 0, ve, ge), Se = _.tgtIntn = $e, Pe = _.intersectionPts = { x1: Ne[0], x2: $e[0], y1: Ne[1], y2: $e[1] }, Me = _.posPts = { x1: R.x, x2: P.x, y1: R.y, y2: P.y }, je = $e[1] - Ne[1], Be = $e[0] - Ne[0], We = Math.sqrt(Be * Be + je * je), qe = _.vector = { x: Be, y: je }, Ge = _.vectorNorm = { x: qe.x / We, y: qe.y / We }, E = { x: -Ge.y, y: Ge.x }; _.nodesOverlap = !ot(We) || J.checkPoint(Ne[0], Ne[1], 0, z, Z, P.x, P.y, ve, ge) || G.checkPoint($e[0], $e[1], 0, B, M, R.x, R.y, se, oe), _.vectorNormInverse = E, T = { nodesOverlap: _.nodesOverlap, dirCounts: _.dirCounts, calculatedIntersection: !0, hasBezier: _.hasBezier, hasUnbundled: _.hasUnbundled, eles: _.eles, srcPos: P, tgtPos: R, srcW: z, srcH: Z, tgtW: B, tgtH: M, srcIntn: Se, tgtIntn: xe, srcShape: J, tgtShape: G, posPts: { x1: Me.x2, y1: Me.y2, x2: Me.x1, y2: Me.y1 }, intersectionPts: { x1: Pe.x2, y1: Pe.y2, x2: Pe.x1, y2: Pe.y1 }, vector: { x: -qe.x, y: -qe.y }, vectorNorm: { x: -Ge.x, y: -Ge.y }, vectorNormInverse: { x: -E.x, y: -E.y } }; } var V = Oe ? T : _; Y.nodesOverlap = V.nodesOverlap, Y.srcIntn = V.srcIntn, Y.tgtIntn = V.tgtIntn, Y.isRound = te.startsWith("round"), a && (A.isParent() || A.isChild() || N.isParent() || N.isChild()) && (A.parents().anySame(N) || N.parents().anySame(A) || A.same(N) && A.isParent()) ? t.findCompoundLoopPoints(q, V, ee, we) : A === N ? t.findLoopPoints(q, V, ee, we) : te.endsWith("segments") ? t.findSegmentsPoints(q, V) : te.endsWith("taxi") ? t.findTaxiPoints(q, V) : te === "straight" || !we && _.eles.length % 2 === 1 && ee === Math.floor(_.eles.length / 2) ? t.findStraightEdgePoints(q) : t.findBezierPoints(q, V, ee, we, Oe), t.findEndpoints(q), t.tryToCorrectInvalidPoints(q, V), t.checkForInvalidEdgeWarning(q), t.storeAllpts(q), t.storeEdgeProjections(q), t.calculateArrowAngles(q), t.recalculateEdgeLabelProjections(q), t.calculateLabelAngles(q); } }, k = 0; k < i.length; k++) w(k); this.findHaystackPoints(s); } }; function RB(e) { var t = []; if (e != null) { for (var n = 0; n < e.length; n += 2) { var r = e[n], a = e[n + 1]; t.push({ x: r, y: a }); } return t; } } La.getSegmentPoints = function(e) { var t = e[0]._private.rscratch, n = t.edgeType; if (n === "segments") return this.recalculateRenderedStyle(e), RB(t.segpts); }; La.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), RB(t.ctrlpts); }; La.getEdgeMidpoint = function(e) { var t = e[0]._private.rscratch; return this.recalculateRenderedStyle(e), { x: t.midX, y: t.midY }; }; var zg = {}; zg.manualEndptToPx = function(e, t) { var n = this, r = e.position(), a = e.outerWidth(), o = 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] * a), t.units[1] === "%" && (s[1] = s[1] * o), 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(a, o), c = [r.x + Math.cos(l) * u, r.y + Math.sin(l) * u]; return n.nodeShapes[this.getNodeShape(e)].intersectLine(r.x, r.y, a, o, c[0], c[1], 0, e.pstyle("corner-radius").value === "auto" ? "auto" : e.pstyle("corner-radius").pfValue, i); } }; zg.findEndpoints = function(e) { var t = this, n, r = e.source()[0], a = e.target()[0], o = r.position(), i = a.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, f = a._private.rscratch, h = e.pstyle("curve-style").value, p = e._private.rscratch, v = p.edgeType, m = h === "taxi", g = v === "self" || v === "compound", y = v === "bezier" || v === "multibezier" || g, x = v !== "bezier", w = v === "straight" || v === "segments", k = v === "segments", C = y || x || w, S = g || m, _ = e.pstyle("source-endpoint"), T = S ? "outside-to-node" : _.value, O = r.pstyle("corner-radius").value === "auto" ? "auto" : r.pstyle("corner-radius").pfValue, $ = e.pstyle("target-endpoint"), A = S ? "outside-to-node" : $.value, N = a.pstyle("corner-radius").value === "auto" ? "auto" : a.pstyle("corner-radius").pfValue; p.srcManEndpt = _, p.tgtManEndpt = $; var L, R, P, B; if (y) { var M = [p.ctrlpts[0], p.ctrlpts[1]], z = x ? [p.ctrlpts[p.ctrlpts.length - 2], p.ctrlpts[p.ctrlpts.length - 1]] : M; L = z, R = M; } else if (w) { var Z = k ? p.segpts.slice(0, 2) : [i.x, i.y], G = k ? p.segpts.slice(p.segpts.length - 2) : [o.x, o.y]; L = G, R = Z; } if (A === "inside-to-node") n = [i.x, i.y]; else if ($.units) n = this.manualEndptToPx(a, $); else if (A === "outside-to-line") n = p.tgtIntn; else if (A === "outside-to-node" || A === "outside-to-node-or-label" ? P = L : (A === "outside-to-line" || A === "outside-to-line-or-label") && (P = [o.x, o.y]), n = t.nodeShapes[this.getNodeShape(a)].intersectLine(i.x, i.y, a.outerWidth(), a.outerHeight(), P[0], P[1], 0, N, f), A === "outside-to-node-or-label" || A === "outside-to-line-or-label") { var J = a._private.rscratch, se = J.labelWidth, ve = J.labelHeight, ge = J.labelX, oe = J.labelY, ee = se / 2, q = ve / 2, Y = a.pstyle("text-valign").value; Y === "top" ? oe -= q : Y === "bottom" && (oe += q); var te = a.pstyle("text-halign").value; te === "left" ? ge -= ee : te === "right" && (ge += ee); var we = T0(P[0], P[1], [ge - ee, oe - q, ge + ee, oe - q, ge + ee, oe + q, ge - ee, oe + q], i.x, i.y); if (we.length > 0) { var Oe = o, Ne = Ic(Oe, Gp(n)), xe = Ic(Oe, Gp(we)), $e = Ne; if (xe < Ne && (n = we, $e = xe), we.length > 2) { var Se = Ic(Oe, { x: we[2], y: we[3] }); Se < $e && (n = [we[2], we[3]]); } } } var Pe = Hm(n, L, t.arrowShapes[s].spacing(e) + u), Me = Hm(n, L, t.arrowShapes[s].gap(e) + u); if (p.endX = Me[0], p.endY = Me[1], p.arrowEndX = Pe[0], p.arrowEndY = Pe[1], T === "inside-to-node") n = [o.x, o.y]; else if (_.units) n = this.manualEndptToPx(r, _); else if (T === "outside-to-line") n = p.srcIntn; else if (T === "outside-to-node" || T === "outside-to-node-or-label" ? B = R : (T === "outside-to-line" || T === "outside-to-line-or-label") && (B = [i.x, i.y]), n = t.nodeShapes[this.getNodeShape(r)].intersectLine(o.x, o.y, r.outerWidth(), r.outerHeight(), B[0], B[1], 0, O, d), T === "outside-to-node-or-label" || T === "outside-to-line-or-label") { var je = r._private.rscratch, Be = je.labelWidth, We = je.labelHeight, qe = je.labelX, Ge = je.labelY, E = Be / 2, V = We / 2, ie = r.pstyle("text-valign").value; ie === "top" ? Ge -= V : ie === "bottom" && (Ge += V); var le = r.pstyle("text-halign").value; le === "left" ? qe -= E : le === "right" && (qe += E); var re = T0(B[0], B[1], [qe - E, Ge - V, qe + E, Ge - V, qe + E, Ge + V, qe - E, Ge + V], o.x, o.y); if (re.length > 0) { var ke = i, fe = Ic(ke, Gp(n)), Ee = Ic(ke, Gp(re)), ze = fe; if (Ee < fe && (n = [re[0], re[1]], ze = Ee), re.length > 2) { var Ve = Ic(ke, { x: re[2], y: re[3] }); Ve < ze && (n = [re[2], re[3]]); } } } var me = Hm(n, R, t.arrowShapes[l].spacing(e) + c), _e = Hm(n, R, t.arrowShapes[l].gap(e) + c); p.startX = _e[0], p.startY = _e[1], p.arrowStartX = me[0], p.arrowStartY = me[1], C && (!ot(p.startX) || !ot(p.startY) || !ot(p.endX) || !ot(p.endY) ? p.badLine = !0 : p.badLine = !1); }; zg.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 }; } }; zg.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 Z4 = {}; function Gye(e, t, n) { for (var r = function(l, u, c, d) { return Ur(l, u, c, d); }, a = t._private, o = a.rstyle.bezierPts, i = 0; i < e.bezierProjPcts.length; i++) { var s = e.bezierProjPcts[i]; o.push({ x: r(n[0], n[2], n[4], s), y: r(n[1], n[3], n[5], s) }); } } Z4.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 a = 0; a + 5 < n.allpts.length; a += 4) Gye(this, e, n.allpts.slice(a, a + 6)); } else if (r === "segments") for (var o = t.rstyle.linePts = [], a = 0; a + 1 < n.allpts.length; a += 2) o.push({ x: n.allpts[a], y: n.allpts[a + 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; }; Z4.recalculateEdgeProjections = function(e) { this.findEdgeControlPoints(e); }; var Ms = {}; Ms.recalculateNodeLabelProjection = function(e) { var t = e.pstyle("label").strValue; if (!zu(t)) { var n, r, a = e._private, o = e.width(), i = e.height(), s = e.padding(), l = e.position(), u = e.pstyle("text-halign").strValue, c = e.pstyle("text-valign").strValue, d = a.rscratch, f = a.rstyle; switch (u) { case "left": n = l.x - o / 2 - s; break; case "right": n = l.x + o / 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, f.labelX = n, f.labelY = r, this.calculateLabelAngles(e), this.applyLabelDimensions(e); } }; var zB = function(e, t) { var n = Math.atan(t / e); return e === 0 && n < 0 && (n = n * -1), n; }, VB = function(e, t) { var n = t.x - e.x, r = t.y - e.y; return zB(n, r); }, Xye = function(e, t, n, r) { var a = _0(0, r - 1e-3, 1), o = _0(0, r + 1e-3, 1), i = tf(e, t, n, a), s = tf(e, t, n, o); return VB(i, s); }; Ms.recalculateEdgeLabelProjections = function(e) { var t, n = e._private, r = n.rscratch, a = this, o = { mid: e.pstyle("label").strValue, source: e.pstyle("source-label").strValue, target: e.pstyle("target-label").strValue }; if (o.mid || o.source || o.target) { t = { x: r.midX, y: r.midY }; var i = function(c, d, f) { mu(n.rscratch, c, d, f), mu(n.rstyle, c, d, f); }; i("labelX", null, t.x), i("labelY", null, t.y); var s = zB(r.midDispX, r.midDispY); i("labelAutoAngle", null, s); var l = function c() { if (c.cache) return c.cache; for (var d = [], f = 0; f + 5 < r.allpts.length; f += 4) { var h = { x: r.allpts[f], y: r.allpts[f + 1] }, p = { x: r.allpts[f + 2], y: r.allpts[f + 3] }, v = { x: r.allpts[f + 4], y: r.allpts[f + 5] }; d.push({ p0: h, p1: p, p2: v, startDist: 0, length: 0, segments: [] }); } var m = n.rstyle.bezierPts, g = a.bezierProjPcts.length; function y(S, _, T, O, $) { var A = bd(_, T), N = S.segments[S.segments.length - 1], L = { p0: _, p1: T, t0: O, t1: $, startDist: N ? N.startDist + N.length : 0, length: A }; S.segments.push(L), S.length += A; } for (var x = 0; x < d.length; x++) { var w = d[x], k = d[x - 1]; k && (w.startDist = k.startDist + k.length), y(w, w.p0, m[x * g], 0, a.bezierProjPcts[0]); for (var C = 0; C < g - 1; C++) y(w, m[x * g + C], m[x * g + C + 1], a.bezierProjPcts[C], a.bezierProjPcts[C + 1]); y(w, m[x * g + g - 1], w.p2, a.bezierProjPcts[g - 1], 1); } return c.cache = d; }, u = function(c) { var d, f = c === "source"; if (o[c]) { var h = e.pstyle(c + "-text-offset").pfValue; switch (r.edgeType) { case "self": case "compound": case "bezier": case "multibezier": { for (var p = l(), v, m = 0, g = 0, y = 0; y < p.length; y++) { for (var x = p[f ? y : p.length - 1 - y], w = 0; w < x.segments.length; w++) { var k = x.segments[f ? w : x.segments.length - 1 - w], C = y === p.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 S = v.cp, _ = v.segment, T = (h - m) / _.length, O = _.t1 - _.t0, $ = f ? _.t0 + O * T : _.t1 - O * T; $ = _0(0, $, 1), t = tf(S.p0, S.p1, S.p2, $), d = Xye(S.p0, S.p1, S.p2, $); break; } case "straight": case "segments": case "haystack": { for (var A = 0, N, L, R, P, B = r.allpts.length, M = 0; M + 3 < B && (f ? (R = { x: r.allpts[M], y: r.allpts[M + 1] }, P = { x: r.allpts[M + 2], y: r.allpts[M + 3] }) : (R = { x: r.allpts[B - 2 - M], y: r.allpts[B - 1 - M] }, P = { x: r.allpts[B - 4 - M], y: r.allpts[B - 3 - M] }), N = bd(R, P), L = A, A += N, !(A >= h)); M += 2) ; var z = h - L, Z = z / N; Z = _0(0, Z, 1), t = e0e(R, P, Z), d = VB(R, P); break; } } i("labelX", c, t.x), i("labelY", c, t.y), i("labelAutoAngle", c, d); } }; u("source"), u("target"), this.applyLabelDimensions(e); } }; Ms.applyLabelDimensions = function(e) { this.applyPrefixedLabelDimensions(e), e.isEdge() && (this.applyPrefixedLabelDimensions(e, "source"), this.applyPrefixedLabelDimensions(e, "target")); }; Ms.applyPrefixedLabelDimensions = function(e, t) { var n = e._private, r = this.getLabelText(e, t), a = this.calculateLabelDimensions(e, r), o = e.pstyle("line-height").pfValue, i = e.pstyle("text-wrap").strValue, s = Ii(n.rscratch, "labelWrapCachedLines", t) || [], l = i !== "wrap" ? 1 : Math.max(s.length, 1), u = a.height / l, c = u * o, d = a.width, f = a.height + (l - 1) * (o - 1) * u; mu(n.rstyle, "labelWidth", t, d), mu(n.rscratch, "labelWidth", t, d), mu(n.rstyle, "labelHeight", t, f), mu(n.rscratch, "labelHeight", t, f), mu(n.rscratch, "labelLineHeight", t, c); }; Ms.getLabelText = function(e, t) { var n = e._private, r = t ? t + "-" : "", a = e.pstyle(r + "label").strValue, o = e.pstyle("text-transform").value, i = function(J, se) { return se ? (mu(n.rscratch, J, t, se), se) : Ii(n.rscratch, J, t); }; if (!a) return ""; o == "none" || (o == "uppercase" ? a = a.toUpperCase() : o == "lowercase" && (a = a.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 = a.split(` `), d = e.pstyle("text-max-width").pfValue, f = e.pstyle("text-overflow-wrap").value, h = f === "anywhere", p = [], v = /[\s\u200b]+|$/g, m = 0; m < c.length; m++) { var g = c[m], y = this.calculateLabelDimensions(e, g), x = y.width; if (h) { var w = g.split("").join(u); g = w; } if (x > d) { var k = g.matchAll(v), C = "", S = 0, _ = SM(k), T; try { for (_.s(); !(T = _.n()).done; ) { var O = T.value, $ = O[0], A = g.substring(S, O.index); S = O.index + $.length; var N = C.length === 0 ? A : C + A + $, L = this.calculateLabelDimensions(e, N), R = L.width; R <= d ? C += A + $ : (C && p.push(C), C = A + $); } } catch (J) { _.e(J); } finally { _.f(); } C.match(/^[\s\u200b]+$/) || p.push(C); } else p.push(g); } i("labelWrapCachedLines", p), a = i("labelWrapCachedText", p.join(` `)), i("labelWrapKey", l); } else if (s === "ellipsis") { var P = e.pstyle("text-max-width").pfValue, B = "", M = "…", z = !1; if (this.calculateLabelDimensions(e, a).width < P) return a; for (var Z = 0; Z < a.length; Z++) { var G = this.calculateLabelDimensions(e, B + a[Z] + M).width; if (G > P) break; B += a[Z], Z === a.length - 1 && (z = !0); } return z || (B += M), B; } return a; }; Ms.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; }; Ms.calculateLabelDimensions = function(e, t) { var n = this, r = n.cy.window(), a = r.document, o = yd(t, e._private.labelDimsKey), i = n.labelDimCache || (n.labelDimCache = []), s = i[o]; 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, f = e.pstyle("font-weight").strValue, h = this.labelCalcCanvas, p = this.labelCalcCanvasContext; if (!h) { h = this.labelCalcCanvas = a.createElement("canvas"), p = 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"; } p.font = "".concat(u, " ").concat(f, " ").concat(c, "px ").concat(d); for (var m = 0, g = 0, y = t.split(` `), x = 0; x < y.length; x++) { var w = y[x], k = p.measureText(w), C = Math.ceil(k.width), S = c; m = Math.max(C, m), g += S; } return m += l, g += l, i[o] = { width: m, height: g }; }; Ms.calculateLabelAngle = function(e, t) { var n = e._private, r = n.rscratch, a = e.isEdge(), o = t ? t + "-" : "", i = e.pstyle(o + "text-rotation"), s = i.strValue; return s === "none" ? 0 : a && s === "autorotate" ? r.labelAutoAngle : s === "autorotate" ? 0 : i.pfValue; }; Ms.calculateLabelAngles = function(e) { var t = this, n = e.isEdge(), r = e._private, a = r.rscratch; a.labelAngle = t.calculateLabelAngle(e), n && (a.sourceLabelAngle = t.calculateLabelAngle(e, "source"), a.targetLabelAngle = t.calculateLabelAngle(e, "target")); }; var jB = {}, kO = 28, CO = !1; jB.getNodeShape = function(e) { var t = this, n = e.pstyle("shape").value; if (n === "cutrectangle" && (e.width() < kO || e.height() < kO)) return CO || (Fn("The `cutrectangle` node shape can not be used at small sizes so `rectangle` is used instead"), CO = !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 Z2 = {}; Z2.registerCalculationListeners = function() { var e = this.cy, t = e.collection(), n = this, r = function(o) { var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0; if (t.merge(o), i) for (var s = 0; s < o.length; s++) { var l = o[s], u = l._private, c = u.rstyle; c.clean = !1, c.cleanConnected = !1; } }; n.binder(e).on("bounds.* dirty.*", function(o) { var i = o.target; r(i); }).on("style.* background.*", function(o) { var i = o.target; r(i, !1); }); var a = function(o) { if (o) { 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(o, t); } n.recalculateRenderedStyle(t), t = e.collection(); } }; n.flushRenderedStyleQueue = function() { a(!0); }, n.beforeRender(a, n.beforeRenderPriorities.eleCalcs); }; Z2.onUpdateEleCalcs = function(e) { var t = this.onUpdateEleCalcsFns = this.onUpdateEleCalcsFns || []; t.push(e); }; Z2.recalculateRenderedStyle = function(e, t) { var n = function(x) { return x._private.rstyle.cleanConnected; }, r = [], a = []; if (!this.destroyed) { t === void 0 && (t = !0); for (var o = 0; o < e.length; o++) { var i = e[o], 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" ? a.push(i) : r.push(i), l.clean = !0); } for (var u = 0; u < a.length; u++) { var c = a[u], d = c._private, f = d.rstyle, h = c.position(); this.recalculateNodeLabelProjection(c), f.nodeX = h.x, f.nodeY = h.y, f.nodeW = c.pstyle("width").pfValue, f.nodeH = c.pstyle("height").pfValue; } this.recalculateEdgeProjections(r); for (var p = 0; p < r.length; p++) { var v = r[p], m = v._private, g = m.rstyle, y = m.rscratch; g.srcX = y.arrowStartX, g.srcY = y.arrowStartY, g.tgtX = y.arrowEndX, g.tgtY = y.arrowEndY, g.midX = y.midX, g.midY = y.midY, g.labelAngle = y.labelAngle, g.sourceLabelAngle = y.sourceLabelAngle, g.targetLabelAngle = y.targetLabelAngle; } } }; var Q2 = {}; Q2.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], a = r._private.rscratch; r.grabbed() && !r.isParent() ? t.push(r) : a.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); } } }; Q2.invalidateCachedZSortedEles = function() { this.cachedZSortedEles = null; }; Q2.getCachedZSortedEles = function(e) { if (e || !this.cachedZSortedEles) { var t = this.cy.mutableElements().toArray(); t.sort(EB), t.interactive = t.filter(function(n) { return n.interactive(); }), this.cachedZSortedEles = t, this.updateCachedGrabbedEles(); } else t = this.cachedZSortedEles; return t; }; var HB = {}; [Qd, rb, La, zg, Z4, Ms, jB, Z2, Q2].forEach(function(e) { Ft(HB, e); }); var UB = {}; UB.getCachedImage = function(e, t, n) { var r = this, a = r.imageCache = r.imageCache || {}, o = a[e]; if (o) return o.image.complete || o.image.addEventListener("load", n), o.image; o = a[e] = a[e] || {}; var i = o.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 bh = {}; bh.registerBinding = function(e, t, n, r) { var a = Array.prototype.slice.apply(arguments, [1]), o = this.binder(e); return o.on.apply(o, a); }; bh.binder = function(e) { var t = this, n = t.cy.window(), r = e === n || e === n.document || e === n.document.body || yhe(e); if (t.supportsPassiveEvents == null) { var a = !1; try { var o = Object.defineProperty({}, "passive", { get: function() { return a = !0, !0; } }); n.addEventListener("test", null, o); } catch { } t.supportsPassiveEvents = a; } 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 }; }; bh.nodeIsDraggable = function(e) { return e && e.isNode() && !e.locked() && e.grabbable(); }; bh.nodeIsGrabbable = function(e) { return this.nodeIsDraggable(e) && e.interactive(); }; bh.load = function() { var e = this, t = e.cy.window(), n = function(E) { return E.selected(); }, r = function(E, V, ie, le) { E == null && (E = e.cy); for (var re = 0; re < V.length; re++) { var ke = V[re]; E.emit({ originalEvent: ie, type: ke, position: le }); } }, a = function(E) { return E.shiftKey || E.metaKey || E.ctrlKey; }, o = function(E, V) { var ie = !0; if (e.cy.hasCompoundNodes() && E && E.pannable()) for (var le = 0; V && le < V.length; le++) { var E = V[le]; if (E.isNode() && E.isParent() && !E.pannable()) { ie = !1; break; } } else ie = !0; return ie; }, i = function(E) { E[0]._private.grabbed = !0; }, s = function(E) { E[0]._private.grabbed = !1; }, l = function(E) { E[0]._private.rscratch.inDragLayer = !0; }, u = function(E) { E[0]._private.rscratch.inDragLayer = !1; }, c = function(E) { E[0]._private.rscratch.isGrabTarget = !0; }, d = function(E) { E[0]._private.rscratch.isGrabTarget = !1; }, f = function(E, V) { var ie = V.addToList, le = ie.has(E); !le && E.grabbable() && !E.locked() && (ie.merge(E), i(E)); }, h = function(E, V) { if (E.cy().hasCompoundNodes() && !(V.inDragLayer == null && V.addToList == null)) { var ie = E.descendants(); V.inDragLayer && (ie.forEach(l), ie.connectedEdges().forEach(l)), V.addToList && f(ie, V); } }, p = function(E, V) { V = V || {}; var ie = E.cy().hasCompoundNodes(); V.inDragLayer && (E.forEach(l), E.neighborhood().stdFilter(function(le) { return !ie || le.isEdge(); }).forEach(l)), V.addToList && E.forEach(function(le) { f(le, V); }), h(E, V), g(E, { inDragLayer: V.inDragLayer }), e.updateCachedGrabbedEles(); }, v = p, m = function(E) { E && (e.getCachedZSortedEles().forEach(function(V) { s(V), u(V), d(V); }), e.updateCachedGrabbedEles()); }, g = function(E, V) { if (!(V.inDragLayer == null && V.addToList == null) && E.cy().hasCompoundNodes()) { var ie = E.ancestors().orphans(); if (!ie.same(E)) { var le = ie.descendants().spawnSelf().merge(ie).unmerge(E).unmerge(E.descendants()), re = le.connectedEdges(); V.inDragLayer && (re.forEach(l), le.forEach(l)), V.addToList && le.forEach(function(ke) { f(ke, V); }); } } }, y = 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(E) { for (var V = 0; V < E.length; V++) { var ie = E[V], le = ie.removedNodes; if (le) for (var re = 0; re < le.length; re++) { var ke = le[re]; if (ke === e.container) { e.destroy(); break; } } } }), e.container.parentNode && e.removeObserver.observe(e.container.parentNode, { childList: !0 })) : e.registerBinding(e.container, "DOMNodeRemoved", function(E) { e.destroy(); }); var k = B2(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(E, V) { for (; E != null; ) V(E), E = E.parentNode; }, S = function() { e.invalidateContainerClientCoordsCache(); }; C(e.container, function(E) { e.registerBinding(E, "transitionend", S), e.registerBinding(E, "animationend", S), e.registerBinding(E, "scroll", S); }), e.registerBinding(e.container, "contextmenu", function(E) { E.preventDefault(); }); var _ = function() { return e.selection[4] !== 0; }, T = function(E) { for (var V = e.findContainerClientCoords(), ie = V[0], le = V[1], re = V[2], ke = V[3], fe = E.touches ? E.touches : [E], Ee = !1, ze = 0; ze < fe.length; ze++) { var Ve = fe[ze]; if (ie <= Ve.clientX && Ve.clientX <= ie + re && le <= Ve.clientY && Ve.clientY <= le + ke) { Ee = !0; break; } } if (!Ee) return !1; for (var me = e.container, _e = E.target, Ce = _e.parentNode, Le = !1; Ce; ) { if (Ce === me) { Le = !0; break; } Ce = Ce.parentNode; } return !!Le; }; e.registerBinding(e.container, "mousedown", function(E) { if (T(E) && !(e.hoverData.which === 1 && E.which !== 1)) { E.preventDefault(), y(), e.hoverData.capture = !0, e.hoverData.which = E.which; var V = e.cy, ie = [E.clientX, E.clientY], le = e.projectIntoViewport(ie[0], ie[1]), re = e.selection, ke = e.findNearestElements(le[0], le[1], !0, !1), fe = ke[0], Ee = e.dragData.possibleDragElements; e.hoverData.mdownPos = le, e.hoverData.mdownGPos = ie; var ze = function() { e.hoverData.tapholdCancelled = !1, clearTimeout(e.hoverData.tapholdTimeout), e.hoverData.tapholdTimeout = setTimeout(function() { if (!e.hoverData.tapholdCancelled) { var Le = e.hoverData.down; Le ? Le.emit({ originalEvent: E, type: "taphold", position: { x: le[0], y: le[1] } }) : V.emit({ originalEvent: E, type: "taphold", position: { x: le[0], y: le[1] } }); } }, e.tapholdDuration); }; if (E.which == 3) { e.hoverData.cxtStarted = !0; var Ve = { originalEvent: E, type: "cxttapstart", position: { x: le[0], y: le[1] } }; fe ? (fe.activate(), fe.emit(Ve), e.hoverData.down = fe) : V.emit(Ve), e.hoverData.downTime = (/* @__PURE__ */ new Date()).getTime(), e.hoverData.cxtDragged = !1; } else if (E.which == 1) { fe && fe.activate(); { if (fe != null && e.nodeIsGrabbable(fe)) { var me = function(Le) { return { originalEvent: E, type: Le, position: { x: le[0], y: le[1] } }; }, _e = function(Le) { Le.emit(me("grab")); }; if (c(fe), !fe.selected()) Ee = e.dragData.possibleDragElements = V.collection(), v(fe, { addToList: Ee }), fe.emit(me("grabon")).emit(me("grab")); else { Ee = e.dragData.possibleDragElements = V.collection(); var Ce = V.$(function(Le) { return Le.isNode() && Le.selected() && e.nodeIsGrabbable(Le); }); p(Ce, { addToList: Ee }), fe.emit(me("grabon")), Ce.forEach(_e); } e.redrawHint("eles", !0), e.redrawHint("drag", !0); } e.hoverData.down = fe, e.hoverData.downs = ke, e.hoverData.downTime = (/* @__PURE__ */ new Date()).getTime(); } r(fe, ["mousedown", "tapstart", "vmousedown"], E, { x: le[0], y: le[1] }), fe == null ? (re[4] = 1, e.data.bgActivePosistion = { x: le[0], y: le[1] }, e.redrawHint("select", !0), e.redraw()) : fe.pannable() && (re[4] = 1), ze(); } re[0] = re[2] = le[0], re[1] = re[3] = le[1]; } }, !1), e.registerBinding(t, "mousemove", function(E) { var V = e.hoverData.capture; if (!(!V && !T(E))) { var ie = !1, le = e.cy, re = le.zoom(), ke = [E.clientX, E.clientY], fe = e.projectIntoViewport(ke[0], ke[1]), Ee = e.hoverData.mdownPos, ze = e.hoverData.mdownGPos, Ve = e.selection, me = null; !e.hoverData.draggingEles && !e.hoverData.dragging && !e.hoverData.selecting && (me = e.findNearestElement(fe[0], fe[1], !0, !1)); var _e = e.hoverData.last, Ce = e.hoverData.down, Le = [fe[0] - Ve[2], fe[1] - Ve[3]], yt = e.dragData.possibleDragElements, dt; if (ze) { var _t = ke[0] - ze[0], bt = _t * _t, Ct = ke[1] - ze[1], nn = Ct * Ct, Dt = bt + nn; e.hoverData.isOverThresholdDrag = dt = Dt >= e.desktopTapThreshold2; } var Kt = a(E); dt && (e.hoverData.tapholdCancelled = !0); var on = function() { var _n = e.hoverData.dragDelta = e.hoverData.dragDelta || []; _n.length === 0 ? (_n.push(Le[0]), _n.push(Le[1])) : (_n[0] += Le[0], _n[1] += Le[1]); }; ie = !0, r(me, ["mousemove", "vmousemove", "tapdrag"], E, { x: fe[0], y: fe[1] }); var rn = function() { e.data.bgActivePosistion = void 0, e.hoverData.selecting || le.emit({ originalEvent: E, type: "boxstart", position: { x: fe[0], y: fe[1] } }), Ve[4] = 1, e.hoverData.selecting = !0, e.redrawHint("select", !0), e.redraw(); }; if (e.hoverData.which === 3) { if (dt) { var Qt = { originalEvent: E, type: "cxtdrag", position: { x: fe[0], y: fe[1] } }; Ce ? Ce.emit(Qt) : le.emit(Qt), e.hoverData.cxtDragged = !0, (!e.hoverData.cxtOver || me !== e.hoverData.cxtOver) && (e.hoverData.cxtOver && e.hoverData.cxtOver.emit({ originalEvent: E, type: "cxtdragout", position: { x: fe[0], y: fe[1] } }), e.hoverData.cxtOver = me, me && me.emit({ originalEvent: E, type: "cxtdragover", position: { x: fe[0], y: fe[1] } })); } } else if (e.hoverData.dragging) { if (ie = !0, le.panningEnabled() && le.userPanningEnabled()) { var Sn; if (e.hoverData.justStartedPan) { var En = e.hoverData.mdownPos; Sn = { x: (fe[0] - En[0]) * re, y: (fe[1] - En[1]) * re }, e.hoverData.justStartedPan = !1; } else Sn = { x: Le[0] * re, y: Le[1] * re }; le.panBy(Sn), le.emit("dragpan"), e.hoverData.dragged = !0; } fe = e.projectIntoViewport(E.clientX, E.clientY); } else if (Ve[4] == 1 && (Ce == null || Ce.pannable())) { if (dt) { if (!e.hoverData.dragging && le.boxSelectionEnabled() && (Kt || !le.panningEnabled() || !le.userPanningEnabled())) rn(); else if (!e.hoverData.selecting && le.panningEnabled() && le.userPanningEnabled()) { var pn = o(Ce, e.hoverData.downs); pn && (e.hoverData.dragging = !0, e.hoverData.justStartedPan = !0, Ve[4] = 0, e.data.bgActivePosistion = Gp(Ee), e.redrawHint("select", !0), e.redraw()); } Ce && Ce.pannable() && Ce.active() && Ce.unactivate(); } } else { if (Ce && Ce.pannable() && Ce.active() && Ce.unactivate(), (!Ce || !Ce.grabbed()) && me != _e && (_e && r(_e, ["mouseout", "tapdragout"], E, { x: fe[0], y: fe[1] }), me && r(me, ["mouseover", "tapdragover"], E, { x: fe[0], y: fe[1] }), e.hoverData.last = me), Ce) if (dt) { if (le.boxSelectionEnabled() && Kt) Ce && Ce.grabbed() && (m(yt), Ce.emit("freeon"), yt.emit("free"), e.dragData.didDrag && (Ce.emit("dragfreeon"), yt.emit("dragfree"))), rn(); else if (Ce && Ce.grabbed() && e.nodeIsDraggable(Ce)) { var St = !e.dragData.didDrag; St && e.redrawHint("eles", !0), e.dragData.didDrag = !0, e.hoverData.draggingEles || p(yt, { inDragLayer: !0 }); var Rt = { x: 0, y: 0 }; if (ot(Le[0]) && ot(Le[1]) && (Rt.x += Le[0], Rt.y += Le[1], St)) { var qt = e.hoverData.dragDelta; qt && ot(qt[0]) && ot(qt[1]) && (Rt.x += qt[0], Rt.y += qt[1]); } e.hoverData.draggingEles = !0, yt.silentShift(Rt).emit("position drag"), e.redrawHint("drag", !0), e.redraw(); } } else on(); ie = !0; } if (Ve[2] = fe[0], Ve[3] = fe[1], ie) return E.stopPropagation && E.stopPropagation(), E.preventDefault && E.preventDefault(), !1; } }, !1); var O, $, A; e.registerBinding(t, "mouseup", function(E) { if (!(e.hoverData.which === 1 && E.which !== 1 && e.hoverData.capture)) { var V = e.hoverData.capture; if (V) { e.hoverData.capture = !1; var ie = e.cy, le = e.projectIntoViewport(E.clientX, E.clientY), re = e.selection, ke = e.findNearestElement(le[0], le[1], !0, !1), fe = e.dragData.possibleDragElements, Ee = e.hoverData.down, ze = a(E); if (e.data.bgActivePosistion && (e.redrawHint("select", !0), e.redraw()), e.hoverData.tapholdCancelled = !0, e.data.bgActivePosistion = void 0, Ee && Ee.unactivate(), e.hoverData.which === 3) { var Ve = { originalEvent: E, type: "cxttapend", position: { x: le[0], y: le[1] } }; if (Ee ? Ee.emit(Ve) : ie.emit(Ve), !e.hoverData.cxtDragged) { var me = { originalEvent: E, type: "cxttap", position: { x: le[0], y: le[1] } }; Ee ? Ee.emit(me) : ie.emit(me); } e.hoverData.cxtDragged = !1, e.hoverData.which = null; } else if (e.hoverData.which === 1) { if (r(ke, ["mouseup", "tapend", "vmouseup"], E, { x: le[0], y: le[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(Ee, ["click", "tap", "vclick"], E, { x: le[0], y: le[1] }), $ = !1, E.timeStamp - A <= ie.multiClickDebounceTime() ? (O && clearTimeout(O), $ = !0, A = null, r(Ee, ["dblclick", "dbltap", "vdblclick"], E, { x: le[0], y: le[1] })) : (O = setTimeout(function() { $ || r(Ee, ["oneclick", "onetap", "voneclick"], E, { x: le[0], y: le[1] }); }, ie.multiClickDebounceTime()), A = E.timeStamp)), Ee == null && !e.dragData.didDrag && !e.hoverData.selecting && !e.hoverData.dragged && !a(E) && (ie.$(n).unselect(["tapunselect"]), fe.length > 0 && e.redrawHint("eles", !0), e.dragData.possibleDragElements = fe = ie.collection()), ke == Ee && !e.dragData.didDrag && !e.hoverData.selecting && ke != null && ke._private.selectable && (e.hoverData.dragging || (ie.selectionType() === "additive" || ze ? ke.selected() ? ke.unselect(["tapunselect"]) : ke.select(["tapselect"]) : ze || (ie.$(n).unmerge(ke).unselect(["tapunselect"]), ke.select(["tapselect"]))), e.redrawHint("eles", !0)), e.hoverData.selecting) { var _e = ie.collection(e.getAllInBox(re[0], re[1], re[2], re[3])); e.redrawHint("select", !0), _e.length > 0 && e.redrawHint("eles", !0), ie.emit({ type: "boxend", originalEvent: E, position: { x: le[0], y: le[1] } }); var Ce = function(yt) { return yt.selectable() && !yt.selected(); }; ie.selectionType() === "additive" || ze || ie.$(n).unmerge(_e).unselect(), _e.emit("box").stdFilter(Ce).select().emit("boxselect"), e.redraw(); } if (e.hoverData.dragging && (e.hoverData.dragging = !1, e.redrawHint("select", !0), e.redrawHint("eles", !0), e.redraw()), !re[4]) { e.redrawHint("drag", !0), e.redrawHint("eles", !0); var Le = Ee && Ee.grabbed(); m(fe), Le && (Ee.emit("freeon"), fe.emit("free"), e.dragData.didDrag && (Ee.emit("dragfreeon"), fe.emit("dragfree"))); } } re[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 N = function(E) { if (!e.scrollingPage) { var V = e.cy, ie = V.zoom(), le = V.pan(), re = e.projectIntoViewport(E.clientX, E.clientY), ke = [re[0] * ie + le.x, re[1] * ie + le.y]; if (e.hoverData.draggingEles || e.hoverData.dragging || e.hoverData.cxtStarted || _()) { E.preventDefault(); return; } if (V.panningEnabled() && V.userPanningEnabled() && V.zoomingEnabled() && V.userZoomingEnabled()) { E.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 fe; E.deltaY != null ? fe = E.deltaY / -250 : E.wheelDeltaY != null ? fe = E.wheelDeltaY / 1e3 : fe = E.wheelDelta / 1e3, fe = fe * e.wheelSensitivity; var Ee = E.deltaMode === 1; Ee && (fe *= 33); var ze = V.zoom() * Math.pow(10, fe); E.type === "gesturechange" && (ze = e.gestureStartZoom * E.scale), V.zoom({ level: ze, renderedPosition: { x: ke[0], y: ke[1] } }), V.emit(E.type === "gesturechange" ? "pinchzoom" : "scrollzoom"); } } }; e.registerBinding(e.container, "wheel", N, !0), e.registerBinding(t, "scroll", function(E) { e.scrollingPage = !0, clearTimeout(e.scrollingPageTimeout), e.scrollingPageTimeout = setTimeout(function() { e.scrollingPage = !1; }, 250); }, !0), e.registerBinding(e.container, "gesturestart", function(E) { e.gestureStartZoom = e.cy.zoom(), e.hasTouchStarted || E.preventDefault(); }, !0), e.registerBinding(e.container, "gesturechange", function(E) { e.hasTouchStarted || N(E); }, !0), e.registerBinding(e.container, "mouseout", function(E) { var V = e.projectIntoViewport(E.clientX, E.clientY); e.cy.emit({ originalEvent: E, type: "mouseout", position: { x: V[0], y: V[1] } }); }, !1), e.registerBinding(e.container, "mouseover", function(E) { var V = e.projectIntoViewport(E.clientX, E.clientY); e.cy.emit({ originalEvent: E, type: "mouseover", position: { x: V[0], y: V[1] } }); }, !1); var L, R, P, B, M, z, Z, G, J, se, ve, ge, oe, ee = function(E, V, ie, le) { return Math.sqrt((ie - E) * (ie - E) + (le - V) * (le - V)); }, q = function(E, V, ie, le) { return (ie - E) * (ie - E) + (le - V) * (le - V); }, Y; e.registerBinding(e.container, "touchstart", Y = function(E) { if (e.hasTouchStarted = !0, !!T(E)) { y(), e.touchData.capture = !0, e.data.bgActivePosistion = void 0; var V = e.cy, ie = e.touchData.now, le = e.touchData.earlier; if (E.touches[0]) { var re = e.projectIntoViewport(E.touches[0].clientX, E.touches[0].clientY); ie[0] = re[0], ie[1] = re[1]; } if (E.touches[1]) { var re = e.projectIntoViewport(E.touches[1].clientX, E.touches[1].clientY); ie[2] = re[0], ie[3] = re[1]; } if (E.touches[2]) { var re = e.projectIntoViewport(E.touches[2].clientX, E.touches[2].clientY); ie[4] = re[0], ie[5] = re[1]; } if (E.touches[1]) { e.touchData.singleTouchMoved = !0, m(e.dragData.touchDragEles); var ke = e.findContainerClientCoords(); J = ke[0], se = ke[1], ve = ke[2], ge = ke[3], L = E.touches[0].clientX - J, R = E.touches[0].clientY - se, P = E.touches[1].clientX - J, B = E.touches[1].clientY - se, oe = 0 <= L && L <= ve && 0 <= P && P <= ve && 0 <= R && R <= ge && 0 <= B && B <= ge; var fe = V.pan(), Ee = V.zoom(); M = ee(L, R, P, B), z = q(L, R, P, B), Z = [(L + P) / 2, (R + B) / 2], G = [(Z[0] - fe.x) / Ee, (Z[1] - fe.y) / Ee]; var ze = 200, Ve = ze * ze; if (z < Ve && !E.touches[2]) { var me = e.findNearestElement(ie[0], ie[1], !0, !0), _e = e.findNearestElement(ie[2], ie[3], !0, !0); me && me.isNode() ? (me.activate().emit({ originalEvent: E, type: "cxttapstart", position: { x: ie[0], y: ie[1] } }), e.touchData.start = me) : _e && _e.isNode() ? (_e.activate().emit({ originalEvent: E, type: "cxttapstart", position: { x: ie[0], y: ie[1] } }), e.touchData.start = _e) : V.emit({ originalEvent: E, type: "cxttapstart", position: { x: ie[0], y: ie[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 (E.touches[2]) V.boxSelectionEnabled() && E.preventDefault(); else if (!E.touches[1] && E.touches[0]) { var Ce = e.findNearestElements(ie[0], ie[1], !0, !0), Le = Ce[0]; if (Le != null && (Le.activate(), e.touchData.start = Le, e.touchData.starts = Ce, e.nodeIsGrabbable(Le))) { var yt = e.dragData.touchDragEles = V.collection(), dt = null; e.redrawHint("eles", !0), e.redrawHint("drag", !0), Le.selected() ? (dt = V.$(function(Dt) { return Dt.selected() && e.nodeIsGrabbable(Dt); }), p(dt, { addToList: yt })) : v(Le, { addToList: yt }), c(Le); var _t = function(Dt) { return { originalEvent: E, type: Dt, position: { x: ie[0], y: ie[1] } }; }; Le.emit(_t("grabon")), dt ? dt.forEach(function(Dt) { Dt.emit(_t("grab")); }) : Le.emit(_t("grab")); } r(Le, ["touchstart", "tapstart", "vmousedown"], E, { x: ie[0], y: ie[1] }), Le == null && (e.data.bgActivePosistion = { x: re[0], y: re[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"], E, { x: ie[0], y: ie[1] }); }, e.tapholdDuration); } if (E.touches.length >= 1) { for (var bt = e.touchData.startPosition = [null, null, null, null, null, null], Ct = 0; Ct < ie.length; Ct++) bt[Ct] = le[Ct] = ie[Ct]; var nn = E.touches[0]; e.touchData.startGPosition = [nn.clientX, nn.clientY]; } } }, !1); var te; e.registerBinding(t, "touchmove", te = function(E) { var V = e.touchData.capture; if (!(!V && !T(E))) { var ie = e.selection, le = e.cy, re = e.touchData.now, ke = e.touchData.earlier, fe = le.zoom(); if (E.touches[0]) { var Ee = e.projectIntoViewport(E.touches[0].clientX, E.touches[0].clientY); re[0] = Ee[0], re[1] = Ee[1]; } if (E.touches[1]) { var Ee = e.projectIntoViewport(E.touches[1].clientX, E.touches[1].clientY); re[2] = Ee[0], re[3] = Ee[1]; } if (E.touches[2]) { var Ee = e.projectIntoViewport(E.touches[2].clientX, E.touches[2].clientY); re[4] = Ee[0], re[5] = Ee[1]; } var ze = e.touchData.startGPosition, Ve; if (V && E.touches[0] && ze) { for (var me = [], _e = 0; _e < re.length; _e++) me[_e] = re[_e] - ke[_e]; var Ce = E.touches[0].clientX - ze[0], Le = Ce * Ce, yt = E.touches[0].clientY - ze[1], dt = yt * yt, _t = Le + dt; Ve = _t >= e.touchTapThreshold2; } if (V && e.touchData.cxt) { E.preventDefault(); var bt = E.touches[0].clientX - J, Ct = E.touches[0].clientY - se, nn = E.touches[1].clientX - J, Dt = E.touches[1].clientY - se, Kt = q(bt, Ct, nn, Dt), on = Kt / z, rn = 150, Qt = rn * rn, Sn = 1.5, En = Sn * Sn; if (on >= En || Kt >= Qt) { e.touchData.cxt = !1, e.data.bgActivePosistion = void 0, e.redrawHint("select", !0); var pn = { originalEvent: E, type: "cxttapend", position: { x: re[0], y: re[1] } }; e.touchData.start ? (e.touchData.start.unactivate().emit(pn), e.touchData.start = null) : le.emit(pn); } } if (V && e.touchData.cxt) { var pn = { originalEvent: E, type: "cxtdrag", position: { x: re[0], y: re[1] } }; e.data.bgActivePosistion = void 0, e.redrawHint("select", !0), e.touchData.start ? e.touchData.start.emit(pn) : le.emit(pn), e.touchData.start && (e.touchData.start._private.grabbed = !1), e.touchData.cxtDragged = !0; var St = e.findNearestElement(re[0], re[1], !0, !0); (!e.touchData.cxtOver || St !== e.touchData.cxtOver) && (e.touchData.cxtOver && e.touchData.cxtOver.emit({ originalEvent: E, type: "cxtdragout", position: { x: re[0], y: re[1] } }), e.touchData.cxtOver = St, St && St.emit({ originalEvent: E, type: "cxtdragover", position: { x: re[0], y: re[1] } })); } else if (V && E.touches[2] && le.boxSelectionEnabled()) E.preventDefault(), e.data.bgActivePosistion = void 0, this.lastThreeTouch = +/* @__PURE__ */ new Date(), e.touchData.selecting || le.emit({ originalEvent: E, type: "boxstart", position: { x: re[0], y: re[1] } }), e.touchData.selecting = !0, e.touchData.didSelect = !0, ie[4] = 1, !ie || ie.length === 0 || ie[0] === void 0 ? (ie[0] = (re[0] + re[2] + re[4]) / 3, ie[1] = (re[1] + re[3] + re[5]) / 3, ie[2] = (re[0] + re[2] + re[4]) / 3 + 1, ie[3] = (re[1] + re[3] + re[5]) / 3 + 1) : (ie[2] = (re[0] + re[2] + re[4]) / 3, ie[3] = (re[1] + re[3] + re[5]) / 3), e.redrawHint("select", !0), e.redraw(); else if (V && E.touches[1] && !e.touchData.didSelect && le.zoomingEnabled() && le.panningEnabled() && le.userZoomingEnabled() && le.userPanningEnabled()) { E.preventDefault(), e.data.bgActivePosistion = void 0, e.redrawHint("select", !0); var Rt = e.dragData.touchDragEles; if (Rt) { e.redrawHint("drag", !0); for (var qt = 0; qt < Rt.length; qt++) { var _n = Rt[qt]._private; _n.grabbed = !1, _n.rscratch.inDragLayer = !1; } } var _r = e.touchData.start, bt = E.touches[0].clientX - J, Ct = E.touches[0].clientY - se, nn = E.touches[1].clientX - J, Dt = E.touches[1].clientY - se, D = ee(bt, Ct, nn, Dt), ae = D / M; if (oe) { var Ie = bt - L, He = Ct - R, Jt = nn - P, fn = Dt - B, un = (Ie + Jt) / 2, en = (He + fn) / 2, Gt = le.zoom(), Hr = Gt * ae, zo = le.pan(), mc = G[0] * Gt + zo.x, yc = G[1] * Gt + zo.y, hp = { x: -Hr / Gt * (mc - zo.x - un) + mc, y: -Hr / Gt * (yc - zo.y - en) + yc }; if (_r && _r.active()) { var Rt = e.dragData.touchDragEles; m(Rt), e.redrawHint("drag", !0), e.redrawHint("eles", !0), _r.unactivate().emit("freeon"), Rt.emit("free"), e.dragData.didDrag && (_r.emit("dragfreeon"), Rt.emit("dragfree")); } le.viewport({ zoom: Hr, pan: hp, cancelOnFailedZoom: !0 }), le.emit("pinchzoom"), M = D, L = bt, R = Ct, P = nn, B = Dt, e.pinching = !0; } if (E.touches[0]) { var Ee = e.projectIntoViewport(E.touches[0].clientX, E.touches[0].clientY); re[0] = Ee[0], re[1] = Ee[1]; } if (E.touches[1]) { var Ee = e.projectIntoViewport(E.touches[1].clientX, E.touches[1].clientY); re[2] = Ee[0], re[3] = Ee[1]; } if (E.touches[2]) { var Ee = e.projectIntoViewport(E.touches[2].clientX, E.touches[2].clientY); re[4] = Ee[0], re[5] = Ee[1]; } } else if (E.touches[0] && !e.touchData.didSelect) { var Xn = e.touchData.start, Vs = e.touchData.last, St; if (!e.hoverData.draggingEles && !e.swipePanning && (St = e.findNearestElement(re[0], re[1], !0, !0)), V && Xn != null && E.preventDefault(), V && Xn != null && e.nodeIsDraggable(Xn)) if (Ve) { var Rt = e.dragData.touchDragEles, bc = !e.dragData.didDrag; bc && p(Rt, { inDragLayer: !0 }), e.dragData.didDrag = !0; var ko = { x: 0, y: 0 }; if (ot(me[0]) && ot(me[1]) && (ko.x += me[0], ko.y += me[1], bc)) { e.redrawHint("eles", !0); var Rn = e.touchData.dragDelta; Rn && ot(Rn[0]) && ot(Rn[1]) && (ko.x += Rn[0], ko.y += Rn[1]); } e.hoverData.draggingEles = !0, Rt.silentShift(ko).emit("position drag"), e.redrawHint("drag", !0), e.touchData.startPosition[0] == ke[0] && e.touchData.startPosition[1] == ke[1] && e.redrawHint("eles", !0), e.redraw(); } else { var Rn = e.touchData.dragDelta = e.touchData.dragDelta || []; Rn.length === 0 ? (Rn.push(me[0]), Rn.push(me[1])) : (Rn[0] += me[0], Rn[1] += me[1]); } if (r(Xn || St, ["touchmove", "tapdrag", "vmousemove"], E, { x: re[0], y: re[1] }), (!Xn || !Xn.grabbed()) && St != Vs && (Vs && Vs.emit({ originalEvent: E, type: "tapdragout", position: { x: re[0], y: re[1] } }), St && St.emit({ originalEvent: E, type: "tapdragover", position: { x: re[0], y: re[1] } })), e.touchData.last = St, V) for (var qt = 0; qt < re.length; qt++) re[qt] && e.touchData.startPosition[qt] && Ve && (e.touchData.singleTouchMoved = !0); if (V && (Xn == null || Xn.pannable()) && le.panningEnabled() && le.userPanningEnabled()) { var Uh = o(Xn, e.touchData.starts); Uh && (E.preventDefault(), e.data.bgActivePosistion || (e.data.bgActivePosistion = Gp(e.touchData.startPosition)), e.swipePanning ? (le.panBy({ x: me[0] * fe, y: me[1] * fe }), le.emit("dragpan")) : Ve && (e.swipePanning = !0, le.panBy({ x: Ce * fe, y: yt * fe }), le.emit("dragpan"), Xn && (Xn.unactivate(), e.redrawHint("select", !0), e.touchData.start = null))); var Ee = e.projectIntoViewport(E.touches[0].clientX, E.touches[0].clientY); re[0] = Ee[0], re[1] = Ee[1]; } } for (var _e = 0; _e < re.length; _e++) ke[_e] = re[_e]; V && E.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 we; e.registerBinding(t, "touchcancel", we = function(E) { var V = e.touchData.start; e.touchData.capture = !1, V && V.unactivate(); }); var Oe, Ne, xe, $e; if (e.registerBinding(t, "touchend", Oe = function(E) { var V = e.touchData.start, ie = e.touchData.capture; if (ie) E.touches.length === 0 && (e.touchData.capture = !1), E.preventDefault(); else return; var le = e.selection; e.swipePanning = !1, e.hoverData.draggingEles = !1; var re = e.cy, ke = re.zoom(), fe = e.touchData.now, Ee = e.touchData.earlier; if (E.touches[0]) { var ze = e.projectIntoViewport(E.touches[0].clientX, E.touches[0].clientY); fe[0] = ze[0], fe[1] = ze[1]; } if (E.touches[1]) { var ze = e.projectIntoViewport(E.touches[1].clientX, E.touches[1].clientY); fe[2] = ze[0], fe[3] = ze[1]; } if (E.touches[2]) { var ze = e.projectIntoViewport(E.touches[2].clientX, E.touches[2].clientY); fe[4] = ze[0], fe[5] = ze[1]; } V && V.unactivate(); var Ve; if (e.touchData.cxt) { if (Ve = { originalEvent: E, type: "cxttapend", position: { x: fe[0], y: fe[1] } }, V ? V.emit(Ve) : re.emit(Ve), !e.touchData.cxtDragged) { var me = { originalEvent: E, type: "cxttap", position: { x: fe[0], y: fe[1] } }; V ? V.emit(me) : re.emit(me); } e.touchData.start && (e.touchData.start._private.grabbed = !1), e.touchData.cxt = !1, e.touchData.start = null, e.redraw(); return; } if (!E.touches[2] && re.boxSelectionEnabled() && e.touchData.selecting) { e.touchData.selecting = !1; var _e = re.collection(e.getAllInBox(le[0], le[1], le[2], le[3])); le[0] = void 0, le[1] = void 0, le[2] = void 0, le[3] = void 0, le[4] = 0, e.redrawHint("select", !0), re.emit({ type: "boxend", originalEvent: E, position: { x: fe[0], y: fe[1] } }); var Ce = function(rn) { return rn.selectable() && !rn.selected(); }; _e.emit("box").stdFilter(Ce).select().emit("boxselect"), _e.nonempty() && e.redrawHint("eles", !0), e.redraw(); } if (V != null && V.unactivate(), E.touches[2]) e.data.bgActivePosistion = void 0, e.redrawHint("select", !0); else if (!E.touches[1] && !E.touches[0] && !E.touches[0]) { e.data.bgActivePosistion = void 0, e.redrawHint("select", !0); var Le = e.dragData.touchDragEles; if (V != null) { var yt = V._private.grabbed; m(Le), e.redrawHint("drag", !0), e.redrawHint("eles", !0), yt && (V.emit("freeon"), Le.emit("free"), e.dragData.didDrag && (V.emit("dragfreeon"), Le.emit("dragfree"))), r(V, ["touchend", "tapend", "vmouseup", "tapdragout"], E, { x: fe[0], y: fe[1] }), V.unactivate(), e.touchData.start = null; } else { var dt = e.findNearestElement(fe[0], fe[1], !0, !0); r(dt, ["touchend", "tapend", "vmouseup", "tapdragout"], E, { x: fe[0], y: fe[1] }); } var _t = e.touchData.startPosition[0] - fe[0], bt = _t * _t, Ct = e.touchData.startPosition[1] - fe[1], nn = Ct * Ct, Dt = bt + nn, Kt = Dt * ke * ke; e.touchData.singleTouchMoved || (V || re.$(":selected").unselect(["tapunselect"]), r(V, ["tap", "vclick"], E, { x: fe[0], y: fe[1] }), Ne = !1, E.timeStamp - $e <= re.multiClickDebounceTime() ? (xe && clearTimeout(xe), Ne = !0, $e = null, r(V, ["dbltap", "vdblclick"], E, { x: fe[0], y: fe[1] })) : (xe = setTimeout(function() { Ne || r(V, ["onetap", "voneclick"], E, { x: fe[0], y: fe[1] }); }, re.multiClickDebounceTime()), $e = E.timeStamp)), V != null && !e.dragData.didDrag && V._private.selectable && Kt < e.touchTapThreshold2 && !e.pinching && (re.selectionType() === "single" ? (re.$(n).unmerge(V).unselect(["tapunselect"]), V.select(["tapselect"])) : V.selected() ? V.unselect(["tapunselect"]) : V.select(["tapselect"]), e.redrawHint("eles", !0)), e.touchData.singleTouchMoved = !0; } for (var on = 0; on < fe.length; on++) Ee[on] = fe[on]; e.dragData.didDrag = !1, E.touches.length === 0 && (e.touchData.dragDelta = [], e.touchData.startPosition = [null, null, null, null, null, null], e.touchData.startGPosition = null, e.touchData.didSelect = !1), E.touches.length < 2 && (E.touches.length === 1 && (e.touchData.startGPosition = [E.touches[0].clientX, E.touches[0].clientY]), e.pinching = !1, e.redrawHint("eles", !0), e.redraw()); }, !1), typeof TouchEvent > "u") { var Se = [], Pe = function(E) { return { clientX: E.clientX, clientY: E.clientY, force: 1, identifier: E.pointerId, pageX: E.pageX, pageY: E.pageY, radiusX: E.width / 2, radiusY: E.height / 2, screenX: E.screenX, screenY: E.screenY, target: E.target }; }, Me = function(E) { return { event: E, touch: Pe(E) }; }, je = function(E) { Se.push(Me(E)); }, Be = function(E) { for (var V = 0; V < Se.length; V++) { var ie = Se[V]; if (ie.event.pointerId === E.pointerId) { Se.splice(V, 1); return; } } }, We = function(E) { var V = Se.filter(function(ie) { return ie.event.pointerId === E.pointerId; })[0]; V.event = E, V.touch = Pe(E); }, qe = function(E) { E.touches = Se.map(function(V) { return V.touch; }); }, Ge = function(E) { return E.pointerType === "mouse" || E.pointerType === 4; }; e.registerBinding(e.container, "pointerdown", function(E) { Ge(E) || (E.preventDefault(), je(E), qe(E), Y(E)); }), e.registerBinding(e.container, "pointerup", function(E) { Ge(E) || (Be(E), qe(E), Oe(E)); }), e.registerBinding(e.container, "pointercancel", function(E) { Ge(E) || (Be(E), qe(E), we(E)); }), e.registerBinding(e.container, "pointermove", function(E) { Ge(E) || (E.preventDefault(), We(E), qe(E), te(E)); }); } }; var Il = {}; Il.generatePolygon = function(e, t) { return this.nodeShapes[e] = { renderer: this, name: e, points: t, draw: function(n, r, a, o, i, s) { this.renderer.nodeShapeImpl("polygon", n, r, a, o, i, this.points); }, intersectLine: function(n, r, a, o, i, s, l, u) { return T0(i, s, this.points, n, r, a / 2, o / 2, l); }, checkPoint: function(n, r, a, o, i, s, l, u) { return bl(n, r, this.points, s, l, o, i, [0, -1], a); } }; }; Il.generateEllipse = function() { return this.nodeShapes.ellipse = { renderer: this, name: "ellipse", draw: function(e, t, n, r, a, o) { this.renderer.nodeShapeImpl(this.name, e, t, n, r, a); }, intersectLine: function(e, t, n, r, a, o, i, s) { return f0e(a, o, e, t, n / 2 + i, r / 2 + i); }, checkPoint: function(e, t, n, r, a, o, i, s) { return jc(e, t, r, a, o, i, n); } }; }; Il.generateRoundPolygon = function(e, t) { return this.nodeShapes[e] = { renderer: this, name: e, points: t, getOrCreateCorners: function(n, r, a, o, 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 = a / 2, c = o / 2; i = i === "auto" ? KM(a, o) : i; for (var d = new Array(t.length / 2), f = 0; f < t.length / 2; f++) d[f] = { x: n + u * t[f * 2], y: r + c * t[f * 2 + 1] }; var h, p, v, m, g = d.length; for (p = d[g - 1], h = 0; h < g; h++) v = d[h % g], m = d[(h + 1) % g], s[l][h] = Y4(p, v, m, i), p = v, v = m; return s[l]; }, draw: function(n, r, a, o, i, s, l) { this.renderer.nodeShapeImpl("round-polygon", n, r, a, o, i, this.points, this.getOrCreateCorners(r, a, o, i, s, l, "drawCorners")); }, intersectLine: function(n, r, a, o, i, s, l, u, c) { return h0e(i, s, this.points, n, r, a, o, l, this.getOrCreateCorners(n, r, a, o, u, c, "corners")); }, checkPoint: function(n, r, a, o, i, s, l, u, c) { return p0e(n, r, this.points, s, l, o, i, this.getOrCreateCorners(s, l, o, i, u, c, "corners")); } }; }; Il.generateRoundRectangle = function() { return this.nodeShapes["round-rectangle"] = this.nodeShapes.roundrectangle = { renderer: this, name: "round-rectangle", points: Ra(4, 0), draw: function(e, t, n, r, a, o) { this.renderer.nodeShapeImpl(this.name, e, t, n, r, a, this.points, o); }, intersectLine: function(e, t, n, r, a, o, i, s) { return qM(a, o, e, t, n, r, i, s); }, checkPoint: function(e, t, n, r, a, o, i, s) { var l = r / 2, u = a / 2; s = s === "auto" ? wd(r, a) : s, s = Math.min(l, u, s); var c = s * 2; return !!(bl(e, t, this.points, o, i, r, a - c, [0, -1], n) || bl(e, t, this.points, o, i, r - c, a, [0, -1], n) || jc(e, t, c, c, o - l + s, i - u + s, n) || jc(e, t, c, c, o + l - s, i - u + s, n) || jc(e, t, c, c, o + l - s, i + u - s, n) || jc(e, t, c, c, o - l + s, i + u - s, n)); } }; }; Il.generateCutRectangle = function() { return this.nodeShapes["cut-rectangle"] = this.nodeShapes.cutrectangle = { renderer: this, name: "cut-rectangle", cornerLength: D4(), points: Ra(4, 0), draw: function(e, t, n, r, a, o) { this.renderer.nodeShapeImpl(this.name, e, t, n, r, a, null, o); }, generateCutTrianglePts: function(e, t, n, r, a) { var o = a === "auto" ? this.cornerLength : a, i = t / 2, s = e / 2, l = n - s, u = n + s, c = r - i, d = r + i; return { topLeft: [l, c + o, l + o, c, l + o, c + o], topRight: [u - o, c, u, c + o, u - o, c + o], bottomRight: [u, d - o, u - o, d, u - o, d - o], bottomLeft: [l + o, d, l, d - o, l + o, d - o] }; }, intersectLine: function(e, t, n, r, a, o, 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 T0(a, o, u, e, t); }, checkPoint: function(e, t, n, r, a, o, i, s) { var l = s === "auto" ? this.cornerLength : s; if (bl(e, t, this.points, o, i, r, a - 2 * l, [0, -1], n) || bl(e, t, this.points, o, i, r - 2 * l, a, [0, -1], n)) return !0; var u = this.generateCutTrianglePts(r, a, o, i); return Qa(e, t, u.topLeft) || Qa(e, t, u.topRight) || Qa(e, t, u.bottomRight) || Qa(e, t, u.bottomLeft); } }; }; Il.generateBarrel = function() { return this.nodeShapes.barrel = { renderer: this, name: "barrel", points: Ra(4, 0), draw: function(e, t, n, r, a, o) { this.renderer.nodeShapeImpl(this.name, e, t, n, r, a); }, intersectLine: function(e, t, n, r, a, o, i, s) { var l = 0.15, u = 0.5, c = 0.85, d = this.generateBarrelBezierPts(n + 2 * i, r + 2 * i, e, t), f = function(p) { var v = tf({ x: p[0], y: p[1] }, { x: p[2], y: p[3] }, { x: p[4], y: p[5] }, l), m = tf({ x: p[0], y: p[1] }, { x: p[2], y: p[3] }, { x: p[4], y: p[5] }, u), g = tf({ x: p[0], y: p[1] }, { x: p[2], y: p[3] }, { x: p[4], y: p[5] }, c); return [p[0], p[1], v.x, v.y, m.x, m.y, g.x, g.y, p[4], p[5]]; }, h = [].concat(f(d.topLeft), f(d.topRight), f(d.bottomRight), f(d.bottomLeft)); return T0(a, o, h, e, t); }, generateBarrelBezierPts: function(e, t, n, r) { var a = t / 2, o = e / 2, i = n - o, s = n + o, l = r - a, u = r + a, c = HC(e, t), d = c.heightOffset, f = c.widthOffset, h = c.ctrlPtOffsetPct * e, p = { topLeft: [i, l + d, i + h, l, i + f, l], topRight: [s - f, l, s - h, l, s, l + d], bottomRight: [s, u - d, s - h, u, s - f, u], bottomLeft: [i + f, u, i + h, u, i, u - d] }; return p.topLeft.isTop = !0, p.topRight.isTop = !0, p.bottomLeft.isBottom = !0, p.bottomRight.isBottom = !0, p; }, checkPoint: function(e, t, n, r, a, o, i, s) { var l = HC(r, a), u = l.heightOffset, c = l.widthOffset; if (bl(e, t, this.points, o, i, r, a - 2 * u, [0, -1], n) || bl(e, t, this.points, o, i, r - 2 * c, a, [0, -1], n)) return !0; for (var d = this.generateBarrelBezierPts(r, a, o, i), f = function(C, S, _) { var T = _[4], O = _[2], $ = _[0], A = _[5], N = _[1], L = Math.min(T, $), R = Math.max(T, $), P = Math.min(A, N), B = Math.max(A, N); if (L <= C && C <= R && P <= S && S <= B) { var M = v0e(T, O, $), z = l0e(M[0], M[1], M[2], C), Z = z.filter(function(G) { return 0 <= G && G <= 1; }); if (Z.length > 0) return Z[0]; } return null; }, h = Object.keys(d), p = 0; p < h.length; p++) { var v = h[p], m = d[v], g = f(e, t, m); if (g != null) { var y = m[5], x = m[3], w = m[1], k = Ur(y, x, w, g); if (m.isTop && k <= t || m.isBottom && t <= k) return !0; } } return !1; } }; }; Il.generateBottomRoundrectangle = function() { return this.nodeShapes["bottom-round-rectangle"] = this.nodeShapes.bottomroundrectangle = { renderer: this, name: "bottom-round-rectangle", points: Ra(4, 0), draw: function(e, t, n, r, a, o) { this.renderer.nodeShapeImpl(this.name, e, t, n, r, a, this.points, o); }, intersectLine: function(e, t, n, r, a, o, i, s) { var l = e - (n / 2 + i), u = t - (r / 2 + i), c = u, d = e + (n / 2 + i), f = Eu(a, o, e, t, l, u, d, c, !1); return f.length > 0 ? f : qM(a, o, e, t, n, r, i, s); }, checkPoint: function(e, t, n, r, a, o, i, s) { s = s === "auto" ? wd(r, a) : s; var l = 2 * s; if (bl(e, t, this.points, o, i, r, a - l, [0, -1], n) || bl(e, t, this.points, o, i, r - l, a, [0, -1], n)) return !0; var u = r / 2 + 2 * n, c = a / 2 + 2 * n, d = [o - u, i - c, o - u, i, o + u, i, o + u, i - c]; return !!(Qa(e, t, d) || jc(e, t, l, l, o + r / 2 - s, i + a / 2 - s, n) || jc(e, t, l, l, o - r / 2 + s, i + a / 2 - s, n)); } }; }; Il.registerNodeShapes = function() { var e = this.nodeShapes = {}, t = this; this.generateEllipse(), this.generatePolygon("triangle", Ra(3, 0)), this.generateRoundPolygon("round-triangle", Ra(3, 0)), this.generatePolygon("rectangle", Ra(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", Ra(5, 0)), this.generateRoundPolygon("round-pentagon", Ra(5, 0)), this.generatePolygon("hexagon", Ra(6, 0)), this.generateRoundPolygon("round-hexagon", Ra(6, 0)), this.generatePolygon("heptagon", Ra(7, 0)), this.generateRoundPolygon("round-heptagon", Ra(7, 0)), this.generatePolygon("octagon", Ra(8, 0)), this.generateRoundPolygon("round-octagon", Ra(8, 0)); var r = new Array(20); { var a = jC(5, 0), o = jC(5, Math.PI / 5), i = 0.5 * (3 - Math.sqrt(5)); i *= 1.57; for (var s = 0; s < o.length / 2; s++) o[s * 2] *= i, o[s * 2 + 1] *= i; for (var s = 0; s < 20 / 4; s++) r[s * 4] = a[s * 2], r[s * 4 + 1] = a[s * 2 + 1], r[s * 4 + 2] = o[s * 2], r[s * 4 + 3] = o[s * 2 + 1]; } r = WM(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, f; return (f = this[d]) ? f : t.generatePolygon(d, u); }; }; var Vg = {}; Vg.timeToRender = function() { return this.redrawTotalTime / this.redrawCount; }; Vg.redraw = function(e) { e = e || zM(); 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; }; Vg.beforeRender = function(e, t) { if (!this.destroyed) { t == null && dr("Priority is not optional for beforeRender"); var n = this.beforeRenderCallbacks; n.push({ fn: e, priority: t }), n.sort(function(r, a) { return a.priority - r.priority; }); } }; var SO = function(e, t, n) { for (var r = e.beforeRenderCallbacks, a = 0; a < r.length; a++) r[a].fn(t, n); }; Vg.startRenderLoop = function() { var e = this, t = e.cy; if (!e.renderLoopStarted) { e.renderLoopStarted = !0; var n = function r(a) { if (!e.destroyed) { if (!t.batching()) if (e.requestedFrame && !e.skipFrame) { SO(e, !0, a); var o = yl(); e.render(e.renderOptions); var i = e.lastDrawTime = yl(); e.averageRedrawTime === void 0 && (e.averageRedrawTime = i - o), e.redrawCount === void 0 && (e.redrawCount = 0), e.redrawCount++, e.redrawTotalTime === void 0 && (e.redrawTotalTime = 0); var s = i - o; e.redrawTotalTime += s, e.lastRedrawTime = s, e.averageRedrawTime = e.averageRedrawTime / 2 + s / 2, e.requestedFrame = !1; } else SO(e, !1, a); e.skipFrame = !1, Gy(r); } }; Gy(n); } }; var Yye = function(e) { this.init(e); }, qB = Yye, wh = qB.prototype; wh.clientFunctions = ["redrawHint", "render", "renderTo", "matchCanvasSize", "nodeShapeImpl", "arrowShapeImpl"]; wh.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 a = r.document, o = a.head, i = "__________cytoscape_stylesheet", s = "__________cytoscape_container", l = a.getElementById(i) != null; if (n.className.indexOf(s) < 0 && (n.className = (n.className || "") + " " + s), !l) { var u = a.createElement("style"); u.id = i, u.textContent = "." + s + " { position: relative; }", o.insertBefore(u, o.children[0]); } var c = r.getComputedStyle(n), d = c.getPropertyValue("position"); d === "static" && Fn("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 = ot(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(); }; wh.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(); } }; wh.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, a = r.target; (a.off || a.removeEventListener).apply(a, 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 { } }; wh.isHeadless = function() { return !1; }; [X4, HB, UB, bh, Il, Vg].forEach(function(e) { Ft(wh, e); }); var rk = 1e3 / 60, WB = { setupDequeueing: function(e) { return function() { var t = this, n = this.renderer; if (!t.dequeueingSetup) { t.dequeueingSetup = !0; var r = B2(function() { n.redrawHint("eles", !0), n.redrawHint("drag", !0), n.redraw(); }, e.deqRedrawThreshold), a = function(i, s) { var l = yl(), u = n.averageRedrawTime, c = n.lastRedrawTime, d = [], f = n.cy.extent(), h = n.getPixelRatio(); for (i || n.flushRenderedStyleQueue(); ; ) { var p = yl(), v = p - l, m = p - s; if (c < rk) { var g = rk - (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 * rk) break; var y = e.deq(t, h, f); if (y.length > 0) for (var x = 0; x < y.length; x++) d.push(y[x]); else break; } d.length > 0 && (e.onDeqd(t, d), !i && e.shouldRedraw(t, d, h, f) && r()); }, o = e.priority || L4; n.beforeRender(a, o(t)); } }; } }, Zye = /* @__PURE__ */ function() { function e(t) { var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Xy; $4(this, e), this.idsByKey = new ds(), this.keyForId = new ds(), this.cachesByLvl = new ds(), this.lvls = [], this.getKey = t, this.doesEleInvalidateKey = n; } return F4(e, [{ key: "getIdsFor", value: function(t) { t == null && dr("Can not get id list for null key"); var n = this.idsByKey, r = this.idsByKey.get(t); return r || (r = new ph(), 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), a = this.getKey(t); this.deleteIdForKey(r, n), this.addIdForKey(a, n), this.keyForId.set(n, a); } }, { 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), a = this.getKey(t); return r !== a; } }, { key: "isInvalid", value: function(t) { return this.keyHasChangedFor(t) || this.doesEleInvalidateKey(t); } }, { key: "getCachesAt", value: function(t) { var n = this.cachesByLvl, r = this.lvls, a = n.get(t); return a || (a = new ds(), n.set(t, a), r.push(t)), a; } }, { key: "getCache", value: function(t, n) { return this.getCachesAt(n).get(t); } }, { key: "get", value: function(t, n) { var r = this.getKey(t), a = this.getCache(r, n); return a != null && this.updateKeyMappingFor(t), a; } }, { key: "getForCachedKey", value: function(t, n) { var r = this.keyForId.get(t.id()), a = this.getCache(r, n); return a; } }, { 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 a = this.getKey(t); this.setCache(a, 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 a = this.doesEleInvalidateKey(t); return a && this.invalidateKey(r), a || this.getNumberOfIdsForKey(r) === 0; } }]), e; }(), EO = 25, Qm = 50, ay = -4, e5 = 3, Qye = 7.99, Jye = 8, ebe = 1024, tbe = 1024, nbe = 1024, rbe = 0.2, abe = 0.8, obe = 10, ibe = 0.15, sbe = 0.1, lbe = 0.9, ube = 0.9, cbe = 100, dbe = 1, Xp = { dequeue: "dequeue", downscale: "downscale", highQuality: "highQuality" }, pbe = ga({ getKey: null, doesEleInvalidateKey: Xy, drawElement: null, getBoundingBox: null, getRotationPoint: null, getRotationOffset: null, isVisible: DM, allowEdgeTxrCaching: !0, allowParentTxrCaching: !0 }), Fv = function(e, t) { var n = this; n.renderer = e, n.onDequeues = []; var r = pbe(t); Ft(n, r), n.lookup = new Zye(r.getKey, r.doesEleInvalidateKey), n.setupDequeueing(); }, zr = Fv.prototype; zr.reasons = Xp; zr.getTextureQueue = function(e) { var t = this; return t.eleImgCaches = t.eleImgCaches || {}, t.eleImgCaches[e] = t.eleImgCaches[e] || []; }; zr.getRetiredTextureQueue = function(e) { var t = this, n = t.eleImgCaches.retired = t.eleImgCaches.retired || {}, r = n[e] = n[e] || []; return r; }; zr.getElementQueue = function() { var e = this, t = e.eleCacheQueue = e.eleCacheQueue || new Bg(function(n, r) { return r.reqs - n.reqs; }); return t; }; zr.getElementKeyToQueue = function() { var e = this, t = e.eleKeyToCacheQueue = e.eleKeyToCacheQueue || {}; return t; }; zr.getElement = function(e, t, n, r, a) { var o = 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() || !o.allowEdgeTxrCaching && e.isEdge() || !o.allowParentTxrCaching && e.isParent()) return null; if (r == null && (r = Math.ceil(M4(s * n))), r < ay) r = ay; else if (s >= Qye || r > e5) return null; var u = Math.pow(2, r), c = t.h * u, d = t.w * u, f = i.eleTextBiggerThanMin(e, u); if (!this.isVisible(e, f)) return null; var h = l.get(e, r); if (h && h.invalidated && (h.invalidated = !1, h.texture.invalidatedWidth -= h.width), h) return h; var p; if (c <= EO ? p = EO : c <= Qm ? p = Qm : p = Math.ceil(c / Qm) * Qm, c > nbe || d > tbe) return null; var v = o.getTextureQueue(p), m = v[v.length - 2], g = function() { return o.recycleTexture(p, d) || o.addTexture(p, d); }; m || (m = v[v.length - 1]), m || (m = g()), m.width - m.usedWidth < d && (m = g()); for (var y = function(R) { return R && R.scaledLabelShown === f; }, x = a && a === Xp.dequeue, w = a && a === Xp.highQuality, k = a && a === Xp.downscale, C, S = r + 1; S <= e5; S++) { var _ = l.get(e, S); if (_) { C = _; break; } } var T = C && C.level === r + 1 ? C : null, O = function() { m.context.drawImage(T.texture.canvas, T.x, 0, T.width, T.height, m.usedWidth, 0, d, c); }; if (m.context.setTransform(1, 0, 0, 1, 0, 0), m.context.clearRect(m.usedWidth, 0, d, p), y(T)) O(); else if (y(C)) if (w) { for (var $ = C.level; $ > r; $--) T = o.getElement(e, t, n, $, Xp.downscale); O(); } else return o.queueElement(e, C.level - 1), C; else { var A; if (!x && !w && !k) for (var N = r - 1; N >= ay; N--) { var L = l.get(e, N); if (L) { A = L; break; } } if (y(A)) return o.queueElement(e, r), A; m.context.translate(m.usedWidth, 0), m.context.scale(u, u), this.drawElement(m.context, e, t, f, !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: f }, m.usedWidth += Math.ceil(d + Jye), m.eleCaches.push(h), l.set(e, r, h), o.checkTextureFullness(m), h; }; zr.invalidateElements = function(e) { for (var t = 0; t < e.length; t++) this.invalidateElement(e[t]); }; zr.invalidateElement = function(e) { var t = this, n = t.lookup, r = [], a = n.isInvalid(e); if (a) { for (var o = ay; o <= e5; o++) { var i = n.getForCachedKey(e, o); 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); } }; zr.checkTextureUtility = function(e) { e.invalidatedWidth >= rbe * e.width && this.retireTexture(e); }; zr.checkTextureFullness = function(e) { var t = this, n = t.getTextureQueue(e.height); e.usedWidth / e.width > abe && e.fullnessChecks >= obe ? Vu(n, e) : e.fullnessChecks++; }; zr.retireTexture = function(e) { var t = this, n = e.height, r = t.getTextureQueue(n), a = this.lookup; Vu(r, e), e.retired = !0; for (var o = e.eleCaches, i = 0; i < o.length; i++) { var s = o[i]; a.deleteCache(s.key, s.level); } N4(o); var l = t.getRetiredTextureQueue(n); l.push(e); }; zr.addTexture = function(e, t) { var n = this, r = n.getTextureQueue(e), a = {}; return r.push(a), a.eleCaches = [], a.height = e, a.width = Math.max(ebe, t), a.usedWidth = 0, a.invalidatedWidth = 0, a.fullnessChecks = 0, a.canvas = n.renderer.makeOffscreenCanvas(a.width, a.height), a.context = a.canvas.getContext("2d"), a; }; zr.recycleTexture = function(e, t) { for (var n = this, r = n.getTextureQueue(e), a = n.getRetiredTextureQueue(e), o = 0; o < a.length; o++) { var i = a[o]; if (i.width >= t) return i.retired = !1, i.usedWidth = 0, i.invalidatedWidth = 0, i.fullnessChecks = 0, N4(i.eleCaches), i.context.setTransform(1, 0, 0, 1, 0, 0), i.context.clearRect(0, 0, i.width, i.height), Vu(a, i), r.push(i), i; } }; zr.queueElement = function(e, t) { var n = this, r = n.getElementQueue(), a = n.getElementKeyToQueue(), o = this.getKey(e), i = a[o]; 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: o }; r.push(s), a[o] = s; } }; zr.dequeue = function(e) { for (var t = this, n = t.getElementQueue(), r = t.getElementKeyToQueue(), a = [], o = t.lookup, i = 0; i < dbe && n.size() > 0; i++) { var s = n.pop(), l = s.key, u = s.eles[0], c = o.hasCache(u, s.level); if (r[l] = null, !c) { a.push(s); var d = t.getBoundingBox(u); t.getElement(u, d, e, s.level, Xp.dequeue); } } return a; }; zr.removeFromQueue = function(e) { var t = this, n = t.getElementQueue(), r = t.getElementKeyToQueue(), a = this.getKey(e), o = r[a]; o != null && (o.eles.length === 1 ? (o.reqs = P4, n.updateItem(o), n.pop(), r[a] = null) : o.eles.unmerge(e)); }; zr.onDequeue = function(e) { this.onDequeues.push(e); }; zr.offDequeue = function(e) { Vu(this.onDequeues, e); }; zr.setupDequeueing = WB.setupDequeueing({ deqRedrawThreshold: cbe, deqCost: ibe, deqAvgCost: sbe, deqNoDrawCost: lbe, deqFastCost: ube, 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 a = 0; a < t.length; a++) for (var o = t[a].eles, i = 0; i < o.length; i++) { var s = o[i].boundingBox(); if (B4(s, r)) return !0; } return !1; }, priority: function(e) { return e.renderer.beforeRenderPriorities.eleTxrDeq; } }); var fbe = 1, Wv = -4, ab = 2, hbe = 3.99, vbe = 50, gbe = 50, mbe = 0.15, ybe = 0.1, bbe = 0.9, wbe = 0.9, xbe = 1, _O = 250, kbe = 4e3 * 4e3, Cbe = !0, KB = function(e) { var t = this, n = t.renderer = e, r = n.cy; t.layersByLevel = {}, t.firstGet = !0, t.lastInvalidationTime = yl() - 2 * _O, t.skipping = !1, t.eleTxrDeqs = r.collection(), t.scheduleElementRefinement = B2(function() { t.refineElementTextures(t.eleTxrDeqs), t.eleTxrDeqs.unmerge(t.eleTxrDeqs); }, gbe), n.beforeRender(function(o, i) { i - t.lastInvalidationTime <= _O ? t.skipping = !0 : t.skipping = !1; }, n.beforeRenderPriorities.lyrTxrSkip); var a = function(o, i) { return i.reqs - o.reqs; }; t.layersQueue = new Bg(a), t.setupDequeueing(); }, ma = KB.prototype, TO = 0, Sbe = Math.pow(2, 53) - 1; ma.makeLayer = function(e, t) { var n = Math.pow(2, t), r = Math.ceil(e.w * n), a = Math.ceil(e.h * n), o = this.renderer.makeOffscreenCanvas(r, a), i = { id: TO = ++TO % Sbe, bb: e, level: t, width: r, height: a, canvas: o, context: o.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; }; ma.getLayers = function(e, t, n) { var r = this, a = r.renderer, o = a.cy, i = o.zoom(), s = r.firstGet; if (r.firstGet = !1, n == null) { if (n = Math.ceil(M4(i * t)), n < Wv) n = Wv; else if (i >= hbe || n > ab) return null; } r.validateLayersElesOrdering(n, e); var l = r.layersByLevel, u = Math.pow(2, n), c = l[n] = l[n] || [], d, f = r.levelIsComplete(n, e), h, p = function() { var T = function(N) { if (r.validateLayersElesOrdering(N, e), r.levelIsComplete(N, e)) return h = l[N], !0; }, O = function(N) { if (!h) for (var L = n + N; Wv <= L && L <= ab && !T(L); L += N) ; }; O(1), O(-1); for (var $ = c.length - 1; $ >= 0; $--) { var A = c[$]; A.invalid && Vu(c, A); } }; if (!f) p(); else return c; var v = function() { if (!d) { d = wo(); for (var T = 0; T < e.length; T++) HM(d, e[T].boundingBox()); } return d; }, m = function(T) { T = T || {}; var O = T.after; v(); var $ = d.w * u * (d.h * u); if ($ > kbe) return null; var A = r.makeLayer(d, n); if (O != null) { var N = c.indexOf(O) + 1; c.splice(N, 0, A); } else (T.insert === void 0 || T.insert) && c.unshift(A); return A; }; if (r.skipping && !s) return null; for (var g = null, y = e.length / fbe, x = !s, w = 0; w < e.length; w++) { var k = e[w], C = k._private.rscratch, S = C.imgLayerCaches = C.imgLayerCaches || {}, _ = S[n]; if (_) { g = _; continue; } if ((!g || g.eles.length >= y || !UM(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), S[n] = g; } return h || (x ? null : c); }; ma.getEleLevelForLayerLevel = function(e, t) { return e; }; ma.drawEleInLayer = function(e, t, n, r) { var a = this, o = this.renderer, i = e.context, s = t.boundingBox(); s.w === 0 || s.h === 0 || !t.visible() || (n = a.getEleLevelForLayerLevel(n, r), o.setImgSmoothing(i, !1), o.drawCachedElement(i, t, null, null, n, Cbe), o.setImgSmoothing(i, !0)); }; ma.levelIsComplete = function(e, t) { var n = this, r = n.layersByLevel[e]; if (!r || r.length === 0) return !1; for (var a = 0, o = 0; o < r.length; o++) { var i = r[o]; if (i.reqs > 0 || i.invalid) return !1; a += i.eles.length; } return a === t.length; }; ma.validateLayersElesOrdering = function(e, t) { var n = this.layersByLevel[e]; if (n) for (var r = 0; r < n.length; r++) { for (var a = n[r], o = -1, i = 0; i < t.length; i++) if (a.eles[0] === t[i]) { o = i; break; } if (o < 0) { this.invalidateLayer(a); continue; } for (var s = o, i = 0; i < a.eles.length; i++) if (a.eles[i] !== t[s + i]) { this.invalidateLayer(a); break; } } }; ma.updateElementsInLayers = function(e, t) { for (var n = this, r = Ng(e[0]), a = 0; a < e.length; a++) for (var o = r ? null : e[a], i = r ? e[a] : e[a].ele, s = i._private.rscratch, l = s.imgLayerCaches = s.imgLayerCaches || {}, u = Wv; u <= ab; u++) { var c = l[u]; c && (o && n.getEleLevelForLayerLevel(c.level) !== o.level || t(c, i, o)); } }; ma.haveLayers = function() { for (var e = this, t = !1, n = Wv; n <= ab; n++) { var r = e.layersByLevel[n]; if (r && r.length > 0) { t = !0; break; } } return t; }; ma.invalidateElements = function(e) { var t = this; e.length !== 0 && (t.lastInvalidationTime = yl(), !(e.length === 0 || !t.haveLayers()) && t.updateElementsInLayers(e, function(n, r, a) { t.invalidateLayer(n); })); }; ma.invalidateLayer = function(e) { if (this.lastInvalidationTime = yl(), !e.invalid) { var t = e.level, n = e.eles, r = this.layersByLevel[t]; Vu(r, e), e.elesQueue = [], e.invalid = !0, e.replacement && (e.replacement.invalid = !0); for (var a = 0; a < n.length; a++) { var o = n[a]._private.rscratch.imgLayerCaches; o && (o[t] = null); } } }; ma.refineElementTextures = function(e) { var t = this; t.updateElementsInLayers(e, function(n, r, a) { var o = n.replacement; if (o || (o = n.replacement = t.makeLayer(n.bb, n.level), o.replaces = n, o.eles = n.eles), !o.reqs) for (var i = 0; i < o.eles.length; i++) t.queueLayer(o, o.eles[i]); }); }; ma.enqueueElementRefinement = function(e) { this.eleTxrDeqs.merge(e), this.scheduleElementRefinement(); }; ma.queueLayer = function(e, t) { var n = this, r = n.layersQueue, a = e.elesQueue, o = a.hasId = a.hasId || {}; if (!e.replacement) { if (t) { if (o[t.id()]) return; a.push(t), o[t.id()] = !0; } e.reqs ? (e.reqs++, r.updateItem(e)) : (e.reqs = 1, r.push(e)); } }; ma.dequeue = function(e) { for (var t = this, n = t.layersQueue, r = [], a = 0; a < xbe && n.size() !== 0; ) { var o = n.peek(); if (o.replacement) { n.pop(); continue; } if (o.replaces && o !== o.replaces.replacement) { n.pop(); continue; } if (o.invalid) { n.pop(); continue; } var i = o.elesQueue.shift(); i && (t.drawEleInLayer(o, i, o.level, e), a++), r.length === 0 && r.push(!0), o.elesQueue.length === 0 && (n.pop(), o.reqs = 0, o.replaces && t.applyLayerReplacement(o), t.requestRedraw()); } return r; }; ma.applyLayerReplacement = function(e) { var t = this, n = t.layersByLevel[e.level], r = e.replaces, a = n.indexOf(r); if (!(a < 0 || r.invalid)) { n[a] = e; for (var o = 0; o < e.eles.length; o++) { var i = e.eles[o]._private, s = i.imgLayerCaches = i.imgLayerCaches || {}; s && (s[e.level] = e); } t.requestRedraw(); } }; ma.requestRedraw = B2(function() { var e = this.renderer; e.redrawHint("eles", !0), e.redrawHint("drag", !0), e.redraw(); }, 100); ma.setupDequeueing = WB.setupDequeueing({ deqRedrawThreshold: vbe, deqCost: mbe, deqAvgCost: ybe, deqNoDrawCost: bbe, deqFastCost: wbe, deq: function(e, t) { return e.dequeue(t); }, onDeqd: L4, shouldRedraw: DM, priority: function(e) { return e.renderer.beforeRenderPriorities.lyrTxrDeq; } }); var GB = {}, OO; function Ebe(e, t) { for (var n = 0; n < t.length; n++) { var r = t[n]; e.lineTo(r.x, r.y); } } function _be(e, t, n) { for (var r, a = 0; a < t.length; a++) { var o = t[a]; a === 0 && (r = o), e.lineTo(o.x, o.y); } e.quadraticCurveTo(n.x, n.y, r.x, r.y); } function $O(e, t, n) { e.beginPath && e.beginPath(); for (var r = t, a = 0; a < r.length; a++) { var o = r[a]; e.lineTo(o.x, o.y); } var i = n, s = n[0]; e.moveTo(s.x, s.y); for (var a = 1; a < i.length; a++) { var o = i[a]; e.lineTo(o.x, o.y); } e.closePath && e.closePath(); } function Tbe(e, t, n, r, a) { e.beginPath && e.beginPath(), e.arc(n, r, a, 0, Math.PI * 2, !1); var o = t, i = o[0]; e.moveTo(i.x, i.y); for (var s = 0; s < o.length; s++) { var l = o[s]; e.lineTo(l.x, l.y); } e.closePath && e.closePath(); } function Obe(e, t, n, r) { e.arc(t, n, r, 0, Math.PI * 2, !1); } GB.arrowShapeImpl = function(e) { return (OO || (OO = { polygon: Ebe, "triangle-backcurve": _be, "triangle-tee": $O, "circle-triangle": Tbe, "triangle-cross": $O, circle: Obe }))[e]; }; var Bs = {}; Bs.drawElement = function(e, t, n, r, a, o) { var i = this; t.isNode() ? i.drawNode(e, t, n, r, a, o) : i.drawEdge(e, t, n, r, a, o); }; Bs.drawElementOverlay = function(e, t) { var n = this; t.isNode() ? n.drawNodeOverlay(e, t) : n.drawEdgeOverlay(e, t); }; Bs.drawElementUnderlay = function(e, t) { var n = this; t.isNode() ? n.drawNodeUnderlay(e, t) : n.drawEdgeUnderlay(e, t); }; Bs.drawCachedElementPortion = function(e, t, n, r, a, o, i, s) { var l = this, u = n.getBoundingBox(t); if (!(u.w === 0 || u.h === 0)) { var c = n.getElement(t, u, r, a, o); if (c != null) { var d = s(l, t); if (d === 0) return; var f = i(l, t), h = u.x1, p = u.y1, v = u.w, m = u.h, g, y, x, w, k; if (f !== 0) { var C = n.getRotationPoint(t); x = C.x, w = C.y, e.translate(x, w), e.rotate(f), k = l.getImgSmoothing(e), k || l.setImgSmoothing(e, !0); var S = n.getRotationOffset(t); g = S.x, y = S.y; } else g = h, y = p; var _; d !== 1 && (_ = e.globalAlpha, e.globalAlpha = _ * d), e.drawImage(c.texture.canvas, c.x, 0, c.width, c.height, g, y, v, m), d !== 1 && (e.globalAlpha = _), f !== 0 && (e.rotate(-f), e.translate(-x, -w), k || l.setImgSmoothing(e, !1)); } else n.drawElement(e, t); } }; var $be = function() { return 0; }, Fbe = function(e, t) { return e.getTextAngle(t, null); }, Abe = function(e, t) { return e.getTextAngle(t, "source"); }, Ibe = function(e, t) { return e.getTextAngle(t, "target"); }, Pbe = function(e, t) { return t.effectiveOpacity(); }, ak = function(e, t) { return t.pstyle("text-opacity").pfValue * t.effectiveOpacity(); }; Bs.drawCachedElement = function(e, t, n, r, a, o) { var i = this, s = i.data, l = s.eleTxrCache, u = s.lblTxrCache, c = s.slbTxrCache, d = s.tlbTxrCache, f = t.boundingBox(), h = o === !0 ? l.reasons.highQuality : null; if (!(f.w === 0 || f.h === 0 || !t.visible()) && (!r || B4(f, r))) { var p = t.isEdge(), v = t.element()._private.rscratch.badLine; i.drawElementUnderlay(e, t), i.drawCachedElementPortion(e, t, l, n, a, h, $be, Pbe), (!p || !v) && i.drawCachedElementPortion(e, t, u, n, a, h, Fbe, ak), p && !v && (i.drawCachedElementPortion(e, t, c, n, a, h, Abe, ak), i.drawCachedElementPortion(e, t, d, n, a, h, Ibe, ak)), i.drawElementOverlay(e, t); } }; Bs.drawElements = function(e, t) { for (var n = this, r = 0; r < t.length; r++) { var a = t[r]; n.drawElement(e, a); } }; Bs.drawCachedElements = function(e, t, n, r) { for (var a = this, o = 0; o < t.length; o++) { var i = t[o]; a.drawCachedElement(e, i, n, r); } }; Bs.drawCachedNodes = function(e, t, n, r) { for (var a = this, o = 0; o < t.length; o++) { var i = t[o]; i.isNode() && a.drawCachedElement(e, i, n, r); } }; Bs.drawLayeredElements = function(e, t, n, r) { var a = this, o = a.data.lyrTxrCache.getLayers(t, n); if (o) for (var i = 0; i < o.length; i++) { var s = o[i], l = s.bb; l.w === 0 || l.h === 0 || e.drawImage(s.canvas, l.x1, l.y1, l.w, l.h); } else a.drawCachedElements(e, t, n, r); }; var Pl = {}; Pl.drawEdge = function(e, t, n) { var r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !0, a = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !0, o = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : !0, i = this, s = t._private.rscratch; if (!(o && !t.visible()) && !(s.badLine || s.allpts == null || isNaN(s.allpts[0]))) { var l; n && (l = n, e.translate(-l.x1, -l.y1)); var u = o ? t.pstyle("opacity").value : 1, c = o ? t.pstyle("line-opacity").value : 1, d = t.pstyle("curve-style").value, f = t.pstyle("line-style").value, h = t.pstyle("width").pfValue, p = t.pstyle("line-cap").value, v = t.pstyle("line-outline-width").value, m = t.pstyle("line-outline-color").value, g = u * c, y = u * c, x = function() { var L = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : g; d === "straight-triangle" ? (i.eleStrokeStyle(e, t, L), i.drawEdgeTrianglePath(t, e, s.allpts)) : (e.lineWidth = h, e.lineCap = p, i.eleStrokeStyle(e, t, L), i.drawEdgePath(t, e, s.allpts, f), e.lineCap = "butt"); }, w = function() { var L = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : g; if (e.lineWidth = h + v, e.lineCap = p, v > 0) i.colorStrokeStyle(e, m[0], m[1], m[2], L); else { e.lineCap = "butt"; return; } d === "straight-triangle" ? i.drawEdgeTrianglePath(t, e, s.allpts) : (i.drawEdgePath(t, e, s.allpts, f), e.lineCap = "butt"); }, k = function() { a && i.drawEdgeOverlay(e, t); }, C = function() { a && i.drawEdgeUnderlay(e, t); }, S = function() { var L = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : y; i.drawArrowheads(e, t, L); }, _ = function() { i.drawElementText(e, t, null, r); }; e.lineJoin = "round"; var T = t.pstyle("ghost").value === "yes"; if (T) { var O = t.pstyle("ghost-offset-x").pfValue, $ = t.pstyle("ghost-offset-y").pfValue, A = t.pstyle("ghost-opacity").value, N = g * A; e.translate(O, $), x(N), S(N), e.translate(-O, -$); } else w(); C(), x(), S(), k(), _(), n && e.translate(l.x1, l.y1); } }; var XB = 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 a = this, o = a.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" && !o ? t.lineCap = "butt" : t.lineCap = "round", a.colorStrokeStyle(t, u[0], u[1], u[2], r), a.drawEdgePath(n, t, i.allpts, "solid"); } } }; }; Pl.drawEdgeOverlay = XB("overlay"); Pl.drawEdgeUnderlay = XB("underlay"); Pl.drawEdgePath = function(e, t, n, r) { var a = e._private.rscratch, o = 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("$"), f = a.pathCacheKey && a.pathCacheKey === d; f ? (i = t = a.pathCache, s = !0) : (i = t = new Path2D(), a.pathCacheKey = d, a.pathCache = i); } if (o.setLineDash) switch (r) { case "dotted": o.setLineDash([1, 1]); break; case "dashed": o.setLineDash(u), o.lineDashOffset = c; break; case "solid": o.setLineDash([]); break; } if (!s && !a.badLine) switch (t.beginPath && t.beginPath(), t.moveTo(n[0], n[1]), a.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 p = 2; p + 1 < n.length; p += 2) t.lineTo(n[p], n[p + 1]); break; case "segments": if (a.isRound) { var v = SM(a.roundCorners), m; try { for (v.s(); !(m = v.n()).done; ) { var g = m.value; DB(t, g); } } catch (x) { v.e(x); } finally { v.f(); } t.lineTo(n[n.length - 2], n[n.length - 1]); } else for (var y = 2; y + 1 < n.length; y += 2) t.lineTo(n[y], n[y + 1]); break; } t = o, l ? t.stroke(i) : t.stroke(), t.setLineDash && t.setLineDash([]); }; Pl.drawEdgeTrianglePath = function(e, t, n) { t.fillStyle = t.strokeStyle; for (var r = e.pstyle("width").pfValue, a = 0; a + 1 < n.length; a += 2) { var o = [n[a + 2] - n[a], n[a + 3] - n[a + 1]], i = Math.sqrt(o[0] * o[0] + o[1] * o[1]), s = [o[1] / i, -o[0] / i], l = [s[0] * r / 2, s[1] * r / 2]; t.beginPath(), t.moveTo(n[a] - l[0], n[a + 1] - l[1]), t.lineTo(n[a] + l[0], n[a + 1] + l[1]), t.lineTo(n[a + 2], n[a + 3]), t.closePath(), t.fill(); } }; Pl.drawArrowheads = function(e, t, n) { var r = t._private.rscratch, a = r.edgeType === "haystack"; a || 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), a || this.drawArrowhead(e, t, "target", r.arrowEndX, r.arrowEndY, r.tgtArrowAngle, n); }; Pl.drawArrowhead = function(e, t, n, r, a, o, i) { if (!(isNaN(r) || r == null || isNaN(a) || a == null || isNaN(o) || o == 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, f = t.pstyle(n + "-arrow-width"), h = f.value === "match-line" ? d : f.pfValue; f.units === "%" && (h *= d); var p = t.pstyle("opacity").value; i === void 0 && (i = p); 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, a, o), 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, a, o); } } }; Pl.drawArrowShape = function(e, t, n, r, a, o, i, s, l) { var u = this, c = this.usePaths() && a !== "triangle-cross", d = !1, f, h = t, p = { x: i, y: s }, v = e.pstyle("arrow-scale").value, m = this.getArrowWidth(r, v), g = u.arrowShapes[a]; if (c) { var y = u.arrowPathCache = u.arrowPathCache || [], x = yd(a), w = y[x]; w != null ? (f = t = w, d = !0) : (f = t = new Path2D(), y[x] = f); } d || (t.beginPath && t.beginPath(), c ? g.draw(t, 1, 0, { x: 0, y: 0 }, 1) : g.draw(t, m, l, p, 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(f) : t.fill()), (n === "hollow" || n === "both") && (t.lineWidth = o / (c ? m : 1), t.lineJoin = "miter", c ? t.stroke(f) : t.stroke()), c && (t.scale(1 / m, 1 / m), t.rotate(-l), t.translate(-i, -s)); }; var Q4 = {}; Q4.safeDrawImage = function(e, t, n, r, a, o, i, s, l, u) { if (!(a <= 0 || o <= 0 || l <= 0 || u <= 0)) try { e.drawImage(t, n, r, a, o, i, s, l, u); } catch (c) { Fn(c); } }; Q4.drawInscribedImage = function(e, t, n, r, a) { var o = 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), f = c(n, "background-repeat", "value", r), h = n.width(), p = n.height(), v = n.padding() * 2, m = h + (c(n, "background-width-relative-to", "value", r) === "inner" ? 0 : v), g = p + (c(n, "background-height-relative-to", "value", r) === "inner" ? 0 : v), y = n._private.rscratch, x = c(n, "background-clip", "value", r), w = x === "node", k = c(n, "background-image-opacity", "value", r) * a, C = c(n, "background-image-smoothing", "value", r), S = n.pstyle("corner-radius").value; S !== "auto" && (S = n.pstyle("corner-radius").pfValue); var _ = t.width || t.cachedW, T = t.height || t.cachedH; (_ == null || T == null) && (document.body.appendChild(t), _ = t.cachedW = t.width || t.offsetWidth, T = t.cachedH = t.height || t.offsetHeight, document.body.removeChild(t)); var O = _, $ = T; if (c(n, "background-width", "value", r) !== "auto" && (c(n, "background-width", "units", r) === "%" ? O = c(n, "background-width", "pfValue", r) * m : O = c(n, "background-width", "pfValue", r)), c(n, "background-height", "value", r) !== "auto" && (c(n, "background-height", "units", r) === "%" ? $ = c(n, "background-height", "pfValue", r) * g : $ = c(n, "background-height", "pfValue", r)), !(O === 0 || $ === 0)) { if (d === "contain") { var A = Math.min(m / O, g / $); O *= A, $ *= A; } else if (d === "cover") { var A = Math.max(m / O, g / $); O *= A, $ *= A; } var N = s - m / 2, L = c(n, "background-position-x", "units", r), R = c(n, "background-position-x", "pfValue", r); L === "%" ? N += (m - O) * R : N += R; var P = c(n, "background-offset-x", "units", r), B = c(n, "background-offset-x", "pfValue", r); P === "%" ? N += (m - O) * B : N += B; var M = l - g / 2, z = c(n, "background-position-y", "units", r), Z = c(n, "background-position-y", "pfValue", r); z === "%" ? M += (g - $) * Z : M += Z; var G = c(n, "background-offset-y", "units", r), J = c(n, "background-offset-y", "pfValue", r); G === "%" ? M += (g - $) * J : M += J, y.pathCache && (N -= s, M -= l, s = 0, l = 0); var se = e.globalAlpha; e.globalAlpha = k; var ve = o.getImgSmoothing(e), ge = !1; if (C === "no" && ve ? (o.setImgSmoothing(e, !1), ge = !0) : C === "yes" && !ve && (o.setImgSmoothing(e, !0), ge = !0), f === "no-repeat") w && (e.save(), y.pathCache ? e.clip(y.pathCache) : (o.nodeShapes[o.getNodeShape(n)].draw(e, s, l, m, g, S, y), e.clip())), o.safeDrawImage(e, t, 0, 0, _, T, N, M, O, $), w && e.restore(); else { var oe = e.createPattern(t, f); e.fillStyle = oe, o.nodeShapes[o.getNodeShape(n)].draw(e, s, l, m, g, S, y), e.translate(N, M), e.fill(), e.translate(-N, -M); } e.globalAlpha = se, ge && o.setImgSmoothing(e, ve); } }; var Jd = {}; Jd.eleTextBiggerThanMin = function(e, t) { if (!t) { var n = e.cy().zoom(), r = this.getPixelRatio(), a = Math.ceil(M4(n * r)); t = Math.pow(2, a); } var o = e.pstyle("font-size").pfValue * t, i = e.pstyle("min-zoomed-font-size").pfValue; return !(o < i); }; Jd.drawElementText = function(e, t, n, r, a) { var o = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : !0, i = this; if (r == null) { if (o && !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"), f = t.pstyle("target-label"); if (u || (!c || !c.value) && (!d || !d.value) && (!f || !f.value)) return; e.textAlign = "center", e.textBaseline = "bottom"; } var h = !n, p; n && (p = n, e.translate(-p.x1, -p.y1)), a == null ? (i.drawText(e, t, null, h, o), t.isEdge() && (i.drawText(e, t, "source", h, o), i.drawText(e, t, "target", h, o))) : i.drawText(e, t, a, h, o), n && e.translate(p.x1, p.y1); }; Jd.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; }; Jd.setupTextStyle = function(e, t) { var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !0, r = t.pstyle("font-style").strValue, a = t.pstyle("font-size").pfValue + "px", o = 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 + " " + a + " " + o, e.lineJoin = "round", this.colorFillStyle(e, u[0], u[1], u[2], s), this.colorStrokeStyle(e, c[0], c[1], c[2], l); }; function ok(e, t, n, r, a) { var o = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : 5, i = arguments.length > 6 ? arguments[6] : void 0; e.beginPath(), e.moveTo(t + o, n), e.lineTo(t + r - o, n), e.quadraticCurveTo(t + r, n, t + r, n + o), e.lineTo(t + r, n + a - o), e.quadraticCurveTo(t + r, n + a, t + r - o, n + a), e.lineTo(t + o, n + a), e.quadraticCurveTo(t, n + a, t, n + a - o), e.lineTo(t, n + o), e.quadraticCurveTo(t, n, t + o, n), e.closePath(), i ? e.stroke() : e.fill(); } Jd.getTextAngle = function(e, t) { var n, r = e._private, a = r.rscratch, o = t ? t + "-" : "", i = e.pstyle(o + "text-rotation"), s = Ii(a, "labelAngle", t); return i.strValue === "autorotate" ? n = e.isEdge() ? s : 0 : i.strValue === "none" ? n = 0 : n = i.pfValue, n; }; Jd.drawText = function(e, t, n) { var r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !0, a = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !0, o = t._private, i = o.rscratch, s = a ? t.effectiveOpacity() : 1; if (!(a && (s === 0 || t.pstyle("text-opacity").value === 0))) { n === "main" && (n = null); var l = Ii(i, "labelX", n), u = Ii(i, "labelY", n), c, d, f = this.getLabelText(t, n); if (f != null && f !== "" && !isNaN(l) && !isNaN(u)) { this.setupTextStyle(e, t, a); var h = n ? n + "-" : "", p = Ii(i, "labelWidth", n), v = Ii(i, "labelHeight", n), m = t.pstyle(h + "text-margin-x").pfValue, g = t.pstyle(h + "text-margin-y").pfValue, y = t.isEdge(), x = t.pstyle("text-halign").value, w = t.pstyle("text-valign").value; y && (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, S = t.pstyle("text-border-opacity").value, _ = t.pstyle("text-border-width").pfValue, T = t.pstyle("text-background-padding").pfValue, O = t.pstyle("text-background-shape").strValue, $ = O.indexOf("round") === 0, A = 2; if (C > 0 || _ > 0 && S > 0) { var N = l - T; switch (x) { case "left": N -= p; break; case "center": N -= p / 2; break; } var L = u - v - T, R = p + 2 * T, P = v + 2 * T; if (C > 0) { var B = e.fillStyle, M = t.pstyle("text-background-color").value; e.fillStyle = "rgba(" + M[0] + "," + M[1] + "," + M[2] + "," + C * s + ")", $ ? ok(e, N, L, R, P, A) : e.fillRect(N, L, R, P), e.fillStyle = B; } if (_ > 0 && S > 0) { var z = e.strokeStyle, Z = e.lineWidth, G = t.pstyle("text-border-color").value, J = t.pstyle("text-border-style").value; if (e.strokeStyle = "rgba(" + G[0] + "," + G[1] + "," + G[2] + "," + S * s + ")", e.lineWidth = _, e.setLineDash) switch (J) { 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 ($ ? ok(e, N, L, R, P, A, "stroke") : e.strokeRect(N, L, R, P), J === "double") { var se = _ / 2; $ ? ok(e, N + se, L + se, R - se * 2, P - se * 2, A, "stroke") : e.strokeRect(N + se, L + se, R - se * 2, P - se * 2); } e.setLineDash && e.setLineDash([]), e.lineWidth = Z, e.strokeStyle = z; } } var ve = 2 * t.pstyle("text-outline-width").pfValue; if (ve > 0 && (e.lineWidth = ve), t.pstyle("text-wrap").value === "wrap") { var ge = Ii(i, "labelWrapCachedLines", n), oe = Ii(i, "labelLineHeight", n), ee = p / 2, q = this.getLabelJustification(t); switch (q === "auto" || (x === "left" ? q === "left" ? l += -p : q === "center" && (l += -ee) : x === "center" ? q === "left" ? l += -ee : q === "right" && (l += ee) : x === "right" && (q === "center" ? l += ee : q === "right" && (l += p))), w) { case "top": u -= (ge.length - 1) * oe; break; case "center": case "bottom": u -= (ge.length - 1) * oe; break; } for (var Y = 0; Y < ge.length; Y++) ve > 0 && e.strokeText(ge[Y], l, u), e.fillText(ge[Y], l, u), u += oe; } else ve > 0 && e.strokeText(f, l, u), e.fillText(f, l, u); k !== 0 && (e.rotate(-k), e.translate(-c, -d)); } } }; var xh = {}; xh.drawNode = function(e, t, n) { var r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !0, a = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !0, o = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : !0, i = this, s, l, u = t._private, c = u.rscratch, d = t.position(); if (!(!ot(d.x) || !ot(d.y)) && !(o && !t.visible())) { var f = o ? t.effectiveOpacity() : 1, h = i.usePaths(), p, 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 y = t.pstyle("background-image"), x = y.value, w = new Array(x.length), k = new Array(x.length), C = 0, S = 0; S < x.length; S++) { var _ = x[S], T = w[S] = _ != null && _ !== "none"; if (T) { var O = t.cy().style().getIndexedStyle(t, "background-image-crossorigin", "value", S); C++, k[S] = i.getCachedImage(_, O, function() { u.backgroundTimestamp = Date.now(), t.emitAndNotify("background"); }); } } var $ = t.pstyle("background-blacken").value, A = t.pstyle("border-width").pfValue, N = t.pstyle("background-opacity").value * f, L = t.pstyle("border-color").value, R = t.pstyle("border-style").value, P = t.pstyle("border-join").value, B = t.pstyle("border-cap").value, M = t.pstyle("border-position").value, z = t.pstyle("border-dash-pattern").pfValue, Z = t.pstyle("border-dash-offset").pfValue, G = t.pstyle("border-opacity").value * f, J = t.pstyle("outline-width").pfValue, se = t.pstyle("outline-color").value, ve = t.pstyle("outline-style").value, ge = t.pstyle("outline-opacity").value * f, oe = t.pstyle("outline-offset").value, ee = t.pstyle("corner-radius").value; ee !== "auto" && (ee = t.pstyle("corner-radius").pfValue); var q = function() { var ke = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : N; i.eleFillStyle(e, t, ke); }, Y = function() { var ke = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : G; i.colorStrokeStyle(e, L[0], L[1], L[2], ke); }, te = function() { var ke = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : ge; i.colorStrokeStyle(e, se[0], se[1], se[2], ke); }, we = function(ke, fe, Ee, ze) { var Ve = i.nodePathCache = i.nodePathCache || [], me = BM(Ee === "polygon" ? Ee + "," + ze.join(",") : Ee, "" + fe, "" + ke, "" + ee), _e = Ve[me], Ce, Le = !1; return _e != null ? (Ce = _e, Le = !0, c.pathCache = Ce) : (Ce = new Path2D(), Ve[me] = c.pathCache = Ce), { path: Ce, cacheHit: Le }; }, Oe = t.pstyle("shape").strValue, Ne = t.pstyle("shape-polygon-points").pfValue; if (h) { e.translate(d.x, d.y); var xe = we(s, l, Oe, Ne); p = xe.path, v = xe.cacheHit; } var $e = function() { if (!v) { var ke = d; h && (ke = { x: 0, y: 0 }), i.nodeShapes[i.getNodeShape(t)].draw(p || e, ke.x, ke.y, s, l, ee, c); } h ? e.fill(p) : e.fill(); }, Se = function() { for (var ke = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : f, fe = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, Ee = u.backgrounding, ze = 0, Ve = 0; Ve < k.length; Ve++) { var me = t.cy().style().getIndexedStyle(t, "background-image-containment", "value", Ve); if (fe && me === "over" || !fe && me === "inside") { ze++; continue; } w[Ve] && k[Ve].complete && !k[Ve].error && (ze++, i.drawInscribedImage(e, k[Ve], t, Ve, ke)); } u.backgrounding = ze !== C, Ee !== u.backgrounding && t.updateStyle(!1); }, Pe = function() { var ke = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1, fe = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : f; i.hasPie(t) && (i.drawPie(e, t, fe), ke && (h || i.nodeShapes[i.getNodeShape(t)].draw(e, d.x, d.y, s, l, ee, c))); }, Me = function() { var ke = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : f, fe = ($ > 0 ? $ : -$) * ke, Ee = $ > 0 ? 0 : 255; $ !== 0 && (i.colorFillStyle(e, Ee, Ee, Ee, fe), h ? e.fill(p) : e.fill()); }, je = function() { if (A > 0) { if (e.lineWidth = A, e.lineCap = B, e.lineJoin = P, e.setLineDash) switch (R) { case "dotted": e.setLineDash([1, 1]); break; case "dashed": e.setLineDash(z), e.lineDashOffset = Z; break; case "solid": case "double": e.setLineDash([]); break; } if (M !== "center") { if (e.save(), e.lineWidth *= 2, M === "inside") h ? e.clip(p) : e.clip(); else { var ke = new Path2D(); ke.rect(-s / 2 - A, -l / 2 - A, s + 2 * A, l + 2 * A), ke.addPath(p), e.clip(ke, "evenodd"); } h ? e.stroke(p) : e.stroke(), e.restore(); } else h ? e.stroke(p) : e.stroke(); if (R === "double") { e.lineWidth = A / 3; var fe = e.globalCompositeOperation; e.globalCompositeOperation = "destination-out", h ? e.stroke(p) : e.stroke(), e.globalCompositeOperation = fe; } e.setLineDash && e.setLineDash([]); } }, Be = function() { if (J > 0) { if (e.lineWidth = J, e.lineCap = "butt", e.setLineDash) switch (ve) { case "dotted": e.setLineDash([1, 1]); break; case "dashed": e.setLineDash([4, 2]); break; case "solid": case "double": e.setLineDash([]); break; } var ke = d; h && (ke = { x: 0, y: 0 }); var fe = i.getNodeShape(t), Ee = A; M === "inside" && (Ee = 0), M === "outside" && (Ee *= 2); var ze = (s + Ee + (J + oe)) / s, Ve = (l + Ee + (J + oe)) / l, me = s * ze, _e = l * Ve, Ce = i.nodeShapes[fe].points, Le; if (h) { var yt = we(me, _e, fe, Ce); Le = yt.path; } if (fe === "ellipse") i.drawEllipsePath(Le || e, ke.x, ke.y, me, _e); else if (["round-diamond", "round-heptagon", "round-hexagon", "round-octagon", "round-pentagon", "round-polygon", "round-triangle", "round-tag"].includes(fe)) { var dt = 0, _t = 0, bt = 0; fe === "round-diamond" ? dt = (Ee + oe + J) * 1.4 : fe === "round-heptagon" ? (dt = (Ee + oe + J) * 1.075, bt = -(Ee / 2 + oe + J) / 35) : fe === "round-hexagon" ? dt = (Ee + oe + J) * 1.12 : fe === "round-pentagon" ? (dt = (Ee + oe + J) * 1.13, bt = -(Ee / 2 + oe + J) / 15) : fe === "round-tag" ? (dt = (Ee + oe + J) * 1.12, _t = (Ee / 2 + J + oe) * 0.07) : fe === "round-triangle" && (dt = (Ee + oe + J) * (Math.PI / 2), bt = -(Ee + oe / 2 + J) / Math.PI), dt !== 0 && (ze = (s + dt) / s, me = s * ze, ["round-hexagon", "round-tag"].includes(fe) || (Ve = (l + dt) / l, _e = l * Ve)), ee = ee === "auto" ? KM(me, _e) : ee; for (var Ct = me / 2, nn = _e / 2, Dt = ee + (Ee + J + oe) / 2, Kt = new Array(Ce.length / 2), on = new Array(Ce.length / 2), rn = 0; rn < Ce.length / 2; rn++) Kt[rn] = { x: ke.x + _t + Ct * Ce[rn * 2], y: ke.y + bt + nn * Ce[rn * 2 + 1] }; var Qt, Sn, En, pn, St = Kt.length; for (Sn = Kt[St - 1], Qt = 0; Qt < St; Qt++) En = Kt[Qt % St], pn = Kt[(Qt + 1) % St], on[Qt] = Y4(Sn, En, pn, Dt), Sn = En, En = pn; i.drawRoundPolygonPath(Le || e, ke.x + _t, ke.y + bt, s * ze, l * Ve, Ce, on); } else if (["roundrectangle", "round-rectangle"].includes(fe)) ee = ee === "auto" ? wd(me, _e) : ee, i.drawRoundRectanglePath(Le || e, ke.x, ke.y, me, _e, ee + (Ee + J + oe) / 2); else if (["cutrectangle", "cut-rectangle"].includes(fe)) ee = ee === "auto" ? D4() : ee, i.drawCutRectanglePath(Le || e, ke.x, ke.y, me, _e, null, ee + (Ee + J + oe) / 4); else if (["bottomroundrectangle", "bottom-round-rectangle"].includes(fe)) ee = ee === "auto" ? wd(me, _e) : ee, i.drawBottomRoundRectanglePath(Le || e, ke.x, ke.y, me, _e, ee + (Ee + J + oe) / 2); else if (fe === "barrel") i.drawBarrelPath(Le || e, ke.x, ke.y, me, _e); else if (fe.startsWith("polygon") || ["rhomboid", "right-rhomboid", "round-tag", "tag", "vee"].includes(fe)) { var Rt = (Ee + J + oe) / s; Ce = Yy(Zy(Ce, Rt)), i.drawPolygonPath(Le || e, ke.x, ke.y, s, l, Ce); } else { var qt = (Ee + J + oe) / s; Ce = Yy(Zy(Ce, -qt)), i.drawPolygonPath(Le || e, ke.x, ke.y, s, l, Ce); } if (h ? e.stroke(Le) : e.stroke(), ve === "double") { e.lineWidth = Ee / 3; var _n = e.globalCompositeOperation; e.globalCompositeOperation = "destination-out", h ? e.stroke(Le) : e.stroke(), e.globalCompositeOperation = _n; } e.setLineDash && e.setLineDash([]); } }, We = function() { a && i.drawNodeOverlay(e, t, d, s, l); }, qe = function() { a && i.drawNodeUnderlay(e, t, d, s, l); }, Ge = function() { i.drawElementText(e, t, null, r); }, E = t.pstyle("ghost").value === "yes"; if (E) { var V = t.pstyle("ghost-offset-x").pfValue, ie = t.pstyle("ghost-offset-y").pfValue, le = t.pstyle("ghost-opacity").value, re = le * f; e.translate(V, ie), te(), Be(), q(le * N), $e(), Se(re, !0), Y(le * G), je(), Pe($ !== 0 || A !== 0), Se(re, !1), Me(re), e.translate(-V, -ie); } h && e.translate(-d.x, -d.y), qe(), h && e.translate(d.x, d.y), te(), Be(), q(), $e(), Se(f, !0), Y(), je(), Pe($ !== 0 || A !== 0), Se(f, !1), Me(), h && e.translate(-d.x, -d.y), Ge(), We(), n && e.translate(g.x1, g.y1); } }; var YB = function(e) { if (!["overlay", "underlay"].includes(e)) throw new Error("Invalid state"); return function(t, n, r, a, o) { 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(), a == null || o == null) { var f = n.padding(); a = n.width() + 2 * f, o = n.height() + 2 * f; } i.colorFillStyle(t, u[0], u[1], u[2], l), i.nodeShapes[c].draw(t, r.x, r.y, a + s * 2, o + s * 2, d), t.fill(); } } }; }; xh.drawNodeOverlay = YB("overlay"); xh.drawNodeUnderlay = YB("underlay"); xh.hasPie = function(e) { return e = e[0], e._private.hasPie; }; xh.drawPie = function(e, t, n, r) { t = t[0], r = r || t.position(); var a = t.cy().style(), o = t.pstyle("pie-size"), i = r.x, s = r.y, l = t.width(), u = t.height(), c = Math.min(l, u) / 2, d = 0, f = this.usePaths(); f && (i = 0, s = 0), o.units === "%" ? c = c * o.pfValue : o.pfValue !== void 0 && (c = o.pfValue / 2); for (var h = 1; h <= a.pieBackgroundN; h++) { var p = 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 = p / 100; g + d > 1 && (g = 1 - d); var y = 1.5 * Math.PI + 2 * Math.PI * d, x = 2 * Math.PI * g, w = y + x; p === 0 || d >= 1 || d + g > 1 || (e.beginPath(), e.moveTo(i, s), e.arc(i, s, c, y, w), e.closePath(), this.colorFillStyle(e, v[0], v[1], v[2], m), e.fill(), d += g); } }; var Bo = {}, Lbe = 100; Bo.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; }; Bo.paintCache = function(e) { for (var t = this.paintCaches = this.paintCaches || [], n = !0, r, a = 0; a < t.length; a++) if (r = t[a], r.context === e) { n = !1; break; } return n && (r = { context: e }, t.push(r)), r; }; Bo.createGradientStyleFor = function(e, t, n, r, a) { var o, 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(), f = bd(u, d), h = bd(c, d); o = e.createRadialGradient(d.x, d.y, 0, d.x, d.y, Math.max(f, h)); } else { var p = i ? { x: 0, y: 0 } : n.position(), v = n.paddedWidth(), m = n.paddedHeight(); o = e.createRadialGradient(p.x, p.y, 0, p.x, p.y, Math.max(v, m)); } else if (n.isEdge()) { var g = n.sourceEndpoint(), y = n.targetEndpoint(); o = e.createLinearGradient(g.x, g.y, y.x, y.y); } else { var x = i ? { x: 0, y: 0 } : n.position(), w = n.paddedWidth(), k = n.paddedHeight(), C = w / 2, S = k / 2, _ = n.pstyle("background-gradient-direction").value; switch (_) { case "to-bottom": o = e.createLinearGradient(x.x, x.y - S, x.x, x.y + S); break; case "to-top": o = e.createLinearGradient(x.x, x.y + S, x.x, x.y - S); break; case "to-left": o = e.createLinearGradient(x.x + C, x.y, x.x - C, x.y); break; case "to-right": o = e.createLinearGradient(x.x - C, x.y, x.x + C, x.y); break; case "to-bottom-right": case "to-right-bottom": o = e.createLinearGradient(x.x - C, x.y - S, x.x + C, x.y + S); break; case "to-top-right": case "to-right-top": o = e.createLinearGradient(x.x - C, x.y + S, x.x + C, x.y - S); break; case "to-bottom-left": case "to-left-bottom": o = e.createLinearGradient(x.x + C, x.y - S, x.x - C, x.y + S); break; case "to-top-left": case "to-left-top": o = e.createLinearGradient(x.x + C, x.y + S, x.x - C, x.y - S); break; } } if (!o) return null; for (var T = l.length === s.length, O = s.length, $ = 0; $ < O; $++) o.addColorStop(T ? l[$] : $ / (O - 1), "rgba(" + s[$][0] + "," + s[$][1] + "," + s[$][2] + "," + a + ")"); return o; }; Bo.gradientFillStyle = function(e, t, n, r) { var a = this.createGradientStyleFor(e, "background", t, n, r); if (!a) return null; e.fillStyle = a; }; Bo.colorFillStyle = function(e, t, n, r, a) { e.fillStyle = "rgba(" + t + "," + n + "," + r + "," + a + ")"; }; Bo.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 a = t.pstyle("background-color").value; this.colorFillStyle(e, a[0], a[1], a[2], n); } }; Bo.gradientStrokeStyle = function(e, t, n, r) { var a = this.createGradientStyleFor(e, "line", t, n, r); if (!a) return null; e.strokeStyle = a; }; Bo.colorStrokeStyle = function(e, t, n, r, a) { e.strokeStyle = "rgba(" + t + "," + n + "," + r + "," + a + ")"; }; Bo.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 a = t.pstyle("line-color").value; this.colorStrokeStyle(e, a[0], a[1], a[2], n); } }; Bo.matchCanvasSize = function(e) { var t = this, n = t.data, r = t.findContainerClientCoords(), a = r[2], o = 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 = a * i, u = o * i, c; if (!(l === t.canvasWidth && u === t.canvasHeight)) { t.fontCaches = null; var d = n.canvasContainer; d.style.width = a + "px", d.style.height = o + "px"; for (var f = 0; f < t.CANVAS_LAYERS; f++) c = n.canvases[f], c.width = l, c.height = u, c.style.width = a + "px", c.style.height = o + "px"; for (var f = 0; f < t.BUFFER_COUNT; f++) c = n.bufferCanvases[f], c.width = l, c.height = u, c.style.width = a + "px", c.style.height = o + "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; } }; Bo.renderTo = function(e, t, n, r) { this.render({ forcedContext: e, forcedZoom: t, forcedPan: n, drawAllLayers: !0, forcedPxRatio: r }); }; Bo.render = function(e) { e = e || zM(); var t = e.forcedContext, n = e.drawAllLayers, r = e.drawOnlyNodeLayer, a = e.forcedZoom, o = 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), f = e.motionBlur !== void 0 ? e.motionBlur : i.motionBlur, h = i.motionBlurPxRatio, p = l.hasCompoundNodes(), v = i.hoverData.draggingEles, m = !!(i.hoverData.selecting || i.touchData.selecting); f = f && !t && i.motionBlurEnabled && !m; var g = f; 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), f && (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 y = l.style(), x = l.zoom(), w = a !== void 0 ? a : x, k = l.pan(), C = { x: k.x, y: k.y }, S = { zoom: x, pan: { x: k.x, y: k.y } }, _ = i.prevViewport, T = _ === void 0 || S.zoom !== _.zoom || S.pan.x !== _.pan.x || S.pan.y !== _.pan.y; !T && !(v && !p) && (i.motionBlurPxRatio = 1), o && (C = o), w *= s, C.x *= s, C.y *= s; var O = i.getCachedZSortedEles(); function $(xe, $e, Se, Pe, Me) { var je = xe.globalCompositeOperation; xe.globalCompositeOperation = "destination-out", i.colorFillStyle(xe, 255, 255, 255, i.motionBlurTransparency), xe.fillRect($e, Se, Pe, Me), xe.globalCompositeOperation = je; } function A(xe, $e) { var Se, Pe, Me, je; !i.clearingMotionBlur && (xe === u.bufferContexts[i.MOTIONBLUR_BUFFER_NODE] || xe === u.bufferContexts[i.MOTIONBLUR_BUFFER_DRAG]) ? (Se = { x: k.x * h, y: k.y * h }, Pe = x * h, Me = i.canvasWidth * h, je = i.canvasHeight * h) : (Se = C, Pe = w, Me = i.canvasWidth, je = i.canvasHeight), xe.setTransform(1, 0, 0, 1, 0, 0), $e === "motionBlur" ? $(xe, 0, 0, Me, je) : !t && ($e === void 0 || $e) && xe.clearRect(0, 0, Me, je), n || (xe.translate(Se.x, Se.y), xe.scale(Pe, Pe)), o && xe.translate(o.x, o.y), a && xe.scale(a, a); } 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 N = i.data.bufferContexts[i.TEXTURE_BUFFER]; N.setTransform(1, 0, 0, 1, 0, 0), N.clearRect(0, 0, i.canvasWidth * i.textureMult, i.canvasHeight * i.textureMult), i.render({ forcedContext: N, drawOnlyNodeLayer: !0, forcedPxRatio: s * i.textureMult }); var S = i.textureCache.viewport = { zoom: l.zoom(), pan: l.pan(), width: i.canvasWidth, height: i.canvasHeight }; S.mpan = { x: (0 - S.pan.x) / S.zoom, y: (0 - S.pan.y) / S.zoom }; } c[i.DRAG] = !1, c[i.NODE] = !1; var L = u.contexts[i.NODE], R = i.textureCache.texture, S = i.textureCache.viewport; L.setTransform(1, 0, 0, 1, 0, 0), f ? $(L, 0, 0, S.width, S.height) : L.clearRect(0, 0, S.width, S.height); var P = y.core("outside-texture-bg-color").value, B = y.core("outside-texture-bg-opacity").value; i.colorFillStyle(L, P[0], P[1], P[2], B), L.fillRect(0, 0, S.width, S.height); var x = l.zoom(); A(L, !1), L.clearRect(S.mpan.x, S.mpan.y, S.width / S.zoom / s, S.height / S.zoom / s), L.drawImage(R, S.mpan.x, S.mpan.y, S.width / S.zoom / s, S.height / S.zoom / s); } else i.textureOnViewport && !t && (i.textureCache = null); var M = l.extent(), z = i.pinching || i.hoverData.dragging || i.swipePanning || i.data.wheelZooming || i.hoverData.draggingEles || i.cy.animated(), Z = i.hideEdgesOnViewport && z, G = []; if (G[i.NODE] = !c[i.NODE] && f && !i.clearedForMotionBlur[i.NODE] || i.clearingMotionBlur, G[i.NODE] && (i.clearedForMotionBlur[i.NODE] = !0), G[i.DRAG] = !c[i.DRAG] && f && !i.clearedForMotionBlur[i.DRAG] || i.clearingMotionBlur, G[i.DRAG] && (i.clearedForMotionBlur[i.DRAG] = !0), c[i.NODE] || n || r || G[i.NODE]) { var J = f && !G[i.NODE] && h !== 1, L = t || (J ? i.data.bufferContexts[i.MOTIONBLUR_BUFFER_NODE] : u.contexts[i.NODE]), se = f && !J ? "motionBlur" : void 0; A(L, se), Z ? i.drawCachedNodes(L, O.nondrag, s, M) : i.drawLayeredElements(L, O.nondrag, s, M), i.debug && i.drawDebugPoints(L, O.nondrag), !n && !f && (c[i.NODE] = !1); } if (!r && (c[i.DRAG] || n || G[i.DRAG])) { var J = f && !G[i.DRAG] && h !== 1, L = t || (J ? i.data.bufferContexts[i.MOTIONBLUR_BUFFER_DRAG] : u.contexts[i.DRAG]); A(L, f && !J ? "motionBlur" : void 0), Z ? i.drawCachedNodes(L, O.drag, s, M) : i.drawCachedElements(L, O.drag, s, M), i.debug && i.drawDebugPoints(L, O.drag), !n && !f && (c[i.DRAG] = !1); } if (i.showFps || !r && c[i.SELECT_BOX] && !n) { var L = t || u.contexts[i.SELECT_BOX]; if (A(L), i.selection[4] == 1 && (i.hoverData.selecting || i.touchData.selecting)) { var x = i.cy.zoom(), ve = y.core("selection-box-border-width").value / x; L.lineWidth = ve, L.fillStyle = "rgba(" + y.core("selection-box-color").value[0] + "," + y.core("selection-box-color").value[1] + "," + y.core("selection-box-color").value[2] + "," + y.core("selection-box-opacity").value + ")", L.fillRect(i.selection[0], i.selection[1], i.selection[2] - i.selection[0], i.selection[3] - i.selection[1]), ve > 0 && (L.strokeStyle = "rgba(" + y.core("selection-box-border-color").value[0] + "," + y.core("selection-box-border-color").value[1] + "," + y.core("selection-box-border-color").value[2] + "," + y.core("selection-box-opacity").value + ")", L.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(), ge = u.bgActivePosistion; L.fillStyle = "rgba(" + y.core("active-bg-color").value[0] + "," + y.core("active-bg-color").value[1] + "," + y.core("active-bg-color").value[2] + "," + y.core("active-bg-opacity").value + ")", L.beginPath(), L.arc(ge.x, ge.y, y.core("active-bg-size").pfValue / x, 0, 2 * Math.PI), L.fill(); } var oe = i.lastRedrawTime; if (i.showFps && oe) { oe = Math.round(oe); var ee = Math.round(1e3 / oe); L.setTransform(1, 0, 0, 1, 0, 0), L.fillStyle = "rgba(255, 0, 0, 0.75)", L.strokeStyle = "rgba(255, 0, 0, 0.75)", L.lineWidth = 1, L.fillText("1 frame = " + oe + " ms = " + ee + " fps", 0, 20); var q = 60; L.strokeRect(0, 30, 250, 20), L.fillRect(0, 30, 250 * Math.min(ee / q, 1), 20); } n || (c[i.SELECT_BOX] = !1); } if (f && h !== 1) { var Y = u.contexts[i.NODE], te = i.data.bufferCanvases[i.MOTIONBLUR_BUFFER_NODE], we = u.contexts[i.DRAG], Oe = i.data.bufferCanvases[i.MOTIONBLUR_BUFFER_DRAG], Ne = function(xe, $e, Se) { xe.setTransform(1, 0, 0, 1, 0, 0), Se || !g ? xe.clearRect(0, 0, i.canvasWidth, i.canvasHeight) : $(xe, 0, 0, i.canvasWidth, i.canvasHeight); var Pe = h; xe.drawImage( $e, // img 0, 0, // sx, sy i.canvasWidth * Pe, i.canvasHeight * Pe, // sw, sh 0, 0, // x, y i.canvasWidth, i.canvasHeight // w, h ); }; (c[i.NODE] || G[i.NODE]) && (Ne(Y, te, G[i.NODE]), c[i.NODE] = !1), (c[i.DRAG] || G[i.DRAG]) && (Ne(we, Oe, G[i.DRAG]), c[i.DRAG] = !1); } i.prevViewport = S, i.clearingMotionBlur && (i.clearingMotionBlur = !1, i.motionBlurCleared = !0, i.motionBlur = !0), f && (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(); }, Lbe)), t || l.emit("render"); }; var lc = {}; lc.drawPolygonPath = function(e, t, n, r, a, o) { var i = r / 2, s = a / 2; e.beginPath && e.beginPath(), e.moveTo(t + i * o[0], n + s * o[1]); for (var l = 1; l < o.length / 2; l++) e.lineTo(t + i * o[l * 2], n + s * o[l * 2 + 1]); e.closePath(); }; lc.drawRoundPolygonPath = function(e, t, n, r, a, o, i) { i.forEach(function(s) { return DB(e, s); }), e.closePath(); }; lc.drawRoundRectanglePath = function(e, t, n, r, a, o) { var i = r / 2, s = a / 2, l = o === "auto" ? wd(r, a) : Math.min(o, 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(); }; lc.drawBottomRoundRectanglePath = function(e, t, n, r, a, o) { var i = r / 2, s = a / 2, l = o === "auto" ? wd(r, a) : o; 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(); }; lc.drawCutRectanglePath = function(e, t, n, r, a, o, i) { var s = r / 2, l = a / 2, u = i === "auto" ? D4() : 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(); }; lc.drawBarrelPath = function(e, t, n, r, a) { var o = r / 2, i = a / 2, s = t - o, l = t + o, u = n - i, c = n + i, d = HC(r, a), f = d.widthOffset, h = d.heightOffset, p = d.ctrlPtOffsetPct * f; e.beginPath && e.beginPath(), e.moveTo(s, u + h), e.lineTo(s, c - h), e.quadraticCurveTo(s + p, c, s + f, c), e.lineTo(l - f, c), e.quadraticCurveTo(l - p, c, l, c - h), e.lineTo(l, u + h), e.quadraticCurveTo(l - p, u, l - f, u), e.lineTo(s + f, u), e.quadraticCurveTo(s + p, u, s, u + h), e.closePath(); }; var FO = Math.sin(0), AO = Math.cos(0), t5 = {}, n5 = {}, ZB = Math.PI / 40; for (var _p = 0 * Math.PI; _p < 2 * Math.PI; _p += ZB) t5[_p] = Math.sin(_p), n5[_p] = Math.cos(_p); lc.drawEllipsePath = function(e, t, n, r, a) { if (e.beginPath && e.beginPath(), e.ellipse) e.ellipse(t, n, r / 2, a / 2, 0, 0, 2 * Math.PI); else for (var o, i, s = r / 2, l = a / 2, u = 0 * Math.PI; u < 2 * Math.PI; u += ZB) o = t - s * t5[u] * FO + s * n5[u] * AO, i = n + l * n5[u] * FO + l * t5[u] * AO, u === 0 ? e.moveTo(o, i) : e.lineTo(o, i); e.closePath(); }; var jg = {}; jg.createBuffer = function(e, t) { var n = document.createElement("canvas"); return n.width = e, n.height = t, [n, n.getContext("2d")]; }; jg.bufferCanvasImage = function(e) { var t = this.cy, n = t.mutableElements(), r = n.boundingBox(), a = this.findContainerClientCoords(), o = e.full ? Math.ceil(r.w) : a[2], i = e.full ? Math.ceil(r.h) : a[3], s = ot(e.maxWidth) || ot(e.maxHeight), l = this.getPixelRatio(), u = 1; if (e.scale !== void 0) o *= e.scale, i *= e.scale, u = e.scale; else if (s) { var c = 1 / 0, d = 1 / 0; ot(e.maxWidth) && (c = u * e.maxWidth / o), ot(e.maxHeight) && (d = u * e.maxHeight / i), u = Math.min(c, d), o *= u, i *= u; } s || (o *= l, i *= l, u *= l); var f = document.createElement("canvas"); f.width = o, f.height = i, f.style.width = o + "px", f.style.height = i + "px"; var h = f.getContext("2d"); if (o > 0 && i > 0) { h.clearRect(0, 0, o, i), h.globalCompositeOperation = "source-over"; var p = this.getCachedZSortedEles(); if (e.full) h.translate(-r.x1 * u, -r.y1 * u), h.scale(u, u), this.drawElements(h, p), 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, p), 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, o, i), h.fill()); } return f; }; function Nbe(e, t) { for (var n = atob(e), r = new ArrayBuffer(n.length), a = new Uint8Array(r), o = 0; o < n.length; o++) a[o] = n.charCodeAt(o); return new Blob([r], { type: t }); } function IO(e) { var t = e.indexOf(","); return e.substr(t + 1); } function QB(e, t, n) { var r = function() { return t.toDataURL(n, e.quality); }; switch (e.output) { case "blob-promise": return new fh(function(a, o) { try { t.toBlob(function(i) { i != null ? a(i) : o(new Error("`canvas.toBlob()` sent a null value in its callback")); }, n, e.quality); } catch (i) { o(i); } }); case "blob": return Nbe(IO(r()), n); case "base64": return IO(r()); case "base64uri": default: return r(); } } jg.png = function(e) { return QB(e, this.bufferCanvasImage(e), "image/png"); }; jg.jpg = function(e) { return QB(e, this.bufferCanvasImage(e), "image/jpeg"); }; var JB = {}; JB.nodeShapeImpl = function(e, t, n, r, a, o, i, s) { switch (e) { case "ellipse": return this.drawEllipsePath(t, n, r, a, o); case "polygon": return this.drawPolygonPath(t, n, r, a, o, i); case "round-polygon": return this.drawRoundPolygonPath(t, n, r, a, o, i, s); case "roundrectangle": case "round-rectangle": return this.drawRoundRectanglePath(t, n, r, a, o, s); case "cutrectangle": case "cut-rectangle": return this.drawCutRectanglePath(t, n, r, a, o, i, s); case "bottomroundrectangle": case "bottom-round-rectangle": return this.drawBottomRoundRectanglePath(t, n, r, a, o, s); case "barrel": return this.drawBarrelPath(t, n, r, a, o); } }; var Mbe = eD, bn = eD.prototype; bn.CANVAS_LAYERS = 3; bn.SELECT_BOX = 0; bn.DRAG = 1; bn.NODE = 2; bn.BUFFER_COUNT = 3; bn.TEXTURE_BUFFER = 0; bn.MOTIONBLUR_BUFFER_NODE = 1; bn.MOTIONBLUR_BUFFER_DRAG = 2; function eD(e) { var t = this, n = t.cy.window(), r = n.document; t.data = { canvases: new Array(bn.CANVAS_LAYERS), contexts: new Array(bn.CANVAS_LAYERS), canvasNeedsRedraw: new Array(bn.CANVAS_LAYERS), bufferCanvases: new Array(bn.BUFFER_COUNT), bufferContexts: new Array(bn.CANVAS_LAYERS) }; var a = "-webkit-tap-highlight-color", o = "rgba(0,0,0,0)"; t.data.canvasContainer = r.createElement("div"); var i = t.data.canvasContainer.style; t.data.canvasContainer.style[a] = o, i.position = "relative", i.zIndex = "0", i.overflow = "hidden"; var s = e.cy.container(); s.appendChild(t.data.canvasContainer), s.style[a] = o; 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" }; xhe() && (l["-ms-touch-action"] = "none", l["touch-action"] = "none"); for (var u = 0; u < bn.CANVAS_LAYERS; u++) { var c = t.data.canvases[u] = r.createElement("canvas"); t.data.contexts[u] = c.getContext("2d"), Object.keys(l).forEach(function(q) { c.style[q] = l[q]; }), c.style.position = "absolute", c.setAttribute("data-id", "layer" + u), c.style.zIndex = String(bn.CANVAS_LAYERS - u), t.data.canvasContainer.appendChild(c), t.data.canvasNeedsRedraw[u] = !1; } t.data.topCanvas = t.data.canvases[0], t.data.canvases[bn.NODE].setAttribute("data-id", "layer" + bn.NODE + "-node"), t.data.canvases[bn.SELECT_BOX].setAttribute("data-id", "layer" + bn.SELECT_BOX + "-selectbox"), t.data.canvases[bn.DRAG].setAttribute("data-id", "layer" + bn.DRAG + "-drag"); for (var u = 0; u < bn.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 = wo(), f = function(q) { return { x: (q.x1 + q.x2) / 2, y: (q.y1 + q.y2) / 2 }; }, h = function(q) { return { x: -q.w / 2, y: -q.h / 2 }; }, p = function(q) { var Y = q[0]._private, te = Y.oldBackgroundTimestamp === Y.backgroundTimestamp; return !te; }, v = function(q) { return q[0]._private.nodeKey; }, m = function(q) { return q[0]._private.labelStyleKey; }, g = function(q) { return q[0]._private.sourceLabelStyleKey; }, y = function(q) { return q[0]._private.targetLabelStyleKey; }, x = function(q, Y, te, we, Oe) { return t.drawElement(q, Y, te, !1, !1, Oe); }, w = function(q, Y, te, we, Oe) { return t.drawElementText(q, Y, te, we, "main", Oe); }, k = function(q, Y, te, we, Oe) { return t.drawElementText(q, Y, te, we, "source", Oe); }, C = function(q, Y, te, we, Oe) { return t.drawElementText(q, Y, te, we, "target", Oe); }, S = function(q) { return q.boundingBox(), q[0]._private.bodyBounds; }, _ = function(q) { return q.boundingBox(), q[0]._private.labelBounds.main || d; }, T = function(q) { return q.boundingBox(), q[0]._private.labelBounds.source || d; }, O = function(q) { return q.boundingBox(), q[0]._private.labelBounds.target || d; }, $ = function(q, Y) { return Y; }, A = function(q) { return f(S(q)); }, N = function(q, Y, te) { var we = q ? q + "-" : ""; return { x: Y.x + te.pstyle(we + "text-margin-x").pfValue, y: Y.y + te.pstyle(we + "text-margin-y").pfValue }; }, L = function(q, Y, te) { var we = q[0]._private.rscratch; return { x: we[Y], y: we[te] }; }, R = function(q) { return N("", L(q, "labelX", "labelY"), q); }, P = function(q) { return N("source", L(q, "sourceLabelX", "sourceLabelY"), q); }, B = function(q) { return N("target", L(q, "targetLabelX", "targetLabelY"), q); }, M = function(q) { return h(S(q)); }, z = function(q) { return h(T(q)); }, Z = function(q) { return h(O(q)); }, G = function(q) { var Y = _(q), te = h(_(q)); if (q.isNode()) { switch (q.pstyle("text-halign").value) { case "left": te.x = -Y.w; break; case "right": te.x = 0; break; } switch (q.pstyle("text-valign").value) { case "top": te.y = -Y.h; break; case "bottom": te.y = 0; break; } } return te; }, J = t.data.eleTxrCache = new Fv(t, { getKey: v, doesEleInvalidateKey: p, drawElement: x, getBoundingBox: S, getRotationPoint: A, getRotationOffset: M, allowEdgeTxrCaching: !1, allowParentTxrCaching: !1 }), se = t.data.lblTxrCache = new Fv(t, { getKey: m, drawElement: w, getBoundingBox: _, getRotationPoint: R, getRotationOffset: G, isVisible: $ }), ve = t.data.slbTxrCache = new Fv(t, { getKey: g, drawElement: k, getBoundingBox: T, getRotationPoint: P, getRotationOffset: z, isVisible: $ }), ge = t.data.tlbTxrCache = new Fv(t, { getKey: y, drawElement: C, getBoundingBox: O, getRotationPoint: B, getRotationOffset: Z, isVisible: $ }), oe = t.data.lyrTxrCache = new KB(t); t.onUpdateEleCalcs(function(q, Y) { J.invalidateElements(Y), se.invalidateElements(Y), ve.invalidateElements(Y), ge.invalidateElements(Y), oe.invalidateElements(Y); for (var te = 0; te < Y.length; te++) { var we = Y[te]._private; we.oldBackgroundTimestamp = we.backgroundTimestamp; } }); var ee = function(q) { for (var Y = 0; Y < q.length; Y++) oe.enqueueElementRefinement(q[Y].ele); }; J.onDequeue(ee), se.onDequeue(ee), ve.onDequeue(ee), ge.onDequeue(ee); } bn.redrawHint = function(e, t) { var n = this; switch (e) { case "eles": n.data.canvasNeedsRedraw[bn.NODE] = t; break; case "drag": n.data.canvasNeedsRedraw[bn.DRAG] = t; break; case "select": n.data.canvasNeedsRedraw[bn.SELECT_BOX] = t; break; } }; var Bbe = typeof Path2D < "u"; bn.path2dEnabled = function(e) { if (e === void 0) return this.pathsEnabled; this.pathsEnabled = !!e; }; bn.usePaths = function() { return Bbe && this.pathsEnabled; }; bn.setImgSmoothing = function(e, t) { e.imageSmoothingEnabled != null ? e.imageSmoothingEnabled = t : (e.webkitImageSmoothingEnabled = t, e.mozImageSmoothingEnabled = t, e.msImageSmoothingEnabled = t); }; bn.getImgSmoothing = function(e) { return e.imageSmoothingEnabled != null ? e.imageSmoothingEnabled : e.webkitImageSmoothingEnabled || e.mozImageSmoothingEnabled || e.msImageSmoothingEnabled; }; bn.makeOffscreenCanvas = function(e, t) { var n; if ((typeof OffscreenCanvas > "u" ? "undefined" : Dr(OffscreenCanvas)) !== "undefined") n = new OffscreenCanvas(e, t); else { var r = this.cy.window(), a = r.document; n = a.createElement("canvas"), n.width = e, n.height = t; } return n; }; [GB, Bs, Pl, Q4, Jd, xh, Bo, lc, jg, JB].forEach(function(e) { Ft(bn, e); }); var Dbe = [{ name: "null", impl: NB }, { name: "base", impl: qB }, { name: "canvas", impl: Mbe }], Rbe = [{ type: "layout", extensions: qye }, { type: "renderer", extensions: Dbe }], tD = {}, nD = {}; function rD(e, t, n) { var r = n, a = function(S) { Fn("Can not register `" + t + "` for `" + e + "` since `" + S + "` already exists in the prototype and can not be overridden"); }; if (e === "core") { if (eb.prototype[t]) return a(t); eb.prototype[t] = n; } else if (e === "collection") { if (ca.prototype[t]) return a(t); ca.prototype[t] = n; } else if (e === "layout") { for (var o = function(S) { this.options = S, n.call(this, S), Cn(this._private) || (this._private = {}), this._private.cy = S.cy, this._private.listeners = [], this.createEmitter(); }, i = o.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 S = this.options; if (S && S.animate) { var _ = this.animations; if (_) for (var T = 0; T < _.length; T++) _[T].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(S) { return S._private.cy; }, f = { addEventFields: function(S, _) { _.layout = S, _.cy = d(S), _.target = S; }, bubble: function() { return !0; }, parent: function(S) { return d(S); } }; Ft(i, { createEmitter: function() { return this._private.emitter = new q2(f, this), this; }, emitter: function() { return this._private.emitter; }, on: function(S, _) { return this.emitter().on(S, _), this; }, one: function(S, _) { return this.emitter().one(S, _), this; }, once: function(S, _) { return this.emitter().one(S, _), this; }, removeListener: function(S, _) { return this.emitter().removeListener(S, _), this; }, removeAllListeners: function() { return this.emitter().removeAllListeners(), this; }, emit: function(S, _) { return this.emitter().emit(S, _), this; } }), On.eventAliasesOn(i), r = o; } else if (e === "renderer" && t !== "null" && t !== "base") { var h = aD("renderer", "base"), p = h.prototype, v = n, m = n.prototype, g = function() { h.apply(this, arguments), v.apply(this, arguments); }, y = g.prototype; for (var x in p) { var w = p[x], k = m[x] != null; if (k) return a(x); y[x] = w; } for (var C in m) y[C] = m[C]; p.clientFunctions.forEach(function(S) { y[S] = y[S] || function() { dr("Renderer does not implement `renderer." + S + "()` on its prototype"); }; }), r = g; } else if (e === "__proto__" || e === "constructor" || e === "prototype") return dr(e + " is an illegal type to be registered, possibly lead to prototype pollutions"); return FM({ map: tD, keys: [e, t], value: r }); } function aD(e, t) { return AM({ map: tD, keys: [e, t] }); } function zbe(e, t, n, r, a) { return FM({ map: nD, keys: [e, t, n, r], value: a }); } function Vbe(e, t, n, r) { return AM({ map: nD, keys: [e, t, n, r] }); } var jbe = function() { if (arguments.length === 2) return aD.apply(null, arguments); if (arguments.length === 3) return rD.apply(null, arguments); if (arguments.length === 4) return Vbe.apply(null, arguments); if (arguments.length === 5) return zbe.apply(null, arguments); dr("Invalid extension access syntax"); }; eb.prototype.extension = jbe; Rbe.forEach(function(e) { e.extensions.forEach(function(t) { rD(e.type, t.name, t.impl); }); }); var Hbe = function e() { if (!(this instanceof e)) return new e(); this.length = 0; }, Cd = Hbe.prototype; Cd.instanceString = function() { return "stylesheet"; }; Cd.selector = function(e) { var t = this.length++; return this[t] = { selector: e, properties: [] }, this; }; Cd.css = function(e, t) { var n = this.length - 1; if (xt(e)) this[n].properties.push({ name: e, value: t }); else if (Cn(e)) for (var r = e, a = Object.keys(r), o = 0; o < a.length; o++) { var i = a[o], s = r[i]; if (s != null) { var l = _a.properties[i] || _a.properties[N2(i)]; if (l != null) { var u = l.name, c = s; this[n].properties.push({ name: u, value: c }); } } } return this; }; Cd.style = Cd.css; Cd.generateStyle = function(e) { var t = new _a(e); return this.appendToStyle(t); }; Cd.appendToStyle = function(e) { for (var t = 0; t < this.length; t++) { var n = this[t], r = n.selector, a = n.properties; e.selector(r); for (var o = 0; o < a.length; o++) { var i = a[o]; e.css(i.name, i.value); } } return e; }; const PO = "Copy to clipboard", Ube = "Copied!", qbe = "#8300bf", Wbe = { name: "CopyToClipboard", props: { content: { type: String, default: "" }, /** * `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: PO, autoHideTimeout: 0, iconColor: qbe }; }, 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 || "", a = new Blob([t], { type: "text/html" }), o = new Blob([r], { type: "text/plain" }), i = new ClipboardItem({ "text/html": a, "text/plain": o }); await navigator.clipboard.write([i]); } catch (t) { console.error( "Error when trying to use navigator.clipboard.write()", t ), e = !1; } e ? this.textLabel = Ube : this.textLabel = "Error trying to copy to clipboard!"; }, resetSettings: function() { this.autoHideTimeout = 0, this.textLabel = PO; } } }, Kbe = { class: "visually-hidden" }; function Gbe(e, t, n, r, a, o) { const i = ale, s = eo, l = Wy, u = L2; return I(), de(u, { content: e.textLabel, placement: "bottom", "hide-after": e.autoHideTimeout, effect: "clipboard-tooltip", onHide: o.resetSettings }, { default: K(() => [ ue(l, { class: H(["copy-clipboard-button", n.theme]), size: "small", onClick: o.copyToClipboard }, { default: K(() => [ ue(s, { color: e.iconColor }, { default: K(() => [ ue(i) ]), _: 1 }, 8, ["color"]), W("span", Kbe, Fe(e.textLabel), 1) ]), _: 1 }, 8, ["class", "onClick"]) ]), _: 1 }, 8, ["content", "hide-after", "onHide"]); } const oD = /* @__PURE__ */ xM(Wbe, [["render", Gbe], ["__scopeId", "data-v-de3b5311"]]), iD = ` 2horpanel ? `, sD = ` 2vertpanel ? `, lD = ` 3panel ? `, uD = ` 4panel ? `, cD = ` 2horpanel ? `, dD = ` 2horpanel ? `, pD = ` 4panel ? `, fD = ` changeBckgd `, hD = ` close no bk `, vD = ` close `, gD = ` closeFullScreen `, mD = ` Comment `, yD = ` Connection `, bD = ` dock `, wD = ` drawLine `, xD = ` drawPoint `, kD = ` drawPolygon `, CD = ` drawTrash `, SD = ` fitWindow `, ED = ` fullScreen `, _D = 'DataPortal-Icons', TD = ` magnifyingGlass `, OD = `Created by Wahyu Prihantorofrom the Noun Project`, $D = ` openMap `, FD = ` Artboard Copy 6 `, AD = ` permalink `, ID = ` play `, PD = ` resetZoom `, LD = ` singlepanel ? `, ND = ` tooltips ? `, MD = ` undock `, BD = ` zoomIn `, DD = ` zoomOut `, RD = (e, t, n, r) => { const a = ["title", "desc", "defs", "style"], o = ["width", "height"], i = r || []; let s = document.createElement("div"); s.innerHTML = e, a.map((u) => { const c = s.querySelector(u); c && c.remove(); }), o.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; }, zD = (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(), Xbe = !0, Ybe = !0, Zbe = ["fill"], LO = /* @__PURE__ */ Object.assign({ "/assets/icons/2horpanel.svg": iD, "/assets/icons/2vertpanel.svg": sD, "/assets/icons/3panel.svg": lD, "/assets/icons/4panel.svg": uD, "/assets/icons/5panel.svg": cD, "/assets/icons/6panel.svg": dD, "/assets/icons/6panelVertical.svg": pD, "/assets/icons/changeBckgd.svg": fD, "/assets/icons/close-no-bk.svg": hD, "/assets/icons/close.svg": vD, "/assets/icons/closeFullScreen.svg": gD, "/assets/icons/comment.svg": mD, "/assets/icons/connection.svg": yD, "/assets/icons/dock.svg": bD, "/assets/icons/drawLine.svg": wD, "/assets/icons/drawPoint.svg": xD, "/assets/icons/drawPolygon.svg": kD, "/assets/icons/drawTrash.svg": CD, "/assets/icons/fitWindow.svg": SD, "/assets/icons/fullScreen.svg": ED, "/assets/icons/help.svg": _D, "/assets/icons/magnifyingGlass.svg": TD, "/assets/icons/noun-filter.svg": OD, "/assets/icons/openMap.svg": $D, "/assets/icons/pause.svg": FD, "/assets/icons/permalink.svg": AD, "/assets/icons/play.svg": ID, "/assets/icons/resetZoom.svg": PD, "/assets/icons/singlepanel.svg": LD, "/assets/icons/tooltips.svg": ND, "/assets/icons/undock.svg": MD, "/assets/icons/zoomIn.svg": BD, "/assets/icons/zoomOut.svg": DD }), Qbe = Object.keys(LO).map((e) => { const t = RD(LO[e], Xbe, Ybe, Zbe), n = e.replace(/^.+\/(\w+).svg$/, "$1"); return zD(t).replace("", "symbol>"); }); Qbe.join(` `); const r5 = /* @__PURE__ */ Object.assign({ "/assets/icons/2horpanel.svg": iD, "/assets/icons/2vertpanel.svg": sD, "/assets/icons/3panel.svg": lD, "/assets/icons/4panel.svg": uD, "/assets/icons/5panel.svg": cD, "/assets/icons/6panel.svg": dD, "/assets/icons/6panelVertical.svg": pD, "/assets/icons/changeBckgd.svg": fD, "/assets/icons/close-no-bk.svg": hD, "/assets/icons/close.svg": vD, "/assets/icons/closeFullScreen.svg": gD, "/assets/icons/comment.svg": mD, "/assets/icons/connection.svg": yD, "/assets/icons/dock.svg": bD, "/assets/icons/drawLine.svg": wD, "/assets/icons/drawPoint.svg": xD, "/assets/icons/drawPolygon.svg": kD, "/assets/icons/drawTrash.svg": CD, "/assets/icons/fitWindow.svg": SD, "/assets/icons/fullScreen.svg": ED, "/assets/icons/help.svg": _D, "/assets/icons/magnifyingGlass.svg": TD, "/assets/icons/noun-filter.svg": OD, "/assets/icons/openMap.svg": $D, "/assets/icons/pause.svg": FD, "/assets/icons/permalink.svg": AD, "/assets/icons/play.svg": ID, "/assets/icons/resetZoom.svg": PD, "/assets/icons/singlepanel.svg": LD, "/assets/icons/tooltips.svg": ND, "/assets/icons/undock.svg": MD, "/assets/icons/zoomIn.svg": BD, "/assets/icons/zoomOut.svg": DD }), Jbe = Object.keys(r5).map((e) => { const t = RD(r5[e]), n = e.replace(/^.+\/(\w+).svg$/, "$1"); return zD(t).replace("", "symbol>"); }); Jbe.join(` `); const e2e = { 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" ), a = ((t = r == null ? void 0 : r.style) == null ? void 0 : t.transform) || "", o = this.extractMarkerPosition(a); n.forEach((i) => { const s = i.style.transform; this.extractMarkerPosition(s) === o && 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(), a = 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 || a.forEach((o) => { o.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) : ""; } } }, J4 = (e) => (No("data-v-3efb89fb"), e = e(), Mo(), e), t2e = /* @__PURE__ */ J4(() => /* @__PURE__ */ W("h4", null, "Help Mode", -1)), n2e = /* @__PURE__ */ J4(() => /* @__PURE__ */ W("p", null, [ /* @__PURE__ */ et(" All caught up! "), /* @__PURE__ */ W("br"), /* @__PURE__ */ et(" Click 'Help' to restart. ") ], -1)), r2e = /* @__PURE__ */ J4(() => /* @__PURE__ */ W("p", null, 'Click "Next" to see the next item.', -1)); function a2e(e, t, n, r, a, o) { const i = Wy; return I(), j("div", { class: H(["help-mode-dialog", { finish: n.lastItem }]) }, [ t2e, n.lastItem ? (I(), j(Qe, { key: 0 }, [ n2e, W("div", null, [ ue(i, { class: "button", onClick: o.finishHelpMode }, { default: K(() => [ et(" Finish ") ]), _: 1 }, 8, ["onClick"]) ]) ], 64)) : (I(), j(Qe, { key: 1 }, [ r2e, W("div", null, [ ue(i, { class: "button", onClick: o.showNext }, { default: K(() => [ et(" Next ") ]), _: 1 }, 8, ["onClick"]), ue(i, { class: "button secondary", onClick: o.finishHelpMode }, { default: K(() => [ et(" Exit Help Mode ") ]), _: 1 }, 8, ["onClick"]) ]) ], 64)) ], 2); } const zot = /* @__PURE__ */ xM(e2e, [["render", a2e], ["__scopeId", "data-v-3efb89fb"]]), o2e = { 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; } } }; function VD() { 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 ep = VD(); function i2e(e) { ep = e; } const jD = /[&<>"']/, s2e = new RegExp(jD.source, "g"), HD = /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, l2e = new RegExp(HD.source, "g"), u2e = { "&": "&", "<": "<", ">": ">", '"': """, "'": "'" }, NO = (e) => u2e[e]; function ka(e, t) { if (t) { if (jD.test(e)) return e.replace(s2e, NO); } else if (HD.test(e)) return e.replace(l2e, NO); return e; } const c2e = /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig; function UD(e) { return e.replace(c2e, (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 d2e = /(^|[^\[])\^/g; function jn(e, t) { e = typeof e == "string" ? e : e.source, t = t || ""; const n = { replace: (r, a) => (a = a.source || a, a = a.replace(d2e, "$1"), e = e.replace(r, a), n), getRegex: () => new RegExp(e, t) }; return n; } const p2e = /[^\w:]/g, f2e = /^$|^[a-z][a-z0-9+.-]*:|^[?#]/i; function MO(e, t, n) { if (e) { let r; try { r = decodeURIComponent(UD(n)).replace(p2e, "").toLowerCase(); } catch { return null; } if (r.indexOf("javascript:") === 0 || r.indexOf("vbscript:") === 0 || r.indexOf("data:") === 0) return null; } t && !f2e.test(n) && (n = m2e(t, n)); try { n = encodeURI(n).replace(/%25/g, "%"); } catch { return null; } return n; } const Jm = {}, h2e = /^[^:]+:\/*[^/]*$/, v2e = /^([^:]+:)[\s\S]*$/, g2e = /^([^:]+:\/*[^/]*)[\s\S]*$/; function m2e(e, t) { Jm[" " + e] || (h2e.test(e) ? Jm[" " + e] = e + "/" : Jm[" " + e] = oy(e, "/", !0)), e = Jm[" " + e]; const n = e.indexOf(":") === -1; return t.substring(0, 2) === "//" ? n ? t : e.replace(v2e, "$1") + t : t.charAt(0) === "/" ? n ? t : e.replace(g2e, "$1") + t : e + t; } const ob = { exec: function() { } }; function BO(e, t) { const n = e.replace(/\|/g, (o, i, s) => { let l = !1, u = i; for (; --u >= 0 && s[u] === "\\"; ) l = !l; return l ? "|" : " |"; }), r = n.split(/ \|/); let a = 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 (; a < r.length; a++) r[a] = r[a].trim().replace(/\\\|/g, "|"); return r; } function oy(e, t, n) { const r = e.length; if (r === 0) return ""; let a = 0; for (; a < r; ) { const o = e.charAt(r - a - 1); if (o === t && !n) a++; else if (o !== t && n) a++; else break; } return e.slice(0, r - a); } function y2e(e, t) { if (e.indexOf(t[1]) === -1) return -1; const n = e.length; let r = 0, a = 0; for (; a < n; a++) if (e[a] === "\\") a++; else if (e[a] === t[0]) r++; else if (e[a] === t[1] && (r--, r < 0)) return a; return -1; } function b2e(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 DO(e, t) { if (t < 1) return ""; let n = ""; for (; t > 1; ) t & 1 && (n += e), t >>= 1, e += e; return n + e; } function RO(e, t, n, r) { const a = t.href, o = t.title ? ka(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: a, title: o, text: i, tokens: r.inlineTokens(i) }; return r.state.inLink = !1, s; } return { type: "image", raw: n, href: a, title: o, text: ka(i) }; } function w2e(e, t) { const n = e.match(/^(\s+)(?:```)/); if (n === null) return t; const r = n[1]; return t.split(` `).map((a) => { const o = a.match(/^\s+/); if (o === null) return a; const [i] = o; return i.length >= r.length ? a.slice(r.length) : a; }).join(` `); } class e3 { constructor(t) { this.options = t || ep; } 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 : oy(r, ` `) }; } } fences(t) { const n = this.rules.block.fences.exec(t); if (n) { const r = n[0], a = w2e(r, n[3] || ""); return { type: "code", raw: r, lang: n[2] ? n[2].trim().replace(this.rules.inline._escapes, "$1") : n[2], text: a }; } } heading(t) { const n = this.rules.block.heading.exec(t); if (n) { let r = n[2].trim(); if (/#$/.test(r)) { const a = oy(r, "#"); (this.options.pedantic || !a || / $/.test(a)) && (r = a.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, ""), a = this.lexer.state.top; this.lexer.state.top = !0; const o = this.lexer.blockTokens(r); return this.lexer.state.top = a, { type: "blockquote", raw: n[0], tokens: o, text: r }; } } list(t) { let n = this.rules.block.list.exec(t); if (n) { let r, a, o, i, s, l, u, c, d, f, h, p, 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 y = new RegExp(`^( {0,3}${v})((?:[ ][^\\n]*)?(?:\\n|$))`); for (; t && (p = !1, !(!(n = y.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), p = !0), !p) { 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)}}(?:\`\`\`|~~~)`), S = new RegExp(`^ {0,${Math.min(3, i - 1)}}#`); for (; t && (f = t.split(` `, 1)[0], d = f, this.options.pedantic && (d = d.replace(/^ {1,4}(?=( {4})*[^ ])/g, " ")), !(C.test(d) || S.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) || S.test(c) || k.test(c)) break; h += ` ` + d; } !l && !d.trim() && (l = !0), r += f + ` `, t = t.substring(f.length + 1), c = d.slice(i); } } g.loose || (u ? g.loose = !0 : /\n *\n *$/.test(r) && (u = !0)), this.options.gfm && (a = /^\[[ xX]\] /.exec(h), a && (o = a[0] !== "[ ] ", h = h.replace(/^\[[ xX]\] +/, ""))), g.items.push({ type: "list_item", raw: r, task: !!a, checked: o, 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 a = this.options.sanitizer ? this.options.sanitizer(n[0]) : ka(n[0]); r.type = "paragraph", r.text = a, r.tokens = this.lexer.inline(a); } return r; } } def(t) { const n = this.rules.block.def.exec(t); if (n) { const r = n[1].toLowerCase().replace(/\s+/g, " "), a = n[2] ? n[2].replace(/^<(.*)>$/, "$1").replace(this.rules.inline._escapes, "$1") : "", o = 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: a, title: o }; } } table(t) { const n = this.rules.block.table.exec(t); if (n) { const r = { type: "table", header: BO(n[1]).map((a) => ({ text: a })), 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 a = r.align.length, o, i, s, l; for (o = 0; o < a; o++) /^ *-+: *$/.test(r.align[o]) ? r.align[o] = "right" : /^ *:-+: *$/.test(r.align[o]) ? r.align[o] = "center" : /^ *:-+ *$/.test(r.align[o]) ? r.align[o] = "left" : r.align[o] = null; for (a = r.rows.length, o = 0; o < a; o++) r.rows[o] = BO(r.rows[o], r.header.length).map((u) => ({ text: u })); for (a = r.header.length, i = 0; i < a; i++) r.header[i].tokens = this.lexer.inline(r.header[i].text); for (a = r.rows.length, i = 0; i < a; 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: ka(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]) : ka(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 = oy(r.slice(0, -1), "\\"); if ((r.length - i.length) % 2 === 0) return; } else { const i = y2e(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 a = n[2], o = ""; if (this.options.pedantic) { const i = /^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(a); i && (a = i[1], o = i[3]); } else o = n[3] ? n[3].slice(1, -1) : ""; return a = a.trim(), /^$/.test(r) ? a = a.slice(1) : a = a.slice(1, -1)), RO(n, { href: a && a.replace(this.rules.inline._escapes, "$1"), title: o && o.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 a = (r[2] || r[1]).replace(/\s+/g, " "); if (a = n[a.toLowerCase()], !a) { const o = r[0].charAt(0); return { type: "text", raw: o, text: o }; } return RO(r, a, r[0], this.lexer); } } emStrong(t, n, r = "") { let a = this.rules.inline.emStrong.lDelim.exec(t); if (!a || a[3] && r.match(/[\p{L}\p{N}]/u)) return; const o = a[1] || a[2] || ""; if (!o || o && (r === "" || this.rules.inline.punctuation.exec(r))) { const i = a[0].length - 1; let s, l, u = i, c = 0; const d = a[0][0] === "*" ? this.rules.inline.emStrong.rDelimAst : this.rules.inline.emStrong.rDelimUnd; for (d.lastIndex = 0, n = n.slice(-1 * t.length + i); (a = d.exec(n)) != null; ) { if (s = a[1] || a[2] || a[3] || a[4] || a[5] || a[6], !s) continue; if (l = s.length, a[3] || a[4]) { u += l; continue; } else if ((a[5] || a[6]) && i % 3 && !((i + l) % 3)) { c += l; continue; } if (u -= l, u > 0) continue; l = Math.min(l, l + u + c); const f = t.slice(0, i + a.index + (a[0].length - s.length) + l); if (Math.min(i, l) % 2) { const p = f.slice(1, -1); return { type: "em", raw: f, text: p, tokens: this.lexer.inlineTokens(p) }; } const h = f.slice(2, -2); return { type: "strong", raw: f, 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 a = /[^ ]/.test(r), o = /^ /.test(r) && / $/.test(r); return a && o && (r = r.substring(1, r.length - 1)), r = ka(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 a, o; return r[2] === "@" ? (a = ka(this.options.mangle ? n(r[1]) : r[1]), o = "mailto:" + a) : (a = ka(r[1]), o = a), { type: "link", raw: r[0], text: a, href: o, tokens: [ { type: "text", raw: a, text: a } ] }; } } url(t, n) { let r; if (r = this.rules.inline.url.exec(t)) { let a, o; if (r[2] === "@") a = ka(this.options.mangle ? n(r[0]) : r[0]), o = "mailto:" + a; else { let i; do i = r[0], r[0] = this.rules.inline._backpedal.exec(r[0])[0]; while (i !== r[0]); a = ka(r[0]), r[1] === "www." ? o = "http://" + r[0] : o = r[0]; } return { type: "link", raw: r[0], text: a, href: o, tokens: [ { type: "text", raw: a, text: a } ] }; } } inlineText(t, n) { const r = this.rules.inline.text.exec(t); if (r) { let a; return this.lexer.state.inRawBlock ? a = this.options.sanitize ? this.options.sanitizer ? this.options.sanitizer(r[0]) : ka(r[0]) : r[0] : a = ka(this.options.smartypants ? n(r[0]) : r[0]), { type: "text", raw: r[0], text: a }; } } } const Et = { 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: ob, 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]+/ }; Et._label = /(?!\s*\])(?:\\.|[^\[\]\\])+/; Et._title = /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/; Et.def = jn(Et.def).replace("label", Et._label).replace("title", Et._title).getRegex(); Et.bullet = /(?:[*+-]|\d{1,9}[.)])/; Et.listItemStart = jn(/^( *)(bull) */).replace("bull", Et.bullet).getRegex(); Et.list = jn(Et.list).replace(/bull/g, Et.bullet).replace("hr", "\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def", "\\n+(?=" + Et.def.source + ")").getRegex(); Et._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"; Et._comment = /|$)/; Et.html = jn(Et.html, "i").replace("comment", Et._comment).replace("tag", Et._tag).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(); Et.paragraph = jn(Et._paragraph).replace("hr", Et.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", Et._tag).getRegex(); Et.blockquote = jn(Et.blockquote).replace("paragraph", Et.paragraph).getRegex(); Et.normal = { ...Et }; Et.gfm = { ...Et.normal, table: "^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)" // Cells }; Et.gfm.table = jn(Et.gfm.table).replace("hr", Et.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", Et._tag).getRegex(); Et.gfm.paragraph = jn(Et._paragraph).replace("hr", Et.hr).replace("heading", " {0,3}#{1,6} ").replace("|lheading", "").replace("table", Et.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", Et._tag).getRegex(); Et.pedantic = { ...Et.normal, html: jn( `^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))` ).replace("comment", Et._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: ob, // fences not supported lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: jn(Et.normal._paragraph).replace("hr", Et.hr).replace("heading", ` *#{1,6} *[^ ]`).replace("lheading", Et.lheading).replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").getRegex() }; const ht = { escape: /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, autolink: /^<(scheme:[^\s\x00-\x1f<>]*|email)>/, url: ob, 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: ob, text: /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~"; ht.punctuation = jn(ht.punctuation).replace(/punctuation/g, ht._punctuation).getRegex(); ht.blockSkip = /\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g; ht.escapedEmSt = /(?:^|[^\\])(?:\\\\)*\\[*_]/g; ht._comment = jn(Et._comment).replace("(?:-->|$)", "-->").getRegex(); ht.emStrong.lDelim = jn(ht.emStrong.lDelim).replace(/punct/g, ht._punctuation).getRegex(); ht.emStrong.rDelimAst = jn(ht.emStrong.rDelimAst, "g").replace(/punct/g, ht._punctuation).getRegex(); ht.emStrong.rDelimUnd = jn(ht.emStrong.rDelimUnd, "g").replace(/punct/g, ht._punctuation).getRegex(); ht._escapes = /\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g; ht._scheme = /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/; ht._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])?)+(?![-_])/; ht.autolink = jn(ht.autolink).replace("scheme", ht._scheme).replace("email", ht._email).getRegex(); ht._attribute = /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/; ht.tag = jn(ht.tag).replace("comment", ht._comment).replace("attribute", ht._attribute).getRegex(); ht._label = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/; ht._href = /<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/; ht._title = /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/; ht.link = jn(ht.link).replace("label", ht._label).replace("href", ht._href).replace("title", ht._title).getRegex(); ht.reflink = jn(ht.reflink).replace("label", ht._label).replace("ref", Et._label).getRegex(); ht.nolink = jn(ht.nolink).replace("ref", Et._label).getRegex(); ht.reflinkSearch = jn(ht.reflinkSearch, "g").replace("reflink", ht.reflink).replace("nolink", ht.nolink).getRegex(); ht.normal = { ...ht }; ht.pedantic = { ...ht.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: jn(/^!?\[(label)\]\((.*?)\)/).replace("label", ht._label).getRegex(), reflink: jn(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", ht._label).getRegex() }; ht.gfm = { ...ht.normal, escape: jn(ht.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 qu { constructor(t) { this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = t || ep, this.options.tokenizer = this.options.tokenizer || new e3(), 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: Et.normal, inline: ht.normal }; this.options.pedantic ? (n.block = Et.pedantic, n.inline = ht.pedantic) : this.options.gfm && (n.block = Et.gfm, this.options.breaks ? n.inline = ht.breaks : n.inline = ht.gfm), this.tokenizer.rules = n; } /** * Expose Rules */ static get rules() { return { block: Et, inline: ht }; } /** * Static Lex Method */ static lex(t, n) { return new qu(n).lex(t); } /** * Static Lex Inline Method */ static lexInline(t, n) { return new qu(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, a, o, 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), a = n[n.length - 1], a && (a.type === "paragraph" || a.type === "text") ? (a.raw += ` ` + r.raw, a.text += ` ` + r.text, this.inlineQueue[this.inlineQueue.length - 1].src = a.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), a = n[n.length - 1], a && (a.type === "paragraph" || a.type === "text") ? (a.raw += ` ` + r.raw, a.text += ` ` + r.raw, this.inlineQueue[this.inlineQueue.length - 1].src = a.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 (o = 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 && (o = t.substring(0, s + 1)); } if (this.state.top && (r = this.tokenizer.paragraph(o))) { a = n[n.length - 1], i && a.type === "paragraph" ? (a.raw += ` ` + r.raw, a.text += ` ` + r.text, this.inlineQueue.pop(), this.inlineQueue[this.inlineQueue.length - 1].src = a.text) : n.push(r), i = o.length !== t.length, t = t.substring(r.raw.length); continue; } if (r = this.tokenizer.text(t)) { t = t.substring(r.raw.length), a = n[n.length - 1], a && a.type === "text" ? (a.raw += ` ` + r.raw, a.text += ` ` + r.text, this.inlineQueue.pop(), this.inlineQueue[this.inlineQueue.length - 1].src = a.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, a, o, 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) + "[" + DO("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) + "[" + DO("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), a = n[n.length - 1], a && r.type === "text" && a.type === "text" ? (a.raw += r.raw, a.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), a = n[n.length - 1], a && r.type === "text" && a.type === "text" ? (a.raw += r.raw, a.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, zO)) { t = t.substring(r.raw.length), n.push(r); continue; } if (!this.state.inLink && (r = this.tokenizer.url(t, zO))) { t = t.substring(r.raw.length), n.push(r); continue; } if (o = t, this.options.extensions && this.options.extensions.startInline) { let c = 1 / 0; const d = t.slice(1); let f; this.options.extensions.startInline.forEach(function(h) { f = h.call({ lexer: this }, d), typeof f == "number" && f >= 0 && (c = Math.min(c, f)); }), c < 1 / 0 && c >= 0 && (o = t.substring(0, c + 1)); } if (r = this.tokenizer.inlineText(o, x2e)) { t = t.substring(r.raw.length), r.raw.slice(-1) !== "_" && (u = r.raw.slice(-1)), l = !0, a = n[n.length - 1], a && a.type === "text" ? (a.raw += r.raw, a.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 t3 { constructor(t) { this.options = t || ep; } code(t, n, r) { const a = (n || "").match(/\S*/)[0]; if (this.options.highlight) { const o = this.options.highlight(t, a); o != null && o !== t && (r = !0, t = o); } return t = t.replace(/\n$/, "") + ` `, a ? '
' + (r ? t : ka(t, !0)) + `
` : "
" + (r ? t : ka(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, a) { if (this.options.headerIds) { const o = this.options.headerPrefix + a.slug(r); return `${t} `; } return `${t} `; } hr() { return this.options.xhtml ? `
` : `
`; } list(t, n, r) { const a = n ? "ol" : "ul", o = n && r !== 1 ? ' start="' + r + '"' : ""; return "<" + a + o + `> ` + 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 = MO(this.options.sanitize, this.options.baseUrl, t), t === null) return r; let a = '
    ", a; } /** * @param {string} href * @param {string} title * @param {string} text */ image(t, n, r) { if (t = MO(this.options.sanitize, this.options.baseUrl, t), t === null) return r; let a = `${r}" : ">", a; } text(t) { return t; } } class qD { // 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 WD { 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, a = 0; if (this.seen.hasOwnProperty(r)) { a = this.seen[t]; do a++, r = t + "-" + a; while (this.seen.hasOwnProperty(r)); } return n || (this.seen[t] = a, 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 Wu { constructor(t) { this.options = t || ep, this.options.renderer = this.options.renderer || new t3(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.textRenderer = new qD(), this.slugger = new WD(); } /** * Static Parse Method */ static parse(t, n) { return new Wu(n).parse(t); } /** * Static Parse Inline Method */ static parseInline(t, n) { return new Wu(n).parseInline(t); } /** * Parse Loop */ parse(t, n = !0) { let r = "", a, o, i, s, l, u, c, d, f, h, p, v, m, g, y, x, w, k, C; const S = t.length; for (a = 0; a < S; a++) { if (h = t[a], 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, UD(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, o = 0; o < s; o++) c += this.renderer.tablecell( this.parseInline(h.header[o].tokens), { header: !0, align: h.align[o] } ); for (d += this.renderer.tablerow(c), f = "", s = h.rows.length, o = 0; o < s; o++) { for (u = h.rows[o], c = "", l = u.length, i = 0; i < l; i++) c += this.renderer.tablecell( this.parseInline(u[i].tokens), { header: !1, align: h.align[i] } ); f += this.renderer.tablerow(c); } r += this.renderer.table(d, f); continue; } case "blockquote": { f = this.parse(h.tokens), r += this.renderer.blockquote(f); continue; } case "list": { for (p = h.ordered, v = h.start, m = h.loose, s = h.items.length, f = "", o = 0; o < s; o++) y = h.items[o], x = y.checked, w = y.task, g = "", y.task && (k = this.renderer.checkbox(x), m ? y.tokens.length > 0 && y.tokens[0].type === "paragraph" ? (y.tokens[0].text = k + " " + y.tokens[0].text, y.tokens[0].tokens && y.tokens[0].tokens.length > 0 && y.tokens[0].tokens[0].type === "text" && (y.tokens[0].tokens[0].text = k + " " + y.tokens[0].tokens[0].text)) : y.tokens.unshift({ type: "text", text: k }) : g += k), g += this.parse(y.tokens, m), f += this.renderer.listitem(g, w, x); r += this.renderer.list(f, p, 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 (f = h.tokens ? this.parseInline(h.tokens) : h.text; a + 1 < S && t[a + 1].type === "text"; ) h = t[++a], f += ` ` + (h.tokens ? this.parseInline(h.tokens) : h.text); r += n ? this.renderer.paragraph(f) : f; 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 = "", a, o, i; const s = t.length; for (a = 0; a < s; a++) { if (o = t[a], this.options.extensions && this.options.extensions.renderers && this.options.extensions.renderers[o.type] && (i = this.options.extensions.renderers[o.type].call({ parser: this }, o), i !== !1 || !["escape", "html", "link", "image", "strong", "em", "codespan", "br", "del", "text"].includes(o.type))) { r += i || ""; continue; } switch (o.type) { case "escape": { r += n.text(o.text); break; } case "html": { r += n.html(o.text); break; } case "link": { r += n.link(o.href, o.title, this.parseInline(o.tokens, n)); break; } case "image": { r += n.image(o.href, o.title, o.text); break; } case "strong": { r += n.strong(this.parseInline(o.tokens, n)); break; } case "em": { r += n.em(this.parseInline(o.tokens, n)); break; } case "codespan": { r += n.codespan(o.text); break; } case "br": { r += n.br(); break; } case "del": { r += n.del(this.parseInline(o.tokens, n)); break; } case "text": { r += n.text(o.text); break; } default: { const l = 'Token with "' + o.type + '" type was not found.'; if (this.options.silent) { console.error(l); return; } else throw new Error(l); } } } return r; } } class ib { constructor(t) { this.options = t || ep; } /** * Process markdown before marked */ preprocess(t) { return t; } /** * Process HTML after marked is finished */ postprocess(t) { return t; } } L_(ib, "passThroughHooks", /* @__PURE__ */ new Set([ "preprocess", "postprocess" ])); function k2e(e, t, n) { return (r) => { if (r.message += ` Please report this to https://github.com/markedjs/marked.`, e) { const a = "

    An error occurred:

    " + ka(r.message + "", !0) + "
    "; if (t) return Promise.resolve(a); if (n) { n(null, a); return; } return a; } if (t) return Promise.reject(r); if (n) { n(r); return; } throw r; }; } function KD(e, t) { return (n, r, a) => { typeof r == "function" && (a = r, r = null); const o = { ...r }; r = { ...Tt.defaults, ...o }; const i = k2e(r.silent, r.async, a); 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 (b2e(r), r.hooks && (r.hooks.options = r), a) { 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 f; if (!d) try { r.walkTokens && Tt.walkTokens(l, r.walkTokens), f = t(l, r), r.hooks && (f = r.hooks.postprocess(f)); } catch (h) { d = h; } return r.highlight = s, d ? i(d) : a(null, f); }; if (!s || s.length < 3 || (delete r.highlight, !l.length)) return u(); let c = 0; Tt.walkTokens(l, function(d) { d.type === "code" && (c++, setTimeout(() => { s(d.text, d.lang, function(f, h) { if (f) return u(f); 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(Tt.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 && Tt.walkTokens(s, r.walkTokens); let l = t(s, r); return r.hooks && (l = r.hooks.postprocess(l)), l; } catch (s) { return i(s); } }; } function Tt(e, t, n) { return KD(qu.lex, Wu.parse)(e, t, n); } Tt.options = Tt.setOptions = function(e) { return Tt.defaults = { ...Tt.defaults, ...e }, i2e(Tt.defaults), Tt; }; Tt.getDefaults = VD; Tt.defaults = ep; Tt.use = function(...e) { const t = Tt.defaults.extensions || { renderers: {}, childTokens: {} }; e.forEach((n) => { const r = { ...n }; if (r.async = Tt.defaults.async || r.async || !1, n.extensions && (n.extensions.forEach((a) => { if (!a.name) throw new Error("extension name required"); if (a.renderer) { const o = t.renderers[a.name]; o ? t.renderers[a.name] = function(...i) { let s = a.renderer.apply(this, i); return s === !1 && (s = o.apply(this, i)), s; } : t.renderers[a.name] = a.renderer; } if (a.tokenizer) { if (!a.level || a.level !== "block" && a.level !== "inline") throw new Error("extension level must be 'block' or 'inline'"); t[a.level] ? t[a.level].unshift(a.tokenizer) : t[a.level] = [a.tokenizer], a.start && (a.level === "block" ? t.startBlock ? t.startBlock.push(a.start) : t.startBlock = [a.start] : a.level === "inline" && (t.startInline ? t.startInline.push(a.start) : t.startInline = [a.start])); } a.childTokens && (t.childTokens[a.name] = a.childTokens); }), r.extensions = t), n.renderer) { const a = Tt.defaults.renderer || new t3(); for (const o in n.renderer) { const i = a[o]; a[o] = (...s) => { let l = n.renderer[o].apply(a, s); return l === !1 && (l = i.apply(a, s)), l; }; } r.renderer = a; } if (n.tokenizer) { const a = Tt.defaults.tokenizer || new e3(); for (const o in n.tokenizer) { const i = a[o]; a[o] = (...s) => { let l = n.tokenizer[o].apply(a, s); return l === !1 && (l = i.apply(a, s)), l; }; } r.tokenizer = a; } if (n.hooks) { const a = Tt.defaults.hooks || new ib(); for (const o in n.hooks) { const i = a[o]; ib.passThroughHooks.has(o) ? a[o] = (s) => { if (Tt.defaults.async) return Promise.resolve(n.hooks[o].call(a, s)).then((u) => i.call(a, u)); const l = n.hooks[o].call(a, s); return i.call(a, l); } : a[o] = (...s) => { let l = n.hooks[o].apply(a, s); return l === !1 && (l = i.apply(a, s)), l; }; } r.hooks = a; } if (n.walkTokens) { const a = Tt.defaults.walkTokens; r.walkTokens = function(o) { let i = []; return i.push(n.walkTokens.call(this, o)), a && (i = i.concat(a.call(this, o))), i; }; } Tt.setOptions(r); }); }; Tt.walkTokens = function(e, t) { let n = []; for (const r of e) switch (n = n.concat(t.call(Tt, r)), r.type) { case "table": { for (const a of r.header) n = n.concat(Tt.walkTokens(a.tokens, t)); for (const a of r.rows) for (const o of a) n = n.concat(Tt.walkTokens(o.tokens, t)); break; } case "list": { n = n.concat(Tt.walkTokens(r.items, t)); break; } default: Tt.defaults.extensions && Tt.defaults.extensions.childTokens && Tt.defaults.extensions.childTokens[r.type] ? Tt.defaults.extensions.childTokens[r.type].forEach(function(a) { n = n.concat(Tt.walkTokens(r[a], t)); }) : r.tokens && (n = n.concat(Tt.walkTokens(r.tokens, t))); } return n; }; Tt.parseInline = KD(qu.lexInline, Wu.parseInline); Tt.Parser = Wu; Tt.parser = Wu.parse; Tt.Renderer = t3; Tt.TextRenderer = qD; Tt.Lexer = qu; Tt.lexer = qu.lex; Tt.Tokenizer = e3; Tt.Slugger = WD; Tt.Hooks = ib; Tt.parse = Tt; Tt.options; Tt.setOptions; Tt.use; Tt.walkTokens; Tt.parseInline; Wu.parse; qu.lex; var a5 = { exports: {} }, lr = {}, o5 = { exports: {} }, tp = {}; function GD() { 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 C2e(e, t, n) { } function S2e(e, t, n) { } var E2e = /javascript\s*\:/img; function _2e(e, t) { return E2e.test(t) ? "" : t; } tp.whiteList = GD(); tp.getDefaultWhiteList = GD; tp.onAttr = C2e; tp.onIgnoreAttr = S2e; tp.safeAttrValue = _2e; var T2e = { 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, a; if (Array.prototype.forEach) return e.forEach(t, n); for (r = 0, a = e.length; r < a; 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, ""); } }, av = T2e; function O2e(e, t) { e = av.trimRight(e), e[e.length - 1] !== ";" && (e += ";"); var n = e.length, r = !1, a = 0, o = 0, i = ""; function s() { if (!r) { var c = av.trim(e.slice(a, o)), d = c.indexOf(":"); if (d !== -1) { var f = av.trim(c.slice(0, d)), h = av.trim(c.slice(d + 1)); if (f) { var p = t(a, i.length, f, h, c); p && (i += p + "; "); } } } a = o + 1; } for (; o < n; o++) { var l = e[o]; if (l === "/" && e[o + 1] === "*") { var u = e.indexOf("*/", o + 2); if (u === -1) break; o = u + 1, a = o + 1, r = !1; } else l === "(" ? r = !0 : l === ")" ? r = !1 : l === ";" ? r || s() : l === ` ` && s(); } return av.trim(i); } var $2e = O2e, e1 = tp, F2e = $2e; function VO(e) { return e == null; } function A2e(e) { var t = {}; for (var n in e) t[n] = e[n]; return t; } function XD(e) { e = A2e(e || {}), e.whiteList = e.whiteList || e1.whiteList, e.onAttr = e.onAttr || e1.onAttr, e.onIgnoreAttr = e.onIgnoreAttr || e1.onIgnoreAttr, e.safeAttrValue = e.safeAttrValue || e1.safeAttrValue, this.options = e; } XD.prototype.process = function(e) { if (e = e || "", e = e.toString(), !e) return ""; var t = this, n = t.options, r = n.whiteList, a = n.onAttr, o = n.onIgnoreAttr, i = n.safeAttrValue, s = F2e(e, function(l, u, c, d, f) { var h = r[c], p = !1; if (h === !0 ? p = h : typeof h == "function" ? p = h(d) : h instanceof RegExp && (p = h.test(d)), p !== !0 && (p = !1), d = i(c, d), !!d) { var v = { position: u, sourcePosition: l, source: f, isWhite: p }; if (p) { var m = a(c, d, v); return VO(m) ? c + ":" + d : m; } else { var m = o(c, d, v); if (!VO(m)) return m; } } }); return s; }; var I2e = XD; (function(e, t) { var n = tp, r = I2e; function a(i, s) { var l = new r(s); return l.process(i); } t = e.exports = a, t.FilterCSS = r; for (var o in n) t[o] = n[o]; typeof window < "u" && (window.filterCSS = e.exports); })(o5, o5.exports); var n3 = o5.exports, r3 = { 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, a; if (Array.prototype.forEach) return e.forEach(t, n); for (r = 0, a = e.length; r < a; 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; } }, P2e = n3.FilterCSS, L2e = n3.getDefaultWhiteList, sb = r3; function YD() { 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 ZD = new P2e(); function N2e(e, t, n) { } function M2e(e, t, n) { } function B2e(e, t, n) { } function D2e(e, t, n) { } function QD(e) { return e.replace(z2e, "<").replace(V2e, ">"); } function R2e(e, t, n, r) { if (n = aR(n), t === "href" || t === "src") { if (n = sb.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 (t1.lastIndex = 0, t1.test(n)) return ""; } else if (t === "style") { if (jO.lastIndex = 0, jO.test(n) || (HO.lastIndex = 0, HO.test(n) && (t1.lastIndex = 0, t1.test(n)))) return ""; r !== !1 && (r = r || ZD, n = r.process(n)); } return n = oR(n), n; } var z2e = //g, j2e = /"/g, H2e = /"/g, U2e = /&#([a-zA-Z0-9]*);?/gim, q2e = /:?/gim, W2e = /&newline;?/gim, t1 = /((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, jO = /e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi, HO = /u\s*r\s*l\s*\(.*/gi; function JD(e) { return e.replace(j2e, """); } function eR(e) { return e.replace(H2e, '"'); } function tR(e) { return e.replace(U2e, function(n, r) { return r[0] === "x" || r[0] === "X" ? String.fromCharCode(parseInt(r.substr(1), 16)) : String.fromCharCode(parseInt(r, 10)); }); } function nR(e) { return e.replace(q2e, ":").replace(W2e, " "); } function rR(e) { for (var t = "", n = 0, r = e.length; n < r; n++) t += e.charCodeAt(n) < 32 ? " " : e.charAt(n); return sb.trim(t); } function aR(e) { return e = eR(e), e = tR(e), e = nR(e), e = rR(e), e; } function oR(e) { return e = JD(e), e = QD(e), e; } function K2e() { return ""; } function G2e(e, t) { typeof t != "function" && (t = function() { }); var n = !Array.isArray(e); function r(i) { return n ? !0 : sb.indexOf(e, i) !== -1; } var a = [], o = !1; return { onIgnoreTag: function(i, s, l) { if (r(i)) if (l.isClosing) { var u = "[/removed]", c = l.position + u.length; return a.push([ o !== !1 ? o : l.position, c ]), o = !1, u; } else return o || (o = l.position), "[removed]"; else return t(i, s, l); }, remove: function(i) { var s = "", l = 0; return sb.forEach(a, function(u) { s += i.slice(l, u[0]), l = u[1]; }), s += i.slice(l), s; } }; } function X2e(e) { for (var t = "", n = 0; n < e.length; ) { var r = e.indexOf("", r); if (a === -1) break; n = a + 3; } return t; } function Y2e(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(""); } lr.whiteList = YD(); lr.getDefaultWhiteList = YD; lr.onTag = N2e; lr.onIgnoreTag = M2e; lr.onTagAttr = B2e; lr.onIgnoreTagAttr = D2e; lr.safeAttrValue = R2e; lr.escapeHtml = QD; lr.escapeQuote = JD; lr.unescapeQuote = eR; lr.escapeHtmlEntities = tR; lr.escapeDangerHtml5Entities = nR; lr.clearNonPrintableCharacter = rR; lr.friendlyAttrValue = aR; lr.escapeAttrValue = oR; lr.onIgnoreTagStripAll = K2e; lr.StripTagBody = G2e; lr.stripCommentTag = X2e; lr.stripBlankChar = Y2e; lr.cssFilter = ZD; lr.getDefaultCSSWhiteList = L2e; var J2 = {}, fu = r3; function Z2e(e) { var t = fu.spaceIndex(e), n; return t === -1 ? n = e.slice(1, -1) : n = e.slice(1, t + 1), n = fu.trim(n).toLowerCase(), n.slice(0, 1) === "/" && (n = n.slice(1)), n.slice(-1) === "/" && (n = n.slice(0, -1)), n; } function Q2e(e) { return e.slice(0, 2) === "" || s === l - 1) { r += n(e.slice(a, o)), c = e.slice(o, s + 1), u = Z2e(c), r += t( o, r.length, u, c, Q2e(c) ), a = s + 1, o = !1; continue; } if (d === '"' || d === "'") for (var f = 1, h = e.charAt(s - f); h.trim() === "" || h === "="; ) { if (h === "=") { i = d; continue e; } h = e.charAt(s - ++f); } } else if (d === i) { i = !1; continue; } } return a < l && (r += n(e.substr(a))), r; } var ewe = /[^a-zA-Z0-9\\_:.-]/gim; function twe(e, t) { var n = 0, r = 0, a = [], o = !1, i = e.length; function s(f, h) { if (f = fu.trim(f), f = f.replace(ewe, "").toLowerCase(), !(f.length < 1)) { var p = t(f, h || ""); p && a.push(p); } } for (var l = 0; l < i; l++) { var u = e.charAt(l), c, d; if (o === !1 && u === "=") { o = e.slice(n, l), n = l + 1, r = e.charAt(n) === '"' || e.charAt(n) === "'" ? n : rwe(e, l + 1); continue; } if (o !== !1 && l === r) { if (d = e.indexOf(u, l + 1), d === -1) break; c = fu.trim(e.slice(r + 1, d)), s(o, c), o = !1, l = d, n = l + 1; continue; } if (/\s|\n|\t/.test(u)) if (e = e.replace(/\s|\n|\t/g, " "), o === !1) if (d = nwe(e, l), d === -1) { c = fu.trim(e.slice(n, l)), s(c), o = !1, n = l + 1; continue; } else { l = d - 1; continue; } else if (d = awe(e, l - 1), d === -1) { c = fu.trim(e.slice(n, l)), c = UO(c), s(o, c), o = !1, n = l + 1; continue; } else continue; } return n < e.length && (o === !1 ? s(e.slice(n)) : s(o, UO(fu.trim(e.slice(n))))), fu.trim(a.join(" ")); } function nwe(e, t) { for (; t < e.length; t++) { var n = e[t]; if (n !== " ") return n === "=" ? t : -1; } } function rwe(e, t) { for (; t < e.length; t++) { var n = e[t]; if (n !== " ") return n === "'" || n === '"' ? t : -1; } } function awe(e, t) { for (; t > 0; t--) { var n = e[t]; if (n !== " ") return n === "=" ? t : -1; } } function owe(e) { return e[0] === '"' && e[e.length - 1] === '"' || e[0] === "'" && e[e.length - 1] === "'"; } function UO(e) { return owe(e) ? e.substr(1, e.length - 2) : e; } J2.parseTag = J2e; J2.parseAttr = twe; var iwe = n3.FilterCSS, Ti = lr, iR = J2, swe = iR.parseTag, lwe = iR.parseAttr, iy = r3; function n1(e) { return e == null; } function uwe(e) { var t = iy.spaceIndex(e); if (t === -1) return { html: "", closing: e[e.length - 2] === "/" }; e = iy.trim(e.slice(t + 1, -1)); var n = e[e.length - 1] === "/"; return n && (e = iy.trim(e.slice(0, -1))), { html: e, closing: n }; } function cwe(e) { var t = {}; for (var n in e) t[n] = e[n]; return t; } function dwe(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 sR(e) { e = cwe(e || {}), e.stripIgnoreTag && (e.onIgnoreTag && console.error( 'Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time' ), e.onIgnoreTag = Ti.onIgnoreTagStripAll), e.whiteList || e.allowList ? e.whiteList = dwe(e.whiteList || e.allowList) : e.whiteList = Ti.whiteList, e.onTag = e.onTag || Ti.onTag, e.onTagAttr = e.onTagAttr || Ti.onTagAttr, e.onIgnoreTag = e.onIgnoreTag || Ti.onIgnoreTag, e.onIgnoreTagAttr = e.onIgnoreTagAttr || Ti.onIgnoreTagAttr, e.safeAttrValue = e.safeAttrValue || Ti.safeAttrValue, e.escapeHtml = e.escapeHtml || Ti.escapeHtml, this.options = e, e.css === !1 ? this.cssFilter = !1 : (e.css = e.css || {}, this.cssFilter = new iwe(e.css)); } sR.prototype.process = function(e) { if (e = e || "", e = e.toString(), !e) return ""; var t = this, n = t.options, r = n.whiteList, a = n.onTag, o = n.onIgnoreTag, i = n.onTagAttr, s = n.onIgnoreTagAttr, l = n.safeAttrValue, u = n.escapeHtml, c = t.cssFilter; n.stripBlankChar && (e = Ti.stripBlankChar(e)), n.allowCommentTag || (e = Ti.stripCommentTag(e)); var d = !1; n.stripIgnoreTagBody && (d = Ti.StripTagBody( n.stripIgnoreTagBody, o ), o = d.onIgnoreTag); var f = swe( e, function(h, p, v, m, g) { var y = { sourcePosition: h, position: p, isClosing: g, isWhite: Object.prototype.hasOwnProperty.call(r, v) }, x = a(v, m, y); if (!n1(x)) return x; if (y.isWhite) { if (y.isClosing) return ""; var w = uwe(m), k = r[v], C = lwe(w.html, function(S, _) { var T = iy.indexOf(k, S) !== -1, O = i(v, S, _, T); return n1(O) ? T ? (_ = l(v, S, _, c), _ ? S + '="' + _ + '"' : S) : (O = s(v, S, _, T), n1(O) ? void 0 : O) : O; }); return m = "<" + v, C && (m += " " + C), w.closing && (m += " /"), m += ">", m; } else return x = o(v, m, y), n1(x) ? u(m) : x; }, u ); return d && (f = d.remove(f)), f; }; var pwe = sR; (function(e, t) { var n = lr, r = J2, a = pwe; function o(s, l) { var u = new a(l); return u.process(s); } t = e.exports = o, t.filterXSS = o, t.FilterXSS = a, 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); })(a5, a5.exports); var fwe = a5.exports; const hwe = /* @__PURE__ */ qL(fwe), Ki = (e, t) => { const n = e.__vccOpts || e; for (const [r, a] of t) n[r] = a; return n; }, vwe = function(e) { return e.includes("files") ? e : "files/" + e; }, gwe = function(e) { return e = e.replaceAll("\\", "/"), e = e.replaceAll("\\\\", "/"), e; }, mwe = { name: "contextCard", components: { CopyToClipboard: oD }, mixins: [o2e], props: { /** * Object containing information for * the required viewing. */ entry: Object, envVars: Object }, data: function() { return { contextData: {}, showDetails: !0, showContextCard: !0, sampleDetails: {}, loading: !1 }; }, 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: { 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((o) => o.id)) || [], r = ((t = this.contextData.samples) == null ? void 0 : t.map((o) => o.view)) || [], a = n.filter((o) => r.includes(o)); if (n.length === a.length && a.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; }, updatedCopyContent: function() { var t, n; const e = []; if (this.contextData.heading && e.push(`
    ${this.contextData.heading}
    `), this.contextData.description && e.push(`
    ${this.contextData.description}
    `), (t = this.contextData.views) != null && t.length) { let r = "
    Scaffold Views
    "; const a = []; this.contextData.views.forEach((o, i) => { const s = [], l = this.getFileFromPath(o.path); let u = `
    ${o.description}
    `; if (u += ` `, u += `
    ${l}
    `, s.push(u), this.samplesUnderViews) { let f = `
    ${this.samplesMatching(o.id).description}
    `; if (this.samplesMatching(o.id).path) { f += ` `; const h = this.generateFileLink(this.samplesMatching(o.id)); f += `
    ${h}
    `; } s.push(f); } const c = s.join(` `); a.push(`
  • ${c}
  • `); }), r += ` `, r += `
      ${a.join(` `)}
    `, e.push(r); } if (!this.samplesUnderViews && (n = this.contextData.samples) != null && n.length) { let r = "
    Samples on Scaffold
    "; const a = []; this.contextData.samples.forEach((o, i) => { let s = ""; if (s += `
    ${o.heading}
    `, s += ` `, s += `
    ${o.description}
    `, o.path) { const l = this.generateFileLink(o); s += ` `, s += `
    ${l}
    `; } a.push(`
  • ${s}
  • `); }), r += ` `, r += `
      ${a.join(` `)}
    `, e.push(r); } return e.join(`
    `); } }, methods: { 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.discoverId = void 0, 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 = gwe(e), e = vwe(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}/file/${e.discoverId}/${e.version}?path=`; return n = n + t, n; }, parseMarkdown(e) { const t = hwe(Tt.parse(e)); return this.$emit("context-ready"), t; }, openViewFile: function(e) { const t = this.getFileFromPath(e.path); this.$emit("scaffold-view-clicked", t); } } }, kh = (e) => (No("data-v-48d3f7e3"), e = e(), Mo(), e), ywe = { class: "context-card-container", ref: "container" }, bwe = { key: 0, class: "context-card" }, wwe = { class: "card-left" }, xwe = ["src"], kwe = { class: "card-right scrollbar" }, Cwe = { class: "title" }, Swe = ["innerHTML"], Ewe = { class: "card-bottom" }, _we = { key: 0, class: "subtitle" }, Twe = ["onClick"], Owe = ["src"], $we = { class: "view-description" }, Fwe = /* @__PURE__ */ kh(() => /* @__PURE__ */ W("div", { class: "padding" }, null, -1)), Awe = /* @__PURE__ */ kh(() => /* @__PURE__ */ W("div", { style: { "margin-bottom": "16px" } }, null, -1)), Iwe = { key: 1, class: "subtitle" }, Pwe = ["onClick"], Lwe = ["src"], Nwe = /* @__PURE__ */ kh(() => /* @__PURE__ */ W("i", { class: "el-icon-warning-outline info" }, null, -1)), Mwe = ["innerHTML"], Bwe = ["href"], Dwe = /* @__PURE__ */ kh(() => /* @__PURE__ */ W("div", { class: "padding" }, null, -1)), Rwe = { key: 0, class: "subtitle" }, zwe = ["onClick"], Vwe = ["src"], jwe = { class: "view-description" }, Hwe = /* @__PURE__ */ kh(() => /* @__PURE__ */ W("i", { class: "el-icon-warning-outline info" }, null, -1)), Uwe = ["innerHTML"], qwe = ["href"], Wwe = /* @__PURE__ */ kh(() => /* @__PURE__ */ W("div", { class: "padding" }, null, -1)), Kwe = { key: 2, class: "padding" }, Gwe = { class: "float-button-container" }; function Xwe(e, t, n, r, a, o) { const i = lt("CopyToClipboard"), s = bf; return I(), j("div", ywe, [ Xe(W("div", null, [ e.showDetails && Object.keys(e.contextData).length !== 0 ? Xe((I(), j("div", bwe, [ W("div", wwe, [ W("img", { src: o.banner, class: "context-image" }, null, 8, xwe) ]), W("div", kwe, [ W("div", null, [ W("div", Cwe, Fe(e.contextData.heading), 1), W("div", { innerHTML: o.parseMarkdown(e.contextData.description) }, null, 8, Swe) ]) ]), W("div", Ewe, [ W("div", null, [ o.samplesUnderViews ? (I(), j(Qe, { key: 1 }, [ e.contextData.views && e.contextData.views.length > 0 ? (I(), j("div", Rwe, "Scaffold Views")) : ne("", !0), (I(!0), j(Qe, null, Nt(e.contextData.views, (l, u) => (I(), j(Qe, { key: u + "_1" }, [ W("span", { onClick: (c) => o.viewClicked(l, u), class: "context-card-view" }, [ W("img", { class: "view-image", src: o.getFileFromPath(l.thumbnail) }, null, 8, Vwe), W("div", jwe, [ et(Fe(l.description), 1), Hwe ]) ], 8, zwe), e.sampleDetails[u] ? (I(), j("div", { key: 0, innerHTML: o.samplesMatching(l.id).description }, null, 8, Uwe)) : ne("", !0), e.sampleDetails[u] && o.samplesMatching(l.id).path ? (I(), j("a", { key: u + "_5", href: o.generateFileLink(o.samplesMatching(l.id)), target: "_blank" }, "View Source", 8, qwe)) : ne("", !0), Wwe, e.sampleDetails[u] ? (I(), j("div", Kwe)) : ne("", !0) ], 64))), 128)) ], 64)) : (I(), j(Qe, { key: 0 }, [ e.contextData.views && e.contextData.views.length > 0 ? (I(), j("div", _we, "Scaffold Views")) : ne("", !0), (I(!0), j(Qe, null, Nt(e.contextData.views, (l, u) => (I(), j(Qe, { key: u + "_1" }, [ W("div", { onClick: (c) => o.openViewFile(l), class: "context-card-view" }, [ W("img", { class: "view-image", src: o.getFileFromPath(l.thumbnail) }, null, 8, Owe), W("div", $we, Fe(l.description), 1) ], 8, Twe), Fwe ], 64))), 128)), Awe, e.contextData.samples && e.contextData.samples.length > 0 ? (I(), j("div", Iwe, "Samples on Scaffold")) : ne("", !0), (I(!0), j(Qe, null, Nt(e.contextData.samples, (l, u) => (I(), j(Qe, { key: u + "_3" }, [ W("span", { class: "context-card-item cursor-pointer", onClick: (c) => o.toggleSampleDetails(u) }, [ (I(), j("div", { key: u + "_6", style: { display: "flex" } }, [ l.color ? (I(), j("div", { key: 0, class: "color-box", style: Ye("background-color:" + l.color) }, null, 4)) : l.thumbnail ? (I(), j("img", { key: 1, class: "key-image", src: o.getFileFromPath(l.thumbnail) }, null, 8, Lwe)) : ne("", !0), et(" " + Fe(l.heading) + " ", 1), Nwe ])) ], 8, Pwe), e.sampleDetails[u] ? (I(), j("div", { key: 0, innerHTML: l.description }, null, 8, Mwe)) : ne("", !0), e.sampleDetails[u] && l.path ? (I(), j("a", { key: 1, href: o.generateFileLink(l), target: "_blank" }, "View Source", 8, Bwe)) : ne("", !0), Dwe ], 64))), 128)) ], 64)) ]) ]) ])), [ [s, e.loading] ]) : ne("", !0), W("div", Gwe, [ ue(i, { content: o.updatedCopyContent, theme: "light" }, null, 8, ["content"]) ]) ], 512), [ [mt, e.showContextCard] ]) ], 512); } const lR = /* @__PURE__ */ Ki(mwe, [["render", Xwe], ["__scopeId", "data-v-48d3f7e3"]]), Ywe = { name: "FlatmapContextCard", components: { Loading: iN, CopyToClipboard: oD }, 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, copyContent: "" }; }, 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; let e = "Unknown"; if (this.mapImpProv) { if (e = (t = this.mapImpProv.connectivity) == null ? void 0 : t.npo.date, !e) { let a = ((n = this.mapImpProv.sckan) != null && n.created ? this.mapImpProv.sckan.created : this.mapImpProv.sckan).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; let e = "Unknown"; return this.mapImpProv && (e = (t = this.mapImpProv.connectivity) == null ? void 0 : t.npo.path, e || (e = (n = this.mapImpProv.sckan) == null ? void 0 : n.release), e || (e = "Unknown")), e; }, flatmapSource: function() { let e = "Unknown"; return this.mapImpProv && (e = this.mapImpProv.source), e; } }, mounted: function() { this.updateCopyContent(); }, methods: { updateCopyContent: 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:
    "; r += ` `, r += `
    ${this.flatmapSource}
    `, e.push(r), this.copyContent = e.join(`
    `); } } }, ew = (e) => (No("data-v-c655abd4"), e = e(), Mo(), e), Zwe = { class: "flatmap-context-card" }, Qwe = { class: "card-right scrollbar" }, Jwe = /* @__PURE__ */ ew(() => /* @__PURE__ */ W("div", { class: "title" }, "Flatmap Provenance", -1)), exe = ["href"], txe = /* @__PURE__ */ ew(() => /* @__PURE__ */ W("br", null, null, -1)), nxe = /* @__PURE__ */ ew(() => /* @__PURE__ */ W("br", null, null, -1)), rxe = ["href"], axe = /* @__PURE__ */ ew(() => /* @__PURE__ */ W("br", null, null, -1)), oxe = { class: "float-button-container" }; function ixe(e, t, n, r, a, o) { const i = lt("CopyToClipboard"), s = bf; return Xe((I(), j("div", Zwe, [ W("div", Qwe, [ Jwe, et(" SCKAN version: "), W("a", { href: o.sckanReleaseLink, target: "_blank" }, Fe(o.sckanReleaseDisplay), 9, exe), txe, et(" Published on: " + Fe(o.flatmapPublishedDisplay) + " ", 1), nxe, et(" View publication "), W("a", { href: o.flatmapSource, target: "_blank" }, "here", 8, rxe), axe ]), W("div", oxe, [ ue(i, { content: e.copyContent, theme: "light" }, null, 8, ["content"]) ]) ])), [ [s, e.loading] ]); } const uR = /* @__PURE__ */ Ki(Ywe, [["render", ixe], ["__scopeId", "data-v-c655abd4"]]); function sxe(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(a) { a(n); }), (r = e.get("*")) && r.slice().map(function(a) { a(t, n); }); } }; } const Tn = new sxe(), cR = (e, t) => { const n = e.__vccOpts || e; for (const [r, a] of t) n[r] = a; return n; }, lxe = ["xlink:href"], uxe = { __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) => (I(), j("svg", { class: H(["map-icon", { "map-icon-spin": e.spin }]) }, [ W("use", { "xlink:href": `#${e.icon}` }, null, 8, lxe) ], 2)); } }, a3 = /* @__PURE__ */ cR(uxe, [["__scopeId", "data-v-e172d5ff"]]), dR = ` 2horpanel ? `, pR = ` 2vertpanel ? `, fR = ` 3panel ? `, hR = ` 4panel ? `, vR = ` 2horpanel ? `, gR = ` 2horpanel ? `, mR = ` 4panel ? `, yR = ` changeBckgd `, bR = ` close no bk `, wR = ` close `, xR = ` closeFullScreen `, kR = ` Comment `, CR = ` Connection `, SR = ` dock `, ER = ` drawLine `, _R = ` drawPoint `, TR = ` drawPolygon `, OR = ` drawTrash `, $R = ` fitWindow `, FR = ` fullScreen `, AR = 'DataPortal-Icons', IR = ` magnifyingGlass `, PR = `Created by Wahyu Prihantorofrom the Noun Project`, LR = ` openMap `, NR = ` Artboard Copy 6 `, MR = ` permalink `, BR = ` play `, DR = ` resetZoom `, RR = ` singlepanel ? `, zR = ` tooltips ? `, VR = ` undock `, jR = ` zoomIn `, HR = ` zoomOut `, UR = (e, t, n, r) => { const a = ["title", "desc", "defs", "style"], o = ["width", "height"], i = r || []; let s = document.createElement("div"); s.innerHTML = e, a.map((u) => { const c = s.querySelector(u); c && c.remove(); }), o.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; }, qR = (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(), cxe = !0, dxe = !0, pxe = ["fill"], i5 = /* @__PURE__ */ Object.assign({ "/assets/icons/2horpanel.svg": dR, "/assets/icons/2vertpanel.svg": pR, "/assets/icons/3panel.svg": fR, "/assets/icons/4panel.svg": hR, "/assets/icons/5panel.svg": vR, "/assets/icons/6panel.svg": gR, "/assets/icons/6panelVertical.svg": mR, "/assets/icons/changeBckgd.svg": yR, "/assets/icons/close-no-bk.svg": bR, "/assets/icons/close.svg": wR, "/assets/icons/closeFullScreen.svg": xR, "/assets/icons/comment.svg": kR, "/assets/icons/connection.svg": CR, "/assets/icons/dock.svg": SR, "/assets/icons/drawLine.svg": ER, "/assets/icons/drawPoint.svg": _R, "/assets/icons/drawPolygon.svg": TR, "/assets/icons/drawTrash.svg": OR, "/assets/icons/fitWindow.svg": $R, "/assets/icons/fullScreen.svg": FR, "/assets/icons/help.svg": AR, "/assets/icons/magnifyingGlass.svg": IR, "/assets/icons/noun-filter.svg": PR, "/assets/icons/openMap.svg": LR, "/assets/icons/pause.svg": NR, "/assets/icons/permalink.svg": MR, "/assets/icons/play.svg": BR, "/assets/icons/resetZoom.svg": DR, "/assets/icons/singlepanel.svg": RR, "/assets/icons/tooltips.svg": zR, "/assets/icons/undock.svg": VR, "/assets/icons/zoomIn.svg": jR, "/assets/icons/zoomOut.svg": HR }), fxe = Object.keys(i5).map((e) => { const t = UR(i5[e], cxe, dxe, pxe), n = e.replace(/^.+\/(\w+).svg$/, "$1"); return qR(t).replace("", "symbol>"); }); fxe.join(` `); const s5 = /* @__PURE__ */ Object.assign({ "/assets/icons/2horpanel.svg": dR, "/assets/icons/2vertpanel.svg": pR, "/assets/icons/3panel.svg": fR, "/assets/icons/4panel.svg": hR, "/assets/icons/5panel.svg": vR, "/assets/icons/6panel.svg": gR, "/assets/icons/6panelVertical.svg": mR, "/assets/icons/changeBckgd.svg": yR, "/assets/icons/close-no-bk.svg": bR, "/assets/icons/close.svg": wR, "/assets/icons/closeFullScreen.svg": xR, "/assets/icons/comment.svg": kR, "/assets/icons/connection.svg": CR, "/assets/icons/dock.svg": SR, "/assets/icons/drawLine.svg": ER, "/assets/icons/drawPoint.svg": _R, "/assets/icons/drawPolygon.svg": TR, "/assets/icons/drawTrash.svg": OR, "/assets/icons/fitWindow.svg": $R, "/assets/icons/fullScreen.svg": FR, "/assets/icons/help.svg": AR, "/assets/icons/magnifyingGlass.svg": IR, "/assets/icons/noun-filter.svg": PR, "/assets/icons/openMap.svg": LR, "/assets/icons/pause.svg": NR, "/assets/icons/permalink.svg": MR, "/assets/icons/play.svg": BR, "/assets/icons/resetZoom.svg": DR, "/assets/icons/singlepanel.svg": RR, "/assets/icons/tooltips.svg": zR, "/assets/icons/undock.svg": VR, "/assets/icons/zoomIn.svg": jR, "/assets/icons/zoomOut.svg": HR }), hxe = Object.keys(s5).map((e) => { const t = UR(s5[e]), n = e.replace(/^.+\/(\w+).svg$/, "$1"); return qR(t).replace("", "symbol>"); }), vxe = { name: "MapSvgSpriteColor", svgContext: s5, svgSprite: hxe.join(` `) // concatenate all symbols into $options.svgSprite }, gxe = ["innerHTML"]; function mxe(e, t, n, r, a, o) { return I(), j("svg", { width: "0", height: "0", style: { display: "none" }, innerHTML: e.$options.svgSprite }, null, 8, gxe); } const WR = /* @__PURE__ */ cR(vxe, [["render", mxe]]), o3 = () => ({ entries: [ { resource: "Human Male", type: "MultiFlatmap", mode: "main", id: 1, state: void 0, label: "", discoverId: void 0 } ] }), yxe = 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 KR(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; }, bxe = async (e, t) => { const n = o3(); 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 KR(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; }, qO = (e) => e && e.charAt(0).toUpperCase() + e.slice(1), wxe = () => ({ "Human Female": { taxo: "NCBITaxon:9606", biologicalSex: "PATO:0000383", iconClass: "mapicon-icon_human", displayLatestChanges: !0, displayWarning: !0 }, "Human Male": { taxo: "NCBITaxon:9606", biologicalSex: "PATO:0000384", iconClass: "mapicon-icon_human", displayLatestChanges: !0, displayWarning: !0 }, Rat: { taxo: "NCBITaxon:10114", iconClass: "mapicon-icon_rat", displayLatestChanges: !0, displayWarning: !0 }, Mouse: { taxo: "NCBITaxon:10090", iconClass: "mapicon-icon_mouse", displayLatestChanges: !0, displayWarning: !0 }, Pig: { taxo: "NCBITaxon:9823", iconClass: "mapicon-icon_pig", displayLatestChanges: !0, displayWarning: !0 }, Cat: { taxo: "NCBITaxon:9685", iconClass: "mapicon-icon_cat", displayLatestChanges: !0, displayWarning: !0 } }), xxe = (e) => { if (e) { const t = wxe(); 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 ""; }, kxe = (e) => { if (e) { const t = e.split("//")[1]; if (t) { const n = t.split("/")[0], r = t.indexOf("/"), a = t.substring(r + 1); return { s3Bucket: n, s3Prefix: a }; } } }, KR = async (e, t) => { let n = "", r; const a = await fetch(`${e}get_body_scaffold_info/${t}`); if (a.ok) { const o = await a.json(), i = kxe(o.s3uri); n = `${e}s3-resource/${i.s3Prefix}files/${o.path}?s3BucketName=${i.s3Bucket}`; const s = `${e}s3-resource/${i.s3Prefix}files/${o.contextinfo}?s3BucketName=${i.s3Bucket}`; r = { s3uri: o.s3uri, contextCardUrl: s, discoverId: o.id, version: o.version }; } else n = "https://mapcore-bucket1.s3.us-west-2.amazonaws.com/WholeBody/27-4-23-human/human_body_metadata.json"; return { url: n, datasetInfo: r }; }, Cxe = (e, t) => e.filter((n) => t.includes(n)), Vot = (e) => Object.keys(e).map((t) => `${t}=${e[t]}`).join("&"), tw = t2("entries", { state: () => o3(), 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; } } }), I0 = t2("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, flatmapAPI2: "https://mapcore-demo.org/curation/flatmap/", rootUrl: void 0, facets: { species: [], gender: [], organ: [] }, numberOfDatasetsForFacets: [], markers: [], hoverAnatomies: [], hoverOrgans: [], featuredMarkers: [], featuredMarkerIdentifiers: [], featuredMarkerDois: [], featuredMarkerSpecies: [], featuredDatasetIdentifiers: [], helpDelay: 0, useHelpModeDialog: !1, connectivityInfoSidebar: !0, annotationSidebar: !0 }), getters: { isFeaturedMarkerIdentifier: (e) => (t) => e.featuredMarkerIdentifiers.includes(t), featuredMarkerDoi: (e) => (t) => { const n = e.featuredMarkerIdentifiers.findIndex( (r) => r == t ); return e.featuredMarkerDois[n]; } }, 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; }, updateFlatmapAPI2(e) { this.flatmapAPI2 = e; }, updateNLLinkPrefix(e) { this.nlLinkPrefix = e; }, updateRootUrl(e) { this.rootUrl = e; }, updateMarkers(e) { this.markers = e; }, updateHoverFeatures(e, t) { this.hoverAnatomies = e, this.hoverOrgans = t; }, 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 ); }, 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 a = 0; for (a = r.length - 1; a >= 0; a -= 1) t[n].indexOf(r[a]) == -1 && r.splice(a, 1); } } }, updateNumberOfDatasetsForFacets(e) { this.numberOfDatasetsForFacets = e; }, updateUseHelpModeDialog(e) { this.useHelpModeDialog = e; }, updateConnectivityInfoSidebar(e) { this.connectivityInfoSidebar = e; }, updateAnnotationSidebar(e) { this.annotationSidebar = e; } } }), ov = [ { 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 Sxe() { 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 Exe() { return Sxe(); } function jot(e) { if (e) for (let t = 0; t < ov.length; t++) { if (ov[t].id == e) return ov[t].centrelines; if (ov[t].centrelines.find((r) => r === e)) return [ov[t].id]; } return []; } function Hot(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 GR = (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 } }; } }, _xe = (e, t) => { const n = [], r = []; for (const [a, o] of Object.entries(t)) o.content && (n.includes(o.id) ? r.push(a) : n.push(o.id)); r.forEach((a) => { let o = !1; for (let i = 0; i < e.length && !o; i++) n.includes(e[i].id) || (t[a].id = e[i].id, n.push(e.id), o = !0); }); }, Txe = (e) => { const t = {}; for (const [n, r] of Object.entries(e)) r.content && (t[n] = r); return t; }, r1 = (e, t) => { const n = Txe(e), r = GR(t); for (const [a, o] of Object.entries(n)) r[a] = o; return r; }, _c = (e, t) => Object.keys(e).find((n) => e[n].id === t), WO = () => ({ 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 }, globalCallback: !1, syncMode: !1 }), np = t2("splitFlow", { state: () => WO(), getters: { getPaneNameById: (e) => (t) => _c(e.customLayout, t), getState: (e) => () => ({ activeView: e.activeView, splitters: e.splitters, globalCallback: e.globalCallback, customLayout: e.customLayout, syncMode: e.syncMode }) }, actions: { assignOrSwapPaneWithIds(e) { let t = _c(this.customLayout, e.source), n = _c(this.customLayout, e.target); this.syncMode && !(n || t) && (this.syncMode = !1, this.globalCallback = !1), n && (this.customLayout[n].id = e.source), t && (this.customLayout[t].id = e.target); }, getAvailableTerms(e) { let t = Exe(); 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((a) => { this.idNamePair[a.id.toUpperCase()] = a.name.charAt(0).toUpperCase() + a.name.slice(1); }); }); } }, toggleGlobalCallback(e) { this.globalCallback = e; }, updateActiveView(e) { if (this.syncMode) { const n = this.viewIcons.find( (a) => this.activeView === a.icon ), r = this.viewIcons.find( (a) => e.view === a.icon ); n.min == 2 && r.min == 2 || (this.syncMode = !1, this.globalCallback = !1); } this.activeView = e.view; const t = r1( this.customLayout, this.activeView ); _xe(e.entries, t); for (const [n, r] of Object.entries(t)) this.customLayout[n] = r; }, 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 = GR(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; e.globalCallback && (this.globalCallback = e.globalCallback); for (const [n, r] of Object.entries(e.splitters)) this.splitters[n] = r; e.syncMode && (this.syncMode = e.syncMode); } }, setIdToPrimaryPane(e) { const t = _c(this.customLayout, e), n = this.customLayout["pane-1"].id; this.customLayout["pane-1"].id = e, t && (this.customLayout[t].id = n); }, setSyncMode(e) { if (e) if (e.flag === !0) { this.activeView = e.layout; const t = r1( this.customLayout, this.activeView ), n = _c(t, 1), r = t["pane-1"].id; n !== "pane-1" && (t["pane-1"].id = r), t["pane-1"].id = 1, t["pane-2"].id = e.newId; for (const [a, o] of Object.entries(t)) this.customLayout[a] = o; this.syncMode = !0, this.globalCallback = !0; } else { this.activeView = "singlepanel"; const t = r1( this.customLayout, this.activeView ); for (const [n, r] of Object.entries(t)) this.customLayout[n] = r; this.syncMode = !1, this.globalCallback = !1; } }, reset() { const e = WO(); this.activeView = e.activeView, this.customLayout = e.customLayout, this.splitters = e.splitters, this.globalCallback = e.globalCallback, this.syncMode = e.syncMode; }, closeSlot(e) { if (e) { this.syncMode = !1, this.globalCallback = !1; let t = 0; if (e.id === 1) t = 1; else if (e.entries) for (let n = 0; n < e.entries.length && t == 0; n++) _c(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 = r1( this.customLayout, this.activeView ); switch (_c(r, 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 [o, i] of Object.entries(r)) this.customLayout[o] = i; } } } } }), Oxe = { name: "ContentBar", components: { ElIconArrowDown: IS, ElIconArrowUp: oL, ElIconInfoFilled: wQ, Input: g2, Option: aN, Popover: w2, Row: y2, Select: rN, ContextCard: lR, FlatmapContextCard: uR, MapSvgIcon: a3 }, 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 }; }, computed: { ...Ud(tw, I0, np), 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.entriesStore.entries; } }, methods: { closeAndRemove: function() { this.splitFlowStore.closeSlot({ id: this.entry.id, entries: this.entries }), Tn.emit("RemoveEntryRequest", this.entry.id); }, 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"; }, viewerChanged: function(e) { this.entry.id && this.entry.id != e && (this.splitFlowStore.assignOrSwapPaneWithIds({ source: this.entry.id, target: e }), this.$nextTick(() => { Tn.emit("connectivity-info-close"), setTimeout(() => { this.$emit("chooser-changed"); }, 1200); })); }, // 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(); } }, $xe = { class: "toolbar-flex-container" }, Fxe = { key: 1, class: "toolbar-title" }; function Axe(e, t, n, r, a, o) { const i = aN, s = rN, l = uR, u = lR, c = oL, d = Ir, f = IS, h = w2, p = lt("map-svg-icon"), v = y2; return I(), j("div", null, [ W("div", $xe, [ o.entries.length > 1 ? (I(), de(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) => o.viewerChanged(m)) }, { default: K(() => [ (I(!0), j(Qe, null, Nt(o.entries, (m) => (I(), de(i, { key: m.id, label: o.getEntryTitle(m), value: m.id }, null, 8, ["label", "value"]))), 128)) ]), _: 1 }, 8, ["model-value"])) : (I(), j("div", Fxe, Fe(o.getEntryTitle(n.entry)), 1)) ]), ue(v, { class: "icon-group" }, { default: K(() => [ ue(h, { placement: "bottom", teleported: !1, trigger: "manual", width: o.setPopperWidth(e.slot.id), offset: 0, "popper-class": "context-card-popover", "popper-options": o.popperOptions, visible: e.contextCardVisible }, PP({ reference: K(() => [ Xe(W("div", null, [ Xe(W("div", { class: "hide", onClick: t[3] || (t[3] = (m) => e.contextCardVisible = !1) }, [ et(" Hide information "), ue(d, null, { default: K(() => [ ue(c) ]), _: 1 }) ], 512), [ [mt, e.contextCardVisible] ]), Xe(W("div", { class: "hide", onClick: t[4] || (t[4] = (m) => e.contextCardVisible = !0) }, [ et(" Show information "), ue(d, null, { default: K(() => [ ue(f) ]), _: 1 }) ], 512), [ [mt, !e.contextCardVisible] ]) ], 512), [ [mt, e.contextCardEntry] ]) ]), _: 2 }, [ e.contextCardEntry ? { name: "default", fn: K(() => [ e.contextCardEntry.type == "Flatmap" || e.contextCardEntry.type == "MultiFlatmap" ? (I(), de(l, { key: 0, class: "flatmap-context-card", mapImpProv: e.contextCardEntry.mapImpProv }, null, 8, ["mapImpProv"])) : ne("", !0), e.contextCardEntry.type.toLowerCase() == "scaffold" ? (I(), de(u, { key: 1, entry: e.contextCardEntry, envVars: o.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"])) : ne("", !0) ]), key: "0" } : void 0 ]), 1032, ["width", "popper-options", "visible"]), ue(h, { class: "tooltip", content: "Close and remove", placement: "bottom-end", "show-after": o.helpDelay, teleported: !1, trigger: "hover", "popper-class": "header-popper" }, { reference: K(() => [ Xe(ue(p, { icon: "close", class: "header-icon", onClick: t[5] || (t[5] = (m) => o.closeAndRemove()) }, null, 512), [ [mt, o.activeView !== "singlepanel" && n.entry.mode !== "main"] ]) ]), _: 1 }, 8, ["show-after"]) ]), _: 1 }) ]); } const XR = /* @__PURE__ */ Ki(Oxe, [["render", Axe], ["__scopeId", "data-v-890cc586"]]), Ixe = sh(() => import("./Flatmap-BFX7UzCF.js")), Pxe = sh(() => import("./Iframe-ANZ-g5Tt.js")), Lxe = sh(() => import("./MultiFlatmap-BCtdP49H.js")), Nxe = sh(() => import("./Plot-CG3FFgsd.js")), Mxe = sh(() => import("./Scaffold-ftER28Ci.js")), Bxe = sh(() => import("./Simulation-CeLF0_mk.js")), Dxe = { name: "ContentVuer", props: { /** * Object containing information for * the required viewing. */ entry: Object, visible: { type: Boolean, default: !0 } }, components: { //DatasetHeader, Button: QS, ContentBar: XR, Flatmap: Ixe, Iframe: Pxe, MultiFlatmap: Lxe, Plot: Nxe, Scaffold: Mxe, Simulation: Bxe }, methods: { flatmapProvenacneReady: function(e) { var t; (t = this.$refs.contentBar) == null || t.setupFlatmapContextCard(e); }, /** * Toggle sync mode on/off depending on species and current state */ toggleSyncMode: function() { var e; (e = this.$refs.viewer) == null || e.toggleSyncMode(); }, 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 */ 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); }, receiveSynchronisedEvent: async function(e) { var t; (t = this.$refs.viewer) == null || t.receiveSynchronisedEvent(e); }, requestSynchronisedEvent: function(e) { var t; (t = this.$refs.viewer) == null || t.requestSynchronisedEvent(e); }, /** * Check if this viewer is currently visible */ isVisible: function() { return this.splitFlowStore.getPaneNameById(this.entry.id) !== void 0; }, onResize: function() { var e; (e = this.$refs.viewer) == null || e.onResize(); } }, data: function() { return { mouseHovered: !1, activeSpecies: "Rat" }; }, computed: { ...Ud(tw, np), syncMode() { return this.splitFlowStore.syncMode; }, viewerType() { switch (this.entry.type) { case "Biolucida": case "Iframe": case "Segmentation": return "Iframe"; default: return this.entry.type; } } } }, Rxe = { class: "component-container", ref: "container" }; function zxe(e, t, n, r, a, o) { const i = XR; return I(), j("div", { class: "content-container", onMouseover: t[0] || (t[0] = (s) => e.mouseHovered = !0), onMouseleave: t[1] || (t[1] = (s) => e.mouseHovered = !1) }, [ ue(i, { class: "toolbar", entry: n.entry, ref: "contentBar", onChooserChanged: o.onResize, onScaffoldViewClicked: o.scaffoldViewClicked, onVnodeMounted: o.setPanesBoundary }, null, 8, ["entry", "onChooserChanged", "onScaffoldViewClicked", "onVnodeMounted"]), W("div", Rxe, [ (I(), de(HK, null, { default: K(() => [ (I(), de(ct(o.viewerType), { entry: n.entry, mouseHovered: e.mouseHovered, visible: n.visible, lazy: !0, ref: "viewer", onFlatmapProvenanceReady: o.flatmapProvenacneReady, onResourceSelected: o.resourceSelected, onSpeciesChanged: o.speciesChanged }, null, 40, ["entry", "mouseHovered", "visible", "onFlatmapProvenanceReady", "onResourceSelected", "onSpeciesChanged"])) ]), _: 1 })) ], 512) ], 32); } const YR = /* @__PURE__ */ Ki(Dxe, [["render", zxe], ["__scopeId", "data-v-47023f68"]]); var ZR = { exports: {} }; (function(e, t) { (function(n, r) { e.exports = r(); })(typeof window < "u" ? window : bne, 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); }, a = n.cancelAnimationFrame || n.mozCancelAnimationFrame || n.webkitCancelAnimationFrame || function(c) { n.clearTimeout(c); }; function o(c, d) { var f = Object.prototype.toString.call(c), h = f === "[object Array]" || f === "[object NodeList]" || f === "[object HTMLCollection]" || f === "[object Object]" || typeof jQuery < "u" && c instanceof jQuery || typeof Elements < "u" && c instanceof Elements, p = 0, v = c.length; if (h) for (; p < v; p++) d(c[p]); 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(f) { c.style[f] = d[f]; }); } var l = function(c, d) { var f = 0; function h() { var v = []; this.add = function(y) { v.push(y); }; var m, g; this.call = function(y) { for (m = 0, g = v.length; m < g; m++) v[m].call(this, y); }, this.remove = function(y) { var x = []; for (m = 0, g = v.length; m < g; m++) v[m] !== y && x.push(v[m]); v = x; }, this.length = function() { return v.length; }; } function p(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%" }, y = { 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, y), x.appendChild(w); var k = document.createElement("div"); k.className = "resize-sensor-shrink", s(k, g); var C = document.createElement("div"); s(C, y), s(C, { width: "200%", height: "200%" }), k.appendChild(C), v.resizeSensor.appendChild(x), v.resizeSensor.appendChild(k), v.appendChild(v.resizeSensor); var S = window.getComputedStyle(v), _ = S ? S.getPropertyValue("position") : null; _ !== "absolute" && _ !== "relative" && _ !== "fixed" && _ !== "sticky" && (v.style.position = "relative"); var T = !1, O = 0, $ = i(v), A = 0, N = 0, L = !0; f = 0; var R = function() { var Z = v.offsetWidth, G = v.offsetHeight; w.style.width = Z + 10 + "px", w.style.height = G + 10 + "px", x.scrollLeft = Z + 10, x.scrollTop = G + 10, k.scrollLeft = Z + 10, k.scrollTop = G + 10; }, P = function() { if (L) { var Z = v.offsetWidth === 0 && v.offsetHeight === 0; if (Z) { f || (f = r(function() { f = 0, P(); })); return; } else L = !1; } R(); }; v.resizeSensor.resetSensor = P; var B = function() { O = 0, T && (A = $.width, N = $.height, v.resizedAttached && v.resizedAttached.call($)); }, M = function() { $ = i(v), T = $.width !== A || $.height !== N, T && !O && (O = r(B)), P(); }, z = function(Z, G, J) { Z.attachEvent ? Z.attachEvent("on" + G, J) : Z.addEventListener(G, J); }; z(x, "scroll", M), z(k, "scroll", M), f = r(function() { f = 0, P(); }); } } o(c, function(v) { p(v, d); }), this.detach = function(v) { f || (a(f), f = 0), l.detach(c, v); }, this.reset = function() { c.resizeSensor.resetSensor(); }; }; if (l.reset = function(c) { o(c, function(d) { d.resizeSensor.resetSensor(); }); }, l.detach = function(c, d) { o(c, function(f) { f && (f.resizedAttached && typeof d == "function" && (f.resizedAttached.remove(d), f.resizedAttached.length()) || f.resizeSensor && (f.contains(f.resizeSensor) && f.removeChild(f.resizeSensor), delete f.resizeSensor, delete f.resizedAttached)); }); }, typeof MutationObserver < "u") { var u = new MutationObserver(function(c) { for (var d in c) if (c.hasOwnProperty(d)) for (var f = c[d].addedNodes, h = 0; h < f.length; h++) f[h].resizeSensor && l.reset(f[h]); }); document.addEventListener("DOMContentLoaded", function(c) { u.observe(document.body, { childList: !0, subtree: !0 }); }); } return l; }); })(ZR); var Vxe = ZR.exports; const jxe = /* @__PURE__ */ qL(Vxe), Hxe = { name: "ResizeSensor", methods: { activate: function() { this._sensor || (this._sensor = new jxe(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(); } }, Uxe = { style: { height: "100%", width: "100%", position: "absolute" }, ref: "display" }; function qxe(e, t, n, r, a, o) { return I(), j("div", Uxe, null, 512); } const QR = /* @__PURE__ */ Ki(Hxe, [["render", qxe]]), Wxe = { 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, a) => (r.size = a === t ? r.max : r.min, a !== 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), a = 100 - (this.pushOtherPanes ? 0 : n.nextPanesSize), o = Math.max(Math.min(this.getCurrentDragPercentage(e), a), r); let i = [t, t + 1], s = this.panes[i[0]] || null, l = this.panes[i[1]] || null; const u = s.max < 100 && o >= s.max + n.prevPanesSize, c = l.max < 100 && o <= 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, o); 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(o - n.prevPanesSize - n.prevReachedMinPanes, s.min), s.max)), l !== null && (l.size = Math.min(Math.max(100 - o - 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((a, o) => { o > r[0] && o <= n && (a.size = a.min, e.prevReachedMinPanes += a.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((a, o) => { o > 0 && o <= n && (a.size = a.min, e.prevReachedMinPanes += a.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((a, o) => { o > n && o < r[1] && (a.size = a.min, e.nextReachedMinPanes += a.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((a, o) => { o < this.panesCount - 1 && o >= n + 1 && (a.size = a.min, e.nextReachedMinPanes += a.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, a = document.createElement("div"); a.classList.add("splitpanes__splitter"), n || (a.onmousedown = (o) => this.onMouseDown(o, r), typeof window < "u" && "ontouchstart" in window && (a.ontouchstart = (o) => this.onMouseDown(o, r)), a.onclick = (o) => this.onSplitterClick(o, r + 1)), this.dblClickSplitter && (a.ondblclick = (o) => this.onSplitterDblClick(o, r + 1)), t.parentNode.insertBefore(a, 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, a]) => n[r] = a); }, onPaneAdd(e) { let t = -1; Array.from(e.$el.parentNode.children).some((a) => (a.className.includes("splitpanes__pane") && t++, a === 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((a, o) => a.index = o), this.ready && this.$nextTick(() => { this.redoSplitters(), this.resetPaneSizes({ addedPane: this.panes[t] }), this.$emit("pane-add", { index: t, panes: this.panes.map((a) => ({ min: a.min, max: a.max, size: a.size })) }); }); }, onPaneRemove(e) { const t = this.panes.findIndex((r) => r.id === e._.uid), n = this.panes.splice(t, 1)[0]; this.panes.forEach((r, a) => r.index = a), 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((a) => { a.size = Math.max(Math.min(e, a.max), a.min), t -= a.size, a.size >= a.max && n.push(a.id), a.size <= a.min && r.push(a.id); }), t > 0.1 && this.readjustSizes(t, n, r); }, initialPanesSizing() { let e = 100; const t = [], n = []; let r = 0; this.panes.forEach((o) => { e -= o.size, o.size !== null && r++, o.size >= o.max && t.push(o.id), o.size <= o.min && n.push(o.id); }); let a = 100; e > 0.1 && (this.panes.forEach((o) => { o.size === null && (o.size = Math.max(Math.min(e / (this.panesCount - r), o.max), o.min)), a -= o.size; }), a > 0.1 && this.readjustSizes(e, t, n)); }, equalizeAfterAddOrRemove({ addedPane: e, removedPane: t } = {}) { let n = 100 / this.panesCount, r = 0; const a = [], o = []; e && e.givenSize !== null && (n = (100 - e.givenSize) / (this.panesCount - 1)), this.panes.forEach((i) => { r -= i.size, i.size >= i.max && a.push(i.id), i.size <= i.min && o.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 && a.push(i.id), i.size <= i.min && o.push(i.id); }), r > 0.1 && this.readjustSizes(r, a, o)); }, readjustSizes(e, t, n) { let r; e > 0 ? r = e / (this.panesCount - t.length) : r = e / (this.panesCount - n.length), this.panes.forEach((a, o) => { if (e > 0 && !t.includes(a.id)) { const i = Math.max(Math.min(a.size + r, a.max), a.min), s = i - a.size; e -= s, a.size = i; } else if (!n.includes(a.id)) { const i = Math.max(Math.min(a.size + r, a.max), a.min), s = i - a.size; e -= s, a.size = i; } a.update({ [this.horizontal ? "height" : "width"]: `${this.indexedPanes[a.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 sn( "div", { ref: "container", class: [ "splitpanes", `splitpanes--${this.horizontal ? "horizontal" : "vertical"}`, { "splitpanes--dragging": this.touch.dragging } ] }, this.$slots.default() ); } }, Kxe = (e, t) => { const n = e.__vccOpts || e; for (const [r, a] of t) n[r] = a; return n; }, Gxe = { 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 Xxe(e, t, n, r, a, o) { return I(), j("div", { class: "splitpanes__pane", onClick: t[0] || (t[0] = (i) => o.onPaneClick(i, e._.uid)), style: Ye(e.style) }, [ he(e.$slots, "default") ], 4); } const Yxe = /* @__PURE__ */ Kxe(Gxe, [["render", Xxe]]), Zxe = { name: "CustomSplitter", components: { Splitpanes: Wxe, Pane: Yxe, ResizeSensor: QR }, 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(); Tn.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) { Tn.emit("PaneUnmounted", { refName: e }); } }, computed: { ...Ud(np), children() { return this.customLayout[this.index].children; }, customLayout() { return this.splitFlowStore.customLayout; }, isHorizontal() { return this.customLayout[this.index].horizontal; } } }, Qxe = { style: { height: "100%", width: "100%" } }; function Jxe(e, t, n, r, a, o) { const i = QR, s = lt("custom-splitter", !0), l = lt("pane"), u = lt("splitpanes"); return I(), j("div", Qxe, [ ue(i, { onResize: t[0] || (t[0] = (c) => o.calculateStyles(n.index)) }), ue(u, { class: "default-theme", horizontal: o.isHorizontal, "dbl-click-splitter": !1 }, { default: K(() => [ (I(!0), j(Qe, null, Nt(o.children, (c) => (I(), de(l, { key: c, ref_for: !0, ref: c, onVnodeBeforeUnmount: (d) => o.childUnmounted(c) }, { default: K(() => [ o.customLayout[c].content ? (I(), de(i, { key: 0, onResize: (d) => o.calculateStyles(c) }, null, 8, ["onResize"])) : (I(), de(s, { key: c, index: c }, null, 8, ["index"])) ]), _: 2 }, 1032, ["onVnodeBeforeUnmount"]))), 128)) ]), _: 1 }, 8, ["horizontal"]) ]); } const JR = /* @__PURE__ */ Ki(Zxe, [["render", Jxe], ["__scopeId", "data-v-0667e71f"]]), eke = { name: "SplitDialog", components: { ContentVuer: YR, CustomSplitter: JR }, props: { entries: { type: Array, default: function() { return []; } } }, data: function() { return { styles: {} }; }, 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; }, sendSynchronisedEvent: function(e) { this.getActiveContents().forEach((n) => { n.receiveSynchronisedEvent(e); }); }, 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; } }, computed: { ...Ud(np), activeView: function() { return this.splitFlowStore.activeView; }, horizontal() { return this.splitFlowStore.activeView === "2horpanel"; }, splitters() { return this.splitFlowStore.splitters; }, globalCallback() { return this.splitFlowStore.globalCallback; } }, watch: { globalCallback: { handler: function(e) { if (e) { const t = this.getActiveContents(); t && t.forEach((n) => { n.requestSynchronisedEvent(e); }); } else { const t = this.$refs.content; t && t.forEach((n) => { n.requestSynchronisedEvent(!1); }); } }, immediate: !0, deep: !0 } }, mounted: function() { Tn.on("PaneResize", (e) => { this.setStyles(e.refName, e.rect); }), Tn.on("PaneUnmounted", (e) => { this.hidePane(e.refName); }); } }, tke = { class: "tab-container", ref: "tabContainer" }; function nke(e, t, n, r, a, o) { const i = JR, s = YR; return I(), j("div", tke, [ ue(i, { index: "split-1", key: "split-1" }), (I(!0), j(Qe, null, Nt(n.entries, (l) => (I(), j("div", { key: l.id, style: Ye(o.getStyle(l.id)), class: H([o.getClass(l.id), "contentvuer"]) }, [ (I(), de(s, { key: l.id, entry: l, ref_for: !0, ref: "content", onResourceSelected: o.resourceSelected, onSpeciesChanged: o.speciesChanged, visible: o.isIdVisible(l.id) }, null, 8, ["entry", "onResourceSelected", "onSpeciesChanged", "visible"])) ], 6))), 128)) ], 512); } const e7 = /* @__PURE__ */ Ki(eke, [["render", nke], ["__scopeId", "data-v-32038eaa"]]), rke = { name: "SearchControls", props: { failedSearch: void 0 }, components: { Autocomplete: VL, MapSvgIcon: a3 }, methods: { fetchSuggestions: function(e, t) { e === "" ? t([]) : this.$emit("fetch-suggestions", { term: e, cb: t }); } }, data: function() { return { searchText: "" }; } }, ake = (e) => (No("data-v-eb3db1ae"), e = e(), Mo(), e), oke = { class: "search-container" }, ike = /* @__PURE__ */ ake(() => /* @__PURE__ */ W("div", { class: "text search-text" }, " Search within display ", -1)), ske = { key: 0, class: "text not-found-text" }; function lke(e, t, n, r, a, o) { const i = VL, s = lt("map-svg-icon"); return I(), j("div", oke, [ ike, ue(i, { class: "search-box", placeholder: "Search", modelValue: e.searchText, "onUpdate:modelValue": t[0] || (t[0] = (l) => e.searchText = l), "fetch-suggestions": o.fetchSuggestions, onKeyup: t[1] || (t[1] = gn((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"]), ue(s, { icon: "magnifyingGlass", class: "magnify", onClick: t[3] || (t[3] = (l) => e.$emit("search", e.searchText)) }), n.failedSearch ? (I(), j("div", ske, " '" + Fe(n.failedSearch) + "' not found ", 1)) : ne("", !0) ]); } const t7 = /* @__PURE__ */ Ki(rke, [["render", lke], ["__scopeId", "data-v-eb3db1ae"]]), uke = { name: "DialogToolbarContent", components: { Button: QS, Col: KL, Icon: Ir, Input: g2, Popover: w2, Row: y2, Switch: oN, MapSvgIcon: a3, MapSvgSpriteColor: WR, SearchControls: t7, ElIconCopyDocument: w8 }, props: { /** * Array of titles. */ numberOfEntries: { type: Number, default: 0 }, /** * Display icons for docking, undocking and etc. */ showIcons: { type: Boolean, default: !1 } }, computed: { ...Ud(tw, I0, np), activeView() { return this.splitFlowStore.activeView; }, helpDelay() { return this.settingsStore.helpDelay; }, shareLink() { return this.settingsStore.shareLink; }, syncMode() { return this.splitFlowStore.syncMode; }, viewIcons() { return this.splitFlowStore.viewIcons; }, globalCallback() { return this.splitFlowStore.globalCallback; } }, watch: { shareLink: function() { this.loadingLink = !1; }, independent: function(e) { let t = e !== !0; this.globalCallback !== t && this.splitFlowStore.toggleGlobalCallback(t); }, globalCallback: function(e) { let t = e !== !0; t !== this.independent && (this.independent = t); } }, data: function() { return { isFullscreen: !1, loadingLink: !0, shareLinkDisplay: !1, independent: !0, failedSearch: void 0, activeViewRef: void 0, permalinkRef: void 0, ElIconCopyDocument: dn(w8) }; }, methods: { titleClicked: function(e) { this.$emit("titleClicked", e); }, startHelp: function() { Tn.emit("startHelp"); }, onFullscreen: function() { this.$emit("onFullscreen"), this.isFullscreen = !this.isFullscreen; }, onFullscreenEsc: function() { document.fullscreenElement || (this.isFullscreen = !1); }, close: function() { this.$emit("close"); }, copyShareLink: function() { document && (this.$refs.linkInput.$el.querySelector("input").select(), document.execCommand("copy")); }, setFailedSearch: function(e) { this.failedSearch = e; }, getShareLink: function() { this.loadingLink = !0, this.shareLinkDisplay = !0, Tn.emit("updateShareLinkRequested"); }, viewClicked: function(e) { this.splitFlowStore.updateActiveView({ view: e, entries: this.entriesStore.entries }), this.$refs.viewPopover && this.$refs.viewPopover.hide(); } }, mounted: function() { this.activeViewRef = dn(this.$refs.activeViewRef), this.permalinkRef = dn(this.$refs.permalinkRef), document.addEventListener("fullscreenchange", this.onFullscreenEsc); }, unmounted: function() { document.removeEventListener("fullscreenchange", this.onFullscreenEsc); } }, i3 = (e) => (No("data-v-3ca4906c"), e = e(), Mo(), e), cke = { class: "header" }, dke = { key: 0, class: "switch-control" }, pke = /* @__PURE__ */ i3(() => /* @__PURE__ */ W("br", null, null, -1)), fke = /* @__PURE__ */ i3(() => /* @__PURE__ */ W("br", null, null, -1)), hke = /* @__PURE__ */ i3(() => /* @__PURE__ */ W("br", null, null, -1)); function vke(e, t, n, r, a, o) { const i = lt("map-svg-sprite-color"), s = t7, l = oN, u = lt("map-svg-icon"), c = w2, d = KL, f = y2, h = g2, p = QS, v = bf; return I(), j("div", cke, [ ue(i), ue(s, { onSearch: t[0] || (t[0] = (m) => { e.$emit("local-search", { term: m }); }), onFetchSuggestions: t[1] || (t[1] = (m) => { e.$emit("fetch-suggestions", { data: m }); }), failedSearch: e.failedSearch }, null, 8, ["failedSearch"]), o.syncMode ? (I(), j("div", dke, [ ue(l, { class: "switch", modelValue: e.independent, "onUpdate:modelValue": t[2] || (t[2] = (m) => e.independent = m), "active-text": "Independent", width: 30, "inactive-text": "Linked" }, null, 8, ["modelValue"]), ue(c, { class: "tooltip", placement: "bottom-end", "show-after": o.helpDelay, teleported: !1, trigger: "hover", "popper-class": "header-popper" }, { reference: K(() => [ ue(u, { icon: "help", class: "sync-help header-icon" }) ]), default: K(() => [ et(" When in Linked mode the two maps will interact "), pke, et(" together. Select an organ in one and it will "), fke, et(" be automatically selected in the other. "), hke, et(' In Independent mode the maps will work separately." ') ]), _: 1 }, 8, ["show-after"]) ])) : ne("", !0), ue(f, { class: "icon-group" }, { default: K(() => [ e.activeViewRef ? (I(), de(c, { key: 0, "virtual-ref": e.activeViewRef, ref: "viewPopover", placement: "bottom", width: "133", teleported: !1, trigger: "click", "popper-class": "view-icon-popover", "virtual-triggering": "" }, { default: K(() => [ (I(!0), j(Qe, null, Nt(o.viewIcons, (m) => (I(), de(f, { gutter: 20, key: m.name, class: H([ { active: m.icon == o.activeView }, { disabled: m.min > n.numberOfEntries }, "view-icon-row" ]), onClick: (g) => o.viewClicked(m.icon) }, { default: K(() => [ ue(d, { span: 4 }, { default: K(() => [ ue(u, { icon: m.icon, class: "view-icon" }, null, 8, ["icon"]) ]), _: 2 }, 1024), ue(d, { offset: 2, span: 18, class: "view-text" }, { default: K(() => [ et(Fe(m.name), 1) ]), _: 2 }, 1024) ]), _: 2 }, 1032, ["class", "onClick"]))), 128)) ]), _: 1 }, 8, ["virtual-ref"])) : ne("", !0), ue(c, { class: "tooltip", content: "Split screen", placement: "bottom-end", "show-after": o.helpDelay, teleported: !1, trigger: "hover", "popper-class": "header-popper" }, { reference: K(() => [ ue(u, { icon: o.activeView, ref: "activeViewRef", class: H([ { disabled: 1 >= n.numberOfEntries }, "header-icon" ]) }, null, 8, ["icon", "class"]) ]), _: 1 }, 8, ["show-after"]), ue(c, { class: "tooltip", content: "Help", placement: "bottom-end", "show-after": o.helpDelay, teleported: !1, trigger: "hover", "popper-class": "header-popper" }, { reference: K(() => [ ue(u, { icon: "tooltips", class: "header-icon", onClick: t[3] || (t[3] = (m) => o.startHelp()) }) ]), _: 1 }, 8, ["show-after"]), ue(c, { class: "tooltip", content: "Fullscreen", placement: "bottom-end", "show-after": o.helpDelay, teleported: !1, trigger: "hover", "popper-class": "header-popper" }, { reference: K(() => [ Xe(ue(u, { icon: "fullScreen", class: "header-icon", onClick: o.onFullscreen }, null, 8, ["onClick"]), [ [mt, !e.isFullscreen] ]) ]), _: 1 }, 8, ["show-after"]), ue(c, { class: "tooltip", content: "Exit fullscreen", placement: "bottom-end", "show-after": o.helpDelay, teleported: !1, trigger: "hover", "popper-class": "header-popper" }, { reference: K(() => [ Xe(ue(u, { icon: "closeFullScreen", class: "header-icon", onClick: o.onFullscreen }, null, 8, ["onClick"]), [ [mt, e.isFullscreen] ]) ]), _: 1 }, 8, ["show-after"]), e.permalinkRef ? (I(), de(c, { key: 1, ref: "linkPopover", "virtual-ref": e.permalinkRef, placement: "bottom-end", width: "400", teleported: !1, trigger: "click", "popper-class": "link-popover", "virtual-triggering": "" }, { default: K(() => [ Xe((I(), de(f, { gutter: 20, "element-loading-text": "Creating link..." }, { default: K(() => [ ue(d, { span: 20 }, { default: K(() => [ ue(h, { class: "link-input", size: "small", placeholder: "Permanant Link Here", readonly: !0, modelValue: o.shareLink, "onUpdate:modelValue": t[4] || (t[4] = (m) => o.shareLink = m), ref: "linkInput" }, null, 8, ["modelValue"]) ]), _: 1 }), ue(d, { span: 4 }, { default: K(() => [ ue(c, { class: "tooltip", content: "Copy link", placement: "bottom-end", "show-after": o.helpDelay, teleported: !1, trigger: "hover", "popper-class": "header-popper" }, { reference: K(() => [ ue(p, { class: "copy-button", icon: e.ElIconCopyDocument, size: "small", onClick: o.copyShareLink }, null, 8, ["icon", "onClick"]) ]), _: 1 }, 8, ["show-after"]) ]), _: 1 }) ]), _: 1 })), [ [v, e.loadingLink] ]) ]), _: 1 }, 8, ["virtual-ref"])) : ne("", !0), ue(c, { class: "tooltip", content: "Get permalink", placement: "bottom-end", "show-after": o.helpDelay, teleported: !1, trigger: "hover", "popper-class": "header-popper" }, { reference: K(() => [ Xe(ue(u, { icon: "permalink", ref: "permalinkRef", class: "header-icon", onClick: o.getShareLink }, null, 8, ["onClick"]), [ [mt, o.shareLink] ]) ]), _: 1 }, 8, ["show-after"]), ue(c, { class: "tooltip", content: "Close", placement: "bottom-end", "show-after": o.helpDelay, teleported: !1, trigger: "hover", "popper-class": "header-popper" }, { reference: K(() => [ Xe(ue(u, { icon: "close", class: "header-icon", onClick: o.close }, null, 8, ["onClick"]), [ [mt, n.showIcons] ]) ]), _: 1 }, 8, ["show-after"]) ]), _: 1 }) ]); } const n7 = /* @__PURE__ */ Ki(uke, [["render", vke], ["__scopeId", "data-v-3ca4906c"]]), Xs = { 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), Tn.emit("trackEvent", t); } }, r7 = (e) => !e.getAttribute("aria-owns"), a7 = (e, t, n) => { const { parentNode: r } = e; if (!r) return null; const a = r.querySelectorAll(n), o = Array.prototype.indexOf.call(a, e); return a[o + t] || null; }, sy = (e) => { e && (e.focus(), !r7(e) && e.click()); }, Js = (e, t, { checkForDefaultPrevented: n = !0 } = {}) => (r) => { const a = e == null ? void 0 : e(r); if (n === !1 || !a) return t == null ? void 0 : t(r); }; var KO; const rr = typeof window < "u", gke = (e) => typeof e == "string", o7 = () => { }, l5 = rr && ((KO = window == null ? void 0 : window.navigator) == null ? void 0 : KO.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent); function P0(e) { return typeof e == "function" ? e() : b(e); } function mke(e) { return e; } function Hg(e) { return hg() ? (ah(e), !0) : !1; } function yke(e, t = !0) { tt() ? nt(e) : t ? e() : Ue(e); } function GO(e, t, n = {}) { const { immediate: r = !0 } = n, a = U(!1); let o = null; function i() { o && (clearTimeout(o), o = null); } function s() { a.value = !1, i(); } function l(...u) { i(), a.value = !0, o = setTimeout(() => { a.value = !1, o = null, e(...u); }, P0(t)); } return r && (a.value = !0, rr && l()), Hg(s), { isPending: ih(a), start: l, stop: s }; } function ps(e) { var t; const n = P0(e); return (t = n == null ? void 0 : n.$el) != null ? t : n; } const Ug = rr ? window : void 0; function Mi(...e) { let t, n, r, a; if (gke(e[0]) || Array.isArray(e[0]) ? ([n, r, a] = e, t = Ug) : [t, n, r, a] = e, !t) return o7; Array.isArray(n) || (n = [n]), Array.isArray(r) || (r = [r]); const o = [], i = () => { o.forEach((c) => c()), o.length = 0; }, s = (c, d, f, h) => (c.addEventListener(d, f, h), () => c.removeEventListener(d, f, h)), l = be(() => [ps(t), P0(a)], ([c, d]) => { i(), c && o.push(...n.flatMap((f) => r.map((h) => s(c, f, h, d)))); }, { immediate: !0, flush: "post" }), u = () => { l(), i(); }; return Hg(u), u; } let XO = !1; function bke(e, t, n = {}) { const { window: r = Ug, ignore: a = [], capture: o = !0, detectIframe: i = !1 } = n; if (!r) return; l5 && !XO && (XO = !0, Array.from(r.document.body.children).forEach((c) => c.addEventListener("click", o7))); let s = !0; const l = (c) => a.some((d) => { if (typeof d == "string") return Array.from(r.document.querySelectorAll(d)).some((f) => f === c.target || c.composedPath().includes(f)); { const f = ps(d); return f && (c.target === f || c.composedPath().includes(f)); } }), u = [ Mi(r, "click", (c) => { const d = ps(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: o }), Mi(r, "pointerdown", (c) => { const d = ps(e); d && (s = !c.composedPath().includes(d) && !l(c)); }, { passive: !0 }), i && Mi(r, "blur", (c) => { var d; const f = ps(e); ((d = r.document.activeElement) == null ? void 0 : d.tagName) === "IFRAME" && !(f != null && f.contains(r.document.activeElement)) && t(c); }) ].filter(Boolean); return () => u.forEach((c) => c()); } function i7(e, t = !1) { const n = U(), r = () => n.value = !!e(); return r(), yke(r, t), n; } const YO = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, ZO = "__vueuse_ssr_handlers__"; YO[ZO] = YO[ZO] || {}; function wke(e, t, { window: n = Ug, initialValue: r = "" } = {}) { const a = U(r), o = F(() => { var i; return ps(t) || ((i = n == null ? void 0 : n.document) == null ? void 0 : i.documentElement); }); return be([o, () => P0(e)], ([i, s]) => { var l; if (i && n) { const u = (l = n.getComputedStyle(i).getPropertyValue(s)) == null ? void 0 : l.trim(); a.value = u || r; } }, { immediate: !0 }), be(a, (i) => { var s; (s = o.value) != null && s.style && o.value.style.setProperty(P0(e), i); }), a; } var QO = Object.getOwnPropertySymbols, xke = Object.prototype.hasOwnProperty, kke = Object.prototype.propertyIsEnumerable, Cke = (e, t) => { var n = {}; for (var r in e) xke.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]); if (e != null && QO) for (var r of QO(e)) t.indexOf(r) < 0 && kke.call(e, r) && (n[r] = e[r]); return n; }; function us(e, t, n = {}) { const r = n, { window: a = Ug } = r, o = Cke(r, ["window"]); let i; const s = i7(() => a && "ResizeObserver" in a), l = () => { i && (i.disconnect(), i = void 0); }, u = be(() => ps(e), (d) => { l(), s.value && a && d && (i = new ResizeObserver(t), i.observe(d, o)); }, { immediate: !0, flush: "post" }), c = () => { l(), u(); }; return Hg(c), { isSupported: s, stop: c }; } var JO = Object.getOwnPropertySymbols, Ske = Object.prototype.hasOwnProperty, Eke = Object.prototype.propertyIsEnumerable, _ke = (e, t) => { var n = {}; for (var r in e) Ske.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]); if (e != null && JO) for (var r of JO(e)) t.indexOf(r) < 0 && Eke.call(e, r) && (n[r] = e[r]); return n; }; function Tke(e, t, n = {}) { const r = n, { window: a = Ug } = r, o = _ke(r, ["window"]); let i; const s = i7(() => a && "MutationObserver" in a), l = () => { i && (i.disconnect(), i = void 0); }, u = be(() => ps(e), (d) => { l(), s.value && a && d && (i = new MutationObserver(t), i.observe(d, o)); }, { immediate: !0 }), c = () => { l(), u(); }; return Hg(c), { isSupported: s, stop: c }; } var e$; (function(e) { e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE"; })(e$ || (e$ = {})); var Oke = Object.defineProperty, t$ = Object.getOwnPropertySymbols, $ke = Object.prototype.hasOwnProperty, Fke = Object.prototype.propertyIsEnumerable, n$ = (e, t, n) => t in e ? Oke(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Ake = (e, t) => { for (var n in t || (t = {})) $ke.call(t, n) && n$(e, n, t[n]); if (t$) for (var n of t$(t)) Fke.call(t, n) && n$(e, n, t[n]); return e; }; const Ike = { 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] }; Ake({ linear: mke }, Ike); const Pke = () => rr && /firefox/i.test(window.navigator.userAgent); /** * @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 vl = () => { }, Lke = Object.prototype.hasOwnProperty, r$ = (e, t) => Lke.call(e, t), Ha = Array.isArray, Lr = (e) => typeof e == "function", lo = (e) => typeof e == "string", Kr = (e) => e !== null && typeof e == "object", Nke = (e) => (Kr(e) || Lr(e)) && Lr(e.then) && Lr(e.catch), Mke = Object.prototype.toString, Bke = (e) => Mke.call(e), ik = (e) => Bke(e).slice(8, -1), s3 = (e) => { const t = /* @__PURE__ */ Object.create(null); return (n) => t[n] || (t[n] = e(n)); }, Dke = /-(\w)/g, Rke = s3((e) => e.replace(Dke, (t, n) => n ? n.toUpperCase() : "")), zke = /\B([A-Z])/g, Vke = s3( (e) => e.replace(zke, "-$1").toLowerCase() ), jke = s3((e) => e.charAt(0).toUpperCase() + e.slice(1)); var s7 = typeof global == "object" && global && global.Object === Object && global, Hke = typeof self == "object" && self && self.Object === Object && self, Gi = s7 || Hke || Function("return this")(), ii = Gi.Symbol, l7 = Object.prototype, Uke = l7.hasOwnProperty, qke = l7.toString, iv = ii ? ii.toStringTag : void 0; function Wke(e) { var t = Uke.call(e, iv), n = e[iv]; try { e[iv] = void 0; var r = !0; } catch { } var a = qke.call(e); return r && (t ? e[iv] = n : delete e[iv]), a; } var Kke = Object.prototype, Gke = Kke.toString; function Xke(e) { return Gke.call(e); } var Yke = "[object Null]", Zke = "[object Undefined]", a$ = ii ? ii.toStringTag : void 0; function Ch(e) { return e == null ? e === void 0 ? Zke : Yke : a$ && a$ in Object(e) ? Wke(e) : Xke(e); } function Ku(e) { return e != null && typeof e == "object"; } var Qke = "[object Symbol]"; function nw(e) { return typeof e == "symbol" || Ku(e) && Ch(e) == Qke; } function Jke(e, t) { for (var n = -1, r = e == null ? 0 : e.length, a = Array(r); ++n < r; ) a[n] = t(e[n], n, e); return a; } var si = Array.isArray, eCe = 1 / 0, o$ = ii ? ii.prototype : void 0, i$ = o$ ? o$.toString : void 0; function u7(e) { if (typeof e == "string") return e; if (si(e)) return Jke(e, u7) + ""; if (nw(e)) return i$ ? i$.call(e) : ""; var t = e + ""; return t == "0" && 1 / e == -eCe ? "-0" : t; } var tCe = /\s/; function nCe(e) { for (var t = e.length; t-- && tCe.test(e.charAt(t)); ) ; return t; } var rCe = /^\s+/; function aCe(e) { return e && e.slice(0, nCe(e) + 1).replace(rCe, ""); } function _s(e) { var t = typeof e; return e != null && (t == "object" || t == "function"); } var s$ = NaN, oCe = /^[-+]0x[0-9a-f]+$/i, iCe = /^0b[01]+$/i, sCe = /^0o[0-7]+$/i, lCe = parseInt; function l$(e) { if (typeof e == "number") return e; if (nw(e)) return s$; if (_s(e)) { var t = typeof e.valueOf == "function" ? e.valueOf() : e; e = _s(t) ? t + "" : t; } if (typeof e != "string") return e === 0 ? e : +e; e = aCe(e); var n = iCe.test(e); return n || sCe.test(e) ? lCe(e.slice(2), n ? 2 : 8) : oCe.test(e) ? s$ : +e; } function c7(e) { return e; } var uCe = "[object AsyncFunction]", cCe = "[object Function]", dCe = "[object GeneratorFunction]", pCe = "[object Proxy]"; function d7(e) { if (!_s(e)) return !1; var t = Ch(e); return t == cCe || t == dCe || t == uCe || t == pCe; } var sk = Gi["__core-js_shared__"], u$ = function() { var e = /[^.]+$/.exec(sk && sk.keys && sk.keys.IE_PROTO || ""); return e ? "Symbol(src)_1." + e : ""; }(); function fCe(e) { return !!u$ && u$ in e; } var hCe = Function.prototype, vCe = hCe.toString; function rp(e) { if (e != null) { try { return vCe.call(e); } catch { } try { return e + ""; } catch { } } return ""; } var gCe = /[\\^$.*+?()[\]{}|]/g, mCe = /^\[object .+?Constructor\]$/, yCe = Function.prototype, bCe = Object.prototype, wCe = yCe.toString, xCe = bCe.hasOwnProperty, kCe = RegExp( "^" + wCe.call(xCe).replace(gCe, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$" ); function CCe(e) { if (!_s(e) || fCe(e)) return !1; var t = d7(e) ? kCe : mCe; return t.test(rp(e)); } function SCe(e, t) { return e == null ? void 0 : e[t]; } function ap(e, t) { var n = SCe(e, t); return CCe(n) ? n : void 0; } var u5 = ap(Gi, "WeakMap"), c$ = Object.create, ECe = /* @__PURE__ */ function() { function e() { } return function(t) { if (!_s(t)) return {}; if (c$) return c$(t); e.prototype = t; var n = new e(); return e.prototype = void 0, n; }; }(); function _Ce(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 TCe = 800, OCe = 16, $Ce = Date.now; function FCe(e) { var t = 0, n = 0; return function() { var r = $Ce(), a = OCe - (r - n); if (n = r, a > 0) { if (++t >= TCe) return arguments[0]; } else t = 0; return e.apply(void 0, arguments); }; } function ACe(e) { return function() { return e; }; } var lb = function() { try { var e = ap(Object, "defineProperty"); return e({}, "", {}), e; } catch { } }(), ICe = lb ? function(e, t) { return lb(e, "toString", { configurable: !0, enumerable: !1, value: ACe(t), writable: !0 }); } : c7, PCe = FCe(ICe); function LCe(e, t) { for (var n = -1, r = e == null ? 0 : e.length; ++n < r && t(e[n], n, e) !== !1; ) ; return e; } function NCe(e, t, n, r) { e.length; for (var a = n + 1; a--; ) if (t(e[a], a, e)) return a; return -1; } var MCe = 9007199254740991, BCe = /^(?:0|[1-9]\d*)$/; function l3(e, t) { var n = typeof e; return t = t ?? MCe, !!t && (n == "number" || n != "symbol" && BCe.test(e)) && e > -1 && e % 1 == 0 && e < t; } function DCe(e, t, n) { t == "__proto__" && lb ? lb(e, t, { configurable: !0, enumerable: !0, value: n, writable: !0 }) : e[t] = n; } function u3(e, t) { return e === t || e !== e && t !== t; } var RCe = Object.prototype, zCe = RCe.hasOwnProperty; function p7(e, t, n) { var r = e[t]; (!(zCe.call(e, t) && u3(r, n)) || n === void 0 && !(t in e)) && DCe(e, t, n); } var d$ = Math.max; function VCe(e, t, n) { return t = d$(t === void 0 ? e.length - 1 : t, 0), function() { for (var r = arguments, a = -1, o = d$(r.length - t, 0), i = Array(o); ++a < o; ) i[a] = r[t + a]; a = -1; for (var s = Array(t + 1); ++a < t; ) s[a] = r[a]; return s[t] = n(i), _Ce(e, this, s); }; } var jCe = 9007199254740991; function c3(e) { return typeof e == "number" && e > -1 && e % 1 == 0 && e <= jCe; } function HCe(e) { return e != null && c3(e.length) && !d7(e); } var UCe = Object.prototype; function f7(e) { var t = e && e.constructor, n = typeof t == "function" && t.prototype || UCe; return e === n; } function qCe(e, t) { for (var n = -1, r = Array(e); ++n < e; ) r[n] = t(n); return r; } var WCe = "[object Arguments]"; function p$(e) { return Ku(e) && Ch(e) == WCe; } var h7 = Object.prototype, KCe = h7.hasOwnProperty, GCe = h7.propertyIsEnumerable, d3 = p$(/* @__PURE__ */ function() { return arguments; }()) ? p$ : function(e) { return Ku(e) && KCe.call(e, "callee") && !GCe.call(e, "callee"); }; function XCe() { return !1; } var v7 = typeof exports == "object" && exports && !exports.nodeType && exports, f$ = v7 && typeof module == "object" && module && !module.nodeType && module, YCe = f$ && f$.exports === v7, h$ = YCe ? Gi.Buffer : void 0, ZCe = h$ ? h$.isBuffer : void 0, ub = ZCe || XCe, QCe = "[object Arguments]", JCe = "[object Array]", e5e = "[object Boolean]", t5e = "[object Date]", n5e = "[object Error]", r5e = "[object Function]", a5e = "[object Map]", o5e = "[object Number]", i5e = "[object Object]", s5e = "[object RegExp]", l5e = "[object Set]", u5e = "[object String]", c5e = "[object WeakMap]", d5e = "[object ArrayBuffer]", p5e = "[object DataView]", f5e = "[object Float32Array]", h5e = "[object Float64Array]", v5e = "[object Int8Array]", g5e = "[object Int16Array]", m5e = "[object Int32Array]", y5e = "[object Uint8Array]", b5e = "[object Uint8ClampedArray]", w5e = "[object Uint16Array]", x5e = "[object Uint32Array]", Qn = {}; Qn[f5e] = Qn[h5e] = Qn[v5e] = Qn[g5e] = Qn[m5e] = Qn[y5e] = Qn[b5e] = Qn[w5e] = Qn[x5e] = !0; Qn[QCe] = Qn[JCe] = Qn[d5e] = Qn[e5e] = Qn[p5e] = Qn[t5e] = Qn[n5e] = Qn[r5e] = Qn[a5e] = Qn[o5e] = Qn[i5e] = Qn[s5e] = Qn[l5e] = Qn[u5e] = Qn[c5e] = !1; function k5e(e) { return Ku(e) && c3(e.length) && !!Qn[Ch(e)]; } function p3(e) { return function(t) { return e(t); }; } var g7 = typeof exports == "object" && exports && !exports.nodeType && exports, Kv = g7 && typeof module == "object" && module && !module.nodeType && module, C5e = Kv && Kv.exports === g7, lk = C5e && s7.process, If = function() { try { var e = Kv && Kv.require && Kv.require("util").types; return e || lk && lk.binding && lk.binding("util"); } catch { } }(), v$ = If && If.isTypedArray, m7 = v$ ? p3(v$) : k5e, S5e = Object.prototype, E5e = S5e.hasOwnProperty; function _5e(e, t) { var n = si(e), r = !n && d3(e), a = !n && !r && ub(e), o = !n && !r && !a && m7(e), i = n || r || a || o, s = i ? qCe(e.length, String) : [], l = s.length; for (var u in e) E5e.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. a && (u == "offset" || u == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays. o && (u == "buffer" || u == "byteLength" || u == "byteOffset") || // Skip index properties. l3(u, l))) && s.push(u); return s; } function y7(e, t) { return function(n) { return e(t(n)); }; } var T5e = y7(Object.keys, Object), O5e = Object.prototype, $5e = O5e.hasOwnProperty; function F5e(e) { if (!f7(e)) return T5e(e); var t = []; for (var n in Object(e)) $5e.call(e, n) && n != "constructor" && t.push(n); return t; } function b7(e) { return HCe(e) ? _5e(e) : F5e(e); } var A5e = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, I5e = /^\w*$/; function f3(e, t) { if (si(e)) return !1; var n = typeof e; return n == "number" || n == "symbol" || n == "boolean" || e == null || nw(e) ? !0 : I5e.test(e) || !A5e.test(e) || t != null && e in Object(t); } var L0 = ap(Object, "create"); function P5e() { this.__data__ = L0 ? L0(null) : {}, this.size = 0; } function L5e(e) { var t = this.has(e) && delete this.__data__[e]; return this.size -= t ? 1 : 0, t; } var N5e = "__lodash_hash_undefined__", M5e = Object.prototype, B5e = M5e.hasOwnProperty; function D5e(e) { var t = this.__data__; if (L0) { var n = t[e]; return n === N5e ? void 0 : n; } return B5e.call(t, e) ? t[e] : void 0; } var R5e = Object.prototype, z5e = R5e.hasOwnProperty; function V5e(e) { var t = this.__data__; return L0 ? t[e] !== void 0 : z5e.call(t, e); } var j5e = "__lodash_hash_undefined__"; function H5e(e, t) { var n = this.__data__; return this.size += this.has(e) ? 0 : 1, n[e] = L0 && t === void 0 ? j5e : t, this; } function Sd(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]); } } Sd.prototype.clear = P5e; Sd.prototype.delete = L5e; Sd.prototype.get = D5e; Sd.prototype.has = V5e; Sd.prototype.set = H5e; function U5e() { this.__data__ = [], this.size = 0; } function rw(e, t) { for (var n = e.length; n--; ) if (u3(e[n][0], t)) return n; return -1; } var q5e = Array.prototype, W5e = q5e.splice; function K5e(e) { var t = this.__data__, n = rw(t, e); if (n < 0) return !1; var r = t.length - 1; return n == r ? t.pop() : W5e.call(t, n, 1), --this.size, !0; } function G5e(e) { var t = this.__data__, n = rw(t, e); return n < 0 ? void 0 : t[n][1]; } function X5e(e) { return rw(this.__data__, e) > -1; } function Y5e(e, t) { var n = this.__data__, r = rw(n, e); return r < 0 ? (++this.size, n.push([e, t])) : n[r][1] = t, this; } function Ll(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]); } } Ll.prototype.clear = U5e; Ll.prototype.delete = K5e; Ll.prototype.get = G5e; Ll.prototype.has = X5e; Ll.prototype.set = Y5e; var N0 = ap(Gi, "Map"); function Z5e() { this.size = 0, this.__data__ = { hash: new Sd(), map: new (N0 || Ll)(), string: new Sd() }; } function Q5e(e) { var t = typeof e; return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e !== "__proto__" : e === null; } function aw(e, t) { var n = e.__data__; return Q5e(t) ? n[typeof t == "string" ? "string" : "hash"] : n.map; } function J5e(e) { var t = aw(this, e).delete(e); return this.size -= t ? 1 : 0, t; } function eSe(e) { return aw(this, e).get(e); } function tSe(e) { return aw(this, e).has(e); } function nSe(e, t) { var n = aw(this, e), r = n.size; return n.set(e, t), this.size += n.size == r ? 0 : 1, this; } function Nl(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]); } } Nl.prototype.clear = Z5e; Nl.prototype.delete = J5e; Nl.prototype.get = eSe; Nl.prototype.has = tSe; Nl.prototype.set = nSe; var rSe = "Expected a function"; function h3(e, t) { if (typeof e != "function" || t != null && typeof t != "function") throw new TypeError(rSe); var n = function() { var r = arguments, a = t ? t.apply(this, r) : r[0], o = n.cache; if (o.has(a)) return o.get(a); var i = e.apply(this, r); return n.cache = o.set(a, i) || o, i; }; return n.cache = new (h3.Cache || Nl)(), n; } h3.Cache = Nl; var aSe = 500; function oSe(e) { var t = h3(e, function(r) { return n.size === aSe && n.clear(), r; }), n = t.cache; return t; } var iSe = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, sSe = /\\(\\)?/g, lSe = oSe(function(e) { var t = []; return e.charCodeAt(0) === 46 && t.push(""), e.replace(iSe, function(n, r, a, o) { t.push(a ? o.replace(sSe, "$1") : r || n); }), t; }); function uSe(e) { return e == null ? "" : u7(e); } function ow(e, t) { return si(e) ? e : f3(e, t) ? [e] : lSe(uSe(e)); } var cSe = 1 / 0; function qg(e) { if (typeof e == "string" || nw(e)) return e; var t = e + ""; return t == "0" && 1 / e == -cSe ? "-0" : t; } function v3(e, t) { t = ow(t, e); for (var n = 0, r = t.length; e != null && n < r; ) e = e[qg(t[n++])]; return n && n == r ? e : void 0; } function sl(e, t, n) { var r = e == null ? void 0 : v3(e, t); return r === void 0 ? n : r; } function w7(e, t) { for (var n = -1, r = t.length, a = e.length; ++n < r; ) e[a + n] = t[n]; return e; } var g$ = ii ? ii.isConcatSpreadable : void 0; function dSe(e) { return si(e) || d3(e) || !!(g$ && e && e[g$]); } function g3(e, t, n, r, a) { var o = -1, i = e.length; for (n || (n = dSe), a || (a = []); ++o < i; ) { var s = e[o]; t > 0 && n(s) ? t > 1 ? g3(s, t - 1, n, r, a) : w7(a, s) : a[a.length] = s; } return a; } function pSe(e) { var t = e == null ? 0 : e.length; return t ? g3(e, 1) : []; } function fSe(e) { return PCe(VCe(e, void 0, pSe), e + ""); } var hSe = y7(Object.getPrototypeOf, Object); function yu() { if (!arguments.length) return []; var e = arguments[0]; return si(e) ? e : [e]; } function vSe() { this.__data__ = new Ll(), this.size = 0; } function gSe(e) { var t = this.__data__, n = t.delete(e); return this.size = t.size, n; } function mSe(e) { return this.__data__.get(e); } function ySe(e) { return this.__data__.has(e); } var bSe = 200; function wSe(e, t) { var n = this.__data__; if (n instanceof Ll) { var r = n.__data__; if (!N0 || r.length < bSe - 1) return r.push([e, t]), this.size = ++n.size, this; n = this.__data__ = new Nl(r); } return n.set(e, t), this.size = n.size, this; } function gs(e) { var t = this.__data__ = new Ll(e); this.size = t.size; } gs.prototype.clear = vSe; gs.prototype.delete = gSe; gs.prototype.get = mSe; gs.prototype.has = ySe; gs.prototype.set = wSe; var x7 = typeof exports == "object" && exports && !exports.nodeType && exports, m$ = x7 && typeof module == "object" && module && !module.nodeType && module, xSe = m$ && m$.exports === x7, y$ = xSe ? Gi.Buffer : void 0; y$ && y$.allocUnsafe; function kSe(e, t) { return e.slice(); } function CSe(e, t) { for (var n = -1, r = e == null ? 0 : e.length, a = 0, o = []; ++n < r; ) { var i = e[n]; t(i, n, e) && (o[a++] = i); } return o; } function SSe() { return []; } var ESe = Object.prototype, _Se = ESe.propertyIsEnumerable, b$ = Object.getOwnPropertySymbols, TSe = b$ ? function(e) { return e == null ? [] : (e = Object(e), CSe(b$(e), function(t) { return _Se.call(e, t); })); } : SSe; function OSe(e, t, n) { var r = t(e); return si(e) ? r : w7(r, n(e)); } function c5(e) { return OSe(e, b7, TSe); } var d5 = ap(Gi, "DataView"), p5 = ap(Gi, "Promise"), f5 = ap(Gi, "Set"), w$ = "[object Map]", $Se = "[object Object]", x$ = "[object Promise]", k$ = "[object Set]", C$ = "[object WeakMap]", S$ = "[object DataView]", FSe = rp(d5), ASe = rp(N0), ISe = rp(p5), PSe = rp(f5), LSe = rp(u5), Pi = Ch; (d5 && Pi(new d5(new ArrayBuffer(1))) != S$ || N0 && Pi(new N0()) != w$ || p5 && Pi(p5.resolve()) != x$ || f5 && Pi(new f5()) != k$ || u5 && Pi(new u5()) != C$) && (Pi = function(e) { var t = Ch(e), n = t == $Se ? e.constructor : void 0, r = n ? rp(n) : ""; if (r) switch (r) { case FSe: return S$; case ASe: return w$; case ISe: return x$; case PSe: return k$; case LSe: return C$; } return t; }); var NSe = Object.prototype, MSe = NSe.hasOwnProperty; function BSe(e) { var t = e.length, n = new e.constructor(t); return t && typeof e[0] == "string" && MSe.call(e, "index") && (n.index = e.index, n.input = e.input), n; } var cb = Gi.Uint8Array; function m3(e) { var t = new e.constructor(e.byteLength); return new cb(t).set(new cb(e)), t; } function DSe(e, t) { var n = m3(e.buffer); return new e.constructor(n, e.byteOffset, e.byteLength); } var RSe = /\w*$/; function zSe(e) { var t = new e.constructor(e.source, RSe.exec(e)); return t.lastIndex = e.lastIndex, t; } var E$ = ii ? ii.prototype : void 0, _$ = E$ ? E$.valueOf : void 0; function VSe(e) { return _$ ? Object(_$.call(e)) : {}; } function jSe(e, t) { var n = m3(e.buffer); return new e.constructor(n, e.byteOffset, e.length); } var HSe = "[object Boolean]", USe = "[object Date]", qSe = "[object Map]", WSe = "[object Number]", KSe = "[object RegExp]", GSe = "[object Set]", XSe = "[object String]", YSe = "[object Symbol]", ZSe = "[object ArrayBuffer]", QSe = "[object DataView]", JSe = "[object Float32Array]", e4e = "[object Float64Array]", t4e = "[object Int8Array]", n4e = "[object Int16Array]", r4e = "[object Int32Array]", a4e = "[object Uint8Array]", o4e = "[object Uint8ClampedArray]", i4e = "[object Uint16Array]", s4e = "[object Uint32Array]"; function l4e(e, t, n) { var r = e.constructor; switch (t) { case ZSe: return m3(e); case HSe: case USe: return new r(+e); case QSe: return DSe(e); case JSe: case e4e: case t4e: case n4e: case r4e: case a4e: case o4e: case i4e: case s4e: return jSe(e); case qSe: return new r(); case WSe: case XSe: return new r(e); case KSe: return zSe(e); case GSe: return new r(); case YSe: return VSe(e); } } function u4e(e) { return typeof e.constructor == "function" && !f7(e) ? ECe(hSe(e)) : {}; } var c4e = "[object Map]"; function d4e(e) { return Ku(e) && Pi(e) == c4e; } var T$ = If && If.isMap, p4e = T$ ? p3(T$) : d4e, f4e = "[object Set]"; function h4e(e) { return Ku(e) && Pi(e) == f4e; } var O$ = If && If.isSet, v4e = O$ ? p3(O$) : h4e, g4e = 1, k7 = "[object Arguments]", m4e = "[object Array]", y4e = "[object Boolean]", b4e = "[object Date]", w4e = "[object Error]", C7 = "[object Function]", x4e = "[object GeneratorFunction]", k4e = "[object Map]", C4e = "[object Number]", S7 = "[object Object]", S4e = "[object RegExp]", E4e = "[object Set]", _4e = "[object String]", T4e = "[object Symbol]", O4e = "[object WeakMap]", $4e = "[object ArrayBuffer]", F4e = "[object DataView]", A4e = "[object Float32Array]", I4e = "[object Float64Array]", P4e = "[object Int8Array]", L4e = "[object Int16Array]", N4e = "[object Int32Array]", M4e = "[object Uint8Array]", B4e = "[object Uint8ClampedArray]", D4e = "[object Uint16Array]", R4e = "[object Uint32Array]", Wn = {}; Wn[k7] = Wn[m4e] = Wn[$4e] = Wn[F4e] = Wn[y4e] = Wn[b4e] = Wn[A4e] = Wn[I4e] = Wn[P4e] = Wn[L4e] = Wn[N4e] = Wn[k4e] = Wn[C4e] = Wn[S7] = Wn[S4e] = Wn[E4e] = Wn[_4e] = Wn[T4e] = Wn[M4e] = Wn[B4e] = Wn[D4e] = Wn[R4e] = !0; Wn[w4e] = Wn[C7] = Wn[O4e] = !1; function ly(e, t, n, r, a, o) { var i, s = t & g4e; if (i !== void 0) return i; if (!_s(e)) return e; var l = si(e); if (l) i = BSe(e); else { var u = Pi(e), c = u == C7 || u == x4e; if (ub(e)) return kSe(e); if (u == S7 || u == k7 || c && !a) i = c ? {} : u4e(e); else { if (!Wn[u]) return a ? e : {}; i = l4e(e, u); } } o || (o = new gs()); var d = o.get(e); if (d) return d; o.set(e, i), v4e(e) ? e.forEach(function(p) { i.add(ly(p, t, n, p, e, o)); }) : p4e(e) && e.forEach(function(p, v) { i.set(v, ly(p, t, n, v, e, o)); }); var f = c5, h = l ? void 0 : f(e); return LCe(h || e, function(p, v) { h && (v = p, p = e[v]), p7(i, v, ly(p, t, n, v, e, o)); }), i; } var z4e = 1, V4e = 4; function E7(e) { return ly(e, z4e | V4e); } var j4e = "__lodash_hash_undefined__"; function H4e(e) { return this.__data__.set(e, j4e), this; } function U4e(e) { return this.__data__.has(e); } function db(e) { var t = -1, n = e == null ? 0 : e.length; for (this.__data__ = new Nl(); ++t < n; ) this.add(e[t]); } db.prototype.add = db.prototype.push = H4e; db.prototype.has = U4e; function q4e(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 W4e(e, t) { return e.has(t); } var K4e = 1, G4e = 2; function _7(e, t, n, r, a, o) { var i = n & K4e, s = e.length, l = t.length; if (s != l && !(i && l > s)) return !1; var u = o.get(e), c = o.get(t); if (u && c) return u == t && c == e; var d = -1, f = !0, h = n & G4e ? new db() : void 0; for (o.set(e, t), o.set(t, e); ++d < s; ) { var p = e[d], v = t[d]; if (r) var m = i ? r(v, p, d, t, e, o) : r(p, v, d, e, t, o); if (m !== void 0) { if (m) continue; f = !1; break; } if (h) { if (!q4e(t, function(g, y) { if (!W4e(h, y) && (p === g || a(p, g, n, r, o))) return h.push(y); })) { f = !1; break; } } else if (!(p === v || a(p, v, n, r, o))) { f = !1; break; } } return o.delete(e), o.delete(t), f; } function X4e(e) { var t = -1, n = Array(e.size); return e.forEach(function(r, a) { n[++t] = [a, r]; }), n; } function Y4e(e) { var t = -1, n = Array(e.size); return e.forEach(function(r) { n[++t] = r; }), n; } var Z4e = 1, Q4e = 2, J4e = "[object Boolean]", e3e = "[object Date]", t3e = "[object Error]", n3e = "[object Map]", r3e = "[object Number]", a3e = "[object RegExp]", o3e = "[object Set]", i3e = "[object String]", s3e = "[object Symbol]", l3e = "[object ArrayBuffer]", u3e = "[object DataView]", $$ = ii ? ii.prototype : void 0, uk = $$ ? $$.valueOf : void 0; function c3e(e, t, n, r, a, o, i) { switch (n) { case u3e: if (e.byteLength != t.byteLength || e.byteOffset != t.byteOffset) return !1; e = e.buffer, t = t.buffer; case l3e: return !(e.byteLength != t.byteLength || !o(new cb(e), new cb(t))); case J4e: case e3e: case r3e: return u3(+e, +t); case t3e: return e.name == t.name && e.message == t.message; case a3e: case i3e: return e == t + ""; case n3e: var s = X4e; case o3e: var l = r & Z4e; if (s || (s = Y4e), e.size != t.size && !l) return !1; var u = i.get(e); if (u) return u == t; r |= Q4e, i.set(e, t); var c = _7(s(e), s(t), r, a, o, i); return i.delete(e), c; case s3e: if (uk) return uk.call(e) == uk.call(t); } return !1; } var d3e = 1, p3e = Object.prototype, f3e = p3e.hasOwnProperty; function h3e(e, t, n, r, a, o) { var i = n & d3e, s = c5(e), l = s.length, u = c5(t), c = u.length; if (l != c && !i) return !1; for (var d = l; d--; ) { var f = s[d]; if (!(i ? f in t : f3e.call(t, f))) return !1; } var h = o.get(e), p = o.get(t); if (h && p) return h == t && p == e; var v = !0; o.set(e, t), o.set(t, e); for (var m = i; ++d < l; ) { f = s[d]; var g = e[f], y = t[f]; if (r) var x = i ? r(y, g, f, t, e, o) : r(g, y, f, e, t, o); if (!(x === void 0 ? g === y || a(g, y, n, r, o) : x)) { v = !1; break; } m || (m = f == "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 o.delete(e), o.delete(t), v; } var v3e = 1, F$ = "[object Arguments]", A$ = "[object Array]", a1 = "[object Object]", g3e = Object.prototype, I$ = g3e.hasOwnProperty; function m3e(e, t, n, r, a, o) { var i = si(e), s = si(t), l = i ? A$ : Pi(e), u = s ? A$ : Pi(t); l = l == F$ ? a1 : l, u = u == F$ ? a1 : u; var c = l == a1, d = u == a1, f = l == u; if (f && ub(e)) { if (!ub(t)) return !1; i = !0, c = !1; } if (f && !c) return o || (o = new gs()), i || m7(e) ? _7(e, t, n, r, a, o) : c3e(e, t, l, n, r, a, o); if (!(n & v3e)) { var h = c && I$.call(e, "__wrapped__"), p = d && I$.call(t, "__wrapped__"); if (h || p) { var v = h ? e.value() : e, m = p ? t.value() : t; return o || (o = new gs()), a(v, m, n, r, o); } } return f ? (o || (o = new gs()), h3e(e, t, n, r, a, o)) : !1; } function iw(e, t, n, r, a) { return e === t ? !0 : e == null || t == null || !Ku(e) && !Ku(t) ? e !== e && t !== t : m3e(e, t, n, r, iw, a); } var y3e = 1, b3e = 2; function w3e(e, t, n, r) { var a = n.length, o = a; if (e == null) return !o; for (e = Object(e); a--; ) { var i = n[a]; if (i[2] ? i[1] !== e[i[0]] : !(i[0] in e)) return !1; } for (; ++a < o; ) { i = n[a]; 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 gs(), d; if (!(d === void 0 ? iw(u, l, y3e | b3e, r, c) : d)) return !1; } } return !0; } function T7(e) { return e === e && !_s(e); } function x3e(e) { for (var t = b7(e), n = t.length; n--; ) { var r = t[n], a = e[r]; t[n] = [r, a, T7(a)]; } return t; } function O7(e, t) { return function(n) { return n == null ? !1 : n[e] === t && (t !== void 0 || e in Object(n)); }; } function k3e(e) { var t = x3e(e); return t.length == 1 && t[0][2] ? O7(t[0][0], t[0][1]) : function(n) { return n === e || w3e(n, e, t); }; } function C3e(e, t) { return e != null && t in Object(e); } function S3e(e, t, n) { t = ow(t, e); for (var r = -1, a = t.length, o = !1; ++r < a; ) { var i = qg(t[r]); if (!(o = e != null && n(e, i))) break; e = e[i]; } return o || ++r != a ? o : (a = e == null ? 0 : e.length, !!a && c3(a) && l3(i, a) && (si(e) || d3(e))); } function $7(e, t) { return e != null && S3e(e, t, C3e); } var E3e = 1, _3e = 2; function T3e(e, t) { return f3(e) && T7(t) ? O7(qg(e), t) : function(n) { var r = sl(n, e); return r === void 0 && r === t ? $7(n, e) : iw(t, r, E3e | _3e); }; } function O3e(e) { return function(t) { return t == null ? void 0 : t[e]; }; } function $3e(e) { return function(t) { return v3(t, e); }; } function F3e(e) { return f3(e) ? O3e(qg(e)) : $3e(e); } function A3e(e) { return typeof e == "function" ? e : e == null ? c7 : typeof e == "object" ? si(e) ? T3e(e[0], e[1]) : k3e(e) : F3e(e); } var ck = function() { return Gi.Date.now(); }, I3e = "Expected a function", P3e = Math.max, L3e = Math.min; function F7(e, t, n) { var r, a, o, i, s, l, u = 0, c = !1, d = !1, f = !0; if (typeof e != "function") throw new TypeError(I3e); t = l$(t) || 0, _s(n) && (c = !!n.leading, d = "maxWait" in n, o = d ? P3e(l$(n.maxWait) || 0, t) : o, f = "trailing" in n ? !!n.trailing : f); function h(C) { var S = r, _ = a; return r = a = void 0, u = C, i = e.apply(_, S), i; } function p(C) { return u = C, s = setTimeout(g, t), c ? h(C) : i; } function v(C) { var S = C - l, _ = C - u, T = t - S; return d ? L3e(T, o - _) : T; } function m(C) { var S = C - l, _ = C - u; return l === void 0 || S >= t || S < 0 || d && _ >= o; } function g() { var C = ck(); if (m(C)) return y(C); s = setTimeout(g, v(C)); } function y(C) { return s = void 0, f && r ? h(C) : (r = a = void 0, i); } function x() { s !== void 0 && clearTimeout(s), u = 0, r = l = a = s = void 0; } function w() { return s === void 0 ? i : y(ck()); } function k() { var C = ck(), S = m(C); if (r = arguments, a = this, l = C, S) { if (s === void 0) return p(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 N3e(e, t, n) { var r = e == null ? 0 : e.length; if (!r) return -1; var a = r - 1; return NCe(e, A3e(t), a); } var M3e = 1 / 0; function B3e(e) { var t = e == null ? 0 : e.length; return t ? g3(e, M3e) : []; } function pb(e) { for (var t = -1, n = e == null ? 0 : e.length, r = {}; ++t < n; ) { var a = e[t]; r[a[0]] = a[1]; } return r; } function ms(e, t) { return iw(e, t); } function Wg(e) { return e == null; } function A7(e) { return e === void 0; } function D3e(e, t, n, r) { if (!_s(e)) return e; t = ow(t, e); for (var a = -1, o = t.length, i = o - 1, s = e; s != null && ++a < o; ) { var l = qg(t[a]), u = n; if (l === "__proto__" || l === "constructor" || l === "prototype") return e; if (a != i) { var c = s[l]; u = void 0, u === void 0 && (u = _s(c) ? c : l3(t[a + 1]) ? [] : {}); } p7(s, l, u), s = s[l]; } return e; } function R3e(e, t, n) { for (var r = -1, a = t.length, o = {}; ++r < a; ) { var i = t[r], s = v3(e, i); n(s, i) && D3e(o, ow(i, e), s); } return o; } function z3e(e, t) { return R3e(e, t, function(n, r) { return $7(e, r); }); } var I7 = fSe(function(e, t) { return e == null ? {} : z3e(e, t); }); const dl = (e) => e === void 0, Ts = (e) => typeof e == "boolean", Bn = (e) => typeof e == "number", h5 = (e) => !e && e !== 0 || Ha(e) && e.length === 0 || Kr(e) && !Object.keys(e).length, td = (e) => typeof Element > "u" ? !1 : e instanceof Element, M0 = (e) => Wg(e), V3e = (e) => lo(e) ? !Number.isNaN(Number(e)) : !1, j3e = (e = "") => e.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d"), P$ = (e) => jke(e), L$ = (e) => Object.keys(e); class P7 extends Error { constructor(t) { super(t), this.name = "ElementPlusError"; } } function L7(e, t) { throw new P7(`[${e}] ${t}`); } function yr(e, t) { if (process.env.NODE_ENV !== "production") { const n = lo(e) ? new P7(`[${e}] ${t}`) : e; console.warn(n); } } const H3e = "utils/dom/style", N7 = (e = "") => e.split(" ").filter((t) => !!t.trim()), N$ = (e, t) => { if (!e || !t) return !1; if (t.includes(" ")) throw new Error("className should not contain space."); return e.classList.contains(t); }, v5 = (e, t) => { !e || !t.trim() || e.classList.add(...N7(t)); }, B0 = (e, t) => { !e || !t.trim() || e.classList.remove(...N7(t)); }, jp = (e, t) => { var n; if (!rr || !e || !t) return ""; let r = Rke(t); r === "float" && (r = "cssFloat"); try { const a = e.style[r]; if (a) return a; const o = (n = document.defaultView) == null ? void 0 : n.getComputedStyle(e, ""); return o ? o[r] : ""; } catch { return e.style[r]; } }; function Pf(e, t = "px") { if (!e) return ""; if (Bn(e) || V3e(e)) return `${e}${t}`; if (lo(e)) return e; yr(H3e, "binding value must be a string or number"); } let o1; const U3e = (e) => { var t; if (!rr) return 0; if (o1 !== void 0) return o1; 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 a = document.createElement("div"); a.style.width = "100%", n.appendChild(a); const o = a.offsetWidth; return (t = n.parentNode) == null || t.removeChild(n), o1 = r - o, o1; }; function M7(e, t) { if (!rr) 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 a = t.offsetTop + n.reduce((l, u) => l + u.offsetTop, 0), o = a + t.offsetHeight, i = e.scrollTop, s = i + e.clientHeight; a < i ? e.scrollTop = a : o > s && (e.scrollTop = o - e.clientHeight); } /*! Element Plus Icons Vue v2.3.1 */ var q3e = /* @__PURE__ */ X({ name: "ArrowDown", __name: "arrow-down", setup(e) { return (t, n) => (I(), j("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ W("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" }) ])); } }), y3 = q3e, W3e = /* @__PURE__ */ X({ name: "ArrowLeft", __name: "arrow-left", setup(e) { return (t, n) => (I(), j("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ W("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" }) ])); } }), b3 = W3e, K3e = /* @__PURE__ */ X({ name: "ArrowRight", __name: "arrow-right", setup(e) { return (t, n) => (I(), j("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ W("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" }) ])); } }), sw = K3e, G3e = /* @__PURE__ */ X({ name: "ArrowUp", __name: "arrow-up", setup(e) { return (t, n) => (I(), j("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ W("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" }) ])); } }), X3e = G3e, Y3e = /* @__PURE__ */ X({ name: "Check", __name: "check", setup(e) { return (t, n) => (I(), j("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ W("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" }) ])); } }), B7 = Y3e, Z3e = /* @__PURE__ */ X({ name: "CircleCheck", __name: "circle-check", setup(e) { return (t, n) => (I(), j("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ W("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" }), W("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" }) ])); } }), Q3e = Z3e, J3e = /* @__PURE__ */ X({ name: "CircleClose", __name: "circle-close", setup(e) { return (t, n) => (I(), j("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ W("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" }), W("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" }) ])); } }), lw = J3e, eEe = /* @__PURE__ */ X({ name: "Close", __name: "close", setup(e) { return (t, n) => (I(), j("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ W("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" }) ])); } }), g5 = eEe, tEe = /* @__PURE__ */ X({ name: "DArrowLeft", __name: "d-arrow-left", setup(e) { return (t, n) => (I(), j("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ W("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" }) ])); } }), nEe = tEe, rEe = /* @__PURE__ */ X({ name: "DArrowRight", __name: "d-arrow-right", setup(e) { return (t, n) => (I(), j("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ W("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" }) ])); } }), aEe = rEe, oEe = /* @__PURE__ */ X({ name: "Delete", __name: "delete", setup(e) { return (t, n) => (I(), j("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ W("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" }) ])); } }), M$ = oEe, iEe = /* @__PURE__ */ X({ name: "Hide", __name: "hide", setup(e) { return (t, n) => (I(), j("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ W("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" }), W("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" }) ])); } }), sEe = iEe, lEe = /* @__PURE__ */ X({ name: "Loading", __name: "loading", setup(e) { return (t, n) => (I(), j("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ W("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" }) ])); } }), uw = lEe, uEe = /* @__PURE__ */ X({ name: "Location", __name: "location", setup(e) { return (t, n) => (I(), j("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ W("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" }), W("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" }) ])); } }), cEe = uEe, dEe = /* @__PURE__ */ X({ name: "MoreFilled", __name: "more-filled", setup(e) { return (t, n) => (I(), j("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ W("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" }) ])); } }), B$ = dEe, pEe = /* @__PURE__ */ X({ name: "Notebook", __name: "notebook", setup(e) { return (t, n) => (I(), j("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ W("path", { fill: "currentColor", d: "M192 128v768h640V128zm-32-64h704a32 32 0 0 1 32 32v832a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32" }), W("path", { fill: "currentColor", d: "M672 128h64v768h-64zM96 192h128q32 0 32 32t-32 32H96q-32 0-32-32t32-32m0 192h128q32 0 32 32t-32 32H96q-32 0-32-32t32-32m0 192h128q32 0 32 32t-32 32H96q-32 0-32-32t32-32m0 192h128q32 0 32 32t-32 32H96q-32 0-32-32t32-32" }) ])); } }), fEe = pEe, hEe = /* @__PURE__ */ X({ name: "View", __name: "view", setup(e) { return (t, n) => (I(), j("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ W("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" }) ])); } }), D7 = hEe, vEe = /* @__PURE__ */ X({ name: "WarnTriangleFilled", __name: "warn-triangle-filled", setup(e) { return (t, n) => (I(), j("svg", { xmlns: "http://www.w3.org/2000/svg", "xml:space": "preserve", style: { "enable-background": "new 0 0 1024 1024" }, viewBox: "0 0 1024 1024" }, [ W("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" }) ])); } }), gEe = vEe, mEe = /* @__PURE__ */ X({ name: "Warning", __name: "warning", setup(e) { return (t, n) => (I(), j("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ W("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" }) ])); } }), R7 = mEe; const z7 = "__epPropKey", gt = (e) => e, yEe = (e) => Kr(e) && !!e[z7], cw = (e, t) => { if (!Kr(e) || yEe(e)) return e; const { values: n, required: r, default: a, type: o, validator: i } = e, s = { type: o, required: !!r, validator: n || i ? (l) => { let u = !1, c = []; if (n && (c = Array.from(n), r$(e, "default") && c.push(a), u || (u = c.includes(l))), i && (u || (u = i(l))), !u && c.length > 0) { const d = [...new Set(c)].map((f) => JSON.stringify(f)).join(", "); vg(`Invalid prop: validation failed${t ? ` for prop "${t}"` : ""}. Expected one of [${d}], got value ${JSON.stringify(l)}.`); } return u; } : void 0, [z7]: !0 }; return r$(e, "default") && (s.default = a), s; }, Vt = (e) => pb(Object.entries(e).map(([t, n]) => [ t, cw(n, t) ])), li = gt([ String, Object, Function ]), V7 = { validating: uw, success: Q3e, error: lw }, Er = (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; }, bEe = (e, t) => (e.install = (n) => { n.directive(t, e); }, e), Xi = (e) => (e.install = vl, e), $r = { 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" }, cr = "update:modelValue", Ed = "change", dw = ["", "default", "small", "large"]; var uy = /* @__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))(uy || {}); const D$ = (e) => [...new Set(e)], R$ = (e) => !e && e !== 0 ? [] : Array.isArray(e) ? e : [e], wEe = (e) => /([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(e), bu = (e) => e, xEe = ["class", "style"], kEe = /^on[A-Z]/, CEe = (e = {}) => { const { excludeListeners: t = !1, excludeKeys: n } = e, r = F(() => ((n == null ? void 0 : n.value) || []).concat(xEe)), a = tt(); return a ? F(() => { var o; return pb(Object.entries((o = a.proxy) == null ? void 0 : o.$attrs).filter(([i]) => !r.value.includes(i) && !(t && kEe.test(i)))); }) : (yr("use-attrs", "getCurrentInstance() returned null. useAttrs() must be called at the top of a setup function"), F(() => ({}))); }, nd = ({ from: e, replacement: t, scope: n, version: r, ref: a, type: o = "API" }, i) => { be(() => b(i), (s) => { s && yr(n, `[${o}] ${e} is about to be deprecated in version ${r}, please use ${t} instead. For more detail, please visit: ${a} `); }, { immediate: !0 }); }; var SEe = { 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 EEe = (e) => (t, n) => _Ee(t, n, b(e)), _Ee = (e, t, n) => sl(n, e, e).replace(/\{(\w+)\}/g, (r, a) => { var o; return `${(o = t == null ? void 0 : t[a]) != null ? o : `{${a}}`}`; }), TEe = (e) => { const t = F(() => b(e).name), n = ar(e) ? e : U(e); return { lang: t, locale: n, t: EEe(e) }; }, j7 = Symbol("localeContextKey"), vi = (e) => { const t = e || Te(j7, U()); return TEe(F(() => t.value || SEe)); }, Gv = "el", OEe = "is-", Tc = (e, t, n, r, a) => { let o = `${e}-${t}`; return n && (o += `-${n}`), r && (o += `__${r}`), a && (o += `--${a}`), o; }, H7 = Symbol("namespaceContextKey"), w3 = (e) => { const t = e || (tt() ? Te(H7, U(Gv)) : U(Gv)); return F(() => b(t) || Gv); }, Lt = (e, t) => { const n = w3(t); return { namespace: n, b: (r = "") => Tc(n.value, e, r, "", ""), e: (r) => r ? Tc(n.value, e, "", r, "") : "", m: (r) => r ? Tc(n.value, e, "", "", r) : "", be: (r, a) => r && a ? Tc(n.value, e, r, a, "") : "", em: (r, a) => r && a ? Tc(n.value, e, "", r, a) : "", bm: (r, a) => r && a ? Tc(n.value, e, r, "", a) : "", bem: (r, a, o) => r && a && o ? Tc(n.value, e, r, a, o) : "", is: (r, ...a) => { const o = a.length >= 1 ? a[0] : !0; return r && o ? `${OEe}${r}` : ""; }, cssVar: (r) => { const a = {}; for (const o in r) r[o] && (a[`--${n.value}-${o}`] = r[o]); return a; }, cssVarName: (r) => `--${n.value}-${r}`, cssVarBlock: (r) => { const a = {}; for (const o in r) r[o] && (a[`--${n.value}-${e}-${o}`] = r[o]); return a; }, cssVarBlockName: (r) => `--${n.value}-${e}-${r}` }; }, $Ee = (e, t = {}) => { ar(e) || L7("[useLockscreen]", "You need to pass a ref param to this function"); const n = t.ns || Lt("popup"), r = F(() => n.bm("parent", "hidden")); if (!rr || N$(document.body, r.value)) return; let a = 0, o = !1, i = "0"; const s = () => { setTimeout(() => { B0(document == null ? void 0 : document.body, r.value), o && document && (document.body.style.width = i); }, 200); }; be(e, (l) => { if (!l) { s(); return; } o = !N$(document.body, r.value), o && (i = document.body.style.width), a = U3e(n.namespace.value); const u = document.documentElement.clientHeight < document.body.scrollHeight, c = jp(document.body, "overflowY"); a > 0 && (u || c === "scroll") && o && (document.body.style.width = `calc(100% - ${a}px)`), v5(document.body, r.value); }), ah(() => s()); }, FEe = cw({ type: gt(Boolean), default: null }), AEe = cw({ type: gt(Function) }), IEe = (e) => { const t = `update:${e}`, n = `onUpdate:${e}`, r = [t], a = { [e]: FEe, [n]: AEe }; return { useModelToggle: ({ indicator: o, toggleReason: i, shouldHideWhenRouteChanges: s, shouldProceed: l, onShow: u, onHide: c }) => { const d = tt(), { emit: f } = d, h = d.props, p = F(() => Lr(h[n])), v = F(() => h[e] === null), m = (C) => { o.value !== !0 && (o.value = !0, i && (i.value = C), Lr(u) && u(C)); }, g = (C) => { o.value !== !1 && (o.value = !1, i && (i.value = C), Lr(c) && c(C)); }, y = (C) => { if (h.disabled === !0 || Lr(l) && !l()) return; const S = p.value && rr; S && f(t, !0), (v.value || !S) && m(C); }, x = (C) => { if (h.disabled === !0 || !rr) return; const S = p.value && rr; S && f(t, !1), (v.value || !S) && g(C); }, w = (C) => { Ts(C) && (h.disabled && C ? p.value && f(t, !1) : o.value !== C && (C ? m() : g())); }, k = () => { o.value ? x() : y(); }; return be(() => h[e], w), s && d.appContext.config.globalProperties.$route !== void 0 && be(() => ({ ...d.proxy.$route }), () => { s.value && o.value && x(); }), nt(() => { w(h[e]); }), { hide: x, show: y, toggle: k, hasUpdateHandler: p }; }, useModelToggleProps: a, useModelToggleEmits: r }; }, U7 = (e) => { const t = tt(); return F(() => { var n, r; return (r = (n = t == null ? void 0 : t.proxy) == null ? void 0 : n.$props) == null ? void 0 : r[e]; }); }; var uo = "top", ui = "bottom", ci = "right", co = "left", x3 = "auto", Kg = [uo, ui, ci, co], Lf = "start", D0 = "end", PEe = "clippingParents", q7 = "viewport", sv = "popper", LEe = "reference", z$ = Kg.reduce(function(e, t) { return e.concat([t + "-" + Lf, t + "-" + D0]); }, []), Gg = [].concat(Kg, [x3]).reduce(function(e, t) { return e.concat([t, t + "-" + Lf, t + "-" + D0]); }, []), NEe = "beforeRead", MEe = "read", BEe = "afterRead", DEe = "beforeMain", REe = "main", zEe = "afterMain", VEe = "beforeWrite", jEe = "write", HEe = "afterWrite", UEe = [NEe, MEe, BEe, DEe, REe, zEe, VEe, jEe, HEe]; function Os(e) { return e ? (e.nodeName || "").toLowerCase() : null; } function Yi(e) { if (e == null) return window; if (e.toString() !== "[object Window]") { var t = e.ownerDocument; return t && t.defaultView || window; } return e; } function Nf(e) { var t = Yi(e).Element; return e instanceof t || e instanceof Element; } function Qo(e) { var t = Yi(e).HTMLElement; return e instanceof t || e instanceof HTMLElement; } function k3(e) { if (typeof ShadowRoot > "u") return !1; var t = Yi(e).ShadowRoot; return e instanceof t || e instanceof ShadowRoot; } function qEe(e) { var t = e.state; Object.keys(t.elements).forEach(function(n) { var r = t.styles[n] || {}, a = t.attributes[n] || {}, o = t.elements[n]; !Qo(o) || !Os(o) || (Object.assign(o.style, r), Object.keys(a).forEach(function(i) { var s = a[i]; s === !1 ? o.removeAttribute(i) : o.setAttribute(i, s === !0 ? "" : s); })); }); } function WEe(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 a = t.elements[r], o = 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(a) || !Os(a) || (Object.assign(a.style, s), Object.keys(o).forEach(function(l) { a.removeAttribute(l); })); }); }; } var W7 = { name: "applyStyles", enabled: !0, phase: "write", fn: qEe, effect: WEe, requires: ["computeStyles"] }; function ys(e) { return e.split("-")[0]; } var rd = Math.max, fb = Math.min, Mf = Math.round; function Bf(e, t) { t === void 0 && (t = !1); var n = e.getBoundingClientRect(), r = 1, a = 1; if (Qo(e) && t) { var o = e.offsetHeight, i = e.offsetWidth; i > 0 && (r = Mf(n.width) / i || 1), o > 0 && (a = Mf(n.height) / o || 1); } return { width: n.width / r, height: n.height / a, top: n.top / a, right: n.right / r, bottom: n.bottom / a, left: n.left / r, x: n.left / r, y: n.top / a }; } function C3(e) { var t = Bf(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 K7(e, t) { var n = t.getRootNode && t.getRootNode(); if (e.contains(t)) return !0; if (n && k3(n)) { var r = t; do { if (r && e.isSameNode(r)) return !0; r = r.parentNode || r.host; } while (r); } return !1; } function xl(e) { return Yi(e).getComputedStyle(e); } function KEe(e) { return ["table", "td", "th"].indexOf(Os(e)) >= 0; } function uc(e) { return ((Nf(e) ? e.ownerDocument : e.document) || window.document).documentElement; } function pw(e) { return Os(e) === "html" ? e : e.assignedSlot || e.parentNode || (k3(e) ? e.host : null) || uc(e); } function V$(e) { return !Qo(e) || xl(e).position === "fixed" ? null : e.offsetParent; } function GEe(e) { var t = navigator.userAgent.toLowerCase().indexOf("firefox") !== -1, n = navigator.userAgent.indexOf("Trident") !== -1; if (n && Qo(e)) { var r = xl(e); if (r.position === "fixed") return null; } var a = pw(e); for (k3(a) && (a = a.host); Qo(a) && ["html", "body"].indexOf(Os(a)) < 0; ) { var o = xl(a); if (o.transform !== "none" || o.perspective !== "none" || o.contain === "paint" || ["transform", "perspective"].indexOf(o.willChange) !== -1 || t && o.willChange === "filter" || t && o.filter && o.filter !== "none") return a; a = a.parentNode; } return null; } function Xg(e) { for (var t = Yi(e), n = V$(e); n && KEe(n) && xl(n).position === "static"; ) n = V$(n); return n && (Os(n) === "html" || Os(n) === "body" && xl(n).position === "static") ? t : n || GEe(e) || t; } function S3(e) { return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y"; } function Xv(e, t, n) { return rd(e, fb(t, n)); } function XEe(e, t, n) { var r = Xv(e, t, n); return r > n ? n : r; } function G7() { return { top: 0, right: 0, bottom: 0, left: 0 }; } function X7(e) { return Object.assign({}, G7(), e); } function Y7(e, t) { return t.reduce(function(n, r) { return n[r] = e, n; }, {}); } var YEe = function(e, t) { return e = typeof e == "function" ? e(Object.assign({}, t.rects, { placement: t.placement })) : e, X7(typeof e != "number" ? e : Y7(e, Kg)); }; function ZEe(e) { var t, n = e.state, r = e.name, a = e.options, o = n.elements.arrow, i = n.modifiersData.popperOffsets, s = ys(n.placement), l = S3(s), u = [co, ci].indexOf(s) >= 0, c = u ? "height" : "width"; if (!(!o || !i)) { var d = YEe(a.padding, n), f = C3(o), h = l === "y" ? uo : co, p = l === "y" ? ui : ci, v = n.rects.reference[c] + n.rects.reference[l] - i[l] - n.rects.popper[c], m = i[l] - n.rects.reference[l], g = Xg(o), y = g ? l === "y" ? g.clientHeight || 0 : g.clientWidth || 0 : 0, x = v / 2 - m / 2, w = d[h], k = y - f[c] - d[p], C = y / 2 - f[c] / 2 + x, S = Xv(w, C, k), _ = l; n.modifiersData[r] = (t = {}, t[_] = S, t.centerOffset = S - C, t); } } function QEe(e) { var t = e.state, n = e.options, r = n.element, a = r === void 0 ? "[data-popper-arrow]" : r; a != null && (typeof a == "string" && (a = t.elements.popper.querySelector(a), !a) || !K7(t.elements.popper, a) || (t.elements.arrow = a)); } var JEe = { name: "arrow", enabled: !0, phase: "main", fn: ZEe, effect: QEe, requires: ["popperOffsets"], requiresIfExists: ["preventOverflow"] }; function Df(e) { return e.split("-")[1]; } var e_e = { top: "auto", right: "auto", bottom: "auto", left: "auto" }; function t_e(e) { var t = e.x, n = e.y, r = window, a = r.devicePixelRatio || 1; return { x: Mf(t * a) / a || 0, y: Mf(n * a) / a || 0 }; } function j$(e) { var t, n = e.popper, r = e.popperRect, a = e.placement, o = e.variation, i = e.offsets, s = e.position, l = e.gpuAcceleration, u = e.adaptive, c = e.roundOffsets, d = e.isFixed, f = i.x, h = f === void 0 ? 0 : f, p = i.y, v = p === void 0 ? 0 : p, m = typeof c == "function" ? c({ x: h, y: v }) : { x: h, y: v }; h = m.x, v = m.y; var g = i.hasOwnProperty("x"), y = i.hasOwnProperty("y"), x = co, w = uo, k = window; if (u) { var C = Xg(n), S = "clientHeight", _ = "clientWidth"; if (C === Yi(n) && (C = uc(n), xl(C).position !== "static" && s === "absolute" && (S = "scrollHeight", _ = "scrollWidth")), C = C, a === uo || (a === co || a === ci) && o === D0) { w = ui; var T = d && C === k && k.visualViewport ? k.visualViewport.height : C[S]; v -= T - r.height, v *= l ? 1 : -1; } if (a === co || (a === uo || a === ui) && o === D0) { x = ci; var O = d && C === k && k.visualViewport ? k.visualViewport.width : C[_]; h -= O - r.width, h *= l ? 1 : -1; } } var $ = Object.assign({ position: s }, u && e_e), A = c === !0 ? t_e({ x: h, y: v }) : { x: h, y: v }; if (h = A.x, v = A.y, l) { var N; return Object.assign({}, $, (N = {}, N[w] = y ? "0" : "", N[x] = g ? "0" : "", N.transform = (k.devicePixelRatio || 1) <= 1 ? "translate(" + h + "px, " + v + "px)" : "translate3d(" + h + "px, " + v + "px, 0)", N)); } return Object.assign({}, $, (t = {}, t[w] = y ? v + "px" : "", t[x] = g ? h + "px" : "", t.transform = "", t)); } function n_e(e) { var t = e.state, n = e.options, r = n.gpuAcceleration, a = r === void 0 ? !0 : r, o = n.adaptive, i = o === void 0 ? !0 : o, s = n.roundOffsets, l = s === void 0 ? !0 : s, u = { placement: ys(t.placement), variation: Df(t.placement), popper: t.elements.popper, popperRect: t.rects.popper, gpuAcceleration: a, isFixed: t.options.strategy === "fixed" }; t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper, j$(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, j$(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 Z7 = { name: "computeStyles", enabled: !0, phase: "beforeWrite", fn: n_e, data: {} }, i1 = { passive: !0 }; function r_e(e) { var t = e.state, n = e.instance, r = e.options, a = r.scroll, o = a === void 0 ? !0 : a, i = r.resize, s = i === void 0 ? !0 : i, l = Yi(t.elements.popper), u = [].concat(t.scrollParents.reference, t.scrollParents.popper); return o && u.forEach(function(c) { c.addEventListener("scroll", n.update, i1); }), s && l.addEventListener("resize", n.update, i1), function() { o && u.forEach(function(c) { c.removeEventListener("scroll", n.update, i1); }), s && l.removeEventListener("resize", n.update, i1); }; } var Q7 = { name: "eventListeners", enabled: !0, phase: "write", fn: function() { }, effect: r_e, data: {} }, a_e = { left: "right", right: "left", bottom: "top", top: "bottom" }; function cy(e) { return e.replace(/left|right|bottom|top/g, function(t) { return a_e[t]; }); } var o_e = { start: "end", end: "start" }; function H$(e) { return e.replace(/start|end/g, function(t) { return o_e[t]; }); } function E3(e) { var t = Yi(e), n = t.pageXOffset, r = t.pageYOffset; return { scrollLeft: n, scrollTop: r }; } function _3(e) { return Bf(uc(e)).left + E3(e).scrollLeft; } function i_e(e) { var t = Yi(e), n = uc(e), r = t.visualViewport, a = n.clientWidth, o = n.clientHeight, i = 0, s = 0; return r && (a = r.width, o = r.height, /^((?!chrome|android).)*safari/i.test(navigator.userAgent) || (i = r.offsetLeft, s = r.offsetTop)), { width: a, height: o, x: i + _3(e), y: s }; } function s_e(e) { var t, n = uc(e), r = E3(e), a = (t = e.ownerDocument) == null ? void 0 : t.body, o = rd(n.scrollWidth, n.clientWidth, a ? a.scrollWidth : 0, a ? a.clientWidth : 0), i = rd(n.scrollHeight, n.clientHeight, a ? a.scrollHeight : 0, a ? a.clientHeight : 0), s = -r.scrollLeft + _3(e), l = -r.scrollTop; return xl(a || n).direction === "rtl" && (s += rd(n.clientWidth, a ? a.clientWidth : 0) - o), { width: o, height: i, x: s, y: l }; } function T3(e) { var t = xl(e), n = t.overflow, r = t.overflowX, a = t.overflowY; return /auto|scroll|overlay|hidden/.test(n + a + r); } function J7(e) { return ["html", "body", "#document"].indexOf(Os(e)) >= 0 ? e.ownerDocument.body : Qo(e) && T3(e) ? e : J7(pw(e)); } function Yv(e, t) { var n; t === void 0 && (t = []); var r = J7(e), a = r === ((n = e.ownerDocument) == null ? void 0 : n.body), o = Yi(r), i = a ? [o].concat(o.visualViewport || [], T3(r) ? r : []) : r, s = t.concat(i); return a ? s : s.concat(Yv(pw(i))); } function m5(e) { return Object.assign({}, e, { left: e.x, top: e.y, right: e.x + e.width, bottom: e.y + e.height }); } function l_e(e) { var t = Bf(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 U$(e, t) { return t === q7 ? m5(i_e(e)) : Nf(t) ? l_e(t) : m5(s_e(uc(e))); } function u_e(e) { var t = Yv(pw(e)), n = ["absolute", "fixed"].indexOf(xl(e).position) >= 0, r = n && Qo(e) ? Xg(e) : e; return Nf(r) ? t.filter(function(a) { return Nf(a) && K7(a, r) && Os(a) !== "body"; }) : []; } function c_e(e, t, n) { var r = t === "clippingParents" ? u_e(e) : [].concat(t), a = [].concat(r, [n]), o = a[0], i = a.reduce(function(s, l) { var u = U$(e, l); return s.top = rd(u.top, s.top), s.right = fb(u.right, s.right), s.bottom = fb(u.bottom, s.bottom), s.left = rd(u.left, s.left), s; }, U$(e, o)); return i.width = i.right - i.left, i.height = i.bottom - i.top, i.x = i.left, i.y = i.top, i; } function ez(e) { var t = e.reference, n = e.element, r = e.placement, a = r ? ys(r) : null, o = r ? Df(r) : null, i = t.x + t.width / 2 - n.width / 2, s = t.y + t.height / 2 - n.height / 2, l; switch (a) { case uo: l = { x: i, y: t.y - n.height }; break; case ui: l = { x: i, y: t.y + t.height }; break; case ci: l = { x: t.x + t.width, y: s }; break; case co: l = { x: t.x - n.width, y: s }; break; default: l = { x: t.x, y: t.y }; } var u = a ? S3(a) : null; if (u != null) { var c = u === "y" ? "height" : "width"; switch (o) { case Lf: l[u] = l[u] - (t[c] / 2 - n[c] / 2); break; case D0: l[u] = l[u] + (t[c] / 2 - n[c] / 2); break; } } return l; } function R0(e, t) { t === void 0 && (t = {}); var n = t, r = n.placement, a = r === void 0 ? e.placement : r, o = n.boundary, i = o === void 0 ? PEe : o, s = n.rootBoundary, l = s === void 0 ? q7 : s, u = n.elementContext, c = u === void 0 ? sv : u, d = n.altBoundary, f = d === void 0 ? !1 : d, h = n.padding, p = h === void 0 ? 0 : h, v = X7(typeof p != "number" ? p : Y7(p, Kg)), m = c === sv ? LEe : sv, g = e.rects.popper, y = e.elements[f ? m : c], x = c_e(Nf(y) ? y : y.contextElement || uc(e.elements.popper), i, l), w = Bf(e.elements.reference), k = ez({ reference: w, element: g, strategy: "absolute", placement: a }), C = m5(Object.assign({}, g, k)), S = c === sv ? C : w, _ = { top: x.top - S.top + v.top, bottom: S.bottom - x.bottom + v.bottom, left: x.left - S.left + v.left, right: S.right - x.right + v.right }, T = e.modifiersData.offset; if (c === sv && T) { var O = T[a]; Object.keys(_).forEach(function($) { var A = [ci, ui].indexOf($) >= 0 ? 1 : -1, N = [uo, ui].indexOf($) >= 0 ? "y" : "x"; _[$] += O[N] * A; }); } return _; } function d_e(e, t) { t === void 0 && (t = {}); var n = t, r = n.placement, a = n.boundary, o = n.rootBoundary, i = n.padding, s = n.flipVariations, l = n.allowedAutoPlacements, u = l === void 0 ? Gg : l, c = Df(r), d = c ? s ? z$ : z$.filter(function(p) { return Df(p) === c; }) : Kg, f = d.filter(function(p) { return u.indexOf(p) >= 0; }); f.length === 0 && (f = d); var h = f.reduce(function(p, v) { return p[v] = R0(e, { placement: v, boundary: a, rootBoundary: o, padding: i })[ys(v)], p; }, {}); return Object.keys(h).sort(function(p, v) { return h[p] - h[v]; }); } function p_e(e) { if (ys(e) === x3) return []; var t = cy(e); return [H$(e), t, H$(t)]; } function f_e(e) { var t = e.state, n = e.options, r = e.name; if (!t.modifiersData[r]._skip) { for (var a = n.mainAxis, o = a === void 0 ? !0 : a, i = n.altAxis, s = i === void 0 ? !0 : i, l = n.fallbackPlacements, u = n.padding, c = n.boundary, d = n.rootBoundary, f = n.altBoundary, h = n.flipVariations, p = h === void 0 ? !0 : h, v = n.allowedAutoPlacements, m = t.options.placement, g = ys(m), y = g === m, x = l || (y || !p ? [cy(m)] : p_e(m)), w = [m].concat(x).reduce(function(ve, ge) { return ve.concat(ys(ge) === x3 ? d_e(t, { placement: ge, boundary: c, rootBoundary: d, padding: u, flipVariations: p, allowedAutoPlacements: v }) : ge); }, []), k = t.rects.reference, C = t.rects.popper, S = /* @__PURE__ */ new Map(), _ = !0, T = w[0], O = 0; O < w.length; O++) { var $ = w[O], A = ys($), N = Df($) === Lf, L = [uo, ui].indexOf(A) >= 0, R = L ? "width" : "height", P = R0(t, { placement: $, boundary: c, rootBoundary: d, altBoundary: f, padding: u }), B = L ? N ? ci : co : N ? ui : uo; k[R] > C[R] && (B = cy(B)); var M = cy(B), z = []; if (o && z.push(P[A] <= 0), s && z.push(P[B] <= 0, P[M] <= 0), z.every(function(ve) { return ve; })) { T = $, _ = !1; break; } S.set($, z); } if (_) for (var Z = p ? 3 : 1, G = function(ve) { var ge = w.find(function(oe) { var ee = S.get(oe); if (ee) return ee.slice(0, ve).every(function(q) { return q; }); }); if (ge) return T = ge, "break"; }, J = Z; J > 0; J--) { var se = G(J); if (se === "break") break; } t.placement !== T && (t.modifiersData[r]._skip = !0, t.placement = T, t.reset = !0); } } var h_e = { name: "flip", enabled: !0, phase: "main", fn: f_e, requiresIfExists: ["offset"], data: { _skip: !1 } }; function q$(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 W$(e) { return [uo, ci, ui, co].some(function(t) { return e[t] >= 0; }); } function v_e(e) { var t = e.state, n = e.name, r = t.rects.reference, a = t.rects.popper, o = t.modifiersData.preventOverflow, i = R0(t, { elementContext: "reference" }), s = R0(t, { altBoundary: !0 }), l = q$(i, r), u = q$(s, a, o), c = W$(l), d = W$(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 g_e = { name: "hide", enabled: !0, phase: "main", requiresIfExists: ["preventOverflow"], fn: v_e }; function m_e(e, t, n) { var r = ys(e), a = [co, uo].indexOf(r) >= 0 ? -1 : 1, o = typeof n == "function" ? n(Object.assign({}, t, { placement: e })) : n, i = o[0], s = o[1]; return i = i || 0, s = (s || 0) * a, [co, ci].indexOf(r) >= 0 ? { x: s, y: i } : { x: i, y: s }; } function y_e(e) { var t = e.state, n = e.options, r = e.name, a = n.offset, o = a === void 0 ? [0, 0] : a, i = Gg.reduce(function(c, d) { return c[d] = m_e(d, t.rects, o), 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 b_e = { name: "offset", enabled: !0, phase: "main", requires: ["popperOffsets"], fn: y_e }; function w_e(e) { var t = e.state, n = e.name; t.modifiersData[n] = ez({ reference: t.rects.reference, element: t.rects.popper, strategy: "absolute", placement: t.placement }); } var tz = { name: "popperOffsets", enabled: !0, phase: "read", fn: w_e, data: {} }; function x_e(e) { return e === "x" ? "y" : "x"; } function k_e(e) { var t = e.state, n = e.options, r = e.name, a = n.mainAxis, o = a === void 0 ? !0 : a, i = n.altAxis, s = i === void 0 ? !1 : i, l = n.boundary, u = n.rootBoundary, c = n.altBoundary, d = n.padding, f = n.tether, h = f === void 0 ? !0 : f, p = n.tetherOffset, v = p === void 0 ? 0 : p, m = R0(t, { boundary: l, rootBoundary: u, padding: d, altBoundary: c }), g = ys(t.placement), y = Df(t.placement), x = !y, w = S3(g), k = x_e(w), C = t.modifiersData.popperOffsets, S = t.rects.reference, _ = t.rects.popper, T = typeof v == "function" ? v(Object.assign({}, t.rects, { placement: t.placement })) : v, O = typeof T == "number" ? { mainAxis: T, altAxis: T } : Object.assign({ mainAxis: 0, altAxis: 0 }, T), $ = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, A = { x: 0, y: 0 }; if (C) { if (o) { var N, L = w === "y" ? uo : co, R = w === "y" ? ui : ci, P = w === "y" ? "height" : "width", B = C[w], M = B + m[L], z = B - m[R], Z = h ? -_[P] / 2 : 0, G = y === Lf ? S[P] : _[P], J = y === Lf ? -_[P] : -S[P], se = t.elements.arrow, ve = h && se ? C3(se) : { width: 0, height: 0 }, ge = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : G7(), oe = ge[L], ee = ge[R], q = Xv(0, S[P], ve[P]), Y = x ? S[P] / 2 - Z - q - oe - O.mainAxis : G - q - oe - O.mainAxis, te = x ? -S[P] / 2 + Z + q + ee + O.mainAxis : J + q + ee + O.mainAxis, we = t.elements.arrow && Xg(t.elements.arrow), Oe = we ? w === "y" ? we.clientTop || 0 : we.clientLeft || 0 : 0, Ne = (N = $ == null ? void 0 : $[w]) != null ? N : 0, xe = B + Y - Ne - Oe, $e = B + te - Ne, Se = Xv(h ? fb(M, xe) : M, B, h ? rd(z, $e) : z); C[w] = Se, A[w] = Se - B; } if (s) { var Pe, Me = w === "x" ? uo : co, je = w === "x" ? ui : ci, Be = C[k], We = k === "y" ? "height" : "width", qe = Be + m[Me], Ge = Be - m[je], E = [uo, co].indexOf(g) !== -1, V = (Pe = $ == null ? void 0 : $[k]) != null ? Pe : 0, ie = E ? qe : Be - S[We] - _[We] - V + O.altAxis, le = E ? Be + S[We] + _[We] - V - O.altAxis : Ge, re = h && E ? XEe(ie, Be, le) : Xv(h ? ie : qe, Be, h ? le : Ge); C[k] = re, A[k] = re - Be; } t.modifiersData[r] = A; } } var C_e = { name: "preventOverflow", enabled: !0, phase: "main", fn: k_e, requiresIfExists: ["offset"] }; function S_e(e) { return { scrollLeft: e.scrollLeft, scrollTop: e.scrollTop }; } function E_e(e) { return e === Yi(e) || !Qo(e) ? E3(e) : S_e(e); } function __e(e) { var t = e.getBoundingClientRect(), n = Mf(t.width) / e.offsetWidth || 1, r = Mf(t.height) / e.offsetHeight || 1; return n !== 1 || r !== 1; } function T_e(e, t, n) { n === void 0 && (n = !1); var r = Qo(t), a = Qo(t) && __e(t), o = uc(t), i = Bf(e, a), s = { scrollLeft: 0, scrollTop: 0 }, l = { x: 0, y: 0 }; return (r || !r && !n) && ((Os(t) !== "body" || T3(o)) && (s = E_e(t)), Qo(t) ? (l = Bf(t, !0), l.x += t.clientLeft, l.y += t.clientTop) : o && (l.x = _3(o))), { x: i.left + s.scrollLeft - l.x, y: i.top + s.scrollTop - l.y, width: i.width, height: i.height }; } function O_e(e) { var t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set(), r = []; e.forEach(function(o) { t.set(o.name, o); }); function a(o) { n.add(o.name); var i = [].concat(o.requires || [], o.requiresIfExists || []); i.forEach(function(s) { if (!n.has(s)) { var l = t.get(s); l && a(l); } }), r.push(o); } return e.forEach(function(o) { n.has(o.name) || a(o); }), r; } function $_e(e) { var t = O_e(e); return UEe.reduce(function(n, r) { return n.concat(t.filter(function(a) { return a.phase === r; })); }, []); } function F_e(e) { var t; return function() { return t || (t = new Promise(function(n) { Promise.resolve().then(function() { t = void 0, n(e()); }); })), t; }; } function A_e(e) { var t = e.reduce(function(n, r) { var a = n[r.name]; return n[r.name] = a ? Object.assign({}, a, r, { options: Object.assign({}, a.options, r.options), data: Object.assign({}, a.data, r.data) }) : r, n; }, {}); return Object.keys(t).map(function(n) { return t[n]; }); } var K$ = { placement: "bottom", modifiers: [], strategy: "absolute" }; function G$() { 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 O3(e) { e === void 0 && (e = {}); var t = e, n = t.defaultModifiers, r = n === void 0 ? [] : n, a = t.defaultOptions, o = a === void 0 ? K$ : a; return function(i, s, l) { l === void 0 && (l = o); var u = { placement: "bottom", orderedModifiers: [], options: Object.assign({}, K$, o), modifiersData: {}, elements: { reference: i, popper: s }, attributes: {}, styles: {} }, c = [], d = !1, f = { state: u, setOptions: function(v) { var m = typeof v == "function" ? v(u.options) : v; p(), u.options = Object.assign({}, o, u.options, m), u.scrollParents = { reference: Nf(i) ? Yv(i) : i.contextElement ? Yv(i.contextElement) : [], popper: Yv(s) }; var g = $_e(A_e([].concat(r, u.options.modifiers))); return u.orderedModifiers = g.filter(function(y) { return y.enabled; }), h(), f.update(); }, forceUpdate: function() { if (!d) { var v = u.elements, m = v.reference, g = v.popper; if (G$(m, g)) { u.rects = { reference: T_e(m, Xg(g), u.options.strategy === "fixed"), popper: C3(g) }, u.reset = !1, u.placement = u.options.placement, u.orderedModifiers.forEach(function(_) { return u.modifiersData[_.name] = Object.assign({}, _.data); }); for (var y = 0; y < u.orderedModifiers.length; y++) { if (u.reset === !0) { u.reset = !1, y = -1; continue; } var x = u.orderedModifiers[y], w = x.fn, k = x.options, C = k === void 0 ? {} : k, S = x.name; typeof w == "function" && (u = w({ state: u, options: C, name: S, instance: f }) || u); } } } }, update: F_e(function() { return new Promise(function(v) { f.forceUpdate(), v(u); }); }), destroy: function() { p(), d = !0; } }; if (!G$(i, s)) return f; f.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, y = g === void 0 ? {} : g, x = v.effect; if (typeof x == "function") { var w = x({ state: u, name: m, instance: f, options: y }), k = function() { }; c.push(w || k); } }); } function p() { c.forEach(function(v) { return v(); }), c = []; } return f; }; } O3(); var I_e = [Q7, tz, Z7, W7]; O3({ defaultModifiers: I_e }); var P_e = [Q7, tz, Z7, W7, b_e, h_e, C_e, JEe, g_e], L_e = O3({ defaultModifiers: P_e }); const N_e = (e, t, n = {}) => { const r = { name: "updateState", enabled: !0, phase: "write", fn: ({ state: l }) => { const u = M_e(l); Object.assign(i.value, u); }, requires: ["computeStyles"] }, a = F(() => { const { onFirstUpdate: l, placement: u, strategy: c, modifiers: d } = b(n); return { onFirstUpdate: l, placement: u || "bottom", strategy: c || "absolute", modifiers: [ ...d || [], r, { name: "applyStyles", enabled: !1 } ] }; }), o = dn(), i = U({ styles: { popper: { position: b(a).strategy, left: "0", top: "0" }, arrow: { position: "absolute" } }, attributes: {} }), s = () => { o.value && (o.value.destroy(), o.value = void 0); }; return be(a, (l) => { const u = b(o); u && u.setOptions(l); }, { deep: !0 }), be([e, t], ([l, u]) => { s(), !(!l || !u) && (o.value = L_e(l, u, b(a))); }), kt(() => { s(); }), { state: F(() => { var l; return { ...((l = b(o)) == null ? void 0 : l.state) || {} }; }), styles: F(() => b(i).styles), attributes: F(() => b(i).attributes), update: () => { var l; return (l = b(o)) == null ? void 0 : l.update(); }, forceUpdate: () => { var l; return (l = b(o)) == null ? void 0 : l.forceUpdate(); }, instanceRef: F(() => b(o)) }; }; function M_e(e) { const t = Object.keys(e.elements), n = pb(t.map((a) => [a, e.styles[a] || {}])), r = pb(t.map((a) => [a, e.attributes[a]])); return { styles: n, attributes: r }; } const B_e = (e) => { if (!e) return { onClick: vl, onMousedown: vl, onMouseup: vl }; 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 X$() { let e; const t = (r, a) => { n(), e = window.setTimeout(r, a); }, n = () => window.clearTimeout(e); return Hg(() => n()), { registerTimeout: t, cancelTimeout: n }; } const y5 = { prefix: Math.floor(Math.random() * 1e4), current: 0 }, D_e = Symbol("elIdInjection"), nz = () => tt() ? Te(D_e, y5) : y5, Gu = (e) => { const t = nz(); !rr && t === y5 && yr("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 = w3(); return F(() => b(e) || `${n.value}-id-${t.prefix}-${t.current++}`); }; let Hp = []; const Y$ = (e) => { const t = e; t.key === $r.esc && Hp.forEach((n) => n(t)); }, R_e = (e) => { nt(() => { Hp.length === 0 && document.addEventListener("keydown", Y$), rr && Hp.push(e); }), kt(() => { Hp = Hp.filter((t) => t !== e), Hp.length === 0 && rr && document.removeEventListener("keydown", Y$); }); }; let Z$; const rz = () => { const e = w3(), t = nz(), n = F(() => `${e.value}-popper-container-${t.prefix}`), r = F(() => `#${n.value}`); return { id: n, selector: r }; }, z_e = (e) => { const t = document.createElement("div"); return t.id = e, document.body.appendChild(t), t; }, V_e = () => { const { id: e, selector: t } = rz(); return gg(() => { rr && (process.env.NODE_ENV === "test" || !Z$ || !document.body.querySelector(t.value)) && (Z$ = z_e(e.value)); }), { id: e, selector: t }; }, j_e = Vt({ showAfter: { type: Number, default: 0 }, hideAfter: { type: Number, default: 200 }, autoClose: { type: Number, default: 0 } }), H_e = ({ showAfter: e, hideAfter: t, autoClose: n, open: r, close: a }) => { const { registerTimeout: o } = X$(), { registerTimeout: i, cancelTimeout: s } = X$(); return { onOpen: (l) => { o(() => { r(l); const u = b(n); Bn(u) && u > 0 && i(() => { a(l); }, u); }, b(e)); }, onClose: (l) => { s(), o(() => { a(l); }, b(t)); } }; }, az = Symbol("elForwardRef"), U_e = (e) => { rt(az, { setForwardRef: (t) => { e.value = t; } }); }, q_e = (e) => ({ mounted(t) { e(t); }, updated(t) { e(t); }, unmounted() { e(null); } }), Q$ = { current: 0 }, J$ = U(0), oz = 2e3, eF = Symbol("elZIndexContextKey"), iz = Symbol("zIndexContextKey"), $3 = (e) => { const t = tt() ? Te(eF, Q$) : Q$, n = e || (tt() ? Te(iz, void 0) : void 0), r = F(() => { const i = b(n); return Bn(i) ? i : oz; }), a = F(() => r.value + J$.value), o = () => (t.current++, J$.value = t.current, a.value); return !rr && !Te(eF) && yr("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: a, nextZIndex: o }; }; function W_e(e) { let t; function n() { if (e.value == null) return; const { selectionStart: a, selectionEnd: o, value: i } = e.value; if (a == null || o == null) return; const s = i.slice(0, Math.max(0, a)), l = i.slice(Math.max(0, o)); t = { selectionStart: a, selectionEnd: o, value: i, beforeTxt: s, afterTxt: l }; } function r() { if (e.value == null || t == null) return; const { value: a } = e.value, { beforeTxt: o, afterTxt: i, selectionStart: s } = t; if (o == null || i == null || s == null) return; let l = a.length; if (a.endsWith(i)) l = a.length - i.length; else if (a.startsWith(o)) l = o.length; else { const u = o[s - 1], c = a.indexOf(u, s - 1); c !== -1 && (l = c + 1); } e.value.setSelectionRange(l, l); } return [n, r]; } const Ml = cw({ type: String, values: dw, required: !1 }), sz = Symbol("size"), lz = () => { const e = Te(sz, {}); return F(() => b(e.size) || ""); }; function uz(e, { beforeFocus: t, afterFocus: n, beforeBlur: r, afterBlur: a } = {}) { const o = tt(), { emit: i } = o, s = dn(), l = U(!1), u = (f) => { Lr(t) && t(f) || l.value || (l.value = !0, i("focus", f), n == null || n()); }, c = (f) => { var h; Lr(r) && r(f) || f.relatedTarget && (h = s.value) != null && h.contains(f.relatedTarget) || (l.value = !1, i("blur", f), a == null || a()); }, d = () => { var f, h; (f = s.value) != null && f.contains(document.activeElement) && s.value !== document.activeElement || (h = e.value) == null || h.focus(); }; return be(s, (f) => { f && f.setAttribute("tabindex", "-1"); }), Mi(s, "focus", u, !0), Mi(s, "blur", c, !0), Mi(s, "click", d, !0), process.env.NODE_ENV === "test" && nt(() => { const f = td(e.value) ? e.value : document.querySelector("input,textarea"); f && (Mi(f, "focus", u, !0), Mi(f, "blur", c, !0)); }), { isFocused: l, wrapperRef: s, handleFocus: u, handleBlur: c }; } function F3({ afterComposition: e, emit: t }) { const n = U(!1), r = (i) => { t == null || t("compositionstart", i), n.value = !0; }, a = (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 = !wEe(u); }, o = (i) => { t == null || t("compositionend", i), n.value && (n.value = !1, Ue(() => e(i))); }; return { isComposing: n, handleComposition: (i) => { i.type === "compositionend" ? o(i) : a(i); }, handleCompositionStart: r, handleCompositionUpdate: a, handleCompositionEnd: o }; } const cz = Symbol("emptyValuesContextKey"), K_e = "use-empty-values", G_e = ["", void 0, null], X_e = void 0, dz = Vt({ emptyValues: Array, valueOnClear: { type: [String, Number, Boolean, Function], default: void 0, validator: (e) => Lr(e) ? !e() : !e } }), pz = (e, t) => { const n = tt() ? Te(cz, U({})) : U({}), r = F(() => e.emptyValues || n.value.emptyValues || G_e), a = F(() => Lr(e.valueOnClear) ? e.valueOnClear() : e.valueOnClear !== void 0 ? e.valueOnClear : Lr(n.value.valueOnClear) ? n.value.valueOnClear() : n.value.valueOnClear !== void 0 ? n.value.valueOnClear : X_e), o = (i) => r.value.includes(i); return r.value.includes(a.value) || yr(K_e, "value-on-clear should be a value of empty-values"), { emptyValues: r, valueOnClear: a, isEmptyValue: o }; }, Y_e = Vt({ ariaLabel: String, ariaOrientation: { type: String, values: ["horizontal", "vertical", "undefined"] }, ariaControls: String }), cc = (e) => I7(Y_e, e), fz = Symbol(), hb = U(); function fw(e, t = void 0) { const n = tt() ? Te(fz, hb) : hb; return e ? F(() => { var r, a; return (a = (r = n.value) == null ? void 0 : r[e]) != null ? a : t; }) : n; } function Z_e(e, t) { const n = fw(), r = Lt(e, F(() => { var s; return ((s = n.value) == null ? void 0 : s.namespace) || Gv; })), a = vi(F(() => { var s; return (s = n.value) == null ? void 0 : s.locale; })), o = $3(F(() => { var s; return ((s = n.value) == null ? void 0 : s.zIndex) || oz; })), i = F(() => { var s; return b(t) || ((s = n.value) == null ? void 0 : s.size) || ""; }); return Q_e(F(() => b(n) || {})), { ns: r, locale: a, zIndex: o, size: i }; } const Q_e = (e, t, n = !1) => { var r; const a = !!tt(), o = a ? fw() : void 0, i = (r = void 0) != null ? r : a ? rt : void 0; if (!i) { yr("provideGlobalConfig", "provideGlobalConfig() can only be used inside setup()."); return; } const s = F(() => { const l = b(e); return o != null && o.value ? J_e(o.value, l) : l; }); return i(fz, s), i(j7, F(() => s.value.locale)), i(H7, F(() => s.value.namespace)), i(iz, F(() => s.value.zIndex)), i(sz, { size: F(() => s.value.size || "") }), i(cz, F(() => ({ emptyValues: s.value.emptyValues, valueOnClear: s.value.valueOnClear }))), (n || !hb.value) && (hb.value = s.value), s; }, J_e = (e, t) => { const n = [.../* @__PURE__ */ new Set([...L$(e), ...L$(t)])], r = {}; for (const a of n) r[a] = t[a] !== void 0 ? t[a] : e[a]; return r; }; var Mt = (e, t) => { const n = e.__vccOpts || e; for (const [r, a] of t) n[r] = a; return n; }; const e8e = Vt({ size: { type: gt([Number, String]) }, color: { type: String } }), t8e = X({ name: "ElIcon", inheritAttrs: !1 }), n8e = /* @__PURE__ */ X({ ...t8e, props: e8e, setup(e) { const t = e, n = Lt("icon"), r = F(() => { const { size: a, color: o } = t; return !a && !o ? {} : { fontSize: dl(a) ? void 0 : Pf(a), "--color": o }; }); return (a, o) => (I(), j("i", Bt({ class: b(n).b(), style: b(r) }, a.$attrs), [ he(a.$slots, "default") ], 16)); } }); var r8e = /* @__PURE__ */ Mt(n8e, [["__file", "icon.vue"]]); const er = Er(r8e), A3 = Symbol("formContextKey"), vb = Symbol("formItemContextKey"), Xu = (e, t = {}) => { const n = U(void 0), r = t.prop ? n : U7("size"), a = t.global ? n : lz(), o = t.form ? { size: void 0 } : Te(A3, void 0), i = t.formItem ? { size: void 0 } : Te(vb, void 0); return F(() => r.value || b(e) || (i == null ? void 0 : i.size) || (o == null ? void 0 : o.size) || a.value || ""); }, Yg = (e) => { const t = U7("disabled"), n = Te(A3, void 0); return F(() => t.value || b(e) || (n == null ? void 0 : n.disabled) || !1); }, dc = () => { const e = Te(A3, void 0), t = Te(vb, void 0); return { form: e, formItem: t }; }, Zg = (e, { formItemContext: t, disableIdGeneration: n, disableIdManagement: r }) => { n || (n = U(!1)), r || (r = U(!1)); const a = U(); let o; const i = F(() => { var s; return !!(!(e.label || e.ariaLabel) && t && t.inputIds && ((s = t.inputIds) == null ? void 0 : s.length) <= 1); }); return nt(() => { o = be([It(e, "id"), n], ([s, l]) => { const u = s ?? (l ? void 0 : Gu().value); u !== a.value && (t != null && t.removeInputId && (a.value && t.removeInputId(a.value), !(r != null && r.value) && !l && u && t.addInputId(u)), a.value = u); }, { immediate: !0 }); }), Yb(() => { o && o(), t != null && t.removeInputId && a.value && t.removeInputId(a.value); }), { isLabeledByFormItem: i, inputId: a }; }; let bi; const a8e = ` height:0 !important; visibility:hidden !important; ${Pke() ? "" : "overflow:hidden !important;"} position:absolute !important; z-index:-1000 !important; top:0 !important; right:0 !important; `, o8e = [ "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 i8e(e) { const t = window.getComputedStyle(e), n = t.getPropertyValue("box-sizing"), r = Number.parseFloat(t.getPropertyValue("padding-bottom")) + Number.parseFloat(t.getPropertyValue("padding-top")), a = Number.parseFloat(t.getPropertyValue("border-bottom-width")) + Number.parseFloat(t.getPropertyValue("border-top-width")); return { contextStyle: o8e.map((o) => `${o}:${t.getPropertyValue(o)}`).join(";"), paddingSize: r, borderSize: a, boxSizing: n }; } function tF(e, t = 1, n) { var r; bi || (bi = document.createElement("textarea"), document.body.appendChild(bi)); const { paddingSize: a, borderSize: o, boxSizing: i, contextStyle: s } = i8e(e); bi.setAttribute("style", `${s};${a8e}`), bi.value = e.value || e.placeholder || ""; let l = bi.scrollHeight; const u = {}; i === "border-box" ? l = l + o : i === "content-box" && (l = l - a), bi.value = ""; const c = bi.scrollHeight - a; if (Bn(t)) { let d = c * t; i === "border-box" && (d = d + a + o), l = Math.max(d, l), u.minHeight = `${d}px`; } if (Bn(n)) { let d = c * n; i === "border-box" && (d = d + a + o), l = Math.min(d, l); } return u.height = `${l}px`, (r = bi.parentNode) == null || r.removeChild(bi), bi = void 0, u; } const s8e = Vt({ id: { type: String, default: void 0 }, size: Ml, disabled: Boolean, modelValue: { type: gt([ 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: gt([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: li }, prefixIcon: { type: li }, containerRole: { type: String, default: void 0 }, tabindex: { type: [String, Number], default: 0 }, validateEvent: { type: Boolean, default: !0 }, inputStyle: { type: gt([Object, Array, String]), default: () => bu({}) }, autofocus: Boolean, rows: { type: Number, default: 2 }, ...cc(["ariaLabel"]) }), l8e = { [cr]: (e) => lo(e), input: (e) => lo(e), change: (e) => lo(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 }, u8e = X({ name: "ElInput", inheritAttrs: !1 }), c8e = /* @__PURE__ */ X({ ...u8e, props: s8e, emits: l8e, setup(e, { expose: t, emit: n }) { const r = e, a = oh(), o = Cr(), i = F(() => { const E = {}; return r.containerRole === "combobox" && (E["aria-haspopup"] = a["aria-haspopup"], E["aria-owns"] = a["aria-owns"], E["aria-expanded"] = a["aria-expanded"]), E; }), s = F(() => [ r.type === "textarea" ? m.b() : v.b(), v.m(h.value), v.is("disabled", p.value), v.is("exceed", se.value), { [v.b("group")]: o.prepend || o.append, [v.m("prefix")]: o.prefix || r.prefixIcon, [v.m("suffix")]: o.suffix || r.suffixIcon || r.clearable || r.showPassword, [v.bm("suffix", "password-clear")]: z.value && Z.value, [v.b("hidden")]: r.type === "hidden" }, a.class ]), l = F(() => [ v.e("wrapper"), v.is("focus", T.value) ]), u = CEe({ excludeKeys: F(() => Object.keys(i.value)) }), { form: c, formItem: d } = dc(), { inputId: f } = Zg(r, { formItemContext: d }), h = Xu(), p = Yg(), v = Lt("input"), m = Lt("textarea"), g = dn(), y = dn(), x = U(!1), w = U(!1), k = U(), C = dn(r.inputStyle), S = F(() => g.value || y.value), { wrapperRef: _, isFocused: T, handleFocus: O, handleBlur: $ } = uz(S, { beforeFocus() { return p.value; }, afterBlur() { var E; r.validateEvent && ((E = d == null ? void 0 : d.validate) == null || E.call(d, "blur").catch((V) => yr(V))); } }), A = F(() => { var E; return (E = c == null ? void 0 : c.statusIcon) != null ? E : !1; }), N = F(() => (d == null ? void 0 : d.validateState) || ""), L = F(() => N.value && V7[N.value]), R = F(() => w.value ? D7 : sEe), P = F(() => [ a.style ]), B = F(() => [ r.inputStyle, C.value, { resize: r.resize } ]), M = F(() => Wg(r.modelValue) ? "" : String(r.modelValue)), z = F(() => r.clearable && !p.value && !r.readonly && !!M.value && (T.value || x.value)), Z = F(() => r.showPassword && !p.value && !r.readonly && !!M.value && (!!M.value || T.value)), G = F(() => r.showWordLimit && !!r.maxlength && (r.type === "text" || r.type === "textarea") && !p.value && !r.readonly && !r.showPassword), J = F(() => M.value.length), se = F(() => !!G.value && J.value > Number(r.maxlength)), ve = F(() => !!o.suffix || !!r.suffixIcon || z.value || r.showPassword || G.value || !!N.value && A.value), [ge, oe] = W_e(g); us(y, (E) => { if (q(), !G.value || r.resize !== "both") return; const V = E[0], { width: ie } = V.contentRect; k.value = { right: `calc(100% - ${ie + 15 + 6}px)` }; }); const ee = () => { const { type: E, autosize: V } = r; if (!(!rr || E !== "textarea" || !y.value)) if (V) { const ie = Kr(V) ? V.minRows : void 0, le = Kr(V) ? V.maxRows : void 0, re = tF(y.value, ie, le); C.value = { overflowY: "hidden", ...re }, Ue(() => { y.value.offsetHeight, C.value = re; }); } else C.value = { minHeight: tF(y.value).minHeight }; }, q = /* @__PURE__ */ ((E) => { let V = !1; return () => { var ie; V || !r.autosize || ((ie = y.value) == null ? void 0 : ie.offsetParent) === null || (E(), V = !0); }; })(ee), Y = () => { const E = S.value, V = r.formatter ? r.formatter(M.value) : M.value; !E || E.value === V || (E.value = V); }, te = async (E) => { ge(); let { value: V } = E.target; if (r.formatter && (V = r.parser ? r.parser(V) : V), !Oe.value) { if (V === M.value) { Y(); return; } n(cr, V), n("input", V), await Ue(), Y(), oe(); } }, we = (E) => { n("change", E.target.value); }, { isComposing: Oe, handleCompositionStart: Ne, handleCompositionUpdate: xe, handleCompositionEnd: $e } = F3({ emit: n, afterComposition: te }), Se = () => { w.value = !w.value, Pe(); }, Pe = async () => { var E; await Ue(), (E = S.value) == null || E.focus(); }, Me = () => { var E; return (E = S.value) == null ? void 0 : E.blur(); }, je = (E) => { x.value = !1, n("mouseleave", E); }, Be = (E) => { x.value = !0, n("mouseenter", E); }, We = (E) => { n("keydown", E); }, qe = () => { var E; (E = S.value) == null || E.select(); }, Ge = () => { n(cr, ""), n("change", ""), n("clear"), n("input", ""); }; return be(() => r.modelValue, () => { var E; Ue(() => ee()), r.validateEvent && ((E = d == null ? void 0 : d.validate) == null || E.call(d, "change").catch((V) => yr(V))); }), be(M, () => Y()), be(() => r.type, async () => { await Ue(), Y(), ee(); }), nt(() => { !r.formatter && r.parser && yr("ElInput", "If you set the parser, you also need to set the formatter."), Y(), Ue(ee); }), t({ input: g, textarea: y, ref: S, textareaStyle: B, autosize: It(r, "autosize"), isComposing: Oe, focus: Pe, blur: Me, select: qe, clear: Ge, resizeTextarea: ee }), (E, V) => (I(), j("div", Bt(b(i), { class: [ b(s), { [b(v).bm("group", "append")]: E.$slots.append, [b(v).bm("group", "prepend")]: E.$slots.prepend } ], style: b(P), role: E.containerRole, onMouseenter: Be, onMouseleave: je }), [ ne(" input "), E.type !== "textarea" ? (I(), j(Qe, { key: 0 }, [ ne(" prepend slot "), E.$slots.prepend ? (I(), j("div", { key: 0, class: H(b(v).be("group", "prepend")) }, [ he(E.$slots, "prepend") ], 2)) : ne("v-if", !0), W("div", { ref_key: "wrapperRef", ref: _, class: H(b(l)) }, [ ne(" prefix slot "), E.$slots.prefix || E.prefixIcon ? (I(), j("span", { key: 0, class: H(b(v).e("prefix")) }, [ W("span", { class: H(b(v).e("prefix-inner")) }, [ he(E.$slots, "prefix"), E.prefixIcon ? (I(), de(b(er), { key: 0, class: H(b(v).e("icon")) }, { default: K(() => [ (I(), de(ct(E.prefixIcon))) ]), _: 1 }, 8, ["class"])) : ne("v-if", !0) ], 2) ], 2)) : ne("v-if", !0), W("input", Bt({ id: b(f), ref_key: "input", ref: g, class: b(v).e("inner") }, b(u), { minlength: E.minlength, maxlength: E.maxlength, type: E.showPassword ? w.value ? "text" : "password" : E.type, disabled: b(p), readonly: E.readonly, autocomplete: E.autocomplete, tabindex: E.tabindex, "aria-label": E.ariaLabel, placeholder: E.placeholder, style: E.inputStyle, form: E.form, autofocus: E.autofocus, onCompositionstart: b(Ne), onCompositionupdate: b(xe), onCompositionend: b($e), onInput: te, onChange: we, onKeydown: We }), null, 16, ["id", "minlength", "maxlength", "type", "disabled", "readonly", "autocomplete", "tabindex", "aria-label", "placeholder", "form", "autofocus", "onCompositionstart", "onCompositionupdate", "onCompositionend"]), ne(" suffix slot "), b(ve) ? (I(), j("span", { key: 1, class: H(b(v).e("suffix")) }, [ W("span", { class: H(b(v).e("suffix-inner")) }, [ !b(z) || !b(Z) || !b(G) ? (I(), j(Qe, { key: 0 }, [ he(E.$slots, "suffix"), E.suffixIcon ? (I(), de(b(er), { key: 0, class: H(b(v).e("icon")) }, { default: K(() => [ (I(), de(ct(E.suffixIcon))) ]), _: 1 }, 8, ["class"])) : ne("v-if", !0) ], 64)) : ne("v-if", !0), b(z) ? (I(), de(b(er), { key: 1, class: H([b(v).e("icon"), b(v).e("clear")]), onMousedown: Je(b(vl), ["prevent"]), onClick: Ge }, { default: K(() => [ ue(b(lw)) ]), _: 1 }, 8, ["class", "onMousedown"])) : ne("v-if", !0), b(Z) ? (I(), de(b(er), { key: 2, class: H([b(v).e("icon"), b(v).e("password")]), onClick: Se }, { default: K(() => [ (I(), de(ct(b(R)))) ]), _: 1 }, 8, ["class"])) : ne("v-if", !0), b(G) ? (I(), j("span", { key: 3, class: H(b(v).e("count")) }, [ W("span", { class: H(b(v).e("count-inner")) }, Fe(b(J)) + " / " + Fe(E.maxlength), 3) ], 2)) : ne("v-if", !0), b(N) && b(L) && b(A) ? (I(), de(b(er), { key: 4, class: H([ b(v).e("icon"), b(v).e("validateIcon"), b(v).is("loading", b(N) === "validating") ]) }, { default: K(() => [ (I(), de(ct(b(L)))) ]), _: 1 }, 8, ["class"])) : ne("v-if", !0) ], 2) ], 2)) : ne("v-if", !0) ], 2), ne(" append slot "), E.$slots.append ? (I(), j("div", { key: 1, class: H(b(v).be("group", "append")) }, [ he(E.$slots, "append") ], 2)) : ne("v-if", !0) ], 64)) : (I(), j(Qe, { key: 1 }, [ ne(" textarea "), W("textarea", Bt({ id: b(f), ref_key: "textarea", ref: y, class: [b(m).e("inner"), b(v).is("focus", b(T))] }, b(u), { minlength: E.minlength, maxlength: E.maxlength, tabindex: E.tabindex, disabled: b(p), readonly: E.readonly, autocomplete: E.autocomplete, style: b(B), "aria-label": E.ariaLabel, placeholder: E.placeholder, form: E.form, autofocus: E.autofocus, rows: E.rows, onCompositionstart: b(Ne), onCompositionupdate: b(xe), onCompositionend: b($e), onInput: te, onFocus: b(O), onBlur: b($), onChange: we, onKeydown: We }), null, 16, ["id", "minlength", "maxlength", "tabindex", "disabled", "readonly", "autocomplete", "aria-label", "placeholder", "form", "autofocus", "rows", "onCompositionstart", "onCompositionupdate", "onCompositionend", "onFocus", "onBlur"]), b(G) ? (I(), j("span", { key: 0, style: Ye(k.value), class: H(b(v).e("count")) }, Fe(b(J)) + " / " + Fe(E.maxlength), 7)) : ne("v-if", !0) ], 64)) ], 16, ["role"])); } }); var d8e = /* @__PURE__ */ Mt(c8e, [["__file", "input.vue"]]); const hw = Er(d8e), Tp = 4, p8e = { 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" } }, f8e = ({ move: e, size: t, bar: n }) => ({ [n.size]: t, transform: `translate${n.axis}(${e}%)` }), I3 = Symbol("scrollbarContextKey"), h8e = Vt({ vertical: Boolean, size: String, move: Number, ratio: { type: Number, required: !0 }, always: Boolean }), v8e = "Thumb", g8e = /* @__PURE__ */ X({ __name: "thumb", props: h8e, setup(e) { const t = e, n = Te(I3), r = Lt("scrollbar"); n || L7(v8e, "can not inject scrollbar context"); const a = U(), o = U(), i = U({}), s = U(!1); let l = !1, u = !1, c = rr ? document.onselectstart : null; const d = F(() => p8e[t.vertical ? "vertical" : "horizontal"]), f = F(() => f8e({ size: t.size, move: t.move, bar: d.value })), h = F(() => a.value[d.value.offset] ** 2 / n.wrapElement[d.value.scrollSize] / t.ratio / o.value[d.value.offset]), p = (C) => { var S; if (C.stopPropagation(), C.ctrlKey || [1, 2].includes(C.button)) return; (S = window.getSelection()) == null || S.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 (!o.value || !a.value || !n.wrapElement) return; const S = Math.abs(C.target.getBoundingClientRect()[d.value.direction] - C[d.value.client]), _ = o.value[d.value.offset] / 2, T = (S - _) * 100 * h.value / a.value[d.value.offset]; n.wrapElement[d.value.scroll] = T * n.wrapElement[d.value.scrollSize] / 100; }, m = (C) => { C.stopImmediatePropagation(), l = !0, document.addEventListener("mousemove", g), document.addEventListener("mouseup", y), c = document.onselectstart, document.onselectstart = () => !1; }, g = (C) => { if (!a.value || !o.value || l === !1) return; const S = i.value[d.value.axis]; if (!S) return; const _ = (a.value.getBoundingClientRect()[d.value.direction] - C[d.value.client]) * -1, T = o.value[d.value.offset] - S, O = (_ - T) * 100 * h.value / a.value[d.value.offset]; n.wrapElement[d.value.scroll] = O * n.wrapElement[d.value.scrollSize] / 100; }, y = () => { l = !1, i.value[d.value.axis] = 0, document.removeEventListener("mousemove", g), document.removeEventListener("mouseup", y), k(), u && (s.value = !1); }, x = () => { u = !1, s.value = !!t.size; }, w = () => { u = !0, s.value = l; }; kt(() => { k(), document.removeEventListener("mouseup", y); }); const k = () => { document.onselectstart !== c && (document.onselectstart = c); }; return Mi(It(n, "scrollbarElement"), "mousemove", x), Mi(It(n, "scrollbarElement"), "mouseleave", w), (C, S) => (I(), de(vr, { name: b(r).b("fade"), persisted: "" }, { default: K(() => [ Xe(W("div", { ref_key: "instance", ref: a, class: H([b(r).e("bar"), b(r).is(b(d).key)]), onMousedown: v }, [ W("div", { ref_key: "thumb", ref: o, class: H(b(r).e("thumb")), style: Ye(b(f)), onMousedown: p }, null, 38) ], 34), [ [mt, C.always || s.value] ]) ]), _: 1 }, 8, ["name"])); } }); var nF = /* @__PURE__ */ Mt(g8e, [["__file", "thumb.vue"]]); const m8e = Vt({ always: { type: Boolean, default: !0 }, minSize: { type: Number, required: !0 } }), y8e = /* @__PURE__ */ X({ __name: "bar", props: m8e, setup(e, { expose: t }) { const n = e, r = Te(I3), a = U(0), o = U(0), i = U(""), s = U(""), l = U(1), u = U(1); return t({ handleScroll: (c) => { if (c) { const d = c.offsetHeight - Tp, f = c.offsetWidth - Tp; o.value = c.scrollTop * 100 / d * l.value, a.value = c.scrollLeft * 100 / f * u.value; } }, update: () => { const c = r == null ? void 0 : r.wrapElement; if (!c) return; const d = c.offsetHeight - Tp, f = c.offsetWidth - Tp, h = d ** 2 / c.scrollHeight, p = f ** 2 / c.scrollWidth, v = Math.max(h, n.minSize), m = Math.max(p, n.minSize); l.value = h / (d - h) / (v / (d - v)), u.value = p / (f - p) / (m / (f - m)), s.value = v + Tp < d ? `${v}px` : "", i.value = m + Tp < f ? `${m}px` : ""; } }), (c, d) => (I(), j(Qe, null, [ ue(nF, { move: a.value, ratio: u.value, size: i.value, always: c.always }, null, 8, ["move", "ratio", "size", "always"]), ue(nF, { move: o.value, ratio: l.value, size: s.value, vertical: "", always: c.always }, null, 8, ["move", "ratio", "size", "always"]) ], 64)); } }); var b8e = /* @__PURE__ */ Mt(y8e, [["__file", "bar.vue"]]); const w8e = Vt({ height: { type: [String, Number], default: "" }, maxHeight: { type: [String, Number], default: "" }, native: { type: Boolean, default: !1 }, wrapStyle: { type: gt([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, ...cc(["ariaLabel", "ariaOrientation"]) }), x8e = { scroll: ({ scrollTop: e, scrollLeft: t }) => [e, t].every(Bn) }, b5 = "ElScrollbar", k8e = X({ name: b5 }), C8e = /* @__PURE__ */ X({ ...k8e, props: w8e, emits: x8e, setup(e, { expose: t, emit: n }) { const r = e, a = Lt("scrollbar"); let o, i, s = 0, l = 0; const u = U(), c = U(), d = U(), f = U(), h = F(() => { const k = {}; return r.height && (k.height = Pf(r.height)), r.maxHeight && (k.maxHeight = Pf(r.maxHeight)), [r.wrapStyle, k]; }), p = F(() => [ r.wrapClass, a.e("wrap"), { [a.em("wrap", "hidden-default")]: !r.native } ]), v = F(() => [a.e("view"), r.viewClass]), m = () => { var k; c.value && ((k = f.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) { Kr(k) ? c.value.scrollTo(k) : Bn(k) && Bn(C) && c.value.scrollTo(k, C); } const y = (k) => { if (!Bn(k)) { yr(b5, "value must be a number"); return; } c.value.scrollTop = k; }, x = (k) => { if (!Bn(k)) { yr(b5, "value must be a number"); return; } c.value.scrollLeft = k; }, w = () => { var k; (k = f.value) == null || k.update(); }; return be(() => r.noresize, (k) => { k ? (o == null || o(), i == null || i()) : ({ stop: o } = us(d, w), i = Mi("resize", w)); }, { immediate: !0 }), be(() => [r.maxHeight, r.height], () => { r.native || Ue(() => { var k; w(), c.value && ((k = f.value) == null || k.handleScroll(c.value)); }); }), rt(I3, tn({ scrollbarElement: u, wrapElement: c })), Zb(() => { c.value && (c.value.scrollTop = s, c.value.scrollLeft = l); }), nt(() => { r.native || Ue(() => { w(); }); }), jd(() => w()), t({ wrapRef: c, update: w, scrollTo: g, setScrollTop: y, setScrollLeft: x, handleScroll: m }), (k, C) => (I(), j("div", { ref_key: "scrollbarRef", ref: u, class: H(b(a).b()) }, [ W("div", { ref_key: "wrapRef", ref: c, class: H(b(p)), style: Ye(b(h)), tabindex: k.tabindex, onScroll: m }, [ (I(), de(ct(k.tag), { id: k.id, ref_key: "resizeRef", ref: d, class: H(b(v)), style: Ye(k.viewStyle), role: k.role, "aria-label": k.ariaLabel, "aria-orientation": k.ariaOrientation }, { default: K(() => [ he(k.$slots, "default") ]), _: 3 }, 8, ["id", "class", "style", "role", "aria-label", "aria-orientation"])) ], 46, ["tabindex"]), k.native ? ne("v-if", !0) : (I(), de(b8e, { key: 0, ref_key: "barRef", ref: f, always: k.always, "min-size": k.minSize }, null, 8, ["always", "min-size"])) ], 2)); } }); var S8e = /* @__PURE__ */ Mt(C8e, [["__file", "scrollbar.vue"]]); const P3 = Er(S8e), L3 = Symbol("popper"), hz = Symbol("popperContent"), E8e = [ "dialog", "grid", "group", "listbox", "menu", "navigation", "tooltip", "tree" ], vz = Vt({ role: { type: String, values: E8e, default: "tooltip" } }), _8e = X({ name: "ElPopper", inheritAttrs: !1 }), T8e = /* @__PURE__ */ X({ ..._8e, props: vz, setup(e, { expose: t }) { const n = e, r = U(), a = U(), o = U(), i = U(), s = F(() => n.role), l = { triggerRef: r, popperInstanceRef: a, contentRef: o, referenceRef: i, role: s }; return t(l), rt(L3, l), (u, c) => he(u.$slots, "default"); } }); var O8e = /* @__PURE__ */ Mt(T8e, [["__file", "popper.vue"]]); const gz = Vt({ arrowOffset: { type: Number, default: 5 } }), $8e = X({ name: "ElPopperArrow", inheritAttrs: !1 }), F8e = /* @__PURE__ */ X({ ...$8e, props: gz, setup(e, { expose: t }) { const n = e, r = Lt("popper"), { arrowOffset: a, arrowRef: o, arrowStyle: i } = Te(hz, void 0); return be(() => n.arrowOffset, (s) => { a.value = s; }), kt(() => { o.value = void 0; }), t({ arrowRef: o }), (s, l) => (I(), j("span", { ref_key: "arrowRef", ref: o, class: H(b(r).e("arrow")), style: Ye(b(i)), "data-popper-arrow": "" }, null, 6)); } }); var A8e = /* @__PURE__ */ Mt(F8e, [["__file", "arrow.vue"]]); const dk = "ElOnlyChild", I8e = X({ name: dk, setup(e, { slots: t, attrs: n }) { var r; const a = Te(az), o = q_e((r = a == null ? void 0 : a.setForwardRef) != null ? r : vl); return () => { var i; const s = (i = t.default) == null ? void 0 : i.call(t, n); if (!s) return null; if (s.length > 1) return yr(dk, "requires exact only one valid child."), null; const l = mz(s); return l ? Xe(mg(l, n), [[o]]) : (yr(dk, "no valid child node found"), null); }; } }); function mz(e) { if (!e) return null; const t = e; for (const n of t) { if (Kr(n)) switch (n.type) { case yg: continue; case Ps: case "svg": return rF(n); case Qe: return mz(n.children); default: return n; } return rF(n); } return null; } function rF(e) { const t = Lt("only-child"); return ue("span", { class: t.e("content") }, [e]); } const yz = Vt({ virtualRef: { type: gt(Object) }, virtualTriggering: Boolean, onMouseenter: { type: gt(Function) }, onMouseleave: { type: gt(Function) }, onClick: { type: gt(Function) }, onKeydown: { type: gt(Function) }, onFocus: { type: gt(Function) }, onBlur: { type: gt(Function) }, onContextmenu: { type: gt(Function) }, id: String, open: Boolean }), P8e = X({ name: "ElPopperTrigger", inheritAttrs: !1 }), L8e = /* @__PURE__ */ X({ ...P8e, props: yz, setup(e, { expose: t }) { const n = e, { role: r, triggerRef: a } = Te(L3, void 0); U_e(a); const o = F(() => s.value ? n.id : void 0), i = F(() => { if (r && r.value === "tooltip") return n.open && n.id ? n.id : void 0; }), s = F(() => { if (r && r.value !== "tooltip") return r.value; }), l = F(() => s.value ? `${n.open}` : void 0); let u; const c = [ "onMouseenter", "onMouseleave", "onClick", "onKeydown", "onFocus", "onBlur", "onContextmenu" ]; return nt(() => { be(() => n.virtualRef, (d) => { d && (a.value = ps(d)); }, { immediate: !0 }), be(a, (d, f) => { u == null || u(), u = void 0, td(d) && (c.forEach((h) => { var p; const v = n[h]; v && (d.addEventListener(h.slice(2).toLowerCase(), v), (p = f == null ? void 0 : f.removeEventListener) == null || p.call(f, h.slice(2).toLowerCase(), v)); }), u = be([o, i, s, l], (h) => { [ "aria-controls", "aria-describedby", "aria-haspopup", "aria-expanded" ].forEach((p, v) => { Wg(h[v]) ? d.removeAttribute(p) : d.setAttribute(p, h[v]); }); }, { immediate: !0 })), td(f) && [ "aria-controls", "aria-describedby", "aria-haspopup", "aria-expanded" ].forEach((h) => f.removeAttribute(h)); }, { immediate: !0 }); }), kt(() => { if (u == null || u(), u = void 0, a.value && td(a.value)) { const d = a.value; c.forEach((f) => { const h = n[f]; h && d.removeEventListener(f.slice(2).toLowerCase(), h); }), a.value = void 0; } }), t({ triggerRef: a }), (d, f) => d.virtualTriggering ? ne("v-if", !0) : (I(), de(b(I8e), Bt({ key: 0 }, d.$attrs, { "aria-controls": b(o), "aria-describedby": b(i), "aria-expanded": b(l), "aria-haspopup": b(s) }), { default: K(() => [ he(d.$slots, "default") ]), _: 3 }, 16, ["aria-controls", "aria-describedby", "aria-expanded", "aria-haspopup"])); } }); var N8e = /* @__PURE__ */ Mt(L8e, [["__file", "trigger.vue"]]); const pk = "focus-trap.focus-after-trapped", fk = "focus-trap.focus-after-released", M8e = "focus-trap.focusout-prevented", aF = { cancelable: !0, bubbles: !1 }, B8e = { cancelable: !0, bubbles: !1 }, oF = "focusAfterTrapped", iF = "focusAfterReleased", D8e = Symbol("elFocusTrap"), N3 = U(), vw = U(0), M3 = U(0); let s1 = 0; const bz = (e) => { const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, { acceptNode: (r) => { const a = r.tagName === "INPUT" && r.type === "hidden"; return r.disabled || r.hidden || a ? NodeFilter.FILTER_SKIP : r.tabIndex >= 0 || r === document.activeElement ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP; } }); for (; n.nextNode(); ) t.push(n.currentNode); return t; }, sF = (e, t) => { for (const n of e) if (!R8e(n, t)) return n; }, R8e = (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; }, z8e = (e) => { const t = bz(e), n = sF(t, e), r = sF(t.reverse(), e); return [n, r]; }, V8e = (e) => e instanceof HTMLInputElement && "select" in e, ou = (e, t) => { if (e && e.focus) { const n = document.activeElement; e.focus({ preventScroll: !0 }), M3.value = window.performance.now(), e !== n && V8e(e) && t && e.select(); } }; function lF(e, t) { const n = [...e], r = e.indexOf(t); return r !== -1 && n.splice(r, 1), n; } const j8e = () => { let e = []; return { push: (t) => { const n = e[0]; n && t !== n && n.pause(), e = lF(e, t), e.unshift(t); }, remove: (t) => { var n, r; e = lF(e, t), (r = (n = e[0]) == null ? void 0 : n.resume) == null || r.call(n); } }; }, H8e = (e, t = !1) => { const n = document.activeElement; for (const r of e) if (ou(r, t), document.activeElement !== n) return; }, uF = j8e(), U8e = () => vw.value > M3.value, l1 = () => { N3.value = "pointer", vw.value = window.performance.now(); }, cF = () => { N3.value = "keyboard", vw.value = window.performance.now(); }, q8e = () => (nt(() => { s1 === 0 && (document.addEventListener("mousedown", l1), document.addEventListener("touchstart", l1), document.addEventListener("keydown", cF)), s1++; }), kt(() => { s1--, s1 <= 0 && (document.removeEventListener("mousedown", l1), document.removeEventListener("touchstart", l1), document.removeEventListener("keydown", cF)); }), { focusReason: N3, lastUserFocusTimestamp: vw, lastAutomatedFocusTimestamp: M3 }), u1 = (e) => new CustomEvent(M8e, { ...B8e, detail: e }), W8e = X({ name: "ElFocusTrap", inheritAttrs: !1, props: { loop: Boolean, trapped: Boolean, focusTrapEl: Object, focusStartEl: { type: [Object, String], default: "first" } }, emits: [ oF, iF, "focusin", "focusout", "focusout-prevented", "release-requested" ], setup(e, { emit: t }) { const n = U(); let r, a; const { focusReason: o } = q8e(); R_e((p) => { e.trapped && !i.paused && t("release-requested", p); }); const i = { paused: !1, pause() { this.paused = !0; }, resume() { this.paused = !1; } }, s = (p) => { if (!e.loop && !e.trapped || i.paused) return; const { key: v, altKey: m, ctrlKey: g, metaKey: y, currentTarget: x, shiftKey: w } = p, { loop: k } = e, C = v === $r.tab && !m && !g && !y, S = document.activeElement; if (C && S) { const _ = x, [T, O] = z8e(_); if (T && O) { if (!w && S === O) { const $ = u1({ focusReason: o.value }); t("focusout-prevented", $), $.defaultPrevented || (p.preventDefault(), k && ou(T, !0)); } else if (w && [T, _].includes(S)) { const $ = u1({ focusReason: o.value }); t("focusout-prevented", $), $.defaultPrevented || (p.preventDefault(), k && ou(O, !0)); } } else if (S === _) { const $ = u1({ focusReason: o.value }); t("focusout-prevented", $), $.defaultPrevented || p.preventDefault(); } } }; rt(D8e, { focusTrapRef: n, onKeydown: s }), be(() => e.focusTrapEl, (p) => { p && (n.value = p); }, { immediate: !0 }), be([n], ([p], [v]) => { p && (p.addEventListener("keydown", s), p.addEventListener("focusin", c), p.addEventListener("focusout", d)), v && (v.removeEventListener("keydown", s), v.removeEventListener("focusin", c), v.removeEventListener("focusout", d)); }); const l = (p) => { t(oF, p); }, u = (p) => t(iF, p), c = (p) => { const v = b(n); if (!v) return; const m = p.target, g = p.relatedTarget, y = m && v.contains(m); e.trapped || g && v.contains(g) || (r = g), y && t("focusin", p), !i.paused && e.trapped && (y ? a = m : ou(a, !0)); }, d = (p) => { const v = b(n); if (!(i.paused || !v)) if (e.trapped) { const m = p.relatedTarget; !Wg(m) && !v.contains(m) && setTimeout(() => { if (!i.paused && e.trapped) { const g = u1({ focusReason: o.value }); t("focusout-prevented", g), g.defaultPrevented || ou(a, !0); } }, 0); } else { const m = p.target; m && v.contains(m) || t("focusout", p); } }; async function f() { await Ue(); const p = b(n); if (p) { uF.push(i); const v = p.contains(document.activeElement) ? r : document.activeElement; if (r = v, !p.contains(v)) { const m = new Event(pk, aF); p.addEventListener(pk, l), p.dispatchEvent(m), m.defaultPrevented || Ue(() => { let g = e.focusStartEl; lo(g) || (ou(g), document.activeElement !== g && (g = "first")), g === "first" && H8e(bz(p), !0), (document.activeElement === v || g === "container") && ou(p); }); } } } function h() { const p = b(n); if (p) { p.removeEventListener(pk, l); const v = new CustomEvent(fk, { ...aF, detail: { focusReason: o.value } }); p.addEventListener(fk, u), p.dispatchEvent(v), !v.defaultPrevented && (o.value == "keyboard" || !U8e() || p.contains(document.activeElement)) && ou(r ?? document.body), p.removeEventListener(fk, u), uF.remove(i); } } return nt(() => { e.trapped && f(), be(() => e.trapped, (p) => { p ? f() : h(); }); }), kt(() => { 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 K8e(e, t, n, r, a, o) { return he(e.$slots, "default", { handleKeydown: e.onKeydown }); } var wz = /* @__PURE__ */ Mt(W8e, [["render", K8e], ["__file", "focus-trap.vue"]]); const G8e = ["fixed", "absolute"], X8e = Vt({ boundariesPadding: { type: Number, default: 0 }, fallbackPlacements: { type: gt(Array), default: void 0 }, gpuAcceleration: { type: Boolean, default: !0 }, offset: { type: Number, default: 12 }, placement: { type: String, values: Gg, default: "bottom" }, popperOptions: { type: gt(Object), default: () => ({}) }, strategy: { type: String, values: G8e, default: "absolute" } }), xz = Vt({ ...X8e, id: String, style: { type: gt([String, Array, Object]) }, className: { type: gt([String, Array, Object]) }, effect: { type: gt(String), default: "dark" }, visible: Boolean, enterable: { type: Boolean, default: !0 }, pure: Boolean, focusOnShow: { type: Boolean, default: !1 }, trapping: { type: Boolean, default: !1 }, popperClass: { type: gt([String, Array, Object]) }, popperStyle: { type: gt([String, Array, Object]) }, referenceEl: { type: gt(Object) }, triggerTargetEl: { type: gt(Object) }, stopPopperMouseEvent: { type: Boolean, default: !0 }, virtualTriggering: Boolean, zIndex: Number, ...cc(["ariaLabel"]) }), Y8e = { mouseenter: (e) => e instanceof MouseEvent, mouseleave: (e) => e instanceof MouseEvent, focus: () => !0, blur: () => !0, close: () => !0 }, Z8e = (e, t = []) => { const { placement: n, strategy: r, popperOptions: a } = e, o = { placement: n, strategy: r, ...a, modifiers: [...J8e(e), ...t] }; return eTe(o, a == null ? void 0 : a.modifiers), o; }, Q8e = (e) => { if (rr) return ps(e); }; function J8e(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 eTe(e, t) { t && (e.modifiers = [...e.modifiers, ...t ?? []]); } const tTe = 0, nTe = (e) => { const { popperInstanceRef: t, contentRef: n, triggerRef: r, role: a } = Te(L3, void 0), o = U(), i = U(), s = F(() => ({ name: "eventListeners", enabled: !!e.visible })), l = F(() => { var g; const y = b(o), x = (g = b(i)) != null ? g : tTe; return { name: "arrow", enabled: !A7(y), options: { element: y, padding: x } }; }), u = F(() => ({ onFirstUpdate: () => { p(); }, ...Z8e(e, [ b(l), b(s) ]) })), c = F(() => Q8e(e.referenceEl) || b(r)), { attributes: d, state: f, styles: h, update: p, forceUpdate: v, instanceRef: m } = N_e(c, n, u); return be(m, (g) => t.value = g), nt(() => { be(() => { var g; return (g = b(c)) == null ? void 0 : g.getBoundingClientRect(); }, () => { p(); }); }), { attributes: d, arrowRef: o, contentRef: n, instanceRef: m, state: f, styles: h, role: a, forceUpdate: v, update: p }; }, rTe = (e, { attributes: t, styles: n, role: r }) => { const { nextZIndex: a } = $3(), o = Lt("popper"), i = F(() => b(t).popper), s = U(Bn(e.zIndex) ? e.zIndex : a()), l = F(() => [ o.b(), o.is("pure", e.pure), o.is(e.effect), e.popperClass ]), u = F(() => [ { zIndex: b(s) }, b(n).popper, e.popperStyle || {} ]), c = F(() => r.value === "dialog" ? "false" : void 0), d = F(() => b(n).arrow || {}); return { ariaModal: c, arrowStyle: d, contentAttrs: i, contentClass: l, contentStyle: u, contentZIndex: s, updateZIndex: () => { s.value = Bn(e.zIndex) ? e.zIndex : a(); } }; }, aTe = (e, t) => { const n = U(!1), r = U(); return { focusStartRef: r, trapped: n, onFocusAfterReleased: (a) => { var o; ((o = a.detail) == null ? void 0 : o.focusReason) !== "pointer" && (r.value = "first", t("blur")); }, onFocusAfterTrapped: () => { t("focus"); }, onFocusInTrap: (a) => { e.visible && !n.value && (a.target && (r.value = a.target), n.value = !0); }, onFocusoutPrevented: (a) => { e.trapping || (a.detail.focusReason === "pointer" && a.preventDefault(), n.value = !1); }, onReleaseRequested: () => { n.value = !1, t("close"); } }; }, oTe = X({ name: "ElPopperContent" }), iTe = /* @__PURE__ */ X({ ...oTe, props: xz, emits: Y8e, setup(e, { expose: t, emit: n }) { const r = e, { focusStartRef: a, trapped: o, onFocusAfterReleased: i, onFocusAfterTrapped: s, onFocusInTrap: l, onFocusoutPrevented: u, onReleaseRequested: c } = aTe(r, n), { attributes: d, arrowRef: f, contentRef: h, styles: p, instanceRef: v, role: m, update: g } = nTe(r), { ariaModal: y, arrowStyle: x, contentAttrs: w, contentClass: k, contentStyle: C, updateZIndex: S } = rTe(r, { styles: p, attributes: d, role: m }), _ = Te(vb, void 0), T = U(); rt(hz, { arrowStyle: x, arrowRef: f, arrowOffset: T }), _ && rt(vb, { ..._, addInputId: vl, removeInputId: vl }); let O; const $ = (N = !0) => { g(), N && S(); }, A = () => { $(!1), r.visible && r.focusOnShow ? o.value = !0 : r.visible === !1 && (o.value = !1); }; return nt(() => { be(() => r.triggerTargetEl, (N, L) => { O == null || O(), O = void 0; const R = b(N || h.value), P = b(L || h.value); td(R) && (O = be([m, () => r.ariaLabel, y, () => r.id], (B) => { ["role", "aria-label", "aria-modal", "id"].forEach((M, z) => { Wg(B[z]) ? R.removeAttribute(M) : R.setAttribute(M, B[z]); }); }, { immediate: !0 })), P !== R && td(P) && ["role", "aria-label", "aria-modal", "id"].forEach((B) => { P.removeAttribute(B); }); }, { immediate: !0 }), be(() => r.visible, A, { immediate: !0 }); }), kt(() => { O == null || O(), O = void 0; }), t({ popperContentRef: h, popperInstanceRef: v, updatePopper: $, contentStyle: C }), (N, L) => (I(), j("div", Bt({ ref_key: "contentRef", ref: h }, b(w), { style: b(C), class: b(k), tabindex: "-1", onMouseenter: (R) => N.$emit("mouseenter", R), onMouseleave: (R) => N.$emit("mouseleave", R) }), [ ue(b(wz), { trapped: b(o), "trap-on-focus-in": !0, "focus-trap-el": b(h), "focus-start-el": b(a), onFocusAfterTrapped: b(s), onFocusAfterReleased: b(i), onFocusin: b(l), onFocusoutPrevented: b(u), onReleaseRequested: b(c) }, { default: K(() => [ he(N.$slots, "default") ]), _: 3 }, 8, ["trapped", "focus-trap-el", "focus-start-el", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusin", "onFocusoutPrevented", "onReleaseRequested"]) ], 16, ["onMouseenter", "onMouseleave"])); } }); var sTe = /* @__PURE__ */ Mt(iTe, [["__file", "content.vue"]]); const lTe = Er(O8e), B3 = Symbol("elTooltip"), Ya = Vt({ ...j_e, ...xz, appendTo: { type: gt([String, Object]) }, content: { type: String, default: "" }, rawContent: Boolean, persistent: Boolean, visible: { type: gt(Boolean), default: null }, transition: String, teleported: { type: Boolean, default: !0 }, disabled: Boolean, ...cc(["ariaLabel"]) }), z0 = Vt({ ...yz, disabled: Boolean, trigger: { type: gt([String, Array]), default: "hover" }, triggerKeys: { type: gt(Array), default: () => [$r.enter, $r.space] } }), { useModelToggleProps: uTe, useModelToggleEmits: cTe, useModelToggle: dTe } = IEe("visible"), pTe = Vt({ ...vz, ...uTe, ...Ya, ...z0, ...gz, showArrow: { type: Boolean, default: !0 } }), fTe = [ ...cTe, "before-show", "before-hide", "show", "hide", "open", "close" ], hTe = (e, t) => Ha(e) ? e.includes(t) : e === t, Op = (e, t, n) => (r) => { hTe(b(e), t) && n(r); }, vTe = X({ name: "ElTooltipTrigger" }), gTe = /* @__PURE__ */ X({ ...vTe, props: z0, setup(e, { expose: t }) { const n = e, r = Lt("tooltip"), { controlled: a, id: o, open: i, onOpen: s, onClose: l, onToggle: u } = Te(B3, void 0), c = U(null), d = () => { if (b(a) || n.disabled) return !0; }, f = It(n, "trigger"), h = Js(d, Op(f, "hover", s)), p = Js(d, Op(f, "hover", l)), v = Js(d, Op(f, "click", (w) => { w.button === 0 && u(w); })), m = Js(d, Op(f, "focus", s)), g = Js(d, Op(f, "focus", l)), y = Js(d, Op(f, "contextmenu", (w) => { w.preventDefault(), u(w); })), x = Js(d, (w) => { const { code: k } = w; n.triggerKeys.includes(k) && (w.preventDefault(), u(w)); }); return t({ triggerRef: c }), (w, k) => (I(), de(b(N8e), { id: b(o), "virtual-ref": w.virtualRef, open: b(i), "virtual-triggering": w.virtualTriggering, class: H(b(r).e("trigger")), onBlur: b(g), onClick: b(v), onContextmenu: b(y), onFocus: b(m), onMouseenter: b(h), onMouseleave: b(p), onKeydown: b(x) }, { default: K(() => [ he(w.$slots, "default") ]), _: 3 }, 8, ["id", "virtual-ref", "open", "virtual-triggering", "class", "onBlur", "onClick", "onContextmenu", "onFocus", "onMouseenter", "onMouseleave", "onKeydown"])); } }); var mTe = /* @__PURE__ */ Mt(gTe, [["__file", "trigger.vue"]]); const yTe = Vt({ to: { type: gt([String, Object]), required: !0 }, disabled: Boolean }), bTe = /* @__PURE__ */ X({ __name: "teleport", props: yTe, setup(e) { return (t, n) => t.disabled ? he(t.$slots, "default", { key: 0 }) : (I(), de(bg, { key: 1, to: t.to }, [ he(t.$slots, "default") ], 8, ["to"])); } }); var wTe = /* @__PURE__ */ Mt(bTe, [["__file", "teleport.vue"]]); const kz = Er(wTe), xTe = X({ name: "ElTooltipContent", inheritAttrs: !1 }), kTe = /* @__PURE__ */ X({ ...xTe, props: Ya, setup(e, { expose: t }) { const n = e, { selector: r } = rz(), a = Lt("tooltip"), o = U(null); let i; const { controlled: s, id: l, open: u, trigger: c, onClose: d, onOpen: f, onShow: h, onHide: p, onBeforeShow: v, onBeforeHide: m } = Te(B3, void 0), g = F(() => n.transition || `${a.namespace.value}-fade-in-linear`), y = F(() => process.env.NODE_ENV === "test" ? !0 : n.persistent); kt(() => { i == null || i(); }); const x = F(() => b(y) ? !0 : b(u)), w = F(() => n.disabled ? !1 : b(u)), k = F(() => n.appendTo || r.value), C = F(() => { var P; return (P = n.style) != null ? P : {}; }), S = U(!0), _ = () => { p(), S.value = !0; }, T = () => { if (b(s)) return !0; }, O = Js(T, () => { n.enterable && b(c) === "hover" && f(); }), $ = Js(T, () => { b(c) === "hover" && d(); }), A = () => { var P, B; (B = (P = o.value) == null ? void 0 : P.updatePopper) == null || B.call(P), v == null || v(); }, N = () => { m == null || m(); }, L = () => { h(), i = bke(F(() => { var P; return (P = o.value) == null ? void 0 : P.popperContentRef; }), () => { b(s) || b(c) !== "hover" && d(); }); }, R = () => { n.virtualTriggering || d(); }; return be(() => b(u), (P) => { P ? S.value = !1 : i == null || i(); }, { flush: "post" }), be(() => n.content, () => { var P, B; (B = (P = o.value) == null ? void 0 : P.updatePopper) == null || B.call(P); }), t({ contentRef: o }), (P, B) => (I(), de(b(kz), { disabled: !P.teleported, to: b(k) }, { default: K(() => [ ue(vr, { name: b(g), onAfterLeave: _, onBeforeEnter: A, onAfterEnter: L, onBeforeLeave: N }, { default: K(() => [ b(x) ? Xe((I(), de(b(sTe), Bt({ key: 0, id: b(l), ref_key: "contentRef", ref: o }, P.$attrs, { "aria-label": P.ariaLabel, "aria-hidden": S.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, b(C)], "reference-el": P.referenceEl, "trigger-target-el": P.triggerTargetEl, visible: b(w), "z-index": P.zIndex, onMouseenter: b(O), onMouseleave: b($), onBlur: R, onClose: b(d) }), { default: K(() => [ he(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"])), [ [mt, b(w)] ]) : ne("v-if", !0) ]), _: 3 }, 8, ["name"]) ]), _: 3 }, 8, ["disabled", "to"])); } }); var CTe = /* @__PURE__ */ Mt(kTe, [["__file", "content.vue"]]); const STe = X({ name: "ElTooltip" }), ETe = /* @__PURE__ */ X({ ...STe, props: pTe, emits: fTe, setup(e, { expose: t, emit: n }) { const r = e; V_e(); const a = Gu(), o = U(), i = U(), s = () => { var g; const y = b(o); y && ((g = y.popperInstanceRef) == null || g.update()); }, l = U(!1), u = U(), { show: c, hide: d, hasUpdateHandler: f } = dTe({ indicator: l, toggleReason: u }), { onOpen: h, onClose: p } = H_e({ showAfter: It(r, "showAfter"), hideAfter: It(r, "hideAfter"), autoClose: It(r, "autoClose"), open: c, close: d }), v = F(() => Ts(r.visible) && !f.value); rt(B3, { controlled: v, id: a, open: ih(l), trigger: It(r, "trigger"), onOpen: (g) => { h(g); }, onClose: (g) => { p(g); }, onToggle: (g) => { b(l) ? p(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 }), be(() => r.disabled, (g) => { g && l.value && (l.value = !1); }); const m = (g) => { var y, x; const w = (x = (y = i.value) == null ? void 0 : y.contentRef) == null ? void 0 : x.popperContentRef, k = (g == null ? void 0 : g.relatedTarget) || document.activeElement; return w && w.contains(k); }; return wg(() => l.value && d()), t({ popperRef: o, contentRef: i, isFocusInsideContent: m, updatePopper: s, onOpen: h, onClose: p, hide: d }), (g, y) => (I(), de(b(lTe), { ref_key: "popperRef", ref: o, role: g.role }, { default: K(() => [ ue(mTe, { disabled: g.disabled, trigger: g.trigger, "trigger-keys": g.triggerKeys, "virtual-ref": g.virtualRef, "virtual-triggering": g.virtualTriggering }, { default: K(() => [ g.$slots.default ? he(g.$slots, "default", { key: 0 }) : ne("v-if", !0) ]), _: 3 }, 8, ["disabled", "trigger", "trigger-keys", "virtual-ref", "virtual-triggering"]), ue(CTe, { 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: K(() => [ he(g.$slots, "content", {}, () => [ g.rawContent ? (I(), j("span", { key: 0, innerHTML: g.content }, null, 8, ["innerHTML"])) : (I(), j("span", { key: 1 }, Fe(g.content), 1)) ]), g.showArrow ? (I(), de(b(A8e), { key: 0, "arrow-offset": g.arrowOffset }, null, 8, ["arrow-offset"])) : ne("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 _Te = /* @__PURE__ */ Mt(ETe, [["__file", "tooltip.vue"]]); const gb = Er(_Te), Cz = Symbol("buttonGroupContextKey"), TTe = (e, t) => { nd({ from: "type.text", replacement: "link", version: "3.0.0", scope: "props", ref: "https://element-plus.org/en-US/component/button.html#button-attributes" }, F(() => e.type === "text")); const n = Te(Cz, void 0), r = fw("button"), { form: a } = dc(), o = Xu(F(() => n == null ? void 0 : n.size)), i = Yg(), s = U(), l = Cr(), u = F(() => e.type || (n == null ? void 0 : n.type) || ""), c = F(() => { var h, p, v; return (v = (p = e.autoInsertSpace) != null ? p : (h = r.value) == null ? void 0 : h.autoInsertSpace) != null ? v : !1; }), d = F(() => e.tag === "button" ? { ariaDisabled: i.value || e.loading, disabled: i.value || e.loading, autofocus: e.autofocus, type: e.nativeType } : {}), f = F(() => { var h; const p = (h = l.default) == null ? void 0 : h.call(l); if (c.value && (p == null ? void 0 : p.length) === 1) { const v = p[0]; if ((v == null ? void 0 : v.type) === Ps) { const m = v.children; return new RegExp("^\\p{Unified_Ideograph}{2}$", "u").test(m.trim()); } } return !1; }); return { _disabled: i, _size: o, _type: u, _ref: s, _props: d, shouldAddSpace: f, handleClick: (h) => { if (i.value || e.loading) { h.stopPropagation(); return; } e.nativeType === "reset" && (a == null || a.resetFields()), t("click", h); } }; }, OTe = [ "default", "primary", "success", "warning", "info", "danger", "text", "" ], $Te = ["button", "submit", "reset"], w5 = Vt({ size: Ml, disabled: Boolean, type: { type: String, values: OTe, default: "" }, icon: { type: li }, nativeType: { type: String, values: $Te, default: "button" }, loading: Boolean, loadingIcon: { type: li, default: () => uw }, 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: gt([String, Object]), default: "button" } }), FTe = { click: (e) => e instanceof MouseEvent }; function da(e, t) { ATe(e) && (e = "100%"); var n = ITe(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 c1(e) { return Math.min(1, Math.max(0, e)); } function ATe(e) { return typeof e == "string" && e.indexOf(".") !== -1 && parseFloat(e) === 1; } function ITe(e) { return typeof e == "string" && e.indexOf("%") !== -1; } function Sz(e) { return e = parseFloat(e), (isNaN(e) || e < 0 || e > 1) && (e = 1), e; } function d1(e) { return e <= 1 ? "".concat(Number(e) * 100, "%") : e; } function Hc(e) { return e.length === 1 ? "0" + e : String(e); } function PTe(e, t, n) { return { r: da(e, 255) * 255, g: da(t, 255) * 255, b: da(n, 255) * 255 }; } function dF(e, t, n) { e = da(e, 255), t = da(t, 255), n = da(n, 255); var r = Math.max(e, t, n), a = Math.min(e, t, n), o = 0, i = 0, s = (r + a) / 2; if (r === a) i = 0, o = 0; else { var l = r - a; switch (i = s > 0.5 ? l / (2 - r - a) : l / (r + a), r) { case e: o = (t - n) / l + (t < n ? 6 : 0); break; case t: o = (n - e) / l + 2; break; case n: o = (e - t) / l + 4; break; } o /= 6; } return { h: o, s: i, l: s }; } function hk(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 LTe(e, t, n) { var r, a, o; if (e = da(e, 360), t = da(t, 100), n = da(n, 100), t === 0) a = n, o = n, r = n; else { var i = n < 0.5 ? n * (1 + t) : n + t - n * t, s = 2 * n - i; r = hk(s, i, e + 1 / 3), a = hk(s, i, e), o = hk(s, i, e - 1 / 3); } return { r: r * 255, g: a * 255, b: o * 255 }; } function pF(e, t, n) { e = da(e, 255), t = da(t, 255), n = da(n, 255); var r = Math.max(e, t, n), a = Math.min(e, t, n), o = 0, i = r, s = r - a, l = r === 0 ? 0 : s / r; if (r === a) o = 0; else { switch (r) { case e: o = (t - n) / s + (t < n ? 6 : 0); break; case t: o = (n - e) / s + 2; break; case n: o = (e - t) / s + 4; break; } o /= 6; } return { h: o, s: l, v: i }; } function NTe(e, t, n) { e = da(e, 360) * 6, t = da(t, 100), n = da(n, 100); var r = Math.floor(e), a = e - r, o = n * (1 - t), i = n * (1 - a * t), s = n * (1 - (1 - a) * t), l = r % 6, u = [n, i, o, o, s, n][l], c = [s, n, n, i, o, o][l], d = [o, o, s, n, n, i][l]; return { r: u * 255, g: c * 255, b: d * 255 }; } function fF(e, t, n, r) { var a = [ Hc(Math.round(e).toString(16)), Hc(Math.round(t).toString(16)), Hc(Math.round(n).toString(16)) ]; return r && a[0].startsWith(a[0].charAt(1)) && a[1].startsWith(a[1].charAt(1)) && a[2].startsWith(a[2].charAt(1)) ? a[0].charAt(0) + a[1].charAt(0) + a[2].charAt(0) : a.join(""); } function MTe(e, t, n, r, a) { var o = [ Hc(Math.round(e).toString(16)), Hc(Math.round(t).toString(16)), Hc(Math.round(n).toString(16)), Hc(BTe(r)) ]; return a && o[0].startsWith(o[0].charAt(1)) && o[1].startsWith(o[1].charAt(1)) && o[2].startsWith(o[2].charAt(1)) && o[3].startsWith(o[3].charAt(1)) ? o[0].charAt(0) + o[1].charAt(0) + o[2].charAt(0) + o[3].charAt(0) : o.join(""); } function BTe(e) { return Math.round(parseFloat(e) * 255).toString(16); } function hF(e) { return Eo(e) / 255; } function Eo(e) { return parseInt(e, 16); } function DTe(e) { return { r: e >> 16, g: (e & 65280) >> 8, b: e & 255 }; } var x5 = { 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 RTe(e) { var t = { r: 0, g: 0, b: 0 }, n = 1, r = null, a = null, o = null, i = !1, s = !1; return typeof e == "string" && (e = jTe(e)), typeof e == "object" && (qs(e.r) && qs(e.g) && qs(e.b) ? (t = PTe(e.r, e.g, e.b), i = !0, s = String(e.r).substr(-1) === "%" ? "prgb" : "rgb") : qs(e.h) && qs(e.s) && qs(e.v) ? (r = d1(e.s), a = d1(e.v), t = NTe(e.h, r, a), i = !0, s = "hsv") : qs(e.h) && qs(e.s) && qs(e.l) && (r = d1(e.s), o = d1(e.l), t = LTe(e.h, r, o), i = !0, s = "hsl"), Object.prototype.hasOwnProperty.call(e, "a") && (n = e.a)), n = Sz(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 zTe = "[-\\+]?\\d+%?", VTe = "[-\\+]?\\d*\\.\\d+%?", _u = "(?:".concat(VTe, ")|(?:").concat(zTe, ")"), vk = "[\\s|\\(]+(".concat(_u, ")[,|\\s]+(").concat(_u, ")[,|\\s]+(").concat(_u, ")\\s*\\)?"), gk = "[\\s|\\(]+(".concat(_u, ")[,|\\s]+(").concat(_u, ")[,|\\s]+(").concat(_u, ")[,|\\s]+(").concat(_u, ")\\s*\\)?"), Ci = { CSS_UNIT: new RegExp(_u), rgb: new RegExp("rgb" + vk), rgba: new RegExp("rgba" + gk), hsl: new RegExp("hsl" + vk), hsla: new RegExp("hsla" + gk), hsv: new RegExp("hsv" + vk), 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 jTe(e) { if (e = e.trim().toLowerCase(), e.length === 0) return !1; var t = !1; if (x5[e]) e = x5[e], t = !0; else if (e === "transparent") return { r: 0, g: 0, b: 0, a: 0, format: "name" }; var n = Ci.rgb.exec(e); return n ? { r: n[1], g: n[2], b: n[3] } : (n = Ci.rgba.exec(e), n ? { r: n[1], g: n[2], b: n[3], a: n[4] } : (n = Ci.hsl.exec(e), n ? { h: n[1], s: n[2], l: n[3] } : (n = Ci.hsla.exec(e), n ? { h: n[1], s: n[2], l: n[3], a: n[4] } : (n = Ci.hsv.exec(e), n ? { h: n[1], s: n[2], v: n[3] } : (n = Ci.hsva.exec(e), n ? { h: n[1], s: n[2], v: n[3], a: n[4] } : (n = Ci.hex8.exec(e), n ? { r: Eo(n[1]), g: Eo(n[2]), b: Eo(n[3]), a: hF(n[4]), format: t ? "name" : "hex8" } : (n = Ci.hex6.exec(e), n ? { r: Eo(n[1]), g: Eo(n[2]), b: Eo(n[3]), format: t ? "name" : "hex" } : (n = Ci.hex4.exec(e), n ? { r: Eo(n[1] + n[1]), g: Eo(n[2] + n[2]), b: Eo(n[3] + n[3]), a: hF(n[4] + n[4]), format: t ? "name" : "hex8" } : (n = Ci.hex3.exec(e), n ? { r: Eo(n[1] + n[1]), g: Eo(n[2] + n[2]), b: Eo(n[3] + n[3]), format: t ? "name" : "hex" } : !1))))))))); } function qs(e) { return !!Ci.CSS_UNIT.exec(String(e)); } var HTe = ( /** @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 = DTe(t)), this.originalInput = t; var a = RTe(t); this.originalInput = t, this.r = a.r, this.g = a.g, this.b = a.b, this.a = a.a, this.roundA = Math.round(100 * this.a) / 100, this.format = (r = n.format) !== null && r !== void 0 ? r : a.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 = a.ok; } return e.prototype.isDark = function() { return this.getBrightness() < 128; }, e.prototype.isLight = function() { return !this.isDark(); }, e.prototype.getBrightness = function() { var t = this.toRgb(); return (t.r * 299 + t.g * 587 + t.b * 114) / 1e3; }, e.prototype.getLuminance = function() { var t = this.toRgb(), n, r, a, o = t.r / 255, i = t.g / 255, s = t.b / 255; return o <= 0.03928 ? n = o / 12.92 : n = Math.pow((o + 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 ? a = s / 12.92 : a = Math.pow((s + 0.055) / 1.055, 2.4), 0.2126 * n + 0.7152 * r + 0.0722 * a; }, e.prototype.getAlpha = function() { return this.a; }, e.prototype.setAlpha = function(t) { return this.a = Sz(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 = pF(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 = pF(this.r, this.g, this.b), n = Math.round(t.h * 360), r = Math.round(t.s * 100), a = Math.round(t.v * 100); return this.a === 1 ? "hsv(".concat(n, ", ").concat(r, "%, ").concat(a, "%)") : "hsva(".concat(n, ", ").concat(r, "%, ").concat(a, "%, ").concat(this.roundA, ")"); }, e.prototype.toHsl = function() { var t = dF(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 = dF(this.r, this.g, this.b), n = Math.round(t.h * 360), r = Math.round(t.s * 100), a = Math.round(t.l * 100); return this.a === 1 ? "hsl(".concat(n, ", ").concat(r, "%, ").concat(a, "%)") : "hsla(".concat(n, ", ").concat(r, "%, ").concat(a, "%, ").concat(this.roundA, ")"); }, e.prototype.toHex = function(t) { return t === void 0 && (t = !1), fF(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), MTe(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(da(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(da(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 = "#" + fF(this.r, this.g, this.b, !1), n = 0, r = Object.entries(x5); n < r.length; n++) { var a = r[n], o = a[0], i = a[1]; if (t === i) return o; } return !1; }, e.prototype.toString = function(t) { var n = !!t; t = t ?? this.format; var r = !1, a = this.a < 1 && this.a >= 0, o = !n && a && (t.startsWith("hex") || t === "name"); return o ? 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 = c1(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 = c1(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 = c1(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 = c1(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(), a = new e(t).toRgb(), o = n / 100, i = { r: (a.r - r.r) * o + r.r, g: (a.g - r.g) * o + r.g, b: (a.b - r.b) * o + r.b, a: (a.a - r.a) * o + 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(), a = 360 / n, o = [this]; for (r.h = (r.h - (a * t >> 1) + 720) % 360; --t; ) r.h = (r.h + a) % 360, o.push(new e(r)); return o; }, 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, a = n.s, o = n.v, i = [], s = 1 / t; t--; ) i.push(new e({ h: r, s: a, v: o })), o = (o + 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(), a = n.a + r.a * (1 - n.a); return new e({ r: (n.r * n.a + r.r * r.a * (1 - n.a)) / a, g: (n.g * n.a + r.g * r.a * (1 - n.a)) / a, b: (n.b * n.a + r.b * r.a * (1 - n.a)) / a, a }); }, e.prototype.triad = function() { return this.polyad(3); }, e.prototype.tetrad = function() { return this.polyad(4); }, e.prototype.polyad = function(t) { for (var n = this.toHsl(), r = n.h, a = [this], o = 360 / t, i = 1; i < t; i++) a.push(new e({ h: (r + i * o) % 360, s: n.s, l: n.l })); return a; }, e.prototype.equals = function(t) { return this.toRgbString() === new e(t).toRgbString(); }, e; }() ); function Gl(e, t = 20) { return e.mix("#141414", t).toString(); } function UTe(e) { const t = Yg(), n = Lt("button"); return F(() => { let r = {}, a = e.color; if (a) { const o = a.match(/var\((.*?)\)/); o && (a = window.getComputedStyle(window.document.documentElement).getPropertyValue(o[1])); const i = new HTe(a), s = e.dark ? i.tint(20).toString() : Gl(i, 20); if (e.plain) r = n.cssVarBlock({ "bg-color": e.dark ? Gl(i, 90) : i.tint(90).toString(), "text-color": a, "border-color": e.dark ? Gl(i, 50) : i.tint(50).toString(), "hover-text-color": `var(${n.cssVarName("color-white")})`, "hover-bg-color": a, "hover-border-color": a, "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 ? Gl(i, 90) : i.tint(90).toString(), r[n.cssVarBlockName("disabled-text-color")] = e.dark ? Gl(i, 50) : i.tint(50).toString(), r[n.cssVarBlockName("disabled-border-color")] = e.dark ? Gl(i, 80) : i.tint(80).toString()); else { const l = e.dark ? Gl(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": a, "text-color": u, "border-color": a, "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 ? Gl(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 qTe = X({ name: "ElButton" }), WTe = /* @__PURE__ */ X({ ...qTe, props: w5, emits: FTe, setup(e, { expose: t, emit: n }) { const r = e, a = UTe(r), o = Lt("button"), { _ref: i, _size: s, _type: l, _disabled: u, _props: c, shouldAddSpace: d, handleClick: f } = TTe(r, n), h = F(() => [ o.b(), o.m(l.value), o.m(s.value), o.is("disabled", u.value), o.is("loading", r.loading), o.is("plain", r.plain), o.is("round", r.round), o.is("circle", r.circle), o.is("text", r.text), o.is("link", r.link), o.is("has-bg", r.bg) ]); return t({ ref: i, size: s, type: l, disabled: u, shouldAddSpace: d }), (p, v) => (I(), de(ct(p.tag), Bt({ ref_key: "_ref", ref: i }, b(c), { class: b(h), style: b(a), onClick: b(f) }), { default: K(() => [ p.loading ? (I(), j(Qe, { key: 0 }, [ p.$slots.loading ? he(p.$slots, "loading", { key: 0 }) : (I(), de(b(er), { key: 1, class: H(b(o).is("loading")) }, { default: K(() => [ (I(), de(ct(p.loadingIcon))) ]), _: 1 }, 8, ["class"])) ], 64)) : p.icon || p.$slots.icon ? (I(), de(b(er), { key: 1 }, { default: K(() => [ p.icon ? (I(), de(ct(p.icon), { key: 0 })) : he(p.$slots, "icon", { key: 1 }) ]), _: 3 })) : ne("v-if", !0), p.$slots.default ? (I(), j("span", { key: 2, class: H({ [b(o).em("text", "expand")]: b(d) }) }, [ he(p.$slots, "default") ], 2)) : ne("v-if", !0) ]), _: 3 }, 16, ["class", "style", "onClick"])); } }); var KTe = /* @__PURE__ */ Mt(WTe, [["__file", "button.vue"]]); const GTe = { size: w5.size, type: w5.type }, XTe = X({ name: "ElButtonGroup" }), YTe = /* @__PURE__ */ X({ ...XTe, props: GTe, setup(e) { const t = e; rt(Cz, tn({ size: It(t, "size"), type: It(t, "type") })); const n = Lt("button"); return (r, a) => (I(), j("div", { class: H(b(n).b("group")) }, [ he(r.$slots, "default") ], 2)); } }); var Ez = /* @__PURE__ */ Mt(YTe, [["__file", "button-group.vue"]]); const Do = Er(KTe, { ButtonGroup: Ez }); Xi(Ez); var ZTe = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}; function QTe(e) { return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e; } const iu = /* @__PURE__ */ new Map(); if (rr) { let e; document.addEventListener("mousedown", (t) => e = t), document.addEventListener("mouseup", (t) => { if (e) { for (const n of iu.values()) for (const { documentHandler: r } of n) r(t, e); e = void 0; } }); } function vF(e, t) { let n = []; return Array.isArray(t.arg) ? n = t.arg : td(t.arg) && n.push(t.arg), function(r, a) { const o = t.instance.popperRef, i = r.target, s = a == null ? void 0 : a.target, l = !t || !t.instance, u = !i || !s, c = e.contains(i) || e.contains(s), d = e === i, f = n.length && n.some((p) => p == null ? void 0 : p.contains(i)) || n.length && n.includes(s), h = o && (o.contains(i) || o.contains(s)); l || u || c || d || f || h || t.value(r, a); }; } const _z = { beforeMount(e, t) { iu.has(e) || iu.set(e, []), iu.get(e).push({ documentHandler: vF(e, t), bindingFn: t.value }); }, updated(e, t) { iu.has(e) || iu.set(e, []); const n = iu.get(e), r = n.findIndex((o) => o.bindingFn === t.oldValue), a = { documentHandler: vF(e, t), bindingFn: t.value }; r >= 0 ? n.splice(r, 1, a) : n.push(a); }, unmounted(e) { iu.delete(e); } }, JTe = Vt({ header: { type: String, default: "" }, footer: { type: String, default: "" }, bodyStyle: { type: gt([String, Object, Array]), default: "" }, bodyClass: String, shadow: { type: String, values: ["always", "hover", "never"], default: "always" } }), e6e = X({ name: "ElCard" }), t6e = /* @__PURE__ */ X({ ...e6e, props: JTe, setup(e) { const t = Lt("card"); return (n, r) => (I(), j("div", { class: H([b(t).b(), b(t).is(`${n.shadow}-shadow`)]) }, [ n.$slots.header || n.header ? (I(), j("div", { key: 0, class: H(b(t).e("header")) }, [ he(n.$slots, "header", {}, () => [ et(Fe(n.header), 1) ]) ], 2)) : ne("v-if", !0), W("div", { class: H([b(t).e("body"), n.bodyClass]), style: Ye(n.bodyStyle) }, [ he(n.$slots, "default") ], 6), n.$slots.footer || n.footer ? (I(), j("div", { key: 1, class: H(b(t).e("footer")) }, [ he(n.$slots, "footer", {}, () => [ et(Fe(n.footer), 1) ]) ], 2)) : ne("v-if", !0) ], 2)); } }); var n6e = /* @__PURE__ */ Mt(t6e, [["__file", "card.vue"]]); const Tz = Er(n6e), Oz = { 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: Ml, tabindex: [String, Number], validateEvent: { type: Boolean, default: !0 }, ...cc(["ariaControls"]) }, $z = { [cr]: (e) => lo(e) || Bn(e) || Ts(e), change: (e) => lo(e) || Bn(e) || Ts(e) }, Sh = Symbol("checkboxGroupContextKey"), r6e = ({ model: e, isChecked: t }) => { const n = Te(Sh, void 0), r = F(() => { var a, o; const i = (a = n == null ? void 0 : n.max) == null ? void 0 : a.value, s = (o = n == null ? void 0 : n.min) == null ? void 0 : o.value; return !dl(i) && e.value.length >= i && !t.value || !dl(s) && e.value.length <= s && t.value; }); return { isDisabled: Yg(F(() => (n == null ? void 0 : n.disabled.value) || r.value)), isLimitDisabled: r }; }, a6e = (e, { model: t, isLimitExceeded: n, hasOwnLabel: r, isDisabled: a, isLabeledByFormItem: o }) => { const i = Te(Sh, void 0), { formItem: s } = dc(), { emit: l } = tt(); function u(p) { var v, m, g, y; return [!0, e.trueValue, e.trueLabel].includes(p) ? (m = (v = e.trueValue) != null ? v : e.trueLabel) != null ? m : !0 : (y = (g = e.falseValue) != null ? g : e.falseLabel) != null ? y : !1; } function c(p, v) { l("change", u(p), v); } function d(p) { if (n.value) return; const v = p.target; l("change", u(v.checked), p); } async function f(p) { n.value || !r.value && !a.value && o.value && (p.composedPath().some((v) => v.tagName === "LABEL") || (t.value = u([!1, e.falseValue, e.falseLabel].includes(t.value)), await Ue(), c(t.value, p))); } const h = F(() => (i == null ? void 0 : i.validateEvent) || e.validateEvent); return be(() => e.modelValue, () => { h.value && (s == null || s.validate("change").catch((p) => yr(p))); }), { handleChange: d, onClickRoot: f }; }, o6e = (e) => { const t = U(!1), { emit: n } = tt(), r = Te(Sh, void 0), a = F(() => dl(r) === !1), o = U(!1), i = F({ get() { var s, l; return a.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; a.value && Ha(s) ? (o.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, o.value === !1 && ((u = r == null ? void 0 : r.changeEvent) == null || u.call(r, s))) : (n(cr, s), t.value = s); } }); return { model: i, isGroup: a, isLimitExceeded: o }; }, i6e = (e, t, { model: n }) => { const r = Te(Sh, void 0), a = U(!1), o = F(() => M0(e.value) ? e.label : e.value), i = F(() => { const c = n.value; return Ts(c) ? c : Ha(c) ? Kr(o.value) ? c.map(bo).some((d) => ms(d, o.value)) : c.map(bo).includes(o.value) : c != null ? c === e.trueValue || c === e.trueLabel : !!c; }), s = Xu(F(() => { var c; return (c = r == null ? void 0 : r.size) == null ? void 0 : c.value; }), { prop: !0 }), l = Xu(F(() => { var c; return (c = r == null ? void 0 : r.size) == null ? void 0 : c.value; })), u = F(() => !!t.default || !M0(o.value)); return { checkboxButtonSize: s, isChecked: i, isFocused: a, checkboxSize: l, hasOwnLabel: u, actualValue: o }; }, Fz = (e, t) => { const { formItem: n } = dc(), { model: r, isGroup: a, isLimitExceeded: o } = o6e(e), { isFocused: i, isChecked: s, checkboxButtonSize: l, checkboxSize: u, hasOwnLabel: c, actualValue: d } = i6e(e, t, { model: r }), { isDisabled: f } = r6e({ model: r, isChecked: s }), { inputId: h, isLabeledByFormItem: p } = Zg(e, { formItemContext: n, disableIdGeneration: c, disableIdManagement: a }), { handleChange: v, onClickRoot: m } = a6e(e, { model: r, isLimitExceeded: o, hasOwnLabel: c, isDisabled: f, isLabeledByFormItem: p }); return (() => { function g() { var y, x; Ha(r.value) && !r.value.includes(d.value) ? r.value.push(d.value) : r.value = (x = (y = e.trueValue) != null ? y : e.trueLabel) != null ? x : !0; } e.checked && g(); })(), nd({ from: "label act as value", replacement: "value", version: "3.0.0", scope: "el-checkbox", ref: "https://element-plus.org/en-US/component/checkbox.html" }, F(() => a.value && M0(e.value))), nd({ from: "true-label", replacement: "true-value", version: "3.0.0", scope: "el-checkbox", ref: "https://element-plus.org/en-US/component/checkbox.html" }, F(() => !!e.trueLabel)), nd({ from: "false-label", replacement: "false-value", version: "3.0.0", scope: "el-checkbox", ref: "https://element-plus.org/en-US/component/checkbox.html" }, F(() => !!e.falseLabel)), { inputId: h, isLabeledByFormItem: p, isChecked: s, isDisabled: f, isFocused: i, checkboxButtonSize: l, checkboxSize: u, hasOwnLabel: c, model: r, actualValue: d, handleChange: v, onClickRoot: m }; }, s6e = X({ name: "ElCheckbox" }), l6e = /* @__PURE__ */ X({ ...s6e, props: Oz, emits: $z, setup(e) { const t = e, n = Cr(), { inputId: r, isLabeledByFormItem: a, isChecked: o, isDisabled: i, isFocused: s, checkboxSize: l, hasOwnLabel: u, model: c, actualValue: d, handleChange: f, onClickRoot: h } = Fz(t, n), p = Lt("checkbox"), v = F(() => [ p.b(), p.m(l.value), p.is("disabled", i.value), p.is("bordered", t.border), p.is("checked", o.value) ]), m = F(() => [ p.e("input"), p.is("disabled", i.value), p.is("checked", o.value), p.is("indeterminate", t.indeterminate), p.is("focus", s.value) ]); return (g, y) => (I(), de(ct(!b(u) && b(a) ? "span" : "label"), { class: H(b(v)), "aria-controls": g.indeterminate ? g.ariaControls : null, onClick: b(h) }, { default: K(() => { var x, w, k, C; return [ W("span", { class: H(b(m)) }, [ g.trueValue || g.falseValue || g.trueLabel || g.falseLabel ? Xe((I(), j("input", { key: 0, id: b(r), "onUpdate:modelValue": (S) => ar(c) ? c.value = S : null, class: H(b(p).e("original")), type: "checkbox", indeterminate: g.indeterminate, name: g.name, tabindex: g.tabindex, disabled: b(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: b(f), onFocus: (S) => s.value = !0, onBlur: (S) => s.value = !1, onClick: Je(() => { }, ["stop"]) }, null, 42, ["id", "onUpdate:modelValue", "indeterminate", "name", "tabindex", "disabled", "true-value", "false-value", "onChange", "onFocus", "onBlur", "onClick"])), [ [ti, b(c)] ]) : Xe((I(), j("input", { key: 1, id: b(r), "onUpdate:modelValue": (S) => ar(c) ? c.value = S : null, class: H(b(p).e("original")), type: "checkbox", indeterminate: g.indeterminate, disabled: b(i), value: b(d), name: g.name, tabindex: g.tabindex, onChange: b(f), onFocus: (S) => s.value = !0, onBlur: (S) => s.value = !1, onClick: Je(() => { }, ["stop"]) }, null, 42, ["id", "onUpdate:modelValue", "indeterminate", "disabled", "value", "name", "tabindex", "onChange", "onFocus", "onBlur", "onClick"])), [ [ti, b(c)] ]), W("span", { class: H(b(p).e("inner")) }, null, 2) ], 2), b(u) ? (I(), j("span", { key: 0, class: H(b(p).e("label")) }, [ he(g.$slots, "default"), g.$slots.default ? ne("v-if", !0) : (I(), j(Qe, { key: 0 }, [ et(Fe(g.label), 1) ], 64)) ], 2)) : ne("v-if", !0) ]; }), _: 3 }, 8, ["class", "aria-controls", "onClick"])); } }); var u6e = /* @__PURE__ */ Mt(l6e, [["__file", "checkbox.vue"]]); const c6e = X({ name: "ElCheckboxButton" }), d6e = /* @__PURE__ */ X({ ...c6e, props: Oz, emits: $z, setup(e) { const t = e, n = Cr(), { isFocused: r, isChecked: a, isDisabled: o, checkboxButtonSize: i, model: s, actualValue: l, handleChange: u } = Fz(t, n), c = Te(Sh, void 0), d = Lt("checkbox"), f = F(() => { var p, v, m, g; const y = (v = (p = c == null ? void 0 : c.fill) == null ? void 0 : p.value) != null ? v : ""; return { backgroundColor: y, borderColor: y, color: (g = (m = c == null ? void 0 : c.textColor) == null ? void 0 : m.value) != null ? g : "", boxShadow: y ? `-1px 0 0 0 ${y}` : void 0 }; }), h = F(() => [ d.b("button"), d.bm("button", i.value), d.is("disabled", o.value), d.is("checked", a.value), d.is("focus", r.value) ]); return (p, v) => { var m, g, y, x; return I(), j("label", { class: H(b(h)) }, [ p.trueValue || p.falseValue || p.trueLabel || p.falseLabel ? Xe((I(), j("input", { key: 0, "onUpdate:modelValue": (w) => ar(s) ? s.value = w : null, class: H(b(d).be("button", "original")), type: "checkbox", name: p.name, tabindex: p.tabindex, disabled: b(o), "true-value": (g = (m = p.trueValue) != null ? m : p.trueLabel) != null ? g : !0, "false-value": (x = (y = p.falseValue) != null ? y : p.falseLabel) != null ? x : !1, onChange: b(u), onFocus: (w) => r.value = !0, onBlur: (w) => r.value = !1, onClick: Je(() => { }, ["stop"]) }, null, 42, ["onUpdate:modelValue", "name", "tabindex", "disabled", "true-value", "false-value", "onChange", "onFocus", "onBlur", "onClick"])), [ [ti, b(s)] ]) : Xe((I(), j("input", { key: 1, "onUpdate:modelValue": (w) => ar(s) ? s.value = w : null, class: H(b(d).be("button", "original")), type: "checkbox", name: p.name, tabindex: p.tabindex, disabled: b(o), value: b(l), onChange: b(u), onFocus: (w) => r.value = !0, onBlur: (w) => r.value = !1, onClick: Je(() => { }, ["stop"]) }, null, 42, ["onUpdate:modelValue", "name", "tabindex", "disabled", "value", "onChange", "onFocus", "onBlur", "onClick"])), [ [ti, b(s)] ]), p.$slots.default || p.label ? (I(), j("span", { key: 2, class: H(b(d).be("button", "inner")), style: Ye(b(a) ? b(f) : void 0) }, [ he(p.$slots, "default", {}, () => [ et(Fe(p.label), 1) ]) ], 6)) : ne("v-if", !0) ], 2); }; } }); var Az = /* @__PURE__ */ Mt(d6e, [["__file", "checkbox-button.vue"]]); const p6e = Vt({ modelValue: { type: gt(Array), default: () => [] }, disabled: Boolean, min: Number, max: Number, size: Ml, fill: String, textColor: String, tag: { type: String, default: "div" }, validateEvent: { type: Boolean, default: !0 }, ...cc(["ariaLabel"]) }), f6e = { [cr]: (e) => Ha(e), change: (e) => Ha(e) }, h6e = X({ name: "ElCheckboxGroup" }), v6e = /* @__PURE__ */ X({ ...h6e, props: p6e, emits: f6e, setup(e, { emit: t }) { const n = e, r = Lt("checkbox"), { formItem: a } = dc(), { inputId: o, isLabeledByFormItem: i } = Zg(n, { formItemContext: a }), s = async (u) => { t(cr, u), await Ue(), t("change", u); }, l = F({ get() { return n.modelValue; }, set(u) { s(u); } }); return rt(Sh, { ...I7(Sr(n), [ "size", "min", "max", "disabled", "validateEvent", "fill", "textColor" ]), modelValue: l, changeEvent: s }), be(() => n.modelValue, () => { n.validateEvent && (a == null || a.validate("change").catch((u) => yr(u))); }), (u, c) => { var d; return I(), de(ct(u.tag), { id: b(o), class: H(b(r).b("group")), role: "group", "aria-label": b(i) ? void 0 : u.ariaLabel || "checkbox-group", "aria-labelledby": b(i) ? (d = b(a)) == null ? void 0 : d.labelId : void 0 }, { default: K(() => [ he(u.$slots, "default") ]), _: 3 }, 8, ["id", "class", "aria-label", "aria-labelledby"]); }; } }); var Iz = /* @__PURE__ */ Mt(v6e, [["__file", "checkbox-group.vue"]]); const g6e = Er(u6e, { CheckboxButton: Az, CheckboxGroup: Iz }); Xi(Az); Xi(Iz); const Pz = Vt({ modelValue: { type: [String, Number, Boolean], default: void 0 }, size: Ml, disabled: Boolean, label: { type: [String, Number, Boolean], default: void 0 }, value: { type: [String, Number, Boolean], default: void 0 }, name: { type: String, default: void 0 } }), m6e = Vt({ ...Pz, border: Boolean }), Lz = { [cr]: (e) => lo(e) || Bn(e) || Ts(e), [Ed]: (e) => lo(e) || Bn(e) || Ts(e) }, Nz = Symbol("radioGroupKey"), Mz = (e, t) => { const n = U(), r = Te(Nz, void 0), a = F(() => !!r), o = F(() => M0(e.value) ? e.label : e.value), i = F({ get() { return a.value ? r.modelValue : e.modelValue; }, set(d) { a.value ? r.changeEvent(d) : t && t(cr, d), n.value.checked = e.modelValue === o.value; } }), s = Xu(F(() => r == null ? void 0 : r.size)), l = Yg(F(() => r == null ? void 0 : r.disabled)), u = U(!1), c = F(() => l.value || a.value && i.value !== o.value ? -1 : 0); return nd({ from: "label act as value", replacement: "value", version: "3.0.0", scope: "el-radio", ref: "https://element-plus.org/en-US/component/radio.html" }, F(() => a.value && M0(e.value))), { radioRef: n, isGroup: a, radioGroup: r, focus: u, size: s, disabled: l, tabIndex: c, modelValue: i, actualValue: o }; }, y6e = X({ name: "ElRadio" }), b6e = /* @__PURE__ */ X({ ...y6e, props: m6e, emits: Lz, setup(e, { emit: t }) { const n = e, r = Lt("radio"), { radioRef: a, radioGroup: o, focus: i, size: s, disabled: l, modelValue: u, actualValue: c } = Mz(n, t); function d() { Ue(() => t("change", u.value)); } return (f, h) => { var p; return I(), j("label", { class: H([ b(r).b(), b(r).is("disabled", b(l)), b(r).is("focus", b(i)), b(r).is("bordered", f.border), b(r).is("checked", b(u) === b(c)), b(r).m(b(s)) ]) }, [ W("span", { class: H([ b(r).e("input"), b(r).is("disabled", b(l)), b(r).is("checked", b(u) === b(c)) ]) }, [ Xe(W("input", { ref_key: "radioRef", ref: a, "onUpdate:modelValue": (v) => ar(u) ? u.value = v : null, class: H(b(r).e("original")), value: b(c), name: f.name || ((p = b(o)) == null ? void 0 : p.name), disabled: b(l), checked: b(u) === b(c), type: "radio", onFocus: (v) => i.value = !0, onBlur: (v) => i.value = !1, onChange: d, onClick: Je(() => { }, ["stop"]) }, null, 42, ["onUpdate:modelValue", "value", "name", "disabled", "checked", "onFocus", "onBlur", "onClick"]), [ [NP, b(u)] ]), W("span", { class: H(b(r).e("inner")) }, null, 2) ], 2), W("span", { class: H(b(r).e("label")), onKeydown: Je(() => { }, ["stop"]) }, [ he(f.$slots, "default", {}, () => [ et(Fe(f.label), 1) ]) ], 42, ["onKeydown"]) ], 2); }; } }); var w6e = /* @__PURE__ */ Mt(b6e, [["__file", "radio.vue"]]); const x6e = Vt({ ...Pz }), k6e = X({ name: "ElRadioButton" }), C6e = /* @__PURE__ */ X({ ...k6e, props: x6e, setup(e) { const t = e, n = Lt("radio"), { radioRef: r, focus: a, size: o, disabled: i, modelValue: s, radioGroup: l, actualValue: u } = Mz(t), c = F(() => ({ 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, f) => { var h; return I(), j("label", { class: H([ b(n).b("button"), b(n).is("active", b(s) === b(u)), b(n).is("disabled", b(i)), b(n).is("focus", b(a)), b(n).bm("button", b(o)) ]) }, [ Xe(W("input", { ref_key: "radioRef", ref: r, "onUpdate:modelValue": (p) => ar(s) ? s.value = p : null, class: H(b(n).be("button", "original-radio")), value: b(u), type: "radio", name: d.name || ((h = b(l)) == null ? void 0 : h.name), disabled: b(i), onFocus: (p) => a.value = !0, onBlur: (p) => a.value = !1, onClick: Je(() => { }, ["stop"]) }, null, 42, ["onUpdate:modelValue", "value", "name", "disabled", "onFocus", "onBlur", "onClick"]), [ [NP, b(s)] ]), W("span", { class: H(b(n).be("button", "inner")), style: Ye(b(s) === b(u) ? b(c) : {}), onKeydown: Je(() => { }, ["stop"]) }, [ he(d.$slots, "default", {}, () => [ et(Fe(d.label), 1) ]) ], 46, ["onKeydown"]) ], 2); }; } }); var Bz = /* @__PURE__ */ Mt(C6e, [["__file", "radio-button.vue"]]); const S6e = Vt({ id: { type: String, default: void 0 }, size: Ml, 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 }, ...cc(["ariaLabel"]) }), E6e = Lz, _6e = X({ name: "ElRadioGroup" }), T6e = /* @__PURE__ */ X({ ..._6e, props: S6e, emits: E6e, setup(e, { emit: t }) { const n = e, r = Lt("radio"), a = Gu(), o = U(), { formItem: i } = dc(), { inputId: s, isLabeledByFormItem: l } = Zg(n, { formItemContext: i }), u = (d) => { t(cr, d), Ue(() => t("change", d)); }; nt(() => { const d = o.value.querySelectorAll("[type=radio]"), f = d[0]; !Array.from(d).some((h) => h.checked) && f && (f.tabIndex = 0); }); const c = F(() => n.name || a.value); return rt(Nz, tn({ ...Sr(n), changeEvent: u, name: c })), be(() => n.modelValue, () => { n.validateEvent && (i == null || i.validate("change").catch((d) => yr(d))); }), (d, f) => (I(), j("div", { id: b(s), ref_key: "radioGroupRef", ref: o, class: H(b(r).b("group")), role: "radiogroup", "aria-label": b(l) ? void 0 : d.ariaLabel || "radio-group", "aria-labelledby": b(l) ? b(i).labelId : void 0 }, [ he(d.$slots, "default") ], 10, ["id", "aria-label", "aria-labelledby"])); } }); var Dz = /* @__PURE__ */ Mt(T6e, [["__file", "radio-group.vue"]]); const O6e = Er(w6e, { RadioButton: Bz, RadioGroup: Dz }); Xi(Dz); Xi(Bz); var $6e = X({ name: "NodeContent", setup() { return { ns: Lt("cascader-node") }; }, render() { const { ns: e } = this, { node: t, panel: n } = this.$parent, { data: r, label: a } = t, { renderLabelFn: o } = n; return sn("span", { class: e.e("label") }, o ? o({ node: t, data: r }) : a); } }); const D3 = Symbol(), F6e = X({ name: "ElCascaderNode", components: { ElCheckbox: g6e, ElRadio: O6e, NodeContent: $6e, ElIcon: er, Check: B7, Loading: uw, ArrowRight: sw }, props: { node: { type: Object, required: !0 }, menuId: String }, emits: ["expand"], setup(e, { emit: t }) { const n = Te(D3), r = Lt("cascader-node"), a = F(() => n.isHoverMenu), o = F(() => n.config.multiple), i = F(() => n.config.checkStrictly), s = F(() => { var C; return (C = n.checkedNodes[0]) == null ? void 0 : C.uid; }), l = F(() => e.node.isDisabled), u = F(() => e.node.isLeaf), c = F(() => i.value && !u.value || !l.value), d = F(() => h(n.expandingNode)), f = F(() => i.value && n.checkedNodes.some(h)), h = (C) => { var S; const { level: _, uid: T } = e.node; return ((S = C == null ? void 0 : C.pathNodes[_ - 1]) == null ? void 0 : S.uid) === T; }, p = () => { d.value || n.expandNode(e.node); }, v = (C) => { const { node: S } = e; C !== S.checked && n.handleCheckChange(S, C); }, m = () => { n.lazyLoad(e.node, () => { u.value || p(); }); }, g = (C) => { a.value && (y(), !u.value && t("expand", C)); }, y = () => { const { node: C } = e; !c.value || C.loading || (C.loaded ? p() : m()); }, x = () => { a.value && !u.value || (u.value && !l.value && !i.value && !o.value ? k(!0) : y()); }, w = (C) => { i.value ? (v(C), e.node.loaded && p()) : k(C); }, k = (C) => { e.node.loaded ? (v(C), !i.value && p()) : m(); }; return { panel: n, isHoverMenu: a, multiple: o, checkStrictly: i, checkedNodeId: s, isDisabled: l, isLeaf: u, expandable: c, inExpandingPath: d, inCheckedPath: f, ns: r, handleHoverExpand: g, handleExpand: y, handleClick: x, handleCheck: k, handleSelectCheck: w }; } }); function A6e(e, t, n, r, a, o) { const i = lt("el-checkbox"), s = lt("el-radio"), l = lt("check"), u = lt("el-icon"), c = lt("node-content"), d = lt("loading"), f = lt("arrow-right"); return I(), j("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 }, [ ne(" prefix "), e.multiple ? (I(), de(i, { key: 0, "model-value": e.node.checked, indeterminate: e.node.indeterminate, disabled: e.isDisabled, onClick: Je(() => { }, ["stop"]), "onUpdate:modelValue": e.handleSelectCheck }, null, 8, ["model-value", "indeterminate", "disabled", "onClick", "onUpdate:modelValue"])) : e.checkStrictly ? (I(), de(s, { key: 1, "model-value": e.checkedNodeId, label: e.node.uid, disabled: e.isDisabled, "onUpdate:modelValue": e.handleSelectCheck, onClick: Je(() => { }, ["stop"]) }, { default: K(() => [ ne(` Add an empty element to avoid render label, do not use empty fragment here for https://github.com/vuejs/vue-next/pull/2485 `), W("span") ]), _: 1 }, 8, ["model-value", "label", "disabled", "onUpdate:modelValue", "onClick"])) : e.isLeaf && e.node.checked ? (I(), de(u, { key: 2, class: H(e.ns.e("prefix")) }, { default: K(() => [ ue(l) ]), _: 1 }, 8, ["class"])) : ne("v-if", !0), ne(" content "), ue(c), ne(" postfix "), e.isLeaf ? ne("v-if", !0) : (I(), j(Qe, { key: 3 }, [ e.node.loading ? (I(), de(u, { key: 0, class: H([e.ns.is("loading"), e.ns.e("postfix")]) }, { default: K(() => [ ue(d) ]), _: 1 }, 8, ["class"])) : (I(), de(u, { key: 1, class: H(["arrow-right", e.ns.e("postfix")]) }, { default: K(() => [ ue(f) ]), _: 1 }, 8, ["class"])) ], 64)) ], 42, ["id", "aria-haspopup", "aria-owns", "aria-expanded", "tabindex", "onMouseenter", "onFocus", "onClick"]); } var I6e = /* @__PURE__ */ Mt(F6e, [["render", A6e], ["__file", "node.vue"]]); const P6e = X({ name: "ElCascaderMenu", components: { Loading: uw, ElIcon: er, ElScrollbar: P3, ElCascaderNode: I6e }, props: { nodes: { type: Array, required: !0 }, index: { type: Number, required: !0 } }, setup(e) { const t = tt(), n = Lt("cascader-menu"), { t: r } = vi(), a = Gu(); let o = null, i = null; const s = Te(D3), l = U(null), u = F(() => !e.nodes.length), c = F(() => !s.initialLoaded), d = F(() => `${a.value}-${e.index}`), f = (m) => { o = m.target; }, h = (m) => { if (!(!s.isHoverMenu || !o || !l.value)) if (o.contains(m.target)) { p(); const g = t.vnode.el, { left: y } = g.getBoundingClientRect(), { offsetWidth: x, offsetHeight: w } = g, k = m.clientX - y, C = o.offsetTop, S = C + o.offsetHeight; l.value.innerHTML = ` `; } else i || (i = window.setTimeout(v, s.config.hoverThreshold)); }, p = () => { i && (clearTimeout(i), i = null); }, v = () => { l.value && (l.value.innerHTML = "", p()); }; return { ns: n, panel: s, hoverZone: l, isEmpty: u, isLoading: c, menuId: d, t: r, handleExpand: f, handleMouseMove: h, clearHoverZone: v }; } }); function L6e(e, t, n, r, a, o) { const i = lt("el-cascader-node"), s = lt("loading"), l = lt("el-icon"), u = lt("el-scrollbar"); return I(), de(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: K(() => { var c; return [ (I(!0), j(Qe, null, Nt(e.nodes, (d) => (I(), de(i, { key: d.uid, node: d, "menu-id": e.menuId, onExpand: e.handleExpand }, null, 8, ["node", "menu-id", "onExpand"]))), 128)), e.isLoading ? (I(), j("div", { key: 0, class: H(e.ns.e("empty-text")) }, [ ue(l, { size: "14", class: H(e.ns.is("loading")) }, { default: K(() => [ ue(s) ]), _: 1 }, 8, ["class"]), et(" " + Fe(e.t("el.cascader.loading")), 1) ], 2)) : e.isEmpty ? (I(), j("div", { key: 1, class: H(e.ns.e("empty-text")) }, [ he(e.$slots, "empty", {}, () => [ et(Fe(e.t("el.cascader.noData")), 1) ]) ], 2)) : (c = e.panel) != null && c.isHoverMenu ? (I(), j("svg", { key: 2, ref: "hoverZone", class: H(e.ns.e("hover-zone")) }, null, 2)) : ne("v-if", !0) ]; }), _: 3 }, 8, ["class", "wrap-class", "view-class", "onMousemove", "onMouseleave"]); } var N6e = /* @__PURE__ */ Mt(P6e, [["render", L6e], ["__file", "menu.vue"]]); let M6e = 0; const B6e = (e) => { const t = [e]; let { parent: n } = e; for (; n; ) t.unshift(n), n = n.parent; return t; }; class Rf { constructor(t, n, r, a = !1) { this.data = t, this.config = n, this.parent = r, this.root = a, this.uid = M6e++, this.checked = !1, this.indeterminate = !1, this.loading = !1; const { value: o, label: i, children: s } = n, l = t[s], u = B6e(this); this.level = a ? 0 : r ? r.level + 1 : 1, this.value = t[o], 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 Rf(c, n, this)), this.loaded = !n.lazy || this.isLeaf || !h5(l); } get isDisabled() { const { data: t, parent: n, config: r } = this, { disabled: a, checkStrictly: o } = r; return (Lr(a) ? a(t, this) : !!t[a]) || !o && (n == null ? void 0 : n.isDisabled); } get isLeaf() { const { data: t, config: n, childrenData: r, loaded: a } = this, { lazy: o, leaf: i } = n, s = Lr(i) ? i(t, this) : t[i]; return dl(s) ? o && !a ? !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, a = new Rf(t, this.config, this); return Array.isArray(n) ? n.push(t) : this.childrenData = [t], r.push(a), a; } calcText(t, n) { const r = t ? this.pathLabels.join(n) : this.label; return this.text = r, r; } broadcast(t, ...n) { const r = `onParent${P$(t)}`; this.children.forEach((a) => { a && (a.broadcast(t, ...n), a[r] && a[r](...n)); }); } emit(t, ...n) { const { parent: r } = this, a = `onChild${P$(t)}`; r && (r[a] && r[a](...n), r.emit(t, ...n)); } onParentCheck(t) { this.isDisabled || this.setCheckState(t); } onChildCheck() { const { children: t } = this, n = t.filter((a) => !a.isDisabled), r = n.length ? n.every((a) => a.checked) : !1; this.setCheckState(r); } setCheckState(t) { const n = this.children.length, r = this.children.reduce((a, o) => { const i = o.checked ? 1 : o.indeterminate ? 0.5 : 0; return a + i; }, 0); this.checked = this.loaded && this.children.filter((a) => !a.isDisabled).every((a) => a.loaded && a.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 k5 = (e, t) => e.reduce((n, r) => (r.isLeaf ? n.push(r) : (!t && n.push(r), n = n.concat(k5(r.children, t))), n), []); class gF { constructor(t, n) { this.config = n; const r = (t || []).map((a) => new Rf(a, this.config)); this.nodes = r, this.allNodes = k5(r, !1), this.leafNodes = k5(r, !0); } getNodes() { return this.nodes; } getFlattedNodes(t) { return t ? this.leafNodes : this.allNodes; } appendNode(t, n) { const r = n ? n.appendChild(t) : new Rf(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) => ms(r.value, t) || ms(r.pathValues, t)) || null; } getSameNode(t) { return t && this.getFlattedNodes(!1).find(({ value: n, level: r }) => ms(t.value, n) && t.level === r) || null; } } const Rz = Vt({ modelValue: { type: gt([Number, String, Array]) }, options: { type: gt(Array), default: () => [] }, props: { type: gt(Object), default: () => ({}) } }), D6e = { expandTrigger: "click", multiple: !1, checkStrictly: !1, emitPath: !0, lazy: !1, lazyLoad: vl, value: "value", label: "label", children: "children", leaf: "leaf", disabled: "disabled", hoverThreshold: 500 }, R6e = (e) => F(() => ({ ...D6e, ...e.props })), mF = (e) => { if (!e) return 0; const t = e.id.split("-"); return Number(t[t.length - 2]); }, z6e = (e) => { if (!e) return; const t = e.querySelector("input"); t ? t.click() : r7(e) && e.click(); }, V6e = (e, t) => { const n = t.slice(0), r = n.map((o) => o.uid), a = e.reduce((o, i) => { const s = r.indexOf(i.uid); return s > -1 && (o.push(i), n.splice(s, 1), r.splice(s, 1)), o; }, []); return a.push(...n), a; }, j6e = X({ name: "ElCascaderPanel", components: { ElCascaderMenu: N6e }, props: { ...Rz, border: { type: Boolean, default: !0 }, renderLabel: Function }, emits: [cr, Ed, "close", "expand-change"], setup(e, { emit: t, slots: n }) { let r = !1; const a = Lt("cascader"), o = R6e(e); let i = null; const s = U(!0), l = U([]), u = U(null), c = U([]), d = U(null), f = U([]), h = F(() => o.value.expandTrigger === "hover"), p = F(() => e.renderLabel || n.default), v = () => { const { options: A } = e, N = o.value; r = !1, i = new gF(A, N), c.value = [i.getNodes()], N.lazy && h5(e.options) ? (s.value = !1, m(void 0, (L) => { L && (i = new gF(L, N), c.value = [i.getNodes()]), s.value = !0, _(!1, !0); })) : _(!1, !0); }, m = (A, N) => { const L = o.value; A = A || new Rf({}, L, void 0, !0), A.loading = !0; const R = (P) => { const B = A, M = B.root ? null : B; P && (i == null || i.appendNodes(P, M)), B.loading = !1, B.loaded = !0, B.childrenData = B.childrenData || [], N && N(P); }; L.lazyLoad(A, R); }, g = (A, N) => { var L; const { level: R } = A, P = c.value.slice(0, R); let B; A.isLeaf ? B = A.pathNodes[R - 2] : (B = A, P.push(A.children)), ((L = d.value) == null ? void 0 : L.uid) !== (B == null ? void 0 : B.uid) && (d.value = A, c.value = P, !N && t("expand-change", (A == null ? void 0 : A.pathValues) || [])); }, y = (A, N, L = !0) => { const { checkStrictly: R, multiple: P } = o.value, B = f.value[0]; r = !0, !P && (B == null || B.doCheck(!1)), A.doCheck(N), S(), L && !P && !R && t("close"), !L && !P && !R && x(A); }, x = (A) => { A && (A = A.parent, x(A), A && g(A)); }, w = (A) => i == null ? void 0 : i.getFlattedNodes(A), k = (A) => { var N; return (N = w(A)) == null ? void 0 : N.filter((L) => L.checked !== !1); }, C = () => { f.value.forEach((A) => A.doCheck(!1)), S(), c.value = c.value.slice(0, 1), d.value = null, t("expand-change", []); }, S = () => { var A; const { checkStrictly: N, multiple: L } = o.value, R = f.value, P = k(!N), B = V6e(R, P), M = B.map((z) => z.valueByOption); f.value = B, u.value = L ? M : (A = M[0]) != null ? A : null; }, _ = (A = !1, N = !1) => { const { modelValue: L } = e, { lazy: R, multiple: P, checkStrictly: B } = o.value, M = !B; if (!(!s.value || r || !N && ms(L, u.value))) if (R && !A) { const z = D$(B3e(R$(L))).map((Z) => i == null ? void 0 : i.getNodeByValue(Z)).filter((Z) => !!Z && !Z.loaded && !Z.loading); z.length ? z.forEach((Z) => { m(Z, () => _(!1, N)); }) : _(!0, N); } else { const z = P ? R$(L) : [L], Z = D$(z.map((G) => i == null ? void 0 : i.getNodeByValue(G, M))); T(Z, N), u.value = E7(L); } }, T = (A, N = !0) => { const { checkStrictly: L } = o.value, R = f.value, P = A.filter((z) => !!z && (L || z.isLeaf)), B = i == null ? void 0 : i.getSameNode(d.value), M = N && B || P[0]; M ? M.pathNodes.forEach((z) => g(z, !0)) : d.value = null, R.forEach((z) => z.doCheck(!1)), tn(P).forEach((z) => z.doCheck(!0)), f.value = P, Ue(O); }, O = () => { rr && l.value.forEach((A) => { const N = A == null ? void 0 : A.$el; if (N) { const L = N.querySelector(`.${a.namespace.value}-scrollbar__wrap`), R = N.querySelector(`.${a.b("node")}.${a.is("active")}`) || N.querySelector(`.${a.b("node")}.in-active-path`); M7(L, R); } }); }, $ = (A) => { const N = A.target, { code: L } = A; switch (L) { case $r.up: case $r.down: { A.preventDefault(); const R = L === $r.up ? -1 : 1; sy(a7(N, R, `.${a.b("node")}[tabindex="-1"]`)); break; } case $r.left: { A.preventDefault(); const R = l.value[mF(N) - 1], P = R == null ? void 0 : R.$el.querySelector(`.${a.b("node")}[aria-expanded="true"]`); sy(P); break; } case $r.right: { A.preventDefault(); const R = l.value[mF(N) + 1], P = R == null ? void 0 : R.$el.querySelector(`.${a.b("node")}[tabindex="-1"]`); sy(P); break; } case $r.enter: z6e(N); break; } }; return rt(D3, tn({ config: o, expandingNode: d, checkedNodes: f, isHoverMenu: h, initialLoaded: s, renderLabelFn: p, lazyLoad: m, expandNode: g, handleCheckChange: y })), be([o, () => e.options], v, { deep: !0, immediate: !0 }), be(() => e.modelValue, () => { r = !1, _(); }, { deep: !0 }), be(() => u.value, (A) => { ms(A, e.modelValue) || (t(cr, A), t(Ed, A)); }), UK(() => l.value = []), nt(() => !h5(e.modelValue) && _()), { ns: a, menuList: l, menus: c, checkedNodes: f, handleKeyDown: $, handleCheckChange: y, getFlattedNodes: w, getCheckedNodes: k, clearCheckedNodes: C, calculateCheckedValue: S, scrollToExpandingNode: O }; } }); function H6e(e, t, n, r, a, o) { const i = lt("el-cascader-menu"); return I(), j("div", { class: H([e.ns.b("panel"), e.ns.is("bordered", e.border)]), onKeydown: e.handleKeyDown }, [ (I(!0), j(Qe, null, Nt(e.menus, (s, l) => (I(), de(i, { key: l, ref_for: !0, ref: (u) => e.menuList[l] = u, index: l, nodes: [...s] }, { empty: K(() => [ he(e.$slots, "empty") ]), _: 2 }, 1032, ["index", "nodes"]))), 128)) ], 42, ["onKeydown"]); } var U6e = /* @__PURE__ */ Mt(j6e, [["render", H6e], ["__file", "index.vue"]]); const q6e = Er(U6e), V0 = Vt({ type: { type: String, values: ["primary", "success", "info", "warning", "danger"], default: "primary" }, closable: Boolean, disableTransitions: Boolean, hit: Boolean, color: String, size: { type: String, values: dw }, effect: { type: String, values: ["dark", "light", "plain"], default: "light" }, round: Boolean }), W6e = { close: (e) => e instanceof MouseEvent, click: (e) => e instanceof MouseEvent }, K6e = X({ name: "ElTag" }), G6e = /* @__PURE__ */ X({ ...K6e, props: V0, emits: W6e, setup(e, { emit: t }) { const n = e, r = Xu(), a = Lt("tag"), o = F(() => { const { type: u, hit: c, effect: d, closable: f, round: h } = n; return [ a.b(), a.is("closable", f), a.m(u || "primary"), a.m(r.value), a.m(d), a.is("hit", c), a.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 ? (I(), j("span", { key: 0, class: H(b(o)), style: Ye({ backgroundColor: u.color }), onClick: s }, [ W("span", { class: H(b(a).e("content")) }, [ he(u.$slots, "default") ], 2), u.closable ? (I(), de(b(er), { key: 0, class: H(b(a).e("close")), onClick: Je(i, ["stop"]) }, { default: K(() => [ ue(b(g5)) ]), _: 1 }, 8, ["class", "onClick"])) : ne("v-if", !0) ], 6)) : (I(), de(vr, { key: 1, name: `${b(a).namespace.value}-zoom-in-center`, appear: "", onVnodeMounted: l }, { default: K(() => [ W("span", { class: H(b(o)), style: Ye({ backgroundColor: u.color }), onClick: s }, [ W("span", { class: H(b(a).e("content")) }, [ he(u.$slots, "default") ], 2), u.closable ? (I(), de(b(er), { key: 0, class: H(b(a).e("close")), onClick: Je(i, ["stop"]) }, { default: K(() => [ ue(b(g5)) ]), _: 1 }, 8, ["class", "onClick"])) : ne("v-if", !0) ], 6) ]), _: 3 }, 8, ["name"])); } }); var X6e = /* @__PURE__ */ Mt(G6e, [["__file", "tag.vue"]]); const zf = Er(X6e), Y6e = Vt({ ...Rz, size: Ml, placeholder: String, disabled: Boolean, clearable: Boolean, filterable: Boolean, filterMethod: { type: gt(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: gt(Function), default: () => !0 }, placement: { type: gt(String), values: Gg, default: "bottom-start" }, fallbackPlacements: { type: gt(Array), default: ["bottom-start", "bottom", "top-start", "top", "right", "left"] }, popperClass: { type: String, default: "" }, teleported: Ya.teleported, tagType: { ...V0.type, default: "info" }, tagEffect: { ...V0.effect, default: "light" }, validateEvent: { type: Boolean, default: !0 }, persistent: { type: Boolean, default: !0 }, ...dz }), Z6e = { [cr]: (e) => !0, [Ed]: (e) => !0, focus: (e) => e instanceof FocusEvent, blur: (e) => e instanceof FocusEvent, clear: () => !0, visibleChange: (e) => Ts(e), expandChange: (e) => !!e, removeTag: (e) => !!e }, Q6e = "ElCascader", J6e = X({ name: Q6e }), eOe = /* @__PURE__ */ X({ ...J6e, props: Y6e, emits: Z6e, setup(e, { expose: t, emit: n }) { const r = e, a = { modifiers: [ { name: "arrowPosition", enabled: !0, phase: "main", fn: ({ state: me }) => { const { modifiersData: _e, placement: Ce } = me; ["right", "left", "bottom", "top"].includes(Ce) || (_e.arrow.x = 35); }, requires: ["arrow"] } ] }, o = oh(); let i = 0, s = 0; const l = Lt("cascader"), u = Lt("input"), { t: c } = vi(), { form: d, formItem: f } = dc(), { valueOnClear: h } = pz(r), { isComposing: p, handleComposition: v } = F3({ afterComposition(me) { var _e; const Ce = (_e = me.target) == null ? void 0 : _e.value; ze(Ce); } }), m = U(null), g = U(null), y = U(null), x = U(null), w = U(null), k = U(!1), C = U(!1), S = U(!1), _ = U(!1), T = U(""), O = U(""), $ = U([]), A = U([]), N = U([]), L = F(() => o.style), R = F(() => r.disabled || (d == null ? void 0 : d.disabled)), P = F(() => r.placeholder || c("el.cascader.placeholder")), B = F(() => O.value || $.value.length > 0 || p.value ? "" : P.value), M = Xu(), z = F(() => ["small"].includes(M.value) ? "small" : "default"), Z = F(() => !!r.props.multiple), G = F(() => !r.filterable || Z.value), J = F(() => Z.value ? O.value : T.value), se = F(() => { var me; return ((me = x.value) == null ? void 0 : me.checkedNodes) || []; }), ve = F(() => !r.clearable || R.value || S.value || !C.value ? !1 : !!se.value.length), ge = F(() => { const { showAllLevels: me, separator: _e } = r, Ce = se.value; return Ce.length ? Z.value ? "" : Ce[0].calcText(me, _e) : ""; }), oe = F(() => (f == null ? void 0 : f.validateState) || ""), ee = F({ get() { return E7(r.modelValue); }, set(me) { const _e = me ?? h.value; n(cr, _e), n(Ed, _e), r.validateEvent && (f == null || f.validate("change").catch((Ce) => yr(Ce))); } }), q = F(() => [ l.b(), l.m(M.value), l.is("disabled", R.value), o.class ]), Y = F(() => [ u.e("icon"), "icon-arrow-down", l.is("reverse", k.value) ]), te = F(() => l.is("focus", k.value || _.value)), we = F(() => { var me, _e; return (_e = (me = m.value) == null ? void 0 : me.popperRef) == null ? void 0 : _e.contentRef; }), Oe = (me) => { var _e, Ce, Le; R.value || (me = me ?? !k.value, me !== k.value && (k.value = me, (Ce = (_e = g.value) == null ? void 0 : _e.input) == null || Ce.setAttribute("aria-expanded", `${me}`), me ? (Ne(), Ue((Le = x.value) == null ? void 0 : Le.scrollToExpandingNode)) : r.filterable && V(), n("visibleChange", me))); }, Ne = () => { Ue(() => { var me; (me = m.value) == null || me.updatePopper(); }); }, xe = () => { S.value = !1; }, $e = (me) => { const { showAllLevels: _e, separator: Ce } = r; return { node: me, key: me.uid, text: me.calcText(_e, Ce), hitState: !1, closable: !R.value && !me.isDisabled, isCollapseTag: !1 }; }, Se = (me) => { var _e; const Ce = me.node; Ce.doCheck(!1), (_e = x.value) == null || _e.calculateCheckedValue(), n("removeTag", Ce.valueByOption); }, Pe = () => { if (!Z.value) return; const me = se.value, _e = [], Ce = []; if (me.forEach((Le) => Ce.push($e(Le))), A.value = Ce, me.length) { me.slice(0, r.maxCollapseTags).forEach((dt) => _e.push($e(dt))); const Le = me.slice(r.maxCollapseTags), yt = Le.length; yt && (r.collapseTags ? _e.push({ key: -1, text: `+ ${yt}`, closable: !1, isCollapseTag: !0 }) : Le.forEach((dt) => _e.push($e(dt)))); } $.value = _e; }, Me = () => { var me, _e; const { filterMethod: Ce, showAllLevels: Le, separator: yt } = r, dt = (_e = (me = x.value) == null ? void 0 : me.getFlattedNodes(!r.props.checkStrictly)) == null ? void 0 : _e.filter((_t) => _t.isDisabled ? !1 : (_t.calcText(Le, yt), Ce(_t, J.value))); Z.value && ($.value.forEach((_t) => { _t.hitState = !1; }), A.value.forEach((_t) => { _t.hitState = !1; })), S.value = !0, N.value = dt, Ne(); }, je = () => { var me; let _e; S.value && w.value ? _e = w.value.$el.querySelector(`.${l.e("suggestion-item")}`) : _e = (me = x.value) == null ? void 0 : me.$el.querySelector(`.${l.b("node")}[tabindex="-1"]`), _e && (_e.focus(), !S.value && _e.click()); }, Be = () => { var me, _e; const Ce = (me = g.value) == null ? void 0 : me.input, Le = y.value, yt = (_e = w.value) == null ? void 0 : _e.$el; if (!(!rr || !Ce)) { if (yt) { const dt = yt.querySelector(`.${l.e("suggestion-list")}`); dt.style.minWidth = `${Ce.offsetWidth}px`; } if (Le) { const { offsetHeight: dt } = Le, _t = $.value.length > 0 ? `${Math.max(dt + 6, i)}px` : `${i}px`; Ce.style.height = _t, Ne(); } } }, We = (me) => { var _e; return (_e = x.value) == null ? void 0 : _e.getCheckedNodes(me); }, qe = (me) => { Ne(), n("expandChange", me); }, Ge = (me) => { if (!p.value) switch (me.code) { case $r.enter: Oe(); break; case $r.down: Oe(!0), Ue(je), me.preventDefault(); break; case $r.esc: k.value === !0 && (me.preventDefault(), me.stopPropagation(), Oe(!1)); break; case $r.tab: Oe(!1); break; } }, E = () => { var me; (me = x.value) == null || me.clearCheckedNodes(), !k.value && r.filterable && V(), Oe(!1), n("clear"); }, V = () => { const { value: me } = ge; T.value = me, O.value = me; }, ie = (me) => { var _e, Ce; const { checked: Le } = me; Z.value ? (_e = x.value) == null || _e.handleCheckChange(me, !Le, !1) : (!Le && ((Ce = x.value) == null || Ce.handleCheckChange(me, !0, !1)), Oe(!1)); }, le = (me) => { const _e = me.target, { code: Ce } = me; switch (Ce) { case $r.up: case $r.down: { const Le = Ce === $r.up ? -1 : 1; sy(a7(_e, Le, `.${l.e("suggestion-item")}[tabindex="-1"]`)); break; } case $r.enter: _e.click(); break; } }, re = () => { const me = $.value, _e = me[me.length - 1]; s = O.value ? 0 : s + 1, !(!_e || !s || r.collapseTags && me.length > 1) && (_e.hitState ? Se(_e) : _e.hitState = !0); }, ke = (me) => { const _e = me.target, Ce = l.e("search-input"); _e.className === Ce && (_.value = !0), n("focus", me); }, fe = (me) => { _.value = !1, n("blur", me); }, Ee = F7(() => { const { value: me } = J; if (!me) return; const _e = r.beforeFilter(me); Nke(_e) ? _e.then(Me).catch(() => { }) : _e !== !1 ? Me() : xe(); }, r.debounce), ze = (me, _e) => { !k.value && Oe(!0), !(_e != null && _e.isComposing) && (me ? Ee() : xe()); }, Ve = (me) => Number.parseFloat(wke(u.cssVarName("input-height"), me).value) - 2; return be(S, Ne), be([se, R, () => r.collapseTags], Pe), be($, () => { Ue(() => Be()); }), be(M, async () => { await Ue(); const me = g.value.input; i = Ve(me) || i, Be(); }), be(ge, V, { immediate: !0 }), nt(() => { const me = g.value.input, _e = Ve(me); i = me.offsetHeight || _e, us(me, Be); }), t({ getCheckedNodes: We, cascaderPanelRef: x, togglePopperVisible: Oe, contentRef: we, presentText: ge }), (me, _e) => (I(), de(b(gb), { ref_key: "tooltipRef", ref: m, visible: k.value, teleported: me.teleported, "popper-class": [b(l).e("dropdown"), me.popperClass], "popper-options": a, "fallback-placements": me.fallbackPlacements, "stop-popper-mouse-event": !1, "gpu-acceleration": !1, placement: me.placement, transition: `${b(l).namespace.value}-zoom-in-top`, effect: "light", pure: "", persistent: me.persistent, onHide: xe }, { default: K(() => [ Xe((I(), j("div", { class: H(b(q)), style: Ye(b(L)), onClick: () => Oe(b(G) ? void 0 : !0), onKeydown: Ge, onMouseenter: (Ce) => C.value = !0, onMouseleave: (Ce) => C.value = !1 }, [ ue(b(hw), { ref_key: "input", ref: g, modelValue: T.value, "onUpdate:modelValue": (Ce) => T.value = Ce, placeholder: b(B), readonly: b(G), disabled: b(R), "validate-event": !1, size: b(M), class: H(b(te)), tabindex: b(Z) && me.filterable && !b(R) ? -1 : void 0, onCompositionstart: b(v), onCompositionupdate: b(v), onCompositionend: b(v), onFocus: ke, onBlur: fe, onInput: ze }, { suffix: K(() => [ b(ve) ? (I(), de(b(er), { key: "clear", class: H([b(u).e("icon"), "icon-circle-close"]), onClick: Je(E, ["stop"]) }, { default: K(() => [ ue(b(lw)) ]), _: 1 }, 8, ["class", "onClick"])) : (I(), de(b(er), { key: "arrow-down", class: H(b(Y)), onClick: Je((Ce) => Oe(), ["stop"]) }, { default: K(() => [ ue(b(y3)) ]), _: 1 }, 8, ["class", "onClick"])) ]), _: 1 }, 8, ["modelValue", "onUpdate:modelValue", "placeholder", "readonly", "disabled", "size", "class", "tabindex", "onCompositionstart", "onCompositionupdate", "onCompositionend"]), b(Z) ? (I(), j("div", { key: 0, ref_key: "tagWrapper", ref: y, class: H([ b(l).e("tags"), b(l).is("validate", !!b(oe)) ]) }, [ (I(!0), j(Qe, null, Nt($.value, (Ce) => (I(), de(b(zf), { key: Ce.key, type: me.tagType, size: b(z), effect: me.tagEffect, hit: Ce.hitState, closable: Ce.closable, "disable-transitions": "", onClose: (Le) => Se(Ce) }, { default: K(() => [ Ce.isCollapseTag === !1 ? (I(), j("span", { key: 0 }, Fe(Ce.text), 1)) : (I(), de(b(gb), { key: 1, disabled: k.value || !me.collapseTagsTooltip, "fallback-placements": ["bottom", "top", "right", "left"], placement: "bottom", effect: "light" }, { default: K(() => [ W("span", null, Fe(Ce.text), 1) ]), content: K(() => [ W("div", { class: H(b(l).e("collapse-tags")) }, [ (I(!0), j(Qe, null, Nt(A.value.slice(me.maxCollapseTags), (Le, yt) => (I(), j("div", { key: yt, class: H(b(l).e("collapse-tag")) }, [ (I(), de(b(zf), { key: Le.key, class: "in-tooltip", type: me.tagType, size: b(z), effect: me.tagEffect, hit: Le.hitState, closable: Le.closable, "disable-transitions": "", onClose: (dt) => Se(Le) }, { default: K(() => [ W("span", null, Fe(Le.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)), me.filterable && !b(R) ? Xe((I(), j("input", { key: 0, "onUpdate:modelValue": (Ce) => O.value = Ce, type: "text", class: H(b(l).e("search-input")), placeholder: b(ge) ? "" : b(P), onInput: (Ce) => ze(O.value, Ce), onClick: Je((Ce) => Oe(!0), ["stop"]), onKeydown: gn(re, ["delete"]), onCompositionstart: b(v), onCompositionupdate: b(v), onCompositionend: b(v), onFocus: ke, onBlur: fe }, null, 42, ["onUpdate:modelValue", "placeholder", "onInput", "onClick", "onKeydown", "onCompositionstart", "onCompositionupdate", "onCompositionend"])), [ [xg, O.value] ]) : ne("v-if", !0) ], 2)) : ne("v-if", !0) ], 46, ["onClick", "onMouseenter", "onMouseleave"])), [ [b(_z), () => Oe(!1), b(we)] ]) ]), content: K(() => [ Xe(ue(b(q6e), { ref_key: "cascaderPanelRef", ref: x, modelValue: b(ee), "onUpdate:modelValue": (Ce) => ar(ee) ? ee.value = Ce : null, options: me.options, props: r.props, border: !1, "render-label": me.$slots.default, onExpandChange: qe, onClose: (Ce) => me.$nextTick(() => Oe(!1)) }, { empty: K(() => [ he(me.$slots, "empty") ]), _: 3 }, 8, ["modelValue", "onUpdate:modelValue", "options", "props", "render-label", "onClose"]), [ [mt, !S.value] ]), me.filterable ? Xe((I(), de(b(P3), { key: 0, ref_key: "suggestionPanel", ref: w, tag: "ul", class: H(b(l).e("suggestion-panel")), "view-class": b(l).e("suggestion-list"), onKeydown: le }, { default: K(() => [ N.value.length ? (I(!0), j(Qe, { key: 0 }, Nt(N.value, (Ce) => (I(), j("li", { key: Ce.uid, class: H([ b(l).e("suggestion-item"), b(l).is("checked", Ce.checked) ]), tabindex: -1, onClick: (Le) => ie(Ce) }, [ W("span", null, Fe(Ce.text), 1), Ce.checked ? (I(), de(b(er), { key: 0 }, { default: K(() => [ ue(b(B7)) ]), _: 1 })) : ne("v-if", !0) ], 10, ["onClick"]))), 128)) : he(me.$slots, "empty", { key: 1 }, () => [ W("li", { class: H(b(l).e("empty-text")) }, Fe(b(c)("el.cascader.noMatch")), 3) ]) ]), _: 3 }, 8, ["class", "view-class"])), [ [mt, S.value] ]) : ne("v-if", !0) ]), _: 3 }, 8, ["visible", "teleported", "popper-class", "fallback-placements", "placement", "transition", "persistent"])); } }); var tOe = /* @__PURE__ */ Mt(eOe, [["__file", "cascader.vue"]]); const zz = Er(tOe), Vz = Symbol("rowContextKey"), nOe = [ "start", "center", "end", "space-around", "space-between", "space-evenly" ], rOe = ["top", "middle", "bottom"], aOe = Vt({ tag: { type: String, default: "div" }, gutter: { type: Number, default: 0 }, justify: { type: String, values: nOe, default: "start" }, align: { type: String, values: rOe } }), oOe = X({ name: "ElRow" }), iOe = /* @__PURE__ */ X({ ...oOe, props: aOe, setup(e) { const t = e, n = Lt("row"), r = F(() => t.gutter); rt(Vz, { gutter: r }); const a = F(() => { const i = {}; return t.gutter && (i.marginRight = i.marginLeft = `-${t.gutter / 2}px`), i; }), o = F(() => [ n.b(), n.is(`justify-${t.justify}`, t.justify !== "start"), n.is(`align-${t.align}`, !!t.align) ]); return (i, s) => (I(), de(ct(i.tag), { class: H(b(o)), style: Ye(b(a)) }, { default: K(() => [ he(i.$slots, "default") ]), _: 3 }, 8, ["class", "style"])); } }); var sOe = /* @__PURE__ */ Mt(iOe, [["__file", "row.vue"]]); const jz = Er(sOe), lOe = 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: gt([Number, Object]), default: () => bu({}) }, sm: { type: gt([Number, Object]), default: () => bu({}) }, md: { type: gt([Number, Object]), default: () => bu({}) }, lg: { type: gt([Number, Object]), default: () => bu({}) }, xl: { type: gt([Number, Object]), default: () => bu({}) } }), uOe = X({ name: "ElCol" }), cOe = /* @__PURE__ */ X({ ...uOe, props: lOe, setup(e) { const t = e, { gutter: n } = Te(Vz, { gutter: F(() => 0) }), r = Lt("col"), a = F(() => { const i = {}; return n.value && (i.paddingLeft = i.paddingRight = `${n.value / 2}px`), i; }), o = F(() => { const i = []; return ["span", "offset", "pull", "push"].forEach((s) => { const l = t[s]; Bn(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) => { Bn(t[s]) ? i.push(r.b(`${s}-${t[s]}`)) : Kr(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) => (I(), de(ct(i.tag), { class: H(b(o)), style: Ye(b(a)) }, { default: K(() => [ he(i.$slots, "default") ]), _: 3 }, 8, ["class", "style"])); } }); var dOe = /* @__PURE__ */ Mt(cOe, [["__file", "col.vue"]]); const Hz = Er(dOe), pOe = X({ name: "ElContainer" }), fOe = /* @__PURE__ */ X({ ...pOe, props: { direction: { type: String } }, setup(e) { const t = e, n = Cr(), r = Lt("container"), a = F(() => t.direction === "vertical" ? !0 : t.direction === "horizontal" ? !1 : n && n.default ? n.default().some((o) => { const i = o.type.name; return i === "ElHeader" || i === "ElFooter"; }) : !1); return (o, i) => (I(), j("section", { class: H([b(r).b(), b(r).is("vertical", b(a))]) }, [ he(o.$slots, "default") ], 2)); } }); var hOe = /* @__PURE__ */ Mt(fOe, [["__file", "container.vue"]]); const vOe = X({ name: "ElAside" }), gOe = /* @__PURE__ */ X({ ...vOe, props: { width: { type: String, default: null } }, setup(e) { const t = e, n = Lt("aside"), r = F(() => t.width ? n.cssVarBlock({ width: t.width }) : {}); return (a, o) => (I(), j("aside", { class: H(b(n).b()), style: Ye(b(r)) }, [ he(a.$slots, "default") ], 6)); } }); var Uz = /* @__PURE__ */ Mt(gOe, [["__file", "aside.vue"]]); const mOe = X({ name: "ElFooter" }), yOe = /* @__PURE__ */ X({ ...mOe, props: { height: { type: String, default: null } }, setup(e) { const t = e, n = Lt("footer"), r = F(() => t.height ? n.cssVarBlock({ height: t.height }) : {}); return (a, o) => (I(), j("footer", { class: H(b(n).b()), style: Ye(b(r)) }, [ he(a.$slots, "default") ], 6)); } }); var qz = /* @__PURE__ */ Mt(yOe, [["__file", "footer.vue"]]); const bOe = X({ name: "ElHeader" }), wOe = /* @__PURE__ */ X({ ...bOe, props: { height: { type: String, default: null } }, setup(e) { const t = e, n = Lt("header"), r = F(() => t.height ? n.cssVarBlock({ height: t.height }) : {}); return (a, o) => (I(), j("header", { class: H(b(n).b()), style: Ye(b(r)) }, [ he(a.$slots, "default") ], 6)); } }); var Wz = /* @__PURE__ */ Mt(wOe, [["__file", "header.vue"]]); const xOe = X({ name: "ElMain" }), kOe = /* @__PURE__ */ X({ ...xOe, setup(e) { const t = Lt("main"); return (n, r) => (I(), j("main", { class: H(b(t).b()) }, [ he(n.$slots, "default") ], 2)); } }); var Kz = /* @__PURE__ */ Mt(kOe, [["__file", "main.vue"]]); const COe = Er(hOe, { Aside: Uz, Footer: qz, Header: Wz, Main: Kz }); Xi(Uz); Xi(qz); Xi(Wz); Xi(Kz); const SOe = Vt({ mask: { type: Boolean, default: !0 }, customMaskEvent: Boolean, overlayClass: { type: gt([ String, Array, Object ]) }, zIndex: { type: gt([String, Number]) } }), EOe = { click: (e) => e instanceof MouseEvent }, _Oe = "overlay"; var TOe = X({ name: "ElOverlay", props: SOe, emits: EOe, setup(e, { slots: t, emit: n }) { const r = Lt(_Oe), a = (l) => { n("click", l); }, { onClick: o, onMousedown: i, onMouseup: s } = B_e(e.customMaskEvent ? void 0 : a); return () => e.mask ? ue("div", { class: [r.b(), e.overlayClass], style: { zIndex: e.zIndex }, onClick: o, onMousedown: i, onMouseup: s }, [he(t, "default")], uy.STYLE | uy.CLASS | uy.PROPS, ["onClick", "onMouseup", "onMousedown"]) : sn("div", { class: e.overlayClass, style: { zIndex: e.zIndex, position: "fixed", top: "0px", right: "0px", bottom: "0px", left: "0px" } }, [he(t, "default")]); } }); const OOe = TOe, $Oe = Vt({ center: Boolean, alignCenter: Boolean, closeIcon: { type: li }, draggable: Boolean, overflow: Boolean, fullscreen: Boolean, showClose: { type: Boolean, default: !0 }, title: { type: String, default: "" }, ariaLevel: { type: String, default: "2" } }), FOe = Vt({ ...$Oe, appendToBody: Boolean, appendTo: { type: gt([String, Object]), default: "body" }, beforeClose: { type: gt(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" } }), AOe = { open: () => !0, opened: () => !0, close: () => !0, closed: () => !0, [cr]: (e) => Ts(e), openAutoFocus: () => !0, closeAutoFocus: () => !0 }, IOe = (e, t) => { var n; const r = tt().emit, { nextZIndex: a } = $3(); let o = ""; const i = Gu(), s = Gu(), l = U(!1), u = U(!1), c = U(!1), d = U((n = e.zIndex) != null ? n : a()); let f, h; const p = fw("namespace", Gv), v = F(() => { const L = {}, R = `--${p.value}-dialog`; return e.fullscreen || (e.top && (L[`${R}-margin-top`] = e.top), e.width && (L[`${R}-width`] = Pf(e.width))), L; }), m = F(() => e.alignCenter ? { display: "flex" } : {}); function g() { r("opened"); } function y() { r("closed"), r(cr, !1), e.destroyOnClose && (c.value = !1); } function x() { r("close"); } function w() { h == null || h(), f == null || f(), e.openDelay && e.openDelay > 0 ? { stop: f } = GO(() => _(), e.openDelay) : _(); } function k() { f == null || f(), h == null || h(), e.closeDelay && e.closeDelay > 0 ? { stop: h } = GO(() => T(), e.closeDelay) : T(); } function C() { function L(R) { R || (u.value = !0, l.value = !1); } e.beforeClose ? e.beforeClose(L) : k(); } function S() { e.closeOnClickModal && C(); } function _() { rr && (l.value = !0); } function T() { l.value = !1; } function O() { r("openAutoFocus"); } function $() { r("closeAutoFocus"); } function A(L) { var R; ((R = L.detail) == null ? void 0 : R.focusReason) === "pointer" && L.preventDefault(); } e.lockScroll && $Ee(l); function N() { e.closeOnPressEscape && C(); } return be(() => e.modelValue, (L) => { L ? (u.value = !1, w(), c.value = !0, d.value = A7(e.zIndex) ? a() : d.value++, Ue(() => { r("open"), t.value && (t.value.scrollTop = 0); })) : l.value && k(); }), be(() => e.fullscreen, (L) => { t.value && (L ? (o = t.value.style.transform, t.value.style.transform = "") : t.value.style.transform = o); }), nt(() => { e.modelValue && (l.value = !0, c.value = !0, w()); }), { afterEnter: g, afterLeave: y, beforeLeave: x, handleClose: C, onModalClick: S, close: k, doClose: T, onOpenAutoFocus: O, onCloseAutoFocus: $, onCloseRequested: N, onFocusoutPrevented: A, titleId: i, bodyId: s, closed: u, style: v, overlayDialogStyle: m, rendered: c, visible: l, zIndex: d }; }, POe = Vt({ ...FOe, 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" } }), LOe = AOe, NOe = X({ name: "ElDrawer", inheritAttrs: !1 }), MOe = /* @__PURE__ */ X({ ...NOe, props: POe, emits: LOe, setup(e, { expose: t }) { const n = e, r = Cr(); nd({ 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" }, F(() => !!r.title)); const a = U(), o = U(), i = Lt("drawer"), { t: s } = vi(), { afterEnter: l, afterLeave: u, beforeLeave: c, visible: d, rendered: f, titleId: h, bodyId: p, zIndex: v, onModalClick: m, onOpenAutoFocus: g, onCloseAutoFocus: y, onFocusoutPrevented: x, onCloseRequested: w, handleClose: k } = IOe(n, a), C = F(() => n.direction === "rtl" || n.direction === "ltr"), S = F(() => Pf(n.size)); return t({ handleClose: k, afterEnter: l, afterLeave: u }), (_, T) => (I(), de(b(kz), { to: _.appendTo, disabled: _.appendTo !== "body" ? !1 : !_.appendToBody }, { default: K(() => [ ue(vr, { name: b(i).b("fade"), onAfterEnter: b(l), onAfterLeave: b(u), onBeforeLeave: b(c), persisted: "" }, { default: K(() => [ Xe(ue(b(OOe), { mask: _.modal, "overlay-class": _.modalClass, "z-index": b(v), onClick: b(m) }, { default: K(() => [ ue(b(wz), { loop: "", trapped: b(d), "focus-trap-el": a.value, "focus-start-el": o.value, onFocusAfterTrapped: b(g), onFocusAfterReleased: b(y), onFocusoutPrevented: b(x), onReleaseRequested: b(w) }, { default: K(() => [ W("div", Bt({ ref_key: "drawerRef", ref: a, "aria-modal": "true", "aria-label": _.title || void 0, "aria-labelledby": _.title ? void 0 : b(h), "aria-describedby": b(p) }, _.$attrs, { class: [b(i).b(), _.direction, b(d) && "open"], style: b(C) ? "width: " + b(S) : "height: " + b(S), role: "dialog", onClick: Je(() => { }, ["stop"]) }), [ W("span", { ref_key: "focusStartRef", ref: o, class: H(b(i).e("sr-focus")), tabindex: "-1" }, null, 2), _.withHeader ? (I(), j("header", { key: 0, class: H(b(i).e("header")) }, [ _.$slots.title ? he(_.$slots, "title", { key: 1 }, () => [ ne(" DEPRECATED SLOT ") ]) : he(_.$slots, "header", { key: 0, close: b(k), titleId: b(h), titleClass: b(i).e("title") }, () => [ _.$slots.title ? ne("v-if", !0) : (I(), j("span", { key: 0, id: b(h), role: "heading", "aria-level": _.headerAriaLevel, class: H(b(i).e("title")) }, Fe(_.title), 11, ["id", "aria-level"])) ]), _.showClose ? (I(), j("button", { key: 2, "aria-label": b(s)("el.drawer.close"), class: H(b(i).e("close-btn")), type: "button", onClick: b(k) }, [ ue(b(er), { class: H(b(i).e("close")) }, { default: K(() => [ ue(b(g5)) ]), _: 1 }, 8, ["class"]) ], 10, ["aria-label", "onClick"])) : ne("v-if", !0) ], 2)) : ne("v-if", !0), b(f) ? (I(), j("div", { key: 1, id: b(p), class: H(b(i).e("body")) }, [ he(_.$slots, "default") ], 10, ["id"])) : ne("v-if", !0), _.$slots.footer ? (I(), j("div", { key: 2, class: H(b(i).e("footer")) }, [ he(_.$slots, "footer") ], 2)) : ne("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"]), [ [mt, b(d)] ]) ]), _: 3 }, 8, ["name", "onAfterEnter", "onAfterLeave", "onBeforeLeave"]) ]), _: 3 }, 8, ["to", "disabled"])); } }); var BOe = /* @__PURE__ */ Mt(MOe, [["__file", "drawer.vue"]]); const R3 = Er(BOe), DOe = /* @__PURE__ */ X({ inheritAttrs: !1 }); function ROe(e, t, n, r, a, o) { return he(e.$slots, "default"); } var zOe = /* @__PURE__ */ Mt(DOe, [["render", ROe], ["__file", "collection.vue"]]); const VOe = /* @__PURE__ */ X({ name: "ElCollectionItem", inheritAttrs: !1 }); function jOe(e, t, n, r, a, o) { return he(e.$slots, "default"); } var HOe = /* @__PURE__ */ Mt(VOe, [["render", jOe], ["__file", "collection-item.vue"]]); const UOe = "data-el-collection-item", qOe = (e) => { const t = `El${e}Collection`, n = `${t}Item`, r = Symbol(t), a = Symbol(n), o = { ...zOe, name: t, setup() { const s = U(null), l = /* @__PURE__ */ new Map(); rt(r, { itemMap: l, getItems: () => { const u = b(s); if (!u) return []; const c = Array.from(u.querySelectorAll(`[${UOe}]`)); return [...l.values()].sort((d, f) => c.indexOf(d.ref) - c.indexOf(f.ref)); }, collectionRef: s }); } }, i = { ...HOe, name: n, setup(s, { attrs: l }) { const u = U(null), c = Te(r, void 0); rt(a, { collectionItemRef: u }), nt(() => { const d = b(u); d && c.itemMap.set(d, { ref: d, ...l }); }), kt(() => { const d = b(u); c.itemMap.delete(d); }); } }; return { COLLECTION_INJECTION_KEY: r, COLLECTION_ITEM_INJECTION_KEY: a, ElCollection: o, ElCollectionItem: i }; }, mk = Vt({ trigger: z0.trigger, effect: { ...Ya.effect, default: "light" }, type: { type: gt(String) }, placement: { type: gt(String), default: "bottom" }, popperOptions: { type: gt(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: gt([Number, String]), default: 0 }, maxHeight: { type: gt([Number, String]), default: "" }, popperClass: { type: String, default: "" }, disabled: Boolean, role: { type: String, default: "menu" }, buttonProps: { type: gt(Object) }, teleported: Ya.teleported }); Vt({ command: { type: [Object, String, Number], default: () => ({}) }, disabled: Boolean, divided: Boolean, textValue: String, icon: { type: li } }); Vt({ onKeydown: { type: gt(Function) } }); qOe("Dropdown"); const Gz = Symbol("elPaginationKey"), WOe = Vt({ disabled: Boolean, currentPage: { type: Number, default: 1 }, prevText: { type: String }, prevIcon: { type: li } }), KOe = { click: (e) => e instanceof MouseEvent }, GOe = X({ name: "ElPaginationPrev" }), XOe = /* @__PURE__ */ X({ ...GOe, props: WOe, emits: KOe, setup(e) { const t = e, { t: n } = vi(), r = F(() => t.disabled || t.currentPage <= 1); return (a, o) => (I(), j("button", { type: "button", class: "btn-prev", disabled: b(r), "aria-label": a.prevText || b(n)("el.pagination.prev"), "aria-disabled": b(r), onClick: (i) => a.$emit("click", i) }, [ a.prevText ? (I(), j("span", { key: 0 }, Fe(a.prevText), 1)) : (I(), de(b(er), { key: 1 }, { default: K(() => [ (I(), de(ct(a.prevIcon))) ]), _: 1 })) ], 8, ["disabled", "aria-label", "aria-disabled", "onClick"])); } }); var YOe = /* @__PURE__ */ Mt(XOe, [["__file", "prev.vue"]]); const ZOe = Vt({ disabled: Boolean, currentPage: { type: Number, default: 1 }, pageCount: { type: Number, default: 50 }, nextText: { type: String }, nextIcon: { type: li } }), QOe = X({ name: "ElPaginationNext" }), JOe = /* @__PURE__ */ X({ ...QOe, props: ZOe, emits: ["click"], setup(e) { const t = e, { t: n } = vi(), r = F(() => t.disabled || t.currentPage === t.pageCount || t.pageCount === 0); return (a, o) => (I(), j("button", { type: "button", class: "btn-next", disabled: b(r), "aria-label": a.nextText || b(n)("el.pagination.next"), "aria-disabled": b(r), onClick: (i) => a.$emit("click", i) }, [ a.nextText ? (I(), j("span", { key: 0 }, Fe(a.nextText), 1)) : (I(), de(b(er), { key: 1 }, { default: K(() => [ (I(), de(ct(a.nextIcon))) ]), _: 1 })) ], 8, ["disabled", "aria-label", "aria-disabled", "onClick"])); } }); var e$e = /* @__PURE__ */ Mt(JOe, [["__file", "next.vue"]]); const Xz = Symbol("ElSelectGroup"), gw = Symbol("ElSelect"); function t$e(e, t) { const n = Te(gw), r = Te(Xz, { disabled: !1 }), a = F(() => c(yu(n.props.modelValue), e.value)), o = F(() => { var h; if (n.props.multiple) { const p = yu((h = n.props.modelValue) != null ? h : []); return !a.value && p.length >= n.props.multipleLimit && n.props.multipleLimit > 0; } else return !1; }), i = F(() => e.label || (Kr(e.value) ? "" : e.value)), s = F(() => e.value || e.label || ""), l = F(() => e.disabled || t.groupDisabled || o.value), u = tt(), c = (h = [], p) => { if (Kr(e.value)) { const v = n.props.valueKey; return h && h.some((m) => bo(sl(m, v)) === sl(p, v)); } else return h && h.includes(p); }, d = () => { !e.disabled && !r.disabled && (n.states.hoveringIndex = n.optionsArray.indexOf(u.proxy)); }, f = (h) => { const p = new RegExp(j3e(h), "i"); t.visible = p.test(i.value) || e.created; }; return be(() => i.value, () => { !e.created && !n.props.remote && n.setSelected(); }), be(() => e.value, (h, p) => { const { remote: v, valueKey: m } = n.props; if (h !== p && (n.onOptionDestroy(p, u.proxy), n.onOptionCreate(u.proxy)), !e.created && !v) { if (m && Kr(h) && Kr(p) && h[m] === p[m]) return; n.setSelected(); } }), be(() => r.disabled, () => { t.groupDisabled = r.disabled; }, { immediate: !0 }), { select: n, currentLabel: i, currentValue: s, itemSelected: a, isDisabled: l, hoverItem: d, updateOption: f }; } const n$e = X({ 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 = Gu(), r = F(() => [ t.be("dropdown", "item"), t.is("disabled", b(s)), t.is("selected", b(i)), t.is("hovering", b(f)) ]), a = tn({ index: -1, groupDisabled: !1, visible: !0, hover: !1 }), { currentLabel: o, itemSelected: i, isDisabled: s, select: l, hoverItem: u, updateOption: c } = t$e(e, a), { visible: d, hover: f } = Sr(a), h = tt().proxy; l.onOptionCreate(h), kt(() => { const v = h.value, { selected: m } = l.states, g = (l.props.multiple ? m : [m]).some((y) => y.value === h.value); Ue(() => { l.states.cachedOptions.get(v) === h && !g && l.states.cachedOptions.delete(v); }), l.onOptionDestroy(v, h); }); function p() { s.value || l.handleOptionSelect(h); } return { ns: t, id: n, containerKls: r, currentLabel: o, itemSelected: i, isDisabled: s, select: l, hoverItem: u, updateOption: c, visible: d, hover: f, selectOptionClick: p, states: a }; } }); function r$e(e, t, n, r, a, o) { return Xe((I(), j("li", { id: e.id, class: H(e.containerKls), role: "option", "aria-disabled": e.isDisabled || void 0, "aria-selected": e.itemSelected, onMouseenter: e.hoverItem, onClick: Je(e.selectOptionClick, ["stop"]) }, [ he(e.$slots, "default", {}, () => [ W("span", null, Fe(e.currentLabel), 1) ]) ], 42, ["id", "aria-disabled", "aria-selected", "onMouseenter", "onClick"])), [ [mt, e.visible] ]); } var z3 = /* @__PURE__ */ Mt(n$e, [["render", r$e], ["__file", "option.vue"]]); const a$e = X({ name: "ElSelectDropdown", componentName: "ElSelectDropdown", setup() { const e = Te(gw), t = Lt("select"), n = F(() => e.props.popperClass), r = F(() => e.props.multiple), a = F(() => e.props.fitInputWidth), o = U(""); function i() { var s; o.value = `${(s = e.selectRef) == null ? void 0 : s.offsetWidth}px`; } return nt(() => { i(), us(e.selectRef, i); }), { ns: t, minWidth: o, popperClass: n, isMultiple: r, isFitInputWidth: a }; } }); function o$e(e, t, n, r, a, o) { return I(), j("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 ? (I(), j("div", { key: 0, class: H(e.ns.be("dropdown", "header")) }, [ he(e.$slots, "header") ], 2)) : ne("v-if", !0), he(e.$slots, "default"), e.$slots.footer ? (I(), j("div", { key: 1, class: H(e.ns.be("dropdown", "footer")) }, [ he(e.$slots, "footer") ], 2)) : ne("v-if", !0) ], 6); } var i$e = /* @__PURE__ */ Mt(a$e, [["render", o$e], ["__file", "select-dropdown.vue"]]); const s$e = 11, l$e = (e, t) => { const { t: n } = vi(), r = Gu(), a = Lt("select"), o = Lt("input"), i = tn({ 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 = U(null), l = U(null), u = U(null), c = U(null), d = U(null), f = U(null), h = U(null), p = U(null), v = U(null), m = U(null), g = U(null), y = U(null), { isComposing: x, handleCompositionStart: w, handleCompositionUpdate: k, handleCompositionEnd: C } = F3({ afterComposition: (D) => le(D) }), { wrapperRef: S, isFocused: _ } = uz(d, { beforeFocus() { return P.value; }, afterFocus() { e.automaticDropdown && !T.value && (T.value = !0, i.menuVisibleOnFocus = !0); }, beforeBlur(D) { var ae, Ie; return ((ae = u.value) == null ? void 0 : ae.isFocusInsideContent(D)) || ((Ie = c.value) == null ? void 0 : Ie.isFocusInsideContent(D)); }, afterBlur() { T.value = !1, i.menuVisibleOnFocus = !1; } }), T = U(!1), O = U(), { form: $, formItem: A } = dc(), { inputId: N } = Zg(e, { formItemContext: A }), { valueOnClear: L, isEmptyValue: R } = pz(e), P = F(() => e.disabled || ($ == null ? void 0 : $.disabled)), B = F(() => Ha(e.modelValue) ? e.modelValue.length > 0 : !R(e.modelValue)), M = F(() => e.clearable && !P.value && i.inputHovering && B.value), z = F(() => e.remote && e.filterable && !e.remoteShowSuffix ? "" : e.suffixIcon), Z = F(() => a.is("reverse", z.value && T.value)), G = F(() => (A == null ? void 0 : A.validateState) || ""), J = F(() => V7[G.value]), se = F(() => e.remote ? 300 : 0), ve = F(() => 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 && ge.value === 0 ? e.noMatchText || n("el.select.noMatch") : i.options.size === 0 ? e.noDataText || n("el.select.noData") : null), ge = F(() => oe.value.filter((D) => D.visible).length), oe = F(() => { const D = Array.from(i.options.values()), ae = []; return i.optionValues.forEach((Ie) => { const He = D.findIndex((Jt) => Jt.value === Ie); He > -1 && ae.push(D[He]); }), ae.length >= D.length ? ae : D; }), ee = F(() => Array.from(i.cachedOptions.values())), q = F(() => { const D = oe.value.filter((ae) => !ae.created).some((ae) => ae.currentLabel === i.inputValue); return e.filterable && e.allowCreate && i.inputValue !== "" && !D; }), Y = () => { e.filterable && Lr(e.filterMethod) || e.filterable && e.remote && Lr(e.remoteMethod) || oe.value.forEach((D) => { var ae; (ae = D.updateOption) == null || ae.call(D, i.inputValue); }); }, te = Xu(), we = F(() => ["small"].includes(te.value) ? "small" : "default"), Oe = F({ get() { return T.value && ve.value !== !1; }, set(D) { T.value = D; } }), Ne = F(() => { if (e.multiple && !dl(e.modelValue)) return yu(e.modelValue).length === 0 && !i.inputValue; const D = Ha(e.modelValue) ? e.modelValue[0] : e.modelValue; return e.filterable || dl(D) ? !i.inputValue : !0; }), xe = F(() => { var D; const ae = (D = e.placeholder) != null ? D : n("el.select.placeholder"); return e.multiple || !B.value ? ae : i.selectedLabel; }), $e = F(() => l5 ? null : "mouseenter"); be(() => e.modelValue, (D, ae) => { e.multiple && e.filterable && !e.reserveKeyword && (i.inputValue = "", Se("")), Me(), !ms(D, ae) && e.validateEvent && (A == null || A.validate("change").catch((Ie) => yr(Ie))); }, { flush: "post", deep: !0 }), be(() => T.value, (D) => { D ? Se(i.inputValue) : (i.inputValue = "", i.previousQuery = null, i.isBeforeHide = !0), t("visible-change", D); }), be(() => i.options.entries(), () => { var D; if (!rr) return; const ae = ((D = s.value) == null ? void 0 : D.querySelectorAll("input")) || []; (!e.filterable && !e.defaultFirstOption && !dl(e.modelValue) || !Array.from(ae).includes(document.activeElement)) && Me(), e.defaultFirstOption && (e.filterable || e.remote) && ge.value && Pe(); }, { flush: "post" }), be(() => i.hoveringIndex, (D) => { Bn(D) && D > -1 ? O.value = oe.value[D] || {} : O.value = {}, oe.value.forEach((ae) => { ae.hover = O.value === ae; }); }), Hd(() => { i.isBeforeHide || Y(); }); const Se = (D) => { i.previousQuery === D || x.value || (i.previousQuery = D, e.filterable && Lr(e.filterMethod) ? e.filterMethod(D) : e.filterable && e.remote && Lr(e.remoteMethod) && e.remoteMethod(D), e.defaultFirstOption && (e.filterable || e.remote) && ge.value ? Ue(Pe) : Ue(Be)); }, Pe = () => { const D = oe.value.filter((He) => He.visible && !He.disabled && !He.states.groupDisabled), ae = D.find((He) => He.created), Ie = D[0]; i.hoveringIndex = _e(oe.value, ae || Ie); }, Me = () => { if (e.multiple) i.selectedLabel = ""; else { const ae = Ha(e.modelValue) ? e.modelValue[0] : e.modelValue, Ie = je(ae); i.selectedLabel = Ie.currentLabel, i.selected = [Ie]; return; } const D = []; dl(e.modelValue) || yu(e.modelValue).forEach((ae) => { D.push(je(ae)); }), i.selected = D; }, je = (D) => { let ae; const Ie = ik(D).toLowerCase() === "object", He = ik(D).toLowerCase() === "null", Jt = ik(D).toLowerCase() === "undefined"; for (let un = i.cachedOptions.size - 1; un >= 0; un--) { const en = ee.value[un]; if (Ie ? sl(en.value, e.valueKey) === sl(D, e.valueKey) : en.value === D) { ae = { value: D, currentLabel: en.currentLabel, get isDisabled() { return en.isDisabled; } }; break; } } if (ae) return ae; const fn = Ie ? D.label : !He && !Jt ? D : ""; return { value: D, currentLabel: fn }; }, Be = () => { i.hoveringIndex = oe.value.findIndex((D) => i.selected.some((ae) => Qt(ae) === Qt(D))); }, We = () => { i.selectionWidth = l.value.getBoundingClientRect().width; }, qe = () => { i.calculatorWidth = f.value.getBoundingClientRect().width; }, Ge = () => { i.collapseItemWidth = g.value.getBoundingClientRect().width; }, E = () => { var D, ae; (ae = (D = u.value) == null ? void 0 : D.updatePopper) == null || ae.call(D); }, V = () => { var D, ae; (ae = (D = c.value) == null ? void 0 : D.updatePopper) == null || ae.call(D); }, ie = () => { i.inputValue.length > 0 && !T.value && (T.value = !0), Se(i.inputValue); }, le = (D) => { if (i.inputValue = D.target.value, e.remote) re(); else return ie(); }, re = F7(() => { ie(); }, se.value), ke = (D) => { ms(e.modelValue, D) || t(Ed, D); }, fe = (D) => N3e(D, (ae) => !i.disabledOptions.has(ae)), Ee = (D) => { if (e.multiple && D.code !== $r.delete && D.target.value.length <= 0) { const ae = yu(e.modelValue).slice(), Ie = fe(ae); if (Ie < 0) return; const He = ae[Ie]; ae.splice(Ie, 1), t(cr, ae), ke(ae), t("remove-tag", He); } }, ze = (D, ae) => { const Ie = i.selected.indexOf(ae); if (Ie > -1 && !P.value) { const He = yu(e.modelValue).slice(); He.splice(Ie, 1), t(cr, He), ke(He), t("remove-tag", ae.value); } D.stopPropagation(), bt(); }, Ve = (D) => { D.stopPropagation(); const ae = e.multiple ? [] : L.value; if (e.multiple) for (const Ie of i.selected) Ie.isDisabled && ae.push(Ie.value); t(cr, ae), ke(ae), i.hoveringIndex = -1, T.value = !1, t("clear"), bt(); }, me = (D) => { var ae; if (e.multiple) { const Ie = yu((ae = e.modelValue) != null ? ae : []).slice(), He = _e(Ie, D.value); He > -1 ? Ie.splice(He, 1) : (e.multipleLimit <= 0 || Ie.length < e.multipleLimit) && Ie.push(D.value), t(cr, Ie), ke(Ie), D.created && Se(""), e.filterable && !e.reserveKeyword && (i.inputValue = ""); } else t(cr, D.value), ke(D.value), T.value = !1; bt(), !T.value && Ue(() => { Ce(D); }); }, _e = (D = [], ae) => { if (!Kr(ae)) return D.indexOf(ae); const Ie = e.valueKey; let He = -1; return D.some((Jt, fn) => bo(sl(Jt, Ie)) === sl(ae, Ie) ? (He = fn, !0) : !1), He; }, Ce = (D) => { var ae, Ie, He, Jt, fn; const un = Ha(D) ? D[0] : D; let en = null; if (un != null && un.value) { const Gt = oe.value.filter((Hr) => Hr.value === un.value); Gt.length > 0 && (en = Gt[0].$el); } if (u.value && en) { const Gt = (Jt = (He = (Ie = (ae = u.value) == null ? void 0 : ae.popperRef) == null ? void 0 : Ie.contentRef) == null ? void 0 : He.querySelector) == null ? void 0 : Jt.call(He, `.${a.be("dropdown", "wrap")}`); Gt && M7(Gt, en); } (fn = y.value) == null || fn.handleScroll(); }, Le = (D) => { i.options.set(D.value, D), i.cachedOptions.set(D.value, D), D.disabled && i.disabledOptions.set(D.value, D); }, yt = (D, ae) => { i.options.get(D) === ae && i.options.delete(D); }, dt = F(() => { var D, ae; return (ae = (D = u.value) == null ? void 0 : D.popperRef) == null ? void 0 : ae.contentRef; }), _t = () => { i.isBeforeHide = !1, Ue(() => Ce(i.selected)); }, bt = () => { var D; (D = d.value) == null || D.focus(); }, Ct = () => { var D; (D = d.value) == null || D.blur(); }, nn = (D) => { Ve(D); }, Dt = () => { T.value = !1, _.value && Ct(); }, Kt = () => { i.inputValue.length > 0 ? i.inputValue = "" : T.value = !1; }, on = () => { P.value || (l5 && (i.inputHovering = !0), i.menuVisibleOnFocus ? i.menuVisibleOnFocus = !1 : T.value = !T.value); }, rn = () => { T.value ? oe.value[i.hoveringIndex] && me(oe.value[i.hoveringIndex]) : on(); }, Qt = (D) => Kr(D.value) ? sl(D.value, e.valueKey) : D.value, Sn = F(() => oe.value.filter((D) => D.visible).every((D) => D.disabled)), En = F(() => e.multiple ? e.collapseTags ? i.selected.slice(0, e.maxCollapseTags) : i.selected : []), pn = F(() => e.multiple ? e.collapseTags ? i.selected.slice(e.maxCollapseTags) : [] : []), St = (D) => { if (!T.value) { T.value = !0; return; } if (!(i.options.size === 0 || i.filteredOptionsCount === 0 || x.value) && !Sn.value) { D === "next" ? (i.hoveringIndex++, i.hoveringIndex === i.options.size && (i.hoveringIndex = 0)) : D === "prev" && (i.hoveringIndex--, i.hoveringIndex < 0 && (i.hoveringIndex = i.options.size - 1)); const ae = oe.value[i.hoveringIndex]; (ae.disabled === !0 || ae.states.groupDisabled === !0 || !ae.visible) && St(D), Ue(() => Ce(O.value)); } }, Rt = () => { if (!l.value) return 0; const D = window.getComputedStyle(l.value); return Number.parseFloat(D.gap || "6px"); }, qt = F(() => { const D = Rt(); return { maxWidth: `${g.value && e.maxCollapseTags === 1 ? i.selectionWidth - i.collapseItemWidth - D : i.selectionWidth}px` }; }), _n = F(() => ({ maxWidth: `${i.selectionWidth}px` })), _r = F(() => ({ width: `${Math.max(i.calculatorWidth, s$e)}px` })); return us(l, We), us(f, qe), us(v, E), us(S, E), us(m, V), us(g, Ge), nt(() => { Me(); }), { inputId: N, contentId: r, nsSelect: a, nsInput: o, states: i, isFocused: _, expanded: T, optionsArray: oe, hoverOption: O, selectSize: te, filteredOptionsCount: ge, resetCalculatorWidth: qe, updateTooltip: E, updateTagTooltip: V, debouncedOnInputChange: re, onInput: le, deletePrevTag: Ee, deleteTag: ze, deleteSelected: Ve, handleOptionSelect: me, scrollToOption: Ce, hasModelValue: B, shouldShowPlaceholder: Ne, currentPlaceholder: xe, mouseEnterEventName: $e, showClose: M, iconComponent: z, iconReverse: Z, validateState: G, validateIcon: J, showNewOption: q, updateOptions: Y, collapseTagSize: we, setSelected: Me, selectDisabled: P, emptyText: ve, handleCompositionStart: w, handleCompositionUpdate: k, handleCompositionEnd: C, onOptionCreate: Le, onOptionDestroy: yt, handleMenuEnter: _t, focus: bt, blur: Ct, handleClearClick: nn, handleClickOutside: Dt, handleEsc: Kt, toggleMenu: on, selectOption: rn, getValueKey: Qt, navigateOptions: St, dropdownMenuVisible: Oe, showTagList: En, collapseTagList: pn, tagStyle: qt, collapseTagStyle: _n, inputStyle: _r, popperRef: dt, inputRef: d, tooltipRef: u, tagTooltipRef: c, calculatorRef: f, prefixRef: h, suffixRef: p, selectRef: s, wrapperRef: S, selectionRef: l, scrollbarRef: y, menuRef: v, tagMenuRef: m, collapseItemRef: g }; }; var u$e = X({ name: "ElOptions", setup(e, { slots: t }) { const n = Te(gw); let r = []; return () => { var a, o; const i = (a = t.default) == null ? void 0 : a.call(t), s = []; function l(u) { Ha(u) && u.forEach((c) => { var d, f, h, p; const v = (d = (c == null ? void 0 : c.type) || {}) == null ? void 0 : d.name; v === "ElOptionGroup" ? l(!lo(c.children) && !Ha(c.children) && Lr((f = c.children) == null ? void 0 : f.default) ? (h = c.children) == null ? void 0 : h.default() : c.children) : v === "ElOption" ? s.push((p = c.props) == null ? void 0 : p.value) : Ha(c.children) && l(c.children); }); } return i.length && l((o = i[0]) == null ? void 0 : o.children), ms(s, r) || (r = s, n && (n.states.optionValues = s)), i; }; } }); const c$e = Vt({ name: String, id: String, modelValue: { type: [Array, String, Number, Boolean, Object], default: void 0 }, autocomplete: { type: String, default: "off" }, automaticDropdown: Boolean, size: Ml, effect: { type: gt(String), default: "light" }, disabled: Boolean, clearable: Boolean, filterable: Boolean, allowCreate: Boolean, loading: Boolean, popperClass: { type: String, default: "" }, popperOptions: { type: gt(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: Ya.teleported, persistent: { type: Boolean, default: !0 }, clearIcon: { type: li, default: lw }, fitInputWidth: Boolean, suffixIcon: { type: li, default: y3 }, tagType: { ...V0.type, default: "info" }, tagEffect: { ...V0.effect, default: "light" }, validateEvent: { type: Boolean, default: !0 }, remoteShowSuffix: Boolean, placement: { type: gt(String), values: Gg, default: "bottom-start" }, fallbackPlacements: { type: gt(Array), default: ["bottom-start", "top-start", "right", "left"] }, appendTo: String, ...dz, ...cc(["ariaLabel"]) }), yF = "ElSelect", d$e = X({ name: yF, componentName: yF, components: { ElSelectMenu: i$e, ElOption: z3, ElOptions: u$e, ElTag: zf, ElScrollbar: P3, ElTooltip: gb, ElIcon: er }, directives: { ClickOutside: _z }, props: c$e, emits: [ cr, Ed, "remove-tag", "clear", "visible-change", "focus", "blur" ], setup(e, { emit: t }) { const n = F(() => { const { modelValue: o, multiple: i } = e, s = i ? [] : void 0; return Ha(o) ? i ? o : s : i ? s : o; }), r = tn({ ...Sr(e), modelValue: n }), a = l$e(r, t); return rt(gw, tn({ props: r, states: a.states, optionsArray: a.optionsArray, handleOptionSelect: a.handleOptionSelect, onOptionCreate: a.onOptionCreate, onOptionDestroy: a.onOptionDestroy, selectRef: a.selectRef, setSelected: a.setSelected })), { ...a, modelValue: n }; } }); function p$e(e, t, n, r, a, o) { const i = lt("el-tag"), s = lt("el-tooltip"), l = lt("el-icon"), u = lt("el-option"), c = lt("el-options"), d = lt("el-scrollbar"), f = lt("el-select-menu"), h = Qb("click-outside"); return Xe((I(), j("div", { ref: "selectRef", class: H([e.nsSelect.b(), e.nsSelect.m(e.selectSize)]), [Jb(e.mouseEnterEventName)]: (p) => e.states.inputHovering = !0, onMouseleave: (p) => e.states.inputHovering = !1 }, [ ue(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: (p) => e.states.isBeforeHide = !1 }, { default: K(() => { var p; return [ W("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: Je(e.toggleMenu, ["prevent"]) }, [ e.$slots.prefix ? (I(), j("div", { key: 0, ref: "prefixRef", class: H(e.nsSelect.e("prefix")) }, [ he(e.$slots, "prefix") ], 2)) : ne("v-if", !0), W("div", { ref: "selectionRef", class: H([ e.nsSelect.e("selection"), e.nsSelect.is("near", e.multiple && !e.$slots.prefix && !!e.states.selected.length) ]) }, [ e.multiple ? he(e.$slots, "tag", { key: 0 }, () => [ (I(!0), j(Qe, null, Nt(e.showTagList, (v) => (I(), j("div", { key: e.getValueKey(v), class: H(e.nsSelect.e("selected-item")) }, [ ue(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: K(() => [ W("span", { class: H(e.nsSelect.e("tags-text")) }, [ he(e.$slots, "label", { label: v.currentLabel, value: v.value }, () => [ et(Fe(v.currentLabel), 1) ]) ], 2) ]), _: 2 }, 1032, ["closable", "size", "type", "effect", "style", "onClose"]) ], 2))), 128)), e.collapseTags && e.states.selected.length > e.maxCollapseTags ? (I(), de(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: K(() => [ W("div", { ref: "collapseItemRef", class: H(e.nsSelect.e("selected-item")) }, [ ue(i, { closable: !1, size: e.collapseTagSize, type: e.tagType, effect: e.tagEffect, "disable-transitions": "", style: Ye(e.collapseTagStyle) }, { default: K(() => [ W("span", { class: H(e.nsSelect.e("tags-text")) }, " + " + Fe(e.states.selected.length - e.maxCollapseTags), 3) ]), _: 1 }, 8, ["size", "type", "effect", "style"]) ], 2) ]), content: K(() => [ W("div", { ref: "tagMenuRef", class: H(e.nsSelect.e("selection")) }, [ (I(!0), j(Qe, null, Nt(e.collapseTagList, (v) => (I(), j("div", { key: e.getValueKey(v), class: H(e.nsSelect.e("selected-item")) }, [ ue(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: K(() => [ W("span", { class: H(e.nsSelect.e("tags-text")) }, [ he(e.$slots, "label", { label: v.currentLabel, value: v.value }, () => [ et(Fe(v.currentLabel), 1) ]) ], 2) ]), _: 2 }, 1032, ["closable", "size", "type", "effect", "onClose"]) ], 2))), 128)) ], 2) ]), _: 3 }, 8, ["disabled", "effect", "teleported"])) : ne("v-if", !0) ]) : ne("v-if", !0), e.selectDisabled ? ne("v-if", !0) : (I(), j("div", { key: 1, class: H([ e.nsSelect.e("selected-item"), e.nsSelect.e("input-wrapper"), e.nsSelect.is("hidden", !e.filterable) ]) }, [ Xe(W("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": ((p = e.hoverOption) == null ? void 0 : p.id) || "", "aria-controls": e.contentId, "aria-expanded": e.dropdownMenuVisible, "aria-label": e.ariaLabel, "aria-autocomplete": "none", "aria-haspopup": "listbox", onKeydown: [ gn(Je((v) => e.navigateOptions("next"), ["stop", "prevent"]), ["down"]), gn(Je((v) => e.navigateOptions("prev"), ["stop", "prevent"]), ["up"]), gn(Je(e.handleEsc, ["stop", "prevent"]), ["esc"]), gn(Je(e.selectOption, ["stop", "prevent"]), ["enter"]), gn(Je(e.deletePrevTag, ["stop"]), ["delete"]) ], onCompositionstart: e.handleCompositionStart, onCompositionupdate: e.handleCompositionUpdate, onCompositionend: e.handleCompositionEnd, onInput: e.onInput, onClick: Je(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"]), [ [xg, e.states.inputValue] ]), e.filterable ? (I(), j("span", { key: 0, ref: "calculatorRef", "aria-hidden": "true", class: H(e.nsSelect.e("input-calculator")), textContent: Fe(e.states.inputValue) }, null, 10, ["textContent"])) : ne("v-if", !0) ], 2)), e.shouldShowPlaceholder ? (I(), j("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 ? he(e.$slots, "label", { key: 0, label: e.currentPlaceholder, value: e.modelValue }, () => [ W("span", null, Fe(e.currentPlaceholder), 1) ]) : (I(), j("span", { key: 1 }, Fe(e.currentPlaceholder), 1)) ], 2)) : ne("v-if", !0) ], 2), W("div", { ref: "suffixRef", class: H(e.nsSelect.e("suffix")) }, [ e.iconComponent && !e.showClose ? (I(), de(l, { key: 0, class: H([e.nsSelect.e("caret"), e.nsSelect.e("icon"), e.iconReverse]) }, { default: K(() => [ (I(), de(ct(e.iconComponent))) ]), _: 1 }, 8, ["class"])) : ne("v-if", !0), e.showClose && e.clearIcon ? (I(), de(l, { key: 1, class: H([ e.nsSelect.e("caret"), e.nsSelect.e("icon"), e.nsSelect.e("clear") ]), onClick: e.handleClearClick }, { default: K(() => [ (I(), de(ct(e.clearIcon))) ]), _: 1 }, 8, ["class", "onClick"])) : ne("v-if", !0), e.validateState && e.validateIcon ? (I(), de(l, { key: 2, class: H([e.nsInput.e("icon"), e.nsInput.e("validateIcon")]) }, { default: K(() => [ (I(), de(ct(e.validateIcon))) ]), _: 1 }, 8, ["class"])) : ne("v-if", !0) ], 2) ], 10, ["onClick"]) ]; }), content: K(() => [ ue(f, { ref: "menuRef" }, { default: K(() => [ e.$slots.header ? (I(), j("div", { key: 0, class: H(e.nsSelect.be("dropdown", "header")), onClick: Je(() => { }, ["stop"]) }, [ he(e.$slots, "header") ], 10, ["onClick"])) : ne("v-if", !0), Xe(ue(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: K(() => [ e.showNewOption ? (I(), de(u, { key: 0, value: e.states.inputValue, created: !0 }, null, 8, ["value"])) : ne("v-if", !0), ue(c, null, { default: K(() => [ he(e.$slots, "default") ]), _: 3 }) ]), _: 3 }, 8, ["id", "wrap-class", "view-class", "class", "aria-label"]), [ [mt, e.states.options.size > 0 && !e.loading] ]), e.$slots.loading && e.loading ? (I(), j("div", { key: 1, class: H(e.nsSelect.be("dropdown", "loading")) }, [ he(e.$slots, "loading") ], 2)) : e.loading || e.filteredOptionsCount === 0 ? (I(), j("div", { key: 2, class: H(e.nsSelect.be("dropdown", "empty")) }, [ he(e.$slots, "empty", {}, () => [ W("span", null, Fe(e.emptyText), 1) ]) ], 2)) : ne("v-if", !0), e.$slots.footer ? (I(), j("div", { key: 3, class: H(e.nsSelect.be("dropdown", "footer")), onClick: Je(() => { }, ["stop"]) }, [ he(e.$slots, "footer") ], 10, ["onClick"])) : ne("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 f$e = /* @__PURE__ */ Mt(d$e, [["render", p$e], ["__file", "select.vue"]]); const h$e = X({ name: "ElOptionGroup", componentName: "ElOptionGroup", props: { label: String, disabled: Boolean }, setup(e) { const t = Lt("select"), n = U(null), r = tt(), a = U([]); rt(Xz, tn({ ...Sr(e) })); const o = F(() => a.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 = yu(u), d = []; return c.forEach((f) => { var h, p; i(f) ? d.push(f.component.proxy) : (h = f.children) != null && h.length ? d.push(...s(f.children)) : (p = f.component) != null && p.subTree && d.push(...s(f.component.subTree)); }), d; }, l = () => { a.value = s(r.subTree); }; return nt(() => { l(); }), Tke(n, l, { attributes: !0, subtree: !0, childList: !0 }), { groupRef: n, visible: o, ns: t }; } }); function v$e(e, t, n, r, a, o) { return Xe((I(), j("ul", { ref: "groupRef", class: H(e.ns.be("group", "wrap")) }, [ W("li", { class: H(e.ns.be("group", "title")) }, Fe(e.label), 3), W("li", null, [ W("ul", { class: H(e.ns.b("group")) }, [ he(e.$slots, "default") ], 2) ]) ], 2)), [ [mt, e.visible] ]); } var Yz = /* @__PURE__ */ Mt(h$e, [["render", v$e], ["__file", "option-group.vue"]]); const Qg = Er(f$e, { Option: z3, OptionGroup: Yz }), mw = Xi(z3); Xi(Yz); const V3 = () => Te(Gz, {}), g$e = Vt({ pageSize: { type: Number, required: !0 }, pageSizes: { type: gt(Array), default: () => bu([10, 20, 30, 40, 50, 100]) }, popperClass: { type: String }, disabled: Boolean, teleported: Boolean, size: { type: String, values: dw }, appendSizeTo: String }), m$e = X({ name: "ElPaginationSizes" }), y$e = /* @__PURE__ */ X({ ...m$e, props: g$e, emits: ["page-size-change"], setup(e, { emit: t }) { const n = e, { t: r } = vi(), a = Lt("pagination"), o = V3(), i = U(n.pageSize); be(() => n.pageSizes, (u, c) => { if (!ms(u, c) && Array.isArray(u)) { const d = u.includes(n.pageSize) ? n.pageSize : n.pageSizes[0]; t("page-size-change", d); } }), be(() => n.pageSize, (u) => { i.value = u; }); const s = F(() => n.pageSizes); function l(u) { var c; u !== i.value && (i.value = u, (c = o.handleSizeChange) == null || c.call(o, Number(u))); } return (u, c) => (I(), j("span", { class: H(b(a).e("sizes")) }, [ ue(b(Qg), { "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: K(() => [ (I(!0), j(Qe, null, Nt(b(s), (d) => (I(), de(b(mw), { key: d, value: d, label: d + b(r)("el.pagination.pagesize") }, null, 8, ["value", "label"]))), 128)) ]), _: 1 }, 8, ["model-value", "disabled", "popper-class", "size", "teleported", "append-to"]) ], 2)); } }); var b$e = /* @__PURE__ */ Mt(y$e, [["__file", "sizes.vue"]]); const w$e = Vt({ size: { type: String, values: dw } }), x$e = X({ name: "ElPaginationJumper" }), k$e = /* @__PURE__ */ X({ ...x$e, props: w$e, setup(e) { const { t } = vi(), n = Lt("pagination"), { pageCount: r, disabled: a, currentPage: o, changeEvent: i } = V3(), s = U(), l = F(() => { var d; return (d = s.value) != null ? d : o == null ? void 0 : o.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, f) => (I(), j("span", { class: H(b(n).e("jump")), disabled: b(a) }, [ W("span", { class: H([b(n).e("goto")]) }, Fe(b(t)("el.pagination.goto")), 3), ue(b(hw), { size: d.size, class: H([b(n).e("editor"), b(n).is("in-pagination")]), min: 1, max: b(r), disabled: b(a), "model-value": b(l), "validate-event": !1, "aria-label": b(t)("el.pagination.page"), type: "number", "onUpdate:modelValue": u, onChange: c }, null, 8, ["size", "class", "max", "disabled", "model-value", "aria-label"]), W("span", { class: H([b(n).e("classifier")]) }, Fe(b(t)("el.pagination.pageClassifier")), 3) ], 10, ["disabled"])); } }); var C$e = /* @__PURE__ */ Mt(k$e, [["__file", "jumper.vue"]]); const S$e = Vt({ total: { type: Number, default: 1e3 } }), E$e = X({ name: "ElPaginationTotal" }), _$e = /* @__PURE__ */ X({ ...E$e, props: S$e, setup(e) { const { t } = vi(), n = Lt("pagination"), { disabled: r } = V3(); return (a, o) => (I(), j("span", { class: H(b(n).e("total")), disabled: b(r) }, Fe(b(t)("el.pagination.total", { total: a.total })), 11, ["disabled"])); } }); var T$e = /* @__PURE__ */ Mt(_$e, [["__file", "total.vue"]]); const O$e = Vt({ currentPage: { type: Number, default: 1 }, pageCount: { type: Number, required: !0 }, pagerCount: { type: Number, default: 7 }, disabled: Boolean }), $$e = X({ name: "ElPaginationPager" }), F$e = /* @__PURE__ */ X({ ...$$e, props: O$e, emits: ["change"], setup(e, { emit: t }) { const n = e, r = Lt("pager"), a = Lt("icon"), { t: o } = vi(), i = U(!1), s = U(!1), l = U(!1), u = U(!1), c = U(!1), d = U(!1), f = F(() => { const w = n.pagerCount, k = (w - 1) / 2, C = Number(n.currentPage), S = Number(n.pageCount); let _ = !1, T = !1; S > w && (C > w - k && (_ = !0), C < S - k && (T = !0)); const O = []; if (_ && !T) { const $ = S - (w - 2); for (let A = $; A < S; A++) O.push(A); } else if (!_ && T) for (let $ = 2; $ < w; $++) O.push($); else if (_ && T) { const $ = Math.floor(w / 2) - 1; for (let A = C - $; A <= C + $; A++) O.push(A); } else for (let $ = 2; $ < S; $++) O.push($); return O; }), h = F(() => [ "more", "btn-quickprev", a.b(), r.is("disabled", n.disabled) ]), p = F(() => [ "more", "btn-quicknext", a.b(), r.is("disabled", n.disabled) ]), v = F(() => n.disabled ? -1 : 0); Hd(() => { 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 y(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 S = n.pageCount, _ = n.currentPage, T = n.pagerCount - 2; k.className.includes("more") && (k.className.includes("quickprev") ? C = _ - T : k.className.includes("quicknext") && (C = _ + T)), Number.isNaN(+C) || (C < 1 && (C = 1), C > S && (C = S)), C !== _ && t("change", C); } return (w, k) => (I(), j("ul", { class: H(b(r).b()), onClick: x, onKeyup: gn(y, ["enter"]) }, [ w.pageCount > 0 ? (I(), j("li", { key: 0, class: H([[ b(r).is("active", w.currentPage === 1), b(r).is("disabled", w.disabled) ], "number"]), "aria-current": w.currentPage === 1, "aria-label": b(o)("el.pagination.currentPage", { pager: 1 }), tabindex: b(v) }, " 1 ", 10, ["aria-current", "aria-label", "tabindex"])) : ne("v-if", !0), i.value ? (I(), j("li", { key: 1, class: H(b(h)), tabindex: b(v), "aria-label": b(o)("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 ? (I(), de(b(nEe), { key: 0 })) : (I(), de(b(B$), { key: 1 })) ], 42, ["tabindex", "aria-label", "onMouseenter", "onMouseleave", "onFocus", "onBlur"])) : ne("v-if", !0), (I(!0), j(Qe, null, Nt(b(f), (C) => (I(), j("li", { key: C, class: H([[ b(r).is("active", w.currentPage === C), b(r).is("disabled", w.disabled) ], "number"]), "aria-current": w.currentPage === C, "aria-label": b(o)("el.pagination.currentPage", { pager: C }), tabindex: b(v) }, Fe(C), 11, ["aria-current", "aria-label", "tabindex"]))), 128)), s.value ? (I(), j("li", { key: 2, class: H(b(p)), tabindex: b(v), "aria-label": b(o)("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 ? (I(), de(b(aEe), { key: 0 })) : (I(), de(b(B$), { key: 1 })) ], 42, ["tabindex", "aria-label", "onMouseenter", "onMouseleave", "onFocus", "onBlur"])) : ne("v-if", !0), w.pageCount > 1 ? (I(), j("li", { key: 3, class: H([[ b(r).is("active", w.currentPage === w.pageCount), b(r).is("disabled", w.disabled) ], "number"]), "aria-current": w.currentPage === w.pageCount, "aria-label": b(o)("el.pagination.currentPage", { pager: w.pageCount }), tabindex: b(v) }, Fe(w.pageCount), 11, ["aria-current", "aria-label", "tabindex"])) : ne("v-if", !0) ], 42, ["onKeyup"])); } }); var A$e = /* @__PURE__ */ Mt(F$e, [["__file", "pager.vue"]]); const Da = (e) => typeof e != "number", I$e = Vt({ pageSize: Number, defaultPageSize: Number, total: Number, pageCount: Number, pagerCount: { type: Number, validator: (e) => Bn(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: gt(Array), default: () => bu([10, 20, 30, 40, 50, 100]) }, popperClass: { type: String, default: "" }, prevText: { type: String, default: "" }, prevIcon: { type: li, default: () => b3 }, nextText: { type: String, default: "" }, nextIcon: { type: li, default: () => sw }, teleported: { type: Boolean, default: !0 }, small: Boolean, size: Ml, background: Boolean, disabled: Boolean, hideOnSinglePage: Boolean, appendSizeTo: String }), P$e = { "update:current-page": (e) => Bn(e), "update:page-size": (e) => Bn(e), "size-change": (e) => Bn(e), change: (e, t) => Bn(e) && Bn(t), "current-change": (e) => Bn(e), "prev-click": (e) => Bn(e), "next-click": (e) => Bn(e) }, bF = "ElPagination"; var L$e = X({ name: bF, props: I$e, emits: P$e, setup(e, { emit: t, slots: n }) { const { t: r } = vi(), a = Lt("pagination"), o = tt().vnode.props || {}, i = lz(), s = F(() => { var k; return e.small ? "small" : (k = e.size) != null ? k : i.value; }); nd({ from: "small", replacement: "size", version: "3.0.0", scope: "el-pagination", ref: "https://element-plus.org/zh-CN/component/pagination.html" }, F(() => !!e.small)); const l = "onUpdate:currentPage" in o || "onUpdate:current-page" in o || "onCurrentChange" in o, u = "onUpdate:pageSize" in o || "onUpdate:page-size" in o || "onSizeChange" in o, c = F(() => { if (Da(e.total) && Da(e.pageCount) || !Da(e.currentPage) && !l) return !1; if (e.layout.includes("sizes")) { if (Da(e.pageCount)) { if (!Da(e.total) && !Da(e.pageSize) && !u) return !1; } else if (!u) return !1; } return !0; }), d = U(Da(e.defaultPageSize) ? 10 : e.defaultPageSize), f = U(Da(e.defaultCurrentPage) ? 1 : e.defaultCurrentPage), h = F({ get() { return Da(e.pageSize) ? d.value : e.pageSize; }, set(k) { Da(e.pageSize) && (d.value = k), u && (t("update:page-size", k), t("size-change", k)); } }), p = F(() => { let k = 0; return Da(e.pageCount) ? Da(e.total) || (k = Math.max(1, Math.ceil(e.total / h.value))) : k = e.pageCount, k; }), v = F({ get() { return Da(e.currentPage) ? f.value : e.currentPage; }, set(k) { let C = k; k < 1 ? C = 1 : k > p.value && (C = p.value), Da(e.currentPage) && (f.value = C), l && (t("update:current-page", C), t("current-change", C)); } }); be(p, (k) => { v.value > k && (v.value = k); }), be([v, h], (k) => { t("change", ...k); }, { flush: "post" }); function m(k) { v.value = k; } function g(k) { h.value = k; const C = p.value; v.value > C && (v.value = C); } function y() { 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 rt(Gz, { pageCount: p, disabled: F(() => e.disabled), currentPage: v, changeEvent: m, handleSizeChange: g }), () => { var k, C; if (!c.value) return yr(bF, r("el.pagination.deprecationWarning")), null; if (!e.layout || e.hideOnSinglePage && p.value <= 1) return null; const S = [], _ = [], T = sn("div", { class: a.e("rightwrapper") }, _), O = { prev: sn(YOe, { disabled: e.disabled, currentPage: v.value, prevText: e.prevText, prevIcon: e.prevIcon, onClick: y }), jumper: sn(C$e, { size: s.value }), pager: sn(A$e, { currentPage: v.value, pageCount: p.value, pagerCount: e.pagerCount, onChange: m, disabled: e.disabled }), next: sn(e$e, { disabled: e.disabled, currentPage: v.value, pageCount: p.value, nextText: e.nextText, nextIcon: e.nextIcon, onClick: x }), sizes: sn(b$e, { 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: sn(T$e, { total: Da(e.total) ? 0 : e.total }) }, $ = e.layout.split(",").map((N) => N.trim()); let A = !1; return $.forEach((N) => { if (N === "->") { A = !0; return; } A ? _.push(O[N]) : S.push(O[N]); }), w(S[0], a.is("first")), w(S[S.length - 1], a.is("last")), A && _.length > 0 && (w(_[0], a.is("first")), w(_[_.length - 1], a.is("last")), S.push(T)), sn("div", { class: [ a.b(), a.is("background", e.background), a.m(s.value) ] }, S); }; } }); const Zz = Er(L$e), N$e = Vt({ trigger: z0.trigger, placement: mk.placement, disabled: z0.disabled, visible: Ya.visible, transition: Ya.transition, popperOptions: mk.popperOptions, tabindex: mk.tabindex, content: Ya.content, popperStyle: Ya.popperStyle, popperClass: Ya.popperClass, enterable: { ...Ya.enterable, default: !0 }, effect: { ...Ya.effect, default: "light" }, teleported: Ya.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 } }), M$e = { "update:visible": (e) => Ts(e), "before-enter": () => !0, "before-leave": () => !0, "after-enter": () => !0, "after-leave": () => !0 }, B$e = "onUpdate:visible", D$e = X({ name: "ElPopover" }), R$e = /* @__PURE__ */ X({ ...D$e, props: N$e, emits: M$e, setup(e, { expose: t, emit: n }) { const r = e, a = F(() => r[B$e]), o = Lt("popover"), i = U(), s = F(() => { var m; return (m = b(i)) == null ? void 0 : m.popperRef; }), l = F(() => [ { width: Pf(r.width) }, r.popperStyle ]), u = F(() => [o.b(), r.popperClass, { [o.m("plain")]: !!r.content }]), c = F(() => r.transition === `${o.namespace.value}-fade-in-linear`), d = () => { var m; (m = i.value) == null || m.hide(); }, f = () => { n("before-enter"); }, h = () => { n("before-leave"); }, p = () => { n("after-enter"); }, v = () => { n("update:visible", !1), n("after-leave"); }; return t({ popperRef: s, hide: d }), (m, g) => (I(), de(b(gb), Bt({ 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": b(u), "popper-style": b(l), teleported: m.teleported, persistent: m.persistent, "gpu-acceleration": b(c), "onUpdate:visible": b(a), onBeforeShow: f, onBeforeHide: h, onShow: p, onHide: v }), { content: K(() => [ m.title ? (I(), j("div", { key: 0, class: H(b(o).e("title")), role: "title" }, Fe(m.title), 3)) : ne("v-if", !0), he(m.$slots, "default", {}, () => [ et(Fe(m.content), 1) ]) ]), default: K(() => [ m.$slots.reference ? he(m.$slots, "reference", { key: 0 }) : ne("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 z$e = /* @__PURE__ */ Mt(R$e, [["__file", "popover.vue"]]); const wF = (e, t) => { const n = t.arg || t.value, r = n == null ? void 0 : n.popperRef; r && (r.triggerRef = e); }; var V$e = { mounted(e, t) { wF(e, t); }, updated(e, t) { wF(e, t); } }; const j$e = "popover", H$e = bEe(V$e, j$e), j3 = Er(z$e, { directive: H$e }); function U$e(e) { let t; const n = U(!1), r = tn({ ...e, originalPosition: "", originalOverflow: "", visible: !1 }); function a(f) { r.text = f; } function o() { const f = r.parent, h = d.ns; if (!f.vLoadingAddClassList) { let p = f.getAttribute("loading-number"); p = Number.parseInt(p) - 1, p ? f.setAttribute("loading-number", p.toString()) : (B0(f, h.bm("parent", "relative")), f.removeAttribute("loading-number")), B0(f, h.bm("parent", "hidden")); } i(), c.unmount(); } function i() { var f, h; (h = (f = d.$el) == null ? void 0 : f.parentNode) == null || h.removeChild(d.$el); } function s() { var f; e.beforeClose && !e.beforeClose() || (n.value = !0, clearTimeout(t), t = setTimeout(l, 400), r.visible = !1, (f = e.closed) == null || f.call(e)); } function l() { if (!n.value) return; const f = r.parent; n.value = !1, f.vLoadingAddClassList = void 0, o(); } const u = X({ name: "ElLoading", setup(f, { expose: h }) { const { ns: p, zIndex: v } = Z_e("loading"); return h({ ns: p, zIndex: v }), () => { const m = r.spinner || r.svg, g = sn("svg", { class: "circular", viewBox: r.svgViewBox ? r.svgViewBox : "0 0 50 50", ...m ? { innerHTML: m } : {} }, [ sn("circle", { class: "path", cx: "25", cy: "25", r: "20", fill: "none" }) ]), y = r.text ? sn("p", { class: p.b("text") }, [r.text]) : void 0; return sn(vr, { name: p.b("fade"), onAfterLeave: l }, { default: K(() => [ Xe(ue("div", { style: { backgroundColor: r.background || "" }, class: [ p.b("mask"), r.customClass, r.fullscreen ? "is-fullscreen" : "" ] }, [ sn("div", { class: p.b("spinner") }, [g, y]) ]), [[mt, r.visible]]) ]) }); }; } }), c = e2(u), d = c.mount(document.createElement("div")); return { ...Sr(r), setText: a, removeElLoadingChild: i, close: s, handleAfterLeave: l, vm: d, get $el() { return d.$el; } }; } let p1; const q$e = function(e = {}) { if (!rr) return; const t = W$e(e); if (t.fullscreen && p1) return p1; const n = U$e({ ...t, closed: () => { var a; (a = t.closed) == null || a.call(t), t.fullscreen && (p1 = void 0); } }); K$e(t, t.parent, n), xF(t, t.parent, n), t.parent.vLoadingAddClassList = () => xF(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), Ue(() => n.visible.value = t.visible), t.fullscreen && (p1 = n), n; }, W$e = (e) => { var t, n, r, a; let o; return lo(e.target) ? o = (t = document.querySelector(e.target)) != null ? t : document.body : o = e.target || document.body, { parent: o === document.body || e.body ? document.body : o, background: e.background || "", svg: e.svg || "", svgViewBox: e.svgViewBox || "", spinner: e.spinner || !1, text: e.text || "", fullscreen: o === document.body && ((n = e.fullscreen) != null ? n : !0), lock: (r = e.lock) != null ? r : !1, customClass: e.customClass || "", visible: (a = e.visible) != null ? a : !0, beforeClose: e.beforeClose, closed: e.closed, target: o }; }, K$e = async (e, t, n) => { const { nextZIndex: r } = n.vm.zIndex || n.vm._.exposed.zIndex, a = {}; if (e.fullscreen) n.originalPosition.value = jp(document.body, "position"), n.originalOverflow.value = jp(document.body, "overflow"), a.zIndex = r(); else if (e.parent === document.body) { n.originalPosition.value = jp(document.body, "position"), await Ue(); for (const o of ["top", "left"]) { const i = o === "top" ? "scrollTop" : "scrollLeft"; a[o] = `${e.target.getBoundingClientRect()[o] + document.body[i] + document.documentElement[i] - Number.parseInt(jp(document.body, `margin-${o}`), 10)}px`; } for (const o of ["height", "width"]) a[o] = `${e.target.getBoundingClientRect()[o]}px`; } else n.originalPosition.value = jp(t, "position"); for (const [o, i] of Object.entries(a)) n.$el.style[o] = i; }, xF = (e, t, n) => { const r = n.vm.ns || n.vm._.exposed.ns; ["absolute", "fixed", "sticky"].includes(n.originalPosition.value) ? B0(t, r.bm("parent", "relative")) : v5(t, r.bm("parent", "relative")), e.fullscreen && e.lock ? v5(t, r.bm("parent", "hidden")) : B0(t, r.bm("parent", "hidden")); }, dy = Symbol("ElLoading"), kF = (e, t) => { var n, r, a, o; const i = t.instance, s = (f) => Kr(t.value) ? t.value[f] : void 0, l = (f) => { const h = lo(f) && (i == null ? void 0 : i[f]) || f; return h && U(h); }, u = (f) => l(s(f) || e.getAttribute(`element-loading-${Vke(f)}`)), 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: (a = s("body")) != null ? a : t.modifiers.body, lock: (o = s("lock")) != null ? o : t.modifiers.lock }; e[dy] = { options: d, instance: q$e(d) }; }, G$e = (e, t) => { for (const n of Object.keys(t)) ar(t[n]) && (t[n].value = e[n]); }, yw = { mounted(e, t) { t.value && kF(e, t); }, updated(e, t) { const n = e[dy]; t.oldValue !== t.value && (t.value && !t.oldValue ? kF(e, t) : t.value && t.oldValue ? Kr(t.value) && G$e(t.value, n.options) : n == null || n.instance.close()); }, unmounted(e) { var t; (t = e[dy]) == null || t.instance.close(), e[dy] = null; } }, Zi = (e, t) => { const n = e.__vccOpts || e; for (const [r, a] of t) n[r] = a; return n; }, X$e = { name: "BadgesGroup", components: { Button: Do }, 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); } } } }, Y$e = (e) => (No("data-v-da8a77c1"), e = e(), Mo(), e), Z$e = { key: 0, class: "container", ref: "container" }, Q$e = /* @__PURE__ */ Y$e(() => /* @__PURE__ */ W("div", null, "View data types:", -1)); function J$e(e, t, n, r, a, o) { const i = Do; return e.categories.All.size > 1 ? (I(), j("div", Z$e, [ Q$e, (I(!0), j(Qe, null, Nt(e.categories, (s, l) => (I(), j(Qe, null, [ s.size > 0 ? (I(), de(i, { class: H([{ active: l == e.active }, "tag-button"]), onClick: (u) => o.categoryClicked(l), size: "small", key: l }, { default: K(() => [ et(Fe(l + " (" + s.size + ")"), 1) ]), _: 2 }, 1032, ["class", "onClick"])) : ne("", !0) ], 64))), 256)) ], 512)) : ne("", !0); } const Qz = /* @__PURE__ */ Zi(X$e, [["render", J$e], ["__scopeId", "data-v-da8a77c1"]]); function Jz(e, t) { return function() { return e.apply(t, arguments); }; } const { toString: eFe } = Object.prototype, { getPrototypeOf: H3 } = Object, bw = /* @__PURE__ */ ((e) => (t) => { const n = eFe.call(t); return e[n] || (e[n] = n.slice(8, -1).toLowerCase()); })(/* @__PURE__ */ Object.create(null)), Qi = (e) => (e = e.toLowerCase(), (t) => bw(t) === e), ww = (e) => (t) => typeof t === e, { isArray: Eh } = Array, j0 = ww("undefined"); function tFe(e) { return e !== null && !j0(e) && e.constructor !== null && !j0(e.constructor) && Fo(e.constructor.isBuffer) && e.constructor.isBuffer(e); } const eV = Qi("ArrayBuffer"); function nFe(e) { let t; return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && eV(e.buffer), t; } const rFe = ww("string"), Fo = ww("function"), tV = ww("number"), xw = (e) => e !== null && typeof e == "object", aFe = (e) => e === !0 || e === !1, py = (e) => { if (bw(e) !== "object") return !1; const t = H3(e); return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e); }, oFe = Qi("Date"), iFe = Qi("File"), sFe = Qi("Blob"), lFe = Qi("FileList"), uFe = (e) => xw(e) && Fo(e.pipe), cFe = (e) => { let t; return e && (typeof FormData == "function" && e instanceof FormData || Fo(e.append) && ((t = bw(e)) === "formdata" || // detect form-data instance t === "object" && Fo(e.toString) && e.toString() === "[object FormData]")); }, dFe = Qi("URLSearchParams"), [pFe, fFe, hFe, vFe] = ["ReadableStream", "Request", "Response", "Headers"].map(Qi), gFe = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ""); function Jg(e, t, { allOwnKeys: n = !1 } = {}) { if (e === null || typeof e > "u") return; let r, a; if (typeof e != "object" && (e = [e]), Eh(e)) for (r = 0, a = e.length; r < a; r++) t.call(null, e[r], r, e); else { const o = n ? Object.getOwnPropertyNames(e) : Object.keys(e), i = o.length; let s; for (r = 0; r < i; r++) s = o[r], t.call(null, e[s], s, e); } } function nV(e, t) { t = t.toLowerCase(); const n = Object.keys(e); let r = n.length, a; for (; r-- > 0; ) if (a = n[r], t === a.toLowerCase()) return a; return null; } const Uc = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, rV = (e) => !j0(e) && e !== Uc; function C5() { const { caseless: e } = rV(this) && this || {}, t = {}, n = (r, a) => { const o = e && nV(t, a) || a; py(t[o]) && py(r) ? t[o] = C5(t[o], r) : py(r) ? t[o] = C5({}, r) : Eh(r) ? t[o] = r.slice() : t[o] = r; }; for (let r = 0, a = arguments.length; r < a; r++) arguments[r] && Jg(arguments[r], n); return t; } const mFe = (e, t, n, { allOwnKeys: r } = {}) => (Jg(t, (a, o) => { n && Fo(a) ? e[o] = Jz(a, n) : e[o] = a; }, { allOwnKeys: r }), e), yFe = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), bFe = (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); }, wFe = (e, t, n, r) => { let a, o, i; const s = {}; if (t = t || {}, e == null) return t; do { for (a = Object.getOwnPropertyNames(e), o = a.length; o-- > 0; ) i = a[o], (!r || r(i, e, t)) && !s[i] && (t[i] = e[i], s[i] = !0); e = n !== !1 && H3(e); } while (e && (!n || n(e, t)) && e !== Object.prototype); return t; }, xFe = (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; }, kFe = (e) => { if (!e) return null; if (Eh(e)) return e; let t = e.length; if (!tV(t)) return null; const n = new Array(t); for (; t-- > 0; ) n[t] = e[t]; return n; }, CFe = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && H3(Uint8Array)), SFe = (e, t) => { const n = (e && e[Symbol.iterator]).call(e); let r; for (; (r = n.next()) && !r.done; ) { const a = r.value; t.call(e, a[0], a[1]); } }, EFe = (e, t) => { let n; const r = []; for (; (n = e.exec(t)) !== null; ) r.push(n); return r; }, _Fe = Qi("HTMLFormElement"), TFe = (e) => e.toLowerCase().replace( /[-_\s]([a-z\d])(\w*)/g, function(t, n, r) { return n.toUpperCase() + r; } ), CF = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), OFe = Qi("RegExp"), aV = (e, t) => { const n = Object.getOwnPropertyDescriptors(e), r = {}; Jg(n, (a, o) => { let i; (i = t(a, o, e)) !== !1 && (r[o] = i || a); }), Object.defineProperties(e, r); }, $Fe = (e) => { aV(e, (t, n) => { if (Fo(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1) return !1; const r = e[n]; if (Fo(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 + "'"); }); } }); }, FFe = (e, t) => { const n = {}, r = (a) => { a.forEach((o) => { n[o] = !0; }); }; return Eh(e) ? r(e) : r(String(e).split(t)), n; }, AFe = () => { }, IFe = (e, t) => e != null && Number.isFinite(e = +e) ? e : t, yk = "abcdefghijklmnopqrstuvwxyz", SF = "0123456789", oV = { DIGIT: SF, ALPHA: yk, ALPHA_DIGIT: yk + yk.toUpperCase() + SF }, PFe = (e = 16, t = oV.ALPHA_DIGIT) => { let n = ""; const { length: r } = t; for (; e--; ) n += t[Math.random() * r | 0]; return n; }; function LFe(e) { return !!(e && Fo(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator]); } const NFe = (e) => { const t = new Array(10), n = (r, a) => { if (xw(r)) { if (t.indexOf(r) >= 0) return; if (!("toJSON" in r)) { t[a] = r; const o = Eh(r) ? [] : {}; return Jg(r, (i, s) => { const l = n(i, a + 1); !j0(l) && (o[s] = l); }), t[a] = void 0, o; } } return r; }; return n(e, 0); }, MFe = Qi("AsyncFunction"), BFe = (e) => e && (xw(e) || Fo(e)) && Fo(e.then) && Fo(e.catch), iV = ((e, t) => e ? setImmediate : t ? ((n, r) => (Uc.addEventListener("message", ({ source: a, data: o }) => { a === Uc && o === n && r.length && r.shift()(); }, !1), (a) => { r.push(a), Uc.postMessage(n, "*"); }))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))( typeof setImmediate == "function", Fo(Uc.postMessage) ), DFe = typeof queueMicrotask < "u" ? queueMicrotask.bind(Uc) : typeof process < "u" && process.nextTick || iV, Re = { isArray: Eh, isArrayBuffer: eV, isBuffer: tFe, isFormData: cFe, isArrayBufferView: nFe, isString: rFe, isNumber: tV, isBoolean: aFe, isObject: xw, isPlainObject: py, isReadableStream: pFe, isRequest: fFe, isResponse: hFe, isHeaders: vFe, isUndefined: j0, isDate: oFe, isFile: iFe, isBlob: sFe, isRegExp: OFe, isFunction: Fo, isStream: uFe, isURLSearchParams: dFe, isTypedArray: CFe, isFileList: lFe, forEach: Jg, merge: C5, extend: mFe, trim: gFe, stripBOM: yFe, inherits: bFe, toFlatObject: wFe, kindOf: bw, kindOfTest: Qi, endsWith: xFe, toArray: kFe, forEachEntry: SFe, matchAll: EFe, isHTMLForm: _Fe, hasOwnProperty: CF, hasOwnProp: CF, // an alias to avoid ESLint no-prototype-builtins detection reduceDescriptors: aV, freezeMethods: $Fe, toObjectSet: FFe, toCamelCase: TFe, noop: AFe, toFiniteNumber: IFe, findKey: nV, global: Uc, isContextDefined: rV, ALPHABET: oV, generateString: PFe, isSpecCompliantForm: LFe, toJSONObject: NFe, isAsyncFn: MFe, isThenable: BFe, setImmediate: iV, asap: DFe }; function Xt(e, t, n, r, a) { 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), a && (this.response = a); } Re.inherits(Xt, 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: Re.toJSONObject(this.config), code: this.code, status: this.response && this.response.status ? this.response.status : null }; } }); const sV = Xt.prototype, lV = {}; [ "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) => { lV[e] = { value: e }; }); Object.defineProperties(Xt, lV); Object.defineProperty(sV, "isAxiosError", { value: !0 }); Xt.from = (e, t, n, r, a, o) => { const i = Object.create(sV); return Re.toFlatObject(e, i, function(s) { return s !== Error.prototype; }, (s) => s !== "isAxiosError"), Xt.call(i, e.message, t, n, r, a), i.cause = e, i.name = e.name, o && Object.assign(i, o), i; }; const RFe = null; function S5(e) { return Re.isPlainObject(e) || Re.isArray(e); } function uV(e) { return Re.endsWith(e, "[]") ? e.slice(0, -2) : e; } function EF(e, t, n) { return e ? e.concat(t).map(function(r, a) { return r = uV(r), !n && a ? "[" + r + "]" : r; }).join(n ? "." : "") : t; } function zFe(e) { return Re.isArray(e) && !e.some(S5); } const VFe = Re.toFlatObject(Re, {}, null, function(e) { return /^is[A-Z]/.test(e); }); function kw(e, t, n) { if (!Re.isObject(e)) throw new TypeError("target must be an object"); t = t || new FormData(), n = Re.toFlatObject(n, { metaTokens: !0, dots: !1, indexes: !1 }, !1, function(h, p) { return !Re.isUndefined(p[h]); }); const r = n.metaTokens, a = n.visitor || u, o = n.dots, i = n.indexes, s = (n.Blob || typeof Blob < "u" && Blob) && Re.isSpecCompliantForm(t); if (!Re.isFunction(a)) throw new TypeError("visitor must be a function"); function l(h) { if (h === null) return ""; if (Re.isDate(h)) return h.toISOString(); if (!s && Re.isBlob(h)) throw new Xt("Blob is not supported. Use a Buffer instead."); return Re.isArrayBuffer(h) || Re.isTypedArray(h) ? s && typeof Blob == "function" ? new Blob([h]) : Buffer.from(h) : h; } function u(h, p, v) { let m = h; if (h && !v && typeof h == "object") { if (Re.endsWith(p, "{}")) p = r ? p : p.slice(0, -2), h = JSON.stringify(h); else if (Re.isArray(h) && zFe(h) || (Re.isFileList(h) || Re.endsWith(p, "[]")) && (m = Re.toArray(h))) return p = uV(p), m.forEach(function(g, y) { !(Re.isUndefined(g) || g === null) && t.append( // eslint-disable-next-line no-nested-ternary i === !0 ? EF([p], y, o) : i === null ? p : p + "[]", l(g) ); }), !1; } return S5(h) ? !0 : (t.append(EF(v, p, o), l(h)), !1); } const c = [], d = Object.assign(VFe, { defaultVisitor: u, convertValue: l, isVisitable: S5 }); function f(h, p) { if (!Re.isUndefined(h)) { if (c.indexOf(h) !== -1) throw Error("Circular reference detected in " + p.join(".")); c.push(h), Re.forEach(h, function(v, m) { (!(Re.isUndefined(v) || v === null) && a.call( t, v, Re.isString(m) ? m.trim() : m, p, d )) === !0 && f(v, p ? p.concat(m) : [m]); }), c.pop(); } } if (!Re.isObject(e)) throw new TypeError("data must be an object"); return f(e), t; } function _F(e) { const t = { "!": "%21", "'": "%27", "(": "%28", ")": "%29", "~": "%7E", "%20": "+", "%00": "\0" }; return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(n) { return t[n]; }); } function U3(e, t) { this._pairs = [], e && kw(e, this, t); } const cV = U3.prototype; cV.append = function(e, t) { this._pairs.push([e, t]); }; cV.toString = function(e) { const t = e ? function(n) { return e.call(this, n, _F); } : _F; return this._pairs.map(function(n) { return t(n[0]) + "=" + t(n[1]); }, "").join("&"); }; function jFe(e) { return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]"); } function dV(e, t, n) { if (!t) return e; const r = n && n.encode || jFe, a = n && n.serialize; let o; if (a ? o = a(t, n) : o = Re.isURLSearchParams(t) ? t.toString() : new U3(t, n).toString(r), o) { const i = e.indexOf("#"); i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + o; } return e; } class TF { 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) { Re.forEach(this.handlers, function(n) { n !== null && t(n); }); } } const pV = { silentJSONParsing: !0, forcedJSONParsing: !0, clarifyTimeoutError: !1 }, HFe = typeof URLSearchParams < "u" ? URLSearchParams : U3, UFe = typeof FormData < "u" ? FormData : null, qFe = typeof Blob < "u" ? Blob : null, WFe = { isBrowser: !0, classes: { URLSearchParams: HFe, FormData: UFe, Blob: qFe }, protocols: ["http", "https", "file", "blob", "url", "data"] }, q3 = typeof window < "u" && typeof document < "u", KFe = ((e) => q3 && ["ReactNative", "NativeScript", "NS"].indexOf(e) < 0)(typeof navigator < "u" && navigator.product), GFe = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef self instanceof WorkerGlobalScope && typeof self.importScripts == "function", XFe = q3 && window.location.href || "http://localhost", YFe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, hasBrowserEnv: q3, hasStandardBrowserEnv: KFe, hasStandardBrowserWebWorkerEnv: GFe, origin: XFe }, Symbol.toStringTag, { value: "Module" })), zi = { ...YFe, ...WFe }; function ZFe(e, t) { return kw(e, new zi.classes.URLSearchParams(), Object.assign({ visitor: function(n, r, a, o) { return zi.isNode && Re.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments); } }, t)); } function QFe(e) { return Re.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]); } function JFe(e) { const t = {}, n = Object.keys(e); let r; const a = n.length; let o; for (r = 0; r < a; r++) o = n[r], t[o] = e[o]; return t; } function fV(e) { function t(n, r, a, o) { let i = n[o++]; if (i === "__proto__") return !0; const s = Number.isFinite(+i), l = o >= n.length; return i = !i && Re.isArray(a) ? a.length : i, l ? (Re.hasOwnProp(a, i) ? a[i] = [a[i], r] : a[i] = r, !s) : ((!a[i] || !Re.isObject(a[i])) && (a[i] = []), t(n, r, a[i], o) && Re.isArray(a[i]) && (a[i] = JFe(a[i])), !s); } if (Re.isFormData(e) && Re.isFunction(e.entries)) { const n = {}; return Re.forEachEntry(e, (r, a) => { t(QFe(r), a, n, 0); }), n; } return null; } function eAe(e, t, n) { if (Re.isString(e)) try { return (t || JSON.parse)(e), Re.trim(e); } catch (r) { if (r.name !== "SyntaxError") throw r; } return (0, JSON.stringify)(e); } const em = { transitional: pV, adapter: ["xhr", "http", "fetch"], transformRequest: [function(e, t) { const n = t.getContentType() || "", r = n.indexOf("application/json") > -1, a = Re.isObject(e); if (a && Re.isHTMLForm(e) && (e = new FormData(e)), Re.isFormData(e)) return r ? JSON.stringify(fV(e)) : e; if (Re.isArrayBuffer(e) || Re.isBuffer(e) || Re.isStream(e) || Re.isFile(e) || Re.isBlob(e) || Re.isReadableStream(e)) return e; if (Re.isArrayBufferView(e)) return e.buffer; if (Re.isURLSearchParams(e)) return t.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), e.toString(); let o; if (a) { if (n.indexOf("application/x-www-form-urlencoded") > -1) return ZFe(e, this.formSerializer).toString(); if ((o = Re.isFileList(e)) || n.indexOf("multipart/form-data") > -1) { const i = this.env && this.env.FormData; return kw( o ? { "files[]": e } : e, i && new i(), this.formSerializer ); } } return a || r ? (t.setContentType("application/json", !1), eAe(e)) : e; }], transformResponse: [function(e) { const t = this.transitional || em.transitional, n = t && t.forcedJSONParsing, r = this.responseType === "json"; if (Re.isResponse(e) || Re.isReadableStream(e)) return e; if (e && Re.isString(e) && (n && !this.responseType || r)) { const a = !(t && t.silentJSONParsing) && r; try { return JSON.parse(e); } catch (o) { if (a) throw o.name === "SyntaxError" ? Xt.from(o, Xt.ERR_BAD_RESPONSE, this, null, this.response) : o; } } 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: zi.classes.FormData, Blob: zi.classes.Blob }, validateStatus: function(e) { return e >= 200 && e < 300; }, headers: { common: { Accept: "application/json, text/plain, */*", "Content-Type": void 0 } } }; Re.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => { em.headers[e] = {}; }); const tAe = Re.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" ]), nAe = (e) => { const t = {}; let n, r, a; return e && e.split(` `).forEach(function(o) { a = o.indexOf(":"), n = o.substring(0, a).trim().toLowerCase(), r = o.substring(a + 1).trim(), !(!n || t[n] && tAe[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r); }), t; }, OF = Symbol("internals"); function lv(e) { return e && String(e).trim().toLowerCase(); } function fy(e) { return e === !1 || e == null ? e : Re.isArray(e) ? e.map(fy) : String(e); } function rAe(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 aAe = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()); function bk(e, t, n, r, a) { if (Re.isFunction(r)) return r.call(this, t, n); if (a && (t = n), !!Re.isString(t)) { if (Re.isString(r)) return t.indexOf(r) !== -1; if (Re.isRegExp(r)) return r.test(t); } } function oAe(e) { return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r); } function iAe(e, t) { const n = Re.toCamelCase(" " + t); ["get", "set", "has"].forEach((r) => { Object.defineProperty(e, r + n, { value: function(a, o, i) { return this[r].call(this, t, a, o, i); }, configurable: !0 }); }); } class po { constructor(t) { t && this.set(t); } set(t, n, r) { const a = this; function o(s, l, u) { const c = lv(l); if (!c) throw new Error("header name must be a non-empty string"); const d = Re.findKey(a, c); (!d || a[d] === void 0 || u === !0 || u === void 0 && a[d] !== !1) && (a[d || l] = fy(s)); } const i = (s, l) => Re.forEach(s, (u, c) => o(u, c, l)); if (Re.isPlainObject(t) || t instanceof this.constructor) i(t, n); else if (Re.isString(t) && (t = t.trim()) && !aAe(t)) i(nAe(t), n); else if (Re.isHeaders(t)) for (const [s, l] of t.entries()) o(l, s, r); else t != null && o(n, t, r); return this; } get(t, n) { if (t = lv(t), t) { const r = Re.findKey(this, t); if (r) { const a = this[r]; if (!n) return a; if (n === !0) return rAe(a); if (Re.isFunction(n)) return n.call(this, a, r); if (Re.isRegExp(n)) return n.exec(a); throw new TypeError("parser must be boolean|regexp|function"); } } } has(t, n) { if (t = lv(t), t) { const r = Re.findKey(this, t); return !!(r && this[r] !== void 0 && (!n || bk(this, this[r], r, n))); } return !1; } delete(t, n) { const r = this; let a = !1; function o(i) { if (i = lv(i), i) { const s = Re.findKey(r, i); s && (!n || bk(r, r[s], s, n)) && (delete r[s], a = !0); } } return Re.isArray(t) ? t.forEach(o) : o(t), a; } clear(t) { const n = Object.keys(this); let r = n.length, a = !1; for (; r--; ) { const o = n[r]; (!t || bk(this, this[o], o, t, !0)) && (delete this[o], a = !0); } return a; } normalize(t) { const n = this, r = {}; return Re.forEach(this, (a, o) => { const i = Re.findKey(r, o); if (i) { n[i] = fy(a), delete n[o]; return; } const s = t ? oAe(o) : String(o).trim(); s !== o && delete n[o], n[s] = fy(a), r[s] = !0; }), this; } concat(...t) { return this.constructor.concat(this, ...t); } toJSON(t) { const n = /* @__PURE__ */ Object.create(null); return Re.forEach(this, (r, a) => { r != null && r !== !1 && (n[a] = t && Re.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(` `); } 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((a) => r.set(a)), r; } static accessor(t) { const n = (this[OF] = this[OF] = { accessors: {} }).accessors, r = this.prototype; function a(o) { const i = lv(o); n[i] || (iAe(r, o), n[i] = !0); } return Re.isArray(t) ? t.forEach(a) : a(t), this; } } po.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]); Re.reduceDescriptors(po.prototype, ({ value: e }, t) => { let n = t[0].toUpperCase() + t.slice(1); return { get: () => e, set(r) { this[n] = r; } }; }); Re.freezeMethods(po); function wk(e, t) { const n = this || em, r = t || n, a = po.from(r.headers); let o = r.data; return Re.forEach(e, function(i) { o = i.call(n, o, a.normalize(), t ? t.status : void 0); }), a.normalize(), o; } function hV(e) { return !!(e && e.__CANCEL__); } function _h(e, t, n) { Xt.call(this, e ?? "canceled", Xt.ERR_CANCELED, t, n), this.name = "CanceledError"; } Re.inherits(_h, Xt, { __CANCEL__: !0 }); function vV(e, t, n) { const r = n.config.validateStatus; !n.status || !r || r(n.status) ? e(n) : t(new Xt( "Request failed with status code " + n.status, [Xt.ERR_BAD_REQUEST, Xt.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4], n.config, n.request, n )); } function sAe(e) { const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e); return t && t[1] || ""; } function lAe(e, t) { e = e || 10; const n = new Array(e), r = new Array(e); let a = 0, o = 0, i; return t = t !== void 0 ? t : 1e3, function(s) { const l = Date.now(), u = r[o]; i || (i = l), n[a] = s, r[a] = l; let c = o, d = 0; for (; c !== a; ) d += n[c++], c = c % e; if (a = (a + 1) % e, a === o && (o = (o + 1) % e), l - i < t) return; const f = u && l - u; return f ? Math.round(d * 1e3 / f) : void 0; }; } function uAe(e, t) { let n = 0, r = 1e3 / t, a, o; const i = (s, l = Date.now()) => { n = l, a = null, o && (clearTimeout(o), o = null), e.apply(null, s); }; return [(...s) => { const l = Date.now(), u = l - n; u >= r ? i(s, l) : (a = s, o || (o = setTimeout(() => { o = null, i(a); }, r - u))); }, () => a && i(a)]; } const mb = (e, t, n = 3) => { let r = 0; const a = lAe(50, 250); return uAe((o) => { const i = o.loaded, s = o.lengthComputable ? o.total : void 0, l = i - r, u = a(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: o, lengthComputable: s != null, [t ? "download" : "upload"]: !0 }; e(d); }, n); }, $F = (e, t) => { const n = e != null; return [(r) => t[0]({ lengthComputable: n, total: e, loaded: r }), t[1]]; }, FF = (e) => (...t) => Re.asap(() => e(...t)), cAe = zi.hasStandardBrowserEnv ? ( // Standard browser envs have full support of the APIs needed to test // whether the request URL is of the same origin as current location. function() { const e = /(msie|trident)/i.test(navigator.userAgent), t = document.createElement("a"); let n; function r(a) { let o = a; return e && (t.setAttribute("href", o), o = t.href), t.setAttribute("href", o), { href: t.href, protocol: t.protocol ? t.protocol.replace(/:$/, "") : "", host: t.host, search: t.search ? t.search.replace(/^\?/, "") : "", hash: t.hash ? t.hash.replace(/^#/, "") : "", hostname: t.hostname, port: t.port, pathname: t.pathname.charAt(0) === "/" ? t.pathname : "/" + t.pathname }; } return n = r(window.location.href), function(a) { const o = Re.isString(a) ? r(a) : a; return o.protocol === n.protocol && o.host === n.host; }; }() ) : ( // Non standard browser envs (web workers, react-native) lack needed support. /* @__PURE__ */ function() { return function() { return !0; }; }() ), dAe = zi.hasStandardBrowserEnv ? ( // Standard browser envs support document.cookie { write(e, t, n, r, a, o) { const i = [e + "=" + encodeURIComponent(t)]; Re.isNumber(n) && i.push("expires=" + new Date(n).toGMTString()), Re.isString(r) && i.push("path=" + r), Re.isString(a) && i.push("domain=" + a), o === !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 pAe(e) { return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e); } function fAe(e, t) { return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e; } function gV(e, t) { return e && !pAe(t) ? fAe(e, t) : t; } const AF = (e) => e instanceof po ? { ...e } : e; function _d(e, t) { t = t || {}; const n = {}; function r(u, c, d) { return Re.isPlainObject(u) && Re.isPlainObject(c) ? Re.merge.call({ caseless: d }, u, c) : Re.isPlainObject(c) ? Re.merge({}, c) : Re.isArray(c) ? c.slice() : c; } function a(u, c, d) { if (Re.isUndefined(c)) { if (!Re.isUndefined(u)) return r(void 0, u, d); } else return r(u, c, d); } function o(u, c) { if (!Re.isUndefined(c)) return r(void 0, c); } function i(u, c) { if (Re.isUndefined(c)) { if (!Re.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: o, method: o, data: o, 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) => a(AF(u), AF(c), !0) }; return Re.forEach(Object.keys(Object.assign({}, e, t)), function(u) { const c = l[u] || a, d = c(e[u], t[u], u); Re.isUndefined(d) && c !== s || (n[u] = d); }), n; } const mV = (e) => { const t = _d({}, e); let { data: n, withXSRFToken: r, xsrfHeaderName: a, xsrfCookieName: o, headers: i, auth: s } = t; t.headers = i = po.from(i), t.url = dV(gV(t.baseURL, t.url), e.params, e.paramsSerializer), s && i.set( "Authorization", "Basic " + btoa((s.username || "") + ":" + (s.password ? unescape(encodeURIComponent(s.password)) : "")) ); let l; if (Re.isFormData(n)) { if (zi.hasStandardBrowserEnv || zi.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 (zi.hasStandardBrowserEnv && (r && Re.isFunction(r) && (r = r(t)), r || r !== !1 && cAe(t.url))) { const u = a && o && dAe.read(o); u && i.set(a, u); } return t; }, hAe = typeof XMLHttpRequest < "u", vAe = hAe && function(e) { return new Promise(function(t, n) { const r = mV(e); let a = r.data; const o = po.from(r.headers).normalize(); let { responseType: i, onUploadProgress: s, onDownloadProgress: l } = r, u, c, d, f, h; function p() { f && f(), 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 y = po.from( "getAllResponseHeaders" in v && v.getAllResponseHeaders() ), x = { data: !i || i === "text" || i === "json" ? v.responseText : v.response, status: v.status, statusText: v.statusText, headers: y, config: e, request: v }; vV(function(w) { t(w), p(); }, function(w) { n(w), p(); }, 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 Xt("Request aborted", Xt.ECONNABORTED, e, v)), v = null); }, v.onerror = function() { n(new Xt("Network Error", Xt.ERR_NETWORK, e, v)), v = null; }, v.ontimeout = function() { let y = r.timeout ? "timeout of " + r.timeout + "ms exceeded" : "timeout exceeded"; const x = r.transitional || pV; r.timeoutErrorMessage && (y = r.timeoutErrorMessage), n(new Xt( y, x.clarifyTimeoutError ? Xt.ETIMEDOUT : Xt.ECONNABORTED, e, v )), v = null; }, a === void 0 && o.setContentType(null), "setRequestHeader" in v && Re.forEach(o.toJSON(), function(y, x) { v.setRequestHeader(x, y); }), Re.isUndefined(r.withCredentials) || (v.withCredentials = !!r.withCredentials), i && i !== "json" && (v.responseType = r.responseType), l && ([d, h] = mb(l, !0), v.addEventListener("progress", d)), s && v.upload && ([c, f] = mb(s), v.upload.addEventListener("progress", c), v.upload.addEventListener("loadend", f)), (r.cancelToken || r.signal) && (u = (y) => { v && (n(!y || y.type ? new _h(null, e, v) : y), v.abort(), v = null); }, r.cancelToken && r.cancelToken.subscribe(u), r.signal && (r.signal.aborted ? u() : r.signal.addEventListener("abort", u))); const g = sAe(r.url); if (g && zi.protocols.indexOf(g) === -1) { n(new Xt("Unsupported protocol " + g + ":", Xt.ERR_BAD_REQUEST, e)); return; } v.send(a || null); }); }, gAe = (e, t) => { let n = new AbortController(), r; const a = function(l) { if (!r) { r = !0, i(); const u = l instanceof Error ? l : this.reason; n.abort(u instanceof Xt ? u : new _h(u instanceof Error ? u.message : u)); } }; let o = t && setTimeout(() => { a(new Xt(`timeout ${t} of ms exceeded`, Xt.ETIMEDOUT)); }, t); const i = () => { e && (o && clearTimeout(o), o = null, e.forEach((l) => { l && (l.removeEventListener ? l.removeEventListener("abort", a) : l.unsubscribe(a)); }), e = null); }; e.forEach((l) => l && l.addEventListener && l.addEventListener("abort", a)); const { signal: s } = n; return s.unsubscribe = i, [s, () => { o && clearTimeout(o), o = null; }]; }, mAe = function* (e, t) { let n = e.byteLength; if (n < t) { yield e; return; } let r = 0, a; for (; r < n; ) a = r + t, yield e.slice(r, a), r = a; }, yAe = async function* (e, t, n) { for await (const r of e) yield* mAe(ArrayBuffer.isView(r) ? r : await n(String(r)), t); }, IF = (e, t, n, r, a) => { const o = yAe(e, t, a); let i = 0, s, l = (u) => { s || (s = !0, r && r(u)); }; return new ReadableStream({ async pull(u) { try { const { done: c, value: d } = await o.next(); if (c) { l(), u.close(); return; } let f = d.byteLength; if (n) { let h = i += f; n(h); } u.enqueue(new Uint8Array(d)); } catch (c) { throw l(c), c; } }, cancel(u) { return l(u), o.return(); } }, { highWaterMark: 2 }); }, Cw = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", yV = Cw && typeof ReadableStream == "function", E5 = Cw && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), bV = (e, ...t) => { try { return !!e(...t); } catch { return !1; } }, bAe = yV && bV(() => { let e = !1; const t = new Request(zi.origin, { body: new ReadableStream(), method: "POST", get duplex() { return e = !0, "half"; } }).headers.has("Content-Type"); return e && !t; }), PF = 64 * 1024, _5 = yV && bV(() => Re.isReadableStream(new Response("").body)), yb = { stream: _5 && ((e) => e.body) }; Cw && ((e) => { ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => { !yb[t] && (yb[t] = Re.isFunction(e[t]) ? (n) => n[t]() : (n, r) => { throw new Xt(`Response type '${t}' is not supported`, Xt.ERR_NOT_SUPPORT, r); }); }); })(new Response()); const wAe = async (e) => { if (e == null) return 0; if (Re.isBlob(e)) return e.size; if (Re.isSpecCompliantForm(e)) return (await new Request(e).arrayBuffer()).byteLength; if (Re.isArrayBufferView(e) || Re.isArrayBuffer(e)) return e.byteLength; if (Re.isURLSearchParams(e) && (e = e + ""), Re.isString(e)) return (await E5(e)).byteLength; }, xAe = async (e, t) => Re.toFiniteNumber(e.getContentLength()) ?? wAe(t), kAe = Cw && (async (e) => { let { url: t, method: n, data: r, signal: a, cancelToken: o, timeout: i, onDownloadProgress: s, onUploadProgress: l, responseType: u, headers: c, withCredentials: d = "same-origin", fetchOptions: f } = mV(e); u = u ? (u + "").toLowerCase() : "text"; let [h, p] = a || o || i ? gAe([a, o], i) : [], v, m; const g = () => { !v && setTimeout(() => { h && h.unsubscribe(); }), v = !0; }; let y; try { if (l && bAe && n !== "get" && n !== "head" && (y = await xAe(c, r)) !== 0) { let C = new Request(t, { method: "POST", body: r, duplex: "half" }), S; if (Re.isFormData(r) && (S = C.headers.get("content-type")) && c.setContentType(S), C.body) { const [_, T] = $F( y, mb(FF(l)) ); r = IF(C.body, PF, _, T, E5); } } Re.isString(d) || (d = d ? "include" : "omit"), m = new Request(t, { ...f, signal: h, method: n.toUpperCase(), headers: c.normalize().toJSON(), body: r, duplex: "half", credentials: d }); let x = await fetch(m); const w = _5 && (u === "stream" || u === "response"); if (_5 && (s || w)) { const C = {}; ["status", "statusText", "headers"].forEach((O) => { C[O] = x[O]; }); const S = Re.toFiniteNumber(x.headers.get("content-length")), [_, T] = s && $F( S, mb(FF(s), !0) ) || []; x = new Response( IF(x.body, PF, _, () => { T && T(), w && g(); }, E5), C ); } u = u || "text"; let k = await yb[Re.findKey(yb, u) || "text"](x, e); return !w && g(), p && p(), await new Promise((C, S) => { vV(C, S, { data: k, headers: po.from(x.headers), status: x.status, statusText: x.statusText, config: e, request: m }); }); } catch (x) { throw g(), x && x.name === "TypeError" && /fetch/i.test(x.message) ? Object.assign( new Xt("Network Error", Xt.ERR_NETWORK, e, m), { cause: x.cause || x } ) : Xt.from(x, x && x.code, e, m); } }), T5 = { http: RFe, xhr: vAe, fetch: kAe }; Re.forEach(T5, (e, t) => { if (e) { try { Object.defineProperty(e, "name", { value: t }); } catch { } Object.defineProperty(e, "adapterName", { value: t }); } }); const LF = (e) => `- ${e}`, CAe = (e) => Re.isFunction(e) || e === null || e === !1, wV = { getAdapter: (e) => { e = Re.isArray(e) ? e : [e]; const { length: t } = e; let n, r; const a = {}; for (let o = 0; o < t; o++) { n = e[o]; let i; if (r = n, !CAe(n) && (r = T5[(i = String(n)).toLowerCase()], r === void 0)) throw new Xt(`Unknown adapter '${i}'`); if (r) break; a[i || "#" + o] = r; } if (!r) { const o = Object.entries(a).map( ([s, l]) => `adapter ${s} ` + (l === !1 ? "is not supported by the environment" : "is not available in the build") ); let i = t ? o.length > 1 ? `since : ` + o.map(LF).join(` `) : " " + LF(o[0]) : "as no adapter specified"; throw new Xt( "There is no suitable adapter to dispatch the request " + i, "ERR_NOT_SUPPORT" ); } return r; }, adapters: T5 }; function xk(e) { if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted) throw new _h(null, e); } function NF(e) { return xk(e), e.headers = po.from(e.headers), e.data = wk.call( e, e.transformRequest ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), wV.getAdapter(e.adapter || em.adapter)(e).then(function(t) { return xk(e), t.data = wk.call( e, e.transformResponse, t ), t.headers = po.from(t.headers), t; }, function(t) { return hV(t) || (xk(e), t && t.response && (t.response.data = wk.call( e, e.transformResponse, t.response ), t.response.headers = po.from(t.response.headers))), Promise.reject(t); }); } const xV = "1.7.4", W3 = {}; ["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => { W3[e] = function(n) { return typeof n === e || "a" + (t < 1 ? "n " : " ") + e; }; }); const MF = {}; W3.transitional = function(e, t, n) { function r(a, o) { return "[Axios v" + xV + "] Transitional option '" + a + "'" + o + (n ? ". " + n : ""); } return (a, o, i) => { if (e === !1) throw new Xt( r(o, " has been removed" + (t ? " in " + t : "")), Xt.ERR_DEPRECATED ); return t && !MF[o] && (MF[o] = !0, console.warn( r( o, " has been deprecated since v" + t + " and will be removed in the near future" ) )), e ? e(a, o, i) : !0; }; }; function SAe(e, t, n) { if (typeof e != "object") throw new Xt("options must be an object", Xt.ERR_BAD_OPTION_VALUE); const r = Object.keys(e); let a = r.length; for (; a-- > 0; ) { const o = r[a], i = t[o]; if (i) { const s = e[o], l = s === void 0 || i(s, o, e); if (l !== !0) throw new Xt("option " + o + " must be " + l, Xt.ERR_BAD_OPTION_VALUE); continue; } if (n !== !0) throw new Xt("Unknown option " + o, Xt.ERR_BAD_OPTION); } } const O5 = { assertOptions: SAe, validators: W3 }, Xl = O5.validators; class ad { constructor(t) { this.defaults = t, this.interceptors = { request: new TF(), response: new TF() }; } /** * 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 a; Error.captureStackTrace ? Error.captureStackTrace(a = {}) : a = new Error(); const o = a.stack ? a.stack.replace(/^.+\n/, "") : ""; try { r.stack ? o && !String(r.stack).endsWith(o.replace(/^.+\n.+\n/, "")) && (r.stack += ` ` + o) : r.stack = o; } catch { } } throw r; } } _request(t, n) { typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = _d(this.defaults, n); const { transitional: r, paramsSerializer: a, headers: o } = n; r !== void 0 && O5.assertOptions(r, { silentJSONParsing: Xl.transitional(Xl.boolean), forcedJSONParsing: Xl.transitional(Xl.boolean), clarifyTimeoutError: Xl.transitional(Xl.boolean) }, !1), a != null && (Re.isFunction(a) ? n.paramsSerializer = { serialize: a } : O5.assertOptions(a, { encode: Xl.function, serialize: Xl.function }, !0)), n.method = (n.method || this.defaults.method || "get").toLowerCase(); let i = o && Re.merge( o.common, o[n.method] ); o && Re.forEach( ["delete", "get", "head", "post", "put", "patch", "common"], (p) => { delete o[p]; } ), n.headers = po.concat(i, o); const s = []; let l = !0; this.interceptors.request.forEach(function(p) { typeof p.runWhen == "function" && p.runWhen(n) === !1 || (l = l && p.synchronous, s.unshift(p.fulfilled, p.rejected)); }); const u = []; this.interceptors.response.forEach(function(p) { u.push(p.fulfilled, p.rejected); }); let c, d = 0, f; if (!l) { const p = [NF.bind(this), void 0]; for (p.unshift.apply(p, s), p.push.apply(p, u), f = p.length, c = Promise.resolve(n); d < f; ) c = c.then(p[d++], p[d++]); return c; } f = s.length; let h = n; for (d = 0; d < f; ) { const p = s[d++], v = s[d++]; try { h = p(h); } catch (m) { v.call(this, m); break; } } try { c = NF.call(this, h); } catch (p) { return Promise.reject(p); } for (d = 0, f = u.length; d < f; ) c = c.then(u[d++], u[d++]); return c; } getUri(t) { t = _d(this.defaults, t); const n = gV(t.baseURL, t.url); return dV(n, t.params, t.paramsSerializer); } } Re.forEach(["delete", "get", "head", "options"], function(e) { ad.prototype[e] = function(t, n) { return this.request(_d(n || {}, { method: e, url: t, data: (n || {}).data })); }; }); Re.forEach(["post", "put", "patch"], function(e) { function t(n) { return function(r, a, o) { return this.request(_d(o || {}, { method: e, headers: n ? { "Content-Type": "multipart/form-data" } : {}, url: r, data: a })); }; } ad.prototype[e] = t(), ad.prototype[e + "Form"] = t(!0); }); class K3 { constructor(t) { if (typeof t != "function") throw new TypeError("executor must be a function."); let n; this.promise = new Promise(function(a) { n = a; }); const r = this; this.promise.then((a) => { if (!r._listeners) return; let o = r._listeners.length; for (; o-- > 0; ) r._listeners[o](a); r._listeners = null; }), this.promise.then = (a) => { let o; const i = new Promise((s) => { r.subscribe(s), o = s; }).then(a); return i.cancel = function() { r.unsubscribe(o); }, i; }, t(function(a, o, i) { r.reason || (r.reason = new _h(a, o, 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); } /** * Returns an object that contains a new `CancelToken` and a function that, when called, * cancels the `CancelToken`. */ static source() { let t; return { token: new K3(function(n) { t = n; }), cancel: t }; } } function EAe(e) { return function(t) { return e.apply(null, t); }; } function _Ae(e) { return Re.isObject(e) && e.isAxiosError === !0; } const $5 = { 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($5).forEach(([e, t]) => { $5[t] = e; }); function kV(e) { const t = new ad(e), n = Jz(ad.prototype.request, t); return Re.extend(n, ad.prototype, t, { allOwnKeys: !0 }), Re.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(r) { return kV(_d(e, r)); }, n; } const xr = kV(em); xr.Axios = ad; xr.CanceledError = _h; xr.CancelToken = K3; xr.isCancel = hV; xr.VERSION = xV; xr.toFormData = kw; xr.AxiosError = Xt; xr.Cancel = xr.CanceledError; xr.all = function(e) { return Promise.all(e); }; xr.spread = EAe; xr.isAxiosError = _Ae; xr.mergeConfig = _d; xr.AxiosHeaders = po; xr.formToJSON = (e) => fV(Re.isHTMLForm(e) ? new FormData(e) : e); xr.getAdapter = wV.getAdapter; xr.HttpStatusCode = $5; xr.default = xr; const TAe = "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", OAe = { //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: TAe }; }, methods: { async getRequest(e, t, n) { return await xr({ 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 a; if (e && t) { const o = this.findEntryWithPathInArray(t, e.datacite.isSourceOf.path[0]); o && (a = this.findEntryWithPathInArray(n, o.datacite.isSourceOf.path[0])); } if (a) return a; 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}`, a = {}; this.getRequest(r, a, 2e4).then( (o) => { let i = t.find((l) => l.id === n.id); const s = o.name; s && (i.title = s); }, (o) => (o.message.includes("timeout") && o.message.includes("exceeded") && n.fetchAttempts < 3 && (n.fetchAttempts += 1, this.getImageInfoFromBiolucida(e, t, n)), Promise.reject("Maximum iterations reached.")) ); } } }, G3 = (e, t) => { const n = e.__vccOpts || e; for (const [r, a] of t) n[r] = a; return n; }, $Ae = { class: "indicator-container" }, FAe = ["onClick"], AAe = { __name: "IndexIndicator", props: { count: { type: Number, default: 0 }, current: { type: Number, default: 0 } }, emits: ["clicked"], setup(e, { emit: t }) { const n = t; return (r, a) => (I(), j("div", $Ae, [ (I(!0), j(Qe, null, Nt(e.count, (o, i) => (I(), j("div", { key: "indicator_" + o, class: H(["indicator", { active: e.current === i }]), onClick: (s) => n("clicked", i) }, null, 10, FAe))), 128)) ])); } }, IAe = /* @__PURE__ */ G3(AAe, [["__scopeId", "data-v-afcfce15"]]), el = (e, t, { checkForDefaultPrevented: n = !0 } = {}) => (r) => { const a = e == null ? void 0 : e(r); if (n === !1 || !a) return t == null ? void 0 : t(r); }; var BF; const Ao = typeof window < "u", PAe = (e) => typeof e == "string", CV = () => { }, LAe = Ao && ((BF = window == null ? void 0 : window.navigator) == null ? void 0 : BF.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent); function SV(e) { return typeof e == "function" ? e() : b(e); } function NAe(e) { return e; } function EV(e) { return hg() ? (ah(e), !0) : !1; } function qc(e) { var t; const n = SV(e); return (t = n == null ? void 0 : n.$el) != null ? t : n; } const _V = Ao ? window : void 0; function kk(...e) { let t, n, r, a; if (PAe(e[0]) || Array.isArray(e[0]) ? ([n, r, a] = e, t = _V) : [t, n, r, a] = e, !t) return CV; Array.isArray(n) || (n = [n]), Array.isArray(r) || (r = [r]); const o = [], i = () => { o.forEach((c) => c()), o.length = 0; }, s = (c, d, f, h) => (c.addEventListener(d, f, h), () => c.removeEventListener(d, f, h)), l = be(() => [qc(t), SV(a)], ([c, d]) => { i(), c && o.push(...n.flatMap((f) => r.map((h) => s(c, f, h, d)))); }, { immediate: !0, flush: "post" }), u = () => { l(), i(); }; return EV(u), u; } let DF = !1; function MAe(e, t, n = {}) { const { window: r = _V, ignore: a = [], capture: o = !0, detectIframe: i = !1 } = n; if (!r) return; LAe && !DF && (DF = !0, Array.from(r.document.body.children).forEach((c) => c.addEventListener("click", CV))); let s = !0; const l = (c) => a.some((d) => { if (typeof d == "string") return Array.from(r.document.querySelectorAll(d)).some((f) => f === c.target || c.composedPath().includes(f)); { const f = qc(d); return f && (c.target === f || c.composedPath().includes(f)); } }), u = [ kk(r, "click", (c) => { const d = qc(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: o }), kk(r, "pointerdown", (c) => { const d = qc(e); d && (s = !c.composedPath().includes(d) && !l(c)); }, { passive: !0 }), i && kk(r, "blur", (c) => { var d; const f = qc(e); ((d = r.document.activeElement) == null ? void 0 : d.tagName) === "IFRAME" && !(f != null && f.contains(r.document.activeElement)) && t(c); }) ].filter(Boolean); return () => u.forEach((c) => c()); } const RF = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, zF = "__vueuse_ssr_handlers__"; RF[zF] = RF[zF] || {}; var VF; (function(e) { e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE"; })(VF || (VF = {})); var BAe = Object.defineProperty, jF = Object.getOwnPropertySymbols, DAe = Object.prototype.hasOwnProperty, RAe = Object.prototype.propertyIsEnumerable, HF = (e, t, n) => t in e ? BAe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, zAe = (e, t) => { for (var n in t || (t = {})) DAe.call(t, n) && HF(e, n, t[n]); if (jF) for (var n of jF(t)) RAe.call(t, n) && HF(e, n, t[n]); return e; }; const VAe = { 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] }; zAe({ linear: NAe }, VAe); /** * @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 bb = () => { }, jAe = Object.prototype.hasOwnProperty, UF = (e, t) => jAe.call(e, t), HAe = Array.isArray, Av = (e) => typeof e == "function", Th = (e) => typeof e == "string", tm = (e) => e !== null && typeof e == "object", TV = (e) => { const t = /* @__PURE__ */ Object.create(null); return (n) => t[n] || (t[n] = e(n)); }, UAe = /-(\w)/g, qAe = TV((e) => e.replace(UAe, (t, n) => n ? n.toUpperCase() : "")), WAe = /\B([A-Z])/g, KAe = TV( (e) => e.replace(WAe, "-$1").toLowerCase() ); var GAe = typeof global == "object" && global && global.Object === Object && global, XAe = typeof self == "object" && self && self.Object === Object && self, X3 = GAe || XAe || Function("return this")(), Yu = X3.Symbol, OV = Object.prototype, YAe = OV.hasOwnProperty, ZAe = OV.toString, uv = Yu ? Yu.toStringTag : void 0; function QAe(e) { var t = YAe.call(e, uv), n = e[uv]; try { e[uv] = void 0; var r = !0; } catch { } var a = ZAe.call(e); return r && (t ? e[uv] = n : delete e[uv]), a; } var JAe = Object.prototype, e9e = JAe.toString; function t9e(e) { return e9e.call(e); } var n9e = "[object Null]", r9e = "[object Undefined]", qF = Yu ? Yu.toStringTag : void 0; function Y3(e) { return e == null ? e === void 0 ? r9e : n9e : qF && qF in Object(e) ? QAe(e) : t9e(e); } function Z3(e) { return e != null && typeof e == "object"; } var a9e = "[object Symbol]"; function Q3(e) { return typeof e == "symbol" || Z3(e) && Y3(e) == a9e; } function o9e(e, t) { for (var n = -1, r = e == null ? 0 : e.length, a = Array(r); ++n < r; ) a[n] = t(e[n], n, e); return a; } var nm = Array.isArray, i9e = 1 / 0, WF = Yu ? Yu.prototype : void 0, KF = WF ? WF.toString : void 0; function $V(e) { if (typeof e == "string") return e; if (nm(e)) return o9e(e, $V) + ""; if (Q3(e)) return KF ? KF.call(e) : ""; var t = e + ""; return t == "0" && 1 / e == -i9e ? "-0" : t; } function wb(e) { var t = typeof e; return e != null && (t == "object" || t == "function"); } function s9e(e) { return e; } var l9e = "[object AsyncFunction]", u9e = "[object Function]", c9e = "[object GeneratorFunction]", d9e = "[object Proxy]"; function p9e(e) { if (!wb(e)) return !1; var t = Y3(e); return t == u9e || t == c9e || t == l9e || t == d9e; } var Ck = X3["__core-js_shared__"], GF = function() { var e = /[^.]+$/.exec(Ck && Ck.keys && Ck.keys.IE_PROTO || ""); return e ? "Symbol(src)_1." + e : ""; }(); function f9e(e) { return !!GF && GF in e; } var h9e = Function.prototype, v9e = h9e.toString; function g9e(e) { if (e != null) { try { return v9e.call(e); } catch { } try { return e + ""; } catch { } } return ""; } var m9e = /[\\^$.*+?()[\]{}|]/g, y9e = /^\[object .+?Constructor\]$/, b9e = Function.prototype, w9e = Object.prototype, x9e = b9e.toString, k9e = w9e.hasOwnProperty, C9e = RegExp( "^" + x9e.call(k9e).replace(m9e, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$" ); function S9e(e) { if (!wb(e) || f9e(e)) return !1; var t = p9e(e) ? C9e : y9e; return t.test(g9e(e)); } function E9e(e, t) { return e == null ? void 0 : e[t]; } function J3(e, t) { var n = E9e(e, t); return S9e(n) ? n : void 0; } function _9e(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 T9e = 800, O9e = 16, $9e = Date.now; function F9e(e) { var t = 0, n = 0; return function() { var r = $9e(), a = O9e - (r - n); if (n = r, a > 0) { if (++t >= T9e) return arguments[0]; } else t = 0; return e.apply(void 0, arguments); }; } function A9e(e) { return function() { return e; }; } var xb = function() { try { var e = J3(Object, "defineProperty"); return e({}, "", {}), e; } catch { } }(), I9e = xb ? function(e, t) { return xb(e, "toString", { configurable: !0, enumerable: !1, value: A9e(t), writable: !0 }); } : s9e, P9e = F9e(I9e), L9e = 9007199254740991, N9e = /^(?:0|[1-9]\d*)$/; function FV(e, t) { var n = typeof e; return t = t ?? L9e, !!t && (n == "number" || n != "symbol" && N9e.test(e)) && e > -1 && e % 1 == 0 && e < t; } function M9e(e, t, n) { t == "__proto__" && xb ? xb(e, t, { configurable: !0, enumerable: !0, value: n, writable: !0 }) : e[t] = n; } function AV(e, t) { return e === t || e !== e && t !== t; } var B9e = Object.prototype, D9e = B9e.hasOwnProperty; function R9e(e, t, n) { var r = e[t]; (!(D9e.call(e, t) && AV(r, n)) || n === void 0 && !(t in e)) && M9e(e, t, n); } var XF = Math.max; function z9e(e, t, n) { return t = XF(t === void 0 ? e.length - 1 : t, 0), function() { for (var r = arguments, a = -1, o = XF(r.length - t, 0), i = Array(o); ++a < o; ) i[a] = r[t + a]; a = -1; for (var s = Array(t + 1); ++a < t; ) s[a] = r[a]; return s[t] = n(i), _9e(e, this, s); }; } var V9e = 9007199254740991; function j9e(e) { return typeof e == "number" && e > -1 && e % 1 == 0 && e <= V9e; } var H9e = "[object Arguments]"; function YF(e) { return Z3(e) && Y3(e) == H9e; } var IV = Object.prototype, U9e = IV.hasOwnProperty, q9e = IV.propertyIsEnumerable, PV = YF(/* @__PURE__ */ function() { return arguments; }()) ? YF : function(e) { return Z3(e) && U9e.call(e, "callee") && !q9e.call(e, "callee"); }, W9e = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, K9e = /^\w*$/; function G9e(e, t) { if (nm(e)) return !1; var n = typeof e; return n == "number" || n == "symbol" || n == "boolean" || e == null || Q3(e) ? !0 : K9e.test(e) || !W9e.test(e) || t != null && e in Object(t); } var H0 = J3(Object, "create"); function X9e() { this.__data__ = H0 ? H0(null) : {}, this.size = 0; } function Y9e(e) { var t = this.has(e) && delete this.__data__[e]; return this.size -= t ? 1 : 0, t; } var Z9e = "__lodash_hash_undefined__", Q9e = Object.prototype, J9e = Q9e.hasOwnProperty; function eIe(e) { var t = this.__data__; if (H0) { var n = t[e]; return n === Z9e ? void 0 : n; } return J9e.call(t, e) ? t[e] : void 0; } var tIe = Object.prototype, nIe = tIe.hasOwnProperty; function rIe(e) { var t = this.__data__; return H0 ? t[e] !== void 0 : nIe.call(t, e); } var aIe = "__lodash_hash_undefined__"; function oIe(e, t) { var n = this.__data__; return this.size += this.has(e) ? 0 : 1, n[e] = H0 && t === void 0 ? aIe : t, this; } function Td(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]); } } Td.prototype.clear = X9e; Td.prototype.delete = Y9e; Td.prototype.get = eIe; Td.prototype.has = rIe; Td.prototype.set = oIe; function iIe() { this.__data__ = [], this.size = 0; } function Sw(e, t) { for (var n = e.length; n--; ) if (AV(e[n][0], t)) return n; return -1; } var sIe = Array.prototype, lIe = sIe.splice; function uIe(e) { var t = this.__data__, n = Sw(t, e); if (n < 0) return !1; var r = t.length - 1; return n == r ? t.pop() : lIe.call(t, n, 1), --this.size, !0; } function cIe(e) { var t = this.__data__, n = Sw(t, e); return n < 0 ? void 0 : t[n][1]; } function dIe(e) { return Sw(this.__data__, e) > -1; } function pIe(e, t) { var n = this.__data__, r = Sw(n, e); return r < 0 ? (++this.size, n.push([e, t])) : n[r][1] = t, this; } function Oh(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]); } } Oh.prototype.clear = iIe; Oh.prototype.delete = uIe; Oh.prototype.get = cIe; Oh.prototype.has = dIe; Oh.prototype.set = pIe; var fIe = J3(X3, "Map"); function hIe() { this.size = 0, this.__data__ = { hash: new Td(), map: new (fIe || Oh)(), string: new Td() }; } function vIe(e) { var t = typeof e; return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e !== "__proto__" : e === null; } function Ew(e, t) { var n = e.__data__; return vIe(t) ? n[typeof t == "string" ? "string" : "hash"] : n.map; } function gIe(e) { var t = Ew(this, e).delete(e); return this.size -= t ? 1 : 0, t; } function mIe(e) { return Ew(this, e).get(e); } function yIe(e) { return Ew(this, e).has(e); } function bIe(e, t) { var n = Ew(this, e), r = n.size; return n.set(e, t), this.size += n.size == r ? 0 : 1, this; } function op(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]); } } op.prototype.clear = hIe; op.prototype.delete = gIe; op.prototype.get = mIe; op.prototype.has = yIe; op.prototype.set = bIe; var wIe = "Expected a function"; function eE(e, t) { if (typeof e != "function" || t != null && typeof t != "function") throw new TypeError(wIe); var n = function() { var r = arguments, a = t ? t.apply(this, r) : r[0], o = n.cache; if (o.has(a)) return o.get(a); var i = e.apply(this, r); return n.cache = o.set(a, i) || o, i; }; return n.cache = new (eE.Cache || op)(), n; } eE.Cache = op; var xIe = 500; function kIe(e) { var t = eE(e, function(r) { return n.size === xIe && n.clear(), r; }), n = t.cache; return t; } var CIe = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, SIe = /\\(\\)?/g, EIe = kIe(function(e) { var t = []; return e.charCodeAt(0) === 46 && t.push(""), e.replace(CIe, function(n, r, a, o) { t.push(a ? o.replace(SIe, "$1") : r || n); }), t; }); function _Ie(e) { return e == null ? "" : $V(e); } function _w(e, t) { return nm(e) ? e : G9e(e, t) ? [e] : EIe(_Ie(e)); } var TIe = 1 / 0; function tE(e) { if (typeof e == "string" || Q3(e)) return e; var t = e + ""; return t == "0" && 1 / e == -TIe ? "-0" : t; } function LV(e, t) { t = _w(t, e); for (var n = 0, r = t.length; e != null && n < r; ) e = e[tE(t[n++])]; return n && n == r ? e : void 0; } function OIe(e, t, n) { var r = e == null ? void 0 : LV(e, t); return r === void 0 ? n : r; } function $Ie(e, t) { for (var n = -1, r = t.length, a = e.length; ++n < r; ) e[a + n] = t[n]; return e; } var ZF = Yu ? Yu.isConcatSpreadable : void 0; function FIe(e) { return nm(e) || PV(e) || !!(ZF && e && e[ZF]); } function AIe(e, t, n, r, a) { var o = -1, i = e.length; for (n || (n = FIe), a || (a = []); ++o < i; ) { var s = e[o]; n(s) ? $Ie(a, s) : a[a.length] = s; } return a; } function IIe(e) { var t = e == null ? 0 : e.length; return t ? AIe(e) : []; } function PIe(e) { return P9e(z9e(e, void 0, IIe), e + ""); } function LIe(e, t) { return e != null && t in Object(e); } function NIe(e, t, n) { t = _w(t, e); for (var r = -1, a = t.length, o = !1; ++r < a; ) { var i = tE(t[r]); if (!(o = e != null && n(e, i))) break; e = e[i]; } return o || ++r != a ? o : (a = e == null ? 0 : e.length, !!a && j9e(a) && FV(i, a) && (nm(e) || PV(e))); } function MIe(e, t) { return e != null && NIe(e, t, LIe); } function F5(e) { for (var t = -1, n = e == null ? 0 : e.length, r = {}; ++t < n; ) { var a = e[t]; r[a[0]] = a[1]; } return r; } function nE(e) { return e == null; } function BIe(e) { return e === void 0; } function DIe(e, t, n, r) { if (!wb(e)) return e; t = _w(t, e); for (var a = -1, o = t.length, i = o - 1, s = e; s != null && ++a < o; ) { var l = tE(t[a]), u = n; if (l === "__proto__" || l === "constructor" || l === "prototype") return e; if (a != i) { var c = s[l]; u = void 0, u === void 0 && (u = wb(c) ? c : FV(t[a + 1]) ? [] : {}); } R9e(s, l, u), s = s[l]; } return e; } function RIe(e, t, n) { for (var r = -1, a = t.length, o = {}; ++r < a; ) { var i = t[r], s = LV(e, i); n(s, i) && DIe(o, _w(i, e), s); } return o; } function zIe(e, t) { return RIe(e, t, function(n, r) { return MIe(e, r); }); } var VIe = PIe(function(e, t) { return e == null ? {} : zIe(e, t); }); const jIe = (e) => e === void 0, rE = (e) => typeof e == "boolean", U0 = (e) => typeof e == "number", Zv = (e) => typeof Element > "u" ? !1 : e instanceof Element, HIe = (e) => Th(e) ? !Number.isNaN(Number(e)) : !1, QF = (e) => Object.keys(e); class UIe extends Error { constructor(t) { super(t), this.name = "ElementPlusError"; } } function Od(e, t) { if (process.env.NODE_ENV !== "production") { const n = Th(e) ? new UIe(`[${e}] ${t}`) : e; console.warn(n); } } const qIe = "utils/dom/style", NV = (e = "") => e.split(" ").filter((t) => !!t.trim()), JF = (e, t) => { !e || !t.trim() || e.classList.add(...NV(t)); }, kb = (e, t) => { !e || !t.trim() || e.classList.remove(...NV(t)); }, cv = (e, t) => { var n; if (!Ao || !e || !t) return ""; let r = qAe(t); r === "float" && (r = "cssFloat"); try { const a = e.style[r]; if (a) return a; const o = (n = document.defaultView) == null ? void 0 : n.getComputedStyle(e, ""); return o ? o[r] : ""; } catch { return e.style[r]; } }; function MV(e, t = "px") { if (!e) return ""; if (U0(e) || HIe(e)) return `${e}${t}`; if (Th(e)) return e; Od(qIe, "binding value must be a string or number"); } /*! Element Plus Icons Vue v2.3.1 */ var WIe = /* @__PURE__ */ X({ name: "Loading", __name: "loading", setup(e) { return (t, n) => (I(), j("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ W("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" }) ])); } }), KIe = WIe; const BV = "__epPropKey", ln = (e) => e, GIe = (e) => tm(e) && !!e[BV], Tw = (e, t) => { if (!tm(e) || GIe(e)) return e; const { values: n, required: r, default: a, type: o, validator: i } = e, s = { type: o, required: !!r, validator: n || i ? (l) => { let u = !1, c = []; if (n && (c = Array.from(n), UF(e, "default") && c.push(a), u || (u = c.includes(l))), i && (u || (u = i(l))), !u && c.length > 0) { const d = [...new Set(c)].map((f) => JSON.stringify(f)).join(", "); vg(`Invalid prop: validation failed${t ? ` for prop "${t}"` : ""}. Expected one of [${d}], got value ${JSON.stringify(l)}.`); } return u; } : void 0, [BV]: !0 }; return UF(e, "default") && (s.default = a), s; }, Vr = (e) => F5(Object.entries(e).map(([t, n]) => [ t, Tw(n, t) ])), A5 = ln([ String, Object, Function ]), ip = (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; }, XIe = (e, t) => (e.install = (n) => { n.directive(t, e); }, e), YIe = (e) => (e.install = bb, e), Cb = { 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" }, ZIe = ["", "default", "small", "large"], QIe = ({ from: e, replacement: t, scope: n, version: r, ref: a, type: o = "API" }, i) => { be(() => b(i), (s) => { s && Od(n, `[${o}] ${e} is about to be deprecated in version ${r}, please use ${t} instead. For more detail, please visit: ${a} `); }, { immediate: !0 }); }; var JIe = { 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 ePe = (e) => (t, n) => tPe(t, n, b(e)), tPe = (e, t, n) => OIe(n, e, e).replace(/\{(\w+)\}/g, (r, a) => { var o; return `${(o = t == null ? void 0 : t[a]) != null ? o : `{${a}}`}`; }), nPe = (e) => { const t = F(() => b(e).name), n = ar(e) ? e : U(e); return { lang: t, locale: n, t: ePe(e) }; }, DV = Symbol("localeContextKey"), rPe = (e) => { const t = e || Te(DV, U()); return nPe(F(() => t.value || JIe)); }, hy = "el", aPe = "is-", Oc = (e, t, n, r, a) => { let o = `${e}-${t}`; return n && (o += `-${n}`), r && (o += `__${r}`), a && (o += `--${a}`), o; }, RV = Symbol("namespaceContextKey"), aE = (e) => { const t = e || (tt() ? Te(RV, U(hy)) : U(hy)); return F(() => b(t) || hy); }, gi = (e, t) => { const n = aE(t); return { namespace: n, b: (r = "") => Oc(n.value, e, r, "", ""), e: (r) => r ? Oc(n.value, e, "", r, "") : "", m: (r) => r ? Oc(n.value, e, "", "", r) : "", be: (r, a) => r && a ? Oc(n.value, e, r, a, "") : "", em: (r, a) => r && a ? Oc(n.value, e, "", r, a) : "", bm: (r, a) => r && a ? Oc(n.value, e, r, "", a) : "", bem: (r, a, o) => r && a && o ? Oc(n.value, e, r, a, o) : "", is: (r, ...a) => { const o = a.length >= 1 ? a[0] : !0; return r && o ? `${aPe}${r}` : ""; }, cssVar: (r) => { const a = {}; for (const o in r) r[o] && (a[`--${n.value}-${o}`] = r[o]); return a; }, cssVarName: (r) => `--${n.value}-${r}`, cssVarBlock: (r) => { const a = {}; for (const o in r) r[o] && (a[`--${n.value}-${e}-${o}`] = r[o]); return a; }, cssVarBlockName: (r) => `--${n.value}-${e}-${r}` }; }, oPe = Tw({ type: ln(Boolean), default: null }), iPe = Tw({ type: ln(Function) }), sPe = (e) => { const t = `update:${e}`, n = `onUpdate:${e}`, r = [t], a = { [e]: oPe, [n]: iPe }; return { useModelToggle: ({ indicator: o, toggleReason: i, shouldHideWhenRouteChanges: s, shouldProceed: l, onShow: u, onHide: c }) => { const d = tt(), { emit: f } = d, h = d.props, p = F(() => Av(h[n])), v = F(() => h[e] === null), m = (C) => { o.value !== !0 && (o.value = !0, i && (i.value = C), Av(u) && u(C)); }, g = (C) => { o.value !== !1 && (o.value = !1, i && (i.value = C), Av(c) && c(C)); }, y = (C) => { if (h.disabled === !0 || Av(l) && !l()) return; const S = p.value && Ao; S && f(t, !0), (v.value || !S) && m(C); }, x = (C) => { if (h.disabled === !0 || !Ao) return; const S = p.value && Ao; S && f(t, !1), (v.value || !S) && g(C); }, w = (C) => { rE(C) && (h.disabled && C ? p.value && f(t, !1) : o.value !== C && (C ? m() : g())); }, k = () => { o.value ? x() : y(); }; return be(() => h[e], w), s && d.appContext.config.globalProperties.$route !== void 0 && be(() => ({ ...d.proxy.$route }), () => { s.value && o.value && x(); }), nt(() => { w(h[e]); }), { hide: x, show: y, toggle: k, hasUpdateHandler: p }; }, useModelToggleProps: a, useModelToggleEmits: r }; }, zV = (e) => { const t = tt(); return F(() => { var n, r; return (r = (n = t == null ? void 0 : t.proxy) == null ? void 0 : n.$props) == null ? void 0 : r[e]; }); }; var fo = "top", di = "bottom", pi = "right", ho = "left", oE = "auto", rm = [fo, di, pi, ho], Vf = "start", q0 = "end", lPe = "clippingParents", VV = "viewport", dv = "popper", uPe = "reference", eA = rm.reduce(function(e, t) { return e.concat([t + "-" + Vf, t + "-" + q0]); }, []), iE = [].concat(rm, [oE]).reduce(function(e, t) { return e.concat([t, t + "-" + Vf, t + "-" + q0]); }, []), cPe = "beforeRead", dPe = "read", pPe = "afterRead", fPe = "beforeMain", hPe = "main", vPe = "afterMain", gPe = "beforeWrite", mPe = "write", yPe = "afterWrite", bPe = [cPe, dPe, pPe, fPe, hPe, vPe, gPe, mPe, yPe]; function $s(e) { return e ? (e.nodeName || "").toLowerCase() : null; } function Ji(e) { if (e == null) return window; if (e.toString() !== "[object Window]") { var t = e.ownerDocument; return t && t.defaultView || window; } return e; } function jf(e) { var t = Ji(e).Element; return e instanceof t || e instanceof Element; } function Jo(e) { var t = Ji(e).HTMLElement; return e instanceof t || e instanceof HTMLElement; } function sE(e) { if (typeof ShadowRoot > "u") return !1; var t = Ji(e).ShadowRoot; return e instanceof t || e instanceof ShadowRoot; } function wPe(e) { var t = e.state; Object.keys(t.elements).forEach(function(n) { var r = t.styles[n] || {}, a = t.attributes[n] || {}, o = t.elements[n]; !Jo(o) || !$s(o) || (Object.assign(o.style, r), Object.keys(a).forEach(function(i) { var s = a[i]; s === !1 ? o.removeAttribute(i) : o.setAttribute(i, s === !0 ? "" : s); })); }); } function xPe(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 a = t.elements[r], o = 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; }, {}); !Jo(a) || !$s(a) || (Object.assign(a.style, s), Object.keys(o).forEach(function(l) { a.removeAttribute(l); })); }); }; } var jV = { name: "applyStyles", enabled: !0, phase: "write", fn: wPe, effect: xPe, requires: ["computeStyles"] }; function bs(e) { return e.split("-")[0]; } var od = Math.max, Sb = Math.min, Hf = Math.round; function Uf(e, t) { t === void 0 && (t = !1); var n = e.getBoundingClientRect(), r = 1, a = 1; if (Jo(e) && t) { var o = e.offsetHeight, i = e.offsetWidth; i > 0 && (r = Hf(n.width) / i || 1), o > 0 && (a = Hf(n.height) / o || 1); } return { width: n.width / r, height: n.height / a, top: n.top / a, right: n.right / r, bottom: n.bottom / a, left: n.left / r, x: n.left / r, y: n.top / a }; } function lE(e) { var t = Uf(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 HV(e, t) { var n = t.getRootNode && t.getRootNode(); if (e.contains(t)) return !0; if (n && sE(n)) { var r = t; do { if (r && e.isSameNode(r)) return !0; r = r.parentNode || r.host; } while (r); } return !1; } function kl(e) { return Ji(e).getComputedStyle(e); } function kPe(e) { return ["table", "td", "th"].indexOf($s(e)) >= 0; } function pc(e) { return ((jf(e) ? e.ownerDocument : e.document) || window.document).documentElement; } function Ow(e) { return $s(e) === "html" ? e : e.assignedSlot || e.parentNode || (sE(e) ? e.host : null) || pc(e); } function tA(e) { return !Jo(e) || kl(e).position === "fixed" ? null : e.offsetParent; } function CPe(e) { var t = navigator.userAgent.toLowerCase().indexOf("firefox") !== -1, n = navigator.userAgent.indexOf("Trident") !== -1; if (n && Jo(e)) { var r = kl(e); if (r.position === "fixed") return null; } var a = Ow(e); for (sE(a) && (a = a.host); Jo(a) && ["html", "body"].indexOf($s(a)) < 0; ) { var o = kl(a); if (o.transform !== "none" || o.perspective !== "none" || o.contain === "paint" || ["transform", "perspective"].indexOf(o.willChange) !== -1 || t && o.willChange === "filter" || t && o.filter && o.filter !== "none") return a; a = a.parentNode; } return null; } function am(e) { for (var t = Ji(e), n = tA(e); n && kPe(n) && kl(n).position === "static"; ) n = tA(n); return n && ($s(n) === "html" || $s(n) === "body" && kl(n).position === "static") ? t : n || CPe(e) || t; } function uE(e) { return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y"; } function Qv(e, t, n) { return od(e, Sb(t, n)); } function SPe(e, t, n) { var r = Qv(e, t, n); return r > n ? n : r; } function UV() { return { top: 0, right: 0, bottom: 0, left: 0 }; } function qV(e) { return Object.assign({}, UV(), e); } function WV(e, t) { return t.reduce(function(n, r) { return n[r] = e, n; }, {}); } var EPe = function(e, t) { return e = typeof e == "function" ? e(Object.assign({}, t.rects, { placement: t.placement })) : e, qV(typeof e != "number" ? e : WV(e, rm)); }; function _Pe(e) { var t, n = e.state, r = e.name, a = e.options, o = n.elements.arrow, i = n.modifiersData.popperOffsets, s = bs(n.placement), l = uE(s), u = [ho, pi].indexOf(s) >= 0, c = u ? "height" : "width"; if (!(!o || !i)) { var d = EPe(a.padding, n), f = lE(o), h = l === "y" ? fo : ho, p = l === "y" ? di : pi, v = n.rects.reference[c] + n.rects.reference[l] - i[l] - n.rects.popper[c], m = i[l] - n.rects.reference[l], g = am(o), y = g ? l === "y" ? g.clientHeight || 0 : g.clientWidth || 0 : 0, x = v / 2 - m / 2, w = d[h], k = y - f[c] - d[p], C = y / 2 - f[c] / 2 + x, S = Qv(w, C, k), _ = l; n.modifiersData[r] = (t = {}, t[_] = S, t.centerOffset = S - C, t); } } function TPe(e) { var t = e.state, n = e.options, r = n.element, a = r === void 0 ? "[data-popper-arrow]" : r; a != null && (typeof a == "string" && (a = t.elements.popper.querySelector(a), !a) || !HV(t.elements.popper, a) || (t.elements.arrow = a)); } var OPe = { name: "arrow", enabled: !0, phase: "main", fn: _Pe, effect: TPe, requires: ["popperOffsets"], requiresIfExists: ["preventOverflow"] }; function qf(e) { return e.split("-")[1]; } var $Pe = { top: "auto", right: "auto", bottom: "auto", left: "auto" }; function FPe(e) { var t = e.x, n = e.y, r = window, a = r.devicePixelRatio || 1; return { x: Hf(t * a) / a || 0, y: Hf(n * a) / a || 0 }; } function nA(e) { var t, n = e.popper, r = e.popperRect, a = e.placement, o = e.variation, i = e.offsets, s = e.position, l = e.gpuAcceleration, u = e.adaptive, c = e.roundOffsets, d = e.isFixed, f = i.x, h = f === void 0 ? 0 : f, p = i.y, v = p === void 0 ? 0 : p, m = typeof c == "function" ? c({ x: h, y: v }) : { x: h, y: v }; h = m.x, v = m.y; var g = i.hasOwnProperty("x"), y = i.hasOwnProperty("y"), x = ho, w = fo, k = window; if (u) { var C = am(n), S = "clientHeight", _ = "clientWidth"; if (C === Ji(n) && (C = pc(n), kl(C).position !== "static" && s === "absolute" && (S = "scrollHeight", _ = "scrollWidth")), C = C, a === fo || (a === ho || a === pi) && o === q0) { w = di; var T = d && C === k && k.visualViewport ? k.visualViewport.height : C[S]; v -= T - r.height, v *= l ? 1 : -1; } if (a === ho || (a === fo || a === di) && o === q0) { x = pi; var O = d && C === k && k.visualViewport ? k.visualViewport.width : C[_]; h -= O - r.width, h *= l ? 1 : -1; } } var $ = Object.assign({ position: s }, u && $Pe), A = c === !0 ? FPe({ x: h, y: v }) : { x: h, y: v }; if (h = A.x, v = A.y, l) { var N; return Object.assign({}, $, (N = {}, N[w] = y ? "0" : "", N[x] = g ? "0" : "", N.transform = (k.devicePixelRatio || 1) <= 1 ? "translate(" + h + "px, " + v + "px)" : "translate3d(" + h + "px, " + v + "px, 0)", N)); } return Object.assign({}, $, (t = {}, t[w] = y ? v + "px" : "", t[x] = g ? h + "px" : "", t.transform = "", t)); } function APe(e) { var t = e.state, n = e.options, r = n.gpuAcceleration, a = r === void 0 ? !0 : r, o = n.adaptive, i = o === void 0 ? !0 : o, s = n.roundOffsets, l = s === void 0 ? !0 : s, u = { placement: bs(t.placement), variation: qf(t.placement), popper: t.elements.popper, popperRect: t.rects.popper, gpuAcceleration: a, isFixed: t.options.strategy === "fixed" }; t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper, nA(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, nA(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 KV = { name: "computeStyles", enabled: !0, phase: "beforeWrite", fn: APe, data: {} }, f1 = { passive: !0 }; function IPe(e) { var t = e.state, n = e.instance, r = e.options, a = r.scroll, o = a === void 0 ? !0 : a, i = r.resize, s = i === void 0 ? !0 : i, l = Ji(t.elements.popper), u = [].concat(t.scrollParents.reference, t.scrollParents.popper); return o && u.forEach(function(c) { c.addEventListener("scroll", n.update, f1); }), s && l.addEventListener("resize", n.update, f1), function() { o && u.forEach(function(c) { c.removeEventListener("scroll", n.update, f1); }), s && l.removeEventListener("resize", n.update, f1); }; } var GV = { name: "eventListeners", enabled: !0, phase: "write", fn: function() { }, effect: IPe, data: {} }, PPe = { left: "right", right: "left", bottom: "top", top: "bottom" }; function vy(e) { return e.replace(/left|right|bottom|top/g, function(t) { return PPe[t]; }); } var LPe = { start: "end", end: "start" }; function rA(e) { return e.replace(/start|end/g, function(t) { return LPe[t]; }); } function cE(e) { var t = Ji(e), n = t.pageXOffset, r = t.pageYOffset; return { scrollLeft: n, scrollTop: r }; } function dE(e) { return Uf(pc(e)).left + cE(e).scrollLeft; } function NPe(e) { var t = Ji(e), n = pc(e), r = t.visualViewport, a = n.clientWidth, o = n.clientHeight, i = 0, s = 0; return r && (a = r.width, o = r.height, /^((?!chrome|android).)*safari/i.test(navigator.userAgent) || (i = r.offsetLeft, s = r.offsetTop)), { width: a, height: o, x: i + dE(e), y: s }; } function MPe(e) { var t, n = pc(e), r = cE(e), a = (t = e.ownerDocument) == null ? void 0 : t.body, o = od(n.scrollWidth, n.clientWidth, a ? a.scrollWidth : 0, a ? a.clientWidth : 0), i = od(n.scrollHeight, n.clientHeight, a ? a.scrollHeight : 0, a ? a.clientHeight : 0), s = -r.scrollLeft + dE(e), l = -r.scrollTop; return kl(a || n).direction === "rtl" && (s += od(n.clientWidth, a ? a.clientWidth : 0) - o), { width: o, height: i, x: s, y: l }; } function pE(e) { var t = kl(e), n = t.overflow, r = t.overflowX, a = t.overflowY; return /auto|scroll|overlay|hidden/.test(n + a + r); } function XV(e) { return ["html", "body", "#document"].indexOf($s(e)) >= 0 ? e.ownerDocument.body : Jo(e) && pE(e) ? e : XV(Ow(e)); } function Jv(e, t) { var n; t === void 0 && (t = []); var r = XV(e), a = r === ((n = e.ownerDocument) == null ? void 0 : n.body), o = Ji(r), i = a ? [o].concat(o.visualViewport || [], pE(r) ? r : []) : r, s = t.concat(i); return a ? s : s.concat(Jv(Ow(i))); } function I5(e) { return Object.assign({}, e, { left: e.x, top: e.y, right: e.x + e.width, bottom: e.y + e.height }); } function BPe(e) { var t = Uf(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 aA(e, t) { return t === VV ? I5(NPe(e)) : jf(t) ? BPe(t) : I5(MPe(pc(e))); } function DPe(e) { var t = Jv(Ow(e)), n = ["absolute", "fixed"].indexOf(kl(e).position) >= 0, r = n && Jo(e) ? am(e) : e; return jf(r) ? t.filter(function(a) { return jf(a) && HV(a, r) && $s(a) !== "body"; }) : []; } function RPe(e, t, n) { var r = t === "clippingParents" ? DPe(e) : [].concat(t), a = [].concat(r, [n]), o = a[0], i = a.reduce(function(s, l) { var u = aA(e, l); return s.top = od(u.top, s.top), s.right = Sb(u.right, s.right), s.bottom = Sb(u.bottom, s.bottom), s.left = od(u.left, s.left), s; }, aA(e, o)); return i.width = i.right - i.left, i.height = i.bottom - i.top, i.x = i.left, i.y = i.top, i; } function YV(e) { var t = e.reference, n = e.element, r = e.placement, a = r ? bs(r) : null, o = r ? qf(r) : null, i = t.x + t.width / 2 - n.width / 2, s = t.y + t.height / 2 - n.height / 2, l; switch (a) { case fo: l = { x: i, y: t.y - n.height }; break; case di: l = { x: i, y: t.y + t.height }; break; case pi: l = { x: t.x + t.width, y: s }; break; case ho: l = { x: t.x - n.width, y: s }; break; default: l = { x: t.x, y: t.y }; } var u = a ? uE(a) : null; if (u != null) { var c = u === "y" ? "height" : "width"; switch (o) { case Vf: l[u] = l[u] - (t[c] / 2 - n[c] / 2); break; case q0: l[u] = l[u] + (t[c] / 2 - n[c] / 2); break; } } return l; } function W0(e, t) { t === void 0 && (t = {}); var n = t, r = n.placement, a = r === void 0 ? e.placement : r, o = n.boundary, i = o === void 0 ? lPe : o, s = n.rootBoundary, l = s === void 0 ? VV : s, u = n.elementContext, c = u === void 0 ? dv : u, d = n.altBoundary, f = d === void 0 ? !1 : d, h = n.padding, p = h === void 0 ? 0 : h, v = qV(typeof p != "number" ? p : WV(p, rm)), m = c === dv ? uPe : dv, g = e.rects.popper, y = e.elements[f ? m : c], x = RPe(jf(y) ? y : y.contextElement || pc(e.elements.popper), i, l), w = Uf(e.elements.reference), k = YV({ reference: w, element: g, strategy: "absolute", placement: a }), C = I5(Object.assign({}, g, k)), S = c === dv ? C : w, _ = { top: x.top - S.top + v.top, bottom: S.bottom - x.bottom + v.bottom, left: x.left - S.left + v.left, right: S.right - x.right + v.right }, T = e.modifiersData.offset; if (c === dv && T) { var O = T[a]; Object.keys(_).forEach(function($) { var A = [pi, di].indexOf($) >= 0 ? 1 : -1, N = [fo, di].indexOf($) >= 0 ? "y" : "x"; _[$] += O[N] * A; }); } return _; } function zPe(e, t) { t === void 0 && (t = {}); var n = t, r = n.placement, a = n.boundary, o = n.rootBoundary, i = n.padding, s = n.flipVariations, l = n.allowedAutoPlacements, u = l === void 0 ? iE : l, c = qf(r), d = c ? s ? eA : eA.filter(function(p) { return qf(p) === c; }) : rm, f = d.filter(function(p) { return u.indexOf(p) >= 0; }); f.length === 0 && (f = d); var h = f.reduce(function(p, v) { return p[v] = W0(e, { placement: v, boundary: a, rootBoundary: o, padding: i })[bs(v)], p; }, {}); return Object.keys(h).sort(function(p, v) { return h[p] - h[v]; }); } function VPe(e) { if (bs(e) === oE) return []; var t = vy(e); return [rA(e), t, rA(t)]; } function jPe(e) { var t = e.state, n = e.options, r = e.name; if (!t.modifiersData[r]._skip) { for (var a = n.mainAxis, o = a === void 0 ? !0 : a, i = n.altAxis, s = i === void 0 ? !0 : i, l = n.fallbackPlacements, u = n.padding, c = n.boundary, d = n.rootBoundary, f = n.altBoundary, h = n.flipVariations, p = h === void 0 ? !0 : h, v = n.allowedAutoPlacements, m = t.options.placement, g = bs(m), y = g === m, x = l || (y || !p ? [vy(m)] : VPe(m)), w = [m].concat(x).reduce(function(ve, ge) { return ve.concat(bs(ge) === oE ? zPe(t, { placement: ge, boundary: c, rootBoundary: d, padding: u, flipVariations: p, allowedAutoPlacements: v }) : ge); }, []), k = t.rects.reference, C = t.rects.popper, S = /* @__PURE__ */ new Map(), _ = !0, T = w[0], O = 0; O < w.length; O++) { var $ = w[O], A = bs($), N = qf($) === Vf, L = [fo, di].indexOf(A) >= 0, R = L ? "width" : "height", P = W0(t, { placement: $, boundary: c, rootBoundary: d, altBoundary: f, padding: u }), B = L ? N ? pi : ho : N ? di : fo; k[R] > C[R] && (B = vy(B)); var M = vy(B), z = []; if (o && z.push(P[A] <= 0), s && z.push(P[B] <= 0, P[M] <= 0), z.every(function(ve) { return ve; })) { T = $, _ = !1; break; } S.set($, z); } if (_) for (var Z = p ? 3 : 1, G = function(ve) { var ge = w.find(function(oe) { var ee = S.get(oe); if (ee) return ee.slice(0, ve).every(function(q) { return q; }); }); if (ge) return T = ge, "break"; }, J = Z; J > 0; J--) { var se = G(J); if (se === "break") break; } t.placement !== T && (t.modifiersData[r]._skip = !0, t.placement = T, t.reset = !0); } } var HPe = { name: "flip", enabled: !0, phase: "main", fn: jPe, requiresIfExists: ["offset"], data: { _skip: !1 } }; function oA(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 iA(e) { return [fo, pi, di, ho].some(function(t) { return e[t] >= 0; }); } function UPe(e) { var t = e.state, n = e.name, r = t.rects.reference, a = t.rects.popper, o = t.modifiersData.preventOverflow, i = W0(t, { elementContext: "reference" }), s = W0(t, { altBoundary: !0 }), l = oA(i, r), u = oA(s, a, o), c = iA(l), d = iA(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 qPe = { name: "hide", enabled: !0, phase: "main", requiresIfExists: ["preventOverflow"], fn: UPe }; function WPe(e, t, n) { var r = bs(e), a = [ho, fo].indexOf(r) >= 0 ? -1 : 1, o = typeof n == "function" ? n(Object.assign({}, t, { placement: e })) : n, i = o[0], s = o[1]; return i = i || 0, s = (s || 0) * a, [ho, pi].indexOf(r) >= 0 ? { x: s, y: i } : { x: i, y: s }; } function KPe(e) { var t = e.state, n = e.options, r = e.name, a = n.offset, o = a === void 0 ? [0, 0] : a, i = iE.reduce(function(c, d) { return c[d] = WPe(d, t.rects, o), 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 GPe = { name: "offset", enabled: !0, phase: "main", requires: ["popperOffsets"], fn: KPe }; function XPe(e) { var t = e.state, n = e.name; t.modifiersData[n] = YV({ reference: t.rects.reference, element: t.rects.popper, strategy: "absolute", placement: t.placement }); } var ZV = { name: "popperOffsets", enabled: !0, phase: "read", fn: XPe, data: {} }; function YPe(e) { return e === "x" ? "y" : "x"; } function ZPe(e) { var t = e.state, n = e.options, r = e.name, a = n.mainAxis, o = a === void 0 ? !0 : a, i = n.altAxis, s = i === void 0 ? !1 : i, l = n.boundary, u = n.rootBoundary, c = n.altBoundary, d = n.padding, f = n.tether, h = f === void 0 ? !0 : f, p = n.tetherOffset, v = p === void 0 ? 0 : p, m = W0(t, { boundary: l, rootBoundary: u, padding: d, altBoundary: c }), g = bs(t.placement), y = qf(t.placement), x = !y, w = uE(g), k = YPe(w), C = t.modifiersData.popperOffsets, S = t.rects.reference, _ = t.rects.popper, T = typeof v == "function" ? v(Object.assign({}, t.rects, { placement: t.placement })) : v, O = typeof T == "number" ? { mainAxis: T, altAxis: T } : Object.assign({ mainAxis: 0, altAxis: 0 }, T), $ = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, A = { x: 0, y: 0 }; if (C) { if (o) { var N, L = w === "y" ? fo : ho, R = w === "y" ? di : pi, P = w === "y" ? "height" : "width", B = C[w], M = B + m[L], z = B - m[R], Z = h ? -_[P] / 2 : 0, G = y === Vf ? S[P] : _[P], J = y === Vf ? -_[P] : -S[P], se = t.elements.arrow, ve = h && se ? lE(se) : { width: 0, height: 0 }, ge = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : UV(), oe = ge[L], ee = ge[R], q = Qv(0, S[P], ve[P]), Y = x ? S[P] / 2 - Z - q - oe - O.mainAxis : G - q - oe - O.mainAxis, te = x ? -S[P] / 2 + Z + q + ee + O.mainAxis : J + q + ee + O.mainAxis, we = t.elements.arrow && am(t.elements.arrow), Oe = we ? w === "y" ? we.clientTop || 0 : we.clientLeft || 0 : 0, Ne = (N = $ == null ? void 0 : $[w]) != null ? N : 0, xe = B + Y - Ne - Oe, $e = B + te - Ne, Se = Qv(h ? Sb(M, xe) : M, B, h ? od(z, $e) : z); C[w] = Se, A[w] = Se - B; } if (s) { var Pe, Me = w === "x" ? fo : ho, je = w === "x" ? di : pi, Be = C[k], We = k === "y" ? "height" : "width", qe = Be + m[Me], Ge = Be - m[je], E = [fo, ho].indexOf(g) !== -1, V = (Pe = $ == null ? void 0 : $[k]) != null ? Pe : 0, ie = E ? qe : Be - S[We] - _[We] - V + O.altAxis, le = E ? Be + S[We] + _[We] - V - O.altAxis : Ge, re = h && E ? SPe(ie, Be, le) : Qv(h ? ie : qe, Be, h ? le : Ge); C[k] = re, A[k] = re - Be; } t.modifiersData[r] = A; } } var QPe = { name: "preventOverflow", enabled: !0, phase: "main", fn: ZPe, requiresIfExists: ["offset"] }; function JPe(e) { return { scrollLeft: e.scrollLeft, scrollTop: e.scrollTop }; } function eLe(e) { return e === Ji(e) || !Jo(e) ? cE(e) : JPe(e); } function tLe(e) { var t = e.getBoundingClientRect(), n = Hf(t.width) / e.offsetWidth || 1, r = Hf(t.height) / e.offsetHeight || 1; return n !== 1 || r !== 1; } function nLe(e, t, n) { n === void 0 && (n = !1); var r = Jo(t), a = Jo(t) && tLe(t), o = pc(t), i = Uf(e, a), s = { scrollLeft: 0, scrollTop: 0 }, l = { x: 0, y: 0 }; return (r || !r && !n) && (($s(t) !== "body" || pE(o)) && (s = eLe(t)), Jo(t) ? (l = Uf(t, !0), l.x += t.clientLeft, l.y += t.clientTop) : o && (l.x = dE(o))), { x: i.left + s.scrollLeft - l.x, y: i.top + s.scrollTop - l.y, width: i.width, height: i.height }; } function rLe(e) { var t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set(), r = []; e.forEach(function(o) { t.set(o.name, o); }); function a(o) { n.add(o.name); var i = [].concat(o.requires || [], o.requiresIfExists || []); i.forEach(function(s) { if (!n.has(s)) { var l = t.get(s); l && a(l); } }), r.push(o); } return e.forEach(function(o) { n.has(o.name) || a(o); }), r; } function aLe(e) { var t = rLe(e); return bPe.reduce(function(n, r) { return n.concat(t.filter(function(a) { return a.phase === r; })); }, []); } function oLe(e) { var t; return function() { return t || (t = new Promise(function(n) { Promise.resolve().then(function() { t = void 0, n(e()); }); })), t; }; } function iLe(e) { var t = e.reduce(function(n, r) { var a = n[r.name]; return n[r.name] = a ? Object.assign({}, a, r, { options: Object.assign({}, a.options, r.options), data: Object.assign({}, a.data, r.data) }) : r, n; }, {}); return Object.keys(t).map(function(n) { return t[n]; }); } var sA = { placement: "bottom", modifiers: [], strategy: "absolute" }; function lA() { 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 fE(e) { e === void 0 && (e = {}); var t = e, n = t.defaultModifiers, r = n === void 0 ? [] : n, a = t.defaultOptions, o = a === void 0 ? sA : a; return function(i, s, l) { l === void 0 && (l = o); var u = { placement: "bottom", orderedModifiers: [], options: Object.assign({}, sA, o), modifiersData: {}, elements: { reference: i, popper: s }, attributes: {}, styles: {} }, c = [], d = !1, f = { state: u, setOptions: function(v) { var m = typeof v == "function" ? v(u.options) : v; p(), u.options = Object.assign({}, o, u.options, m), u.scrollParents = { reference: jf(i) ? Jv(i) : i.contextElement ? Jv(i.contextElement) : [], popper: Jv(s) }; var g = aLe(iLe([].concat(r, u.options.modifiers))); return u.orderedModifiers = g.filter(function(y) { return y.enabled; }), h(), f.update(); }, forceUpdate: function() { if (!d) { var v = u.elements, m = v.reference, g = v.popper; if (lA(m, g)) { u.rects = { reference: nLe(m, am(g), u.options.strategy === "fixed"), popper: lE(g) }, u.reset = !1, u.placement = u.options.placement, u.orderedModifiers.forEach(function(_) { return u.modifiersData[_.name] = Object.assign({}, _.data); }); for (var y = 0; y < u.orderedModifiers.length; y++) { if (u.reset === !0) { u.reset = !1, y = -1; continue; } var x = u.orderedModifiers[y], w = x.fn, k = x.options, C = k === void 0 ? {} : k, S = x.name; typeof w == "function" && (u = w({ state: u, options: C, name: S, instance: f }) || u); } } } }, update: oLe(function() { return new Promise(function(v) { f.forceUpdate(), v(u); }); }), destroy: function() { p(), d = !0; } }; if (!lA(i, s)) return f; f.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, y = g === void 0 ? {} : g, x = v.effect; if (typeof x == "function") { var w = x({ state: u, name: m, instance: f, options: y }), k = function() { }; c.push(w || k); } }); } function p() { c.forEach(function(v) { return v(); }), c = []; } return f; }; } fE(); var sLe = [GV, ZV, KV, jV]; fE({ defaultModifiers: sLe }); var lLe = [GV, ZV, KV, jV, GPe, HPe, QPe, OPe, qPe], uLe = fE({ defaultModifiers: lLe }); const cLe = (e, t, n = {}) => { const r = { name: "updateState", enabled: !0, phase: "write", fn: ({ state: l }) => { const u = dLe(l); Object.assign(i.value, u); }, requires: ["computeStyles"] }, a = F(() => { const { onFirstUpdate: l, placement: u, strategy: c, modifiers: d } = b(n); return { onFirstUpdate: l, placement: u || "bottom", strategy: c || "absolute", modifiers: [ ...d || [], r, { name: "applyStyles", enabled: !1 } ] }; }), o = dn(), i = U({ styles: { popper: { position: b(a).strategy, left: "0", top: "0" }, arrow: { position: "absolute" } }, attributes: {} }), s = () => { o.value && (o.value.destroy(), o.value = void 0); }; return be(a, (l) => { const u = b(o); u && u.setOptions(l); }, { deep: !0 }), be([e, t], ([l, u]) => { s(), !(!l || !u) && (o.value = uLe(l, u, b(a))); }), kt(() => { s(); }), { state: F(() => { var l; return { ...((l = b(o)) == null ? void 0 : l.state) || {} }; }), styles: F(() => b(i).styles), attributes: F(() => b(i).attributes), update: () => { var l; return (l = b(o)) == null ? void 0 : l.update(); }, forceUpdate: () => { var l; return (l = b(o)) == null ? void 0 : l.forceUpdate(); }, instanceRef: F(() => b(o)) }; }; function dLe(e) { const t = Object.keys(e.elements), n = F5(t.map((a) => [a, e.styles[a] || {}])), r = F5(t.map((a) => [a, e.attributes[a]])); return { styles: n, attributes: r }; } function uA() { let e; const t = (r, a) => { n(), e = window.setTimeout(r, a); }, n = () => window.clearTimeout(e); return EV(() => n()), { registerTimeout: t, cancelTimeout: n }; } const P5 = { prefix: Math.floor(Math.random() * 1e4), current: 0 }, pLe = Symbol("elIdInjection"), QV = () => tt() ? Te(pLe, P5) : P5, fLe = (e) => { const t = QV(); !Ao && t === P5 && Od("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 = aE(); return F(() => b(e) || `${n.value}-id-${t.prefix}-${t.current++}`); }; let Up = []; const cA = (e) => { const t = e; t.key === Cb.esc && Up.forEach((n) => n(t)); }, hLe = (e) => { nt(() => { Up.length === 0 && document.addEventListener("keydown", cA), Ao && Up.push(e); }), kt(() => { Up = Up.filter((t) => t !== e), Up.length === 0 && Ao && document.removeEventListener("keydown", cA); }); }; let dA; const JV = () => { const e = aE(), t = QV(), n = F(() => `${e.value}-popper-container-${t.prefix}`), r = F(() => `#${n.value}`); return { id: n, selector: r }; }, vLe = (e) => { const t = document.createElement("div"); return t.id = e, document.body.appendChild(t), t; }, gLe = () => { const { id: e, selector: t } = JV(); return gg(() => { Ao && (process.env.NODE_ENV === "test" || !dA || !document.body.querySelector(t.value)) && (dA = vLe(e.value)); }), { id: e, selector: t }; }, mLe = Vr({ showAfter: { type: Number, default: 0 }, hideAfter: { type: Number, default: 200 }, autoClose: { type: Number, default: 0 } }), yLe = ({ showAfter: e, hideAfter: t, autoClose: n, open: r, close: a }) => { const { registerTimeout: o } = uA(), { registerTimeout: i, cancelTimeout: s } = uA(); return { onOpen: (l) => { o(() => { r(l); const u = b(n); U0(u) && u > 0 && i(() => { a(l); }, u); }, b(e)); }, onClose: (l) => { s(), o(() => { a(l); }, b(t)); } }; }, ej = Symbol("elForwardRef"), bLe = (e) => { rt(ej, { setForwardRef: (t) => { e.value = t; } }); }, wLe = (e) => ({ mounted(t) { e(t); }, updated(t) { e(t); }, unmounted() { e(null); } }), pA = { current: 0 }, fA = U(0), tj = 2e3, hA = Symbol("elZIndexContextKey"), nj = Symbol("zIndexContextKey"), rj = (e) => { const t = tt() ? Te(hA, pA) : pA, n = e || (tt() ? Te(nj, void 0) : void 0), r = F(() => { const i = b(n); return U0(i) ? i : tj; }), a = F(() => r.value + fA.value), o = () => (t.current++, fA.value = t.current, a.value); return !Ao && !Te(hA) && Od("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: a, nextZIndex: o }; }, xLe = Tw({ type: String, values: ZIe, required: !1 }), aj = Symbol("size"), kLe = () => { const e = Te(aj, {}); return F(() => b(e.size) || ""); }, CLe = Symbol("emptyValuesContextKey"); Vr({ emptyValues: Array, valueOnClear: { type: [String, Number, Boolean, Function], default: void 0, validator: (e) => Av(e) ? !e() : !e } }); const SLe = Vr({ ariaLabel: String, ariaOrientation: { type: String, values: ["horizontal", "vertical", "undefined"] }, ariaControls: String }), oj = (e) => VIe(SLe, e), ij = Symbol(), Eb = U(); function hE(e, t = void 0) { const n = tt() ? Te(ij, Eb) : Eb; return e ? F(() => { var r, a; return (a = (r = n.value) == null ? void 0 : r[e]) != null ? a : t; }) : n; } function ELe(e, t) { const n = hE(), r = gi(e, F(() => { var s; return ((s = n.value) == null ? void 0 : s.namespace) || hy; })), a = rPe(F(() => { var s; return (s = n.value) == null ? void 0 : s.locale; })), o = rj(F(() => { var s; return ((s = n.value) == null ? void 0 : s.zIndex) || tj; })), i = F(() => { var s; return b(t) || ((s = n.value) == null ? void 0 : s.size) || ""; }); return _Le(F(() => b(n) || {})), { ns: r, locale: a, zIndex: o, size: i }; } const _Le = (e, t, n = !1) => { var r; const a = !!tt(), o = a ? hE() : void 0, i = (r = void 0) != null ? r : a ? rt : void 0; if (!i) { Od("provideGlobalConfig", "provideGlobalConfig() can only be used inside setup()."); return; } const s = F(() => { const l = b(e); return o != null && o.value ? TLe(o.value, l) : l; }); return i(ij, s), i(DV, F(() => s.value.locale)), i(RV, F(() => s.value.namespace)), i(nj, F(() => s.value.zIndex)), i(aj, { size: F(() => s.value.size || "") }), i(CLe, F(() => ({ emptyValues: s.value.emptyValues, valueOnClear: s.value.valueOnClear }))), (n || !Eb.value) && (Eb.value = s.value), s; }, TLe = (e, t) => { const n = [.../* @__PURE__ */ new Set([...QF(e), ...QF(t)])], r = {}; for (const a of n) r[a] = t[a] !== void 0 ? t[a] : e[a]; return r; }; var Na = (e, t) => { const n = e.__vccOpts || e; for (const [r, a] of t) n[r] = a; return n; }; const OLe = Vr({ size: { type: ln([Number, String]) }, color: { type: String } }), $Le = X({ name: "ElIcon", inheritAttrs: !1 }), FLe = /* @__PURE__ */ X({ ...$Le, props: OLe, setup(e) { const t = e, n = gi("icon"), r = F(() => { const { size: a, color: o } = t; return !a && !o ? {} : { fontSize: jIe(a) ? void 0 : MV(a), "--color": o }; }); return (a, o) => (I(), j("i", Bt({ class: b(n).b(), style: b(r) }, a.$attrs), [ he(a.$slots, "default") ], 16)); } }); var ALe = /* @__PURE__ */ Na(FLe, [["__file", "icon.vue"]]); const vA = ip(ALe), vE = Symbol("formContextKey"), _b = Symbol("formItemContextKey"), ILe = (e, t = {}) => { const n = U(void 0), r = t.prop ? n : zV("size"), a = t.global ? n : kLe(), o = t.form ? { size: void 0 } : Te(vE, void 0), i = t.formItem ? { size: void 0 } : Te(_b, void 0); return F(() => r.value || b(e) || (i == null ? void 0 : i.size) || (o == null ? void 0 : o.size) || a.value || ""); }, sj = (e) => { const t = zV("disabled"), n = Te(vE, void 0); return F(() => t.value || b(e) || (n == null ? void 0 : n.disabled) || !1); }, PLe = () => { const e = Te(vE, void 0), t = Te(_b, void 0); return { form: e, formItem: t }; }, gE = Symbol("popper"), lj = Symbol("popperContent"), LLe = [ "dialog", "grid", "group", "listbox", "menu", "navigation", "tooltip", "tree" ], uj = Vr({ role: { type: String, values: LLe, default: "tooltip" } }), NLe = X({ name: "ElPopper", inheritAttrs: !1 }), MLe = /* @__PURE__ */ X({ ...NLe, props: uj, setup(e, { expose: t }) { const n = e, r = U(), a = U(), o = U(), i = U(), s = F(() => n.role), l = { triggerRef: r, popperInstanceRef: a, contentRef: o, referenceRef: i, role: s }; return t(l), rt(gE, l), (u, c) => he(u.$slots, "default"); } }); var BLe = /* @__PURE__ */ Na(MLe, [["__file", "popper.vue"]]); const cj = Vr({ arrowOffset: { type: Number, default: 5 } }), DLe = X({ name: "ElPopperArrow", inheritAttrs: !1 }), RLe = /* @__PURE__ */ X({ ...DLe, props: cj, setup(e, { expose: t }) { const n = e, r = gi("popper"), { arrowOffset: a, arrowRef: o, arrowStyle: i } = Te(lj, void 0); return be(() => n.arrowOffset, (s) => { a.value = s; }), kt(() => { o.value = void 0; }), t({ arrowRef: o }), (s, l) => (I(), j("span", { ref_key: "arrowRef", ref: o, class: H(b(r).e("arrow")), style: Ye(b(i)), "data-popper-arrow": "" }, null, 6)); } }); var zLe = /* @__PURE__ */ Na(RLe, [["__file", "arrow.vue"]]); const Sk = "ElOnlyChild", VLe = X({ name: Sk, setup(e, { slots: t, attrs: n }) { var r; const a = Te(ej), o = wLe((r = a == null ? void 0 : a.setForwardRef) != null ? r : bb); return () => { var i; const s = (i = t.default) == null ? void 0 : i.call(t, n); if (!s) return null; if (s.length > 1) return Od(Sk, "requires exact only one valid child."), null; const l = dj(s); return l ? Xe(mg(l, n), [[o]]) : (Od(Sk, "no valid child node found"), null); }; } }); function dj(e) { if (!e) return null; const t = e; for (const n of t) { if (tm(n)) switch (n.type) { case yg: continue; case Ps: case "svg": return gA(n); case Qe: return dj(n.children); default: return n; } return gA(n); } return null; } function gA(e) { const t = gi("only-child"); return ue("span", { class: t.e("content") }, [e]); } const pj = Vr({ virtualRef: { type: ln(Object) }, virtualTriggering: Boolean, onMouseenter: { type: ln(Function) }, onMouseleave: { type: ln(Function) }, onClick: { type: ln(Function) }, onKeydown: { type: ln(Function) }, onFocus: { type: ln(Function) }, onBlur: { type: ln(Function) }, onContextmenu: { type: ln(Function) }, id: String, open: Boolean }), jLe = X({ name: "ElPopperTrigger", inheritAttrs: !1 }), HLe = /* @__PURE__ */ X({ ...jLe, props: pj, setup(e, { expose: t }) { const n = e, { role: r, triggerRef: a } = Te(gE, void 0); bLe(a); const o = F(() => s.value ? n.id : void 0), i = F(() => { if (r && r.value === "tooltip") return n.open && n.id ? n.id : void 0; }), s = F(() => { if (r && r.value !== "tooltip") return r.value; }), l = F(() => s.value ? `${n.open}` : void 0); let u; const c = [ "onMouseenter", "onMouseleave", "onClick", "onKeydown", "onFocus", "onBlur", "onContextmenu" ]; return nt(() => { be(() => n.virtualRef, (d) => { d && (a.value = qc(d)); }, { immediate: !0 }), be(a, (d, f) => { u == null || u(), u = void 0, Zv(d) && (c.forEach((h) => { var p; const v = n[h]; v && (d.addEventListener(h.slice(2).toLowerCase(), v), (p = f == null ? void 0 : f.removeEventListener) == null || p.call(f, h.slice(2).toLowerCase(), v)); }), u = be([o, i, s, l], (h) => { [ "aria-controls", "aria-describedby", "aria-haspopup", "aria-expanded" ].forEach((p, v) => { nE(h[v]) ? d.removeAttribute(p) : d.setAttribute(p, h[v]); }); }, { immediate: !0 })), Zv(f) && [ "aria-controls", "aria-describedby", "aria-haspopup", "aria-expanded" ].forEach((h) => f.removeAttribute(h)); }, { immediate: !0 }); }), kt(() => { if (u == null || u(), u = void 0, a.value && Zv(a.value)) { const d = a.value; c.forEach((f) => { const h = n[f]; h && d.removeEventListener(f.slice(2).toLowerCase(), h); }), a.value = void 0; } }), t({ triggerRef: a }), (d, f) => d.virtualTriggering ? ne("v-if", !0) : (I(), de(b(VLe), Bt({ key: 0 }, d.$attrs, { "aria-controls": b(o), "aria-describedby": b(i), "aria-expanded": b(l), "aria-haspopup": b(s) }), { default: K(() => [ he(d.$slots, "default") ]), _: 3 }, 16, ["aria-controls", "aria-describedby", "aria-expanded", "aria-haspopup"])); } }); var ULe = /* @__PURE__ */ Na(HLe, [["__file", "trigger.vue"]]); const Ek = "focus-trap.focus-after-trapped", _k = "focus-trap.focus-after-released", qLe = "focus-trap.focusout-prevented", mA = { cancelable: !0, bubbles: !1 }, WLe = { cancelable: !0, bubbles: !1 }, yA = "focusAfterTrapped", bA = "focusAfterReleased", KLe = Symbol("elFocusTrap"), mE = U(), $w = U(0), yE = U(0); let h1 = 0; const fj = (e) => { const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, { acceptNode: (r) => { const a = r.tagName === "INPUT" && r.type === "hidden"; return r.disabled || r.hidden || a ? NodeFilter.FILTER_SKIP : r.tabIndex >= 0 || r === document.activeElement ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP; } }); for (; n.nextNode(); ) t.push(n.currentNode); return t; }, wA = (e, t) => { for (const n of e) if (!GLe(n, t)) return n; }, GLe = (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; }, XLe = (e) => { const t = fj(e), n = wA(t, e), r = wA(t.reverse(), e); return [n, r]; }, YLe = (e) => e instanceof HTMLInputElement && "select" in e, su = (e, t) => { if (e && e.focus) { const n = document.activeElement; e.focus({ preventScroll: !0 }), yE.value = window.performance.now(), e !== n && YLe(e) && t && e.select(); } }; function xA(e, t) { const n = [...e], r = e.indexOf(t); return r !== -1 && n.splice(r, 1), n; } const ZLe = () => { let e = []; return { push: (t) => { const n = e[0]; n && t !== n && n.pause(), e = xA(e, t), e.unshift(t); }, remove: (t) => { var n, r; e = xA(e, t), (r = (n = e[0]) == null ? void 0 : n.resume) == null || r.call(n); } }; }, QLe = (e, t = !1) => { const n = document.activeElement; for (const r of e) if (su(r, t), document.activeElement !== n) return; }, kA = ZLe(), JLe = () => $w.value > yE.value, v1 = () => { mE.value = "pointer", $w.value = window.performance.now(); }, CA = () => { mE.value = "keyboard", $w.value = window.performance.now(); }, eNe = () => (nt(() => { h1 === 0 && (document.addEventListener("mousedown", v1), document.addEventListener("touchstart", v1), document.addEventListener("keydown", CA)), h1++; }), kt(() => { h1--, h1 <= 0 && (document.removeEventListener("mousedown", v1), document.removeEventListener("touchstart", v1), document.removeEventListener("keydown", CA)); }), { focusReason: mE, lastUserFocusTimestamp: $w, lastAutomatedFocusTimestamp: yE }), g1 = (e) => new CustomEvent(qLe, { ...WLe, detail: e }), tNe = X({ name: "ElFocusTrap", inheritAttrs: !1, props: { loop: Boolean, trapped: Boolean, focusTrapEl: Object, focusStartEl: { type: [Object, String], default: "first" } }, emits: [ yA, bA, "focusin", "focusout", "focusout-prevented", "release-requested" ], setup(e, { emit: t }) { const n = U(); let r, a; const { focusReason: o } = eNe(); hLe((p) => { e.trapped && !i.paused && t("release-requested", p); }); const i = { paused: !1, pause() { this.paused = !0; }, resume() { this.paused = !1; } }, s = (p) => { if (!e.loop && !e.trapped || i.paused) return; const { key: v, altKey: m, ctrlKey: g, metaKey: y, currentTarget: x, shiftKey: w } = p, { loop: k } = e, C = v === Cb.tab && !m && !g && !y, S = document.activeElement; if (C && S) { const _ = x, [T, O] = XLe(_); if (T && O) { if (!w && S === O) { const $ = g1({ focusReason: o.value }); t("focusout-prevented", $), $.defaultPrevented || (p.preventDefault(), k && su(T, !0)); } else if (w && [T, _].includes(S)) { const $ = g1({ focusReason: o.value }); t("focusout-prevented", $), $.defaultPrevented || (p.preventDefault(), k && su(O, !0)); } } else if (S === _) { const $ = g1({ focusReason: o.value }); t("focusout-prevented", $), $.defaultPrevented || p.preventDefault(); } } }; rt(KLe, { focusTrapRef: n, onKeydown: s }), be(() => e.focusTrapEl, (p) => { p && (n.value = p); }, { immediate: !0 }), be([n], ([p], [v]) => { p && (p.addEventListener("keydown", s), p.addEventListener("focusin", c), p.addEventListener("focusout", d)), v && (v.removeEventListener("keydown", s), v.removeEventListener("focusin", c), v.removeEventListener("focusout", d)); }); const l = (p) => { t(yA, p); }, u = (p) => t(bA, p), c = (p) => { const v = b(n); if (!v) return; const m = p.target, g = p.relatedTarget, y = m && v.contains(m); e.trapped || g && v.contains(g) || (r = g), y && t("focusin", p), !i.paused && e.trapped && (y ? a = m : su(a, !0)); }, d = (p) => { const v = b(n); if (!(i.paused || !v)) if (e.trapped) { const m = p.relatedTarget; !nE(m) && !v.contains(m) && setTimeout(() => { if (!i.paused && e.trapped) { const g = g1({ focusReason: o.value }); t("focusout-prevented", g), g.defaultPrevented || su(a, !0); } }, 0); } else { const m = p.target; m && v.contains(m) || t("focusout", p); } }; async function f() { await Ue(); const p = b(n); if (p) { kA.push(i); const v = p.contains(document.activeElement) ? r : document.activeElement; if (r = v, !p.contains(v)) { const m = new Event(Ek, mA); p.addEventListener(Ek, l), p.dispatchEvent(m), m.defaultPrevented || Ue(() => { let g = e.focusStartEl; Th(g) || (su(g), document.activeElement !== g && (g = "first")), g === "first" && QLe(fj(p), !0), (document.activeElement === v || g === "container") && su(p); }); } } } function h() { const p = b(n); if (p) { p.removeEventListener(Ek, l); const v = new CustomEvent(_k, { ...mA, detail: { focusReason: o.value } }); p.addEventListener(_k, u), p.dispatchEvent(v), !v.defaultPrevented && (o.value == "keyboard" || !JLe() || p.contains(document.activeElement)) && su(r ?? document.body), p.removeEventListener(_k, u), kA.remove(i); } } return nt(() => { e.trapped && f(), be(() => e.trapped, (p) => { p ? f() : h(); }); }), kt(() => { 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 nNe(e, t, n, r, a, o) { return he(e.$slots, "default", { handleKeydown: e.onKeydown }); } var rNe = /* @__PURE__ */ Na(tNe, [["render", nNe], ["__file", "focus-trap.vue"]]); const aNe = ["fixed", "absolute"], oNe = Vr({ boundariesPadding: { type: Number, default: 0 }, fallbackPlacements: { type: ln(Array), default: void 0 }, gpuAcceleration: { type: Boolean, default: !0 }, offset: { type: Number, default: 12 }, placement: { type: String, values: iE, default: "bottom" }, popperOptions: { type: ln(Object), default: () => ({}) }, strategy: { type: String, values: aNe, default: "absolute" } }), hj = Vr({ ...oNe, id: String, style: { type: ln([String, Array, Object]) }, className: { type: ln([String, Array, Object]) }, effect: { type: ln(String), default: "dark" }, visible: Boolean, enterable: { type: Boolean, default: !0 }, pure: Boolean, focusOnShow: { type: Boolean, default: !1 }, trapping: { type: Boolean, default: !1 }, popperClass: { type: ln([String, Array, Object]) }, popperStyle: { type: ln([String, Array, Object]) }, referenceEl: { type: ln(Object) }, triggerTargetEl: { type: ln(Object) }, stopPopperMouseEvent: { type: Boolean, default: !0 }, virtualTriggering: Boolean, zIndex: Number, ...oj(["ariaLabel"]) }), iNe = { mouseenter: (e) => e instanceof MouseEvent, mouseleave: (e) => e instanceof MouseEvent, focus: () => !0, blur: () => !0, close: () => !0 }, sNe = (e, t = []) => { const { placement: n, strategy: r, popperOptions: a } = e, o = { placement: n, strategy: r, ...a, modifiers: [...uNe(e), ...t] }; return cNe(o, a == null ? void 0 : a.modifiers), o; }, lNe = (e) => { if (Ao) return qc(e); }; function uNe(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 cNe(e, t) { t && (e.modifiers = [...e.modifiers, ...t ?? []]); } const dNe = 0, pNe = (e) => { const { popperInstanceRef: t, contentRef: n, triggerRef: r, role: a } = Te(gE, void 0), o = U(), i = U(), s = F(() => ({ name: "eventListeners", enabled: !!e.visible })), l = F(() => { var g; const y = b(o), x = (g = b(i)) != null ? g : dNe; return { name: "arrow", enabled: !BIe(y), options: { element: y, padding: x } }; }), u = F(() => ({ onFirstUpdate: () => { p(); }, ...sNe(e, [ b(l), b(s) ]) })), c = F(() => lNe(e.referenceEl) || b(r)), { attributes: d, state: f, styles: h, update: p, forceUpdate: v, instanceRef: m } = cLe(c, n, u); return be(m, (g) => t.value = g), nt(() => { be(() => { var g; return (g = b(c)) == null ? void 0 : g.getBoundingClientRect(); }, () => { p(); }); }), { attributes: d, arrowRef: o, contentRef: n, instanceRef: m, state: f, styles: h, role: a, forceUpdate: v, update: p }; }, fNe = (e, { attributes: t, styles: n, role: r }) => { const { nextZIndex: a } = rj(), o = gi("popper"), i = F(() => b(t).popper), s = U(U0(e.zIndex) ? e.zIndex : a()), l = F(() => [ o.b(), o.is("pure", e.pure), o.is(e.effect), e.popperClass ]), u = F(() => [ { zIndex: b(s) }, b(n).popper, e.popperStyle || {} ]), c = F(() => r.value === "dialog" ? "false" : void 0), d = F(() => b(n).arrow || {}); return { ariaModal: c, arrowStyle: d, contentAttrs: i, contentClass: l, contentStyle: u, contentZIndex: s, updateZIndex: () => { s.value = U0(e.zIndex) ? e.zIndex : a(); } }; }, hNe = (e, t) => { const n = U(!1), r = U(); return { focusStartRef: r, trapped: n, onFocusAfterReleased: (a) => { var o; ((o = a.detail) == null ? void 0 : o.focusReason) !== "pointer" && (r.value = "first", t("blur")); }, onFocusAfterTrapped: () => { t("focus"); }, onFocusInTrap: (a) => { e.visible && !n.value && (a.target && (r.value = a.target), n.value = !0); }, onFocusoutPrevented: (a) => { e.trapping || (a.detail.focusReason === "pointer" && a.preventDefault(), n.value = !1); }, onReleaseRequested: () => { n.value = !1, t("close"); } }; }, vNe = X({ name: "ElPopperContent" }), gNe = /* @__PURE__ */ X({ ...vNe, props: hj, emits: iNe, setup(e, { expose: t, emit: n }) { const r = e, { focusStartRef: a, trapped: o, onFocusAfterReleased: i, onFocusAfterTrapped: s, onFocusInTrap: l, onFocusoutPrevented: u, onReleaseRequested: c } = hNe(r, n), { attributes: d, arrowRef: f, contentRef: h, styles: p, instanceRef: v, role: m, update: g } = pNe(r), { ariaModal: y, arrowStyle: x, contentAttrs: w, contentClass: k, contentStyle: C, updateZIndex: S } = fNe(r, { styles: p, attributes: d, role: m }), _ = Te(_b, void 0), T = U(); rt(lj, { arrowStyle: x, arrowRef: f, arrowOffset: T }), _ && rt(_b, { ..._, addInputId: bb, removeInputId: bb }); let O; const $ = (N = !0) => { g(), N && S(); }, A = () => { $(!1), r.visible && r.focusOnShow ? o.value = !0 : r.visible === !1 && (o.value = !1); }; return nt(() => { be(() => r.triggerTargetEl, (N, L) => { O == null || O(), O = void 0; const R = b(N || h.value), P = b(L || h.value); Zv(R) && (O = be([m, () => r.ariaLabel, y, () => r.id], (B) => { ["role", "aria-label", "aria-modal", "id"].forEach((M, z) => { nE(B[z]) ? R.removeAttribute(M) : R.setAttribute(M, B[z]); }); }, { immediate: !0 })), P !== R && Zv(P) && ["role", "aria-label", "aria-modal", "id"].forEach((B) => { P.removeAttribute(B); }); }, { immediate: !0 }), be(() => r.visible, A, { immediate: !0 }); }), kt(() => { O == null || O(), O = void 0; }), t({ popperContentRef: h, popperInstanceRef: v, updatePopper: $, contentStyle: C }), (N, L) => (I(), j("div", Bt({ ref_key: "contentRef", ref: h }, b(w), { style: b(C), class: b(k), tabindex: "-1", onMouseenter: (R) => N.$emit("mouseenter", R), onMouseleave: (R) => N.$emit("mouseleave", R) }), [ ue(b(rNe), { trapped: b(o), "trap-on-focus-in": !0, "focus-trap-el": b(h), "focus-start-el": b(a), onFocusAfterTrapped: b(s), onFocusAfterReleased: b(i), onFocusin: b(l), onFocusoutPrevented: b(u), onReleaseRequested: b(c) }, { default: K(() => [ he(N.$slots, "default") ]), _: 3 }, 8, ["trapped", "focus-trap-el", "focus-start-el", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusin", "onFocusoutPrevented", "onReleaseRequested"]) ], 16, ["onMouseenter", "onMouseleave"])); } }); var mNe = /* @__PURE__ */ Na(gNe, [["__file", "content.vue"]]); const yNe = ip(BLe), bE = Symbol("elTooltip"), Ho = Vr({ ...mLe, ...hj, appendTo: { type: ln([String, Object]) }, content: { type: String, default: "" }, rawContent: Boolean, persistent: Boolean, visible: { type: ln(Boolean), default: null }, transition: String, teleported: { type: Boolean, default: !0 }, disabled: Boolean, ...oj(["ariaLabel"]) }), K0 = Vr({ ...pj, disabled: Boolean, trigger: { type: ln([String, Array]), default: "hover" }, triggerKeys: { type: ln(Array), default: () => [Cb.enter, Cb.space] } }), { useModelToggleProps: bNe, useModelToggleEmits: wNe, useModelToggle: xNe } = sPe("visible"), kNe = Vr({ ...uj, ...bNe, ...Ho, ...K0, ...cj, showArrow: { type: Boolean, default: !0 } }), CNe = [ ...wNe, "before-show", "before-hide", "show", "hide", "open", "close" ], SNe = (e, t) => HAe(e) ? e.includes(t) : e === t, $p = (e, t, n) => (r) => { SNe(b(e), t) && n(r); }, ENe = X({ name: "ElTooltipTrigger" }), _Ne = /* @__PURE__ */ X({ ...ENe, props: K0, setup(e, { expose: t }) { const n = e, r = gi("tooltip"), { controlled: a, id: o, open: i, onOpen: s, onClose: l, onToggle: u } = Te(bE, void 0), c = U(null), d = () => { if (b(a) || n.disabled) return !0; }, f = It(n, "trigger"), h = el(d, $p(f, "hover", s)), p = el(d, $p(f, "hover", l)), v = el(d, $p(f, "click", (w) => { w.button === 0 && u(w); })), m = el(d, $p(f, "focus", s)), g = el(d, $p(f, "focus", l)), y = el(d, $p(f, "contextmenu", (w) => { w.preventDefault(), u(w); })), x = el(d, (w) => { const { code: k } = w; n.triggerKeys.includes(k) && (w.preventDefault(), u(w)); }); return t({ triggerRef: c }), (w, k) => (I(), de(b(ULe), { id: b(o), "virtual-ref": w.virtualRef, open: b(i), "virtual-triggering": w.virtualTriggering, class: H(b(r).e("trigger")), onBlur: b(g), onClick: b(v), onContextmenu: b(y), onFocus: b(m), onMouseenter: b(h), onMouseleave: b(p), onKeydown: b(x) }, { default: K(() => [ he(w.$slots, "default") ]), _: 3 }, 8, ["id", "virtual-ref", "open", "virtual-triggering", "class", "onBlur", "onClick", "onContextmenu", "onFocus", "onMouseenter", "onMouseleave", "onKeydown"])); } }); var TNe = /* @__PURE__ */ Na(_Ne, [["__file", "trigger.vue"]]); const ONe = Vr({ to: { type: ln([String, Object]), required: !0 }, disabled: Boolean }), $Ne = /* @__PURE__ */ X({ __name: "teleport", props: ONe, setup(e) { return (t, n) => t.disabled ? he(t.$slots, "default", { key: 0 }) : (I(), de(bg, { key: 1, to: t.to }, [ he(t.$slots, "default") ], 8, ["to"])); } }); var FNe = /* @__PURE__ */ Na($Ne, [["__file", "teleport.vue"]]); const ANe = ip(FNe), INe = X({ name: "ElTooltipContent", inheritAttrs: !1 }), PNe = /* @__PURE__ */ X({ ...INe, props: Ho, setup(e, { expose: t }) { const n = e, { selector: r } = JV(), a = gi("tooltip"), o = U(null); let i; const { controlled: s, id: l, open: u, trigger: c, onClose: d, onOpen: f, onShow: h, onHide: p, onBeforeShow: v, onBeforeHide: m } = Te(bE, void 0), g = F(() => n.transition || `${a.namespace.value}-fade-in-linear`), y = F(() => process.env.NODE_ENV === "test" ? !0 : n.persistent); kt(() => { i == null || i(); }); const x = F(() => b(y) ? !0 : b(u)), w = F(() => n.disabled ? !1 : b(u)), k = F(() => n.appendTo || r.value), C = F(() => { var P; return (P = n.style) != null ? P : {}; }), S = U(!0), _ = () => { p(), S.value = !0; }, T = () => { if (b(s)) return !0; }, O = el(T, () => { n.enterable && b(c) === "hover" && f(); }), $ = el(T, () => { b(c) === "hover" && d(); }), A = () => { var P, B; (B = (P = o.value) == null ? void 0 : P.updatePopper) == null || B.call(P), v == null || v(); }, N = () => { m == null || m(); }, L = () => { h(), i = MAe(F(() => { var P; return (P = o.value) == null ? void 0 : P.popperContentRef; }), () => { b(s) || b(c) !== "hover" && d(); }); }, R = () => { n.virtualTriggering || d(); }; return be(() => b(u), (P) => { P ? S.value = !1 : i == null || i(); }, { flush: "post" }), be(() => n.content, () => { var P, B; (B = (P = o.value) == null ? void 0 : P.updatePopper) == null || B.call(P); }), t({ contentRef: o }), (P, B) => (I(), de(b(ANe), { disabled: !P.teleported, to: b(k) }, { default: K(() => [ ue(vr, { name: b(g), onAfterLeave: _, onBeforeEnter: A, onAfterEnter: L, onBeforeLeave: N }, { default: K(() => [ b(x) ? Xe((I(), de(b(mNe), Bt({ key: 0, id: b(l), ref_key: "contentRef", ref: o }, P.$attrs, { "aria-label": P.ariaLabel, "aria-hidden": S.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, b(C)], "reference-el": P.referenceEl, "trigger-target-el": P.triggerTargetEl, visible: b(w), "z-index": P.zIndex, onMouseenter: b(O), onMouseleave: b($), onBlur: R, onClose: b(d) }), { default: K(() => [ he(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"])), [ [mt, b(w)] ]) : ne("v-if", !0) ]), _: 3 }, 8, ["name"]) ]), _: 3 }, 8, ["disabled", "to"])); } }); var LNe = /* @__PURE__ */ Na(PNe, [["__file", "content.vue"]]); const NNe = X({ name: "ElTooltip" }), MNe = /* @__PURE__ */ X({ ...NNe, props: kNe, emits: CNe, setup(e, { expose: t, emit: n }) { const r = e; gLe(); const a = fLe(), o = U(), i = U(), s = () => { var g; const y = b(o); y && ((g = y.popperInstanceRef) == null || g.update()); }, l = U(!1), u = U(), { show: c, hide: d, hasUpdateHandler: f } = xNe({ indicator: l, toggleReason: u }), { onOpen: h, onClose: p } = yLe({ showAfter: It(r, "showAfter"), hideAfter: It(r, "hideAfter"), autoClose: It(r, "autoClose"), open: c, close: d }), v = F(() => rE(r.visible) && !f.value); rt(bE, { controlled: v, id: a, open: ih(l), trigger: It(r, "trigger"), onOpen: (g) => { h(g); }, onClose: (g) => { p(g); }, onToggle: (g) => { b(l) ? p(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 }), be(() => r.disabled, (g) => { g && l.value && (l.value = !1); }); const m = (g) => { var y, x; const w = (x = (y = i.value) == null ? void 0 : y.contentRef) == null ? void 0 : x.popperContentRef, k = (g == null ? void 0 : g.relatedTarget) || document.activeElement; return w && w.contains(k); }; return wg(() => l.value && d()), t({ popperRef: o, contentRef: i, isFocusInsideContent: m, updatePopper: s, onOpen: h, onClose: p, hide: d }), (g, y) => (I(), de(b(yNe), { ref_key: "popperRef", ref: o, role: g.role }, { default: K(() => [ ue(TNe, { disabled: g.disabled, trigger: g.trigger, "trigger-keys": g.triggerKeys, "virtual-ref": g.virtualRef, "virtual-triggering": g.virtualTriggering }, { default: K(() => [ g.$slots.default ? he(g.$slots, "default", { key: 0 }) : ne("v-if", !0) ]), _: 3 }, 8, ["disabled", "trigger", "trigger-keys", "virtual-ref", "virtual-triggering"]), ue(LNe, { 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: K(() => [ he(g.$slots, "content", {}, () => [ g.rawContent ? (I(), j("span", { key: 0, innerHTML: g.content }, null, 8, ["innerHTML"])) : (I(), j("span", { key: 1 }, Fe(g.content), 1)) ]), g.showArrow ? (I(), de(b(zLe), { key: 0, "arrow-offset": g.arrowOffset }, null, 8, ["arrow-offset"])) : ne("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 BNe = /* @__PURE__ */ Na(MNe, [["__file", "tooltip.vue"]]); const DNe = ip(BNe), vj = Symbol("buttonGroupContextKey"), RNe = (e, t) => { QIe({ from: "type.text", replacement: "link", version: "3.0.0", scope: "props", ref: "https://element-plus.org/en-US/component/button.html#button-attributes" }, F(() => e.type === "text")); const n = Te(vj, void 0), r = hE("button"), { form: a } = PLe(), o = ILe(F(() => n == null ? void 0 : n.size)), i = sj(), s = U(), l = Cr(), u = F(() => e.type || (n == null ? void 0 : n.type) || ""), c = F(() => { var h, p, v; return (v = (p = e.autoInsertSpace) != null ? p : (h = r.value) == null ? void 0 : h.autoInsertSpace) != null ? v : !1; }), d = F(() => e.tag === "button" ? { ariaDisabled: i.value || e.loading, disabled: i.value || e.loading, autofocus: e.autofocus, type: e.nativeType } : {}), f = F(() => { var h; const p = (h = l.default) == null ? void 0 : h.call(l); if (c.value && (p == null ? void 0 : p.length) === 1) { const v = p[0]; if ((v == null ? void 0 : v.type) === Ps) { const m = v.children; return new RegExp("^\\p{Unified_Ideograph}{2}$", "u").test(m.trim()); } } return !1; }); return { _disabled: i, _size: o, _type: u, _ref: s, _props: d, shouldAddSpace: f, handleClick: (h) => { if (i.value || e.loading) { h.stopPropagation(); return; } e.nativeType === "reset" && (a == null || a.resetFields()), t("click", h); } }; }, zNe = [ "default", "primary", "success", "warning", "info", "danger", "text", "" ], VNe = ["button", "submit", "reset"], L5 = Vr({ size: xLe, disabled: Boolean, type: { type: String, values: zNe, default: "" }, icon: { type: A5 }, nativeType: { type: String, values: VNe, default: "button" }, loading: Boolean, loadingIcon: { type: A5, default: () => KIe }, 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: ln([String, Object]), default: "button" } }), jNe = { click: (e) => e instanceof MouseEvent }; function pa(e, t) { HNe(e) && (e = "100%"); var n = UNe(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 m1(e) { return Math.min(1, Math.max(0, e)); } function HNe(e) { return typeof e == "string" && e.indexOf(".") !== -1 && parseFloat(e) === 1; } function UNe(e) { return typeof e == "string" && e.indexOf("%") !== -1; } function gj(e) { return e = parseFloat(e), (isNaN(e) || e < 0 || e > 1) && (e = 1), e; } function y1(e) { return e <= 1 ? "".concat(Number(e) * 100, "%") : e; } function Wc(e) { return e.length === 1 ? "0" + e : String(e); } function qNe(e, t, n) { return { r: pa(e, 255) * 255, g: pa(t, 255) * 255, b: pa(n, 255) * 255 }; } function SA(e, t, n) { e = pa(e, 255), t = pa(t, 255), n = pa(n, 255); var r = Math.max(e, t, n), a = Math.min(e, t, n), o = 0, i = 0, s = (r + a) / 2; if (r === a) i = 0, o = 0; else { var l = r - a; switch (i = s > 0.5 ? l / (2 - r - a) : l / (r + a), r) { case e: o = (t - n) / l + (t < n ? 6 : 0); break; case t: o = (n - e) / l + 2; break; case n: o = (e - t) / l + 4; break; } o /= 6; } return { h: o, s: i, l: s }; } function Tk(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 WNe(e, t, n) { var r, a, o; if (e = pa(e, 360), t = pa(t, 100), n = pa(n, 100), t === 0) a = n, o = n, r = n; else { var i = n < 0.5 ? n * (1 + t) : n + t - n * t, s = 2 * n - i; r = Tk(s, i, e + 1 / 3), a = Tk(s, i, e), o = Tk(s, i, e - 1 / 3); } return { r: r * 255, g: a * 255, b: o * 255 }; } function EA(e, t, n) { e = pa(e, 255), t = pa(t, 255), n = pa(n, 255); var r = Math.max(e, t, n), a = Math.min(e, t, n), o = 0, i = r, s = r - a, l = r === 0 ? 0 : s / r; if (r === a) o = 0; else { switch (r) { case e: o = (t - n) / s + (t < n ? 6 : 0); break; case t: o = (n - e) / s + 2; break; case n: o = (e - t) / s + 4; break; } o /= 6; } return { h: o, s: l, v: i }; } function KNe(e, t, n) { e = pa(e, 360) * 6, t = pa(t, 100), n = pa(n, 100); var r = Math.floor(e), a = e - r, o = n * (1 - t), i = n * (1 - a * t), s = n * (1 - (1 - a) * t), l = r % 6, u = [n, i, o, o, s, n][l], c = [s, n, n, i, o, o][l], d = [o, o, s, n, n, i][l]; return { r: u * 255, g: c * 255, b: d * 255 }; } function _A(e, t, n, r) { var a = [ Wc(Math.round(e).toString(16)), Wc(Math.round(t).toString(16)), Wc(Math.round(n).toString(16)) ]; return r && a[0].startsWith(a[0].charAt(1)) && a[1].startsWith(a[1].charAt(1)) && a[2].startsWith(a[2].charAt(1)) ? a[0].charAt(0) + a[1].charAt(0) + a[2].charAt(0) : a.join(""); } function GNe(e, t, n, r, a) { var o = [ Wc(Math.round(e).toString(16)), Wc(Math.round(t).toString(16)), Wc(Math.round(n).toString(16)), Wc(XNe(r)) ]; return a && o[0].startsWith(o[0].charAt(1)) && o[1].startsWith(o[1].charAt(1)) && o[2].startsWith(o[2].charAt(1)) && o[3].startsWith(o[3].charAt(1)) ? o[0].charAt(0) + o[1].charAt(0) + o[2].charAt(0) + o[3].charAt(0) : o.join(""); } function XNe(e) { return Math.round(parseFloat(e) * 255).toString(16); } function TA(e) { return _o(e) / 255; } function _o(e) { return parseInt(e, 16); } function YNe(e) { return { r: e >> 16, g: (e & 65280) >> 8, b: e & 255 }; } var N5 = { 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 ZNe(e) { var t = { r: 0, g: 0, b: 0 }, n = 1, r = null, a = null, o = null, i = !1, s = !1; return typeof e == "string" && (e = eMe(e)), typeof e == "object" && (Ws(e.r) && Ws(e.g) && Ws(e.b) ? (t = qNe(e.r, e.g, e.b), i = !0, s = String(e.r).substr(-1) === "%" ? "prgb" : "rgb") : Ws(e.h) && Ws(e.s) && Ws(e.v) ? (r = y1(e.s), a = y1(e.v), t = KNe(e.h, r, a), i = !0, s = "hsv") : Ws(e.h) && Ws(e.s) && Ws(e.l) && (r = y1(e.s), o = y1(e.l), t = WNe(e.h, r, o), i = !0, s = "hsl"), Object.prototype.hasOwnProperty.call(e, "a") && (n = e.a)), n = gj(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 QNe = "[-\\+]?\\d+%?", JNe = "[-\\+]?\\d*\\.\\d+%?", Tu = "(?:".concat(JNe, ")|(?:").concat(QNe, ")"), Ok = "[\\s|\\(]+(".concat(Tu, ")[,|\\s]+(").concat(Tu, ")[,|\\s]+(").concat(Tu, ")\\s*\\)?"), $k = "[\\s|\\(]+(".concat(Tu, ")[,|\\s]+(").concat(Tu, ")[,|\\s]+(").concat(Tu, ")[,|\\s]+(").concat(Tu, ")\\s*\\)?"), Si = { CSS_UNIT: new RegExp(Tu), rgb: new RegExp("rgb" + Ok), rgba: new RegExp("rgba" + $k), hsl: new RegExp("hsl" + Ok), hsla: new RegExp("hsla" + $k), hsv: new RegExp("hsv" + Ok), hsva: new RegExp("hsva" + $k), 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 eMe(e) { if (e = e.trim().toLowerCase(), e.length === 0) return !1; var t = !1; if (N5[e]) e = N5[e], t = !0; else if (e === "transparent") return { r: 0, g: 0, b: 0, a: 0, format: "name" }; var n = Si.rgb.exec(e); return n ? { r: n[1], g: n[2], b: n[3] } : (n = Si.rgba.exec(e), n ? { r: n[1], g: n[2], b: n[3], a: n[4] } : (n = Si.hsl.exec(e), n ? { h: n[1], s: n[2], l: n[3] } : (n = Si.hsla.exec(e), n ? { h: n[1], s: n[2], l: n[3], a: n[4] } : (n = Si.hsv.exec(e), n ? { h: n[1], s: n[2], v: n[3] } : (n = Si.hsva.exec(e), n ? { h: n[1], s: n[2], v: n[3], a: n[4] } : (n = Si.hex8.exec(e), n ? { r: _o(n[1]), g: _o(n[2]), b: _o(n[3]), a: TA(n[4]), format: t ? "name" : "hex8" } : (n = Si.hex6.exec(e), n ? { r: _o(n[1]), g: _o(n[2]), b: _o(n[3]), format: t ? "name" : "hex" } : (n = Si.hex4.exec(e), n ? { r: _o(n[1] + n[1]), g: _o(n[2] + n[2]), b: _o(n[3] + n[3]), a: TA(n[4] + n[4]), format: t ? "name" : "hex8" } : (n = Si.hex3.exec(e), n ? { r: _o(n[1] + n[1]), g: _o(n[2] + n[2]), b: _o(n[3] + n[3]), format: t ? "name" : "hex" } : !1))))))))); } function Ws(e) { return !!Si.CSS_UNIT.exec(String(e)); } var tMe = ( /** @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 = YNe(t)), this.originalInput = t; var a = ZNe(t); this.originalInput = t, this.r = a.r, this.g = a.g, this.b = a.b, this.a = a.a, this.roundA = Math.round(100 * this.a) / 100, this.format = (r = n.format) !== null && r !== void 0 ? r : a.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 = a.ok; } return e.prototype.isDark = function() { return this.getBrightness() < 128; }, e.prototype.isLight = function() { return !this.isDark(); }, e.prototype.getBrightness = function() { var t = this.toRgb(); return (t.r * 299 + t.g * 587 + t.b * 114) / 1e3; }, e.prototype.getLuminance = function() { var t = this.toRgb(), n, r, a, o = t.r / 255, i = t.g / 255, s = t.b / 255; return o <= 0.03928 ? n = o / 12.92 : n = Math.pow((o + 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 ? a = s / 12.92 : a = Math.pow((s + 0.055) / 1.055, 2.4), 0.2126 * n + 0.7152 * r + 0.0722 * a; }, e.prototype.getAlpha = function() { return this.a; }, e.prototype.setAlpha = function(t) { return this.a = gj(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 = EA(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 = EA(this.r, this.g, this.b), n = Math.round(t.h * 360), r = Math.round(t.s * 100), a = Math.round(t.v * 100); return this.a === 1 ? "hsv(".concat(n, ", ").concat(r, "%, ").concat(a, "%)") : "hsva(".concat(n, ", ").concat(r, "%, ").concat(a, "%, ").concat(this.roundA, ")"); }, e.prototype.toHsl = function() { var t = SA(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 = SA(this.r, this.g, this.b), n = Math.round(t.h * 360), r = Math.round(t.s * 100), a = Math.round(t.l * 100); return this.a === 1 ? "hsl(".concat(n, ", ").concat(r, "%, ").concat(a, "%)") : "hsla(".concat(n, ", ").concat(r, "%, ").concat(a, "%, ").concat(this.roundA, ")"); }, e.prototype.toHex = function(t) { return t === void 0 && (t = !1), _A(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), GNe(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(pa(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(pa(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 = "#" + _A(this.r, this.g, this.b, !1), n = 0, r = Object.entries(N5); n < r.length; n++) { var a = r[n], o = a[0], i = a[1]; if (t === i) return o; } return !1; }, e.prototype.toString = function(t) { var n = !!t; t = t ?? this.format; var r = !1, a = this.a < 1 && this.a >= 0, o = !n && a && (t.startsWith("hex") || t === "name"); return o ? 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 = m1(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 = m1(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 = m1(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 = m1(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(), a = new e(t).toRgb(), o = n / 100, i = { r: (a.r - r.r) * o + r.r, g: (a.g - r.g) * o + r.g, b: (a.b - r.b) * o + r.b, a: (a.a - r.a) * o + 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(), a = 360 / n, o = [this]; for (r.h = (r.h - (a * t >> 1) + 720) % 360; --t; ) r.h = (r.h + a) % 360, o.push(new e(r)); return o; }, 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, a = n.s, o = n.v, i = [], s = 1 / t; t--; ) i.push(new e({ h: r, s: a, v: o })), o = (o + 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(), a = n.a + r.a * (1 - n.a); return new e({ r: (n.r * n.a + r.r * r.a * (1 - n.a)) / a, g: (n.g * n.a + r.g * r.a * (1 - n.a)) / a, b: (n.b * n.a + r.b * r.a * (1 - n.a)) / a, a }); }, e.prototype.triad = function() { return this.polyad(3); }, e.prototype.tetrad = function() { return this.polyad(4); }, e.prototype.polyad = function(t) { for (var n = this.toHsl(), r = n.h, a = [this], o = 360 / t, i = 1; i < t; i++) a.push(new e({ h: (r + i * o) % 360, s: n.s, l: n.l })); return a; }, e.prototype.equals = function(t) { return this.toRgbString() === new e(t).toRgbString(); }, e; }() ); function Yl(e, t = 20) { return e.mix("#141414", t).toString(); } function nMe(e) { const t = sj(), n = gi("button"); return F(() => { let r = {}, a = e.color; if (a) { const o = a.match(/var\((.*?)\)/); o && (a = window.getComputedStyle(window.document.documentElement).getPropertyValue(o[1])); const i = new tMe(a), s = e.dark ? i.tint(20).toString() : Yl(i, 20); if (e.plain) r = n.cssVarBlock({ "bg-color": e.dark ? Yl(i, 90) : i.tint(90).toString(), "text-color": a, "border-color": e.dark ? Yl(i, 50) : i.tint(50).toString(), "hover-text-color": `var(${n.cssVarName("color-white")})`, "hover-bg-color": a, "hover-border-color": a, "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 ? Yl(i, 90) : i.tint(90).toString(), r[n.cssVarBlockName("disabled-text-color")] = e.dark ? Yl(i, 50) : i.tint(50).toString(), r[n.cssVarBlockName("disabled-border-color")] = e.dark ? Yl(i, 80) : i.tint(80).toString()); else { const l = e.dark ? Yl(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": a, "text-color": u, "border-color": a, "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 ? Yl(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 rMe = X({ name: "ElButton" }), aMe = /* @__PURE__ */ X({ ...rMe, props: L5, emits: jNe, setup(e, { expose: t, emit: n }) { const r = e, a = nMe(r), o = gi("button"), { _ref: i, _size: s, _type: l, _disabled: u, _props: c, shouldAddSpace: d, handleClick: f } = RNe(r, n), h = F(() => [ o.b(), o.m(l.value), o.m(s.value), o.is("disabled", u.value), o.is("loading", r.loading), o.is("plain", r.plain), o.is("round", r.round), o.is("circle", r.circle), o.is("text", r.text), o.is("link", r.link), o.is("has-bg", r.bg) ]); return t({ ref: i, size: s, type: l, disabled: u, shouldAddSpace: d }), (p, v) => (I(), de(ct(p.tag), Bt({ ref_key: "_ref", ref: i }, b(c), { class: b(h), style: b(a), onClick: b(f) }), { default: K(() => [ p.loading ? (I(), j(Qe, { key: 0 }, [ p.$slots.loading ? he(p.$slots, "loading", { key: 0 }) : (I(), de(b(vA), { key: 1, class: H(b(o).is("loading")) }, { default: K(() => [ (I(), de(ct(p.loadingIcon))) ]), _: 1 }, 8, ["class"])) ], 64)) : p.icon || p.$slots.icon ? (I(), de(b(vA), { key: 1 }, { default: K(() => [ p.icon ? (I(), de(ct(p.icon), { key: 0 })) : he(p.$slots, "icon", { key: 1 }) ]), _: 3 })) : ne("v-if", !0), p.$slots.default ? (I(), j("span", { key: 2, class: H({ [b(o).em("text", "expand")]: b(d) }) }, [ he(p.$slots, "default") ], 2)) : ne("v-if", !0) ]), _: 3 }, 16, ["class", "style", "onClick"])); } }); var oMe = /* @__PURE__ */ Na(aMe, [["__file", "button.vue"]]); const iMe = { size: L5.size, type: L5.type }, sMe = X({ name: "ElButtonGroup" }), lMe = /* @__PURE__ */ X({ ...sMe, props: iMe, setup(e) { const t = e; rt(vj, tn({ size: It(t, "size"), type: It(t, "type") })); const n = gi("button"); return (r, a) => (I(), j("div", { class: H(b(n).b("group")) }, [ he(r.$slots, "default") ], 2)); } }); var mj = /* @__PURE__ */ Na(lMe, [["__file", "button-group.vue"]]); const uMe = ip(oMe, { ButtonGroup: mj }); YIe(mj); const cMe = Vr({ header: { type: String, default: "" }, footer: { type: String, default: "" }, bodyStyle: { type: ln([String, Object, Array]), default: "" }, bodyClass: String, shadow: { type: String, values: ["always", "hover", "never"], default: "always" } }), dMe = X({ name: "ElCard" }), pMe = /* @__PURE__ */ X({ ...dMe, props: cMe, setup(e) { const t = gi("card"); return (n, r) => (I(), j("div", { class: H([b(t).b(), b(t).is(`${n.shadow}-shadow`)]) }, [ n.$slots.header || n.header ? (I(), j("div", { key: 0, class: H(b(t).e("header")) }, [ he(n.$slots, "header", {}, () => [ et(Fe(n.header), 1) ]) ], 2)) : ne("v-if", !0), W("div", { class: H([b(t).e("body"), n.bodyClass]), style: Ye(n.bodyStyle) }, [ he(n.$slots, "default") ], 6), n.$slots.footer || n.footer ? (I(), j("div", { key: 1, class: H(b(t).e("footer")) }, [ he(n.$slots, "footer", {}, () => [ et(Fe(n.footer), 1) ]) ], 2)) : ne("v-if", !0) ], 2)); } }); var fMe = /* @__PURE__ */ Na(pMe, [["__file", "card.vue"]]); const hMe = ip(fMe), vMe = /* @__PURE__ */ X({ inheritAttrs: !1 }); function gMe(e, t, n, r, a, o) { return he(e.$slots, "default"); } var mMe = /* @__PURE__ */ Na(vMe, [["render", gMe], ["__file", "collection.vue"]]); const yMe = /* @__PURE__ */ X({ name: "ElCollectionItem", inheritAttrs: !1 }); function bMe(e, t, n, r, a, o) { return he(e.$slots, "default"); } var wMe = /* @__PURE__ */ Na(yMe, [["render", bMe], ["__file", "collection-item.vue"]]); const xMe = "data-el-collection-item", kMe = (e) => { const t = `El${e}Collection`, n = `${t}Item`, r = Symbol(t), a = Symbol(n), o = { ...mMe, name: t, setup() { const s = U(null), l = /* @__PURE__ */ new Map(); rt(r, { itemMap: l, getItems: () => { const u = b(s); if (!u) return []; const c = Array.from(u.querySelectorAll(`[${xMe}]`)); return [...l.values()].sort((d, f) => c.indexOf(d.ref) - c.indexOf(f.ref)); }, collectionRef: s }); } }, i = { ...wMe, name: n, setup(s, { attrs: l }) { const u = U(null), c = Te(r, void 0); rt(a, { collectionItemRef: u }), nt(() => { const d = b(u); d && c.itemMap.set(d, { ref: d, ...l }); }), kt(() => { const d = b(u); c.itemMap.delete(d); }); } }; return { COLLECTION_INJECTION_KEY: r, COLLECTION_ITEM_INJECTION_KEY: a, ElCollection: o, ElCollectionItem: i }; }, Fk = Vr({ trigger: K0.trigger, effect: { ...Ho.effect, default: "light" }, type: { type: ln(String) }, placement: { type: ln(String), default: "bottom" }, popperOptions: { type: ln(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: ln([Number, String]), default: 0 }, maxHeight: { type: ln([Number, String]), default: "" }, popperClass: { type: String, default: "" }, disabled: Boolean, role: { type: String, default: "menu" }, buttonProps: { type: ln(Object) }, teleported: Ho.teleported }); Vr({ command: { type: [Object, String, Number], default: () => ({}) }, disabled: Boolean, divided: Boolean, textValue: String, icon: { type: A5 } }); Vr({ onKeydown: { type: ln(Function) } }); kMe("Dropdown"); const CMe = Vr({ trigger: K0.trigger, placement: Fk.placement, disabled: K0.disabled, visible: Ho.visible, transition: Ho.transition, popperOptions: Fk.popperOptions, tabindex: Fk.tabindex, content: Ho.content, popperStyle: Ho.popperStyle, popperClass: Ho.popperClass, enterable: { ...Ho.enterable, default: !0 }, effect: { ...Ho.effect, default: "light" }, teleported: Ho.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 } }), SMe = { "update:visible": (e) => rE(e), "before-enter": () => !0, "before-leave": () => !0, "after-enter": () => !0, "after-leave": () => !0 }, EMe = "onUpdate:visible", _Me = X({ name: "ElPopover" }), TMe = /* @__PURE__ */ X({ ..._Me, props: CMe, emits: SMe, setup(e, { expose: t, emit: n }) { const r = e, a = F(() => r[EMe]), o = gi("popover"), i = U(), s = F(() => { var m; return (m = b(i)) == null ? void 0 : m.popperRef; }), l = F(() => [ { width: MV(r.width) }, r.popperStyle ]), u = F(() => [o.b(), r.popperClass, { [o.m("plain")]: !!r.content }]), c = F(() => r.transition === `${o.namespace.value}-fade-in-linear`), d = () => { var m; (m = i.value) == null || m.hide(); }, f = () => { n("before-enter"); }, h = () => { n("before-leave"); }, p = () => { n("after-enter"); }, v = () => { n("update:visible", !1), n("after-leave"); }; return t({ popperRef: s, hide: d }), (m, g) => (I(), de(b(DNe), Bt({ 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": b(u), "popper-style": b(l), teleported: m.teleported, persistent: m.persistent, "gpu-acceleration": b(c), "onUpdate:visible": b(a), onBeforeShow: f, onBeforeHide: h, onShow: p, onHide: v }), { content: K(() => [ m.title ? (I(), j("div", { key: 0, class: H(b(o).e("title")), role: "title" }, Fe(m.title), 3)) : ne("v-if", !0), he(m.$slots, "default", {}, () => [ et(Fe(m.content), 1) ]) ]), default: K(() => [ m.$slots.reference ? he(m.$slots, "reference", { key: 0 }) : ne("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 OMe = /* @__PURE__ */ Na(TMe, [["__file", "popover.vue"]]); const OA = (e, t) => { const n = t.arg || t.value, r = n == null ? void 0 : n.popperRef; r && (r.triggerRef = e); }; var $Me = { mounted(e, t) { OA(e, t); }, updated(e, t) { OA(e, t); } }; const FMe = "popover", AMe = XIe($Me, FMe), IMe = ip(OMe, { directive: AMe }); function PMe(e) { let t; const n = U(!1), r = tn({ ...e, originalPosition: "", originalOverflow: "", visible: !1 }); function a(f) { r.text = f; } function o() { const f = r.parent, h = d.ns; if (!f.vLoadingAddClassList) { let p = f.getAttribute("loading-number"); p = Number.parseInt(p) - 1, p ? f.setAttribute("loading-number", p.toString()) : (kb(f, h.bm("parent", "relative")), f.removeAttribute("loading-number")), kb(f, h.bm("parent", "hidden")); } i(), c.unmount(); } function i() { var f, h; (h = (f = d.$el) == null ? void 0 : f.parentNode) == null || h.removeChild(d.$el); } function s() { var f; e.beforeClose && !e.beforeClose() || (n.value = !0, clearTimeout(t), t = setTimeout(l, 400), r.visible = !1, (f = e.closed) == null || f.call(e)); } function l() { if (!n.value) return; const f = r.parent; n.value = !1, f.vLoadingAddClassList = void 0, o(); } const u = X({ name: "ElLoading", setup(f, { expose: h }) { const { ns: p, zIndex: v } = ELe("loading"); return h({ ns: p, zIndex: v }), () => { const m = r.spinner || r.svg, g = sn("svg", { class: "circular", viewBox: r.svgViewBox ? r.svgViewBox : "0 0 50 50", ...m ? { innerHTML: m } : {} }, [ sn("circle", { class: "path", cx: "25", cy: "25", r: "20", fill: "none" }) ]), y = r.text ? sn("p", { class: p.b("text") }, [r.text]) : void 0; return sn(vr, { name: p.b("fade"), onAfterLeave: l }, { default: K(() => [ Xe(ue("div", { style: { backgroundColor: r.background || "" }, class: [ p.b("mask"), r.customClass, r.fullscreen ? "is-fullscreen" : "" ] }, [ sn("div", { class: p.b("spinner") }, [g, y]) ]), [[mt, r.visible]]) ]) }); }; } }), c = e2(u), d = c.mount(document.createElement("div")); return { ...Sr(r), setText: a, removeElLoadingChild: i, close: s, handleAfterLeave: l, vm: d, get $el() { return d.$el; } }; } let b1; const LMe = function(e = {}) { if (!Ao) return; const t = NMe(e); if (t.fullscreen && b1) return b1; const n = PMe({ ...t, closed: () => { var a; (a = t.closed) == null || a.call(t), t.fullscreen && (b1 = void 0); } }); MMe(t, t.parent, n), $A(t, t.parent, n), t.parent.vLoadingAddClassList = () => $A(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), Ue(() => n.visible.value = t.visible), t.fullscreen && (b1 = n), n; }, NMe = (e) => { var t, n, r, a; let o; return Th(e.target) ? o = (t = document.querySelector(e.target)) != null ? t : document.body : o = e.target || document.body, { parent: o === document.body || e.body ? document.body : o, background: e.background || "", svg: e.svg || "", svgViewBox: e.svgViewBox || "", spinner: e.spinner || !1, text: e.text || "", fullscreen: o === document.body && ((n = e.fullscreen) != null ? n : !0), lock: (r = e.lock) != null ? r : !1, customClass: e.customClass || "", visible: (a = e.visible) != null ? a : !0, beforeClose: e.beforeClose, closed: e.closed, target: o }; }, MMe = async (e, t, n) => { const { nextZIndex: r } = n.vm.zIndex || n.vm._.exposed.zIndex, a = {}; if (e.fullscreen) n.originalPosition.value = cv(document.body, "position"), n.originalOverflow.value = cv(document.body, "overflow"), a.zIndex = r(); else if (e.parent === document.body) { n.originalPosition.value = cv(document.body, "position"), await Ue(); for (const o of ["top", "left"]) { const i = o === "top" ? "scrollTop" : "scrollLeft"; a[o] = `${e.target.getBoundingClientRect()[o] + document.body[i] + document.documentElement[i] - Number.parseInt(cv(document.body, `margin-${o}`), 10)}px`; } for (const o of ["height", "width"]) a[o] = `${e.target.getBoundingClientRect()[o]}px`; } else n.originalPosition.value = cv(t, "position"); for (const [o, i] of Object.entries(a)) n.$el.style[o] = i; }, $A = (e, t, n) => { const r = n.vm.ns || n.vm._.exposed.ns; ["absolute", "fixed", "sticky"].includes(n.originalPosition.value) ? kb(t, r.bm("parent", "relative")) : JF(t, r.bm("parent", "relative")), e.fullscreen && e.lock ? JF(t, r.bm("parent", "hidden")) : kb(t, r.bm("parent", "hidden")); }, gy = Symbol("ElLoading"), FA = (e, t) => { var n, r, a, o; const i = t.instance, s = (f) => tm(t.value) ? t.value[f] : void 0, l = (f) => { const h = Th(f) && (i == null ? void 0 : i[f]) || f; return h && U(h); }, u = (f) => l(s(f) || e.getAttribute(`element-loading-${KAe(f)}`)), 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: (a = s("body")) != null ? a : t.modifiers.body, lock: (o = s("lock")) != null ? o : t.modifiers.lock }; e[gy] = { options: d, instance: LMe(d) }; }, BMe = (e, t) => { for (const n of Object.keys(t)) ar(t[n]) && (t[n].value = e[n]); }, DMe = { mounted(e, t) { t.value && FA(e, t); }, updated(e, t) { const n = e[gy]; t.oldValue !== t.value && (t.value && !t.oldValue ? FA(e, t) : t.value && t.oldValue ? tm(t.value) && BMe(t.value, n.options) : n == null || n.instance.close()); }, unmounted(e) { var t; (t = e[gy]) == null || t.instance.close(), e[gy] = null; } }; function yj(e, t) { return function() { return e.apply(t, arguments); }; } const { toString: RMe } = Object.prototype, { getPrototypeOf: wE } = Object, Fw = /* @__PURE__ */ ((e) => (t) => { const n = RMe.call(t); return e[n] || (e[n] = n.slice(8, -1).toLowerCase()); })(/* @__PURE__ */ Object.create(null)), es = (e) => (e = e.toLowerCase(), (t) => Fw(t) === e), Aw = (e) => (t) => typeof t === e, { isArray: $h } = Array, G0 = Aw("undefined"); function zMe(e) { return e !== null && !G0(e) && e.constructor !== null && !G0(e.constructor) && Io(e.constructor.isBuffer) && e.constructor.isBuffer(e); } const bj = es("ArrayBuffer"); function VMe(e) { let t; return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && bj(e.buffer), t; } const jMe = Aw("string"), Io = Aw("function"), wj = Aw("number"), Iw = (e) => e !== null && typeof e == "object", HMe = (e) => e === !0 || e === !1, my = (e) => { if (Fw(e) !== "object") return !1; const t = wE(e); return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e); }, UMe = es("Date"), qMe = es("File"), WMe = es("Blob"), KMe = es("FileList"), GMe = (e) => Iw(e) && Io(e.pipe), XMe = (e) => { let t; return e && (typeof FormData == "function" && e instanceof FormData || Io(e.append) && ((t = Fw(e)) === "formdata" || // detect form-data instance t === "object" && Io(e.toString) && e.toString() === "[object FormData]")); }, YMe = es("URLSearchParams"), [ZMe, QMe, JMe, eBe] = ["ReadableStream", "Request", "Response", "Headers"].map(es), tBe = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ""); function om(e, t, { allOwnKeys: n = !1 } = {}) { if (e === null || typeof e > "u") return; let r, a; if (typeof e != "object" && (e = [e]), $h(e)) for (r = 0, a = e.length; r < a; r++) t.call(null, e[r], r, e); else { const o = n ? Object.getOwnPropertyNames(e) : Object.keys(e), i = o.length; let s; for (r = 0; r < i; r++) s = o[r], t.call(null, e[s], s, e); } } function xj(e, t) { t = t.toLowerCase(); const n = Object.keys(e); let r = n.length, a; for (; r-- > 0; ) if (a = n[r], t === a.toLowerCase()) return a; return null; } const Kc = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, kj = (e) => !G0(e) && e !== Kc; function M5() { const { caseless: e } = kj(this) && this || {}, t = {}, n = (r, a) => { const o = e && xj(t, a) || a; my(t[o]) && my(r) ? t[o] = M5(t[o], r) : my(r) ? t[o] = M5({}, r) : $h(r) ? t[o] = r.slice() : t[o] = r; }; for (let r = 0, a = arguments.length; r < a; r++) arguments[r] && om(arguments[r], n); return t; } const nBe = (e, t, n, { allOwnKeys: r } = {}) => (om(t, (a, o) => { n && Io(a) ? e[o] = yj(a, n) : e[o] = a; }, { allOwnKeys: r }), e), rBe = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), aBe = (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); }, oBe = (e, t, n, r) => { let a, o, i; const s = {}; if (t = t || {}, e == null) return t; do { for (a = Object.getOwnPropertyNames(e), o = a.length; o-- > 0; ) i = a[o], (!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; }, iBe = (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; }, sBe = (e) => { if (!e) return null; if ($h(e)) return e; let t = e.length; if (!wj(t)) return null; const n = new Array(t); for (; t-- > 0; ) n[t] = e[t]; return n; }, lBe = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && wE(Uint8Array)), uBe = (e, t) => { const n = (e && e[Symbol.iterator]).call(e); let r; for (; (r = n.next()) && !r.done; ) { const a = r.value; t.call(e, a[0], a[1]); } }, cBe = (e, t) => { let n; const r = []; for (; (n = e.exec(t)) !== null; ) r.push(n); return r; }, dBe = es("HTMLFormElement"), pBe = (e) => e.toLowerCase().replace( /[-_\s]([a-z\d])(\w*)/g, function(t, n, r) { return n.toUpperCase() + r; } ), AA = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), fBe = es("RegExp"), Cj = (e, t) => { const n = Object.getOwnPropertyDescriptors(e), r = {}; om(n, (a, o) => { let i; (i = t(a, o, e)) !== !1 && (r[o] = i || a); }), Object.defineProperties(e, r); }, hBe = (e) => { Cj(e, (t, n) => { if (Io(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1) return !1; const r = e[n]; if (Io(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 + "'"); }); } }); }, vBe = (e, t) => { const n = {}, r = (a) => { a.forEach((o) => { n[o] = !0; }); }; return $h(e) ? r(e) : r(String(e).split(t)), n; }, gBe = () => { }, mBe = (e, t) => e != null && Number.isFinite(e = +e) ? e : t, Ak = "abcdefghijklmnopqrstuvwxyz", IA = "0123456789", Sj = { DIGIT: IA, ALPHA: Ak, ALPHA_DIGIT: Ak + Ak.toUpperCase() + IA }, yBe = (e = 16, t = Sj.ALPHA_DIGIT) => { let n = ""; const { length: r } = t; for (; e--; ) n += t[Math.random() * r | 0]; return n; }; function bBe(e) { return !!(e && Io(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator]); } const wBe = (e) => { const t = new Array(10), n = (r, a) => { if (Iw(r)) { if (t.indexOf(r) >= 0) return; if (!("toJSON" in r)) { t[a] = r; const o = $h(r) ? [] : {}; return om(r, (i, s) => { const l = n(i, a + 1); !G0(l) && (o[s] = l); }), t[a] = void 0, o; } } return r; }; return n(e, 0); }, xBe = es("AsyncFunction"), kBe = (e) => e && (Iw(e) || Io(e)) && Io(e.then) && Io(e.catch), Ej = ((e, t) => e ? setImmediate : t ? ((n, r) => (Kc.addEventListener("message", ({ source: a, data: o }) => { a === Kc && o === n && r.length && r.shift()(); }, !1), (a) => { r.push(a), Kc.postMessage(n, "*"); }))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))( typeof setImmediate == "function", Io(Kc.postMessage) ), CBe = typeof queueMicrotask < "u" ? queueMicrotask.bind(Kc) : typeof process < "u" && process.nextTick || Ej, De = { isArray: $h, isArrayBuffer: bj, isBuffer: zMe, isFormData: XMe, isArrayBufferView: VMe, isString: jMe, isNumber: wj, isBoolean: HMe, isObject: Iw, isPlainObject: my, isReadableStream: ZMe, isRequest: QMe, isResponse: JMe, isHeaders: eBe, isUndefined: G0, isDate: UMe, isFile: qMe, isBlob: WMe, isRegExp: fBe, isFunction: Io, isStream: GMe, isURLSearchParams: YMe, isTypedArray: lBe, isFileList: KMe, forEach: om, merge: M5, extend: nBe, trim: tBe, stripBOM: rBe, inherits: aBe, toFlatObject: oBe, kindOf: Fw, kindOfTest: es, endsWith: iBe, toArray: sBe, forEachEntry: uBe, matchAll: cBe, isHTMLForm: dBe, hasOwnProperty: AA, hasOwnProp: AA, // an alias to avoid ESLint no-prototype-builtins detection reduceDescriptors: Cj, freezeMethods: hBe, toObjectSet: vBe, toCamelCase: pBe, noop: gBe, toFiniteNumber: mBe, findKey: xj, global: Kc, isContextDefined: kj, ALPHABET: Sj, generateString: yBe, isSpecCompliantForm: bBe, toJSONObject: wBe, isAsyncFn: xBe, isThenable: kBe, setImmediate: Ej, asap: CBe }; function Yt(e, t, n, r, a) { 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), a && (this.response = a, this.status = a.status ? a.status : null); } De.inherits(Yt, 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: De.toJSONObject(this.config), code: this.code, status: this.status }; } }); const _j = Yt.prototype, Tj = {}; [ "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) => { Tj[e] = { value: e }; }); Object.defineProperties(Yt, Tj); Object.defineProperty(_j, "isAxiosError", { value: !0 }); Yt.from = (e, t, n, r, a, o) => { const i = Object.create(_j); return De.toFlatObject(e, i, function(s) { return s !== Error.prototype; }, (s) => s !== "isAxiosError"), Yt.call(i, e.message, t, n, r, a), i.cause = e, i.name = e.name, o && Object.assign(i, o), i; }; const SBe = null; function B5(e) { return De.isPlainObject(e) || De.isArray(e); } function Oj(e) { return De.endsWith(e, "[]") ? e.slice(0, -2) : e; } function PA(e, t, n) { return e ? e.concat(t).map(function(r, a) { return r = Oj(r), !n && a ? "[" + r + "]" : r; }).join(n ? "." : "") : t; } function EBe(e) { return De.isArray(e) && !e.some(B5); } const _Be = De.toFlatObject(De, {}, null, function(e) { return /^is[A-Z]/.test(e); }); function Pw(e, t, n) { if (!De.isObject(e)) throw new TypeError("target must be an object"); t = t || new FormData(), n = De.toFlatObject(n, { metaTokens: !0, dots: !1, indexes: !1 }, !1, function(h, p) { return !De.isUndefined(p[h]); }); const r = n.metaTokens, a = n.visitor || u, o = n.dots, i = n.indexes, s = (n.Blob || typeof Blob < "u" && Blob) && De.isSpecCompliantForm(t); if (!De.isFunction(a)) throw new TypeError("visitor must be a function"); function l(h) { if (h === null) return ""; if (De.isDate(h)) return h.toISOString(); if (!s && De.isBlob(h)) throw new Yt("Blob is not supported. Use a Buffer instead."); return De.isArrayBuffer(h) || De.isTypedArray(h) ? s && typeof Blob == "function" ? new Blob([h]) : Buffer.from(h) : h; } function u(h, p, v) { let m = h; if (h && !v && typeof h == "object") { if (De.endsWith(p, "{}")) p = r ? p : p.slice(0, -2), h = JSON.stringify(h); else if (De.isArray(h) && EBe(h) || (De.isFileList(h) || De.endsWith(p, "[]")) && (m = De.toArray(h))) return p = Oj(p), m.forEach(function(g, y) { !(De.isUndefined(g) || g === null) && t.append( // eslint-disable-next-line no-nested-ternary i === !0 ? PA([p], y, o) : i === null ? p : p + "[]", l(g) ); }), !1; } return B5(h) ? !0 : (t.append(PA(v, p, o), l(h)), !1); } const c = [], d = Object.assign(_Be, { defaultVisitor: u, convertValue: l, isVisitable: B5 }); function f(h, p) { if (!De.isUndefined(h)) { if (c.indexOf(h) !== -1) throw Error("Circular reference detected in " + p.join(".")); c.push(h), De.forEach(h, function(v, m) { (!(De.isUndefined(v) || v === null) && a.call( t, v, De.isString(m) ? m.trim() : m, p, d )) === !0 && f(v, p ? p.concat(m) : [m]); }), c.pop(); } } if (!De.isObject(e)) throw new TypeError("data must be an object"); return f(e), t; } function LA(e) { const t = { "!": "%21", "'": "%27", "(": "%28", ")": "%29", "~": "%7E", "%20": "+", "%00": "\0" }; return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(n) { return t[n]; }); } function xE(e, t) { this._pairs = [], e && Pw(e, this, t); } const $j = xE.prototype; $j.append = function(e, t) { this._pairs.push([e, t]); }; $j.toString = function(e) { const t = e ? function(n) { return e.call(this, n, LA); } : LA; return this._pairs.map(function(n) { return t(n[0]) + "=" + t(n[1]); }, "").join("&"); }; function TBe(e) { return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]"); } function Fj(e, t, n) { if (!t) return e; const r = n && n.encode || TBe, a = n && n.serialize; let o; if (a ? o = a(t, n) : o = De.isURLSearchParams(t) ? t.toString() : new xE(t, n).toString(r), o) { const i = e.indexOf("#"); i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + o; } return e; } let NA = class { 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(e, t, n) { return this.handlers.push({ fulfilled: e, rejected: t, synchronous: n ? n.synchronous : !1, runWhen: n ? n.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(e) { this.handlers[e] && (this.handlers[e] = 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(e) { De.forEach(this.handlers, function(t) { t !== null && e(t); }); } }; const Aj = { silentJSONParsing: !0, forcedJSONParsing: !0, clarifyTimeoutError: !1 }, OBe = typeof URLSearchParams < "u" ? URLSearchParams : xE, $Be = typeof FormData < "u" ? FormData : null, FBe = typeof Blob < "u" ? Blob : null, ABe = { isBrowser: !0, classes: { URLSearchParams: OBe, FormData: $Be, Blob: FBe }, protocols: ["http", "https", "file", "blob", "url", "data"] }, kE = typeof window < "u" && typeof document < "u", D5 = typeof navigator == "object" && navigator || void 0, IBe = kE && (!D5 || ["ReactNative", "NativeScript", "NS"].indexOf(D5.product) < 0), PBe = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef self instanceof WorkerGlobalScope && typeof self.importScripts == "function", LBe = kE && window.location.href || "http://localhost", NBe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, hasBrowserEnv: kE, hasStandardBrowserEnv: IBe, hasStandardBrowserWebWorkerEnv: PBe, navigator: D5, origin: LBe }, Symbol.toStringTag, { value: "Module" })), vo = { ...NBe, ...ABe }; function MBe(e, t) { return Pw(e, new vo.classes.URLSearchParams(), Object.assign({ visitor: function(n, r, a, o) { return vo.isNode && De.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments); } }, t)); } function BBe(e) { return De.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]); } function DBe(e) { const t = {}, n = Object.keys(e); let r; const a = n.length; let o; for (r = 0; r < a; r++) o = n[r], t[o] = e[o]; return t; } function Ij(e) { function t(n, r, a, o) { let i = n[o++]; if (i === "__proto__") return !0; const s = Number.isFinite(+i), l = o >= n.length; return i = !i && De.isArray(a) ? a.length : i, l ? (De.hasOwnProp(a, i) ? a[i] = [a[i], r] : a[i] = r, !s) : ((!a[i] || !De.isObject(a[i])) && (a[i] = []), t(n, r, a[i], o) && De.isArray(a[i]) && (a[i] = DBe(a[i])), !s); } if (De.isFormData(e) && De.isFunction(e.entries)) { const n = {}; return De.forEachEntry(e, (r, a) => { t(BBe(r), a, n, 0); }), n; } return null; } function RBe(e, t, n) { if (De.isString(e)) try { return (t || JSON.parse)(e), De.trim(e); } catch (r) { if (r.name !== "SyntaxError") throw r; } return (0, JSON.stringify)(e); } const im = { transitional: Aj, adapter: ["xhr", "http", "fetch"], transformRequest: [function(e, t) { const n = t.getContentType() || "", r = n.indexOf("application/json") > -1, a = De.isObject(e); if (a && De.isHTMLForm(e) && (e = new FormData(e)), De.isFormData(e)) return r ? JSON.stringify(Ij(e)) : e; if (De.isArrayBuffer(e) || De.isBuffer(e) || De.isStream(e) || De.isFile(e) || De.isBlob(e) || De.isReadableStream(e)) return e; if (De.isArrayBufferView(e)) return e.buffer; if (De.isURLSearchParams(e)) return t.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), e.toString(); let o; if (a) { if (n.indexOf("application/x-www-form-urlencoded") > -1) return MBe(e, this.formSerializer).toString(); if ((o = De.isFileList(e)) || n.indexOf("multipart/form-data") > -1) { const i = this.env && this.env.FormData; return Pw( o ? { "files[]": e } : e, i && new i(), this.formSerializer ); } } return a || r ? (t.setContentType("application/json", !1), RBe(e)) : e; }], transformResponse: [function(e) { const t = this.transitional || im.transitional, n = t && t.forcedJSONParsing, r = this.responseType === "json"; if (De.isResponse(e) || De.isReadableStream(e)) return e; if (e && De.isString(e) && (n && !this.responseType || r)) { const a = !(t && t.silentJSONParsing) && r; try { return JSON.parse(e); } catch (o) { if (a) throw o.name === "SyntaxError" ? Yt.from(o, Yt.ERR_BAD_RESPONSE, this, null, this.response) : o; } } 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: vo.classes.FormData, Blob: vo.classes.Blob }, validateStatus: function(e) { return e >= 200 && e < 300; }, headers: { common: { Accept: "application/json, text/plain, */*", "Content-Type": void 0 } } }; De.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => { im.headers[e] = {}; }); const zBe = De.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" ]), VBe = (e) => { const t = {}; let n, r, a; return e && e.split(` `).forEach(function(o) { a = o.indexOf(":"), n = o.substring(0, a).trim().toLowerCase(), r = o.substring(a + 1).trim(), !(!n || t[n] && zBe[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r); }), t; }, MA = Symbol("internals"); function pv(e) { return e && String(e).trim().toLowerCase(); } function yy(e) { return e === !1 || e == null ? e : De.isArray(e) ? e.map(yy) : String(e); } function jBe(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 HBe = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()); function Ik(e, t, n, r, a) { if (De.isFunction(r)) return r.call(this, t, n); if (a && (t = n), !!De.isString(t)) { if (De.isString(r)) return t.indexOf(r) !== -1; if (De.isRegExp(r)) return r.test(t); } } function UBe(e) { return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r); } function qBe(e, t) { const n = De.toCamelCase(" " + t); ["get", "set", "has"].forEach((r) => { Object.defineProperty(e, r + n, { value: function(a, o, i) { return this[r].call(this, t, a, o, i); }, configurable: !0 }); }); } class go { constructor(t) { t && this.set(t); } set(t, n, r) { const a = this; function o(s, l, u) { const c = pv(l); if (!c) throw new Error("header name must be a non-empty string"); const d = De.findKey(a, c); (!d || a[d] === void 0 || u === !0 || u === void 0 && a[d] !== !1) && (a[d || l] = yy(s)); } const i = (s, l) => De.forEach(s, (u, c) => o(u, c, l)); if (De.isPlainObject(t) || t instanceof this.constructor) i(t, n); else if (De.isString(t) && (t = t.trim()) && !HBe(t)) i(VBe(t), n); else if (De.isHeaders(t)) for (const [s, l] of t.entries()) o(l, s, r); else t != null && o(n, t, r); return this; } get(t, n) { if (t = pv(t), t) { const r = De.findKey(this, t); if (r) { const a = this[r]; if (!n) return a; if (n === !0) return jBe(a); if (De.isFunction(n)) return n.call(this, a, r); if (De.isRegExp(n)) return n.exec(a); throw new TypeError("parser must be boolean|regexp|function"); } } } has(t, n) { if (t = pv(t), t) { const r = De.findKey(this, t); return !!(r && this[r] !== void 0 && (!n || Ik(this, this[r], r, n))); } return !1; } delete(t, n) { const r = this; let a = !1; function o(i) { if (i = pv(i), i) { const s = De.findKey(r, i); s && (!n || Ik(r, r[s], s, n)) && (delete r[s], a = !0); } } return De.isArray(t) ? t.forEach(o) : o(t), a; } clear(t) { const n = Object.keys(this); let r = n.length, a = !1; for (; r--; ) { const o = n[r]; (!t || Ik(this, this[o], o, t, !0)) && (delete this[o], a = !0); } return a; } normalize(t) { const n = this, r = {}; return De.forEach(this, (a, o) => { const i = De.findKey(r, o); if (i) { n[i] = yy(a), delete n[o]; return; } const s = t ? UBe(o) : String(o).trim(); s !== o && delete n[o], n[s] = yy(a), r[s] = !0; }), this; } concat(...t) { return this.constructor.concat(this, ...t); } toJSON(t) { const n = /* @__PURE__ */ Object.create(null); return De.forEach(this, (r, a) => { r != null && r !== !1 && (n[a] = t && De.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(` `); } 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((a) => r.set(a)), r; } static accessor(t) { const n = (this[MA] = this[MA] = { accessors: {} }).accessors, r = this.prototype; function a(o) { const i = pv(o); n[i] || (qBe(r, o), n[i] = !0); } return De.isArray(t) ? t.forEach(a) : a(t), this; } } go.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]); De.reduceDescriptors(go.prototype, ({ value: e }, t) => { let n = t[0].toUpperCase() + t.slice(1); return { get: () => e, set(r) { this[n] = r; } }; }); De.freezeMethods(go); function Pk(e, t) { const n = this || im, r = t || n, a = go.from(r.headers); let o = r.data; return De.forEach(e, function(i) { o = i.call(n, o, a.normalize(), t ? t.status : void 0); }), a.normalize(), o; } function Pj(e) { return !!(e && e.__CANCEL__); } function Fh(e, t, n) { Yt.call(this, e ?? "canceled", Yt.ERR_CANCELED, t, n), this.name = "CanceledError"; } De.inherits(Fh, Yt, { __CANCEL__: !0 }); function Lj(e, t, n) { const r = n.config.validateStatus; !n.status || !r || r(n.status) ? e(n) : t(new Yt( "Request failed with status code " + n.status, [Yt.ERR_BAD_REQUEST, Yt.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4], n.config, n.request, n )); } function WBe(e) { const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e); return t && t[1] || ""; } function KBe(e, t) { e = e || 10; const n = new Array(e), r = new Array(e); let a = 0, o = 0, i; return t = t !== void 0 ? t : 1e3, function(s) { const l = Date.now(), u = r[o]; i || (i = l), n[a] = s, r[a] = l; let c = o, d = 0; for (; c !== a; ) d += n[c++], c = c % e; if (a = (a + 1) % e, a === o && (o = (o + 1) % e), l - i < t) return; const f = u && l - u; return f ? Math.round(d * 1e3 / f) : void 0; }; } function GBe(e, t) { let n = 0, r = 1e3 / t, a, o; const i = (s, l = Date.now()) => { n = l, a = null, o && (clearTimeout(o), o = null), e.apply(null, s); }; return [(...s) => { const l = Date.now(), u = l - n; u >= r ? i(s, l) : (a = s, o || (o = setTimeout(() => { o = null, i(a); }, r - u))); }, () => a && i(a)]; } const Tb = (e, t, n = 3) => { let r = 0; const a = KBe(50, 250); return GBe((o) => { const i = o.loaded, s = o.lengthComputable ? o.total : void 0, l = i - r, u = a(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: o, lengthComputable: s != null, [t ? "download" : "upload"]: !0 }; e(d); }, n); }, BA = (e, t) => { const n = e != null; return [(r) => t[0]({ lengthComputable: n, total: e, loaded: r }), t[1]]; }, DA = (e) => (...t) => De.asap(() => e(...t)), XBe = vo.hasStandardBrowserEnv ? ( // Standard browser envs have full support of the APIs needed to test // whether the request URL is of the same origin as current location. function() { const e = vo.navigator && /(msie|trident)/i.test(vo.navigator.userAgent), t = document.createElement("a"); let n; function r(a) { let o = a; return e && (t.setAttribute("href", o), o = t.href), t.setAttribute("href", o), { href: t.href, protocol: t.protocol ? t.protocol.replace(/:$/, "") : "", host: t.host, search: t.search ? t.search.replace(/^\?/, "") : "", hash: t.hash ? t.hash.replace(/^#/, "") : "", hostname: t.hostname, port: t.port, pathname: t.pathname.charAt(0) === "/" ? t.pathname : "/" + t.pathname }; } return n = r(window.location.href), function(a) { const o = De.isString(a) ? r(a) : a; return o.protocol === n.protocol && o.host === n.host; }; }() ) : ( // Non standard browser envs (web workers, react-native) lack needed support. /* @__PURE__ */ function() { return function() { return !0; }; }() ), YBe = vo.hasStandardBrowserEnv ? ( // Standard browser envs support document.cookie { write(e, t, n, r, a, o) { const i = [e + "=" + encodeURIComponent(t)]; De.isNumber(n) && i.push("expires=" + new Date(n).toGMTString()), De.isString(r) && i.push("path=" + r), De.isString(a) && i.push("domain=" + a), o === !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 ZBe(e) { return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e); } function QBe(e, t) { return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e; } function Nj(e, t) { return e && !ZBe(t) ? QBe(e, t) : t; } const RA = (e) => e instanceof go ? { ...e } : e; function $d(e, t) { t = t || {}; const n = {}; function r(u, c, d) { return De.isPlainObject(u) && De.isPlainObject(c) ? De.merge.call({ caseless: d }, u, c) : De.isPlainObject(c) ? De.merge({}, c) : De.isArray(c) ? c.slice() : c; } function a(u, c, d) { if (De.isUndefined(c)) { if (!De.isUndefined(u)) return r(void 0, u, d); } else return r(u, c, d); } function o(u, c) { if (!De.isUndefined(c)) return r(void 0, c); } function i(u, c) { if (De.isUndefined(c)) { if (!De.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: o, method: o, data: o, 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) => a(RA(u), RA(c), !0) }; return De.forEach(Object.keys(Object.assign({}, e, t)), function(u) { const c = l[u] || a, d = c(e[u], t[u], u); De.isUndefined(d) && c !== s || (n[u] = d); }), n; } const Mj = (e) => { const t = $d({}, e); let { data: n, withXSRFToken: r, xsrfHeaderName: a, xsrfCookieName: o, headers: i, auth: s } = t; t.headers = i = go.from(i), t.url = Fj(Nj(t.baseURL, t.url), e.params, e.paramsSerializer), s && i.set( "Authorization", "Basic " + btoa((s.username || "") + ":" + (s.password ? unescape(encodeURIComponent(s.password)) : "")) ); let l; if (De.isFormData(n)) { if (vo.hasStandardBrowserEnv || vo.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 (vo.hasStandardBrowserEnv && (r && De.isFunction(r) && (r = r(t)), r || r !== !1 && XBe(t.url))) { const u = a && o && YBe.read(o); u && i.set(a, u); } return t; }, JBe = typeof XMLHttpRequest < "u", eDe = JBe && function(e) { return new Promise(function(t, n) { const r = Mj(e); let a = r.data; const o = go.from(r.headers).normalize(); let { responseType: i, onUploadProgress: s, onDownloadProgress: l } = r, u, c, d, f, h; function p() { f && f(), 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 y = go.from( "getAllResponseHeaders" in v && v.getAllResponseHeaders() ), x = { data: !i || i === "text" || i === "json" ? v.responseText : v.response, status: v.status, statusText: v.statusText, headers: y, config: e, request: v }; Lj(function(w) { t(w), p(); }, function(w) { n(w), p(); }, 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 Yt("Request aborted", Yt.ECONNABORTED, e, v)), v = null); }, v.onerror = function() { n(new Yt("Network Error", Yt.ERR_NETWORK, e, v)), v = null; }, v.ontimeout = function() { let y = r.timeout ? "timeout of " + r.timeout + "ms exceeded" : "timeout exceeded"; const x = r.transitional || Aj; r.timeoutErrorMessage && (y = r.timeoutErrorMessage), n(new Yt( y, x.clarifyTimeoutError ? Yt.ETIMEDOUT : Yt.ECONNABORTED, e, v )), v = null; }, a === void 0 && o.setContentType(null), "setRequestHeader" in v && De.forEach(o.toJSON(), function(y, x) { v.setRequestHeader(x, y); }), De.isUndefined(r.withCredentials) || (v.withCredentials = !!r.withCredentials), i && i !== "json" && (v.responseType = r.responseType), l && ([d, h] = Tb(l, !0), v.addEventListener("progress", d)), s && v.upload && ([c, f] = Tb(s), v.upload.addEventListener("progress", c), v.upload.addEventListener("loadend", f)), (r.cancelToken || r.signal) && (u = (y) => { v && (n(!y || y.type ? new Fh(null, e, v) : y), v.abort(), v = null); }, r.cancelToken && r.cancelToken.subscribe(u), r.signal && (r.signal.aborted ? u() : r.signal.addEventListener("abort", u))); const g = WBe(r.url); if (g && vo.protocols.indexOf(g) === -1) { n(new Yt("Unsupported protocol " + g + ":", Yt.ERR_BAD_REQUEST, e)); return; } v.send(a || null); }); }, tDe = (e, t) => { const { length: n } = e = e ? e.filter(Boolean) : []; if (t || n) { let r = new AbortController(), a; const o = function(u) { if (!a) { a = !0, s(); const c = u instanceof Error ? u : this.reason; r.abort(c instanceof Yt ? c : new Fh(c instanceof Error ? c.message : c)); } }; let i = t && setTimeout(() => { i = null, o(new Yt(`timeout ${t} of ms exceeded`, Yt.ETIMEDOUT)); }, t); const s = () => { e && (i && clearTimeout(i), i = null, e.forEach((u) => { u.unsubscribe ? u.unsubscribe(o) : u.removeEventListener("abort", o); }), e = null); }; e.forEach((u) => u.addEventListener("abort", o)); const { signal: l } = r; return l.unsubscribe = () => De.asap(s), l; } }, nDe = function* (e, t) { let n = e.byteLength; if (n < t) { yield e; return; } let r = 0, a; for (; r < n; ) a = r + t, yield e.slice(r, a), r = a; }, rDe = async function* (e, t) { for await (const n of aDe(e)) yield* nDe(n, t); }, aDe = 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(); } }, zA = (e, t, n, r) => { const a = rDe(e, t); let o = 0, i, s = (l) => { i || (i = !0, r && r(l)); }; return new ReadableStream({ async pull(l) { try { const { done: u, value: c } = await a.next(); if (u) { s(), l.close(); return; } let d = c.byteLength; if (n) { let f = o += d; n(f); } l.enqueue(new Uint8Array(c)); } catch (u) { throw s(u), u; } }, cancel(l) { return s(l), a.return(); } }, { highWaterMark: 2 }); }, Lw = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", Bj = Lw && typeof ReadableStream == "function", oDe = Lw && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), Dj = (e, ...t) => { try { return !!e(...t); } catch { return !1; } }, iDe = Bj && Dj(() => { let e = !1; const t = new Request(vo.origin, { body: new ReadableStream(), method: "POST", get duplex() { return e = !0, "half"; } }).headers.has("Content-Type"); return e && !t; }), VA = 64 * 1024, R5 = Bj && Dj(() => De.isReadableStream(new Response("").body)), Ob = { stream: R5 && ((e) => e.body) }; Lw && ((e) => { ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => { !Ob[t] && (Ob[t] = De.isFunction(e[t]) ? (n) => n[t]() : (n, r) => { throw new Yt(`Response type '${t}' is not supported`, Yt.ERR_NOT_SUPPORT, r); }); }); })(new Response()); const sDe = async (e) => { if (e == null) return 0; if (De.isBlob(e)) return e.size; if (De.isSpecCompliantForm(e)) return (await new Request(vo.origin, { method: "POST", body: e }).arrayBuffer()).byteLength; if (De.isArrayBufferView(e) || De.isArrayBuffer(e)) return e.byteLength; if (De.isURLSearchParams(e) && (e = e + ""), De.isString(e)) return (await oDe(e)).byteLength; }, lDe = async (e, t) => De.toFiniteNumber(e.getContentLength()) ?? sDe(t), uDe = Lw && (async (e) => { let { url: t, method: n, data: r, signal: a, cancelToken: o, timeout: i, onDownloadProgress: s, onUploadProgress: l, responseType: u, headers: c, withCredentials: d = "same-origin", fetchOptions: f } = Mj(e); u = u ? (u + "").toLowerCase() : "text"; let h = tDe([a, o && o.toAbortSignal()], i), p; const v = h && h.unsubscribe && (() => { h.unsubscribe(); }); let m; try { if (l && iDe && n !== "get" && n !== "head" && (m = await lDe(c, r)) !== 0) { let k = new Request(t, { method: "POST", body: r, duplex: "half" }), C; if (De.isFormData(r) && (C = k.headers.get("content-type")) && c.setContentType(C), k.body) { const [S, _] = BA( m, Tb(DA(l)) ); r = zA(k.body, VA, S, _); } } De.isString(d) || (d = d ? "include" : "omit"); const g = "credentials" in Request.prototype; p = new Request(t, { ...f, signal: h, method: n.toUpperCase(), headers: c.normalize().toJSON(), body: r, duplex: "half", credentials: g ? d : void 0 }); let y = await fetch(p); const x = R5 && (u === "stream" || u === "response"); if (R5 && (s || x && v)) { const k = {}; ["status", "statusText", "headers"].forEach((T) => { k[T] = y[T]; }); const C = De.toFiniteNumber(y.headers.get("content-length")), [S, _] = s && BA( C, Tb(DA(s), !0) ) || []; y = new Response( zA(y.body, VA, S, () => { _ && _(), v && v(); }), k ); } u = u || "text"; let w = await Ob[De.findKey(Ob, u) || "text"](y, e); return !x && v && v(), await new Promise((k, C) => { Lj(k, C, { data: w, headers: go.from(y.headers), status: y.status, statusText: y.statusText, config: e, request: p }); }); } catch (g) { throw v && v(), g && g.name === "TypeError" && /fetch/i.test(g.message) ? Object.assign( new Yt("Network Error", Yt.ERR_NETWORK, e, p), { cause: g.cause || g } ) : Yt.from(g, g && g.code, e, p); } }), z5 = { http: SBe, xhr: eDe, fetch: uDe }; De.forEach(z5, (e, t) => { if (e) { try { Object.defineProperty(e, "name", { value: t }); } catch { } Object.defineProperty(e, "adapterName", { value: t }); } }); const jA = (e) => `- ${e}`, cDe = (e) => De.isFunction(e) || e === null || e === !1, Rj = { getAdapter: (e) => { e = De.isArray(e) ? e : [e]; const { length: t } = e; let n, r; const a = {}; for (let o = 0; o < t; o++) { n = e[o]; let i; if (r = n, !cDe(n) && (r = z5[(i = String(n)).toLowerCase()], r === void 0)) throw new Yt(`Unknown adapter '${i}'`); if (r) break; a[i || "#" + o] = r; } if (!r) { const o = Object.entries(a).map( ([s, l]) => `adapter ${s} ` + (l === !1 ? "is not supported by the environment" : "is not available in the build") ); let i = t ? o.length > 1 ? `since : ` + o.map(jA).join(` `) : " " + jA(o[0]) : "as no adapter specified"; throw new Yt( "There is no suitable adapter to dispatch the request " + i, "ERR_NOT_SUPPORT" ); } return r; }, adapters: z5 }; function Lk(e) { if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted) throw new Fh(null, e); } function HA(e) { return Lk(e), e.headers = go.from(e.headers), e.data = Pk.call( e, e.transformRequest ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Rj.getAdapter(e.adapter || im.adapter)(e).then(function(t) { return Lk(e), t.data = Pk.call( e, e.transformResponse, t ), t.headers = go.from(t.headers), t; }, function(t) { return Pj(t) || (Lk(e), t && t.response && (t.response.data = Pk.call( e, e.transformResponse, t.response ), t.response.headers = go.from(t.response.headers))), Promise.reject(t); }); } const zj = "1.7.7", CE = {}; ["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => { CE[e] = function(n) { return typeof n === e || "a" + (t < 1 ? "n " : " ") + e; }; }); const UA = {}; CE.transitional = function(e, t, n) { function r(a, o) { return "[Axios v" + zj + "] Transitional option '" + a + "'" + o + (n ? ". " + n : ""); } return (a, o, i) => { if (e === !1) throw new Yt( r(o, " has been removed" + (t ? " in " + t : "")), Yt.ERR_DEPRECATED ); return t && !UA[o] && (UA[o] = !0, console.warn( r( o, " has been deprecated since v" + t + " and will be removed in the near future" ) )), e ? e(a, o, i) : !0; }; }; function dDe(e, t, n) { if (typeof e != "object") throw new Yt("options must be an object", Yt.ERR_BAD_OPTION_VALUE); const r = Object.keys(e); let a = r.length; for (; a-- > 0; ) { const o = r[a], i = t[o]; if (i) { const s = e[o], l = s === void 0 || i(s, o, e); if (l !== !0) throw new Yt("option " + o + " must be " + l, Yt.ERR_BAD_OPTION_VALUE); continue; } if (n !== !0) throw new Yt("Unknown option " + o, Yt.ERR_BAD_OPTION); } } const V5 = { assertOptions: dDe, validators: CE }, Zl = V5.validators; class id { constructor(t) { this.defaults = t, this.interceptors = { request: new NA(), response: new NA() }; } /** * 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 a; Error.captureStackTrace ? Error.captureStackTrace(a = {}) : a = new Error(); const o = a.stack ? a.stack.replace(/^.+\n/, "") : ""; try { r.stack ? o && !String(r.stack).endsWith(o.replace(/^.+\n.+\n/, "")) && (r.stack += ` ` + o) : r.stack = o; } catch { } } throw r; } } _request(t, n) { typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = $d(this.defaults, n); const { transitional: r, paramsSerializer: a, headers: o } = n; r !== void 0 && V5.assertOptions(r, { silentJSONParsing: Zl.transitional(Zl.boolean), forcedJSONParsing: Zl.transitional(Zl.boolean), clarifyTimeoutError: Zl.transitional(Zl.boolean) }, !1), a != null && (De.isFunction(a) ? n.paramsSerializer = { serialize: a } : V5.assertOptions(a, { encode: Zl.function, serialize: Zl.function }, !0)), n.method = (n.method || this.defaults.method || "get").toLowerCase(); let i = o && De.merge( o.common, o[n.method] ); o && De.forEach( ["delete", "get", "head", "post", "put", "patch", "common"], (p) => { delete o[p]; } ), n.headers = go.concat(i, o); const s = []; let l = !0; this.interceptors.request.forEach(function(p) { typeof p.runWhen == "function" && p.runWhen(n) === !1 || (l = l && p.synchronous, s.unshift(p.fulfilled, p.rejected)); }); const u = []; this.interceptors.response.forEach(function(p) { u.push(p.fulfilled, p.rejected); }); let c, d = 0, f; if (!l) { const p = [HA.bind(this), void 0]; for (p.unshift.apply(p, s), p.push.apply(p, u), f = p.length, c = Promise.resolve(n); d < f; ) c = c.then(p[d++], p[d++]); return c; } f = s.length; let h = n; for (d = 0; d < f; ) { const p = s[d++], v = s[d++]; try { h = p(h); } catch (m) { v.call(this, m); break; } } try { c = HA.call(this, h); } catch (p) { return Promise.reject(p); } for (d = 0, f = u.length; d < f; ) c = c.then(u[d++], u[d++]); return c; } getUri(t) { t = $d(this.defaults, t); const n = Nj(t.baseURL, t.url); return Fj(n, t.params, t.paramsSerializer); } } De.forEach(["delete", "get", "head", "options"], function(e) { id.prototype[e] = function(t, n) { return this.request($d(n || {}, { method: e, url: t, data: (n || {}).data })); }; }); De.forEach(["post", "put", "patch"], function(e) { function t(n) { return function(r, a, o) { return this.request($d(o || {}, { method: e, headers: n ? { "Content-Type": "multipart/form-data" } : {}, url: r, data: a })); }; } id.prototype[e] = t(), id.prototype[e + "Form"] = t(!0); }); class SE { constructor(t) { if (typeof t != "function") throw new TypeError("executor must be a function."); let n; this.promise = new Promise(function(a) { n = a; }); const r = this; this.promise.then((a) => { if (!r._listeners) return; let o = r._listeners.length; for (; o-- > 0; ) r._listeners[o](a); r._listeners = null; }), this.promise.then = (a) => { let o; const i = new Promise((s) => { r.subscribe(s), o = s; }).then(a); return i.cancel = function() { r.unsubscribe(o); }, i; }, t(function(a, o, i) { r.reason || (r.reason = new Fh(a, o, 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 SE(function(n) { t = n; }), cancel: t }; } } function pDe(e) { return function(t) { return e.apply(null, t); }; } function fDe(e) { return De.isObject(e) && e.isAxiosError === !0; } const j5 = { 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(j5).forEach(([e, t]) => { j5[t] = e; }); function Vj(e) { const t = new id(e), n = yj(id.prototype.request, t); return De.extend(n, id.prototype, t, { allOwnKeys: !0 }), De.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(r) { return Vj($d(e, r)); }, n; } const kr = Vj(im); kr.Axios = id; kr.CanceledError = Fh; kr.CancelToken = SE; kr.isCancel = Pj; kr.VERSION = zj; kr.toFormData = Pw; kr.AxiosError = Yt; kr.Cancel = kr.CanceledError; kr.all = function(e) { return Promise.all(e); }; kr.spread = pDe; kr.isAxiosError = fDe; kr.mergeConfig = $d; kr.AxiosHeaders = go; kr.formToJSON = (e) => Ij(De.isHTMLForm(e) ? new FormData(e) : e); kr.getAdapter = Rj.getAdapter; kr.HttpStatusCode = j5; kr.default = kr; const hDe = "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 vDe() { const e = hDe; async function t(n, r, a) { return await kr({ method: "get", url: n, params: r, timeout: a }); } return { defaultImg: e, getRequest: t }; } const gDe = ["src"], mDe = ["src"], yDe = { key: 1, class: "details" }, bDe = { key: 0 }, wDe = { class: "title text-placeholder" }, xDe = { __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 y; try { y = new URL(g); } catch { return !1; } return y.protocol === "http:" || y.protocol === "https:"; } const { defaultImg: r, getRequest: a } = vDe(), o = U(); U(null), U(4); const i = U(void 0), s = U(!1), l = U(!1), u = U(!1), c = e, d = t, f = F(() => c.data.title && ((i ? i.value : !1) || s.value) && (c.data.link || c.data.userData)); F(() => showCardDetails ? height * 0.525 : height), F(() => width - 2 * h), F(() => height * 0.237); const h = F(() => height * 0.076); F(() => showCardDetails ? height * 0.525 : height), be( () => 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, Ue(() => { m(); }); }, { immediate: !0 } ), jd(() => { Ue(() => { m(); }); }); function p() { 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, y) { a(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") && y.fetchAttempts < 3 ? (y.fetchAttempts += 1, v(g, y)) : s.value = !0; } ); } function m() { if (c.data.hideTitle) l.value = !0, u.value = !0; else { const g = o; 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, y) => { const x = IMe, w = uMe, k = hMe, C = DMe; return I(), de(k, { shadow: e.shadow, "body-style": e.bodyStyle, style: Ye({ padding: "0px", maxWidth: e.width + "rem" }), class: "card" }, { default: K(() => [ Xe((I(), j("div", null, [ W("div", { class: "cursor-pointer", style: Ye(e.imageContainerStyle), onClick: Je(p, ["prevent"]) }, [ s.value ? (I(), j("img", { key: 0, src: b(r), style: Ye(e.imageStyle) }, null, 12, gDe)) : (I(), j("img", { key: 1, src: i.value, alt: "thumbnail loading ...", style: Ye(e.imageStyle) }, null, 12, mDe)) ], 4), ne("", !0), e.showCardDetails ? (I(), j("div", yDe, [ e.data.hideType ? ne("", !0) : (I(), j("p", bDe, [ W("b", null, Fe(e.data.type), 1) ])), ue(x, { "virtual-ref": o.value, disabled: l.value, content: e.data.title, placement: "top", trigger: "hover", "popper-class": "gallery-popper", "virtual-triggering": "" }, null, 8, ["virtual-ref", "disabled", "content"]), Xe(W("p", { ref_key: "titleText", ref: o, class: "title" }, Fe(e.data.title), 513), [ [mt, !e.data.hideTitle] ]), Xe(W("p", wDe, null, 512), [ [mt, e.data.hideTitle] ]), ue(w, { class: "button", onClick: Je(p, ["prevent"]), size: "large" }, { default: K(() => [ et(" View " + Fe(e.data.type), 1) ]), _: 1 }) ])) : ne("", !0) ])), [ [C, !f.value] ]) ]), _: 1 }, 8, ["shadow", "body-style", "style"]); }; } }, kDe = /* @__PURE__ */ G3(xDe, [["__scopeId", "data-v-8306387d"]]), Nw = (e) => (No("data-v-e745b327"), e = e(), Mo(), e), CDe = { ref: "myButton", class: "gallery" }, SDe = { class: "gallery-strip" }, EDe = /* @__PURE__ */ Nw(() => /* @__PURE__ */ W("span", { class: "progress-button" }, "‹", -1)), _De = [ EDe ], TDe = { key: 1, style: { width: "2rem" } }, ODe = /* @__PURE__ */ Nw(() => /* @__PURE__ */ W("div", { class: "filler" }, null, -1)), $De = { class: "card-line" }, FDe = /* @__PURE__ */ Nw(() => /* @__PURE__ */ W("div", { class: "filler" }, null, -1)), ADe = /* @__PURE__ */ Nw(() => /* @__PURE__ */ W("span", { class: "progress-button" }, "›", -1)), IDe = [ ADe ], PDe = { key: 3, style: { width: "2rem" } }, LDe = { __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 a = e, o = n, i = U(0), s = U(0), l = U(2), u = U(2), c = F(() => a.items.length), d = F(() => s.value > 0), f = F(() => s.value < c.value - 1), h = F(() => 0.78 * a.cardWidth); F(() => c.value * (a.cardWidth + 0.25) - 0.25); const p = F(() => { const _ = r(0.5), T = r(2), O = r(a.cardWidth), $ = (a.maxWidth - 2 * T - 2 * _) / (1.1 * O); return Math.max(1, Math.floor($)); }), v = F(() => { const _ = r(1), T = a.maxWidth / (_ * c.value); return a.showIndicatorBar && T > 0.1 && c.value > 1; }), m = F(() => { const _ = Math.floor(p.value / 2); let T = s.value - _; return T < 0 ? T = 0 : T + p.value > c.value && (T = c.value - p.value), T; }), g = F(() => { let _ = []; for (let T = 0; T < p.value; T++) _.push(a.items[T + m.value]); return _; }); function y(_) { o("card-clicked", _); } function x(_) { o("datalink-clicked", _); } function w(_) { return s.value - m.value === _ && a.highlightActive; } function k() { s.value += 1; } function C() { s.value -= 1; } function S(_) { s.value !== _ && (s.value = _); } return t({ count: i, currentIndex: s, controlHeight: l, controlWidth: u, cardClicked: y, isActive: w, goNext: k, goPrev: C, indicatorClicked: S }), (_, T) => (I(), j("div", CDe, [ W("div", SDe, [ e.items.length > 1 ? (I(), j("a", { key: 0, href: "#", class: H(["oval", "prev", { disabled: !d.value }]), onClick: Je(C, ["prevent"]) }, _De, 2)) : (I(), j("div", TDe)), ODe, W("div", $De, [ (I(!0), j(Qe, null, Nt(g.value, (O, $) => (I(), j("span", { key: "card_" + $, class: H(["key-image-span", { active: w($) }]) }, [ O ? (I(), de(kDe, { key: 0, data: O, "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: y, onDatalinkClicked: x }, null, 8, ["data", "body-style", "image-container-style", "image-style", "width", "height", "shadow", "show-card-details"])) : ne("", !0) ], 2))), 128)) ]), FDe, e.items.length > 1 ? (I(), j("a", { key: 2, href: "#", class: H(["oval", "next", { disabled: !f.value }]), onClick: Je(k, ["prevent"]) }, IDe, 2)) : (I(), j("div", PDe)) ]), W("div", { style: Ye(e.bottomSpacer) }, null, 4), v.value ? (I(), de(IAe, { key: 0, count: c.value, current: s.value, onClicked: S }, null, 8, ["count", "current"])) : ne("", !0) ], 512)); } }, NDe = /* @__PURE__ */ G3(LDe, [["__scopeId", "data-v-e745b327"]]), MDe = { 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; } } }, w1 = (e) => e.split("\\").pop().split("/").pop(), fv = function(e) { return e.replace(/\b\w/g, (t) => t.toUpperCase()); }, BDe = { name: "ImageGallery", components: { Gallery: NDe }, mixins: [OAe, MDe], 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: w1(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 a, o = ""; r && (a = this.getImageURL(this.envVars.API_LOCATION, { id: n, prefix: this.getS3Prefix(), file_path: r.dataset.path, s3Bucket: this.s3Bucket }), o = 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 f = { label: fv(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: w1(t), type: "Plot", thumbnail: a, userData: f, hideType: !0, mimetype: o }); }); }, createScaffoldItems: function() { if (this.entry.scaffolds) { let e = 0; this.entry.scaffolds.forEach((t, n) => { const r = t.dataset.path, a = t.identifier, o = this.getThumbnailForScaffold( t, this.entry.scaffoldViews, this.entry.thumbnails, e ); let i = "", s; o && (s = this.getImageURL(this.envVars.API_LOCATION, { id: a, prefix: this.getS3Prefix(), file_path: o.dataset.path, s3Bucket: this.s3Bucket }), i = o.mimetype.name); let l = { label: fv(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: a, title: w1(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 a = { label: fv(this.label), resource: r, datasetId: this.datasetId, s3uri: this.entry.s3uri, title: "View segmentation", type: "Segmentation" }; const o = 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: w1(n), type: "Segmentation", thumbnail: o, userData: a, hideType: !0, mimetype: "image/png" }); }); }, createSimulationItems: function() { if (this.entry.simulation && this.entry.simulation.length > 0) { let e = { 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: e }); } }, 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 } ), a = { share_link: n.share_link, id: n.image_id, itemId: n.sourcepkg_id }; let o = { label: fv(this.label), resource: a, datasetId: this.datasetId, title: "View image", name: fv(this.label), type: "Biolucida" }; return { id: n.image_id, title: "Image", type: "Image", thumbnail: r, userData: o, mimetype: "image/png", hideType: !0 }; }) ), this.items.Images = t; } } }, mounted() { this.ro = new ResizeObserver(this.onResize).observe(this.$el); }, unmounted() { delete this.ro; } }, DDe = { class: "full-size" }; function RDe(e, t, n, r, a, o) { const i = lt("Gallery"); return I(), j("div", DDe, [ ue(i, { bottomSpacer: a.bottomSpacer, cardWidth: 10, items: o.galleryItems, "max-width": a.maxWidth, "show-indicator-bar": !1, "show-card-details": !0, "highlight-active": !1, "image-style": a.imageStyle, "image-container-style": a.imageContainerStyle, "body-style": a.bodyStyle, shadow: a.shadow, onCardClicked: o.cardClicked, onDatalinkClicked: o.datalinkClicked, ref: "gallery" }, null, 8, ["bottomSpacer", "items", "max-width", "image-style", "image-container-style", "body-style", "shadow", "onCardClicked", "onDatalinkClicked"]) ]); } const jj = /* @__PURE__ */ Zi(BDe, [["render", RDe], ["__scopeId", "data-v-7e45605c"]]); function zDe(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(a) { a(n); }), (r = e.get("*")) && r.slice().map(function(a) { a(t, n); }); } }; } const mr = new zDe(), $b = { "homo sapiens": "Human", "rattus norvegicus": "Rat", "mus musculus": "Mouse", "sus scrofa domesticus": "Pig", "sus scrofa": "Boar", "felis catus": "Cat" }, qA = "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"; var VDe = Object.defineProperty, jDe = (e, t, n) => t in e ? VDe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, ls = (e, t, n) => jDe(e, typeof t != "symbol" ? t + "" : t, n); const tl = (e, t, { checkForDefaultPrevented: n = !0 } = {}) => (r) => { const a = e == null ? void 0 : e(r); if (n === !1 || !a) return t == null ? void 0 : t(r); }; var WA; const br = typeof window < "u", HDe = (e) => typeof e == "string", Hj = () => { }, H5 = br && ((WA = window == null ? void 0 : window.navigator) == null ? void 0 : WA.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent); function Uj(e) { return typeof e == "function" ? e() : b(e); } function UDe(e) { return e; } function Mw(e) { return hg() ? (ah(e), !0) : !1; } function qDe(e, t = !0) { tt() ? nt(e) : t ? e() : Ue(e); } function pl(e) { var t; const n = Uj(e); return (t = n == null ? void 0 : n.$el) != null ? t : n; } const Bw = br ? window : void 0; function Ko(...e) { let t, n, r, a; if (HDe(e[0]) || Array.isArray(e[0]) ? ([n, r, a] = e, t = Bw) : [t, n, r, a] = e, !t) return Hj; Array.isArray(n) || (n = [n]), Array.isArray(r) || (r = [r]); const o = [], i = () => { o.forEach((c) => c()), o.length = 0; }, s = (c, d, f, h) => (c.addEventListener(d, f, h), () => c.removeEventListener(d, f, h)), l = be(() => [pl(t), Uj(a)], ([c, d]) => { i(), c && o.push(...n.flatMap((f) => r.map((h) => s(c, f, h, d)))); }, { immediate: !0, flush: "post" }), u = () => { l(), i(); }; return Mw(u), u; } let KA = !1; function WDe(e, t, n = {}) { const { window: r = Bw, ignore: a = [], capture: o = !0, detectIframe: i = !1 } = n; if (!r) return; H5 && !KA && (KA = !0, Array.from(r.document.body.children).forEach((c) => c.addEventListener("click", Hj))); let s = !0; const l = (c) => a.some((d) => { if (typeof d == "string") return Array.from(r.document.querySelectorAll(d)).some((f) => f === c.target || c.composedPath().includes(f)); { const f = pl(d); return f && (c.target === f || c.composedPath().includes(f)); } }), u = [ Ko(r, "click", (c) => { const d = pl(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: o }), Ko(r, "pointerdown", (c) => { const d = pl(e); d && (s = !c.composedPath().includes(d) && !l(c)); }, { passive: !0 }), i && Ko(r, "blur", (c) => { var d; const f = pl(e); ((d = r.document.activeElement) == null ? void 0 : d.tagName) === "IFRAME" && !(f != null && f.contains(r.document.activeElement)) && t(c); }) ].filter(Boolean); return () => u.forEach((c) => c()); } function qj(e, t = !1) { const n = U(), r = () => n.value = !!e(); return r(), qDe(r, t), n; } const GA = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, XA = "__vueuse_ssr_handlers__"; GA[XA] = GA[XA] || {}; var YA = Object.getOwnPropertySymbols, KDe = Object.prototype.hasOwnProperty, GDe = Object.prototype.propertyIsEnumerable, XDe = (e, t) => { var n = {}; for (var r in e) KDe.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]); if (e != null && YA) for (var r of YA(e)) t.indexOf(r) < 0 && GDe.call(e, r) && (n[r] = e[r]); return n; }; function al(e, t, n = {}) { const r = n, { window: a = Bw } = r, o = XDe(r, ["window"]); let i; const s = qj(() => a && "ResizeObserver" in a), l = () => { i && (i.disconnect(), i = void 0); }, u = be(() => pl(e), (d) => { l(), s.value && a && d && (i = new ResizeObserver(t), i.observe(d, o)); }, { immediate: !0, flush: "post" }), c = () => { l(), u(); }; return Mw(c), { isSupported: s, stop: c }; } var ZA = Object.getOwnPropertySymbols, YDe = Object.prototype.hasOwnProperty, ZDe = Object.prototype.propertyIsEnumerable, QDe = (e, t) => { var n = {}; for (var r in e) YDe.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]); if (e != null && ZA) for (var r of ZA(e)) t.indexOf(r) < 0 && ZDe.call(e, r) && (n[r] = e[r]); return n; }; function JDe(e, t, n = {}) { const r = n, { window: a = Bw } = r, o = QDe(r, ["window"]); let i; const s = qj(() => a && "MutationObserver" in a), l = () => { i && (i.disconnect(), i = void 0); }, u = be(() => pl(e), (d) => { l(), s.value && a && d && (i = new MutationObserver(t), i.observe(d, o)); }, { immediate: !0 }), c = () => { l(), u(); }; return Mw(c), { isSupported: s, stop: c }; } var QA; (function(e) { e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE"; })(QA || (QA = {})); var eRe = Object.defineProperty, JA = Object.getOwnPropertySymbols, tRe = Object.prototype.hasOwnProperty, nRe = Object.prototype.propertyIsEnumerable, e9 = (e, t, n) => t in e ? eRe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, rRe = (e, t) => { for (var n in t || (t = {})) tRe.call(t, n) && e9(e, n, t[n]); if (JA) for (var n of JA(t)) nRe.call(t, n) && e9(e, n, t[n]); return e; }; const aRe = { 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] }; rRe({ linear: UDe }, aRe); const oRe = () => br && /firefox/i.test(window.navigator.userAgent), EE = (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 X0 = () => { }, iRe = Object.prototype.hasOwnProperty, Fd = (e, t) => iRe.call(e, t), no = Array.isArray, Ua = (e) => typeof e == "function", Ta = (e) => typeof e == "string", aa = (e) => e !== null && typeof e == "object", sRe = Object.prototype.toString, lRe = (e) => sRe.call(e), Nk = (e) => lRe(e).slice(8, -1), Wj = (e) => { const t = /* @__PURE__ */ Object.create(null); return (n) => t[n] || (t[n] = e(n)); }, uRe = /-(\w)/g, cRe = Wj((e) => e.replace(uRe, (t, n) => n ? n.toUpperCase() : "")), dRe = /\B([A-Z])/g, pRe = Wj( (e) => e.replace(dRe, "-$1").toLowerCase() ); var Kj = typeof global == "object" && global && global.Object === Object && global, fRe = typeof self == "object" && self && self.Object === Object && self, Ds = Kj || fRe || Function("return this")(), Fs = Ds.Symbol, Gj = Object.prototype, hRe = Gj.hasOwnProperty, vRe = Gj.toString, hv = Fs ? Fs.toStringTag : void 0; function gRe(e) { var t = hRe.call(e, hv), n = e[hv]; try { e[hv] = void 0; var r = !0; } catch { } var a = vRe.call(e); return r && (t ? e[hv] = n : delete e[hv]), a; } var mRe = Object.prototype, yRe = mRe.toString; function bRe(e) { return yRe.call(e); } var wRe = "[object Null]", xRe = "[object Undefined]", t9 = Fs ? Fs.toStringTag : void 0; function Ah(e) { return e == null ? e === void 0 ? xRe : wRe : t9 && t9 in Object(e) ? gRe(e) : bRe(e); } function Wf(e) { return e != null && typeof e == "object"; } var kRe = "[object Symbol]"; function Dw(e) { return typeof e == "symbol" || Wf(e) && Ah(e) == kRe; } function CRe(e, t) { for (var n = -1, r = e == null ? 0 : e.length, a = Array(r); ++n < r; ) a[n] = t(e[n], n, e); return a; } var qi = Array.isArray, SRe = 1 / 0, n9 = Fs ? Fs.prototype : void 0, r9 = n9 ? n9.toString : void 0; function Xj(e) { if (typeof e == "string") return e; if (qi(e)) return CRe(e, Xj) + ""; if (Dw(e)) return r9 ? r9.call(e) : ""; var t = e + ""; return t == "0" && 1 / e == -SRe ? "-0" : t; } var ERe = /\s/; function _Re(e) { for (var t = e.length; t-- && ERe.test(e.charAt(t)); ) ; return t; } var TRe = /^\s+/; function ORe(e) { return e && e.slice(0, _Re(e) + 1).replace(TRe, ""); } function Zu(e) { var t = typeof e; return e != null && (t == "object" || t == "function"); } var a9 = NaN, $Re = /^[-+]0x[0-9a-f]+$/i, FRe = /^0b[01]+$/i, ARe = /^0o[0-7]+$/i, IRe = parseInt; function o9(e) { if (typeof e == "number") return e; if (Dw(e)) return a9; if (Zu(e)) { var t = typeof e.valueOf == "function" ? e.valueOf() : e; e = Zu(t) ? t + "" : t; } if (typeof e != "string") return e === 0 ? e : +e; e = ORe(e); var n = FRe.test(e); return n || ARe.test(e) ? IRe(e.slice(2), n ? 2 : 8) : $Re.test(e) ? a9 : +e; } function Yj(e) { return e; } var PRe = "[object AsyncFunction]", LRe = "[object Function]", NRe = "[object GeneratorFunction]", MRe = "[object Proxy]"; function Zj(e) { if (!Zu(e)) return !1; var t = Ah(e); return t == LRe || t == NRe || t == PRe || t == MRe; } var Mk = Ds["__core-js_shared__"], i9 = function() { var e = /[^.]+$/.exec(Mk && Mk.keys && Mk.keys.IE_PROTO || ""); return e ? "Symbol(src)_1." + e : ""; }(); function BRe(e) { return !!i9 && i9 in e; } var DRe = Function.prototype, RRe = DRe.toString; function sp(e) { if (e != null) { try { return RRe.call(e); } catch { } try { return e + ""; } catch { } } return ""; } var zRe = /[\\^$.*+?()[\]{}|]/g, VRe = /^\[object .+?Constructor\]$/, jRe = Function.prototype, HRe = Object.prototype, URe = jRe.toString, qRe = HRe.hasOwnProperty, WRe = RegExp( "^" + URe.call(qRe).replace(zRe, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$" ); function KRe(e) { if (!Zu(e) || BRe(e)) return !1; var t = Zj(e) ? WRe : VRe; return t.test(sp(e)); } function GRe(e, t) { return e == null ? void 0 : e[t]; } function lp(e, t) { var n = GRe(e, t); return KRe(n) ? n : void 0; } var U5 = lp(Ds, "WeakMap"); function XRe(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 YRe = 800, ZRe = 16, QRe = Date.now; function JRe(e) { var t = 0, n = 0; return function() { var r = QRe(), a = ZRe - (r - n); if (n = r, a > 0) { if (++t >= YRe) return arguments[0]; } else t = 0; return e.apply(void 0, arguments); }; } function e7e(e) { return function() { return e; }; } var Fb = function() { try { var e = lp(Object, "defineProperty"); return e({}, "", {}), e; } catch { } }(), t7e = Fb ? function(e, t) { return Fb(e, "toString", { configurable: !0, enumerable: !1, value: e7e(t), writable: !0 }); } : Yj, n7e = JRe(t7e); function r7e(e, t, n, r) { e.length; for (var a = n + 1; a--; ) if (t(e[a], a, e)) return a; return -1; } var a7e = 9007199254740991, o7e = /^(?:0|[1-9]\d*)$/; function _E(e, t) { var n = typeof e; return t = t ?? a7e, !!t && (n == "number" || n != "symbol" && o7e.test(e)) && e > -1 && e % 1 == 0 && e < t; } function i7e(e, t, n) { t == "__proto__" && Fb ? Fb(e, t, { configurable: !0, enumerable: !0, value: n, writable: !0 }) : e[t] = n; } function TE(e, t) { return e === t || e !== e && t !== t; } var s7e = Object.prototype, l7e = s7e.hasOwnProperty; function u7e(e, t, n) { var r = e[t]; (!(l7e.call(e, t) && TE(r, n)) || n === void 0 && !(t in e)) && i7e(e, t, n); } var s9 = Math.max; function c7e(e, t, n) { return t = s9(t === void 0 ? e.length - 1 : t, 0), function() { for (var r = arguments, a = -1, o = s9(r.length - t, 0), i = Array(o); ++a < o; ) i[a] = r[t + a]; a = -1; for (var s = Array(t + 1); ++a < t; ) s[a] = r[a]; return s[t] = n(i), XRe(e, this, s); }; } var d7e = 9007199254740991; function OE(e) { return typeof e == "number" && e > -1 && e % 1 == 0 && e <= d7e; } function p7e(e) { return e != null && OE(e.length) && !Zj(e); } var f7e = Object.prototype; function h7e(e) { var t = e && e.constructor, n = typeof t == "function" && t.prototype || f7e; return e === n; } function v7e(e, t) { for (var n = -1, r = Array(e); ++n < e; ) r[n] = t(n); return r; } var g7e = "[object Arguments]"; function l9(e) { return Wf(e) && Ah(e) == g7e; } var Qj = Object.prototype, m7e = Qj.hasOwnProperty, y7e = Qj.propertyIsEnumerable, $E = l9(/* @__PURE__ */ function() { return arguments; }()) ? l9 : function(e) { return Wf(e) && m7e.call(e, "callee") && !y7e.call(e, "callee"); }; function b7e() { return !1; } var Jj = typeof exports == "object" && exports && !exports.nodeType && exports, u9 = Jj && typeof module == "object" && module && !module.nodeType && module, w7e = u9 && u9.exports === Jj, c9 = w7e ? Ds.Buffer : void 0, x7e = c9 ? c9.isBuffer : void 0, q5 = x7e || b7e, k7e = "[object Arguments]", C7e = "[object Array]", S7e = "[object Boolean]", E7e = "[object Date]", _7e = "[object Error]", T7e = "[object Function]", O7e = "[object Map]", $7e = "[object Number]", F7e = "[object Object]", A7e = "[object RegExp]", I7e = "[object Set]", P7e = "[object String]", L7e = "[object WeakMap]", N7e = "[object ArrayBuffer]", M7e = "[object DataView]", B7e = "[object Float32Array]", D7e = "[object Float64Array]", R7e = "[object Int8Array]", z7e = "[object Int16Array]", V7e = "[object Int32Array]", j7e = "[object Uint8Array]", H7e = "[object Uint8ClampedArray]", U7e = "[object Uint16Array]", q7e = "[object Uint32Array]", Jn = {}; Jn[B7e] = Jn[D7e] = Jn[R7e] = Jn[z7e] = Jn[V7e] = Jn[j7e] = Jn[H7e] = Jn[U7e] = Jn[q7e] = !0; Jn[k7e] = Jn[C7e] = Jn[N7e] = Jn[S7e] = Jn[M7e] = Jn[E7e] = Jn[_7e] = Jn[T7e] = Jn[O7e] = Jn[$7e] = Jn[F7e] = Jn[A7e] = Jn[I7e] = Jn[P7e] = Jn[L7e] = !1; function W7e(e) { return Wf(e) && OE(e.length) && !!Jn[Ah(e)]; } function K7e(e) { return function(t) { return e(t); }; } var eH = typeof exports == "object" && exports && !exports.nodeType && exports, e0 = eH && typeof module == "object" && module && !module.nodeType && module, G7e = e0 && e0.exports === eH, Bk = G7e && Kj.process, d9 = function() { try { var e = e0 && e0.require && e0.require("util").types; return e || Bk && Bk.binding && Bk.binding("util"); } catch { } }(), p9 = d9 && d9.isTypedArray, tH = p9 ? K7e(p9) : W7e, X7e = Object.prototype, Y7e = X7e.hasOwnProperty; function Z7e(e, t) { var n = qi(e), r = !n && $E(e), a = !n && !r && q5(e), o = !n && !r && !a && tH(e), i = n || r || a || o, s = i ? v7e(e.length, String) : [], l = s.length; for (var u in e) Y7e.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. a && (u == "offset" || u == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays. o && (u == "buffer" || u == "byteLength" || u == "byteOffset") || // Skip index properties. _E(u, l))) && s.push(u); return s; } function Q7e(e, t) { return function(n) { return e(t(n)); }; } var J7e = Q7e(Object.keys, Object), eze = Object.prototype, tze = eze.hasOwnProperty; function nze(e) { if (!h7e(e)) return J7e(e); var t = []; for (var n in Object(e)) tze.call(e, n) && n != "constructor" && t.push(n); return t; } function nH(e) { return p7e(e) ? Z7e(e) : nze(e); } var rze = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, aze = /^\w*$/; function FE(e, t) { if (qi(e)) return !1; var n = typeof e; return n == "number" || n == "symbol" || n == "boolean" || e == null || Dw(e) ? !0 : aze.test(e) || !rze.test(e) || t != null && e in Object(t); } var Y0 = lp(Object, "create"); function oze() { this.__data__ = Y0 ? Y0(null) : {}, this.size = 0; } function ize(e) { var t = this.has(e) && delete this.__data__[e]; return this.size -= t ? 1 : 0, t; } var sze = "__lodash_hash_undefined__", lze = Object.prototype, uze = lze.hasOwnProperty; function cze(e) { var t = this.__data__; if (Y0) { var n = t[e]; return n === sze ? void 0 : n; } return uze.call(t, e) ? t[e] : void 0; } var dze = Object.prototype, pze = dze.hasOwnProperty; function fze(e) { var t = this.__data__; return Y0 ? t[e] !== void 0 : pze.call(t, e); } var hze = "__lodash_hash_undefined__"; function vze(e, t) { var n = this.__data__; return this.size += this.has(e) ? 0 : 1, n[e] = Y0 && t === void 0 ? hze : t, this; } function Ad(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]); } } Ad.prototype.clear = oze; Ad.prototype.delete = ize; Ad.prototype.get = cze; Ad.prototype.has = fze; Ad.prototype.set = vze; function gze() { this.__data__ = [], this.size = 0; } function Rw(e, t) { for (var n = e.length; n--; ) if (TE(e[n][0], t)) return n; return -1; } var mze = Array.prototype, yze = mze.splice; function bze(e) { var t = this.__data__, n = Rw(t, e); if (n < 0) return !1; var r = t.length - 1; return n == r ? t.pop() : yze.call(t, n, 1), --this.size, !0; } function wze(e) { var t = this.__data__, n = Rw(t, e); return n < 0 ? void 0 : t[n][1]; } function xze(e) { return Rw(this.__data__, e) > -1; } function kze(e, t) { var n = this.__data__, r = Rw(n, e); return r < 0 ? (++this.size, n.push([e, t])) : n[r][1] = t, this; } function Bl(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]); } } Bl.prototype.clear = gze; Bl.prototype.delete = bze; Bl.prototype.get = wze; Bl.prototype.has = xze; Bl.prototype.set = kze; var Z0 = lp(Ds, "Map"); function Cze() { this.size = 0, this.__data__ = { hash: new Ad(), map: new (Z0 || Bl)(), string: new Ad() }; } function Sze(e) { var t = typeof e; return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e !== "__proto__" : e === null; } function zw(e, t) { var n = e.__data__; return Sze(t) ? n[typeof t == "string" ? "string" : "hash"] : n.map; } function Eze(e) { var t = zw(this, e).delete(e); return this.size -= t ? 1 : 0, t; } function _ze(e) { return zw(this, e).get(e); } function Tze(e) { return zw(this, e).has(e); } function Oze(e, t) { var n = zw(this, e), r = n.size; return n.set(e, t), this.size += n.size == r ? 0 : 1, this; } function Dl(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]); } } Dl.prototype.clear = Cze; Dl.prototype.delete = Eze; Dl.prototype.get = _ze; Dl.prototype.has = Tze; Dl.prototype.set = Oze; var $ze = "Expected a function"; function AE(e, t) { if (typeof e != "function" || t != null && typeof t != "function") throw new TypeError($ze); var n = function() { var r = arguments, a = t ? t.apply(this, r) : r[0], o = n.cache; if (o.has(a)) return o.get(a); var i = e.apply(this, r); return n.cache = o.set(a, i) || o, i; }; return n.cache = new (AE.Cache || Dl)(), n; } AE.Cache = Dl; var Fze = 500; function Aze(e) { var t = AE(e, function(r) { return n.size === Fze && n.clear(), r; }), n = t.cache; return t; } var Ize = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, Pze = /\\(\\)?/g, Lze = Aze(function(e) { var t = []; return e.charCodeAt(0) === 46 && t.push(""), e.replace(Ize, function(n, r, a, o) { t.push(a ? o.replace(Pze, "$1") : r || n); }), t; }); function Nze(e) { return e == null ? "" : Xj(e); } function Vw(e, t) { return qi(e) ? e : FE(e, t) ? [e] : Lze(Nze(e)); } var Mze = 1 / 0; function sm(e) { if (typeof e == "string" || Dw(e)) return e; var t = e + ""; return t == "0" && 1 / e == -Mze ? "-0" : t; } function IE(e, t) { t = Vw(t, e); for (var n = 0, r = t.length; e != null && n < r; ) e = e[sm(t[n++])]; return n && n == r ? e : void 0; } function ll(e, t, n) { var r = e == null ? void 0 : IE(e, t); return r === void 0 ? n : r; } function rH(e, t) { for (var n = -1, r = t.length, a = e.length; ++n < r; ) e[a + n] = t[n]; return e; } var f9 = Fs ? Fs.isConcatSpreadable : void 0; function Bze(e) { return qi(e) || $E(e) || !!(f9 && e && e[f9]); } function Dze(e, t, n, r, a) { var o = -1, i = e.length; for (n || (n = Bze), a || (a = []); ++o < i; ) { var s = e[o]; n(s) ? rH(a, s) : a[a.length] = s; } return a; } function Rze(e) { var t = e == null ? 0 : e.length; return t ? Dze(e) : []; } function zze(e) { return n7e(c7e(e, void 0, Rze), e + ""); } function wu() { if (!arguments.length) return []; var e = arguments[0]; return qi(e) ? e : [e]; } function Vze() { this.__data__ = new Bl(), this.size = 0; } function jze(e) { var t = this.__data__, n = t.delete(e); return this.size = t.size, n; } function Hze(e) { return this.__data__.get(e); } function Uze(e) { return this.__data__.has(e); } var qze = 200; function Wze(e, t) { var n = this.__data__; if (n instanceof Bl) { var r = n.__data__; if (!Z0 || r.length < qze - 1) return r.push([e, t]), this.size = ++n.size, this; n = this.__data__ = new Dl(r); } return n.set(e, t), this.size = n.size, this; } function gl(e) { var t = this.__data__ = new Bl(e); this.size = t.size; } gl.prototype.clear = Vze; gl.prototype.delete = jze; gl.prototype.get = Hze; gl.prototype.has = Uze; gl.prototype.set = Wze; function Kze(e, t) { for (var n = -1, r = e == null ? 0 : e.length, a = 0, o = []; ++n < r; ) { var i = e[n]; t(i, n, e) && (o[a++] = i); } return o; } function Gze() { return []; } var Xze = Object.prototype, Yze = Xze.propertyIsEnumerable, h9 = Object.getOwnPropertySymbols, Zze = h9 ? function(e) { return e == null ? [] : (e = Object(e), Kze(h9(e), function(t) { return Yze.call(e, t); })); } : Gze; function Qze(e, t, n) { var r = t(e); return qi(e) ? r : rH(r, n(e)); } function v9(e) { return Qze(e, nH, Zze); } var W5 = lp(Ds, "DataView"), K5 = lp(Ds, "Promise"), G5 = lp(Ds, "Set"), g9 = "[object Map]", Jze = "[object Object]", m9 = "[object Promise]", y9 = "[object Set]", b9 = "[object WeakMap]", w9 = "[object DataView]", eVe = sp(W5), tVe = sp(Z0), nVe = sp(K5), rVe = sp(G5), aVe = sp(U5), hu = Ah; (W5 && hu(new W5(new ArrayBuffer(1))) != w9 || Z0 && hu(new Z0()) != g9 || K5 && hu(K5.resolve()) != m9 || G5 && hu(new G5()) != y9 || U5 && hu(new U5()) != b9) && (hu = function(e) { var t = Ah(e), n = t == Jze ? e.constructor : void 0, r = n ? sp(n) : ""; if (r) switch (r) { case eVe: return w9; case tVe: return g9; case nVe: return m9; case rVe: return y9; case aVe: return b9; } return t; }); var x9 = Ds.Uint8Array, oVe = "__lodash_hash_undefined__"; function iVe(e) { return this.__data__.set(e, oVe), this; } function sVe(e) { return this.__data__.has(e); } function Ab(e) { var t = -1, n = e == null ? 0 : e.length; for (this.__data__ = new Dl(); ++t < n; ) this.add(e[t]); } Ab.prototype.add = Ab.prototype.push = iVe; Ab.prototype.has = sVe; function lVe(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 uVe(e, t) { return e.has(t); } var cVe = 1, dVe = 2; function aH(e, t, n, r, a, o) { var i = n & cVe, s = e.length, l = t.length; if (s != l && !(i && l > s)) return !1; var u = o.get(e), c = o.get(t); if (u && c) return u == t && c == e; var d = -1, f = !0, h = n & dVe ? new Ab() : void 0; for (o.set(e, t), o.set(t, e); ++d < s; ) { var p = e[d], v = t[d]; if (r) var m = i ? r(v, p, d, t, e, o) : r(p, v, d, e, t, o); if (m !== void 0) { if (m) continue; f = !1; break; } if (h) { if (!lVe(t, function(g, y) { if (!uVe(h, y) && (p === g || a(p, g, n, r, o))) return h.push(y); })) { f = !1; break; } } else if (!(p === v || a(p, v, n, r, o))) { f = !1; break; } } return o.delete(e), o.delete(t), f; } function pVe(e) { var t = -1, n = Array(e.size); return e.forEach(function(r, a) { n[++t] = [a, r]; }), n; } function fVe(e) { var t = -1, n = Array(e.size); return e.forEach(function(r) { n[++t] = r; }), n; } var hVe = 1, vVe = 2, gVe = "[object Boolean]", mVe = "[object Date]", yVe = "[object Error]", bVe = "[object Map]", wVe = "[object Number]", xVe = "[object RegExp]", kVe = "[object Set]", CVe = "[object String]", SVe = "[object Symbol]", EVe = "[object ArrayBuffer]", _Ve = "[object DataView]", k9 = Fs ? Fs.prototype : void 0, Dk = k9 ? k9.valueOf : void 0; function TVe(e, t, n, r, a, o, i) { switch (n) { case _Ve: if (e.byteLength != t.byteLength || e.byteOffset != t.byteOffset) return !1; e = e.buffer, t = t.buffer; case EVe: return !(e.byteLength != t.byteLength || !o(new x9(e), new x9(t))); case gVe: case mVe: case wVe: return TE(+e, +t); case yVe: return e.name == t.name && e.message == t.message; case xVe: case CVe: return e == t + ""; case bVe: var s = pVe; case kVe: var l = r & hVe; if (s || (s = fVe), e.size != t.size && !l) return !1; var u = i.get(e); if (u) return u == t; r |= vVe, i.set(e, t); var c = aH(s(e), s(t), r, a, o, i); return i.delete(e), c; case SVe: if (Dk) return Dk.call(e) == Dk.call(t); } return !1; } var OVe = 1, $Ve = Object.prototype, FVe = $Ve.hasOwnProperty; function AVe(e, t, n, r, a, o) { var i = n & OVe, s = v9(e), l = s.length, u = v9(t), c = u.length; if (l != c && !i) return !1; for (var d = l; d--; ) { var f = s[d]; if (!(i ? f in t : FVe.call(t, f))) return !1; } var h = o.get(e), p = o.get(t); if (h && p) return h == t && p == e; var v = !0; o.set(e, t), o.set(t, e); for (var m = i; ++d < l; ) { f = s[d]; var g = e[f], y = t[f]; if (r) var x = i ? r(y, g, f, t, e, o) : r(g, y, f, e, t, o); if (!(x === void 0 ? g === y || a(g, y, n, r, o) : x)) { v = !1; break; } m || (m = f == "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 o.delete(e), o.delete(t), v; } var IVe = 1, C9 = "[object Arguments]", S9 = "[object Array]", x1 = "[object Object]", PVe = Object.prototype, E9 = PVe.hasOwnProperty; function LVe(e, t, n, r, a, o) { var i = qi(e), s = qi(t), l = i ? S9 : hu(e), u = s ? S9 : hu(t); l = l == C9 ? x1 : l, u = u == C9 ? x1 : u; var c = l == x1, d = u == x1, f = l == u; if (f && q5(e)) { if (!q5(t)) return !1; i = !0, c = !1; } if (f && !c) return o || (o = new gl()), i || tH(e) ? aH(e, t, n, r, a, o) : TVe(e, t, l, n, r, a, o); if (!(n & IVe)) { var h = c && E9.call(e, "__wrapped__"), p = d && E9.call(t, "__wrapped__"); if (h || p) { var v = h ? e.value() : e, m = p ? t.value() : t; return o || (o = new gl()), a(v, m, n, r, o); } } return f ? (o || (o = new gl()), AVe(e, t, n, r, a, o)) : !1; } function jw(e, t, n, r, a) { return e === t ? !0 : e == null || t == null || !Wf(e) && !Wf(t) ? e !== e && t !== t : LVe(e, t, n, r, jw, a); } var NVe = 1, MVe = 2; function BVe(e, t, n, r) { var a = n.length, o = a; if (e == null) return !o; for (e = Object(e); a--; ) { var i = n[a]; if (i[2] ? i[1] !== e[i[0]] : !(i[0] in e)) return !1; } for (; ++a < o; ) { i = n[a]; 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 gl(), d; if (!(d === void 0 ? jw(u, l, NVe | MVe, r, c) : d)) return !1; } } return !0; } function oH(e) { return e === e && !Zu(e); } function DVe(e) { for (var t = nH(e), n = t.length; n--; ) { var r = t[n], a = e[r]; t[n] = [r, a, oH(a)]; } return t; } function iH(e, t) { return function(n) { return n == null ? !1 : n[e] === t && (t !== void 0 || e in Object(n)); }; } function RVe(e) { var t = DVe(e); return t.length == 1 && t[0][2] ? iH(t[0][0], t[0][1]) : function(n) { return n === e || BVe(n, e, t); }; } function zVe(e, t) { return e != null && t in Object(e); } function VVe(e, t, n) { t = Vw(t, e); for (var r = -1, a = t.length, o = !1; ++r < a; ) { var i = sm(t[r]); if (!(o = e != null && n(e, i))) break; e = e[i]; } return o || ++r != a ? o : (a = e == null ? 0 : e.length, !!a && OE(a) && _E(i, a) && (qi(e) || $E(e))); } function sH(e, t) { return e != null && VVe(e, t, zVe); } var jVe = 1, HVe = 2; function UVe(e, t) { return FE(e) && oH(t) ? iH(sm(e), t) : function(n) { var r = ll(n, e); return r === void 0 && r === t ? sH(n, e) : jw(t, r, jVe | HVe); }; } function qVe(e) { return function(t) { return t == null ? void 0 : t[e]; }; } function WVe(e) { return function(t) { return IE(t, e); }; } function KVe(e) { return FE(e) ? qVe(sm(e)) : WVe(e); } function GVe(e) { return typeof e == "function" ? e : e == null ? Yj : typeof e == "object" ? qi(e) ? UVe(e[0], e[1]) : RVe(e) : KVe(e); } var Rk = function() { return Ds.Date.now(); }, XVe = "Expected a function", YVe = Math.max, ZVe = Math.min; function lH(e, t, n) { var r, a, o, i, s, l, u = 0, c = !1, d = !1, f = !0; if (typeof e != "function") throw new TypeError(XVe); t = o9(t) || 0, Zu(n) && (c = !!n.leading, d = "maxWait" in n, o = d ? YVe(o9(n.maxWait) || 0, t) : o, f = "trailing" in n ? !!n.trailing : f); function h(C) { var S = r, _ = a; return r = a = void 0, u = C, i = e.apply(_, S), i; } function p(C) { return u = C, s = setTimeout(g, t), c ? h(C) : i; } function v(C) { var S = C - l, _ = C - u, T = t - S; return d ? ZVe(T, o - _) : T; } function m(C) { var S = C - l, _ = C - u; return l === void 0 || S >= t || S < 0 || d && _ >= o; } function g() { var C = Rk(); if (m(C)) return y(C); s = setTimeout(g, v(C)); } function y(C) { return s = void 0, f && r ? h(C) : (r = a = void 0, i); } function x() { s !== void 0 && clearTimeout(s), u = 0, r = l = a = s = void 0; } function w() { return s === void 0 ? i : y(Rk()); } function k() { var C = Rk(), S = m(C); if (r = arguments, a = this, l = C, S) { if (s === void 0) return p(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 QVe(e, t, n) { var r = e == null ? 0 : e.length; if (!r) return -1; var a = r - 1; return r7e(e, GVe(t), a); } function Ib(e) { for (var t = -1, n = e == null ? 0 : e.length, r = {}; ++t < n; ) { var a = e[t]; r[a[0]] = a[1]; } return r; } function Pb(e, t) { return jw(e, t); } function Lu(e) { return e == null; } function JVe(e) { return e === void 0; } function eje(e, t, n, r) { if (!Zu(e)) return e; t = Vw(t, e); for (var a = -1, o = t.length, i = o - 1, s = e; s != null && ++a < o; ) { var l = sm(t[a]), u = n; if (l === "__proto__" || l === "constructor" || l === "prototype") return e; if (a != i) { var c = s[l]; u = void 0, u === void 0 && (u = Zu(c) ? c : _E(t[a + 1]) ? [] : {}); } u7e(s, l, u), s = s[l]; } return e; } function tje(e, t, n) { for (var r = -1, a = t.length, o = {}; ++r < a; ) { var i = t[r], s = IE(e, i); n(s, i) && eje(o, Vw(i, e), s); } return o; } function nje(e, t) { return tje(e, t, function(n, r) { return sH(e, r); }); } var uH = zze(function(e, t) { return e == null ? {} : nje(e, t); }); const Ou = (e) => e === void 0, Kf = (e) => typeof e == "boolean", oa = (e) => typeof e == "number", sd = (e) => typeof Element > "u" ? !1 : e instanceof Element, Lb = (e) => Lu(e), rje = (e) => Ta(e) ? !Number.isNaN(Number(e)) : !1, aje = (e = "") => e.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d"), _9 = (e) => Object.keys(e); class cH extends Error { constructor(t) { super(t), this.name = "ElementPlusError"; } } function oje(e, t) { throw new cH(`[${e}] ${t}`); } function wr(e, t) { if (process.env.NODE_ENV !== "production") { const n = Ta(e) ? new cH(`[${e}] ${t}`) : e; console.warn(n); } } const ije = "utils/dom/style", dH = (e = "") => e.split(" ").filter((t) => !!t.trim()), X5 = (e, t) => { !e || !t.trim() || e.classList.add(...dH(t)); }, ld = (e, t) => { !e || !t.trim() || e.classList.remove(...dH(t)); }, vv = (e, t) => { var n; if (!br || !e || !t) return ""; let r = cRe(t); r === "float" && (r = "cssFloat"); try { const a = e.style[r]; if (a) return a; const o = (n = document.defaultView) == null ? void 0 : n.getComputedStyle(e, ""); return o ? o[r] : ""; } catch { return e.style[r]; } }; function Gf(e, t = "px") { if (!e) return ""; if (oa(e) || rje(e)) return `${e}${t}`; if (Ta(e)) return e; wr(ije, "binding value must be a string or number"); } function sje(e, t) { if (!br) 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 a = t.offsetTop + n.reduce((l, u) => l + u.offsetTop, 0), o = a + t.offsetHeight, i = e.scrollTop, s = i + e.clientHeight; a < i ? e.scrollTop = a : o > s && (e.scrollTop = o - e.clientHeight); } /*! Element Plus Icons Vue v2.3.1 */ var lje = /* @__PURE__ */ X({ name: "Aim", __name: "aim", setup(e) { return (t, n) => (I(), j("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ W("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" }), W("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" }) ])); } }), uje = lje, cje = /* @__PURE__ */ X({ name: "ArrowDown", __name: "arrow-down", setup(e) { return (t, n) => (I(), j("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ W("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" }) ])); } }), PE = cje, dje = /* @__PURE__ */ X({ name: "ArrowUp", __name: "arrow-up", setup(e) { return (t, n) => (I(), j("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ W("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" }) ])); } }), pje = dje, fje = /* @__PURE__ */ X({ name: "CaretRight", __name: "caret-right", setup(e) { return (t, n) => (I(), j("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ W("path", { fill: "currentColor", d: "M384 192v640l384-320.064z" }) ])); } }), hje = fje, vje = /* @__PURE__ */ X({ name: "CircleCheck", __name: "circle-check", setup(e) { return (t, n) => (I(), j("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ W("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" }), W("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" }) ])); } }), gje = vje, mje = /* @__PURE__ */ X({ name: "CircleClose", __name: "circle-close", setup(e) { return (t, n) => (I(), j("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ W("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" }), W("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" }) ])); } }), LE = mje, yje = /* @__PURE__ */ X({ name: "Close", __name: "close", setup(e) { return (t, n) => (I(), j("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ W("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" }) ])); } }), Nb = yje, bje = /* @__PURE__ */ X({ name: "CopyDocument", __name: "copy-document", setup(e) { return (t, n) => (I(), j("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ W("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" }), W("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" }) ])); } }), wje = bje, xje = /* @__PURE__ */ X({ name: "Delete", __name: "delete", setup(e) { return (t, n) => (I(), j("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ W("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" }) ])); } }), kje = xje, Cje = /* @__PURE__ */ X({ name: "Edit", __name: "edit", setup(e) { return (t, n) => (I(), j("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ W("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" }), W("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" }) ])); } }), Sje = Cje, Eje = /* @__PURE__ */ X({ name: "Finished", __name: "finished", setup(e) { return (t, n) => (I(), j("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ W("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" }) ])); } }), _je = Eje, Tje = /* @__PURE__ */ X({ name: "Hide", __name: "hide", setup(e) { return (t, n) => (I(), j("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ W("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" }), W("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" }) ])); } }), Oje = Tje, $je = /* @__PURE__ */ X({ name: "Loading", __name: "loading", setup(e) { return (t, n) => (I(), j("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ W("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" }) ])); } }), NE = $je, Fje = /* @__PURE__ */ X({ name: "Lock", __name: "lock", setup(e) { return (t, n) => (I(), j("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ W("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" }), W("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" }) ])); } }), Aje = Fje, Ije = /* @__PURE__ */ X({ name: "Unlock", __name: "unlock", setup(e) { return (t, n) => (I(), j("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ W("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" }), W("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" }) ])); } }), Pje = Ije, Lje = /* @__PURE__ */ X({ name: "View", __name: "view", setup(e) { return (t, n) => (I(), j("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ W("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" }) ])); } }), Nje = Lje, Mje = /* @__PURE__ */ X({ name: "ZoomIn", __name: "zoom-in", setup(e) { return (t, n) => (I(), j("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ W("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" }) ])); } }), Bje = Mje, Dje = /* @__PURE__ */ X({ name: "ZoomOut", __name: "zoom-out", setup(e) { return (t, n) => (I(), j("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ W("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" }) ])); } }), Rje = Dje; const pH = "__epPropKey", $t = (e) => e, zje = (e) => aa(e) && !!e[pH], Hw = (e, t) => { if (!aa(e) || zje(e)) return e; const { values: n, required: r, default: a, type: o, validator: i } = e, s = { type: o, required: !!r, validator: n || i ? (l) => { let u = !1, c = []; if (n && (c = Array.from(n), Fd(e, "default") && c.push(a), u || (u = c.includes(l))), i && (u || (u = i(l))), !u && c.length > 0) { const d = [...new Set(c)].map((f) => JSON.stringify(f)).join(", "); vg(`Invalid prop: validation failed${t ? ` for prop "${t}"` : ""}. Expected one of [${d}], got value ${JSON.stringify(l)}.`); } return u; } : void 0, [pH]: !0 }; return Fd(e, "default") && (s.default = a), s; }, Ln = (e) => Ib(Object.entries(e).map(([t, n]) => [ t, Hw(n, t) ])), Qu = $t([ String, Object, Function ]), fH = { validating: NE, success: gje, error: LE }, Yr = (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; }, Vje = (e, t) => (e.install = (n) => { n.directive(t, e); }, e), Rl = (e) => (e.install = X0, e), Ar = { 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" }, ea = "update:modelValue", ME = "change", hH = ["", "default", "small", "large"], jje = (e) => /([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(e), qp = (e) => e, Hje = ["class", "style"], Uje = /^on[A-Z]/, qje = (e = {}) => { const { excludeListeners: t = !1, excludeKeys: n } = e, r = F(() => ((n == null ? void 0 : n.value) || []).concat(Hje)), a = tt(); return a ? F(() => { var o; return Ib(Object.entries((o = a.proxy) == null ? void 0 : o.$attrs).filter(([i]) => !r.value.includes(i) && !(t && Uje.test(i)))); }) : (wr("use-attrs", "getCurrentInstance() returned null. useAttrs() must be called at the top of a setup function"), F(() => ({}))); }, by = ({ from: e, replacement: t, scope: n, version: r, ref: a, type: o = "API" }, i) => { be(() => b(i), (s) => { s && wr(n, `[${o}] ${e} is about to be deprecated in version ${r}, please use ${t} instead. For more detail, please visit: ${a} `); }, { immediate: !0 }); }; var Wje = { 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 Kje = (e) => (t, n) => Gje(t, n, b(e)), Gje = (e, t, n) => ll(n, e, e).replace(/\{(\w+)\}/g, (r, a) => { var o; return `${(o = t == null ? void 0 : t[a]) != null ? o : `{${a}}`}`; }), Xje = (e) => { const t = F(() => b(e).name), n = ar(e) ? e : U(e); return { lang: t, locale: n, t: Kje(e) }; }, vH = Symbol("localeContextKey"), lm = (e) => { const t = e || Te(vH, U()); return Xje(F(() => t.value || Wje)); }, wy = "el", Yje = "is-", $c = (e, t, n, r, a) => { let o = `${e}-${t}`; return n && (o += `-${n}`), r && (o += `__${r}`), a && (o += `--${a}`), o; }, gH = Symbol("namespaceContextKey"), BE = (e) => { const t = e || (tt() ? Te(gH, U(wy)) : U(wy)); return F(() => b(t) || wy); }, Wt = (e, t) => { const n = BE(t); return { namespace: n, b: (r = "") => $c(n.value, e, r, "", ""), e: (r) => r ? $c(n.value, e, "", r, "") : "", m: (r) => r ? $c(n.value, e, "", "", r) : "", be: (r, a) => r && a ? $c(n.value, e, r, a, "") : "", em: (r, a) => r && a ? $c(n.value, e, "", r, a) : "", bm: (r, a) => r && a ? $c(n.value, e, r, "", a) : "", bem: (r, a, o) => r && a && o ? $c(n.value, e, r, a, o) : "", is: (r, ...a) => { const o = a.length >= 1 ? a[0] : !0; return r && o ? `${Yje}${r}` : ""; }, cssVar: (r) => { const a = {}; for (const o in r) r[o] && (a[`--${n.value}-${o}`] = r[o]); return a; }, cssVarName: (r) => `--${n.value}-${r}`, cssVarBlock: (r) => { const a = {}; for (const o in r) r[o] && (a[`--${n.value}-${e}-${o}`] = r[o]); return a; }, cssVarBlockName: (r) => `--${n.value}-${e}-${r}` }; }, Zje = Hw({ type: $t(Boolean), default: null }), Qje = Hw({ type: $t(Function) }), Jje = (e) => { const t = `update:${e}`, n = `onUpdate:${e}`, r = [t], a = { [e]: Zje, [n]: Qje }; return { useModelToggle: ({ indicator: o, toggleReason: i, shouldHideWhenRouteChanges: s, shouldProceed: l, onShow: u, onHide: c }) => { const d = tt(), { emit: f } = d, h = d.props, p = F(() => Ua(h[n])), v = F(() => h[e] === null), m = (C) => { o.value !== !0 && (o.value = !0, i && (i.value = C), Ua(u) && u(C)); }, g = (C) => { o.value !== !1 && (o.value = !1, i && (i.value = C), Ua(c) && c(C)); }, y = (C) => { if (h.disabled === !0 || Ua(l) && !l()) return; const S = p.value && br; S && f(t, !0), (v.value || !S) && m(C); }, x = (C) => { if (h.disabled === !0 || !br) return; const S = p.value && br; S && f(t, !1), (v.value || !S) && g(C); }, w = (C) => { Kf(C) && (h.disabled && C ? p.value && f(t, !1) : o.value !== C && (C ? m() : g())); }, k = () => { o.value ? x() : y(); }; return be(() => h[e], w), s && d.appContext.config.globalProperties.$route !== void 0 && be(() => ({ ...d.proxy.$route }), () => { s.value && o.value && x(); }), nt(() => { w(h[e]); }), { hide: x, show: y, toggle: k, hasUpdateHandler: p }; }, useModelToggleProps: a, useModelToggleEmits: r }; }, mH = (e) => { const t = tt(); return F(() => { var n, r; return (r = (n = t == null ? void 0 : t.proxy) == null ? void 0 : n.$props) == null ? void 0 : r[e]; }); }; var mo = "top", fi = "bottom", hi = "right", yo = "left", DE = "auto", um = [mo, fi, hi, yo], Xf = "start", Q0 = "end", eHe = "clippingParents", yH = "viewport", gv = "popper", tHe = "reference", T9 = um.reduce(function(e, t) { return e.concat([t + "-" + Xf, t + "-" + Q0]); }, []), Uw = [].concat(um, [DE]).reduce(function(e, t) { return e.concat([t, t + "-" + Xf, t + "-" + Q0]); }, []), nHe = "beforeRead", rHe = "read", aHe = "afterRead", oHe = "beforeMain", iHe = "main", sHe = "afterMain", lHe = "beforeWrite", uHe = "write", cHe = "afterWrite", dHe = [nHe, rHe, aHe, oHe, iHe, sHe, lHe, uHe, cHe]; function As(e) { return e ? (e.nodeName || "").toLowerCase() : null; } function ts(e) { if (e == null) return window; if (e.toString() !== "[object Window]") { var t = e.ownerDocument; return t && t.defaultView || window; } return e; } function Yf(e) { var t = ts(e).Element; return e instanceof t || e instanceof Element; } function ei(e) { var t = ts(e).HTMLElement; return e instanceof t || e instanceof HTMLElement; } function RE(e) { if (typeof ShadowRoot > "u") return !1; var t = ts(e).ShadowRoot; return e instanceof t || e instanceof ShadowRoot; } function pHe(e) { var t = e.state; Object.keys(t.elements).forEach(function(n) { var r = t.styles[n] || {}, a = t.attributes[n] || {}, o = t.elements[n]; !ei(o) || !As(o) || (Object.assign(o.style, r), Object.keys(a).forEach(function(i) { var s = a[i]; s === !1 ? o.removeAttribute(i) : o.setAttribute(i, s === !0 ? "" : s); })); }); } function fHe(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 a = t.elements[r], o = 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; }, {}); !ei(a) || !As(a) || (Object.assign(a.style, s), Object.keys(o).forEach(function(l) { a.removeAttribute(l); })); }); }; } var bH = { name: "applyStyles", enabled: !0, phase: "write", fn: pHe, effect: fHe, requires: ["computeStyles"] }; function ws(e) { return e.split("-")[0]; } var ud = Math.max, Mb = Math.min, Zf = Math.round; function Qf(e, t) { t === void 0 && (t = !1); var n = e.getBoundingClientRect(), r = 1, a = 1; if (ei(e) && t) { var o = e.offsetHeight, i = e.offsetWidth; i > 0 && (r = Zf(n.width) / i || 1), o > 0 && (a = Zf(n.height) / o || 1); } return { width: n.width / r, height: n.height / a, top: n.top / a, right: n.right / r, bottom: n.bottom / a, left: n.left / r, x: n.left / r, y: n.top / a }; } function zE(e) { var t = Qf(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 wH(e, t) { var n = t.getRootNode && t.getRootNode(); if (e.contains(t)) return !0; if (n && RE(n)) { var r = t; do { if (r && e.isSameNode(r)) return !0; r = r.parentNode || r.host; } while (r); } return !1; } function Cl(e) { return ts(e).getComputedStyle(e); } function hHe(e) { return ["table", "td", "th"].indexOf(As(e)) >= 0; } function fc(e) { return ((Yf(e) ? e.ownerDocument : e.document) || window.document).documentElement; } function qw(e) { return As(e) === "html" ? e : e.assignedSlot || e.parentNode || (RE(e) ? e.host : null) || fc(e); } function O9(e) { return !ei(e) || Cl(e).position === "fixed" ? null : e.offsetParent; } function vHe(e) { var t = navigator.userAgent.toLowerCase().indexOf("firefox") !== -1, n = navigator.userAgent.indexOf("Trident") !== -1; if (n && ei(e)) { var r = Cl(e); if (r.position === "fixed") return null; } var a = qw(e); for (RE(a) && (a = a.host); ei(a) && ["html", "body"].indexOf(As(a)) < 0; ) { var o = Cl(a); if (o.transform !== "none" || o.perspective !== "none" || o.contain === "paint" || ["transform", "perspective"].indexOf(o.willChange) !== -1 || t && o.willChange === "filter" || t && o.filter && o.filter !== "none") return a; a = a.parentNode; } return null; } function cm(e) { for (var t = ts(e), n = O9(e); n && hHe(n) && Cl(n).position === "static"; ) n = O9(n); return n && (As(n) === "html" || As(n) === "body" && Cl(n).position === "static") ? t : n || vHe(e) || t; } function VE(e) { return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y"; } function t0(e, t, n) { return ud(e, Mb(t, n)); } function gHe(e, t, n) { var r = t0(e, t, n); return r > n ? n : r; } function xH() { return { top: 0, right: 0, bottom: 0, left: 0 }; } function kH(e) { return Object.assign({}, xH(), e); } function CH(e, t) { return t.reduce(function(n, r) { return n[r] = e, n; }, {}); } var mHe = function(e, t) { return e = typeof e == "function" ? e(Object.assign({}, t.rects, { placement: t.placement })) : e, kH(typeof e != "number" ? e : CH(e, um)); }; function yHe(e) { var t, n = e.state, r = e.name, a = e.options, o = n.elements.arrow, i = n.modifiersData.popperOffsets, s = ws(n.placement), l = VE(s), u = [yo, hi].indexOf(s) >= 0, c = u ? "height" : "width"; if (!(!o || !i)) { var d = mHe(a.padding, n), f = zE(o), h = l === "y" ? mo : yo, p = l === "y" ? fi : hi, v = n.rects.reference[c] + n.rects.reference[l] - i[l] - n.rects.popper[c], m = i[l] - n.rects.reference[l], g = cm(o), y = g ? l === "y" ? g.clientHeight || 0 : g.clientWidth || 0 : 0, x = v / 2 - m / 2, w = d[h], k = y - f[c] - d[p], C = y / 2 - f[c] / 2 + x, S = t0(w, C, k), _ = l; n.modifiersData[r] = (t = {}, t[_] = S, t.centerOffset = S - C, t); } } function bHe(e) { var t = e.state, n = e.options, r = n.element, a = r === void 0 ? "[data-popper-arrow]" : r; a != null && (typeof a == "string" && (a = t.elements.popper.querySelector(a), !a) || !wH(t.elements.popper, a) || (t.elements.arrow = a)); } var wHe = { name: "arrow", enabled: !0, phase: "main", fn: yHe, effect: bHe, requires: ["popperOffsets"], requiresIfExists: ["preventOverflow"] }; function Jf(e) { return e.split("-")[1]; } var xHe = { top: "auto", right: "auto", bottom: "auto", left: "auto" }; function kHe(e) { var t = e.x, n = e.y, r = window, a = r.devicePixelRatio || 1; return { x: Zf(t * a) / a || 0, y: Zf(n * a) / a || 0 }; } function $9(e) { var t, n = e.popper, r = e.popperRect, a = e.placement, o = e.variation, i = e.offsets, s = e.position, l = e.gpuAcceleration, u = e.adaptive, c = e.roundOffsets, d = e.isFixed, f = i.x, h = f === void 0 ? 0 : f, p = i.y, v = p === void 0 ? 0 : p, m = typeof c == "function" ? c({ x: h, y: v }) : { x: h, y: v }; h = m.x, v = m.y; var g = i.hasOwnProperty("x"), y = i.hasOwnProperty("y"), x = yo, w = mo, k = window; if (u) { var C = cm(n), S = "clientHeight", _ = "clientWidth"; if (C === ts(n) && (C = fc(n), Cl(C).position !== "static" && s === "absolute" && (S = "scrollHeight", _ = "scrollWidth")), C = C, a === mo || (a === yo || a === hi) && o === Q0) { w = fi; var T = d && C === k && k.visualViewport ? k.visualViewport.height : C[S]; v -= T - r.height, v *= l ? 1 : -1; } if (a === yo || (a === mo || a === fi) && o === Q0) { x = hi; var O = d && C === k && k.visualViewport ? k.visualViewport.width : C[_]; h -= O - r.width, h *= l ? 1 : -1; } } var $ = Object.assign({ position: s }, u && xHe), A = c === !0 ? kHe({ x: h, y: v }) : { x: h, y: v }; if (h = A.x, v = A.y, l) { var N; return Object.assign({}, $, (N = {}, N[w] = y ? "0" : "", N[x] = g ? "0" : "", N.transform = (k.devicePixelRatio || 1) <= 1 ? "translate(" + h + "px, " + v + "px)" : "translate3d(" + h + "px, " + v + "px, 0)", N)); } return Object.assign({}, $, (t = {}, t[w] = y ? v + "px" : "", t[x] = g ? h + "px" : "", t.transform = "", t)); } function CHe(e) { var t = e.state, n = e.options, r = n.gpuAcceleration, a = r === void 0 ? !0 : r, o = n.adaptive, i = o === void 0 ? !0 : o, s = n.roundOffsets, l = s === void 0 ? !0 : s, u = { placement: ws(t.placement), variation: Jf(t.placement), popper: t.elements.popper, popperRect: t.rects.popper, gpuAcceleration: a, isFixed: t.options.strategy === "fixed" }; t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper, $9(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, $9(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 SH = { name: "computeStyles", enabled: !0, phase: "beforeWrite", fn: CHe, data: {} }, k1 = { passive: !0 }; function SHe(e) { var t = e.state, n = e.instance, r = e.options, a = r.scroll, o = a === void 0 ? !0 : a, i = r.resize, s = i === void 0 ? !0 : i, l = ts(t.elements.popper), u = [].concat(t.scrollParents.reference, t.scrollParents.popper); return o && u.forEach(function(c) { c.addEventListener("scroll", n.update, k1); }), s && l.addEventListener("resize", n.update, k1), function() { o && u.forEach(function(c) { c.removeEventListener("scroll", n.update, k1); }), s && l.removeEventListener("resize", n.update, k1); }; } var EH = { name: "eventListeners", enabled: !0, phase: "write", fn: function() { }, effect: SHe, data: {} }, EHe = { left: "right", right: "left", bottom: "top", top: "bottom" }; function xy(e) { return e.replace(/left|right|bottom|top/g, function(t) { return EHe[t]; }); } var _He = { start: "end", end: "start" }; function F9(e) { return e.replace(/start|end/g, function(t) { return _He[t]; }); } function jE(e) { var t = ts(e), n = t.pageXOffset, r = t.pageYOffset; return { scrollLeft: n, scrollTop: r }; } function HE(e) { return Qf(fc(e)).left + jE(e).scrollLeft; } function THe(e) { var t = ts(e), n = fc(e), r = t.visualViewport, a = n.clientWidth, o = n.clientHeight, i = 0, s = 0; return r && (a = r.width, o = r.height, /^((?!chrome|android).)*safari/i.test(navigator.userAgent) || (i = r.offsetLeft, s = r.offsetTop)), { width: a, height: o, x: i + HE(e), y: s }; } function OHe(e) { var t, n = fc(e), r = jE(e), a = (t = e.ownerDocument) == null ? void 0 : t.body, o = ud(n.scrollWidth, n.clientWidth, a ? a.scrollWidth : 0, a ? a.clientWidth : 0), i = ud(n.scrollHeight, n.clientHeight, a ? a.scrollHeight : 0, a ? a.clientHeight : 0), s = -r.scrollLeft + HE(e), l = -r.scrollTop; return Cl(a || n).direction === "rtl" && (s += ud(n.clientWidth, a ? a.clientWidth : 0) - o), { width: o, height: i, x: s, y: l }; } function UE(e) { var t = Cl(e), n = t.overflow, r = t.overflowX, a = t.overflowY; return /auto|scroll|overlay|hidden/.test(n + a + r); } function _H(e) { return ["html", "body", "#document"].indexOf(As(e)) >= 0 ? e.ownerDocument.body : ei(e) && UE(e) ? e : _H(qw(e)); } function n0(e, t) { var n; t === void 0 && (t = []); var r = _H(e), a = r === ((n = e.ownerDocument) == null ? void 0 : n.body), o = ts(r), i = a ? [o].concat(o.visualViewport || [], UE(r) ? r : []) : r, s = t.concat(i); return a ? s : s.concat(n0(qw(i))); } function Y5(e) { return Object.assign({}, e, { left: e.x, top: e.y, right: e.x + e.width, bottom: e.y + e.height }); } function $He(e) { var t = Qf(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 A9(e, t) { return t === yH ? Y5(THe(e)) : Yf(t) ? $He(t) : Y5(OHe(fc(e))); } function FHe(e) { var t = n0(qw(e)), n = ["absolute", "fixed"].indexOf(Cl(e).position) >= 0, r = n && ei(e) ? cm(e) : e; return Yf(r) ? t.filter(function(a) { return Yf(a) && wH(a, r) && As(a) !== "body"; }) : []; } function AHe(e, t, n) { var r = t === "clippingParents" ? FHe(e) : [].concat(t), a = [].concat(r, [n]), o = a[0], i = a.reduce(function(s, l) { var u = A9(e, l); return s.top = ud(u.top, s.top), s.right = Mb(u.right, s.right), s.bottom = Mb(u.bottom, s.bottom), s.left = ud(u.left, s.left), s; }, A9(e, o)); return i.width = i.right - i.left, i.height = i.bottom - i.top, i.x = i.left, i.y = i.top, i; } function TH(e) { var t = e.reference, n = e.element, r = e.placement, a = r ? ws(r) : null, o = r ? Jf(r) : null, i = t.x + t.width / 2 - n.width / 2, s = t.y + t.height / 2 - n.height / 2, l; switch (a) { case mo: l = { x: i, y: t.y - n.height }; break; case fi: l = { x: i, y: t.y + t.height }; break; case hi: l = { x: t.x + t.width, y: s }; break; case yo: l = { x: t.x - n.width, y: s }; break; default: l = { x: t.x, y: t.y }; } var u = a ? VE(a) : null; if (u != null) { var c = u === "y" ? "height" : "width"; switch (o) { case Xf: l[u] = l[u] - (t[c] / 2 - n[c] / 2); break; case Q0: l[u] = l[u] + (t[c] / 2 - n[c] / 2); break; } } return l; } function J0(e, t) { t === void 0 && (t = {}); var n = t, r = n.placement, a = r === void 0 ? e.placement : r, o = n.boundary, i = o === void 0 ? eHe : o, s = n.rootBoundary, l = s === void 0 ? yH : s, u = n.elementContext, c = u === void 0 ? gv : u, d = n.altBoundary, f = d === void 0 ? !1 : d, h = n.padding, p = h === void 0 ? 0 : h, v = kH(typeof p != "number" ? p : CH(p, um)), m = c === gv ? tHe : gv, g = e.rects.popper, y = e.elements[f ? m : c], x = AHe(Yf(y) ? y : y.contextElement || fc(e.elements.popper), i, l), w = Qf(e.elements.reference), k = TH({ reference: w, element: g, strategy: "absolute", placement: a }), C = Y5(Object.assign({}, g, k)), S = c === gv ? C : w, _ = { top: x.top - S.top + v.top, bottom: S.bottom - x.bottom + v.bottom, left: x.left - S.left + v.left, right: S.right - x.right + v.right }, T = e.modifiersData.offset; if (c === gv && T) { var O = T[a]; Object.keys(_).forEach(function($) { var A = [hi, fi].indexOf($) >= 0 ? 1 : -1, N = [mo, fi].indexOf($) >= 0 ? "y" : "x"; _[$] += O[N] * A; }); } return _; } function IHe(e, t) { t === void 0 && (t = {}); var n = t, r = n.placement, a = n.boundary, o = n.rootBoundary, i = n.padding, s = n.flipVariations, l = n.allowedAutoPlacements, u = l === void 0 ? Uw : l, c = Jf(r), d = c ? s ? T9 : T9.filter(function(p) { return Jf(p) === c; }) : um, f = d.filter(function(p) { return u.indexOf(p) >= 0; }); f.length === 0 && (f = d); var h = f.reduce(function(p, v) { return p[v] = J0(e, { placement: v, boundary: a, rootBoundary: o, padding: i })[ws(v)], p; }, {}); return Object.keys(h).sort(function(p, v) { return h[p] - h[v]; }); } function PHe(e) { if (ws(e) === DE) return []; var t = xy(e); return [F9(e), t, F9(t)]; } function LHe(e) { var t = e.state, n = e.options, r = e.name; if (!t.modifiersData[r]._skip) { for (var a = n.mainAxis, o = a === void 0 ? !0 : a, i = n.altAxis, s = i === void 0 ? !0 : i, l = n.fallbackPlacements, u = n.padding, c = n.boundary, d = n.rootBoundary, f = n.altBoundary, h = n.flipVariations, p = h === void 0 ? !0 : h, v = n.allowedAutoPlacements, m = t.options.placement, g = ws(m), y = g === m, x = l || (y || !p ? [xy(m)] : PHe(m)), w = [m].concat(x).reduce(function(ve, ge) { return ve.concat(ws(ge) === DE ? IHe(t, { placement: ge, boundary: c, rootBoundary: d, padding: u, flipVariations: p, allowedAutoPlacements: v }) : ge); }, []), k = t.rects.reference, C = t.rects.popper, S = /* @__PURE__ */ new Map(), _ = !0, T = w[0], O = 0; O < w.length; O++) { var $ = w[O], A = ws($), N = Jf($) === Xf, L = [mo, fi].indexOf(A) >= 0, R = L ? "width" : "height", P = J0(t, { placement: $, boundary: c, rootBoundary: d, altBoundary: f, padding: u }), B = L ? N ? hi : yo : N ? fi : mo; k[R] > C[R] && (B = xy(B)); var M = xy(B), z = []; if (o && z.push(P[A] <= 0), s && z.push(P[B] <= 0, P[M] <= 0), z.every(function(ve) { return ve; })) { T = $, _ = !1; break; } S.set($, z); } if (_) for (var Z = p ? 3 : 1, G = function(ve) { var ge = w.find(function(oe) { var ee = S.get(oe); if (ee) return ee.slice(0, ve).every(function(q) { return q; }); }); if (ge) return T = ge, "break"; }, J = Z; J > 0; J--) { var se = G(J); if (se === "break") break; } t.placement !== T && (t.modifiersData[r]._skip = !0, t.placement = T, t.reset = !0); } } var NHe = { name: "flip", enabled: !0, phase: "main", fn: LHe, requiresIfExists: ["offset"], data: { _skip: !1 } }; function I9(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 P9(e) { return [mo, hi, fi, yo].some(function(t) { return e[t] >= 0; }); } function MHe(e) { var t = e.state, n = e.name, r = t.rects.reference, a = t.rects.popper, o = t.modifiersData.preventOverflow, i = J0(t, { elementContext: "reference" }), s = J0(t, { altBoundary: !0 }), l = I9(i, r), u = I9(s, a, o), c = P9(l), d = P9(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 BHe = { name: "hide", enabled: !0, phase: "main", requiresIfExists: ["preventOverflow"], fn: MHe }; function DHe(e, t, n) { var r = ws(e), a = [yo, mo].indexOf(r) >= 0 ? -1 : 1, o = typeof n == "function" ? n(Object.assign({}, t, { placement: e })) : n, i = o[0], s = o[1]; return i = i || 0, s = (s || 0) * a, [yo, hi].indexOf(r) >= 0 ? { x: s, y: i } : { x: i, y: s }; } function RHe(e) { var t = e.state, n = e.options, r = e.name, a = n.offset, o = a === void 0 ? [0, 0] : a, i = Uw.reduce(function(c, d) { return c[d] = DHe(d, t.rects, o), 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 zHe = { name: "offset", enabled: !0, phase: "main", requires: ["popperOffsets"], fn: RHe }; function VHe(e) { var t = e.state, n = e.name; t.modifiersData[n] = TH({ reference: t.rects.reference, element: t.rects.popper, strategy: "absolute", placement: t.placement }); } var OH = { name: "popperOffsets", enabled: !0, phase: "read", fn: VHe, data: {} }; function jHe(e) { return e === "x" ? "y" : "x"; } function HHe(e) { var t = e.state, n = e.options, r = e.name, a = n.mainAxis, o = a === void 0 ? !0 : a, i = n.altAxis, s = i === void 0 ? !1 : i, l = n.boundary, u = n.rootBoundary, c = n.altBoundary, d = n.padding, f = n.tether, h = f === void 0 ? !0 : f, p = n.tetherOffset, v = p === void 0 ? 0 : p, m = J0(t, { boundary: l, rootBoundary: u, padding: d, altBoundary: c }), g = ws(t.placement), y = Jf(t.placement), x = !y, w = VE(g), k = jHe(w), C = t.modifiersData.popperOffsets, S = t.rects.reference, _ = t.rects.popper, T = typeof v == "function" ? v(Object.assign({}, t.rects, { placement: t.placement })) : v, O = typeof T == "number" ? { mainAxis: T, altAxis: T } : Object.assign({ mainAxis: 0, altAxis: 0 }, T), $ = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, A = { x: 0, y: 0 }; if (C) { if (o) { var N, L = w === "y" ? mo : yo, R = w === "y" ? fi : hi, P = w === "y" ? "height" : "width", B = C[w], M = B + m[L], z = B - m[R], Z = h ? -_[P] / 2 : 0, G = y === Xf ? S[P] : _[P], J = y === Xf ? -_[P] : -S[P], se = t.elements.arrow, ve = h && se ? zE(se) : { width: 0, height: 0 }, ge = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : xH(), oe = ge[L], ee = ge[R], q = t0(0, S[P], ve[P]), Y = x ? S[P] / 2 - Z - q - oe - O.mainAxis : G - q - oe - O.mainAxis, te = x ? -S[P] / 2 + Z + q + ee + O.mainAxis : J + q + ee + O.mainAxis, we = t.elements.arrow && cm(t.elements.arrow), Oe = we ? w === "y" ? we.clientTop || 0 : we.clientLeft || 0 : 0, Ne = (N = $ == null ? void 0 : $[w]) != null ? N : 0, xe = B + Y - Ne - Oe, $e = B + te - Ne, Se = t0(h ? Mb(M, xe) : M, B, h ? ud(z, $e) : z); C[w] = Se, A[w] = Se - B; } if (s) { var Pe, Me = w === "x" ? mo : yo, je = w === "x" ? fi : hi, Be = C[k], We = k === "y" ? "height" : "width", qe = Be + m[Me], Ge = Be - m[je], E = [mo, yo].indexOf(g) !== -1, V = (Pe = $ == null ? void 0 : $[k]) != null ? Pe : 0, ie = E ? qe : Be - S[We] - _[We] - V + O.altAxis, le = E ? Be + S[We] + _[We] - V - O.altAxis : Ge, re = h && E ? gHe(ie, Be, le) : t0(h ? ie : qe, Be, h ? le : Ge); C[k] = re, A[k] = re - Be; } t.modifiersData[r] = A; } } var UHe = { name: "preventOverflow", enabled: !0, phase: "main", fn: HHe, requiresIfExists: ["offset"] }; function qHe(e) { return { scrollLeft: e.scrollLeft, scrollTop: e.scrollTop }; } function WHe(e) { return e === ts(e) || !ei(e) ? jE(e) : qHe(e); } function KHe(e) { var t = e.getBoundingClientRect(), n = Zf(t.width) / e.offsetWidth || 1, r = Zf(t.height) / e.offsetHeight || 1; return n !== 1 || r !== 1; } function GHe(e, t, n) { n === void 0 && (n = !1); var r = ei(t), a = ei(t) && KHe(t), o = fc(t), i = Qf(e, a), s = { scrollLeft: 0, scrollTop: 0 }, l = { x: 0, y: 0 }; return (r || !r && !n) && ((As(t) !== "body" || UE(o)) && (s = WHe(t)), ei(t) ? (l = Qf(t, !0), l.x += t.clientLeft, l.y += t.clientTop) : o && (l.x = HE(o))), { x: i.left + s.scrollLeft - l.x, y: i.top + s.scrollTop - l.y, width: i.width, height: i.height }; } function XHe(e) { var t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set(), r = []; e.forEach(function(o) { t.set(o.name, o); }); function a(o) { n.add(o.name); var i = [].concat(o.requires || [], o.requiresIfExists || []); i.forEach(function(s) { if (!n.has(s)) { var l = t.get(s); l && a(l); } }), r.push(o); } return e.forEach(function(o) { n.has(o.name) || a(o); }), r; } function YHe(e) { var t = XHe(e); return dHe.reduce(function(n, r) { return n.concat(t.filter(function(a) { return a.phase === r; })); }, []); } function ZHe(e) { var t; return function() { return t || (t = new Promise(function(n) { Promise.resolve().then(function() { t = void 0, n(e()); }); })), t; }; } function QHe(e) { var t = e.reduce(function(n, r) { var a = n[r.name]; return n[r.name] = a ? Object.assign({}, a, r, { options: Object.assign({}, a.options, r.options), data: Object.assign({}, a.data, r.data) }) : r, n; }, {}); return Object.keys(t).map(function(n) { return t[n]; }); } var L9 = { placement: "bottom", modifiers: [], strategy: "absolute" }; function N9() { 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 qE(e) { e === void 0 && (e = {}); var t = e, n = t.defaultModifiers, r = n === void 0 ? [] : n, a = t.defaultOptions, o = a === void 0 ? L9 : a; return function(i, s, l) { l === void 0 && (l = o); var u = { placement: "bottom", orderedModifiers: [], options: Object.assign({}, L9, o), modifiersData: {}, elements: { reference: i, popper: s }, attributes: {}, styles: {} }, c = [], d = !1, f = { state: u, setOptions: function(v) { var m = typeof v == "function" ? v(u.options) : v; p(), u.options = Object.assign({}, o, u.options, m), u.scrollParents = { reference: Yf(i) ? n0(i) : i.contextElement ? n0(i.contextElement) : [], popper: n0(s) }; var g = YHe(QHe([].concat(r, u.options.modifiers))); return u.orderedModifiers = g.filter(function(y) { return y.enabled; }), h(), f.update(); }, forceUpdate: function() { if (!d) { var v = u.elements, m = v.reference, g = v.popper; if (N9(m, g)) { u.rects = { reference: GHe(m, cm(g), u.options.strategy === "fixed"), popper: zE(g) }, u.reset = !1, u.placement = u.options.placement, u.orderedModifiers.forEach(function(_) { return u.modifiersData[_.name] = Object.assign({}, _.data); }); for (var y = 0; y < u.orderedModifiers.length; y++) { if (u.reset === !0) { u.reset = !1, y = -1; continue; } var x = u.orderedModifiers[y], w = x.fn, k = x.options, C = k === void 0 ? {} : k, S = x.name; typeof w == "function" && (u = w({ state: u, options: C, name: S, instance: f }) || u); } } } }, update: ZHe(function() { return new Promise(function(v) { f.forceUpdate(), v(u); }); }), destroy: function() { p(), d = !0; } }; if (!N9(i, s)) return f; f.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, y = g === void 0 ? {} : g, x = v.effect; if (typeof x == "function") { var w = x({ state: u, name: m, instance: f, options: y }), k = function() { }; c.push(w || k); } }); } function p() { c.forEach(function(v) { return v(); }), c = []; } return f; }; } qE(); var JHe = [EH, OH, SH, bH]; qE({ defaultModifiers: JHe }); var eUe = [EH, OH, SH, bH, zHe, NHe, UHe, wHe, BHe], tUe = qE({ defaultModifiers: eUe }); const nUe = (e, t, n = {}) => { const r = { name: "updateState", enabled: !0, phase: "write", fn: ({ state: l }) => { const u = rUe(l); Object.assign(i.value, u); }, requires: ["computeStyles"] }, a = F(() => { const { onFirstUpdate: l, placement: u, strategy: c, modifiers: d } = b(n); return { onFirstUpdate: l, placement: u || "bottom", strategy: c || "absolute", modifiers: [ ...d || [], r, { name: "applyStyles", enabled: !1 } ] }; }), o = dn(), i = U({ styles: { popper: { position: b(a).strategy, left: "0", top: "0" }, arrow: { position: "absolute" } }, attributes: {} }), s = () => { o.value && (o.value.destroy(), o.value = void 0); }; return be(a, (l) => { const u = b(o); u && u.setOptions(l); }, { deep: !0 }), be([e, t], ([l, u]) => { s(), !(!l || !u) && (o.value = tUe(l, u, b(a))); }), kt(() => { s(); }), { state: F(() => { var l; return { ...((l = b(o)) == null ? void 0 : l.state) || {} }; }), styles: F(() => b(i).styles), attributes: F(() => b(i).attributes), update: () => { var l; return (l = b(o)) == null ? void 0 : l.update(); }, forceUpdate: () => { var l; return (l = b(o)) == null ? void 0 : l.forceUpdate(); }, instanceRef: F(() => b(o)) }; }; function rUe(e) { const t = Object.keys(e.elements), n = Ib(t.map((a) => [a, e.styles[a] || {}])), r = Ib(t.map((a) => [a, e.attributes[a]])); return { styles: n, attributes: r }; } function M9() { let e; const t = (r, a) => { n(), e = window.setTimeout(r, a); }, n = () => window.clearTimeout(e); return Mw(() => n()), { registerTimeout: t, cancelTimeout: n }; } const Z5 = { prefix: Math.floor(Math.random() * 1e4), current: 0 }, aUe = Symbol("elIdInjection"), $H = () => tt() ? Te(aUe, Z5) : Z5, Ww = (e) => { const t = $H(); !br && t === Z5 && wr("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 F(() => b(e) || `${n.value}-id-${t.prefix}-${t.current++}`); }; let Wp = []; const B9 = (e) => { const t = e; t.key === Ar.esc && Wp.forEach((n) => n(t)); }, oUe = (e) => { nt(() => { Wp.length === 0 && document.addEventListener("keydown", B9), br && Wp.push(e); }), kt(() => { Wp = Wp.filter((t) => t !== e), Wp.length === 0 && br && document.removeEventListener("keydown", B9); }); }; let D9; const FH = () => { const e = BE(), t = $H(), n = F(() => `${e.value}-popper-container-${t.prefix}`), r = F(() => `#${n.value}`); return { id: n, selector: r }; }, iUe = (e) => { const t = document.createElement("div"); return t.id = e, document.body.appendChild(t), t; }, sUe = () => { const { id: e, selector: t } = FH(); return gg(() => { br && (process.env.NODE_ENV === "test" || !D9 || !document.body.querySelector(t.value)) && (D9 = iUe(e.value)); }), { id: e, selector: t }; }, lUe = Ln({ showAfter: { type: Number, default: 0 }, hideAfter: { type: Number, default: 200 }, autoClose: { type: Number, default: 0 } }), uUe = ({ showAfter: e, hideAfter: t, autoClose: n, open: r, close: a }) => { const { registerTimeout: o } = M9(), { registerTimeout: i, cancelTimeout: s } = M9(); return { onOpen: (l) => { o(() => { r(l); const u = b(n); oa(u) && u > 0 && i(() => { a(l); }, u); }, b(e)); }, onClose: (l) => { s(), o(() => { a(l); }, b(t)); } }; }, AH = Symbol("elForwardRef"), cUe = (e) => { rt(AH, { setForwardRef: (t) => { e.value = t; } }); }, dUe = (e) => ({ mounted(t) { e(t); }, updated(t) { e(t); }, unmounted() { e(null); } }), R9 = { current: 0 }, z9 = U(0), IH = 2e3, V9 = Symbol("elZIndexContextKey"), PH = Symbol("zIndexContextKey"), LH = (e) => { const t = tt() ? Te(V9, R9) : R9, n = e || (tt() ? Te(PH, void 0) : void 0), r = F(() => { const i = b(n); return oa(i) ? i : IH; }), a = F(() => r.value + z9.value), o = () => (t.current++, z9.value = t.current, a.value); return !br && !Te(V9) && wr("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: a, nextZIndex: o }; }; function pUe(e) { let t; function n() { if (e.value == null) return; const { selectionStart: a, selectionEnd: o, value: i } = e.value; if (a == null || o == null) return; const s = i.slice(0, Math.max(0, a)), l = i.slice(Math.max(0, o)); t = { selectionStart: a, selectionEnd: o, value: i, beforeTxt: s, afterTxt: l }; } function r() { if (e.value == null || t == null) return; const { value: a } = e.value, { beforeTxt: o, afterTxt: i, selectionStart: s } = t; if (o == null || i == null || s == null) return; let l = a.length; if (a.endsWith(i)) l = a.length - i.length; else if (a.startsWith(o)) l = o.length; else { const u = o[s - 1], c = a.indexOf(u, s - 1); c !== -1 && (l = c + 1); } e.value.setSelectionRange(l, l); } return [n, r]; } const Ih = Hw({ type: String, values: hH, required: !1 }), NH = Symbol("size"), fUe = () => { const e = Te(NH, {}); return F(() => b(e.size) || ""); }; function WE(e, { beforeFocus: t, afterFocus: n, beforeBlur: r, afterBlur: a } = {}) { const o = tt(), { emit: i } = o, s = dn(), l = U(!1), u = (f) => { Ua(t) && t(f) || l.value || (l.value = !0, i("focus", f), n == null || n()); }, c = (f) => { var h; Ua(r) && r(f) || f.relatedTarget && (h = s.value) != null && h.contains(f.relatedTarget) || (l.value = !1, i("blur", f), a == null || a()); }, d = () => { var f, h; (f = s.value) != null && f.contains(document.activeElement) && s.value !== document.activeElement || (h = e.value) == null || h.focus(); }; return be(s, (f) => { f && f.setAttribute("tabindex", "-1"); }), Ko(s, "focus", u, !0), Ko(s, "blur", c, !0), Ko(s, "click", d, !0), process.env.NODE_ENV === "test" && nt(() => { const f = sd(e.value) ? e.value : document.querySelector("input,textarea"); f && (Ko(f, "focus", u, !0), Ko(f, "blur", c, !0)); }), { isFocused: l, wrapperRef: s, handleFocus: u, handleBlur: c }; } function MH({ afterComposition: e, emit: t }) { const n = U(!1), r = (i) => { t == null || t("compositionstart", i), n.value = !0; }, a = (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 = !jje(u); }, o = (i) => { t == null || t("compositionend", i), n.value && (n.value = !1, Ue(() => e(i))); }; return { isComposing: n, handleComposition: (i) => { i.type === "compositionend" ? o(i) : a(i); }, handleCompositionStart: r, handleCompositionUpdate: a, handleCompositionEnd: o }; } const BH = Symbol("emptyValuesContextKey"), hUe = "use-empty-values", vUe = ["", void 0, null], gUe = void 0, mUe = Ln({ emptyValues: Array, valueOnClear: { type: [String, Number, Boolean, Function], default: void 0, validator: (e) => Ua(e) ? !e() : !e } }), yUe = (e, t) => { const n = tt() ? Te(BH, U({})) : U({}), r = F(() => e.emptyValues || n.value.emptyValues || vUe), a = F(() => Ua(e.valueOnClear) ? e.valueOnClear() : e.valueOnClear !== void 0 ? e.valueOnClear : Ua(n.value.valueOnClear) ? n.value.valueOnClear() : n.value.valueOnClear !== void 0 ? n.value.valueOnClear : gUe), o = (i) => r.value.includes(i); return r.value.includes(a.value) || wr(hUe, "value-on-clear should be a value of empty-values"), { emptyValues: r, valueOnClear: a, isEmptyValue: o }; }, bUe = Ln({ ariaLabel: String, ariaOrientation: { type: String, values: ["horizontal", "vertical", "undefined"] }, ariaControls: String }), hc = (e) => uH(bUe, e), DH = Symbol(), Bb = U(); function KE(e, t = void 0) { const n = tt() ? Te(DH, Bb) : Bb; return e ? F(() => { var r, a; return (a = (r = n.value) == null ? void 0 : r[e]) != null ? a : t; }) : n; } function wUe(e, t) { const n = KE(), r = Wt(e, F(() => { var s; return ((s = n.value) == null ? void 0 : s.namespace) || wy; })), a = lm(F(() => { var s; return (s = n.value) == null ? void 0 : s.locale; })), o = LH(F(() => { var s; return ((s = n.value) == null ? void 0 : s.zIndex) || IH; })), i = F(() => { var s; return b(t) || ((s = n.value) == null ? void 0 : s.size) || ""; }); return xUe(F(() => b(n) || {})), { ns: r, locale: a, zIndex: o, size: i }; } const xUe = (e, t, n = !1) => { var r; const a = !!tt(), o = a ? KE() : void 0, i = (r = void 0) != null ? r : a ? rt : void 0; if (!i) { wr("provideGlobalConfig", "provideGlobalConfig() can only be used inside setup()."); return; } const s = F(() => { const l = b(e); return o != null && o.value ? kUe(o.value, l) : l; }); return i(DH, s), i(vH, F(() => s.value.locale)), i(gH, F(() => s.value.namespace)), i(PH, F(() => s.value.zIndex)), i(NH, { size: F(() => s.value.size || "") }), i(BH, F(() => ({ emptyValues: s.value.emptyValues, valueOnClear: s.value.valueOnClear }))), (n || !Bb.value) && (Bb.value = s.value), s; }, kUe = (e, t) => { const n = [.../* @__PURE__ */ new Set([..._9(e), ..._9(t)])], r = {}; for (const a of n) r[a] = t[a] !== void 0 ? t[a] : e[a]; return r; }; var Ut = (e, t) => { const n = e.__vccOpts || e; for (const [r, a] of t) n[r] = a; return n; }; const CUe = Ln({ size: { type: $t([Number, String]) }, color: { type: String } }), SUe = X({ name: "ElIcon", inheritAttrs: !1 }), EUe = /* @__PURE__ */ X({ ...SUe, props: CUe, setup(e) { const t = e, n = Wt("icon"), r = F(() => { const { size: a, color: o } = t; return !a && !o ? {} : { fontSize: Ou(a) ? void 0 : Gf(a), "--color": o }; }); return (a, o) => (I(), j("i", Bt({ class: b(n).b(), style: b(r) }, a.$attrs), [ he(a.$slots, "default") ], 16)); } }); var _Ue = /* @__PURE__ */ Ut(EUe, [["__file", "icon.vue"]]); const Sa = Yr(_Ue), GE = Symbol("formContextKey"), eg = Symbol("formItemContextKey"), Id = (e, t = {}) => { const n = U(void 0), r = t.prop ? n : mH("size"), a = t.global ? n : fUe(), o = t.form ? { size: void 0 } : Te(GE, void 0), i = t.formItem ? { size: void 0 } : Te(eg, void 0); return F(() => r.value || b(e) || (i == null ? void 0 : i.size) || (o == null ? void 0 : o.size) || a.value || ""); }, dm = (e) => { const t = mH("disabled"), n = Te(GE, void 0); return F(() => t.value || b(e) || (n == null ? void 0 : n.disabled) || !1); }, up = () => { const e = Te(GE, void 0), t = Te(eg, void 0); return { form: e, formItem: t }; }, pm = (e, { formItemContext: t, disableIdGeneration: n, disableIdManagement: r }) => { n || (n = U(!1)), r || (r = U(!1)); const a = U(); let o; const i = F(() => { var s; return !!(!(e.label || e.ariaLabel) && t && t.inputIds && ((s = t.inputIds) == null ? void 0 : s.length) <= 1); }); return nt(() => { o = be([It(e, "id"), n], ([s, l]) => { const u = s ?? (l ? void 0 : Ww().value); u !== a.value && (t != null && t.removeInputId && (a.value && t.removeInputId(a.value), !(r != null && r.value) && !l && u && t.addInputId(u)), a.value = u); }, { immediate: !0 }); }), Yb(() => { o && o(), t != null && t.removeInputId && a.value && t.removeInputId(a.value); }), { isLabeledByFormItem: i, inputId: a }; }; let wi; const TUe = ` height:0 !important; visibility:hidden !important; ${oRe() ? "" : "overflow:hidden !important;"} position:absolute !important; z-index:-1000 !important; top:0 !important; right:0 !important; `, OUe = [ "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 $Ue(e) { const t = window.getComputedStyle(e), n = t.getPropertyValue("box-sizing"), r = Number.parseFloat(t.getPropertyValue("padding-bottom")) + Number.parseFloat(t.getPropertyValue("padding-top")), a = Number.parseFloat(t.getPropertyValue("border-bottom-width")) + Number.parseFloat(t.getPropertyValue("border-top-width")); return { contextStyle: OUe.map((o) => `${o}:${t.getPropertyValue(o)}`).join(";"), paddingSize: r, borderSize: a, boxSizing: n }; } function j9(e, t = 1, n) { var r; wi || (wi = document.createElement("textarea"), document.body.appendChild(wi)); const { paddingSize: a, borderSize: o, boxSizing: i, contextStyle: s } = $Ue(e); wi.setAttribute("style", `${s};${TUe}`), wi.value = e.value || e.placeholder || ""; let l = wi.scrollHeight; const u = {}; i === "border-box" ? l = l + o : i === "content-box" && (l = l - a), wi.value = ""; const c = wi.scrollHeight - a; if (oa(t)) { let d = c * t; i === "border-box" && (d = d + a + o), l = Math.max(d, l), u.minHeight = `${d}px`; } if (oa(n)) { let d = c * n; i === "border-box" && (d = d + a + o), l = Math.min(d, l); } return u.height = `${l}px`, (r = wi.parentNode) == null || r.removeChild(wi), wi = void 0, u; } const FUe = Ln({ id: { type: String, default: void 0 }, size: Ih, disabled: Boolean, modelValue: { type: $t([ 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: $t([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: Qu }, prefixIcon: { type: Qu }, containerRole: { type: String, default: void 0 }, tabindex: { type: [String, Number], default: 0 }, validateEvent: { type: Boolean, default: !0 }, inputStyle: { type: $t([Object, Array, String]), default: () => qp({}) }, autofocus: Boolean, rows: { type: Number, default: 2 }, ...hc(["ariaLabel"]) }), AUe = { [ea]: (e) => Ta(e), input: (e) => Ta(e), change: (e) => Ta(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 }, IUe = X({ name: "ElInput", inheritAttrs: !1 }), PUe = /* @__PURE__ */ X({ ...IUe, props: FUe, emits: AUe, setup(e, { expose: t, emit: n }) { const r = e, a = oh(), o = Cr(), i = F(() => { const E = {}; return r.containerRole === "combobox" && (E["aria-haspopup"] = a["aria-haspopup"], E["aria-owns"] = a["aria-owns"], E["aria-expanded"] = a["aria-expanded"]), E; }), s = F(() => [ r.type === "textarea" ? m.b() : v.b(), v.m(h.value), v.is("disabled", p.value), v.is("exceed", se.value), { [v.b("group")]: o.prepend || o.append, [v.m("prefix")]: o.prefix || r.prefixIcon, [v.m("suffix")]: o.suffix || r.suffixIcon || r.clearable || r.showPassword, [v.bm("suffix", "password-clear")]: z.value && Z.value, [v.b("hidden")]: r.type === "hidden" }, a.class ]), l = F(() => [ v.e("wrapper"), v.is("focus", T.value) ]), u = qje({ excludeKeys: F(() => Object.keys(i.value)) }), { form: c, formItem: d } = up(), { inputId: f } = pm(r, { formItemContext: d }), h = Id(), p = dm(), v = Wt("input"), m = Wt("textarea"), g = dn(), y = dn(), x = U(!1), w = U(!1), k = U(), C = dn(r.inputStyle), S = F(() => g.value || y.value), { wrapperRef: _, isFocused: T, handleFocus: O, handleBlur: $ } = WE(S, { beforeFocus() { return p.value; }, afterBlur() { var E; r.validateEvent && ((E = d == null ? void 0 : d.validate) == null || E.call(d, "blur").catch((V) => wr(V))); } }), A = F(() => { var E; return (E = c == null ? void 0 : c.statusIcon) != null ? E : !1; }), N = F(() => (d == null ? void 0 : d.validateState) || ""), L = F(() => N.value && fH[N.value]), R = F(() => w.value ? Nje : Oje), P = F(() => [ a.style ]), B = F(() => [ r.inputStyle, C.value, { resize: r.resize } ]), M = F(() => Lu(r.modelValue) ? "" : String(r.modelValue)), z = F(() => r.clearable && !p.value && !r.readonly && !!M.value && (T.value || x.value)), Z = F(() => r.showPassword && !p.value && !r.readonly && !!M.value && (!!M.value || T.value)), G = F(() => r.showWordLimit && !!r.maxlength && (r.type === "text" || r.type === "textarea") && !p.value && !r.readonly && !r.showPassword), J = F(() => M.value.length), se = F(() => !!G.value && J.value > Number(r.maxlength)), ve = F(() => !!o.suffix || !!r.suffixIcon || z.value || r.showPassword || G.value || !!N.value && A.value), [ge, oe] = pUe(g); al(y, (E) => { if (q(), !G.value || r.resize !== "both") return; const V = E[0], { width: ie } = V.contentRect; k.value = { right: `calc(100% - ${ie + 15 + 6}px)` }; }); const ee = () => { const { type: E, autosize: V } = r; if (!(!br || E !== "textarea" || !y.value)) if (V) { const ie = aa(V) ? V.minRows : void 0, le = aa(V) ? V.maxRows : void 0, re = j9(y.value, ie, le); C.value = { overflowY: "hidden", ...re }, Ue(() => { y.value.offsetHeight, C.value = re; }); } else C.value = { minHeight: j9(y.value).minHeight }; }, q = /* @__PURE__ */ ((E) => { let V = !1; return () => { var ie; V || !r.autosize || ((ie = y.value) == null ? void 0 : ie.offsetParent) === null || (E(), V = !0); }; })(ee), Y = () => { const E = S.value, V = r.formatter ? r.formatter(M.value) : M.value; !E || E.value === V || (E.value = V); }, te = async (E) => { ge(); let { value: V } = E.target; if (r.formatter && (V = r.parser ? r.parser(V) : V), !Oe.value) { if (V === M.value) { Y(); return; } n(ea, V), n("input", V), await Ue(), Y(), oe(); } }, we = (E) => { n("change", E.target.value); }, { isComposing: Oe, handleCompositionStart: Ne, handleCompositionUpdate: xe, handleCompositionEnd: $e } = MH({ emit: n, afterComposition: te }), Se = () => { w.value = !w.value, Pe(); }, Pe = async () => { var E; await Ue(), (E = S.value) == null || E.focus(); }, Me = () => { var E; return (E = S.value) == null ? void 0 : E.blur(); }, je = (E) => { x.value = !1, n("mouseleave", E); }, Be = (E) => { x.value = !0, n("mouseenter", E); }, We = (E) => { n("keydown", E); }, qe = () => { var E; (E = S.value) == null || E.select(); }, Ge = () => { n(ea, ""), n("change", ""), n("clear"), n("input", ""); }; return be(() => r.modelValue, () => { var E; Ue(() => ee()), r.validateEvent && ((E = d == null ? void 0 : d.validate) == null || E.call(d, "change").catch((V) => wr(V))); }), be(M, () => Y()), be(() => r.type, async () => { await Ue(), Y(), ee(); }), nt(() => { !r.formatter && r.parser && wr("ElInput", "If you set the parser, you also need to set the formatter."), Y(), Ue(ee); }), t({ input: g, textarea: y, ref: S, textareaStyle: B, autosize: It(r, "autosize"), isComposing: Oe, focus: Pe, blur: Me, select: qe, clear: Ge, resizeTextarea: ee }), (E, V) => (I(), j("div", Bt(b(i), { class: [ b(s), { [b(v).bm("group", "append")]: E.$slots.append, [b(v).bm("group", "prepend")]: E.$slots.prepend } ], style: b(P), role: E.containerRole, onMouseenter: Be, onMouseleave: je }), [ ne(" input "), E.type !== "textarea" ? (I(), j(Qe, { key: 0 }, [ ne(" prepend slot "), E.$slots.prepend ? (I(), j("div", { key: 0, class: H(b(v).be("group", "prepend")) }, [ he(E.$slots, "prepend") ], 2)) : ne("v-if", !0), W("div", { ref_key: "wrapperRef", ref: _, class: H(b(l)) }, [ ne(" prefix slot "), E.$slots.prefix || E.prefixIcon ? (I(), j("span", { key: 0, class: H(b(v).e("prefix")) }, [ W("span", { class: H(b(v).e("prefix-inner")) }, [ he(E.$slots, "prefix"), E.prefixIcon ? (I(), de(b(Sa), { key: 0, class: H(b(v).e("icon")) }, { default: K(() => [ (I(), de(ct(E.prefixIcon))) ]), _: 1 }, 8, ["class"])) : ne("v-if", !0) ], 2) ], 2)) : ne("v-if", !0), W("input", Bt({ id: b(f), ref_key: "input", ref: g, class: b(v).e("inner") }, b(u), { minlength: E.minlength, maxlength: E.maxlength, type: E.showPassword ? w.value ? "text" : "password" : E.type, disabled: b(p), readonly: E.readonly, autocomplete: E.autocomplete, tabindex: E.tabindex, "aria-label": E.ariaLabel, placeholder: E.placeholder, style: E.inputStyle, form: E.form, autofocus: E.autofocus, onCompositionstart: b(Ne), onCompositionupdate: b(xe), onCompositionend: b($e), onInput: te, onChange: we, onKeydown: We }), null, 16, ["id", "minlength", "maxlength", "type", "disabled", "readonly", "autocomplete", "tabindex", "aria-label", "placeholder", "form", "autofocus", "onCompositionstart", "onCompositionupdate", "onCompositionend"]), ne(" suffix slot "), b(ve) ? (I(), j("span", { key: 1, class: H(b(v).e("suffix")) }, [ W("span", { class: H(b(v).e("suffix-inner")) }, [ !b(z) || !b(Z) || !b(G) ? (I(), j(Qe, { key: 0 }, [ he(E.$slots, "suffix"), E.suffixIcon ? (I(), de(b(Sa), { key: 0, class: H(b(v).e("icon")) }, { default: K(() => [ (I(), de(ct(E.suffixIcon))) ]), _: 1 }, 8, ["class"])) : ne("v-if", !0) ], 64)) : ne("v-if", !0), b(z) ? (I(), de(b(Sa), { key: 1, class: H([b(v).e("icon"), b(v).e("clear")]), onMousedown: Je(b(X0), ["prevent"]), onClick: Ge }, { default: K(() => [ ue(b(LE)) ]), _: 1 }, 8, ["class", "onMousedown"])) : ne("v-if", !0), b(Z) ? (I(), de(b(Sa), { key: 2, class: H([b(v).e("icon"), b(v).e("password")]), onClick: Se }, { default: K(() => [ (I(), de(ct(b(R)))) ]), _: 1 }, 8, ["class"])) : ne("v-if", !0), b(G) ? (I(), j("span", { key: 3, class: H(b(v).e("count")) }, [ W("span", { class: H(b(v).e("count-inner")) }, Fe(b(J)) + " / " + Fe(E.maxlength), 3) ], 2)) : ne("v-if", !0), b(N) && b(L) && b(A) ? (I(), de(b(Sa), { key: 4, class: H([ b(v).e("icon"), b(v).e("validateIcon"), b(v).is("loading", b(N) === "validating") ]) }, { default: K(() => [ (I(), de(ct(b(L)))) ]), _: 1 }, 8, ["class"])) : ne("v-if", !0) ], 2) ], 2)) : ne("v-if", !0) ], 2), ne(" append slot "), E.$slots.append ? (I(), j("div", { key: 1, class: H(b(v).be("group", "append")) }, [ he(E.$slots, "append") ], 2)) : ne("v-if", !0) ], 64)) : (I(), j(Qe, { key: 1 }, [ ne(" textarea "), W("textarea", Bt({ id: b(f), ref_key: "textarea", ref: y, class: [b(m).e("inner"), b(v).is("focus", b(T))] }, b(u), { minlength: E.minlength, maxlength: E.maxlength, tabindex: E.tabindex, disabled: b(p), readonly: E.readonly, autocomplete: E.autocomplete, style: b(B), "aria-label": E.ariaLabel, placeholder: E.placeholder, form: E.form, autofocus: E.autofocus, rows: E.rows, onCompositionstart: b(Ne), onCompositionupdate: b(xe), onCompositionend: b($e), onInput: te, onFocus: b(O), onBlur: b($), onChange: we, onKeydown: We }), null, 16, ["id", "minlength", "maxlength", "tabindex", "disabled", "readonly", "autocomplete", "aria-label", "placeholder", "form", "autofocus", "rows", "onCompositionstart", "onCompositionupdate", "onCompositionend", "onFocus", "onBlur"]), b(G) ? (I(), j("span", { key: 0, style: Ye(k.value), class: H(b(v).e("count")) }, Fe(b(J)) + " / " + Fe(E.maxlength), 7)) : ne("v-if", !0) ], 64)) ], 16, ["role"])); } }); var LUe = /* @__PURE__ */ Ut(PUe, [["__file", "input.vue"]]); const Kw = Yr(LUe), Fp = 4, NUe = { 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" } }, MUe = ({ move: e, size: t, bar: n }) => ({ [n.size]: t, transform: `translate${n.axis}(${e}%)` }), XE = Symbol("scrollbarContextKey"), BUe = Ln({ vertical: Boolean, size: String, move: Number, ratio: { type: Number, required: !0 }, always: Boolean }), DUe = "Thumb", RUe = /* @__PURE__ */ X({ __name: "thumb", props: BUe, setup(e) { const t = e, n = Te(XE), r = Wt("scrollbar"); n || oje(DUe, "can not inject scrollbar context"); const a = U(), o = U(), i = U({}), s = U(!1); let l = !1, u = !1, c = br ? document.onselectstart : null; const d = F(() => NUe[t.vertical ? "vertical" : "horizontal"]), f = F(() => MUe({ size: t.size, move: t.move, bar: d.value })), h = F(() => a.value[d.value.offset] ** 2 / n.wrapElement[d.value.scrollSize] / t.ratio / o.value[d.value.offset]), p = (C) => { var S; if (C.stopPropagation(), C.ctrlKey || [1, 2].includes(C.button)) return; (S = window.getSelection()) == null || S.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 (!o.value || !a.value || !n.wrapElement) return; const S = Math.abs(C.target.getBoundingClientRect()[d.value.direction] - C[d.value.client]), _ = o.value[d.value.offset] / 2, T = (S - _) * 100 * h.value / a.value[d.value.offset]; n.wrapElement[d.value.scroll] = T * n.wrapElement[d.value.scrollSize] / 100; }, m = (C) => { C.stopImmediatePropagation(), l = !0, document.addEventListener("mousemove", g), document.addEventListener("mouseup", y), c = document.onselectstart, document.onselectstart = () => !1; }, g = (C) => { if (!a.value || !o.value || l === !1) return; const S = i.value[d.value.axis]; if (!S) return; const _ = (a.value.getBoundingClientRect()[d.value.direction] - C[d.value.client]) * -1, T = o.value[d.value.offset] - S, O = (_ - T) * 100 * h.value / a.value[d.value.offset]; n.wrapElement[d.value.scroll] = O * n.wrapElement[d.value.scrollSize] / 100; }, y = () => { l = !1, i.value[d.value.axis] = 0, document.removeEventListener("mousemove", g), document.removeEventListener("mouseup", y), k(), u && (s.value = !1); }, x = () => { u = !1, s.value = !!t.size; }, w = () => { u = !0, s.value = l; }; kt(() => { k(), document.removeEventListener("mouseup", y); }); const k = () => { document.onselectstart !== c && (document.onselectstart = c); }; return Ko(It(n, "scrollbarElement"), "mousemove", x), Ko(It(n, "scrollbarElement"), "mouseleave", w), (C, S) => (I(), de(vr, { name: b(r).b("fade"), persisted: "" }, { default: K(() => [ Xe(W("div", { ref_key: "instance", ref: a, class: H([b(r).e("bar"), b(r).is(b(d).key)]), onMousedown: v }, [ W("div", { ref_key: "thumb", ref: o, class: H(b(r).e("thumb")), style: Ye(b(f)), onMousedown: p }, null, 38) ], 34), [ [mt, C.always || s.value] ]) ]), _: 1 }, 8, ["name"])); } }); var H9 = /* @__PURE__ */ Ut(RUe, [["__file", "thumb.vue"]]); const zUe = Ln({ always: { type: Boolean, default: !0 }, minSize: { type: Number, required: !0 } }), VUe = /* @__PURE__ */ X({ __name: "bar", props: zUe, setup(e, { expose: t }) { const n = e, r = Te(XE), a = U(0), o = U(0), i = U(""), s = U(""), l = U(1), u = U(1); return t({ handleScroll: (c) => { if (c) { const d = c.offsetHeight - Fp, f = c.offsetWidth - Fp; o.value = c.scrollTop * 100 / d * l.value, a.value = c.scrollLeft * 100 / f * u.value; } }, update: () => { const c = r == null ? void 0 : r.wrapElement; if (!c) return; const d = c.offsetHeight - Fp, f = c.offsetWidth - Fp, h = d ** 2 / c.scrollHeight, p = f ** 2 / c.scrollWidth, v = Math.max(h, n.minSize), m = Math.max(p, n.minSize); l.value = h / (d - h) / (v / (d - v)), u.value = p / (f - p) / (m / (f - m)), s.value = v + Fp < d ? `${v}px` : "", i.value = m + Fp < f ? `${m}px` : ""; } }), (c, d) => (I(), j(Qe, null, [ ue(H9, { move: a.value, ratio: u.value, size: i.value, always: c.always }, null, 8, ["move", "ratio", "size", "always"]), ue(H9, { move: o.value, ratio: l.value, size: s.value, vertical: "", always: c.always }, null, 8, ["move", "ratio", "size", "always"]) ], 64)); } }); var jUe = /* @__PURE__ */ Ut(VUe, [["__file", "bar.vue"]]); const HUe = Ln({ height: { type: [String, Number], default: "" }, maxHeight: { type: [String, Number], default: "" }, native: { type: Boolean, default: !1 }, wrapStyle: { type: $t([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, ...hc(["ariaLabel", "ariaOrientation"]) }), UUe = { scroll: ({ scrollTop: e, scrollLeft: t }) => [e, t].every(oa) }, Q5 = "ElScrollbar", qUe = X({ name: Q5 }), WUe = /* @__PURE__ */ X({ ...qUe, props: HUe, emits: UUe, setup(e, { expose: t, emit: n }) { const r = e, a = Wt("scrollbar"); let o, i, s = 0, l = 0; const u = U(), c = U(), d = U(), f = U(), h = F(() => { const k = {}; return r.height && (k.height = Gf(r.height)), r.maxHeight && (k.maxHeight = Gf(r.maxHeight)), [r.wrapStyle, k]; }), p = F(() => [ r.wrapClass, a.e("wrap"), { [a.em("wrap", "hidden-default")]: !r.native } ]), v = F(() => [a.e("view"), r.viewClass]), m = () => { var k; c.value && ((k = f.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) { aa(k) ? c.value.scrollTo(k) : oa(k) && oa(C) && c.value.scrollTo(k, C); } const y = (k) => { if (!oa(k)) { wr(Q5, "value must be a number"); return; } c.value.scrollTop = k; }, x = (k) => { if (!oa(k)) { wr(Q5, "value must be a number"); return; } c.value.scrollLeft = k; }, w = () => { var k; (k = f.value) == null || k.update(); }; return be(() => r.noresize, (k) => { k ? (o == null || o(), i == null || i()) : ({ stop: o } = al(d, w), i = Ko("resize", w)); }, { immediate: !0 }), be(() => [r.maxHeight, r.height], () => { r.native || Ue(() => { var k; w(), c.value && ((k = f.value) == null || k.handleScroll(c.value)); }); }), rt(XE, tn({ scrollbarElement: u, wrapElement: c })), Zb(() => { c.value && (c.value.scrollTop = s, c.value.scrollLeft = l); }), nt(() => { r.native || Ue(() => { w(); }); }), jd(() => w()), t({ wrapRef: c, update: w, scrollTo: g, setScrollTop: y, setScrollLeft: x, handleScroll: m }), (k, C) => (I(), j("div", { ref_key: "scrollbarRef", ref: u, class: H(b(a).b()) }, [ W("div", { ref_key: "wrapRef", ref: c, class: H(b(p)), style: Ye(b(h)), tabindex: k.tabindex, onScroll: m }, [ (I(), de(ct(k.tag), { id: k.id, ref_key: "resizeRef", ref: d, class: H(b(v)), style: Ye(k.viewStyle), role: k.role, "aria-label": k.ariaLabel, "aria-orientation": k.ariaOrientation }, { default: K(() => [ he(k.$slots, "default") ]), _: 3 }, 8, ["id", "class", "style", "role", "aria-label", "aria-orientation"])) ], 46, ["tabindex"]), k.native ? ne("v-if", !0) : (I(), de(jUe, { key: 0, ref_key: "barRef", ref: f, always: k.always, "min-size": k.minSize }, null, 8, ["always", "min-size"])) ], 2)); } }); var KUe = /* @__PURE__ */ Ut(WUe, [["__file", "scrollbar.vue"]]); const GUe = Yr(KUe), YE = Symbol("popper"), RH = Symbol("popperContent"), XUe = [ "dialog", "grid", "group", "listbox", "menu", "navigation", "tooltip", "tree" ], zH = Ln({ role: { type: String, values: XUe, default: "tooltip" } }), YUe = X({ name: "ElPopper", inheritAttrs: !1 }), ZUe = /* @__PURE__ */ X({ ...YUe, props: zH, setup(e, { expose: t }) { const n = e, r = U(), a = U(), o = U(), i = U(), s = F(() => n.role), l = { triggerRef: r, popperInstanceRef: a, contentRef: o, referenceRef: i, role: s }; return t(l), rt(YE, l), (u, c) => he(u.$slots, "default"); } }); var QUe = /* @__PURE__ */ Ut(ZUe, [["__file", "popper.vue"]]); const VH = Ln({ arrowOffset: { type: Number, default: 5 } }), JUe = X({ name: "ElPopperArrow", inheritAttrs: !1 }), eqe = /* @__PURE__ */ X({ ...JUe, props: VH, setup(e, { expose: t }) { const n = e, r = Wt("popper"), { arrowOffset: a, arrowRef: o, arrowStyle: i } = Te(RH, void 0); return be(() => n.arrowOffset, (s) => { a.value = s; }), kt(() => { o.value = void 0; }), t({ arrowRef: o }), (s, l) => (I(), j("span", { ref_key: "arrowRef", ref: o, class: H(b(r).e("arrow")), style: Ye(b(i)), "data-popper-arrow": "" }, null, 6)); } }); var tqe = /* @__PURE__ */ Ut(eqe, [["__file", "arrow.vue"]]); const zk = "ElOnlyChild", nqe = X({ name: zk, setup(e, { slots: t, attrs: n }) { var r; const a = Te(AH), o = dUe((r = a == null ? void 0 : a.setForwardRef) != null ? r : X0); return () => { var i; const s = (i = t.default) == null ? void 0 : i.call(t, n); if (!s) return null; if (s.length > 1) return wr(zk, "requires exact only one valid child."), null; const l = jH(s); return l ? Xe(mg(l, n), [[o]]) : (wr(zk, "no valid child node found"), null); }; } }); function jH(e) { if (!e) return null; const t = e; for (const n of t) { if (aa(n)) switch (n.type) { case yg: continue; case Ps: case "svg": return U9(n); case Qe: return jH(n.children); default: return n; } return U9(n); } return null; } function U9(e) { const t = Wt("only-child"); return ue("span", { class: t.e("content") }, [e]); } const HH = Ln({ virtualRef: { type: $t(Object) }, virtualTriggering: Boolean, onMouseenter: { type: $t(Function) }, onMouseleave: { type: $t(Function) }, onClick: { type: $t(Function) }, onKeydown: { type: $t(Function) }, onFocus: { type: $t(Function) }, onBlur: { type: $t(Function) }, onContextmenu: { type: $t(Function) }, id: String, open: Boolean }), rqe = X({ name: "ElPopperTrigger", inheritAttrs: !1 }), aqe = /* @__PURE__ */ X({ ...rqe, props: HH, setup(e, { expose: t }) { const n = e, { role: r, triggerRef: a } = Te(YE, void 0); cUe(a); const o = F(() => s.value ? n.id : void 0), i = F(() => { if (r && r.value === "tooltip") return n.open && n.id ? n.id : void 0; }), s = F(() => { if (r && r.value !== "tooltip") return r.value; }), l = F(() => s.value ? `${n.open}` : void 0); let u; const c = [ "onMouseenter", "onMouseleave", "onClick", "onKeydown", "onFocus", "onBlur", "onContextmenu" ]; return nt(() => { be(() => n.virtualRef, (d) => { d && (a.value = pl(d)); }, { immediate: !0 }), be(a, (d, f) => { u == null || u(), u = void 0, sd(d) && (c.forEach((h) => { var p; const v = n[h]; v && (d.addEventListener(h.slice(2).toLowerCase(), v), (p = f == null ? void 0 : f.removeEventListener) == null || p.call(f, h.slice(2).toLowerCase(), v)); }), u = be([o, i, s, l], (h) => { [ "aria-controls", "aria-describedby", "aria-haspopup", "aria-expanded" ].forEach((p, v) => { Lu(h[v]) ? d.removeAttribute(p) : d.setAttribute(p, h[v]); }); }, { immediate: !0 })), sd(f) && [ "aria-controls", "aria-describedby", "aria-haspopup", "aria-expanded" ].forEach((h) => f.removeAttribute(h)); }, { immediate: !0 }); }), kt(() => { if (u == null || u(), u = void 0, a.value && sd(a.value)) { const d = a.value; c.forEach((f) => { const h = n[f]; h && d.removeEventListener(f.slice(2).toLowerCase(), h); }), a.value = void 0; } }), t({ triggerRef: a }), (d, f) => d.virtualTriggering ? ne("v-if", !0) : (I(), de(b(nqe), Bt({ key: 0 }, d.$attrs, { "aria-controls": b(o), "aria-describedby": b(i), "aria-expanded": b(l), "aria-haspopup": b(s) }), { default: K(() => [ he(d.$slots, "default") ]), _: 3 }, 16, ["aria-controls", "aria-describedby", "aria-expanded", "aria-haspopup"])); } }); var oqe = /* @__PURE__ */ Ut(aqe, [["__file", "trigger.vue"]]); const Vk = "focus-trap.focus-after-trapped", jk = "focus-trap.focus-after-released", iqe = "focus-trap.focusout-prevented", q9 = { cancelable: !0, bubbles: !1 }, sqe = { cancelable: !0, bubbles: !1 }, W9 = "focusAfterTrapped", K9 = "focusAfterReleased", lqe = Symbol("elFocusTrap"), ZE = U(), Gw = U(0), QE = U(0); let C1 = 0; const UH = (e) => { const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, { acceptNode: (r) => { const a = r.tagName === "INPUT" && r.type === "hidden"; return r.disabled || r.hidden || a ? NodeFilter.FILTER_SKIP : r.tabIndex >= 0 || r === document.activeElement ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP; } }); for (; n.nextNode(); ) t.push(n.currentNode); return t; }, G9 = (e, t) => { for (const n of e) if (!uqe(n, t)) return n; }, uqe = (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; }, cqe = (e) => { const t = UH(e), n = G9(t, e), r = G9(t.reverse(), e); return [n, r]; }, dqe = (e) => e instanceof HTMLInputElement && "select" in e, lu = (e, t) => { if (e && e.focus) { const n = document.activeElement; e.focus({ preventScroll: !0 }), QE.value = window.performance.now(), e !== n && dqe(e) && t && e.select(); } }; function X9(e, t) { const n = [...e], r = e.indexOf(t); return r !== -1 && n.splice(r, 1), n; } const pqe = () => { let e = []; return { push: (t) => { const n = e[0]; n && t !== n && n.pause(), e = X9(e, t), e.unshift(t); }, remove: (t) => { var n, r; e = X9(e, t), (r = (n = e[0]) == null ? void 0 : n.resume) == null || r.call(n); } }; }, fqe = (e, t = !1) => { const n = document.activeElement; for (const r of e) if (lu(r, t), document.activeElement !== n) return; }, Y9 = pqe(), hqe = () => Gw.value > QE.value, S1 = () => { ZE.value = "pointer", Gw.value = window.performance.now(); }, Z9 = () => { ZE.value = "keyboard", Gw.value = window.performance.now(); }, vqe = () => (nt(() => { C1 === 0 && (document.addEventListener("mousedown", S1), document.addEventListener("touchstart", S1), document.addEventListener("keydown", Z9)), C1++; }), kt(() => { C1--, C1 <= 0 && (document.removeEventListener("mousedown", S1), document.removeEventListener("touchstart", S1), document.removeEventListener("keydown", Z9)); }), { focusReason: ZE, lastUserFocusTimestamp: Gw, lastAutomatedFocusTimestamp: QE }), E1 = (e) => new CustomEvent(iqe, { ...sqe, detail: e }), gqe = X({ name: "ElFocusTrap", inheritAttrs: !1, props: { loop: Boolean, trapped: Boolean, focusTrapEl: Object, focusStartEl: { type: [Object, String], default: "first" } }, emits: [ W9, K9, "focusin", "focusout", "focusout-prevented", "release-requested" ], setup(e, { emit: t }) { const n = U(); let r, a; const { focusReason: o } = vqe(); oUe((p) => { e.trapped && !i.paused && t("release-requested", p); }); const i = { paused: !1, pause() { this.paused = !0; }, resume() { this.paused = !1; } }, s = (p) => { if (!e.loop && !e.trapped || i.paused) return; const { key: v, altKey: m, ctrlKey: g, metaKey: y, currentTarget: x, shiftKey: w } = p, { loop: k } = e, C = v === Ar.tab && !m && !g && !y, S = document.activeElement; if (C && S) { const _ = x, [T, O] = cqe(_); if (T && O) { if (!w && S === O) { const $ = E1({ focusReason: o.value }); t("focusout-prevented", $), $.defaultPrevented || (p.preventDefault(), k && lu(T, !0)); } else if (w && [T, _].includes(S)) { const $ = E1({ focusReason: o.value }); t("focusout-prevented", $), $.defaultPrevented || (p.preventDefault(), k && lu(O, !0)); } } else if (S === _) { const $ = E1({ focusReason: o.value }); t("focusout-prevented", $), $.defaultPrevented || p.preventDefault(); } } }; rt(lqe, { focusTrapRef: n, onKeydown: s }), be(() => e.focusTrapEl, (p) => { p && (n.value = p); }, { immediate: !0 }), be([n], ([p], [v]) => { p && (p.addEventListener("keydown", s), p.addEventListener("focusin", c), p.addEventListener("focusout", d)), v && (v.removeEventListener("keydown", s), v.removeEventListener("focusin", c), v.removeEventListener("focusout", d)); }); const l = (p) => { t(W9, p); }, u = (p) => t(K9, p), c = (p) => { const v = b(n); if (!v) return; const m = p.target, g = p.relatedTarget, y = m && v.contains(m); e.trapped || g && v.contains(g) || (r = g), y && t("focusin", p), !i.paused && e.trapped && (y ? a = m : lu(a, !0)); }, d = (p) => { const v = b(n); if (!(i.paused || !v)) if (e.trapped) { const m = p.relatedTarget; !Lu(m) && !v.contains(m) && setTimeout(() => { if (!i.paused && e.trapped) { const g = E1({ focusReason: o.value }); t("focusout-prevented", g), g.defaultPrevented || lu(a, !0); } }, 0); } else { const m = p.target; m && v.contains(m) || t("focusout", p); } }; async function f() { await Ue(); const p = b(n); if (p) { Y9.push(i); const v = p.contains(document.activeElement) ? r : document.activeElement; if (r = v, !p.contains(v)) { const m = new Event(Vk, q9); p.addEventListener(Vk, l), p.dispatchEvent(m), m.defaultPrevented || Ue(() => { let g = e.focusStartEl; Ta(g) || (lu(g), document.activeElement !== g && (g = "first")), g === "first" && fqe(UH(p), !0), (document.activeElement === v || g === "container") && lu(p); }); } } } function h() { const p = b(n); if (p) { p.removeEventListener(Vk, l); const v = new CustomEvent(jk, { ...q9, detail: { focusReason: o.value } }); p.addEventListener(jk, u), p.dispatchEvent(v), !v.defaultPrevented && (o.value == "keyboard" || !hqe() || p.contains(document.activeElement)) && lu(r ?? document.body), p.removeEventListener(jk, u), Y9.remove(i); } } return nt(() => { e.trapped && f(), be(() => e.trapped, (p) => { p ? f() : h(); }); }), kt(() => { 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 mqe(e, t, n, r, a, o) { return he(e.$slots, "default", { handleKeydown: e.onKeydown }); } var yqe = /* @__PURE__ */ Ut(gqe, [["render", mqe], ["__file", "focus-trap.vue"]]); const bqe = ["fixed", "absolute"], wqe = Ln({ boundariesPadding: { type: Number, default: 0 }, fallbackPlacements: { type: $t(Array), default: void 0 }, gpuAcceleration: { type: Boolean, default: !0 }, offset: { type: Number, default: 12 }, placement: { type: String, values: Uw, default: "bottom" }, popperOptions: { type: $t(Object), default: () => ({}) }, strategy: { type: String, values: bqe, default: "absolute" } }), qH = Ln({ ...wqe, id: String, style: { type: $t([String, Array, Object]) }, className: { type: $t([String, Array, Object]) }, effect: { type: $t(String), default: "dark" }, visible: Boolean, enterable: { type: Boolean, default: !0 }, pure: Boolean, focusOnShow: { type: Boolean, default: !1 }, trapping: { type: Boolean, default: !1 }, popperClass: { type: $t([String, Array, Object]) }, popperStyle: { type: $t([String, Array, Object]) }, referenceEl: { type: $t(Object) }, triggerTargetEl: { type: $t(Object) }, stopPopperMouseEvent: { type: Boolean, default: !0 }, virtualTriggering: Boolean, zIndex: Number, ...hc(["ariaLabel"]) }), xqe = { mouseenter: (e) => e instanceof MouseEvent, mouseleave: (e) => e instanceof MouseEvent, focus: () => !0, blur: () => !0, close: () => !0 }, kqe = (e, t = []) => { const { placement: n, strategy: r, popperOptions: a } = e, o = { placement: n, strategy: r, ...a, modifiers: [...Sqe(e), ...t] }; return Eqe(o, a == null ? void 0 : a.modifiers), o; }, Cqe = (e) => { if (br) return pl(e); }; function Sqe(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 Eqe(e, t) { t && (e.modifiers = [...e.modifiers, ...t ?? []]); } const _qe = 0, Tqe = (e) => { const { popperInstanceRef: t, contentRef: n, triggerRef: r, role: a } = Te(YE, void 0), o = U(), i = U(), s = F(() => ({ name: "eventListeners", enabled: !!e.visible })), l = F(() => { var g; const y = b(o), x = (g = b(i)) != null ? g : _qe; return { name: "arrow", enabled: !JVe(y), options: { element: y, padding: x } }; }), u = F(() => ({ onFirstUpdate: () => { p(); }, ...kqe(e, [ b(l), b(s) ]) })), c = F(() => Cqe(e.referenceEl) || b(r)), { attributes: d, state: f, styles: h, update: p, forceUpdate: v, instanceRef: m } = nUe(c, n, u); return be(m, (g) => t.value = g), nt(() => { be(() => { var g; return (g = b(c)) == null ? void 0 : g.getBoundingClientRect(); }, () => { p(); }); }), { attributes: d, arrowRef: o, contentRef: n, instanceRef: m, state: f, styles: h, role: a, forceUpdate: v, update: p }; }, Oqe = (e, { attributes: t, styles: n, role: r }) => { const { nextZIndex: a } = LH(), o = Wt("popper"), i = F(() => b(t).popper), s = U(oa(e.zIndex) ? e.zIndex : a()), l = F(() => [ o.b(), o.is("pure", e.pure), o.is(e.effect), e.popperClass ]), u = F(() => [ { zIndex: b(s) }, b(n).popper, e.popperStyle || {} ]), c = F(() => r.value === "dialog" ? "false" : void 0), d = F(() => b(n).arrow || {}); return { ariaModal: c, arrowStyle: d, contentAttrs: i, contentClass: l, contentStyle: u, contentZIndex: s, updateZIndex: () => { s.value = oa(e.zIndex) ? e.zIndex : a(); } }; }, $qe = (e, t) => { const n = U(!1), r = U(); return { focusStartRef: r, trapped: n, onFocusAfterReleased: (a) => { var o; ((o = a.detail) == null ? void 0 : o.focusReason) !== "pointer" && (r.value = "first", t("blur")); }, onFocusAfterTrapped: () => { t("focus"); }, onFocusInTrap: (a) => { e.visible && !n.value && (a.target && (r.value = a.target), n.value = !0); }, onFocusoutPrevented: (a) => { e.trapping || (a.detail.focusReason === "pointer" && a.preventDefault(), n.value = !1); }, onReleaseRequested: () => { n.value = !1, t("close"); } }; }, Fqe = X({ name: "ElPopperContent" }), Aqe = /* @__PURE__ */ X({ ...Fqe, props: qH, emits: xqe, setup(e, { expose: t, emit: n }) { const r = e, { focusStartRef: a, trapped: o, onFocusAfterReleased: i, onFocusAfterTrapped: s, onFocusInTrap: l, onFocusoutPrevented: u, onReleaseRequested: c } = $qe(r, n), { attributes: d, arrowRef: f, contentRef: h, styles: p, instanceRef: v, role: m, update: g } = Tqe(r), { ariaModal: y, arrowStyle: x, contentAttrs: w, contentClass: k, contentStyle: C, updateZIndex: S } = Oqe(r, { styles: p, attributes: d, role: m }), _ = Te(eg, void 0), T = U(); rt(RH, { arrowStyle: x, arrowRef: f, arrowOffset: T }), _ && rt(eg, { ..._, addInputId: X0, removeInputId: X0 }); let O; const $ = (N = !0) => { g(), N && S(); }, A = () => { $(!1), r.visible && r.focusOnShow ? o.value = !0 : r.visible === !1 && (o.value = !1); }; return nt(() => { be(() => r.triggerTargetEl, (N, L) => { O == null || O(), O = void 0; const R = b(N || h.value), P = b(L || h.value); sd(R) && (O = be([m, () => r.ariaLabel, y, () => r.id], (B) => { ["role", "aria-label", "aria-modal", "id"].forEach((M, z) => { Lu(B[z]) ? R.removeAttribute(M) : R.setAttribute(M, B[z]); }); }, { immediate: !0 })), P !== R && sd(P) && ["role", "aria-label", "aria-modal", "id"].forEach((B) => { P.removeAttribute(B); }); }, { immediate: !0 }), be(() => r.visible, A, { immediate: !0 }); }), kt(() => { O == null || O(), O = void 0; }), t({ popperContentRef: h, popperInstanceRef: v, updatePopper: $, contentStyle: C }), (N, L) => (I(), j("div", Bt({ ref_key: "contentRef", ref: h }, b(w), { style: b(C), class: b(k), tabindex: "-1", onMouseenter: (R) => N.$emit("mouseenter", R), onMouseleave: (R) => N.$emit("mouseleave", R) }), [ ue(b(yqe), { trapped: b(o), "trap-on-focus-in": !0, "focus-trap-el": b(h), "focus-start-el": b(a), onFocusAfterTrapped: b(s), onFocusAfterReleased: b(i), onFocusin: b(l), onFocusoutPrevented: b(u), onReleaseRequested: b(c) }, { default: K(() => [ he(N.$slots, "default") ]), _: 3 }, 8, ["trapped", "focus-trap-el", "focus-start-el", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusin", "onFocusoutPrevented", "onReleaseRequested"]) ], 16, ["onMouseenter", "onMouseleave"])); } }); var Iqe = /* @__PURE__ */ Ut(Aqe, [["__file", "content.vue"]]); const Pqe = Yr(QUe), JE = Symbol("elTooltip"), Za = Ln({ ...lUe, ...qH, appendTo: { type: $t([String, Object]) }, content: { type: String, default: "" }, rawContent: Boolean, persistent: Boolean, visible: { type: $t(Boolean), default: null }, transition: String, teleported: { type: Boolean, default: !0 }, disabled: Boolean, ...hc(["ariaLabel"]) }), tg = Ln({ ...HH, disabled: Boolean, trigger: { type: $t([String, Array]), default: "hover" }, triggerKeys: { type: $t(Array), default: () => [Ar.enter, Ar.space] } }), { useModelToggleProps: Lqe, useModelToggleEmits: Nqe, useModelToggle: Mqe } = Jje("visible"), Bqe = Ln({ ...zH, ...Lqe, ...Za, ...tg, ...VH, showArrow: { type: Boolean, default: !0 } }), Dqe = [ ...Nqe, "before-show", "before-hide", "show", "hide", "open", "close" ], Rqe = (e, t) => no(e) ? e.includes(t) : e === t, Ap = (e, t, n) => (r) => { Rqe(b(e), t) && n(r); }, zqe = X({ name: "ElTooltipTrigger" }), Vqe = /* @__PURE__ */ X({ ...zqe, props: tg, setup(e, { expose: t }) { const n = e, r = Wt("tooltip"), { controlled: a, id: o, open: i, onOpen: s, onClose: l, onToggle: u } = Te(JE, void 0), c = U(null), d = () => { if (b(a) || n.disabled) return !0; }, f = It(n, "trigger"), h = tl(d, Ap(f, "hover", s)), p = tl(d, Ap(f, "hover", l)), v = tl(d, Ap(f, "click", (w) => { w.button === 0 && u(w); })), m = tl(d, Ap(f, "focus", s)), g = tl(d, Ap(f, "focus", l)), y = tl(d, Ap(f, "contextmenu", (w) => { w.preventDefault(), u(w); })), x = tl(d, (w) => { const { code: k } = w; n.triggerKeys.includes(k) && (w.preventDefault(), u(w)); }); return t({ triggerRef: c }), (w, k) => (I(), de(b(oqe), { id: b(o), "virtual-ref": w.virtualRef, open: b(i), "virtual-triggering": w.virtualTriggering, class: H(b(r).e("trigger")), onBlur: b(g), onClick: b(v), onContextmenu: b(y), onFocus: b(m), onMouseenter: b(h), onMouseleave: b(p), onKeydown: b(x) }, { default: K(() => [ he(w.$slots, "default") ]), _: 3 }, 8, ["id", "virtual-ref", "open", "virtual-triggering", "class", "onBlur", "onClick", "onContextmenu", "onFocus", "onMouseenter", "onMouseleave", "onKeydown"])); } }); var jqe = /* @__PURE__ */ Ut(Vqe, [["__file", "trigger.vue"]]); const Hqe = Ln({ to: { type: $t([String, Object]), required: !0 }, disabled: Boolean }), Uqe = /* @__PURE__ */ X({ __name: "teleport", props: Hqe, setup(e) { return (t, n) => t.disabled ? he(t.$slots, "default", { key: 0 }) : (I(), de(bg, { key: 1, to: t.to }, [ he(t.$slots, "default") ], 8, ["to"])); } }); var qqe = /* @__PURE__ */ Ut(Uqe, [["__file", "teleport.vue"]]); const Wqe = Yr(qqe), Kqe = X({ name: "ElTooltipContent", inheritAttrs: !1 }), Gqe = /* @__PURE__ */ X({ ...Kqe, props: Za, setup(e, { expose: t }) { const n = e, { selector: r } = FH(), a = Wt("tooltip"), o = U(null); let i; const { controlled: s, id: l, open: u, trigger: c, onClose: d, onOpen: f, onShow: h, onHide: p, onBeforeShow: v, onBeforeHide: m } = Te(JE, void 0), g = F(() => n.transition || `${a.namespace.value}-fade-in-linear`), y = F(() => process.env.NODE_ENV === "test" ? !0 : n.persistent); kt(() => { i == null || i(); }); const x = F(() => b(y) ? !0 : b(u)), w = F(() => n.disabled ? !1 : b(u)), k = F(() => n.appendTo || r.value), C = F(() => { var P; return (P = n.style) != null ? P : {}; }), S = U(!0), _ = () => { p(), S.value = !0; }, T = () => { if (b(s)) return !0; }, O = tl(T, () => { n.enterable && b(c) === "hover" && f(); }), $ = tl(T, () => { b(c) === "hover" && d(); }), A = () => { var P, B; (B = (P = o.value) == null ? void 0 : P.updatePopper) == null || B.call(P), v == null || v(); }, N = () => { m == null || m(); }, L = () => { h(), i = WDe(F(() => { var P; return (P = o.value) == null ? void 0 : P.popperContentRef; }), () => { b(s) || b(c) !== "hover" && d(); }); }, R = () => { n.virtualTriggering || d(); }; return be(() => b(u), (P) => { P ? S.value = !1 : i == null || i(); }, { flush: "post" }), be(() => n.content, () => { var P, B; (B = (P = o.value) == null ? void 0 : P.updatePopper) == null || B.call(P); }), t({ contentRef: o }), (P, B) => (I(), de(b(Wqe), { disabled: !P.teleported, to: b(k) }, { default: K(() => [ ue(vr, { name: b(g), onAfterLeave: _, onBeforeEnter: A, onAfterEnter: L, onBeforeLeave: N }, { default: K(() => [ b(x) ? Xe((I(), de(b(Iqe), Bt({ key: 0, id: b(l), ref_key: "contentRef", ref: o }, P.$attrs, { "aria-label": P.ariaLabel, "aria-hidden": S.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, b(C)], "reference-el": P.referenceEl, "trigger-target-el": P.triggerTargetEl, visible: b(w), "z-index": P.zIndex, onMouseenter: b(O), onMouseleave: b($), onBlur: R, onClose: b(d) }), { default: K(() => [ he(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"])), [ [mt, b(w)] ]) : ne("v-if", !0) ]), _: 3 }, 8, ["name"]) ]), _: 3 }, 8, ["disabled", "to"])); } }); var Xqe = /* @__PURE__ */ Ut(Gqe, [["__file", "content.vue"]]); const Yqe = X({ name: "ElTooltip" }), Zqe = /* @__PURE__ */ X({ ...Yqe, props: Bqe, emits: Dqe, setup(e, { expose: t, emit: n }) { const r = e; sUe(); const a = Ww(), o = U(), i = U(), s = () => { var g; const y = b(o); y && ((g = y.popperInstanceRef) == null || g.update()); }, l = U(!1), u = U(), { show: c, hide: d, hasUpdateHandler: f } = Mqe({ indicator: l, toggleReason: u }), { onOpen: h, onClose: p } = uUe({ showAfter: It(r, "showAfter"), hideAfter: It(r, "hideAfter"), autoClose: It(r, "autoClose"), open: c, close: d }), v = F(() => Kf(r.visible) && !f.value); rt(JE, { controlled: v, id: a, open: ih(l), trigger: It(r, "trigger"), onOpen: (g) => { h(g); }, onClose: (g) => { p(g); }, onToggle: (g) => { b(l) ? p(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 }), be(() => r.disabled, (g) => { g && l.value && (l.value = !1); }); const m = (g) => { var y, x; const w = (x = (y = i.value) == null ? void 0 : y.contentRef) == null ? void 0 : x.popperContentRef, k = (g == null ? void 0 : g.relatedTarget) || document.activeElement; return w && w.contains(k); }; return wg(() => l.value && d()), t({ popperRef: o, contentRef: i, isFocusInsideContent: m, updatePopper: s, onOpen: h, onClose: p, hide: d }), (g, y) => (I(), de(b(Pqe), { ref_key: "popperRef", ref: o, role: g.role }, { default: K(() => [ ue(jqe, { disabled: g.disabled, trigger: g.trigger, "trigger-keys": g.triggerKeys, "virtual-ref": g.virtualRef, "virtual-triggering": g.virtualTriggering }, { default: K(() => [ g.$slots.default ? he(g.$slots, "default", { key: 0 }) : ne("v-if", !0) ]), _: 3 }, 8, ["disabled", "trigger", "trigger-keys", "virtual-ref", "virtual-triggering"]), ue(Xqe, { 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: K(() => [ he(g.$slots, "content", {}, () => [ g.rawContent ? (I(), j("span", { key: 0, innerHTML: g.content }, null, 8, ["innerHTML"])) : (I(), j("span", { key: 1 }, Fe(g.content), 1)) ]), g.showArrow ? (I(), de(b(tqe), { key: 0, "arrow-offset": g.arrowOffset }, null, 8, ["arrow-offset"])) : ne("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 Qqe = /* @__PURE__ */ Ut(Zqe, [["__file", "tooltip.vue"]]); const fm = Yr(Qqe), WH = Symbol("buttonGroupContextKey"), Jqe = (e, t) => { by({ from: "type.text", replacement: "link", version: "3.0.0", scope: "props", ref: "https://element-plus.org/en-US/component/button.html#button-attributes" }, F(() => e.type === "text")); const n = Te(WH, void 0), r = KE("button"), { form: a } = up(), o = Id(F(() => n == null ? void 0 : n.size)), i = dm(), s = U(), l = Cr(), u = F(() => e.type || (n == null ? void 0 : n.type) || ""), c = F(() => { var h, p, v; return (v = (p = e.autoInsertSpace) != null ? p : (h = r.value) == null ? void 0 : h.autoInsertSpace) != null ? v : !1; }), d = F(() => e.tag === "button" ? { ariaDisabled: i.value || e.loading, disabled: i.value || e.loading, autofocus: e.autofocus, type: e.nativeType } : {}), f = F(() => { var h; const p = (h = l.default) == null ? void 0 : h.call(l); if (c.value && (p == null ? void 0 : p.length) === 1) { const v = p[0]; if ((v == null ? void 0 : v.type) === Ps) { const m = v.children; return new RegExp("^\\p{Unified_Ideograph}{2}$", "u").test(m.trim()); } } return !1; }); return { _disabled: i, _size: o, _type: u, _ref: s, _props: d, shouldAddSpace: f, handleClick: (h) => { if (i.value || e.loading) { h.stopPropagation(); return; } e.nativeType === "reset" && (a == null || a.resetFields()), t("click", h); } }; }, eWe = [ "default", "primary", "success", "warning", "info", "danger", "text", "" ], tWe = ["button", "submit", "reset"], J5 = Ln({ size: Ih, disabled: Boolean, type: { type: String, values: eWe, default: "" }, icon: { type: Qu }, nativeType: { type: String, values: tWe, default: "button" }, loading: Boolean, loadingIcon: { type: Qu, default: () => NE }, 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: $t([String, Object]), default: "button" } }), nWe = { click: (e) => e instanceof MouseEvent }; function fa(e, t) { rWe(e) && (e = "100%"); var n = aWe(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 _1(e) { return Math.min(1, Math.max(0, e)); } function rWe(e) { return typeof e == "string" && e.indexOf(".") !== -1 && parseFloat(e) === 1; } function aWe(e) { return typeof e == "string" && e.indexOf("%") !== -1; } function KH(e) { return e = parseFloat(e), (isNaN(e) || e < 0 || e > 1) && (e = 1), e; } function T1(e) { return e <= 1 ? "".concat(Number(e) * 100, "%") : e; } function Gc(e) { return e.length === 1 ? "0" + e : String(e); } function oWe(e, t, n) { return { r: fa(e, 255) * 255, g: fa(t, 255) * 255, b: fa(n, 255) * 255 }; } function Q9(e, t, n) { e = fa(e, 255), t = fa(t, 255), n = fa(n, 255); var r = Math.max(e, t, n), a = Math.min(e, t, n), o = 0, i = 0, s = (r + a) / 2; if (r === a) i = 0, o = 0; else { var l = r - a; switch (i = s > 0.5 ? l / (2 - r - a) : l / (r + a), r) { case e: o = (t - n) / l + (t < n ? 6 : 0); break; case t: o = (n - e) / l + 2; break; case n: o = (e - t) / l + 4; break; } o /= 6; } return { h: o, s: i, l: s }; } function Hk(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 iWe(e, t, n) { var r, a, o; if (e = fa(e, 360), t = fa(t, 100), n = fa(n, 100), t === 0) a = n, o = n, r = n; else { var i = n < 0.5 ? n * (1 + t) : n + t - n * t, s = 2 * n - i; r = Hk(s, i, e + 1 / 3), a = Hk(s, i, e), o = Hk(s, i, e - 1 / 3); } return { r: r * 255, g: a * 255, b: o * 255 }; } function J9(e, t, n) { e = fa(e, 255), t = fa(t, 255), n = fa(n, 255); var r = Math.max(e, t, n), a = Math.min(e, t, n), o = 0, i = r, s = r - a, l = r === 0 ? 0 : s / r; if (r === a) o = 0; else { switch (r) { case e: o = (t - n) / s + (t < n ? 6 : 0); break; case t: o = (n - e) / s + 2; break; case n: o = (e - t) / s + 4; break; } o /= 6; } return { h: o, s: l, v: i }; } function sWe(e, t, n) { e = fa(e, 360) * 6, t = fa(t, 100), n = fa(n, 100); var r = Math.floor(e), a = e - r, o = n * (1 - t), i = n * (1 - a * t), s = n * (1 - (1 - a) * t), l = r % 6, u = [n, i, o, o, s, n][l], c = [s, n, n, i, o, o][l], d = [o, o, s, n, n, i][l]; return { r: u * 255, g: c * 255, b: d * 255 }; } function eI(e, t, n, r) { var a = [ Gc(Math.round(e).toString(16)), Gc(Math.round(t).toString(16)), Gc(Math.round(n).toString(16)) ]; return r && a[0].startsWith(a[0].charAt(1)) && a[1].startsWith(a[1].charAt(1)) && a[2].startsWith(a[2].charAt(1)) ? a[0].charAt(0) + a[1].charAt(0) + a[2].charAt(0) : a.join(""); } function lWe(e, t, n, r, a) { var o = [ Gc(Math.round(e).toString(16)), Gc(Math.round(t).toString(16)), Gc(Math.round(n).toString(16)), Gc(uWe(r)) ]; return a && o[0].startsWith(o[0].charAt(1)) && o[1].startsWith(o[1].charAt(1)) && o[2].startsWith(o[2].charAt(1)) && o[3].startsWith(o[3].charAt(1)) ? o[0].charAt(0) + o[1].charAt(0) + o[2].charAt(0) + o[3].charAt(0) : o.join(""); } function uWe(e) { return Math.round(parseFloat(e) * 255).toString(16); } function tI(e) { return To(e) / 255; } function To(e) { return parseInt(e, 16); } function cWe(e) { return { r: e >> 16, g: (e & 65280) >> 8, b: e & 255 }; } var eS = { 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 dWe(e) { var t = { r: 0, g: 0, b: 0 }, n = 1, r = null, a = null, o = null, i = !1, s = !1; return typeof e == "string" && (e = hWe(e)), typeof e == "object" && (Ks(e.r) && Ks(e.g) && Ks(e.b) ? (t = oWe(e.r, e.g, e.b), i = !0, s = String(e.r).substr(-1) === "%" ? "prgb" : "rgb") : Ks(e.h) && Ks(e.s) && Ks(e.v) ? (r = T1(e.s), a = T1(e.v), t = sWe(e.h, r, a), i = !0, s = "hsv") : Ks(e.h) && Ks(e.s) && Ks(e.l) && (r = T1(e.s), o = T1(e.l), t = iWe(e.h, r, o), i = !0, s = "hsl"), Object.prototype.hasOwnProperty.call(e, "a") && (n = e.a)), n = KH(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 pWe = "[-\\+]?\\d+%?", fWe = "[-\\+]?\\d*\\.\\d+%?", $u = "(?:".concat(fWe, ")|(?:").concat(pWe, ")"), Uk = "[\\s|\\(]+(".concat($u, ")[,|\\s]+(").concat($u, ")[,|\\s]+(").concat($u, ")\\s*\\)?"), qk = "[\\s|\\(]+(".concat($u, ")[,|\\s]+(").concat($u, ")[,|\\s]+(").concat($u, ")[,|\\s]+(").concat($u, ")\\s*\\)?"), Ei = { CSS_UNIT: new RegExp($u), rgb: new RegExp("rgb" + Uk), rgba: new RegExp("rgba" + qk), hsl: new RegExp("hsl" + Uk), hsla: new RegExp("hsla" + qk), hsv: new RegExp("hsv" + Uk), hsva: new RegExp("hsva" + qk), 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 hWe(e) { if (e = e.trim().toLowerCase(), e.length === 0) return !1; var t = !1; if (eS[e]) e = eS[e], t = !0; else if (e === "transparent") return { r: 0, g: 0, b: 0, a: 0, format: "name" }; var n = Ei.rgb.exec(e); return n ? { r: n[1], g: n[2], b: n[3] } : (n = Ei.rgba.exec(e), n ? { r: n[1], g: n[2], b: n[3], a: n[4] } : (n = Ei.hsl.exec(e), n ? { h: n[1], s: n[2], l: n[3] } : (n = Ei.hsla.exec(e), n ? { h: n[1], s: n[2], l: n[3], a: n[4] } : (n = Ei.hsv.exec(e), n ? { h: n[1], s: n[2], v: n[3] } : (n = Ei.hsva.exec(e), n ? { h: n[1], s: n[2], v: n[3], a: n[4] } : (n = Ei.hex8.exec(e), n ? { r: To(n[1]), g: To(n[2]), b: To(n[3]), a: tI(n[4]), format: t ? "name" : "hex8" } : (n = Ei.hex6.exec(e), n ? { r: To(n[1]), g: To(n[2]), b: To(n[3]), format: t ? "name" : "hex" } : (n = Ei.hex4.exec(e), n ? { r: To(n[1] + n[1]), g: To(n[2] + n[2]), b: To(n[3] + n[3]), a: tI(n[4] + n[4]), format: t ? "name" : "hex8" } : (n = Ei.hex3.exec(e), n ? { r: To(n[1] + n[1]), g: To(n[2] + n[2]), b: To(n[3] + n[3]), format: t ? "name" : "hex" } : !1))))))))); } function Ks(e) { return !!Ei.CSS_UNIT.exec(String(e)); } var vWe = ( /** @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 = cWe(t)), this.originalInput = t; var a = dWe(t); this.originalInput = t, this.r = a.r, this.g = a.g, this.b = a.b, this.a = a.a, this.roundA = Math.round(100 * this.a) / 100, this.format = (r = n.format) !== null && r !== void 0 ? r : a.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 = a.ok; } return e.prototype.isDark = function() { return this.getBrightness() < 128; }, e.prototype.isLight = function() { return !this.isDark(); }, e.prototype.getBrightness = function() { var t = this.toRgb(); return (t.r * 299 + t.g * 587 + t.b * 114) / 1e3; }, e.prototype.getLuminance = function() { var t = this.toRgb(), n, r, a, o = t.r / 255, i = t.g / 255, s = t.b / 255; return o <= 0.03928 ? n = o / 12.92 : n = Math.pow((o + 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 ? a = s / 12.92 : a = Math.pow((s + 0.055) / 1.055, 2.4), 0.2126 * n + 0.7152 * r + 0.0722 * a; }, e.prototype.getAlpha = function() { return this.a; }, e.prototype.setAlpha = function(t) { return this.a = KH(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 = J9(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 = J9(this.r, this.g, this.b), n = Math.round(t.h * 360), r = Math.round(t.s * 100), a = Math.round(t.v * 100); return this.a === 1 ? "hsv(".concat(n, ", ").concat(r, "%, ").concat(a, "%)") : "hsva(".concat(n, ", ").concat(r, "%, ").concat(a, "%, ").concat(this.roundA, ")"); }, e.prototype.toHsl = function() { var t = Q9(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 = Q9(this.r, this.g, this.b), n = Math.round(t.h * 360), r = Math.round(t.s * 100), a = Math.round(t.l * 100); return this.a === 1 ? "hsl(".concat(n, ", ").concat(r, "%, ").concat(a, "%)") : "hsla(".concat(n, ", ").concat(r, "%, ").concat(a, "%, ").concat(this.roundA, ")"); }, e.prototype.toHex = function(t) { return t === void 0 && (t = !1), eI(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), lWe(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(fa(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(fa(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 = "#" + eI(this.r, this.g, this.b, !1), n = 0, r = Object.entries(eS); n < r.length; n++) { var a = r[n], o = a[0], i = a[1]; if (t === i) return o; } return !1; }, e.prototype.toString = function(t) { var n = !!t; t = t ?? this.format; var r = !1, a = this.a < 1 && this.a >= 0, o = !n && a && (t.startsWith("hex") || t === "name"); return o ? 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 = _1(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 = _1(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 = _1(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 = _1(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(), a = new e(t).toRgb(), o = n / 100, i = { r: (a.r - r.r) * o + r.r, g: (a.g - r.g) * o + r.g, b: (a.b - r.b) * o + r.b, a: (a.a - r.a) * o + 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(), a = 360 / n, o = [this]; for (r.h = (r.h - (a * t >> 1) + 720) % 360; --t; ) r.h = (r.h + a) % 360, o.push(new e(r)); return o; }, 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, a = n.s, o = n.v, i = [], s = 1 / t; t--; ) i.push(new e({ h: r, s: a, v: o })), o = (o + 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(), a = n.a + r.a * (1 - n.a); return new e({ r: (n.r * n.a + r.r * r.a * (1 - n.a)) / a, g: (n.g * n.a + r.g * r.a * (1 - n.a)) / a, b: (n.b * n.a + r.b * r.a * (1 - n.a)) / a, a }); }, e.prototype.triad = function() { return this.polyad(3); }, e.prototype.tetrad = function() { return this.polyad(4); }, e.prototype.polyad = function(t) { for (var n = this.toHsl(), r = n.h, a = [this], o = 360 / t, i = 1; i < t; i++) a.push(new e({ h: (r + i * o) % 360, s: n.s, l: n.l })); return a; }, e.prototype.equals = function(t) { return this.toRgbString() === new e(t).toRgbString(); }, e; }() ); function Ql(e, t = 20) { return e.mix("#141414", t).toString(); } function gWe(e) { const t = dm(), n = Wt("button"); return F(() => { let r = {}, a = e.color; if (a) { const o = a.match(/var\((.*?)\)/); o && (a = window.getComputedStyle(window.document.documentElement).getPropertyValue(o[1])); const i = new vWe(a), s = e.dark ? i.tint(20).toString() : Ql(i, 20); if (e.plain) r = n.cssVarBlock({ "bg-color": e.dark ? Ql(i, 90) : i.tint(90).toString(), "text-color": a, "border-color": e.dark ? Ql(i, 50) : i.tint(50).toString(), "hover-text-color": `var(${n.cssVarName("color-white")})`, "hover-bg-color": a, "hover-border-color": a, "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 ? Ql(i, 90) : i.tint(90).toString(), r[n.cssVarBlockName("disabled-text-color")] = e.dark ? Ql(i, 50) : i.tint(50).toString(), r[n.cssVarBlockName("disabled-border-color")] = e.dark ? Ql(i, 80) : i.tint(80).toString()); else { const l = e.dark ? Ql(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": a, "text-color": u, "border-color": a, "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 ? Ql(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 mWe = X({ name: "ElButton" }), yWe = /* @__PURE__ */ X({ ...mWe, props: J5, emits: nWe, setup(e, { expose: t, emit: n }) { const r = e, a = gWe(r), o = Wt("button"), { _ref: i, _size: s, _type: l, _disabled: u, _props: c, shouldAddSpace: d, handleClick: f } = Jqe(r, n), h = F(() => [ o.b(), o.m(l.value), o.m(s.value), o.is("disabled", u.value), o.is("loading", r.loading), o.is("plain", r.plain), o.is("round", r.round), o.is("circle", r.circle), o.is("text", r.text), o.is("link", r.link), o.is("has-bg", r.bg) ]); return t({ ref: i, size: s, type: l, disabled: u, shouldAddSpace: d }), (p, v) => (I(), de(ct(p.tag), Bt({ ref_key: "_ref", ref: i }, b(c), { class: b(h), style: b(a), onClick: b(f) }), { default: K(() => [ p.loading ? (I(), j(Qe, { key: 0 }, [ p.$slots.loading ? he(p.$slots, "loading", { key: 0 }) : (I(), de(b(Sa), { key: 1, class: H(b(o).is("loading")) }, { default: K(() => [ (I(), de(ct(p.loadingIcon))) ]), _: 1 }, 8, ["class"])) ], 64)) : p.icon || p.$slots.icon ? (I(), de(b(Sa), { key: 1 }, { default: K(() => [ p.icon ? (I(), de(ct(p.icon), { key: 0 })) : he(p.$slots, "icon", { key: 1 }) ]), _: 3 })) : ne("v-if", !0), p.$slots.default ? (I(), j("span", { key: 2, class: H({ [b(o).em("text", "expand")]: b(d) }) }, [ he(p.$slots, "default") ], 2)) : ne("v-if", !0) ]), _: 3 }, 16, ["class", "style", "onClick"])); } }); var bWe = /* @__PURE__ */ Ut(yWe, [["__file", "button.vue"]]); const wWe = { size: J5.size, type: J5.type }, xWe = X({ name: "ElButtonGroup" }), kWe = /* @__PURE__ */ X({ ...xWe, props: wWe, setup(e) { const t = e; rt(WH, tn({ size: It(t, "size"), type: It(t, "type") })); const n = Wt("button"); return (r, a) => (I(), j("div", { class: H(b(n).b("group")) }, [ he(r.$slots, "default") ], 2)); } }); var GH = /* @__PURE__ */ Ut(kWe, [["__file", "button-group.vue"]]); const Pd = Yr(bWe, { ButtonGroup: GH }); Rl(GH); const uu = /* @__PURE__ */ new Map(); if (br) { let e; document.addEventListener("mousedown", (t) => e = t), document.addEventListener("mouseup", (t) => { if (e) { for (const n of uu.values()) for (const { documentHandler: r } of n) r(t, e); e = void 0; } }); } function nI(e, t) { let n = []; return Array.isArray(t.arg) ? n = t.arg : sd(t.arg) && n.push(t.arg), function(r, a) { const o = t.instance.popperRef, i = r.target, s = a == null ? void 0 : a.target, l = !t || !t.instance, u = !i || !s, c = e.contains(i) || e.contains(s), d = e === i, f = n.length && n.some((p) => p == null ? void 0 : p.contains(i)) || n.length && n.includes(s), h = o && (o.contains(i) || o.contains(s)); l || u || c || d || f || h || t.value(r, a); }; } const XH = { beforeMount(e, t) { uu.has(e) || uu.set(e, []), uu.get(e).push({ documentHandler: nI(e, t), bindingFn: t.value }); }, updated(e, t) { uu.has(e) || uu.set(e, []); const n = uu.get(e), r = n.findIndex((o) => o.bindingFn === t.oldValue), a = { documentHandler: nI(e, t), bindingFn: t.value }; r >= 0 ? n.splice(r, 1, a) : n.push(a); }, unmounted(e) { uu.delete(e); } }, CWe = Ln({ header: { type: String, default: "" }, footer: { type: String, default: "" }, bodyStyle: { type: $t([String, Object, Array]), default: "" }, bodyClass: String, shadow: { type: String, values: ["always", "hover", "never"], default: "always" } }), SWe = X({ name: "ElCard" }), EWe = /* @__PURE__ */ X({ ...SWe, props: CWe, setup(e) { const t = Wt("card"); return (n, r) => (I(), j("div", { class: H([b(t).b(), b(t).is(`${n.shadow}-shadow`)]) }, [ n.$slots.header || n.header ? (I(), j("div", { key: 0, class: H(b(t).e("header")) }, [ he(n.$slots, "header", {}, () => [ et(Fe(n.header), 1) ]) ], 2)) : ne("v-if", !0), W("div", { class: H([b(t).e("body"), n.bodyClass]), style: Ye(n.bodyStyle) }, [ he(n.$slots, "default") ], 6), n.$slots.footer || n.footer ? (I(), j("div", { key: 1, class: H(b(t).e("footer")) }, [ he(n.$slots, "footer", {}, () => [ et(Fe(n.footer), 1) ]) ], 2)) : ne("v-if", !0) ], 2)); } }); var _We = /* @__PURE__ */ Ut(EWe, [["__file", "card.vue"]]); Yr(_We); const YH = { 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: Ih, tabindex: [String, Number], validateEvent: { type: Boolean, default: !0 }, ...hc(["ariaControls"]) }, ZH = { [ea]: (e) => Ta(e) || oa(e) || Kf(e), change: (e) => Ta(e) || oa(e) || Kf(e) }, Ph = Symbol("checkboxGroupContextKey"), TWe = ({ model: e, isChecked: t }) => { const n = Te(Ph, void 0), r = F(() => { var a, o; const i = (a = n == null ? void 0 : n.max) == null ? void 0 : a.value, s = (o = n == null ? void 0 : n.min) == null ? void 0 : o.value; return !Ou(i) && e.value.length >= i && !t.value || !Ou(s) && e.value.length <= s && t.value; }); return { isDisabled: dm(F(() => (n == null ? void 0 : n.disabled.value) || r.value)), isLimitDisabled: r }; }, OWe = (e, { model: t, isLimitExceeded: n, hasOwnLabel: r, isDisabled: a, isLabeledByFormItem: o }) => { const i = Te(Ph, void 0), { formItem: s } = up(), { emit: l } = tt(); function u(p) { var v, m, g, y; return [!0, e.trueValue, e.trueLabel].includes(p) ? (m = (v = e.trueValue) != null ? v : e.trueLabel) != null ? m : !0 : (y = (g = e.falseValue) != null ? g : e.falseLabel) != null ? y : !1; } function c(p, v) { l("change", u(p), v); } function d(p) { if (n.value) return; const v = p.target; l("change", u(v.checked), p); } async function f(p) { n.value || !r.value && !a.value && o.value && (p.composedPath().some((v) => v.tagName === "LABEL") || (t.value = u([!1, e.falseValue, e.falseLabel].includes(t.value)), await Ue(), c(t.value, p))); } const h = F(() => (i == null ? void 0 : i.validateEvent) || e.validateEvent); return be(() => e.modelValue, () => { h.value && (s == null || s.validate("change").catch((p) => wr(p))); }), { handleChange: d, onClickRoot: f }; }, $We = (e) => { const t = U(!1), { emit: n } = tt(), r = Te(Ph, void 0), a = F(() => Ou(r) === !1), o = U(!1), i = F({ get() { var s, l; return a.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; a.value && no(s) ? (o.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, o.value === !1 && ((u = r == null ? void 0 : r.changeEvent) == null || u.call(r, s))) : (n(ea, s), t.value = s); } }); return { model: i, isGroup: a, isLimitExceeded: o }; }, FWe = (e, t, { model: n }) => { const r = Te(Ph, void 0), a = U(!1), o = F(() => Lb(e.value) ? e.label : e.value), i = F(() => { const c = n.value; return Kf(c) ? c : no(c) ? aa(o.value) ? c.map(bo).some((d) => Pb(d, o.value)) : c.map(bo).includes(o.value) : c != null ? c === e.trueValue || c === e.trueLabel : !!c; }), s = Id(F(() => { var c; return (c = r == null ? void 0 : r.size) == null ? void 0 : c.value; }), { prop: !0 }), l = Id(F(() => { var c; return (c = r == null ? void 0 : r.size) == null ? void 0 : c.value; })), u = F(() => !!t.default || !Lb(o.value)); return { checkboxButtonSize: s, isChecked: i, isFocused: a, checkboxSize: l, hasOwnLabel: u, actualValue: o }; }, QH = (e, t) => { const { formItem: n } = up(), { model: r, isGroup: a, isLimitExceeded: o } = $We(e), { isFocused: i, isChecked: s, checkboxButtonSize: l, checkboxSize: u, hasOwnLabel: c, actualValue: d } = FWe(e, t, { model: r }), { isDisabled: f } = TWe({ model: r, isChecked: s }), { inputId: h, isLabeledByFormItem: p } = pm(e, { formItemContext: n, disableIdGeneration: c, disableIdManagement: a }), { handleChange: v, onClickRoot: m } = OWe(e, { model: r, isLimitExceeded: o, hasOwnLabel: c, isDisabled: f, isLabeledByFormItem: p }); return (() => { function g() { var y, x; no(r.value) && !r.value.includes(d.value) ? r.value.push(d.value) : r.value = (x = (y = e.trueValue) != null ? y : e.trueLabel) != null ? x : !0; } e.checked && g(); })(), by({ from: "label act as value", replacement: "value", version: "3.0.0", scope: "el-checkbox", ref: "https://element-plus.org/en-US/component/checkbox.html" }, F(() => a.value && Lb(e.value))), by({ from: "true-label", replacement: "true-value", version: "3.0.0", scope: "el-checkbox", ref: "https://element-plus.org/en-US/component/checkbox.html" }, F(() => !!e.trueLabel)), by({ from: "false-label", replacement: "false-value", version: "3.0.0", scope: "el-checkbox", ref: "https://element-plus.org/en-US/component/checkbox.html" }, F(() => !!e.falseLabel)), { inputId: h, isLabeledByFormItem: p, isChecked: s, isDisabled: f, isFocused: i, checkboxButtonSize: l, checkboxSize: u, hasOwnLabel: c, model: r, actualValue: d, handleChange: v, onClickRoot: m }; }, AWe = X({ name: "ElCheckbox" }), IWe = /* @__PURE__ */ X({ ...AWe, props: YH, emits: ZH, setup(e) { const t = e, n = Cr(), { inputId: r, isLabeledByFormItem: a, isChecked: o, isDisabled: i, isFocused: s, checkboxSize: l, hasOwnLabel: u, model: c, actualValue: d, handleChange: f, onClickRoot: h } = QH(t, n), p = Wt("checkbox"), v = F(() => [ p.b(), p.m(l.value), p.is("disabled", i.value), p.is("bordered", t.border), p.is("checked", o.value) ]), m = F(() => [ p.e("input"), p.is("disabled", i.value), p.is("checked", o.value), p.is("indeterminate", t.indeterminate), p.is("focus", s.value) ]); return (g, y) => (I(), de(ct(!b(u) && b(a) ? "span" : "label"), { class: H(b(v)), "aria-controls": g.indeterminate ? g.ariaControls : null, onClick: b(h) }, { default: K(() => { var x, w, k, C; return [ W("span", { class: H(b(m)) }, [ g.trueValue || g.falseValue || g.trueLabel || g.falseLabel ? Xe((I(), j("input", { key: 0, id: b(r), "onUpdate:modelValue": (S) => ar(c) ? c.value = S : null, class: H(b(p).e("original")), type: "checkbox", indeterminate: g.indeterminate, name: g.name, tabindex: g.tabindex, disabled: b(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: b(f), onFocus: (S) => s.value = !0, onBlur: (S) => s.value = !1, onClick: Je(() => { }, ["stop"]) }, null, 42, ["id", "onUpdate:modelValue", "indeterminate", "name", "tabindex", "disabled", "true-value", "false-value", "onChange", "onFocus", "onBlur", "onClick"])), [ [ti, b(c)] ]) : Xe((I(), j("input", { key: 1, id: b(r), "onUpdate:modelValue": (S) => ar(c) ? c.value = S : null, class: H(b(p).e("original")), type: "checkbox", indeterminate: g.indeterminate, disabled: b(i), value: b(d), name: g.name, tabindex: g.tabindex, onChange: b(f), onFocus: (S) => s.value = !0, onBlur: (S) => s.value = !1, onClick: Je(() => { }, ["stop"]) }, null, 42, ["id", "onUpdate:modelValue", "indeterminate", "disabled", "value", "name", "tabindex", "onChange", "onFocus", "onBlur", "onClick"])), [ [ti, b(c)] ]), W("span", { class: H(b(p).e("inner")) }, null, 2) ], 2), b(u) ? (I(), j("span", { key: 0, class: H(b(p).e("label")) }, [ he(g.$slots, "default"), g.$slots.default ? ne("v-if", !0) : (I(), j(Qe, { key: 0 }, [ et(Fe(g.label), 1) ], 64)) ], 2)) : ne("v-if", !0) ]; }), _: 3 }, 8, ["class", "aria-controls", "onClick"])); } }); var PWe = /* @__PURE__ */ Ut(IWe, [["__file", "checkbox.vue"]]); const LWe = X({ name: "ElCheckboxButton" }), NWe = /* @__PURE__ */ X({ ...LWe, props: YH, emits: ZH, setup(e) { const t = e, n = Cr(), { isFocused: r, isChecked: a, isDisabled: o, checkboxButtonSize: i, model: s, actualValue: l, handleChange: u } = QH(t, n), c = Te(Ph, void 0), d = Wt("checkbox"), f = F(() => { var p, v, m, g; const y = (v = (p = c == null ? void 0 : c.fill) == null ? void 0 : p.value) != null ? v : ""; return { backgroundColor: y, borderColor: y, color: (g = (m = c == null ? void 0 : c.textColor) == null ? void 0 : m.value) != null ? g : "", boxShadow: y ? `-1px 0 0 0 ${y}` : void 0 }; }), h = F(() => [ d.b("button"), d.bm("button", i.value), d.is("disabled", o.value), d.is("checked", a.value), d.is("focus", r.value) ]); return (p, v) => { var m, g, y, x; return I(), j("label", { class: H(b(h)) }, [ p.trueValue || p.falseValue || p.trueLabel || p.falseLabel ? Xe((I(), j("input", { key: 0, "onUpdate:modelValue": (w) => ar(s) ? s.value = w : null, class: H(b(d).be("button", "original")), type: "checkbox", name: p.name, tabindex: p.tabindex, disabled: b(o), "true-value": (g = (m = p.trueValue) != null ? m : p.trueLabel) != null ? g : !0, "false-value": (x = (y = p.falseValue) != null ? y : p.falseLabel) != null ? x : !1, onChange: b(u), onFocus: (w) => r.value = !0, onBlur: (w) => r.value = !1, onClick: Je(() => { }, ["stop"]) }, null, 42, ["onUpdate:modelValue", "name", "tabindex", "disabled", "true-value", "false-value", "onChange", "onFocus", "onBlur", "onClick"])), [ [ti, b(s)] ]) : Xe((I(), j("input", { key: 1, "onUpdate:modelValue": (w) => ar(s) ? s.value = w : null, class: H(b(d).be("button", "original")), type: "checkbox", name: p.name, tabindex: p.tabindex, disabled: b(o), value: b(l), onChange: b(u), onFocus: (w) => r.value = !0, onBlur: (w) => r.value = !1, onClick: Je(() => { }, ["stop"]) }, null, 42, ["onUpdate:modelValue", "name", "tabindex", "disabled", "value", "onChange", "onFocus", "onBlur", "onClick"])), [ [ti, b(s)] ]), p.$slots.default || p.label ? (I(), j("span", { key: 2, class: H(b(d).be("button", "inner")), style: Ye(b(a) ? b(f) : void 0) }, [ he(p.$slots, "default", {}, () => [ et(Fe(p.label), 1) ]) ], 6)) : ne("v-if", !0) ], 2); }; } }); var JH = /* @__PURE__ */ Ut(NWe, [["__file", "checkbox-button.vue"]]); const MWe = Ln({ modelValue: { type: $t(Array), default: () => [] }, disabled: Boolean, min: Number, max: Number, size: Ih, fill: String, textColor: String, tag: { type: String, default: "div" }, validateEvent: { type: Boolean, default: !0 }, ...hc(["ariaLabel"]) }), BWe = { [ea]: (e) => no(e), change: (e) => no(e) }, DWe = X({ name: "ElCheckboxGroup" }), RWe = /* @__PURE__ */ X({ ...DWe, props: MWe, emits: BWe, setup(e, { emit: t }) { const n = e, r = Wt("checkbox"), { formItem: a } = up(), { inputId: o, isLabeledByFormItem: i } = pm(n, { formItemContext: a }), s = async (u) => { t(ea, u), await Ue(), t("change", u); }, l = F({ get() { return n.modelValue; }, set(u) { s(u); } }); return rt(Ph, { ...uH(Sr(n), [ "size", "min", "max", "disabled", "validateEvent", "fill", "textColor" ]), modelValue: l, changeEvent: s }), be(() => n.modelValue, () => { n.validateEvent && (a == null || a.validate("change").catch((u) => wr(u))); }), (u, c) => { var d; return I(), de(ct(u.tag), { id: b(o), class: H(b(r).b("group")), role: "group", "aria-label": b(i) ? void 0 : u.ariaLabel || "checkbox-group", "aria-labelledby": b(i) ? (d = b(a)) == null ? void 0 : d.labelId : void 0 }, { default: K(() => [ he(u.$slots, "default") ]), _: 3 }, 8, ["id", "class", "aria-label", "aria-labelledby"]); }; } }); var eU = /* @__PURE__ */ Ut(RWe, [["__file", "checkbox-group.vue"]]); const zWe = Yr(PWe, { CheckboxButton: JH, CheckboxGroup: eU }); Rl(JH); Rl(eU); const tS = Ln({ type: { type: String, values: ["primary", "success", "info", "warning", "danger"], default: "primary" }, closable: Boolean, disableTransitions: Boolean, hit: Boolean, color: String, size: { type: String, values: hH }, effect: { type: String, values: ["dark", "light", "plain"], default: "light" }, round: Boolean }), VWe = { close: (e) => e instanceof MouseEvent, click: (e) => e instanceof MouseEvent }, jWe = X({ name: "ElTag" }), HWe = /* @__PURE__ */ X({ ...jWe, props: tS, emits: VWe, setup(e, { emit: t }) { const n = e, r = Id(), a = Wt("tag"), o = F(() => { const { type: u, hit: c, effect: d, closable: f, round: h } = n; return [ a.b(), a.is("closable", f), a.m(u || "primary"), a.m(r.value), a.m(d), a.is("hit", c), a.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 ? (I(), j("span", { key: 0, class: H(b(o)), style: Ye({ backgroundColor: u.color }), onClick: s }, [ W("span", { class: H(b(a).e("content")) }, [ he(u.$slots, "default") ], 2), u.closable ? (I(), de(b(Sa), { key: 0, class: H(b(a).e("close")), onClick: Je(i, ["stop"]) }, { default: K(() => [ ue(b(Nb)) ]), _: 1 }, 8, ["class", "onClick"])) : ne("v-if", !0) ], 6)) : (I(), de(vr, { key: 1, name: `${b(a).namespace.value}-zoom-in-center`, appear: "", onVnodeMounted: l }, { default: K(() => [ W("span", { class: H(b(o)), style: Ye({ backgroundColor: u.color }), onClick: s }, [ W("span", { class: H(b(a).e("content")) }, [ he(u.$slots, "default") ], 2), u.closable ? (I(), de(b(Sa), { key: 0, class: H(b(a).e("close")), onClick: Je(i, ["stop"]) }, { default: K(() => [ ue(b(Nb)) ]), _: 1 }, 8, ["class", "onClick"])) : ne("v-if", !0) ], 6) ]), _: 3 }, 8, ["name"])); } }); var UWe = /* @__PURE__ */ Ut(HWe, [["__file", "tag.vue"]]); const qWe = Yr(UWe), tU = Symbol("rowContextKey"), WWe = [ "start", "center", "end", "space-around", "space-between", "space-evenly" ], KWe = ["top", "middle", "bottom"], GWe = Ln({ tag: { type: String, default: "div" }, gutter: { type: Number, default: 0 }, justify: { type: String, values: WWe, default: "start" }, align: { type: String, values: KWe } }), XWe = X({ name: "ElRow" }), YWe = /* @__PURE__ */ X({ ...XWe, props: GWe, setup(e) { const t = e, n = Wt("row"), r = F(() => t.gutter); rt(tU, { gutter: r }); const a = F(() => { const i = {}; return t.gutter && (i.marginRight = i.marginLeft = `-${t.gutter / 2}px`), i; }), o = F(() => [ n.b(), n.is(`justify-${t.justify}`, t.justify !== "start"), n.is(`align-${t.align}`, !!t.align) ]); return (i, s) => (I(), de(ct(i.tag), { class: H(b(o)), style: Ye(b(a)) }, { default: K(() => [ he(i.$slots, "default") ]), _: 3 }, 8, ["class", "style"])); } }); var ZWe = /* @__PURE__ */ Ut(YWe, [["__file", "row.vue"]]); const nU = Yr(ZWe), QWe = 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: $t([Number, Object]), default: () => qp({}) }, sm: { type: $t([Number, Object]), default: () => qp({}) }, md: { type: $t([Number, Object]), default: () => qp({}) }, lg: { type: $t([Number, Object]), default: () => qp({}) }, xl: { type: $t([Number, Object]), default: () => qp({}) } }), JWe = X({ name: "ElCol" }), eKe = /* @__PURE__ */ X({ ...JWe, props: QWe, setup(e) { const t = e, { gutter: n } = Te(tU, { gutter: F(() => 0) }), r = Wt("col"), a = F(() => { const i = {}; return n.value && (i.paddingLeft = i.paddingRight = `${n.value / 2}px`), i; }), o = F(() => { const i = []; return ["span", "offset", "pull", "push"].forEach((s) => { const l = t[s]; oa(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) => { oa(t[s]) ? i.push(r.b(`${s}-${t[s]}`)) : aa(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) => (I(), de(ct(i.tag), { class: H(b(o)), style: Ye(b(a)) }, { default: K(() => [ he(i.$slots, "default") ]), _: 3 }, 8, ["class", "style"])); } }); var tKe = /* @__PURE__ */ Ut(eKe, [["__file", "col.vue"]]); const e_ = Yr(tKe), nKe = X({ name: "ElCollapseTransition" }), rKe = /* @__PURE__ */ X({ ...nKe, setup(e) { const t = Wt("collapse-transition"), n = (a) => { a.style.maxHeight = "", a.style.overflow = a.dataset.oldOverflow, a.style.paddingTop = a.dataset.oldPaddingTop, a.style.paddingBottom = a.dataset.oldPaddingBottom; }, r = { beforeEnter(a) { a.dataset || (a.dataset = {}), a.dataset.oldPaddingTop = a.style.paddingTop, a.dataset.oldPaddingBottom = a.style.paddingBottom, a.style.height && (a.dataset.elExistsHeight = a.style.height), a.style.maxHeight = 0, a.style.paddingTop = 0, a.style.paddingBottom = 0; }, enter(a) { requestAnimationFrame(() => { a.dataset.oldOverflow = a.style.overflow, a.dataset.elExistsHeight ? a.style.maxHeight = a.dataset.elExistsHeight : a.scrollHeight !== 0 ? a.style.maxHeight = `${a.scrollHeight}px` : a.style.maxHeight = 0, a.style.paddingTop = a.dataset.oldPaddingTop, a.style.paddingBottom = a.dataset.oldPaddingBottom, a.style.overflow = "hidden"; }); }, afterEnter(a) { a.style.maxHeight = "", a.style.overflow = a.dataset.oldOverflow; }, enterCancelled(a) { n(a); }, beforeLeave(a) { a.dataset || (a.dataset = {}), a.dataset.oldPaddingTop = a.style.paddingTop, a.dataset.oldPaddingBottom = a.style.paddingBottom, a.dataset.oldOverflow = a.style.overflow, a.style.maxHeight = `${a.scrollHeight}px`, a.style.overflow = "hidden"; }, leave(a) { a.scrollHeight !== 0 && (a.style.maxHeight = 0, a.style.paddingTop = 0, a.style.paddingBottom = 0); }, afterLeave(a) { n(a); }, leaveCancelled(a) { n(a); } }; return (a, o) => (I(), de(vr, Bt({ name: b(t).b() }, LP(r)), { default: K(() => [ he(a.$slots, "default") ]), _: 3 }, 16, ["name"])); } }); var aKe = /* @__PURE__ */ Ut(rKe, [["__file", "collapse-transition.vue"]]); const oKe = Yr(aKe), iKe = Ln({ color: { type: $t(Object), required: !0 }, vertical: { type: Boolean, default: !1 } }); let Wk = !1; function ng(e, t) { if (!br) return; const n = function(o) { var i; (i = t.drag) == null || i.call(t, o); }, r = function(o) { var i; document.removeEventListener("mousemove", n), document.removeEventListener("mouseup", r), document.removeEventListener("touchmove", n), document.removeEventListener("touchend", r), document.onselectstart = null, document.ondragstart = null, Wk = !1, (i = t.end) == null || i.call(t, o); }, a = function(o) { var i; Wk || (o.preventDefault(), document.onselectstart = () => !1, document.ondragstart = () => !1, document.addEventListener("mousemove", n), document.addEventListener("mouseup", r), document.addEventListener("touchmove", n), document.addEventListener("touchend", r), Wk = !0, (i = t.start) == null || i.call(t, o)); }; e.addEventListener("mousedown", a), e.addEventListener("touchstart", a, { passive: !1 }); } const sKe = (e) => { const t = tt(), { t: n } = lm(), r = dn(), a = dn(), o = F(() => e.color.get("alpha")), i = F(() => n("el.colorpicker.alphaLabel")); function s(d) { var f; d.target !== r.value && l(d), (f = r.value) == null || f.focus(); } function l(d) { if (!a.value || !r.value) return; const f = t.vnode.el.getBoundingClientRect(), { clientX: h, clientY: p } = EE(d); if (e.vertical) { let v = p - f.top; v = Math.max(r.value.offsetHeight / 2, v), v = Math.min(v, f.height - r.value.offsetHeight / 2), e.color.set("alpha", Math.round((v - r.value.offsetHeight / 2) / (f.height - r.value.offsetHeight) * 100)); } else { let v = h - f.left; v = Math.max(r.value.offsetWidth / 2, v), v = Math.min(v, f.width - r.value.offsetWidth / 2), e.color.set("alpha", Math.round((v - r.value.offsetWidth / 2) / (f.width - r.value.offsetWidth) * 100)); } } function u(d) { const { code: f, shiftKey: h } = d, p = h ? 10 : 1; switch (f) { case Ar.left: case Ar.down: d.preventDefault(), d.stopPropagation(), c(-p); break; case Ar.right: case Ar.up: d.preventDefault(), d.stopPropagation(), c(p); break; } } function c(d) { let f = o.value + d; f = f < 0 ? 0 : f > 100 ? 100 : f, e.color.set("alpha", f); } return { thumb: r, bar: a, alpha: o, alphaLabel: i, handleDrag: l, handleClick: s, handleKeydown: u }; }, lKe = (e, { bar: t, thumb: n, handleDrag: r }) => { const a = tt(), o = Wt("color-alpha-slider"), i = U(0), s = U(0), l = U(); function u() { if (!n.value || e.vertical) return 0; const y = a.vnode.el, x = e.color.get("alpha"); return y ? Math.round(x * (y.offsetWidth - n.value.offsetWidth / 2) / 100) : 0; } function c() { if (!n.value) return 0; const y = a.vnode.el; if (!e.vertical) return 0; const x = e.color.get("alpha"); return y ? Math.round(x * (y.offsetHeight - n.value.offsetHeight / 2) / 100) : 0; } function d() { if (e.color && e.color.value) { const { r: y, g: x, b: w } = e.color.toRgb(); return `linear-gradient(to right, rgba(${y}, ${x}, ${w}, 0) 0%, rgba(${y}, ${x}, ${w}, 1) 100%)`; } return ""; } function f() { i.value = u(), s.value = c(), l.value = d(); } nt(() => { if (!t.value || !n.value) return; const y = { drag: (x) => { r(x); }, end: (x) => { r(x); } }; ng(t.value, y), ng(n.value, y), f(); }), be(() => e.color.get("alpha"), () => f()), be(() => e.color.value, () => f()); const h = F(() => [o.b(), o.is("vertical", e.vertical)]), p = F(() => o.e("bar")), v = F(() => o.e("thumb")), m = F(() => ({ background: l.value })), g = F(() => ({ left: Gf(i.value), top: Gf(s.value) })); return { rootKls: h, barKls: p, barStyle: m, thumbKls: v, thumbStyle: g, update: f }; }, uKe = "ElColorAlphaSlider", cKe = X({ name: uKe }), dKe = /* @__PURE__ */ X({ ...cKe, props: iKe, setup(e, { expose: t }) { const n = e, { alpha: r, alphaLabel: a, bar: o, thumb: i, handleDrag: s, handleClick: l, handleKeydown: u } = sKe(n), { rootKls: c, barKls: d, barStyle: f, thumbKls: h, thumbStyle: p, update: v } = lKe(n, { bar: o, thumb: i, handleDrag: s }); return t({ update: v, bar: o, thumb: i }), (m, g) => (I(), j("div", { class: H(b(c)) }, [ W("div", { ref_key: "bar", ref: o, class: H(b(d)), style: Ye(b(f)), onClick: b(l) }, null, 14, ["onClick"]), W("div", { ref_key: "thumb", ref: i, class: H(b(h)), style: Ye(b(p)), "aria-label": b(a), "aria-valuenow": b(r), "aria-orientation": m.vertical ? "vertical" : "horizontal", "aria-valuemin": "0", "aria-valuemax": "100", role: "slider", tabindex: "0", onKeydown: b(u) }, null, 46, ["aria-label", "aria-valuenow", "aria-orientation", "onKeydown"]) ], 2)); } }); var pKe = /* @__PURE__ */ Ut(dKe, [["__file", "alpha-slider.vue"]]); const fKe = X({ name: "ElColorHueSlider", props: { color: { type: Object, required: !0 }, vertical: Boolean }, setup(e) { const t = Wt("color-hue-slider"), n = tt(), r = U(), a = U(), o = U(0), i = U(0), s = F(() => e.color.get("hue")); be(() => s.value, () => { f(); }); function l(h) { h.target !== r.value && u(h); } function u(h) { if (!a.value || !r.value) return; const p = n.vnode.el.getBoundingClientRect(), { clientX: v, clientY: m } = EE(h); let g; if (e.vertical) { let y = m - p.top; y = Math.min(y, p.height - r.value.offsetHeight / 2), y = Math.max(r.value.offsetHeight / 2, y), g = Math.round((y - r.value.offsetHeight / 2) / (p.height - r.value.offsetHeight) * 360); } else { let y = v - p.left; y = Math.min(y, p.width - r.value.offsetWidth / 2), y = Math.max(r.value.offsetWidth / 2, y), g = Math.round((y - r.value.offsetWidth / 2) / (p.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 p = e.color.get("hue"); return h ? Math.round(p * (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 p = e.color.get("hue"); return h ? Math.round(p * (h.offsetHeight - r.value.offsetHeight / 2) / 360) : 0; } function f() { o.value = c(), i.value = d(); } return nt(() => { if (!a.value || !r.value) return; const h = { drag: (p) => { u(p); }, end: (p) => { u(p); } }; ng(a.value, h), ng(r.value, h), f(); }), { bar: a, thumb: r, thumbLeft: o, thumbTop: i, hueValue: s, handleClick: l, update: f, ns: t }; } }); function hKe(e, t, n, r, a, o) { return I(), j("div", { class: H([e.ns.b(), e.ns.is("vertical", e.vertical)]) }, [ W("div", { ref: "bar", class: H(e.ns.e("bar")), onClick: e.handleClick }, null, 10, ["onClick"]), W("div", { ref: "thumb", class: H(e.ns.e("thumb")), style: Ye({ left: e.thumbLeft + "px", top: e.thumbTop + "px" }) }, null, 6) ], 2); } var vKe = /* @__PURE__ */ Ut(fKe, [["render", hKe], ["__file", "hue-slider.vue"]]); const gKe = Ln({ modelValue: String, id: String, showAlpha: Boolean, colorFormat: String, disabled: Boolean, size: Ih, popperClass: { type: String, default: "" }, tabindex: { type: [String, Number], default: 0 }, teleported: Za.teleported, predefine: { type: $t(Array) }, validateEvent: { type: Boolean, default: !0 }, ...hc(["ariaLabel"]) }), mKe = { [ea]: (e) => Ta(e) || Lu(e), [ME]: (e) => Ta(e) || Lu(e), activeChange: (e) => Ta(e) || Lu(e), focus: (e) => e instanceof FocusEvent, blur: (e) => e instanceof FocusEvent }, rU = Symbol("colorPickerContextKey"), rI = function(e, t, n) { return [ e, t * n / ((e = (2 - t) * n) < 1 ? e : 2 - e) || 0, e / 2 ]; }, yKe = function(e) { return typeof e == "string" && e.includes(".") && Number.parseFloat(e) === 1; }, bKe = function(e) { return typeof e == "string" && e.includes("%"); }, of = function(e, t) { yKe(e) && (e = "100%"); const n = bKe(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); }, aI = { 10: "A", 11: "B", 12: "C", 13: "D", 14: "E", 15: "F" }, ky = (e) => { e = Math.min(Math.round(e), 255); const t = Math.floor(e / 16), n = e % 16; return `${aI[t] || t}${aI[n] || n}`; }, oI = function({ r: e, g: t, b: n }) { return Number.isNaN(+e) || Number.isNaN(+t) || Number.isNaN(+n) ? "" : `#${ky(e)}${ky(t)}${ky(n)}`; }, Kk = { A: 10, B: 11, C: 12, D: 13, E: 14, F: 15 }, Fc = function(e) { return e.length === 2 ? (Kk[e[0].toUpperCase()] || +e[0]) * 16 + (Kk[e[1].toUpperCase()] || +e[1]) : Kk[e[1].toUpperCase()] || +e[1]; }, wKe = function(e, t, n) { t = t / 100, n = n / 100; let r = t; const a = Math.max(n, 0.01); n *= 2, t *= n <= 1 ? n : 2 - n, r *= a <= 1 ? a : 2 - a; const o = (n + t) / 2, i = n === 0 ? 2 * r / (a + r) : 2 * t / (n + t); return { h: e, s: i * 100, v: o * 100 }; }, iI = (e, t, n) => { e = of(e, 255), t = of(t, 255), n = of(n, 255); const r = Math.max(e, t, n), a = Math.min(e, t, n); let o; const i = r, s = r - a, l = r === 0 ? 0 : s / r; if (r === a) o = 0; else { switch (r) { case e: { o = (t - n) / s + (t < n ? 6 : 0); break; } case t: { o = (n - e) / s + 2; break; } case n: { o = (e - t) / s + 4; break; } } o /= 6; } return { h: o * 360, s: l * 100, v: i * 100 }; }, mv = function(e, t, n) { e = of(e, 360) * 6, t = of(t, 100), n = of(n, 100); const r = Math.floor(e), a = e - r, o = n * (1 - t), i = n * (1 - a * t), s = n * (1 - (1 - a) * t), l = r % 6, u = [n, i, o, o, s, n][l], c = [s, n, n, i, o, o][l], d = [o, o, s, n, n, i][l]; return { r: Math.round(u * 255), g: Math.round(c * 255), b: Math.round(d * 255) }; }; class r0 { 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) Fd(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) Fd(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 mv(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, a, o) => { this._hue = Math.max(0, Math.min(360, r)), this._saturation = Math.max(0, Math.min(100, a)), this._value = Math.max(0, Math.min(100, o)), this.doOnChange(); }; if (t.includes("hsl")) { const r = t.replace(/hsla|hsl|\(|\)/gm, "").split(/\s|,/g).filter((a) => a !== "").map((a, o) => o > 2 ? Number.parseFloat(a) : Number.parseInt(a, 10)); if (r.length === 4 ? this._alpha = Number.parseFloat(r[3]) * 100 : r.length === 3 && (this._alpha = 100), r.length >= 3) { const { h: a, s: o, v: i } = wKe(r[0], r[1], r[2]); n(a, o, i); } } else if (t.includes("hsv")) { const r = t.replace(/hsva|hsv|\(|\)/gm, "").split(/\s|,/g).filter((a) => a !== "").map((a, o) => o > 2 ? Number.parseFloat(a) : Number.parseInt(a, 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((a) => a !== "").map((a, o) => o > 2 ? Number.parseFloat(a) : Number.parseInt(a, 10)); if (r.length === 4 ? this._alpha = Number.parseFloat(r[3]) * 100 : r.length === 3 && (this._alpha = 100), r.length >= 3) { const { h: a, s: o, v: i } = iI(r[0], r[1], r[2]); n(a, o, 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 a, o, i; r.length === 3 ? (a = Fc(r[0] + r[0]), o = Fc(r[1] + r[1]), i = Fc(r[2] + r[2])) : (r.length === 6 || r.length === 8) && (a = Fc(r.slice(0, 2)), o = Fc(r.slice(2, 4)), i = Fc(r.slice(4, 6))), r.length === 8 ? this._alpha = Fc(r.slice(6)) / 255 * 100 : (r.length === 3 || r.length === 6) && (this._alpha = 100); const { h: s, s: l, v: u } = iI(a, o, 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: a, format: o } = this; if (this.enableAlpha) switch (o) { case "hsl": { const i = rI(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 = `${oI(mv(t, n, r))}${ky(a * 255 / 100)}`; break; } default: { const { r: i, g: s, b: l } = mv(t, n, r); this.value = `rgba(${i}, ${s}, ${l}, ${this.get("alpha") / 100})`; } } else switch (o) { case "hsl": { const i = rI(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 } = mv(t, n, r); this.value = `rgb(${i}, ${s}, ${l})`; break; } default: this.value = oI(mv(t, n, r)); } } } const xKe = X({ props: { colors: { type: Array, required: !0 }, color: { type: Object, required: !0 }, enableAlpha: { type: Boolean, required: !0 } }, setup(e) { const t = Wt("color-predefine"), { currentColor: n } = Te(rU), r = U(o(e.colors, e.color)); be(() => n.value, (i) => { const s = new r0(); s.fromString(i), r.value.forEach((l) => { l.selected = s.compare(l); }); }), Hd(() => { r.value = o(e.colors, e.color); }); function a(i) { e.color.fromString(e.colors[i]); } function o(i, s) { return i.map((l) => { const u = new r0(); return u.enableAlpha = e.enableAlpha, u.format = "rgba", u.fromString(l), u.selected = u.value === s.value, u; }); } return { rgbaColors: r, handleSelect: a, ns: t }; } }); function kKe(e, t, n, r, a, o) { return I(), j("div", { class: H(e.ns.b()) }, [ W("div", { class: H(e.ns.e("colors")) }, [ (I(!0), j(Qe, null, Nt(e.rgbaColors, (i, s) => (I(), j("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) }, [ W("div", { style: Ye({ backgroundColor: i.value }) }, null, 4) ], 10, ["onClick"]))), 128)) ], 2) ], 2); } var CKe = /* @__PURE__ */ Ut(xKe, [["render", kKe], ["__file", "predefine.vue"]]); const SKe = X({ name: "ElSlPanel", props: { color: { type: Object, required: !0 } }, setup(e) { const t = Wt("color-svpanel"), n = tt(), r = U(0), a = U(0), o = U("hsl(0, 100%, 50%)"), i = F(() => { 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: f, clientHeight: h } = d; a.value = u * f / 100, r.value = (100 - c) * h / 100, o.value = `hsl(${e.color.get("hue")}, 100%, 50%)`; } function l(u) { const c = n.vnode.el.getBoundingClientRect(), { clientX: d, clientY: f } = EE(u); let h = d - c.left, p = f - c.top; h = Math.max(0, h), h = Math.min(h, c.width), p = Math.max(0, p), p = Math.min(p, c.height), a.value = h, r.value = p, e.color.set({ saturation: h / c.width * 100, value: 100 - p / c.height * 100 }); } return be(() => i.value, () => { s(); }), nt(() => { ng(n.vnode.el, { drag: (u) => { l(u); }, end: (u) => { l(u); } }), s(); }), { cursorTop: r, cursorLeft: a, background: o, colorValue: i, handleDrag: l, update: s, ns: t }; } }); function EKe(e, t, n, r, a, o) { return I(), j("div", { class: H(e.ns.b()), style: Ye({ backgroundColor: e.background }) }, [ W("div", { class: H(e.ns.e("white")) }, null, 2), W("div", { class: H(e.ns.e("black")) }, null, 2), W("div", { class: H(e.ns.e("cursor")), style: Ye({ top: e.cursorTop + "px", left: e.cursorLeft + "px" }) }, [ W("div") ], 6) ], 6); } var _Ke = /* @__PURE__ */ Ut(SKe, [["render", EKe], ["__file", "sv-panel.vue"]]); const TKe = X({ name: "ElColorPicker" }), OKe = /* @__PURE__ */ X({ ...TKe, props: gKe, emits: mKe, setup(e, { expose: t, emit: n }) { const r = e, { t: a } = lm(), o = Wt("color"), { formItem: i } = up(), s = Id(), l = dm(), { inputId: u, isLabeledByFormItem: c } = pm(r, { formItemContext: i }), d = U(), f = U(), h = U(), p = U(), v = U(), m = U(), { isFocused: g, handleFocus: y, handleBlur: x } = WE(v, { beforeFocus() { return l.value; }, beforeBlur(Y) { var te; return (te = p.value) == null ? void 0 : te.isFocusInsideContent(Y); }, afterBlur() { R(!1), z(); } }); let w = !0; const k = tn(new r0({ enableAlpha: r.showAlpha, format: r.colorFormat || "", value: r.modelValue })), C = U(!1), S = U(!1), _ = U(""), T = F(() => !r.modelValue && !S.value ? "transparent" : L(k, r.showAlpha)), O = F(() => !r.modelValue && !S.value ? "" : k.value), $ = F(() => c.value ? void 0 : r.ariaLabel || a("el.colorpicker.defaultLabel")), A = F(() => c.value ? i == null ? void 0 : i.labelId : void 0), N = F(() => [ o.b("picker"), o.is("disabled", l.value), o.bm("picker", s.value), o.is("focused", g.value) ]); function L(Y, te) { if (!(Y instanceof r0)) throw new TypeError("color should be instance of _color Class"); const { r: we, g: Oe, b: Ne } = Y.toRgb(); return te ? `rgba(${we}, ${Oe}, ${Ne}, ${Y.get("alpha") / 100})` : `rgb(${we}, ${Oe}, ${Ne})`; } function R(Y) { C.value = Y; } const P = lH(R, 100, { leading: !0 }); function B() { l.value || R(!0); } function M() { P(!1), z(); } function z() { Ue(() => { r.modelValue ? k.fromString(r.modelValue) : (k.value = "", Ue(() => { S.value = !1; })); }); } function Z() { l.value || P(!C.value); } function G() { k.fromString(_.value); } function J() { const Y = k.value; n(ea, Y), n("change", Y), r.validateEvent && (i == null || i.validate("change").catch((te) => wr(te))), P(!1), Ue(() => { const te = new r0({ enableAlpha: r.showAlpha, format: r.colorFormat || "", value: r.modelValue }); k.compare(te) || z(); }); } function se() { P(!1), n(ea, null), n("change", null), r.modelValue !== null && r.validateEvent && (i == null || i.validate("change").catch((Y) => wr(Y))), z(); } function ve() { C.value && (M(), g.value && ee()); } function ge(Y) { Y.preventDefault(), Y.stopPropagation(), R(!1), z(); } function oe(Y) { switch (Y.code) { case Ar.enter: case Ar.space: Y.preventDefault(), Y.stopPropagation(), B(), m.value.focus(); break; case Ar.esc: ge(Y); break; } } function ee() { v.value.focus(); } function q() { v.value.blur(); } return nt(() => { r.modelValue && (_.value = O.value); }), be(() => r.modelValue, (Y) => { Y ? Y && Y !== k.value && (w = !1, k.fromString(Y)) : S.value = !1; }), be(() => [r.colorFormat, r.showAlpha], () => { k.enableAlpha = r.showAlpha, k.format = r.colorFormat || k.format, k.doOnChange(), n(ea, k.value); }), be(() => O.value, (Y) => { _.value = Y, w && n("activeChange", Y), w = !0; }), be(() => k.value, () => { !r.modelValue && !S.value && (S.value = !0); }), be(() => C.value, () => { Ue(() => { var Y, te, we; (Y = d.value) == null || Y.update(), (te = f.value) == null || te.update(), (we = h.value) == null || we.update(); }); }), rt(rU, { currentColor: O }), t({ color: k, show: B, hide: M, focus: ee, blur: q }), (Y, te) => (I(), de(b(fm), { ref_key: "popper", ref: p, visible: C.value, "show-arrow": !1, "fallback-placements": ["bottom", "top", "right", "left"], offset: 0, "gpu-acceleration": !1, "popper-class": [b(o).be("picker", "panel"), b(o).b("dropdown"), Y.popperClass], "stop-popper-mouse-event": !1, effect: "light", trigger: "click", teleported: Y.teleported, transition: `${b(o).namespace.value}-zoom-in-top`, persistent: "", onHide: (we) => R(!1) }, { content: K(() => [ Xe((I(), j("div", { onKeydown: gn(ge, ["esc"]) }, [ W("div", { class: H(b(o).be("dropdown", "main-wrapper")) }, [ ue(vKe, { ref_key: "hue", ref: d, class: "hue-slider", color: b(k), vertical: "" }, null, 8, ["color"]), ue(_Ke, { ref_key: "sv", ref: f, color: b(k) }, null, 8, ["color"]) ], 2), Y.showAlpha ? (I(), de(pKe, { key: 0, ref_key: "alpha", ref: h, color: b(k) }, null, 8, ["color"])) : ne("v-if", !0), Y.predefine ? (I(), de(CKe, { key: 1, ref: "predefine", "enable-alpha": Y.showAlpha, color: b(k), colors: Y.predefine }, null, 8, ["enable-alpha", "color", "colors"])) : ne("v-if", !0), W("div", { class: H(b(o).be("dropdown", "btns")) }, [ W("span", { class: H(b(o).be("dropdown", "value")) }, [ ue(b(Kw), { ref_key: "inputRef", ref: m, modelValue: _.value, "onUpdate:modelValue": (we) => _.value = we, "validate-event": !1, size: "small", onKeyup: gn(G, ["enter"]), onBlur: G }, null, 8, ["modelValue", "onUpdate:modelValue", "onKeyup"]) ], 2), ue(b(Pd), { class: H(b(o).be("dropdown", "link-btn")), text: "", size: "small", onClick: se }, { default: K(() => [ et(Fe(b(a)("el.colorpicker.clear")), 1) ]), _: 1 }, 8, ["class"]), ue(b(Pd), { plain: "", size: "small", class: H(b(o).be("dropdown", "btn")), onClick: J }, { default: K(() => [ et(Fe(b(a)("el.colorpicker.confirm")), 1) ]), _: 1 }, 8, ["class"]) ], 2) ], 40, ["onKeydown"])), [ [b(XH), ve] ]) ]), default: K(() => [ W("div", Bt({ id: b(u), ref_key: "triggerRef", ref: v }, Y.$attrs, { class: b(N), role: "button", "aria-label": b($), "aria-labelledby": b(A), "aria-description": b(a)("el.colorpicker.description", { color: Y.modelValue || "" }), "aria-disabled": b(l), tabindex: b(l) ? -1 : Y.tabindex, onKeydown: oe, onFocus: b(y), onBlur: b(x) }), [ b(l) ? (I(), j("div", { key: 0, class: H(b(o).be("picker", "mask")) }, null, 2)) : ne("v-if", !0), W("div", { class: H(b(o).be("picker", "trigger")), onClick: Z }, [ W("span", { class: H([b(o).be("picker", "color"), b(o).is("alpha", Y.showAlpha)]) }, [ W("span", { class: H(b(o).be("picker", "color-inner")), style: Ye({ backgroundColor: b(T) }) }, [ Xe(ue(b(Sa), { class: H([b(o).be("picker", "icon"), b(o).is("icon-arrow-down")]) }, { default: K(() => [ ue(b(PE)) ]), _: 1 }, 8, ["class"]), [ [mt, Y.modelValue || S.value] ]), Xe(ue(b(Sa), { class: H([b(o).be("picker", "empty"), b(o).is("icon-close")]) }, { default: K(() => [ ue(b(Nb)) ]), _: 1 }, 8, ["class"]), [ [mt, !Y.modelValue && !S.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 $Ke = /* @__PURE__ */ Ut(OKe, [["__file", "color-picker.vue"]]); Yr($Ke); const FKe = X({ name: "ElContainer" }), AKe = /* @__PURE__ */ X({ ...FKe, props: { direction: { type: String } }, setup(e) { const t = e, n = Cr(), r = Wt("container"), a = F(() => t.direction === "vertical" ? !0 : t.direction === "horizontal" ? !1 : n && n.default ? n.default().some((o) => { const i = o.type.name; return i === "ElHeader" || i === "ElFooter"; }) : !1); return (o, i) => (I(), j("section", { class: H([b(r).b(), b(r).is("vertical", b(a))]) }, [ he(o.$slots, "default") ], 2)); } }); var IKe = /* @__PURE__ */ Ut(AKe, [["__file", "container.vue"]]); const PKe = X({ name: "ElAside" }), LKe = /* @__PURE__ */ X({ ...PKe, props: { width: { type: String, default: null } }, setup(e) { const t = e, n = Wt("aside"), r = F(() => t.width ? n.cssVarBlock({ width: t.width }) : {}); return (a, o) => (I(), j("aside", { class: H(b(n).b()), style: Ye(b(r)) }, [ he(a.$slots, "default") ], 6)); } }); var aU = /* @__PURE__ */ Ut(LKe, [["__file", "aside.vue"]]); const NKe = X({ name: "ElFooter" }), MKe = /* @__PURE__ */ X({ ...NKe, props: { height: { type: String, default: null } }, setup(e) { const t = e, n = Wt("footer"), r = F(() => t.height ? n.cssVarBlock({ height: t.height }) : {}); return (a, o) => (I(), j("footer", { class: H(b(n).b()), style: Ye(b(r)) }, [ he(a.$slots, "default") ], 6)); } }); var oU = /* @__PURE__ */ Ut(MKe, [["__file", "footer.vue"]]); const BKe = X({ name: "ElHeader" }), DKe = /* @__PURE__ */ X({ ...BKe, props: { height: { type: String, default: null } }, setup(e) { const t = e, n = Wt("header"), r = F(() => t.height ? n.cssVarBlock({ height: t.height }) : {}); return (a, o) => (I(), j("header", { class: H(b(n).b()), style: Ye(b(r)) }, [ he(a.$slots, "default") ], 6)); } }); var iU = /* @__PURE__ */ Ut(DKe, [["__file", "header.vue"]]); const RKe = X({ name: "ElMain" }), zKe = /* @__PURE__ */ X({ ...RKe, setup(e) { const t = Wt("main"); return (n, r) => (I(), j("main", { class: H(b(t).b()) }, [ he(n.$slots, "default") ], 2)); } }); var sU = /* @__PURE__ */ Ut(zKe, [["__file", "main.vue"]]); const lU = Yr(IKe, { Aside: aU, Footer: oU, Header: iU, Main: sU }); Rl(aU); Rl(oU); const uU = Rl(iU), t_ = Rl(sU), VKe = /* @__PURE__ */ X({ inheritAttrs: !1 }); function jKe(e, t, n, r, a, o) { return he(e.$slots, "default"); } var HKe = /* @__PURE__ */ Ut(VKe, [["render", jKe], ["__file", "collection.vue"]]); const UKe = /* @__PURE__ */ X({ name: "ElCollectionItem", inheritAttrs: !1 }); function qKe(e, t, n, r, a, o) { return he(e.$slots, "default"); } var WKe = /* @__PURE__ */ Ut(UKe, [["render", qKe], ["__file", "collection-item.vue"]]); const KKe = "data-el-collection-item", GKe = (e) => { const t = `El${e}Collection`, n = `${t}Item`, r = Symbol(t), a = Symbol(n), o = { ...HKe, name: t, setup() { const s = U(null), l = /* @__PURE__ */ new Map(); rt(r, { itemMap: l, getItems: () => { const u = b(s); if (!u) return []; const c = Array.from(u.querySelectorAll(`[${KKe}]`)); return [...l.values()].sort((d, f) => c.indexOf(d.ref) - c.indexOf(f.ref)); }, collectionRef: s }); } }, i = { ...WKe, name: n, setup(s, { attrs: l }) { const u = U(null), c = Te(r, void 0); rt(a, { collectionItemRef: u }), nt(() => { const d = b(u); d && c.itemMap.set(d, { ref: d, ...l }); }), kt(() => { const d = b(u); c.itemMap.delete(d); }); } }; return { COLLECTION_INJECTION_KEY: r, COLLECTION_ITEM_INJECTION_KEY: a, ElCollection: o, ElCollectionItem: i }; }, Gk = Ln({ trigger: tg.trigger, effect: { ...Za.effect, default: "light" }, type: { type: $t(String) }, placement: { type: $t(String), default: "bottom" }, popperOptions: { type: $t(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: $t([Number, String]), default: 0 }, maxHeight: { type: $t([Number, String]), default: "" }, popperClass: { type: String, default: "" }, disabled: Boolean, role: { type: String, default: "menu" }, buttonProps: { type: $t(Object) }, teleported: Za.teleported }); Ln({ command: { type: [Object, String, Number], default: () => ({}) }, disabled: Boolean, divided: Boolean, textValue: String, icon: { type: Qu } }); Ln({ onKeydown: { type: $t(Function) } }); GKe("Dropdown"); const cU = Symbol("ElSelectGroup"), hm = Symbol("ElSelect"); function XKe(e, t) { const n = Te(hm), r = Te(cU, { disabled: !1 }), a = F(() => c(wu(n.props.modelValue), e.value)), o = F(() => { var h; if (n.props.multiple) { const p = wu((h = n.props.modelValue) != null ? h : []); return !a.value && p.length >= n.props.multipleLimit && n.props.multipleLimit > 0; } else return !1; }), i = F(() => e.label || (aa(e.value) ? "" : e.value)), s = F(() => e.value || e.label || ""), l = F(() => e.disabled || t.groupDisabled || o.value), u = tt(), c = (h = [], p) => { if (aa(e.value)) { const v = n.props.valueKey; return h && h.some((m) => bo(ll(m, v)) === ll(p, v)); } else return h && h.includes(p); }, d = () => { !e.disabled && !r.disabled && (n.states.hoveringIndex = n.optionsArray.indexOf(u.proxy)); }, f = (h) => { const p = new RegExp(aje(h), "i"); t.visible = p.test(i.value) || e.created; }; return be(() => i.value, () => { !e.created && !n.props.remote && n.setSelected(); }), be(() => e.value, (h, p) => { const { remote: v, valueKey: m } = n.props; if (h !== p && (n.onOptionDestroy(p, u.proxy), n.onOptionCreate(u.proxy)), !e.created && !v) { if (m && aa(h) && aa(p) && h[m] === p[m]) return; n.setSelected(); } }), be(() => r.disabled, () => { t.groupDisabled = r.disabled; }, { immediate: !0 }), { select: n, currentLabel: i, currentValue: s, itemSelected: a, isDisabled: l, hoverItem: d, updateOption: f }; } const YKe = X({ 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 = Ww(), r = F(() => [ t.be("dropdown", "item"), t.is("disabled", b(s)), t.is("selected", b(i)), t.is("hovering", b(f)) ]), a = tn({ index: -1, groupDisabled: !1, visible: !0, hover: !1 }), { currentLabel: o, itemSelected: i, isDisabled: s, select: l, hoverItem: u, updateOption: c } = XKe(e, a), { visible: d, hover: f } = Sr(a), h = tt().proxy; l.onOptionCreate(h), kt(() => { const v = h.value, { selected: m } = l.states, g = (l.props.multiple ? m : [m]).some((y) => y.value === h.value); Ue(() => { l.states.cachedOptions.get(v) === h && !g && l.states.cachedOptions.delete(v); }), l.onOptionDestroy(v, h); }); function p() { s.value || l.handleOptionSelect(h); } return { ns: t, id: n, containerKls: r, currentLabel: o, itemSelected: i, isDisabled: s, select: l, hoverItem: u, updateOption: c, visible: d, hover: f, selectOptionClick: p, states: a }; } }); function ZKe(e, t, n, r, a, o) { return Xe((I(), j("li", { id: e.id, class: H(e.containerKls), role: "option", "aria-disabled": e.isDisabled || void 0, "aria-selected": e.itemSelected, onMouseenter: e.hoverItem, onClick: Je(e.selectOptionClick, ["stop"]) }, [ he(e.$slots, "default", {}, () => [ W("span", null, Fe(e.currentLabel), 1) ]) ], 42, ["id", "aria-disabled", "aria-selected", "onMouseenter", "onClick"])), [ [mt, e.visible] ]); } var n_ = /* @__PURE__ */ Ut(YKe, [["render", ZKe], ["__file", "option.vue"]]); const QKe = X({ name: "ElSelectDropdown", componentName: "ElSelectDropdown", setup() { const e = Te(hm), t = Wt("select"), n = F(() => e.props.popperClass), r = F(() => e.props.multiple), a = F(() => e.props.fitInputWidth), o = U(""); function i() { var s; o.value = `${(s = e.selectRef) == null ? void 0 : s.offsetWidth}px`; } return nt(() => { i(), al(e.selectRef, i); }), { ns: t, minWidth: o, popperClass: n, isMultiple: r, isFitInputWidth: a }; } }); function JKe(e, t, n, r, a, o) { return I(), j("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 ? (I(), j("div", { key: 0, class: H(e.ns.be("dropdown", "header")) }, [ he(e.$slots, "header") ], 2)) : ne("v-if", !0), he(e.$slots, "default"), e.$slots.footer ? (I(), j("div", { key: 1, class: H(e.ns.be("dropdown", "footer")) }, [ he(e.$slots, "footer") ], 2)) : ne("v-if", !0) ], 6); } var eGe = /* @__PURE__ */ Ut(QKe, [["render", JKe], ["__file", "select-dropdown.vue"]]); const tGe = 11, nGe = (e, t) => { const { t: n } = lm(), r = Ww(), a = Wt("select"), o = Wt("input"), i = tn({ 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 = U(null), l = U(null), u = U(null), c = U(null), d = U(null), f = U(null), h = U(null), p = U(null), v = U(null), m = U(null), g = U(null), y = U(null), { isComposing: x, handleCompositionStart: w, handleCompositionUpdate: k, handleCompositionEnd: C } = MH({ afterComposition: (D) => le(D) }), { wrapperRef: S, isFocused: _ } = WE(d, { beforeFocus() { return P.value; }, afterFocus() { e.automaticDropdown && !T.value && (T.value = !0, i.menuVisibleOnFocus = !0); }, beforeBlur(D) { var ae, Ie; return ((ae = u.value) == null ? void 0 : ae.isFocusInsideContent(D)) || ((Ie = c.value) == null ? void 0 : Ie.isFocusInsideContent(D)); }, afterBlur() { T.value = !1, i.menuVisibleOnFocus = !1; } }), T = U(!1), O = U(), { form: $, formItem: A } = up(), { inputId: N } = pm(e, { formItemContext: A }), { valueOnClear: L, isEmptyValue: R } = yUe(e), P = F(() => e.disabled || ($ == null ? void 0 : $.disabled)), B = F(() => no(e.modelValue) ? e.modelValue.length > 0 : !R(e.modelValue)), M = F(() => e.clearable && !P.value && i.inputHovering && B.value), z = F(() => e.remote && e.filterable && !e.remoteShowSuffix ? "" : e.suffixIcon), Z = F(() => a.is("reverse", z.value && T.value)), G = F(() => (A == null ? void 0 : A.validateState) || ""), J = F(() => fH[G.value]), se = F(() => e.remote ? 300 : 0), ve = F(() => 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 && ge.value === 0 ? e.noMatchText || n("el.select.noMatch") : i.options.size === 0 ? e.noDataText || n("el.select.noData") : null), ge = F(() => oe.value.filter((D) => D.visible).length), oe = F(() => { const D = Array.from(i.options.values()), ae = []; return i.optionValues.forEach((Ie) => { const He = D.findIndex((Jt) => Jt.value === Ie); He > -1 && ae.push(D[He]); }), ae.length >= D.length ? ae : D; }), ee = F(() => Array.from(i.cachedOptions.values())), q = F(() => { const D = oe.value.filter((ae) => !ae.created).some((ae) => ae.currentLabel === i.inputValue); return e.filterable && e.allowCreate && i.inputValue !== "" && !D; }), Y = () => { e.filterable && Ua(e.filterMethod) || e.filterable && e.remote && Ua(e.remoteMethod) || oe.value.forEach((D) => { var ae; (ae = D.updateOption) == null || ae.call(D, i.inputValue); }); }, te = Id(), we = F(() => ["small"].includes(te.value) ? "small" : "default"), Oe = F({ get() { return T.value && ve.value !== !1; }, set(D) { T.value = D; } }), Ne = F(() => { if (e.multiple && !Ou(e.modelValue)) return wu(e.modelValue).length === 0 && !i.inputValue; const D = no(e.modelValue) ? e.modelValue[0] : e.modelValue; return e.filterable || Ou(D) ? !i.inputValue : !0; }), xe = F(() => { var D; const ae = (D = e.placeholder) != null ? D : n("el.select.placeholder"); return e.multiple || !B.value ? ae : i.selectedLabel; }), $e = F(() => H5 ? null : "mouseenter"); be(() => e.modelValue, (D, ae) => { e.multiple && e.filterable && !e.reserveKeyword && (i.inputValue = "", Se("")), Me(), !Pb(D, ae) && e.validateEvent && (A == null || A.validate("change").catch((Ie) => wr(Ie))); }, { flush: "post", deep: !0 }), be(() => T.value, (D) => { D ? Se(i.inputValue) : (i.inputValue = "", i.previousQuery = null, i.isBeforeHide = !0), t("visible-change", D); }), be(() => i.options.entries(), () => { var D; if (!br) return; const ae = ((D = s.value) == null ? void 0 : D.querySelectorAll("input")) || []; (!e.filterable && !e.defaultFirstOption && !Ou(e.modelValue) || !Array.from(ae).includes(document.activeElement)) && Me(), e.defaultFirstOption && (e.filterable || e.remote) && ge.value && Pe(); }, { flush: "post" }), be(() => i.hoveringIndex, (D) => { oa(D) && D > -1 ? O.value = oe.value[D] || {} : O.value = {}, oe.value.forEach((ae) => { ae.hover = O.value === ae; }); }), Hd(() => { i.isBeforeHide || Y(); }); const Se = (D) => { i.previousQuery === D || x.value || (i.previousQuery = D, e.filterable && Ua(e.filterMethod) ? e.filterMethod(D) : e.filterable && e.remote && Ua(e.remoteMethod) && e.remoteMethod(D), e.defaultFirstOption && (e.filterable || e.remote) && ge.value ? Ue(Pe) : Ue(Be)); }, Pe = () => { const D = oe.value.filter((He) => He.visible && !He.disabled && !He.states.groupDisabled), ae = D.find((He) => He.created), Ie = D[0]; i.hoveringIndex = _e(oe.value, ae || Ie); }, Me = () => { if (e.multiple) i.selectedLabel = ""; else { const ae = no(e.modelValue) ? e.modelValue[0] : e.modelValue, Ie = je(ae); i.selectedLabel = Ie.currentLabel, i.selected = [Ie]; return; } const D = []; Ou(e.modelValue) || wu(e.modelValue).forEach((ae) => { D.push(je(ae)); }), i.selected = D; }, je = (D) => { let ae; const Ie = Nk(D).toLowerCase() === "object", He = Nk(D).toLowerCase() === "null", Jt = Nk(D).toLowerCase() === "undefined"; for (let un = i.cachedOptions.size - 1; un >= 0; un--) { const en = ee.value[un]; if (Ie ? ll(en.value, e.valueKey) === ll(D, e.valueKey) : en.value === D) { ae = { value: D, currentLabel: en.currentLabel, get isDisabled() { return en.isDisabled; } }; break; } } if (ae) return ae; const fn = Ie ? D.label : !He && !Jt ? D : ""; return { value: D, currentLabel: fn }; }, Be = () => { i.hoveringIndex = oe.value.findIndex((D) => i.selected.some((ae) => Qt(ae) === Qt(D))); }, We = () => { i.selectionWidth = l.value.getBoundingClientRect().width; }, qe = () => { i.calculatorWidth = f.value.getBoundingClientRect().width; }, Ge = () => { i.collapseItemWidth = g.value.getBoundingClientRect().width; }, E = () => { var D, ae; (ae = (D = u.value) == null ? void 0 : D.updatePopper) == null || ae.call(D); }, V = () => { var D, ae; (ae = (D = c.value) == null ? void 0 : D.updatePopper) == null || ae.call(D); }, ie = () => { i.inputValue.length > 0 && !T.value && (T.value = !0), Se(i.inputValue); }, le = (D) => { if (i.inputValue = D.target.value, e.remote) re(); else return ie(); }, re = lH(() => { ie(); }, se.value), ke = (D) => { Pb(e.modelValue, D) || t(ME, D); }, fe = (D) => QVe(D, (ae) => !i.disabledOptions.has(ae)), Ee = (D) => { if (e.multiple && D.code !== Ar.delete && D.target.value.length <= 0) { const ae = wu(e.modelValue).slice(), Ie = fe(ae); if (Ie < 0) return; const He = ae[Ie]; ae.splice(Ie, 1), t(ea, ae), ke(ae), t("remove-tag", He); } }, ze = (D, ae) => { const Ie = i.selected.indexOf(ae); if (Ie > -1 && !P.value) { const He = wu(e.modelValue).slice(); He.splice(Ie, 1), t(ea, He), ke(He), t("remove-tag", ae.value); } D.stopPropagation(), bt(); }, Ve = (D) => { D.stopPropagation(); const ae = e.multiple ? [] : L.value; if (e.multiple) for (const Ie of i.selected) Ie.isDisabled && ae.push(Ie.value); t(ea, ae), ke(ae), i.hoveringIndex = -1, T.value = !1, t("clear"), bt(); }, me = (D) => { var ae; if (e.multiple) { const Ie = wu((ae = e.modelValue) != null ? ae : []).slice(), He = _e(Ie, D.value); He > -1 ? Ie.splice(He, 1) : (e.multipleLimit <= 0 || Ie.length < e.multipleLimit) && Ie.push(D.value), t(ea, Ie), ke(Ie), D.created && Se(""), e.filterable && !e.reserveKeyword && (i.inputValue = ""); } else t(ea, D.value), ke(D.value), T.value = !1; bt(), !T.value && Ue(() => { Ce(D); }); }, _e = (D = [], ae) => { if (!aa(ae)) return D.indexOf(ae); const Ie = e.valueKey; let He = -1; return D.some((Jt, fn) => bo(ll(Jt, Ie)) === ll(ae, Ie) ? (He = fn, !0) : !1), He; }, Ce = (D) => { var ae, Ie, He, Jt, fn; const un = no(D) ? D[0] : D; let en = null; if (un != null && un.value) { const Gt = oe.value.filter((Hr) => Hr.value === un.value); Gt.length > 0 && (en = Gt[0].$el); } if (u.value && en) { const Gt = (Jt = (He = (Ie = (ae = u.value) == null ? void 0 : ae.popperRef) == null ? void 0 : Ie.contentRef) == null ? void 0 : He.querySelector) == null ? void 0 : Jt.call(He, `.${a.be("dropdown", "wrap")}`); Gt && sje(Gt, en); } (fn = y.value) == null || fn.handleScroll(); }, Le = (D) => { i.options.set(D.value, D), i.cachedOptions.set(D.value, D), D.disabled && i.disabledOptions.set(D.value, D); }, yt = (D, ae) => { i.options.get(D) === ae && i.options.delete(D); }, dt = F(() => { var D, ae; return (ae = (D = u.value) == null ? void 0 : D.popperRef) == null ? void 0 : ae.contentRef; }), _t = () => { i.isBeforeHide = !1, Ue(() => Ce(i.selected)); }, bt = () => { var D; (D = d.value) == null || D.focus(); }, Ct = () => { var D; (D = d.value) == null || D.blur(); }, nn = (D) => { Ve(D); }, Dt = () => { T.value = !1, _.value && Ct(); }, Kt = () => { i.inputValue.length > 0 ? i.inputValue = "" : T.value = !1; }, on = () => { P.value || (H5 && (i.inputHovering = !0), i.menuVisibleOnFocus ? i.menuVisibleOnFocus = !1 : T.value = !T.value); }, rn = () => { T.value ? oe.value[i.hoveringIndex] && me(oe.value[i.hoveringIndex]) : on(); }, Qt = (D) => aa(D.value) ? ll(D.value, e.valueKey) : D.value, Sn = F(() => oe.value.filter((D) => D.visible).every((D) => D.disabled)), En = F(() => e.multiple ? e.collapseTags ? i.selected.slice(0, e.maxCollapseTags) : i.selected : []), pn = F(() => e.multiple ? e.collapseTags ? i.selected.slice(e.maxCollapseTags) : [] : []), St = (D) => { if (!T.value) { T.value = !0; return; } if (!(i.options.size === 0 || i.filteredOptionsCount === 0 || x.value) && !Sn.value) { D === "next" ? (i.hoveringIndex++, i.hoveringIndex === i.options.size && (i.hoveringIndex = 0)) : D === "prev" && (i.hoveringIndex--, i.hoveringIndex < 0 && (i.hoveringIndex = i.options.size - 1)); const ae = oe.value[i.hoveringIndex]; (ae.disabled === !0 || ae.states.groupDisabled === !0 || !ae.visible) && St(D), Ue(() => Ce(O.value)); } }, Rt = () => { if (!l.value) return 0; const D = window.getComputedStyle(l.value); return Number.parseFloat(D.gap || "6px"); }, qt = F(() => { const D = Rt(); return { maxWidth: `${g.value && e.maxCollapseTags === 1 ? i.selectionWidth - i.collapseItemWidth - D : i.selectionWidth}px` }; }), _n = F(() => ({ maxWidth: `${i.selectionWidth}px` })), _r = F(() => ({ width: `${Math.max(i.calculatorWidth, tGe)}px` })); return al(l, We), al(f, qe), al(v, E), al(S, E), al(m, V), al(g, Ge), nt(() => { Me(); }), { inputId: N, contentId: r, nsSelect: a, nsInput: o, states: i, isFocused: _, expanded: T, optionsArray: oe, hoverOption: O, selectSize: te, filteredOptionsCount: ge, resetCalculatorWidth: qe, updateTooltip: E, updateTagTooltip: V, debouncedOnInputChange: re, onInput: le, deletePrevTag: Ee, deleteTag: ze, deleteSelected: Ve, handleOptionSelect: me, scrollToOption: Ce, hasModelValue: B, shouldShowPlaceholder: Ne, currentPlaceholder: xe, mouseEnterEventName: $e, showClose: M, iconComponent: z, iconReverse: Z, validateState: G, validateIcon: J, showNewOption: q, updateOptions: Y, collapseTagSize: we, setSelected: Me, selectDisabled: P, emptyText: ve, handleCompositionStart: w, handleCompositionUpdate: k, handleCompositionEnd: C, onOptionCreate: Le, onOptionDestroy: yt, handleMenuEnter: _t, focus: bt, blur: Ct, handleClearClick: nn, handleClickOutside: Dt, handleEsc: Kt, toggleMenu: on, selectOption: rn, getValueKey: Qt, navigateOptions: St, dropdownMenuVisible: Oe, showTagList: En, collapseTagList: pn, tagStyle: qt, collapseTagStyle: _n, inputStyle: _r, popperRef: dt, inputRef: d, tooltipRef: u, tagTooltipRef: c, calculatorRef: f, prefixRef: h, suffixRef: p, selectRef: s, wrapperRef: S, selectionRef: l, scrollbarRef: y, menuRef: v, tagMenuRef: m, collapseItemRef: g }; }; var rGe = X({ name: "ElOptions", setup(e, { slots: t }) { const n = Te(hm); let r = []; return () => { var a, o; const i = (a = t.default) == null ? void 0 : a.call(t), s = []; function l(u) { no(u) && u.forEach((c) => { var d, f, h, p; const v = (d = (c == null ? void 0 : c.type) || {}) == null ? void 0 : d.name; v === "ElOptionGroup" ? l(!Ta(c.children) && !no(c.children) && Ua((f = c.children) == null ? void 0 : f.default) ? (h = c.children) == null ? void 0 : h.default() : c.children) : v === "ElOption" ? s.push((p = c.props) == null ? void 0 : p.value) : no(c.children) && l(c.children); }); } return i.length && l((o = i[0]) == null ? void 0 : o.children), Pb(s, r) || (r = s, n && (n.states.optionValues = s)), i; }; } }); const aGe = Ln({ name: String, id: String, modelValue: { type: [Array, String, Number, Boolean, Object], default: void 0 }, autocomplete: { type: String, default: "off" }, automaticDropdown: Boolean, size: Ih, effect: { type: $t(String), default: "light" }, disabled: Boolean, clearable: Boolean, filterable: Boolean, allowCreate: Boolean, loading: Boolean, popperClass: { type: String, default: "" }, popperOptions: { type: $t(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: Za.teleported, persistent: { type: Boolean, default: !0 }, clearIcon: { type: Qu, default: LE }, fitInputWidth: Boolean, suffixIcon: { type: Qu, default: PE }, tagType: { ...tS.type, default: "info" }, tagEffect: { ...tS.effect, default: "light" }, validateEvent: { type: Boolean, default: !0 }, remoteShowSuffix: Boolean, placement: { type: $t(String), values: Uw, default: "bottom-start" }, fallbackPlacements: { type: $t(Array), default: ["bottom-start", "top-start", "right", "left"] }, appendTo: String, ...mUe, ...hc(["ariaLabel"]) }), sI = "ElSelect", oGe = X({ name: sI, componentName: sI, components: { ElSelectMenu: eGe, ElOption: n_, ElOptions: rGe, ElTag: qWe, ElScrollbar: GUe, ElTooltip: fm, ElIcon: Sa }, directives: { ClickOutside: XH }, props: aGe, emits: [ ea, ME, "remove-tag", "clear", "visible-change", "focus", "blur" ], setup(e, { emit: t }) { const n = F(() => { const { modelValue: o, multiple: i } = e, s = i ? [] : void 0; return no(o) ? i ? o : s : i ? s : o; }), r = tn({ ...Sr(e), modelValue: n }), a = nGe(r, t); return rt(hm, tn({ props: r, states: a.states, optionsArray: a.optionsArray, handleOptionSelect: a.handleOptionSelect, onOptionCreate: a.onOptionCreate, onOptionDestroy: a.onOptionDestroy, selectRef: a.selectRef, setSelected: a.setSelected })), { ...a, modelValue: n }; } }); function iGe(e, t, n, r, a, o) { const i = lt("el-tag"), s = lt("el-tooltip"), l = lt("el-icon"), u = lt("el-option"), c = lt("el-options"), d = lt("el-scrollbar"), f = lt("el-select-menu"), h = Qb("click-outside"); return Xe((I(), j("div", { ref: "selectRef", class: H([e.nsSelect.b(), e.nsSelect.m(e.selectSize)]), [Jb(e.mouseEnterEventName)]: (p) => e.states.inputHovering = !0, onMouseleave: (p) => e.states.inputHovering = !1 }, [ ue(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: (p) => e.states.isBeforeHide = !1 }, { default: K(() => { var p; return [ W("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: Je(e.toggleMenu, ["prevent"]) }, [ e.$slots.prefix ? (I(), j("div", { key: 0, ref: "prefixRef", class: H(e.nsSelect.e("prefix")) }, [ he(e.$slots, "prefix") ], 2)) : ne("v-if", !0), W("div", { ref: "selectionRef", class: H([ e.nsSelect.e("selection"), e.nsSelect.is("near", e.multiple && !e.$slots.prefix && !!e.states.selected.length) ]) }, [ e.multiple ? he(e.$slots, "tag", { key: 0 }, () => [ (I(!0), j(Qe, null, Nt(e.showTagList, (v) => (I(), j("div", { key: e.getValueKey(v), class: H(e.nsSelect.e("selected-item")) }, [ ue(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: K(() => [ W("span", { class: H(e.nsSelect.e("tags-text")) }, [ he(e.$slots, "label", { label: v.currentLabel, value: v.value }, () => [ et(Fe(v.currentLabel), 1) ]) ], 2) ]), _: 2 }, 1032, ["closable", "size", "type", "effect", "style", "onClose"]) ], 2))), 128)), e.collapseTags && e.states.selected.length > e.maxCollapseTags ? (I(), de(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: K(() => [ W("div", { ref: "collapseItemRef", class: H(e.nsSelect.e("selected-item")) }, [ ue(i, { closable: !1, size: e.collapseTagSize, type: e.tagType, effect: e.tagEffect, "disable-transitions": "", style: Ye(e.collapseTagStyle) }, { default: K(() => [ W("span", { class: H(e.nsSelect.e("tags-text")) }, " + " + Fe(e.states.selected.length - e.maxCollapseTags), 3) ]), _: 1 }, 8, ["size", "type", "effect", "style"]) ], 2) ]), content: K(() => [ W("div", { ref: "tagMenuRef", class: H(e.nsSelect.e("selection")) }, [ (I(!0), j(Qe, null, Nt(e.collapseTagList, (v) => (I(), j("div", { key: e.getValueKey(v), class: H(e.nsSelect.e("selected-item")) }, [ ue(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: K(() => [ W("span", { class: H(e.nsSelect.e("tags-text")) }, [ he(e.$slots, "label", { label: v.currentLabel, value: v.value }, () => [ et(Fe(v.currentLabel), 1) ]) ], 2) ]), _: 2 }, 1032, ["closable", "size", "type", "effect", "onClose"]) ], 2))), 128)) ], 2) ]), _: 3 }, 8, ["disabled", "effect", "teleported"])) : ne("v-if", !0) ]) : ne("v-if", !0), e.selectDisabled ? ne("v-if", !0) : (I(), j("div", { key: 1, class: H([ e.nsSelect.e("selected-item"), e.nsSelect.e("input-wrapper"), e.nsSelect.is("hidden", !e.filterable) ]) }, [ Xe(W("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": ((p = e.hoverOption) == null ? void 0 : p.id) || "", "aria-controls": e.contentId, "aria-expanded": e.dropdownMenuVisible, "aria-label": e.ariaLabel, "aria-autocomplete": "none", "aria-haspopup": "listbox", onKeydown: [ gn(Je((v) => e.navigateOptions("next"), ["stop", "prevent"]), ["down"]), gn(Je((v) => e.navigateOptions("prev"), ["stop", "prevent"]), ["up"]), gn(Je(e.handleEsc, ["stop", "prevent"]), ["esc"]), gn(Je(e.selectOption, ["stop", "prevent"]), ["enter"]), gn(Je(e.deletePrevTag, ["stop"]), ["delete"]) ], onCompositionstart: e.handleCompositionStart, onCompositionupdate: e.handleCompositionUpdate, onCompositionend: e.handleCompositionEnd, onInput: e.onInput, onClick: Je(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"]), [ [xg, e.states.inputValue] ]), e.filterable ? (I(), j("span", { key: 0, ref: "calculatorRef", "aria-hidden": "true", class: H(e.nsSelect.e("input-calculator")), textContent: Fe(e.states.inputValue) }, null, 10, ["textContent"])) : ne("v-if", !0) ], 2)), e.shouldShowPlaceholder ? (I(), j("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 ? he(e.$slots, "label", { key: 0, label: e.currentPlaceholder, value: e.modelValue }, () => [ W("span", null, Fe(e.currentPlaceholder), 1) ]) : (I(), j("span", { key: 1 }, Fe(e.currentPlaceholder), 1)) ], 2)) : ne("v-if", !0) ], 2), W("div", { ref: "suffixRef", class: H(e.nsSelect.e("suffix")) }, [ e.iconComponent && !e.showClose ? (I(), de(l, { key: 0, class: H([e.nsSelect.e("caret"), e.nsSelect.e("icon"), e.iconReverse]) }, { default: K(() => [ (I(), de(ct(e.iconComponent))) ]), _: 1 }, 8, ["class"])) : ne("v-if", !0), e.showClose && e.clearIcon ? (I(), de(l, { key: 1, class: H([ e.nsSelect.e("caret"), e.nsSelect.e("icon"), e.nsSelect.e("clear") ]), onClick: e.handleClearClick }, { default: K(() => [ (I(), de(ct(e.clearIcon))) ]), _: 1 }, 8, ["class", "onClick"])) : ne("v-if", !0), e.validateState && e.validateIcon ? (I(), de(l, { key: 2, class: H([e.nsInput.e("icon"), e.nsInput.e("validateIcon")]) }, { default: K(() => [ (I(), de(ct(e.validateIcon))) ]), _: 1 }, 8, ["class"])) : ne("v-if", !0) ], 2) ], 10, ["onClick"]) ]; }), content: K(() => [ ue(f, { ref: "menuRef" }, { default: K(() => [ e.$slots.header ? (I(), j("div", { key: 0, class: H(e.nsSelect.be("dropdown", "header")), onClick: Je(() => { }, ["stop"]) }, [ he(e.$slots, "header") ], 10, ["onClick"])) : ne("v-if", !0), Xe(ue(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: K(() => [ e.showNewOption ? (I(), de(u, { key: 0, value: e.states.inputValue, created: !0 }, null, 8, ["value"])) : ne("v-if", !0), ue(c, null, { default: K(() => [ he(e.$slots, "default") ]), _: 3 }) ]), _: 3 }, 8, ["id", "wrap-class", "view-class", "class", "aria-label"]), [ [mt, e.states.options.size > 0 && !e.loading] ]), e.$slots.loading && e.loading ? (I(), j("div", { key: 1, class: H(e.nsSelect.be("dropdown", "loading")) }, [ he(e.$slots, "loading") ], 2)) : e.loading || e.filteredOptionsCount === 0 ? (I(), j("div", { key: 2, class: H(e.nsSelect.be("dropdown", "empty")) }, [ he(e.$slots, "empty", {}, () => [ W("span", null, Fe(e.emptyText), 1) ]) ], 2)) : ne("v-if", !0), e.$slots.footer ? (I(), j("div", { key: 3, class: H(e.nsSelect.be("dropdown", "footer")), onClick: Je(() => { }, ["stop"]) }, [ he(e.$slots, "footer") ], 10, ["onClick"])) : ne("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 sGe = /* @__PURE__ */ Ut(oGe, [["render", iGe], ["__file", "select.vue"]]); const lGe = X({ name: "ElOptionGroup", componentName: "ElOptionGroup", props: { label: String, disabled: Boolean }, setup(e) { const t = Wt("select"), n = U(null), r = tt(), a = U([]); rt(cU, tn({ ...Sr(e) })); const o = F(() => a.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 = wu(u), d = []; return c.forEach((f) => { var h, p; i(f) ? d.push(f.component.proxy) : (h = f.children) != null && h.length ? d.push(...s(f.children)) : (p = f.component) != null && p.subTree && d.push(...s(f.component.subTree)); }), d; }, l = () => { a.value = s(r.subTree); }; return nt(() => { l(); }), JDe(n, l, { attributes: !0, subtree: !0, childList: !0 }), { groupRef: n, visible: o, ns: t }; } }); function uGe(e, t, n, r, a, o) { return Xe((I(), j("ul", { ref: "groupRef", class: H(e.ns.be("group", "wrap")) }, [ W("li", { class: H(e.ns.be("group", "title")) }, Fe(e.label), 3), W("li", null, [ W("ul", { class: H(e.ns.b("group")) }, [ he(e.$slots, "default") ], 2) ]) ], 2)), [ [mt, e.visible] ]); } var dU = /* @__PURE__ */ Ut(lGe, [["render", uGe], ["__file", "option-group.vue"]]); const cGe = Yr(sGe, { Option: n_, OptionGroup: dU }), dGe = Rl(n_); Rl(dU); const pGe = Ln({ trigger: tg.trigger, placement: Gk.placement, disabled: tg.disabled, visible: Za.visible, transition: Za.transition, popperOptions: Gk.popperOptions, tabindex: Gk.tabindex, content: Za.content, popperStyle: Za.popperStyle, popperClass: Za.popperClass, enterable: { ...Za.enterable, default: !0 }, effect: { ...Za.effect, default: "light" }, teleported: Za.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 } }), fGe = { "update:visible": (e) => Kf(e), "before-enter": () => !0, "before-leave": () => !0, "after-enter": () => !0, "after-leave": () => !0 }, hGe = "onUpdate:visible", vGe = X({ name: "ElPopover" }), gGe = /* @__PURE__ */ X({ ...vGe, props: pGe, emits: fGe, setup(e, { expose: t, emit: n }) { const r = e, a = F(() => r[hGe]), o = Wt("popover"), i = U(), s = F(() => { var m; return (m = b(i)) == null ? void 0 : m.popperRef; }), l = F(() => [ { width: Gf(r.width) }, r.popperStyle ]), u = F(() => [o.b(), r.popperClass, { [o.m("plain")]: !!r.content }]), c = F(() => r.transition === `${o.namespace.value}-fade-in-linear`), d = () => { var m; (m = i.value) == null || m.hide(); }, f = () => { n("before-enter"); }, h = () => { n("before-leave"); }, p = () => { n("after-enter"); }, v = () => { n("update:visible", !1), n("after-leave"); }; return t({ popperRef: s, hide: d }), (m, g) => (I(), de(b(fm), Bt({ 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": b(u), "popper-style": b(l), teleported: m.teleported, persistent: m.persistent, "gpu-acceleration": b(c), "onUpdate:visible": b(a), onBeforeShow: f, onBeforeHide: h, onShow: p, onHide: v }), { content: K(() => [ m.title ? (I(), j("div", { key: 0, class: H(b(o).e("title")), role: "title" }, Fe(m.title), 3)) : ne("v-if", !0), he(m.$slots, "default", {}, () => [ et(Fe(m.content), 1) ]) ]), default: K(() => [ m.$slots.reference ? he(m.$slots, "reference", { key: 0 }) : ne("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 mGe = /* @__PURE__ */ Ut(gGe, [["__file", "popover.vue"]]); const lI = (e, t) => { const n = t.arg || t.value, r = n == null ? void 0 : n.popperRef; r && (r.triggerRef = e); }; var yGe = { mounted(e, t) { lI(e, t); }, updated(e, t) { lI(e, t); } }; const bGe = "popover", wGe = Vje(yGe, bGe); Yr(mGe, { directive: wGe }); const sf = "$treeNodeId", uI = function(e, t) { !t || t[sf] || Object.defineProperty(t, sf, { value: e.id, enumerable: !1, configurable: !1, writable: !1 }); }, r_ = function(e, t) { return e ? t[e] : t[sf]; }, nS = (e, t, n) => { const r = e.value.currentNode; n(); const a = e.value.currentNode; r !== a && t("current-change", a ? a.data : null, a); }, rS = (e) => { let t = !0, n = !0, r = !0; for (let a = 0, o = e.length; a < o; a++) { const i = e[a]; (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 }; }, Iv = function(e) { if (e.childNodes.length === 0 || e.loading) return; const { all: t, none: n, half: r } = rS(e.childNodes); t ? (e.checked = !0, e.indeterminate = !1) : r ? (e.checked = !1, e.indeterminate = !0) : n && (e.checked = !1, e.indeterminate = !1); const a = e.parent; !a || a.level === 0 || e.store.checkStrictly || Iv(a); }, O1 = function(e, t) { const n = e.store.props, r = e.data || {}, a = n[t]; if (typeof a == "function") return a(r, e); if (typeof a == "string") return r[a]; if (typeof a > "u") { const o = r[t]; return o === void 0 ? "" : o; } }; let xGe = 0; class cd { constructor(t) { this.id = xGe++, 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) Fd(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 o = O1(this, "isLeaf"); typeof o == "boolean" && (this.isLeafByUser = o); } 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) || uI(this, this.data), !this.data) return; const r = t.defaultExpandedKeys, a = t.key; a && r && r.includes(this.key) && this.expand(null, t.autoExpandParent), a && 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) || uI(this, t), this.data = t, this.childNodes = []; let n; this.level === 0 && Array.isArray(this.data) ? n = this.data : n = O1(this, "children") || []; for (let r = 0, a = n.length; r < a; r++) this.insertChild({ data: n[r] }); } get label() { return O1(this, "label"); } get key() { const t = this.store.key; return this.data ? this.data[t] : null; } get disabled() { return O1(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 cd)) { if (!r) { const a = this.getChildren(!0); a.includes(t.data) || (typeof n > "u" || n < 0 ? a.push(t.data) : a.splice(n, 0, t.data)); } Object.assign(t, { parent: this, store: this.store }), t = tn(new cd(t)), t instanceof cd && 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 a = this.childNodes.indexOf(t); a > -1 && (this.store && this.store.deregisterNode(t), t.parent = null, this.childNodes.splice(a, 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 a = this.parent; for (; a.level > 0; ) a.expanded = !0, a = a.parent; } this.expanded = !0, t && t(), this.childNodes.forEach((a) => { a.canFocus = !0; }); }; this.shouldLoadData() ? this.loadData((a) => { Array.isArray(a) && (this.checked ? this.setChecked(!0, !0) : this.store.checkStrictly || Iv(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, a) { if (this.indeterminate = t === "half", this.checked = t === !0, this.store.checkStrictly) return; if (!(this.shouldLoadData() && !this.store.checkDescendants)) { const { all: i, allWithoutDisable: s } = rS(this.childNodes); !this.isLeaf && !i && s && (this.checked = !1, t = !1); const l = () => { if (n) { const u = this.childNodes; for (let f = 0, h = u.length; f < h; f++) { const p = u[f]; a = a || t !== !1; const v = p.disabled ? p.checked : a; p.setChecked(v, n, !0, a); } const { half: c, all: d } = rS(u); d || (this.checked = d, this.indeterminate = c); } }; if (this.shouldLoadData()) { this.loadData(() => { l(), Iv(this); }, { checked: t !== !1 }); return; } else l(); } const o = this.parent; !o || o.level === 0 || r || Iv(o); } getChildren(t = !1) { if (this.level === 0) return this.data; const n = this.data; if (!n) return null; const r = this.store.props; let a = "children"; return r && (a = r.children || "children"), n[a] === void 0 && (n[a] = null), t && !n[a] && (n[a] = []), n[a]; } updateChildren() { const t = this.getChildren() || [], n = this.childNodes.map((o) => o.data), r = {}, a = []; t.forEach((o, i) => { const s = o[sf]; s && n.findIndex((l) => l[sf] === s) >= 0 ? r[s] = { index: i, data: o } : a.push({ index: i, data: o }); }), this.store.lazy || n.forEach((o) => { r[o[sf]] || this.removeChildByData(o); }), a.forEach(({ index: o, data: i }) => { this.insertChild({ data: i }, o); }), 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 = (o) => { this.childNodes = [], this.doCreateChildren(o, n), this.loaded = !0, this.loading = !1, this.updateLeafState(), t && t.call(this, o); }, a = () => { this.loading = !1; }; this.store.load(this, r, a); } 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 || Iv(this); } } class kGe { constructor(t) { this.currentNode = null, this.currentNodeKey = null; for (const n in t) Fd(t, n) && (this[n] = t[n]); this.nodesMap = {}; } initialize() { if (this.root = new cd({ 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, a = function(o) { const i = o.root ? o.root.childNodes : o.childNodes; if (i.forEach((s) => { s.visible = n.call(s, t, s.data, s), a(s); }), !o.visible && i.length) { let s = !0; s = !i.some((l) => l.visible), o.root ? o.root.visible = s === !1 : o.visible = s === !1; } t && o.visible && !o.isLeaf && (!r || o.loaded) && o.expand(); }; a(this); } setData(t) { t !== this.root.data ? (this.nodesMap = {}, this.root.setData(t), this._initDefaultCheckedNodes()) : this.root.updateChildren(); } getNode(t) { if (t instanceof cd) return t; const n = aa(t) ? r_(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 = Lb(n) ? this.root : this.getNode(n); r && r.insertChild({ data: t }); } _initDefaultCheckedNodes() { const t = this.defaultCheckedKeys || [], n = this.nodesMap; t.forEach((r) => { const a = n[r]; a && a.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 = [], a = function(o) { (o.root ? o.root.childNodes : o.childNodes).forEach((i) => { (i.checked || n && i.indeterminate) && (!t || t && i.isLeaf) && r.push(i.data), a(i); }); }; return a(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((a) => { a.indeterminate && t.push(a.data), n(a); }); }; return n(this), t; } getHalfCheckedKeys() { return this.getHalfCheckedNodes().map((t) => (t || {})[this.key]); } _getAllNodes() { const t = [], n = this.nodesMap; for (const r in n) Fd(n, r) && t.push(n[r]); return t; } updateChildren(t, n) { const r = this.nodesMap[t]; if (!r) return; const a = r.childNodes; for (let o = a.length - 1; o >= 0; o--) { const i = a[o]; this.remove(i.data); } for (let o = 0, i = n.length; o < i; o++) { const s = n[o]; this.append(s, r.data); } } _setCheckedKeys(t, n = !1, r) { const a = this._getAllNodes().sort((l, u) => l.level - u.level), o = /* @__PURE__ */ Object.create(null), i = Object.keys(r); a.forEach((l) => l.setChecked(!1, !1)); const s = (l) => { l.childNodes.forEach((u) => { var c; o[u.data[t]] = !0, (c = u.childNodes) != null && c.length && s(u); }); }; for (let l = 0, u = a.length; l < u; l++) { const c = a[l], d = c.data[t].toString(); if (!i.includes(d)) { c.checked && !o[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 f = function(h) { h.childNodes.forEach((p) => { p.isLeaf || p.setChecked(!1, !1), f(p); }); }; f(c); } } } setCheckedNodes(t, n = !1) { const r = this.key, a = {}; t.forEach((o) => { a[(o || {})[r]] = !0; }), this._setCheckedKeys(r, n, a); } setCheckedKeys(t, n = !1) { this.defaultCheckedKeys = t; const r = this.key, a = {}; t.forEach((o) => { a[o] = !0; }), this._setCheckedKeys(r, n, a); } 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 a = this.getNode(t); a && a.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], a = this.nodesMap[r]; this.setCurrentNode(a), 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 CGe = X({ name: "ElTreeNodeContent", props: { node: { type: Object, required: !0 }, renderContent: Function }, setup(e) { const t = Wt("tree"), n = Te("NodeInstance"), r = Te("RootTree"); return () => { const a = e.node, { data: o, store: i } = a; return e.renderContent ? e.renderContent(sn, { _self: n, node: a, data: o, store: i }) : he(r.ctx.slots, "default", { node: a, data: o }, () => [ sn("span", { class: t.be("node", "label") }, [a.label]) ]); }; } }); var SGe = /* @__PURE__ */ Ut(CGe, [["__file", "tree-node-content.vue"]]); function pU(e) { const t = Te("TreeNodeMap", null), n = { treeNodeExpand: (r) => { e.node !== r && e.node.collapse(); }, children: [] }; return t && t.children.push(n), rt("TreeNodeMap", n), { broadcastExpanded: (r) => { if (e.accordion) for (const a of n.children) a.treeNodeExpand(r); } }; } const fU = Symbol("dragEvents"); function EGe({ props: e, ctx: t, el$: n, dropIndicator$: r, store: a }) { const o = Wt("tree"), i = U({ showDropIndicator: !1, draggingNode: null, dropNode: null, allowDrop: !0, dropType: null }); return rt(fU, { 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 && ld(c.$el, o.is("drop-inner")); const d = i.value.draggingNode; if (!d || !u) return; let f = !0, h = !0, p = !0, v = !0; typeof e.allowDrop == "function" && (f = e.allowDrop(d.node, u.node, "prev"), v = h = e.allowDrop(d.node, u.node, "inner"), p = e.allowDrop(d.node, u.node, "next")), s.dataTransfer.dropEffect = h || f || p ? "move" : "none", (f || h || p) && (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)), f || h || p ? i.value.dropNode = u : i.value.dropNode = null, u.node.nextSibling === d.node && (p = !1), u.node.previousSibling === d.node && (f = !1), u.node.contains(d.node, !1) && (h = !1), (d.node === u.node || d.node.contains(u.node)) && (f = !1, h = !1, p = !1); const m = u.$el.querySelector(`.${o.be("node", "content")}`).getBoundingClientRect(), g = n.value.getBoundingClientRect(); let y; const x = f ? h ? 0.25 : p ? 0.45 : 1 : -1, w = p ? h ? 0.75 : f ? 0.55 : 0 : 1; let k = -9999; const C = s.clientY - m.top; C < m.height * x ? y = "before" : C > m.height * w ? y = "after" : h ? y = "inner" : y = "none"; const S = u.$el.querySelector(`.${o.be("node", "expand-icon")}`).getBoundingClientRect(), _ = r.value; y === "before" ? k = S.top - g.top : y === "after" && (k = S.bottom - g.top), _.style.top = `${k}px`, _.style.left = `${S.right - g.left}px`, y === "inner" ? X5(u.$el, o.is("drop-inner")) : ld(u.$el, o.is("drop-inner")), i.value.showDropIndicator = y === "before" || y === "after", i.value.allowDrop = i.value.showDropIndicator || v, i.value.dropType = y, 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" && (a.value.registerNode(d), a.value.key && l.node.eachNode((f) => { var h; (h = a.value.nodesMap[f.data[a.value.key]]) == null || h.setChecked(f.checked, !a.value.checkStrictly); })), ld(c.$el, o.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 _Ge = X({ name: "ElTreeNode", components: { ElCollapseTransition: oKe, ElCheckbox: zWe, NodeContent: SGe, ElIcon: Sa, Loading: NE }, props: { node: { type: cd, default: () => ({}) }, props: { type: Object, default: () => ({}) }, accordion: Boolean, renderContent: Function, renderAfterExpand: Boolean, showCheckbox: { type: Boolean, default: !1 } }, emits: ["node-expand"], setup(e, t) { const n = Wt("tree"), { broadcastExpanded: r } = pU(e), a = Te("RootTree"), o = U(!1), i = U(!1), s = U(null), l = U(null), u = U(null), c = Te(fU), d = tt(); rt("NodeInstance", d), a || wr("Tree", "Can not find node's tree."), e.node.expanded && (o.value = !0, i.value = !0); const f = a.props.props.children || "children"; be(() => { const w = e.node.data[f]; return w && [...w]; }, () => { e.node.updateChildren(); }), be(() => e.node.indeterminate, (w) => { v(e.node.checked, w); }), be(() => e.node.checked, (w) => { v(w, e.node.indeterminate); }), be(() => e.node.childNodes.length, () => e.node.reInitChecked()), be(() => e.node.expanded, (w) => { Ue(() => o.value = w), w && (i.value = !0); }); const h = (w) => r_(a.props.nodeKey, w.data), p = (w) => { const k = e.props.class; if (!k) return {}; let C; if (Ua(k)) { const { data: S } = w; C = k(S, w); } else C = k; return Ta(C) ? { [C]: !0 } : C; }, v = (w, k) => { (s.value !== w || l.value !== k) && a.ctx.emit("check-change", e.node.data, w, k), s.value = w, l.value = k; }, m = (w) => { nS(a.store, a.ctx.emit, () => a.store.value.setCurrentNode(e.node)), a.currentNode.value = e.node, a.props.expandOnClickNode && y(), a.props.checkOnClickNode && !e.node.disabled && x(null, { target: { checked: !e.node.checked } }), a.ctx.emit("node-click", e.node.data, e.node, d, w); }, g = (w) => { a.instance.vnode.props.onNodeContextmenu && (w.stopPropagation(), w.preventDefault()), a.ctx.emit("node-contextmenu", w, e.node.data, e.node, d); }, y = () => { e.node.isLeaf || (o.value ? (a.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, !a.props.checkStrictly), Ue(() => { const C = a.store.value; a.ctx.emit("check", e.node.data, { checkedNodes: C.getCheckedNodes(), checkedKeys: C.getCheckedKeys(), halfCheckedNodes: C.getHalfCheckedNodes(), halfCheckedKeys: C.getHalfCheckedKeys() }); }); }; return { ns: n, node$: u, tree: a, expanded: o, childNodeRendered: i, oldChecked: s, oldIndeterminate: l, getNodeKey: h, getNodeClass: p, handleSelectChange: v, handleClick: m, handleContextMenu: g, handleExpandIconClick: y, handleCheckChange: x, handleChildNodeExpand: (w, k, C) => { r(k), a.ctx.emit("node-expand", w, k, C); }, handleDragStart: (w) => { a.props.draggable && c.treeNodeDragStart({ event: w, treeNode: e }); }, handleDragOver: (w) => { w.preventDefault(), a.props.draggable && c.treeNodeDragOver({ event: w, treeNode: { $el: u.value, node: e.node } }); }, handleDrop: (w) => { w.preventDefault(); }, handleDragEnd: (w) => { a.props.draggable && c.treeNodeDragEnd(w); }, CaretRight: hje }; } }); function TGe(e, t, n, r, a, o) { const i = lt("el-icon"), s = lt("el-checkbox"), l = lt("loading"), u = lt("node-content"), c = lt("el-tree-node"), d = lt("el-collapse-transition"); return Xe((I(), j("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: Je(e.handleClick, ["stop"]), onContextmenu: e.handleContextMenu, onDragstart: Je(e.handleDragStart, ["stop"]), onDragover: Je(e.handleDragOver, ["stop"]), onDragend: Je(e.handleDragEnd, ["stop"]), onDrop: Je(e.handleDrop, ["stop"]) }, [ W("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 ? (I(), de(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: Je(e.handleExpandIconClick, ["stop"]) }, { default: K(() => [ (I(), de(ct(e.tree.props.icon || e.CaretRight))) ]), _: 1 }, 8, ["class", "onClick"])) : ne("v-if", !0), e.showCheckbox ? (I(), de(s, { key: 1, "model-value": e.node.checked, indeterminate: e.node.indeterminate, disabled: !!e.node.disabled, onClick: Je(() => { }, ["stop"]), onChange: e.handleCheckChange }, null, 8, ["model-value", "indeterminate", "disabled", "onClick", "onChange"])) : ne("v-if", !0), e.node.loading ? (I(), de(i, { key: 2, class: H([e.ns.be("node", "loading-icon"), e.ns.is("loading")]) }, { default: K(() => [ ue(l) ]), _: 1 }, 8, ["class"])) : ne("v-if", !0), ue(u, { node: e.node, "render-content": e.renderContent }, null, 8, ["node", "render-content"]) ], 6), ue(d, null, { default: K(() => [ !e.renderAfterExpand || e.childNodeRendered ? Xe((I(), j("div", { key: 0, class: H(e.ns.be("node", "children")), role: "group", "aria-expanded": e.expanded }, [ (I(!0), j(Qe, null, Nt(e.node.childNodes, (f) => (I(), de(c, { key: e.getNodeKey(f), "render-content": e.renderContent, "render-after-expand": e.renderAfterExpand, "show-checkbox": e.showCheckbox, node: f, 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"])), [ [mt, e.expanded] ]) : ne("v-if", !0) ]), _: 1 }) ], 42, ["aria-expanded", "aria-disabled", "aria-checked", "draggable", "data-key", "onClick", "onContextmenu", "onDragstart", "onDragover", "onDragend", "onDrop"])), [ [mt, e.node.visible] ]); } var OGe = /* @__PURE__ */ Ut(_Ge, [["render", TGe], ["__file", "tree-node.vue"]]); function $Ge({ el$: e }, t) { const n = Wt("tree"), r = dn([]), a = dn([]); nt(() => { o(); }), jd(() => { r.value = Array.from(e.value.querySelectorAll("[role=treeitem]")), a.value = Array.from(e.value.querySelectorAll("input[type=checkbox]")); }), be(a, (i) => { i.forEach((s) => { s.setAttribute("tabindex", "-1"); }); }), Ko(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 ([Ar.up, Ar.down].includes(l)) { if (i.preventDefault(), l === Ar.up) { c = u === -1 ? 0 : u !== 0 ? u - 1 : r.value.length - 1; const f = c; for (; !t.value.getNode(r.value[c].dataset.key).canFocus; ) { if (c--, c === f) { c = -1; break; } c < 0 && (c = r.value.length - 1); } } else { c = u === -1 ? 0 : u < r.value.length - 1 ? u + 1 : 0; const f = c; for (; !t.value.getNode(r.value[c].dataset.key).canFocus; ) { if (c++, c === f) { c = -1; break; } c >= r.value.length && (c = 0); } } c !== -1 && r.value[c].focus(); } [Ar.left, Ar.right].includes(l) && (i.preventDefault(), s.click()); const d = s.querySelector('[type="checkbox"]'); [Ar.enter, Ar.space].includes(l) && d && (i.preventDefault(), d.click()); }); const o = () => { var i; r.value = Array.from(e.value.querySelectorAll(`.${n.is("focusable")}[role=treeitem]`)), a.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 FGe = X({ name: "ElTree", components: { ElTreeNode: OGe }, 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: Qu } }, 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 } = lm(), r = Wt("tree"), a = Te(hm, null), o = U(new kGe({ 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 })); o.value.initialize(); const i = U(o.value.root), s = U(null), l = U(null), u = U(null), { broadcastExpanded: c } = pU(e), { dragState: d } = EGe({ props: e, ctx: t, el$: l, dropIndicator$: u, store: o }); $Ge({ el$: l }, o); const f = F(() => { const { childNodes: M } = i.value, z = a ? a.hasFilteredOptions !== 0 : !1; return (!M || M.length === 0 || M.every(({ visible: Z }) => !Z)) && !z; }); be(() => e.currentNodeKey, (M) => { o.value.setCurrentNodeKey(M); }), be(() => e.defaultCheckedKeys, (M) => { o.value.setDefaultCheckedKey(M); }), be(() => e.defaultExpandedKeys, (M) => { o.value.setDefaultExpandedKeys(M); }), be(() => e.data, (M) => { o.value.setData(M); }, { deep: !0 }), be(() => e.checkStrictly, (M) => { o.value.checkStrictly = M; }); const h = (M) => { if (!e.filterNodeMethod) throw new Error("[Tree] filterNodeMethod is required when filter"); o.value.filter(M); }, p = (M) => r_(e.nodeKey, M.data), v = (M) => { if (!e.nodeKey) throw new Error("[Tree] nodeKey is required in getNodePath"); const z = o.value.getNode(M); if (!z) return []; const Z = [z.data]; let G = z.parent; for (; G && G !== i.value; ) Z.push(G.data), G = G.parent; return Z.reverse(); }, m = (M, z) => o.value.getCheckedNodes(M, z), g = (M) => o.value.getCheckedKeys(M), y = () => { const M = o.value.getCurrentNode(); return M ? M.data : null; }, x = () => { if (!e.nodeKey) throw new Error("[Tree] nodeKey is required in getCurrentKey"); const M = y(); return M ? M[e.nodeKey] : null; }, w = (M, z) => { if (!e.nodeKey) throw new Error("[Tree] nodeKey is required in setCheckedNodes"); o.value.setCheckedNodes(M, z); }, k = (M, z) => { if (!e.nodeKey) throw new Error("[Tree] nodeKey is required in setCheckedKeys"); o.value.setCheckedKeys(M, z); }, C = (M, z, Z) => { o.value.setChecked(M, z, Z); }, S = () => o.value.getHalfCheckedNodes(), _ = () => o.value.getHalfCheckedKeys(), T = (M, z = !0) => { if (!e.nodeKey) throw new Error("[Tree] nodeKey is required in setCurrentNode"); nS(o, t.emit, () => { c(M), o.value.setUserCurrentNode(M, z); }); }, O = (M, z = !0) => { if (!e.nodeKey) throw new Error("[Tree] nodeKey is required in setCurrentKey"); nS(o, t.emit, () => { c(), o.value.setCurrentNodeKey(M, z); }); }, $ = (M) => o.value.getNode(M), A = (M) => { o.value.remove(M); }, N = (M, z) => { o.value.append(M, z); }, L = (M, z) => { o.value.insertBefore(M, z); }, R = (M, z) => { o.value.insertAfter(M, z); }, P = (M, z, Z) => { c(z), t.emit("node-expand", M, z, Z); }, B = (M, z) => { if (!e.nodeKey) throw new Error("[Tree] nodeKey is required in updateKeyChild"); o.value.updateChildren(M, z); }; return rt("RootTree", { ctx: t, props: e, store: o, root: i, currentNode: s, instance: tt() }), rt(eg, void 0), { ns: r, store: o, root: i, currentNode: s, dragState: d, el$: l, dropIndicator$: u, isEmpty: f, filter: h, getNodeKey: p, getNodePath: v, getCheckedNodes: m, getCheckedKeys: g, getCurrentNode: y, getCurrentKey: x, setCheckedNodes: w, setCheckedKeys: k, setChecked: C, getHalfCheckedNodes: S, getHalfCheckedKeys: _, setCurrentNode: T, setCurrentKey: O, t: n, getNode: $, remove: A, append: N, insertBefore: L, insertAfter: R, handleNodeExpand: P, updateKeyChildren: B }; } }); function AGe(e, t, n, r, a, o) { const i = lt("el-tree-node"); return I(), j("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" }, [ (I(!0), j(Qe, null, Nt(e.root.childNodes, (s) => (I(), de(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 ? (I(), j("div", { key: 0, class: H(e.ns.e("empty-block")) }, [ he(e.$slots, "empty", {}, () => { var s; return [ W("span", { class: H(e.ns.e("empty-text")) }, Fe((s = e.emptyText) != null ? s : e.t("el.tree.emptyText")), 3) ]; }) ], 2)) : ne("v-if", !0), Xe(W("div", { ref: "dropIndicator$", class: H(e.ns.e("drop-indicator")) }, null, 2), [ [mt, e.dragState.showDropIndicator] ]) ], 2); } var IGe = /* @__PURE__ */ Ut(FGe, [["render", AGe], ["__file", "tree.vue"]]); Yr(IGe); function PGe(e) { let t; const n = U(!1), r = tn({ ...e, originalPosition: "", originalOverflow: "", visible: !1 }); function a(f) { r.text = f; } function o() { const f = r.parent, h = d.ns; if (!f.vLoadingAddClassList) { let p = f.getAttribute("loading-number"); p = Number.parseInt(p) - 1, p ? f.setAttribute("loading-number", p.toString()) : (ld(f, h.bm("parent", "relative")), f.removeAttribute("loading-number")), ld(f, h.bm("parent", "hidden")); } i(), c.unmount(); } function i() { var f, h; (h = (f = d.$el) == null ? void 0 : f.parentNode) == null || h.removeChild(d.$el); } function s() { var f; e.beforeClose && !e.beforeClose() || (n.value = !0, clearTimeout(t), t = setTimeout(l, 400), r.visible = !1, (f = e.closed) == null || f.call(e)); } function l() { if (!n.value) return; const f = r.parent; n.value = !1, f.vLoadingAddClassList = void 0, o(); } const u = X({ name: "ElLoading", setup(f, { expose: h }) { const { ns: p, zIndex: v } = wUe("loading"); return h({ ns: p, zIndex: v }), () => { const m = r.spinner || r.svg, g = sn("svg", { class: "circular", viewBox: r.svgViewBox ? r.svgViewBox : "0 0 50 50", ...m ? { innerHTML: m } : {} }, [ sn("circle", { class: "path", cx: "25", cy: "25", r: "20", fill: "none" }) ]), y = r.text ? sn("p", { class: p.b("text") }, [r.text]) : void 0; return sn(vr, { name: p.b("fade"), onAfterLeave: l }, { default: K(() => [ Xe(ue("div", { style: { backgroundColor: r.background || "" }, class: [ p.b("mask"), r.customClass, r.fullscreen ? "is-fullscreen" : "" ] }, [ sn("div", { class: p.b("spinner") }, [g, y]) ]), [[mt, r.visible]]) ]) }); }; } }), c = e2(u), d = c.mount(document.createElement("div")); return { ...Sr(r), setText: a, removeElLoadingChild: i, close: s, handleAfterLeave: l, vm: d, get $el() { return d.$el; } }; } let $1; const LGe = function(e = {}) { if (!br) return; const t = NGe(e); if (t.fullscreen && $1) return $1; const n = PGe({ ...t, closed: () => { var a; (a = t.closed) == null || a.call(t), t.fullscreen && ($1 = void 0); } }); MGe(t, t.parent, n), cI(t, t.parent, n), t.parent.vLoadingAddClassList = () => cI(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), Ue(() => n.visible.value = t.visible), t.fullscreen && ($1 = n), n; }, NGe = (e) => { var t, n, r, a; let o; return Ta(e.target) ? o = (t = document.querySelector(e.target)) != null ? t : document.body : o = e.target || document.body, { parent: o === document.body || e.body ? document.body : o, background: e.background || "", svg: e.svg || "", svgViewBox: e.svgViewBox || "", spinner: e.spinner || !1, text: e.text || "", fullscreen: o === document.body && ((n = e.fullscreen) != null ? n : !0), lock: (r = e.lock) != null ? r : !1, customClass: e.customClass || "", visible: (a = e.visible) != null ? a : !0, beforeClose: e.beforeClose, closed: e.closed, target: o }; }, MGe = async (e, t, n) => { const { nextZIndex: r } = n.vm.zIndex || n.vm._.exposed.zIndex, a = {}; if (e.fullscreen) n.originalPosition.value = vv(document.body, "position"), n.originalOverflow.value = vv(document.body, "overflow"), a.zIndex = r(); else if (e.parent === document.body) { n.originalPosition.value = vv(document.body, "position"), await Ue(); for (const o of ["top", "left"]) { const i = o === "top" ? "scrollTop" : "scrollLeft"; a[o] = `${e.target.getBoundingClientRect()[o] + document.body[i] + document.documentElement[i] - Number.parseInt(vv(document.body, `margin-${o}`), 10)}px`; } for (const o of ["height", "width"]) a[o] = `${e.target.getBoundingClientRect()[o]}px`; } else n.originalPosition.value = vv(t, "position"); for (const [o, i] of Object.entries(a)) n.$el.style[o] = i; }, cI = (e, t, n) => { const r = n.vm.ns || n.vm._.exposed.ns; ["absolute", "fixed", "sticky"].includes(n.originalPosition.value) ? ld(t, r.bm("parent", "relative")) : X5(t, r.bm("parent", "relative")), e.fullscreen && e.lock ? X5(t, r.bm("parent", "hidden")) : ld(t, r.bm("parent", "hidden")); }, Cy = Symbol("ElLoading"), dI = (e, t) => { var n, r, a, o; const i = t.instance, s = (f) => aa(t.value) ? t.value[f] : void 0, l = (f) => { const h = Ta(f) && (i == null ? void 0 : i[f]) || f; return h && U(h); }, u = (f) => l(s(f) || e.getAttribute(`element-loading-${pRe(f)}`)), 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: (a = s("body")) != null ? a : t.modifiers.body, lock: (o = s("lock")) != null ? o : t.modifiers.lock }; e[Cy] = { options: d, instance: LGe(d) }; }, BGe = (e, t) => { for (const n of Object.keys(t)) ar(t[n]) && (t[n].value = e[n]); }, DGe = { mounted(e, t) { t.value && dI(e, t); }, updated(e, t) { const n = e[Cy]; t.oldValue !== t.value && (t.value && !t.oldValue ? dI(e, t) : t.value && t.oldValue ? aa(t.value) && BGe(t.value, n.options) : n == null || n.instance.close()); }, unmounted(e) { var t; (t = e[Cy]) == null || t.instance.close(), e[Cy] = null; } }, Xw = (e, t) => { const n = e.__vccOpts || e; for (const [r, a] of t) n[r] = a; return n; }, RGe = { name: "AnnotationPopup", props: { annotationEntry: { type: Object } }, inject: ["$annotator", "userApiKey"], data: function() { return { displayPair: { "Feature ID": "featureId", Tooltip: "label", Models: "models", Name: "name", Resource: "resourceId" }, editing: !1, evidencePrefixes: ["", "DOI:", "PMID:"], evidencePrefix: "", evidence: [], authenticated: !1, newEvidence: "", comment: "", prevSubs: [], showSubmissions: !0, errorMessage: "", creator: void 0 }; }, computed: { isEditable: function() { return this.annotationEntry.resourceId && this.annotationEntry.featureId; }, isPositionUpdated: function() { return this.annotationEntry.resourceId && this.annotationEntry.type === "updated" && this.annotationEntry.positionUpdated; }, isDeleted: function() { return this.annotationEntry.resourceId && this.annotationEntry.type === "deleted"; } }, methods: { 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; this.$annotator && this.authenticated && this.annotationEntry.resourceId && this.annotationEntry.featureId && ((e = this.$annotator) == null || e.itemAnnotations( this.userApiKey, this.annotationEntry.resourceId, this.annotationEntry.featureId ).then((t) => { this.prevSubs = t; }).catch((t) => { console.log(t); })); }, submit: function() { var e; if (this.annotationEntry.type === "updated" && this.annotationEntry.positionUpdated ? this.comment = this.comment ? `Position Updated: ${this.comment}` : "Position Updated" : this.annotationEntry.type === "deleted" && (this.comment = this.comment ? `Feature Deleted: ${this.comment}` : "Feature Deleted"), (this.evidence.length > 0 || this.comment) && this.annotationEntry.resourceId && this.annotationEntry.featureId) { const t = []; this.evidence.forEach((r) => { if (r.includes("DOI:")) { const a = r.replace("DOI:", "https://doi.org/"); t.push(new URL(a)); } else if (r.includes("PMID:")) { const a = r.replace( "PMID:", "https://pubmed.ncbi.nlm.nih.gov/" ); t.push(new URL(a)); } else t.push(r); }); const n = { resource: this.annotationEntry.resourceId, item: Object.assign( { id: this.annotationEntry.featureId }, Object.fromEntries( Object.entries(this.annotationEntry).filter( ([r]) => ["label", "models"].includes(r) ) ) ), body: { evidence: t, comment: this.comment }, feature: this.annotationEntry.feature }; Object.assign(n.body, this.annotationEntry.body), this.annotationEntry.type === "deleted" && (n.feature = void 0), this.creator && (n.creator = this.creator), (e = this.$annotator) == null || e.addAnnotation(this.userApiKey, n).then(() => { this.$emit("annotation", n), this.errorMessage = "", this.resetSubmission(), this.updatePrevSubmissions(); }).catch(() => { this.errorMessage = "There is a problem with the submission, please try again later"; }); } }, removeEvidence: function(e) { this.evidence.splice(e, 1); }, resetSubmission: function() { this.editing = !1, this.evidence = [], this.newFeature = "", this.comment = ""; } }, watch: { annotationEntry: { handler: function(e, t) { e !== t && (this.resetSubmission(), this.updatePrevSubmissions()); }, immediate: !1, deep: !1 } }, 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.updatePrevSubmissions()) : this.errorMessage = ""; }); } }, cp = (e) => (No("data-v-9930ef40"), e = e(), Mo(), e), zGe = { class: "block" }, VGe = /* @__PURE__ */ cp(() => /* @__PURE__ */ W("div", { class: "title" }, "Feature Annotations", -1)), jGe = /* @__PURE__ */ cp(() => /* @__PURE__ */ W("strong", { class: "sub-title" }, "Previous submissions:", -1)), HGe = /* @__PURE__ */ cp(() => /* @__PURE__ */ W("strong", null, "Evidence: ", -1)), UGe = ["href"], qGe = /* @__PURE__ */ cp(() => /* @__PURE__ */ W("strong", null, "Comment: ", -1)), WGe = /* @__PURE__ */ cp(() => /* @__PURE__ */ W("strong", { class: "sub-title" }, "Suggest changes:", -1)), KGe = /* @__PURE__ */ cp(() => /* @__PURE__ */ W("strong", null, "Evidence:", -1)), GGe = /* @__PURE__ */ cp(() => /* @__PURE__ */ W("strong", null, "Comment:", -1)), XGe = { class: "sub-title" }; function YGe(e, t, n, r, a, o) { const i = nU, s = pje, l = Sa, u = PE, c = Sje, d = kje, f = _je, h = e_, p = Nb, v = dGe, m = cGe, g = Kw, y = Pd, x = t_; return I(), de(x, { class: "main" }, { default: K(() => [ W("div", zGe, [ ue(i, { class: "info-field" }, { default: K(() => [ VGe ]), _: 1 }), n.annotationEntry ? (I(), j(Qe, { key: 0 }, [ (I(!0), j(Qe, null, Nt(e.displayPair, (w, k) => Xe((I(), de(i, { class: "dialog-text", key: w }, { default: K(() => [ W("strong", null, Fe(k) + ": ", 1), et(" " + Fe(n.annotationEntry[w]), 1) ]), _: 2 }, 1024)), [ [mt, n.annotationEntry[w]] ])), 128)), e.prevSubs.length > 0 ? (I(), j(Qe, { key: 0 }, [ Xe(W("div", { class: "hide", onClick: t[0] || (t[0] = (w) => e.showSubmissions = !1) }, [ et(" Hide previous submissions "), ue(l, null, { default: K(() => [ ue(s) ]), _: 1 }) ], 512), [ [mt, e.showSubmissions] ]), Xe(W("div", { class: "hide", onClick: t[1] || (t[1] = (w) => e.showSubmissions = !0) }, [ et(" Show previous " + Fe(e.prevSubs.length) + " submission(s) ", 1), ue(l, null, { default: K(() => [ ue(u) ]), _: 1 }) ], 512), [ [mt, !e.showSubmissions] ]), e.showSubmissions ? (I(), j(Qe, { key: 0 }, [ ue(i, { class: "dialog-spacer" }), ue(i, { class: "dialog-text" }, { default: K(() => [ jGe ]), _: 1 }), (I(!0), j(Qe, null, Nt(e.prevSubs, (w, k) => (I(), j("div", { class: "entry", key: k }, [ ue(i, { class: "dialog-text" }, { default: K(() => [ W("strong", null, Fe(o.formatTime(w.created)), 1), et(" " + Fe(w.creator.name), 1) ]), _: 2 }, 1024), ue(i, { class: "dialog-text" }, { default: K(() => [ HGe, (I(!0), j(Qe, null, Nt(w.body.evidence, (C) => (I(), de(i, { key: C, class: "dialog-text" }, { default: K(() => [ W("a", { href: C, target: "_blank" }, Fe(C), 9, UGe) ]), _: 2 }, 1024))), 128)) ]), _: 2 }, 1024), ue(i, { class: "dialog-text" }, { default: K(() => [ qGe, et(" " + Fe(w.body.comment), 1) ]), _: 2 }, 1024) ]))), 128)) ], 64)) : ne("", !0) ], 64)) : ne("", !0), e.authenticated ? (I(), j(Qe, { key: 1 }, [ o.isEditable ? (I(), j(Qe, { key: 0 }, [ ue(i, { class: "dialog-spacer" }), e.editing ? (I(), j(Qe, { key: 1 }, [ ue(i, { class: "dialog-text" }, { default: K(() => [ WGe ]), _: 1 }), o.isDeleted ? ne("", !0) : (I(), j(Qe, { key: 0 }, [ ue(i, { class: "dialog-text" }, { default: K(() => [ KGe ]), _: 1 }), (I(!0), j(Qe, null, Nt(e.evidence, (w, k) => (I(), de(i, { key: w }, { default: K(() => [ ue(h, { span: 20 }, { default: K(() => [ et(Fe(e.evidence[k]), 1) ]), _: 2 }, 1024), ue(h, { span: 4 }, { default: K(() => [ ue(l, { class: "standard-icon" }, { default: K(() => [ ue(p, { onClick: (C) => o.removeEvidence(k) }, null, 8, ["onClick"]) ]), _: 2 }, 1024) ]), _: 2 }, 1024) ]), _: 2 }, 1024))), 128)), ue(i, null, { default: K(() => [ ue(g, { size: "small", placeholder: "Enter", modelValue: e.newEvidence, "onUpdate:modelValue": t[4] || (t[4] = (w) => e.newEvidence = w), onChange: t[5] || (t[5] = (w) => o.evidenceEntered(w)) }, { prepend: K(() => [ ue(m, { teleported: !1, modelValue: e.evidencePrefix, "onUpdate:modelValue": t[3] || (t[3] = (w) => e.evidencePrefix = w), placeholder: "No Prefix", class: "select-box", "popper-class": "flatmap_dropdown" }, { default: K(() => [ (I(!0), j(Qe, null, Nt(e.evidencePrefixes, (w) => (I(), de(v, { key: w, label: w, value: w }, { default: K(() => [ ue(i, null, { default: K(() => [ ue(h, { span: 12 }, { default: K(() => [ et(Fe(w), 1) ]), _: 2 }, 1024) ]), _: 2 }, 1024) ]), _: 2 }, 1032, ["label", "value"]))), 128)) ]), _: 1 }, 8, ["modelValue"]) ]), _: 1 }, 8, ["modelValue"]) ]), _: 1 }) ], 64)), ue(i, null, { default: K(() => [ GGe ]), _: 1 }), ue(i, { class: "dialog-text" }, { default: K(() => [ ue(g, { type: "textarea", autosize: { minRows: 2, maxRows: 4 }, placeholder: "Enter", modelValue: e.comment, "onUpdate:modelValue": t[6] || (t[6] = (w) => e.comment = w) }, null, 8, ["modelValue"]) ]), _: 1 }), ue(i, { class: "dialog-text" }, { default: K(() => [ ue(y, { class: "button", type: "primary", plain: "", onClick: o.submit }, { default: K(() => [ et(" Submit ") ]), _: 1 }, 8, ["onClick"]) ]), _: 1 }) ], 64)) : (I(), de(i, { key: 0 }, { default: K(() => [ ue(l, { class: "standard-icon" }, { default: K(() => [ ue(c, { onClick: t[2] || (t[2] = (w) => e.editing = !0) }) ]), _: 1 }), o.isDeleted ? (I(), de(l, { key: 0, class: "standard-icon" }, { default: K(() => [ ue(d, { onClick: o.submit }, null, 8, ["onClick"]) ]), _: 1 })) : o.isPositionUpdated ? (I(), de(l, { key: 1, class: "standard-icon" }, { default: K(() => [ ue(f, { onClick: o.submit }, null, 8, ["onClick"]) ]), _: 1 })) : ne("", !0) ]), _: 1 })), e.errorMessage ? (I(), de(i, { key: 2, class: "dialog-text" }, { default: K(() => [ W("strong", XGe, Fe(e.errorMessage), 1) ]), _: 1 })) : ne("", !0) ], 64)) : ne("", !0) ], 64)) : ne("", !0) ], 64)) : ne("", !0) ]) ]), _: 1 }); } const ZGe = /* @__PURE__ */ Xw(RGe, [["render", YGe], ["__scopeId", "data-v-9930ef40"]]), QGe = { name: "CreateTooltipContent", components: { Button: Pd, Col: e_, Container: lU, Header: uU, Input: Kw, Main: t_ }, 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"); } } }, JGe = (e) => (No("data-v-d61c5879"), e = e(), Mo(), e), eXe = /* @__PURE__ */ JGe(() => /* @__PURE__ */ W("span", { class: "create-text" }, " Primitives will be created in the __annotation region ", -1)); function tXe(e, t, n, r, a, o) { const i = uU, s = e_, l = nU, u = Kw, c = Pd, d = t_, f = lU; return I(), de(f, { class: "create-container" }, { default: K(() => [ ue(i, { height: "30px", class: "header" }, { default: K(() => [ W("div", null, "Create " + Fe(n.createData.shape), 1) ]), _: 1 }), ue(d, { class: "slides-block" }, { default: K(() => [ eXe, Xe(ue(l, { class: "row" }, { default: K(() => [ ue(s, { offset: 0, span: 8 }, { default: K(() => [ et(" Position: ") ]), _: 1 }), ue(s, { offset: 0, span: 16 }, { default: K(() => [ (I(!0), j(Qe, null, Nt(n.createData.points, ({ value: h, i: p }) => (I(), de(l, { key: p, class: "value" }, { default: K(() => [ et(Fe(p), 1) ]), _: 2 }, 1024))), 128)) ]), _: 1 }) ]), _: 1 }, 512), [ [mt, e.showPoint] ]), ue(l, { class: "row" }, { default: K(() => [ ue(s, { offset: 0, span: 8 }, { default: K(() => [ et(" Region: ") ]), _: 1 }), ue(s, { offset: 0, span: 16 }, { default: K(() => [ ue(u, { modelValue: e.region, "onUpdate:modelValue": t[0] || (t[0] = (h) => e.region = h), placeholder: "__annotation", size: "small" }, null, 8, ["modelValue"]) ]), _: 1 }) ]), _: 1 }), ue(l, { class: "row" }, { default: K(() => [ ue(s, { offset: 0, span: 8 }, { default: K(() => [ et(" Group: ") ]), _: 1 }), ue(s, { offset: 0, span: 16 }, { default: K(() => [ ue(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 }), ue(l, null, { default: K(() => [ ue(s, { offset: 0, span: 12 }, { default: K(() => [ ue(c, { type: "primary", plain: "", onClick: o.confirm }, { default: K(() => [ et(Fe(o.confirmText), 1) ]), _: 1 }, 8, ["onClick"]) ]), _: 1 }), ue(s, { offset: 0, span: 12 }, { default: K(() => [ ue(c, { type: "primary", plain: "", onClick: o.cancel }, { default: K(() => [ et(" Cancel ") ]), _: 1 }, 8, ["onClick"]) ]), _: 1 }) ]), _: 1 }) ]), _: 1 }) ]), _: 1 }); } const nXe = /* @__PURE__ */ Xw(QGe, [["render", tXe], ["__scopeId", "data-v-d61c5879"]]); function Rr(e) { "@babel/helpers - typeof"; return Rr = 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; }, Rr(e); } function a_(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function"); } function rXe(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 o_(e, t, n) { return t && rXe(e.prototype, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } function hU(e, t, n) { return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e; } function Oi(e, t) { return aXe(e) || oXe(e, t) || vU(e, t) || iXe(); } function aXe(e) { if (Array.isArray(e)) return e; } function oXe(e, t) { var n = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"]; if (n != null) { var r = [], a = !0, o = !1, i, s; try { for (n = n.call(e); !(a = (i = n.next()).done) && (r.push(i.value), !(t && r.length === t)); a = !0) ; } catch (l) { o = !0, s = l; } finally { try { !a && n.return != null && n.return(); } finally { if (o) throw s; } } return r; } } function vU(e, t) { if (e) { if (typeof e == "string") return pI(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 pI(e, t); } } function pI(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 iXe() { 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 gU(e, t) { var n = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"]; if (!n) { if (Array.isArray(e) || (n = vU(e)) || t) { n && (e = n); var r = 0, a = function() { }; return { s: a, n: function() { return r >= e.length ? { done: !0 } : { done: !1, value: e[r++] }; }, e: function(l) { throw l; }, f: a }; } 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 o = !0, i = !1, s; return { s: function() { n = n.call(e); }, n: function() { var l = n.next(); return o = l.done, l; }, e: function(l) { i = !0, s = l; }, f: function() { try { !o && n.return != null && n.return(); } finally { if (i) throw s; } } }; } var Or = typeof window > "u" ? null : window, fI = Or ? Or.navigator : null; Or && Or.document; var sXe = Rr(""), mU = Rr({}), lXe = Rr(function() { }), uXe = typeof HTMLElement > "u" ? "undefined" : Rr(HTMLElement), vm = function(e) { return e && e.instanceString && sr(e.instanceString) ? e.instanceString() : null; }, wt = function(e) { return e != null && Rr(e) == sXe; }, sr = function(e) { return e != null && Rr(e) === lXe; }, Vn = function(e) { return !Po(e) && (Array.isArray ? Array.isArray(e) : e != null && e instanceof Array); }, mn = function(e) { return e != null && Rr(e) === mU && !Vn(e) && e.constructor === Object; }, cXe = function(e) { return e != null && Rr(e) === mU; }, it = function(e) { return e != null && Rr(e) === Rr(1) && !isNaN(e); }, dXe = function(e) { return it(e) && Math.floor(e) === e; }, Db = function(e) { if (uXe !== "undefined") return e != null && e instanceof HTMLElement; }, Po = function(e) { return gm(e) || yU(e); }, gm = function(e) { return vm(e) === "collection" && e._private.single; }, yU = function(e) { return vm(e) === "collection" && !e._private.single; }, i_ = function(e) { return vm(e) === "core"; }, bU = function(e) { return vm(e) === "stylesheet"; }, pXe = function(e) { return vm(e) === "event"; }, Ju = function(e) { return e == null ? !0 : !!(e === "" || e.match(/^\s+$/)); }, fXe = function(e) { return typeof HTMLElement > "u" ? !1 : e instanceof HTMLElement; }, hXe = function(e) { return mn(e) && it(e.x1) && it(e.x2) && it(e.y1) && it(e.y2); }, vXe = function(e) { return cXe(e) && sr(e.then); }, gXe = function() { return fI && fI.userAgent.match(/msie|trident|edge/i); }, rg = function(e, t) { t || (t = function() { if (arguments.length === 1) return arguments[0]; if (arguments.length === 0) return "undefined"; for (var r = [], a = 0; a < arguments.length; a++) r.push(arguments[a]); return r.join("$"); }); var n = function r() { var a = this, o = arguments, i, s = t.apply(a, o), l = r.cache; return (i = l[s]) || (i = l[s] = e.apply(a, o)), i; }; return n.cache = {}, n; }, s_ = rg(function(e) { return e.replace(/([A-Z])/g, function(t) { return "-" + t.toLowerCase(); }); }), Yw = rg(function(e) { return e.replace(/(-\w)/g, function(t) { return t[1].toUpperCase(); }); }), wU = rg(function(e, t) { return e + t[0].toUpperCase() + t.substring(1); }, function(e, t) { return e + "$" + t; }), hI = function(e) { return Ju(e) ? e : e.charAt(0).toUpperCase() + e.substring(1); }, Nr = "(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))", mXe = "rgb[a]?\\((" + Nr + "[%]?)\\s*,\\s*(" + Nr + "[%]?)\\s*,\\s*(" + Nr + "[%]?)(?:\\s*,\\s*(" + Nr + "))?\\)", yXe = "rgb[a]?\\((?:" + Nr + "[%]?)\\s*,\\s*(?:" + Nr + "[%]?)\\s*,\\s*(?:" + Nr + "[%]?)(?:\\s*,\\s*(?:" + Nr + "))?\\)", bXe = "hsl[a]?\\((" + Nr + ")\\s*,\\s*(" + Nr + "[%])\\s*,\\s*(" + Nr + "[%])(?:\\s*,\\s*(" + Nr + "))?\\)", wXe = "hsl[a]?\\((?:" + Nr + ")\\s*,\\s*(?:" + Nr + "[%])\\s*,\\s*(?:" + Nr + "[%])(?:\\s*,\\s*(?:" + Nr + "))?\\)", xXe = "\\#[0-9a-fA-F]{3}", kXe = "\\#[0-9a-fA-F]{6}", xU = function(e, t) { return e < t ? -1 : e > t ? 1 : 0; }, CXe = function(e, t) { return -1 * xU(e, t); }, At = 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 a = Object.keys(r), o = 0; o < a.length; o++) { var i = a[o]; e[i] = r[i]; } } return e; }, SXe = function(e) { if (!(!(e.length === 4 || e.length === 7) || e[0] !== "#")) { var t = e.length === 4, n, r, a, o = 16; return t ? (n = parseInt(e[1] + e[1], o), r = parseInt(e[2] + e[2], o), a = parseInt(e[3] + e[3], o)) : (n = parseInt(e[1] + e[2], o), r = parseInt(e[3] + e[4], o), a = parseInt(e[5] + e[6], o)), [n, r, a]; } }, EXe = function(e) { var t, n, r, a, o, i, s, l; function u(h, p, v) { return v < 0 && (v += 1), v > 1 && (v -= 1), v < 1 / 6 ? h + (p - h) * 6 * v : v < 1 / 2 ? p : v < 2 / 3 ? h + (p - h) * (2 / 3 - v) * 6 : h; } var c = new RegExp("^" + bXe + "$").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, a = parseFloat(c[3]), a < 0 || a > 100) || (a = a / 100, o = c[4], o !== void 0 && (o = parseFloat(o), o < 0 || o > 1))) return; if (r === 0) i = s = l = Math.round(a * 255); else { var d = a < 0.5 ? a * (1 + r) : a + r - a * r, f = 2 * a - d; i = Math.round(255 * u(f, d, n + 1 / 3)), s = Math.round(255 * u(f, d, n)), l = Math.round(255 * u(f, d, n - 1 / 3)); } t = [i, s, l, o]; } return t; }, _Xe = function(e) { var t, n = new RegExp("^" + mXe + "$").exec(e); if (n) { t = []; for (var r = [], a = 1; a <= 3; a++) { var o = n[a]; if (o[o.length - 1] === "%" && (r[a] = !0), o = parseFloat(o), r[a] && (o = o / 100 * 255), o < 0 || o > 255) return; t.push(Math.floor(o)); } 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; }, TXe = function(e) { return $Xe[e.toLowerCase()]; }, OXe = function(e) { return (Vn(e) ? e : null) || TXe(e) || SXe(e) || _Xe(e) || EXe(e); }, $Xe = { // 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] }, kU = function(e) { for (var t = e.map, n = e.keys, r = n.length, a = 0; a < r; a++) { var o = n[a]; if (mn(o)) throw Error("Tried to set map with object key"); a < n.length - 1 ? (t[o] == null && (t[o] = {}), t = t[o]) : t[o] = e.value; } }, CU = function(e) { for (var t = e.map, n = e.keys, r = n.length, a = 0; a < r; a++) { var o = n[a]; if (mn(o)) throw Error("Tried to get map with object key"); if (t = t[o], t == null) return t; } return t; }; function FXe(e) { var t = typeof e; return e != null && (t == "object" || t == "function"); } var Ld = FXe, Pv = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}; function AXe(e, t) { return t = { exports: {} }, e(t, t.exports), t.exports; } var IXe = typeof Pv == "object" && Pv && Pv.Object === Object && Pv, PXe = IXe, LXe = typeof self == "object" && self && self.Object === Object && self, NXe = PXe || LXe || Function("return this")(), Zw = NXe, MXe = function() { return Zw.Date.now(); }, Xk = MXe, BXe = /\s/; function DXe(e) { for (var t = e.length; t-- && BXe.test(e.charAt(t)); ) ; return t; } var RXe = DXe, zXe = /^\s+/; function VXe(e) { return e && e.slice(0, RXe(e) + 1).replace(zXe, ""); } var jXe = VXe, HXe = Zw.Symbol, eh = HXe, SU = Object.prototype, UXe = SU.hasOwnProperty, qXe = SU.toString, yv = eh ? eh.toStringTag : void 0; function WXe(e) { var t = UXe.call(e, yv), n = e[yv]; try { e[yv] = void 0; var r = !0; } catch { } var a = qXe.call(e); return r && (t ? e[yv] = n : delete e[yv]), a; } var KXe = WXe, GXe = Object.prototype, XXe = GXe.toString; function YXe(e) { return XXe.call(e); } var ZXe = YXe, QXe = "[object Null]", JXe = "[object Undefined]", vI = eh ? eh.toStringTag : void 0; function eYe(e) { return e == null ? e === void 0 ? JXe : QXe : vI && vI in Object(e) ? KXe(e) : ZXe(e); } var EU = eYe; function tYe(e) { return e != null && typeof e == "object"; } var nYe = tYe, rYe = "[object Symbol]"; function aYe(e) { return typeof e == "symbol" || nYe(e) && EU(e) == rYe; } var mm = aYe, gI = NaN, oYe = /^[-+]0x[0-9a-f]+$/i, iYe = /^0b[01]+$/i, sYe = /^0o[0-7]+$/i, lYe = parseInt; function uYe(e) { if (typeof e == "number") return e; if (mm(e)) return gI; if (Ld(e)) { var t = typeof e.valueOf == "function" ? e.valueOf() : e; e = Ld(t) ? t + "" : t; } if (typeof e != "string") return e === 0 ? e : +e; e = jXe(e); var n = iYe.test(e); return n || sYe.test(e) ? lYe(e.slice(2), n ? 2 : 8) : oYe.test(e) ? gI : +e; } var mI = uYe, cYe = "Expected a function", dYe = Math.max, pYe = Math.min; function fYe(e, t, n) { var r, a, o, i, s, l, u = 0, c = !1, d = !1, f = !0; if (typeof e != "function") throw new TypeError(cYe); t = mI(t) || 0, Ld(n) && (c = !!n.leading, d = "maxWait" in n, o = d ? dYe(mI(n.maxWait) || 0, t) : o, f = "trailing" in n ? !!n.trailing : f); function h(C) { var S = r, _ = a; return r = a = void 0, u = C, i = e.apply(_, S), i; } function p(C) { return u = C, s = setTimeout(g, t), c ? h(C) : i; } function v(C) { var S = C - l, _ = C - u, T = t - S; return d ? pYe(T, o - _) : T; } function m(C) { var S = C - l, _ = C - u; return l === void 0 || S >= t || S < 0 || d && _ >= o; } function g() { var C = Xk(); if (m(C)) return y(C); s = setTimeout(g, v(C)); } function y(C) { return s = void 0, f && r ? h(C) : (r = a = void 0, i); } function x() { s !== void 0 && clearTimeout(s), u = 0, r = l = a = s = void 0; } function w() { return s === void 0 ? i : y(Xk()); } function k() { var C = Xk(), S = m(C); if (r = arguments, a = this, l = C, S) { if (s === void 0) return p(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 Qw = fYe, Yk = Or ? Or.performance : null, _U = Yk && Yk.now ? function() { return Yk.now(); } : function() { return Date.now(); }, hYe = function() { if (Or) { if (Or.requestAnimationFrame) return function(e) { Or.requestAnimationFrame(e); }; if (Or.mozRequestAnimationFrame) return function(e) { Or.mozRequestAnimationFrame(e); }; if (Or.webkitRequestAnimationFrame) return function(e) { Or.webkitRequestAnimationFrame(e); }; if (Or.msRequestAnimationFrame) return function(e) { Or.msRequestAnimationFrame(e); }; } return function(e) { e && setTimeout(function() { e(_U()); }, 1e3 / 60); }; }(), Rb = function(e) { return hYe(e); }, Sl = _U, Yp = 9261, TU = 65599, Lv = 5381, OU = function(e) { for (var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Yp, n = t, r; r = e.next(), !r.done; ) n = n * TU + r.value | 0; return n; }, ag = function(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Yp; return t * TU + e | 0; }, og = function(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Lv; return (t << 5) + t + e | 0; }, vYe = function(e, t) { return e * 2097152 + t; }, Jl = function(e) { return e[0] * 2097152 + e[1]; }, F1 = function(e, t) { return [ag(e[0], t[0]), og(e[1], t[1])]; }, gYe = function(e, t) { var n = { value: 0, done: !1 }, r = 0, a = e.length, o = { next: function() { return r < a ? n.value = e[r++] : n.done = !0, n; } }; return OU(o, t); }, Nd = function(e, t) { var n = { value: 0, done: !1 }, r = 0, a = e.length, o = { next: function() { return r < a ? n.value = e.charCodeAt(r++) : n.done = !0, n; } }; return OU(o, t); }, $U = function() { return mYe(arguments); }, mYe = function(e) { for (var t, n = 0; n < e.length; n++) { var r = e[n]; n === 0 ? t = Nd(r) : t = Nd(r, t); } return t; }, yI = !0, yYe = console.warn != null, bYe = console.trace != null, l_ = Number.MAX_SAFE_INTEGER || 9007199254740991, FU = function() { return !0; }, zb = function() { return !1; }, bI = function() { return 0; }, u_ = function() { }, pr = function(e) { throw new Error(e); }, AU = function(e) { if (e !== void 0) yI = !!e; else return yI; }, An = function(e) { AU() && (yYe ? console.warn(e) : (console.log(e), bYe && console.trace())); }, wYe = function(e) { return At({}, e); }, fs = function(e) { return e == null ? e : Vn(e) ? e.slice() : mn(e) ? wYe(e) : e; }, xYe = function(e) { return e.slice(); }, IU = 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; }, kYe = {}, PU = function() { return kYe; }, ya = function(e) { var t = Object.keys(e); return function(n) { for (var r = {}, a = 0; a < t.length; a++) { var o = t[a], i = n == null ? void 0 : n[o]; r[o] = i === void 0 ? e[o] : i; } return r; }; }, ec = function(e, t, n) { for (var r = e.length - 1; r >= 0; r--) e[r] === t && e.splice(r, 1); }, c_ = function(e) { e.splice(0, e.length); }, CYe = function(e, t) { for (var n = 0; n < t.length; n++) { var r = t[n]; e.push(r); } }, Li = function(e, t, n) { return n && (t = wU(n, t)), e[t]; }, xu = function(e, t, n, r) { n && (t = wU(n, t)), e[t] = r; }, SYe = /* @__PURE__ */ function() { function e() { a_(this, e), this._obj = {}; } return o_(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; }(), hs = typeof Map < "u" ? Map : SYe, EYe = "undefined", _Ye = /* @__PURE__ */ function() { function e(t) { if (a_(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 o_(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; }(), Lh = (typeof Set > "u" ? "undefined" : Rr(Set)) !== EYe ? Set : _Ye, Jw = function(e, t) { var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !0; if (e === void 0 || t === void 0 || !i_(e)) { pr("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") { pr("An element must be of type `nodes` or `edges`; you specified `" + r + "`"); return; } this.length = 1, this[0] = this; var a = 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 Lh(), // 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 (a.position.x == null && (a.position.x = 0), a.position.y == null && (a.position.y = 0), t.renderedPosition) { var o = t.renderedPosition, i = e.pan(), s = e.zoom(); a.position = { x: (o.x - i.x) / s, y: (o.y - i.y) / s }; } var l = []; Vn(t.classes) ? l = t.classes : wt(t.classes) && (l = t.classes.split(/\s+/)); for (var u = 0, c = l.length; u < c; u++) { var d = l[u]; !d || d === "" || a.classes.add(d); } this.createEmitter(); var f = t.style || t.css; f && (An("Setting a `style` bypass at element creation should be done only when absolutely necessary. Try to use the stylesheet instead."), this.style(f)), (n === void 0 || n) && this.restore(); }, wI = function(e) { return e = { bfs: e.bfs || !e.dfs, dfs: e.dfs || !e.bfs }, function(t, n, r) { var a; mn(t) && !Po(t) && (a = t, t = a.roots || a.root, n = a.visit, r = a.directed), r = arguments.length === 2 && !sr(n) ? n : r, n = sr(n) ? n : function() { }; for (var o = this._private.cy, i = t = wt(t) ? this.filter(t) : t, s = [], l = [], u = {}, c = {}, d = {}, f = 0, h, p = this.byGroup(), v = p.nodes, m = p.edges, g = 0; g < i.length; g++) { var y = i[g], x = y.id(); y.isNode() && (s.unshift(y), e.bfs && (d[x] = !0, l.push(y)), c[x] = 0); } for (var w = function() { var O = e.bfs ? s.shift() : s.pop(), $ = O.id(); if (e.dfs) { if (d[$]) return "continue"; d[$] = !0, l.push(O); } var A = c[$], N = u[$], L = N != null ? N.source() : null, R = N != null ? N.target() : null, P = N == null ? void 0 : O.same(L) ? R[0] : L[0], B = void 0; if (B = n(O, N, P, f++, A), B === !0) return h = O, "break"; if (B === !1) return "break"; for (var M = O.connectedEdges().filter(function(se) { return (!r || se.source().same(O)) && m.has(se); }), z = 0; z < M.length; z++) { var Z = M[z], G = Z.connectedNodes().filter(function(se) { return !se.same(O) && v.has(se); }), J = G.id(); G.length !== 0 && !d[J] && (G = G[0], s.push(G), e.bfs && (d[J] = !0, l.push(G)), u[J] = Z, c[J] = c[$] + 1); } }; s.length !== 0; ) { var k = w(); if (k !== "continue" && k === "break") break; } for (var C = o.collection(), S = 0; S < l.length; S++) { var _ = l[S], T = u[_.id()]; T != null && C.push(T), C.push(_); } return { path: o.collection(C), found: o.collection(h) }; }; }, ig = { breadthFirstSearch: wI({ bfs: !0 }), depthFirstSearch: wI({ dfs: !0 }) }; ig.bfs = ig.breadthFirstSearch; ig.dfs = ig.depthFirstSearch; var TYe = AXe(function(e, t) { (function() { var n, r, a, o, i, s, l, u, c, d, f, h, p, v, m; a = Math.floor, d = Math.min, r = function(g, y) { return g < y ? -1 : g > y ? 1 : 0; }, c = function(g, y, 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 = a((x + w) / 2), k(y, g[C]) < 0 ? w = C : x = C + 1; return [].splice.apply(g, [x, x - x].concat(y)), y; }, s = function(g, y, x) { return x == null && (x = r), g.push(y), v(g, 0, g.length - 1, x); }, i = function(g, y) { var x, w; return y == null && (y = r), x = g.pop(), g.length ? (w = g[0], g[0] = x, m(g, 0, y)) : w = x, w; }, u = function(g, y, x) { var w; return x == null && (x = r), w = g[0], g[0] = y, m(g, 0, x), w; }, l = function(g, y, x) { var w; return x == null && (x = r), g.length && x(g[0], y) < 0 && (w = [g[0], y], y = w[0], g[0] = w[1], m(g, 0, x)), y; }, o = function(g, y) { var x, w, k, C, S, _; for (y == null && (y = r), C = (function() { _ = []; for (var T = 0, O = a(g.length / 2); 0 <= O ? T < O : T > O; 0 <= O ? T++ : T--) _.push(T); return _; }).apply(this).reverse(), S = [], w = 0, k = C.length; w < k; w++) x = C[w], S.push(m(g, x, y)); return S; }, p = function(g, y, x) { var w; if (x == null && (x = r), w = g.indexOf(y), w !== -1) return v(g, 0, w, x), m(g, w, x); }, f = function(g, y, x) { var w, k, C, S, _; if (x == null && (x = r), k = g.slice(0, y), !k.length) return k; for (o(k, x), _ = g.slice(y), C = 0, S = _.length; C < S; C++) w = _[C], l(k, w, x); return k.sort(x).reverse(); }, h = function(g, y, x) { var w, k, C, S, _, T, O, $, A; if (x == null && (x = r), y * 10 <= g.length) { if (C = g.slice(0, y).sort(x), !C.length) return C; for (k = C[C.length - 1], O = g.slice(y), S = 0, T = O.length; S < T; S++) w = O[S], x(w, k) < 0 && (c(C, w, 0, null, x), C.pop(), k = C[C.length - 1]); return C; } for (o(g, x), A = [], _ = 0, $ = d(y, g.length); 0 <= $ ? _ < $ : _ > $; 0 <= $ ? ++_ : --_) A.push(i(g, x)); return A; }, v = function(g, y, x, w) { var k, C, S; for (w == null && (w = r), k = g[x]; x > y; ) { if (S = x - 1 >> 1, C = g[S], w(k, C) < 0) { g[x] = C, x = S; continue; } break; } return g[x] = k; }, m = function(g, y, x) { var w, k, C, S, _; for (x == null && (x = r), k = g.length, _ = y, C = g[y], w = 2 * y + 1; w < k; ) S = w + 1, S < k && !(x(g[w], g[S]) < 0) && (w = S), g[y] = g[w], y = w, w = 2 * y + 1; return g[y] = C, v(g, _, y, x); }, n = function() { g.push = s, g.pop = i, g.replace = u, g.pushpop = l, g.heapify = o, g.updateItem = p, g.nlargest = f, g.nsmallest = h; function g(y) { this.cmp = y ?? r, this.nodes = []; } return g.prototype.push = function(y) { return s(this.nodes, y, this.cmp); }, g.prototype.pop = function() { return i(this.nodes, this.cmp); }, g.prototype.peek = function() { return this.nodes[0]; }, g.prototype.contains = function(y) { return this.nodes.indexOf(y) !== -1; }, g.prototype.replace = function(y) { return u(this.nodes, y, this.cmp); }, g.prototype.pushpop = function(y) { return l(this.nodes, y, this.cmp); }, g.prototype.heapify = function() { return o(this.nodes, this.cmp); }, g.prototype.updateItem = function(y) { return p(this.nodes, y, 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 y; return y = new g(), y.nodes = this.nodes.slice(0), y; }, 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, y) { return e.exports = y(); }(this, function() { return n; }); }).call(Pv); }), ym = TYe, OYe = ya({ root: null, weight: function(e) { return 1; }, directed: !1 }), $Ye = { dijkstra: function(e) { if (!mn(e)) { var t = arguments; e = { root: t[0], weight: t[1], directed: t[2] }; } var n = OYe(e), r = n.root, a = n.weight, o = n.directed, i = this, s = a, l = wt(r) ? this.filter(r)[0] : r[0], u = {}, c = {}, d = {}, f = this.byGroup(), h = f.nodes, p = f.edges; p.unmergeBy(function(L) { return L.isLoop(); }); for (var v = function(L) { return u[L.id()]; }, m = function(L, R) { u[L.id()] = R, g.updateItem(L); }, g = new ym(function(L, R) { return v(L) - v(R); }), y = 0; y < h.length; y++) { var x = h[y]; u[x.id()] = x.same(l) ? 0 : 1 / 0, g.push(x); } for (var w = function(L, R) { for (var P = (o ? L.edgesTo(R) : L.edgesWith(R)).intersect(p), B = 1 / 0, M, z = 0; z < P.length; z++) { var Z = P[z], G = s(Z); (G < B || !M) && (B = G, M = Z); } return { edge: M, dist: B }; }; g.size() > 0; ) { var k = g.pop(), C = v(k), S = k.id(); if (d[S] = C, C !== 1 / 0) for (var _ = k.neighborhood().intersect(h), T = 0; T < _.length; T++) { var O = _[T], $ = O.id(), A = w(k, O), N = C + A.dist; N < v(O) && (m(O, N), c[$] = { node: k, edge: A.edge }); } } return { distanceTo: function(L) { var R = wt(L) ? h.filter(L)[0] : L[0]; return d[R.id()]; }, pathTo: function(L) { var R = wt(L) ? h.filter(L)[0] : L[0], P = [], B = R, M = B.id(); if (R.length > 0) for (P.unshift(R); c[M]; ) { var z = c[M]; P.unshift(z.edge), P.unshift(z.node), B = z.node, M = B.id(); } return i.spawn(P); } }; } }, FYe = { // kruskal's algorithm (finds min spanning tree, assuming undirected graph) // implemented from pseudocode from wikipedia kruskal: function(e) { e = e || function(y) { return 1; }; for (var t = this.byGroup(), n = t.nodes, r = t.edges, a = n.length, o = new Array(a), i = n, s = function(y) { for (var x = 0; x < o.length; x++) { var w = o[x]; if (w.has(y)) return x; } }, l = 0; l < a; l++) o[l] = this.spawn(n[l]); for (var u = r.sort(function(y, x) { return e(y) - e(x); }), c = 0; c < u.length; c++) { var d = u[c], f = d.source()[0], h = d.target()[0], p = s(f), v = s(h), m = o[p], g = o[v]; p !== v && (i.merge(d), m.merge(g), o.splice(v, 1)); } return i; } }, AYe = ya({ root: null, goal: null, weight: function(e) { return 1; }, heuristic: function(e) { return 0; }, directed: !1 }), IYe = { // Implemented from pseudocode from wikipedia aStar: function(e) { var t = this.cy(), n = AYe(e), r = n.root, a = n.goal, o = n.heuristic, i = n.directed, s = n.weight; r = t.collection(r)[0], a = t.collection(a)[0]; var l = r.id(), u = a.id(), c = {}, d = {}, f = {}, h = new ym(function(z, Z) { return d[z.id()] - d[Z.id()]; }), p = new Lh(), v = {}, m = {}, g = function(z, Z) { h.push(z), p.add(Z); }, y, x, w = function() { y = h.pop(), x = y.id(), p.delete(x); }, k = function(z) { return p.has(z); }; g(r, l), c[l] = 0, d[l] = o(r); for (var C = 0; h.size() > 0; ) { if (w(), C++, x === u) { for (var S = [], _ = a, T = u, O = m[T]; S.unshift(_), O != null && S.unshift(O), _ = v[T], _ != null; ) T = _.id(), O = m[T]; return { found: !0, distance: c[x], path: this.spawn(S), steps: C }; } f[x] = !0; for (var $ = y._private.edges, A = 0; A < $.length; A++) { var N = $[A]; if (this.hasElementWithId(N.id()) && !(i && N.data("source") !== x)) { var L = N.source(), R = N.target(), P = L.id() !== x ? L : R, B = P.id(); if (this.hasElementWithId(B) && !f[B]) { var M = c[x] + s(N); if (!k(B)) { c[B] = M, d[B] = M + o(P), g(P, B), v[B] = y, m[B] = N; continue; } M < c[B] && (c[B] = M, d[B] = M + o(P), v[B] = y, m[B] = N); } } } } return { found: !1, distance: void 0, path: void 0, steps: C }; } }, PYe = ya({ weight: function(e) { return 1; }, directed: !1 }), LYe = { // Implemented from pseudocode from wikipedia floydWarshall: function(e) { for (var t = this.cy(), n = PYe(e), r = n.weight, a = n.directed, o = r, i = this.byGroup(), s = i.nodes, l = i.edges, u = s.length, c = u * u, d = function(G) { return s.indexOf(G); }, f = function(G) { return s[G]; }, h = new Array(c), p = 0; p < c; p++) { var v = p % u, m = (p - v) / u; m === v ? h[p] = 0 : h[p] = 1 / 0; } for (var g = new Array(c), y = 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 S = d(k), _ = d(C), T = S * u + _, O = o(w); if (h[T] > O && (h[T] = O, g[T] = _, y[T] = w), !a) { var $ = _ * u + S; !a && h[$] > O && (h[$] = O, g[$] = S, y[$] = w); } } } for (var A = 0; A < u; A++) for (var N = 0; N < u; N++) for (var L = N * u + A, R = 0; R < u; R++) { var P = N * u + R, B = A * u + R; h[L] + h[B] < h[P] && (h[P] = h[L] + h[B], g[P] = g[L]); } var M = function(G) { return (wt(G) ? t.filter(G) : G)[0]; }, z = function(G) { return d(M(G)); }, Z = { distance: function(G, J) { var se = z(G), ve = z(J); return h[se * u + ve]; }, path: function(G, J) { var se = z(G), ve = z(J), ge = f(se); if (se === ve) return ge.collection(); if (g[se * u + ve] == null) return t.collection(); var oe = t.collection(), ee = se, q; for (oe.merge(ge); se !== ve; ) ee = se, se = g[se * u + ve], q = y[ee * u + se], oe.merge(q), oe.merge(f(se)); return oe; } }; return Z; } // floydWarshall }, NYe = ya({ weight: function(e) { return 1; }, directed: !1, root: null }), MYe = { // Implemented from pseudocode from wikipedia bellmanFord: function(e) { var t = this, n = NYe(e), r = n.weight, a = n.directed, o = n.root, i = r, s = this, l = this.cy(), u = this.byGroup(), c = u.edges, d = u.nodes, f = d.length, h = new hs(), p = !1, v = []; o = l.collection(o)[0], c.unmergeBy(function(Se) { return Se.isLoop(); }); for (var m = c.length, g = function(Se) { var Pe = h.get(Se.id()); return Pe || (Pe = {}, h.set(Se.id(), Pe)), Pe; }, y = function(Se) { return (wt(Se) ? l.$(Se) : Se)[0]; }, x = function(Se) { return g(y(Se)).dist; }, w = function(Se) { for (var Pe = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : o, Me = y(Se), je = [], Be = Me; ; ) { if (Be == null) return t.spawn(); var We = g(Be), qe = We.edge, Ge = We.pred; if (je.unshift(Be[0]), Be.same(Pe) && je.length > 0) break; qe != null && je.unshift(qe), Be = Ge; } return s.spawn(je); }, k = 0; k < f; k++) { var C = d[k], S = g(C); C.same(o) ? S.dist = 0 : S.dist = 1 / 0, S.pred = null, S.edge = null; } for (var _ = !1, T = function(Se, Pe, Me, je, Be, We) { var qe = je.dist + We; qe < Be.dist && !Me.same(je.edge) && (Be.dist = qe, Be.pred = Se, Be.edge = Me, _ = !0); }, O = 1; O < f; O++) { _ = !1; for (var $ = 0; $ < m; $++) { var A = c[$], N = A.source(), L = A.target(), R = i(A), P = g(N), B = g(L); T(N, L, A, P, B, R), a || T(L, N, A, B, P, R); } if (!_) break; } if (_) for (var M = [], z = 0; z < m; z++) { var Z = c[z], G = Z.source(), J = Z.target(), se = i(Z), ve = g(G).dist, ge = g(J).dist; if (ve + se < ge || !a && ge + se < ve) if (p || (An("Graph contains a negative weight cycle for Bellman-Ford"), p = !0), e.findNegativeWeightCycles !== !1) { var oe = []; ve + se < ge && oe.push(G), !a && ge + se < ve && oe.push(J); for (var ee = oe.length, q = 0; q < ee; q++) { var Y = oe[q], te = [Y]; te.push(g(Y).edge); for (var we = g(Y).pred; te.indexOf(we) === -1; ) te.push(we), te.push(g(we).edge), we = g(we).pred; te = te.slice(te.indexOf(we)); for (var Oe = te[0].id(), Ne = 0, xe = 2; xe < te.length; xe += 2) te[xe].id() < Oe && (Oe = te[xe].id(), Ne = xe); te = te.slice(Ne).concat(te.slice(0, Ne)), te.push(te[0]); var $e = te.map(function(Se) { return Se.id(); }).join(","); M.indexOf($e) === -1 && (v.push(s.spawn(te)), M.push($e)); } } else break; } return { distanceTo: x, pathTo: w, hasNegativeWeightCycle: p, negativeWeightCycles: v }; } // bellmanFord }, BYe = Math.sqrt(2), DYe = function(e, t, n) { n.length === 0 && pr("Karger-Stein must be run on a connected (sub)graph"); for (var r = n[e], a = r[1], o = r[2], i = t[a], s = t[o], l = n, u = l.length - 1; u >= 0; u--) { var c = l[u], d = c[1], f = c[2]; (t[d] === i && t[f] === s || t[d] === s && t[f] === i) && l.splice(u, 1); } for (var h = 0; h < l.length; h++) { var p = l[h]; p[1] === s ? (l[h] = p.slice(), l[h][1] = i) : p[2] === s && (l[h] = p.slice(), l[h][2] = i); } for (var v = 0; v < t.length; v++) t[v] === s && (t[v] = i); return l; }, Zk = function(e, t, n, r) { for (; n > r; ) { var a = Math.floor(Math.random() * t.length); t = DYe(a, e, t), n--; } return t; }, RYe = { // 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(B) { return B.isLoop(); }); var a = n.length, o = r.length, i = Math.ceil(Math.pow(Math.log(a) / Math.LN2, 2)), s = Math.floor(a / BYe); if (a < 2) { pr("At least 2 nodes are required for Karger-Stein algorithm"); return; } for (var l = [], u = 0; u < o; u++) { var c = r[u]; l.push([u, n.indexOf(c.source()), n.indexOf(c.target())]); } for (var d = 1 / 0, f = [], h = new Array(a), p = new Array(a), v = new Array(a), m = function(B, M) { for (var z = 0; z < a; z++) M[z] = B[z]; }, g = 0; g <= i; g++) { for (var y = 0; y < a; y++) p[y] = y; var x = Zk(p, l.slice(), a, s), w = x.slice(); m(p, v); var k = Zk(p, x, s, 2), C = Zk(v, w, s, 2); k.length <= C.length && k.length < d ? (d = k.length, f = k, m(p, h)) : C.length <= k.length && C.length < d && (d = C.length, f = C, m(v, h)); } for (var S = this.spawn(f.map(function(B) { return r[B[0]]; })), _ = this.spawn(), T = this.spawn(), O = h[0], $ = 0; $ < h.length; $++) { var A = h[$], N = n[$]; A === O ? _.merge(N) : T.merge(N); } var L = function(B) { var M = e.spawn(); return B.forEach(function(z) { M.merge(z), z.connectedEdges().forEach(function(Z) { e.contains(Z) && !S.contains(Z) && M.merge(Z); }); }), M; }, R = [L(_), L(T)], P = { cut: S, components: R, // n.b. partitions are included to be compatible with the old api spec // (could be removed in a future major version) partition1: _, partition2: T }; return P; } }, zYe = function(e) { return { x: e.x, y: e.y }; }, ex = function(e, t, n) { return { x: e.x * t + n.x, y: e.y * t + n.y }; }, LU = function(e, t, n) { return { x: (e.x - n.x) / t, y: (e.y - n.y) / t }; }, Zp = function(e) { return { x: e[0], y: e[1] }; }, VYe = 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, a = t; a < n; a++) { var o = e[a]; isFinite(o) && (r = Math.min(o, r)); } return r; }, jYe = 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, a = t; a < n; a++) { var o = e[a]; isFinite(o) && (r = Math.max(o, r)); } return r; }, HYe = 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, a = 0, o = t; o < n; o++) { var i = e[o]; isFinite(i) && (r += i, a++); } return r / a; }, UYe = 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, a = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !0, o = 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]; o ? isFinite(l) || (e[s] = -1 / 0, i++) : e.splice(s, 1); } a && e.sort(function(d, f) { return d - f; }); 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; }, qYe = function(e) { return Math.PI * e / 180; }, A1 = function(e, t) { return Math.atan2(t, e) - Math.PI / 2; }, d_ = Math.log2 || function(e) { return Math.log(e) / Math.log(2); }, NU = function(e) { return e > 0 ? 1 : e < 0 ? -1 : 0; }, Md = function(e, t) { return Math.sqrt(Nc(e, t)); }, Nc = function(e, t) { var n = t.x - e.x, r = t.y - e.y; return n * n + r * r; }, WYe = function(e) { for (var t = e.length, n = 0, r = 0; r < t; r++) n += e[r]; for (var a = 0; a < t; a++) e[a] = e[a] / n; return e; }, qr = function(e, t, n, r) { return (1 - r) * (1 - r) * e + 2 * (1 - r) * r * t + r * r * n; }, lf = function(e, t, n, r) { return { x: qr(e.x, t.x, n.x, r), y: qr(e.y, t.y, n.y, r) }; }, KYe = function(e, t, n, r) { var a = { x: t.x - e.x, y: t.y - e.y }, o = Md(e, t), i = { x: a.x / o, y: a.y / o }; return n = n ?? 0, r = r ?? n * o, { x: e.x + i.x * r, y: e.y + i.y * r }; }, sg = function(e, t, n) { return Math.max(e, Math.min(n, t)); }, xo = 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 }; } }, GYe = function(e) { return { x1: e.x1, x2: e.x2, w: e.w, y1: e.y1, y2: e.y2, h: e.h }; }, XYe = function(e) { e.x1 = 1 / 0, e.y1 = 1 / 0, e.x2 = -1 / 0, e.y2 = -1 / 0, e.w = 0, e.h = 0; }, YYe = 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 }; }, MU = 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; }, ZYe = 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; }, Sy = 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; }, Ey = function(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [0], n, r, a, o; if (t.length === 1) n = r = a = o = t[0]; else if (t.length === 2) n = a = t[0], o = r = t[1]; else if (t.length === 4) { var i = Oi(t, 4); n = i[0], r = i[1], a = i[2], o = i[3]; } return e.x1 -= o, e.x2 += r, e.y1 -= n, e.y2 += a, e.w = e.x2 - e.x1, e.h = e.y2 - e.y1, e; }, xI = 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; }, p_ = 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); }, th = function(e, t, n) { return e.x1 <= t && t <= e.x2 && e.y1 <= n && n <= e.y2; }, QYe = function(e, t) { return th(e, t.x, t.y); }, BU = function(e, t) { return th(e, t.x1, t.y1) && th(e, t.x2, t.y2); }, DU = function(e, t, n, r, a, o, i) { var s = arguments.length > 7 && arguments[7] !== void 0 ? arguments[7] : "auto", l = s === "auto" ? Bd(a, o) : s, u = a / 2, c = o / 2; l = Math.min(l, u, c); var d = l !== u, f = l !== c, h; if (d) { var p = n - u + l - i, v = r - c - i, m = n + u - l + i, g = v; if (h = Fu(e, t, n, r, p, v, m, g, !1), h.length > 0) return h; } if (f) { var y = n + u + i, x = r - c + l - i, w = y, k = r + c - l + i; if (h = Fu(e, t, n, r, y, x, w, k, !1), h.length > 0) return h; } if (d) { var C = n - u + l - i, S = r + c + i, _ = n + u - l + i, T = S; if (h = Fu(e, t, n, r, C, S, _, T, !1), h.length > 0) return h; } if (f) { var O = n - u - i, $ = r - c + l - i, A = O, N = r + c - l + i; if (h = Fu(e, t, n, r, O, $, A, N, !1), h.length > 0) return h; } var L; { var R = n - u + l, P = r - c + l; if (L = Nv(e, t, n, r, R, P, l + i), L.length > 0 && L[0] <= R && L[1] <= P) return [L[0], L[1]]; } { var B = n + u - l, M = r - c + l; if (L = Nv(e, t, n, r, B, M, l + i), L.length > 0 && L[0] >= B && L[1] <= M) return [L[0], L[1]]; } { var z = n + u - l, Z = r + c - l; if (L = Nv(e, t, n, r, z, Z, l + i), L.length > 0 && L[0] >= z && L[1] >= Z) return [L[0], L[1]]; } { var G = n - u + l, J = r + c - l; if (L = Nv(e, t, n, r, G, J, l + i), L.length > 0 && L[0] <= G && L[1] >= J) return [L[0], L[1]]; } return []; }, JYe = function(e, t, n, r, a, o, i) { var s = i, l = Math.min(n, a), u = Math.max(n, a), c = Math.min(r, o), d = Math.max(r, o); return l - s <= e && e <= u + s && c - s <= t && t <= d + s; }, eZe = function(e, t, n, r, a, o, i, s, l) { var u = { x1: Math.min(n, i, a) - l, x2: Math.max(n, i, a) + l, y1: Math.min(r, s, o) - l, y2: Math.max(r, s, o) + l }; return !(e < u.x1 || e > u.x2 || t < u.y1 || t > u.y2); }, tZe = function(e, t, n, r) { n -= r; var a = t * t - 4 * e * n; if (a < 0) return []; var o = Math.sqrt(a), i = 2 * e, s = (-t + o) / i, l = (-t - o) / i; return [s, l]; }, nZe = function(e, t, n, r, a) { var o = 1e-5; e === 0 && (e = o), t /= e, n /= e, r /= e; var i, s, l, u, c, d, f, 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, a[1] = 0, f = 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), a[0] = -f + c + d, f += (c + d) / 2, a[4] = a[2] = -f, f = Math.sqrt(3) * (-d + c) / 2, a[3] = f, a[5] = -f; return; } if (a[5] = a[3] = 0, i === 0) { h = l < 0 ? -Math.pow(-l, 1 / 3) : Math.pow(l, 1 / 3), a[0] = -f + 2 * h, a[4] = a[2] = -(h + f); return; } s = -s, u = s * s * s, u = Math.acos(l / Math.sqrt(u)), h = 2 * Math.sqrt(s), a[0] = -f + h * Math.cos(u / 3), a[2] = -f + h * Math.cos((u + 2 * Math.PI) / 3), a[4] = -f + h * Math.cos((u + 4 * Math.PI) / 3); }, rZe = function(e, t, n, r, a, o, i, s) { var l = 1 * n * n - 4 * n * a + 2 * n * i + 4 * a * a - 4 * a * i + i * i + r * r - 4 * r * o + 2 * r * s + 4 * o * o - 4 * o * s + s * s, u = 1 * 9 * n * a - 3 * n * n - 3 * n * i - 6 * a * a + 3 * a * i + 9 * r * o - 3 * r * r - 3 * r * s - 6 * o * o + 3 * o * s, c = 1 * 3 * n * n - 6 * n * a + n * i - n * e + 2 * a * a + 2 * a * e - i * e + 3 * r * r - 6 * r * o + r * s - r * t + 2 * o * o + 2 * o * t - s * t, d = 1 * n * a - n * n + n * e - a * e + r * o - r * r + r * t - o * t, f = []; nZe(l, u, c, d, f); for (var h = 1e-7, p = [], v = 0; v < 6; v += 2) Math.abs(f[v + 1]) < h && f[v] >= 0 && f[v] <= 1 && p.push(f[v]); p.push(1), p.push(0); for (var m = -1, g, y, x, w = 0; w < p.length; w++) g = Math.pow(1 - p[w], 2) * n + 2 * (1 - p[w]) * p[w] * a + p[w] * p[w] * i, y = Math.pow(1 - p[w], 2) * r + 2 * (1 - p[w]) * p[w] * o + p[w] * p[w] * s, x = Math.pow(g - e, 2) + Math.pow(y - t, 2), m >= 0 ? x < m && (m = x) : m = x; return m; }, aZe = function(e, t, n, r, a, o) { var i = [e - n, t - r], s = [a - n, o - 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 - a) * (e - a) + (t - o) * (t - o) : u - d; }, Ja = function(e, t, n) { for (var r, a, o, i, s, l = 0, u = 0; u < n.length / 2; u++) if (r = n[u * 2], a = n[u * 2 + 1], u + 1 < n.length / 2 ? (o = n[(u + 1) * 2], i = n[(u + 1) * 2 + 1]) : (o = n[(u + 1 - n.length / 2) * 2], i = n[(u + 1 - n.length / 2) * 2 + 1]), !(r == e && o == e)) if (r >= e && e >= o || r <= e && e <= o) s = (e - r) / (o - r) * (i - a) + a, s > t && l++; else continue; return l % 2 !== 0; }, El = function(e, t, n, r, a, o, 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), f = Math.sin(-c), h = 0; h < u.length / 2; h++) u[h * 2] = o / 2 * (n[h * 2] * d - n[h * 2 + 1] * f), u[h * 2 + 1] = i / 2 * (n[h * 2 + 1] * d + n[h * 2] * f), u[h * 2] += r, u[h * 2 + 1] += a; var p; if (l > 0) { var v = jb(u, -l); p = Vb(v); } else p = u; return Ja(e, t, p); }, oZe = function(e, t, n, r, a, o, 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 Ja(e, t, l); }, Vb = function(e) { for (var t = new Array(e.length / 2), n, r, a, o, i, s, l, u, c = 0; c < e.length / 4; c++) { n = e[c * 4], r = e[c * 4 + 1], a = e[c * 4 + 2], o = 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 = Fu(n, r, a, o, i, s, l, u, !0); t[c * 2] = d[0], t[c * 2 + 1] = d[1]; } return t; }, jb = function(e, t) { for (var n = new Array(e.length * 2), r, a, o, i, s = 0; s < e.length / 2; s++) { r = e[s * 2], a = e[s * 2 + 1], s < e.length / 2 - 1 ? (o = e[(s + 1) * 2], i = e[(s + 1) * 2 + 1]) : (o = e[0], i = e[1]); var l = i - a, u = -(o - r), c = Math.sqrt(l * l + u * u), d = l / c, f = u / c; n[s * 4] = r + d * t, n[s * 4 + 1] = a + f * t, n[s * 4 + 2] = o + d * t, n[s * 4 + 3] = i + f * t; } return n; }, iZe = function(e, t, n, r, a, o) { var i = n - e, s = r - t; i /= a, s /= o; 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]; }, Xc = function(e, t, n, r, a, o, i) { return e -= a, t -= o, e /= n / 2 + i, t /= r / 2 + i, e * e + t * t <= 1; }, Nv = function(e, t, n, r, a, o, i) { var s = [n - e, r - t], l = [e - a, t - o], 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, f = c * c - 4 * u * d; if (f < 0) return []; var h = (-c + Math.sqrt(f)) / (2 * u), p = (-c - Math.sqrt(f)) / (2 * u), v = Math.min(h, p), m = Math.max(h, p), g = []; if (v >= 0 && v <= 1 && g.push(v), m >= 0 && m <= 1 && g.push(m), g.length === 0) return []; var y = g[0] * s[0] + e, x = g[0] * s[1] + t; if (g.length > 1) { if (g[0] == g[1]) return [y, x]; var w = g[1] * s[0] + e, k = g[1] * s[1] + t; return [y, x, w, k]; } else return [y, x]; }, Qk = function(e, t, n) { return t <= e && e <= n || n <= e && e <= t ? e : e <= t && t <= n || n <= t && t <= e ? t : n; }, Fu = function(e, t, n, r, a, o, i, s, l) { var u = e - a, c = n - e, d = i - a, f = t - o, h = r - t, p = s - o, v = d * f - p * u, m = c * f - h * u, g = p * c - d * h; if (g !== 0) { var y = v / g, x = m / g, w = 1e-3, k = 0 - w, C = 1 + w; return k <= y && y <= C && k <= x && x <= C ? [e + y * c, t + y * h] : l ? [e + y * c, t + y * h] : []; } else return v === 0 || m === 0 ? Qk(e, n, i) === i ? [i, s] : Qk(e, n, a) === a ? [a, o] : Qk(a, i, n) === n ? [n, r] : [] : []; }, lg = function(e, t, n, r, a, o, i, s) { var l = [], u, c = new Array(n.length), d = !0; o == null && (d = !1); var f; if (d) { for (var h = 0; h < c.length / 2; h++) c[h * 2] = n[h * 2] * o + r, c[h * 2 + 1] = n[h * 2 + 1] * i + a; if (s > 0) { var p = jb(c, -s); f = Vb(p); } else f = c; } else f = n; for (var v, m, g, y, x = 0; x < f.length / 2; x++) v = f[x * 2], m = f[x * 2 + 1], x < f.length / 2 - 1 ? (g = f[(x + 1) * 2], y = f[(x + 1) * 2 + 1]) : (g = f[0], y = f[1]), u = Fu(e, t, r, a, v, m, g, y), u.length !== 0 && l.push(u[0], u[1]); return l; }, sZe = function(e, t, n, r, a, o, i, s, l) { var u = [], c, d = new Array(n.length * 2); l.forEach(function(g, y) { y === 0 ? (d[d.length - 2] = g.startX, d[d.length - 1] = g.startY) : (d[y * 4 - 2] = g.startX, d[y * 4 - 1] = g.startY), d[y * 4] = g.stopX, d[y * 4 + 1] = g.stopY, c = Nv(e, t, r, a, g.cx, g.cy, g.radius), c.length !== 0 && u.push(c[0], c[1]); }); for (var f = 0; f < d.length / 4; f++) c = Fu(e, t, r, a, d[f * 4], d[f * 4 + 1], d[f * 4 + 2], d[f * 4 + 3], !1), c.length !== 0 && u.push(c[0], c[1]); if (u.length > 2) { for (var h = [u[0], u[1]], p = 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 <= p && (h[0] = u[v * 2], h[1] = u[v * 2 + 1], p = m); } return h; } return u; }, I1 = function(e, t, n) { var r = [e[0] - t[0], e[1] - t[1]], a = Math.sqrt(r[0] * r[0] + r[1] * r[1]), o = (a - n) / a; return o < 0 && (o = 1e-5), [t[0] + o * r[0], t[1] + o * r[1]]; }, za = function(e, t) { var n = aS(e, t); return n = RU(n), n; }, RU = function(e) { for (var t, n, r = e.length / 2, a = 1 / 0, o = 1 / 0, i = -1 / 0, s = -1 / 0, l = 0; l < r; l++) t = e[2 * l], n = e[2 * l + 1], a = Math.min(a, t), i = Math.max(i, t), o = Math.min(o, n), s = Math.max(s, n); for (var u = 2 / (i - a), c = 2 / (s - o), d = 0; d < r; d++) t = e[2 * d] = e[2 * d] * u, n = e[2 * d + 1] = e[2 * d + 1] * c, a = Math.min(a, t), i = Math.max(i, t), o = Math.min(o, n), s = Math.max(s, n); if (o < -1) for (var f = 0; f < r; f++) n = e[2 * f + 1] = e[2 * f + 1] + (-1 - o); return e; }, aS = 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 a = new Array(e * 2), o, i = 0; i < e; i++) o = i * n + r, a[2 * i] = Math.cos(o), a[2 * i + 1] = Math.sin(-o); return a; }, Bd = function(e, t) { return Math.min(e / 4, t / 4, 8); }, zU = function(e, t) { return Math.min(e / 10, t / 10, 8); }, f_ = function() { return 8; }, lZe = function(e, t, n) { return [e - 2 * t + n, 2 * (t - e), e]; }, oS = function(e, t) { return { heightOffset: Math.min(15, 0.05 * t), widthOffset: Math.min(100, 0.25 * e), ctrlPtOffsetPct: 0.05 }; }, uZe = ya({ dampingFactor: 0.8, precision: 1e-6, iterations: 200, weight: function(e) { return 1; } }), cZe = { pageRank: function(e) { for (var t = uZe(e), n = t.dampingFactor, r = t.precision, a = t.iterations, o = t.weight, i = this._private.cy, s = this.byGroup(), l = s.nodes, u = s.edges, c = l.length, d = c * c, f = u.length, h = new Array(d), p = new Array(c), v = (1 - n) / c, m = 0; m < c; m++) { for (var g = 0; g < c; g++) { var y = m * c + g; h[y] = 0; } p[m] = 0; } for (var x = 0; x < f; x++) { var w = u[x], k = w.data("source"), C = w.data("target"); if (k !== C) { var S = l.indexOfId(k), _ = l.indexOfId(C), T = o(w), O = _ * c + S; h[O] += T, p[S] += T; } } for (var $ = 1 / c + v, A = 0; A < c; A++) if (p[A] === 0) for (var N = 0; N < c; N++) { var L = N * c + A; h[L] = $; } else for (var R = 0; R < c; R++) { var P = R * c + A; h[P] = h[P] / p[A] + v; } for (var B = new Array(c), M = new Array(c), z, Z = 0; Z < c; Z++) B[Z] = 1; for (var G = 0; G < a; G++) { for (var J = 0; J < c; J++) M[J] = 0; for (var se = 0; se < c; se++) for (var ve = 0; ve < c; ve++) { var ge = se * c + ve; M[se] += h[ge] * B[ve]; } WYe(M), z = B, B = M, M = z; for (var oe = 0, ee = 0; ee < c; ee++) { var q = z[ee] - B[ee]; oe += q * q; } if (oe < r) break; } var Y = { rank: function(te) { return te = i.collection(te)[0], B[l.indexOf(te)]; } }; return Y; } // pageRank }, kI = ya({ root: null, weight: function(e) { return 1; }, directed: !1, alpha: 0 }), uf = { degreeCentralityNormalized: function(e) { e = kI(e); var t = this.cy(), n = this.nodes(), r = n.length; if (e.directed) { for (var a = {}, o = {}, 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), a[c] = d.indegree, o[c] = d.outdegree; } return { indegree: function(g) { return i == 0 ? 0 : (wt(g) && (g = t.filter(g)), a[g.id()] / i); }, outdegree: function(g) { return s === 0 ? 0 : (wt(g) && (g = t.filter(g)), o[g.id()] / s); } }; } else { for (var f = {}, h = 0, p = 0; p < r; p++) { var v = n[p]; e.root = v; var m = this.degreeCentrality(e); h < m.degree && (h = m.degree), f[v.id()] = m.degree; } return { degree: function(g) { return h === 0 ? 0 : (wt(g) && (g = t.filter(g)), f[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 = kI(e); var t = this.cy(), n = this, r = e, a = r.root, o = r.weight, i = r.directed, s = r.alpha; if (a = t.collection(a)[0], i) { for (var l = a.connectedEdges(), u = l.filter(function(k) { return k.target().same(a) && n.has(k); }), c = l.filter(function(k) { return k.source().same(a) && n.has(k); }), d = u.length, f = c.length, h = 0, p = 0, v = 0; v < u.length; v++) h += o(u[v]); for (var m = 0; m < c.length; m++) p += o(c[m]); return { indegree: Math.pow(d, 1 - s) * Math.pow(h, s), outdegree: Math.pow(f, 1 - s) * Math.pow(p, s) }; } else { for (var g = a.connectedEdges().intersection(n), y = g.length, x = 0, w = 0; w < g.length; w++) x += o(g[w]); return { degree: Math.pow(y, 1 - s) * Math.pow(x, s) }; } } // degreeCentrality }; uf.dc = uf.degreeCentrality; uf.dcn = uf.degreeCentralityNormalised = uf.degreeCentralityNormalized; var CI = ya({ harmonic: !0, weight: function() { return 1; }, directed: !1, root: null }), cf = { closenessCentralityNormalized: function(e) { for (var t = CI(e), n = t.harmonic, r = t.weight, a = t.directed, o = this.cy(), i = {}, s = 0, l = this.nodes(), u = this.floydWarshall({ weight: r, directed: a }), c = 0; c < l.length; c++) { for (var d = 0, f = l[c], h = 0; h < l.length; h++) if (c !== h) { var p = u.distance(f, l[h]); n ? d += 1 / p : d += p; } n || (d = 1 / d), s < d && (s = d), i[f.id()] = d; } return { closeness: function(v) { return s == 0 ? 0 : (wt(v) ? v = o.filter(v)[0].id() : v = v.id(), i[v] / s); } }; }, // Implemented from pseudocode from wikipedia closenessCentrality: function(e) { var t = CI(e), n = t.root, r = t.weight, a = t.directed, o = t.harmonic; n = this.filter(n)[0]; for (var i = this.dijkstra({ root: n, weight: r, directed: a }), s = 0, l = this.nodes(), u = 0; u < l.length; u++) { var c = l[u]; if (!c.same(n)) { var d = i.distanceTo(c); o ? s += 1 / d : s += d; } } return o ? s : 1 / s; } // closenessCentrality }; cf.cc = cf.closenessCentrality; cf.ccn = cf.closenessCentralityNormalised = cf.closenessCentralityNormalized; var dZe = ya({ weight: null, directed: !1 }), iS = { // 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 = dZe(e), n = t.directed, r = t.weight, a = r != null, o = this.cy(), i = this.nodes(), s = {}, l = {}, u = 0, c = { set: function(g, y) { l[g] = y, y > u && (u = y); }, get: function(g) { return l[g]; } }, d = 0; d < i.length; d++) { var f = i[d], h = f.id(); n ? s[h] = f.outgoers().nodes() : s[h] = f.openNeighborhood().nodes(), c.set(h, 0); } for (var p = function(g) { for (var y = i[g].id(), x = [], w = {}, k = {}, C = {}, S = new ym(function(se, ve) { return C[se] - C[ve]; }), _ = 0; _ < i.length; _++) { var T = i[_].id(); w[T] = [], k[T] = 0, C[T] = 1 / 0; } for (k[y] = 1, C[y] = 0, S.push(y); !S.empty(); ) { var O = S.pop(); if (x.push(O), a) for (var $ = 0; $ < s[O].length; $++) { var A = s[O][$], N = o.getElementById(O), L = void 0; N.edgesTo(A).length > 0 ? L = N.edgesTo(A)[0] : L = A.edgesTo(N)[0]; var R = r(L); A = A.id(), C[A] > C[O] + R && (C[A] = C[O] + R, S.nodes.indexOf(A) < 0 ? S.push(A) : S.updateItem(A), k[A] = 0, w[A] = []), C[A] == C[O] + R && (k[A] = k[A] + k[O], w[A].push(O)); } else for (var P = 0; P < s[O].length; P++) { var B = s[O][P].id(); C[B] == 1 / 0 && (S.push(B), C[B] = C[O] + 1), C[B] == C[O] + 1 && (k[B] = k[B] + k[O], w[B].push(O)); } } for (var M = {}, z = 0; z < i.length; z++) M[i[z].id()] = 0; for (; x.length > 0; ) { for (var Z = x.pop(), G = 0; G < w[Z].length; G++) { var J = w[Z][G]; M[J] = M[J] + k[J] / k[Z] * (1 + M[Z]); } Z != i[g].id() && c.set(Z, c.get(Z) + M[Z]); } }, v = 0; v < i.length; v++) p(v); var m = { betweenness: function(g) { var y = o.collection(g).id(); return c.get(y); }, betweennessNormalized: function(g) { if (u == 0) return 0; var y = o.collection(g).id(); return c.get(y) / u; } }; return m.betweennessNormalised = m.betweennessNormalized, m; } // betweennessCentrality }; iS.bc = iS.betweennessCentrality; var pZe = ya({ 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; } ] }), fZe = function(e) { return pZe(e); }, hZe = function(e, t) { for (var n = 0, r = 0; r < t.length; r++) n += t[r](e); return n; }, vZe = function(e, t, n) { for (var r = 0; r < t; r++) e[r * t + r] = n; }, VU = function(e, t) { for (var n, r = 0; r < t; r++) { n = 0; for (var a = 0; a < t; a++) n += e[a * t + r]; for (var o = 0; o < t; o++) e[o * t + r] = e[o * t + r] / n; } }, gZe = function(e, t, n) { for (var r = new Array(n * n), a = 0; a < n; a++) { for (var o = 0; o < n; o++) r[a * n + o] = 0; for (var i = 0; i < n; i++) for (var s = 0; s < n; s++) r[a * n + s] += e[a * n + i] * t[i * n + s]; } return r; }, mZe = function(e, t, n) { for (var r = e.slice(0), a = 1; a < n; a++) e = gZe(e, r, t); return e; }, yZe = function(e, t, n) { for (var r = new Array(t * t), a = 0; a < t * t; a++) r[a] = Math.pow(e[a], n); return VU(r, t), r; }, bZe = function(e, t, n, r) { for (var a = 0; a < n; a++) { var o = Math.round(e[a] * Math.pow(10, r)) / Math.pow(10, r), i = Math.round(t[a] * Math.pow(10, r)) / Math.pow(10, r); if (o !== i) return !1; } return !0; }, wZe = function(e, t, n, r) { for (var a = [], o = 0; o < t; o++) { for (var i = [], s = 0; s < t; s++) Math.round(e[o * t + s] * 1e3) / 1e3 > 0 && i.push(n[s]); i.length !== 0 && a.push(r.collection(i)); } return a; }, xZe = function(e, t) { for (var n = 0; n < e.length; n++) if (!t[n] || e[n].id() !== t[n].id()) return !1; return !0; }, kZe = function(e) { for (var t = 0; t < e.length; t++) for (var n = 0; n < e.length; n++) t != n && xZe(e[t], e[n]) && e.splice(n, 1); return e; }, SI = function(e) { for (var t = this.nodes(), n = this.edges(), r = this.cy(), a = fZe(e), o = {}, i = 0; i < t.length; i++) o[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 f = 0; f < n.length; f++) { var h = n[f], p = o[h.source().id()], v = o[h.target().id()], m = hZe(h, a.attributes); u[p * s + v] += m, u[v * s + p] += m; } vZe(u, s, a.multFactor), VU(u, s); for (var g = !0, y = 0; g && y < a.maxIterations; ) g = !1, c = mZe(u, s, a.expandFactor), u = yZe(c, s, a.inflateFactor), bZe(u, c, l, 4) || (g = !0), y++; var x = wZe(u, s, t, r); return x = kZe(x), x; }, CZe = { markovClustering: SI, mcl: SI }, SZe = function(e) { return e; }, jU = function(e, t) { return Math.abs(t - e); }, EI = function(e, t, n) { return e + jU(t, n); }, _I = function(e, t, n) { return e + Math.pow(n - t, 2); }, EZe = function(e) { return Math.sqrt(e); }, _Ze = function(e, t, n) { return Math.max(e, jU(t, n)); }, bv = function(e, t, n, r, a) { for (var o = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : SZe, i = r, s, l, u = 0; u < e; u++) s = t(u), l = n(u), i = a(i, s, l); return o(i); }, nh = { euclidean: function(e, t, n) { return e >= 2 ? bv(e, t, n, 0, _I, EZe) : bv(e, t, n, 0, EI); }, squaredEuclidean: function(e, t, n) { return bv(e, t, n, 0, _I); }, manhattan: function(e, t, n) { return bv(e, t, n, 0, EI); }, max: function(e, t, n) { return bv(e, t, n, -1 / 0, _Ze); } }; nh["squared-euclidean"] = nh.squaredEuclidean; nh.squaredeuclidean = nh.squaredEuclidean; function tx(e, t, n, r, a, o) { var i; return sr(e) ? i = e : i = nh[e] || nh.euclidean, t === 0 && sr(e) ? i(a, o) : i(t, n, r, a, o); } var TZe = ya({ k: 2, m: 2, sensitivityThreshold: 1e-4, distance: "euclidean", maxIterations: 10, attributes: [], testMode: !1, testCentroids: null }), h_ = function(e) { return TZe(e); }, Hb = function(e, t, n, r, a) { var o = a !== "kMedoids", i = o ? function(c) { return n[c]; } : function(c) { return r[c](n); }, s = function(c) { return r[c](t); }, l = n, u = t; return tx(e, r.length, i, s, l, u); }, Jk = function(e, t, n) { for (var r = n.length, a = new Array(r), o = new Array(r), i = new Array(t), s = null, l = 0; l < r; l++) a[l] = e.min(n[l]).value, o[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() * (o[c] - a[c]) + a[c]; i[u] = s; } return i; }, HU = function(e, t, n, r, a) { for (var o = 1 / 0, i = 0, s = 0; s < t.length; s++) { var l = Hb(n, e, t[s], r, a); l < o && (o = l, i = s); } return i; }, UU = function(e, t, n) { for (var r = [], a = null, o = 0; o < t.length; o++) a = t[o], n[a.id()] === e && r.push(a); return r; }, OZe = function(e, t, n) { return Math.abs(t - e) <= n; }, $Ze = function(e, t, n) { for (var r = 0; r < e.length; r++) for (var a = 0; a < e[r].length; a++) { var o = Math.abs(e[r][a] - t[r][a]); if (o > n) return !1; } return !0; }, FZe = function(e, t, n) { for (var r = 0; r < n; r++) if (e === t[r]) return !0; return !1; }, TI = function(e, t) { var n = new Array(t); if (e.length < 50) for (var r = 0; r < t; r++) { for (var a = e[Math.floor(Math.random() * e.length)]; FZe(a, n, r); ) a = e[Math.floor(Math.random() * e.length)]; n[r] = a; } else for (var o = 0; o < t; o++) n[o] = e[Math.floor(Math.random() * e.length)]; return n; }, OI = function(e, t, n) { for (var r = 0, a = 0; a < t.length; a++) r += Hb("manhattan", t[a], e, n, "kMedoids"); return r; }, AZe = function(e) { var t = this.cy(), n = this.nodes(), r = null, a = h_(e), o = new Array(a.k), i = {}, s; a.testMode ? typeof a.testCentroids == "number" ? (a.testCentroids, s = Jk(n, a.k, a.attributes)) : Rr(a.testCentroids) === "object" ? s = a.testCentroids : s = Jk(n, a.k, a.attributes) : s = Jk(n, a.k, a.attributes); for (var l = !0, u = 0; l && u < a.maxIterations; ) { for (var c = 0; c < n.length; c++) r = n[c], i[r.id()] = HU(r, s, a.distance, a.attributes, "kMeans"); l = !1; for (var d = 0; d < a.k; d++) { var f = UU(d, n, i); if (f.length !== 0) { for (var h = a.attributes.length, p = s[d], v = new Array(h), m = new Array(h), g = 0; g < h; g++) { m[g] = 0; for (var y = 0; y < f.length; y++) r = f[y], m[g] += a.attributes[g](r); v[g] = m[g] / f.length, OZe(v[g], p[g], a.sensitivityThreshold) || (l = !0); } s[d] = v, o[d] = t.collection(f); } } u++; } return o; }, IZe = function(e) { var t = this.cy(), n = this.nodes(), r = null, a = h_(e), o = new Array(a.k), i, s = {}, l, u = new Array(a.k); a.testMode ? typeof a.testCentroids == "number" || (Rr(a.testCentroids) === "object" ? i = a.testCentroids : i = TI(n, a.k)) : i = TI(n, a.k); for (var c = !0, d = 0; c && d < a.maxIterations; ) { for (var f = 0; f < n.length; f++) r = n[f], s[r.id()] = HU(r, i, a.distance, a.attributes, "kMedoids"); c = !1; for (var h = 0; h < i.length; h++) { var p = UU(h, n, s); if (p.length !== 0) { u[h] = OI(i[h], p, a.attributes); for (var v = 0; v < p.length; v++) l = OI(p[v], p, a.attributes), l < u[h] && (u[h] = l, i[h] = p[v], c = !0); o[h] = t.collection(p); } } d++; } return o; }, PZe = function(e, t, n, r, a) { for (var o, i, s = 0; s < t.length; s++) for (var l = 0; l < e.length; l++) r[s][l] = Math.pow(n[s][l], a.m); for (var u = 0; u < e.length; u++) for (var c = 0; c < a.attributes.length; c++) { o = 0, i = 0; for (var d = 0; d < t.length; d++) o += r[d][u] * a.attributes[c](t[d]), i += r[d][u]; e[u][c] = o / i; } }, LZe = function(e, t, n, r, a) { for (var o = 0; o < e.length; o++) t[o] = e[o].slice(); for (var i, s, l, u = 2 / (a.m - 1), c = 0; c < n.length; c++) for (var d = 0; d < r.length; d++) { i = 0; for (var f = 0; f < n.length; f++) s = Hb(a.distance, r[d], n[c], a.attributes, "cmeans"), l = Hb(a.distance, r[d], n[f], a.attributes, "cmeans"), i += Math.pow(s / l, u); e[d][c] = 1 / i; } }, NZe = function(e, t, n, r) { for (var a = new Array(n.k), o = 0; o < a.length; o++) a[o] = []; 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); a[s].push(e[l]); } for (var c = 0; c < a.length; c++) a[c] = r.collection(a[c]); return a; }, $I = function(e) { var t = this.cy(), n = this.nodes(), r = h_(e), a, o, 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 f = 0, h = 0; h < r.k; h++) i[d][h] = Math.random(), f += i[d][h]; for (var p = 0; p < r.k; p++) i[d][p] = i[d][p] / f; } o = new Array(r.k); for (var v = 0; v < r.k; v++) o[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, y = 0; g && y < r.maxIterations; ) g = !1, PZe(o, n, i, l, r), LZe(i, s, o, n, r), $Ze(i, s, r.sensitivityThreshold) || (g = !0), y++; return a = NZe(n, i, r, t), { clusters: a, degreeOfMembership: i }; }, MZe = { kMeans: AZe, kMedoids: IZe, fuzzyCMeans: $I, fcm: $I }, BZe = ya({ 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 }), DZe = { single: "min", complete: "max" }, RZe = function(e) { var t = BZe(e), n = DZe[t.linkage]; return n != null && (t.linkage = n), t; }, FI = function(e, t, n, r, a) { for (var o = 0, i = 1 / 0, s, l = a.attributes, u = function(S, _) { return tx(a.distance, l.length, function(T) { return l[T](S); }, function(T) { return l[T](_); }, S, _); }, c = 0; c < e.length; c++) { var d = e[c].key, f = n[d][r[d]]; f < i && (o = d, i = f); } if (a.mode === "threshold" && i >= a.threshold || a.mode === "dendrogram" && e.length === 1) return !1; var h = t[o], p = t[r[o]], v; a.mode === "dendrogram" ? v = { left: h, right: p, key: h.key } : v = { value: h.value.concat(p.value), key: h.key }, e[h.index] = v, e.splice(p.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 : a.linkage === "min" ? (s = n[h.key][g.key], n[h.key][g.key] > n[p.key][g.key] && (s = n[p.key][g.key])) : a.linkage === "max" ? (s = n[h.key][g.key], n[h.key][g.key] < n[p.key][g.key] && (s = n[p.key][g.key])) : a.linkage === "mean" ? s = (n[h.key][g.key] * h.size + n[p.key][g.key] * p.size) / (h.size + p.size) : a.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 y = 0; y < e.length; y++) { var x = e[y].key; if (r[x] === h.key || r[x] === p.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[y].index = y; } return h.key = p.key = h.index = p.index = null, !0; }, P1 = function e(t, n, r) { t && (t.value ? n.push(t.value) : (t.left && e(t.left, n), t.right && e(t.right, n))); }, zZe = function e(t, n) { if (!t) return ""; if (t.left && t.right) { var r = e(t.left, n), a = e(t.right, n), o = n.add({ group: "nodes", data: { id: r + "," + a } }); return n.add({ group: "edges", data: { source: r, target: o.id() } }), n.add({ group: "edges", data: { source: a, target: o.id() } }), o.id(); } else if (t.value) return t.value.id(); }, VZe = function e(t, n, r) { if (!t) return []; var a = [], o = [], i = []; return n === 0 ? (t.left && P1(t.left, a), t.right && P1(t.right, o), i = a.concat(o), [r.collection(i)]) : n === 1 ? t.value ? [r.collection(t.value)] : (t.left && P1(t.left, a), t.right && P1(t.right, o), [r.collection(a), r.collection(o)]) : t.value ? [r.collection(t.value)] : (t.left && (a = e(t.left, n - 1, r)), t.right && (o = e(t.right, n - 1, r)), a.concat(o)); }, AI = function(e) { for (var t = this.cy(), n = this.nodes(), r = RZe(e), a = r.attributes, o = function(g, y) { return tx(r.distance, a.length, function(x) { return a[x](g); }, function(x) { return a[x](y); }, g, y); }, 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 f = 0; f < i.length; f++) for (var h = 0; h <= f; h++) { var p = void 0; r.mode === "dendrogram" ? p = f === h ? 1 / 0 : o(i[f].value, i[h].value) : p = f === h ? 1 / 0 : o(i[f].value[0], i[h].value[0]), s[f][h] = p, s[h][f] = p, p < s[f][l[f]] && (l[f] = h); } for (var v = FI(i, u, s, l, r); v; ) v = FI(i, u, s, l, r); var m; return r.mode === "dendrogram" ? (m = VZe(i[0], r.dendrogramDepth, t), r.addDendrogram && zZe(i[0], t)) : (m = new Array(i.length), i.forEach(function(g, y) { g.key = g.index = null, m[y] = t.collection(g.value); })), m; }, jZe = { hierarchicalClustering: AI, hca: AI }, HZe = ya({ 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') ] }), UZe = function(e) { var t = e.damping, n = e.preference; 0.5 <= t && t < 1 || pr("Damping must range on [0.5, 1). Got: ".concat(t)); var r = ["median", "mean", "min", "max"]; return r.some(function(a) { return a === n; }) || it(n) || pr("Preference must be one of [".concat(r.map(function(a) { return "'".concat(a, "'"); }).join(", "), "] or a number. Got: ").concat(n)), HZe(e); }, qZe = function(e, t, n, r) { var a = function(o, i) { return r[i](o); }; return -tx(e, r.length, function(o) { return a(t, o); }, function(o) { return a(n, o); }, t, n); }, WZe = function(e, t) { var n = null; return t === "median" ? n = UYe(e) : t === "mean" ? n = HYe(e) : t === "min" ? n = VYe(e) : t === "max" ? n = jYe(e) : n = t, n; }, KZe = function(e, t, n) { for (var r = [], a = 0; a < e; a++) t[a * e + a] + n[a * e + a] > 0 && r.push(a); return r; }, II = function(e, t, n) { for (var r = [], a = 0; a < e; a++) { for (var o = -1, i = -1 / 0, s = 0; s < n.length; s++) { var l = n[s]; t[a * e + l] > i && (o = l, i = t[a * e + l]); } o > 0 && r.push(o); } for (var u = 0; u < n.length; u++) r[n[u]] = n[u]; return r; }, GZe = function(e, t, n) { for (var r = II(e, t, n), a = 0; a < n.length; a++) { for (var o = [], i = 0; i < r.length; i++) r[i] === n[a] && o.push(i); for (var s = -1, l = -1 / 0, u = 0; u < o.length; u++) { for (var c = 0, d = 0; d < o.length; d++) c += t[o[d] * e + o[u]]; c > l && (s = u, l = c); } n[a] = o[s]; } return r = II(e, t, n), r; }, PI = function(e) { for (var t = this.cy(), n = this.nodes(), r = UZe(e), a = {}, o = 0; o < n.length; o++) a[n[o].id()] = o; var i, s, l, u, c, d; i = n.length, s = i * i, l = new Array(s); for (var f = 0; f < s; f++) l[f] = -1 / 0; for (var h = 0; h < i; h++) for (var p = 0; p < i; p++) h !== p && (l[h * i + p] = qZe(r.distance, n[h], n[p], r.attributes)); u = WZe(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 y = new Array(i), x = new Array(i), w = new Array(i), k = 0; k < i; k++) y[k] = 0, x[k] = 0, w[k] = 0; for (var C = new Array(i * r.minIterations), S = 0; S < C.length; S++) C[S] = 0; var _; for (_ = 0; _ < r.maxIterations; _++) { for (var T = 0; T < i; T++) { for (var O = -1 / 0, $ = -1 / 0, A = -1, N = 0, L = 0; L < i; L++) y[L] = c[T * i + L], N = d[T * i + L] + l[T * i + L], N >= O ? ($ = O, O = N, A = L) : N > $ && ($ = N); for (var R = 0; R < i; R++) c[T * i + R] = (1 - r.damping) * (l[T * i + R] - O) + r.damping * y[R]; c[T * i + A] = (1 - r.damping) * (l[T * i + A] - $) + r.damping * y[A]; } for (var P = 0; P < i; P++) { for (var B = 0, M = 0; M < i; M++) y[M] = d[M * i + P], x[M] = Math.max(0, c[M * i + P]), B += x[M]; B -= x[P], x[P] = c[P * i + P], B += x[P]; for (var z = 0; z < i; z++) d[z * i + P] = (1 - r.damping) * Math.min(0, B - x[z]) + r.damping * y[z]; d[P * i + P] = (1 - r.damping) * (B - x[P]) + r.damping * y[P]; } for (var Z = 0, G = 0; G < i; G++) { var J = d[G * i + G] + c[G * i + G] > 0 ? 1 : 0; C[_ % r.minIterations * i + G] = J, Z += J; } if (Z > 0 && (_ >= r.minIterations - 1 || _ == r.maxIterations - 1)) { for (var se = 0, ve = 0; ve < i; ve++) { w[ve] = 0; for (var ge = 0; ge < r.minIterations; ge++) w[ve] += C[ge * i + ve]; (w[ve] === 0 || w[ve] === r.minIterations) && se++; } if (se === i) break; } } for (var oe = KZe(i, c, d), ee = GZe(i, l, oe), q = {}, Y = 0; Y < oe.length; Y++) q[oe[Y]] = []; for (var te = 0; te < n.length; te++) { var we = a[n[te].id()], Oe = ee[we]; Oe != null && q[Oe].push(n[te]); } for (var Ne = new Array(oe.length), xe = 0; xe < oe.length; xe++) Ne[xe] = t.collection(q[oe[xe]]); return Ne; }, XZe = { affinityPropagation: PI, ap: PI }, YZe = ya({ root: void 0, directed: !1 }), ZZe = { hierholzer: function(e) { if (!mn(e)) { var t = arguments; e = { root: t[0], directed: t[1] }; } var n = YZe(e), r = n.root, a = n.directed, o = this, i = !1, s, l, u; r && (u = wt(r) ? this.filter(r)[0].id() : r[0].id()); var c = {}, d = {}; a ? o.forEach(function(g) { var y = 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 = y : C == 1 ? l ? i = !0 : l = y : (C > 1 || k > 1) && (i = !0), c[y] = [], g.outgoers().forEach(function(S) { S.isEdge() && c[y].push(S.id()); }); } else d[y] = [void 0, g.target().id()]; }) : o.forEach(function(g) { var y = g.id(); if (g.isNode()) { var x = g.degree(!0); x % 2 && (s ? l ? i = !0 : l = y : s = y), c[y] = [], g.connectedEdges().forEach(function(w) { return c[y].push(w.id()); }); } else d[y] = [g.source().id(), g.target().id()]; }); var f = { found: !1, trail: void 0 }; if (i) return f; if (l && s) if (a) { if (u && l != u) return f; u = l; } else { if (u && l != u && s != u) return f; u || (u = l); } else u || (u = o[0].id()); var h = function(g) { for (var y = g, x = [g], w, k, C; c[y].length; ) w = c[y].shift(), k = d[w][0], C = d[w][1], y != C ? (c[C] = c[C].filter(function(S) { return S != w; }), y = C) : !a && y != k && (c[k] = c[k].filter(function(S) { return S != w; }), y = k), x.unshift(w), x.unshift(y); return x; }, p = [], v = []; for (v = h(u); v.length != 1; ) c[v[0]].length == 0 ? (p.unshift(o.getElementById(v.shift())), p.unshift(o.getElementById(v.shift()))) : v = h(v.shift()).concat(v); p.unshift(o.getElementById(v.shift())); for (var m in c) if (c[m].length) return f; return f.found = !0, f.trail = this.spawn(p, !0), f; } }, L1 = function() { var e = this, t = {}, n = 0, r = 0, a = [], o = [], i = {}, s = function(c, d) { for (var f = o.length - 1, h = [], p = e.spawn(); o[f].x != c || o[f].y != d; ) h.push(o.pop().edge), f--; h.push(o.pop().edge), h.forEach(function(v) { var m = v.connectedNodes().intersection(e); p.merge(v), m.forEach(function(g) { var y = g.id(), x = g.connectedEdges().intersection(e); p.merge(g), t[y].cutVertex ? p.merge(x.filter(function(w) { return w.isLoop(); })) : p.merge(x); }); }), a.push(p); }, l = function c(d, f, h) { d === h && (r += 1), t[f] = { id: n, low: n++, cutVertex: !1 }; var p = e.getElementById(f).connectedEdges().intersection(e); if (p.size() === 0) a.push(e.spawn(e.getElementById(f))); else { var v, m, g, y; p.forEach(function(x) { v = x.source().id(), m = x.target().id(), g = v === f ? m : v, g !== h && (y = x.id(), i[y] || (i[y] = !0, o.push({ x: f, y: g, edge: x })), g in t ? t[f].low = Math.min(t[f].low, t[g].id) : (c(d, g, f), t[f].low = Math.min(t[f].low, t[g].low), t[f].id <= t[g].low && (t[f].cutVertex = !0, s(f, 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: a }; }, QZe = { hopcroftTarjanBiconnected: L1, htbc: L1, htb: L1, hopcroftTarjanBiconnectedComponents: L1 }, N1 = function() { var e = this, t = {}, n = 0, r = [], a = [], o = e.spawn(e), i = function s(l) { a.push(l), t[l] = { index: n, low: n++, explored: !1 }; var u = e.getElementById(l).connectedEdges().intersection(e); if (u.forEach(function(p) { var v = p.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 = a.pop(); if (c.merge(e.getElementById(d)), t[d].low = t[l].index, t[d].explored = !0, d === l) break; } var f = c.edgesWith(c), h = c.merge(f); r.push(h), o = o.difference(h); } }; return e.forEach(function(s) { if (s.isNode()) { var l = s.id(); l in t || i(l); } }), { cut: o, components: r }; }, JZe = { tarjanStronglyConnected: N1, tsc: N1, tscc: N1, tarjanStronglyConnectedComponents: N1 }, qU = {}; [ig, $Ye, FYe, IYe, LYe, MYe, RYe, cZe, uf, cf, iS, CZe, MZe, jZe, XZe, ZZe, QZe, JZe].forEach(function(e) { At(qU, 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 WU = 0, KU = 1, GU = 2, _l = function e(t) { if (!(this instanceof e)) return new e(t); this.id = "Thenable/1.0.7", this.state = WU, 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)); }; _l.prototype = { /* promise resolving methods */ fulfill: function(e) { return LI(this, KU, "fulfillValue", e); }, reject: function(e) { return LI(this, GU, "rejectReason", e); }, /* "The then Method" [Promises/A+ 1.1, 1.2, 2.2] */ then: function(e, t) { var n = this, r = new _l(); return n.onFulfilled.push(MI(e, r, "fulfill")), n.onRejected.push(MI(t, r, "reject")), XU(n), r.proxy; } }; var LI = function(e, t, n, r) { return e.state === WU && (e.state = t, e[n] = r, XU(e)), e; }, XU = function(e) { e.state === KU ? NI(e, "onFulfilled", e.fulfillValue) : e.state === GU && NI(e, "onRejected", e.rejectReason); }, NI = function(e, t, n) { if (e[t].length !== 0) { var r = e[t]; e[t] = []; var a = function() { for (var o = 0; o < r.length; o++) r[o](n); }; typeof setImmediate == "function" ? setImmediate(a) : setTimeout(a, 0); } }, MI = function(e, t, n) { return function(r) { if (typeof e != "function") t[n].call(t, r); else { var a; try { a = e(r); } catch (o) { t.reject(o); return; } eQe(t, a); } }; }, eQe = function e(t, n) { if (t === n || t.proxy === n) { t.reject(new TypeError("cannot resolve promise with itself")); return; } var r; if (Rr(n) === "object" && n !== null || typeof n == "function") try { r = n.then; } catch (o) { t.reject(o); return; } if (typeof r == "function") { var a = !1; try { r.call( n, /* resolvePromise */ /* [Promises/A+ 2.3.3.3.1] */ function(o) { a || (a = !0, o === n ? t.reject(new TypeError("circular thenable chain")) : e(t, o)); }, /* rejectPromise */ /* [Promises/A+ 2.3.3.3.2] */ function(o) { a || (a = !0, t.reject(o)); } ); } catch (o) { a || t.reject(o); } return; } t.fulfill(n); }; _l.all = function(e) { return new _l(function(t, n) { for (var r = new Array(e.length), a = 0, o = function(s, l) { r[s] = l, a++, a === 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) { o(s, d); }, function(d) { n(d); }); else { var c = l; o(s, c); } })(i); }); }; _l.resolve = function(e) { return new _l(function(t, n) { t(e); }); }; _l.reject = function(e) { return new _l(function(t, n) { n(e); }); }; var Nh = typeof Promise < "u" ? Promise : _l, sS = function(e, t, n) { var r = i_(e), a = !r, o = this._private = At({ duration: 1e3 }, t, n); if (o.target = e, o.style = o.style || o.css, o.started = !1, o.playing = !1, o.hooked = !1, o.applying = !1, o.progress = 0, o.completes = [], o.frames = [], o.complete && sr(o.complete) && o.completes.push(o.complete), a) { var i = e.position(); o.startPosition = o.startPosition || { x: i.x, y: i.y }, o.startStyle = o.startStyle || e.cy().style().getAnimationStartStyle(e, o.style); } if (r) { var s = e.pan(); o.startPan = { x: s.x, y: s.y }, o.startZoom = e.zoom(); } this.length = 1, this[0] = this; }, Dd = sS.prototype; At(Dd, { 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), Po(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 a = e.style[r], o = a.name, i = e.startStyle[o]; e.startStyle[o] = a, 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 Nh(function(r, a) { n.push(function() { r(); }); }); } }); Dd.complete = Dd.completed; Dd.run = Dd.play; Dd.running = Dd.playing; var tQe = { 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 a = n[0]; if (a) return a._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 a = 0; a < n.length; a++) { var o = n[a]; o._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, a = r ? n : [n], o = this._private.cy || this, i = !r, s = !i; if (!o.styleEnabled()) return this; var l = o.style(); e = At({}, e, t); var u = Object.keys(e).length === 0; if (u) return new sS(a[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 = o.pan(), f = o.zoom(); e.position = LU(c, f, d); } if (i && e.panBy != null) { var h = e.panBy, p = o.pan(); e.pan = { x: p.x + h.x, y: p.y + h.y }; } var v = e.center || e.centre; if (i && v != null) { var m = o.getCenterPan(v.eles, e.zoom); m != null && (e.pan = m); } if (i && e.fit != null) { var g = e.fit, y = o.getFitViewport(g.eles || g.boundingBox, g.padding); y != null && (e.pan = y.pan, e.zoom = y.zoom); } if (i && mn(e.zoom)) { var x = o.getZoomedViewport(e.zoom); x != null ? (x.zoomed && (e.zoom = x.zoom), x.panned && (e.pan = x.pan)) : e.zoom = null; } return new sS(a[0], e); }; }, // animate animate: function() { return function(e, t) { var n = this, r = n.length !== void 0, a = r ? n : [n], o = this._private.cy || this; if (!o.styleEnabled()) return this; t && (e = At({}, e, t)); for (var i = 0; i < a.length; i++) { var s = a[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, a = r ? n : [n], o = this._private.cy || this; if (!o.styleEnabled()) return this; for (var i = 0; i < a.length; i++) { for (var s = a[i], l = s._private, u = l.animation.current, c = 0; c < u.length; c++) { var d = u[c], f = d._private; t && (f.duration = 0); } e && (l.animation.queue = []), t || (l.animation.current = []); } return o.notify("draw"), this; }; } // stop }, nQe = Array.isArray, nx = nQe, rQe = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, aQe = /^\w*$/; function oQe(e, t) { if (nx(e)) return !1; var n = typeof e; return n == "number" || n == "symbol" || n == "boolean" || e == null || mm(e) ? !0 : aQe.test(e) || !rQe.test(e) || t != null && e in Object(t); } var iQe = oQe, sQe = "[object AsyncFunction]", lQe = "[object Function]", uQe = "[object GeneratorFunction]", cQe = "[object Proxy]"; function dQe(e) { if (!Ld(e)) return !1; var t = EU(e); return t == lQe || t == uQe || t == sQe || t == cQe; } var pQe = dQe, fQe = Zw["__core-js_shared__"], eC = fQe, BI = function() { var e = /[^.]+$/.exec(eC && eC.keys && eC.keys.IE_PROTO || ""); return e ? "Symbol(src)_1." + e : ""; }(); function hQe(e) { return !!BI && BI in e; } var vQe = hQe, gQe = Function.prototype, mQe = gQe.toString; function yQe(e) { if (e != null) { try { return mQe.call(e); } catch { } try { return e + ""; } catch { } } return ""; } var bQe = yQe, wQe = /[\\^$.*+?()[\]{}|]/g, xQe = /^\[object .+?Constructor\]$/, kQe = Function.prototype, CQe = Object.prototype, SQe = kQe.toString, EQe = CQe.hasOwnProperty, _Qe = RegExp( "^" + SQe.call(EQe).replace(wQe, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$" ); function TQe(e) { if (!Ld(e) || vQe(e)) return !1; var t = pQe(e) ? _Qe : xQe; return t.test(bQe(e)); } var OQe = TQe; function $Qe(e, t) { return e == null ? void 0 : e[t]; } var FQe = $Qe; function AQe(e, t) { var n = FQe(e, t); return OQe(n) ? n : void 0; } var v_ = AQe, IQe = v_(Object, "create"), ug = IQe; function PQe() { this.__data__ = ug ? ug(null) : {}, this.size = 0; } var LQe = PQe; function NQe(e) { var t = this.has(e) && delete this.__data__[e]; return this.size -= t ? 1 : 0, t; } var MQe = NQe, BQe = "__lodash_hash_undefined__", DQe = Object.prototype, RQe = DQe.hasOwnProperty; function zQe(e) { var t = this.__data__; if (ug) { var n = t[e]; return n === BQe ? void 0 : n; } return RQe.call(t, e) ? t[e] : void 0; } var VQe = zQe, jQe = Object.prototype, HQe = jQe.hasOwnProperty; function UQe(e) { var t = this.__data__; return ug ? t[e] !== void 0 : HQe.call(t, e); } var qQe = UQe, WQe = "__lodash_hash_undefined__"; function KQe(e, t) { var n = this.__data__; return this.size += this.has(e) ? 0 : 1, n[e] = ug && t === void 0 ? WQe : t, this; } var GQe = KQe; function Mh(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]); } } Mh.prototype.clear = LQe; Mh.prototype.delete = MQe; Mh.prototype.get = VQe; Mh.prototype.has = qQe; Mh.prototype.set = GQe; var DI = Mh; function XQe() { this.__data__ = [], this.size = 0; } var YQe = XQe; function ZQe(e, t) { return e === t || e !== e && t !== t; } var YU = ZQe; function QQe(e, t) { for (var n = e.length; n--; ) if (YU(e[n][0], t)) return n; return -1; } var rx = QQe, JQe = Array.prototype, eJe = JQe.splice; function tJe(e) { var t = this.__data__, n = rx(t, e); if (n < 0) return !1; var r = t.length - 1; return n == r ? t.pop() : eJe.call(t, n, 1), --this.size, !0; } var nJe = tJe; function rJe(e) { var t = this.__data__, n = rx(t, e); return n < 0 ? void 0 : t[n][1]; } var aJe = rJe; function oJe(e) { return rx(this.__data__, e) > -1; } var iJe = oJe; function sJe(e, t) { var n = this.__data__, r = rx(n, e); return r < 0 ? (++this.size, n.push([e, t])) : n[r][1] = t, this; } var lJe = sJe; function Bh(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]); } } Bh.prototype.clear = YQe; Bh.prototype.delete = nJe; Bh.prototype.get = aJe; Bh.prototype.has = iJe; Bh.prototype.set = lJe; var uJe = Bh, cJe = v_(Zw, "Map"), dJe = cJe; function pJe() { this.size = 0, this.__data__ = { hash: new DI(), map: new (dJe || uJe)(), string: new DI() }; } var fJe = pJe; function hJe(e) { var t = typeof e; return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e !== "__proto__" : e === null; } var vJe = hJe; function gJe(e, t) { var n = e.__data__; return vJe(t) ? n[typeof t == "string" ? "string" : "hash"] : n.map; } var ax = gJe; function mJe(e) { var t = ax(this, e).delete(e); return this.size -= t ? 1 : 0, t; } var yJe = mJe; function bJe(e) { return ax(this, e).get(e); } var wJe = bJe; function xJe(e) { return ax(this, e).has(e); } var kJe = xJe; function CJe(e, t) { var n = ax(this, e), r = n.size; return n.set(e, t), this.size += n.size == r ? 0 : 1, this; } var SJe = CJe; function Dh(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]); } } Dh.prototype.clear = fJe; Dh.prototype.delete = yJe; Dh.prototype.get = wJe; Dh.prototype.has = kJe; Dh.prototype.set = SJe; var ZU = Dh, EJe = "Expected a function"; function g_(e, t) { if (typeof e != "function" || t != null && typeof t != "function") throw new TypeError(EJe); var n = function() { var r = arguments, a = t ? t.apply(this, r) : r[0], o = n.cache; if (o.has(a)) return o.get(a); var i = e.apply(this, r); return n.cache = o.set(a, i) || o, i; }; return n.cache = new (g_.Cache || ZU)(), n; } g_.Cache = ZU; var _Je = g_, TJe = 500; function OJe(e) { var t = _Je(e, function(r) { return n.size === TJe && n.clear(), r; }), n = t.cache; return t; } var $Je = OJe, FJe = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, AJe = /\\(\\)?/g, IJe = $Je(function(e) { var t = []; return e.charCodeAt(0) === 46 && t.push(""), e.replace(FJe, function(n, r, a, o) { t.push(a ? o.replace(AJe, "$1") : r || n); }), t; }), QU = IJe; function PJe(e, t) { for (var n = -1, r = e == null ? 0 : e.length, a = Array(r); ++n < r; ) a[n] = t(e[n], n, e); return a; } var JU = PJe, LJe = 1 / 0, RI = eh ? eh.prototype : void 0, zI = RI ? RI.toString : void 0; function eq(e) { if (typeof e == "string") return e; if (nx(e)) return JU(e, eq) + ""; if (mm(e)) return zI ? zI.call(e) : ""; var t = e + ""; return t == "0" && 1 / e == -LJe ? "-0" : t; } var NJe = eq; function MJe(e) { return e == null ? "" : NJe(e); } var tq = MJe; function BJe(e, t) { return nx(e) ? e : iQe(e, t) ? [e] : QU(tq(e)); } var nq = BJe, DJe = 1 / 0; function RJe(e) { if (typeof e == "string" || mm(e)) return e; var t = e + ""; return t == "0" && 1 / e == -DJe ? "-0" : t; } var m_ = RJe; function zJe(e, t) { t = nq(t, e); for (var n = 0, r = t.length; e != null && n < r; ) e = e[m_(t[n++])]; return n && n == r ? e : void 0; } var VJe = zJe; function jJe(e, t, n) { var r = e == null ? void 0 : VJe(e, t); return r === void 0 ? n : r; } var HJe = jJe, UJe = function() { try { var e = v_(Object, "defineProperty"); return e({}, "", {}), e; } catch { } }(), VI = UJe; function qJe(e, t, n) { t == "__proto__" && VI ? VI(e, t, { configurable: !0, enumerable: !0, value: n, writable: !0 }) : e[t] = n; } var WJe = qJe, KJe = Object.prototype, GJe = KJe.hasOwnProperty; function XJe(e, t, n) { var r = e[t]; (!(GJe.call(e, t) && YU(r, n)) || n === void 0 && !(t in e)) && WJe(e, t, n); } var YJe = XJe, ZJe = 9007199254740991, QJe = /^(?:0|[1-9]\d*)$/; function JJe(e, t) { var n = typeof e; return t = t ?? ZJe, !!t && (n == "number" || n != "symbol" && QJe.test(e)) && e > -1 && e % 1 == 0 && e < t; } var eet = JJe; function tet(e, t, n, r) { if (!Ld(e)) return e; t = nq(t, e); for (var a = -1, o = t.length, i = o - 1, s = e; s != null && ++a < o; ) { var l = m_(t[a]), u = n; if (l === "__proto__" || l === "constructor" || l === "prototype") return e; if (a != i) { var c = s[l]; u = r ? r(c, l, s) : void 0, u === void 0 && (u = Ld(c) ? c : eet(t[a + 1]) ? [] : {}); } YJe(s, l, u), s = s[l]; } return e; } var net = tet; function ret(e, t, n) { return e == null ? e : net(e, t, n); } var aet = ret; function oet(e, t) { var n = -1, r = e.length; for (t || (t = Array(r)); ++n < r; ) t[n] = e[n]; return t; } var iet = oet; function set(e) { return nx(e) ? JU(e, m_) : mm(e) ? [e] : iet(QU(tq(e))); } var uet = set, cet = { // 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 = At({}, t, e), function(n, r) { var a = e, o = this, i = o.length !== void 0, s = i ? o : [o], l = i ? o[0] : o; if (wt(n)) { var u = n.indexOf(".") !== -1, c = u && uet(n); if (a.allowGetting && r === void 0) { var d; return l && (a.beforeGet(l), c && l._private[a.field][n] === void 0 ? d = HJe(l._private[a.field], c) : d = l._private[a.field][n]), d; } else if (a.allowSetting && r !== void 0) { var f = !a.immutableKeys[n]; if (f) { var h = hU({}, n, r); a.beforeSet(o, h); for (var p = 0, v = s.length; p < v; p++) { var m = s[p]; a.canSet(m) && (c && l._private[a.field][n] === void 0 ? aet(m._private[a.field], c, r) : m._private[a.field][n] = r); } a.updateStyle && o.updateStyle(), a.onSet(o), a.settingTriggersEvent && o[a.triggerFnName](a.settingEvent); } } } else if (a.allowSetting && mn(n)) { var g = n, y, x, w = Object.keys(g); a.beforeSet(o, g); for (var k = 0; k < w.length; k++) { y = w[k], x = g[y]; var C = !a.immutableKeys[y]; if (C) for (var S = 0; S < s.length; S++) { var _ = s[S]; a.canSet(_) && (_._private[a.field][y] = x); } } a.updateStyle && o.updateStyle(), a.onSet(o), a.settingTriggersEvent && o[a.triggerFnName](a.settingEvent); } else if (a.allowBinding && sr(n)) { var T = n; o.on(a.bindingEvent, T); } else if (a.allowGetting && n === void 0) { var O; return l && (a.beforeGet(l), O = l._private[a.field]), O; } return o; }; }, // data // remove data field removeData: function(e) { var t = { field: "data", event: "data", triggerFnName: "trigger", triggerEvent: !1, immutableKeys: {} // key => true if immutable }; return e = At({}, t, e), function(n) { var r = e, a = this, o = a.length !== void 0, i = o ? a : [a]; if (wt(n)) { for (var s = n.split(/\s+/), l = s.length, u = 0; u < l; u++) { var c = s[u]; if (!Ju(c)) { var d = !r.immutableKeys[c]; if (d) for (var f = 0, h = i.length; f < h; f++) i[f]._private[r.field][c] = void 0; } } r.triggerEvent && a[r.triggerFnName](r.event); } else if (n === void 0) { for (var p = 0, v = i.length; p < v; p++) for (var m = i[p]._private[r.field], g = Object.keys(m), y = 0; y < g.length; y++) { var x = g[y], w = !r.immutableKeys[x]; w && (m[x] = void 0); } r.triggerEvent && a[r.triggerFnName](r.event); } return a; }; } // removeData }, det = { 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 a = this, o = Array.prototype.slice.call(arguments, 0); return new Nh(function(i, s) { var l = function(d) { a.off.apply(a, c), i(d); }, u = o.concat([l]), c = u.concat([]); a.on.apply(a, u); }); }; } }, $n = {}; [tQe, cet, det].forEach(function(e) { At($n, e); }); var pet = { animate: $n.animate(), animation: $n.animation(), animated: $n.animated(), clearQueue: $n.clearQueue(), delay: $n.delay(), delayAnimation: $n.delayAnimation(), stop: $n.stop() }, _y = { 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 Vn(e) || (e = (e || "").match(/\S+/g) || []); for (var r = [], a = new Lh(e), o = 0; o < t.length; o++) { for (var i = t[o], s = i._private, l = s.classes, u = !1, c = 0; c < e.length; c++) { var d = e[c], f = l.has(d); if (!f) { u = !0; break; } } u || (u = l.size !== e.length), u && (s.classes = a, 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) { Vn(e) || (e = e.match(/\S+/g) || []); for (var n = this, r = t === void 0, a = [], o = 0, i = n.length; o < i; o++) for (var s = n[o], l = s._private.classes, u = !1, c = 0; c < e.length; c++) { var d = e[c], f = l.has(d), h = !1; t || r && !f ? (l.add(d), h = !0) : (!t || r && f) && (l.delete(d), h = !0), !u && h && (a.push(s), u = !0); } return a.length > 0 && this.spawn(a).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; } }; _y.className = _y.classNames = _y.classes; var vn = { 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: Nr, // 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+" }; vn.variable = "(?:[\\w-.]|(?:\\\\" + vn.metaChar + "))+"; vn.className = "(?:[\\w-]|(?:\\\\" + vn.metaChar + "))+"; vn.value = vn.string + "|" + vn.number; vn.id = vn.variable; (function() { var e, t, n; for (e = vn.comparatorOp.split("|"), n = 0; n < e.length; n++) t = e[n], vn.comparatorOp += "|@" + t; for (e = vn.comparatorOp.split("|"), n = 0; n < e.length; n++) t = e[n], !(t.indexOf("!") >= 0) && t !== "=" && (vn.comparatorOp += "|\\!" + t); })(); var Mn = function() { return { checks: [] }; }, ft = { /** 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 }, lS = [{ 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 CXe(e.selector, t.selector); }), fet = function() { for (var e = {}, t, n = 0; n < lS.length; n++) t = lS[n], e[t.selector] = t.matches; return e; }(), het = function(e, t) { return fet[e](t); }, vet = "(" + lS.map(function(e) { return e.selector; }).join("|") + ")", Ip = function(e) { return e.replace(new RegExp("\\\\(" + vn.metaChar + ")", "g"), function(t, n) { return n; }); }, eu = function(e, t, n) { e[e.length - 1] = n; }, uS = [{ name: "group", // just used for identifying when debugging query: !0, regex: "(" + vn.group + ")", populate: function(e, t, n) { var r = Oi(n, 1), a = r[0]; t.checks.push({ type: ft.GROUP, value: a === "*" ? a : a + "s" }); } }, { name: "state", query: !0, regex: vet, populate: function(e, t, n) { var r = Oi(n, 1), a = r[0]; t.checks.push({ type: ft.STATE, value: a }); } }, { name: "id", query: !0, regex: "\\#(" + vn.id + ")", populate: function(e, t, n) { var r = Oi(n, 1), a = r[0]; t.checks.push({ type: ft.ID, value: Ip(a) }); } }, { name: "className", query: !0, regex: "\\.(" + vn.className + ")", populate: function(e, t, n) { var r = Oi(n, 1), a = r[0]; t.checks.push({ type: ft.CLASS, value: Ip(a) }); } }, { name: "dataExists", query: !0, regex: "\\[\\s*(" + vn.variable + ")\\s*\\]", populate: function(e, t, n) { var r = Oi(n, 1), a = r[0]; t.checks.push({ type: ft.DATA_EXIST, field: Ip(a) }); } }, { name: "dataCompare", query: !0, regex: "\\[\\s*(" + vn.variable + ")\\s*(" + vn.comparatorOp + ")\\s*(" + vn.value + ")\\s*\\]", populate: function(e, t, n) { var r = Oi(n, 3), a = r[0], o = r[1], i = r[2], s = new RegExp("^" + vn.string + "$").exec(i) != null; s ? i = i.substring(1, i.length - 1) : i = parseFloat(i), t.checks.push({ type: ft.DATA_COMPARE, field: Ip(a), operator: o, value: i }); } }, { name: "dataBool", query: !0, regex: "\\[\\s*(" + vn.boolOp + ")\\s*(" + vn.variable + ")\\s*\\]", populate: function(e, t, n) { var r = Oi(n, 2), a = r[0], o = r[1]; t.checks.push({ type: ft.DATA_BOOL, field: Ip(o), operator: a }); } }, { name: "metaCompare", query: !0, regex: "\\[\\[\\s*(" + vn.meta + ")\\s*(" + vn.comparatorOp + ")\\s*(" + vn.number + ")\\s*\\]\\]", populate: function(e, t, n) { var r = Oi(n, 3), a = r[0], o = r[1], i = r[2]; t.checks.push({ type: ft.META_COMPARE, field: Ip(a), operator: o, value: parseFloat(i) }); } }, { name: "nextQuery", separator: !0, regex: vn.separator, populate: function(e, t) { var n = e.currentSubject, r = e.edgeCount, a = e.compoundCount, o = e[e.length - 1]; n != null && (o.subject = n, e.currentSubject = null), o.edgeCount = r, o.compoundCount = a, e.edgeCount = 0, e.compoundCount = 0; var i = e[e.length++] = Mn(); return i; } }, { name: "directedEdge", separator: !0, regex: vn.directedEdge, populate: function(e, t) { if (e.currentSubject == null) { var n = Mn(), r = t, a = Mn(); return n.checks.push({ type: ft.DIRECTED_EDGE, source: r, target: a }), eu(e, t, n), e.edgeCount++, a; } else { var o = Mn(), i = t, s = Mn(); return o.checks.push({ type: ft.NODE_SOURCE, source: i, target: s }), eu(e, t, o), e.edgeCount++, s; } } }, { name: "undirectedEdge", separator: !0, regex: vn.undirectedEdge, populate: function(e, t) { if (e.currentSubject == null) { var n = Mn(), r = t, a = Mn(); return n.checks.push({ type: ft.UNDIRECTED_EDGE, nodes: [r, a] }), eu(e, t, n), e.edgeCount++, a; } else { var o = Mn(), i = t, s = Mn(); return o.checks.push({ type: ft.NODE_NEIGHBOR, node: i, neighbor: s }), eu(e, t, o), s; } } }, { name: "child", separator: !0, regex: vn.child, populate: function(e, t) { if (e.currentSubject == null) { var n = Mn(), r = Mn(), a = e[e.length - 1]; return n.checks.push({ type: ft.CHILD, parent: a, child: r }), eu(e, t, n), e.compoundCount++, r; } else if (e.currentSubject === t) { var o = Mn(), i = e[e.length - 1], s = Mn(), l = Mn(), u = Mn(), c = Mn(); return o.checks.push({ type: ft.COMPOUND_SPLIT, left: i, right: s, subject: l }), l.checks = t.checks, t.checks = [{ type: ft.TRUE }], c.checks.push({ type: ft.TRUE }), s.checks.push({ type: ft.PARENT, // type is swapped on right side queries parent: c, child: u // empty for now }), eu(e, i, o), e.currentSubject = l, e.compoundCount++, u; } else { var d = Mn(), f = Mn(), h = [{ type: ft.PARENT, parent: d, child: f }]; return d.checks = t.checks, t.checks = h, e.compoundCount++, f; } } }, { name: "descendant", separator: !0, regex: vn.descendant, populate: function(e, t) { if (e.currentSubject == null) { var n = Mn(), r = Mn(), a = e[e.length - 1]; return n.checks.push({ type: ft.DESCENDANT, ancestor: a, descendant: r }), eu(e, t, n), e.compoundCount++, r; } else if (e.currentSubject === t) { var o = Mn(), i = e[e.length - 1], s = Mn(), l = Mn(), u = Mn(), c = Mn(); return o.checks.push({ type: ft.COMPOUND_SPLIT, left: i, right: s, subject: l }), l.checks = t.checks, t.checks = [{ type: ft.TRUE }], c.checks.push({ type: ft.TRUE }), s.checks.push({ type: ft.ANCESTOR, // type is swapped on right side queries ancestor: c, descendant: u // empty for now }), eu(e, i, o), e.currentSubject = l, e.compoundCount++, u; } else { var d = Mn(), f = Mn(), h = [{ type: ft.ANCESTOR, ancestor: d, descendant: f }]; return d.checks = t.checks, t.checks = h, e.compoundCount++, f; } } }, { name: "subject", modifier: !0, regex: vn.subject, populate: function(e, t) { if (e.currentSubject != null && e.currentSubject !== t) return An("Redefinition of subject in selector `" + e.toString() + "`"), !1; e.currentSubject = t; var n = e[e.length - 1], r = n.checks[0], a = r == null ? null : r.type; a === ft.DIRECTED_EDGE ? r.type = ft.NODE_TARGET : a === ft.UNDIRECTED_EDGE && (r.type = ft.NODE_NEIGHBOR, r.node = r.nodes[1], r.neighbor = r.nodes[0], r.nodes = null); } }]; uS.forEach(function(e) { return e.regexObj = new RegExp("^" + e.regex); }); var get = function(e) { for (var t, n, r, a = 0; a < uS.length; a++) { var o = uS[a], i = o.name, s = e.match(o.regexObj); if (s != null) { n = s, t = o, r = i; var l = s[0]; e = e.substring(l.length); break; } } return { expr: t, match: n, name: r, remaining: e }; }, met = function(e) { var t = e.match(/^\s+/); if (t) { var n = t[0]; e = e.substring(n.length); } return e; }, yet = function(e) { var t = this, n = t.inputText = e, r = t[0] = Mn(); for (t.length = 1, n = met(n); ; ) { var a = get(n); if (a.expr == null) return An("The selector `" + e + "`is invalid"), !1; var o = a.match.slice(1), i = a.expr.populate(t, r, o); if (i === !1) return !1; if (i != null && (r = i), n = a.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 An("The selector `" + e + "` is invalid because it uses both a compound selector and an edge selector"), !1; if (u.edgeCount > 1) return An("The selector `" + e + "` is invalid because it uses multiple edge selectors"), !1; u.edgeCount === 1 && An("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; }, bet = function() { if (this.toStringCache != null) return this.toStringCache; for (var e = function(l) { return l ?? ""; }, t = function(l) { return wt(l) ? '"' + l + '"' : e(l); }, n = function(l) { return " " + l + " "; }, r = function(l, u) { var c = l.type, d = l.value; switch (c) { case ft.GROUP: { var f = e(d); return f.substring(0, f.length - 1); } case ft.DATA_COMPARE: { var h = l.field, p = l.operator; return "[" + h + n(e(p)) + t(d) + "]"; } case ft.DATA_BOOL: { var v = l.operator, m = l.field; return "[" + e(v) + m + "]"; } case ft.DATA_EXIST: { var g = l.field; return "[" + g + "]"; } case ft.META_COMPARE: { var y = l.operator, x = l.field; return "[[" + x + n(e(y)) + t(d) + "]]"; } case ft.STATE: return d; case ft.ID: return "#" + d; case ft.CLASS: return "." + d; case ft.PARENT: case ft.CHILD: return a(l.parent, u) + n(">") + a(l.child, u); case ft.ANCESTOR: case ft.DESCENDANT: return a(l.ancestor, u) + " " + a(l.descendant, u); case ft.COMPOUND_SPLIT: { var w = a(l.left, u), k = a(l.subject, u), C = a(l.right, u); return w + (w.length > 0 ? " " : "") + k + C; } case ft.TRUE: return ""; } }, a = function(l, u) { return l.checks.reduce(function(c, d, f) { return c + (u === l && f === 0 ? "$" : "") + r(d, u); }, ""); }, o = "", i = 0; i < this.length; i++) { var s = this[i]; o += a(s, s.subject), this.length > 1 && i < this.length - 1 && (o += ", "); } return this.toStringCache = o, o; }, wet = { parse: yet, toString: bet }, rq = function(e, t, n) { var r, a = wt(e), o = it(e), i = wt(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), (a || i || u) && (s = !a && !o ? "" : "" + 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; }, xet = function(e, t) { switch (t) { case "?": return !!e; case "!": return !e; case "^": return e === void 0; } }, ket = function(e) { return e !== void 0; }, y_ = function(e, t) { return e.data(t); }, Cet = function(e, t) { return e[t](); }, hr = [], nr = function(e, t) { return e.checks.every(function(n) { return hr[n.type](n, t); }); }; hr[ft.GROUP] = function(e, t) { var n = e.value; return n === "*" || n === t.group(); }; hr[ft.STATE] = function(e, t) { var n = e.value; return het(n, t); }; hr[ft.ID] = function(e, t) { var n = e.value; return t.id() === n; }; hr[ft.CLASS] = function(e, t) { var n = e.value; return t.hasClass(n); }; hr[ft.META_COMPARE] = function(e, t) { var n = e.field, r = e.operator, a = e.value; return rq(Cet(t, n), r, a); }; hr[ft.DATA_COMPARE] = function(e, t) { var n = e.field, r = e.operator, a = e.value; return rq(y_(t, n), r, a); }; hr[ft.DATA_BOOL] = function(e, t) { var n = e.field, r = e.operator; return xet(y_(t, n), r); }; hr[ft.DATA_EXIST] = function(e, t) { var n = e.field; return e.operator, ket(y_(t, n)); }; hr[ft.UNDIRECTED_EDGE] = function(e, t) { var n = e.nodes[0], r = e.nodes[1], a = t.source(), o = t.target(); return nr(n, a) && nr(r, o) || nr(r, a) && nr(n, o); }; hr[ft.NODE_NEIGHBOR] = function(e, t) { return nr(e.node, t) && t.neighborhood().some(function(n) { return n.isNode() && nr(e.neighbor, n); }); }; hr[ft.DIRECTED_EDGE] = function(e, t) { return nr(e.source, t.source()) && nr(e.target, t.target()); }; hr[ft.NODE_SOURCE] = function(e, t) { return nr(e.source, t) && t.outgoers().some(function(n) { return n.isNode() && nr(e.target, n); }); }; hr[ft.NODE_TARGET] = function(e, t) { return nr(e.target, t) && t.incomers().some(function(n) { return n.isNode() && nr(e.source, n); }); }; hr[ft.CHILD] = function(e, t) { return nr(e.child, t) && nr(e.parent, t.parent()); }; hr[ft.PARENT] = function(e, t) { return nr(e.parent, t) && t.children().some(function(n) { return nr(e.child, n); }); }; hr[ft.DESCENDANT] = function(e, t) { return nr(e.descendant, t) && t.ancestors().some(function(n) { return nr(e.ancestor, n); }); }; hr[ft.ANCESTOR] = function(e, t) { return nr(e.ancestor, t) && t.descendants().some(function(n) { return nr(e.descendant, n); }); }; hr[ft.COMPOUND_SPLIT] = function(e, t) { return nr(e.subject, t) && nr(e.left, t) && nr(e.right, t); }; hr[ft.TRUE] = function() { return !0; }; hr[ft.COLLECTION] = function(e, t) { var n = e.value; return n.has(t); }; hr[ft.FILTER] = function(e, t) { var n = e.value; return n(t); }; var Eet = function(e) { var t = this; if (t.length === 1 && t[0].checks.length === 1 && t[0].checks[0].type === ft.ID) return e.getElementById(t[0].checks[0].value).collection(); var n = function(r) { for (var a = 0; a < t.length; a++) { var o = t[a]; if (nr(o, r)) return !0; } return !1; }; return t.text() == null && (n = function() { return !0; }), e.filter(n); }, _et = function(e) { for (var t = this, n = 0; n < t.length; n++) { var r = t[n]; if (nr(r, e)) return !0; } return !1; }, Tet = { matches: _et, filter: Eet }, tc = function(e) { this.inputText = e, this.currentSubject = null, this.compoundCount = 0, this.edgeCount = 0, this.length = 0, e == null || wt(e) && e.match(/^\s*$/) || (Po(e) ? this.addQuery({ checks: [{ type: ft.COLLECTION, value: e.collection() }] }) : sr(e) ? this.addQuery({ checks: [{ type: ft.FILTER, value: e }] }) : wt(e) ? this.parse(e) || (this.invalid = !0) : pr("A selector must be created from a string; found ")); }, nc = tc.prototype; [wet, Tet].forEach(function(e) { return At(nc, e); }); nc.text = function() { return this.inputText; }; nc.size = function() { return this.length; }; nc.eq = function(e) { return this[e]; }; nc.sameText = function(e) { return !this.invalid && !e.invalid && this.text() === e.text(); }; nc.addQuery = function(e) { this[this.length++] = e; }; nc.selector = nc.toString; var Nu = { allAre: function(e) { var t = new tc(e); return this.every(function(n) { return t.matches(n); }); }, is: function(e) { var t = new tc(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()); }); } }; Nu.allAreNeighbours = Nu.allAreNeighbors; Nu.has = Nu.contains; Nu.equal = Nu.equals = Nu.same; var Yo = function(e, t) { return function(n, r, a, o) { var i = n, s = this, l; if (i == null ? l = "" : Po(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] || [], f = Nd(l), h = d[f]; return h || (d[f] = e.call(s, n, r, a, o)); } else return e.call(s, n, r, a, o); }; }, rh = { 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 a = this[r], o = a._private.parent; o && t.push(o); } 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 a = n[r]; t.push(a); } 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], a = r.parents(); t = t || a, t = t.intersect(a); } 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: Yo(function(e) { for (var t = [], n = 0; n < this.length; n++) for (var r = this[n], a = r._private.children, o = 0; o < a.length; o++) t.push(a[o]); 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 a = 0; a < r.length; a++) { var o = r[a]; t.push(o), o.children().nonempty() && n(o.children()); } } return n(this.children()), this.spawn(t, !0).filter(e); } }; function b_(e, t, n, r) { for (var a = [], o = new Lh(), i = e.cy(), s = i.hasCompoundNodes(), l = 0; l < e.length; l++) { var u = e[l]; n ? a.push(u) : s && r(a, o, u); } for (; a.length > 0; ) { var c = a.shift(); t(c), o.add(c.id()), s && r(a, o, c); } return e; } function aq(e, t, n) { if (n.isParent()) for (var r = n._private.children, a = 0; a < r.length; a++) { var o = r[a]; t.has(o.id()) || e.push(o); } } rh.forEachDown = function(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0; return b_(this, e, t, aq); }; function oq(e, t, n) { if (n.isChild()) { var r = n._private.parent; t.has(r.id()) || e.push(r); } } rh.forEachUp = function(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0; return b_(this, e, t, oq); }; function Oet(e, t, n) { oq(e, t, n), aq(e, t, n); } rh.forEachUpAndDown = function(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0; return b_(this, e, t, Oet); }; rh.ancestors = rh.parents; var cg, iq; cg = iq = { data: $n.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: $n.removeData({ field: "data", event: "data", triggerFnName: "trigger", triggerEvent: !0, immutableKeys: { id: !0, source: !0, target: !0, parent: !0 }, updateStyle: !0 }), scratch: $n.data({ field: "scratch", bindingEvent: "scratch", allowBinding: !0, allowSetting: !0, settingEvent: "scratch", settingTriggersEvent: !0, triggerFnName: "trigger", allowGetting: !0, updateStyle: !0 }), removeScratch: $n.removeData({ field: "scratch", event: "scratch", triggerFnName: "trigger", triggerEvent: !0, updateStyle: !0 }), rscratch: $n.data({ field: "rscratch", allowBinding: !1, allowSetting: !0, settingTriggersEvent: !1, allowGetting: !0 }), removeRscratch: $n.removeData({ field: "rscratch", triggerEvent: !1 }), id: function() { var e = this[0]; if (e) return e._private.data.id; } }; cg.attr = cg.data; cg.removeAttr = cg.removeData; var $et = iq, ox = {}; function tC(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, a = n[0], o = a._private.edges, i = 0; i < o.length; i++) { var s = o[i]; !t && s.isLoop() || (r += e(a, s)); } return r; } else return; }; } At(ox, { degree: tC(function(e, t) { return t.source().same(t.target()) ? 2 : 1; }), indegree: tC(function(e, t) { return t.target().same(e) ? 1 : 0; }), outdegree: tC(function(e, t) { return t.source().same(e) ? 1 : 0; }) }); function Pp(e, t) { return function(n) { for (var r, a = this.nodes(), o = 0; o < a.length; o++) { var i = a[o], s = i[e](n); s !== void 0 && (r === void 0 || t(s, r)) && (r = s); } return r; }; } At(ox, { minDegree: Pp("degree", function(e, t) { return e < t; }), maxDegree: Pp("degree", function(e, t) { return e > t; }), minIndegree: Pp("indegree", function(e, t) { return e < t; }), maxIndegree: Pp("indegree", function(e, t) { return e > t; }), minOutdegree: Pp("outdegree", function(e, t) { return e < t; }), maxOutdegree: Pp("outdegree", function(e, t) { return e > t; }) }); At(ox, { totalDegree: function(e) { for (var t = 0, n = this.nodes(), r = 0; r < n.length; r++) t += n[r].degree(e); return t; } }); var Vi, sq, lq = function(e, t, n) { for (var r = 0; r < e.length; r++) { var a = e[r]; if (!a.locked()) { var o = a._private.position, i = { x: t.x != null ? t.x - o.x : 0, y: t.y != null ? t.y - o.y : 0 }; a.isParent() && !(i.x === 0 && i.y === 0) && a.children().shift(i, n), a.dirtyBoundingBoxCache(); } } }, jI = { 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) { lq(e, t, !1); }, onSet: function(e) { e.dirtyCompoundBoundsCache(); }, canSet: function(e) { return !e.locked(); } }; Vi = sq = { position: $n.data(jI), // position but no notification to renderer silentPosition: $n.data(At({}, jI, { allowBinding: !1, allowSetting: !0, settingTriggersEvent: !1, allowGetting: !1, beforeSet: function(e, t) { lq(e, t, !0); }, onSet: function(e) { e.dirtyCompoundBoundsCache(); } })), positions: function(e, t) { if (mn(e)) t ? this.silentPosition(e) : this.position(e); else if (sr(e)) { var n = e, r = this.cy(); r.startBatch(); for (var a = 0; a < this.length; a++) { var o = this[a], i = void 0; (i = n(o, a)) && (t ? o.silentPosition(i) : o.position(i)); } r.endBatch(); } return this; }, silentPositions: function(e) { return this.positions(e, !0); }, shift: function(e, t, n) { var r; if (mn(e) ? (r = { x: it(e.x) ? e.x : 0, y: it(e.y) ? e.y : 0 }, n = t) : wt(e) && it(t) && (r = { x: 0, y: 0 }, r[e] = t), r != null) { var a = this.cy(); a.startBatch(); for (var o = 0; o < this.length; o++) { var i = this[o]; if (!(a.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); } } a.endBatch(); } return this; }, silentShift: function(e, t) { return mn(e) ? this.shift(e, !0) : wt(e) && it(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(), a = r.zoom(), o = r.pan(), i = mn(e) ? e : void 0, s = i !== void 0 || t !== void 0 && wt(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 - o[e]) / a) : i !== void 0 && u.position(LU(i, a, o)); } else { var c = n.position(); return i = ex(c, a, o), 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(), a = mn(e) ? e : void 0, o = a !== void 0 || t !== void 0 && wt(e), i = r.hasCompoundNodes(); if (n && n.isNode()) if (o) 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 f = d ? u.position() : { x: 0, y: 0 }; t !== void 0 ? l.position(e, t + f[e]) : a !== void 0 && l.position({ x: a.x + f.x, y: a.y + f.y }); } else { var h = n.position(), p = i ? n.parent() : null, v = p && p.length > 0, m = v; v && (p = p[0]); var g = m ? p.position() : { x: 0, y: 0 }; return a = { x: h.x - g.x, y: h.y - g.y }, e === void 0 ? a : a[e]; } else if (!o) return; return this; } }; Vi.modelPosition = Vi.point = Vi.position; Vi.modelPositions = Vi.points = Vi.positions; Vi.renderedPoint = Vi.renderedPosition; Vi.relativePoint = Vi.relativePosition; var Fet = sq, df, vc; df = vc = {}; vc.renderedBoundingBox = function(e) { var t = this.boundingBox(e), n = this.cy(), r = n.zoom(), a = n.pan(), o = t.x1 * r + a.x, i = t.x2 * r + a.x, s = t.y1 * r + a.y, l = t.y2 * r + a.y; return { x1: o, x2: i, y1: s, y2: l, w: i - o, h: l - s }; }; vc.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); }; vc.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 }), f = s.position; (d.w === 0 || d.h === 0) && (d = { w: i.pstyle("width").pfValue, h: i.pstyle("height").pfValue }, d.x1 = f.x - d.w / 2, d.x2 = f.x + d.w / 2, d.y1 = f.y - d.h / 2, d.y2 = f.y + d.h / 2); function h(T, O, $) { var A = 0, N = 0, L = O + $; return T > 0 && L > 0 && (A = O / L * T, N = $ / L * T), { biasDiff: A, biasComplementDiff: N }; } function p(T, O, $, A) { if ($.units === "%") switch (A) { case "width": return T > 0 ? $.pfValue * T : 0; case "height": return O > 0 ? $.pfValue * O : 0; case "average": return T > 0 && O > 0 ? $.pfValue * (T + O) / 2 : 0; case "min": return T > 0 && O > 0 ? T > O ? $.pfValue * O : $.pfValue * T : 0; case "max": return T > 0 && O > 0 ? T > O ? $.pfValue * T : $.pfValue * O : 0; default: return 0; } else return $.units === "px" ? $.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 y = c.height.bottom.value; c.height.bottom.units === "px" && c.height.val > 0 && (y = y * 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, y), S = C.biasDiff, _ = C.biasComplementDiff; s.autoPadding = p(d.w, d.h, i.pstyle("padding"), i.pstyle("padding-relative-to").value), s.autoWidth = Math.max(d.w, c.width.val), f.x = (-w + d.x1 + d.x2 + k) / 2, s.autoHeight = Math.max(d.h, c.height.val), f.y = (-S + d.y1 + d.y2 + _) / 2; } for (var r = 0; r < this.length; r++) { var a = this[r], o = a._private; (!o.compoundBoundsClean || e) && (n(a), t.batching() || (o.compoundBoundsClean = !0)); } return this; }; var qo = function(e) { return e === 1 / 0 || e === -1 / 0 ? 0 : e; }, Ai = function(e, t, n, r, a) { r - t === 0 || a - n === 0 || t == null || n == null || r == null || a == 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 = a > e.y2 ? a : e.y2, e.w = e.x2 - e.x1, e.h = e.y2 - e.y1); }, Mc = function(e, t) { return t == null ? e : Ai(e, t.x1, t.y1, t.x2, t.y2); }, wv = function(e, t, n) { return Li(e, t, n); }, M1 = function(e, t, n) { if (!t.cy().headless()) { var r = t._private, a = r.rstyle, o = a.arrowWidth / 2, i = t.pstyle(n + "-arrow-shape").value, s, l; if (i !== "none") { n === "source" ? (s = a.srcX, l = a.srcY) : n === "target" ? (s = a.tgtX, l = a.tgtY) : (s = a.midX, l = a.midY); var u = r.arrowBounds = r.arrowBounds || {}, c = u[n] = u[n] || {}; c.x1 = s - o, c.y1 = l - o, c.x2 = s + o, c.y2 = l + o, c.w = c.x2 - c.x1, c.h = c.y2 - c.y1, Sy(c, 1), Ai(e, c.x1, c.y1, c.x2, c.y2); } } }, nC = function(e, t, n) { if (!t.cy().headless()) { var r; n ? r = n + "-" : r = ""; var a = t._private, o = a.rstyle, i = t.pstyle(r + "label").strValue; if (i) { var s = t.pstyle("text-halign"), l = t.pstyle("text-valign"), u = wv(o, "labelWidth", n), c = wv(o, "labelHeight", n), d = wv(o, "labelX", n), f = wv(o, "labelY", n), h = t.pstyle(r + "text-margin-x").pfValue, p = t.pstyle(r + "text-margin-y").pfValue, v = t.isEdge(), m = t.pstyle(r + "text-rotation"), g = t.pstyle("text-outline-width").pfValue, y = t.pstyle("text-border-width").pfValue, x = y / 2, w = t.pstyle("text-background-padding").pfValue, k = 2, C = c, S = u, _ = S / 2, T = C / 2, O, $, A, N; if (v) O = d - _, $ = d + _, A = f - T, N = f + T; else { switch (s.value) { case "left": O = d - S, $ = d; break; case "center": O = d - _, $ = d + _; break; case "right": O = d, $ = d + S; break; } switch (l.value) { case "top": A = f - C, N = f; break; case "center": A = f - T, N = f + T; break; case "bottom": A = f, N = f + C; break; } } O += h - Math.max(g, x) - w - k, $ += h + Math.max(g, x) + w + k, A += p - Math.max(g, x) - w - k, N += p + Math.max(g, x) + w + k; var L = n || "main", R = a.labelBounds, P = R[L] = R[L] || {}; P.x1 = O, P.y1 = A, P.x2 = $, P.y2 = N, P.w = $ - O, P.h = N - A; var B = v && m.strValue === "autorotate", M = m.pfValue != null && m.pfValue !== 0; if (B || M) { var z = B ? wv(a.rstyle, "labelAngle", n) : m.pfValue, Z = Math.cos(z), G = Math.sin(z), J = (O + $) / 2, se = (A + N) / 2; if (!v) { switch (s.value) { case "left": J = $; break; case "right": J = O; break; } switch (l.value) { case "top": se = N; break; case "bottom": se = A; break; } } var ve = function(we, Oe) { return we = we - J, Oe = Oe - se, { x: we * Z - Oe * G + J, y: we * G + Oe * Z + se }; }, ge = ve(O, A), oe = ve(O, N), ee = ve($, A), q = ve($, N); O = Math.min(ge.x, oe.x, ee.x, q.x), $ = Math.max(ge.x, oe.x, ee.x, q.x), A = Math.min(ge.y, oe.y, ee.y, q.y), N = Math.max(ge.y, oe.y, ee.y, q.y); } var Y = L + "Rot", te = R[Y] = R[Y] || {}; te.x1 = O, te.y1 = A, te.x2 = $, te.y2 = N, te.w = $ - O, te.h = N - A, Ai(e, O, A, $, N), Ai(a.labelBounds.all, O, A, $, N); } return e; } }, Aet = 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 a = t.pstyle("outline-offset").value, o = t.pstyle("shape").value, i = r + a, s = (e.w + i * 2) / e.w, l = (e.h + i * 2) / e.h, u = 0, c = 0; ["diamond", "pentagon", "round-triangle"].includes(o) ? (s = (e.w + i * 2.4) / e.w, c = -i / 3.6) : ["concave-hexagon", "rhomboid", "right-rhomboid"].includes(o) ? s = (e.w + i * 2.4) / e.w : o === "star" ? (s = (e.w + i * 2.8) / e.w, l = (e.h + i * 2.6) / e.h, c = -i / 3.8) : o === "triangle" ? (s = (e.w + i * 2.8) / e.w, l = (e.h + i * 2.4) / e.h, c = -i / 1.4) : o === "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, f = e.w * s - e.w; if (Ey(e, [Math.ceil(d / 2), Math.ceil(f / 2)]), u != 0 || c !== 0) { var h = YYe(e, u, c); MU(e, h); } } } }, Iet = function(e, t) { var n = e._private.cy, r = n.styleEnabled(), a = n.headless(), o = xo(), i = e._private, s = e.isNode(), l = e.isEdge(), u, c, d, f, h, p, v = i.rstyle, m = s && r ? e.pstyle("bounds-expansion").pfValue : [0], g = function(xe) { return xe.pstyle("display").value !== "none"; }, y = !r || g(e) && (!l || g(e.source()) && g(e.target())); if (y) { 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 S = Math.max(w, C), _ = 0, T = 0; if (r && (_ = e.pstyle("width").pfValue, T = _ / 2), s && t.includeNodes) { var O = e.position(); h = O.x, p = O.y; var $ = e.outerWidth(), A = $ / 2, N = e.outerHeight(), L = N / 2; u = h - A, c = h + A, d = p - L, f = p + L, Ai(o, u, d, c, f), r && t.includeOutlines && Aet(o, e); } else if (l && t.includeEdges) if (r && !a) { var R = 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), f = Math.max(v.srcY, v.midY, v.tgtY), u -= T, c += T, d -= T, f += T, Ai(o, u, d, c, f), R === "haystack") { var P = v.haystackPts; if (P && P.length === 2) { if (u = P[0].x, d = P[0].y, c = P[1].x, f = P[1].y, u > c) { var B = u; u = c, c = B; } if (d > f) { var M = d; d = f, f = M; } Ai(o, u - T, d - T, c + T, f + T); } } else if (R === "bezier" || R === "unbundled-bezier" || R.endsWith("segments") || R.endsWith("taxi")) { var z; switch (R) { case "bezier": case "unbundled-bezier": z = v.bezierPts; break; case "segments": case "taxi": case "round-segments": case "round-taxi": z = v.linePts; break; } if (z != null) for (var Z = 0; Z < z.length; Z++) { var G = z[Z]; u = G.x - T, c = G.x + T, d = G.y - T, f = G.y + T, Ai(o, u, d, c, f); } } } else { var J = e.source(), se = J.position(), ve = e.target(), ge = ve.position(); if (u = se.x, c = ge.x, d = se.y, f = ge.y, u > c) { var oe = u; u = c, c = oe; } if (d > f) { var ee = d; d = f, f = ee; } u -= T, c += T, d -= T, f += T, Ai(o, u, d, c, f); } if (r && t.includeEdges && l && (M1(o, e, "mid-source"), M1(o, e, "mid-target"), M1(o, e, "source"), M1(o, e, "target")), r) { var q = e.pstyle("ghost").value === "yes"; if (q) { var Y = e.pstyle("ghost-offset-x").pfValue, te = e.pstyle("ghost-offset-y").pfValue; Ai(o, o.x1 + Y, o.y1 + te, o.x2 + Y, o.y2 + te); } } var we = i.bodyBounds = i.bodyBounds || {}; xI(we, o), Ey(we, m), Sy(we, 1), r && (u = o.x1, c = o.x2, d = o.y1, f = o.y2, Ai(o, u - S, d - S, c + S, f + S)); var Oe = i.overlayBounds = i.overlayBounds || {}; xI(Oe, o), Ey(Oe, m), Sy(Oe, 1); var Ne = i.labelBounds = i.labelBounds || {}; Ne.all != null ? XYe(Ne.all) : Ne.all = xo(), r && t.includeLabels && (t.includeMainLabels && nC(o, e, null), l && (t.includeSourceLabels && nC(o, e, "source"), t.includeTargetLabels && nC(o, e, "target"))); } return o.x1 = qo(o.x1), o.y1 = qo(o.y1), o.x2 = qo(o.x2), o.y2 = qo(o.y2), o.w = qo(o.x2 - o.x1), o.h = qo(o.y2 - o.y1), o.w > 0 && o.h > 0 && y && (Ey(o, m), Sy(o, 1)), o; }, uq = function(e) { var t = 0, n = function(a) { return (a ? 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; }, cq = function(e) { if (e.isEdge()) { var t = e.source().position(), n = e.target().position(), r = function(a) { return Math.round(a); }; return gYe([r(t.x), r(t.y), r(n.x), r(n.y)]); } else return 0; }, HI = function(e, t) { var n = e._private, r, a = e.isEdge(), o = t == null ? UI : uq(t), i = o === UI, s = cq(e), l = n.bbCachePosKey === s, u = t.useCache && l, c = function(h) { return h._private.bbCache == null || h._private.styleDirty; }, d = !u || c(e) || a && c(e.source()) || c(e.target()); if (d ? (l || e.recalculateRenderedStyle(u), r = Iet(e, dg), n.bbCache = r, n.bbCachePosKey = s) : r = n.bbCache, !i) { var f = e.isNode(); r = xo(), (t.includeNodes && f || t.includeEdges && !f) && (t.includeOverlays ? Mc(r, n.overlayBounds) : Mc(r, n.bodyBounds)), t.includeLabels && (t.includeMainLabels && (!a || t.includeSourceLabels && t.includeTargetLabels) ? Mc(r, n.labelBounds.all) : (t.includeMainLabels && Mc(r, n.labelBounds.mainRot), t.includeSourceLabels && Mc(r, n.labelBounds.sourceRot), t.includeTargetLabels && Mc(r, n.labelBounds.targetRot))), r.w = r.x2 - r.x1, r.h = r.y2 - r.y1; } return r; }, dg = { includeNodes: !0, includeEdges: !0, includeLabels: !0, includeMainLabels: !0, includeSourceLabels: !0, includeTargetLabels: !0, includeOverlays: !0, includeUnderlays: !0, includeOutlines: !0, useCache: !0 }, UI = uq(dg), qI = ya(dg); vc.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 = dg : e = qI(e), t = HI(this[0], e); else { t = xo(), e = e || dg; var n = qI(e), r = this, a = r.cy(), o = a.styleEnabled(); if (o) for (var i = 0; i < r.length; i++) { var s = r[i], l = s._private, u = cq(s), c = l.bbCachePosKey === u, d = n.useCache && c && !l.styleDirty; s.recalculateRenderedStyle(d); } this.updateCompoundBounds(!e.useCache); for (var f = 0; f < r.length; f++) { var h = r[f]; Mc(t, HI(h, n)); } } return t.x1 = qo(t.x1), t.y1 = qo(t.y1), t.x2 = qo(t.x2), t.y2 = qo(t.y2), t.w = qo(t.x2 - t.x1), t.h = qo(t.y2 - t.y1), t; }; vc.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; }; vc.boundingBoxAt = function(e) { var t = this.nodes(), n = this.cy(), r = n.hasCompoundNodes(), a = n.collection(); if (r && (a = t.filter(function(u) { return u.isParent(); }), t = t.not(a)), mn(e)) { var o = e; e = function() { return o; }; } 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 && (a.dirtyCompoundBoundsCache(), a.dirtyBoundingBoxCache(), a.updateCompoundBounds(!0)); var l = GYe(this.boundingBox({ useCache: !1 })); return t.silentPositions(s), r && (a.dirtyCompoundBoundsCache(), a.dirtyBoundingBoxCache(), a.updateCompoundBounds(!0)), n.endBatch(), l; }; df.boundingbox = df.bb = df.boundingBox; df.renderedBoundingbox = df.renderedBoundingBox; var Pet = vc, Mv, bm; Mv = bm = {}; var dq = function(e) { e.uppercaseName = hI(e.name), e.autoName = "auto" + e.uppercaseName, e.labelName = "label" + e.uppercaseName, e.outerName = "outer" + e.uppercaseName, e.uppercaseOuterName = hI(e.outerName), Mv[e.name] = function() { var t = this[0], n = t._private, r = n.cy, a = r._private.styleEnabled; if (t) if (a) { if (t.isParent()) return t.updateCompoundBounds(), n[e.autoName] || 0; var o = t.pstyle(e.name); switch (o.strValue) { case "label": return t.recalculateRenderedStyle(), n.rstyle[e.labelName] || 0; default: return o.pfValue; } } else return 1; }, Mv["outer" + e.uppercaseName] = function() { var t = this[0], n = t._private, r = n.cy, a = r._private.styleEnabled; if (t) if (a) { var o = t[e.name](), i = t.pstyle("border-width").pfValue, s = 2 * t.padding(); return o + i + s; } else return 1; }, Mv["rendered" + e.uppercaseName] = function() { var t = this[0]; if (t) { var n = t[e.name](); return n * this.cy().zoom(); } }, Mv["rendered" + e.uppercaseOuterName] = function() { var t = this[0]; if (t) { var n = t[e.outerName](); return n * this.cy().zoom(); } }; }; dq({ name: "width" }); dq({ name: "height" }); bm.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; }; bm.paddedHeight = function() { var e = this[0]; return e.height() + 2 * e.padding(); }; bm.paddedWidth = function() { var e = this[0]; return e.width() + 2 * e.padding(); }; var Let = bm, Net = function(e, t) { if (e.isEdge()) return t(e); }, Met = function(e, t) { if (e.isEdge()) { var n = e.cy(); return ex(t(e), n.zoom(), n.pan()); } }, Bet = function(e, t) { if (e.isEdge()) { var n = e.cy(), r = n.pan(), a = n.zoom(); return t(e).map(function(o) { return ex(o, a, r); }); } }, Det = function(e) { return e.renderer().getControlPoints(e); }, Ret = function(e) { return e.renderer().getSegmentPoints(e); }, zet = function(e) { return e.renderer().getSourceEndpoint(e); }, Vet = function(e) { return e.renderer().getTargetEndpoint(e); }, jet = function(e) { return e.renderer().getEdgeMidpoint(e); }, WI = { controlPoints: { get: Det, mult: !0 }, segmentPoints: { get: Ret, mult: !0 }, sourceEndpoint: { get: zet }, targetEndpoint: { get: Vet }, midpoint: { get: jet } }, Het = function(e) { return "rendered" + e[0].toUpperCase() + e.substr(1); }, Uet = Object.keys(WI).reduce(function(e, t) { var n = WI[t], r = Het(t); return e[t] = function() { return Net(this, n.get); }, n.mult ? e[r] = function() { return Bet(this, n.get); } : e[r] = function() { return Met(this, n.get); }, e; }, {}), qet = At({}, Fet, Pet, Let, Uet); /*! 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 pq = function(e, t) { this.recycle(e, t); }; function xv() { return !1; } function B1() { return !0; } pq.prototype = { instanceString: function() { return "event"; }, recycle: function(e, t) { if (this.isImmediatePropagationStopped = this.isPropagationStopped = this.isDefaultPrevented = xv, e != null && e.preventDefault ? (this.type = e.type, this.isDefaultPrevented = e.defaultPrevented ? B1 : xv) : 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(), a = this.cy.pan(); this.renderedPosition = { x: n.x * r + a.x, y: n.y * r + a.y }; } this.timeStamp = e && e.timeStamp || Date.now(); }, preventDefault: function() { this.isDefaultPrevented = B1; var e = this.originalEvent; e && e.preventDefault && e.preventDefault(); }, stopPropagation: function() { this.isPropagationStopped = B1; var e = this.originalEvent; e && e.stopPropagation && e.stopPropagation(); }, stopImmediatePropagation: function() { this.isImmediatePropagationStopped = B1, this.stopPropagation(); }, isDefaultPrevented: xv, isPropagationStopped: xv, isImmediatePropagationStopped: xv }; var fq = /^([^.]+)(\.(?:[^.]+))?$/, Wet = ".*", hq = { 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 }, KI = Object.keys(hq), Ket = {}; function ix() { for (var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Ket, t = arguments.length > 1 ? arguments[1] : void 0, n = 0; n < KI.length; n++) { var r = KI[n]; this[r] = e[r] || hq[r]; } this.context = t || this.context, this.listeners = [], this.emitting = 0; } var rc = ix.prototype, vq = function(e, t, n, r, a, o, i) { sr(r) && (a = r, r = null), i && (o == null ? o = i : o = At({}, o, i)); for (var s = Vn(n) ? n : n.split(/\s+/), l = 0; l < s.length; l++) { var u = s[l]; if (!Ju(u)) { var c = u.match(fq); if (c) { var d = c[1], f = c[2] ? c[2] : null, h = t(e, u, d, f, r, a, o); if (h === !1) break; } } } }, GI = function(e, t) { return e.addEventFields(e.context, t), new pq(t.type, t); }, Get = function(e, t, n) { if (pXe(n)) { t(e, n); return; } else if (mn(n)) { t(e, GI(e, n)); return; } for (var r = Vn(n) ? n : n.split(/\s+/), a = 0; a < r.length; a++) { var o = r[a]; if (!Ju(o)) { var i = o.match(fq); if (i) { var s = i[1], l = i[2] ? i[2] : null, u = GI(e, { type: s, namespace: l, target: e.context }); t(e, u); } } } }; rc.on = rc.addListener = function(e, t, n, r, a) { return vq(this, function(o, i, s, l, u, c, d) { sr(c) && o.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, a), this; }; rc.one = function(e, t, n, r) { return this.on(e, t, n, r, { one: !0 }); }; rc.removeListener = rc.off = function(e, t, n, r) { var a = this; this.emitting !== 0 && (this.listeners = xYe(this.listeners)); for (var o = this.listeners, i = function(l) { var u = o[l]; vq(a, function(c, d, f, h, p, v) { if ((u.type === f || e === "*") && (!h && u.namespace !== ".*" || u.namespace === h) && (!p || c.qualifierCompare(u.qualifier, p)) && (!v || u.callback === v)) return o.splice(l, 1), !1; }, e, t, n, r); }, s = o.length - 1; s >= 0; s--) i(s); return this; }; rc.removeAllListeners = function() { return this.removeListener("*"); }; rc.emit = rc.trigger = function(e, t, n) { var r = this.listeners, a = r.length; return this.emitting++, Vn(t) || (t = [t]), Get(this, function(o, i) { n != null && (r = [{ event: i.event, type: i.type, namespace: i.namespace, callback: n }], a = r.length); for (var s = function(u) { var c = r[u]; if (c.type === i.type && (!c.namespace || c.namespace === i.namespace || c.namespace === Wet) && o.eventMatches(o.context, c, i)) { var d = [i]; t != null && CYe(d, t), o.beforeEmit(o.context, c, i), c.conf && c.conf.one && (o.listeners = o.listeners.filter(function(p) { return p !== c; })); var f = o.callbackContext(o.context, c, i), h = c.callback.apply(f, d); o.afterEmit(o.context, c, i), h === !1 && (i.stopPropagation(), i.preventDefault()); } }, l = 0; l < a; l++) s(l); o.bubble(o.context) && !i.isPropagationStopped() && o.parent(o.context).emit(i, t); }, e), this.emitting--, this; }; var Xet = { 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 && gm(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(); } }, D1 = function(e) { return wt(e) ? new tc(e) : e; }, gq = { createEmitter: function() { for (var e = 0; e < this.length; e++) { var t = this[e], n = t._private; n.emitter || (n.emitter = new ix(Xet, t)); } return this; }, emitter: function() { return this._private.emitter; }, on: function(e, t, n) { for (var r = D1(t), a = 0; a < this.length; a++) { var o = this[a]; o.emitter().on(e, r, n); } return this; }, removeListener: function(e, t, n) { for (var r = D1(t), a = 0; a < this.length; a++) { var o = this[a]; o.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 = D1(t), a = 0; a < this.length; a++) { var o = this[a]; o.emitter().one(e, r, n); } return this; }, once: function(e, t, n) { for (var r = D1(t), a = 0; a < this.length; a++) { var o = this[a]; o.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; } }; $n.eventAliasesOn(gq); var mq = { 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 (wt(e) || Po(e)) return new tc(e).filter(this); if (sr(e)) { for (var n = this.spawn(), r = this, a = 0; a < r.length; a++) { var o = r[a], i = t ? e.apply(t, [o, a, r]) : e(o, a, r); i && n.push(o); } return n; } return this.spawn(); }, not: function(e) { if (e) { wt(e) && (e = this.filter(e)); for (var t = this.spawn(), n = 0; n < this.length; n++) { var r = this[n], a = e.has(r); a || t.push(r); } return t; } else return this; }, absoluteComplement: function() { var e = this.cy(); return e.mutableElements().not(this); }, intersect: function(e) { if (wt(e)) { var t = e; return this.filter(t); } for (var n = this.spawn(), r = this, a = e, o = this.length < e.length, i = o ? r : a, s = o ? a : 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; wt(e) && (e = t.$(e)); var n = this.spawn(), r = this, a = e, o = 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 o(r, a), o(a, r), n; }, diff: function(e) { var t = this._private.cy; wt(e) && (e = t.$(e)); var n = this.spawn(), r = this.spawn(), a = this.spawn(), o = this, i = e, s = function(l, u, c) { for (var d = 0; d < l.length; d++) { var f = l[d], h = f._private.data.id, p = u.hasElementWithId(h); p ? a.merge(f) : c.push(f); } }; return s(o, i, n), s(i, o, r), { left: n, right: r, both: a }; }, add: function(e) { var t = this._private.cy; if (!e) return this; if (wt(e)) { var n = e; e = t.mutableElements().filter(n); } for (var r = this.spawnSelf(), a = 0; a < e.length; a++) { var o = e[a], i = !this.has(o); i && r.push(o); } return r; }, // in place merge on calling collection merge: function(e) { var t = this._private, n = t.cy; if (!e) return this; if (e && wt(e)) { var r = e; e = n.mutableElements().filter(r); } for (var a = t.map, o = 0; o < e.length; o++) { var i = e[o], s = i._private.data.id, l = !a.has(s); if (l) { var u = this.length++; this[u] = i, a.set(s, { ele: i, index: u }); } } return this; }, unmergeAt: function(e) { var t = this[e], n = t.id(), r = this._private, a = r.map; this[e] = void 0, a.delete(n); var o = e === this.length - 1; if (this.length > 1 && !o) { var i = this.length - 1, s = this[i], l = s._private.data.id; this[i] = void 0, this[e] = s, a.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, a = r.get(n); if (!a) return this; var o = a.index; return this.unmergeAt(o), this; }, // remove eles in place on calling collection unmerge: function(e) { var t = this._private.cy; if (!e) return this; if (e && wt(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, a = 0; a < r.length; a++) { var o = r[a], i = t ? e.apply(t, [o, a, r]) : e(o, a, r); n.push(i); } return n; }, reduce: function(e, t) { for (var n = t, r = this, a = 0; a < r.length; a++) n = e(n, r[a], a, r); return n; }, max: function(e, t) { for (var n = -1 / 0, r, a = this, o = 0; o < a.length; o++) { var i = a[o], s = t ? e.apply(t, [i, o, a]) : e(i, o, a); s > n && (n = s, r = i); } return { value: n, ele: r }; }, min: function(e, t) { for (var n = 1 / 0, r, a = this, o = 0; o < a.length; o++) { var i = a[o], s = t ? e.apply(t, [i, o, a]) : e(i, o, a); s < n && (n = s, r = i); } return { value: n, ele: r }; } }, kn = mq; kn.u = kn["|"] = kn["+"] = kn.union = kn.or = kn.add; kn["\\"] = kn["!"] = kn["-"] = kn.difference = kn.relativeComplement = kn.subtract = kn.not; kn.n = kn["&"] = kn["."] = kn.and = kn.intersection = kn.intersect; kn["^"] = kn["(+)"] = kn["(-)"] = kn.symmetricDifference = kn.symdiff = kn.xor; kn.fnFilter = kn.filterFn = kn.stdFilter = kn.filter; kn.complement = kn.abscomp = kn.absoluteComplement; var Yet = { 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; } }, yq = function(e, t) { var n = e.cy(), r = n.hasCompoundNodes(); function a(u) { var c = u.pstyle("z-compound-depth"); return c.value === "auto" ? r ? u.zDepth() : 0 : c.value === "bottom" ? -1 : c.value === "top" ? l_ : 0; } var o = a(e) - a(t); if (o !== 0) return o; 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(); }, Ub = { forEach: function(e, t) { if (sr(e)) for (var n = this.length, r = 0; r < n; r++) { var a = this[r], o = t ? e.apply(t, [a, r, this]) : e(a, r, this); if (o === !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 a = e; a >= 0 && a < t && a < r; a++) n.push(this[a]); 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 (!sr(e)) return this; var t = this.toArray().sort(e); return this.spawn(t); }, sortByZIndex: function() { return this.sort(yq); }, 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 : l_ - 1; } else { var a = t.source, o = t.target, i = a.zDepth(), s = o.zDepth(); return Math.max(i, s, 0); } } } }; Ub.each = Ub.forEach; var Zet = function() { var e = "undefined", t = (typeof Symbol > "u" ? "undefined" : Rr(Symbol)) != e && Rr(Symbol.iterator) != e; t && (Ub[Symbol.iterator] = function() { var n = this, r = { value: void 0, done: !1 }, a = 0, o = this.length; return hU({ next: function() { return a < o ? r.value = n[a++] : (r.value = void 0, r.done = !0), r; } }, Symbol.iterator, function() { return this; }); }); }; Zet(); var Qet = ya({ nodeDimensionsIncludeLabels: !1 }), Ty = { // Calculates and returns node dimensions { x, y } based on options given layoutDimensions: function(e) { e = Qet(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(); }), a = this.cy(), o = t.eles, i = function(w) { return w.id(); }, s = rg(n, i); e.emit({ type: "layoutstart", layout: e }), e.animations = []; var l = function(w, k, C) { var S = { 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 - S.x) * w, y: (C.y - S.y) * w }; return { x: S.x + _.x, y: S.y + _.y }; }, u = t.spacingFactor && t.spacingFactor !== 1, c = function() { if (!u) return null; for (var w = xo(), k = 0; k < r.length; k++) { var C = r[k], S = s(C, k); ZYe(w, S.x, S.y); } return w; }, d = c(), f = rg(function(w, k) { var C = s(w, k); if (u) { var S = Math.abs(t.spacingFactor); C = l(S, 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 p = r[h], v = f(p, h), m = t.animateFilter == null || t.animateFilter(p, h); if (m) { var g = p.animation({ position: v, duration: t.animationDuration, easing: t.animationEasing }); e.animations.push(g); } else p.position(v); } if (t.fit) { var y = a.animation({ fit: { boundingBox: o.boundingBoxAt(f), padding: t.padding }, duration: t.animationDuration, easing: t.animationEasing }); e.animations.push(y); } else if (t.zoom !== void 0 && t.pan !== void 0) { var x = a.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 }), Nh.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(f), t.fit && a.fit(t.eles, t.padding), t.zoom != null && a.zoom(t.zoom), t.pan && a.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(At({}, e, { eles: this })); } }; Ty.createLayout = Ty.makeLayout = Ty.layout; function bq(e, t, n) { var r = n._private, a = r.styleCache = r.styleCache || [], o; return (o = a[e]) != null || (o = a[e] = t(n)), o; } function sx(e, t) { return e = Nd(e), function(n) { return bq(e, t, n); }; } function lx(e, t) { e = Nd(e); var n = function(r) { return t.call(r); }; return function() { var r = this[0]; if (r) return bq(e, n, r); }; } var ha = { 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(), a = this; e = !!(e || e === void 0), r && (a = this.spawnSelf().merge(this.descendants()).merge(this.parents())); var o = a; return e ? o.emitAndNotify("style") : o.emit("style"), a.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 a = n._private.style[e]; return a ?? (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, a = n.style(); if (mn(e)) { var o = e; a.applyBypass(this, o, r), this.emitAndNotify("style"); } else if (wt(e)) if (t === void 0) { var i = this[0]; return i ? a.getStylePropertyValue(i, e) : void 0; } else a.applyBypass(this, e, t, r), this.emitAndNotify("style"); else if (e === void 0) { var s = this[0]; return s ? a.getRawStyle(s) : void 0; } return this; }, removeStyle: function(e) { var t = this.cy(); if (!t.styleEnabled()) return this; var n = !1, r = t.style(), a = this; if (e === void 0) for (var o = 0; o < a.length; o++) { var i = a[o]; r.removeAllBypasses(i, n); } else { e = e.split(/\s+/); for (var s = 0; s < a.length; s++) { var l = a[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, a = n.pstyle("opacity").value; if (!t) return a; var o = r.data.parent ? n.parents() : null; if (o) for (var i = 0; i < o.length; i++) { var s = o[i], l = s.pstyle("opacity").value; a = l * a; } return a; } }, 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 rC(e, t) { var n = e._private, r = n.data.parent ? e.parents() : null; if (r) for (var a = 0; a < r.length; a++) { var o = r[a]; if (!t(o)) return !1; } return !0; } function w_(e) { var t = e.ok, n = e.edgeOkViaNode || e.ok, r = e.parentOk || e.ok; return function() { var a = this.cy(); if (!a.styleEnabled()) return !0; var o = this[0], i = a.hasCompoundNodes(); if (o) { var s = o._private; if (!t(o)) return !1; if (o.isNode()) return !i || rC(o, r); var l = s.source, u = s.target; return n(l) && (!i || rC(l, n)) && (l === u || n(u) && (!i || rC(u, n))); } }; } var Rh = sx("eleTakesUpSpace", function(e) { return e.pstyle("display").value === "element" && e.width() !== 0 && (e.isNode() ? e.height() !== 0 : !0); }); ha.takesUpSpace = lx("takesUpSpace", w_({ ok: Rh })); var Jet = sx("eleInteractive", function(e) { return e.pstyle("events").value === "yes" && e.pstyle("visibility").value === "visible" && Rh(e); }), ett = sx("parentInteractive", function(e) { return e.pstyle("visibility").value === "visible" && Rh(e); }); ha.interactive = lx("interactive", w_({ ok: Jet, parentOk: ett, edgeOkViaNode: Rh })); ha.noninteractive = function() { var e = this[0]; if (e) return !e.interactive(); }; var ttt = sx("eleVisible", function(e) { return e.pstyle("visibility").value === "visible" && e.pstyle("opacity").pfValue !== 0 && Rh(e); }), ntt = Rh; ha.visible = lx("visible", w_({ ok: ttt, edgeOkViaNode: ntt })); ha.hidden = function() { var e = this[0]; if (e) return !e.visible(); }; ha.isBundledBezier = lx("isBundledBezier", function() { return this.cy().styleEnabled() ? !this.removed() && this.pstyle("curve-style").value === "bezier" && this.takesUpSpace() : !1; }); ha.bypass = ha.css = ha.style; ha.renderedCss = ha.renderedStyle; ha.removeBypass = ha.removeCss = ha.removeStyle; ha.pstyle = ha.parsedStyle; var Mu = {}; function XI(e) { return function() { var t = arguments, n = []; if (t.length === 2) { var r = t[0], a = t[1]; this.on(e.event, r, a); } else if (t.length === 1 && sr(t[0])) { var o = t[0]; this.on(e.event, o); } else if (t.length === 0 || t.length === 1 && Vn(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 f = this.spawn(n); f.updateStyle(), f.emit(e.event), i && f.emit(i); } return this; }; } function zh(e) { Mu[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]; } }, Mu[e.on] = XI({ event: e.on, field: e.field, ableField: e.ableField, overrideAble: e.overrideAble, value: !0 }), Mu[e.off] = XI({ event: e.off, field: e.field, ableField: e.ableField, overrideAble: e.overrideAble, value: !1 }); } zh({ field: "locked", overrideField: function(e) { return e.cy().autolock() ? !0 : void 0; }, on: "lock", off: "unlock" }); zh({ field: "grabbable", overrideField: function(e) { return e.cy().autoungrabify() || e.pannable() ? !1 : void 0; }, on: "grabify", off: "ungrabify" }); zh({ field: "selected", ableField: "selectable", overrideAble: function(e) { return e.cy().autounselectify() ? !1 : void 0; }, on: "select", off: "unselect" }); zh({ field: "selectable", overrideField: function(e) { return e.cy().autounselectify() ? !1 : void 0; }, on: "selectify", off: "unselectify" }); Mu.deselect = Mu.unselect; Mu.grabbed = function() { var e = this[0]; if (e) return e._private.grabbed; }; zh({ field: "active", on: "activate", off: "unactivate" }); zh({ field: "pannable", on: "panify", off: "unpanify" }); Mu.inactive = function() { var e = this[0]; if (e) return !e._private.active; }; var Aa = {}, YI = function(e) { return function(t) { for (var n = this, r = [], a = 0; a < n.length; a++) { var o = n[a]; if (o.isNode()) { for (var i = !1, s = o.connectedEdges(), l = 0; l < s.length; l++) { var u = s[l], c = u.source(), d = u.target(); if (e.noIncomingEdges && d === o && c !== o || e.noOutgoingEdges && c === o && d !== o) { i = !0; break; } } i || r.push(o); } } return this.spawn(r, !0).filter(t); }; }, ZI = function(e) { return function(t) { for (var n = this, r = [], a = 0; a < n.length; a++) { var o = n[a]; if (o.isNode()) for (var i = o.connectedEdges(), s = 0; s < i.length; s++) { var l = i[s], u = l.source(), c = l.target(); e.outgoing && u === o ? (r.push(l), r.push(c)) : e.incoming && c === o && (r.push(l), r.push(u)); } } return this.spawn(r, !0).filter(t); }; }, QI = function(e) { return function(t) { for (var n = this, r = [], a = {}; ; ) { var o = e.outgoing ? n.outgoers() : n.incomers(); if (o.length === 0) break; for (var i = !1, s = 0; s < o.length; s++) { var l = o[s], u = l.id(); a[u] || (a[u] = !0, r.push(l), i = !0); } if (!i) break; n = o; } return this.spawn(r, !0).filter(t); }; }; Aa.clearTraversalCache = function() { for (var e = 0; e < this.length; e++) this[e]._private.traversalCache = null; }; At(Aa, { // get the root nodes in the DAG roots: YI({ noIncomingEdges: !0 }), // get the leaf nodes in the DAG leaves: YI({ noOutgoingEdges: !0 }), // normally called children in graph theory // these nodes =edges=> outgoing nodes outgoers: Yo(ZI({ outgoing: !0 }), "outgoers"), // aka DAG descendants successors: QI({ outgoing: !0 }), // normally called parents in graph theory // these nodes <=edges= incoming nodes incomers: Yo(ZI({ incoming: !0 }), "incomers"), // aka DAG ancestors predecessors: QI({ incoming: !0 }) }); At(Aa, { neighborhood: Yo(function(e) { for (var t = [], n = this.nodes(), r = 0; r < n.length; r++) for (var a = n[r], o = a.connectedEdges(), i = 0; i < o.length; i++) { var s = o[i], l = s.source(), u = s.target(), c = a === 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); } }); Aa.neighbourhood = Aa.neighborhood; Aa.closedNeighbourhood = Aa.closedNeighborhood; Aa.openNeighbourhood = Aa.openNeighborhood; At(Aa, { source: Yo(function(e) { var t = this[0], n; return t && (n = t._private.source || t.cy().collection()), n && e ? n.filter(e) : n; }, "source"), target: Yo(function(e) { var t = this[0], n; return t && (n = t._private.target || t.cy().collection()), n && e ? n.filter(e) : n; }, "target"), sources: JI({ attr: "source" }), targets: JI({ attr: "target" }) }); function JI(e) { return function(t) { for (var n = [], r = 0; r < this.length; r++) { var a = this[r], o = a._private[e.attr]; o && n.push(o); } return this.spawn(n, !0).filter(t); }; } At(Aa, { edgesWith: Yo(eP(), "edgesWith"), edgesTo: Yo(eP({ thisIsSrc: !0 }), "edgesTo") }); function eP(e) { return function(t) { var n = [], r = this._private.cy, a = e || {}; wt(t) && (t = r.$(t)); for (var o = 0; o < t.length; o++) for (var i = t[o]._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), f = c || d; f && ((a.thisIsSrc || a.thisIsTgt) && (a.thisIsSrc && !c || a.thisIsTgt && !d) || n.push(l)); } return this.spawn(n, !0); }; } At(Aa, { connectedEdges: Yo(function(e) { for (var t = [], n = this, r = 0; r < n.length; r++) { var a = n[r]; if (a.isNode()) for (var o = a._private.edges, i = 0; i < o.length; i++) { var s = o[i]; t.push(s); } } return this.spawn(t, !0).filter(e); }, "connectedEdges"), connectedNodes: Yo(function(e) { for (var t = [], n = this, r = 0; r < n.length; r++) { var a = n[r]; a.isEdge() && (t.push(a.source()[0]), t.push(a.target()[0])); } return this.spawn(t, !0).filter(e); }, "connectedNodes"), parallelEdges: Yo(tP(), "parallelEdges"), codirectedEdges: Yo(tP({ codirected: !0 }), "codirectedEdges") }); function tP(e) { var t = { codirected: !1 }; return e = At({}, t, e), function(n) { for (var r = [], a = this.edges(), o = e, i = 0; i < a.length; i++) for (var s = a[i], l = s._private, u = l.source, c = u._private.data.id, d = l.data.target, f = u._private.edges, h = 0; h < f.length; h++) { var p = f[h], v = p._private.data, m = v.target, g = v.source, y = m === d && g === c, x = c === m && d === g; (o.codirected && y || !o.codirected && (y || x)) && r.push(p); } return this.spawn(r, !0).filter(n); }; } At(Aa, { components: function(e) { var t = this, n = t.cy(), r = n.collection(), a = e == null ? t.nodes() : e.nodes(), o = []; e != null && a.empty() && (a = e.sources()); var i = function(l, u) { r.merge(l), a.unmerge(l), u.merge(l); }; if (a.empty()) return t.spawn(); var s = function() { var l = n.collection(); o.push(l); var u = a[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 (a.length > 0); return o; }, component: function() { var e = this[0]; return e.cy().mutableElements().components(e)[0]; } }); Aa.componentsOf = Aa.components; var va = 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) { pr("A collection must have a reference to the core"); return; } var a = new hs(), o = !1; if (!t) t = []; else if (t.length > 0 && mn(t[0]) && !gm(t[0])) { o = !0; for (var i = [], s = new Lh(), 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 = IU(); else if (e.hasElementWithId(d.id) || s.has(d.id)) continue; var f = new Jw(e, c, !1); i.push(f), s.add(d.id); } t = i; } this.length = 0; for (var h = 0, p = t.length; h < p; h++) { var v = t[h][0]; if (v != null) { var m = v._private.data.id; (!n || !a.has(m)) && (n && a.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 hs(), y = this.eles, x = 0; x < y.length; x++) { var w = y[x]; g.set(w.id(), { index: x, ele: w }); } } }, n && (this._private.map = a), o && !r && this.restore(); }, Gn = Jw.prototype = va.prototype = Object.create(Array.prototype); Gn.instanceString = function() { return "collection"; }; Gn.spawn = function(e, t) { return new va(this.cy(), e, t); }; Gn.spawnSelf = function() { return this.spawn(this); }; Gn.cy = function() { return this._private.cy; }; Gn.renderer = function() { return this._private.cy.renderer(); }; Gn.element = function() { return this[0]; }; Gn.collection = function() { return yU(this) ? this : new va(this._private.cy, [this]); }; Gn.unique = function() { return new va(this._private.cy, this, !0); }; Gn.hasElementWithId = function(e) { return e = "" + e, this._private.map.has(e); }; Gn.getElementById = function(e) { e = "" + e; var t = this._private.cy, n = this._private.map.get(e); return n ? n.ele : new va(t); }; Gn.$id = Gn.getElementById; Gn.poolIndex = function() { var e = this._private.cy, t = e._private.elements, n = this[0]._private.data.id; return t._private.map.get(n).index; }; Gn.indexOf = function(e) { var t = e[0]._private.data.id; return this._private.map.get(t).index; }; Gn.indexOfId = function(e) { return e = "" + e, this._private.map.get(e).index; }; Gn.json = function(e) { var t = this.element(), n = this.cy(); if (t == null && e) return this; if (t != null) { var r = t._private; if (mn(e)) { if (n.startBatch(), e.data) { t.data(e.data); var a = r.data; if (t.isEdge()) { var o = !1, i = {}, s = e.data.source, l = e.data.target; s != null && s != a.source && (i.source = "" + s, o = !0), l != null && l != a.target && (i.target = "" + l, o = !0), o && (t = t.move(i)); } else { var u = "parent" in e.data, c = e.data.parent; u && (c != null || a.parent != null) && c != a.parent && (c === void 0 && (c = null), c != null && (c = "" + c), t = t.move({ parent: c })); } } e.position && t.position(e.position); var d = function(p, v, m) { var g = e[p]; g != null && g !== r[p] && (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 f = { data: fs(r.data), position: fs(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 }; f.classes = ""; var h = 0; return r.classes.forEach(function(p) { return f.classes += h++ === 0 ? p : " " + p; }), f; } } }; Gn.jsons = function() { for (var e = [], t = 0; t < this.length; t++) { var n = this[t], r = n.json(); e.push(r); } return e; }; Gn.clone = function() { for (var e = this.cy(), t = [], n = 0; n < this.length; n++) { var r = this[n], a = r.json(), o = new Jw(e, a, !1); t.push(o); } return new va(e, t); }; Gn.copy = Gn.clone; Gn.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(), a = r._private, o = [], i = [], s, l = 0, u = n.length; l < u; l++) { var c = n[l]; t && !c.removed() || (c.isNode() ? o.push(c) : i.push(c)); } s = o.concat(i); var d, f = function() { s.splice(d, 1), d--; }; for (d = 0; d < s.length; d++) { var h = s[d], p = h._private, v = p.data; if (h.clearTraversalCache(), !(!t && !p.removed)) { if (v.id === void 0) v.id = IU(); else if (it(v.id)) v.id = "" + v.id; else if (Ju(v.id) || !wt(v.id)) { pr("Can not create element with invalid string ID `" + v.id + "`"), f(); continue; } else if (r.hasElementWithId(v.id)) { pr("Can not create second element with ID `" + v.id + "`"), f(); continue; } } var m = v.id; if (h.isNode()) { var g = p.position; g.x == null && (g.x = 0), g.y == null && (g.y = 0); } if (h.isEdge()) { for (var y = h, x = ["source", "target"], w = x.length, k = !1, C = 0; C < w; C++) { var S = x[C], _ = v[S]; it(_) && (_ = v[S] = "" + v[S]), _ == null || _ === "" ? (pr("Can not create edge `" + m + "` with unspecified " + S), k = !0) : r.hasElementWithId(_) || (pr("Can not create edge `" + m + "` with nonexistant " + S + " `" + _ + "`"), k = !0); } if (k) { f(); continue; } var T = r.getElementById(v.source), O = r.getElementById(v.target); T.same(O) ? T._private.edges.push(y) : (T._private.edges.push(y), O._private.edges.push(y)), y._private.source = T, y._private.target = O; } p.map = new hs(), p.map.set(m, { ele: h, index: 0 }), p.removed = !1, t && r.addToPool(h); } for (var $ = 0; $ < o.length; $++) { var A = o[$], N = A._private.data; it(N.parent) && (N.parent = "" + N.parent); var L = N.parent, R = L != null; if (R || A._private.parent) { var P = A._private.parent ? r.collection().merge(A._private.parent) : r.getElementById(L); if (P.empty()) N.parent = void 0; else if (P[0].removed()) An("Node added with missing parent, reference to parent removed"), N.parent = void 0, A._private.parent = null; else { for (var B = !1, M = P; !M.empty(); ) { if (A.same(M)) { B = !0, N.parent = void 0; break; } M = M.parent(); } B || (P[0]._private.children.push(A), A._private.parent = P[0], a.hasCompoundNodes = !0); } } } if (s.length > 0) { for (var z = s.length === n.length ? n : new va(r, s), Z = 0; Z < z.length; Z++) { var G = z[Z]; G.isNode() || (G.parallelEdges().clearTraversalCache(), G.source().clearTraversalCache(), G.target().clearTraversalCache()); } var J; a.hasCompoundNodes ? J = r.collection().merge(z).merge(z.connectedNodes()).merge(z.parent()) : J = z, J.dirtyCompoundBoundsCache().dirtyBoundingBoxCache().updateStyle(e), e ? z.emitAndNotify("add") : t && z.emit("add"); } return n; }; Gn.removed = function() { var e = this[0]; return e && e._private.removed; }; Gn.inside = function() { var e = this[0]; return e && !e._private.removed; }; Gn.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 = [], a = {}, o = n._private.cy; function i(L) { for (var R = L._private.edges, P = 0; P < R.length; P++) l(R[P]); } function s(L) { for (var R = L._private.children, P = 0; P < R.length; P++) l(R[P]); } function l(L) { var R = a[L.id()]; t && L.removed() || R || (a[L.id()] = !0, L.isNode() ? (r.push(L), i(L), s(L)) : r.unshift(L)); } for (var u = 0, c = n.length; u < c; u++) { var d = n[u]; l(d); } function f(L, R) { var P = L._private.edges; ec(P, R), L.clearTraversalCache(); } function h(L) { L.clearTraversalCache(); } var p = []; p.ids = {}; function v(L, R) { R = R[0], L = L[0]; var P = L._private.children, B = L.id(); ec(P, R), R._private.parent = null, p.ids[B] || (p.ids[B] = !0, p.push(L)); } n.dirtyCompoundBoundsCache(), t && o.removeFromPool(r); for (var m = 0; m < r.length; m++) { var g = r[m]; if (g.isEdge()) { var y = g.source()[0], x = g.target()[0]; f(y, g), f(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 S = g.parent(); S.length !== 0 && v(S, g); } t && (g._private.removed = !0); } var _ = o._private.elements; o._private.hasCompoundNodes = !1; for (var T = 0; T < _.length; T++) { var O = _[T]; if (O.isParent()) { o._private.hasCompoundNodes = !0; break; } } var $ = new va(this.cy(), r); $.size() > 0 && (e ? $.emitAndNotify("remove") : t && $.emit("remove")); for (var A = 0; A < p.length; A++) { var N = p[A]; (!t || !N.removed()) && N.updateStyle(); } return $; }; Gn.move = function(e) { var t = this._private.cy, n = this, r = !1, a = !1, o = function(h) { return h == null ? h : "" + h; }; if (e.source !== void 0 || e.target !== void 0) { var i = o(e.source), s = o(e.target), l = i != null && t.hasElementWithId(i), u = s != null && t.hasElementWithId(s); (l || u) && (t.batch(function() { n.remove(r, a), n.emitAndNotify("moveout"); for (var h = 0; h < n.length; h++) { var p = n[h], v = p._private.data; p.isEdge() && (l && (v.source = i), u && (v.target = s)); } n.restore(r, a); }), n.emitAndNotify("move")); } else if (e.parent !== void 0) { var c = o(e.parent), d = c === null || t.hasElementWithId(c); if (d) { var f = c === null ? void 0 : c; t.batch(function() { var h = n.remove(r, a); h.emitAndNotify("moveout"); for (var p = 0; p < n.length; p++) { var v = n[p], m = v._private.data; v.isNode() && (m.parent = f); } h.restore(r, a); }), n.emitAndNotify("move"); } } return this; }; [qU, pet, _y, Nu, rh, $et, ox, qet, gq, mq, Yet, Ub, Ty, ha, Mu, Aa].forEach(function(e) { At(Gn, e); }); var rtt = { add: function(e) { var t, n = this; if (Po(e)) { var r = e; if (r._private.cy === n) t = r.restore(); else { for (var a = [], o = 0; o < r.length; o++) { var i = r[o]; a.push(i.json()); } t = new va(n, a); } } else if (Vn(e)) { var s = e; t = new va(n, s); } else if (mn(e) && (Vn(e.nodes) || Vn(e.edges))) { for (var l = e, u = [], c = ["nodes", "edges"], d = 0, f = c.length; d < f; d++) { var h = c[d], p = l[h]; if (Vn(p)) for (var v = 0, m = p.length; v < m; v++) { var g = At({ group: h }, p[v]); u.push(g); } } t = new va(n, u); } else { var y = e; t = new Jw(n, y).collection(); } return t; }, remove: function(e) { if (!Po(e) && wt(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 att(e, t, n, r) { var a = 4, o = 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 f = c ? new Float32Array(l) : new Array(l); function h(O, $) { return 1 - 3 * $ + 3 * O; } function p(O, $) { return 3 * $ - 6 * O; } function v(O) { return 3 * O; } function m(O, $, A) { return ((h($, A) * O + p($, A)) * O + v($)) * O; } function g(O, $, A) { return 3 * h($, A) * O * O + 2 * p($, A) * O + v($); } function y(O, $) { for (var A = 0; A < a; ++A) { var N = g($, e, n); if (N === 0) return $; var L = m($, e, n) - O; $ -= L / N; } return $; } function x() { for (var O = 0; O < l; ++O) f[O] = m(O * u, e, n); } function w(O, $, A) { var N, L, R = 0; do L = $ + (A - $) / 2, N = m(L, e, n) - O, N > 0 ? A = L : $ = L; while (Math.abs(N) > i && ++R < s); return L; } function k(O) { for (var $ = 0, A = 1, N = l - 1; A !== N && f[A] <= O; ++A) $ += u; --A; var L = (O - f[A]) / (f[A + 1] - f[A]), R = $ + L * u, P = g(R, e, n); return P >= o ? y(O, R) : P === 0 ? R : w(O, $, $ + u); } var C = !1; function S() { C = !0, (e !== t || n !== r) && x(); } var _ = function(O) { return C || S(), e === t && n === r ? O : O === 0 ? 0 : O === 1 ? 1 : m(k(O), t, r); }; _.getControlPoints = function() { return [{ x: e, y: t }, { x: n, y: r }]; }; var T = "generateBezier(" + [e, t, n, r] + ")"; return _.toString = function() { return T; }, _; } /*! Runge-Kutta spring physics function generator. Adapted from Framer.js, copyright Koen Bok. MIT License: http://en.wikipedia.org/wiki/MIT_License */ var ott = /* @__PURE__ */ function() { function e(r) { return -r.tension * r.x - r.friction * r.v; } function t(r, a, o) { var i = { x: r.x + o.dx * a, v: r.v + o.dv * a, tension: r.tension, friction: r.friction }; return { dx: i.v, dv: e(i) }; } function n(r, a) { var o = { dx: r.v, dv: e(r) }, i = t(r, a * 0.5, o), s = t(r, a * 0.5, i), l = t(r, a, s), u = 1 / 6 * (o.dx + 2 * (i.dx + s.dx) + l.dx), c = 1 / 6 * (o.dv + 2 * (i.dv + s.dv) + l.dv); return r.x = r.x + u * a, r.v = r.v + c * a, r; } return function r(a, o, i) { var s = { x: -1, v: 0, tension: null, friction: null }, l = [0], u = 0, c = 1 / 1e4, d = 16 / 1e3, f, h, p; for (a = parseFloat(a) || 500, o = parseFloat(o) || 20, i = i || null, s.tension = a, s.friction = o, f = i !== null, f ? (u = r(a, o), h = u / i * d) : h = d; p = n(p || s, h), l.push(1 + p.x), u += 16, Math.abs(p.x) > c && Math.abs(p.v) > c; ) ; return f ? function(v) { return l[v * (l.length - 1) | 0]; } : u; }; }(), qn = function(e, t, n, r) { var a = att(e, t, n, r); return function(o, i, s) { return o + (i - o) * a(s); }; }, Oy = { linear: function(e, t, n) { return e + (t - e) * n; }, // default easings ease: qn(0.25, 0.1, 0.25, 1), "ease-in": qn(0.42, 0, 1, 1), "ease-out": qn(0, 0, 0.58, 1), "ease-in-out": qn(0.42, 0, 0.58, 1), // sine "ease-in-sine": qn(0.47, 0, 0.745, 0.715), "ease-out-sine": qn(0.39, 0.575, 0.565, 1), "ease-in-out-sine": qn(0.445, 0.05, 0.55, 0.95), // quad "ease-in-quad": qn(0.55, 0.085, 0.68, 0.53), "ease-out-quad": qn(0.25, 0.46, 0.45, 0.94), "ease-in-out-quad": qn(0.455, 0.03, 0.515, 0.955), // cubic "ease-in-cubic": qn(0.55, 0.055, 0.675, 0.19), "ease-out-cubic": qn(0.215, 0.61, 0.355, 1), "ease-in-out-cubic": qn(0.645, 0.045, 0.355, 1), // quart "ease-in-quart": qn(0.895, 0.03, 0.685, 0.22), "ease-out-quart": qn(0.165, 0.84, 0.44, 1), "ease-in-out-quart": qn(0.77, 0, 0.175, 1), // quint "ease-in-quint": qn(0.755, 0.05, 0.855, 0.06), "ease-out-quint": qn(0.23, 1, 0.32, 1), "ease-in-out-quint": qn(0.86, 0, 0.07, 1), // expo "ease-in-expo": qn(0.95, 0.05, 0.795, 0.035), "ease-out-expo": qn(0.19, 1, 0.22, 1), "ease-in-out-expo": qn(1, 0, 0, 1), // circ "ease-in-circ": qn(0.6, 0.04, 0.98, 0.335), "ease-out-circ": qn(0.075, 0.82, 0.165, 1), "ease-in-out-circ": qn(0.785, 0.135, 0.15, 0.86), // user param easings... spring: function(e, t, n) { if (n === 0) return Oy.linear; var r = ott(e, t, n); return function(a, o, i) { return a + (o - a) * r(i); }; }, "cubic-bezier": qn }; function nP(e, t, n, r, a) { if (r === 1 || t === n) return n; var o = a(t, n, r); return e == null || ((e.roundValue || e.color) && (o = Math.round(o)), e.min !== void 0 && (o = Math.max(o, e.min)), e.max !== void 0 && (o = Math.min(o, e.max))), o; } function rP(e, t) { return e.pfValue != null || e.value != null ? e.pfValue != null && (t == null || t.type.units !== "%") ? e.pfValue : e.value : e; } function Lp(e, t, n, r, a) { var o = a != null ? a.type : null; n < 0 ? n = 0 : n > 1 && (n = 1); var i = rP(e, a), s = rP(t, a); if (it(i) && it(s)) return nP(o, i, s, n, r); if (Vn(i) && Vn(s)) { for (var l = [], u = 0; u < s.length; u++) { var c = i[u], d = s[u]; if (c != null && d != null) { var f = nP(o, c, d, n, r); l.push(f); } else l.push(d); } return l; } } function itt(e, t, n, r) { var a = !r, o = 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 = Oy.linear; else { var d; if (wt(s)) { var f = c.parse("transition-timing-function", s); d = f.value; } else d = s; var h, p; wt(d) ? (h = d, p = []) : (h = d[1], p = d.slice(2).map(function(z) { return +z; })), p.length > 0 ? (h === "spring" && p.push(i.duration), i.easingImpl = Oy[h].apply(null, p)) : i.easingImpl = Oy[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, y = i.position; if (y && a && !e.locked()) { var x = {}; kv(g.x, y.x) && (x.x = Lp(g.x, y.x, m, v)), kv(g.y, y.y) && (x.y = Lp(g.y, y.y, m, v)), e.position(x); } var w = i.startPan, k = i.pan, C = o.pan, S = k != null && r; S && (kv(w.x, k.x) && (C.x = Lp(w.x, k.x, m, v)), kv(w.y, k.y) && (C.y = Lp(w.y, k.y, m, v)), e.emit("pan")); var _ = i.startZoom, T = i.zoom, O = T != null && r; O && (kv(_, T) && (o.zoom = sg(o.minZoom, Lp(_, T, m, v), o.maxZoom)), e.emit("zoom")), (S || O) && e.emit("viewport"); var $ = i.style; if ($ && $.length > 0 && a) { for (var A = 0; A < $.length; A++) { var N = $[A], L = N.name, R = N, P = i.startStyle[L], B = c.properties[P.name], M = Lp(P, R, m, v, B); c.overrideBypass(e, L, M); } e.emit("style"); } } return i.progress = m, m; } function kv(e, t) { return e == null || t == null ? !1 : it(e) && it(t) ? !0 : !!(e && t); } function stt(e, t, n, r) { var a = t._private; a.started = !0, a.startTime = n - a.progress * a.duration; } function aP(e, t) { var n = t._private.aniEles, r = []; function a(c, d) { var f = c._private, h = f.animation.current, p = f.animation.queue, v = !1; if (h.length === 0) { var m = p.shift(); m && h.push(m); } for (var g = function(k) { for (var C = k.length - 1; C >= 0; C--) { var S = k[C]; S(); } k.splice(0, k.length); }, y = h.length - 1; y >= 0; y--) { var x = h[y], w = x._private; if (w.stopped) { h.splice(y, 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 || stt(c, x, e), itt(c, x, e, d), w.applying && (w.applying = !1), g(w.frames), w.step != null && w.step(e), x.completed() && (h.splice(y, 1), w.hooked = !1, w.playing = !1, w.started = !1, g(w.completes)), v = !0); } return !d && h.length === 0 && p.length === 0 && r.push(c), v; } for (var o = !1, i = 0; i < n.length; i++) { var s = n[i], l = a(s); o = o || l; } var u = a(t, !0); (o || u) && (n.length > 0 ? t.notify("draw", n) : t.notify("draw")), n.unmerge(r), t.emit("step"); } var ltt = { // pull in animation functions animate: $n.animate(), animation: $n.animation(), animated: $n.animated(), clearQueue: $n.clearQueue(), delay: $n.delay(), delayAnimation: $n.delayAnimation(), stop: $n.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 && Rb(function(r) { aP(r, e), t(); }); } var n = e.renderer(); n && n.beforeRender ? n.beforeRender(function(r, a) { aP(a, e); }, n.beforeRenderPriorities.animations) : t(); } }, utt = { 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 && gm(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; } }, R1 = function(e) { return wt(e) ? new tc(e) : e; }, wq = { createEmitter: function() { var e = this._private; return e.emitter || (e.emitter = new ix(utt, this)), this; }, emitter: function() { return this._private.emitter; }, on: function(e, t, n) { return this.emitter().on(e, R1(t), n), this; }, removeListener: function(e, t, n) { return this.emitter().removeListener(e, R1(t), n), this; }, removeAllListeners: function() { return this.emitter().removeAllListeners(), this; }, one: function(e, t, n) { return this.emitter().one(e, R1(t), n), this; }, once: function(e, t, n) { return this.emitter().one(e, R1(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; } }; $n.eventAliasesOn(wq); var cS = { 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); } }; cS.jpeg = cS.jpg; var $y = { layout: function(e) { var t = this; if (e == null) { pr("Layout options must be specified to make a layout"); return; } if (e.name == null) { pr("A `name` must be specified to make a layout"); return; } var n = e.name, r = t.extension("layout", n); if (r == null) { pr("No such layout `" + n + "` found. Did you forget to import it and `cytoscape.use()` it?"); return; } var a; wt(e.eles) ? a = t.$(e.eles) : a = e.eles != null ? e.eles : t.$(); var o = new r(At({}, e, { cy: t, eles: a })); return o; } }; $y.createLayout = $y.makeLayout = $y.layout; var ctt = { 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 a = this.renderer(); this.destroyed() || !a || a.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 a = n[r], o = e[a], i = t.getElementById(a); i.data(o); } }); } }, dtt = ya({ hideEdgesOnViewport: !1, textureOnViewport: !1, motionBlur: !1, motionBlurOpacity: 0.05, pixelRatio: void 0, desktopTapThreshold: 4, touchTapThreshold: 8, wheelSensitivity: 1, debug: !1, showFps: !1 }), dS = { renderTo: function(e, t, n, r) { var a = this._private.renderer; return a.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) { pr("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 && An("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 = dtt(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); } }; dS.invalidateDimensions = dS.resize; var Fy = { // 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 wt(e) ? this.$(e) : Po(e) ? e.collection() : Vn(e) ? (t || (t = {}), new va(this, e, t.unique, t.removed)) : new va(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; } }; Fy.elements = Fy.filter = Fy.$; var Ma = {}, a0 = "t", ptt = "f"; Ma.apply = function(e) { for (var t = this, n = t._private, r = n.cy, a = r.collection(), o = 0; o < e.length; o++) { var i = e[o], 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 && a.push(i); } } return a; }; Ma.getPropertiesDiff = function(e, t) { var n = this, r = n._private.propDiffs = n._private.propDiffs || {}, a = e + "-" + t, o = r[a]; if (o) return o; for (var i = [], s = {}, l = 0; l < n.length; l++) { var u = n[l], c = e[l] === a0, d = t[l] === a0, f = c !== d, h = u.mappedProperties.length > 0; if (f || d && h) { var p = void 0; f && h || f ? p = u.properties : h && (p = u.mappedProperties); for (var v = 0; v < p.length; v++) { for (var m = p[v], g = m.name, y = !1, x = l + 1; x < n.length; x++) { var w = n[x], k = t[x] === a0; if (k && (y = w.properties[m.name] != null, y)) break; } !s[g] && !y && (s[g] = !0, i.push(g)); } } } return r[a] = i, i; }; Ma.getContextMeta = function(e) { for (var t = this, n = "", r, a = e._private.styleCxtKey || "", o = 0; o < t.length; o++) { var i = t[o], s = i.selector && i.selector.matches(e); s ? n += a0 : n += ptt; } return r = t.getPropertiesDiff(a, n), e._private.styleCxtKey = n, { key: n, diffPropNames: r, empty: r.length === 0 }; }; Ma.getContextStyle = function(e) { var t = e.key, n = this, r = this._private.contextStyles = this._private.contextStyles || {}; if (r[t]) return r[t]; for (var a = { _private: { key: t } }, o = 0; o < n.length; o++) { var i = n[o], s = t[o] === a0; if (s) for (var l = 0; l < i.properties.length; l++) { var u = i.properties[l]; a[u.name] = u; } } return r[t] = a, a; }; Ma.applyContextStyle = function(e, t, n) { for (var r = this, a = e.diffPropNames, o = {}, i = r.types, s = 0; s < a.length; s++) { var l = a[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, f = d.fnValue = u.value(n); if (f === d.prevFnValue) continue; } var h = o[l] = { prev: c }; r.applyParsedProperty(n, u), h.next = n.pstyle(l), h.next && h.next.bypass && (h.next = h.next.bypassed); } } return { diffProps: o }; }; Ma.updateStyleHints = function(e) { var t = e._private, n = this, r = n.propertyGroupNames, a = n.propertyGroupKeys, o = function(te, we, Oe) { return n.getPropertiesHash(te, we, Oe); }, 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 < a.length; u++) { var c = a[u]; t.styleKeys[c] = [Yp, Lv]; } for (var d = function(te, we) { return t.styleKeys[we][0] = ag(te, t.styleKeys[we][0]); }, f = function(te, we) { return t.styleKeys[we][1] = og(te, t.styleKeys[we][1]); }, h = function(te, we) { d(te, we), f(te, we); }, p = function(te, we) { for (var Oe = 0; Oe < te.length; Oe++) { var Ne = te.charCodeAt(Oe); d(Ne, we), f(Ne, we); } }, v = 2e9, m = function(te) { return -128 < te && te < 128 && Math.floor(te) !== te ? v - (te * 1024 | 0) : te; }, g = 0; g < r.length; g++) { var y = r[g], x = l[y]; if (x != null) { var w = this.properties[y], k = w.type, C = w.groupKey, S = void 0; w.hashOverride != null ? S = w.hashOverride(e, x) : x.pfValue != null && (S = x.pfValue); var _ = w.enums == null ? x.value : null, T = S != null, O = _ != null, $ = T || O, A = x.units; if (k.number && $ && !k.multiple) { var N = T ? S : _; h(m(N), C), !T && A != null && p(A, C); } else p(x.strValue, C); } } for (var L = [Yp, Lv], R = 0; R < a.length; R++) { var P = a[R], B = t.styleKeys[P]; L[0] = ag(B[0], L[0]), L[1] = og(B[1], L[1]); } t.styleKey = vYe(L[0], L[1]); var M = t.styleKeys; t.labelDimsKey = Jl(M.labelDimensions); var z = o(e, ["label"], M.labelDimensions); if (t.labelKey = Jl(z), t.labelStyleKey = Jl(F1(M.commonLabel, z)), !s) { var Z = o(e, ["source-label"], M.labelDimensions); t.sourceLabelKey = Jl(Z), t.sourceLabelStyleKey = Jl(F1(M.commonLabel, Z)); var G = o(e, ["target-label"], M.labelDimensions); t.targetLabelKey = Jl(G), t.targetLabelStyleKey = Jl(F1(M.commonLabel, G)); } if (s) { var J = t.styleKeys, se = J.nodeBody, ve = J.nodeBorder, ge = J.nodeOutline, oe = J.backgroundImage, ee = J.compound, q = J.pie, Y = [se, ve, ge, oe, ee, q].filter(function(te) { return te != null; }).reduce(F1, [Yp, Lv]); t.nodeKey = Jl(Y), t.hasPie = q != null && q[0] !== Yp && q[1] !== Lv; } return i !== t.styleKey; }; Ma.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; }; Ma.applyParsedProperty = function(e, t) { var n = this, r = t, a = e._private.style, o, i = n.types, s = n.properties[r.name].type, l = r.bypass, u = a[r.name], c = u && u.bypass, d = e._private, f = "mapping", h = function(J) { return J == null ? null : J.pfValue != null ? J.pfValue : J.value; }, p = function() { var J = h(u), se = h(r); n.checkTriggers(e, r.name, J, se); }; 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 a[r.name] = void 0, p(), !0; if (r.deleteBypassed) return u ? u.bypass ? (u.bypassed = void 0, p(), !0) : !1 : (p(), !0); if (r.deleteBypass) return u ? u.bypass ? (a[r.name] = u.bypassed, p(), !0) : !1 : (p(), !0); var v = function() { An("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, y = 0; y < m.length && g; y++) { var x = m[y]; g = g[x]; } if (g == null) return v(), !1; var w; if (it(g)) { var k = r.fieldMax - r.fieldMin; k === 0 ? w = 0 : w = (g - r.fieldMin) / k; } else return An("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], S = r.valueMax[0], _ = r.valueMin[1], T = r.valueMax[1], O = r.valueMin[2], $ = r.valueMax[2], A = r.valueMin[3] == null ? 1 : r.valueMin[3], N = r.valueMax[3] == null ? 1 : r.valueMax[3], L = [Math.round(C + (S - C) * w), Math.round(_ + (T - _) * w), Math.round(O + ($ - O) * w), Math.round(A + (N - A) * w)]; o = { // 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: L, strValue: "rgb(" + L[0] + ", " + L[1] + ", " + L[2] + ")" }; } else if (s.number) { var R = r.valueMin + (r.valueMax - r.valueMin) * w; o = this.parse(r.name, R, r.bypass, f); } else return !1; if (!o) return v(), !1; o.mapping = r, r = o; break; } case i.data: { for (var P = r.field.split("."), B = d.data, M = 0; M < P.length && B; M++) { var z = P[M]; B = B[z]; } if (B != null && (o = this.parse(r.name, B, r.bypass, f)), !o) return v(), !1; o.mapping = r, r = o; break; } case i.fn: { var Z = r.value, G = r.fnValue != null ? r.fnValue : Z(e); if (r.prevFnValue = G, G == null) return An("Custom function mappers may not return null (i.e. `" + r.name + "` for ele `" + e.id() + "` is null)"), !1; if (o = this.parse(r.name, G, r.bypass, f), !o) return An("Custom function mappers may not return invalid values for the property type (i.e. `" + r.name + "` for ele `" + e.id() + "` is invalid)"), !1; o.mapping = fs(r), r = o; break; } case void 0: break; default: return !1; } return l ? (c ? r.bypassed = u.bypassed : r.bypassed = u, a[r.name] = r) : c ? u.bypassed = r : a[r.name] = r, p(), !0; }; Ma.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 a = r._private.style, o = Object.keys(a), i = 0; i < o.length; i++) { var s = o[i], l = a[s]; l != null && (l.bypass ? l.bypassed = null : a[s] = null); } } }; Ma.update = function() { var e = this._private.cy, t = e.mutableElements(); t.updateStyle(); }; Ma.updateTransitions = function(e, t) { var n = this, r = e._private, a = e.pstyle("transition-property").value, o = e.pstyle("transition-duration").pfValue, i = e.pstyle("transition-delay").pfValue; if (a.length > 0 && o > 0) { for (var s = {}, l = !1, u = 0; u < a.length; u++) { var c = a[u], d = e.pstyle(c), f = t[c]; if (f) { var h = f.prev, p = h, v = f.next != null ? f.next : d, m = !1, g = void 0, y = 1e-6; p && (it(p.pfValue) && it(v.pfValue) ? (m = v.pfValue - p.pfValue, g = p.pfValue + y * m) : it(p.value) && it(v.value) ? (m = v.value - p.value, g = p.value + y * m) : Vn(p.value) && Vn(v.value) && (m = p.value[0] !== v.value[0] || p.value[1] !== v.value[1] || p.value[2] !== v.value[2], g = p.strValue), m && (s[c] = v.strValue, this.applyBypass(e, c, g), l = !0)); } } if (!l) return; r.transitioning = !0, new Nh(function(x) { i > 0 ? e.delayAnimation(i).play().promise().then(x) : x(); }).then(function() { return e.animation({ style: s, duration: o, easing: e.pstyle("transition-timing-function").value, queue: !1 }).play().promise(); }).then(function() { n.removeBypasses(e, a), e.emitAndNotify("style"), r.transitioning = !1; }); } else r.transitioning && (this.removeBypasses(e, a), e.emitAndNotify("style"), r.transitioning = !1); }; Ma.checkTrigger = function(e, t, n, r, a, o) { var i = this.properties[t], s = a(i); s != null && s(n, r) && o(i); }; Ma.checkZOrderTrigger = function(e, t, n, r) { var a = this; this.checkTrigger(e, t, n, r, function(o) { return o.triggersZOrder; }, function() { a._private.cy.notify("zorder", e); }); }; Ma.checkBoundsTrigger = function(e, t, n, r) { this.checkTrigger(e, t, n, r, function(a) { return a.triggersBounds; }, function(a) { e.dirtyCompoundBoundsCache(), e.dirtyBoundingBoxCache(), // only for beziers -- so performance of other edges isn't affected a.triggersBoundsOfParallelBeziers && t === "curve-style" && (n === "bezier" || r === "bezier") && e.parallelEdges().forEach(function(o) { o.isBundledBezier() && o.dirtyBoundingBoxCache(); }), a.triggersBoundsOfConnectedEdges && t === "display" && (n === "none" || r === "none") && e.connectedEdges().forEach(function(o) { o.dirtyBoundingBoxCache(); }); }); }; Ma.checkTriggers = function(e, t, n, r) { e.dirtyStyleCache(), this.checkZOrderTrigger(e, t, n, r), this.checkBoundsTrigger(e, t, n, r); }; var wm = {}; wm.applyBypass = function(e, t, n, r) { var a = this, o = [], i = !0; if (t === "*" || t === "**") { if (n !== void 0) for (var s = 0; s < a.properties.length; s++) { var l = a.properties[s], u = l.name, c = this.parse(u, n, !0); c && o.push(c); } } else if (wt(t)) { var d = this.parse(t, n, !0); d && o.push(d); } else if (mn(t)) { var f = t; r = n; for (var h = Object.keys(f), p = 0; p < h.length; p++) { var v = h[p], m = f[v]; if (m === void 0 && (m = f[Yw(v)]), m !== void 0) { var g = this.parse(v, m, !0); g && o.push(g); } } } else return !1; if (o.length === 0) return !1; for (var y = !1, x = 0; x < e.length; x++) { for (var w = e[x], k = {}, C = void 0, S = 0; S < o.length; S++) { var _ = o[S]; if (r) { var T = w.pstyle(_.name); C = k[_.name] = { prev: T }; } y = this.applyParsedProperty(w, fs(_)) || y, r && (C.next = w.pstyle(_.name)); } y && this.updateStyleHints(w), r && this.updateTransitions(w, k, i); } return y; }; wm.overrideBypass = function(e, t, n) { t = s_(t); for (var r = 0; r < e.length; r++) { var a = e[r], o = a._private.style[t], i = this.properties[t].type, s = i.color, l = i.mutiple, u = o ? o.pfValue != null ? o.pfValue : o.value : null; !o || !o.bypass ? this.applyBypass(a, t, n) : (o.value = n, o.pfValue != null && (o.pfValue = n), s ? o.strValue = "rgb(" + n.join(",") + ")" : l ? o.strValue = n.join(" ") : o.strValue = "" + n, this.updateStyleHints(a)), this.checkTriggers(a, t, u, n); } }; wm.removeAllBypasses = function(e, t) { return this.removeBypasses(e, this.propertyNames, t); }; wm.removeBypasses = function(e, t, n) { for (var r = !0, a = 0; a < e.length; a++) { for (var o = e[a], i = {}, s = 0; s < t.length; s++) { var l = t[s], u = this.properties[l], c = o.pstyle(u.name); if (!(!c || !c.bypass)) { var d = "", f = this.parse(l, d, !0), h = i[u.name] = { prev: c }; this.applyParsedProperty(o, f), h.next = o.pstyle(u.name); } } this.updateStyleHints(o), n && this.updateTransitions(o, i, r); } }; var x_ = {}; x_.getEmSizeInPixels = function() { var e = this.containerCss("font-size"); return e != null ? parseFloat(e) : 1; }; x_.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 Is = {}; Is.getRenderedStyle = function(e, t) { return t ? this.getStylePropertyValue(e, t, !0) : this.getRawStyle(e, !0); }; Is.getRawStyle = function(e, t) { var n = this; if (e = e[0], e) { for (var r = {}, a = 0; a < n.properties.length; a++) { var o = n.properties[a], i = n.getStylePropertyValue(e, o.name, t); i != null && (r[o.name] = i, r[Yw(o.name)] = i); } return r; } }; Is.getIndexedStyle = function(e, t, n, r) { var a = e.pstyle(t)[n][r]; return a ?? e.cy().style().getDefaultProperty(t)[n][0]; }; Is.getStylePropertyValue = function(e, t, n) { var r = this; if (e = e[0], e) { var a = r.properties[t]; a.alias && (a = a.pointsTo); var o = a.type, i = e.pstyle(a.name); if (i) { var s = i.value, l = i.units, u = i.strValue; if (n && o.number && s != null && it(s)) { var c = e.cy().zoom(), d = function(v) { return v * c; }, f = function(v, m) { return d(v) + m; }, h = Vn(s), p = h ? l.every(function(v) { return v != null; }) : l != null; return p ? h ? s.map(function(v, m) { return f(v, l[m]); }).join(" ") : f(s, l) : h ? s.map(function(v) { return wt(v) ? v : "" + d(v); }).join(" ") : "" + d(s); } else if (u != null) return u; } return null; } }; Is.getAnimationStartStyle = function(e, t) { for (var n = {}, r = 0; r < t.length; r++) { var a = t[r], o = a.name, i = e.pstyle(o); i !== void 0 && (mn(i) ? i = this.parse(o, i.strValue) : i = this.parse(o, i)), i && (n[o] = i); } return n; }; Is.getPropsList = function(e) { var t = this, n = [], r = e, a = t.properties; if (r) for (var o = Object.keys(r), i = 0; i < o.length; i++) { var s = o[i], l = r[s], u = a[s] || a[s_(s)], c = this.parse(u.name, l); c && n.push(c); } return n; }; Is.getNonDefaultPropertiesHash = function(e, t, n) { var r = n.slice(), a, o, i, s, l, u; for (l = 0; l < t.length; l++) if (a = t[l], o = e.pstyle(a, !1), o != null) if (o.pfValue != null) r[0] = ag(s, r[0]), r[1] = og(s, r[1]); else for (i = o.strValue, u = 0; u < i.length; u++) s = i.charCodeAt(u), r[0] = ag(s, r[0]), r[1] = og(s, r[1]); return r; }; Is.getPropertiesHash = Is.getNonDefaultPropertiesHash; var ux = {}; ux.appendFromJson = function(e) { for (var t = this, n = 0; n < e.length; n++) { var r = e[n], a = r.selector, o = r.style || r.css, i = Object.keys(o); t.selector(a); for (var s = 0; s < i.length; s++) { var l = i[s], u = o[l]; t.css(l, u); } } return t; }; ux.fromJson = function(e) { var t = this; return t.resetToDefault(), t.appendFromJson(e), t; }; ux.json = function() { for (var e = [], t = this.defaultLength; t < this.length; t++) { for (var n = this[t], r = n.selector, a = n.properties, o = {}, i = 0; i < a.length; i++) { var s = a[i]; o[s.name] = s.strValue; } e.push({ selector: r ? r.toString() : "core", style: o }); } return e; }; var k_ = {}; k_.appendFromString = function(e) { var t = this, n = this, r = "" + e, a, o, i; r = r.replace(/[/][*](\s|.)+?[*][/]/g, ""); function s() { r.length > a.length ? r = r.substr(a.length) : r = ""; } function l() { o.length > i.length ? o = o.substr(i.length) : o = ""; } for (; ; ) { var u = r.match(/^\s*$/); if (u) break; var c = r.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/); if (!c) { An("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: " + r); break; } a = c[0]; var d = c[1]; if (d !== "core") { var f = new tc(d); if (f.invalid) { An("Skipping parsing of block: Invalid selector found in string stylesheet: " + d), s(); continue; } } var h = c[2], p = !1; o = h; for (var v = []; ; ) { var m = o.match(/^\s*$/); if (m) break; var g = o.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/); if (!g) { An("Skipping parsing of block: Invalid formatting of style property and value definitions found in:" + h), p = !0; break; } i = g[0]; var y = g[1], x = g[2], w = t.properties[y]; if (!w) { An("Skipping property: Invalid property name in: " + i), l(); continue; } var k = n.parse(y, x); if (!k) { An("Skipping property: Invalid property definition in: " + i), l(); continue; } v.push({ name: y, val: x }), l(); } if (p) { s(); break; } n.selector(d); for (var C = 0; C < v.length; C++) { var S = v[C]; n.css(S.name, S.val); } s(); } return n; }; k_.fromString = function(e) { var t = this; return t.resetToDefault(), t.appendFromString(e), t; }; var Qr = {}; (function() { var e = Nr, t = yXe, n = wXe, r = xXe, a = kXe, o = function(q) { return "^" + q + "\\s*\\(\\s*([\\w\\.]+)\\s*\\)$"; }, i = function(q) { var Y = e + "|\\w+|" + t + "|" + n + "|" + r + "|" + a; return "^" + q + "\\s*\\(([\\w\\.]+)\\s*\\,\\s*(" + e + ")\\s*\\,\\s*(" + e + ")\\s*,\\s*(" + Y + ")\\s*\\,\\s*(" + Y + ")\\)$"; }, s = [`^url\\s*\\(\\s*['"]?(.+?)['"]?\\s*\\)$`, "^(none)$", "^(.+)$"]; Qr.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: o("data") }, layoutData: { mapping: !0, regex: o("layoutData") }, scratch: { mapping: !0, regex: o("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(q, Y) { switch (q.length) { case 2: return Y[0] !== "deg" && Y[0] !== "rad" && Y[1] !== "deg" && Y[1] !== "rad"; case 1: return wt(q[0]) || Y[0] === "deg" || Y[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(q) { var Y = q.length; return Y === 1 || Y === 2 || Y === 4; } } }; var l = { zeroNonZero: function(q, Y) { return (q == null || Y == null) && q !== Y || q == 0 && Y != 0 ? !0 : q != 0 && Y == 0; }, any: function(q, Y) { return q != Y; }, emptyNonEmpty: function(q, Y) { var te = Ju(q), we = Ju(Y); return te && !we || !te && we; } }, u = Qr.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 }], f = [{ 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 }], p = [{ 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 }], y = [{ 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(q, Y) { return Y.value === "label" ? -q.poolIndex() : Y.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 }], S = [{ 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 }], T = [{ 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 }], O = [{ 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 }], $ = [{ 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 }], A = [{ 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 }], N = []; Qr.pieBackgroundN = 16, N.push({ name: "pie-size", type: u.sizeMaybePercent }); for (var L = 1; L <= Qr.pieBackgroundN; L++) N.push({ name: "pie-" + L + "-background-color", type: u.color }), N.push({ name: "pie-" + L + "-background-size", type: u.percent }), N.push({ name: "pie-" + L + "-background-opacity", type: u.zeroOneNumber }); var R = [], P = Qr.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(q) { P.forEach(function(Y) { var te = Y + "-" + q.name, we = q.type, Oe = q.triggersBounds; R.push({ name: te, type: we, triggersBounds: Oe }); }); }, {}); var B = Qr.properties = [].concat(v, x, m, g, y, $, p, h, c, d, f, k, C, S, _, N, T, O, R, A), M = Qr.propertyGroups = { // common to all eles behavior: v, transition: x, visibility: m, overlay: g, underlay: y, ghost: $, // labels commonLabel: p, labelDimensions: h, mainLabel: c, sourceLabel: d, targetLabel: f, // node props nodeBody: k, nodeBorder: C, nodeOutline: S, backgroundImage: _, pie: N, compound: T, // edge props edgeLine: O, edgeArrow: R, core: A }, z = Qr.propertyGroupNames = {}, Z = Qr.propertyGroupKeys = Object.keys(M); Z.forEach(function(q) { z[q] = M[q].map(function(Y) { return Y.name; }), M[q].forEach(function(Y) { return Y.groupKey = q; }); }); var G = Qr.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" }]; Qr.propertyNames = B.map(function(q) { return q.name; }); for (var J = 0; J < B.length; J++) { var se = B[J]; B[se.name] = se; } for (var ve = 0; ve < G.length; ve++) { var ge = G[ve], oe = B[ge.pointsTo], ee = { name: ge.name, alias: !0, pointsTo: oe }; B.push(ee), B[ge.name] = ee; } })(); Qr.getDefaultProperty = function(e) { return this.getDefaultProperties()[e]; }; Qr.getDefaultProperties = function() { var e = this._private; if (e.defaultProperties != null) return e.defaultProperties; for (var t = At({ // 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 <= Qr.pieBackgroundN; c++) { var d = u.name.replace("{{i}}", c), f = u.value; l[d] = f; } 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 Qr.arrowPrefixes.forEach(function(c) { var d = c + "-" + u.name, f = u.value; l[d] = f; }), l; }, {})), n = {}, r = 0; r < this.properties.length; r++) { var a = this.properties[r]; if (!a.pointsTo) { var o = a.name, i = t[o], s = this.parse(o, i); n[o] = s; } } return e.defaultProperties = n, e.defaultProperties; }; Qr.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 cx = {}; cx.parse = function(e, t, n, r) { var a = this; if (sr(t)) return a.parseImplWarn(e, t, n, r); var o = r === "mapping" || r === !0 || r === !1 || r == null ? "dontcare" : r, i = n ? "t" : "f", s = "" + t, l = $U(e, s, i, o), u = a.propCache = a.propCache || [], c; return (c = u[l]) || (c = u[l] = a.parseImplWarn(e, t, n, r)), (n || r === "mapping") && (c = fs(c), c && (c.value = fs(c.value))), c; }; cx.parseImplWarn = function(e, t, n, r) { var a = this.parseImpl(e, t, n, r); return !a && t != null && An("The style property `".concat(e, ": ").concat(t, "` is invalid")), a && (a.name === "width" || a.name === "height") && t === "label" && An("The style value of `label` is deprecated for `" + a.name + "`"), a; }; cx.parseImpl = function(e, t, n, r) { var a = this; e = s_(e); var o = a.properties[e], i = t, s = a.types; if (!o || t === void 0) return null; o.alias && (o = o.pointsTo, e = o.name); var l = wt(t); l && (t = t.trim()); var u = o.type; if (!u) return null; if (n && (t === "" || t === null)) return { name: e, value: t, bypass: !0, deleteBypass: !0 }; if (sr(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 f = s.data; return { name: e, value: c, strValue: "" + t, mapped: f, 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 p = this.parse(e, d[4]); if (!p || p.mapped) return !1; var v = this.parse(e, d[5]); if (!v || v.mapped) return !1; if (p.pfValue === v.pfValue || p.strValue === v.strValue) return An("`" + e + ": " + t + "` is not a valid mapper because the output range is zero; converting to `" + e + ": " + p.strValue + "`"), this.parse(e, p.strValue); if (u.color) { var m = p.value, g = v.value, y = 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 (y) 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: p.value, valueMax: v.value, bypass: n }; } } if (u.multiple && r !== "multiple") { var x; if (l ? x = t.split(/\s+/) : Vn(t) ? x = t : x = [t], u.evenMultiple && x.length % 2 !== 0) return null; for (var w = [], k = [], C = [], S = "", _ = !1, T = 0; T < x.length; T++) { var O = a.parse(e, x[T], n, "multiple"); _ = _ || wt(O.value), w.push(O.value), C.push(O.pfValue != null ? O.pfValue : O.value), k.push(O.units), S += (T > 0 ? " " : "") + O.strValue; } return u.validate && !u.validate(w, k) ? null : u.singleEnum && _ ? w.length === 1 && wt(w[0]) ? { name: e, value: w[0], strValue: w[0], bypass: n } : null : { name: e, value: w, pfValue: C, strValue: S, bypass: n, units: k }; } var $ = function() { for (var q = 0; q < u.enums.length; q++) { var Y = u.enums[q]; if (Y === t) return { name: e, value: t, strValue: "" + t, bypass: n }; } return null; }; if (u.number) { var A, N = "px"; if (u.units && (A = u.units), u.implicitUnits && (N = u.implicitUnits), !u.unitless) if (l) { var L = "px|em" + (u.allowPercent ? "|\\%" : ""); A && (L = A); var R = t.match("^(" + Nr + ")(" + L + ")?$"); R && (t = R[1], A = R[2] || N); } else (!A || u.implicitUnits) && (A = N); if (t = parseFloat(t), isNaN(t) && u.enums === void 0) return null; if (isNaN(t) && u.enums !== void 0) return t = i, $(); if (u.integer && !dXe(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 + (A || ""), units: A, bypass: n }; return u.unitless || A !== "px" && A !== "em" ? P.pfValue = t : P.pfValue = A === "px" || !A ? t : this.getEmSizeInPixels() * t, (A === "ms" || A === "s") && (P.pfValue = A === "ms" ? t : 1e3 * t), (A === "deg" || A === "rad") && (P.pfValue = A === "rad" ? t : qYe(t)), A === "%" && (P.pfValue = t / 100), P; } else if (u.propList) { var B = [], M = "" + t; if (M !== "none") { for (var z = M.split(/\s*,\s*|\s+/), Z = 0; Z < z.length; Z++) { var G = z[Z].trim(); a.properties[G] ? B.push(G) : An("`" + G + "` is not a valid property name"); } if (B.length === 0) return null; } return { name: e, value: B, strValue: B.length === 0 ? "none" : B.join(" "), bypass: n }; } else if (u.color) { var J = OXe(t); return J ? { name: e, value: J, pfValue: J, strValue: "rgb(" + J[0] + "," + J[1] + "," + J[2] + ")", // n.b. no spaces b/c of multiple support bypass: n } : null; } else if (u.regex || u.regexes) { if (u.enums) { var se = $(); if (se) return se; } for (var ve = u.regexes ? u.regexes : [u.regex], ge = 0; ge < ve.length; ge++) { var oe = new RegExp(ve[ge]), ee = oe.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 ? $() : null; }; var Oa = function e(t) { if (!(this instanceof e)) return new e(t); if (!i_(t)) { pr("A style must have a core reference"); return; } this._private = { cy: t, coreStyle: {} }, this.length = 0, this.resetToDefault(); }, Ia = Oa.prototype; Ia.instanceString = function() { return "style"; }; Ia.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(a) { var o = a[0]._private; o.styleDirty = !0, o.appliedInitStyle = !1; }), this; }; Ia.resetToDefault = function() { return this.clear(), this.addDefaultStylesheet(), this; }; Ia.core = function(e) { return this._private.coreStyle[e] || this.getDefaultProperty(e); }; Ia.selector = function(e) { var t = e === "core" ? null : new tc(e), n = this.length++; return this[n] = { selector: t, properties: [], mappedProperties: [], index: n }, this; }; Ia.css = function() { var e = this, t = arguments; if (t.length === 1) for (var n = t[0], r = 0; r < e.properties.length; r++) { var a = e.properties[r], o = n[a.name]; o === void 0 && (o = n[Yw(a.name)]), o !== void 0 && this.cssRule(a.name, o); } else t.length === 2 && this.cssRule(t[0], t[1]); return this; }; Ia.style = Ia.css; Ia.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 a = !this[r].selector; a && (this._private.coreStyle[n.name] = n); } return this; }; Ia.append = function(e) { return bU(e) ? e.appendToStyle(this) : Vn(e) ? this.appendFromJson(e) : wt(e) && this.appendFromString(e), this; }; Oa.fromJson = function(e, t) { var n = new Oa(e); return n.fromJson(t), n; }; Oa.fromString = function(e, t) { return new Oa(e).fromString(t); }; [Ma, wm, x_, Is, ux, k_, Qr, cx].forEach(function(e) { At(Ia, e); }); Oa.types = Ia.types; Oa.properties = Ia.properties; Oa.propertyGroups = Ia.propertyGroups; Oa.propertyGroupNames = Ia.propertyGroupNames; Oa.propertyGroupKeys = Ia.propertyGroupKeys; var ftt = { style: function(e) { if (e) { var t = this.setStyle(e); t.update(); } return this._private.style; }, setStyle: function(e) { var t = this._private; return bU(e) ? t.style = e.generateStyle(this) : Vn(e) ? t.style = Oa.fromJson(this, e) : wt(e) ? t.style = Oa.fromString(this, e) : t.style = Oa(this), t.style; }, // e.g. cy.data() changed => recalc ele mappers updateStyle: function() { this.mutableElements().updateStyle(); } }, htt = "single", Rd = { 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 = htt), 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, a, o, i; switch (e.length) { case 0: return t; case 1: if (wt(e[0])) return n = e[0], t[n]; if (mn(e[0])) { if (!this._private.panningEnabled) return this; a = e[0], o = a.x, i = a.y, it(o) && (t.x = o), it(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") && it(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, a, o, i, s, l; if (!this._private.panningEnabled) return this; switch (n.length) { case 1: mn(e) && (i = n[0], s = i.x, l = i.y, it(s) && (r.x += s), it(l) && (r.y += l), this.emit("pan viewport")); break; case 2: a = e, o = t, (a === "x" || a === "y") && it(o) && (r[a] += o), 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 (it(e) && t === void 0 && (t = e, e = void 0), !(!this._private.panningEnabled || !this._private.zoomingEnabled)) { var n; if (wt(e)) { var r = e; e = this.$(r); } else if (hXe(e)) { var a = e; n = { x1: a.x1, y1: a.y1, x2: a.x2, y2: a.y2 }, n.w = n.x2 - n.x1, n.h = n.y2 - n.y1; } else Po(e) || (e = this.mutableElements()); if (!(Po(e) && e.empty())) { n = n || e.boundingBox(); var o = this.width(), i = this.height(), s; if (t = it(t) ? t : 0, !isNaN(o) && !isNaN(i) && o > 0 && i > 0 && !isNaN(n.w) && !isNaN(n.h) && n.w > 0 && n.h > 0) { s = Math.min((o - 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: (o - 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 it(e) && it(t) && e <= t ? (n.minZoom = e, n.maxZoom = t) : it(e) && t === void 0 && e <= n.maxZoom ? n.minZoom = e : it(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, a, o, i = !1; if (t.zoomingEnabled || (i = !0), it(e) ? o = e : mn(e) && (o = e.level, e.position != null ? a = ex(e.position, r, n) : e.renderedPosition != null && (a = e.renderedPosition), a != null && !t.panningEnabled && (i = !0)), o = o > t.maxZoom ? t.maxZoom : o, o = o < t.minZoom ? t.minZoom : o, i || !it(o) || o === r || a != null && (!it(a.x) || !it(a.y))) return null; if (a != null) { var s = n, l = r, u = o, c = { x: -u / l * (a.x - s.x) + a.x, y: -u / l * (a.y - s.y) + a.y }; return { zoomed: !0, panned: !0, zoom: u, pan: c }; } else return { zoomed: !0, panned: !1, zoom: o, 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, a = [], o = !1, i = !1; if (!e) return this; if (it(e.zoom) || (n = !1), mn(e.pan) || (r = !1), !n && !r) return this; if (n) { var s = e.zoom; s < t.minZoom || s > t.maxZoom || !t.zoomingEnabled ? o = !0 : (t.zoom = s, a.push("zoom")); } if (r && (!o || !e.cancelOnFailedZoom) && t.panningEnabled) { var l = e.pan; it(l.x) && (t.pan.x = l.x, i = !1), it(l.y) && (t.pan.y = l.y, i = !1), i || a.push("pan"); } return a.length > 0 && (a.push("viewport"), this.emit(a.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 (wt(e)) { var n = e; e = this.mutableElements().filter(n); } else Po(e) || (e = this.mutableElements()); if (e.length !== 0) { var r = e.boundingBox(), a = this.width(), o = this.height(); t = t === void 0 ? this._private.zoom : t; var i = { // middle x: (a - t * (r.x1 + r.x2)) / 2, y: (o - 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), a = function(o) { return parseFloat(r.getPropertyValue(o)); }; return { width: t.clientWidth - a("padding-left") - a("padding-right"), height: t.clientHeight - a("padding-top") - a("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; } }; Rd.centre = Rd.center; Rd.autolockNodes = Rd.autolock; Rd.autoungrabifyNodes = Rd.autoungrabify; var pg = { data: $n.data({ field: "data", bindingEvent: "data", allowBinding: !0, allowSetting: !0, settingEvent: "data", settingTriggersEvent: !0, triggerFnName: "trigger", allowGetting: !0, updateStyle: !0 }), removeData: $n.removeData({ field: "data", event: "data", triggerFnName: "trigger", triggerEvent: !0, updateStyle: !0 }), scratch: $n.data({ field: "scratch", bindingEvent: "scratch", allowBinding: !0, allowSetting: !0, settingEvent: "scratch", settingTriggersEvent: !0, triggerFnName: "trigger", allowGetting: !0, updateStyle: !0 }), removeScratch: $n.removeData({ field: "scratch", event: "scratch", triggerFnName: "trigger", triggerEvent: !0, updateStyle: !0 }) }; pg.attr = pg.data; pg.removeAttr = pg.removeData; var fg = function(e) { var t = this; e = At({}, e); var n = e.container; n && !Db(n) && Db(n[0]) && (n = n[0]); var r = n ? n._cyreg : null; r = r || {}, r && r.cy && (r.cy.destroy(), r = {}); var a = r.readies = r.readies || []; n && (n._cyreg = r), r.cy = t; var o = Or !== void 0 && n !== void 0 && !e.headless, i = e; i.layout = At({ name: o ? "grid" : "null" }, i.layout), i.renderer = At({ name: o ? "canvas" : "null" }, i.renderer); var s = function(f, h, p) { return h !== void 0 ? h : p !== void 0 ? p : f; }, l = this._private = { container: n, // html dom ele container ready: !1, // whether ready has been triggered options: i, // cached options elements: new va(this), // elements in the graph listeners: [], // list of listeners aniEles: new va(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 ? o : i.styleEnabled, zoom: it(i.zoom) ? i.zoom : 1, pan: { x: mn(i.pan) && it(i.pan.x) ? i.pan.x : 0, y: mn(i.pan) && it(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(f, h) { var p = f.some(vXe); if (p) return Nh.all(f).then(h); h(f); }; l.styleEnabled && t.setStyle([]); var c = At({}, i, i.renderer); t.initRenderer(c); var d = function(f, h, p) { t.notifications(!1); var v = t.mutableElements(); v.length > 0 && v.remove(), f != null && (mn(f) || Vn(f)) && t.add(f), t.one("layoutready", function(g) { t.notifications(!0), t.emit(g), t.one("load", h), t.emitAndNotify("load"); }).one("layoutstop", function() { t.one("done", p), t.emit("done"); }); var m = At({}, t._private.options.layout); m.eles = t.elements(), t.layout(m).run(); }; u([i.style, i.elements], function(f) { var h = f[0], p = f[1]; l.styleEnabled && t.style().append(h), d(p, function() { t.startAnimationLoop(), l.ready = !0, sr(i.ready) && t.on("ready", i.ready); for (var v = 0; v < a.length; v++) { var m = a[v]; t.on("ready", m); } r && (r.readies = []), t.emit("ready"); }, i.done); }); }, qb = fg.prototype; At(qb, { 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 Or; var t = this._private.container.ownerDocument; return t === void 0 || t == null ? Or : t.defaultView || Or; }, mount: function(e) { if (e != null) { var t = this, n = t._private, r = n.options; return !Db(e) && Db(e[0]) && (e = e[0]), t.stopAnimationLoop(), t.destroyRenderer(), n.container = e, n.styleEnabled = !0, t.invalidateSize(), t.initRenderer(At({}, 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 fs(this._private.options); }, json: function(e) { var t = this, n = t._private, r = t.mutableElements(), a = function(y) { return t.getElementById(y.id()); }; if (mn(e)) { if (t.startBatch(), e.elements) { var o = {}, i = function(y, x) { for (var w = [], k = [], C = 0; C < y.length; C++) { var S = y[C]; if (!S.data.id) { An("cy.json() cannot handle elements without an ID attribute"); continue; } var _ = "" + S.data.id, T = t.getElementById(_); o[_] = !0, T.length !== 0 ? k.push({ ele: T, json: S }) : (x && (S.group = x), w.push(S)); } t.add(w); for (var O = 0; O < k.length; O++) { var $ = k[O], A = $.ele, N = $.json; A.json(N); } }; if (Vn(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]; Vn(c) && i(c, u); } var d = t.collection(); r.filter(function(y) { return !o[y.id()]; }).forEach(function(y) { y.isParent() ? d.merge(y) : y.remove(); }), d.forEach(function(y) { return y.children().move({ parent: null }); }), d.forEach(function(y) { return a(y).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 f = ["minZoom", "maxZoom", "zoomingEnabled", "userZoomingEnabled", "panningEnabled", "userPanningEnabled", "boxSelectionEnabled", "autolock", "autoungrabify", "autounselectify", "multiClickDebounceTime"], h = 0; h < f.length; h++) { var p = f[h]; e[p] != null && t[p](e[p]); } return t.endBatch(), this; } else { var v = !!e, m = {}; v ? m.elements = this.elements().map(function(y) { return y.json(); }) : (m.elements = {}, r.forEach(function(y) { var x = y.group(); m.elements[x] || (m.elements[x] = []), m.elements[x].push(y.json()); })), this._private.styleEnabled && (m.style = t.style().json()), m.data = fs(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 = fs(n.pan), m.boxSelectionEnabled = n.boxSelectionEnabled, m.renderer = fs(g.renderer), m.hideEdgesOnViewport = g.hideEdgesOnViewport, m.textureOnViewport = g.textureOnViewport, m.wheelSensitivity = g.wheelSensitivity, m.motionBlur = g.motionBlur, m.multiClickDebounceTime = g.multiClickDebounceTime, m; } } }); qb.$id = qb.getElementById; [rtt, ltt, wq, cS, $y, ctt, dS, Fy, ftt, Rd, pg].forEach(function(e) { At(qb, e); }); var vtt = { 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 }, gtt = { 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 }, Np = function(e) { return e.scratch("breadthfirst"); }, oP = function(e, t) { return e.scratch("breadthfirst", t); }; function xq(e) { this.options = At({}, vtt, gtt, e); } xq.prototype.run = function() { var e = this.options, t = e, n = e.cy, r = t.eles, a = r.nodes().filter(function(xe) { return !xe.isParent(); }), o = r, i = t.directed, s = t.acyclic || t.maximal || t.maximalAdjustments > 0, l = xo(t.boundingBox ? t.boundingBox : { x1: 0, y1: 0, w: n.width(), h: n.height() }), u; if (Po(t.roots)) u = t.roots; else if (Vn(t.roots)) { for (var c = [], d = 0; d < t.roots.length; d++) { var f = t.roots[d], h = n.getElementById(f); c.push(h); } u = n.collection(c); } else if (wt(t.roots)) u = n.$(t.roots); else if (i) u = a.roots(); else { var p = r.components(); u = n.collection(); for (var v = function(xe) { var $e = p[xe], Se = $e.maxDegree(!1), Pe = $e.filter(function(Me) { return Me.degree(!1) === Se; }); u = u.add(Pe); }, m = 0; m < p.length; m++) v(m); } var g = [], y = {}, x = function(xe, $e) { g[$e] == null && (g[$e] = []); var Se = g[$e].length; g[$e].push(xe), oP(xe, { index: Se, depth: $e }); }, w = function(xe, $e) { var Se = Np(xe), Pe = Se.depth, Me = Se.index; g[Pe][Me] = null, x(xe, $e); }; o.bfs({ roots: u, directed: t.directed, visit: function(xe, $e, Se, Pe, Me) { var je = xe[0], Be = je.id(); x(je, Me), y[Be] = !0; } }); for (var k = [], C = 0; C < a.length; C++) { var S = a[C]; y[S.id()] || k.push(S); } var _ = function(xe) { for (var $e = g[xe], Se = 0; Se < $e.length; Se++) { var Pe = $e[Se]; if (Pe == null) { $e.splice(Se, 1), Se--; continue; } oP(Pe, { depth: xe, index: Se }); } }, T = function() { for (var xe = 0; xe < g.length; xe++) _(xe); }, O = function(xe, $e) { for (var Se = Np(xe), Pe = xe.incomers().filter(function(E) { return E.isNode() && r.has(E); }), Me = -1, je = xe.id(), Be = 0; Be < Pe.length; Be++) { var We = Pe[Be], qe = Np(We); Me = Math.max(Me, qe.depth); } if (Se.depth <= Me) { if (!t.acyclic && $e[je]) return null; var Ge = Me + 1; return w(xe, Ge), $e[je] = Ge, !0; } return !1; }; if (i && s) { var $ = [], A = {}, N = function(xe) { return $.push(xe); }, L = function() { return $.shift(); }; for (a.forEach(function(xe) { return $.push(xe); }); $.length > 0; ) { var R = L(), P = O(R, A); if (P) R.outgoers().filter(function(xe) { return xe.isNode() && r.has(xe); }).forEach(N); else if (P === null) { An("Detected double maximal shift for node `" + R.id() + "`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs."); break; } } } T(); var B = 0; if (t.avoidOverlap) for (var M = 0; M < a.length; M++) { var z = a[M], Z = z.layoutDimensions(t), G = Z.w, J = Z.h; B = Math.max(B, G, J); } var se = {}, ve = function(xe) { if (se[xe.id()]) return se[xe.id()]; for (var $e = Np(xe).depth, Se = xe.neighborhood(), Pe = 0, Me = 0, je = 0; je < Se.length; je++) { var Be = Se[je]; if (!(Be.isEdge() || Be.isParent() || !a.has(Be))) { var We = Np(Be); if (We != null) { var qe = We.index, Ge = We.depth; if (!(qe == null || Ge == null)) { var E = g[Ge].length; Ge < $e && (Pe += qe / E, Me++); } } } } return Me = Math.max(1, Me), Pe = Pe / Me, Me === 0 && (Pe = 0), se[xe.id()] = Pe, Pe; }, ge = function(xe, $e) { var Se = ve(xe), Pe = ve($e), Me = Se - Pe; return Me === 0 ? xU(xe.id(), $e.id()) : Me; }; t.depthSort !== void 0 && (ge = t.depthSort); for (var oe = 0; oe < g.length; oe++) g[oe].sort(ge), _(oe); for (var ee = [], q = 0; q < k.length; q++) ee.push(k[q]); g.unshift(ee), T(); for (var Y = 0, te = 0; te < g.length; te++) Y = Math.max(g[te].length, Y); var we = { x: l.x1 + l.w / 2, y: l.x1 + l.h / 2 }, Oe = g.reduce(function(xe, $e) { return Math.max(xe, $e.length); }, 0), Ne = function(xe) { var $e = Np(xe), Se = $e.depth, Pe = $e.index, Me = g[Se].length, je = Math.max(l.w / ((t.grid ? Oe : Me) + 1), B), Be = Math.max(l.h / (g.length + 1), B), We = Math.min(l.w / 2 / g.length, l.h / 2 / g.length); if (We = Math.max(We, B), t.circle) { var qe = We * Se + We - (g.length > 0 && g[0].length <= 3 ? We / 2 : 0), Ge = 2 * Math.PI / g[Se].length * Pe; return Se === 0 && g[0].length === 1 && (qe = 1), { x: we.x + qe * Math.cos(Ge), y: we.y + qe * Math.sin(Ge) }; } else { var E = { x: we.x + (Pe + 1 - (Me + 1) / 2) * je, y: (Se + 1) * Be }; return E; } }; return r.nodes().layoutPositions(this, t, Ne), this; }; var mtt = { 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 kq(e) { this.options = At({}, mtt, e); } kq.prototype.run = function() { var e = this.options, t = e, n = e.cy, r = t.eles, a = t.counterclockwise !== void 0 ? !t.counterclockwise : t.clockwise, o = r.nodes().not(":parent"); t.sort && (o = o.sort(t.sort)); for (var i = xo(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 / o.length : t.sweep, u = l / Math.max(1, o.length - 1), c, d = 0, f = 0; f < o.length; f++) { var h = o[f], p = h.layoutDimensions(t), v = p.w, m = p.h; d = Math.max(d, v, m); } if (it(t.radius) ? c = t.radius : o.length <= 1 ? c = 0 : c = Math.min(i.h, i.w) / 2 - d, o.length > 1 && t.avoidOverlap) { d *= 1.75; var g = Math.cos(u) - Math.cos(0), y = Math.sin(u) - Math.sin(0), x = Math.sqrt(d * d / (g * g + y * y)); c = Math.max(x, c); } var w = function(k, C) { var S = t.startAngle + C * u * (a ? 1 : -1), _ = c * Math.cos(S), T = c * Math.sin(S), O = { x: s.x + _, y: s.y + T }; return O; }; return r.nodes().layoutPositions(this, t, w), this; }; var ytt = { 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 Cq(e) { this.options = At({}, ytt, e); } Cq.prototype.run = function() { for (var e = this.options, t = e, n = t.counterclockwise !== void 0 ? !t.counterclockwise : t.clockwise, r = e.cy, a = t.eles, o = a.nodes().not(":parent"), i = xo(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 < o.length; c++) { var d = o[c], f = void 0; f = t.concentric(d), l.push({ value: f, node: d }), d._private.scratch.concentric = f; } o.updateStyle(); for (var h = 0; h < o.length; h++) { var p = o[h], v = p.layoutDimensions(t); u = Math.max(u, v.w, v.h); } l.sort(function(xe, $e) { return $e.value - xe.value; }); for (var m = t.levelWidth(o), g = [[]], y = g[0], x = 0; x < l.length; x++) { var w = l[x]; if (y.length > 0) { var k = Math.abs(y[0].value - w.value); k >= m && (y = [], g.push(y)); } y.push(w); } var C = u + t.minNodeSpacing; if (!t.avoidOverlap) { var S = g.length > 0 && g[0].length > 1, _ = Math.min(i.w, i.h) / 2 - C, T = _ / (g.length + S ? 1 : 0); C = Math.min(C, T); } for (var O = 0, $ = 0; $ < g.length; $++) { var A = g[$], N = t.sweep === void 0 ? 2 * Math.PI - 2 * Math.PI / A.length : t.sweep, L = A.dTheta = N / Math.max(1, A.length - 1); if (A.length > 1 && t.avoidOverlap) { var R = Math.cos(L) - Math.cos(0), P = Math.sin(L) - Math.sin(0), B = Math.sqrt(C * C / (R * R + P * P)); O = Math.max(B, O); } A.r = O, O += C; } if (t.equidistant) { for (var M = 0, z = 0, Z = 0; Z < g.length; Z++) { var G = g[Z], J = G.r - z; M = Math.max(M, J); } z = 0; for (var se = 0; se < g.length; se++) { var ve = g[se]; se === 0 && (z = ve.r), ve.r = z, z += M; } } for (var ge = {}, oe = 0; oe < g.length; oe++) for (var ee = g[oe], q = ee.dTheta, Y = ee.r, te = 0; te < ee.length; te++) { var we = ee[te], Oe = t.startAngle + (n ? 1 : -1) * q * te, Ne = { x: s.x + Y * Math.cos(Oe), y: s.y + Y * Math.sin(Oe) }; ge[we.node.id()] = Ne; } return a.nodes().layoutPositions(this, t, function(xe) { var $e = xe.id(); return ge[$e]; }), this; }; var aC, btt = { // 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 dx(e) { this.options = At({}, btt, e), this.options.layout = this; var t = this.options.eles.nodes(), n = this.options.eles.edges(), r = n.filter(function(a) { var o = a.source().data("id"), i = a.target().data("id"), s = t.some(function(u) { return u.data("id") === o; }), l = t.some(function(u) { return u.data("id") === i; }); return !s || !l; }); this.options.eles = this.options.eles.not(r); } dx.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 ? aC = !0 : aC = !1; var r = wtt(t, n, e); aC && Ctt(r), e.randomize && Stt(r); var a = Sl(), o = function() { Ett(r, t, e), e.fit === !0 && t.fit(e.padding); }, i = function(d) { return !(n.stopped || d >= e.numIter || (_tt(r, e), r.temperature = r.temperature * e.coolingFactor, r.temperature < e.minTemp)); }, s = function() { if (e.animate === !0 || e.animate === !1) o(), n.one("layoutstop", e.stop), n.emit({ type: "layoutstop", layout: n }); else { var d = e.eles.nodes(), f = Sq(r, e, d); d.layoutPositions(n, e, f); } }, l = 0, u = !0; if (e.animate === !0) { var c = function d() { for (var f = 0; u && f < e.refresh; ) u = i(l), l++, f++; if (!u) sP(r, e), s(); else { var h = Sl(); h - a >= e.animationThreshold && o(), Rb(d); } }; c(); } else { for (; u; ) u = i(l), l++; sP(r, e), s(); } return this; }; dx.prototype.stop = function() { return this.stopped = !0, this.thread && this.thread.stop(), this.emit("layoutstop"), this; }; dx.prototype.destroy = function() { return this.thread && this.thread.stop(), this; }; var wtt = function(e, t, n) { for (var r = n.eles.edges(), a = n.eles.nodes(), o = xo(n.boundingBox ? n.boundingBox : { x1: 0, y1: 0, w: e.width(), h: e.height() }), i = { isCompound: e.hasCompoundNodes(), layoutNodes: [], idToIndex: {}, nodeSize: a.size(), graphSet: [], indexToGraph: [], layoutEdges: [], edgeSize: r.size(), temperature: n.initialTemp, clientWidth: o.w, clientHeight: o.h, boundingBox: o }, s = n.eles.components(), l = {}, u = 0; u < s.length; u++) for (var c = s[u], d = 0; d < c.length; d++) { var f = c[d]; l[f.id()] = u; } for (var u = 0; u < i.nodeSize; u++) { var h = a[u], p = 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 = p.w, v.width = p.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 = sr(n.nodeRepulsion) ? n.nodeRepulsion(h) : n.nodeRepulsion, i.layoutNodes.push(v), i.idToIndex[v.id] = u; } for (var m = [], g = 0, y = -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[++y] = h.id, x.push(h.id)); } for (i.graphSet.push(x); g <= y; ) { var k = m[g++], C = i.idToIndex[k], f = i.layoutNodes[C], S = f.children; if (S.length > 0) { i.graphSet.push(S); for (var u = 0; u < S.length; u++) m[++y] = S[u]; } } for (var u = 0; u < i.graphSet.length; u++) for (var _ = i.graphSet[u], d = 0; d < _.length; d++) { var T = i.idToIndex[_[d]]; i.indexToGraph[T] = u; } for (var u = 0; u < i.edgeSize; u++) { var O = r[u], $ = {}; $.id = O.data("id"), $.sourceId = O.data("source"), $.targetId = O.data("target"); var A = sr(n.idealEdgeLength) ? n.idealEdgeLength(O) : n.idealEdgeLength, N = sr(n.edgeElasticity) ? n.edgeElasticity(O) : n.edgeElasticity, L = i.idToIndex[$.sourceId], R = i.idToIndex[$.targetId], P = i.indexToGraph[L], B = i.indexToGraph[R]; if (P != B) { for (var M = xtt($.sourceId, $.targetId, i), z = i.graphSet[M], Z = 0, v = i.layoutNodes[L]; z.indexOf(v.id) === -1; ) v = i.layoutNodes[i.idToIndex[v.parentId]], Z++; for (v = i.layoutNodes[R]; z.indexOf(v.id) === -1; ) v = i.layoutNodes[i.idToIndex[v.parentId]], Z++; A *= Z * n.nestingFactor; } $.idealLength = A, $.elasticity = N, i.layoutEdges.push($); } return i; }, xtt = function(e, t, n) { var r = ktt(e, t, 0, n); return 2 > r.count ? 0 : r.graph; }, ktt = function e(t, n, r, a) { var o = a.graphSet[r]; if (-1 < o.indexOf(t) && -1 < o.indexOf(n)) return { count: 2, graph: r }; for (var i = 0, s = 0; s < o.length; s++) { var l = o[s], u = a.idToIndex[l], c = a.layoutNodes[u].children; if (c.length !== 0) { var d = a.indexToGraph[a.idToIndex[c[0]]], f = e(t, n, d, a); if (f.count !== 0) if (f.count === 1) { if (i++, i === 2) break; } else return f; } } return { count: i, graph: r }; }, Ctt, Stt = function(e, t) { for (var n = e.clientWidth, r = e.clientHeight, a = 0; a < e.nodeSize; a++) { var o = e.layoutNodes[a]; o.children.length === 0 && !o.isLocked && (o.positionX = Math.random() * n, o.positionY = Math.random() * r); } }, Sq = function(e, t, n) { var r = e.boundingBox, a = { x1: 1 / 0, x2: -1 / 0, y1: 1 / 0, y2: -1 / 0 }; return t.boundingBox && (n.forEach(function(o) { var i = e.layoutNodes[e.idToIndex[o.data("id")]]; a.x1 = Math.min(a.x1, i.positionX), a.x2 = Math.max(a.x2, i.positionX), a.y1 = Math.min(a.y1, i.positionY), a.y2 = Math.max(a.y2, i.positionY); }), a.w = a.x2 - a.x1, a.h = a.y2 - a.y1), function(o, i) { var s = e.layoutNodes[e.idToIndex[o.data("id")]]; if (t.boundingBox) { var l = (s.positionX - a.x1) / a.w, u = (s.positionY - a.y1) / a.h; return { x: r.x1 + l * r.w, y: r.y1 + u * r.h }; } else return { x: s.positionX, y: s.positionY }; }; }, Ett = function(e, t, n) { var r = n.layout, a = n.eles.nodes(), o = Sq(e, n, a); a.positions(o), e.ready !== !0 && (e.ready = !0, r.one("layoutready", n.ready), r.emit({ type: "layoutready", layout: this })); }, _tt = function(e, t, n) { Ttt(e, t), Ftt(e), Att(e, t), Itt(e), Ptt(e); }, Ttt = function(e, t) { for (var n = 0; n < e.graphSet.length; n++) for (var r = e.graphSet[n], a = r.length, o = 0; o < a; o++) for (var i = e.layoutNodes[e.idToIndex[r[o]]], s = o + 1; s < a; s++) { var l = e.layoutNodes[e.idToIndex[r[s]]]; Ott(i, l, e, t); } }, iP = function(e) { return -e + 2 * e * Math.random(); }, Ott = function(e, t, n, r) { var a = e.cmptId, o = t.cmptId; if (!(a !== o && !n.isCompound)) { var i = t.positionX - e.positionX, s = t.positionY - e.positionY, l = 1; i === 0 && s === 0 && (i = iP(l), s = iP(l)); var u = $tt(e, t, i, s); if (u > 0) var m = r.nodeOverlap * u, v = Math.sqrt(i * i + s * s), g = m * i / v, y = m * s / v; else var c = Wb(e, i, s), d = Wb(t, -1 * i, -1 * s), f = d.x - c.x, h = d.y - c.y, p = f * f + h * h, v = Math.sqrt(p), m = (e.nodeRepulsion + t.nodeRepulsion) / p, g = m * f / v, y = m * h / v; e.isLocked || (e.offsetX -= g, e.offsetY -= y), t.isLocked || (t.offsetX += g, t.offsetY += y); } }, $tt = function(e, t, n, r) { if (n > 0) var a = e.maxX - t.minX; else var a = t.maxX - e.minX; if (r > 0) var o = e.maxY - t.minY; else var o = t.maxY - e.minY; return a >= 0 && o >= 0 ? Math.sqrt(a * a + o * o) : 0; }, Wb = function(e, t, n) { var r = e.positionX, a = e.positionY, o = e.height || 1, i = e.width || 1, s = n / t, l = o / i, u = {}; return t === 0 && 0 < n || t === 0 && 0 > n ? (u.x = r, u.y = a + o / 2, u) : 0 < t && -1 * l <= s && s <= l ? (u.x = r + i / 2, u.y = a + i * n / 2 / t, u) : 0 > t && -1 * l <= s && s <= l ? (u.x = r - i / 2, u.y = a - i * n / 2 / t, u) : 0 < n && (s <= -1 * l || s >= l) ? (u.x = r + o * t / 2 / n, u.y = a + o / 2, u) : (0 > n && (s <= -1 * l || s >= l) && (u.x = r - o * t / 2 / n, u.y = a - o / 2), u); }, Ftt = function(e, t) { for (var n = 0; n < e.edgeSize; n++) { var r = e.layoutEdges[n], a = e.idToIndex[r.sourceId], o = e.layoutNodes[a], i = e.idToIndex[r.targetId], s = e.layoutNodes[i], l = s.positionX - o.positionX, u = s.positionY - o.positionY; if (!(l === 0 && u === 0)) { var c = Wb(o, l, u), d = Wb(s, -1 * l, -1 * u), f = d.x - c.x, h = d.y - c.y, p = Math.sqrt(f * f + h * h), v = Math.pow(r.idealLength - p, 2) / r.elasticity; if (p !== 0) var m = v * f / p, g = v * h / p; else var m = 0, g = 0; o.isLocked || (o.offsetX += m, o.offsetY += g), s.isLocked || (s.offsetX -= m, s.offsetY -= g); } } }, Att = function(e, t) { if (t.gravity !== 0) for (var n = 1, r = 0; r < e.graphSet.length; r++) { var a = e.graphSet[r], o = a.length; if (r === 0) var l = e.clientHeight / 2, u = e.clientWidth / 2; else var i = e.layoutNodes[e.idToIndex[a[0]]], s = e.layoutNodes[e.idToIndex[i.parentId]], l = s.positionX, u = s.positionY; for (var c = 0; c < o; c++) { var d = e.layoutNodes[e.idToIndex[a[c]]]; if (!d.isLocked) { var f = l - d.positionX, h = u - d.positionY, p = Math.sqrt(f * f + h * h); if (p > n) { var v = t.gravity * f / p, m = t.gravity * h / p; d.offsetX += v, d.offsetY += m; } } } } }, Itt = function(e, t) { var n = [], r = 0, a = -1; for (n.push.apply(n, e.graphSet[0]), a += e.graphSet[0].length; r <= a; ) { var o = n[r++], i = e.idToIndex[o], 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 f = e.layoutNodes[e.idToIndex[l[d]]]; f.offsetX += u, f.offsetY += c, n[++a] = l[d]; } s.offsetX = 0, s.offsetY = 0; } } }, Ptt = 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 a = Ltt(r.offsetX, r.offsetY, e.temperature); r.positionX += a.x, r.positionY += a.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, Ntt(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); } }, Ltt = function(e, t, n) { var r = Math.sqrt(e * e + t * t); if (r > n) var a = { x: n * e / r, y: n * t / r }; else var a = { x: e, y: t }; return a; }, Ntt = function e(t, n) { var r = t.parentId; if (r != null) { var a = n.layoutNodes[n.idToIndex[r]], o = !1; if ((a.maxX == null || t.maxX + a.padRight > a.maxX) && (a.maxX = t.maxX + a.padRight, o = !0), (a.minX == null || t.minX - a.padLeft < a.minX) && (a.minX = t.minX - a.padLeft, o = !0), (a.maxY == null || t.maxY + a.padBottom > a.maxY) && (a.maxY = t.maxY + a.padBottom, o = !0), (a.minY == null || t.minY - a.padTop < a.minY) && (a.minY = t.minY - a.padTop, o = !0), o) return e(a, n); } }, sP = function(e, t) { for (var n = e.layoutNodes, r = [], a = 0; a < n.length; a++) { var o = n[a], i = o.cmptId, s = r[i] = r[i] || []; s.push(o); } for (var l = 0, a = 0; a < r.length; a++) { var u = r[a]; 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, y) { return y.w * y.h - g.w * g.h; }); for (var f = 0, h = 0, p = 0, v = 0, m = Math.sqrt(l) * e.clientWidth / e.clientHeight, a = 0; a < r.length; a++) { var u = r[a]; if (u) { for (var c = 0; c < u.length; c++) { var d = u[c]; d.isLocked || (d.positionX += f - u.x1, d.positionY += h - u.y1); } f += u.w + t.componentSpacing, p += u.w + t.componentSpacing, v = Math.max(v, u.h), p > m && (h += v + t.componentSpacing, f = 0, p = 0, v = 0); } } }, Mtt = { 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 Eq(e) { this.options = At({}, Mtt, e); } Eq.prototype.run = function() { var e = this.options, t = e, n = e.cy, r = t.eles, a = r.nodes().not(":parent"); t.sort && (a = a.sort(t.sort)); var o = xo(t.boundingBox ? t.boundingBox : { x1: 0, y1: 0, w: n.width(), h: n.height() }); if (o.h === 0 || o.w === 0) r.nodes().layoutPositions(this, t, function(se) { return { x: o.x1, y: o.y1 }; }); else { var i = a.size(), s = Math.sqrt(i * o.h / o.w), l = Math.round(s), u = Math.round(o.w / o.h * s), c = function(se) { if (se == null) return Math.min(l, u); var ve = Math.min(l, u); ve == l ? l = se : u = se; }, d = function(se) { if (se == null) return Math.max(l, u); var ve = Math.max(l, u); ve == l ? l = se : u = se; }, f = t.rows, h = t.cols != null ? t.cols : t.columns; if (f != null && h != null) l = f, u = h; else if (f != null && h == null) l = f, u = Math.ceil(i / l); else if (f == null && h != null) u = h, l = Math.ceil(i / u); else if (u * l > i) { var p = c(), v = d(); (p - 1) * v >= i ? c(p - 1) : (v - 1) * p >= 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 y = o.w / u, x = o.h / l; if (t.condense && (y = 0, x = 0), t.avoidOverlap) for (var w = 0; w < a.length; w++) { var k = a[w], C = k._private.position; (C.x == null || C.y == null) && (C.x = 0, C.y = 0); var S = k.layoutDimensions(t), _ = t.avoidOverlapPadding, T = S.w + _, O = S.h + _; y = Math.max(y, T), x = Math.max(x, O); } for (var $ = {}, A = function(se, ve) { return !!$["c-" + se + "-" + ve]; }, N = function(se, ve) { $["c-" + se + "-" + ve] = !0; }, L = 0, R = 0, P = function() { R++, R >= u && (R = 0, L++); }, B = {}, M = 0; M < a.length; M++) { var z = a[M], Z = t.position(z); if (Z && (Z.row !== void 0 || Z.col !== void 0)) { var G = { row: Z.row, col: Z.col }; if (G.col === void 0) for (G.col = 0; A(G.row, G.col); ) G.col++; else if (G.row === void 0) for (G.row = 0; A(G.row, G.col); ) G.row++; B[z.id()] = G, N(G.row, G.col); } } var J = function(se, ve) { var ge, oe; if (se.locked() || se.isParent()) return !1; var ee = B[se.id()]; if (ee) ge = ee.col * y + y / 2 + o.x1, oe = ee.row * x + x / 2 + o.y1; else { for (; A(L, R); ) P(); ge = R * y + y / 2 + o.x1, oe = L * x + x / 2 + o.y1, N(L, R), P(); } return { x: ge, y: oe }; }; a.layoutPositions(this, t, J); } return this; }; var Btt = { ready: function() { }, // on layoutready stop: function() { } // on layoutstop }; function C_(e) { this.options = At({}, Btt, e); } C_.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; }; C_.prototype.stop = function() { return this; }; var Dtt = { 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 _q(e) { this.options = At({}, Dtt, e); } _q.prototype.run = function() { var e = this.options, t = e.eles, n = t.nodes(), r = sr(e.positions); function a(o) { if (e.positions == null) return zYe(o.position()); if (r) return e.positions(o); var i = e.positions[o._private.data.id]; return i ?? null; } return n.layoutPositions(this, e, function(o, i) { var s = a(o); return o.locked() || s == null ? !1 : s; }), this; }; var Rtt = { 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 Tq(e) { this.options = At({}, Rtt, e); } Tq.prototype.run = function() { var e = this.options, t = e.cy, n = e.eles, r = xo(e.boundingBox ? e.boundingBox : { x1: 0, y1: 0, w: t.width(), h: t.height() }), a = function(o, 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, a), this; }; var ztt = [{ name: "breadthfirst", impl: xq }, { name: "circle", impl: kq }, { name: "concentric", impl: Cq }, { name: "cose", impl: dx }, { name: "grid", impl: Eq }, { name: "null", impl: C_ }, { name: "preset", impl: _q }, { name: "random", impl: Tq }]; function Oq(e) { this.options = e, this.notifications = 0; } var lP = function() { }, uP = function() { throw new Error("A headless instance can not render images"); }; Oq.prototype = { recalculateRenderedStyle: lP, notify: function() { this.notifications++; }, init: lP, isHeadless: function() { return !0; }, png: uP, jpg: uP }; var S_ = {}; S_.arrowShapeWidth = 0.3; S_.registerArrowShapes = function() { var e = this.arrowShapes = {}, t = this, n = function(l, u, c, d, f, h, p) { var v = f.x - c / 2 - p, m = f.x + c / 2 + p, g = f.y - c / 2 - p, y = f.y + c / 2 + p, x = v <= l && l <= m && g <= u && u <= y; return x; }, r = function(l, u, c, d, f) { var h = l * Math.cos(d) - u * Math.sin(d), p = l * Math.sin(d) + u * Math.cos(d), v = h * c, m = p * c, g = v + f.x, y = m + f.y; return { x: g, y }; }, a = function(l, u, c, d) { for (var f = [], h = 0; h < l.length; h += 2) { var p = l[h], v = l[h + 1]; f.push(r(p, v, u, c, d)); } return f; }, o = 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) { wt(u) && (u = e[u]), e[l] = At({ name: l, points: [-0.15, -0.3, 0.15, -0.3, 0.15, 0.3, -0.15, 0.3], collide: function(c, d, f, h, p, v) { var m = o(a(this.points, f + 2 * v, h, p)), g = Ja(c, d, m); return g; }, roughCollide: n, draw: function(c, d, f, h) { var p = a(this.points, d, f, h); t.arrowShapeImpl("polygon")(c, p); }, spacing: function(c) { return 0; }, gap: i }, u); }; s("none", { collide: zb, roughCollide: zb, draw: u_, spacing: bI, gap: bI }), 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, f) { var h = a(this.points, u, c, d), p = this.controlPoint, v = r(p[0], p[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, f, h, p) { var v = o(a(this.points, c + 2 * p, d, f)), m = o(a(this.pointsTee, c + 2 * p, d, f)), g = Ja(l, u, v) || Ja(l, u, m); return g; }, draw: function(l, u, c, d, f) { var h = a(this.points, u, c, d), p = a(this.pointsTee, u, c, d); t.arrowShapeImpl(this.name)(l, h, p); } }), 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, f, h, p) { var v = f, m = Math.pow(v.x - l, 2) + Math.pow(v.y - u, 2) <= Math.pow((c + 2 * p) * this.radius, 2), g = o(a(this.points, c + 2 * p, d, f)); return Ja(l, u, g) || m; }, draw: function(l, u, c, d, f) { var h = a(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, f = 3, h = 5; return c[f] = c[f] - d, c[h] = c[h] - d, c; }, collide: function(l, u, c, d, f, h, p) { var v = o(a(this.points, c + 2 * p, d, f)), m = o(a(this.crossLinePts(c, h), c + 2 * p, d, f)), g = Ja(l, u, v) || Ja(l, u, m); return g; }, draw: function(l, u, c, d, f) { var h = a(this.points, u, c, d), p = a(this.crossLinePts(u, f), u, c, d); t.arrowShapeImpl(this.name)(l, h, p); } }), 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, f, h, p) { var v = f, m = Math.pow(v.x - l, 2) + Math.pow(v.y - u, 2) <= Math.pow((c + 2 * p) * this.radius, 2); return m; }, draw: function(l, u, c, d, f) { 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 dp = {}; dp.projectIntoViewport = function(e, t) { var n = this.cy, r = this.findContainerClientCoords(), a = r[0], o = r[1], i = r[4], s = n.pan(), l = n.zoom(), u = ((e - a) / i - s.x) / l, c = ((t - o) / i - s.y) / l; return [u, c]; }; dp.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)); }, a = { left: r("padding-left"), right: r("padding-right"), top: r("padding-top"), bottom: r("padding-bottom") }, o = { 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 = a.left + a.right, u = a.top + a.bottom, c = o.left + o.right, d = t.width / (i + c), f = i - l, h = s - u, p = t.left + a.left + o.left, v = t.top + a.top + o.top; return this.containerBB = [p, v, f, h, d]; }; dp.invalidateContainerClientCoordsCache = function() { this.containerBB = null; }; dp.findNearestElement = function(e, t, n, r) { return this.findNearestElements(e, t, n, r)[0]; }; dp.findNearestElements = function(e, t, n, r) { var a = this, o = this, i = o.getCachedZSortedEles(), s = [], l = o.cy.zoom(), u = o.cy.hasCompoundNodes(), c = (r ? 24 : 8) / l, d = (r ? 8 : 2) / l, f = (r ? 8 : 2) / l, h = 1 / 0, p, v; n && (i = i.interactive); function m(S, _) { if (S.isNode()) { if (v) return; v = S, s.push(S); } if (S.isEdge() && (_ == null || _ < h)) if (p) { if (p.pstyle("z-compound-depth").value === S.pstyle("z-compound-depth").value && p.pstyle("z-compound-depth").value === S.pstyle("z-compound-depth").value) { for (var T = 0; T < s.length; T++) if (s[T].isEdge()) { s[T] = S, p = S, h = _ ?? h; break; } } } else s.push(S), p = S, h = _ ?? h; } function g(S) { var _ = S.outerWidth() + 2 * d, T = S.outerHeight() + 2 * d, O = _ / 2, $ = T / 2, A = S.position(), N = S.pstyle("corner-radius").value === "auto" ? "auto" : S.pstyle("corner-radius").pfValue, L = S._private.rscratch; if (A.x - O <= e && e <= A.x + O && A.y - $ <= t && t <= A.y + $) { var R = o.nodeShapes[a.getNodeShape(S)]; if (R.checkPoint(e, t, 0, _, T, A.x, A.y, N, L)) return m(S, 0), !0; } } function y(S) { var _ = S._private, T = _.rscratch, O = S.pstyle("width").pfValue, $ = S.pstyle("arrow-scale").value, A = O / 2 + c, N = A * A, L = A * 2, R = _.source, P = _.target, B; if (T.edgeType === "segments" || T.edgeType === "straight" || T.edgeType === "haystack") { for (var M = T.allpts, z = 0; z + 3 < M.length; z += 2) if (JYe(e, t, M[z], M[z + 1], M[z + 2], M[z + 3], L) && N > (B = aZe(e, t, M[z], M[z + 1], M[z + 2], M[z + 3]))) return m(S, B), !0; } else if (T.edgeType === "bezier" || T.edgeType === "multibezier" || T.edgeType === "self" || T.edgeType === "compound") { for (var M = T.allpts, z = 0; z + 5 < T.allpts.length; z += 4) if (eZe(e, t, M[z], M[z + 1], M[z + 2], M[z + 3], M[z + 4], M[z + 5], L) && N > (B = rZe(e, t, M[z], M[z + 1], M[z + 2], M[z + 3], M[z + 4], M[z + 5]))) return m(S, B), !0; } for (var R = R || _.source, P = P || _.target, Z = a.getArrowWidth(O, $), G = [{ name: "source", x: T.arrowStartX, y: T.arrowStartY, angle: T.srcArrowAngle }, { name: "target", x: T.arrowEndX, y: T.arrowEndY, angle: T.tgtArrowAngle }, { name: "mid-source", x: T.midX, y: T.midY, angle: T.midsrcArrowAngle }, { name: "mid-target", x: T.midX, y: T.midY, angle: T.midtgtArrowAngle }], z = 0; z < G.length; z++) { var J = G[z], se = o.arrowShapes[S.pstyle(J.name + "-arrow-shape").value], ve = S.pstyle("width").pfValue; if (se.roughCollide(e, t, Z, J.angle, { x: J.x, y: J.y }, ve, c) && se.collide(e, t, Z, J.angle, { x: J.x, y: J.y }, ve, c)) return m(S), !0; } u && s.length > 0 && (g(R), g(P)); } function x(S, _, T) { return Li(S, _, T); } function w(S, _) { var T = S._private, O = f, $; _ ? $ = _ + "-" : $ = "", S.boundingBox(); var A = T.labelBounds[_ || "main"], N = S.pstyle($ + "label").value, L = S.pstyle("text-events").strValue === "yes"; if (!(!L || !N)) { var R = x(T.rscratch, "labelX", _), P = x(T.rscratch, "labelY", _), B = x(T.rscratch, "labelAngle", _), M = S.pstyle($ + "text-margin-x").pfValue, z = S.pstyle($ + "text-margin-y").pfValue, Z = A.x1 - O - M, G = A.x2 + O - M, J = A.y1 - O - z, se = A.y2 + O - z; if (B) { var ve = Math.cos(B), ge = Math.sin(B), oe = function(Oe, Ne) { return Oe = Oe - R, Ne = Ne - P, { x: Oe * ve - Ne * ge + R, y: Oe * ge + Ne * ve + P }; }, ee = oe(Z, J), q = oe(Z, se), Y = oe(G, J), te = oe(G, se), we = [ // with the margin added after the rotation is applied ee.x + M, ee.y + z, Y.x + M, Y.y + z, te.x + M, te.y + z, q.x + M, q.y + z ]; if (Ja(e, t, we)) return m(S), !0; } else if (th(A, e, t)) return m(S), !0; } } for (var k = i.length - 1; k >= 0; k--) { var C = i[k]; C.isNode() ? g(C) || w(C) : y(C) || w(C) || w(C, "source") || w(C, "target"); } return s; }; dp.getAllInBox = function(e, t, n, r) { var a = this.getCachedZSortedEles().interactive, o = [], 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 = xo({ x1: e, y1: t, x2: n, y2: r }), d = 0; d < a.length; d++) { var f = a[d]; if (f.isNode()) { var h = f, p = h.boundingBox({ includeNodes: !0, includeEdges: !1, includeLabels: !1 }); p_(c, p) && !BU(p, c) && o.push(h); } else { var v = f, m = v._private, g = m.rscratch; if (g.startX != null && g.startY != null && !th(c, g.startX, g.startY) || g.endX != null && g.endY != null && !th(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 y = m.rstyle.bezierPts || m.rstyle.linePts || m.rstyle.haystackPts, x = !0, w = 0; w < y.length; w++) if (!QYe(c, y[w])) { x = !1; break; } x && o.push(v); } else (g.edgeType === "haystack" || g.edgeType === "straight") && o.push(v); } } return o; }; var Kb = {}; Kb.calculateArrowAngles = function(e) { var t = e._private.rscratch, n = t.edgeType === "haystack", r = t.edgeType === "bezier", a = t.edgeType === "multibezier", o = t.edgeType === "segments", i = t.edgeType === "compound", s = t.edgeType === "self", l, u, c, d, f, h, g, y; if (n ? (c = t.haystackPts[0], d = t.haystackPts[1], f = t.haystackPts[2], h = t.haystackPts[3]) : (c = t.arrowStartX, d = t.arrowStartY, f = t.arrowEndX, h = t.arrowEndY), g = t.midX, y = t.midY, o) l = c - t.segpts[0], u = d - t.segpts[1]; else if (a || i || s || r) { var p = t.allpts, v = qr(p[0], p[2], p[4], 0.1), m = qr(p[1], p[3], p[5], 0.1); l = c - v, u = d - m; } else l = c - g, u = d - y; t.srcArrowAngle = A1(l, u); var g = t.midX, y = t.midY; if (n && (g = (c + f) / 2, y = (d + h) / 2), l = f - c, u = h - d, o) { var p = t.allpts; if (p.length / 2 % 2 === 0) { var x = p.length / 2, w = x - 2; l = p[x] - p[w], u = p[x + 1] - p[w + 1]; } else if (t.isRound) l = t.midVector[1], u = -t.midVector[0]; else { var x = p.length / 2 - 1, w = x - 2; l = p[x] - p[w], u = p[x + 1] - p[w + 1]; } } else if (a || i || s) { var p = t.allpts, k = t.ctrlpts, C, S, _, T; if (k.length / 2 % 2 === 0) { var O = p.length / 2 - 1, $ = O + 2, A = $ + 2; C = qr(p[O], p[$], p[A], 0), S = qr(p[O + 1], p[$ + 1], p[A + 1], 0), _ = qr(p[O], p[$], p[A], 1e-4), T = qr(p[O + 1], p[$ + 1], p[A + 1], 1e-4); } else { var $ = p.length / 2 - 1, O = $ - 2, A = $ + 2; C = qr(p[O], p[$], p[A], 0.4999), S = qr(p[O + 1], p[$ + 1], p[A + 1], 0.4999), _ = qr(p[O], p[$], p[A], 0.5), T = qr(p[O + 1], p[$ + 1], p[A + 1], 0.5); } l = _ - C, u = T - S; } if (t.midtgtArrowAngle = A1(l, u), t.midDispX = l, t.midDispY = u, l *= -1, u *= -1, o) { var p = t.allpts; if (p.length / 2 % 2 !== 0 && !t.isRound) { var x = p.length / 2 - 1, N = x + 2; l = -(p[N] - p[x]), u = -(p[N + 1] - p[x + 1]); } } if (t.midsrcArrowAngle = A1(l, u), o) l = f - t.segpts[t.segpts.length - 2], u = h - t.segpts[t.segpts.length - 1]; else if (a || i || s || r) { var p = t.allpts, L = p.length, v = qr(p[L - 6], p[L - 4], p[L - 2], 0.9), m = qr(p[L - 5], p[L - 3], p[L - 1], 0.9); l = f - v, u = h - m; } else l = f - g, u = h - y; t.tgtArrowAngle = A1(l, u); }; Kb.getArrowWidth = Kb.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 pS, fS, os = {}, jo = {}, cP, dP, Rc, Ay, Gs, Ac, Bc, rs, Mp, z1, $q, Fq, hS, vS, pP, fP = 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); }, Vtt = 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; }, jtt = function(e, t, n, r, a) { if (e !== pP ? fP(t, e, os) : Vtt(jo, os), fP(t, n, jo), cP = os.nx * jo.ny - os.ny * jo.nx, dP = os.nx * jo.nx - os.ny * -jo.ny, Gs = Math.asin(Math.max(-1, Math.min(1, cP))), Math.abs(Gs) < 1e-6) { pS = t.x, fS = t.y, Bc = Mp = 0; return; } Rc = 1, Ay = !1, dP < 0 ? Gs < 0 ? Gs = Math.PI + Gs : (Gs = Math.PI - Gs, Rc = -1, Ay = !0) : Gs > 0 && (Rc = -1, Ay = !0), t.radius !== void 0 ? Mp = t.radius : Mp = r, Ac = Gs / 2, z1 = Math.min(os.len / 2, jo.len / 2), a ? (rs = Math.abs(Math.cos(Ac) * Mp / Math.sin(Ac)), rs > z1 ? (rs = z1, Bc = Math.abs(rs * Math.sin(Ac) / Math.cos(Ac))) : Bc = Mp) : (rs = Math.min(z1, Mp), Bc = Math.abs(rs * Math.sin(Ac) / Math.cos(Ac))), hS = t.x + jo.nx * rs, vS = t.y + jo.ny * rs, pS = hS - jo.ny * Bc * Rc, fS = vS + jo.nx * Bc * Rc, $q = t.x + os.nx * rs, Fq = t.y + os.ny * rs, pP = t; }; function Aq(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 E_(e, t, n, r) { var a = 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 } : (jtt(e, t, n, r, a), { cx: pS, cy: fS, radius: Bc, startX: $q, startY: Fq, stopX: hS, stopY: vS, startAngle: os.ang + Math.PI / 2 * Rc, endAngle: jo.ang - Math.PI / 2 * Rc, counterClockwise: Ay }); } var Ba = {}; Ba.findMidptPtsEtc = function(e, t) { var n = t.posPts, r = t.intersectionPts, a = t.vectorNormInverse, o, i = e.pstyle("source-endpoint"), s = e.pstyle("target-endpoint"), l = i.units != null && s.units != null, u = function(w, k, C, S) { var _ = S - k, T = C - w, O = Math.sqrt(T * T + _ * _); return { x: -_ / O, y: T / O }; }, c = e.pstyle("edge-distances").value; switch (c) { case "node-position": o = n; break; case "intersection": o = r; break; case "endpoints": { if (l) { var d = this.manualEndptToPx(e.source()[0], i), f = Oi(d, 2), h = f[0], p = f[1], v = this.manualEndptToPx(e.target()[0], s), m = Oi(v, 2), g = m[0], y = m[1], x = { x1: h, y1: p, x2: g, y2: y }; a = u(h, p, g, y), o = x; } else An("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).")), o = r; break; } } return { midptPts: o, vectorNormInverse: a }; }; Ba.findHaystackPoints = function(e) { for (var t = 0; t < e.length; t++) { var n = e[t], r = n._private, a = r.rscratch; if (!a.haystack) { var o = Math.random() * 2 * Math.PI; a.source = { x: Math.cos(o), y: Math.sin(o) }, o = Math.random() * 2 * Math.PI, a.target = { x: Math.cos(o), y: Math.sin(o) }; } var i = r.source, s = r.target, l = i.position(), u = s.position(), c = i.width(), d = s.width(), f = i.height(), h = s.height(), p = n.pstyle("haystack-radius").value, v = p / 2; a.haystackPts = a.allpts = [a.source.x * c * v + l.x, a.source.y * f * v + l.y, a.target.x * d * v + u.x, a.target.y * h * v + u.y], a.midX = (a.allpts[0] + a.allpts[2]) / 2, a.midY = (a.allpts[1] + a.allpts[3]) / 2, a.edgeType = "haystack", a.haystack = !0, this.storeEdgeProjections(n), this.calculateArrowAngles(n), this.recalculateEdgeLabelProjections(n), this.calculateLabelAngles(n); } }; Ba.findSegmentsPoints = function(e, t) { var n = e._private.rscratch, r = e.pstyle("segment-weights"), a = e.pstyle("segment-distances"), o = e.pstyle("segment-radii"), i = e.pstyle("radius-type"), s = Math.min(r.pfValue.length, a.pfValue.length), l = o.pfValue[o.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], f = a.pfValue[c], h = 1 - d, p = d, v = this.findMidptPtsEtc(e, t), m = v.midptPts, g = v.vectorNormInverse, y = { x: m.x1 * h + m.x2 * p, y: m.y1 * h + m.y2 * p }; n.segpts.push(y.x + g.x * f, y.y + g.y * f), n.radii.push(o.pfValue[c] !== void 0 ? o.pfValue[c] : l), n.isArcRadius.push((i.pfValue[c] !== void 0 ? i.pfValue[c] : u) === "arc-radius"); } }; Ba.findLoopPoints = function(e, t, n, r) { var a = e._private.rscratch, o = 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; a.edgeType = "self"; var f = n, h = d; r && (f = 0, h = l); var p = u - Math.PI / 2, v = p - c / 2, m = p + c / 2, g = u + "_" + c; f = o[g] === void 0 ? o[g] = 0 : ++o[g], a.ctrlpts = [i.x + Math.cos(v) * 1.4 * h * (f / 3 + 1), i.y + Math.sin(v) * 1.4 * h * (f / 3 + 1), i.x + Math.cos(m) * 1.4 * h * (f / 3 + 1), i.y + Math.sin(m) * 1.4 * h * (f / 3 + 1)]; }; Ba.findCompoundLoopPoints = function(e, t, n, r) { var a = e._private.rscratch; a.edgeType = "compound"; var o = 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, f = e.pstyle("control-point-distances"), h = f ? f.pfValue[0] : void 0, p = n, v = d; r && (p = 0, v = h); var m = 50, g = { x: o.x - s / 2, y: o.y - l / 2 }, y = { x: i.x - u / 2, y: i.y - c / 2 }, x = { x: Math.min(g.x, y.x), y: Math.min(g.y, y.y) }, w = 0.5, k = Math.max(w, Math.log(s * 0.01)), C = Math.max(w, Math.log(u * 0.01)); a.ctrlpts = [x.x, x.y - (1 + Math.pow(m, 1.12) / 100) * v * (p / 3 + 1) * k, x.x - (1 + Math.pow(m, 1.12) / 100) * v * (p / 3 + 1) * C, x.y]; }; Ba.findStraightEdgePoints = function(e) { e._private.rscratch.edgeType = "straight"; }; Ba.findBezierPoints = function(e, t, n, r, a) { var o = 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], f = r; o.edgeType = f ? "multibezier" : "bezier", o.ctrlpts = []; for (var h = 0; h < u; h++) { var p = (0.5 - t.eles.length / 2 + n) * i * (a ? -1 : 1), v = void 0, m = NU(p); f && (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 : p, y = 1 - d, x = d, w = this.findMidptPtsEtc(e, t), k = w.midptPts, C = w.vectorNormInverse, S = { x: k.x1 * y + k.x2 * x, y: k.y1 * y + k.y2 * x }; o.ctrlpts.push(S.x + C.x * g, S.y + C.y * g); } }; Ba.findTaxiPoints = function(e, t) { var n = e._private.rscratch; n.edgeType = "segments"; var r = "vertical", a = "horizontal", o = "leftward", i = "rightward", s = "downward", l = "upward", u = "auto", c = t.posPts, d = t.srcW, f = t.srcH, h = t.tgtW, p = t.tgtH, v = e.pstyle("edge-distances").value, m = v !== "node-position", g = e.pstyle("taxi-direction").value, y = g, x = e.pstyle("taxi-turn"), w = x.units === "%", k = x.pfValue, C = k < 0, S = e.pstyle("taxi-turn-min-distance").pfValue, _ = m ? (d + h) / 2 : 0, T = m ? (f + p) / 2 : 0, O = c.x2 - c.x1, $ = c.y2 - c.y1, A = function(ze, Ve) { return ze > 0 ? Math.max(ze - Ve, 0) : Math.min(ze + Ve, 0); }, N = A(O, _), L = A($, T), R = !1; y === u ? g = Math.abs(N) > Math.abs(L) ? a : r : y === l || y === s ? (g = r, R = !0) : (y === o || y === i) && (g = a, R = !0); var P = g === r, B = P ? L : N, M = P ? $ : O, z = NU(M), Z = !1; !(R && (w || C)) && (y === s && M < 0 || y === l && M > 0 || y === o && M > 0 || y === i && M < 0) && (z *= -1, B = z * Math.abs(B), Z = !0); var G; if (w) { var J = k < 0 ? 1 + k : k; G = J * B; } else { var se = k < 0 ? B : 0; G = se + k * z; } var ve = function(ze) { return Math.abs(ze) < S || Math.abs(ze) >= Math.abs(B); }, ge = ve(G), oe = ve(Math.abs(B) - Math.abs(G)), ee = ge || oe; if (ee && !Z) if (P) { var q = Math.abs(M) <= f / 2, Y = Math.abs(O) <= h / 2; if (q) { var te = (c.x1 + c.x2) / 2, we = c.y1, Oe = c.y2; n.segpts = [te, we, te, Oe]; } else if (Y) { var Ne = (c.y1 + c.y2) / 2, xe = c.x1, $e = c.x2; n.segpts = [xe, Ne, $e, Ne]; } else n.segpts = [c.x1, c.y2]; } else { var Se = Math.abs(M) <= d / 2, Pe = Math.abs($) <= p / 2; if (Se) { var Me = (c.y1 + c.y2) / 2, je = c.x1, Be = c.x2; n.segpts = [je, Me, Be, Me]; } else if (Pe) { var We = (c.x1 + c.x2) / 2, qe = c.y1, Ge = c.y2; n.segpts = [We, qe, We, Ge]; } else n.segpts = [c.x2, c.y1]; } else if (P) { var E = c.y1 + G + (m ? f / 2 * z : 0), V = c.x1, ie = c.x2; n.segpts = [V, E, ie, E]; } else { var le = c.x1 + G + (m ? d / 2 * z : 0), re = c.y1, ke = c.y2; n.segpts = [le, re, le, ke]; } if (n.isRound) { var fe = e.pstyle("taxi-radius").value, Ee = e.pstyle("radius-type").value[0] === "arc-radius"; n.radii = new Array(n.segpts.length / 2).fill(fe), n.isArcRadius = new Array(n.segpts.length / 2).fill(Ee); } }; Ba.tryToCorrectInvalidPoints = function(e, t) { var n = e._private.rscratch; if (n.edgeType === "bezier") { var r = t.srcPos, a = t.tgtPos, o = t.srcW, i = t.srcH, s = t.tgtW, l = t.tgtH, u = t.srcShape, c = t.tgtShape, d = t.srcCornerRadius, f = t.tgtCornerRadius, h = t.srcRs, p = t.tgtRs, v = !it(n.startX) || !it(n.startY), m = !it(n.arrowStartX) || !it(n.arrowStartY), g = !it(n.endX) || !it(n.endY), y = !it(n.arrowEndX) || !it(n.arrowEndY), x = 3, w = this.getArrowWidth(e.pstyle("width").pfValue, e.pstyle("arrow-scale").value) * this.arrowShapeWidth, k = x * w, C = Md({ x: n.ctrlpts[0], y: n.ctrlpts[1] }, { x: n.startX, y: n.startY }), S = C < k, _ = Md({ x: n.ctrlpts[0], y: n.ctrlpts[1] }, { x: n.endX, y: n.endY }), T = _ < k, O = !1; if (v || m || S) { O = !0; var $ = { // delta x: n.ctrlpts[0] - r.x, y: n.ctrlpts[1] - r.y }, A = Math.sqrt($.x * $.x + $.y * $.y), N = { // normalised delta x: $.x / A, y: $.y / A }, L = Math.max(o, i), R = { // *2 radius guarantees outside shape x: n.ctrlpts[0] + N.x * 2 * L, y: n.ctrlpts[1] + N.y * 2 * L }, P = u.intersectLine(r.x, r.y, o, i, R.x, R.y, 0, d, h); S ? (n.ctrlpts[0] = n.ctrlpts[0] + N.x * (k - C), n.ctrlpts[1] = n.ctrlpts[1] + N.y * (k - C)) : (n.ctrlpts[0] = P[0] + N.x * k, n.ctrlpts[1] = P[1] + N.y * k); } if (g || y || T) { O = !0; var B = { // delta x: n.ctrlpts[0] - a.x, y: n.ctrlpts[1] - a.y }, M = Math.sqrt(B.x * B.x + B.y * B.y), z = { // normalised delta x: B.x / M, y: B.y / M }, Z = Math.max(o, i), G = { // *2 radius guarantees outside shape x: n.ctrlpts[0] + z.x * 2 * Z, y: n.ctrlpts[1] + z.y * 2 * Z }, J = c.intersectLine(a.x, a.y, s, l, G.x, G.y, 0, f, p); T ? (n.ctrlpts[0] = n.ctrlpts[0] + z.x * (k - _), n.ctrlpts[1] = n.ctrlpts[1] + z.y * (k - _)) : (n.ctrlpts[0] = J[0] + z.x * k, n.ctrlpts[1] = J[1] + z.y * k); } O && this.findEndpoints(e); } }; Ba.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, a; 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, a = 0.5, t.midX = qr(t.allpts[r], t.allpts[r + 2], t.allpts[r + 4], a), t.midY = qr(t.allpts[r + 1], t.allpts[r + 3], t.allpts[r + 5], a)); } 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 o = 2; o + 3 < t.allpts.length; o += 2) { var i = t.radii[o / 2 - 1], s = t.isArcRadius[o / 2 - 1]; t.roundCorners.push(E_({ x: t.allpts[o - 2], y: t.allpts[o - 1] }, { x: t.allpts[o], y: t.allpts[o + 1], radius: i }, { x: t.allpts[o + 2], y: t.allpts[o + 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] }, f = t.roundCorners[c / 2], h = [d.x - f.cx, d.y - f.cy], p = f.radius / Math.sqrt(Math.pow(h[0], 2) + Math.pow(h[1], 2)); h = h.map(function(v) { return v * p; }), t.midX = f.cx + h[0], t.midY = f.cy + h[1], t.midVector = h; } } } }; Ba.checkForInvalidEdgeWarning = function(e) { var t = e[0]._private.rscratch; t.nodesOverlap || it(t.startX) && it(t.startY) && it(t.endX) && it(t.endY) ? t.loggedErr = !1 : t.loggedErr || (t.loggedErr = !0, An("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.")); }; Ba.findEdgeControlPoints = function(e) { var t = this; if (!(!e || e.length === 0)) { for (var n = this, r = n.cy, a = r.hasCompoundNodes(), o = { map: new hs(), get: function(C) { var S = this.map.get(C[0]); return S != null ? S.get(C[1]) : null; }, set: function(C, S) { var _ = this.map.get(C[0]); _ == null && (_ = new hs(), this.map.set(C[0], _)), _.set(C[1], S); } }, 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 f = d === "unbundled-bezier" || d.endsWith("segments") || d === "straight" || d === "straight-triangle" || d.endsWith("taxi"), h = d === "unbundled-bezier" || d === "bezier", p = c.source, v = c.target, m = p.poolIndex(), g = v.poolIndex(), y = [m, g].sort(), x = o.get(y); x == null && (x = { eles: [] }, o.set(y, x), i.push(y)), x.eles.push(u), f && (x.hasUnbundled = !0), h && (x.hasBezier = !0); } } for (var w = function(C) { var S = i[C], _ = o.get(S), T = void 0; if (!_.hasUnbundled) { var O = _.eles[0].parallelEdges().filter(function(ie) { return ie.isBundledBezier(); }); c_(_.eles), O.forEach(function(ie) { return _.eles.push(ie); }), _.eles.sort(function(ie, le) { return ie.poolIndex() - le.poolIndex(); }); } var $ = _.eles[0], A = $.source(), N = $.target(); if (A.poolIndex() > N.poolIndex()) { var L = A; A = N, N = L; } var R = _.srcPos = A.position(), P = _.tgtPos = N.position(), B = _.srcW = A.outerWidth(), M = _.srcH = A.outerHeight(), z = _.tgtW = N.outerWidth(), Z = _.tgtH = N.outerHeight(), G = _.srcShape = n.nodeShapes[t.getNodeShape(A)], J = _.tgtShape = n.nodeShapes[t.getNodeShape(N)], se = _.srcCornerRadius = A.pstyle("corner-radius").value === "auto" ? "auto" : A.pstyle("corner-radius").pfValue, ve = _.tgtCornerRadius = N.pstyle("corner-radius").value === "auto" ? "auto" : N.pstyle("corner-radius").pfValue, ge = _.tgtRs = N._private.rscratch, oe = _.srcRs = A._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 q = _.eles[ee], Y = q[0]._private.rscratch, te = q.pstyle("curve-style").value, we = te === "unbundled-bezier" || te.endsWith("segments") || te.endsWith("taxi"), Oe = !A.same(q.source()); if (!_.calculatedIntersection && A !== N && (_.hasBezier || _.hasUnbundled)) { _.calculatedIntersection = !0; var Ne = G.intersectLine(R.x, R.y, B, M, P.x, P.y, 0, se, oe), xe = _.srcIntn = Ne, $e = J.intersectLine(P.x, P.y, z, Z, R.x, R.y, 0, ve, ge), Se = _.tgtIntn = $e, Pe = _.intersectionPts = { x1: Ne[0], x2: $e[0], y1: Ne[1], y2: $e[1] }, Me = _.posPts = { x1: R.x, x2: P.x, y1: R.y, y2: P.y }, je = $e[1] - Ne[1], Be = $e[0] - Ne[0], We = Math.sqrt(Be * Be + je * je), qe = _.vector = { x: Be, y: je }, Ge = _.vectorNorm = { x: qe.x / We, y: qe.y / We }, E = { x: -Ge.y, y: Ge.x }; _.nodesOverlap = !it(We) || J.checkPoint(Ne[0], Ne[1], 0, z, Z, P.x, P.y, ve, ge) || G.checkPoint($e[0], $e[1], 0, B, M, R.x, R.y, se, oe), _.vectorNormInverse = E, T = { nodesOverlap: _.nodesOverlap, dirCounts: _.dirCounts, calculatedIntersection: !0, hasBezier: _.hasBezier, hasUnbundled: _.hasUnbundled, eles: _.eles, srcPos: P, tgtPos: R, srcW: z, srcH: Z, tgtW: B, tgtH: M, srcIntn: Se, tgtIntn: xe, srcShape: J, tgtShape: G, posPts: { x1: Me.x2, y1: Me.y2, x2: Me.x1, y2: Me.y1 }, intersectionPts: { x1: Pe.x2, y1: Pe.y2, x2: Pe.x1, y2: Pe.y1 }, vector: { x: -qe.x, y: -qe.y }, vectorNorm: { x: -Ge.x, y: -Ge.y }, vectorNormInverse: { x: -E.x, y: -E.y } }; } var V = Oe ? T : _; Y.nodesOverlap = V.nodesOverlap, Y.srcIntn = V.srcIntn, Y.tgtIntn = V.tgtIntn, Y.isRound = te.startsWith("round"), a && (A.isParent() || A.isChild() || N.isParent() || N.isChild()) && (A.parents().anySame(N) || N.parents().anySame(A) || A.same(N) && A.isParent()) ? t.findCompoundLoopPoints(q, V, ee, we) : A === N ? t.findLoopPoints(q, V, ee, we) : te.endsWith("segments") ? t.findSegmentsPoints(q, V) : te.endsWith("taxi") ? t.findTaxiPoints(q, V) : te === "straight" || !we && _.eles.length % 2 === 1 && ee === Math.floor(_.eles.length / 2) ? t.findStraightEdgePoints(q) : t.findBezierPoints(q, V, ee, we, Oe), t.findEndpoints(q), t.tryToCorrectInvalidPoints(q, V), t.checkForInvalidEdgeWarning(q), t.storeAllpts(q), t.storeEdgeProjections(q), t.calculateArrowAngles(q), t.recalculateEdgeLabelProjections(q), t.calculateLabelAngles(q); } }, k = 0; k < i.length; k++) w(k); this.findHaystackPoints(s); } }; function Iq(e) { var t = []; if (e != null) { for (var n = 0; n < e.length; n += 2) { var r = e[n], a = e[n + 1]; t.push({ x: r, y: a }); } return t; } } Ba.getSegmentPoints = function(e) { var t = e[0]._private.rscratch, n = t.edgeType; if (n === "segments") return this.recalculateRenderedStyle(e), Iq(t.segpts); }; Ba.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), Iq(t.ctrlpts); }; Ba.getEdgeMidpoint = function(e) { var t = e[0]._private.rscratch; return this.recalculateRenderedStyle(e), { x: t.midX, y: t.midY }; }; var xm = {}; xm.manualEndptToPx = function(e, t) { var n = this, r = e.position(), a = e.outerWidth(), o = 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] * a), t.units[1] === "%" && (s[1] = s[1] * o), 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(a, o), c = [r.x + Math.cos(l) * u, r.y + Math.sin(l) * u]; return n.nodeShapes[this.getNodeShape(e)].intersectLine(r.x, r.y, a, o, c[0], c[1], 0, e.pstyle("corner-radius").value === "auto" ? "auto" : e.pstyle("corner-radius").pfValue, i); } }; xm.findEndpoints = function(e) { var t = this, n, r = e.source()[0], a = e.target()[0], o = r.position(), i = a.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, f = a._private.rscratch, h = e.pstyle("curve-style").value, p = e._private.rscratch, v = p.edgeType, m = h === "taxi", g = v === "self" || v === "compound", y = v === "bezier" || v === "multibezier" || g, x = v !== "bezier", w = v === "straight" || v === "segments", k = v === "segments", C = y || x || w, S = g || m, _ = e.pstyle("source-endpoint"), T = S ? "outside-to-node" : _.value, O = r.pstyle("corner-radius").value === "auto" ? "auto" : r.pstyle("corner-radius").pfValue, $ = e.pstyle("target-endpoint"), A = S ? "outside-to-node" : $.value, N = a.pstyle("corner-radius").value === "auto" ? "auto" : a.pstyle("corner-radius").pfValue; p.srcManEndpt = _, p.tgtManEndpt = $; var L, R, P, B; if (y) { var M = [p.ctrlpts[0], p.ctrlpts[1]], z = x ? [p.ctrlpts[p.ctrlpts.length - 2], p.ctrlpts[p.ctrlpts.length - 1]] : M; L = z, R = M; } else if (w) { var Z = k ? p.segpts.slice(0, 2) : [i.x, i.y], G = k ? p.segpts.slice(p.segpts.length - 2) : [o.x, o.y]; L = G, R = Z; } if (A === "inside-to-node") n = [i.x, i.y]; else if ($.units) n = this.manualEndptToPx(a, $); else if (A === "outside-to-line") n = p.tgtIntn; else if (A === "outside-to-node" || A === "outside-to-node-or-label" ? P = L : (A === "outside-to-line" || A === "outside-to-line-or-label") && (P = [o.x, o.y]), n = t.nodeShapes[this.getNodeShape(a)].intersectLine(i.x, i.y, a.outerWidth(), a.outerHeight(), P[0], P[1], 0, N, f), A === "outside-to-node-or-label" || A === "outside-to-line-or-label") { var J = a._private.rscratch, se = J.labelWidth, ve = J.labelHeight, ge = J.labelX, oe = J.labelY, ee = se / 2, q = ve / 2, Y = a.pstyle("text-valign").value; Y === "top" ? oe -= q : Y === "bottom" && (oe += q); var te = a.pstyle("text-halign").value; te === "left" ? ge -= ee : te === "right" && (ge += ee); var we = lg(P[0], P[1], [ge - ee, oe - q, ge + ee, oe - q, ge + ee, oe + q, ge - ee, oe + q], i.x, i.y); if (we.length > 0) { var Oe = o, Ne = Nc(Oe, Zp(n)), xe = Nc(Oe, Zp(we)), $e = Ne; if (xe < Ne && (n = we, $e = xe), we.length > 2) { var Se = Nc(Oe, { x: we[2], y: we[3] }); Se < $e && (n = [we[2], we[3]]); } } } var Pe = I1(n, L, t.arrowShapes[s].spacing(e) + u), Me = I1(n, L, t.arrowShapes[s].gap(e) + u); if (p.endX = Me[0], p.endY = Me[1], p.arrowEndX = Pe[0], p.arrowEndY = Pe[1], T === "inside-to-node") n = [o.x, o.y]; else if (_.units) n = this.manualEndptToPx(r, _); else if (T === "outside-to-line") n = p.srcIntn; else if (T === "outside-to-node" || T === "outside-to-node-or-label" ? B = R : (T === "outside-to-line" || T === "outside-to-line-or-label") && (B = [i.x, i.y]), n = t.nodeShapes[this.getNodeShape(r)].intersectLine(o.x, o.y, r.outerWidth(), r.outerHeight(), B[0], B[1], 0, O, d), T === "outside-to-node-or-label" || T === "outside-to-line-or-label") { var je = r._private.rscratch, Be = je.labelWidth, We = je.labelHeight, qe = je.labelX, Ge = je.labelY, E = Be / 2, V = We / 2, ie = r.pstyle("text-valign").value; ie === "top" ? Ge -= V : ie === "bottom" && (Ge += V); var le = r.pstyle("text-halign").value; le === "left" ? qe -= E : le === "right" && (qe += E); var re = lg(B[0], B[1], [qe - E, Ge - V, qe + E, Ge - V, qe + E, Ge + V, qe - E, Ge + V], o.x, o.y); if (re.length > 0) { var ke = i, fe = Nc(ke, Zp(n)), Ee = Nc(ke, Zp(re)), ze = fe; if (Ee < fe && (n = [re[0], re[1]], ze = Ee), re.length > 2) { var Ve = Nc(ke, { x: re[2], y: re[3] }); Ve < ze && (n = [re[2], re[3]]); } } } var me = I1(n, R, t.arrowShapes[l].spacing(e) + c), _e = I1(n, R, t.arrowShapes[l].gap(e) + c); p.startX = _e[0], p.startY = _e[1], p.arrowStartX = me[0], p.arrowStartY = me[1], C && (!it(p.startX) || !it(p.startY) || !it(p.endX) || !it(p.endY) ? p.badLine = !0 : p.badLine = !1); }; xm.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 }; } }; xm.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 __ = {}; function Htt(e, t, n) { for (var r = function(l, u, c, d) { return qr(l, u, c, d); }, a = t._private, o = a.rstyle.bezierPts, i = 0; i < e.bezierProjPcts.length; i++) { var s = e.bezierProjPcts[i]; o.push({ x: r(n[0], n[2], n[4], s), y: r(n[1], n[3], n[5], s) }); } } __.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 a = 0; a + 5 < n.allpts.length; a += 4) Htt(this, e, n.allpts.slice(a, a + 6)); } else if (r === "segments") for (var o = t.rstyle.linePts = [], a = 0; a + 1 < n.allpts.length; a += 2) o.push({ x: n.allpts[a], y: n.allpts[a + 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; }; __.recalculateEdgeProjections = function(e) { this.findEdgeControlPoints(e); }; var Rs = {}; Rs.recalculateNodeLabelProjection = function(e) { var t = e.pstyle("label").strValue; if (!Ju(t)) { var n, r, a = e._private, o = e.width(), i = e.height(), s = e.padding(), l = e.position(), u = e.pstyle("text-halign").strValue, c = e.pstyle("text-valign").strValue, d = a.rscratch, f = a.rstyle; switch (u) { case "left": n = l.x - o / 2 - s; break; case "right": n = l.x + o / 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, f.labelX = n, f.labelY = r, this.calculateLabelAngles(e), this.applyLabelDimensions(e); } }; var Pq = function(e, t) { var n = Math.atan(t / e); return e === 0 && n < 0 && (n = n * -1), n; }, Lq = function(e, t) { var n = t.x - e.x, r = t.y - e.y; return Pq(n, r); }, Utt = function(e, t, n, r) { var a = sg(0, r - 1e-3, 1), o = sg(0, r + 1e-3, 1), i = lf(e, t, n, a), s = lf(e, t, n, o); return Lq(i, s); }; Rs.recalculateEdgeLabelProjections = function(e) { var t, n = e._private, r = n.rscratch, a = this, o = { mid: e.pstyle("label").strValue, source: e.pstyle("source-label").strValue, target: e.pstyle("target-label").strValue }; if (o.mid || o.source || o.target) { t = { x: r.midX, y: r.midY }; var i = function(c, d, f) { xu(n.rscratch, c, d, f), xu(n.rstyle, c, d, f); }; i("labelX", null, t.x), i("labelY", null, t.y); var s = Pq(r.midDispX, r.midDispY); i("labelAutoAngle", null, s); var l = function c() { if (c.cache) return c.cache; for (var d = [], f = 0; f + 5 < r.allpts.length; f += 4) { var h = { x: r.allpts[f], y: r.allpts[f + 1] }, p = { x: r.allpts[f + 2], y: r.allpts[f + 3] }, v = { x: r.allpts[f + 4], y: r.allpts[f + 5] }; d.push({ p0: h, p1: p, p2: v, startDist: 0, length: 0, segments: [] }); } var m = n.rstyle.bezierPts, g = a.bezierProjPcts.length; function y(S, _, T, O, $) { var A = Md(_, T), N = S.segments[S.segments.length - 1], L = { p0: _, p1: T, t0: O, t1: $, startDist: N ? N.startDist + N.length : 0, length: A }; S.segments.push(L), S.length += A; } for (var x = 0; x < d.length; x++) { var w = d[x], k = d[x - 1]; k && (w.startDist = k.startDist + k.length), y(w, w.p0, m[x * g], 0, a.bezierProjPcts[0]); for (var C = 0; C < g - 1; C++) y(w, m[x * g + C], m[x * g + C + 1], a.bezierProjPcts[C], a.bezierProjPcts[C + 1]); y(w, m[x * g + g - 1], w.p2, a.bezierProjPcts[g - 1], 1); } return c.cache = d; }, u = function(c) { var d, f = c === "source"; if (o[c]) { var h = e.pstyle(c + "-text-offset").pfValue; switch (r.edgeType) { case "self": case "compound": case "bezier": case "multibezier": { for (var p = l(), v, m = 0, g = 0, y = 0; y < p.length; y++) { for (var x = p[f ? y : p.length - 1 - y], w = 0; w < x.segments.length; w++) { var k = x.segments[f ? w : x.segments.length - 1 - w], C = y === p.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 S = v.cp, _ = v.segment, T = (h - m) / _.length, O = _.t1 - _.t0, $ = f ? _.t0 + O * T : _.t1 - O * T; $ = sg(0, $, 1), t = lf(S.p0, S.p1, S.p2, $), d = Utt(S.p0, S.p1, S.p2, $); break; } case "straight": case "segments": case "haystack": { for (var A = 0, N, L, R, P, B = r.allpts.length, M = 0; M + 3 < B && (f ? (R = { x: r.allpts[M], y: r.allpts[M + 1] }, P = { x: r.allpts[M + 2], y: r.allpts[M + 3] }) : (R = { x: r.allpts[B - 2 - M], y: r.allpts[B - 1 - M] }, P = { x: r.allpts[B - 4 - M], y: r.allpts[B - 3 - M] }), N = Md(R, P), L = A, A += N, !(A >= h)); M += 2) ; var z = h - L, Z = z / N; Z = sg(0, Z, 1), t = KYe(R, P, Z), d = Lq(R, P); break; } } i("labelX", c, t.x), i("labelY", c, t.y), i("labelAutoAngle", c, d); } }; u("source"), u("target"), this.applyLabelDimensions(e); } }; Rs.applyLabelDimensions = function(e) { this.applyPrefixedLabelDimensions(e), e.isEdge() && (this.applyPrefixedLabelDimensions(e, "source"), this.applyPrefixedLabelDimensions(e, "target")); }; Rs.applyPrefixedLabelDimensions = function(e, t) { var n = e._private, r = this.getLabelText(e, t), a = this.calculateLabelDimensions(e, r), o = e.pstyle("line-height").pfValue, i = e.pstyle("text-wrap").strValue, s = Li(n.rscratch, "labelWrapCachedLines", t) || [], l = i !== "wrap" ? 1 : Math.max(s.length, 1), u = a.height / l, c = u * o, d = a.width, f = a.height + (l - 1) * (o - 1) * u; xu(n.rstyle, "labelWidth", t, d), xu(n.rscratch, "labelWidth", t, d), xu(n.rstyle, "labelHeight", t, f), xu(n.rscratch, "labelHeight", t, f), xu(n.rscratch, "labelLineHeight", t, c); }; Rs.getLabelText = function(e, t) { var n = e._private, r = t ? t + "-" : "", a = e.pstyle(r + "label").strValue, o = e.pstyle("text-transform").value, i = function(J, se) { return se ? (xu(n.rscratch, J, t, se), se) : Li(n.rscratch, J, t); }; if (!a) return ""; o == "none" || (o == "uppercase" ? a = a.toUpperCase() : o == "lowercase" && (a = a.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 = a.split(` `), d = e.pstyle("text-max-width").pfValue, f = e.pstyle("text-overflow-wrap").value, h = f === "anywhere", p = [], v = /[\s\u200b]+|$/g, m = 0; m < c.length; m++) { var g = c[m], y = this.calculateLabelDimensions(e, g), x = y.width; if (h) { var w = g.split("").join(u); g = w; } if (x > d) { var k = g.matchAll(v), C = "", S = 0, _ = gU(k), T; try { for (_.s(); !(T = _.n()).done; ) { var O = T.value, $ = O[0], A = g.substring(S, O.index); S = O.index + $.length; var N = C.length === 0 ? A : C + A + $, L = this.calculateLabelDimensions(e, N), R = L.width; R <= d ? C += A + $ : (C && p.push(C), C = A + $); } } catch (J) { _.e(J); } finally { _.f(); } C.match(/^[\s\u200b]+$/) || p.push(C); } else p.push(g); } i("labelWrapCachedLines", p), a = i("labelWrapCachedText", p.join(` `)), i("labelWrapKey", l); } else if (s === "ellipsis") { var P = e.pstyle("text-max-width").pfValue, B = "", M = "…", z = !1; if (this.calculateLabelDimensions(e, a).width < P) return a; for (var Z = 0; Z < a.length; Z++) { var G = this.calculateLabelDimensions(e, B + a[Z] + M).width; if (G > P) break; B += a[Z], Z === a.length - 1 && (z = !0); } return z || (B += M), B; } return a; }; Rs.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; }; Rs.calculateLabelDimensions = function(e, t) { var n = this, r = n.cy.window(), a = r.document, o = Nd(t, e._private.labelDimsKey), i = n.labelDimCache || (n.labelDimCache = []), s = i[o]; 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, f = e.pstyle("font-weight").strValue, h = this.labelCalcCanvas, p = this.labelCalcCanvasContext; if (!h) { h = this.labelCalcCanvas = a.createElement("canvas"), p = 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"; } p.font = "".concat(u, " ").concat(f, " ").concat(c, "px ").concat(d); for (var m = 0, g = 0, y = t.split(` `), x = 0; x < y.length; x++) { var w = y[x], k = p.measureText(w), C = Math.ceil(k.width), S = c; m = Math.max(C, m), g += S; } return m += l, g += l, i[o] = { width: m, height: g }; }; Rs.calculateLabelAngle = function(e, t) { var n = e._private, r = n.rscratch, a = e.isEdge(), o = t ? t + "-" : "", i = e.pstyle(o + "text-rotation"), s = i.strValue; return s === "none" ? 0 : a && s === "autorotate" ? r.labelAutoAngle : s === "autorotate" ? 0 : i.pfValue; }; Rs.calculateLabelAngles = function(e) { var t = this, n = e.isEdge(), r = e._private, a = r.rscratch; a.labelAngle = t.calculateLabelAngle(e), n && (a.sourceLabelAngle = t.calculateLabelAngle(e, "source"), a.targetLabelAngle = t.calculateLabelAngle(e, "target")); }; var Nq = {}, hP = 28, vP = !1; Nq.getNodeShape = function(e) { var t = this, n = e.pstyle("shape").value; if (n === "cutrectangle" && (e.width() < hP || e.height() < hP)) return vP || (An("The `cutrectangle` node shape can not be used at small sizes so `rectangle` is used instead"), vP = !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 px = {}; px.registerCalculationListeners = function() { var e = this.cy, t = e.collection(), n = this, r = function(o) { var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0; if (t.merge(o), i) for (var s = 0; s < o.length; s++) { var l = o[s], u = l._private, c = u.rstyle; c.clean = !1, c.cleanConnected = !1; } }; n.binder(e).on("bounds.* dirty.*", function(o) { var i = o.target; r(i); }).on("style.* background.*", function(o) { var i = o.target; r(i, !1); }); var a = function(o) { if (o) { 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(o, t); } n.recalculateRenderedStyle(t), t = e.collection(); } }; n.flushRenderedStyleQueue = function() { a(!0); }, n.beforeRender(a, n.beforeRenderPriorities.eleCalcs); }; px.onUpdateEleCalcs = function(e) { var t = this.onUpdateEleCalcsFns = this.onUpdateEleCalcsFns || []; t.push(e); }; px.recalculateRenderedStyle = function(e, t) { var n = function(x) { return x._private.rstyle.cleanConnected; }, r = [], a = []; if (!this.destroyed) { t === void 0 && (t = !0); for (var o = 0; o < e.length; o++) { var i = e[o], 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" ? a.push(i) : r.push(i), l.clean = !0); } for (var u = 0; u < a.length; u++) { var c = a[u], d = c._private, f = d.rstyle, h = c.position(); this.recalculateNodeLabelProjection(c), f.nodeX = h.x, f.nodeY = h.y, f.nodeW = c.pstyle("width").pfValue, f.nodeH = c.pstyle("height").pfValue; } this.recalculateEdgeProjections(r); for (var p = 0; p < r.length; p++) { var v = r[p], m = v._private, g = m.rstyle, y = m.rscratch; g.srcX = y.arrowStartX, g.srcY = y.arrowStartY, g.tgtX = y.arrowEndX, g.tgtY = y.arrowEndY, g.midX = y.midX, g.midY = y.midY, g.labelAngle = y.labelAngle, g.sourceLabelAngle = y.sourceLabelAngle, g.targetLabelAngle = y.targetLabelAngle; } } }; var fx = {}; fx.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], a = r._private.rscratch; r.grabbed() && !r.isParent() ? t.push(r) : a.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); } } }; fx.invalidateCachedZSortedEles = function() { this.cachedZSortedEles = null; }; fx.getCachedZSortedEles = function(e) { if (e || !this.cachedZSortedEles) { var t = this.cy.mutableElements().toArray(); t.sort(yq), t.interactive = t.filter(function(n) { return n.interactive(); }), this.cachedZSortedEles = t, this.updateCachedGrabbedEles(); } else t = this.cachedZSortedEles; return t; }; var Mq = {}; [dp, Kb, Ba, xm, __, Rs, Nq, px, fx].forEach(function(e) { At(Mq, e); }); var Bq = {}; Bq.getCachedImage = function(e, t, n) { var r = this, a = r.imageCache = r.imageCache || {}, o = a[e]; if (o) return o.image.complete || o.image.addEventListener("load", n), o.image; o = a[e] = a[e] || {}; var i = o.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 Vh = {}; Vh.registerBinding = function(e, t, n, r) { var a = Array.prototype.slice.apply(arguments, [1]), o = this.binder(e); return o.on.apply(o, a); }; Vh.binder = function(e) { var t = this, n = t.cy.window(), r = e === n || e === n.document || e === n.document.body || fXe(e); if (t.supportsPassiveEvents == null) { var a = !1; try { var o = Object.defineProperty({}, "passive", { get: function() { return a = !0, !0; } }); n.addEventListener("test", null, o); } catch { } t.supportsPassiveEvents = a; } 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 }; }; Vh.nodeIsDraggable = function(e) { return e && e.isNode() && !e.locked() && e.grabbable(); }; Vh.nodeIsGrabbable = function(e) { return this.nodeIsDraggable(e) && e.interactive(); }; Vh.load = function() { var e = this, t = e.cy.window(), n = function(E) { return E.selected(); }, r = function(E, V, ie, le) { E == null && (E = e.cy); for (var re = 0; re < V.length; re++) { var ke = V[re]; E.emit({ originalEvent: ie, type: ke, position: le }); } }, a = function(E) { return E.shiftKey || E.metaKey || E.ctrlKey; }, o = function(E, V) { var ie = !0; if (e.cy.hasCompoundNodes() && E && E.pannable()) for (var le = 0; V && le < V.length; le++) { var E = V[le]; if (E.isNode() && E.isParent() && !E.pannable()) { ie = !1; break; } } else ie = !0; return ie; }, i = function(E) { E[0]._private.grabbed = !0; }, s = function(E) { E[0]._private.grabbed = !1; }, l = function(E) { E[0]._private.rscratch.inDragLayer = !0; }, u = function(E) { E[0]._private.rscratch.inDragLayer = !1; }, c = function(E) { E[0]._private.rscratch.isGrabTarget = !0; }, d = function(E) { E[0]._private.rscratch.isGrabTarget = !1; }, f = function(E, V) { var ie = V.addToList, le = ie.has(E); !le && E.grabbable() && !E.locked() && (ie.merge(E), i(E)); }, h = function(E, V) { if (E.cy().hasCompoundNodes() && !(V.inDragLayer == null && V.addToList == null)) { var ie = E.descendants(); V.inDragLayer && (ie.forEach(l), ie.connectedEdges().forEach(l)), V.addToList && f(ie, V); } }, p = function(E, V) { V = V || {}; var ie = E.cy().hasCompoundNodes(); V.inDragLayer && (E.forEach(l), E.neighborhood().stdFilter(function(le) { return !ie || le.isEdge(); }).forEach(l)), V.addToList && E.forEach(function(le) { f(le, V); }), h(E, V), g(E, { inDragLayer: V.inDragLayer }), e.updateCachedGrabbedEles(); }, v = p, m = function(E) { E && (e.getCachedZSortedEles().forEach(function(V) { s(V), u(V), d(V); }), e.updateCachedGrabbedEles()); }, g = function(E, V) { if (!(V.inDragLayer == null && V.addToList == null) && E.cy().hasCompoundNodes()) { var ie = E.ancestors().orphans(); if (!ie.same(E)) { var le = ie.descendants().spawnSelf().merge(ie).unmerge(E).unmerge(E.descendants()), re = le.connectedEdges(); V.inDragLayer && (re.forEach(l), le.forEach(l)), V.addToList && le.forEach(function(ke) { f(ke, V); }); } } }, y = 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(E) { for (var V = 0; V < E.length; V++) { var ie = E[V], le = ie.removedNodes; if (le) for (var re = 0; re < le.length; re++) { var ke = le[re]; if (ke === e.container) { e.destroy(); break; } } } }), e.container.parentNode && e.removeObserver.observe(e.container.parentNode, { childList: !0 })) : e.registerBinding(e.container, "DOMNodeRemoved", function(E) { e.destroy(); }); var k = Qw(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(E, V) { for (; E != null; ) V(E), E = E.parentNode; }, S = function() { e.invalidateContainerClientCoordsCache(); }; C(e.container, function(E) { e.registerBinding(E, "transitionend", S), e.registerBinding(E, "animationend", S), e.registerBinding(E, "scroll", S); }), e.registerBinding(e.container, "contextmenu", function(E) { E.preventDefault(); }); var _ = function() { return e.selection[4] !== 0; }, T = function(E) { for (var V = e.findContainerClientCoords(), ie = V[0], le = V[1], re = V[2], ke = V[3], fe = E.touches ? E.touches : [E], Ee = !1, ze = 0; ze < fe.length; ze++) { var Ve = fe[ze]; if (ie <= Ve.clientX && Ve.clientX <= ie + re && le <= Ve.clientY && Ve.clientY <= le + ke) { Ee = !0; break; } } if (!Ee) return !1; for (var me = e.container, _e = E.target, Ce = _e.parentNode, Le = !1; Ce; ) { if (Ce === me) { Le = !0; break; } Ce = Ce.parentNode; } return !!Le; }; e.registerBinding(e.container, "mousedown", function(E) { if (T(E) && !(e.hoverData.which === 1 && E.which !== 1)) { E.preventDefault(), y(), e.hoverData.capture = !0, e.hoverData.which = E.which; var V = e.cy, ie = [E.clientX, E.clientY], le = e.projectIntoViewport(ie[0], ie[1]), re = e.selection, ke = e.findNearestElements(le[0], le[1], !0, !1), fe = ke[0], Ee = e.dragData.possibleDragElements; e.hoverData.mdownPos = le, e.hoverData.mdownGPos = ie; var ze = function() { e.hoverData.tapholdCancelled = !1, clearTimeout(e.hoverData.tapholdTimeout), e.hoverData.tapholdTimeout = setTimeout(function() { if (!e.hoverData.tapholdCancelled) { var Le = e.hoverData.down; Le ? Le.emit({ originalEvent: E, type: "taphold", position: { x: le[0], y: le[1] } }) : V.emit({ originalEvent: E, type: "taphold", position: { x: le[0], y: le[1] } }); } }, e.tapholdDuration); }; if (E.which == 3) { e.hoverData.cxtStarted = !0; var Ve = { originalEvent: E, type: "cxttapstart", position: { x: le[0], y: le[1] } }; fe ? (fe.activate(), fe.emit(Ve), e.hoverData.down = fe) : V.emit(Ve), e.hoverData.downTime = (/* @__PURE__ */ new Date()).getTime(), e.hoverData.cxtDragged = !1; } else if (E.which == 1) { fe && fe.activate(); { if (fe != null && e.nodeIsGrabbable(fe)) { var me = function(Le) { return { originalEvent: E, type: Le, position: { x: le[0], y: le[1] } }; }, _e = function(Le) { Le.emit(me("grab")); }; if (c(fe), !fe.selected()) Ee = e.dragData.possibleDragElements = V.collection(), v(fe, { addToList: Ee }), fe.emit(me("grabon")).emit(me("grab")); else { Ee = e.dragData.possibleDragElements = V.collection(); var Ce = V.$(function(Le) { return Le.isNode() && Le.selected() && e.nodeIsGrabbable(Le); }); p(Ce, { addToList: Ee }), fe.emit(me("grabon")), Ce.forEach(_e); } e.redrawHint("eles", !0), e.redrawHint("drag", !0); } e.hoverData.down = fe, e.hoverData.downs = ke, e.hoverData.downTime = (/* @__PURE__ */ new Date()).getTime(); } r(fe, ["mousedown", "tapstart", "vmousedown"], E, { x: le[0], y: le[1] }), fe == null ? (re[4] = 1, e.data.bgActivePosistion = { x: le[0], y: le[1] }, e.redrawHint("select", !0), e.redraw()) : fe.pannable() && (re[4] = 1), ze(); } re[0] = re[2] = le[0], re[1] = re[3] = le[1]; } }, !1), e.registerBinding(t, "mousemove", function(E) { var V = e.hoverData.capture; if (!(!V && !T(E))) { var ie = !1, le = e.cy, re = le.zoom(), ke = [E.clientX, E.clientY], fe = e.projectIntoViewport(ke[0], ke[1]), Ee = e.hoverData.mdownPos, ze = e.hoverData.mdownGPos, Ve = e.selection, me = null; !e.hoverData.draggingEles && !e.hoverData.dragging && !e.hoverData.selecting && (me = e.findNearestElement(fe[0], fe[1], !0, !1)); var _e = e.hoverData.last, Ce = e.hoverData.down, Le = [fe[0] - Ve[2], fe[1] - Ve[3]], yt = e.dragData.possibleDragElements, dt; if (ze) { var _t = ke[0] - ze[0], bt = _t * _t, Ct = ke[1] - ze[1], nn = Ct * Ct, Dt = bt + nn; e.hoverData.isOverThresholdDrag = dt = Dt >= e.desktopTapThreshold2; } var Kt = a(E); dt && (e.hoverData.tapholdCancelled = !0); var on = function() { var _n = e.hoverData.dragDelta = e.hoverData.dragDelta || []; _n.length === 0 ? (_n.push(Le[0]), _n.push(Le[1])) : (_n[0] += Le[0], _n[1] += Le[1]); }; ie = !0, r(me, ["mousemove", "vmousemove", "tapdrag"], E, { x: fe[0], y: fe[1] }); var rn = function() { e.data.bgActivePosistion = void 0, e.hoverData.selecting || le.emit({ originalEvent: E, type: "boxstart", position: { x: fe[0], y: fe[1] } }), Ve[4] = 1, e.hoverData.selecting = !0, e.redrawHint("select", !0), e.redraw(); }; if (e.hoverData.which === 3) { if (dt) { var Qt = { originalEvent: E, type: "cxtdrag", position: { x: fe[0], y: fe[1] } }; Ce ? Ce.emit(Qt) : le.emit(Qt), e.hoverData.cxtDragged = !0, (!e.hoverData.cxtOver || me !== e.hoverData.cxtOver) && (e.hoverData.cxtOver && e.hoverData.cxtOver.emit({ originalEvent: E, type: "cxtdragout", position: { x: fe[0], y: fe[1] } }), e.hoverData.cxtOver = me, me && me.emit({ originalEvent: E, type: "cxtdragover", position: { x: fe[0], y: fe[1] } })); } } else if (e.hoverData.dragging) { if (ie = !0, le.panningEnabled() && le.userPanningEnabled()) { var Sn; if (e.hoverData.justStartedPan) { var En = e.hoverData.mdownPos; Sn = { x: (fe[0] - En[0]) * re, y: (fe[1] - En[1]) * re }, e.hoverData.justStartedPan = !1; } else Sn = { x: Le[0] * re, y: Le[1] * re }; le.panBy(Sn), le.emit("dragpan"), e.hoverData.dragged = !0; } fe = e.projectIntoViewport(E.clientX, E.clientY); } else if (Ve[4] == 1 && (Ce == null || Ce.pannable())) { if (dt) { if (!e.hoverData.dragging && le.boxSelectionEnabled() && (Kt || !le.panningEnabled() || !le.userPanningEnabled())) rn(); else if (!e.hoverData.selecting && le.panningEnabled() && le.userPanningEnabled()) { var pn = o(Ce, e.hoverData.downs); pn && (e.hoverData.dragging = !0, e.hoverData.justStartedPan = !0, Ve[4] = 0, e.data.bgActivePosistion = Zp(Ee), e.redrawHint("select", !0), e.redraw()); } Ce && Ce.pannable() && Ce.active() && Ce.unactivate(); } } else { if (Ce && Ce.pannable() && Ce.active() && Ce.unactivate(), (!Ce || !Ce.grabbed()) && me != _e && (_e && r(_e, ["mouseout", "tapdragout"], E, { x: fe[0], y: fe[1] }), me && r(me, ["mouseover", "tapdragover"], E, { x: fe[0], y: fe[1] }), e.hoverData.last = me), Ce) if (dt) { if (le.boxSelectionEnabled() && Kt) Ce && Ce.grabbed() && (m(yt), Ce.emit("freeon"), yt.emit("free"), e.dragData.didDrag && (Ce.emit("dragfreeon"), yt.emit("dragfree"))), rn(); else if (Ce && Ce.grabbed() && e.nodeIsDraggable(Ce)) { var St = !e.dragData.didDrag; St && e.redrawHint("eles", !0), e.dragData.didDrag = !0, e.hoverData.draggingEles || p(yt, { inDragLayer: !0 }); var Rt = { x: 0, y: 0 }; if (it(Le[0]) && it(Le[1]) && (Rt.x += Le[0], Rt.y += Le[1], St)) { var qt = e.hoverData.dragDelta; qt && it(qt[0]) && it(qt[1]) && (Rt.x += qt[0], Rt.y += qt[1]); } e.hoverData.draggingEles = !0, yt.silentShift(Rt).emit("position drag"), e.redrawHint("drag", !0), e.redraw(); } } else on(); ie = !0; } if (Ve[2] = fe[0], Ve[3] = fe[1], ie) return E.stopPropagation && E.stopPropagation(), E.preventDefault && E.preventDefault(), !1; } }, !1); var O, $, A; e.registerBinding(t, "mouseup", function(E) { if (!(e.hoverData.which === 1 && E.which !== 1 && e.hoverData.capture)) { var V = e.hoverData.capture; if (V) { e.hoverData.capture = !1; var ie = e.cy, le = e.projectIntoViewport(E.clientX, E.clientY), re = e.selection, ke = e.findNearestElement(le[0], le[1], !0, !1), fe = e.dragData.possibleDragElements, Ee = e.hoverData.down, ze = a(E); if (e.data.bgActivePosistion && (e.redrawHint("select", !0), e.redraw()), e.hoverData.tapholdCancelled = !0, e.data.bgActivePosistion = void 0, Ee && Ee.unactivate(), e.hoverData.which === 3) { var Ve = { originalEvent: E, type: "cxttapend", position: { x: le[0], y: le[1] } }; if (Ee ? Ee.emit(Ve) : ie.emit(Ve), !e.hoverData.cxtDragged) { var me = { originalEvent: E, type: "cxttap", position: { x: le[0], y: le[1] } }; Ee ? Ee.emit(me) : ie.emit(me); } e.hoverData.cxtDragged = !1, e.hoverData.which = null; } else if (e.hoverData.which === 1) { if (r(ke, ["mouseup", "tapend", "vmouseup"], E, { x: le[0], y: le[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(Ee, ["click", "tap", "vclick"], E, { x: le[0], y: le[1] }), $ = !1, E.timeStamp - A <= ie.multiClickDebounceTime() ? (O && clearTimeout(O), $ = !0, A = null, r(Ee, ["dblclick", "dbltap", "vdblclick"], E, { x: le[0], y: le[1] })) : (O = setTimeout(function() { $ || r(Ee, ["oneclick", "onetap", "voneclick"], E, { x: le[0], y: le[1] }); }, ie.multiClickDebounceTime()), A = E.timeStamp)), Ee == null && !e.dragData.didDrag && !e.hoverData.selecting && !e.hoverData.dragged && !a(E) && (ie.$(n).unselect(["tapunselect"]), fe.length > 0 && e.redrawHint("eles", !0), e.dragData.possibleDragElements = fe = ie.collection()), ke == Ee && !e.dragData.didDrag && !e.hoverData.selecting && ke != null && ke._private.selectable && (e.hoverData.dragging || (ie.selectionType() === "additive" || ze ? ke.selected() ? ke.unselect(["tapunselect"]) : ke.select(["tapselect"]) : ze || (ie.$(n).unmerge(ke).unselect(["tapunselect"]), ke.select(["tapselect"]))), e.redrawHint("eles", !0)), e.hoverData.selecting) { var _e = ie.collection(e.getAllInBox(re[0], re[1], re[2], re[3])); e.redrawHint("select", !0), _e.length > 0 && e.redrawHint("eles", !0), ie.emit({ type: "boxend", originalEvent: E, position: { x: le[0], y: le[1] } }); var Ce = function(yt) { return yt.selectable() && !yt.selected(); }; ie.selectionType() === "additive" || ze || ie.$(n).unmerge(_e).unselect(), _e.emit("box").stdFilter(Ce).select().emit("boxselect"), e.redraw(); } if (e.hoverData.dragging && (e.hoverData.dragging = !1, e.redrawHint("select", !0), e.redrawHint("eles", !0), e.redraw()), !re[4]) { e.redrawHint("drag", !0), e.redrawHint("eles", !0); var Le = Ee && Ee.grabbed(); m(fe), Le && (Ee.emit("freeon"), fe.emit("free"), e.dragData.didDrag && (Ee.emit("dragfreeon"), fe.emit("dragfree"))); } } re[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 N = function(E) { if (!e.scrollingPage) { var V = e.cy, ie = V.zoom(), le = V.pan(), re = e.projectIntoViewport(E.clientX, E.clientY), ke = [re[0] * ie + le.x, re[1] * ie + le.y]; if (e.hoverData.draggingEles || e.hoverData.dragging || e.hoverData.cxtStarted || _()) { E.preventDefault(); return; } if (V.panningEnabled() && V.userPanningEnabled() && V.zoomingEnabled() && V.userZoomingEnabled()) { E.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 fe; E.deltaY != null ? fe = E.deltaY / -250 : E.wheelDeltaY != null ? fe = E.wheelDeltaY / 1e3 : fe = E.wheelDelta / 1e3, fe = fe * e.wheelSensitivity; var Ee = E.deltaMode === 1; Ee && (fe *= 33); var ze = V.zoom() * Math.pow(10, fe); E.type === "gesturechange" && (ze = e.gestureStartZoom * E.scale), V.zoom({ level: ze, renderedPosition: { x: ke[0], y: ke[1] } }), V.emit(E.type === "gesturechange" ? "pinchzoom" : "scrollzoom"); } } }; e.registerBinding(e.container, "wheel", N, !0), e.registerBinding(t, "scroll", function(E) { e.scrollingPage = !0, clearTimeout(e.scrollingPageTimeout), e.scrollingPageTimeout = setTimeout(function() { e.scrollingPage = !1; }, 250); }, !0), e.registerBinding(e.container, "gesturestart", function(E) { e.gestureStartZoom = e.cy.zoom(), e.hasTouchStarted || E.preventDefault(); }, !0), e.registerBinding(e.container, "gesturechange", function(E) { e.hasTouchStarted || N(E); }, !0), e.registerBinding(e.container, "mouseout", function(E) { var V = e.projectIntoViewport(E.clientX, E.clientY); e.cy.emit({ originalEvent: E, type: "mouseout", position: { x: V[0], y: V[1] } }); }, !1), e.registerBinding(e.container, "mouseover", function(E) { var V = e.projectIntoViewport(E.clientX, E.clientY); e.cy.emit({ originalEvent: E, type: "mouseover", position: { x: V[0], y: V[1] } }); }, !1); var L, R, P, B, M, z, Z, G, J, se, ve, ge, oe, ee = function(E, V, ie, le) { return Math.sqrt((ie - E) * (ie - E) + (le - V) * (le - V)); }, q = function(E, V, ie, le) { return (ie - E) * (ie - E) + (le - V) * (le - V); }, Y; e.registerBinding(e.container, "touchstart", Y = function(E) { if (e.hasTouchStarted = !0, !!T(E)) { y(), e.touchData.capture = !0, e.data.bgActivePosistion = void 0; var V = e.cy, ie = e.touchData.now, le = e.touchData.earlier; if (E.touches[0]) { var re = e.projectIntoViewport(E.touches[0].clientX, E.touches[0].clientY); ie[0] = re[0], ie[1] = re[1]; } if (E.touches[1]) { var re = e.projectIntoViewport(E.touches[1].clientX, E.touches[1].clientY); ie[2] = re[0], ie[3] = re[1]; } if (E.touches[2]) { var re = e.projectIntoViewport(E.touches[2].clientX, E.touches[2].clientY); ie[4] = re[0], ie[5] = re[1]; } if (E.touches[1]) { e.touchData.singleTouchMoved = !0, m(e.dragData.touchDragEles); var ke = e.findContainerClientCoords(); J = ke[0], se = ke[1], ve = ke[2], ge = ke[3], L = E.touches[0].clientX - J, R = E.touches[0].clientY - se, P = E.touches[1].clientX - J, B = E.touches[1].clientY - se, oe = 0 <= L && L <= ve && 0 <= P && P <= ve && 0 <= R && R <= ge && 0 <= B && B <= ge; var fe = V.pan(), Ee = V.zoom(); M = ee(L, R, P, B), z = q(L, R, P, B), Z = [(L + P) / 2, (R + B) / 2], G = [(Z[0] - fe.x) / Ee, (Z[1] - fe.y) / Ee]; var ze = 200, Ve = ze * ze; if (z < Ve && !E.touches[2]) { var me = e.findNearestElement(ie[0], ie[1], !0, !0), _e = e.findNearestElement(ie[2], ie[3], !0, !0); me && me.isNode() ? (me.activate().emit({ originalEvent: E, type: "cxttapstart", position: { x: ie[0], y: ie[1] } }), e.touchData.start = me) : _e && _e.isNode() ? (_e.activate().emit({ originalEvent: E, type: "cxttapstart", position: { x: ie[0], y: ie[1] } }), e.touchData.start = _e) : V.emit({ originalEvent: E, type: "cxttapstart", position: { x: ie[0], y: ie[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 (E.touches[2]) V.boxSelectionEnabled() && E.preventDefault(); else if (!E.touches[1] && E.touches[0]) { var Ce = e.findNearestElements(ie[0], ie[1], !0, !0), Le = Ce[0]; if (Le != null && (Le.activate(), e.touchData.start = Le, e.touchData.starts = Ce, e.nodeIsGrabbable(Le))) { var yt = e.dragData.touchDragEles = V.collection(), dt = null; e.redrawHint("eles", !0), e.redrawHint("drag", !0), Le.selected() ? (dt = V.$(function(Dt) { return Dt.selected() && e.nodeIsGrabbable(Dt); }), p(dt, { addToList: yt })) : v(Le, { addToList: yt }), c(Le); var _t = function(Dt) { return { originalEvent: E, type: Dt, position: { x: ie[0], y: ie[1] } }; }; Le.emit(_t("grabon")), dt ? dt.forEach(function(Dt) { Dt.emit(_t("grab")); }) : Le.emit(_t("grab")); } r(Le, ["touchstart", "tapstart", "vmousedown"], E, { x: ie[0], y: ie[1] }), Le == null && (e.data.bgActivePosistion = { x: re[0], y: re[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"], E, { x: ie[0], y: ie[1] }); }, e.tapholdDuration); } if (E.touches.length >= 1) { for (var bt = e.touchData.startPosition = [null, null, null, null, null, null], Ct = 0; Ct < ie.length; Ct++) bt[Ct] = le[Ct] = ie[Ct]; var nn = E.touches[0]; e.touchData.startGPosition = [nn.clientX, nn.clientY]; } } }, !1); var te; e.registerBinding(t, "touchmove", te = function(E) { var V = e.touchData.capture; if (!(!V && !T(E))) { var ie = e.selection, le = e.cy, re = e.touchData.now, ke = e.touchData.earlier, fe = le.zoom(); if (E.touches[0]) { var Ee = e.projectIntoViewport(E.touches[0].clientX, E.touches[0].clientY); re[0] = Ee[0], re[1] = Ee[1]; } if (E.touches[1]) { var Ee = e.projectIntoViewport(E.touches[1].clientX, E.touches[1].clientY); re[2] = Ee[0], re[3] = Ee[1]; } if (E.touches[2]) { var Ee = e.projectIntoViewport(E.touches[2].clientX, E.touches[2].clientY); re[4] = Ee[0], re[5] = Ee[1]; } var ze = e.touchData.startGPosition, Ve; if (V && E.touches[0] && ze) { for (var me = [], _e = 0; _e < re.length; _e++) me[_e] = re[_e] - ke[_e]; var Ce = E.touches[0].clientX - ze[0], Le = Ce * Ce, yt = E.touches[0].clientY - ze[1], dt = yt * yt, _t = Le + dt; Ve = _t >= e.touchTapThreshold2; } if (V && e.touchData.cxt) { E.preventDefault(); var bt = E.touches[0].clientX - J, Ct = E.touches[0].clientY - se, nn = E.touches[1].clientX - J, Dt = E.touches[1].clientY - se, Kt = q(bt, Ct, nn, Dt), on = Kt / z, rn = 150, Qt = rn * rn, Sn = 1.5, En = Sn * Sn; if (on >= En || Kt >= Qt) { e.touchData.cxt = !1, e.data.bgActivePosistion = void 0, e.redrawHint("select", !0); var pn = { originalEvent: E, type: "cxttapend", position: { x: re[0], y: re[1] } }; e.touchData.start ? (e.touchData.start.unactivate().emit(pn), e.touchData.start = null) : le.emit(pn); } } if (V && e.touchData.cxt) { var pn = { originalEvent: E, type: "cxtdrag", position: { x: re[0], y: re[1] } }; e.data.bgActivePosistion = void 0, e.redrawHint("select", !0), e.touchData.start ? e.touchData.start.emit(pn) : le.emit(pn), e.touchData.start && (e.touchData.start._private.grabbed = !1), e.touchData.cxtDragged = !0; var St = e.findNearestElement(re[0], re[1], !0, !0); (!e.touchData.cxtOver || St !== e.touchData.cxtOver) && (e.touchData.cxtOver && e.touchData.cxtOver.emit({ originalEvent: E, type: "cxtdragout", position: { x: re[0], y: re[1] } }), e.touchData.cxtOver = St, St && St.emit({ originalEvent: E, type: "cxtdragover", position: { x: re[0], y: re[1] } })); } else if (V && E.touches[2] && le.boxSelectionEnabled()) E.preventDefault(), e.data.bgActivePosistion = void 0, this.lastThreeTouch = +/* @__PURE__ */ new Date(), e.touchData.selecting || le.emit({ originalEvent: E, type: "boxstart", position: { x: re[0], y: re[1] } }), e.touchData.selecting = !0, e.touchData.didSelect = !0, ie[4] = 1, !ie || ie.length === 0 || ie[0] === void 0 ? (ie[0] = (re[0] + re[2] + re[4]) / 3, ie[1] = (re[1] + re[3] + re[5]) / 3, ie[2] = (re[0] + re[2] + re[4]) / 3 + 1, ie[3] = (re[1] + re[3] + re[5]) / 3 + 1) : (ie[2] = (re[0] + re[2] + re[4]) / 3, ie[3] = (re[1] + re[3] + re[5]) / 3), e.redrawHint("select", !0), e.redraw(); else if (V && E.touches[1] && !e.touchData.didSelect && le.zoomingEnabled() && le.panningEnabled() && le.userZoomingEnabled() && le.userPanningEnabled()) { E.preventDefault(), e.data.bgActivePosistion = void 0, e.redrawHint("select", !0); var Rt = e.dragData.touchDragEles; if (Rt) { e.redrawHint("drag", !0); for (var qt = 0; qt < Rt.length; qt++) { var _n = Rt[qt]._private; _n.grabbed = !1, _n.rscratch.inDragLayer = !1; } } var _r = e.touchData.start, bt = E.touches[0].clientX - J, Ct = E.touches[0].clientY - se, nn = E.touches[1].clientX - J, Dt = E.touches[1].clientY - se, D = ee(bt, Ct, nn, Dt), ae = D / M; if (oe) { var Ie = bt - L, He = Ct - R, Jt = nn - P, fn = Dt - B, un = (Ie + Jt) / 2, en = (He + fn) / 2, Gt = le.zoom(), Hr = Gt * ae, zo = le.pan(), mc = G[0] * Gt + zo.x, yc = G[1] * Gt + zo.y, hp = { x: -Hr / Gt * (mc - zo.x - un) + mc, y: -Hr / Gt * (yc - zo.y - en) + yc }; if (_r && _r.active()) { var Rt = e.dragData.touchDragEles; m(Rt), e.redrawHint("drag", !0), e.redrawHint("eles", !0), _r.unactivate().emit("freeon"), Rt.emit("free"), e.dragData.didDrag && (_r.emit("dragfreeon"), Rt.emit("dragfree")); } le.viewport({ zoom: Hr, pan: hp, cancelOnFailedZoom: !0 }), le.emit("pinchzoom"), M = D, L = bt, R = Ct, P = nn, B = Dt, e.pinching = !0; } if (E.touches[0]) { var Ee = e.projectIntoViewport(E.touches[0].clientX, E.touches[0].clientY); re[0] = Ee[0], re[1] = Ee[1]; } if (E.touches[1]) { var Ee = e.projectIntoViewport(E.touches[1].clientX, E.touches[1].clientY); re[2] = Ee[0], re[3] = Ee[1]; } if (E.touches[2]) { var Ee = e.projectIntoViewport(E.touches[2].clientX, E.touches[2].clientY); re[4] = Ee[0], re[5] = Ee[1]; } } else if (E.touches[0] && !e.touchData.didSelect) { var Xn = e.touchData.start, Vs = e.touchData.last, St; if (!e.hoverData.draggingEles && !e.swipePanning && (St = e.findNearestElement(re[0], re[1], !0, !0)), V && Xn != null && E.preventDefault(), V && Xn != null && e.nodeIsDraggable(Xn)) if (Ve) { var Rt = e.dragData.touchDragEles, bc = !e.dragData.didDrag; bc && p(Rt, { inDragLayer: !0 }), e.dragData.didDrag = !0; var ko = { x: 0, y: 0 }; if (it(me[0]) && it(me[1]) && (ko.x += me[0], ko.y += me[1], bc)) { e.redrawHint("eles", !0); var Rn = e.touchData.dragDelta; Rn && it(Rn[0]) && it(Rn[1]) && (ko.x += Rn[0], ko.y += Rn[1]); } e.hoverData.draggingEles = !0, Rt.silentShift(ko).emit("position drag"), e.redrawHint("drag", !0), e.touchData.startPosition[0] == ke[0] && e.touchData.startPosition[1] == ke[1] && e.redrawHint("eles", !0), e.redraw(); } else { var Rn = e.touchData.dragDelta = e.touchData.dragDelta || []; Rn.length === 0 ? (Rn.push(me[0]), Rn.push(me[1])) : (Rn[0] += me[0], Rn[1] += me[1]); } if (r(Xn || St, ["touchmove", "tapdrag", "vmousemove"], E, { x: re[0], y: re[1] }), (!Xn || !Xn.grabbed()) && St != Vs && (Vs && Vs.emit({ originalEvent: E, type: "tapdragout", position: { x: re[0], y: re[1] } }), St && St.emit({ originalEvent: E, type: "tapdragover", position: { x: re[0], y: re[1] } })), e.touchData.last = St, V) for (var qt = 0; qt < re.length; qt++) re[qt] && e.touchData.startPosition[qt] && Ve && (e.touchData.singleTouchMoved = !0); if (V && (Xn == null || Xn.pannable()) && le.panningEnabled() && le.userPanningEnabled()) { var Uh = o(Xn, e.touchData.starts); Uh && (E.preventDefault(), e.data.bgActivePosistion || (e.data.bgActivePosistion = Zp(e.touchData.startPosition)), e.swipePanning ? (le.panBy({ x: me[0] * fe, y: me[1] * fe }), le.emit("dragpan")) : Ve && (e.swipePanning = !0, le.panBy({ x: Ce * fe, y: yt * fe }), le.emit("dragpan"), Xn && (Xn.unactivate(), e.redrawHint("select", !0), e.touchData.start = null))); var Ee = e.projectIntoViewport(E.touches[0].clientX, E.touches[0].clientY); re[0] = Ee[0], re[1] = Ee[1]; } } for (var _e = 0; _e < re.length; _e++) ke[_e] = re[_e]; V && E.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 we; e.registerBinding(t, "touchcancel", we = function(E) { var V = e.touchData.start; e.touchData.capture = !1, V && V.unactivate(); }); var Oe, Ne, xe, $e; if (e.registerBinding(t, "touchend", Oe = function(E) { var V = e.touchData.start, ie = e.touchData.capture; if (ie) E.touches.length === 0 && (e.touchData.capture = !1), E.preventDefault(); else return; var le = e.selection; e.swipePanning = !1, e.hoverData.draggingEles = !1; var re = e.cy, ke = re.zoom(), fe = e.touchData.now, Ee = e.touchData.earlier; if (E.touches[0]) { var ze = e.projectIntoViewport(E.touches[0].clientX, E.touches[0].clientY); fe[0] = ze[0], fe[1] = ze[1]; } if (E.touches[1]) { var ze = e.projectIntoViewport(E.touches[1].clientX, E.touches[1].clientY); fe[2] = ze[0], fe[3] = ze[1]; } if (E.touches[2]) { var ze = e.projectIntoViewport(E.touches[2].clientX, E.touches[2].clientY); fe[4] = ze[0], fe[5] = ze[1]; } V && V.unactivate(); var Ve; if (e.touchData.cxt) { if (Ve = { originalEvent: E, type: "cxttapend", position: { x: fe[0], y: fe[1] } }, V ? V.emit(Ve) : re.emit(Ve), !e.touchData.cxtDragged) { var me = { originalEvent: E, type: "cxttap", position: { x: fe[0], y: fe[1] } }; V ? V.emit(me) : re.emit(me); } e.touchData.start && (e.touchData.start._private.grabbed = !1), e.touchData.cxt = !1, e.touchData.start = null, e.redraw(); return; } if (!E.touches[2] && re.boxSelectionEnabled() && e.touchData.selecting) { e.touchData.selecting = !1; var _e = re.collection(e.getAllInBox(le[0], le[1], le[2], le[3])); le[0] = void 0, le[1] = void 0, le[2] = void 0, le[3] = void 0, le[4] = 0, e.redrawHint("select", !0), re.emit({ type: "boxend", originalEvent: E, position: { x: fe[0], y: fe[1] } }); var Ce = function(rn) { return rn.selectable() && !rn.selected(); }; _e.emit("box").stdFilter(Ce).select().emit("boxselect"), _e.nonempty() && e.redrawHint("eles", !0), e.redraw(); } if (V != null && V.unactivate(), E.touches[2]) e.data.bgActivePosistion = void 0, e.redrawHint("select", !0); else if (!E.touches[1] && !E.touches[0] && !E.touches[0]) { e.data.bgActivePosistion = void 0, e.redrawHint("select", !0); var Le = e.dragData.touchDragEles; if (V != null) { var yt = V._private.grabbed; m(Le), e.redrawHint("drag", !0), e.redrawHint("eles", !0), yt && (V.emit("freeon"), Le.emit("free"), e.dragData.didDrag && (V.emit("dragfreeon"), Le.emit("dragfree"))), r(V, ["touchend", "tapend", "vmouseup", "tapdragout"], E, { x: fe[0], y: fe[1] }), V.unactivate(), e.touchData.start = null; } else { var dt = e.findNearestElement(fe[0], fe[1], !0, !0); r(dt, ["touchend", "tapend", "vmouseup", "tapdragout"], E, { x: fe[0], y: fe[1] }); } var _t = e.touchData.startPosition[0] - fe[0], bt = _t * _t, Ct = e.touchData.startPosition[1] - fe[1], nn = Ct * Ct, Dt = bt + nn, Kt = Dt * ke * ke; e.touchData.singleTouchMoved || (V || re.$(":selected").unselect(["tapunselect"]), r(V, ["tap", "vclick"], E, { x: fe[0], y: fe[1] }), Ne = !1, E.timeStamp - $e <= re.multiClickDebounceTime() ? (xe && clearTimeout(xe), Ne = !0, $e = null, r(V, ["dbltap", "vdblclick"], E, { x: fe[0], y: fe[1] })) : (xe = setTimeout(function() { Ne || r(V, ["onetap", "voneclick"], E, { x: fe[0], y: fe[1] }); }, re.multiClickDebounceTime()), $e = E.timeStamp)), V != null && !e.dragData.didDrag && V._private.selectable && Kt < e.touchTapThreshold2 && !e.pinching && (re.selectionType() === "single" ? (re.$(n).unmerge(V).unselect(["tapunselect"]), V.select(["tapselect"])) : V.selected() ? V.unselect(["tapunselect"]) : V.select(["tapselect"]), e.redrawHint("eles", !0)), e.touchData.singleTouchMoved = !0; } for (var on = 0; on < fe.length; on++) Ee[on] = fe[on]; e.dragData.didDrag = !1, E.touches.length === 0 && (e.touchData.dragDelta = [], e.touchData.startPosition = [null, null, null, null, null, null], e.touchData.startGPosition = null, e.touchData.didSelect = !1), E.touches.length < 2 && (E.touches.length === 1 && (e.touchData.startGPosition = [E.touches[0].clientX, E.touches[0].clientY]), e.pinching = !1, e.redrawHint("eles", !0), e.redraw()); }, !1), typeof TouchEvent > "u") { var Se = [], Pe = function(E) { return { clientX: E.clientX, clientY: E.clientY, force: 1, identifier: E.pointerId, pageX: E.pageX, pageY: E.pageY, radiusX: E.width / 2, radiusY: E.height / 2, screenX: E.screenX, screenY: E.screenY, target: E.target }; }, Me = function(E) { return { event: E, touch: Pe(E) }; }, je = function(E) { Se.push(Me(E)); }, Be = function(E) { for (var V = 0; V < Se.length; V++) { var ie = Se[V]; if (ie.event.pointerId === E.pointerId) { Se.splice(V, 1); return; } } }, We = function(E) { var V = Se.filter(function(ie) { return ie.event.pointerId === E.pointerId; })[0]; V.event = E, V.touch = Pe(E); }, qe = function(E) { E.touches = Se.map(function(V) { return V.touch; }); }, Ge = function(E) { return E.pointerType === "mouse" || E.pointerType === 4; }; e.registerBinding(e.container, "pointerdown", function(E) { Ge(E) || (E.preventDefault(), je(E), qe(E), Y(E)); }), e.registerBinding(e.container, "pointerup", function(E) { Ge(E) || (Be(E), qe(E), Oe(E)); }), e.registerBinding(e.container, "pointercancel", function(E) { Ge(E) || (Be(E), qe(E), we(E)); }), e.registerBinding(e.container, "pointermove", function(E) { Ge(E) || (E.preventDefault(), We(E), qe(E), te(E)); }); } }; var zl = {}; zl.generatePolygon = function(e, t) { return this.nodeShapes[e] = { renderer: this, name: e, points: t, draw: function(n, r, a, o, i, s) { this.renderer.nodeShapeImpl("polygon", n, r, a, o, i, this.points); }, intersectLine: function(n, r, a, o, i, s, l, u) { return lg(i, s, this.points, n, r, a / 2, o / 2, l); }, checkPoint: function(n, r, a, o, i, s, l, u) { return El(n, r, this.points, s, l, o, i, [0, -1], a); } }; }; zl.generateEllipse = function() { return this.nodeShapes.ellipse = { renderer: this, name: "ellipse", draw: function(e, t, n, r, a, o) { this.renderer.nodeShapeImpl(this.name, e, t, n, r, a); }, intersectLine: function(e, t, n, r, a, o, i, s) { return iZe(a, o, e, t, n / 2 + i, r / 2 + i); }, checkPoint: function(e, t, n, r, a, o, i, s) { return Xc(e, t, r, a, o, i, n); } }; }; zl.generateRoundPolygon = function(e, t) { return this.nodeShapes[e] = { renderer: this, name: e, points: t, getOrCreateCorners: function(n, r, a, o, 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 = a / 2, c = o / 2; i = i === "auto" ? zU(a, o) : i; for (var d = new Array(t.length / 2), f = 0; f < t.length / 2; f++) d[f] = { x: n + u * t[f * 2], y: r + c * t[f * 2 + 1] }; var h, p, v, m, g = d.length; for (p = d[g - 1], h = 0; h < g; h++) v = d[h % g], m = d[(h + 1) % g], s[l][h] = E_(p, v, m, i), p = v, v = m; return s[l]; }, draw: function(n, r, a, o, i, s, l) { this.renderer.nodeShapeImpl("round-polygon", n, r, a, o, i, this.points, this.getOrCreateCorners(r, a, o, i, s, l, "drawCorners")); }, intersectLine: function(n, r, a, o, i, s, l, u, c) { return sZe(i, s, this.points, n, r, a, o, l, this.getOrCreateCorners(n, r, a, o, u, c, "corners")); }, checkPoint: function(n, r, a, o, i, s, l, u, c) { return oZe(n, r, this.points, s, l, o, i, this.getOrCreateCorners(s, l, o, i, u, c, "corners")); } }; }; zl.generateRoundRectangle = function() { return this.nodeShapes["round-rectangle"] = this.nodeShapes.roundrectangle = { renderer: this, name: "round-rectangle", points: za(4, 0), draw: function(e, t, n, r, a, o) { this.renderer.nodeShapeImpl(this.name, e, t, n, r, a, this.points, o); }, intersectLine: function(e, t, n, r, a, o, i, s) { return DU(a, o, e, t, n, r, i, s); }, checkPoint: function(e, t, n, r, a, o, i, s) { var l = r / 2, u = a / 2; s = s === "auto" ? Bd(r, a) : s, s = Math.min(l, u, s); var c = s * 2; return !!(El(e, t, this.points, o, i, r, a - c, [0, -1], n) || El(e, t, this.points, o, i, r - c, a, [0, -1], n) || Xc(e, t, c, c, o - l + s, i - u + s, n) || Xc(e, t, c, c, o + l - s, i - u + s, n) || Xc(e, t, c, c, o + l - s, i + u - s, n) || Xc(e, t, c, c, o - l + s, i + u - s, n)); } }; }; zl.generateCutRectangle = function() { return this.nodeShapes["cut-rectangle"] = this.nodeShapes.cutrectangle = { renderer: this, name: "cut-rectangle", cornerLength: f_(), points: za(4, 0), draw: function(e, t, n, r, a, o) { this.renderer.nodeShapeImpl(this.name, e, t, n, r, a, null, o); }, generateCutTrianglePts: function(e, t, n, r, a) { var o = a === "auto" ? this.cornerLength : a, i = t / 2, s = e / 2, l = n - s, u = n + s, c = r - i, d = r + i; return { topLeft: [l, c + o, l + o, c, l + o, c + o], topRight: [u - o, c, u, c + o, u - o, c + o], bottomRight: [u, d - o, u - o, d, u - o, d - o], bottomLeft: [l + o, d, l, d - o, l + o, d - o] }; }, intersectLine: function(e, t, n, r, a, o, 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 lg(a, o, u, e, t); }, checkPoint: function(e, t, n, r, a, o, i, s) { var l = s === "auto" ? this.cornerLength : s; if (El(e, t, this.points, o, i, r, a - 2 * l, [0, -1], n) || El(e, t, this.points, o, i, r - 2 * l, a, [0, -1], n)) return !0; var u = this.generateCutTrianglePts(r, a, o, i); return Ja(e, t, u.topLeft) || Ja(e, t, u.topRight) || Ja(e, t, u.bottomRight) || Ja(e, t, u.bottomLeft); } }; }; zl.generateBarrel = function() { return this.nodeShapes.barrel = { renderer: this, name: "barrel", points: za(4, 0), draw: function(e, t, n, r, a, o) { this.renderer.nodeShapeImpl(this.name, e, t, n, r, a); }, intersectLine: function(e, t, n, r, a, o, i, s) { var l = 0.15, u = 0.5, c = 0.85, d = this.generateBarrelBezierPts(n + 2 * i, r + 2 * i, e, t), f = function(p) { var v = lf({ x: p[0], y: p[1] }, { x: p[2], y: p[3] }, { x: p[4], y: p[5] }, l), m = lf({ x: p[0], y: p[1] }, { x: p[2], y: p[3] }, { x: p[4], y: p[5] }, u), g = lf({ x: p[0], y: p[1] }, { x: p[2], y: p[3] }, { x: p[4], y: p[5] }, c); return [p[0], p[1], v.x, v.y, m.x, m.y, g.x, g.y, p[4], p[5]]; }, h = [].concat(f(d.topLeft), f(d.topRight), f(d.bottomRight), f(d.bottomLeft)); return lg(a, o, h, e, t); }, generateBarrelBezierPts: function(e, t, n, r) { var a = t / 2, o = e / 2, i = n - o, s = n + o, l = r - a, u = r + a, c = oS(e, t), d = c.heightOffset, f = c.widthOffset, h = c.ctrlPtOffsetPct * e, p = { topLeft: [i, l + d, i + h, l, i + f, l], topRight: [s - f, l, s - h, l, s, l + d], bottomRight: [s, u - d, s - h, u, s - f, u], bottomLeft: [i + f, u, i + h, u, i, u - d] }; return p.topLeft.isTop = !0, p.topRight.isTop = !0, p.bottomLeft.isBottom = !0, p.bottomRight.isBottom = !0, p; }, checkPoint: function(e, t, n, r, a, o, i, s) { var l = oS(r, a), u = l.heightOffset, c = l.widthOffset; if (El(e, t, this.points, o, i, r, a - 2 * u, [0, -1], n) || El(e, t, this.points, o, i, r - 2 * c, a, [0, -1], n)) return !0; for (var d = this.generateBarrelBezierPts(r, a, o, i), f = function(C, S, _) { var T = _[4], O = _[2], $ = _[0], A = _[5], N = _[1], L = Math.min(T, $), R = Math.max(T, $), P = Math.min(A, N), B = Math.max(A, N); if (L <= C && C <= R && P <= S && S <= B) { var M = lZe(T, O, $), z = tZe(M[0], M[1], M[2], C), Z = z.filter(function(G) { return 0 <= G && G <= 1; }); if (Z.length > 0) return Z[0]; } return null; }, h = Object.keys(d), p = 0; p < h.length; p++) { var v = h[p], m = d[v], g = f(e, t, m); if (g != null) { var y = m[5], x = m[3], w = m[1], k = qr(y, x, w, g); if (m.isTop && k <= t || m.isBottom && t <= k) return !0; } } return !1; } }; }; zl.generateBottomRoundrectangle = function() { return this.nodeShapes["bottom-round-rectangle"] = this.nodeShapes.bottomroundrectangle = { renderer: this, name: "bottom-round-rectangle", points: za(4, 0), draw: function(e, t, n, r, a, o) { this.renderer.nodeShapeImpl(this.name, e, t, n, r, a, this.points, o); }, intersectLine: function(e, t, n, r, a, o, i, s) { var l = e - (n / 2 + i), u = t - (r / 2 + i), c = u, d = e + (n / 2 + i), f = Fu(a, o, e, t, l, u, d, c, !1); return f.length > 0 ? f : DU(a, o, e, t, n, r, i, s); }, checkPoint: function(e, t, n, r, a, o, i, s) { s = s === "auto" ? Bd(r, a) : s; var l = 2 * s; if (El(e, t, this.points, o, i, r, a - l, [0, -1], n) || El(e, t, this.points, o, i, r - l, a, [0, -1], n)) return !0; var u = r / 2 + 2 * n, c = a / 2 + 2 * n, d = [o - u, i - c, o - u, i, o + u, i, o + u, i - c]; return !!(Ja(e, t, d) || Xc(e, t, l, l, o + r / 2 - s, i + a / 2 - s, n) || Xc(e, t, l, l, o - r / 2 + s, i + a / 2 - s, n)); } }; }; zl.registerNodeShapes = function() { var e = this.nodeShapes = {}, t = this; this.generateEllipse(), this.generatePolygon("triangle", za(3, 0)), this.generateRoundPolygon("round-triangle", za(3, 0)), this.generatePolygon("rectangle", za(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", za(5, 0)), this.generateRoundPolygon("round-pentagon", za(5, 0)), this.generatePolygon("hexagon", za(6, 0)), this.generateRoundPolygon("round-hexagon", za(6, 0)), this.generatePolygon("heptagon", za(7, 0)), this.generateRoundPolygon("round-heptagon", za(7, 0)), this.generatePolygon("octagon", za(8, 0)), this.generateRoundPolygon("round-octagon", za(8, 0)); var r = new Array(20); { var a = aS(5, 0), o = aS(5, Math.PI / 5), i = 0.5 * (3 - Math.sqrt(5)); i *= 1.57; for (var s = 0; s < o.length / 2; s++) o[s * 2] *= i, o[s * 2 + 1] *= i; for (var s = 0; s < 20 / 4; s++) r[s * 4] = a[s * 2], r[s * 4 + 1] = a[s * 2 + 1], r[s * 4 + 2] = o[s * 2], r[s * 4 + 3] = o[s * 2 + 1]; } r = RU(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, f; return (f = this[d]) ? f : t.generatePolygon(d, u); }; }; var km = {}; km.timeToRender = function() { return this.redrawTotalTime / this.redrawCount; }; km.redraw = function(e) { e = e || PU(); 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; }; km.beforeRender = function(e, t) { if (!this.destroyed) { t == null && pr("Priority is not optional for beforeRender"); var n = this.beforeRenderCallbacks; n.push({ fn: e, priority: t }), n.sort(function(r, a) { return a.priority - r.priority; }); } }; var gP = function(e, t, n) { for (var r = e.beforeRenderCallbacks, a = 0; a < r.length; a++) r[a].fn(t, n); }; km.startRenderLoop = function() { var e = this, t = e.cy; if (!e.renderLoopStarted) { e.renderLoopStarted = !0; var n = function r(a) { if (!e.destroyed) { if (!t.batching()) if (e.requestedFrame && !e.skipFrame) { gP(e, !0, a); var o = Sl(); e.render(e.renderOptions); var i = e.lastDrawTime = Sl(); e.averageRedrawTime === void 0 && (e.averageRedrawTime = i - o), e.redrawCount === void 0 && (e.redrawCount = 0), e.redrawCount++, e.redrawTotalTime === void 0 && (e.redrawTotalTime = 0); var s = i - o; e.redrawTotalTime += s, e.lastRedrawTime = s, e.averageRedrawTime = e.averageRedrawTime / 2 + s / 2, e.requestedFrame = !1; } else gP(e, !1, a); e.skipFrame = !1, Rb(r); } }; Rb(n); } }; var qtt = function(e) { this.init(e); }, Dq = qtt, jh = Dq.prototype; jh.clientFunctions = ["redrawHint", "render", "renderTo", "matchCanvasSize", "nodeShapeImpl", "arrowShapeImpl"]; jh.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 a = r.document, o = a.head, i = "__________cytoscape_stylesheet", s = "__________cytoscape_container", l = a.getElementById(i) != null; if (n.className.indexOf(s) < 0 && (n.className = (n.className || "") + " " + s), !l) { var u = a.createElement("style"); u.id = i, u.textContent = "." + s + " { position: relative; }", o.insertBefore(u, o.children[0]); } var c = r.getComputedStyle(n), d = c.getPropertyValue("position"); d === "static" && An("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 = it(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(); }; jh.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(); } }; jh.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, a = r.target; (a.off || a.removeEventListener).apply(a, 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 { } }; jh.isHeadless = function() { return !1; }; [S_, Mq, Bq, Vh, zl, km].forEach(function(e) { At(jh, e); }); var oC = 1e3 / 60, Rq = { setupDequeueing: function(e) { return function() { var t = this, n = this.renderer; if (!t.dequeueingSetup) { t.dequeueingSetup = !0; var r = Qw(function() { n.redrawHint("eles", !0), n.redrawHint("drag", !0), n.redraw(); }, e.deqRedrawThreshold), a = function(i, s) { var l = Sl(), u = n.averageRedrawTime, c = n.lastRedrawTime, d = [], f = n.cy.extent(), h = n.getPixelRatio(); for (i || n.flushRenderedStyleQueue(); ; ) { var p = Sl(), v = p - l, m = p - s; if (c < oC) { var g = oC - (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 * oC) break; var y = e.deq(t, h, f); if (y.length > 0) for (var x = 0; x < y.length; x++) d.push(y[x]); else break; } d.length > 0 && (e.onDeqd(t, d), !i && e.shouldRedraw(t, d, h, f) && r()); }, o = e.priority || u_; n.beforeRender(a, o(t)); } }; } }, Wtt = /* @__PURE__ */ function() { function e(t) { var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : zb; a_(this, e), this.idsByKey = new hs(), this.keyForId = new hs(), this.cachesByLvl = new hs(), this.lvls = [], this.getKey = t, this.doesEleInvalidateKey = n; } return o_(e, [{ key: "getIdsFor", value: function(t) { t == null && pr("Can not get id list for null key"); var n = this.idsByKey, r = this.idsByKey.get(t); return r || (r = new Lh(), 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), a = this.getKey(t); this.deleteIdForKey(r, n), this.addIdForKey(a, n), this.keyForId.set(n, a); } }, { 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), a = this.getKey(t); return r !== a; } }, { key: "isInvalid", value: function(t) { return this.keyHasChangedFor(t) || this.doesEleInvalidateKey(t); } }, { key: "getCachesAt", value: function(t) { var n = this.cachesByLvl, r = this.lvls, a = n.get(t); return a || (a = new hs(), n.set(t, a), r.push(t)), a; } }, { key: "getCache", value: function(t, n) { return this.getCachesAt(n).get(t); } }, { key: "get", value: function(t, n) { var r = this.getKey(t), a = this.getCache(r, n); return a != null && this.updateKeyMappingFor(t), a; } }, { key: "getForCachedKey", value: function(t, n) { var r = this.keyForId.get(t.id()), a = this.getCache(r, n); return a; } }, { 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 a = this.getKey(t); this.setCache(a, 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 a = this.doesEleInvalidateKey(t); return a && this.invalidateKey(r), a || this.getNumberOfIdsForKey(r) === 0; } }]), e; }(), mP = 25, V1 = 50, Iy = -4, gS = 3, Ktt = 7.99, Gtt = 8, Xtt = 1024, Ytt = 1024, Ztt = 1024, Qtt = 0.2, Jtt = 0.8, ent = 10, tnt = 0.15, nnt = 0.1, rnt = 0.9, ant = 0.9, ont = 100, int = 1, Qp = { dequeue: "dequeue", downscale: "downscale", highQuality: "highQuality" }, snt = ya({ getKey: null, doesEleInvalidateKey: zb, drawElement: null, getBoundingBox: null, getRotationPoint: null, getRotationOffset: null, isVisible: FU, allowEdgeTxrCaching: !0, allowParentTxrCaching: !0 }), Bv = function(e, t) { var n = this; n.renderer = e, n.onDequeues = []; var r = snt(t); At(n, r), n.lookup = new Wtt(r.getKey, r.doesEleInvalidateKey), n.setupDequeueing(); }, jr = Bv.prototype; jr.reasons = Qp; jr.getTextureQueue = function(e) { var t = this; return t.eleImgCaches = t.eleImgCaches || {}, t.eleImgCaches[e] = t.eleImgCaches[e] || []; }; jr.getRetiredTextureQueue = function(e) { var t = this, n = t.eleImgCaches.retired = t.eleImgCaches.retired || {}, r = n[e] = n[e] || []; return r; }; jr.getElementQueue = function() { var e = this, t = e.eleCacheQueue = e.eleCacheQueue || new ym(function(n, r) { return r.reqs - n.reqs; }); return t; }; jr.getElementKeyToQueue = function() { var e = this, t = e.eleKeyToCacheQueue = e.eleKeyToCacheQueue || {}; return t; }; jr.getElement = function(e, t, n, r, a) { var o = 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() || !o.allowEdgeTxrCaching && e.isEdge() || !o.allowParentTxrCaching && e.isParent()) return null; if (r == null && (r = Math.ceil(d_(s * n))), r < Iy) r = Iy; else if (s >= Ktt || r > gS) return null; var u = Math.pow(2, r), c = t.h * u, d = t.w * u, f = i.eleTextBiggerThanMin(e, u); if (!this.isVisible(e, f)) return null; var h = l.get(e, r); if (h && h.invalidated && (h.invalidated = !1, h.texture.invalidatedWidth -= h.width), h) return h; var p; if (c <= mP ? p = mP : c <= V1 ? p = V1 : p = Math.ceil(c / V1) * V1, c > Ztt || d > Ytt) return null; var v = o.getTextureQueue(p), m = v[v.length - 2], g = function() { return o.recycleTexture(p, d) || o.addTexture(p, d); }; m || (m = v[v.length - 1]), m || (m = g()), m.width - m.usedWidth < d && (m = g()); for (var y = function(R) { return R && R.scaledLabelShown === f; }, x = a && a === Qp.dequeue, w = a && a === Qp.highQuality, k = a && a === Qp.downscale, C, S = r + 1; S <= gS; S++) { var _ = l.get(e, S); if (_) { C = _; break; } } var T = C && C.level === r + 1 ? C : null, O = function() { m.context.drawImage(T.texture.canvas, T.x, 0, T.width, T.height, m.usedWidth, 0, d, c); }; if (m.context.setTransform(1, 0, 0, 1, 0, 0), m.context.clearRect(m.usedWidth, 0, d, p), y(T)) O(); else if (y(C)) if (w) { for (var $ = C.level; $ > r; $--) T = o.getElement(e, t, n, $, Qp.downscale); O(); } else return o.queueElement(e, C.level - 1), C; else { var A; if (!x && !w && !k) for (var N = r - 1; N >= Iy; N--) { var L = l.get(e, N); if (L) { A = L; break; } } if (y(A)) return o.queueElement(e, r), A; m.context.translate(m.usedWidth, 0), m.context.scale(u, u), this.drawElement(m.context, e, t, f, !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: f }, m.usedWidth += Math.ceil(d + Gtt), m.eleCaches.push(h), l.set(e, r, h), o.checkTextureFullness(m), h; }; jr.invalidateElements = function(e) { for (var t = 0; t < e.length; t++) this.invalidateElement(e[t]); }; jr.invalidateElement = function(e) { var t = this, n = t.lookup, r = [], a = n.isInvalid(e); if (a) { for (var o = Iy; o <= gS; o++) { var i = n.getForCachedKey(e, o); 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); } }; jr.checkTextureUtility = function(e) { e.invalidatedWidth >= Qtt * e.width && this.retireTexture(e); }; jr.checkTextureFullness = function(e) { var t = this, n = t.getTextureQueue(e.height); e.usedWidth / e.width > Jtt && e.fullnessChecks >= ent ? ec(n, e) : e.fullnessChecks++; }; jr.retireTexture = function(e) { var t = this, n = e.height, r = t.getTextureQueue(n), a = this.lookup; ec(r, e), e.retired = !0; for (var o = e.eleCaches, i = 0; i < o.length; i++) { var s = o[i]; a.deleteCache(s.key, s.level); } c_(o); var l = t.getRetiredTextureQueue(n); l.push(e); }; jr.addTexture = function(e, t) { var n = this, r = n.getTextureQueue(e), a = {}; return r.push(a), a.eleCaches = [], a.height = e, a.width = Math.max(Xtt, t), a.usedWidth = 0, a.invalidatedWidth = 0, a.fullnessChecks = 0, a.canvas = n.renderer.makeOffscreenCanvas(a.width, a.height), a.context = a.canvas.getContext("2d"), a; }; jr.recycleTexture = function(e, t) { for (var n = this, r = n.getTextureQueue(e), a = n.getRetiredTextureQueue(e), o = 0; o < a.length; o++) { var i = a[o]; if (i.width >= t) return i.retired = !1, i.usedWidth = 0, i.invalidatedWidth = 0, i.fullnessChecks = 0, c_(i.eleCaches), i.context.setTransform(1, 0, 0, 1, 0, 0), i.context.clearRect(0, 0, i.width, i.height), ec(a, i), r.push(i), i; } }; jr.queueElement = function(e, t) { var n = this, r = n.getElementQueue(), a = n.getElementKeyToQueue(), o = this.getKey(e), i = a[o]; 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: o }; r.push(s), a[o] = s; } }; jr.dequeue = function(e) { for (var t = this, n = t.getElementQueue(), r = t.getElementKeyToQueue(), a = [], o = t.lookup, i = 0; i < int && n.size() > 0; i++) { var s = n.pop(), l = s.key, u = s.eles[0], c = o.hasCache(u, s.level); if (r[l] = null, !c) { a.push(s); var d = t.getBoundingBox(u); t.getElement(u, d, e, s.level, Qp.dequeue); } } return a; }; jr.removeFromQueue = function(e) { var t = this, n = t.getElementQueue(), r = t.getElementKeyToQueue(), a = this.getKey(e), o = r[a]; o != null && (o.eles.length === 1 ? (o.reqs = l_, n.updateItem(o), n.pop(), r[a] = null) : o.eles.unmerge(e)); }; jr.onDequeue = function(e) { this.onDequeues.push(e); }; jr.offDequeue = function(e) { ec(this.onDequeues, e); }; jr.setupDequeueing = Rq.setupDequeueing({ deqRedrawThreshold: ont, deqCost: tnt, deqAvgCost: nnt, deqNoDrawCost: rnt, deqFastCost: ant, 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 a = 0; a < t.length; a++) for (var o = t[a].eles, i = 0; i < o.length; i++) { var s = o[i].boundingBox(); if (p_(s, r)) return !0; } return !1; }, priority: function(e) { return e.renderer.beforeRenderPriorities.eleTxrDeq; } }); var lnt = 1, o0 = -4, Gb = 2, unt = 3.99, cnt = 50, dnt = 50, pnt = 0.15, fnt = 0.1, hnt = 0.9, vnt = 0.9, gnt = 1, yP = 250, mnt = 4e3 * 4e3, ynt = !0, zq = function(e) { var t = this, n = t.renderer = e, r = n.cy; t.layersByLevel = {}, t.firstGet = !0, t.lastInvalidationTime = Sl() - 2 * yP, t.skipping = !1, t.eleTxrDeqs = r.collection(), t.scheduleElementRefinement = Qw(function() { t.refineElementTextures(t.eleTxrDeqs), t.eleTxrDeqs.unmerge(t.eleTxrDeqs); }, dnt), n.beforeRender(function(o, i) { i - t.lastInvalidationTime <= yP ? t.skipping = !0 : t.skipping = !1; }, n.beforeRenderPriorities.lyrTxrSkip); var a = function(o, i) { return i.reqs - o.reqs; }; t.layersQueue = new ym(a), t.setupDequeueing(); }, ba = zq.prototype, bP = 0, bnt = Math.pow(2, 53) - 1; ba.makeLayer = function(e, t) { var n = Math.pow(2, t), r = Math.ceil(e.w * n), a = Math.ceil(e.h * n), o = this.renderer.makeOffscreenCanvas(r, a), i = { id: bP = ++bP % bnt, bb: e, level: t, width: r, height: a, canvas: o, context: o.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; }; ba.getLayers = function(e, t, n) { var r = this, a = r.renderer, o = a.cy, i = o.zoom(), s = r.firstGet; if (r.firstGet = !1, n == null) { if (n = Math.ceil(d_(i * t)), n < o0) n = o0; else if (i >= unt || n > Gb) return null; } r.validateLayersElesOrdering(n, e); var l = r.layersByLevel, u = Math.pow(2, n), c = l[n] = l[n] || [], d, f = r.levelIsComplete(n, e), h, p = function() { var T = function(N) { if (r.validateLayersElesOrdering(N, e), r.levelIsComplete(N, e)) return h = l[N], !0; }, O = function(N) { if (!h) for (var L = n + N; o0 <= L && L <= Gb && !T(L); L += N) ; }; O(1), O(-1); for (var $ = c.length - 1; $ >= 0; $--) { var A = c[$]; A.invalid && ec(c, A); } }; if (!f) p(); else return c; var v = function() { if (!d) { d = xo(); for (var T = 0; T < e.length; T++) MU(d, e[T].boundingBox()); } return d; }, m = function(T) { T = T || {}; var O = T.after; v(); var $ = d.w * u * (d.h * u); if ($ > mnt) return null; var A = r.makeLayer(d, n); if (O != null) { var N = c.indexOf(O) + 1; c.splice(N, 0, A); } else (T.insert === void 0 || T.insert) && c.unshift(A); return A; }; if (r.skipping && !s) return null; for (var g = null, y = e.length / lnt, x = !s, w = 0; w < e.length; w++) { var k = e[w], C = k._private.rscratch, S = C.imgLayerCaches = C.imgLayerCaches || {}, _ = S[n]; if (_) { g = _; continue; } if ((!g || g.eles.length >= y || !BU(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), S[n] = g; } return h || (x ? null : c); }; ba.getEleLevelForLayerLevel = function(e, t) { return e; }; ba.drawEleInLayer = function(e, t, n, r) { var a = this, o = this.renderer, i = e.context, s = t.boundingBox(); s.w === 0 || s.h === 0 || !t.visible() || (n = a.getEleLevelForLayerLevel(n, r), o.setImgSmoothing(i, !1), o.drawCachedElement(i, t, null, null, n, ynt), o.setImgSmoothing(i, !0)); }; ba.levelIsComplete = function(e, t) { var n = this, r = n.layersByLevel[e]; if (!r || r.length === 0) return !1; for (var a = 0, o = 0; o < r.length; o++) { var i = r[o]; if (i.reqs > 0 || i.invalid) return !1; a += i.eles.length; } return a === t.length; }; ba.validateLayersElesOrdering = function(e, t) { var n = this.layersByLevel[e]; if (n) for (var r = 0; r < n.length; r++) { for (var a = n[r], o = -1, i = 0; i < t.length; i++) if (a.eles[0] === t[i]) { o = i; break; } if (o < 0) { this.invalidateLayer(a); continue; } for (var s = o, i = 0; i < a.eles.length; i++) if (a.eles[i] !== t[s + i]) { this.invalidateLayer(a); break; } } }; ba.updateElementsInLayers = function(e, t) { for (var n = this, r = gm(e[0]), a = 0; a < e.length; a++) for (var o = r ? null : e[a], i = r ? e[a] : e[a].ele, s = i._private.rscratch, l = s.imgLayerCaches = s.imgLayerCaches || {}, u = o0; u <= Gb; u++) { var c = l[u]; c && (o && n.getEleLevelForLayerLevel(c.level) !== o.level || t(c, i, o)); } }; ba.haveLayers = function() { for (var e = this, t = !1, n = o0; n <= Gb; n++) { var r = e.layersByLevel[n]; if (r && r.length > 0) { t = !0; break; } } return t; }; ba.invalidateElements = function(e) { var t = this; e.length !== 0 && (t.lastInvalidationTime = Sl(), !(e.length === 0 || !t.haveLayers()) && t.updateElementsInLayers(e, function(n, r, a) { t.invalidateLayer(n); })); }; ba.invalidateLayer = function(e) { if (this.lastInvalidationTime = Sl(), !e.invalid) { var t = e.level, n = e.eles, r = this.layersByLevel[t]; ec(r, e), e.elesQueue = [], e.invalid = !0, e.replacement && (e.replacement.invalid = !0); for (var a = 0; a < n.length; a++) { var o = n[a]._private.rscratch.imgLayerCaches; o && (o[t] = null); } } }; ba.refineElementTextures = function(e) { var t = this; t.updateElementsInLayers(e, function(n, r, a) { var o = n.replacement; if (o || (o = n.replacement = t.makeLayer(n.bb, n.level), o.replaces = n, o.eles = n.eles), !o.reqs) for (var i = 0; i < o.eles.length; i++) t.queueLayer(o, o.eles[i]); }); }; ba.enqueueElementRefinement = function(e) { this.eleTxrDeqs.merge(e), this.scheduleElementRefinement(); }; ba.queueLayer = function(e, t) { var n = this, r = n.layersQueue, a = e.elesQueue, o = a.hasId = a.hasId || {}; if (!e.replacement) { if (t) { if (o[t.id()]) return; a.push(t), o[t.id()] = !0; } e.reqs ? (e.reqs++, r.updateItem(e)) : (e.reqs = 1, r.push(e)); } }; ba.dequeue = function(e) { for (var t = this, n = t.layersQueue, r = [], a = 0; a < gnt && n.size() !== 0; ) { var o = n.peek(); if (o.replacement) { n.pop(); continue; } if (o.replaces && o !== o.replaces.replacement) { n.pop(); continue; } if (o.invalid) { n.pop(); continue; } var i = o.elesQueue.shift(); i && (t.drawEleInLayer(o, i, o.level, e), a++), r.length === 0 && r.push(!0), o.elesQueue.length === 0 && (n.pop(), o.reqs = 0, o.replaces && t.applyLayerReplacement(o), t.requestRedraw()); } return r; }; ba.applyLayerReplacement = function(e) { var t = this, n = t.layersByLevel[e.level], r = e.replaces, a = n.indexOf(r); if (!(a < 0 || r.invalid)) { n[a] = e; for (var o = 0; o < e.eles.length; o++) { var i = e.eles[o]._private, s = i.imgLayerCaches = i.imgLayerCaches || {}; s && (s[e.level] = e); } t.requestRedraw(); } }; ba.requestRedraw = Qw(function() { var e = this.renderer; e.redrawHint("eles", !0), e.redrawHint("drag", !0), e.redraw(); }, 100); ba.setupDequeueing = Rq.setupDequeueing({ deqRedrawThreshold: cnt, deqCost: pnt, deqAvgCost: fnt, deqNoDrawCost: hnt, deqFastCost: vnt, deq: function(e, t) { return e.dequeue(t); }, onDeqd: u_, shouldRedraw: FU, priority: function(e) { return e.renderer.beforeRenderPriorities.lyrTxrDeq; } }); var Vq = {}, wP; function wnt(e, t) { for (var n = 0; n < t.length; n++) { var r = t[n]; e.lineTo(r.x, r.y); } } function xnt(e, t, n) { for (var r, a = 0; a < t.length; a++) { var o = t[a]; a === 0 && (r = o), e.lineTo(o.x, o.y); } e.quadraticCurveTo(n.x, n.y, r.x, r.y); } function xP(e, t, n) { e.beginPath && e.beginPath(); for (var r = t, a = 0; a < r.length; a++) { var o = r[a]; e.lineTo(o.x, o.y); } var i = n, s = n[0]; e.moveTo(s.x, s.y); for (var a = 1; a < i.length; a++) { var o = i[a]; e.lineTo(o.x, o.y); } e.closePath && e.closePath(); } function knt(e, t, n, r, a) { e.beginPath && e.beginPath(), e.arc(n, r, a, 0, Math.PI * 2, !1); var o = t, i = o[0]; e.moveTo(i.x, i.y); for (var s = 0; s < o.length; s++) { var l = o[s]; e.lineTo(l.x, l.y); } e.closePath && e.closePath(); } function Cnt(e, t, n, r) { e.arc(t, n, r, 0, Math.PI * 2, !1); } Vq.arrowShapeImpl = function(e) { return (wP || (wP = { polygon: wnt, "triangle-backcurve": xnt, "triangle-tee": xP, "circle-triangle": knt, "triangle-cross": xP, circle: Cnt }))[e]; }; var zs = {}; zs.drawElement = function(e, t, n, r, a, o) { var i = this; t.isNode() ? i.drawNode(e, t, n, r, a, o) : i.drawEdge(e, t, n, r, a, o); }; zs.drawElementOverlay = function(e, t) { var n = this; t.isNode() ? n.drawNodeOverlay(e, t) : n.drawEdgeOverlay(e, t); }; zs.drawElementUnderlay = function(e, t) { var n = this; t.isNode() ? n.drawNodeUnderlay(e, t) : n.drawEdgeUnderlay(e, t); }; zs.drawCachedElementPortion = function(e, t, n, r, a, o, i, s) { var l = this, u = n.getBoundingBox(t); if (!(u.w === 0 || u.h === 0)) { var c = n.getElement(t, u, r, a, o); if (c != null) { var d = s(l, t); if (d === 0) return; var f = i(l, t), h = u.x1, p = u.y1, v = u.w, m = u.h, g, y, x, w, k; if (f !== 0) { var C = n.getRotationPoint(t); x = C.x, w = C.y, e.translate(x, w), e.rotate(f), k = l.getImgSmoothing(e), k || l.setImgSmoothing(e, !0); var S = n.getRotationOffset(t); g = S.x, y = S.y; } else g = h, y = p; var _; d !== 1 && (_ = e.globalAlpha, e.globalAlpha = _ * d), e.drawImage(c.texture.canvas, c.x, 0, c.width, c.height, g, y, v, m), d !== 1 && (e.globalAlpha = _), f !== 0 && (e.rotate(-f), e.translate(-x, -w), k || l.setImgSmoothing(e, !1)); } else n.drawElement(e, t); } }; var Snt = function() { return 0; }, Ent = function(e, t) { return e.getTextAngle(t, null); }, _nt = function(e, t) { return e.getTextAngle(t, "source"); }, Tnt = function(e, t) { return e.getTextAngle(t, "target"); }, Ont = function(e, t) { return t.effectiveOpacity(); }, iC = function(e, t) { return t.pstyle("text-opacity").pfValue * t.effectiveOpacity(); }; zs.drawCachedElement = function(e, t, n, r, a, o) { var i = this, s = i.data, l = s.eleTxrCache, u = s.lblTxrCache, c = s.slbTxrCache, d = s.tlbTxrCache, f = t.boundingBox(), h = o === !0 ? l.reasons.highQuality : null; if (!(f.w === 0 || f.h === 0 || !t.visible()) && (!r || p_(f, r))) { var p = t.isEdge(), v = t.element()._private.rscratch.badLine; i.drawElementUnderlay(e, t), i.drawCachedElementPortion(e, t, l, n, a, h, Snt, Ont), (!p || !v) && i.drawCachedElementPortion(e, t, u, n, a, h, Ent, iC), p && !v && (i.drawCachedElementPortion(e, t, c, n, a, h, _nt, iC), i.drawCachedElementPortion(e, t, d, n, a, h, Tnt, iC)), i.drawElementOverlay(e, t); } }; zs.drawElements = function(e, t) { for (var n = this, r = 0; r < t.length; r++) { var a = t[r]; n.drawElement(e, a); } }; zs.drawCachedElements = function(e, t, n, r) { for (var a = this, o = 0; o < t.length; o++) { var i = t[o]; a.drawCachedElement(e, i, n, r); } }; zs.drawCachedNodes = function(e, t, n, r) { for (var a = this, o = 0; o < t.length; o++) { var i = t[o]; i.isNode() && a.drawCachedElement(e, i, n, r); } }; zs.drawLayeredElements = function(e, t, n, r) { var a = this, o = a.data.lyrTxrCache.getLayers(t, n); if (o) for (var i = 0; i < o.length; i++) { var s = o[i], l = s.bb; l.w === 0 || l.h === 0 || e.drawImage(s.canvas, l.x1, l.y1, l.w, l.h); } else a.drawCachedElements(e, t, n, r); }; var Vl = {}; Vl.drawEdge = function(e, t, n) { var r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !0, a = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !0, o = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : !0, i = this, s = t._private.rscratch; if (!(o && !t.visible()) && !(s.badLine || s.allpts == null || isNaN(s.allpts[0]))) { var l; n && (l = n, e.translate(-l.x1, -l.y1)); var u = o ? t.pstyle("opacity").value : 1, c = o ? t.pstyle("line-opacity").value : 1, d = t.pstyle("curve-style").value, f = t.pstyle("line-style").value, h = t.pstyle("width").pfValue, p = t.pstyle("line-cap").value, v = t.pstyle("line-outline-width").value, m = t.pstyle("line-outline-color").value, g = u * c, y = u * c, x = function() { var L = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : g; d === "straight-triangle" ? (i.eleStrokeStyle(e, t, L), i.drawEdgeTrianglePath(t, e, s.allpts)) : (e.lineWidth = h, e.lineCap = p, i.eleStrokeStyle(e, t, L), i.drawEdgePath(t, e, s.allpts, f), e.lineCap = "butt"); }, w = function() { var L = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : g; if (e.lineWidth = h + v, e.lineCap = p, v > 0) i.colorStrokeStyle(e, m[0], m[1], m[2], L); else { e.lineCap = "butt"; return; } d === "straight-triangle" ? i.drawEdgeTrianglePath(t, e, s.allpts) : (i.drawEdgePath(t, e, s.allpts, f), e.lineCap = "butt"); }, k = function() { a && i.drawEdgeOverlay(e, t); }, C = function() { a && i.drawEdgeUnderlay(e, t); }, S = function() { var L = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : y; i.drawArrowheads(e, t, L); }, _ = function() { i.drawElementText(e, t, null, r); }; e.lineJoin = "round"; var T = t.pstyle("ghost").value === "yes"; if (T) { var O = t.pstyle("ghost-offset-x").pfValue, $ = t.pstyle("ghost-offset-y").pfValue, A = t.pstyle("ghost-opacity").value, N = g * A; e.translate(O, $), x(N), S(N), e.translate(-O, -$); } else w(); C(), x(), S(), k(), _(), n && e.translate(l.x1, l.y1); } }; var jq = 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 a = this, o = a.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" && !o ? t.lineCap = "butt" : t.lineCap = "round", a.colorStrokeStyle(t, u[0], u[1], u[2], r), a.drawEdgePath(n, t, i.allpts, "solid"); } } }; }; Vl.drawEdgeOverlay = jq("overlay"); Vl.drawEdgeUnderlay = jq("underlay"); Vl.drawEdgePath = function(e, t, n, r) { var a = e._private.rscratch, o = 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("$"), f = a.pathCacheKey && a.pathCacheKey === d; f ? (i = t = a.pathCache, s = !0) : (i = t = new Path2D(), a.pathCacheKey = d, a.pathCache = i); } if (o.setLineDash) switch (r) { case "dotted": o.setLineDash([1, 1]); break; case "dashed": o.setLineDash(u), o.lineDashOffset = c; break; case "solid": o.setLineDash([]); break; } if (!s && !a.badLine) switch (t.beginPath && t.beginPath(), t.moveTo(n[0], n[1]), a.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 p = 2; p + 1 < n.length; p += 2) t.lineTo(n[p], n[p + 1]); break; case "segments": if (a.isRound) { var v = gU(a.roundCorners), m; try { for (v.s(); !(m = v.n()).done; ) { var g = m.value; Aq(t, g); } } catch (x) { v.e(x); } finally { v.f(); } t.lineTo(n[n.length - 2], n[n.length - 1]); } else for (var y = 2; y + 1 < n.length; y += 2) t.lineTo(n[y], n[y + 1]); break; } t = o, l ? t.stroke(i) : t.stroke(), t.setLineDash && t.setLineDash([]); }; Vl.drawEdgeTrianglePath = function(e, t, n) { t.fillStyle = t.strokeStyle; for (var r = e.pstyle("width").pfValue, a = 0; a + 1 < n.length; a += 2) { var o = [n[a + 2] - n[a], n[a + 3] - n[a + 1]], i = Math.sqrt(o[0] * o[0] + o[1] * o[1]), s = [o[1] / i, -o[0] / i], l = [s[0] * r / 2, s[1] * r / 2]; t.beginPath(), t.moveTo(n[a] - l[0], n[a + 1] - l[1]), t.lineTo(n[a] + l[0], n[a + 1] + l[1]), t.lineTo(n[a + 2], n[a + 3]), t.closePath(), t.fill(); } }; Vl.drawArrowheads = function(e, t, n) { var r = t._private.rscratch, a = r.edgeType === "haystack"; a || 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), a || this.drawArrowhead(e, t, "target", r.arrowEndX, r.arrowEndY, r.tgtArrowAngle, n); }; Vl.drawArrowhead = function(e, t, n, r, a, o, i) { if (!(isNaN(r) || r == null || isNaN(a) || a == null || isNaN(o) || o == 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, f = t.pstyle(n + "-arrow-width"), h = f.value === "match-line" ? d : f.pfValue; f.units === "%" && (h *= d); var p = t.pstyle("opacity").value; i === void 0 && (i = p); 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, a, o), 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, a, o); } } }; Vl.drawArrowShape = function(e, t, n, r, a, o, i, s, l) { var u = this, c = this.usePaths() && a !== "triangle-cross", d = !1, f, h = t, p = { x: i, y: s }, v = e.pstyle("arrow-scale").value, m = this.getArrowWidth(r, v), g = u.arrowShapes[a]; if (c) { var y = u.arrowPathCache = u.arrowPathCache || [], x = Nd(a), w = y[x]; w != null ? (f = t = w, d = !0) : (f = t = new Path2D(), y[x] = f); } d || (t.beginPath && t.beginPath(), c ? g.draw(t, 1, 0, { x: 0, y: 0 }, 1) : g.draw(t, m, l, p, 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(f) : t.fill()), (n === "hollow" || n === "both") && (t.lineWidth = o / (c ? m : 1), t.lineJoin = "miter", c ? t.stroke(f) : t.stroke()), c && (t.scale(1 / m, 1 / m), t.rotate(-l), t.translate(-i, -s)); }; var T_ = {}; T_.safeDrawImage = function(e, t, n, r, a, o, i, s, l, u) { if (!(a <= 0 || o <= 0 || l <= 0 || u <= 0)) try { e.drawImage(t, n, r, a, o, i, s, l, u); } catch (c) { An(c); } }; T_.drawInscribedImage = function(e, t, n, r, a) { var o = 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), f = c(n, "background-repeat", "value", r), h = n.width(), p = n.height(), v = n.padding() * 2, m = h + (c(n, "background-width-relative-to", "value", r) === "inner" ? 0 : v), g = p + (c(n, "background-height-relative-to", "value", r) === "inner" ? 0 : v), y = n._private.rscratch, x = c(n, "background-clip", "value", r), w = x === "node", k = c(n, "background-image-opacity", "value", r) * a, C = c(n, "background-image-smoothing", "value", r), S = n.pstyle("corner-radius").value; S !== "auto" && (S = n.pstyle("corner-radius").pfValue); var _ = t.width || t.cachedW, T = t.height || t.cachedH; (_ == null || T == null) && (document.body.appendChild(t), _ = t.cachedW = t.width || t.offsetWidth, T = t.cachedH = t.height || t.offsetHeight, document.body.removeChild(t)); var O = _, $ = T; if (c(n, "background-width", "value", r) !== "auto" && (c(n, "background-width", "units", r) === "%" ? O = c(n, "background-width", "pfValue", r) * m : O = c(n, "background-width", "pfValue", r)), c(n, "background-height", "value", r) !== "auto" && (c(n, "background-height", "units", r) === "%" ? $ = c(n, "background-height", "pfValue", r) * g : $ = c(n, "background-height", "pfValue", r)), !(O === 0 || $ === 0)) { if (d === "contain") { var A = Math.min(m / O, g / $); O *= A, $ *= A; } else if (d === "cover") { var A = Math.max(m / O, g / $); O *= A, $ *= A; } var N = s - m / 2, L = c(n, "background-position-x", "units", r), R = c(n, "background-position-x", "pfValue", r); L === "%" ? N += (m - O) * R : N += R; var P = c(n, "background-offset-x", "units", r), B = c(n, "background-offset-x", "pfValue", r); P === "%" ? N += (m - O) * B : N += B; var M = l - g / 2, z = c(n, "background-position-y", "units", r), Z = c(n, "background-position-y", "pfValue", r); z === "%" ? M += (g - $) * Z : M += Z; var G = c(n, "background-offset-y", "units", r), J = c(n, "background-offset-y", "pfValue", r); G === "%" ? M += (g - $) * J : M += J, y.pathCache && (N -= s, M -= l, s = 0, l = 0); var se = e.globalAlpha; e.globalAlpha = k; var ve = o.getImgSmoothing(e), ge = !1; if (C === "no" && ve ? (o.setImgSmoothing(e, !1), ge = !0) : C === "yes" && !ve && (o.setImgSmoothing(e, !0), ge = !0), f === "no-repeat") w && (e.save(), y.pathCache ? e.clip(y.pathCache) : (o.nodeShapes[o.getNodeShape(n)].draw(e, s, l, m, g, S, y), e.clip())), o.safeDrawImage(e, t, 0, 0, _, T, N, M, O, $), w && e.restore(); else { var oe = e.createPattern(t, f); e.fillStyle = oe, o.nodeShapes[o.getNodeShape(n)].draw(e, s, l, m, g, S, y), e.translate(N, M), e.fill(), e.translate(-N, -M); } e.globalAlpha = se, ge && o.setImgSmoothing(e, ve); } }; var pp = {}; pp.eleTextBiggerThanMin = function(e, t) { if (!t) { var n = e.cy().zoom(), r = this.getPixelRatio(), a = Math.ceil(d_(n * r)); t = Math.pow(2, a); } var o = e.pstyle("font-size").pfValue * t, i = e.pstyle("min-zoomed-font-size").pfValue; return !(o < i); }; pp.drawElementText = function(e, t, n, r, a) { var o = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : !0, i = this; if (r == null) { if (o && !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"), f = t.pstyle("target-label"); if (u || (!c || !c.value) && (!d || !d.value) && (!f || !f.value)) return; e.textAlign = "center", e.textBaseline = "bottom"; } var h = !n, p; n && (p = n, e.translate(-p.x1, -p.y1)), a == null ? (i.drawText(e, t, null, h, o), t.isEdge() && (i.drawText(e, t, "source", h, o), i.drawText(e, t, "target", h, o))) : i.drawText(e, t, a, h, o), n && e.translate(p.x1, p.y1); }; pp.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; }; pp.setupTextStyle = function(e, t) { var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !0, r = t.pstyle("font-style").strValue, a = t.pstyle("font-size").pfValue + "px", o = 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 + " " + a + " " + o, e.lineJoin = "round", this.colorFillStyle(e, u[0], u[1], u[2], s), this.colorStrokeStyle(e, c[0], c[1], c[2], l); }; function sC(e, t, n, r, a) { var o = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : 5, i = arguments.length > 6 ? arguments[6] : void 0; e.beginPath(), e.moveTo(t + o, n), e.lineTo(t + r - o, n), e.quadraticCurveTo(t + r, n, t + r, n + o), e.lineTo(t + r, n + a - o), e.quadraticCurveTo(t + r, n + a, t + r - o, n + a), e.lineTo(t + o, n + a), e.quadraticCurveTo(t, n + a, t, n + a - o), e.lineTo(t, n + o), e.quadraticCurveTo(t, n, t + o, n), e.closePath(), i ? e.stroke() : e.fill(); } pp.getTextAngle = function(e, t) { var n, r = e._private, a = r.rscratch, o = t ? t + "-" : "", i = e.pstyle(o + "text-rotation"), s = Li(a, "labelAngle", t); return i.strValue === "autorotate" ? n = e.isEdge() ? s : 0 : i.strValue === "none" ? n = 0 : n = i.pfValue, n; }; pp.drawText = function(e, t, n) { var r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !0, a = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !0, o = t._private, i = o.rscratch, s = a ? t.effectiveOpacity() : 1; if (!(a && (s === 0 || t.pstyle("text-opacity").value === 0))) { n === "main" && (n = null); var l = Li(i, "labelX", n), u = Li(i, "labelY", n), c, d, f = this.getLabelText(t, n); if (f != null && f !== "" && !isNaN(l) && !isNaN(u)) { this.setupTextStyle(e, t, a); var h = n ? n + "-" : "", p = Li(i, "labelWidth", n), v = Li(i, "labelHeight", n), m = t.pstyle(h + "text-margin-x").pfValue, g = t.pstyle(h + "text-margin-y").pfValue, y = t.isEdge(), x = t.pstyle("text-halign").value, w = t.pstyle("text-valign").value; y && (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, S = t.pstyle("text-border-opacity").value, _ = t.pstyle("text-border-width").pfValue, T = t.pstyle("text-background-padding").pfValue, O = t.pstyle("text-background-shape").strValue, $ = O.indexOf("round") === 0, A = 2; if (C > 0 || _ > 0 && S > 0) { var N = l - T; switch (x) { case "left": N -= p; break; case "center": N -= p / 2; break; } var L = u - v - T, R = p + 2 * T, P = v + 2 * T; if (C > 0) { var B = e.fillStyle, M = t.pstyle("text-background-color").value; e.fillStyle = "rgba(" + M[0] + "," + M[1] + "," + M[2] + "," + C * s + ")", $ ? sC(e, N, L, R, P, A) : e.fillRect(N, L, R, P), e.fillStyle = B; } if (_ > 0 && S > 0) { var z = e.strokeStyle, Z = e.lineWidth, G = t.pstyle("text-border-color").value, J = t.pstyle("text-border-style").value; if (e.strokeStyle = "rgba(" + G[0] + "," + G[1] + "," + G[2] + "," + S * s + ")", e.lineWidth = _, e.setLineDash) switch (J) { 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 ($ ? sC(e, N, L, R, P, A, "stroke") : e.strokeRect(N, L, R, P), J === "double") { var se = _ / 2; $ ? sC(e, N + se, L + se, R - se * 2, P - se * 2, A, "stroke") : e.strokeRect(N + se, L + se, R - se * 2, P - se * 2); } e.setLineDash && e.setLineDash([]), e.lineWidth = Z, e.strokeStyle = z; } } var ve = 2 * t.pstyle("text-outline-width").pfValue; if (ve > 0 && (e.lineWidth = ve), t.pstyle("text-wrap").value === "wrap") { var ge = Li(i, "labelWrapCachedLines", n), oe = Li(i, "labelLineHeight", n), ee = p / 2, q = this.getLabelJustification(t); switch (q === "auto" || (x === "left" ? q === "left" ? l += -p : q === "center" && (l += -ee) : x === "center" ? q === "left" ? l += -ee : q === "right" && (l += ee) : x === "right" && (q === "center" ? l += ee : q === "right" && (l += p))), w) { case "top": u -= (ge.length - 1) * oe; break; case "center": case "bottom": u -= (ge.length - 1) * oe; break; } for (var Y = 0; Y < ge.length; Y++) ve > 0 && e.strokeText(ge[Y], l, u), e.fillText(ge[Y], l, u), u += oe; } else ve > 0 && e.strokeText(f, l, u), e.fillText(f, l, u); k !== 0 && (e.rotate(-k), e.translate(-c, -d)); } } }; var Hh = {}; Hh.drawNode = function(e, t, n) { var r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !0, a = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !0, o = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : !0, i = this, s, l, u = t._private, c = u.rscratch, d = t.position(); if (!(!it(d.x) || !it(d.y)) && !(o && !t.visible())) { var f = o ? t.effectiveOpacity() : 1, h = i.usePaths(), p, 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 y = t.pstyle("background-image"), x = y.value, w = new Array(x.length), k = new Array(x.length), C = 0, S = 0; S < x.length; S++) { var _ = x[S], T = w[S] = _ != null && _ !== "none"; if (T) { var O = t.cy().style().getIndexedStyle(t, "background-image-crossorigin", "value", S); C++, k[S] = i.getCachedImage(_, O, function() { u.backgroundTimestamp = Date.now(), t.emitAndNotify("background"); }); } } var $ = t.pstyle("background-blacken").value, A = t.pstyle("border-width").pfValue, N = t.pstyle("background-opacity").value * f, L = t.pstyle("border-color").value, R = t.pstyle("border-style").value, P = t.pstyle("border-join").value, B = t.pstyle("border-cap").value, M = t.pstyle("border-position").value, z = t.pstyle("border-dash-pattern").pfValue, Z = t.pstyle("border-dash-offset").pfValue, G = t.pstyle("border-opacity").value * f, J = t.pstyle("outline-width").pfValue, se = t.pstyle("outline-color").value, ve = t.pstyle("outline-style").value, ge = t.pstyle("outline-opacity").value * f, oe = t.pstyle("outline-offset").value, ee = t.pstyle("corner-radius").value; ee !== "auto" && (ee = t.pstyle("corner-radius").pfValue); var q = function() { var ke = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : N; i.eleFillStyle(e, t, ke); }, Y = function() { var ke = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : G; i.colorStrokeStyle(e, L[0], L[1], L[2], ke); }, te = function() { var ke = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : ge; i.colorStrokeStyle(e, se[0], se[1], se[2], ke); }, we = function(ke, fe, Ee, ze) { var Ve = i.nodePathCache = i.nodePathCache || [], me = $U(Ee === "polygon" ? Ee + "," + ze.join(",") : Ee, "" + fe, "" + ke, "" + ee), _e = Ve[me], Ce, Le = !1; return _e != null ? (Ce = _e, Le = !0, c.pathCache = Ce) : (Ce = new Path2D(), Ve[me] = c.pathCache = Ce), { path: Ce, cacheHit: Le }; }, Oe = t.pstyle("shape").strValue, Ne = t.pstyle("shape-polygon-points").pfValue; if (h) { e.translate(d.x, d.y); var xe = we(s, l, Oe, Ne); p = xe.path, v = xe.cacheHit; } var $e = function() { if (!v) { var ke = d; h && (ke = { x: 0, y: 0 }), i.nodeShapes[i.getNodeShape(t)].draw(p || e, ke.x, ke.y, s, l, ee, c); } h ? e.fill(p) : e.fill(); }, Se = function() { for (var ke = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : f, fe = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, Ee = u.backgrounding, ze = 0, Ve = 0; Ve < k.length; Ve++) { var me = t.cy().style().getIndexedStyle(t, "background-image-containment", "value", Ve); if (fe && me === "over" || !fe && me === "inside") { ze++; continue; } w[Ve] && k[Ve].complete && !k[Ve].error && (ze++, i.drawInscribedImage(e, k[Ve], t, Ve, ke)); } u.backgrounding = ze !== C, Ee !== u.backgrounding && t.updateStyle(!1); }, Pe = function() { var ke = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1, fe = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : f; i.hasPie(t) && (i.drawPie(e, t, fe), ke && (h || i.nodeShapes[i.getNodeShape(t)].draw(e, d.x, d.y, s, l, ee, c))); }, Me = function() { var ke = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : f, fe = ($ > 0 ? $ : -$) * ke, Ee = $ > 0 ? 0 : 255; $ !== 0 && (i.colorFillStyle(e, Ee, Ee, Ee, fe), h ? e.fill(p) : e.fill()); }, je = function() { if (A > 0) { if (e.lineWidth = A, e.lineCap = B, e.lineJoin = P, e.setLineDash) switch (R) { case "dotted": e.setLineDash([1, 1]); break; case "dashed": e.setLineDash(z), e.lineDashOffset = Z; break; case "solid": case "double": e.setLineDash([]); break; } if (M !== "center") { if (e.save(), e.lineWidth *= 2, M === "inside") h ? e.clip(p) : e.clip(); else { var ke = new Path2D(); ke.rect(-s / 2 - A, -l / 2 - A, s + 2 * A, l + 2 * A), ke.addPath(p), e.clip(ke, "evenodd"); } h ? e.stroke(p) : e.stroke(), e.restore(); } else h ? e.stroke(p) : e.stroke(); if (R === "double") { e.lineWidth = A / 3; var fe = e.globalCompositeOperation; e.globalCompositeOperation = "destination-out", h ? e.stroke(p) : e.stroke(), e.globalCompositeOperation = fe; } e.setLineDash && e.setLineDash([]); } }, Be = function() { if (J > 0) { if (e.lineWidth = J, e.lineCap = "butt", e.setLineDash) switch (ve) { case "dotted": e.setLineDash([1, 1]); break; case "dashed": e.setLineDash([4, 2]); break; case "solid": case "double": e.setLineDash([]); break; } var ke = d; h && (ke = { x: 0, y: 0 }); var fe = i.getNodeShape(t), Ee = A; M === "inside" && (Ee = 0), M === "outside" && (Ee *= 2); var ze = (s + Ee + (J + oe)) / s, Ve = (l + Ee + (J + oe)) / l, me = s * ze, _e = l * Ve, Ce = i.nodeShapes[fe].points, Le; if (h) { var yt = we(me, _e, fe, Ce); Le = yt.path; } if (fe === "ellipse") i.drawEllipsePath(Le || e, ke.x, ke.y, me, _e); else if (["round-diamond", "round-heptagon", "round-hexagon", "round-octagon", "round-pentagon", "round-polygon", "round-triangle", "round-tag"].includes(fe)) { var dt = 0, _t = 0, bt = 0; fe === "round-diamond" ? dt = (Ee + oe + J) * 1.4 : fe === "round-heptagon" ? (dt = (Ee + oe + J) * 1.075, bt = -(Ee / 2 + oe + J) / 35) : fe === "round-hexagon" ? dt = (Ee + oe + J) * 1.12 : fe === "round-pentagon" ? (dt = (Ee + oe + J) * 1.13, bt = -(Ee / 2 + oe + J) / 15) : fe === "round-tag" ? (dt = (Ee + oe + J) * 1.12, _t = (Ee / 2 + J + oe) * 0.07) : fe === "round-triangle" && (dt = (Ee + oe + J) * (Math.PI / 2), bt = -(Ee + oe / 2 + J) / Math.PI), dt !== 0 && (ze = (s + dt) / s, me = s * ze, ["round-hexagon", "round-tag"].includes(fe) || (Ve = (l + dt) / l, _e = l * Ve)), ee = ee === "auto" ? zU(me, _e) : ee; for (var Ct = me / 2, nn = _e / 2, Dt = ee + (Ee + J + oe) / 2, Kt = new Array(Ce.length / 2), on = new Array(Ce.length / 2), rn = 0; rn < Ce.length / 2; rn++) Kt[rn] = { x: ke.x + _t + Ct * Ce[rn * 2], y: ke.y + bt + nn * Ce[rn * 2 + 1] }; var Qt, Sn, En, pn, St = Kt.length; for (Sn = Kt[St - 1], Qt = 0; Qt < St; Qt++) En = Kt[Qt % St], pn = Kt[(Qt + 1) % St], on[Qt] = E_(Sn, En, pn, Dt), Sn = En, En = pn; i.drawRoundPolygonPath(Le || e, ke.x + _t, ke.y + bt, s * ze, l * Ve, Ce, on); } else if (["roundrectangle", "round-rectangle"].includes(fe)) ee = ee === "auto" ? Bd(me, _e) : ee, i.drawRoundRectanglePath(Le || e, ke.x, ke.y, me, _e, ee + (Ee + J + oe) / 2); else if (["cutrectangle", "cut-rectangle"].includes(fe)) ee = ee === "auto" ? f_() : ee, i.drawCutRectanglePath(Le || e, ke.x, ke.y, me, _e, null, ee + (Ee + J + oe) / 4); else if (["bottomroundrectangle", "bottom-round-rectangle"].includes(fe)) ee = ee === "auto" ? Bd(me, _e) : ee, i.drawBottomRoundRectanglePath(Le || e, ke.x, ke.y, me, _e, ee + (Ee + J + oe) / 2); else if (fe === "barrel") i.drawBarrelPath(Le || e, ke.x, ke.y, me, _e); else if (fe.startsWith("polygon") || ["rhomboid", "right-rhomboid", "round-tag", "tag", "vee"].includes(fe)) { var Rt = (Ee + J + oe) / s; Ce = Vb(jb(Ce, Rt)), i.drawPolygonPath(Le || e, ke.x, ke.y, s, l, Ce); } else { var qt = (Ee + J + oe) / s; Ce = Vb(jb(Ce, -qt)), i.drawPolygonPath(Le || e, ke.x, ke.y, s, l, Ce); } if (h ? e.stroke(Le) : e.stroke(), ve === "double") { e.lineWidth = Ee / 3; var _n = e.globalCompositeOperation; e.globalCompositeOperation = "destination-out", h ? e.stroke(Le) : e.stroke(), e.globalCompositeOperation = _n; } e.setLineDash && e.setLineDash([]); } }, We = function() { a && i.drawNodeOverlay(e, t, d, s, l); }, qe = function() { a && i.drawNodeUnderlay(e, t, d, s, l); }, Ge = function() { i.drawElementText(e, t, null, r); }, E = t.pstyle("ghost").value === "yes"; if (E) { var V = t.pstyle("ghost-offset-x").pfValue, ie = t.pstyle("ghost-offset-y").pfValue, le = t.pstyle("ghost-opacity").value, re = le * f; e.translate(V, ie), te(), Be(), q(le * N), $e(), Se(re, !0), Y(le * G), je(), Pe($ !== 0 || A !== 0), Se(re, !1), Me(re), e.translate(-V, -ie); } h && e.translate(-d.x, -d.y), qe(), h && e.translate(d.x, d.y), te(), Be(), q(), $e(), Se(f, !0), Y(), je(), Pe($ !== 0 || A !== 0), Se(f, !1), Me(), h && e.translate(-d.x, -d.y), Ge(), We(), n && e.translate(g.x1, g.y1); } }; var Hq = function(e) { if (!["overlay", "underlay"].includes(e)) throw new Error("Invalid state"); return function(t, n, r, a, o) { 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(), a == null || o == null) { var f = n.padding(); a = n.width() + 2 * f, o = n.height() + 2 * f; } i.colorFillStyle(t, u[0], u[1], u[2], l), i.nodeShapes[c].draw(t, r.x, r.y, a + s * 2, o + s * 2, d), t.fill(); } } }; }; Hh.drawNodeOverlay = Hq("overlay"); Hh.drawNodeUnderlay = Hq("underlay"); Hh.hasPie = function(e) { return e = e[0], e._private.hasPie; }; Hh.drawPie = function(e, t, n, r) { t = t[0], r = r || t.position(); var a = t.cy().style(), o = t.pstyle("pie-size"), i = r.x, s = r.y, l = t.width(), u = t.height(), c = Math.min(l, u) / 2, d = 0, f = this.usePaths(); f && (i = 0, s = 0), o.units === "%" ? c = c * o.pfValue : o.pfValue !== void 0 && (c = o.pfValue / 2); for (var h = 1; h <= a.pieBackgroundN; h++) { var p = 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 = p / 100; g + d > 1 && (g = 1 - d); var y = 1.5 * Math.PI + 2 * Math.PI * d, x = 2 * Math.PI * g, w = y + x; p === 0 || d >= 1 || d + g > 1 || (e.beginPath(), e.moveTo(i, s), e.arc(i, s, c, y, w), e.closePath(), this.colorFillStyle(e, v[0], v[1], v[2], m), e.fill(), d += g); } }; var Ro = {}, $nt = 100; Ro.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; }; Ro.paintCache = function(e) { for (var t = this.paintCaches = this.paintCaches || [], n = !0, r, a = 0; a < t.length; a++) if (r = t[a], r.context === e) { n = !1; break; } return n && (r = { context: e }, t.push(r)), r; }; Ro.createGradientStyleFor = function(e, t, n, r, a) { var o, 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(), f = Md(u, d), h = Md(c, d); o = e.createRadialGradient(d.x, d.y, 0, d.x, d.y, Math.max(f, h)); } else { var p = i ? { x: 0, y: 0 } : n.position(), v = n.paddedWidth(), m = n.paddedHeight(); o = e.createRadialGradient(p.x, p.y, 0, p.x, p.y, Math.max(v, m)); } else if (n.isEdge()) { var g = n.sourceEndpoint(), y = n.targetEndpoint(); o = e.createLinearGradient(g.x, g.y, y.x, y.y); } else { var x = i ? { x: 0, y: 0 } : n.position(), w = n.paddedWidth(), k = n.paddedHeight(), C = w / 2, S = k / 2, _ = n.pstyle("background-gradient-direction").value; switch (_) { case "to-bottom": o = e.createLinearGradient(x.x, x.y - S, x.x, x.y + S); break; case "to-top": o = e.createLinearGradient(x.x, x.y + S, x.x, x.y - S); break; case "to-left": o = e.createLinearGradient(x.x + C, x.y, x.x - C, x.y); break; case "to-right": o = e.createLinearGradient(x.x - C, x.y, x.x + C, x.y); break; case "to-bottom-right": case "to-right-bottom": o = e.createLinearGradient(x.x - C, x.y - S, x.x + C, x.y + S); break; case "to-top-right": case "to-right-top": o = e.createLinearGradient(x.x - C, x.y + S, x.x + C, x.y - S); break; case "to-bottom-left": case "to-left-bottom": o = e.createLinearGradient(x.x + C, x.y - S, x.x - C, x.y + S); break; case "to-top-left": case "to-left-top": o = e.createLinearGradient(x.x + C, x.y + S, x.x - C, x.y - S); break; } } if (!o) return null; for (var T = l.length === s.length, O = s.length, $ = 0; $ < O; $++) o.addColorStop(T ? l[$] : $ / (O - 1), "rgba(" + s[$][0] + "," + s[$][1] + "," + s[$][2] + "," + a + ")"); return o; }; Ro.gradientFillStyle = function(e, t, n, r) { var a = this.createGradientStyleFor(e, "background", t, n, r); if (!a) return null; e.fillStyle = a; }; Ro.colorFillStyle = function(e, t, n, r, a) { e.fillStyle = "rgba(" + t + "," + n + "," + r + "," + a + ")"; }; Ro.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 a = t.pstyle("background-color").value; this.colorFillStyle(e, a[0], a[1], a[2], n); } }; Ro.gradientStrokeStyle = function(e, t, n, r) { var a = this.createGradientStyleFor(e, "line", t, n, r); if (!a) return null; e.strokeStyle = a; }; Ro.colorStrokeStyle = function(e, t, n, r, a) { e.strokeStyle = "rgba(" + t + "," + n + "," + r + "," + a + ")"; }; Ro.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 a = t.pstyle("line-color").value; this.colorStrokeStyle(e, a[0], a[1], a[2], n); } }; Ro.matchCanvasSize = function(e) { var t = this, n = t.data, r = t.findContainerClientCoords(), a = r[2], o = 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 = a * i, u = o * i, c; if (!(l === t.canvasWidth && u === t.canvasHeight)) { t.fontCaches = null; var d = n.canvasContainer; d.style.width = a + "px", d.style.height = o + "px"; for (var f = 0; f < t.CANVAS_LAYERS; f++) c = n.canvases[f], c.width = l, c.height = u, c.style.width = a + "px", c.style.height = o + "px"; for (var f = 0; f < t.BUFFER_COUNT; f++) c = n.bufferCanvases[f], c.width = l, c.height = u, c.style.width = a + "px", c.style.height = o + "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; } }; Ro.renderTo = function(e, t, n, r) { this.render({ forcedContext: e, forcedZoom: t, forcedPan: n, drawAllLayers: !0, forcedPxRatio: r }); }; Ro.render = function(e) { e = e || PU(); var t = e.forcedContext, n = e.drawAllLayers, r = e.drawOnlyNodeLayer, a = e.forcedZoom, o = 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), f = e.motionBlur !== void 0 ? e.motionBlur : i.motionBlur, h = i.motionBlurPxRatio, p = l.hasCompoundNodes(), v = i.hoverData.draggingEles, m = !!(i.hoverData.selecting || i.touchData.selecting); f = f && !t && i.motionBlurEnabled && !m; var g = f; 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), f && (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 y = l.style(), x = l.zoom(), w = a !== void 0 ? a : x, k = l.pan(), C = { x: k.x, y: k.y }, S = { zoom: x, pan: { x: k.x, y: k.y } }, _ = i.prevViewport, T = _ === void 0 || S.zoom !== _.zoom || S.pan.x !== _.pan.x || S.pan.y !== _.pan.y; !T && !(v && !p) && (i.motionBlurPxRatio = 1), o && (C = o), w *= s, C.x *= s, C.y *= s; var O = i.getCachedZSortedEles(); function $(xe, $e, Se, Pe, Me) { var je = xe.globalCompositeOperation; xe.globalCompositeOperation = "destination-out", i.colorFillStyle(xe, 255, 255, 255, i.motionBlurTransparency), xe.fillRect($e, Se, Pe, Me), xe.globalCompositeOperation = je; } function A(xe, $e) { var Se, Pe, Me, je; !i.clearingMotionBlur && (xe === u.bufferContexts[i.MOTIONBLUR_BUFFER_NODE] || xe === u.bufferContexts[i.MOTIONBLUR_BUFFER_DRAG]) ? (Se = { x: k.x * h, y: k.y * h }, Pe = x * h, Me = i.canvasWidth * h, je = i.canvasHeight * h) : (Se = C, Pe = w, Me = i.canvasWidth, je = i.canvasHeight), xe.setTransform(1, 0, 0, 1, 0, 0), $e === "motionBlur" ? $(xe, 0, 0, Me, je) : !t && ($e === void 0 || $e) && xe.clearRect(0, 0, Me, je), n || (xe.translate(Se.x, Se.y), xe.scale(Pe, Pe)), o && xe.translate(o.x, o.y), a && xe.scale(a, a); } 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 N = i.data.bufferContexts[i.TEXTURE_BUFFER]; N.setTransform(1, 0, 0, 1, 0, 0), N.clearRect(0, 0, i.canvasWidth * i.textureMult, i.canvasHeight * i.textureMult), i.render({ forcedContext: N, drawOnlyNodeLayer: !0, forcedPxRatio: s * i.textureMult }); var S = i.textureCache.viewport = { zoom: l.zoom(), pan: l.pan(), width: i.canvasWidth, height: i.canvasHeight }; S.mpan = { x: (0 - S.pan.x) / S.zoom, y: (0 - S.pan.y) / S.zoom }; } c[i.DRAG] = !1, c[i.NODE] = !1; var L = u.contexts[i.NODE], R = i.textureCache.texture, S = i.textureCache.viewport; L.setTransform(1, 0, 0, 1, 0, 0), f ? $(L, 0, 0, S.width, S.height) : L.clearRect(0, 0, S.width, S.height); var P = y.core("outside-texture-bg-color").value, B = y.core("outside-texture-bg-opacity").value; i.colorFillStyle(L, P[0], P[1], P[2], B), L.fillRect(0, 0, S.width, S.height); var x = l.zoom(); A(L, !1), L.clearRect(S.mpan.x, S.mpan.y, S.width / S.zoom / s, S.height / S.zoom / s), L.drawImage(R, S.mpan.x, S.mpan.y, S.width / S.zoom / s, S.height / S.zoom / s); } else i.textureOnViewport && !t && (i.textureCache = null); var M = l.extent(), z = i.pinching || i.hoverData.dragging || i.swipePanning || i.data.wheelZooming || i.hoverData.draggingEles || i.cy.animated(), Z = i.hideEdgesOnViewport && z, G = []; if (G[i.NODE] = !c[i.NODE] && f && !i.clearedForMotionBlur[i.NODE] || i.clearingMotionBlur, G[i.NODE] && (i.clearedForMotionBlur[i.NODE] = !0), G[i.DRAG] = !c[i.DRAG] && f && !i.clearedForMotionBlur[i.DRAG] || i.clearingMotionBlur, G[i.DRAG] && (i.clearedForMotionBlur[i.DRAG] = !0), c[i.NODE] || n || r || G[i.NODE]) { var J = f && !G[i.NODE] && h !== 1, L = t || (J ? i.data.bufferContexts[i.MOTIONBLUR_BUFFER_NODE] : u.contexts[i.NODE]), se = f && !J ? "motionBlur" : void 0; A(L, se), Z ? i.drawCachedNodes(L, O.nondrag, s, M) : i.drawLayeredElements(L, O.nondrag, s, M), i.debug && i.drawDebugPoints(L, O.nondrag), !n && !f && (c[i.NODE] = !1); } if (!r && (c[i.DRAG] || n || G[i.DRAG])) { var J = f && !G[i.DRAG] && h !== 1, L = t || (J ? i.data.bufferContexts[i.MOTIONBLUR_BUFFER_DRAG] : u.contexts[i.DRAG]); A(L, f && !J ? "motionBlur" : void 0), Z ? i.drawCachedNodes(L, O.drag, s, M) : i.drawCachedElements(L, O.drag, s, M), i.debug && i.drawDebugPoints(L, O.drag), !n && !f && (c[i.DRAG] = !1); } if (i.showFps || !r && c[i.SELECT_BOX] && !n) { var L = t || u.contexts[i.SELECT_BOX]; if (A(L), i.selection[4] == 1 && (i.hoverData.selecting || i.touchData.selecting)) { var x = i.cy.zoom(), ve = y.core("selection-box-border-width").value / x; L.lineWidth = ve, L.fillStyle = "rgba(" + y.core("selection-box-color").value[0] + "," + y.core("selection-box-color").value[1] + "," + y.core("selection-box-color").value[2] + "," + y.core("selection-box-opacity").value + ")", L.fillRect(i.selection[0], i.selection[1], i.selection[2] - i.selection[0], i.selection[3] - i.selection[1]), ve > 0 && (L.strokeStyle = "rgba(" + y.core("selection-box-border-color").value[0] + "," + y.core("selection-box-border-color").value[1] + "," + y.core("selection-box-border-color").value[2] + "," + y.core("selection-box-opacity").value + ")", L.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(), ge = u.bgActivePosistion; L.fillStyle = "rgba(" + y.core("active-bg-color").value[0] + "," + y.core("active-bg-color").value[1] + "," + y.core("active-bg-color").value[2] + "," + y.core("active-bg-opacity").value + ")", L.beginPath(), L.arc(ge.x, ge.y, y.core("active-bg-size").pfValue / x, 0, 2 * Math.PI), L.fill(); } var oe = i.lastRedrawTime; if (i.showFps && oe) { oe = Math.round(oe); var ee = Math.round(1e3 / oe); L.setTransform(1, 0, 0, 1, 0, 0), L.fillStyle = "rgba(255, 0, 0, 0.75)", L.strokeStyle = "rgba(255, 0, 0, 0.75)", L.lineWidth = 1, L.fillText("1 frame = " + oe + " ms = " + ee + " fps", 0, 20); var q = 60; L.strokeRect(0, 30, 250, 20), L.fillRect(0, 30, 250 * Math.min(ee / q, 1), 20); } n || (c[i.SELECT_BOX] = !1); } if (f && h !== 1) { var Y = u.contexts[i.NODE], te = i.data.bufferCanvases[i.MOTIONBLUR_BUFFER_NODE], we = u.contexts[i.DRAG], Oe = i.data.bufferCanvases[i.MOTIONBLUR_BUFFER_DRAG], Ne = function(xe, $e, Se) { xe.setTransform(1, 0, 0, 1, 0, 0), Se || !g ? xe.clearRect(0, 0, i.canvasWidth, i.canvasHeight) : $(xe, 0, 0, i.canvasWidth, i.canvasHeight); var Pe = h; xe.drawImage( $e, // img 0, 0, // sx, sy i.canvasWidth * Pe, i.canvasHeight * Pe, // sw, sh 0, 0, // x, y i.canvasWidth, i.canvasHeight // w, h ); }; (c[i.NODE] || G[i.NODE]) && (Ne(Y, te, G[i.NODE]), c[i.NODE] = !1), (c[i.DRAG] || G[i.DRAG]) && (Ne(we, Oe, G[i.DRAG]), c[i.DRAG] = !1); } i.prevViewport = S, i.clearingMotionBlur && (i.clearingMotionBlur = !1, i.motionBlurCleared = !0, i.motionBlur = !0), f && (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(); }, $nt)), t || l.emit("render"); }; var gc = {}; gc.drawPolygonPath = function(e, t, n, r, a, o) { var i = r / 2, s = a / 2; e.beginPath && e.beginPath(), e.moveTo(t + i * o[0], n + s * o[1]); for (var l = 1; l < o.length / 2; l++) e.lineTo(t + i * o[l * 2], n + s * o[l * 2 + 1]); e.closePath(); }; gc.drawRoundPolygonPath = function(e, t, n, r, a, o, i) { i.forEach(function(s) { return Aq(e, s); }), e.closePath(); }; gc.drawRoundRectanglePath = function(e, t, n, r, a, o) { var i = r / 2, s = a / 2, l = o === "auto" ? Bd(r, a) : Math.min(o, 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(); }; gc.drawBottomRoundRectanglePath = function(e, t, n, r, a, o) { var i = r / 2, s = a / 2, l = o === "auto" ? Bd(r, a) : o; 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(); }; gc.drawCutRectanglePath = function(e, t, n, r, a, o, i) { var s = r / 2, l = a / 2, u = i === "auto" ? f_() : 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(); }; gc.drawBarrelPath = function(e, t, n, r, a) { var o = r / 2, i = a / 2, s = t - o, l = t + o, u = n - i, c = n + i, d = oS(r, a), f = d.widthOffset, h = d.heightOffset, p = d.ctrlPtOffsetPct * f; e.beginPath && e.beginPath(), e.moveTo(s, u + h), e.lineTo(s, c - h), e.quadraticCurveTo(s + p, c, s + f, c), e.lineTo(l - f, c), e.quadraticCurveTo(l - p, c, l, c - h), e.lineTo(l, u + h), e.quadraticCurveTo(l - p, u, l - f, u), e.lineTo(s + f, u), e.quadraticCurveTo(s + p, u, s, u + h), e.closePath(); }; var kP = Math.sin(0), CP = Math.cos(0), mS = {}, yS = {}, Uq = Math.PI / 40; for (var Bp = 0 * Math.PI; Bp < 2 * Math.PI; Bp += Uq) mS[Bp] = Math.sin(Bp), yS[Bp] = Math.cos(Bp); gc.drawEllipsePath = function(e, t, n, r, a) { if (e.beginPath && e.beginPath(), e.ellipse) e.ellipse(t, n, r / 2, a / 2, 0, 0, 2 * Math.PI); else for (var o, i, s = r / 2, l = a / 2, u = 0 * Math.PI; u < 2 * Math.PI; u += Uq) o = t - s * mS[u] * kP + s * yS[u] * CP, i = n + l * yS[u] * kP + l * mS[u] * CP, u === 0 ? e.moveTo(o, i) : e.lineTo(o, i); e.closePath(); }; var Cm = {}; Cm.createBuffer = function(e, t) { var n = document.createElement("canvas"); return n.width = e, n.height = t, [n, n.getContext("2d")]; }; Cm.bufferCanvasImage = function(e) { var t = this.cy, n = t.mutableElements(), r = n.boundingBox(), a = this.findContainerClientCoords(), o = e.full ? Math.ceil(r.w) : a[2], i = e.full ? Math.ceil(r.h) : a[3], s = it(e.maxWidth) || it(e.maxHeight), l = this.getPixelRatio(), u = 1; if (e.scale !== void 0) o *= e.scale, i *= e.scale, u = e.scale; else if (s) { var c = 1 / 0, d = 1 / 0; it(e.maxWidth) && (c = u * e.maxWidth / o), it(e.maxHeight) && (d = u * e.maxHeight / i), u = Math.min(c, d), o *= u, i *= u; } s || (o *= l, i *= l, u *= l); var f = document.createElement("canvas"); f.width = o, f.height = i, f.style.width = o + "px", f.style.height = i + "px"; var h = f.getContext("2d"); if (o > 0 && i > 0) { h.clearRect(0, 0, o, i), h.globalCompositeOperation = "source-over"; var p = this.getCachedZSortedEles(); if (e.full) h.translate(-r.x1 * u, -r.y1 * u), h.scale(u, u), this.drawElements(h, p), 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, p), 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, o, i), h.fill()); } return f; }; function Fnt(e, t) { for (var n = atob(e), r = new ArrayBuffer(n.length), a = new Uint8Array(r), o = 0; o < n.length; o++) a[o] = n.charCodeAt(o); return new Blob([r], { type: t }); } function SP(e) { var t = e.indexOf(","); return e.substr(t + 1); } function qq(e, t, n) { var r = function() { return t.toDataURL(n, e.quality); }; switch (e.output) { case "blob-promise": return new Nh(function(a, o) { try { t.toBlob(function(i) { i != null ? a(i) : o(new Error("`canvas.toBlob()` sent a null value in its callback")); }, n, e.quality); } catch (i) { o(i); } }); case "blob": return Fnt(SP(r()), n); case "base64": return SP(r()); case "base64uri": default: return r(); } } Cm.png = function(e) { return qq(e, this.bufferCanvasImage(e), "image/png"); }; Cm.jpg = function(e) { return qq(e, this.bufferCanvasImage(e), "image/jpeg"); }; var Wq = {}; Wq.nodeShapeImpl = function(e, t, n, r, a, o, i, s) { switch (e) { case "ellipse": return this.drawEllipsePath(t, n, r, a, o); case "polygon": return this.drawPolygonPath(t, n, r, a, o, i); case "round-polygon": return this.drawRoundPolygonPath(t, n, r, a, o, i, s); case "roundrectangle": case "round-rectangle": return this.drawRoundRectanglePath(t, n, r, a, o, s); case "cutrectangle": case "cut-rectangle": return this.drawCutRectanglePath(t, n, r, a, o, i, s); case "bottomroundrectangle": case "bottom-round-rectangle": return this.drawBottomRoundRectanglePath(t, n, r, a, o, s); case "barrel": return this.drawBarrelPath(t, n, r, a, o); } }; var Ant = Kq, wn = Kq.prototype; wn.CANVAS_LAYERS = 3; wn.SELECT_BOX = 0; wn.DRAG = 1; wn.NODE = 2; wn.BUFFER_COUNT = 3; wn.TEXTURE_BUFFER = 0; wn.MOTIONBLUR_BUFFER_NODE = 1; wn.MOTIONBLUR_BUFFER_DRAG = 2; function Kq(e) { var t = this, n = t.cy.window(), r = n.document; t.data = { canvases: new Array(wn.CANVAS_LAYERS), contexts: new Array(wn.CANVAS_LAYERS), canvasNeedsRedraw: new Array(wn.CANVAS_LAYERS), bufferCanvases: new Array(wn.BUFFER_COUNT), bufferContexts: new Array(wn.CANVAS_LAYERS) }; var a = "-webkit-tap-highlight-color", o = "rgba(0,0,0,0)"; t.data.canvasContainer = r.createElement("div"); var i = t.data.canvasContainer.style; t.data.canvasContainer.style[a] = o, i.position = "relative", i.zIndex = "0", i.overflow = "hidden"; var s = e.cy.container(); s.appendChild(t.data.canvasContainer), s.style[a] = o; 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" }; gXe() && (l["-ms-touch-action"] = "none", l["touch-action"] = "none"); for (var u = 0; u < wn.CANVAS_LAYERS; u++) { var c = t.data.canvases[u] = r.createElement("canvas"); t.data.contexts[u] = c.getContext("2d"), Object.keys(l).forEach(function(q) { c.style[q] = l[q]; }), c.style.position = "absolute", c.setAttribute("data-id", "layer" + u), c.style.zIndex = String(wn.CANVAS_LAYERS - u), t.data.canvasContainer.appendChild(c), t.data.canvasNeedsRedraw[u] = !1; } t.data.topCanvas = t.data.canvases[0], t.data.canvases[wn.NODE].setAttribute("data-id", "layer" + wn.NODE + "-node"), t.data.canvases[wn.SELECT_BOX].setAttribute("data-id", "layer" + wn.SELECT_BOX + "-selectbox"), t.data.canvases[wn.DRAG].setAttribute("data-id", "layer" + wn.DRAG + "-drag"); for (var u = 0; u < wn.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 = xo(), f = function(q) { return { x: (q.x1 + q.x2) / 2, y: (q.y1 + q.y2) / 2 }; }, h = function(q) { return { x: -q.w / 2, y: -q.h / 2 }; }, p = function(q) { var Y = q[0]._private, te = Y.oldBackgroundTimestamp === Y.backgroundTimestamp; return !te; }, v = function(q) { return q[0]._private.nodeKey; }, m = function(q) { return q[0]._private.labelStyleKey; }, g = function(q) { return q[0]._private.sourceLabelStyleKey; }, y = function(q) { return q[0]._private.targetLabelStyleKey; }, x = function(q, Y, te, we, Oe) { return t.drawElement(q, Y, te, !1, !1, Oe); }, w = function(q, Y, te, we, Oe) { return t.drawElementText(q, Y, te, we, "main", Oe); }, k = function(q, Y, te, we, Oe) { return t.drawElementText(q, Y, te, we, "source", Oe); }, C = function(q, Y, te, we, Oe) { return t.drawElementText(q, Y, te, we, "target", Oe); }, S = function(q) { return q.boundingBox(), q[0]._private.bodyBounds; }, _ = function(q) { return q.boundingBox(), q[0]._private.labelBounds.main || d; }, T = function(q) { return q.boundingBox(), q[0]._private.labelBounds.source || d; }, O = function(q) { return q.boundingBox(), q[0]._private.labelBounds.target || d; }, $ = function(q, Y) { return Y; }, A = function(q) { return f(S(q)); }, N = function(q, Y, te) { var we = q ? q + "-" : ""; return { x: Y.x + te.pstyle(we + "text-margin-x").pfValue, y: Y.y + te.pstyle(we + "text-margin-y").pfValue }; }, L = function(q, Y, te) { var we = q[0]._private.rscratch; return { x: we[Y], y: we[te] }; }, R = function(q) { return N("", L(q, "labelX", "labelY"), q); }, P = function(q) { return N("source", L(q, "sourceLabelX", "sourceLabelY"), q); }, B = function(q) { return N("target", L(q, "targetLabelX", "targetLabelY"), q); }, M = function(q) { return h(S(q)); }, z = function(q) { return h(T(q)); }, Z = function(q) { return h(O(q)); }, G = function(q) { var Y = _(q), te = h(_(q)); if (q.isNode()) { switch (q.pstyle("text-halign").value) { case "left": te.x = -Y.w; break; case "right": te.x = 0; break; } switch (q.pstyle("text-valign").value) { case "top": te.y = -Y.h; break; case "bottom": te.y = 0; break; } } return te; }, J = t.data.eleTxrCache = new Bv(t, { getKey: v, doesEleInvalidateKey: p, drawElement: x, getBoundingBox: S, getRotationPoint: A, getRotationOffset: M, allowEdgeTxrCaching: !1, allowParentTxrCaching: !1 }), se = t.data.lblTxrCache = new Bv(t, { getKey: m, drawElement: w, getBoundingBox: _, getRotationPoint: R, getRotationOffset: G, isVisible: $ }), ve = t.data.slbTxrCache = new Bv(t, { getKey: g, drawElement: k, getBoundingBox: T, getRotationPoint: P, getRotationOffset: z, isVisible: $ }), ge = t.data.tlbTxrCache = new Bv(t, { getKey: y, drawElement: C, getBoundingBox: O, getRotationPoint: B, getRotationOffset: Z, isVisible: $ }), oe = t.data.lyrTxrCache = new zq(t); t.onUpdateEleCalcs(function(q, Y) { J.invalidateElements(Y), se.invalidateElements(Y), ve.invalidateElements(Y), ge.invalidateElements(Y), oe.invalidateElements(Y); for (var te = 0; te < Y.length; te++) { var we = Y[te]._private; we.oldBackgroundTimestamp = we.backgroundTimestamp; } }); var ee = function(q) { for (var Y = 0; Y < q.length; Y++) oe.enqueueElementRefinement(q[Y].ele); }; J.onDequeue(ee), se.onDequeue(ee), ve.onDequeue(ee), ge.onDequeue(ee); } wn.redrawHint = function(e, t) { var n = this; switch (e) { case "eles": n.data.canvasNeedsRedraw[wn.NODE] = t; break; case "drag": n.data.canvasNeedsRedraw[wn.DRAG] = t; break; case "select": n.data.canvasNeedsRedraw[wn.SELECT_BOX] = t; break; } }; var Int = typeof Path2D < "u"; wn.path2dEnabled = function(e) { if (e === void 0) return this.pathsEnabled; this.pathsEnabled = !!e; }; wn.usePaths = function() { return Int && this.pathsEnabled; }; wn.setImgSmoothing = function(e, t) { e.imageSmoothingEnabled != null ? e.imageSmoothingEnabled = t : (e.webkitImageSmoothingEnabled = t, e.mozImageSmoothingEnabled = t, e.msImageSmoothingEnabled = t); }; wn.getImgSmoothing = function(e) { return e.imageSmoothingEnabled != null ? e.imageSmoothingEnabled : e.webkitImageSmoothingEnabled || e.mozImageSmoothingEnabled || e.msImageSmoothingEnabled; }; wn.makeOffscreenCanvas = function(e, t) { var n; if ((typeof OffscreenCanvas > "u" ? "undefined" : Rr(OffscreenCanvas)) !== "undefined") n = new OffscreenCanvas(e, t); else { var r = this.cy.window(), a = r.document; n = a.createElement("canvas"), n.width = e, n.height = t; } return n; }; [Vq, zs, Vl, T_, pp, Hh, Ro, gc, Cm, Wq].forEach(function(e) { At(wn, e); }); var Pnt = [{ name: "null", impl: Oq }, { name: "base", impl: Dq }, { name: "canvas", impl: Ant }], Lnt = [{ type: "layout", extensions: ztt }, { type: "renderer", extensions: Pnt }], Gq = {}, Xq = {}; function Yq(e, t, n) { var r = n, a = function(S) { An("Can not register `" + t + "` for `" + e + "` since `" + S + "` already exists in the prototype and can not be overridden"); }; if (e === "core") { if (fg.prototype[t]) return a(t); fg.prototype[t] = n; } else if (e === "collection") { if (va.prototype[t]) return a(t); va.prototype[t] = n; } else if (e === "layout") { for (var o = function(S) { this.options = S, n.call(this, S), mn(this._private) || (this._private = {}), this._private.cy = S.cy, this._private.listeners = [], this.createEmitter(); }, i = o.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 S = this.options; if (S && S.animate) { var _ = this.animations; if (_) for (var T = 0; T < _.length; T++) _[T].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(S) { return S._private.cy; }, f = { addEventFields: function(S, _) { _.layout = S, _.cy = d(S), _.target = S; }, bubble: function() { return !0; }, parent: function(S) { return d(S); } }; At(i, { createEmitter: function() { return this._private.emitter = new ix(f, this), this; }, emitter: function() { return this._private.emitter; }, on: function(S, _) { return this.emitter().on(S, _), this; }, one: function(S, _) { return this.emitter().one(S, _), this; }, once: function(S, _) { return this.emitter().one(S, _), this; }, removeListener: function(S, _) { return this.emitter().removeListener(S, _), this; }, removeAllListeners: function() { return this.emitter().removeAllListeners(), this; }, emit: function(S, _) { return this.emitter().emit(S, _), this; } }), $n.eventAliasesOn(i), r = o; } else if (e === "renderer" && t !== "null" && t !== "base") { var h = Zq("renderer", "base"), p = h.prototype, v = n, m = n.prototype, g = function() { h.apply(this, arguments), v.apply(this, arguments); }, y = g.prototype; for (var x in p) { var w = p[x], k = m[x] != null; if (k) return a(x); y[x] = w; } for (var C in m) y[C] = m[C]; p.clientFunctions.forEach(function(S) { y[S] = y[S] || function() { pr("Renderer does not implement `renderer." + S + "()` on its prototype"); }; }), r = g; } else if (e === "__proto__" || e === "constructor" || e === "prototype") return pr(e + " is an illegal type to be registered, possibly lead to prototype pollutions"); return kU({ map: Gq, keys: [e, t], value: r }); } function Zq(e, t) { return CU({ map: Gq, keys: [e, t] }); } function Nnt(e, t, n, r, a) { return kU({ map: Xq, keys: [e, t, n, r], value: a }); } function Mnt(e, t, n, r) { return CU({ map: Xq, keys: [e, t, n, r] }); } var bS = function() { if (arguments.length === 2) return Zq.apply(null, arguments); if (arguments.length === 3) return Yq.apply(null, arguments); if (arguments.length === 4) return Mnt.apply(null, arguments); if (arguments.length === 5) return Nnt.apply(null, arguments); pr("Invalid extension access syntax"); }; fg.prototype.extension = bS; Lnt.forEach(function(e) { e.extensions.forEach(function(t) { Yq(e.type, t.name, t.impl); }); }); var Qq = function e() { if (!(this instanceof e)) return new e(); this.length = 0; }, zd = Qq.prototype; zd.instanceString = function() { return "stylesheet"; }; zd.selector = function(e) { var t = this.length++; return this[t] = { selector: e, properties: [] }, this; }; zd.css = function(e, t) { var n = this.length - 1; if (wt(e)) this[n].properties.push({ name: e, value: t }); else if (mn(e)) for (var r = e, a = Object.keys(r), o = 0; o < a.length; o++) { var i = a[o], s = r[i]; if (s != null) { var l = Oa.properties[i] || Oa.properties[Yw(i)]; if (l != null) { var u = l.name, c = s; this[n].properties.push({ name: u, value: c }); } } } return this; }; zd.style = zd.css; zd.generateStyle = function(e) { var t = new Oa(e); return this.appendToStyle(t); }; zd.appendToStyle = function(e) { for (var t = 0; t < this.length; t++) { var n = this[t], r = n.selector, a = n.properties; e.selector(r); for (var o = 0; o < a.length; o++) { var i = a[o]; e.css(i.name, i.value); } } return e; }; var Bnt = "3.30.2", Vd = function(e) { if (e === void 0 && (e = {}), mn(e)) return new fg(e); if (wt(e)) return bS.apply(bS, arguments); }; Vd.use = function(e) { var t = Array.prototype.slice.call(arguments, 1); return t.unshift(Vd), e.apply(null, t), this; }; Vd.warnings = function(e) { return AU(e); }; Vd.version = Bnt; Vd.stylesheet = Vd.Stylesheet = Qq; let Dnt = class extends EventTarget { constructor(e, t) { super(), ls(this, "cyg", null), ls(this, "nodes", []), ls(this, "edges", []), ls(this, "axons", []), ls(this, "dendrites", []), ls(this, "somas", []), ls(this, "labelCache", /* @__PURE__ */ new Map()), ls(this, "graphCanvas", null), this.labelCache = e, this.graphCanvas = t; } async addConnectivity(e) { var t; if (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))), e.connectivity.length) for (const n of e.connectivity) { const r = await this.graphNode(n[0]), a = await this.graphNode(n[1]); this.nodes.push(r), this.nodes.push(a), this.edges.push({ id: `${r.id}_${a.id}`, source: r.id, target: a.id }); } else this.nodes.push({ id: "MISSING", label: "NO PATHS" }); } showConnectivity(e) { this.cyg = new Unt(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 a = r.data("label"), o = wS(a); Hnt(e, o) && (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(), a = this.cyg.cy.height(), o = { x: r / 2, y: a / 2 }; this.cyg.cy.zoom({ level: n + e, renderedPosition: o }); } } 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.dendrites, ...this.somas ]; } async graphNode(e) { const t = JSON.stringify(e), n = [e[0], ...e[1]], r = []; for (const o of n) { const i = this.labelCache.has(o) ? this.labelCache.get(o) : ""; r.push(i); } n.push(...r); const a = { id: t, label: n.join(` `) }; return this.axons.includes(t) ? this.dendrites.includes(t) || this.somas.includes(t) ? a["both-a-d"] = !0 : a.axon = !0 : (this.dendrites.includes(t) || this.somas.includes(t)) && (a.dendrite = !0), a; } on(e, t) { this.addEventListener(e, t); } }; const Rnt = "#8300bf", znt = "#f3ecf6", Vnt = [ { selector: "node", style: { label: function(e) { return jnt(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[both-a-d]", style: { // 'background-color': 'gray', shape: "round-rectangle" } }, { selector: "edge", style: { width: 1, "line-color": "dimgray", "target-arrow-color": "dimgray", "target-arrow-shape": "triangle", "curve-style": "bezier" } }, { selector: "node.active", style: { "border-color": Rnt, "background-color": znt, "background-opacity": 0.75 } } ]; function jnt(e) { const t = e.split(` `), n = t.length / 2, r = t.slice(n); return Jq(r.join(` `)); } function Jq(e) { return e.split(` `).map((t) => t && t[0] >= "a" && t[0] <= "z" ? t.charAt(0).toUpperCase() + t.slice(1) : t).join(` `); } function wS(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 Hnt(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 Unt extends EventTarget { constructor(t, n) { var r; super(), ls(this, "cy"), ls(this, "tooltip"), this.cy = Vd({ container: n, elements: t.elements, layout: { name: "breadthfirst", circle: !1, roots: t.roots }, directed: !0, style: Vnt, minZoom: 0.5, 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, a = wS(r).map((o) => o.label + " (" + o.id + ")"); this.tooltip.innerText = Jq(a.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, a = r.data(); let { label: o } = a; n ? r.addClass("active") : (r.removeClass("active"), o = "", setTimeout(() => { r.unselect(); })); const i = wS(o), s = new CustomEvent("tap-node", { detail: i }); this.dispatchEvent(s); } on(t, n) { this.addEventListener(t, n); } } const qnt = 1.3, Wnt = 24 * 60 * 60 * 1e3, Knt = "Reset position", EP = "Lock zoom", Gnt = "Unlock zoom", Xnt = "Zoom in", Ynt = "Zoom out", _P = 0.25, Znt = "#8300bf", Qnt = 3e3, Jnt = { name: "ConnectivityGraph", props: { /** * Entity to load its connectivity graph. */ entry: { type: String, default: "" }, mapServer: { type: String, default: "" }, selectedConnectivityData: { type: Array, default: [] } }, data: function() { return { loading: !0, connectivityGraph: null, selectedSource: "", pathList: [], schemaVersion: "", knowledgeByPath: /* @__PURE__ */ new Map(), labelledTerms: /* @__PURE__ */ new Set(), labelCache: /* @__PURE__ */ new Map(), resetLabel: Knt, zoomLockLabel: EP, zoomInLabel: Xnt, zoomOutLabel: Ynt, iconColor: Znt, zoomEnabled: !1, connectivityError: null, timeoutID: void 0 }; }, mounted() { this.refreshCache(), this.loadCacheData(), this.run().then((e) => { this.showGraph(this.entry); }); }, methods: { loadCacheData: function() { const e = sessionStorage.getItem("connectivity-graph-source"), t = sessionStorage.getItem("connectivity-graph-labels"), n = sessionStorage.getItem("connectivity-graph-pathlist"), r = sessionStorage.getItem("connectivity-graph-schema-version"); if (e && (this.selectedSource = e), n && (this.pathList = JSON.parse(n)), t) { const a = JSON.parse(t); this.labelCache = new Map(Object.entries(a)); } r && (this.schemaVersion = r); }, removeAllCacheData: function() { [ "connectivity-graph-expiry", "connectivity-graph-source", "connectivity-graph-labels", "connectivity-graph-pathlist", "connectivity-graph-schema-version" ].forEach((e) => { sessionStorage.removeItem(e); }); }, refreshCache: function() { const e = sessionStorage.getItem("connectivity-graph-expiry"); (/* @__PURE__ */ new Date()).getTime() > e && this.removeAllCacheData(); }, updateCacheExpiry: function() { const e = (/* @__PURE__ */ new Date()).getTime() + Wnt; sessionStorage.setItem("connectivity-graph-expiry", e); }, run: async function() { if (this.schemaVersion || (this.schemaVersion = await this.getSchemaVersion(), sessionStorage.setItem("connectivity-graph-schema-version", this.schemaVersion), this.updateCacheExpiry()), this.schemaVersion < qnt) { console.warn("No Server!"); return; } this.showSpinner(), this.selectedSource || (this.selectedSource = await this.setSourceList(), sessionStorage.setItem("connectivity-graph-source", this.selectedSource), this.updateCacheExpiry()), await this.setPathList(this.selectedSource), this.hideSpinner(); }, showGraph: async function(e) { const t = this.$refs.graphCanvas; this.showSpinner(), this.connectivityGraph = new Dnt(this.labelCache, t), await this.connectivityGraph.addConnectivity(this.knowledgeByPath.get(e)), this.hideSpinner(), this.connectivityGraph.showConnectivity(t), this.selectedConnectivityData.length && this.connectivityGraph.selectConnectivity(this.selectedConnectivityData), this.connectivityGraph.on("tap-node", (n) => { const r = n.detail; this.$emit("tap-node", r); }); }, query: async function(e, t) { const n = `${this.mapServer}knowledge/query/`, r = { sql: e, params: t }; try { const a = 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 (!a.ok) throw new Error(`Cannot access ${n}`); return await a.json(); } catch { return { values: [] }; } }, setSourceList: async function() { const e = await this.getJsonData(`${this.mapServer}knowledge/sources`), t = e ? e.sources || [] : []; let n = ""; for (const r of t) r && n === "" && (n = r); return n; }, 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, a] of e.values) if (r !== t) { const o = JSON.parse(a); this.labelCache.set(r, o.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(_P); }, zoomOut: function() { this.connectivityGraph.zoom(-_P); }, /** * Enable/disable user zoom for scrolling */ toggleZoom: function() { this.zoomEnabled = !this.zoomEnabled, this.zoomLockLabel = this.zoomEnabled ? Gnt : EP, this.connectivityGraph.enableZoom(!this.zoomEnabled); }, showErrorMessage: function(e) { this.connectivityError = { ...e }, this.timeoutID && clearTimeout(this.timeoutID), this.timeoutID = setTimeout(() => { this.connectivityError = null; }, Qnt); } } }, ert = { class: "connectivity-graph" }, trt = { ref: "graphCanvas", class: "graph-canvas" }, nrt = { class: "control-panel control-panel-tools" }, rrt = { class: "visually-hidden" }, art = { class: "visually-hidden" }, ort = { class: "visually-hidden" }, irt = { class: "visually-hidden" }, srt = /* @__PURE__ */ qK('
    Origin
    Components
    Destination
    ', 1), lrt = { key: 0, class: "connectivity-graph-error" }, urt = { key: 0 }; function crt(e, t, n, r, a, o) { const i = uje, s = Sa, l = Pd, u = fm, c = Aje, d = Pje, f = Bje, h = Rje, p = DGe; return Xe((I(), j("div", ert, [ W("div", trt, null, 512), W("div", nrt, [ W("div", { class: H(["tools", { "zoom-locked": e.zoomEnabled }]) }, [ ue(u, { content: e.resetLabel, placement: "top", effect: "control-tooltip" }, { default: K(() => [ ue(l, { class: H(["control-button", e.theme]), size: "small", onClick: o.reset }, { default: K(() => [ ue(s, { color: "white" }, { default: K(() => [ ue(i) ]), _: 1 }), W("span", rrt, Fe(e.resetLabel), 1) ]), _: 1 }, 8, ["class", "onClick"]) ]), _: 1 }, 8, ["content"]), ue(u, { content: e.zoomLockLabel, placement: "top", effect: "control-tooltip" }, { default: K(() => [ ue(l, { class: H(["control-button", e.theme]), size: "small", onClick: o.toggleZoom }, { default: K(() => [ ue(s, { color: "white" }, { default: K(() => [ e.zoomEnabled ? (I(), de(c, { key: 0 })) : (I(), de(d, { key: 1 })) ]), _: 1 }), W("span", art, Fe(e.zoomLockLabel), 1) ]), _: 1 }, 8, ["class", "onClick"]) ]), _: 1 }, 8, ["content"]), ue(u, { content: e.zoomInLabel, placement: "left", effect: "control-tooltip" }, { default: K(() => [ ue(l, { class: H(["control-button", e.theme]), size: "small", onClick: o.zoomIn }, { default: K(() => [ ue(s, { color: "white" }, { default: K(() => [ ue(f) ]), _: 1 }), W("span", ort, Fe(e.zoomInLabel), 1) ]), _: 1 }, 8, ["class", "onClick"]) ]), _: 1 }, 8, ["content"]), ue(u, { content: e.zoomOutLabel, placement: "left", effect: "control-tooltip" }, { default: K(() => [ ue(l, { class: H(["control-button", e.theme]), size: "small", onClick: o.zoomOut }, { default: K(() => [ ue(s, { color: "white" }, { default: K(() => [ ue(h) ]), _: 1 }), W("span", irt, Fe(e.zoomOutLabel), 1) ]), _: 1 }, 8, ["class", "onClick"]) ]), _: 1 }, 8, ["content"]) ], 2) ]), srt, e.connectivityError ? (I(), j("div", lrt, [ e.connectivityError.errorConnectivities ? (I(), j("strong", urt, Fe(e.connectivityError.errorConnectivities), 1)) : ne("", !0), et(" " + Fe(e.connectivityError.errorMessage), 1) ])) : ne("", !0) ])), [ [p, e.loading] ]); } const drt = /* @__PURE__ */ Xw(Jnt, [["render", crt], ["__scopeId", "data-v-2ea51769"]]), TP = "Copy to clipboard", prt = "Copied!", frt = "#8300bf", hrt = { name: "CopyToClipboard", props: { content: { type: String, default: "" }, /** * `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: TP, autoHideTimeout: 0, iconColor: frt }; }, 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 || "", a = new Blob([t], { type: "text/html" }), o = new Blob([r], { type: "text/plain" }), i = new ClipboardItem({ "text/html": a, "text/plain": o }); await navigator.clipboard.write([i]); } catch (t) { console.error( "Error when trying to use navigator.clipboard.write()", t ), e = !1; } e ? this.textLabel = prt : this.textLabel = "Error trying to copy to clipboard!"; }, resetSettings: function() { this.autoHideTimeout = 0, this.textLabel = TP; } } }, vrt = { class: "visually-hidden" }; function grt(e, t, n, r, a, o) { const i = wje, s = Sa, l = Pd, u = fm; return I(), de(u, { content: e.textLabel, placement: "bottom", "hide-after": e.autoHideTimeout, effect: "clipboard-tooltip", onHide: o.resetSettings }, { default: K(() => [ ue(l, { class: H(["copy-clipboard-button", n.theme]), size: "small", onClick: o.copyToClipboard }, { default: K(() => [ ue(s, { color: e.iconColor }, { default: K(() => [ ue(i) ]), _: 1 }, 8, ["color"]), W("span", vrt, Fe(e.textLabel), 1) ]), _: 1 }, 8, ["class", "onClick"]) ]), _: 1 }, 8, ["content", "hide-after", "onHide"]); } const eW = /* @__PURE__ */ Xw(hrt, [["render", grt], ["__scopeId", "data-v-de3b5311"]]), tW = ` 2horpanel ? `, nW = ` 2vertpanel ? `, rW = ` 3panel ? `, aW = ` 4panel ? `, oW = ` 2horpanel ? `, iW = ` 2horpanel ? `, sW = ` 4panel ? `, lW = ` changeBckgd `, uW = ` close no bk `, cW = ` close `, dW = ` closeFullScreen `, pW = ` Comment `, fW = ` Connection `, hW = ` dock `, vW = ` drawLine `, gW = ` drawPoint `, mW = ` drawPolygon `, yW = ` drawTrash `, bW = ` fitWindow `, wW = ` fullScreen `, xW = 'DataPortal-Icons', kW = ` magnifyingGlass `, CW = `Created by Wahyu Prihantorofrom the Noun Project`, SW = ` openMap `, EW = ` Artboard Copy 6 `, _W = ` permalink `, TW = ` play `, OW = ` resetZoom `, $W = ` singlepanel ? `, FW = ` tooltips ? `, AW = ` undock `, IW = ` zoomIn `, PW = ` zoomOut `, LW = (e, t, n, r) => { const a = ["title", "desc", "defs", "style"], o = ["width", "height"], i = r || []; let s = document.createElement("div"); s.innerHTML = e, a.map((u) => { const c = s.querySelector(u); c && c.remove(); }), o.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; }, NW = (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(), mrt = !0, yrt = !0, brt = ["fill"], OP = /* @__PURE__ */ Object.assign({ "/assets/icons/2horpanel.svg": tW, "/assets/icons/2vertpanel.svg": nW, "/assets/icons/3panel.svg": rW, "/assets/icons/4panel.svg": aW, "/assets/icons/5panel.svg": oW, "/assets/icons/6panel.svg": iW, "/assets/icons/6panelVertical.svg": sW, "/assets/icons/changeBckgd.svg": lW, "/assets/icons/close-no-bk.svg": uW, "/assets/icons/close.svg": cW, "/assets/icons/closeFullScreen.svg": dW, "/assets/icons/comment.svg": pW, "/assets/icons/connection.svg": fW, "/assets/icons/dock.svg": hW, "/assets/icons/drawLine.svg": vW, "/assets/icons/drawPoint.svg": gW, "/assets/icons/drawPolygon.svg": mW, "/assets/icons/drawTrash.svg": yW, "/assets/icons/fitWindow.svg": bW, "/assets/icons/fullScreen.svg": wW, "/assets/icons/help.svg": xW, "/assets/icons/magnifyingGlass.svg": kW, "/assets/icons/noun-filter.svg": CW, "/assets/icons/openMap.svg": SW, "/assets/icons/pause.svg": EW, "/assets/icons/permalink.svg": _W, "/assets/icons/play.svg": TW, "/assets/icons/resetZoom.svg": OW, "/assets/icons/singlepanel.svg": $W, "/assets/icons/tooltips.svg": FW, "/assets/icons/undock.svg": AW, "/assets/icons/zoomIn.svg": IW, "/assets/icons/zoomOut.svg": PW }), wrt = Object.keys(OP).map((e) => { const t = LW(OP[e], mrt, yrt, brt), n = e.replace(/^.+\/(\w+).svg$/, "$1"); return NW(t).replace("", "symbol>"); }); wrt.join(` `); const $P = /* @__PURE__ */ Object.assign({ "/assets/icons/2horpanel.svg": tW, "/assets/icons/2vertpanel.svg": nW, "/assets/icons/3panel.svg": rW, "/assets/icons/4panel.svg": aW, "/assets/icons/5panel.svg": oW, "/assets/icons/6panel.svg": iW, "/assets/icons/6panelVertical.svg": sW, "/assets/icons/changeBckgd.svg": lW, "/assets/icons/close-no-bk.svg": uW, "/assets/icons/close.svg": cW, "/assets/icons/closeFullScreen.svg": dW, "/assets/icons/comment.svg": pW, "/assets/icons/connection.svg": fW, "/assets/icons/dock.svg": hW, "/assets/icons/drawLine.svg": vW, "/assets/icons/drawPoint.svg": gW, "/assets/icons/drawPolygon.svg": mW, "/assets/icons/drawTrash.svg": yW, "/assets/icons/fitWindow.svg": bW, "/assets/icons/fullScreen.svg": wW, "/assets/icons/help.svg": xW, "/assets/icons/magnifyingGlass.svg": kW, "/assets/icons/noun-filter.svg": CW, "/assets/icons/openMap.svg": SW, "/assets/icons/pause.svg": EW, "/assets/icons/permalink.svg": _W, "/assets/icons/play.svg": TW, "/assets/icons/resetZoom.svg": OW, "/assets/icons/singlepanel.svg": $W, "/assets/icons/tooltips.svg": FW, "/assets/icons/undock.svg": AW, "/assets/icons/zoomIn.svg": IW, "/assets/icons/zoomOut.svg": PW }), xrt = Object.keys($P).map((e) => { const t = LW($P[e]), n = e.replace(/^.+\/(\w+).svg$/, "$1"); return NW(t).replace("", "symbol>"); }); xrt.join(` `); const krt = { data() { return { ElIconView: D7 }; }, name: "DatasetCard", components: { BadgesGroup: Qz, ImageGallery: jj, Button: Do, Icon: er, CopyToClipboard: eW }, props: { /** * Object containing information for * the required viewing. */ entry: { type: Object, default: () => { } }, envVars: { type: Object, default: () => { } } }, data: function() { return { thumbnail: qA, 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 && ($b[this.entry.species[0].toLowerCase()] ? e = `${$b[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) { mr.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) { mr.emit("PopoverActionClick", e), mr.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.discoverId), this.loading = !1, this.updateCopyContent(); }).catch(() => { this.thumbnail = qA, this.discoverId = Number(this.entry.datasetId), this.loading = !1; }); } }, lastName: function(e) { return e.split(",")[0]; }, getBiolucidaInfo: function(e) { let t = this.envVars.API_LOCATION + "image_search/" + e; fetch(t).then((n) => n.json()).then((n) => { n.status == "success" && (this.biolucidaData = n); }); }, 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(); } } }, Crt = (e) => (No("data-v-541a51e6"), e = e(), Mo(), e), Srt = { class: "dataset-card-container", ref: "container" }, Ert = { class: "dataset-card", ref: "card" }, _rt = /* @__PURE__ */ Crt(() => /* @__PURE__ */ W("div", { class: "seperator-path" }, null, -1)), Trt = { class: "card" }, Ort = { class: "card-left" }, $rt = { class: "card-right" }, Frt = { class: "details" }, Art = { class: "details" }, Irt = { key: 0, class: "details loading-icon" }, Prt = { class: "badges-container" }, Lrt = { class: "float-button-container" }; function Nrt(e, t, n, r, a, o) { const i = jj, s = Do, l = Qz, u = lt("CopyToClipboard"), c = yw; return I(), j("div", Srt, [ W("div", Ert, [ _rt, Xe((I(), j("div", Trt, [ W("span", Ort, [ !e.loading && e.discoverId ? (I(), de(i, { key: 0, datasetId: e.discoverId, datasetVersion: e.version, entry: n.entry, envVars: n.envVars, label: o.label, datasetThumbnail: e.thumbnail, "dataset-biolucida": e.biolucidaData, category: e.currentCategory, onCardClicked: o.galleryClicked, onDatalinkClicked: o.galleryDatalinkClicked }, null, 8, ["datasetId", "datasetVersion", "entry", "envVars", "label", "datasetThumbnail", "dataset-biolucida", "category", "onCardClicked", "onDatalinkClicked"])) : ne("", !0) ]), W("div", $rt, [ W("div", { class: "title", onClick: t[0] || (t[0] = (...d) => o.cardClicked && o.cardClicked(...d)) }, Fe(n.entry.name), 1), W("div", Frt, Fe(o.contributors) + " " + Fe(n.entry.publishDate ? `(${o.publishYear})` : ""), 1), W("div", Art, Fe(o.samples), 1), n.entry.detailsReady ? ne("", !0) : Xe((I(), j("div", Irt, null, 512)), [ [c, !n.entry.detailsReady] ]), W("div", null, [ n.entry.simulation ? (I(), de(s, { key: 0, onClick: o.openRepository, size: "small", class: "button", icon: a.ElIconView }, { default: K(() => [ et("View repository") ]), _: 1 }, 8, ["onClick", "icon"])) : ne("", !0) ]), W("div", Prt, [ ue(l, { entry: n.entry, "dataset-biolucida": e.biolucidaData, onCategoryChanged: o.categoryChanged }, null, 8, ["entry", "dataset-biolucida", "onCategoryChanged"]) ]), W("div", Lrt, [ ue(u, { content: e.copyContent }, null, 8, ["content"]) ]) ]) ])), [ [c, e.loading] ]) ], 512) ], 512); } const MW = /* @__PURE__ */ Zi(krt, [["render", Nrt], ["__scopeId", "data-v-541a51e6"]]), FP = function(e) { return [...new Set(e.map((t) => JSON.stringify(t)))].map( (t) => JSON.parse(t) ); }, Mrt = { name: "SearchHistory", components: { Tag: zf, Select: Qg }, data() { return { searchHistory: [], selectValue: "Full search history" }; }, computed: { reversedSearchHistory: function() { return FP( this.searchHistory.slice().reverse().filter((e) => e.search !== "") ); }, cascaderOptions: function() { return this.reversedSearchHistory.map((e) => ({ value: e.search, label: e.search })); } }, methods: { getSearchHistory() { localStorage.getItem("sparc.science-sidebar-search-history") ? this.searchHistory = JSON.parse( localStorage.getItem("sparc.science-sidebar-search-history") ) : this.searchHistory = []; }, clearSearchHistory() { localStorage.removeItem("sparc.science-sidebar-search-history"), this.searchHistory = []; }, addSearchToHistory(e, t) { e = [], t = t.trim(); let n = JSON.parse( localStorage.getItem("sparc.science-sidebar-search-history") ); n ? (n.push({ filters: e, search: t }), this.searchHistory = FP(n), localStorage.setItem( "sparc.science-sidebar-search-history", JSON.stringify(n) )) : localStorage.setItem( "sparc.science-sidebar-search-history", JSON.stringify([{ filters: e, search: t }]) ); }, search: function(e) { this.$emit("search", e); }, selectChange: function(e) { this.selectValue = e, this.search({ search: e }); } }, mounted: function() { this.getSearchHistory(), mr.on("search-changed", (e) => { this.setSearchHistory(e); }); } }, Brt = { class: "history-container" }; function Drt(e, t, n, r, a, o) { const i = zf, s = mw, l = Qg; return I(), j("div", Brt, [ (I(!0), j(Qe, null, Nt(o.reversedSearchHistory, (u, c) => (I(), j(Qe, null, [ c < 3 ? (I(), de(i, { class: "search-tag", key: c, onClick: (d) => o.search(u), size: "large" }, { default: K(() => [ et(Fe(u.search), 1) ]), _: 2 }, 1032, ["onClick"])) : ne("", !0) ], 64))), 256)), o.reversedSearchHistory.length > 0 ? (I(), de(l, { key: 0, "model-value": a.selectValue, class: "m-2 search-select", placeholder: "Full search History", "popper-class": "sidebar-search-select-popper", onChange: o.selectChange, teleported: !1 }, { default: K(() => [ (I(!0), j(Qe, null, Nt(o.cascaderOptions, (u, c) => (I(), de(s, { key: c, label: u.label, value: u.value }, null, 8, ["label", "value"]))), 128)) ]), _: 1 }, 8, ["model-value", "onChange"])) : ne("", !0) ]); } const BW = /* @__PURE__ */ Zi(Mrt, [["render", Drt], ["__scopeId", "data-v-def88150"]]), DW = (e, t) => { const n = e.__vccOpts || e; for (const [r, a] of t) n[r] = a; return n; }, Rrt = ["xlink:href"], zrt = { __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) => (I(), j("svg", { class: H(["map-icon", { "map-icon-spin": e.spin }]) }, [ W("use", { "xlink:href": `#${e.icon}` }, null, 8, Rrt) ], 2)); } }, Vrt = /* @__PURE__ */ DW(zrt, [["__scopeId", "data-v-e172d5ff"]]), RW = ` 2horpanel ? `, zW = ` 2vertpanel ? `, VW = ` 3panel ? `, jW = ` 4panel ? `, HW = ` 2horpanel ? `, UW = ` 2horpanel ? `, qW = ` 4panel ? `, WW = ` changeBckgd `, KW = ` close no bk `, GW = ` close `, XW = ` closeFullScreen `, YW = ` Comment `, ZW = ` Connection `, QW = ` dock `, JW = ` drawLine `, eK = ` drawPoint `, tK = ` drawPolygon `, nK = ` drawTrash `, rK = ` fitWindow `, aK = ` fullScreen `, oK = 'DataPortal-Icons', iK = ` magnifyingGlass `, sK = `Created by Wahyu Prihantorofrom the Noun Project`, lK = ` openMap `, uK = ` Artboard Copy 6 `, cK = ` permalink `, dK = ` play `, pK = ` resetZoom `, fK = ` singlepanel ? `, hK = ` tooltips ? `, vK = ` undock `, gK = ` zoomIn `, mK = ` zoomOut `, yK = (e, t, n, r) => { const a = ["title", "desc", "defs", "style"], o = ["width", "height"], i = r || []; let s = document.createElement("div"); s.innerHTML = e, a.map((u) => { const c = s.querySelector(u); c && c.remove(); }), o.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; }, bK = (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(), jrt = !0, Hrt = !0, Urt = ["fill"], AP = /* @__PURE__ */ Object.assign({ "/assets/icons/2horpanel.svg": RW, "/assets/icons/2vertpanel.svg": zW, "/assets/icons/3panel.svg": VW, "/assets/icons/4panel.svg": jW, "/assets/icons/5panel.svg": HW, "/assets/icons/6panel.svg": UW, "/assets/icons/6panelVertical.svg": qW, "/assets/icons/changeBckgd.svg": WW, "/assets/icons/close-no-bk.svg": KW, "/assets/icons/close.svg": GW, "/assets/icons/closeFullScreen.svg": XW, "/assets/icons/comment.svg": YW, "/assets/icons/connection.svg": ZW, "/assets/icons/dock.svg": QW, "/assets/icons/drawLine.svg": JW, "/assets/icons/drawPoint.svg": eK, "/assets/icons/drawPolygon.svg": tK, "/assets/icons/drawTrash.svg": nK, "/assets/icons/fitWindow.svg": rK, "/assets/icons/fullScreen.svg": aK, "/assets/icons/help.svg": oK, "/assets/icons/magnifyingGlass.svg": iK, "/assets/icons/noun-filter.svg": sK, "/assets/icons/openMap.svg": lK, "/assets/icons/pause.svg": uK, "/assets/icons/permalink.svg": cK, "/assets/icons/play.svg": dK, "/assets/icons/resetZoom.svg": pK, "/assets/icons/singlepanel.svg": fK, "/assets/icons/tooltips.svg": hK, "/assets/icons/undock.svg": vK, "/assets/icons/zoomIn.svg": gK, "/assets/icons/zoomOut.svg": mK }), qrt = Object.keys(AP).map((e) => { const t = yK(AP[e], jrt, Hrt, Urt), n = e.replace(/^.+\/(\w+).svg$/, "$1"); return bK(t).replace("", "symbol>"); }); qrt.join(` `); const xS = /* @__PURE__ */ Object.assign({ "/assets/icons/2horpanel.svg": RW, "/assets/icons/2vertpanel.svg": zW, "/assets/icons/3panel.svg": VW, "/assets/icons/4panel.svg": jW, "/assets/icons/5panel.svg": HW, "/assets/icons/6panel.svg": UW, "/assets/icons/6panelVertical.svg": qW, "/assets/icons/changeBckgd.svg": WW, "/assets/icons/close-no-bk.svg": KW, "/assets/icons/close.svg": GW, "/assets/icons/closeFullScreen.svg": XW, "/assets/icons/comment.svg": YW, "/assets/icons/connection.svg": ZW, "/assets/icons/dock.svg": QW, "/assets/icons/drawLine.svg": JW, "/assets/icons/drawPoint.svg": eK, "/assets/icons/drawPolygon.svg": tK, "/assets/icons/drawTrash.svg": nK, "/assets/icons/fitWindow.svg": rK, "/assets/icons/fullScreen.svg": aK, "/assets/icons/help.svg": oK, "/assets/icons/magnifyingGlass.svg": iK, "/assets/icons/noun-filter.svg": sK, "/assets/icons/openMap.svg": lK, "/assets/icons/pause.svg": uK, "/assets/icons/permalink.svg": cK, "/assets/icons/play.svg": dK, "/assets/icons/resetZoom.svg": pK, "/assets/icons/singlepanel.svg": fK, "/assets/icons/tooltips.svg": hK, "/assets/icons/undock.svg": vK, "/assets/icons/zoomIn.svg": gK, "/assets/icons/zoomOut.svg": mK }), Wrt = Object.keys(xS).map((e) => { const t = yK(xS[e]), n = e.replace(/^.+\/(\w+).svg$/, "$1"); return bK(t).replace("", "symbol>"); }), Krt = { name: "MapSvgSpriteColor", svgContext: xS, svgSprite: Wrt.join(` `) // concatenate all symbols into $options.svgSprite }, Grt = ["innerHTML"]; function Xrt(e, t, n, r, a, o) { return I(), j("svg", { width: "0", height: "0", style: { display: "none" }, innerHTML: e.$options.svgSprite }, null, 8, Grt); } const Yrt = /* @__PURE__ */ DW(Krt, [["render", Xrt]]); var wK = { 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(); })(ZTe, function() { function n(Q, ce, pe) { return ce in Q ? Object.defineProperty(Q, ce, { value: pe, enumerable: !0, configurable: !0, writable: !0 }) : Q[ce] = pe, Q; } function r(Q, ce) { var pe = Object.keys(Q); if (Object.getOwnPropertySymbols) { var ye = Object.getOwnPropertySymbols(Q); ce && (ye = ye.filter(function(Ae) { return Object.getOwnPropertyDescriptor(Q, Ae).enumerable; })), pe.push.apply(pe, ye); } return pe; } function a(Q) { for (var ce = 1; ce < arguments.length; ce++) { var pe = arguments[ce] != null ? arguments[ce] : {}; ce % 2 ? r(Object(pe), !0).forEach(function(ye) { n(Q, ye, pe[ye]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(Q, Object.getOwnPropertyDescriptors(pe)) : r(Object(pe)).forEach(function(ye) { Object.defineProperty(Q, ye, Object.getOwnPropertyDescriptor(pe, ye)); }); } return Q; } function o(Q, ce) { if (Q == null) return {}; var pe, ye, Ae = function(st, Ke) { if (st == null) return {}; var at, vt, ut = {}, jt = Object.keys(st); for (vt = 0; vt < jt.length; vt++) at = jt[vt], Ke.indexOf(at) >= 0 || (ut[at] = st[at]); return ut; }(Q, ce); if (Object.getOwnPropertySymbols) { var Ze = Object.getOwnPropertySymbols(Q); for (ye = 0; ye < Ze.length; ye++) pe = Ze[ye], ce.indexOf(pe) >= 0 || Object.prototype.propertyIsEnumerable.call(Q, pe) && (Ae[pe] = Q[pe]); } return Ae; } function i(Q, ce) { return function(pe) { if (Array.isArray(pe)) return pe; }(Q) || function(pe, ye) { if (Symbol.iterator in Object(pe) || Object.prototype.toString.call(pe) === "[object Arguments]") { var Ae = [], Ze = !0, st = !1, Ke = void 0; try { for (var at, vt = pe[Symbol.iterator](); !(Ze = (at = vt.next()).done) && (Ae.push(at.value), !ye || Ae.length !== ye); Ze = !0) ; } catch (ut) { st = !0, Ke = ut; } finally { try { Ze || vt.return == null || vt.return(); } finally { if (st) throw Ke; } } return Ae; } }(Q, ce) || function() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }(); } function s(Q) { return function(ce) { if (Array.isArray(ce)) { for (var pe = 0, ye = new Array(ce.length); pe < ce.length; pe++) ye[pe] = ce[pe]; return ye; } }(Q) || function(ce) { if (Symbol.iterator in Object(ce) || Object.prototype.toString.call(ce) === "[object Arguments]") return Array.from(ce); }(Q) || function() { throw new TypeError("Invalid attempt to spread non-iterable instance"); }(); } function l(Q) { var ce, pe = "algoliasearch-client-js-".concat(Q.key), ye = function() { return ce === void 0 && (ce = Q.localStorage || window.localStorage), ce; }, Ae = function() { return JSON.parse(ye().getItem(pe) || "{}"); }, Ze = function(Ke) { ye().setItem(pe, JSON.stringify(Ke)); }, st = function() { var Ke = Q.timeToLive ? 1e3 * Q.timeToLive : null, at = Ae(), vt = Object.fromEntries(Object.entries(at).filter(function(jt) { return i(jt, 2)[1].timestamp !== void 0; })); if (Ze(vt), Ke) { var ut = Object.fromEntries(Object.entries(vt).filter(function(jt) { var zt = i(jt, 2)[1], cn = (/* @__PURE__ */ new Date()).getTime(); return !(zt.timestamp + Ke < cn); })); Ze(ut); } }; return { get: function(Ke, at) { var vt = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : { miss: function() { return Promise.resolve(); } }; return Promise.resolve().then(function() { st(); var ut = JSON.stringify(Ke); return Ae()[ut]; }).then(function(ut) { return Promise.all([ut ? ut.value : at(), ut !== void 0]); }).then(function(ut) { var jt = i(ut, 2), zt = jt[0], cn = jt[1]; return Promise.all([zt, cn || vt.miss(zt)]); }).then(function(ut) { return i(ut, 1)[0]; }); }, set: function(Ke, at) { return Promise.resolve().then(function() { var vt = Ae(); return vt[JSON.stringify(Ke)] = { timestamp: (/* @__PURE__ */ new Date()).getTime(), value: at }, ye().setItem(pe, JSON.stringify(vt)), at; }); }, delete: function(Ke) { return Promise.resolve().then(function() { var at = Ae(); delete at[JSON.stringify(Ke)], ye().setItem(pe, JSON.stringify(at)); }); }, clear: function() { return Promise.resolve().then(function() { ye().removeItem(pe); }); } }; } function u(Q) { var ce = s(Q.caches), pe = ce.shift(); return pe === void 0 ? { get: function(ye, Ae) { var Ze = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : { miss: function() { return Promise.resolve(); } }, st = Ae(); return st.then(function(Ke) { return Promise.all([Ke, Ze.miss(Ke)]); }).then(function(Ke) { return i(Ke, 1)[0]; }); }, set: function(ye, Ae) { return Promise.resolve(Ae); }, delete: function(ye) { return Promise.resolve(); }, clear: function() { return Promise.resolve(); } } : { get: function(ye, Ae) { var Ze = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : { miss: function() { return Promise.resolve(); } }; return pe.get(ye, Ae, Ze).catch(function() { return u({ caches: ce }).get(ye, Ae, Ze); }); }, set: function(ye, Ae) { return pe.set(ye, Ae).catch(function() { return u({ caches: ce }).set(ye, Ae); }); }, delete: function(ye) { return pe.delete(ye).catch(function() { return u({ caches: ce }).delete(ye); }); }, clear: function() { return pe.clear().catch(function() { return u({ caches: ce }).clear(); }); } }; } function c() { var Q = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : { serializable: !0 }, ce = {}; return { get: function(pe, ye) { var Ae = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : { miss: function() { return Promise.resolve(); } }, Ze = JSON.stringify(pe); if (Ze in ce) return Promise.resolve(Q.serializable ? JSON.parse(ce[Ze]) : ce[Ze]); var st = ye(), Ke = Ae && Ae.miss || function() { return Promise.resolve(); }; return st.then(function(at) { return Ke(at); }).then(function() { return st; }); }, set: function(pe, ye) { return ce[JSON.stringify(pe)] = Q.serializable ? JSON.stringify(ye) : ye, Promise.resolve(ye); }, delete: function(pe) { return delete ce[JSON.stringify(pe)], Promise.resolve(); }, clear: function() { return ce = {}, Promise.resolve(); } }; } function d(Q, ce, pe) { var ye = { "x-algolia-api-key": pe, "x-algolia-application-id": ce }; return { headers: function() { return Q === g.WithinHeaders ? ye : {}; }, queryParameters: function() { return Q === g.WithinQueryParameters ? ye : {}; } }; } function f(Q) { var ce = 0; return Q(function pe() { return ce++, new Promise(function(ye) { setTimeout(function() { ye(Q(pe)); }, Math.min(100 * ce, 1e3)); }); }); } function h(Q) { var ce = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : function(pe, ye) { return Promise.resolve(); }; return Object.assign(Q, { wait: function(pe) { return h(Q.then(function(ye) { return Promise.all([ce(ye, pe), ye]); }).then(function(ye) { return ye[1]; })); } }); } function p(Q) { for (var ce = Q.length - 1; ce > 0; ce--) { var pe = Math.floor(Math.random() * (ce + 1)), ye = Q[ce]; Q[ce] = Q[pe], Q[pe] = ye; } return Q; } function v(Q, ce) { return ce && Object.keys(ce).forEach(function(pe) { Q[pe] = ce[pe](Q); }), Q; } function m(Q) { for (var ce = arguments.length, pe = new Array(ce > 1 ? ce - 1 : 0), ye = 1; ye < ce; ye++) pe[ye - 1] = arguments[ye]; var Ae = 0; return Q.replace(/%s/g, function() { return encodeURIComponent(pe[Ae++]); }); } var g = { WithinQueryParameters: 0, WithinHeaders: 1 }; function y(Q, ce) { var pe = Q || {}, ye = pe.data || {}; return Object.keys(pe).forEach(function(Ae) { ["timeout", "headers", "queryParameters", "data", "cacheable"].indexOf(Ae) === -1 && (ye[Ae] = pe[Ae]); }), { data: Object.entries(ye).length > 0 ? ye : void 0, timeout: pe.timeout || ce, headers: pe.headers || {}, queryParameters: pe.queryParameters || {}, cacheable: pe.cacheable }; } var x = { Read: 1, Write: 2, Any: 3 }, w = 1, k = 2, C = 3; function S(Q) { var ce = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : w; return a(a({}, Q), {}, { status: ce, lastUpdate: Date.now() }); } function _(Q) { return typeof Q == "string" ? { protocol: "https", url: Q, accept: x.Any } : { protocol: Q.protocol || "https", url: Q.url, accept: Q.accept || x.Any }; } var T = "DELETE", O = "GET", $ = "POST", A = "PUT"; function N(Q, ce) { return Promise.all(ce.map(function(pe) { return Q.get(pe, function() { return Promise.resolve(S(pe)); }); })).then(function(pe) { var ye = pe.filter(function(st) { return function(Ke) { return Ke.status === w || Date.now() - Ke.lastUpdate > 12e4; }(st); }), Ae = pe.filter(function(st) { return function(Ke) { return Ke.status === C && Date.now() - Ke.lastUpdate <= 12e4; }(st); }), Ze = [].concat(s(ye), s(Ae)); return { getTimeout: function(st, Ke) { return (Ae.length === 0 && st === 0 ? 1 : Ae.length + 3 + st) * Ke; }, statelessHosts: Ze.length > 0 ? Ze.map(function(st) { return _(st); }) : ce }; }); } function L(Q, ce, pe, ye) { var Ae = [], Ze = function(zt, cn) { if (!(zt.method === O || zt.data === void 0 && cn.data === void 0)) { var an = Array.isArray(zt.data) ? zt.data : a(a({}, zt.data), cn.data); return JSON.stringify(an); } }(pe, ye), st = function(zt, cn) { var an = a(a({}, zt.headers), cn.headers), Hn = {}; return Object.keys(an).forEach(function(or) { var Wa = an[or]; Hn[or.toLowerCase()] = Wa; }), Hn; }(Q, ye), Ke = pe.method, at = pe.method !== O ? {} : a(a({}, pe.data), ye.data), vt = a(a(a({ "x-algolia-agent": Q.userAgent.value }, Q.queryParameters), at), ye.queryParameters), ut = 0, jt = function zt(cn, an) { var Hn = cn.pop(); if (Hn === void 0) throw { name: "RetryError", message: "Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.", transporterStackTrace: z(Ae) }; var or = { data: Ze, headers: st, method: Ke, url: B(Hn, pe.path, vt), connectTimeout: an(ut, Q.timeouts.connect), responseTimeout: an(ut, ye.timeout) }, Wa = function(Ka) { var wa = { request: or, response: Ka, host: Hn, triesLeft: cn.length }; return Ae.push(wa), wa; }, qh = { onSuccess: function(Ka) { return function(wa) { try { return JSON.parse(wa.content); } catch (wc) { throw /* @__PURE__ */ function(jl, gp) { return { name: "DeserializationError", message: jl, response: gp }; }(wc.message, wa); } }(Ka); }, onRetry: function(Ka) { var wa = Wa(Ka); return Ka.isTimedOut && ut++, Promise.all([Q.logger.info("Retryable failure", Z(wa)), Q.hostsCache.set(Hn, S(Hn, Ka.isTimedOut ? C : k))]).then(function() { return zt(cn, an); }); }, onFail: function(Ka) { throw Wa(Ka), function(wa, wc) { var jl = wa.content, gp = wa.status, Wh = jl; try { Wh = JSON.parse(jl).message; } catch { } return /* @__PURE__ */ function(mx, yx, zK) { return { name: "ApiError", message: mx, status: yx, transporterStackTrace: zK }; }(Wh, gp, wc); }(Ka, z(Ae)); } }; return Q.requester.send(or).then(function(Ka) { return function(wa, wc) { return function(jl) { var gp = jl.status; return jl.isTimedOut || function(Wh) { var mx = Wh.isTimedOut, yx = Wh.status; return !mx && ~~yx == 0; }(jl) || ~~(gp / 100) != 2 && ~~(gp / 100) != 4; }(wa) ? wc.onRetry(wa) : ~~(wa.status / 100) == 2 ? wc.onSuccess(wa) : wc.onFail(wa); }(Ka, qh); }); }; return N(Q.hostsCache, ce).then(function(zt) { return jt(s(zt.statelessHosts).reverse(), zt.getTimeout); }); } function R(Q) { var ce = Q.hostsCache, pe = Q.logger, ye = Q.requester, Ae = Q.requestsCache, Ze = Q.responsesCache, st = Q.timeouts, Ke = Q.userAgent, at = Q.hosts, vt = Q.queryParameters, ut = { hostsCache: ce, logger: pe, requester: ye, requestsCache: Ae, responsesCache: Ze, timeouts: st, userAgent: Ke, headers: Q.headers, queryParameters: vt, hosts: at.map(function(jt) { return _(jt); }), read: function(jt, zt) { var cn = y(zt, ut.timeouts.read), an = function() { return L(ut, ut.hosts.filter(function(or) { return (or.accept & x.Read) != 0; }), jt, cn); }; if ((cn.cacheable !== void 0 ? cn.cacheable : jt.cacheable) !== !0) return an(); var Hn = { request: jt, mappedRequestOptions: cn, transporter: { queryParameters: ut.queryParameters, headers: ut.headers } }; return ut.responsesCache.get(Hn, function() { return ut.requestsCache.get(Hn, function() { return ut.requestsCache.set(Hn, an()).then(function(or) { return Promise.all([ut.requestsCache.delete(Hn), or]); }, function(or) { return Promise.all([ut.requestsCache.delete(Hn), Promise.reject(or)]); }).then(function(or) { var Wa = i(or, 2); return Wa[0], Wa[1]; }); }); }, { miss: function(or) { return ut.responsesCache.set(Hn, or); } }); }, write: function(jt, zt) { return L(ut, ut.hosts.filter(function(cn) { return (cn.accept & x.Write) != 0; }), jt, y(zt, ut.timeouts.write)); } }; return ut; } function P(Q) { var ce = { value: "Algolia for JavaScript (".concat(Q, ")"), add: function(pe) { var ye = "; ".concat(pe.segment).concat(pe.version !== void 0 ? " (".concat(pe.version, ")") : ""); return ce.value.indexOf(ye) === -1 && (ce.value = "".concat(ce.value).concat(ye)), ce; } }; return ce; } function B(Q, ce, pe) { var ye = M(pe), Ae = "".concat(Q.protocol, "://").concat(Q.url, "/").concat(ce.charAt(0) === "/" ? ce.substr(1) : ce); return ye.length && (Ae += "?".concat(ye)), Ae; } function M(Q) { return Object.keys(Q).map(function(ce) { return m("%s=%s", ce, (pe = Q[ce], Object.prototype.toString.call(pe) === "[object Object]" || Object.prototype.toString.call(pe) === "[object Array]" ? JSON.stringify(Q[ce]) : Q[ce])); var pe; }).join("&"); } function z(Q) { return Q.map(function(ce) { return Z(ce); }); } function Z(Q) { var ce = Q.request.headers["x-algolia-api-key"] ? { "x-algolia-api-key": "*****" } : {}; return a(a({}, Q), {}, { request: a(a({}, Q.request), {}, { headers: a(a({}, Q.request.headers), ce) }) }); } var G = function(Q) { return function(ce, pe) { return Q.transporter.write({ method: $, path: "2/abtests", data: ce }, pe); }; }, J = function(Q) { return function(ce, pe) { return Q.transporter.write({ method: T, path: m("2/abtests/%s", ce) }, pe); }; }, se = function(Q) { return function(ce, pe) { return Q.transporter.read({ method: O, path: m("2/abtests/%s", ce) }, pe); }; }, ve = function(Q) { return function(ce) { return Q.transporter.read({ method: O, path: "2/abtests" }, ce); }; }, ge = function(Q) { return function(ce, pe) { return Q.transporter.write({ method: $, path: m("2/abtests/%s/stop", ce) }, pe); }; }, oe = function(Q) { return function(ce) { return Q.transporter.read({ method: O, path: "1/strategies/personalization" }, ce); }; }, ee = function(Q) { return function(ce, pe) { return Q.transporter.write({ method: $, path: "1/strategies/personalization", data: ce }, pe); }; }; function q(Q) { return function ce(pe) { return Q.request(pe).then(function(ye) { if (Q.batch !== void 0 && Q.batch(ye.hits), !Q.shouldStop(ye)) return ye.cursor ? ce({ cursor: ye.cursor }) : ce({ page: (pe.page || 0) + 1 }); }); }({}); } var Y = function(Q) { return function(ce, pe) { var ye = pe || {}, Ae = ye.queryParameters, Ze = o(ye, ["queryParameters"]), st = a({ acl: ce }, Ae !== void 0 ? { queryParameters: Ae } : {}); return h(Q.transporter.write({ method: $, path: "1/keys", data: st }, Ze), function(Ke, at) { return f(function(vt) { return Be(Q)(Ke.key, at).catch(function(ut) { if (ut.status !== 404) throw ut; return vt(); }); }); }); }; }, te = function(Q) { return function(ce, pe, ye) { var Ae = y(ye); return Ae.queryParameters["X-Algolia-User-ID"] = ce, Q.transporter.write({ method: $, path: "1/clusters/mapping", data: { cluster: pe } }, Ae); }; }, we = function(Q) { return function(ce, pe, ye) { return Q.transporter.write({ method: $, path: "1/clusters/mapping/batch", data: { users: ce, cluster: pe } }, ye); }; }, Oe = function(Q) { return function(ce, pe) { return h(Q.transporter.write({ method: $, path: m("/1/dictionaries/%s/batch", ce), data: { clearExistingDictionaryEntries: !0, requests: { action: "addEntry", body: [] } } }, pe), function(ye, Ae) { return Kt(Q)(ye.taskID, Ae); }); }; }, Ne = function(Q) { return function(ce, pe, ye) { return h(Q.transporter.write({ method: $, path: m("1/indexes/%s/operation", ce), data: { operation: "copy", destination: pe } }, ye), function(Ae, Ze) { return le(Q)(ce, { methods: { waitTask: gr } }).waitTask(Ae.taskID, Ze); }); }; }, xe = function(Q) { return function(ce, pe, ye) { return Ne(Q)(ce, pe, a(a({}, ye), {}, { scope: [gx.Rules] })); }; }, $e = function(Q) { return function(ce, pe, ye) { return Ne(Q)(ce, pe, a(a({}, ye), {}, { scope: [gx.Settings] })); }; }, Se = function(Q) { return function(ce, pe, ye) { return Ne(Q)(ce, pe, a(a({}, ye), {}, { scope: [gx.Synonyms] })); }; }, Pe = function(Q) { return function(ce, pe) { return ce.method === O ? Q.transporter.read(ce, pe) : Q.transporter.write(ce, pe); }; }, Me = function(Q) { return function(ce, pe) { return h(Q.transporter.write({ method: T, path: m("1/keys/%s", ce) }, pe), function(ye, Ae) { return f(function(Ze) { return Be(Q)(ce, Ae).then(Ze).catch(function(st) { if (st.status !== 404) throw st; }); }); }); }; }, je = function(Q) { return function(ce, pe, ye) { var Ae = pe.map(function(Ze) { return { action: "deleteEntry", body: { objectID: Ze } }; }); return h(Q.transporter.write({ method: $, path: m("/1/dictionaries/%s/batch", ce), data: { clearExistingDictionaryEntries: !1, requests: Ae } }, ye), function(Ze, st) { return Kt(Q)(Ze.taskID, st); }); }; }, Be = function(Q) { return function(ce, pe) { return Q.transporter.read({ method: O, path: m("1/keys/%s", ce) }, pe); }; }, We = function(Q) { return function(ce, pe) { return Q.transporter.read({ method: O, path: m("1/task/%s", ce.toString()) }, pe); }; }, qe = function(Q) { return function(ce) { return Q.transporter.read({ method: O, path: "/1/dictionaries/*/settings" }, ce); }; }, Ge = function(Q) { return function(ce) { return Q.transporter.read({ method: O, path: "1/logs" }, ce); }; }, E = function(Q) { return function(ce) { return Q.transporter.read({ method: O, path: "1/clusters/mapping/top" }, ce); }; }, V = function(Q) { return function(ce, pe) { return Q.transporter.read({ method: O, path: m("1/clusters/mapping/%s", ce) }, pe); }; }, ie = function(Q) { return function(ce) { var pe = ce || {}, ye = pe.retrieveMappings, Ae = o(pe, ["retrieveMappings"]); return ye === !0 && (Ae.getClusters = !0), Q.transporter.read({ method: O, path: "1/clusters/mapping/pending" }, Ae); }; }, le = function(Q) { return function(ce) { var pe = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, ye = { transporter: Q.transporter, appId: Q.appId, indexName: ce }; return v(ye, pe.methods); }; }, re = function(Q) { return function(ce) { return Q.transporter.read({ method: O, path: "1/keys" }, ce); }; }, ke = function(Q) { return function(ce) { return Q.transporter.read({ method: O, path: "1/clusters" }, ce); }; }, fe = function(Q) { return function(ce) { return Q.transporter.read({ method: O, path: "1/indexes" }, ce); }; }, Ee = function(Q) { return function(ce) { return Q.transporter.read({ method: O, path: "1/clusters/mapping" }, ce); }; }, ze = function(Q) { return function(ce, pe, ye) { return h(Q.transporter.write({ method: $, path: m("1/indexes/%s/operation", ce), data: { operation: "move", destination: pe } }, ye), function(Ae, Ze) { return le(Q)(ce, { methods: { waitTask: gr } }).waitTask(Ae.taskID, Ze); }); }; }, Ve = function(Q) { return function(ce, pe) { return h(Q.transporter.write({ method: $, path: "1/indexes/*/batch", data: { requests: ce } }, pe), function(ye, Ae) { return Promise.all(Object.keys(ye.taskID).map(function(Ze) { return le(Q)(Ze, { methods: { waitTask: gr } }).waitTask(ye.taskID[Ze], Ae); })); }); }; }, me = function(Q) { return function(ce, pe) { return Q.transporter.read({ method: $, path: "1/indexes/*/objects", data: { requests: ce } }, pe); }; }, _e = function(Q) { return function(ce, pe) { var ye = ce.map(function(Ae) { return a(a({}, Ae), {}, { params: M(Ae.params || {}) }); }); return Q.transporter.read({ method: $, path: "1/indexes/*/queries", data: { requests: ye }, cacheable: !0 }, pe); }; }, Ce = function(Q) { return function(ce, pe) { return Promise.all(ce.map(function(ye) { var Ae = ye.params, Ze = Ae.facetName, st = Ae.facetQuery, Ke = o(Ae, ["facetName", "facetQuery"]); return le(Q)(ye.indexName, { methods: { searchForFacetValues: F_ } }).searchForFacetValues(Ze, st, a(a({}, pe), Ke)); })); }; }, Le = function(Q) { return function(ce, pe) { var ye = y(pe); return ye.queryParameters["X-Algolia-User-ID"] = ce, Q.transporter.write({ method: T, path: "1/clusters/mapping" }, ye); }; }, yt = function(Q) { return function(ce, pe, ye) { var Ae = pe.map(function(Ze) { return { action: "addEntry", body: Ze }; }); return h(Q.transporter.write({ method: $, path: m("/1/dictionaries/%s/batch", ce), data: { clearExistingDictionaryEntries: !0, requests: Ae } }, ye), function(Ze, st) { return Kt(Q)(Ze.taskID, st); }); }; }, dt = function(Q) { return function(ce, pe) { return h(Q.transporter.write({ method: $, path: m("1/keys/%s/restore", ce) }, pe), function(ye, Ae) { return f(function(Ze) { return Be(Q)(ce, Ae).catch(function(st) { if (st.status !== 404) throw st; return Ze(); }); }); }); }; }, _t = function(Q) { return function(ce, pe, ye) { var Ae = pe.map(function(Ze) { return { action: "addEntry", body: Ze }; }); return h(Q.transporter.write({ method: $, path: m("/1/dictionaries/%s/batch", ce), data: { clearExistingDictionaryEntries: !1, requests: Ae } }, ye), function(Ze, st) { return Kt(Q)(Ze.taskID, st); }); }; }, bt = function(Q) { return function(ce, pe, ye) { return Q.transporter.read({ method: $, path: m("/1/dictionaries/%s/search", ce), data: { query: pe }, cacheable: !0 }, ye); }; }, Ct = function(Q) { return function(ce, pe) { return Q.transporter.read({ method: $, path: "1/clusters/mapping/search", data: { query: ce } }, pe); }; }, nn = function(Q) { return function(ce, pe) { return h(Q.transporter.write({ method: A, path: "/1/dictionaries/*/settings", data: ce }, pe), function(ye, Ae) { return Kt(Q)(ye.taskID, Ae); }); }; }, Dt = function(Q) { return function(ce, pe) { var ye = Object.assign({}, pe), Ae = pe || {}, Ze = Ae.queryParameters, st = o(Ae, ["queryParameters"]), Ke = Ze ? { queryParameters: Ze } : {}, at = ["acl", "indexes", "referers", "restrictSources", "queryParameters", "description", "maxQueriesPerIPPerHour", "maxHitsPerQuery"]; return h(Q.transporter.write({ method: A, path: m("1/keys/%s", ce), data: Ke }, st), function(vt, ut) { return f(function(jt) { return Be(Q)(ce, ut).then(function(zt) { return function(cn) { return Object.keys(ye).filter(function(an) { return at.indexOf(an) !== -1; }).every(function(an) { if (Array.isArray(cn[an]) && Array.isArray(ye[an])) { var Hn = cn[an]; return Hn.length === ye[an].length && Hn.every(function(or, Wa) { return or === ye[an][Wa]; }); } return cn[an] === ye[an]; }); }(zt) ? Promise.resolve() : jt(); }); }); }); }; }, Kt = function(Q) { return function(ce, pe) { return f(function(ye) { return We(Q)(ce, pe).then(function(Ae) { return Ae.status !== "published" ? ye() : void 0; }); }); }; }, on = function(Q) { return function(ce, pe) { return h(Q.transporter.write({ method: $, path: m("1/indexes/%s/batch", Q.indexName), data: { requests: ce } }, pe), function(ye, Ae) { return gr(Q)(ye.taskID, Ae); }); }; }, rn = function(Q) { return function(ce) { return q(a(a({ shouldStop: function(pe) { return pe.cursor === void 0; } }, ce), {}, { request: function(pe) { return Q.transporter.read({ method: $, path: m("1/indexes/%s/browse", Q.indexName), data: pe }, ce); } })); }; }, Qt = function(Q) { return function(ce) { var pe = a({ hitsPerPage: 1e3 }, ce); return q(a(a({ shouldStop: function(ye) { return ye.hits.length < pe.hitsPerPage; } }, pe), {}, { request: function(ye) { return A_(Q)("", a(a({}, pe), ye)).then(function(Ae) { return a(a({}, Ae), {}, { hits: Ae.hits.map(function(Ze) { return delete Ze._highlightResult, Ze; }) }); }); } })); }; }, Sn = function(Q) { return function(ce) { var pe = a({ hitsPerPage: 1e3 }, ce); return q(a(a({ shouldStop: function(ye) { return ye.hits.length < pe.hitsPerPage; } }, pe), {}, { request: function(ye) { return I_(Q)("", a(a({}, pe), ye)).then(function(Ae) { return a(a({}, Ae), {}, { hits: Ae.hits.map(function(Ze) { return delete Ze._highlightResult, Ze; }) }); }); } })); }; }, En = function(Q) { return function(ce, pe, ye) { var Ae = ye || {}, Ze = Ae.batchSize, st = o(Ae, ["batchSize"]), Ke = { taskIDs: [], objectIDs: [] }; return h(function at() { var vt, ut = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0, jt = []; for (vt = ut; vt < ce.length && (jt.push(ce[vt]), jt.length !== (Ze || 1e3)); vt++) ; return jt.length === 0 ? Promise.resolve(Ke) : on(Q)(jt.map(function(zt) { return { action: pe, body: zt }; }), st).then(function(zt) { return Ke.objectIDs = Ke.objectIDs.concat(zt.objectIDs), Ke.taskIDs.push(zt.taskID), vt++, at(vt); }); }(), function(at, vt) { return Promise.all(at.taskIDs.map(function(ut) { return gr(Q)(ut, vt); })); }); }; }, pn = function(Q) { return function(ce) { return h(Q.transporter.write({ method: $, path: m("1/indexes/%s/clear", Q.indexName) }, ce), function(pe, ye) { return gr(Q)(pe.taskID, ye); }); }; }, St = function(Q) { return function(ce) { var pe = ce || {}, ye = pe.forwardToReplicas, Ae = y(o(pe, ["forwardToReplicas"])); return ye && (Ae.queryParameters.forwardToReplicas = 1), h(Q.transporter.write({ method: $, path: m("1/indexes/%s/rules/clear", Q.indexName) }, Ae), function(Ze, st) { return gr(Q)(Ze.taskID, st); }); }; }, Rt = function(Q) { return function(ce) { var pe = ce || {}, ye = pe.forwardToReplicas, Ae = y(o(pe, ["forwardToReplicas"])); return ye && (Ae.queryParameters.forwardToReplicas = 1), h(Q.transporter.write({ method: $, path: m("1/indexes/%s/synonyms/clear", Q.indexName) }, Ae), function(Ze, st) { return gr(Q)(Ze.taskID, st); }); }; }, qt = function(Q) { return function(ce, pe) { return h(Q.transporter.write({ method: $, path: m("1/indexes/%s/deleteByQuery", Q.indexName), data: ce }, pe), function(ye, Ae) { return gr(Q)(ye.taskID, Ae); }); }; }, _n = function(Q) { return function(ce) { return h(Q.transporter.write({ method: T, path: m("1/indexes/%s", Q.indexName) }, ce), function(pe, ye) { return gr(Q)(pe.taskID, ye); }); }; }, _r = function(Q) { return function(ce, pe) { return h(D(Q)([ce], pe).then(function(ye) { return { taskID: ye.taskIDs[0] }; }), function(ye, Ae) { return gr(Q)(ye.taskID, Ae); }); }; }, D = function(Q) { return function(ce, pe) { var ye = ce.map(function(Ae) { return { objectID: Ae }; }); return En(Q)(ye, vp.DeleteObject, pe); }; }, ae = function(Q) { return function(ce, pe) { var ye = pe || {}, Ae = ye.forwardToReplicas, Ze = y(o(ye, ["forwardToReplicas"])); return Ae && (Ze.queryParameters.forwardToReplicas = 1), h(Q.transporter.write({ method: T, path: m("1/indexes/%s/rules/%s", Q.indexName, ce) }, Ze), function(st, Ke) { return gr(Q)(st.taskID, Ke); }); }; }, Ie = function(Q) { return function(ce, pe) { var ye = pe || {}, Ae = ye.forwardToReplicas, Ze = y(o(ye, ["forwardToReplicas"])); return Ae && (Ze.queryParameters.forwardToReplicas = 1), h(Q.transporter.write({ method: T, path: m("1/indexes/%s/synonyms/%s", Q.indexName, ce) }, Ze), function(st, Ke) { return gr(Q)(st.taskID, Ke); }); }; }, He = function(Q) { return function(ce) { return zo(Q)(ce).then(function() { return !0; }).catch(function(pe) { if (pe.status !== 404) throw pe; return !1; }); }; }, Jt = function(Q) { return function(ce, pe, ye) { return Q.transporter.read({ method: $, path: m("1/answers/%s/prediction", Q.indexName), data: { query: ce, queryLanguages: pe }, cacheable: !0 }, ye); }; }, fn = function(Q) { return function(ce, pe) { var ye = pe || {}, Ae = ye.query, Ze = ye.paginate, st = o(ye, ["query", "paginate"]), Ke = 0; return function at() { return $_(Q)(Ae || "", a(a({}, st), {}, { page: Ke })).then(function(vt) { for (var ut = 0, jt = Object.entries(vt.hits); ut < jt.length; ut++) { var zt = i(jt[ut], 2), cn = zt[0], an = zt[1]; if (ce(an)) return { object: an, position: parseInt(cn, 10), page: Ke }; } if (Ke++, Ze === !1 || Ke >= vt.nbPages) throw { name: "ObjectNotFoundError", message: "Object not found." }; return at(); }); }(); }; }, un = function(Q) { return function(ce, pe) { return Q.transporter.read({ method: O, path: m("1/indexes/%s/%s", Q.indexName, ce) }, pe); }; }, en = function() { return function(Q, ce) { for (var pe = 0, ye = Object.entries(Q.hits); pe < ye.length; pe++) { var Ae = i(ye[pe], 2), Ze = Ae[0]; if (Ae[1].objectID === ce) return parseInt(Ze, 10); } return -1; }; }, Gt = function(Q) { return function(ce, pe) { var ye = pe || {}, Ae = ye.attributesToRetrieve, Ze = o(ye, ["attributesToRetrieve"]), st = ce.map(function(Ke) { return a({ indexName: Q.indexName, objectID: Ke }, Ae ? { attributesToRetrieve: Ae } : {}); }); return Q.transporter.read({ method: $, path: "1/indexes/*/objects", data: { requests: st } }, Ze); }; }, Hr = function(Q) { return function(ce, pe) { return Q.transporter.read({ method: O, path: m("1/indexes/%s/rules/%s", Q.indexName, ce) }, pe); }; }, zo = function(Q) { return function(ce) { return Q.transporter.read({ method: O, path: m("1/indexes/%s/settings", Q.indexName), data: { getVersion: 2 } }, ce); }; }, mc = function(Q) { return function(ce, pe) { return Q.transporter.read({ method: O, path: m("1/indexes/%s/synonyms/%s", Q.indexName, ce) }, pe); }; }, yc = function(Q) { return function(ce, pe) { return h(hp(Q)([ce], pe).then(function(ye) { return { objectID: ye.objectIDs[0], taskID: ye.taskIDs[0] }; }), function(ye, Ae) { return gr(Q)(ye.taskID, Ae); }); }; }, hp = function(Q) { return function(ce, pe) { var ye = pe || {}, Ae = ye.createIfNotExists, Ze = o(ye, ["createIfNotExists"]), st = Ae ? vp.PartialUpdateObject : vp.PartialUpdateObjectNoCreate; return En(Q)(ce, st, Ze); }; }, Xn = function(Q) { return function(ce, pe) { var ye = pe || {}, Ae = ye.safe, Ze = ye.autoGenerateObjectIDIfNotExist, st = ye.batchSize, Ke = o(ye, ["safe", "autoGenerateObjectIDIfNotExist", "batchSize"]), at = function(an, Hn, or, Wa) { return h(Q.transporter.write({ method: $, path: m("1/indexes/%s/operation", an), data: { operation: or, destination: Hn } }, Wa), function(qh, Ka) { return gr(Q)(qh.taskID, Ka); }); }, vt = Math.random().toString(36).substring(7), ut = "".concat(Q.indexName, "_tmp_").concat(vt), jt = Rn({ appId: Q.appId, transporter: Q.transporter, indexName: ut }), zt = [], cn = at(Q.indexName, ut, "copy", a(a({}, Ke), {}, { scope: ["settings", "synonyms", "rules"] })); return zt.push(cn), h((Ae ? cn.wait(Ke) : cn).then(function() { var an = jt(ce, a(a({}, Ke), {}, { autoGenerateObjectIDIfNotExist: Ze, batchSize: st })); return zt.push(an), Ae ? an.wait(Ke) : an; }).then(function() { var an = at(ut, Q.indexName, "move", Ke); return zt.push(an), Ae ? an.wait(Ke) : an; }).then(function() { return Promise.all(zt); }).then(function(an) { var Hn = i(an, 3), or = Hn[0], Wa = Hn[1], qh = Hn[2]; return { objectIDs: Wa.objectIDs, taskIDs: [or.taskID].concat(s(Wa.taskIDs), [qh.taskID]) }; }), function(an, Hn) { return Promise.all(zt.map(function(or) { return or.wait(Hn); })); }); }; }, Vs = function(Q) { return function(ce, pe) { return hx(Q)(ce, a(a({}, pe), {}, { clearExistingRules: !0 })); }; }, bc = function(Q) { return function(ce, pe) { return vx(Q)(ce, a(a({}, pe), {}, { clearExistingSynonyms: !0 })); }; }, ko = function(Q) { return function(ce, pe) { return h(Rn(Q)([ce], pe).then(function(ye) { return { objectID: ye.objectIDs[0], taskID: ye.taskIDs[0] }; }), function(ye, Ae) { return gr(Q)(ye.taskID, Ae); }); }; }, Rn = function(Q) { return function(ce, pe) { var ye = pe || {}, Ae = ye.autoGenerateObjectIDIfNotExist, Ze = o(ye, ["autoGenerateObjectIDIfNotExist"]), st = Ae ? vp.AddObject : vp.UpdateObject; if (st === vp.UpdateObject) { var Ke = !0, at = !1, vt = void 0; try { for (var ut, jt = ce[Symbol.iterator](); !(Ke = (ut = jt.next()).done); Ke = !0) if (ut.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 (zt) { at = !0, vt = zt; } finally { try { Ke || jt.return == null || jt.return(); } finally { if (at) throw vt; } } } return En(Q)(ce, st, Ze); }; }, Uh = function(Q) { return function(ce, pe) { return hx(Q)([ce], pe); }; }, hx = function(Q) { return function(ce, pe) { var ye = pe || {}, Ae = ye.forwardToReplicas, Ze = ye.clearExistingRules, st = y(o(ye, ["forwardToReplicas", "clearExistingRules"])); return Ae && (st.queryParameters.forwardToReplicas = 1), Ze && (st.queryParameters.clearExistingRules = 1), h(Q.transporter.write({ method: $, path: m("1/indexes/%s/rules/batch", Q.indexName), data: ce }, st), function(Ke, at) { return gr(Q)(Ke.taskID, at); }); }; }, $K = function(Q) { return function(ce, pe) { return vx(Q)([ce], pe); }; }, vx = function(Q) { return function(ce, pe) { var ye = pe || {}, Ae = ye.forwardToReplicas, Ze = ye.clearExistingSynonyms, st = ye.replaceExistingSynonyms, Ke = y(o(ye, ["forwardToReplicas", "clearExistingSynonyms", "replaceExistingSynonyms"])); return Ae && (Ke.queryParameters.forwardToReplicas = 1), (st || Ze) && (Ke.queryParameters.replaceExistingSynonyms = 1), h(Q.transporter.write({ method: $, path: m("1/indexes/%s/synonyms/batch", Q.indexName), data: ce }, Ke), function(at, vt) { return gr(Q)(at.taskID, vt); }); }; }, $_ = function(Q) { return function(ce, pe) { return Q.transporter.read({ method: $, path: m("1/indexes/%s/query", Q.indexName), data: { query: ce }, cacheable: !0 }, pe); }; }, F_ = function(Q) { return function(ce, pe, ye) { return Q.transporter.read({ method: $, path: m("1/indexes/%s/facets/%s/query", Q.indexName, ce), data: { facetQuery: pe }, cacheable: !0 }, ye); }; }, A_ = function(Q) { return function(ce, pe) { return Q.transporter.read({ method: $, path: m("1/indexes/%s/rules/search", Q.indexName), data: { query: ce } }, pe); }; }, I_ = function(Q) { return function(ce, pe) { return Q.transporter.read({ method: $, path: m("1/indexes/%s/synonyms/search", Q.indexName), data: { query: ce } }, pe); }; }, FK = function(Q) { return function(ce, pe) { var ye = pe || {}, Ae = ye.forwardToReplicas, Ze = y(o(ye, ["forwardToReplicas"])); return Ae && (Ze.queryParameters.forwardToReplicas = 1), h(Q.transporter.write({ method: A, path: m("1/indexes/%s/settings", Q.indexName), data: ce }, Ze), function(st, Ke) { return gr(Q)(st.taskID, Ke); }); }; }, gr = function(Q) { return function(ce, pe) { return f(function(ye) { return (/* @__PURE__ */ function(Ae) { return function(Ze, st) { return Ae.transporter.read({ method: O, path: m("1/indexes/%s/task/%s", Ae.indexName, Ze.toString()) }, st); }; }(Q))(ce, pe).then(function(Ae) { return Ae.status !== "published" ? ye() : void 0; }); }); }; }, vp = { AddObject: "addObject", UpdateObject: "updateObject", PartialUpdateObject: "partialUpdateObject", PartialUpdateObjectNoCreate: "partialUpdateObjectNoCreate", DeleteObject: "deleteObject", DeleteIndex: "delete", ClearIndex: "clear" }, gx = { Settings: "settings", Synonyms: "synonyms", Rules: "rules" }, AK = 1, IK = 2, PK = 3, Sm = function(Q) { return function(ce, pe) { var ye = ce.map(function(Ae) { return a(a({}, Ae), {}, { threshold: Ae.threshold || 0 }); }); return Q.transporter.read({ method: $, path: "1/indexes/*/recommendations", data: { requests: ye }, cacheable: !0 }, pe); }; }, LK = function(Q) { return function(ce, pe) { return Sm(Q)(ce.map(function(ye) { return a(a({}, ye), {}, { fallbackParameters: {}, model: "bought-together" }); }), pe); }; }, NK = function(Q) { return function(ce, pe) { return Sm(Q)(ce.map(function(ye) { return a(a({}, ye), {}, { model: "related-products" }); }), pe); }; }, MK = function(Q) { return function(ce, pe) { var ye = ce.map(function(Ae) { return a(a({}, Ae), {}, { model: "trending-facets", threshold: Ae.threshold || 0 }); }); return Q.transporter.read({ method: $, path: "1/indexes/*/recommendations", data: { requests: ye }, cacheable: !0 }, pe); }; }, BK = function(Q) { return function(ce, pe) { var ye = ce.map(function(Ae) { return a(a({}, Ae), {}, { model: "trending-items", threshold: Ae.threshold || 0 }); }); return Q.transporter.read({ method: $, path: "1/indexes/*/recommendations", data: { requests: ye }, cacheable: !0 }, pe); }; }, DK = function(Q) { return function(ce, pe) { return Sm(Q)(ce.map(function(ye) { return a(a({}, ye), {}, { model: "looking-similar" }); }), pe); }; }, RK = function(Q) { return function(ce, pe) { var ye = ce.map(function(Ae) { return a(a({}, Ae), {}, { model: "recommended-for-you", threshold: Ae.threshold || 0 }); }); return Q.transporter.read({ method: $, path: "1/indexes/*/recommendations", data: { requests: ye }, cacheable: !0 }, pe); }; }; function P_(Q, ce, pe) { var ye, Ae = { appId: Q, apiKey: ce, timeouts: { connect: 1, read: 2, write: 30 }, requester: { send: function(Ke) { return new Promise(function(at) { var vt = new XMLHttpRequest(); vt.open(Ke.method, Ke.url, !0), Object.keys(Ke.headers).forEach(function(cn) { return vt.setRequestHeader(cn, Ke.headers[cn]); }); var ut, jt = function(cn, an) { return setTimeout(function() { vt.abort(), at({ status: 0, content: an, isTimedOut: !0 }); }, 1e3 * cn); }, zt = jt(Ke.connectTimeout, "Connection timeout"); vt.onreadystatechange = function() { vt.readyState > vt.OPENED && ut === void 0 && (clearTimeout(zt), ut = jt(Ke.responseTimeout, "Socket timeout")); }, vt.onerror = function() { vt.status === 0 && (clearTimeout(zt), clearTimeout(ut), at({ content: vt.responseText || "Network request failed", status: vt.status, isTimedOut: !1 })); }, vt.onload = function() { clearTimeout(zt), clearTimeout(ut), at({ content: vt.responseText, status: vt.status, isTimedOut: !1 }); }, vt.send(Ke.data); }); } }, logger: (ye = PK, { debug: function(Ke, at) { return AK >= ye && console.debug(Ke, at), Promise.resolve(); }, info: function(Ke, at) { return IK >= ye && console.info(Ke, at), Promise.resolve(); }, error: function(Ke, at) { return console.error(Ke, at), Promise.resolve(); } }), responsesCache: c(), requestsCache: c({ serializable: !1 }), hostsCache: u({ caches: [l({ key: "".concat("4.23.2", "-").concat(Q) }), c()] }), userAgent: P("4.23.2").add({ segment: "Browser" }) }, Ze = a(a({}, Ae), pe), st = function() { return function(Ke) { return function(at) { var vt = at.region || "us", ut = d(g.WithinHeaders, at.appId, at.apiKey), jt = R(a(a({ hosts: [{ url: "personalization.".concat(vt, ".algolia.com") }] }, at), {}, { headers: a(a(a({}, ut.headers()), { "content-type": "application/json" }), at.headers), queryParameters: a(a({}, ut.queryParameters()), at.queryParameters) })); return v({ appId: at.appId, transporter: jt }, at.methods); }(a(a(a({}, Ae), Ke), {}, { methods: { getPersonalizationStrategy: oe, setPersonalizationStrategy: ee } })); }; }; return function(Ke) { var at = Ke.appId, vt = d(Ke.authMode !== void 0 ? Ke.authMode : g.WithinHeaders, at, Ke.apiKey), ut = R(a(a({ hosts: [{ url: "".concat(at, "-dsn.algolia.net"), accept: x.Read }, { url: "".concat(at, ".algolia.net"), accept: x.Write }].concat(p([{ url: "".concat(at, "-1.algolianet.com") }, { url: "".concat(at, "-2.algolianet.com") }, { url: "".concat(at, "-3.algolianet.com") }])) }, Ke), {}, { headers: a(a(a({}, vt.headers()), { "content-type": "application/x-www-form-urlencoded" }), Ke.headers), queryParameters: a(a({}, vt.queryParameters()), Ke.queryParameters) })); return v({ transporter: ut, appId: at, addAlgoliaAgent: function(jt, zt) { ut.userAgent.add({ segment: jt, version: zt }); }, clearCache: function() { return Promise.all([ut.requestsCache.clear(), ut.responsesCache.clear()]).then(function() { }); } }, Ke.methods); }(a(a({}, Ze), {}, { methods: { search: _e, searchForFacetValues: Ce, multipleBatch: Ve, multipleGetObjects: me, multipleQueries: _e, copyIndex: Ne, copySettings: $e, copySynonyms: Se, copyRules: xe, moveIndex: ze, listIndices: fe, getLogs: Ge, listClusters: ke, multipleSearchForFacetValues: Ce, getApiKey: Be, addApiKey: Y, listApiKeys: re, updateApiKey: Dt, deleteApiKey: Me, restoreApiKey: dt, assignUserID: te, assignUserIDs: we, getUserID: V, searchUserIDs: Ct, listUserIDs: Ee, getTopUserIDs: E, removeUserID: Le, hasPendingMappings: ie, clearDictionaryEntries: Oe, deleteDictionaryEntries: je, getDictionarySettings: qe, getAppTask: We, replaceDictionaryEntries: yt, saveDictionaryEntries: _t, searchDictionaryEntries: bt, setDictionarySettings: nn, waitAppTask: Kt, customRequest: Pe, initIndex: function(Ke) { return function(at) { return le(Ke)(at, { methods: { batch: on, delete: _n, findAnswers: Jt, getObject: un, getObjects: Gt, saveObject: ko, saveObjects: Rn, search: $_, searchForFacetValues: F_, waitTask: gr, setSettings: FK, getSettings: zo, partialUpdateObject: yc, partialUpdateObjects: hp, deleteObject: _r, deleteObjects: D, deleteBy: qt, clearObjects: pn, browseObjects: rn, getObjectPosition: en, findObject: fn, exists: He, saveSynonym: $K, saveSynonyms: vx, getSynonym: mc, searchSynonyms: I_, browseSynonyms: Sn, deleteSynonym: Ie, clearSynonyms: Rt, replaceAllObjects: Xn, replaceAllSynonyms: bc, searchRules: A_, getRule: Hr, deleteRule: ae, saveRule: Uh, saveRules: hx, replaceAllRules: Vs, browseRules: Qt, clearRules: St } }); }; }, initAnalytics: function() { return function(Ke) { return function(at) { var vt = at.region || "us", ut = d(g.WithinHeaders, at.appId, at.apiKey), jt = R(a(a({ hosts: [{ url: "analytics.".concat(vt, ".algolia.com") }] }, at), {}, { headers: a(a(a({}, ut.headers()), { "content-type": "application/json" }), at.headers), queryParameters: a(a({}, ut.queryParameters()), at.queryParameters) })); return v({ appId: at.appId, transporter: jt }, at.methods); }(a(a(a({}, Ae), Ke), {}, { methods: { addABTest: G, getABTest: se, getABTests: ve, stopABTest: ge, deleteABTest: J } })); }; }, initPersonalization: st, initRecommendation: function() { return function(Ke) { return Ze.logger.info("The `initRecommendation` method is deprecated. Use `initPersonalization` instead."), st()(Ke); }; }, getRecommendations: Sm, getFrequentlyBoughtTogether: LK, getLookingSimilar: DK, getRecommendedForYou: RK, getRelatedProducts: NK, getTrendingFacets: MK, getTrendingItems: BK } })); } return P_.version = "4.23.2", P_; }); })(wK); var Zrt = wK.exports; const Qrt = /* @__PURE__ */ QTe(Zrt); class xK { constructor(t, n, r = "https://api.pennsieve.io") { this.client = Qrt( t, n ), this.PENNSIEVE_API_LOCATION = r, this.anatomyFacetLabels = []; } initIndex(t) { this.index = this.client.initIndex(t); } getAlgoliaFacets(t) { const n = t.map((i) => i.facetPropPath), r = t.map((i) => i.facetSubpropPath); let a = [], o = 0; return this.index.search("", { sortFacetValuesBy: "alpha", facets: n.concat(r) }).then((i) => (n.map((s) => { const l = t.find((h) => h.facetPropPath == s); var u = []; const c = i.facets; if (c === void 0) return; const d = c[s] == null ? {} : c[s], f = l && c[l.facetSubpropPath] ? Object.keys(c[l.facetSubpropPath]) : []; Object.keys(d).map((h) => { const p = f.reduce((m, g) => { const y = g.split("."); return y.length !== 2 || h === y[0] && m.push({ label: y[1], id: o++, facetPropPath: `${l ? l.facetSubpropPath : void 0}` }), m; }, []); let v = { label: h, id: o++, facetPropPath: s }; p.length > 0 && (v.children = p), u.push(v); }), u.length > 0 && a.push({ label: l ? l.label : "", id: o++, children: u, key: s }); }), a)); } // 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((a) => a.json()).then((a) => { r(a.map((o) => o.doi)); }); }); } // Get all dois given a list of discoverIds _expandDois(t, n = "https://api.pennsieve.io") { return new Promise((r) => { let a = t.map((o) => this._discoverAllDois(o, n)); Promise.all(a).then((o) => { r(o.flat()); }); }); } _processResultsForCards(t) { let n = [], r = {}; for (let a of t) r = { ...a }, r = { anatomy: a.anatomy ? a.anatomy.organ.map((o) => o.curie) : void 0, doi: a.item.curie.split(":")[1], name: a.item.name, description: a.item.description, updated: a.pennsieve ? a.pennsieve.updatedAt : void 0, publishDate: a.pennsieve ? a.pennsieve.publishDate : void 0, datasetId: a.objectID, detailsReady: !1 }, n.push(r); return n; } _processAnatomy(t) { let n = [], r = [], a = [], o = []; 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)); }); }), o = [...new Set(n)], a = [...new Set(r)], this.anatomyFacetLabels = a, o; } _processUberonURL(t) { return t.split("/").pop().replace("_", ":"); } /** * Get Search results * This is using fetch from the Algolia API */ search(t, n = "", r = 10, a = 1) { return new Promise((o) => { this.index.search(n, { facets: ["*"], hitsPerPage: r, page: a - 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]) }; o(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, a = 1) { return new Promise((o) => { this.index.search(n, { facets: ["*"], hitsPerPage: r, page: a - 1, filters: t, attributesToHighlight: [], attributesToRetrieve: [ "objectID", "item.keywords.keyword", "anatomy.organ.name", "anatomy.organ.curie" ] }).then((i) => { o({ forFlatmap: this.processResultsForFlatmap(i.hits), forScaffold: this.processResultsForScaffold(i.hits) }); }); }); } processResultsForFlatmap(t) { return t.map((n) => ({ id: n.objectID, terms: n.anatomy ? n.anatomy.organ.map((r) => r.curie) : [] })); } processResultsForScaffold(t) { let n = {}; return t.forEach((r) => { r.anatomy && r.anatomy.organ && r.anatomy.organ.forEach((a) => { a.name && (n[a.name] ? n[a.name]++ : n[a.name] = 1); }); }), n; } } const O_ = [ { 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", 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" } ]; function IP(e = void 0) { if (e === void 0) return "NOT item.published.status:embargo"; e.forEach((r) => r.label = r.facet); let t = Jrt(e), n = "NOT item.published.status:embargo"; return n = `(${n}) AND `, O_.map((r) => r.facetPropPath).map((r) => { let a = t.filter( (s) => s.facetPropPath == r ), o = "", i = ""; a.map((s) => { let l = s.facetSubPropPath ? s.facetSubPropPath : r; s.AND ? i += `AND "${l}":"${s.label}"` : o += `"${l}":"${s.label}" OR `; }), !(o == "" && i == "") && (o = `(${o.substring(0, o.lastIndexOf(" OR "))})`, n += `${o + i} AND `, n = n.split("()AND ").join("")); }), n.substring(0, n.lastIndexOf(" AND ")); } function Jrt(e) { return e.filter((t) => t.label !== "Show all"); } const Xb = function(e) { return e.charAt(0).toUpperCase() + e.slice(1); }, lC = function(e) { const t = e.toLowerCase(); return $b[t] ? Xb($b[t]) : Xb(t); }, eat = { name: "SearchFilters", components: { MapSvgIcon: Vrt, MapSvgSpriteColor: Yrt, Option: mw, Select: Qg, Popover: j3, Cascader: zz }, 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 }, showFilters: !0, showFiltersText: !0, cascadeSelected: [], cascadeSelectedWithBoolean: [], numberShown: 10, filters: [], facets: ["Species", "Gender", "Organ", "Datasets"], numberDatasetsShown: ["10", "20", "50"], props: { multiple: !0 }, options: [ { value: "Species", label: "Species", children: [{}] } ], presentTags: [] }; }, setup() { const e = $i({}), t = $i({ term: /* @__PURE__ */ new Set(), facet: /* @__PURE__ */ new Set(), facet2: /* @__PURE__ */ new Set() }); return { cascaderTags: e, correctnessCheck: t }; }, computed: { numberOfResultsText: function() { return `${this.entry.numberOfHits} results | Showing`; } }, methods: { createCascaderItemValue: function(e, t = void 0, n = void 0) { let r = e; return t && (r = `${e}>${t}`), t && n && (r = `${e}>${t}>${n}`), !t && n && console.warn( `Warning: ${n} provided without its parent, this will not be shown in the cascader` ), r; }, populateCascader: function() { return new Promise((e) => { this.algoliaClient.getAlgoliaFacets(O_).then((t) => { this.facets = t, mr.emit("available-facets", t), this.options = t, this.options.forEach((n, r) => { this.options[r].total = this.countTotalFacet(n), this.options[r].label = lC(n.label), this.options[r].value = this.createCascaderItemValue( n.key, void 0 ), this.options[r].children.unshift({ value: this.createCascaderItemValue("Show all"), label: "Show all" }), this.options[r].children.forEach((a, o) => { this.options[r].children[o].label = lC( a.label ), this.options[r].children[o].value = this.createCascaderItemValue(n.label, a.label), this.options[r].children[o].children && this.options[r].children[o].children.length > 0 && this.options[r].children[o].children.forEach((i, s) => { this.options[r].children[o].children[s].label = lC(i.label), this.options[r].children[o].children[s].value = this.createCascaderItemValue( n.label, a.label, i.label ); }); }); }); }).finally(() => { e(); }); }); }, /** * Create manual events when cascader tag is closed */ cascadeTagClose: function(e) { let t = []; Object.entries(this.cascaderTags).map((n) => { const r = n[0], a = n[1], o = this.options.filter((s) => s.label == r)[0], i = o.key; for (let s = 0; s < o.children.length; s++) { const l = o.children[s], u = l.label, c = l.value; if (Array.isArray(a)) if (a.length === 0 && u.toLowerCase() === "show all") { t.push([i, c]); break; } else u !== e && a.includes(u) && t.push([i, c]); else Object.entries(a).map((d) => { const f = d[0], h = d[1]; f === u && l.children.map((p) => { const v = p.label, m = p.value; v !== e && h.includes(v) && t.push([i, m]); }); }); } }), this.cascadeEvent(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.options.map((t) => { this.correctnessCheck.term.add(t.label), t.children.map((n) => { this.correctnessCheck.facet.add(n.label), t.label === "Anatomical structure" && n.label !== "Show all" && n.children.map((r) => { this.correctnessCheck.facet2.add(r.label); }); }); }), this.cascaderTags = {}, this.presentTags = [], e.map((t) => { const { facet: n, facet2: r, term: a } = t; this.correctnessCheck.term.has(a) && this.correctnessCheck.facet.has(n) && (r ? this.correctnessCheck.facet2.has(r) && (a in this.cascaderTags ? n in this.cascaderTags[a] ? this.cascaderTags[a][n].push(r) : this.cascaderTags[a][n] = [r] : (this.cascaderTags[a] = {}, this.cascaderTags[a][n] = [r])) : a in this.cascaderTags && a !== "Anatomical structure" ? this.cascaderTags[a].push(n) : n.toLowerCase() !== "show all" ? this.cascaderTags[a] = [n] : this.cascaderTags[a] = []); }), Object.values(this.cascaderTags).map((t) => { const n = Array.isArray(t) ? t : Object.values(t).flat(1); this.presentTags = [...this.presentTags, ...n]; }), this.presentTags = [...new Set(this.presentTags)], 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, a = n.children.filter((i) => i.label === "Show all")[0].value, o = n.total; t[r] === o && (e = e.filter((i) => i[0] !== n.key), delete t[r]), r in t || e.unshift([r, a]); }), e; }, // cascadeEvent: initiate searches based off cascader changes cascadeEvent: function(e) { let t = [...e]; if (t) { if (t = this.showAllEventModifier(t), t = this.showAllEventModifierForAutoCheckAll(t), this.__expandItem__) { let a = 0; this.__expandItem__.length > 1 && (a = 1); const o = t.filter((s) => s[a] == this.__expandItem__[a]), i = t.filter((s) => s[a] !== this.__expandItem__[a]); t = [...o, ...i]; } let n = t.filter((a) => a !== void 0).map((a) => { let { hString: o, bString: i } = this.findHierarachyStringAndBooleanString(a), { facet: s, facet2: l, term: u } = this.getFacetsFromHierarchyString(o); return { facetPropPath: a[0], facet: s, facet2: l, term: u, AND: i // for setting the boolean }; }), r = t.filter((a) => a !== void 0).map((a) => { let o, i = a[0].includes("duplicate") ? a[0].split("duplicate")[0] : a[0], { hString: s, bString: l } = this.findHierarachyStringAndBooleanString(a), { facet: u, facet2: c, term: d } = this.getFacetsFromHierarchyString(s); return c && (u = c, o = "anatomy.organ.name"), { facetPropPath: i, facet: u, term: d, AND: l, // for setting the boolean facetSubPropPath: o // will be used for filters if we are at the third level of the cascader }; }); this.$emit("loading", !0), this.$emit("filterResults", r), this.setCascader(n), this.cssMods(); } }, //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; return e.length >= 3 ? e[2] && (typeof e[2] == "string" || e[2] instanceof String) && e[2].split(">").length > 2 ? (t = e[2], n = e.length == 4 ? e[3] : void 0) : (t = e[1], n = e[2]) : (t = e[1], n = void 0), { hString: t, bString: n }; }, // Splits the terms and facets from the string stored in the cascader getFacetsFromHierarchyString(e) { let t, n, r, a = e.split(">"); return a.length == 3 ? (r = a[2], t = a[1], n = a[0]) : (t = a[1], n = a[0]), { facet: t, facet2: r, term: n }; }, // 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 a; for (let o = n[r].length - 1; o >= 0; o--) if (n[r][o][1].toLowerCase().includes("show all")) { a = n[r].splice(o, 1)[0]; break; } a ? this.previousShowAllChecked[r] && n[r].length > 0 ? t.push(...n[r]) : t.push(a) : t.push(...n[r]); } return t.sort((r, a) => this.__expandItem__ ? r[0] == this.__expandItem__ ? a[0] == this.__expandItem__ ? 0 : -1 : a[0] == this.__expandItem__ ? r[0] == this.__expandItem__ ? 0 : 1 : 0 : 0); } return e; }, cascadeExpandChange: function(e) { this.__expandItem__ = e, this.cssMods(); }, 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(Xb(n.term), n.facet) ]; return n.facet2 && r.push( this.createCascaderItemValue( Xb(n.term), n.facet, n.facet2 ) ), 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) return this.cascadeSelected.filter((n) => n.term != t.term), this.cascadeSelected.push([ t.facetPropPath, this.createCascaderItemValue(t.term, t.facet), this.createCascaderItemValue( t.term, t.facet, t.facet2 ) ]), this.cascadeSelectedWithBoolean.push([ t.facetPropPath, this.createCascaderItemValue(t.term, t.facet), this.createCascaderItemValue( t.term, t.facet, t.facet2 ), t.AND ]), !0; } }, 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(), this.removeTopLevelCascaderCheckboxes(); }, removeTopLevelCascaderCheckboxes: function() { this.$nextTick(() => { document.querySelectorAll( ".sidebar-cascader-popper .el-cascader-menu__list" )[0].querySelectorAll(".el-checkbox__input").forEach((e) => e.style.display = "none"); }); }, /* * 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) return e; for (const t of this.options) if (t.value === e.facetPropPath) for (const n of t.children) { if (n.label === e.facet) return e; if (n.children && n.children.length > 0) { for (const r of n.children) if (r.label === e.facet) return e.facet2 = r.label, e.facet = n.label, e; } } } return !1; }, getHierarchicalValidatedFilters: function(e) { if (e) if (this.cascaderIsReady) { const t = []; return e.forEach((n) => { const r = this.validateAndConvertFilterToHierarchical(n); r && t.push(r); }), t; } else return e; return []; } }, mounted: function() { this.algoliaClient = $i(new xK( 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"); }); } }, tat = (e) => (No("data-v-88a79b0f"), e = e(), Mo(), e), nat = { class: "filters" }, rat = { key: 0, class: "cascader-tag" }, aat = { class: "el-tags-container" }, oat = { class: "el-tags-container" }, iat = { class: "search-filters transition-box" }, sat = { key: 0, class: "filter-default-value" }, lat = /* @__PURE__ */ tat(() => /* @__PURE__ */ W("div", null, [ /* @__PURE__ */ W("strong", null, "Within categories:"), /* @__PURE__ */ et(" OR "), /* @__PURE__ */ W("br"), /* @__PURE__ */ et(" example: 'heart' OR 'colon' "), /* @__PURE__ */ W("br"), /* @__PURE__ */ W("br"), /* @__PURE__ */ W("strong", null, "Between categories:"), /* @__PURE__ */ et(" AND "), /* @__PURE__ */ W("br"), /* @__PURE__ */ et(" example: 'rat' AND 'lung' ") ], -1)), uat = { class: "dataset-shown" }, cat = { class: "dataset-results-feedback" }; function dat(e, t, n, r, a, o) { const i = lt("MapSvgSpriteColor"), s = zf, l = j3, u = zz, c = lt("MapSvgIcon"), d = mw, f = Qg, h = yw; return I(), j("div", nat, [ ue(i), e.presentTags.length > 0 ? (I(), j("div", rat, [ ue(s, { class: "ml-2", type: "info", closable: "", onClose: t[0] || (t[0] = (p) => o.cascadeTagClose(e.presentTags[0])) }, { default: K(() => [ et(Fe(e.presentTags[0]), 1) ]), _: 1 }), e.presentTags.length > 1 ? (I(), de(l, { key: 0, placement: "bottom-start", width: 200, trigger: "hover" }, { default: K(() => [ W("div", aat, [ (I(!0), j(Qe, null, Nt(e.presentTags.slice(1), (p, v) => (I(), de(s, { key: v, class: "ml-2", type: "info", closable: "", onClose: (m) => o.cascadeTagClose(p) }, { default: K(() => [ et(Fe(p), 1) ]), _: 2 }, 1032, ["onClose"]))), 128)) ]) ]), reference: K(() => [ W("div", oat, [ e.presentTags.length > 1 ? (I(), de(s, { key: 0, class: "ml-2", type: "info" }, { default: K(() => [ et(" +" + Fe(e.presentTags.length - 1), 1) ]), _: 1 })) : ne("", !0) ]) ]), _: 1 })) : ne("", !0) ])) : ne("", !0), ue(vr, { name: "el-zoom-in-top" }, { default: K(() => [ Xe((I(), j("span", iat, [ ue(u, { class: "cascader", ref: "cascader", modelValue: e.cascadeSelected, "onUpdate:modelValue": t[1] || (t[1] = (p) => e.cascadeSelected = p), size: "large", placeholder: " ", "collapse-tags": !0, "collapse-tags-tooltip": "", options: e.options, props: e.props, onChange: t[2] || (t[2] = (p) => o.cascadeEvent(p)), onExpandChange: o.cascadeExpandChange, "show-all-levels": !0, "popper-class": "sidebar-cascader-popper" }, null, 8, ["modelValue", "options", "props", "onExpandChange"]), e.showFiltersText ? (I(), j("div", sat, "Filters")) : ne("", !0), ue(l, { title: "How do filters work?", width: "250", trigger: "hover", "append-to-body": !1, "popper-class": "popover" }, { reference: K(() => [ ue(c, { icon: "help", class: "help" }) ]), default: K(() => [ lat ]), _: 1 }) ])), [ [mt, e.showFilters], [h, !e.cascaderIsReady] ]) ]), _: 1 }), W("div", uat, [ W("span", cat, Fe(o.numberOfResultsText), 1), ue(f, { class: "number-shown-select", modelValue: e.numberShown, "onUpdate:modelValue": t[3] || (t[3] = (p) => e.numberShown = p), placeholder: "10", onChange: t[4] || (t[4] = (p) => o.numberShownChanged(p)) }, { default: K(() => [ (I(!0), j(Qe, null, Nt(e.numberDatasetsShown, (p) => (I(), de(d, { key: p, label: p, value: p }, null, 8, ["label", "value"]))), 128)) ]), _: 1 }, 8, ["modelValue"]) ]) ]); } const kK = /* @__PURE__ */ Zi(eat, [["render", dat], ["__scopeId", "data-v-88a79b0f"]]); var pat = async function(e) { if (!e.ok) { let t = await e.json(); throw t ? new Error(t.message) : new Error(e); } return e; }, fat = { searchInput: "", lastSearch: "", results: [], numberOfHits: 0, filter: [], loadingCards: !1, numberPerPage: 10, page: 1, pageModel: 1, start: 0, hasSearched: !1, contextCardEnabled: !1 }; const hat = { components: { SearchFilters: kK, DatasetCard: MW, SearchHistory: BW, Button: Do, Card: Tz, Drawer: R3, Icon: er, Input: hw, Pagination: Zz }, name: "SideBarContent", props: { visible: { type: Boolean, default: !1 }, isDrawer: { type: Boolean, default: !0 }, entry: { type: Object, default: () => fat }, 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 }; } }, methods: { hoverChanged: function(e) { this.$emit("hover-changed", e); }, resetSearch: function() { this.numberOfHits = 0, this.discoverIds = [], this._dois = [], this.results = [], this.loadingCards = !1; }, openSearch: function(e, t = "") { this.searchInput = t, this.resetPageNavigation(), this.cascaderIsReady ? (this.filter = this.$refs.filtersRef.getHierarchicalValidatedFilters(e), 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.filter = e, (!e || e.length == 0) && this.searchAlgolia(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.resetPageNavigation(), this.searchAlgolia(this.filters, this.searchInput), this.$refs.searchHistory.selectValue = "Full search history"; }, searchEvent: function(e = !1) { (e.keyCode === 13 || e instanceof MouseEvent) && (this.resetPageNavigation(), this.searchAlgolia(this.filters, this.searchInput), this.$refs.searchHistory.selectValue = "Full search history", this.$refs.searchHistory.addSearchToHistory( this.filters, this.searchInput )); }, filterUpdate: function(e) { this.filters = [...e], this.resetPageNavigation(), this.searchAlgolia(e, this.searchInput), this.$emit("search-changed", { value: e, type: "filter-update" }); }, searchAlgolia(e, t = "") { this.loadingCards = !0, this.algoliaClient.anatomyInSearch(IP(e), t).then((n) => { mr.emit("anatomy-in-datasets", n.forFlatmap), mr.emit("number-of-datasets-for-anatomies", n.forScaffold); }), this.algoliaClient.search(IP(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, 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, this.pageChange(1); }, pageChange: function(e) { this.start = (e - 1) * this.numberPerPage, this.page = e, this.searchAlgolia( this.filters, this.searchInput, this.numberPerPage, this.page ); }, 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-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, a) => { let o = this.envVars.API_LOCATION + this.searchEndpoint + "?" + this.createfilterParams(t); fetch(o, { signal: n }).then(pat).then((i) => i.json()).then((i) => r(i)).catch((i) => a(i)); }); }, getAlgoliaFacets: async function() { return await this.algoliaClient.getAlgoliaFacets( O_ ); }, searchHistorySearch: function(e) { this.searchInput = e.search, this.filters = e.filters, this.openSearch(e.filters, e.search); } }, mounted: function() { this.algoliaClient = $i(new xK( 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/"; } }, vat = { class: "header" }, gat = { class: "content scrollbar", ref: "content" }, mat = { key: 0, class: "error-feedback" }; function yat(e, t, n, r, a, o) { const i = hw, s = Do, l = kK, u = BW, c = MW, d = Zz, f = Tz, h = yw; return I(), de(f, { "body-style": e.bodyStyle, class: "content-card" }, { header: K(() => [ W("div", vat, [ ue(i, { class: "search-input", placeholder: "Search", modelValue: e.searchInput, "onUpdate:modelValue": t[0] || (t[0] = (p) => e.searchInput = p), onKeyup: o.searchEvent, clearable: "", onClear: o.clearSearchClicked }, null, 8, ["modelValue", "onKeyup", "onClear"]), ue(s, { type: "primary", class: "button", onClick: o.searchEvent, size: "large" }, { default: K(() => [ et(" Search ") ]), _: 1 }, 8, ["onClick"]) ]) ]), default: K(() => [ ue(l, { class: "filters", ref: "filtersRef", entry: o.filterEntry, envVars: n.envVars, onFilterResults: o.filterUpdate, onNumberPerPage: o.numberPerPageUpdate, onLoading: o.filtersLoading, onCascaderReady: o.cascaderReady }, null, 8, ["entry", "envVars", "onFilterResults", "onNumberPerPage", "onLoading", "onCascaderReady"]), ue(u, { ref: "searchHistory", onSearch: o.searchHistorySearch }, null, 8, ["onSearch"]), Xe((I(), j("div", gat, [ e.results.length === 0 && !e.loadingCards ? (I(), j("div", mat, " No results found - Please change your search / filter criteria. ")) : ne("", !0), (I(!0), j(Qe, null, Nt(e.results, (p) => (I(), j("div", { key: p.doi, class: "step-item" }, [ ue(c, { class: "dataset-card", entry: p, envVars: n.envVars, onMouseenter: (v) => o.hoverChanged(p), onMouseleave: t[1] || (t[1] = (v) => o.hoverChanged(void 0)) }, null, 8, ["entry", "envVars", "onMouseenter"]) ]))), 128)), ue(d, { class: "pagination", "current-page": e.page, "onUpdate:currentPage": t[2] || (t[2] = (p) => e.page = p), "hide-on-single-page": "", large: "", layout: "prev, pager, next", "page-size": e.numberPerPage, total: e.numberOfHits, onCurrentChange: o.pageChange }, null, 8, ["current-page", "page-size", "total", "onCurrentChange"]) ])), [ [h, e.loadingCards] ]) ]), _: 1 }, 8, ["body-style"]); } const CK = /* @__PURE__ */ Zi(hat, [["render", yat], ["__scopeId", "data-v-7574b21a"]]), bat = { name: "AnnotationTool", components: { AnnotationPopup: ZGe, Button: Do, CreateTooltipContent: nXe, Col: Hz, ElIconDelete: M$, Icon: er, Row: jz }, props: { annotationEntry: { type: Object }, createData: { type: Object, default: {} } }, data: function() { return { ElIconDelete: dn(M$) }; } }, wat = { class: "annotation-tool scrollbar" }, xat = { key: 1, class: "delete-container" }; function kat(e, t, n, r, a, o) { const i = lt("CreateTooltipContent"), s = lt("annotation-popup"), l = Hz, u = Do, c = jz; return I(), j("div", wat, [ Xe(ue(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"]), [ [mt, n.createData && n.createData.toBeConfirmed] ]), n.annotationEntry && (!n.createData || !n.createData.toBeConfirmed) ? (I(), de(s, { key: 0, class: "annotation-popup", annotationEntry: n.annotationEntry, onAnnotation: t[2] || (t[2] = (d) => e.$emit("annotation", d)) }, null, 8, ["annotationEntry"])) : ne("", !0), n.createData && n.createData.toBeDeleted ? (I(), j("div", xat, [ ue(c, null, { default: K(() => [ ue(l, { offset: 1, span: 6 }, { default: K(() => [ et("Delete this feature?") ]), _: 1 }), ue(l, { offset: 1, span: 3 }, { default: K(() => [ ue(u, { class: "delete-button", icon: e.ElIconDelete, onClick: t[3] || (t[3] = (d) => e.$emit("confirm-delete")) }, { default: K(() => [ et(" Delete ") ]), _: 1 }, 8, ["icon"]) ]), _: 1 }), ue(l, { offset: 1, span: 2 }, { default: K(() => [ ue(u, { class: "delete-button", onClick: t[4] || (t[4] = (d) => e.$emit("cancel-create")) }, { default: K(() => [ et(" Dismiss ") ]), _: 1 }) ]), _: 1 }) ]), _: 1 }) ])) : ne("", !0) ]); } const SK = /* @__PURE__ */ Zi(bat, [["render", kat], ["__scopeId", "data-v-de83d649"]]), Cat = { name: "ExternalResourceCard", components: { Button: Do }, props: { resources: { type: Array, default: () => [] } }, data: function() { return { pubmeds: [], pubmedIds: [], ElIconNotebook: dn(fEe) }; }, methods: { capitalise: function(e) { return e.charAt(0).toUpperCase() + e.slice(1); }, openUrl: function(e) { mr.emit("open-pubmed-url", e), window.open(e, "_blank"); } } }, Sat = { class: "resource-container" }; function Eat(e, t, n, r, a, o) { const i = Do; return I(), j("div", Sat, [ (I(!0), j(Qe, null, Nt(n.resources, (s) => (I(), j("div", { key: s.id, class: "resource" }, [ s.id === "pubmed" ? (I(), de(i, { key: 0, class: "button", id: "open-pubmed-button", icon: e.ElIconNotebook, onClick: (l) => o.openUrl(s.url) }, { default: K(() => [ et(" Open publications in PubMed ") ]), _: 2 }, 1032, ["icon", "onClick"])) : ne("", !0) ]))), 128)) ]); } const EK = /* @__PURE__ */ Zi(Cat, [["render", Eat], ["__scopeId", "data-v-e726c314"]]), _at = (e) => e.replace(/\w\S*/g, (t) => t.charAt(0).toUpperCase() + t.substr(1).toLowerCase()), Cv = function(e) { return e ? e.charAt(0).toUpperCase() + e.slice(1) : ""; }, Tat = 3e3, Oat = { name: "ConnectivityInfo", components: { Button: Do, Container: COe, Icon: er, ElIconArrowUp: X3e, ElIconArrowDown: y3, ElIconWarning: R7, ExternalResourceCard: EK, CopyToClipboard: eW, ConnectivityGraph: drt }, props: { entry: { type: Object, default: () => ({ destinations: [], origins: [], components: [], destinationsWithDatasets: [], originsWithDatasets: [], componentsWithDatasets: [], resource: void 0, featuresAlert: void 0 }) }, envVars: { type: Object, default: () => { } }, availableAnatomyFacets: { type: Array, default: () => [] } }, data: function() { return { controller: void 0, activeSpecies: void 0, pubmedSearchUrl: "", loading: !1, activeView: "listView", facetList: [], showToolip: !1, showDetails: !1, 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" }, componentsWithDatasets: [], uberons: [{ id: void 0, name: void 0 }], connectivityError: null, timeoutID: void 0 }; }, watch: { availableAnatomyFacets: { handler: function(e) { this.convertFacetsToList(e); }, immediate: !0, deep: !0 } }, computed: { updatedCopyContent: function() { return this.getUpdateCopyContent(); }, resources: function() { let e = []; return this.entry && this.entry.hyperlinks && (e = this.entry.hyperlinks), e; }, originDescription: function() { return this.entry && this.entry.title && this.entry.title.toLowerCase().includes("motor") ? this.originDescriptions.motor : this.originDescriptions.sensory; }, provSpeciesDescription: function() { let e = "Studied in"; return this.entry.provenanceTaxonomyLabel.forEach((t) => { e += ` ${t},`; }), e = e.slice(0, -1), e += " species", e; } }, methods: { titleCase: function(e) { return _at(e); }, capitalise: function(e) { return Cv(e); }, openUrl: function(e) { window.open(e, "_blank"); }, openAll: function() { mr.emit("onConnectivityActionClick", { type: "Facets", labels: this.entry.componentsWithDatasets.map((e) => e.name.toLowerCase()) }); }, openAxons: function() { mr.emit("onConnectivityActionClick", { type: "Facets", labels: this.entry.destinationsWithDatasets.map((e) => e.name.toLowerCase()) }); }, // shouldShowExploreButton: Checks if the feature is in the list of available anatomy facets shouldShowExploreButton: function(e) { 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()); }); }, openDendrites: function() { mr.emit("onConnectivityActionClick", { type: "Facets", labels: this.entry.originsWithDatasets.map((e) => e.name.toLowerCase()) }); }, pubmedSearchUrlUpdate: function(e) { this.pubmedSearchUrl = e; }, showConnectivity: function(e) { const t = e.featureId || []; this.$emit("show-connectivity", t); }, switchConnectivityView: function(e) { if (this.activeView = e, e === "graphView") { const t = this.$refs.connectivityGraphRef; t && t.$el && t.$el.scrollIntoView({ behavior: "smooth" }); } }, onTapNode: function(e) { const t = e.map((n) => n.label).join(", "); this.toggleConnectivityTooltip(t, { show: !0 }); }, getUpdateCopyContent: function() { var e, t, n, r, a; if (!this.entry) return ""; const o = []; if (this.entry.title ? o.push(`
    ${Cv(this.entry.title)}
    `) : o.push(`
    ${this.entry.featureId}
    `), (e = this.entry.provenanceTaxonomyLabel) != null && e.length && o.push(`
    ${this.provSpeciesDescription}
    `), (t = this.resources) != null && t.length) { const s = []; this.resources.forEach((l) => { let u = ""; l.id === "pubmed" && (u += "
    PubMed URL:
    ", u += ` `, u += ``), s.push(u); }), o.push(s.join(`
    `)); } this.entry.paths && o.push(`
    ${this.entry.paths}
    `); function i(s, l, u = []) { let c = `
    ${s}
    `; const d = []; l.forEach((h) => { let p = []; h.split(",").forEach((v) => { const m = u.find((g) => g.name === v.trim()); m ? p.push(`${Cv(v)} (${m.id})`) : p.push(`${Cv(v)}`); }), d.push(p.join(",")); }); const f = d.map((h) => `
  • ${h}
  • `).join(` `); return c += ` `, c += `
      ${f}
    `, c; } if ((n = this.entry.origins) != null && n.length) { const s = "Origin", l = this.entry.origins, u = this.entry.originsWithDatasets, c = i(s, l, u); o.push(c); } if ((r = this.entry.components) != null && r.length) { const s = "Components", l = this.entry.components, u = this.entry.componentsWithDatasets, c = i(s, l, u); o.push(c); } if ((a = this.entry.destinations) != null && a.length) { const s = "Destination", l = this.entry.destinations, u = this.entry.destinationsWithDatasets, c = i(s, l, u); o.push(c); } return o.join(`
    `); }, toggleConnectivityTooltip: function(e, t) { const n = [ ...this.entry.componentsWithDatasets, ...this.entry.destinationsWithDatasets, ...this.entry.originsWithDatasets ], r = e.split(","), a = []; t.show && r.forEach((o) => { const i = n.find( (s) => s.name.toLowerCase().trim() === o.toLowerCase().trim() ); i && a.push({ id: i.id, label: i.name }); }), this.$emit("connectivity-component-click", a); }, getErrorConnectivities: function(e) { const t = [...new Set(e)]; let n = ""; return t.forEach((r, a) => { const { label: o } = r; n += a === 0 ? Cv(o) : o, t.length > 1 && (a + 2 === t.length ? n += " and " : a + 1 < t.length && (n += ", ")); }), n; }, /** * 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: this.getErrorConnectivities(t), errorMessage: n }; }, pushConnectivityError: function(e) { const t = this.getConnectivityError(e), n = this.$refs.connectivityGraphRef; n && n.showErrorMessage(t), this.connectivityError = { ...t }, this.timeoutID && clearTimeout(this.timeoutID), this.timeoutID = setTimeout(() => { this.connectivityError = null; }, Tat); } }, mounted: function() { mr.on("connectivity-graph-error", (e) => { this.pushConnectivityError(e); }); } }, fp = (e) => (No("data-v-50c6e446"), e = e(), Mo(), e), $at = { key: 0, class: "main" }, Fat = { class: "connectivity-info-title" }, Aat = { key: 0, class: "block" }, Iat = { class: "title" }, Pat = { style: { "word-break": "keep-all" } }, Lat = { key: 0, class: "subtitle" }, Nat = { key: 1, class: "block" }, Mat = { class: "title" }, Bat = { key: 2, class: "block" }, Dat = { class: "title-buttons" }, Rat = /* @__PURE__ */ fp(() => /* @__PURE__ */ W("span", null, " Show connectivity on map ", -1)), zat = { class: "content-container population-display" }, Vat = /* @__PURE__ */ fp(() => /* @__PURE__ */ W("div", { class: "block attribute-title-container" }, [ /* @__PURE__ */ W("span", { class: "attribute-title" }, "Population Display") ], -1)), jat = { class: "block buttons-row" }, Hat = { key: 0, class: "content-container content-container-connectivity" }, Uat = { key: 0, class: "block" }, qat = { class: "attribute-title-container" }, Wat = /* @__PURE__ */ fp(() => /* @__PURE__ */ W("span", { class: "attribute-title" }, "Origin", -1)), Kat = { style: { "word-break": "keep-all" } }, Gat = /* @__PURE__ */ fp(() => /* @__PURE__ */ W("i", null, "Origin", -1)), Xat = ["origin-item-label", "onMouseenter", "onMouseleave"], Yat = { key: 1, class: "block" }, Zat = /* @__PURE__ */ fp(() => /* @__PURE__ */ W("div", { class: "attribute-title-container" }, [ /* @__PURE__ */ W("div", { class: "attribute-title" }, "Components") ], -1)), Qat = ["component-item-label", "onMouseenter", "onMouseleave"], Jat = { key: 2, class: "block" }, eot = { class: "attribute-title-container" }, tot = /* @__PURE__ */ fp(() => /* @__PURE__ */ W("span", { class: "attribute-title" }, "Destination", -1)), not = /* @__PURE__ */ fp(() => /* @__PURE__ */ W("span", { style: { "word-break": "keep-all" } }, [ /* @__PURE__ */ W("i", null, "Destination"), /* @__PURE__ */ et(" is where the axons terminate ") ], -1)), rot = ["destination-item-label", "onMouseenter", "onMouseleave"], aot = { class: "block" }, oot = { key: 3, class: "connectivity-error-container" }, iot = { class: "connectivity-error" }, sot = { key: 0 }, lot = { key: 1, class: "content-container" }; function uot(e, t, n, r, a, o) { const i = gEe, s = er, l = j3, u = EK, c = cEe, d = Do, f = lt("CopyToClipboard"), h = R7, p = lt("connectivity-graph"), v = yw; return n.entry ? Xe((I(), j("div", $at, [ W("div", Fat, [ W("div", null, [ n.entry.title ? (I(), j("div", Aat, [ W("div", Iat, [ et(Fe(o.capitalise(n.entry.title)) + " ", 1), n.entry.featuresAlert ? (I(), de(l, { key: 0, width: "250", trigger: "hover", teleported: !1, "popper-class": "popover-origin-help" }, { reference: K(() => [ ue(s, { class: "alert" }, { default: K(() => [ ue(i) ]), _: 1 }) ]), default: K(() => [ W("span", Pat, Fe(n.entry.featuresAlert), 1) ]), _: 1 })) : ne("", !0) ]), n.entry.provenanceTaxonomyLabel && n.entry.provenanceTaxonomyLabel.length > 0 ? (I(), j("div", Lat, Fe(o.provSpeciesDescription), 1)) : ne("", !0) ])) : (I(), j("div", Nat, [ W("div", Mat, Fe(n.entry.featureId), 1) ])), o.resources.length ? (I(), j("div", Bat, [ ue(u, { resources: o.resources }, null, 8, ["resources"]) ])) : ne("", !0) ]), W("div", Dat, [ ue(l, { width: "auto", trigger: "hover", teleported: !1, "popper-class": "popover-map-pin" }, { reference: K(() => [ ue(d, { class: "button-circle", circle: "", onClick: t[0] || (t[0] = (m) => o.showConnectivity(n.entry)) }, { default: K(() => [ ue(s, { color: "white" }, { default: K(() => [ ue(c) ]), _: 1 }) ]), _: 1 }) ]), default: K(() => [ Rat ]), _: 1 }), ue(f, { content: o.updatedCopyContent }, null, 8, ["content"]) ]) ]), W("div", zat, [ Vat, W("div", jat, [ ue(d, { class: H(e.activeView === "listView" ? "button" : "el-button-secondary"), onClick: t[1] || (t[1] = (m) => o.switchConnectivityView("listView")) }, { default: K(() => [ et(" List view ") ]), _: 1 }, 8, ["class"]), ue(d, { class: H(e.activeView === "graphView" ? "button" : "el-button-secondary"), onClick: t[2] || (t[2] = (m) => o.switchConnectivityView("graphView")) }, { default: K(() => [ et(" Graph view ") ]), _: 1 }, 8, ["class"]) ]) ]), e.activeView === "listView" ? (I(), j("div", Hat, [ et(Fe(n.entry.paths) + " ", 1), n.entry.origins && n.entry.origins.length > 0 ? (I(), j("div", Uat, [ W("div", qat, [ Wat, ue(l, { width: "250", trigger: "hover", teleported: !1, "popper-class": "popover-origin-help" }, { reference: K(() => [ ue(s, { class: "info" }, { default: K(() => [ ue(h) ]), _: 1 }) ]), default: K(() => [ W("span", Kat, [ Gat, et(" " + Fe(o.originDescription), 1) ]) ]), _: 1 }) ]), (I(!0), j(Qe, null, Nt(n.entry.origins, (m, g) => (I(), j("div", { class: "attribute-content", "origin-item-label": m, key: m, onMouseenter: (y) => o.toggleConnectivityTooltip(m, { show: !0 }), onMouseleave: (y) => o.toggleConnectivityTooltip(m, { show: !1 }) }, Fe(o.capitalise(m)), 41, Xat))), 128)), Xe(ue(d, { class: "button", id: "open-dendrites-button", onClick: o.openDendrites }, { default: K(() => [ et(" Explore origin data ") ]), _: 1 }, 8, ["onClick"]), [ [ mt, n.entry.originsWithDatasets && n.entry.originsWithDatasets.length > 0 && o.shouldShowExploreButton(n.entry.originsWithDatasets) ] ]) ])) : ne("", !0), n.entry.components && n.entry.components.length > 0 ? (I(), j("div", Yat, [ Zat, (I(!0), j(Qe, null, Nt(n.entry.components, (m, g) => (I(), j("div", { class: "attribute-content", "component-item-label": m, key: m, onMouseenter: (y) => o.toggleConnectivityTooltip(m, { show: !0 }), onMouseleave: (y) => o.toggleConnectivityTooltip(m, { show: !1 }) }, Fe(o.capitalise(m)), 41, Qat))), 128)) ])) : ne("", !0), n.entry.destinations && n.entry.destinations.length > 0 ? (I(), j("div", Jat, [ W("div", eot, [ tot, ue(l, { width: "250", trigger: "hover", teleported: !1, "popper-class": "popover-origin-help" }, { reference: K(() => [ ue(s, { class: "info" }, { default: K(() => [ ue(h) ]), _: 1 }) ]), default: K(() => [ not ]), _: 1 }) ]), (I(!0), j(Qe, null, Nt(n.entry.destinations, (m, g) => (I(), j("div", { class: "attribute-content", "destination-item-label": m, key: m, onMouseenter: (y) => o.toggleConnectivityTooltip(m, { show: !0 }), onMouseleave: (y) => o.toggleConnectivityTooltip(m, { show: !1 }) }, Fe(o.capitalise(m)), 41, rot))), 128)), Xe(ue(d, { class: "button", onClick: o.openAxons }, { default: K(() => [ et(" Explore destination data ") ]), _: 1 }, 8, ["onClick"]), [ [ mt, n.entry.destinationsWithDatasets && n.entry.destinationsWithDatasets.length > 0 && o.shouldShowExploreButton(n.entry.destinationsWithDatasets) ] ]) ])) : ne("", !0), Xe(W("div", aot, [ ue(d, { class: "button", onClick: o.openAll }, { default: K(() => [ et(" Search for data on components ") ]), _: 1 }, 8, ["onClick"]) ], 512), [ [ mt, n.entry.componentsWithDatasets && n.entry.componentsWithDatasets.length > 0 && o.shouldShowExploreButton(n.entry.componentsWithDatasets) ] ]), e.connectivityError ? (I(), j("div", oot, [ W("div", iot, [ e.connectivityError.errorConnectivities ? (I(), j("strong", sot, Fe(e.connectivityError.errorConnectivities), 1)) : ne("", !0), et(" " + Fe(e.connectivityError.errorMessage), 1) ]) ])) : ne("", !0) ])) : ne("", !0), e.activeView === "graphView" ? (I(), j("div", lot, [ ue(p, { entry: n.entry.featureId[0], mapServer: n.envVars.FLATMAPAPI_LOCATION, onTapNode: o.onTapNode, ref: "connectivityGraphRef" }, null, 8, ["entry", "mapServer", "onTapNode"]) ])) : ne("", !0) ])), [ [v, e.loading] ]) : ne("", !0); } const _K = /* @__PURE__ */ Zi(Oat, [["render", uot], ["__scopeId", "data-v-50c6e446"]]), cot = { name: "Tabs", props: { tabTitles: { type: Array, default: () => [] }, activeId: { type: Number, default: 1 } }, methods: { titleClicked: function(e, t) { this.$emit("titleClicked", { id: e, type: t }); }, tabClose: function(e) { this.$emit("tab-close", e); } } }, dot = (e) => (No("data-v-ed1ce6dc"), e = e(), Mo(), e), pot = { class: "tab-container" }, fot = ["onClick"], hot = { class: "title-text" }, vot = /* @__PURE__ */ dot(() => /* @__PURE__ */ W("span", { class: "visually-hidden" }, "Close", -1)); function got(e, t, n, r, a, o) { const i = Do; return I(), j("div", pot, [ (I(!0), j(Qe, null, Nt(n.tabTitles, (s) => (I(), j("div", { class: H(["title", { "active-tab": s.id == n.activeId }]), key: s.id }, [ W("div", { class: H(["title-text-table", { highlightText: s.id == n.activeId }]), onClick: (l) => o.titleClicked(s.id, s.type) }, [ W("div", hot, Fe(s.title), 1) ], 10, fot), s.id > 1 ? (I(), de(i, { key: 0, onClick: (l) => o.tabClose(s.id), class: "button-tab-close", "aria-label": "Close" }, { default: K(() => [ et(" × "), vot ]), _: 2 }, 1032, ["onClick"])) : ne("", !0) ], 2))), 128)) ]); } const TK = /* @__PURE__ */ Zi(cot, [["render", got], ["__scopeId", "data-v-ed1ce6dc"]]), mot = { components: { SidebarContent: CK, Tabs: TK, ElIconArrowLeft: b3, ElIconArrowRight: sw, Drawer: R3, Icon: er, ConnectivityInfo: _K, AnnotationTool: SK }, name: "SideBar", props: { /** * 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 array of objects to show multiple sidebar contents. */ tabs: { type: Array, default: () => [ { id: 1, title: "Search", type: "search" }, { id: 2, title: "Connectivity", type: "connectivity" }, { id: 3, title: "Annotation", type: "annotation" } ] }, /** * The active tab id for default tab. */ activeTabId: { type: Number, default: 1 }, /** * The option to show or hide sidebar on page load. */ openAtStart: { type: Boolean, default: !1 }, /** * The connectivity info data to show in sidebar. */ connectivityInfo: { type: Object, default: null }, /** * The annotation data to show in sidebar. */ annotationEntry: { type: Object, default: null }, createData: { type: Object, default: null } }, data: function() { return { drawerOpen: !1, availableAnatomyFacets: [] }; }, methods: { /** * This event is emitted when the mouse hover are changed. * @arg data */ hoverChanged: function(e) { this.$emit("hover-changed", e); }, /** * This event is emitted when the show connectivity button is clicked. * @arg featureIds */ showConnectivity: function(e) { this.$emit("show-connectivity", e); }, /** * This function is triggered after a connectivity component is clicked. * @arg data */ onConnectivityComponentClick: function(e) { this.$emit("connectivity-component-click", e); }, /** * This event is emitted when the search filters are changed. * @arg `obj` {data, id} */ searchChanged: function(e, t) { this.$emit("search-changed", { ...t, id: 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; }, openSearch: function(e, t) { this.drawerOpen = !0, this.$nextTick(() => { this.getSearchTabRefById(1).openSearch(e, t); }); }, /** * Get the tab object by tab id and type. * If not found, return the first available tab. */ getTabByIdAndType: function(e, t) { const n = e || this.activeTabId, r = t || "search", a = this.tabs.find((i) => i.id === n && i.type === r), o = this.tabs[0]; return a || o; }, /** * Get the ref id of the tab by id and type. */ getTabRefId: function(e, t) { let n = "searchTab_"; t === "connectivity" ? n = "connectivityTab_" : t === "annotation" && (n = "annotationTab_"); const r = this.getTabByIdAndType(e, t); return n + r.id; }, getSearchTabRefById: function(e) { const t = e || 1, n = this.getTabRefId(t, "search"); return this.$refs[n][0]; }, /** * The function to add filters to sidebar search. * * @param {Object} filter * @public */ addFilter: function(e) { this.drawerOpen = !0, e.AND = !0, this.$nextTick(() => { this.getSearchTabRefById(1).addFilter(e); }); }, openNeuronSearch: function(e) { this.drawerOpen = !0, this.$nextTick(() => { this.getSearchTabRefById(1).openSearch( "", void 0, "scicrunch-query-string/", { field: "*organ.curie", curie: e } ); }); }, getAlgoliaFacets: async function() { return await this.getSearchTabRefById(1).getAlgoliaFacets(); }, setDrawerOpen: function(e = !0) { this.drawerOpen = e; }, /** * The function to emit 'tabClicked' event with tab's `id` and tab's `type` * when user clicks the sidebar tab. * @param {Object} {id, type} * @public */ tabClicked: function({ id: e, type: t }) { this.$emit("tabClicked", { id: e, type: t }); }, tabClose: function(e) { this.$emit("tab-close", e); }, /** * To receive error message for connectivity graph * @param {String} errorMessage */ updateConnectivityGraphError: function(e) { mr.emit("connectivity-graph-error", e); } }, computed: { activeTabs: function() { const e = [ { id: 1, title: "Search", type: "search" } ]; return this.connectivityInfo && e.push({ id: 2, title: "Connectivity", type: "connectivity" }), this.annotationEntry && Object.keys(this.annotationEntry).length > 0 && e.push({ id: 3, title: "Annotation", type: "annotation" }), e; } }, created: function() { this.drawerOpen = this.openAtStart; }, mounted: function() { mr.on("PopoverActionClick", (e) => { this.$emit("actionClick", e); }), mr.on("number-of-datasets-for-anatomies", (e) => { this.$emit("number-of-datasets-for-anatomies", e); }), mr.on("anatomy-in-datasets", (e) => { this.$emit("anatomy-in-datasets", e); }), mr.on("contextUpdate", (e) => { this.$emit("contextUpdate", e); }), mr.on("datalink-clicked", (e) => { this.$emit("datalink-clicked", e); }), mr.on("onConnectivityActionClick", (e) => { this.tabClicked({ id: 1, type: "search" }), this.$emit("actionClick", e); }), mr.on("available-facets", (e) => { this.availableAnatomyFacets = e.find((t) => t.label === "Anatomical Structure").children; }); } }, yot = { ref: "container" }, bot = { class: "box-card" }, wot = { class: "sidebar-container" }; function xot(e, t, n, r, a, o) { const i = b3, s = er, l = sw, u = TK, c = _K, d = SK, f = CK, h = R3; return I(), j("div", yot, [ e.drawerOpen ? ne("", !0) : (I(), j("div", { key: 0, onClick: t[0] || (t[0] = (...p) => o.toggleDrawer && o.toggleDrawer(...p)), class: "open-tab" }, [ ue(s, null, { default: K(() => [ ue(i) ]), _: 1 }) ])), ue(h, { class: "side-bar my-drawer", modelValue: e.drawerOpen, "onUpdate:modelValue": t[7] || (t[7] = (p) => e.drawerOpen = p), 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: K(() => [ W("div", bot, [ e.drawerOpen ? (I(), j("div", { key: 0, onClick: t[1] || (t[1] = (...p) => o.close && o.close(...p)), class: "close-tab" }, [ ue(s, null, { default: K(() => [ ue(l) ]), _: 1 }) ])) : ne("", !0), W("div", wot, [ o.activeTabs.length > 1 ? (I(), de(u, { key: 0, tabTitles: o.activeTabs, activeId: n.activeTabId, onTitleClicked: o.tabClicked, onTabClose: o.tabClose }, null, 8, ["tabTitles", "activeId", "onTitleClicked", "onTabClose"])) : ne("", !0), (I(!0), j(Qe, null, Nt(n.tabs, (p) => (I(), j(Qe, { key: "tab.id" }, [ p.type === "connectivity" && n.connectivityInfo ? (I(), j(Qe, { key: 0 }, [ p.id === n.activeTabId ? (I(), de(c, { key: 0, entry: n.connectivityInfo, availableAnatomyFacets: e.availableAnatomyFacets, envVars: n.envVars, ref_for: !0, ref: "connectivityTab_" + p.id, onShowConnectivity: o.showConnectivity, onConnectivityComponentClick: o.onConnectivityComponentClick }, null, 8, ["entry", "availableAnatomyFacets", "envVars", "onShowConnectivity", "onConnectivityComponentClick"])) : ne("", !0) ], 64)) : p.type === "annotation" ? Xe((I(), de(d, { key: 1, ref_for: !0, ref: "annotationTab_" + p.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)) }, null, 8, ["annotationEntry", "createData"])), [ [mt, p.id === n.activeTabId] ]) : Xe((I(), de(f, { key: 2, class: "sidebar-content-container", contextCardEntry: p.contextCard, envVars: n.envVars, ref_for: !0, ref: "searchTab_" + p.id, onSearchChanged: (v) => o.searchChanged(p.id, v), onHoverChanged: t[6] || (t[6] = (v) => o.hoverChanged(v)) }, null, 8, ["contextCardEntry", "envVars", "onSearchChanged"])), [ [mt, p.id === n.activeTabId] ]) ], 64))), 128)) ]) ]) ]), _: 1 }, 8, ["modelValue"]) ], 512); } const kot = /* @__PURE__ */ Zi(mot, [["render", xot], ["__scopeId", "data-v-f6b40708"]]); /*! js-cookie v3.0.5 | MIT */ function j1(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 Cot = { 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 kS(e, t) { function n(a, o, i) { if (!(typeof document > "u")) { i = j1({}, t, i), typeof i.expires == "number" && (i.expires = new Date(Date.now() + i.expires * 864e5)), i.expires && (i.expires = i.expires.toUTCString()), a = encodeURIComponent(a).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 = a + "=" + e.write(o, a) + s; } } function r(a) { if (!(typeof document > "u" || arguments.length && !a)) { for (var o = document.cookie ? document.cookie.split("; ") : [], i = {}, s = 0; s < o.length; s++) { var l = o[s].split("="), u = l.slice(1).join("="); try { var c = decodeURIComponent(l[0]); if (i[c] = e.read(u, c), a === c) break; } catch { } } return a ? i[a] : i; } } return Object.create( { set: n, get: r, remove: function(a, o) { n( a, "", j1({}, o, { expires: -1 }) ); }, withAttributes: function(a) { return kS(this.converter, j1({}, this.attributes, a)); }, withConverter: function(a) { return kS(j1({}, this.converter, a), this.attributes); } }, { attributes: { value: Object.freeze(t) }, converter: { value: Object.freeze(e) } } ); } var CS = kS(Cot, { path: "/" }), is = function(e, t, n, r, a) { if (r === "m") throw new TypeError("Private method is not writable"); if (r === "a" && !a) throw new TypeError("Private accessor was defined without a setter"); if (typeof t == "function" ? e !== t || !a : !t.has(e)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); return r === "a" ? a.call(e, n) : a ? a.value = n : t.set(e, n), n; }, ur = 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); }, Ys, i0, ss, xa, cu; const Sot = 1e4; class Eot { /** * @param serverEndpoint The URL of a map annotation service. */ constructor(t) { Ys.add(this), i0.set(this, void 0), ss.set(this, null), xa.set( this, null /** * @param serverEndpoint The URL of a map annotation service. */ ), t.slice(-1) === "/" ? is(this, i0, t.slice(0, -1), "f") : is(this, i0, t, "f"); } /** * Get information about the logged-in SPARC user. * * Requires {@linkcode authenticate} to first be called. */ get currentUser() { return ur(this, ss, "f"); } /** * Get information about any error from the last call * to {@linkcode authenticate}. */ get currentError() { return ur(this, xa, "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) { is(this, xa, null, "f"), is(this, ss, null, "f"); const n = await ur(this, Ys, "m", cu).call(this, t, "authenticate"); return "error" in n ? (CS.remove("annotation-key"), Promise.resolve(ur(this, xa, "f"))) : (CS.set("annotation-key", n.session, { secure: !0, expires: 1 }), is(this, ss, n.data, "f"), Promise.resolve(ur(this, ss, "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) { is(this, xa, null, "f"), is(this, ss, null, "f"); const n = await ur(this, Ys, "m", cu).call(this, t, "unauthenticate"); return "success" in n ? Promise.resolve(n) : Promise.resolve(ur(this, xa, "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, a) { const o = { resource: n }; r !== void 0 && (o.user = r), a !== void 0 && (o.participated = a); const i = await ur(this, Ys, "m", cu).call(this, t, "items/", "GET", o); return "error" in i ? Promise.resolve(ur(this, xa, "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 a = { resource: n }; r !== void 0 && (a.items = r); const o = await ur(this, Ys, "m", cu).call(this, t, "features/", "GET", a); return "error" in o ? Promise.resolve(ur(this, xa, "f")) : Promise.resolve(o); } /** * 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 a = await ur(this, Ys, "m", cu).call(this, t, "annotations/", "GET", { resource: n, item: r }); return "error" in a ? Promise.resolve(ur(this, xa, "f")) : Promise.resolve(a); } /** * 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 ur(this, Ys, "m", cu).call(this, t, "annotation/", "GET", { annotation: n }); return "error" in r ? Promise.resolve(ur(this, xa, "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 (ur(this, ss, "f") && ur(this, ss, "f").canUpdate) { const r = Object.assign({ creator: ur(this, ss, "f"), created: (/* @__PURE__ */ new Date()).toISOString() }, n), a = await ur(this, Ys, "m", cu).call(this, t, "annotation/", "POST", { data: r }); if (!("error" in a)) return Promise.resolve(a); is(this, xa, a, "f"); } else is(this, xa, { error: "user cannot add annotation" }, "f"); return Promise.resolve(ur(this, xa, "f")); } } i0 = /* @__PURE__ */ new WeakMap(), ss = /* @__PURE__ */ new WeakMap(), xa = /* @__PURE__ */ new WeakMap(), Ys = /* @__PURE__ */ new WeakSet(), cu = async function(t, n, r = "GET", a = {}) { let o = !0; const i = new AbortController(); setTimeout(() => { o && (console.log("Annotation server timeout..."), i.abort()); }, Sot); const s = { method: r, signal: i.signal }; let l = `${ur(this, i0, "f")}/${n}`; const u = CS.get("annotation-key") || ""; if (r === "GET") { const d = []; for (const [f, h] of Object.entries(a)) d.push(`${f}=${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 }, a); 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 o = !1, c.ok ? Promise.resolve(await c.json()) : (is(this, xa, { error: `${c.status} ${c.statusText}` }, "f"), Promise.resolve(ur(this, xa, "f"))); }; const _ot = t2("main", { state: () => ({ userProfile: { token: "" } }), getters: { userToken(e) { return e.userProfile.token; } }, actions: { setUserToken(e) { this.userProfile.token = e; } } }), Tot = { name: "SplitFlow", components: { Container: QL, Header: JL, Main: eN, DialogToolbarContent: n7, SplitDialog: e7, SideBar: kot }, setup() { const e = _ot(); rt("userApiKey", e.userToken); const t = I0(); let n = $i(new Eot(`${t.flatmapAPI}annotator`)); return rt("$annotator", n), { annotator: n }; }, props: { state: { type: Object, default: void 0 } }, data: function() { return { sideBarVisibility: !0, startUp: !0, search: "", activeDockedId: 1, filterTriggered: !1, availableFacets: [], connectivityInfo: null, annotationEntry: {}, annotationCallback: void 0, confirmCreateCallback: void 0, cancelCreateCallback: void 0, confirmDeleteCallback: void 0, createData: {} }; }, watch: { state: { handler: function(e) { e && (this._externalStateSet || this.setState(e), this._externalStateSet = !0); }, immediate: !0 } }, methods: { /** * 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"; Xs.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) { this.closeConnectivityInfo(), this.$refs.sideBar.addFilter(e); const { facet: t } = e; Xs.sendEvent({ event: "interaction_event", event_name: "portal_maps_action_filter", category: t || "filter", location: "map_location_pin" }), this.filterTriggered = !0; } } else if (e.type == "Facets") { const t = []; if (this.settingsStore.facets.species.forEach((n) => { t.push({ facet: qO(n), term: "Species", facetPropPath: "organisms.primary.species.name" }); }), t.length == 0 && t.push({ facet: "Show All", term: "Species", facetPropPath: "organisms.primary.species.name" }), t.push( ...e.labels.map((n) => ({ facet: qO(n), term: "Anatomical structure", facetPropPath: "anatomy.organ.category.name" })) ), this.$refs.sideBar) { this.closeConnectivityInfo(), this.$refs.sideBar.openSearch(t, ""); const r = Cxe(this.availableFacets, e.labels).join(", "); Xs.sendEvent({ event: "interaction_event", event_name: "portal_maps_action_filter", category: r || "filter", location: "map_popup_button" }); } } else this.trackGalleryClick(e), this.createNewEntry(e); }, trackGalleryClick: function(e) { const t = [], { label: n, type: r, datasetId: a, discoverId: o, resource: i } = e; let s = "", l = a || o; n && t.push(n), r && t.push(r), a && t.push("(" + l + ")"), i && (r === "Plot" ? s = i.dataSource.url : s = typeof i == "string" ? i : i.share_link), Xs.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) { let t = !1, n = this.$refs.splitdialog; n && n.getActiveContents().forEach((a) => { a.search(e.term) && (t = !0); }), this.$refs.dialogToolbar.setFailedSearch(t ? void 0 : e.term), Xs.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 a = []; t.forEach((i) => { a.push(i.replaceAll('"', "")); }); const o = new Set(a); t.length = 0; for (const i of o) 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) { const t = this.splitFlowStore.getState(), n = (t == null ? void 0 : t.activeView) || ""; Tn.emit("show-connectivity", { featureIds: e, offset: n === "singlepanel" || n === "2horpanel" }); }, onConnectivityComponentClick: function(e) { Tn.emit("connectivity-component-click", { connectivityInfo: this.connectivityInfo, data: e }); }, hoverChanged: function(e) { const t = e && e.anatomy ? e.anatomy : [], n = e && e.organs ? e.organs : []; this.settingsStore.updateHoverFeatures(t, n), Tn.emit("hoverUpdate"); }, searchChanged: function(e) { if (e && e.type == "query-update" && (this.search = e.value, this.search && !this.filterTriggered && Xs.sendEvent({ event: "interaction_event", event_name: "portal_maps_action_search", category: this.search, location: "map_sidebar_search" }), this.filterTriggered = !1), e && e.type == "filter-update") { if (this.settingsStore.updateFacets(e.value), !this.filterTriggered) { const { value: t } = e, r = t.filter( (a) => a.facet && a.facet.toLowerCase() !== "show all" ).map((a) => a.facet).join(", "); Xs.sendEvent({ event: "interaction_event", event_name: "portal_maps_action_filter", category: r || "filter", location: "map_sidebar_filter" }); } this.filterTriggered = !1; } }, updateMarkers: function(e) { this.settingsStore.updateMarkers(e), Tn.emit("markerUpdate"); }, updateScaffoldMarkers: function(e) { this.settingsStore.updateNumberOfDatasetsForFacets(e); }, getNewEntryId: function() { return this.entries.length ? this.entries[this.entries.length - 1].id + 1 : 1; }, /** * Activate Synchronised workflow */ activateSyncMap: function(e) { let t = {}; return Object.assign(t, e), t.mode = "normal", t.id = this.getNewEntryId(), t.state = void 0, t.type = "Scaffold", t.discoverId = e.discoverId, t.rotation = "free", e.layout == "2vertpanel" ? t.rotation = "horizontal" : e.layout == "2horpanel" && (t.rotation = "vertical"), this.entriesStore.addNewEntry(t), this.splitFlowStore.setSyncMode({ flag: !0, newId: t.id, layout: e.layout }), t.id; }, /** * 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.splitFlowStore.syncMode && this.splitFlowStore.setSyncMode({ flag: !1 }), this.$refs.sideBar && this.$refs.sideBar.setDrawerOpen(!1), t.id; }, openNewMap: async function(e) { const t = await yxe(e, this.settingsStore.sparcApi); this.createNewEntry(t), t.contextCard && Tn.emit("contextUpdate", t.contextCard); }, openSearch: function(e, t) { this.search = t, this._facets = e, this.$refs && this.$refs.sideBar && (this.closeConnectivityInfo(), this.$refs.sideBar.openSearch(e, t)), this.startUp = !1; }, closeConnectivityInfo: function() { this.$el.querySelectorAll(".maplibregl-popup-close-button").forEach((t) => { t.click(); }); }, onFullscreen: function(e) { this.$emit("onFullscreen", e); }, resetApp: function() { this.setState(o3()); }, setIdToPrimaryPane: function(e) { this.splitFlowStore.setIdToPrimaryPane(e); }, setState: function(e) { this.entriesStore.setAll(e.entries), e.splitFlow ? this.splitFlowStore.setState(e.splitFlow) : this.entries.forEach((t) => this.splitFlowStore.setIdToPrimaryPane(t.id)); }, getState: function() { let e = JSON.parse(JSON.stringify(this.entriesStore.$state)), n = this.$refs.splitdialog.getContentsState(); if (e.entries.length === n.length) for (let r = 0; r < n.length; r++) { const a = e.entries[r]; a.state = n[r], a.type === "Scaffold" && "viewUrl" in a && delete a.viewUrl, a.type === "MultiFlatmap" && "uberonId" in a && delete a.uberonId; } return e.splitFlow = this.splitFlowStore.getState(), e; }, removeEntry: function(e) { let t = this.entriesStore.findIndexOfId(e); this.entriesStore.destroyEntry(t); }, resourceSelected: function(e) { this.$emit("resource-selected", e), this.splitFlowStore.globalCallback && this.$refs.splitdialog.sendSynchronisedEvent(e); }, speciesChanged: function(e) { this.$refs.sideBar && this.$refs.sideBar.close(); }, tabClicked: function({ id: e, type: t }) { this.activeDockedId = e; }, toggleSyncMode: function(e) { e && (e.flag ? e.action && this.activateSyncMap(e.action) : this.splitFlowStore.syncMode && this.splitFlowStore.setSyncMode({ flag: !1 })); }, contextUpdate: function(e) { Tn.emit("contextUpdate", e); }, datalinkClicked: function(e) { const t = e || "", n = "datasets/", a = t.substring( t.indexOf(n) + n.length, t.indexOf("?type=dataset") ); Xs.sendEvent({ event: "interaction_event", event_name: "portal_maps_gallery_click", category: t, location: "map_sidebar_gallery", dataset_id: a || "" }); }, onAnnotationSubmitted: function(e) { this.annotationCallback && this.annotationCallback(e); }, onConfirmCreate: function(e) { this.confirmCreateCallback && this.confirmCreateCallback(e); }, onCancelCreate: function() { this.cancelCreateCallback && this.cancelCreateCallback(); }, onConfirmDelete: function(e) { this.confirmDeleteCallback && this.confirmDeleteCallback(e); }, onSidebarTabClose: function(e) { e === 2 && Tn.emit("connectivity-info-close"), e === 3 && Tn.emit("annotation-close", { tabClose: !0 }); }, resetActivePathways: function() { const t = this.$el.querySelector(".maplibregl-canvas"); t && t.click(); } }, created: function() { this._facets = [], this._externalStateSet = !1; }, mounted: function() { Tn.on("RemoveEntryRequest", (e) => { this.removeEntry(e); }), Tn.on("SyncModeRequest", (e) => { this.toggleSyncMode(e); }), Tn.on("PopoverActionClick", (e) => { this.actionClick(e); }), Tn.on("annotation-open", (e) => { this.annotationEntry = e.annotationEntry, this.annotationCallback = $i(e.commitCallback), e.createData ? this.createData = $i(e.createData) : this.createData = $i({}), this.confirmCreateCallback = $i(e.confirmCreate), this.cancelCreateCallback = $i(e.cancelCreate), this.confirmDeleteCallback = $i(e.confirmDelete), this.$refs.sideBar && (this.tabClicked({ id: 3, type: "annotation" }), this.$refs.sideBar.setDrawerOpen(!0)); }), Tn.on("annotation-close", (e) => { this.tabClicked({ id: 1, type: "search" }), this.annotationEntry = {}, this.createData = {}, this.$refs.sideBar && this.$refs.sideBar.setDrawerOpen(!1); }), Tn.on("connectivity-info-open", (e) => { this.connectivityInfo = e, this.$refs.sideBar && (this.tabClicked({ id: 2, type: "connectivity" }), this.$refs.sideBar.setDrawerOpen(!0)); }), Tn.on("connectivity-info-close", (e) => { this.tabClicked({ id: 1, type: "search" }), this.connectivityInfo = null, this.resetActivePathways(); }), Tn.on("connectivity-graph-error", (e) => { this.$refs.sideBar && this.$refs.sideBar.updateConnectivityGraphError(e.data); }), Tn.on("OpenNewMap", (e) => { this.openNewMap(e); }), Tn.on("startHelp", () => { this.$refs.sideBar && this.$refs.sideBar.close(); }), 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: { ...Ud(tw, I0, np), 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.flatmapAPI2 // temporary }; }, entries: function() { return this.entriesStore.entries; } } }, Oot = { style: { width: "100%", height: "100%", position: "relative", overflow: "hidden" } }; function $ot(e, t, n, r, a, o) { const i = n7, s = JL, l = lt("SideBar"), u = e7, c = eN, d = QL; return I(), de(d, { style: { height: "100%", background: "white" } }, { default: K(() => [ ue(s, { ref: "header", style: { "text-align": "left", "font-size": "14px", padding: "0" }, height: "32px", class: "dialog-header" }, { default: K(() => [ ue(i, { numberOfEntries: o.entries.length, onOnFullscreen: o.onFullscreen, onLocalSearch: o.onDisplaySearch, onFetchSuggestions: o.fetchSuggestions, ref: "dialogToolbar" }, null, 8, ["numberOfEntries", "onOnFullscreen", "onLocalSearch", "onFetchSuggestions"]) ]), _: 1 }, 512), ue(c, { class: "dialog-main" }, { default: K(() => [ W("div", Oot, [ ue(l, { ref: "sideBar", envVars: o.envVars, visible: e.sideBarVisibility, class: H(["side-bar", { "start-up": e.startUp }]), activeTabId: e.activeDockedId, "open-at-start": e.startUp, annotationEntry: e.annotationEntry, createData: e.createData, connectivityInfo: e.connectivityInfo, onTabClose: o.onSidebarTabClose, onActionClick: o.actionClick, onTabClicked: o.tabClicked, onSearchChanged: t[0] || (t[0] = (f) => o.searchChanged(f)), onAnatomyInDatasets: t[1] || (t[1] = (f) => o.updateMarkers(f)), onAnnotationSubmitted: o.onAnnotationSubmitted, onConfirmCreate: o.onConfirmCreate, onCancelCreate: o.onCancelCreate, onConfirmDelete: o.onConfirmDelete, onNumberOfDatasetsForAnatomies: t[2] || (t[2] = (f) => o.updateScaffoldMarkers(f)), onHoverChanged: t[3] || (t[3] = (f) => o.hoverChanged(f)), onContextUpdate: t[4] || (t[4] = (f) => o.contextUpdate(f)), onDatalinkClicked: t[5] || (t[5] = (f) => o.datalinkClicked(f)), onShowConnectivity: o.onShowConnectivity, onConnectivityComponentClick: o.onConnectivityComponentClick }, null, 8, ["envVars", "visible", "class", "activeTabId", "open-at-start", "annotationEntry", "createData", "connectivityInfo", "onTabClose", "onActionClick", "onTabClicked", "onAnnotationSubmitted", "onConfirmCreate", "onCancelCreate", "onConfirmDelete", "onShowConnectivity", "onConnectivityComponentClick"]), ue(u, { entries: o.entries, ref: "splitdialog", onResourceSelected: o.resourceSelected, onSpeciesChanged: o.speciesChanged }, null, 8, ["entries", "onResourceSelected", "onSpeciesChanged"]) ]) ]), _: 1 }) ]), _: 1 }); } const OK = /* @__PURE__ */ Ki(Tot, [["render", $ot], ["__scopeId", "data-v-7b977d0c"]]), Fot = { // Note that the setting store is included in MapContent.vue methods: { retrieveContextCardFromUrl: async function(e) { const [t, n, r, a] = this.splitInfoFromUrl(e), o = await this.getContextFileFromScicrunch(t, r); if (!o.success) return {}; const i = n + o.contextFile + a; return { s3uri: o.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], a = "?" + e.split("?")[1]; const o = t.split("/"); return o.shift(), [o[0], n, r, a]; }, 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 a = r.results[0]["abi-contextual-information"]; if (a && a.length === 1) return { success: !0, contextFile: a[0], s3uri: r.results[0].s3uri }; if (a && a.length > 1) { let o = this.findContextInforForFilePath(r.results[0]["abi-context-file"], t); if (o) return { success: !0, contextFile: o, 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((a) => a.datacite.isDerivedFrom.path.includes(t)); return (r = n == null ? void 0 : n.dataset) == null ? void 0 : r.path; } } }, Aot = { name: "MapContent", components: { MapSvgSpriteColor: WR, Loading: iN, SplitFlow: OK }, mixins: [Fot], 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 } }, 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() { this.isFullscreen() && (document.exitFullscreen ? document.exitFullscreen() : document.mozCancelFullScreen ? document.mozCancelFullScreen() : document.webkitExitFullscreen ? document.webkitExitFullscreen() : document.msExitFullscreen && document.msExitFullscreen()); }, /** * @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(); }, setState: function(e) { return this.$refs.flow.setState(e); }, getState: function() { return this.$refs.flow.getState(); }, /** * @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) { let t = { type: e.type, label: e.label, region: e.region, resource: e.url, state: e.state, viewUrl: e.viewUrl }; const n = await this.retrieveContextCardFromUrl(e.url); t = { ...t, ...n }, this.$refs.flow.createNewEntry(t); } else if (e.type === "MultiFlatmap") { const t = xxe(e); if (t) { const n = this.getState(); if (n && n.entries) for (let r = 0; r < n.entries.length; r++) { const a = n.entries[r]; if (a.type === "MultiFlatmap") { a.resource = t, a.state = { species: t }, (e.organ || e.uuid) && (a.state.state = { searchTerm: e.organ, uuid: e.uuid }, e.uuid && (a.state.state.entry = e.taxo)), this.$refs.flow.setState(n), this.$refs.flow.setIdToPrimaryPane(a.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"), Xs.sendEvent({ event: "interaction_event", event_name: "portal_maps_page_view", category: this.startingMap }); } }, computed: { ...Ud(I0, np), 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.flatmapAPI2 && this.settingsStore.updateFlatmapAPI2(this.options.flatmapAPI2), this.options.nlLinkPrefix && this.settingsStore.updateNLLinkPrefix(this.options.nlLinkPrefix), this.options.rootUrl && this.settingsStore.updateRootUrl(this.options.rootUrl)), (e = this.splitFlowStore) == null || e.reset(), (t = this.splitFlowStore) == null || t.getAvailableTerms(this.settingsStore.sparcApi); }, mounted: async function() { Tn.on("updateShareLinkRequested", () => { this.$emit("updateShareLinkRequested"); }), Tn.on("trackEvent", (e) => { this.$emit("trackEvent", e); }), this.state || (this.initialState = await bxe(this.startingMap, this.options.sparcApi)), Tn.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); } }, Iot = { ref: "MapApp", class: "mapcontent", "element-loading-text": "Loading...", "element-loading-background": "rgba(0, 0, 0, 0.3)" }; function Pot(e, t, n, r, a, o) { const i = lt("map-svg-sprite-color"), s = OK, l = bf; return Xe((I(), j("div", Iot, [ ue(i), e.isReady ? (I(), de(s, { key: 0, onOnFullscreen: o.onFullscreen, state: o.stateToSet, ref: "flow", onVnodeMounted: o.flowMounted }, null, 8, ["onOnFullscreen", "state", "onVnodeMounted"])) : ne("", !0) ])), [ [l, !e.isReady] ]); } const Uot = /* @__PURE__ */ Ki(Aot, [["render", Pot], ["__scopeId", "data-v-c1341ff7"]]); export { Tn as E, zot as K, Uot as M, Xs as T, Ki as _, wxe as a, np as b, jot as c, Hot as d, KR as g, WR as h, Vot as t, I0 as u, a3 as w };