import { getCurrentScope as eg, onScopeDispose as pf, unref as y, getCurrentInstance as dt, onMounted as ht, nextTick as Ge, ref as H, readonly as ff, watch as me, computed as _, defineComponent as Z, openBlock as T, createElementBlock as B, createElementVNode as Y, warn as tg, inject as $e, isRef as Vn, shallowRef as Yn, onBeforeUnmount as Rt, onBeforeMount as ng, provide as ft, mergeProps as Xt, renderSlot as ve, toRef as jt, onUnmounted as Tk, useAttrs as rg, useSlots as ho, createCommentVNode as ne, Fragment as Qe, normalizeClass as W, createBlock as ie, withCtx as G, resolveDynamicComponent as _t, withModifiers as it, createVNode as ee, toDisplayString as Te, normalizeStyle as lt, Transition as Kr, withDirectives as tt, vShow as Pt, reactive as pn, onActivated as Ok, onUpdated as hf, cloneVNode as og, Text as Ll, Comment as ag, Teleport as ig, onDeactivated as sg, createTextVNode as Ke, toRaw as ui, vModelCheckbox as ci, toRefs as vo, vModelRadio as Pk, h as Kt, resolveComponent as Et, renderList as At, onBeforeUpdate as yT, withKeys as _r, vModelText as lg, watchEffect as vf, resolveDirective as $k, toHandlerKey as Ak, createApp as ug, pushScopeId as ki, popScopeId as Ci, toHandlers as bT, createStaticVNode as wT, markRaw as Yd } from "vue";
const Fk = (e) => !e.getAttribute("aria-owns"), Ik = (e, t, n) => {
const { parentNode: r } = e;
if (!r)
return null;
const o = r.querySelectorAll(n), a = Array.prototype.indexOf.call(o, e);
return o[a + t] || null;
}, Zd = (e) => {
e && (e.focus(), !Fk(e) && e.click());
}, fa = (e, t, { checkForDefaultPrevented: n = !0 } = {}) => (o) => {
const a = e == null ? void 0 : e(o);
if (n === !1 || !a)
return t == null ? void 0 : t(o);
};
var jy;
const on = typeof window < "u", xT = (e) => typeof e == "string", Nk = () => {
}, Bv = on && ((jy = window == null ? void 0 : window.navigator) == null ? void 0 : jy.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
function Uu(e) {
return typeof e == "function" ? e() : y(e);
}
function kT(e) {
return e;
}
function Sc(e) {
return eg() ? (pf(e), !0) : !1;
}
function CT(e, t = !0) {
dt() ? ht(e) : t ? e() : Ge(e);
}
function Hy(e, t, n = {}) {
const {
immediate: r = !0
} = n, o = H(!1);
let a = null;
function i() {
a && (clearTimeout(a), a = null);
}
function s() {
o.value = !1, i();
}
function u(...l) {
i(), o.value = !0, a = setTimeout(() => {
o.value = !1, a = null, e(...l);
}, Uu(t));
}
return r && (o.value = !0, on && u()), Sc(s), {
isPending: ff(o),
start: u,
stop: s
};
}
function Wo(e) {
var t;
const n = Uu(e);
return (t = n == null ? void 0 : n.$el) != null ? t : n;
}
const _c = on ? window : void 0;
function To(...e) {
let t, n, r, o;
if (xT(e[0]) || Array.isArray(e[0]) ? ([n, r, o] = e, t = _c) : [t, n, r, o] = e, !t)
return Nk;
Array.isArray(n) || (n = [n]), Array.isArray(r) || (r = [r]);
const a = [], i = () => {
a.forEach((c) => c()), a.length = 0;
}, s = (c, d, f, h) => (c.addEventListener(d, f, h), () => c.removeEventListener(d, f, h)), u = me(() => [Wo(t), Uu(o)], ([c, d]) => {
i(), c && a.push(...n.flatMap((f) => r.map((h) => s(c, f, h, d))));
}, { immediate: !0, flush: "post" }), l = () => {
u(), i();
};
return Sc(l), l;
}
let Uy = !1;
function ET(e, t, n = {}) {
const { window: r = _c, ignore: o = [], capture: a = !0, detectIframe: i = !1 } = n;
if (!r)
return;
Bv && !Uy && (Uy = !0, Array.from(r.document.body.children).forEach((f) => f.addEventListener("click", Nk)));
let s = !0;
const u = (f) => o.some((h) => {
if (typeof h == "string")
return Array.from(r.document.querySelectorAll(h)).some((p) => p === f.target || f.composedPath().includes(p));
{
const p = Wo(h);
return p && (f.target === p || f.composedPath().includes(p));
}
}), c = [
To(r, "click", (f) => {
const h = Wo(e);
if (!(!h || h === f.target || f.composedPath().includes(h))) {
if (f.detail === 0 && (s = !u(f)), !s) {
s = !0;
return;
}
t(f);
}
}, { passive: !0, capture: a }),
To(r, "pointerdown", (f) => {
const h = Wo(e);
h && (s = !f.composedPath().includes(h) && !u(f));
}, { passive: !0 }),
i && To(r, "blur", (f) => {
var h;
const p = Wo(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 Lk(e, t = !1) {
const n = H(), r = () => n.value = !!e();
return r(), CT(r, t), n;
}
const qy = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Wy = "__vueuse_ssr_handlers__";
qy[Wy] = qy[Wy] || {};
function ST(e, t, { window: n = _c, initialValue: r = "" } = {}) {
const o = H(r), a = _(() => {
var i;
return Wo(t) || ((i = n == null ? void 0 : n.document) == null ? void 0 : i.documentElement);
});
return me([a, () => Uu(e)], ([i, s]) => {
var u;
if (i && n) {
const l = (u = n.getComputedStyle(i).getPropertyValue(s)) == null ? void 0 : u.trim();
o.value = l || r;
}
}, { immediate: !0 }), me(o, (i) => {
var s;
(s = a.value) != null && s.style && a.value.style.setProperty(Uu(e), i);
}), o;
}
var Ky = Object.getOwnPropertySymbols, _T = Object.prototype.hasOwnProperty, TT = Object.prototype.propertyIsEnumerable, OT = (e, t) => {
var n = {};
for (var r in e)
_T.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
if (e != null && Ky)
for (var r of Ky(e))
t.indexOf(r) < 0 && TT.call(e, r) && (n[r] = e[r]);
return n;
};
function qo(e, t, n = {}) {
const r = n, { window: o = _c } = r, a = OT(r, ["window"]);
let i;
const s = Lk(() => o && "ResizeObserver" in o), u = () => {
i && (i.disconnect(), i = void 0);
}, l = me(() => Wo(e), (d) => {
u(), s.value && o && d && (i = new ResizeObserver(t), i.observe(d, a));
}, { immediate: !0, flush: "post" }), c = () => {
u(), l();
};
return Sc(c), {
isSupported: s,
stop: c
};
}
var Gy = Object.getOwnPropertySymbols, PT = Object.prototype.hasOwnProperty, $T = Object.prototype.propertyIsEnumerable, AT = (e, t) => {
var n = {};
for (var r in e)
PT.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
if (e != null && Gy)
for (var r of Gy(e))
t.indexOf(r) < 0 && $T.call(e, r) && (n[r] = e[r]);
return n;
};
function FT(e, t, n = {}) {
const r = n, { window: o = _c } = r, a = AT(r, ["window"]);
let i;
const s = Lk(() => o && "MutationObserver" in o), u = () => {
i && (i.disconnect(), i = void 0);
}, l = me(() => Wo(e), (d) => {
u(), s.value && o && d && (i = new MutationObserver(t), i.observe(d, a));
}, { immediate: !0 }), c = () => {
u(), l();
};
return Sc(c), {
isSupported: s,
stop: c
};
}
var Xy;
(function(e) {
e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE";
})(Xy || (Xy = {}));
var IT = Object.defineProperty, Yy = Object.getOwnPropertySymbols, NT = Object.prototype.hasOwnProperty, LT = Object.prototype.propertyIsEnumerable, Zy = (e, t, n) => t in e ? IT(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, DT = (e, t) => {
for (var n in t || (t = {}))
NT.call(t, n) && Zy(e, n, t[n]);
if (Yy)
for (var n of Yy(t))
LT.call(t, n) && Zy(e, n, t[n]);
return e;
};
const RT = {
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]
};
DT({
linear: kT
}, RT);
const BT = () => on && /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 xa = () => {
}, MT = Object.prototype.hasOwnProperty, Jy = (e, t) => MT.call(e, t), br = Array.isArray, Nn = (e) => typeof e == "function", Or = (e) => typeof e == "string", zn = (e) => e !== null && typeof e == "object", zT = (e) => (zn(e) || Nn(e)) && Nn(e.then) && Nn(e.catch), VT = Object.prototype.toString, jT = (e) => VT.call(e), Lh = (e) => jT(e).slice(8, -1), cg = (e) => {
const t = /* @__PURE__ */ Object.create(null);
return (n) => t[n] || (t[n] = e(n));
}, HT = /-(\w)/g, UT = cg((e) => e.replace(HT, (t, n) => n ? n.toUpperCase() : "")), qT = /\B([A-Z])/g, WT = cg(
(e) => e.replace(qT, "-$1").toLowerCase()
), KT = cg((e) => e.charAt(0).toUpperCase() + e.slice(1));
var Dk = typeof global == "object" && global && global.Object === Object && global, GT = typeof self == "object" && self && self.Object === Object && self, Fo = Dk || GT || Function("return this")(), oo = Fo.Symbol, Rk = Object.prototype, XT = Rk.hasOwnProperty, YT = Rk.toString, iu = oo ? oo.toStringTag : void 0;
function ZT(e) {
var t = XT.call(e, iu), n = e[iu];
try {
e[iu] = void 0;
var r = !0;
} catch {
}
var o = YT.call(e);
return r && (t ? e[iu] = n : delete e[iu]), o;
}
var JT = Object.prototype, QT = JT.toString;
function eO(e) {
return QT.call(e);
}
var tO = "[object Null]", nO = "[object Undefined]", Qy = oo ? oo.toStringTag : void 0;
function Dl(e) {
return e == null ? e === void 0 ? nO : tO : Qy && Qy in Object(e) ? ZT(e) : eO(e);
}
function di(e) {
return e != null && typeof e == "object";
}
var rO = "[object Symbol]";
function gf(e) {
return typeof e == "symbol" || di(e) && Dl(e) == rO;
}
function oO(e, t) {
for (var n = -1, r = e == null ? 0 : e.length, o = Array(r); ++n < r; )
o[n] = t(e[n], n, e);
return o;
}
var ao = Array.isArray, aO = 1 / 0, e1 = oo ? oo.prototype : void 0, t1 = e1 ? e1.toString : void 0;
function Bk(e) {
if (typeof e == "string")
return e;
if (ao(e))
return oO(e, Bk) + "";
if (gf(e))
return t1 ? t1.call(e) : "";
var t = e + "";
return t == "0" && 1 / e == -aO ? "-0" : t;
}
var iO = /\s/;
function sO(e) {
for (var t = e.length; t-- && iO.test(e.charAt(t)); )
;
return t;
}
var lO = /^\s+/;
function uO(e) {
return e && e.slice(0, sO(e) + 1).replace(lO, "");
}
function $o(e) {
var t = typeof e;
return e != null && (t == "object" || t == "function");
}
var n1 = NaN, cO = /^[-+]0x[0-9a-f]+$/i, dO = /^0b[01]+$/i, pO = /^0o[0-7]+$/i, fO = parseInt;
function r1(e) {
if (typeof e == "number")
return e;
if (gf(e))
return n1;
if ($o(e)) {
var t = typeof e.valueOf == "function" ? e.valueOf() : e;
e = $o(t) ? t + "" : t;
}
if (typeof e != "string")
return e === 0 ? e : +e;
e = uO(e);
var n = dO.test(e);
return n || pO.test(e) ? fO(e.slice(2), n ? 2 : 8) : cO.test(e) ? n1 : +e;
}
function Mk(e) {
return e;
}
var hO = "[object AsyncFunction]", vO = "[object Function]", gO = "[object GeneratorFunction]", mO = "[object Proxy]";
function zk(e) {
if (!$o(e))
return !1;
var t = Dl(e);
return t == vO || t == gO || t == hO || t == mO;
}
var Dh = Fo["__core-js_shared__"], o1 = function() {
var e = /[^.]+$/.exec(Dh && Dh.keys && Dh.keys.IE_PROTO || "");
return e ? "Symbol(src)_1." + e : "";
}();
function yO(e) {
return !!o1 && o1 in e;
}
var bO = Function.prototype, wO = bO.toString;
function Ss(e) {
if (e != null) {
try {
return wO.call(e);
} catch {
}
try {
return e + "";
} catch {
}
}
return "";
}
var xO = /[\\^$.*+?()[\]{}|]/g, kO = /^\[object .+?Constructor\]$/, CO = Function.prototype, EO = Object.prototype, SO = CO.toString, _O = EO.hasOwnProperty, TO = RegExp(
"^" + SO.call(_O).replace(xO, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
);
function OO(e) {
if (!$o(e) || yO(e))
return !1;
var t = zk(e) ? TO : kO;
return t.test(Ss(e));
}
function PO(e, t) {
return e == null ? void 0 : e[t];
}
function _s(e, t) {
var n = PO(e, t);
return OO(n) ? n : void 0;
}
var Mv = _s(Fo, "WeakMap"), a1 = Object.create, $O = /* @__PURE__ */ function() {
function e() {
}
return function(t) {
if (!$o(t))
return {};
if (a1)
return a1(t);
e.prototype = t;
var n = new e();
return e.prototype = void 0, n;
};
}();
function AO(e, t, n) {
switch (n.length) {
case 0:
return e.call(t);
case 1:
return e.call(t, n[0]);
case 2:
return e.call(t, n[0], n[1]);
case 3:
return e.call(t, n[0], n[1], n[2]);
}
return e.apply(t, n);
}
function FO(e, t) {
var n = -1, r = e.length;
for (t || (t = Array(r)); ++n < r; )
t[n] = e[n];
return t;
}
var IO = 800, NO = 16, LO = Date.now;
function DO(e) {
var t = 0, n = 0;
return function() {
var r = LO(), o = NO - (r - n);
if (n = r, o > 0) {
if (++t >= IO)
return arguments[0];
} else
t = 0;
return e.apply(void 0, arguments);
};
}
function RO(e) {
return function() {
return e;
};
}
var Cp = function() {
try {
var e = _s(Object, "defineProperty");
return e({}, "", {}), e;
} catch {
}
}(), BO = Cp ? function(e, t) {
return Cp(e, "toString", {
configurable: !0,
enumerable: !1,
value: RO(t),
writable: !0
});
} : Mk, MO = DO(BO);
function zO(e, t) {
for (var n = -1, r = e == null ? 0 : e.length; ++n < r && t(e[n], n, e) !== !1; )
;
return e;
}
function VO(e, t, n, r) {
e.length;
for (var o = n + 1; o--; )
if (t(e[o], o, e))
return o;
return -1;
}
var jO = 9007199254740991, HO = /^(?:0|[1-9]\d*)$/;
function dg(e, t) {
var n = typeof e;
return t = t ?? jO, !!t && (n == "number" || n != "symbol" && HO.test(e)) && e > -1 && e % 1 == 0 && e < t;
}
function Vk(e, t, n) {
t == "__proto__" && Cp ? Cp(e, t, {
configurable: !0,
enumerable: !0,
value: n,
writable: !0
}) : e[t] = n;
}
function pg(e, t) {
return e === t || e !== e && t !== t;
}
var UO = Object.prototype, qO = UO.hasOwnProperty;
function fg(e, t, n) {
var r = e[t];
(!(qO.call(e, t) && pg(r, n)) || n === void 0 && !(t in e)) && Vk(e, t, n);
}
function mf(e, t, n, r) {
var o = !n;
n || (n = {});
for (var a = -1, i = t.length; ++a < i; ) {
var s = t[a], u = void 0;
u === void 0 && (u = e[s]), o ? Vk(n, s, u) : fg(n, s, u);
}
return n;
}
var i1 = Math.max;
function WO(e, t, n) {
return t = i1(t === void 0 ? e.length - 1 : t, 0), function() {
for (var r = arguments, o = -1, a = i1(r.length - t, 0), i = Array(a); ++o < a; )
i[o] = r[t + o];
o = -1;
for (var s = Array(t + 1); ++o < t; )
s[o] = r[o];
return s[t] = n(i), AO(e, this, s);
};
}
var KO = 9007199254740991;
function hg(e) {
return typeof e == "number" && e > -1 && e % 1 == 0 && e <= KO;
}
function jk(e) {
return e != null && hg(e.length) && !zk(e);
}
var GO = Object.prototype;
function vg(e) {
var t = e && e.constructor, n = typeof t == "function" && t.prototype || GO;
return e === n;
}
function XO(e, t) {
for (var n = -1, r = Array(e); ++n < e; )
r[n] = t(n);
return r;
}
var YO = "[object Arguments]";
function s1(e) {
return di(e) && Dl(e) == YO;
}
var Hk = Object.prototype, ZO = Hk.hasOwnProperty, JO = Hk.propertyIsEnumerable, gg = s1(/* @__PURE__ */ function() {
return arguments;
}()) ? s1 : function(e) {
return di(e) && ZO.call(e, "callee") && !JO.call(e, "callee");
};
function QO() {
return !1;
}
var Uk = typeof exports == "object" && exports && !exports.nodeType && exports, l1 = Uk && typeof module == "object" && module && !module.nodeType && module, e6 = l1 && l1.exports === Uk, u1 = e6 ? Fo.Buffer : void 0, t6 = u1 ? u1.isBuffer : void 0, Ep = t6 || QO, n6 = "[object Arguments]", r6 = "[object Array]", o6 = "[object Boolean]", a6 = "[object Date]", i6 = "[object Error]", s6 = "[object Function]", l6 = "[object Map]", u6 = "[object Number]", c6 = "[object Object]", d6 = "[object RegExp]", p6 = "[object Set]", f6 = "[object String]", h6 = "[object WeakMap]", v6 = "[object ArrayBuffer]", g6 = "[object DataView]", m6 = "[object Float32Array]", y6 = "[object Float64Array]", b6 = "[object Int8Array]", w6 = "[object Int16Array]", x6 = "[object Int32Array]", k6 = "[object Uint8Array]", C6 = "[object Uint8ClampedArray]", E6 = "[object Uint16Array]", S6 = "[object Uint32Array]", en = {};
en[m6] = en[y6] = en[b6] = en[w6] = en[x6] = en[k6] = en[C6] = en[E6] = en[S6] = !0;
en[n6] = en[r6] = en[v6] = en[o6] = en[g6] = en[a6] = en[i6] = en[s6] = en[l6] = en[u6] = en[c6] = en[d6] = en[p6] = en[f6] = en[h6] = !1;
function _6(e) {
return di(e) && hg(e.length) && !!en[Dl(e)];
}
function mg(e) {
return function(t) {
return e(t);
};
}
var qk = typeof exports == "object" && exports && !exports.nodeType && exports, Au = qk && typeof module == "object" && module && !module.nodeType && module, T6 = Au && Au.exports === qk, Rh = T6 && Dk.process, ul = function() {
try {
var e = Au && Au.require && Au.require("util").types;
return e || Rh && Rh.binding && Rh.binding("util");
} catch {
}
}(), c1 = ul && ul.isTypedArray, Wk = c1 ? mg(c1) : _6, O6 = Object.prototype, P6 = O6.hasOwnProperty;
function Kk(e, t) {
var n = ao(e), r = !n && gg(e), o = !n && !r && Ep(e), a = !n && !r && !o && Wk(e), i = n || r || o || a, s = i ? XO(e.length, String) : [], u = s.length;
for (var l in e)
(t || P6.call(e, l)) && !(i && // Safari 9 has enumerable `arguments.length` in strict mode.
(l == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
o && (l == "offset" || l == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
a && (l == "buffer" || l == "byteLength" || l == "byteOffset") || // Skip index properties.
dg(l, u))) && s.push(l);
return s;
}
function Gk(e, t) {
return function(n) {
return e(t(n));
};
}
var $6 = Gk(Object.keys, Object), A6 = Object.prototype, F6 = A6.hasOwnProperty;
function I6(e) {
if (!vg(e))
return $6(e);
var t = [];
for (var n in Object(e))
F6.call(e, n) && n != "constructor" && t.push(n);
return t;
}
function yf(e) {
return jk(e) ? Kk(e) : I6(e);
}
function N6(e) {
var t = [];
if (e != null)
for (var n in Object(e))
t.push(n);
return t;
}
var L6 = Object.prototype, D6 = L6.hasOwnProperty;
function R6(e) {
if (!$o(e))
return N6(e);
var t = vg(e), n = [];
for (var r in e)
r == "constructor" && (t || !D6.call(e, r)) || n.push(r);
return n;
}
function yg(e) {
return jk(e) ? Kk(e, !0) : R6(e);
}
var B6 = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, M6 = /^\w*$/;
function bg(e, t) {
if (ao(e))
return !1;
var n = typeof e;
return n == "number" || n == "symbol" || n == "boolean" || e == null || gf(e) ? !0 : M6.test(e) || !B6.test(e) || t != null && e in Object(t);
}
var qu = _s(Object, "create");
function z6() {
this.__data__ = qu ? qu(null) : {}, this.size = 0;
}
function V6(e) {
var t = this.has(e) && delete this.__data__[e];
return this.size -= t ? 1 : 0, t;
}
var j6 = "__lodash_hash_undefined__", H6 = Object.prototype, U6 = H6.hasOwnProperty;
function q6(e) {
var t = this.__data__;
if (qu) {
var n = t[e];
return n === j6 ? void 0 : n;
}
return U6.call(t, e) ? t[e] : void 0;
}
var W6 = Object.prototype, K6 = W6.hasOwnProperty;
function G6(e) {
var t = this.__data__;
return qu ? t[e] !== void 0 : K6.call(t, e);
}
var X6 = "__lodash_hash_undefined__";
function Y6(e, t) {
var n = this.__data__;
return this.size += this.has(e) ? 0 : 1, n[e] = qu && t === void 0 ? X6 : t, this;
}
function ss(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]);
}
}
ss.prototype.clear = z6;
ss.prototype.delete = V6;
ss.prototype.get = q6;
ss.prototype.has = G6;
ss.prototype.set = Y6;
function Z6() {
this.__data__ = [], this.size = 0;
}
function bf(e, t) {
for (var n = e.length; n--; )
if (pg(e[n][0], t))
return n;
return -1;
}
var J6 = Array.prototype, Q6 = J6.splice;
function eP(e) {
var t = this.__data__, n = bf(t, e);
if (n < 0)
return !1;
var r = t.length - 1;
return n == r ? t.pop() : Q6.call(t, n, 1), --this.size, !0;
}
function tP(e) {
var t = this.__data__, n = bf(t, e);
return n < 0 ? void 0 : t[n][1];
}
function nP(e) {
return bf(this.__data__, e) > -1;
}
function rP(e, t) {
var n = this.__data__, r = bf(n, e);
return r < 0 ? (++this.size, n.push([e, t])) : n[r][1] = t, this;
}
function Pa(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]);
}
}
Pa.prototype.clear = Z6;
Pa.prototype.delete = eP;
Pa.prototype.get = tP;
Pa.prototype.has = nP;
Pa.prototype.set = rP;
var Wu = _s(Fo, "Map");
function oP() {
this.size = 0, this.__data__ = {
hash: new ss(),
map: new (Wu || Pa)(),
string: new ss()
};
}
function aP(e) {
var t = typeof e;
return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e !== "__proto__" : e === null;
}
function wf(e, t) {
var n = e.__data__;
return aP(t) ? n[typeof t == "string" ? "string" : "hash"] : n.map;
}
function iP(e) {
var t = wf(this, e).delete(e);
return this.size -= t ? 1 : 0, t;
}
function sP(e) {
return wf(this, e).get(e);
}
function lP(e) {
return wf(this, e).has(e);
}
function uP(e, t) {
var n = wf(this, e), r = n.size;
return n.set(e, t), this.size += n.size == r ? 0 : 1, this;
}
function $a(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]);
}
}
$a.prototype.clear = oP;
$a.prototype.delete = iP;
$a.prototype.get = sP;
$a.prototype.has = lP;
$a.prototype.set = uP;
var cP = "Expected a function";
function wg(e, t) {
if (typeof e != "function" || t != null && typeof t != "function")
throw new TypeError(cP);
var n = function() {
var r = arguments, o = t ? t.apply(this, r) : r[0], a = n.cache;
if (a.has(o))
return a.get(o);
var i = e.apply(this, r);
return n.cache = a.set(o, i) || a, i;
};
return n.cache = new (wg.Cache || $a)(), n;
}
wg.Cache = $a;
var dP = 500;
function pP(e) {
var t = wg(e, function(r) {
return n.size === dP && n.clear(), r;
}), n = t.cache;
return t;
}
var fP = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, hP = /\\(\\)?/g, vP = pP(function(e) {
var t = [];
return e.charCodeAt(0) === 46 && t.push(""), e.replace(fP, function(n, r, o, a) {
t.push(o ? a.replace(hP, "$1") : r || n);
}), t;
});
function gP(e) {
return e == null ? "" : Bk(e);
}
function xf(e, t) {
return ao(e) ? e : bg(e, t) ? [e] : vP(gP(e));
}
var mP = 1 / 0;
function Tc(e) {
if (typeof e == "string" || gf(e))
return e;
var t = e + "";
return t == "0" && 1 / e == -mP ? "-0" : t;
}
function xg(e, t) {
t = xf(t, e);
for (var n = 0, r = t.length; e != null && n < r; )
e = e[Tc(t[n++])];
return n && n == r ? e : void 0;
}
function ma(e, t, n) {
var r = e == null ? void 0 : xg(e, t);
return r === void 0 ? n : r;
}
function kg(e, t) {
for (var n = -1, r = t.length, o = e.length; ++n < r; )
e[o + n] = t[n];
return e;
}
var d1 = oo ? oo.isConcatSpreadable : void 0;
function yP(e) {
return ao(e) || gg(e) || !!(d1 && e && e[d1]);
}
function Cg(e, t, n, r, o) {
var a = -1, i = e.length;
for (n || (n = yP), o || (o = []); ++a < i; ) {
var s = e[a];
t > 0 && n(s) ? t > 1 ? Cg(s, t - 1, n, r, o) : kg(o, s) : o[o.length] = s;
}
return o;
}
function bP(e) {
var t = e == null ? 0 : e.length;
return t ? Cg(e, 1) : [];
}
function wP(e) {
return MO(WO(e, void 0, bP), e + "");
}
var Xk = Gk(Object.getPrototypeOf, Object);
function Za() {
if (!arguments.length)
return [];
var e = arguments[0];
return ao(e) ? e : [e];
}
function xP() {
this.__data__ = new Pa(), this.size = 0;
}
function kP(e) {
var t = this.__data__, n = t.delete(e);
return this.size = t.size, n;
}
function CP(e) {
return this.__data__.get(e);
}
function EP(e) {
return this.__data__.has(e);
}
var SP = 200;
function _P(e, t) {
var n = this.__data__;
if (n instanceof Pa) {
var r = n.__data__;
if (!Wu || r.length < SP - 1)
return r.push([e, t]), this.size = ++n.size, this;
n = this.__data__ = new $a(r);
}
return n.set(e, t), this.size = n.size, this;
}
function Xo(e) {
var t = this.__data__ = new Pa(e);
this.size = t.size;
}
Xo.prototype.clear = xP;
Xo.prototype.delete = kP;
Xo.prototype.get = CP;
Xo.prototype.has = EP;
Xo.prototype.set = _P;
function TP(e, t) {
return e && mf(t, yf(t), e);
}
function OP(e, t) {
return e && mf(t, yg(t), e);
}
var Yk = typeof exports == "object" && exports && !exports.nodeType && exports, p1 = Yk && typeof module == "object" && module && !module.nodeType && module, PP = p1 && p1.exports === Yk, f1 = PP ? Fo.Buffer : void 0, h1 = f1 ? f1.allocUnsafe : void 0;
function $P(e, t) {
if (t)
return e.slice();
var n = e.length, r = h1 ? h1(n) : new e.constructor(n);
return e.copy(r), r;
}
function AP(e, t) {
for (var n = -1, r = e == null ? 0 : e.length, o = 0, a = []; ++n < r; ) {
var i = e[n];
t(i, n, e) && (a[o++] = i);
}
return a;
}
function Zk() {
return [];
}
var FP = Object.prototype, IP = FP.propertyIsEnumerable, v1 = Object.getOwnPropertySymbols, Eg = v1 ? function(e) {
return e == null ? [] : (e = Object(e), AP(v1(e), function(t) {
return IP.call(e, t);
}));
} : Zk;
function NP(e, t) {
return mf(e, Eg(e), t);
}
var LP = Object.getOwnPropertySymbols, Jk = LP ? function(e) {
for (var t = []; e; )
kg(t, Eg(e)), e = Xk(e);
return t;
} : Zk;
function DP(e, t) {
return mf(e, Jk(e), t);
}
function Qk(e, t, n) {
var r = t(e);
return ao(e) ? r : kg(r, n(e));
}
function zv(e) {
return Qk(e, yf, Eg);
}
function RP(e) {
return Qk(e, yg, Jk);
}
var Vv = _s(Fo, "DataView"), jv = _s(Fo, "Promise"), Hv = _s(Fo, "Set"), g1 = "[object Map]", BP = "[object Object]", m1 = "[object Promise]", y1 = "[object Set]", b1 = "[object WeakMap]", w1 = "[object DataView]", MP = Ss(Vv), zP = Ss(Wu), VP = Ss(jv), jP = Ss(Hv), HP = Ss(Mv), So = Dl;
(Vv && So(new Vv(new ArrayBuffer(1))) != w1 || Wu && So(new Wu()) != g1 || jv && So(jv.resolve()) != m1 || Hv && So(new Hv()) != y1 || Mv && So(new Mv()) != b1) && (So = function(e) {
var t = Dl(e), n = t == BP ? e.constructor : void 0, r = n ? Ss(n) : "";
if (r)
switch (r) {
case MP:
return w1;
case zP:
return g1;
case VP:
return m1;
case jP:
return y1;
case HP:
return b1;
}
return t;
});
var UP = Object.prototype, qP = UP.hasOwnProperty;
function WP(e) {
var t = e.length, n = new e.constructor(t);
return t && typeof e[0] == "string" && qP.call(e, "index") && (n.index = e.index, n.input = e.input), n;
}
var Sp = Fo.Uint8Array;
function Sg(e) {
var t = new e.constructor(e.byteLength);
return new Sp(t).set(new Sp(e)), t;
}
function KP(e, t) {
var n = t ? Sg(e.buffer) : e.buffer;
return new e.constructor(n, e.byteOffset, e.byteLength);
}
var GP = /\w*$/;
function XP(e) {
var t = new e.constructor(e.source, GP.exec(e));
return t.lastIndex = e.lastIndex, t;
}
var x1 = oo ? oo.prototype : void 0, k1 = x1 ? x1.valueOf : void 0;
function YP(e) {
return k1 ? Object(k1.call(e)) : {};
}
function ZP(e, t) {
var n = t ? Sg(e.buffer) : e.buffer;
return new e.constructor(n, e.byteOffset, e.length);
}
var JP = "[object Boolean]", QP = "[object Date]", e$ = "[object Map]", t$ = "[object Number]", n$ = "[object RegExp]", r$ = "[object Set]", o$ = "[object String]", a$ = "[object Symbol]", i$ = "[object ArrayBuffer]", s$ = "[object DataView]", l$ = "[object Float32Array]", u$ = "[object Float64Array]", c$ = "[object Int8Array]", d$ = "[object Int16Array]", p$ = "[object Int32Array]", f$ = "[object Uint8Array]", h$ = "[object Uint8ClampedArray]", v$ = "[object Uint16Array]", g$ = "[object Uint32Array]";
function m$(e, t, n) {
var r = e.constructor;
switch (t) {
case i$:
return Sg(e);
case JP:
case QP:
return new r(+e);
case s$:
return KP(e, n);
case l$:
case u$:
case c$:
case d$:
case p$:
case f$:
case h$:
case v$:
case g$:
return ZP(e, n);
case e$:
return new r();
case t$:
case o$:
return new r(e);
case n$:
return XP(e);
case r$:
return new r();
case a$:
return YP(e);
}
}
function y$(e) {
return typeof e.constructor == "function" && !vg(e) ? $O(Xk(e)) : {};
}
var b$ = "[object Map]";
function w$(e) {
return di(e) && So(e) == b$;
}
var C1 = ul && ul.isMap, x$ = C1 ? mg(C1) : w$, k$ = "[object Set]";
function C$(e) {
return di(e) && So(e) == k$;
}
var E1 = ul && ul.isSet, E$ = E1 ? mg(E1) : C$, S$ = 1, _$ = 2, T$ = 4, eC = "[object Arguments]", O$ = "[object Array]", P$ = "[object Boolean]", $$ = "[object Date]", A$ = "[object Error]", tC = "[object Function]", F$ = "[object GeneratorFunction]", I$ = "[object Map]", N$ = "[object Number]", nC = "[object Object]", L$ = "[object RegExp]", D$ = "[object Set]", R$ = "[object String]", B$ = "[object Symbol]", M$ = "[object WeakMap]", z$ = "[object ArrayBuffer]", V$ = "[object DataView]", j$ = "[object Float32Array]", H$ = "[object Float64Array]", U$ = "[object Int8Array]", q$ = "[object Int16Array]", W$ = "[object Int32Array]", K$ = "[object Uint8Array]", G$ = "[object Uint8ClampedArray]", X$ = "[object Uint16Array]", Y$ = "[object Uint32Array]", Jt = {};
Jt[eC] = Jt[O$] = Jt[z$] = Jt[V$] = Jt[P$] = Jt[$$] = Jt[j$] = Jt[H$] = Jt[U$] = Jt[q$] = Jt[W$] = Jt[I$] = Jt[N$] = Jt[nC] = Jt[L$] = Jt[D$] = Jt[R$] = Jt[B$] = Jt[K$] = Jt[G$] = Jt[X$] = Jt[Y$] = !0;
Jt[A$] = Jt[tC] = Jt[M$] = !1;
function Jd(e, t, n, r, o, a) {
var i, s = t & S$, u = t & _$, l = t & T$;
if (i !== void 0)
return i;
if (!$o(e))
return e;
var c = ao(e);
if (c) {
if (i = WP(e), !s)
return FO(e, i);
} else {
var d = So(e), f = d == tC || d == F$;
if (Ep(e))
return $P(e, s);
if (d == nC || d == eC || f && !o) {
if (i = u || f ? {} : y$(e), !s)
return u ? DP(e, OP(i, e)) : NP(e, TP(i, e));
} else {
if (!Jt[d])
return o ? e : {};
i = m$(e, d, s);
}
}
a || (a = new Xo());
var h = a.get(e);
if (h)
return h;
a.set(e, i), E$(e) ? e.forEach(function(m) {
i.add(Jd(m, t, n, m, e, a));
}) : x$(e) && e.forEach(function(m, g) {
i.set(g, Jd(m, t, n, g, e, a));
});
var p = l ? u ? RP : zv : u ? yg : yf, v = c ? void 0 : p(e);
return zO(v || e, function(m, g) {
v && (g = m, m = e[g]), fg(i, g, Jd(m, t, n, g, e, a));
}), i;
}
var Z$ = 1, J$ = 4;
function rC(e) {
return Jd(e, Z$ | J$);
}
var Q$ = "__lodash_hash_undefined__";
function eA(e) {
return this.__data__.set(e, Q$), this;
}
function tA(e) {
return this.__data__.has(e);
}
function _p(e) {
var t = -1, n = e == null ? 0 : e.length;
for (this.__data__ = new $a(); ++t < n; )
this.add(e[t]);
}
_p.prototype.add = _p.prototype.push = eA;
_p.prototype.has = tA;
function nA(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 rA(e, t) {
return e.has(t);
}
var oA = 1, aA = 2;
function oC(e, t, n, r, o, a) {
var i = n & oA, s = e.length, u = t.length;
if (s != u && !(i && u > s))
return !1;
var l = a.get(e), c = a.get(t);
if (l && c)
return l == t && c == e;
var d = -1, f = !0, h = n & aA ? new _p() : void 0;
for (a.set(e, t), a.set(t, e); ++d < s; ) {
var p = e[d], v = t[d];
if (r)
var m = i ? r(v, p, d, t, e, a) : r(p, v, d, e, t, a);
if (m !== void 0) {
if (m)
continue;
f = !1;
break;
}
if (h) {
if (!nA(t, function(g, b) {
if (!rA(h, b) && (p === g || o(p, g, n, r, a)))
return h.push(b);
})) {
f = !1;
break;
}
} else if (!(p === v || o(p, v, n, r, a))) {
f = !1;
break;
}
}
return a.delete(e), a.delete(t), f;
}
function iA(e) {
var t = -1, n = Array(e.size);
return e.forEach(function(r, o) {
n[++t] = [o, r];
}), n;
}
function sA(e) {
var t = -1, n = Array(e.size);
return e.forEach(function(r) {
n[++t] = r;
}), n;
}
var lA = 1, uA = 2, cA = "[object Boolean]", dA = "[object Date]", pA = "[object Error]", fA = "[object Map]", hA = "[object Number]", vA = "[object RegExp]", gA = "[object Set]", mA = "[object String]", yA = "[object Symbol]", bA = "[object ArrayBuffer]", wA = "[object DataView]", S1 = oo ? oo.prototype : void 0, Bh = S1 ? S1.valueOf : void 0;
function xA(e, t, n, r, o, a, i) {
switch (n) {
case wA:
if (e.byteLength != t.byteLength || e.byteOffset != t.byteOffset)
return !1;
e = e.buffer, t = t.buffer;
case bA:
return !(e.byteLength != t.byteLength || !a(new Sp(e), new Sp(t)));
case cA:
case dA:
case hA:
return pg(+e, +t);
case pA:
return e.name == t.name && e.message == t.message;
case vA:
case mA:
return e == t + "";
case fA:
var s = iA;
case gA:
var u = r & lA;
if (s || (s = sA), e.size != t.size && !u)
return !1;
var l = i.get(e);
if (l)
return l == t;
r |= uA, i.set(e, t);
var c = oC(s(e), s(t), r, o, a, i);
return i.delete(e), c;
case yA:
if (Bh)
return Bh.call(e) == Bh.call(t);
}
return !1;
}
var kA = 1, CA = Object.prototype, EA = CA.hasOwnProperty;
function SA(e, t, n, r, o, a) {
var i = n & kA, s = zv(e), u = s.length, l = zv(t), c = l.length;
if (u != c && !i)
return !1;
for (var d = u; d--; ) {
var f = s[d];
if (!(i ? f in t : EA.call(t, f)))
return !1;
}
var h = a.get(e), p = a.get(t);
if (h && p)
return h == t && p == e;
var v = !0;
a.set(e, t), a.set(t, e);
for (var m = i; ++d < u; ) {
f = s[d];
var g = e[f], b = t[f];
if (r)
var x = i ? r(b, g, f, t, e, a) : r(g, b, f, e, t, a);
if (!(x === void 0 ? g === b || o(g, b, n, r, a) : x)) {
v = !1;
break;
}
m || (m = f == "constructor");
}
if (v && !m) {
var w = e.constructor, C = t.constructor;
w != C && "constructor" in e && "constructor" in t && !(typeof w == "function" && w instanceof w && typeof C == "function" && C instanceof C) && (v = !1);
}
return a.delete(e), a.delete(t), v;
}
var _A = 1, _1 = "[object Arguments]", T1 = "[object Array]", pd = "[object Object]", TA = Object.prototype, O1 = TA.hasOwnProperty;
function OA(e, t, n, r, o, a) {
var i = ao(e), s = ao(t), u = i ? T1 : So(e), l = s ? T1 : So(t);
u = u == _1 ? pd : u, l = l == _1 ? pd : l;
var c = u == pd, d = l == pd, f = u == l;
if (f && Ep(e)) {
if (!Ep(t))
return !1;
i = !0, c = !1;
}
if (f && !c)
return a || (a = new Xo()), i || Wk(e) ? oC(e, t, n, r, o, a) : xA(e, t, u, n, r, o, a);
if (!(n & _A)) {
var h = c && O1.call(e, "__wrapped__"), p = d && O1.call(t, "__wrapped__");
if (h || p) {
var v = h ? e.value() : e, m = p ? t.value() : t;
return a || (a = new Xo()), o(v, m, n, r, a);
}
}
return f ? (a || (a = new Xo()), SA(e, t, n, r, o, a)) : !1;
}
function kf(e, t, n, r, o) {
return e === t ? !0 : e == null || t == null || !di(e) && !di(t) ? e !== e && t !== t : OA(e, t, n, r, kf, o);
}
var PA = 1, $A = 2;
function AA(e, t, n, r) {
var o = n.length, a = o;
if (e == null)
return !a;
for (e = Object(e); o--; ) {
var i = n[o];
if (i[2] ? i[1] !== e[i[0]] : !(i[0] in e))
return !1;
}
for (; ++o < a; ) {
i = n[o];
var s = i[0], u = e[s], l = i[1];
if (i[2]) {
if (u === void 0 && !(s in e))
return !1;
} else {
var c = new Xo(), d;
if (!(d === void 0 ? kf(l, u, PA | $A, r, c) : d))
return !1;
}
}
return !0;
}
function aC(e) {
return e === e && !$o(e);
}
function FA(e) {
for (var t = yf(e), n = t.length; n--; ) {
var r = t[n], o = e[r];
t[n] = [r, o, aC(o)];
}
return t;
}
function iC(e, t) {
return function(n) {
return n == null ? !1 : n[e] === t && (t !== void 0 || e in Object(n));
};
}
function IA(e) {
var t = FA(e);
return t.length == 1 && t[0][2] ? iC(t[0][0], t[0][1]) : function(n) {
return n === e || AA(n, e, t);
};
}
function NA(e, t) {
return e != null && t in Object(e);
}
function LA(e, t, n) {
t = xf(t, e);
for (var r = -1, o = t.length, a = !1; ++r < o; ) {
var i = Tc(t[r]);
if (!(a = e != null && n(e, i)))
break;
e = e[i];
}
return a || ++r != o ? a : (o = e == null ? 0 : e.length, !!o && hg(o) && dg(i, o) && (ao(e) || gg(e)));
}
function sC(e, t) {
return e != null && LA(e, t, NA);
}
var DA = 1, RA = 2;
function BA(e, t) {
return bg(e) && aC(t) ? iC(Tc(e), t) : function(n) {
var r = ma(n, e);
return r === void 0 && r === t ? sC(n, e) : kf(t, r, DA | RA);
};
}
function MA(e) {
return function(t) {
return t == null ? void 0 : t[e];
};
}
function zA(e) {
return function(t) {
return xg(t, e);
};
}
function VA(e) {
return bg(e) ? MA(Tc(e)) : zA(e);
}
function jA(e) {
return typeof e == "function" ? e : e == null ? Mk : typeof e == "object" ? ao(e) ? BA(e[0], e[1]) : IA(e) : VA(e);
}
var Mh = function() {
return Fo.Date.now();
}, HA = "Expected a function", UA = Math.max, qA = Math.min;
function lC(e, t, n) {
var r, o, a, i, s, u, l = 0, c = !1, d = !1, f = !0;
if (typeof e != "function")
throw new TypeError(HA);
t = r1(t) || 0, $o(n) && (c = !!n.leading, d = "maxWait" in n, a = d ? UA(r1(n.maxWait) || 0, t) : a, f = "trailing" in n ? !!n.trailing : f);
function h(k) {
var E = r, S = o;
return r = o = void 0, l = k, i = e.apply(S, E), i;
}
function p(k) {
return l = k, s = setTimeout(g, t), c ? h(k) : i;
}
function v(k) {
var E = k - u, S = k - l, O = t - E;
return d ? qA(O, a - S) : O;
}
function m(k) {
var E = k - u, S = k - l;
return u === void 0 || E >= t || E < 0 || d && S >= a;
}
function g() {
var k = Mh();
if (m(k))
return b(k);
s = setTimeout(g, v(k));
}
function b(k) {
return s = void 0, f && r ? h(k) : (r = o = void 0, i);
}
function x() {
s !== void 0 && clearTimeout(s), l = 0, r = u = o = s = void 0;
}
function w() {
return s === void 0 ? i : b(Mh());
}
function C() {
var k = Mh(), E = m(k);
if (r = arguments, o = this, u = k, E) {
if (s === void 0)
return p(u);
if (d)
return clearTimeout(s), s = setTimeout(g, t), h(u);
}
return s === void 0 && (s = setTimeout(g, t)), i;
}
return C.cancel = x, C.flush = w, C;
}
function WA(e, t, n) {
var r = e == null ? 0 : e.length;
if (!r)
return -1;
var o = r - 1;
return VO(e, jA(t), o);
}
var KA = 1 / 0;
function GA(e) {
var t = e == null ? 0 : e.length;
return t ? Cg(e, KA) : [];
}
function Tp(e) {
for (var t = -1, n = e == null ? 0 : e.length, r = {}; ++t < n; ) {
var o = e[t];
r[o[0]] = o[1];
}
return r;
}
function Yo(e, t) {
return kf(e, t);
}
function Oc(e) {
return e == null;
}
function uC(e) {
return e === void 0;
}
function XA(e, t, n, r) {
if (!$o(e))
return e;
t = xf(t, e);
for (var o = -1, a = t.length, i = a - 1, s = e; s != null && ++o < a; ) {
var u = Tc(t[o]), l = n;
if (u === "__proto__" || u === "constructor" || u === "prototype")
return e;
if (o != i) {
var c = s[u];
l = void 0, l === void 0 && (l = $o(c) ? c : dg(t[o + 1]) ? [] : {});
}
fg(s, u, l), s = s[u];
}
return e;
}
function YA(e, t, n) {
for (var r = -1, o = t.length, a = {}; ++r < o; ) {
var i = t[r], s = xg(e, i);
n(s, i) && XA(a, xf(i, e), s);
}
return a;
}
function ZA(e, t) {
return YA(e, t, function(n, r) {
return sC(e, r);
});
}
var cC = wP(function(e, t) {
return e == null ? {} : ZA(e, t);
});
const ba = (e) => e === void 0, ea = (e) => typeof e == "boolean", Ut = (e) => typeof e == "number", Uv = (e) => !e && e !== 0 || br(e) && e.length === 0 || zn(e) && !Object.keys(e).length, Zi = (e) => typeof Element > "u" ? !1 : e instanceof Element, Ku = (e) => Oc(e), JA = (e) => Or(e) ? !Number.isNaN(Number(e)) : !1, QA = (e = "") => e.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d"), P1 = (e) => KT(e), $1 = (e) => Object.keys(e);
class dC extends Error {
constructor(t) {
super(t), this.name = "ElementPlusError";
}
}
function pC(e, t) {
throw new dC(`[${e}] ${t}`);
}
function Sn(e, t) {
if (process.env.NODE_ENV !== "production") {
const n = Or(e) ? new dC(`[${e}] ${t}`) : e;
console.warn(n);
}
}
const eF = "utils/dom/style", fC = (e = "") => e.split(" ").filter((t) => !!t.trim()), A1 = (e, t) => {
if (!e || !t)
return !1;
if (t.includes(" "))
throw new Error("className should not contain space.");
return e.classList.contains(t);
}, qv = (e, t) => {
!e || !t.trim() || e.classList.add(...fC(t));
}, Gu = (e, t) => {
!e || !t.trim() || e.classList.remove(...fC(t));
}, Xs = (e, t) => {
var n;
if (!on || !e || !t)
return "";
let r = UT(t);
r === "float" && (r = "cssFloat");
try {
const o = e.style[r];
if (o)
return o;
const a = (n = document.defaultView) == null ? void 0 : n.getComputedStyle(e, "");
return a ? a[r] : "";
} catch {
return e.style[r];
}
};
function cl(e, t = "px") {
if (!e)
return "";
if (Ut(e) || JA(e))
return `${e}${t}`;
if (Or(e))
return e;
Sn(eF, "binding value must be a string or number");
}
let fd;
const tF = (e) => {
var t;
if (!on)
return 0;
if (fd !== void 0)
return fd;
const n = document.createElement("div");
n.className = `${e}-scrollbar__wrap`, n.style.visibility = "hidden", n.style.width = "100px", n.style.position = "absolute", n.style.top = "-9999px", document.body.appendChild(n);
const r = n.offsetWidth;
n.style.overflow = "scroll";
const o = document.createElement("div");
o.style.width = "100%", n.appendChild(o);
const a = o.offsetWidth;
return (t = n.parentNode) == null || t.removeChild(n), fd = r - a, fd;
};
function hC(e, t) {
if (!on)
return;
if (!t) {
e.scrollTop = 0;
return;
}
const n = [];
let r = t.offsetParent;
for (; r !== null && e !== r && e.contains(r); )
n.push(r), r = r.offsetParent;
const o = t.offsetTop + n.reduce((u, l) => u + l.offsetTop, 0), a = o + t.offsetHeight, i = e.scrollTop, s = i + e.clientHeight;
o < i ? e.scrollTop = o : a > s && (e.scrollTop = a - e.clientHeight);
}
/*! Element Plus Icons Vue v2.3.1 */
var nF = /* @__PURE__ */ Z({
name: "ArrowDown",
__name: "arrow-down",
setup(e) {
return (t, n) => (T(), B("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 1024 1024"
}, [
Y("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"
})
]));
}
}), _g = nF, rF = /* @__PURE__ */ Z({
name: "ArrowLeft",
__name: "arrow-left",
setup(e) {
return (t, n) => (T(), B("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 1024 1024"
}, [
Y("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"
})
]));
}
}), Tg = rF, oF = /* @__PURE__ */ Z({
name: "ArrowRight",
__name: "arrow-right",
setup(e) {
return (t, n) => (T(), B("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 1024 1024"
}, [
Y("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"
})
]));
}
}), Cf = oF, aF = /* @__PURE__ */ Z({
name: "ArrowUp",
__name: "arrow-up",
setup(e) {
return (t, n) => (T(), B("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 1024 1024"
}, [
Y("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"
})
]));
}
}), iF = aF, sF = /* @__PURE__ */ Z({
name: "Check",
__name: "check",
setup(e) {
return (t, n) => (T(), B("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 1024 1024"
}, [
Y("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"
})
]));
}
}), vC = sF, lF = /* @__PURE__ */ Z({
name: "CircleCheck",
__name: "circle-check",
setup(e) {
return (t, n) => (T(), B("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 1024 1024"
}, [
Y("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"
}),
Y("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"
})
]));
}
}), uF = lF, cF = /* @__PURE__ */ Z({
name: "CircleClose",
__name: "circle-close",
setup(e) {
return (t, n) => (T(), B("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 1024 1024"
}, [
Y("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"
}),
Y("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"
})
]));
}
}), Ef = cF, dF = /* @__PURE__ */ Z({
name: "Close",
__name: "close",
setup(e) {
return (t, n) => (T(), B("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 1024 1024"
}, [
Y("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"
})
]));
}
}), Wv = dF, pF = /* @__PURE__ */ Z({
name: "DArrowLeft",
__name: "d-arrow-left",
setup(e) {
return (t, n) => (T(), B("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 1024 1024"
}, [
Y("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"
})
]));
}
}), fF = pF, hF = /* @__PURE__ */ Z({
name: "DArrowRight",
__name: "d-arrow-right",
setup(e) {
return (t, n) => (T(), B("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 1024 1024"
}, [
Y("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"
})
]));
}
}), vF = hF, gF = /* @__PURE__ */ Z({
name: "Delete",
__name: "delete",
setup(e) {
return (t, n) => (T(), B("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 1024 1024"
}, [
Y("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"
})
]));
}
}), F1 = gF, mF = /* @__PURE__ */ Z({
name: "Hide",
__name: "hide",
setup(e) {
return (t, n) => (T(), B("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 1024 1024"
}, [
Y("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"
}),
Y("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"
})
]));
}
}), yF = mF, bF = /* @__PURE__ */ Z({
name: "Loading",
__name: "loading",
setup(e) {
return (t, n) => (T(), B("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 1024 1024"
}, [
Y("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"
})
]));
}
}), Sf = bF, wF = /* @__PURE__ */ Z({
name: "Location",
__name: "location",
setup(e) {
return (t, n) => (T(), B("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 1024 1024"
}, [
Y("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"
}),
Y("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"
})
]));
}
}), xF = wF, kF = /* @__PURE__ */ Z({
name: "MoreFilled",
__name: "more-filled",
setup(e) {
return (t, n) => (T(), B("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 1024 1024"
}, [
Y("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"
})
]));
}
}), I1 = kF, CF = /* @__PURE__ */ Z({
name: "Notebook",
__name: "notebook",
setup(e) {
return (t, n) => (T(), B("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 1024 1024"
}, [
Y("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"
}),
Y("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"
})
]));
}
}), EF = CF, SF = /* @__PURE__ */ Z({
name: "View",
__name: "view",
setup(e) {
return (t, n) => (T(), B("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 1024 1024"
}, [
Y("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"
})
]));
}
}), gC = SF, _F = /* @__PURE__ */ Z({
name: "WarnTriangleFilled",
__name: "warn-triangle-filled",
setup(e) {
return (t, n) => (T(), B("svg", {
xmlns: "http://www.w3.org/2000/svg",
"xml:space": "preserve",
style: { "enable-background": "new 0 0 1024 1024" },
viewBox: "0 0 1024 1024"
}, [
Y("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"
})
]));
}
}), TF = _F, OF = /* @__PURE__ */ Z({
name: "Warning",
__name: "warning",
setup(e) {
return (t, n) => (T(), B("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 1024 1024"
}, [
Y("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"
})
]));
}
}), mC = OF;
const yC = "__epPropKey", et = (e) => e, PF = (e) => zn(e) && !!e[yC], _f = (e, t) => {
if (!zn(e) || PF(e))
return e;
const { values: n, required: r, default: o, type: a, validator: i } = e, u = {
type: a,
required: !!r,
validator: n || i ? (l) => {
let c = !1, d = [];
if (n && (d = Array.from(n), Jy(e, "default") && d.push(o), c || (c = d.includes(l))), i && (c || (c = i(l))), !c && d.length > 0) {
const f = [...new Set(d)].map((h) => JSON.stringify(h)).join(", ");
tg(`Invalid prop: validation failed${t ? ` for prop "${t}"` : ""}. Expected one of [${f}], got value ${JSON.stringify(l)}.`);
}
return c;
} : void 0,
[yC]: !0
};
return Jy(e, "default") && (u.default = o), u;
}, mt = (e) => Tp(Object.entries(e).map(([t, n]) => [
t,
_f(n, t)
])), io = et([
String,
Object,
Function
]), bC = {
validating: Sf,
success: uF,
error: Ef
}, $n = (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;
}, $F = (e, t) => (e.install = (n) => {
n.directive(t, e);
}, e), Io = (e) => (e.install = xa, e), Fn = {
tab: "Tab",
enter: "Enter",
space: "Space",
left: "ArrowLeft",
up: "ArrowUp",
right: "ArrowRight",
down: "ArrowDown",
esc: "Escape",
delete: "Delete",
backspace: "Backspace",
numpadEnter: "NumpadEnter",
pageUp: "PageUp",
pageDown: "PageDown",
home: "Home",
end: "End"
}, hn = "update:modelValue", ls = "change", Tf = ["", "default", "small", "large"];
var Qd = /* @__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))(Qd || {});
const N1 = (e) => [...new Set(e)], L1 = (e) => !e && e !== 0 ? [] : Array.isArray(e) ? e : [e], AF = (e) => /([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(e), Ja = (e) => e, FF = ["class", "style"], IF = /^on[A-Z]/, NF = (e = {}) => {
const { excludeListeners: t = !1, excludeKeys: n } = e, r = _(() => ((n == null ? void 0 : n.value) || []).concat(FF)), o = dt();
return o ? _(() => {
var a;
return Tp(Object.entries((a = o.proxy) == null ? void 0 : a.$attrs).filter(([i]) => !r.value.includes(i) && !(t && IF.test(i))));
}) : (Sn("use-attrs", "getCurrentInstance() returned null. useAttrs() must be called at the top of a setup function"), _(() => ({})));
}, Ji = ({ from: e, replacement: t, scope: n, version: r, ref: o, type: a = "API" }, i) => {
me(() => y(i), (s) => {
s && Sn(n, `[${a}] ${e} is about to be deprecated in version ${r}, please use ${t} instead.
For more detail, please visit: ${o}
`);
}, {
immediate: !0
});
};
var LF = {
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 DF = (e) => (t, n) => RF(t, n, y(e)), RF = (e, t, n) => ma(n, e, e).replace(/\{(\w+)\}/g, (r, o) => {
var a;
return `${(a = t == null ? void 0 : t[o]) != null ? a : `{${o}}`}`;
}), BF = (e) => {
const t = _(() => y(e).name), n = Vn(e) ? e : H(e);
return {
lang: t,
locale: n,
t: DF(e)
};
}, wC = Symbol("localeContextKey"), go = (e) => {
const t = e || $e(wC, H());
return BF(_(() => t.value || LF));
}, Fu = "el", MF = "is-", Li = (e, t, n, r, o) => {
let a = `${e}-${t}`;
return n && (a += `-${n}`), r && (a += `__${r}`), o && (a += `--${o}`), a;
}, xC = Symbol("namespaceContextKey"), Og = (e) => {
const t = e || (dt() ? $e(xC, H(Fu)) : H(Fu));
return _(() => y(t) || Fu);
}, pt = (e, t) => {
const n = Og(t);
return {
namespace: n,
b: (v = "") => Li(n.value, e, v, "", ""),
e: (v) => v ? Li(n.value, e, "", v, "") : "",
m: (v) => v ? Li(n.value, e, "", "", v) : "",
be: (v, m) => v && m ? Li(n.value, e, v, m, "") : "",
em: (v, m) => v && m ? Li(n.value, e, "", v, m) : "",
bm: (v, m) => v && m ? Li(n.value, e, v, "", m) : "",
bem: (v, m, g) => v && m && g ? Li(n.value, e, v, m, g) : "",
is: (v, ...m) => {
const g = m.length >= 1 ? m[0] : !0;
return v && g ? `${MF}${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}`
};
}, zF = (e, t = {}) => {
Vn(e) || pC("[useLockscreen]", "You need to pass a ref param to this function");
const n = t.ns || pt("popup"), r = _(() => n.bm("parent", "hidden"));
if (!on || A1(document.body, r.value))
return;
let o = 0, a = !1, i = "0";
const s = () => {
setTimeout(() => {
Gu(document == null ? void 0 : document.body, r.value), a && document && (document.body.style.width = i);
}, 200);
};
me(e, (u) => {
if (!u) {
s();
return;
}
a = !A1(document.body, r.value), a && (i = document.body.style.width), o = tF(n.namespace.value);
const l = document.documentElement.clientHeight < document.body.scrollHeight, c = Xs(document.body, "overflowY");
o > 0 && (l || c === "scroll") && a && (document.body.style.width = `calc(100% - ${o}px)`), qv(document.body, r.value);
}), pf(() => s());
}, VF = _f({
type: et(Boolean),
default: null
}), jF = _f({
type: et(Function)
}), HF = (e) => {
const t = `update:${e}`, n = `onUpdate:${e}`, r = [t], o = {
[e]: VF,
[n]: jF
};
return {
useModelToggle: ({
indicator: i,
toggleReason: s,
shouldHideWhenRouteChanges: u,
shouldProceed: l,
onShow: c,
onHide: d
}) => {
const f = dt(), { emit: h } = f, p = f.props, v = _(() => Nn(p[n])), m = _(() => p[e] === null), g = (E) => {
i.value !== !0 && (i.value = !0, s && (s.value = E), Nn(c) && c(E));
}, b = (E) => {
i.value !== !1 && (i.value = !1, s && (s.value = E), Nn(d) && d(E));
}, x = (E) => {
if (p.disabled === !0 || Nn(l) && !l())
return;
const S = v.value && on;
S && h(t, !0), (m.value || !S) && g(E);
}, w = (E) => {
if (p.disabled === !0 || !on)
return;
const S = v.value && on;
S && h(t, !1), (m.value || !S) && b(E);
}, C = (E) => {
ea(E) && (p.disabled && E ? v.value && h(t, !1) : i.value !== E && (E ? g() : b()));
}, k = () => {
i.value ? w() : x();
};
return me(() => p[e], C), u && f.appContext.config.globalProperties.$route !== void 0 && me(() => ({
...f.proxy.$route
}), () => {
u.value && i.value && w();
}), ht(() => {
C(p[e]);
}), {
hide: w,
show: x,
toggle: k,
hasUpdateHandler: v
};
},
useModelToggleProps: o,
useModelToggleEmits: r
};
}, kC = (e) => {
const t = dt();
return _(() => {
var n, r;
return (r = (n = t == null ? void 0 : t.proxy) == null ? void 0 : n.$props) == null ? void 0 : r[e];
});
};
var Pr = "top", so = "bottom", lo = "right", $r = "left", Pg = "auto", Pc = [Pr, so, lo, $r], dl = "start", Xu = "end", UF = "clippingParents", CC = "viewport", su = "popper", qF = "reference", D1 = Pc.reduce(function(e, t) {
return e.concat([t + "-" + dl, t + "-" + Xu]);
}, []), $c = [].concat(Pc, [Pg]).reduce(function(e, t) {
return e.concat([t, t + "-" + dl, t + "-" + Xu]);
}, []), WF = "beforeRead", KF = "read", GF = "afterRead", XF = "beforeMain", YF = "main", ZF = "afterMain", JF = "beforeWrite", QF = "write", e9 = "afterWrite", t9 = [WF, KF, GF, XF, YF, ZF, JF, QF, e9];
function ta(e) {
return e ? (e.nodeName || "").toLowerCase() : null;
}
function No(e) {
if (e == null) return window;
if (e.toString() !== "[object Window]") {
var t = e.ownerDocument;
return t && t.defaultView || window;
}
return e;
}
function pl(e) {
var t = No(e).Element;
return e instanceof t || e instanceof Element;
}
function to(e) {
var t = No(e).HTMLElement;
return e instanceof t || e instanceof HTMLElement;
}
function $g(e) {
if (typeof ShadowRoot > "u") return !1;
var t = No(e).ShadowRoot;
return e instanceof t || e instanceof ShadowRoot;
}
function n9(e) {
var t = e.state;
Object.keys(t.elements).forEach(function(n) {
var r = t.styles[n] || {}, o = t.attributes[n] || {}, a = t.elements[n];
!to(a) || !ta(a) || (Object.assign(a.style, r), Object.keys(o).forEach(function(i) {
var s = o[i];
s === !1 ? a.removeAttribute(i) : a.setAttribute(i, s === !0 ? "" : s);
}));
});
}
function r9(e) {
var t = e.state, n = { popper: { position: t.options.strategy, left: "0", top: "0", margin: "0" }, arrow: { position: "absolute" }, reference: {} };
return Object.assign(t.elements.popper.style, n.popper), t.styles = n, t.elements.arrow && Object.assign(t.elements.arrow.style, n.arrow), function() {
Object.keys(t.elements).forEach(function(r) {
var o = t.elements[r], a = t.attributes[r] || {}, i = Object.keys(t.styles.hasOwnProperty(r) ? t.styles[r] : n[r]), s = i.reduce(function(u, l) {
return u[l] = "", u;
}, {});
!to(o) || !ta(o) || (Object.assign(o.style, s), Object.keys(a).forEach(function(u) {
o.removeAttribute(u);
}));
});
};
}
var EC = { name: "applyStyles", enabled: !0, phase: "write", fn: n9, effect: r9, requires: ["computeStyles"] };
function Zo(e) {
return e.split("-")[0];
}
var Qi = Math.max, Op = Math.min, fl = Math.round;
function hl(e, t) {
t === void 0 && (t = !1);
var n = e.getBoundingClientRect(), r = 1, o = 1;
if (to(e) && t) {
var a = e.offsetHeight, i = e.offsetWidth;
i > 0 && (r = fl(n.width) / i || 1), a > 0 && (o = fl(n.height) / a || 1);
}
return { width: n.width / r, height: n.height / o, top: n.top / o, right: n.right / r, bottom: n.bottom / o, left: n.left / r, x: n.left / r, y: n.top / o };
}
function Ag(e) {
var t = hl(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 SC(e, t) {
var n = t.getRootNode && t.getRootNode();
if (e.contains(t)) return !0;
if (n && $g(n)) {
var r = t;
do {
if (r && e.isSameNode(r)) return !0;
r = r.parentNode || r.host;
} while (r);
}
return !1;
}
function Ca(e) {
return No(e).getComputedStyle(e);
}
function o9(e) {
return ["table", "td", "th"].indexOf(ta(e)) >= 0;
}
function Ei(e) {
return ((pl(e) ? e.ownerDocument : e.document) || window.document).documentElement;
}
function Of(e) {
return ta(e) === "html" ? e : e.assignedSlot || e.parentNode || ($g(e) ? e.host : null) || Ei(e);
}
function R1(e) {
return !to(e) || Ca(e).position === "fixed" ? null : e.offsetParent;
}
function a9(e) {
var t = navigator.userAgent.toLowerCase().indexOf("firefox") !== -1, n = navigator.userAgent.indexOf("Trident") !== -1;
if (n && to(e)) {
var r = Ca(e);
if (r.position === "fixed") return null;
}
var o = Of(e);
for ($g(o) && (o = o.host); to(o) && ["html", "body"].indexOf(ta(o)) < 0; ) {
var a = Ca(o);
if (a.transform !== "none" || a.perspective !== "none" || a.contain === "paint" || ["transform", "perspective"].indexOf(a.willChange) !== -1 || t && a.willChange === "filter" || t && a.filter && a.filter !== "none") return o;
o = o.parentNode;
}
return null;
}
function Ac(e) {
for (var t = No(e), n = R1(e); n && o9(n) && Ca(n).position === "static"; ) n = R1(n);
return n && (ta(n) === "html" || ta(n) === "body" && Ca(n).position === "static") ? t : n || a9(e) || t;
}
function Fg(e) {
return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y";
}
function Iu(e, t, n) {
return Qi(e, Op(t, n));
}
function i9(e, t, n) {
var r = Iu(e, t, n);
return r > n ? n : r;
}
function _C() {
return { top: 0, right: 0, bottom: 0, left: 0 };
}
function TC(e) {
return Object.assign({}, _C(), e);
}
function OC(e, t) {
return t.reduce(function(n, r) {
return n[r] = e, n;
}, {});
}
var s9 = function(e, t) {
return e = typeof e == "function" ? e(Object.assign({}, t.rects, { placement: t.placement })) : e, TC(typeof e != "number" ? e : OC(e, Pc));
};
function l9(e) {
var t, n = e.state, r = e.name, o = e.options, a = n.elements.arrow, i = n.modifiersData.popperOffsets, s = Zo(n.placement), u = Fg(s), l = [$r, lo].indexOf(s) >= 0, c = l ? "height" : "width";
if (!(!a || !i)) {
var d = s9(o.padding, n), f = Ag(a), h = u === "y" ? Pr : $r, p = u === "y" ? so : lo, v = n.rects.reference[c] + n.rects.reference[u] - i[u] - n.rects.popper[c], m = i[u] - n.rects.reference[u], g = Ac(a), b = g ? u === "y" ? g.clientHeight || 0 : g.clientWidth || 0 : 0, x = v / 2 - m / 2, w = d[h], C = b - f[c] - d[p], k = b / 2 - f[c] / 2 + x, E = Iu(w, k, C), S = u;
n.modifiersData[r] = (t = {}, t[S] = E, t.centerOffset = E - k, t);
}
}
function u9(e) {
var t = e.state, n = e.options, r = n.element, o = r === void 0 ? "[data-popper-arrow]" : r;
o != null && (typeof o == "string" && (o = t.elements.popper.querySelector(o), !o) || !SC(t.elements.popper, o) || (t.elements.arrow = o));
}
var c9 = { name: "arrow", enabled: !0, phase: "main", fn: l9, effect: u9, requires: ["popperOffsets"], requiresIfExists: ["preventOverflow"] };
function vl(e) {
return e.split("-")[1];
}
var d9 = { top: "auto", right: "auto", bottom: "auto", left: "auto" };
function p9(e) {
var t = e.x, n = e.y, r = window, o = r.devicePixelRatio || 1;
return { x: fl(t * o) / o || 0, y: fl(n * o) / o || 0 };
}
function B1(e) {
var t, n = e.popper, r = e.popperRect, o = e.placement, a = e.variation, i = e.offsets, s = e.position, u = e.gpuAcceleration, l = 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"), b = i.hasOwnProperty("y"), x = $r, w = Pr, C = window;
if (l) {
var k = Ac(n), E = "clientHeight", S = "clientWidth";
if (k === No(n) && (k = Ei(n), Ca(k).position !== "static" && s === "absolute" && (E = "scrollHeight", S = "scrollWidth")), k = k, o === Pr || (o === $r || o === lo) && a === Xu) {
w = so;
var O = d && k === C && C.visualViewport ? C.visualViewport.height : k[E];
v -= O - r.height, v *= u ? 1 : -1;
}
if (o === $r || (o === Pr || o === so) && a === Xu) {
x = lo;
var F = d && k === C && C.visualViewport ? C.visualViewport.width : k[S];
h -= F - r.width, h *= u ? 1 : -1;
}
}
var $ = Object.assign({ position: s }, l && d9), A = c === !0 ? p9({ x: h, y: v }) : { x: h, y: v };
if (h = A.x, v = A.y, u) {
var L;
return Object.assign({}, $, (L = {}, L[w] = b ? "0" : "", L[x] = g ? "0" : "", L.transform = (C.devicePixelRatio || 1) <= 1 ? "translate(" + h + "px, " + v + "px)" : "translate3d(" + h + "px, " + v + "px, 0)", L));
}
return Object.assign({}, $, (t = {}, t[w] = b ? v + "px" : "", t[x] = g ? h + "px" : "", t.transform = "", t));
}
function f9(e) {
var t = e.state, n = e.options, r = n.gpuAcceleration, o = r === void 0 ? !0 : r, a = n.adaptive, i = a === void 0 ? !0 : a, s = n.roundOffsets, u = s === void 0 ? !0 : s, l = { placement: Zo(t.placement), variation: vl(t.placement), popper: t.elements.popper, popperRect: t.rects.popper, gpuAcceleration: o, isFixed: t.options.strategy === "fixed" };
t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper, B1(Object.assign({}, l, { offsets: t.modifiersData.popperOffsets, position: t.options.strategy, adaptive: i, roundOffsets: u })))), t.modifiersData.arrow != null && (t.styles.arrow = Object.assign({}, t.styles.arrow, B1(Object.assign({}, l, { offsets: t.modifiersData.arrow, position: "absolute", adaptive: !1, roundOffsets: u })))), t.attributes.popper = Object.assign({}, t.attributes.popper, { "data-popper-placement": t.placement });
}
var PC = { name: "computeStyles", enabled: !0, phase: "beforeWrite", fn: f9, data: {} }, hd = { passive: !0 };
function h9(e) {
var t = e.state, n = e.instance, r = e.options, o = r.scroll, a = o === void 0 ? !0 : o, i = r.resize, s = i === void 0 ? !0 : i, u = No(t.elements.popper), l = [].concat(t.scrollParents.reference, t.scrollParents.popper);
return a && l.forEach(function(c) {
c.addEventListener("scroll", n.update, hd);
}), s && u.addEventListener("resize", n.update, hd), function() {
a && l.forEach(function(c) {
c.removeEventListener("scroll", n.update, hd);
}), s && u.removeEventListener("resize", n.update, hd);
};
}
var $C = { name: "eventListeners", enabled: !0, phase: "write", fn: function() {
}, effect: h9, data: {} }, v9 = { left: "right", right: "left", bottom: "top", top: "bottom" };
function ep(e) {
return e.replace(/left|right|bottom|top/g, function(t) {
return v9[t];
});
}
var g9 = { start: "end", end: "start" };
function M1(e) {
return e.replace(/start|end/g, function(t) {
return g9[t];
});
}
function Ig(e) {
var t = No(e), n = t.pageXOffset, r = t.pageYOffset;
return { scrollLeft: n, scrollTop: r };
}
function Ng(e) {
return hl(Ei(e)).left + Ig(e).scrollLeft;
}
function m9(e) {
var t = No(e), n = Ei(e), r = t.visualViewport, o = n.clientWidth, a = n.clientHeight, i = 0, s = 0;
return r && (o = r.width, a = r.height, /^((?!chrome|android).)*safari/i.test(navigator.userAgent) || (i = r.offsetLeft, s = r.offsetTop)), { width: o, height: a, x: i + Ng(e), y: s };
}
function y9(e) {
var t, n = Ei(e), r = Ig(e), o = (t = e.ownerDocument) == null ? void 0 : t.body, a = Qi(n.scrollWidth, n.clientWidth, o ? o.scrollWidth : 0, o ? o.clientWidth : 0), i = Qi(n.scrollHeight, n.clientHeight, o ? o.scrollHeight : 0, o ? o.clientHeight : 0), s = -r.scrollLeft + Ng(e), u = -r.scrollTop;
return Ca(o || n).direction === "rtl" && (s += Qi(n.clientWidth, o ? o.clientWidth : 0) - a), { width: a, height: i, x: s, y: u };
}
function Lg(e) {
var t = Ca(e), n = t.overflow, r = t.overflowX, o = t.overflowY;
return /auto|scroll|overlay|hidden/.test(n + o + r);
}
function AC(e) {
return ["html", "body", "#document"].indexOf(ta(e)) >= 0 ? e.ownerDocument.body : to(e) && Lg(e) ? e : AC(Of(e));
}
function Nu(e, t) {
var n;
t === void 0 && (t = []);
var r = AC(e), o = r === ((n = e.ownerDocument) == null ? void 0 : n.body), a = No(r), i = o ? [a].concat(a.visualViewport || [], Lg(r) ? r : []) : r, s = t.concat(i);
return o ? s : s.concat(Nu(Of(i)));
}
function Kv(e) {
return Object.assign({}, e, { left: e.x, top: e.y, right: e.x + e.width, bottom: e.y + e.height });
}
function b9(e) {
var t = hl(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 z1(e, t) {
return t === CC ? Kv(m9(e)) : pl(t) ? b9(t) : Kv(y9(Ei(e)));
}
function w9(e) {
var t = Nu(Of(e)), n = ["absolute", "fixed"].indexOf(Ca(e).position) >= 0, r = n && to(e) ? Ac(e) : e;
return pl(r) ? t.filter(function(o) {
return pl(o) && SC(o, r) && ta(o) !== "body";
}) : [];
}
function x9(e, t, n) {
var r = t === "clippingParents" ? w9(e) : [].concat(t), o = [].concat(r, [n]), a = o[0], i = o.reduce(function(s, u) {
var l = z1(e, u);
return s.top = Qi(l.top, s.top), s.right = Op(l.right, s.right), s.bottom = Op(l.bottom, s.bottom), s.left = Qi(l.left, s.left), s;
}, z1(e, a));
return i.width = i.right - i.left, i.height = i.bottom - i.top, i.x = i.left, i.y = i.top, i;
}
function FC(e) {
var t = e.reference, n = e.element, r = e.placement, o = r ? Zo(r) : null, a = r ? vl(r) : null, i = t.x + t.width / 2 - n.width / 2, s = t.y + t.height / 2 - n.height / 2, u;
switch (o) {
case Pr:
u = { x: i, y: t.y - n.height };
break;
case so:
u = { x: i, y: t.y + t.height };
break;
case lo:
u = { x: t.x + t.width, y: s };
break;
case $r:
u = { x: t.x - n.width, y: s };
break;
default:
u = { x: t.x, y: t.y };
}
var l = o ? Fg(o) : null;
if (l != null) {
var c = l === "y" ? "height" : "width";
switch (a) {
case dl:
u[l] = u[l] - (t[c] / 2 - n[c] / 2);
break;
case Xu:
u[l] = u[l] + (t[c] / 2 - n[c] / 2);
break;
}
}
return u;
}
function Yu(e, t) {
t === void 0 && (t = {});
var n = t, r = n.placement, o = r === void 0 ? e.placement : r, a = n.boundary, i = a === void 0 ? UF : a, s = n.rootBoundary, u = s === void 0 ? CC : s, l = n.elementContext, c = l === void 0 ? su : l, d = n.altBoundary, f = d === void 0 ? !1 : d, h = n.padding, p = h === void 0 ? 0 : h, v = TC(typeof p != "number" ? p : OC(p, Pc)), m = c === su ? qF : su, g = e.rects.popper, b = e.elements[f ? m : c], x = x9(pl(b) ? b : b.contextElement || Ei(e.elements.popper), i, u), w = hl(e.elements.reference), C = FC({ reference: w, element: g, strategy: "absolute", placement: o }), k = Kv(Object.assign({}, g, C)), E = c === su ? k : w, S = { top: x.top - E.top + v.top, bottom: E.bottom - x.bottom + v.bottom, left: x.left - E.left + v.left, right: E.right - x.right + v.right }, O = e.modifiersData.offset;
if (c === su && O) {
var F = O[o];
Object.keys(S).forEach(function($) {
var A = [lo, so].indexOf($) >= 0 ? 1 : -1, L = [Pr, so].indexOf($) >= 0 ? "y" : "x";
S[$] += F[L] * A;
});
}
return S;
}
function k9(e, t) {
t === void 0 && (t = {});
var n = t, r = n.placement, o = n.boundary, a = n.rootBoundary, i = n.padding, s = n.flipVariations, u = n.allowedAutoPlacements, l = u === void 0 ? $c : u, c = vl(r), d = c ? s ? D1 : D1.filter(function(p) {
return vl(p) === c;
}) : Pc, f = d.filter(function(p) {
return l.indexOf(p) >= 0;
});
f.length === 0 && (f = d);
var h = f.reduce(function(p, v) {
return p[v] = Yu(e, { placement: v, boundary: o, rootBoundary: a, padding: i })[Zo(v)], p;
}, {});
return Object.keys(h).sort(function(p, v) {
return h[p] - h[v];
});
}
function C9(e) {
if (Zo(e) === Pg) return [];
var t = ep(e);
return [M1(e), t, M1(t)];
}
function E9(e) {
var t = e.state, n = e.options, r = e.name;
if (!t.modifiersData[r]._skip) {
for (var o = n.mainAxis, a = o === void 0 ? !0 : o, i = n.altAxis, s = i === void 0 ? !0 : i, u = n.fallbackPlacements, l = 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 = Zo(m), b = g === m, x = u || (b || !p ? [ep(m)] : C9(m)), w = [m].concat(x).reduce(function(we, ke) {
return we.concat(Zo(ke) === Pg ? k9(t, { placement: ke, boundary: c, rootBoundary: d, padding: l, flipVariations: p, allowedAutoPlacements: v }) : ke);
}, []), C = t.rects.reference, k = t.rects.popper, E = /* @__PURE__ */ new Map(), S = !0, O = w[0], F = 0; F < w.length; F++) {
var $ = w[F], A = Zo($), L = vl($) === dl, N = [Pr, so].indexOf(A) >= 0, M = N ? "width" : "height", I = Yu(t, { placement: $, boundary: c, rootBoundary: d, altBoundary: f, padding: l }), z = N ? L ? lo : $r : L ? so : Pr;
C[M] > k[M] && (z = ep(z));
var R = ep(z), q = [];
if (a && q.push(I[A] <= 0), s && q.push(I[z] <= 0, I[R] <= 0), q.every(function(we) {
return we;
})) {
O = $, S = !1;
break;
}
E.set($, q);
}
if (S) for (var oe = p ? 3 : 1, Q = function(we) {
var ke = w.find(function(fe) {
var ge = E.get(fe);
if (ge) return ge.slice(0, we).every(function(J) {
return J;
});
});
if (ke) return O = ke, "break";
}, ae = oe; ae > 0; ae--) {
var pe = Q(ae);
if (pe === "break") break;
}
t.placement !== O && (t.modifiersData[r]._skip = !0, t.placement = O, t.reset = !0);
}
}
var S9 = { name: "flip", enabled: !0, phase: "main", fn: E9, requiresIfExists: ["offset"], data: { _skip: !1 } };
function V1(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 j1(e) {
return [Pr, lo, so, $r].some(function(t) {
return e[t] >= 0;
});
}
function _9(e) {
var t = e.state, n = e.name, r = t.rects.reference, o = t.rects.popper, a = t.modifiersData.preventOverflow, i = Yu(t, { elementContext: "reference" }), s = Yu(t, { altBoundary: !0 }), u = V1(i, r), l = V1(s, o, a), c = j1(u), d = j1(l);
t.modifiersData[n] = { referenceClippingOffsets: u, popperEscapeOffsets: l, isReferenceHidden: c, hasPopperEscaped: d }, t.attributes.popper = Object.assign({}, t.attributes.popper, { "data-popper-reference-hidden": c, "data-popper-escaped": d });
}
var T9 = { name: "hide", enabled: !0, phase: "main", requiresIfExists: ["preventOverflow"], fn: _9 };
function O9(e, t, n) {
var r = Zo(e), o = [$r, Pr].indexOf(r) >= 0 ? -1 : 1, a = typeof n == "function" ? n(Object.assign({}, t, { placement: e })) : n, i = a[0], s = a[1];
return i = i || 0, s = (s || 0) * o, [$r, lo].indexOf(r) >= 0 ? { x: s, y: i } : { x: i, y: s };
}
function P9(e) {
var t = e.state, n = e.options, r = e.name, o = n.offset, a = o === void 0 ? [0, 0] : o, i = $c.reduce(function(c, d) {
return c[d] = O9(d, t.rects, a), c;
}, {}), s = i[t.placement], u = s.x, l = s.y;
t.modifiersData.popperOffsets != null && (t.modifiersData.popperOffsets.x += u, t.modifiersData.popperOffsets.y += l), t.modifiersData[r] = i;
}
var $9 = { name: "offset", enabled: !0, phase: "main", requires: ["popperOffsets"], fn: P9 };
function A9(e) {
var t = e.state, n = e.name;
t.modifiersData[n] = FC({ reference: t.rects.reference, element: t.rects.popper, strategy: "absolute", placement: t.placement });
}
var IC = { name: "popperOffsets", enabled: !0, phase: "read", fn: A9, data: {} };
function F9(e) {
return e === "x" ? "y" : "x";
}
function I9(e) {
var t = e.state, n = e.options, r = e.name, o = n.mainAxis, a = o === void 0 ? !0 : o, i = n.altAxis, s = i === void 0 ? !1 : i, u = n.boundary, l = 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 = Yu(t, { boundary: u, rootBoundary: l, padding: d, altBoundary: c }), g = Zo(t.placement), b = vl(t.placement), x = !b, w = Fg(g), C = F9(w), k = t.modifiersData.popperOffsets, E = t.rects.reference, S = t.rects.popper, O = typeof v == "function" ? v(Object.assign({}, t.rects, { placement: t.placement })) : v, F = typeof O == "number" ? { mainAxis: O, altAxis: O } : Object.assign({ mainAxis: 0, altAxis: 0 }, O), $ = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, A = { x: 0, y: 0 };
if (k) {
if (a) {
var L, N = w === "y" ? Pr : $r, M = w === "y" ? so : lo, I = w === "y" ? "height" : "width", z = k[w], R = z + m[N], q = z - m[M], oe = h ? -S[I] / 2 : 0, Q = b === dl ? E[I] : S[I], ae = b === dl ? -S[I] : -E[I], pe = t.elements.arrow, we = h && pe ? Ag(pe) : { width: 0, height: 0 }, ke = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : _C(), fe = ke[N], ge = ke[M], J = Iu(0, E[I], we[I]), te = x ? E[I] / 2 - oe - J - fe - F.mainAxis : Q - J - fe - F.mainAxis, le = x ? -E[I] / 2 + oe + J + ge + F.mainAxis : ae + J + ge + F.mainAxis, Ee = t.elements.arrow && Ac(t.elements.arrow), Ne = Ee ? w === "y" ? Ee.clientTop || 0 : Ee.clientLeft || 0 : 0, je = (L = $ == null ? void 0 : $[w]) != null ? L : 0, _e = z + te - je - Ne, De = z + le - je, Ae = Iu(h ? Op(R, _e) : R, z, h ? Qi(q, De) : q);
k[w] = Ae, A[w] = Ae - z;
}
if (s) {
var Be, Ue = w === "x" ? Pr : $r, Ze = w === "x" ? so : lo, Me = k[C], rt = C === "y" ? "height" : "width", nt = Me + m[Ue], st = Me - m[Ze], P = [Pr, $r].indexOf(g) !== -1, j = (Be = $ == null ? void 0 : $[C]) != null ? Be : 0, se = P ? nt : Me - E[rt] - S[rt] - j + F.altAxis, ce = P ? Me + E[rt] + S[rt] - j - F.altAxis : st, de = h && P ? i9(se, Me, ce) : Iu(h ? se : nt, Me, h ? ce : st);
k[C] = de, A[C] = de - Me;
}
t.modifiersData[r] = A;
}
}
var N9 = { name: "preventOverflow", enabled: !0, phase: "main", fn: I9, requiresIfExists: ["offset"] };
function L9(e) {
return { scrollLeft: e.scrollLeft, scrollTop: e.scrollTop };
}
function D9(e) {
return e === No(e) || !to(e) ? Ig(e) : L9(e);
}
function R9(e) {
var t = e.getBoundingClientRect(), n = fl(t.width) / e.offsetWidth || 1, r = fl(t.height) / e.offsetHeight || 1;
return n !== 1 || r !== 1;
}
function B9(e, t, n) {
n === void 0 && (n = !1);
var r = to(t), o = to(t) && R9(t), a = Ei(t), i = hl(e, o), s = { scrollLeft: 0, scrollTop: 0 }, u = { x: 0, y: 0 };
return (r || !r && !n) && ((ta(t) !== "body" || Lg(a)) && (s = D9(t)), to(t) ? (u = hl(t, !0), u.x += t.clientLeft, u.y += t.clientTop) : a && (u.x = Ng(a))), { x: i.left + s.scrollLeft - u.x, y: i.top + s.scrollTop - u.y, width: i.width, height: i.height };
}
function M9(e) {
var t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set(), r = [];
e.forEach(function(a) {
t.set(a.name, a);
});
function o(a) {
n.add(a.name);
var i = [].concat(a.requires || [], a.requiresIfExists || []);
i.forEach(function(s) {
if (!n.has(s)) {
var u = t.get(s);
u && o(u);
}
}), r.push(a);
}
return e.forEach(function(a) {
n.has(a.name) || o(a);
}), r;
}
function z9(e) {
var t = M9(e);
return t9.reduce(function(n, r) {
return n.concat(t.filter(function(o) {
return o.phase === r;
}));
}, []);
}
function V9(e) {
var t;
return function() {
return t || (t = new Promise(function(n) {
Promise.resolve().then(function() {
t = void 0, n(e());
});
})), t;
};
}
function j9(e) {
var t = e.reduce(function(n, r) {
var o = n[r.name];
return n[r.name] = o ? Object.assign({}, o, r, { options: Object.assign({}, o.options, r.options), data: Object.assign({}, o.data, r.data) }) : r, n;
}, {});
return Object.keys(t).map(function(n) {
return t[n];
});
}
var H1 = { placement: "bottom", modifiers: [], strategy: "absolute" };
function U1() {
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 Dg(e) {
e === void 0 && (e = {});
var t = e, n = t.defaultModifiers, r = n === void 0 ? [] : n, o = t.defaultOptions, a = o === void 0 ? H1 : o;
return function(i, s, u) {
u === void 0 && (u = a);
var l = { placement: "bottom", orderedModifiers: [], options: Object.assign({}, H1, a), modifiersData: {}, elements: { reference: i, popper: s }, attributes: {}, styles: {} }, c = [], d = !1, f = { state: l, setOptions: function(v) {
var m = typeof v == "function" ? v(l.options) : v;
p(), l.options = Object.assign({}, a, l.options, m), l.scrollParents = { reference: pl(i) ? Nu(i) : i.contextElement ? Nu(i.contextElement) : [], popper: Nu(s) };
var g = z9(j9([].concat(r, l.options.modifiers)));
return l.orderedModifiers = g.filter(function(b) {
return b.enabled;
}), h(), f.update();
}, forceUpdate: function() {
if (!d) {
var v = l.elements, m = v.reference, g = v.popper;
if (U1(m, g)) {
l.rects = { reference: B9(m, Ac(g), l.options.strategy === "fixed"), popper: Ag(g) }, l.reset = !1, l.placement = l.options.placement, l.orderedModifiers.forEach(function(S) {
return l.modifiersData[S.name] = Object.assign({}, S.data);
});
for (var b = 0; b < l.orderedModifiers.length; b++) {
if (l.reset === !0) {
l.reset = !1, b = -1;
continue;
}
var x = l.orderedModifiers[b], w = x.fn, C = x.options, k = C === void 0 ? {} : C, E = x.name;
typeof w == "function" && (l = w({ state: l, options: k, name: E, instance: f }) || l);
}
}
}
}, update: V9(function() {
return new Promise(function(v) {
f.forceUpdate(), v(l);
});
}), destroy: function() {
p(), d = !0;
} };
if (!U1(i, s)) return f;
f.setOptions(u).then(function(v) {
!d && u.onFirstUpdate && u.onFirstUpdate(v);
});
function h() {
l.orderedModifiers.forEach(function(v) {
var m = v.name, g = v.options, b = g === void 0 ? {} : g, x = v.effect;
if (typeof x == "function") {
var w = x({ state: l, name: m, instance: f, options: b }), C = function() {
};
c.push(w || C);
}
});
}
function p() {
c.forEach(function(v) {
return v();
}), c = [];
}
return f;
};
}
Dg();
var H9 = [$C, IC, PC, EC];
Dg({ defaultModifiers: H9 });
var U9 = [$C, IC, PC, EC, $9, S9, N9, c9, T9], q9 = Dg({ defaultModifiers: U9 });
const W9 = (e, t, n = {}) => {
const r = {
name: "updateState",
enabled: !0,
phase: "write",
fn: ({ state: u }) => {
const l = K9(u);
Object.assign(i.value, l);
},
requires: ["computeStyles"]
}, o = _(() => {
const { onFirstUpdate: u, placement: l, strategy: c, modifiers: d } = y(n);
return {
onFirstUpdate: u,
placement: l || "bottom",
strategy: c || "absolute",
modifiers: [
...d || [],
r,
{ name: "applyStyles", enabled: !1 }
]
};
}), a = Yn(), i = H({
styles: {
popper: {
position: y(o).strategy,
left: "0",
top: "0"
},
arrow: {
position: "absolute"
}
},
attributes: {}
}), s = () => {
a.value && (a.value.destroy(), a.value = void 0);
};
return me(o, (u) => {
const l = y(a);
l && l.setOptions(u);
}, {
deep: !0
}), me([e, t], ([u, l]) => {
s(), !(!u || !l) && (a.value = q9(u, l, y(o)));
}), Rt(() => {
s();
}), {
state: _(() => {
var u;
return { ...((u = y(a)) == null ? void 0 : u.state) || {} };
}),
styles: _(() => y(i).styles),
attributes: _(() => y(i).attributes),
update: () => {
var u;
return (u = y(a)) == null ? void 0 : u.update();
},
forceUpdate: () => {
var u;
return (u = y(a)) == null ? void 0 : u.forceUpdate();
},
instanceRef: _(() => y(a))
};
};
function K9(e) {
const t = Object.keys(e.elements), n = Tp(t.map((o) => [o, e.styles[o] || {}])), r = Tp(t.map((o) => [o, e.attributes[o]]));
return {
styles: n,
attributes: r
};
}
const G9 = (e) => {
if (!e)
return { onClick: xa, onMousedown: xa, onMouseup: xa };
let t = !1, n = !1;
return { onClick: (i) => {
t && n && e(i), t = n = !1;
}, onMousedown: (i) => {
t = i.target === i.currentTarget;
}, onMouseup: (i) => {
n = i.target === i.currentTarget;
} };
};
function q1() {
let e;
const t = (r, o) => {
n(), e = window.setTimeout(r, o);
}, n = () => window.clearTimeout(e);
return Sc(() => n()), {
registerTimeout: t,
cancelTimeout: n
};
}
const Gv = {
prefix: Math.floor(Math.random() * 1e4),
current: 0
}, X9 = Symbol("elIdInjection"), NC = () => dt() ? $e(X9, Gv) : Gv, pi = (e) => {
const t = NC();
!on && t === Gv && Sn("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 = Og();
return _(() => y(e) || `${n.value}-id-${t.prefix}-${t.current++}`);
};
let Ys = [];
const W1 = (e) => {
const t = e;
t.key === Fn.esc && Ys.forEach((n) => n(t));
}, Y9 = (e) => {
ht(() => {
Ys.length === 0 && document.addEventListener("keydown", W1), on && Ys.push(e);
}), Rt(() => {
Ys = Ys.filter((t) => t !== e), Ys.length === 0 && on && document.removeEventListener("keydown", W1);
});
};
let K1;
const LC = () => {
const e = Og(), t = NC(), n = _(() => `${e.value}-popper-container-${t.prefix}`), r = _(() => `#${n.value}`);
return {
id: n,
selector: r
};
}, Z9 = (e) => {
const t = document.createElement("div");
return t.id = e, document.body.appendChild(t), t;
}, J9 = () => {
const { id: e, selector: t } = LC();
return ng(() => {
on && (process.env.NODE_ENV === "test" || !K1 || !document.body.querySelector(t.value)) && (K1 = Z9(e.value));
}), {
id: e,
selector: t
};
}, Q9 = mt({
showAfter: {
type: Number,
default: 0
},
hideAfter: {
type: Number,
default: 200
},
autoClose: {
type: Number,
default: 0
}
}), eI = ({
showAfter: e,
hideAfter: t,
autoClose: n,
open: r,
close: o
}) => {
const { registerTimeout: a } = q1(), {
registerTimeout: i,
cancelTimeout: s
} = q1();
return {
onOpen: (c) => {
a(() => {
r(c);
const d = y(n);
Ut(d) && d > 0 && i(() => {
o(c);
}, d);
}, y(e));
},
onClose: (c) => {
s(), a(() => {
o(c);
}, y(t));
}
};
}, DC = Symbol("elForwardRef"), tI = (e) => {
ft(DC, {
setForwardRef: (n) => {
e.value = n;
}
});
}, nI = (e) => ({
mounted(t) {
e(t);
},
updated(t) {
e(t);
},
unmounted() {
e(null);
}
}), G1 = {
current: 0
}, X1 = H(0), RC = 2e3, Y1 = Symbol("elZIndexContextKey"), BC = Symbol("zIndexContextKey"), Rg = (e) => {
const t = dt() ? $e(Y1, G1) : G1, n = e || (dt() ? $e(BC, void 0) : void 0), r = _(() => {
const i = y(n);
return Ut(i) ? i : RC;
}), o = _(() => r.value + X1.value), a = () => (t.current++, X1.value = t.current, o.value);
return !on && !$e(Y1) && Sn("ZIndexInjection", `Looks like you are using server rendering, you must provide a z-index provider to ensure the hydration process to be succeed
usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`), {
initialZIndex: r,
currentZIndex: o,
nextZIndex: a
};
};
function rI(e) {
let t;
function n() {
if (e.value == null)
return;
const { selectionStart: o, selectionEnd: a, value: i } = e.value;
if (o == null || a == null)
return;
const s = i.slice(0, Math.max(0, o)), u = i.slice(Math.max(0, a));
t = {
selectionStart: o,
selectionEnd: a,
value: i,
beforeTxt: s,
afterTxt: u
};
}
function r() {
if (e.value == null || t == null)
return;
const { value: o } = e.value, { beforeTxt: a, afterTxt: i, selectionStart: s } = t;
if (a == null || i == null || s == null)
return;
let u = o.length;
if (o.endsWith(i))
u = o.length - i.length;
else if (o.startsWith(a))
u = a.length;
else {
const l = a[s - 1], c = o.indexOf(l, s - 1);
c !== -1 && (u = c + 1);
}
e.value.setSelectionRange(u, u);
}
return [n, r];
}
const Aa = _f({
type: String,
values: Tf,
required: !1
}), MC = Symbol("size"), zC = () => {
const e = $e(MC, {});
return _(() => y(e.size) || "");
};
function VC(e, {
beforeFocus: t,
afterFocus: n,
beforeBlur: r,
afterBlur: o
} = {}) {
const a = dt(), { emit: i } = a, s = Yn(), u = H(!1), l = (f) => {
Nn(t) && t(f) || u.value || (u.value = !0, i("focus", f), n == null || n());
}, c = (f) => {
var h;
Nn(r) && r(f) || f.relatedTarget && ((h = s.value) != null && h.contains(f.relatedTarget)) || (u.value = !1, i("blur", f), o == null || o());
}, d = () => {
var f, h;
(f = s.value) != null && f.contains(document.activeElement) && s.value !== document.activeElement || (h = e.value) == null || h.focus();
};
return me(s, (f) => {
f && f.setAttribute("tabindex", "-1");
}), To(s, "focus", l, !0), To(s, "blur", c, !0), To(s, "click", d, !0), process.env.NODE_ENV === "test" && ht(() => {
const f = Zi(e.value) ? e.value : document.querySelector("input,textarea");
f && (To(f, "focus", l, !0), To(f, "blur", c, !0));
}), {
isFocused: u,
wrapperRef: s,
handleFocus: l,
handleBlur: c
};
}
function Bg({
afterComposition: e,
emit: t
}) {
const n = H(!1), r = (s) => {
t == null || t("compositionstart", s), n.value = !0;
}, o = (s) => {
var u;
t == null || t("compositionupdate", s);
const l = (u = s.target) == null ? void 0 : u.value, c = l[l.length - 1] || "";
n.value = !AF(c);
}, a = (s) => {
t == null || t("compositionend", s), n.value && (n.value = !1, Ge(() => e(s)));
};
return {
isComposing: n,
handleComposition: (s) => {
s.type === "compositionend" ? a(s) : o(s);
},
handleCompositionStart: r,
handleCompositionUpdate: o,
handleCompositionEnd: a
};
}
const jC = Symbol("emptyValuesContextKey"), oI = "use-empty-values", aI = ["", void 0, null], iI = void 0, HC = mt({
emptyValues: Array,
valueOnClear: {
type: [String, Number, Boolean, Function],
default: void 0,
validator: (e) => Nn(e) ? !e() : !e
}
}), UC = (e, t) => {
const n = dt() ? $e(jC, H({})) : H({}), r = _(() => e.emptyValues || n.value.emptyValues || aI), o = _(() => Nn(e.valueOnClear) ? e.valueOnClear() : e.valueOnClear !== void 0 ? e.valueOnClear : Nn(n.value.valueOnClear) ? n.value.valueOnClear() : n.value.valueOnClear !== void 0 ? n.value.valueOnClear : iI), a = (i) => r.value.includes(i);
return r.value.includes(o.value) || Sn(oI, "value-on-clear should be a value of empty-values"), {
emptyValues: r,
valueOnClear: o,
isEmptyValue: a
};
}, sI = mt({
ariaLabel: String,
ariaOrientation: {
type: String,
values: ["horizontal", "vertical", "undefined"]
},
ariaControls: String
}), Si = (e) => cC(sI, e), qC = Symbol(), Pp = H();
function Pf(e, t = void 0) {
const n = dt() ? $e(qC, Pp) : Pp;
return e ? _(() => {
var r, o;
return (o = (r = n.value) == null ? void 0 : r[e]) != null ? o : t;
}) : n;
}
function lI(e, t) {
const n = Pf(), r = pt(e, _(() => {
var s;
return ((s = n.value) == null ? void 0 : s.namespace) || Fu;
})), o = go(_(() => {
var s;
return (s = n.value) == null ? void 0 : s.locale;
})), a = Rg(_(() => {
var s;
return ((s = n.value) == null ? void 0 : s.zIndex) || RC;
})), i = _(() => {
var s;
return y(t) || ((s = n.value) == null ? void 0 : s.size) || "";
});
return uI(_(() => y(n) || {})), {
ns: r,
locale: o,
zIndex: a,
size: i
};
}
const uI = (e, t, n = !1) => {
var r;
const o = !!dt(), a = o ? Pf() : void 0, i = (r = void 0) != null ? r : o ? ft : void 0;
if (!i) {
Sn("provideGlobalConfig", "provideGlobalConfig() can only be used inside setup().");
return;
}
const s = _(() => {
const u = y(e);
return a != null && a.value ? cI(a.value, u) : u;
});
return i(qC, s), i(wC, _(() => s.value.locale)), i(xC, _(() => s.value.namespace)), i(BC, _(() => s.value.zIndex)), i(MC, {
size: _(() => s.value.size || "")
}), i(jC, _(() => ({
emptyValues: s.value.emptyValues,
valueOnClear: s.value.valueOnClear
}))), (n || !Pp.value) && (Pp.value = s.value), s;
}, cI = (e, t) => {
const n = [.../* @__PURE__ */ new Set([...$1(e), ...$1(t)])], r = {};
for (const o of n)
r[o] = t[o] !== void 0 ? t[o] : e[o];
return r;
};
var vt = (e, t) => {
const n = e.__vccOpts || e;
for (const [r, o] of t)
n[r] = o;
return n;
};
const dI = mt({
size: {
type: et([Number, String])
},
color: {
type: String
}
}), pI = Z({
name: "ElIcon",
inheritAttrs: !1
}), fI = /* @__PURE__ */ Z({
...pI,
props: dI,
setup(e) {
const t = e, n = pt("icon"), r = _(() => {
const { size: o, color: a } = t;
return !o && !a ? {} : {
fontSize: ba(o) ? void 0 : cl(o),
"--color": a
};
});
return (o, a) => (T(), B("i", Xt({
class: y(n).b(),
style: y(r)
}, o.$attrs), [
ve(o.$slots, "default")
], 16));
}
});
var hI = /* @__PURE__ */ vt(fI, [["__file", "icon.vue"]]);
const nn = $n(hI), Mg = Symbol("formContextKey"), $p = Symbol("formItemContextKey"), fi = (e, t = {}) => {
const n = H(void 0), r = t.prop ? n : kC("size"), o = t.global ? n : zC(), a = t.form ? { size: void 0 } : $e(Mg, void 0), i = t.formItem ? { size: void 0 } : $e($p, void 0);
return _(() => r.value || y(e) || (i == null ? void 0 : i.size) || (a == null ? void 0 : a.size) || o.value || "");
}, Fc = (e) => {
const t = kC("disabled"), n = $e(Mg, void 0);
return _(() => t.value || y(e) || (n == null ? void 0 : n.disabled) || !1);
}, _i = () => {
const e = $e(Mg, void 0), t = $e($p, void 0);
return {
form: e,
formItem: t
};
}, Ic = (e, {
formItemContext: t,
disableIdGeneration: n,
disableIdManagement: r
}) => {
n || (n = H(!1)), r || (r = H(!1));
const o = H();
let a;
const i = _(() => {
var s;
return !!(!(e.label || e.ariaLabel) && t && t.inputIds && ((s = t.inputIds) == null ? void 0 : s.length) <= 1);
});
return ht(() => {
a = me([jt(e, "id"), n], ([s, u]) => {
const l = s ?? (u ? void 0 : pi().value);
l !== o.value && (t != null && t.removeInputId && (o.value && t.removeInputId(o.value), !(r != null && r.value) && !u && l && t.addInputId(l)), o.value = l);
}, { immediate: !0 });
}), Tk(() => {
a && a(), t != null && t.removeInputId && o.value && t.removeInputId(o.value);
}), {
isLabeledByFormItem: i,
inputId: o
};
};
let yo;
const vI = `
height:0 !important;
visibility:hidden !important;
${BT() ? "" : "overflow:hidden !important;"}
position:absolute !important;
z-index:-1000 !important;
top:0 !important;
right:0 !important;
`, gI = [
"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 mI(e) {
const t = window.getComputedStyle(e), n = t.getPropertyValue("box-sizing"), r = Number.parseFloat(t.getPropertyValue("padding-bottom")) + Number.parseFloat(t.getPropertyValue("padding-top")), o = Number.parseFloat(t.getPropertyValue("border-bottom-width")) + Number.parseFloat(t.getPropertyValue("border-top-width"));
return { contextStyle: gI.map((i) => `${i}:${t.getPropertyValue(i)}`).join(";"), paddingSize: r, borderSize: o, boxSizing: n };
}
function Z1(e, t = 1, n) {
var r;
yo || (yo = document.createElement("textarea"), document.body.appendChild(yo));
const { paddingSize: o, borderSize: a, boxSizing: i, contextStyle: s } = mI(e);
yo.setAttribute("style", `${s};${vI}`), yo.value = e.value || e.placeholder || "";
let u = yo.scrollHeight;
const l = {};
i === "border-box" ? u = u + a : i === "content-box" && (u = u - o), yo.value = "";
const c = yo.scrollHeight - o;
if (Ut(t)) {
let d = c * t;
i === "border-box" && (d = d + o + a), u = Math.max(d, u), l.minHeight = `${d}px`;
}
if (Ut(n)) {
let d = c * n;
i === "border-box" && (d = d + o + a), u = Math.min(d, u);
}
return l.height = `${u}px`, (r = yo.parentNode) == null || r.removeChild(yo), yo = void 0, l;
}
const yI = mt({
id: {
type: String,
default: void 0
},
size: Aa,
disabled: Boolean,
modelValue: {
type: et([
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: et([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: io
},
prefixIcon: {
type: io
},
containerRole: {
type: String,
default: void 0
},
tabindex: {
type: [String, Number],
default: 0
},
validateEvent: {
type: Boolean,
default: !0
},
inputStyle: {
type: et([Object, Array, String]),
default: () => Ja({})
},
autofocus: Boolean,
rows: {
type: Number,
default: 2
},
...Si(["ariaLabel"])
}), bI = {
[hn]: (e) => Or(e),
input: (e) => Or(e),
change: (e) => Or(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
}, wI = Z({
name: "ElInput",
inheritAttrs: !1
}), xI = /* @__PURE__ */ Z({
...wI,
props: yI,
emits: bI,
setup(e, { expose: t, emit: n }) {
const r = e, o = rg(), a = ho(), i = _(() => {
const j = {};
return r.containerRole === "combobox" && (j["aria-haspopup"] = o["aria-haspopup"], j["aria-owns"] = o["aria-owns"], j["aria-expanded"] = o["aria-expanded"]), j;
}), s = _(() => [
r.type === "textarea" ? m.b() : v.b(),
v.m(h.value),
v.is("disabled", p.value),
v.is("exceed", pe.value),
{
[v.b("group")]: a.prepend || a.append,
[v.m("prefix")]: a.prefix || r.prefixIcon,
[v.m("suffix")]: a.suffix || r.suffixIcon || r.clearable || r.showPassword,
[v.bm("suffix", "password-clear")]: q.value && oe.value,
[v.b("hidden")]: r.type === "hidden"
},
o.class
]), u = _(() => [
v.e("wrapper"),
v.is("focus", O.value)
]), l = NF({
excludeKeys: _(() => Object.keys(i.value))
}), { form: c, formItem: d } = _i(), { inputId: f } = Ic(r, {
formItemContext: d
}), h = fi(), p = Fc(), v = pt("input"), m = pt("textarea"), g = Yn(), b = Yn(), x = H(!1), w = H(!1), C = H(), k = Yn(r.inputStyle), E = _(() => g.value || b.value), { wrapperRef: S, isFocused: O, handleFocus: F, handleBlur: $ } = VC(E, {
beforeFocus() {
return p.value;
},
afterBlur() {
var j;
r.validateEvent && ((j = d == null ? void 0 : d.validate) == null || j.call(d, "blur").catch((se) => Sn(se)));
}
}), A = _(() => {
var j;
return (j = c == null ? void 0 : c.statusIcon) != null ? j : !1;
}), L = _(() => (d == null ? void 0 : d.validateState) || ""), N = _(() => L.value && bC[L.value]), M = _(() => w.value ? gC : yF), I = _(() => [
o.style
]), z = _(() => [
r.inputStyle,
k.value,
{ resize: r.resize }
]), R = _(() => Oc(r.modelValue) ? "" : String(r.modelValue)), q = _(() => r.clearable && !p.value && !r.readonly && !!R.value && (O.value || x.value)), oe = _(() => r.showPassword && !p.value && !r.readonly && !!R.value && (!!R.value || O.value)), Q = _(() => r.showWordLimit && !!r.maxlength && (r.type === "text" || r.type === "textarea") && !p.value && !r.readonly && !r.showPassword), ae = _(() => R.value.length), pe = _(() => !!Q.value && ae.value > Number(r.maxlength)), we = _(() => !!a.suffix || !!r.suffixIcon || q.value || r.showPassword || Q.value || !!L.value && A.value), [ke, fe] = rI(g);
qo(b, (j) => {
if (te(), !Q.value || r.resize !== "both")
return;
const se = j[0], { width: ce } = se.contentRect;
C.value = {
right: `calc(100% - ${ce + 15 + 6}px)`
};
});
const ge = () => {
const { type: j, autosize: se } = r;
if (!(!on || j !== "textarea" || !b.value))
if (se) {
const ce = zn(se) ? se.minRows : void 0, de = zn(se) ? se.maxRows : void 0, Oe = Z1(b.value, ce, de);
k.value = {
overflowY: "hidden",
...Oe
}, Ge(() => {
b.value.offsetHeight, k.value = Oe;
});
} else
k.value = {
minHeight: Z1(b.value).minHeight
};
}, te = ((j) => {
let se = !1;
return () => {
var ce;
if (se || !r.autosize)
return;
((ce = b.value) == null ? void 0 : ce.offsetParent) === null || (j(), se = !0);
};
})(ge), le = () => {
const j = E.value, se = r.formatter ? r.formatter(R.value) : R.value;
!j || j.value === se || (j.value = se);
}, Ee = async (j) => {
ke();
let { value: se } = j.target;
if (r.formatter && (se = r.parser ? r.parser(se) : se), !je.value) {
if (se === R.value) {
le();
return;
}
n(hn, se), n("input", se), await Ge(), le(), fe();
}
}, Ne = (j) => {
n("change", j.target.value);
}, {
isComposing: je,
handleCompositionStart: _e,
handleCompositionUpdate: De,
handleCompositionEnd: Ae
} = Bg({ emit: n, afterComposition: Ee }), Be = () => {
w.value = !w.value, Ue();
}, Ue = async () => {
var j;
await Ge(), (j = E.value) == null || j.focus();
}, Ze = () => {
var j;
return (j = E.value) == null ? void 0 : j.blur();
}, Me = (j) => {
x.value = !1, n("mouseleave", j);
}, rt = (j) => {
x.value = !0, n("mouseenter", j);
}, nt = (j) => {
n("keydown", j);
}, st = () => {
var j;
(j = E.value) == null || j.select();
}, P = () => {
n(hn, ""), n("change", ""), n("clear"), n("input", "");
};
return me(() => r.modelValue, () => {
var j;
Ge(() => ge()), r.validateEvent && ((j = d == null ? void 0 : d.validate) == null || j.call(d, "change").catch((se) => Sn(se)));
}), me(R, () => le()), me(() => r.type, async () => {
await Ge(), le(), ge();
}), ht(() => {
!r.formatter && r.parser && Sn("ElInput", "If you set the parser, you also need to set the formatter."), le(), Ge(ge);
}), t({
input: g,
textarea: b,
ref: E,
textareaStyle: z,
autosize: jt(r, "autosize"),
isComposing: je,
focus: Ue,
blur: Ze,
select: st,
clear: P,
resizeTextarea: ge
}), (j, se) => (T(), B("div", Xt(y(i), {
class: [
y(s),
{
[y(v).bm("group", "append")]: j.$slots.append,
[y(v).bm("group", "prepend")]: j.$slots.prepend
}
],
style: y(I),
role: j.containerRole,
onMouseenter: rt,
onMouseleave: Me
}), [
ne(" input "),
j.type !== "textarea" ? (T(), B(Qe, { key: 0 }, [
ne(" prepend slot "),
j.$slots.prepend ? (T(), B("div", {
key: 0,
class: W(y(v).be("group", "prepend"))
}, [
ve(j.$slots, "prepend")
], 2)) : ne("v-if", !0),
Y("div", {
ref_key: "wrapperRef",
ref: S,
class: W(y(u))
}, [
ne(" prefix slot "),
j.$slots.prefix || j.prefixIcon ? (T(), B("span", {
key: 0,
class: W(y(v).e("prefix"))
}, [
Y("span", {
class: W(y(v).e("prefix-inner"))
}, [
ve(j.$slots, "prefix"),
j.prefixIcon ? (T(), ie(y(nn), {
key: 0,
class: W(y(v).e("icon"))
}, {
default: G(() => [
(T(), ie(_t(j.prefixIcon)))
]),
_: 1
}, 8, ["class"])) : ne("v-if", !0)
], 2)
], 2)) : ne("v-if", !0),
Y("input", Xt({
id: y(f),
ref_key: "input",
ref: g,
class: y(v).e("inner")
}, y(l), {
minlength: j.minlength,
maxlength: j.maxlength,
type: j.showPassword ? w.value ? "text" : "password" : j.type,
disabled: y(p),
readonly: j.readonly,
autocomplete: j.autocomplete,
tabindex: j.tabindex,
"aria-label": j.ariaLabel,
placeholder: j.placeholder,
style: j.inputStyle,
form: j.form,
autofocus: j.autofocus,
onCompositionstart: y(_e),
onCompositionupdate: y(De),
onCompositionend: y(Ae),
onInput: Ee,
onChange: Ne,
onKeydown: nt
}), null, 16, ["id", "minlength", "maxlength", "type", "disabled", "readonly", "autocomplete", "tabindex", "aria-label", "placeholder", "form", "autofocus", "onCompositionstart", "onCompositionupdate", "onCompositionend"]),
ne(" suffix slot "),
y(we) ? (T(), B("span", {
key: 1,
class: W(y(v).e("suffix"))
}, [
Y("span", {
class: W(y(v).e("suffix-inner"))
}, [
!y(q) || !y(oe) || !y(Q) ? (T(), B(Qe, { key: 0 }, [
ve(j.$slots, "suffix"),
j.suffixIcon ? (T(), ie(y(nn), {
key: 0,
class: W(y(v).e("icon"))
}, {
default: G(() => [
(T(), ie(_t(j.suffixIcon)))
]),
_: 1
}, 8, ["class"])) : ne("v-if", !0)
], 64)) : ne("v-if", !0),
y(q) ? (T(), ie(y(nn), {
key: 1,
class: W([y(v).e("icon"), y(v).e("clear")]),
onMousedown: it(y(xa), ["prevent"]),
onClick: P
}, {
default: G(() => [
ee(y(Ef))
]),
_: 1
}, 8, ["class", "onMousedown"])) : ne("v-if", !0),
y(oe) ? (T(), ie(y(nn), {
key: 2,
class: W([y(v).e("icon"), y(v).e("password")]),
onClick: Be
}, {
default: G(() => [
(T(), ie(_t(y(M))))
]),
_: 1
}, 8, ["class"])) : ne("v-if", !0),
y(Q) ? (T(), B("span", {
key: 3,
class: W(y(v).e("count"))
}, [
Y("span", {
class: W(y(v).e("count-inner"))
}, Te(y(ae)) + " / " + Te(j.maxlength), 3)
], 2)) : ne("v-if", !0),
y(L) && y(N) && y(A) ? (T(), ie(y(nn), {
key: 4,
class: W([
y(v).e("icon"),
y(v).e("validateIcon"),
y(v).is("loading", y(L) === "validating")
])
}, {
default: G(() => [
(T(), ie(_t(y(N))))
]),
_: 1
}, 8, ["class"])) : ne("v-if", !0)
], 2)
], 2)) : ne("v-if", !0)
], 2),
ne(" append slot "),
j.$slots.append ? (T(), B("div", {
key: 1,
class: W(y(v).be("group", "append"))
}, [
ve(j.$slots, "append")
], 2)) : ne("v-if", !0)
], 64)) : (T(), B(Qe, { key: 1 }, [
ne(" textarea "),
Y("textarea", Xt({
id: y(f),
ref_key: "textarea",
ref: b,
class: [y(m).e("inner"), y(v).is("focus", y(O))]
}, y(l), {
minlength: j.minlength,
maxlength: j.maxlength,
tabindex: j.tabindex,
disabled: y(p),
readonly: j.readonly,
autocomplete: j.autocomplete,
style: y(z),
"aria-label": j.ariaLabel,
placeholder: j.placeholder,
form: j.form,
autofocus: j.autofocus,
rows: j.rows,
onCompositionstart: y(_e),
onCompositionupdate: y(De),
onCompositionend: y(Ae),
onInput: Ee,
onFocus: y(F),
onBlur: y($),
onChange: Ne,
onKeydown: nt
}), null, 16, ["id", "minlength", "maxlength", "tabindex", "disabled", "readonly", "autocomplete", "aria-label", "placeholder", "form", "autofocus", "rows", "onCompositionstart", "onCompositionupdate", "onCompositionend", "onFocus", "onBlur"]),
y(Q) ? (T(), B("span", {
key: 0,
style: lt(C.value),
class: W(y(v).e("count"))
}, Te(y(ae)) + " / " + Te(j.maxlength), 7)) : ne("v-if", !0)
], 64))
], 16, ["role"]));
}
});
var kI = /* @__PURE__ */ vt(xI, [["__file", "input.vue"]]);
const $f = $n(kI), Bs = 4, CI = {
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"
}
}, EI = ({
move: e,
size: t,
bar: n
}) => ({
[n.size]: t,
transform: `translate${n.axis}(${e}%)`
}), zg = Symbol("scrollbarContextKey"), SI = mt({
vertical: Boolean,
size: String,
move: Number,
ratio: {
type: Number,
required: !0
},
always: Boolean
}), _I = "Thumb", TI = /* @__PURE__ */ Z({
__name: "thumb",
props: SI,
setup(e) {
const t = e, n = $e(zg), r = pt("scrollbar");
n || pC(_I, "can not inject scrollbar context");
const o = H(), a = H(), i = H({}), s = H(!1);
let u = !1, l = !1, c = on ? document.onselectstart : null;
const d = _(() => CI[t.vertical ? "vertical" : "horizontal"]), f = _(() => EI({
size: t.size,
move: t.move,
bar: d.value
})), h = _(() => o.value[d.value.offset] ** 2 / n.wrapElement[d.value.scrollSize] / t.ratio / a.value[d.value.offset]), p = (k) => {
var E;
if (k.stopPropagation(), k.ctrlKey || [1, 2].includes(k.button))
return;
(E = window.getSelection()) == null || E.removeAllRanges(), m(k);
const S = k.currentTarget;
S && (i.value[d.value.axis] = S[d.value.offset] - (k[d.value.client] - S.getBoundingClientRect()[d.value.direction]));
}, v = (k) => {
if (!a.value || !o.value || !n.wrapElement)
return;
const E = Math.abs(k.target.getBoundingClientRect()[d.value.direction] - k[d.value.client]), S = a.value[d.value.offset] / 2, O = (E - S) * 100 * h.value / o.value[d.value.offset];
n.wrapElement[d.value.scroll] = O * n.wrapElement[d.value.scrollSize] / 100;
}, m = (k) => {
k.stopImmediatePropagation(), u = !0, document.addEventListener("mousemove", g), document.addEventListener("mouseup", b), c = document.onselectstart, document.onselectstart = () => !1;
}, g = (k) => {
if (!o.value || !a.value || u === !1)
return;
const E = i.value[d.value.axis];
if (!E)
return;
const S = (o.value.getBoundingClientRect()[d.value.direction] - k[d.value.client]) * -1, O = a.value[d.value.offset] - E, F = (S - O) * 100 * h.value / o.value[d.value.offset];
n.wrapElement[d.value.scroll] = F * n.wrapElement[d.value.scrollSize] / 100;
}, b = () => {
u = !1, i.value[d.value.axis] = 0, document.removeEventListener("mousemove", g), document.removeEventListener("mouseup", b), C(), l && (s.value = !1);
}, x = () => {
l = !1, s.value = !!t.size;
}, w = () => {
l = !0, s.value = u;
};
Rt(() => {
C(), document.removeEventListener("mouseup", b);
});
const C = () => {
document.onselectstart !== c && (document.onselectstart = c);
};
return To(jt(n, "scrollbarElement"), "mousemove", x), To(jt(n, "scrollbarElement"), "mouseleave", w), (k, E) => (T(), ie(Kr, {
name: y(r).b("fade"),
persisted: ""
}, {
default: G(() => [
tt(Y("div", {
ref_key: "instance",
ref: o,
class: W([y(r).e("bar"), y(r).is(y(d).key)]),
onMousedown: v
}, [
Y("div", {
ref_key: "thumb",
ref: a,
class: W(y(r).e("thumb")),
style: lt(y(f)),
onMousedown: p
}, null, 38)
], 34), [
[Pt, k.always || s.value]
])
]),
_: 1
}, 8, ["name"]));
}
});
var J1 = /* @__PURE__ */ vt(TI, [["__file", "thumb.vue"]]);
const OI = mt({
always: {
type: Boolean,
default: !0
},
minSize: {
type: Number,
required: !0
}
}), PI = /* @__PURE__ */ Z({
__name: "bar",
props: OI,
setup(e, { expose: t }) {
const n = e, r = $e(zg), o = H(0), a = H(0), i = H(""), s = H(""), u = H(1), l = H(1);
return t({
handleScroll: (f) => {
if (f) {
const h = f.offsetHeight - Bs, p = f.offsetWidth - Bs;
a.value = f.scrollTop * 100 / h * u.value, o.value = f.scrollLeft * 100 / p * l.value;
}
},
update: () => {
const f = r == null ? void 0 : r.wrapElement;
if (!f)
return;
const h = f.offsetHeight - Bs, p = f.offsetWidth - Bs, v = h ** 2 / f.scrollHeight, m = p ** 2 / f.scrollWidth, g = Math.max(v, n.minSize), b = Math.max(m, n.minSize);
u.value = v / (h - v) / (g / (h - g)), l.value = m / (p - m) / (b / (p - b)), s.value = g + Bs < h ? `${g}px` : "", i.value = b + Bs < p ? `${b}px` : "";
}
}), (f, h) => (T(), B(Qe, null, [
ee(J1, {
move: o.value,
ratio: l.value,
size: i.value,
always: f.always
}, null, 8, ["move", "ratio", "size", "always"]),
ee(J1, {
move: a.value,
ratio: u.value,
size: s.value,
vertical: "",
always: f.always
}, null, 8, ["move", "ratio", "size", "always"])
], 64));
}
});
var $I = /* @__PURE__ */ vt(PI, [["__file", "bar.vue"]]);
const AI = mt({
height: {
type: [String, Number],
default: ""
},
maxHeight: {
type: [String, Number],
default: ""
},
native: {
type: Boolean,
default: !1
},
wrapStyle: {
type: et([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,
...Si(["ariaLabel", "ariaOrientation"])
}), FI = {
scroll: ({
scrollTop: e,
scrollLeft: t
}) => [e, t].every(Ut)
}, Xv = "ElScrollbar", II = Z({
name: Xv
}), NI = /* @__PURE__ */ Z({
...II,
props: AI,
emits: FI,
setup(e, { expose: t, emit: n }) {
const r = e, o = pt("scrollbar");
let a, i, s = 0, u = 0;
const l = H(), c = H(), d = H(), f = H(), h = _(() => {
const C = {};
return r.height && (C.height = cl(r.height)), r.maxHeight && (C.maxHeight = cl(r.maxHeight)), [r.wrapStyle, C];
}), p = _(() => [
r.wrapClass,
o.e("wrap"),
{ [o.em("wrap", "hidden-default")]: !r.native }
]), v = _(() => [o.e("view"), r.viewClass]), m = () => {
var C;
c.value && ((C = f.value) == null || C.handleScroll(c.value), s = c.value.scrollTop, u = c.value.scrollLeft, n("scroll", {
scrollTop: c.value.scrollTop,
scrollLeft: c.value.scrollLeft
}));
};
function g(C, k) {
zn(C) ? c.value.scrollTo(C) : Ut(C) && Ut(k) && c.value.scrollTo(C, k);
}
const b = (C) => {
if (!Ut(C)) {
Sn(Xv, "value must be a number");
return;
}
c.value.scrollTop = C;
}, x = (C) => {
if (!Ut(C)) {
Sn(Xv, "value must be a number");
return;
}
c.value.scrollLeft = C;
}, w = () => {
var C;
(C = f.value) == null || C.update();
};
return me(() => r.noresize, (C) => {
C ? (a == null || a(), i == null || i()) : ({ stop: a } = qo(d, w), i = To("resize", w));
}, { immediate: !0 }), me(() => [r.maxHeight, r.height], () => {
r.native || Ge(() => {
var C;
w(), c.value && ((C = f.value) == null || C.handleScroll(c.value));
});
}), ft(zg, pn({
scrollbarElement: l,
wrapElement: c
})), Ok(() => {
c.value && (c.value.scrollTop = s, c.value.scrollLeft = u);
}), ht(() => {
r.native || Ge(() => {
w();
});
}), hf(() => w()), t({
wrapRef: c,
update: w,
scrollTo: g,
setScrollTop: b,
setScrollLeft: x,
handleScroll: m
}), (C, k) => (T(), B("div", {
ref_key: "scrollbarRef",
ref: l,
class: W(y(o).b())
}, [
Y("div", {
ref_key: "wrapRef",
ref: c,
class: W(y(p)),
style: lt(y(h)),
tabindex: C.tabindex,
onScroll: m
}, [
(T(), ie(_t(C.tag), {
id: C.id,
ref_key: "resizeRef",
ref: d,
class: W(y(v)),
style: lt(C.viewStyle),
role: C.role,
"aria-label": C.ariaLabel,
"aria-orientation": C.ariaOrientation
}, {
default: G(() => [
ve(C.$slots, "default")
]),
_: 3
}, 8, ["id", "class", "style", "role", "aria-label", "aria-orientation"]))
], 46, ["tabindex"]),
C.native ? ne("v-if", !0) : (T(), ie($I, {
key: 0,
ref_key: "barRef",
ref: f,
always: C.always,
"min-size": C.minSize
}, null, 8, ["always", "min-size"]))
], 2));
}
});
var LI = /* @__PURE__ */ vt(NI, [["__file", "scrollbar.vue"]]);
const Vg = $n(LI), jg = Symbol("popper"), WC = Symbol("popperContent"), DI = [
"dialog",
"grid",
"group",
"listbox",
"menu",
"navigation",
"tooltip",
"tree"
], KC = mt({
role: {
type: String,
values: DI,
default: "tooltip"
}
}), RI = Z({
name: "ElPopper",
inheritAttrs: !1
}), BI = /* @__PURE__ */ Z({
...RI,
props: KC,
setup(e, { expose: t }) {
const n = e, r = H(), o = H(), a = H(), i = H(), s = _(() => n.role), u = {
triggerRef: r,
popperInstanceRef: o,
contentRef: a,
referenceRef: i,
role: s
};
return t(u), ft(jg, u), (l, c) => ve(l.$slots, "default");
}
});
var MI = /* @__PURE__ */ vt(BI, [["__file", "popper.vue"]]);
const GC = mt({
arrowOffset: {
type: Number,
default: 5
}
}), zI = Z({
name: "ElPopperArrow",
inheritAttrs: !1
}), VI = /* @__PURE__ */ Z({
...zI,
props: GC,
setup(e, { expose: t }) {
const n = e, r = pt("popper"), { arrowOffset: o, arrowRef: a, arrowStyle: i } = $e(WC, void 0);
return me(() => n.arrowOffset, (s) => {
o.value = s;
}), Rt(() => {
a.value = void 0;
}), t({
arrowRef: a
}), (s, u) => (T(), B("span", {
ref_key: "arrowRef",
ref: a,
class: W(y(r).e("arrow")),
style: lt(y(i)),
"data-popper-arrow": ""
}, null, 6));
}
});
var jI = /* @__PURE__ */ vt(VI, [["__file", "arrow.vue"]]);
const zh = "ElOnlyChild", HI = Z({
name: zh,
setup(e, {
slots: t,
attrs: n
}) {
var r;
const o = $e(DC), a = nI((r = o == null ? void 0 : o.setForwardRef) != null ? r : xa);
return () => {
var i;
const s = (i = t.default) == null ? void 0 : i.call(t, n);
if (!s)
return null;
if (s.length > 1)
return Sn(zh, "requires exact only one valid child."), null;
const u = XC(s);
return u ? tt(og(u, n), [[a]]) : (Sn(zh, "no valid child node found"), null);
};
}
});
function XC(e) {
if (!e)
return null;
const t = e;
for (const n of t) {
if (zn(n))
switch (n.type) {
case ag:
continue;
case Ll:
case "svg":
return Q1(n);
case Qe:
return XC(n.children);
default:
return n;
}
return Q1(n);
}
return null;
}
function Q1(e) {
const t = pt("only-child");
return ee("span", {
class: t.e("content")
}, [e]);
}
const YC = mt({
virtualRef: {
type: et(Object)
},
virtualTriggering: Boolean,
onMouseenter: {
type: et(Function)
},
onMouseleave: {
type: et(Function)
},
onClick: {
type: et(Function)
},
onKeydown: {
type: et(Function)
},
onFocus: {
type: et(Function)
},
onBlur: {
type: et(Function)
},
onContextmenu: {
type: et(Function)
},
id: String,
open: Boolean
}), UI = Z({
name: "ElPopperTrigger",
inheritAttrs: !1
}), qI = /* @__PURE__ */ Z({
...UI,
props: YC,
setup(e, { expose: t }) {
const n = e, { role: r, triggerRef: o } = $e(jg, void 0);
tI(o);
const a = _(() => s.value ? n.id : void 0), i = _(() => {
if (r && r.value === "tooltip")
return n.open && n.id ? n.id : void 0;
}), s = _(() => {
if (r && r.value !== "tooltip")
return r.value;
}), u = _(() => s.value ? `${n.open}` : void 0);
let l;
const c = [
"onMouseenter",
"onMouseleave",
"onClick",
"onKeydown",
"onFocus",
"onBlur",
"onContextmenu"
];
return ht(() => {
me(() => n.virtualRef, (d) => {
d && (o.value = Wo(d));
}, {
immediate: !0
}), me(o, (d, f) => {
l == null || l(), l = void 0, Zi(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));
}), l = me([a, i, s, u], (h) => {
[
"aria-controls",
"aria-describedby",
"aria-haspopup",
"aria-expanded"
].forEach((p, v) => {
Oc(h[v]) ? d.removeAttribute(p) : d.setAttribute(p, h[v]);
});
}, { immediate: !0 })), Zi(f) && [
"aria-controls",
"aria-describedby",
"aria-haspopup",
"aria-expanded"
].forEach((h) => f.removeAttribute(h));
}, {
immediate: !0
});
}), Rt(() => {
if (l == null || l(), l = void 0, o.value && Zi(o.value)) {
const d = o.value;
c.forEach((f) => {
const h = n[f];
h && d.removeEventListener(f.slice(2).toLowerCase(), h);
}), o.value = void 0;
}
}), t({
triggerRef: o
}), (d, f) => d.virtualTriggering ? ne("v-if", !0) : (T(), ie(y(HI), Xt({ key: 0 }, d.$attrs, {
"aria-controls": y(a),
"aria-describedby": y(i),
"aria-expanded": y(u),
"aria-haspopup": y(s)
}), {
default: G(() => [
ve(d.$slots, "default")
]),
_: 3
}, 16, ["aria-controls", "aria-describedby", "aria-expanded", "aria-haspopup"]));
}
});
var WI = /* @__PURE__ */ vt(qI, [["__file", "trigger.vue"]]);
const Vh = "focus-trap.focus-after-trapped", jh = "focus-trap.focus-after-released", KI = "focus-trap.focusout-prevented", eb = {
cancelable: !0,
bubbles: !1
}, GI = {
cancelable: !0,
bubbles: !1
}, tb = "focusAfterTrapped", nb = "focusAfterReleased", XI = Symbol("elFocusTrap"), Hg = H(), Af = H(0), Ug = H(0);
let vd = 0;
const ZC = (e) => {
const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
acceptNode: (r) => {
const o = r.tagName === "INPUT" && r.type === "hidden";
return r.disabled || r.hidden || o ? NodeFilter.FILTER_SKIP : r.tabIndex >= 0 || r === document.activeElement ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
}
});
for (; n.nextNode(); )
t.push(n.currentNode);
return t;
}, rb = (e, t) => {
for (const n of e)
if (!YI(n, t))
return n;
}, YI = (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;
}, ZI = (e) => {
const t = ZC(e), n = rb(t, e), r = rb(t.reverse(), e);
return [n, r];
}, JI = (e) => e instanceof HTMLInputElement && "select" in e, qa = (e, t) => {
if (e && e.focus) {
const n = document.activeElement;
e.focus({ preventScroll: !0 }), Ug.value = window.performance.now(), e !== n && JI(e) && t && e.select();
}
};
function ob(e, t) {
const n = [...e], r = e.indexOf(t);
return r !== -1 && n.splice(r, 1), n;
}
const QI = () => {
let e = [];
return {
push: (r) => {
const o = e[0];
o && r !== o && o.pause(), e = ob(e, r), e.unshift(r);
},
remove: (r) => {
var o, a;
e = ob(e, r), (a = (o = e[0]) == null ? void 0 : o.resume) == null || a.call(o);
}
};
}, eN = (e, t = !1) => {
const n = document.activeElement;
for (const r of e)
if (qa(r, t), document.activeElement !== n)
return;
}, ab = QI(), tN = () => Af.value > Ug.value, gd = () => {
Hg.value = "pointer", Af.value = window.performance.now();
}, ib = () => {
Hg.value = "keyboard", Af.value = window.performance.now();
}, nN = () => (ht(() => {
vd === 0 && (document.addEventListener("mousedown", gd), document.addEventListener("touchstart", gd), document.addEventListener("keydown", ib)), vd++;
}), Rt(() => {
vd--, vd <= 0 && (document.removeEventListener("mousedown", gd), document.removeEventListener("touchstart", gd), document.removeEventListener("keydown", ib));
}), {
focusReason: Hg,
lastUserFocusTimestamp: Af,
lastAutomatedFocusTimestamp: Ug
}), md = (e) => new CustomEvent(KI, {
...GI,
detail: e
}), rN = Z({
name: "ElFocusTrap",
inheritAttrs: !1,
props: {
loop: Boolean,
trapped: Boolean,
focusTrapEl: Object,
focusStartEl: {
type: [Object, String],
default: "first"
}
},
emits: [
tb,
nb,
"focusin",
"focusout",
"focusout-prevented",
"release-requested"
],
setup(e, { emit: t }) {
const n = H();
let r, o;
const { focusReason: a } = nN();
Y9((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: b, currentTarget: x, shiftKey: w } = p, { loop: C } = e, k = v === Fn.tab && !m && !g && !b, E = document.activeElement;
if (k && E) {
const S = x, [O, F] = ZI(S);
if (O && F) {
if (!w && E === F) {
const A = md({
focusReason: a.value
});
t("focusout-prevented", A), A.defaultPrevented || (p.preventDefault(), C && qa(O, !0));
} else if (w && [O, S].includes(E)) {
const A = md({
focusReason: a.value
});
t("focusout-prevented", A), A.defaultPrevented || (p.preventDefault(), C && qa(F, !0));
}
} else if (E === S) {
const A = md({
focusReason: a.value
});
t("focusout-prevented", A), A.defaultPrevented || p.preventDefault();
}
}
};
ft(XI, {
focusTrapRef: n,
onKeydown: s
}), me(() => e.focusTrapEl, (p) => {
p && (n.value = p);
}, { immediate: !0 }), me([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 u = (p) => {
t(tb, p);
}, l = (p) => t(nb, p), c = (p) => {
const v = y(n);
if (!v)
return;
const m = p.target, g = p.relatedTarget, b = m && v.contains(m);
e.trapped || g && v.contains(g) || (r = g), b && t("focusin", p), !i.paused && e.trapped && (b ? o = m : qa(o, !0));
}, d = (p) => {
const v = y(n);
if (!(i.paused || !v))
if (e.trapped) {
const m = p.relatedTarget;
!Oc(m) && !v.contains(m) && setTimeout(() => {
if (!i.paused && e.trapped) {
const g = md({
focusReason: a.value
});
t("focusout-prevented", g), g.defaultPrevented || qa(o, !0);
}
}, 0);
} else {
const m = p.target;
m && v.contains(m) || t("focusout", p);
}
};
async function f() {
await Ge();
const p = y(n);
if (p) {
ab.push(i);
const v = p.contains(document.activeElement) ? r : document.activeElement;
if (r = v, !p.contains(v)) {
const g = new Event(Vh, eb);
p.addEventListener(Vh, u), p.dispatchEvent(g), g.defaultPrevented || Ge(() => {
let b = e.focusStartEl;
Or(b) || (qa(b), document.activeElement !== b && (b = "first")), b === "first" && eN(ZC(p), !0), (document.activeElement === v || b === "container") && qa(p);
});
}
}
}
function h() {
const p = y(n);
if (p) {
p.removeEventListener(Vh, u);
const v = new CustomEvent(jh, {
...eb,
detail: {
focusReason: a.value
}
});
p.addEventListener(jh, l), p.dispatchEvent(v), !v.defaultPrevented && (a.value == "keyboard" || !tN() || p.contains(document.activeElement)) && qa(r ?? document.body), p.removeEventListener(jh, l), ab.remove(i);
}
}
return ht(() => {
e.trapped && f(), me(() => e.trapped, (p) => {
p ? f() : h();
});
}), Rt(() => {
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 oN(e, t, n, r, o, a) {
return ve(e.$slots, "default", { handleKeydown: e.onKeydown });
}
var JC = /* @__PURE__ */ vt(rN, [["render", oN], ["__file", "focus-trap.vue"]]);
const aN = ["fixed", "absolute"], iN = mt({
boundariesPadding: {
type: Number,
default: 0
},
fallbackPlacements: {
type: et(Array),
default: void 0
},
gpuAcceleration: {
type: Boolean,
default: !0
},
offset: {
type: Number,
default: 12
},
placement: {
type: String,
values: $c,
default: "bottom"
},
popperOptions: {
type: et(Object),
default: () => ({})
},
strategy: {
type: String,
values: aN,
default: "absolute"
}
}), QC = mt({
...iN,
id: String,
style: {
type: et([String, Array, Object])
},
className: {
type: et([String, Array, Object])
},
effect: {
type: et(String),
default: "dark"
},
visible: Boolean,
enterable: {
type: Boolean,
default: !0
},
pure: Boolean,
focusOnShow: {
type: Boolean,
default: !1
},
trapping: {
type: Boolean,
default: !1
},
popperClass: {
type: et([String, Array, Object])
},
popperStyle: {
type: et([String, Array, Object])
},
referenceEl: {
type: et(Object)
},
triggerTargetEl: {
type: et(Object)
},
stopPopperMouseEvent: {
type: Boolean,
default: !0
},
virtualTriggering: Boolean,
zIndex: Number,
...Si(["ariaLabel"])
}), sN = {
mouseenter: (e) => e instanceof MouseEvent,
mouseleave: (e) => e instanceof MouseEvent,
focus: () => !0,
blur: () => !0,
close: () => !0
}, lN = (e, t = []) => {
const { placement: n, strategy: r, popperOptions: o } = e, a = {
placement: n,
strategy: r,
...o,
modifiers: [...cN(e), ...t]
};
return dN(a, o == null ? void 0 : o.modifiers), a;
}, uN = (e) => {
if (on)
return Wo(e);
};
function cN(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 dN(e, t) {
t && (e.modifiers = [...e.modifiers, ...t ?? []]);
}
const pN = 0, fN = (e) => {
const { popperInstanceRef: t, contentRef: n, triggerRef: r, role: o } = $e(jg, void 0), a = H(), i = H(), s = _(() => ({
name: "eventListeners",
enabled: !!e.visible
})), u = _(() => {
var g;
const b = y(a), x = (g = y(i)) != null ? g : pN;
return {
name: "arrow",
enabled: !uC(b),
options: {
element: b,
padding: x
}
};
}), l = _(() => ({
onFirstUpdate: () => {
p();
},
...lN(e, [
y(u),
y(s)
])
})), c = _(() => uN(e.referenceEl) || y(r)), { attributes: d, state: f, styles: h, update: p, forceUpdate: v, instanceRef: m } = W9(c, n, l);
return me(m, (g) => t.value = g), ht(() => {
me(() => {
var g;
return (g = y(c)) == null ? void 0 : g.getBoundingClientRect();
}, () => {
p();
});
}), {
attributes: d,
arrowRef: a,
contentRef: n,
instanceRef: m,
state: f,
styles: h,
role: o,
forceUpdate: v,
update: p
};
}, hN = (e, {
attributes: t,
styles: n,
role: r
}) => {
const { nextZIndex: o } = Rg(), a = pt("popper"), i = _(() => y(t).popper), s = H(Ut(e.zIndex) ? e.zIndex : o()), u = _(() => [
a.b(),
a.is("pure", e.pure),
a.is(e.effect),
e.popperClass
]), l = _(() => [
{ zIndex: y(s) },
y(n).popper,
e.popperStyle || {}
]), c = _(() => r.value === "dialog" ? "false" : void 0), d = _(() => y(n).arrow || {});
return {
ariaModal: c,
arrowStyle: d,
contentAttrs: i,
contentClass: u,
contentStyle: l,
contentZIndex: s,
updateZIndex: () => {
s.value = Ut(e.zIndex) ? e.zIndex : o();
}
};
}, vN = (e, t) => {
const n = H(!1), r = H();
return {
focusStartRef: r,
trapped: n,
onFocusAfterReleased: (l) => {
var c;
((c = l.detail) == null ? void 0 : c.focusReason) !== "pointer" && (r.value = "first", t("blur"));
},
onFocusAfterTrapped: () => {
t("focus");
},
onFocusInTrap: (l) => {
e.visible && !n.value && (l.target && (r.value = l.target), n.value = !0);
},
onFocusoutPrevented: (l) => {
e.trapping || (l.detail.focusReason === "pointer" && l.preventDefault(), n.value = !1);
},
onReleaseRequested: () => {
n.value = !1, t("close");
}
};
}, gN = Z({
name: "ElPopperContent"
}), mN = /* @__PURE__ */ Z({
...gN,
props: QC,
emits: sN,
setup(e, { expose: t, emit: n }) {
const r = e, {
focusStartRef: o,
trapped: a,
onFocusAfterReleased: i,
onFocusAfterTrapped: s,
onFocusInTrap: u,
onFocusoutPrevented: l,
onReleaseRequested: c
} = vN(r, n), { attributes: d, arrowRef: f, contentRef: h, styles: p, instanceRef: v, role: m, update: g } = fN(r), {
ariaModal: b,
arrowStyle: x,
contentAttrs: w,
contentClass: C,
contentStyle: k,
updateZIndex: E
} = hN(r, {
styles: p,
attributes: d,
role: m
}), S = $e($p, void 0), O = H();
ft(WC, {
arrowStyle: x,
arrowRef: f,
arrowOffset: O
}), S && ft($p, {
...S,
addInputId: xa,
removeInputId: xa
});
let F;
const $ = (L = !0) => {
g(), L && E();
}, A = () => {
$(!1), r.visible && r.focusOnShow ? a.value = !0 : r.visible === !1 && (a.value = !1);
};
return ht(() => {
me(() => r.triggerTargetEl, (L, N) => {
F == null || F(), F = void 0;
const M = y(L || h.value), I = y(N || h.value);
Zi(M) && (F = me([m, () => r.ariaLabel, b, () => r.id], (z) => {
["role", "aria-label", "aria-modal", "id"].forEach((R, q) => {
Oc(z[q]) ? M.removeAttribute(R) : M.setAttribute(R, z[q]);
});
}, { immediate: !0 })), I !== M && Zi(I) && ["role", "aria-label", "aria-modal", "id"].forEach((z) => {
I.removeAttribute(z);
});
}, { immediate: !0 }), me(() => r.visible, A, { immediate: !0 });
}), Rt(() => {
F == null || F(), F = void 0;
}), t({
popperContentRef: h,
popperInstanceRef: v,
updatePopper: $,
contentStyle: k
}), (L, N) => (T(), B("div", Xt({
ref_key: "contentRef",
ref: h
}, y(w), {
style: y(k),
class: y(C),
tabindex: "-1",
onMouseenter: (M) => L.$emit("mouseenter", M),
onMouseleave: (M) => L.$emit("mouseleave", M)
}), [
ee(y(JC), {
trapped: y(a),
"trap-on-focus-in": !0,
"focus-trap-el": y(h),
"focus-start-el": y(o),
onFocusAfterTrapped: y(s),
onFocusAfterReleased: y(i),
onFocusin: y(u),
onFocusoutPrevented: y(l),
onReleaseRequested: y(c)
}, {
default: G(() => [
ve(L.$slots, "default")
]),
_: 3
}, 8, ["trapped", "focus-trap-el", "focus-start-el", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusin", "onFocusoutPrevented", "onReleaseRequested"])
], 16, ["onMouseenter", "onMouseleave"]));
}
});
var yN = /* @__PURE__ */ vt(mN, [["__file", "content.vue"]]);
const bN = $n(MI), qg = Symbol("elTooltip"), Cr = mt({
...Q9,
...QC,
appendTo: {
type: et([String, Object])
},
content: {
type: String,
default: ""
},
rawContent: Boolean,
persistent: Boolean,
visible: {
type: et(Boolean),
default: null
},
transition: String,
teleported: {
type: Boolean,
default: !0
},
disabled: Boolean,
...Si(["ariaLabel"])
}), Zu = mt({
...YC,
disabled: Boolean,
trigger: {
type: et([String, Array]),
default: "hover"
},
triggerKeys: {
type: et(Array),
default: () => [Fn.enter, Fn.space]
}
}), {
useModelToggleProps: wN,
useModelToggleEmits: xN,
useModelToggle: kN
} = HF("visible"), CN = mt({
...KC,
...wN,
...Cr,
...Zu,
...GC,
showArrow: {
type: Boolean,
default: !0
}
}), EN = [
...xN,
"before-show",
"before-hide",
"show",
"hide",
"open",
"close"
], SN = (e, t) => br(e) ? e.includes(t) : e === t, Ms = (e, t, n) => (r) => {
SN(y(e), t) && n(r);
}, _N = Z({
name: "ElTooltipTrigger"
}), TN = /* @__PURE__ */ Z({
..._N,
props: Zu,
setup(e, { expose: t }) {
const n = e, r = pt("tooltip"), { controlled: o, id: a, open: i, onOpen: s, onClose: u, onToggle: l } = $e(qg, void 0), c = H(null), d = () => {
if (y(o) || n.disabled)
return !0;
}, f = jt(n, "trigger"), h = fa(d, Ms(f, "hover", s)), p = fa(d, Ms(f, "hover", u)), v = fa(d, Ms(f, "click", (w) => {
w.button === 0 && l(w);
})), m = fa(d, Ms(f, "focus", s)), g = fa(d, Ms(f, "focus", u)), b = fa(d, Ms(f, "contextmenu", (w) => {
w.preventDefault(), l(w);
})), x = fa(d, (w) => {
const { code: C } = w;
n.triggerKeys.includes(C) && (w.preventDefault(), l(w));
});
return t({
triggerRef: c
}), (w, C) => (T(), ie(y(WI), {
id: y(a),
"virtual-ref": w.virtualRef,
open: y(i),
"virtual-triggering": w.virtualTriggering,
class: W(y(r).e("trigger")),
onBlur: y(g),
onClick: y(v),
onContextmenu: y(b),
onFocus: y(m),
onMouseenter: y(h),
onMouseleave: y(p),
onKeydown: y(x)
}, {
default: G(() => [
ve(w.$slots, "default")
]),
_: 3
}, 8, ["id", "virtual-ref", "open", "virtual-triggering", "class", "onBlur", "onClick", "onContextmenu", "onFocus", "onMouseenter", "onMouseleave", "onKeydown"]));
}
});
var ON = /* @__PURE__ */ vt(TN, [["__file", "trigger.vue"]]);
const PN = mt({
to: {
type: et([String, Object]),
required: !0
},
disabled: Boolean
}), $N = /* @__PURE__ */ Z({
__name: "teleport",
props: PN,
setup(e) {
return (t, n) => t.disabled ? ve(t.$slots, "default", { key: 0 }) : (T(), ie(ig, {
key: 1,
to: t.to
}, [
ve(t.$slots, "default")
], 8, ["to"]));
}
});
var AN = /* @__PURE__ */ vt($N, [["__file", "teleport.vue"]]);
const e3 = $n(AN), FN = Z({
name: "ElTooltipContent",
inheritAttrs: !1
}), IN = /* @__PURE__ */ Z({
...FN,
props: Cr,
setup(e, { expose: t }) {
const n = e, { selector: r } = LC(), o = pt("tooltip"), a = H(null);
let i;
const {
controlled: s,
id: u,
open: l,
trigger: c,
onClose: d,
onOpen: f,
onShow: h,
onHide: p,
onBeforeShow: v,
onBeforeHide: m
} = $e(qg, void 0), g = _(() => n.transition || `${o.namespace.value}-fade-in-linear`), b = _(() => process.env.NODE_ENV === "test" ? !0 : n.persistent);
Rt(() => {
i == null || i();
});
const x = _(() => y(b) ? !0 : y(l)), w = _(() => n.disabled ? !1 : y(l)), C = _(() => n.appendTo || r.value), k = _(() => {
var I;
return (I = n.style) != null ? I : {};
}), E = H(!0), S = () => {
p(), E.value = !0;
}, O = () => {
if (y(s))
return !0;
}, F = fa(O, () => {
n.enterable && y(c) === "hover" && f();
}), $ = fa(O, () => {
y(c) === "hover" && d();
}), A = () => {
var I, z;
(z = (I = a.value) == null ? void 0 : I.updatePopper) == null || z.call(I), v == null || v();
}, L = () => {
m == null || m();
}, N = () => {
h(), i = ET(_(() => {
var I;
return (I = a.value) == null ? void 0 : I.popperContentRef;
}), () => {
if (y(s))
return;
y(c) !== "hover" && d();
});
}, M = () => {
n.virtualTriggering || d();
};
return me(() => y(l), (I) => {
I ? E.value = !1 : i == null || i();
}, {
flush: "post"
}), me(() => n.content, () => {
var I, z;
(z = (I = a.value) == null ? void 0 : I.updatePopper) == null || z.call(I);
}), t({
contentRef: a
}), (I, z) => (T(), ie(y(e3), {
disabled: !I.teleported,
to: y(C)
}, {
default: G(() => [
ee(Kr, {
name: y(g),
onAfterLeave: S,
onBeforeEnter: A,
onAfterEnter: N,
onBeforeLeave: L
}, {
default: G(() => [
y(x) ? tt((T(), ie(y(yN), Xt({
key: 0,
id: y(u),
ref_key: "contentRef",
ref: a
}, I.$attrs, {
"aria-label": I.ariaLabel,
"aria-hidden": E.value,
"boundaries-padding": I.boundariesPadding,
"fallback-placements": I.fallbackPlacements,
"gpu-acceleration": I.gpuAcceleration,
offset: I.offset,
placement: I.placement,
"popper-options": I.popperOptions,
strategy: I.strategy,
effect: I.effect,
enterable: I.enterable,
pure: I.pure,
"popper-class": I.popperClass,
"popper-style": [I.popperStyle, y(k)],
"reference-el": I.referenceEl,
"trigger-target-el": I.triggerTargetEl,
visible: y(w),
"z-index": I.zIndex,
onMouseenter: y(F),
onMouseleave: y($),
onBlur: M,
onClose: y(d)
}), {
default: G(() => [
ve(I.$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"])), [
[Pt, y(w)]
]) : ne("v-if", !0)
]),
_: 3
}, 8, ["name"])
]),
_: 3
}, 8, ["disabled", "to"]));
}
});
var NN = /* @__PURE__ */ vt(IN, [["__file", "content.vue"]]);
const LN = Z({
name: "ElTooltip"
}), DN = /* @__PURE__ */ Z({
...LN,
props: CN,
emits: EN,
setup(e, { expose: t, emit: n }) {
const r = e;
J9();
const o = pi(), a = H(), i = H(), s = () => {
var g;
const b = y(a);
b && ((g = b.popperInstanceRef) == null || g.update());
}, u = H(!1), l = H(), { show: c, hide: d, hasUpdateHandler: f } = kN({
indicator: u,
toggleReason: l
}), { onOpen: h, onClose: p } = eI({
showAfter: jt(r, "showAfter"),
hideAfter: jt(r, "hideAfter"),
autoClose: jt(r, "autoClose"),
open: c,
close: d
}), v = _(() => ea(r.visible) && !f.value);
ft(qg, {
controlled: v,
id: o,
open: ff(u),
trigger: jt(r, "trigger"),
onOpen: (g) => {
h(g);
},
onClose: (g) => {
p(g);
},
onToggle: (g) => {
y(u) ? p(g) : h(g);
},
onShow: () => {
n("show", l.value);
},
onHide: () => {
n("hide", l.value);
},
onBeforeShow: () => {
n("before-show", l.value);
},
onBeforeHide: () => {
n("before-hide", l.value);
},
updatePopper: s
}), me(() => r.disabled, (g) => {
g && u.value && (u.value = !1);
});
const m = (g) => {
var b, x;
const w = (x = (b = i.value) == null ? void 0 : b.contentRef) == null ? void 0 : x.popperContentRef, C = (g == null ? void 0 : g.relatedTarget) || document.activeElement;
return w && w.contains(C);
};
return sg(() => u.value && d()), t({
popperRef: a,
contentRef: i,
isFocusInsideContent: m,
updatePopper: s,
onOpen: h,
onClose: p,
hide: d
}), (g, b) => (T(), ie(y(bN), {
ref_key: "popperRef",
ref: a,
role: g.role
}, {
default: G(() => [
ee(ON, {
disabled: g.disabled,
trigger: g.trigger,
"trigger-keys": g.triggerKeys,
"virtual-ref": g.virtualRef,
"virtual-triggering": g.virtualTriggering
}, {
default: G(() => [
g.$slots.default ? ve(g.$slots, "default", { key: 0 }) : ne("v-if", !0)
]),
_: 3
}, 8, ["disabled", "trigger", "trigger-keys", "virtual-ref", "virtual-triggering"]),
ee(NN, {
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: G(() => [
ve(g.$slots, "content", {}, () => [
g.rawContent ? (T(), B("span", {
key: 0,
innerHTML: g.content
}, null, 8, ["innerHTML"])) : (T(), B("span", { key: 1 }, Te(g.content), 1))
]),
g.showArrow ? (T(), ie(y(jI), {
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 RN = /* @__PURE__ */ vt(DN, [["__file", "tooltip.vue"]]);
const Ap = $n(RN), t3 = Symbol("buttonGroupContextKey"), BN = (e, t) => {
Ji({
from: "type.text",
replacement: "link",
version: "3.0.0",
scope: "props",
ref: "https://element-plus.org/en-US/component/button.html#button-attributes"
}, _(() => e.type === "text"));
const n = $e(t3, void 0), r = Pf("button"), { form: o } = _i(), a = fi(_(() => n == null ? void 0 : n.size)), i = Fc(), s = H(), u = ho(), l = _(() => e.type || (n == null ? void 0 : n.type) || ""), c = _(() => {
var p, v, m;
return (m = (v = e.autoInsertSpace) != null ? v : (p = r.value) == null ? void 0 : p.autoInsertSpace) != null ? m : !1;
}), d = _(() => e.tag === "button" ? {
ariaDisabled: i.value || e.loading,
disabled: i.value || e.loading,
autofocus: e.autofocus,
type: e.nativeType
} : {}), f = _(() => {
var p;
const v = (p = u.default) == null ? void 0 : p.call(u);
if (c.value && (v == null ? void 0 : v.length) === 1) {
const m = v[0];
if ((m == null ? void 0 : m.type) === Ll) {
const g = m.children;
return new RegExp("^\\p{Unified_Ideograph}{2}$", "u").test(g.trim());
}
}
return !1;
});
return {
_disabled: i,
_size: a,
_type: l,
_ref: s,
_props: d,
shouldAddSpace: f,
handleClick: (p) => {
if (i.value || e.loading) {
p.stopPropagation();
return;
}
e.nativeType === "reset" && (o == null || o.resetFields()), t("click", p);
}
};
}, MN = [
"default",
"primary",
"success",
"warning",
"info",
"danger",
"text",
""
], zN = ["button", "submit", "reset"], Yv = mt({
size: Aa,
disabled: Boolean,
type: {
type: String,
values: MN,
default: ""
},
icon: {
type: io
},
nativeType: {
type: String,
values: zN,
default: "button"
},
loading: Boolean,
loadingIcon: {
type: io,
default: () => Sf
},
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: et([String, Object]),
default: "button"
}
}), VN = {
click: (e) => e instanceof MouseEvent
};
function Zn(e, t) {
jN(e) && (e = "100%");
var n = HN(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 yd(e) {
return Math.min(1, Math.max(0, e));
}
function jN(e) {
return typeof e == "string" && e.indexOf(".") !== -1 && parseFloat(e) === 1;
}
function HN(e) {
return typeof e == "string" && e.indexOf("%") !== -1;
}
function n3(e) {
return e = parseFloat(e), (isNaN(e) || e < 0 || e > 1) && (e = 1), e;
}
function bd(e) {
return e <= 1 ? "".concat(Number(e) * 100, "%") : e;
}
function Ui(e) {
return e.length === 1 ? "0" + e : String(e);
}
function UN(e, t, n) {
return {
r: Zn(e, 255) * 255,
g: Zn(t, 255) * 255,
b: Zn(n, 255) * 255
};
}
function sb(e, t, n) {
e = Zn(e, 255), t = Zn(t, 255), n = Zn(n, 255);
var r = Math.max(e, t, n), o = Math.min(e, t, n), a = 0, i = 0, s = (r + o) / 2;
if (r === o)
i = 0, a = 0;
else {
var u = r - o;
switch (i = s > 0.5 ? u / (2 - r - o) : u / (r + o), r) {
case e:
a = (t - n) / u + (t < n ? 6 : 0);
break;
case t:
a = (n - e) / u + 2;
break;
case n:
a = (e - t) / u + 4;
break;
}
a /= 6;
}
return { h: a, s: i, l: s };
}
function Hh(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 qN(e, t, n) {
var r, o, a;
if (e = Zn(e, 360), t = Zn(t, 100), n = Zn(n, 100), t === 0)
o = n, a = n, r = n;
else {
var i = n < 0.5 ? n * (1 + t) : n + t - n * t, s = 2 * n - i;
r = Hh(s, i, e + 1 / 3), o = Hh(s, i, e), a = Hh(s, i, e - 1 / 3);
}
return { r: r * 255, g: o * 255, b: a * 255 };
}
function lb(e, t, n) {
e = Zn(e, 255), t = Zn(t, 255), n = Zn(n, 255);
var r = Math.max(e, t, n), o = Math.min(e, t, n), a = 0, i = r, s = r - o, u = r === 0 ? 0 : s / r;
if (r === o)
a = 0;
else {
switch (r) {
case e:
a = (t - n) / s + (t < n ? 6 : 0);
break;
case t:
a = (n - e) / s + 2;
break;
case n:
a = (e - t) / s + 4;
break;
}
a /= 6;
}
return { h: a, s: u, v: i };
}
function WN(e, t, n) {
e = Zn(e, 360) * 6, t = Zn(t, 100), n = Zn(n, 100);
var r = Math.floor(e), o = e - r, a = n * (1 - t), i = n * (1 - o * t), s = n * (1 - (1 - o) * t), u = r % 6, l = [n, i, a, a, s, n][u], c = [s, n, n, i, a, a][u], d = [a, a, s, n, n, i][u];
return { r: l * 255, g: c * 255, b: d * 255 };
}
function ub(e, t, n, r) {
var o = [
Ui(Math.round(e).toString(16)),
Ui(Math.round(t).toString(16)),
Ui(Math.round(n).toString(16))
];
return r && o[0].startsWith(o[0].charAt(1)) && o[1].startsWith(o[1].charAt(1)) && o[2].startsWith(o[2].charAt(1)) ? o[0].charAt(0) + o[1].charAt(0) + o[2].charAt(0) : o.join("");
}
function KN(e, t, n, r, o) {
var a = [
Ui(Math.round(e).toString(16)),
Ui(Math.round(t).toString(16)),
Ui(Math.round(n).toString(16)),
Ui(GN(r))
];
return o && a[0].startsWith(a[0].charAt(1)) && a[1].startsWith(a[1].charAt(1)) && a[2].startsWith(a[2].charAt(1)) && a[3].startsWith(a[3].charAt(1)) ? a[0].charAt(0) + a[1].charAt(0) + a[2].charAt(0) + a[3].charAt(0) : a.join("");
}
function GN(e) {
return Math.round(parseFloat(e) * 255).toString(16);
}
function cb(e) {
return zr(e) / 255;
}
function zr(e) {
return parseInt(e, 16);
}
function XN(e) {
return {
r: e >> 16,
g: (e & 65280) >> 8,
b: e & 255
};
}
var Zv = {
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 YN(e) {
var t = { r: 0, g: 0, b: 0 }, n = 1, r = null, o = null, a = null, i = !1, s = !1;
return typeof e == "string" && (e = QN(e)), typeof e == "object" && (ua(e.r) && ua(e.g) && ua(e.b) ? (t = UN(e.r, e.g, e.b), i = !0, s = String(e.r).substr(-1) === "%" ? "prgb" : "rgb") : ua(e.h) && ua(e.s) && ua(e.v) ? (r = bd(e.s), o = bd(e.v), t = WN(e.h, r, o), i = !0, s = "hsv") : ua(e.h) && ua(e.s) && ua(e.l) && (r = bd(e.s), a = bd(e.l), t = qN(e.h, r, a), i = !0, s = "hsl"), Object.prototype.hasOwnProperty.call(e, "a") && (n = e.a)), n = n3(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 ZN = "[-\\+]?\\d+%?", JN = "[-\\+]?\\d*\\.\\d+%?", ti = "(?:".concat(JN, ")|(?:").concat(ZN, ")"), Uh = "[\\s|\\(]+(".concat(ti, ")[,|\\s]+(").concat(ti, ")[,|\\s]+(").concat(ti, ")\\s*\\)?"), qh = "[\\s|\\(]+(".concat(ti, ")[,|\\s]+(").concat(ti, ")[,|\\s]+(").concat(ti, ")[,|\\s]+(").concat(ti, ")\\s*\\)?"), wo = {
CSS_UNIT: new RegExp(ti),
rgb: new RegExp("rgb" + Uh),
rgba: new RegExp("rgba" + qh),
hsl: new RegExp("hsl" + Uh),
hsla: new RegExp("hsla" + qh),
hsv: new RegExp("hsv" + Uh),
hsva: new RegExp("hsva" + qh),
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 QN(e) {
if (e = e.trim().toLowerCase(), e.length === 0)
return !1;
var t = !1;
if (Zv[e])
e = Zv[e], t = !0;
else if (e === "transparent")
return { r: 0, g: 0, b: 0, a: 0, format: "name" };
var n = wo.rgb.exec(e);
return n ? { r: n[1], g: n[2], b: n[3] } : (n = wo.rgba.exec(e), n ? { r: n[1], g: n[2], b: n[3], a: n[4] } : (n = wo.hsl.exec(e), n ? { h: n[1], s: n[2], l: n[3] } : (n = wo.hsla.exec(e), n ? { h: n[1], s: n[2], l: n[3], a: n[4] } : (n = wo.hsv.exec(e), n ? { h: n[1], s: n[2], v: n[3] } : (n = wo.hsva.exec(e), n ? { h: n[1], s: n[2], v: n[3], a: n[4] } : (n = wo.hex8.exec(e), n ? {
r: zr(n[1]),
g: zr(n[2]),
b: zr(n[3]),
a: cb(n[4]),
format: t ? "name" : "hex8"
} : (n = wo.hex6.exec(e), n ? {
r: zr(n[1]),
g: zr(n[2]),
b: zr(n[3]),
format: t ? "name" : "hex"
} : (n = wo.hex4.exec(e), n ? {
r: zr(n[1] + n[1]),
g: zr(n[2] + n[2]),
b: zr(n[3] + n[3]),
a: cb(n[4] + n[4]),
format: t ? "name" : "hex8"
} : (n = wo.hex3.exec(e), n ? {
r: zr(n[1] + n[1]),
g: zr(n[2] + n[2]),
b: zr(n[3] + n[3]),
format: t ? "name" : "hex"
} : !1)))))))));
}
function ua(e) {
return !!wo.CSS_UNIT.exec(String(e));
}
var eL = (
/** @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 = XN(t)), this.originalInput = t;
var o = YN(t);
this.originalInput = t, this.r = o.r, this.g = o.g, this.b = o.b, this.a = o.a, this.roundA = Math.round(100 * this.a) / 100, this.format = (r = n.format) !== null && r !== void 0 ? r : o.format, this.gradientType = n.gradientType, this.r < 1 && (this.r = Math.round(this.r)), this.g < 1 && (this.g = Math.round(this.g)), this.b < 1 && (this.b = Math.round(this.b)), this.isValid = o.ok;
}
return e.prototype.isDark = function() {
return this.getBrightness() < 128;
}, e.prototype.isLight = function() {
return !this.isDark();
}, e.prototype.getBrightness = function() {
var t = this.toRgb();
return (t.r * 299 + t.g * 587 + t.b * 114) / 1e3;
}, e.prototype.getLuminance = function() {
var t = this.toRgb(), n, r, o, a = t.r / 255, i = t.g / 255, s = t.b / 255;
return a <= 0.03928 ? n = a / 12.92 : n = Math.pow((a + 0.055) / 1.055, 2.4), i <= 0.03928 ? r = i / 12.92 : r = Math.pow((i + 0.055) / 1.055, 2.4), s <= 0.03928 ? o = s / 12.92 : o = Math.pow((s + 0.055) / 1.055, 2.4), 0.2126 * n + 0.7152 * r + 0.0722 * o;
}, e.prototype.getAlpha = function() {
return this.a;
}, e.prototype.setAlpha = function(t) {
return this.a = n3(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 = lb(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 = lb(this.r, this.g, this.b), n = Math.round(t.h * 360), r = Math.round(t.s * 100), o = Math.round(t.v * 100);
return this.a === 1 ? "hsv(".concat(n, ", ").concat(r, "%, ").concat(o, "%)") : "hsva(".concat(n, ", ").concat(r, "%, ").concat(o, "%, ").concat(this.roundA, ")");
}, e.prototype.toHsl = function() {
var t = sb(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 = sb(this.r, this.g, this.b), n = Math.round(t.h * 360), r = Math.round(t.s * 100), o = Math.round(t.l * 100);
return this.a === 1 ? "hsl(".concat(n, ", ").concat(r, "%, ").concat(o, "%)") : "hsla(".concat(n, ", ").concat(r, "%, ").concat(o, "%, ").concat(this.roundA, ")");
}, e.prototype.toHex = function(t) {
return t === void 0 && (t = !1), ub(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), KN(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(Zn(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(Zn(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 = "#" + ub(this.r, this.g, this.b, !1), n = 0, r = Object.entries(Zv); n < r.length; n++) {
var o = r[n], a = o[0], i = o[1];
if (t === i)
return a;
}
return !1;
}, e.prototype.toString = function(t) {
var n = !!t;
t = t ?? this.format;
var r = !1, o = this.a < 1 && this.a >= 0, a = !n && o && (t.startsWith("hex") || t === "name");
return a ? t === "name" && this.a === 0 ? this.toName() : this.toRgbString() : (t === "rgb" && (r = this.toRgbString()), t === "prgb" && (r = this.toPercentageRgbString()), (t === "hex" || t === "hex6") && (r = this.toHexString()), t === "hex3" && (r = this.toHexString(!0)), t === "hex4" && (r = this.toHex8String(!0)), t === "hex8" && (r = this.toHex8String()), t === "name" && (r = this.toName()), t === "hsl" && (r = this.toHslString()), t === "hsv" && (r = this.toHsvString()), r || this.toHexString());
}, e.prototype.toNumber = function() {
return (Math.round(this.r) << 16) + (Math.round(this.g) << 8) + Math.round(this.b);
}, e.prototype.clone = function() {
return new e(this.toString());
}, e.prototype.lighten = function(t) {
t === void 0 && (t = 10);
var n = this.toHsl();
return n.l += t / 100, n.l = yd(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 = yd(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 = yd(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 = yd(n.s), new e(n);
}, e.prototype.greyscale = function() {
return this.desaturate(100);
}, e.prototype.spin = function(t) {
var n = this.toHsl(), r = (n.h + t) % 360;
return n.h = r < 0 ? 360 + r : r, new e(n);
}, e.prototype.mix = function(t, n) {
n === void 0 && (n = 50);
var r = this.toRgb(), o = new e(t).toRgb(), a = n / 100, i = {
r: (o.r - r.r) * a + r.r,
g: (o.g - r.g) * a + r.g,
b: (o.b - r.b) * a + r.b,
a: (o.a - r.a) * a + r.a
};
return new e(i);
}, e.prototype.analogous = function(t, n) {
t === void 0 && (t = 6), n === void 0 && (n = 30);
var r = this.toHsl(), o = 360 / n, a = [this];
for (r.h = (r.h - (o * t >> 1) + 720) % 360; --t; )
r.h = (r.h + o) % 360, a.push(new e(r));
return a;
}, e.prototype.complement = function() {
var t = this.toHsl();
return t.h = (t.h + 180) % 360, new e(t);
}, e.prototype.monochromatic = function(t) {
t === void 0 && (t = 6);
for (var n = this.toHsv(), r = n.h, o = n.s, a = n.v, i = [], s = 1 / t; t--; )
i.push(new e({ h: r, s: o, v: a })), a = (a + s) % 1;
return i;
}, e.prototype.splitcomplement = function() {
var t = this.toHsl(), n = t.h;
return [
this,
new e({ h: (n + 72) % 360, s: t.s, l: t.l }),
new e({ h: (n + 216) % 360, s: t.s, l: t.l })
];
}, e.prototype.onBackground = function(t) {
var n = this.toRgb(), r = new e(t).toRgb(), o = n.a + r.a * (1 - n.a);
return new e({
r: (n.r * n.a + r.r * r.a * (1 - n.a)) / o,
g: (n.g * n.a + r.g * r.a * (1 - n.a)) / o,
b: (n.b * n.a + r.b * r.a * (1 - n.a)) / o,
a: o
});
}, e.prototype.triad = function() {
return this.polyad(3);
}, e.prototype.tetrad = function() {
return this.polyad(4);
}, e.prototype.polyad = function(t) {
for (var n = this.toHsl(), r = n.h, o = [this], a = 360 / t, i = 1; i < t; i++)
o.push(new e({ h: (r + i * a) % 360, s: n.s, l: n.l }));
return o;
}, e.prototype.equals = function(t) {
return this.toRgbString() === new e(t).toRgbString();
}, e;
}()
);
function Ba(e, t = 20) {
return e.mix("#141414", t).toString();
}
function tL(e) {
const t = Fc(), n = pt("button");
return _(() => {
let r = {}, o = e.color;
if (o) {
const a = o.match(/var\((.*?)\)/);
a && (o = window.getComputedStyle(window.document.documentElement).getPropertyValue(a[1]));
const i = new eL(o), s = e.dark ? i.tint(20).toString() : Ba(i, 20);
if (e.plain)
r = n.cssVarBlock({
"bg-color": e.dark ? Ba(i, 90) : i.tint(90).toString(),
"text-color": o,
"border-color": e.dark ? Ba(i, 50) : i.tint(50).toString(),
"hover-text-color": `var(${n.cssVarName("color-white")})`,
"hover-bg-color": o,
"hover-border-color": o,
"active-bg-color": s,
"active-text-color": `var(${n.cssVarName("color-white")})`,
"active-border-color": s
}), t.value && (r[n.cssVarBlockName("disabled-bg-color")] = e.dark ? Ba(i, 90) : i.tint(90).toString(), r[n.cssVarBlockName("disabled-text-color")] = e.dark ? Ba(i, 50) : i.tint(50).toString(), r[n.cssVarBlockName("disabled-border-color")] = e.dark ? Ba(i, 80) : i.tint(80).toString());
else {
const u = e.dark ? Ba(i, 30) : i.tint(30).toString(), l = i.isDark() ? `var(${n.cssVarName("color-white")})` : `var(${n.cssVarName("color-black")})`;
if (r = n.cssVarBlock({
"bg-color": o,
"text-color": l,
"border-color": o,
"hover-bg-color": u,
"hover-text-color": l,
"hover-border-color": u,
"active-bg-color": s,
"active-border-color": s
}), t.value) {
const c = e.dark ? Ba(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 nL = Z({
name: "ElButton"
}), rL = /* @__PURE__ */ Z({
...nL,
props: Yv,
emits: VN,
setup(e, { expose: t, emit: n }) {
const r = e, o = tL(r), a = pt("button"), { _ref: i, _size: s, _type: u, _disabled: l, _props: c, shouldAddSpace: d, handleClick: f } = BN(r, n), h = _(() => [
a.b(),
a.m(u.value),
a.m(s.value),
a.is("disabled", l.value),
a.is("loading", r.loading),
a.is("plain", r.plain),
a.is("round", r.round),
a.is("circle", r.circle),
a.is("text", r.text),
a.is("link", r.link),
a.is("has-bg", r.bg)
]);
return t({
ref: i,
size: s,
type: u,
disabled: l,
shouldAddSpace: d
}), (p, v) => (T(), ie(_t(p.tag), Xt({
ref_key: "_ref",
ref: i
}, y(c), {
class: y(h),
style: y(o),
onClick: y(f)
}), {
default: G(() => [
p.loading ? (T(), B(Qe, { key: 0 }, [
p.$slots.loading ? ve(p.$slots, "loading", { key: 0 }) : (T(), ie(y(nn), {
key: 1,
class: W(y(a).is("loading"))
}, {
default: G(() => [
(T(), ie(_t(p.loadingIcon)))
]),
_: 1
}, 8, ["class"]))
], 64)) : p.icon || p.$slots.icon ? (T(), ie(y(nn), { key: 1 }, {
default: G(() => [
p.icon ? (T(), ie(_t(p.icon), { key: 0 })) : ve(p.$slots, "icon", { key: 1 })
]),
_: 3
})) : ne("v-if", !0),
p.$slots.default ? (T(), B("span", {
key: 2,
class: W({ [y(a).em("text", "expand")]: y(d) })
}, [
ve(p.$slots, "default")
], 2)) : ne("v-if", !0)
]),
_: 3
}, 16, ["class", "style", "onClick"]));
}
});
var oL = /* @__PURE__ */ vt(rL, [["__file", "button.vue"]]);
const aL = {
size: Yv.size,
type: Yv.type
}, iL = Z({
name: "ElButtonGroup"
}), sL = /* @__PURE__ */ Z({
...iL,
props: aL,
setup(e) {
const t = e;
ft(t3, pn({
size: jt(t, "size"),
type: jt(t, "type")
}));
const n = pt("button");
return (r, o) => (T(), B("div", {
class: W(y(n).b("group"))
}, [
ve(r.$slots, "default")
], 2));
}
});
var r3 = /* @__PURE__ */ vt(sL, [["__file", "button-group.vue"]]);
const Gr = $n(oL, {
ButtonGroup: r3
});
Io(r3);
var lL = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
function uL(e) {
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
}
const Wa = /* @__PURE__ */ new Map();
if (on) {
let e;
document.addEventListener("mousedown", (t) => e = t), document.addEventListener("mouseup", (t) => {
if (e) {
for (const n of Wa.values())
for (const { documentHandler: r } of n)
r(t, e);
e = void 0;
}
});
}
function db(e, t) {
let n = [];
return Array.isArray(t.arg) ? n = t.arg : Zi(t.arg) && n.push(t.arg), function(r, o) {
const a = t.instance.popperRef, i = r.target, s = o == null ? void 0 : o.target, u = !t || !t.instance, l = !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 = a && (a.contains(i) || a.contains(s));
u || l || c || d || f || h || t.value(r, o);
};
}
const o3 = {
beforeMount(e, t) {
Wa.has(e) || Wa.set(e, []), Wa.get(e).push({
documentHandler: db(e, t),
bindingFn: t.value
});
},
updated(e, t) {
Wa.has(e) || Wa.set(e, []);
const n = Wa.get(e), r = n.findIndex((a) => a.bindingFn === t.oldValue), o = {
documentHandler: db(e, t),
bindingFn: t.value
};
r >= 0 ? n.splice(r, 1, o) : n.push(o);
},
unmounted(e) {
Wa.delete(e);
}
}, cL = mt({
header: {
type: String,
default: ""
},
footer: {
type: String,
default: ""
},
bodyStyle: {
type: et([String, Object, Array]),
default: ""
},
bodyClass: String,
shadow: {
type: String,
values: ["always", "hover", "never"],
default: "always"
}
}), dL = Z({
name: "ElCard"
}), pL = /* @__PURE__ */ Z({
...dL,
props: cL,
setup(e) {
const t = pt("card");
return (n, r) => (T(), B("div", {
class: W([y(t).b(), y(t).is(`${n.shadow}-shadow`)])
}, [
n.$slots.header || n.header ? (T(), B("div", {
key: 0,
class: W(y(t).e("header"))
}, [
ve(n.$slots, "header", {}, () => [
Ke(Te(n.header), 1)
])
], 2)) : ne("v-if", !0),
Y("div", {
class: W([y(t).e("body"), n.bodyClass]),
style: lt(n.bodyStyle)
}, [
ve(n.$slots, "default")
], 6),
n.$slots.footer || n.footer ? (T(), B("div", {
key: 1,
class: W(y(t).e("footer"))
}, [
ve(n.$slots, "footer", {}, () => [
Ke(Te(n.footer), 1)
])
], 2)) : ne("v-if", !0)
], 2));
}
});
var fL = /* @__PURE__ */ vt(pL, [["__file", "card.vue"]]);
const a3 = $n(fL), i3 = {
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: Aa,
tabindex: [String, Number],
validateEvent: {
type: Boolean,
default: !0
},
...Si(["ariaControls"])
}, s3 = {
[hn]: (e) => Or(e) || Ut(e) || ea(e),
change: (e) => Or(e) || Ut(e) || ea(e)
}, Rl = Symbol("checkboxGroupContextKey"), hL = ({
model: e,
isChecked: t
}) => {
const n = $e(Rl, void 0), r = _(() => {
var a, i;
const s = (a = n == null ? void 0 : n.max) == null ? void 0 : a.value, u = (i = n == null ? void 0 : n.min) == null ? void 0 : i.value;
return !ba(s) && e.value.length >= s && !t.value || !ba(u) && e.value.length <= u && t.value;
});
return {
isDisabled: Fc(_(() => (n == null ? void 0 : n.disabled.value) || r.value)),
isLimitDisabled: r
};
}, vL = (e, {
model: t,
isLimitExceeded: n,
hasOwnLabel: r,
isDisabled: o,
isLabeledByFormItem: a
}) => {
const i = $e(Rl, void 0), { formItem: s } = _i(), { emit: u } = dt();
function l(p) {
var v, m, g, b;
return [!0, e.trueValue, e.trueLabel].includes(p) ? (m = (v = e.trueValue) != null ? v : e.trueLabel) != null ? m : !0 : (b = (g = e.falseValue) != null ? g : e.falseLabel) != null ? b : !1;
}
function c(p, v) {
u("change", l(p), v);
}
function d(p) {
if (n.value)
return;
const v = p.target;
u("change", l(v.checked), p);
}
async function f(p) {
n.value || !r.value && !o.value && a.value && (p.composedPath().some((g) => g.tagName === "LABEL") || (t.value = l([!1, e.falseValue, e.falseLabel].includes(t.value)), await Ge(), c(t.value, p)));
}
const h = _(() => (i == null ? void 0 : i.validateEvent) || e.validateEvent);
return me(() => e.modelValue, () => {
h.value && (s == null || s.validate("change").catch((p) => Sn(p)));
}), {
handleChange: d,
onClickRoot: f
};
}, gL = (e) => {
const t = H(!1), { emit: n } = dt(), r = $e(Rl, void 0), o = _(() => ba(r) === !1), a = H(!1), i = _({
get() {
var s, u;
return o.value ? (s = r == null ? void 0 : r.modelValue) == null ? void 0 : s.value : (u = e.modelValue) != null ? u : t.value;
},
set(s) {
var u, l;
o.value && br(s) ? (a.value = ((u = r == null ? void 0 : r.max) == null ? void 0 : u.value) !== void 0 && s.length > (r == null ? void 0 : r.max.value) && s.length > i.value.length, a.value === !1 && ((l = r == null ? void 0 : r.changeEvent) == null || l.call(r, s))) : (n(hn, s), t.value = s);
}
});
return {
model: i,
isGroup: o,
isLimitExceeded: a
};
}, mL = (e, t, { model: n }) => {
const r = $e(Rl, void 0), o = H(!1), a = _(() => Ku(e.value) ? e.label : e.value), i = _(() => {
const c = n.value;
return ea(c) ? c : br(c) ? zn(a.value) ? c.map(ui).some((d) => Yo(d, a.value)) : c.map(ui).includes(a.value) : c != null ? c === e.trueValue || c === e.trueLabel : !!c;
}), s = fi(_(() => {
var c;
return (c = r == null ? void 0 : r.size) == null ? void 0 : c.value;
}), {
prop: !0
}), u = fi(_(() => {
var c;
return (c = r == null ? void 0 : r.size) == null ? void 0 : c.value;
})), l = _(() => !!t.default || !Ku(a.value));
return {
checkboxButtonSize: s,
isChecked: i,
isFocused: o,
checkboxSize: u,
hasOwnLabel: l,
actualValue: a
};
}, l3 = (e, t) => {
const { formItem: n } = _i(), { model: r, isGroup: o, isLimitExceeded: a } = gL(e), {
isFocused: i,
isChecked: s,
checkboxButtonSize: u,
checkboxSize: l,
hasOwnLabel: c,
actualValue: d
} = mL(e, t, { model: r }), { isDisabled: f } = hL({ model: r, isChecked: s }), { inputId: h, isLabeledByFormItem: p } = Ic(e, {
formItemContext: n,
disableIdGeneration: c,
disableIdManagement: o
}), { handleChange: v, onClickRoot: m } = vL(e, {
model: r,
isLimitExceeded: a,
hasOwnLabel: c,
isDisabled: f,
isLabeledByFormItem: p
});
return (() => {
function b() {
var x, w;
br(r.value) && !r.value.includes(d.value) ? r.value.push(d.value) : r.value = (w = (x = e.trueValue) != null ? x : e.trueLabel) != null ? w : !0;
}
e.checked && b();
})(), Ji({
from: "label act as value",
replacement: "value",
version: "3.0.0",
scope: "el-checkbox",
ref: "https://element-plus.org/en-US/component/checkbox.html"
}, _(() => o.value && Ku(e.value))), Ji({
from: "true-label",
replacement: "true-value",
version: "3.0.0",
scope: "el-checkbox",
ref: "https://element-plus.org/en-US/component/checkbox.html"
}, _(() => !!e.trueLabel)), Ji({
from: "false-label",
replacement: "false-value",
version: "3.0.0",
scope: "el-checkbox",
ref: "https://element-plus.org/en-US/component/checkbox.html"
}, _(() => !!e.falseLabel)), {
inputId: h,
isLabeledByFormItem: p,
isChecked: s,
isDisabled: f,
isFocused: i,
checkboxButtonSize: u,
checkboxSize: l,
hasOwnLabel: c,
model: r,
actualValue: d,
handleChange: v,
onClickRoot: m
};
}, yL = Z({
name: "ElCheckbox"
}), bL = /* @__PURE__ */ Z({
...yL,
props: i3,
emits: s3,
setup(e) {
const t = e, n = ho(), {
inputId: r,
isLabeledByFormItem: o,
isChecked: a,
isDisabled: i,
isFocused: s,
checkboxSize: u,
hasOwnLabel: l,
model: c,
actualValue: d,
handleChange: f,
onClickRoot: h
} = l3(t, n), p = pt("checkbox"), v = _(() => [
p.b(),
p.m(u.value),
p.is("disabled", i.value),
p.is("bordered", t.border),
p.is("checked", a.value)
]), m = _(() => [
p.e("input"),
p.is("disabled", i.value),
p.is("checked", a.value),
p.is("indeterminate", t.indeterminate),
p.is("focus", s.value)
]);
return (g, b) => (T(), ie(_t(!y(l) && y(o) ? "span" : "label"), {
class: W(y(v)),
"aria-controls": g.indeterminate ? g.ariaControls : null,
onClick: y(h)
}, {
default: G(() => {
var x, w, C, k;
return [
Y("span", {
class: W(y(m))
}, [
g.trueValue || g.falseValue || g.trueLabel || g.falseLabel ? tt((T(), B("input", {
key: 0,
id: y(r),
"onUpdate:modelValue": (E) => Vn(c) ? c.value = E : null,
class: W(y(p).e("original")),
type: "checkbox",
indeterminate: g.indeterminate,
name: g.name,
tabindex: g.tabindex,
disabled: y(i),
"true-value": (w = (x = g.trueValue) != null ? x : g.trueLabel) != null ? w : !0,
"false-value": (k = (C = g.falseValue) != null ? C : g.falseLabel) != null ? k : !1,
onChange: y(f),
onFocus: (E) => s.value = !0,
onBlur: (E) => s.value = !1,
onClick: it(() => {
}, ["stop"])
}, null, 42, ["id", "onUpdate:modelValue", "indeterminate", "name", "tabindex", "disabled", "true-value", "false-value", "onChange", "onFocus", "onBlur", "onClick"])), [
[ci, y(c)]
]) : tt((T(), B("input", {
key: 1,
id: y(r),
"onUpdate:modelValue": (E) => Vn(c) ? c.value = E : null,
class: W(y(p).e("original")),
type: "checkbox",
indeterminate: g.indeterminate,
disabled: y(i),
value: y(d),
name: g.name,
tabindex: g.tabindex,
onChange: y(f),
onFocus: (E) => s.value = !0,
onBlur: (E) => s.value = !1,
onClick: it(() => {
}, ["stop"])
}, null, 42, ["id", "onUpdate:modelValue", "indeterminate", "disabled", "value", "name", "tabindex", "onChange", "onFocus", "onBlur", "onClick"])), [
[ci, y(c)]
]),
Y("span", {
class: W(y(p).e("inner"))
}, null, 2)
], 2),
y(l) ? (T(), B("span", {
key: 0,
class: W(y(p).e("label"))
}, [
ve(g.$slots, "default"),
g.$slots.default ? ne("v-if", !0) : (T(), B(Qe, { key: 0 }, [
Ke(Te(g.label), 1)
], 64))
], 2)) : ne("v-if", !0)
];
}),
_: 3
}, 8, ["class", "aria-controls", "onClick"]));
}
});
var wL = /* @__PURE__ */ vt(bL, [["__file", "checkbox.vue"]]);
const xL = Z({
name: "ElCheckboxButton"
}), kL = /* @__PURE__ */ Z({
...xL,
props: i3,
emits: s3,
setup(e) {
const t = e, n = ho(), {
isFocused: r,
isChecked: o,
isDisabled: a,
checkboxButtonSize: i,
model: s,
actualValue: u,
handleChange: l
} = l3(t, n), c = $e(Rl, void 0), d = pt("checkbox"), f = _(() => {
var p, v, m, g;
const b = (v = (p = c == null ? void 0 : c.fill) == null ? void 0 : p.value) != null ? v : "";
return {
backgroundColor: b,
borderColor: b,
color: (g = (m = c == null ? void 0 : c.textColor) == null ? void 0 : m.value) != null ? g : "",
boxShadow: b ? `-1px 0 0 0 ${b}` : void 0
};
}), h = _(() => [
d.b("button"),
d.bm("button", i.value),
d.is("disabled", a.value),
d.is("checked", o.value),
d.is("focus", r.value)
]);
return (p, v) => {
var m, g, b, x;
return T(), B("label", {
class: W(y(h))
}, [
p.trueValue || p.falseValue || p.trueLabel || p.falseLabel ? tt((T(), B("input", {
key: 0,
"onUpdate:modelValue": (w) => Vn(s) ? s.value = w : null,
class: W(y(d).be("button", "original")),
type: "checkbox",
name: p.name,
tabindex: p.tabindex,
disabled: y(a),
"true-value": (g = (m = p.trueValue) != null ? m : p.trueLabel) != null ? g : !0,
"false-value": (x = (b = p.falseValue) != null ? b : p.falseLabel) != null ? x : !1,
onChange: y(l),
onFocus: (w) => r.value = !0,
onBlur: (w) => r.value = !1,
onClick: it(() => {
}, ["stop"])
}, null, 42, ["onUpdate:modelValue", "name", "tabindex", "disabled", "true-value", "false-value", "onChange", "onFocus", "onBlur", "onClick"])), [
[ci, y(s)]
]) : tt((T(), B("input", {
key: 1,
"onUpdate:modelValue": (w) => Vn(s) ? s.value = w : null,
class: W(y(d).be("button", "original")),
type: "checkbox",
name: p.name,
tabindex: p.tabindex,
disabled: y(a),
value: y(u),
onChange: y(l),
onFocus: (w) => r.value = !0,
onBlur: (w) => r.value = !1,
onClick: it(() => {
}, ["stop"])
}, null, 42, ["onUpdate:modelValue", "name", "tabindex", "disabled", "value", "onChange", "onFocus", "onBlur", "onClick"])), [
[ci, y(s)]
]),
p.$slots.default || p.label ? (T(), B("span", {
key: 2,
class: W(y(d).be("button", "inner")),
style: lt(y(o) ? y(f) : void 0)
}, [
ve(p.$slots, "default", {}, () => [
Ke(Te(p.label), 1)
])
], 6)) : ne("v-if", !0)
], 2);
};
}
});
var u3 = /* @__PURE__ */ vt(kL, [["__file", "checkbox-button.vue"]]);
const CL = mt({
modelValue: {
type: et(Array),
default: () => []
},
disabled: Boolean,
min: Number,
max: Number,
size: Aa,
fill: String,
textColor: String,
tag: {
type: String,
default: "div"
},
validateEvent: {
type: Boolean,
default: !0
},
...Si(["ariaLabel"])
}), EL = {
[hn]: (e) => br(e),
change: (e) => br(e)
}, SL = Z({
name: "ElCheckboxGroup"
}), _L = /* @__PURE__ */ Z({
...SL,
props: CL,
emits: EL,
setup(e, { emit: t }) {
const n = e, r = pt("checkbox"), { formItem: o } = _i(), { inputId: a, isLabeledByFormItem: i } = Ic(n, {
formItemContext: o
}), s = async (l) => {
t(hn, l), await Ge(), t("change", l);
}, u = _({
get() {
return n.modelValue;
},
set(l) {
s(l);
}
});
return ft(Rl, {
...cC(vo(n), [
"size",
"min",
"max",
"disabled",
"validateEvent",
"fill",
"textColor"
]),
modelValue: u,
changeEvent: s
}), me(() => n.modelValue, () => {
n.validateEvent && (o == null || o.validate("change").catch((l) => Sn(l)));
}), (l, c) => {
var d;
return T(), ie(_t(l.tag), {
id: y(a),
class: W(y(r).b("group")),
role: "group",
"aria-label": y(i) ? void 0 : l.ariaLabel || "checkbox-group",
"aria-labelledby": y(i) ? (d = y(o)) == null ? void 0 : d.labelId : void 0
}, {
default: G(() => [
ve(l.$slots, "default")
]),
_: 3
}, 8, ["id", "class", "aria-label", "aria-labelledby"]);
};
}
});
var c3 = /* @__PURE__ */ vt(_L, [["__file", "checkbox-group.vue"]]);
const TL = $n(wL, {
CheckboxButton: u3,
CheckboxGroup: c3
});
Io(u3);
Io(c3);
const d3 = mt({
modelValue: {
type: [String, Number, Boolean],
default: void 0
},
size: Aa,
disabled: Boolean,
label: {
type: [String, Number, Boolean],
default: void 0
},
value: {
type: [String, Number, Boolean],
default: void 0
},
name: {
type: String,
default: void 0
}
}), OL = mt({
...d3,
border: Boolean
}), p3 = {
[hn]: (e) => Or(e) || Ut(e) || ea(e),
[ls]: (e) => Or(e) || Ut(e) || ea(e)
}, f3 = Symbol("radioGroupKey"), h3 = (e, t) => {
const n = H(), r = $e(f3, void 0), o = _(() => !!r), a = _(() => Ku(e.value) ? e.label : e.value), i = _({
get() {
return o.value ? r.modelValue : e.modelValue;
},
set(d) {
o.value ? r.changeEvent(d) : t && t(hn, d), n.value.checked = e.modelValue === a.value;
}
}), s = fi(_(() => r == null ? void 0 : r.size)), u = Fc(_(() => r == null ? void 0 : r.disabled)), l = H(!1), c = _(() => u.value || o.value && i.value !== a.value ? -1 : 0);
return Ji({
from: "label act as value",
replacement: "value",
version: "3.0.0",
scope: "el-radio",
ref: "https://element-plus.org/en-US/component/radio.html"
}, _(() => o.value && Ku(e.value))), {
radioRef: n,
isGroup: o,
radioGroup: r,
focus: l,
size: s,
disabled: u,
tabIndex: c,
modelValue: i,
actualValue: a
};
}, PL = Z({
name: "ElRadio"
}), $L = /* @__PURE__ */ Z({
...PL,
props: OL,
emits: p3,
setup(e, { emit: t }) {
const n = e, r = pt("radio"), { radioRef: o, radioGroup: a, focus: i, size: s, disabled: u, modelValue: l, actualValue: c } = h3(n, t);
function d() {
Ge(() => t("change", l.value));
}
return (f, h) => {
var p;
return T(), B("label", {
class: W([
y(r).b(),
y(r).is("disabled", y(u)),
y(r).is("focus", y(i)),
y(r).is("bordered", f.border),
y(r).is("checked", y(l) === y(c)),
y(r).m(y(s))
])
}, [
Y("span", {
class: W([
y(r).e("input"),
y(r).is("disabled", y(u)),
y(r).is("checked", y(l) === y(c))
])
}, [
tt(Y("input", {
ref_key: "radioRef",
ref: o,
"onUpdate:modelValue": (v) => Vn(l) ? l.value = v : null,
class: W(y(r).e("original")),
value: y(c),
name: f.name || ((p = y(a)) == null ? void 0 : p.name),
disabled: y(u),
checked: y(l) === y(c),
type: "radio",
onFocus: (v) => i.value = !0,
onBlur: (v) => i.value = !1,
onChange: d,
onClick: it(() => {
}, ["stop"])
}, null, 42, ["onUpdate:modelValue", "value", "name", "disabled", "checked", "onFocus", "onBlur", "onClick"]), [
[Pk, y(l)]
]),
Y("span", {
class: W(y(r).e("inner"))
}, null, 2)
], 2),
Y("span", {
class: W(y(r).e("label")),
onKeydown: it(() => {
}, ["stop"])
}, [
ve(f.$slots, "default", {}, () => [
Ke(Te(f.label), 1)
])
], 42, ["onKeydown"])
], 2);
};
}
});
var AL = /* @__PURE__ */ vt($L, [["__file", "radio.vue"]]);
const FL = mt({
...d3
}), IL = Z({
name: "ElRadioButton"
}), NL = /* @__PURE__ */ Z({
...IL,
props: FL,
setup(e) {
const t = e, n = pt("radio"), { radioRef: r, focus: o, size: a, disabled: i, modelValue: s, radioGroup: u, actualValue: l } = h3(t), c = _(() => ({
backgroundColor: (u == null ? void 0 : u.fill) || "",
borderColor: (u == null ? void 0 : u.fill) || "",
boxShadow: u != null && u.fill ? `-1px 0 0 0 ${u.fill}` : "",
color: (u == null ? void 0 : u.textColor) || ""
}));
return (d, f) => {
var h;
return T(), B("label", {
class: W([
y(n).b("button"),
y(n).is("active", y(s) === y(l)),
y(n).is("disabled", y(i)),
y(n).is("focus", y(o)),
y(n).bm("button", y(a))
])
}, [
tt(Y("input", {
ref_key: "radioRef",
ref: r,
"onUpdate:modelValue": (p) => Vn(s) ? s.value = p : null,
class: W(y(n).be("button", "original-radio")),
value: y(l),
type: "radio",
name: d.name || ((h = y(u)) == null ? void 0 : h.name),
disabled: y(i),
onFocus: (p) => o.value = !0,
onBlur: (p) => o.value = !1,
onClick: it(() => {
}, ["stop"])
}, null, 42, ["onUpdate:modelValue", "value", "name", "disabled", "onFocus", "onBlur", "onClick"]), [
[Pk, y(s)]
]),
Y("span", {
class: W(y(n).be("button", "inner")),
style: lt(y(s) === y(l) ? y(c) : {}),
onKeydown: it(() => {
}, ["stop"])
}, [
ve(d.$slots, "default", {}, () => [
Ke(Te(d.label), 1)
])
], 46, ["onKeydown"])
], 2);
};
}
});
var v3 = /* @__PURE__ */ vt(NL, [["__file", "radio-button.vue"]]);
const LL = mt({
id: {
type: String,
default: void 0
},
size: Aa,
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
},
...Si(["ariaLabel"])
}), DL = p3, RL = Z({
name: "ElRadioGroup"
}), BL = /* @__PURE__ */ Z({
...RL,
props: LL,
emits: DL,
setup(e, { emit: t }) {
const n = e, r = pt("radio"), o = pi(), a = H(), { formItem: i } = _i(), { inputId: s, isLabeledByFormItem: u } = Ic(n, {
formItemContext: i
}), l = (d) => {
t(hn, d), Ge(() => t("change", d));
};
ht(() => {
const d = a.value.querySelectorAll("[type=radio]"), f = d[0];
!Array.from(d).some((h) => h.checked) && f && (f.tabIndex = 0);
});
const c = _(() => n.name || o.value);
return ft(f3, pn({
...vo(n),
changeEvent: l,
name: c
})), me(() => n.modelValue, () => {
n.validateEvent && (i == null || i.validate("change").catch((d) => Sn(d)));
}), (d, f) => (T(), B("div", {
id: y(s),
ref_key: "radioGroupRef",
ref: a,
class: W(y(r).b("group")),
role: "radiogroup",
"aria-label": y(u) ? void 0 : d.ariaLabel || "radio-group",
"aria-labelledby": y(u) ? y(i).labelId : void 0
}, [
ve(d.$slots, "default")
], 10, ["id", "aria-label", "aria-labelledby"]));
}
});
var g3 = /* @__PURE__ */ vt(BL, [["__file", "radio-group.vue"]]);
const ML = $n(AL, {
RadioButton: v3,
RadioGroup: g3
});
Io(g3);
Io(v3);
var zL = Z({
name: "NodeContent",
setup() {
return {
ns: pt("cascader-node")
};
},
render() {
const { ns: e } = this, { node: t, panel: n } = this.$parent, { data: r, label: o } = t, { renderLabelFn: a } = n;
return Kt("span", { class: e.e("label") }, a ? a({ node: t, data: r }) : o);
}
});
const Wg = Symbol(), VL = Z({
name: "ElCascaderNode",
components: {
ElCheckbox: TL,
ElRadio: ML,
NodeContent: zL,
ElIcon: nn,
Check: vC,
Loading: Sf,
ArrowRight: Cf
},
props: {
node: {
type: Object,
required: !0
},
menuId: String
},
emits: ["expand"],
setup(e, { emit: t }) {
const n = $e(Wg), r = pt("cascader-node"), o = _(() => n.isHoverMenu), a = _(() => n.config.multiple), i = _(() => n.config.checkStrictly), s = _(() => {
var k;
return (k = n.checkedNodes[0]) == null ? void 0 : k.uid;
}), u = _(() => e.node.isDisabled), l = _(() => e.node.isLeaf), c = _(() => i.value && !l.value || !u.value), d = _(() => h(n.expandingNode)), f = _(() => i.value && n.checkedNodes.some(h)), h = (k) => {
var E;
const { level: S, uid: O } = e.node;
return ((E = k == null ? void 0 : k.pathNodes[S - 1]) == null ? void 0 : E.uid) === O;
}, p = () => {
d.value || n.expandNode(e.node);
}, v = (k) => {
const { node: E } = e;
k !== E.checked && n.handleCheckChange(E, k);
}, m = () => {
n.lazyLoad(e.node, () => {
l.value || p();
});
}, g = (k) => {
o.value && (b(), !l.value && t("expand", k));
}, b = () => {
const { node: k } = e;
!c.value || k.loading || (k.loaded ? p() : m());
}, x = () => {
o.value && !l.value || (l.value && !u.value && !i.value && !a.value ? C(!0) : b());
}, w = (k) => {
i.value ? (v(k), e.node.loaded && p()) : C(k);
}, C = (k) => {
e.node.loaded ? (v(k), !i.value && p()) : m();
};
return {
panel: n,
isHoverMenu: o,
multiple: a,
checkStrictly: i,
checkedNodeId: s,
isDisabled: u,
isLeaf: l,
expandable: c,
inExpandingPath: d,
inCheckedPath: f,
ns: r,
handleHoverExpand: g,
handleExpand: b,
handleClick: x,
handleCheck: C,
handleSelectCheck: w
};
}
});
function jL(e, t, n, r, o, a) {
const i = Et("el-checkbox"), s = Et("el-radio"), u = Et("check"), l = Et("el-icon"), c = Et("node-content"), d = Et("loading"), f = Et("arrow-right");
return T(), B("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: W([
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 ? (T(), ie(i, {
key: 0,
"model-value": e.node.checked,
indeterminate: e.node.indeterminate,
disabled: e.isDisabled,
onClick: it(() => {
}, ["stop"]),
"onUpdate:modelValue": e.handleSelectCheck
}, null, 8, ["model-value", "indeterminate", "disabled", "onClick", "onUpdate:modelValue"])) : e.checkStrictly ? (T(), ie(s, {
key: 1,
"model-value": e.checkedNodeId,
label: e.node.uid,
disabled: e.isDisabled,
"onUpdate:modelValue": e.handleSelectCheck,
onClick: it(() => {
}, ["stop"])
}, {
default: G(() => [
ne(`
Add an empty element to avoid render label,
do not use empty fragment here for https://github.com/vuejs/vue-next/pull/2485
`),
Y("span")
]),
_: 1
}, 8, ["model-value", "label", "disabled", "onUpdate:modelValue", "onClick"])) : e.isLeaf && e.node.checked ? (T(), ie(l, {
key: 2,
class: W(e.ns.e("prefix"))
}, {
default: G(() => [
ee(u)
]),
_: 1
}, 8, ["class"])) : ne("v-if", !0),
ne(" content "),
ee(c),
ne(" postfix "),
e.isLeaf ? ne("v-if", !0) : (T(), B(Qe, { key: 3 }, [
e.node.loading ? (T(), ie(l, {
key: 0,
class: W([e.ns.is("loading"), e.ns.e("postfix")])
}, {
default: G(() => [
ee(d)
]),
_: 1
}, 8, ["class"])) : (T(), ie(l, {
key: 1,
class: W(["arrow-right", e.ns.e("postfix")])
}, {
default: G(() => [
ee(f)
]),
_: 1
}, 8, ["class"]))
], 64))
], 42, ["id", "aria-haspopup", "aria-owns", "aria-expanded", "tabindex", "onMouseenter", "onFocus", "onClick"]);
}
var HL = /* @__PURE__ */ vt(VL, [["render", jL], ["__file", "node.vue"]]);
const UL = Z({
name: "ElCascaderMenu",
components: {
Loading: Sf,
ElIcon: nn,
ElScrollbar: Vg,
ElCascaderNode: HL
},
props: {
nodes: {
type: Array,
required: !0
},
index: {
type: Number,
required: !0
}
},
setup(e) {
const t = dt(), n = pt("cascader-menu"), { t: r } = go(), o = pi();
let a = null, i = null;
const s = $e(Wg), u = H(null), l = _(() => !e.nodes.length), c = _(() => !s.initialLoaded), d = _(() => `${o.value}-${e.index}`), f = (m) => {
a = m.target;
}, h = (m) => {
if (!(!s.isHoverMenu || !a || !u.value))
if (a.contains(m.target)) {
p();
const g = t.vnode.el, { left: b } = g.getBoundingClientRect(), { offsetWidth: x, offsetHeight: w } = g, C = m.clientX - b, k = a.offsetTop, E = k + a.offsetHeight;
u.value.innerHTML = `
`;
} else i || (i = window.setTimeout(v, s.config.hoverThreshold));
}, p = () => {
i && (clearTimeout(i), i = null);
}, v = () => {
u.value && (u.value.innerHTML = "", p());
};
return {
ns: n,
panel: s,
hoverZone: u,
isEmpty: l,
isLoading: c,
menuId: d,
t: r,
handleExpand: f,
handleMouseMove: h,
clearHoverZone: v
};
}
});
function qL(e, t, n, r, o, a) {
const i = Et("el-cascader-node"), s = Et("loading"), u = Et("el-icon"), l = Et("el-scrollbar");
return T(), ie(l, {
key: e.menuId,
tag: "ul",
role: "menu",
class: W(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: G(() => {
var c;
return [
(T(!0), B(Qe, null, At(e.nodes, (d) => (T(), ie(i, {
key: d.uid,
node: d,
"menu-id": e.menuId,
onExpand: e.handleExpand
}, null, 8, ["node", "menu-id", "onExpand"]))), 128)),
e.isLoading ? (T(), B("div", {
key: 0,
class: W(e.ns.e("empty-text"))
}, [
ee(u, {
size: "14",
class: W(e.ns.is("loading"))
}, {
default: G(() => [
ee(s)
]),
_: 1
}, 8, ["class"]),
Ke(" " + Te(e.t("el.cascader.loading")), 1)
], 2)) : e.isEmpty ? (T(), B("div", {
key: 1,
class: W(e.ns.e("empty-text"))
}, [
ve(e.$slots, "empty", {}, () => [
Ke(Te(e.t("el.cascader.noData")), 1)
])
], 2)) : (c = e.panel) != null && c.isHoverMenu ? (T(), B("svg", {
key: 2,
ref: "hoverZone",
class: W(e.ns.e("hover-zone"))
}, null, 2)) : ne("v-if", !0)
];
}),
_: 3
}, 8, ["class", "wrap-class", "view-class", "onMousemove", "onMouseleave"]);
}
var WL = /* @__PURE__ */ vt(UL, [["render", qL], ["__file", "menu.vue"]]);
let KL = 0;
const GL = (e) => {
const t = [e];
let { parent: n } = e;
for (; n; )
t.unshift(n), n = n.parent;
return t;
};
class gl {
constructor(t, n, r, o = !1) {
this.data = t, this.config = n, this.parent = r, this.root = o, this.uid = KL++, this.checked = !1, this.indeterminate = !1, this.loading = !1;
const { value: a, label: i, children: s } = n, u = t[s], l = GL(this);
this.level = o ? 0 : r ? r.level + 1 : 1, this.value = t[a], this.label = t[i], this.pathNodes = l, this.pathValues = l.map((c) => c.value), this.pathLabels = l.map((c) => c.label), this.childrenData = u, this.children = (u || []).map((c) => new gl(c, n, this)), this.loaded = !n.lazy || this.isLeaf || !Uv(u);
}
get isDisabled() {
const { data: t, parent: n, config: r } = this, { disabled: o, checkStrictly: a } = r;
return (Nn(o) ? o(t, this) : !!t[o]) || !a && (n == null ? void 0 : n.isDisabled);
}
get isLeaf() {
const { data: t, config: n, childrenData: r, loaded: o } = this, { lazy: a, leaf: i } = n, s = Nn(i) ? i(t, this) : t[i];
return ba(s) ? a && !o ? !1 : !(Array.isArray(r) && r.length) : !!s;
}
get valueByOption() {
return this.config.emitPath ? this.pathValues : this.value;
}
appendChild(t) {
const { childrenData: n, children: r } = this, o = new gl(t, this.config, this);
return Array.isArray(n) ? n.push(t) : this.childrenData = [t], r.push(o), o;
}
calcText(t, n) {
const r = t ? this.pathLabels.join(n) : this.label;
return this.text = r, r;
}
broadcast(t, ...n) {
const r = `onParent${P1(t)}`;
this.children.forEach((o) => {
o && (o.broadcast(t, ...n), o[r] && o[r](...n));
});
}
emit(t, ...n) {
const { parent: r } = this, o = `onChild${P1(t)}`;
r && (r[o] && r[o](...n), r.emit(t, ...n));
}
onParentCheck(t) {
this.isDisabled || this.setCheckState(t);
}
onChildCheck() {
const { children: t } = this, n = t.filter((o) => !o.isDisabled), r = n.length ? n.every((o) => o.checked) : !1;
this.setCheckState(r);
}
setCheckState(t) {
const n = this.children.length, r = this.children.reduce((o, a) => {
const i = a.checked ? 1 : a.indeterminate ? 0.5 : 0;
return o + i;
}, 0);
this.checked = this.loaded && this.children.filter((o) => !o.isDisabled).every((o) => o.loaded && o.checked) && t, this.indeterminate = this.loaded && r !== n && r > 0;
}
doCheck(t) {
if (this.checked === t)
return;
const { checkStrictly: n, multiple: r } = this.config;
n || !r ? this.checked = t : (this.broadcast("check", t), this.setCheckState(t), this.emit("check"));
}
}
const Jv = (e, t) => e.reduce((n, r) => (r.isLeaf ? n.push(r) : (!t && n.push(r), n = n.concat(Jv(r.children, t))), n), []);
class pb {
constructor(t, n) {
this.config = n;
const r = (t || []).map((o) => new gl(o, this.config));
this.nodes = r, this.allNodes = Jv(r, !1), this.leafNodes = Jv(r, !0);
}
getNodes() {
return this.nodes;
}
getFlattedNodes(t) {
return t ? this.leafNodes : this.allNodes;
}
appendNode(t, n) {
const r = n ? n.appendChild(t) : new gl(t, this.config);
n || this.nodes.push(r), this.allNodes.push(r), r.isLeaf && this.leafNodes.push(r);
}
appendNodes(t, n) {
t.forEach((r) => this.appendNode(r, n));
}
getNodeByValue(t, n = !1) {
return !t && t !== 0 ? null : this.getFlattedNodes(n).find((o) => Yo(o.value, t) || Yo(o.pathValues, t)) || null;
}
getSameNode(t) {
return t && this.getFlattedNodes(!1).find(({ value: r, level: o }) => Yo(t.value, r) && t.level === o) || null;
}
}
const m3 = mt({
modelValue: {
type: et([Number, String, Array])
},
options: {
type: et(Array),
default: () => []
},
props: {
type: et(Object),
default: () => ({})
}
}), XL = {
expandTrigger: "click",
multiple: !1,
checkStrictly: !1,
emitPath: !0,
lazy: !1,
lazyLoad: xa,
value: "value",
label: "label",
children: "children",
leaf: "leaf",
disabled: "disabled",
hoverThreshold: 500
}, YL = (e) => _(() => ({
...XL,
...e.props
})), fb = (e) => {
if (!e)
return 0;
const t = e.id.split("-");
return Number(t[t.length - 2]);
}, ZL = (e) => {
if (!e)
return;
const t = e.querySelector("input");
t ? t.click() : Fk(e) && e.click();
}, JL = (e, t) => {
const n = t.slice(0), r = n.map((a) => a.uid), o = e.reduce((a, i) => {
const s = r.indexOf(i.uid);
return s > -1 && (a.push(i), n.splice(s, 1), r.splice(s, 1)), a;
}, []);
return o.push(...n), o;
}, QL = Z({
name: "ElCascaderPanel",
components: {
ElCascaderMenu: WL
},
props: {
...m3,
border: {
type: Boolean,
default: !0
},
renderLabel: Function
},
emits: [hn, ls, "close", "expand-change"],
setup(e, { emit: t, slots: n }) {
let r = !1;
const o = pt("cascader"), a = YL(e);
let i = null;
const s = H(!0), u = H([]), l = H(null), c = H([]), d = H(null), f = H([]), h = _(() => a.value.expandTrigger === "hover"), p = _(() => e.renderLabel || n.default), v = () => {
const { options: A } = e, L = a.value;
r = !1, i = new pb(A, L), c.value = [i.getNodes()], L.lazy && Uv(e.options) ? (s.value = !1, m(void 0, (N) => {
N && (i = new pb(N, L), c.value = [i.getNodes()]), s.value = !0, S(!1, !0);
})) : S(!1, !0);
}, m = (A, L) => {
const N = a.value;
A = A || new gl({}, N, void 0, !0), A.loading = !0;
const M = (I) => {
const z = A, R = z.root ? null : z;
I && (i == null || i.appendNodes(I, R)), z.loading = !1, z.loaded = !0, z.childrenData = z.childrenData || [], L && L(I);
};
N.lazyLoad(A, M);
}, g = (A, L) => {
var N;
const { level: M } = A, I = c.value.slice(0, M);
let z;
A.isLeaf ? z = A.pathNodes[M - 2] : (z = A, I.push(A.children)), ((N = d.value) == null ? void 0 : N.uid) !== (z == null ? void 0 : z.uid) && (d.value = A, c.value = I, !L && t("expand-change", (A == null ? void 0 : A.pathValues) || []));
}, b = (A, L, N = !0) => {
const { checkStrictly: M, multiple: I } = a.value, z = f.value[0];
r = !0, !I && (z == null || z.doCheck(!1)), A.doCheck(L), E(), N && !I && !M && t("close"), !N && !I && !M && x(A);
}, x = (A) => {
A && (A = A.parent, x(A), A && g(A));
}, w = (A) => i == null ? void 0 : i.getFlattedNodes(A), C = (A) => {
var L;
return (L = w(A)) == null ? void 0 : L.filter((N) => N.checked !== !1);
}, k = () => {
f.value.forEach((A) => A.doCheck(!1)), E(), c.value = c.value.slice(0, 1), d.value = null, t("expand-change", []);
}, E = () => {
var A;
const { checkStrictly: L, multiple: N } = a.value, M = f.value, I = C(!L), z = JL(M, I), R = z.map((q) => q.valueByOption);
f.value = z, l.value = N ? R : (A = R[0]) != null ? A : null;
}, S = (A = !1, L = !1) => {
const { modelValue: N } = e, { lazy: M, multiple: I, checkStrictly: z } = a.value, R = !z;
if (!(!s.value || r || !L && Yo(N, l.value)))
if (M && !A) {
const oe = N1(GA(L1(N))).map((Q) => i == null ? void 0 : i.getNodeByValue(Q)).filter((Q) => !!Q && !Q.loaded && !Q.loading);
oe.length ? oe.forEach((Q) => {
m(Q, () => S(!1, L));
}) : S(!0, L);
} else {
const q = I ? L1(N) : [N], oe = N1(q.map((Q) => i == null ? void 0 : i.getNodeByValue(Q, R)));
O(oe, L), l.value = rC(N);
}
}, O = (A, L = !0) => {
const { checkStrictly: N } = a.value, M = f.value, I = A.filter((q) => !!q && (N || q.isLeaf)), z = i == null ? void 0 : i.getSameNode(d.value), R = L && z || I[0];
R ? R.pathNodes.forEach((q) => g(q, !0)) : d.value = null, M.forEach((q) => q.doCheck(!1)), pn(I).forEach((q) => q.doCheck(!0)), f.value = I, Ge(F);
}, F = () => {
on && u.value.forEach((A) => {
const L = A == null ? void 0 : A.$el;
if (L) {
const N = L.querySelector(`.${o.namespace.value}-scrollbar__wrap`), M = L.querySelector(`.${o.b("node")}.${o.is("active")}`) || L.querySelector(`.${o.b("node")}.in-active-path`);
hC(N, M);
}
});
}, $ = (A) => {
const L = A.target, { code: N } = A;
switch (N) {
case Fn.up:
case Fn.down: {
A.preventDefault();
const M = N === Fn.up ? -1 : 1;
Zd(Ik(L, M, `.${o.b("node")}[tabindex="-1"]`));
break;
}
case Fn.left: {
A.preventDefault();
const M = u.value[fb(L) - 1], I = M == null ? void 0 : M.$el.querySelector(`.${o.b("node")}[aria-expanded="true"]`);
Zd(I);
break;
}
case Fn.right: {
A.preventDefault();
const M = u.value[fb(L) + 1], I = M == null ? void 0 : M.$el.querySelector(`.${o.b("node")}[tabindex="-1"]`);
Zd(I);
break;
}
case Fn.enter:
ZL(L);
break;
}
};
return ft(Wg, pn({
config: a,
expandingNode: d,
checkedNodes: f,
isHoverMenu: h,
initialLoaded: s,
renderLabelFn: p,
lazyLoad: m,
expandNode: g,
handleCheckChange: b
})), me([a, () => e.options], v, {
deep: !0,
immediate: !0
}), me(() => e.modelValue, () => {
r = !1, S();
}, {
deep: !0
}), me(() => l.value, (A) => {
Yo(A, e.modelValue) || (t(hn, A), t(ls, A));
}), yT(() => u.value = []), ht(() => !Uv(e.modelValue) && S()), {
ns: o,
menuList: u,
menus: c,
checkedNodes: f,
handleKeyDown: $,
handleCheckChange: b,
getFlattedNodes: w,
getCheckedNodes: C,
clearCheckedNodes: k,
calculateCheckedValue: E,
scrollToExpandingNode: F
};
}
});
function eD(e, t, n, r, o, a) {
const i = Et("el-cascader-menu");
return T(), B("div", {
class: W([e.ns.b("panel"), e.ns.is("bordered", e.border)]),
onKeydown: e.handleKeyDown
}, [
(T(!0), B(Qe, null, At(e.menus, (s, u) => (T(), ie(i, {
key: u,
ref_for: !0,
ref: (l) => e.menuList[u] = l,
index: u,
nodes: [...s]
}, {
empty: G(() => [
ve(e.$slots, "empty")
]),
_: 2
}, 1032, ["index", "nodes"]))), 128))
], 42, ["onKeydown"]);
}
var tD = /* @__PURE__ */ vt(QL, [["render", eD], ["__file", "index.vue"]]);
const nD = $n(tD), Ju = mt({
type: {
type: String,
values: ["primary", "success", "info", "warning", "danger"],
default: "primary"
},
closable: Boolean,
disableTransitions: Boolean,
hit: Boolean,
color: String,
size: {
type: String,
values: Tf
},
effect: {
type: String,
values: ["dark", "light", "plain"],
default: "light"
},
round: Boolean
}), rD = {
close: (e) => e instanceof MouseEvent,
click: (e) => e instanceof MouseEvent
}, oD = Z({
name: "ElTag"
}), aD = /* @__PURE__ */ Z({
...oD,
props: Ju,
emits: rD,
setup(e, { emit: t }) {
const n = e, r = fi(), o = pt("tag"), a = _(() => {
const { type: l, hit: c, effect: d, closable: f, round: h } = n;
return [
o.b(),
o.is("closable", f),
o.m(l || "primary"),
o.m(r.value),
o.m(d),
o.is("hit", c),
o.is("round", h)
];
}), i = (l) => {
t("close", l);
}, s = (l) => {
t("click", l);
}, u = (l) => {
l.component.subTree.component.bum = null;
};
return (l, c) => l.disableTransitions ? (T(), B("span", {
key: 0,
class: W(y(a)),
style: lt({ backgroundColor: l.color }),
onClick: s
}, [
Y("span", {
class: W(y(o).e("content"))
}, [
ve(l.$slots, "default")
], 2),
l.closable ? (T(), ie(y(nn), {
key: 0,
class: W(y(o).e("close")),
onClick: it(i, ["stop"])
}, {
default: G(() => [
ee(y(Wv))
]),
_: 1
}, 8, ["class", "onClick"])) : ne("v-if", !0)
], 6)) : (T(), ie(Kr, {
key: 1,
name: `${y(o).namespace.value}-zoom-in-center`,
appear: "",
onVnodeMounted: u
}, {
default: G(() => [
Y("span", {
class: W(y(a)),
style: lt({ backgroundColor: l.color }),
onClick: s
}, [
Y("span", {
class: W(y(o).e("content"))
}, [
ve(l.$slots, "default")
], 2),
l.closable ? (T(), ie(y(nn), {
key: 0,
class: W(y(o).e("close")),
onClick: it(i, ["stop"])
}, {
default: G(() => [
ee(y(Wv))
]),
_: 1
}, 8, ["class", "onClick"])) : ne("v-if", !0)
], 6)
]),
_: 3
}, 8, ["name"]));
}
});
var iD = /* @__PURE__ */ vt(aD, [["__file", "tag.vue"]]);
const ml = $n(iD), sD = mt({
...m3,
size: Aa,
placeholder: String,
disabled: Boolean,
clearable: Boolean,
filterable: Boolean,
filterMethod: {
type: et(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: et(Function),
default: () => !0
},
placement: {
type: et(String),
values: $c,
default: "bottom-start"
},
fallbackPlacements: {
type: et(Array),
default: ["bottom-start", "bottom", "top-start", "top", "right", "left"]
},
popperClass: {
type: String,
default: ""
},
teleported: Cr.teleported,
tagType: { ...Ju.type, default: "info" },
tagEffect: { ...Ju.effect, default: "light" },
validateEvent: {
type: Boolean,
default: !0
},
persistent: {
type: Boolean,
default: !0
},
...HC
}), lD = {
[hn]: (e) => !0,
[ls]: (e) => !0,
focus: (e) => e instanceof FocusEvent,
blur: (e) => e instanceof FocusEvent,
clear: () => !0,
visibleChange: (e) => ea(e),
expandChange: (e) => !!e,
removeTag: (e) => !!e
}, uD = "ElCascader", cD = Z({
name: uD
}), dD = /* @__PURE__ */ Z({
...cD,
props: sD,
emits: lD,
setup(e, { expose: t, emit: n }) {
const r = e, o = {
modifiers: [
{
name: "arrowPosition",
enabled: !0,
phase: "main",
fn: ({ state: re }) => {
const { modifiersData: Se, placement: be } = re;
["right", "left", "bottom", "top"].includes(be) || (Se.arrow.x = 35);
},
requires: ["arrow"]
}
]
}, a = rg();
let i = 0, s = 0;
const u = pt("cascader"), l = pt("input"), { t: c } = go(), { form: d, formItem: f } = _i(), { valueOnClear: h } = UC(r), { isComposing: p, handleComposition: v } = Bg({
afterComposition(re) {
var Se;
const be = (Se = re.target) == null ? void 0 : Se.value;
Ye(be);
}
}), m = H(null), g = H(null), b = H(null), x = H(null), w = H(null), C = H(!1), k = H(!1), E = H(!1), S = H(!1), O = H(""), F = H(""), $ = H([]), A = H([]), L = H([]), N = _(() => a.style), M = _(() => r.disabled || (d == null ? void 0 : d.disabled)), I = _(() => r.placeholder || c("el.cascader.placeholder")), z = _(() => F.value || $.value.length > 0 || p.value ? "" : I.value), R = fi(), q = _(() => ["small"].includes(R.value) ? "small" : "default"), oe = _(() => !!r.props.multiple), Q = _(() => !r.filterable || oe.value), ae = _(() => oe.value ? F.value : O.value), pe = _(() => {
var re;
return ((re = x.value) == null ? void 0 : re.checkedNodes) || [];
}), we = _(() => !r.clearable || M.value || E.value || !k.value ? !1 : !!pe.value.length), ke = _(() => {
const { showAllLevels: re, separator: Se } = r, be = pe.value;
return be.length ? oe.value ? "" : be[0].calcText(re, Se) : "";
}), fe = _(() => (f == null ? void 0 : f.validateState) || ""), ge = _({
get() {
return rC(r.modelValue);
},
set(re) {
const Se = re ?? h.value;
n(hn, Se), n(ls, Se), r.validateEvent && (f == null || f.validate("change").catch((be) => Sn(be)));
}
}), J = _(() => [
u.b(),
u.m(R.value),
u.is("disabled", M.value),
a.class
]), te = _(() => [
l.e("icon"),
"icon-arrow-down",
u.is("reverse", C.value)
]), le = _(() => u.is("focus", C.value || S.value)), Ee = _(() => {
var re, Se;
return (Se = (re = m.value) == null ? void 0 : re.popperRef) == null ? void 0 : Se.contentRef;
}), Ne = (re) => {
var Se, be, Le;
M.value || (re = re ?? !C.value, re !== C.value && (C.value = re, (be = (Se = g.value) == null ? void 0 : Se.input) == null || be.setAttribute("aria-expanded", `${re}`), re ? (je(), Ge((Le = x.value) == null ? void 0 : Le.scrollToExpandingNode)) : r.filterable && j(), n("visibleChange", re)));
}, je = () => {
Ge(() => {
var re;
(re = m.value) == null || re.updatePopper();
});
}, _e = () => {
E.value = !1;
}, De = (re) => {
const { showAllLevels: Se, separator: be } = r;
return {
node: re,
key: re.uid,
text: re.calcText(Se, be),
hitState: !1,
closable: !M.value && !re.isDisabled,
isCollapseTag: !1
};
}, Ae = (re) => {
var Se;
const be = re.node;
be.doCheck(!1), (Se = x.value) == null || Se.calculateCheckedValue(), n("removeTag", be.valueByOption);
}, Be = () => {
if (!oe.value)
return;
const re = pe.value, Se = [], be = [];
if (re.forEach((Le) => be.push(De(Le))), A.value = be, re.length) {
re.slice(0, r.maxCollapseTags).forEach((Ct) => Se.push(De(Ct)));
const Le = re.slice(r.maxCollapseTags), Tt = Le.length;
Tt && (r.collapseTags ? Se.push({
key: -1,
text: `+ ${Tt}`,
closable: !1,
isCollapseTag: !0
}) : Le.forEach((Ct) => Se.push(De(Ct))));
}
$.value = Se;
}, Ue = () => {
var re, Se;
const { filterMethod: be, showAllLevels: Le, separator: Tt } = r, Ct = (Se = (re = x.value) == null ? void 0 : re.getFlattedNodes(!r.props.checkStrictly)) == null ? void 0 : Se.filter((Dt) => Dt.isDisabled ? !1 : (Dt.calcText(Le, Tt), be(Dt, ae.value)));
oe.value && ($.value.forEach((Dt) => {
Dt.hitState = !1;
}), A.value.forEach((Dt) => {
Dt.hitState = !1;
})), E.value = !0, L.value = Ct, je();
}, Ze = () => {
var re;
let Se;
E.value && w.value ? Se = w.value.$el.querySelector(`.${u.e("suggestion-item")}`) : Se = (re = x.value) == null ? void 0 : re.$el.querySelector(`.${u.b("node")}[tabindex="-1"]`), Se && (Se.focus(), !E.value && Se.click());
}, Me = () => {
var re, Se;
const be = (re = g.value) == null ? void 0 : re.input, Le = b.value, Tt = (Se = w.value) == null ? void 0 : Se.$el;
if (!(!on || !be)) {
if (Tt) {
const Ct = Tt.querySelector(`.${u.e("suggestion-list")}`);
Ct.style.minWidth = `${be.offsetWidth}px`;
}
if (Le) {
const { offsetHeight: Ct } = Le, Dt = $.value.length > 0 ? `${Math.max(Ct + 6, i)}px` : `${i}px`;
be.style.height = Dt, je();
}
}
}, rt = (re) => {
var Se;
return (Se = x.value) == null ? void 0 : Se.getCheckedNodes(re);
}, nt = (re) => {
je(), n("expandChange", re);
}, st = (re) => {
if (!p.value)
switch (re.code) {
case Fn.enter:
Ne();
break;
case Fn.down:
Ne(!0), Ge(Ze), re.preventDefault();
break;
case Fn.esc:
C.value === !0 && (re.preventDefault(), re.stopPropagation(), Ne(!1));
break;
case Fn.tab:
Ne(!1);
break;
}
}, P = () => {
var re;
(re = x.value) == null || re.clearCheckedNodes(), !C.value && r.filterable && j(), Ne(!1), n("clear");
}, j = () => {
const { value: re } = ke;
O.value = re, F.value = re;
}, se = (re) => {
var Se, be;
const { checked: Le } = re;
oe.value ? (Se = x.value) == null || Se.handleCheckChange(re, !Le, !1) : (!Le && ((be = x.value) == null || be.handleCheckChange(re, !0, !1)), Ne(!1));
}, ce = (re) => {
const Se = re.target, { code: be } = re;
switch (be) {
case Fn.up:
case Fn.down: {
const Le = be === Fn.up ? -1 : 1;
Zd(Ik(Se, Le, `.${u.e("suggestion-item")}[tabindex="-1"]`));
break;
}
case Fn.enter:
Se.click();
break;
}
}, de = () => {
const re = $.value, Se = re[re.length - 1];
s = F.value ? 0 : s + 1, !(!Se || !s || r.collapseTags && re.length > 1) && (Se.hitState ? Ae(Se) : Se.hitState = !0);
}, Oe = (re) => {
const Se = re.target, be = u.e("search-input");
Se.className === be && (S.value = !0), n("focus", re);
}, ye = (re) => {
S.value = !1, n("blur", re);
}, Fe = lC(() => {
const { value: re } = ae;
if (!re)
return;
const Se = r.beforeFilter(re);
zT(Se) ? Se.then(Ue).catch(() => {
}) : Se !== !1 ? Ue() : _e();
}, r.debounce), Ye = (re, Se) => {
!C.value && Ne(!0), !(Se != null && Se.isComposing) && (re ? Fe() : _e());
}, Je = (re) => Number.parseFloat(ST(l.cssVarName("input-height"), re).value) - 2;
return me(E, je), me([pe, M, () => r.collapseTags], Be), me($, () => {
Ge(() => Me());
}), me(R, async () => {
await Ge();
const re = g.value.input;
i = Je(re) || i, Me();
}), me(ke, j, { immediate: !0 }), ht(() => {
const re = g.value.input, Se = Je(re);
i = re.offsetHeight || Se, qo(re, Me);
}), t({
getCheckedNodes: rt,
cascaderPanelRef: x,
togglePopperVisible: Ne,
contentRef: Ee,
presentText: ke
}), (re, Se) => (T(), ie(y(Ap), {
ref_key: "tooltipRef",
ref: m,
visible: C.value,
teleported: re.teleported,
"popper-class": [y(u).e("dropdown"), re.popperClass],
"popper-options": o,
"fallback-placements": re.fallbackPlacements,
"stop-popper-mouse-event": !1,
"gpu-acceleration": !1,
placement: re.placement,
transition: `${y(u).namespace.value}-zoom-in-top`,
effect: "light",
pure: "",
persistent: re.persistent,
onHide: _e
}, {
default: G(() => [
tt((T(), B("div", {
class: W(y(J)),
style: lt(y(N)),
onClick: () => Ne(y(Q) ? void 0 : !0),
onKeydown: st,
onMouseenter: (be) => k.value = !0,
onMouseleave: (be) => k.value = !1
}, [
ee(y($f), {
ref_key: "input",
ref: g,
modelValue: O.value,
"onUpdate:modelValue": (be) => O.value = be,
placeholder: y(z),
readonly: y(Q),
disabled: y(M),
"validate-event": !1,
size: y(R),
class: W(y(le)),
tabindex: y(oe) && re.filterable && !y(M) ? -1 : void 0,
onCompositionstart: y(v),
onCompositionupdate: y(v),
onCompositionend: y(v),
onFocus: Oe,
onBlur: ye,
onInput: Ye
}, {
suffix: G(() => [
y(we) ? (T(), ie(y(nn), {
key: "clear",
class: W([y(l).e("icon"), "icon-circle-close"]),
onClick: it(P, ["stop"])
}, {
default: G(() => [
ee(y(Ef))
]),
_: 1
}, 8, ["class", "onClick"])) : (T(), ie(y(nn), {
key: "arrow-down",
class: W(y(te)),
onClick: it((be) => Ne(), ["stop"])
}, {
default: G(() => [
ee(y(_g))
]),
_: 1
}, 8, ["class", "onClick"]))
]),
_: 1
}, 8, ["modelValue", "onUpdate:modelValue", "placeholder", "readonly", "disabled", "size", "class", "tabindex", "onCompositionstart", "onCompositionupdate", "onCompositionend"]),
y(oe) ? (T(), B("div", {
key: 0,
ref_key: "tagWrapper",
ref: b,
class: W([
y(u).e("tags"),
y(u).is("validate", !!y(fe))
])
}, [
(T(!0), B(Qe, null, At($.value, (be) => (T(), ie(y(ml), {
key: be.key,
type: re.tagType,
size: y(q),
effect: re.tagEffect,
hit: be.hitState,
closable: be.closable,
"disable-transitions": "",
onClose: (Le) => Ae(be)
}, {
default: G(() => [
be.isCollapseTag === !1 ? (T(), B("span", { key: 0 }, Te(be.text), 1)) : (T(), ie(y(Ap), {
key: 1,
disabled: C.value || !re.collapseTagsTooltip,
"fallback-placements": ["bottom", "top", "right", "left"],
placement: "bottom",
effect: "light"
}, {
default: G(() => [
Y("span", null, Te(be.text), 1)
]),
content: G(() => [
Y("div", {
class: W(y(u).e("collapse-tags"))
}, [
(T(!0), B(Qe, null, At(A.value.slice(re.maxCollapseTags), (Le, Tt) => (T(), B("div", {
key: Tt,
class: W(y(u).e("collapse-tag"))
}, [
(T(), ie(y(ml), {
key: Le.key,
class: "in-tooltip",
type: re.tagType,
size: y(q),
effect: re.tagEffect,
hit: Le.hitState,
closable: Le.closable,
"disable-transitions": "",
onClose: (Ct) => Ae(Le)
}, {
default: G(() => [
Y("span", null, Te(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)),
re.filterable && !y(M) ? tt((T(), B("input", {
key: 0,
"onUpdate:modelValue": (be) => F.value = be,
type: "text",
class: W(y(u).e("search-input")),
placeholder: y(ke) ? "" : y(I),
onInput: (be) => Ye(F.value, be),
onClick: it((be) => Ne(!0), ["stop"]),
onKeydown: _r(de, ["delete"]),
onCompositionstart: y(v),
onCompositionupdate: y(v),
onCompositionend: y(v),
onFocus: Oe,
onBlur: ye
}, null, 42, ["onUpdate:modelValue", "placeholder", "onInput", "onClick", "onKeydown", "onCompositionstart", "onCompositionupdate", "onCompositionend"])), [
[lg, F.value]
]) : ne("v-if", !0)
], 2)) : ne("v-if", !0)
], 46, ["onClick", "onMouseenter", "onMouseleave"])), [
[y(o3), () => Ne(!1), y(Ee)]
])
]),
content: G(() => [
tt(ee(y(nD), {
ref_key: "cascaderPanelRef",
ref: x,
modelValue: y(ge),
"onUpdate:modelValue": (be) => Vn(ge) ? ge.value = be : null,
options: re.options,
props: r.props,
border: !1,
"render-label": re.$slots.default,
onExpandChange: nt,
onClose: (be) => re.$nextTick(() => Ne(!1))
}, {
empty: G(() => [
ve(re.$slots, "empty")
]),
_: 3
}, 8, ["modelValue", "onUpdate:modelValue", "options", "props", "render-label", "onClose"]), [
[Pt, !E.value]
]),
re.filterable ? tt((T(), ie(y(Vg), {
key: 0,
ref_key: "suggestionPanel",
ref: w,
tag: "ul",
class: W(y(u).e("suggestion-panel")),
"view-class": y(u).e("suggestion-list"),
onKeydown: ce
}, {
default: G(() => [
L.value.length ? (T(!0), B(Qe, { key: 0 }, At(L.value, (be) => (T(), B("li", {
key: be.uid,
class: W([
y(u).e("suggestion-item"),
y(u).is("checked", be.checked)
]),
tabindex: -1,
onClick: (Le) => se(be)
}, [
Y("span", null, Te(be.text), 1),
be.checked ? (T(), ie(y(nn), { key: 0 }, {
default: G(() => [
ee(y(vC))
]),
_: 1
})) : ne("v-if", !0)
], 10, ["onClick"]))), 128)) : ve(re.$slots, "empty", { key: 1 }, () => [
Y("li", {
class: W(y(u).e("empty-text"))
}, Te(y(c)("el.cascader.noMatch")), 3)
])
]),
_: 3
}, 8, ["class", "view-class"])), [
[Pt, E.value]
]) : ne("v-if", !0)
]),
_: 3
}, 8, ["visible", "teleported", "popper-class", "fallback-placements", "placement", "transition", "persistent"]));
}
});
var pD = /* @__PURE__ */ vt(dD, [["__file", "cascader.vue"]]);
const y3 = $n(pD), b3 = Symbol("rowContextKey"), fD = [
"start",
"center",
"end",
"space-around",
"space-between",
"space-evenly"
], hD = ["top", "middle", "bottom"], vD = mt({
tag: {
type: String,
default: "div"
},
gutter: {
type: Number,
default: 0
},
justify: {
type: String,
values: fD,
default: "start"
},
align: {
type: String,
values: hD
}
}), gD = Z({
name: "ElRow"
}), mD = /* @__PURE__ */ Z({
...gD,
props: vD,
setup(e) {
const t = e, n = pt("row"), r = _(() => t.gutter);
ft(b3, {
gutter: r
});
const o = _(() => {
const i = {};
return t.gutter && (i.marginRight = i.marginLeft = `-${t.gutter / 2}px`), i;
}), a = _(() => [
n.b(),
n.is(`justify-${t.justify}`, t.justify !== "start"),
n.is(`align-${t.align}`, !!t.align)
]);
return (i, s) => (T(), ie(_t(i.tag), {
class: W(y(a)),
style: lt(y(o))
}, {
default: G(() => [
ve(i.$slots, "default")
]),
_: 3
}, 8, ["class", "style"]));
}
});
var yD = /* @__PURE__ */ vt(mD, [["__file", "row.vue"]]);
const w3 = $n(yD), bD = mt({
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: et([Number, Object]),
default: () => Ja({})
},
sm: {
type: et([Number, Object]),
default: () => Ja({})
},
md: {
type: et([Number, Object]),
default: () => Ja({})
},
lg: {
type: et([Number, Object]),
default: () => Ja({})
},
xl: {
type: et([Number, Object]),
default: () => Ja({})
}
}), wD = Z({
name: "ElCol"
}), xD = /* @__PURE__ */ Z({
...wD,
props: bD,
setup(e) {
const t = e, { gutter: n } = $e(b3, { gutter: _(() => 0) }), r = pt("col"), o = _(() => {
const i = {};
return n.value && (i.paddingLeft = i.paddingRight = `${n.value / 2}px`), i;
}), a = _(() => {
const i = [];
return ["span", "offset", "pull", "push"].forEach((l) => {
const c = t[l];
Ut(c) && (l === "span" ? i.push(r.b(`${t[l]}`)) : c > 0 && i.push(r.b(`${l}-${t[l]}`)));
}), ["xs", "sm", "md", "lg", "xl"].forEach((l) => {
Ut(t[l]) ? i.push(r.b(`${l}-${t[l]}`)) : zn(t[l]) && Object.entries(t[l]).forEach(([c, d]) => {
i.push(c !== "span" ? r.b(`${l}-${c}-${d}`) : r.b(`${l}-${d}`));
});
}), n.value && i.push(r.is("guttered")), [r.b(), i];
});
return (i, s) => (T(), ie(_t(i.tag), {
class: W(y(a)),
style: lt(y(o))
}, {
default: G(() => [
ve(i.$slots, "default")
]),
_: 3
}, 8, ["class", "style"]));
}
});
var kD = /* @__PURE__ */ vt(xD, [["__file", "col.vue"]]);
const x3 = $n(kD), CD = Z({
name: "ElContainer"
}), ED = /* @__PURE__ */ Z({
...CD,
props: {
direction: {
type: String
}
},
setup(e) {
const t = e, n = ho(), r = pt("container"), o = _(() => t.direction === "vertical" ? !0 : t.direction === "horizontal" ? !1 : n && n.default ? n.default().some((i) => {
const s = i.type.name;
return s === "ElHeader" || s === "ElFooter";
}) : !1);
return (a, i) => (T(), B("section", {
class: W([y(r).b(), y(r).is("vertical", y(o))])
}, [
ve(a.$slots, "default")
], 2));
}
});
var SD = /* @__PURE__ */ vt(ED, [["__file", "container.vue"]]);
const _D = Z({
name: "ElAside"
}), TD = /* @__PURE__ */ Z({
..._D,
props: {
width: {
type: String,
default: null
}
},
setup(e) {
const t = e, n = pt("aside"), r = _(() => t.width ? n.cssVarBlock({ width: t.width }) : {});
return (o, a) => (T(), B("aside", {
class: W(y(n).b()),
style: lt(y(r))
}, [
ve(o.$slots, "default")
], 6));
}
});
var k3 = /* @__PURE__ */ vt(TD, [["__file", "aside.vue"]]);
const OD = Z({
name: "ElFooter"
}), PD = /* @__PURE__ */ Z({
...OD,
props: {
height: {
type: String,
default: null
}
},
setup(e) {
const t = e, n = pt("footer"), r = _(() => t.height ? n.cssVarBlock({ height: t.height }) : {});
return (o, a) => (T(), B("footer", {
class: W(y(n).b()),
style: lt(y(r))
}, [
ve(o.$slots, "default")
], 6));
}
});
var C3 = /* @__PURE__ */ vt(PD, [["__file", "footer.vue"]]);
const $D = Z({
name: "ElHeader"
}), AD = /* @__PURE__ */ Z({
...$D,
props: {
height: {
type: String,
default: null
}
},
setup(e) {
const t = e, n = pt("header"), r = _(() => t.height ? n.cssVarBlock({
height: t.height
}) : {});
return (o, a) => (T(), B("header", {
class: W(y(n).b()),
style: lt(y(r))
}, [
ve(o.$slots, "default")
], 6));
}
});
var E3 = /* @__PURE__ */ vt(AD, [["__file", "header.vue"]]);
const FD = Z({
name: "ElMain"
}), ID = /* @__PURE__ */ Z({
...FD,
setup(e) {
const t = pt("main");
return (n, r) => (T(), B("main", {
class: W(y(t).b())
}, [
ve(n.$slots, "default")
], 2));
}
});
var S3 = /* @__PURE__ */ vt(ID, [["__file", "main.vue"]]);
const ND = $n(SD, {
Aside: k3,
Footer: C3,
Header: E3,
Main: S3
});
Io(k3);
Io(C3);
Io(E3);
Io(S3);
const LD = mt({
mask: {
type: Boolean,
default: !0
},
customMaskEvent: Boolean,
overlayClass: {
type: et([
String,
Array,
Object
])
},
zIndex: {
type: et([String, Number])
}
}), DD = {
click: (e) => e instanceof MouseEvent
}, RD = "overlay";
var BD = Z({
name: "ElOverlay",
props: LD,
emits: DD,
setup(e, { slots: t, emit: n }) {
const r = pt(RD), o = (u) => {
n("click", u);
}, { onClick: a, onMousedown: i, onMouseup: s } = G9(e.customMaskEvent ? void 0 : o);
return () => e.mask ? ee("div", {
class: [r.b(), e.overlayClass],
style: {
zIndex: e.zIndex
},
onClick: a,
onMousedown: i,
onMouseup: s
}, [ve(t, "default")], Qd.STYLE | Qd.CLASS | Qd.PROPS, ["onClick", "onMouseup", "onMousedown"]) : Kt("div", {
class: e.overlayClass,
style: {
zIndex: e.zIndex,
position: "fixed",
top: "0px",
right: "0px",
bottom: "0px",
left: "0px"
}
}, [ve(t, "default")]);
}
});
const MD = BD, zD = mt({
center: Boolean,
alignCenter: Boolean,
closeIcon: {
type: io
},
draggable: Boolean,
overflow: Boolean,
fullscreen: Boolean,
showClose: {
type: Boolean,
default: !0
},
title: {
type: String,
default: ""
},
ariaLevel: {
type: String,
default: "2"
}
}), VD = mt({
...zD,
appendToBody: Boolean,
appendTo: {
type: et([String, Object]),
default: "body"
},
beforeClose: {
type: et(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"
}
}), jD = {
open: () => !0,
opened: () => !0,
close: () => !0,
closed: () => !0,
[hn]: (e) => ea(e),
openAutoFocus: () => !0,
closeAutoFocus: () => !0
}, HD = (e, t) => {
var n;
const o = dt().emit, { nextZIndex: a } = Rg();
let i = "";
const s = pi(), u = pi(), l = H(!1), c = H(!1), d = H(!1), f = H((n = e.zIndex) != null ? n : a());
let h, p;
const v = Pf("namespace", Fu), m = _(() => {
const M = {}, I = `--${v.value}-dialog`;
return e.fullscreen || (e.top && (M[`${I}-margin-top`] = e.top), e.width && (M[`${I}-width`] = cl(e.width))), M;
}), g = _(() => e.alignCenter ? { display: "flex" } : {});
function b() {
o("opened");
}
function x() {
o("closed"), o(hn, !1), e.destroyOnClose && (d.value = !1);
}
function w() {
o("close");
}
function C() {
p == null || p(), h == null || h(), e.openDelay && e.openDelay > 0 ? { stop: h } = Hy(() => O(), e.openDelay) : O();
}
function k() {
h == null || h(), p == null || p(), e.closeDelay && e.closeDelay > 0 ? { stop: p } = Hy(() => F(), e.closeDelay) : F();
}
function E() {
function M(I) {
I || (c.value = !0, l.value = !1);
}
e.beforeClose ? e.beforeClose(M) : k();
}
function S() {
e.closeOnClickModal && E();
}
function O() {
on && (l.value = !0);
}
function F() {
l.value = !1;
}
function $() {
o("openAutoFocus");
}
function A() {
o("closeAutoFocus");
}
function L(M) {
var I;
((I = M.detail) == null ? void 0 : I.focusReason) === "pointer" && M.preventDefault();
}
e.lockScroll && zF(l);
function N() {
e.closeOnPressEscape && E();
}
return me(() => e.modelValue, (M) => {
M ? (c.value = !1, C(), d.value = !0, f.value = uC(e.zIndex) ? a() : f.value++, Ge(() => {
o("open"), t.value && (t.value.scrollTop = 0);
})) : l.value && k();
}), me(() => e.fullscreen, (M) => {
t.value && (M ? (i = t.value.style.transform, t.value.style.transform = "") : t.value.style.transform = i);
}), ht(() => {
e.modelValue && (l.value = !0, d.value = !0, C());
}), {
afterEnter: b,
afterLeave: x,
beforeLeave: w,
handleClose: E,
onModalClick: S,
close: k,
doClose: F,
onOpenAutoFocus: $,
onCloseAutoFocus: A,
onCloseRequested: N,
onFocusoutPrevented: L,
titleId: s,
bodyId: u,
closed: c,
style: m,
overlayDialogStyle: g,
rendered: d,
visible: l,
zIndex: f
};
}, UD = mt({
...VD,
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"
}
}), qD = jD, WD = Z({
name: "ElDrawer",
inheritAttrs: !1
}), KD = /* @__PURE__ */ Z({
...WD,
props: UD,
emits: qD,
setup(e, { expose: t }) {
const n = e, r = ho();
Ji({
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"
}, _(() => !!r.title));
const o = H(), a = H(), i = pt("drawer"), { t: s } = go(), {
afterEnter: u,
afterLeave: l,
beforeLeave: c,
visible: d,
rendered: f,
titleId: h,
bodyId: p,
zIndex: v,
onModalClick: m,
onOpenAutoFocus: g,
onCloseAutoFocus: b,
onFocusoutPrevented: x,
onCloseRequested: w,
handleClose: C
} = HD(n, o), k = _(() => n.direction === "rtl" || n.direction === "ltr"), E = _(() => cl(n.size));
return t({
handleClose: C,
afterEnter: u,
afterLeave: l
}), (S, O) => (T(), ie(y(e3), {
to: S.appendTo,
disabled: S.appendTo !== "body" ? !1 : !S.appendToBody
}, {
default: G(() => [
ee(Kr, {
name: y(i).b("fade"),
onAfterEnter: y(u),
onAfterLeave: y(l),
onBeforeLeave: y(c),
persisted: ""
}, {
default: G(() => [
tt(ee(y(MD), {
mask: S.modal,
"overlay-class": S.modalClass,
"z-index": y(v),
onClick: y(m)
}, {
default: G(() => [
ee(y(JC), {
loop: "",
trapped: y(d),
"focus-trap-el": o.value,
"focus-start-el": a.value,
onFocusAfterTrapped: y(g),
onFocusAfterReleased: y(b),
onFocusoutPrevented: y(x),
onReleaseRequested: y(w)
}, {
default: G(() => [
Y("div", Xt({
ref_key: "drawerRef",
ref: o,
"aria-modal": "true",
"aria-label": S.title || void 0,
"aria-labelledby": S.title ? void 0 : y(h),
"aria-describedby": y(p)
}, S.$attrs, {
class: [y(i).b(), S.direction, y(d) && "open"],
style: y(k) ? "width: " + y(E) : "height: " + y(E),
role: "dialog",
onClick: it(() => {
}, ["stop"])
}), [
Y("span", {
ref_key: "focusStartRef",
ref: a,
class: W(y(i).e("sr-focus")),
tabindex: "-1"
}, null, 2),
S.withHeader ? (T(), B("header", {
key: 0,
class: W(y(i).e("header"))
}, [
S.$slots.title ? ve(S.$slots, "title", { key: 1 }, () => [
ne(" DEPRECATED SLOT ")
]) : ve(S.$slots, "header", {
key: 0,
close: y(C),
titleId: y(h),
titleClass: y(i).e("title")
}, () => [
S.$slots.title ? ne("v-if", !0) : (T(), B("span", {
key: 0,
id: y(h),
role: "heading",
"aria-level": S.headerAriaLevel,
class: W(y(i).e("title"))
}, Te(S.title), 11, ["id", "aria-level"]))
]),
S.showClose ? (T(), B("button", {
key: 2,
"aria-label": y(s)("el.drawer.close"),
class: W(y(i).e("close-btn")),
type: "button",
onClick: y(C)
}, [
ee(y(nn), {
class: W(y(i).e("close"))
}, {
default: G(() => [
ee(y(Wv))
]),
_: 1
}, 8, ["class"])
], 10, ["aria-label", "onClick"])) : ne("v-if", !0)
], 2)) : ne("v-if", !0),
y(f) ? (T(), B("div", {
key: 1,
id: y(p),
class: W(y(i).e("body"))
}, [
ve(S.$slots, "default")
], 10, ["id"])) : ne("v-if", !0),
S.$slots.footer ? (T(), B("div", {
key: 2,
class: W(y(i).e("footer"))
}, [
ve(S.$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"]), [
[Pt, y(d)]
])
]),
_: 3
}, 8, ["name", "onAfterEnter", "onAfterLeave", "onBeforeLeave"])
]),
_: 3
}, 8, ["to", "disabled"]));
}
});
var GD = /* @__PURE__ */ vt(KD, [["__file", "drawer.vue"]]);
const Kg = $n(GD), XD = /* @__PURE__ */ Z({
inheritAttrs: !1
});
function YD(e, t, n, r, o, a) {
return ve(e.$slots, "default");
}
var ZD = /* @__PURE__ */ vt(XD, [["render", YD], ["__file", "collection.vue"]]);
const JD = /* @__PURE__ */ Z({
name: "ElCollectionItem",
inheritAttrs: !1
});
function QD(e, t, n, r, o, a) {
return ve(e.$slots, "default");
}
var eR = /* @__PURE__ */ vt(JD, [["render", QD], ["__file", "collection-item.vue"]]);
const tR = "data-el-collection-item", nR = (e) => {
const t = `El${e}Collection`, n = `${t}Item`, r = Symbol(t), o = Symbol(n), a = {
...ZD,
name: t,
setup() {
const s = H(null), u = /* @__PURE__ */ new Map();
ft(r, {
itemMap: u,
getItems: () => {
const c = y(s);
if (!c)
return [];
const d = Array.from(c.querySelectorAll(`[${tR}]`));
return [...u.values()].sort((h, p) => d.indexOf(h.ref) - d.indexOf(p.ref));
},
collectionRef: s
});
}
}, i = {
...eR,
name: n,
setup(s, { attrs: u }) {
const l = H(null), c = $e(r, void 0);
ft(o, {
collectionItemRef: l
}), ht(() => {
const d = y(l);
d && c.itemMap.set(d, {
ref: d,
...u
});
}), Rt(() => {
const d = y(l);
c.itemMap.delete(d);
});
}
};
return {
COLLECTION_INJECTION_KEY: r,
COLLECTION_ITEM_INJECTION_KEY: o,
ElCollection: a,
ElCollectionItem: i
};
}, Wh = mt({
trigger: Zu.trigger,
effect: {
...Cr.effect,
default: "light"
},
type: {
type: et(String)
},
placement: {
type: et(String),
default: "bottom"
},
popperOptions: {
type: et(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: et([Number, String]),
default: 0
},
maxHeight: {
type: et([Number, String]),
default: ""
},
popperClass: {
type: String,
default: ""
},
disabled: Boolean,
role: {
type: String,
default: "menu"
},
buttonProps: {
type: et(Object)
},
teleported: Cr.teleported
});
mt({
command: {
type: [Object, String, Number],
default: () => ({})
},
disabled: Boolean,
divided: Boolean,
textValue: String,
icon: {
type: io
}
});
mt({
onKeydown: { type: et(Function) }
});
nR("Dropdown");
const _3 = Symbol("elPaginationKey"), rR = mt({
disabled: Boolean,
currentPage: {
type: Number,
default: 1
},
prevText: {
type: String
},
prevIcon: {
type: io
}
}), oR = {
click: (e) => e instanceof MouseEvent
}, aR = Z({
name: "ElPaginationPrev"
}), iR = /* @__PURE__ */ Z({
...aR,
props: rR,
emits: oR,
setup(e) {
const t = e, { t: n } = go(), r = _(() => t.disabled || t.currentPage <= 1);
return (o, a) => (T(), B("button", {
type: "button",
class: "btn-prev",
disabled: y(r),
"aria-label": o.prevText || y(n)("el.pagination.prev"),
"aria-disabled": y(r),
onClick: (i) => o.$emit("click", i)
}, [
o.prevText ? (T(), B("span", { key: 0 }, Te(o.prevText), 1)) : (T(), ie(y(nn), { key: 1 }, {
default: G(() => [
(T(), ie(_t(o.prevIcon)))
]),
_: 1
}))
], 8, ["disabled", "aria-label", "aria-disabled", "onClick"]));
}
});
var sR = /* @__PURE__ */ vt(iR, [["__file", "prev.vue"]]);
const lR = mt({
disabled: Boolean,
currentPage: {
type: Number,
default: 1
},
pageCount: {
type: Number,
default: 50
},
nextText: {
type: String
},
nextIcon: {
type: io
}
}), uR = Z({
name: "ElPaginationNext"
}), cR = /* @__PURE__ */ Z({
...uR,
props: lR,
emits: ["click"],
setup(e) {
const t = e, { t: n } = go(), r = _(() => t.disabled || t.currentPage === t.pageCount || t.pageCount === 0);
return (o, a) => (T(), B("button", {
type: "button",
class: "btn-next",
disabled: y(r),
"aria-label": o.nextText || y(n)("el.pagination.next"),
"aria-disabled": y(r),
onClick: (i) => o.$emit("click", i)
}, [
o.nextText ? (T(), B("span", { key: 0 }, Te(o.nextText), 1)) : (T(), ie(y(nn), { key: 1 }, {
default: G(() => [
(T(), ie(_t(o.nextIcon)))
]),
_: 1
}))
], 8, ["disabled", "aria-label", "aria-disabled", "onClick"]));
}
});
var dR = /* @__PURE__ */ vt(cR, [["__file", "next.vue"]]);
const T3 = Symbol("ElSelectGroup"), Ff = Symbol("ElSelect");
function pR(e, t) {
const n = $e(Ff), r = $e(T3, { disabled: !1 }), o = _(() => c(Za(n.props.modelValue), e.value)), a = _(() => {
var h;
if (n.props.multiple) {
const p = Za((h = n.props.modelValue) != null ? h : []);
return !o.value && p.length >= n.props.multipleLimit && n.props.multipleLimit > 0;
} else
return !1;
}), i = _(() => e.label || (zn(e.value) ? "" : e.value)), s = _(() => e.value || e.label || ""), u = _(() => e.disabled || t.groupDisabled || a.value), l = dt(), c = (h = [], p) => {
if (zn(e.value)) {
const v = n.props.valueKey;
return h && h.some((m) => ui(ma(m, v)) === ma(p, v));
} else
return h && h.includes(p);
}, d = () => {
!e.disabled && !r.disabled && (n.states.hoveringIndex = n.optionsArray.indexOf(l.proxy));
}, f = (h) => {
const p = new RegExp(QA(h), "i");
t.visible = p.test(i.value) || e.created;
};
return me(() => i.value, () => {
!e.created && !n.props.remote && n.setSelected();
}), me(() => e.value, (h, p) => {
const { remote: v, valueKey: m } = n.props;
if (h !== p && (n.onOptionDestroy(p, l.proxy), n.onOptionCreate(l.proxy)), !e.created && !v) {
if (m && zn(h) && zn(p) && h[m] === p[m])
return;
n.setSelected();
}
}), me(() => r.disabled, () => {
t.groupDisabled = r.disabled;
}, { immediate: !0 }), {
select: n,
currentLabel: i,
currentValue: s,
itemSelected: o,
isDisabled: u,
hoverItem: d,
updateOption: f
};
}
const fR = Z({
name: "ElOption",
componentName: "ElOption",
props: {
value: {
required: !0,
type: [String, Number, Boolean, Object]
},
label: [String, Number],
created: Boolean,
disabled: Boolean
},
setup(e) {
const t = pt("select"), n = pi(), r = _(() => [
t.be("dropdown", "item"),
t.is("disabled", y(s)),
t.is("selected", y(i)),
t.is("hovering", y(f))
]), o = pn({
index: -1,
groupDisabled: !1,
visible: !0,
hover: !1
}), {
currentLabel: a,
itemSelected: i,
isDisabled: s,
select: u,
hoverItem: l,
updateOption: c
} = pR(e, o), { visible: d, hover: f } = vo(o), h = dt().proxy;
u.onOptionCreate(h), Rt(() => {
const v = h.value, { selected: m } = u.states, b = (u.props.multiple ? m : [m]).some((x) => x.value === h.value);
Ge(() => {
u.states.cachedOptions.get(v) === h && !b && u.states.cachedOptions.delete(v);
}), u.onOptionDestroy(v, h);
});
function p() {
s.value || u.handleOptionSelect(h);
}
return {
ns: t,
id: n,
containerKls: r,
currentLabel: a,
itemSelected: i,
isDisabled: s,
select: u,
hoverItem: l,
updateOption: c,
visible: d,
hover: f,
selectOptionClick: p,
states: o
};
}
});
function hR(e, t, n, r, o, a) {
return tt((T(), B("li", {
id: e.id,
class: W(e.containerKls),
role: "option",
"aria-disabled": e.isDisabled || void 0,
"aria-selected": e.itemSelected,
onMouseenter: e.hoverItem,
onClick: it(e.selectOptionClick, ["stop"])
}, [
ve(e.$slots, "default", {}, () => [
Y("span", null, Te(e.currentLabel), 1)
])
], 42, ["id", "aria-disabled", "aria-selected", "onMouseenter", "onClick"])), [
[Pt, e.visible]
]);
}
var Gg = /* @__PURE__ */ vt(fR, [["render", hR], ["__file", "option.vue"]]);
const vR = Z({
name: "ElSelectDropdown",
componentName: "ElSelectDropdown",
setup() {
const e = $e(Ff), t = pt("select"), n = _(() => e.props.popperClass), r = _(() => e.props.multiple), o = _(() => e.props.fitInputWidth), a = H("");
function i() {
var s;
a.value = `${(s = e.selectRef) == null ? void 0 : s.offsetWidth}px`;
}
return ht(() => {
i(), qo(e.selectRef, i);
}), {
ns: t,
minWidth: a,
popperClass: n,
isMultiple: r,
isFitInputWidth: o
};
}
});
function gR(e, t, n, r, o, a) {
return T(), B("div", {
class: W([e.ns.b("dropdown"), e.ns.is("multiple", e.isMultiple), e.popperClass]),
style: lt({ [e.isFitInputWidth ? "width" : "minWidth"]: e.minWidth })
}, [
e.$slots.header ? (T(), B("div", {
key: 0,
class: W(e.ns.be("dropdown", "header"))
}, [
ve(e.$slots, "header")
], 2)) : ne("v-if", !0),
ve(e.$slots, "default"),
e.$slots.footer ? (T(), B("div", {
key: 1,
class: W(e.ns.be("dropdown", "footer"))
}, [
ve(e.$slots, "footer")
], 2)) : ne("v-if", !0)
], 6);
}
var mR = /* @__PURE__ */ vt(vR, [["render", gR], ["__file", "select-dropdown.vue"]]);
const yR = 11, bR = (e, t) => {
const { t: n } = go(), r = pi(), o = pt("select"), a = pt("input"), i = pn({
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 = H(null), u = H(null), l = H(null), c = H(null), d = H(null), f = H(null), h = H(null), p = H(null), v = H(null), m = H(null), g = H(null), b = H(null), {
isComposing: x,
handleCompositionStart: w,
handleCompositionUpdate: C,
handleCompositionEnd: k
} = Bg({
afterComposition: (K) => ce(K)
}), { wrapperRef: E, isFocused: S } = VC(d, {
beforeFocus() {
return I.value;
},
afterFocus() {
e.automaticDropdown && !O.value && (O.value = !0, i.menuVisibleOnFocus = !0);
},
beforeBlur(K) {
var he, ze;
return ((he = l.value) == null ? void 0 : he.isFocusInsideContent(K)) || ((ze = c.value) == null ? void 0 : ze.isFocusInsideContent(K));
},
afterBlur() {
O.value = !1, i.menuVisibleOnFocus = !1;
}
}), O = H(!1), F = H(), { form: $, formItem: A } = _i(), { inputId: L } = Ic(e, {
formItemContext: A
}), { valueOnClear: N, isEmptyValue: M } = UC(e), I = _(() => e.disabled || ($ == null ? void 0 : $.disabled)), z = _(() => br(e.modelValue) ? e.modelValue.length > 0 : !M(e.modelValue)), R = _(() => e.clearable && !I.value && i.inputHovering && z.value), q = _(() => e.remote && e.filterable && !e.remoteShowSuffix ? "" : e.suffixIcon), oe = _(() => o.is("reverse", q.value && O.value)), Q = _(() => (A == null ? void 0 : A.validateState) || ""), ae = _(() => bC[Q.value]), pe = _(() => e.remote ? 300 : 0), we = _(() => 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 && ke.value === 0 ? e.noMatchText || n("el.select.noMatch") : i.options.size === 0 ? e.noDataText || n("el.select.noData") : null), ke = _(() => fe.value.filter((K) => K.visible).length), fe = _(() => {
const K = Array.from(i.options.values()), he = [];
return i.optionValues.forEach((ze) => {
const ot = K.findIndex((yn) => yn.value === ze);
ot > -1 && he.push(K[ot]);
}), he.length >= K.length ? he : K;
}), ge = _(() => Array.from(i.cachedOptions.values())), J = _(() => {
const K = fe.value.filter((he) => !he.created).some((he) => he.currentLabel === i.inputValue);
return e.filterable && e.allowCreate && i.inputValue !== "" && !K;
}), te = () => {
e.filterable && Nn(e.filterMethod) || e.filterable && e.remote && Nn(e.remoteMethod) || fe.value.forEach((K) => {
var he;
(he = K.updateOption) == null || he.call(K, i.inputValue);
});
}, le = fi(), Ee = _(() => ["small"].includes(le.value) ? "small" : "default"), Ne = _({
get() {
return O.value && we.value !== !1;
},
set(K) {
O.value = K;
}
}), je = _(() => {
if (e.multiple && !ba(e.modelValue))
return Za(e.modelValue).length === 0 && !i.inputValue;
const K = br(e.modelValue) ? e.modelValue[0] : e.modelValue;
return e.filterable || ba(K) ? !i.inputValue : !0;
}), _e = _(() => {
var K;
const he = (K = e.placeholder) != null ? K : n("el.select.placeholder");
return e.multiple || !z.value ? he : i.selectedLabel;
}), De = _(() => Bv ? null : "mouseenter");
me(() => e.modelValue, (K, he) => {
e.multiple && e.filterable && !e.reserveKeyword && (i.inputValue = "", Ae("")), Ue(), !Yo(K, he) && e.validateEvent && (A == null || A.validate("change").catch((ze) => Sn(ze)));
}, {
flush: "post",
deep: !0
}), me(() => O.value, (K) => {
K ? Ae(i.inputValue) : (i.inputValue = "", i.previousQuery = null, i.isBeforeHide = !0), t("visible-change", K);
}), me(() => i.options.entries(), () => {
var K;
if (!on)
return;
const he = ((K = s.value) == null ? void 0 : K.querySelectorAll("input")) || [];
(!e.filterable && !e.defaultFirstOption && !ba(e.modelValue) || !Array.from(he).includes(document.activeElement)) && Ue(), e.defaultFirstOption && (e.filterable || e.remote) && ke.value && Be();
}, {
flush: "post"
}), me(() => i.hoveringIndex, (K) => {
Ut(K) && K > -1 ? F.value = fe.value[K] || {} : F.value = {}, fe.value.forEach((he) => {
he.hover = F.value === he;
});
}), vf(() => {
i.isBeforeHide || te();
});
const Ae = (K) => {
i.previousQuery === K || x.value || (i.previousQuery = K, e.filterable && Nn(e.filterMethod) ? e.filterMethod(K) : e.filterable && e.remote && Nn(e.remoteMethod) && e.remoteMethod(K), e.defaultFirstOption && (e.filterable || e.remote) && ke.value ? Ge(Be) : Ge(Me));
}, Be = () => {
const K = fe.value.filter((ot) => ot.visible && !ot.disabled && !ot.states.groupDisabled), he = K.find((ot) => ot.created), ze = K[0];
i.hoveringIndex = Se(fe.value, he || ze);
}, Ue = () => {
if (e.multiple)
i.selectedLabel = "";
else {
const he = br(e.modelValue) ? e.modelValue[0] : e.modelValue, ze = Ze(he);
i.selectedLabel = ze.currentLabel, i.selected = [ze];
return;
}
const K = [];
ba(e.modelValue) || Za(e.modelValue).forEach((he) => {
K.push(Ze(he));
}), i.selected = K;
}, Ze = (K) => {
let he;
const ze = Lh(K).toLowerCase() === "object", ot = Lh(K).toLowerCase() === "null", yn = Lh(K).toLowerCase() === "undefined";
for (let kn = i.cachedOptions.size - 1; kn >= 0; kn--) {
const un = ge.value[kn];
if (ze ? ma(un.value, e.valueKey) === ma(K, e.valueKey) : un.value === K) {
he = {
value: K,
currentLabel: un.currentLabel,
get isDisabled() {
return un.isDisabled;
}
};
break;
}
}
if (he)
return he;
const qn = ze ? K.label : !ot && !yn ? K : "";
return {
value: K,
currentLabel: qn
};
}, Me = () => {
i.hoveringIndex = fe.value.findIndex((K) => i.selected.some((he) => mn(he) === mn(K)));
}, rt = () => {
i.selectionWidth = u.value.getBoundingClientRect().width;
}, nt = () => {
i.calculatorWidth = f.value.getBoundingClientRect().width;
}, st = () => {
i.collapseItemWidth = g.value.getBoundingClientRect().width;
}, P = () => {
var K, he;
(he = (K = l.value) == null ? void 0 : K.updatePopper) == null || he.call(K);
}, j = () => {
var K, he;
(he = (K = c.value) == null ? void 0 : K.updatePopper) == null || he.call(K);
}, se = () => {
i.inputValue.length > 0 && !O.value && (O.value = !0), Ae(i.inputValue);
}, ce = (K) => {
if (i.inputValue = K.target.value, e.remote)
de();
else
return se();
}, de = lC(() => {
se();
}, pe.value), Oe = (K) => {
Yo(e.modelValue, K) || t(ls, K);
}, ye = (K) => WA(K, (he) => !i.disabledOptions.has(he)), Fe = (K) => {
if (e.multiple && K.code !== Fn.delete && K.target.value.length <= 0) {
const he = Za(e.modelValue).slice(), ze = ye(he);
if (ze < 0)
return;
const ot = he[ze];
he.splice(ze, 1), t(hn, he), Oe(he), t("remove-tag", ot);
}
}, Ye = (K, he) => {
const ze = i.selected.indexOf(he);
if (ze > -1 && !I.value) {
const ot = Za(e.modelValue).slice();
ot.splice(ze, 1), t(hn, ot), Oe(ot), t("remove-tag", he.value);
}
K.stopPropagation(), Vt();
}, Je = (K) => {
K.stopPropagation();
const he = e.multiple ? [] : N.value;
if (e.multiple)
for (const ze of i.selected)
ze.isDisabled && he.push(ze.value);
t(hn, he), Oe(he), i.hoveringIndex = -1, O.value = !1, t("clear"), Vt();
}, re = (K) => {
var he;
if (e.multiple) {
const ze = Za((he = e.modelValue) != null ? he : []).slice(), ot = Se(ze, K.value);
ot > -1 ? ze.splice(ot, 1) : (e.multipleLimit <= 0 || ze.length < e.multipleLimit) && ze.push(K.value), t(hn, ze), Oe(ze), K.created && Ae(""), e.filterable && !e.reserveKeyword && (i.inputValue = "");
} else
t(hn, K.value), Oe(K.value), O.value = !1;
Vt(), !O.value && Ge(() => {
be(K);
});
}, Se = (K = [], he) => {
if (!zn(he))
return K.indexOf(he);
const ze = e.valueKey;
let ot = -1;
return K.some((yn, qn) => ui(ma(yn, ze)) === ma(he, ze) ? (ot = qn, !0) : !1), ot;
}, be = (K) => {
var he, ze, ot, yn, qn;
const ir = br(K) ? K[0] : K;
let kn = null;
if (ir != null && ir.value) {
const un = fe.value.filter((Vo) => Vo.value === ir.value);
un.length > 0 && (kn = un[0].$el);
}
if (l.value && kn) {
const un = (yn = (ot = (ze = (he = l.value) == null ? void 0 : he.popperRef) == null ? void 0 : ze.contentRef) == null ? void 0 : ot.querySelector) == null ? void 0 : yn.call(ot, `.${o.be("dropdown", "wrap")}`);
un && hC(un, kn);
}
(qn = b.value) == null || qn.handleScroll();
}, Le = (K) => {
i.options.set(K.value, K), i.cachedOptions.set(K.value, K), K.disabled && i.disabledOptions.set(K.value, K);
}, Tt = (K, he) => {
i.options.get(K) === he && i.options.delete(K);
}, Ct = _(() => {
var K, he;
return (he = (K = l.value) == null ? void 0 : K.popperRef) == null ? void 0 : he.contentRef;
}), Dt = () => {
i.isBeforeHide = !1, Ge(() => be(i.selected));
}, Vt = () => {
var K;
(K = d.value) == null || K.focus();
}, qt = () => {
var K;
(K = d.value) == null || K.blur();
}, bn = (K) => {
Je(K);
}, an = () => {
O.value = !1, S.value && qt();
}, sn = () => {
i.inputValue.length > 0 ? i.inputValue = "" : O.value = !1;
}, wn = () => {
I.value || (Bv && (i.inputHovering = !0), i.menuVisibleOnFocus ? i.menuVisibleOnFocus = !1 : O.value = !O.value);
}, xn = () => {
O.value ? fe.value[i.hoveringIndex] && re(fe.value[i.hoveringIndex]) : wn();
}, mn = (K) => zn(K.value) ? ma(K.value, e.valueKey) : K.value, or = _(() => fe.value.filter((K) => K.visible).every((K) => K.disabled)), Hn = _(() => e.multiple ? e.collapseTags ? i.selected.slice(0, e.maxCollapseTags) : i.selected : []), Un = _(() => e.multiple ? e.collapseTags ? i.selected.slice(e.maxCollapseTags) : [] : []), Wt = (K) => {
if (!O.value) {
O.value = !0;
return;
}
if (!(i.options.size === 0 || i.filteredOptionsCount === 0 || x.value) && !or.value) {
K === "next" ? (i.hoveringIndex++, i.hoveringIndex === i.options.size && (i.hoveringIndex = 0)) : K === "prev" && (i.hoveringIndex--, i.hoveringIndex < 0 && (i.hoveringIndex = i.options.size - 1));
const he = fe.value[i.hoveringIndex];
(he.disabled === !0 || he.states.groupDisabled === !0 || !he.visible) && Wt(K), Ge(() => be(F.value));
}
}, ln = () => {
if (!u.value)
return 0;
const K = window.getComputedStyle(u.value);
return Number.parseFloat(K.gap || "6px");
}, fn = _(() => {
const K = ln();
return { maxWidth: `${g.value && e.maxCollapseTags === 1 ? i.selectionWidth - i.collapseItemWidth - K : i.selectionWidth}px` };
}), ar = _(() => ({ maxWidth: `${i.selectionWidth}px` })), zo = _(() => ({
width: `${Math.max(i.calculatorWidth, yR)}px`
}));
return qo(u, rt), qo(f, nt), qo(v, P), qo(E, P), qo(m, j), qo(g, st), ht(() => {
Ue();
}), {
inputId: L,
contentId: r,
nsSelect: o,
nsInput: a,
states: i,
isFocused: S,
expanded: O,
optionsArray: fe,
hoverOption: F,
selectSize: le,
filteredOptionsCount: ke,
resetCalculatorWidth: nt,
updateTooltip: P,
updateTagTooltip: j,
debouncedOnInputChange: de,
onInput: ce,
deletePrevTag: Fe,
deleteTag: Ye,
deleteSelected: Je,
handleOptionSelect: re,
scrollToOption: be,
hasModelValue: z,
shouldShowPlaceholder: je,
currentPlaceholder: _e,
mouseEnterEventName: De,
showClose: R,
iconComponent: q,
iconReverse: oe,
validateState: Q,
validateIcon: ae,
showNewOption: J,
updateOptions: te,
collapseTagSize: Ee,
setSelected: Ue,
selectDisabled: I,
emptyText: we,
handleCompositionStart: w,
handleCompositionUpdate: C,
handleCompositionEnd: k,
onOptionCreate: Le,
onOptionDestroy: Tt,
handleMenuEnter: Dt,
focus: Vt,
blur: qt,
handleClearClick: bn,
handleClickOutside: an,
handleEsc: sn,
toggleMenu: wn,
selectOption: xn,
getValueKey: mn,
navigateOptions: Wt,
dropdownMenuVisible: Ne,
showTagList: Hn,
collapseTagList: Un,
tagStyle: fn,
collapseTagStyle: ar,
inputStyle: zo,
popperRef: Ct,
inputRef: d,
tooltipRef: l,
tagTooltipRef: c,
calculatorRef: f,
prefixRef: h,
suffixRef: p,
selectRef: s,
wrapperRef: E,
selectionRef: u,
scrollbarRef: b,
menuRef: v,
tagMenuRef: m,
collapseItemRef: g
};
};
var wR = Z({
name: "ElOptions",
setup(e, { slots: t }) {
const n = $e(Ff);
let r = [];
return () => {
var o, a;
const i = (o = t.default) == null ? void 0 : o.call(t), s = [];
function u(l) {
br(l) && l.forEach((c) => {
var d, f, h, p;
const v = (d = (c == null ? void 0 : c.type) || {}) == null ? void 0 : d.name;
v === "ElOptionGroup" ? u(!Or(c.children) && !br(c.children) && Nn((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) : br(c.children) && u(c.children);
});
}
return i.length && u((a = i[0]) == null ? void 0 : a.children), Yo(s, r) || (r = s, n && (n.states.optionValues = s)), i;
};
}
});
const xR = mt({
name: String,
id: String,
modelValue: {
type: [Array, String, Number, Boolean, Object],
default: void 0
},
autocomplete: {
type: String,
default: "off"
},
automaticDropdown: Boolean,
size: Aa,
effect: {
type: et(String),
default: "light"
},
disabled: Boolean,
clearable: Boolean,
filterable: Boolean,
allowCreate: Boolean,
loading: Boolean,
popperClass: {
type: String,
default: ""
},
popperOptions: {
type: et(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: Cr.teleported,
persistent: {
type: Boolean,
default: !0
},
clearIcon: {
type: io,
default: Ef
},
fitInputWidth: Boolean,
suffixIcon: {
type: io,
default: _g
},
tagType: { ...Ju.type, default: "info" },
tagEffect: { ...Ju.effect, default: "light" },
validateEvent: {
type: Boolean,
default: !0
},
remoteShowSuffix: Boolean,
placement: {
type: et(String),
values: $c,
default: "bottom-start"
},
fallbackPlacements: {
type: et(Array),
default: ["bottom-start", "top-start", "right", "left"]
},
appendTo: String,
...HC,
...Si(["ariaLabel"])
}), hb = "ElSelect", kR = Z({
name: hb,
componentName: hb,
components: {
ElSelectMenu: mR,
ElOption: Gg,
ElOptions: wR,
ElTag: ml,
ElScrollbar: Vg,
ElTooltip: Ap,
ElIcon: nn
},
directives: { ClickOutside: o3 },
props: xR,
emits: [
hn,
ls,
"remove-tag",
"clear",
"visible-change",
"focus",
"blur"
],
setup(e, { emit: t }) {
const n = _(() => {
const { modelValue: a, multiple: i } = e, s = i ? [] : void 0;
return br(a) ? i ? a : s : i ? s : a;
}), r = pn({
...vo(e),
modelValue: n
}), o = bR(r, t);
return ft(Ff, pn({
props: r,
states: o.states,
optionsArray: o.optionsArray,
handleOptionSelect: o.handleOptionSelect,
onOptionCreate: o.onOptionCreate,
onOptionDestroy: o.onOptionDestroy,
selectRef: o.selectRef,
setSelected: o.setSelected
})), {
...o,
modelValue: n
};
}
});
function CR(e, t, n, r, o, a) {
const i = Et("el-tag"), s = Et("el-tooltip"), u = Et("el-icon"), l = Et("el-option"), c = Et("el-options"), d = Et("el-scrollbar"), f = Et("el-select-menu"), h = $k("click-outside");
return tt((T(), B("div", {
ref: "selectRef",
class: W([e.nsSelect.b(), e.nsSelect.m(e.selectSize)]),
[Ak(e.mouseEnterEventName)]: (p) => e.states.inputHovering = !0,
onMouseleave: (p) => e.states.inputHovering = !1
}, [
ee(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: G(() => {
var p;
return [
Y("div", {
ref: "wrapperRef",
class: W([
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: it(e.toggleMenu, ["prevent"])
}, [
e.$slots.prefix ? (T(), B("div", {
key: 0,
ref: "prefixRef",
class: W(e.nsSelect.e("prefix"))
}, [
ve(e.$slots, "prefix")
], 2)) : ne("v-if", !0),
Y("div", {
ref: "selectionRef",
class: W([
e.nsSelect.e("selection"),
e.nsSelect.is("near", e.multiple && !e.$slots.prefix && !!e.states.selected.length)
])
}, [
e.multiple ? ve(e.$slots, "tag", { key: 0 }, () => [
(T(!0), B(Qe, null, At(e.showTagList, (v) => (T(), B("div", {
key: e.getValueKey(v),
class: W(e.nsSelect.e("selected-item"))
}, [
ee(i, {
closable: !e.selectDisabled && !v.isDisabled,
size: e.collapseTagSize,
type: e.tagType,
effect: e.tagEffect,
"disable-transitions": "",
style: lt(e.tagStyle),
onClose: (m) => e.deleteTag(m, v)
}, {
default: G(() => [
Y("span", {
class: W(e.nsSelect.e("tags-text"))
}, [
ve(e.$slots, "label", {
label: v.currentLabel,
value: v.value
}, () => [
Ke(Te(v.currentLabel), 1)
])
], 2)
]),
_: 2
}, 1032, ["closable", "size", "type", "effect", "style", "onClose"])
], 2))), 128)),
e.collapseTags && e.states.selected.length > e.maxCollapseTags ? (T(), ie(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: G(() => [
Y("div", {
ref: "collapseItemRef",
class: W(e.nsSelect.e("selected-item"))
}, [
ee(i, {
closable: !1,
size: e.collapseTagSize,
type: e.tagType,
effect: e.tagEffect,
"disable-transitions": "",
style: lt(e.collapseTagStyle)
}, {
default: G(() => [
Y("span", {
class: W(e.nsSelect.e("tags-text"))
}, " + " + Te(e.states.selected.length - e.maxCollapseTags), 3)
]),
_: 1
}, 8, ["size", "type", "effect", "style"])
], 2)
]),
content: G(() => [
Y("div", {
ref: "tagMenuRef",
class: W(e.nsSelect.e("selection"))
}, [
(T(!0), B(Qe, null, At(e.collapseTagList, (v) => (T(), B("div", {
key: e.getValueKey(v),
class: W(e.nsSelect.e("selected-item"))
}, [
ee(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: G(() => [
Y("span", {
class: W(e.nsSelect.e("tags-text"))
}, [
ve(e.$slots, "label", {
label: v.currentLabel,
value: v.value
}, () => [
Ke(Te(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) : (T(), B("div", {
key: 1,
class: W([
e.nsSelect.e("selected-item"),
e.nsSelect.e("input-wrapper"),
e.nsSelect.is("hidden", !e.filterable)
])
}, [
tt(Y("input", {
id: e.inputId,
ref: "inputRef",
"onUpdate:modelValue": (v) => e.states.inputValue = v,
type: "text",
name: e.name,
class: W([e.nsSelect.e("input"), e.nsSelect.is(e.selectSize)]),
disabled: e.selectDisabled,
autocomplete: e.autocomplete,
style: lt(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: [
_r(it((v) => e.navigateOptions("next"), ["stop", "prevent"]), ["down"]),
_r(it((v) => e.navigateOptions("prev"), ["stop", "prevent"]), ["up"]),
_r(it(e.handleEsc, ["stop", "prevent"]), ["esc"]),
_r(it(e.selectOption, ["stop", "prevent"]), ["enter"]),
_r(it(e.deletePrevTag, ["stop"]), ["delete"])
],
onCompositionstart: e.handleCompositionStart,
onCompositionupdate: e.handleCompositionUpdate,
onCompositionend: e.handleCompositionEnd,
onInput: e.onInput,
onClick: it(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"]), [
[lg, e.states.inputValue]
]),
e.filterable ? (T(), B("span", {
key: 0,
ref: "calculatorRef",
"aria-hidden": "true",
class: W(e.nsSelect.e("input-calculator")),
textContent: Te(e.states.inputValue)
}, null, 10, ["textContent"])) : ne("v-if", !0)
], 2)),
e.shouldShowPlaceholder ? (T(), B("div", {
key: 2,
class: W([
e.nsSelect.e("selected-item"),
e.nsSelect.e("placeholder"),
e.nsSelect.is("transparent", !e.hasModelValue || e.expanded && !e.states.inputValue)
])
}, [
e.hasModelValue ? ve(e.$slots, "label", {
key: 0,
label: e.currentPlaceholder,
value: e.modelValue
}, () => [
Y("span", null, Te(e.currentPlaceholder), 1)
]) : (T(), B("span", { key: 1 }, Te(e.currentPlaceholder), 1))
], 2)) : ne("v-if", !0)
], 2),
Y("div", {
ref: "suffixRef",
class: W(e.nsSelect.e("suffix"))
}, [
e.iconComponent && !e.showClose ? (T(), ie(u, {
key: 0,
class: W([e.nsSelect.e("caret"), e.nsSelect.e("icon"), e.iconReverse])
}, {
default: G(() => [
(T(), ie(_t(e.iconComponent)))
]),
_: 1
}, 8, ["class"])) : ne("v-if", !0),
e.showClose && e.clearIcon ? (T(), ie(u, {
key: 1,
class: W([
e.nsSelect.e("caret"),
e.nsSelect.e("icon"),
e.nsSelect.e("clear")
]),
onClick: e.handleClearClick
}, {
default: G(() => [
(T(), ie(_t(e.clearIcon)))
]),
_: 1
}, 8, ["class", "onClick"])) : ne("v-if", !0),
e.validateState && e.validateIcon ? (T(), ie(u, {
key: 2,
class: W([e.nsInput.e("icon"), e.nsInput.e("validateIcon")])
}, {
default: G(() => [
(T(), ie(_t(e.validateIcon)))
]),
_: 1
}, 8, ["class"])) : ne("v-if", !0)
], 2)
], 10, ["onClick"])
];
}),
content: G(() => [
ee(f, { ref: "menuRef" }, {
default: G(() => [
e.$slots.header ? (T(), B("div", {
key: 0,
class: W(e.nsSelect.be("dropdown", "header")),
onClick: it(() => {
}, ["stop"])
}, [
ve(e.$slots, "header")
], 10, ["onClick"])) : ne("v-if", !0),
tt(ee(d, {
id: e.contentId,
ref: "scrollbarRef",
tag: "ul",
"wrap-class": e.nsSelect.be("dropdown", "wrap"),
"view-class": e.nsSelect.be("dropdown", "list"),
class: W([e.nsSelect.is("empty", e.filteredOptionsCount === 0)]),
role: "listbox",
"aria-label": e.ariaLabel,
"aria-orientation": "vertical"
}, {
default: G(() => [
e.showNewOption ? (T(), ie(l, {
key: 0,
value: e.states.inputValue,
created: !0
}, null, 8, ["value"])) : ne("v-if", !0),
ee(c, null, {
default: G(() => [
ve(e.$slots, "default")
]),
_: 3
})
]),
_: 3
}, 8, ["id", "wrap-class", "view-class", "class", "aria-label"]), [
[Pt, e.states.options.size > 0 && !e.loading]
]),
e.$slots.loading && e.loading ? (T(), B("div", {
key: 1,
class: W(e.nsSelect.be("dropdown", "loading"))
}, [
ve(e.$slots, "loading")
], 2)) : e.loading || e.filteredOptionsCount === 0 ? (T(), B("div", {
key: 2,
class: W(e.nsSelect.be("dropdown", "empty"))
}, [
ve(e.$slots, "empty", {}, () => [
Y("span", null, Te(e.emptyText), 1)
])
], 2)) : ne("v-if", !0),
e.$slots.footer ? (T(), B("div", {
key: 3,
class: W(e.nsSelect.be("dropdown", "footer")),
onClick: it(() => {
}, ["stop"])
}, [
ve(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 ER = /* @__PURE__ */ vt(kR, [["render", CR], ["__file", "select.vue"]]);
const SR = Z({
name: "ElOptionGroup",
componentName: "ElOptionGroup",
props: {
label: String,
disabled: Boolean
},
setup(e) {
const t = pt("select"), n = H(null), r = dt(), o = H([]);
ft(T3, pn({
...vo(e)
}));
const a = _(() => o.value.some((l) => l.visible === !0)), i = (l) => {
var c, d;
return ((c = l.type) == null ? void 0 : c.name) === "ElOption" && !!((d = l.component) != null && d.proxy);
}, s = (l) => {
const c = Za(l), 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;
}, u = () => {
o.value = s(r.subTree);
};
return ht(() => {
u();
}), FT(n, u, {
attributes: !0,
subtree: !0,
childList: !0
}), {
groupRef: n,
visible: a,
ns: t
};
}
});
function _R(e, t, n, r, o, a) {
return tt((T(), B("ul", {
ref: "groupRef",
class: W(e.ns.be("group", "wrap"))
}, [
Y("li", {
class: W(e.ns.be("group", "title"))
}, Te(e.label), 3),
Y("li", null, [
Y("ul", {
class: W(e.ns.b("group"))
}, [
ve(e.$slots, "default")
], 2)
])
], 2)), [
[Pt, e.visible]
]);
}
var O3 = /* @__PURE__ */ vt(SR, [["render", _R], ["__file", "option-group.vue"]]);
const Nc = $n(ER, {
Option: Gg,
OptionGroup: O3
}), If = Io(Gg);
Io(O3);
const Xg = () => $e(_3, {}), TR = mt({
pageSize: {
type: Number,
required: !0
},
pageSizes: {
type: et(Array),
default: () => Ja([10, 20, 30, 40, 50, 100])
},
popperClass: {
type: String
},
disabled: Boolean,
teleported: Boolean,
size: {
type: String,
values: Tf
},
appendSizeTo: String
}), OR = Z({
name: "ElPaginationSizes"
}), PR = /* @__PURE__ */ Z({
...OR,
props: TR,
emits: ["page-size-change"],
setup(e, { emit: t }) {
const n = e, { t: r } = go(), o = pt("pagination"), a = Xg(), i = H(n.pageSize);
me(() => n.pageSizes, (l, c) => {
if (!Yo(l, c) && Array.isArray(l)) {
const d = l.includes(n.pageSize) ? n.pageSize : n.pageSizes[0];
t("page-size-change", d);
}
}), me(() => n.pageSize, (l) => {
i.value = l;
});
const s = _(() => n.pageSizes);
function u(l) {
var c;
l !== i.value && (i.value = l, (c = a.handleSizeChange) == null || c.call(a, Number(l)));
}
return (l, c) => (T(), B("span", {
class: W(y(o).e("sizes"))
}, [
ee(y(Nc), {
"model-value": i.value,
disabled: l.disabled,
"popper-class": l.popperClass,
size: l.size,
teleported: l.teleported,
"validate-event": !1,
"append-to": l.appendSizeTo,
onChange: u
}, {
default: G(() => [
(T(!0), B(Qe, null, At(y(s), (d) => (T(), ie(y(If), {
key: d,
value: d,
label: d + y(r)("el.pagination.pagesize")
}, null, 8, ["value", "label"]))), 128))
]),
_: 1
}, 8, ["model-value", "disabled", "popper-class", "size", "teleported", "append-to"])
], 2));
}
});
var $R = /* @__PURE__ */ vt(PR, [["__file", "sizes.vue"]]);
const AR = mt({
size: {
type: String,
values: Tf
}
}), FR = Z({
name: "ElPaginationJumper"
}), IR = /* @__PURE__ */ Z({
...FR,
props: AR,
setup(e) {
const { t } = go(), n = pt("pagination"), { pageCount: r, disabled: o, currentPage: a, changeEvent: i } = Xg(), s = H(), u = _(() => {
var d;
return (d = s.value) != null ? d : a == null ? void 0 : a.value;
});
function l(d) {
s.value = d ? +d : "";
}
function c(d) {
d = Math.trunc(+d), i == null || i(d), s.value = void 0;
}
return (d, f) => (T(), B("span", {
class: W(y(n).e("jump")),
disabled: y(o)
}, [
Y("span", {
class: W([y(n).e("goto")])
}, Te(y(t)("el.pagination.goto")), 3),
ee(y($f), {
size: d.size,
class: W([y(n).e("editor"), y(n).is("in-pagination")]),
min: 1,
max: y(r),
disabled: y(o),
"model-value": y(u),
"validate-event": !1,
"aria-label": y(t)("el.pagination.page"),
type: "number",
"onUpdate:modelValue": l,
onChange: c
}, null, 8, ["size", "class", "max", "disabled", "model-value", "aria-label"]),
Y("span", {
class: W([y(n).e("classifier")])
}, Te(y(t)("el.pagination.pageClassifier")), 3)
], 10, ["disabled"]));
}
});
var NR = /* @__PURE__ */ vt(IR, [["__file", "jumper.vue"]]);
const LR = mt({
total: {
type: Number,
default: 1e3
}
}), DR = Z({
name: "ElPaginationTotal"
}), RR = /* @__PURE__ */ Z({
...DR,
props: LR,
setup(e) {
const { t } = go(), n = pt("pagination"), { disabled: r } = Xg();
return (o, a) => (T(), B("span", {
class: W(y(n).e("total")),
disabled: y(r)
}, Te(y(t)("el.pagination.total", {
total: o.total
})), 11, ["disabled"]));
}
});
var BR = /* @__PURE__ */ vt(RR, [["__file", "total.vue"]]);
const MR = mt({
currentPage: {
type: Number,
default: 1
},
pageCount: {
type: Number,
required: !0
},
pagerCount: {
type: Number,
default: 7
},
disabled: Boolean
}), zR = Z({
name: "ElPaginationPager"
}), VR = /* @__PURE__ */ Z({
...zR,
props: MR,
emits: ["change"],
setup(e, { emit: t }) {
const n = e, r = pt("pager"), o = pt("icon"), { t: a } = go(), i = H(!1), s = H(!1), u = H(!1), l = H(!1), c = H(!1), d = H(!1), f = _(() => {
const w = n.pagerCount, C = (w - 1) / 2, k = Number(n.currentPage), E = Number(n.pageCount);
let S = !1, O = !1;
E > w && (k > w - C && (S = !0), k < E - C && (O = !0));
const F = [];
if (S && !O) {
const $ = E - (w - 2);
for (let A = $; A < E; A++)
F.push(A);
} else if (!S && O)
for (let $ = 2; $ < w; $++)
F.push($);
else if (S && O) {
const $ = Math.floor(w / 2) - 1;
for (let A = k - $; A <= k + $; A++)
F.push(A);
} else
for (let $ = 2; $ < E; $++)
F.push($);
return F;
}), h = _(() => [
"more",
"btn-quickprev",
o.b(),
r.is("disabled", n.disabled)
]), p = _(() => [
"more",
"btn-quicknext",
o.b(),
r.is("disabled", n.disabled)
]), v = _(() => n.disabled ? -1 : 0);
vf(() => {
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 ? u.value = !0 : l.value = !0);
}
function g(w = !1) {
w ? c.value = !0 : d.value = !0;
}
function b(w) {
const C = w.target;
if (C.tagName.toLowerCase() === "li" && Array.from(C.classList).includes("number")) {
const k = Number(C.textContent);
k !== n.currentPage && t("change", k);
} else C.tagName.toLowerCase() === "li" && Array.from(C.classList).includes("more") && x(w);
}
function x(w) {
const C = w.target;
if (C.tagName.toLowerCase() === "ul" || n.disabled)
return;
let k = Number(C.textContent);
const E = n.pageCount, S = n.currentPage, O = n.pagerCount - 2;
C.className.includes("more") && (C.className.includes("quickprev") ? k = S - O : C.className.includes("quicknext") && (k = S + O)), Number.isNaN(+k) || (k < 1 && (k = 1), k > E && (k = E)), k !== S && t("change", k);
}
return (w, C) => (T(), B("ul", {
class: W(y(r).b()),
onClick: x,
onKeyup: _r(b, ["enter"])
}, [
w.pageCount > 0 ? (T(), B("li", {
key: 0,
class: W([[
y(r).is("active", w.currentPage === 1),
y(r).is("disabled", w.disabled)
], "number"]),
"aria-current": w.currentPage === 1,
"aria-label": y(a)("el.pagination.currentPage", { pager: 1 }),
tabindex: y(v)
}, " 1 ", 10, ["aria-current", "aria-label", "tabindex"])) : ne("v-if", !0),
i.value ? (T(), B("li", {
key: 1,
class: W(y(h)),
tabindex: y(v),
"aria-label": y(a)("el.pagination.prevPages", { pager: w.pagerCount - 2 }),
onMouseenter: (k) => m(!0),
onMouseleave: (k) => u.value = !1,
onFocus: (k) => g(!0),
onBlur: (k) => c.value = !1
}, [
(u.value || c.value) && !w.disabled ? (T(), ie(y(fF), { key: 0 })) : (T(), ie(y(I1), { key: 1 }))
], 42, ["tabindex", "aria-label", "onMouseenter", "onMouseleave", "onFocus", "onBlur"])) : ne("v-if", !0),
(T(!0), B(Qe, null, At(y(f), (k) => (T(), B("li", {
key: k,
class: W([[
y(r).is("active", w.currentPage === k),
y(r).is("disabled", w.disabled)
], "number"]),
"aria-current": w.currentPage === k,
"aria-label": y(a)("el.pagination.currentPage", { pager: k }),
tabindex: y(v)
}, Te(k), 11, ["aria-current", "aria-label", "tabindex"]))), 128)),
s.value ? (T(), B("li", {
key: 2,
class: W(y(p)),
tabindex: y(v),
"aria-label": y(a)("el.pagination.nextPages", { pager: w.pagerCount - 2 }),
onMouseenter: (k) => m(),
onMouseleave: (k) => l.value = !1,
onFocus: (k) => g(),
onBlur: (k) => d.value = !1
}, [
(l.value || d.value) && !w.disabled ? (T(), ie(y(vF), { key: 0 })) : (T(), ie(y(I1), { key: 1 }))
], 42, ["tabindex", "aria-label", "onMouseenter", "onMouseleave", "onFocus", "onBlur"])) : ne("v-if", !0),
w.pageCount > 1 ? (T(), B("li", {
key: 3,
class: W([[
y(r).is("active", w.currentPage === w.pageCount),
y(r).is("disabled", w.disabled)
], "number"]),
"aria-current": w.currentPage === w.pageCount,
"aria-label": y(a)("el.pagination.currentPage", { pager: w.pageCount }),
tabindex: y(v)
}, Te(w.pageCount), 11, ["aria-current", "aria-label", "tabindex"])) : ne("v-if", !0)
], 42, ["onKeyup"]));
}
});
var jR = /* @__PURE__ */ vt(VR, [["__file", "pager.vue"]]);
const mr = (e) => typeof e != "number", HR = mt({
pageSize: Number,
defaultPageSize: Number,
total: Number,
pageCount: Number,
pagerCount: {
type: Number,
validator: (e) => Ut(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: et(Array),
default: () => Ja([10, 20, 30, 40, 50, 100])
},
popperClass: {
type: String,
default: ""
},
prevText: {
type: String,
default: ""
},
prevIcon: {
type: io,
default: () => Tg
},
nextText: {
type: String,
default: ""
},
nextIcon: {
type: io,
default: () => Cf
},
teleported: {
type: Boolean,
default: !0
},
small: Boolean,
size: Aa,
background: Boolean,
disabled: Boolean,
hideOnSinglePage: Boolean,
appendSizeTo: String
}), UR = {
"update:current-page": (e) => Ut(e),
"update:page-size": (e) => Ut(e),
"size-change": (e) => Ut(e),
change: (e, t) => Ut(e) && Ut(t),
"current-change": (e) => Ut(e),
"prev-click": (e) => Ut(e),
"next-click": (e) => Ut(e)
}, vb = "ElPagination";
var qR = Z({
name: vb,
props: HR,
emits: UR,
setup(e, { emit: t, slots: n }) {
const { t: r } = go(), o = pt("pagination"), a = dt().vnode.props || {}, i = zC(), s = _(() => {
var C;
return e.small ? "small" : (C = e.size) != null ? C : i.value;
});
Ji({
from: "small",
replacement: "size",
version: "3.0.0",
scope: "el-pagination",
ref: "https://element-plus.org/zh-CN/component/pagination.html"
}, _(() => !!e.small));
const u = "onUpdate:currentPage" in a || "onUpdate:current-page" in a || "onCurrentChange" in a, l = "onUpdate:pageSize" in a || "onUpdate:page-size" in a || "onSizeChange" in a, c = _(() => {
if (mr(e.total) && mr(e.pageCount) || !mr(e.currentPage) && !u)
return !1;
if (e.layout.includes("sizes")) {
if (mr(e.pageCount)) {
if (!mr(e.total) && !mr(e.pageSize) && !l)
return !1;
} else if (!l)
return !1;
}
return !0;
}), d = H(mr(e.defaultPageSize) ? 10 : e.defaultPageSize), f = H(mr(e.defaultCurrentPage) ? 1 : e.defaultCurrentPage), h = _({
get() {
return mr(e.pageSize) ? d.value : e.pageSize;
},
set(C) {
mr(e.pageSize) && (d.value = C), l && (t("update:page-size", C), t("size-change", C));
}
}), p = _(() => {
let C = 0;
return mr(e.pageCount) ? mr(e.total) || (C = Math.max(1, Math.ceil(e.total / h.value))) : C = e.pageCount, C;
}), v = _({
get() {
return mr(e.currentPage) ? f.value : e.currentPage;
},
set(C) {
let k = C;
C < 1 ? k = 1 : C > p.value && (k = p.value), mr(e.currentPage) && (f.value = k), u && (t("update:current-page", k), t("current-change", k));
}
});
me(p, (C) => {
v.value > C && (v.value = C);
}), me([v, h], (C) => {
t("change", ...C);
}, { flush: "post" });
function m(C) {
v.value = C;
}
function g(C) {
h.value = C;
const k = p.value;
v.value > k && (v.value = k);
}
function b() {
e.disabled || (v.value -= 1, t("prev-click", v.value));
}
function x() {
e.disabled || (v.value += 1, t("next-click", v.value));
}
function w(C, k) {
C && (C.props || (C.props = {}), C.props.class = [C.props.class, k].join(" "));
}
return ft(_3, {
pageCount: p,
disabled: _(() => e.disabled),
currentPage: v,
changeEvent: m,
handleSizeChange: g
}), () => {
var C, k;
if (!c.value)
return Sn(vb, r("el.pagination.deprecationWarning")), null;
if (!e.layout || e.hideOnSinglePage && p.value <= 1)
return null;
const E = [], S = [], O = Kt("div", { class: o.e("rightwrapper") }, S), F = {
prev: Kt(sR, {
disabled: e.disabled,
currentPage: v.value,
prevText: e.prevText,
prevIcon: e.prevIcon,
onClick: b
}),
jumper: Kt(NR, {
size: s.value
}),
pager: Kt(jR, {
currentPage: v.value,
pageCount: p.value,
pagerCount: e.pagerCount,
onChange: m,
disabled: e.disabled
}),
next: Kt(dR, {
disabled: e.disabled,
currentPage: v.value,
pageCount: p.value,
nextText: e.nextText,
nextIcon: e.nextIcon,
onClick: x
}),
sizes: Kt($R, {
pageSize: h.value,
pageSizes: e.pageSizes,
popperClass: e.popperClass,
disabled: e.disabled,
teleported: e.teleported,
size: s.value,
appendSizeTo: e.appendSizeTo
}),
slot: (k = (C = n == null ? void 0 : n.default) == null ? void 0 : C.call(n)) != null ? k : null,
total: Kt(BR, { total: mr(e.total) ? 0 : e.total })
}, $ = e.layout.split(",").map((L) => L.trim());
let A = !1;
return $.forEach((L) => {
if (L === "->") {
A = !0;
return;
}
A ? S.push(F[L]) : E.push(F[L]);
}), w(E[0], o.is("first")), w(E[E.length - 1], o.is("last")), A && S.length > 0 && (w(S[0], o.is("first")), w(S[S.length - 1], o.is("last")), E.push(O)), Kt("div", {
class: [
o.b(),
o.is("background", e.background),
o.m(s.value)
]
}, E);
};
}
});
const P3 = $n(qR), WR = mt({
trigger: Zu.trigger,
placement: Wh.placement,
disabled: Zu.disabled,
visible: Cr.visible,
transition: Cr.transition,
popperOptions: Wh.popperOptions,
tabindex: Wh.tabindex,
content: Cr.content,
popperStyle: Cr.popperStyle,
popperClass: Cr.popperClass,
enterable: {
...Cr.enterable,
default: !0
},
effect: {
...Cr.effect,
default: "light"
},
teleported: Cr.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
}
}), KR = {
"update:visible": (e) => ea(e),
"before-enter": () => !0,
"before-leave": () => !0,
"after-enter": () => !0,
"after-leave": () => !0
}, GR = "onUpdate:visible", XR = Z({
name: "ElPopover"
}), YR = /* @__PURE__ */ Z({
...XR,
props: WR,
emits: KR,
setup(e, { expose: t, emit: n }) {
const r = e, o = _(() => r[GR]), a = pt("popover"), i = H(), s = _(() => {
var m;
return (m = y(i)) == null ? void 0 : m.popperRef;
}), u = _(() => [
{
width: cl(r.width)
},
r.popperStyle
]), l = _(() => [a.b(), r.popperClass, { [a.m("plain")]: !!r.content }]), c = _(() => r.transition === `${a.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) => (T(), ie(y(Ap), Xt({
ref_key: "tooltipRef",
ref: i
}, m.$attrs, {
trigger: m.trigger,
placement: m.placement,
disabled: m.disabled,
visible: m.visible,
transition: m.transition,
"popper-options": m.popperOptions,
tabindex: m.tabindex,
content: m.content,
offset: m.offset,
"show-after": m.showAfter,
"hide-after": m.hideAfter,
"auto-close": m.autoClose,
"show-arrow": m.showArrow,
"aria-label": m.title,
effect: m.effect,
enterable: m.enterable,
"popper-class": y(l),
"popper-style": y(u),
teleported: m.teleported,
persistent: m.persistent,
"gpu-acceleration": y(c),
"onUpdate:visible": y(o),
onBeforeShow: f,
onBeforeHide: h,
onShow: p,
onHide: v
}), {
content: G(() => [
m.title ? (T(), B("div", {
key: 0,
class: W(y(a).e("title")),
role: "title"
}, Te(m.title), 3)) : ne("v-if", !0),
ve(m.$slots, "default", {}, () => [
Ke(Te(m.content), 1)
])
]),
default: G(() => [
m.$slots.reference ? ve(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 ZR = /* @__PURE__ */ vt(YR, [["__file", "popover.vue"]]);
const gb = (e, t) => {
const n = t.arg || t.value, r = n == null ? void 0 : n.popperRef;
r && (r.triggerRef = e);
};
var JR = {
mounted(e, t) {
gb(e, t);
},
updated(e, t) {
gb(e, t);
}
};
const QR = "popover", eB = $F(JR, QR), Yg = $n(ZR, {
directive: eB
});
function tB(e) {
let t;
const n = H(!1), r = pn({
...e,
originalPosition: "",
originalOverflow: "",
visible: !1
});
function o(f) {
r.text = f;
}
function a() {
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()) : (Gu(f, h.bm("parent", "relative")), f.removeAttribute("loading-number")), Gu(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(u, 400), r.visible = !1, (f = e.closed) == null || f.call(e));
}
function u() {
if (!n.value)
return;
const f = r.parent;
n.value = !1, f.vLoadingAddClassList = void 0, a();
}
const l = Z({
name: "ElLoading",
setup(f, { expose: h }) {
const { ns: p, zIndex: v } = lI("loading");
return h({
ns: p,
zIndex: v
}), () => {
const m = r.spinner || r.svg, g = Kt("svg", {
class: "circular",
viewBox: r.svgViewBox ? r.svgViewBox : "0 0 50 50",
...m ? { innerHTML: m } : {}
}, [
Kt("circle", {
class: "path",
cx: "25",
cy: "25",
r: "20",
fill: "none"
})
]), b = r.text ? Kt("p", { class: p.b("text") }, [r.text]) : void 0;
return Kt(Kr, {
name: p.b("fade"),
onAfterLeave: u
}, {
default: G(() => [
tt(ee("div", {
style: {
backgroundColor: r.background || ""
},
class: [
p.b("mask"),
r.customClass,
r.fullscreen ? "is-fullscreen" : ""
]
}, [
Kt("div", {
class: p.b("spinner")
}, [g, b])
]), [[Pt, r.visible]])
])
});
};
}
}), c = ug(l), d = c.mount(document.createElement("div"));
return {
...vo(r),
setText: o,
removeElLoadingChild: i,
close: s,
handleAfterLeave: u,
vm: d,
get $el() {
return d.$el;
}
};
}
let wd;
const nB = function(e = {}) {
if (!on)
return;
const t = rB(e);
if (t.fullscreen && wd)
return wd;
const n = tB({
...t,
closed: () => {
var o;
(o = t.closed) == null || o.call(t), t.fullscreen && (wd = void 0);
}
});
oB(t, t.parent, n), mb(t, t.parent, n), t.parent.vLoadingAddClassList = () => mb(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), Ge(() => n.visible.value = t.visible), t.fullscreen && (wd = n), n;
}, rB = (e) => {
var t, n, r, o;
let a;
return Or(e.target) ? a = (t = document.querySelector(e.target)) != null ? t : document.body : a = e.target || document.body, {
parent: a === document.body || e.body ? document.body : a,
background: e.background || "",
svg: e.svg || "",
svgViewBox: e.svgViewBox || "",
spinner: e.spinner || !1,
text: e.text || "",
fullscreen: a === document.body && ((n = e.fullscreen) != null ? n : !0),
lock: (r = e.lock) != null ? r : !1,
customClass: e.customClass || "",
visible: (o = e.visible) != null ? o : !0,
beforeClose: e.beforeClose,
closed: e.closed,
target: a
};
}, oB = async (e, t, n) => {
const { nextZIndex: r } = n.vm.zIndex || n.vm._.exposed.zIndex, o = {};
if (e.fullscreen)
n.originalPosition.value = Xs(document.body, "position"), n.originalOverflow.value = Xs(document.body, "overflow"), o.zIndex = r();
else if (e.parent === document.body) {
n.originalPosition.value = Xs(document.body, "position"), await Ge();
for (const a of ["top", "left"]) {
const i = a === "top" ? "scrollTop" : "scrollLeft";
o[a] = `${e.target.getBoundingClientRect()[a] + document.body[i] + document.documentElement[i] - Number.parseInt(Xs(document.body, `margin-${a}`), 10)}px`;
}
for (const a of ["height", "width"])
o[a] = `${e.target.getBoundingClientRect()[a]}px`;
} else
n.originalPosition.value = Xs(t, "position");
for (const [a, i] of Object.entries(o))
n.$el.style[a] = i;
}, mb = (e, t, n) => {
const r = n.vm.ns || n.vm._.exposed.ns;
["absolute", "fixed", "sticky"].includes(n.originalPosition.value) ? Gu(t, r.bm("parent", "relative")) : qv(t, r.bm("parent", "relative")), e.fullscreen && e.lock ? qv(t, r.bm("parent", "hidden")) : Gu(t, r.bm("parent", "hidden"));
}, tp = Symbol("ElLoading"), yb = (e, t) => {
var n, r, o, a;
const i = t.instance, s = (f) => zn(t.value) ? t.value[f] : void 0, u = (f) => {
const h = Or(f) && (i == null ? void 0 : i[f]) || f;
return h && H(h);
}, l = (f) => u(s(f) || e.getAttribute(`element-loading-${WT(f)}`)), c = (n = s("fullscreen")) != null ? n : t.modifiers.fullscreen, d = {
text: l("text"),
svg: l("svg"),
svgViewBox: l("svgViewBox"),
spinner: l("spinner"),
background: l("background"),
customClass: l("customClass"),
fullscreen: c,
target: (r = s("target")) != null ? r : c ? void 0 : e,
body: (o = s("body")) != null ? o : t.modifiers.body,
lock: (a = s("lock")) != null ? a : t.modifiers.lock
};
e[tp] = {
options: d,
instance: nB(d)
};
}, aB = (e, t) => {
for (const n of Object.keys(t))
Vn(t[n]) && (t[n].value = e[n]);
}, Nf = {
mounted(e, t) {
t.value && yb(e, t);
},
updated(e, t) {
const n = e[tp];
t.oldValue !== t.value && (t.value && !t.oldValue ? yb(e, t) : t.value && t.oldValue ? zn(t.value) && aB(t.value, n.options) : n == null || n.instance.close());
},
unmounted(e) {
var t;
(t = e[tp]) == null || t.instance.close(), e[tp] = null;
}
}, Lo = (e, t) => {
const n = e.__vccOpts || e;
for (const [r, o] of t)
n[r] = o;
return n;
}, iB = {
name: "BadgesGroup",
components: { Button: Gr },
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);
}
}
}
}, sB = (e) => (ki("data-v-da8a77c1"), e = e(), Ci(), e), lB = {
key: 0,
class: "container",
ref: "container"
}, uB = /* @__PURE__ */ sB(() => /* @__PURE__ */ Y("div", null, "View data types:", -1));
function cB(e, t, n, r, o, a) {
const i = Gr;
return e.categories.All.size > 1 ? (T(), B("div", lB, [
uB,
(T(!0), B(Qe, null, At(e.categories, (s, u) => (T(), B(Qe, null, [
s.size > 0 ? (T(), ie(i, {
class: W([{ active: u == e.active }, "tag-button"]),
onClick: (l) => a.categoryClicked(u),
size: "small",
key: u
}, {
default: G(() => [
Ke(Te(u + " (" + s.size + ")"), 1)
]),
_: 2
}, 1032, ["class", "onClick"])) : ne("", !0)
], 64))), 256))
], 512)) : ne("", !0);
}
const $3 = /* @__PURE__ */ Lo(iB, [["render", cB], ["__scopeId", "data-v-da8a77c1"]]);
function A3(e, t) {
return function() {
return e.apply(t, arguments);
};
}
const { toString: dB } = Object.prototype, { getPrototypeOf: Zg } = Object, Lf = /* @__PURE__ */ ((e) => (t) => {
const n = dB.call(t);
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
})(/* @__PURE__ */ Object.create(null)), Do = (e) => (e = e.toLowerCase(), (t) => Lf(t) === e), Df = (e) => (t) => typeof t === e, { isArray: Bl } = Array, Qu = Df("undefined");
function pB(e) {
return e !== null && !Qu(e) && e.constructor !== null && !Qu(e.constructor) && Hr(e.constructor.isBuffer) && e.constructor.isBuffer(e);
}
const F3 = Do("ArrayBuffer");
function fB(e) {
let t;
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && F3(e.buffer), t;
}
const hB = Df("string"), Hr = Df("function"), I3 = Df("number"), Rf = (e) => e !== null && typeof e == "object", vB = (e) => e === !0 || e === !1, np = (e) => {
if (Lf(e) !== "object")
return !1;
const t = Zg(e);
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e);
}, gB = Do("Date"), mB = Do("File"), yB = Do("Blob"), bB = Do("FileList"), wB = (e) => Rf(e) && Hr(e.pipe), xB = (e) => {
let t;
return e && (typeof FormData == "function" && e instanceof FormData || Hr(e.append) && ((t = Lf(e)) === "formdata" || // detect form-data instance
t === "object" && Hr(e.toString) && e.toString() === "[object FormData]"));
}, kB = Do("URLSearchParams"), [CB, EB, SB, _B] = ["ReadableStream", "Request", "Response", "Headers"].map(Do), TB = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
function Lc(e, t, { allOwnKeys: n = !1 } = {}) {
if (e === null || typeof e > "u")
return;
let r, o;
if (typeof e != "object" && (e = [e]), Bl(e))
for (r = 0, o = e.length; r < o; r++)
t.call(null, e[r], r, e);
else {
const a = n ? Object.getOwnPropertyNames(e) : Object.keys(e), i = a.length;
let s;
for (r = 0; r < i; r++)
s = a[r], t.call(null, e[s], s, e);
}
}
function N3(e, t) {
t = t.toLowerCase();
const n = Object.keys(e);
let r = n.length, o;
for (; r-- > 0; )
if (o = n[r], t === o.toLowerCase())
return o;
return null;
}
const qi = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, L3 = (e) => !Qu(e) && e !== qi;
function Qv() {
const { caseless: e } = L3(this) && this || {}, t = {}, n = (r, o) => {
const a = e && N3(t, o) || o;
np(t[a]) && np(r) ? t[a] = Qv(t[a], r) : np(r) ? t[a] = Qv({}, r) : Bl(r) ? t[a] = r.slice() : t[a] = r;
};
for (let r = 0, o = arguments.length; r < o; r++)
arguments[r] && Lc(arguments[r], n);
return t;
}
const OB = (e, t, n, { allOwnKeys: r } = {}) => (Lc(t, (o, a) => {
n && Hr(o) ? e[a] = A3(o, n) : e[a] = o;
}, { allOwnKeys: r }), e), PB = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), $B = (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);
}, AB = (e, t, n, r) => {
let o, a, i;
const s = {};
if (t = t || {}, e == null) return t;
do {
for (o = Object.getOwnPropertyNames(e), a = o.length; a-- > 0; )
i = o[a], (!r || r(i, e, t)) && !s[i] && (t[i] = e[i], s[i] = !0);
e = n !== !1 && Zg(e);
} while (e && (!n || n(e, t)) && e !== Object.prototype);
return t;
}, FB = (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;
}, IB = (e) => {
if (!e) return null;
if (Bl(e)) return e;
let t = e.length;
if (!I3(t)) return null;
const n = new Array(t);
for (; t-- > 0; )
n[t] = e[t];
return n;
}, NB = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && Zg(Uint8Array)), LB = (e, t) => {
const r = (e && e[Symbol.iterator]).call(e);
let o;
for (; (o = r.next()) && !o.done; ) {
const a = o.value;
t.call(e, a[0], a[1]);
}
}, DB = (e, t) => {
let n;
const r = [];
for (; (n = e.exec(t)) !== null; )
r.push(n);
return r;
}, RB = Do("HTMLFormElement"), BB = (e) => e.toLowerCase().replace(
/[-_\s]([a-z\d])(\w*)/g,
function(n, r, o) {
return r.toUpperCase() + o;
}
), bb = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), MB = Do("RegExp"), D3 = (e, t) => {
const n = Object.getOwnPropertyDescriptors(e), r = {};
Lc(n, (o, a) => {
let i;
(i = t(o, a, e)) !== !1 && (r[a] = i || o);
}), Object.defineProperties(e, r);
}, zB = (e) => {
D3(e, (t, n) => {
if (Hr(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
return !1;
const r = e[n];
if (Hr(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 + "'");
});
}
});
}, VB = (e, t) => {
const n = {}, r = (o) => {
o.forEach((a) => {
n[a] = !0;
});
};
return Bl(e) ? r(e) : r(String(e).split(t)), n;
}, jB = () => {
}, HB = (e, t) => e != null && Number.isFinite(e = +e) ? e : t, Kh = "abcdefghijklmnopqrstuvwxyz", wb = "0123456789", R3 = {
DIGIT: wb,
ALPHA: Kh,
ALPHA_DIGIT: Kh + Kh.toUpperCase() + wb
}, UB = (e = 16, t = R3.ALPHA_DIGIT) => {
let n = "";
const { length: r } = t;
for (; e--; )
n += t[Math.random() * r | 0];
return n;
};
function qB(e) {
return !!(e && Hr(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator]);
}
const WB = (e) => {
const t = new Array(10), n = (r, o) => {
if (Rf(r)) {
if (t.indexOf(r) >= 0)
return;
if (!("toJSON" in r)) {
t[o] = r;
const a = Bl(r) ? [] : {};
return Lc(r, (i, s) => {
const u = n(i, o + 1);
!Qu(u) && (a[s] = u);
}), t[o] = void 0, a;
}
}
return r;
};
return n(e, 0);
}, KB = Do("AsyncFunction"), GB = (e) => e && (Rf(e) || Hr(e)) && Hr(e.then) && Hr(e.catch), B3 = ((e, t) => e ? setImmediate : t ? ((n, r) => (qi.addEventListener("message", ({ source: o, data: a }) => {
o === qi && a === n && r.length && r.shift()();
}, !1), (o) => {
r.push(o), qi.postMessage(n, "*");
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
typeof setImmediate == "function",
Hr(qi.postMessage)
), XB = typeof queueMicrotask < "u" ? queueMicrotask.bind(qi) : typeof process < "u" && process.nextTick || B3, Ce = {
isArray: Bl,
isArrayBuffer: F3,
isBuffer: pB,
isFormData: xB,
isArrayBufferView: fB,
isString: hB,
isNumber: I3,
isBoolean: vB,
isObject: Rf,
isPlainObject: np,
isReadableStream: CB,
isRequest: EB,
isResponse: SB,
isHeaders: _B,
isUndefined: Qu,
isDate: gB,
isFile: mB,
isBlob: yB,
isRegExp: MB,
isFunction: Hr,
isStream: wB,
isURLSearchParams: kB,
isTypedArray: NB,
isFileList: bB,
forEach: Lc,
merge: Qv,
extend: OB,
trim: TB,
stripBOM: PB,
inherits: $B,
toFlatObject: AB,
kindOf: Lf,
kindOfTest: Do,
endsWith: FB,
toArray: IB,
forEachEntry: LB,
matchAll: DB,
isHTMLForm: RB,
hasOwnProperty: bb,
hasOwnProp: bb,
// an alias to avoid ESLint no-prototype-builtins detection
reduceDescriptors: D3,
freezeMethods: zB,
toObjectSet: VB,
toCamelCase: BB,
noop: jB,
toFiniteNumber: HB,
findKey: N3,
global: qi,
isContextDefined: L3,
ALPHABET: R3,
generateString: UB,
isSpecCompliantForm: qB,
toJSONObject: WB,
isAsyncFn: KB,
isThenable: GB,
setImmediate: B3,
asap: XB
};
function xt(e, t, n, r, o) {
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), n && (this.config = n), r && (this.request = r), o && (this.response = o);
}
Ce.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: Ce.toJSONObject(this.config),
code: this.code,
status: this.response && this.response.status ? this.response.status : null
};
}
});
const M3 = xt.prototype, z3 = {};
[
"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) => {
z3[e] = { value: e };
});
Object.defineProperties(xt, z3);
Object.defineProperty(M3, "isAxiosError", { value: !0 });
xt.from = (e, t, n, r, o, a) => {
const i = Object.create(M3);
return Ce.toFlatObject(e, i, function(u) {
return u !== Error.prototype;
}, (s) => s !== "isAxiosError"), xt.call(i, e.message, t, n, r, o), i.cause = e, i.name = e.name, a && Object.assign(i, a), i;
};
const YB = null;
function e0(e) {
return Ce.isPlainObject(e) || Ce.isArray(e);
}
function V3(e) {
return Ce.endsWith(e, "[]") ? e.slice(0, -2) : e;
}
function xb(e, t, n) {
return e ? e.concat(t).map(function(o, a) {
return o = V3(o), !n && a ? "[" + o + "]" : o;
}).join(n ? "." : "") : t;
}
function ZB(e) {
return Ce.isArray(e) && !e.some(e0);
}
const JB = Ce.toFlatObject(Ce, {}, null, function(t) {
return /^is[A-Z]/.test(t);
});
function Bf(e, t, n) {
if (!Ce.isObject(e))
throw new TypeError("target must be an object");
t = t || new FormData(), n = Ce.toFlatObject(n, {
metaTokens: !0,
dots: !1,
indexes: !1
}, !1, function(v, m) {
return !Ce.isUndefined(m[v]);
});
const r = n.metaTokens, o = n.visitor || c, a = n.dots, i = n.indexes, u = (n.Blob || typeof Blob < "u" && Blob) && Ce.isSpecCompliantForm(t);
if (!Ce.isFunction(o))
throw new TypeError("visitor must be a function");
function l(p) {
if (p === null) return "";
if (Ce.isDate(p))
return p.toISOString();
if (!u && Ce.isBlob(p))
throw new xt("Blob is not supported. Use a Buffer instead.");
return Ce.isArrayBuffer(p) || Ce.isTypedArray(p) ? u && typeof Blob == "function" ? new Blob([p]) : Buffer.from(p) : p;
}
function c(p, v, m) {
let g = p;
if (p && !m && typeof p == "object") {
if (Ce.endsWith(v, "{}"))
v = r ? v : v.slice(0, -2), p = JSON.stringify(p);
else if (Ce.isArray(p) && ZB(p) || (Ce.isFileList(p) || Ce.endsWith(v, "[]")) && (g = Ce.toArray(p)))
return v = V3(v), g.forEach(function(x, w) {
!(Ce.isUndefined(x) || x === null) && t.append(
// eslint-disable-next-line no-nested-ternary
i === !0 ? xb([v], w, a) : i === null ? v : v + "[]",
l(x)
);
}), !1;
}
return e0(p) ? !0 : (t.append(xb(m, v, a), l(p)), !1);
}
const d = [], f = Object.assign(JB, {
defaultVisitor: c,
convertValue: l,
isVisitable: e0
});
function h(p, v) {
if (!Ce.isUndefined(p)) {
if (d.indexOf(p) !== -1)
throw Error("Circular reference detected in " + v.join("."));
d.push(p), Ce.forEach(p, function(g, b) {
(!(Ce.isUndefined(g) || g === null) && o.call(
t,
g,
Ce.isString(b) ? b.trim() : b,
v,
f
)) === !0 && h(g, v ? v.concat(b) : [b]);
}), d.pop();
}
}
if (!Ce.isObject(e))
throw new TypeError("data must be an object");
return h(e), t;
}
function kb(e) {
const t = {
"!": "%21",
"'": "%27",
"(": "%28",
")": "%29",
"~": "%7E",
"%20": "+",
"%00": "\0"
};
return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(r) {
return t[r];
});
}
function Jg(e, t) {
this._pairs = [], e && Bf(e, this, t);
}
const j3 = Jg.prototype;
j3.append = function(t, n) {
this._pairs.push([t, n]);
};
j3.toString = function(t) {
const n = t ? function(r) {
return t.call(this, r, kb);
} : kb;
return this._pairs.map(function(o) {
return n(o[0]) + "=" + n(o[1]);
}, "").join("&");
};
function QB(e) {
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
}
function H3(e, t, n) {
if (!t)
return e;
const r = n && n.encode || QB, o = n && n.serialize;
let a;
if (o ? a = o(t, n) : a = Ce.isURLSearchParams(t) ? t.toString() : new Jg(t, n).toString(r), a) {
const i = e.indexOf("#");
i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + a;
}
return e;
}
class Cb {
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) {
Ce.forEach(this.handlers, function(r) {
r !== null && t(r);
});
}
}
const U3 = {
silentJSONParsing: !0,
forcedJSONParsing: !0,
clarifyTimeoutError: !1
}, eM = typeof URLSearchParams < "u" ? URLSearchParams : Jg, tM = typeof FormData < "u" ? FormData : null, nM = typeof Blob < "u" ? Blob : null, rM = {
isBrowser: !0,
classes: {
URLSearchParams: eM,
FormData: tM,
Blob: nM
},
protocols: ["http", "https", "file", "blob", "url", "data"]
}, Qg = typeof window < "u" && typeof document < "u", oM = ((e) => Qg && ["ReactNative", "NativeScript", "NS"].indexOf(e) < 0)(typeof navigator < "u" && navigator.product), aM = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", iM = Qg && window.location.href || "http://localhost", sM = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
__proto__: null,
hasBrowserEnv: Qg,
hasStandardBrowserEnv: oM,
hasStandardBrowserWebWorkerEnv: aM,
origin: iM
}, Symbol.toStringTag, { value: "Module" })), Oo = {
...sM,
...rM
};
function lM(e, t) {
return Bf(e, new Oo.classes.URLSearchParams(), Object.assign({
visitor: function(n, r, o, a) {
return Oo.isNode && Ce.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : a.defaultVisitor.apply(this, arguments);
}
}, t));
}
function uM(e) {
return Ce.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
}
function cM(e) {
const t = {}, n = Object.keys(e);
let r;
const o = n.length;
let a;
for (r = 0; r < o; r++)
a = n[r], t[a] = e[a];
return t;
}
function q3(e) {
function t(n, r, o, a) {
let i = n[a++];
if (i === "__proto__") return !0;
const s = Number.isFinite(+i), u = a >= n.length;
return i = !i && Ce.isArray(o) ? o.length : i, u ? (Ce.hasOwnProp(o, i) ? o[i] = [o[i], r] : o[i] = r, !s) : ((!o[i] || !Ce.isObject(o[i])) && (o[i] = []), t(n, r, o[i], a) && Ce.isArray(o[i]) && (o[i] = cM(o[i])), !s);
}
if (Ce.isFormData(e) && Ce.isFunction(e.entries)) {
const n = {};
return Ce.forEachEntry(e, (r, o) => {
t(uM(r), o, n, 0);
}), n;
}
return null;
}
function dM(e, t, n) {
if (Ce.isString(e))
try {
return (t || JSON.parse)(e), Ce.trim(e);
} catch (r) {
if (r.name !== "SyntaxError")
throw r;
}
return (0, JSON.stringify)(e);
}
const Dc = {
transitional: U3,
adapter: ["xhr", "http", "fetch"],
transformRequest: [function(t, n) {
const r = n.getContentType() || "", o = r.indexOf("application/json") > -1, a = Ce.isObject(t);
if (a && Ce.isHTMLForm(t) && (t = new FormData(t)), Ce.isFormData(t))
return o ? JSON.stringify(q3(t)) : t;
if (Ce.isArrayBuffer(t) || Ce.isBuffer(t) || Ce.isStream(t) || Ce.isFile(t) || Ce.isBlob(t) || Ce.isReadableStream(t))
return t;
if (Ce.isArrayBufferView(t))
return t.buffer;
if (Ce.isURLSearchParams(t))
return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
let s;
if (a) {
if (r.indexOf("application/x-www-form-urlencoded") > -1)
return lM(t, this.formSerializer).toString();
if ((s = Ce.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
const u = this.env && this.env.FormData;
return Bf(
s ? { "files[]": t } : t,
u && new u(),
this.formSerializer
);
}
}
return a || o ? (n.setContentType("application/json", !1), dM(t)) : t;
}],
transformResponse: [function(t) {
const n = this.transitional || Dc.transitional, r = n && n.forcedJSONParsing, o = this.responseType === "json";
if (Ce.isResponse(t) || Ce.isReadableStream(t))
return t;
if (t && Ce.isString(t) && (r && !this.responseType || o)) {
const i = !(n && n.silentJSONParsing) && o;
try {
return JSON.parse(t);
} catch (s) {
if (i)
throw s.name === "SyntaxError" ? xt.from(s, xt.ERR_BAD_RESPONSE, this, null, this.response) : s;
}
}
return t;
}],
/**
* A timeout in milliseconds to abort a request. If set to 0 (default) a
* timeout is not created.
*/
timeout: 0,
xsrfCookieName: "XSRF-TOKEN",
xsrfHeaderName: "X-XSRF-TOKEN",
maxContentLength: -1,
maxBodyLength: -1,
env: {
FormData: Oo.classes.FormData,
Blob: Oo.classes.Blob
},
validateStatus: function(t) {
return t >= 200 && t < 300;
},
headers: {
common: {
Accept: "application/json, text/plain, */*",
"Content-Type": void 0
}
}
};
Ce.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
Dc.headers[e] = {};
});
const pM = Ce.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"
]), fM = (e) => {
const t = {};
let n, r, o;
return e && e.split(`
`).forEach(function(i) {
o = i.indexOf(":"), n = i.substring(0, o).trim().toLowerCase(), r = i.substring(o + 1).trim(), !(!n || t[n] && pM[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
}), t;
}, Eb = Symbol("internals");
function lu(e) {
return e && String(e).trim().toLowerCase();
}
function rp(e) {
return e === !1 || e == null ? e : Ce.isArray(e) ? e.map(rp) : String(e);
}
function hM(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 vM = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
function Gh(e, t, n, r, o) {
if (Ce.isFunction(r))
return r.call(this, t, n);
if (o && (t = n), !!Ce.isString(t)) {
if (Ce.isString(r))
return t.indexOf(r) !== -1;
if (Ce.isRegExp(r))
return r.test(t);
}
}
function gM(e) {
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
}
function mM(e, t) {
const n = Ce.toCamelCase(" " + t);
["get", "set", "has"].forEach((r) => {
Object.defineProperty(e, r + n, {
value: function(o, a, i) {
return this[r].call(this, t, o, a, i);
},
configurable: !0
});
});
}
class Ar {
constructor(t) {
t && this.set(t);
}
set(t, n, r) {
const o = this;
function a(s, u, l) {
const c = lu(u);
if (!c)
throw new Error("header name must be a non-empty string");
const d = Ce.findKey(o, c);
(!d || o[d] === void 0 || l === !0 || l === void 0 && o[d] !== !1) && (o[d || u] = rp(s));
}
const i = (s, u) => Ce.forEach(s, (l, c) => a(l, c, u));
if (Ce.isPlainObject(t) || t instanceof this.constructor)
i(t, n);
else if (Ce.isString(t) && (t = t.trim()) && !vM(t))
i(fM(t), n);
else if (Ce.isHeaders(t))
for (const [s, u] of t.entries())
a(u, s, r);
else
t != null && a(n, t, r);
return this;
}
get(t, n) {
if (t = lu(t), t) {
const r = Ce.findKey(this, t);
if (r) {
const o = this[r];
if (!n)
return o;
if (n === !0)
return hM(o);
if (Ce.isFunction(n))
return n.call(this, o, r);
if (Ce.isRegExp(n))
return n.exec(o);
throw new TypeError("parser must be boolean|regexp|function");
}
}
}
has(t, n) {
if (t = lu(t), t) {
const r = Ce.findKey(this, t);
return !!(r && this[r] !== void 0 && (!n || Gh(this, this[r], r, n)));
}
return !1;
}
delete(t, n) {
const r = this;
let o = !1;
function a(i) {
if (i = lu(i), i) {
const s = Ce.findKey(r, i);
s && (!n || Gh(r, r[s], s, n)) && (delete r[s], o = !0);
}
}
return Ce.isArray(t) ? t.forEach(a) : a(t), o;
}
clear(t) {
const n = Object.keys(this);
let r = n.length, o = !1;
for (; r--; ) {
const a = n[r];
(!t || Gh(this, this[a], a, t, !0)) && (delete this[a], o = !0);
}
return o;
}
normalize(t) {
const n = this, r = {};
return Ce.forEach(this, (o, a) => {
const i = Ce.findKey(r, a);
if (i) {
n[i] = rp(o), delete n[a];
return;
}
const s = t ? gM(a) : String(a).trim();
s !== a && delete n[a], n[s] = rp(o), r[s] = !0;
}), this;
}
concat(...t) {
return this.constructor.concat(this, ...t);
}
toJSON(t) {
const n = /* @__PURE__ */ Object.create(null);
return Ce.forEach(this, (r, o) => {
r != null && r !== !1 && (n[o] = t && Ce.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((o) => r.set(o)), r;
}
static accessor(t) {
const r = (this[Eb] = this[Eb] = {
accessors: {}
}).accessors, o = this.prototype;
function a(i) {
const s = lu(i);
r[s] || (mM(o, i), r[s] = !0);
}
return Ce.isArray(t) ? t.forEach(a) : a(t), this;
}
}
Ar.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
Ce.reduceDescriptors(Ar.prototype, ({ value: e }, t) => {
let n = t[0].toUpperCase() + t.slice(1);
return {
get: () => e,
set(r) {
this[n] = r;
}
};
});
Ce.freezeMethods(Ar);
function Xh(e, t) {
const n = this || Dc, r = t || n, o = Ar.from(r.headers);
let a = r.data;
return Ce.forEach(e, function(s) {
a = s.call(n, a, o.normalize(), t ? t.status : void 0);
}), o.normalize(), a;
}
function W3(e) {
return !!(e && e.__CANCEL__);
}
function Ml(e, t, n) {
xt.call(this, e ?? "canceled", xt.ERR_CANCELED, t, n), this.name = "CanceledError";
}
Ce.inherits(Ml, xt, {
__CANCEL__: !0
});
function K3(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 yM(e) {
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
return t && t[1] || "";
}
function bM(e, t) {
e = e || 10;
const n = new Array(e), r = new Array(e);
let o = 0, a = 0, i;
return t = t !== void 0 ? t : 1e3, function(u) {
const l = Date.now(), c = r[a];
i || (i = l), n[o] = u, r[o] = l;
let d = a, f = 0;
for (; d !== o; )
f += n[d++], d = d % e;
if (o = (o + 1) % e, o === a && (a = (a + 1) % e), l - i < t)
return;
const h = c && l - c;
return h ? Math.round(f * 1e3 / h) : void 0;
};
}
function wM(e, t) {
let n = 0, r = 1e3 / t, o, a;
const i = (l, c = Date.now()) => {
n = c, o = null, a && (clearTimeout(a), a = null), e.apply(null, l);
};
return [(...l) => {
const c = Date.now(), d = c - n;
d >= r ? i(l, c) : (o = l, a || (a = setTimeout(() => {
a = null, i(o);
}, r - d)));
}, () => o && i(o)];
}
const Fp = (e, t, n = 3) => {
let r = 0;
const o = bM(50, 250);
return wM((a) => {
const i = a.loaded, s = a.lengthComputable ? a.total : void 0, u = i - r, l = o(u), c = i <= s;
r = i;
const d = {
loaded: i,
total: s,
progress: s ? i / s : void 0,
bytes: u,
rate: l || void 0,
estimated: l && s && c ? (s - i) / l : void 0,
event: a,
lengthComputable: s != null,
[t ? "download" : "upload"]: !0
};
e(d);
}, n);
}, Sb = (e, t) => {
const n = e != null;
return [(r) => t[0]({
lengthComputable: n,
total: e,
loaded: r
}), t[1]];
}, _b = (e) => (...t) => Ce.asap(() => e(...t)), xM = Oo.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 t = /(msie|trident)/i.test(navigator.userAgent), n = document.createElement("a");
let r;
function o(a) {
let i = a;
return t && (n.setAttribute("href", i), i = n.href), n.setAttribute("href", i), {
href: n.href,
protocol: n.protocol ? n.protocol.replace(/:$/, "") : "",
host: n.host,
search: n.search ? n.search.replace(/^\?/, "") : "",
hash: n.hash ? n.hash.replace(/^#/, "") : "",
hostname: n.hostname,
port: n.port,
pathname: n.pathname.charAt(0) === "/" ? n.pathname : "/" + n.pathname
};
}
return r = o(window.location.href), function(i) {
const s = Ce.isString(i) ? o(i) : i;
return s.protocol === r.protocol && s.host === r.host;
};
}()
) : (
// Non standard browser envs (web workers, react-native) lack needed support.
/* @__PURE__ */ function() {
return function() {
return !0;
};
}()
), kM = Oo.hasStandardBrowserEnv ? (
// Standard browser envs support document.cookie
{
write(e, t, n, r, o, a) {
const i = [e + "=" + encodeURIComponent(t)];
Ce.isNumber(n) && i.push("expires=" + new Date(n).toGMTString()), Ce.isString(r) && i.push("path=" + r), Ce.isString(o) && i.push("domain=" + o), a === !0 && i.push("secure"), document.cookie = i.join("; ");
},
read(e) {
const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
return t ? decodeURIComponent(t[3]) : null;
},
remove(e) {
this.write(e, "", Date.now() - 864e5);
}
}
) : (
// Non-standard browser env (web workers, react-native) lack needed support.
{
write() {
},
read() {
return null;
},
remove() {
}
}
);
function CM(e) {
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
}
function EM(e, t) {
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
}
function G3(e, t) {
return e && !CM(t) ? EM(e, t) : t;
}
const Tb = (e) => e instanceof Ar ? { ...e } : e;
function us(e, t) {
t = t || {};
const n = {};
function r(l, c, d) {
return Ce.isPlainObject(l) && Ce.isPlainObject(c) ? Ce.merge.call({ caseless: d }, l, c) : Ce.isPlainObject(c) ? Ce.merge({}, c) : Ce.isArray(c) ? c.slice() : c;
}
function o(l, c, d) {
if (Ce.isUndefined(c)) {
if (!Ce.isUndefined(l))
return r(void 0, l, d);
} else return r(l, c, d);
}
function a(l, c) {
if (!Ce.isUndefined(c))
return r(void 0, c);
}
function i(l, c) {
if (Ce.isUndefined(c)) {
if (!Ce.isUndefined(l))
return r(void 0, l);
} else return r(void 0, c);
}
function s(l, c, d) {
if (d in t)
return r(l, c);
if (d in e)
return r(void 0, l);
}
const u = {
url: a,
method: a,
data: a,
baseURL: i,
transformRequest: i,
transformResponse: i,
paramsSerializer: i,
timeout: i,
timeoutMessage: i,
withCredentials: i,
withXSRFToken: i,
adapter: i,
responseType: i,
xsrfCookieName: i,
xsrfHeaderName: i,
onUploadProgress: i,
onDownloadProgress: i,
decompress: i,
maxContentLength: i,
maxBodyLength: i,
beforeRedirect: i,
transport: i,
httpAgent: i,
httpsAgent: i,
cancelToken: i,
socketPath: i,
responseEncoding: i,
validateStatus: s,
headers: (l, c) => o(Tb(l), Tb(c), !0)
};
return Ce.forEach(Object.keys(Object.assign({}, e, t)), function(c) {
const d = u[c] || o, f = d(e[c], t[c], c);
Ce.isUndefined(f) && d !== s || (n[c] = f);
}), n;
}
const X3 = (e) => {
const t = us({}, e);
let { data: n, withXSRFToken: r, xsrfHeaderName: o, xsrfCookieName: a, headers: i, auth: s } = t;
t.headers = i = Ar.from(i), t.url = H3(G3(t.baseURL, t.url), e.params, e.paramsSerializer), s && i.set(
"Authorization",
"Basic " + btoa((s.username || "") + ":" + (s.password ? unescape(encodeURIComponent(s.password)) : ""))
);
let u;
if (Ce.isFormData(n)) {
if (Oo.hasStandardBrowserEnv || Oo.hasStandardBrowserWebWorkerEnv)
i.setContentType(void 0);
else if ((u = i.getContentType()) !== !1) {
const [l, ...c] = u ? u.split(";").map((d) => d.trim()).filter(Boolean) : [];
i.setContentType([l || "multipart/form-data", ...c].join("; "));
}
}
if (Oo.hasStandardBrowserEnv && (r && Ce.isFunction(r) && (r = r(t)), r || r !== !1 && xM(t.url))) {
const l = o && a && kM.read(a);
l && i.set(o, l);
}
return t;
}, SM = typeof XMLHttpRequest < "u", _M = SM && function(e) {
return new Promise(function(n, r) {
const o = X3(e);
let a = o.data;
const i = Ar.from(o.headers).normalize();
let { responseType: s, onUploadProgress: u, onDownloadProgress: l } = o, c, d, f, h, p;
function v() {
h && h(), p && p(), o.cancelToken && o.cancelToken.unsubscribe(c), o.signal && o.signal.removeEventListener("abort", c);
}
let m = new XMLHttpRequest();
m.open(o.method.toUpperCase(), o.url, !0), m.timeout = o.timeout;
function g() {
if (!m)
return;
const x = Ar.from(
"getAllResponseHeaders" in m && m.getAllResponseHeaders()
), C = {
data: !s || s === "text" || s === "json" ? m.responseText : m.response,
status: m.status,
statusText: m.statusText,
headers: x,
config: e,
request: m
};
K3(function(E) {
n(E), v();
}, function(E) {
r(E), v();
}, C), m = null;
}
"onloadend" in m ? m.onloadend = g : m.onreadystatechange = function() {
!m || m.readyState !== 4 || m.status === 0 && !(m.responseURL && m.responseURL.indexOf("file:") === 0) || setTimeout(g);
}, m.onabort = function() {
m && (r(new xt("Request aborted", xt.ECONNABORTED, e, m)), m = null);
}, m.onerror = function() {
r(new xt("Network Error", xt.ERR_NETWORK, e, m)), m = null;
}, m.ontimeout = function() {
let w = o.timeout ? "timeout of " + o.timeout + "ms exceeded" : "timeout exceeded";
const C = o.transitional || U3;
o.timeoutErrorMessage && (w = o.timeoutErrorMessage), r(new xt(
w,
C.clarifyTimeoutError ? xt.ETIMEDOUT : xt.ECONNABORTED,
e,
m
)), m = null;
}, a === void 0 && i.setContentType(null), "setRequestHeader" in m && Ce.forEach(i.toJSON(), function(w, C) {
m.setRequestHeader(C, w);
}), Ce.isUndefined(o.withCredentials) || (m.withCredentials = !!o.withCredentials), s && s !== "json" && (m.responseType = o.responseType), l && ([f, p] = Fp(l, !0), m.addEventListener("progress", f)), u && m.upload && ([d, h] = Fp(u), m.upload.addEventListener("progress", d), m.upload.addEventListener("loadend", h)), (o.cancelToken || o.signal) && (c = (x) => {
m && (r(!x || x.type ? new Ml(null, e, m) : x), m.abort(), m = null);
}, o.cancelToken && o.cancelToken.subscribe(c), o.signal && (o.signal.aborted ? c() : o.signal.addEventListener("abort", c)));
const b = yM(o.url);
if (b && Oo.protocols.indexOf(b) === -1) {
r(new xt("Unsupported protocol " + b + ":", xt.ERR_BAD_REQUEST, e));
return;
}
m.send(a || null);
});
}, TM = (e, t) => {
let n = new AbortController(), r;
const o = function(u) {
if (!r) {
r = !0, i();
const l = u instanceof Error ? u : this.reason;
n.abort(l instanceof xt ? l : new Ml(l instanceof Error ? l.message : l));
}
};
let a = t && setTimeout(() => {
o(new xt(`timeout ${t} of ms exceeded`, xt.ETIMEDOUT));
}, t);
const i = () => {
e && (a && clearTimeout(a), a = null, e.forEach((u) => {
u && (u.removeEventListener ? u.removeEventListener("abort", o) : u.unsubscribe(o));
}), e = null);
};
e.forEach((u) => u && u.addEventListener && u.addEventListener("abort", o));
const { signal: s } = n;
return s.unsubscribe = i, [s, () => {
a && clearTimeout(a), a = null;
}];
}, OM = function* (e, t) {
let n = e.byteLength;
if (n < t) {
yield e;
return;
}
let r = 0, o;
for (; r < n; )
o = r + t, yield e.slice(r, o), r = o;
}, PM = async function* (e, t, n) {
for await (const r of e)
yield* OM(ArrayBuffer.isView(r) ? r : await n(String(r)), t);
}, Ob = (e, t, n, r, o) => {
const a = PM(e, t, o);
let i = 0, s, u = (l) => {
s || (s = !0, r && r(l));
};
return new ReadableStream({
async pull(l) {
try {
const { done: c, value: d } = await a.next();
if (c) {
u(), l.close();
return;
}
let f = d.byteLength;
if (n) {
let h = i += f;
n(h);
}
l.enqueue(new Uint8Array(d));
} catch (c) {
throw u(c), c;
}
},
cancel(l) {
return u(l), a.return();
}
}, {
highWaterMark: 2
});
}, Mf = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", Y3 = Mf && typeof ReadableStream == "function", t0 = Mf && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), Z3 = (e, ...t) => {
try {
return !!e(...t);
} catch {
return !1;
}
}, $M = Y3 && Z3(() => {
let e = !1;
const t = new Request(Oo.origin, {
body: new ReadableStream(),
method: "POST",
get duplex() {
return e = !0, "half";
}
}).headers.has("Content-Type");
return e && !t;
}), Pb = 64 * 1024, n0 = Y3 && Z3(() => Ce.isReadableStream(new Response("").body)), Ip = {
stream: n0 && ((e) => e.body)
};
Mf && ((e) => {
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => {
!Ip[t] && (Ip[t] = Ce.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 AM = async (e) => {
if (e == null)
return 0;
if (Ce.isBlob(e))
return e.size;
if (Ce.isSpecCompliantForm(e))
return (await new Request(e).arrayBuffer()).byteLength;
if (Ce.isArrayBufferView(e) || Ce.isArrayBuffer(e))
return e.byteLength;
if (Ce.isURLSearchParams(e) && (e = e + ""), Ce.isString(e))
return (await t0(e)).byteLength;
}, FM = async (e, t) => {
const n = Ce.toFiniteNumber(e.getContentLength());
return n ?? AM(t);
}, IM = Mf && (async (e) => {
let {
url: t,
method: n,
data: r,
signal: o,
cancelToken: a,
timeout: i,
onDownloadProgress: s,
onUploadProgress: u,
responseType: l,
headers: c,
withCredentials: d = "same-origin",
fetchOptions: f
} = X3(e);
l = l ? (l + "").toLowerCase() : "text";
let [h, p] = o || a || i ? TM([o, a], i) : [], v, m;
const g = () => {
!v && setTimeout(() => {
h && h.unsubscribe();
}), v = !0;
};
let b;
try {
if (u && $M && n !== "get" && n !== "head" && (b = await FM(c, r)) !== 0) {
let k = new Request(t, {
method: "POST",
body: r,
duplex: "half"
}), E;
if (Ce.isFormData(r) && (E = k.headers.get("content-type")) && c.setContentType(E), k.body) {
const [S, O] = Sb(
b,
Fp(_b(u))
);
r = Ob(k.body, Pb, S, O, t0);
}
}
Ce.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 = n0 && (l === "stream" || l === "response");
if (n0 && (s || w)) {
const k = {};
["status", "statusText", "headers"].forEach((F) => {
k[F] = x[F];
});
const E = Ce.toFiniteNumber(x.headers.get("content-length")), [S, O] = s && Sb(
E,
Fp(_b(s), !0)
) || [];
x = new Response(
Ob(x.body, Pb, S, () => {
O && O(), w && g();
}, t0),
k
);
}
l = l || "text";
let C = await Ip[Ce.findKey(Ip, l) || "text"](x, e);
return !w && g(), p && p(), await new Promise((k, E) => {
K3(k, E, {
data: C,
headers: Ar.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);
}
}), r0 = {
http: YB,
xhr: _M,
fetch: IM
};
Ce.forEach(r0, (e, t) => {
if (e) {
try {
Object.defineProperty(e, "name", { value: t });
} catch {
}
Object.defineProperty(e, "adapterName", { value: t });
}
});
const $b = (e) => `- ${e}`, NM = (e) => Ce.isFunction(e) || e === null || e === !1, J3 = {
getAdapter: (e) => {
e = Ce.isArray(e) ? e : [e];
const { length: t } = e;
let n, r;
const o = {};
for (let a = 0; a < t; a++) {
n = e[a];
let i;
if (r = n, !NM(n) && (r = r0[(i = String(n)).toLowerCase()], r === void 0))
throw new xt(`Unknown adapter '${i}'`);
if (r)
break;
o[i || "#" + a] = r;
}
if (!r) {
const a = Object.entries(o).map(
([s, u]) => `adapter ${s} ` + (u === !1 ? "is not supported by the environment" : "is not available in the build")
);
let i = t ? a.length > 1 ? `since :
` + a.map($b).join(`
`) : " " + $b(a[0]) : "as no adapter specified";
throw new xt(
"There is no suitable adapter to dispatch the request " + i,
"ERR_NOT_SUPPORT"
);
}
return r;
},
adapters: r0
};
function Yh(e) {
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
throw new Ml(null, e);
}
function Ab(e) {
return Yh(e), e.headers = Ar.from(e.headers), e.data = Xh.call(
e,
e.transformRequest
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), J3.getAdapter(e.adapter || Dc.adapter)(e).then(function(r) {
return Yh(e), r.data = Xh.call(
e,
e.transformResponse,
r
), r.headers = Ar.from(r.headers), r;
}, function(r) {
return W3(r) || (Yh(e), r && r.response && (r.response.data = Xh.call(
e,
e.transformResponse,
r.response
), r.response.headers = Ar.from(r.response.headers))), Promise.reject(r);
});
}
const Q3 = "1.7.4", em = {};
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
em[e] = function(r) {
return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
};
});
const Fb = {};
em.transitional = function(t, n, r) {
function o(a, i) {
return "[Axios v" + Q3 + "] Transitional option '" + a + "'" + i + (r ? ". " + r : "");
}
return (a, i, s) => {
if (t === !1)
throw new xt(
o(i, " has been removed" + (n ? " in " + n : "")),
xt.ERR_DEPRECATED
);
return n && !Fb[i] && (Fb[i] = !0, console.warn(
o(
i,
" has been deprecated since v" + n + " and will be removed in the near future"
)
)), t ? t(a, i, s) : !0;
};
};
function LM(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 o = r.length;
for (; o-- > 0; ) {
const a = r[o], i = t[a];
if (i) {
const s = e[a], u = s === void 0 || i(s, a, e);
if (u !== !0)
throw new xt("option " + a + " must be " + u, xt.ERR_BAD_OPTION_VALUE);
continue;
}
if (n !== !0)
throw new xt("Unknown option " + a, xt.ERR_BAD_OPTION);
}
}
const o0 = {
assertOptions: LM,
validators: em
}, Ma = o0.validators;
class es {
constructor(t) {
this.defaults = t, this.interceptors = {
request: new Cb(),
response: new Cb()
};
}
/**
* Dispatch a request
*
* @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
* @param {?Object} config
*
* @returns {Promise} The Promise to be fulfilled
*/
async request(t, n) {
try {
return await this._request(t, n);
} catch (r) {
if (r instanceof Error) {
let o;
Error.captureStackTrace ? Error.captureStackTrace(o = {}) : o = new Error();
const a = o.stack ? o.stack.replace(/^.+\n/, "") : "";
try {
r.stack ? a && !String(r.stack).endsWith(a.replace(/^.+\n.+\n/, "")) && (r.stack += `
` + a) : r.stack = a;
} catch {
}
}
throw r;
}
}
_request(t, n) {
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = us(this.defaults, n);
const { transitional: r, paramsSerializer: o, headers: a } = n;
r !== void 0 && o0.assertOptions(r, {
silentJSONParsing: Ma.transitional(Ma.boolean),
forcedJSONParsing: Ma.transitional(Ma.boolean),
clarifyTimeoutError: Ma.transitional(Ma.boolean)
}, !1), o != null && (Ce.isFunction(o) ? n.paramsSerializer = {
serialize: o
} : o0.assertOptions(o, {
encode: Ma.function,
serialize: Ma.function
}, !0)), n.method = (n.method || this.defaults.method || "get").toLowerCase();
let i = a && Ce.merge(
a.common,
a[n.method]
);
a && Ce.forEach(
["delete", "get", "head", "post", "put", "patch", "common"],
(p) => {
delete a[p];
}
), n.headers = Ar.concat(i, a);
const s = [];
let u = !0;
this.interceptors.request.forEach(function(v) {
typeof v.runWhen == "function" && v.runWhen(n) === !1 || (u = u && v.synchronous, s.unshift(v.fulfilled, v.rejected));
});
const l = [];
this.interceptors.response.forEach(function(v) {
l.push(v.fulfilled, v.rejected);
});
let c, d = 0, f;
if (!u) {
const p = [Ab.bind(this), void 0];
for (p.unshift.apply(p, s), p.push.apply(p, l), 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 = Ab.call(this, h);
} catch (p) {
return Promise.reject(p);
}
for (d = 0, f = l.length; d < f; )
c = c.then(l[d++], l[d++]);
return c;
}
getUri(t) {
t = us(this.defaults, t);
const n = G3(t.baseURL, t.url);
return H3(n, t.params, t.paramsSerializer);
}
}
Ce.forEach(["delete", "get", "head", "options"], function(t) {
es.prototype[t] = function(n, r) {
return this.request(us(r || {}, {
method: t,
url: n,
data: (r || {}).data
}));
};
});
Ce.forEach(["post", "put", "patch"], function(t) {
function n(r) {
return function(a, i, s) {
return this.request(us(s || {}, {
method: t,
headers: r ? {
"Content-Type": "multipart/form-data"
} : {},
url: a,
data: i
}));
};
}
es.prototype[t] = n(), es.prototype[t + "Form"] = n(!0);
});
class tm {
constructor(t) {
if (typeof t != "function")
throw new TypeError("executor must be a function.");
let n;
this.promise = new Promise(function(a) {
n = a;
});
const r = this;
this.promise.then((o) => {
if (!r._listeners) return;
let a = r._listeners.length;
for (; a-- > 0; )
r._listeners[a](o);
r._listeners = null;
}), this.promise.then = (o) => {
let a;
const i = new Promise((s) => {
r.subscribe(s), a = s;
}).then(o);
return i.cancel = function() {
r.unsubscribe(a);
}, i;
}, t(function(a, i, s) {
r.reason || (r.reason = new Ml(a, i, s), n(r.reason));
});
}
/**
* Throws a `CanceledError` if cancellation has been requested.
*/
throwIfRequested() {
if (this.reason)
throw this.reason;
}
/**
* Subscribe to the cancel signal
*/
subscribe(t) {
if (this.reason) {
t(this.reason);
return;
}
this._listeners ? this._listeners.push(t) : this._listeners = [t];
}
/**
* Unsubscribe from the cancel signal
*/
unsubscribe(t) {
if (!this._listeners)
return;
const n = this._listeners.indexOf(t);
n !== -1 && this._listeners.splice(n, 1);
}
/**
* Returns an object that contains a new `CancelToken` and a function that, when called,
* cancels the `CancelToken`.
*/
static source() {
let t;
return {
token: new tm(function(o) {
t = o;
}),
cancel: t
};
}
}
function DM(e) {
return function(n) {
return e.apply(null, n);
};
}
function RM(e) {
return Ce.isObject(e) && e.isAxiosError === !0;
}
const a0 = {
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(a0).forEach(([e, t]) => {
a0[t] = e;
});
function e5(e) {
const t = new es(e), n = A3(es.prototype.request, t);
return Ce.extend(n, es.prototype, t, { allOwnKeys: !0 }), Ce.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(o) {
return e5(us(e, o));
}, n;
}
const On = e5(Dc);
On.Axios = es;
On.CanceledError = Ml;
On.CancelToken = tm;
On.isCancel = W3;
On.VERSION = Q3;
On.toFormData = Bf;
On.AxiosError = xt;
On.Cancel = On.CanceledError;
On.all = function(t) {
return Promise.all(t);
};
On.spread = DM;
On.isAxiosError = RM;
On.mergeConfig = us;
On.AxiosHeaders = Ar;
On.formToJSON = (e) => q3(Ce.isHTMLForm(e) ? new FormData(e) : e);
On.getAdapter = J3.getAdapter;
On.HttpStatusCode = a0;
On.default = On;
const BM = "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", MM = {
//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: BM
};
},
methods: {
async getRequest(e, t, n) {
return await On({
method: "get",
url: e,
params: t,
timeout: n
});
},
/**
* Returns a file path for S3.
* @param {String} dataset_id dataset id.
* @param {String} dataset_version dataset version.
* @param {String} file_path file path.
* @returns {String} full path to S3 file.
*/
getS3FilePath(e, t, n) {
const r = encodeURIComponent(n);
return `${e}/${t}/files/${r}`;
},
/**
* Find data path in the array that matches the provide path
*/
findEntryWithPathInArray(e, t) {
if (t && e) {
for (let n = 0; n < e.length; n++)
if (t === e[n].dataset.path) return e[n];
}
},
getThumbnailForPlot(e, t) {
if (t && e)
return this.findEntryWithPathInArray(t, e.datacite.isSourceOf.path[0]);
},
/**
* Use the scaffoldViews to help with finding the correct thumbnails.
* Use the index if the workflow stated above fails.
*/
getThumbnailForScaffold(e, t, n, r) {
if (n && n.length > 0) {
let o;
if (e && t) {
const a = this.findEntryWithPathInArray(t, e.datacite.isSourceOf.path[0]);
a && (o = this.findEntryWithPathInArray(n, a.datacite.isSourceOf.path[0]));
}
if (o)
return o;
if (r < n.length)
return n[r];
}
},
getImageURLFromS3(e, t) {
let n = `${e}/s3-resource/${t.datasetId}/${t.datasetVersion}/files/${t.file_path}?encodeBase64=true`;
return t.s3Bucket && (n = n + `&s3BucketName=${t.s3Bucket}`), n;
},
getSegmentationThumbnailURL(e, t) {
let n = `${e}/thumbnail/neurolucida`;
return n = n + `?datasetId=${t.datasetId}`, n = n + `&version=${t.datasetVersion}`, n = n + `&path=files/${t.segmentationFilePath}`, t.s3Bucket && (n = n + `&s3BucketName=${t.s3Bucket}`), n;
},
getThumbnailURLFromBiolucida(e, t) {
return `${e}/thumbnail/${t.id}`;
},
getImageInfoFromBiolucida(e, t, n) {
const r = `${e}/image/${n.id}`, o = {};
this.getRequest(r, o, 2e4).then(
(a) => {
let i = t.find((u) => u.id === n.id);
const s = a.name;
s && (i.title = s);
},
(a) => (a.message.includes("timeout") && a.message.includes("exceeded") && n.fetchAttempts < 3 && (n.fetchAttempts += 1, this.getImageInfoFromBiolucida(e, t, n)), Promise.reject("Maximum iterations reached."))
);
}
}
}, nm = (e, t) => {
const n = e.__vccOpts || e;
for (const [r, o] of t)
n[r] = o;
return n;
}, zM = { class: "indicator-container" }, VM = ["onClick"], jM = {
__name: "IndexIndicator",
props: {
count: {
type: Number,
default: 0
},
current: {
type: Number,
default: 0
}
},
emits: ["clicked"],
setup(e, { emit: t }) {
const n = t;
return (r, o) => (T(), B("div", zM, [
(T(!0), B(Qe, null, At(e.count, (a, i) => (T(), B("div", {
key: "indicator_" + a,
class: W(["indicator", { active: e.current === i }]),
onClick: (s) => n("clicked", i)
}, null, 10, VM))), 128))
]));
}
}, HM = /* @__PURE__ */ nm(jM, [["__scopeId", "data-v-afcfce15"]]), ha = (e, t, { checkForDefaultPrevented: n = !0 } = {}) => (r) => {
const o = e == null ? void 0 : e(r);
if (n === !1 || !o)
return t == null ? void 0 : t(r);
};
var Ib;
const Ur = typeof window < "u", UM = (e) => typeof e == "string", t5 = () => {
}, qM = Ur && ((Ib = window == null ? void 0 : window.navigator) == null ? void 0 : Ib.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
function n5(e) {
return typeof e == "function" ? e() : y(e);
}
function WM(e) {
return e;
}
function r5(e) {
return eg() ? (pf(e), !0) : !1;
}
function Wi(e) {
var t;
const n = n5(e);
return (t = n == null ? void 0 : n.$el) != null ? t : n;
}
const o5 = Ur ? window : void 0;
function Zh(...e) {
let t, n, r, o;
if (UM(e[0]) || Array.isArray(e[0]) ? ([n, r, o] = e, t = o5) : [t, n, r, o] = e, !t)
return t5;
Array.isArray(n) || (n = [n]), Array.isArray(r) || (r = [r]);
const a = [], i = () => {
a.forEach((c) => c()), a.length = 0;
}, s = (c, d, f, h) => (c.addEventListener(d, f, h), () => c.removeEventListener(d, f, h)), u = me(() => [Wi(t), n5(o)], ([c, d]) => {
i(), c && a.push(...n.flatMap((f) => r.map((h) => s(c, f, h, d))));
}, { immediate: !0, flush: "post" }), l = () => {
u(), i();
};
return r5(l), l;
}
let Nb = !1;
function KM(e, t, n = {}) {
const { window: r = o5, ignore: o = [], capture: a = !0, detectIframe: i = !1 } = n;
if (!r)
return;
qM && !Nb && (Nb = !0, Array.from(r.document.body.children).forEach((c) => c.addEventListener("click", t5)));
let s = !0;
const u = (c) => o.some((d) => {
if (typeof d == "string")
return Array.from(r.document.querySelectorAll(d)).some((f) => f === c.target || c.composedPath().includes(f));
{
const f = Wi(d);
return f && (c.target === f || c.composedPath().includes(f));
}
}), l = [
Zh(r, "click", (c) => {
const d = Wi(e);
if (!(!d || d === c.target || c.composedPath().includes(d))) {
if (c.detail === 0 && (s = !u(c)), !s) {
s = !0;
return;
}
t(c);
}
}, { passive: !0, capture: a }),
Zh(r, "pointerdown", (c) => {
const d = Wi(e);
d && (s = !c.composedPath().includes(d) && !u(c));
}, { passive: !0 }),
i && Zh(r, "blur", (c) => {
var d;
const f = Wi(e);
((d = r.document.activeElement) == null ? void 0 : d.tagName) === "IFRAME" && !(f != null && f.contains(r.document.activeElement)) && t(c);
})
].filter(Boolean);
return () => l.forEach((c) => c());
}
const Lb = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Db = "__vueuse_ssr_handlers__";
Lb[Db] = Lb[Db] || {};
var Rb;
(function(e) {
e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE";
})(Rb || (Rb = {}));
var GM = Object.defineProperty, Bb = Object.getOwnPropertySymbols, XM = Object.prototype.hasOwnProperty, YM = Object.prototype.propertyIsEnumerable, Mb = (e, t, n) => t in e ? GM(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, ZM = (e, t) => {
for (var n in t || (t = {}))
XM.call(t, n) && Mb(e, n, t[n]);
if (Bb)
for (var n of Bb(t))
YM.call(t, n) && Mb(e, n, t[n]);
return e;
};
const JM = {
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]
};
ZM({
linear: WM
}, JM);
/**
* @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 Np = () => {
}, QM = Object.prototype.hasOwnProperty, zb = (e, t) => QM.call(e, t), e7 = Array.isArray, Eu = (e) => typeof e == "function", zl = (e) => typeof e == "string", Rc = (e) => e !== null && typeof e == "object", a5 = (e) => {
const t = /* @__PURE__ */ Object.create(null);
return (n) => t[n] || (t[n] = e(n));
}, t7 = /-(\w)/g, n7 = a5((e) => e.replace(t7, (t, n) => n ? n.toUpperCase() : "")), r7 = /\B([A-Z])/g, o7 = a5(
(e) => e.replace(r7, "-$1").toLowerCase()
);
var a7 = typeof global == "object" && global && global.Object === Object && global, i7 = typeof self == "object" && self && self.Object === Object && self, rm = a7 || i7 || Function("return this")(), hi = rm.Symbol, i5 = Object.prototype, s7 = i5.hasOwnProperty, l7 = i5.toString, uu = hi ? hi.toStringTag : void 0;
function u7(e) {
var t = s7.call(e, uu), n = e[uu];
try {
e[uu] = void 0;
var r = !0;
} catch {
}
var o = l7.call(e);
return r && (t ? e[uu] = n : delete e[uu]), o;
}
var c7 = Object.prototype, d7 = c7.toString;
function p7(e) {
return d7.call(e);
}
var f7 = "[object Null]", h7 = "[object Undefined]", Vb = hi ? hi.toStringTag : void 0;
function om(e) {
return e == null ? e === void 0 ? h7 : f7 : Vb && Vb in Object(e) ? u7(e) : p7(e);
}
function am(e) {
return e != null && typeof e == "object";
}
var v7 = "[object Symbol]";
function im(e) {
return typeof e == "symbol" || am(e) && om(e) == v7;
}
function g7(e, t) {
for (var n = -1, r = e == null ? 0 : e.length, o = Array(r); ++n < r; )
o[n] = t(e[n], n, e);
return o;
}
var Bc = Array.isArray, m7 = 1 / 0, jb = hi ? hi.prototype : void 0, Hb = jb ? jb.toString : void 0;
function s5(e) {
if (typeof e == "string")
return e;
if (Bc(e))
return g7(e, s5) + "";
if (im(e))
return Hb ? Hb.call(e) : "";
var t = e + "";
return t == "0" && 1 / e == -m7 ? "-0" : t;
}
function Lp(e) {
var t = typeof e;
return e != null && (t == "object" || t == "function");
}
function y7(e) {
return e;
}
var b7 = "[object AsyncFunction]", w7 = "[object Function]", x7 = "[object GeneratorFunction]", k7 = "[object Proxy]";
function C7(e) {
if (!Lp(e))
return !1;
var t = om(e);
return t == w7 || t == x7 || t == b7 || t == k7;
}
var Jh = rm["__core-js_shared__"], Ub = function() {
var e = /[^.]+$/.exec(Jh && Jh.keys && Jh.keys.IE_PROTO || "");
return e ? "Symbol(src)_1." + e : "";
}();
function E7(e) {
return !!Ub && Ub in e;
}
var S7 = Function.prototype, _7 = S7.toString;
function T7(e) {
if (e != null) {
try {
return _7.call(e);
} catch {
}
try {
return e + "";
} catch {
}
}
return "";
}
var O7 = /[\\^$.*+?()[\]{}|]/g, P7 = /^\[object .+?Constructor\]$/, $7 = Function.prototype, A7 = Object.prototype, F7 = $7.toString, I7 = A7.hasOwnProperty, N7 = RegExp(
"^" + F7.call(I7).replace(O7, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
);
function L7(e) {
if (!Lp(e) || E7(e))
return !1;
var t = C7(e) ? N7 : P7;
return t.test(T7(e));
}
function D7(e, t) {
return e == null ? void 0 : e[t];
}
function sm(e, t) {
var n = D7(e, t);
return L7(n) ? n : void 0;
}
function R7(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 B7 = 800, M7 = 16, z7 = Date.now;
function V7(e) {
var t = 0, n = 0;
return function() {
var r = z7(), o = M7 - (r - n);
if (n = r, o > 0) {
if (++t >= B7)
return arguments[0];
} else
t = 0;
return e.apply(void 0, arguments);
};
}
function j7(e) {
return function() {
return e;
};
}
var Dp = function() {
try {
var e = sm(Object, "defineProperty");
return e({}, "", {}), e;
} catch {
}
}(), H7 = Dp ? function(e, t) {
return Dp(e, "toString", {
configurable: !0,
enumerable: !1,
value: j7(t),
writable: !0
});
} : y7, U7 = V7(H7), q7 = 9007199254740991, W7 = /^(?:0|[1-9]\d*)$/;
function l5(e, t) {
var n = typeof e;
return t = t ?? q7, !!t && (n == "number" || n != "symbol" && W7.test(e)) && e > -1 && e % 1 == 0 && e < t;
}
function K7(e, t, n) {
t == "__proto__" && Dp ? Dp(e, t, {
configurable: !0,
enumerable: !0,
value: n,
writable: !0
}) : e[t] = n;
}
function u5(e, t) {
return e === t || e !== e && t !== t;
}
var G7 = Object.prototype, X7 = G7.hasOwnProperty;
function Y7(e, t, n) {
var r = e[t];
(!(X7.call(e, t) && u5(r, n)) || n === void 0 && !(t in e)) && K7(e, t, n);
}
var qb = Math.max;
function Z7(e, t, n) {
return t = qb(t === void 0 ? e.length - 1 : t, 0), function() {
for (var r = arguments, o = -1, a = qb(r.length - t, 0), i = Array(a); ++o < a; )
i[o] = r[t + o];
o = -1;
for (var s = Array(t + 1); ++o < t; )
s[o] = r[o];
return s[t] = n(i), R7(e, this, s);
};
}
var J7 = 9007199254740991;
function Q7(e) {
return typeof e == "number" && e > -1 && e % 1 == 0 && e <= J7;
}
var ez = "[object Arguments]";
function Wb(e) {
return am(e) && om(e) == ez;
}
var c5 = Object.prototype, tz = c5.hasOwnProperty, nz = c5.propertyIsEnumerable, d5 = Wb(/* @__PURE__ */ function() {
return arguments;
}()) ? Wb : function(e) {
return am(e) && tz.call(e, "callee") && !nz.call(e, "callee");
}, rz = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, oz = /^\w*$/;
function az(e, t) {
if (Bc(e))
return !1;
var n = typeof e;
return n == "number" || n == "symbol" || n == "boolean" || e == null || im(e) ? !0 : oz.test(e) || !rz.test(e) || t != null && e in Object(t);
}
var ec = sm(Object, "create");
function iz() {
this.__data__ = ec ? ec(null) : {}, this.size = 0;
}
function sz(e) {
var t = this.has(e) && delete this.__data__[e];
return this.size -= t ? 1 : 0, t;
}
var lz = "__lodash_hash_undefined__", uz = Object.prototype, cz = uz.hasOwnProperty;
function dz(e) {
var t = this.__data__;
if (ec) {
var n = t[e];
return n === lz ? void 0 : n;
}
return cz.call(t, e) ? t[e] : void 0;
}
var pz = Object.prototype, fz = pz.hasOwnProperty;
function hz(e) {
var t = this.__data__;
return ec ? t[e] !== void 0 : fz.call(t, e);
}
var vz = "__lodash_hash_undefined__";
function gz(e, t) {
var n = this.__data__;
return this.size += this.has(e) ? 0 : 1, n[e] = ec && t === void 0 ? vz : t, this;
}
function cs(e) {
var t = -1, n = e == null ? 0 : e.length;
for (this.clear(); ++t < n; ) {
var r = e[t];
this.set(r[0], r[1]);
}
}
cs.prototype.clear = iz;
cs.prototype.delete = sz;
cs.prototype.get = dz;
cs.prototype.has = hz;
cs.prototype.set = gz;
function mz() {
this.__data__ = [], this.size = 0;
}
function zf(e, t) {
for (var n = e.length; n--; )
if (u5(e[n][0], t))
return n;
return -1;
}
var yz = Array.prototype, bz = yz.splice;
function wz(e) {
var t = this.__data__, n = zf(t, e);
if (n < 0)
return !1;
var r = t.length - 1;
return n == r ? t.pop() : bz.call(t, n, 1), --this.size, !0;
}
function xz(e) {
var t = this.__data__, n = zf(t, e);
return n < 0 ? void 0 : t[n][1];
}
function kz(e) {
return zf(this.__data__, e) > -1;
}
function Cz(e, t) {
var n = this.__data__, r = zf(n, e);
return r < 0 ? (++this.size, n.push([e, t])) : n[r][1] = t, this;
}
function Vl(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]);
}
}
Vl.prototype.clear = mz;
Vl.prototype.delete = wz;
Vl.prototype.get = xz;
Vl.prototype.has = kz;
Vl.prototype.set = Cz;
var Ez = sm(rm, "Map");
function Sz() {
this.size = 0, this.__data__ = {
hash: new cs(),
map: new (Ez || Vl)(),
string: new cs()
};
}
function _z(e) {
var t = typeof e;
return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e !== "__proto__" : e === null;
}
function Vf(e, t) {
var n = e.__data__;
return _z(t) ? n[typeof t == "string" ? "string" : "hash"] : n.map;
}
function Tz(e) {
var t = Vf(this, e).delete(e);
return this.size -= t ? 1 : 0, t;
}
function Oz(e) {
return Vf(this, e).get(e);
}
function Pz(e) {
return Vf(this, e).has(e);
}
function $z(e, t) {
var n = Vf(this, e), r = n.size;
return n.set(e, t), this.size += n.size == r ? 0 : 1, this;
}
function Ts(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]);
}
}
Ts.prototype.clear = Sz;
Ts.prototype.delete = Tz;
Ts.prototype.get = Oz;
Ts.prototype.has = Pz;
Ts.prototype.set = $z;
var Az = "Expected a function";
function lm(e, t) {
if (typeof e != "function" || t != null && typeof t != "function")
throw new TypeError(Az);
var n = function() {
var r = arguments, o = t ? t.apply(this, r) : r[0], a = n.cache;
if (a.has(o))
return a.get(o);
var i = e.apply(this, r);
return n.cache = a.set(o, i) || a, i;
};
return n.cache = new (lm.Cache || Ts)(), n;
}
lm.Cache = Ts;
var Fz = 500;
function Iz(e) {
var t = lm(e, function(r) {
return n.size === Fz && n.clear(), r;
}), n = t.cache;
return t;
}
var Nz = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, Lz = /\\(\\)?/g, Dz = Iz(function(e) {
var t = [];
return e.charCodeAt(0) === 46 && t.push(""), e.replace(Nz, function(n, r, o, a) {
t.push(o ? a.replace(Lz, "$1") : r || n);
}), t;
});
function Rz(e) {
return e == null ? "" : s5(e);
}
function jf(e, t) {
return Bc(e) ? e : az(e, t) ? [e] : Dz(Rz(e));
}
var Bz = 1 / 0;
function um(e) {
if (typeof e == "string" || im(e))
return e;
var t = e + "";
return t == "0" && 1 / e == -Bz ? "-0" : t;
}
function p5(e, t) {
t = jf(t, e);
for (var n = 0, r = t.length; e != null && n < r; )
e = e[um(t[n++])];
return n && n == r ? e : void 0;
}
function Mz(e, t, n) {
var r = e == null ? void 0 : p5(e, t);
return r === void 0 ? n : r;
}
function zz(e, t) {
for (var n = -1, r = t.length, o = e.length; ++n < r; )
e[o + n] = t[n];
return e;
}
var Kb = hi ? hi.isConcatSpreadable : void 0;
function Vz(e) {
return Bc(e) || d5(e) || !!(Kb && e && e[Kb]);
}
function jz(e, t, n, r, o) {
var a = -1, i = e.length;
for (n || (n = Vz), o || (o = []); ++a < i; ) {
var s = e[a];
n(s) ? zz(o, s) : o[o.length] = s;
}
return o;
}
function Hz(e) {
var t = e == null ? 0 : e.length;
return t ? jz(e) : [];
}
function Uz(e) {
return U7(Z7(e, void 0, Hz), e + "");
}
function qz(e, t) {
return e != null && t in Object(e);
}
function Wz(e, t, n) {
t = jf(t, e);
for (var r = -1, o = t.length, a = !1; ++r < o; ) {
var i = um(t[r]);
if (!(a = e != null && n(e, i)))
break;
e = e[i];
}
return a || ++r != o ? a : (o = e == null ? 0 : e.length, !!o && Q7(o) && l5(i, o) && (Bc(e) || d5(e)));
}
function Kz(e, t) {
return e != null && Wz(e, t, qz);
}
function i0(e) {
for (var t = -1, n = e == null ? 0 : e.length, r = {}; ++t < n; ) {
var o = e[t];
r[o[0]] = o[1];
}
return r;
}
function cm(e) {
return e == null;
}
function Gz(e) {
return e === void 0;
}
function Xz(e, t, n, r) {
if (!Lp(e))
return e;
t = jf(t, e);
for (var o = -1, a = t.length, i = a - 1, s = e; s != null && ++o < a; ) {
var u = um(t[o]), l = n;
if (u === "__proto__" || u === "constructor" || u === "prototype")
return e;
if (o != i) {
var c = s[u];
l = void 0, l === void 0 && (l = Lp(c) ? c : l5(t[o + 1]) ? [] : {});
}
Y7(s, u, l), s = s[u];
}
return e;
}
function Yz(e, t, n) {
for (var r = -1, o = t.length, a = {}; ++r < o; ) {
var i = t[r], s = p5(e, i);
n(s, i) && Xz(a, jf(i, e), s);
}
return a;
}
function Zz(e, t) {
return Yz(e, t, function(n, r) {
return Kz(e, r);
});
}
var Jz = Uz(function(e, t) {
return e == null ? {} : Zz(e, t);
});
const Qz = (e) => e === void 0, dm = (e) => typeof e == "boolean", tc = (e) => typeof e == "number", Lu = (e) => typeof Element > "u" ? !1 : e instanceof Element, eV = (e) => zl(e) ? !Number.isNaN(Number(e)) : !1, Gb = (e) => Object.keys(e);
class tV extends Error {
constructor(t) {
super(t), this.name = "ElementPlusError";
}
}
function ds(e, t) {
if (process.env.NODE_ENV !== "production") {
const n = zl(e) ? new tV(`[${e}] ${t}`) : e;
console.warn(n);
}
}
const nV = "utils/dom/style", f5 = (e = "") => e.split(" ").filter((t) => !!t.trim()), Xb = (e, t) => {
!e || !t.trim() || e.classList.add(...f5(t));
}, Rp = (e, t) => {
!e || !t.trim() || e.classList.remove(...f5(t));
}, cu = (e, t) => {
var n;
if (!Ur || !e || !t)
return "";
let r = n7(t);
r === "float" && (r = "cssFloat");
try {
const o = e.style[r];
if (o)
return o;
const a = (n = document.defaultView) == null ? void 0 : n.getComputedStyle(e, "");
return a ? a[r] : "";
} catch {
return e.style[r];
}
};
function h5(e, t = "px") {
if (!e)
return "";
if (tc(e) || eV(e))
return `${e}${t}`;
if (zl(e))
return e;
ds(nV, "binding value must be a string or number");
}
/*! Element Plus Icons Vue v2.3.1 */
var rV = /* @__PURE__ */ Z({
name: "Loading",
__name: "loading",
setup(e) {
return (t, n) => (T(), B("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 1024 1024"
}, [
Y("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"
})
]));
}
}), oV = rV;
const v5 = "__epPropKey", Ot = (e) => e, aV = (e) => Rc(e) && !!e[v5], Hf = (e, t) => {
if (!Rc(e) || aV(e))
return e;
const { values: n, required: r, default: o, type: a, validator: i } = e, s = {
type: a,
required: !!r,
validator: n || i ? (u) => {
let l = !1, c = [];
if (n && (c = Array.from(n), zb(e, "default") && c.push(o), l || (l = c.includes(u))), i && (l || (l = i(u))), !l && c.length > 0) {
const d = [...new Set(c)].map((f) => JSON.stringify(f)).join(", ");
tg(`Invalid prop: validation failed${t ? ` for prop "${t}"` : ""}. Expected one of [${d}], got value ${JSON.stringify(u)}.`);
}
return l;
} : void 0,
[v5]: !0
};
return zb(e, "default") && (s.default = o), s;
}, Rn = (e) => i0(Object.entries(e).map(([t, n]) => [
t,
Hf(n, t)
])), s0 = Ot([
String,
Object,
Function
]), Os = (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;
}, iV = (e, t) => (e.install = (n) => {
n.directive(t, e);
}, e), sV = (e) => (e.install = Np, e), Bp = {
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"
}, lV = ["", "default", "small", "large"], uV = ({ from: e, replacement: t, scope: n, version: r, ref: o, type: a = "API" }, i) => {
me(() => y(i), (s) => {
s && ds(n, `[${a}] ${e} is about to be deprecated in version ${r}, please use ${t} instead.
For more detail, please visit: ${o}
`);
}, {
immediate: !0
});
};
var cV = {
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 dV = (e) => (t, n) => pV(t, n, y(e)), pV = (e, t, n) => Mz(n, e, e).replace(/\{(\w+)\}/g, (r, o) => {
var a;
return `${(a = t == null ? void 0 : t[o]) != null ? a : `{${o}}`}`;
}), fV = (e) => {
const t = _(() => y(e).name), n = Vn(e) ? e : H(e);
return {
lang: t,
locale: n,
t: dV(e)
};
}, g5 = Symbol("localeContextKey"), hV = (e) => {
const t = e || $e(g5, H());
return fV(_(() => t.value || cV));
}, op = "el", vV = "is-", Di = (e, t, n, r, o) => {
let a = `${e}-${t}`;
return n && (a += `-${n}`), r && (a += `__${r}`), o && (a += `--${o}`), a;
}, m5 = Symbol("namespaceContextKey"), pm = (e) => {
const t = e || (dt() ? $e(m5, H(op)) : H(op));
return _(() => y(t) || op);
}, mo = (e, t) => {
const n = pm(t);
return {
namespace: n,
b: (r = "") => Di(n.value, e, r, "", ""),
e: (r) => r ? Di(n.value, e, "", r, "") : "",
m: (r) => r ? Di(n.value, e, "", "", r) : "",
be: (r, o) => r && o ? Di(n.value, e, r, o, "") : "",
em: (r, o) => r && o ? Di(n.value, e, "", r, o) : "",
bm: (r, o) => r && o ? Di(n.value, e, r, "", o) : "",
bem: (r, o, a) => r && o && a ? Di(n.value, e, r, o, a) : "",
is: (r, ...o) => {
const a = o.length >= 1 ? o[0] : !0;
return r && a ? `${vV}${r}` : "";
},
cssVar: (r) => {
const o = {};
for (const a in r)
r[a] && (o[`--${n.value}-${a}`] = r[a]);
return o;
},
cssVarName: (r) => `--${n.value}-${r}`,
cssVarBlock: (r) => {
const o = {};
for (const a in r)
r[a] && (o[`--${n.value}-${e}-${a}`] = r[a]);
return o;
},
cssVarBlockName: (r) => `--${n.value}-${e}-${r}`
};
}, gV = Hf({
type: Ot(Boolean),
default: null
}), mV = Hf({
type: Ot(Function)
}), yV = (e) => {
const t = `update:${e}`, n = `onUpdate:${e}`, r = [t], o = {
[e]: gV,
[n]: mV
};
return {
useModelToggle: ({
indicator: a,
toggleReason: i,
shouldHideWhenRouteChanges: s,
shouldProceed: u,
onShow: l,
onHide: c
}) => {
const d = dt(), { emit: f } = d, h = d.props, p = _(() => Eu(h[n])), v = _(() => h[e] === null), m = (k) => {
a.value !== !0 && (a.value = !0, i && (i.value = k), Eu(l) && l(k));
}, g = (k) => {
a.value !== !1 && (a.value = !1, i && (i.value = k), Eu(c) && c(k));
}, b = (k) => {
if (h.disabled === !0 || Eu(u) && !u())
return;
const E = p.value && Ur;
E && f(t, !0), (v.value || !E) && m(k);
}, x = (k) => {
if (h.disabled === !0 || !Ur)
return;
const E = p.value && Ur;
E && f(t, !1), (v.value || !E) && g(k);
}, w = (k) => {
dm(k) && (h.disabled && k ? p.value && f(t, !1) : a.value !== k && (k ? m() : g()));
}, C = () => {
a.value ? x() : b();
};
return me(() => h[e], w), s && d.appContext.config.globalProperties.$route !== void 0 && me(() => ({
...d.proxy.$route
}), () => {
s.value && a.value && x();
}), ht(() => {
w(h[e]);
}), {
hide: x,
show: b,
toggle: C,
hasUpdateHandler: p
};
},
useModelToggleProps: o,
useModelToggleEmits: r
};
}, y5 = (e) => {
const t = dt();
return _(() => {
var n, r;
return (r = (n = t == null ? void 0 : t.proxy) == null ? void 0 : n.$props) == null ? void 0 : r[e];
});
};
var Fr = "top", uo = "bottom", co = "right", Ir = "left", fm = "auto", Mc = [Fr, uo, co, Ir], yl = "start", nc = "end", bV = "clippingParents", b5 = "viewport", du = "popper", wV = "reference", Yb = Mc.reduce(function(e, t) {
return e.concat([t + "-" + yl, t + "-" + nc]);
}, []), hm = [].concat(Mc, [fm]).reduce(function(e, t) {
return e.concat([t, t + "-" + yl, t + "-" + nc]);
}, []), xV = "beforeRead", kV = "read", CV = "afterRead", EV = "beforeMain", SV = "main", _V = "afterMain", TV = "beforeWrite", OV = "write", PV = "afterWrite", $V = [xV, kV, CV, EV, SV, _V, TV, OV, PV];
function na(e) {
return e ? (e.nodeName || "").toLowerCase() : null;
}
function Ro(e) {
if (e == null) return window;
if (e.toString() !== "[object Window]") {
var t = e.ownerDocument;
return t && t.defaultView || window;
}
return e;
}
function bl(e) {
var t = Ro(e).Element;
return e instanceof t || e instanceof Element;
}
function no(e) {
var t = Ro(e).HTMLElement;
return e instanceof t || e instanceof HTMLElement;
}
function vm(e) {
if (typeof ShadowRoot > "u") return !1;
var t = Ro(e).ShadowRoot;
return e instanceof t || e instanceof ShadowRoot;
}
function AV(e) {
var t = e.state;
Object.keys(t.elements).forEach(function(n) {
var r = t.styles[n] || {}, o = t.attributes[n] || {}, a = t.elements[n];
!no(a) || !na(a) || (Object.assign(a.style, r), Object.keys(o).forEach(function(i) {
var s = o[i];
s === !1 ? a.removeAttribute(i) : a.setAttribute(i, s === !0 ? "" : s);
}));
});
}
function FV(e) {
var t = e.state, n = { popper: { position: t.options.strategy, left: "0", top: "0", margin: "0" }, arrow: { position: "absolute" }, reference: {} };
return Object.assign(t.elements.popper.style, n.popper), t.styles = n, t.elements.arrow && Object.assign(t.elements.arrow.style, n.arrow), function() {
Object.keys(t.elements).forEach(function(r) {
var o = t.elements[r], a = t.attributes[r] || {}, i = Object.keys(t.styles.hasOwnProperty(r) ? t.styles[r] : n[r]), s = i.reduce(function(u, l) {
return u[l] = "", u;
}, {});
!no(o) || !na(o) || (Object.assign(o.style, s), Object.keys(a).forEach(function(u) {
o.removeAttribute(u);
}));
});
};
}
var w5 = { name: "applyStyles", enabled: !0, phase: "write", fn: AV, effect: FV, requires: ["computeStyles"] };
function Jo(e) {
return e.split("-")[0];
}
var ts = Math.max, Mp = Math.min, wl = Math.round;
function xl(e, t) {
t === void 0 && (t = !1);
var n = e.getBoundingClientRect(), r = 1, o = 1;
if (no(e) && t) {
var a = e.offsetHeight, i = e.offsetWidth;
i > 0 && (r = wl(n.width) / i || 1), a > 0 && (o = wl(n.height) / a || 1);
}
return { width: n.width / r, height: n.height / o, top: n.top / o, right: n.right / r, bottom: n.bottom / o, left: n.left / r, x: n.left / r, y: n.top / o };
}
function gm(e) {
var t = xl(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 x5(e, t) {
var n = t.getRootNode && t.getRootNode();
if (e.contains(t)) return !0;
if (n && vm(n)) {
var r = t;
do {
if (r && e.isSameNode(r)) return !0;
r = r.parentNode || r.host;
} while (r);
}
return !1;
}
function Ea(e) {
return Ro(e).getComputedStyle(e);
}
function IV(e) {
return ["table", "td", "th"].indexOf(na(e)) >= 0;
}
function Ti(e) {
return ((bl(e) ? e.ownerDocument : e.document) || window.document).documentElement;
}
function Uf(e) {
return na(e) === "html" ? e : e.assignedSlot || e.parentNode || (vm(e) ? e.host : null) || Ti(e);
}
function Zb(e) {
return !no(e) || Ea(e).position === "fixed" ? null : e.offsetParent;
}
function NV(e) {
var t = navigator.userAgent.toLowerCase().indexOf("firefox") !== -1, n = navigator.userAgent.indexOf("Trident") !== -1;
if (n && no(e)) {
var r = Ea(e);
if (r.position === "fixed") return null;
}
var o = Uf(e);
for (vm(o) && (o = o.host); no(o) && ["html", "body"].indexOf(na(o)) < 0; ) {
var a = Ea(o);
if (a.transform !== "none" || a.perspective !== "none" || a.contain === "paint" || ["transform", "perspective"].indexOf(a.willChange) !== -1 || t && a.willChange === "filter" || t && a.filter && a.filter !== "none") return o;
o = o.parentNode;
}
return null;
}
function zc(e) {
for (var t = Ro(e), n = Zb(e); n && IV(n) && Ea(n).position === "static"; ) n = Zb(n);
return n && (na(n) === "html" || na(n) === "body" && Ea(n).position === "static") ? t : n || NV(e) || t;
}
function mm(e) {
return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y";
}
function Du(e, t, n) {
return ts(e, Mp(t, n));
}
function LV(e, t, n) {
var r = Du(e, t, n);
return r > n ? n : r;
}
function k5() {
return { top: 0, right: 0, bottom: 0, left: 0 };
}
function C5(e) {
return Object.assign({}, k5(), e);
}
function E5(e, t) {
return t.reduce(function(n, r) {
return n[r] = e, n;
}, {});
}
var DV = function(e, t) {
return e = typeof e == "function" ? e(Object.assign({}, t.rects, { placement: t.placement })) : e, C5(typeof e != "number" ? e : E5(e, Mc));
};
function RV(e) {
var t, n = e.state, r = e.name, o = e.options, a = n.elements.arrow, i = n.modifiersData.popperOffsets, s = Jo(n.placement), u = mm(s), l = [Ir, co].indexOf(s) >= 0, c = l ? "height" : "width";
if (!(!a || !i)) {
var d = DV(o.padding, n), f = gm(a), h = u === "y" ? Fr : Ir, p = u === "y" ? uo : co, v = n.rects.reference[c] + n.rects.reference[u] - i[u] - n.rects.popper[c], m = i[u] - n.rects.reference[u], g = zc(a), b = g ? u === "y" ? g.clientHeight || 0 : g.clientWidth || 0 : 0, x = v / 2 - m / 2, w = d[h], C = b - f[c] - d[p], k = b / 2 - f[c] / 2 + x, E = Du(w, k, C), S = u;
n.modifiersData[r] = (t = {}, t[S] = E, t.centerOffset = E - k, t);
}
}
function BV(e) {
var t = e.state, n = e.options, r = n.element, o = r === void 0 ? "[data-popper-arrow]" : r;
o != null && (typeof o == "string" && (o = t.elements.popper.querySelector(o), !o) || !x5(t.elements.popper, o) || (t.elements.arrow = o));
}
var MV = { name: "arrow", enabled: !0, phase: "main", fn: RV, effect: BV, requires: ["popperOffsets"], requiresIfExists: ["preventOverflow"] };
function kl(e) {
return e.split("-")[1];
}
var zV = { top: "auto", right: "auto", bottom: "auto", left: "auto" };
function VV(e) {
var t = e.x, n = e.y, r = window, o = r.devicePixelRatio || 1;
return { x: wl(t * o) / o || 0, y: wl(n * o) / o || 0 };
}
function Jb(e) {
var t, n = e.popper, r = e.popperRect, o = e.placement, a = e.variation, i = e.offsets, s = e.position, u = e.gpuAcceleration, l = 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"), b = i.hasOwnProperty("y"), x = Ir, w = Fr, C = window;
if (l) {
var k = zc(n), E = "clientHeight", S = "clientWidth";
if (k === Ro(n) && (k = Ti(n), Ea(k).position !== "static" && s === "absolute" && (E = "scrollHeight", S = "scrollWidth")), k = k, o === Fr || (o === Ir || o === co) && a === nc) {
w = uo;
var O = d && k === C && C.visualViewport ? C.visualViewport.height : k[E];
v -= O - r.height, v *= u ? 1 : -1;
}
if (o === Ir || (o === Fr || o === uo) && a === nc) {
x = co;
var F = d && k === C && C.visualViewport ? C.visualViewport.width : k[S];
h -= F - r.width, h *= u ? 1 : -1;
}
}
var $ = Object.assign({ position: s }, l && zV), A = c === !0 ? VV({ x: h, y: v }) : { x: h, y: v };
if (h = A.x, v = A.y, u) {
var L;
return Object.assign({}, $, (L = {}, L[w] = b ? "0" : "", L[x] = g ? "0" : "", L.transform = (C.devicePixelRatio || 1) <= 1 ? "translate(" + h + "px, " + v + "px)" : "translate3d(" + h + "px, " + v + "px, 0)", L));
}
return Object.assign({}, $, (t = {}, t[w] = b ? v + "px" : "", t[x] = g ? h + "px" : "", t.transform = "", t));
}
function jV(e) {
var t = e.state, n = e.options, r = n.gpuAcceleration, o = r === void 0 ? !0 : r, a = n.adaptive, i = a === void 0 ? !0 : a, s = n.roundOffsets, u = s === void 0 ? !0 : s, l = { placement: Jo(t.placement), variation: kl(t.placement), popper: t.elements.popper, popperRect: t.rects.popper, gpuAcceleration: o, isFixed: t.options.strategy === "fixed" };
t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper, Jb(Object.assign({}, l, { offsets: t.modifiersData.popperOffsets, position: t.options.strategy, adaptive: i, roundOffsets: u })))), t.modifiersData.arrow != null && (t.styles.arrow = Object.assign({}, t.styles.arrow, Jb(Object.assign({}, l, { offsets: t.modifiersData.arrow, position: "absolute", adaptive: !1, roundOffsets: u })))), t.attributes.popper = Object.assign({}, t.attributes.popper, { "data-popper-placement": t.placement });
}
var S5 = { name: "computeStyles", enabled: !0, phase: "beforeWrite", fn: jV, data: {} }, xd = { passive: !0 };
function HV(e) {
var t = e.state, n = e.instance, r = e.options, o = r.scroll, a = o === void 0 ? !0 : o, i = r.resize, s = i === void 0 ? !0 : i, u = Ro(t.elements.popper), l = [].concat(t.scrollParents.reference, t.scrollParents.popper);
return a && l.forEach(function(c) {
c.addEventListener("scroll", n.update, xd);
}), s && u.addEventListener("resize", n.update, xd), function() {
a && l.forEach(function(c) {
c.removeEventListener("scroll", n.update, xd);
}), s && u.removeEventListener("resize", n.update, xd);
};
}
var _5 = { name: "eventListeners", enabled: !0, phase: "write", fn: function() {
}, effect: HV, data: {} }, UV = { left: "right", right: "left", bottom: "top", top: "bottom" };
function ap(e) {
return e.replace(/left|right|bottom|top/g, function(t) {
return UV[t];
});
}
var qV = { start: "end", end: "start" };
function Qb(e) {
return e.replace(/start|end/g, function(t) {
return qV[t];
});
}
function ym(e) {
var t = Ro(e), n = t.pageXOffset, r = t.pageYOffset;
return { scrollLeft: n, scrollTop: r };
}
function bm(e) {
return xl(Ti(e)).left + ym(e).scrollLeft;
}
function WV(e) {
var t = Ro(e), n = Ti(e), r = t.visualViewport, o = n.clientWidth, a = n.clientHeight, i = 0, s = 0;
return r && (o = r.width, a = r.height, /^((?!chrome|android).)*safari/i.test(navigator.userAgent) || (i = r.offsetLeft, s = r.offsetTop)), { width: o, height: a, x: i + bm(e), y: s };
}
function KV(e) {
var t, n = Ti(e), r = ym(e), o = (t = e.ownerDocument) == null ? void 0 : t.body, a = ts(n.scrollWidth, n.clientWidth, o ? o.scrollWidth : 0, o ? o.clientWidth : 0), i = ts(n.scrollHeight, n.clientHeight, o ? o.scrollHeight : 0, o ? o.clientHeight : 0), s = -r.scrollLeft + bm(e), u = -r.scrollTop;
return Ea(o || n).direction === "rtl" && (s += ts(n.clientWidth, o ? o.clientWidth : 0) - a), { width: a, height: i, x: s, y: u };
}
function wm(e) {
var t = Ea(e), n = t.overflow, r = t.overflowX, o = t.overflowY;
return /auto|scroll|overlay|hidden/.test(n + o + r);
}
function T5(e) {
return ["html", "body", "#document"].indexOf(na(e)) >= 0 ? e.ownerDocument.body : no(e) && wm(e) ? e : T5(Uf(e));
}
function Ru(e, t) {
var n;
t === void 0 && (t = []);
var r = T5(e), o = r === ((n = e.ownerDocument) == null ? void 0 : n.body), a = Ro(r), i = o ? [a].concat(a.visualViewport || [], wm(r) ? r : []) : r, s = t.concat(i);
return o ? s : s.concat(Ru(Uf(i)));
}
function l0(e) {
return Object.assign({}, e, { left: e.x, top: e.y, right: e.x + e.width, bottom: e.y + e.height });
}
function GV(e) {
var t = xl(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 e2(e, t) {
return t === b5 ? l0(WV(e)) : bl(t) ? GV(t) : l0(KV(Ti(e)));
}
function XV(e) {
var t = Ru(Uf(e)), n = ["absolute", "fixed"].indexOf(Ea(e).position) >= 0, r = n && no(e) ? zc(e) : e;
return bl(r) ? t.filter(function(o) {
return bl(o) && x5(o, r) && na(o) !== "body";
}) : [];
}
function YV(e, t, n) {
var r = t === "clippingParents" ? XV(e) : [].concat(t), o = [].concat(r, [n]), a = o[0], i = o.reduce(function(s, u) {
var l = e2(e, u);
return s.top = ts(l.top, s.top), s.right = Mp(l.right, s.right), s.bottom = Mp(l.bottom, s.bottom), s.left = ts(l.left, s.left), s;
}, e2(e, a));
return i.width = i.right - i.left, i.height = i.bottom - i.top, i.x = i.left, i.y = i.top, i;
}
function O5(e) {
var t = e.reference, n = e.element, r = e.placement, o = r ? Jo(r) : null, a = r ? kl(r) : null, i = t.x + t.width / 2 - n.width / 2, s = t.y + t.height / 2 - n.height / 2, u;
switch (o) {
case Fr:
u = { x: i, y: t.y - n.height };
break;
case uo:
u = { x: i, y: t.y + t.height };
break;
case co:
u = { x: t.x + t.width, y: s };
break;
case Ir:
u = { x: t.x - n.width, y: s };
break;
default:
u = { x: t.x, y: t.y };
}
var l = o ? mm(o) : null;
if (l != null) {
var c = l === "y" ? "height" : "width";
switch (a) {
case yl:
u[l] = u[l] - (t[c] / 2 - n[c] / 2);
break;
case nc:
u[l] = u[l] + (t[c] / 2 - n[c] / 2);
break;
}
}
return u;
}
function rc(e, t) {
t === void 0 && (t = {});
var n = t, r = n.placement, o = r === void 0 ? e.placement : r, a = n.boundary, i = a === void 0 ? bV : a, s = n.rootBoundary, u = s === void 0 ? b5 : s, l = n.elementContext, c = l === void 0 ? du : l, d = n.altBoundary, f = d === void 0 ? !1 : d, h = n.padding, p = h === void 0 ? 0 : h, v = C5(typeof p != "number" ? p : E5(p, Mc)), m = c === du ? wV : du, g = e.rects.popper, b = e.elements[f ? m : c], x = YV(bl(b) ? b : b.contextElement || Ti(e.elements.popper), i, u), w = xl(e.elements.reference), C = O5({ reference: w, element: g, strategy: "absolute", placement: o }), k = l0(Object.assign({}, g, C)), E = c === du ? k : w, S = { top: x.top - E.top + v.top, bottom: E.bottom - x.bottom + v.bottom, left: x.left - E.left + v.left, right: E.right - x.right + v.right }, O = e.modifiersData.offset;
if (c === du && O) {
var F = O[o];
Object.keys(S).forEach(function($) {
var A = [co, uo].indexOf($) >= 0 ? 1 : -1, L = [Fr, uo].indexOf($) >= 0 ? "y" : "x";
S[$] += F[L] * A;
});
}
return S;
}
function ZV(e, t) {
t === void 0 && (t = {});
var n = t, r = n.placement, o = n.boundary, a = n.rootBoundary, i = n.padding, s = n.flipVariations, u = n.allowedAutoPlacements, l = u === void 0 ? hm : u, c = kl(r), d = c ? s ? Yb : Yb.filter(function(p) {
return kl(p) === c;
}) : Mc, f = d.filter(function(p) {
return l.indexOf(p) >= 0;
});
f.length === 0 && (f = d);
var h = f.reduce(function(p, v) {
return p[v] = rc(e, { placement: v, boundary: o, rootBoundary: a, padding: i })[Jo(v)], p;
}, {});
return Object.keys(h).sort(function(p, v) {
return h[p] - h[v];
});
}
function JV(e) {
if (Jo(e) === fm) return [];
var t = ap(e);
return [Qb(e), t, Qb(t)];
}
function QV(e) {
var t = e.state, n = e.options, r = e.name;
if (!t.modifiersData[r]._skip) {
for (var o = n.mainAxis, a = o === void 0 ? !0 : o, i = n.altAxis, s = i === void 0 ? !0 : i, u = n.fallbackPlacements, l = 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 = Jo(m), b = g === m, x = u || (b || !p ? [ap(m)] : JV(m)), w = [m].concat(x).reduce(function(we, ke) {
return we.concat(Jo(ke) === fm ? ZV(t, { placement: ke, boundary: c, rootBoundary: d, padding: l, flipVariations: p, allowedAutoPlacements: v }) : ke);
}, []), C = t.rects.reference, k = t.rects.popper, E = /* @__PURE__ */ new Map(), S = !0, O = w[0], F = 0; F < w.length; F++) {
var $ = w[F], A = Jo($), L = kl($) === yl, N = [Fr, uo].indexOf(A) >= 0, M = N ? "width" : "height", I = rc(t, { placement: $, boundary: c, rootBoundary: d, altBoundary: f, padding: l }), z = N ? L ? co : Ir : L ? uo : Fr;
C[M] > k[M] && (z = ap(z));
var R = ap(z), q = [];
if (a && q.push(I[A] <= 0), s && q.push(I[z] <= 0, I[R] <= 0), q.every(function(we) {
return we;
})) {
O = $, S = !1;
break;
}
E.set($, q);
}
if (S) for (var oe = p ? 3 : 1, Q = function(we) {
var ke = w.find(function(fe) {
var ge = E.get(fe);
if (ge) return ge.slice(0, we).every(function(J) {
return J;
});
});
if (ke) return O = ke, "break";
}, ae = oe; ae > 0; ae--) {
var pe = Q(ae);
if (pe === "break") break;
}
t.placement !== O && (t.modifiersData[r]._skip = !0, t.placement = O, t.reset = !0);
}
}
var ej = { name: "flip", enabled: !0, phase: "main", fn: QV, requiresIfExists: ["offset"], data: { _skip: !1 } };
function t2(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 n2(e) {
return [Fr, co, uo, Ir].some(function(t) {
return e[t] >= 0;
});
}
function tj(e) {
var t = e.state, n = e.name, r = t.rects.reference, o = t.rects.popper, a = t.modifiersData.preventOverflow, i = rc(t, { elementContext: "reference" }), s = rc(t, { altBoundary: !0 }), u = t2(i, r), l = t2(s, o, a), c = n2(u), d = n2(l);
t.modifiersData[n] = { referenceClippingOffsets: u, popperEscapeOffsets: l, isReferenceHidden: c, hasPopperEscaped: d }, t.attributes.popper = Object.assign({}, t.attributes.popper, { "data-popper-reference-hidden": c, "data-popper-escaped": d });
}
var nj = { name: "hide", enabled: !0, phase: "main", requiresIfExists: ["preventOverflow"], fn: tj };
function rj(e, t, n) {
var r = Jo(e), o = [Ir, Fr].indexOf(r) >= 0 ? -1 : 1, a = typeof n == "function" ? n(Object.assign({}, t, { placement: e })) : n, i = a[0], s = a[1];
return i = i || 0, s = (s || 0) * o, [Ir, co].indexOf(r) >= 0 ? { x: s, y: i } : { x: i, y: s };
}
function oj(e) {
var t = e.state, n = e.options, r = e.name, o = n.offset, a = o === void 0 ? [0, 0] : o, i = hm.reduce(function(c, d) {
return c[d] = rj(d, t.rects, a), c;
}, {}), s = i[t.placement], u = s.x, l = s.y;
t.modifiersData.popperOffsets != null && (t.modifiersData.popperOffsets.x += u, t.modifiersData.popperOffsets.y += l), t.modifiersData[r] = i;
}
var aj = { name: "offset", enabled: !0, phase: "main", requires: ["popperOffsets"], fn: oj };
function ij(e) {
var t = e.state, n = e.name;
t.modifiersData[n] = O5({ reference: t.rects.reference, element: t.rects.popper, strategy: "absolute", placement: t.placement });
}
var P5 = { name: "popperOffsets", enabled: !0, phase: "read", fn: ij, data: {} };
function sj(e) {
return e === "x" ? "y" : "x";
}
function lj(e) {
var t = e.state, n = e.options, r = e.name, o = n.mainAxis, a = o === void 0 ? !0 : o, i = n.altAxis, s = i === void 0 ? !1 : i, u = n.boundary, l = 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 = rc(t, { boundary: u, rootBoundary: l, padding: d, altBoundary: c }), g = Jo(t.placement), b = kl(t.placement), x = !b, w = mm(g), C = sj(w), k = t.modifiersData.popperOffsets, E = t.rects.reference, S = t.rects.popper, O = typeof v == "function" ? v(Object.assign({}, t.rects, { placement: t.placement })) : v, F = typeof O == "number" ? { mainAxis: O, altAxis: O } : Object.assign({ mainAxis: 0, altAxis: 0 }, O), $ = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, A = { x: 0, y: 0 };
if (k) {
if (a) {
var L, N = w === "y" ? Fr : Ir, M = w === "y" ? uo : co, I = w === "y" ? "height" : "width", z = k[w], R = z + m[N], q = z - m[M], oe = h ? -S[I] / 2 : 0, Q = b === yl ? E[I] : S[I], ae = b === yl ? -S[I] : -E[I], pe = t.elements.arrow, we = h && pe ? gm(pe) : { width: 0, height: 0 }, ke = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : k5(), fe = ke[N], ge = ke[M], J = Du(0, E[I], we[I]), te = x ? E[I] / 2 - oe - J - fe - F.mainAxis : Q - J - fe - F.mainAxis, le = x ? -E[I] / 2 + oe + J + ge + F.mainAxis : ae + J + ge + F.mainAxis, Ee = t.elements.arrow && zc(t.elements.arrow), Ne = Ee ? w === "y" ? Ee.clientTop || 0 : Ee.clientLeft || 0 : 0, je = (L = $ == null ? void 0 : $[w]) != null ? L : 0, _e = z + te - je - Ne, De = z + le - je, Ae = Du(h ? Mp(R, _e) : R, z, h ? ts(q, De) : q);
k[w] = Ae, A[w] = Ae - z;
}
if (s) {
var Be, Ue = w === "x" ? Fr : Ir, Ze = w === "x" ? uo : co, Me = k[C], rt = C === "y" ? "height" : "width", nt = Me + m[Ue], st = Me - m[Ze], P = [Fr, Ir].indexOf(g) !== -1, j = (Be = $ == null ? void 0 : $[C]) != null ? Be : 0, se = P ? nt : Me - E[rt] - S[rt] - j + F.altAxis, ce = P ? Me + E[rt] + S[rt] - j - F.altAxis : st, de = h && P ? LV(se, Me, ce) : Du(h ? se : nt, Me, h ? ce : st);
k[C] = de, A[C] = de - Me;
}
t.modifiersData[r] = A;
}
}
var uj = { name: "preventOverflow", enabled: !0, phase: "main", fn: lj, requiresIfExists: ["offset"] };
function cj(e) {
return { scrollLeft: e.scrollLeft, scrollTop: e.scrollTop };
}
function dj(e) {
return e === Ro(e) || !no(e) ? ym(e) : cj(e);
}
function pj(e) {
var t = e.getBoundingClientRect(), n = wl(t.width) / e.offsetWidth || 1, r = wl(t.height) / e.offsetHeight || 1;
return n !== 1 || r !== 1;
}
function fj(e, t, n) {
n === void 0 && (n = !1);
var r = no(t), o = no(t) && pj(t), a = Ti(t), i = xl(e, o), s = { scrollLeft: 0, scrollTop: 0 }, u = { x: 0, y: 0 };
return (r || !r && !n) && ((na(t) !== "body" || wm(a)) && (s = dj(t)), no(t) ? (u = xl(t, !0), u.x += t.clientLeft, u.y += t.clientTop) : a && (u.x = bm(a))), { x: i.left + s.scrollLeft - u.x, y: i.top + s.scrollTop - u.y, width: i.width, height: i.height };
}
function hj(e) {
var t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set(), r = [];
e.forEach(function(a) {
t.set(a.name, a);
});
function o(a) {
n.add(a.name);
var i = [].concat(a.requires || [], a.requiresIfExists || []);
i.forEach(function(s) {
if (!n.has(s)) {
var u = t.get(s);
u && o(u);
}
}), r.push(a);
}
return e.forEach(function(a) {
n.has(a.name) || o(a);
}), r;
}
function vj(e) {
var t = hj(e);
return $V.reduce(function(n, r) {
return n.concat(t.filter(function(o) {
return o.phase === r;
}));
}, []);
}
function gj(e) {
var t;
return function() {
return t || (t = new Promise(function(n) {
Promise.resolve().then(function() {
t = void 0, n(e());
});
})), t;
};
}
function mj(e) {
var t = e.reduce(function(n, r) {
var o = n[r.name];
return n[r.name] = o ? Object.assign({}, o, r, { options: Object.assign({}, o.options, r.options), data: Object.assign({}, o.data, r.data) }) : r, n;
}, {});
return Object.keys(t).map(function(n) {
return t[n];
});
}
var r2 = { placement: "bottom", modifiers: [], strategy: "absolute" };
function o2() {
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 xm(e) {
e === void 0 && (e = {});
var t = e, n = t.defaultModifiers, r = n === void 0 ? [] : n, o = t.defaultOptions, a = o === void 0 ? r2 : o;
return function(i, s, u) {
u === void 0 && (u = a);
var l = { placement: "bottom", orderedModifiers: [], options: Object.assign({}, r2, a), modifiersData: {}, elements: { reference: i, popper: s }, attributes: {}, styles: {} }, c = [], d = !1, f = { state: l, setOptions: function(v) {
var m = typeof v == "function" ? v(l.options) : v;
p(), l.options = Object.assign({}, a, l.options, m), l.scrollParents = { reference: bl(i) ? Ru(i) : i.contextElement ? Ru(i.contextElement) : [], popper: Ru(s) };
var g = vj(mj([].concat(r, l.options.modifiers)));
return l.orderedModifiers = g.filter(function(b) {
return b.enabled;
}), h(), f.update();
}, forceUpdate: function() {
if (!d) {
var v = l.elements, m = v.reference, g = v.popper;
if (o2(m, g)) {
l.rects = { reference: fj(m, zc(g), l.options.strategy === "fixed"), popper: gm(g) }, l.reset = !1, l.placement = l.options.placement, l.orderedModifiers.forEach(function(S) {
return l.modifiersData[S.name] = Object.assign({}, S.data);
});
for (var b = 0; b < l.orderedModifiers.length; b++) {
if (l.reset === !0) {
l.reset = !1, b = -1;
continue;
}
var x = l.orderedModifiers[b], w = x.fn, C = x.options, k = C === void 0 ? {} : C, E = x.name;
typeof w == "function" && (l = w({ state: l, options: k, name: E, instance: f }) || l);
}
}
}
}, update: gj(function() {
return new Promise(function(v) {
f.forceUpdate(), v(l);
});
}), destroy: function() {
p(), d = !0;
} };
if (!o2(i, s)) return f;
f.setOptions(u).then(function(v) {
!d && u.onFirstUpdate && u.onFirstUpdate(v);
});
function h() {
l.orderedModifiers.forEach(function(v) {
var m = v.name, g = v.options, b = g === void 0 ? {} : g, x = v.effect;
if (typeof x == "function") {
var w = x({ state: l, name: m, instance: f, options: b }), C = function() {
};
c.push(w || C);
}
});
}
function p() {
c.forEach(function(v) {
return v();
}), c = [];
}
return f;
};
}
xm();
var yj = [_5, P5, S5, w5];
xm({ defaultModifiers: yj });
var bj = [_5, P5, S5, w5, aj, ej, uj, MV, nj], wj = xm({ defaultModifiers: bj });
const xj = (e, t, n = {}) => {
const r = {
name: "updateState",
enabled: !0,
phase: "write",
fn: ({ state: u }) => {
const l = kj(u);
Object.assign(i.value, l);
},
requires: ["computeStyles"]
}, o = _(() => {
const { onFirstUpdate: u, placement: l, strategy: c, modifiers: d } = y(n);
return {
onFirstUpdate: u,
placement: l || "bottom",
strategy: c || "absolute",
modifiers: [
...d || [],
r,
{ name: "applyStyles", enabled: !1 }
]
};
}), a = Yn(), i = H({
styles: {
popper: {
position: y(o).strategy,
left: "0",
top: "0"
},
arrow: {
position: "absolute"
}
},
attributes: {}
}), s = () => {
a.value && (a.value.destroy(), a.value = void 0);
};
return me(o, (u) => {
const l = y(a);
l && l.setOptions(u);
}, {
deep: !0
}), me([e, t], ([u, l]) => {
s(), !(!u || !l) && (a.value = wj(u, l, y(o)));
}), Rt(() => {
s();
}), {
state: _(() => {
var u;
return { ...((u = y(a)) == null ? void 0 : u.state) || {} };
}),
styles: _(() => y(i).styles),
attributes: _(() => y(i).attributes),
update: () => {
var u;
return (u = y(a)) == null ? void 0 : u.update();
},
forceUpdate: () => {
var u;
return (u = y(a)) == null ? void 0 : u.forceUpdate();
},
instanceRef: _(() => y(a))
};
};
function kj(e) {
const t = Object.keys(e.elements), n = i0(t.map((o) => [o, e.styles[o] || {}])), r = i0(t.map((o) => [o, e.attributes[o]]));
return {
styles: n,
attributes: r
};
}
function a2() {
let e;
const t = (r, o) => {
n(), e = window.setTimeout(r, o);
}, n = () => window.clearTimeout(e);
return r5(() => n()), {
registerTimeout: t,
cancelTimeout: n
};
}
const u0 = {
prefix: Math.floor(Math.random() * 1e4),
current: 0
}, Cj = Symbol("elIdInjection"), $5 = () => dt() ? $e(Cj, u0) : u0, Ej = (e) => {
const t = $5();
!Ur && t === u0 && ds("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 = pm();
return _(() => y(e) || `${n.value}-id-${t.prefix}-${t.current++}`);
};
let Zs = [];
const i2 = (e) => {
const t = e;
t.key === Bp.esc && Zs.forEach((n) => n(t));
}, Sj = (e) => {
ht(() => {
Zs.length === 0 && document.addEventListener("keydown", i2), Ur && Zs.push(e);
}), Rt(() => {
Zs = Zs.filter((t) => t !== e), Zs.length === 0 && Ur && document.removeEventListener("keydown", i2);
});
};
let s2;
const A5 = () => {
const e = pm(), t = $5(), n = _(() => `${e.value}-popper-container-${t.prefix}`), r = _(() => `#${n.value}`);
return {
id: n,
selector: r
};
}, _j = (e) => {
const t = document.createElement("div");
return t.id = e, document.body.appendChild(t), t;
}, Tj = () => {
const { id: e, selector: t } = A5();
return ng(() => {
Ur && (process.env.NODE_ENV === "test" || !s2 || !document.body.querySelector(t.value)) && (s2 = _j(e.value));
}), {
id: e,
selector: t
};
}, Oj = Rn({
showAfter: {
type: Number,
default: 0
},
hideAfter: {
type: Number,
default: 200
},
autoClose: {
type: Number,
default: 0
}
}), Pj = ({
showAfter: e,
hideAfter: t,
autoClose: n,
open: r,
close: o
}) => {
const { registerTimeout: a } = a2(), {
registerTimeout: i,
cancelTimeout: s
} = a2();
return {
onOpen: (u) => {
a(() => {
r(u);
const l = y(n);
tc(l) && l > 0 && i(() => {
o(u);
}, l);
}, y(e));
},
onClose: (u) => {
s(), a(() => {
o(u);
}, y(t));
}
};
}, F5 = Symbol("elForwardRef"), $j = (e) => {
ft(F5, {
setForwardRef: (t) => {
e.value = t;
}
});
}, Aj = (e) => ({
mounted(t) {
e(t);
},
updated(t) {
e(t);
},
unmounted() {
e(null);
}
}), l2 = {
current: 0
}, u2 = H(0), I5 = 2e3, c2 = Symbol("elZIndexContextKey"), N5 = Symbol("zIndexContextKey"), L5 = (e) => {
const t = dt() ? $e(c2, l2) : l2, n = e || (dt() ? $e(N5, void 0) : void 0), r = _(() => {
const i = y(n);
return tc(i) ? i : I5;
}), o = _(() => r.value + u2.value), a = () => (t.current++, u2.value = t.current, o.value);
return !Ur && !$e(c2) && ds("ZIndexInjection", `Looks like you are using server rendering, you must provide a z-index provider to ensure the hydration process to be succeed
usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`), {
initialZIndex: r,
currentZIndex: o,
nextZIndex: a
};
}, Fj = Hf({
type: String,
values: lV,
required: !1
}), D5 = Symbol("size"), Ij = () => {
const e = $e(D5, {});
return _(() => y(e.size) || "");
}, Nj = Symbol("emptyValuesContextKey");
Rn({
emptyValues: Array,
valueOnClear: {
type: [String, Number, Boolean, Function],
default: void 0,
validator: (e) => Eu(e) ? !e() : !e
}
});
const Lj = Rn({
ariaLabel: String,
ariaOrientation: {
type: String,
values: ["horizontal", "vertical", "undefined"]
},
ariaControls: String
}), R5 = (e) => Jz(Lj, e), B5 = Symbol(), zp = H();
function km(e, t = void 0) {
const n = dt() ? $e(B5, zp) : zp;
return e ? _(() => {
var r, o;
return (o = (r = n.value) == null ? void 0 : r[e]) != null ? o : t;
}) : n;
}
function Dj(e, t) {
const n = km(), r = mo(e, _(() => {
var s;
return ((s = n.value) == null ? void 0 : s.namespace) || op;
})), o = hV(_(() => {
var s;
return (s = n.value) == null ? void 0 : s.locale;
})), a = L5(_(() => {
var s;
return ((s = n.value) == null ? void 0 : s.zIndex) || I5;
})), i = _(() => {
var s;
return y(t) || ((s = n.value) == null ? void 0 : s.size) || "";
});
return Rj(_(() => y(n) || {})), {
ns: r,
locale: o,
zIndex: a,
size: i
};
}
const Rj = (e, t, n = !1) => {
var r;
const o = !!dt(), a = o ? km() : void 0, i = (r = void 0) != null ? r : o ? ft : void 0;
if (!i) {
ds("provideGlobalConfig", "provideGlobalConfig() can only be used inside setup().");
return;
}
const s = _(() => {
const u = y(e);
return a != null && a.value ? Bj(a.value, u) : u;
});
return i(B5, s), i(g5, _(() => s.value.locale)), i(m5, _(() => s.value.namespace)), i(N5, _(() => s.value.zIndex)), i(D5, {
size: _(() => s.value.size || "")
}), i(Nj, _(() => ({
emptyValues: s.value.emptyValues,
valueOnClear: s.value.valueOnClear
}))), (n || !zp.value) && (zp.value = s.value), s;
}, Bj = (e, t) => {
const n = [.../* @__PURE__ */ new Set([...Gb(e), ...Gb(t)])], r = {};
for (const o of n)
r[o] = t[o] !== void 0 ? t[o] : e[o];
return r;
};
var fr = (e, t) => {
const n = e.__vccOpts || e;
for (const [r, o] of t)
n[r] = o;
return n;
};
const Mj = Rn({
size: {
type: Ot([Number, String])
},
color: {
type: String
}
}), zj = Z({
name: "ElIcon",
inheritAttrs: !1
}), Vj = /* @__PURE__ */ Z({
...zj,
props: Mj,
setup(e) {
const t = e, n = mo("icon"), r = _(() => {
const { size: o, color: a } = t;
return !o && !a ? {} : {
fontSize: Qz(o) ? void 0 : h5(o),
"--color": a
};
});
return (o, a) => (T(), B("i", Xt({
class: y(n).b(),
style: y(r)
}, o.$attrs), [
ve(o.$slots, "default")
], 16));
}
});
var jj = /* @__PURE__ */ fr(Vj, [["__file", "icon.vue"]]);
const d2 = Os(jj), Cm = Symbol("formContextKey"), Vp = Symbol("formItemContextKey"), Hj = (e, t = {}) => {
const n = H(void 0), r = t.prop ? n : y5("size"), o = t.global ? n : Ij(), a = t.form ? { size: void 0 } : $e(Cm, void 0), i = t.formItem ? { size: void 0 } : $e(Vp, void 0);
return _(() => r.value || y(e) || (i == null ? void 0 : i.size) || (a == null ? void 0 : a.size) || o.value || "");
}, M5 = (e) => {
const t = y5("disabled"), n = $e(Cm, void 0);
return _(() => t.value || y(e) || (n == null ? void 0 : n.disabled) || !1);
}, Uj = () => {
const e = $e(Cm, void 0), t = $e(Vp, void 0);
return {
form: e,
formItem: t
};
}, Em = Symbol("popper"), z5 = Symbol("popperContent"), qj = [
"dialog",
"grid",
"group",
"listbox",
"menu",
"navigation",
"tooltip",
"tree"
], V5 = Rn({
role: {
type: String,
values: qj,
default: "tooltip"
}
}), Wj = Z({
name: "ElPopper",
inheritAttrs: !1
}), Kj = /* @__PURE__ */ Z({
...Wj,
props: V5,
setup(e, { expose: t }) {
const n = e, r = H(), o = H(), a = H(), i = H(), s = _(() => n.role), u = {
triggerRef: r,
popperInstanceRef: o,
contentRef: a,
referenceRef: i,
role: s
};
return t(u), ft(Em, u), (l, c) => ve(l.$slots, "default");
}
});
var Gj = /* @__PURE__ */ fr(Kj, [["__file", "popper.vue"]]);
const j5 = Rn({
arrowOffset: {
type: Number,
default: 5
}
}), Xj = Z({
name: "ElPopperArrow",
inheritAttrs: !1
}), Yj = /* @__PURE__ */ Z({
...Xj,
props: j5,
setup(e, { expose: t }) {
const n = e, r = mo("popper"), { arrowOffset: o, arrowRef: a, arrowStyle: i } = $e(z5, void 0);
return me(() => n.arrowOffset, (s) => {
o.value = s;
}), Rt(() => {
a.value = void 0;
}), t({
arrowRef: a
}), (s, u) => (T(), B("span", {
ref_key: "arrowRef",
ref: a,
class: W(y(r).e("arrow")),
style: lt(y(i)),
"data-popper-arrow": ""
}, null, 6));
}
});
var Zj = /* @__PURE__ */ fr(Yj, [["__file", "arrow.vue"]]);
const Qh = "ElOnlyChild", Jj = Z({
name: Qh,
setup(e, {
slots: t,
attrs: n
}) {
var r;
const o = $e(F5), a = Aj((r = o == null ? void 0 : o.setForwardRef) != null ? r : Np);
return () => {
var i;
const s = (i = t.default) == null ? void 0 : i.call(t, n);
if (!s)
return null;
if (s.length > 1)
return ds(Qh, "requires exact only one valid child."), null;
const u = H5(s);
return u ? tt(og(u, n), [[a]]) : (ds(Qh, "no valid child node found"), null);
};
}
});
function H5(e) {
if (!e)
return null;
const t = e;
for (const n of t) {
if (Rc(n))
switch (n.type) {
case ag:
continue;
case Ll:
case "svg":
return p2(n);
case Qe:
return H5(n.children);
default:
return n;
}
return p2(n);
}
return null;
}
function p2(e) {
const t = mo("only-child");
return ee("span", {
class: t.e("content")
}, [e]);
}
const U5 = Rn({
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
}), Qj = Z({
name: "ElPopperTrigger",
inheritAttrs: !1
}), eH = /* @__PURE__ */ Z({
...Qj,
props: U5,
setup(e, { expose: t }) {
const n = e, { role: r, triggerRef: o } = $e(Em, void 0);
$j(o);
const a = _(() => s.value ? n.id : void 0), i = _(() => {
if (r && r.value === "tooltip")
return n.open && n.id ? n.id : void 0;
}), s = _(() => {
if (r && r.value !== "tooltip")
return r.value;
}), u = _(() => s.value ? `${n.open}` : void 0);
let l;
const c = [
"onMouseenter",
"onMouseleave",
"onClick",
"onKeydown",
"onFocus",
"onBlur",
"onContextmenu"
];
return ht(() => {
me(() => n.virtualRef, (d) => {
d && (o.value = Wi(d));
}, {
immediate: !0
}), me(o, (d, f) => {
l == null || l(), l = void 0, Lu(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));
}), l = me([a, i, s, u], (h) => {
[
"aria-controls",
"aria-describedby",
"aria-haspopup",
"aria-expanded"
].forEach((p, v) => {
cm(h[v]) ? d.removeAttribute(p) : d.setAttribute(p, h[v]);
});
}, { immediate: !0 })), Lu(f) && [
"aria-controls",
"aria-describedby",
"aria-haspopup",
"aria-expanded"
].forEach((h) => f.removeAttribute(h));
}, {
immediate: !0
});
}), Rt(() => {
if (l == null || l(), l = void 0, o.value && Lu(o.value)) {
const d = o.value;
c.forEach((f) => {
const h = n[f];
h && d.removeEventListener(f.slice(2).toLowerCase(), h);
}), o.value = void 0;
}
}), t({
triggerRef: o
}), (d, f) => d.virtualTriggering ? ne("v-if", !0) : (T(), ie(y(Jj), Xt({ key: 0 }, d.$attrs, {
"aria-controls": y(a),
"aria-describedby": y(i),
"aria-expanded": y(u),
"aria-haspopup": y(s)
}), {
default: G(() => [
ve(d.$slots, "default")
]),
_: 3
}, 16, ["aria-controls", "aria-describedby", "aria-expanded", "aria-haspopup"]));
}
});
var tH = /* @__PURE__ */ fr(eH, [["__file", "trigger.vue"]]);
const ev = "focus-trap.focus-after-trapped", tv = "focus-trap.focus-after-released", nH = "focus-trap.focusout-prevented", f2 = {
cancelable: !0,
bubbles: !1
}, rH = {
cancelable: !0,
bubbles: !1
}, h2 = "focusAfterTrapped", v2 = "focusAfterReleased", oH = Symbol("elFocusTrap"), Sm = H(), qf = H(0), _m = H(0);
let kd = 0;
const q5 = (e) => {
const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
acceptNode: (r) => {
const o = r.tagName === "INPUT" && r.type === "hidden";
return r.disabled || r.hidden || o ? NodeFilter.FILTER_SKIP : r.tabIndex >= 0 || r === document.activeElement ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
}
});
for (; n.nextNode(); )
t.push(n.currentNode);
return t;
}, g2 = (e, t) => {
for (const n of e)
if (!aH(n, t))
return n;
}, aH = (e, t) => {
if (process.env.NODE_ENV === "test")
return !1;
if (getComputedStyle(e).visibility === "hidden")
return !0;
for (; e; ) {
if (t && e === t)
return !1;
if (getComputedStyle(e).display === "none")
return !0;
e = e.parentElement;
}
return !1;
}, iH = (e) => {
const t = q5(e), n = g2(t, e), r = g2(t.reverse(), e);
return [n, r];
}, sH = (e) => e instanceof HTMLInputElement && "select" in e, Ka = (e, t) => {
if (e && e.focus) {
const n = document.activeElement;
e.focus({ preventScroll: !0 }), _m.value = window.performance.now(), e !== n && sH(e) && t && e.select();
}
};
function m2(e, t) {
const n = [...e], r = e.indexOf(t);
return r !== -1 && n.splice(r, 1), n;
}
const lH = () => {
let e = [];
return {
push: (t) => {
const n = e[0];
n && t !== n && n.pause(), e = m2(e, t), e.unshift(t);
},
remove: (t) => {
var n, r;
e = m2(e, t), (r = (n = e[0]) == null ? void 0 : n.resume) == null || r.call(n);
}
};
}, uH = (e, t = !1) => {
const n = document.activeElement;
for (const r of e)
if (Ka(r, t), document.activeElement !== n)
return;
}, y2 = lH(), cH = () => qf.value > _m.value, Cd = () => {
Sm.value = "pointer", qf.value = window.performance.now();
}, b2 = () => {
Sm.value = "keyboard", qf.value = window.performance.now();
}, dH = () => (ht(() => {
kd === 0 && (document.addEventListener("mousedown", Cd), document.addEventListener("touchstart", Cd), document.addEventListener("keydown", b2)), kd++;
}), Rt(() => {
kd--, kd <= 0 && (document.removeEventListener("mousedown", Cd), document.removeEventListener("touchstart", Cd), document.removeEventListener("keydown", b2));
}), {
focusReason: Sm,
lastUserFocusTimestamp: qf,
lastAutomatedFocusTimestamp: _m
}), Ed = (e) => new CustomEvent(nH, {
...rH,
detail: e
}), pH = Z({
name: "ElFocusTrap",
inheritAttrs: !1,
props: {
loop: Boolean,
trapped: Boolean,
focusTrapEl: Object,
focusStartEl: {
type: [Object, String],
default: "first"
}
},
emits: [
h2,
v2,
"focusin",
"focusout",
"focusout-prevented",
"release-requested"
],
setup(e, { emit: t }) {
const n = H();
let r, o;
const { focusReason: a } = dH();
Sj((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: b, currentTarget: x, shiftKey: w } = p, { loop: C } = e, k = v === Bp.tab && !m && !g && !b, E = document.activeElement;
if (k && E) {
const S = x, [O, F] = iH(S);
if (O && F) {
if (!w && E === F) {
const $ = Ed({
focusReason: a.value
});
t("focusout-prevented", $), $.defaultPrevented || (p.preventDefault(), C && Ka(O, !0));
} else if (w && [O, S].includes(E)) {
const $ = Ed({
focusReason: a.value
});
t("focusout-prevented", $), $.defaultPrevented || (p.preventDefault(), C && Ka(F, !0));
}
} else if (E === S) {
const $ = Ed({
focusReason: a.value
});
t("focusout-prevented", $), $.defaultPrevented || p.preventDefault();
}
}
};
ft(oH, {
focusTrapRef: n,
onKeydown: s
}), me(() => e.focusTrapEl, (p) => {
p && (n.value = p);
}, { immediate: !0 }), me([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 u = (p) => {
t(h2, p);
}, l = (p) => t(v2, p), c = (p) => {
const v = y(n);
if (!v)
return;
const m = p.target, g = p.relatedTarget, b = m && v.contains(m);
e.trapped || g && v.contains(g) || (r = g), b && t("focusin", p), !i.paused && e.trapped && (b ? o = m : Ka(o, !0));
}, d = (p) => {
const v = y(n);
if (!(i.paused || !v))
if (e.trapped) {
const m = p.relatedTarget;
!cm(m) && !v.contains(m) && setTimeout(() => {
if (!i.paused && e.trapped) {
const g = Ed({
focusReason: a.value
});
t("focusout-prevented", g), g.defaultPrevented || Ka(o, !0);
}
}, 0);
} else {
const m = p.target;
m && v.contains(m) || t("focusout", p);
}
};
async function f() {
await Ge();
const p = y(n);
if (p) {
y2.push(i);
const v = p.contains(document.activeElement) ? r : document.activeElement;
if (r = v, !p.contains(v)) {
const m = new Event(ev, f2);
p.addEventListener(ev, u), p.dispatchEvent(m), m.defaultPrevented || Ge(() => {
let g = e.focusStartEl;
zl(g) || (Ka(g), document.activeElement !== g && (g = "first")), g === "first" && uH(q5(p), !0), (document.activeElement === v || g === "container") && Ka(p);
});
}
}
}
function h() {
const p = y(n);
if (p) {
p.removeEventListener(ev, u);
const v = new CustomEvent(tv, {
...f2,
detail: {
focusReason: a.value
}
});
p.addEventListener(tv, l), p.dispatchEvent(v), !v.defaultPrevented && (a.value == "keyboard" || !cH() || p.contains(document.activeElement)) && Ka(r ?? document.body), p.removeEventListener(tv, l), y2.remove(i);
}
}
return ht(() => {
e.trapped && f(), me(() => e.trapped, (p) => {
p ? f() : h();
});
}), Rt(() => {
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 fH(e, t, n, r, o, a) {
return ve(e.$slots, "default", { handleKeydown: e.onKeydown });
}
var hH = /* @__PURE__ */ fr(pH, [["render", fH], ["__file", "focus-trap.vue"]]);
const vH = ["fixed", "absolute"], gH = Rn({
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: hm,
default: "bottom"
},
popperOptions: {
type: Ot(Object),
default: () => ({})
},
strategy: {
type: String,
values: vH,
default: "absolute"
}
}), W5 = Rn({
...gH,
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,
...R5(["ariaLabel"])
}), mH = {
mouseenter: (e) => e instanceof MouseEvent,
mouseleave: (e) => e instanceof MouseEvent,
focus: () => !0,
blur: () => !0,
close: () => !0
}, yH = (e, t = []) => {
const { placement: n, strategy: r, popperOptions: o } = e, a = {
placement: n,
strategy: r,
...o,
modifiers: [...wH(e), ...t]
};
return xH(a, o == null ? void 0 : o.modifiers), a;
}, bH = (e) => {
if (Ur)
return Wi(e);
};
function wH(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 xH(e, t) {
t && (e.modifiers = [...e.modifiers, ...t ?? []]);
}
const kH = 0, CH = (e) => {
const { popperInstanceRef: t, contentRef: n, triggerRef: r, role: o } = $e(Em, void 0), a = H(), i = H(), s = _(() => ({
name: "eventListeners",
enabled: !!e.visible
})), u = _(() => {
var g;
const b = y(a), x = (g = y(i)) != null ? g : kH;
return {
name: "arrow",
enabled: !Gz(b),
options: {
element: b,
padding: x
}
};
}), l = _(() => ({
onFirstUpdate: () => {
p();
},
...yH(e, [
y(u),
y(s)
])
})), c = _(() => bH(e.referenceEl) || y(r)), { attributes: d, state: f, styles: h, update: p, forceUpdate: v, instanceRef: m } = xj(c, n, l);
return me(m, (g) => t.value = g), ht(() => {
me(() => {
var g;
return (g = y(c)) == null ? void 0 : g.getBoundingClientRect();
}, () => {
p();
});
}), {
attributes: d,
arrowRef: a,
contentRef: n,
instanceRef: m,
state: f,
styles: h,
role: o,
forceUpdate: v,
update: p
};
}, EH = (e, {
attributes: t,
styles: n,
role: r
}) => {
const { nextZIndex: o } = L5(), a = mo("popper"), i = _(() => y(t).popper), s = H(tc(e.zIndex) ? e.zIndex : o()), u = _(() => [
a.b(),
a.is("pure", e.pure),
a.is(e.effect),
e.popperClass
]), l = _(() => [
{ zIndex: y(s) },
y(n).popper,
e.popperStyle || {}
]), c = _(() => r.value === "dialog" ? "false" : void 0), d = _(() => y(n).arrow || {});
return {
ariaModal: c,
arrowStyle: d,
contentAttrs: i,
contentClass: u,
contentStyle: l,
contentZIndex: s,
updateZIndex: () => {
s.value = tc(e.zIndex) ? e.zIndex : o();
}
};
}, SH = (e, t) => {
const n = H(!1), r = H();
return {
focusStartRef: r,
trapped: n,
onFocusAfterReleased: (o) => {
var a;
((a = o.detail) == null ? void 0 : a.focusReason) !== "pointer" && (r.value = "first", t("blur"));
},
onFocusAfterTrapped: () => {
t("focus");
},
onFocusInTrap: (o) => {
e.visible && !n.value && (o.target && (r.value = o.target), n.value = !0);
},
onFocusoutPrevented: (o) => {
e.trapping || (o.detail.focusReason === "pointer" && o.preventDefault(), n.value = !1);
},
onReleaseRequested: () => {
n.value = !1, t("close");
}
};
}, _H = Z({
name: "ElPopperContent"
}), TH = /* @__PURE__ */ Z({
..._H,
props: W5,
emits: mH,
setup(e, { expose: t, emit: n }) {
const r = e, {
focusStartRef: o,
trapped: a,
onFocusAfterReleased: i,
onFocusAfterTrapped: s,
onFocusInTrap: u,
onFocusoutPrevented: l,
onReleaseRequested: c
} = SH(r, n), { attributes: d, arrowRef: f, contentRef: h, styles: p, instanceRef: v, role: m, update: g } = CH(r), {
ariaModal: b,
arrowStyle: x,
contentAttrs: w,
contentClass: C,
contentStyle: k,
updateZIndex: E
} = EH(r, {
styles: p,
attributes: d,
role: m
}), S = $e(Vp, void 0), O = H();
ft(z5, {
arrowStyle: x,
arrowRef: f,
arrowOffset: O
}), S && ft(Vp, {
...S,
addInputId: Np,
removeInputId: Np
});
let F;
const $ = (L = !0) => {
g(), L && E();
}, A = () => {
$(!1), r.visible && r.focusOnShow ? a.value = !0 : r.visible === !1 && (a.value = !1);
};
return ht(() => {
me(() => r.triggerTargetEl, (L, N) => {
F == null || F(), F = void 0;
const M = y(L || h.value), I = y(N || h.value);
Lu(M) && (F = me([m, () => r.ariaLabel, b, () => r.id], (z) => {
["role", "aria-label", "aria-modal", "id"].forEach((R, q) => {
cm(z[q]) ? M.removeAttribute(R) : M.setAttribute(R, z[q]);
});
}, { immediate: !0 })), I !== M && Lu(I) && ["role", "aria-label", "aria-modal", "id"].forEach((z) => {
I.removeAttribute(z);
});
}, { immediate: !0 }), me(() => r.visible, A, { immediate: !0 });
}), Rt(() => {
F == null || F(), F = void 0;
}), t({
popperContentRef: h,
popperInstanceRef: v,
updatePopper: $,
contentStyle: k
}), (L, N) => (T(), B("div", Xt({
ref_key: "contentRef",
ref: h
}, y(w), {
style: y(k),
class: y(C),
tabindex: "-1",
onMouseenter: (M) => L.$emit("mouseenter", M),
onMouseleave: (M) => L.$emit("mouseleave", M)
}), [
ee(y(hH), {
trapped: y(a),
"trap-on-focus-in": !0,
"focus-trap-el": y(h),
"focus-start-el": y(o),
onFocusAfterTrapped: y(s),
onFocusAfterReleased: y(i),
onFocusin: y(u),
onFocusoutPrevented: y(l),
onReleaseRequested: y(c)
}, {
default: G(() => [
ve(L.$slots, "default")
]),
_: 3
}, 8, ["trapped", "focus-trap-el", "focus-start-el", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusin", "onFocusoutPrevented", "onReleaseRequested"])
], 16, ["onMouseenter", "onMouseleave"]));
}
});
var OH = /* @__PURE__ */ fr(TH, [["__file", "content.vue"]]);
const PH = Os(Gj), Tm = Symbol("elTooltip"), Zr = Rn({
...Oj,
...W5,
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,
...R5(["ariaLabel"])
}), oc = Rn({
...U5,
disabled: Boolean,
trigger: {
type: Ot([String, Array]),
default: "hover"
},
triggerKeys: {
type: Ot(Array),
default: () => [Bp.enter, Bp.space]
}
}), {
useModelToggleProps: $H,
useModelToggleEmits: AH,
useModelToggle: FH
} = yV("visible"), IH = Rn({
...V5,
...$H,
...Zr,
...oc,
...j5,
showArrow: {
type: Boolean,
default: !0
}
}), NH = [
...AH,
"before-show",
"before-hide",
"show",
"hide",
"open",
"close"
], LH = (e, t) => e7(e) ? e.includes(t) : e === t, zs = (e, t, n) => (r) => {
LH(y(e), t) && n(r);
}, DH = Z({
name: "ElTooltipTrigger"
}), RH = /* @__PURE__ */ Z({
...DH,
props: oc,
setup(e, { expose: t }) {
const n = e, r = mo("tooltip"), { controlled: o, id: a, open: i, onOpen: s, onClose: u, onToggle: l } = $e(Tm, void 0), c = H(null), d = () => {
if (y(o) || n.disabled)
return !0;
}, f = jt(n, "trigger"), h = ha(d, zs(f, "hover", s)), p = ha(d, zs(f, "hover", u)), v = ha(d, zs(f, "click", (w) => {
w.button === 0 && l(w);
})), m = ha(d, zs(f, "focus", s)), g = ha(d, zs(f, "focus", u)), b = ha(d, zs(f, "contextmenu", (w) => {
w.preventDefault(), l(w);
})), x = ha(d, (w) => {
const { code: C } = w;
n.triggerKeys.includes(C) && (w.preventDefault(), l(w));
});
return t({
triggerRef: c
}), (w, C) => (T(), ie(y(tH), {
id: y(a),
"virtual-ref": w.virtualRef,
open: y(i),
"virtual-triggering": w.virtualTriggering,
class: W(y(r).e("trigger")),
onBlur: y(g),
onClick: y(v),
onContextmenu: y(b),
onFocus: y(m),
onMouseenter: y(h),
onMouseleave: y(p),
onKeydown: y(x)
}, {
default: G(() => [
ve(w.$slots, "default")
]),
_: 3
}, 8, ["id", "virtual-ref", "open", "virtual-triggering", "class", "onBlur", "onClick", "onContextmenu", "onFocus", "onMouseenter", "onMouseleave", "onKeydown"]));
}
});
var BH = /* @__PURE__ */ fr(RH, [["__file", "trigger.vue"]]);
const MH = Rn({
to: {
type: Ot([String, Object]),
required: !0
},
disabled: Boolean
}), zH = /* @__PURE__ */ Z({
__name: "teleport",
props: MH,
setup(e) {
return (t, n) => t.disabled ? ve(t.$slots, "default", { key: 0 }) : (T(), ie(ig, {
key: 1,
to: t.to
}, [
ve(t.$slots, "default")
], 8, ["to"]));
}
});
var VH = /* @__PURE__ */ fr(zH, [["__file", "teleport.vue"]]);
const jH = Os(VH), HH = Z({
name: "ElTooltipContent",
inheritAttrs: !1
}), UH = /* @__PURE__ */ Z({
...HH,
props: Zr,
setup(e, { expose: t }) {
const n = e, { selector: r } = A5(), o = mo("tooltip"), a = H(null);
let i;
const {
controlled: s,
id: u,
open: l,
trigger: c,
onClose: d,
onOpen: f,
onShow: h,
onHide: p,
onBeforeShow: v,
onBeforeHide: m
} = $e(Tm, void 0), g = _(() => n.transition || `${o.namespace.value}-fade-in-linear`), b = _(() => process.env.NODE_ENV === "test" ? !0 : n.persistent);
Rt(() => {
i == null || i();
});
const x = _(() => y(b) ? !0 : y(l)), w = _(() => n.disabled ? !1 : y(l)), C = _(() => n.appendTo || r.value), k = _(() => {
var I;
return (I = n.style) != null ? I : {};
}), E = H(!0), S = () => {
p(), E.value = !0;
}, O = () => {
if (y(s))
return !0;
}, F = ha(O, () => {
n.enterable && y(c) === "hover" && f();
}), $ = ha(O, () => {
y(c) === "hover" && d();
}), A = () => {
var I, z;
(z = (I = a.value) == null ? void 0 : I.updatePopper) == null || z.call(I), v == null || v();
}, L = () => {
m == null || m();
}, N = () => {
h(), i = KM(_(() => {
var I;
return (I = a.value) == null ? void 0 : I.popperContentRef;
}), () => {
y(s) || y(c) !== "hover" && d();
});
}, M = () => {
n.virtualTriggering || d();
};
return me(() => y(l), (I) => {
I ? E.value = !1 : i == null || i();
}, {
flush: "post"
}), me(() => n.content, () => {
var I, z;
(z = (I = a.value) == null ? void 0 : I.updatePopper) == null || z.call(I);
}), t({
contentRef: a
}), (I, z) => (T(), ie(y(jH), {
disabled: !I.teleported,
to: y(C)
}, {
default: G(() => [
ee(Kr, {
name: y(g),
onAfterLeave: S,
onBeforeEnter: A,
onAfterEnter: N,
onBeforeLeave: L
}, {
default: G(() => [
y(x) ? tt((T(), ie(y(OH), Xt({
key: 0,
id: y(u),
ref_key: "contentRef",
ref: a
}, I.$attrs, {
"aria-label": I.ariaLabel,
"aria-hidden": E.value,
"boundaries-padding": I.boundariesPadding,
"fallback-placements": I.fallbackPlacements,
"gpu-acceleration": I.gpuAcceleration,
offset: I.offset,
placement: I.placement,
"popper-options": I.popperOptions,
strategy: I.strategy,
effect: I.effect,
enterable: I.enterable,
pure: I.pure,
"popper-class": I.popperClass,
"popper-style": [I.popperStyle, y(k)],
"reference-el": I.referenceEl,
"trigger-target-el": I.triggerTargetEl,
visible: y(w),
"z-index": I.zIndex,
onMouseenter: y(F),
onMouseleave: y($),
onBlur: M,
onClose: y(d)
}), {
default: G(() => [
ve(I.$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"])), [
[Pt, y(w)]
]) : ne("v-if", !0)
]),
_: 3
}, 8, ["name"])
]),
_: 3
}, 8, ["disabled", "to"]));
}
});
var qH = /* @__PURE__ */ fr(UH, [["__file", "content.vue"]]);
const WH = Z({
name: "ElTooltip"
}), KH = /* @__PURE__ */ Z({
...WH,
props: IH,
emits: NH,
setup(e, { expose: t, emit: n }) {
const r = e;
Tj();
const o = Ej(), a = H(), i = H(), s = () => {
var g;
const b = y(a);
b && ((g = b.popperInstanceRef) == null || g.update());
}, u = H(!1), l = H(), { show: c, hide: d, hasUpdateHandler: f } = FH({
indicator: u,
toggleReason: l
}), { onOpen: h, onClose: p } = Pj({
showAfter: jt(r, "showAfter"),
hideAfter: jt(r, "hideAfter"),
autoClose: jt(r, "autoClose"),
open: c,
close: d
}), v = _(() => dm(r.visible) && !f.value);
ft(Tm, {
controlled: v,
id: o,
open: ff(u),
trigger: jt(r, "trigger"),
onOpen: (g) => {
h(g);
},
onClose: (g) => {
p(g);
},
onToggle: (g) => {
y(u) ? p(g) : h(g);
},
onShow: () => {
n("show", l.value);
},
onHide: () => {
n("hide", l.value);
},
onBeforeShow: () => {
n("before-show", l.value);
},
onBeforeHide: () => {
n("before-hide", l.value);
},
updatePopper: s
}), me(() => r.disabled, (g) => {
g && u.value && (u.value = !1);
});
const m = (g) => {
var b, x;
const w = (x = (b = i.value) == null ? void 0 : b.contentRef) == null ? void 0 : x.popperContentRef, C = (g == null ? void 0 : g.relatedTarget) || document.activeElement;
return w && w.contains(C);
};
return sg(() => u.value && d()), t({
popperRef: a,
contentRef: i,
isFocusInsideContent: m,
updatePopper: s,
onOpen: h,
onClose: p,
hide: d
}), (g, b) => (T(), ie(y(PH), {
ref_key: "popperRef",
ref: a,
role: g.role
}, {
default: G(() => [
ee(BH, {
disabled: g.disabled,
trigger: g.trigger,
"trigger-keys": g.triggerKeys,
"virtual-ref": g.virtualRef,
"virtual-triggering": g.virtualTriggering
}, {
default: G(() => [
g.$slots.default ? ve(g.$slots, "default", { key: 0 }) : ne("v-if", !0)
]),
_: 3
}, 8, ["disabled", "trigger", "trigger-keys", "virtual-ref", "virtual-triggering"]),
ee(qH, {
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: G(() => [
ve(g.$slots, "content", {}, () => [
g.rawContent ? (T(), B("span", {
key: 0,
innerHTML: g.content
}, null, 8, ["innerHTML"])) : (T(), B("span", { key: 1 }, Te(g.content), 1))
]),
g.showArrow ? (T(), ie(y(Zj), {
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 GH = /* @__PURE__ */ fr(KH, [["__file", "tooltip.vue"]]);
const XH = Os(GH), K5 = Symbol("buttonGroupContextKey"), YH = (e, t) => {
uV({
from: "type.text",
replacement: "link",
version: "3.0.0",
scope: "props",
ref: "https://element-plus.org/en-US/component/button.html#button-attributes"
}, _(() => e.type === "text"));
const n = $e(K5, void 0), r = km("button"), { form: o } = Uj(), a = Hj(_(() => n == null ? void 0 : n.size)), i = M5(), s = H(), u = ho(), l = _(() => e.type || (n == null ? void 0 : n.type) || ""), c = _(() => {
var h, p, v;
return (v = (p = e.autoInsertSpace) != null ? p : (h = r.value) == null ? void 0 : h.autoInsertSpace) != null ? v : !1;
}), d = _(() => e.tag === "button" ? {
ariaDisabled: i.value || e.loading,
disabled: i.value || e.loading,
autofocus: e.autofocus,
type: e.nativeType
} : {}), f = _(() => {
var h;
const p = (h = u.default) == null ? void 0 : h.call(u);
if (c.value && (p == null ? void 0 : p.length) === 1) {
const v = p[0];
if ((v == null ? void 0 : v.type) === Ll) {
const m = v.children;
return new RegExp("^\\p{Unified_Ideograph}{2}$", "u").test(m.trim());
}
}
return !1;
});
return {
_disabled: i,
_size: a,
_type: l,
_ref: s,
_props: d,
shouldAddSpace: f,
handleClick: (h) => {
if (i.value || e.loading) {
h.stopPropagation();
return;
}
e.nativeType === "reset" && (o == null || o.resetFields()), t("click", h);
}
};
}, ZH = [
"default",
"primary",
"success",
"warning",
"info",
"danger",
"text",
""
], JH = ["button", "submit", "reset"], c0 = Rn({
size: Fj,
disabled: Boolean,
type: {
type: String,
values: ZH,
default: ""
},
icon: {
type: s0
},
nativeType: {
type: String,
values: JH,
default: "button"
},
loading: Boolean,
loadingIcon: {
type: s0,
default: () => oV
},
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"
}
}), QH = {
click: (e) => e instanceof MouseEvent
};
function Jn(e, t) {
eU(e) && (e = "100%");
var n = tU(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 Sd(e) {
return Math.min(1, Math.max(0, e));
}
function eU(e) {
return typeof e == "string" && e.indexOf(".") !== -1 && parseFloat(e) === 1;
}
function tU(e) {
return typeof e == "string" && e.indexOf("%") !== -1;
}
function G5(e) {
return e = parseFloat(e), (isNaN(e) || e < 0 || e > 1) && (e = 1), e;
}
function _d(e) {
return e <= 1 ? "".concat(Number(e) * 100, "%") : e;
}
function Ki(e) {
return e.length === 1 ? "0" + e : String(e);
}
function nU(e, t, n) {
return {
r: Jn(e, 255) * 255,
g: Jn(t, 255) * 255,
b: Jn(n, 255) * 255
};
}
function w2(e, t, n) {
e = Jn(e, 255), t = Jn(t, 255), n = Jn(n, 255);
var r = Math.max(e, t, n), o = Math.min(e, t, n), a = 0, i = 0, s = (r + o) / 2;
if (r === o)
i = 0, a = 0;
else {
var u = r - o;
switch (i = s > 0.5 ? u / (2 - r - o) : u / (r + o), r) {
case e:
a = (t - n) / u + (t < n ? 6 : 0);
break;
case t:
a = (n - e) / u + 2;
break;
case n:
a = (e - t) / u + 4;
break;
}
a /= 6;
}
return { h: a, s: i, l: s };
}
function nv(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 rU(e, t, n) {
var r, o, a;
if (e = Jn(e, 360), t = Jn(t, 100), n = Jn(n, 100), t === 0)
o = n, a = n, r = n;
else {
var i = n < 0.5 ? n * (1 + t) : n + t - n * t, s = 2 * n - i;
r = nv(s, i, e + 1 / 3), o = nv(s, i, e), a = nv(s, i, e - 1 / 3);
}
return { r: r * 255, g: o * 255, b: a * 255 };
}
function x2(e, t, n) {
e = Jn(e, 255), t = Jn(t, 255), n = Jn(n, 255);
var r = Math.max(e, t, n), o = Math.min(e, t, n), a = 0, i = r, s = r - o, u = r === 0 ? 0 : s / r;
if (r === o)
a = 0;
else {
switch (r) {
case e:
a = (t - n) / s + (t < n ? 6 : 0);
break;
case t:
a = (n - e) / s + 2;
break;
case n:
a = (e - t) / s + 4;
break;
}
a /= 6;
}
return { h: a, s: u, v: i };
}
function oU(e, t, n) {
e = Jn(e, 360) * 6, t = Jn(t, 100), n = Jn(n, 100);
var r = Math.floor(e), o = e - r, a = n * (1 - t), i = n * (1 - o * t), s = n * (1 - (1 - o) * t), u = r % 6, l = [n, i, a, a, s, n][u], c = [s, n, n, i, a, a][u], d = [a, a, s, n, n, i][u];
return { r: l * 255, g: c * 255, b: d * 255 };
}
function k2(e, t, n, r) {
var o = [
Ki(Math.round(e).toString(16)),
Ki(Math.round(t).toString(16)),
Ki(Math.round(n).toString(16))
];
return r && o[0].startsWith(o[0].charAt(1)) && o[1].startsWith(o[1].charAt(1)) && o[2].startsWith(o[2].charAt(1)) ? o[0].charAt(0) + o[1].charAt(0) + o[2].charAt(0) : o.join("");
}
function aU(e, t, n, r, o) {
var a = [
Ki(Math.round(e).toString(16)),
Ki(Math.round(t).toString(16)),
Ki(Math.round(n).toString(16)),
Ki(iU(r))
];
return o && a[0].startsWith(a[0].charAt(1)) && a[1].startsWith(a[1].charAt(1)) && a[2].startsWith(a[2].charAt(1)) && a[3].startsWith(a[3].charAt(1)) ? a[0].charAt(0) + a[1].charAt(0) + a[2].charAt(0) + a[3].charAt(0) : a.join("");
}
function iU(e) {
return Math.round(parseFloat(e) * 255).toString(16);
}
function C2(e) {
return Vr(e) / 255;
}
function Vr(e) {
return parseInt(e, 16);
}
function sU(e) {
return {
r: e >> 16,
g: (e & 65280) >> 8,
b: e & 255
};
}
var d0 = {
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 lU(e) {
var t = { r: 0, g: 0, b: 0 }, n = 1, r = null, o = null, a = null, i = !1, s = !1;
return typeof e == "string" && (e = dU(e)), typeof e == "object" && (ca(e.r) && ca(e.g) && ca(e.b) ? (t = nU(e.r, e.g, e.b), i = !0, s = String(e.r).substr(-1) === "%" ? "prgb" : "rgb") : ca(e.h) && ca(e.s) && ca(e.v) ? (r = _d(e.s), o = _d(e.v), t = oU(e.h, r, o), i = !0, s = "hsv") : ca(e.h) && ca(e.s) && ca(e.l) && (r = _d(e.s), a = _d(e.l), t = rU(e.h, r, a), i = !0, s = "hsl"), Object.prototype.hasOwnProperty.call(e, "a") && (n = e.a)), n = G5(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 uU = "[-\\+]?\\d+%?", cU = "[-\\+]?\\d*\\.\\d+%?", ni = "(?:".concat(cU, ")|(?:").concat(uU, ")"), rv = "[\\s|\\(]+(".concat(ni, ")[,|\\s]+(").concat(ni, ")[,|\\s]+(").concat(ni, ")\\s*\\)?"), ov = "[\\s|\\(]+(".concat(ni, ")[,|\\s]+(").concat(ni, ")[,|\\s]+(").concat(ni, ")[,|\\s]+(").concat(ni, ")\\s*\\)?"), xo = {
CSS_UNIT: new RegExp(ni),
rgb: new RegExp("rgb" + rv),
rgba: new RegExp("rgba" + ov),
hsl: new RegExp("hsl" + rv),
hsla: new RegExp("hsla" + ov),
hsv: new RegExp("hsv" + rv),
hsva: new RegExp("hsva" + ov),
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 dU(e) {
if (e = e.trim().toLowerCase(), e.length === 0)
return !1;
var t = !1;
if (d0[e])
e = d0[e], t = !0;
else if (e === "transparent")
return { r: 0, g: 0, b: 0, a: 0, format: "name" };
var n = xo.rgb.exec(e);
return n ? { r: n[1], g: n[2], b: n[3] } : (n = xo.rgba.exec(e), n ? { r: n[1], g: n[2], b: n[3], a: n[4] } : (n = xo.hsl.exec(e), n ? { h: n[1], s: n[2], l: n[3] } : (n = xo.hsla.exec(e), n ? { h: n[1], s: n[2], l: n[3], a: n[4] } : (n = xo.hsv.exec(e), n ? { h: n[1], s: n[2], v: n[3] } : (n = xo.hsva.exec(e), n ? { h: n[1], s: n[2], v: n[3], a: n[4] } : (n = xo.hex8.exec(e), n ? {
r: Vr(n[1]),
g: Vr(n[2]),
b: Vr(n[3]),
a: C2(n[4]),
format: t ? "name" : "hex8"
} : (n = xo.hex6.exec(e), n ? {
r: Vr(n[1]),
g: Vr(n[2]),
b: Vr(n[3]),
format: t ? "name" : "hex"
} : (n = xo.hex4.exec(e), n ? {
r: Vr(n[1] + n[1]),
g: Vr(n[2] + n[2]),
b: Vr(n[3] + n[3]),
a: C2(n[4] + n[4]),
format: t ? "name" : "hex8"
} : (n = xo.hex3.exec(e), n ? {
r: Vr(n[1] + n[1]),
g: Vr(n[2] + n[2]),
b: Vr(n[3] + n[3]),
format: t ? "name" : "hex"
} : !1)))))))));
}
function ca(e) {
return !!xo.CSS_UNIT.exec(String(e));
}
var pU = (
/** @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 = sU(t)), this.originalInput = t;
var o = lU(t);
this.originalInput = t, this.r = o.r, this.g = o.g, this.b = o.b, this.a = o.a, this.roundA = Math.round(100 * this.a) / 100, this.format = (r = n.format) !== null && r !== void 0 ? r : o.format, this.gradientType = n.gradientType, this.r < 1 && (this.r = Math.round(this.r)), this.g < 1 && (this.g = Math.round(this.g)), this.b < 1 && (this.b = Math.round(this.b)), this.isValid = o.ok;
}
return e.prototype.isDark = function() {
return this.getBrightness() < 128;
}, e.prototype.isLight = function() {
return !this.isDark();
}, e.prototype.getBrightness = function() {
var t = this.toRgb();
return (t.r * 299 + t.g * 587 + t.b * 114) / 1e3;
}, e.prototype.getLuminance = function() {
var t = this.toRgb(), n, r, o, a = t.r / 255, i = t.g / 255, s = t.b / 255;
return a <= 0.03928 ? n = a / 12.92 : n = Math.pow((a + 0.055) / 1.055, 2.4), i <= 0.03928 ? r = i / 12.92 : r = Math.pow((i + 0.055) / 1.055, 2.4), s <= 0.03928 ? o = s / 12.92 : o = Math.pow((s + 0.055) / 1.055, 2.4), 0.2126 * n + 0.7152 * r + 0.0722 * o;
}, e.prototype.getAlpha = function() {
return this.a;
}, e.prototype.setAlpha = function(t) {
return this.a = G5(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 = x2(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 = x2(this.r, this.g, this.b), n = Math.round(t.h * 360), r = Math.round(t.s * 100), o = Math.round(t.v * 100);
return this.a === 1 ? "hsv(".concat(n, ", ").concat(r, "%, ").concat(o, "%)") : "hsva(".concat(n, ", ").concat(r, "%, ").concat(o, "%, ").concat(this.roundA, ")");
}, e.prototype.toHsl = function() {
var t = w2(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 = w2(this.r, this.g, this.b), n = Math.round(t.h * 360), r = Math.round(t.s * 100), o = Math.round(t.l * 100);
return this.a === 1 ? "hsl(".concat(n, ", ").concat(r, "%, ").concat(o, "%)") : "hsla(".concat(n, ", ").concat(r, "%, ").concat(o, "%, ").concat(this.roundA, ")");
}, e.prototype.toHex = function(t) {
return t === void 0 && (t = !1), k2(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), aU(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(Jn(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(Jn(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 = "#" + k2(this.r, this.g, this.b, !1), n = 0, r = Object.entries(d0); n < r.length; n++) {
var o = r[n], a = o[0], i = o[1];
if (t === i)
return a;
}
return !1;
}, e.prototype.toString = function(t) {
var n = !!t;
t = t ?? this.format;
var r = !1, o = this.a < 1 && this.a >= 0, a = !n && o && (t.startsWith("hex") || t === "name");
return a ? t === "name" && this.a === 0 ? this.toName() : this.toRgbString() : (t === "rgb" && (r = this.toRgbString()), t === "prgb" && (r = this.toPercentageRgbString()), (t === "hex" || t === "hex6") && (r = this.toHexString()), t === "hex3" && (r = this.toHexString(!0)), t === "hex4" && (r = this.toHex8String(!0)), t === "hex8" && (r = this.toHex8String()), t === "name" && (r = this.toName()), t === "hsl" && (r = this.toHslString()), t === "hsv" && (r = this.toHsvString()), r || this.toHexString());
}, e.prototype.toNumber = function() {
return (Math.round(this.r) << 16) + (Math.round(this.g) << 8) + Math.round(this.b);
}, e.prototype.clone = function() {
return new e(this.toString());
}, e.prototype.lighten = function(t) {
t === void 0 && (t = 10);
var n = this.toHsl();
return n.l += t / 100, n.l = Sd(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 = Sd(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 = Sd(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 = Sd(n.s), new e(n);
}, e.prototype.greyscale = function() {
return this.desaturate(100);
}, e.prototype.spin = function(t) {
var n = this.toHsl(), r = (n.h + t) % 360;
return n.h = r < 0 ? 360 + r : r, new e(n);
}, e.prototype.mix = function(t, n) {
n === void 0 && (n = 50);
var r = this.toRgb(), o = new e(t).toRgb(), a = n / 100, i = {
r: (o.r - r.r) * a + r.r,
g: (o.g - r.g) * a + r.g,
b: (o.b - r.b) * a + r.b,
a: (o.a - r.a) * a + r.a
};
return new e(i);
}, e.prototype.analogous = function(t, n) {
t === void 0 && (t = 6), n === void 0 && (n = 30);
var r = this.toHsl(), o = 360 / n, a = [this];
for (r.h = (r.h - (o * t >> 1) + 720) % 360; --t; )
r.h = (r.h + o) % 360, a.push(new e(r));
return a;
}, e.prototype.complement = function() {
var t = this.toHsl();
return t.h = (t.h + 180) % 360, new e(t);
}, e.prototype.monochromatic = function(t) {
t === void 0 && (t = 6);
for (var n = this.toHsv(), r = n.h, o = n.s, a = n.v, i = [], s = 1 / t; t--; )
i.push(new e({ h: r, s: o, v: a })), a = (a + s) % 1;
return i;
}, e.prototype.splitcomplement = function() {
var t = this.toHsl(), n = t.h;
return [
this,
new e({ h: (n + 72) % 360, s: t.s, l: t.l }),
new e({ h: (n + 216) % 360, s: t.s, l: t.l })
];
}, e.prototype.onBackground = function(t) {
var n = this.toRgb(), r = new e(t).toRgb(), o = n.a + r.a * (1 - n.a);
return new e({
r: (n.r * n.a + r.r * r.a * (1 - n.a)) / o,
g: (n.g * n.a + r.g * r.a * (1 - n.a)) / o,
b: (n.b * n.a + r.b * r.a * (1 - n.a)) / o,
a: o
});
}, e.prototype.triad = function() {
return this.polyad(3);
}, e.prototype.tetrad = function() {
return this.polyad(4);
}, e.prototype.polyad = function(t) {
for (var n = this.toHsl(), r = n.h, o = [this], a = 360 / t, i = 1; i < t; i++)
o.push(new e({ h: (r + i * a) % 360, s: n.s, l: n.l }));
return o;
}, e.prototype.equals = function(t) {
return this.toRgbString() === new e(t).toRgbString();
}, e;
}()
);
function za(e, t = 20) {
return e.mix("#141414", t).toString();
}
function fU(e) {
const t = M5(), n = mo("button");
return _(() => {
let r = {}, o = e.color;
if (o) {
const a = o.match(/var\((.*?)\)/);
a && (o = window.getComputedStyle(window.document.documentElement).getPropertyValue(a[1]));
const i = new pU(o), s = e.dark ? i.tint(20).toString() : za(i, 20);
if (e.plain)
r = n.cssVarBlock({
"bg-color": e.dark ? za(i, 90) : i.tint(90).toString(),
"text-color": o,
"border-color": e.dark ? za(i, 50) : i.tint(50).toString(),
"hover-text-color": `var(${n.cssVarName("color-white")})`,
"hover-bg-color": o,
"hover-border-color": o,
"active-bg-color": s,
"active-text-color": `var(${n.cssVarName("color-white")})`,
"active-border-color": s
}), t.value && (r[n.cssVarBlockName("disabled-bg-color")] = e.dark ? za(i, 90) : i.tint(90).toString(), r[n.cssVarBlockName("disabled-text-color")] = e.dark ? za(i, 50) : i.tint(50).toString(), r[n.cssVarBlockName("disabled-border-color")] = e.dark ? za(i, 80) : i.tint(80).toString());
else {
const u = e.dark ? za(i, 30) : i.tint(30).toString(), l = i.isDark() ? `var(${n.cssVarName("color-white")})` : `var(${n.cssVarName("color-black")})`;
if (r = n.cssVarBlock({
"bg-color": o,
"text-color": l,
"border-color": o,
"hover-bg-color": u,
"hover-text-color": l,
"hover-border-color": u,
"active-bg-color": s,
"active-border-color": s
}), t.value) {
const c = e.dark ? za(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 hU = Z({
name: "ElButton"
}), vU = /* @__PURE__ */ Z({
...hU,
props: c0,
emits: QH,
setup(e, { expose: t, emit: n }) {
const r = e, o = fU(r), a = mo("button"), { _ref: i, _size: s, _type: u, _disabled: l, _props: c, shouldAddSpace: d, handleClick: f } = YH(r, n), h = _(() => [
a.b(),
a.m(u.value),
a.m(s.value),
a.is("disabled", l.value),
a.is("loading", r.loading),
a.is("plain", r.plain),
a.is("round", r.round),
a.is("circle", r.circle),
a.is("text", r.text),
a.is("link", r.link),
a.is("has-bg", r.bg)
]);
return t({
ref: i,
size: s,
type: u,
disabled: l,
shouldAddSpace: d
}), (p, v) => (T(), ie(_t(p.tag), Xt({
ref_key: "_ref",
ref: i
}, y(c), {
class: y(h),
style: y(o),
onClick: y(f)
}), {
default: G(() => [
p.loading ? (T(), B(Qe, { key: 0 }, [
p.$slots.loading ? ve(p.$slots, "loading", { key: 0 }) : (T(), ie(y(d2), {
key: 1,
class: W(y(a).is("loading"))
}, {
default: G(() => [
(T(), ie(_t(p.loadingIcon)))
]),
_: 1
}, 8, ["class"]))
], 64)) : p.icon || p.$slots.icon ? (T(), ie(y(d2), { key: 1 }, {
default: G(() => [
p.icon ? (T(), ie(_t(p.icon), { key: 0 })) : ve(p.$slots, "icon", { key: 1 })
]),
_: 3
})) : ne("v-if", !0),
p.$slots.default ? (T(), B("span", {
key: 2,
class: W({ [y(a).em("text", "expand")]: y(d) })
}, [
ve(p.$slots, "default")
], 2)) : ne("v-if", !0)
]),
_: 3
}, 16, ["class", "style", "onClick"]));
}
});
var gU = /* @__PURE__ */ fr(vU, [["__file", "button.vue"]]);
const mU = {
size: c0.size,
type: c0.type
}, yU = Z({
name: "ElButtonGroup"
}), bU = /* @__PURE__ */ Z({
...yU,
props: mU,
setup(e) {
const t = e;
ft(K5, pn({
size: jt(t, "size"),
type: jt(t, "type")
}));
const n = mo("button");
return (r, o) => (T(), B("div", {
class: W(y(n).b("group"))
}, [
ve(r.$slots, "default")
], 2));
}
});
var X5 = /* @__PURE__ */ fr(bU, [["__file", "button-group.vue"]]);
const wU = Os(gU, {
ButtonGroup: X5
});
sV(X5);
const xU = Rn({
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"
}
}), kU = Z({
name: "ElCard"
}), CU = /* @__PURE__ */ Z({
...kU,
props: xU,
setup(e) {
const t = mo("card");
return (n, r) => (T(), B("div", {
class: W([y(t).b(), y(t).is(`${n.shadow}-shadow`)])
}, [
n.$slots.header || n.header ? (T(), B("div", {
key: 0,
class: W(y(t).e("header"))
}, [
ve(n.$slots, "header", {}, () => [
Ke(Te(n.header), 1)
])
], 2)) : ne("v-if", !0),
Y("div", {
class: W([y(t).e("body"), n.bodyClass]),
style: lt(n.bodyStyle)
}, [
ve(n.$slots, "default")
], 6),
n.$slots.footer || n.footer ? (T(), B("div", {
key: 1,
class: W(y(t).e("footer"))
}, [
ve(n.$slots, "footer", {}, () => [
Ke(Te(n.footer), 1)
])
], 2)) : ne("v-if", !0)
], 2));
}
});
var EU = /* @__PURE__ */ fr(CU, [["__file", "card.vue"]]);
const SU = Os(EU), _U = /* @__PURE__ */ Z({
inheritAttrs: !1
});
function TU(e, t, n, r, o, a) {
return ve(e.$slots, "default");
}
var OU = /* @__PURE__ */ fr(_U, [["render", TU], ["__file", "collection.vue"]]);
const PU = /* @__PURE__ */ Z({
name: "ElCollectionItem",
inheritAttrs: !1
});
function $U(e, t, n, r, o, a) {
return ve(e.$slots, "default");
}
var AU = /* @__PURE__ */ fr(PU, [["render", $U], ["__file", "collection-item.vue"]]);
const FU = "data-el-collection-item", IU = (e) => {
const t = `El${e}Collection`, n = `${t}Item`, r = Symbol(t), o = Symbol(n), a = {
...OU,
name: t,
setup() {
const s = H(null), u = /* @__PURE__ */ new Map();
ft(r, {
itemMap: u,
getItems: () => {
const l = y(s);
if (!l)
return [];
const c = Array.from(l.querySelectorAll(`[${FU}]`));
return [...u.values()].sort((d, f) => c.indexOf(d.ref) - c.indexOf(f.ref));
},
collectionRef: s
});
}
}, i = {
...AU,
name: n,
setup(s, { attrs: u }) {
const l = H(null), c = $e(r, void 0);
ft(o, {
collectionItemRef: l
}), ht(() => {
const d = y(l);
d && c.itemMap.set(d, {
ref: d,
...u
});
}), Rt(() => {
const d = y(l);
c.itemMap.delete(d);
});
}
};
return {
COLLECTION_INJECTION_KEY: r,
COLLECTION_ITEM_INJECTION_KEY: o,
ElCollection: a,
ElCollectionItem: i
};
}, av = Rn({
trigger: oc.trigger,
effect: {
...Zr.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: Zr.teleported
});
Rn({
command: {
type: [Object, String, Number],
default: () => ({})
},
disabled: Boolean,
divided: Boolean,
textValue: String,
icon: {
type: s0
}
});
Rn({
onKeydown: { type: Ot(Function) }
});
IU("Dropdown");
const NU = Rn({
trigger: oc.trigger,
placement: av.placement,
disabled: oc.disabled,
visible: Zr.visible,
transition: Zr.transition,
popperOptions: av.popperOptions,
tabindex: av.tabindex,
content: Zr.content,
popperStyle: Zr.popperStyle,
popperClass: Zr.popperClass,
enterable: {
...Zr.enterable,
default: !0
},
effect: {
...Zr.effect,
default: "light"
},
teleported: Zr.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
}
}), LU = {
"update:visible": (e) => dm(e),
"before-enter": () => !0,
"before-leave": () => !0,
"after-enter": () => !0,
"after-leave": () => !0
}, DU = "onUpdate:visible", RU = Z({
name: "ElPopover"
}), BU = /* @__PURE__ */ Z({
...RU,
props: NU,
emits: LU,
setup(e, { expose: t, emit: n }) {
const r = e, o = _(() => r[DU]), a = mo("popover"), i = H(), s = _(() => {
var m;
return (m = y(i)) == null ? void 0 : m.popperRef;
}), u = _(() => [
{
width: h5(r.width)
},
r.popperStyle
]), l = _(() => [a.b(), r.popperClass, { [a.m("plain")]: !!r.content }]), c = _(() => r.transition === `${a.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) => (T(), ie(y(XH), Xt({
ref_key: "tooltipRef",
ref: i
}, m.$attrs, {
trigger: m.trigger,
placement: m.placement,
disabled: m.disabled,
visible: m.visible,
transition: m.transition,
"popper-options": m.popperOptions,
tabindex: m.tabindex,
content: m.content,
offset: m.offset,
"show-after": m.showAfter,
"hide-after": m.hideAfter,
"auto-close": m.autoClose,
"show-arrow": m.showArrow,
"aria-label": m.title,
effect: m.effect,
enterable: m.enterable,
"popper-class": y(l),
"popper-style": y(u),
teleported: m.teleported,
persistent: m.persistent,
"gpu-acceleration": y(c),
"onUpdate:visible": y(o),
onBeforeShow: f,
onBeforeHide: h,
onShow: p,
onHide: v
}), {
content: G(() => [
m.title ? (T(), B("div", {
key: 0,
class: W(y(a).e("title")),
role: "title"
}, Te(m.title), 3)) : ne("v-if", !0),
ve(m.$slots, "default", {}, () => [
Ke(Te(m.content), 1)
])
]),
default: G(() => [
m.$slots.reference ? ve(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 MU = /* @__PURE__ */ fr(BU, [["__file", "popover.vue"]]);
const E2 = (e, t) => {
const n = t.arg || t.value, r = n == null ? void 0 : n.popperRef;
r && (r.triggerRef = e);
};
var zU = {
mounted(e, t) {
E2(e, t);
},
updated(e, t) {
E2(e, t);
}
};
const VU = "popover", jU = iV(zU, VU), HU = Os(MU, {
directive: jU
});
function UU(e) {
let t;
const n = H(!1), r = pn({
...e,
originalPosition: "",
originalOverflow: "",
visible: !1
});
function o(f) {
r.text = f;
}
function a() {
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()) : (Rp(f, h.bm("parent", "relative")), f.removeAttribute("loading-number")), Rp(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(u, 400), r.visible = !1, (f = e.closed) == null || f.call(e));
}
function u() {
if (!n.value)
return;
const f = r.parent;
n.value = !1, f.vLoadingAddClassList = void 0, a();
}
const l = Z({
name: "ElLoading",
setup(f, { expose: h }) {
const { ns: p, zIndex: v } = Dj("loading");
return h({
ns: p,
zIndex: v
}), () => {
const m = r.spinner || r.svg, g = Kt("svg", {
class: "circular",
viewBox: r.svgViewBox ? r.svgViewBox : "0 0 50 50",
...m ? { innerHTML: m } : {}
}, [
Kt("circle", {
class: "path",
cx: "25",
cy: "25",
r: "20",
fill: "none"
})
]), b = r.text ? Kt("p", { class: p.b("text") }, [r.text]) : void 0;
return Kt(Kr, {
name: p.b("fade"),
onAfterLeave: u
}, {
default: G(() => [
tt(ee("div", {
style: {
backgroundColor: r.background || ""
},
class: [
p.b("mask"),
r.customClass,
r.fullscreen ? "is-fullscreen" : ""
]
}, [
Kt("div", {
class: p.b("spinner")
}, [g, b])
]), [[Pt, r.visible]])
])
});
};
}
}), c = ug(l), d = c.mount(document.createElement("div"));
return {
...vo(r),
setText: o,
removeElLoadingChild: i,
close: s,
handleAfterLeave: u,
vm: d,
get $el() {
return d.$el;
}
};
}
let Td;
const qU = function(e = {}) {
if (!Ur)
return;
const t = WU(e);
if (t.fullscreen && Td)
return Td;
const n = UU({
...t,
closed: () => {
var o;
(o = t.closed) == null || o.call(t), t.fullscreen && (Td = void 0);
}
});
KU(t, t.parent, n), S2(t, t.parent, n), t.parent.vLoadingAddClassList = () => S2(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), Ge(() => n.visible.value = t.visible), t.fullscreen && (Td = n), n;
}, WU = (e) => {
var t, n, r, o;
let a;
return zl(e.target) ? a = (t = document.querySelector(e.target)) != null ? t : document.body : a = e.target || document.body, {
parent: a === document.body || e.body ? document.body : a,
background: e.background || "",
svg: e.svg || "",
svgViewBox: e.svgViewBox || "",
spinner: e.spinner || !1,
text: e.text || "",
fullscreen: a === document.body && ((n = e.fullscreen) != null ? n : !0),
lock: (r = e.lock) != null ? r : !1,
customClass: e.customClass || "",
visible: (o = e.visible) != null ? o : !0,
beforeClose: e.beforeClose,
closed: e.closed,
target: a
};
}, KU = async (e, t, n) => {
const { nextZIndex: r } = n.vm.zIndex || n.vm._.exposed.zIndex, o = {};
if (e.fullscreen)
n.originalPosition.value = cu(document.body, "position"), n.originalOverflow.value = cu(document.body, "overflow"), o.zIndex = r();
else if (e.parent === document.body) {
n.originalPosition.value = cu(document.body, "position"), await Ge();
for (const a of ["top", "left"]) {
const i = a === "top" ? "scrollTop" : "scrollLeft";
o[a] = `${e.target.getBoundingClientRect()[a] + document.body[i] + document.documentElement[i] - Number.parseInt(cu(document.body, `margin-${a}`), 10)}px`;
}
for (const a of ["height", "width"])
o[a] = `${e.target.getBoundingClientRect()[a]}px`;
} else
n.originalPosition.value = cu(t, "position");
for (const [a, i] of Object.entries(o))
n.$el.style[a] = i;
}, S2 = (e, t, n) => {
const r = n.vm.ns || n.vm._.exposed.ns;
["absolute", "fixed", "sticky"].includes(n.originalPosition.value) ? Rp(t, r.bm("parent", "relative")) : Xb(t, r.bm("parent", "relative")), e.fullscreen && e.lock ? Xb(t, r.bm("parent", "hidden")) : Rp(t, r.bm("parent", "hidden"));
}, ip = Symbol("ElLoading"), _2 = (e, t) => {
var n, r, o, a;
const i = t.instance, s = (f) => Rc(t.value) ? t.value[f] : void 0, u = (f) => {
const h = zl(f) && (i == null ? void 0 : i[f]) || f;
return h && H(h);
}, l = (f) => u(s(f) || e.getAttribute(`element-loading-${o7(f)}`)), c = (n = s("fullscreen")) != null ? n : t.modifiers.fullscreen, d = {
text: l("text"),
svg: l("svg"),
svgViewBox: l("svgViewBox"),
spinner: l("spinner"),
background: l("background"),
customClass: l("customClass"),
fullscreen: c,
target: (r = s("target")) != null ? r : c ? void 0 : e,
body: (o = s("body")) != null ? o : t.modifiers.body,
lock: (a = s("lock")) != null ? a : t.modifiers.lock
};
e[ip] = {
options: d,
instance: qU(d)
};
}, GU = (e, t) => {
for (const n of Object.keys(t))
Vn(t[n]) && (t[n].value = e[n]);
}, XU = {
mounted(e, t) {
t.value && _2(e, t);
},
updated(e, t) {
const n = e[ip];
t.oldValue !== t.value && (t.value && !t.oldValue ? _2(e, t) : t.value && t.oldValue ? Rc(t.value) && GU(t.value, n.options) : n == null || n.instance.close());
},
unmounted(e) {
var t;
(t = e[ip]) == null || t.instance.close(), e[ip] = null;
}
};
function Y5(e, t) {
return function() {
return e.apply(t, arguments);
};
}
const { toString: YU } = Object.prototype, { getPrototypeOf: Om } = Object, Wf = /* @__PURE__ */ ((e) => (t) => {
const n = YU.call(t);
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
})(/* @__PURE__ */ Object.create(null)), Bo = (e) => (e = e.toLowerCase(), (t) => Wf(t) === e), Kf = (e) => (t) => typeof t === e, { isArray: jl } = Array, ac = Kf("undefined");
function ZU(e) {
return e !== null && !ac(e) && e.constructor !== null && !ac(e.constructor) && qr(e.constructor.isBuffer) && e.constructor.isBuffer(e);
}
const Z5 = Bo("ArrayBuffer");
function JU(e) {
let t;
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Z5(e.buffer), t;
}
const QU = Kf("string"), qr = Kf("function"), J5 = Kf("number"), Gf = (e) => e !== null && typeof e == "object", eq = (e) => e === !0 || e === !1, sp = (e) => {
if (Wf(e) !== "object")
return !1;
const t = Om(e);
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e);
}, tq = Bo("Date"), nq = Bo("File"), rq = Bo("Blob"), oq = Bo("FileList"), aq = (e) => Gf(e) && qr(e.pipe), iq = (e) => {
let t;
return e && (typeof FormData == "function" && e instanceof FormData || qr(e.append) && ((t = Wf(e)) === "formdata" || // detect form-data instance
t === "object" && qr(e.toString) && e.toString() === "[object FormData]"));
}, sq = Bo("URLSearchParams"), [lq, uq, cq, dq] = ["ReadableStream", "Request", "Response", "Headers"].map(Bo), pq = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
function Vc(e, t, { allOwnKeys: n = !1 } = {}) {
if (e === null || typeof e > "u")
return;
let r, o;
if (typeof e != "object" && (e = [e]), jl(e))
for (r = 0, o = e.length; r < o; r++)
t.call(null, e[r], r, e);
else {
const a = n ? Object.getOwnPropertyNames(e) : Object.keys(e), i = a.length;
let s;
for (r = 0; r < i; r++)
s = a[r], t.call(null, e[s], s, e);
}
}
function Q5(e, t) {
t = t.toLowerCase();
const n = Object.keys(e);
let r = n.length, o;
for (; r-- > 0; )
if (o = n[r], t === o.toLowerCase())
return o;
return null;
}
const Gi = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, e4 = (e) => !ac(e) && e !== Gi;
function p0() {
const { caseless: e } = e4(this) && this || {}, t = {}, n = (r, o) => {
const a = e && Q5(t, o) || o;
sp(t[a]) && sp(r) ? t[a] = p0(t[a], r) : sp(r) ? t[a] = p0({}, r) : jl(r) ? t[a] = r.slice() : t[a] = r;
};
for (let r = 0, o = arguments.length; r < o; r++)
arguments[r] && Vc(arguments[r], n);
return t;
}
const fq = (e, t, n, { allOwnKeys: r } = {}) => (Vc(t, (o, a) => {
n && qr(o) ? e[a] = Y5(o, n) : e[a] = o;
}, { allOwnKeys: r }), e), hq = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), vq = (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);
}, gq = (e, t, n, r) => {
let o, a, i;
const s = {};
if (t = t || {}, e == null) return t;
do {
for (o = Object.getOwnPropertyNames(e), a = o.length; a-- > 0; )
i = o[a], (!r || r(i, e, t)) && !s[i] && (t[i] = e[i], s[i] = !0);
e = n !== !1 && Om(e);
} while (e && (!n || n(e, t)) && e !== Object.prototype);
return t;
}, mq = (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;
}, yq = (e) => {
if (!e) return null;
if (jl(e)) return e;
let t = e.length;
if (!J5(t)) return null;
const n = new Array(t);
for (; t-- > 0; )
n[t] = e[t];
return n;
}, bq = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && Om(Uint8Array)), wq = (e, t) => {
const n = (e && e[Symbol.iterator]).call(e);
let r;
for (; (r = n.next()) && !r.done; ) {
const o = r.value;
t.call(e, o[0], o[1]);
}
}, xq = (e, t) => {
let n;
const r = [];
for (; (n = e.exec(t)) !== null; )
r.push(n);
return r;
}, kq = Bo("HTMLFormElement"), Cq = (e) => e.toLowerCase().replace(
/[-_\s]([a-z\d])(\w*)/g,
function(t, n, r) {
return n.toUpperCase() + r;
}
), T2 = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Eq = Bo("RegExp"), t4 = (e, t) => {
const n = Object.getOwnPropertyDescriptors(e), r = {};
Vc(n, (o, a) => {
let i;
(i = t(o, a, e)) !== !1 && (r[a] = i || o);
}), Object.defineProperties(e, r);
}, Sq = (e) => {
t4(e, (t, n) => {
if (qr(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
return !1;
const r = e[n];
if (qr(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 + "'");
});
}
});
}, _q = (e, t) => {
const n = {}, r = (o) => {
o.forEach((a) => {
n[a] = !0;
});
};
return jl(e) ? r(e) : r(String(e).split(t)), n;
}, Tq = () => {
}, Oq = (e, t) => e != null && Number.isFinite(e = +e) ? e : t, iv = "abcdefghijklmnopqrstuvwxyz", O2 = "0123456789", n4 = {
DIGIT: O2,
ALPHA: iv,
ALPHA_DIGIT: iv + iv.toUpperCase() + O2
}, Pq = (e = 16, t = n4.ALPHA_DIGIT) => {
let n = "";
const { length: r } = t;
for (; e--; )
n += t[Math.random() * r | 0];
return n;
};
function $q(e) {
return !!(e && qr(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator]);
}
const Aq = (e) => {
const t = new Array(10), n = (r, o) => {
if (Gf(r)) {
if (t.indexOf(r) >= 0)
return;
if (!("toJSON" in r)) {
t[o] = r;
const a = jl(r) ? [] : {};
return Vc(r, (i, s) => {
const u = n(i, o + 1);
!ac(u) && (a[s] = u);
}), t[o] = void 0, a;
}
}
return r;
};
return n(e, 0);
}, Fq = Bo("AsyncFunction"), Iq = (e) => e && (Gf(e) || qr(e)) && qr(e.then) && qr(e.catch), r4 = ((e, t) => e ? setImmediate : t ? ((n, r) => (Gi.addEventListener("message", ({ source: o, data: a }) => {
o === Gi && a === n && r.length && r.shift()();
}, !1), (o) => {
r.push(o), Gi.postMessage(n, "*");
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
typeof setImmediate == "function",
qr(Gi.postMessage)
), Nq = typeof queueMicrotask < "u" ? queueMicrotask.bind(Gi) : typeof process < "u" && process.nextTick || r4, xe = {
isArray: jl,
isArrayBuffer: Z5,
isBuffer: ZU,
isFormData: iq,
isArrayBufferView: JU,
isString: QU,
isNumber: J5,
isBoolean: eq,
isObject: Gf,
isPlainObject: sp,
isReadableStream: lq,
isRequest: uq,
isResponse: cq,
isHeaders: dq,
isUndefined: ac,
isDate: tq,
isFile: nq,
isBlob: rq,
isRegExp: Eq,
isFunction: qr,
isStream: aq,
isURLSearchParams: sq,
isTypedArray: bq,
isFileList: oq,
forEach: Vc,
merge: p0,
extend: fq,
trim: pq,
stripBOM: hq,
inherits: vq,
toFlatObject: gq,
kindOf: Wf,
kindOfTest: Bo,
endsWith: mq,
toArray: yq,
forEachEntry: wq,
matchAll: xq,
isHTMLForm: kq,
hasOwnProperty: T2,
hasOwnProp: T2,
// an alias to avoid ESLint no-prototype-builtins detection
reduceDescriptors: t4,
freezeMethods: Sq,
toObjectSet: _q,
toCamelCase: Cq,
noop: Tq,
toFiniteNumber: Oq,
findKey: Q5,
global: Gi,
isContextDefined: e4,
ALPHABET: n4,
generateString: Pq,
isSpecCompliantForm: $q,
toJSONObject: Aq,
isAsyncFn: Fq,
isThenable: Iq,
setImmediate: r4,
asap: Nq
};
function kt(e, t, n, r, o) {
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), n && (this.config = n), r && (this.request = r), o && (this.response = o, this.status = o.status ? o.status : null);
}
xe.inherits(kt, 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: xe.toJSONObject(this.config),
code: this.code,
status: this.status
};
}
});
const o4 = kt.prototype, a4 = {};
[
"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) => {
a4[e] = { value: e };
});
Object.defineProperties(kt, a4);
Object.defineProperty(o4, "isAxiosError", { value: !0 });
kt.from = (e, t, n, r, o, a) => {
const i = Object.create(o4);
return xe.toFlatObject(e, i, function(s) {
return s !== Error.prototype;
}, (s) => s !== "isAxiosError"), kt.call(i, e.message, t, n, r, o), i.cause = e, i.name = e.name, a && Object.assign(i, a), i;
};
const Lq = null;
function f0(e) {
return xe.isPlainObject(e) || xe.isArray(e);
}
function i4(e) {
return xe.endsWith(e, "[]") ? e.slice(0, -2) : e;
}
function P2(e, t, n) {
return e ? e.concat(t).map(function(r, o) {
return r = i4(r), !n && o ? "[" + r + "]" : r;
}).join(n ? "." : "") : t;
}
function Dq(e) {
return xe.isArray(e) && !e.some(f0);
}
const Rq = xe.toFlatObject(xe, {}, null, function(e) {
return /^is[A-Z]/.test(e);
});
function Xf(e, t, n) {
if (!xe.isObject(e))
throw new TypeError("target must be an object");
t = t || new FormData(), n = xe.toFlatObject(n, {
metaTokens: !0,
dots: !1,
indexes: !1
}, !1, function(h, p) {
return !xe.isUndefined(p[h]);
});
const r = n.metaTokens, o = n.visitor || l, a = n.dots, i = n.indexes, s = (n.Blob || typeof Blob < "u" && Blob) && xe.isSpecCompliantForm(t);
if (!xe.isFunction(o))
throw new TypeError("visitor must be a function");
function u(h) {
if (h === null) return "";
if (xe.isDate(h))
return h.toISOString();
if (!s && xe.isBlob(h))
throw new kt("Blob is not supported. Use a Buffer instead.");
return xe.isArrayBuffer(h) || xe.isTypedArray(h) ? s && typeof Blob == "function" ? new Blob([h]) : Buffer.from(h) : h;
}
function l(h, p, v) {
let m = h;
if (h && !v && typeof h == "object") {
if (xe.endsWith(p, "{}"))
p = r ? p : p.slice(0, -2), h = JSON.stringify(h);
else if (xe.isArray(h) && Dq(h) || (xe.isFileList(h) || xe.endsWith(p, "[]")) && (m = xe.toArray(h)))
return p = i4(p), m.forEach(function(g, b) {
!(xe.isUndefined(g) || g === null) && t.append(
// eslint-disable-next-line no-nested-ternary
i === !0 ? P2([p], b, a) : i === null ? p : p + "[]",
u(g)
);
}), !1;
}
return f0(h) ? !0 : (t.append(P2(v, p, a), u(h)), !1);
}
const c = [], d = Object.assign(Rq, {
defaultVisitor: l,
convertValue: u,
isVisitable: f0
});
function f(h, p) {
if (!xe.isUndefined(h)) {
if (c.indexOf(h) !== -1)
throw Error("Circular reference detected in " + p.join("."));
c.push(h), xe.forEach(h, function(v, m) {
(!(xe.isUndefined(v) || v === null) && o.call(
t,
v,
xe.isString(m) ? m.trim() : m,
p,
d
)) === !0 && f(v, p ? p.concat(m) : [m]);
}), c.pop();
}
}
if (!xe.isObject(e))
throw new TypeError("data must be an object");
return f(e), t;
}
function $2(e) {
const t = {
"!": "%21",
"'": "%27",
"(": "%28",
")": "%29",
"~": "%7E",
"%20": "+",
"%00": "\0"
};
return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(n) {
return t[n];
});
}
function Pm(e, t) {
this._pairs = [], e && Xf(e, this, t);
}
const s4 = Pm.prototype;
s4.append = function(e, t) {
this._pairs.push([e, t]);
};
s4.toString = function(e) {
const t = e ? function(n) {
return e.call(this, n, $2);
} : $2;
return this._pairs.map(function(n) {
return t(n[0]) + "=" + t(n[1]);
}, "").join("&");
};
function Bq(e) {
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
}
function l4(e, t, n) {
if (!t)
return e;
const r = n && n.encode || Bq, o = n && n.serialize;
let a;
if (o ? a = o(t, n) : a = xe.isURLSearchParams(t) ? t.toString() : new Pm(t, n).toString(r), a) {
const i = e.indexOf("#");
i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + a;
}
return e;
}
let A2 = 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(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) {
xe.forEach(this.handlers, function(n) {
n !== null && t(n);
});
}
};
const u4 = {
silentJSONParsing: !0,
forcedJSONParsing: !0,
clarifyTimeoutError: !1
}, Mq = typeof URLSearchParams < "u" ? URLSearchParams : Pm, zq = typeof FormData < "u" ? FormData : null, Vq = typeof Blob < "u" ? Blob : null, jq = {
isBrowser: !0,
classes: {
URLSearchParams: Mq,
FormData: zq,
Blob: Vq
},
protocols: ["http", "https", "file", "blob", "url", "data"]
}, $m = typeof window < "u" && typeof document < "u", h0 = typeof navigator == "object" && navigator || void 0, Hq = $m && (!h0 || ["ReactNative", "NativeScript", "NS"].indexOf(h0.product) < 0), Uq = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", qq = $m && window.location.href || "http://localhost", Wq = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
__proto__: null,
hasBrowserEnv: $m,
hasStandardBrowserEnv: Hq,
hasStandardBrowserWebWorkerEnv: Uq,
navigator: h0,
origin: qq
}, Symbol.toStringTag, { value: "Module" })), Nr = {
...Wq,
...jq
};
function Kq(e, t) {
return Xf(e, new Nr.classes.URLSearchParams(), Object.assign({
visitor: function(n, r, o, a) {
return Nr.isNode && xe.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : a.defaultVisitor.apply(this, arguments);
}
}, t));
}
function Gq(e) {
return xe.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
}
function Xq(e) {
const t = {}, n = Object.keys(e);
let r;
const o = n.length;
let a;
for (r = 0; r < o; r++)
a = n[r], t[a] = e[a];
return t;
}
function c4(e) {
function t(n, r, o, a) {
let i = n[a++];
if (i === "__proto__") return !0;
const s = Number.isFinite(+i), u = a >= n.length;
return i = !i && xe.isArray(o) ? o.length : i, u ? (xe.hasOwnProp(o, i) ? o[i] = [o[i], r] : o[i] = r, !s) : ((!o[i] || !xe.isObject(o[i])) && (o[i] = []), t(n, r, o[i], a) && xe.isArray(o[i]) && (o[i] = Xq(o[i])), !s);
}
if (xe.isFormData(e) && xe.isFunction(e.entries)) {
const n = {};
return xe.forEachEntry(e, (r, o) => {
t(Gq(r), o, n, 0);
}), n;
}
return null;
}
function Yq(e, t, n) {
if (xe.isString(e))
try {
return (t || JSON.parse)(e), xe.trim(e);
} catch (r) {
if (r.name !== "SyntaxError")
throw r;
}
return (0, JSON.stringify)(e);
}
const jc = {
transitional: u4,
adapter: ["xhr", "http", "fetch"],
transformRequest: [function(e, t) {
const n = t.getContentType() || "", r = n.indexOf("application/json") > -1, o = xe.isObject(e);
if (o && xe.isHTMLForm(e) && (e = new FormData(e)), xe.isFormData(e))
return r ? JSON.stringify(c4(e)) : e;
if (xe.isArrayBuffer(e) || xe.isBuffer(e) || xe.isStream(e) || xe.isFile(e) || xe.isBlob(e) || xe.isReadableStream(e))
return e;
if (xe.isArrayBufferView(e))
return e.buffer;
if (xe.isURLSearchParams(e))
return t.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), e.toString();
let a;
if (o) {
if (n.indexOf("application/x-www-form-urlencoded") > -1)
return Kq(e, this.formSerializer).toString();
if ((a = xe.isFileList(e)) || n.indexOf("multipart/form-data") > -1) {
const i = this.env && this.env.FormData;
return Xf(
a ? { "files[]": e } : e,
i && new i(),
this.formSerializer
);
}
}
return o || r ? (t.setContentType("application/json", !1), Yq(e)) : e;
}],
transformResponse: [function(e) {
const t = this.transitional || jc.transitional, n = t && t.forcedJSONParsing, r = this.responseType === "json";
if (xe.isResponse(e) || xe.isReadableStream(e))
return e;
if (e && xe.isString(e) && (n && !this.responseType || r)) {
const o = !(t && t.silentJSONParsing) && r;
try {
return JSON.parse(e);
} catch (a) {
if (o)
throw a.name === "SyntaxError" ? kt.from(a, kt.ERR_BAD_RESPONSE, this, null, this.response) : a;
}
}
return e;
}],
/**
* A timeout in milliseconds to abort a request. If set to 0 (default) a
* timeout is not created.
*/
timeout: 0,
xsrfCookieName: "XSRF-TOKEN",
xsrfHeaderName: "X-XSRF-TOKEN",
maxContentLength: -1,
maxBodyLength: -1,
env: {
FormData: Nr.classes.FormData,
Blob: Nr.classes.Blob
},
validateStatus: function(e) {
return e >= 200 && e < 300;
},
headers: {
common: {
Accept: "application/json, text/plain, */*",
"Content-Type": void 0
}
}
};
xe.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
jc.headers[e] = {};
});
const Zq = xe.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"
]), Jq = (e) => {
const t = {};
let n, r, o;
return e && e.split(`
`).forEach(function(a) {
o = a.indexOf(":"), n = a.substring(0, o).trim().toLowerCase(), r = a.substring(o + 1).trim(), !(!n || t[n] && Zq[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
}), t;
}, F2 = Symbol("internals");
function pu(e) {
return e && String(e).trim().toLowerCase();
}
function lp(e) {
return e === !1 || e == null ? e : xe.isArray(e) ? e.map(lp) : String(e);
}
function Qq(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 eW = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
function sv(e, t, n, r, o) {
if (xe.isFunction(r))
return r.call(this, t, n);
if (o && (t = n), !!xe.isString(t)) {
if (xe.isString(r))
return t.indexOf(r) !== -1;
if (xe.isRegExp(r))
return r.test(t);
}
}
function tW(e) {
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
}
function nW(e, t) {
const n = xe.toCamelCase(" " + t);
["get", "set", "has"].forEach((r) => {
Object.defineProperty(e, r + n, {
value: function(o, a, i) {
return this[r].call(this, t, o, a, i);
},
configurable: !0
});
});
}
class Lr {
constructor(t) {
t && this.set(t);
}
set(t, n, r) {
const o = this;
function a(s, u, l) {
const c = pu(u);
if (!c)
throw new Error("header name must be a non-empty string");
const d = xe.findKey(o, c);
(!d || o[d] === void 0 || l === !0 || l === void 0 && o[d] !== !1) && (o[d || u] = lp(s));
}
const i = (s, u) => xe.forEach(s, (l, c) => a(l, c, u));
if (xe.isPlainObject(t) || t instanceof this.constructor)
i(t, n);
else if (xe.isString(t) && (t = t.trim()) && !eW(t))
i(Jq(t), n);
else if (xe.isHeaders(t))
for (const [s, u] of t.entries())
a(u, s, r);
else
t != null && a(n, t, r);
return this;
}
get(t, n) {
if (t = pu(t), t) {
const r = xe.findKey(this, t);
if (r) {
const o = this[r];
if (!n)
return o;
if (n === !0)
return Qq(o);
if (xe.isFunction(n))
return n.call(this, o, r);
if (xe.isRegExp(n))
return n.exec(o);
throw new TypeError("parser must be boolean|regexp|function");
}
}
}
has(t, n) {
if (t = pu(t), t) {
const r = xe.findKey(this, t);
return !!(r && this[r] !== void 0 && (!n || sv(this, this[r], r, n)));
}
return !1;
}
delete(t, n) {
const r = this;
let o = !1;
function a(i) {
if (i = pu(i), i) {
const s = xe.findKey(r, i);
s && (!n || sv(r, r[s], s, n)) && (delete r[s], o = !0);
}
}
return xe.isArray(t) ? t.forEach(a) : a(t), o;
}
clear(t) {
const n = Object.keys(this);
let r = n.length, o = !1;
for (; r--; ) {
const a = n[r];
(!t || sv(this, this[a], a, t, !0)) && (delete this[a], o = !0);
}
return o;
}
normalize(t) {
const n = this, r = {};
return xe.forEach(this, (o, a) => {
const i = xe.findKey(r, a);
if (i) {
n[i] = lp(o), delete n[a];
return;
}
const s = t ? tW(a) : String(a).trim();
s !== a && delete n[a], n[s] = lp(o), r[s] = !0;
}), this;
}
concat(...t) {
return this.constructor.concat(this, ...t);
}
toJSON(t) {
const n = /* @__PURE__ */ Object.create(null);
return xe.forEach(this, (r, o) => {
r != null && r !== !1 && (n[o] = t && xe.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((o) => r.set(o)), r;
}
static accessor(t) {
const n = (this[F2] = this[F2] = {
accessors: {}
}).accessors, r = this.prototype;
function o(a) {
const i = pu(a);
n[i] || (nW(r, a), n[i] = !0);
}
return xe.isArray(t) ? t.forEach(o) : o(t), this;
}
}
Lr.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
xe.reduceDescriptors(Lr.prototype, ({ value: e }, t) => {
let n = t[0].toUpperCase() + t.slice(1);
return {
get: () => e,
set(r) {
this[n] = r;
}
};
});
xe.freezeMethods(Lr);
function lv(e, t) {
const n = this || jc, r = t || n, o = Lr.from(r.headers);
let a = r.data;
return xe.forEach(e, function(i) {
a = i.call(n, a, o.normalize(), t ? t.status : void 0);
}), o.normalize(), a;
}
function d4(e) {
return !!(e && e.__CANCEL__);
}
function Hl(e, t, n) {
kt.call(this, e ?? "canceled", kt.ERR_CANCELED, t, n), this.name = "CanceledError";
}
xe.inherits(Hl, kt, {
__CANCEL__: !0
});
function p4(e, t, n) {
const r = n.config.validateStatus;
!n.status || !r || r(n.status) ? e(n) : t(new kt(
"Request failed with status code " + n.status,
[kt.ERR_BAD_REQUEST, kt.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
n.config,
n.request,
n
));
}
function rW(e) {
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
return t && t[1] || "";
}
function oW(e, t) {
e = e || 10;
const n = new Array(e), r = new Array(e);
let o = 0, a = 0, i;
return t = t !== void 0 ? t : 1e3, function(s) {
const u = Date.now(), l = r[a];
i || (i = u), n[o] = s, r[o] = u;
let c = a, d = 0;
for (; c !== o; )
d += n[c++], c = c % e;
if (o = (o + 1) % e, o === a && (a = (a + 1) % e), u - i < t)
return;
const f = l && u - l;
return f ? Math.round(d * 1e3 / f) : void 0;
};
}
function aW(e, t) {
let n = 0, r = 1e3 / t, o, a;
const i = (s, u = Date.now()) => {
n = u, o = null, a && (clearTimeout(a), a = null), e.apply(null, s);
};
return [(...s) => {
const u = Date.now(), l = u - n;
l >= r ? i(s, u) : (o = s, a || (a = setTimeout(() => {
a = null, i(o);
}, r - l)));
}, () => o && i(o)];
}
const jp = (e, t, n = 3) => {
let r = 0;
const o = oW(50, 250);
return aW((a) => {
const i = a.loaded, s = a.lengthComputable ? a.total : void 0, u = i - r, l = o(u), c = i <= s;
r = i;
const d = {
loaded: i,
total: s,
progress: s ? i / s : void 0,
bytes: u,
rate: l || void 0,
estimated: l && s && c ? (s - i) / l : void 0,
event: a,
lengthComputable: s != null,
[t ? "download" : "upload"]: !0
};
e(d);
}, n);
}, I2 = (e, t) => {
const n = e != null;
return [(r) => t[0]({
lengthComputable: n,
total: e,
loaded: r
}), t[1]];
}, N2 = (e) => (...t) => xe.asap(() => e(...t)), iW = Nr.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 = Nr.navigator && /(msie|trident)/i.test(Nr.navigator.userAgent), t = document.createElement("a");
let n;
function r(o) {
let a = o;
return e && (t.setAttribute("href", a), a = t.href), t.setAttribute("href", a), {
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(o) {
const a = xe.isString(o) ? r(o) : o;
return a.protocol === n.protocol && a.host === n.host;
};
}()
) : (
// Non standard browser envs (web workers, react-native) lack needed support.
/* @__PURE__ */ function() {
return function() {
return !0;
};
}()
), sW = Nr.hasStandardBrowserEnv ? (
// Standard browser envs support document.cookie
{
write(e, t, n, r, o, a) {
const i = [e + "=" + encodeURIComponent(t)];
xe.isNumber(n) && i.push("expires=" + new Date(n).toGMTString()), xe.isString(r) && i.push("path=" + r), xe.isString(o) && i.push("domain=" + o), a === !0 && i.push("secure"), document.cookie = i.join("; ");
},
read(e) {
const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
return t ? decodeURIComponent(t[3]) : null;
},
remove(e) {
this.write(e, "", Date.now() - 864e5);
}
}
) : (
// Non-standard browser env (web workers, react-native) lack needed support.
{
write() {
},
read() {
return null;
},
remove() {
}
}
);
function lW(e) {
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
}
function uW(e, t) {
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
}
function f4(e, t) {
return e && !lW(t) ? uW(e, t) : t;
}
const L2 = (e) => e instanceof Lr ? { ...e } : e;
function ps(e, t) {
t = t || {};
const n = {};
function r(l, c, d) {
return xe.isPlainObject(l) && xe.isPlainObject(c) ? xe.merge.call({ caseless: d }, l, c) : xe.isPlainObject(c) ? xe.merge({}, c) : xe.isArray(c) ? c.slice() : c;
}
function o(l, c, d) {
if (xe.isUndefined(c)) {
if (!xe.isUndefined(l))
return r(void 0, l, d);
} else return r(l, c, d);
}
function a(l, c) {
if (!xe.isUndefined(c))
return r(void 0, c);
}
function i(l, c) {
if (xe.isUndefined(c)) {
if (!xe.isUndefined(l))
return r(void 0, l);
} else return r(void 0, c);
}
function s(l, c, d) {
if (d in t)
return r(l, c);
if (d in e)
return r(void 0, l);
}
const u = {
url: a,
method: a,
data: a,
baseURL: i,
transformRequest: i,
transformResponse: i,
paramsSerializer: i,
timeout: i,
timeoutMessage: i,
withCredentials: i,
withXSRFToken: i,
adapter: i,
responseType: i,
xsrfCookieName: i,
xsrfHeaderName: i,
onUploadProgress: i,
onDownloadProgress: i,
decompress: i,
maxContentLength: i,
maxBodyLength: i,
beforeRedirect: i,
transport: i,
httpAgent: i,
httpsAgent: i,
cancelToken: i,
socketPath: i,
responseEncoding: i,
validateStatus: s,
headers: (l, c) => o(L2(l), L2(c), !0)
};
return xe.forEach(Object.keys(Object.assign({}, e, t)), function(l) {
const c = u[l] || o, d = c(e[l], t[l], l);
xe.isUndefined(d) && c !== s || (n[l] = d);
}), n;
}
const h4 = (e) => {
const t = ps({}, e);
let { data: n, withXSRFToken: r, xsrfHeaderName: o, xsrfCookieName: a, headers: i, auth: s } = t;
t.headers = i = Lr.from(i), t.url = l4(f4(t.baseURL, t.url), e.params, e.paramsSerializer), s && i.set(
"Authorization",
"Basic " + btoa((s.username || "") + ":" + (s.password ? unescape(encodeURIComponent(s.password)) : ""))
);
let u;
if (xe.isFormData(n)) {
if (Nr.hasStandardBrowserEnv || Nr.hasStandardBrowserWebWorkerEnv)
i.setContentType(void 0);
else if ((u = i.getContentType()) !== !1) {
const [l, ...c] = u ? u.split(";").map((d) => d.trim()).filter(Boolean) : [];
i.setContentType([l || "multipart/form-data", ...c].join("; "));
}
}
if (Nr.hasStandardBrowserEnv && (r && xe.isFunction(r) && (r = r(t)), r || r !== !1 && iW(t.url))) {
const l = o && a && sW.read(a);
l && i.set(o, l);
}
return t;
}, cW = typeof XMLHttpRequest < "u", dW = cW && function(e) {
return new Promise(function(t, n) {
const r = h4(e);
let o = r.data;
const a = Lr.from(r.headers).normalize();
let { responseType: i, onUploadProgress: s, onDownloadProgress: u } = r, l, c, d, f, h;
function p() {
f && f(), h && h(), r.cancelToken && r.cancelToken.unsubscribe(l), r.signal && r.signal.removeEventListener("abort", l);
}
let v = new XMLHttpRequest();
v.open(r.method.toUpperCase(), r.url, !0), v.timeout = r.timeout;
function m() {
if (!v)
return;
const b = Lr.from(
"getAllResponseHeaders" in v && v.getAllResponseHeaders()
), x = {
data: !i || i === "text" || i === "json" ? v.responseText : v.response,
status: v.status,
statusText: v.statusText,
headers: b,
config: e,
request: v
};
p4(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 kt("Request aborted", kt.ECONNABORTED, e, v)), v = null);
}, v.onerror = function() {
n(new kt("Network Error", kt.ERR_NETWORK, e, v)), v = null;
}, v.ontimeout = function() {
let b = r.timeout ? "timeout of " + r.timeout + "ms exceeded" : "timeout exceeded";
const x = r.transitional || u4;
r.timeoutErrorMessage && (b = r.timeoutErrorMessage), n(new kt(
b,
x.clarifyTimeoutError ? kt.ETIMEDOUT : kt.ECONNABORTED,
e,
v
)), v = null;
}, o === void 0 && a.setContentType(null), "setRequestHeader" in v && xe.forEach(a.toJSON(), function(b, x) {
v.setRequestHeader(x, b);
}), xe.isUndefined(r.withCredentials) || (v.withCredentials = !!r.withCredentials), i && i !== "json" && (v.responseType = r.responseType), u && ([d, h] = jp(u, !0), v.addEventListener("progress", d)), s && v.upload && ([c, f] = jp(s), v.upload.addEventListener("progress", c), v.upload.addEventListener("loadend", f)), (r.cancelToken || r.signal) && (l = (b) => {
v && (n(!b || b.type ? new Hl(null, e, v) : b), v.abort(), v = null);
}, r.cancelToken && r.cancelToken.subscribe(l), r.signal && (r.signal.aborted ? l() : r.signal.addEventListener("abort", l)));
const g = rW(r.url);
if (g && Nr.protocols.indexOf(g) === -1) {
n(new kt("Unsupported protocol " + g + ":", kt.ERR_BAD_REQUEST, e));
return;
}
v.send(o || null);
});
}, pW = (e, t) => {
const { length: n } = e = e ? e.filter(Boolean) : [];
if (t || n) {
let r = new AbortController(), o;
const a = function(l) {
if (!o) {
o = !0, s();
const c = l instanceof Error ? l : this.reason;
r.abort(c instanceof kt ? c : new Hl(c instanceof Error ? c.message : c));
}
};
let i = t && setTimeout(() => {
i = null, a(new kt(`timeout ${t} of ms exceeded`, kt.ETIMEDOUT));
}, t);
const s = () => {
e && (i && clearTimeout(i), i = null, e.forEach((l) => {
l.unsubscribe ? l.unsubscribe(a) : l.removeEventListener("abort", a);
}), e = null);
};
e.forEach((l) => l.addEventListener("abort", a));
const { signal: u } = r;
return u.unsubscribe = () => xe.asap(s), u;
}
}, fW = function* (e, t) {
let n = e.byteLength;
if (n < t) {
yield e;
return;
}
let r = 0, o;
for (; r < n; )
o = r + t, yield e.slice(r, o), r = o;
}, hW = async function* (e, t) {
for await (const n of vW(e))
yield* fW(n, t);
}, vW = 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();
}
}, D2 = (e, t, n, r) => {
const o = hW(e, t);
let a = 0, i, s = (u) => {
i || (i = !0, r && r(u));
};
return new ReadableStream({
async pull(u) {
try {
const { done: l, value: c } = await o.next();
if (l) {
s(), u.close();
return;
}
let d = c.byteLength;
if (n) {
let f = a += d;
n(f);
}
u.enqueue(new Uint8Array(c));
} catch (l) {
throw s(l), l;
}
},
cancel(u) {
return s(u), o.return();
}
}, {
highWaterMark: 2
});
}, Yf = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", v4 = Yf && typeof ReadableStream == "function", gW = Yf && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), g4 = (e, ...t) => {
try {
return !!e(...t);
} catch {
return !1;
}
}, mW = v4 && g4(() => {
let e = !1;
const t = new Request(Nr.origin, {
body: new ReadableStream(),
method: "POST",
get duplex() {
return e = !0, "half";
}
}).headers.has("Content-Type");
return e && !t;
}), R2 = 64 * 1024, v0 = v4 && g4(() => xe.isReadableStream(new Response("").body)), Hp = {
stream: v0 && ((e) => e.body)
};
Yf && ((e) => {
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => {
!Hp[t] && (Hp[t] = xe.isFunction(e[t]) ? (n) => n[t]() : (n, r) => {
throw new kt(`Response type '${t}' is not supported`, kt.ERR_NOT_SUPPORT, r);
});
});
})(new Response());
const yW = async (e) => {
if (e == null)
return 0;
if (xe.isBlob(e))
return e.size;
if (xe.isSpecCompliantForm(e))
return (await new Request(Nr.origin, {
method: "POST",
body: e
}).arrayBuffer()).byteLength;
if (xe.isArrayBufferView(e) || xe.isArrayBuffer(e))
return e.byteLength;
if (xe.isURLSearchParams(e) && (e = e + ""), xe.isString(e))
return (await gW(e)).byteLength;
}, bW = async (e, t) => xe.toFiniteNumber(e.getContentLength()) ?? yW(t), wW = Yf && (async (e) => {
let {
url: t,
method: n,
data: r,
signal: o,
cancelToken: a,
timeout: i,
onDownloadProgress: s,
onUploadProgress: u,
responseType: l,
headers: c,
withCredentials: d = "same-origin",
fetchOptions: f
} = h4(e);
l = l ? (l + "").toLowerCase() : "text";
let h = pW([o, a && a.toAbortSignal()], i), p;
const v = h && h.unsubscribe && (() => {
h.unsubscribe();
});
let m;
try {
if (u && mW && n !== "get" && n !== "head" && (m = await bW(c, r)) !== 0) {
let C = new Request(t, {
method: "POST",
body: r,
duplex: "half"
}), k;
if (xe.isFormData(r) && (k = C.headers.get("content-type")) && c.setContentType(k), C.body) {
const [E, S] = I2(
m,
jp(N2(u))
);
r = D2(C.body, R2, E, S);
}
}
xe.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 b = await fetch(p);
const x = v0 && (l === "stream" || l === "response");
if (v0 && (s || x && v)) {
const C = {};
["status", "statusText", "headers"].forEach((O) => {
C[O] = b[O];
});
const k = xe.toFiniteNumber(b.headers.get("content-length")), [E, S] = s && I2(
k,
jp(N2(s), !0)
) || [];
b = new Response(
D2(b.body, R2, E, () => {
S && S(), v && v();
}),
C
);
}
l = l || "text";
let w = await Hp[xe.findKey(Hp, l) || "text"](b, e);
return !x && v && v(), await new Promise((C, k) => {
p4(C, k, {
data: w,
headers: Lr.from(b.headers),
status: b.status,
statusText: b.statusText,
config: e,
request: p
});
});
} catch (g) {
throw v && v(), g && g.name === "TypeError" && /fetch/i.test(g.message) ? Object.assign(
new kt("Network Error", kt.ERR_NETWORK, e, p),
{
cause: g.cause || g
}
) : kt.from(g, g && g.code, e, p);
}
}), g0 = {
http: Lq,
xhr: dW,
fetch: wW
};
xe.forEach(g0, (e, t) => {
if (e) {
try {
Object.defineProperty(e, "name", { value: t });
} catch {
}
Object.defineProperty(e, "adapterName", { value: t });
}
});
const B2 = (e) => `- ${e}`, xW = (e) => xe.isFunction(e) || e === null || e === !1, m4 = {
getAdapter: (e) => {
e = xe.isArray(e) ? e : [e];
const { length: t } = e;
let n, r;
const o = {};
for (let a = 0; a < t; a++) {
n = e[a];
let i;
if (r = n, !xW(n) && (r = g0[(i = String(n)).toLowerCase()], r === void 0))
throw new kt(`Unknown adapter '${i}'`);
if (r)
break;
o[i || "#" + a] = r;
}
if (!r) {
const a = Object.entries(o).map(
([s, u]) => `adapter ${s} ` + (u === !1 ? "is not supported by the environment" : "is not available in the build")
);
let i = t ? a.length > 1 ? `since :
` + a.map(B2).join(`
`) : " " + B2(a[0]) : "as no adapter specified";
throw new kt(
"There is no suitable adapter to dispatch the request " + i,
"ERR_NOT_SUPPORT"
);
}
return r;
},
adapters: g0
};
function uv(e) {
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
throw new Hl(null, e);
}
function M2(e) {
return uv(e), e.headers = Lr.from(e.headers), e.data = lv.call(
e,
e.transformRequest
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), m4.getAdapter(e.adapter || jc.adapter)(e).then(function(t) {
return uv(e), t.data = lv.call(
e,
e.transformResponse,
t
), t.headers = Lr.from(t.headers), t;
}, function(t) {
return d4(t) || (uv(e), t && t.response && (t.response.data = lv.call(
e,
e.transformResponse,
t.response
), t.response.headers = Lr.from(t.response.headers))), Promise.reject(t);
});
}
const y4 = "1.7.7", Am = {};
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
Am[e] = function(n) {
return typeof n === e || "a" + (t < 1 ? "n " : " ") + e;
};
});
const z2 = {};
Am.transitional = function(e, t, n) {
function r(o, a) {
return "[Axios v" + y4 + "] Transitional option '" + o + "'" + a + (n ? ". " + n : "");
}
return (o, a, i) => {
if (e === !1)
throw new kt(
r(a, " has been removed" + (t ? " in " + t : "")),
kt.ERR_DEPRECATED
);
return t && !z2[a] && (z2[a] = !0, console.warn(
r(
a,
" has been deprecated since v" + t + " and will be removed in the near future"
)
)), e ? e(o, a, i) : !0;
};
};
function kW(e, t, n) {
if (typeof e != "object")
throw new kt("options must be an object", kt.ERR_BAD_OPTION_VALUE);
const r = Object.keys(e);
let o = r.length;
for (; o-- > 0; ) {
const a = r[o], i = t[a];
if (i) {
const s = e[a], u = s === void 0 || i(s, a, e);
if (u !== !0)
throw new kt("option " + a + " must be " + u, kt.ERR_BAD_OPTION_VALUE);
continue;
}
if (n !== !0)
throw new kt("Unknown option " + a, kt.ERR_BAD_OPTION);
}
}
const m0 = {
assertOptions: kW,
validators: Am
}, Va = m0.validators;
class ns {
constructor(t) {
this.defaults = t, this.interceptors = {
request: new A2(),
response: new A2()
};
}
/**
* Dispatch a request
*
* @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
* @param {?Object} config
*
* @returns {Promise} The Promise to be fulfilled
*/
async request(t, n) {
try {
return await this._request(t, n);
} catch (r) {
if (r instanceof Error) {
let o;
Error.captureStackTrace ? Error.captureStackTrace(o = {}) : o = new Error();
const a = o.stack ? o.stack.replace(/^.+\n/, "") : "";
try {
r.stack ? a && !String(r.stack).endsWith(a.replace(/^.+\n.+\n/, "")) && (r.stack += `
` + a) : r.stack = a;
} catch {
}
}
throw r;
}
}
_request(t, n) {
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = ps(this.defaults, n);
const { transitional: r, paramsSerializer: o, headers: a } = n;
r !== void 0 && m0.assertOptions(r, {
silentJSONParsing: Va.transitional(Va.boolean),
forcedJSONParsing: Va.transitional(Va.boolean),
clarifyTimeoutError: Va.transitional(Va.boolean)
}, !1), o != null && (xe.isFunction(o) ? n.paramsSerializer = {
serialize: o
} : m0.assertOptions(o, {
encode: Va.function,
serialize: Va.function
}, !0)), n.method = (n.method || this.defaults.method || "get").toLowerCase();
let i = a && xe.merge(
a.common,
a[n.method]
);
a && xe.forEach(
["delete", "get", "head", "post", "put", "patch", "common"],
(p) => {
delete a[p];
}
), n.headers = Lr.concat(i, a);
const s = [];
let u = !0;
this.interceptors.request.forEach(function(p) {
typeof p.runWhen == "function" && p.runWhen(n) === !1 || (u = u && p.synchronous, s.unshift(p.fulfilled, p.rejected));
});
const l = [];
this.interceptors.response.forEach(function(p) {
l.push(p.fulfilled, p.rejected);
});
let c, d = 0, f;
if (!u) {
const p = [M2.bind(this), void 0];
for (p.unshift.apply(p, s), p.push.apply(p, l), 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 = M2.call(this, h);
} catch (p) {
return Promise.reject(p);
}
for (d = 0, f = l.length; d < f; )
c = c.then(l[d++], l[d++]);
return c;
}
getUri(t) {
t = ps(this.defaults, t);
const n = f4(t.baseURL, t.url);
return l4(n, t.params, t.paramsSerializer);
}
}
xe.forEach(["delete", "get", "head", "options"], function(e) {
ns.prototype[e] = function(t, n) {
return this.request(ps(n || {}, {
method: e,
url: t,
data: (n || {}).data
}));
};
});
xe.forEach(["post", "put", "patch"], function(e) {
function t(n) {
return function(r, o, a) {
return this.request(ps(a || {}, {
method: e,
headers: n ? {
"Content-Type": "multipart/form-data"
} : {},
url: r,
data: o
}));
};
}
ns.prototype[e] = t(), ns.prototype[e + "Form"] = t(!0);
});
class Fm {
constructor(t) {
if (typeof t != "function")
throw new TypeError("executor must be a function.");
let n;
this.promise = new Promise(function(o) {
n = o;
});
const r = this;
this.promise.then((o) => {
if (!r._listeners) return;
let a = r._listeners.length;
for (; a-- > 0; )
r._listeners[a](o);
r._listeners = null;
}), this.promise.then = (o) => {
let a;
const i = new Promise((s) => {
r.subscribe(s), a = s;
}).then(o);
return i.cancel = function() {
r.unsubscribe(a);
}, i;
}, t(function(o, a, i) {
r.reason || (r.reason = new Hl(o, a, i), n(r.reason));
});
}
/**
* Throws a `CanceledError` if cancellation has been requested.
*/
throwIfRequested() {
if (this.reason)
throw this.reason;
}
/**
* Subscribe to the cancel signal
*/
subscribe(t) {
if (this.reason) {
t(this.reason);
return;
}
this._listeners ? this._listeners.push(t) : this._listeners = [t];
}
/**
* Unsubscribe from the cancel signal
*/
unsubscribe(t) {
if (!this._listeners)
return;
const n = this._listeners.indexOf(t);
n !== -1 && this._listeners.splice(n, 1);
}
toAbortSignal() {
const t = new AbortController(), n = (r) => {
t.abort(r);
};
return this.subscribe(n), t.signal.unsubscribe = () => this.unsubscribe(n), t.signal;
}
/**
* Returns an object that contains a new `CancelToken` and a function that, when called,
* cancels the `CancelToken`.
*/
static source() {
let t;
return {
token: new Fm(function(n) {
t = n;
}),
cancel: t
};
}
}
function CW(e) {
return function(t) {
return e.apply(null, t);
};
}
function EW(e) {
return xe.isObject(e) && e.isAxiosError === !0;
}
const y0 = {
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(y0).forEach(([e, t]) => {
y0[t] = e;
});
function b4(e) {
const t = new ns(e), n = Y5(ns.prototype.request, t);
return xe.extend(n, ns.prototype, t, { allOwnKeys: !0 }), xe.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(r) {
return b4(ps(e, r));
}, n;
}
const Pn = b4(jc);
Pn.Axios = ns;
Pn.CanceledError = Hl;
Pn.CancelToken = Fm;
Pn.isCancel = d4;
Pn.VERSION = y4;
Pn.toFormData = Xf;
Pn.AxiosError = kt;
Pn.Cancel = Pn.CanceledError;
Pn.all = function(e) {
return Promise.all(e);
};
Pn.spread = CW;
Pn.isAxiosError = EW;
Pn.mergeConfig = ps;
Pn.AxiosHeaders = Lr;
Pn.formToJSON = (e) => c4(xe.isHTMLForm(e) ? new FormData(e) : e);
Pn.getAdapter = m4.getAdapter;
Pn.HttpStatusCode = y0;
Pn.default = Pn;
const SW = "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 _W() {
const e = SW;
async function t(n, r, o) {
return await Pn({
method: "get",
url: n,
params: r,
timeout: o
});
}
return {
defaultImg: e,
getRequest: t
};
}
const TW = ["src"], OW = ["src"], PW = {
key: 1,
class: "details"
}, $W = { key: 0 }, AW = { class: "title text-placeholder" }, FW = {
__name: "Card",
props: {
data: {
type: Object,
required: !0
},
width: {
type: Number,
default: 3
},
height: {
type: Number,
default: 3
},
showCardDetails: {
type: Boolean
},
bodyStyle: {
type: Object,
default: () => ({ padding: "20px", background: "#ffffff" })
},
imageStyle: {
type: Object,
default: () => ({})
},
imageContainerStyle: {
type: Object,
default: () => ({})
},
shadow: {
type: String,
default: "always"
}
},
emits: ["card-clicked", "datalink-clicked"],
setup(e, { emit: t }) {
function n(g) {
let b;
try {
b = new URL(g);
} catch {
return !1;
}
return b.protocol === "http:" || b.protocol === "https:";
}
const { defaultImg: r, getRequest: o } = _W(), a = H();
H(null), H(4);
const i = H(void 0), s = H(!1), u = H(!1), l = H(!1), c = e, d = t, f = _(() => c.data.title && ((i ? i.value : !1) || s.value) && (c.data.link || c.data.userData));
_(() => showCardDetails ? height * 0.525 : height), _(() => width - 2 * h), _(() => height * 0.237);
const h = _(() => height * 0.076);
_(() => showCardDetails ? height * 0.525 : height), me(
() => c.data,
() => {
i.value = void 0, s.value = !1, l.value = !1, u.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, Ge(() => {
m();
});
},
{ immediate: !0 }
), hf(() => {
Ge(() => {
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, b) {
o(g, {}, 11e3).then(
(x) => {
let w = x.data;
typeof w == "string" && w.startsWith("data:") ? i.value = x.data : c.data.mimetype ? i.value = `data:${c.data.mimetype};base64,${x.data}` : i.value = x.data;
},
(x) => {
x.message.includes("timeout") && x.message.includes("exceeded") && b.fetchAttempts < 3 ? (b.fetchAttempts += 1, v(g, b)) : s.value = !0;
}
);
}
function m() {
if (c.data.hideTitle)
u.value = !0, l.value = !0;
else {
const g = a;
g && g.offsetParent ? (l.value = !0, g.offsetWidth >= g.scrollWidth ? u.value = !0 : u.value = !1) : c.data.title.length > 20 ? u.value = !1 : u.value = !0;
}
}
return (g, b) => {
const x = HU, w = wU, C = SU, k = XU;
return T(), ie(C, {
shadow: e.shadow,
"body-style": e.bodyStyle,
style: lt({ padding: "0px", maxWidth: e.width + "rem" }),
class: "card"
}, {
default: G(() => [
tt((T(), B("div", null, [
Y("div", {
class: "cursor-pointer",
style: lt(e.imageContainerStyle),
onClick: it(p, ["prevent"])
}, [
s.value ? (T(), B("img", {
key: 0,
src: y(r),
style: lt(e.imageStyle)
}, null, 12, TW)) : (T(), B("img", {
key: 1,
src: i.value,
alt: "thumbnail loading ...",
style: lt(e.imageStyle)
}, null, 12, OW))
], 4),
ne("", !0),
e.showCardDetails ? (T(), B("div", PW, [
e.data.hideType ? ne("", !0) : (T(), B("p", $W, [
Y("b", null, Te(e.data.type), 1)
])),
ee(x, {
"virtual-ref": a.value,
disabled: u.value,
content: e.data.title,
placement: "top",
trigger: "hover",
"popper-class": "gallery-popper",
"virtual-triggering": ""
}, null, 8, ["virtual-ref", "disabled", "content"]),
tt(Y("p", {
ref_key: "titleText",
ref: a,
class: "title"
}, Te(e.data.title), 513), [
[Pt, !e.data.hideTitle]
]),
tt(Y("p", AW, null, 512), [
[Pt, e.data.hideTitle]
]),
ee(w, {
class: "button",
onClick: it(p, ["prevent"]),
size: "large"
}, {
default: G(() => [
Ke(" View " + Te(e.data.type), 1)
]),
_: 1
})
])) : ne("", !0)
])), [
[k, !f.value]
])
]),
_: 1
}, 8, ["shadow", "body-style", "style"]);
};
}
}, IW = /* @__PURE__ */ nm(FW, [["__scopeId", "data-v-8306387d"]]), Zf = (e) => (ki("data-v-e745b327"), e = e(), Ci(), e), NW = {
ref: "myButton",
class: "gallery"
}, LW = { class: "gallery-strip" }, DW = /* @__PURE__ */ Zf(() => /* @__PURE__ */ Y("span", { class: "progress-button" }, "‹", -1)), RW = [
DW
], BW = {
key: 1,
style: { width: "2rem" }
}, MW = /* @__PURE__ */ Zf(() => /* @__PURE__ */ Y("div", { class: "filler" }, null, -1)), zW = { class: "card-line" }, VW = /* @__PURE__ */ Zf(() => /* @__PURE__ */ Y("div", { class: "filler" }, null, -1)), jW = /* @__PURE__ */ Zf(() => /* @__PURE__ */ Y("span", { class: "progress-button" }, "›", -1)), HW = [
jW
], UW = {
key: 3,
style: { width: "2rem" }
}, qW = {
__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(S) {
return typeof window < "u" ? S * parseFloat(window.getComputedStyle(document.documentElement).fontSize) : S * 16;
}
const o = e, a = n, i = H(0), s = H(0), u = H(2), l = H(2), c = _(() => o.items.length), d = _(() => s.value > 0), f = _(() => s.value < c.value - 1), h = _(() => 0.78 * o.cardWidth);
_(() => c.value * (o.cardWidth + 0.25) - 0.25);
const p = _(() => {
const S = r(0.5), O = r(2), F = r(o.cardWidth), $ = (o.maxWidth - 2 * O - 2 * S) / (1.1 * F);
return Math.max(1, Math.floor($));
}), v = _(() => {
const S = r(1), O = o.maxWidth / (S * c.value);
return o.showIndicatorBar && O > 0.1 && c.value > 1;
}), m = _(() => {
const S = Math.floor(p.value / 2);
let O = s.value - S;
return O < 0 ? O = 0 : O + p.value > c.value && (O = c.value - p.value), O;
}), g = _(() => {
let S = [];
for (let O = 0; O < p.value; O++)
S.push(o.items[O + m.value]);
return S;
});
function b(S) {
a("card-clicked", S);
}
function x(S) {
a("datalink-clicked", S);
}
function w(S) {
return s.value - m.value === S && o.highlightActive;
}
function C() {
s.value += 1;
}
function k() {
s.value -= 1;
}
function E(S) {
s.value !== S && (s.value = S);
}
return t({
count: i,
currentIndex: s,
controlHeight: u,
controlWidth: l,
cardClicked: b,
isActive: w,
goNext: C,
goPrev: k,
indicatorClicked: E
}), (S, O) => (T(), B("div", NW, [
Y("div", LW, [
e.items.length > 1 ? (T(), B("a", {
key: 0,
href: "#",
class: W(["oval", "prev", { disabled: !d.value }]),
onClick: it(k, ["prevent"])
}, RW, 2)) : (T(), B("div", BW)),
MW,
Y("div", zW, [
(T(!0), B(Qe, null, At(g.value, (F, $) => (T(), B("span", {
key: "card_" + $,
class: W(["key-image-span", { active: w($) }])
}, [
F ? (T(), ie(IW, {
key: 0,
data: F,
"body-style": e.bodyStyle,
"image-container-style": e.imageContainerStyle,
"image-style": e.imageStyle,
width: e.cardWidth,
height: h.value,
shadow: e.shadow,
"show-card-details": e.showCardDetails,
onCardClicked: b,
onDatalinkClicked: x
}, null, 8, ["data", "body-style", "image-container-style", "image-style", "width", "height", "shadow", "show-card-details"])) : ne("", !0)
], 2))), 128))
]),
VW,
e.items.length > 1 ? (T(), B("a", {
key: 2,
href: "#",
class: W(["oval", "next", { disabled: !f.value }]),
onClick: it(C, ["prevent"])
}, HW, 2)) : (T(), B("div", UW))
]),
Y("div", {
style: lt(e.bottomSpacer)
}, null, 4),
v.value ? (T(), ie(HM, {
key: 0,
count: c.value,
current: s.value,
onClicked: E
}, null, 8, ["count", "current"])) : ne("", !0)
], 512));
}
}, WW = /* @__PURE__ */ nm(qW, [["__scopeId", "data-v-e745b327"]]), KW = {
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;
}
}
}, Od = (e) => e.split("\\").pop().split("/").pop(), fu = function(e) {
return e.replace(/\b\w/g, (t) => t.toUpperCase());
}, GW = {
name: "ImageGallery",
components: { Gallery: WW },
mixins: [MM, KW],
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: Od(t),
type: "Image",
link: r,
hideType: !0
});
});
},
createPlotItems: function() {
this.entry.plots && this.entry.plots.forEach((e) => {
const t = e.dataset.path, n = e.identifier, r = this.getThumbnailForPlot(
e,
this.entry.thumbnails
);
let o, a = "";
r && (o = this.getImageURL(this.envVars.API_LOCATION, {
id: n,
prefix: this.getS3Prefix(),
file_path: r.dataset.path,
s3Bucket: this.s3Bucket
}), a = r.mimetype.name);
const i = e.datacite, s = `${this.envVars.API_LOCATION}/s3-resource/${this.getS3Prefix()}files/`, u = s + e.dataset.path + this.getS3Args();
let l = {};
try {
l = 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: u },
metadata: l,
supplementalData: c
};
let f = {
label: fu(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: Od(t),
type: "Plot",
thumbnail: o,
userData: f,
hideType: !0,
mimetype: a
});
});
},
createScaffoldItems: function() {
if (this.entry.scaffolds) {
let e = 0;
this.entry.scaffolds.forEach((t, n) => {
const r = t.dataset.path, o = t.identifier, a = this.getThumbnailForScaffold(
t,
this.entry.scaffoldViews,
this.entry.thumbnails,
e
);
let i = "", s;
a && (s = this.getImageURL(this.envVars.API_LOCATION, {
id: o,
prefix: this.getS3Prefix(),
file_path: a.dataset.path,
s3Bucket: this.s3Bucket
}), i = a.mimetype.name);
let u = {
label: fu(this.label),
resource: `${this.envVars.API_LOCATION}s3-resource/${this.getS3Prefix()}files/${r}${this.getS3Args()}`,
title: "View 3D scaffold",
type: "Scaffold",
discoverId: this.datasetId,
apiLocation: this.envVars.API_LOCATION,
version: this.datasetVersion,
banner: this.datasetThumbnail,
s3uri: this.entry.s3uri,
contextCardUrl: this.getContextCardUrl(n)
};
this.items.Scaffolds.push({
id: o,
title: Od(r),
type: "Scaffold",
thumbnail: s,
userData: u,
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 o = {
share_link: `${this.envVars.NL_LINK_PREFIX}/dataviewer?datasetId=${this.datasetId}&version=${this.datasetVersion}&path=files/${n}`
};
let a = {
label: fu(this.label),
resource: o,
datasetId: this.datasetId,
s3uri: this.entry.s3uri,
title: "View segmentation",
type: "Segmentation"
};
const i = 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: Od(n),
type: "Segmentation",
thumbnail: i,
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
}
), o = {
share_link: n.share_link,
id: n.image_id,
itemId: n.sourcepkg_id
};
let a = {
label: fu(this.label),
resource: o,
datasetId: this.datasetId,
title: "View image",
name: fu(this.label),
type: "Biolucida"
};
return {
id: n.image_id,
title: "Image",
type: "Image",
thumbnail: r,
userData: a,
mimetype: "image/png",
hideType: !0
};
})
), this.items.Images = t;
}
}
},
mounted() {
this.ro = new ResizeObserver(this.onResize).observe(this.$el);
},
unmounted() {
delete this.ro;
}
}, XW = { class: "full-size" };
function YW(e, t, n, r, o, a) {
const i = Et("Gallery");
return T(), B("div", XW, [
ee(i, {
bottomSpacer: o.bottomSpacer,
cardWidth: 10,
items: a.galleryItems,
"max-width": o.maxWidth,
"show-indicator-bar": !1,
"show-card-details": !0,
"highlight-active": !1,
"image-style": o.imageStyle,
"image-container-style": o.imageContainerStyle,
"body-style": o.bodyStyle,
shadow: o.shadow,
onCardClicked: a.cardClicked,
onDatalinkClicked: a.datalinkClicked,
ref: "gallery"
}, null, 8, ["bottomSpacer", "items", "max-width", "image-style", "image-container-style", "body-style", "shadow", "onCardClicked", "onDatalinkClicked"])
]);
}
const w4 = /* @__PURE__ */ Lo(GW, [["render", YW], ["__scopeId", "data-v-7e45605c"]]);
function ZW(e) {
return { all: e = e || /* @__PURE__ */ new Map(), on: function(t, n) {
var r = e.get(t);
r ? r.push(n) : e.set(t, [n]);
}, off: function(t, n) {
var r = e.get(t);
r && (n ? r.splice(r.indexOf(n) >>> 0, 1) : e.set(t, []));
}, emit: function(t, n) {
var r = e.get(t);
r && r.slice().map(function(o) {
o(n);
}), (r = e.get("*")) && r.slice().map(function(o) {
o(t, n);
});
} };
}
const En = new ZW(), Up = {
"homo sapiens": "Human",
"rattus norvegicus": "Rat",
"mus musculus": "Mouse",
"sus scrofa domesticus": "Pig",
"sus scrofa": "Boar",
"felis catus": "Cat"
}, V2 = "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 JW = Object.defineProperty, QW = (e, t, n) => t in e ? JW(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Uo = (e, t, n) => QW(e, typeof t != "symbol" ? t + "" : t, n);
const va = (e, t, { checkForDefaultPrevented: n = !0 } = {}) => (r) => {
const o = e == null ? void 0 : e(r);
if (n === !1 || !o)
return t == null ? void 0 : t(r);
};
var j2;
const _n = typeof window < "u", eK = (e) => typeof e == "string", x4 = () => {
}, b0 = _n && ((j2 = window == null ? void 0 : window.navigator) == null ? void 0 : j2.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
function k4(e) {
return typeof e == "function" ? e() : y(e);
}
function tK(e) {
return e;
}
function Jf(e) {
return eg() ? (pf(e), !0) : !1;
}
function nK(e, t = !0) {
dt() ? ht(e) : t ? e() : Ge(e);
}
function wa(e) {
var t;
const n = k4(e);
return (t = n == null ? void 0 : n.$el) != null ? t : n;
}
const Qf = _n ? window : void 0;
function Qr(...e) {
let t, n, r, o;
if (eK(e[0]) || Array.isArray(e[0]) ? ([n, r, o] = e, t = Qf) : [t, n, r, o] = e, !t)
return x4;
Array.isArray(n) || (n = [n]), Array.isArray(r) || (r = [r]);
const a = [], i = () => {
a.forEach((c) => c()), a.length = 0;
}, s = (c, d, f, h) => (c.addEventListener(d, f, h), () => c.removeEventListener(d, f, h)), u = me(() => [wa(t), k4(o)], ([c, d]) => {
i(), c && a.push(...n.flatMap((f) => r.map((h) => s(c, f, h, d))));
}, { immediate: !0, flush: "post" }), l = () => {
u(), i();
};
return Jf(l), l;
}
let H2 = !1;
function rK(e, t, n = {}) {
const { window: r = Qf, ignore: o = [], capture: a = !0, detectIframe: i = !1 } = n;
if (!r)
return;
b0 && !H2 && (H2 = !0, Array.from(r.document.body.children).forEach((c) => c.addEventListener("click", x4)));
let s = !0;
const u = (c) => o.some((d) => {
if (typeof d == "string")
return Array.from(r.document.querySelectorAll(d)).some((f) => f === c.target || c.composedPath().includes(f));
{
const f = wa(d);
return f && (c.target === f || c.composedPath().includes(f));
}
}), l = [
Qr(r, "click", (c) => {
const d = wa(e);
if (!(!d || d === c.target || c.composedPath().includes(d))) {
if (c.detail === 0 && (s = !u(c)), !s) {
s = !0;
return;
}
t(c);
}
}, { passive: !0, capture: a }),
Qr(r, "pointerdown", (c) => {
const d = wa(e);
d && (s = !c.composedPath().includes(d) && !u(c));
}, { passive: !0 }),
i && Qr(r, "blur", (c) => {
var d;
const f = wa(e);
((d = r.document.activeElement) == null ? void 0 : d.tagName) === "IFRAME" && !(f != null && f.contains(r.document.activeElement)) && t(c);
})
].filter(Boolean);
return () => l.forEach((c) => c());
}
function C4(e, t = !1) {
const n = H(), r = () => n.value = !!e();
return r(), nK(r, t), n;
}
const U2 = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, q2 = "__vueuse_ssr_handlers__";
U2[q2] = U2[q2] || {};
var W2 = Object.getOwnPropertySymbols, oK = Object.prototype.hasOwnProperty, aK = Object.prototype.propertyIsEnumerable, iK = (e, t) => {
var n = {};
for (var r in e)
oK.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
if (e != null && W2)
for (var r of W2(e))
t.indexOf(r) < 0 && aK.call(e, r) && (n[r] = e[r]);
return n;
};
function ga(e, t, n = {}) {
const r = n, { window: o = Qf } = r, a = iK(r, ["window"]);
let i;
const s = C4(() => o && "ResizeObserver" in o), u = () => {
i && (i.disconnect(), i = void 0);
}, l = me(() => wa(e), (d) => {
u(), s.value && o && d && (i = new ResizeObserver(t), i.observe(d, a));
}, { immediate: !0, flush: "post" }), c = () => {
u(), l();
};
return Jf(c), {
isSupported: s,
stop: c
};
}
var K2 = Object.getOwnPropertySymbols, sK = Object.prototype.hasOwnProperty, lK = Object.prototype.propertyIsEnumerable, uK = (e, t) => {
var n = {};
for (var r in e)
sK.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
if (e != null && K2)
for (var r of K2(e))
t.indexOf(r) < 0 && lK.call(e, r) && (n[r] = e[r]);
return n;
};
function cK(e, t, n = {}) {
const r = n, { window: o = Qf } = r, a = uK(r, ["window"]);
let i;
const s = C4(() => o && "MutationObserver" in o), u = () => {
i && (i.disconnect(), i = void 0);
}, l = me(() => wa(e), (d) => {
u(), s.value && o && d && (i = new MutationObserver(t), i.observe(d, a));
}, { immediate: !0 }), c = () => {
u(), l();
};
return Jf(c), {
isSupported: s,
stop: c
};
}
var G2;
(function(e) {
e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE";
})(G2 || (G2 = {}));
var dK = Object.defineProperty, X2 = Object.getOwnPropertySymbols, pK = Object.prototype.hasOwnProperty, fK = Object.prototype.propertyIsEnumerable, Y2 = (e, t, n) => t in e ? dK(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, hK = (e, t) => {
for (var n in t || (t = {}))
pK.call(t, n) && Y2(e, n, t[n]);
if (X2)
for (var n of X2(t))
fK.call(t, n) && Y2(e, n, t[n]);
return e;
};
const vK = {
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]
};
hK({
linear: tK
}, vK);
const gK = () => _n && /firefox/i.test(window.navigator.userAgent), Im = (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 ic = () => {
}, mK = Object.prototype.hasOwnProperty, fs = (e, t) => mK.call(e, t), Tr = Array.isArray, wr = (e) => typeof e == "function", ur = (e) => typeof e == "string", Gn = (e) => e !== null && typeof e == "object", yK = Object.prototype.toString, bK = (e) => yK.call(e), cv = (e) => bK(e).slice(8, -1), E4 = (e) => {
const t = /* @__PURE__ */ Object.create(null);
return (n) => t[n] || (t[n] = e(n));
}, wK = /-(\w)/g, xK = E4((e) => e.replace(wK, (t, n) => n ? n.toUpperCase() : "")), kK = /\B([A-Z])/g, CK = E4(
(e) => e.replace(kK, "-$1").toLowerCase()
);
var S4 = typeof global == "object" && global && global.Object === Object && global, EK = typeof self == "object" && self && self.Object === Object && self, ia = S4 || EK || Function("return this")(), ra = ia.Symbol, _4 = Object.prototype, SK = _4.hasOwnProperty, _K = _4.toString, hu = ra ? ra.toStringTag : void 0;
function TK(e) {
var t = SK.call(e, hu), n = e[hu];
try {
e[hu] = void 0;
var r = !0;
} catch {
}
var o = _K.call(e);
return r && (t ? e[hu] = n : delete e[hu]), o;
}
var OK = Object.prototype, PK = OK.toString;
function $K(e) {
return PK.call(e);
}
var AK = "[object Null]", FK = "[object Undefined]", Z2 = ra ? ra.toStringTag : void 0;
function Ul(e) {
return e == null ? e === void 0 ? FK : AK : Z2 && Z2 in Object(e) ? TK(e) : $K(e);
}
function Cl(e) {
return e != null && typeof e == "object";
}
var IK = "[object Symbol]";
function eh(e) {
return typeof e == "symbol" || Cl(e) && Ul(e) == IK;
}
function NK(e, t) {
for (var n = -1, r = e == null ? 0 : e.length, o = Array(r); ++n < r; )
o[n] = t(e[n], n, e);
return o;
}
var Ao = Array.isArray, LK = 1 / 0, J2 = ra ? ra.prototype : void 0, Q2 = J2 ? J2.toString : void 0;
function T4(e) {
if (typeof e == "string")
return e;
if (Ao(e))
return NK(e, T4) + "";
if (eh(e))
return Q2 ? Q2.call(e) : "";
var t = e + "";
return t == "0" && 1 / e == -LK ? "-0" : t;
}
var DK = /\s/;
function RK(e) {
for (var t = e.length; t-- && DK.test(e.charAt(t)); )
;
return t;
}
var BK = /^\s+/;
function MK(e) {
return e && e.slice(0, RK(e) + 1).replace(BK, "");
}
function vi(e) {
var t = typeof e;
return e != null && (t == "object" || t == "function");
}
var ew = NaN, zK = /^[-+]0x[0-9a-f]+$/i, VK = /^0b[01]+$/i, jK = /^0o[0-7]+$/i, HK = parseInt;
function tw(e) {
if (typeof e == "number")
return e;
if (eh(e))
return ew;
if (vi(e)) {
var t = typeof e.valueOf == "function" ? e.valueOf() : e;
e = vi(t) ? t + "" : t;
}
if (typeof e != "string")
return e === 0 ? e : +e;
e = MK(e);
var n = VK.test(e);
return n || jK.test(e) ? HK(e.slice(2), n ? 2 : 8) : zK.test(e) ? ew : +e;
}
function O4(e) {
return e;
}
var UK = "[object AsyncFunction]", qK = "[object Function]", WK = "[object GeneratorFunction]", KK = "[object Proxy]";
function P4(e) {
if (!vi(e))
return !1;
var t = Ul(e);
return t == qK || t == WK || t == UK || t == KK;
}
var dv = ia["__core-js_shared__"], nw = function() {
var e = /[^.]+$/.exec(dv && dv.keys && dv.keys.IE_PROTO || "");
return e ? "Symbol(src)_1." + e : "";
}();
function GK(e) {
return !!nw && nw in e;
}
var XK = Function.prototype, YK = XK.toString;
function Ps(e) {
if (e != null) {
try {
return YK.call(e);
} catch {
}
try {
return e + "";
} catch {
}
}
return "";
}
var ZK = /[\\^$.*+?()[\]{}|]/g, JK = /^\[object .+?Constructor\]$/, QK = Function.prototype, eG = Object.prototype, tG = QK.toString, nG = eG.hasOwnProperty, rG = RegExp(
"^" + tG.call(nG).replace(ZK, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
);
function oG(e) {
if (!vi(e) || GK(e))
return !1;
var t = P4(e) ? rG : JK;
return t.test(Ps(e));
}
function aG(e, t) {
return e == null ? void 0 : e[t];
}
function $s(e, t) {
var n = aG(e, t);
return oG(n) ? n : void 0;
}
var w0 = $s(ia, "WeakMap");
function iG(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 sG = 800, lG = 16, uG = Date.now;
function cG(e) {
var t = 0, n = 0;
return function() {
var r = uG(), o = lG - (r - n);
if (n = r, o > 0) {
if (++t >= sG)
return arguments[0];
} else
t = 0;
return e.apply(void 0, arguments);
};
}
function dG(e) {
return function() {
return e;
};
}
var qp = function() {
try {
var e = $s(Object, "defineProperty");
return e({}, "", {}), e;
} catch {
}
}(), pG = qp ? function(e, t) {
return qp(e, "toString", {
configurable: !0,
enumerable: !1,
value: dG(t),
writable: !0
});
} : O4, fG = cG(pG);
function hG(e, t, n, r) {
e.length;
for (var o = n + 1; o--; )
if (t(e[o], o, e))
return o;
return -1;
}
var vG = 9007199254740991, gG = /^(?:0|[1-9]\d*)$/;
function Nm(e, t) {
var n = typeof e;
return t = t ?? vG, !!t && (n == "number" || n != "symbol" && gG.test(e)) && e > -1 && e % 1 == 0 && e < t;
}
function mG(e, t, n) {
t == "__proto__" && qp ? qp(e, t, {
configurable: !0,
enumerable: !0,
value: n,
writable: !0
}) : e[t] = n;
}
function Lm(e, t) {
return e === t || e !== e && t !== t;
}
var yG = Object.prototype, bG = yG.hasOwnProperty;
function wG(e, t, n) {
var r = e[t];
(!(bG.call(e, t) && Lm(r, n)) || n === void 0 && !(t in e)) && mG(e, t, n);
}
var rw = Math.max;
function xG(e, t, n) {
return t = rw(t === void 0 ? e.length - 1 : t, 0), function() {
for (var r = arguments, o = -1, a = rw(r.length - t, 0), i = Array(a); ++o < a; )
i[o] = r[t + o];
o = -1;
for (var s = Array(t + 1); ++o < t; )
s[o] = r[o];
return s[t] = n(i), iG(e, this, s);
};
}
var kG = 9007199254740991;
function Dm(e) {
return typeof e == "number" && e > -1 && e % 1 == 0 && e <= kG;
}
function CG(e) {
return e != null && Dm(e.length) && !P4(e);
}
var EG = Object.prototype;
function SG(e) {
var t = e && e.constructor, n = typeof t == "function" && t.prototype || EG;
return e === n;
}
function _G(e, t) {
for (var n = -1, r = Array(e); ++n < e; )
r[n] = t(n);
return r;
}
var TG = "[object Arguments]";
function ow(e) {
return Cl(e) && Ul(e) == TG;
}
var $4 = Object.prototype, OG = $4.hasOwnProperty, PG = $4.propertyIsEnumerable, Rm = ow(/* @__PURE__ */ function() {
return arguments;
}()) ? ow : function(e) {
return Cl(e) && OG.call(e, "callee") && !PG.call(e, "callee");
};
function $G() {
return !1;
}
var A4 = typeof exports == "object" && exports && !exports.nodeType && exports, aw = A4 && typeof module == "object" && module && !module.nodeType && module, AG = aw && aw.exports === A4, iw = AG ? ia.Buffer : void 0, FG = iw ? iw.isBuffer : void 0, x0 = FG || $G, IG = "[object Arguments]", NG = "[object Array]", LG = "[object Boolean]", DG = "[object Date]", RG = "[object Error]", BG = "[object Function]", MG = "[object Map]", zG = "[object Number]", VG = "[object Object]", jG = "[object RegExp]", HG = "[object Set]", UG = "[object String]", qG = "[object WeakMap]", WG = "[object ArrayBuffer]", KG = "[object DataView]", GG = "[object Float32Array]", XG = "[object Float64Array]", YG = "[object Int8Array]", ZG = "[object Int16Array]", JG = "[object Int32Array]", QG = "[object Uint8Array]", eX = "[object Uint8ClampedArray]", tX = "[object Uint16Array]", nX = "[object Uint32Array]", tn = {};
tn[GG] = tn[XG] = tn[YG] = tn[ZG] = tn[JG] = tn[QG] = tn[eX] = tn[tX] = tn[nX] = !0;
tn[IG] = tn[NG] = tn[WG] = tn[LG] = tn[KG] = tn[DG] = tn[RG] = tn[BG] = tn[MG] = tn[zG] = tn[VG] = tn[jG] = tn[HG] = tn[UG] = tn[qG] = !1;
function rX(e) {
return Cl(e) && Dm(e.length) && !!tn[Ul(e)];
}
function oX(e) {
return function(t) {
return e(t);
};
}
var F4 = typeof exports == "object" && exports && !exports.nodeType && exports, Bu = F4 && typeof module == "object" && module && !module.nodeType && module, aX = Bu && Bu.exports === F4, pv = aX && S4.process, sw = function() {
try {
var e = Bu && Bu.require && Bu.require("util").types;
return e || pv && pv.binding && pv.binding("util");
} catch {
}
}(), lw = sw && sw.isTypedArray, I4 = lw ? oX(lw) : rX, iX = Object.prototype, sX = iX.hasOwnProperty;
function lX(e, t) {
var n = Ao(e), r = !n && Rm(e), o = !n && !r && x0(e), a = !n && !r && !o && I4(e), i = n || r || o || a, s = i ? _G(e.length, String) : [], u = s.length;
for (var l in e)
sX.call(e, l) && !(i && // Safari 9 has enumerable `arguments.length` in strict mode.
(l == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
o && (l == "offset" || l == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
a && (l == "buffer" || l == "byteLength" || l == "byteOffset") || // Skip index properties.
Nm(l, u))) && s.push(l);
return s;
}
function uX(e, t) {
return function(n) {
return e(t(n));
};
}
var cX = uX(Object.keys, Object), dX = Object.prototype, pX = dX.hasOwnProperty;
function fX(e) {
if (!SG(e))
return cX(e);
var t = [];
for (var n in Object(e))
pX.call(e, n) && n != "constructor" && t.push(n);
return t;
}
function N4(e) {
return CG(e) ? lX(e) : fX(e);
}
var hX = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, vX = /^\w*$/;
function Bm(e, t) {
if (Ao(e))
return !1;
var n = typeof e;
return n == "number" || n == "symbol" || n == "boolean" || e == null || eh(e) ? !0 : vX.test(e) || !hX.test(e) || t != null && e in Object(t);
}
var sc = $s(Object, "create");
function gX() {
this.__data__ = sc ? sc(null) : {}, this.size = 0;
}
function mX(e) {
var t = this.has(e) && delete this.__data__[e];
return this.size -= t ? 1 : 0, t;
}
var yX = "__lodash_hash_undefined__", bX = Object.prototype, wX = bX.hasOwnProperty;
function xX(e) {
var t = this.__data__;
if (sc) {
var n = t[e];
return n === yX ? void 0 : n;
}
return wX.call(t, e) ? t[e] : void 0;
}
var kX = Object.prototype, CX = kX.hasOwnProperty;
function EX(e) {
var t = this.__data__;
return sc ? t[e] !== void 0 : CX.call(t, e);
}
var SX = "__lodash_hash_undefined__";
function _X(e, t) {
var n = this.__data__;
return this.size += this.has(e) ? 0 : 1, n[e] = sc && t === void 0 ? SX : t, this;
}
function hs(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]);
}
}
hs.prototype.clear = gX;
hs.prototype.delete = mX;
hs.prototype.get = xX;
hs.prototype.has = EX;
hs.prototype.set = _X;
function TX() {
this.__data__ = [], this.size = 0;
}
function th(e, t) {
for (var n = e.length; n--; )
if (Lm(e[n][0], t))
return n;
return -1;
}
var OX = Array.prototype, PX = OX.splice;
function $X(e) {
var t = this.__data__, n = th(t, e);
if (n < 0)
return !1;
var r = t.length - 1;
return n == r ? t.pop() : PX.call(t, n, 1), --this.size, !0;
}
function AX(e) {
var t = this.__data__, n = th(t, e);
return n < 0 ? void 0 : t[n][1];
}
function FX(e) {
return th(this.__data__, e) > -1;
}
function IX(e, t) {
var n = this.__data__, r = th(n, e);
return r < 0 ? (++this.size, n.push([e, t])) : n[r][1] = t, this;
}
function Fa(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]);
}
}
Fa.prototype.clear = TX;
Fa.prototype.delete = $X;
Fa.prototype.get = AX;
Fa.prototype.has = FX;
Fa.prototype.set = IX;
var lc = $s(ia, "Map");
function NX() {
this.size = 0, this.__data__ = {
hash: new hs(),
map: new (lc || Fa)(),
string: new hs()
};
}
function LX(e) {
var t = typeof e;
return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e !== "__proto__" : e === null;
}
function nh(e, t) {
var n = e.__data__;
return LX(t) ? n[typeof t == "string" ? "string" : "hash"] : n.map;
}
function DX(e) {
var t = nh(this, e).delete(e);
return this.size -= t ? 1 : 0, t;
}
function RX(e) {
return nh(this, e).get(e);
}
function BX(e) {
return nh(this, e).has(e);
}
function MX(e, t) {
var n = nh(this, e), r = n.size;
return n.set(e, t), this.size += n.size == r ? 0 : 1, this;
}
function Ia(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]);
}
}
Ia.prototype.clear = NX;
Ia.prototype.delete = DX;
Ia.prototype.get = RX;
Ia.prototype.has = BX;
Ia.prototype.set = MX;
var zX = "Expected a function";
function Mm(e, t) {
if (typeof e != "function" || t != null && typeof t != "function")
throw new TypeError(zX);
var n = function() {
var r = arguments, o = t ? t.apply(this, r) : r[0], a = n.cache;
if (a.has(o))
return a.get(o);
var i = e.apply(this, r);
return n.cache = a.set(o, i) || a, i;
};
return n.cache = new (Mm.Cache || Ia)(), n;
}
Mm.Cache = Ia;
var VX = 500;
function jX(e) {
var t = Mm(e, function(r) {
return n.size === VX && n.clear(), r;
}), n = t.cache;
return t;
}
var HX = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, UX = /\\(\\)?/g, qX = jX(function(e) {
var t = [];
return e.charCodeAt(0) === 46 && t.push(""), e.replace(HX, function(n, r, o, a) {
t.push(o ? a.replace(UX, "$1") : r || n);
}), t;
});
function WX(e) {
return e == null ? "" : T4(e);
}
function rh(e, t) {
return Ao(e) ? e : Bm(e, t) ? [e] : qX(WX(e));
}
var KX = 1 / 0;
function Hc(e) {
if (typeof e == "string" || eh(e))
return e;
var t = e + "";
return t == "0" && 1 / e == -KX ? "-0" : t;
}
function zm(e, t) {
t = rh(t, e);
for (var n = 0, r = t.length; e != null && n < r; )
e = e[Hc(t[n++])];
return n && n == r ? e : void 0;
}
function ya(e, t, n) {
var r = e == null ? void 0 : zm(e, t);
return r === void 0 ? n : r;
}
function L4(e, t) {
for (var n = -1, r = t.length, o = e.length; ++n < r; )
e[o + n] = t[n];
return e;
}
var uw = ra ? ra.isConcatSpreadable : void 0;
function GX(e) {
return Ao(e) || Rm(e) || !!(uw && e && e[uw]);
}
function XX(e, t, n, r, o) {
var a = -1, i = e.length;
for (n || (n = GX), o || (o = []); ++a < i; ) {
var s = e[a];
n(s) ? L4(o, s) : o[o.length] = s;
}
return o;
}
function YX(e) {
var t = e == null ? 0 : e.length;
return t ? XX(e) : [];
}
function ZX(e) {
return fG(xG(e, void 0, YX), e + "");
}
function Qa() {
if (!arguments.length)
return [];
var e = arguments[0];
return Ao(e) ? e : [e];
}
function JX() {
this.__data__ = new Fa(), this.size = 0;
}
function QX(e) {
var t = this.__data__, n = t.delete(e);
return this.size = t.size, n;
}
function eY(e) {
return this.__data__.get(e);
}
function tY(e) {
return this.__data__.has(e);
}
var nY = 200;
function rY(e, t) {
var n = this.__data__;
if (n instanceof Fa) {
var r = n.__data__;
if (!lc || r.length < nY - 1)
return r.push([e, t]), this.size = ++n.size, this;
n = this.__data__ = new Ia(r);
}
return n.set(e, t), this.size = n.size, this;
}
function ka(e) {
var t = this.__data__ = new Fa(e);
this.size = t.size;
}
ka.prototype.clear = JX;
ka.prototype.delete = QX;
ka.prototype.get = eY;
ka.prototype.has = tY;
ka.prototype.set = rY;
function oY(e, t) {
for (var n = -1, r = e == null ? 0 : e.length, o = 0, a = []; ++n < r; ) {
var i = e[n];
t(i, n, e) && (a[o++] = i);
}
return a;
}
function aY() {
return [];
}
var iY = Object.prototype, sY = iY.propertyIsEnumerable, cw = Object.getOwnPropertySymbols, lY = cw ? function(e) {
return e == null ? [] : (e = Object(e), oY(cw(e), function(t) {
return sY.call(e, t);
}));
} : aY;
function uY(e, t, n) {
var r = t(e);
return Ao(e) ? r : L4(r, n(e));
}
function dw(e) {
return uY(e, N4, lY);
}
var k0 = $s(ia, "DataView"), C0 = $s(ia, "Promise"), E0 = $s(ia, "Set"), pw = "[object Map]", cY = "[object Object]", fw = "[object Promise]", hw = "[object Set]", vw = "[object WeakMap]", gw = "[object DataView]", dY = Ps(k0), pY = Ps(lc), fY = Ps(C0), hY = Ps(E0), vY = Ps(w0), Ya = Ul;
(k0 && Ya(new k0(new ArrayBuffer(1))) != gw || lc && Ya(new lc()) != pw || C0 && Ya(C0.resolve()) != fw || E0 && Ya(new E0()) != hw || w0 && Ya(new w0()) != vw) && (Ya = function(e) {
var t = Ul(e), n = t == cY ? e.constructor : void 0, r = n ? Ps(n) : "";
if (r)
switch (r) {
case dY:
return gw;
case pY:
return pw;
case fY:
return fw;
case hY:
return hw;
case vY:
return vw;
}
return t;
});
var mw = ia.Uint8Array, gY = "__lodash_hash_undefined__";
function mY(e) {
return this.__data__.set(e, gY), this;
}
function yY(e) {
return this.__data__.has(e);
}
function Wp(e) {
var t = -1, n = e == null ? 0 : e.length;
for (this.__data__ = new Ia(); ++t < n; )
this.add(e[t]);
}
Wp.prototype.add = Wp.prototype.push = mY;
Wp.prototype.has = yY;
function bY(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 wY(e, t) {
return e.has(t);
}
var xY = 1, kY = 2;
function D4(e, t, n, r, o, a) {
var i = n & xY, s = e.length, u = t.length;
if (s != u && !(i && u > s))
return !1;
var l = a.get(e), c = a.get(t);
if (l && c)
return l == t && c == e;
var d = -1, f = !0, h = n & kY ? new Wp() : void 0;
for (a.set(e, t), a.set(t, e); ++d < s; ) {
var p = e[d], v = t[d];
if (r)
var m = i ? r(v, p, d, t, e, a) : r(p, v, d, e, t, a);
if (m !== void 0) {
if (m)
continue;
f = !1;
break;
}
if (h) {
if (!bY(t, function(g, b) {
if (!wY(h, b) && (p === g || o(p, g, n, r, a)))
return h.push(b);
})) {
f = !1;
break;
}
} else if (!(p === v || o(p, v, n, r, a))) {
f = !1;
break;
}
}
return a.delete(e), a.delete(t), f;
}
function CY(e) {
var t = -1, n = Array(e.size);
return e.forEach(function(r, o) {
n[++t] = [o, r];
}), n;
}
function EY(e) {
var t = -1, n = Array(e.size);
return e.forEach(function(r) {
n[++t] = r;
}), n;
}
var SY = 1, _Y = 2, TY = "[object Boolean]", OY = "[object Date]", PY = "[object Error]", $Y = "[object Map]", AY = "[object Number]", FY = "[object RegExp]", IY = "[object Set]", NY = "[object String]", LY = "[object Symbol]", DY = "[object ArrayBuffer]", RY = "[object DataView]", yw = ra ? ra.prototype : void 0, fv = yw ? yw.valueOf : void 0;
function BY(e, t, n, r, o, a, i) {
switch (n) {
case RY:
if (e.byteLength != t.byteLength || e.byteOffset != t.byteOffset)
return !1;
e = e.buffer, t = t.buffer;
case DY:
return !(e.byteLength != t.byteLength || !a(new mw(e), new mw(t)));
case TY:
case OY:
case AY:
return Lm(+e, +t);
case PY:
return e.name == t.name && e.message == t.message;
case FY:
case NY:
return e == t + "";
case $Y:
var s = CY;
case IY:
var u = r & SY;
if (s || (s = EY), e.size != t.size && !u)
return !1;
var l = i.get(e);
if (l)
return l == t;
r |= _Y, i.set(e, t);
var c = D4(s(e), s(t), r, o, a, i);
return i.delete(e), c;
case LY:
if (fv)
return fv.call(e) == fv.call(t);
}
return !1;
}
var MY = 1, zY = Object.prototype, VY = zY.hasOwnProperty;
function jY(e, t, n, r, o, a) {
var i = n & MY, s = dw(e), u = s.length, l = dw(t), c = l.length;
if (u != c && !i)
return !1;
for (var d = u; d--; ) {
var f = s[d];
if (!(i ? f in t : VY.call(t, f)))
return !1;
}
var h = a.get(e), p = a.get(t);
if (h && p)
return h == t && p == e;
var v = !0;
a.set(e, t), a.set(t, e);
for (var m = i; ++d < u; ) {
f = s[d];
var g = e[f], b = t[f];
if (r)
var x = i ? r(b, g, f, t, e, a) : r(g, b, f, e, t, a);
if (!(x === void 0 ? g === b || o(g, b, n, r, a) : x)) {
v = !1;
break;
}
m || (m = f == "constructor");
}
if (v && !m) {
var w = e.constructor, C = t.constructor;
w != C && "constructor" in e && "constructor" in t && !(typeof w == "function" && w instanceof w && typeof C == "function" && C instanceof C) && (v = !1);
}
return a.delete(e), a.delete(t), v;
}
var HY = 1, bw = "[object Arguments]", ww = "[object Array]", Pd = "[object Object]", UY = Object.prototype, xw = UY.hasOwnProperty;
function qY(e, t, n, r, o, a) {
var i = Ao(e), s = Ao(t), u = i ? ww : Ya(e), l = s ? ww : Ya(t);
u = u == bw ? Pd : u, l = l == bw ? Pd : l;
var c = u == Pd, d = l == Pd, f = u == l;
if (f && x0(e)) {
if (!x0(t))
return !1;
i = !0, c = !1;
}
if (f && !c)
return a || (a = new ka()), i || I4(e) ? D4(e, t, n, r, o, a) : BY(e, t, u, n, r, o, a);
if (!(n & HY)) {
var h = c && xw.call(e, "__wrapped__"), p = d && xw.call(t, "__wrapped__");
if (h || p) {
var v = h ? e.value() : e, m = p ? t.value() : t;
return a || (a = new ka()), o(v, m, n, r, a);
}
}
return f ? (a || (a = new ka()), jY(e, t, n, r, o, a)) : !1;
}
function oh(e, t, n, r, o) {
return e === t ? !0 : e == null || t == null || !Cl(e) && !Cl(t) ? e !== e && t !== t : qY(e, t, n, r, oh, o);
}
var WY = 1, KY = 2;
function GY(e, t, n, r) {
var o = n.length, a = o;
if (e == null)
return !a;
for (e = Object(e); o--; ) {
var i = n[o];
if (i[2] ? i[1] !== e[i[0]] : !(i[0] in e))
return !1;
}
for (; ++o < a; ) {
i = n[o];
var s = i[0], u = e[s], l = i[1];
if (i[2]) {
if (u === void 0 && !(s in e))
return !1;
} else {
var c = new ka(), d;
if (!(d === void 0 ? oh(l, u, WY | KY, r, c) : d))
return !1;
}
}
return !0;
}
function R4(e) {
return e === e && !vi(e);
}
function XY(e) {
for (var t = N4(e), n = t.length; n--; ) {
var r = t[n], o = e[r];
t[n] = [r, o, R4(o)];
}
return t;
}
function B4(e, t) {
return function(n) {
return n == null ? !1 : n[e] === t && (t !== void 0 || e in Object(n));
};
}
function YY(e) {
var t = XY(e);
return t.length == 1 && t[0][2] ? B4(t[0][0], t[0][1]) : function(n) {
return n === e || GY(n, e, t);
};
}
function ZY(e, t) {
return e != null && t in Object(e);
}
function JY(e, t, n) {
t = rh(t, e);
for (var r = -1, o = t.length, a = !1; ++r < o; ) {
var i = Hc(t[r]);
if (!(a = e != null && n(e, i)))
break;
e = e[i];
}
return a || ++r != o ? a : (o = e == null ? 0 : e.length, !!o && Dm(o) && Nm(i, o) && (Ao(e) || Rm(e)));
}
function M4(e, t) {
return e != null && JY(e, t, ZY);
}
var QY = 1, eZ = 2;
function tZ(e, t) {
return Bm(e) && R4(t) ? B4(Hc(e), t) : function(n) {
var r = ya(n, e);
return r === void 0 && r === t ? M4(n, e) : oh(t, r, QY | eZ);
};
}
function nZ(e) {
return function(t) {
return t == null ? void 0 : t[e];
};
}
function rZ(e) {
return function(t) {
return zm(t, e);
};
}
function oZ(e) {
return Bm(e) ? nZ(Hc(e)) : rZ(e);
}
function aZ(e) {
return typeof e == "function" ? e : e == null ? O4 : typeof e == "object" ? Ao(e) ? tZ(e[0], e[1]) : YY(e) : oZ(e);
}
var hv = function() {
return ia.Date.now();
}, iZ = "Expected a function", sZ = Math.max, lZ = Math.min;
function z4(e, t, n) {
var r, o, a, i, s, u, l = 0, c = !1, d = !1, f = !0;
if (typeof e != "function")
throw new TypeError(iZ);
t = tw(t) || 0, vi(n) && (c = !!n.leading, d = "maxWait" in n, a = d ? sZ(tw(n.maxWait) || 0, t) : a, f = "trailing" in n ? !!n.trailing : f);
function h(k) {
var E = r, S = o;
return r = o = void 0, l = k, i = e.apply(S, E), i;
}
function p(k) {
return l = k, s = setTimeout(g, t), c ? h(k) : i;
}
function v(k) {
var E = k - u, S = k - l, O = t - E;
return d ? lZ(O, a - S) : O;
}
function m(k) {
var E = k - u, S = k - l;
return u === void 0 || E >= t || E < 0 || d && S >= a;
}
function g() {
var k = hv();
if (m(k))
return b(k);
s = setTimeout(g, v(k));
}
function b(k) {
return s = void 0, f && r ? h(k) : (r = o = void 0, i);
}
function x() {
s !== void 0 && clearTimeout(s), l = 0, r = u = o = s = void 0;
}
function w() {
return s === void 0 ? i : b(hv());
}
function C() {
var k = hv(), E = m(k);
if (r = arguments, o = this, u = k, E) {
if (s === void 0)
return p(u);
if (d)
return clearTimeout(s), s = setTimeout(g, t), h(u);
}
return s === void 0 && (s = setTimeout(g, t)), i;
}
return C.cancel = x, C.flush = w, C;
}
function uZ(e, t, n) {
var r = e == null ? 0 : e.length;
if (!r)
return -1;
var o = r - 1;
return hG(e, aZ(t), o);
}
function Kp(e) {
for (var t = -1, n = e == null ? 0 : e.length, r = {}; ++t < n; ) {
var o = e[t];
r[o[0]] = o[1];
}
return r;
}
function Gp(e, t) {
return oh(e, t);
}
function ii(e) {
return e == null;
}
function cZ(e) {
return e === void 0;
}
function dZ(e, t, n, r) {
if (!vi(e))
return e;
t = rh(t, e);
for (var o = -1, a = t.length, i = a - 1, s = e; s != null && ++o < a; ) {
var u = Hc(t[o]), l = n;
if (u === "__proto__" || u === "constructor" || u === "prototype")
return e;
if (o != i) {
var c = s[u];
l = void 0, l === void 0 && (l = vi(c) ? c : Nm(t[o + 1]) ? [] : {});
}
wG(s, u, l), s = s[u];
}
return e;
}
function pZ(e, t, n) {
for (var r = -1, o = t.length, a = {}; ++r < o; ) {
var i = t[r], s = zm(e, i);
n(s, i) && dZ(a, rh(i, e), s);
}
return a;
}
function fZ(e, t) {
return pZ(e, t, function(n, r) {
return M4(e, r);
});
}
var V4 = ZX(function(e, t) {
return e == null ? {} : fZ(e, t);
});
const ri = (e) => e === void 0, El = (e) => typeof e == "boolean", Xn = (e) => typeof e == "number", rs = (e) => typeof Element > "u" ? !1 : e instanceof Element, Xp = (e) => ii(e), hZ = (e) => ur(e) ? !Number.isNaN(Number(e)) : !1, vZ = (e = "") => e.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d"), kw = (e) => Object.keys(e);
class j4 extends Error {
constructor(t) {
super(t), this.name = "ElementPlusError";
}
}
function gZ(e, t) {
throw new j4(`[${e}] ${t}`);
}
function Tn(e, t) {
if (process.env.NODE_ENV !== "production") {
const n = ur(e) ? new j4(`[${e}] ${t}`) : e;
console.warn(n);
}
}
const mZ = "utils/dom/style", H4 = (e = "") => e.split(" ").filter((t) => !!t.trim()), S0 = (e, t) => {
!e || !t.trim() || e.classList.add(...H4(t));
}, os = (e, t) => {
!e || !t.trim() || e.classList.remove(...H4(t));
}, vu = (e, t) => {
var n;
if (!_n || !e || !t)
return "";
let r = xK(t);
r === "float" && (r = "cssFloat");
try {
const o = e.style[r];
if (o)
return o;
const a = (n = document.defaultView) == null ? void 0 : n.getComputedStyle(e, "");
return a ? a[r] : "";
} catch {
return e.style[r];
}
};
function Sl(e, t = "px") {
if (!e)
return "";
if (Xn(e) || hZ(e))
return `${e}${t}`;
if (ur(e))
return e;
Tn(mZ, "binding value must be a string or number");
}
function yZ(e, t) {
if (!_n)
return;
if (!t) {
e.scrollTop = 0;
return;
}
const n = [];
let r = t.offsetParent;
for (; r !== null && e !== r && e.contains(r); )
n.push(r), r = r.offsetParent;
const o = t.offsetTop + n.reduce((u, l) => u + l.offsetTop, 0), a = o + t.offsetHeight, i = e.scrollTop, s = i + e.clientHeight;
o < i ? e.scrollTop = o : a > s && (e.scrollTop = a - e.clientHeight);
}
/*! Element Plus Icons Vue v2.3.1 */
var bZ = /* @__PURE__ */ Z({
name: "Aim",
__name: "aim",
setup(e) {
return (t, n) => (T(), B("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 1024 1024"
}, [
Y("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"
}),
Y("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"
})
]));
}
}), wZ = bZ, xZ = /* @__PURE__ */ Z({
name: "ArrowDown",
__name: "arrow-down",
setup(e) {
return (t, n) => (T(), B("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 1024 1024"
}, [
Y("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"
})
]));
}
}), Vm = xZ, kZ = /* @__PURE__ */ Z({
name: "ArrowUp",
__name: "arrow-up",
setup(e) {
return (t, n) => (T(), B("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 1024 1024"
}, [
Y("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"
})
]));
}
}), CZ = kZ, EZ = /* @__PURE__ */ Z({
name: "CaretRight",
__name: "caret-right",
setup(e) {
return (t, n) => (T(), B("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 1024 1024"
}, [
Y("path", {
fill: "currentColor",
d: "M384 192v640l384-320.064z"
})
]));
}
}), SZ = EZ, _Z = /* @__PURE__ */ Z({
name: "CircleCheck",
__name: "circle-check",
setup(e) {
return (t, n) => (T(), B("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 1024 1024"
}, [
Y("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"
}),
Y("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"
})
]));
}
}), TZ = _Z, OZ = /* @__PURE__ */ Z({
name: "CircleClose",
__name: "circle-close",
setup(e) {
return (t, n) => (T(), B("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 1024 1024"
}, [
Y("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"
}),
Y("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"
})
]));
}
}), jm = OZ, PZ = /* @__PURE__ */ Z({
name: "Close",
__name: "close",
setup(e) {
return (t, n) => (T(), B("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 1024 1024"
}, [
Y("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"
})
]));
}
}), Yp = PZ, $Z = /* @__PURE__ */ Z({
name: "CopyDocument",
__name: "copy-document",
setup(e) {
return (t, n) => (T(), B("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 1024 1024"
}, [
Y("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"
}),
Y("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"
})
]));
}
}), AZ = $Z, FZ = /* @__PURE__ */ Z({
name: "Delete",
__name: "delete",
setup(e) {
return (t, n) => (T(), B("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 1024 1024"
}, [
Y("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"
})
]));
}
}), IZ = FZ, NZ = /* @__PURE__ */ Z({
name: "Edit",
__name: "edit",
setup(e) {
return (t, n) => (T(), B("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 1024 1024"
}, [
Y("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"
}),
Y("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"
})
]));
}
}), LZ = NZ, DZ = /* @__PURE__ */ Z({
name: "Finished",
__name: "finished",
setup(e) {
return (t, n) => (T(), B("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 1024 1024"
}, [
Y("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"
})
]));
}
}), RZ = DZ, BZ = /* @__PURE__ */ Z({
name: "Hide",
__name: "hide",
setup(e) {
return (t, n) => (T(), B("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 1024 1024"
}, [
Y("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"
}),
Y("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"
})
]));
}
}), MZ = BZ, zZ = /* @__PURE__ */ Z({
name: "Loading",
__name: "loading",
setup(e) {
return (t, n) => (T(), B("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 1024 1024"
}, [
Y("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"
})
]));
}
}), Hm = zZ, VZ = /* @__PURE__ */ Z({
name: "Lock",
__name: "lock",
setup(e) {
return (t, n) => (T(), B("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 1024 1024"
}, [
Y("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"
}),
Y("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"
})
]));
}
}), jZ = VZ, HZ = /* @__PURE__ */ Z({
name: "Unlock",
__name: "unlock",
setup(e) {
return (t, n) => (T(), B("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 1024 1024"
}, [
Y("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"
}),
Y("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"
})
]));
}
}), UZ = HZ, qZ = /* @__PURE__ */ Z({
name: "View",
__name: "view",
setup(e) {
return (t, n) => (T(), B("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 1024 1024"
}, [
Y("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"
})
]));
}
}), WZ = qZ, KZ = /* @__PURE__ */ Z({
name: "ZoomIn",
__name: "zoom-in",
setup(e) {
return (t, n) => (T(), B("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 1024 1024"
}, [
Y("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"
})
]));
}
}), GZ = KZ, XZ = /* @__PURE__ */ Z({
name: "ZoomOut",
__name: "zoom-out",
setup(e) {
return (t, n) => (T(), B("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 1024 1024"
}, [
Y("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"
})
]));
}
}), YZ = XZ;
const U4 = "__epPropKey", ut = (e) => e, ZZ = (e) => Gn(e) && !!e[U4], ah = (e, t) => {
if (!Gn(e) || ZZ(e))
return e;
const { values: n, required: r, default: o, type: a, validator: i } = e, s = {
type: a,
required: !!r,
validator: n || i ? (u) => {
let l = !1, c = [];
if (n && (c = Array.from(n), fs(e, "default") && c.push(o), l || (l = c.includes(u))), i && (l || (l = i(u))), !l && c.length > 0) {
const d = [...new Set(c)].map((f) => JSON.stringify(f)).join(", ");
tg(`Invalid prop: validation failed${t ? ` for prop "${t}"` : ""}. Expected one of [${d}], got value ${JSON.stringify(u)}.`);
}
return l;
} : void 0,
[U4]: !0
};
return fs(e, "default") && (s.default = o), s;
}, zt = (e) => Kp(Object.entries(e).map(([t, n]) => [
t,
ah(n, t)
])), gi = ut([
String,
Object,
Function
]), q4 = {
validating: Hm,
success: TZ,
error: jm
}, jn = (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;
}, JZ = (e, t) => (e.install = (n) => {
n.directive(t, e);
}, e), Na = (e) => (e.install = ic, e), In = {
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"
}, Kn = "update:modelValue", Um = "change", W4 = ["", "default", "small", "large"], QZ = (e) => /([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(e), Js = (e) => e, eJ = ["class", "style"], tJ = /^on[A-Z]/, nJ = (e = {}) => {
const { excludeListeners: t = !1, excludeKeys: n } = e, r = _(() => ((n == null ? void 0 : n.value) || []).concat(eJ)), o = dt();
return o ? _(() => {
var a;
return Kp(Object.entries((a = o.proxy) == null ? void 0 : a.$attrs).filter(([i]) => !r.value.includes(i) && !(t && tJ.test(i))));
}) : (Tn("use-attrs", "getCurrentInstance() returned null. useAttrs() must be called at the top of a setup function"), _(() => ({})));
}, up = ({ from: e, replacement: t, scope: n, version: r, ref: o, type: a = "API" }, i) => {
me(() => y(i), (s) => {
s && Tn(n, `[${a}] ${e} is about to be deprecated in version ${r}, please use ${t} instead.
For more detail, please visit: ${o}
`);
}, {
immediate: !0
});
};
var rJ = {
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 oJ = (e) => (t, n) => aJ(t, n, y(e)), aJ = (e, t, n) => ya(n, e, e).replace(/\{(\w+)\}/g, (r, o) => {
var a;
return `${(a = t == null ? void 0 : t[o]) != null ? a : `{${o}}`}`;
}), iJ = (e) => {
const t = _(() => y(e).name), n = Vn(e) ? e : H(e);
return {
lang: t,
locale: n,
t: oJ(e)
};
}, K4 = Symbol("localeContextKey"), Uc = (e) => {
const t = e || $e(K4, H());
return iJ(_(() => t.value || rJ));
}, cp = "el", sJ = "is-", Ri = (e, t, n, r, o) => {
let a = `${e}-${t}`;
return n && (a += `-${n}`), r && (a += `__${r}`), o && (a += `--${o}`), a;
}, G4 = Symbol("namespaceContextKey"), qm = (e) => {
const t = e || (dt() ? $e(G4, H(cp)) : H(cp));
return _(() => y(t) || cp);
}, wt = (e, t) => {
const n = qm(t);
return {
namespace: n,
b: (r = "") => Ri(n.value, e, r, "", ""),
e: (r) => r ? Ri(n.value, e, "", r, "") : "",
m: (r) => r ? Ri(n.value, e, "", "", r) : "",
be: (r, o) => r && o ? Ri(n.value, e, r, o, "") : "",
em: (r, o) => r && o ? Ri(n.value, e, "", r, o) : "",
bm: (r, o) => r && o ? Ri(n.value, e, r, "", o) : "",
bem: (r, o, a) => r && o && a ? Ri(n.value, e, r, o, a) : "",
is: (r, ...o) => {
const a = o.length >= 1 ? o[0] : !0;
return r && a ? `${sJ}${r}` : "";
},
cssVar: (r) => {
const o = {};
for (const a in r)
r[a] && (o[`--${n.value}-${a}`] = r[a]);
return o;
},
cssVarName: (r) => `--${n.value}-${r}`,
cssVarBlock: (r) => {
const o = {};
for (const a in r)
r[a] && (o[`--${n.value}-${e}-${a}`] = r[a]);
return o;
},
cssVarBlockName: (r) => `--${n.value}-${e}-${r}`
};
}, lJ = ah({
type: ut(Boolean),
default: null
}), uJ = ah({
type: ut(Function)
}), cJ = (e) => {
const t = `update:${e}`, n = `onUpdate:${e}`, r = [t], o = {
[e]: lJ,
[n]: uJ
};
return {
useModelToggle: ({
indicator: a,
toggleReason: i,
shouldHideWhenRouteChanges: s,
shouldProceed: u,
onShow: l,
onHide: c
}) => {
const d = dt(), { emit: f } = d, h = d.props, p = _(() => wr(h[n])), v = _(() => h[e] === null), m = (k) => {
a.value !== !0 && (a.value = !0, i && (i.value = k), wr(l) && l(k));
}, g = (k) => {
a.value !== !1 && (a.value = !1, i && (i.value = k), wr(c) && c(k));
}, b = (k) => {
if (h.disabled === !0 || wr(u) && !u())
return;
const E = p.value && _n;
E && f(t, !0), (v.value || !E) && m(k);
}, x = (k) => {
if (h.disabled === !0 || !_n)
return;
const E = p.value && _n;
E && f(t, !1), (v.value || !E) && g(k);
}, w = (k) => {
El(k) && (h.disabled && k ? p.value && f(t, !1) : a.value !== k && (k ? m() : g()));
}, C = () => {
a.value ? x() : b();
};
return me(() => h[e], w), s && d.appContext.config.globalProperties.$route !== void 0 && me(() => ({
...d.proxy.$route
}), () => {
s.value && a.value && x();
}), ht(() => {
w(h[e]);
}), {
hide: x,
show: b,
toggle: C,
hasUpdateHandler: p
};
},
useModelToggleProps: o,
useModelToggleEmits: r
};
}, X4 = (e) => {
const t = dt();
return _(() => {
var n, r;
return (r = (n = t == null ? void 0 : t.proxy) == null ? void 0 : n.$props) == null ? void 0 : r[e];
});
};
var Dr = "top", po = "bottom", fo = "right", Rr = "left", Wm = "auto", qc = [Dr, po, fo, Rr], _l = "start", uc = "end", dJ = "clippingParents", Y4 = "viewport", gu = "popper", pJ = "reference", Cw = qc.reduce(function(e, t) {
return e.concat([t + "-" + _l, t + "-" + uc]);
}, []), ih = [].concat(qc, [Wm]).reduce(function(e, t) {
return e.concat([t, t + "-" + _l, t + "-" + uc]);
}, []), fJ = "beforeRead", hJ = "read", vJ = "afterRead", gJ = "beforeMain", mJ = "main", yJ = "afterMain", bJ = "beforeWrite", wJ = "write", xJ = "afterWrite", kJ = [fJ, hJ, vJ, gJ, mJ, yJ, bJ, wJ, xJ];
function oa(e) {
return e ? (e.nodeName || "").toLowerCase() : null;
}
function Mo(e) {
if (e == null) return window;
if (e.toString() !== "[object Window]") {
var t = e.ownerDocument;
return t && t.defaultView || window;
}
return e;
}
function Tl(e) {
var t = Mo(e).Element;
return e instanceof t || e instanceof Element;
}
function ro(e) {
var t = Mo(e).HTMLElement;
return e instanceof t || e instanceof HTMLElement;
}
function Km(e) {
if (typeof ShadowRoot > "u") return !1;
var t = Mo(e).ShadowRoot;
return e instanceof t || e instanceof ShadowRoot;
}
function CJ(e) {
var t = e.state;
Object.keys(t.elements).forEach(function(n) {
var r = t.styles[n] || {}, o = t.attributes[n] || {}, a = t.elements[n];
!ro(a) || !oa(a) || (Object.assign(a.style, r), Object.keys(o).forEach(function(i) {
var s = o[i];
s === !1 ? a.removeAttribute(i) : a.setAttribute(i, s === !0 ? "" : s);
}));
});
}
function EJ(e) {
var t = e.state, n = { popper: { position: t.options.strategy, left: "0", top: "0", margin: "0" }, arrow: { position: "absolute" }, reference: {} };
return Object.assign(t.elements.popper.style, n.popper), t.styles = n, t.elements.arrow && Object.assign(t.elements.arrow.style, n.arrow), function() {
Object.keys(t.elements).forEach(function(r) {
var o = t.elements[r], a = t.attributes[r] || {}, i = Object.keys(t.styles.hasOwnProperty(r) ? t.styles[r] : n[r]), s = i.reduce(function(u, l) {
return u[l] = "", u;
}, {});
!ro(o) || !oa(o) || (Object.assign(o.style, s), Object.keys(a).forEach(function(u) {
o.removeAttribute(u);
}));
});
};
}
var Z4 = { name: "applyStyles", enabled: !0, phase: "write", fn: CJ, effect: EJ, requires: ["computeStyles"] };
function Qo(e) {
return e.split("-")[0];
}
var as = Math.max, Zp = Math.min, Ol = Math.round;
function Pl(e, t) {
t === void 0 && (t = !1);
var n = e.getBoundingClientRect(), r = 1, o = 1;
if (ro(e) && t) {
var a = e.offsetHeight, i = e.offsetWidth;
i > 0 && (r = Ol(n.width) / i || 1), a > 0 && (o = Ol(n.height) / a || 1);
}
return { width: n.width / r, height: n.height / o, top: n.top / o, right: n.right / r, bottom: n.bottom / o, left: n.left / r, x: n.left / r, y: n.top / o };
}
function Gm(e) {
var t = Pl(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 J4(e, t) {
var n = t.getRootNode && t.getRootNode();
if (e.contains(t)) return !0;
if (n && Km(n)) {
var r = t;
do {
if (r && e.isSameNode(r)) return !0;
r = r.parentNode || r.host;
} while (r);
}
return !1;
}
function Sa(e) {
return Mo(e).getComputedStyle(e);
}
function SJ(e) {
return ["table", "td", "th"].indexOf(oa(e)) >= 0;
}
function Oi(e) {
return ((Tl(e) ? e.ownerDocument : e.document) || window.document).documentElement;
}
function sh(e) {
return oa(e) === "html" ? e : e.assignedSlot || e.parentNode || (Km(e) ? e.host : null) || Oi(e);
}
function Ew(e) {
return !ro(e) || Sa(e).position === "fixed" ? null : e.offsetParent;
}
function _J(e) {
var t = navigator.userAgent.toLowerCase().indexOf("firefox") !== -1, n = navigator.userAgent.indexOf("Trident") !== -1;
if (n && ro(e)) {
var r = Sa(e);
if (r.position === "fixed") return null;
}
var o = sh(e);
for (Km(o) && (o = o.host); ro(o) && ["html", "body"].indexOf(oa(o)) < 0; ) {
var a = Sa(o);
if (a.transform !== "none" || a.perspective !== "none" || a.contain === "paint" || ["transform", "perspective"].indexOf(a.willChange) !== -1 || t && a.willChange === "filter" || t && a.filter && a.filter !== "none") return o;
o = o.parentNode;
}
return null;
}
function Wc(e) {
for (var t = Mo(e), n = Ew(e); n && SJ(n) && Sa(n).position === "static"; ) n = Ew(n);
return n && (oa(n) === "html" || oa(n) === "body" && Sa(n).position === "static") ? t : n || _J(e) || t;
}
function Xm(e) {
return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y";
}
function Mu(e, t, n) {
return as(e, Zp(t, n));
}
function TJ(e, t, n) {
var r = Mu(e, t, n);
return r > n ? n : r;
}
function Q4() {
return { top: 0, right: 0, bottom: 0, left: 0 };
}
function eE(e) {
return Object.assign({}, Q4(), e);
}
function tE(e, t) {
return t.reduce(function(n, r) {
return n[r] = e, n;
}, {});
}
var OJ = function(e, t) {
return e = typeof e == "function" ? e(Object.assign({}, t.rects, { placement: t.placement })) : e, eE(typeof e != "number" ? e : tE(e, qc));
};
function PJ(e) {
var t, n = e.state, r = e.name, o = e.options, a = n.elements.arrow, i = n.modifiersData.popperOffsets, s = Qo(n.placement), u = Xm(s), l = [Rr, fo].indexOf(s) >= 0, c = l ? "height" : "width";
if (!(!a || !i)) {
var d = OJ(o.padding, n), f = Gm(a), h = u === "y" ? Dr : Rr, p = u === "y" ? po : fo, v = n.rects.reference[c] + n.rects.reference[u] - i[u] - n.rects.popper[c], m = i[u] - n.rects.reference[u], g = Wc(a), b = g ? u === "y" ? g.clientHeight || 0 : g.clientWidth || 0 : 0, x = v / 2 - m / 2, w = d[h], C = b - f[c] - d[p], k = b / 2 - f[c] / 2 + x, E = Mu(w, k, C), S = u;
n.modifiersData[r] = (t = {}, t[S] = E, t.centerOffset = E - k, t);
}
}
function $J(e) {
var t = e.state, n = e.options, r = n.element, o = r === void 0 ? "[data-popper-arrow]" : r;
o != null && (typeof o == "string" && (o = t.elements.popper.querySelector(o), !o) || !J4(t.elements.popper, o) || (t.elements.arrow = o));
}
var AJ = { name: "arrow", enabled: !0, phase: "main", fn: PJ, effect: $J, requires: ["popperOffsets"], requiresIfExists: ["preventOverflow"] };
function $l(e) {
return e.split("-")[1];
}
var FJ = { top: "auto", right: "auto", bottom: "auto", left: "auto" };
function IJ(e) {
var t = e.x, n = e.y, r = window, o = r.devicePixelRatio || 1;
return { x: Ol(t * o) / o || 0, y: Ol(n * o) / o || 0 };
}
function Sw(e) {
var t, n = e.popper, r = e.popperRect, o = e.placement, a = e.variation, i = e.offsets, s = e.position, u = e.gpuAcceleration, l = 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"), b = i.hasOwnProperty("y"), x = Rr, w = Dr, C = window;
if (l) {
var k = Wc(n), E = "clientHeight", S = "clientWidth";
if (k === Mo(n) && (k = Oi(n), Sa(k).position !== "static" && s === "absolute" && (E = "scrollHeight", S = "scrollWidth")), k = k, o === Dr || (o === Rr || o === fo) && a === uc) {
w = po;
var O = d && k === C && C.visualViewport ? C.visualViewport.height : k[E];
v -= O - r.height, v *= u ? 1 : -1;
}
if (o === Rr || (o === Dr || o === po) && a === uc) {
x = fo;
var F = d && k === C && C.visualViewport ? C.visualViewport.width : k[S];
h -= F - r.width, h *= u ? 1 : -1;
}
}
var $ = Object.assign({ position: s }, l && FJ), A = c === !0 ? IJ({ x: h, y: v }) : { x: h, y: v };
if (h = A.x, v = A.y, u) {
var L;
return Object.assign({}, $, (L = {}, L[w] = b ? "0" : "", L[x] = g ? "0" : "", L.transform = (C.devicePixelRatio || 1) <= 1 ? "translate(" + h + "px, " + v + "px)" : "translate3d(" + h + "px, " + v + "px, 0)", L));
}
return Object.assign({}, $, (t = {}, t[w] = b ? v + "px" : "", t[x] = g ? h + "px" : "", t.transform = "", t));
}
function NJ(e) {
var t = e.state, n = e.options, r = n.gpuAcceleration, o = r === void 0 ? !0 : r, a = n.adaptive, i = a === void 0 ? !0 : a, s = n.roundOffsets, u = s === void 0 ? !0 : s, l = { placement: Qo(t.placement), variation: $l(t.placement), popper: t.elements.popper, popperRect: t.rects.popper, gpuAcceleration: o, isFixed: t.options.strategy === "fixed" };
t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper, Sw(Object.assign({}, l, { offsets: t.modifiersData.popperOffsets, position: t.options.strategy, adaptive: i, roundOffsets: u })))), t.modifiersData.arrow != null && (t.styles.arrow = Object.assign({}, t.styles.arrow, Sw(Object.assign({}, l, { offsets: t.modifiersData.arrow, position: "absolute", adaptive: !1, roundOffsets: u })))), t.attributes.popper = Object.assign({}, t.attributes.popper, { "data-popper-placement": t.placement });
}
var nE = { name: "computeStyles", enabled: !0, phase: "beforeWrite", fn: NJ, data: {} }, $d = { passive: !0 };
function LJ(e) {
var t = e.state, n = e.instance, r = e.options, o = r.scroll, a = o === void 0 ? !0 : o, i = r.resize, s = i === void 0 ? !0 : i, u = Mo(t.elements.popper), l = [].concat(t.scrollParents.reference, t.scrollParents.popper);
return a && l.forEach(function(c) {
c.addEventListener("scroll", n.update, $d);
}), s && u.addEventListener("resize", n.update, $d), function() {
a && l.forEach(function(c) {
c.removeEventListener("scroll", n.update, $d);
}), s && u.removeEventListener("resize", n.update, $d);
};
}
var rE = { name: "eventListeners", enabled: !0, phase: "write", fn: function() {
}, effect: LJ, data: {} }, DJ = { left: "right", right: "left", bottom: "top", top: "bottom" };
function dp(e) {
return e.replace(/left|right|bottom|top/g, function(t) {
return DJ[t];
});
}
var RJ = { start: "end", end: "start" };
function _w(e) {
return e.replace(/start|end/g, function(t) {
return RJ[t];
});
}
function Ym(e) {
var t = Mo(e), n = t.pageXOffset, r = t.pageYOffset;
return { scrollLeft: n, scrollTop: r };
}
function Zm(e) {
return Pl(Oi(e)).left + Ym(e).scrollLeft;
}
function BJ(e) {
var t = Mo(e), n = Oi(e), r = t.visualViewport, o = n.clientWidth, a = n.clientHeight, i = 0, s = 0;
return r && (o = r.width, a = r.height, /^((?!chrome|android).)*safari/i.test(navigator.userAgent) || (i = r.offsetLeft, s = r.offsetTop)), { width: o, height: a, x: i + Zm(e), y: s };
}
function MJ(e) {
var t, n = Oi(e), r = Ym(e), o = (t = e.ownerDocument) == null ? void 0 : t.body, a = as(n.scrollWidth, n.clientWidth, o ? o.scrollWidth : 0, o ? o.clientWidth : 0), i = as(n.scrollHeight, n.clientHeight, o ? o.scrollHeight : 0, o ? o.clientHeight : 0), s = -r.scrollLeft + Zm(e), u = -r.scrollTop;
return Sa(o || n).direction === "rtl" && (s += as(n.clientWidth, o ? o.clientWidth : 0) - a), { width: a, height: i, x: s, y: u };
}
function Jm(e) {
var t = Sa(e), n = t.overflow, r = t.overflowX, o = t.overflowY;
return /auto|scroll|overlay|hidden/.test(n + o + r);
}
function oE(e) {
return ["html", "body", "#document"].indexOf(oa(e)) >= 0 ? e.ownerDocument.body : ro(e) && Jm(e) ? e : oE(sh(e));
}
function zu(e, t) {
var n;
t === void 0 && (t = []);
var r = oE(e), o = r === ((n = e.ownerDocument) == null ? void 0 : n.body), a = Mo(r), i = o ? [a].concat(a.visualViewport || [], Jm(r) ? r : []) : r, s = t.concat(i);
return o ? s : s.concat(zu(sh(i)));
}
function _0(e) {
return Object.assign({}, e, { left: e.x, top: e.y, right: e.x + e.width, bottom: e.y + e.height });
}
function zJ(e) {
var t = Pl(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 Tw(e, t) {
return t === Y4 ? _0(BJ(e)) : Tl(t) ? zJ(t) : _0(MJ(Oi(e)));
}
function VJ(e) {
var t = zu(sh(e)), n = ["absolute", "fixed"].indexOf(Sa(e).position) >= 0, r = n && ro(e) ? Wc(e) : e;
return Tl(r) ? t.filter(function(o) {
return Tl(o) && J4(o, r) && oa(o) !== "body";
}) : [];
}
function jJ(e, t, n) {
var r = t === "clippingParents" ? VJ(e) : [].concat(t), o = [].concat(r, [n]), a = o[0], i = o.reduce(function(s, u) {
var l = Tw(e, u);
return s.top = as(l.top, s.top), s.right = Zp(l.right, s.right), s.bottom = Zp(l.bottom, s.bottom), s.left = as(l.left, s.left), s;
}, Tw(e, a));
return i.width = i.right - i.left, i.height = i.bottom - i.top, i.x = i.left, i.y = i.top, i;
}
function aE(e) {
var t = e.reference, n = e.element, r = e.placement, o = r ? Qo(r) : null, a = r ? $l(r) : null, i = t.x + t.width / 2 - n.width / 2, s = t.y + t.height / 2 - n.height / 2, u;
switch (o) {
case Dr:
u = { x: i, y: t.y - n.height };
break;
case po:
u = { x: i, y: t.y + t.height };
break;
case fo:
u = { x: t.x + t.width, y: s };
break;
case Rr:
u = { x: t.x - n.width, y: s };
break;
default:
u = { x: t.x, y: t.y };
}
var l = o ? Xm(o) : null;
if (l != null) {
var c = l === "y" ? "height" : "width";
switch (a) {
case _l:
u[l] = u[l] - (t[c] / 2 - n[c] / 2);
break;
case uc:
u[l] = u[l] + (t[c] / 2 - n[c] / 2);
break;
}
}
return u;
}
function cc(e, t) {
t === void 0 && (t = {});
var n = t, r = n.placement, o = r === void 0 ? e.placement : r, a = n.boundary, i = a === void 0 ? dJ : a, s = n.rootBoundary, u = s === void 0 ? Y4 : s, l = n.elementContext, c = l === void 0 ? gu : l, d = n.altBoundary, f = d === void 0 ? !1 : d, h = n.padding, p = h === void 0 ? 0 : h, v = eE(typeof p != "number" ? p : tE(p, qc)), m = c === gu ? pJ : gu, g = e.rects.popper, b = e.elements[f ? m : c], x = jJ(Tl(b) ? b : b.contextElement || Oi(e.elements.popper), i, u), w = Pl(e.elements.reference), C = aE({ reference: w, element: g, strategy: "absolute", placement: o }), k = _0(Object.assign({}, g, C)), E = c === gu ? k : w, S = { top: x.top - E.top + v.top, bottom: E.bottom - x.bottom + v.bottom, left: x.left - E.left + v.left, right: E.right - x.right + v.right }, O = e.modifiersData.offset;
if (c === gu && O) {
var F = O[o];
Object.keys(S).forEach(function($) {
var A = [fo, po].indexOf($) >= 0 ? 1 : -1, L = [Dr, po].indexOf($) >= 0 ? "y" : "x";
S[$] += F[L] * A;
});
}
return S;
}
function HJ(e, t) {
t === void 0 && (t = {});
var n = t, r = n.placement, o = n.boundary, a = n.rootBoundary, i = n.padding, s = n.flipVariations, u = n.allowedAutoPlacements, l = u === void 0 ? ih : u, c = $l(r), d = c ? s ? Cw : Cw.filter(function(p) {
return $l(p) === c;
}) : qc, f = d.filter(function(p) {
return l.indexOf(p) >= 0;
});
f.length === 0 && (f = d);
var h = f.reduce(function(p, v) {
return p[v] = cc(e, { placement: v, boundary: o, rootBoundary: a, padding: i })[Qo(v)], p;
}, {});
return Object.keys(h).sort(function(p, v) {
return h[p] - h[v];
});
}
function UJ(e) {
if (Qo(e) === Wm) return [];
var t = dp(e);
return [_w(e), t, _w(t)];
}
function qJ(e) {
var t = e.state, n = e.options, r = e.name;
if (!t.modifiersData[r]._skip) {
for (var o = n.mainAxis, a = o === void 0 ? !0 : o, i = n.altAxis, s = i === void 0 ? !0 : i, u = n.fallbackPlacements, l = 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 = Qo(m), b = g === m, x = u || (b || !p ? [dp(m)] : UJ(m)), w = [m].concat(x).reduce(function(we, ke) {
return we.concat(Qo(ke) === Wm ? HJ(t, { placement: ke, boundary: c, rootBoundary: d, padding: l, flipVariations: p, allowedAutoPlacements: v }) : ke);
}, []), C = t.rects.reference, k = t.rects.popper, E = /* @__PURE__ */ new Map(), S = !0, O = w[0], F = 0; F < w.length; F++) {
var $ = w[F], A = Qo($), L = $l($) === _l, N = [Dr, po].indexOf(A) >= 0, M = N ? "width" : "height", I = cc(t, { placement: $, boundary: c, rootBoundary: d, altBoundary: f, padding: l }), z = N ? L ? fo : Rr : L ? po : Dr;
C[M] > k[M] && (z = dp(z));
var R = dp(z), q = [];
if (a && q.push(I[A] <= 0), s && q.push(I[z] <= 0, I[R] <= 0), q.every(function(we) {
return we;
})) {
O = $, S = !1;
break;
}
E.set($, q);
}
if (S) for (var oe = p ? 3 : 1, Q = function(we) {
var ke = w.find(function(fe) {
var ge = E.get(fe);
if (ge) return ge.slice(0, we).every(function(J) {
return J;
});
});
if (ke) return O = ke, "break";
}, ae = oe; ae > 0; ae--) {
var pe = Q(ae);
if (pe === "break") break;
}
t.placement !== O && (t.modifiersData[r]._skip = !0, t.placement = O, t.reset = !0);
}
}
var WJ = { name: "flip", enabled: !0, phase: "main", fn: qJ, requiresIfExists: ["offset"], data: { _skip: !1 } };
function Ow(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 Pw(e) {
return [Dr, fo, po, Rr].some(function(t) {
return e[t] >= 0;
});
}
function KJ(e) {
var t = e.state, n = e.name, r = t.rects.reference, o = t.rects.popper, a = t.modifiersData.preventOverflow, i = cc(t, { elementContext: "reference" }), s = cc(t, { altBoundary: !0 }), u = Ow(i, r), l = Ow(s, o, a), c = Pw(u), d = Pw(l);
t.modifiersData[n] = { referenceClippingOffsets: u, popperEscapeOffsets: l, isReferenceHidden: c, hasPopperEscaped: d }, t.attributes.popper = Object.assign({}, t.attributes.popper, { "data-popper-reference-hidden": c, "data-popper-escaped": d });
}
var GJ = { name: "hide", enabled: !0, phase: "main", requiresIfExists: ["preventOverflow"], fn: KJ };
function XJ(e, t, n) {
var r = Qo(e), o = [Rr, Dr].indexOf(r) >= 0 ? -1 : 1, a = typeof n == "function" ? n(Object.assign({}, t, { placement: e })) : n, i = a[0], s = a[1];
return i = i || 0, s = (s || 0) * o, [Rr, fo].indexOf(r) >= 0 ? { x: s, y: i } : { x: i, y: s };
}
function YJ(e) {
var t = e.state, n = e.options, r = e.name, o = n.offset, a = o === void 0 ? [0, 0] : o, i = ih.reduce(function(c, d) {
return c[d] = XJ(d, t.rects, a), c;
}, {}), s = i[t.placement], u = s.x, l = s.y;
t.modifiersData.popperOffsets != null && (t.modifiersData.popperOffsets.x += u, t.modifiersData.popperOffsets.y += l), t.modifiersData[r] = i;
}
var ZJ = { name: "offset", enabled: !0, phase: "main", requires: ["popperOffsets"], fn: YJ };
function JJ(e) {
var t = e.state, n = e.name;
t.modifiersData[n] = aE({ reference: t.rects.reference, element: t.rects.popper, strategy: "absolute", placement: t.placement });
}
var iE = { name: "popperOffsets", enabled: !0, phase: "read", fn: JJ, data: {} };
function QJ(e) {
return e === "x" ? "y" : "x";
}
function eQ(e) {
var t = e.state, n = e.options, r = e.name, o = n.mainAxis, a = o === void 0 ? !0 : o, i = n.altAxis, s = i === void 0 ? !1 : i, u = n.boundary, l = 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 = cc(t, { boundary: u, rootBoundary: l, padding: d, altBoundary: c }), g = Qo(t.placement), b = $l(t.placement), x = !b, w = Xm(g), C = QJ(w), k = t.modifiersData.popperOffsets, E = t.rects.reference, S = t.rects.popper, O = typeof v == "function" ? v(Object.assign({}, t.rects, { placement: t.placement })) : v, F = typeof O == "number" ? { mainAxis: O, altAxis: O } : Object.assign({ mainAxis: 0, altAxis: 0 }, O), $ = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, A = { x: 0, y: 0 };
if (k) {
if (a) {
var L, N = w === "y" ? Dr : Rr, M = w === "y" ? po : fo, I = w === "y" ? "height" : "width", z = k[w], R = z + m[N], q = z - m[M], oe = h ? -S[I] / 2 : 0, Q = b === _l ? E[I] : S[I], ae = b === _l ? -S[I] : -E[I], pe = t.elements.arrow, we = h && pe ? Gm(pe) : { width: 0, height: 0 }, ke = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : Q4(), fe = ke[N], ge = ke[M], J = Mu(0, E[I], we[I]), te = x ? E[I] / 2 - oe - J - fe - F.mainAxis : Q - J - fe - F.mainAxis, le = x ? -E[I] / 2 + oe + J + ge + F.mainAxis : ae + J + ge + F.mainAxis, Ee = t.elements.arrow && Wc(t.elements.arrow), Ne = Ee ? w === "y" ? Ee.clientTop || 0 : Ee.clientLeft || 0 : 0, je = (L = $ == null ? void 0 : $[w]) != null ? L : 0, _e = z + te - je - Ne, De = z + le - je, Ae = Mu(h ? Zp(R, _e) : R, z, h ? as(q, De) : q);
k[w] = Ae, A[w] = Ae - z;
}
if (s) {
var Be, Ue = w === "x" ? Dr : Rr, Ze = w === "x" ? po : fo, Me = k[C], rt = C === "y" ? "height" : "width", nt = Me + m[Ue], st = Me - m[Ze], P = [Dr, Rr].indexOf(g) !== -1, j = (Be = $ == null ? void 0 : $[C]) != null ? Be : 0, se = P ? nt : Me - E[rt] - S[rt] - j + F.altAxis, ce = P ? Me + E[rt] + S[rt] - j - F.altAxis : st, de = h && P ? TJ(se, Me, ce) : Mu(h ? se : nt, Me, h ? ce : st);
k[C] = de, A[C] = de - Me;
}
t.modifiersData[r] = A;
}
}
var tQ = { name: "preventOverflow", enabled: !0, phase: "main", fn: eQ, requiresIfExists: ["offset"] };
function nQ(e) {
return { scrollLeft: e.scrollLeft, scrollTop: e.scrollTop };
}
function rQ(e) {
return e === Mo(e) || !ro(e) ? Ym(e) : nQ(e);
}
function oQ(e) {
var t = e.getBoundingClientRect(), n = Ol(t.width) / e.offsetWidth || 1, r = Ol(t.height) / e.offsetHeight || 1;
return n !== 1 || r !== 1;
}
function aQ(e, t, n) {
n === void 0 && (n = !1);
var r = ro(t), o = ro(t) && oQ(t), a = Oi(t), i = Pl(e, o), s = { scrollLeft: 0, scrollTop: 0 }, u = { x: 0, y: 0 };
return (r || !r && !n) && ((oa(t) !== "body" || Jm(a)) && (s = rQ(t)), ro(t) ? (u = Pl(t, !0), u.x += t.clientLeft, u.y += t.clientTop) : a && (u.x = Zm(a))), { x: i.left + s.scrollLeft - u.x, y: i.top + s.scrollTop - u.y, width: i.width, height: i.height };
}
function iQ(e) {
var t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set(), r = [];
e.forEach(function(a) {
t.set(a.name, a);
});
function o(a) {
n.add(a.name);
var i = [].concat(a.requires || [], a.requiresIfExists || []);
i.forEach(function(s) {
if (!n.has(s)) {
var u = t.get(s);
u && o(u);
}
}), r.push(a);
}
return e.forEach(function(a) {
n.has(a.name) || o(a);
}), r;
}
function sQ(e) {
var t = iQ(e);
return kJ.reduce(function(n, r) {
return n.concat(t.filter(function(o) {
return o.phase === r;
}));
}, []);
}
function lQ(e) {
var t;
return function() {
return t || (t = new Promise(function(n) {
Promise.resolve().then(function() {
t = void 0, n(e());
});
})), t;
};
}
function uQ(e) {
var t = e.reduce(function(n, r) {
var o = n[r.name];
return n[r.name] = o ? Object.assign({}, o, r, { options: Object.assign({}, o.options, r.options), data: Object.assign({}, o.data, r.data) }) : r, n;
}, {});
return Object.keys(t).map(function(n) {
return t[n];
});
}
var $w = { placement: "bottom", modifiers: [], strategy: "absolute" };
function Aw() {
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 Qm(e) {
e === void 0 && (e = {});
var t = e, n = t.defaultModifiers, r = n === void 0 ? [] : n, o = t.defaultOptions, a = o === void 0 ? $w : o;
return function(i, s, u) {
u === void 0 && (u = a);
var l = { placement: "bottom", orderedModifiers: [], options: Object.assign({}, $w, a), modifiersData: {}, elements: { reference: i, popper: s }, attributes: {}, styles: {} }, c = [], d = !1, f = { state: l, setOptions: function(v) {
var m = typeof v == "function" ? v(l.options) : v;
p(), l.options = Object.assign({}, a, l.options, m), l.scrollParents = { reference: Tl(i) ? zu(i) : i.contextElement ? zu(i.contextElement) : [], popper: zu(s) };
var g = sQ(uQ([].concat(r, l.options.modifiers)));
return l.orderedModifiers = g.filter(function(b) {
return b.enabled;
}), h(), f.update();
}, forceUpdate: function() {
if (!d) {
var v = l.elements, m = v.reference, g = v.popper;
if (Aw(m, g)) {
l.rects = { reference: aQ(m, Wc(g), l.options.strategy === "fixed"), popper: Gm(g) }, l.reset = !1, l.placement = l.options.placement, l.orderedModifiers.forEach(function(S) {
return l.modifiersData[S.name] = Object.assign({}, S.data);
});
for (var b = 0; b < l.orderedModifiers.length; b++) {
if (l.reset === !0) {
l.reset = !1, b = -1;
continue;
}
var x = l.orderedModifiers[b], w = x.fn, C = x.options, k = C === void 0 ? {} : C, E = x.name;
typeof w == "function" && (l = w({ state: l, options: k, name: E, instance: f }) || l);
}
}
}
}, update: lQ(function() {
return new Promise(function(v) {
f.forceUpdate(), v(l);
});
}), destroy: function() {
p(), d = !0;
} };
if (!Aw(i, s)) return f;
f.setOptions(u).then(function(v) {
!d && u.onFirstUpdate && u.onFirstUpdate(v);
});
function h() {
l.orderedModifiers.forEach(function(v) {
var m = v.name, g = v.options, b = g === void 0 ? {} : g, x = v.effect;
if (typeof x == "function") {
var w = x({ state: l, name: m, instance: f, options: b }), C = function() {
};
c.push(w || C);
}
});
}
function p() {
c.forEach(function(v) {
return v();
}), c = [];
}
return f;
};
}
Qm();
var cQ = [rE, iE, nE, Z4];
Qm({ defaultModifiers: cQ });
var dQ = [rE, iE, nE, Z4, ZJ, WJ, tQ, AJ, GJ], pQ = Qm({ defaultModifiers: dQ });
const fQ = (e, t, n = {}) => {
const r = {
name: "updateState",
enabled: !0,
phase: "write",
fn: ({ state: u }) => {
const l = hQ(u);
Object.assign(i.value, l);
},
requires: ["computeStyles"]
}, o = _(() => {
const { onFirstUpdate: u, placement: l, strategy: c, modifiers: d } = y(n);
return {
onFirstUpdate: u,
placement: l || "bottom",
strategy: c || "absolute",
modifiers: [
...d || [],
r,
{ name: "applyStyles", enabled: !1 }
]
};
}), a = Yn(), i = H({
styles: {
popper: {
position: y(o).strategy,
left: "0",
top: "0"
},
arrow: {
position: "absolute"
}
},
attributes: {}
}), s = () => {
a.value && (a.value.destroy(), a.value = void 0);
};
return me(o, (u) => {
const l = y(a);
l && l.setOptions(u);
}, {
deep: !0
}), me([e, t], ([u, l]) => {
s(), !(!u || !l) && (a.value = pQ(u, l, y(o)));
}), Rt(() => {
s();
}), {
state: _(() => {
var u;
return { ...((u = y(a)) == null ? void 0 : u.state) || {} };
}),
styles: _(() => y(i).styles),
attributes: _(() => y(i).attributes),
update: () => {
var u;
return (u = y(a)) == null ? void 0 : u.update();
},
forceUpdate: () => {
var u;
return (u = y(a)) == null ? void 0 : u.forceUpdate();
},
instanceRef: _(() => y(a))
};
};
function hQ(e) {
const t = Object.keys(e.elements), n = Kp(t.map((o) => [o, e.styles[o] || {}])), r = Kp(t.map((o) => [o, e.attributes[o]]));
return {
styles: n,
attributes: r
};
}
function Fw() {
let e;
const t = (r, o) => {
n(), e = window.setTimeout(r, o);
}, n = () => window.clearTimeout(e);
return Jf(() => n()), {
registerTimeout: t,
cancelTimeout: n
};
}
const T0 = {
prefix: Math.floor(Math.random() * 1e4),
current: 0
}, vQ = Symbol("elIdInjection"), sE = () => dt() ? $e(vQ, T0) : T0, lh = (e) => {
const t = sE();
!_n && t === T0 && Tn("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 = qm();
return _(() => y(e) || `${n.value}-id-${t.prefix}-${t.current++}`);
};
let Qs = [];
const Iw = (e) => {
const t = e;
t.key === In.esc && Qs.forEach((n) => n(t));
}, gQ = (e) => {
ht(() => {
Qs.length === 0 && document.addEventListener("keydown", Iw), _n && Qs.push(e);
}), Rt(() => {
Qs = Qs.filter((t) => t !== e), Qs.length === 0 && _n && document.removeEventListener("keydown", Iw);
});
};
let Nw;
const lE = () => {
const e = qm(), t = sE(), n = _(() => `${e.value}-popper-container-${t.prefix}`), r = _(() => `#${n.value}`);
return {
id: n,
selector: r
};
}, mQ = (e) => {
const t = document.createElement("div");
return t.id = e, document.body.appendChild(t), t;
}, yQ = () => {
const { id: e, selector: t } = lE();
return ng(() => {
_n && (process.env.NODE_ENV === "test" || !Nw || !document.body.querySelector(t.value)) && (Nw = mQ(e.value));
}), {
id: e,
selector: t
};
}, bQ = zt({
showAfter: {
type: Number,
default: 0
},
hideAfter: {
type: Number,
default: 200
},
autoClose: {
type: Number,
default: 0
}
}), wQ = ({
showAfter: e,
hideAfter: t,
autoClose: n,
open: r,
close: o
}) => {
const { registerTimeout: a } = Fw(), {
registerTimeout: i,
cancelTimeout: s
} = Fw();
return {
onOpen: (u) => {
a(() => {
r(u);
const l = y(n);
Xn(l) && l > 0 && i(() => {
o(u);
}, l);
}, y(e));
},
onClose: (u) => {
s(), a(() => {
o(u);
}, y(t));
}
};
}, uE = Symbol("elForwardRef"), xQ = (e) => {
ft(uE, {
setForwardRef: (t) => {
e.value = t;
}
});
}, kQ = (e) => ({
mounted(t) {
e(t);
},
updated(t) {
e(t);
},
unmounted() {
e(null);
}
}), Lw = {
current: 0
}, Dw = H(0), cE = 2e3, Rw = Symbol("elZIndexContextKey"), dE = Symbol("zIndexContextKey"), pE = (e) => {
const t = dt() ? $e(Rw, Lw) : Lw, n = e || (dt() ? $e(dE, void 0) : void 0), r = _(() => {
const i = y(n);
return Xn(i) ? i : cE;
}), o = _(() => r.value + Dw.value), a = () => (t.current++, Dw.value = t.current, o.value);
return !_n && !$e(Rw) && Tn("ZIndexInjection", `Looks like you are using server rendering, you must provide a z-index provider to ensure the hydration process to be succeed
usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`), {
initialZIndex: r,
currentZIndex: o,
nextZIndex: a
};
};
function CQ(e) {
let t;
function n() {
if (e.value == null)
return;
const { selectionStart: o, selectionEnd: a, value: i } = e.value;
if (o == null || a == null)
return;
const s = i.slice(0, Math.max(0, o)), u = i.slice(Math.max(0, a));
t = {
selectionStart: o,
selectionEnd: a,
value: i,
beforeTxt: s,
afterTxt: u
};
}
function r() {
if (e.value == null || t == null)
return;
const { value: o } = e.value, { beforeTxt: a, afterTxt: i, selectionStart: s } = t;
if (a == null || i == null || s == null)
return;
let u = o.length;
if (o.endsWith(i))
u = o.length - i.length;
else if (o.startsWith(a))
u = a.length;
else {
const l = a[s - 1], c = o.indexOf(l, s - 1);
c !== -1 && (u = c + 1);
}
e.value.setSelectionRange(u, u);
}
return [n, r];
}
const ql = ah({
type: String,
values: W4,
required: !1
}), fE = Symbol("size"), EQ = () => {
const e = $e(fE, {});
return _(() => y(e.size) || "");
};
function ey(e, {
beforeFocus: t,
afterFocus: n,
beforeBlur: r,
afterBlur: o
} = {}) {
const a = dt(), { emit: i } = a, s = Yn(), u = H(!1), l = (f) => {
wr(t) && t(f) || u.value || (u.value = !0, i("focus", f), n == null || n());
}, c = (f) => {
var h;
wr(r) && r(f) || f.relatedTarget && (h = s.value) != null && h.contains(f.relatedTarget) || (u.value = !1, i("blur", f), o == null || o());
}, d = () => {
var f, h;
(f = s.value) != null && f.contains(document.activeElement) && s.value !== document.activeElement || (h = e.value) == null || h.focus();
};
return me(s, (f) => {
f && f.setAttribute("tabindex", "-1");
}), Qr(s, "focus", l, !0), Qr(s, "blur", c, !0), Qr(s, "click", d, !0), process.env.NODE_ENV === "test" && ht(() => {
const f = rs(e.value) ? e.value : document.querySelector("input,textarea");
f && (Qr(f, "focus", l, !0), Qr(f, "blur", c, !0));
}), {
isFocused: u,
wrapperRef: s,
handleFocus: l,
handleBlur: c
};
}
function hE({
afterComposition: e,
emit: t
}) {
const n = H(!1), r = (i) => {
t == null || t("compositionstart", i), n.value = !0;
}, o = (i) => {
var s;
t == null || t("compositionupdate", i);
const u = (s = i.target) == null ? void 0 : s.value, l = u[u.length - 1] || "";
n.value = !QZ(l);
}, a = (i) => {
t == null || t("compositionend", i), n.value && (n.value = !1, Ge(() => e(i)));
};
return {
isComposing: n,
handleComposition: (i) => {
i.type === "compositionend" ? a(i) : o(i);
},
handleCompositionStart: r,
handleCompositionUpdate: o,
handleCompositionEnd: a
};
}
const vE = Symbol("emptyValuesContextKey"), SQ = "use-empty-values", _Q = ["", void 0, null], TQ = void 0, OQ = zt({
emptyValues: Array,
valueOnClear: {
type: [String, Number, Boolean, Function],
default: void 0,
validator: (e) => wr(e) ? !e() : !e
}
}), PQ = (e, t) => {
const n = dt() ? $e(vE, H({})) : H({}), r = _(() => e.emptyValues || n.value.emptyValues || _Q), o = _(() => wr(e.valueOnClear) ? e.valueOnClear() : e.valueOnClear !== void 0 ? e.valueOnClear : wr(n.value.valueOnClear) ? n.value.valueOnClear() : n.value.valueOnClear !== void 0 ? n.value.valueOnClear : TQ), a = (i) => r.value.includes(i);
return r.value.includes(o.value) || Tn(SQ, "value-on-clear should be a value of empty-values"), {
emptyValues: r,
valueOnClear: o,
isEmptyValue: a
};
}, $Q = zt({
ariaLabel: String,
ariaOrientation: {
type: String,
values: ["horizontal", "vertical", "undefined"]
},
ariaControls: String
}), Pi = (e) => V4($Q, e), gE = Symbol(), Jp = H();
function ty(e, t = void 0) {
const n = dt() ? $e(gE, Jp) : Jp;
return e ? _(() => {
var r, o;
return (o = (r = n.value) == null ? void 0 : r[e]) != null ? o : t;
}) : n;
}
function AQ(e, t) {
const n = ty(), r = wt(e, _(() => {
var s;
return ((s = n.value) == null ? void 0 : s.namespace) || cp;
})), o = Uc(_(() => {
var s;
return (s = n.value) == null ? void 0 : s.locale;
})), a = pE(_(() => {
var s;
return ((s = n.value) == null ? void 0 : s.zIndex) || cE;
})), i = _(() => {
var s;
return y(t) || ((s = n.value) == null ? void 0 : s.size) || "";
});
return FQ(_(() => y(n) || {})), {
ns: r,
locale: o,
zIndex: a,
size: i
};
}
const FQ = (e, t, n = !1) => {
var r;
const o = !!dt(), a = o ? ty() : void 0, i = (r = void 0) != null ? r : o ? ft : void 0;
if (!i) {
Tn("provideGlobalConfig", "provideGlobalConfig() can only be used inside setup().");
return;
}
const s = _(() => {
const u = y(e);
return a != null && a.value ? IQ(a.value, u) : u;
});
return i(gE, s), i(K4, _(() => s.value.locale)), i(G4, _(() => s.value.namespace)), i(dE, _(() => s.value.zIndex)), i(fE, {
size: _(() => s.value.size || "")
}), i(vE, _(() => ({
emptyValues: s.value.emptyValues,
valueOnClear: s.value.valueOnClear
}))), (n || !Jp.value) && (Jp.value = s.value), s;
}, IQ = (e, t) => {
const n = [.../* @__PURE__ */ new Set([...kw(e), ...kw(t)])], r = {};
for (const o of n)
r[o] = t[o] !== void 0 ? t[o] : e[o];
return r;
};
var bt = (e, t) => {
const n = e.__vccOpts || e;
for (const [r, o] of t)
n[r] = o;
return n;
};
const NQ = zt({
size: {
type: ut([Number, String])
},
color: {
type: String
}
}), LQ = Z({
name: "ElIcon",
inheritAttrs: !1
}), DQ = /* @__PURE__ */ Z({
...LQ,
props: NQ,
setup(e) {
const t = e, n = wt("icon"), r = _(() => {
const { size: o, color: a } = t;
return !o && !a ? {} : {
fontSize: ri(o) ? void 0 : Sl(o),
"--color": a
};
});
return (o, a) => (T(), B("i", Xt({
class: y(n).b(),
style: y(r)
}, o.$attrs), [
ve(o.$slots, "default")
], 16));
}
});
var RQ = /* @__PURE__ */ bt(DQ, [["__file", "icon.vue"]]);
const lr = jn(RQ), ny = Symbol("formContextKey"), dc = Symbol("formItemContextKey"), vs = (e, t = {}) => {
const n = H(void 0), r = t.prop ? n : X4("size"), o = t.global ? n : EQ(), a = t.form ? { size: void 0 } : $e(ny, void 0), i = t.formItem ? { size: void 0 } : $e(dc, void 0);
return _(() => r.value || y(e) || (i == null ? void 0 : i.size) || (a == null ? void 0 : a.size) || o.value || "");
}, Kc = (e) => {
const t = X4("disabled"), n = $e(ny, void 0);
return _(() => t.value || y(e) || (n == null ? void 0 : n.disabled) || !1);
}, As = () => {
const e = $e(ny, void 0), t = $e(dc, void 0);
return {
form: e,
formItem: t
};
}, Gc = (e, {
formItemContext: t,
disableIdGeneration: n,
disableIdManagement: r
}) => {
n || (n = H(!1)), r || (r = H(!1));
const o = H();
let a;
const i = _(() => {
var s;
return !!(!(e.label || e.ariaLabel) && t && t.inputIds && ((s = t.inputIds) == null ? void 0 : s.length) <= 1);
});
return ht(() => {
a = me([jt(e, "id"), n], ([s, u]) => {
const l = s ?? (u ? void 0 : lh().value);
l !== o.value && (t != null && t.removeInputId && (o.value && t.removeInputId(o.value), !(r != null && r.value) && !u && l && t.addInputId(l)), o.value = l);
}, { immediate: !0 });
}), Tk(() => {
a && a(), t != null && t.removeInputId && o.value && t.removeInputId(o.value);
}), {
isLabeledByFormItem: i,
inputId: o
};
};
let bo;
const BQ = `
height:0 !important;
visibility:hidden !important;
${gK() ? "" : "overflow:hidden !important;"}
position:absolute !important;
z-index:-1000 !important;
top:0 !important;
right:0 !important;
`, MQ = [
"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 zQ(e) {
const t = window.getComputedStyle(e), n = t.getPropertyValue("box-sizing"), r = Number.parseFloat(t.getPropertyValue("padding-bottom")) + Number.parseFloat(t.getPropertyValue("padding-top")), o = Number.parseFloat(t.getPropertyValue("border-bottom-width")) + Number.parseFloat(t.getPropertyValue("border-top-width"));
return { contextStyle: MQ.map((a) => `${a}:${t.getPropertyValue(a)}`).join(";"), paddingSize: r, borderSize: o, boxSizing: n };
}
function Bw(e, t = 1, n) {
var r;
bo || (bo = document.createElement("textarea"), document.body.appendChild(bo));
const { paddingSize: o, borderSize: a, boxSizing: i, contextStyle: s } = zQ(e);
bo.setAttribute("style", `${s};${BQ}`), bo.value = e.value || e.placeholder || "";
let u = bo.scrollHeight;
const l = {};
i === "border-box" ? u = u + a : i === "content-box" && (u = u - o), bo.value = "";
const c = bo.scrollHeight - o;
if (Xn(t)) {
let d = c * t;
i === "border-box" && (d = d + o + a), u = Math.max(d, u), l.minHeight = `${d}px`;
}
if (Xn(n)) {
let d = c * n;
i === "border-box" && (d = d + o + a), u = Math.min(d, u);
}
return l.height = `${u}px`, (r = bo.parentNode) == null || r.removeChild(bo), bo = void 0, l;
}
const VQ = zt({
id: {
type: String,
default: void 0
},
size: ql,
disabled: Boolean,
modelValue: {
type: ut([
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: ut([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: gi
},
prefixIcon: {
type: gi
},
containerRole: {
type: String,
default: void 0
},
tabindex: {
type: [String, Number],
default: 0
},
validateEvent: {
type: Boolean,
default: !0
},
inputStyle: {
type: ut([Object, Array, String]),
default: () => Js({})
},
autofocus: Boolean,
rows: {
type: Number,
default: 2
},
...Pi(["ariaLabel"])
}), jQ = {
[Kn]: (e) => ur(e),
input: (e) => ur(e),
change: (e) => ur(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
}, HQ = Z({
name: "ElInput",
inheritAttrs: !1
}), UQ = /* @__PURE__ */ Z({
...HQ,
props: VQ,
emits: jQ,
setup(e, { expose: t, emit: n }) {
const r = e, o = rg(), a = ho(), i = _(() => {
const P = {};
return r.containerRole === "combobox" && (P["aria-haspopup"] = o["aria-haspopup"], P["aria-owns"] = o["aria-owns"], P["aria-expanded"] = o["aria-expanded"]), P;
}), s = _(() => [
r.type === "textarea" ? m.b() : v.b(),
v.m(h.value),
v.is("disabled", p.value),
v.is("exceed", pe.value),
{
[v.b("group")]: a.prepend || a.append,
[v.m("prefix")]: a.prefix || r.prefixIcon,
[v.m("suffix")]: a.suffix || r.suffixIcon || r.clearable || r.showPassword,
[v.bm("suffix", "password-clear")]: q.value && oe.value,
[v.b("hidden")]: r.type === "hidden"
},
o.class
]), u = _(() => [
v.e("wrapper"),
v.is("focus", O.value)
]), l = nJ({
excludeKeys: _(() => Object.keys(i.value))
}), { form: c, formItem: d } = As(), { inputId: f } = Gc(r, {
formItemContext: d
}), h = vs(), p = Kc(), v = wt("input"), m = wt("textarea"), g = Yn(), b = Yn(), x = H(!1), w = H(!1), C = H(), k = Yn(r.inputStyle), E = _(() => g.value || b.value), { wrapperRef: S, isFocused: O, handleFocus: F, handleBlur: $ } = ey(E, {
beforeFocus() {
return p.value;
},
afterBlur() {
var P;
r.validateEvent && ((P = d == null ? void 0 : d.validate) == null || P.call(d, "blur").catch((j) => Tn(j)));
}
}), A = _(() => {
var P;
return (P = c == null ? void 0 : c.statusIcon) != null ? P : !1;
}), L = _(() => (d == null ? void 0 : d.validateState) || ""), N = _(() => L.value && q4[L.value]), M = _(() => w.value ? WZ : MZ), I = _(() => [
o.style
]), z = _(() => [
r.inputStyle,
k.value,
{ resize: r.resize }
]), R = _(() => ii(r.modelValue) ? "" : String(r.modelValue)), q = _(() => r.clearable && !p.value && !r.readonly && !!R.value && (O.value || x.value)), oe = _(() => r.showPassword && !p.value && !r.readonly && !!R.value && (!!R.value || O.value)), Q = _(() => r.showWordLimit && !!r.maxlength && (r.type === "text" || r.type === "textarea") && !p.value && !r.readonly && !r.showPassword), ae = _(() => R.value.length), pe = _(() => !!Q.value && ae.value > Number(r.maxlength)), we = _(() => !!a.suffix || !!r.suffixIcon || q.value || r.showPassword || Q.value || !!L.value && A.value), [ke, fe] = CQ(g);
ga(b, (P) => {
if (J(), !Q.value || r.resize !== "both")
return;
const j = P[0], { width: se } = j.contentRect;
C.value = {
right: `calc(100% - ${se + 15 + 6}px)`
};
});
const ge = () => {
const { type: P, autosize: j } = r;
if (!(!_n || P !== "textarea" || !b.value))
if (j) {
const se = Gn(j) ? j.minRows : void 0, ce = Gn(j) ? j.maxRows : void 0, de = Bw(b.value, se, ce);
k.value = {
overflowY: "hidden",
...de
}, Ge(() => {
b.value.offsetHeight, k.value = de;
});
} else
k.value = {
minHeight: Bw(b.value).minHeight
};
}, J = /* @__PURE__ */ ((P) => {
let j = !1;
return () => {
var se;
j || !r.autosize || ((se = b.value) == null ? void 0 : se.offsetParent) === null || (P(), j = !0);
};
})(ge), te = () => {
const P = E.value, j = r.formatter ? r.formatter(R.value) : R.value;
!P || P.value === j || (P.value = j);
}, le = async (P) => {
ke();
let { value: j } = P.target;
if (r.formatter && (j = r.parser ? r.parser(j) : j), !Ne.value) {
if (j === R.value) {
te();
return;
}
n(Kn, j), n("input", j), await Ge(), te(), fe();
}
}, Ee = (P) => {
n("change", P.target.value);
}, {
isComposing: Ne,
handleCompositionStart: je,
handleCompositionUpdate: _e,
handleCompositionEnd: De
} = hE({ emit: n, afterComposition: le }), Ae = () => {
w.value = !w.value, Be();
}, Be = async () => {
var P;
await Ge(), (P = E.value) == null || P.focus();
}, Ue = () => {
var P;
return (P = E.value) == null ? void 0 : P.blur();
}, Ze = (P) => {
x.value = !1, n("mouseleave", P);
}, Me = (P) => {
x.value = !0, n("mouseenter", P);
}, rt = (P) => {
n("keydown", P);
}, nt = () => {
var P;
(P = E.value) == null || P.select();
}, st = () => {
n(Kn, ""), n("change", ""), n("clear"), n("input", "");
};
return me(() => r.modelValue, () => {
var P;
Ge(() => ge()), r.validateEvent && ((P = d == null ? void 0 : d.validate) == null || P.call(d, "change").catch((j) => Tn(j)));
}), me(R, () => te()), me(() => r.type, async () => {
await Ge(), te(), ge();
}), ht(() => {
!r.formatter && r.parser && Tn("ElInput", "If you set the parser, you also need to set the formatter."), te(), Ge(ge);
}), t({
input: g,
textarea: b,
ref: E,
textareaStyle: z,
autosize: jt(r, "autosize"),
isComposing: Ne,
focus: Be,
blur: Ue,
select: nt,
clear: st,
resizeTextarea: ge
}), (P, j) => (T(), B("div", Xt(y(i), {
class: [
y(s),
{
[y(v).bm("group", "append")]: P.$slots.append,
[y(v).bm("group", "prepend")]: P.$slots.prepend
}
],
style: y(I),
role: P.containerRole,
onMouseenter: Me,
onMouseleave: Ze
}), [
ne(" input "),
P.type !== "textarea" ? (T(), B(Qe, { key: 0 }, [
ne(" prepend slot "),
P.$slots.prepend ? (T(), B("div", {
key: 0,
class: W(y(v).be("group", "prepend"))
}, [
ve(P.$slots, "prepend")
], 2)) : ne("v-if", !0),
Y("div", {
ref_key: "wrapperRef",
ref: S,
class: W(y(u))
}, [
ne(" prefix slot "),
P.$slots.prefix || P.prefixIcon ? (T(), B("span", {
key: 0,
class: W(y(v).e("prefix"))
}, [
Y("span", {
class: W(y(v).e("prefix-inner"))
}, [
ve(P.$slots, "prefix"),
P.prefixIcon ? (T(), ie(y(lr), {
key: 0,
class: W(y(v).e("icon"))
}, {
default: G(() => [
(T(), ie(_t(P.prefixIcon)))
]),
_: 1
}, 8, ["class"])) : ne("v-if", !0)
], 2)
], 2)) : ne("v-if", !0),
Y("input", Xt({
id: y(f),
ref_key: "input",
ref: g,
class: y(v).e("inner")
}, y(l), {
minlength: P.minlength,
maxlength: P.maxlength,
type: P.showPassword ? w.value ? "text" : "password" : P.type,
disabled: y(p),
readonly: P.readonly,
autocomplete: P.autocomplete,
tabindex: P.tabindex,
"aria-label": P.ariaLabel,
placeholder: P.placeholder,
style: P.inputStyle,
form: P.form,
autofocus: P.autofocus,
onCompositionstart: y(je),
onCompositionupdate: y(_e),
onCompositionend: y(De),
onInput: le,
onChange: Ee,
onKeydown: rt
}), null, 16, ["id", "minlength", "maxlength", "type", "disabled", "readonly", "autocomplete", "tabindex", "aria-label", "placeholder", "form", "autofocus", "onCompositionstart", "onCompositionupdate", "onCompositionend"]),
ne(" suffix slot "),
y(we) ? (T(), B("span", {
key: 1,
class: W(y(v).e("suffix"))
}, [
Y("span", {
class: W(y(v).e("suffix-inner"))
}, [
!y(q) || !y(oe) || !y(Q) ? (T(), B(Qe, { key: 0 }, [
ve(P.$slots, "suffix"),
P.suffixIcon ? (T(), ie(y(lr), {
key: 0,
class: W(y(v).e("icon"))
}, {
default: G(() => [
(T(), ie(_t(P.suffixIcon)))
]),
_: 1
}, 8, ["class"])) : ne("v-if", !0)
], 64)) : ne("v-if", !0),
y(q) ? (T(), ie(y(lr), {
key: 1,
class: W([y(v).e("icon"), y(v).e("clear")]),
onMousedown: it(y(ic), ["prevent"]),
onClick: st
}, {
default: G(() => [
ee(y(jm))
]),
_: 1
}, 8, ["class", "onMousedown"])) : ne("v-if", !0),
y(oe) ? (T(), ie(y(lr), {
key: 2,
class: W([y(v).e("icon"), y(v).e("password")]),
onClick: Ae
}, {
default: G(() => [
(T(), ie(_t(y(M))))
]),
_: 1
}, 8, ["class"])) : ne("v-if", !0),
y(Q) ? (T(), B("span", {
key: 3,
class: W(y(v).e("count"))
}, [
Y("span", {
class: W(y(v).e("count-inner"))
}, Te(y(ae)) + " / " + Te(P.maxlength), 3)
], 2)) : ne("v-if", !0),
y(L) && y(N) && y(A) ? (T(), ie(y(lr), {
key: 4,
class: W([
y(v).e("icon"),
y(v).e("validateIcon"),
y(v).is("loading", y(L) === "validating")
])
}, {
default: G(() => [
(T(), ie(_t(y(N))))
]),
_: 1
}, 8, ["class"])) : ne("v-if", !0)
], 2)
], 2)) : ne("v-if", !0)
], 2),
ne(" append slot "),
P.$slots.append ? (T(), B("div", {
key: 1,
class: W(y(v).be("group", "append"))
}, [
ve(P.$slots, "append")
], 2)) : ne("v-if", !0)
], 64)) : (T(), B(Qe, { key: 1 }, [
ne(" textarea "),
Y("textarea", Xt({
id: y(f),
ref_key: "textarea",
ref: b,
class: [y(m).e("inner"), y(v).is("focus", y(O))]
}, y(l), {
minlength: P.minlength,
maxlength: P.maxlength,
tabindex: P.tabindex,
disabled: y(p),
readonly: P.readonly,
autocomplete: P.autocomplete,
style: y(z),
"aria-label": P.ariaLabel,
placeholder: P.placeholder,
form: P.form,
autofocus: P.autofocus,
rows: P.rows,
onCompositionstart: y(je),
onCompositionupdate: y(_e),
onCompositionend: y(De),
onInput: le,
onFocus: y(F),
onBlur: y($),
onChange: Ee,
onKeydown: rt
}), null, 16, ["id", "minlength", "maxlength", "tabindex", "disabled", "readonly", "autocomplete", "aria-label", "placeholder", "form", "autofocus", "rows", "onCompositionstart", "onCompositionupdate", "onCompositionend", "onFocus", "onBlur"]),
y(Q) ? (T(), B("span", {
key: 0,
style: lt(C.value),
class: W(y(v).e("count"))
}, Te(y(ae)) + " / " + Te(P.maxlength), 7)) : ne("v-if", !0)
], 64))
], 16, ["role"]));
}
});
var qQ = /* @__PURE__ */ bt(UQ, [["__file", "input.vue"]]);
const uh = jn(qQ), Vs = 4, WQ = {
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"
}
}, KQ = ({
move: e,
size: t,
bar: n
}) => ({
[n.size]: t,
transform: `translate${n.axis}(${e}%)`
}), ry = Symbol("scrollbarContextKey"), GQ = zt({
vertical: Boolean,
size: String,
move: Number,
ratio: {
type: Number,
required: !0
},
always: Boolean
}), XQ = "Thumb", YQ = /* @__PURE__ */ Z({
__name: "thumb",
props: GQ,
setup(e) {
const t = e, n = $e(ry), r = wt("scrollbar");
n || gZ(XQ, "can not inject scrollbar context");
const o = H(), a = H(), i = H({}), s = H(!1);
let u = !1, l = !1, c = _n ? document.onselectstart : null;
const d = _(() => WQ[t.vertical ? "vertical" : "horizontal"]), f = _(() => KQ({
size: t.size,
move: t.move,
bar: d.value
})), h = _(() => o.value[d.value.offset] ** 2 / n.wrapElement[d.value.scrollSize] / t.ratio / a.value[d.value.offset]), p = (k) => {
var E;
if (k.stopPropagation(), k.ctrlKey || [1, 2].includes(k.button))
return;
(E = window.getSelection()) == null || E.removeAllRanges(), m(k);
const S = k.currentTarget;
S && (i.value[d.value.axis] = S[d.value.offset] - (k[d.value.client] - S.getBoundingClientRect()[d.value.direction]));
}, v = (k) => {
if (!a.value || !o.value || !n.wrapElement)
return;
const E = Math.abs(k.target.getBoundingClientRect()[d.value.direction] - k[d.value.client]), S = a.value[d.value.offset] / 2, O = (E - S) * 100 * h.value / o.value[d.value.offset];
n.wrapElement[d.value.scroll] = O * n.wrapElement[d.value.scrollSize] / 100;
}, m = (k) => {
k.stopImmediatePropagation(), u = !0, document.addEventListener("mousemove", g), document.addEventListener("mouseup", b), c = document.onselectstart, document.onselectstart = () => !1;
}, g = (k) => {
if (!o.value || !a.value || u === !1)
return;
const E = i.value[d.value.axis];
if (!E)
return;
const S = (o.value.getBoundingClientRect()[d.value.direction] - k[d.value.client]) * -1, O = a.value[d.value.offset] - E, F = (S - O) * 100 * h.value / o.value[d.value.offset];
n.wrapElement[d.value.scroll] = F * n.wrapElement[d.value.scrollSize] / 100;
}, b = () => {
u = !1, i.value[d.value.axis] = 0, document.removeEventListener("mousemove", g), document.removeEventListener("mouseup", b), C(), l && (s.value = !1);
}, x = () => {
l = !1, s.value = !!t.size;
}, w = () => {
l = !0, s.value = u;
};
Rt(() => {
C(), document.removeEventListener("mouseup", b);
});
const C = () => {
document.onselectstart !== c && (document.onselectstart = c);
};
return Qr(jt(n, "scrollbarElement"), "mousemove", x), Qr(jt(n, "scrollbarElement"), "mouseleave", w), (k, E) => (T(), ie(Kr, {
name: y(r).b("fade"),
persisted: ""
}, {
default: G(() => [
tt(Y("div", {
ref_key: "instance",
ref: o,
class: W([y(r).e("bar"), y(r).is(y(d).key)]),
onMousedown: v
}, [
Y("div", {
ref_key: "thumb",
ref: a,
class: W(y(r).e("thumb")),
style: lt(y(f)),
onMousedown: p
}, null, 38)
], 34), [
[Pt, k.always || s.value]
])
]),
_: 1
}, 8, ["name"]));
}
});
var Mw = /* @__PURE__ */ bt(YQ, [["__file", "thumb.vue"]]);
const ZQ = zt({
always: {
type: Boolean,
default: !0
},
minSize: {
type: Number,
required: !0
}
}), JQ = /* @__PURE__ */ Z({
__name: "bar",
props: ZQ,
setup(e, { expose: t }) {
const n = e, r = $e(ry), o = H(0), a = H(0), i = H(""), s = H(""), u = H(1), l = H(1);
return t({
handleScroll: (c) => {
if (c) {
const d = c.offsetHeight - Vs, f = c.offsetWidth - Vs;
a.value = c.scrollTop * 100 / d * u.value, o.value = c.scrollLeft * 100 / f * l.value;
}
},
update: () => {
const c = r == null ? void 0 : r.wrapElement;
if (!c)
return;
const d = c.offsetHeight - Vs, f = c.offsetWidth - Vs, h = d ** 2 / c.scrollHeight, p = f ** 2 / c.scrollWidth, v = Math.max(h, n.minSize), m = Math.max(p, n.minSize);
u.value = h / (d - h) / (v / (d - v)), l.value = p / (f - p) / (m / (f - m)), s.value = v + Vs < d ? `${v}px` : "", i.value = m + Vs < f ? `${m}px` : "";
}
}), (c, d) => (T(), B(Qe, null, [
ee(Mw, {
move: o.value,
ratio: l.value,
size: i.value,
always: c.always
}, null, 8, ["move", "ratio", "size", "always"]),
ee(Mw, {
move: a.value,
ratio: u.value,
size: s.value,
vertical: "",
always: c.always
}, null, 8, ["move", "ratio", "size", "always"])
], 64));
}
});
var QQ = /* @__PURE__ */ bt(JQ, [["__file", "bar.vue"]]);
const eee = zt({
height: {
type: [String, Number],
default: ""
},
maxHeight: {
type: [String, Number],
default: ""
},
native: {
type: Boolean,
default: !1
},
wrapStyle: {
type: ut([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,
...Pi(["ariaLabel", "ariaOrientation"])
}), tee = {
scroll: ({
scrollTop: e,
scrollLeft: t
}) => [e, t].every(Xn)
}, O0 = "ElScrollbar", nee = Z({
name: O0
}), ree = /* @__PURE__ */ Z({
...nee,
props: eee,
emits: tee,
setup(e, { expose: t, emit: n }) {
const r = e, o = wt("scrollbar");
let a, i, s = 0, u = 0;
const l = H(), c = H(), d = H(), f = H(), h = _(() => {
const C = {};
return r.height && (C.height = Sl(r.height)), r.maxHeight && (C.maxHeight = Sl(r.maxHeight)), [r.wrapStyle, C];
}), p = _(() => [
r.wrapClass,
o.e("wrap"),
{ [o.em("wrap", "hidden-default")]: !r.native }
]), v = _(() => [o.e("view"), r.viewClass]), m = () => {
var C;
c.value && ((C = f.value) == null || C.handleScroll(c.value), s = c.value.scrollTop, u = c.value.scrollLeft, n("scroll", {
scrollTop: c.value.scrollTop,
scrollLeft: c.value.scrollLeft
}));
};
function g(C, k) {
Gn(C) ? c.value.scrollTo(C) : Xn(C) && Xn(k) && c.value.scrollTo(C, k);
}
const b = (C) => {
if (!Xn(C)) {
Tn(O0, "value must be a number");
return;
}
c.value.scrollTop = C;
}, x = (C) => {
if (!Xn(C)) {
Tn(O0, "value must be a number");
return;
}
c.value.scrollLeft = C;
}, w = () => {
var C;
(C = f.value) == null || C.update();
};
return me(() => r.noresize, (C) => {
C ? (a == null || a(), i == null || i()) : ({ stop: a } = ga(d, w), i = Qr("resize", w));
}, { immediate: !0 }), me(() => [r.maxHeight, r.height], () => {
r.native || Ge(() => {
var C;
w(), c.value && ((C = f.value) == null || C.handleScroll(c.value));
});
}), ft(ry, pn({
scrollbarElement: l,
wrapElement: c
})), Ok(() => {
c.value && (c.value.scrollTop = s, c.value.scrollLeft = u);
}), ht(() => {
r.native || Ge(() => {
w();
});
}), hf(() => w()), t({
wrapRef: c,
update: w,
scrollTo: g,
setScrollTop: b,
setScrollLeft: x,
handleScroll: m
}), (C, k) => (T(), B("div", {
ref_key: "scrollbarRef",
ref: l,
class: W(y(o).b())
}, [
Y("div", {
ref_key: "wrapRef",
ref: c,
class: W(y(p)),
style: lt(y(h)),
tabindex: C.tabindex,
onScroll: m
}, [
(T(), ie(_t(C.tag), {
id: C.id,
ref_key: "resizeRef",
ref: d,
class: W(y(v)),
style: lt(C.viewStyle),
role: C.role,
"aria-label": C.ariaLabel,
"aria-orientation": C.ariaOrientation
}, {
default: G(() => [
ve(C.$slots, "default")
]),
_: 3
}, 8, ["id", "class", "style", "role", "aria-label", "aria-orientation"]))
], 46, ["tabindex"]),
C.native ? ne("v-if", !0) : (T(), ie(QQ, {
key: 0,
ref_key: "barRef",
ref: f,
always: C.always,
"min-size": C.minSize
}, null, 8, ["always", "min-size"]))
], 2));
}
});
var oee = /* @__PURE__ */ bt(ree, [["__file", "scrollbar.vue"]]);
const aee = jn(oee), oy = Symbol("popper"), mE = Symbol("popperContent"), iee = [
"dialog",
"grid",
"group",
"listbox",
"menu",
"navigation",
"tooltip",
"tree"
], yE = zt({
role: {
type: String,
values: iee,
default: "tooltip"
}
}), see = Z({
name: "ElPopper",
inheritAttrs: !1
}), lee = /* @__PURE__ */ Z({
...see,
props: yE,
setup(e, { expose: t }) {
const n = e, r = H(), o = H(), a = H(), i = H(), s = _(() => n.role), u = {
triggerRef: r,
popperInstanceRef: o,
contentRef: a,
referenceRef: i,
role: s
};
return t(u), ft(oy, u), (l, c) => ve(l.$slots, "default");
}
});
var uee = /* @__PURE__ */ bt(lee, [["__file", "popper.vue"]]);
const bE = zt({
arrowOffset: {
type: Number,
default: 5
}
}), cee = Z({
name: "ElPopperArrow",
inheritAttrs: !1
}), dee = /* @__PURE__ */ Z({
...cee,
props: bE,
setup(e, { expose: t }) {
const n = e, r = wt("popper"), { arrowOffset: o, arrowRef: a, arrowStyle: i } = $e(mE, void 0);
return me(() => n.arrowOffset, (s) => {
o.value = s;
}), Rt(() => {
a.value = void 0;
}), t({
arrowRef: a
}), (s, u) => (T(), B("span", {
ref_key: "arrowRef",
ref: a,
class: W(y(r).e("arrow")),
style: lt(y(i)),
"data-popper-arrow": ""
}, null, 6));
}
});
var pee = /* @__PURE__ */ bt(dee, [["__file", "arrow.vue"]]);
const vv = "ElOnlyChild", fee = Z({
name: vv,
setup(e, {
slots: t,
attrs: n
}) {
var r;
const o = $e(uE), a = kQ((r = o == null ? void 0 : o.setForwardRef) != null ? r : ic);
return () => {
var i;
const s = (i = t.default) == null ? void 0 : i.call(t, n);
if (!s)
return null;
if (s.length > 1)
return Tn(vv, "requires exact only one valid child."), null;
const u = wE(s);
return u ? tt(og(u, n), [[a]]) : (Tn(vv, "no valid child node found"), null);
};
}
});
function wE(e) {
if (!e)
return null;
const t = e;
for (const n of t) {
if (Gn(n))
switch (n.type) {
case ag:
continue;
case Ll:
case "svg":
return zw(n);
case Qe:
return wE(n.children);
default:
return n;
}
return zw(n);
}
return null;
}
function zw(e) {
const t = wt("only-child");
return ee("span", {
class: t.e("content")
}, [e]);
}
const xE = zt({
virtualRef: {
type: ut(Object)
},
virtualTriggering: Boolean,
onMouseenter: {
type: ut(Function)
},
onMouseleave: {
type: ut(Function)
},
onClick: {
type: ut(Function)
},
onKeydown: {
type: ut(Function)
},
onFocus: {
type: ut(Function)
},
onBlur: {
type: ut(Function)
},
onContextmenu: {
type: ut(Function)
},
id: String,
open: Boolean
}), hee = Z({
name: "ElPopperTrigger",
inheritAttrs: !1
}), vee = /* @__PURE__ */ Z({
...hee,
props: xE,
setup(e, { expose: t }) {
const n = e, { role: r, triggerRef: o } = $e(oy, void 0);
xQ(o);
const a = _(() => s.value ? n.id : void 0), i = _(() => {
if (r && r.value === "tooltip")
return n.open && n.id ? n.id : void 0;
}), s = _(() => {
if (r && r.value !== "tooltip")
return r.value;
}), u = _(() => s.value ? `${n.open}` : void 0);
let l;
const c = [
"onMouseenter",
"onMouseleave",
"onClick",
"onKeydown",
"onFocus",
"onBlur",
"onContextmenu"
];
return ht(() => {
me(() => n.virtualRef, (d) => {
d && (o.value = wa(d));
}, {
immediate: !0
}), me(o, (d, f) => {
l == null || l(), l = void 0, rs(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));
}), l = me([a, i, s, u], (h) => {
[
"aria-controls",
"aria-describedby",
"aria-haspopup",
"aria-expanded"
].forEach((p, v) => {
ii(h[v]) ? d.removeAttribute(p) : d.setAttribute(p, h[v]);
});
}, { immediate: !0 })), rs(f) && [
"aria-controls",
"aria-describedby",
"aria-haspopup",
"aria-expanded"
].forEach((h) => f.removeAttribute(h));
}, {
immediate: !0
});
}), Rt(() => {
if (l == null || l(), l = void 0, o.value && rs(o.value)) {
const d = o.value;
c.forEach((f) => {
const h = n[f];
h && d.removeEventListener(f.slice(2).toLowerCase(), h);
}), o.value = void 0;
}
}), t({
triggerRef: o
}), (d, f) => d.virtualTriggering ? ne("v-if", !0) : (T(), ie(y(fee), Xt({ key: 0 }, d.$attrs, {
"aria-controls": y(a),
"aria-describedby": y(i),
"aria-expanded": y(u),
"aria-haspopup": y(s)
}), {
default: G(() => [
ve(d.$slots, "default")
]),
_: 3
}, 16, ["aria-controls", "aria-describedby", "aria-expanded", "aria-haspopup"]));
}
});
var gee = /* @__PURE__ */ bt(vee, [["__file", "trigger.vue"]]);
const gv = "focus-trap.focus-after-trapped", mv = "focus-trap.focus-after-released", mee = "focus-trap.focusout-prevented", Vw = {
cancelable: !0,
bubbles: !1
}, yee = {
cancelable: !0,
bubbles: !1
}, jw = "focusAfterTrapped", Hw = "focusAfterReleased", bee = Symbol("elFocusTrap"), ay = H(), ch = H(0), iy = H(0);
let Ad = 0;
const kE = (e) => {
const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
acceptNode: (r) => {
const o = r.tagName === "INPUT" && r.type === "hidden";
return r.disabled || r.hidden || o ? NodeFilter.FILTER_SKIP : r.tabIndex >= 0 || r === document.activeElement ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
}
});
for (; n.nextNode(); )
t.push(n.currentNode);
return t;
}, Uw = (e, t) => {
for (const n of e)
if (!wee(n, t))
return n;
}, wee = (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;
}, xee = (e) => {
const t = kE(e), n = Uw(t, e), r = Uw(t.reverse(), e);
return [n, r];
}, kee = (e) => e instanceof HTMLInputElement && "select" in e, Ga = (e, t) => {
if (e && e.focus) {
const n = document.activeElement;
e.focus({ preventScroll: !0 }), iy.value = window.performance.now(), e !== n && kee(e) && t && e.select();
}
};
function qw(e, t) {
const n = [...e], r = e.indexOf(t);
return r !== -1 && n.splice(r, 1), n;
}
const Cee = () => {
let e = [];
return {
push: (t) => {
const n = e[0];
n && t !== n && n.pause(), e = qw(e, t), e.unshift(t);
},
remove: (t) => {
var n, r;
e = qw(e, t), (r = (n = e[0]) == null ? void 0 : n.resume) == null || r.call(n);
}
};
}, Eee = (e, t = !1) => {
const n = document.activeElement;
for (const r of e)
if (Ga(r, t), document.activeElement !== n)
return;
}, Ww = Cee(), See = () => ch.value > iy.value, Fd = () => {
ay.value = "pointer", ch.value = window.performance.now();
}, Kw = () => {
ay.value = "keyboard", ch.value = window.performance.now();
}, _ee = () => (ht(() => {
Ad === 0 && (document.addEventListener("mousedown", Fd), document.addEventListener("touchstart", Fd), document.addEventListener("keydown", Kw)), Ad++;
}), Rt(() => {
Ad--, Ad <= 0 && (document.removeEventListener("mousedown", Fd), document.removeEventListener("touchstart", Fd), document.removeEventListener("keydown", Kw));
}), {
focusReason: ay,
lastUserFocusTimestamp: ch,
lastAutomatedFocusTimestamp: iy
}), Id = (e) => new CustomEvent(mee, {
...yee,
detail: e
}), Tee = Z({
name: "ElFocusTrap",
inheritAttrs: !1,
props: {
loop: Boolean,
trapped: Boolean,
focusTrapEl: Object,
focusStartEl: {
type: [Object, String],
default: "first"
}
},
emits: [
jw,
Hw,
"focusin",
"focusout",
"focusout-prevented",
"release-requested"
],
setup(e, { emit: t }) {
const n = H();
let r, o;
const { focusReason: a } = _ee();
gQ((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: b, currentTarget: x, shiftKey: w } = p, { loop: C } = e, k = v === In.tab && !m && !g && !b, E = document.activeElement;
if (k && E) {
const S = x, [O, F] = xee(S);
if (O && F) {
if (!w && E === F) {
const $ = Id({
focusReason: a.value
});
t("focusout-prevented", $), $.defaultPrevented || (p.preventDefault(), C && Ga(O, !0));
} else if (w && [O, S].includes(E)) {
const $ = Id({
focusReason: a.value
});
t("focusout-prevented", $), $.defaultPrevented || (p.preventDefault(), C && Ga(F, !0));
}
} else if (E === S) {
const $ = Id({
focusReason: a.value
});
t("focusout-prevented", $), $.defaultPrevented || p.preventDefault();
}
}
};
ft(bee, {
focusTrapRef: n,
onKeydown: s
}), me(() => e.focusTrapEl, (p) => {
p && (n.value = p);
}, { immediate: !0 }), me([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 u = (p) => {
t(jw, p);
}, l = (p) => t(Hw, p), c = (p) => {
const v = y(n);
if (!v)
return;
const m = p.target, g = p.relatedTarget, b = m && v.contains(m);
e.trapped || g && v.contains(g) || (r = g), b && t("focusin", p), !i.paused && e.trapped && (b ? o = m : Ga(o, !0));
}, d = (p) => {
const v = y(n);
if (!(i.paused || !v))
if (e.trapped) {
const m = p.relatedTarget;
!ii(m) && !v.contains(m) && setTimeout(() => {
if (!i.paused && e.trapped) {
const g = Id({
focusReason: a.value
});
t("focusout-prevented", g), g.defaultPrevented || Ga(o, !0);
}
}, 0);
} else {
const m = p.target;
m && v.contains(m) || t("focusout", p);
}
};
async function f() {
await Ge();
const p = y(n);
if (p) {
Ww.push(i);
const v = p.contains(document.activeElement) ? r : document.activeElement;
if (r = v, !p.contains(v)) {
const m = new Event(gv, Vw);
p.addEventListener(gv, u), p.dispatchEvent(m), m.defaultPrevented || Ge(() => {
let g = e.focusStartEl;
ur(g) || (Ga(g), document.activeElement !== g && (g = "first")), g === "first" && Eee(kE(p), !0), (document.activeElement === v || g === "container") && Ga(p);
});
}
}
}
function h() {
const p = y(n);
if (p) {
p.removeEventListener(gv, u);
const v = new CustomEvent(mv, {
...Vw,
detail: {
focusReason: a.value
}
});
p.addEventListener(mv, l), p.dispatchEvent(v), !v.defaultPrevented && (a.value == "keyboard" || !See() || p.contains(document.activeElement)) && Ga(r ?? document.body), p.removeEventListener(mv, l), Ww.remove(i);
}
}
return ht(() => {
e.trapped && f(), me(() => e.trapped, (p) => {
p ? f() : h();
});
}), Rt(() => {
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 Oee(e, t, n, r, o, a) {
return ve(e.$slots, "default", { handleKeydown: e.onKeydown });
}
var Pee = /* @__PURE__ */ bt(Tee, [["render", Oee], ["__file", "focus-trap.vue"]]);
const $ee = ["fixed", "absolute"], Aee = zt({
boundariesPadding: {
type: Number,
default: 0
},
fallbackPlacements: {
type: ut(Array),
default: void 0
},
gpuAcceleration: {
type: Boolean,
default: !0
},
offset: {
type: Number,
default: 12
},
placement: {
type: String,
values: ih,
default: "bottom"
},
popperOptions: {
type: ut(Object),
default: () => ({})
},
strategy: {
type: String,
values: $ee,
default: "absolute"
}
}), CE = zt({
...Aee,
id: String,
style: {
type: ut([String, Array, Object])
},
className: {
type: ut([String, Array, Object])
},
effect: {
type: ut(String),
default: "dark"
},
visible: Boolean,
enterable: {
type: Boolean,
default: !0
},
pure: Boolean,
focusOnShow: {
type: Boolean,
default: !1
},
trapping: {
type: Boolean,
default: !1
},
popperClass: {
type: ut([String, Array, Object])
},
popperStyle: {
type: ut([String, Array, Object])
},
referenceEl: {
type: ut(Object)
},
triggerTargetEl: {
type: ut(Object)
},
stopPopperMouseEvent: {
type: Boolean,
default: !0
},
virtualTriggering: Boolean,
zIndex: Number,
...Pi(["ariaLabel"])
}), Fee = {
mouseenter: (e) => e instanceof MouseEvent,
mouseleave: (e) => e instanceof MouseEvent,
focus: () => !0,
blur: () => !0,
close: () => !0
}, Iee = (e, t = []) => {
const { placement: n, strategy: r, popperOptions: o } = e, a = {
placement: n,
strategy: r,
...o,
modifiers: [...Lee(e), ...t]
};
return Dee(a, o == null ? void 0 : o.modifiers), a;
}, Nee = (e) => {
if (_n)
return wa(e);
};
function Lee(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 Dee(e, t) {
t && (e.modifiers = [...e.modifiers, ...t ?? []]);
}
const Ree = 0, Bee = (e) => {
const { popperInstanceRef: t, contentRef: n, triggerRef: r, role: o } = $e(oy, void 0), a = H(), i = H(), s = _(() => ({
name: "eventListeners",
enabled: !!e.visible
})), u = _(() => {
var g;
const b = y(a), x = (g = y(i)) != null ? g : Ree;
return {
name: "arrow",
enabled: !cZ(b),
options: {
element: b,
padding: x
}
};
}), l = _(() => ({
onFirstUpdate: () => {
p();
},
...Iee(e, [
y(u),
y(s)
])
})), c = _(() => Nee(e.referenceEl) || y(r)), { attributes: d, state: f, styles: h, update: p, forceUpdate: v, instanceRef: m } = fQ(c, n, l);
return me(m, (g) => t.value = g), ht(() => {
me(() => {
var g;
return (g = y(c)) == null ? void 0 : g.getBoundingClientRect();
}, () => {
p();
});
}), {
attributes: d,
arrowRef: a,
contentRef: n,
instanceRef: m,
state: f,
styles: h,
role: o,
forceUpdate: v,
update: p
};
}, Mee = (e, {
attributes: t,
styles: n,
role: r
}) => {
const { nextZIndex: o } = pE(), a = wt("popper"), i = _(() => y(t).popper), s = H(Xn(e.zIndex) ? e.zIndex : o()), u = _(() => [
a.b(),
a.is("pure", e.pure),
a.is(e.effect),
e.popperClass
]), l = _(() => [
{ zIndex: y(s) },
y(n).popper,
e.popperStyle || {}
]), c = _(() => r.value === "dialog" ? "false" : void 0), d = _(() => y(n).arrow || {});
return {
ariaModal: c,
arrowStyle: d,
contentAttrs: i,
contentClass: u,
contentStyle: l,
contentZIndex: s,
updateZIndex: () => {
s.value = Xn(e.zIndex) ? e.zIndex : o();
}
};
}, zee = (e, t) => {
const n = H(!1), r = H();
return {
focusStartRef: r,
trapped: n,
onFocusAfterReleased: (o) => {
var a;
((a = o.detail) == null ? void 0 : a.focusReason) !== "pointer" && (r.value = "first", t("blur"));
},
onFocusAfterTrapped: () => {
t("focus");
},
onFocusInTrap: (o) => {
e.visible && !n.value && (o.target && (r.value = o.target), n.value = !0);
},
onFocusoutPrevented: (o) => {
e.trapping || (o.detail.focusReason === "pointer" && o.preventDefault(), n.value = !1);
},
onReleaseRequested: () => {
n.value = !1, t("close");
}
};
}, Vee = Z({
name: "ElPopperContent"
}), jee = /* @__PURE__ */ Z({
...Vee,
props: CE,
emits: Fee,
setup(e, { expose: t, emit: n }) {
const r = e, {
focusStartRef: o,
trapped: a,
onFocusAfterReleased: i,
onFocusAfterTrapped: s,
onFocusInTrap: u,
onFocusoutPrevented: l,
onReleaseRequested: c
} = zee(r, n), { attributes: d, arrowRef: f, contentRef: h, styles: p, instanceRef: v, role: m, update: g } = Bee(r), {
ariaModal: b,
arrowStyle: x,
contentAttrs: w,
contentClass: C,
contentStyle: k,
updateZIndex: E
} = Mee(r, {
styles: p,
attributes: d,
role: m
}), S = $e(dc, void 0), O = H();
ft(mE, {
arrowStyle: x,
arrowRef: f,
arrowOffset: O
}), S && ft(dc, {
...S,
addInputId: ic,
removeInputId: ic
});
let F;
const $ = (L = !0) => {
g(), L && E();
}, A = () => {
$(!1), r.visible && r.focusOnShow ? a.value = !0 : r.visible === !1 && (a.value = !1);
};
return ht(() => {
me(() => r.triggerTargetEl, (L, N) => {
F == null || F(), F = void 0;
const M = y(L || h.value), I = y(N || h.value);
rs(M) && (F = me([m, () => r.ariaLabel, b, () => r.id], (z) => {
["role", "aria-label", "aria-modal", "id"].forEach((R, q) => {
ii(z[q]) ? M.removeAttribute(R) : M.setAttribute(R, z[q]);
});
}, { immediate: !0 })), I !== M && rs(I) && ["role", "aria-label", "aria-modal", "id"].forEach((z) => {
I.removeAttribute(z);
});
}, { immediate: !0 }), me(() => r.visible, A, { immediate: !0 });
}), Rt(() => {
F == null || F(), F = void 0;
}), t({
popperContentRef: h,
popperInstanceRef: v,
updatePopper: $,
contentStyle: k
}), (L, N) => (T(), B("div", Xt({
ref_key: "contentRef",
ref: h
}, y(w), {
style: y(k),
class: y(C),
tabindex: "-1",
onMouseenter: (M) => L.$emit("mouseenter", M),
onMouseleave: (M) => L.$emit("mouseleave", M)
}), [
ee(y(Pee), {
trapped: y(a),
"trap-on-focus-in": !0,
"focus-trap-el": y(h),
"focus-start-el": y(o),
onFocusAfterTrapped: y(s),
onFocusAfterReleased: y(i),
onFocusin: y(u),
onFocusoutPrevented: y(l),
onReleaseRequested: y(c)
}, {
default: G(() => [
ve(L.$slots, "default")
]),
_: 3
}, 8, ["trapped", "focus-trap-el", "focus-start-el", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusin", "onFocusoutPrevented", "onReleaseRequested"])
], 16, ["onMouseenter", "onMouseleave"]));
}
});
var Hee = /* @__PURE__ */ bt(jee, [["__file", "content.vue"]]);
const Uee = jn(uee), sy = Symbol("elTooltip"), Er = zt({
...bQ,
...CE,
appendTo: {
type: ut([String, Object])
},
content: {
type: String,
default: ""
},
rawContent: Boolean,
persistent: Boolean,
visible: {
type: ut(Boolean),
default: null
},
transition: String,
teleported: {
type: Boolean,
default: !0
},
disabled: Boolean,
...Pi(["ariaLabel"])
}), pc = zt({
...xE,
disabled: Boolean,
trigger: {
type: ut([String, Array]),
default: "hover"
},
triggerKeys: {
type: ut(Array),
default: () => [In.enter, In.space]
}
}), {
useModelToggleProps: qee,
useModelToggleEmits: Wee,
useModelToggle: Kee
} = cJ("visible"), Gee = zt({
...yE,
...qee,
...Er,
...pc,
...bE,
showArrow: {
type: Boolean,
default: !0
}
}), Xee = [
...Wee,
"before-show",
"before-hide",
"show",
"hide",
"open",
"close"
], Yee = (e, t) => Tr(e) ? e.includes(t) : e === t, js = (e, t, n) => (r) => {
Yee(y(e), t) && n(r);
}, Zee = Z({
name: "ElTooltipTrigger"
}), Jee = /* @__PURE__ */ Z({
...Zee,
props: pc,
setup(e, { expose: t }) {
const n = e, r = wt("tooltip"), { controlled: o, id: a, open: i, onOpen: s, onClose: u, onToggle: l } = $e(sy, void 0), c = H(null), d = () => {
if (y(o) || n.disabled)
return !0;
}, f = jt(n, "trigger"), h = va(d, js(f, "hover", s)), p = va(d, js(f, "hover", u)), v = va(d, js(f, "click", (w) => {
w.button === 0 && l(w);
})), m = va(d, js(f, "focus", s)), g = va(d, js(f, "focus", u)), b = va(d, js(f, "contextmenu", (w) => {
w.preventDefault(), l(w);
})), x = va(d, (w) => {
const { code: C } = w;
n.triggerKeys.includes(C) && (w.preventDefault(), l(w));
});
return t({
triggerRef: c
}), (w, C) => (T(), ie(y(gee), {
id: y(a),
"virtual-ref": w.virtualRef,
open: y(i),
"virtual-triggering": w.virtualTriggering,
class: W(y(r).e("trigger")),
onBlur: y(g),
onClick: y(v),
onContextmenu: y(b),
onFocus: y(m),
onMouseenter: y(h),
onMouseleave: y(p),
onKeydown: y(x)
}, {
default: G(() => [
ve(w.$slots, "default")
]),
_: 3
}, 8, ["id", "virtual-ref", "open", "virtual-triggering", "class", "onBlur", "onClick", "onContextmenu", "onFocus", "onMouseenter", "onMouseleave", "onKeydown"]));
}
});
var Qee = /* @__PURE__ */ bt(Jee, [["__file", "trigger.vue"]]);
const ete = zt({
to: {
type: ut([String, Object]),
required: !0
},
disabled: Boolean
}), tte = /* @__PURE__ */ Z({
__name: "teleport",
props: ete,
setup(e) {
return (t, n) => t.disabled ? ve(t.$slots, "default", { key: 0 }) : (T(), ie(ig, {
key: 1,
to: t.to
}, [
ve(t.$slots, "default")
], 8, ["to"]));
}
});
var nte = /* @__PURE__ */ bt(tte, [["__file", "teleport.vue"]]);
const rte = jn(nte), ote = Z({
name: "ElTooltipContent",
inheritAttrs: !1
}), ate = /* @__PURE__ */ Z({
...ote,
props: Er,
setup(e, { expose: t }) {
const n = e, { selector: r } = lE(), o = wt("tooltip"), a = H(null);
let i;
const {
controlled: s,
id: u,
open: l,
trigger: c,
onClose: d,
onOpen: f,
onShow: h,
onHide: p,
onBeforeShow: v,
onBeforeHide: m
} = $e(sy, void 0), g = _(() => n.transition || `${o.namespace.value}-fade-in-linear`), b = _(() => process.env.NODE_ENV === "test" ? !0 : n.persistent);
Rt(() => {
i == null || i();
});
const x = _(() => y(b) ? !0 : y(l)), w = _(() => n.disabled ? !1 : y(l)), C = _(() => n.appendTo || r.value), k = _(() => {
var I;
return (I = n.style) != null ? I : {};
}), E = H(!0), S = () => {
p(), E.value = !0;
}, O = () => {
if (y(s))
return !0;
}, F = va(O, () => {
n.enterable && y(c) === "hover" && f();
}), $ = va(O, () => {
y(c) === "hover" && d();
}), A = () => {
var I, z;
(z = (I = a.value) == null ? void 0 : I.updatePopper) == null || z.call(I), v == null || v();
}, L = () => {
m == null || m();
}, N = () => {
h(), i = rK(_(() => {
var I;
return (I = a.value) == null ? void 0 : I.popperContentRef;
}), () => {
y(s) || y(c) !== "hover" && d();
});
}, M = () => {
n.virtualTriggering || d();
};
return me(() => y(l), (I) => {
I ? E.value = !1 : i == null || i();
}, {
flush: "post"
}), me(() => n.content, () => {
var I, z;
(z = (I = a.value) == null ? void 0 : I.updatePopper) == null || z.call(I);
}), t({
contentRef: a
}), (I, z) => (T(), ie(y(rte), {
disabled: !I.teleported,
to: y(C)
}, {
default: G(() => [
ee(Kr, {
name: y(g),
onAfterLeave: S,
onBeforeEnter: A,
onAfterEnter: N,
onBeforeLeave: L
}, {
default: G(() => [
y(x) ? tt((T(), ie(y(Hee), Xt({
key: 0,
id: y(u),
ref_key: "contentRef",
ref: a
}, I.$attrs, {
"aria-label": I.ariaLabel,
"aria-hidden": E.value,
"boundaries-padding": I.boundariesPadding,
"fallback-placements": I.fallbackPlacements,
"gpu-acceleration": I.gpuAcceleration,
offset: I.offset,
placement: I.placement,
"popper-options": I.popperOptions,
strategy: I.strategy,
effect: I.effect,
enterable: I.enterable,
pure: I.pure,
"popper-class": I.popperClass,
"popper-style": [I.popperStyle, y(k)],
"reference-el": I.referenceEl,
"trigger-target-el": I.triggerTargetEl,
visible: y(w),
"z-index": I.zIndex,
onMouseenter: y(F),
onMouseleave: y($),
onBlur: M,
onClose: y(d)
}), {
default: G(() => [
ve(I.$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"])), [
[Pt, y(w)]
]) : ne("v-if", !0)
]),
_: 3
}, 8, ["name"])
]),
_: 3
}, 8, ["disabled", "to"]));
}
});
var ite = /* @__PURE__ */ bt(ate, [["__file", "content.vue"]]);
const ste = Z({
name: "ElTooltip"
}), lte = /* @__PURE__ */ Z({
...ste,
props: Gee,
emits: Xee,
setup(e, { expose: t, emit: n }) {
const r = e;
yQ();
const o = lh(), a = H(), i = H(), s = () => {
var g;
const b = y(a);
b && ((g = b.popperInstanceRef) == null || g.update());
}, u = H(!1), l = H(), { show: c, hide: d, hasUpdateHandler: f } = Kee({
indicator: u,
toggleReason: l
}), { onOpen: h, onClose: p } = wQ({
showAfter: jt(r, "showAfter"),
hideAfter: jt(r, "hideAfter"),
autoClose: jt(r, "autoClose"),
open: c,
close: d
}), v = _(() => El(r.visible) && !f.value);
ft(sy, {
controlled: v,
id: o,
open: ff(u),
trigger: jt(r, "trigger"),
onOpen: (g) => {
h(g);
},
onClose: (g) => {
p(g);
},
onToggle: (g) => {
y(u) ? p(g) : h(g);
},
onShow: () => {
n("show", l.value);
},
onHide: () => {
n("hide", l.value);
},
onBeforeShow: () => {
n("before-show", l.value);
},
onBeforeHide: () => {
n("before-hide", l.value);
},
updatePopper: s
}), me(() => r.disabled, (g) => {
g && u.value && (u.value = !1);
});
const m = (g) => {
var b, x;
const w = (x = (b = i.value) == null ? void 0 : b.contentRef) == null ? void 0 : x.popperContentRef, C = (g == null ? void 0 : g.relatedTarget) || document.activeElement;
return w && w.contains(C);
};
return sg(() => u.value && d()), t({
popperRef: a,
contentRef: i,
isFocusInsideContent: m,
updatePopper: s,
onOpen: h,
onClose: p,
hide: d
}), (g, b) => (T(), ie(y(Uee), {
ref_key: "popperRef",
ref: a,
role: g.role
}, {
default: G(() => [
ee(Qee, {
disabled: g.disabled,
trigger: g.trigger,
"trigger-keys": g.triggerKeys,
"virtual-ref": g.virtualRef,
"virtual-triggering": g.virtualTriggering
}, {
default: G(() => [
g.$slots.default ? ve(g.$slots, "default", { key: 0 }) : ne("v-if", !0)
]),
_: 3
}, 8, ["disabled", "trigger", "trigger-keys", "virtual-ref", "virtual-triggering"]),
ee(ite, {
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: G(() => [
ve(g.$slots, "content", {}, () => [
g.rawContent ? (T(), B("span", {
key: 0,
innerHTML: g.content
}, null, 8, ["innerHTML"])) : (T(), B("span", { key: 1 }, Te(g.content), 1))
]),
g.showArrow ? (T(), ie(y(pee), {
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 ute = /* @__PURE__ */ bt(lte, [["__file", "tooltip.vue"]]);
const Xc = jn(ute), EE = Symbol("buttonGroupContextKey"), cte = (e, t) => {
up({
from: "type.text",
replacement: "link",
version: "3.0.0",
scope: "props",
ref: "https://element-plus.org/en-US/component/button.html#button-attributes"
}, _(() => e.type === "text"));
const n = $e(EE, void 0), r = ty("button"), { form: o } = As(), a = vs(_(() => n == null ? void 0 : n.size)), i = Kc(), s = H(), u = ho(), l = _(() => e.type || (n == null ? void 0 : n.type) || ""), c = _(() => {
var h, p, v;
return (v = (p = e.autoInsertSpace) != null ? p : (h = r.value) == null ? void 0 : h.autoInsertSpace) != null ? v : !1;
}), d = _(() => e.tag === "button" ? {
ariaDisabled: i.value || e.loading,
disabled: i.value || e.loading,
autofocus: e.autofocus,
type: e.nativeType
} : {}), f = _(() => {
var h;
const p = (h = u.default) == null ? void 0 : h.call(u);
if (c.value && (p == null ? void 0 : p.length) === 1) {
const v = p[0];
if ((v == null ? void 0 : v.type) === Ll) {
const m = v.children;
return new RegExp("^\\p{Unified_Ideograph}{2}$", "u").test(m.trim());
}
}
return !1;
});
return {
_disabled: i,
_size: a,
_type: l,
_ref: s,
_props: d,
shouldAddSpace: f,
handleClick: (h) => {
if (i.value || e.loading) {
h.stopPropagation();
return;
}
e.nativeType === "reset" && (o == null || o.resetFields()), t("click", h);
}
};
}, dte = [
"default",
"primary",
"success",
"warning",
"info",
"danger",
"text",
""
], pte = ["button", "submit", "reset"], P0 = zt({
size: ql,
disabled: Boolean,
type: {
type: String,
values: dte,
default: ""
},
icon: {
type: gi
},
nativeType: {
type: String,
values: pte,
default: "button"
},
loading: Boolean,
loadingIcon: {
type: gi,
default: () => Hm
},
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: ut([String, Object]),
default: "button"
}
}), fte = {
click: (e) => e instanceof MouseEvent
};
function Qn(e, t) {
hte(e) && (e = "100%");
var n = vte(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 Nd(e) {
return Math.min(1, Math.max(0, e));
}
function hte(e) {
return typeof e == "string" && e.indexOf(".") !== -1 && parseFloat(e) === 1;
}
function vte(e) {
return typeof e == "string" && e.indexOf("%") !== -1;
}
function SE(e) {
return e = parseFloat(e), (isNaN(e) || e < 0 || e > 1) && (e = 1), e;
}
function Ld(e) {
return e <= 1 ? "".concat(Number(e) * 100, "%") : e;
}
function Xi(e) {
return e.length === 1 ? "0" + e : String(e);
}
function gte(e, t, n) {
return {
r: Qn(e, 255) * 255,
g: Qn(t, 255) * 255,
b: Qn(n, 255) * 255
};
}
function Gw(e, t, n) {
e = Qn(e, 255), t = Qn(t, 255), n = Qn(n, 255);
var r = Math.max(e, t, n), o = Math.min(e, t, n), a = 0, i = 0, s = (r + o) / 2;
if (r === o)
i = 0, a = 0;
else {
var u = r - o;
switch (i = s > 0.5 ? u / (2 - r - o) : u / (r + o), r) {
case e:
a = (t - n) / u + (t < n ? 6 : 0);
break;
case t:
a = (n - e) / u + 2;
break;
case n:
a = (e - t) / u + 4;
break;
}
a /= 6;
}
return { h: a, s: i, l: s };
}
function yv(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 mte(e, t, n) {
var r, o, a;
if (e = Qn(e, 360), t = Qn(t, 100), n = Qn(n, 100), t === 0)
o = n, a = n, r = n;
else {
var i = n < 0.5 ? n * (1 + t) : n + t - n * t, s = 2 * n - i;
r = yv(s, i, e + 1 / 3), o = yv(s, i, e), a = yv(s, i, e - 1 / 3);
}
return { r: r * 255, g: o * 255, b: a * 255 };
}
function Xw(e, t, n) {
e = Qn(e, 255), t = Qn(t, 255), n = Qn(n, 255);
var r = Math.max(e, t, n), o = Math.min(e, t, n), a = 0, i = r, s = r - o, u = r === 0 ? 0 : s / r;
if (r === o)
a = 0;
else {
switch (r) {
case e:
a = (t - n) / s + (t < n ? 6 : 0);
break;
case t:
a = (n - e) / s + 2;
break;
case n:
a = (e - t) / s + 4;
break;
}
a /= 6;
}
return { h: a, s: u, v: i };
}
function yte(e, t, n) {
e = Qn(e, 360) * 6, t = Qn(t, 100), n = Qn(n, 100);
var r = Math.floor(e), o = e - r, a = n * (1 - t), i = n * (1 - o * t), s = n * (1 - (1 - o) * t), u = r % 6, l = [n, i, a, a, s, n][u], c = [s, n, n, i, a, a][u], d = [a, a, s, n, n, i][u];
return { r: l * 255, g: c * 255, b: d * 255 };
}
function Yw(e, t, n, r) {
var o = [
Xi(Math.round(e).toString(16)),
Xi(Math.round(t).toString(16)),
Xi(Math.round(n).toString(16))
];
return r && o[0].startsWith(o[0].charAt(1)) && o[1].startsWith(o[1].charAt(1)) && o[2].startsWith(o[2].charAt(1)) ? o[0].charAt(0) + o[1].charAt(0) + o[2].charAt(0) : o.join("");
}
function bte(e, t, n, r, o) {
var a = [
Xi(Math.round(e).toString(16)),
Xi(Math.round(t).toString(16)),
Xi(Math.round(n).toString(16)),
Xi(wte(r))
];
return o && a[0].startsWith(a[0].charAt(1)) && a[1].startsWith(a[1].charAt(1)) && a[2].startsWith(a[2].charAt(1)) && a[3].startsWith(a[3].charAt(1)) ? a[0].charAt(0) + a[1].charAt(0) + a[2].charAt(0) + a[3].charAt(0) : a.join("");
}
function wte(e) {
return Math.round(parseFloat(e) * 255).toString(16);
}
function Zw(e) {
return jr(e) / 255;
}
function jr(e) {
return parseInt(e, 16);
}
function xte(e) {
return {
r: e >> 16,
g: (e & 65280) >> 8,
b: e & 255
};
}
var $0 = {
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 kte(e) {
var t = { r: 0, g: 0, b: 0 }, n = 1, r = null, o = null, a = null, i = !1, s = !1;
return typeof e == "string" && (e = Ste(e)), typeof e == "object" && (da(e.r) && da(e.g) && da(e.b) ? (t = gte(e.r, e.g, e.b), i = !0, s = String(e.r).substr(-1) === "%" ? "prgb" : "rgb") : da(e.h) && da(e.s) && da(e.v) ? (r = Ld(e.s), o = Ld(e.v), t = yte(e.h, r, o), i = !0, s = "hsv") : da(e.h) && da(e.s) && da(e.l) && (r = Ld(e.s), a = Ld(e.l), t = mte(e.h, r, a), i = !0, s = "hsl"), Object.prototype.hasOwnProperty.call(e, "a") && (n = e.a)), n = SE(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 Cte = "[-\\+]?\\d+%?", Ete = "[-\\+]?\\d*\\.\\d+%?", oi = "(?:".concat(Ete, ")|(?:").concat(Cte, ")"), bv = "[\\s|\\(]+(".concat(oi, ")[,|\\s]+(").concat(oi, ")[,|\\s]+(").concat(oi, ")\\s*\\)?"), wv = "[\\s|\\(]+(".concat(oi, ")[,|\\s]+(").concat(oi, ")[,|\\s]+(").concat(oi, ")[,|\\s]+(").concat(oi, ")\\s*\\)?"), ko = {
CSS_UNIT: new RegExp(oi),
rgb: new RegExp("rgb" + bv),
rgba: new RegExp("rgba" + wv),
hsl: new RegExp("hsl" + bv),
hsla: new RegExp("hsla" + wv),
hsv: new RegExp("hsv" + bv),
hsva: new RegExp("hsva" + wv),
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 Ste(e) {
if (e = e.trim().toLowerCase(), e.length === 0)
return !1;
var t = !1;
if ($0[e])
e = $0[e], t = !0;
else if (e === "transparent")
return { r: 0, g: 0, b: 0, a: 0, format: "name" };
var n = ko.rgb.exec(e);
return n ? { r: n[1], g: n[2], b: n[3] } : (n = ko.rgba.exec(e), n ? { r: n[1], g: n[2], b: n[3], a: n[4] } : (n = ko.hsl.exec(e), n ? { h: n[1], s: n[2], l: n[3] } : (n = ko.hsla.exec(e), n ? { h: n[1], s: n[2], l: n[3], a: n[4] } : (n = ko.hsv.exec(e), n ? { h: n[1], s: n[2], v: n[3] } : (n = ko.hsva.exec(e), n ? { h: n[1], s: n[2], v: n[3], a: n[4] } : (n = ko.hex8.exec(e), n ? {
r: jr(n[1]),
g: jr(n[2]),
b: jr(n[3]),
a: Zw(n[4]),
format: t ? "name" : "hex8"
} : (n = ko.hex6.exec(e), n ? {
r: jr(n[1]),
g: jr(n[2]),
b: jr(n[3]),
format: t ? "name" : "hex"
} : (n = ko.hex4.exec(e), n ? {
r: jr(n[1] + n[1]),
g: jr(n[2] + n[2]),
b: jr(n[3] + n[3]),
a: Zw(n[4] + n[4]),
format: t ? "name" : "hex8"
} : (n = ko.hex3.exec(e), n ? {
r: jr(n[1] + n[1]),
g: jr(n[2] + n[2]),
b: jr(n[3] + n[3]),
format: t ? "name" : "hex"
} : !1)))))))));
}
function da(e) {
return !!ko.CSS_UNIT.exec(String(e));
}
var _te = (
/** @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 = xte(t)), this.originalInput = t;
var o = kte(t);
this.originalInput = t, this.r = o.r, this.g = o.g, this.b = o.b, this.a = o.a, this.roundA = Math.round(100 * this.a) / 100, this.format = (r = n.format) !== null && r !== void 0 ? r : o.format, this.gradientType = n.gradientType, this.r < 1 && (this.r = Math.round(this.r)), this.g < 1 && (this.g = Math.round(this.g)), this.b < 1 && (this.b = Math.round(this.b)), this.isValid = o.ok;
}
return e.prototype.isDark = function() {
return this.getBrightness() < 128;
}, e.prototype.isLight = function() {
return !this.isDark();
}, e.prototype.getBrightness = function() {
var t = this.toRgb();
return (t.r * 299 + t.g * 587 + t.b * 114) / 1e3;
}, e.prototype.getLuminance = function() {
var t = this.toRgb(), n, r, o, a = t.r / 255, i = t.g / 255, s = t.b / 255;
return a <= 0.03928 ? n = a / 12.92 : n = Math.pow((a + 0.055) / 1.055, 2.4), i <= 0.03928 ? r = i / 12.92 : r = Math.pow((i + 0.055) / 1.055, 2.4), s <= 0.03928 ? o = s / 12.92 : o = Math.pow((s + 0.055) / 1.055, 2.4), 0.2126 * n + 0.7152 * r + 0.0722 * o;
}, e.prototype.getAlpha = function() {
return this.a;
}, e.prototype.setAlpha = function(t) {
return this.a = SE(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 = Xw(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 = Xw(this.r, this.g, this.b), n = Math.round(t.h * 360), r = Math.round(t.s * 100), o = Math.round(t.v * 100);
return this.a === 1 ? "hsv(".concat(n, ", ").concat(r, "%, ").concat(o, "%)") : "hsva(".concat(n, ", ").concat(r, "%, ").concat(o, "%, ").concat(this.roundA, ")");
}, e.prototype.toHsl = function() {
var t = Gw(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 = Gw(this.r, this.g, this.b), n = Math.round(t.h * 360), r = Math.round(t.s * 100), o = Math.round(t.l * 100);
return this.a === 1 ? "hsl(".concat(n, ", ").concat(r, "%, ").concat(o, "%)") : "hsla(".concat(n, ", ").concat(r, "%, ").concat(o, "%, ").concat(this.roundA, ")");
}, e.prototype.toHex = function(t) {
return t === void 0 && (t = !1), Yw(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), bte(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(Qn(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(Qn(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 = "#" + Yw(this.r, this.g, this.b, !1), n = 0, r = Object.entries($0); n < r.length; n++) {
var o = r[n], a = o[0], i = o[1];
if (t === i)
return a;
}
return !1;
}, e.prototype.toString = function(t) {
var n = !!t;
t = t ?? this.format;
var r = !1, o = this.a < 1 && this.a >= 0, a = !n && o && (t.startsWith("hex") || t === "name");
return a ? t === "name" && this.a === 0 ? this.toName() : this.toRgbString() : (t === "rgb" && (r = this.toRgbString()), t === "prgb" && (r = this.toPercentageRgbString()), (t === "hex" || t === "hex6") && (r = this.toHexString()), t === "hex3" && (r = this.toHexString(!0)), t === "hex4" && (r = this.toHex8String(!0)), t === "hex8" && (r = this.toHex8String()), t === "name" && (r = this.toName()), t === "hsl" && (r = this.toHslString()), t === "hsv" && (r = this.toHsvString()), r || this.toHexString());
}, e.prototype.toNumber = function() {
return (Math.round(this.r) << 16) + (Math.round(this.g) << 8) + Math.round(this.b);
}, e.prototype.clone = function() {
return new e(this.toString());
}, e.prototype.lighten = function(t) {
t === void 0 && (t = 10);
var n = this.toHsl();
return n.l += t / 100, n.l = Nd(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 = Nd(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 = Nd(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 = Nd(n.s), new e(n);
}, e.prototype.greyscale = function() {
return this.desaturate(100);
}, e.prototype.spin = function(t) {
var n = this.toHsl(), r = (n.h + t) % 360;
return n.h = r < 0 ? 360 + r : r, new e(n);
}, e.prototype.mix = function(t, n) {
n === void 0 && (n = 50);
var r = this.toRgb(), o = new e(t).toRgb(), a = n / 100, i = {
r: (o.r - r.r) * a + r.r,
g: (o.g - r.g) * a + r.g,
b: (o.b - r.b) * a + r.b,
a: (o.a - r.a) * a + r.a
};
return new e(i);
}, e.prototype.analogous = function(t, n) {
t === void 0 && (t = 6), n === void 0 && (n = 30);
var r = this.toHsl(), o = 360 / n, a = [this];
for (r.h = (r.h - (o * t >> 1) + 720) % 360; --t; )
r.h = (r.h + o) % 360, a.push(new e(r));
return a;
}, e.prototype.complement = function() {
var t = this.toHsl();
return t.h = (t.h + 180) % 360, new e(t);
}, e.prototype.monochromatic = function(t) {
t === void 0 && (t = 6);
for (var n = this.toHsv(), r = n.h, o = n.s, a = n.v, i = [], s = 1 / t; t--; )
i.push(new e({ h: r, s: o, v: a })), a = (a + s) % 1;
return i;
}, e.prototype.splitcomplement = function() {
var t = this.toHsl(), n = t.h;
return [
this,
new e({ h: (n + 72) % 360, s: t.s, l: t.l }),
new e({ h: (n + 216) % 360, s: t.s, l: t.l })
];
}, e.prototype.onBackground = function(t) {
var n = this.toRgb(), r = new e(t).toRgb(), o = n.a + r.a * (1 - n.a);
return new e({
r: (n.r * n.a + r.r * r.a * (1 - n.a)) / o,
g: (n.g * n.a + r.g * r.a * (1 - n.a)) / o,
b: (n.b * n.a + r.b * r.a * (1 - n.a)) / o,
a: o
});
}, e.prototype.triad = function() {
return this.polyad(3);
}, e.prototype.tetrad = function() {
return this.polyad(4);
}, e.prototype.polyad = function(t) {
for (var n = this.toHsl(), r = n.h, o = [this], a = 360 / t, i = 1; i < t; i++)
o.push(new e({ h: (r + i * a) % 360, s: n.s, l: n.l }));
return o;
}, e.prototype.equals = function(t) {
return this.toRgbString() === new e(t).toRgbString();
}, e;
}()
);
function ja(e, t = 20) {
return e.mix("#141414", t).toString();
}
function Tte(e) {
const t = Kc(), n = wt("button");
return _(() => {
let r = {}, o = e.color;
if (o) {
const a = o.match(/var\((.*?)\)/);
a && (o = window.getComputedStyle(window.document.documentElement).getPropertyValue(a[1]));
const i = new _te(o), s = e.dark ? i.tint(20).toString() : ja(i, 20);
if (e.plain)
r = n.cssVarBlock({
"bg-color": e.dark ? ja(i, 90) : i.tint(90).toString(),
"text-color": o,
"border-color": e.dark ? ja(i, 50) : i.tint(50).toString(),
"hover-text-color": `var(${n.cssVarName("color-white")})`,
"hover-bg-color": o,
"hover-border-color": o,
"active-bg-color": s,
"active-text-color": `var(${n.cssVarName("color-white")})`,
"active-border-color": s
}), t.value && (r[n.cssVarBlockName("disabled-bg-color")] = e.dark ? ja(i, 90) : i.tint(90).toString(), r[n.cssVarBlockName("disabled-text-color")] = e.dark ? ja(i, 50) : i.tint(50).toString(), r[n.cssVarBlockName("disabled-border-color")] = e.dark ? ja(i, 80) : i.tint(80).toString());
else {
const u = e.dark ? ja(i, 30) : i.tint(30).toString(), l = i.isDark() ? `var(${n.cssVarName("color-white")})` : `var(${n.cssVarName("color-black")})`;
if (r = n.cssVarBlock({
"bg-color": o,
"text-color": l,
"border-color": o,
"hover-bg-color": u,
"hover-text-color": l,
"hover-border-color": u,
"active-bg-color": s,
"active-border-color": s
}), t.value) {
const c = e.dark ? ja(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 Ote = Z({
name: "ElButton"
}), Pte = /* @__PURE__ */ Z({
...Ote,
props: P0,
emits: fte,
setup(e, { expose: t, emit: n }) {
const r = e, o = Tte(r), a = wt("button"), { _ref: i, _size: s, _type: u, _disabled: l, _props: c, shouldAddSpace: d, handleClick: f } = cte(r, n), h = _(() => [
a.b(),
a.m(u.value),
a.m(s.value),
a.is("disabled", l.value),
a.is("loading", r.loading),
a.is("plain", r.plain),
a.is("round", r.round),
a.is("circle", r.circle),
a.is("text", r.text),
a.is("link", r.link),
a.is("has-bg", r.bg)
]);
return t({
ref: i,
size: s,
type: u,
disabled: l,
shouldAddSpace: d
}), (p, v) => (T(), ie(_t(p.tag), Xt({
ref_key: "_ref",
ref: i
}, y(c), {
class: y(h),
style: y(o),
onClick: y(f)
}), {
default: G(() => [
p.loading ? (T(), B(Qe, { key: 0 }, [
p.$slots.loading ? ve(p.$slots, "loading", { key: 0 }) : (T(), ie(y(lr), {
key: 1,
class: W(y(a).is("loading"))
}, {
default: G(() => [
(T(), ie(_t(p.loadingIcon)))
]),
_: 1
}, 8, ["class"]))
], 64)) : p.icon || p.$slots.icon ? (T(), ie(y(lr), { key: 1 }, {
default: G(() => [
p.icon ? (T(), ie(_t(p.icon), { key: 0 })) : ve(p.$slots, "icon", { key: 1 })
]),
_: 3
})) : ne("v-if", !0),
p.$slots.default ? (T(), B("span", {
key: 2,
class: W({ [y(a).em("text", "expand")]: y(d) })
}, [
ve(p.$slots, "default")
], 2)) : ne("v-if", !0)
]),
_: 3
}, 16, ["class", "style", "onClick"]));
}
});
var $te = /* @__PURE__ */ bt(Pte, [["__file", "button.vue"]]);
const Ate = {
size: P0.size,
type: P0.type
}, Fte = Z({
name: "ElButtonGroup"
}), Ite = /* @__PURE__ */ Z({
...Fte,
props: Ate,
setup(e) {
const t = e;
ft(EE, pn({
size: jt(t, "size"),
type: jt(t, "type")
}));
const n = wt("button");
return (r, o) => (T(), B("div", {
class: W(y(n).b("group"))
}, [
ve(r.$slots, "default")
], 2));
}
});
var _E = /* @__PURE__ */ bt(Ite, [["__file", "button-group.vue"]]);
const gs = jn($te, {
ButtonGroup: _E
});
Na(_E);
const Xa = /* @__PURE__ */ new Map();
if (_n) {
let e;
document.addEventListener("mousedown", (t) => e = t), document.addEventListener("mouseup", (t) => {
if (e) {
for (const n of Xa.values())
for (const { documentHandler: r } of n)
r(t, e);
e = void 0;
}
});
}
function Jw(e, t) {
let n = [];
return Array.isArray(t.arg) ? n = t.arg : rs(t.arg) && n.push(t.arg), function(r, o) {
const a = t.instance.popperRef, i = r.target, s = o == null ? void 0 : o.target, u = !t || !t.instance, l = !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 = a && (a.contains(i) || a.contains(s));
u || l || c || d || f || h || t.value(r, o);
};
}
const TE = {
beforeMount(e, t) {
Xa.has(e) || Xa.set(e, []), Xa.get(e).push({
documentHandler: Jw(e, t),
bindingFn: t.value
});
},
updated(e, t) {
Xa.has(e) || Xa.set(e, []);
const n = Xa.get(e), r = n.findIndex((a) => a.bindingFn === t.oldValue), o = {
documentHandler: Jw(e, t),
bindingFn: t.value
};
r >= 0 ? n.splice(r, 1, o) : n.push(o);
},
unmounted(e) {
Xa.delete(e);
}
}, Nte = zt({
header: {
type: String,
default: ""
},
footer: {
type: String,
default: ""
},
bodyStyle: {
type: ut([String, Object, Array]),
default: ""
},
bodyClass: String,
shadow: {
type: String,
values: ["always", "hover", "never"],
default: "always"
}
}), Lte = Z({
name: "ElCard"
}), Dte = /* @__PURE__ */ Z({
...Lte,
props: Nte,
setup(e) {
const t = wt("card");
return (n, r) => (T(), B("div", {
class: W([y(t).b(), y(t).is(`${n.shadow}-shadow`)])
}, [
n.$slots.header || n.header ? (T(), B("div", {
key: 0,
class: W(y(t).e("header"))
}, [
ve(n.$slots, "header", {}, () => [
Ke(Te(n.header), 1)
])
], 2)) : ne("v-if", !0),
Y("div", {
class: W([y(t).e("body"), n.bodyClass]),
style: lt(n.bodyStyle)
}, [
ve(n.$slots, "default")
], 6),
n.$slots.footer || n.footer ? (T(), B("div", {
key: 1,
class: W(y(t).e("footer"))
}, [
ve(n.$slots, "footer", {}, () => [
Ke(Te(n.footer), 1)
])
], 2)) : ne("v-if", !0)
], 2));
}
});
var Rte = /* @__PURE__ */ bt(Dte, [["__file", "card.vue"]]);
jn(Rte);
const OE = {
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: ql,
tabindex: [String, Number],
validateEvent: {
type: Boolean,
default: !0
},
...Pi(["ariaControls"])
}, PE = {
[Kn]: (e) => ur(e) || Xn(e) || El(e),
change: (e) => ur(e) || Xn(e) || El(e)
}, Wl = Symbol("checkboxGroupContextKey"), Bte = ({
model: e,
isChecked: t
}) => {
const n = $e(Wl, void 0), r = _(() => {
var o, a;
const i = (o = n == null ? void 0 : n.max) == null ? void 0 : o.value, s = (a = n == null ? void 0 : n.min) == null ? void 0 : a.value;
return !ri(i) && e.value.length >= i && !t.value || !ri(s) && e.value.length <= s && t.value;
});
return {
isDisabled: Kc(_(() => (n == null ? void 0 : n.disabled.value) || r.value)),
isLimitDisabled: r
};
}, Mte = (e, {
model: t,
isLimitExceeded: n,
hasOwnLabel: r,
isDisabled: o,
isLabeledByFormItem: a
}) => {
const i = $e(Wl, void 0), { formItem: s } = As(), { emit: u } = dt();
function l(p) {
var v, m, g, b;
return [!0, e.trueValue, e.trueLabel].includes(p) ? (m = (v = e.trueValue) != null ? v : e.trueLabel) != null ? m : !0 : (b = (g = e.falseValue) != null ? g : e.falseLabel) != null ? b : !1;
}
function c(p, v) {
u("change", l(p), v);
}
function d(p) {
if (n.value)
return;
const v = p.target;
u("change", l(v.checked), p);
}
async function f(p) {
n.value || !r.value && !o.value && a.value && (p.composedPath().some((v) => v.tagName === "LABEL") || (t.value = l([!1, e.falseValue, e.falseLabel].includes(t.value)), await Ge(), c(t.value, p)));
}
const h = _(() => (i == null ? void 0 : i.validateEvent) || e.validateEvent);
return me(() => e.modelValue, () => {
h.value && (s == null || s.validate("change").catch((p) => Tn(p)));
}), {
handleChange: d,
onClickRoot: f
};
}, zte = (e) => {
const t = H(!1), { emit: n } = dt(), r = $e(Wl, void 0), o = _(() => ri(r) === !1), a = H(!1), i = _({
get() {
var s, u;
return o.value ? (s = r == null ? void 0 : r.modelValue) == null ? void 0 : s.value : (u = e.modelValue) != null ? u : t.value;
},
set(s) {
var u, l;
o.value && Tr(s) ? (a.value = ((u = r == null ? void 0 : r.max) == null ? void 0 : u.value) !== void 0 && s.length > (r == null ? void 0 : r.max.value) && s.length > i.value.length, a.value === !1 && ((l = r == null ? void 0 : r.changeEvent) == null || l.call(r, s))) : (n(Kn, s), t.value = s);
}
});
return {
model: i,
isGroup: o,
isLimitExceeded: a
};
}, Vte = (e, t, { model: n }) => {
const r = $e(Wl, void 0), o = H(!1), a = _(() => Xp(e.value) ? e.label : e.value), i = _(() => {
const c = n.value;
return El(c) ? c : Tr(c) ? Gn(a.value) ? c.map(ui).some((d) => Gp(d, a.value)) : c.map(ui).includes(a.value) : c != null ? c === e.trueValue || c === e.trueLabel : !!c;
}), s = vs(_(() => {
var c;
return (c = r == null ? void 0 : r.size) == null ? void 0 : c.value;
}), {
prop: !0
}), u = vs(_(() => {
var c;
return (c = r == null ? void 0 : r.size) == null ? void 0 : c.value;
})), l = _(() => !!t.default || !Xp(a.value));
return {
checkboxButtonSize: s,
isChecked: i,
isFocused: o,
checkboxSize: u,
hasOwnLabel: l,
actualValue: a
};
}, $E = (e, t) => {
const { formItem: n } = As(), { model: r, isGroup: o, isLimitExceeded: a } = zte(e), {
isFocused: i,
isChecked: s,
checkboxButtonSize: u,
checkboxSize: l,
hasOwnLabel: c,
actualValue: d
} = Vte(e, t, { model: r }), { isDisabled: f } = Bte({ model: r, isChecked: s }), { inputId: h, isLabeledByFormItem: p } = Gc(e, {
formItemContext: n,
disableIdGeneration: c,
disableIdManagement: o
}), { handleChange: v, onClickRoot: m } = Mte(e, {
model: r,
isLimitExceeded: a,
hasOwnLabel: c,
isDisabled: f,
isLabeledByFormItem: p
});
return (() => {
function g() {
var b, x;
Tr(r.value) && !r.value.includes(d.value) ? r.value.push(d.value) : r.value = (x = (b = e.trueValue) != null ? b : e.trueLabel) != null ? x : !0;
}
e.checked && g();
})(), up({
from: "label act as value",
replacement: "value",
version: "3.0.0",
scope: "el-checkbox",
ref: "https://element-plus.org/en-US/component/checkbox.html"
}, _(() => o.value && Xp(e.value))), up({
from: "true-label",
replacement: "true-value",
version: "3.0.0",
scope: "el-checkbox",
ref: "https://element-plus.org/en-US/component/checkbox.html"
}, _(() => !!e.trueLabel)), up({
from: "false-label",
replacement: "false-value",
version: "3.0.0",
scope: "el-checkbox",
ref: "https://element-plus.org/en-US/component/checkbox.html"
}, _(() => !!e.falseLabel)), {
inputId: h,
isLabeledByFormItem: p,
isChecked: s,
isDisabled: f,
isFocused: i,
checkboxButtonSize: u,
checkboxSize: l,
hasOwnLabel: c,
model: r,
actualValue: d,
handleChange: v,
onClickRoot: m
};
}, jte = Z({
name: "ElCheckbox"
}), Hte = /* @__PURE__ */ Z({
...jte,
props: OE,
emits: PE,
setup(e) {
const t = e, n = ho(), {
inputId: r,
isLabeledByFormItem: o,
isChecked: a,
isDisabled: i,
isFocused: s,
checkboxSize: u,
hasOwnLabel: l,
model: c,
actualValue: d,
handleChange: f,
onClickRoot: h
} = $E(t, n), p = wt("checkbox"), v = _(() => [
p.b(),
p.m(u.value),
p.is("disabled", i.value),
p.is("bordered", t.border),
p.is("checked", a.value)
]), m = _(() => [
p.e("input"),
p.is("disabled", i.value),
p.is("checked", a.value),
p.is("indeterminate", t.indeterminate),
p.is("focus", s.value)
]);
return (g, b) => (T(), ie(_t(!y(l) && y(o) ? "span" : "label"), {
class: W(y(v)),
"aria-controls": g.indeterminate ? g.ariaControls : null,
onClick: y(h)
}, {
default: G(() => {
var x, w, C, k;
return [
Y("span", {
class: W(y(m))
}, [
g.trueValue || g.falseValue || g.trueLabel || g.falseLabel ? tt((T(), B("input", {
key: 0,
id: y(r),
"onUpdate:modelValue": (E) => Vn(c) ? c.value = E : null,
class: W(y(p).e("original")),
type: "checkbox",
indeterminate: g.indeterminate,
name: g.name,
tabindex: g.tabindex,
disabled: y(i),
"true-value": (w = (x = g.trueValue) != null ? x : g.trueLabel) != null ? w : !0,
"false-value": (k = (C = g.falseValue) != null ? C : g.falseLabel) != null ? k : !1,
onChange: y(f),
onFocus: (E) => s.value = !0,
onBlur: (E) => s.value = !1,
onClick: it(() => {
}, ["stop"])
}, null, 42, ["id", "onUpdate:modelValue", "indeterminate", "name", "tabindex", "disabled", "true-value", "false-value", "onChange", "onFocus", "onBlur", "onClick"])), [
[ci, y(c)]
]) : tt((T(), B("input", {
key: 1,
id: y(r),
"onUpdate:modelValue": (E) => Vn(c) ? c.value = E : null,
class: W(y(p).e("original")),
type: "checkbox",
indeterminate: g.indeterminate,
disabled: y(i),
value: y(d),
name: g.name,
tabindex: g.tabindex,
onChange: y(f),
onFocus: (E) => s.value = !0,
onBlur: (E) => s.value = !1,
onClick: it(() => {
}, ["stop"])
}, null, 42, ["id", "onUpdate:modelValue", "indeterminate", "disabled", "value", "name", "tabindex", "onChange", "onFocus", "onBlur", "onClick"])), [
[ci, y(c)]
]),
Y("span", {
class: W(y(p).e("inner"))
}, null, 2)
], 2),
y(l) ? (T(), B("span", {
key: 0,
class: W(y(p).e("label"))
}, [
ve(g.$slots, "default"),
g.$slots.default ? ne("v-if", !0) : (T(), B(Qe, { key: 0 }, [
Ke(Te(g.label), 1)
], 64))
], 2)) : ne("v-if", !0)
];
}),
_: 3
}, 8, ["class", "aria-controls", "onClick"]));
}
});
var Ute = /* @__PURE__ */ bt(Hte, [["__file", "checkbox.vue"]]);
const qte = Z({
name: "ElCheckboxButton"
}), Wte = /* @__PURE__ */ Z({
...qte,
props: OE,
emits: PE,
setup(e) {
const t = e, n = ho(), {
isFocused: r,
isChecked: o,
isDisabled: a,
checkboxButtonSize: i,
model: s,
actualValue: u,
handleChange: l
} = $E(t, n), c = $e(Wl, void 0), d = wt("checkbox"), f = _(() => {
var p, v, m, g;
const b = (v = (p = c == null ? void 0 : c.fill) == null ? void 0 : p.value) != null ? v : "";
return {
backgroundColor: b,
borderColor: b,
color: (g = (m = c == null ? void 0 : c.textColor) == null ? void 0 : m.value) != null ? g : "",
boxShadow: b ? `-1px 0 0 0 ${b}` : void 0
};
}), h = _(() => [
d.b("button"),
d.bm("button", i.value),
d.is("disabled", a.value),
d.is("checked", o.value),
d.is("focus", r.value)
]);
return (p, v) => {
var m, g, b, x;
return T(), B("label", {
class: W(y(h))
}, [
p.trueValue || p.falseValue || p.trueLabel || p.falseLabel ? tt((T(), B("input", {
key: 0,
"onUpdate:modelValue": (w) => Vn(s) ? s.value = w : null,
class: W(y(d).be("button", "original")),
type: "checkbox",
name: p.name,
tabindex: p.tabindex,
disabled: y(a),
"true-value": (g = (m = p.trueValue) != null ? m : p.trueLabel) != null ? g : !0,
"false-value": (x = (b = p.falseValue) != null ? b : p.falseLabel) != null ? x : !1,
onChange: y(l),
onFocus: (w) => r.value = !0,
onBlur: (w) => r.value = !1,
onClick: it(() => {
}, ["stop"])
}, null, 42, ["onUpdate:modelValue", "name", "tabindex", "disabled", "true-value", "false-value", "onChange", "onFocus", "onBlur", "onClick"])), [
[ci, y(s)]
]) : tt((T(), B("input", {
key: 1,
"onUpdate:modelValue": (w) => Vn(s) ? s.value = w : null,
class: W(y(d).be("button", "original")),
type: "checkbox",
name: p.name,
tabindex: p.tabindex,
disabled: y(a),
value: y(u),
onChange: y(l),
onFocus: (w) => r.value = !0,
onBlur: (w) => r.value = !1,
onClick: it(() => {
}, ["stop"])
}, null, 42, ["onUpdate:modelValue", "name", "tabindex", "disabled", "value", "onChange", "onFocus", "onBlur", "onClick"])), [
[ci, y(s)]
]),
p.$slots.default || p.label ? (T(), B("span", {
key: 2,
class: W(y(d).be("button", "inner")),
style: lt(y(o) ? y(f) : void 0)
}, [
ve(p.$slots, "default", {}, () => [
Ke(Te(p.label), 1)
])
], 6)) : ne("v-if", !0)
], 2);
};
}
});
var AE = /* @__PURE__ */ bt(Wte, [["__file", "checkbox-button.vue"]]);
const Kte = zt({
modelValue: {
type: ut(Array),
default: () => []
},
disabled: Boolean,
min: Number,
max: Number,
size: ql,
fill: String,
textColor: String,
tag: {
type: String,
default: "div"
},
validateEvent: {
type: Boolean,
default: !0
},
...Pi(["ariaLabel"])
}), Gte = {
[Kn]: (e) => Tr(e),
change: (e) => Tr(e)
}, Xte = Z({
name: "ElCheckboxGroup"
}), Yte = /* @__PURE__ */ Z({
...Xte,
props: Kte,
emits: Gte,
setup(e, { emit: t }) {
const n = e, r = wt("checkbox"), { formItem: o } = As(), { inputId: a, isLabeledByFormItem: i } = Gc(n, {
formItemContext: o
}), s = async (l) => {
t(Kn, l), await Ge(), t("change", l);
}, u = _({
get() {
return n.modelValue;
},
set(l) {
s(l);
}
});
return ft(Wl, {
...V4(vo(n), [
"size",
"min",
"max",
"disabled",
"validateEvent",
"fill",
"textColor"
]),
modelValue: u,
changeEvent: s
}), me(() => n.modelValue, () => {
n.validateEvent && (o == null || o.validate("change").catch((l) => Tn(l)));
}), (l, c) => {
var d;
return T(), ie(_t(l.tag), {
id: y(a),
class: W(y(r).b("group")),
role: "group",
"aria-label": y(i) ? void 0 : l.ariaLabel || "checkbox-group",
"aria-labelledby": y(i) ? (d = y(o)) == null ? void 0 : d.labelId : void 0
}, {
default: G(() => [
ve(l.$slots, "default")
]),
_: 3
}, 8, ["id", "class", "aria-label", "aria-labelledby"]);
};
}
});
var FE = /* @__PURE__ */ bt(Yte, [["__file", "checkbox-group.vue"]]);
const Zte = jn(Ute, {
CheckboxButton: AE,
CheckboxGroup: FE
});
Na(AE);
Na(FE);
const A0 = zt({
type: {
type: String,
values: ["primary", "success", "info", "warning", "danger"],
default: "primary"
},
closable: Boolean,
disableTransitions: Boolean,
hit: Boolean,
color: String,
size: {
type: String,
values: W4
},
effect: {
type: String,
values: ["dark", "light", "plain"],
default: "light"
},
round: Boolean
}), Jte = {
close: (e) => e instanceof MouseEvent,
click: (e) => e instanceof MouseEvent
}, Qte = Z({
name: "ElTag"
}), ene = /* @__PURE__ */ Z({
...Qte,
props: A0,
emits: Jte,
setup(e, { emit: t }) {
const n = e, r = vs(), o = wt("tag"), a = _(() => {
const { type: l, hit: c, effect: d, closable: f, round: h } = n;
return [
o.b(),
o.is("closable", f),
o.m(l || "primary"),
o.m(r.value),
o.m(d),
o.is("hit", c),
o.is("round", h)
];
}), i = (l) => {
t("close", l);
}, s = (l) => {
t("click", l);
}, u = (l) => {
l.component.subTree.component.bum = null;
};
return (l, c) => l.disableTransitions ? (T(), B("span", {
key: 0,
class: W(y(a)),
style: lt({ backgroundColor: l.color }),
onClick: s
}, [
Y("span", {
class: W(y(o).e("content"))
}, [
ve(l.$slots, "default")
], 2),
l.closable ? (T(), ie(y(lr), {
key: 0,
class: W(y(o).e("close")),
onClick: it(i, ["stop"])
}, {
default: G(() => [
ee(y(Yp))
]),
_: 1
}, 8, ["class", "onClick"])) : ne("v-if", !0)
], 6)) : (T(), ie(Kr, {
key: 1,
name: `${y(o).namespace.value}-zoom-in-center`,
appear: "",
onVnodeMounted: u
}, {
default: G(() => [
Y("span", {
class: W(y(a)),
style: lt({ backgroundColor: l.color }),
onClick: s
}, [
Y("span", {
class: W(y(o).e("content"))
}, [
ve(l.$slots, "default")
], 2),
l.closable ? (T(), ie(y(lr), {
key: 0,
class: W(y(o).e("close")),
onClick: it(i, ["stop"])
}, {
default: G(() => [
ee(y(Yp))
]),
_: 1
}, 8, ["class", "onClick"])) : ne("v-if", !0)
], 6)
]),
_: 3
}, 8, ["name"]));
}
});
var tne = /* @__PURE__ */ bt(ene, [["__file", "tag.vue"]]);
const nne = jn(tne), IE = Symbol("rowContextKey"), rne = [
"start",
"center",
"end",
"space-around",
"space-between",
"space-evenly"
], one = ["top", "middle", "bottom"], ane = zt({
tag: {
type: String,
default: "div"
},
gutter: {
type: Number,
default: 0
},
justify: {
type: String,
values: rne,
default: "start"
},
align: {
type: String,
values: one
}
}), ine = Z({
name: "ElRow"
}), sne = /* @__PURE__ */ Z({
...ine,
props: ane,
setup(e) {
const t = e, n = wt("row"), r = _(() => t.gutter);
ft(IE, {
gutter: r
});
const o = _(() => {
const i = {};
return t.gutter && (i.marginRight = i.marginLeft = `-${t.gutter / 2}px`), i;
}), a = _(() => [
n.b(),
n.is(`justify-${t.justify}`, t.justify !== "start"),
n.is(`align-${t.align}`, !!t.align)
]);
return (i, s) => (T(), ie(_t(i.tag), {
class: W(y(a)),
style: lt(y(o))
}, {
default: G(() => [
ve(i.$slots, "default")
]),
_: 3
}, 8, ["class", "style"]));
}
});
var lne = /* @__PURE__ */ bt(sne, [["__file", "row.vue"]]);
const NE = jn(lne), une = zt({
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: ut([Number, Object]),
default: () => Js({})
},
sm: {
type: ut([Number, Object]),
default: () => Js({})
},
md: {
type: ut([Number, Object]),
default: () => Js({})
},
lg: {
type: ut([Number, Object]),
default: () => Js({})
},
xl: {
type: ut([Number, Object]),
default: () => Js({})
}
}), cne = Z({
name: "ElCol"
}), dne = /* @__PURE__ */ Z({
...cne,
props: une,
setup(e) {
const t = e, { gutter: n } = $e(IE, { gutter: _(() => 0) }), r = wt("col"), o = _(() => {
const i = {};
return n.value && (i.paddingLeft = i.paddingRight = `${n.value / 2}px`), i;
}), a = _(() => {
const i = [];
return ["span", "offset", "pull", "push"].forEach((s) => {
const u = t[s];
Xn(u) && (s === "span" ? i.push(r.b(`${t[s]}`)) : u > 0 && i.push(r.b(`${s}-${t[s]}`)));
}), ["xs", "sm", "md", "lg", "xl"].forEach((s) => {
Xn(t[s]) ? i.push(r.b(`${s}-${t[s]}`)) : Gn(t[s]) && Object.entries(t[s]).forEach(([u, l]) => {
i.push(u !== "span" ? r.b(`${s}-${u}-${l}`) : r.b(`${s}-${l}`));
});
}), n.value && i.push(r.is("guttered")), [r.b(), i];
});
return (i, s) => (T(), ie(_t(i.tag), {
class: W(y(a)),
style: lt(y(o))
}, {
default: G(() => [
ve(i.$slots, "default")
]),
_: 3
}, 8, ["class", "style"]));
}
});
var pne = /* @__PURE__ */ bt(dne, [["__file", "col.vue"]]);
const ly = jn(pne), fne = Z({
name: "ElCollapseTransition"
}), hne = /* @__PURE__ */ Z({
...fne,
setup(e) {
const t = wt("collapse-transition"), n = (o) => {
o.style.maxHeight = "", o.style.overflow = o.dataset.oldOverflow, o.style.paddingTop = o.dataset.oldPaddingTop, o.style.paddingBottom = o.dataset.oldPaddingBottom;
}, r = {
beforeEnter(o) {
o.dataset || (o.dataset = {}), o.dataset.oldPaddingTop = o.style.paddingTop, o.dataset.oldPaddingBottom = o.style.paddingBottom, o.style.height && (o.dataset.elExistsHeight = o.style.height), o.style.maxHeight = 0, o.style.paddingTop = 0, o.style.paddingBottom = 0;
},
enter(o) {
requestAnimationFrame(() => {
o.dataset.oldOverflow = o.style.overflow, o.dataset.elExistsHeight ? o.style.maxHeight = o.dataset.elExistsHeight : o.scrollHeight !== 0 ? o.style.maxHeight = `${o.scrollHeight}px` : o.style.maxHeight = 0, o.style.paddingTop = o.dataset.oldPaddingTop, o.style.paddingBottom = o.dataset.oldPaddingBottom, o.style.overflow = "hidden";
});
},
afterEnter(o) {
o.style.maxHeight = "", o.style.overflow = o.dataset.oldOverflow;
},
enterCancelled(o) {
n(o);
},
beforeLeave(o) {
o.dataset || (o.dataset = {}), o.dataset.oldPaddingTop = o.style.paddingTop, o.dataset.oldPaddingBottom = o.style.paddingBottom, o.dataset.oldOverflow = o.style.overflow, o.style.maxHeight = `${o.scrollHeight}px`, o.style.overflow = "hidden";
},
leave(o) {
o.scrollHeight !== 0 && (o.style.maxHeight = 0, o.style.paddingTop = 0, o.style.paddingBottom = 0);
},
afterLeave(o) {
n(o);
},
leaveCancelled(o) {
n(o);
}
};
return (o, a) => (T(), ie(Kr, Xt({
name: y(t).b()
}, bT(r)), {
default: G(() => [
ve(o.$slots, "default")
]),
_: 3
}, 16, ["name"]));
}
});
var vne = /* @__PURE__ */ bt(hne, [["__file", "collapse-transition.vue"]]);
const gne = jn(vne), mne = zt({
color: {
type: ut(Object),
required: !0
},
vertical: {
type: Boolean,
default: !1
}
});
let xv = !1;
function fc(e, t) {
if (!_n)
return;
const n = function(a) {
var i;
(i = t.drag) == null || i.call(t, a);
}, r = function(a) {
var i;
document.removeEventListener("mousemove", n), document.removeEventListener("mouseup", r), document.removeEventListener("touchmove", n), document.removeEventListener("touchend", r), document.onselectstart = null, document.ondragstart = null, xv = !1, (i = t.end) == null || i.call(t, a);
}, o = function(a) {
var i;
xv || (a.preventDefault(), document.onselectstart = () => !1, document.ondragstart = () => !1, document.addEventListener("mousemove", n), document.addEventListener("mouseup", r), document.addEventListener("touchmove", n), document.addEventListener("touchend", r), xv = !0, (i = t.start) == null || i.call(t, a));
};
e.addEventListener("mousedown", o), e.addEventListener("touchstart", o, { passive: !1 });
}
const yne = (e) => {
const t = dt(), { t: n } = Uc(), r = Yn(), o = Yn(), a = _(() => e.color.get("alpha")), i = _(() => n("el.colorpicker.alphaLabel"));
function s(d) {
var f;
d.target !== r.value && u(d), (f = r.value) == null || f.focus();
}
function u(d) {
if (!o.value || !r.value)
return;
const f = t.vnode.el.getBoundingClientRect(), { clientX: h, clientY: p } = Im(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 l(d) {
const { code: f, shiftKey: h } = d, p = h ? 10 : 1;
switch (f) {
case In.left:
case In.down:
d.preventDefault(), d.stopPropagation(), c(-p);
break;
case In.right:
case In.up:
d.preventDefault(), d.stopPropagation(), c(p);
break;
}
}
function c(d) {
let f = a.value + d;
f = f < 0 ? 0 : f > 100 ? 100 : f, e.color.set("alpha", f);
}
return {
thumb: r,
bar: o,
alpha: a,
alphaLabel: i,
handleDrag: u,
handleClick: s,
handleKeydown: l
};
}, bne = (e, {
bar: t,
thumb: n,
handleDrag: r
}) => {
const o = dt(), a = wt("color-alpha-slider"), i = H(0), s = H(0), u = H();
function l() {
if (!n.value || e.vertical)
return 0;
const b = o.vnode.el, x = e.color.get("alpha");
return b ? Math.round(x * (b.offsetWidth - n.value.offsetWidth / 2) / 100) : 0;
}
function c() {
if (!n.value)
return 0;
const b = o.vnode.el;
if (!e.vertical)
return 0;
const x = e.color.get("alpha");
return b ? Math.round(x * (b.offsetHeight - n.value.offsetHeight / 2) / 100) : 0;
}
function d() {
if (e.color && e.color.value) {
const { r: b, g: x, b: w } = e.color.toRgb();
return `linear-gradient(to right, rgba(${b}, ${x}, ${w}, 0) 0%, rgba(${b}, ${x}, ${w}, 1) 100%)`;
}
return "";
}
function f() {
i.value = l(), s.value = c(), u.value = d();
}
ht(() => {
if (!t.value || !n.value)
return;
const b = {
drag: (x) => {
r(x);
},
end: (x) => {
r(x);
}
};
fc(t.value, b), fc(n.value, b), f();
}), me(() => e.color.get("alpha"), () => f()), me(() => e.color.value, () => f());
const h = _(() => [a.b(), a.is("vertical", e.vertical)]), p = _(() => a.e("bar")), v = _(() => a.e("thumb")), m = _(() => ({ background: u.value })), g = _(() => ({
left: Sl(i.value),
top: Sl(s.value)
}));
return { rootKls: h, barKls: p, barStyle: m, thumbKls: v, thumbStyle: g, update: f };
}, wne = "ElColorAlphaSlider", xne = Z({
name: wne
}), kne = /* @__PURE__ */ Z({
...xne,
props: mne,
setup(e, { expose: t }) {
const n = e, {
alpha: r,
alphaLabel: o,
bar: a,
thumb: i,
handleDrag: s,
handleClick: u,
handleKeydown: l
} = yne(n), { rootKls: c, barKls: d, barStyle: f, thumbKls: h, thumbStyle: p, update: v } = bne(n, {
bar: a,
thumb: i,
handleDrag: s
});
return t({
update: v,
bar: a,
thumb: i
}), (m, g) => (T(), B("div", {
class: W(y(c))
}, [
Y("div", {
ref_key: "bar",
ref: a,
class: W(y(d)),
style: lt(y(f)),
onClick: y(u)
}, null, 14, ["onClick"]),
Y("div", {
ref_key: "thumb",
ref: i,
class: W(y(h)),
style: lt(y(p)),
"aria-label": y(o),
"aria-valuenow": y(r),
"aria-orientation": m.vertical ? "vertical" : "horizontal",
"aria-valuemin": "0",
"aria-valuemax": "100",
role: "slider",
tabindex: "0",
onKeydown: y(l)
}, null, 46, ["aria-label", "aria-valuenow", "aria-orientation", "onKeydown"])
], 2));
}
});
var Cne = /* @__PURE__ */ bt(kne, [["__file", "alpha-slider.vue"]]);
const Ene = Z({
name: "ElColorHueSlider",
props: {
color: {
type: Object,
required: !0
},
vertical: Boolean
},
setup(e) {
const t = wt("color-hue-slider"), n = dt(), r = H(), o = H(), a = H(0), i = H(0), s = _(() => e.color.get("hue"));
me(() => s.value, () => {
f();
});
function u(h) {
h.target !== r.value && l(h);
}
function l(h) {
if (!o.value || !r.value)
return;
const p = n.vnode.el.getBoundingClientRect(), { clientX: v, clientY: m } = Im(h);
let g;
if (e.vertical) {
let b = m - p.top;
b = Math.min(b, p.height - r.value.offsetHeight / 2), b = Math.max(r.value.offsetHeight / 2, b), g = Math.round((b - r.value.offsetHeight / 2) / (p.height - r.value.offsetHeight) * 360);
} else {
let b = v - p.left;
b = Math.min(b, p.width - r.value.offsetWidth / 2), b = Math.max(r.value.offsetWidth / 2, b), g = Math.round((b - 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() {
a.value = c(), i.value = d();
}
return ht(() => {
if (!o.value || !r.value)
return;
const h = {
drag: (p) => {
l(p);
},
end: (p) => {
l(p);
}
};
fc(o.value, h), fc(r.value, h), f();
}), {
bar: o,
thumb: r,
thumbLeft: a,
thumbTop: i,
hueValue: s,
handleClick: u,
update: f,
ns: t
};
}
});
function Sne(e, t, n, r, o, a) {
return T(), B("div", {
class: W([e.ns.b(), e.ns.is("vertical", e.vertical)])
}, [
Y("div", {
ref: "bar",
class: W(e.ns.e("bar")),
onClick: e.handleClick
}, null, 10, ["onClick"]),
Y("div", {
ref: "thumb",
class: W(e.ns.e("thumb")),
style: lt({
left: e.thumbLeft + "px",
top: e.thumbTop + "px"
})
}, null, 6)
], 2);
}
var _ne = /* @__PURE__ */ bt(Ene, [["render", Sne], ["__file", "hue-slider.vue"]]);
const Tne = zt({
modelValue: String,
id: String,
showAlpha: Boolean,
colorFormat: String,
disabled: Boolean,
size: ql,
popperClass: {
type: String,
default: ""
},
tabindex: {
type: [String, Number],
default: 0
},
teleported: Er.teleported,
predefine: {
type: ut(Array)
},
validateEvent: {
type: Boolean,
default: !0
},
...Pi(["ariaLabel"])
}), One = {
[Kn]: (e) => ur(e) || ii(e),
[Um]: (e) => ur(e) || ii(e),
activeChange: (e) => ur(e) || ii(e),
focus: (e) => e instanceof FocusEvent,
blur: (e) => e instanceof FocusEvent
}, LE = Symbol("colorPickerContextKey"), Qw = function(e, t, n) {
return [
e,
t * n / ((e = (2 - t) * n) < 1 ? e : 2 - e) || 0,
e / 2
];
}, Pne = function(e) {
return typeof e == "string" && e.includes(".") && Number.parseFloat(e) === 1;
}, $ne = function(e) {
return typeof e == "string" && e.includes("%");
}, rl = function(e, t) {
Pne(e) && (e = "100%");
const n = $ne(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);
}, ex = {
10: "A",
11: "B",
12: "C",
13: "D",
14: "E",
15: "F"
}, pp = (e) => {
e = Math.min(Math.round(e), 255);
const t = Math.floor(e / 16), n = e % 16;
return `${ex[t] || t}${ex[n] || n}`;
}, tx = function({ r: e, g: t, b: n }) {
return Number.isNaN(+e) || Number.isNaN(+t) || Number.isNaN(+n) ? "" : `#${pp(e)}${pp(t)}${pp(n)}`;
}, kv = {
A: 10,
B: 11,
C: 12,
D: 13,
E: 14,
F: 15
}, Bi = function(e) {
return e.length === 2 ? (kv[e[0].toUpperCase()] || +e[0]) * 16 + (kv[e[1].toUpperCase()] || +e[1]) : kv[e[1].toUpperCase()] || +e[1];
}, Ane = function(e, t, n) {
t = t / 100, n = n / 100;
let r = t;
const o = Math.max(n, 0.01);
n *= 2, t *= n <= 1 ? n : 2 - n, r *= o <= 1 ? o : 2 - o;
const a = (n + t) / 2, i = n === 0 ? 2 * r / (o + r) : 2 * t / (n + t);
return {
h: e,
s: i * 100,
v: a * 100
};
}, nx = (e, t, n) => {
e = rl(e, 255), t = rl(t, 255), n = rl(n, 255);
const r = Math.max(e, t, n), o = Math.min(e, t, n);
let a;
const i = r, s = r - o, u = r === 0 ? 0 : s / r;
if (r === o)
a = 0;
else {
switch (r) {
case e: {
a = (t - n) / s + (t < n ? 6 : 0);
break;
}
case t: {
a = (n - e) / s + 2;
break;
}
case n: {
a = (e - t) / s + 4;
break;
}
}
a /= 6;
}
return { h: a * 360, s: u * 100, v: i * 100 };
}, mu = function(e, t, n) {
e = rl(e, 360) * 6, t = rl(t, 100), n = rl(n, 100);
const r = Math.floor(e), o = e - r, a = n * (1 - t), i = n * (1 - o * t), s = n * (1 - (1 - o) * t), u = r % 6, l = [n, i, a, a, s, n][u], c = [s, n, n, i, a, a][u], d = [a, a, s, n, n, i][u];
return {
r: Math.round(l * 255),
g: Math.round(c * 255),
b: Math.round(d * 255)
};
};
class Vu {
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)
fs(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)
fs(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 mu(this._hue, this._saturation, this._value);
}
fromString(t) {
if (!t) {
this._hue = 0, this._saturation = 100, this._value = 100, this.doOnChange();
return;
}
const n = (r, o, a) => {
this._hue = Math.max(0, Math.min(360, r)), this._saturation = Math.max(0, Math.min(100, o)), this._value = Math.max(0, Math.min(100, a)), this.doOnChange();
};
if (t.includes("hsl")) {
const r = t.replace(/hsla|hsl|\(|\)/gm, "").split(/\s|,/g).filter((o) => o !== "").map((o, a) => a > 2 ? Number.parseFloat(o) : Number.parseInt(o, 10));
if (r.length === 4 ? this._alpha = Number.parseFloat(r[3]) * 100 : r.length === 3 && (this._alpha = 100), r.length >= 3) {
const { h: o, s: a, v: i } = Ane(r[0], r[1], r[2]);
n(o, a, i);
}
} else if (t.includes("hsv")) {
const r = t.replace(/hsva|hsv|\(|\)/gm, "").split(/\s|,/g).filter((o) => o !== "").map((o, a) => a > 2 ? Number.parseFloat(o) : Number.parseInt(o, 10));
r.length === 4 ? this._alpha = Number.parseFloat(r[3]) * 100 : r.length === 3 && (this._alpha = 100), r.length >= 3 && n(r[0], r[1], r[2]);
} else if (t.includes("rgb")) {
const r = t.replace(/rgba|rgb|\(|\)/gm, "").split(/\s|,/g).filter((o) => o !== "").map((o, a) => a > 2 ? Number.parseFloat(o) : Number.parseInt(o, 10));
if (r.length === 4 ? this._alpha = Number.parseFloat(r[3]) * 100 : r.length === 3 && (this._alpha = 100), r.length >= 3) {
const { h: o, s: a, v: i } = nx(r[0], r[1], r[2]);
n(o, a, i);
}
} else if (t.includes("#")) {
const r = t.replace("#", "").trim();
if (!/^[0-9a-fA-F]{3}$|^[0-9a-fA-F]{6}$|^[0-9a-fA-F]{8}$/.test(r))
return;
let o, a, i;
r.length === 3 ? (o = Bi(r[0] + r[0]), a = Bi(r[1] + r[1]), i = Bi(r[2] + r[2])) : (r.length === 6 || r.length === 8) && (o = Bi(r.slice(0, 2)), a = Bi(r.slice(2, 4)), i = Bi(r.slice(4, 6))), r.length === 8 ? this._alpha = Bi(r.slice(6)) / 255 * 100 : (r.length === 3 || r.length === 6) && (this._alpha = 100);
const { h: s, s: u, v: l } = nx(o, a, i);
n(s, u, l);
}
}
compare(t) {
return Math.abs(t._hue - this._hue) < 2 && Math.abs(t._saturation - this._saturation) < 1 && Math.abs(t._value - this._value) < 1 && Math.abs(t._alpha - this._alpha) < 1;
}
doOnChange() {
const { _hue: t, _saturation: n, _value: r, _alpha: o, format: a } = this;
if (this.enableAlpha)
switch (a) {
case "hsl": {
const i = Qw(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 = `${tx(mu(t, n, r))}${pp(o * 255 / 100)}`;
break;
}
default: {
const { r: i, g: s, b: u } = mu(t, n, r);
this.value = `rgba(${i}, ${s}, ${u}, ${this.get("alpha") / 100})`;
}
}
else
switch (a) {
case "hsl": {
const i = Qw(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: u } = mu(t, n, r);
this.value = `rgb(${i}, ${s}, ${u})`;
break;
}
default:
this.value = tx(mu(t, n, r));
}
}
}
const Fne = Z({
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 } = $e(LE), r = H(a(e.colors, e.color));
me(() => n.value, (i) => {
const s = new Vu();
s.fromString(i), r.value.forEach((u) => {
u.selected = s.compare(u);
});
}), vf(() => {
r.value = a(e.colors, e.color);
});
function o(i) {
e.color.fromString(e.colors[i]);
}
function a(i, s) {
return i.map((u) => {
const l = new Vu();
return l.enableAlpha = e.enableAlpha, l.format = "rgba", l.fromString(u), l.selected = l.value === s.value, l;
});
}
return {
rgbaColors: r,
handleSelect: o,
ns: t
};
}
});
function Ine(e, t, n, r, o, a) {
return T(), B("div", {
class: W(e.ns.b())
}, [
Y("div", {
class: W(e.ns.e("colors"))
}, [
(T(!0), B(Qe, null, At(e.rgbaColors, (i, s) => (T(), B("div", {
key: e.colors[s],
class: W([
e.ns.e("color-selector"),
e.ns.is("alpha", i._alpha < 100),
{ selected: i.selected }
]),
onClick: (u) => e.handleSelect(s)
}, [
Y("div", {
style: lt({ backgroundColor: i.value })
}, null, 4)
], 10, ["onClick"]))), 128))
], 2)
], 2);
}
var Nne = /* @__PURE__ */ bt(Fne, [["render", Ine], ["__file", "predefine.vue"]]);
const Lne = Z({
name: "ElSlPanel",
props: {
color: {
type: Object,
required: !0
}
},
setup(e) {
const t = wt("color-svpanel"), n = dt(), r = H(0), o = H(0), a = H("hsl(0, 100%, 50%)"), i = _(() => {
const l = e.color.get("hue"), c = e.color.get("value");
return { hue: l, value: c };
});
function s() {
const l = e.color.get("saturation"), c = e.color.get("value"), d = n.vnode.el, { clientWidth: f, clientHeight: h } = d;
o.value = l * f / 100, r.value = (100 - c) * h / 100, a.value = `hsl(${e.color.get("hue")}, 100%, 50%)`;
}
function u(l) {
const c = n.vnode.el.getBoundingClientRect(), { clientX: d, clientY: f } = Im(l);
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), o.value = h, r.value = p, e.color.set({
saturation: h / c.width * 100,
value: 100 - p / c.height * 100
});
}
return me(() => i.value, () => {
s();
}), ht(() => {
fc(n.vnode.el, {
drag: (l) => {
u(l);
},
end: (l) => {
u(l);
}
}), s();
}), {
cursorTop: r,
cursorLeft: o,
background: a,
colorValue: i,
handleDrag: u,
update: s,
ns: t
};
}
});
function Dne(e, t, n, r, o, a) {
return T(), B("div", {
class: W(e.ns.b()),
style: lt({
backgroundColor: e.background
})
}, [
Y("div", {
class: W(e.ns.e("white"))
}, null, 2),
Y("div", {
class: W(e.ns.e("black"))
}, null, 2),
Y("div", {
class: W(e.ns.e("cursor")),
style: lt({
top: e.cursorTop + "px",
left: e.cursorLeft + "px"
})
}, [
Y("div")
], 6)
], 6);
}
var Rne = /* @__PURE__ */ bt(Lne, [["render", Dne], ["__file", "sv-panel.vue"]]);
const Bne = Z({
name: "ElColorPicker"
}), Mne = /* @__PURE__ */ Z({
...Bne,
props: Tne,
emits: One,
setup(e, { expose: t, emit: n }) {
const r = e, { t: o } = Uc(), a = wt("color"), { formItem: i } = As(), s = vs(), u = Kc(), { inputId: l, isLabeledByFormItem: c } = Gc(r, {
formItemContext: i
}), d = H(), f = H(), h = H(), p = H(), v = H(), m = H(), { isFocused: g, handleFocus: b, handleBlur: x } = ey(v, {
beforeFocus() {
return u.value;
},
beforeBlur(te) {
var le;
return (le = p.value) == null ? void 0 : le.isFocusInsideContent(te);
},
afterBlur() {
M(!1), q();
}
});
let w = !0;
const C = pn(new Vu({
enableAlpha: r.showAlpha,
format: r.colorFormat || "",
value: r.modelValue
})), k = H(!1), E = H(!1), S = H(""), O = _(() => !r.modelValue && !E.value ? "transparent" : N(C, r.showAlpha)), F = _(() => !r.modelValue && !E.value ? "" : C.value), $ = _(() => c.value ? void 0 : r.ariaLabel || o("el.colorpicker.defaultLabel")), A = _(() => c.value ? i == null ? void 0 : i.labelId : void 0), L = _(() => [
a.b("picker"),
a.is("disabled", u.value),
a.bm("picker", s.value),
a.is("focused", g.value)
]);
function N(te, le) {
if (!(te instanceof Vu))
throw new TypeError("color should be instance of _color Class");
const { r: Ee, g: Ne, b: je } = te.toRgb();
return le ? `rgba(${Ee}, ${Ne}, ${je}, ${te.get("alpha") / 100})` : `rgb(${Ee}, ${Ne}, ${je})`;
}
function M(te) {
k.value = te;
}
const I = z4(M, 100, { leading: !0 });
function z() {
u.value || M(!0);
}
function R() {
I(!1), q();
}
function q() {
Ge(() => {
r.modelValue ? C.fromString(r.modelValue) : (C.value = "", Ge(() => {
E.value = !1;
}));
});
}
function oe() {
u.value || I(!k.value);
}
function Q() {
C.fromString(S.value);
}
function ae() {
const te = C.value;
n(Kn, te), n("change", te), r.validateEvent && (i == null || i.validate("change").catch((le) => Tn(le))), I(!1), Ge(() => {
const le = new Vu({
enableAlpha: r.showAlpha,
format: r.colorFormat || "",
value: r.modelValue
});
C.compare(le) || q();
});
}
function pe() {
I(!1), n(Kn, null), n("change", null), r.modelValue !== null && r.validateEvent && (i == null || i.validate("change").catch((te) => Tn(te))), q();
}
function we() {
k.value && (R(), g.value && ge());
}
function ke(te) {
te.preventDefault(), te.stopPropagation(), M(!1), q();
}
function fe(te) {
switch (te.code) {
case In.enter:
case In.space:
te.preventDefault(), te.stopPropagation(), z(), m.value.focus();
break;
case In.esc:
ke(te);
break;
}
}
function ge() {
v.value.focus();
}
function J() {
v.value.blur();
}
return ht(() => {
r.modelValue && (S.value = F.value);
}), me(() => r.modelValue, (te) => {
te ? te && te !== C.value && (w = !1, C.fromString(te)) : E.value = !1;
}), me(() => [r.colorFormat, r.showAlpha], () => {
C.enableAlpha = r.showAlpha, C.format = r.colorFormat || C.format, C.doOnChange(), n(Kn, C.value);
}), me(() => F.value, (te) => {
S.value = te, w && n("activeChange", te), w = !0;
}), me(() => C.value, () => {
!r.modelValue && !E.value && (E.value = !0);
}), me(() => k.value, () => {
Ge(() => {
var te, le, Ee;
(te = d.value) == null || te.update(), (le = f.value) == null || le.update(), (Ee = h.value) == null || Ee.update();
});
}), ft(LE, {
currentColor: F
}), t({
color: C,
show: z,
hide: R,
focus: ge,
blur: J
}), (te, le) => (T(), ie(y(Xc), {
ref_key: "popper",
ref: p,
visible: k.value,
"show-arrow": !1,
"fallback-placements": ["bottom", "top", "right", "left"],
offset: 0,
"gpu-acceleration": !1,
"popper-class": [y(a).be("picker", "panel"), y(a).b("dropdown"), te.popperClass],
"stop-popper-mouse-event": !1,
effect: "light",
trigger: "click",
teleported: te.teleported,
transition: `${y(a).namespace.value}-zoom-in-top`,
persistent: "",
onHide: (Ee) => M(!1)
}, {
content: G(() => [
tt((T(), B("div", {
onKeydown: _r(ke, ["esc"])
}, [
Y("div", {
class: W(y(a).be("dropdown", "main-wrapper"))
}, [
ee(_ne, {
ref_key: "hue",
ref: d,
class: "hue-slider",
color: y(C),
vertical: ""
}, null, 8, ["color"]),
ee(Rne, {
ref_key: "sv",
ref: f,
color: y(C)
}, null, 8, ["color"])
], 2),
te.showAlpha ? (T(), ie(Cne, {
key: 0,
ref_key: "alpha",
ref: h,
color: y(C)
}, null, 8, ["color"])) : ne("v-if", !0),
te.predefine ? (T(), ie(Nne, {
key: 1,
ref: "predefine",
"enable-alpha": te.showAlpha,
color: y(C),
colors: te.predefine
}, null, 8, ["enable-alpha", "color", "colors"])) : ne("v-if", !0),
Y("div", {
class: W(y(a).be("dropdown", "btns"))
}, [
Y("span", {
class: W(y(a).be("dropdown", "value"))
}, [
ee(y(uh), {
ref_key: "inputRef",
ref: m,
modelValue: S.value,
"onUpdate:modelValue": (Ee) => S.value = Ee,
"validate-event": !1,
size: "small",
onKeyup: _r(Q, ["enter"]),
onBlur: Q
}, null, 8, ["modelValue", "onUpdate:modelValue", "onKeyup"])
], 2),
ee(y(gs), {
class: W(y(a).be("dropdown", "link-btn")),
text: "",
size: "small",
onClick: pe
}, {
default: G(() => [
Ke(Te(y(o)("el.colorpicker.clear")), 1)
]),
_: 1
}, 8, ["class"]),
ee(y(gs), {
plain: "",
size: "small",
class: W(y(a).be("dropdown", "btn")),
onClick: ae
}, {
default: G(() => [
Ke(Te(y(o)("el.colorpicker.confirm")), 1)
]),
_: 1
}, 8, ["class"])
], 2)
], 40, ["onKeydown"])), [
[y(TE), we]
])
]),
default: G(() => [
Y("div", Xt({
id: y(l),
ref_key: "triggerRef",
ref: v
}, te.$attrs, {
class: y(L),
role: "button",
"aria-label": y($),
"aria-labelledby": y(A),
"aria-description": y(o)("el.colorpicker.description", { color: te.modelValue || "" }),
"aria-disabled": y(u),
tabindex: y(u) ? -1 : te.tabindex,
onKeydown: fe,
onFocus: y(b),
onBlur: y(x)
}), [
y(u) ? (T(), B("div", {
key: 0,
class: W(y(a).be("picker", "mask"))
}, null, 2)) : ne("v-if", !0),
Y("div", {
class: W(y(a).be("picker", "trigger")),
onClick: oe
}, [
Y("span", {
class: W([y(a).be("picker", "color"), y(a).is("alpha", te.showAlpha)])
}, [
Y("span", {
class: W(y(a).be("picker", "color-inner")),
style: lt({
backgroundColor: y(O)
})
}, [
tt(ee(y(lr), {
class: W([y(a).be("picker", "icon"), y(a).is("icon-arrow-down")])
}, {
default: G(() => [
ee(y(Vm))
]),
_: 1
}, 8, ["class"]), [
[Pt, te.modelValue || E.value]
]),
tt(ee(y(lr), {
class: W([y(a).be("picker", "empty"), y(a).is("icon-close")])
}, {
default: G(() => [
ee(y(Yp))
]),
_: 1
}, 8, ["class"]), [
[Pt, !te.modelValue && !E.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 zne = /* @__PURE__ */ bt(Mne, [["__file", "color-picker.vue"]]);
jn(zne);
const Vne = Z({
name: "ElContainer"
}), jne = /* @__PURE__ */ Z({
...Vne,
props: {
direction: {
type: String
}
},
setup(e) {
const t = e, n = ho(), r = wt("container"), o = _(() => t.direction === "vertical" ? !0 : t.direction === "horizontal" ? !1 : n && n.default ? n.default().some((a) => {
const i = a.type.name;
return i === "ElHeader" || i === "ElFooter";
}) : !1);
return (a, i) => (T(), B("section", {
class: W([y(r).b(), y(r).is("vertical", y(o))])
}, [
ve(a.$slots, "default")
], 2));
}
});
var Hne = /* @__PURE__ */ bt(jne, [["__file", "container.vue"]]);
const Une = Z({
name: "ElAside"
}), qne = /* @__PURE__ */ Z({
...Une,
props: {
width: {
type: String,
default: null
}
},
setup(e) {
const t = e, n = wt("aside"), r = _(() => t.width ? n.cssVarBlock({ width: t.width }) : {});
return (o, a) => (T(), B("aside", {
class: W(y(n).b()),
style: lt(y(r))
}, [
ve(o.$slots, "default")
], 6));
}
});
var DE = /* @__PURE__ */ bt(qne, [["__file", "aside.vue"]]);
const Wne = Z({
name: "ElFooter"
}), Kne = /* @__PURE__ */ Z({
...Wne,
props: {
height: {
type: String,
default: null
}
},
setup(e) {
const t = e, n = wt("footer"), r = _(() => t.height ? n.cssVarBlock({ height: t.height }) : {});
return (o, a) => (T(), B("footer", {
class: W(y(n).b()),
style: lt(y(r))
}, [
ve(o.$slots, "default")
], 6));
}
});
var RE = /* @__PURE__ */ bt(Kne, [["__file", "footer.vue"]]);
const Gne = Z({
name: "ElHeader"
}), Xne = /* @__PURE__ */ Z({
...Gne,
props: {
height: {
type: String,
default: null
}
},
setup(e) {
const t = e, n = wt("header"), r = _(() => t.height ? n.cssVarBlock({
height: t.height
}) : {});
return (o, a) => (T(), B("header", {
class: W(y(n).b()),
style: lt(y(r))
}, [
ve(o.$slots, "default")
], 6));
}
});
var BE = /* @__PURE__ */ bt(Xne, [["__file", "header.vue"]]);
const Yne = Z({
name: "ElMain"
}), Zne = /* @__PURE__ */ Z({
...Yne,
setup(e) {
const t = wt("main");
return (n, r) => (T(), B("main", {
class: W(y(t).b())
}, [
ve(n.$slots, "default")
], 2));
}
});
var ME = /* @__PURE__ */ bt(Zne, [["__file", "main.vue"]]);
const zE = jn(Hne, {
Aside: DE,
Footer: RE,
Header: BE,
Main: ME
});
Na(DE);
Na(RE);
const VE = Na(BE), uy = Na(ME), Jne = /* @__PURE__ */ Z({
inheritAttrs: !1
});
function Qne(e, t, n, r, o, a) {
return ve(e.$slots, "default");
}
var ere = /* @__PURE__ */ bt(Jne, [["render", Qne], ["__file", "collection.vue"]]);
const tre = /* @__PURE__ */ Z({
name: "ElCollectionItem",
inheritAttrs: !1
});
function nre(e, t, n, r, o, a) {
return ve(e.$slots, "default");
}
var rre = /* @__PURE__ */ bt(tre, [["render", nre], ["__file", "collection-item.vue"]]);
const ore = "data-el-collection-item", are = (e) => {
const t = `El${e}Collection`, n = `${t}Item`, r = Symbol(t), o = Symbol(n), a = {
...ere,
name: t,
setup() {
const s = H(null), u = /* @__PURE__ */ new Map();
ft(r, {
itemMap: u,
getItems: () => {
const l = y(s);
if (!l)
return [];
const c = Array.from(l.querySelectorAll(`[${ore}]`));
return [...u.values()].sort((d, f) => c.indexOf(d.ref) - c.indexOf(f.ref));
},
collectionRef: s
});
}
}, i = {
...rre,
name: n,
setup(s, { attrs: u }) {
const l = H(null), c = $e(r, void 0);
ft(o, {
collectionItemRef: l
}), ht(() => {
const d = y(l);
d && c.itemMap.set(d, {
ref: d,
...u
});
}), Rt(() => {
const d = y(l);
c.itemMap.delete(d);
});
}
};
return {
COLLECTION_INJECTION_KEY: r,
COLLECTION_ITEM_INJECTION_KEY: o,
ElCollection: a,
ElCollectionItem: i
};
}, Cv = zt({
trigger: pc.trigger,
effect: {
...Er.effect,
default: "light"
},
type: {
type: ut(String)
},
placement: {
type: ut(String),
default: "bottom"
},
popperOptions: {
type: ut(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: ut([Number, String]),
default: 0
},
maxHeight: {
type: ut([Number, String]),
default: ""
},
popperClass: {
type: String,
default: ""
},
disabled: Boolean,
role: {
type: String,
default: "menu"
},
buttonProps: {
type: ut(Object)
},
teleported: Er.teleported
});
zt({
command: {
type: [Object, String, Number],
default: () => ({})
},
disabled: Boolean,
divided: Boolean,
textValue: String,
icon: {
type: gi
}
});
zt({
onKeydown: { type: ut(Function) }
});
are("Dropdown");
const jE = Symbol("ElSelectGroup"), Yc = Symbol("ElSelect");
function ire(e, t) {
const n = $e(Yc), r = $e(jE, { disabled: !1 }), o = _(() => c(Qa(n.props.modelValue), e.value)), a = _(() => {
var h;
if (n.props.multiple) {
const p = Qa((h = n.props.modelValue) != null ? h : []);
return !o.value && p.length >= n.props.multipleLimit && n.props.multipleLimit > 0;
} else
return !1;
}), i = _(() => e.label || (Gn(e.value) ? "" : e.value)), s = _(() => e.value || e.label || ""), u = _(() => e.disabled || t.groupDisabled || a.value), l = dt(), c = (h = [], p) => {
if (Gn(e.value)) {
const v = n.props.valueKey;
return h && h.some((m) => ui(ya(m, v)) === ya(p, v));
} else
return h && h.includes(p);
}, d = () => {
!e.disabled && !r.disabled && (n.states.hoveringIndex = n.optionsArray.indexOf(l.proxy));
}, f = (h) => {
const p = new RegExp(vZ(h), "i");
t.visible = p.test(i.value) || e.created;
};
return me(() => i.value, () => {
!e.created && !n.props.remote && n.setSelected();
}), me(() => e.value, (h, p) => {
const { remote: v, valueKey: m } = n.props;
if (h !== p && (n.onOptionDestroy(p, l.proxy), n.onOptionCreate(l.proxy)), !e.created && !v) {
if (m && Gn(h) && Gn(p) && h[m] === p[m])
return;
n.setSelected();
}
}), me(() => r.disabled, () => {
t.groupDisabled = r.disabled;
}, { immediate: !0 }), {
select: n,
currentLabel: i,
currentValue: s,
itemSelected: o,
isDisabled: u,
hoverItem: d,
updateOption: f
};
}
const sre = Z({
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 = lh(), r = _(() => [
t.be("dropdown", "item"),
t.is("disabled", y(s)),
t.is("selected", y(i)),
t.is("hovering", y(f))
]), o = pn({
index: -1,
groupDisabled: !1,
visible: !0,
hover: !1
}), {
currentLabel: a,
itemSelected: i,
isDisabled: s,
select: u,
hoverItem: l,
updateOption: c
} = ire(e, o), { visible: d, hover: f } = vo(o), h = dt().proxy;
u.onOptionCreate(h), Rt(() => {
const v = h.value, { selected: m } = u.states, g = (u.props.multiple ? m : [m]).some((b) => b.value === h.value);
Ge(() => {
u.states.cachedOptions.get(v) === h && !g && u.states.cachedOptions.delete(v);
}), u.onOptionDestroy(v, h);
});
function p() {
s.value || u.handleOptionSelect(h);
}
return {
ns: t,
id: n,
containerKls: r,
currentLabel: a,
itemSelected: i,
isDisabled: s,
select: u,
hoverItem: l,
updateOption: c,
visible: d,
hover: f,
selectOptionClick: p,
states: o
};
}
});
function lre(e, t, n, r, o, a) {
return tt((T(), B("li", {
id: e.id,
class: W(e.containerKls),
role: "option",
"aria-disabled": e.isDisabled || void 0,
"aria-selected": e.itemSelected,
onMouseenter: e.hoverItem,
onClick: it(e.selectOptionClick, ["stop"])
}, [
ve(e.$slots, "default", {}, () => [
Y("span", null, Te(e.currentLabel), 1)
])
], 42, ["id", "aria-disabled", "aria-selected", "onMouseenter", "onClick"])), [
[Pt, e.visible]
]);
}
var cy = /* @__PURE__ */ bt(sre, [["render", lre], ["__file", "option.vue"]]);
const ure = Z({
name: "ElSelectDropdown",
componentName: "ElSelectDropdown",
setup() {
const e = $e(Yc), t = wt("select"), n = _(() => e.props.popperClass), r = _(() => e.props.multiple), o = _(() => e.props.fitInputWidth), a = H("");
function i() {
var s;
a.value = `${(s = e.selectRef) == null ? void 0 : s.offsetWidth}px`;
}
return ht(() => {
i(), ga(e.selectRef, i);
}), {
ns: t,
minWidth: a,
popperClass: n,
isMultiple: r,
isFitInputWidth: o
};
}
});
function cre(e, t, n, r, o, a) {
return T(), B("div", {
class: W([e.ns.b("dropdown"), e.ns.is("multiple", e.isMultiple), e.popperClass]),
style: lt({ [e.isFitInputWidth ? "width" : "minWidth"]: e.minWidth })
}, [
e.$slots.header ? (T(), B("div", {
key: 0,
class: W(e.ns.be("dropdown", "header"))
}, [
ve(e.$slots, "header")
], 2)) : ne("v-if", !0),
ve(e.$slots, "default"),
e.$slots.footer ? (T(), B("div", {
key: 1,
class: W(e.ns.be("dropdown", "footer"))
}, [
ve(e.$slots, "footer")
], 2)) : ne("v-if", !0)
], 6);
}
var dre = /* @__PURE__ */ bt(ure, [["render", cre], ["__file", "select-dropdown.vue"]]);
const pre = 11, fre = (e, t) => {
const { t: n } = Uc(), r = lh(), o = wt("select"), a = wt("input"), i = pn({
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 = H(null), u = H(null), l = H(null), c = H(null), d = H(null), f = H(null), h = H(null), p = H(null), v = H(null), m = H(null), g = H(null), b = H(null), {
isComposing: x,
handleCompositionStart: w,
handleCompositionUpdate: C,
handleCompositionEnd: k
} = hE({
afterComposition: (K) => ce(K)
}), { wrapperRef: E, isFocused: S } = ey(d, {
beforeFocus() {
return I.value;
},
afterFocus() {
e.automaticDropdown && !O.value && (O.value = !0, i.menuVisibleOnFocus = !0);
},
beforeBlur(K) {
var he, ze;
return ((he = l.value) == null ? void 0 : he.isFocusInsideContent(K)) || ((ze = c.value) == null ? void 0 : ze.isFocusInsideContent(K));
},
afterBlur() {
O.value = !1, i.menuVisibleOnFocus = !1;
}
}), O = H(!1), F = H(), { form: $, formItem: A } = As(), { inputId: L } = Gc(e, {
formItemContext: A
}), { valueOnClear: N, isEmptyValue: M } = PQ(e), I = _(() => e.disabled || ($ == null ? void 0 : $.disabled)), z = _(() => Tr(e.modelValue) ? e.modelValue.length > 0 : !M(e.modelValue)), R = _(() => e.clearable && !I.value && i.inputHovering && z.value), q = _(() => e.remote && e.filterable && !e.remoteShowSuffix ? "" : e.suffixIcon), oe = _(() => o.is("reverse", q.value && O.value)), Q = _(() => (A == null ? void 0 : A.validateState) || ""), ae = _(() => q4[Q.value]), pe = _(() => e.remote ? 300 : 0), we = _(() => 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 && ke.value === 0 ? e.noMatchText || n("el.select.noMatch") : i.options.size === 0 ? e.noDataText || n("el.select.noData") : null), ke = _(() => fe.value.filter((K) => K.visible).length), fe = _(() => {
const K = Array.from(i.options.values()), he = [];
return i.optionValues.forEach((ze) => {
const ot = K.findIndex((yn) => yn.value === ze);
ot > -1 && he.push(K[ot]);
}), he.length >= K.length ? he : K;
}), ge = _(() => Array.from(i.cachedOptions.values())), J = _(() => {
const K = fe.value.filter((he) => !he.created).some((he) => he.currentLabel === i.inputValue);
return e.filterable && e.allowCreate && i.inputValue !== "" && !K;
}), te = () => {
e.filterable && wr(e.filterMethod) || e.filterable && e.remote && wr(e.remoteMethod) || fe.value.forEach((K) => {
var he;
(he = K.updateOption) == null || he.call(K, i.inputValue);
});
}, le = vs(), Ee = _(() => ["small"].includes(le.value) ? "small" : "default"), Ne = _({
get() {
return O.value && we.value !== !1;
},
set(K) {
O.value = K;
}
}), je = _(() => {
if (e.multiple && !ri(e.modelValue))
return Qa(e.modelValue).length === 0 && !i.inputValue;
const K = Tr(e.modelValue) ? e.modelValue[0] : e.modelValue;
return e.filterable || ri(K) ? !i.inputValue : !0;
}), _e = _(() => {
var K;
const he = (K = e.placeholder) != null ? K : n("el.select.placeholder");
return e.multiple || !z.value ? he : i.selectedLabel;
}), De = _(() => b0 ? null : "mouseenter");
me(() => e.modelValue, (K, he) => {
e.multiple && e.filterable && !e.reserveKeyword && (i.inputValue = "", Ae("")), Ue(), !Gp(K, he) && e.validateEvent && (A == null || A.validate("change").catch((ze) => Tn(ze)));
}, {
flush: "post",
deep: !0
}), me(() => O.value, (K) => {
K ? Ae(i.inputValue) : (i.inputValue = "", i.previousQuery = null, i.isBeforeHide = !0), t("visible-change", K);
}), me(() => i.options.entries(), () => {
var K;
if (!_n)
return;
const he = ((K = s.value) == null ? void 0 : K.querySelectorAll("input")) || [];
(!e.filterable && !e.defaultFirstOption && !ri(e.modelValue) || !Array.from(he).includes(document.activeElement)) && Ue(), e.defaultFirstOption && (e.filterable || e.remote) && ke.value && Be();
}, {
flush: "post"
}), me(() => i.hoveringIndex, (K) => {
Xn(K) && K > -1 ? F.value = fe.value[K] || {} : F.value = {}, fe.value.forEach((he) => {
he.hover = F.value === he;
});
}), vf(() => {
i.isBeforeHide || te();
});
const Ae = (K) => {
i.previousQuery === K || x.value || (i.previousQuery = K, e.filterable && wr(e.filterMethod) ? e.filterMethod(K) : e.filterable && e.remote && wr(e.remoteMethod) && e.remoteMethod(K), e.defaultFirstOption && (e.filterable || e.remote) && ke.value ? Ge(Be) : Ge(Me));
}, Be = () => {
const K = fe.value.filter((ot) => ot.visible && !ot.disabled && !ot.states.groupDisabled), he = K.find((ot) => ot.created), ze = K[0];
i.hoveringIndex = Se(fe.value, he || ze);
}, Ue = () => {
if (e.multiple)
i.selectedLabel = "";
else {
const he = Tr(e.modelValue) ? e.modelValue[0] : e.modelValue, ze = Ze(he);
i.selectedLabel = ze.currentLabel, i.selected = [ze];
return;
}
const K = [];
ri(e.modelValue) || Qa(e.modelValue).forEach((he) => {
K.push(Ze(he));
}), i.selected = K;
}, Ze = (K) => {
let he;
const ze = cv(K).toLowerCase() === "object", ot = cv(K).toLowerCase() === "null", yn = cv(K).toLowerCase() === "undefined";
for (let ir = i.cachedOptions.size - 1; ir >= 0; ir--) {
const kn = ge.value[ir];
if (ze ? ya(kn.value, e.valueKey) === ya(K, e.valueKey) : kn.value === K) {
he = {
value: K,
currentLabel: kn.currentLabel,
get isDisabled() {
return kn.isDisabled;
}
};
break;
}
}
if (he)
return he;
const qn = ze ? K.label : !ot && !yn ? K : "";
return {
value: K,
currentLabel: qn
};
}, Me = () => {
i.hoveringIndex = fe.value.findIndex((K) => i.selected.some((he) => mn(he) === mn(K)));
}, rt = () => {
i.selectionWidth = u.value.getBoundingClientRect().width;
}, nt = () => {
i.calculatorWidth = f.value.getBoundingClientRect().width;
}, st = () => {
i.collapseItemWidth = g.value.getBoundingClientRect().width;
}, P = () => {
var K, he;
(he = (K = l.value) == null ? void 0 : K.updatePopper) == null || he.call(K);
}, j = () => {
var K, he;
(he = (K = c.value) == null ? void 0 : K.updatePopper) == null || he.call(K);
}, se = () => {
i.inputValue.length > 0 && !O.value && (O.value = !0), Ae(i.inputValue);
}, ce = (K) => {
if (i.inputValue = K.target.value, e.remote)
de();
else
return se();
}, de = z4(() => {
se();
}, pe.value), Oe = (K) => {
Gp(e.modelValue, K) || t(Um, K);
}, ye = (K) => uZ(K, (he) => !i.disabledOptions.has(he)), Fe = (K) => {
if (e.multiple && K.code !== In.delete && K.target.value.length <= 0) {
const he = Qa(e.modelValue).slice(), ze = ye(he);
if (ze < 0)
return;
const ot = he[ze];
he.splice(ze, 1), t(Kn, he), Oe(he), t("remove-tag", ot);
}
}, Ye = (K, he) => {
const ze = i.selected.indexOf(he);
if (ze > -1 && !I.value) {
const ot = Qa(e.modelValue).slice();
ot.splice(ze, 1), t(Kn, ot), Oe(ot), t("remove-tag", he.value);
}
K.stopPropagation(), Vt();
}, Je = (K) => {
K.stopPropagation();
const he = e.multiple ? [] : N.value;
if (e.multiple)
for (const ze of i.selected)
ze.isDisabled && he.push(ze.value);
t(Kn, he), Oe(he), i.hoveringIndex = -1, O.value = !1, t("clear"), Vt();
}, re = (K) => {
var he;
if (e.multiple) {
const ze = Qa((he = e.modelValue) != null ? he : []).slice(), ot = Se(ze, K.value);
ot > -1 ? ze.splice(ot, 1) : (e.multipleLimit <= 0 || ze.length < e.multipleLimit) && ze.push(K.value), t(Kn, ze), Oe(ze), K.created && Ae(""), e.filterable && !e.reserveKeyword && (i.inputValue = "");
} else
t(Kn, K.value), Oe(K.value), O.value = !1;
Vt(), !O.value && Ge(() => {
be(K);
});
}, Se = (K = [], he) => {
if (!Gn(he))
return K.indexOf(he);
const ze = e.valueKey;
let ot = -1;
return K.some((yn, qn) => ui(ya(yn, ze)) === ya(he, ze) ? (ot = qn, !0) : !1), ot;
}, be = (K) => {
var he, ze, ot, yn, qn;
const ir = Tr(K) ? K[0] : K;
let kn = null;
if (ir != null && ir.value) {
const un = fe.value.filter((Vo) => Vo.value === ir.value);
un.length > 0 && (kn = un[0].$el);
}
if (l.value && kn) {
const un = (yn = (ot = (ze = (he = l.value) == null ? void 0 : he.popperRef) == null ? void 0 : ze.contentRef) == null ? void 0 : ot.querySelector) == null ? void 0 : yn.call(ot, `.${o.be("dropdown", "wrap")}`);
un && yZ(un, kn);
}
(qn = b.value) == null || qn.handleScroll();
}, Le = (K) => {
i.options.set(K.value, K), i.cachedOptions.set(K.value, K), K.disabled && i.disabledOptions.set(K.value, K);
}, Tt = (K, he) => {
i.options.get(K) === he && i.options.delete(K);
}, Ct = _(() => {
var K, he;
return (he = (K = l.value) == null ? void 0 : K.popperRef) == null ? void 0 : he.contentRef;
}), Dt = () => {
i.isBeforeHide = !1, Ge(() => be(i.selected));
}, Vt = () => {
var K;
(K = d.value) == null || K.focus();
}, qt = () => {
var K;
(K = d.value) == null || K.blur();
}, bn = (K) => {
Je(K);
}, an = () => {
O.value = !1, S.value && qt();
}, sn = () => {
i.inputValue.length > 0 ? i.inputValue = "" : O.value = !1;
}, wn = () => {
I.value || (b0 && (i.inputHovering = !0), i.menuVisibleOnFocus ? i.menuVisibleOnFocus = !1 : O.value = !O.value);
}, xn = () => {
O.value ? fe.value[i.hoveringIndex] && re(fe.value[i.hoveringIndex]) : wn();
}, mn = (K) => Gn(K.value) ? ya(K.value, e.valueKey) : K.value, or = _(() => fe.value.filter((K) => K.visible).every((K) => K.disabled)), Hn = _(() => e.multiple ? e.collapseTags ? i.selected.slice(0, e.maxCollapseTags) : i.selected : []), Un = _(() => e.multiple ? e.collapseTags ? i.selected.slice(e.maxCollapseTags) : [] : []), Wt = (K) => {
if (!O.value) {
O.value = !0;
return;
}
if (!(i.options.size === 0 || i.filteredOptionsCount === 0 || x.value) && !or.value) {
K === "next" ? (i.hoveringIndex++, i.hoveringIndex === i.options.size && (i.hoveringIndex = 0)) : K === "prev" && (i.hoveringIndex--, i.hoveringIndex < 0 && (i.hoveringIndex = i.options.size - 1));
const he = fe.value[i.hoveringIndex];
(he.disabled === !0 || he.states.groupDisabled === !0 || !he.visible) && Wt(K), Ge(() => be(F.value));
}
}, ln = () => {
if (!u.value)
return 0;
const K = window.getComputedStyle(u.value);
return Number.parseFloat(K.gap || "6px");
}, fn = _(() => {
const K = ln();
return { maxWidth: `${g.value && e.maxCollapseTags === 1 ? i.selectionWidth - i.collapseItemWidth - K : i.selectionWidth}px` };
}), ar = _(() => ({ maxWidth: `${i.selectionWidth}px` })), zo = _(() => ({
width: `${Math.max(i.calculatorWidth, pre)}px`
}));
return ga(u, rt), ga(f, nt), ga(v, P), ga(E, P), ga(m, j), ga(g, st), ht(() => {
Ue();
}), {
inputId: L,
contentId: r,
nsSelect: o,
nsInput: a,
states: i,
isFocused: S,
expanded: O,
optionsArray: fe,
hoverOption: F,
selectSize: le,
filteredOptionsCount: ke,
resetCalculatorWidth: nt,
updateTooltip: P,
updateTagTooltip: j,
debouncedOnInputChange: de,
onInput: ce,
deletePrevTag: Fe,
deleteTag: Ye,
deleteSelected: Je,
handleOptionSelect: re,
scrollToOption: be,
hasModelValue: z,
shouldShowPlaceholder: je,
currentPlaceholder: _e,
mouseEnterEventName: De,
showClose: R,
iconComponent: q,
iconReverse: oe,
validateState: Q,
validateIcon: ae,
showNewOption: J,
updateOptions: te,
collapseTagSize: Ee,
setSelected: Ue,
selectDisabled: I,
emptyText: we,
handleCompositionStart: w,
handleCompositionUpdate: C,
handleCompositionEnd: k,
onOptionCreate: Le,
onOptionDestroy: Tt,
handleMenuEnter: Dt,
focus: Vt,
blur: qt,
handleClearClick: bn,
handleClickOutside: an,
handleEsc: sn,
toggleMenu: wn,
selectOption: xn,
getValueKey: mn,
navigateOptions: Wt,
dropdownMenuVisible: Ne,
showTagList: Hn,
collapseTagList: Un,
tagStyle: fn,
collapseTagStyle: ar,
inputStyle: zo,
popperRef: Ct,
inputRef: d,
tooltipRef: l,
tagTooltipRef: c,
calculatorRef: f,
prefixRef: h,
suffixRef: p,
selectRef: s,
wrapperRef: E,
selectionRef: u,
scrollbarRef: b,
menuRef: v,
tagMenuRef: m,
collapseItemRef: g
};
};
var hre = Z({
name: "ElOptions",
setup(e, { slots: t }) {
const n = $e(Yc);
let r = [];
return () => {
var o, a;
const i = (o = t.default) == null ? void 0 : o.call(t), s = [];
function u(l) {
Tr(l) && l.forEach((c) => {
var d, f, h, p;
const v = (d = (c == null ? void 0 : c.type) || {}) == null ? void 0 : d.name;
v === "ElOptionGroup" ? u(!ur(c.children) && !Tr(c.children) && wr((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) : Tr(c.children) && u(c.children);
});
}
return i.length && u((a = i[0]) == null ? void 0 : a.children), Gp(s, r) || (r = s, n && (n.states.optionValues = s)), i;
};
}
});
const vre = zt({
name: String,
id: String,
modelValue: {
type: [Array, String, Number, Boolean, Object],
default: void 0
},
autocomplete: {
type: String,
default: "off"
},
automaticDropdown: Boolean,
size: ql,
effect: {
type: ut(String),
default: "light"
},
disabled: Boolean,
clearable: Boolean,
filterable: Boolean,
allowCreate: Boolean,
loading: Boolean,
popperClass: {
type: String,
default: ""
},
popperOptions: {
type: ut(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: Er.teleported,
persistent: {
type: Boolean,
default: !0
},
clearIcon: {
type: gi,
default: jm
},
fitInputWidth: Boolean,
suffixIcon: {
type: gi,
default: Vm
},
tagType: { ...A0.type, default: "info" },
tagEffect: { ...A0.effect, default: "light" },
validateEvent: {
type: Boolean,
default: !0
},
remoteShowSuffix: Boolean,
placement: {
type: ut(String),
values: ih,
default: "bottom-start"
},
fallbackPlacements: {
type: ut(Array),
default: ["bottom-start", "top-start", "right", "left"]
},
appendTo: String,
...OQ,
...Pi(["ariaLabel"])
}), rx = "ElSelect", gre = Z({
name: rx,
componentName: rx,
components: {
ElSelectMenu: dre,
ElOption: cy,
ElOptions: hre,
ElTag: nne,
ElScrollbar: aee,
ElTooltip: Xc,
ElIcon: lr
},
directives: { ClickOutside: TE },
props: vre,
emits: [
Kn,
Um,
"remove-tag",
"clear",
"visible-change",
"focus",
"blur"
],
setup(e, { emit: t }) {
const n = _(() => {
const { modelValue: a, multiple: i } = e, s = i ? [] : void 0;
return Tr(a) ? i ? a : s : i ? s : a;
}), r = pn({
...vo(e),
modelValue: n
}), o = fre(r, t);
return ft(Yc, pn({
props: r,
states: o.states,
optionsArray: o.optionsArray,
handleOptionSelect: o.handleOptionSelect,
onOptionCreate: o.onOptionCreate,
onOptionDestroy: o.onOptionDestroy,
selectRef: o.selectRef,
setSelected: o.setSelected
})), {
...o,
modelValue: n
};
}
});
function mre(e, t, n, r, o, a) {
const i = Et("el-tag"), s = Et("el-tooltip"), u = Et("el-icon"), l = Et("el-option"), c = Et("el-options"), d = Et("el-scrollbar"), f = Et("el-select-menu"), h = $k("click-outside");
return tt((T(), B("div", {
ref: "selectRef",
class: W([e.nsSelect.b(), e.nsSelect.m(e.selectSize)]),
[Ak(e.mouseEnterEventName)]: (p) => e.states.inputHovering = !0,
onMouseleave: (p) => e.states.inputHovering = !1
}, [
ee(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: G(() => {
var p;
return [
Y("div", {
ref: "wrapperRef",
class: W([
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: it(e.toggleMenu, ["prevent"])
}, [
e.$slots.prefix ? (T(), B("div", {
key: 0,
ref: "prefixRef",
class: W(e.nsSelect.e("prefix"))
}, [
ve(e.$slots, "prefix")
], 2)) : ne("v-if", !0),
Y("div", {
ref: "selectionRef",
class: W([
e.nsSelect.e("selection"),
e.nsSelect.is("near", e.multiple && !e.$slots.prefix && !!e.states.selected.length)
])
}, [
e.multiple ? ve(e.$slots, "tag", { key: 0 }, () => [
(T(!0), B(Qe, null, At(e.showTagList, (v) => (T(), B("div", {
key: e.getValueKey(v),
class: W(e.nsSelect.e("selected-item"))
}, [
ee(i, {
closable: !e.selectDisabled && !v.isDisabled,
size: e.collapseTagSize,
type: e.tagType,
effect: e.tagEffect,
"disable-transitions": "",
style: lt(e.tagStyle),
onClose: (m) => e.deleteTag(m, v)
}, {
default: G(() => [
Y("span", {
class: W(e.nsSelect.e("tags-text"))
}, [
ve(e.$slots, "label", {
label: v.currentLabel,
value: v.value
}, () => [
Ke(Te(v.currentLabel), 1)
])
], 2)
]),
_: 2
}, 1032, ["closable", "size", "type", "effect", "style", "onClose"])
], 2))), 128)),
e.collapseTags && e.states.selected.length > e.maxCollapseTags ? (T(), ie(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: G(() => [
Y("div", {
ref: "collapseItemRef",
class: W(e.nsSelect.e("selected-item"))
}, [
ee(i, {
closable: !1,
size: e.collapseTagSize,
type: e.tagType,
effect: e.tagEffect,
"disable-transitions": "",
style: lt(e.collapseTagStyle)
}, {
default: G(() => [
Y("span", {
class: W(e.nsSelect.e("tags-text"))
}, " + " + Te(e.states.selected.length - e.maxCollapseTags), 3)
]),
_: 1
}, 8, ["size", "type", "effect", "style"])
], 2)
]),
content: G(() => [
Y("div", {
ref: "tagMenuRef",
class: W(e.nsSelect.e("selection"))
}, [
(T(!0), B(Qe, null, At(e.collapseTagList, (v) => (T(), B("div", {
key: e.getValueKey(v),
class: W(e.nsSelect.e("selected-item"))
}, [
ee(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: G(() => [
Y("span", {
class: W(e.nsSelect.e("tags-text"))
}, [
ve(e.$slots, "label", {
label: v.currentLabel,
value: v.value
}, () => [
Ke(Te(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) : (T(), B("div", {
key: 1,
class: W([
e.nsSelect.e("selected-item"),
e.nsSelect.e("input-wrapper"),
e.nsSelect.is("hidden", !e.filterable)
])
}, [
tt(Y("input", {
id: e.inputId,
ref: "inputRef",
"onUpdate:modelValue": (v) => e.states.inputValue = v,
type: "text",
name: e.name,
class: W([e.nsSelect.e("input"), e.nsSelect.is(e.selectSize)]),
disabled: e.selectDisabled,
autocomplete: e.autocomplete,
style: lt(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: [
_r(it((v) => e.navigateOptions("next"), ["stop", "prevent"]), ["down"]),
_r(it((v) => e.navigateOptions("prev"), ["stop", "prevent"]), ["up"]),
_r(it(e.handleEsc, ["stop", "prevent"]), ["esc"]),
_r(it(e.selectOption, ["stop", "prevent"]), ["enter"]),
_r(it(e.deletePrevTag, ["stop"]), ["delete"])
],
onCompositionstart: e.handleCompositionStart,
onCompositionupdate: e.handleCompositionUpdate,
onCompositionend: e.handleCompositionEnd,
onInput: e.onInput,
onClick: it(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"]), [
[lg, e.states.inputValue]
]),
e.filterable ? (T(), B("span", {
key: 0,
ref: "calculatorRef",
"aria-hidden": "true",
class: W(e.nsSelect.e("input-calculator")),
textContent: Te(e.states.inputValue)
}, null, 10, ["textContent"])) : ne("v-if", !0)
], 2)),
e.shouldShowPlaceholder ? (T(), B("div", {
key: 2,
class: W([
e.nsSelect.e("selected-item"),
e.nsSelect.e("placeholder"),
e.nsSelect.is("transparent", !e.hasModelValue || e.expanded && !e.states.inputValue)
])
}, [
e.hasModelValue ? ve(e.$slots, "label", {
key: 0,
label: e.currentPlaceholder,
value: e.modelValue
}, () => [
Y("span", null, Te(e.currentPlaceholder), 1)
]) : (T(), B("span", { key: 1 }, Te(e.currentPlaceholder), 1))
], 2)) : ne("v-if", !0)
], 2),
Y("div", {
ref: "suffixRef",
class: W(e.nsSelect.e("suffix"))
}, [
e.iconComponent && !e.showClose ? (T(), ie(u, {
key: 0,
class: W([e.nsSelect.e("caret"), e.nsSelect.e("icon"), e.iconReverse])
}, {
default: G(() => [
(T(), ie(_t(e.iconComponent)))
]),
_: 1
}, 8, ["class"])) : ne("v-if", !0),
e.showClose && e.clearIcon ? (T(), ie(u, {
key: 1,
class: W([
e.nsSelect.e("caret"),
e.nsSelect.e("icon"),
e.nsSelect.e("clear")
]),
onClick: e.handleClearClick
}, {
default: G(() => [
(T(), ie(_t(e.clearIcon)))
]),
_: 1
}, 8, ["class", "onClick"])) : ne("v-if", !0),
e.validateState && e.validateIcon ? (T(), ie(u, {
key: 2,
class: W([e.nsInput.e("icon"), e.nsInput.e("validateIcon")])
}, {
default: G(() => [
(T(), ie(_t(e.validateIcon)))
]),
_: 1
}, 8, ["class"])) : ne("v-if", !0)
], 2)
], 10, ["onClick"])
];
}),
content: G(() => [
ee(f, { ref: "menuRef" }, {
default: G(() => [
e.$slots.header ? (T(), B("div", {
key: 0,
class: W(e.nsSelect.be("dropdown", "header")),
onClick: it(() => {
}, ["stop"])
}, [
ve(e.$slots, "header")
], 10, ["onClick"])) : ne("v-if", !0),
tt(ee(d, {
id: e.contentId,
ref: "scrollbarRef",
tag: "ul",
"wrap-class": e.nsSelect.be("dropdown", "wrap"),
"view-class": e.nsSelect.be("dropdown", "list"),
class: W([e.nsSelect.is("empty", e.filteredOptionsCount === 0)]),
role: "listbox",
"aria-label": e.ariaLabel,
"aria-orientation": "vertical"
}, {
default: G(() => [
e.showNewOption ? (T(), ie(l, {
key: 0,
value: e.states.inputValue,
created: !0
}, null, 8, ["value"])) : ne("v-if", !0),
ee(c, null, {
default: G(() => [
ve(e.$slots, "default")
]),
_: 3
})
]),
_: 3
}, 8, ["id", "wrap-class", "view-class", "class", "aria-label"]), [
[Pt, e.states.options.size > 0 && !e.loading]
]),
e.$slots.loading && e.loading ? (T(), B("div", {
key: 1,
class: W(e.nsSelect.be("dropdown", "loading"))
}, [
ve(e.$slots, "loading")
], 2)) : e.loading || e.filteredOptionsCount === 0 ? (T(), B("div", {
key: 2,
class: W(e.nsSelect.be("dropdown", "empty"))
}, [
ve(e.$slots, "empty", {}, () => [
Y("span", null, Te(e.emptyText), 1)
])
], 2)) : ne("v-if", !0),
e.$slots.footer ? (T(), B("div", {
key: 3,
class: W(e.nsSelect.be("dropdown", "footer")),
onClick: it(() => {
}, ["stop"])
}, [
ve(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 yre = /* @__PURE__ */ bt(gre, [["render", mre], ["__file", "select.vue"]]);
const bre = Z({
name: "ElOptionGroup",
componentName: "ElOptionGroup",
props: {
label: String,
disabled: Boolean
},
setup(e) {
const t = wt("select"), n = H(null), r = dt(), o = H([]);
ft(jE, pn({
...vo(e)
}));
const a = _(() => o.value.some((l) => l.visible === !0)), i = (l) => {
var c, d;
return ((c = l.type) == null ? void 0 : c.name) === "ElOption" && !!((d = l.component) != null && d.proxy);
}, s = (l) => {
const c = Qa(l), 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;
}, u = () => {
o.value = s(r.subTree);
};
return ht(() => {
u();
}), cK(n, u, {
attributes: !0,
subtree: !0,
childList: !0
}), {
groupRef: n,
visible: a,
ns: t
};
}
});
function wre(e, t, n, r, o, a) {
return tt((T(), B("ul", {
ref: "groupRef",
class: W(e.ns.be("group", "wrap"))
}, [
Y("li", {
class: W(e.ns.be("group", "title"))
}, Te(e.label), 3),
Y("li", null, [
Y("ul", {
class: W(e.ns.b("group"))
}, [
ve(e.$slots, "default")
], 2)
])
], 2)), [
[Pt, e.visible]
]);
}
var HE = /* @__PURE__ */ bt(bre, [["render", wre], ["__file", "option-group.vue"]]);
const xre = jn(yre, {
Option: cy,
OptionGroup: HE
}), kre = Na(cy);
Na(HE);
const Cre = zt({
trigger: pc.trigger,
placement: Cv.placement,
disabled: pc.disabled,
visible: Er.visible,
transition: Er.transition,
popperOptions: Cv.popperOptions,
tabindex: Cv.tabindex,
content: Er.content,
popperStyle: Er.popperStyle,
popperClass: Er.popperClass,
enterable: {
...Er.enterable,
default: !0
},
effect: {
...Er.effect,
default: "light"
},
teleported: Er.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
}
}), Ere = {
"update:visible": (e) => El(e),
"before-enter": () => !0,
"before-leave": () => !0,
"after-enter": () => !0,
"after-leave": () => !0
}, Sre = "onUpdate:visible", _re = Z({
name: "ElPopover"
}), Tre = /* @__PURE__ */ Z({
..._re,
props: Cre,
emits: Ere,
setup(e, { expose: t, emit: n }) {
const r = e, o = _(() => r[Sre]), a = wt("popover"), i = H(), s = _(() => {
var m;
return (m = y(i)) == null ? void 0 : m.popperRef;
}), u = _(() => [
{
width: Sl(r.width)
},
r.popperStyle
]), l = _(() => [a.b(), r.popperClass, { [a.m("plain")]: !!r.content }]), c = _(() => r.transition === `${a.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) => (T(), ie(y(Xc), Xt({
ref_key: "tooltipRef",
ref: i
}, m.$attrs, {
trigger: m.trigger,
placement: m.placement,
disabled: m.disabled,
visible: m.visible,
transition: m.transition,
"popper-options": m.popperOptions,
tabindex: m.tabindex,
content: m.content,
offset: m.offset,
"show-after": m.showAfter,
"hide-after": m.hideAfter,
"auto-close": m.autoClose,
"show-arrow": m.showArrow,
"aria-label": m.title,
effect: m.effect,
enterable: m.enterable,
"popper-class": y(l),
"popper-style": y(u),
teleported: m.teleported,
persistent: m.persistent,
"gpu-acceleration": y(c),
"onUpdate:visible": y(o),
onBeforeShow: f,
onBeforeHide: h,
onShow: p,
onHide: v
}), {
content: G(() => [
m.title ? (T(), B("div", {
key: 0,
class: W(y(a).e("title")),
role: "title"
}, Te(m.title), 3)) : ne("v-if", !0),
ve(m.$slots, "default", {}, () => [
Ke(Te(m.content), 1)
])
]),
default: G(() => [
m.$slots.reference ? ve(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 Ore = /* @__PURE__ */ bt(Tre, [["__file", "popover.vue"]]);
const ox = (e, t) => {
const n = t.arg || t.value, r = n == null ? void 0 : n.popperRef;
r && (r.triggerRef = e);
};
var Pre = {
mounted(e, t) {
ox(e, t);
},
updated(e, t) {
ox(e, t);
}
};
const $re = "popover", Are = JZ(Pre, $re);
jn(Ore, {
directive: Are
});
const ol = "$treeNodeId", ax = function(e, t) {
!t || t[ol] || Object.defineProperty(t, ol, {
value: e.id,
enumerable: !1,
configurable: !1,
writable: !1
});
}, dy = function(e, t) {
return e ? t[e] : t[ol];
}, F0 = (e, t, n) => {
const r = e.value.currentNode;
n();
const o = e.value.currentNode;
r !== o && t("current-change", o ? o.data : null, o);
}, I0 = (e) => {
let t = !0, n = !0, r = !0;
for (let o = 0, a = e.length; o < a; o++) {
const i = e[o];
(i.checked !== !0 || i.indeterminate) && (t = !1, i.disabled || (r = !1)), (i.checked !== !1 || i.indeterminate) && (n = !1);
}
return { all: t, none: n, allWithoutDisable: r, half: !t && !n };
}, Su = function(e) {
if (e.childNodes.length === 0 || e.loading)
return;
const { all: t, none: n, half: r } = I0(e.childNodes);
t ? (e.checked = !0, e.indeterminate = !1) : r ? (e.checked = !1, e.indeterminate = !0) : n && (e.checked = !1, e.indeterminate = !1);
const o = e.parent;
!o || o.level === 0 || e.store.checkStrictly || Su(o);
}, Dd = function(e, t) {
const n = e.store.props, r = e.data || {}, o = n[t];
if (typeof o == "function")
return o(r, e);
if (typeof o == "string")
return r[o];
if (typeof o > "u") {
const a = r[t];
return a === void 0 ? "" : a;
}
};
let Fre = 0;
class is {
constructor(t) {
this.id = Fre++, 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)
fs(t, n) && (this[n] = t[n]);
this.level = 0, this.loaded = !1, this.childNodes = [], this.loading = !1, this.parent && (this.level = this.parent.level + 1);
}
initialize() {
const t = this.store;
if (!t)
throw new Error("[Node]store is required!");
t.registerNode(this);
const n = t.props;
if (n && typeof n.isLeaf < "u") {
const a = Dd(this, "isLeaf");
typeof a == "boolean" && (this.isLeafByUser = a);
}
if (t.lazy !== !0 && this.data ? (this.setData(this.data), t.defaultExpandAll && (this.expanded = !0, this.canFocus = !0)) : this.level > 0 && t.lazy && t.defaultExpandAll && !this.isLeafByUser && this.expand(), Array.isArray(this.data) || ax(this, this.data), !this.data)
return;
const r = t.defaultExpandedKeys, o = t.key;
o && r && r.includes(this.key) && this.expand(null, t.autoExpandParent), o && t.currentNodeKey !== void 0 && this.key === t.currentNodeKey && (t.currentNode = this, t.currentNode.isCurrent = !0), t.lazy && t._initDefaultCheckedNode(this), this.updateLeafState(), this.parent && (this.level === 1 || this.parent.expanded === !0) && (this.canFocus = !0);
}
setData(t) {
Array.isArray(t) || ax(this, t), this.data = t, this.childNodes = [];
let n;
this.level === 0 && Array.isArray(this.data) ? n = this.data : n = Dd(this, "children") || [];
for (let r = 0, o = n.length; r < o; r++)
this.insertChild({ data: n[r] });
}
get label() {
return Dd(this, "label");
}
get key() {
const t = this.store.key;
return this.data ? this.data[t] : null;
}
get disabled() {
return Dd(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 is)) {
if (!r) {
const o = this.getChildren(!0);
o.includes(t.data) || (typeof n > "u" || n < 0 ? o.push(t.data) : o.splice(n, 0, t.data));
}
Object.assign(t, {
parent: this,
store: this.store
}), t = pn(new is(t)), t instanceof is && t.initialize();
}
t.level = this.level + 1, typeof n > "u" || n < 0 ? this.childNodes.push(t) : this.childNodes.splice(n, 0, t), this.updateLeafState();
}
insertBefore(t, n) {
let r;
n && (r = this.childNodes.indexOf(n)), this.insertChild(t, r);
}
insertAfter(t, n) {
let r;
n && (r = this.childNodes.indexOf(n), r !== -1 && (r += 1)), this.insertChild(t, r);
}
removeChild(t) {
const n = this.getChildren() || [], r = n.indexOf(t.data);
r > -1 && n.splice(r, 1);
const o = this.childNodes.indexOf(t);
o > -1 && (this.store && this.store.deregisterNode(t), t.parent = null, this.childNodes.splice(o, 1)), this.updateLeafState();
}
removeChildByData(t) {
let n = null;
for (let r = 0; r < this.childNodes.length; r++)
if (this.childNodes[r].data === t) {
n = this.childNodes[r];
break;
}
n && this.removeChild(n);
}
expand(t, n) {
const r = () => {
if (n) {
let o = this.parent;
for (; o.level > 0; )
o.expanded = !0, o = o.parent;
}
this.expanded = !0, t && t(), this.childNodes.forEach((o) => {
o.canFocus = !0;
});
};
this.shouldLoadData() ? this.loadData((o) => {
Array.isArray(o) && (this.checked ? this.setChecked(!0, !0) : this.store.checkStrictly || Su(this), r());
}) : r();
}
doCreateChildren(t, n = {}) {
t.forEach((r) => {
this.insertChild(Object.assign({ data: r }, n), void 0, !0);
});
}
collapse() {
this.expanded = !1, this.childNodes.forEach((t) => {
t.canFocus = !1;
});
}
shouldLoadData() {
return this.store.lazy === !0 && this.store.load && !this.loaded;
}
updateLeafState() {
if (this.store.lazy === !0 && this.loaded !== !0 && typeof this.isLeafByUser < "u") {
this.isLeaf = this.isLeafByUser;
return;
}
const t = this.childNodes;
if (!this.store.lazy || this.store.lazy === !0 && this.loaded === !0) {
this.isLeaf = !t || t.length === 0;
return;
}
this.isLeaf = !1;
}
setChecked(t, n, r, o) {
if (this.indeterminate = t === "half", this.checked = t === !0, this.store.checkStrictly)
return;
if (!(this.shouldLoadData() && !this.store.checkDescendants)) {
const { all: i, allWithoutDisable: s } = I0(this.childNodes);
!this.isLeaf && !i && s && (this.checked = !1, t = !1);
const u = () => {
if (n) {
const l = this.childNodes;
for (let f = 0, h = l.length; f < h; f++) {
const p = l[f];
o = o || t !== !1;
const v = p.disabled ? p.checked : o;
p.setChecked(v, n, !0, o);
}
const { half: c, all: d } = I0(l);
d || (this.checked = d, this.indeterminate = c);
}
};
if (this.shouldLoadData()) {
this.loadData(() => {
u(), Su(this);
}, {
checked: t !== !1
});
return;
} else
u();
}
const a = this.parent;
!a || a.level === 0 || r || Su(a);
}
getChildren(t = !1) {
if (this.level === 0)
return this.data;
const n = this.data;
if (!n)
return null;
const r = this.store.props;
let o = "children";
return r && (o = r.children || "children"), n[o] === void 0 && (n[o] = null), t && !n[o] && (n[o] = []), n[o];
}
updateChildren() {
const t = this.getChildren() || [], n = this.childNodes.map((a) => a.data), r = {}, o = [];
t.forEach((a, i) => {
const s = a[ol];
s && n.findIndex((u) => u[ol] === s) >= 0 ? r[s] = { index: i, data: a } : o.push({ index: i, data: a });
}), this.store.lazy || n.forEach((a) => {
r[a[ol]] || this.removeChildByData(a);
}), o.forEach(({ index: a, data: i }) => {
this.insertChild({ data: i }, a);
}), this.updateLeafState();
}
loadData(t, n = {}) {
if (this.store.lazy === !0 && this.store.load && !this.loaded && (!this.loading || Object.keys(n).length)) {
this.loading = !0;
const r = (a) => {
this.childNodes = [], this.doCreateChildren(a, n), this.loaded = !0, this.loading = !1, this.updateLeafState(), t && t.call(this, a);
}, o = () => {
this.loading = !1;
};
this.store.load(this, r, o);
} else
t && t.call(this);
}
eachNode(t) {
const n = [this];
for (; n.length; ) {
const r = n.shift();
n.unshift(...r.childNodes), t(r);
}
}
reInitChecked() {
this.store.checkStrictly || Su(this);
}
}
class Ire {
constructor(t) {
this.currentNode = null, this.currentNodeKey = null;
for (const n in t)
fs(t, n) && (this[n] = t[n]);
this.nodesMap = {};
}
initialize() {
if (this.root = new is({
data: this.data,
store: this
}), this.root.initialize(), this.lazy && this.load) {
const t = this.load;
t(this.root, (n) => {
this.root.doCreateChildren(n), this._initDefaultCheckedNodes();
});
} else
this._initDefaultCheckedNodes();
}
filter(t) {
const n = this.filterNodeMethod, r = this.lazy, o = function(a) {
const i = a.root ? a.root.childNodes : a.childNodes;
if (i.forEach((s) => {
s.visible = n.call(s, t, s.data, s), o(s);
}), !a.visible && i.length) {
let s = !0;
s = !i.some((u) => u.visible), a.root ? a.root.visible = s === !1 : a.visible = s === !1;
}
t && a.visible && !a.isLeaf && (!r || a.loaded) && a.expand();
};
o(this);
}
setData(t) {
t !== this.root.data ? (this.nodesMap = {}, this.root.setData(t), this._initDefaultCheckedNodes()) : this.root.updateChildren();
}
getNode(t) {
if (t instanceof is)
return t;
const n = Gn(t) ? dy(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 = Xp(n) ? this.root : this.getNode(n);
r && r.insertChild({ data: t });
}
_initDefaultCheckedNodes() {
const t = this.defaultCheckedKeys || [], n = this.nodesMap;
t.forEach((r) => {
const o = n[r];
o && o.setChecked(!0, !this.checkStrictly);
});
}
_initDefaultCheckedNode(t) {
(this.defaultCheckedKeys || []).includes(t.key) && t.setChecked(!0, !this.checkStrictly);
}
setDefaultCheckedKey(t) {
t !== this.defaultCheckedKeys && (this.defaultCheckedKeys = t, this._initDefaultCheckedNodes());
}
registerNode(t) {
const n = this.key;
!t || !t.data || (n ? t.key !== void 0 && (this.nodesMap[t.key] = t) : this.nodesMap[t.id] = t);
}
deregisterNode(t) {
!this.key || !t || !t.data || (t.childNodes.forEach((n) => {
this.deregisterNode(n);
}), delete this.nodesMap[t.key]);
}
getCheckedNodes(t = !1, n = !1) {
const r = [], o = function(a) {
(a.root ? a.root.childNodes : a.childNodes).forEach((i) => {
(i.checked || n && i.indeterminate) && (!t || t && i.isLeaf) && r.push(i.data), o(i);
});
};
return o(this), r;
}
getCheckedKeys(t = !1) {
return this.getCheckedNodes(t).map((n) => (n || {})[this.key]);
}
getHalfCheckedNodes() {
const t = [], n = function(r) {
(r.root ? r.root.childNodes : r.childNodes).forEach((o) => {
o.indeterminate && t.push(o.data), n(o);
});
};
return n(this), t;
}
getHalfCheckedKeys() {
return this.getHalfCheckedNodes().map((t) => (t || {})[this.key]);
}
_getAllNodes() {
const t = [], n = this.nodesMap;
for (const r in n)
fs(n, r) && t.push(n[r]);
return t;
}
updateChildren(t, n) {
const r = this.nodesMap[t];
if (!r)
return;
const o = r.childNodes;
for (let a = o.length - 1; a >= 0; a--) {
const i = o[a];
this.remove(i.data);
}
for (let a = 0, i = n.length; a < i; a++) {
const s = n[a];
this.append(s, r.data);
}
}
_setCheckedKeys(t, n = !1, r) {
const o = this._getAllNodes().sort((u, l) => u.level - l.level), a = /* @__PURE__ */ Object.create(null), i = Object.keys(r);
o.forEach((u) => u.setChecked(!1, !1));
const s = (u) => {
u.childNodes.forEach((l) => {
var c;
a[l.data[t]] = !0, (c = l.childNodes) != null && c.length && s(l);
});
};
for (let u = 0, l = o.length; u < l; u++) {
const c = o[u], d = c.data[t].toString();
if (!i.includes(d)) {
c.checked && !a[d] && c.setChecked(!1, !1);
continue;
}
if (c.childNodes.length && s(c), c.isLeaf || this.checkStrictly) {
c.setChecked(!0, !1);
continue;
}
if (c.setChecked(!0, !0), n) {
c.setChecked(!1, !1);
const 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, o = {};
t.forEach((a) => {
o[(a || {})[r]] = !0;
}), this._setCheckedKeys(r, n, o);
}
setCheckedKeys(t, n = !1) {
this.defaultCheckedKeys = t;
const r = this.key, o = {};
t.forEach((a) => {
o[a] = !0;
}), this._setCheckedKeys(r, n, o);
}
setDefaultExpandedKeys(t) {
t = t || [], this.defaultExpandedKeys = t, t.forEach((n) => {
const r = this.getNode(n);
r && r.expand(null, this.autoExpandParent);
});
}
setChecked(t, n, r) {
const o = this.getNode(t);
o && o.setChecked(!!n, r);
}
getCurrentNode() {
return this.currentNode;
}
setCurrentNode(t) {
const n = this.currentNode;
n && (n.isCurrent = !1), this.currentNode = t, this.currentNode.isCurrent = !0;
}
setUserCurrentNode(t, n = !0) {
const r = t[this.key], o = this.nodesMap[r];
this.setCurrentNode(o), n && this.currentNode.level > 1 && this.currentNode.parent.expand(null, !0);
}
setCurrentNodeKey(t, n = !0) {
if (t == null) {
this.currentNode && (this.currentNode.isCurrent = !1), this.currentNode = null;
return;
}
const r = this.getNode(t);
r && (this.setCurrentNode(r), n && this.currentNode.level > 1 && this.currentNode.parent.expand(null, !0));
}
}
const Nre = Z({
name: "ElTreeNodeContent",
props: {
node: {
type: Object,
required: !0
},
renderContent: Function
},
setup(e) {
const t = wt("tree"), n = $e("NodeInstance"), r = $e("RootTree");
return () => {
const o = e.node, { data: a, store: i } = o;
return e.renderContent ? e.renderContent(Kt, { _self: n, node: o, data: a, store: i }) : ve(r.ctx.slots, "default", { node: o, data: a }, () => [
Kt("span", { class: t.be("node", "label") }, [o.label])
]);
};
}
});
var Lre = /* @__PURE__ */ bt(Nre, [["__file", "tree-node-content.vue"]]);
function UE(e) {
const t = $e("TreeNodeMap", null), n = {
treeNodeExpand: (r) => {
e.node !== r && e.node.collapse();
},
children: []
};
return t && t.children.push(n), ft("TreeNodeMap", n), {
broadcastExpanded: (r) => {
if (e.accordion)
for (const o of n.children)
o.treeNodeExpand(r);
}
};
}
const qE = Symbol("dragEvents");
function Dre({ props: e, ctx: t, el$: n, dropIndicator$: r, store: o }) {
const a = wt("tree"), i = H({
showDropIndicator: !1,
draggingNode: null,
dropNode: null,
allowDrop: !0,
dropType: null
});
return ft(qE, {
treeNodeDragStart: ({ event: s, treeNode: u }) => {
if (typeof e.allowDrag == "function" && !e.allowDrag(u.node))
return s.preventDefault(), !1;
s.dataTransfer.effectAllowed = "move";
try {
s.dataTransfer.setData("text/plain", "");
} catch {
}
i.value.draggingNode = u, t.emit("node-drag-start", u.node, s);
},
treeNodeDragOver: ({ event: s, treeNode: u }) => {
const l = u, c = i.value.dropNode;
c && c.node.id !== l.node.id && os(c.$el, a.is("drop-inner"));
const d = i.value.draggingNode;
if (!d || !l)
return;
let f = !0, h = !0, p = !0, v = !0;
typeof e.allowDrop == "function" && (f = e.allowDrop(d.node, l.node, "prev"), v = h = e.allowDrop(d.node, l.node, "inner"), p = e.allowDrop(d.node, l.node, "next")), s.dataTransfer.dropEffect = h || f || p ? "move" : "none", (f || h || p) && (c == null ? void 0 : c.node.id) !== l.node.id && (c && t.emit("node-drag-leave", d.node, c.node, s), t.emit("node-drag-enter", d.node, l.node, s)), f || h || p ? i.value.dropNode = l : i.value.dropNode = null, l.node.nextSibling === d.node && (p = !1), l.node.previousSibling === d.node && (f = !1), l.node.contains(d.node, !1) && (h = !1), (d.node === l.node || d.node.contains(l.node)) && (f = !1, h = !1, p = !1);
const m = l.$el.querySelector(`.${a.be("node", "content")}`).getBoundingClientRect(), g = n.value.getBoundingClientRect();
let b;
const x = f ? h ? 0.25 : p ? 0.45 : 1 : -1, w = p ? h ? 0.75 : f ? 0.55 : 0 : 1;
let C = -9999;
const k = s.clientY - m.top;
k < m.height * x ? b = "before" : k > m.height * w ? b = "after" : h ? b = "inner" : b = "none";
const E = l.$el.querySelector(`.${a.be("node", "expand-icon")}`).getBoundingClientRect(), S = r.value;
b === "before" ? C = E.top - g.top : b === "after" && (C = E.bottom - g.top), S.style.top = `${C}px`, S.style.left = `${E.right - g.left}px`, b === "inner" ? S0(l.$el, a.is("drop-inner")) : os(l.$el, a.is("drop-inner")), i.value.showDropIndicator = b === "before" || b === "after", i.value.allowDrop = i.value.showDropIndicator || v, i.value.dropType = b, t.emit("node-drag-over", d.node, l.node, s);
},
treeNodeDragEnd: (s) => {
const { draggingNode: u, dropType: l, dropNode: c } = i.value;
if (s.preventDefault(), s.dataTransfer && (s.dataTransfer.dropEffect = "move"), u && c) {
const d = { data: u.node.data };
l !== "none" && u.node.remove(), l === "before" ? c.node.parent.insertBefore(d, c.node) : l === "after" ? c.node.parent.insertAfter(d, c.node) : l === "inner" && c.node.insertChild(d), l !== "none" && (o.value.registerNode(d), o.value.key && u.node.eachNode((f) => {
var h;
(h = o.value.nodesMap[f.data[o.value.key]]) == null || h.setChecked(f.checked, !o.value.checkStrictly);
})), os(c.$el, a.is("drop-inner")), t.emit("node-drag-end", u.node, c.node, l, s), l !== "none" && t.emit("node-drop", u.node, c.node, l, s);
}
u && !c && t.emit("node-drag-end", u.node, null, l, s), i.value.showDropIndicator = !1, i.value.draggingNode = null, i.value.dropNode = null, i.value.allowDrop = !0;
}
}), {
dragState: i
};
}
const Rre = Z({
name: "ElTreeNode",
components: {
ElCollapseTransition: gne,
ElCheckbox: Zte,
NodeContent: Lre,
ElIcon: lr,
Loading: Hm
},
props: {
node: {
type: is,
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 } = UE(e), o = $e("RootTree"), a = H(!1), i = H(!1), s = H(null), u = H(null), l = H(null), c = $e(qE), d = dt();
ft("NodeInstance", d), o || Tn("Tree", "Can not find node's tree."), e.node.expanded && (a.value = !0, i.value = !0);
const f = o.props.props.children || "children";
me(() => {
const w = e.node.data[f];
return w && [...w];
}, () => {
e.node.updateChildren();
}), me(() => e.node.indeterminate, (w) => {
v(e.node.checked, w);
}), me(() => e.node.checked, (w) => {
v(w, e.node.indeterminate);
}), me(() => e.node.childNodes.length, () => e.node.reInitChecked()), me(() => e.node.expanded, (w) => {
Ge(() => a.value = w), w && (i.value = !0);
});
const h = (w) => dy(o.props.nodeKey, w.data), p = (w) => {
const C = e.props.class;
if (!C)
return {};
let k;
if (wr(C)) {
const { data: E } = w;
k = C(E, w);
} else
k = C;
return ur(k) ? { [k]: !0 } : k;
}, v = (w, C) => {
(s.value !== w || u.value !== C) && o.ctx.emit("check-change", e.node.data, w, C), s.value = w, u.value = C;
}, m = (w) => {
F0(o.store, o.ctx.emit, () => o.store.value.setCurrentNode(e.node)), o.currentNode.value = e.node, o.props.expandOnClickNode && b(), o.props.checkOnClickNode && !e.node.disabled && x(null, {
target: { checked: !e.node.checked }
}), o.ctx.emit("node-click", e.node.data, e.node, d, w);
}, g = (w) => {
o.instance.vnode.props.onNodeContextmenu && (w.stopPropagation(), w.preventDefault()), o.ctx.emit("node-contextmenu", w, e.node.data, e.node, d);
}, b = () => {
e.node.isLeaf || (a.value ? (o.ctx.emit("node-collapse", e.node.data, e.node, d), e.node.collapse()) : e.node.expand(() => {
t.emit("node-expand", e.node.data, e.node, d);
}));
}, x = (w, C) => {
e.node.setChecked(C.target.checked, !o.props.checkStrictly), Ge(() => {
const k = o.store.value;
o.ctx.emit("check", e.node.data, {
checkedNodes: k.getCheckedNodes(),
checkedKeys: k.getCheckedKeys(),
halfCheckedNodes: k.getHalfCheckedNodes(),
halfCheckedKeys: k.getHalfCheckedKeys()
});
});
};
return {
ns: n,
node$: l,
tree: o,
expanded: a,
childNodeRendered: i,
oldChecked: s,
oldIndeterminate: u,
getNodeKey: h,
getNodeClass: p,
handleSelectChange: v,
handleClick: m,
handleContextMenu: g,
handleExpandIconClick: b,
handleCheckChange: x,
handleChildNodeExpand: (w, C, k) => {
r(C), o.ctx.emit("node-expand", w, C, k);
},
handleDragStart: (w) => {
o.props.draggable && c.treeNodeDragStart({ event: w, treeNode: e });
},
handleDragOver: (w) => {
w.preventDefault(), o.props.draggable && c.treeNodeDragOver({
event: w,
treeNode: { $el: l.value, node: e.node }
});
},
handleDrop: (w) => {
w.preventDefault();
},
handleDragEnd: (w) => {
o.props.draggable && c.treeNodeDragEnd(w);
},
CaretRight: SZ
};
}
});
function Bre(e, t, n, r, o, a) {
const i = Et("el-icon"), s = Et("el-checkbox"), u = Et("loading"), l = Et("node-content"), c = Et("el-tree-node"), d = Et("el-collapse-transition");
return tt((T(), B("div", {
ref: "node$",
class: W([
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: it(e.handleClick, ["stop"]),
onContextmenu: e.handleContextMenu,
onDragstart: it(e.handleDragStart, ["stop"]),
onDragover: it(e.handleDragOver, ["stop"]),
onDragend: it(e.handleDragEnd, ["stop"]),
onDrop: it(e.handleDrop, ["stop"])
}, [
Y("div", {
class: W(e.ns.be("node", "content")),
style: lt({ paddingLeft: (e.node.level - 1) * e.tree.props.indent + "px" })
}, [
e.tree.props.icon || e.CaretRight ? (T(), ie(i, {
key: 0,
class: W([
e.ns.be("node", "expand-icon"),
e.ns.is("leaf", e.node.isLeaf),
{
expanded: !e.node.isLeaf && e.expanded
}
]),
onClick: it(e.handleExpandIconClick, ["stop"])
}, {
default: G(() => [
(T(), ie(_t(e.tree.props.icon || e.CaretRight)))
]),
_: 1
}, 8, ["class", "onClick"])) : ne("v-if", !0),
e.showCheckbox ? (T(), ie(s, {
key: 1,
"model-value": e.node.checked,
indeterminate: e.node.indeterminate,
disabled: !!e.node.disabled,
onClick: it(() => {
}, ["stop"]),
onChange: e.handleCheckChange
}, null, 8, ["model-value", "indeterminate", "disabled", "onClick", "onChange"])) : ne("v-if", !0),
e.node.loading ? (T(), ie(i, {
key: 2,
class: W([e.ns.be("node", "loading-icon"), e.ns.is("loading")])
}, {
default: G(() => [
ee(u)
]),
_: 1
}, 8, ["class"])) : ne("v-if", !0),
ee(l, {
node: e.node,
"render-content": e.renderContent
}, null, 8, ["node", "render-content"])
], 6),
ee(d, null, {
default: G(() => [
!e.renderAfterExpand || e.childNodeRendered ? tt((T(), B("div", {
key: 0,
class: W(e.ns.be("node", "children")),
role: "group",
"aria-expanded": e.expanded
}, [
(T(!0), B(Qe, null, At(e.node.childNodes, (f) => (T(), ie(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"])), [
[Pt, e.expanded]
]) : ne("v-if", !0)
]),
_: 1
})
], 42, ["aria-expanded", "aria-disabled", "aria-checked", "draggable", "data-key", "onClick", "onContextmenu", "onDragstart", "onDragover", "onDragend", "onDrop"])), [
[Pt, e.node.visible]
]);
}
var Mre = /* @__PURE__ */ bt(Rre, [["render", Bre], ["__file", "tree-node.vue"]]);
function zre({ el$: e }, t) {
const n = wt("tree"), r = Yn([]), o = Yn([]);
ht(() => {
a();
}), hf(() => {
r.value = Array.from(e.value.querySelectorAll("[role=treeitem]")), o.value = Array.from(e.value.querySelectorAll("input[type=checkbox]"));
}), me(o, (i) => {
i.forEach((s) => {
s.setAttribute("tabindex", "-1");
});
}), Qr(e, "keydown", (i) => {
const s = i.target;
if (!s.className.includes(n.b("node")))
return;
const u = i.code;
r.value = Array.from(e.value.querySelectorAll(`.${n.is("focusable")}[role=treeitem]`));
const l = r.value.indexOf(s);
let c;
if ([In.up, In.down].includes(u)) {
if (i.preventDefault(), u === In.up) {
c = l === -1 ? 0 : l !== 0 ? l - 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 = l === -1 ? 0 : l < r.value.length - 1 ? l + 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();
}
[In.left, In.right].includes(u) && (i.preventDefault(), s.click());
const d = s.querySelector('[type="checkbox"]');
[In.enter, In.space].includes(u) && d && (i.preventDefault(), d.click());
});
const a = () => {
var i;
r.value = Array.from(e.value.querySelectorAll(`.${n.is("focusable")}[role=treeitem]`)), o.value = Array.from(e.value.querySelectorAll("input[type=checkbox]"));
const s = e.value.querySelectorAll(`.${n.is("checked")}[role=treeitem]`);
if (s.length) {
s[0].setAttribute("tabindex", "0");
return;
}
(i = r.value[0]) == null || i.setAttribute("tabindex", "0");
};
}
const Vre = Z({
name: "ElTree",
components: { ElTreeNode: Mre },
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: gi
}
},
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 } = Uc(), r = wt("tree"), o = $e(Yc, null), a = H(new Ire({
key: e.nodeKey,
data: e.data,
lazy: e.lazy,
props: e.props,
load: e.load,
currentNodeKey: e.currentNodeKey,
checkStrictly: e.checkStrictly,
checkDescendants: e.checkDescendants,
defaultCheckedKeys: e.defaultCheckedKeys,
defaultExpandedKeys: e.defaultExpandedKeys,
autoExpandParent: e.autoExpandParent,
defaultExpandAll: e.defaultExpandAll,
filterNodeMethod: e.filterNodeMethod
}));
a.value.initialize();
const i = H(a.value.root), s = H(null), u = H(null), l = H(null), { broadcastExpanded: c } = UE(e), { dragState: d } = Dre({
props: e,
ctx: t,
el$: u,
dropIndicator$: l,
store: a
});
zre({ el$: u }, a);
const f = _(() => {
const { childNodes: R } = i.value, q = o ? o.hasFilteredOptions !== 0 : !1;
return (!R || R.length === 0 || R.every(({ visible: oe }) => !oe)) && !q;
});
me(() => e.currentNodeKey, (R) => {
a.value.setCurrentNodeKey(R);
}), me(() => e.defaultCheckedKeys, (R) => {
a.value.setDefaultCheckedKey(R);
}), me(() => e.defaultExpandedKeys, (R) => {
a.value.setDefaultExpandedKeys(R);
}), me(() => e.data, (R) => {
a.value.setData(R);
}, { deep: !0 }), me(() => e.checkStrictly, (R) => {
a.value.checkStrictly = R;
});
const h = (R) => {
if (!e.filterNodeMethod)
throw new Error("[Tree] filterNodeMethod is required when filter");
a.value.filter(R);
}, p = (R) => dy(e.nodeKey, R.data), v = (R) => {
if (!e.nodeKey)
throw new Error("[Tree] nodeKey is required in getNodePath");
const q = a.value.getNode(R);
if (!q)
return [];
const oe = [q.data];
let Q = q.parent;
for (; Q && Q !== i.value; )
oe.push(Q.data), Q = Q.parent;
return oe.reverse();
}, m = (R, q) => a.value.getCheckedNodes(R, q), g = (R) => a.value.getCheckedKeys(R), b = () => {
const R = a.value.getCurrentNode();
return R ? R.data : null;
}, x = () => {
if (!e.nodeKey)
throw new Error("[Tree] nodeKey is required in getCurrentKey");
const R = b();
return R ? R[e.nodeKey] : null;
}, w = (R, q) => {
if (!e.nodeKey)
throw new Error("[Tree] nodeKey is required in setCheckedNodes");
a.value.setCheckedNodes(R, q);
}, C = (R, q) => {
if (!e.nodeKey)
throw new Error("[Tree] nodeKey is required in setCheckedKeys");
a.value.setCheckedKeys(R, q);
}, k = (R, q, oe) => {
a.value.setChecked(R, q, oe);
}, E = () => a.value.getHalfCheckedNodes(), S = () => a.value.getHalfCheckedKeys(), O = (R, q = !0) => {
if (!e.nodeKey)
throw new Error("[Tree] nodeKey is required in setCurrentNode");
F0(a, t.emit, () => {
c(R), a.value.setUserCurrentNode(R, q);
});
}, F = (R, q = !0) => {
if (!e.nodeKey)
throw new Error("[Tree] nodeKey is required in setCurrentKey");
F0(a, t.emit, () => {
c(), a.value.setCurrentNodeKey(R, q);
});
}, $ = (R) => a.value.getNode(R), A = (R) => {
a.value.remove(R);
}, L = (R, q) => {
a.value.append(R, q);
}, N = (R, q) => {
a.value.insertBefore(R, q);
}, M = (R, q) => {
a.value.insertAfter(R, q);
}, I = (R, q, oe) => {
c(q), t.emit("node-expand", R, q, oe);
}, z = (R, q) => {
if (!e.nodeKey)
throw new Error("[Tree] nodeKey is required in updateKeyChild");
a.value.updateChildren(R, q);
};
return ft("RootTree", {
ctx: t,
props: e,
store: a,
root: i,
currentNode: s,
instance: dt()
}), ft(dc, void 0), {
ns: r,
store: a,
root: i,
currentNode: s,
dragState: d,
el$: u,
dropIndicator$: l,
isEmpty: f,
filter: h,
getNodeKey: p,
getNodePath: v,
getCheckedNodes: m,
getCheckedKeys: g,
getCurrentNode: b,
getCurrentKey: x,
setCheckedNodes: w,
setCheckedKeys: C,
setChecked: k,
getHalfCheckedNodes: E,
getHalfCheckedKeys: S,
setCurrentNode: O,
setCurrentKey: F,
t: n,
getNode: $,
remove: A,
append: L,
insertBefore: N,
insertAfter: M,
handleNodeExpand: I,
updateKeyChildren: z
};
}
});
function jre(e, t, n, r, o, a) {
const i = Et("el-tree-node");
return T(), B("div", {
ref: "el$",
class: W([
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"
}, [
(T(!0), B(Qe, null, At(e.root.childNodes, (s) => (T(), ie(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 ? (T(), B("div", {
key: 0,
class: W(e.ns.e("empty-block"))
}, [
ve(e.$slots, "empty", {}, () => {
var s;
return [
Y("span", {
class: W(e.ns.e("empty-text"))
}, Te((s = e.emptyText) != null ? s : e.t("el.tree.emptyText")), 3)
];
})
], 2)) : ne("v-if", !0),
tt(Y("div", {
ref: "dropIndicator$",
class: W(e.ns.e("drop-indicator"))
}, null, 2), [
[Pt, e.dragState.showDropIndicator]
])
], 2);
}
var Hre = /* @__PURE__ */ bt(Vre, [["render", jre], ["__file", "tree.vue"]]);
jn(Hre);
function Ure(e) {
let t;
const n = H(!1), r = pn({
...e,
originalPosition: "",
originalOverflow: "",
visible: !1
});
function o(f) {
r.text = f;
}
function a() {
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()) : (os(f, h.bm("parent", "relative")), f.removeAttribute("loading-number")), os(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(u, 400), r.visible = !1, (f = e.closed) == null || f.call(e));
}
function u() {
if (!n.value)
return;
const f = r.parent;
n.value = !1, f.vLoadingAddClassList = void 0, a();
}
const l = Z({
name: "ElLoading",
setup(f, { expose: h }) {
const { ns: p, zIndex: v } = AQ("loading");
return h({
ns: p,
zIndex: v
}), () => {
const m = r.spinner || r.svg, g = Kt("svg", {
class: "circular",
viewBox: r.svgViewBox ? r.svgViewBox : "0 0 50 50",
...m ? { innerHTML: m } : {}
}, [
Kt("circle", {
class: "path",
cx: "25",
cy: "25",
r: "20",
fill: "none"
})
]), b = r.text ? Kt("p", { class: p.b("text") }, [r.text]) : void 0;
return Kt(Kr, {
name: p.b("fade"),
onAfterLeave: u
}, {
default: G(() => [
tt(ee("div", {
style: {
backgroundColor: r.background || ""
},
class: [
p.b("mask"),
r.customClass,
r.fullscreen ? "is-fullscreen" : ""
]
}, [
Kt("div", {
class: p.b("spinner")
}, [g, b])
]), [[Pt, r.visible]])
])
});
};
}
}), c = ug(l), d = c.mount(document.createElement("div"));
return {
...vo(r),
setText: o,
removeElLoadingChild: i,
close: s,
handleAfterLeave: u,
vm: d,
get $el() {
return d.$el;
}
};
}
let Rd;
const qre = function(e = {}) {
if (!_n)
return;
const t = Wre(e);
if (t.fullscreen && Rd)
return Rd;
const n = Ure({
...t,
closed: () => {
var o;
(o = t.closed) == null || o.call(t), t.fullscreen && (Rd = void 0);
}
});
Kre(t, t.parent, n), ix(t, t.parent, n), t.parent.vLoadingAddClassList = () => ix(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), Ge(() => n.visible.value = t.visible), t.fullscreen && (Rd = n), n;
}, Wre = (e) => {
var t, n, r, o;
let a;
return ur(e.target) ? a = (t = document.querySelector(e.target)) != null ? t : document.body : a = e.target || document.body, {
parent: a === document.body || e.body ? document.body : a,
background: e.background || "",
svg: e.svg || "",
svgViewBox: e.svgViewBox || "",
spinner: e.spinner || !1,
text: e.text || "",
fullscreen: a === document.body && ((n = e.fullscreen) != null ? n : !0),
lock: (r = e.lock) != null ? r : !1,
customClass: e.customClass || "",
visible: (o = e.visible) != null ? o : !0,
beforeClose: e.beforeClose,
closed: e.closed,
target: a
};
}, Kre = async (e, t, n) => {
const { nextZIndex: r } = n.vm.zIndex || n.vm._.exposed.zIndex, o = {};
if (e.fullscreen)
n.originalPosition.value = vu(document.body, "position"), n.originalOverflow.value = vu(document.body, "overflow"), o.zIndex = r();
else if (e.parent === document.body) {
n.originalPosition.value = vu(document.body, "position"), await Ge();
for (const a of ["top", "left"]) {
const i = a === "top" ? "scrollTop" : "scrollLeft";
o[a] = `${e.target.getBoundingClientRect()[a] + document.body[i] + document.documentElement[i] - Number.parseInt(vu(document.body, `margin-${a}`), 10)}px`;
}
for (const a of ["height", "width"])
o[a] = `${e.target.getBoundingClientRect()[a]}px`;
} else
n.originalPosition.value = vu(t, "position");
for (const [a, i] of Object.entries(o))
n.$el.style[a] = i;
}, ix = (e, t, n) => {
const r = n.vm.ns || n.vm._.exposed.ns;
["absolute", "fixed", "sticky"].includes(n.originalPosition.value) ? os(t, r.bm("parent", "relative")) : S0(t, r.bm("parent", "relative")), e.fullscreen && e.lock ? S0(t, r.bm("parent", "hidden")) : os(t, r.bm("parent", "hidden"));
}, fp = Symbol("ElLoading"), sx = (e, t) => {
var n, r, o, a;
const i = t.instance, s = (f) => Gn(t.value) ? t.value[f] : void 0, u = (f) => {
const h = ur(f) && (i == null ? void 0 : i[f]) || f;
return h && H(h);
}, l = (f) => u(s(f) || e.getAttribute(`element-loading-${CK(f)}`)), c = (n = s("fullscreen")) != null ? n : t.modifiers.fullscreen, d = {
text: l("text"),
svg: l("svg"),
svgViewBox: l("svgViewBox"),
spinner: l("spinner"),
background: l("background"),
customClass: l("customClass"),
fullscreen: c,
target: (r = s("target")) != null ? r : c ? void 0 : e,
body: (o = s("body")) != null ? o : t.modifiers.body,
lock: (a = s("lock")) != null ? a : t.modifiers.lock
};
e[fp] = {
options: d,
instance: qre(d)
};
}, Gre = (e, t) => {
for (const n of Object.keys(t))
Vn(t[n]) && (t[n].value = e[n]);
}, Xre = {
mounted(e, t) {
t.value && sx(e, t);
},
updated(e, t) {
const n = e[fp];
t.oldValue !== t.value && (t.value && !t.oldValue ? sx(e, t) : t.value && t.oldValue ? Gn(t.value) && Gre(t.value, n.options) : n == null || n.instance.close());
},
unmounted(e) {
var t;
(t = e[fp]) == null || t.instance.close(), e[fp] = null;
}
}, dh = (e, t) => {
const n = e.__vccOpts || e;
for (const [r, o] of t)
n[r] = o;
return n;
}, Yre = {
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 o = r.replace("DOI:", "https://doi.org/");
t.push(new URL(o));
} else if (r.includes("PMID:")) {
const o = r.replace(
"PMID:",
"https://pubmed.ncbi.nlm.nih.gov/"
);
t.push(new URL(o));
} else
t.push(r);
});
const n = {
resource: this.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 = "";
});
}
}, Fs = (e) => (ki("data-v-9930ef40"), e = e(), Ci(), e), Zre = { class: "block" }, Jre = /* @__PURE__ */ Fs(() => /* @__PURE__ */ Y("div", { class: "title" }, "Feature Annotations", -1)), Qre = /* @__PURE__ */ Fs(() => /* @__PURE__ */ Y("strong", { class: "sub-title" }, "Previous submissions:", -1)), eoe = /* @__PURE__ */ Fs(() => /* @__PURE__ */ Y("strong", null, "Evidence: ", -1)), toe = ["href"], noe = /* @__PURE__ */ Fs(() => /* @__PURE__ */ Y("strong", null, "Comment: ", -1)), roe = /* @__PURE__ */ Fs(() => /* @__PURE__ */ Y("strong", { class: "sub-title" }, "Suggest changes:", -1)), ooe = /* @__PURE__ */ Fs(() => /* @__PURE__ */ Y("strong", null, "Evidence:", -1)), aoe = /* @__PURE__ */ Fs(() => /* @__PURE__ */ Y("strong", null, "Comment:", -1)), ioe = { class: "sub-title" };
function soe(e, t, n, r, o, a) {
const i = NE, s = CZ, u = lr, l = Vm, c = LZ, d = IZ, f = RZ, h = ly, p = Yp, v = kre, m = xre, g = uh, b = gs, x = uy;
return T(), ie(x, { class: "main" }, {
default: G(() => [
Y("div", Zre, [
ee(i, { class: "info-field" }, {
default: G(() => [
Jre
]),
_: 1
}),
n.annotationEntry ? (T(), B(Qe, { key: 0 }, [
(T(!0), B(Qe, null, At(e.displayPair, (w, C) => tt((T(), ie(i, {
class: "dialog-text",
key: w
}, {
default: G(() => [
Y("strong", null, Te(C) + ": ", 1),
Ke(" " + Te(n.annotationEntry[w]), 1)
]),
_: 2
}, 1024)), [
[Pt, n.annotationEntry[w]]
])), 128)),
e.prevSubs.length > 0 ? (T(), B(Qe, { key: 0 }, [
tt(Y("div", {
class: "hide",
onClick: t[0] || (t[0] = (w) => e.showSubmissions = !1)
}, [
Ke(" Hide previous submissions "),
ee(u, null, {
default: G(() => [
ee(s)
]),
_: 1
})
], 512), [
[Pt, e.showSubmissions]
]),
tt(Y("div", {
class: "hide",
onClick: t[1] || (t[1] = (w) => e.showSubmissions = !0)
}, [
Ke(" Show previous " + Te(e.prevSubs.length) + " submission(s) ", 1),
ee(u, null, {
default: G(() => [
ee(l)
]),
_: 1
})
], 512), [
[Pt, !e.showSubmissions]
]),
e.showSubmissions ? (T(), B(Qe, { key: 0 }, [
ee(i, { class: "dialog-spacer" }),
ee(i, { class: "dialog-text" }, {
default: G(() => [
Qre
]),
_: 1
}),
(T(!0), B(Qe, null, At(e.prevSubs, (w, C) => (T(), B("div", {
class: "entry",
key: C
}, [
ee(i, { class: "dialog-text" }, {
default: G(() => [
Y("strong", null, Te(a.formatTime(w.created)), 1),
Ke(" " + Te(w.creator.name), 1)
]),
_: 2
}, 1024),
ee(i, { class: "dialog-text" }, {
default: G(() => [
eoe,
(T(!0), B(Qe, null, At(w.body.evidence, (k) => (T(), ie(i, {
key: k,
class: "dialog-text"
}, {
default: G(() => [
Y("a", {
href: k,
target: "_blank"
}, Te(k), 9, toe)
]),
_: 2
}, 1024))), 128))
]),
_: 2
}, 1024),
ee(i, { class: "dialog-text" }, {
default: G(() => [
noe,
Ke(" " + Te(w.body.comment), 1)
]),
_: 2
}, 1024)
]))), 128))
], 64)) : ne("", !0)
], 64)) : ne("", !0),
e.authenticated ? (T(), B(Qe, { key: 1 }, [
a.isEditable ? (T(), B(Qe, { key: 0 }, [
ee(i, { class: "dialog-spacer" }),
e.editing ? (T(), B(Qe, { key: 1 }, [
ee(i, { class: "dialog-text" }, {
default: G(() => [
roe
]),
_: 1
}),
a.isDeleted ? ne("", !0) : (T(), B(Qe, { key: 0 }, [
ee(i, { class: "dialog-text" }, {
default: G(() => [
ooe
]),
_: 1
}),
(T(!0), B(Qe, null, At(e.evidence, (w, C) => (T(), ie(i, { key: w }, {
default: G(() => [
ee(h, { span: 20 }, {
default: G(() => [
Ke(Te(e.evidence[C]), 1)
]),
_: 2
}, 1024),
ee(h, { span: 4 }, {
default: G(() => [
ee(u, { class: "standard-icon" }, {
default: G(() => [
ee(p, {
onClick: (k) => a.removeEvidence(C)
}, null, 8, ["onClick"])
]),
_: 2
}, 1024)
]),
_: 2
}, 1024)
]),
_: 2
}, 1024))), 128)),
ee(i, null, {
default: G(() => [
ee(g, {
size: "small",
placeholder: "Enter",
modelValue: e.newEvidence,
"onUpdate:modelValue": t[4] || (t[4] = (w) => e.newEvidence = w),
onChange: t[5] || (t[5] = (w) => a.evidenceEntered(w))
}, {
prepend: G(() => [
ee(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: G(() => [
(T(!0), B(Qe, null, At(e.evidencePrefixes, (w) => (T(), ie(v, {
key: w,
label: w,
value: w
}, {
default: G(() => [
ee(i, null, {
default: G(() => [
ee(h, { span: 12 }, {
default: G(() => [
Ke(Te(w), 1)
]),
_: 2
}, 1024)
]),
_: 2
}, 1024)
]),
_: 2
}, 1032, ["label", "value"]))), 128))
]),
_: 1
}, 8, ["modelValue"])
]),
_: 1
}, 8, ["modelValue"])
]),
_: 1
})
], 64)),
ee(i, null, {
default: G(() => [
aoe
]),
_: 1
}),
ee(i, { class: "dialog-text" }, {
default: G(() => [
ee(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
}),
ee(i, { class: "dialog-text" }, {
default: G(() => [
ee(b, {
class: "button",
type: "primary",
plain: "",
onClick: a.submit
}, {
default: G(() => [
Ke(" Submit ")
]),
_: 1
}, 8, ["onClick"])
]),
_: 1
})
], 64)) : (T(), ie(i, { key: 0 }, {
default: G(() => [
ee(u, { class: "standard-icon" }, {
default: G(() => [
ee(c, {
onClick: t[2] || (t[2] = (w) => e.editing = !0)
})
]),
_: 1
}),
a.isDeleted ? (T(), ie(u, {
key: 0,
class: "standard-icon"
}, {
default: G(() => [
ee(d, { onClick: a.submit }, null, 8, ["onClick"])
]),
_: 1
})) : a.isPositionUpdated ? (T(), ie(u, {
key: 1,
class: "standard-icon"
}, {
default: G(() => [
ee(f, { onClick: a.submit }, null, 8, ["onClick"])
]),
_: 1
})) : ne("", !0)
]),
_: 1
})),
e.errorMessage ? (T(), ie(i, {
key: 2,
class: "dialog-text"
}, {
default: G(() => [
Y("strong", ioe, Te(e.errorMessage), 1)
]),
_: 1
})) : ne("", !0)
], 64)) : ne("", !0)
], 64)) : ne("", !0)
], 64)) : ne("", !0)
])
]),
_: 1
});
}
const loe = /* @__PURE__ */ dh(Yre, [["render", soe], ["__scopeId", "data-v-9930ef40"]]), uoe = {
name: "CreateTooltipContent",
components: {
Button: gs,
Col: ly,
Container: zE,
Header: VE,
Input: uh,
Main: uy
},
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");
}
}
}, coe = (e) => (ki("data-v-d61c5879"), e = e(), Ci(), e), doe = /* @__PURE__ */ coe(() => /* @__PURE__ */ Y("span", { class: "create-text" }, " Primitives will be created in the __annotation region ", -1));
function poe(e, t, n, r, o, a) {
const i = VE, s = ly, u = NE, l = uh, c = gs, d = uy, f = zE;
return T(), ie(f, { class: "create-container" }, {
default: G(() => [
ee(i, {
height: "30px",
class: "header"
}, {
default: G(() => [
Y("div", null, "Create " + Te(n.createData.shape), 1)
]),
_: 1
}),
ee(d, { class: "slides-block" }, {
default: G(() => [
doe,
tt(ee(u, { class: "row" }, {
default: G(() => [
ee(s, {
offset: 0,
span: 8
}, {
default: G(() => [
Ke(" Position: ")
]),
_: 1
}),
ee(s, {
offset: 0,
span: 16
}, {
default: G(() => [
(T(!0), B(Qe, null, At(n.createData.points, ({ value: h, i: p }) => (T(), ie(u, {
key: p,
class: "value"
}, {
default: G(() => [
Ke(Te(p), 1)
]),
_: 2
}, 1024))), 128))
]),
_: 1
})
]),
_: 1
}, 512), [
[Pt, e.showPoint]
]),
ee(u, { class: "row" }, {
default: G(() => [
ee(s, {
offset: 0,
span: 8
}, {
default: G(() => [
Ke(" Region: ")
]),
_: 1
}),
ee(s, {
offset: 0,
span: 16
}, {
default: G(() => [
ee(l, {
modelValue: e.region,
"onUpdate:modelValue": t[0] || (t[0] = (h) => e.region = h),
placeholder: "__annotation",
size: "small"
}, null, 8, ["modelValue"])
]),
_: 1
})
]),
_: 1
}),
ee(u, { class: "row" }, {
default: G(() => [
ee(s, {
offset: 0,
span: 8
}, {
default: G(() => [
Ke(" Group: ")
]),
_: 1
}),
ee(s, {
offset: 0,
span: 16
}, {
default: G(() => [
ee(l, {
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
}),
ee(u, null, {
default: G(() => [
ee(s, {
offset: 0,
span: 12
}, {
default: G(() => [
ee(c, {
type: "primary",
plain: "",
onClick: a.confirm
}, {
default: G(() => [
Ke(Te(a.confirmText), 1)
]),
_: 1
}, 8, ["onClick"])
]),
_: 1
}),
ee(s, {
offset: 0,
span: 12
}, {
default: G(() => [
ee(c, {
type: "primary",
plain: "",
onClick: a.cancel
}, {
default: G(() => [
Ke(" Cancel ")
]),
_: 1
}, 8, ["onClick"])
]),
_: 1
})
]),
_: 1
})
]),
_: 1
})
]),
_: 1
});
}
const foe = /* @__PURE__ */ dh(uoe, [["render", poe], ["__scopeId", "data-v-d61c5879"]]);
function Dn(e) {
"@babel/helpers - typeof";
return Dn = 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;
}, Dn(e);
}
function py(e, t) {
if (!(e instanceof t))
throw new TypeError("Cannot call a class as a function");
}
function hoe(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 fy(e, t, n) {
return t && hoe(e.prototype, t), Object.defineProperty(e, "prototype", {
writable: !1
}), e;
}
function WE(e, t, n) {
return t in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
function Co(e, t) {
return voe(e) || goe(e, t) || KE(e, t) || moe();
}
function voe(e) {
if (Array.isArray(e)) return e;
}
function goe(e, t) {
var n = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
if (n != null) {
var r = [], o = !0, a = !1, i, s;
try {
for (n = n.call(e); !(o = (i = n.next()).done) && (r.push(i.value), !(t && r.length === t)); o = !0)
;
} catch (u) {
a = !0, s = u;
} finally {
try {
!o && n.return != null && n.return();
} finally {
if (a) throw s;
}
}
return r;
}
}
function KE(e, t) {
if (e) {
if (typeof e == "string") return lx(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 lx(e, t);
}
}
function lx(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 moe() {
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 GE(e, t) {
var n = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
if (!n) {
if (Array.isArray(e) || (n = KE(e)) || t) {
n && (e = n);
var r = 0, o = function() {
};
return {
s: o,
n: function() {
return r >= e.length ? {
done: !0
} : {
done: !1,
value: e[r++]
};
},
e: function(u) {
throw u;
},
f: o
};
}
throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
}
var a = !0, i = !1, s;
return {
s: function() {
n = n.call(e);
},
n: function() {
var u = n.next();
return a = u.done, u;
},
e: function(u) {
i = !0, s = u;
},
f: function() {
try {
!a && n.return != null && n.return();
} finally {
if (i) throw s;
}
}
};
}
var An = typeof window > "u" ? null : window, ux = An ? An.navigator : null;
An && An.document;
var yoe = Dn(""), XE = Dn({}), boe = Dn(function() {
}), woe = typeof HTMLElement > "u" ? "undefined" : Dn(HTMLElement), Zc = function(e) {
return e && e.instanceString && dn(e.instanceString) ? e.instanceString() : null;
}, at = function(e) {
return e != null && Dn(e) == yoe;
}, dn = function(e) {
return e != null && Dn(e) === boe;
}, Gt = function(e) {
return !Wr(e) && (Array.isArray ? Array.isArray(e) : e != null && e instanceof Array);
}, It = function(e) {
return e != null && Dn(e) === XE && !Gt(e) && e.constructor === Object;
}, xoe = function(e) {
return e != null && Dn(e) === XE;
}, Ve = function(e) {
return e != null && Dn(e) === Dn(1) && !isNaN(e);
}, koe = function(e) {
return Ve(e) && Math.floor(e) === e;
}, Qp = function(e) {
if (woe !== "undefined")
return e != null && e instanceof HTMLElement;
}, Wr = function(e) {
return Jc(e) || YE(e);
}, Jc = function(e) {
return Zc(e) === "collection" && e._private.single;
}, YE = function(e) {
return Zc(e) === "collection" && !e._private.single;
}, hy = function(e) {
return Zc(e) === "core";
}, ZE = function(e) {
return Zc(e) === "stylesheet";
}, Coe = function(e) {
return Zc(e) === "event";
}, mi = function(e) {
return e == null ? !0 : !!(e === "" || e.match(/^\s+$/));
}, Eoe = function(e) {
return typeof HTMLElement > "u" ? !1 : e instanceof HTMLElement;
}, Soe = function(e) {
return It(e) && Ve(e.x1) && Ve(e.x2) && Ve(e.y1) && Ve(e.y2);
}, _oe = function(e) {
return xoe(e) && dn(e.then);
}, Toe = function() {
return ux && ux.userAgent.match(/msie|trident|edge/i);
}, hc = function(e, t) {
t || (t = function() {
if (arguments.length === 1)
return arguments[0];
if (arguments.length === 0)
return "undefined";
for (var r = [], o = 0; o < arguments.length; o++)
r.push(arguments[o]);
return r.join("$");
});
var n = function r() {
var o = this, a = arguments, i, s = t.apply(o, a), u = r.cache;
return (i = u[s]) || (i = u[s] = e.apply(o, a)), i;
};
return n.cache = {}, n;
}, vy = hc(function(e) {
return e.replace(/([A-Z])/g, function(t) {
return "-" + t.toLowerCase();
});
}), ph = hc(function(e) {
return e.replace(/(-\w)/g, function(t) {
return t[1].toUpperCase();
});
}), JE = hc(function(e, t) {
return e + t[0].toUpperCase() + t.substring(1);
}, function(e, t) {
return e + "$" + t;
}), cx = function(e) {
return mi(e) ? e : e.charAt(0).toUpperCase() + e.substring(1);
}, Ln = "(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))", Ooe = "rgb[a]?\\((" + Ln + "[%]?)\\s*,\\s*(" + Ln + "[%]?)\\s*,\\s*(" + Ln + "[%]?)(?:\\s*,\\s*(" + Ln + "))?\\)", Poe = "rgb[a]?\\((?:" + Ln + "[%]?)\\s*,\\s*(?:" + Ln + "[%]?)\\s*,\\s*(?:" + Ln + "[%]?)(?:\\s*,\\s*(?:" + Ln + "))?\\)", $oe = "hsl[a]?\\((" + Ln + ")\\s*,\\s*(" + Ln + "[%])\\s*,\\s*(" + Ln + "[%])(?:\\s*,\\s*(" + Ln + "))?\\)", Aoe = "hsl[a]?\\((?:" + Ln + ")\\s*,\\s*(?:" + Ln + "[%])\\s*,\\s*(?:" + Ln + "[%])(?:\\s*,\\s*(?:" + Ln + "))?\\)", Foe = "\\#[0-9a-fA-F]{3}", Ioe = "\\#[0-9a-fA-F]{6}", QE = function(e, t) {
return e < t ? -1 : e > t ? 1 : 0;
}, Noe = function(e, t) {
return -1 * QE(e, t);
}, ct = Object.assign != null ? Object.assign.bind(Object) : function(e) {
for (var t = arguments, n = 1; n < t.length; n++) {
var r = t[n];
if (r != null)
for (var o = Object.keys(r), a = 0; a < o.length; a++) {
var i = o[a];
e[i] = r[i];
}
}
return e;
}, Loe = function(e) {
if (!(!(e.length === 4 || e.length === 7) || e[0] !== "#")) {
var t = e.length === 4, n, r, o, a = 16;
return t ? (n = parseInt(e[1] + e[1], a), r = parseInt(e[2] + e[2], a), o = parseInt(e[3] + e[3], a)) : (n = parseInt(e[1] + e[2], a), r = parseInt(e[3] + e[4], a), o = parseInt(e[5] + e[6], a)), [n, r, o];
}
}, Doe = function(e) {
var t, n, r, o, a, i, s, u;
function l(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("^" + $oe + "$").exec(e);
if (c) {
if (n = parseInt(c[1]), n < 0 ? n = (360 - -1 * n % 360) % 360 : n > 360 && (n = n % 360), n /= 360, r = parseFloat(c[2]), r < 0 || r > 100 || (r = r / 100, o = parseFloat(c[3]), o < 0 || o > 100) || (o = o / 100, a = c[4], a !== void 0 && (a = parseFloat(a), a < 0 || a > 1)))
return;
if (r === 0)
i = s = u = Math.round(o * 255);
else {
var d = o < 0.5 ? o * (1 + r) : o + r - o * r, f = 2 * o - d;
i = Math.round(255 * l(f, d, n + 1 / 3)), s = Math.round(255 * l(f, d, n)), u = Math.round(255 * l(f, d, n - 1 / 3));
}
t = [i, s, u, a];
}
return t;
}, Roe = function(e) {
var t, n = new RegExp("^" + Ooe + "$").exec(e);
if (n) {
t = [];
for (var r = [], o = 1; o <= 3; o++) {
var a = n[o];
if (a[a.length - 1] === "%" && (r[o] = !0), a = parseFloat(a), r[o] && (a = a / 100 * 255), a < 0 || a > 255)
return;
t.push(Math.floor(a));
}
var i = r[1] || r[2] || r[3], s = r[1] && r[2] && r[3];
if (i && !s)
return;
var u = n[4];
if (u !== void 0) {
if (u = parseFloat(u), u < 0 || u > 1)
return;
t.push(u);
}
}
return t;
}, Boe = function(e) {
return zoe[e.toLowerCase()];
}, Moe = function(e) {
return (Gt(e) ? e : null) || Boe(e) || Loe(e) || Roe(e) || Doe(e);
}, zoe = {
// 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]
}, eS = function(e) {
for (var t = e.map, n = e.keys, r = n.length, o = 0; o < r; o++) {
var a = n[o];
if (It(a))
throw Error("Tried to set map with object key");
o < n.length - 1 ? (t[a] == null && (t[a] = {}), t = t[a]) : t[a] = e.value;
}
}, tS = function(e) {
for (var t = e.map, n = e.keys, r = n.length, o = 0; o < r; o++) {
var a = n[o];
if (It(a))
throw Error("Tried to get map with object key");
if (t = t[a], t == null)
return t;
}
return t;
};
function Voe(e) {
var t = typeof e;
return e != null && (t == "object" || t == "function");
}
var ms = Voe, _u = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
function joe(e, t) {
return t = { exports: {} }, e(t, t.exports), t.exports;
}
var Hoe = typeof _u == "object" && _u && _u.Object === Object && _u, Uoe = Hoe, qoe = typeof self == "object" && self && self.Object === Object && self, Woe = Uoe || qoe || Function("return this")(), fh = Woe, Koe = function() {
return fh.Date.now();
}, Ev = Koe, Goe = /\s/;
function Xoe(e) {
for (var t = e.length; t-- && Goe.test(e.charAt(t)); )
;
return t;
}
var Yoe = Xoe, Zoe = /^\s+/;
function Joe(e) {
return e && e.slice(0, Yoe(e) + 1).replace(Zoe, "");
}
var Qoe = Joe, eae = fh.Symbol, Al = eae, nS = Object.prototype, tae = nS.hasOwnProperty, nae = nS.toString, yu = Al ? Al.toStringTag : void 0;
function rae(e) {
var t = tae.call(e, yu), n = e[yu];
try {
e[yu] = void 0;
var r = !0;
} catch {
}
var o = nae.call(e);
return r && (t ? e[yu] = n : delete e[yu]), o;
}
var oae = rae, aae = Object.prototype, iae = aae.toString;
function sae(e) {
return iae.call(e);
}
var lae = sae, uae = "[object Null]", cae = "[object Undefined]", dx = Al ? Al.toStringTag : void 0;
function dae(e) {
return e == null ? e === void 0 ? cae : uae : dx && dx in Object(e) ? oae(e) : lae(e);
}
var rS = dae;
function pae(e) {
return e != null && typeof e == "object";
}
var fae = pae, hae = "[object Symbol]";
function vae(e) {
return typeof e == "symbol" || fae(e) && rS(e) == hae;
}
var Qc = vae, px = NaN, gae = /^[-+]0x[0-9a-f]+$/i, mae = /^0b[01]+$/i, yae = /^0o[0-7]+$/i, bae = parseInt;
function wae(e) {
if (typeof e == "number")
return e;
if (Qc(e))
return px;
if (ms(e)) {
var t = typeof e.valueOf == "function" ? e.valueOf() : e;
e = ms(t) ? t + "" : t;
}
if (typeof e != "string")
return e === 0 ? e : +e;
e = Qoe(e);
var n = mae.test(e);
return n || yae.test(e) ? bae(e.slice(2), n ? 2 : 8) : gae.test(e) ? px : +e;
}
var fx = wae, xae = "Expected a function", kae = Math.max, Cae = Math.min;
function Eae(e, t, n) {
var r, o, a, i, s, u, l = 0, c = !1, d = !1, f = !0;
if (typeof e != "function")
throw new TypeError(xae);
t = fx(t) || 0, ms(n) && (c = !!n.leading, d = "maxWait" in n, a = d ? kae(fx(n.maxWait) || 0, t) : a, f = "trailing" in n ? !!n.trailing : f);
function h(k) {
var E = r, S = o;
return r = o = void 0, l = k, i = e.apply(S, E), i;
}
function p(k) {
return l = k, s = setTimeout(g, t), c ? h(k) : i;
}
function v(k) {
var E = k - u, S = k - l, O = t - E;
return d ? Cae(O, a - S) : O;
}
function m(k) {
var E = k - u, S = k - l;
return u === void 0 || E >= t || E < 0 || d && S >= a;
}
function g() {
var k = Ev();
if (m(k))
return b(k);
s = setTimeout(g, v(k));
}
function b(k) {
return s = void 0, f && r ? h(k) : (r = o = void 0, i);
}
function x() {
s !== void 0 && clearTimeout(s), l = 0, r = u = o = s = void 0;
}
function w() {
return s === void 0 ? i : b(Ev());
}
function C() {
var k = Ev(), E = m(k);
if (r = arguments, o = this, u = k, E) {
if (s === void 0)
return p(u);
if (d)
return clearTimeout(s), s = setTimeout(g, t), h(u);
}
return s === void 0 && (s = setTimeout(g, t)), i;
}
return C.cancel = x, C.flush = w, C;
}
var hh = Eae, Sv = An ? An.performance : null, oS = Sv && Sv.now ? function() {
return Sv.now();
} : function() {
return Date.now();
}, Sae = function() {
if (An) {
if (An.requestAnimationFrame)
return function(e) {
An.requestAnimationFrame(e);
};
if (An.mozRequestAnimationFrame)
return function(e) {
An.mozRequestAnimationFrame(e);
};
if (An.webkitRequestAnimationFrame)
return function(e) {
An.webkitRequestAnimationFrame(e);
};
if (An.msRequestAnimationFrame)
return function(e) {
An.msRequestAnimationFrame(e);
};
}
return function(e) {
e && setTimeout(function() {
e(oS());
}, 1e3 / 60);
};
}(), ef = function(e) {
return Sae(e);
}, _a = oS, el = 9261, aS = 65599, Tu = 5381, iS = function(e) {
for (var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : el, n = t, r; r = e.next(), !r.done; )
n = n * aS + r.value | 0;
return n;
}, vc = function(e) {
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : el;
return t * aS + e | 0;
}, gc = function(e) {
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Tu;
return (t << 5) + t + e | 0;
}, _ae = function(e, t) {
return e * 2097152 + t;
}, Ha = function(e) {
return e[0] * 2097152 + e[1];
}, Bd = function(e, t) {
return [vc(e[0], t[0]), gc(e[1], t[1])];
}, Tae = function(e, t) {
var n = {
value: 0,
done: !1
}, r = 0, o = e.length, a = {
next: function() {
return r < o ? n.value = e[r++] : n.done = !0, n;
}
};
return iS(a, t);
}, ys = function(e, t) {
var n = {
value: 0,
done: !1
}, r = 0, o = e.length, a = {
next: function() {
return r < o ? n.value = e.charCodeAt(r++) : n.done = !0, n;
}
};
return iS(a, t);
}, sS = function() {
return Oae(arguments);
}, Oae = function(e) {
for (var t, n = 0; n < e.length; n++) {
var r = e[n];
n === 0 ? t = ys(r) : t = ys(r, t);
}
return t;
}, hx = !0, Pae = console.warn != null, $ae = console.trace != null, gy = Number.MAX_SAFE_INTEGER || 9007199254740991, lS = function() {
return !0;
}, tf = function() {
return !1;
}, vx = function() {
return 0;
}, my = function() {
}, vn = function(e) {
throw new Error(e);
}, uS = function(e) {
if (e !== void 0)
hx = !!e;
else
return hx;
}, Mt = function(e) {
uS() && (Pae ? console.warn(e) : (console.log(e), $ae && console.trace()));
}, Aae = function(e) {
return ct({}, e);
}, Ko = function(e) {
return e == null ? e : Gt(e) ? e.slice() : It(e) ? Aae(e) : e;
}, Fae = function(e) {
return e.slice();
}, cS = 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;
}, Iae = {}, dS = function() {
return Iae;
}, nr = function(e) {
var t = Object.keys(e);
return function(n) {
for (var r = {}, o = 0; o < t.length; o++) {
var a = t[o], i = n == null ? void 0 : n[a];
r[a] = i === void 0 ? e[a] : i;
}
return r;
};
}, yi = function(e, t, n) {
for (var r = e.length - 1; r >= 0; r--)
e[r] === t && e.splice(r, 1);
}, yy = function(e) {
e.splice(0, e.length);
}, Nae = function(e, t) {
for (var n = 0; n < t.length; n++) {
var r = t[n];
e.push(r);
}
}, _o = function(e, t, n) {
return n && (t = JE(n, t)), e[t];
}, ei = function(e, t, n, r) {
n && (t = JE(n, t)), e[t] = r;
}, Lae = /* @__PURE__ */ function() {
function e() {
py(this, e), this._obj = {};
}
return fy(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;
}(), Go = typeof Map < "u" ? Map : Lae, Dae = "undefined", Rae = /* @__PURE__ */ function() {
function e(t) {
if (py(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 fy(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;
}(), Kl = (typeof Set > "u" ? "undefined" : Dn(Set)) !== Dae ? Set : Rae, vh = function(e, t) {
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !0;
if (e === void 0 || t === void 0 || !hy(e)) {
vn("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") {
vn("An element must be of type `nodes` or `edges`; you specified `" + r + "`");
return;
}
this.length = 1, this[0] = this;
var o = this._private = {
cy: e,
single: !0,
// indicates this is an element
data: t.data || {},
// data object
position: t.position || {
x: 0,
y: 0
},
// (x, y) position pair
autoWidth: void 0,
// width and height of nodes calculated by the renderer when set to special 'auto' value
autoHeight: void 0,
autoPadding: void 0,
compoundBoundsClean: !1,
// whether the compound dimensions need to be recalculated the next time dimensions are read
listeners: [],
// array of bound listeners
group: r,
// string; 'nodes' or 'edges'
style: {},
// properties as set by the style
rstyle: {},
// properties for style sent from the renderer to the core
styleCxts: [],
// applied style contexts from the styler
styleKeys: {},
// per-group keys of style property values
removed: !0,
// whether it's inside the vis; true if removed (set true here since we call restore)
selected: !!t.selected,
// whether it's selected
selectable: t.selectable === void 0 ? !0 : !!t.selectable,
// whether it's selectable
locked: !!t.locked,
// whether the element is locked (cannot be moved)
grabbed: !1,
// whether the element is grabbed by the mouse; renderer sets this privately
grabbable: t.grabbable === void 0 ? !0 : !!t.grabbable,
// whether the element can be grabbed
pannable: t.pannable === void 0 ? r === "edges" : !!t.pannable,
// whether the element has passthrough panning enabled
active: !1,
// whether the element is active from user interaction
classes: new Kl(),
// map ( className => true )
animation: {
// object for currently-running animations
current: [],
queue: []
},
rscratch: {},
// object in which the renderer can store information
scratch: t.scratch || {},
// scratch objects
edges: [],
// array of connected edges
children: [],
// array of children
parent: t.parent && t.parent.isNode() ? t.parent : null,
// parent ref
traversalCache: {},
// cache of output of traversal functions
backgrounding: !1,
// whether background images are loading
bbCache: null,
// cache of the current bounding box
bbCacheShift: {
x: 0,
y: 0
},
// shift applied to cached bb to be applied on next get
bodyBounds: null,
// bounds cache of element body, w/o overlay
overlayBounds: null,
// bounds cache of element body, including overlay
labelBounds: {
// bounds cache of labels
all: null,
source: null,
target: null,
main: null
},
arrowBounds: {
// bounds cache of edge arrows
source: null,
target: null,
"mid-source": null,
"mid-target": null
}
};
if (o.position.x == null && (o.position.x = 0), o.position.y == null && (o.position.y = 0), t.renderedPosition) {
var a = t.renderedPosition, i = e.pan(), s = e.zoom();
o.position = {
x: (a.x - i.x) / s,
y: (a.y - i.y) / s
};
}
var u = [];
Gt(t.classes) ? u = t.classes : at(t.classes) && (u = t.classes.split(/\s+/));
for (var l = 0, c = u.length; l < c; l++) {
var d = u[l];
!d || d === "" || o.classes.add(d);
}
this.createEmitter();
var f = t.style || t.css;
f && (Mt("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();
}, gx = function(e) {
return e = {
bfs: e.bfs || !e.dfs,
dfs: e.dfs || !e.bfs
}, function(t, n, r) {
var o;
It(t) && !Wr(t) && (o = t, t = o.roots || o.root, n = o.visit, r = o.directed), r = arguments.length === 2 && !dn(n) ? n : r, n = dn(n) ? n : function() {
};
for (var a = this._private.cy, i = t = at(t) ? this.filter(t) : t, s = [], u = [], l = {}, c = {}, d = {}, f = 0, h, p = this.byGroup(), v = p.nodes, m = p.edges, g = 0; g < i.length; g++) {
var b = i[g], x = b.id();
b.isNode() && (s.unshift(b), e.bfs && (d[x] = !0, u.push(b)), c[x] = 0);
}
for (var w = function() {
var F = e.bfs ? s.shift() : s.pop(), $ = F.id();
if (e.dfs) {
if (d[$])
return "continue";
d[$] = !0, u.push(F);
}
var A = c[$], L = l[$], N = L != null ? L.source() : null, M = L != null ? L.target() : null, I = L == null ? void 0 : F.same(N) ? M[0] : N[0], z = void 0;
if (z = n(F, L, I, f++, A), z === !0)
return h = F, "break";
if (z === !1)
return "break";
for (var R = F.connectedEdges().filter(function(pe) {
return (!r || pe.source().same(F)) && m.has(pe);
}), q = 0; q < R.length; q++) {
var oe = R[q], Q = oe.connectedNodes().filter(function(pe) {
return !pe.same(F) && v.has(pe);
}), ae = Q.id();
Q.length !== 0 && !d[ae] && (Q = Q[0], s.push(Q), e.bfs && (d[ae] = !0, u.push(Q)), l[ae] = oe, c[ae] = c[$] + 1);
}
}; s.length !== 0; ) {
var C = w();
if (C !== "continue" && C === "break")
break;
}
for (var k = a.collection(), E = 0; E < u.length; E++) {
var S = u[E], O = l[S.id()];
O != null && k.push(O), k.push(S);
}
return {
path: a.collection(k),
found: a.collection(h)
};
};
}, mc = {
breadthFirstSearch: gx({
bfs: !0
}),
depthFirstSearch: gx({
dfs: !0
})
};
mc.bfs = mc.breadthFirstSearch;
mc.dfs = mc.depthFirstSearch;
var Bae = joe(function(e, t) {
(function() {
var n, r, o, a, i, s, u, l, c, d, f, h, p, v, m;
o = Math.floor, d = Math.min, r = function(g, b) {
return g < b ? -1 : g > b ? 1 : 0;
}, c = function(g, b, x, w, C) {
var k;
if (x == null && (x = 0), C == null && (C = r), x < 0)
throw new Error("lo must be non-negative");
for (w == null && (w = g.length); x < w; )
k = o((x + w) / 2), C(b, g[k]) < 0 ? w = k : x = k + 1;
return [].splice.apply(g, [x, x - x].concat(b)), b;
}, s = function(g, b, x) {
return x == null && (x = r), g.push(b), v(g, 0, g.length - 1, x);
}, i = function(g, b) {
var x, w;
return b == null && (b = r), x = g.pop(), g.length ? (w = g[0], g[0] = x, m(g, 0, b)) : w = x, w;
}, l = function(g, b, x) {
var w;
return x == null && (x = r), w = g[0], g[0] = b, m(g, 0, x), w;
}, u = function(g, b, x) {
var w;
return x == null && (x = r), g.length && x(g[0], b) < 0 && (w = [g[0], b], b = w[0], g[0] = w[1], m(g, 0, x)), b;
}, a = function(g, b) {
var x, w, C, k, E, S;
for (b == null && (b = r), k = (function() {
S = [];
for (var O = 0, F = o(g.length / 2); 0 <= F ? O < F : O > F; 0 <= F ? O++ : O--)
S.push(O);
return S;
}).apply(this).reverse(), E = [], w = 0, C = k.length; w < C; w++)
x = k[w], E.push(m(g, x, b));
return E;
}, p = function(g, b, x) {
var w;
if (x == null && (x = r), w = g.indexOf(b), w !== -1)
return v(g, 0, w, x), m(g, w, x);
}, f = function(g, b, x) {
var w, C, k, E, S;
if (x == null && (x = r), C = g.slice(0, b), !C.length)
return C;
for (a(C, x), S = g.slice(b), k = 0, E = S.length; k < E; k++)
w = S[k], u(C, w, x);
return C.sort(x).reverse();
}, h = function(g, b, x) {
var w, C, k, E, S, O, F, $, A;
if (x == null && (x = r), b * 10 <= g.length) {
if (k = g.slice(0, b).sort(x), !k.length)
return k;
for (C = k[k.length - 1], F = g.slice(b), E = 0, O = F.length; E < O; E++)
w = F[E], x(w, C) < 0 && (c(k, w, 0, null, x), k.pop(), C = k[k.length - 1]);
return k;
}
for (a(g, x), A = [], S = 0, $ = d(b, g.length); 0 <= $ ? S < $ : S > $; 0 <= $ ? ++S : --S)
A.push(i(g, x));
return A;
}, v = function(g, b, x, w) {
var C, k, E;
for (w == null && (w = r), C = g[x]; x > b; ) {
if (E = x - 1 >> 1, k = g[E], w(C, k) < 0) {
g[x] = k, x = E;
continue;
}
break;
}
return g[x] = C;
}, m = function(g, b, x) {
var w, C, k, E, S;
for (x == null && (x = r), C = g.length, S = b, k = g[b], w = 2 * b + 1; w < C; )
E = w + 1, E < C && !(x(g[w], g[E]) < 0) && (w = E), g[b] = g[w], b = w, w = 2 * b + 1;
return g[b] = k, v(g, S, b, x);
}, n = function() {
g.push = s, g.pop = i, g.replace = l, g.pushpop = u, g.heapify = a, g.updateItem = p, g.nlargest = f, g.nsmallest = h;
function g(b) {
this.cmp = b ?? r, this.nodes = [];
}
return g.prototype.push = function(b) {
return s(this.nodes, b, this.cmp);
}, g.prototype.pop = function() {
return i(this.nodes, this.cmp);
}, g.prototype.peek = function() {
return this.nodes[0];
}, g.prototype.contains = function(b) {
return this.nodes.indexOf(b) !== -1;
}, g.prototype.replace = function(b) {
return l(this.nodes, b, this.cmp);
}, g.prototype.pushpop = function(b) {
return u(this.nodes, b, this.cmp);
}, g.prototype.heapify = function() {
return a(this.nodes, this.cmp);
}, g.prototype.updateItem = function(b) {
return p(this.nodes, b, this.cmp);
}, g.prototype.clear = function() {
return this.nodes = [];
}, g.prototype.empty = function() {
return this.nodes.length === 0;
}, g.prototype.size = function() {
return this.nodes.length;
}, g.prototype.clone = function() {
var b;
return b = new g(), b.nodes = this.nodes.slice(0), b;
}, g.prototype.toArray = function() {
return this.nodes.slice(0);
}, g.prototype.insert = g.prototype.push, g.prototype.top = g.prototype.peek, g.prototype.front = g.prototype.peek, g.prototype.has = g.prototype.contains, g.prototype.copy = g.prototype.clone, g;
}(), function(g, b) {
return e.exports = b();
}(this, function() {
return n;
});
}).call(_u);
}), ed = Bae, Mae = nr({
root: null,
weight: function(e) {
return 1;
},
directed: !1
}), zae = {
dijkstra: function(e) {
if (!It(e)) {
var t = arguments;
e = {
root: t[0],
weight: t[1],
directed: t[2]
};
}
var n = Mae(e), r = n.root, o = n.weight, a = n.directed, i = this, s = o, u = at(r) ? this.filter(r)[0] : r[0], l = {}, c = {}, d = {}, f = this.byGroup(), h = f.nodes, p = f.edges;
p.unmergeBy(function(N) {
return N.isLoop();
});
for (var v = function(N) {
return l[N.id()];
}, m = function(N, M) {
l[N.id()] = M, g.updateItem(N);
}, g = new ed(function(N, M) {
return v(N) - v(M);
}), b = 0; b < h.length; b++) {
var x = h[b];
l[x.id()] = x.same(u) ? 0 : 1 / 0, g.push(x);
}
for (var w = function(N, M) {
for (var I = (a ? N.edgesTo(M) : N.edgesWith(M)).intersect(p), z = 1 / 0, R, q = 0; q < I.length; q++) {
var oe = I[q], Q = s(oe);
(Q < z || !R) && (z = Q, R = oe);
}
return {
edge: R,
dist: z
};
}; g.size() > 0; ) {
var C = g.pop(), k = v(C), E = C.id();
if (d[E] = k, k !== 1 / 0)
for (var S = C.neighborhood().intersect(h), O = 0; O < S.length; O++) {
var F = S[O], $ = F.id(), A = w(C, F), L = k + A.dist;
L < v(F) && (m(F, L), c[$] = {
node: C,
edge: A.edge
});
}
}
return {
distanceTo: function(N) {
var M = at(N) ? h.filter(N)[0] : N[0];
return d[M.id()];
},
pathTo: function(N) {
var M = at(N) ? h.filter(N)[0] : N[0], I = [], z = M, R = z.id();
if (M.length > 0)
for (I.unshift(M); c[R]; ) {
var q = c[R];
I.unshift(q.edge), I.unshift(q.node), z = q.node, R = z.id();
}
return i.spawn(I);
}
};
}
}, Vae = {
// kruskal's algorithm (finds min spanning tree, assuming undirected graph)
// implemented from pseudocode from wikipedia
kruskal: function(e) {
e = e || function(b) {
return 1;
};
for (var t = this.byGroup(), n = t.nodes, r = t.edges, o = n.length, a = new Array(o), i = n, s = function(b) {
for (var x = 0; x < a.length; x++) {
var w = a[x];
if (w.has(b))
return x;
}
}, u = 0; u < o; u++)
a[u] = this.spawn(n[u]);
for (var l = r.sort(function(b, x) {
return e(b) - e(x);
}), c = 0; c < l.length; c++) {
var d = l[c], f = d.source()[0], h = d.target()[0], p = s(f), v = s(h), m = a[p], g = a[v];
p !== v && (i.merge(d), m.merge(g), a.splice(v, 1));
}
return i;
}
}, jae = nr({
root: null,
goal: null,
weight: function(e) {
return 1;
},
heuristic: function(e) {
return 0;
},
directed: !1
}), Hae = {
// Implemented from pseudocode from wikipedia
aStar: function(e) {
var t = this.cy(), n = jae(e), r = n.root, o = n.goal, a = n.heuristic, i = n.directed, s = n.weight;
r = t.collection(r)[0], o = t.collection(o)[0];
var u = r.id(), l = o.id(), c = {}, d = {}, f = {}, h = new ed(function(q, oe) {
return d[q.id()] - d[oe.id()];
}), p = new Kl(), v = {}, m = {}, g = function(q, oe) {
h.push(q), p.add(oe);
}, b, x, w = function() {
b = h.pop(), x = b.id(), p.delete(x);
}, C = function(q) {
return p.has(q);
};
g(r, u), c[u] = 0, d[u] = a(r);
for (var k = 0; h.size() > 0; ) {
if (w(), k++, x === l) {
for (var E = [], S = o, O = l, F = m[O]; E.unshift(S), F != null && E.unshift(F), S = v[O], S != null; )
O = S.id(), F = m[O];
return {
found: !0,
distance: c[x],
path: this.spawn(E),
steps: k
};
}
f[x] = !0;
for (var $ = b._private.edges, A = 0; A < $.length; A++) {
var L = $[A];
if (this.hasElementWithId(L.id()) && !(i && L.data("source") !== x)) {
var N = L.source(), M = L.target(), I = N.id() !== x ? N : M, z = I.id();
if (this.hasElementWithId(z) && !f[z]) {
var R = c[x] + s(L);
if (!C(z)) {
c[z] = R, d[z] = R + a(I), g(I, z), v[z] = b, m[z] = L;
continue;
}
R < c[z] && (c[z] = R, d[z] = R + a(I), v[z] = b, m[z] = L);
}
}
}
}
return {
found: !1,
distance: void 0,
path: void 0,
steps: k
};
}
}, Uae = nr({
weight: function(e) {
return 1;
},
directed: !1
}), qae = {
// Implemented from pseudocode from wikipedia
floydWarshall: function(e) {
for (var t = this.cy(), n = Uae(e), r = n.weight, o = n.directed, a = r, i = this.byGroup(), s = i.nodes, u = i.edges, l = s.length, c = l * l, d = function(Q) {
return s.indexOf(Q);
}, f = function(Q) {
return s[Q];
}, h = new Array(c), p = 0; p < c; p++) {
var v = p % l, m = (p - v) / l;
m === v ? h[p] = 0 : h[p] = 1 / 0;
}
for (var g = new Array(c), b = new Array(c), x = 0; x < u.length; x++) {
var w = u[x], C = w.source()[0], k = w.target()[0];
if (C !== k) {
var E = d(C), S = d(k), O = E * l + S, F = a(w);
if (h[O] > F && (h[O] = F, g[O] = S, b[O] = w), !o) {
var $ = S * l + E;
!o && h[$] > F && (h[$] = F, g[$] = E, b[$] = w);
}
}
}
for (var A = 0; A < l; A++)
for (var L = 0; L < l; L++)
for (var N = L * l + A, M = 0; M < l; M++) {
var I = L * l + M, z = A * l + M;
h[N] + h[z] < h[I] && (h[I] = h[N] + h[z], g[I] = g[N]);
}
var R = function(Q) {
return (at(Q) ? t.filter(Q) : Q)[0];
}, q = function(Q) {
return d(R(Q));
}, oe = {
distance: function(Q, ae) {
var pe = q(Q), we = q(ae);
return h[pe * l + we];
},
path: function(Q, ae) {
var pe = q(Q), we = q(ae), ke = f(pe);
if (pe === we)
return ke.collection();
if (g[pe * l + we] == null)
return t.collection();
var fe = t.collection(), ge = pe, J;
for (fe.merge(ke); pe !== we; )
ge = pe, pe = g[pe * l + we], J = b[ge * l + pe], fe.merge(J), fe.merge(f(pe));
return fe;
}
};
return oe;
}
// floydWarshall
}, Wae = nr({
weight: function(e) {
return 1;
},
directed: !1,
root: null
}), Kae = {
// Implemented from pseudocode from wikipedia
bellmanFord: function(e) {
var t = this, n = Wae(e), r = n.weight, o = n.directed, a = n.root, i = r, s = this, u = this.cy(), l = this.byGroup(), c = l.edges, d = l.nodes, f = d.length, h = new Go(), p = !1, v = [];
a = u.collection(a)[0], c.unmergeBy(function(Ae) {
return Ae.isLoop();
});
for (var m = c.length, g = function(Ae) {
var Be = h.get(Ae.id());
return Be || (Be = {}, h.set(Ae.id(), Be)), Be;
}, b = function(Ae) {
return (at(Ae) ? u.$(Ae) : Ae)[0];
}, x = function(Ae) {
return g(b(Ae)).dist;
}, w = function(Ae) {
for (var Be = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : a, Ue = b(Ae), Ze = [], Me = Ue; ; ) {
if (Me == null)
return t.spawn();
var rt = g(Me), nt = rt.edge, st = rt.pred;
if (Ze.unshift(Me[0]), Me.same(Be) && Ze.length > 0)
break;
nt != null && Ze.unshift(nt), Me = st;
}
return s.spawn(Ze);
}, C = 0; C < f; C++) {
var k = d[C], E = g(k);
k.same(a) ? E.dist = 0 : E.dist = 1 / 0, E.pred = null, E.edge = null;
}
for (var S = !1, O = function(Ae, Be, Ue, Ze, Me, rt) {
var nt = Ze.dist + rt;
nt < Me.dist && !Ue.same(Ze.edge) && (Me.dist = nt, Me.pred = Ae, Me.edge = Ue, S = !0);
}, F = 1; F < f; F++) {
S = !1;
for (var $ = 0; $ < m; $++) {
var A = c[$], L = A.source(), N = A.target(), M = i(A), I = g(L), z = g(N);
O(L, N, A, I, z, M), o || O(N, L, A, z, I, M);
}
if (!S)
break;
}
if (S)
for (var R = [], q = 0; q < m; q++) {
var oe = c[q], Q = oe.source(), ae = oe.target(), pe = i(oe), we = g(Q).dist, ke = g(ae).dist;
if (we + pe < ke || !o && ke + pe < we)
if (p || (Mt("Graph contains a negative weight cycle for Bellman-Ford"), p = !0), e.findNegativeWeightCycles !== !1) {
var fe = [];
we + pe < ke && fe.push(Q), !o && ke + pe < we && fe.push(ae);
for (var ge = fe.length, J = 0; J < ge; J++) {
var te = fe[J], le = [te];
le.push(g(te).edge);
for (var Ee = g(te).pred; le.indexOf(Ee) === -1; )
le.push(Ee), le.push(g(Ee).edge), Ee = g(Ee).pred;
le = le.slice(le.indexOf(Ee));
for (var Ne = le[0].id(), je = 0, _e = 2; _e < le.length; _e += 2)
le[_e].id() < Ne && (Ne = le[_e].id(), je = _e);
le = le.slice(je).concat(le.slice(0, je)), le.push(le[0]);
var De = le.map(function(Ae) {
return Ae.id();
}).join(",");
R.indexOf(De) === -1 && (v.push(s.spawn(le)), R.push(De));
}
} else
break;
}
return {
distanceTo: x,
pathTo: w,
hasNegativeWeightCycle: p,
negativeWeightCycles: v
};
}
// bellmanFord
}, Gae = Math.sqrt(2), Xae = function(e, t, n) {
n.length === 0 && vn("Karger-Stein must be run on a connected (sub)graph");
for (var r = n[e], o = r[1], a = r[2], i = t[o], s = t[a], u = n, l = u.length - 1; l >= 0; l--) {
var c = u[l], d = c[1], f = c[2];
(t[d] === i && t[f] === s || t[d] === s && t[f] === i) && u.splice(l, 1);
}
for (var h = 0; h < u.length; h++) {
var p = u[h];
p[1] === s ? (u[h] = p.slice(), u[h][1] = i) : p[2] === s && (u[h] = p.slice(), u[h][2] = i);
}
for (var v = 0; v < t.length; v++)
t[v] === s && (t[v] = i);
return u;
}, _v = function(e, t, n, r) {
for (; n > r; ) {
var o = Math.floor(Math.random() * t.length);
t = Xae(o, e, t), n--;
}
return t;
}, Yae = {
// 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(z) {
return z.isLoop();
});
var o = n.length, a = r.length, i = Math.ceil(Math.pow(Math.log(o) / Math.LN2, 2)), s = Math.floor(o / Gae);
if (o < 2) {
vn("At least 2 nodes are required for Karger-Stein algorithm");
return;
}
for (var u = [], l = 0; l < a; l++) {
var c = r[l];
u.push([l, n.indexOf(c.source()), n.indexOf(c.target())]);
}
for (var d = 1 / 0, f = [], h = new Array(o), p = new Array(o), v = new Array(o), m = function(z, R) {
for (var q = 0; q < o; q++)
R[q] = z[q];
}, g = 0; g <= i; g++) {
for (var b = 0; b < o; b++)
p[b] = b;
var x = _v(p, u.slice(), o, s), w = x.slice();
m(p, v);
var C = _v(p, x, s, 2), k = _v(v, w, s, 2);
C.length <= k.length && C.length < d ? (d = C.length, f = C, m(p, h)) : k.length <= C.length && k.length < d && (d = k.length, f = k, m(v, h));
}
for (var E = this.spawn(f.map(function(z) {
return r[z[0]];
})), S = this.spawn(), O = this.spawn(), F = h[0], $ = 0; $ < h.length; $++) {
var A = h[$], L = n[$];
A === F ? S.merge(L) : O.merge(L);
}
var N = function(z) {
var R = e.spawn();
return z.forEach(function(q) {
R.merge(q), q.connectedEdges().forEach(function(oe) {
e.contains(oe) && !E.contains(oe) && R.merge(oe);
});
}), R;
}, M = [N(S), N(O)], I = {
cut: E,
components: M,
// n.b. partitions are included to be compatible with the old api spec
// (could be removed in a future major version)
partition1: S,
partition2: O
};
return I;
}
}, Zae = function(e) {
return {
x: e.x,
y: e.y
};
}, gh = function(e, t, n) {
return {
x: e.x * t + n.x,
y: e.y * t + n.y
};
}, pS = function(e, t, n) {
return {
x: (e.x - n.x) / t,
y: (e.y - n.y) / t
};
}, tl = function(e) {
return {
x: e[0],
y: e[1]
};
}, Jae = function(e) {
for (var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : e.length, r = 1 / 0, o = t; o < n; o++) {
var a = e[o];
isFinite(a) && (r = Math.min(a, r));
}
return r;
}, Qae = function(e) {
for (var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : e.length, r = -1 / 0, o = t; o < n; o++) {
var a = e[o];
isFinite(a) && (r = Math.max(a, r));
}
return r;
}, eie = function(e) {
for (var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : e.length, r = 0, o = 0, a = t; a < n; a++) {
var i = e[a];
isFinite(i) && (r += i, o++);
}
return r / o;
}, tie = function(e) {
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : e.length, r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !0, o = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !0, a = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : !0;
r ? e = e.slice(t, n) : (n < e.length && e.splice(n, e.length - n), t > 0 && e.splice(0, t));
for (var i = 0, s = e.length - 1; s >= 0; s--) {
var u = e[s];
a ? isFinite(u) || (e[s] = -1 / 0, i++) : e.splice(s, 1);
}
o && e.sort(function(d, f) {
return d - f;
});
var l = e.length, c = Math.floor(l / 2);
return l % 2 !== 0 ? e[c + 1 + i] : (e[c - 1 + i] + e[c + i]) / 2;
}, nie = function(e) {
return Math.PI * e / 180;
}, Md = function(e, t) {
return Math.atan2(t, e) - Math.PI / 2;
}, by = Math.log2 || function(e) {
return Math.log(e) / Math.log(2);
}, fS = function(e) {
return e > 0 ? 1 : e < 0 ? -1 : 0;
}, bs = function(e, t) {
return Math.sqrt(zi(e, t));
}, zi = function(e, t) {
var n = t.x - e.x, r = t.y - e.y;
return n * n + r * r;
}, rie = function(e) {
for (var t = e.length, n = 0, r = 0; r < t; r++)
n += e[r];
for (var o = 0; o < t; o++)
e[o] = e[o] / n;
return e;
}, Mn = function(e, t, n, r) {
return (1 - r) * (1 - r) * e + 2 * (1 - r) * r * t + r * r * n;
}, al = function(e, t, n, r) {
return {
x: Mn(e.x, t.x, n.x, r),
y: Mn(e.y, t.y, n.y, r)
};
}, oie = function(e, t, n, r) {
var o = {
x: t.x - e.x,
y: t.y - e.y
}, a = bs(e, t), i = {
x: o.x / a,
y: o.y / a
};
return n = n ?? 0, r = r ?? n * a, {
x: e.x + i.x * r,
y: e.y + i.y * r
};
}, yc = function(e, t, n) {
return Math.max(e, Math.min(n, t));
}, Br = 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
};
}
}, aie = function(e) {
return {
x1: e.x1,
x2: e.x2,
w: e.w,
y1: e.y1,
y2: e.y2,
h: e.h
};
}, iie = function(e) {
e.x1 = 1 / 0, e.y1 = 1 / 0, e.x2 = -1 / 0, e.y2 = -1 / 0, e.w = 0, e.h = 0;
}, sie = 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
};
}, hS = 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;
}, lie = 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;
}, hp = 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;
}, vp = function(e) {
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [0], n, r, o, a;
if (t.length === 1)
n = r = o = a = t[0];
else if (t.length === 2)
n = o = t[0], a = r = t[1];
else if (t.length === 4) {
var i = Co(t, 4);
n = i[0], r = i[1], o = i[2], a = i[3];
}
return e.x1 -= a, e.x2 += r, e.y1 -= n, e.y2 += o, e.w = e.x2 - e.x1, e.h = e.y2 - e.y1, e;
}, mx = 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;
}, wy = 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);
}, Fl = function(e, t, n) {
return e.x1 <= t && t <= e.x2 && e.y1 <= n && n <= e.y2;
}, uie = function(e, t) {
return Fl(e, t.x, t.y);
}, vS = function(e, t) {
return Fl(e, t.x1, t.y1) && Fl(e, t.x2, t.y2);
}, gS = function(e, t, n, r, o, a, i) {
var s = arguments.length > 7 && arguments[7] !== void 0 ? arguments[7] : "auto", u = s === "auto" ? ws(o, a) : s, l = o / 2, c = a / 2;
u = Math.min(u, l, c);
var d = u !== l, f = u !== c, h;
if (d) {
var p = n - l + u - i, v = r - c - i, m = n + l - u + i, g = v;
if (h = ai(e, t, n, r, p, v, m, g, !1), h.length > 0)
return h;
}
if (f) {
var b = n + l + i, x = r - c + u - i, w = b, C = r + c - u + i;
if (h = ai(e, t, n, r, b, x, w, C, !1), h.length > 0)
return h;
}
if (d) {
var k = n - l + u - i, E = r + c + i, S = n + l - u + i, O = E;
if (h = ai(e, t, n, r, k, E, S, O, !1), h.length > 0)
return h;
}
if (f) {
var F = n - l - i, $ = r - c + u - i, A = F, L = r + c - u + i;
if (h = ai(e, t, n, r, F, $, A, L, !1), h.length > 0)
return h;
}
var N;
{
var M = n - l + u, I = r - c + u;
if (N = Ou(e, t, n, r, M, I, u + i), N.length > 0 && N[0] <= M && N[1] <= I)
return [N[0], N[1]];
}
{
var z = n + l - u, R = r - c + u;
if (N = Ou(e, t, n, r, z, R, u + i), N.length > 0 && N[0] >= z && N[1] <= R)
return [N[0], N[1]];
}
{
var q = n + l - u, oe = r + c - u;
if (N = Ou(e, t, n, r, q, oe, u + i), N.length > 0 && N[0] >= q && N[1] >= oe)
return [N[0], N[1]];
}
{
var Q = n - l + u, ae = r + c - u;
if (N = Ou(e, t, n, r, Q, ae, u + i), N.length > 0 && N[0] <= Q && N[1] >= ae)
return [N[0], N[1]];
}
return [];
}, cie = function(e, t, n, r, o, a, i) {
var s = i, u = Math.min(n, o), l = Math.max(n, o), c = Math.min(r, a), d = Math.max(r, a);
return u - s <= e && e <= l + s && c - s <= t && t <= d + s;
}, die = function(e, t, n, r, o, a, i, s, u) {
var l = {
x1: Math.min(n, i, o) - u,
x2: Math.max(n, i, o) + u,
y1: Math.min(r, s, a) - u,
y2: Math.max(r, s, a) + u
};
return !(e < l.x1 || e > l.x2 || t < l.y1 || t > l.y2);
}, pie = function(e, t, n, r) {
n -= r;
var o = t * t - 4 * e * n;
if (o < 0)
return [];
var a = Math.sqrt(o), i = 2 * e, s = (-t + a) / i, u = (-t - a) / i;
return [s, u];
}, fie = function(e, t, n, r, o) {
var a = 1e-5;
e === 0 && (e = a), t /= e, n /= e, r /= e;
var i, s, u, l, c, d, f, h;
if (s = (3 * n - t * t) / 9, u = -(27 * r) + t * (9 * n - 2 * (t * t)), u /= 54, i = s * s * s + u * u, o[1] = 0, f = t / 3, i > 0) {
c = u + Math.sqrt(i), c = c < 0 ? -Math.pow(-c, 1 / 3) : Math.pow(c, 1 / 3), d = u - Math.sqrt(i), d = d < 0 ? -Math.pow(-d, 1 / 3) : Math.pow(d, 1 / 3), o[0] = -f + c + d, f += (c + d) / 2, o[4] = o[2] = -f, f = Math.sqrt(3) * (-d + c) / 2, o[3] = f, o[5] = -f;
return;
}
if (o[5] = o[3] = 0, i === 0) {
h = u < 0 ? -Math.pow(-u, 1 / 3) : Math.pow(u, 1 / 3), o[0] = -f + 2 * h, o[4] = o[2] = -(h + f);
return;
}
s = -s, l = s * s * s, l = Math.acos(u / Math.sqrt(l)), h = 2 * Math.sqrt(s), o[0] = -f + h * Math.cos(l / 3), o[2] = -f + h * Math.cos((l + 2 * Math.PI) / 3), o[4] = -f + h * Math.cos((l + 4 * Math.PI) / 3);
}, hie = function(e, t, n, r, o, a, i, s) {
var u = 1 * n * n - 4 * n * o + 2 * n * i + 4 * o * o - 4 * o * i + i * i + r * r - 4 * r * a + 2 * r * s + 4 * a * a - 4 * a * s + s * s, l = 1 * 9 * n * o - 3 * n * n - 3 * n * i - 6 * o * o + 3 * o * i + 9 * r * a - 3 * r * r - 3 * r * s - 6 * a * a + 3 * a * s, c = 1 * 3 * n * n - 6 * n * o + n * i - n * e + 2 * o * o + 2 * o * e - i * e + 3 * r * r - 6 * r * a + r * s - r * t + 2 * a * a + 2 * a * t - s * t, d = 1 * n * o - n * n + n * e - o * e + r * a - r * r + r * t - a * t, f = [];
fie(u, l, 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, b, x, w = 0; w < p.length; w++)
g = Math.pow(1 - p[w], 2) * n + 2 * (1 - p[w]) * p[w] * o + p[w] * p[w] * i, b = Math.pow(1 - p[w], 2) * r + 2 * (1 - p[w]) * p[w] * a + p[w] * p[w] * s, x = Math.pow(g - e, 2) + Math.pow(b - t, 2), m >= 0 ? x < m && (m = x) : m = x;
return m;
}, vie = function(e, t, n, r, o, a) {
var i = [e - n, t - r], s = [o - n, a - r], u = s[0] * s[0] + s[1] * s[1], l = i[0] * i[0] + i[1] * i[1], c = i[0] * s[0] + i[1] * s[1], d = c * c / u;
return c < 0 ? l : d > u ? (e - o) * (e - o) + (t - a) * (t - a) : l - d;
}, Sr = function(e, t, n) {
for (var r, o, a, i, s, u = 0, l = 0; l < n.length / 2; l++)
if (r = n[l * 2], o = n[l * 2 + 1], l + 1 < n.length / 2 ? (a = n[(l + 1) * 2], i = n[(l + 1) * 2 + 1]) : (a = n[(l + 1 - n.length / 2) * 2], i = n[(l + 1 - n.length / 2) * 2 + 1]), !(r == e && a == e)) if (r >= e && e >= a || r <= e && e <= a)
s = (e - r) / (a - r) * (i - o) + o, s > t && u++;
else
continue;
return u % 2 !== 0;
}, Ta = function(e, t, n, r, o, a, i, s, u) {
var l = 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 < l.length / 2; h++)
l[h * 2] = a / 2 * (n[h * 2] * d - n[h * 2 + 1] * f), l[h * 2 + 1] = i / 2 * (n[h * 2 + 1] * d + n[h * 2] * f), l[h * 2] += r, l[h * 2 + 1] += o;
var p;
if (u > 0) {
var v = rf(l, -u);
p = nf(v);
} else
p = l;
return Sr(e, t, p);
}, gie = function(e, t, n, r, o, a, i, s) {
for (var u = new Array(n.length * 2), l = 0; l < s.length; l++) {
var c = s[l];
u[l * 4 + 0] = c.startX, u[l * 4 + 1] = c.startY, u[l * 4 + 2] = c.stopX, u[l * 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 Sr(e, t, u);
}, nf = function(e) {
for (var t = new Array(e.length / 2), n, r, o, a, i, s, u, l, c = 0; c < e.length / 4; c++) {
n = e[c * 4], r = e[c * 4 + 1], o = e[c * 4 + 2], a = e[c * 4 + 3], c < e.length / 4 - 1 ? (i = e[(c + 1) * 4], s = e[(c + 1) * 4 + 1], u = e[(c + 1) * 4 + 2], l = e[(c + 1) * 4 + 3]) : (i = e[0], s = e[1], u = e[2], l = e[3]);
var d = ai(n, r, o, a, i, s, u, l, !0);
t[c * 2] = d[0], t[c * 2 + 1] = d[1];
}
return t;
}, rf = function(e, t) {
for (var n = new Array(e.length * 2), r, o, a, i, s = 0; s < e.length / 2; s++) {
r = e[s * 2], o = e[s * 2 + 1], s < e.length / 2 - 1 ? (a = e[(s + 1) * 2], i = e[(s + 1) * 2 + 1]) : (a = e[0], i = e[1]);
var u = i - o, l = -(a - r), c = Math.sqrt(u * u + l * l), d = u / c, f = l / c;
n[s * 4] = r + d * t, n[s * 4 + 1] = o + f * t, n[s * 4 + 2] = a + d * t, n[s * 4 + 3] = i + f * t;
}
return n;
}, mie = function(e, t, n, r, o, a) {
var i = n - e, s = r - t;
i /= o, s /= a;
var u = Math.sqrt(i * i + s * s), l = u - 1;
if (l < 0)
return [];
var c = l / u;
return [(n - e) * c + e, (r - t) * c + t];
}, Yi = function(e, t, n, r, o, a, i) {
return e -= o, t -= a, e /= n / 2 + i, t /= r / 2 + i, e * e + t * t <= 1;
}, Ou = function(e, t, n, r, o, a, i) {
var s = [n - e, r - t], u = [e - o, t - a], l = s[0] * s[0] + s[1] * s[1], c = 2 * (u[0] * s[0] + u[1] * s[1]), d = u[0] * u[0] + u[1] * u[1] - i * i, f = c * c - 4 * l * d;
if (f < 0)
return [];
var h = (-c + Math.sqrt(f)) / (2 * l), p = (-c - Math.sqrt(f)) / (2 * l), 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 b = g[0] * s[0] + e, x = g[0] * s[1] + t;
if (g.length > 1) {
if (g[0] == g[1])
return [b, x];
var w = g[1] * s[0] + e, C = g[1] * s[1] + t;
return [b, x, w, C];
} else
return [b, x];
}, Tv = function(e, t, n) {
return t <= e && e <= n || n <= e && e <= t ? e : e <= t && t <= n || n <= t && t <= e ? t : n;
}, ai = function(e, t, n, r, o, a, i, s, u) {
var l = e - o, c = n - e, d = i - o, f = t - a, h = r - t, p = s - a, v = d * f - p * l, m = c * f - h * l, g = p * c - d * h;
if (g !== 0) {
var b = v / g, x = m / g, w = 1e-3, C = 0 - w, k = 1 + w;
return C <= b && b <= k && C <= x && x <= k ? [e + b * c, t + b * h] : u ? [e + b * c, t + b * h] : [];
} else
return v === 0 || m === 0 ? Tv(e, n, i) === i ? [i, s] : Tv(e, n, o) === o ? [o, a] : Tv(o, i, n) === n ? [n, r] : [] : [];
}, bc = function(e, t, n, r, o, a, i, s) {
var u = [], l, c = new Array(n.length), d = !0;
a == null && (d = !1);
var f;
if (d) {
for (var h = 0; h < c.length / 2; h++)
c[h * 2] = n[h * 2] * a + r, c[h * 2 + 1] = n[h * 2 + 1] * i + o;
if (s > 0) {
var p = rf(c, -s);
f = nf(p);
} else
f = c;
} else
f = n;
for (var v, m, g, b, 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], b = f[(x + 1) * 2 + 1]) : (g = f[0], b = f[1]), l = ai(e, t, r, o, v, m, g, b), l.length !== 0 && u.push(l[0], l[1]);
return u;
}, yie = function(e, t, n, r, o, a, i, s, u) {
var l = [], c, d = new Array(n.length * 2);
u.forEach(function(g, b) {
b === 0 ? (d[d.length - 2] = g.startX, d[d.length - 1] = g.startY) : (d[b * 4 - 2] = g.startX, d[b * 4 - 1] = g.startY), d[b * 4] = g.stopX, d[b * 4 + 1] = g.stopY, c = Ou(e, t, r, o, g.cx, g.cy, g.radius), c.length !== 0 && l.push(c[0], c[1]);
});
for (var f = 0; f < d.length / 4; f++)
c = ai(e, t, r, o, d[f * 4], d[f * 4 + 1], d[f * 4 + 2], d[f * 4 + 3], !1), c.length !== 0 && l.push(c[0], c[1]);
if (l.length > 2) {
for (var h = [l[0], l[1]], p = Math.pow(h[0] - e, 2) + Math.pow(h[1] - t, 2), v = 1; v < l.length / 2; v++) {
var m = Math.pow(l[v * 2] - e, 2) + Math.pow(l[v * 2 + 1] - t, 2);
m <= p && (h[0] = l[v * 2], h[1] = l[v * 2 + 1], p = m);
}
return h;
}
return l;
}, zd = function(e, t, n) {
var r = [e[0] - t[0], e[1] - t[1]], o = Math.sqrt(r[0] * r[0] + r[1] * r[1]), a = (o - n) / o;
return a < 0 && (a = 1e-5), [t[0] + a * r[0], t[1] + a * r[1]];
}, yr = function(e, t) {
var n = N0(e, t);
return n = mS(n), n;
}, mS = function(e) {
for (var t, n, r = e.length / 2, o = 1 / 0, a = 1 / 0, i = -1 / 0, s = -1 / 0, u = 0; u < r; u++)
t = e[2 * u], n = e[2 * u + 1], o = Math.min(o, t), i = Math.max(i, t), a = Math.min(a, n), s = Math.max(s, n);
for (var l = 2 / (i - o), c = 2 / (s - a), d = 0; d < r; d++)
t = e[2 * d] = e[2 * d] * l, n = e[2 * d + 1] = e[2 * d + 1] * c, o = Math.min(o, t), i = Math.max(i, t), a = Math.min(a, n), s = Math.max(s, n);
if (a < -1)
for (var f = 0; f < r; f++)
n = e[2 * f + 1] = e[2 * f + 1] + (-1 - a);
return e;
}, N0 = function(e, t) {
var n = 1 / e * 2 * Math.PI, r = e % 2 === 0 ? Math.PI / 2 + n / 2 : Math.PI / 2;
r += t;
for (var o = new Array(e * 2), a, i = 0; i < e; i++)
a = i * n + r, o[2 * i] = Math.cos(a), o[2 * i + 1] = Math.sin(-a);
return o;
}, ws = function(e, t) {
return Math.min(e / 4, t / 4, 8);
}, yS = function(e, t) {
return Math.min(e / 10, t / 10, 8);
}, xy = function() {
return 8;
}, bie = function(e, t, n) {
return [e - 2 * t + n, 2 * (t - e), e];
}, L0 = function(e, t) {
return {
heightOffset: Math.min(15, 0.05 * t),
widthOffset: Math.min(100, 0.25 * e),
ctrlPtOffsetPct: 0.05
};
}, wie = nr({
dampingFactor: 0.8,
precision: 1e-6,
iterations: 200,
weight: function(e) {
return 1;
}
}), xie = {
pageRank: function(e) {
for (var t = wie(e), n = t.dampingFactor, r = t.precision, o = t.iterations, a = t.weight, i = this._private.cy, s = this.byGroup(), u = s.nodes, l = s.edges, c = u.length, d = c * c, f = l.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 b = m * c + g;
h[b] = 0;
}
p[m] = 0;
}
for (var x = 0; x < f; x++) {
var w = l[x], C = w.data("source"), k = w.data("target");
if (C !== k) {
var E = u.indexOfId(C), S = u.indexOfId(k), O = a(w), F = S * c + E;
h[F] += O, p[E] += O;
}
}
for (var $ = 1 / c + v, A = 0; A < c; A++)
if (p[A] === 0)
for (var L = 0; L < c; L++) {
var N = L * c + A;
h[N] = $;
}
else
for (var M = 0; M < c; M++) {
var I = M * c + A;
h[I] = h[I] / p[A] + v;
}
for (var z = new Array(c), R = new Array(c), q, oe = 0; oe < c; oe++)
z[oe] = 1;
for (var Q = 0; Q < o; Q++) {
for (var ae = 0; ae < c; ae++)
R[ae] = 0;
for (var pe = 0; pe < c; pe++)
for (var we = 0; we < c; we++) {
var ke = pe * c + we;
R[pe] += h[ke] * z[we];
}
rie(R), q = z, z = R, R = q;
for (var fe = 0, ge = 0; ge < c; ge++) {
var J = q[ge] - z[ge];
fe += J * J;
}
if (fe < r)
break;
}
var te = {
rank: function(le) {
return le = i.collection(le)[0], z[u.indexOf(le)];
}
};
return te;
}
// pageRank
}, yx = nr({
root: null,
weight: function(e) {
return 1;
},
directed: !1,
alpha: 0
}), il = {
degreeCentralityNormalized: function(e) {
e = yx(e);
var t = this.cy(), n = this.nodes(), r = n.length;
if (e.directed) {
for (var o = {}, a = {}, i = 0, s = 0, u = 0; u < r; u++) {
var l = n[u], c = l.id();
e.root = l;
var d = this.degreeCentrality(e);
i < d.indegree && (i = d.indegree), s < d.outdegree && (s = d.outdegree), o[c] = d.indegree, a[c] = d.outdegree;
}
return {
indegree: function(g) {
return i == 0 ? 0 : (at(g) && (g = t.filter(g)), o[g.id()] / i);
},
outdegree: function(g) {
return s === 0 ? 0 : (at(g) && (g = t.filter(g)), a[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 : (at(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 = yx(e);
var t = this.cy(), n = this, r = e, o = r.root, a = r.weight, i = r.directed, s = r.alpha;
if (o = t.collection(o)[0], i) {
for (var u = o.connectedEdges(), l = u.filter(function(C) {
return C.target().same(o) && n.has(C);
}), c = u.filter(function(C) {
return C.source().same(o) && n.has(C);
}), d = l.length, f = c.length, h = 0, p = 0, v = 0; v < l.length; v++)
h += a(l[v]);
for (var m = 0; m < c.length; m++)
p += a(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 = o.connectedEdges().intersection(n), b = g.length, x = 0, w = 0; w < g.length; w++)
x += a(g[w]);
return {
degree: Math.pow(b, 1 - s) * Math.pow(x, s)
};
}
}
// degreeCentrality
};
il.dc = il.degreeCentrality;
il.dcn = il.degreeCentralityNormalised = il.degreeCentralityNormalized;
var bx = nr({
harmonic: !0,
weight: function() {
return 1;
},
directed: !1,
root: null
}), sl = {
closenessCentralityNormalized: function(e) {
for (var t = bx(e), n = t.harmonic, r = t.weight, o = t.directed, a = this.cy(), i = {}, s = 0, u = this.nodes(), l = this.floydWarshall({
weight: r,
directed: o
}), c = 0; c < u.length; c++) {
for (var d = 0, f = u[c], h = 0; h < u.length; h++)
if (c !== h) {
var p = l.distance(f, u[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 : (at(v) ? v = a.filter(v)[0].id() : v = v.id(), i[v] / s);
}
};
},
// Implemented from pseudocode from wikipedia
closenessCentrality: function(e) {
var t = bx(e), n = t.root, r = t.weight, o = t.directed, a = t.harmonic;
n = this.filter(n)[0];
for (var i = this.dijkstra({
root: n,
weight: r,
directed: o
}), s = 0, u = this.nodes(), l = 0; l < u.length; l++) {
var c = u[l];
if (!c.same(n)) {
var d = i.distanceTo(c);
a ? s += 1 / d : s += d;
}
}
return a ? s : 1 / s;
}
// closenessCentrality
};
sl.cc = sl.closenessCentrality;
sl.ccn = sl.closenessCentralityNormalised = sl.closenessCentralityNormalized;
var kie = nr({
weight: null,
directed: !1
}), D0 = {
// 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 = kie(e), n = t.directed, r = t.weight, o = r != null, a = this.cy(), i = this.nodes(), s = {}, u = {}, l = 0, c = {
set: function(g, b) {
u[g] = b, b > l && (l = b);
},
get: function(g) {
return u[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 b = i[g].id(), x = [], w = {}, C = {}, k = {}, E = new ed(function(pe, we) {
return k[pe] - k[we];
}), S = 0; S < i.length; S++) {
var O = i[S].id();
w[O] = [], C[O] = 0, k[O] = 1 / 0;
}
for (C[b] = 1, k[b] = 0, E.push(b); !E.empty(); ) {
var F = E.pop();
if (x.push(F), o)
for (var $ = 0; $ < s[F].length; $++) {
var A = s[F][$], L = a.getElementById(F), N = void 0;
L.edgesTo(A).length > 0 ? N = L.edgesTo(A)[0] : N = A.edgesTo(L)[0];
var M = r(N);
A = A.id(), k[A] > k[F] + M && (k[A] = k[F] + M, E.nodes.indexOf(A) < 0 ? E.push(A) : E.updateItem(A), C[A] = 0, w[A] = []), k[A] == k[F] + M && (C[A] = C[A] + C[F], w[A].push(F));
}
else
for (var I = 0; I < s[F].length; I++) {
var z = s[F][I].id();
k[z] == 1 / 0 && (E.push(z), k[z] = k[F] + 1), k[z] == k[F] + 1 && (C[z] = C[z] + C[F], w[z].push(F));
}
}
for (var R = {}, q = 0; q < i.length; q++)
R[i[q].id()] = 0;
for (; x.length > 0; ) {
for (var oe = x.pop(), Q = 0; Q < w[oe].length; Q++) {
var ae = w[oe][Q];
R[ae] = R[ae] + C[ae] / C[oe] * (1 + R[oe]);
}
oe != i[g].id() && c.set(oe, c.get(oe) + R[oe]);
}
}, v = 0; v < i.length; v++)
p(v);
var m = {
betweenness: function(g) {
var b = a.collection(g).id();
return c.get(b);
},
betweennessNormalized: function(g) {
if (l == 0)
return 0;
var b = a.collection(g).id();
return c.get(b) / l;
}
};
return m.betweennessNormalised = m.betweennessNormalized, m;
}
// betweennessCentrality
};
D0.bc = D0.betweennessCentrality;
var Cie = nr({
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;
}
]
}), Eie = function(e) {
return Cie(e);
}, Sie = function(e, t) {
for (var n = 0, r = 0; r < t.length; r++)
n += t[r](e);
return n;
}, _ie = function(e, t, n) {
for (var r = 0; r < t; r++)
e[r * t + r] = n;
}, bS = function(e, t) {
for (var n, r = 0; r < t; r++) {
n = 0;
for (var o = 0; o < t; o++)
n += e[o * t + r];
for (var a = 0; a < t; a++)
e[a * t + r] = e[a * t + r] / n;
}
}, Tie = function(e, t, n) {
for (var r = new Array(n * n), o = 0; o < n; o++) {
for (var a = 0; a < n; a++)
r[o * n + a] = 0;
for (var i = 0; i < n; i++)
for (var s = 0; s < n; s++)
r[o * n + s] += e[o * n + i] * t[i * n + s];
}
return r;
}, Oie = function(e, t, n) {
for (var r = e.slice(0), o = 1; o < n; o++)
e = Tie(e, r, t);
return e;
}, Pie = function(e, t, n) {
for (var r = new Array(t * t), o = 0; o < t * t; o++)
r[o] = Math.pow(e[o], n);
return bS(r, t), r;
}, $ie = function(e, t, n, r) {
for (var o = 0; o < n; o++) {
var a = Math.round(e[o] * Math.pow(10, r)) / Math.pow(10, r), i = Math.round(t[o] * Math.pow(10, r)) / Math.pow(10, r);
if (a !== i)
return !1;
}
return !0;
}, Aie = function(e, t, n, r) {
for (var o = [], a = 0; a < t; a++) {
for (var i = [], s = 0; s < t; s++)
Math.round(e[a * t + s] * 1e3) / 1e3 > 0 && i.push(n[s]);
i.length !== 0 && o.push(r.collection(i));
}
return o;
}, Fie = function(e, t) {
for (var n = 0; n < e.length; n++)
if (!t[n] || e[n].id() !== t[n].id())
return !1;
return !0;
}, Iie = function(e) {
for (var t = 0; t < e.length; t++)
for (var n = 0; n < e.length; n++)
t != n && Fie(e[t], e[n]) && e.splice(n, 1);
return e;
}, wx = function(e) {
for (var t = this.nodes(), n = this.edges(), r = this.cy(), o = Eie(e), a = {}, i = 0; i < t.length; i++)
a[t[i].id()] = i;
for (var s = t.length, u = s * s, l = new Array(u), c, d = 0; d < u; d++)
l[d] = 0;
for (var f = 0; f < n.length; f++) {
var h = n[f], p = a[h.source().id()], v = a[h.target().id()], m = Sie(h, o.attributes);
l[p * s + v] += m, l[v * s + p] += m;
}
_ie(l, s, o.multFactor), bS(l, s);
for (var g = !0, b = 0; g && b < o.maxIterations; )
g = !1, c = Oie(l, s, o.expandFactor), l = Pie(c, s, o.inflateFactor), $ie(l, c, u, 4) || (g = !0), b++;
var x = Aie(l, s, t, r);
return x = Iie(x), x;
}, Nie = {
markovClustering: wx,
mcl: wx
}, Lie = function(e) {
return e;
}, wS = function(e, t) {
return Math.abs(t - e);
}, xx = function(e, t, n) {
return e + wS(t, n);
}, kx = function(e, t, n) {
return e + Math.pow(n - t, 2);
}, Die = function(e) {
return Math.sqrt(e);
}, Rie = function(e, t, n) {
return Math.max(e, wS(t, n));
}, bu = function(e, t, n, r, o) {
for (var a = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : Lie, i = r, s, u, l = 0; l < e; l++)
s = t(l), u = n(l), i = o(i, s, u);
return a(i);
}, Il = {
euclidean: function(e, t, n) {
return e >= 2 ? bu(e, t, n, 0, kx, Die) : bu(e, t, n, 0, xx);
},
squaredEuclidean: function(e, t, n) {
return bu(e, t, n, 0, kx);
},
manhattan: function(e, t, n) {
return bu(e, t, n, 0, xx);
},
max: function(e, t, n) {
return bu(e, t, n, -1 / 0, Rie);
}
};
Il["squared-euclidean"] = Il.squaredEuclidean;
Il.squaredeuclidean = Il.squaredEuclidean;
function mh(e, t, n, r, o, a) {
var i;
return dn(e) ? i = e : i = Il[e] || Il.euclidean, t === 0 && dn(e) ? i(o, a) : i(t, n, r, o, a);
}
var Bie = nr({
k: 2,
m: 2,
sensitivityThreshold: 1e-4,
distance: "euclidean",
maxIterations: 10,
attributes: [],
testMode: !1,
testCentroids: null
}), ky = function(e) {
return Bie(e);
}, of = function(e, t, n, r, o) {
var a = o !== "kMedoids", i = a ? function(c) {
return n[c];
} : function(c) {
return r[c](n);
}, s = function(c) {
return r[c](t);
}, u = n, l = t;
return mh(e, r.length, i, s, u, l);
}, Ov = function(e, t, n) {
for (var r = n.length, o = new Array(r), a = new Array(r), i = new Array(t), s = null, u = 0; u < r; u++)
o[u] = e.min(n[u]).value, a[u] = e.max(n[u]).value;
for (var l = 0; l < t; l++) {
s = [];
for (var c = 0; c < r; c++)
s[c] = Math.random() * (a[c] - o[c]) + o[c];
i[l] = s;
}
return i;
}, xS = function(e, t, n, r, o) {
for (var a = 1 / 0, i = 0, s = 0; s < t.length; s++) {
var u = of(n, e, t[s], r, o);
u < a && (a = u, i = s);
}
return i;
}, kS = function(e, t, n) {
for (var r = [], o = null, a = 0; a < t.length; a++)
o = t[a], n[o.id()] === e && r.push(o);
return r;
}, Mie = function(e, t, n) {
return Math.abs(t - e) <= n;
}, zie = function(e, t, n) {
for (var r = 0; r < e.length; r++)
for (var o = 0; o < e[r].length; o++) {
var a = Math.abs(e[r][o] - t[r][o]);
if (a > n)
return !1;
}
return !0;
}, Vie = function(e, t, n) {
for (var r = 0; r < n; r++)
if (e === t[r]) return !0;
return !1;
}, Cx = function(e, t) {
var n = new Array(t);
if (e.length < 50)
for (var r = 0; r < t; r++) {
for (var o = e[Math.floor(Math.random() * e.length)]; Vie(o, n, r); )
o = e[Math.floor(Math.random() * e.length)];
n[r] = o;
}
else
for (var a = 0; a < t; a++)
n[a] = e[Math.floor(Math.random() * e.length)];
return n;
}, Ex = function(e, t, n) {
for (var r = 0, o = 0; o < t.length; o++)
r += of("manhattan", t[o], e, n, "kMedoids");
return r;
}, jie = function(e) {
var t = this.cy(), n = this.nodes(), r = null, o = ky(e), a = new Array(o.k), i = {}, s;
o.testMode ? typeof o.testCentroids == "number" ? (o.testCentroids, s = Ov(n, o.k, o.attributes)) : Dn(o.testCentroids) === "object" ? s = o.testCentroids : s = Ov(n, o.k, o.attributes) : s = Ov(n, o.k, o.attributes);
for (var u = !0, l = 0; u && l < o.maxIterations; ) {
for (var c = 0; c < n.length; c++)
r = n[c], i[r.id()] = xS(r, s, o.distance, o.attributes, "kMeans");
u = !1;
for (var d = 0; d < o.k; d++) {
var f = kS(d, n, i);
if (f.length !== 0) {
for (var h = o.attributes.length, p = s[d], v = new Array(h), m = new Array(h), g = 0; g < h; g++) {
m[g] = 0;
for (var b = 0; b < f.length; b++)
r = f[b], m[g] += o.attributes[g](r);
v[g] = m[g] / f.length, Mie(v[g], p[g], o.sensitivityThreshold) || (u = !0);
}
s[d] = v, a[d] = t.collection(f);
}
}
l++;
}
return a;
}, Hie = function(e) {
var t = this.cy(), n = this.nodes(), r = null, o = ky(e), a = new Array(o.k), i, s = {}, u, l = new Array(o.k);
o.testMode ? typeof o.testCentroids == "number" || (Dn(o.testCentroids) === "object" ? i = o.testCentroids : i = Cx(n, o.k)) : i = Cx(n, o.k);
for (var c = !0, d = 0; c && d < o.maxIterations; ) {
for (var f = 0; f < n.length; f++)
r = n[f], s[r.id()] = xS(r, i, o.distance, o.attributes, "kMedoids");
c = !1;
for (var h = 0; h < i.length; h++) {
var p = kS(h, n, s);
if (p.length !== 0) {
l[h] = Ex(i[h], p, o.attributes);
for (var v = 0; v < p.length; v++)
u = Ex(p[v], p, o.attributes), u < l[h] && (l[h] = u, i[h] = p[v], c = !0);
a[h] = t.collection(p);
}
}
d++;
}
return a;
}, Uie = function(e, t, n, r, o) {
for (var a, i, s = 0; s < t.length; s++)
for (var u = 0; u < e.length; u++)
r[s][u] = Math.pow(n[s][u], o.m);
for (var l = 0; l < e.length; l++)
for (var c = 0; c < o.attributes.length; c++) {
a = 0, i = 0;
for (var d = 0; d < t.length; d++)
a += r[d][l] * o.attributes[c](t[d]), i += r[d][l];
e[l][c] = a / i;
}
}, qie = function(e, t, n, r, o) {
for (var a = 0; a < e.length; a++)
t[a] = e[a].slice();
for (var i, s, u, l = 2 / (o.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 = of(o.distance, r[d], n[c], o.attributes, "cmeans"), u = of(o.distance, r[d], n[f], o.attributes, "cmeans"), i += Math.pow(s / u, l);
e[d][c] = 1 / i;
}
}, Wie = function(e, t, n, r) {
for (var o = new Array(n.k), a = 0; a < o.length; a++)
o[a] = [];
for (var i, s, u = 0; u < t.length; u++) {
i = -1 / 0, s = -1;
for (var l = 0; l < t[0].length; l++)
t[u][l] > i && (i = t[u][l], s = l);
o[s].push(e[u]);
}
for (var c = 0; c < o.length; c++)
o[c] = r.collection(o[c]);
return o;
}, Sx = function(e) {
var t = this.cy(), n = this.nodes(), r = ky(e), o, a, i, s, u;
s = new Array(n.length);
for (var l = 0; l < n.length; l++)
s[l] = 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;
}
a = new Array(r.k);
for (var v = 0; v < r.k; v++)
a[v] = new Array(r.attributes.length);
u = new Array(n.length);
for (var m = 0; m < n.length; m++)
u[m] = new Array(r.k);
for (var g = !0, b = 0; g && b < r.maxIterations; )
g = !1, Uie(a, n, i, u, r), qie(i, s, a, n, r), zie(i, s, r.sensitivityThreshold) || (g = !0), b++;
return o = Wie(n, i, r, t), {
clusters: o,
degreeOfMembership: i
};
}, Kie = {
kMeans: jie,
kMedoids: Hie,
fuzzyCMeans: Sx,
fcm: Sx
}, Gie = nr({
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
}), Xie = {
single: "min",
complete: "max"
}, Yie = function(e) {
var t = Gie(e), n = Xie[t.linkage];
return n != null && (t.linkage = n), t;
}, _x = function(e, t, n, r, o) {
for (var a = 0, i = 1 / 0, s, u = o.attributes, l = function(E, S) {
return mh(o.distance, u.length, function(O) {
return u[O](E);
}, function(O) {
return u[O](S);
}, E, S);
}, c = 0; c < e.length; c++) {
var d = e[c].key, f = n[d][r[d]];
f < i && (a = d, i = f);
}
if (o.mode === "threshold" && i >= o.threshold || o.mode === "dendrogram" && e.length === 1)
return !1;
var h = t[a], p = t[r[a]], v;
o.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 : o.linkage === "min" ? (s = n[h.key][g.key], n[h.key][g.key] > n[p.key][g.key] && (s = n[p.key][g.key])) : o.linkage === "max" ? (s = n[h.key][g.key], n[h.key][g.key] < n[p.key][g.key] && (s = n[p.key][g.key])) : o.linkage === "mean" ? s = (n[h.key][g.key] * h.size + n[p.key][g.key] * p.size) / (h.size + p.size) : o.mode === "dendrogram" ? s = l(g.value, h.value) : s = l(g.value[0], h.value[0]), n[h.key][g.key] = n[g.key][h.key] = s;
}
for (var b = 0; b < e.length; b++) {
var x = e[b].key;
if (r[x] === h.key || r[x] === p.key) {
for (var w = x, C = 0; C < e.length; C++) {
var k = e[C].key;
n[x][k] < n[x][w] && (w = k);
}
r[x] = w;
}
e[b].index = b;
}
return h.key = p.key = h.index = p.index = null, !0;
}, Vd = function e(t, n, r) {
t && (t.value ? n.push(t.value) : (t.left && e(t.left, n), t.right && e(t.right, n)));
}, Zie = function e(t, n) {
if (!t) return "";
if (t.left && t.right) {
var r = e(t.left, n), o = e(t.right, n), a = n.add({
group: "nodes",
data: {
id: r + "," + o
}
});
return n.add({
group: "edges",
data: {
source: r,
target: a.id()
}
}), n.add({
group: "edges",
data: {
source: o,
target: a.id()
}
}), a.id();
} else if (t.value)
return t.value.id();
}, Jie = function e(t, n, r) {
if (!t) return [];
var o = [], a = [], i = [];
return n === 0 ? (t.left && Vd(t.left, o), t.right && Vd(t.right, a), i = o.concat(a), [r.collection(i)]) : n === 1 ? t.value ? [r.collection(t.value)] : (t.left && Vd(t.left, o), t.right && Vd(t.right, a), [r.collection(o), r.collection(a)]) : t.value ? [r.collection(t.value)] : (t.left && (o = e(t.left, n - 1, r)), t.right && (a = e(t.right, n - 1, r)), o.concat(a));
}, Tx = function(e) {
for (var t = this.cy(), n = this.nodes(), r = Yie(e), o = r.attributes, a = function(g, b) {
return mh(r.distance, o.length, function(x) {
return o[x](g);
}, function(x) {
return o[x](b);
}, g, b);
}, i = [], s = [], u = [], l = [], c = 0; c < n.length; c++) {
var d = {
value: r.mode === "dendrogram" ? n[c] : [n[c]],
key: c,
index: c
};
i[c] = d, l[c] = d, s[c] = [], u[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 : a(i[f].value, i[h].value) : p = f === h ? 1 / 0 : a(i[f].value[0], i[h].value[0]), s[f][h] = p, s[h][f] = p, p < s[f][u[f]] && (u[f] = h);
}
for (var v = _x(i, l, s, u, r); v; )
v = _x(i, l, s, u, r);
var m;
return r.mode === "dendrogram" ? (m = Jie(i[0], r.dendrogramDepth, t), r.addDendrogram && Zie(i[0], t)) : (m = new Array(i.length), i.forEach(function(g, b) {
g.key = g.index = null, m[b] = t.collection(g.value);
})), m;
}, Qie = {
hierarchicalClustering: Tx,
hca: Tx
}, ese = nr({
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')
]
}), tse = function(e) {
var t = e.damping, n = e.preference;
0.5 <= t && t < 1 || vn("Damping must range on [0.5, 1). Got: ".concat(t));
var r = ["median", "mean", "min", "max"];
return r.some(function(o) {
return o === n;
}) || Ve(n) || vn("Preference must be one of [".concat(r.map(function(o) {
return "'".concat(o, "'");
}).join(", "), "] or a number. Got: ").concat(n)), ese(e);
}, nse = function(e, t, n, r) {
var o = function(a, i) {
return r[i](a);
};
return -mh(e, r.length, function(a) {
return o(t, a);
}, function(a) {
return o(n, a);
}, t, n);
}, rse = function(e, t) {
var n = null;
return t === "median" ? n = tie(e) : t === "mean" ? n = eie(e) : t === "min" ? n = Jae(e) : t === "max" ? n = Qae(e) : n = t, n;
}, ose = function(e, t, n) {
for (var r = [], o = 0; o < e; o++)
t[o * e + o] + n[o * e + o] > 0 && r.push(o);
return r;
}, Ox = function(e, t, n) {
for (var r = [], o = 0; o < e; o++) {
for (var a = -1, i = -1 / 0, s = 0; s < n.length; s++) {
var u = n[s];
t[o * e + u] > i && (a = u, i = t[o * e + u]);
}
a > 0 && r.push(a);
}
for (var l = 0; l < n.length; l++)
r[n[l]] = n[l];
return r;
}, ase = function(e, t, n) {
for (var r = Ox(e, t, n), o = 0; o < n.length; o++) {
for (var a = [], i = 0; i < r.length; i++)
r[i] === n[o] && a.push(i);
for (var s = -1, u = -1 / 0, l = 0; l < a.length; l++) {
for (var c = 0, d = 0; d < a.length; d++)
c += t[a[d] * e + a[l]];
c > u && (s = l, u = c);
}
n[o] = a[s];
}
return r = Ox(e, t, n), r;
}, Px = function(e) {
for (var t = this.cy(), n = this.nodes(), r = tse(e), o = {}, a = 0; a < n.length; a++)
o[n[a].id()] = a;
var i, s, u, l, c, d;
i = n.length, s = i * i, u = new Array(s);
for (var f = 0; f < s; f++)
u[f] = -1 / 0;
for (var h = 0; h < i; h++)
for (var p = 0; p < i; p++)
h !== p && (u[h * i + p] = nse(r.distance, n[h], n[p], r.attributes));
l = rse(u, r.preference);
for (var v = 0; v < i; v++)
u[v * i + v] = l;
c = new Array(s);
for (var m = 0; m < s; m++)
c[m] = 0;
d = new Array(s);
for (var g = 0; g < s; g++)
d[g] = 0;
for (var b = new Array(i), x = new Array(i), w = new Array(i), C = 0; C < i; C++)
b[C] = 0, x[C] = 0, w[C] = 0;
for (var k = new Array(i * r.minIterations), E = 0; E < k.length; E++)
k[E] = 0;
var S;
for (S = 0; S < r.maxIterations; S++) {
for (var O = 0; O < i; O++) {
for (var F = -1 / 0, $ = -1 / 0, A = -1, L = 0, N = 0; N < i; N++)
b[N] = c[O * i + N], L = d[O * i + N] + u[O * i + N], L >= F ? ($ = F, F = L, A = N) : L > $ && ($ = L);
for (var M = 0; M < i; M++)
c[O * i + M] = (1 - r.damping) * (u[O * i + M] - F) + r.damping * b[M];
c[O * i + A] = (1 - r.damping) * (u[O * i + A] - $) + r.damping * b[A];
}
for (var I = 0; I < i; I++) {
for (var z = 0, R = 0; R < i; R++)
b[R] = d[R * i + I], x[R] = Math.max(0, c[R * i + I]), z += x[R];
z -= x[I], x[I] = c[I * i + I], z += x[I];
for (var q = 0; q < i; q++)
d[q * i + I] = (1 - r.damping) * Math.min(0, z - x[q]) + r.damping * b[q];
d[I * i + I] = (1 - r.damping) * (z - x[I]) + r.damping * b[I];
}
for (var oe = 0, Q = 0; Q < i; Q++) {
var ae = d[Q * i + Q] + c[Q * i + Q] > 0 ? 1 : 0;
k[S % r.minIterations * i + Q] = ae, oe += ae;
}
if (oe > 0 && (S >= r.minIterations - 1 || S == r.maxIterations - 1)) {
for (var pe = 0, we = 0; we < i; we++) {
w[we] = 0;
for (var ke = 0; ke < r.minIterations; ke++)
w[we] += k[ke * i + we];
(w[we] === 0 || w[we] === r.minIterations) && pe++;
}
if (pe === i)
break;
}
}
for (var fe = ose(i, c, d), ge = ase(i, u, fe), J = {}, te = 0; te < fe.length; te++)
J[fe[te]] = [];
for (var le = 0; le < n.length; le++) {
var Ee = o[n[le].id()], Ne = ge[Ee];
Ne != null && J[Ne].push(n[le]);
}
for (var je = new Array(fe.length), _e = 0; _e < fe.length; _e++)
je[_e] = t.collection(J[fe[_e]]);
return je;
}, ise = {
affinityPropagation: Px,
ap: Px
}, sse = nr({
root: void 0,
directed: !1
}), lse = {
hierholzer: function(e) {
if (!It(e)) {
var t = arguments;
e = {
root: t[0],
directed: t[1]
};
}
var n = sse(e), r = n.root, o = n.directed, a = this, i = !1, s, u, l;
r && (l = at(r) ? this.filter(r)[0].id() : r[0].id());
var c = {}, d = {};
o ? a.forEach(function(g) {
var b = g.id();
if (g.isNode()) {
var x = g.indegree(!0), w = g.outdegree(!0), C = x - w, k = w - x;
C == 1 ? s ? i = !0 : s = b : k == 1 ? u ? i = !0 : u = b : (k > 1 || C > 1) && (i = !0), c[b] = [], g.outgoers().forEach(function(E) {
E.isEdge() && c[b].push(E.id());
});
} else
d[b] = [void 0, g.target().id()];
}) : a.forEach(function(g) {
var b = g.id();
if (g.isNode()) {
var x = g.degree(!0);
x % 2 && (s ? u ? i = !0 : u = b : s = b), c[b] = [], g.connectedEdges().forEach(function(w) {
return c[b].push(w.id());
});
} else
d[b] = [g.source().id(), g.target().id()];
});
var f = {
found: !1,
trail: void 0
};
if (i) return f;
if (u && s)
if (o) {
if (l && u != l)
return f;
l = u;
} else {
if (l && u != l && s != l)
return f;
l || (l = u);
}
else
l || (l = a[0].id());
var h = function(g) {
for (var b = g, x = [g], w, C, k; c[b].length; )
w = c[b].shift(), C = d[w][0], k = d[w][1], b != k ? (c[k] = c[k].filter(function(E) {
return E != w;
}), b = k) : !o && b != C && (c[C] = c[C].filter(function(E) {
return E != w;
}), b = C), x.unshift(w), x.unshift(b);
return x;
}, p = [], v = [];
for (v = h(l); v.length != 1; )
c[v[0]].length == 0 ? (p.unshift(a.getElementById(v.shift())), p.unshift(a.getElementById(v.shift()))) : v = h(v.shift()).concat(v);
p.unshift(a.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;
}
}, jd = function() {
var e = this, t = {}, n = 0, r = 0, o = [], a = [], i = {}, s = function(c, d) {
for (var f = a.length - 1, h = [], p = e.spawn(); a[f].x != c || a[f].y != d; )
h.push(a.pop().edge), f--;
h.push(a.pop().edge), h.forEach(function(v) {
var m = v.connectedNodes().intersection(e);
p.merge(v), m.forEach(function(g) {
var b = g.id(), x = g.connectedEdges().intersection(e);
p.merge(g), t[b].cutVertex ? p.merge(x.filter(function(w) {
return w.isLoop();
})) : p.merge(x);
});
}), o.push(p);
}, u = 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)
o.push(e.spawn(e.getElementById(f)));
else {
var v, m, g, b;
p.forEach(function(x) {
v = x.source().id(), m = x.target().id(), g = v === f ? m : v, g !== h && (b = x.id(), i[b] || (i[b] = !0, a.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, u(d, d), t[d].cutVertex = r > 1);
}
});
var l = Object.keys(t).filter(function(c) {
return t[c].cutVertex;
}).map(function(c) {
return e.getElementById(c);
});
return {
cut: e.spawn(l),
components: o
};
}, use = {
hopcroftTarjanBiconnected: jd,
htbc: jd,
htb: jd,
hopcroftTarjanBiconnectedComponents: jd
}, Hd = function() {
var e = this, t = {}, n = 0, r = [], o = [], a = e.spawn(e), i = function s(u) {
o.push(u), t[u] = {
index: n,
low: n++,
explored: !1
};
var l = e.getElementById(u).connectedEdges().intersection(e);
if (l.forEach(function(p) {
var v = p.target().id();
v !== u && (v in t || s(v), t[v].explored || (t[u].low = Math.min(t[u].low, t[v].low)));
}), t[u].index === t[u].low) {
for (var c = e.spawn(); ; ) {
var d = o.pop();
if (c.merge(e.getElementById(d)), t[d].low = t[u].index, t[d].explored = !0, d === u)
break;
}
var f = c.edgesWith(c), h = c.merge(f);
r.push(h), a = a.difference(h);
}
};
return e.forEach(function(s) {
if (s.isNode()) {
var u = s.id();
u in t || i(u);
}
}), {
cut: a,
components: r
};
}, cse = {
tarjanStronglyConnected: Hd,
tsc: Hd,
tscc: Hd,
tarjanStronglyConnectedComponents: Hd
}, CS = {};
[mc, zae, Vae, Hae, qae, Kae, Yae, xie, il, sl, D0, Nie, Kie, Qie, ise, lse, use, cse].forEach(function(e) {
ct(CS, 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 ES = 0, SS = 1, _S = 2, Oa = function e(t) {
if (!(this instanceof e)) return new e(t);
this.id = "Thenable/1.0.7", this.state = ES, 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));
};
Oa.prototype = {
/* promise resolving methods */
fulfill: function(e) {
return $x(this, SS, "fulfillValue", e);
},
reject: function(e) {
return $x(this, _S, "rejectReason", e);
},
/* "The then Method" [Promises/A+ 1.1, 1.2, 2.2] */
then: function(e, t) {
var n = this, r = new Oa();
return n.onFulfilled.push(Fx(e, r, "fulfill")), n.onRejected.push(Fx(t, r, "reject")), TS(n), r.proxy;
}
};
var $x = function(e, t, n, r) {
return e.state === ES && (e.state = t, e[n] = r, TS(e)), e;
}, TS = function(e) {
e.state === SS ? Ax(e, "onFulfilled", e.fulfillValue) : e.state === _S && Ax(e, "onRejected", e.rejectReason);
}, Ax = function(e, t, n) {
if (e[t].length !== 0) {
var r = e[t];
e[t] = [];
var o = function() {
for (var a = 0; a < r.length; a++)
r[a](n);
};
typeof setImmediate == "function" ? setImmediate(o) : setTimeout(o, 0);
}
}, Fx = function(e, t, n) {
return function(r) {
if (typeof e != "function")
t[n].call(t, r);
else {
var o;
try {
o = e(r);
} catch (a) {
t.reject(a);
return;
}
dse(t, o);
}
};
}, dse = function e(t, n) {
if (t === n || t.proxy === n) {
t.reject(new TypeError("cannot resolve promise with itself"));
return;
}
var r;
if (Dn(n) === "object" && n !== null || typeof n == "function")
try {
r = n.then;
} catch (a) {
t.reject(a);
return;
}
if (typeof r == "function") {
var o = !1;
try {
r.call(
n,
/* resolvePromise */
/* [Promises/A+ 2.3.3.3.1] */
function(a) {
o || (o = !0, a === n ? t.reject(new TypeError("circular thenable chain")) : e(t, a));
},
/* rejectPromise */
/* [Promises/A+ 2.3.3.3.2] */
function(a) {
o || (o = !0, t.reject(a));
}
);
} catch (a) {
o || t.reject(a);
}
return;
}
t.fulfill(n);
};
Oa.all = function(e) {
return new Oa(function(t, n) {
for (var r = new Array(e.length), o = 0, a = function(s, u) {
r[s] = u, o++, o === e.length && t(r);
}, i = 0; i < e.length; i++)
(function(s) {
var u = e[s], l = u != null && u.then != null;
if (l)
u.then(function(d) {
a(s, d);
}, function(d) {
n(d);
});
else {
var c = u;
a(s, c);
}
})(i);
});
};
Oa.resolve = function(e) {
return new Oa(function(t, n) {
t(e);
});
};
Oa.reject = function(e) {
return new Oa(function(t, n) {
n(e);
});
};
var Gl = typeof Promise < "u" ? Promise : Oa, R0 = function(e, t, n) {
var r = hy(e), o = !r, a = this._private = ct({
duration: 1e3
}, t, n);
if (a.target = e, a.style = a.style || a.css, a.started = !1, a.playing = !1, a.hooked = !1, a.applying = !1, a.progress = 0, a.completes = [], a.frames = [], a.complete && dn(a.complete) && a.completes.push(a.complete), o) {
var i = e.position();
a.startPosition = a.startPosition || {
x: i.x,
y: i.y
}, a.startStyle = a.startStyle || e.cy().style().getAnimationStartStyle(e, a.style);
}
if (r) {
var s = e.pan();
a.startPan = {
x: s.x,
y: s.y
}, a.startZoom = e.zoom();
}
this.length = 1, this[0] = this;
}, xs = R0.prototype;
ct(xs, {
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), Wr(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, u) {
var l = e[s];
l != null && (e[s] = e[u], e[u] = l);
};
if (n("zoom", "startZoom"), n("pan", "startPan"), n("position", "startPosition"), e.style)
for (var r = 0; r < e.style.length; r++) {
var o = e.style[r], a = o.name, i = e.startStyle[a];
e.startStyle[a] = o, e.style[r] = i;
}
return t && this.play(), this;
},
promise: function(e) {
var t = this._private, n;
switch (e) {
case "frame":
n = t.frames;
break;
default:
case "complete":
case "completed":
n = t.completes;
}
return new Gl(function(r, o) {
n.push(function() {
r();
});
});
}
});
xs.complete = xs.completed;
xs.run = xs.play;
xs.running = xs.playing;
var pse = {
animated: function() {
return function() {
var e = this, t = e.length !== void 0, n = t ? e : [e], r = this._private.cy || this;
if (!r.styleEnabled())
return !1;
var o = n[0];
if (o)
return o._private.animation.current.length > 0;
};
},
// animated
clearQueue: function() {
return function() {
var e = this, t = e.length !== void 0, n = t ? e : [e], r = this._private.cy || this;
if (!r.styleEnabled())
return this;
for (var o = 0; o < n.length; o++) {
var a = n[o];
a._private.animation.queue = [];
}
return this;
};
},
// clearQueue
delay: function() {
return function(e, t) {
var n = this._private.cy || this;
return n.styleEnabled() ? this.animate({
delay: e,
duration: e,
complete: t
}) : this;
};
},
// delay
delayAnimation: function() {
return function(e, t) {
var n = this._private.cy || this;
return n.styleEnabled() ? this.animation({
delay: e,
duration: e,
complete: t
}) : this;
};
},
// delay
animation: function() {
return function(e, t) {
var n = this, r = n.length !== void 0, o = r ? n : [n], a = this._private.cy || this, i = !r, s = !i;
if (!a.styleEnabled())
return this;
var u = a.style();
e = ct({}, e, t);
var l = Object.keys(e).length === 0;
if (l)
return new R0(o[0], e);
switch (e.duration === void 0 && (e.duration = 400), e.duration) {
case "slow":
e.duration = 600;
break;
case "fast":
e.duration = 200;
break;
}
if (s && (e.style = u.getPropsList(e.style || e.css), e.css = void 0), s && e.renderedPosition != null) {
var c = e.renderedPosition, d = a.pan(), f = a.zoom();
e.position = pS(c, f, d);
}
if (i && e.panBy != null) {
var h = e.panBy, p = a.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 = a.getCenterPan(v.eles, e.zoom);
m != null && (e.pan = m);
}
if (i && e.fit != null) {
var g = e.fit, b = a.getFitViewport(g.eles || g.boundingBox, g.padding);
b != null && (e.pan = b.pan, e.zoom = b.zoom);
}
if (i && It(e.zoom)) {
var x = a.getZoomedViewport(e.zoom);
x != null ? (x.zoomed && (e.zoom = x.zoom), x.panned && (e.pan = x.pan)) : e.zoom = null;
}
return new R0(o[0], e);
};
},
// animate
animate: function() {
return function(e, t) {
var n = this, r = n.length !== void 0, o = r ? n : [n], a = this._private.cy || this;
if (!a.styleEnabled())
return this;
t && (e = ct({}, e, t));
for (var i = 0; i < o.length; i++) {
var s = o[i], u = s.animated() && (e.queue === void 0 || e.queue), l = s.animation(e, u ? {
queue: !0
} : void 0);
l.play();
}
return this;
};
},
// animate
stop: function() {
return function(e, t) {
var n = this, r = n.length !== void 0, o = r ? n : [n], a = this._private.cy || this;
if (!a.styleEnabled())
return this;
for (var i = 0; i < o.length; i++) {
for (var s = o[i], u = s._private, l = u.animation.current, c = 0; c < l.length; c++) {
var d = l[c], f = d._private;
t && (f.duration = 0);
}
e && (u.animation.queue = []), t || (u.animation.current = []);
}
return a.notify("draw"), this;
};
}
// stop
}, fse = Array.isArray, yh = fse, hse = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, vse = /^\w*$/;
function gse(e, t) {
if (yh(e))
return !1;
var n = typeof e;
return n == "number" || n == "symbol" || n == "boolean" || e == null || Qc(e) ? !0 : vse.test(e) || !hse.test(e) || t != null && e in Object(t);
}
var mse = gse, yse = "[object AsyncFunction]", bse = "[object Function]", wse = "[object GeneratorFunction]", xse = "[object Proxy]";
function kse(e) {
if (!ms(e))
return !1;
var t = rS(e);
return t == bse || t == wse || t == yse || t == xse;
}
var Cse = kse, Ese = fh["__core-js_shared__"], Pv = Ese, Ix = function() {
var e = /[^.]+$/.exec(Pv && Pv.keys && Pv.keys.IE_PROTO || "");
return e ? "Symbol(src)_1." + e : "";
}();
function Sse(e) {
return !!Ix && Ix in e;
}
var _se = Sse, Tse = Function.prototype, Ose = Tse.toString;
function Pse(e) {
if (e != null) {
try {
return Ose.call(e);
} catch {
}
try {
return e + "";
} catch {
}
}
return "";
}
var $se = Pse, Ase = /[\\^$.*+?()[\]{}|]/g, Fse = /^\[object .+?Constructor\]$/, Ise = Function.prototype, Nse = Object.prototype, Lse = Ise.toString, Dse = Nse.hasOwnProperty, Rse = RegExp(
"^" + Lse.call(Dse).replace(Ase, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
);
function Bse(e) {
if (!ms(e) || _se(e))
return !1;
var t = Cse(e) ? Rse : Fse;
return t.test($se(e));
}
var Mse = Bse;
function zse(e, t) {
return e == null ? void 0 : e[t];
}
var Vse = zse;
function jse(e, t) {
var n = Vse(e, t);
return Mse(n) ? n : void 0;
}
var Cy = jse, Hse = Cy(Object, "create"), wc = Hse;
function Use() {
this.__data__ = wc ? wc(null) : {}, this.size = 0;
}
var qse = Use;
function Wse(e) {
var t = this.has(e) && delete this.__data__[e];
return this.size -= t ? 1 : 0, t;
}
var Kse = Wse, Gse = "__lodash_hash_undefined__", Xse = Object.prototype, Yse = Xse.hasOwnProperty;
function Zse(e) {
var t = this.__data__;
if (wc) {
var n = t[e];
return n === Gse ? void 0 : n;
}
return Yse.call(t, e) ? t[e] : void 0;
}
var Jse = Zse, Qse = Object.prototype, ele = Qse.hasOwnProperty;
function tle(e) {
var t = this.__data__;
return wc ? t[e] !== void 0 : ele.call(t, e);
}
var nle = tle, rle = "__lodash_hash_undefined__";
function ole(e, t) {
var n = this.__data__;
return this.size += this.has(e) ? 0 : 1, n[e] = wc && t === void 0 ? rle : t, this;
}
var ale = ole;
function Xl(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]);
}
}
Xl.prototype.clear = qse;
Xl.prototype.delete = Kse;
Xl.prototype.get = Jse;
Xl.prototype.has = nle;
Xl.prototype.set = ale;
var Nx = Xl;
function ile() {
this.__data__ = [], this.size = 0;
}
var sle = ile;
function lle(e, t) {
return e === t || e !== e && t !== t;
}
var OS = lle;
function ule(e, t) {
for (var n = e.length; n--; )
if (OS(e[n][0], t))
return n;
return -1;
}
var bh = ule, cle = Array.prototype, dle = cle.splice;
function ple(e) {
var t = this.__data__, n = bh(t, e);
if (n < 0)
return !1;
var r = t.length - 1;
return n == r ? t.pop() : dle.call(t, n, 1), --this.size, !0;
}
var fle = ple;
function hle(e) {
var t = this.__data__, n = bh(t, e);
return n < 0 ? void 0 : t[n][1];
}
var vle = hle;
function gle(e) {
return bh(this.__data__, e) > -1;
}
var mle = gle;
function yle(e, t) {
var n = this.__data__, r = bh(n, e);
return r < 0 ? (++this.size, n.push([e, t])) : n[r][1] = t, this;
}
var ble = yle;
function Yl(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]);
}
}
Yl.prototype.clear = sle;
Yl.prototype.delete = fle;
Yl.prototype.get = vle;
Yl.prototype.has = mle;
Yl.prototype.set = ble;
var wle = Yl, xle = Cy(fh, "Map"), kle = xle;
function Cle() {
this.size = 0, this.__data__ = {
hash: new Nx(),
map: new (kle || wle)(),
string: new Nx()
};
}
var Ele = Cle;
function Sle(e) {
var t = typeof e;
return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e !== "__proto__" : e === null;
}
var _le = Sle;
function Tle(e, t) {
var n = e.__data__;
return _le(t) ? n[typeof t == "string" ? "string" : "hash"] : n.map;
}
var wh = Tle;
function Ole(e) {
var t = wh(this, e).delete(e);
return this.size -= t ? 1 : 0, t;
}
var Ple = Ole;
function $le(e) {
return wh(this, e).get(e);
}
var Ale = $le;
function Fle(e) {
return wh(this, e).has(e);
}
var Ile = Fle;
function Nle(e, t) {
var n = wh(this, e), r = n.size;
return n.set(e, t), this.size += n.size == r ? 0 : 1, this;
}
var Lle = Nle;
function Zl(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]);
}
}
Zl.prototype.clear = Ele;
Zl.prototype.delete = Ple;
Zl.prototype.get = Ale;
Zl.prototype.has = Ile;
Zl.prototype.set = Lle;
var PS = Zl, Dle = "Expected a function";
function Ey(e, t) {
if (typeof e != "function" || t != null && typeof t != "function")
throw new TypeError(Dle);
var n = function() {
var r = arguments, o = t ? t.apply(this, r) : r[0], a = n.cache;
if (a.has(o))
return a.get(o);
var i = e.apply(this, r);
return n.cache = a.set(o, i) || a, i;
};
return n.cache = new (Ey.Cache || PS)(), n;
}
Ey.Cache = PS;
var Rle = Ey, Ble = 500;
function Mle(e) {
var t = Rle(e, function(r) {
return n.size === Ble && n.clear(), r;
}), n = t.cache;
return t;
}
var zle = Mle, Vle = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, jle = /\\(\\)?/g, Hle = zle(function(e) {
var t = [];
return e.charCodeAt(0) === 46 && t.push(""), e.replace(Vle, function(n, r, o, a) {
t.push(o ? a.replace(jle, "$1") : r || n);
}), t;
}), $S = Hle;
function Ule(e, t) {
for (var n = -1, r = e == null ? 0 : e.length, o = Array(r); ++n < r; )
o[n] = t(e[n], n, e);
return o;
}
var AS = Ule, qle = 1 / 0, Lx = Al ? Al.prototype : void 0, Dx = Lx ? Lx.toString : void 0;
function FS(e) {
if (typeof e == "string")
return e;
if (yh(e))
return AS(e, FS) + "";
if (Qc(e))
return Dx ? Dx.call(e) : "";
var t = e + "";
return t == "0" && 1 / e == -qle ? "-0" : t;
}
var Wle = FS;
function Kle(e) {
return e == null ? "" : Wle(e);
}
var IS = Kle;
function Gle(e, t) {
return yh(e) ? e : mse(e, t) ? [e] : $S(IS(e));
}
var NS = Gle, Xle = 1 / 0;
function Yle(e) {
if (typeof e == "string" || Qc(e))
return e;
var t = e + "";
return t == "0" && 1 / e == -Xle ? "-0" : t;
}
var Sy = Yle;
function Zle(e, t) {
t = NS(t, e);
for (var n = 0, r = t.length; e != null && n < r; )
e = e[Sy(t[n++])];
return n && n == r ? e : void 0;
}
var Jle = Zle;
function Qle(e, t, n) {
var r = e == null ? void 0 : Jle(e, t);
return r === void 0 ? n : r;
}
var eue = Qle, tue = function() {
try {
var e = Cy(Object, "defineProperty");
return e({}, "", {}), e;
} catch {
}
}(), Rx = tue;
function nue(e, t, n) {
t == "__proto__" && Rx ? Rx(e, t, {
configurable: !0,
enumerable: !0,
value: n,
writable: !0
}) : e[t] = n;
}
var rue = nue, oue = Object.prototype, aue = oue.hasOwnProperty;
function iue(e, t, n) {
var r = e[t];
(!(aue.call(e, t) && OS(r, n)) || n === void 0 && !(t in e)) && rue(e, t, n);
}
var sue = iue, lue = 9007199254740991, uue = /^(?:0|[1-9]\d*)$/;
function cue(e, t) {
var n = typeof e;
return t = t ?? lue, !!t && (n == "number" || n != "symbol" && uue.test(e)) && e > -1 && e % 1 == 0 && e < t;
}
var due = cue;
function pue(e, t, n, r) {
if (!ms(e))
return e;
t = NS(t, e);
for (var o = -1, a = t.length, i = a - 1, s = e; s != null && ++o < a; ) {
var u = Sy(t[o]), l = n;
if (u === "__proto__" || u === "constructor" || u === "prototype")
return e;
if (o != i) {
var c = s[u];
l = r ? r(c, u, s) : void 0, l === void 0 && (l = ms(c) ? c : due(t[o + 1]) ? [] : {});
}
sue(s, u, l), s = s[u];
}
return e;
}
var fue = pue;
function hue(e, t, n) {
return e == null ? e : fue(e, t, n);
}
var vue = hue;
function gue(e, t) {
var n = -1, r = e.length;
for (t || (t = Array(r)); ++n < r; )
t[n] = e[n];
return t;
}
var mue = gue;
function yue(e) {
return yh(e) ? AS(e, Sy) : Qc(e) ? [e] : mue($S(IS(e)));
}
var bue = yue, wue = {
// 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 = ct({}, t, e), function(n, r) {
var o = e, a = this, i = a.length !== void 0, s = i ? a : [a], u = i ? a[0] : a;
if (at(n)) {
var l = n.indexOf(".") !== -1, c = l && bue(n);
if (o.allowGetting && r === void 0) {
var d;
return u && (o.beforeGet(u), c && u._private[o.field][n] === void 0 ? d = eue(u._private[o.field], c) : d = u._private[o.field][n]), d;
} else if (o.allowSetting && r !== void 0) {
var f = !o.immutableKeys[n];
if (f) {
var h = WE({}, n, r);
o.beforeSet(a, h);
for (var p = 0, v = s.length; p < v; p++) {
var m = s[p];
o.canSet(m) && (c && u._private[o.field][n] === void 0 ? vue(m._private[o.field], c, r) : m._private[o.field][n] = r);
}
o.updateStyle && a.updateStyle(), o.onSet(a), o.settingTriggersEvent && a[o.triggerFnName](o.settingEvent);
}
}
} else if (o.allowSetting && It(n)) {
var g = n, b, x, w = Object.keys(g);
o.beforeSet(a, g);
for (var C = 0; C < w.length; C++) {
b = w[C], x = g[b];
var k = !o.immutableKeys[b];
if (k)
for (var E = 0; E < s.length; E++) {
var S = s[E];
o.canSet(S) && (S._private[o.field][b] = x);
}
}
o.updateStyle && a.updateStyle(), o.onSet(a), o.settingTriggersEvent && a[o.triggerFnName](o.settingEvent);
} else if (o.allowBinding && dn(n)) {
var O = n;
a.on(o.bindingEvent, O);
} else if (o.allowGetting && n === void 0) {
var F;
return u && (o.beforeGet(u), F = u._private[o.field]), F;
}
return a;
};
},
// data
// remove data field
removeData: function(e) {
var t = {
field: "data",
event: "data",
triggerFnName: "trigger",
triggerEvent: !1,
immutableKeys: {}
// key => true if immutable
};
return e = ct({}, t, e), function(n) {
var r = e, o = this, a = o.length !== void 0, i = a ? o : [o];
if (at(n)) {
for (var s = n.split(/\s+/), u = s.length, l = 0; l < u; l++) {
var c = s[l];
if (!mi(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 && o[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), b = 0; b < g.length; b++) {
var x = g[b], w = !r.immutableKeys[x];
w && (m[x] = void 0);
}
r.triggerEvent && o[r.triggerFnName](r.event);
}
return o;
};
}
// removeData
}, xue = {
eventAliasesOn: function(e) {
var t = e;
t.addListener = t.listen = t.bind = t.on, t.unlisten = t.unbind = t.off = t.removeListener, t.trigger = t.emit, t.pon = t.promiseOn = function(n, r) {
var o = this, a = Array.prototype.slice.call(arguments, 0);
return new Gl(function(i, s) {
var u = function(d) {
o.off.apply(o, c), i(d);
}, l = a.concat([u]), c = l.concat([]);
o.on.apply(o, l);
});
};
}
}, Bt = {};
[pse, wue, xue].forEach(function(e) {
ct(Bt, e);
});
var kue = {
animate: Bt.animate(),
animation: Bt.animation(),
animated: Bt.animated(),
clearQueue: Bt.clearQueue(),
delay: Bt.delay(),
delayAnimation: Bt.delayAnimation(),
stop: Bt.stop()
}, gp = {
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 Gt(e) || (e = (e || "").match(/\S+/g) || []);
for (var r = [], o = new Kl(e), a = 0; a < t.length; a++) {
for (var i = t[a], s = i._private, u = s.classes, l = !1, c = 0; c < e.length; c++) {
var d = e[c], f = u.has(d);
if (!f) {
l = !0;
break;
}
}
l || (l = u.size !== e.length), l && (s.classes = o, r.push(i));
}
return r.length > 0 && this.spawn(r).updateStyle().emit("class"), t;
},
addClass: function(e) {
return this.toggleClass(e, !0);
},
hasClass: function(e) {
var t = this[0];
return t != null && t._private.classes.has(e);
},
toggleClass: function(e, t) {
Gt(e) || (e = e.match(/\S+/g) || []);
for (var n = this, r = t === void 0, o = [], a = 0, i = n.length; a < i; a++)
for (var s = n[a], u = s._private.classes, l = !1, c = 0; c < e.length; c++) {
var d = e[c], f = u.has(d), h = !1;
t || r && !f ? (u.add(d), h = !0) : (!t || r && f) && (u.delete(d), h = !0), !l && h && (o.push(s), l = !0);
}
return o.length > 0 && this.spawn(o).updateStyle().emit("class"), n;
},
removeClass: function(e) {
return this.toggleClass(e, !1);
},
flashClass: function(e, t) {
var n = this;
if (t == null)
t = 250;
else if (t === 0)
return n;
return n.addClass(e), setTimeout(function() {
n.removeClass(e);
}, t), n;
}
};
gp.className = gp.classNames = gp.classes;
var Ft = {
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: Ln,
// 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+"
};
Ft.variable = "(?:[\\w-.]|(?:\\\\" + Ft.metaChar + "))+";
Ft.className = "(?:[\\w-]|(?:\\\\" + Ft.metaChar + "))+";
Ft.value = Ft.string + "|" + Ft.number;
Ft.id = Ft.variable;
(function() {
var e, t, n;
for (e = Ft.comparatorOp.split("|"), n = 0; n < e.length; n++)
t = e[n], Ft.comparatorOp += "|@" + t;
for (e = Ft.comparatorOp.split("|"), n = 0; n < e.length; n++)
t = e[n], !(t.indexOf("!") >= 0) && t !== "=" && (Ft.comparatorOp += "|\\!" + t);
})();
var Ht = function() {
return {
checks: []
};
}, We = {
/** 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
}, B0 = [{
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 Noe(e.selector, t.selector);
}), Cue = function() {
for (var e = {}, t, n = 0; n < B0.length; n++)
t = B0[n], e[t.selector] = t.matches;
return e;
}(), Eue = function(e, t) {
return Cue[e](t);
}, Sue = "(" + B0.map(function(e) {
return e.selector;
}).join("|") + ")", Hs = function(e) {
return e.replace(new RegExp("\\\\(" + Ft.metaChar + ")", "g"), function(t, n) {
return n;
});
}, Ua = function(e, t, n) {
e[e.length - 1] = n;
}, M0 = [{
name: "group",
// just used for identifying when debugging
query: !0,
regex: "(" + Ft.group + ")",
populate: function(e, t, n) {
var r = Co(n, 1), o = r[0];
t.checks.push({
type: We.GROUP,
value: o === "*" ? o : o + "s"
});
}
}, {
name: "state",
query: !0,
regex: Sue,
populate: function(e, t, n) {
var r = Co(n, 1), o = r[0];
t.checks.push({
type: We.STATE,
value: o
});
}
}, {
name: "id",
query: !0,
regex: "\\#(" + Ft.id + ")",
populate: function(e, t, n) {
var r = Co(n, 1), o = r[0];
t.checks.push({
type: We.ID,
value: Hs(o)
});
}
}, {
name: "className",
query: !0,
regex: "\\.(" + Ft.className + ")",
populate: function(e, t, n) {
var r = Co(n, 1), o = r[0];
t.checks.push({
type: We.CLASS,
value: Hs(o)
});
}
}, {
name: "dataExists",
query: !0,
regex: "\\[\\s*(" + Ft.variable + ")\\s*\\]",
populate: function(e, t, n) {
var r = Co(n, 1), o = r[0];
t.checks.push({
type: We.DATA_EXIST,
field: Hs(o)
});
}
}, {
name: "dataCompare",
query: !0,
regex: "\\[\\s*(" + Ft.variable + ")\\s*(" + Ft.comparatorOp + ")\\s*(" + Ft.value + ")\\s*\\]",
populate: function(e, t, n) {
var r = Co(n, 3), o = r[0], a = r[1], i = r[2], s = new RegExp("^" + Ft.string + "$").exec(i) != null;
s ? i = i.substring(1, i.length - 1) : i = parseFloat(i), t.checks.push({
type: We.DATA_COMPARE,
field: Hs(o),
operator: a,
value: i
});
}
}, {
name: "dataBool",
query: !0,
regex: "\\[\\s*(" + Ft.boolOp + ")\\s*(" + Ft.variable + ")\\s*\\]",
populate: function(e, t, n) {
var r = Co(n, 2), o = r[0], a = r[1];
t.checks.push({
type: We.DATA_BOOL,
field: Hs(a),
operator: o
});
}
}, {
name: "metaCompare",
query: !0,
regex: "\\[\\[\\s*(" + Ft.meta + ")\\s*(" + Ft.comparatorOp + ")\\s*(" + Ft.number + ")\\s*\\]\\]",
populate: function(e, t, n) {
var r = Co(n, 3), o = r[0], a = r[1], i = r[2];
t.checks.push({
type: We.META_COMPARE,
field: Hs(o),
operator: a,
value: parseFloat(i)
});
}
}, {
name: "nextQuery",
separator: !0,
regex: Ft.separator,
populate: function(e, t) {
var n = e.currentSubject, r = e.edgeCount, o = e.compoundCount, a = e[e.length - 1];
n != null && (a.subject = n, e.currentSubject = null), a.edgeCount = r, a.compoundCount = o, e.edgeCount = 0, e.compoundCount = 0;
var i = e[e.length++] = Ht();
return i;
}
}, {
name: "directedEdge",
separator: !0,
regex: Ft.directedEdge,
populate: function(e, t) {
if (e.currentSubject == null) {
var n = Ht(), r = t, o = Ht();
return n.checks.push({
type: We.DIRECTED_EDGE,
source: r,
target: o
}), Ua(e, t, n), e.edgeCount++, o;
} else {
var a = Ht(), i = t, s = Ht();
return a.checks.push({
type: We.NODE_SOURCE,
source: i,
target: s
}), Ua(e, t, a), e.edgeCount++, s;
}
}
}, {
name: "undirectedEdge",
separator: !0,
regex: Ft.undirectedEdge,
populate: function(e, t) {
if (e.currentSubject == null) {
var n = Ht(), r = t, o = Ht();
return n.checks.push({
type: We.UNDIRECTED_EDGE,
nodes: [r, o]
}), Ua(e, t, n), e.edgeCount++, o;
} else {
var a = Ht(), i = t, s = Ht();
return a.checks.push({
type: We.NODE_NEIGHBOR,
node: i,
neighbor: s
}), Ua(e, t, a), s;
}
}
}, {
name: "child",
separator: !0,
regex: Ft.child,
populate: function(e, t) {
if (e.currentSubject == null) {
var n = Ht(), r = Ht(), o = e[e.length - 1];
return n.checks.push({
type: We.CHILD,
parent: o,
child: r
}), Ua(e, t, n), e.compoundCount++, r;
} else if (e.currentSubject === t) {
var a = Ht(), i = e[e.length - 1], s = Ht(), u = Ht(), l = Ht(), c = Ht();
return a.checks.push({
type: We.COMPOUND_SPLIT,
left: i,
right: s,
subject: u
}), u.checks = t.checks, t.checks = [{
type: We.TRUE
}], c.checks.push({
type: We.TRUE
}), s.checks.push({
type: We.PARENT,
// type is swapped on right side queries
parent: c,
child: l
// empty for now
}), Ua(e, i, a), e.currentSubject = u, e.compoundCount++, l;
} else {
var d = Ht(), f = Ht(), h = [{
type: We.PARENT,
parent: d,
child: f
}];
return d.checks = t.checks, t.checks = h, e.compoundCount++, f;
}
}
}, {
name: "descendant",
separator: !0,
regex: Ft.descendant,
populate: function(e, t) {
if (e.currentSubject == null) {
var n = Ht(), r = Ht(), o = e[e.length - 1];
return n.checks.push({
type: We.DESCENDANT,
ancestor: o,
descendant: r
}), Ua(e, t, n), e.compoundCount++, r;
} else if (e.currentSubject === t) {
var a = Ht(), i = e[e.length - 1], s = Ht(), u = Ht(), l = Ht(), c = Ht();
return a.checks.push({
type: We.COMPOUND_SPLIT,
left: i,
right: s,
subject: u
}), u.checks = t.checks, t.checks = [{
type: We.TRUE
}], c.checks.push({
type: We.TRUE
}), s.checks.push({
type: We.ANCESTOR,
// type is swapped on right side queries
ancestor: c,
descendant: l
// empty for now
}), Ua(e, i, a), e.currentSubject = u, e.compoundCount++, l;
} else {
var d = Ht(), f = Ht(), h = [{
type: We.ANCESTOR,
ancestor: d,
descendant: f
}];
return d.checks = t.checks, t.checks = h, e.compoundCount++, f;
}
}
}, {
name: "subject",
modifier: !0,
regex: Ft.subject,
populate: function(e, t) {
if (e.currentSubject != null && e.currentSubject !== t)
return Mt("Redefinition of subject in selector `" + e.toString() + "`"), !1;
e.currentSubject = t;
var n = e[e.length - 1], r = n.checks[0], o = r == null ? null : r.type;
o === We.DIRECTED_EDGE ? r.type = We.NODE_TARGET : o === We.UNDIRECTED_EDGE && (r.type = We.NODE_NEIGHBOR, r.node = r.nodes[1], r.neighbor = r.nodes[0], r.nodes = null);
}
}];
M0.forEach(function(e) {
return e.regexObj = new RegExp("^" + e.regex);
});
var _ue = function(e) {
for (var t, n, r, o = 0; o < M0.length; o++) {
var a = M0[o], i = a.name, s = e.match(a.regexObj);
if (s != null) {
n = s, t = a, r = i;
var u = s[0];
e = e.substring(u.length);
break;
}
}
return {
expr: t,
match: n,
name: r,
remaining: e
};
}, Tue = function(e) {
var t = e.match(/^\s+/);
if (t) {
var n = t[0];
e = e.substring(n.length);
}
return e;
}, Oue = function(e) {
var t = this, n = t.inputText = e, r = t[0] = Ht();
for (t.length = 1, n = Tue(n); ; ) {
var o = _ue(n);
if (o.expr == null)
return Mt("The selector `" + e + "`is invalid"), !1;
var a = o.match.slice(1), i = o.expr.populate(t, r, a);
if (i === !1)
return !1;
if (i != null && (r = i), n = o.remaining, n.match(/^\s*$/))
break;
}
var s = t[t.length - 1];
t.currentSubject != null && (s.subject = t.currentSubject), s.edgeCount = t.edgeCount, s.compoundCount = t.compoundCount;
for (var u = 0; u < t.length; u++) {
var l = t[u];
if (l.compoundCount > 0 && l.edgeCount > 0)
return Mt("The selector `" + e + "` is invalid because it uses both a compound selector and an edge selector"), !1;
if (l.edgeCount > 1)
return Mt("The selector `" + e + "` is invalid because it uses multiple edge selectors"), !1;
l.edgeCount === 1 && Mt("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;
}, Pue = function() {
if (this.toStringCache != null)
return this.toStringCache;
for (var e = function(u) {
return u ?? "";
}, t = function(u) {
return at(u) ? '"' + u + '"' : e(u);
}, n = function(u) {
return " " + u + " ";
}, r = function(u, l) {
var c = u.type, d = u.value;
switch (c) {
case We.GROUP: {
var f = e(d);
return f.substring(0, f.length - 1);
}
case We.DATA_COMPARE: {
var h = u.field, p = u.operator;
return "[" + h + n(e(p)) + t(d) + "]";
}
case We.DATA_BOOL: {
var v = u.operator, m = u.field;
return "[" + e(v) + m + "]";
}
case We.DATA_EXIST: {
var g = u.field;
return "[" + g + "]";
}
case We.META_COMPARE: {
var b = u.operator, x = u.field;
return "[[" + x + n(e(b)) + t(d) + "]]";
}
case We.STATE:
return d;
case We.ID:
return "#" + d;
case We.CLASS:
return "." + d;
case We.PARENT:
case We.CHILD:
return o(u.parent, l) + n(">") + o(u.child, l);
case We.ANCESTOR:
case We.DESCENDANT:
return o(u.ancestor, l) + " " + o(u.descendant, l);
case We.COMPOUND_SPLIT: {
var w = o(u.left, l), C = o(u.subject, l), k = o(u.right, l);
return w + (w.length > 0 ? " " : "") + C + k;
}
case We.TRUE:
return "";
}
}, o = function(u, l) {
return u.checks.reduce(function(c, d, f) {
return c + (l === u && f === 0 ? "$" : "") + r(d, l);
}, "");
}, a = "", i = 0; i < this.length; i++) {
var s = this[i];
a += o(s, s.subject), this.length > 1 && i < this.length - 1 && (a += ", ");
}
return this.toStringCache = a, a;
}, $ue = {
parse: Oue,
toString: Pue
}, LS = function(e, t, n) {
var r, o = at(e), a = Ve(e), i = at(n), s, u, l = !1, c = !1, d = !1;
switch (t.indexOf("!") >= 0 && (t = t.replace("!", ""), c = !0), t.indexOf("@") >= 0 && (t = t.replace("@", ""), l = !0), (o || i || l) && (s = !o && !a ? "" : "" + e, u = "" + n), l && (e = s = s.toLowerCase(), n = u = u.toLowerCase()), t) {
case "*=":
r = s.indexOf(u) >= 0;
break;
case "$=":
r = s.indexOf(u, s.length - u.length) >= 0;
break;
case "^=":
r = s.indexOf(u) === 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;
}, Aue = function(e, t) {
switch (t) {
case "?":
return !!e;
case "!":
return !e;
case "^":
return e === void 0;
}
}, Fue = function(e) {
return e !== void 0;
}, _y = function(e, t) {
return e.data(t);
}, Iue = function(e, t) {
return e[t]();
}, gn = [], rn = function(e, t) {
return e.checks.every(function(n) {
return gn[n.type](n, t);
});
};
gn[We.GROUP] = function(e, t) {
var n = e.value;
return n === "*" || n === t.group();
};
gn[We.STATE] = function(e, t) {
var n = e.value;
return Eue(n, t);
};
gn[We.ID] = function(e, t) {
var n = e.value;
return t.id() === n;
};
gn[We.CLASS] = function(e, t) {
var n = e.value;
return t.hasClass(n);
};
gn[We.META_COMPARE] = function(e, t) {
var n = e.field, r = e.operator, o = e.value;
return LS(Iue(t, n), r, o);
};
gn[We.DATA_COMPARE] = function(e, t) {
var n = e.field, r = e.operator, o = e.value;
return LS(_y(t, n), r, o);
};
gn[We.DATA_BOOL] = function(e, t) {
var n = e.field, r = e.operator;
return Aue(_y(t, n), r);
};
gn[We.DATA_EXIST] = function(e, t) {
var n = e.field;
return e.operator, Fue(_y(t, n));
};
gn[We.UNDIRECTED_EDGE] = function(e, t) {
var n = e.nodes[0], r = e.nodes[1], o = t.source(), a = t.target();
return rn(n, o) && rn(r, a) || rn(r, o) && rn(n, a);
};
gn[We.NODE_NEIGHBOR] = function(e, t) {
return rn(e.node, t) && t.neighborhood().some(function(n) {
return n.isNode() && rn(e.neighbor, n);
});
};
gn[We.DIRECTED_EDGE] = function(e, t) {
return rn(e.source, t.source()) && rn(e.target, t.target());
};
gn[We.NODE_SOURCE] = function(e, t) {
return rn(e.source, t) && t.outgoers().some(function(n) {
return n.isNode() && rn(e.target, n);
});
};
gn[We.NODE_TARGET] = function(e, t) {
return rn(e.target, t) && t.incomers().some(function(n) {
return n.isNode() && rn(e.source, n);
});
};
gn[We.CHILD] = function(e, t) {
return rn(e.child, t) && rn(e.parent, t.parent());
};
gn[We.PARENT] = function(e, t) {
return rn(e.parent, t) && t.children().some(function(n) {
return rn(e.child, n);
});
};
gn[We.DESCENDANT] = function(e, t) {
return rn(e.descendant, t) && t.ancestors().some(function(n) {
return rn(e.ancestor, n);
});
};
gn[We.ANCESTOR] = function(e, t) {
return rn(e.ancestor, t) && t.descendants().some(function(n) {
return rn(e.descendant, n);
});
};
gn[We.COMPOUND_SPLIT] = function(e, t) {
return rn(e.subject, t) && rn(e.left, t) && rn(e.right, t);
};
gn[We.TRUE] = function() {
return !0;
};
gn[We.COLLECTION] = function(e, t) {
var n = e.value;
return n.has(t);
};
gn[We.FILTER] = function(e, t) {
var n = e.value;
return n(t);
};
var Nue = function(e) {
var t = this;
if (t.length === 1 && t[0].checks.length === 1 && t[0].checks[0].type === We.ID)
return e.getElementById(t[0].checks[0].value).collection();
var n = function(r) {
for (var o = 0; o < t.length; o++) {
var a = t[o];
if (rn(a, r))
return !0;
}
return !1;
};
return t.text() == null && (n = function() {
return !0;
}), e.filter(n);
}, Lue = function(e) {
for (var t = this, n = 0; n < t.length; n++) {
var r = t[n];
if (rn(r, e))
return !0;
}
return !1;
}, Due = {
matches: Lue,
filter: Nue
}, bi = function(e) {
this.inputText = e, this.currentSubject = null, this.compoundCount = 0, this.edgeCount = 0, this.length = 0, e == null || at(e) && e.match(/^\s*$/) || (Wr(e) ? this.addQuery({
checks: [{
type: We.COLLECTION,
value: e.collection()
}]
}) : dn(e) ? this.addQuery({
checks: [{
type: We.FILTER,
value: e
}]
}) : at(e) ? this.parse(e) || (this.invalid = !0) : vn("A selector must be created from a string; found "));
}, wi = bi.prototype;
[$ue, Due].forEach(function(e) {
return ct(wi, e);
});
wi.text = function() {
return this.inputText;
};
wi.size = function() {
return this.length;
};
wi.eq = function(e) {
return this[e];
};
wi.sameText = function(e) {
return !this.invalid && !e.invalid && this.text() === e.text();
};
wi.addQuery = function(e) {
this[this.length++] = e;
};
wi.selector = wi.toString;
var si = {
allAre: function(e) {
var t = new bi(e);
return this.every(function(n) {
return t.matches(n);
});
},
is: function(e) {
var t = new bi(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());
});
}
};
si.allAreNeighbours = si.allAreNeighbors;
si.has = si.contains;
si.equal = si.equals = si.same;
var eo = function(e, t) {
return function(n, r, o, a) {
var i = n, s = this, u;
if (i == null ? u = "" : Wr(i) && i.length === 1 && (u = i.id()), s.length === 1 && u) {
var l = s[0]._private, c = l.traversalCache = l.traversalCache || {}, d = c[t] = c[t] || [], f = ys(u), h = d[f];
return h || (d[f] = e.call(s, n, r, o, a));
} else
return e.call(s, n, r, o, a);
};
}, Nl = {
parent: function(e) {
var t = [];
if (this.length === 1) {
var n = this[0]._private.parent;
if (n)
return n;
}
for (var r = 0; r < this.length; r++) {
var o = this[r], a = o._private.parent;
a && t.push(a);
}
return this.spawn(t, !0).filter(e);
},
parents: function(e) {
for (var t = [], n = this.parent(); n.nonempty(); ) {
for (var r = 0; r < n.length; r++) {
var o = n[r];
t.push(o);
}
n = n.parent();
}
return this.spawn(t, !0).filter(e);
},
commonAncestors: function(e) {
for (var t, n = 0; n < this.length; n++) {
var r = this[n], o = r.parents();
t = t || o, t = t.intersect(o);
}
return t.filter(e);
},
orphans: function(e) {
return this.stdFilter(function(t) {
return t.isOrphan();
}).filter(e);
},
nonorphans: function(e) {
return this.stdFilter(function(t) {
return t.isChild();
}).filter(e);
},
children: eo(function(e) {
for (var t = [], n = 0; n < this.length; n++)
for (var r = this[n], o = r._private.children, a = 0; a < o.length; a++)
t.push(o[a]);
return this.spawn(t, !0).filter(e);
}, "children"),
siblings: function(e) {
return this.parent().children().not(this).filter(e);
},
isParent: function() {
var e = this[0];
if (e)
return e.isNode() && e._private.children.length !== 0;
},
isChildless: function() {
var e = this[0];
if (e)
return e.isNode() && e._private.children.length === 0;
},
isChild: function() {
var e = this[0];
if (e)
return e.isNode() && e._private.parent != null;
},
isOrphan: function() {
var e = this[0];
if (e)
return e.isNode() && e._private.parent == null;
},
descendants: function(e) {
var t = [];
function n(r) {
for (var o = 0; o < r.length; o++) {
var a = r[o];
t.push(a), a.children().nonempty() && n(a.children());
}
}
return n(this.children()), this.spawn(t, !0).filter(e);
}
};
function Ty(e, t, n, r) {
for (var o = [], a = new Kl(), i = e.cy(), s = i.hasCompoundNodes(), u = 0; u < e.length; u++) {
var l = e[u];
n ? o.push(l) : s && r(o, a, l);
}
for (; o.length > 0; ) {
var c = o.shift();
t(c), a.add(c.id()), s && r(o, a, c);
}
return e;
}
function DS(e, t, n) {
if (n.isParent())
for (var r = n._private.children, o = 0; o < r.length; o++) {
var a = r[o];
t.has(a.id()) || e.push(a);
}
}
Nl.forEachDown = function(e) {
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0;
return Ty(this, e, t, DS);
};
function RS(e, t, n) {
if (n.isChild()) {
var r = n._private.parent;
t.has(r.id()) || e.push(r);
}
}
Nl.forEachUp = function(e) {
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0;
return Ty(this, e, t, RS);
};
function Rue(e, t, n) {
RS(e, t, n), DS(e, t, n);
}
Nl.forEachUpAndDown = function(e) {
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0;
return Ty(this, e, t, Rue);
};
Nl.ancestors = Nl.parents;
var xc, BS;
xc = BS = {
data: Bt.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: Bt.removeData({
field: "data",
event: "data",
triggerFnName: "trigger",
triggerEvent: !0,
immutableKeys: {
id: !0,
source: !0,
target: !0,
parent: !0
},
updateStyle: !0
}),
scratch: Bt.data({
field: "scratch",
bindingEvent: "scratch",
allowBinding: !0,
allowSetting: !0,
settingEvent: "scratch",
settingTriggersEvent: !0,
triggerFnName: "trigger",
allowGetting: !0,
updateStyle: !0
}),
removeScratch: Bt.removeData({
field: "scratch",
event: "scratch",
triggerFnName: "trigger",
triggerEvent: !0,
updateStyle: !0
}),
rscratch: Bt.data({
field: "rscratch",
allowBinding: !1,
allowSetting: !0,
settingTriggersEvent: !1,
allowGetting: !0
}),
removeRscratch: Bt.removeData({
field: "rscratch",
triggerEvent: !1
}),
id: function() {
var e = this[0];
if (e)
return e._private.data.id;
}
};
xc.attr = xc.data;
xc.removeAttr = xc.removeData;
var Bue = BS, xh = {};
function $v(e) {
return function(t) {
var n = this;
if (t === void 0 && (t = !0), n.length !== 0)
if (n.isNode() && !n.removed()) {
for (var r = 0, o = n[0], a = o._private.edges, i = 0; i < a.length; i++) {
var s = a[i];
!t && s.isLoop() || (r += e(o, s));
}
return r;
} else
return;
};
}
ct(xh, {
degree: $v(function(e, t) {
return t.source().same(t.target()) ? 2 : 1;
}),
indegree: $v(function(e, t) {
return t.target().same(e) ? 1 : 0;
}),
outdegree: $v(function(e, t) {
return t.source().same(e) ? 1 : 0;
})
});
function Us(e, t) {
return function(n) {
for (var r, o = this.nodes(), a = 0; a < o.length; a++) {
var i = o[a], s = i[e](n);
s !== void 0 && (r === void 0 || t(s, r)) && (r = s);
}
return r;
};
}
ct(xh, {
minDegree: Us("degree", function(e, t) {
return e < t;
}),
maxDegree: Us("degree", function(e, t) {
return e > t;
}),
minIndegree: Us("indegree", function(e, t) {
return e < t;
}),
maxIndegree: Us("indegree", function(e, t) {
return e > t;
}),
minOutdegree: Us("outdegree", function(e, t) {
return e < t;
}),
maxOutdegree: Us("outdegree", function(e, t) {
return e > t;
})
});
ct(xh, {
totalDegree: function(e) {
for (var t = 0, n = this.nodes(), r = 0; r < n.length; r++)
t += n[r].degree(e);
return t;
}
});
var Po, MS, zS = function(e, t, n) {
for (var r = 0; r < e.length; r++) {
var o = e[r];
if (!o.locked()) {
var a = o._private.position, i = {
x: t.x != null ? t.x - a.x : 0,
y: t.y != null ? t.y - a.y : 0
};
o.isParent() && !(i.x === 0 && i.y === 0) && o.children().shift(i, n), o.dirtyBoundingBoxCache();
}
}
}, Bx = {
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) {
zS(e, t, !1);
},
onSet: function(e) {
e.dirtyCompoundBoundsCache();
},
canSet: function(e) {
return !e.locked();
}
};
Po = MS = {
position: Bt.data(Bx),
// position but no notification to renderer
silentPosition: Bt.data(ct({}, Bx, {
allowBinding: !1,
allowSetting: !0,
settingTriggersEvent: !1,
allowGetting: !1,
beforeSet: function(e, t) {
zS(e, t, !0);
},
onSet: function(e) {
e.dirtyCompoundBoundsCache();
}
})),
positions: function(e, t) {
if (It(e))
t ? this.silentPosition(e) : this.position(e);
else if (dn(e)) {
var n = e, r = this.cy();
r.startBatch();
for (var o = 0; o < this.length; o++) {
var a = this[o], i = void 0;
(i = n(a, o)) && (t ? a.silentPosition(i) : a.position(i));
}
r.endBatch();
}
return this;
},
silentPositions: function(e) {
return this.positions(e, !0);
},
shift: function(e, t, n) {
var r;
if (It(e) ? (r = {
x: Ve(e.x) ? e.x : 0,
y: Ve(e.y) ? e.y : 0
}, n = t) : at(e) && Ve(t) && (r = {
x: 0,
y: 0
}, r[e] = t), r != null) {
var o = this.cy();
o.startBatch();
for (var a = 0; a < this.length; a++) {
var i = this[a];
if (!(o.hasCompoundNodes() && i.isChild() && i.ancestors().anySame(this))) {
var s = i.position(), u = {
x: s.x + r.x,
y: s.y + r.y
};
n ? i.silentPosition(u) : i.position(u);
}
}
o.endBatch();
}
return this;
},
silentShift: function(e, t) {
return It(e) ? this.shift(e, !0) : at(e) && Ve(t) && this.shift(e, t, !0), this;
},
// get/set the rendered (i.e. on screen) positon of the element
renderedPosition: function(e, t) {
var n = this[0], r = this.cy(), o = r.zoom(), a = r.pan(), i = It(e) ? e : void 0, s = i !== void 0 || t !== void 0 && at(e);
if (n && n.isNode())
if (s)
for (var u = 0; u < this.length; u++) {
var l = this[u];
t !== void 0 ? l.position(e, (t - a[e]) / o) : i !== void 0 && l.position(pS(i, o, a));
}
else {
var c = n.position();
return i = gh(c, o, a), e === void 0 ? i : i[e];
}
else if (!s)
return;
return this;
},
// get/set the position relative to the parent
relativePosition: function(e, t) {
var n = this[0], r = this.cy(), o = It(e) ? e : void 0, a = o !== void 0 || t !== void 0 && at(e), i = r.hasCompoundNodes();
if (n && n.isNode())
if (a)
for (var s = 0; s < this.length; s++) {
var u = this[s], l = i ? u.parent() : null, c = l && l.length > 0, d = c;
c && (l = l[0]);
var f = d ? l.position() : {
x: 0,
y: 0
};
t !== void 0 ? u.position(e, t + f[e]) : o !== void 0 && u.position({
x: o.x + f.x,
y: o.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 o = {
x: h.x - g.x,
y: h.y - g.y
}, e === void 0 ? o : o[e];
}
else if (!a)
return;
return this;
}
};
Po.modelPosition = Po.point = Po.position;
Po.modelPositions = Po.points = Po.positions;
Po.renderedPoint = Po.renderedPosition;
Po.relativePoint = Po.relativePosition;
var Mue = MS, ll, $i;
ll = $i = {};
$i.renderedBoundingBox = function(e) {
var t = this.boundingBox(e), n = this.cy(), r = n.zoom(), o = n.pan(), a = t.x1 * r + o.x, i = t.x2 * r + o.x, s = t.y1 * r + o.y, u = t.y2 * r + o.y;
return {
x1: a,
x2: i,
y1: s,
y2: u,
w: i - a,
h: u - s
};
};
$i.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);
};
$i.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, u = i.children(), l = 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 = u.boundingBox({
includeLabels: l,
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(O, F, $) {
var A = 0, L = 0, N = F + $;
return O > 0 && N > 0 && (A = F / N * O, L = $ / N * O), {
biasDiff: A,
biasComplementDiff: L
};
}
function p(O, F, $, A) {
if ($.units === "%")
switch (A) {
case "width":
return O > 0 ? $.pfValue * O : 0;
case "height":
return F > 0 ? $.pfValue * F : 0;
case "average":
return O > 0 && F > 0 ? $.pfValue * (O + F) / 2 : 0;
case "min":
return O > 0 && F > 0 ? O > F ? $.pfValue * F : $.pfValue * O : 0;
case "max":
return O > 0 && F > 0 ? O > F ? $.pfValue * O : $.pfValue * F : 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 b = c.height.bottom.value;
c.height.bottom.units === "px" && c.height.val > 0 && (b = b * 100 / c.height.val);
var x = h(c.width.val - d.w, v, m), w = x.biasDiff, C = x.biasComplementDiff, k = h(c.height.val - d.h, g, b), E = k.biasDiff, S = k.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 + C) / 2, s.autoHeight = Math.max(d.h, c.height.val), f.y = (-E + d.y1 + d.y2 + S) / 2;
}
for (var r = 0; r < this.length; r++) {
var o = this[r], a = o._private;
(!a.compoundBoundsClean || e) && (n(o), t.batching() || (a.compoundBoundsClean = !0));
}
return this;
};
var Jr = function(e) {
return e === 1 / 0 || e === -1 / 0 ? 0 : e;
}, Eo = function(e, t, n, r, o) {
r - t === 0 || o - n === 0 || t == null || n == null || r == null || o == null || (e.x1 = t < e.x1 ? t : e.x1, e.x2 = r > e.x2 ? r : e.x2, e.y1 = n < e.y1 ? n : e.y1, e.y2 = o > e.y2 ? o : e.y2, e.w = e.x2 - e.x1, e.h = e.y2 - e.y1);
}, Vi = function(e, t) {
return t == null ? e : Eo(e, t.x1, t.y1, t.x2, t.y2);
}, wu = function(e, t, n) {
return _o(e, t, n);
}, Ud = function(e, t, n) {
if (!t.cy().headless()) {
var r = t._private, o = r.rstyle, a = o.arrowWidth / 2, i = t.pstyle(n + "-arrow-shape").value, s, u;
if (i !== "none") {
n === "source" ? (s = o.srcX, u = o.srcY) : n === "target" ? (s = o.tgtX, u = o.tgtY) : (s = o.midX, u = o.midY);
var l = r.arrowBounds = r.arrowBounds || {}, c = l[n] = l[n] || {};
c.x1 = s - a, c.y1 = u - a, c.x2 = s + a, c.y2 = u + a, c.w = c.x2 - c.x1, c.h = c.y2 - c.y1, hp(c, 1), Eo(e, c.x1, c.y1, c.x2, c.y2);
}
}
}, Av = function(e, t, n) {
if (!t.cy().headless()) {
var r;
n ? r = n + "-" : r = "";
var o = t._private, a = o.rstyle, i = t.pstyle(r + "label").strValue;
if (i) {
var s = t.pstyle("text-halign"), u = t.pstyle("text-valign"), l = wu(a, "labelWidth", n), c = wu(a, "labelHeight", n), d = wu(a, "labelX", n), f = wu(a, "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, b = t.pstyle("text-border-width").pfValue, x = b / 2, w = t.pstyle("text-background-padding").pfValue, C = 2, k = c, E = l, S = E / 2, O = k / 2, F, $, A, L;
if (v)
F = d - S, $ = d + S, A = f - O, L = f + O;
else {
switch (s.value) {
case "left":
F = d - E, $ = d;
break;
case "center":
F = d - S, $ = d + S;
break;
case "right":
F = d, $ = d + E;
break;
}
switch (u.value) {
case "top":
A = f - k, L = f;
break;
case "center":
A = f - O, L = f + O;
break;
case "bottom":
A = f, L = f + k;
break;
}
}
F += h - Math.max(g, x) - w - C, $ += h + Math.max(g, x) + w + C, A += p - Math.max(g, x) - w - C, L += p + Math.max(g, x) + w + C;
var N = n || "main", M = o.labelBounds, I = M[N] = M[N] || {};
I.x1 = F, I.y1 = A, I.x2 = $, I.y2 = L, I.w = $ - F, I.h = L - A;
var z = v && m.strValue === "autorotate", R = m.pfValue != null && m.pfValue !== 0;
if (z || R) {
var q = z ? wu(o.rstyle, "labelAngle", n) : m.pfValue, oe = Math.cos(q), Q = Math.sin(q), ae = (F + $) / 2, pe = (A + L) / 2;
if (!v) {
switch (s.value) {
case "left":
ae = $;
break;
case "right":
ae = F;
break;
}
switch (u.value) {
case "top":
pe = L;
break;
case "bottom":
pe = A;
break;
}
}
var we = function(Ee, Ne) {
return Ee = Ee - ae, Ne = Ne - pe, {
x: Ee * oe - Ne * Q + ae,
y: Ee * Q + Ne * oe + pe
};
}, ke = we(F, A), fe = we(F, L), ge = we($, A), J = we($, L);
F = Math.min(ke.x, fe.x, ge.x, J.x), $ = Math.max(ke.x, fe.x, ge.x, J.x), A = Math.min(ke.y, fe.y, ge.y, J.y), L = Math.max(ke.y, fe.y, ge.y, J.y);
}
var te = N + "Rot", le = M[te] = M[te] || {};
le.x1 = F, le.y1 = A, le.x2 = $, le.y2 = L, le.w = $ - F, le.h = L - A, Eo(e, F, A, $, L), Eo(o.labelBounds.all, F, A, $, L);
}
return e;
}
}, zue = function(e, t) {
if (!t.cy().headless()) {
var n = t.pstyle("outline-opacity").value, r = t.pstyle("outline-width").value;
if (n > 0 && r > 0) {
var o = t.pstyle("outline-offset").value, a = t.pstyle("shape").value, i = r + o, s = (e.w + i * 2) / e.w, u = (e.h + i * 2) / e.h, l = 0, c = 0;
["diamond", "pentagon", "round-triangle"].includes(a) ? (s = (e.w + i * 2.4) / e.w, c = -i / 3.6) : ["concave-hexagon", "rhomboid", "right-rhomboid"].includes(a) ? s = (e.w + i * 2.4) / e.w : a === "star" ? (s = (e.w + i * 2.8) / e.w, u = (e.h + i * 2.6) / e.h, c = -i / 3.8) : a === "triangle" ? (s = (e.w + i * 2.8) / e.w, u = (e.h + i * 2.4) / e.h, c = -i / 1.4) : a === "vee" && (s = (e.w + i * 4.4) / e.w, u = (e.h + i * 3.8) / e.h, c = -i * 0.5);
var d = e.h * u - e.h, f = e.w * s - e.w;
if (vp(e, [Math.ceil(d / 2), Math.ceil(f / 2)]), l != 0 || c !== 0) {
var h = sie(e, l, c);
hS(e, h);
}
}
}
}, Vue = function(e, t) {
var n = e._private.cy, r = n.styleEnabled(), o = n.headless(), a = Br(), i = e._private, s = e.isNode(), u = e.isEdge(), l, c, d, f, h, p, v = i.rstyle, m = s && r ? e.pstyle("bounds-expansion").pfValue : [0], g = function(_e) {
return _e.pstyle("display").value !== "none";
}, b = !r || g(e) && (!u || g(e.source()) && g(e.target()));
if (b) {
var x = 0, w = 0;
r && t.includeOverlays && (x = e.pstyle("overlay-opacity").value, x !== 0 && (w = e.pstyle("overlay-padding").value));
var C = 0, k = 0;
r && t.includeUnderlays && (C = e.pstyle("underlay-opacity").value, C !== 0 && (k = e.pstyle("underlay-padding").value));
var E = Math.max(w, k), S = 0, O = 0;
if (r && (S = e.pstyle("width").pfValue, O = S / 2), s && t.includeNodes) {
var F = e.position();
h = F.x, p = F.y;
var $ = e.outerWidth(), A = $ / 2, L = e.outerHeight(), N = L / 2;
l = h - A, c = h + A, d = p - N, f = p + N, Eo(a, l, d, c, f), r && t.includeOutlines && zue(a, e);
} else if (u && t.includeEdges)
if (r && !o) {
var M = e.pstyle("curve-style").strValue;
if (l = 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), l -= O, c += O, d -= O, f += O, Eo(a, l, d, c, f), M === "haystack") {
var I = v.haystackPts;
if (I && I.length === 2) {
if (l = I[0].x, d = I[0].y, c = I[1].x, f = I[1].y, l > c) {
var z = l;
l = c, c = z;
}
if (d > f) {
var R = d;
d = f, f = R;
}
Eo(a, l - O, d - O, c + O, f + O);
}
} else if (M === "bezier" || M === "unbundled-bezier" || M.endsWith("segments") || M.endsWith("taxi")) {
var q;
switch (M) {
case "bezier":
case "unbundled-bezier":
q = v.bezierPts;
break;
case "segments":
case "taxi":
case "round-segments":
case "round-taxi":
q = v.linePts;
break;
}
if (q != null)
for (var oe = 0; oe < q.length; oe++) {
var Q = q[oe];
l = Q.x - O, c = Q.x + O, d = Q.y - O, f = Q.y + O, Eo(a, l, d, c, f);
}
}
} else {
var ae = e.source(), pe = ae.position(), we = e.target(), ke = we.position();
if (l = pe.x, c = ke.x, d = pe.y, f = ke.y, l > c) {
var fe = l;
l = c, c = fe;
}
if (d > f) {
var ge = d;
d = f, f = ge;
}
l -= O, c += O, d -= O, f += O, Eo(a, l, d, c, f);
}
if (r && t.includeEdges && u && (Ud(a, e, "mid-source"), Ud(a, e, "mid-target"), Ud(a, e, "source"), Ud(a, e, "target")), r) {
var J = e.pstyle("ghost").value === "yes";
if (J) {
var te = e.pstyle("ghost-offset-x").pfValue, le = e.pstyle("ghost-offset-y").pfValue;
Eo(a, a.x1 + te, a.y1 + le, a.x2 + te, a.y2 + le);
}
}
var Ee = i.bodyBounds = i.bodyBounds || {};
mx(Ee, a), vp(Ee, m), hp(Ee, 1), r && (l = a.x1, c = a.x2, d = a.y1, f = a.y2, Eo(a, l - E, d - E, c + E, f + E));
var Ne = i.overlayBounds = i.overlayBounds || {};
mx(Ne, a), vp(Ne, m), hp(Ne, 1);
var je = i.labelBounds = i.labelBounds || {};
je.all != null ? iie(je.all) : je.all = Br(), r && t.includeLabels && (t.includeMainLabels && Av(a, e, null), u && (t.includeSourceLabels && Av(a, e, "source"), t.includeTargetLabels && Av(a, e, "target")));
}
return a.x1 = Jr(a.x1), a.y1 = Jr(a.y1), a.x2 = Jr(a.x2), a.y2 = Jr(a.y2), a.w = Jr(a.x2 - a.x1), a.h = Jr(a.y2 - a.y1), a.w > 0 && a.h > 0 && b && (vp(a, m), hp(a, 1)), a;
}, VS = function(e) {
var t = 0, n = function(o) {
return (o ? 1 : 0) << t++;
}, r = 0;
return r += n(e.incudeNodes), r += n(e.includeEdges), r += n(e.includeLabels), r += n(e.includeMainLabels), r += n(e.includeSourceLabels), r += n(e.includeTargetLabels), r += n(e.includeOverlays), r += n(e.includeOutlines), r;
}, jS = function(e) {
if (e.isEdge()) {
var t = e.source().position(), n = e.target().position(), r = function(o) {
return Math.round(o);
};
return Tae([r(t.x), r(t.y), r(n.x), r(n.y)]);
} else
return 0;
}, Mx = function(e, t) {
var n = e._private, r, o = e.isEdge(), a = t == null ? zx : VS(t), i = a === zx, s = jS(e), u = n.bbCachePosKey === s, l = t.useCache && u, c = function(h) {
return h._private.bbCache == null || h._private.styleDirty;
}, d = !l || c(e) || o && c(e.source()) || c(e.target());
if (d ? (u || e.recalculateRenderedStyle(l), r = Vue(e, kc), n.bbCache = r, n.bbCachePosKey = s) : r = n.bbCache, !i) {
var f = e.isNode();
r = Br(), (t.includeNodes && f || t.includeEdges && !f) && (t.includeOverlays ? Vi(r, n.overlayBounds) : Vi(r, n.bodyBounds)), t.includeLabels && (t.includeMainLabels && (!o || t.includeSourceLabels && t.includeTargetLabels) ? Vi(r, n.labelBounds.all) : (t.includeMainLabels && Vi(r, n.labelBounds.mainRot), t.includeSourceLabels && Vi(r, n.labelBounds.sourceRot), t.includeTargetLabels && Vi(r, n.labelBounds.targetRot))), r.w = r.x2 - r.x1, r.h = r.y2 - r.y1;
}
return r;
}, kc = {
includeNodes: !0,
includeEdges: !0,
includeLabels: !0,
includeMainLabels: !0,
includeSourceLabels: !0,
includeTargetLabels: !0,
includeOverlays: !0,
includeUnderlays: !0,
includeOutlines: !0,
useCache: !0
}, zx = VS(kc), Vx = nr(kc);
$i.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 = kc : e = Vx(e), t = Mx(this[0], e);
else {
t = Br(), e = e || kc;
var n = Vx(e), r = this, o = r.cy(), a = o.styleEnabled();
if (a)
for (var i = 0; i < r.length; i++) {
var s = r[i], u = s._private, l = jS(s), c = u.bbCachePosKey === l, d = n.useCache && c && !u.styleDirty;
s.recalculateRenderedStyle(d);
}
this.updateCompoundBounds(!e.useCache);
for (var f = 0; f < r.length; f++) {
var h = r[f];
Vi(t, Mx(h, n));
}
}
return t.x1 = Jr(t.x1), t.y1 = Jr(t.y1), t.x2 = Jr(t.x2), t.y2 = Jr(t.y2), t.w = Jr(t.x2 - t.x1), t.h = Jr(t.y2 - t.y1), t;
};
$i.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;
};
$i.boundingBoxAt = function(e) {
var t = this.nodes(), n = this.cy(), r = n.hasCompoundNodes(), o = n.collection();
if (r && (o = t.filter(function(l) {
return l.isParent();
}), t = t.not(o)), It(e)) {
var a = e;
e = function() {
return a;
};
}
var i = function(l, c) {
return l._private.bbAtOldPos = e(l, c);
}, s = function(l) {
return l._private.bbAtOldPos;
};
n.startBatch(), t.forEach(i).silentPositions(e), r && (o.dirtyCompoundBoundsCache(), o.dirtyBoundingBoxCache(), o.updateCompoundBounds(!0));
var u = aie(this.boundingBox({
useCache: !1
}));
return t.silentPositions(s), r && (o.dirtyCompoundBoundsCache(), o.dirtyBoundingBoxCache(), o.updateCompoundBounds(!0)), n.endBatch(), u;
};
ll.boundingbox = ll.bb = ll.boundingBox;
ll.renderedBoundingbox = ll.renderedBoundingBox;
var jue = $i, Pu, td;
Pu = td = {};
var HS = function(e) {
e.uppercaseName = cx(e.name), e.autoName = "auto" + e.uppercaseName, e.labelName = "label" + e.uppercaseName, e.outerName = "outer" + e.uppercaseName, e.uppercaseOuterName = cx(e.outerName), Pu[e.name] = function() {
var t = this[0], n = t._private, r = n.cy, o = r._private.styleEnabled;
if (t)
if (o) {
if (t.isParent())
return t.updateCompoundBounds(), n[e.autoName] || 0;
var a = t.pstyle(e.name);
switch (a.strValue) {
case "label":
return t.recalculateRenderedStyle(), n.rstyle[e.labelName] || 0;
default:
return a.pfValue;
}
} else
return 1;
}, Pu["outer" + e.uppercaseName] = function() {
var t = this[0], n = t._private, r = n.cy, o = r._private.styleEnabled;
if (t)
if (o) {
var a = t[e.name](), i = t.pstyle("border-width").pfValue, s = 2 * t.padding();
return a + i + s;
} else
return 1;
}, Pu["rendered" + e.uppercaseName] = function() {
var t = this[0];
if (t) {
var n = t[e.name]();
return n * this.cy().zoom();
}
}, Pu["rendered" + e.uppercaseOuterName] = function() {
var t = this[0];
if (t) {
var n = t[e.outerName]();
return n * this.cy().zoom();
}
};
};
HS({
name: "width"
});
HS({
name: "height"
});
td.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;
};
td.paddedHeight = function() {
var e = this[0];
return e.height() + 2 * e.padding();
};
td.paddedWidth = function() {
var e = this[0];
return e.width() + 2 * e.padding();
};
var Hue = td, Uue = function(e, t) {
if (e.isEdge())
return t(e);
}, que = function(e, t) {
if (e.isEdge()) {
var n = e.cy();
return gh(t(e), n.zoom(), n.pan());
}
}, Wue = function(e, t) {
if (e.isEdge()) {
var n = e.cy(), r = n.pan(), o = n.zoom();
return t(e).map(function(a) {
return gh(a, o, r);
});
}
}, Kue = function(e) {
return e.renderer().getControlPoints(e);
}, Gue = function(e) {
return e.renderer().getSegmentPoints(e);
}, Xue = function(e) {
return e.renderer().getSourceEndpoint(e);
}, Yue = function(e) {
return e.renderer().getTargetEndpoint(e);
}, Zue = function(e) {
return e.renderer().getEdgeMidpoint(e);
}, jx = {
controlPoints: {
get: Kue,
mult: !0
},
segmentPoints: {
get: Gue,
mult: !0
},
sourceEndpoint: {
get: Xue
},
targetEndpoint: {
get: Yue
},
midpoint: {
get: Zue
}
}, Jue = function(e) {
return "rendered" + e[0].toUpperCase() + e.substr(1);
}, Que = Object.keys(jx).reduce(function(e, t) {
var n = jx[t], r = Jue(t);
return e[t] = function() {
return Uue(this, n.get);
}, n.mult ? e[r] = function() {
return Wue(this, n.get);
} : e[r] = function() {
return que(this, n.get);
}, e;
}, {}), ece = ct({}, Mue, jue, Hue, Que);
/*!
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 US = function(e, t) {
this.recycle(e, t);
};
function xu() {
return !1;
}
function qd() {
return !0;
}
US.prototype = {
instanceString: function() {
return "event";
},
recycle: function(e, t) {
if (this.isImmediatePropagationStopped = this.isPropagationStopped = this.isDefaultPrevented = xu, e != null && e.preventDefault ? (this.type = e.type, this.isDefaultPrevented = e.defaultPrevented ? qd : xu) : e != null && e.type ? t = e : this.type = e, t != null && (this.originalEvent = t.originalEvent, this.type = t.type != null ? t.type : this.type, this.cy = t.cy, this.target = t.target, this.position = t.position, this.renderedPosition = t.renderedPosition, this.namespace = t.namespace, this.layout = t.layout), this.cy != null && this.position != null && this.renderedPosition == null) {
var n = this.position, r = this.cy.zoom(), o = this.cy.pan();
this.renderedPosition = {
x: n.x * r + o.x,
y: n.y * r + o.y
};
}
this.timeStamp = e && e.timeStamp || Date.now();
},
preventDefault: function() {
this.isDefaultPrevented = qd;
var e = this.originalEvent;
e && e.preventDefault && e.preventDefault();
},
stopPropagation: function() {
this.isPropagationStopped = qd;
var e = this.originalEvent;
e && e.stopPropagation && e.stopPropagation();
},
stopImmediatePropagation: function() {
this.isImmediatePropagationStopped = qd, this.stopPropagation();
},
isDefaultPrevented: xu,
isPropagationStopped: xu,
isImmediatePropagationStopped: xu
};
var qS = /^([^.]+)(\.(?:[^.]+))?$/, tce = ".*", WS = {
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
}, Hx = Object.keys(WS), nce = {};
function kh() {
for (var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : nce, t = arguments.length > 1 ? arguments[1] : void 0, n = 0; n < Hx.length; n++) {
var r = Hx[n];
this[r] = e[r] || WS[r];
}
this.context = t || this.context, this.listeners = [], this.emitting = 0;
}
var xi = kh.prototype, KS = function(e, t, n, r, o, a, i) {
dn(r) && (o = r, r = null), i && (a == null ? a = i : a = ct({}, a, i));
for (var s = Gt(n) ? n : n.split(/\s+/), u = 0; u < s.length; u++) {
var l = s[u];
if (!mi(l)) {
var c = l.match(qS);
if (c) {
var d = c[1], f = c[2] ? c[2] : null, h = t(e, l, d, f, r, o, a);
if (h === !1)
break;
}
}
}
}, Ux = function(e, t) {
return e.addEventFields(e.context, t), new US(t.type, t);
}, rce = function(e, t, n) {
if (Coe(n)) {
t(e, n);
return;
} else if (It(n)) {
t(e, Ux(e, n));
return;
}
for (var r = Gt(n) ? n : n.split(/\s+/), o = 0; o < r.length; o++) {
var a = r[o];
if (!mi(a)) {
var i = a.match(qS);
if (i) {
var s = i[1], u = i[2] ? i[2] : null, l = Ux(e, {
type: s,
namespace: u,
target: e.context
});
t(e, l);
}
}
}
};
xi.on = xi.addListener = function(e, t, n, r, o) {
return KS(this, function(a, i, s, u, l, c, d) {
dn(c) && a.listeners.push({
event: i,
// full event string
callback: c,
// callback to run
type: s,
// the event type (e.g. 'click')
namespace: u,
// the event namespace (e.g. ".foo")
qualifier: l,
// a restriction on whether to match this emitter
conf: d
// additional configuration
});
}, e, t, n, r, o), this;
};
xi.one = function(e, t, n, r) {
return this.on(e, t, n, r, {
one: !0
});
};
xi.removeListener = xi.off = function(e, t, n, r) {
var o = this;
this.emitting !== 0 && (this.listeners = Fae(this.listeners));
for (var a = this.listeners, i = function(u) {
var l = a[u];
KS(o, function(c, d, f, h, p, v) {
if ((l.type === f || e === "*") && (!h && l.namespace !== ".*" || l.namespace === h) && (!p || c.qualifierCompare(l.qualifier, p)) && (!v || l.callback === v))
return a.splice(u, 1), !1;
}, e, t, n, r);
}, s = a.length - 1; s >= 0; s--)
i(s);
return this;
};
xi.removeAllListeners = function() {
return this.removeListener("*");
};
xi.emit = xi.trigger = function(e, t, n) {
var r = this.listeners, o = r.length;
return this.emitting++, Gt(t) || (t = [t]), rce(this, function(a, i) {
n != null && (r = [{
event: i.event,
type: i.type,
namespace: i.namespace,
callback: n
}], o = r.length);
for (var s = function(l) {
var c = r[l];
if (c.type === i.type && (!c.namespace || c.namespace === i.namespace || c.namespace === tce) && a.eventMatches(a.context, c, i)) {
var d = [i];
t != null && Nae(d, t), a.beforeEmit(a.context, c, i), c.conf && c.conf.one && (a.listeners = a.listeners.filter(function(p) {
return p !== c;
}));
var f = a.callbackContext(a.context, c, i), h = c.callback.apply(f, d);
a.afterEmit(a.context, c, i), h === !1 && (i.stopPropagation(), i.preventDefault());
}
}, u = 0; u < o; u++)
s(u);
a.bubble(a.context) && !i.isPropagationStopped() && a.parent(a.context).emit(i, t);
}, e), this.emitting--, this;
};
var oce = {
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 && Jc(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();
}
}, Wd = function(e) {
return at(e) ? new bi(e) : e;
}, GS = {
createEmitter: function() {
for (var e = 0; e < this.length; e++) {
var t = this[e], n = t._private;
n.emitter || (n.emitter = new kh(oce, t));
}
return this;
},
emitter: function() {
return this._private.emitter;
},
on: function(e, t, n) {
for (var r = Wd(t), o = 0; o < this.length; o++) {
var a = this[o];
a.emitter().on(e, r, n);
}
return this;
},
removeListener: function(e, t, n) {
for (var r = Wd(t), o = 0; o < this.length; o++) {
var a = this[o];
a.emitter().removeListener(e, r, n);
}
return this;
},
removeAllListeners: function() {
for (var e = 0; e < this.length; e++) {
var t = this[e];
t.emitter().removeAllListeners();
}
return this;
},
one: function(e, t, n) {
for (var r = Wd(t), o = 0; o < this.length; o++) {
var a = this[o];
a.emitter().one(e, r, n);
}
return this;
},
once: function(e, t, n) {
for (var r = Wd(t), o = 0; o < this.length; o++) {
var a = this[o];
a.emitter().on(e, r, n, {
once: !0,
onceCollection: this
});
}
},
emit: function(e, t) {
for (var n = 0; n < this.length; n++) {
var r = this[n];
r.emitter().emit(e, t);
}
return this;
},
emitAndNotify: function(e, t) {
if (this.length !== 0)
return this.cy().notify(e, this), this.emit(e, t), this;
}
};
Bt.eventAliasesOn(GS);
var XS = {
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 (at(e) || Wr(e))
return new bi(e).filter(this);
if (dn(e)) {
for (var n = this.spawn(), r = this, o = 0; o < r.length; o++) {
var a = r[o], i = t ? e.apply(t, [a, o, r]) : e(a, o, r);
i && n.push(a);
}
return n;
}
return this.spawn();
},
not: function(e) {
if (e) {
at(e) && (e = this.filter(e));
for (var t = this.spawn(), n = 0; n < this.length; n++) {
var r = this[n], o = e.has(r);
o || t.push(r);
}
return t;
} else
return this;
},
absoluteComplement: function() {
var e = this.cy();
return e.mutableElements().not(this);
},
intersect: function(e) {
if (at(e)) {
var t = e;
return this.filter(t);
}
for (var n = this.spawn(), r = this, o = e, a = this.length < e.length, i = a ? r : o, s = a ? o : r, u = 0; u < i.length; u++) {
var l = i[u];
s.has(l) && n.push(l);
}
return n;
},
xor: function(e) {
var t = this._private.cy;
at(e) && (e = t.$(e));
var n = this.spawn(), r = this, o = e, a = function(i, s) {
for (var u = 0; u < i.length; u++) {
var l = i[u], c = l._private.data.id, d = s.hasElementWithId(c);
d || n.push(l);
}
};
return a(r, o), a(o, r), n;
},
diff: function(e) {
var t = this._private.cy;
at(e) && (e = t.$(e));
var n = this.spawn(), r = this.spawn(), o = this.spawn(), a = this, i = e, s = function(u, l, c) {
for (var d = 0; d < u.length; d++) {
var f = u[d], h = f._private.data.id, p = l.hasElementWithId(h);
p ? o.merge(f) : c.push(f);
}
};
return s(a, i, n), s(i, a, r), {
left: n,
right: r,
both: o
};
},
add: function(e) {
var t = this._private.cy;
if (!e)
return this;
if (at(e)) {
var n = e;
e = t.mutableElements().filter(n);
}
for (var r = this.spawnSelf(), o = 0; o < e.length; o++) {
var a = e[o], i = !this.has(a);
i && r.push(a);
}
return r;
},
// in place merge on calling collection
merge: function(e) {
var t = this._private, n = t.cy;
if (!e)
return this;
if (e && at(e)) {
var r = e;
e = n.mutableElements().filter(r);
}
for (var o = t.map, a = 0; a < e.length; a++) {
var i = e[a], s = i._private.data.id, u = !o.has(s);
if (u) {
var l = this.length++;
this[l] = i, o.set(s, {
ele: i,
index: l
});
}
}
return this;
},
unmergeAt: function(e) {
var t = this[e], n = t.id(), r = this._private, o = r.map;
this[e] = void 0, o.delete(n);
var a = e === this.length - 1;
if (this.length > 1 && !a) {
var i = this.length - 1, s = this[i], u = s._private.data.id;
this[i] = void 0, this[e] = s, o.set(u, {
ele: s,
index: e
});
}
return this.length--, this;
},
// remove single ele in place in calling collection
unmergeOne: function(e) {
e = e[0];
var t = this._private, n = e._private.data.id, r = t.map, o = r.get(n);
if (!o)
return this;
var a = o.index;
return this.unmergeAt(a), this;
},
// remove eles in place on calling collection
unmerge: function(e) {
var t = this._private.cy;
if (!e)
return this;
if (e && at(e)) {
var n = e;
e = t.mutableElements().filter(n);
}
for (var r = 0; r < e.length; r++)
this.unmergeOne(e[r]);
return this;
},
unmergeBy: function(e) {
for (var t = this.length - 1; t >= 0; t--) {
var n = this[t];
e(n) && this.unmergeAt(t);
}
return this;
},
map: function(e, t) {
for (var n = [], r = this, o = 0; o < r.length; o++) {
var a = r[o], i = t ? e.apply(t, [a, o, r]) : e(a, o, r);
n.push(i);
}
return n;
},
reduce: function(e, t) {
for (var n = t, r = this, o = 0; o < r.length; o++)
n = e(n, r[o], o, r);
return n;
},
max: function(e, t) {
for (var n = -1 / 0, r, o = this, a = 0; a < o.length; a++) {
var i = o[a], s = t ? e.apply(t, [i, a, o]) : e(i, a, o);
s > n && (n = s, r = i);
}
return {
value: n,
ele: r
};
},
min: function(e, t) {
for (var n = 1 / 0, r, o = this, a = 0; a < o.length; a++) {
var i = o[a], s = t ? e.apply(t, [i, a, o]) : e(i, a, o);
s < n && (n = s, r = i);
}
return {
value: n,
ele: r
};
}
}, Lt = XS;
Lt.u = Lt["|"] = Lt["+"] = Lt.union = Lt.or = Lt.add;
Lt["\\"] = Lt["!"] = Lt["-"] = Lt.difference = Lt.relativeComplement = Lt.subtract = Lt.not;
Lt.n = Lt["&"] = Lt["."] = Lt.and = Lt.intersection = Lt.intersect;
Lt["^"] = Lt["(+)"] = Lt["(-)"] = Lt.symmetricDifference = Lt.symdiff = Lt.xor;
Lt.fnFilter = Lt.filterFn = Lt.stdFilter = Lt.filter;
Lt.complement = Lt.abscomp = Lt.absoluteComplement;
var ace = {
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;
}
}, YS = function(e, t) {
var n = e.cy(), r = n.hasCompoundNodes();
function o(l) {
var c = l.pstyle("z-compound-depth");
return c.value === "auto" ? r ? l.zDepth() : 0 : c.value === "bottom" ? -1 : c.value === "top" ? gy : 0;
}
var a = o(e) - o(t);
if (a !== 0)
return a;
function i(l) {
var c = l.pstyle("z-index-compare");
return c.value === "auto" && l.isNode() ? 1 : 0;
}
var s = i(e) - i(t);
if (s !== 0)
return s;
var u = e.pstyle("z-index").value - t.pstyle("z-index").value;
return u !== 0 ? u : e.poolIndex() - t.poolIndex();
}, af = {
forEach: function(e, t) {
if (dn(e))
for (var n = this.length, r = 0; r < n; r++) {
var o = this[r], a = t ? e.apply(t, [o, r, this]) : e(o, r, this);
if (a === !1)
break;
}
return this;
},
toArray: function() {
for (var e = [], t = 0; t < this.length; t++)
e.push(this[t]);
return e;
},
slice: function(e, t) {
var n = [], r = this.length;
t == null && (t = r), e == null && (e = 0), e < 0 && (e = r + e), t < 0 && (t = r + t);
for (var o = e; o >= 0 && o < t && o < r; o++)
n.push(this[o]);
return this.spawn(n);
},
size: function() {
return this.length;
},
eq: function(e) {
return this[e] || this.spawn();
},
first: function() {
return this[0] || this.spawn();
},
last: function() {
return this[this.length - 1] || this.spawn();
},
empty: function() {
return this.length === 0;
},
nonempty: function() {
return !this.empty();
},
sort: function(e) {
if (!dn(e))
return this;
var t = this.toArray().sort(e);
return this.spawn(t);
},
sortByZIndex: function() {
return this.sort(YS);
},
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 : gy - 1;
} else {
var o = t.source, a = t.target, i = o.zDepth(), s = a.zDepth();
return Math.max(i, s, 0);
}
}
}
};
af.each = af.forEach;
var ice = function() {
var e = "undefined", t = (typeof Symbol > "u" ? "undefined" : Dn(Symbol)) != e && Dn(Symbol.iterator) != e;
t && (af[Symbol.iterator] = function() {
var n = this, r = {
value: void 0,
done: !1
}, o = 0, a = this.length;
return WE({
next: function() {
return o < a ? r.value = n[o++] : (r.value = void 0, r.done = !0), r;
}
}, Symbol.iterator, function() {
return this;
});
});
};
ice();
var sce = nr({
nodeDimensionsIncludeLabels: !1
}), mp = {
// Calculates and returns node dimensions { x, y } based on options given
layoutDimensions: function(e) {
e = sce(e);
var t;
if (!this.takesUpSpace())
t = {
w: 0,
h: 0
};
else if (e.nodeDimensionsIncludeLabels) {
var n = this.boundingBox();
t = {
w: n.w,
h: n.h
};
} else
t = {
w: this.outerWidth(),
h: this.outerHeight()
};
return (t.w === 0 || t.h === 0) && (t.w = t.h = 1), t;
},
// using standard layout options, apply position function (w/ or w/o animation)
layoutPositions: function(e, t, n) {
var r = this.nodes().filter(function(w) {
return !w.isParent();
}), o = this.cy(), a = t.eles, i = function(w) {
return w.id();
}, s = hc(n, i);
e.emit({
type: "layoutstart",
layout: e
}), e.animations = [];
var u = function(w, C, k) {
var E = {
x: C.x1 + C.w / 2,
y: C.y1 + C.h / 2
}, S = {
// scale from center of bounding box (not necessarily 0,0)
x: (k.x - E.x) * w,
y: (k.y - E.y) * w
};
return {
x: E.x + S.x,
y: E.y + S.y
};
}, l = t.spacingFactor && t.spacingFactor !== 1, c = function() {
if (!l)
return null;
for (var w = Br(), C = 0; C < r.length; C++) {
var k = r[C], E = s(k, C);
lie(w, E.x, E.y);
}
return w;
}, d = c(), f = hc(function(w, C) {
var k = s(w, C);
if (l) {
var E = Math.abs(t.spacingFactor);
k = u(E, d, k);
}
return t.transform != null && (k = t.transform(w, k)), k;
}, 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 b = o.animation({
fit: {
boundingBox: a.boundingBoxAt(f),
padding: t.padding
},
duration: t.animationDuration,
easing: t.animationEasing
});
e.animations.push(b);
} else if (t.zoom !== void 0 && t.pan !== void 0) {
var x = o.animation({
zoom: t.zoom,
pan: t.pan,
duration: t.animationDuration,
easing: t.animationEasing
});
e.animations.push(x);
}
e.animations.forEach(function(w) {
return w.play();
}), e.one("layoutready", t.ready), e.emit({
type: "layoutready",
layout: e
}), Gl.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 && o.fit(t.eles, t.padding), t.zoom != null && o.zoom(t.zoom), t.pan && o.pan(t.pan), e.one("layoutready", t.ready), e.emit({
type: "layoutready",
layout: e
}), e.one("layoutstop", t.stop), e.emit({
type: "layoutstop",
layout: e
});
return this;
},
layout: function(e) {
var t = this.cy();
return t.makeLayout(ct({}, e, {
eles: this
}));
}
};
mp.createLayout = mp.makeLayout = mp.layout;
function ZS(e, t, n) {
var r = n._private, o = r.styleCache = r.styleCache || [], a;
return (a = o[e]) != null || (a = o[e] = t(n)), a;
}
function Ch(e, t) {
return e = ys(e), function(n) {
return ZS(e, t, n);
};
}
function Eh(e, t) {
e = ys(e);
var n = function(r) {
return t.call(r);
};
return function() {
var r = this[0];
if (r)
return ZS(e, n, r);
};
}
var er = {
recalculateRenderedStyle: function(e) {
var t = this.cy(), n = t.renderer(), r = t.styleEnabled();
return n && r && n.recalculateRenderedStyle(this, e), this;
},
dirtyStyleCache: function() {
var e = this.cy(), t = function(r) {
return r._private.styleCache = null;
};
if (e.hasCompoundNodes()) {
var n;
n = this.spawnSelf().merge(this.descendants()).merge(this.parents()), n.merge(n.connectedEdges()), n.forEach(t);
} else
this.forEach(function(r) {
t(r), r.connectedEdges().forEach(t);
});
return this;
},
// fully updates (recalculates) the style for the elements
updateStyle: function(e) {
var t = this._private.cy;
if (!t.styleEnabled())
return this;
if (t.batching()) {
var n = t._private.batchStyleEles;
return n.merge(this), this;
}
var r = t.hasCompoundNodes(), o = this;
e = !!(e || e === void 0), r && (o = this.spawnSelf().merge(this.descendants()).merge(this.parents()));
var a = o;
return e ? a.emitAndNotify("style") : a.emit("style"), o.forEach(function(i) {
return i._private.styleDirty = !0;
}), this;
},
// private: clears dirty flag and recalculates style
cleanStyle: function() {
var e = this.cy();
if (e.styleEnabled())
for (var t = 0; t < this.length; t++) {
var n = this[t];
n._private.styleDirty && (n._private.styleDirty = !1, e.style().apply(n));
}
},
// get the internal parsed style object for the specified property
parsedStyle: function(e) {
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, n = this[0], r = n.cy();
if (r.styleEnabled() && n) {
this.cleanStyle();
var o = n._private.style[e];
return o ?? (t ? r.style().getDefaultProperty(e) : null);
}
},
numericStyle: function(e) {
var t = this[0];
if (t.cy().styleEnabled() && t) {
var n = t.pstyle(e);
return n.pfValue !== void 0 ? n.pfValue : n.value;
}
},
numericStyleUnits: function(e) {
var t = this[0];
if (t.cy().styleEnabled() && t)
return t.pstyle(e).units;
},
// get the specified css property as a rendered value (i.e. on-screen value)
// or get the whole rendered style if no property specified (NB doesn't allow setting)
renderedStyle: function(e) {
var t = this.cy();
if (!t.styleEnabled())
return this;
var n = this[0];
if (n)
return t.style().getRenderedStyle(n, e);
},
// read the calculated css style of the element or override the style (via a bypass)
style: function(e, t) {
var n = this.cy();
if (!n.styleEnabled())
return this;
var r = !1, o = n.style();
if (It(e)) {
var a = e;
o.applyBypass(this, a, r), this.emitAndNotify("style");
} else if (at(e))
if (t === void 0) {
var i = this[0];
return i ? o.getStylePropertyValue(i, e) : void 0;
} else
o.applyBypass(this, e, t, r), this.emitAndNotify("style");
else if (e === void 0) {
var s = this[0];
return s ? o.getRawStyle(s) : void 0;
}
return this;
},
removeStyle: function(e) {
var t = this.cy();
if (!t.styleEnabled())
return this;
var n = !1, r = t.style(), o = this;
if (e === void 0)
for (var a = 0; a < o.length; a++) {
var i = o[a];
r.removeAllBypasses(i, n);
}
else {
e = e.split(/\s+/);
for (var s = 0; s < o.length; s++) {
var u = o[s];
r.removeBypasses(u, e, n);
}
}
return this.emitAndNotify("style"), this;
},
show: function() {
return this.css("display", "element"), this;
},
hide: function() {
return this.css("display", "none"), this;
},
effectiveOpacity: function() {
var e = this.cy();
if (!e.styleEnabled())
return 1;
var t = e.hasCompoundNodes(), n = this[0];
if (n) {
var r = n._private, o = n.pstyle("opacity").value;
if (!t)
return o;
var a = r.data.parent ? n.parents() : null;
if (a)
for (var i = 0; i < a.length; i++) {
var s = a[i], u = s.pstyle("opacity").value;
o = u * o;
}
return o;
}
},
transparent: function() {
var e = this.cy();
if (!e.styleEnabled())
return !1;
var t = this[0], n = t.cy().hasCompoundNodes();
if (t)
return n ? t.effectiveOpacity() === 0 : t.pstyle("opacity").value === 0;
},
backgrounding: function() {
var e = this.cy();
if (!e.styleEnabled())
return !1;
var t = this[0];
return !!t._private.backgrounding;
}
};
function Fv(e, t) {
var n = e._private, r = n.data.parent ? e.parents() : null;
if (r)
for (var o = 0; o < r.length; o++) {
var a = r[o];
if (!t(a))
return !1;
}
return !0;
}
function Oy(e) {
var t = e.ok, n = e.edgeOkViaNode || e.ok, r = e.parentOk || e.ok;
return function() {
var o = this.cy();
if (!o.styleEnabled())
return !0;
var a = this[0], i = o.hasCompoundNodes();
if (a) {
var s = a._private;
if (!t(a))
return !1;
if (a.isNode())
return !i || Fv(a, r);
var u = s.source, l = s.target;
return n(u) && (!i || Fv(u, n)) && (u === l || n(l) && (!i || Fv(l, n)));
}
};
}
var Jl = Ch("eleTakesUpSpace", function(e) {
return e.pstyle("display").value === "element" && e.width() !== 0 && (e.isNode() ? e.height() !== 0 : !0);
});
er.takesUpSpace = Eh("takesUpSpace", Oy({
ok: Jl
}));
var lce = Ch("eleInteractive", function(e) {
return e.pstyle("events").value === "yes" && e.pstyle("visibility").value === "visible" && Jl(e);
}), uce = Ch("parentInteractive", function(e) {
return e.pstyle("visibility").value === "visible" && Jl(e);
});
er.interactive = Eh("interactive", Oy({
ok: lce,
parentOk: uce,
edgeOkViaNode: Jl
}));
er.noninteractive = function() {
var e = this[0];
if (e)
return !e.interactive();
};
var cce = Ch("eleVisible", function(e) {
return e.pstyle("visibility").value === "visible" && e.pstyle("opacity").pfValue !== 0 && Jl(e);
}), dce = Jl;
er.visible = Eh("visible", Oy({
ok: cce,
edgeOkViaNode: dce
}));
er.hidden = function() {
var e = this[0];
if (e)
return !e.visible();
};
er.isBundledBezier = Eh("isBundledBezier", function() {
return this.cy().styleEnabled() ? !this.removed() && this.pstyle("curve-style").value === "bezier" && this.takesUpSpace() : !1;
});
er.bypass = er.css = er.style;
er.renderedCss = er.renderedStyle;
er.removeBypass = er.removeCss = er.removeStyle;
er.pstyle = er.parsedStyle;
var li = {};
function qx(e) {
return function() {
var t = arguments, n = [];
if (t.length === 2) {
var r = t[0], o = t[1];
this.on(e.event, r, o);
} else if (t.length === 1 && dn(t[0])) {
var a = t[0];
this.on(e.event, a);
} else if (t.length === 0 || t.length === 1 && Gt(t[0])) {
for (var i = t.length === 1 ? t[0] : null, s = 0; s < this.length; s++) {
var u = this[s], l = !e.ableField || u._private[e.ableField], c = u._private[e.field] != e.value;
if (e.overrideAble) {
var d = e.overrideAble(u);
if (d !== void 0 && (l = d, !d))
return this;
}
l && (u._private[e.field] = e.value, c && n.push(u));
}
var f = this.spawn(n);
f.updateStyle(), f.emit(e.event), i && f.emit(i);
}
return this;
};
}
function Ql(e) {
li[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];
}
}, li[e.on] = qx({
event: e.on,
field: e.field,
ableField: e.ableField,
overrideAble: e.overrideAble,
value: !0
}), li[e.off] = qx({
event: e.off,
field: e.field,
ableField: e.ableField,
overrideAble: e.overrideAble,
value: !1
});
}
Ql({
field: "locked",
overrideField: function(e) {
return e.cy().autolock() ? !0 : void 0;
},
on: "lock",
off: "unlock"
});
Ql({
field: "grabbable",
overrideField: function(e) {
return e.cy().autoungrabify() || e.pannable() ? !1 : void 0;
},
on: "grabify",
off: "ungrabify"
});
Ql({
field: "selected",
ableField: "selectable",
overrideAble: function(e) {
return e.cy().autounselectify() ? !1 : void 0;
},
on: "select",
off: "unselect"
});
Ql({
field: "selectable",
overrideField: function(e) {
return e.cy().autounselectify() ? !1 : void 0;
},
on: "selectify",
off: "unselectify"
});
li.deselect = li.unselect;
li.grabbed = function() {
var e = this[0];
if (e)
return e._private.grabbed;
};
Ql({
field: "active",
on: "activate",
off: "unactivate"
});
Ql({
field: "pannable",
on: "panify",
off: "unpanify"
});
li.inactive = function() {
var e = this[0];
if (e)
return !e._private.active;
};
var dr = {}, Wx = function(e) {
return function(t) {
for (var n = this, r = [], o = 0; o < n.length; o++) {
var a = n[o];
if (a.isNode()) {
for (var i = !1, s = a.connectedEdges(), u = 0; u < s.length; u++) {
var l = s[u], c = l.source(), d = l.target();
if (e.noIncomingEdges && d === a && c !== a || e.noOutgoingEdges && c === a && d !== a) {
i = !0;
break;
}
}
i || r.push(a);
}
}
return this.spawn(r, !0).filter(t);
};
}, Kx = function(e) {
return function(t) {
for (var n = this, r = [], o = 0; o < n.length; o++) {
var a = n[o];
if (a.isNode())
for (var i = a.connectedEdges(), s = 0; s < i.length; s++) {
var u = i[s], l = u.source(), c = u.target();
e.outgoing && l === a ? (r.push(u), r.push(c)) : e.incoming && c === a && (r.push(u), r.push(l));
}
}
return this.spawn(r, !0).filter(t);
};
}, Gx = function(e) {
return function(t) {
for (var n = this, r = [], o = {}; ; ) {
var a = e.outgoing ? n.outgoers() : n.incomers();
if (a.length === 0)
break;
for (var i = !1, s = 0; s < a.length; s++) {
var u = a[s], l = u.id();
o[l] || (o[l] = !0, r.push(u), i = !0);
}
if (!i)
break;
n = a;
}
return this.spawn(r, !0).filter(t);
};
};
dr.clearTraversalCache = function() {
for (var e = 0; e < this.length; e++)
this[e]._private.traversalCache = null;
};
ct(dr, {
// get the root nodes in the DAG
roots: Wx({
noIncomingEdges: !0
}),
// get the leaf nodes in the DAG
leaves: Wx({
noOutgoingEdges: !0
}),
// normally called children in graph theory
// these nodes =edges=> outgoing nodes
outgoers: eo(Kx({
outgoing: !0
}), "outgoers"),
// aka DAG descendants
successors: Gx({
outgoing: !0
}),
// normally called parents in graph theory
// these nodes <=edges= incoming nodes
incomers: eo(Kx({
incoming: !0
}), "incomers"),
// aka DAG ancestors
predecessors: Gx({
incoming: !0
})
});
ct(dr, {
neighborhood: eo(function(e) {
for (var t = [], n = this.nodes(), r = 0; r < n.length; r++)
for (var o = n[r], a = o.connectedEdges(), i = 0; i < a.length; i++) {
var s = a[i], u = s.source(), l = s.target(), c = o === u ? l : u;
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);
}
});
dr.neighbourhood = dr.neighborhood;
dr.closedNeighbourhood = dr.closedNeighborhood;
dr.openNeighbourhood = dr.openNeighborhood;
ct(dr, {
source: eo(function(e) {
var t = this[0], n;
return t && (n = t._private.source || t.cy().collection()), n && e ? n.filter(e) : n;
}, "source"),
target: eo(function(e) {
var t = this[0], n;
return t && (n = t._private.target || t.cy().collection()), n && e ? n.filter(e) : n;
}, "target"),
sources: Xx({
attr: "source"
}),
targets: Xx({
attr: "target"
})
});
function Xx(e) {
return function(t) {
for (var n = [], r = 0; r < this.length; r++) {
var o = this[r], a = o._private[e.attr];
a && n.push(a);
}
return this.spawn(n, !0).filter(t);
};
}
ct(dr, {
edgesWith: eo(Yx(), "edgesWith"),
edgesTo: eo(Yx({
thisIsSrc: !0
}), "edgesTo")
});
function Yx(e) {
return function(t) {
var n = [], r = this._private.cy, o = e || {};
at(t) && (t = r.$(t));
for (var a = 0; a < t.length; a++)
for (var i = t[a]._private.edges, s = 0; s < i.length; s++) {
var u = i[s], l = u._private.data, c = this.hasElementWithId(l.source) && t.hasElementWithId(l.target), d = t.hasElementWithId(l.source) && this.hasElementWithId(l.target), f = c || d;
f && ((o.thisIsSrc || o.thisIsTgt) && (o.thisIsSrc && !c || o.thisIsTgt && !d) || n.push(u));
}
return this.spawn(n, !0);
};
}
ct(dr, {
connectedEdges: eo(function(e) {
for (var t = [], n = this, r = 0; r < n.length; r++) {
var o = n[r];
if (o.isNode())
for (var a = o._private.edges, i = 0; i < a.length; i++) {
var s = a[i];
t.push(s);
}
}
return this.spawn(t, !0).filter(e);
}, "connectedEdges"),
connectedNodes: eo(function(e) {
for (var t = [], n = this, r = 0; r < n.length; r++) {
var o = n[r];
o.isEdge() && (t.push(o.source()[0]), t.push(o.target()[0]));
}
return this.spawn(t, !0).filter(e);
}, "connectedNodes"),
parallelEdges: eo(Zx(), "parallelEdges"),
codirectedEdges: eo(Zx({
codirected: !0
}), "codirectedEdges")
});
function Zx(e) {
var t = {
codirected: !1
};
return e = ct({}, t, e), function(n) {
for (var r = [], o = this.edges(), a = e, i = 0; i < o.length; i++)
for (var s = o[i], u = s._private, l = u.source, c = l._private.data.id, d = u.data.target, f = l._private.edges, h = 0; h < f.length; h++) {
var p = f[h], v = p._private.data, m = v.target, g = v.source, b = m === d && g === c, x = c === m && d === g;
(a.codirected && b || !a.codirected && (b || x)) && r.push(p);
}
return this.spawn(r, !0).filter(n);
};
}
ct(dr, {
components: function(e) {
var t = this, n = t.cy(), r = n.collection(), o = e == null ? t.nodes() : e.nodes(), a = [];
e != null && o.empty() && (o = e.sources());
var i = function(u, l) {
r.merge(u), o.unmerge(u), l.merge(u);
};
if (o.empty())
return t.spawn();
var s = function() {
var u = n.collection();
a.push(u);
var l = o[0];
i(l, u), t.bfs({
directed: !1,
roots: l,
visit: function(c) {
return i(c, u);
}
}), u.forEach(function(c) {
c.connectedEdges().forEach(function(d) {
t.has(d) && u.has(d.source()) && u.has(d.target()) && u.merge(d);
});
});
};
do
s();
while (o.length > 0);
return a;
},
component: function() {
var e = this[0];
return e.cy().mutableElements().components(e)[0];
}
});
dr.componentsOf = dr.components;
var tr = 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) {
vn("A collection must have a reference to the core");
return;
}
var o = new Go(), a = !1;
if (!t)
t = [];
else if (t.length > 0 && It(t[0]) && !Jc(t[0])) {
a = !0;
for (var i = [], s = new Kl(), u = 0, l = t.length; u < l; u++) {
var c = t[u];
c.data == null && (c.data = {});
var d = c.data;
if (d.id == null)
d.id = cS();
else if (e.hasElementWithId(d.id) || s.has(d.id))
continue;
var f = new vh(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 || !o.has(m)) && (n && o.set(m, {
index: this.length,
ele: v
}), this[this.length] = v, this.length++);
}
}
this._private = {
eles: this,
cy: e,
get map() {
return this.lazyMap == null && this.rebuildMap(), this.lazyMap;
},
set map(g) {
this.lazyMap = g;
},
rebuildMap: function() {
for (var g = this.lazyMap = new Go(), b = this.eles, x = 0; x < b.length; x++) {
var w = b[x];
g.set(w.id(), {
index: x,
ele: w
});
}
}
}, n && (this._private.map = o), a && !r && this.restore();
}, Qt = vh.prototype = tr.prototype = Object.create(Array.prototype);
Qt.instanceString = function() {
return "collection";
};
Qt.spawn = function(e, t) {
return new tr(this.cy(), e, t);
};
Qt.spawnSelf = function() {
return this.spawn(this);
};
Qt.cy = function() {
return this._private.cy;
};
Qt.renderer = function() {
return this._private.cy.renderer();
};
Qt.element = function() {
return this[0];
};
Qt.collection = function() {
return YE(this) ? this : new tr(this._private.cy, [this]);
};
Qt.unique = function() {
return new tr(this._private.cy, this, !0);
};
Qt.hasElementWithId = function(e) {
return e = "" + e, this._private.map.has(e);
};
Qt.getElementById = function(e) {
e = "" + e;
var t = this._private.cy, n = this._private.map.get(e);
return n ? n.ele : new tr(t);
};
Qt.$id = Qt.getElementById;
Qt.poolIndex = function() {
var e = this._private.cy, t = e._private.elements, n = this[0]._private.data.id;
return t._private.map.get(n).index;
};
Qt.indexOf = function(e) {
var t = e[0]._private.data.id;
return this._private.map.get(t).index;
};
Qt.indexOfId = function(e) {
return e = "" + e, this._private.map.get(e).index;
};
Qt.json = function(e) {
var t = this.element(), n = this.cy();
if (t == null && e)
return this;
if (t != null) {
var r = t._private;
if (It(e)) {
if (n.startBatch(), e.data) {
t.data(e.data);
var o = r.data;
if (t.isEdge()) {
var a = !1, i = {}, s = e.data.source, u = e.data.target;
s != null && s != o.source && (i.source = "" + s, a = !0), u != null && u != o.target && (i.target = "" + u, a = !0), a && (t = t.move(i));
} else {
var l = "parent" in e.data, c = e.data.parent;
l && (c != null || o.parent != null) && c != o.parent && (c === void 0 && (c = null), c != null && (c = "" + c), t = t.move({
parent: c
}));
}
}
e.position && t.position(e.position);
var d = function(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: Ko(r.data),
position: Ko(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;
}
}
};
Qt.jsons = function() {
for (var e = [], t = 0; t < this.length; t++) {
var n = this[t], r = n.json();
e.push(r);
}
return e;
};
Qt.clone = function() {
for (var e = this.cy(), t = [], n = 0; n < this.length; n++) {
var r = this[n], o = r.json(), a = new vh(e, o, !1);
t.push(a);
}
return new tr(e, t);
};
Qt.copy = Qt.clone;
Qt.restore = function() {
for (var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, n = this, r = n.cy(), o = r._private, a = [], i = [], s, u = 0, l = n.length; u < l; u++) {
var c = n[u];
t && !c.removed() || (c.isNode() ? a.push(c) : i.push(c));
}
s = a.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 = cS();
else if (Ve(v.id))
v.id = "" + v.id;
else if (mi(v.id) || !at(v.id)) {
vn("Can not create element with invalid string ID `" + v.id + "`"), f();
continue;
} else if (r.hasElementWithId(v.id)) {
vn("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 b = h, x = ["source", "target"], w = x.length, C = !1, k = 0; k < w; k++) {
var E = x[k], S = v[E];
Ve(S) && (S = v[E] = "" + v[E]), S == null || S === "" ? (vn("Can not create edge `" + m + "` with unspecified " + E), C = !0) : r.hasElementWithId(S) || (vn("Can not create edge `" + m + "` with nonexistant " + E + " `" + S + "`"), C = !0);
}
if (C) {
f();
continue;
}
var O = r.getElementById(v.source), F = r.getElementById(v.target);
O.same(F) ? O._private.edges.push(b) : (O._private.edges.push(b), F._private.edges.push(b)), b._private.source = O, b._private.target = F;
}
p.map = new Go(), p.map.set(m, {
ele: h,
index: 0
}), p.removed = !1, t && r.addToPool(h);
}
for (var $ = 0; $ < a.length; $++) {
var A = a[$], L = A._private.data;
Ve(L.parent) && (L.parent = "" + L.parent);
var N = L.parent, M = N != null;
if (M || A._private.parent) {
var I = A._private.parent ? r.collection().merge(A._private.parent) : r.getElementById(N);
if (I.empty())
L.parent = void 0;
else if (I[0].removed())
Mt("Node added with missing parent, reference to parent removed"), L.parent = void 0, A._private.parent = null;
else {
for (var z = !1, R = I; !R.empty(); ) {
if (A.same(R)) {
z = !0, L.parent = void 0;
break;
}
R = R.parent();
}
z || (I[0]._private.children.push(A), A._private.parent = I[0], o.hasCompoundNodes = !0);
}
}
}
if (s.length > 0) {
for (var q = s.length === n.length ? n : new tr(r, s), oe = 0; oe < q.length; oe++) {
var Q = q[oe];
Q.isNode() || (Q.parallelEdges().clearTraversalCache(), Q.source().clearTraversalCache(), Q.target().clearTraversalCache());
}
var ae;
o.hasCompoundNodes ? ae = r.collection().merge(q).merge(q.connectedNodes()).merge(q.parent()) : ae = q, ae.dirtyCompoundBoundsCache().dirtyBoundingBoxCache().updateStyle(e), e ? q.emitAndNotify("add") : t && q.emit("add");
}
return n;
};
Qt.removed = function() {
var e = this[0];
return e && e._private.removed;
};
Qt.inside = function() {
var e = this[0];
return e && !e._private.removed;
};
Qt.remove = function() {
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, n = this, r = [], o = {}, a = n._private.cy;
function i(N) {
for (var M = N._private.edges, I = 0; I < M.length; I++)
u(M[I]);
}
function s(N) {
for (var M = N._private.children, I = 0; I < M.length; I++)
u(M[I]);
}
function u(N) {
var M = o[N.id()];
t && N.removed() || M || (o[N.id()] = !0, N.isNode() ? (r.push(N), i(N), s(N)) : r.unshift(N));
}
for (var l = 0, c = n.length; l < c; l++) {
var d = n[l];
u(d);
}
function f(N, M) {
var I = N._private.edges;
yi(I, M), N.clearTraversalCache();
}
function h(N) {
N.clearTraversalCache();
}
var p = [];
p.ids = {};
function v(N, M) {
M = M[0], N = N[0];
var I = N._private.children, z = N.id();
yi(I, M), M._private.parent = null, p.ids[z] || (p.ids[z] = !0, p.push(N));
}
n.dirtyCompoundBoundsCache(), t && a.removeFromPool(r);
for (var m = 0; m < r.length; m++) {
var g = r[m];
if (g.isEdge()) {
var b = g.source()[0], x = g.target()[0];
f(b, g), f(x, g);
for (var w = g.parallelEdges(), C = 0; C < w.length; C++) {
var k = w[C];
h(k), k.isBundledBezier() && k.dirtyBoundingBoxCache();
}
} else {
var E = g.parent();
E.length !== 0 && v(E, g);
}
t && (g._private.removed = !0);
}
var S = a._private.elements;
a._private.hasCompoundNodes = !1;
for (var O = 0; O < S.length; O++) {
var F = S[O];
if (F.isParent()) {
a._private.hasCompoundNodes = !0;
break;
}
}
var $ = new tr(this.cy(), r);
$.size() > 0 && (e ? $.emitAndNotify("remove") : t && $.emit("remove"));
for (var A = 0; A < p.length; A++) {
var L = p[A];
(!t || !L.removed()) && L.updateStyle();
}
return $;
};
Qt.move = function(e) {
var t = this._private.cy, n = this, r = !1, o = !1, a = function(h) {
return h == null ? h : "" + h;
};
if (e.source !== void 0 || e.target !== void 0) {
var i = a(e.source), s = a(e.target), u = i != null && t.hasElementWithId(i), l = s != null && t.hasElementWithId(s);
(u || l) && (t.batch(function() {
n.remove(r, o), n.emitAndNotify("moveout");
for (var h = 0; h < n.length; h++) {
var p = n[h], v = p._private.data;
p.isEdge() && (u && (v.source = i), l && (v.target = s));
}
n.restore(r, o);
}), n.emitAndNotify("move"));
} else if (e.parent !== void 0) {
var c = a(e.parent), d = c === null || t.hasElementWithId(c);
if (d) {
var f = c === null ? void 0 : c;
t.batch(function() {
var h = n.remove(r, o);
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, o);
}), n.emitAndNotify("move");
}
}
return this;
};
[CS, kue, gp, si, Nl, Bue, xh, ece, GS, XS, ace, af, mp, er, li, dr].forEach(function(e) {
ct(Qt, e);
});
var pce = {
add: function(e) {
var t, n = this;
if (Wr(e)) {
var r = e;
if (r._private.cy === n)
t = r.restore();
else {
for (var o = [], a = 0; a < r.length; a++) {
var i = r[a];
o.push(i.json());
}
t = new tr(n, o);
}
} else if (Gt(e)) {
var s = e;
t = new tr(n, s);
} else if (It(e) && (Gt(e.nodes) || Gt(e.edges))) {
for (var u = e, l = [], c = ["nodes", "edges"], d = 0, f = c.length; d < f; d++) {
var h = c[d], p = u[h];
if (Gt(p))
for (var v = 0, m = p.length; v < m; v++) {
var g = ct({
group: h
}, p[v]);
l.push(g);
}
}
t = new tr(n, l);
} else {
var b = e;
t = new vh(n, b).collection();
}
return t;
},
remove: function(e) {
if (!Wr(e) && at(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 fce(e, t, n, r) {
var o = 4, a = 1e-3, i = 1e-7, s = 10, u = 11, l = 1 / (u - 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(u) : new Array(u);
function h(F, $) {
return 1 - 3 * $ + 3 * F;
}
function p(F, $) {
return 3 * $ - 6 * F;
}
function v(F) {
return 3 * F;
}
function m(F, $, A) {
return ((h($, A) * F + p($, A)) * F + v($)) * F;
}
function g(F, $, A) {
return 3 * h($, A) * F * F + 2 * p($, A) * F + v($);
}
function b(F, $) {
for (var A = 0; A < o; ++A) {
var L = g($, e, n);
if (L === 0)
return $;
var N = m($, e, n) - F;
$ -= N / L;
}
return $;
}
function x() {
for (var F = 0; F < u; ++F)
f[F] = m(F * l, e, n);
}
function w(F, $, A) {
var L, N, M = 0;
do
N = $ + (A - $) / 2, L = m(N, e, n) - F, L > 0 ? A = N : $ = N;
while (Math.abs(L) > i && ++M < s);
return N;
}
function C(F) {
for (var $ = 0, A = 1, L = u - 1; A !== L && f[A] <= F; ++A)
$ += l;
--A;
var N = (F - f[A]) / (f[A + 1] - f[A]), M = $ + N * l, I = g(M, e, n);
return I >= a ? b(F, M) : I === 0 ? M : w(F, $, $ + l);
}
var k = !1;
function E() {
k = !0, (e !== t || n !== r) && x();
}
var S = function(F) {
return k || E(), e === t && n === r ? F : F === 0 ? 0 : F === 1 ? 1 : m(C(F), t, r);
};
S.getControlPoints = function() {
return [{
x: e,
y: t
}, {
x: n,
y: r
}];
};
var O = "generateBezier(" + [e, t, n, r] + ")";
return S.toString = function() {
return O;
}, S;
}
/*! Runge-Kutta spring physics function generator. Adapted from Framer.js, copyright Koen Bok. MIT License: http://en.wikipedia.org/wiki/MIT_License */
var hce = /* @__PURE__ */ function() {
function e(r) {
return -r.tension * r.x - r.friction * r.v;
}
function t(r, o, a) {
var i = {
x: r.x + a.dx * o,
v: r.v + a.dv * o,
tension: r.tension,
friction: r.friction
};
return {
dx: i.v,
dv: e(i)
};
}
function n(r, o) {
var a = {
dx: r.v,
dv: e(r)
}, i = t(r, o * 0.5, a), s = t(r, o * 0.5, i), u = t(r, o, s), l = 1 / 6 * (a.dx + 2 * (i.dx + s.dx) + u.dx), c = 1 / 6 * (a.dv + 2 * (i.dv + s.dv) + u.dv);
return r.x = r.x + l * o, r.v = r.v + c * o, r;
}
return function r(o, a, i) {
var s = {
x: -1,
v: 0,
tension: null,
friction: null
}, u = [0], l = 0, c = 1 / 1e4, d = 16 / 1e3, f, h, p;
for (o = parseFloat(o) || 500, a = parseFloat(a) || 20, i = i || null, s.tension = o, s.friction = a, f = i !== null, f ? (l = r(o, a), h = l / i * d) : h = d; p = n(p || s, h), u.push(1 + p.x), l += 16, Math.abs(p.x) > c && Math.abs(p.v) > c; )
;
return f ? function(v) {
return u[v * (u.length - 1) | 0];
} : l;
};
}(), Zt = function(e, t, n, r) {
var o = fce(e, t, n, r);
return function(a, i, s) {
return a + (i - a) * o(s);
};
}, yp = {
linear: function(e, t, n) {
return e + (t - e) * n;
},
// default easings
ease: Zt(0.25, 0.1, 0.25, 1),
"ease-in": Zt(0.42, 0, 1, 1),
"ease-out": Zt(0, 0, 0.58, 1),
"ease-in-out": Zt(0.42, 0, 0.58, 1),
// sine
"ease-in-sine": Zt(0.47, 0, 0.745, 0.715),
"ease-out-sine": Zt(0.39, 0.575, 0.565, 1),
"ease-in-out-sine": Zt(0.445, 0.05, 0.55, 0.95),
// quad
"ease-in-quad": Zt(0.55, 0.085, 0.68, 0.53),
"ease-out-quad": Zt(0.25, 0.46, 0.45, 0.94),
"ease-in-out-quad": Zt(0.455, 0.03, 0.515, 0.955),
// cubic
"ease-in-cubic": Zt(0.55, 0.055, 0.675, 0.19),
"ease-out-cubic": Zt(0.215, 0.61, 0.355, 1),
"ease-in-out-cubic": Zt(0.645, 0.045, 0.355, 1),
// quart
"ease-in-quart": Zt(0.895, 0.03, 0.685, 0.22),
"ease-out-quart": Zt(0.165, 0.84, 0.44, 1),
"ease-in-out-quart": Zt(0.77, 0, 0.175, 1),
// quint
"ease-in-quint": Zt(0.755, 0.05, 0.855, 0.06),
"ease-out-quint": Zt(0.23, 1, 0.32, 1),
"ease-in-out-quint": Zt(0.86, 0, 0.07, 1),
// expo
"ease-in-expo": Zt(0.95, 0.05, 0.795, 0.035),
"ease-out-expo": Zt(0.19, 1, 0.22, 1),
"ease-in-out-expo": Zt(1, 0, 0, 1),
// circ
"ease-in-circ": Zt(0.6, 0.04, 0.98, 0.335),
"ease-out-circ": Zt(0.075, 0.82, 0.165, 1),
"ease-in-out-circ": Zt(0.785, 0.135, 0.15, 0.86),
// user param easings...
spring: function(e, t, n) {
if (n === 0)
return yp.linear;
var r = hce(e, t, n);
return function(o, a, i) {
return o + (a - o) * r(i);
};
},
"cubic-bezier": Zt
};
function Jx(e, t, n, r, o) {
if (r === 1 || t === n)
return n;
var a = o(t, n, r);
return e == null || ((e.roundValue || e.color) && (a = Math.round(a)), e.min !== void 0 && (a = Math.max(a, e.min)), e.max !== void 0 && (a = Math.min(a, e.max))), a;
}
function Qx(e, t) {
return e.pfValue != null || e.value != null ? e.pfValue != null && (t == null || t.type.units !== "%") ? e.pfValue : e.value : e;
}
function qs(e, t, n, r, o) {
var a = o != null ? o.type : null;
n < 0 ? n = 0 : n > 1 && (n = 1);
var i = Qx(e, o), s = Qx(t, o);
if (Ve(i) && Ve(s))
return Jx(a, i, s, n, r);
if (Gt(i) && Gt(s)) {
for (var u = [], l = 0; l < s.length; l++) {
var c = i[l], d = s[l];
if (c != null && d != null) {
var f = Jx(a, c, d, n, r);
u.push(f);
} else
u.push(d);
}
return u;
}
}
function vce(e, t, n, r) {
var o = !r, a = e._private, i = t._private, s = i.easing, u = i.startTime, l = r ? e : e.cy(), c = l.style();
if (!i.easingImpl)
if (s == null)
i.easingImpl = yp.linear;
else {
var d;
if (at(s)) {
var f = c.parse("transition-timing-function", s);
d = f.value;
} else
d = s;
var h, p;
at(d) ? (h = d, p = []) : (h = d[1], p = d.slice(2).map(function(q) {
return +q;
})), p.length > 0 ? (h === "spring" && p.push(i.duration), i.easingImpl = yp[h].apply(null, p)) : i.easingImpl = yp[h];
}
var v = i.easingImpl, m;
if (i.duration === 0 ? m = 1 : m = (n - u) / i.duration, i.applying && (m = i.progress), m < 0 ? m = 0 : m > 1 && (m = 1), i.delay == null) {
var g = i.startPosition, b = i.position;
if (b && o && !e.locked()) {
var x = {};
ku(g.x, b.x) && (x.x = qs(g.x, b.x, m, v)), ku(g.y, b.y) && (x.y = qs(g.y, b.y, m, v)), e.position(x);
}
var w = i.startPan, C = i.pan, k = a.pan, E = C != null && r;
E && (ku(w.x, C.x) && (k.x = qs(w.x, C.x, m, v)), ku(w.y, C.y) && (k.y = qs(w.y, C.y, m, v)), e.emit("pan"));
var S = i.startZoom, O = i.zoom, F = O != null && r;
F && (ku(S, O) && (a.zoom = yc(a.minZoom, qs(S, O, m, v), a.maxZoom)), e.emit("zoom")), (E || F) && e.emit("viewport");
var $ = i.style;
if ($ && $.length > 0 && o) {
for (var A = 0; A < $.length; A++) {
var L = $[A], N = L.name, M = L, I = i.startStyle[N], z = c.properties[I.name], R = qs(I, M, m, v, z);
c.overrideBypass(e, N, R);
}
e.emit("style");
}
}
return i.progress = m, m;
}
function ku(e, t) {
return e == null || t == null ? !1 : Ve(e) && Ve(t) ? !0 : !!(e && t);
}
function gce(e, t, n, r) {
var o = t._private;
o.started = !0, o.startTime = n - o.progress * o.duration;
}
function ek(e, t) {
var n = t._private.aniEles, r = [];
function o(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(C) {
for (var k = C.length - 1; k >= 0; k--) {
var E = C[k];
E();
}
C.splice(0, C.length);
}, b = h.length - 1; b >= 0; b--) {
var x = h[b], w = x._private;
if (w.stopped) {
h.splice(b, 1), w.hooked = !1, w.playing = !1, w.started = !1, g(w.frames);
continue;
}
!w.playing && !w.applying || (w.playing && w.applying && (w.applying = !1), w.started || gce(c, x, e), vce(c, x, e, d), w.applying && (w.applying = !1), g(w.frames), w.step != null && w.step(e), x.completed() && (h.splice(b, 1), w.hooked = !1, w.playing = !1, w.started = !1, g(w.completes)), v = !0);
}
return !d && h.length === 0 && p.length === 0 && r.push(c), v;
}
for (var a = !1, i = 0; i < n.length; i++) {
var s = n[i], u = o(s);
a = a || u;
}
var l = o(t, !0);
(a || l) && (n.length > 0 ? t.notify("draw", n) : t.notify("draw")), n.unmerge(r), t.emit("step");
}
var mce = {
// pull in animation functions
animate: Bt.animate(),
animation: Bt.animation(),
animated: Bt.animated(),
clearQueue: Bt.clearQueue(),
delay: Bt.delay(),
delayAnimation: Bt.delayAnimation(),
stop: Bt.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 && ef(function(r) {
ek(r, e), t();
});
}
var n = e.renderer();
n && n.beforeRender ? n.beforeRender(function(r, o) {
ek(o, e);
}, n.beforeRenderPriorities.animations) : t();
}
}, yce = {
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 && Jc(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;
}
}, Kd = function(e) {
return at(e) ? new bi(e) : e;
}, JS = {
createEmitter: function() {
var e = this._private;
return e.emitter || (e.emitter = new kh(yce, this)), this;
},
emitter: function() {
return this._private.emitter;
},
on: function(e, t, n) {
return this.emitter().on(e, Kd(t), n), this;
},
removeListener: function(e, t, n) {
return this.emitter().removeListener(e, Kd(t), n), this;
},
removeAllListeners: function() {
return this.emitter().removeAllListeners(), this;
},
one: function(e, t, n) {
return this.emitter().one(e, Kd(t), n), this;
},
once: function(e, t, n) {
return this.emitter().one(e, Kd(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;
}
};
Bt.eventAliasesOn(JS);
var z0 = {
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);
}
};
z0.jpeg = z0.jpg;
var bp = {
layout: function(e) {
var t = this;
if (e == null) {
vn("Layout options must be specified to make a layout");
return;
}
if (e.name == null) {
vn("A `name` must be specified to make a layout");
return;
}
var n = e.name, r = t.extension("layout", n);
if (r == null) {
vn("No such layout `" + n + "` found. Did you forget to import it and `cytoscape.use()` it?");
return;
}
var o;
at(e.eles) ? o = t.$(e.eles) : o = e.eles != null ? e.eles : t.$();
var a = new r(ct({}, e, {
cy: t,
eles: o
}));
return a;
}
};
bp.createLayout = bp.makeLayout = bp.layout;
var bce = {
notify: function(e, t) {
var n = this._private;
if (this.batching()) {
n.batchNotifications = n.batchNotifications || {};
var r = n.batchNotifications[e] = n.batchNotifications[e] || this.collection();
t != null && r.merge(t);
return;
}
if (n.notificationsEnabled) {
var o = this.renderer();
this.destroyed() || !o || o.notify(e, t);
}
},
notifications: function(e) {
var t = this._private;
return e === void 0 ? t.notificationsEnabled : (t.notificationsEnabled = !!e, this);
},
noNotifications: function(e) {
this.notifications(!1), e(), this.notifications(!0);
},
batching: function() {
return this._private.batchCount > 0;
},
startBatch: function() {
var e = this._private;
return e.batchCount == null && (e.batchCount = 0), e.batchCount === 0 && (e.batchStyleEles = this.collection(), e.batchNotifications = {}), e.batchCount++, this;
},
endBatch: function() {
var e = this._private;
if (e.batchCount === 0)
return this;
if (e.batchCount--, e.batchCount === 0) {
e.batchStyleEles.updateStyle();
var t = this.renderer();
Object.keys(e.batchNotifications).forEach(function(n) {
var r = e.batchNotifications[n];
r.empty() ? t.notify(n) : t.notify(n, r);
});
}
return this;
},
batch: function(e) {
return this.startBatch(), e(), this.endBatch(), this;
},
// for backwards compatibility
batchData: function(e) {
var t = this;
return this.batch(function() {
for (var n = Object.keys(e), r = 0; r < n.length; r++) {
var o = n[r], a = e[o], i = t.getElementById(o);
i.data(a);
}
});
}
}, wce = nr({
hideEdgesOnViewport: !1,
textureOnViewport: !1,
motionBlur: !1,
motionBlurOpacity: 0.05,
pixelRatio: void 0,
desktopTapThreshold: 4,
touchTapThreshold: 8,
wheelSensitivity: 1,
debug: !1,
showFps: !1
}), V0 = {
renderTo: function(e, t, n, r) {
var o = this._private.renderer;
return o.renderTo(e, t, n, r), this;
},
renderer: function() {
return this._private.renderer;
},
forceRender: function() {
return this.notify("draw"), this;
},
resize: function() {
return this.invalidateSize(), this.emitAndNotify("resize"), this;
},
initRenderer: function(e) {
var t = this, n = t.extension("renderer", e.name);
if (n == null) {
vn("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 && Mt("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 = wce(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);
}
};
V0.invalidateDimensions = V0.resize;
var wp = {
// 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 at(e) ? this.$(e) : Wr(e) ? e.collection() : Gt(e) ? (t || (t = {}), new tr(this, e, t.unique, t.removed)) : new tr(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;
}
};
wp.elements = wp.filter = wp.$;
var hr = {}, ju = "t", xce = "f";
hr.apply = function(e) {
for (var t = this, n = t._private, r = n.cy, o = r.collection(), a = 0; a < e.length; a++) {
var i = e[a], s = t.getContextMeta(i);
if (!s.empty) {
var u = t.getContextStyle(s), l = t.applyContextStyle(s, u, i);
i._private.appliedInitStyle ? t.updateTransitions(i, l.diffProps) : i._private.appliedInitStyle = !0;
var c = t.updateStyleHints(i);
c && o.push(i);
}
}
return o;
};
hr.getPropertiesDiff = function(e, t) {
var n = this, r = n._private.propDiffs = n._private.propDiffs || {}, o = e + "-" + t, a = r[o];
if (a)
return a;
for (var i = [], s = {}, u = 0; u < n.length; u++) {
var l = n[u], c = e[u] === ju, d = t[u] === ju, f = c !== d, h = l.mappedProperties.length > 0;
if (f || d && h) {
var p = void 0;
f && h || f ? p = l.properties : h && (p = l.mappedProperties);
for (var v = 0; v < p.length; v++) {
for (var m = p[v], g = m.name, b = !1, x = u + 1; x < n.length; x++) {
var w = n[x], C = t[x] === ju;
if (C && (b = w.properties[m.name] != null, b))
break;
}
!s[g] && !b && (s[g] = !0, i.push(g));
}
}
}
return r[o] = i, i;
};
hr.getContextMeta = function(e) {
for (var t = this, n = "", r, o = e._private.styleCxtKey || "", a = 0; a < t.length; a++) {
var i = t[a], s = i.selector && i.selector.matches(e);
s ? n += ju : n += xce;
}
return r = t.getPropertiesDiff(o, n), e._private.styleCxtKey = n, {
key: n,
diffPropNames: r,
empty: r.length === 0
};
};
hr.getContextStyle = function(e) {
var t = e.key, n = this, r = this._private.contextStyles = this._private.contextStyles || {};
if (r[t])
return r[t];
for (var o = {
_private: {
key: t
}
}, a = 0; a < n.length; a++) {
var i = n[a], s = t[a] === ju;
if (s)
for (var u = 0; u < i.properties.length; u++) {
var l = i.properties[u];
o[l.name] = l;
}
}
return r[t] = o, o;
};
hr.applyContextStyle = function(e, t, n) {
for (var r = this, o = e.diffPropNames, a = {}, i = r.types, s = 0; s < o.length; s++) {
var u = o[s], l = t[u], c = n.pstyle(u);
if (!l)
if (c)
c.bypass ? l = {
name: u,
deleteBypassed: !0
} : l = {
name: u,
delete: !0
};
else continue;
if (c !== l) {
if (l.mapped === i.fn && c != null && c.mapping != null && c.mapping.value === l.value) {
var d = c.mapping, f = d.fnValue = l.value(n);
if (f === d.prevFnValue)
continue;
}
var h = a[u] = {
prev: c
};
r.applyParsedProperty(n, l), h.next = n.pstyle(u), h.next && h.next.bypass && (h.next = h.next.bypassed);
}
}
return {
diffProps: a
};
};
hr.updateStyleHints = function(e) {
var t = e._private, n = this, r = n.propertyGroupNames, o = n.propertyGroupKeys, a = function(le, Ee, Ne) {
return n.getPropertiesHash(le, Ee, Ne);
}, i = t.styleKey;
if (e.removed())
return !1;
var s = t.group === "nodes", u = e._private.style;
r = Object.keys(u);
for (var l = 0; l < o.length; l++) {
var c = o[l];
t.styleKeys[c] = [el, Tu];
}
for (var d = function(le, Ee) {
return t.styleKeys[Ee][0] = vc(le, t.styleKeys[Ee][0]);
}, f = function(le, Ee) {
return t.styleKeys[Ee][1] = gc(le, t.styleKeys[Ee][1]);
}, h = function(le, Ee) {
d(le, Ee), f(le, Ee);
}, p = function(le, Ee) {
for (var Ne = 0; Ne < le.length; Ne++) {
var je = le.charCodeAt(Ne);
d(je, Ee), f(je, Ee);
}
}, v = 2e9, m = function(le) {
return -128 < le && le < 128 && Math.floor(le) !== le ? v - (le * 1024 | 0) : le;
}, g = 0; g < r.length; g++) {
var b = r[g], x = u[b];
if (x != null) {
var w = this.properties[b], C = w.type, k = w.groupKey, E = void 0;
w.hashOverride != null ? E = w.hashOverride(e, x) : x.pfValue != null && (E = x.pfValue);
var S = w.enums == null ? x.value : null, O = E != null, F = S != null, $ = O || F, A = x.units;
if (C.number && $ && !C.multiple) {
var L = O ? E : S;
h(m(L), k), !O && A != null && p(A, k);
} else
p(x.strValue, k);
}
}
for (var N = [el, Tu], M = 0; M < o.length; M++) {
var I = o[M], z = t.styleKeys[I];
N[0] = vc(z[0], N[0]), N[1] = gc(z[1], N[1]);
}
t.styleKey = _ae(N[0], N[1]);
var R = t.styleKeys;
t.labelDimsKey = Ha(R.labelDimensions);
var q = a(e, ["label"], R.labelDimensions);
if (t.labelKey = Ha(q), t.labelStyleKey = Ha(Bd(R.commonLabel, q)), !s) {
var oe = a(e, ["source-label"], R.labelDimensions);
t.sourceLabelKey = Ha(oe), t.sourceLabelStyleKey = Ha(Bd(R.commonLabel, oe));
var Q = a(e, ["target-label"], R.labelDimensions);
t.targetLabelKey = Ha(Q), t.targetLabelStyleKey = Ha(Bd(R.commonLabel, Q));
}
if (s) {
var ae = t.styleKeys, pe = ae.nodeBody, we = ae.nodeBorder, ke = ae.nodeOutline, fe = ae.backgroundImage, ge = ae.compound, J = ae.pie, te = [pe, we, ke, fe, ge, J].filter(function(le) {
return le != null;
}).reduce(Bd, [el, Tu]);
t.nodeKey = Ha(te), t.hasPie = J != null && J[0] !== el && J[1] !== Tu;
}
return i !== t.styleKey;
};
hr.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;
};
hr.applyParsedProperty = function(e, t) {
var n = this, r = t, o = e._private.style, a, i = n.types, s = n.properties[r.name].type, u = r.bypass, l = o[r.name], c = l && l.bypass, d = e._private, f = "mapping", h = function(ae) {
return ae == null ? null : ae.pfValue != null ? ae.pfValue : ae.value;
}, p = function() {
var ae = h(l), pe = h(r);
n.checkTriggers(e, r.name, ae, pe);
};
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", u)), r.delete)
return o[r.name] = void 0, p(), !0;
if (r.deleteBypassed)
return l ? l.bypass ? (l.bypassed = void 0, p(), !0) : !1 : (p(), !0);
if (r.deleteBypass)
return l ? l.bypass ? (o[r.name] = l.bypassed, p(), !0) : !1 : (p(), !0);
var v = function() {
Mt("Do not assign mappings to elements without corresponding data (i.e. ele `" + e.id() + "` has no mapping for property `" + r.name + "` with data field `" + r.field + "`); try a `[" + r.field + "]` selector to limit scope to elements with `" + r.field + "` defined");
};
switch (r.mapped) {
case i.mapData: {
for (var m = r.field.split("."), g = d.data, b = 0; b < m.length && g; b++) {
var x = m[b];
g = g[x];
}
if (g == null)
return v(), !1;
var w;
if (Ve(g)) {
var C = r.fieldMax - r.fieldMin;
C === 0 ? w = 0 : w = (g - r.fieldMin) / C;
} else
return Mt("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 k = r.valueMin[0], E = r.valueMax[0], S = r.valueMin[1], O = r.valueMax[1], F = r.valueMin[2], $ = r.valueMax[2], A = r.valueMin[3] == null ? 1 : r.valueMin[3], L = r.valueMax[3] == null ? 1 : r.valueMax[3], N = [Math.round(k + (E - k) * w), Math.round(S + (O - S) * w), Math.round(F + ($ - F) * w), Math.round(A + (L - A) * w)];
a = {
// colours are simple, so just create the flat property instead of expensive string parsing
bypass: r.bypass,
// we're a bypass if the mapping property is a bypass
name: r.name,
value: N,
strValue: "rgb(" + N[0] + ", " + N[1] + ", " + N[2] + ")"
};
} else if (s.number) {
var M = r.valueMin + (r.valueMax - r.valueMin) * w;
a = this.parse(r.name, M, r.bypass, f);
} else
return !1;
if (!a)
return v(), !1;
a.mapping = r, r = a;
break;
}
case i.data: {
for (var I = r.field.split("."), z = d.data, R = 0; R < I.length && z; R++) {
var q = I[R];
z = z[q];
}
if (z != null && (a = this.parse(r.name, z, r.bypass, f)), !a)
return v(), !1;
a.mapping = r, r = a;
break;
}
case i.fn: {
var oe = r.value, Q = r.fnValue != null ? r.fnValue : oe(e);
if (r.prevFnValue = Q, Q == null)
return Mt("Custom function mappers may not return null (i.e. `" + r.name + "` for ele `" + e.id() + "` is null)"), !1;
if (a = this.parse(r.name, Q, r.bypass, f), !a)
return Mt("Custom function mappers may not return invalid values for the property type (i.e. `" + r.name + "` for ele `" + e.id() + "` is invalid)"), !1;
a.mapping = Ko(r), r = a;
break;
}
case void 0:
break;
default:
return !1;
}
return u ? (c ? r.bypassed = l.bypassed : r.bypassed = l, o[r.name] = r) : c ? l.bypassed = r : o[r.name] = r, p(), !0;
};
hr.cleanElements = function(e, t) {
for (var n = 0; n < e.length; n++) {
var r = e[n];
if (this.clearStyleHints(r), r.dirtyCompoundBoundsCache(), r.dirtyBoundingBoxCache(), !t)
r._private.style = {};
else
for (var o = r._private.style, a = Object.keys(o), i = 0; i < a.length; i++) {
var s = a[i], u = o[s];
u != null && (u.bypass ? u.bypassed = null : o[s] = null);
}
}
};
hr.update = function() {
var e = this._private.cy, t = e.mutableElements();
t.updateStyle();
};
hr.updateTransitions = function(e, t) {
var n = this, r = e._private, o = e.pstyle("transition-property").value, a = e.pstyle("transition-duration").pfValue, i = e.pstyle("transition-delay").pfValue;
if (o.length > 0 && a > 0) {
for (var s = {}, u = !1, l = 0; l < o.length; l++) {
var c = o[l], 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, b = 1e-6;
p && (Ve(p.pfValue) && Ve(v.pfValue) ? (m = v.pfValue - p.pfValue, g = p.pfValue + b * m) : Ve(p.value) && Ve(v.value) ? (m = v.value - p.value, g = p.value + b * m) : Gt(p.value) && Gt(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), u = !0));
}
}
if (!u)
return;
r.transitioning = !0, new Gl(function(x) {
i > 0 ? e.delayAnimation(i).play().promise().then(x) : x();
}).then(function() {
return e.animation({
style: s,
duration: a,
easing: e.pstyle("transition-timing-function").value,
queue: !1
}).play().promise();
}).then(function() {
n.removeBypasses(e, o), e.emitAndNotify("style"), r.transitioning = !1;
});
} else r.transitioning && (this.removeBypasses(e, o), e.emitAndNotify("style"), r.transitioning = !1);
};
hr.checkTrigger = function(e, t, n, r, o, a) {
var i = this.properties[t], s = o(i);
s != null && s(n, r) && a(i);
};
hr.checkZOrderTrigger = function(e, t, n, r) {
var o = this;
this.checkTrigger(e, t, n, r, function(a) {
return a.triggersZOrder;
}, function() {
o._private.cy.notify("zorder", e);
});
};
hr.checkBoundsTrigger = function(e, t, n, r) {
this.checkTrigger(e, t, n, r, function(o) {
return o.triggersBounds;
}, function(o) {
e.dirtyCompoundBoundsCache(), e.dirtyBoundingBoxCache(), // only for beziers -- so performance of other edges isn't affected
o.triggersBoundsOfParallelBeziers && t === "curve-style" && (n === "bezier" || r === "bezier") && e.parallelEdges().forEach(function(a) {
a.isBundledBezier() && a.dirtyBoundingBoxCache();
}), o.triggersBoundsOfConnectedEdges && t === "display" && (n === "none" || r === "none") && e.connectedEdges().forEach(function(a) {
a.dirtyBoundingBoxCache();
});
});
};
hr.checkTriggers = function(e, t, n, r) {
e.dirtyStyleCache(), this.checkZOrderTrigger(e, t, n, r), this.checkBoundsTrigger(e, t, n, r);
};
var nd = {};
nd.applyBypass = function(e, t, n, r) {
var o = this, a = [], i = !0;
if (t === "*" || t === "**") {
if (n !== void 0)
for (var s = 0; s < o.properties.length; s++) {
var u = o.properties[s], l = u.name, c = this.parse(l, n, !0);
c && a.push(c);
}
} else if (at(t)) {
var d = this.parse(t, n, !0);
d && a.push(d);
} else if (It(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[ph(v)]), m !== void 0) {
var g = this.parse(v, m, !0);
g && a.push(g);
}
}
} else
return !1;
if (a.length === 0)
return !1;
for (var b = !1, x = 0; x < e.length; x++) {
for (var w = e[x], C = {}, k = void 0, E = 0; E < a.length; E++) {
var S = a[E];
if (r) {
var O = w.pstyle(S.name);
k = C[S.name] = {
prev: O
};
}
b = this.applyParsedProperty(w, Ko(S)) || b, r && (k.next = w.pstyle(S.name));
}
b && this.updateStyleHints(w), r && this.updateTransitions(w, C, i);
}
return b;
};
nd.overrideBypass = function(e, t, n) {
t = vy(t);
for (var r = 0; r < e.length; r++) {
var o = e[r], a = o._private.style[t], i = this.properties[t].type, s = i.color, u = i.mutiple, l = a ? a.pfValue != null ? a.pfValue : a.value : null;
!a || !a.bypass ? this.applyBypass(o, t, n) : (a.value = n, a.pfValue != null && (a.pfValue = n), s ? a.strValue = "rgb(" + n.join(",") + ")" : u ? a.strValue = n.join(" ") : a.strValue = "" + n, this.updateStyleHints(o)), this.checkTriggers(o, t, l, n);
}
};
nd.removeAllBypasses = function(e, t) {
return this.removeBypasses(e, this.propertyNames, t);
};
nd.removeBypasses = function(e, t, n) {
for (var r = !0, o = 0; o < e.length; o++) {
for (var a = e[o], i = {}, s = 0; s < t.length; s++) {
var u = t[s], l = this.properties[u], c = a.pstyle(l.name);
if (!(!c || !c.bypass)) {
var d = "", f = this.parse(u, d, !0), h = i[l.name] = {
prev: c
};
this.applyParsedProperty(a, f), h.next = a.pstyle(l.name);
}
}
this.updateStyleHints(a), n && this.updateTransitions(a, i, r);
}
};
var Py = {};
Py.getEmSizeInPixels = function() {
var e = this.containerCss("font-size");
return e != null ? parseFloat(e) : 1;
};
Py.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 aa = {};
aa.getRenderedStyle = function(e, t) {
return t ? this.getStylePropertyValue(e, t, !0) : this.getRawStyle(e, !0);
};
aa.getRawStyle = function(e, t) {
var n = this;
if (e = e[0], e) {
for (var r = {}, o = 0; o < n.properties.length; o++) {
var a = n.properties[o], i = n.getStylePropertyValue(e, a.name, t);
i != null && (r[a.name] = i, r[ph(a.name)] = i);
}
return r;
}
};
aa.getIndexedStyle = function(e, t, n, r) {
var o = e.pstyle(t)[n][r];
return o ?? e.cy().style().getDefaultProperty(t)[n][0];
};
aa.getStylePropertyValue = function(e, t, n) {
var r = this;
if (e = e[0], e) {
var o = r.properties[t];
o.alias && (o = o.pointsTo);
var a = o.type, i = e.pstyle(o.name);
if (i) {
var s = i.value, u = i.units, l = i.strValue;
if (n && a.number && s != null && Ve(s)) {
var c = e.cy().zoom(), d = function(v) {
return v * c;
}, f = function(v, m) {
return d(v) + m;
}, h = Gt(s), p = h ? u.every(function(v) {
return v != null;
}) : u != null;
return p ? h ? s.map(function(v, m) {
return f(v, u[m]);
}).join(" ") : f(s, u) : h ? s.map(function(v) {
return at(v) ? v : "" + d(v);
}).join(" ") : "" + d(s);
} else if (l != null)
return l;
}
return null;
}
};
aa.getAnimationStartStyle = function(e, t) {
for (var n = {}, r = 0; r < t.length; r++) {
var o = t[r], a = o.name, i = e.pstyle(a);
i !== void 0 && (It(i) ? i = this.parse(a, i.strValue) : i = this.parse(a, i)), i && (n[a] = i);
}
return n;
};
aa.getPropsList = function(e) {
var t = this, n = [], r = e, o = t.properties;
if (r)
for (var a = Object.keys(r), i = 0; i < a.length; i++) {
var s = a[i], u = r[s], l = o[s] || o[vy(s)], c = this.parse(l.name, u);
c && n.push(c);
}
return n;
};
aa.getNonDefaultPropertiesHash = function(e, t, n) {
var r = n.slice(), o, a, i, s, u, l;
for (u = 0; u < t.length; u++)
if (o = t[u], a = e.pstyle(o, !1), a != null)
if (a.pfValue != null)
r[0] = vc(s, r[0]), r[1] = gc(s, r[1]);
else
for (i = a.strValue, l = 0; l < i.length; l++)
s = i.charCodeAt(l), r[0] = vc(s, r[0]), r[1] = gc(s, r[1]);
return r;
};
aa.getPropertiesHash = aa.getNonDefaultPropertiesHash;
var Sh = {};
Sh.appendFromJson = function(e) {
for (var t = this, n = 0; n < e.length; n++) {
var r = e[n], o = r.selector, a = r.style || r.css, i = Object.keys(a);
t.selector(o);
for (var s = 0; s < i.length; s++) {
var u = i[s], l = a[u];
t.css(u, l);
}
}
return t;
};
Sh.fromJson = function(e) {
var t = this;
return t.resetToDefault(), t.appendFromJson(e), t;
};
Sh.json = function() {
for (var e = [], t = this.defaultLength; t < this.length; t++) {
for (var n = this[t], r = n.selector, o = n.properties, a = {}, i = 0; i < o.length; i++) {
var s = o[i];
a[s.name] = s.strValue;
}
e.push({
selector: r ? r.toString() : "core",
style: a
});
}
return e;
};
var $y = {};
$y.appendFromString = function(e) {
var t = this, n = this, r = "" + e, o, a, i;
r = r.replace(/[/][*](\s|.)+?[*][/]/g, "");
function s() {
r.length > o.length ? r = r.substr(o.length) : r = "";
}
function u() {
a.length > i.length ? a = a.substr(i.length) : a = "";
}
for (; ; ) {
var l = r.match(/^\s*$/);
if (l)
break;
var c = r.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/);
if (!c) {
Mt("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: " + r);
break;
}
o = c[0];
var d = c[1];
if (d !== "core") {
var f = new bi(d);
if (f.invalid) {
Mt("Skipping parsing of block: Invalid selector found in string stylesheet: " + d), s();
continue;
}
}
var h = c[2], p = !1;
a = h;
for (var v = []; ; ) {
var m = a.match(/^\s*$/);
if (m)
break;
var g = a.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/);
if (!g) {
Mt("Skipping parsing of block: Invalid formatting of style property and value definitions found in:" + h), p = !0;
break;
}
i = g[0];
var b = g[1], x = g[2], w = t.properties[b];
if (!w) {
Mt("Skipping property: Invalid property name in: " + i), u();
continue;
}
var C = n.parse(b, x);
if (!C) {
Mt("Skipping property: Invalid property definition in: " + i), u();
continue;
}
v.push({
name: b,
val: x
}), u();
}
if (p) {
s();
break;
}
n.selector(d);
for (var k = 0; k < v.length; k++) {
var E = v[k];
n.css(E.name, E.val);
}
s();
}
return n;
};
$y.fromString = function(e) {
var t = this;
return t.resetToDefault(), t.appendFromString(e), t;
};
var Wn = {};
(function() {
var e = Ln, t = Poe, n = Aoe, r = Foe, o = Ioe, a = function(J) {
return "^" + J + "\\s*\\(\\s*([\\w\\.]+)\\s*\\)$";
}, i = function(J) {
var te = e + "|\\w+|" + t + "|" + n + "|" + r + "|" + o;
return "^" + J + "\\s*\\(([\\w\\.]+)\\s*\\,\\s*(" + e + ")\\s*\\,\\s*(" + e + ")\\s*,\\s*(" + te + ")\\s*\\,\\s*(" + te + ")\\)$";
}, s = [`^url\\s*\\(\\s*['"]?(.+?)['"]?\\s*\\)$`, "^(none)$", "^(.+)$"];
Wn.types = {
time: {
number: !0,
min: 0,
units: "s|ms",
implicitUnits: "ms"
},
percent: {
number: !0,
min: 0,
max: 100,
units: "%",
implicitUnits: "%"
},
percentages: {
number: !0,
min: 0,
max: 100,
units: "%",
implicitUnits: "%",
multiple: !0
},
zeroOneNumber: {
number: !0,
min: 0,
max: 1,
unitless: !0
},
zeroOneNumbers: {
number: !0,
min: 0,
max: 1,
unitless: !0,
multiple: !0
},
nOneOneNumber: {
number: !0,
min: -1,
max: 1,
unitless: !0
},
nonNegativeInt: {
number: !0,
min: 0,
integer: !0,
unitless: !0
},
nonNegativeNumber: {
number: !0,
min: 0,
unitless: !0
},
position: {
enums: ["parent", "origin"]
},
nodeSize: {
number: !0,
min: 0,
enums: ["label"]
},
number: {
number: !0,
unitless: !0
},
numbers: {
number: !0,
unitless: !0,
multiple: !0
},
positiveNumber: {
number: !0,
unitless: !0,
min: 0,
strictMin: !0
},
size: {
number: !0,
min: 0
},
bidirectionalSize: {
number: !0
},
// allows negative
bidirectionalSizeMaybePercent: {
number: !0,
allowPercent: !0
},
// allows negative
bidirectionalSizes: {
number: !0,
multiple: !0
},
// allows negative
sizeMaybePercent: {
number: !0,
min: 0,
allowPercent: !0
},
axisDirection: {
enums: ["horizontal", "leftward", "rightward", "vertical", "upward", "downward", "auto"]
},
paddingRelativeTo: {
enums: ["width", "height", "average", "min", "max"]
},
bgWH: {
number: !0,
min: 0,
allowPercent: !0,
enums: ["auto"],
multiple: !0
},
bgPos: {
number: !0,
allowPercent: !0,
multiple: !0
},
bgRelativeTo: {
enums: ["inner", "include-padding"],
multiple: !0
},
bgRepeat: {
enums: ["repeat", "repeat-x", "repeat-y", "no-repeat"],
multiple: !0
},
bgFit: {
enums: ["none", "contain", "cover"],
multiple: !0
},
bgCrossOrigin: {
enums: ["anonymous", "use-credentials", "null"],
multiple: !0
},
bgClip: {
enums: ["none", "node"],
multiple: !0
},
bgContainment: {
enums: ["inside", "over"],
multiple: !0
},
color: {
color: !0
},
colors: {
color: !0,
multiple: !0
},
fill: {
enums: ["solid", "linear-gradient", "radial-gradient"]
},
bool: {
enums: ["yes", "no"]
},
bools: {
enums: ["yes", "no"],
multiple: !0
},
lineStyle: {
enums: ["solid", "dotted", "dashed"]
},
lineCap: {
enums: ["butt", "round", "square"]
},
linePosition: {
enums: ["center", "inside", "outside"]
},
lineJoin: {
enums: ["round", "bevel", "miter"]
},
borderStyle: {
enums: ["solid", "dotted", "dashed", "double"]
},
curveStyle: {
enums: ["bezier", "unbundled-bezier", "haystack", "segments", "straight", "straight-triangle", "taxi", "round-segments", "round-taxi"]
},
radiusType: {
enums: ["arc-radius", "influence-radius"],
multiple: !0
},
fontFamily: {
regex: '^([\\w- \\"]+(?:\\s*,\\s*[\\w- \\"]+)*)$'
},
fontStyle: {
enums: ["italic", "normal", "oblique"]
},
fontWeight: {
enums: ["normal", "bold", "bolder", "lighter", "100", "200", "300", "400", "500", "600", "800", "900", 100, 200, 300, 400, 500, 600, 700, 800, 900]
},
textDecoration: {
enums: ["none", "underline", "overline", "line-through"]
},
textTransform: {
enums: ["none", "uppercase", "lowercase"]
},
textWrap: {
enums: ["none", "wrap", "ellipsis"]
},
textOverflowWrap: {
enums: ["whitespace", "anywhere"]
},
textBackgroundShape: {
enums: ["rectangle", "roundrectangle", "round-rectangle"]
},
nodeShape: {
enums: ["rectangle", "roundrectangle", "round-rectangle", "cutrectangle", "cut-rectangle", "bottomroundrectangle", "bottom-round-rectangle", "barrel", "ellipse", "triangle", "round-triangle", "square", "pentagon", "round-pentagon", "hexagon", "round-hexagon", "concavehexagon", "concave-hexagon", "heptagon", "round-heptagon", "octagon", "round-octagon", "tag", "round-tag", "star", "diamond", "round-diamond", "vee", "rhomboid", "right-rhomboid", "polygon"]
},
overlayShape: {
enums: ["roundrectangle", "round-rectangle", "ellipse"]
},
cornerRadius: {
number: !0,
min: 0,
units: "px|em",
implicitUnits: "px",
enums: ["auto"]
},
compoundIncludeLabels: {
enums: ["include", "exclude"]
},
arrowShape: {
enums: ["tee", "triangle", "triangle-tee", "circle-triangle", "triangle-cross", "triangle-backcurve", "vee", "square", "circle", "diamond", "chevron", "none"]
},
arrowFill: {
enums: ["filled", "hollow"]
},
arrowWidth: {
number: !0,
units: "%|px|em",
implicitUnits: "px",
enums: ["match-line"]
},
display: {
enums: ["element", "none"]
},
visibility: {
enums: ["hidden", "visible"]
},
zCompoundDepth: {
enums: ["bottom", "orphan", "auto", "top"]
},
zIndexCompare: {
enums: ["auto", "manual"]
},
valign: {
enums: ["top", "center", "bottom"]
},
halign: {
enums: ["left", "center", "right"]
},
justification: {
enums: ["left", "center", "right", "auto"]
},
text: {
string: !0
},
data: {
mapping: !0,
regex: a("data")
},
layoutData: {
mapping: !0,
regex: a("layoutData")
},
scratch: {
mapping: !0,
regex: a("scratch")
},
mapData: {
mapping: !0,
regex: i("mapData")
},
mapLayoutData: {
mapping: !0,
regex: i("mapLayoutData")
},
mapScratch: {
mapping: !0,
regex: i("mapScratch")
},
fn: {
mapping: !0,
fn: !0
},
url: {
regexes: s,
singleRegexMatchValue: !0
},
urls: {
regexes: s,
singleRegexMatchValue: !0,
multiple: !0
},
propList: {
propList: !0
},
angle: {
number: !0,
units: "deg|rad",
implicitUnits: "rad"
},
textRotation: {
number: !0,
units: "deg|rad",
implicitUnits: "rad",
enums: ["none", "autorotate"]
},
polygonPointList: {
number: !0,
multiple: !0,
evenMultiple: !0,
min: -1,
max: 1,
unitless: !0
},
edgeDistances: {
enums: ["intersection", "node-position", "endpoints"]
},
edgeEndpoint: {
number: !0,
multiple: !0,
units: "%|px|em|deg|rad",
implicitUnits: "px",
enums: ["inside-to-node", "outside-to-node", "outside-to-node-or-label", "outside-to-line", "outside-to-line-or-label"],
singleEnum: !0,
validate: function(J, te) {
switch (J.length) {
case 2:
return te[0] !== "deg" && te[0] !== "rad" && te[1] !== "deg" && te[1] !== "rad";
case 1:
return at(J[0]) || te[0] === "deg" || te[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(J) {
var te = J.length;
return te === 1 || te === 2 || te === 4;
}
}
};
var u = {
zeroNonZero: function(J, te) {
return (J == null || te == null) && J !== te || J == 0 && te != 0 ? !0 : J != 0 && te == 0;
},
any: function(J, te) {
return J != te;
},
emptyNonEmpty: function(J, te) {
var le = mi(J), Ee = mi(te);
return le && !Ee || !le && Ee;
}
}, l = Wn.types, c = [{
name: "label",
type: l.text,
triggersBounds: u.any,
triggersZOrder: u.emptyNonEmpty
}, {
name: "text-rotation",
type: l.textRotation,
triggersBounds: u.any
}, {
name: "text-margin-x",
type: l.bidirectionalSize,
triggersBounds: u.any
}, {
name: "text-margin-y",
type: l.bidirectionalSize,
triggersBounds: u.any
}], d = [{
name: "source-label",
type: l.text,
triggersBounds: u.any
}, {
name: "source-text-rotation",
type: l.textRotation,
triggersBounds: u.any
}, {
name: "source-text-margin-x",
type: l.bidirectionalSize,
triggersBounds: u.any
}, {
name: "source-text-margin-y",
type: l.bidirectionalSize,
triggersBounds: u.any
}, {
name: "source-text-offset",
type: l.size,
triggersBounds: u.any
}], f = [{
name: "target-label",
type: l.text,
triggersBounds: u.any
}, {
name: "target-text-rotation",
type: l.textRotation,
triggersBounds: u.any
}, {
name: "target-text-margin-x",
type: l.bidirectionalSize,
triggersBounds: u.any
}, {
name: "target-text-margin-y",
type: l.bidirectionalSize,
triggersBounds: u.any
}, {
name: "target-text-offset",
type: l.size,
triggersBounds: u.any
}], h = [{
name: "font-family",
type: l.fontFamily,
triggersBounds: u.any
}, {
name: "font-style",
type: l.fontStyle,
triggersBounds: u.any
}, {
name: "font-weight",
type: l.fontWeight,
triggersBounds: u.any
}, {
name: "font-size",
type: l.size,
triggersBounds: u.any
}, {
name: "text-transform",
type: l.textTransform,
triggersBounds: u.any
}, {
name: "text-wrap",
type: l.textWrap,
triggersBounds: u.any
}, {
name: "text-overflow-wrap",
type: l.textOverflowWrap,
triggersBounds: u.any
}, {
name: "text-max-width",
type: l.size,
triggersBounds: u.any
}, {
name: "text-outline-width",
type: l.size,
triggersBounds: u.any
}, {
name: "line-height",
type: l.positiveNumber,
triggersBounds: u.any
}], p = [{
name: "text-valign",
type: l.valign,
triggersBounds: u.any
}, {
name: "text-halign",
type: l.halign,
triggersBounds: u.any
}, {
name: "color",
type: l.color
}, {
name: "text-outline-color",
type: l.color
}, {
name: "text-outline-opacity",
type: l.zeroOneNumber
}, {
name: "text-background-color",
type: l.color
}, {
name: "text-background-opacity",
type: l.zeroOneNumber
}, {
name: "text-background-padding",
type: l.size,
triggersBounds: u.any
}, {
name: "text-border-opacity",
type: l.zeroOneNumber
}, {
name: "text-border-color",
type: l.color
}, {
name: "text-border-width",
type: l.size,
triggersBounds: u.any
}, {
name: "text-border-style",
type: l.borderStyle,
triggersBounds: u.any
}, {
name: "text-background-shape",
type: l.textBackgroundShape,
triggersBounds: u.any
}, {
name: "text-justification",
type: l.justification
}], v = [{
name: "events",
type: l.bool,
triggersZOrder: u.any
}, {
name: "text-events",
type: l.bool,
triggersZOrder: u.any
}], m = [{
name: "display",
type: l.display,
triggersZOrder: u.any,
triggersBounds: u.any,
triggersBoundsOfConnectedEdges: !0
}, {
name: "visibility",
type: l.visibility,
triggersZOrder: u.any
}, {
name: "opacity",
type: l.zeroOneNumber,
triggersZOrder: u.zeroNonZero
}, {
name: "text-opacity",
type: l.zeroOneNumber
}, {
name: "min-zoomed-font-size",
type: l.size
}, {
name: "z-compound-depth",
type: l.zCompoundDepth,
triggersZOrder: u.any
}, {
name: "z-index-compare",
type: l.zIndexCompare,
triggersZOrder: u.any
}, {
name: "z-index",
type: l.number,
triggersZOrder: u.any
}], g = [{
name: "overlay-padding",
type: l.size,
triggersBounds: u.any
}, {
name: "overlay-color",
type: l.color
}, {
name: "overlay-opacity",
type: l.zeroOneNumber,
triggersBounds: u.zeroNonZero
}, {
name: "overlay-shape",
type: l.overlayShape,
triggersBounds: u.any
}, {
name: "overlay-corner-radius",
type: l.cornerRadius
}], b = [{
name: "underlay-padding",
type: l.size,
triggersBounds: u.any
}, {
name: "underlay-color",
type: l.color
}, {
name: "underlay-opacity",
type: l.zeroOneNumber,
triggersBounds: u.zeroNonZero
}, {
name: "underlay-shape",
type: l.overlayShape,
triggersBounds: u.any
}, {
name: "underlay-corner-radius",
type: l.cornerRadius
}], x = [{
name: "transition-property",
type: l.propList
}, {
name: "transition-duration",
type: l.time
}, {
name: "transition-delay",
type: l.time
}, {
name: "transition-timing-function",
type: l.easing
}], w = function(J, te) {
return te.value === "label" ? -J.poolIndex() : te.pfValue;
}, C = [{
name: "height",
type: l.nodeSize,
triggersBounds: u.any,
hashOverride: w
}, {
name: "width",
type: l.nodeSize,
triggersBounds: u.any,
hashOverride: w
}, {
name: "shape",
type: l.nodeShape,
triggersBounds: u.any
}, {
name: "shape-polygon-points",
type: l.polygonPointList,
triggersBounds: u.any
}, {
name: "corner-radius",
type: l.cornerRadius
}, {
name: "background-color",
type: l.color
}, {
name: "background-fill",
type: l.fill
}, {
name: "background-opacity",
type: l.zeroOneNumber
}, {
name: "background-blacken",
type: l.nOneOneNumber
}, {
name: "background-gradient-stop-colors",
type: l.colors
}, {
name: "background-gradient-stop-positions",
type: l.percentages
}, {
name: "background-gradient-direction",
type: l.gradientDirection
}, {
name: "padding",
type: l.sizeMaybePercent,
triggersBounds: u.any
}, {
name: "padding-relative-to",
type: l.paddingRelativeTo,
triggersBounds: u.any
}, {
name: "bounds-expansion",
type: l.boundsExpansion,
triggersBounds: u.any
}], k = [{
name: "border-color",
type: l.color
}, {
name: "border-opacity",
type: l.zeroOneNumber
}, {
name: "border-width",
type: l.size,
triggersBounds: u.any
}, {
name: "border-style",
type: l.borderStyle
}, {
name: "border-cap",
type: l.lineCap
}, {
name: "border-join",
type: l.lineJoin
}, {
name: "border-dash-pattern",
type: l.numbers
}, {
name: "border-dash-offset",
type: l.number
}, {
name: "border-position",
type: l.linePosition
}], E = [{
name: "outline-color",
type: l.color
}, {
name: "outline-opacity",
type: l.zeroOneNumber
}, {
name: "outline-width",
type: l.size,
triggersBounds: u.any
}, {
name: "outline-style",
type: l.borderStyle
}, {
name: "outline-offset",
type: l.size,
triggersBounds: u.any
}], S = [{
name: "background-image",
type: l.urls
}, {
name: "background-image-crossorigin",
type: l.bgCrossOrigin
}, {
name: "background-image-opacity",
type: l.zeroOneNumbers
}, {
name: "background-image-containment",
type: l.bgContainment
}, {
name: "background-image-smoothing",
type: l.bools
}, {
name: "background-position-x",
type: l.bgPos
}, {
name: "background-position-y",
type: l.bgPos
}, {
name: "background-width-relative-to",
type: l.bgRelativeTo
}, {
name: "background-height-relative-to",
type: l.bgRelativeTo
}, {
name: "background-repeat",
type: l.bgRepeat
}, {
name: "background-fit",
type: l.bgFit
}, {
name: "background-clip",
type: l.bgClip
}, {
name: "background-width",
type: l.bgWH
}, {
name: "background-height",
type: l.bgWH
}, {
name: "background-offset-x",
type: l.bgPos
}, {
name: "background-offset-y",
type: l.bgPos
}], O = [{
name: "position",
type: l.position,
triggersBounds: u.any
}, {
name: "compound-sizing-wrt-labels",
type: l.compoundIncludeLabels,
triggersBounds: u.any
}, {
name: "min-width",
type: l.size,
triggersBounds: u.any
}, {
name: "min-width-bias-left",
type: l.sizeMaybePercent,
triggersBounds: u.any
}, {
name: "min-width-bias-right",
type: l.sizeMaybePercent,
triggersBounds: u.any
}, {
name: "min-height",
type: l.size,
triggersBounds: u.any
}, {
name: "min-height-bias-top",
type: l.sizeMaybePercent,
triggersBounds: u.any
}, {
name: "min-height-bias-bottom",
type: l.sizeMaybePercent,
triggersBounds: u.any
}], F = [{
name: "line-style",
type: l.lineStyle
}, {
name: "line-color",
type: l.color
}, {
name: "line-fill",
type: l.fill
}, {
name: "line-cap",
type: l.lineCap
}, {
name: "line-opacity",
type: l.zeroOneNumber
}, {
name: "line-dash-pattern",
type: l.numbers
}, {
name: "line-dash-offset",
type: l.number
}, {
name: "line-outline-width",
type: l.size
}, {
name: "line-outline-color",
type: l.color
}, {
name: "line-gradient-stop-colors",
type: l.colors
}, {
name: "line-gradient-stop-positions",
type: l.percentages
}, {
name: "curve-style",
type: l.curveStyle,
triggersBounds: u.any,
triggersBoundsOfParallelBeziers: !0
}, {
name: "haystack-radius",
type: l.zeroOneNumber,
triggersBounds: u.any
}, {
name: "source-endpoint",
type: l.edgeEndpoint,
triggersBounds: u.any
}, {
name: "target-endpoint",
type: l.edgeEndpoint,
triggersBounds: u.any
}, {
name: "control-point-step-size",
type: l.size,
triggersBounds: u.any
}, {
name: "control-point-distances",
type: l.bidirectionalSizes,
triggersBounds: u.any
}, {
name: "control-point-weights",
type: l.numbers,
triggersBounds: u.any
}, {
name: "segment-distances",
type: l.bidirectionalSizes,
triggersBounds: u.any
}, {
name: "segment-weights",
type: l.numbers,
triggersBounds: u.any
}, {
name: "segment-radii",
type: l.numbers,
triggersBounds: u.any
}, {
name: "radius-type",
type: l.radiusType,
triggersBounds: u.any
}, {
name: "taxi-turn",
type: l.bidirectionalSizeMaybePercent,
triggersBounds: u.any
}, {
name: "taxi-turn-min-distance",
type: l.size,
triggersBounds: u.any
}, {
name: "taxi-direction",
type: l.axisDirection,
triggersBounds: u.any
}, {
name: "taxi-radius",
type: l.number,
triggersBounds: u.any
}, {
name: "edge-distances",
type: l.edgeDistances,
triggersBounds: u.any
}, {
name: "arrow-scale",
type: l.positiveNumber,
triggersBounds: u.any
}, {
name: "loop-direction",
type: l.angle,
triggersBounds: u.any
}, {
name: "loop-sweep",
type: l.angle,
triggersBounds: u.any
}, {
name: "source-distance-from-node",
type: l.size,
triggersBounds: u.any
}, {
name: "target-distance-from-node",
type: l.size,
triggersBounds: u.any
}], $ = [{
name: "ghost",
type: l.bool,
triggersBounds: u.any
}, {
name: "ghost-offset-x",
type: l.bidirectionalSize,
triggersBounds: u.any
}, {
name: "ghost-offset-y",
type: l.bidirectionalSize,
triggersBounds: u.any
}, {
name: "ghost-opacity",
type: l.zeroOneNumber
}], A = [{
name: "selection-box-color",
type: l.color
}, {
name: "selection-box-opacity",
type: l.zeroOneNumber
}, {
name: "selection-box-border-color",
type: l.color
}, {
name: "selection-box-border-width",
type: l.size
}, {
name: "active-bg-color",
type: l.color
}, {
name: "active-bg-opacity",
type: l.zeroOneNumber
}, {
name: "active-bg-size",
type: l.size
}, {
name: "outside-texture-bg-color",
type: l.color
}, {
name: "outside-texture-bg-opacity",
type: l.zeroOneNumber
}], L = [];
Wn.pieBackgroundN = 16, L.push({
name: "pie-size",
type: l.sizeMaybePercent
});
for (var N = 1; N <= Wn.pieBackgroundN; N++)
L.push({
name: "pie-" + N + "-background-color",
type: l.color
}), L.push({
name: "pie-" + N + "-background-size",
type: l.percent
}), L.push({
name: "pie-" + N + "-background-opacity",
type: l.zeroOneNumber
});
var M = [], I = Wn.arrowPrefixes = ["source", "mid-source", "target", "mid-target"];
[{
name: "arrow-shape",
type: l.arrowShape,
triggersBounds: u.any
}, {
name: "arrow-color",
type: l.color
}, {
name: "arrow-fill",
type: l.arrowFill
}, {
name: "arrow-width",
type: l.arrowWidth
}].forEach(function(J) {
I.forEach(function(te) {
var le = te + "-" + J.name, Ee = J.type, Ne = J.triggersBounds;
M.push({
name: le,
type: Ee,
triggersBounds: Ne
});
});
}, {});
var z = Wn.properties = [].concat(v, x, m, g, b, $, p, h, c, d, f, C, k, E, S, L, O, F, M, A), R = Wn.propertyGroups = {
// common to all eles
behavior: v,
transition: x,
visibility: m,
overlay: g,
underlay: b,
ghost: $,
// labels
commonLabel: p,
labelDimensions: h,
mainLabel: c,
sourceLabel: d,
targetLabel: f,
// node props
nodeBody: C,
nodeBorder: k,
nodeOutline: E,
backgroundImage: S,
pie: L,
compound: O,
// edge props
edgeLine: F,
edgeArrow: M,
core: A
}, q = Wn.propertyGroupNames = {}, oe = Wn.propertyGroupKeys = Object.keys(R);
oe.forEach(function(J) {
q[J] = R[J].map(function(te) {
return te.name;
}), R[J].forEach(function(te) {
return te.groupKey = J;
});
});
var Q = Wn.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"
}];
Wn.propertyNames = z.map(function(J) {
return J.name;
});
for (var ae = 0; ae < z.length; ae++) {
var pe = z[ae];
z[pe.name] = pe;
}
for (var we = 0; we < Q.length; we++) {
var ke = Q[we], fe = z[ke.pointsTo], ge = {
name: ke.name,
alias: !0,
pointsTo: fe
};
z.push(ge), z[ke.name] = ge;
}
})();
Wn.getDefaultProperty = function(e) {
return this.getDefaultProperties()[e];
};
Wn.getDefaultProperties = function() {
var e = this._private;
if (e.defaultProperties != null)
return e.defaultProperties;
for (var t = ct({
// 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(u, l) {
for (var c = 1; c <= Wn.pieBackgroundN; c++) {
var d = l.name.replace("{{i}}", c), f = l.value;
u[d] = f;
}
return u;
}, {}), {
// 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(u, l) {
return Wn.arrowPrefixes.forEach(function(c) {
var d = c + "-" + l.name, f = l.value;
u[d] = f;
}), u;
}, {})), n = {}, r = 0; r < this.properties.length; r++) {
var o = this.properties[r];
if (!o.pointsTo) {
var a = o.name, i = t[a], s = this.parse(a, i);
n[a] = s;
}
}
return e.defaultProperties = n, e.defaultProperties;
};
Wn.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 _h = {};
_h.parse = function(e, t, n, r) {
var o = this;
if (dn(t))
return o.parseImplWarn(e, t, n, r);
var a = r === "mapping" || r === !0 || r === !1 || r == null ? "dontcare" : r, i = n ? "t" : "f", s = "" + t, u = sS(e, s, i, a), l = o.propCache = o.propCache || [], c;
return (c = l[u]) || (c = l[u] = o.parseImplWarn(e, t, n, r)), (n || r === "mapping") && (c = Ko(c), c && (c.value = Ko(c.value))), c;
};
_h.parseImplWarn = function(e, t, n, r) {
var o = this.parseImpl(e, t, n, r);
return !o && t != null && Mt("The style property `".concat(e, ": ").concat(t, "` is invalid")), o && (o.name === "width" || o.name === "height") && t === "label" && Mt("The style value of `label` is deprecated for `" + o.name + "`"), o;
};
_h.parseImpl = function(e, t, n, r) {
var o = this;
e = vy(e);
var a = o.properties[e], i = t, s = o.types;
if (!a || t === void 0)
return null;
a.alias && (a = a.pointsTo, e = a.name);
var u = at(t);
u && (t = t.trim());
var l = a.type;
if (!l)
return null;
if (n && (t === "" || t === null))
return {
name: e,
value: t,
bypass: !0,
deleteBypass: !0
};
if (dn(t))
return {
name: e,
value: t,
strValue: "fn",
mapped: s.fn,
bypass: n
};
var c, d;
if (!(!u || 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 || l.multiple)
return !1;
var h = s.mapData;
if (!(l.color || l.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 Mt("`" + e + ": " + t + "` is not a valid mapper because the output range is zero; converting to `" + e + ": " + p.strValue + "`"), this.parse(e, p.strValue);
if (l.color) {
var m = p.value, g = v.value, b = m[0] === g[0] && m[1] === g[1] && m[2] === g[2] && // optional alpha
(m[3] === g[3] || (m[3] == null || m[3] === 1) && (g[3] == null || g[3] === 1));
if (b)
return !1;
}
return {
name: e,
value: d,
strValue: "" + t,
mapped: h,
field: d[1],
fieldMin: parseFloat(d[2]),
// min & max are numeric
fieldMax: parseFloat(d[3]),
valueMin: p.value,
valueMax: v.value,
bypass: n
};
}
}
if (l.multiple && r !== "multiple") {
var x;
if (u ? x = t.split(/\s+/) : Gt(t) ? x = t : x = [t], l.evenMultiple && x.length % 2 !== 0)
return null;
for (var w = [], C = [], k = [], E = "", S = !1, O = 0; O < x.length; O++) {
var F = o.parse(e, x[O], n, "multiple");
S = S || at(F.value), w.push(F.value), k.push(F.pfValue != null ? F.pfValue : F.value), C.push(F.units), E += (O > 0 ? " " : "") + F.strValue;
}
return l.validate && !l.validate(w, C) ? null : l.singleEnum && S ? w.length === 1 && at(w[0]) ? {
name: e,
value: w[0],
strValue: w[0],
bypass: n
} : null : {
name: e,
value: w,
pfValue: k,
strValue: E,
bypass: n,
units: C
};
}
var $ = function() {
for (var J = 0; J < l.enums.length; J++) {
var te = l.enums[J];
if (te === t)
return {
name: e,
value: t,
strValue: "" + t,
bypass: n
};
}
return null;
};
if (l.number) {
var A, L = "px";
if (l.units && (A = l.units), l.implicitUnits && (L = l.implicitUnits), !l.unitless)
if (u) {
var N = "px|em" + (l.allowPercent ? "|\\%" : "");
A && (N = A);
var M = t.match("^(" + Ln + ")(" + N + ")?$");
M && (t = M[1], A = M[2] || L);
} else (!A || l.implicitUnits) && (A = L);
if (t = parseFloat(t), isNaN(t) && l.enums === void 0)
return null;
if (isNaN(t) && l.enums !== void 0)
return t = i, $();
if (l.integer && !koe(t) || l.min !== void 0 && (t < l.min || l.strictMin && t === l.min) || l.max !== void 0 && (t > l.max || l.strictMax && t === l.max))
return null;
var I = {
name: e,
value: t,
strValue: "" + t + (A || ""),
units: A,
bypass: n
};
return l.unitless || A !== "px" && A !== "em" ? I.pfValue = t : I.pfValue = A === "px" || !A ? t : this.getEmSizeInPixels() * t, (A === "ms" || A === "s") && (I.pfValue = A === "ms" ? t : 1e3 * t), (A === "deg" || A === "rad") && (I.pfValue = A === "rad" ? t : nie(t)), A === "%" && (I.pfValue = t / 100), I;
} else if (l.propList) {
var z = [], R = "" + t;
if (R !== "none") {
for (var q = R.split(/\s*,\s*|\s+/), oe = 0; oe < q.length; oe++) {
var Q = q[oe].trim();
o.properties[Q] ? z.push(Q) : Mt("`" + Q + "` is not a valid property name");
}
if (z.length === 0)
return null;
}
return {
name: e,
value: z,
strValue: z.length === 0 ? "none" : z.join(" "),
bypass: n
};
} else if (l.color) {
var ae = Moe(t);
return ae ? {
name: e,
value: ae,
pfValue: ae,
strValue: "rgb(" + ae[0] + "," + ae[1] + "," + ae[2] + ")",
// n.b. no spaces b/c of multiple support
bypass: n
} : null;
} else if (l.regex || l.regexes) {
if (l.enums) {
var pe = $();
if (pe)
return pe;
}
for (var we = l.regexes ? l.regexes : [l.regex], ke = 0; ke < we.length; ke++) {
var fe = new RegExp(we[ke]), ge = fe.exec(t);
if (ge)
return {
name: e,
value: l.singleRegexMatchValue ? ge[1] : ge,
strValue: "" + t,
bypass: n
};
}
return null;
} else return l.string ? {
name: e,
value: "" + t,
strValue: "" + t,
bypass: n
} : l.enums ? $() : null;
};
var cr = function e(t) {
if (!(this instanceof e))
return new e(t);
if (!hy(t)) {
vn("A style must have a core reference");
return;
}
this._private = {
cy: t,
coreStyle: {}
}, this.length = 0, this.resetToDefault();
}, pr = cr.prototype;
pr.instanceString = function() {
return "style";
};
pr.clear = function() {
for (var e = this._private, t = e.cy, n = t.elements(), r = 0; r < this.length; r++)
this[r] = void 0;
return this.length = 0, e.contextStyles = {}, e.propDiffs = {}, this.cleanElements(n, !0), n.forEach(function(o) {
var a = o[0]._private;
a.styleDirty = !0, a.appliedInitStyle = !1;
}), this;
};
pr.resetToDefault = function() {
return this.clear(), this.addDefaultStylesheet(), this;
};
pr.core = function(e) {
return this._private.coreStyle[e] || this.getDefaultProperty(e);
};
pr.selector = function(e) {
var t = e === "core" ? null : new bi(e), n = this.length++;
return this[n] = {
selector: t,
properties: [],
mappedProperties: [],
index: n
}, this;
};
pr.css = function() {
var e = this, t = arguments;
if (t.length === 1)
for (var n = t[0], r = 0; r < e.properties.length; r++) {
var o = e.properties[r], a = n[o.name];
a === void 0 && (a = n[ph(o.name)]), a !== void 0 && this.cssRule(o.name, a);
}
else t.length === 2 && this.cssRule(t[0], t[1]);
return this;
};
pr.style = pr.css;
pr.cssRule = function(e, t) {
var n = this.parse(e, t);
if (n) {
var r = this.length - 1;
this[r].properties.push(n), this[r].properties[n.name] = n, n.name.match(/pie-(\d+)-background-size/) && n.value && (this._private.hasPie = !0), n.mapped && this[r].mappedProperties.push(n);
var o = !this[r].selector;
o && (this._private.coreStyle[n.name] = n);
}
return this;
};
pr.append = function(e) {
return ZE(e) ? e.appendToStyle(this) : Gt(e) ? this.appendFromJson(e) : at(e) && this.appendFromString(e), this;
};
cr.fromJson = function(e, t) {
var n = new cr(e);
return n.fromJson(t), n;
};
cr.fromString = function(e, t) {
return new cr(e).fromString(t);
};
[hr, nd, Py, aa, Sh, $y, Wn, _h].forEach(function(e) {
ct(pr, e);
});
cr.types = pr.types;
cr.properties = pr.properties;
cr.propertyGroups = pr.propertyGroups;
cr.propertyGroupNames = pr.propertyGroupNames;
cr.propertyGroupKeys = pr.propertyGroupKeys;
var kce = {
style: function(e) {
if (e) {
var t = this.setStyle(e);
t.update();
}
return this._private.style;
},
setStyle: function(e) {
var t = this._private;
return ZE(e) ? t.style = e.generateStyle(this) : Gt(e) ? t.style = cr.fromJson(this, e) : at(e) ? t.style = cr.fromString(this, e) : t.style = cr(this), t.style;
},
// e.g. cy.data() changed => recalc ele mappers
updateStyle: function() {
this.mutableElements().updateStyle();
}
}, Cce = "single", ks = {
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 = Cce), e !== void 0)
(e === "additive" || e === "single") && (t.selectionType = e);
else
return t.selectionType;
return this;
},
panningEnabled: function(e) {
if (e !== void 0)
this._private.panningEnabled = !!e;
else
return this._private.panningEnabled;
return this;
},
userPanningEnabled: function(e) {
if (e !== void 0)
this._private.userPanningEnabled = !!e;
else
return this._private.userPanningEnabled;
return this;
},
zoomingEnabled: function(e) {
if (e !== void 0)
this._private.zoomingEnabled = !!e;
else
return this._private.zoomingEnabled;
return this;
},
userZoomingEnabled: function(e) {
if (e !== void 0)
this._private.userZoomingEnabled = !!e;
else
return this._private.userZoomingEnabled;
return this;
},
boxSelectionEnabled: function(e) {
if (e !== void 0)
this._private.boxSelectionEnabled = !!e;
else
return this._private.boxSelectionEnabled;
return this;
},
pan: function() {
var e = arguments, t = this._private.pan, n, r, o, a, i;
switch (e.length) {
case 0:
return t;
case 1:
if (at(e[0]))
return n = e[0], t[n];
if (It(e[0])) {
if (!this._private.panningEnabled)
return this;
o = e[0], a = o.x, i = o.y, Ve(a) && (t.x = a), Ve(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") && Ve(r) && (t[n] = r), this.emit("pan viewport");
break;
}
return this.notify("viewport"), this;
},
panBy: function(e, t) {
var n = arguments, r = this._private.pan, o, a, i, s, u;
if (!this._private.panningEnabled)
return this;
switch (n.length) {
case 1:
It(e) && (i = n[0], s = i.x, u = i.y, Ve(s) && (r.x += s), Ve(u) && (r.y += u), this.emit("pan viewport"));
break;
case 2:
o = e, a = t, (o === "x" || o === "y") && Ve(a) && (r[o] += a), this.emit("pan viewport");
break;
}
return this.notify("viewport"), this;
},
fit: function(e, t) {
var n = this.getFitViewport(e, t);
if (n) {
var r = this._private;
r.zoom = n.zoom, r.pan = n.pan, this.emit("pan zoom viewport"), this.notify("viewport");
}
return this;
},
getFitViewport: function(e, t) {
if (Ve(e) && t === void 0 && (t = e, e = void 0), !(!this._private.panningEnabled || !this._private.zoomingEnabled)) {
var n;
if (at(e)) {
var r = e;
e = this.$(r);
} else if (Soe(e)) {
var o = e;
n = {
x1: o.x1,
y1: o.y1,
x2: o.x2,
y2: o.y2
}, n.w = n.x2 - n.x1, n.h = n.y2 - n.y1;
} else Wr(e) || (e = this.mutableElements());
if (!(Wr(e) && e.empty())) {
n = n || e.boundingBox();
var a = this.width(), i = this.height(), s;
if (t = Ve(t) ? t : 0, !isNaN(a) && !isNaN(i) && a > 0 && i > 0 && !isNaN(n.w) && !isNaN(n.h) && n.w > 0 && n.h > 0) {
s = Math.min((a - 2 * t) / n.w, (i - 2 * t) / n.h), s = s > this._private.maxZoom ? this._private.maxZoom : s, s = s < this._private.minZoom ? this._private.minZoom : s;
var u = {
// now pan to middle
x: (a - s * (n.x1 + n.x2)) / 2,
y: (i - s * (n.y1 + n.y2)) / 2
};
return {
zoom: s,
pan: u
};
}
}
}
},
zoomRange: function(e, t) {
var n = this._private;
if (t == null) {
var r = e;
e = r.min, t = r.max;
}
return Ve(e) && Ve(t) && e <= t ? (n.minZoom = e, n.maxZoom = t) : Ve(e) && t === void 0 && e <= n.maxZoom ? n.minZoom = e : Ve(t) && e === void 0 && t >= n.minZoom && (n.maxZoom = t), this;
},
minZoom: function(e) {
return e === void 0 ? this._private.minZoom : this.zoomRange({
min: e
});
},
maxZoom: function(e) {
return e === void 0 ? this._private.maxZoom : this.zoomRange({
max: e
});
},
getZoomedViewport: function(e) {
var t = this._private, n = t.pan, r = t.zoom, o, a, i = !1;
if (t.zoomingEnabled || (i = !0), Ve(e) ? a = e : It(e) && (a = e.level, e.position != null ? o = gh(e.position, r, n) : e.renderedPosition != null && (o = e.renderedPosition), o != null && !t.panningEnabled && (i = !0)), a = a > t.maxZoom ? t.maxZoom : a, a = a < t.minZoom ? t.minZoom : a, i || !Ve(a) || a === r || o != null && (!Ve(o.x) || !Ve(o.y)))
return null;
if (o != null) {
var s = n, u = r, l = a, c = {
x: -l / u * (o.x - s.x) + o.x,
y: -l / u * (o.y - s.y) + o.y
};
return {
zoomed: !0,
panned: !0,
zoom: l,
pan: c
};
} else
return {
zoomed: !0,
panned: !1,
zoom: a,
pan: n
};
},
zoom: function(e) {
if (e === void 0)
return this._private.zoom;
var t = this.getZoomedViewport(e), n = this._private;
return t == null || !t.zoomed ? this : (n.zoom = t.zoom, t.panned && (n.pan.x = t.pan.x, n.pan.y = t.pan.y), this.emit("zoom" + (t.panned ? " pan" : "") + " viewport"), this.notify("viewport"), this);
},
viewport: function(e) {
var t = this._private, n = !0, r = !0, o = [], a = !1, i = !1;
if (!e)
return this;
if (Ve(e.zoom) || (n = !1), It(e.pan) || (r = !1), !n && !r)
return this;
if (n) {
var s = e.zoom;
s < t.minZoom || s > t.maxZoom || !t.zoomingEnabled ? a = !0 : (t.zoom = s, o.push("zoom"));
}
if (r && (!a || !e.cancelOnFailedZoom) && t.panningEnabled) {
var u = e.pan;
Ve(u.x) && (t.pan.x = u.x, i = !1), Ve(u.y) && (t.pan.y = u.y, i = !1), i || o.push("pan");
}
return o.length > 0 && (o.push("viewport"), this.emit(o.join(" ")), this.notify("viewport")), this;
},
center: function(e) {
var t = this.getCenterPan(e);
return t && (this._private.pan = t, this.emit("pan viewport"), this.notify("viewport")), this;
},
getCenterPan: function(e, t) {
if (this._private.panningEnabled) {
if (at(e)) {
var n = e;
e = this.mutableElements().filter(n);
} else Wr(e) || (e = this.mutableElements());
if (e.length !== 0) {
var r = e.boundingBox(), o = this.width(), a = this.height();
t = t === void 0 ? this._private.zoom : t;
var i = {
// middle
x: (o - t * (r.x1 + r.x2)) / 2,
y: (a - t * (r.y1 + r.y2)) / 2
};
return i;
}
}
},
reset: function() {
return !this._private.panningEnabled || !this._private.zoomingEnabled ? this : (this.viewport({
pan: {
x: 0,
y: 0
},
zoom: 1
}), this);
},
invalidateSize: function() {
this._private.sizeCache = null;
},
size: function() {
var e = this._private, t = e.container, n = this;
return e.sizeCache = e.sizeCache || (t ? function() {
var r = n.window().getComputedStyle(t), o = function(a) {
return parseFloat(r.getPropertyValue(a));
};
return {
width: t.clientWidth - o("padding-left") - o("padding-right"),
height: t.clientHeight - o("padding-top") - o("padding-bottom")
};
}() : {
// fallback if no container (not 0 b/c can be used for dividing etc)
width: 1,
height: 1
});
},
width: function() {
return this.size().width;
},
height: function() {
return this.size().height;
},
extent: function() {
var e = this._private.pan, t = this._private.zoom, n = this.renderedExtent(), r = {
x1: (n.x1 - e.x) / t,
x2: (n.x2 - e.x) / t,
y1: (n.y1 - e.y) / t,
y2: (n.y2 - e.y) / t
};
return r.w = r.x2 - r.x1, r.h = r.y2 - r.y1, r;
},
renderedExtent: function() {
var e = this.width(), t = this.height();
return {
x1: 0,
y1: 0,
x2: e,
y2: t,
w: e,
h: t
};
},
multiClickDebounceTime: function(e) {
if (e) this._private.multiClickDebounceTime = e;
else return this._private.multiClickDebounceTime;
return this;
}
};
ks.centre = ks.center;
ks.autolockNodes = ks.autolock;
ks.autoungrabifyNodes = ks.autoungrabify;
var Cc = {
data: Bt.data({
field: "data",
bindingEvent: "data",
allowBinding: !0,
allowSetting: !0,
settingEvent: "data",
settingTriggersEvent: !0,
triggerFnName: "trigger",
allowGetting: !0,
updateStyle: !0
}),
removeData: Bt.removeData({
field: "data",
event: "data",
triggerFnName: "trigger",
triggerEvent: !0,
updateStyle: !0
}),
scratch: Bt.data({
field: "scratch",
bindingEvent: "scratch",
allowBinding: !0,
allowSetting: !0,
settingEvent: "scratch",
settingTriggersEvent: !0,
triggerFnName: "trigger",
allowGetting: !0,
updateStyle: !0
}),
removeScratch: Bt.removeData({
field: "scratch",
event: "scratch",
triggerFnName: "trigger",
triggerEvent: !0,
updateStyle: !0
})
};
Cc.attr = Cc.data;
Cc.removeAttr = Cc.removeData;
var Ec = function(e) {
var t = this;
e = ct({}, e);
var n = e.container;
n && !Qp(n) && Qp(n[0]) && (n = n[0]);
var r = n ? n._cyreg : null;
r = r || {}, r && r.cy && (r.cy.destroy(), r = {});
var o = r.readies = r.readies || [];
n && (n._cyreg = r), r.cy = t;
var a = An !== void 0 && n !== void 0 && !e.headless, i = e;
i.layout = ct({
name: a ? "grid" : "null"
}, i.layout), i.renderer = ct({
name: a ? "canvas" : "null"
}, i.renderer);
var s = function(f, h, p) {
return h !== void 0 ? h : p !== void 0 ? p : f;
}, u = this._private = {
container: n,
// html dom ele container
ready: !1,
// whether ready has been triggered
options: i,
// cached options
elements: new tr(this),
// elements in the graph
listeners: [],
// list of listeners
aniEles: new tr(this),
// elements being animated
data: i.data || {},
// data for the core
scratch: {},
// scratch object for core
layout: null,
renderer: null,
destroyed: !1,
// whether destroy was called
notificationsEnabled: !0,
// whether notifications are sent to the renderer
minZoom: 1e-50,
maxZoom: 1e50,
zoomingEnabled: s(!0, i.zoomingEnabled),
userZoomingEnabled: s(!0, i.userZoomingEnabled),
panningEnabled: s(!0, i.panningEnabled),
userPanningEnabled: s(!0, i.userPanningEnabled),
boxSelectionEnabled: s(!0, i.boxSelectionEnabled),
autolock: s(!1, i.autolock, i.autolockNodes),
autoungrabify: s(!1, i.autoungrabify, i.autoungrabifyNodes),
autounselectify: s(!1, i.autounselectify),
styleEnabled: i.styleEnabled === void 0 ? a : i.styleEnabled,
zoom: Ve(i.zoom) ? i.zoom : 1,
pan: {
x: It(i.pan) && Ve(i.pan.x) ? i.pan.x : 0,
y: It(i.pan) && Ve(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 l = function(f, h) {
var p = f.some(_oe);
if (p)
return Gl.all(f).then(h);
h(f);
};
u.styleEnabled && t.setStyle([]);
var c = ct({}, 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 && (It(f) || Gt(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 = ct({}, t._private.options.layout);
m.eles = t.elements(), t.layout(m).run();
};
l([i.style, i.elements], function(f) {
var h = f[0], p = f[1];
u.styleEnabled && t.style().append(h), d(p, function() {
t.startAnimationLoop(), u.ready = !0, dn(i.ready) && t.on("ready", i.ready);
for (var v = 0; v < o.length; v++) {
var m = o[v];
t.on("ready", m);
}
r && (r.readies = []), t.emit("ready");
}, i.done);
});
}, sf = Ec.prototype;
ct(sf, {
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 An;
var t = this._private.container.ownerDocument;
return t === void 0 || t == null ? An : t.defaultView || An;
},
mount: function(e) {
if (e != null) {
var t = this, n = t._private, r = n.options;
return !Qp(e) && Qp(e[0]) && (e = e[0]), t.stopAnimationLoop(), t.destroyRenderer(), n.container = e, n.styleEnabled = !0, t.invalidateSize(), t.initRenderer(ct({}, 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 Ko(this._private.options);
},
json: function(e) {
var t = this, n = t._private, r = t.mutableElements(), o = function(b) {
return t.getElementById(b.id());
};
if (It(e)) {
if (t.startBatch(), e.elements) {
var a = {}, i = function(b, x) {
for (var w = [], C = [], k = 0; k < b.length; k++) {
var E = b[k];
if (!E.data.id) {
Mt("cy.json() cannot handle elements without an ID attribute");
continue;
}
var S = "" + E.data.id, O = t.getElementById(S);
a[S] = !0, O.length !== 0 ? C.push({
ele: O,
json: E
}) : (x && (E.group = x), w.push(E));
}
t.add(w);
for (var F = 0; F < C.length; F++) {
var $ = C[F], A = $.ele, L = $.json;
A.json(L);
}
};
if (Gt(e.elements))
i(e.elements);
else
for (var s = ["nodes", "edges"], u = 0; u < s.length; u++) {
var l = s[u], c = e.elements[l];
Gt(c) && i(c, l);
}
var d = t.collection();
r.filter(function(b) {
return !a[b.id()];
}).forEach(function(b) {
b.isParent() ? d.merge(b) : b.remove();
}), d.forEach(function(b) {
return b.children().move({
parent: null
});
}), d.forEach(function(b) {
return o(b).remove();
});
}
e.style && t.style(e.style), e.zoom != null && e.zoom !== n.zoom && t.zoom(e.zoom), e.pan && (e.pan.x !== n.pan.x || e.pan.y !== n.pan.y) && t.pan(e.pan), e.data && t.data(e.data);
for (var 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(b) {
return b.json();
}) : (m.elements = {}, r.forEach(function(b) {
var x = b.group();
m.elements[x] || (m.elements[x] = []), m.elements[x].push(b.json());
})), this._private.styleEnabled && (m.style = t.style().json()), m.data = Ko(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 = Ko(n.pan), m.boxSelectionEnabled = n.boxSelectionEnabled, m.renderer = Ko(g.renderer), m.hideEdgesOnViewport = g.hideEdgesOnViewport, m.textureOnViewport = g.textureOnViewport, m.wheelSensitivity = g.wheelSensitivity, m.motionBlur = g.motionBlur, m.multiClickDebounceTime = g.multiClickDebounceTime, m;
}
}
});
sf.$id = sf.getElementById;
[pce, mce, JS, z0, bp, bce, V0, wp, kce, ks, Cc].forEach(function(e) {
ct(sf, e);
});
var Ece = {
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
}, Sce = {
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
}, Ws = function(e) {
return e.scratch("breadthfirst");
}, tk = function(e, t) {
return e.scratch("breadthfirst", t);
};
function QS(e) {
this.options = ct({}, Ece, Sce, e);
}
QS.prototype.run = function() {
var e = this.options, t = e, n = e.cy, r = t.eles, o = r.nodes().filter(function(_e) {
return !_e.isParent();
}), a = r, i = t.directed, s = t.acyclic || t.maximal || t.maximalAdjustments > 0, u = Br(t.boundingBox ? t.boundingBox : {
x1: 0,
y1: 0,
w: n.width(),
h: n.height()
}), l;
if (Wr(t.roots))
l = t.roots;
else if (Gt(t.roots)) {
for (var c = [], d = 0; d < t.roots.length; d++) {
var f = t.roots[d], h = n.getElementById(f);
c.push(h);
}
l = n.collection(c);
} else if (at(t.roots))
l = n.$(t.roots);
else if (i)
l = o.roots();
else {
var p = r.components();
l = n.collection();
for (var v = function(_e) {
var De = p[_e], Ae = De.maxDegree(!1), Be = De.filter(function(Ue) {
return Ue.degree(!1) === Ae;
});
l = l.add(Be);
}, m = 0; m < p.length; m++)
v(m);
}
var g = [], b = {}, x = function(_e, De) {
g[De] == null && (g[De] = []);
var Ae = g[De].length;
g[De].push(_e), tk(_e, {
index: Ae,
depth: De
});
}, w = function(_e, De) {
var Ae = Ws(_e), Be = Ae.depth, Ue = Ae.index;
g[Be][Ue] = null, x(_e, De);
};
a.bfs({
roots: l,
directed: t.directed,
visit: function(_e, De, Ae, Be, Ue) {
var Ze = _e[0], Me = Ze.id();
x(Ze, Ue), b[Me] = !0;
}
});
for (var C = [], k = 0; k < o.length; k++) {
var E = o[k];
b[E.id()] || C.push(E);
}
var S = function(_e) {
for (var De = g[_e], Ae = 0; Ae < De.length; Ae++) {
var Be = De[Ae];
if (Be == null) {
De.splice(Ae, 1), Ae--;
continue;
}
tk(Be, {
depth: _e,
index: Ae
});
}
}, O = function() {
for (var _e = 0; _e < g.length; _e++)
S(_e);
}, F = function(_e, De) {
for (var Ae = Ws(_e), Be = _e.incomers().filter(function(P) {
return P.isNode() && r.has(P);
}), Ue = -1, Ze = _e.id(), Me = 0; Me < Be.length; Me++) {
var rt = Be[Me], nt = Ws(rt);
Ue = Math.max(Ue, nt.depth);
}
if (Ae.depth <= Ue) {
if (!t.acyclic && De[Ze])
return null;
var st = Ue + 1;
return w(_e, st), De[Ze] = st, !0;
}
return !1;
};
if (i && s) {
var $ = [], A = {}, L = function(_e) {
return $.push(_e);
}, N = function() {
return $.shift();
};
for (o.forEach(function(_e) {
return $.push(_e);
}); $.length > 0; ) {
var M = N(), I = F(M, A);
if (I)
M.outgoers().filter(function(_e) {
return _e.isNode() && r.has(_e);
}).forEach(L);
else if (I === null) {
Mt("Detected double maximal shift for node `" + M.id() + "`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs.");
break;
}
}
}
O();
var z = 0;
if (t.avoidOverlap)
for (var R = 0; R < o.length; R++) {
var q = o[R], oe = q.layoutDimensions(t), Q = oe.w, ae = oe.h;
z = Math.max(z, Q, ae);
}
var pe = {}, we = function(_e) {
if (pe[_e.id()])
return pe[_e.id()];
for (var De = Ws(_e).depth, Ae = _e.neighborhood(), Be = 0, Ue = 0, Ze = 0; Ze < Ae.length; Ze++) {
var Me = Ae[Ze];
if (!(Me.isEdge() || Me.isParent() || !o.has(Me))) {
var rt = Ws(Me);
if (rt != null) {
var nt = rt.index, st = rt.depth;
if (!(nt == null || st == null)) {
var P = g[st].length;
st < De && (Be += nt / P, Ue++);
}
}
}
}
return Ue = Math.max(1, Ue), Be = Be / Ue, Ue === 0 && (Be = 0), pe[_e.id()] = Be, Be;
}, ke = function(_e, De) {
var Ae = we(_e), Be = we(De), Ue = Ae - Be;
return Ue === 0 ? QE(_e.id(), De.id()) : Ue;
};
t.depthSort !== void 0 && (ke = t.depthSort);
for (var fe = 0; fe < g.length; fe++)
g[fe].sort(ke), S(fe);
for (var ge = [], J = 0; J < C.length; J++)
ge.push(C[J]);
g.unshift(ge), O();
for (var te = 0, le = 0; le < g.length; le++)
te = Math.max(g[le].length, te);
var Ee = {
x: u.x1 + u.w / 2,
y: u.x1 + u.h / 2
}, Ne = g.reduce(function(_e, De) {
return Math.max(_e, De.length);
}, 0), je = function(_e) {
var De = Ws(_e), Ae = De.depth, Be = De.index, Ue = g[Ae].length, Ze = Math.max(u.w / ((t.grid ? Ne : Ue) + 1), z), Me = Math.max(u.h / (g.length + 1), z), rt = Math.min(u.w / 2 / g.length, u.h / 2 / g.length);
if (rt = Math.max(rt, z), t.circle) {
var nt = rt * Ae + rt - (g.length > 0 && g[0].length <= 3 ? rt / 2 : 0), st = 2 * Math.PI / g[Ae].length * Be;
return Ae === 0 && g[0].length === 1 && (nt = 1), {
x: Ee.x + nt * Math.cos(st),
y: Ee.y + nt * Math.sin(st)
};
} else {
var P = {
x: Ee.x + (Be + 1 - (Ue + 1) / 2) * Ze,
y: (Ae + 1) * Me
};
return P;
}
};
return r.nodes().layoutPositions(this, t, je), this;
};
var _ce = {
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 e_(e) {
this.options = ct({}, _ce, e);
}
e_.prototype.run = function() {
var e = this.options, t = e, n = e.cy, r = t.eles, o = t.counterclockwise !== void 0 ? !t.counterclockwise : t.clockwise, a = r.nodes().not(":parent");
t.sort && (a = a.sort(t.sort));
for (var i = Br(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
}, u = t.sweep === void 0 ? 2 * Math.PI - 2 * Math.PI / a.length : t.sweep, l = u / Math.max(1, a.length - 1), c, d = 0, f = 0; f < a.length; f++) {
var h = a[f], p = h.layoutDimensions(t), v = p.w, m = p.h;
d = Math.max(d, v, m);
}
if (Ve(t.radius) ? c = t.radius : a.length <= 1 ? c = 0 : c = Math.min(i.h, i.w) / 2 - d, a.length > 1 && t.avoidOverlap) {
d *= 1.75;
var g = Math.cos(l) - Math.cos(0), b = Math.sin(l) - Math.sin(0), x = Math.sqrt(d * d / (g * g + b * b));
c = Math.max(x, c);
}
var w = function(C, k) {
var E = t.startAngle + k * l * (o ? 1 : -1), S = c * Math.cos(E), O = c * Math.sin(E), F = {
x: s.x + S,
y: s.y + O
};
return F;
};
return r.nodes().layoutPositions(this, t, w), this;
};
var Tce = {
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 t_(e) {
this.options = ct({}, Tce, e);
}
t_.prototype.run = function() {
for (var e = this.options, t = e, n = t.counterclockwise !== void 0 ? !t.counterclockwise : t.clockwise, r = e.cy, o = t.eles, a = o.nodes().not(":parent"), i = Br(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
}, u = [], l = 0, c = 0; c < a.length; c++) {
var d = a[c], f = void 0;
f = t.concentric(d), u.push({
value: f,
node: d
}), d._private.scratch.concentric = f;
}
a.updateStyle();
for (var h = 0; h < a.length; h++) {
var p = a[h], v = p.layoutDimensions(t);
l = Math.max(l, v.w, v.h);
}
u.sort(function(_e, De) {
return De.value - _e.value;
});
for (var m = t.levelWidth(a), g = [[]], b = g[0], x = 0; x < u.length; x++) {
var w = u[x];
if (b.length > 0) {
var C = Math.abs(b[0].value - w.value);
C >= m && (b = [], g.push(b));
}
b.push(w);
}
var k = l + t.minNodeSpacing;
if (!t.avoidOverlap) {
var E = g.length > 0 && g[0].length > 1, S = Math.min(i.w, i.h) / 2 - k, O = S / (g.length + E ? 1 : 0);
k = Math.min(k, O);
}
for (var F = 0, $ = 0; $ < g.length; $++) {
var A = g[$], L = t.sweep === void 0 ? 2 * Math.PI - 2 * Math.PI / A.length : t.sweep, N = A.dTheta = L / Math.max(1, A.length - 1);
if (A.length > 1 && t.avoidOverlap) {
var M = Math.cos(N) - Math.cos(0), I = Math.sin(N) - Math.sin(0), z = Math.sqrt(k * k / (M * M + I * I));
F = Math.max(z, F);
}
A.r = F, F += k;
}
if (t.equidistant) {
for (var R = 0, q = 0, oe = 0; oe < g.length; oe++) {
var Q = g[oe], ae = Q.r - q;
R = Math.max(R, ae);
}
q = 0;
for (var pe = 0; pe < g.length; pe++) {
var we = g[pe];
pe === 0 && (q = we.r), we.r = q, q += R;
}
}
for (var ke = {}, fe = 0; fe < g.length; fe++)
for (var ge = g[fe], J = ge.dTheta, te = ge.r, le = 0; le < ge.length; le++) {
var Ee = ge[le], Ne = t.startAngle + (n ? 1 : -1) * J * le, je = {
x: s.x + te * Math.cos(Ne),
y: s.y + te * Math.sin(Ne)
};
ke[Ee.node.id()] = je;
}
return o.nodes().layoutPositions(this, t, function(_e) {
var De = _e.id();
return ke[De];
}), this;
};
var Iv, Oce = {
// 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 Th(e) {
this.options = ct({}, Oce, e), this.options.layout = this;
var t = this.options.eles.nodes(), n = this.options.eles.edges(), r = n.filter(function(o) {
var a = o.source().data("id"), i = o.target().data("id"), s = t.some(function(l) {
return l.data("id") === a;
}), u = t.some(function(l) {
return l.data("id") === i;
});
return !s || !u;
});
this.options.eles = this.options.eles.not(r);
}
Th.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 ? Iv = !0 : Iv = !1;
var r = Pce(t, n, e);
Iv && Fce(r), e.randomize && Ice(r);
var o = _a(), a = function() {
Nce(r, t, e), e.fit === !0 && t.fit(e.padding);
}, i = function(d) {
return !(n.stopped || d >= e.numIter || (Lce(r, e), r.temperature = r.temperature * e.coolingFactor, r.temperature < e.minTemp));
}, s = function() {
if (e.animate === !0 || e.animate === !1)
a(), n.one("layoutstop", e.stop), n.emit({
type: "layoutstop",
layout: n
});
else {
var d = e.eles.nodes(), f = n_(r, e, d);
d.layoutPositions(n, e, f);
}
}, u = 0, l = !0;
if (e.animate === !0) {
var c = function d() {
for (var f = 0; l && f < e.refresh; )
l = i(u), u++, f++;
if (!l)
rk(r, e), s();
else {
var h = _a();
h - o >= e.animationThreshold && a(), ef(d);
}
};
c();
} else {
for (; l; )
l = i(u), u++;
rk(r, e), s();
}
return this;
};
Th.prototype.stop = function() {
return this.stopped = !0, this.thread && this.thread.stop(), this.emit("layoutstop"), this;
};
Th.prototype.destroy = function() {
return this.thread && this.thread.stop(), this;
};
var Pce = function(e, t, n) {
for (var r = n.eles.edges(), o = n.eles.nodes(), a = Br(n.boundingBox ? n.boundingBox : {
x1: 0,
y1: 0,
w: e.width(),
h: e.height()
}), i = {
isCompound: e.hasCompoundNodes(),
layoutNodes: [],
idToIndex: {},
nodeSize: o.size(),
graphSet: [],
indexToGraph: [],
layoutEdges: [],
edgeSize: r.size(),
temperature: n.initialTemp,
clientWidth: a.w,
clientHeight: a.h,
boundingBox: a
}, s = n.eles.components(), u = {}, l = 0; l < s.length; l++)
for (var c = s[l], d = 0; d < c.length; d++) {
var f = c[d];
u[f.id()] = l;
}
for (var l = 0; l < i.nodeSize; l++) {
var h = o[l], p = h.layoutDimensions(n), v = {};
v.isLocked = h.locked(), v.id = h.data("id"), v.parentId = h.data("parent"), v.cmptId = u[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 = dn(n.nodeRepulsion) ? n.nodeRepulsion(h) : n.nodeRepulsion, i.layoutNodes.push(v), i.idToIndex[v.id] = l;
}
for (var m = [], g = 0, b = -1, x = [], l = 0; l < i.nodeSize; l++) {
var h = i.layoutNodes[l], w = h.parentId;
w != null ? i.layoutNodes[i.idToIndex[w]].children.push(h.id) : (m[++b] = h.id, x.push(h.id));
}
for (i.graphSet.push(x); g <= b; ) {
var C = m[g++], k = i.idToIndex[C], f = i.layoutNodes[k], E = f.children;
if (E.length > 0) {
i.graphSet.push(E);
for (var l = 0; l < E.length; l++)
m[++b] = E[l];
}
}
for (var l = 0; l < i.graphSet.length; l++)
for (var S = i.graphSet[l], d = 0; d < S.length; d++) {
var O = i.idToIndex[S[d]];
i.indexToGraph[O] = l;
}
for (var l = 0; l < i.edgeSize; l++) {
var F = r[l], $ = {};
$.id = F.data("id"), $.sourceId = F.data("source"), $.targetId = F.data("target");
var A = dn(n.idealEdgeLength) ? n.idealEdgeLength(F) : n.idealEdgeLength, L = dn(n.edgeElasticity) ? n.edgeElasticity(F) : n.edgeElasticity, N = i.idToIndex[$.sourceId], M = i.idToIndex[$.targetId], I = i.indexToGraph[N], z = i.indexToGraph[M];
if (I != z) {
for (var R = $ce($.sourceId, $.targetId, i), q = i.graphSet[R], oe = 0, v = i.layoutNodes[N]; q.indexOf(v.id) === -1; )
v = i.layoutNodes[i.idToIndex[v.parentId]], oe++;
for (v = i.layoutNodes[M]; q.indexOf(v.id) === -1; )
v = i.layoutNodes[i.idToIndex[v.parentId]], oe++;
A *= oe * n.nestingFactor;
}
$.idealLength = A, $.elasticity = L, i.layoutEdges.push($);
}
return i;
}, $ce = function(e, t, n) {
var r = Ace(e, t, 0, n);
return 2 > r.count ? 0 : r.graph;
}, Ace = function e(t, n, r, o) {
var a = o.graphSet[r];
if (-1 < a.indexOf(t) && -1 < a.indexOf(n))
return {
count: 2,
graph: r
};
for (var i = 0, s = 0; s < a.length; s++) {
var u = a[s], l = o.idToIndex[u], c = o.layoutNodes[l].children;
if (c.length !== 0) {
var d = o.indexToGraph[o.idToIndex[c[0]]], f = e(t, n, d, o);
if (f.count !== 0)
if (f.count === 1) {
if (i++, i === 2)
break;
} else
return f;
}
}
return {
count: i,
graph: r
};
}, Fce, Ice = function(e, t) {
for (var n = e.clientWidth, r = e.clientHeight, o = 0; o < e.nodeSize; o++) {
var a = e.layoutNodes[o];
a.children.length === 0 && !a.isLocked && (a.positionX = Math.random() * n, a.positionY = Math.random() * r);
}
}, n_ = function(e, t, n) {
var r = e.boundingBox, o = {
x1: 1 / 0,
x2: -1 / 0,
y1: 1 / 0,
y2: -1 / 0
};
return t.boundingBox && (n.forEach(function(a) {
var i = e.layoutNodes[e.idToIndex[a.data("id")]];
o.x1 = Math.min(o.x1, i.positionX), o.x2 = Math.max(o.x2, i.positionX), o.y1 = Math.min(o.y1, i.positionY), o.y2 = Math.max(o.y2, i.positionY);
}), o.w = o.x2 - o.x1, o.h = o.y2 - o.y1), function(a, i) {
var s = e.layoutNodes[e.idToIndex[a.data("id")]];
if (t.boundingBox) {
var u = (s.positionX - o.x1) / o.w, l = (s.positionY - o.y1) / o.h;
return {
x: r.x1 + u * r.w,
y: r.y1 + l * r.h
};
} else
return {
x: s.positionX,
y: s.positionY
};
};
}, Nce = function(e, t, n) {
var r = n.layout, o = n.eles.nodes(), a = n_(e, n, o);
o.positions(a), e.ready !== !0 && (e.ready = !0, r.one("layoutready", n.ready), r.emit({
type: "layoutready",
layout: this
}));
}, Lce = function(e, t, n) {
Dce(e, t), Mce(e), zce(e, t), Vce(e), jce(e);
}, Dce = function(e, t) {
for (var n = 0; n < e.graphSet.length; n++)
for (var r = e.graphSet[n], o = r.length, a = 0; a < o; a++)
for (var i = e.layoutNodes[e.idToIndex[r[a]]], s = a + 1; s < o; s++) {
var u = e.layoutNodes[e.idToIndex[r[s]]];
Rce(i, u, e, t);
}
}, nk = function(e) {
return -e + 2 * e * Math.random();
}, Rce = function(e, t, n, r) {
var o = e.cmptId, a = t.cmptId;
if (!(o !== a && !n.isCompound)) {
var i = t.positionX - e.positionX, s = t.positionY - e.positionY, u = 1;
i === 0 && s === 0 && (i = nk(u), s = nk(u));
var l = Bce(e, t, i, s);
if (l > 0)
var m = r.nodeOverlap * l, v = Math.sqrt(i * i + s * s), g = m * i / v, b = m * s / v;
else
var c = lf(e, i, s), d = lf(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, b = m * h / v;
e.isLocked || (e.offsetX -= g, e.offsetY -= b), t.isLocked || (t.offsetX += g, t.offsetY += b);
}
}, Bce = function(e, t, n, r) {
if (n > 0)
var o = e.maxX - t.minX;
else
var o = t.maxX - e.minX;
if (r > 0)
var a = e.maxY - t.minY;
else
var a = t.maxY - e.minY;
return o >= 0 && a >= 0 ? Math.sqrt(o * o + a * a) : 0;
}, lf = function(e, t, n) {
var r = e.positionX, o = e.positionY, a = e.height || 1, i = e.width || 1, s = n / t, u = a / i, l = {};
return t === 0 && 0 < n || t === 0 && 0 > n ? (l.x = r, l.y = o + a / 2, l) : 0 < t && -1 * u <= s && s <= u ? (l.x = r + i / 2, l.y = o + i * n / 2 / t, l) : 0 > t && -1 * u <= s && s <= u ? (l.x = r - i / 2, l.y = o - i * n / 2 / t, l) : 0 < n && (s <= -1 * u || s >= u) ? (l.x = r + a * t / 2 / n, l.y = o + a / 2, l) : (0 > n && (s <= -1 * u || s >= u) && (l.x = r - a * t / 2 / n, l.y = o - a / 2), l);
}, Mce = function(e, t) {
for (var n = 0; n < e.edgeSize; n++) {
var r = e.layoutEdges[n], o = e.idToIndex[r.sourceId], a = e.layoutNodes[o], i = e.idToIndex[r.targetId], s = e.layoutNodes[i], u = s.positionX - a.positionX, l = s.positionY - a.positionY;
if (!(u === 0 && l === 0)) {
var c = lf(a, u, l), d = lf(s, -1 * u, -1 * l), 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;
a.isLocked || (a.offsetX += m, a.offsetY += g), s.isLocked || (s.offsetX -= m, s.offsetY -= g);
}
}
}, zce = function(e, t) {
if (t.gravity !== 0)
for (var n = 1, r = 0; r < e.graphSet.length; r++) {
var o = e.graphSet[r], a = o.length;
if (r === 0)
var u = e.clientHeight / 2, l = e.clientWidth / 2;
else
var i = e.layoutNodes[e.idToIndex[o[0]]], s = e.layoutNodes[e.idToIndex[i.parentId]], u = s.positionX, l = s.positionY;
for (var c = 0; c < a; c++) {
var d = e.layoutNodes[e.idToIndex[o[c]]];
if (!d.isLocked) {
var f = u - d.positionX, h = l - 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;
}
}
}
}
}, Vce = function(e, t) {
var n = [], r = 0, o = -1;
for (n.push.apply(n, e.graphSet[0]), o += e.graphSet[0].length; r <= o; ) {
var a = n[r++], i = e.idToIndex[a], s = e.layoutNodes[i], u = s.children;
if (0 < u.length && !s.isLocked) {
for (var l = s.offsetX, c = s.offsetY, d = 0; d < u.length; d++) {
var f = e.layoutNodes[e.idToIndex[u[d]]];
f.offsetX += l, f.offsetY += c, n[++o] = u[d];
}
s.offsetX = 0, s.offsetY = 0;
}
}
}, jce = function(e, t) {
for (var n = 0; n < e.nodeSize; n++) {
var r = e.layoutNodes[n];
0 < r.children.length && (r.maxX = void 0, r.minX = void 0, r.maxY = void 0, r.minY = void 0);
}
for (var n = 0; n < e.nodeSize; n++) {
var r = e.layoutNodes[n];
if (!(0 < r.children.length || r.isLocked)) {
var o = Hce(r.offsetX, r.offsetY, e.temperature);
r.positionX += o.x, r.positionY += o.y, r.offsetX = 0, r.offsetY = 0, r.minX = r.positionX - r.width, r.maxX = r.positionX + r.width, r.minY = r.positionY - r.height, r.maxY = r.positionY + r.height, Uce(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);
}
}, Hce = function(e, t, n) {
var r = Math.sqrt(e * e + t * t);
if (r > n)
var o = {
x: n * e / r,
y: n * t / r
};
else
var o = {
x: e,
y: t
};
return o;
}, Uce = function e(t, n) {
var r = t.parentId;
if (r != null) {
var o = n.layoutNodes[n.idToIndex[r]], a = !1;
if ((o.maxX == null || t.maxX + o.padRight > o.maxX) && (o.maxX = t.maxX + o.padRight, a = !0), (o.minX == null || t.minX - o.padLeft < o.minX) && (o.minX = t.minX - o.padLeft, a = !0), (o.maxY == null || t.maxY + o.padBottom > o.maxY) && (o.maxY = t.maxY + o.padBottom, a = !0), (o.minY == null || t.minY - o.padTop < o.minY) && (o.minY = t.minY - o.padTop, a = !0), a)
return e(o, n);
}
}, rk = function(e, t) {
for (var n = e.layoutNodes, r = [], o = 0; o < n.length; o++) {
var a = n[o], i = a.cmptId, s = r[i] = r[i] || [];
s.push(a);
}
for (var u = 0, o = 0; o < r.length; o++) {
var l = r[o];
if (l) {
l.x1 = 1 / 0, l.x2 = -1 / 0, l.y1 = 1 / 0, l.y2 = -1 / 0;
for (var c = 0; c < l.length; c++) {
var d = l[c];
l.x1 = Math.min(l.x1, d.positionX - d.width / 2), l.x2 = Math.max(l.x2, d.positionX + d.width / 2), l.y1 = Math.min(l.y1, d.positionY - d.height / 2), l.y2 = Math.max(l.y2, d.positionY + d.height / 2);
}
l.w = l.x2 - l.x1, l.h = l.y2 - l.y1, u += l.w * l.h;
}
}
r.sort(function(g, b) {
return b.w * b.h - g.w * g.h;
});
for (var f = 0, h = 0, p = 0, v = 0, m = Math.sqrt(u) * e.clientWidth / e.clientHeight, o = 0; o < r.length; o++) {
var l = r[o];
if (l) {
for (var c = 0; c < l.length; c++) {
var d = l[c];
d.isLocked || (d.positionX += f - l.x1, d.positionY += h - l.y1);
}
f += l.w + t.componentSpacing, p += l.w + t.componentSpacing, v = Math.max(v, l.h), p > m && (h += v + t.componentSpacing, f = 0, p = 0, v = 0);
}
}
}, qce = {
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 r_(e) {
this.options = ct({}, qce, e);
}
r_.prototype.run = function() {
var e = this.options, t = e, n = e.cy, r = t.eles, o = r.nodes().not(":parent");
t.sort && (o = o.sort(t.sort));
var a = Br(t.boundingBox ? t.boundingBox : {
x1: 0,
y1: 0,
w: n.width(),
h: n.height()
});
if (a.h === 0 || a.w === 0)
r.nodes().layoutPositions(this, t, function(pe) {
return {
x: a.x1,
y: a.y1
};
});
else {
var i = o.size(), s = Math.sqrt(i * a.h / a.w), u = Math.round(s), l = Math.round(a.w / a.h * s), c = function(pe) {
if (pe == null)
return Math.min(u, l);
var we = Math.min(u, l);
we == u ? u = pe : l = pe;
}, d = function(pe) {
if (pe == null)
return Math.max(u, l);
var we = Math.max(u, l);
we == u ? u = pe : l = pe;
}, f = t.rows, h = t.cols != null ? t.cols : t.columns;
if (f != null && h != null)
u = f, l = h;
else if (f != null && h == null)
u = f, l = Math.ceil(i / u);
else if (f == null && h != null)
l = h, u = Math.ceil(i / l);
else if (l * u > i) {
var p = c(), v = d();
(p - 1) * v >= i ? c(p - 1) : (v - 1) * p >= i && d(v - 1);
} else
for (; l * u < i; ) {
var m = c(), g = d();
(g + 1) * m >= i ? d(g + 1) : c(m + 1);
}
var b = a.w / l, x = a.h / u;
if (t.condense && (b = 0, x = 0), t.avoidOverlap)
for (var w = 0; w < o.length; w++) {
var C = o[w], k = C._private.position;
(k.x == null || k.y == null) && (k.x = 0, k.y = 0);
var E = C.layoutDimensions(t), S = t.avoidOverlapPadding, O = E.w + S, F = E.h + S;
b = Math.max(b, O), x = Math.max(x, F);
}
for (var $ = {}, A = function(pe, we) {
return !!$["c-" + pe + "-" + we];
}, L = function(pe, we) {
$["c-" + pe + "-" + we] = !0;
}, N = 0, M = 0, I = function() {
M++, M >= l && (M = 0, N++);
}, z = {}, R = 0; R < o.length; R++) {
var q = o[R], oe = t.position(q);
if (oe && (oe.row !== void 0 || oe.col !== void 0)) {
var Q = {
row: oe.row,
col: oe.col
};
if (Q.col === void 0)
for (Q.col = 0; A(Q.row, Q.col); )
Q.col++;
else if (Q.row === void 0)
for (Q.row = 0; A(Q.row, Q.col); )
Q.row++;
z[q.id()] = Q, L(Q.row, Q.col);
}
}
var ae = function(pe, we) {
var ke, fe;
if (pe.locked() || pe.isParent())
return !1;
var ge = z[pe.id()];
if (ge)
ke = ge.col * b + b / 2 + a.x1, fe = ge.row * x + x / 2 + a.y1;
else {
for (; A(N, M); )
I();
ke = M * b + b / 2 + a.x1, fe = N * x + x / 2 + a.y1, L(N, M), I();
}
return {
x: ke,
y: fe
};
};
o.layoutPositions(this, t, ae);
}
return this;
};
var Wce = {
ready: function() {
},
// on layoutready
stop: function() {
}
// on layoutstop
};
function Ay(e) {
this.options = ct({}, Wce, e);
}
Ay.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;
};
Ay.prototype.stop = function() {
return this;
};
var Kce = {
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 o_(e) {
this.options = ct({}, Kce, e);
}
o_.prototype.run = function() {
var e = this.options, t = e.eles, n = t.nodes(), r = dn(e.positions);
function o(a) {
if (e.positions == null)
return Zae(a.position());
if (r)
return e.positions(a);
var i = e.positions[a._private.data.id];
return i ?? null;
}
return n.layoutPositions(this, e, function(a, i) {
var s = o(a);
return a.locked() || s == null ? !1 : s;
}), this;
};
var Gce = {
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 a_(e) {
this.options = ct({}, Gce, e);
}
a_.prototype.run = function() {
var e = this.options, t = e.cy, n = e.eles, r = Br(e.boundingBox ? e.boundingBox : {
x1: 0,
y1: 0,
w: t.width(),
h: t.height()
}), o = function(a, i) {
return {
x: r.x1 + Math.round(Math.random() * r.w),
y: r.y1 + Math.round(Math.random() * r.h)
};
};
return n.nodes().layoutPositions(this, e, o), this;
};
var Xce = [{
name: "breadthfirst",
impl: QS
}, {
name: "circle",
impl: e_
}, {
name: "concentric",
impl: t_
}, {
name: "cose",
impl: Th
}, {
name: "grid",
impl: r_
}, {
name: "null",
impl: Ay
}, {
name: "preset",
impl: o_
}, {
name: "random",
impl: a_
}];
function i_(e) {
this.options = e, this.notifications = 0;
}
var ok = function() {
}, ak = function() {
throw new Error("A headless instance can not render images");
};
i_.prototype = {
recalculateRenderedStyle: ok,
notify: function() {
this.notifications++;
},
init: ok,
isHeadless: function() {
return !0;
},
png: ak,
jpg: ak
};
var Fy = {};
Fy.arrowShapeWidth = 0.3;
Fy.registerArrowShapes = function() {
var e = this.arrowShapes = {}, t = this, n = function(u, l, c, d, f, h, p) {
var v = f.x - c / 2 - p, m = f.x + c / 2 + p, g = f.y - c / 2 - p, b = f.y + c / 2 + p, x = v <= u && u <= m && g <= l && l <= b;
return x;
}, r = function(u, l, c, d, f) {
var h = u * Math.cos(d) - l * Math.sin(d), p = u * Math.sin(d) + l * Math.cos(d), v = h * c, m = p * c, g = v + f.x, b = m + f.y;
return {
x: g,
y: b
};
}, o = function(u, l, c, d) {
for (var f = [], h = 0; h < u.length; h += 2) {
var p = u[h], v = u[h + 1];
f.push(r(p, v, l, c, d));
}
return f;
}, a = function(u) {
for (var l = [], c = 0; c < u.length; c++) {
var d = u[c];
l.push(d.x, d.y);
}
return l;
}, i = function(u) {
return u.pstyle("width").pfValue * u.pstyle("arrow-scale").pfValue * 2;
}, s = function(u, l) {
at(l) && (l = e[l]), e[u] = ct({
name: u,
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 = a(o(this.points, f + 2 * v, h, p)), g = Sr(c, d, m);
return g;
},
roughCollide: n,
draw: function(c, d, f, h) {
var p = o(this.points, d, f, h);
t.arrowShapeImpl("polygon")(c, p);
},
spacing: function(c) {
return 0;
},
gap: i
}, l);
};
s("none", {
collide: tf,
roughCollide: tf,
draw: my,
spacing: vx,
gap: vx
}), 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(u, l, c, d, f) {
var h = o(this.points, l, c, d), p = this.controlPoint, v = r(p[0], p[1], l, c, d);
t.arrowShapeImpl(this.name)(u, h, v);
},
gap: function(u) {
return i(u) * 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(u, l, c, d, f, h, p) {
var v = a(o(this.points, c + 2 * p, d, f)), m = a(o(this.pointsTee, c + 2 * p, d, f)), g = Sr(u, l, v) || Sr(u, l, m);
return g;
},
draw: function(u, l, c, d, f) {
var h = o(this.points, l, c, d), p = o(this.pointsTee, l, c, d);
t.arrowShapeImpl(this.name)(u, 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(u, l, c, d, f, h, p) {
var v = f, m = Math.pow(v.x - u, 2) + Math.pow(v.y - l, 2) <= Math.pow((c + 2 * p) * this.radius, 2), g = a(o(this.points, c + 2 * p, d, f));
return Sr(u, l, g) || m;
},
draw: function(u, l, c, d, f) {
var h = o(this.pointsTr, l, c, d);
t.arrowShapeImpl(this.name)(u, h, d.x, d.y, this.radius * l);
},
spacing: function(u) {
return t.getArrowWidth(u.pstyle("width").pfValue, u.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(u, l) {
var c = this.baseCrossLinePts.slice(), d = l / u, f = 3, h = 5;
return c[f] = c[f] - d, c[h] = c[h] - d, c;
},
collide: function(u, l, c, d, f, h, p) {
var v = a(o(this.points, c + 2 * p, d, f)), m = a(o(this.crossLinePts(c, h), c + 2 * p, d, f)), g = Sr(u, l, v) || Sr(u, l, m);
return g;
},
draw: function(u, l, c, d, f) {
var h = o(this.points, l, c, d), p = o(this.crossLinePts(l, f), l, c, d);
t.arrowShapeImpl(this.name)(u, h, p);
}
}), s("vee", {
points: [-0.15, -0.3, 0, 0, 0.15, -0.3, 0, -0.15],
gap: function(u) {
return i(u) * 0.525;
}
}), s("circle", {
radius: 0.15,
collide: function(u, l, c, d, f, h, p) {
var v = f, m = Math.pow(v.x - u, 2) + Math.pow(v.y - l, 2) <= Math.pow((c + 2 * p) * this.radius, 2);
return m;
},
draw: function(u, l, c, d, f) {
t.arrowShapeImpl(this.name)(u, d.x, d.y, this.radius * l);
},
spacing: function(u) {
return t.getArrowWidth(u.pstyle("width").pfValue, u.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(u) {
return 1;
},
gap: function(u) {
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(u) {
return u.pstyle("width").pfValue * u.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(u) {
return 0.95 * u.pstyle("width").pfValue * u.pstyle("arrow-scale").value;
}
});
};
var Is = {};
Is.projectIntoViewport = function(e, t) {
var n = this.cy, r = this.findContainerClientCoords(), o = r[0], a = r[1], i = r[4], s = n.pan(), u = n.zoom(), l = ((e - o) / i - s.x) / u, c = ((t - a) / i - s.y) / u;
return [l, c];
};
Is.findContainerClientCoords = function() {
if (this.containerBB)
return this.containerBB;
var e = this.container, t = e.getBoundingClientRect(), n = this.cy.window().getComputedStyle(e), r = function(m) {
return parseFloat(n.getPropertyValue(m));
}, o = {
left: r("padding-left"),
right: r("padding-right"),
top: r("padding-top"),
bottom: r("padding-bottom")
}, a = {
left: r("border-left-width"),
right: r("border-right-width"),
top: r("border-top-width"),
bottom: r("border-bottom-width")
}, i = e.clientWidth, s = e.clientHeight, u = o.left + o.right, l = o.top + o.bottom, c = a.left + a.right, d = t.width / (i + c), f = i - u, h = s - l, p = t.left + o.left + a.left, v = t.top + o.top + a.top;
return this.containerBB = [p, v, f, h, d];
};
Is.invalidateContainerClientCoordsCache = function() {
this.containerBB = null;
};
Is.findNearestElement = function(e, t, n, r) {
return this.findNearestElements(e, t, n, r)[0];
};
Is.findNearestElements = function(e, t, n, r) {
var o = this, a = this, i = a.getCachedZSortedEles(), s = [], u = a.cy.zoom(), l = a.cy.hasCompoundNodes(), c = (r ? 24 : 8) / u, d = (r ? 8 : 2) / u, f = (r ? 8 : 2) / u, h = 1 / 0, p, v;
n && (i = i.interactive);
function m(E, S) {
if (E.isNode()) {
if (v)
return;
v = E, s.push(E);
}
if (E.isEdge() && (S == null || S < h))
if (p) {
if (p.pstyle("z-compound-depth").value === E.pstyle("z-compound-depth").value && p.pstyle("z-compound-depth").value === E.pstyle("z-compound-depth").value) {
for (var O = 0; O < s.length; O++)
if (s[O].isEdge()) {
s[O] = E, p = E, h = S ?? h;
break;
}
}
} else
s.push(E), p = E, h = S ?? h;
}
function g(E) {
var S = E.outerWidth() + 2 * d, O = E.outerHeight() + 2 * d, F = S / 2, $ = O / 2, A = E.position(), L = E.pstyle("corner-radius").value === "auto" ? "auto" : E.pstyle("corner-radius").pfValue, N = E._private.rscratch;
if (A.x - F <= e && e <= A.x + F && A.y - $ <= t && t <= A.y + $) {
var M = a.nodeShapes[o.getNodeShape(E)];
if (M.checkPoint(e, t, 0, S, O, A.x, A.y, L, N))
return m(E, 0), !0;
}
}
function b(E) {
var S = E._private, O = S.rscratch, F = E.pstyle("width").pfValue, $ = E.pstyle("arrow-scale").value, A = F / 2 + c, L = A * A, N = A * 2, M = S.source, I = S.target, z;
if (O.edgeType === "segments" || O.edgeType === "straight" || O.edgeType === "haystack") {
for (var R = O.allpts, q = 0; q + 3 < R.length; q += 2)
if (cie(e, t, R[q], R[q + 1], R[q + 2], R[q + 3], N) && L > (z = vie(e, t, R[q], R[q + 1], R[q + 2], R[q + 3])))
return m(E, z), !0;
} else if (O.edgeType === "bezier" || O.edgeType === "multibezier" || O.edgeType === "self" || O.edgeType === "compound") {
for (var R = O.allpts, q = 0; q + 5 < O.allpts.length; q += 4)
if (die(e, t, R[q], R[q + 1], R[q + 2], R[q + 3], R[q + 4], R[q + 5], N) && L > (z = hie(e, t, R[q], R[q + 1], R[q + 2], R[q + 3], R[q + 4], R[q + 5])))
return m(E, z), !0;
}
for (var M = M || S.source, I = I || S.target, oe = o.getArrowWidth(F, $), Q = [{
name: "source",
x: O.arrowStartX,
y: O.arrowStartY,
angle: O.srcArrowAngle
}, {
name: "target",
x: O.arrowEndX,
y: O.arrowEndY,
angle: O.tgtArrowAngle
}, {
name: "mid-source",
x: O.midX,
y: O.midY,
angle: O.midsrcArrowAngle
}, {
name: "mid-target",
x: O.midX,
y: O.midY,
angle: O.midtgtArrowAngle
}], q = 0; q < Q.length; q++) {
var ae = Q[q], pe = a.arrowShapes[E.pstyle(ae.name + "-arrow-shape").value], we = E.pstyle("width").pfValue;
if (pe.roughCollide(e, t, oe, ae.angle, {
x: ae.x,
y: ae.y
}, we, c) && pe.collide(e, t, oe, ae.angle, {
x: ae.x,
y: ae.y
}, we, c))
return m(E), !0;
}
l && s.length > 0 && (g(M), g(I));
}
function x(E, S, O) {
return _o(E, S, O);
}
function w(E, S) {
var O = E._private, F = f, $;
S ? $ = S + "-" : $ = "", E.boundingBox();
var A = O.labelBounds[S || "main"], L = E.pstyle($ + "label").value, N = E.pstyle("text-events").strValue === "yes";
if (!(!N || !L)) {
var M = x(O.rscratch, "labelX", S), I = x(O.rscratch, "labelY", S), z = x(O.rscratch, "labelAngle", S), R = E.pstyle($ + "text-margin-x").pfValue, q = E.pstyle($ + "text-margin-y").pfValue, oe = A.x1 - F - R, Q = A.x2 + F - R, ae = A.y1 - F - q, pe = A.y2 + F - q;
if (z) {
var we = Math.cos(z), ke = Math.sin(z), fe = function(Ne, je) {
return Ne = Ne - M, je = je - I, {
x: Ne * we - je * ke + M,
y: Ne * ke + je * we + I
};
}, ge = fe(oe, ae), J = fe(oe, pe), te = fe(Q, ae), le = fe(Q, pe), Ee = [
// with the margin added after the rotation is applied
ge.x + R,
ge.y + q,
te.x + R,
te.y + q,
le.x + R,
le.y + q,
J.x + R,
J.y + q
];
if (Sr(e, t, Ee))
return m(E), !0;
} else if (Fl(A, e, t))
return m(E), !0;
}
}
for (var C = i.length - 1; C >= 0; C--) {
var k = i[C];
k.isNode() ? g(k) || w(k) : b(k) || w(k) || w(k, "source") || w(k, "target");
}
return s;
};
Is.getAllInBox = function(e, t, n, r) {
var o = this.getCachedZSortedEles().interactive, a = [], i = Math.min(e, n), s = Math.max(e, n), u = Math.min(t, r), l = Math.max(t, r);
e = i, n = s, t = u, r = l;
for (var c = Br({
x1: e,
y1: t,
x2: n,
y2: r
}), d = 0; d < o.length; d++) {
var f = o[d];
if (f.isNode()) {
var h = f, p = h.boundingBox({
includeNodes: !0,
includeEdges: !1,
includeLabels: !1
});
wy(c, p) && !vS(p, c) && a.push(h);
} else {
var v = f, m = v._private, g = m.rscratch;
if (g.startX != null && g.startY != null && !Fl(c, g.startX, g.startY) || g.endX != null && g.endY != null && !Fl(c, g.endX, g.endY))
continue;
if (g.edgeType === "bezier" || g.edgeType === "multibezier" || g.edgeType === "self" || g.edgeType === "compound" || g.edgeType === "segments" || g.edgeType === "haystack") {
for (var b = m.rstyle.bezierPts || m.rstyle.linePts || m.rstyle.haystackPts, x = !0, w = 0; w < b.length; w++)
if (!uie(c, b[w])) {
x = !1;
break;
}
x && a.push(v);
} else (g.edgeType === "haystack" || g.edgeType === "straight") && a.push(v);
}
}
return a;
};
var uf = {};
uf.calculateArrowAngles = function(e) {
var t = e._private.rscratch, n = t.edgeType === "haystack", r = t.edgeType === "bezier", o = t.edgeType === "multibezier", a = t.edgeType === "segments", i = t.edgeType === "compound", s = t.edgeType === "self", u, l, c, d, f, h, g, b;
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, b = t.midY, a)
u = c - t.segpts[0], l = d - t.segpts[1];
else if (o || i || s || r) {
var p = t.allpts, v = Mn(p[0], p[2], p[4], 0.1), m = Mn(p[1], p[3], p[5], 0.1);
u = c - v, l = d - m;
} else
u = c - g, l = d - b;
t.srcArrowAngle = Md(u, l);
var g = t.midX, b = t.midY;
if (n && (g = (c + f) / 2, b = (d + h) / 2), u = f - c, l = h - d, a) {
var p = t.allpts;
if (p.length / 2 % 2 === 0) {
var x = p.length / 2, w = x - 2;
u = p[x] - p[w], l = p[x + 1] - p[w + 1];
} else if (t.isRound)
u = t.midVector[1], l = -t.midVector[0];
else {
var x = p.length / 2 - 1, w = x - 2;
u = p[x] - p[w], l = p[x + 1] - p[w + 1];
}
} else if (o || i || s) {
var p = t.allpts, C = t.ctrlpts, k, E, S, O;
if (C.length / 2 % 2 === 0) {
var F = p.length / 2 - 1, $ = F + 2, A = $ + 2;
k = Mn(p[F], p[$], p[A], 0), E = Mn(p[F + 1], p[$ + 1], p[A + 1], 0), S = Mn(p[F], p[$], p[A], 1e-4), O = Mn(p[F + 1], p[$ + 1], p[A + 1], 1e-4);
} else {
var $ = p.length / 2 - 1, F = $ - 2, A = $ + 2;
k = Mn(p[F], p[$], p[A], 0.4999), E = Mn(p[F + 1], p[$ + 1], p[A + 1], 0.4999), S = Mn(p[F], p[$], p[A], 0.5), O = Mn(p[F + 1], p[$ + 1], p[A + 1], 0.5);
}
u = S - k, l = O - E;
}
if (t.midtgtArrowAngle = Md(u, l), t.midDispX = u, t.midDispY = l, u *= -1, l *= -1, a) {
var p = t.allpts;
if (p.length / 2 % 2 !== 0 && !t.isRound) {
var x = p.length / 2 - 1, L = x + 2;
u = -(p[L] - p[x]), l = -(p[L + 1] - p[x + 1]);
}
}
if (t.midsrcArrowAngle = Md(u, l), a)
u = f - t.segpts[t.segpts.length - 2], l = h - t.segpts[t.segpts.length - 1];
else if (o || i || s || r) {
var p = t.allpts, N = p.length, v = Mn(p[N - 6], p[N - 4], p[N - 2], 0.9), m = Mn(p[N - 5], p[N - 3], p[N - 1], 0.9);
u = f - v, l = h - m;
} else
u = f - g, l = h - b;
t.tgtArrowAngle = Md(u, l);
};
uf.getArrowWidth = uf.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 j0, H0, Ho = {}, Yr = {}, ik, sk, Hi, xp, pa, Mi, ji, jo, Ks, Gd, s_, l_, U0, q0, lk, uk = 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);
}, Yce = 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;
}, Zce = function(e, t, n, r, o) {
if (e !== lk ? uk(t, e, Ho) : Yce(Yr, Ho), uk(t, n, Yr), ik = Ho.nx * Yr.ny - Ho.ny * Yr.nx, sk = Ho.nx * Yr.nx - Ho.ny * -Yr.ny, pa = Math.asin(Math.max(-1, Math.min(1, ik))), Math.abs(pa) < 1e-6) {
j0 = t.x, H0 = t.y, ji = Ks = 0;
return;
}
Hi = 1, xp = !1, sk < 0 ? pa < 0 ? pa = Math.PI + pa : (pa = Math.PI - pa, Hi = -1, xp = !0) : pa > 0 && (Hi = -1, xp = !0), t.radius !== void 0 ? Ks = t.radius : Ks = r, Mi = pa / 2, Gd = Math.min(Ho.len / 2, Yr.len / 2), o ? (jo = Math.abs(Math.cos(Mi) * Ks / Math.sin(Mi)), jo > Gd ? (jo = Gd, ji = Math.abs(jo * Math.sin(Mi) / Math.cos(Mi))) : ji = Ks) : (jo = Math.min(Gd, Ks), ji = Math.abs(jo * Math.sin(Mi) / Math.cos(Mi))), U0 = t.x + Yr.nx * jo, q0 = t.y + Yr.ny * jo, j0 = U0 - Yr.ny * ji * Hi, H0 = q0 + Yr.nx * ji * Hi, s_ = t.x + Ho.nx * jo, l_ = t.y + Ho.ny * jo, lk = t;
};
function u_(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 Iy(e, t, n, r) {
var o = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !0;
return r === 0 || t.radius === 0 ? {
cx: t.x,
cy: t.y,
radius: 0,
startX: t.x,
startY: t.y,
stopX: t.x,
stopY: t.y,
startAngle: void 0,
endAngle: void 0,
counterClockwise: void 0
} : (Zce(e, t, n, r, o), {
cx: j0,
cy: H0,
radius: ji,
startX: s_,
startY: l_,
stopX: U0,
stopY: q0,
startAngle: Ho.ang + Math.PI / 2 * Hi,
endAngle: Yr.ang - Math.PI / 2 * Hi,
counterClockwise: xp
});
}
var vr = {};
vr.findMidptPtsEtc = function(e, t) {
var n = t.posPts, r = t.intersectionPts, o = t.vectorNormInverse, a, i = e.pstyle("source-endpoint"), s = e.pstyle("target-endpoint"), u = i.units != null && s.units != null, l = function(w, C, k, E) {
var S = E - C, O = k - w, F = Math.sqrt(O * O + S * S);
return {
x: -S / F,
y: O / F
};
}, c = e.pstyle("edge-distances").value;
switch (c) {
case "node-position":
a = n;
break;
case "intersection":
a = r;
break;
case "endpoints": {
if (u) {
var d = this.manualEndptToPx(e.source()[0], i), f = Co(d, 2), h = f[0], p = f[1], v = this.manualEndptToPx(e.target()[0], s), m = Co(v, 2), g = m[0], b = m[1], x = {
x1: h,
y1: p,
x2: g,
y2: b
};
o = l(h, p, g, b), a = x;
} else
Mt("Edge ".concat(e.id(), " has edge-distances:endpoints specified without manual endpoints specified via source-endpoint and target-endpoint. Falling back on edge-distances:intersection (default).")), a = r;
break;
}
}
return {
midptPts: a,
vectorNormInverse: o
};
};
vr.findHaystackPoints = function(e) {
for (var t = 0; t < e.length; t++) {
var n = e[t], r = n._private, o = r.rscratch;
if (!o.haystack) {
var a = Math.random() * 2 * Math.PI;
o.source = {
x: Math.cos(a),
y: Math.sin(a)
}, a = Math.random() * 2 * Math.PI, o.target = {
x: Math.cos(a),
y: Math.sin(a)
};
}
var i = r.source, s = r.target, u = i.position(), l = s.position(), c = i.width(), d = s.width(), f = i.height(), h = s.height(), p = n.pstyle("haystack-radius").value, v = p / 2;
o.haystackPts = o.allpts = [o.source.x * c * v + u.x, o.source.y * f * v + u.y, o.target.x * d * v + l.x, o.target.y * h * v + l.y], o.midX = (o.allpts[0] + o.allpts[2]) / 2, o.midY = (o.allpts[1] + o.allpts[3]) / 2, o.edgeType = "haystack", o.haystack = !0, this.storeEdgeProjections(n), this.calculateArrowAngles(n), this.recalculateEdgeLabelProjections(n), this.calculateLabelAngles(n);
}
};
vr.findSegmentsPoints = function(e, t) {
var n = e._private.rscratch, r = e.pstyle("segment-weights"), o = e.pstyle("segment-distances"), a = e.pstyle("segment-radii"), i = e.pstyle("radius-type"), s = Math.min(r.pfValue.length, o.pfValue.length), u = a.pfValue[a.pfValue.length - 1], l = 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 = o.pfValue[c], h = 1 - d, p = d, v = this.findMidptPtsEtc(e, t), m = v.midptPts, g = v.vectorNormInverse, b = {
x: m.x1 * h + m.x2 * p,
y: m.y1 * h + m.y2 * p
};
n.segpts.push(b.x + g.x * f, b.y + g.y * f), n.radii.push(a.pfValue[c] !== void 0 ? a.pfValue[c] : u), n.isArcRadius.push((i.pfValue[c] !== void 0 ? i.pfValue[c] : l) === "arc-radius");
}
};
vr.findLoopPoints = function(e, t, n, r) {
var o = e._private.rscratch, a = t.dirCounts, i = t.srcPos, s = e.pstyle("control-point-distances"), u = s ? s.pfValue[0] : void 0, l = e.pstyle("loop-direction").pfValue, c = e.pstyle("loop-sweep").pfValue, d = e.pstyle("control-point-step-size").pfValue;
o.edgeType = "self";
var f = n, h = d;
r && (f = 0, h = u);
var p = l - Math.PI / 2, v = p - c / 2, m = p + c / 2, g = l + "_" + c;
f = a[g] === void 0 ? a[g] = 0 : ++a[g], o.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)];
};
vr.findCompoundLoopPoints = function(e, t, n, r) {
var o = e._private.rscratch;
o.edgeType = "compound";
var a = t.srcPos, i = t.tgtPos, s = t.srcW, u = t.srcH, l = 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: a.x - s / 2,
y: a.y - u / 2
}, b = {
x: i.x - l / 2,
y: i.y - c / 2
}, x = {
x: Math.min(g.x, b.x),
y: Math.min(g.y, b.y)
}, w = 0.5, C = Math.max(w, Math.log(s * 0.01)), k = Math.max(w, Math.log(l * 0.01));
o.ctrlpts = [x.x, x.y - (1 + Math.pow(m, 1.12) / 100) * v * (p / 3 + 1) * C, x.x - (1 + Math.pow(m, 1.12) / 100) * v * (p / 3 + 1) * k, x.y];
};
vr.findStraightEdgePoints = function(e) {
e._private.rscratch.edgeType = "straight";
};
vr.findBezierPoints = function(e, t, n, r, o) {
var a = e._private.rscratch, i = e.pstyle("control-point-step-size").pfValue, s = e.pstyle("control-point-distances"), u = e.pstyle("control-point-weights"), l = s && u ? Math.min(s.value.length, u.value.length) : 1, c = s ? s.pfValue[0] : void 0, d = u.value[0], f = r;
a.edgeType = f ? "multibezier" : "bezier", a.ctrlpts = [];
for (var h = 0; h < l; h++) {
var p = (0.5 - t.eles.length / 2 + n) * i * (o ? -1 : 1), v = void 0, m = fS(p);
f && (c = s ? s.pfValue[h] : i, d = u.value[h]), r ? v = c : v = c !== void 0 ? m * c : void 0;
var g = v !== void 0 ? v : p, b = 1 - d, x = d, w = this.findMidptPtsEtc(e, t), C = w.midptPts, k = w.vectorNormInverse, E = {
x: C.x1 * b + C.x2 * x,
y: C.y1 * b + C.y2 * x
};
a.ctrlpts.push(E.x + k.x * g, E.y + k.y * g);
}
};
vr.findTaxiPoints = function(e, t) {
var n = e._private.rscratch;
n.edgeType = "segments";
var r = "vertical", o = "horizontal", a = "leftward", i = "rightward", s = "downward", u = "upward", l = "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, b = g, x = e.pstyle("taxi-turn"), w = x.units === "%", C = x.pfValue, k = C < 0, E = e.pstyle("taxi-turn-min-distance").pfValue, S = m ? (d + h) / 2 : 0, O = m ? (f + p) / 2 : 0, F = c.x2 - c.x1, $ = c.y2 - c.y1, A = function(Ye, Je) {
return Ye > 0 ? Math.max(Ye - Je, 0) : Math.min(Ye + Je, 0);
}, L = A(F, S), N = A($, O), M = !1;
b === l ? g = Math.abs(L) > Math.abs(N) ? o : r : b === u || b === s ? (g = r, M = !0) : (b === a || b === i) && (g = o, M = !0);
var I = g === r, z = I ? N : L, R = I ? $ : F, q = fS(R), oe = !1;
!(M && (w || k)) && (b === s && R < 0 || b === u && R > 0 || b === a && R > 0 || b === i && R < 0) && (q *= -1, z = q * Math.abs(z), oe = !0);
var Q;
if (w) {
var ae = C < 0 ? 1 + C : C;
Q = ae * z;
} else {
var pe = C < 0 ? z : 0;
Q = pe + C * q;
}
var we = function(Ye) {
return Math.abs(Ye) < E || Math.abs(Ye) >= Math.abs(z);
}, ke = we(Q), fe = we(Math.abs(z) - Math.abs(Q)), ge = ke || fe;
if (ge && !oe)
if (I) {
var J = Math.abs(R) <= f / 2, te = Math.abs(F) <= h / 2;
if (J) {
var le = (c.x1 + c.x2) / 2, Ee = c.y1, Ne = c.y2;
n.segpts = [le, Ee, le, Ne];
} else if (te) {
var je = (c.y1 + c.y2) / 2, _e = c.x1, De = c.x2;
n.segpts = [_e, je, De, je];
} else
n.segpts = [c.x1, c.y2];
} else {
var Ae = Math.abs(R) <= d / 2, Be = Math.abs($) <= p / 2;
if (Ae) {
var Ue = (c.y1 + c.y2) / 2, Ze = c.x1, Me = c.x2;
n.segpts = [Ze, Ue, Me, Ue];
} else if (Be) {
var rt = (c.x1 + c.x2) / 2, nt = c.y1, st = c.y2;
n.segpts = [rt, nt, rt, st];
} else
n.segpts = [c.x2, c.y1];
}
else if (I) {
var P = c.y1 + Q + (m ? f / 2 * q : 0), j = c.x1, se = c.x2;
n.segpts = [j, P, se, P];
} else {
var ce = c.x1 + Q + (m ? d / 2 * q : 0), de = c.y1, Oe = c.y2;
n.segpts = [ce, de, ce, Oe];
}
if (n.isRound) {
var ye = e.pstyle("taxi-radius").value, Fe = e.pstyle("radius-type").value[0] === "arc-radius";
n.radii = new Array(n.segpts.length / 2).fill(ye), n.isArcRadius = new Array(n.segpts.length / 2).fill(Fe);
}
};
vr.tryToCorrectInvalidPoints = function(e, t) {
var n = e._private.rscratch;
if (n.edgeType === "bezier") {
var r = t.srcPos, o = t.tgtPos, a = t.srcW, i = t.srcH, s = t.tgtW, u = t.tgtH, l = t.srcShape, c = t.tgtShape, d = t.srcCornerRadius, f = t.tgtCornerRadius, h = t.srcRs, p = t.tgtRs, v = !Ve(n.startX) || !Ve(n.startY), m = !Ve(n.arrowStartX) || !Ve(n.arrowStartY), g = !Ve(n.endX) || !Ve(n.endY), b = !Ve(n.arrowEndX) || !Ve(n.arrowEndY), x = 3, w = this.getArrowWidth(e.pstyle("width").pfValue, e.pstyle("arrow-scale").value) * this.arrowShapeWidth, C = x * w, k = bs({
x: n.ctrlpts[0],
y: n.ctrlpts[1]
}, {
x: n.startX,
y: n.startY
}), E = k < C, S = bs({
x: n.ctrlpts[0],
y: n.ctrlpts[1]
}, {
x: n.endX,
y: n.endY
}), O = S < C, F = !1;
if (v || m || E) {
F = !0;
var $ = {
// delta
x: n.ctrlpts[0] - r.x,
y: n.ctrlpts[1] - r.y
}, A = Math.sqrt($.x * $.x + $.y * $.y), L = {
// normalised delta
x: $.x / A,
y: $.y / A
}, N = Math.max(a, i), M = {
// *2 radius guarantees outside shape
x: n.ctrlpts[0] + L.x * 2 * N,
y: n.ctrlpts[1] + L.y * 2 * N
}, I = l.intersectLine(r.x, r.y, a, i, M.x, M.y, 0, d, h);
E ? (n.ctrlpts[0] = n.ctrlpts[0] + L.x * (C - k), n.ctrlpts[1] = n.ctrlpts[1] + L.y * (C - k)) : (n.ctrlpts[0] = I[0] + L.x * C, n.ctrlpts[1] = I[1] + L.y * C);
}
if (g || b || O) {
F = !0;
var z = {
// delta
x: n.ctrlpts[0] - o.x,
y: n.ctrlpts[1] - o.y
}, R = Math.sqrt(z.x * z.x + z.y * z.y), q = {
// normalised delta
x: z.x / R,
y: z.y / R
}, oe = Math.max(a, i), Q = {
// *2 radius guarantees outside shape
x: n.ctrlpts[0] + q.x * 2 * oe,
y: n.ctrlpts[1] + q.y * 2 * oe
}, ae = c.intersectLine(o.x, o.y, s, u, Q.x, Q.y, 0, f, p);
O ? (n.ctrlpts[0] = n.ctrlpts[0] + q.x * (C - S), n.ctrlpts[1] = n.ctrlpts[1] + q.y * (C - S)) : (n.ctrlpts[0] = ae[0] + q.x * C, n.ctrlpts[1] = ae[1] + q.y * C);
}
F && this.findEndpoints(e);
}
};
vr.storeAllpts = function(e) {
var t = e._private.rscratch;
if (t.edgeType === "multibezier" || t.edgeType === "bezier" || t.edgeType === "self" || t.edgeType === "compound") {
t.allpts = [], t.allpts.push(t.startX, t.startY);
for (var n = 0; n + 1 < t.ctrlpts.length; n += 2)
t.allpts.push(t.ctrlpts[n], t.ctrlpts[n + 1]), n + 3 < t.ctrlpts.length && t.allpts.push((t.ctrlpts[n] + t.ctrlpts[n + 2]) / 2, (t.ctrlpts[n + 1] + t.ctrlpts[n + 3]) / 2);
t.allpts.push(t.endX, t.endY);
var r, o;
t.ctrlpts.length / 2 % 2 === 0 ? (r = t.allpts.length / 2 - 1, t.midX = t.allpts[r], t.midY = t.allpts[r + 1]) : (r = t.allpts.length / 2 - 3, o = 0.5, t.midX = Mn(t.allpts[r], t.allpts[r + 2], t.allpts[r + 4], o), t.midY = Mn(t.allpts[r + 1], t.allpts[r + 3], t.allpts[r + 5], o));
} else if (t.edgeType === "straight")
t.allpts = [t.startX, t.startY, t.endX, t.endY], t.midX = (t.startX + t.endX + t.arrowStartX + t.arrowEndX) / 4, t.midY = (t.startY + t.endY + t.arrowStartY + t.arrowEndY) / 4;
else if (t.edgeType === "segments") {
if (t.allpts = [], t.allpts.push(t.startX, t.startY), t.allpts.push.apply(t.allpts, t.segpts), t.allpts.push(t.endX, t.endY), t.isRound) {
t.roundCorners = [];
for (var a = 2; a + 3 < t.allpts.length; a += 2) {
var i = t.radii[a / 2 - 1], s = t.isArcRadius[a / 2 - 1];
t.roundCorners.push(Iy({
x: t.allpts[a - 2],
y: t.allpts[a - 1]
}, {
x: t.allpts[a],
y: t.allpts[a + 1],
radius: i
}, {
x: t.allpts[a + 2],
y: t.allpts[a + 3]
}, i, s));
}
}
if (t.segpts.length % 4 === 0) {
var u = t.segpts.length / 2, l = u - 2;
t.midX = (t.segpts[l] + t.segpts[u]) / 2, t.midY = (t.segpts[l + 1] + t.segpts[u + 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;
}
}
}
};
vr.checkForInvalidEdgeWarning = function(e) {
var t = e[0]._private.rscratch;
t.nodesOverlap || Ve(t.startX) && Ve(t.startY) && Ve(t.endX) && Ve(t.endY) ? t.loggedErr = !1 : t.loggedErr || (t.loggedErr = !0, Mt("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."));
};
vr.findEdgeControlPoints = function(e) {
var t = this;
if (!(!e || e.length === 0)) {
for (var n = this, r = n.cy, o = r.hasCompoundNodes(), a = {
map: new Go(),
get: function(k) {
var E = this.map.get(k[0]);
return E != null ? E.get(k[1]) : null;
},
set: function(k, E) {
var S = this.map.get(k[0]);
S == null && (S = new Go(), this.map.set(k[0], S)), S.set(k[1], E);
}
}, i = [], s = [], u = 0; u < e.length; u++) {
var l = e[u], c = l._private, d = l.pstyle("curve-style").value;
if (!(l.removed() || !l.takesUpSpace())) {
if (d === "haystack") {
s.push(l);
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(), b = [m, g].sort(), x = a.get(b);
x == null && (x = {
eles: []
}, a.set(b, x), i.push(b)), x.eles.push(l), f && (x.hasUnbundled = !0), h && (x.hasBezier = !0);
}
}
for (var w = function(k) {
var E = i[k], S = a.get(E), O = void 0;
if (!S.hasUnbundled) {
var F = S.eles[0].parallelEdges().filter(function(se) {
return se.isBundledBezier();
});
yy(S.eles), F.forEach(function(se) {
return S.eles.push(se);
}), S.eles.sort(function(se, ce) {
return se.poolIndex() - ce.poolIndex();
});
}
var $ = S.eles[0], A = $.source(), L = $.target();
if (A.poolIndex() > L.poolIndex()) {
var N = A;
A = L, L = N;
}
var M = S.srcPos = A.position(), I = S.tgtPos = L.position(), z = S.srcW = A.outerWidth(), R = S.srcH = A.outerHeight(), q = S.tgtW = L.outerWidth(), oe = S.tgtH = L.outerHeight(), Q = S.srcShape = n.nodeShapes[t.getNodeShape(A)], ae = S.tgtShape = n.nodeShapes[t.getNodeShape(L)], pe = S.srcCornerRadius = A.pstyle("corner-radius").value === "auto" ? "auto" : A.pstyle("corner-radius").pfValue, we = S.tgtCornerRadius = L.pstyle("corner-radius").value === "auto" ? "auto" : L.pstyle("corner-radius").pfValue, ke = S.tgtRs = L._private.rscratch, fe = S.srcRs = A._private.rscratch;
S.dirCounts = {
north: 0,
west: 0,
south: 0,
east: 0,
northwest: 0,
southwest: 0,
northeast: 0,
southeast: 0
};
for (var ge = 0; ge < S.eles.length; ge++) {
var J = S.eles[ge], te = J[0]._private.rscratch, le = J.pstyle("curve-style").value, Ee = le === "unbundled-bezier" || le.endsWith("segments") || le.endsWith("taxi"), Ne = !A.same(J.source());
if (!S.calculatedIntersection && A !== L && (S.hasBezier || S.hasUnbundled)) {
S.calculatedIntersection = !0;
var je = Q.intersectLine(M.x, M.y, z, R, I.x, I.y, 0, pe, fe), _e = S.srcIntn = je, De = ae.intersectLine(I.x, I.y, q, oe, M.x, M.y, 0, we, ke), Ae = S.tgtIntn = De, Be = S.intersectionPts = {
x1: je[0],
x2: De[0],
y1: je[1],
y2: De[1]
}, Ue = S.posPts = {
x1: M.x,
x2: I.x,
y1: M.y,
y2: I.y
}, Ze = De[1] - je[1], Me = De[0] - je[0], rt = Math.sqrt(Me * Me + Ze * Ze), nt = S.vector = {
x: Me,
y: Ze
}, st = S.vectorNorm = {
x: nt.x / rt,
y: nt.y / rt
}, P = {
x: -st.y,
y: st.x
};
S.nodesOverlap = !Ve(rt) || ae.checkPoint(je[0], je[1], 0, q, oe, I.x, I.y, we, ke) || Q.checkPoint(De[0], De[1], 0, z, R, M.x, M.y, pe, fe), S.vectorNormInverse = P, O = {
nodesOverlap: S.nodesOverlap,
dirCounts: S.dirCounts,
calculatedIntersection: !0,
hasBezier: S.hasBezier,
hasUnbundled: S.hasUnbundled,
eles: S.eles,
srcPos: I,
tgtPos: M,
srcW: q,
srcH: oe,
tgtW: z,
tgtH: R,
srcIntn: Ae,
tgtIntn: _e,
srcShape: ae,
tgtShape: Q,
posPts: {
x1: Ue.x2,
y1: Ue.y2,
x2: Ue.x1,
y2: Ue.y1
},
intersectionPts: {
x1: Be.x2,
y1: Be.y2,
x2: Be.x1,
y2: Be.y1
},
vector: {
x: -nt.x,
y: -nt.y
},
vectorNorm: {
x: -st.x,
y: -st.y
},
vectorNormInverse: {
x: -P.x,
y: -P.y
}
};
}
var j = Ne ? O : S;
te.nodesOverlap = j.nodesOverlap, te.srcIntn = j.srcIntn, te.tgtIntn = j.tgtIntn, te.isRound = le.startsWith("round"), o && (A.isParent() || A.isChild() || L.isParent() || L.isChild()) && (A.parents().anySame(L) || L.parents().anySame(A) || A.same(L) && A.isParent()) ? t.findCompoundLoopPoints(J, j, ge, Ee) : A === L ? t.findLoopPoints(J, j, ge, Ee) : le.endsWith("segments") ? t.findSegmentsPoints(J, j) : le.endsWith("taxi") ? t.findTaxiPoints(J, j) : le === "straight" || !Ee && S.eles.length % 2 === 1 && ge === Math.floor(S.eles.length / 2) ? t.findStraightEdgePoints(J) : t.findBezierPoints(J, j, ge, Ee, Ne), t.findEndpoints(J), t.tryToCorrectInvalidPoints(J, j), t.checkForInvalidEdgeWarning(J), t.storeAllpts(J), t.storeEdgeProjections(J), t.calculateArrowAngles(J), t.recalculateEdgeLabelProjections(J), t.calculateLabelAngles(J);
}
}, C = 0; C < i.length; C++)
w(C);
this.findHaystackPoints(s);
}
};
function c_(e) {
var t = [];
if (e != null) {
for (var n = 0; n < e.length; n += 2) {
var r = e[n], o = e[n + 1];
t.push({
x: r,
y: o
});
}
return t;
}
}
vr.getSegmentPoints = function(e) {
var t = e[0]._private.rscratch, n = t.edgeType;
if (n === "segments")
return this.recalculateRenderedStyle(e), c_(t.segpts);
};
vr.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), c_(t.ctrlpts);
};
vr.getEdgeMidpoint = function(e) {
var t = e[0]._private.rscratch;
return this.recalculateRenderedStyle(e), {
x: t.midX,
y: t.midY
};
};
var rd = {};
rd.manualEndptToPx = function(e, t) {
var n = this, r = e.position(), o = e.outerWidth(), a = e.outerHeight(), i = e._private.rscratch;
if (t.value.length === 2) {
var s = [t.pfValue[0], t.pfValue[1]];
return t.units[0] === "%" && (s[0] = s[0] * o), t.units[1] === "%" && (s[1] = s[1] * a), s[0] += r.x, s[1] += r.y, s;
} else {
var u = t.pfValue[0];
u = -Math.PI / 2 + u;
var l = 2 * Math.max(o, a), c = [r.x + Math.cos(u) * l, r.y + Math.sin(u) * l];
return n.nodeShapes[this.getNodeShape(e)].intersectLine(r.x, r.y, o, a, c[0], c[1], 0, e.pstyle("corner-radius").value === "auto" ? "auto" : e.pstyle("corner-radius").pfValue, i);
}
};
rd.findEndpoints = function(e) {
var t = this, n, r = e.source()[0], o = e.target()[0], a = r.position(), i = o.position(), s = e.pstyle("target-arrow-shape").value, u = e.pstyle("source-arrow-shape").value, l = e.pstyle("target-distance-from-node").pfValue, c = e.pstyle("source-distance-from-node").pfValue, d = r._private.rscratch, f = o._private.rscratch, h = e.pstyle("curve-style").value, p = e._private.rscratch, v = p.edgeType, m = h === "taxi", g = v === "self" || v === "compound", b = v === "bezier" || v === "multibezier" || g, x = v !== "bezier", w = v === "straight" || v === "segments", C = v === "segments", k = b || x || w, E = g || m, S = e.pstyle("source-endpoint"), O = E ? "outside-to-node" : S.value, F = r.pstyle("corner-radius").value === "auto" ? "auto" : r.pstyle("corner-radius").pfValue, $ = e.pstyle("target-endpoint"), A = E ? "outside-to-node" : $.value, L = o.pstyle("corner-radius").value === "auto" ? "auto" : o.pstyle("corner-radius").pfValue;
p.srcManEndpt = S, p.tgtManEndpt = $;
var N, M, I, z;
if (b) {
var R = [p.ctrlpts[0], p.ctrlpts[1]], q = x ? [p.ctrlpts[p.ctrlpts.length - 2], p.ctrlpts[p.ctrlpts.length - 1]] : R;
N = q, M = R;
} else if (w) {
var oe = C ? p.segpts.slice(0, 2) : [i.x, i.y], Q = C ? p.segpts.slice(p.segpts.length - 2) : [a.x, a.y];
N = Q, M = oe;
}
if (A === "inside-to-node")
n = [i.x, i.y];
else if ($.units)
n = this.manualEndptToPx(o, $);
else if (A === "outside-to-line")
n = p.tgtIntn;
else if (A === "outside-to-node" || A === "outside-to-node-or-label" ? I = N : (A === "outside-to-line" || A === "outside-to-line-or-label") && (I = [a.x, a.y]), n = t.nodeShapes[this.getNodeShape(o)].intersectLine(i.x, i.y, o.outerWidth(), o.outerHeight(), I[0], I[1], 0, L, f), A === "outside-to-node-or-label" || A === "outside-to-line-or-label") {
var ae = o._private.rscratch, pe = ae.labelWidth, we = ae.labelHeight, ke = ae.labelX, fe = ae.labelY, ge = pe / 2, J = we / 2, te = o.pstyle("text-valign").value;
te === "top" ? fe -= J : te === "bottom" && (fe += J);
var le = o.pstyle("text-halign").value;
le === "left" ? ke -= ge : le === "right" && (ke += ge);
var Ee = bc(I[0], I[1], [ke - ge, fe - J, ke + ge, fe - J, ke + ge, fe + J, ke - ge, fe + J], i.x, i.y);
if (Ee.length > 0) {
var Ne = a, je = zi(Ne, tl(n)), _e = zi(Ne, tl(Ee)), De = je;
if (_e < je && (n = Ee, De = _e), Ee.length > 2) {
var Ae = zi(Ne, {
x: Ee[2],
y: Ee[3]
});
Ae < De && (n = [Ee[2], Ee[3]]);
}
}
}
var Be = zd(n, N, t.arrowShapes[s].spacing(e) + l), Ue = zd(n, N, t.arrowShapes[s].gap(e) + l);
if (p.endX = Ue[0], p.endY = Ue[1], p.arrowEndX = Be[0], p.arrowEndY = Be[1], O === "inside-to-node")
n = [a.x, a.y];
else if (S.units)
n = this.manualEndptToPx(r, S);
else if (O === "outside-to-line")
n = p.srcIntn;
else if (O === "outside-to-node" || O === "outside-to-node-or-label" ? z = M : (O === "outside-to-line" || O === "outside-to-line-or-label") && (z = [i.x, i.y]), n = t.nodeShapes[this.getNodeShape(r)].intersectLine(a.x, a.y, r.outerWidth(), r.outerHeight(), z[0], z[1], 0, F, d), O === "outside-to-node-or-label" || O === "outside-to-line-or-label") {
var Ze = r._private.rscratch, Me = Ze.labelWidth, rt = Ze.labelHeight, nt = Ze.labelX, st = Ze.labelY, P = Me / 2, j = rt / 2, se = r.pstyle("text-valign").value;
se === "top" ? st -= j : se === "bottom" && (st += j);
var ce = r.pstyle("text-halign").value;
ce === "left" ? nt -= P : ce === "right" && (nt += P);
var de = bc(z[0], z[1], [nt - P, st - j, nt + P, st - j, nt + P, st + j, nt - P, st + j], a.x, a.y);
if (de.length > 0) {
var Oe = i, ye = zi(Oe, tl(n)), Fe = zi(Oe, tl(de)), Ye = ye;
if (Fe < ye && (n = [de[0], de[1]], Ye = Fe), de.length > 2) {
var Je = zi(Oe, {
x: de[2],
y: de[3]
});
Je < Ye && (n = [de[2], de[3]]);
}
}
}
var re = zd(n, M, t.arrowShapes[u].spacing(e) + c), Se = zd(n, M, t.arrowShapes[u].gap(e) + c);
p.startX = Se[0], p.startY = Se[1], p.arrowStartX = re[0], p.arrowStartY = re[1], k && (!Ve(p.startX) || !Ve(p.startY) || !Ve(p.endX) || !Ve(p.endY) ? p.badLine = !0 : p.badLine = !1);
};
rd.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
};
}
};
rd.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 Ny = {};
function Jce(e, t, n) {
for (var r = function(u, l, c, d) {
return Mn(u, l, c, d);
}, o = t._private, a = o.rstyle.bezierPts, i = 0; i < e.bezierProjPcts.length; i++) {
var s = e.bezierProjPcts[i];
a.push({
x: r(n[0], n[2], n[4], s),
y: r(n[1], n[3], n[5], s)
});
}
}
Ny.storeEdgeProjections = function(e) {
var t = e._private, n = t.rscratch, r = n.edgeType;
if (t.rstyle.bezierPts = null, t.rstyle.linePts = null, t.rstyle.haystackPts = null, r === "multibezier" || r === "bezier" || r === "self" || r === "compound") {
t.rstyle.bezierPts = [];
for (var o = 0; o + 5 < n.allpts.length; o += 4)
Jce(this, e, n.allpts.slice(o, o + 6));
} else if (r === "segments")
for (var a = t.rstyle.linePts = [], o = 0; o + 1 < n.allpts.length; o += 2)
a.push({
x: n.allpts[o],
y: n.allpts[o + 1]
});
else if (r === "haystack") {
var i = n.haystackPts;
t.rstyle.haystackPts = [{
x: i[0],
y: i[1]
}, {
x: i[2],
y: i[3]
}];
}
t.rstyle.arrowWidth = this.getArrowWidth(e.pstyle("width").pfValue, e.pstyle("arrow-scale").value) * this.arrowShapeWidth;
};
Ny.recalculateEdgeProjections = function(e) {
this.findEdgeControlPoints(e);
};
var sa = {};
sa.recalculateNodeLabelProjection = function(e) {
var t = e.pstyle("label").strValue;
if (!mi(t)) {
var n, r, o = e._private, a = e.width(), i = e.height(), s = e.padding(), u = e.position(), l = e.pstyle("text-halign").strValue, c = e.pstyle("text-valign").strValue, d = o.rscratch, f = o.rstyle;
switch (l) {
case "left":
n = u.x - a / 2 - s;
break;
case "right":
n = u.x + a / 2 + s;
break;
default:
n = u.x;
}
switch (c) {
case "top":
r = u.y - i / 2 - s;
break;
case "bottom":
r = u.y + i / 2 + s;
break;
default:
r = u.y;
}
d.labelX = n, d.labelY = r, f.labelX = n, f.labelY = r, this.calculateLabelAngles(e), this.applyLabelDimensions(e);
}
};
var d_ = function(e, t) {
var n = Math.atan(t / e);
return e === 0 && n < 0 && (n = n * -1), n;
}, p_ = function(e, t) {
var n = t.x - e.x, r = t.y - e.y;
return d_(n, r);
}, Qce = function(e, t, n, r) {
var o = yc(0, r - 1e-3, 1), a = yc(0, r + 1e-3, 1), i = al(e, t, n, o), s = al(e, t, n, a);
return p_(i, s);
};
sa.recalculateEdgeLabelProjections = function(e) {
var t, n = e._private, r = n.rscratch, o = this, a = {
mid: e.pstyle("label").strValue,
source: e.pstyle("source-label").strValue,
target: e.pstyle("target-label").strValue
};
if (a.mid || a.source || a.target) {
t = {
x: r.midX,
y: r.midY
};
var i = function(c, d, f) {
ei(n.rscratch, c, d, f), ei(n.rstyle, c, d, f);
};
i("labelX", null, t.x), i("labelY", null, t.y);
var s = d_(r.midDispX, r.midDispY);
i("labelAutoAngle", null, s);
var u = 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 = o.bezierProjPcts.length;
function b(E, S, O, F, $) {
var A = bs(S, O), L = E.segments[E.segments.length - 1], N = {
p0: S,
p1: O,
t0: F,
t1: $,
startDist: L ? L.startDist + L.length : 0,
length: A
};
E.segments.push(N), E.length += A;
}
for (var x = 0; x < d.length; x++) {
var w = d[x], C = d[x - 1];
C && (w.startDist = C.startDist + C.length), b(w, w.p0, m[x * g], 0, o.bezierProjPcts[0]);
for (var k = 0; k < g - 1; k++)
b(w, m[x * g + k], m[x * g + k + 1], o.bezierProjPcts[k], o.bezierProjPcts[k + 1]);
b(w, m[x * g + g - 1], w.p2, o.bezierProjPcts[g - 1], 1);
}
return c.cache = d;
}, l = function(c) {
var d, f = c === "source";
if (a[c]) {
var h = e.pstyle(c + "-text-offset").pfValue;
switch (r.edgeType) {
case "self":
case "compound":
case "bezier":
case "multibezier": {
for (var p = u(), v, m = 0, g = 0, b = 0; b < p.length; b++) {
for (var x = p[f ? b : p.length - 1 - b], w = 0; w < x.segments.length; w++) {
var C = x.segments[f ? w : x.segments.length - 1 - w], k = b === p.length - 1 && w === x.segments.length - 1;
if (m = g, g += C.length, g >= h || k) {
v = {
cp: x,
segment: C
};
break;
}
}
if (v)
break;
}
var E = v.cp, S = v.segment, O = (h - m) / S.length, F = S.t1 - S.t0, $ = f ? S.t0 + F * O : S.t1 - F * O;
$ = yc(0, $, 1), t = al(E.p0, E.p1, E.p2, $), d = Qce(E.p0, E.p1, E.p2, $);
break;
}
case "straight":
case "segments":
case "haystack": {
for (var A = 0, L, N, M, I, z = r.allpts.length, R = 0; R + 3 < z && (f ? (M = {
x: r.allpts[R],
y: r.allpts[R + 1]
}, I = {
x: r.allpts[R + 2],
y: r.allpts[R + 3]
}) : (M = {
x: r.allpts[z - 2 - R],
y: r.allpts[z - 1 - R]
}, I = {
x: r.allpts[z - 4 - R],
y: r.allpts[z - 3 - R]
}), L = bs(M, I), N = A, A += L, !(A >= h)); R += 2)
;
var q = h - N, oe = q / L;
oe = yc(0, oe, 1), t = oie(M, I, oe), d = p_(M, I);
break;
}
}
i("labelX", c, t.x), i("labelY", c, t.y), i("labelAutoAngle", c, d);
}
};
l("source"), l("target"), this.applyLabelDimensions(e);
}
};
sa.applyLabelDimensions = function(e) {
this.applyPrefixedLabelDimensions(e), e.isEdge() && (this.applyPrefixedLabelDimensions(e, "source"), this.applyPrefixedLabelDimensions(e, "target"));
};
sa.applyPrefixedLabelDimensions = function(e, t) {
var n = e._private, r = this.getLabelText(e, t), o = this.calculateLabelDimensions(e, r), a = e.pstyle("line-height").pfValue, i = e.pstyle("text-wrap").strValue, s = _o(n.rscratch, "labelWrapCachedLines", t) || [], u = i !== "wrap" ? 1 : Math.max(s.length, 1), l = o.height / u, c = l * a, d = o.width, f = o.height + (u - 1) * (a - 1) * l;
ei(n.rstyle, "labelWidth", t, d), ei(n.rscratch, "labelWidth", t, d), ei(n.rstyle, "labelHeight", t, f), ei(n.rscratch, "labelHeight", t, f), ei(n.rscratch, "labelLineHeight", t, c);
};
sa.getLabelText = function(e, t) {
var n = e._private, r = t ? t + "-" : "", o = e.pstyle(r + "label").strValue, a = e.pstyle("text-transform").value, i = function(ae, pe) {
return pe ? (ei(n.rscratch, ae, t, pe), pe) : _o(n.rscratch, ae, t);
};
if (!o)
return "";
a == "none" || (a == "uppercase" ? o = o.toUpperCase() : a == "lowercase" && (o = o.toLowerCase()));
var s = e.pstyle("text-wrap").value;
if (s === "wrap") {
var u = i("labelKey");
if (u != null && i("labelWrapKey") === u)
return i("labelWrapCachedText");
for (var l = "", c = o.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], b = this.calculateLabelDimensions(e, g), x = b.width;
if (h) {
var w = g.split("").join(l);
g = w;
}
if (x > d) {
var C = g.matchAll(v), k = "", E = 0, S = GE(C), O;
try {
for (S.s(); !(O = S.n()).done; ) {
var F = O.value, $ = F[0], A = g.substring(E, F.index);
E = F.index + $.length;
var L = k.length === 0 ? A : k + A + $, N = this.calculateLabelDimensions(e, L), M = N.width;
M <= d ? k += A + $ : (k && p.push(k), k = A + $);
}
} catch (ae) {
S.e(ae);
} finally {
S.f();
}
k.match(/^[\s\u200b]+$/) || p.push(k);
} else
p.push(g);
}
i("labelWrapCachedLines", p), o = i("labelWrapCachedText", p.join(`
`)), i("labelWrapKey", u);
} else if (s === "ellipsis") {
var I = e.pstyle("text-max-width").pfValue, z = "", R = "…", q = !1;
if (this.calculateLabelDimensions(e, o).width < I)
return o;
for (var oe = 0; oe < o.length; oe++) {
var Q = this.calculateLabelDimensions(e, z + o[oe] + R).width;
if (Q > I)
break;
z += o[oe], oe === o.length - 1 && (q = !0);
}
return q || (z += R), z;
}
return o;
};
sa.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;
};
sa.calculateLabelDimensions = function(e, t) {
var n = this, r = n.cy.window(), o = r.document, a = ys(t, e._private.labelDimsKey), i = n.labelDimCache || (n.labelDimCache = []), s = i[a];
if (s != null)
return s;
var u = 0, l = 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 = o.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(l, " ").concat(f, " ").concat(c, "px ").concat(d);
for (var m = 0, g = 0, b = t.split(`
`), x = 0; x < b.length; x++) {
var w = b[x], C = p.measureText(w), k = Math.ceil(C.width), E = c;
m = Math.max(k, m), g += E;
}
return m += u, g += u, i[a] = {
width: m,
height: g
};
};
sa.calculateLabelAngle = function(e, t) {
var n = e._private, r = n.rscratch, o = e.isEdge(), a = t ? t + "-" : "", i = e.pstyle(a + "text-rotation"), s = i.strValue;
return s === "none" ? 0 : o && s === "autorotate" ? r.labelAutoAngle : s === "autorotate" ? 0 : i.pfValue;
};
sa.calculateLabelAngles = function(e) {
var t = this, n = e.isEdge(), r = e._private, o = r.rscratch;
o.labelAngle = t.calculateLabelAngle(e), n && (o.sourceLabelAngle = t.calculateLabelAngle(e, "source"), o.targetLabelAngle = t.calculateLabelAngle(e, "target"));
};
var f_ = {}, ck = 28, dk = !1;
f_.getNodeShape = function(e) {
var t = this, n = e.pstyle("shape").value;
if (n === "cutrectangle" && (e.width() < ck || e.height() < ck))
return dk || (Mt("The `cutrectangle` node shape can not be used at small sizes so `rectangle` is used instead"), dk = !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 Oh = {};
Oh.registerCalculationListeners = function() {
var e = this.cy, t = e.collection(), n = this, r = function(a) {
var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0;
if (t.merge(a), i)
for (var s = 0; s < a.length; s++) {
var u = a[s], l = u._private, c = l.rstyle;
c.clean = !1, c.cleanConnected = !1;
}
};
n.binder(e).on("bounds.* dirty.*", function(a) {
var i = a.target;
r(i);
}).on("style.* background.*", function(a) {
var i = a.target;
r(i, !1);
});
var o = function(a) {
if (a) {
var i = n.onUpdateEleCalcsFns;
t.cleanStyle();
for (var s = 0; s < t.length; s++) {
var u = t[s], l = u._private.rstyle;
u.isNode() && !l.cleanConnected && (r(u.connectedEdges()), l.cleanConnected = !0);
}
if (i)
for (var c = 0; c < i.length; c++) {
var d = i[c];
d(a, t);
}
n.recalculateRenderedStyle(t), t = e.collection();
}
};
n.flushRenderedStyleQueue = function() {
o(!0);
}, n.beforeRender(o, n.beforeRenderPriorities.eleCalcs);
};
Oh.onUpdateEleCalcs = function(e) {
var t = this.onUpdateEleCalcsFns = this.onUpdateEleCalcsFns || [];
t.push(e);
};
Oh.recalculateRenderedStyle = function(e, t) {
var n = function(x) {
return x._private.rstyle.cleanConnected;
}, r = [], o = [];
if (!this.destroyed) {
t === void 0 && (t = !0);
for (var a = 0; a < e.length; a++) {
var i = e[a], s = i._private, u = s.rstyle;
i.isEdge() && (!n(i.source()) || !n(i.target())) && (u.clean = !1), !(t && u.clean || i.removed()) && i.pstyle("display").value !== "none" && (s.group === "nodes" ? o.push(i) : r.push(i), u.clean = !0);
}
for (var l = 0; l < o.length; l++) {
var c = o[l], 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, b = m.rscratch;
g.srcX = b.arrowStartX, g.srcY = b.arrowStartY, g.tgtX = b.arrowEndX, g.tgtY = b.arrowEndY, g.midX = b.midX, g.midY = b.midY, g.labelAngle = b.labelAngle, g.sourceLabelAngle = b.sourceLabelAngle, g.targetLabelAngle = b.targetLabelAngle;
}
}
};
var Ph = {};
Ph.updateCachedGrabbedEles = function() {
var e = this.cachedZSortedEles;
if (e) {
e.drag = [], e.nondrag = [];
for (var t = [], n = 0; n < e.length; n++) {
var r = e[n], o = r._private.rscratch;
r.grabbed() && !r.isParent() ? t.push(r) : o.inDragLayer ? e.drag.push(r) : e.nondrag.push(r);
}
for (var n = 0; n < t.length; n++) {
var r = t[n];
e.drag.push(r);
}
}
};
Ph.invalidateCachedZSortedEles = function() {
this.cachedZSortedEles = null;
};
Ph.getCachedZSortedEles = function(e) {
if (e || !this.cachedZSortedEles) {
var t = this.cy.mutableElements().toArray();
t.sort(YS), t.interactive = t.filter(function(n) {
return n.interactive();
}), this.cachedZSortedEles = t, this.updateCachedGrabbedEles();
} else
t = this.cachedZSortedEles;
return t;
};
var h_ = {};
[Is, uf, vr, rd, Ny, sa, f_, Oh, Ph].forEach(function(e) {
ct(h_, e);
});
var v_ = {};
v_.getCachedImage = function(e, t, n) {
var r = this, o = r.imageCache = r.imageCache || {}, a = o[e];
if (a)
return a.image.complete || a.image.addEventListener("load", n), a.image;
a = o[e] = o[e] || {};
var i = a.image = new Image();
i.addEventListener("load", n), i.addEventListener("error", function() {
i.error = !0;
});
var s = "data:", u = e.substring(0, s.length).toLowerCase() === s;
return u || (t = t === "null" ? null : t, i.crossOrigin = t), i.src = e, i;
};
var eu = {};
eu.registerBinding = function(e, t, n, r) {
var o = Array.prototype.slice.apply(arguments, [1]), a = this.binder(e);
return a.on.apply(a, o);
};
eu.binder = function(e) {
var t = this, n = t.cy.window(), r = e === n || e === n.document || e === n.document.body || Eoe(e);
if (t.supportsPassiveEvents == null) {
var o = !1;
try {
var a = Object.defineProperty({}, "passive", {
get: function() {
return o = !0, !0;
}
});
n.addEventListener("test", null, a);
} catch {
}
t.supportsPassiveEvents = o;
}
var i = function(s, u, l) {
var c = Array.prototype.slice.call(arguments);
return r && t.supportsPassiveEvents && (c[2] = {
capture: l ?? !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
};
};
eu.nodeIsDraggable = function(e) {
return e && e.isNode() && !e.locked() && e.grabbable();
};
eu.nodeIsGrabbable = function(e) {
return this.nodeIsDraggable(e) && e.interactive();
};
eu.load = function() {
var e = this, t = e.cy.window(), n = function(P) {
return P.selected();
}, r = function(P, j, se, ce) {
P == null && (P = e.cy);
for (var de = 0; de < j.length; de++) {
var Oe = j[de];
P.emit({
originalEvent: se,
type: Oe,
position: ce
});
}
}, o = function(P) {
return P.shiftKey || P.metaKey || P.ctrlKey;
}, a = function(P, j) {
var se = !0;
if (e.cy.hasCompoundNodes() && P && P.pannable())
for (var ce = 0; j && ce < j.length; ce++) {
var P = j[ce];
if (P.isNode() && P.isParent() && !P.pannable()) {
se = !1;
break;
}
}
else
se = !0;
return se;
}, i = function(P) {
P[0]._private.grabbed = !0;
}, s = function(P) {
P[0]._private.grabbed = !1;
}, u = function(P) {
P[0]._private.rscratch.inDragLayer = !0;
}, l = function(P) {
P[0]._private.rscratch.inDragLayer = !1;
}, c = function(P) {
P[0]._private.rscratch.isGrabTarget = !0;
}, d = function(P) {
P[0]._private.rscratch.isGrabTarget = !1;
}, f = function(P, j) {
var se = j.addToList, ce = se.has(P);
!ce && P.grabbable() && !P.locked() && (se.merge(P), i(P));
}, h = function(P, j) {
if (P.cy().hasCompoundNodes() && !(j.inDragLayer == null && j.addToList == null)) {
var se = P.descendants();
j.inDragLayer && (se.forEach(u), se.connectedEdges().forEach(u)), j.addToList && f(se, j);
}
}, p = function(P, j) {
j = j || {};
var se = P.cy().hasCompoundNodes();
j.inDragLayer && (P.forEach(u), P.neighborhood().stdFilter(function(ce) {
return !se || ce.isEdge();
}).forEach(u)), j.addToList && P.forEach(function(ce) {
f(ce, j);
}), h(P, j), g(P, {
inDragLayer: j.inDragLayer
}), e.updateCachedGrabbedEles();
}, v = p, m = function(P) {
P && (e.getCachedZSortedEles().forEach(function(j) {
s(j), l(j), d(j);
}), e.updateCachedGrabbedEles());
}, g = function(P, j) {
if (!(j.inDragLayer == null && j.addToList == null) && P.cy().hasCompoundNodes()) {
var se = P.ancestors().orphans();
if (!se.same(P)) {
var ce = se.descendants().spawnSelf().merge(se).unmerge(P).unmerge(P.descendants()), de = ce.connectedEdges();
j.inDragLayer && (de.forEach(u), ce.forEach(u)), j.addToList && ce.forEach(function(Oe) {
f(Oe, j);
});
}
}
}, b = function() {
document.activeElement != null && document.activeElement.blur != null && document.activeElement.blur();
}, x = typeof MutationObserver < "u", w = typeof ResizeObserver < "u";
x ? (e.removeObserver = new MutationObserver(function(P) {
for (var j = 0; j < P.length; j++) {
var se = P[j], ce = se.removedNodes;
if (ce)
for (var de = 0; de < ce.length; de++) {
var Oe = ce[de];
if (Oe === e.container) {
e.destroy();
break;
}
}
}
}), e.container.parentNode && e.removeObserver.observe(e.container.parentNode, {
childList: !0
})) : e.registerBinding(e.container, "DOMNodeRemoved", function(P) {
e.destroy();
});
var C = hh(function() {
e.cy.resize();
}, 100);
x && (e.styleObserver = new MutationObserver(C), e.styleObserver.observe(e.container, {
attributes: !0
})), e.registerBinding(t, "resize", C), w && (e.resizeObserver = new ResizeObserver(C), e.resizeObserver.observe(e.container));
var k = function(P, j) {
for (; P != null; )
j(P), P = P.parentNode;
}, E = function() {
e.invalidateContainerClientCoordsCache();
};
k(e.container, function(P) {
e.registerBinding(P, "transitionend", E), e.registerBinding(P, "animationend", E), e.registerBinding(P, "scroll", E);
}), e.registerBinding(e.container, "contextmenu", function(P) {
P.preventDefault();
});
var S = function() {
return e.selection[4] !== 0;
}, O = function(P) {
for (var j = e.findContainerClientCoords(), se = j[0], ce = j[1], de = j[2], Oe = j[3], ye = P.touches ? P.touches : [P], Fe = !1, Ye = 0; Ye < ye.length; Ye++) {
var Je = ye[Ye];
if (se <= Je.clientX && Je.clientX <= se + de && ce <= Je.clientY && Je.clientY <= ce + Oe) {
Fe = !0;
break;
}
}
if (!Fe)
return !1;
for (var re = e.container, Se = P.target, be = Se.parentNode, Le = !1; be; ) {
if (be === re) {
Le = !0;
break;
}
be = be.parentNode;
}
return !!Le;
};
e.registerBinding(e.container, "mousedown", function(P) {
if (O(P) && !(e.hoverData.which === 1 && P.which !== 1)) {
P.preventDefault(), b(), e.hoverData.capture = !0, e.hoverData.which = P.which;
var j = e.cy, se = [P.clientX, P.clientY], ce = e.projectIntoViewport(se[0], se[1]), de = e.selection, Oe = e.findNearestElements(ce[0], ce[1], !0, !1), ye = Oe[0], Fe = e.dragData.possibleDragElements;
e.hoverData.mdownPos = ce, e.hoverData.mdownGPos = se;
var Ye = 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: P,
type: "taphold",
position: {
x: ce[0],
y: ce[1]
}
}) : j.emit({
originalEvent: P,
type: "taphold",
position: {
x: ce[0],
y: ce[1]
}
});
}
}, e.tapholdDuration);
};
if (P.which == 3) {
e.hoverData.cxtStarted = !0;
var Je = {
originalEvent: P,
type: "cxttapstart",
position: {
x: ce[0],
y: ce[1]
}
};
ye ? (ye.activate(), ye.emit(Je), e.hoverData.down = ye) : j.emit(Je), e.hoverData.downTime = (/* @__PURE__ */ new Date()).getTime(), e.hoverData.cxtDragged = !1;
} else if (P.which == 1) {
ye && ye.activate();
{
if (ye != null && e.nodeIsGrabbable(ye)) {
var re = function(Le) {
return {
originalEvent: P,
type: Le,
position: {
x: ce[0],
y: ce[1]
}
};
}, Se = function(Le) {
Le.emit(re("grab"));
};
if (c(ye), !ye.selected())
Fe = e.dragData.possibleDragElements = j.collection(), v(ye, {
addToList: Fe
}), ye.emit(re("grabon")).emit(re("grab"));
else {
Fe = e.dragData.possibleDragElements = j.collection();
var be = j.$(function(Le) {
return Le.isNode() && Le.selected() && e.nodeIsGrabbable(Le);
});
p(be, {
addToList: Fe
}), ye.emit(re("grabon")), be.forEach(Se);
}
e.redrawHint("eles", !0), e.redrawHint("drag", !0);
}
e.hoverData.down = ye, e.hoverData.downs = Oe, e.hoverData.downTime = (/* @__PURE__ */ new Date()).getTime();
}
r(ye, ["mousedown", "tapstart", "vmousedown"], P, {
x: ce[0],
y: ce[1]
}), ye == null ? (de[4] = 1, e.data.bgActivePosistion = {
x: ce[0],
y: ce[1]
}, e.redrawHint("select", !0), e.redraw()) : ye.pannable() && (de[4] = 1), Ye();
}
de[0] = de[2] = ce[0], de[1] = de[3] = ce[1];
}
}, !1), e.registerBinding(t, "mousemove", function(P) {
var j = e.hoverData.capture;
if (!(!j && !O(P))) {
var se = !1, ce = e.cy, de = ce.zoom(), Oe = [P.clientX, P.clientY], ye = e.projectIntoViewport(Oe[0], Oe[1]), Fe = e.hoverData.mdownPos, Ye = e.hoverData.mdownGPos, Je = e.selection, re = null;
!e.hoverData.draggingEles && !e.hoverData.dragging && !e.hoverData.selecting && (re = e.findNearestElement(ye[0], ye[1], !0, !1));
var Se = e.hoverData.last, be = e.hoverData.down, Le = [ye[0] - Je[2], ye[1] - Je[3]], Tt = e.dragData.possibleDragElements, Ct;
if (Ye) {
var Dt = Oe[0] - Ye[0], Vt = Dt * Dt, qt = Oe[1] - Ye[1], bn = qt * qt, an = Vt + bn;
e.hoverData.isOverThresholdDrag = Ct = an >= e.desktopTapThreshold2;
}
var sn = o(P);
Ct && (e.hoverData.tapholdCancelled = !0);
var wn = function() {
var ar = e.hoverData.dragDelta = e.hoverData.dragDelta || [];
ar.length === 0 ? (ar.push(Le[0]), ar.push(Le[1])) : (ar[0] += Le[0], ar[1] += Le[1]);
};
se = !0, r(re, ["mousemove", "vmousemove", "tapdrag"], P, {
x: ye[0],
y: ye[1]
});
var xn = function() {
e.data.bgActivePosistion = void 0, e.hoverData.selecting || ce.emit({
originalEvent: P,
type: "boxstart",
position: {
x: ye[0],
y: ye[1]
}
}), Je[4] = 1, e.hoverData.selecting = !0, e.redrawHint("select", !0), e.redraw();
};
if (e.hoverData.which === 3) {
if (Ct) {
var mn = {
originalEvent: P,
type: "cxtdrag",
position: {
x: ye[0],
y: ye[1]
}
};
be ? be.emit(mn) : ce.emit(mn), e.hoverData.cxtDragged = !0, (!e.hoverData.cxtOver || re !== e.hoverData.cxtOver) && (e.hoverData.cxtOver && e.hoverData.cxtOver.emit({
originalEvent: P,
type: "cxtdragout",
position: {
x: ye[0],
y: ye[1]
}
}), e.hoverData.cxtOver = re, re && re.emit({
originalEvent: P,
type: "cxtdragover",
position: {
x: ye[0],
y: ye[1]
}
}));
}
} else if (e.hoverData.dragging) {
if (se = !0, ce.panningEnabled() && ce.userPanningEnabled()) {
var or;
if (e.hoverData.justStartedPan) {
var Hn = e.hoverData.mdownPos;
or = {
x: (ye[0] - Hn[0]) * de,
y: (ye[1] - Hn[1]) * de
}, e.hoverData.justStartedPan = !1;
} else
or = {
x: Le[0] * de,
y: Le[1] * de
};
ce.panBy(or), ce.emit("dragpan"), e.hoverData.dragged = !0;
}
ye = e.projectIntoViewport(P.clientX, P.clientY);
} else if (Je[4] == 1 && (be == null || be.pannable())) {
if (Ct) {
if (!e.hoverData.dragging && ce.boxSelectionEnabled() && (sn || !ce.panningEnabled() || !ce.userPanningEnabled()))
xn();
else if (!e.hoverData.selecting && ce.panningEnabled() && ce.userPanningEnabled()) {
var Un = a(be, e.hoverData.downs);
Un && (e.hoverData.dragging = !0, e.hoverData.justStartedPan = !0, Je[4] = 0, e.data.bgActivePosistion = tl(Fe), e.redrawHint("select", !0), e.redraw());
}
be && be.pannable() && be.active() && be.unactivate();
}
} else {
if (be && be.pannable() && be.active() && be.unactivate(), (!be || !be.grabbed()) && re != Se && (Se && r(Se, ["mouseout", "tapdragout"], P, {
x: ye[0],
y: ye[1]
}), re && r(re, ["mouseover", "tapdragover"], P, {
x: ye[0],
y: ye[1]
}), e.hoverData.last = re), be)
if (Ct) {
if (ce.boxSelectionEnabled() && sn)
be && be.grabbed() && (m(Tt), be.emit("freeon"), Tt.emit("free"), e.dragData.didDrag && (be.emit("dragfreeon"), Tt.emit("dragfree"))), xn();
else if (be && be.grabbed() && e.nodeIsDraggable(be)) {
var Wt = !e.dragData.didDrag;
Wt && e.redrawHint("eles", !0), e.dragData.didDrag = !0, e.hoverData.draggingEles || p(Tt, {
inDragLayer: !0
});
var ln = {
x: 0,
y: 0
};
if (Ve(Le[0]) && Ve(Le[1]) && (ln.x += Le[0], ln.y += Le[1], Wt)) {
var fn = e.hoverData.dragDelta;
fn && Ve(fn[0]) && Ve(fn[1]) && (ln.x += fn[0], ln.y += fn[1]);
}
e.hoverData.draggingEles = !0, Tt.silentShift(ln).emit("position drag"), e.redrawHint("drag", !0), e.redraw();
}
} else
wn();
se = !0;
}
if (Je[2] = ye[0], Je[3] = ye[1], se)
return P.stopPropagation && P.stopPropagation(), P.preventDefault && P.preventDefault(), !1;
}
}, !1);
var F, $, A;
e.registerBinding(t, "mouseup", function(P) {
if (!(e.hoverData.which === 1 && P.which !== 1 && e.hoverData.capture)) {
var j = e.hoverData.capture;
if (j) {
e.hoverData.capture = !1;
var se = e.cy, ce = e.projectIntoViewport(P.clientX, P.clientY), de = e.selection, Oe = e.findNearestElement(ce[0], ce[1], !0, !1), ye = e.dragData.possibleDragElements, Fe = e.hoverData.down, Ye = o(P);
if (e.data.bgActivePosistion && (e.redrawHint("select", !0), e.redraw()), e.hoverData.tapholdCancelled = !0, e.data.bgActivePosistion = void 0, Fe && Fe.unactivate(), e.hoverData.which === 3) {
var Je = {
originalEvent: P,
type: "cxttapend",
position: {
x: ce[0],
y: ce[1]
}
};
if (Fe ? Fe.emit(Je) : se.emit(Je), !e.hoverData.cxtDragged) {
var re = {
originalEvent: P,
type: "cxttap",
position: {
x: ce[0],
y: ce[1]
}
};
Fe ? Fe.emit(re) : se.emit(re);
}
e.hoverData.cxtDragged = !1, e.hoverData.which = null;
} else if (e.hoverData.which === 1) {
if (r(Oe, ["mouseup", "tapend", "vmouseup"], P, {
x: ce[0],
y: ce[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(Fe, ["click", "tap", "vclick"], P, {
x: ce[0],
y: ce[1]
}), $ = !1, P.timeStamp - A <= se.multiClickDebounceTime() ? (F && clearTimeout(F), $ = !0, A = null, r(Fe, ["dblclick", "dbltap", "vdblclick"], P, {
x: ce[0],
y: ce[1]
})) : (F = setTimeout(function() {
$ || r(Fe, ["oneclick", "onetap", "voneclick"], P, {
x: ce[0],
y: ce[1]
});
}, se.multiClickDebounceTime()), A = P.timeStamp)), Fe == null && !e.dragData.didDrag && !e.hoverData.selecting && !e.hoverData.dragged && !o(P) && (se.$(n).unselect(["tapunselect"]), ye.length > 0 && e.redrawHint("eles", !0), e.dragData.possibleDragElements = ye = se.collection()), Oe == Fe && !e.dragData.didDrag && !e.hoverData.selecting && Oe != null && Oe._private.selectable && (e.hoverData.dragging || (se.selectionType() === "additive" || Ye ? Oe.selected() ? Oe.unselect(["tapunselect"]) : Oe.select(["tapselect"]) : Ye || (se.$(n).unmerge(Oe).unselect(["tapunselect"]), Oe.select(["tapselect"]))), e.redrawHint("eles", !0)), e.hoverData.selecting) {
var Se = se.collection(e.getAllInBox(de[0], de[1], de[2], de[3]));
e.redrawHint("select", !0), Se.length > 0 && e.redrawHint("eles", !0), se.emit({
type: "boxend",
originalEvent: P,
position: {
x: ce[0],
y: ce[1]
}
});
var be = function(Tt) {
return Tt.selectable() && !Tt.selected();
};
se.selectionType() === "additive" || Ye || se.$(n).unmerge(Se).unselect(), Se.emit("box").stdFilter(be).select().emit("boxselect"), e.redraw();
}
if (e.hoverData.dragging && (e.hoverData.dragging = !1, e.redrawHint("select", !0), e.redrawHint("eles", !0), e.redraw()), !de[4]) {
e.redrawHint("drag", !0), e.redrawHint("eles", !0);
var Le = Fe && Fe.grabbed();
m(ye), Le && (Fe.emit("freeon"), ye.emit("free"), e.dragData.didDrag && (Fe.emit("dragfreeon"), ye.emit("dragfree")));
}
}
de[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 L = function(P) {
if (!e.scrollingPage) {
var j = e.cy, se = j.zoom(), ce = j.pan(), de = e.projectIntoViewport(P.clientX, P.clientY), Oe = [de[0] * se + ce.x, de[1] * se + ce.y];
if (e.hoverData.draggingEles || e.hoverData.dragging || e.hoverData.cxtStarted || S()) {
P.preventDefault();
return;
}
if (j.panningEnabled() && j.userPanningEnabled() && j.zoomingEnabled() && j.userZoomingEnabled()) {
P.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 ye;
P.deltaY != null ? ye = P.deltaY / -250 : P.wheelDeltaY != null ? ye = P.wheelDeltaY / 1e3 : ye = P.wheelDelta / 1e3, ye = ye * e.wheelSensitivity;
var Fe = P.deltaMode === 1;
Fe && (ye *= 33);
var Ye = j.zoom() * Math.pow(10, ye);
P.type === "gesturechange" && (Ye = e.gestureStartZoom * P.scale), j.zoom({
level: Ye,
renderedPosition: {
x: Oe[0],
y: Oe[1]
}
}), j.emit(P.type === "gesturechange" ? "pinchzoom" : "scrollzoom");
}
}
};
e.registerBinding(e.container, "wheel", L, !0), e.registerBinding(t, "scroll", function(P) {
e.scrollingPage = !0, clearTimeout(e.scrollingPageTimeout), e.scrollingPageTimeout = setTimeout(function() {
e.scrollingPage = !1;
}, 250);
}, !0), e.registerBinding(e.container, "gesturestart", function(P) {
e.gestureStartZoom = e.cy.zoom(), e.hasTouchStarted || P.preventDefault();
}, !0), e.registerBinding(e.container, "gesturechange", function(P) {
e.hasTouchStarted || L(P);
}, !0), e.registerBinding(e.container, "mouseout", function(P) {
var j = e.projectIntoViewport(P.clientX, P.clientY);
e.cy.emit({
originalEvent: P,
type: "mouseout",
position: {
x: j[0],
y: j[1]
}
});
}, !1), e.registerBinding(e.container, "mouseover", function(P) {
var j = e.projectIntoViewport(P.clientX, P.clientY);
e.cy.emit({
originalEvent: P,
type: "mouseover",
position: {
x: j[0],
y: j[1]
}
});
}, !1);
var N, M, I, z, R, q, oe, Q, ae, pe, we, ke, fe, ge = function(P, j, se, ce) {
return Math.sqrt((se - P) * (se - P) + (ce - j) * (ce - j));
}, J = function(P, j, se, ce) {
return (se - P) * (se - P) + (ce - j) * (ce - j);
}, te;
e.registerBinding(e.container, "touchstart", te = function(P) {
if (e.hasTouchStarted = !0, !!O(P)) {
b(), e.touchData.capture = !0, e.data.bgActivePosistion = void 0;
var j = e.cy, se = e.touchData.now, ce = e.touchData.earlier;
if (P.touches[0]) {
var de = e.projectIntoViewport(P.touches[0].clientX, P.touches[0].clientY);
se[0] = de[0], se[1] = de[1];
}
if (P.touches[1]) {
var de = e.projectIntoViewport(P.touches[1].clientX, P.touches[1].clientY);
se[2] = de[0], se[3] = de[1];
}
if (P.touches[2]) {
var de = e.projectIntoViewport(P.touches[2].clientX, P.touches[2].clientY);
se[4] = de[0], se[5] = de[1];
}
if (P.touches[1]) {
e.touchData.singleTouchMoved = !0, m(e.dragData.touchDragEles);
var Oe = e.findContainerClientCoords();
ae = Oe[0], pe = Oe[1], we = Oe[2], ke = Oe[3], N = P.touches[0].clientX - ae, M = P.touches[0].clientY - pe, I = P.touches[1].clientX - ae, z = P.touches[1].clientY - pe, fe = 0 <= N && N <= we && 0 <= I && I <= we && 0 <= M && M <= ke && 0 <= z && z <= ke;
var ye = j.pan(), Fe = j.zoom();
R = ge(N, M, I, z), q = J(N, M, I, z), oe = [(N + I) / 2, (M + z) / 2], Q = [(oe[0] - ye.x) / Fe, (oe[1] - ye.y) / Fe];
var Ye = 200, Je = Ye * Ye;
if (q < Je && !P.touches[2]) {
var re = e.findNearestElement(se[0], se[1], !0, !0), Se = e.findNearestElement(se[2], se[3], !0, !0);
re && re.isNode() ? (re.activate().emit({
originalEvent: P,
type: "cxttapstart",
position: {
x: se[0],
y: se[1]
}
}), e.touchData.start = re) : Se && Se.isNode() ? (Se.activate().emit({
originalEvent: P,
type: "cxttapstart",
position: {
x: se[0],
y: se[1]
}
}), e.touchData.start = Se) : j.emit({
originalEvent: P,
type: "cxttapstart",
position: {
x: se[0],
y: se[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 (P.touches[2])
j.boxSelectionEnabled() && P.preventDefault();
else if (!P.touches[1] && P.touches[0]) {
var be = e.findNearestElements(se[0], se[1], !0, !0), Le = be[0];
if (Le != null && (Le.activate(), e.touchData.start = Le, e.touchData.starts = be, e.nodeIsGrabbable(Le))) {
var Tt = e.dragData.touchDragEles = j.collection(), Ct = null;
e.redrawHint("eles", !0), e.redrawHint("drag", !0), Le.selected() ? (Ct = j.$(function(an) {
return an.selected() && e.nodeIsGrabbable(an);
}), p(Ct, {
addToList: Tt
})) : v(Le, {
addToList: Tt
}), c(Le);
var Dt = function(an) {
return {
originalEvent: P,
type: an,
position: {
x: se[0],
y: se[1]
}
};
};
Le.emit(Dt("grabon")), Ct ? Ct.forEach(function(an) {
an.emit(Dt("grab"));
}) : Le.emit(Dt("grab"));
}
r(Le, ["touchstart", "tapstart", "vmousedown"], P, {
x: se[0],
y: se[1]
}), Le == null && (e.data.bgActivePosistion = {
x: de[0],
y: de[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"], P, {
x: se[0],
y: se[1]
});
}, e.tapholdDuration);
}
if (P.touches.length >= 1) {
for (var Vt = e.touchData.startPosition = [null, null, null, null, null, null], qt = 0; qt < se.length; qt++)
Vt[qt] = ce[qt] = se[qt];
var bn = P.touches[0];
e.touchData.startGPosition = [bn.clientX, bn.clientY];
}
}
}, !1);
var le;
e.registerBinding(t, "touchmove", le = function(P) {
var j = e.touchData.capture;
if (!(!j && !O(P))) {
var se = e.selection, ce = e.cy, de = e.touchData.now, Oe = e.touchData.earlier, ye = ce.zoom();
if (P.touches[0]) {
var Fe = e.projectIntoViewport(P.touches[0].clientX, P.touches[0].clientY);
de[0] = Fe[0], de[1] = Fe[1];
}
if (P.touches[1]) {
var Fe = e.projectIntoViewport(P.touches[1].clientX, P.touches[1].clientY);
de[2] = Fe[0], de[3] = Fe[1];
}
if (P.touches[2]) {
var Fe = e.projectIntoViewport(P.touches[2].clientX, P.touches[2].clientY);
de[4] = Fe[0], de[5] = Fe[1];
}
var Ye = e.touchData.startGPosition, Je;
if (j && P.touches[0] && Ye) {
for (var re = [], Se = 0; Se < de.length; Se++)
re[Se] = de[Se] - Oe[Se];
var be = P.touches[0].clientX - Ye[0], Le = be * be, Tt = P.touches[0].clientY - Ye[1], Ct = Tt * Tt, Dt = Le + Ct;
Je = Dt >= e.touchTapThreshold2;
}
if (j && e.touchData.cxt) {
P.preventDefault();
var Vt = P.touches[0].clientX - ae, qt = P.touches[0].clientY - pe, bn = P.touches[1].clientX - ae, an = P.touches[1].clientY - pe, sn = J(Vt, qt, bn, an), wn = sn / q, xn = 150, mn = xn * xn, or = 1.5, Hn = or * or;
if (wn >= Hn || sn >= mn) {
e.touchData.cxt = !1, e.data.bgActivePosistion = void 0, e.redrawHint("select", !0);
var Un = {
originalEvent: P,
type: "cxttapend",
position: {
x: de[0],
y: de[1]
}
};
e.touchData.start ? (e.touchData.start.unactivate().emit(Un), e.touchData.start = null) : ce.emit(Un);
}
}
if (j && e.touchData.cxt) {
var Un = {
originalEvent: P,
type: "cxtdrag",
position: {
x: de[0],
y: de[1]
}
};
e.data.bgActivePosistion = void 0, e.redrawHint("select", !0), e.touchData.start ? e.touchData.start.emit(Un) : ce.emit(Un), e.touchData.start && (e.touchData.start._private.grabbed = !1), e.touchData.cxtDragged = !0;
var Wt = e.findNearestElement(de[0], de[1], !0, !0);
(!e.touchData.cxtOver || Wt !== e.touchData.cxtOver) && (e.touchData.cxtOver && e.touchData.cxtOver.emit({
originalEvent: P,
type: "cxtdragout",
position: {
x: de[0],
y: de[1]
}
}), e.touchData.cxtOver = Wt, Wt && Wt.emit({
originalEvent: P,
type: "cxtdragover",
position: {
x: de[0],
y: de[1]
}
}));
} else if (j && P.touches[2] && ce.boxSelectionEnabled())
P.preventDefault(), e.data.bgActivePosistion = void 0, this.lastThreeTouch = +/* @__PURE__ */ new Date(), e.touchData.selecting || ce.emit({
originalEvent: P,
type: "boxstart",
position: {
x: de[0],
y: de[1]
}
}), e.touchData.selecting = !0, e.touchData.didSelect = !0, se[4] = 1, !se || se.length === 0 || se[0] === void 0 ? (se[0] = (de[0] + de[2] + de[4]) / 3, se[1] = (de[1] + de[3] + de[5]) / 3, se[2] = (de[0] + de[2] + de[4]) / 3 + 1, se[3] = (de[1] + de[3] + de[5]) / 3 + 1) : (se[2] = (de[0] + de[2] + de[4]) / 3, se[3] = (de[1] + de[3] + de[5]) / 3), e.redrawHint("select", !0), e.redraw();
else if (j && P.touches[1] && !e.touchData.didSelect && ce.zoomingEnabled() && ce.panningEnabled() && ce.userZoomingEnabled() && ce.userPanningEnabled()) {
P.preventDefault(), e.data.bgActivePosistion = void 0, e.redrawHint("select", !0);
var ln = e.dragData.touchDragEles;
if (ln) {
e.redrawHint("drag", !0);
for (var fn = 0; fn < ln.length; fn++) {
var ar = ln[fn]._private;
ar.grabbed = !1, ar.rscratch.inDragLayer = !1;
}
}
var zo = e.touchData.start, Vt = P.touches[0].clientX - ae, qt = P.touches[0].clientY - pe, bn = P.touches[1].clientX - ae, an = P.touches[1].clientY - pe, K = ge(Vt, qt, bn, an), he = K / R;
if (fe) {
var ze = Vt - N, ot = qt - M, yn = bn - I, qn = an - z, ir = (ze + yn) / 2, kn = (ot + qn) / 2, un = ce.zoom(), Vo = un * he, Fi = ce.pan(), id = Q[0] * un + Fi.x, sd = Q[1] * un + Fi.y, ld = {
x: -Vo / un * (id - Fi.x - ir) + id,
y: -Vo / un * (sd - Fi.y - kn) + sd
};
if (zo && zo.active()) {
var ln = e.dragData.touchDragEles;
m(ln), e.redrawHint("drag", !0), e.redrawHint("eles", !0), zo.unactivate().emit("freeon"), ln.emit("free"), e.dragData.didDrag && (zo.emit("dragfreeon"), ln.emit("dragfree"));
}
ce.viewport({
zoom: Vo,
pan: ld,
cancelOnFailedZoom: !0
}), ce.emit("pinchzoom"), R = K, N = Vt, M = qt, I = bn, z = an, e.pinching = !0;
}
if (P.touches[0]) {
var Fe = e.projectIntoViewport(P.touches[0].clientX, P.touches[0].clientY);
de[0] = Fe[0], de[1] = Fe[1];
}
if (P.touches[1]) {
var Fe = e.projectIntoViewport(P.touches[1].clientX, P.touches[1].clientY);
de[2] = Fe[0], de[3] = Fe[1];
}
if (P.touches[2]) {
var Fe = e.projectIntoViewport(P.touches[2].clientX, P.touches[2].clientY);
de[4] = Fe[0], de[5] = Fe[1];
}
} else if (P.touches[0] && !e.touchData.didSelect) {
var Mr = e.touchData.start, ru = e.touchData.last, Wt;
if (!e.hoverData.draggingEles && !e.swipePanning && (Wt = e.findNearestElement(de[0], de[1], !0, !0)), j && Mr != null && P.preventDefault(), j && Mr != null && e.nodeIsDraggable(Mr))
if (Je) {
var ln = e.dragData.touchDragEles, ud = !e.dragData.didDrag;
ud && p(ln, {
inDragLayer: !0
}), e.dragData.didDrag = !0;
var Ii = {
x: 0,
y: 0
};
if (Ve(re[0]) && Ve(re[1]) && (Ii.x += re[0], Ii.y += re[1], ud)) {
e.redrawHint("eles", !0);
var gr = e.touchData.dragDelta;
gr && Ve(gr[0]) && Ve(gr[1]) && (Ii.x += gr[0], Ii.y += gr[1]);
}
e.hoverData.draggingEles = !0, ln.silentShift(Ii).emit("position drag"), e.redrawHint("drag", !0), e.touchData.startPosition[0] == Oe[0] && e.touchData.startPosition[1] == Oe[1] && e.redrawHint("eles", !0), e.redraw();
} else {
var gr = e.touchData.dragDelta = e.touchData.dragDelta || [];
gr.length === 0 ? (gr.push(re[0]), gr.push(re[1])) : (gr[0] += re[0], gr[1] += re[1]);
}
if (r(Mr || Wt, ["touchmove", "tapdrag", "vmousemove"], P, {
x: de[0],
y: de[1]
}), (!Mr || !Mr.grabbed()) && Wt != ru && (ru && ru.emit({
originalEvent: P,
type: "tapdragout",
position: {
x: de[0],
y: de[1]
}
}), Wt && Wt.emit({
originalEvent: P,
type: "tapdragover",
position: {
x: de[0],
y: de[1]
}
})), e.touchData.last = Wt, j)
for (var fn = 0; fn < de.length; fn++)
de[fn] && e.touchData.startPosition[fn] && Je && (e.touchData.singleTouchMoved = !0);
if (j && (Mr == null || Mr.pannable()) && ce.panningEnabled() && ce.userPanningEnabled()) {
var $h = a(Mr, e.touchData.starts);
$h && (P.preventDefault(), e.data.bgActivePosistion || (e.data.bgActivePosistion = tl(e.touchData.startPosition)), e.swipePanning ? (ce.panBy({
x: re[0] * ye,
y: re[1] * ye
}), ce.emit("dragpan")) : Je && (e.swipePanning = !0, ce.panBy({
x: be * ye,
y: Tt * ye
}), ce.emit("dragpan"), Mr && (Mr.unactivate(), e.redrawHint("select", !0), e.touchData.start = null)));
var Fe = e.projectIntoViewport(P.touches[0].clientX, P.touches[0].clientY);
de[0] = Fe[0], de[1] = Fe[1];
}
}
for (var Se = 0; Se < de.length; Se++)
Oe[Se] = de[Se];
j && P.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 Ee;
e.registerBinding(t, "touchcancel", Ee = function(P) {
var j = e.touchData.start;
e.touchData.capture = !1, j && j.unactivate();
});
var Ne, je, _e, De;
if (e.registerBinding(t, "touchend", Ne = function(P) {
var j = e.touchData.start, se = e.touchData.capture;
if (se)
P.touches.length === 0 && (e.touchData.capture = !1), P.preventDefault();
else
return;
var ce = e.selection;
e.swipePanning = !1, e.hoverData.draggingEles = !1;
var de = e.cy, Oe = de.zoom(), ye = e.touchData.now, Fe = e.touchData.earlier;
if (P.touches[0]) {
var Ye = e.projectIntoViewport(P.touches[0].clientX, P.touches[0].clientY);
ye[0] = Ye[0], ye[1] = Ye[1];
}
if (P.touches[1]) {
var Ye = e.projectIntoViewport(P.touches[1].clientX, P.touches[1].clientY);
ye[2] = Ye[0], ye[3] = Ye[1];
}
if (P.touches[2]) {
var Ye = e.projectIntoViewport(P.touches[2].clientX, P.touches[2].clientY);
ye[4] = Ye[0], ye[5] = Ye[1];
}
j && j.unactivate();
var Je;
if (e.touchData.cxt) {
if (Je = {
originalEvent: P,
type: "cxttapend",
position: {
x: ye[0],
y: ye[1]
}
}, j ? j.emit(Je) : de.emit(Je), !e.touchData.cxtDragged) {
var re = {
originalEvent: P,
type: "cxttap",
position: {
x: ye[0],
y: ye[1]
}
};
j ? j.emit(re) : de.emit(re);
}
e.touchData.start && (e.touchData.start._private.grabbed = !1), e.touchData.cxt = !1, e.touchData.start = null, e.redraw();
return;
}
if (!P.touches[2] && de.boxSelectionEnabled() && e.touchData.selecting) {
e.touchData.selecting = !1;
var Se = de.collection(e.getAllInBox(ce[0], ce[1], ce[2], ce[3]));
ce[0] = void 0, ce[1] = void 0, ce[2] = void 0, ce[3] = void 0, ce[4] = 0, e.redrawHint("select", !0), de.emit({
type: "boxend",
originalEvent: P,
position: {
x: ye[0],
y: ye[1]
}
});
var be = function(xn) {
return xn.selectable() && !xn.selected();
};
Se.emit("box").stdFilter(be).select().emit("boxselect"), Se.nonempty() && e.redrawHint("eles", !0), e.redraw();
}
if (j != null && j.unactivate(), P.touches[2])
e.data.bgActivePosistion = void 0, e.redrawHint("select", !0);
else if (!P.touches[1] && !P.touches[0] && !P.touches[0]) {
e.data.bgActivePosistion = void 0, e.redrawHint("select", !0);
var Le = e.dragData.touchDragEles;
if (j != null) {
var Tt = j._private.grabbed;
m(Le), e.redrawHint("drag", !0), e.redrawHint("eles", !0), Tt && (j.emit("freeon"), Le.emit("free"), e.dragData.didDrag && (j.emit("dragfreeon"), Le.emit("dragfree"))), r(j, ["touchend", "tapend", "vmouseup", "tapdragout"], P, {
x: ye[0],
y: ye[1]
}), j.unactivate(), e.touchData.start = null;
} else {
var Ct = e.findNearestElement(ye[0], ye[1], !0, !0);
r(Ct, ["touchend", "tapend", "vmouseup", "tapdragout"], P, {
x: ye[0],
y: ye[1]
});
}
var Dt = e.touchData.startPosition[0] - ye[0], Vt = Dt * Dt, qt = e.touchData.startPosition[1] - ye[1], bn = qt * qt, an = Vt + bn, sn = an * Oe * Oe;
e.touchData.singleTouchMoved || (j || de.$(":selected").unselect(["tapunselect"]), r(j, ["tap", "vclick"], P, {
x: ye[0],
y: ye[1]
}), je = !1, P.timeStamp - De <= de.multiClickDebounceTime() ? (_e && clearTimeout(_e), je = !0, De = null, r(j, ["dbltap", "vdblclick"], P, {
x: ye[0],
y: ye[1]
})) : (_e = setTimeout(function() {
je || r(j, ["onetap", "voneclick"], P, {
x: ye[0],
y: ye[1]
});
}, de.multiClickDebounceTime()), De = P.timeStamp)), j != null && !e.dragData.didDrag && j._private.selectable && sn < e.touchTapThreshold2 && !e.pinching && (de.selectionType() === "single" ? (de.$(n).unmerge(j).unselect(["tapunselect"]), j.select(["tapselect"])) : j.selected() ? j.unselect(["tapunselect"]) : j.select(["tapselect"]), e.redrawHint("eles", !0)), e.touchData.singleTouchMoved = !0;
}
for (var wn = 0; wn < ye.length; wn++)
Fe[wn] = ye[wn];
e.dragData.didDrag = !1, P.touches.length === 0 && (e.touchData.dragDelta = [], e.touchData.startPosition = [null, null, null, null, null, null], e.touchData.startGPosition = null, e.touchData.didSelect = !1), P.touches.length < 2 && (P.touches.length === 1 && (e.touchData.startGPosition = [P.touches[0].clientX, P.touches[0].clientY]), e.pinching = !1, e.redrawHint("eles", !0), e.redraw());
}, !1), typeof TouchEvent > "u") {
var Ae = [], Be = function(P) {
return {
clientX: P.clientX,
clientY: P.clientY,
force: 1,
identifier: P.pointerId,
pageX: P.pageX,
pageY: P.pageY,
radiusX: P.width / 2,
radiusY: P.height / 2,
screenX: P.screenX,
screenY: P.screenY,
target: P.target
};
}, Ue = function(P) {
return {
event: P,
touch: Be(P)
};
}, Ze = function(P) {
Ae.push(Ue(P));
}, Me = function(P) {
for (var j = 0; j < Ae.length; j++) {
var se = Ae[j];
if (se.event.pointerId === P.pointerId) {
Ae.splice(j, 1);
return;
}
}
}, rt = function(P) {
var j = Ae.filter(function(se) {
return se.event.pointerId === P.pointerId;
})[0];
j.event = P, j.touch = Be(P);
}, nt = function(P) {
P.touches = Ae.map(function(j) {
return j.touch;
});
}, st = function(P) {
return P.pointerType === "mouse" || P.pointerType === 4;
};
e.registerBinding(e.container, "pointerdown", function(P) {
st(P) || (P.preventDefault(), Ze(P), nt(P), te(P));
}), e.registerBinding(e.container, "pointerup", function(P) {
st(P) || (Me(P), nt(P), Ne(P));
}), e.registerBinding(e.container, "pointercancel", function(P) {
st(P) || (Me(P), nt(P), Ee(P));
}), e.registerBinding(e.container, "pointermove", function(P) {
st(P) || (P.preventDefault(), rt(P), nt(P), le(P));
});
}
};
var La = {};
La.generatePolygon = function(e, t) {
return this.nodeShapes[e] = {
renderer: this,
name: e,
points: t,
draw: function(n, r, o, a, i, s) {
this.renderer.nodeShapeImpl("polygon", n, r, o, a, i, this.points);
},
intersectLine: function(n, r, o, a, i, s, u, l) {
return bc(i, s, this.points, n, r, o / 2, a / 2, u);
},
checkPoint: function(n, r, o, a, i, s, u, l) {
return Ta(n, r, this.points, s, u, a, i, [0, -1], o);
}
};
};
La.generateEllipse = function() {
return this.nodeShapes.ellipse = {
renderer: this,
name: "ellipse",
draw: function(e, t, n, r, o, a) {
this.renderer.nodeShapeImpl(this.name, e, t, n, r, o);
},
intersectLine: function(e, t, n, r, o, a, i, s) {
return mie(o, a, e, t, n / 2 + i, r / 2 + i);
},
checkPoint: function(e, t, n, r, o, a, i, s) {
return Yi(e, t, r, o, a, i, n);
}
};
};
La.generateRoundPolygon = function(e, t) {
return this.nodeShapes[e] = {
renderer: this,
name: e,
points: t,
getOrCreateCorners: function(n, r, o, a, i, s, u) {
if (s[u] !== void 0 && s[u + "-cx"] === n && s[u + "-cy"] === r)
return s[u];
s[u] = new Array(t.length / 2), s[u + "-cx"] = n, s[u + "-cy"] = r;
var l = o / 2, c = a / 2;
i = i === "auto" ? yS(o, a) : i;
for (var d = new Array(t.length / 2), f = 0; f < t.length / 2; f++)
d[f] = {
x: n + l * 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[u][h] = Iy(p, v, m, i), p = v, v = m;
return s[u];
},
draw: function(n, r, o, a, i, s, u) {
this.renderer.nodeShapeImpl("round-polygon", n, r, o, a, i, this.points, this.getOrCreateCorners(r, o, a, i, s, u, "drawCorners"));
},
intersectLine: function(n, r, o, a, i, s, u, l, c) {
return yie(i, s, this.points, n, r, o, a, u, this.getOrCreateCorners(n, r, o, a, l, c, "corners"));
},
checkPoint: function(n, r, o, a, i, s, u, l, c) {
return gie(n, r, this.points, s, u, a, i, this.getOrCreateCorners(s, u, a, i, l, c, "corners"));
}
};
};
La.generateRoundRectangle = function() {
return this.nodeShapes["round-rectangle"] = this.nodeShapes.roundrectangle = {
renderer: this,
name: "round-rectangle",
points: yr(4, 0),
draw: function(e, t, n, r, o, a) {
this.renderer.nodeShapeImpl(this.name, e, t, n, r, o, this.points, a);
},
intersectLine: function(e, t, n, r, o, a, i, s) {
return gS(o, a, e, t, n, r, i, s);
},
checkPoint: function(e, t, n, r, o, a, i, s) {
var u = r / 2, l = o / 2;
s = s === "auto" ? ws(r, o) : s, s = Math.min(u, l, s);
var c = s * 2;
return !!(Ta(e, t, this.points, a, i, r, o - c, [0, -1], n) || Ta(e, t, this.points, a, i, r - c, o, [0, -1], n) || Yi(e, t, c, c, a - u + s, i - l + s, n) || Yi(e, t, c, c, a + u - s, i - l + s, n) || Yi(e, t, c, c, a + u - s, i + l - s, n) || Yi(e, t, c, c, a - u + s, i + l - s, n));
}
};
};
La.generateCutRectangle = function() {
return this.nodeShapes["cut-rectangle"] = this.nodeShapes.cutrectangle = {
renderer: this,
name: "cut-rectangle",
cornerLength: xy(),
points: yr(4, 0),
draw: function(e, t, n, r, o, a) {
this.renderer.nodeShapeImpl(this.name, e, t, n, r, o, null, a);
},
generateCutTrianglePts: function(e, t, n, r, o) {
var a = o === "auto" ? this.cornerLength : o, i = t / 2, s = e / 2, u = n - s, l = n + s, c = r - i, d = r + i;
return {
topLeft: [u, c + a, u + a, c, u + a, c + a],
topRight: [l - a, c, l, c + a, l - a, c + a],
bottomRight: [l, d - a, l - a, d, l - a, d - a],
bottomLeft: [u + a, d, u, d - a, u + a, d - a]
};
},
intersectLine: function(e, t, n, r, o, a, i, s) {
var u = this.generateCutTrianglePts(n + 2 * i, r + 2 * i, e, t, s), l = [].concat.apply([], [u.topLeft.splice(0, 4), u.topRight.splice(0, 4), u.bottomRight.splice(0, 4), u.bottomLeft.splice(0, 4)]);
return bc(o, a, l, e, t);
},
checkPoint: function(e, t, n, r, o, a, i, s) {
var u = s === "auto" ? this.cornerLength : s;
if (Ta(e, t, this.points, a, i, r, o - 2 * u, [0, -1], n) || Ta(e, t, this.points, a, i, r - 2 * u, o, [0, -1], n))
return !0;
var l = this.generateCutTrianglePts(r, o, a, i);
return Sr(e, t, l.topLeft) || Sr(e, t, l.topRight) || Sr(e, t, l.bottomRight) || Sr(e, t, l.bottomLeft);
}
};
};
La.generateBarrel = function() {
return this.nodeShapes.barrel = {
renderer: this,
name: "barrel",
points: yr(4, 0),
draw: function(e, t, n, r, o, a) {
this.renderer.nodeShapeImpl(this.name, e, t, n, r, o);
},
intersectLine: function(e, t, n, r, o, a, i, s) {
var u = 0.15, l = 0.5, c = 0.85, d = this.generateBarrelBezierPts(n + 2 * i, r + 2 * i, e, t), f = function(p) {
var v = al({
x: p[0],
y: p[1]
}, {
x: p[2],
y: p[3]
}, {
x: p[4],
y: p[5]
}, u), m = al({
x: p[0],
y: p[1]
}, {
x: p[2],
y: p[3]
}, {
x: p[4],
y: p[5]
}, l), g = al({
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 bc(o, a, h, e, t);
},
generateBarrelBezierPts: function(e, t, n, r) {
var o = t / 2, a = e / 2, i = n - a, s = n + a, u = r - o, l = r + o, c = L0(e, t), d = c.heightOffset, f = c.widthOffset, h = c.ctrlPtOffsetPct * e, p = {
topLeft: [i, u + d, i + h, u, i + f, u],
topRight: [s - f, u, s - h, u, s, u + d],
bottomRight: [s, l - d, s - h, l, s - f, l],
bottomLeft: [i + f, l, i + h, l, i, l - 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, o, a, i, s) {
var u = L0(r, o), l = u.heightOffset, c = u.widthOffset;
if (Ta(e, t, this.points, a, i, r, o - 2 * l, [0, -1], n) || Ta(e, t, this.points, a, i, r - 2 * c, o, [0, -1], n))
return !0;
for (var d = this.generateBarrelBezierPts(r, o, a, i), f = function(k, E, S) {
var O = S[4], F = S[2], $ = S[0], A = S[5], L = S[1], N = Math.min(O, $), M = Math.max(O, $), I = Math.min(A, L), z = Math.max(A, L);
if (N <= k && k <= M && I <= E && E <= z) {
var R = bie(O, F, $), q = pie(R[0], R[1], R[2], k), oe = q.filter(function(Q) {
return 0 <= Q && Q <= 1;
});
if (oe.length > 0)
return oe[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 b = m[5], x = m[3], w = m[1], C = Mn(b, x, w, g);
if (m.isTop && C <= t || m.isBottom && t <= C)
return !0;
}
}
return !1;
}
};
};
La.generateBottomRoundrectangle = function() {
return this.nodeShapes["bottom-round-rectangle"] = this.nodeShapes.bottomroundrectangle = {
renderer: this,
name: "bottom-round-rectangle",
points: yr(4, 0),
draw: function(e, t, n, r, o, a) {
this.renderer.nodeShapeImpl(this.name, e, t, n, r, o, this.points, a);
},
intersectLine: function(e, t, n, r, o, a, i, s) {
var u = e - (n / 2 + i), l = t - (r / 2 + i), c = l, d = e + (n / 2 + i), f = ai(o, a, e, t, u, l, d, c, !1);
return f.length > 0 ? f : gS(o, a, e, t, n, r, i, s);
},
checkPoint: function(e, t, n, r, o, a, i, s) {
s = s === "auto" ? ws(r, o) : s;
var u = 2 * s;
if (Ta(e, t, this.points, a, i, r, o - u, [0, -1], n) || Ta(e, t, this.points, a, i, r - u, o, [0, -1], n))
return !0;
var l = r / 2 + 2 * n, c = o / 2 + 2 * n, d = [a - l, i - c, a - l, i, a + l, i, a + l, i - c];
return !!(Sr(e, t, d) || Yi(e, t, u, u, a + r / 2 - s, i + o / 2 - s, n) || Yi(e, t, u, u, a - r / 2 + s, i + o / 2 - s, n));
}
};
};
La.registerNodeShapes = function() {
var e = this.nodeShapes = {}, t = this;
this.generateEllipse(), this.generatePolygon("triangle", yr(3, 0)), this.generateRoundPolygon("round-triangle", yr(3, 0)), this.generatePolygon("rectangle", yr(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", yr(5, 0)), this.generateRoundPolygon("round-pentagon", yr(5, 0)), this.generatePolygon("hexagon", yr(6, 0)), this.generateRoundPolygon("round-hexagon", yr(6, 0)), this.generatePolygon("heptagon", yr(7, 0)), this.generateRoundPolygon("round-heptagon", yr(7, 0)), this.generatePolygon("octagon", yr(8, 0)), this.generateRoundPolygon("round-octagon", yr(8, 0));
var r = new Array(20);
{
var o = N0(5, 0), a = N0(5, Math.PI / 5), i = 0.5 * (3 - Math.sqrt(5));
i *= 1.57;
for (var s = 0; s < a.length / 2; s++)
a[s * 2] *= i, a[s * 2 + 1] *= i;
for (var s = 0; s < 20 / 4; s++)
r[s * 4] = o[s * 2], r[s * 4 + 1] = o[s * 2 + 1], r[s * 4 + 2] = a[s * 2], r[s * 4 + 3] = a[s * 2 + 1];
}
r = mS(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 u = [-1, -1, 0.25, -1, 1, 0, 0.25, 1, -1, 1];
this.generatePolygon("tag", u), this.generateRoundPolygon("round-tag", u);
}
e.makePolygon = function(l) {
var c = l.join("$"), d = "polygon-" + c, f;
return (f = this[d]) ? f : t.generatePolygon(d, l);
};
};
var od = {};
od.timeToRender = function() {
return this.redrawTotalTime / this.redrawCount;
};
od.redraw = function(e) {
e = e || dS();
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;
};
od.beforeRender = function(e, t) {
if (!this.destroyed) {
t == null && vn("Priority is not optional for beforeRender");
var n = this.beforeRenderCallbacks;
n.push({
fn: e,
priority: t
}), n.sort(function(r, o) {
return o.priority - r.priority;
});
}
};
var pk = function(e, t, n) {
for (var r = e.beforeRenderCallbacks, o = 0; o < r.length; o++)
r[o].fn(t, n);
};
od.startRenderLoop = function() {
var e = this, t = e.cy;
if (!e.renderLoopStarted) {
e.renderLoopStarted = !0;
var n = function r(o) {
if (!e.destroyed) {
if (!t.batching()) if (e.requestedFrame && !e.skipFrame) {
pk(e, !0, o);
var a = _a();
e.render(e.renderOptions);
var i = e.lastDrawTime = _a();
e.averageRedrawTime === void 0 && (e.averageRedrawTime = i - a), e.redrawCount === void 0 && (e.redrawCount = 0), e.redrawCount++, e.redrawTotalTime === void 0 && (e.redrawTotalTime = 0);
var s = i - a;
e.redrawTotalTime += s, e.lastRedrawTime = s, e.averageRedrawTime = e.averageRedrawTime / 2 + s / 2, e.requestedFrame = !1;
} else
pk(e, !1, o);
e.skipFrame = !1, ef(r);
}
};
ef(n);
}
};
var ede = function(e) {
this.init(e);
}, g_ = ede, tu = g_.prototype;
tu.clientFunctions = ["redrawHint", "render", "renderTo", "matchCanvasSize", "nodeShapeImpl", "arrowShapeImpl"];
tu.init = function(e) {
var t = this;
t.options = e, t.cy = e.cy;
var n = t.container = e.cy.container(), r = t.cy.window();
if (r) {
var o = r.document, a = o.head, i = "__________cytoscape_stylesheet", s = "__________cytoscape_container", u = o.getElementById(i) != null;
if (n.className.indexOf(s) < 0 && (n.className = (n.className || "") + " " + s), !u) {
var l = o.createElement("style");
l.id = i, l.textContent = "." + s + " { position: relative; }", a.insertBefore(l, a.children[0]);
}
var c = r.getComputedStyle(n), d = c.getPropertyValue("position");
d === "static" && Mt("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 = Ve(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();
};
tu.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();
}
};
tu.destroy = function() {
var e = this;
e.destroyed = !0, e.cy.stopAnimationLoop();
for (var t = 0; t < e.bindings.length; t++) {
var n = e.bindings[t], r = n, o = r.target;
(o.off || o.removeEventListener).apply(o, r.args);
}
if (e.bindings = [], e.beforeRenderCallbacks = [], e.onUpdateEleCalcsFns = [], e.removeObserver && e.removeObserver.disconnect(), e.styleObserver && e.styleObserver.disconnect(), e.resizeObserver && e.resizeObserver.disconnect(), e.labelCalcDiv)
try {
document.body.removeChild(e.labelCalcDiv);
} catch {
}
};
tu.isHeadless = function() {
return !1;
};
[Fy, h_, v_, eu, La, od].forEach(function(e) {
ct(tu, e);
});
var Nv = 1e3 / 60, m_ = {
setupDequeueing: function(e) {
return function() {
var t = this, n = this.renderer;
if (!t.dequeueingSetup) {
t.dequeueingSetup = !0;
var r = hh(function() {
n.redrawHint("eles", !0), n.redrawHint("drag", !0), n.redraw();
}, e.deqRedrawThreshold), o = function(i, s) {
var u = _a(), l = n.averageRedrawTime, c = n.lastRedrawTime, d = [], f = n.cy.extent(), h = n.getPixelRatio();
for (i || n.flushRenderedStyleQueue(); ; ) {
var p = _a(), v = p - u, m = p - s;
if (c < Nv) {
var g = Nv - (i ? l : 0);
if (m >= e.deqFastCost * g)
break;
} else if (i) {
if (v >= e.deqCost * c || v >= e.deqAvgCost * l)
break;
} else if (m >= e.deqNoDrawCost * Nv)
break;
var b = e.deq(t, h, f);
if (b.length > 0)
for (var x = 0; x < b.length; x++)
d.push(b[x]);
else
break;
}
d.length > 0 && (e.onDeqd(t, d), !i && e.shouldRedraw(t, d, h, f) && r());
}, a = e.priority || my;
n.beforeRender(o, a(t));
}
};
}
}, tde = /* @__PURE__ */ function() {
function e(t) {
var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : tf;
py(this, e), this.idsByKey = new Go(), this.keyForId = new Go(), this.cachesByLvl = new Go(), this.lvls = [], this.getKey = t, this.doesEleInvalidateKey = n;
}
return fy(e, [{
key: "getIdsFor",
value: function(t) {
t == null && vn("Can not get id list for null key");
var n = this.idsByKey, r = this.idsByKey.get(t);
return r || (r = new Kl(), n.set(t, r)), r;
}
}, {
key: "addIdForKey",
value: function(t, n) {
t != null && this.getIdsFor(t).add(n);
}
}, {
key: "deleteIdForKey",
value: function(t, n) {
t != null && this.getIdsFor(t).delete(n);
}
}, {
key: "getNumberOfIdsForKey",
value: function(t) {
return t == null ? 0 : this.getIdsFor(t).size;
}
}, {
key: "updateKeyMappingFor",
value: function(t) {
var n = t.id(), r = this.keyForId.get(n), o = this.getKey(t);
this.deleteIdForKey(r, n), this.addIdForKey(o, n), this.keyForId.set(n, o);
}
}, {
key: "deleteKeyMappingFor",
value: function(t) {
var n = t.id(), r = this.keyForId.get(n);
this.deleteIdForKey(r, n), this.keyForId.delete(n);
}
}, {
key: "keyHasChangedFor",
value: function(t) {
var n = t.id(), r = this.keyForId.get(n), o = this.getKey(t);
return r !== o;
}
}, {
key: "isInvalid",
value: function(t) {
return this.keyHasChangedFor(t) || this.doesEleInvalidateKey(t);
}
}, {
key: "getCachesAt",
value: function(t) {
var n = this.cachesByLvl, r = this.lvls, o = n.get(t);
return o || (o = new Go(), n.set(t, o), r.push(t)), o;
}
}, {
key: "getCache",
value: function(t, n) {
return this.getCachesAt(n).get(t);
}
}, {
key: "get",
value: function(t, n) {
var r = this.getKey(t), o = this.getCache(r, n);
return o != null && this.updateKeyMappingFor(t), o;
}
}, {
key: "getForCachedKey",
value: function(t, n) {
var r = this.keyForId.get(t.id()), o = this.getCache(r, n);
return o;
}
}, {
key: "hasCache",
value: function(t, n) {
return this.getCachesAt(n).has(t);
}
}, {
key: "has",
value: function(t, n) {
var r = this.getKey(t);
return this.hasCache(r, n);
}
}, {
key: "setCache",
value: function(t, n, r) {
r.key = t, this.getCachesAt(n).set(t, r);
}
}, {
key: "set",
value: function(t, n, r) {
var o = this.getKey(t);
this.setCache(o, n, r), this.updateKeyMappingFor(t);
}
}, {
key: "deleteCache",
value: function(t, n) {
this.getCachesAt(n).delete(t);
}
}, {
key: "delete",
value: function(t, n) {
var r = this.getKey(t);
this.deleteCache(r, n);
}
}, {
key: "invalidateKey",
value: function(t) {
var n = this;
this.lvls.forEach(function(r) {
return n.deleteCache(t, r);
});
}
// returns true if no other eles reference the invalidated cache (n.b. other eles may need the cache with the same key)
}, {
key: "invalidate",
value: function(t) {
var n = t.id(), r = this.keyForId.get(n);
this.deleteKeyMappingFor(t);
var o = this.doesEleInvalidateKey(t);
return o && this.invalidateKey(r), o || this.getNumberOfIdsForKey(r) === 0;
}
}]), e;
}(), fk = 25, Xd = 50, kp = -4, W0 = 3, nde = 7.99, rde = 8, ode = 1024, ade = 1024, ide = 1024, sde = 0.2, lde = 0.8, ude = 10, cde = 0.15, dde = 0.1, pde = 0.9, fde = 0.9, hde = 100, vde = 1, nl = {
dequeue: "dequeue",
downscale: "downscale",
highQuality: "highQuality"
}, gde = nr({
getKey: null,
doesEleInvalidateKey: tf,
drawElement: null,
getBoundingBox: null,
getRotationPoint: null,
getRotationOffset: null,
isVisible: lS,
allowEdgeTxrCaching: !0,
allowParentTxrCaching: !0
}), $u = function(e, t) {
var n = this;
n.renderer = e, n.onDequeues = [];
var r = gde(t);
ct(n, r), n.lookup = new tde(r.getKey, r.doesEleInvalidateKey), n.setupDequeueing();
}, Bn = $u.prototype;
Bn.reasons = nl;
Bn.getTextureQueue = function(e) {
var t = this;
return t.eleImgCaches = t.eleImgCaches || {}, t.eleImgCaches[e] = t.eleImgCaches[e] || [];
};
Bn.getRetiredTextureQueue = function(e) {
var t = this, n = t.eleImgCaches.retired = t.eleImgCaches.retired || {}, r = n[e] = n[e] || [];
return r;
};
Bn.getElementQueue = function() {
var e = this, t = e.eleCacheQueue = e.eleCacheQueue || new ed(function(n, r) {
return r.reqs - n.reqs;
});
return t;
};
Bn.getElementKeyToQueue = function() {
var e = this, t = e.eleKeyToCacheQueue = e.eleKeyToCacheQueue || {};
return t;
};
Bn.getElement = function(e, t, n, r, o) {
var a = this, i = this.renderer, s = i.cy.zoom(), u = this.lookup;
if (!t || t.w === 0 || t.h === 0 || isNaN(t.w) || isNaN(t.h) || !e.visible() || e.removed() || !a.allowEdgeTxrCaching && e.isEdge() || !a.allowParentTxrCaching && e.isParent())
return null;
if (r == null && (r = Math.ceil(by(s * n))), r < kp)
r = kp;
else if (s >= nde || r > W0)
return null;
var l = Math.pow(2, r), c = t.h * l, d = t.w * l, f = i.eleTextBiggerThanMin(e, l);
if (!this.isVisible(e, f))
return null;
var h = u.get(e, r);
if (h && h.invalidated && (h.invalidated = !1, h.texture.invalidatedWidth -= h.width), h)
return h;
var p;
if (c <= fk ? p = fk : c <= Xd ? p = Xd : p = Math.ceil(c / Xd) * Xd, c > ide || d > ade)
return null;
var v = a.getTextureQueue(p), m = v[v.length - 2], g = function() {
return a.recycleTexture(p, d) || a.addTexture(p, d);
};
m || (m = v[v.length - 1]), m || (m = g()), m.width - m.usedWidth < d && (m = g());
for (var b = function(M) {
return M && M.scaledLabelShown === f;
}, x = o && o === nl.dequeue, w = o && o === nl.highQuality, C = o && o === nl.downscale, k, E = r + 1; E <= W0; E++) {
var S = u.get(e, E);
if (S) {
k = S;
break;
}
}
var O = k && k.level === r + 1 ? k : null, F = function() {
m.context.drawImage(O.texture.canvas, O.x, 0, O.width, O.height, m.usedWidth, 0, d, c);
};
if (m.context.setTransform(1, 0, 0, 1, 0, 0), m.context.clearRect(m.usedWidth, 0, d, p), b(O))
F();
else if (b(k))
if (w) {
for (var $ = k.level; $ > r; $--)
O = a.getElement(e, t, n, $, nl.downscale);
F();
} else
return a.queueElement(e, k.level - 1), k;
else {
var A;
if (!x && !w && !C)
for (var L = r - 1; L >= kp; L--) {
var N = u.get(e, L);
if (N) {
A = N;
break;
}
}
if (b(A))
return a.queueElement(e, r), A;
m.context.translate(m.usedWidth, 0), m.context.scale(l, l), this.drawElement(m.context, e, t, f, !1), m.context.scale(1 / l, 1 / l), m.context.translate(-m.usedWidth, 0);
}
return h = {
x: m.usedWidth,
texture: m,
level: r,
scale: l,
width: d,
height: c,
scaledLabelShown: f
}, m.usedWidth += Math.ceil(d + rde), m.eleCaches.push(h), u.set(e, r, h), a.checkTextureFullness(m), h;
};
Bn.invalidateElements = function(e) {
for (var t = 0; t < e.length; t++)
this.invalidateElement(e[t]);
};
Bn.invalidateElement = function(e) {
var t = this, n = t.lookup, r = [], o = n.isInvalid(e);
if (o) {
for (var a = kp; a <= W0; a++) {
var i = n.getForCachedKey(e, a);
i && r.push(i);
}
var s = n.invalidate(e);
if (s)
for (var u = 0; u < r.length; u++) {
var l = r[u], c = l.texture;
c.invalidatedWidth += l.width, l.invalidated = !0, t.checkTextureUtility(c);
}
t.removeFromQueue(e);
}
};
Bn.checkTextureUtility = function(e) {
e.invalidatedWidth >= sde * e.width && this.retireTexture(e);
};
Bn.checkTextureFullness = function(e) {
var t = this, n = t.getTextureQueue(e.height);
e.usedWidth / e.width > lde && e.fullnessChecks >= ude ? yi(n, e) : e.fullnessChecks++;
};
Bn.retireTexture = function(e) {
var t = this, n = e.height, r = t.getTextureQueue(n), o = this.lookup;
yi(r, e), e.retired = !0;
for (var a = e.eleCaches, i = 0; i < a.length; i++) {
var s = a[i];
o.deleteCache(s.key, s.level);
}
yy(a);
var u = t.getRetiredTextureQueue(n);
u.push(e);
};
Bn.addTexture = function(e, t) {
var n = this, r = n.getTextureQueue(e), o = {};
return r.push(o), o.eleCaches = [], o.height = e, o.width = Math.max(ode, t), o.usedWidth = 0, o.invalidatedWidth = 0, o.fullnessChecks = 0, o.canvas = n.renderer.makeOffscreenCanvas(o.width, o.height), o.context = o.canvas.getContext("2d"), o;
};
Bn.recycleTexture = function(e, t) {
for (var n = this, r = n.getTextureQueue(e), o = n.getRetiredTextureQueue(e), a = 0; a < o.length; a++) {
var i = o[a];
if (i.width >= t)
return i.retired = !1, i.usedWidth = 0, i.invalidatedWidth = 0, i.fullnessChecks = 0, yy(i.eleCaches), i.context.setTransform(1, 0, 0, 1, 0, 0), i.context.clearRect(0, 0, i.width, i.height), yi(o, i), r.push(i), i;
}
};
Bn.queueElement = function(e, t) {
var n = this, r = n.getElementQueue(), o = n.getElementKeyToQueue(), a = this.getKey(e), i = o[a];
if (i)
i.level = Math.max(i.level, t), i.eles.merge(e), i.reqs++, r.updateItem(i);
else {
var s = {
eles: e.spawn().merge(e),
level: t,
reqs: 1,
key: a
};
r.push(s), o[a] = s;
}
};
Bn.dequeue = function(e) {
for (var t = this, n = t.getElementQueue(), r = t.getElementKeyToQueue(), o = [], a = t.lookup, i = 0; i < vde && n.size() > 0; i++) {
var s = n.pop(), u = s.key, l = s.eles[0], c = a.hasCache(l, s.level);
if (r[u] = null, !c) {
o.push(s);
var d = t.getBoundingBox(l);
t.getElement(l, d, e, s.level, nl.dequeue);
}
}
return o;
};
Bn.removeFromQueue = function(e) {
var t = this, n = t.getElementQueue(), r = t.getElementKeyToQueue(), o = this.getKey(e), a = r[o];
a != null && (a.eles.length === 1 ? (a.reqs = gy, n.updateItem(a), n.pop(), r[o] = null) : a.eles.unmerge(e));
};
Bn.onDequeue = function(e) {
this.onDequeues.push(e);
};
Bn.offDequeue = function(e) {
yi(this.onDequeues, e);
};
Bn.setupDequeueing = m_.setupDequeueing({
deqRedrawThreshold: hde,
deqCost: cde,
deqAvgCost: dde,
deqNoDrawCost: pde,
deqFastCost: fde,
deq: function(e, t, n) {
return e.dequeue(t, n);
},
onDeqd: function(e, t) {
for (var n = 0; n < e.onDequeues.length; n++) {
var r = e.onDequeues[n];
r(t);
}
},
shouldRedraw: function(e, t, n, r) {
for (var o = 0; o < t.length; o++)
for (var a = t[o].eles, i = 0; i < a.length; i++) {
var s = a[i].boundingBox();
if (wy(s, r))
return !0;
}
return !1;
},
priority: function(e) {
return e.renderer.beforeRenderPriorities.eleTxrDeq;
}
});
var mde = 1, Hu = -4, cf = 2, yde = 3.99, bde = 50, wde = 50, xde = 0.15, kde = 0.1, Cde = 0.9, Ede = 0.9, Sde = 1, hk = 250, _de = 4e3 * 4e3, Tde = !0, y_ = function(e) {
var t = this, n = t.renderer = e, r = n.cy;
t.layersByLevel = {}, t.firstGet = !0, t.lastInvalidationTime = _a() - 2 * hk, t.skipping = !1, t.eleTxrDeqs = r.collection(), t.scheduleElementRefinement = hh(function() {
t.refineElementTextures(t.eleTxrDeqs), t.eleTxrDeqs.unmerge(t.eleTxrDeqs);
}, wde), n.beforeRender(function(a, i) {
i - t.lastInvalidationTime <= hk ? t.skipping = !0 : t.skipping = !1;
}, n.beforeRenderPriorities.lyrTxrSkip);
var o = function(a, i) {
return i.reqs - a.reqs;
};
t.layersQueue = new ed(o), t.setupDequeueing();
}, rr = y_.prototype, vk = 0, Ode = Math.pow(2, 53) - 1;
rr.makeLayer = function(e, t) {
var n = Math.pow(2, t), r = Math.ceil(e.w * n), o = Math.ceil(e.h * n), a = this.renderer.makeOffscreenCanvas(r, o), i = {
id: vk = ++vk % Ode,
bb: e,
level: t,
width: r,
height: o,
canvas: a,
context: a.getContext("2d"),
eles: [],
elesQueue: [],
reqs: 0
}, s = i.context, u = -i.bb.x1, l = -i.bb.y1;
return s.scale(n, n), s.translate(u, l), i;
};
rr.getLayers = function(e, t, n) {
var r = this, o = r.renderer, a = o.cy, i = a.zoom(), s = r.firstGet;
if (r.firstGet = !1, n == null) {
if (n = Math.ceil(by(i * t)), n < Hu)
n = Hu;
else if (i >= yde || n > cf)
return null;
}
r.validateLayersElesOrdering(n, e);
var u = r.layersByLevel, l = Math.pow(2, n), c = u[n] = u[n] || [], d, f = r.levelIsComplete(n, e), h, p = function() {
var O = function(L) {
if (r.validateLayersElesOrdering(L, e), r.levelIsComplete(L, e))
return h = u[L], !0;
}, F = function(L) {
if (!h)
for (var N = n + L; Hu <= N && N <= cf && !O(N); N += L)
;
};
F(1), F(-1);
for (var $ = c.length - 1; $ >= 0; $--) {
var A = c[$];
A.invalid && yi(c, A);
}
};
if (!f)
p();
else
return c;
var v = function() {
if (!d) {
d = Br();
for (var O = 0; O < e.length; O++)
hS(d, e[O].boundingBox());
}
return d;
}, m = function(O) {
O = O || {};
var F = O.after;
v();
var $ = d.w * l * (d.h * l);
if ($ > _de)
return null;
var A = r.makeLayer(d, n);
if (F != null) {
var L = c.indexOf(F) + 1;
c.splice(L, 0, A);
} else (O.insert === void 0 || O.insert) && c.unshift(A);
return A;
};
if (r.skipping && !s)
return null;
for (var g = null, b = e.length / mde, x = !s, w = 0; w < e.length; w++) {
var C = e[w], k = C._private.rscratch, E = k.imgLayerCaches = k.imgLayerCaches || {}, S = E[n];
if (S) {
g = S;
continue;
}
if ((!g || g.eles.length >= b || !vS(g.bb, C.boundingBox())) && (g = m({
insert: !0,
after: g
}), !g))
return null;
h || x ? r.queueLayer(g, C) : r.drawEleInLayer(g, C, n, t), g.eles.push(C), E[n] = g;
}
return h || (x ? null : c);
};
rr.getEleLevelForLayerLevel = function(e, t) {
return e;
};
rr.drawEleInLayer = function(e, t, n, r) {
var o = this, a = this.renderer, i = e.context, s = t.boundingBox();
s.w === 0 || s.h === 0 || !t.visible() || (n = o.getEleLevelForLayerLevel(n, r), a.setImgSmoothing(i, !1), a.drawCachedElement(i, t, null, null, n, Tde), a.setImgSmoothing(i, !0));
};
rr.levelIsComplete = function(e, t) {
var n = this, r = n.layersByLevel[e];
if (!r || r.length === 0)
return !1;
for (var o = 0, a = 0; a < r.length; a++) {
var i = r[a];
if (i.reqs > 0 || i.invalid)
return !1;
o += i.eles.length;
}
return o === t.length;
};
rr.validateLayersElesOrdering = function(e, t) {
var n = this.layersByLevel[e];
if (n)
for (var r = 0; r < n.length; r++) {
for (var o = n[r], a = -1, i = 0; i < t.length; i++)
if (o.eles[0] === t[i]) {
a = i;
break;
}
if (a < 0) {
this.invalidateLayer(o);
continue;
}
for (var s = a, i = 0; i < o.eles.length; i++)
if (o.eles[i] !== t[s + i]) {
this.invalidateLayer(o);
break;
}
}
};
rr.updateElementsInLayers = function(e, t) {
for (var n = this, r = Jc(e[0]), o = 0; o < e.length; o++)
for (var a = r ? null : e[o], i = r ? e[o] : e[o].ele, s = i._private.rscratch, u = s.imgLayerCaches = s.imgLayerCaches || {}, l = Hu; l <= cf; l++) {
var c = u[l];
c && (a && n.getEleLevelForLayerLevel(c.level) !== a.level || t(c, i, a));
}
};
rr.haveLayers = function() {
for (var e = this, t = !1, n = Hu; n <= cf; n++) {
var r = e.layersByLevel[n];
if (r && r.length > 0) {
t = !0;
break;
}
}
return t;
};
rr.invalidateElements = function(e) {
var t = this;
e.length !== 0 && (t.lastInvalidationTime = _a(), !(e.length === 0 || !t.haveLayers()) && t.updateElementsInLayers(e, function(n, r, o) {
t.invalidateLayer(n);
}));
};
rr.invalidateLayer = function(e) {
if (this.lastInvalidationTime = _a(), !e.invalid) {
var t = e.level, n = e.eles, r = this.layersByLevel[t];
yi(r, e), e.elesQueue = [], e.invalid = !0, e.replacement && (e.replacement.invalid = !0);
for (var o = 0; o < n.length; o++) {
var a = n[o]._private.rscratch.imgLayerCaches;
a && (a[t] = null);
}
}
};
rr.refineElementTextures = function(e) {
var t = this;
t.updateElementsInLayers(e, function(n, r, o) {
var a = n.replacement;
if (a || (a = n.replacement = t.makeLayer(n.bb, n.level), a.replaces = n, a.eles = n.eles), !a.reqs)
for (var i = 0; i < a.eles.length; i++)
t.queueLayer(a, a.eles[i]);
});
};
rr.enqueueElementRefinement = function(e) {
this.eleTxrDeqs.merge(e), this.scheduleElementRefinement();
};
rr.queueLayer = function(e, t) {
var n = this, r = n.layersQueue, o = e.elesQueue, a = o.hasId = o.hasId || {};
if (!e.replacement) {
if (t) {
if (a[t.id()])
return;
o.push(t), a[t.id()] = !0;
}
e.reqs ? (e.reqs++, r.updateItem(e)) : (e.reqs = 1, r.push(e));
}
};
rr.dequeue = function(e) {
for (var t = this, n = t.layersQueue, r = [], o = 0; o < Sde && n.size() !== 0; ) {
var a = n.peek();
if (a.replacement) {
n.pop();
continue;
}
if (a.replaces && a !== a.replaces.replacement) {
n.pop();
continue;
}
if (a.invalid) {
n.pop();
continue;
}
var i = a.elesQueue.shift();
i && (t.drawEleInLayer(a, i, a.level, e), o++), r.length === 0 && r.push(!0), a.elesQueue.length === 0 && (n.pop(), a.reqs = 0, a.replaces && t.applyLayerReplacement(a), t.requestRedraw());
}
return r;
};
rr.applyLayerReplacement = function(e) {
var t = this, n = t.layersByLevel[e.level], r = e.replaces, o = n.indexOf(r);
if (!(o < 0 || r.invalid)) {
n[o] = e;
for (var a = 0; a < e.eles.length; a++) {
var i = e.eles[a]._private, s = i.imgLayerCaches = i.imgLayerCaches || {};
s && (s[e.level] = e);
}
t.requestRedraw();
}
};
rr.requestRedraw = hh(function() {
var e = this.renderer;
e.redrawHint("eles", !0), e.redrawHint("drag", !0), e.redraw();
}, 100);
rr.setupDequeueing = m_.setupDequeueing({
deqRedrawThreshold: bde,
deqCost: xde,
deqAvgCost: kde,
deqNoDrawCost: Cde,
deqFastCost: Ede,
deq: function(e, t) {
return e.dequeue(t);
},
onDeqd: my,
shouldRedraw: lS,
priority: function(e) {
return e.renderer.beforeRenderPriorities.lyrTxrDeq;
}
});
var b_ = {}, gk;
function Pde(e, t) {
for (var n = 0; n < t.length; n++) {
var r = t[n];
e.lineTo(r.x, r.y);
}
}
function $de(e, t, n) {
for (var r, o = 0; o < t.length; o++) {
var a = t[o];
o === 0 && (r = a), e.lineTo(a.x, a.y);
}
e.quadraticCurveTo(n.x, n.y, r.x, r.y);
}
function mk(e, t, n) {
e.beginPath && e.beginPath();
for (var r = t, o = 0; o < r.length; o++) {
var a = r[o];
e.lineTo(a.x, a.y);
}
var i = n, s = n[0];
e.moveTo(s.x, s.y);
for (var o = 1; o < i.length; o++) {
var a = i[o];
e.lineTo(a.x, a.y);
}
e.closePath && e.closePath();
}
function Ade(e, t, n, r, o) {
e.beginPath && e.beginPath(), e.arc(n, r, o, 0, Math.PI * 2, !1);
var a = t, i = a[0];
e.moveTo(i.x, i.y);
for (var s = 0; s < a.length; s++) {
var u = a[s];
e.lineTo(u.x, u.y);
}
e.closePath && e.closePath();
}
function Fde(e, t, n, r) {
e.arc(t, n, r, 0, Math.PI * 2, !1);
}
b_.arrowShapeImpl = function(e) {
return (gk || (gk = {
polygon: Pde,
"triangle-backcurve": $de,
"triangle-tee": mk,
"circle-triangle": Ade,
"triangle-cross": mk,
circle: Fde
}))[e];
};
var la = {};
la.drawElement = function(e, t, n, r, o, a) {
var i = this;
t.isNode() ? i.drawNode(e, t, n, r, o, a) : i.drawEdge(e, t, n, r, o, a);
};
la.drawElementOverlay = function(e, t) {
var n = this;
t.isNode() ? n.drawNodeOverlay(e, t) : n.drawEdgeOverlay(e, t);
};
la.drawElementUnderlay = function(e, t) {
var n = this;
t.isNode() ? n.drawNodeUnderlay(e, t) : n.drawEdgeUnderlay(e, t);
};
la.drawCachedElementPortion = function(e, t, n, r, o, a, i, s) {
var u = this, l = n.getBoundingBox(t);
if (!(l.w === 0 || l.h === 0)) {
var c = n.getElement(t, l, r, o, a);
if (c != null) {
var d = s(u, t);
if (d === 0)
return;
var f = i(u, t), h = l.x1, p = l.y1, v = l.w, m = l.h, g, b, x, w, C;
if (f !== 0) {
var k = n.getRotationPoint(t);
x = k.x, w = k.y, e.translate(x, w), e.rotate(f), C = u.getImgSmoothing(e), C || u.setImgSmoothing(e, !0);
var E = n.getRotationOffset(t);
g = E.x, b = E.y;
} else
g = h, b = p;
var S;
d !== 1 && (S = e.globalAlpha, e.globalAlpha = S * d), e.drawImage(c.texture.canvas, c.x, 0, c.width, c.height, g, b, v, m), d !== 1 && (e.globalAlpha = S), f !== 0 && (e.rotate(-f), e.translate(-x, -w), C || u.setImgSmoothing(e, !1));
} else
n.drawElement(e, t);
}
};
var Ide = function() {
return 0;
}, Nde = function(e, t) {
return e.getTextAngle(t, null);
}, Lde = function(e, t) {
return e.getTextAngle(t, "source");
}, Dde = function(e, t) {
return e.getTextAngle(t, "target");
}, Rde = function(e, t) {
return t.effectiveOpacity();
}, Lv = function(e, t) {
return t.pstyle("text-opacity").pfValue * t.effectiveOpacity();
};
la.drawCachedElement = function(e, t, n, r, o, a) {
var i = this, s = i.data, u = s.eleTxrCache, l = s.lblTxrCache, c = s.slbTxrCache, d = s.tlbTxrCache, f = t.boundingBox(), h = a === !0 ? u.reasons.highQuality : null;
if (!(f.w === 0 || f.h === 0 || !t.visible()) && (!r || wy(f, r))) {
var p = t.isEdge(), v = t.element()._private.rscratch.badLine;
i.drawElementUnderlay(e, t), i.drawCachedElementPortion(e, t, u, n, o, h, Ide, Rde), (!p || !v) && i.drawCachedElementPortion(e, t, l, n, o, h, Nde, Lv), p && !v && (i.drawCachedElementPortion(e, t, c, n, o, h, Lde, Lv), i.drawCachedElementPortion(e, t, d, n, o, h, Dde, Lv)), i.drawElementOverlay(e, t);
}
};
la.drawElements = function(e, t) {
for (var n = this, r = 0; r < t.length; r++) {
var o = t[r];
n.drawElement(e, o);
}
};
la.drawCachedElements = function(e, t, n, r) {
for (var o = this, a = 0; a < t.length; a++) {
var i = t[a];
o.drawCachedElement(e, i, n, r);
}
};
la.drawCachedNodes = function(e, t, n, r) {
for (var o = this, a = 0; a < t.length; a++) {
var i = t[a];
i.isNode() && o.drawCachedElement(e, i, n, r);
}
};
la.drawLayeredElements = function(e, t, n, r) {
var o = this, a = o.data.lyrTxrCache.getLayers(t, n);
if (a)
for (var i = 0; i < a.length; i++) {
var s = a[i], u = s.bb;
u.w === 0 || u.h === 0 || e.drawImage(s.canvas, u.x1, u.y1, u.w, u.h);
}
else
o.drawCachedElements(e, t, n, r);
};
var Da = {};
Da.drawEdge = function(e, t, n) {
var r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !0, o = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !0, a = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : !0, i = this, s = t._private.rscratch;
if (!(a && !t.visible()) && !(s.badLine || s.allpts == null || isNaN(s.allpts[0]))) {
var u;
n && (u = n, e.translate(-u.x1, -u.y1));
var l = a ? t.pstyle("opacity").value : 1, c = a ? 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 = l * c, b = l * c, x = function() {
var N = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : g;
d === "straight-triangle" ? (i.eleStrokeStyle(e, t, N), i.drawEdgeTrianglePath(t, e, s.allpts)) : (e.lineWidth = h, e.lineCap = p, i.eleStrokeStyle(e, t, N), i.drawEdgePath(t, e, s.allpts, f), e.lineCap = "butt");
}, w = function() {
var N = 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], N);
else {
e.lineCap = "butt";
return;
}
d === "straight-triangle" ? i.drawEdgeTrianglePath(t, e, s.allpts) : (i.drawEdgePath(t, e, s.allpts, f), e.lineCap = "butt");
}, C = function() {
o && i.drawEdgeOverlay(e, t);
}, k = function() {
o && i.drawEdgeUnderlay(e, t);
}, E = function() {
var N = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : b;
i.drawArrowheads(e, t, N);
}, S = function() {
i.drawElementText(e, t, null, r);
};
e.lineJoin = "round";
var O = t.pstyle("ghost").value === "yes";
if (O) {
var F = t.pstyle("ghost-offset-x").pfValue, $ = t.pstyle("ghost-offset-y").pfValue, A = t.pstyle("ghost-opacity").value, L = g * A;
e.translate(F, $), x(L), E(L), e.translate(-F, -$);
} else
w();
k(), x(), E(), C(), S(), n && e.translate(u.x1, u.y1);
}
};
var w_ = function(e) {
if (!["overlay", "underlay"].includes(e))
throw new Error("Invalid state");
return function(t, n) {
if (n.visible()) {
var r = n.pstyle("".concat(e, "-opacity")).value;
if (r !== 0) {
var o = this, a = o.usePaths(), i = n._private.rscratch, s = n.pstyle("".concat(e, "-padding")).pfValue, u = 2 * s, l = n.pstyle("".concat(e, "-color")).value;
t.lineWidth = u, i.edgeType === "self" && !a ? t.lineCap = "butt" : t.lineCap = "round", o.colorStrokeStyle(t, l[0], l[1], l[2], r), o.drawEdgePath(n, t, i.allpts, "solid");
}
}
};
};
Da.drawEdgeOverlay = w_("overlay");
Da.drawEdgeUnderlay = w_("underlay");
Da.drawEdgePath = function(e, t, n, r) {
var o = e._private.rscratch, a = t, i, s = !1, u = this.usePaths(), l = e.pstyle("line-dash-pattern").pfValue, c = e.pstyle("line-dash-offset").pfValue;
if (u) {
var d = n.join("$"), f = o.pathCacheKey && o.pathCacheKey === d;
f ? (i = t = o.pathCache, s = !0) : (i = t = new Path2D(), o.pathCacheKey = d, o.pathCache = i);
}
if (a.setLineDash)
switch (r) {
case "dotted":
a.setLineDash([1, 1]);
break;
case "dashed":
a.setLineDash(l), a.lineDashOffset = c;
break;
case "solid":
a.setLineDash([]);
break;
}
if (!s && !o.badLine)
switch (t.beginPath && t.beginPath(), t.moveTo(n[0], n[1]), o.edgeType) {
case "bezier":
case "self":
case "compound":
case "multibezier":
for (var h = 2; h + 3 < n.length; h += 4)
t.quadraticCurveTo(n[h], n[h + 1], n[h + 2], n[h + 3]);
break;
case "straight":
case "haystack":
for (var p = 2; p + 1 < n.length; p += 2)
t.lineTo(n[p], n[p + 1]);
break;
case "segments":
if (o.isRound) {
var v = GE(o.roundCorners), m;
try {
for (v.s(); !(m = v.n()).done; ) {
var g = m.value;
u_(t, g);
}
} catch (x) {
v.e(x);
} finally {
v.f();
}
t.lineTo(n[n.length - 2], n[n.length - 1]);
} else
for (var b = 2; b + 1 < n.length; b += 2)
t.lineTo(n[b], n[b + 1]);
break;
}
t = a, u ? t.stroke(i) : t.stroke(), t.setLineDash && t.setLineDash([]);
};
Da.drawEdgeTrianglePath = function(e, t, n) {
t.fillStyle = t.strokeStyle;
for (var r = e.pstyle("width").pfValue, o = 0; o + 1 < n.length; o += 2) {
var a = [n[o + 2] - n[o], n[o + 3] - n[o + 1]], i = Math.sqrt(a[0] * a[0] + a[1] * a[1]), s = [a[1] / i, -a[0] / i], u = [s[0] * r / 2, s[1] * r / 2];
t.beginPath(), t.moveTo(n[o] - u[0], n[o + 1] - u[1]), t.lineTo(n[o] + u[0], n[o + 1] + u[1]), t.lineTo(n[o + 2], n[o + 3]), t.closePath(), t.fill();
}
};
Da.drawArrowheads = function(e, t, n) {
var r = t._private.rscratch, o = r.edgeType === "haystack";
o || this.drawArrowhead(e, t, "source", r.arrowStartX, r.arrowStartY, r.srcArrowAngle, n), this.drawArrowhead(e, t, "mid-target", r.midX, r.midY, r.midtgtArrowAngle, n), this.drawArrowhead(e, t, "mid-source", r.midX, r.midY, r.midsrcArrowAngle, n), o || this.drawArrowhead(e, t, "target", r.arrowEndX, r.arrowEndY, r.tgtArrowAngle, n);
};
Da.drawArrowhead = function(e, t, n, r, o, a, i) {
if (!(isNaN(r) || r == null || isNaN(o) || o == null || isNaN(a) || a == null)) {
var s = this, u = t.pstyle(n + "-arrow-shape").value;
if (u !== "none") {
var l = 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, l, d, u, h, r, o, a), e.globalCompositeOperation = v);
var m = t.pstyle(n + "-arrow-color").value;
s.colorFillStyle(e, m[0], m[1], m[2], i), s.colorStrokeStyle(e, m[0], m[1], m[2], i), s.drawArrowShape(t, e, c, d, u, h, r, o, a);
}
}
};
Da.drawArrowShape = function(e, t, n, r, o, a, i, s, u) {
var l = this, c = this.usePaths() && o !== "triangle-cross", d = !1, f, h = t, p = {
x: i,
y: s
}, v = e.pstyle("arrow-scale").value, m = this.getArrowWidth(r, v), g = l.arrowShapes[o];
if (c) {
var b = l.arrowPathCache = l.arrowPathCache || [], x = ys(o), w = b[x];
w != null ? (f = t = w, d = !0) : (f = t = new Path2D(), b[x] = f);
}
d || (t.beginPath && t.beginPath(), c ? g.draw(t, 1, 0, {
x: 0,
y: 0
}, 1) : g.draw(t, m, u, p, r), t.closePath && t.closePath()), t = h, c && (t.translate(i, s), t.rotate(u), t.scale(m, m)), (n === "filled" || n === "both") && (c ? t.fill(f) : t.fill()), (n === "hollow" || n === "both") && (t.lineWidth = a / (c ? m : 1), t.lineJoin = "miter", c ? t.stroke(f) : t.stroke()), c && (t.scale(1 / m, 1 / m), t.rotate(-u), t.translate(-i, -s));
};
var Ly = {};
Ly.safeDrawImage = function(e, t, n, r, o, a, i, s, u, l) {
if (!(o <= 0 || a <= 0 || u <= 0 || l <= 0))
try {
e.drawImage(t, n, r, o, a, i, s, u, l);
} catch (c) {
Mt(c);
}
};
Ly.drawInscribedImage = function(e, t, n, r, o) {
var a = this, i = n.position(), s = i.x, u = i.y, l = n.cy().style(), c = l.getIndexedStyle.bind(l), 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), b = n._private.rscratch, x = c(n, "background-clip", "value", r), w = x === "node", C = c(n, "background-image-opacity", "value", r) * o, k = c(n, "background-image-smoothing", "value", r), E = n.pstyle("corner-radius").value;
E !== "auto" && (E = n.pstyle("corner-radius").pfValue);
var S = t.width || t.cachedW, O = t.height || t.cachedH;
(S == null || O == null) && (document.body.appendChild(t), S = t.cachedW = t.width || t.offsetWidth, O = t.cachedH = t.height || t.offsetHeight, document.body.removeChild(t));
var F = S, $ = O;
if (c(n, "background-width", "value", r) !== "auto" && (c(n, "background-width", "units", r) === "%" ? F = c(n, "background-width", "pfValue", r) * m : F = c(n, "background-width", "pfValue", r)), c(n, "background-height", "value", r) !== "auto" && (c(n, "background-height", "units", r) === "%" ? $ = c(n, "background-height", "pfValue", r) * g : $ = c(n, "background-height", "pfValue", r)), !(F === 0 || $ === 0)) {
if (d === "contain") {
var A = Math.min(m / F, g / $);
F *= A, $ *= A;
} else if (d === "cover") {
var A = Math.max(m / F, g / $);
F *= A, $ *= A;
}
var L = s - m / 2, N = c(n, "background-position-x", "units", r), M = c(n, "background-position-x", "pfValue", r);
N === "%" ? L += (m - F) * M : L += M;
var I = c(n, "background-offset-x", "units", r), z = c(n, "background-offset-x", "pfValue", r);
I === "%" ? L += (m - F) * z : L += z;
var R = u - g / 2, q = c(n, "background-position-y", "units", r), oe = c(n, "background-position-y", "pfValue", r);
q === "%" ? R += (g - $) * oe : R += oe;
var Q = c(n, "background-offset-y", "units", r), ae = c(n, "background-offset-y", "pfValue", r);
Q === "%" ? R += (g - $) * ae : R += ae, b.pathCache && (L -= s, R -= u, s = 0, u = 0);
var pe = e.globalAlpha;
e.globalAlpha = C;
var we = a.getImgSmoothing(e), ke = !1;
if (k === "no" && we ? (a.setImgSmoothing(e, !1), ke = !0) : k === "yes" && !we && (a.setImgSmoothing(e, !0), ke = !0), f === "no-repeat")
w && (e.save(), b.pathCache ? e.clip(b.pathCache) : (a.nodeShapes[a.getNodeShape(n)].draw(e, s, u, m, g, E, b), e.clip())), a.safeDrawImage(e, t, 0, 0, S, O, L, R, F, $), w && e.restore();
else {
var fe = e.createPattern(t, f);
e.fillStyle = fe, a.nodeShapes[a.getNodeShape(n)].draw(e, s, u, m, g, E, b), e.translate(L, R), e.fill(), e.translate(-L, -R);
}
e.globalAlpha = pe, ke && a.setImgSmoothing(e, we);
}
};
var Ns = {};
Ns.eleTextBiggerThanMin = function(e, t) {
if (!t) {
var n = e.cy().zoom(), r = this.getPixelRatio(), o = Math.ceil(by(n * r));
t = Math.pow(2, o);
}
var a = e.pstyle("font-size").pfValue * t, i = e.pstyle("min-zoomed-font-size").pfValue;
return !(a < i);
};
Ns.drawElementText = function(e, t, n, r, o) {
var a = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : !0, i = this;
if (r == null) {
if (a && !i.eleTextBiggerThanMin(t))
return;
} else if (r === !1)
return;
if (t.isNode()) {
var s = t.pstyle("label");
if (!s || !s.value)
return;
var u = i.getLabelJustification(t);
e.textAlign = u, e.textBaseline = "bottom";
} else {
var l = t.element()._private.rscratch.badLine, c = t.pstyle("label"), d = t.pstyle("source-label"), f = t.pstyle("target-label");
if (l || (!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)), o == null ? (i.drawText(e, t, null, h, a), t.isEdge() && (i.drawText(e, t, "source", h, a), i.drawText(e, t, "target", h, a))) : i.drawText(e, t, o, h, a), n && e.translate(p.x1, p.y1);
};
Ns.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;
};
Ns.setupTextStyle = function(e, t) {
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !0, r = t.pstyle("font-style").strValue, o = t.pstyle("font-size").pfValue + "px", a = t.pstyle("font-family").strValue, i = t.pstyle("font-weight").strValue, s = n ? t.effectiveOpacity() * t.pstyle("text-opacity").value : 1, u = t.pstyle("text-outline-opacity").value * s, l = t.pstyle("color").value, c = t.pstyle("text-outline-color").value;
e.font = r + " " + i + " " + o + " " + a, e.lineJoin = "round", this.colorFillStyle(e, l[0], l[1], l[2], s), this.colorStrokeStyle(e, c[0], c[1], c[2], u);
};
function Dv(e, t, n, r, o) {
var a = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : 5, i = arguments.length > 6 ? arguments[6] : void 0;
e.beginPath(), e.moveTo(t + a, n), e.lineTo(t + r - a, n), e.quadraticCurveTo(t + r, n, t + r, n + a), e.lineTo(t + r, n + o - a), e.quadraticCurveTo(t + r, n + o, t + r - a, n + o), e.lineTo(t + a, n + o), e.quadraticCurveTo(t, n + o, t, n + o - a), e.lineTo(t, n + a), e.quadraticCurveTo(t, n, t + a, n), e.closePath(), i ? e.stroke() : e.fill();
}
Ns.getTextAngle = function(e, t) {
var n, r = e._private, o = r.rscratch, a = t ? t + "-" : "", i = e.pstyle(a + "text-rotation"), s = _o(o, "labelAngle", t);
return i.strValue === "autorotate" ? n = e.isEdge() ? s : 0 : i.strValue === "none" ? n = 0 : n = i.pfValue, n;
};
Ns.drawText = function(e, t, n) {
var r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !0, o = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !0, a = t._private, i = a.rscratch, s = o ? t.effectiveOpacity() : 1;
if (!(o && (s === 0 || t.pstyle("text-opacity").value === 0))) {
n === "main" && (n = null);
var u = _o(i, "labelX", n), l = _o(i, "labelY", n), c, d, f = this.getLabelText(t, n);
if (f != null && f !== "" && !isNaN(u) && !isNaN(l)) {
this.setupTextStyle(e, t, o);
var h = n ? n + "-" : "", p = _o(i, "labelWidth", n), v = _o(i, "labelHeight", n), m = t.pstyle(h + "text-margin-x").pfValue, g = t.pstyle(h + "text-margin-y").pfValue, b = t.isEdge(), x = t.pstyle("text-halign").value, w = t.pstyle("text-valign").value;
b && (x = "center", w = "center"), u += m, l += g;
var C;
switch (r ? C = this.getTextAngle(t, n) : C = 0, C !== 0 && (c = u, d = l, e.translate(c, d), e.rotate(C), u = 0, l = 0), w) {
case "top":
break;
case "center":
l += v / 2;
break;
case "bottom":
l += v;
break;
}
var k = t.pstyle("text-background-opacity").value, E = t.pstyle("text-border-opacity").value, S = t.pstyle("text-border-width").pfValue, O = t.pstyle("text-background-padding").pfValue, F = t.pstyle("text-background-shape").strValue, $ = F.indexOf("round") === 0, A = 2;
if (k > 0 || S > 0 && E > 0) {
var L = u - O;
switch (x) {
case "left":
L -= p;
break;
case "center":
L -= p / 2;
break;
}
var N = l - v - O, M = p + 2 * O, I = v + 2 * O;
if (k > 0) {
var z = e.fillStyle, R = t.pstyle("text-background-color").value;
e.fillStyle = "rgba(" + R[0] + "," + R[1] + "," + R[2] + "," + k * s + ")", $ ? Dv(e, L, N, M, I, A) : e.fillRect(L, N, M, I), e.fillStyle = z;
}
if (S > 0 && E > 0) {
var q = e.strokeStyle, oe = e.lineWidth, Q = t.pstyle("text-border-color").value, ae = t.pstyle("text-border-style").value;
if (e.strokeStyle = "rgba(" + Q[0] + "," + Q[1] + "," + Q[2] + "," + E * s + ")", e.lineWidth = S, e.setLineDash)
switch (ae) {
case "dotted":
e.setLineDash([1, 1]);
break;
case "dashed":
e.setLineDash([4, 2]);
break;
case "double":
e.lineWidth = S / 4, e.setLineDash([]);
break;
case "solid":
e.setLineDash([]);
break;
}
if ($ ? Dv(e, L, N, M, I, A, "stroke") : e.strokeRect(L, N, M, I), ae === "double") {
var pe = S / 2;
$ ? Dv(e, L + pe, N + pe, M - pe * 2, I - pe * 2, A, "stroke") : e.strokeRect(L + pe, N + pe, M - pe * 2, I - pe * 2);
}
e.setLineDash && e.setLineDash([]), e.lineWidth = oe, e.strokeStyle = q;
}
}
var we = 2 * t.pstyle("text-outline-width").pfValue;
if (we > 0 && (e.lineWidth = we), t.pstyle("text-wrap").value === "wrap") {
var ke = _o(i, "labelWrapCachedLines", n), fe = _o(i, "labelLineHeight", n), ge = p / 2, J = this.getLabelJustification(t);
switch (J === "auto" || (x === "left" ? J === "left" ? u += -p : J === "center" && (u += -ge) : x === "center" ? J === "left" ? u += -ge : J === "right" && (u += ge) : x === "right" && (J === "center" ? u += ge : J === "right" && (u += p))), w) {
case "top":
l -= (ke.length - 1) * fe;
break;
case "center":
case "bottom":
l -= (ke.length - 1) * fe;
break;
}
for (var te = 0; te < ke.length; te++)
we > 0 && e.strokeText(ke[te], u, l), e.fillText(ke[te], u, l), l += fe;
} else
we > 0 && e.strokeText(f, u, l), e.fillText(f, u, l);
C !== 0 && (e.rotate(-C), e.translate(-c, -d));
}
}
};
var nu = {};
nu.drawNode = function(e, t, n) {
var r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !0, o = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !0, a = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : !0, i = this, s, u, l = t._private, c = l.rscratch, d = t.position();
if (!(!Ve(d.x) || !Ve(d.y)) && !(a && !t.visible())) {
var f = a ? t.effectiveOpacity() : 1, h = i.usePaths(), p, v = !1, m = t.padding();
s = t.width() + 2 * m, u = t.height() + 2 * m;
var g;
n && (g = n, e.translate(-g.x1, -g.y1));
for (var b = t.pstyle("background-image"), x = b.value, w = new Array(x.length), C = new Array(x.length), k = 0, E = 0; E < x.length; E++) {
var S = x[E], O = w[E] = S != null && S !== "none";
if (O) {
var F = t.cy().style().getIndexedStyle(t, "background-image-crossorigin", "value", E);
k++, C[E] = i.getCachedImage(S, F, function() {
l.backgroundTimestamp = Date.now(), t.emitAndNotify("background");
});
}
}
var $ = t.pstyle("background-blacken").value, A = t.pstyle("border-width").pfValue, L = t.pstyle("background-opacity").value * f, N = t.pstyle("border-color").value, M = t.pstyle("border-style").value, I = t.pstyle("border-join").value, z = t.pstyle("border-cap").value, R = t.pstyle("border-position").value, q = t.pstyle("border-dash-pattern").pfValue, oe = t.pstyle("border-dash-offset").pfValue, Q = t.pstyle("border-opacity").value * f, ae = t.pstyle("outline-width").pfValue, pe = t.pstyle("outline-color").value, we = t.pstyle("outline-style").value, ke = t.pstyle("outline-opacity").value * f, fe = t.pstyle("outline-offset").value, ge = t.pstyle("corner-radius").value;
ge !== "auto" && (ge = t.pstyle("corner-radius").pfValue);
var J = function() {
var Oe = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : L;
i.eleFillStyle(e, t, Oe);
}, te = function() {
var Oe = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Q;
i.colorStrokeStyle(e, N[0], N[1], N[2], Oe);
}, le = function() {
var Oe = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : ke;
i.colorStrokeStyle(e, pe[0], pe[1], pe[2], Oe);
}, Ee = function(Oe, ye, Fe, Ye) {
var Je = i.nodePathCache = i.nodePathCache || [], re = sS(Fe === "polygon" ? Fe + "," + Ye.join(",") : Fe, "" + ye, "" + Oe, "" + ge), Se = Je[re], be, Le = !1;
return Se != null ? (be = Se, Le = !0, c.pathCache = be) : (be = new Path2D(), Je[re] = c.pathCache = be), {
path: be,
cacheHit: Le
};
}, Ne = t.pstyle("shape").strValue, je = t.pstyle("shape-polygon-points").pfValue;
if (h) {
e.translate(d.x, d.y);
var _e = Ee(s, u, Ne, je);
p = _e.path, v = _e.cacheHit;
}
var De = function() {
if (!v) {
var Oe = d;
h && (Oe = {
x: 0,
y: 0
}), i.nodeShapes[i.getNodeShape(t)].draw(p || e, Oe.x, Oe.y, s, u, ge, c);
}
h ? e.fill(p) : e.fill();
}, Ae = function() {
for (var Oe = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : f, ye = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, Fe = l.backgrounding, Ye = 0, Je = 0; Je < C.length; Je++) {
var re = t.cy().style().getIndexedStyle(t, "background-image-containment", "value", Je);
if (ye && re === "over" || !ye && re === "inside") {
Ye++;
continue;
}
w[Je] && C[Je].complete && !C[Je].error && (Ye++, i.drawInscribedImage(e, C[Je], t, Je, Oe));
}
l.backgrounding = Ye !== k, Fe !== l.backgrounding && t.updateStyle(!1);
}, Be = function() {
var Oe = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1, ye = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : f;
i.hasPie(t) && (i.drawPie(e, t, ye), Oe && (h || i.nodeShapes[i.getNodeShape(t)].draw(e, d.x, d.y, s, u, ge, c)));
}, Ue = function() {
var Oe = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : f, ye = ($ > 0 ? $ : -$) * Oe, Fe = $ > 0 ? 0 : 255;
$ !== 0 && (i.colorFillStyle(e, Fe, Fe, Fe, ye), h ? e.fill(p) : e.fill());
}, Ze = function() {
if (A > 0) {
if (e.lineWidth = A, e.lineCap = z, e.lineJoin = I, e.setLineDash)
switch (M) {
case "dotted":
e.setLineDash([1, 1]);
break;
case "dashed":
e.setLineDash(q), e.lineDashOffset = oe;
break;
case "solid":
case "double":
e.setLineDash([]);
break;
}
if (R !== "center") {
if (e.save(), e.lineWidth *= 2, R === "inside")
h ? e.clip(p) : e.clip();
else {
var Oe = new Path2D();
Oe.rect(-s / 2 - A, -u / 2 - A, s + 2 * A, u + 2 * A), Oe.addPath(p), e.clip(Oe, "evenodd");
}
h ? e.stroke(p) : e.stroke(), e.restore();
} else
h ? e.stroke(p) : e.stroke();
if (M === "double") {
e.lineWidth = A / 3;
var ye = e.globalCompositeOperation;
e.globalCompositeOperation = "destination-out", h ? e.stroke(p) : e.stroke(), e.globalCompositeOperation = ye;
}
e.setLineDash && e.setLineDash([]);
}
}, Me = function() {
if (ae > 0) {
if (e.lineWidth = ae, e.lineCap = "butt", e.setLineDash)
switch (we) {
case "dotted":
e.setLineDash([1, 1]);
break;
case "dashed":
e.setLineDash([4, 2]);
break;
case "solid":
case "double":
e.setLineDash([]);
break;
}
var Oe = d;
h && (Oe = {
x: 0,
y: 0
});
var ye = i.getNodeShape(t), Fe = A;
R === "inside" && (Fe = 0), R === "outside" && (Fe *= 2);
var Ye = (s + Fe + (ae + fe)) / s, Je = (u + Fe + (ae + fe)) / u, re = s * Ye, Se = u * Je, be = i.nodeShapes[ye].points, Le;
if (h) {
var Tt = Ee(re, Se, ye, be);
Le = Tt.path;
}
if (ye === "ellipse")
i.drawEllipsePath(Le || e, Oe.x, Oe.y, re, Se);
else if (["round-diamond", "round-heptagon", "round-hexagon", "round-octagon", "round-pentagon", "round-polygon", "round-triangle", "round-tag"].includes(ye)) {
var Ct = 0, Dt = 0, Vt = 0;
ye === "round-diamond" ? Ct = (Fe + fe + ae) * 1.4 : ye === "round-heptagon" ? (Ct = (Fe + fe + ae) * 1.075, Vt = -(Fe / 2 + fe + ae) / 35) : ye === "round-hexagon" ? Ct = (Fe + fe + ae) * 1.12 : ye === "round-pentagon" ? (Ct = (Fe + fe + ae) * 1.13, Vt = -(Fe / 2 + fe + ae) / 15) : ye === "round-tag" ? (Ct = (Fe + fe + ae) * 1.12, Dt = (Fe / 2 + ae + fe) * 0.07) : ye === "round-triangle" && (Ct = (Fe + fe + ae) * (Math.PI / 2), Vt = -(Fe + fe / 2 + ae) / Math.PI), Ct !== 0 && (Ye = (s + Ct) / s, re = s * Ye, ["round-hexagon", "round-tag"].includes(ye) || (Je = (u + Ct) / u, Se = u * Je)), ge = ge === "auto" ? yS(re, Se) : ge;
for (var qt = re / 2, bn = Se / 2, an = ge + (Fe + ae + fe) / 2, sn = new Array(be.length / 2), wn = new Array(be.length / 2), xn = 0; xn < be.length / 2; xn++)
sn[xn] = {
x: Oe.x + Dt + qt * be[xn * 2],
y: Oe.y + Vt + bn * be[xn * 2 + 1]
};
var mn, or, Hn, Un, Wt = sn.length;
for (or = sn[Wt - 1], mn = 0; mn < Wt; mn++)
Hn = sn[mn % Wt], Un = sn[(mn + 1) % Wt], wn[mn] = Iy(or, Hn, Un, an), or = Hn, Hn = Un;
i.drawRoundPolygonPath(Le || e, Oe.x + Dt, Oe.y + Vt, s * Ye, u * Je, be, wn);
} else if (["roundrectangle", "round-rectangle"].includes(ye))
ge = ge === "auto" ? ws(re, Se) : ge, i.drawRoundRectanglePath(Le || e, Oe.x, Oe.y, re, Se, ge + (Fe + ae + fe) / 2);
else if (["cutrectangle", "cut-rectangle"].includes(ye))
ge = ge === "auto" ? xy() : ge, i.drawCutRectanglePath(Le || e, Oe.x, Oe.y, re, Se, null, ge + (Fe + ae + fe) / 4);
else if (["bottomroundrectangle", "bottom-round-rectangle"].includes(ye))
ge = ge === "auto" ? ws(re, Se) : ge, i.drawBottomRoundRectanglePath(Le || e, Oe.x, Oe.y, re, Se, ge + (Fe + ae + fe) / 2);
else if (ye === "barrel")
i.drawBarrelPath(Le || e, Oe.x, Oe.y, re, Se);
else if (ye.startsWith("polygon") || ["rhomboid", "right-rhomboid", "round-tag", "tag", "vee"].includes(ye)) {
var ln = (Fe + ae + fe) / s;
be = nf(rf(be, ln)), i.drawPolygonPath(Le || e, Oe.x, Oe.y, s, u, be);
} else {
var fn = (Fe + ae + fe) / s;
be = nf(rf(be, -fn)), i.drawPolygonPath(Le || e, Oe.x, Oe.y, s, u, be);
}
if (h ? e.stroke(Le) : e.stroke(), we === "double") {
e.lineWidth = Fe / 3;
var ar = e.globalCompositeOperation;
e.globalCompositeOperation = "destination-out", h ? e.stroke(Le) : e.stroke(), e.globalCompositeOperation = ar;
}
e.setLineDash && e.setLineDash([]);
}
}, rt = function() {
o && i.drawNodeOverlay(e, t, d, s, u);
}, nt = function() {
o && i.drawNodeUnderlay(e, t, d, s, u);
}, st = function() {
i.drawElementText(e, t, null, r);
}, P = t.pstyle("ghost").value === "yes";
if (P) {
var j = t.pstyle("ghost-offset-x").pfValue, se = t.pstyle("ghost-offset-y").pfValue, ce = t.pstyle("ghost-opacity").value, de = ce * f;
e.translate(j, se), le(), Me(), J(ce * L), De(), Ae(de, !0), te(ce * Q), Ze(), Be($ !== 0 || A !== 0), Ae(de, !1), Ue(de), e.translate(-j, -se);
}
h && e.translate(-d.x, -d.y), nt(), h && e.translate(d.x, d.y), le(), Me(), J(), De(), Ae(f, !0), te(), Ze(), Be($ !== 0 || A !== 0), Ae(f, !1), Ue(), h && e.translate(-d.x, -d.y), st(), rt(), n && e.translate(g.x1, g.y1);
}
};
var x_ = function(e) {
if (!["overlay", "underlay"].includes(e))
throw new Error("Invalid state");
return function(t, n, r, o, a) {
var i = this;
if (n.visible()) {
var s = n.pstyle("".concat(e, "-padding")).pfValue, u = n.pstyle("".concat(e, "-opacity")).value, l = n.pstyle("".concat(e, "-color")).value, c = n.pstyle("".concat(e, "-shape")).value, d = n.pstyle("".concat(e, "-corner-radius")).value;
if (u > 0) {
if (r = r || n.position(), o == null || a == null) {
var f = n.padding();
o = n.width() + 2 * f, a = n.height() + 2 * f;
}
i.colorFillStyle(t, l[0], l[1], l[2], u), i.nodeShapes[c].draw(t, r.x, r.y, o + s * 2, a + s * 2, d), t.fill();
}
}
};
};
nu.drawNodeOverlay = x_("overlay");
nu.drawNodeUnderlay = x_("underlay");
nu.hasPie = function(e) {
return e = e[0], e._private.hasPie;
};
nu.drawPie = function(e, t, n, r) {
t = t[0], r = r || t.position();
var o = t.cy().style(), a = t.pstyle("pie-size"), i = r.x, s = r.y, u = t.width(), l = t.height(), c = Math.min(u, l) / 2, d = 0, f = this.usePaths();
f && (i = 0, s = 0), a.units === "%" ? c = c * a.pfValue : a.pfValue !== void 0 && (c = a.pfValue / 2);
for (var h = 1; h <= o.pieBackgroundN; h++) {
var 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 b = 1.5 * Math.PI + 2 * Math.PI * d, x = 2 * Math.PI * g, w = b + x;
p === 0 || d >= 1 || d + g > 1 || (e.beginPath(), e.moveTo(i, s), e.arc(i, s, c, b, w), e.closePath(), this.colorFillStyle(e, v[0], v[1], v[2], m), e.fill(), d += g);
}
};
var Xr = {}, Bde = 100;
Xr.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;
};
Xr.paintCache = function(e) {
for (var t = this.paintCaches = this.paintCaches || [], n = !0, r, o = 0; o < t.length; o++)
if (r = t[o], r.context === e) {
n = !1;
break;
}
return n && (r = {
context: e
}, t.push(r)), r;
};
Xr.createGradientStyleFor = function(e, t, n, r, o) {
var a, i = this.usePaths(), s = n.pstyle(t + "-gradient-stop-colors").value, u = n.pstyle(t + "-gradient-stop-positions").pfValue;
if (r === "radial-gradient")
if (n.isEdge()) {
var l = n.sourceEndpoint(), c = n.targetEndpoint(), d = n.midpoint(), f = bs(l, d), h = bs(c, d);
a = 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();
a = e.createRadialGradient(p.x, p.y, 0, p.x, p.y, Math.max(v, m));
}
else if (n.isEdge()) {
var g = n.sourceEndpoint(), b = n.targetEndpoint();
a = e.createLinearGradient(g.x, g.y, b.x, b.y);
} else {
var x = i ? {
x: 0,
y: 0
} : n.position(), w = n.paddedWidth(), C = n.paddedHeight(), k = w / 2, E = C / 2, S = n.pstyle("background-gradient-direction").value;
switch (S) {
case "to-bottom":
a = e.createLinearGradient(x.x, x.y - E, x.x, x.y + E);
break;
case "to-top":
a = e.createLinearGradient(x.x, x.y + E, x.x, x.y - E);
break;
case "to-left":
a = e.createLinearGradient(x.x + k, x.y, x.x - k, x.y);
break;
case "to-right":
a = e.createLinearGradient(x.x - k, x.y, x.x + k, x.y);
break;
case "to-bottom-right":
case "to-right-bottom":
a = e.createLinearGradient(x.x - k, x.y - E, x.x + k, x.y + E);
break;
case "to-top-right":
case "to-right-top":
a = e.createLinearGradient(x.x - k, x.y + E, x.x + k, x.y - E);
break;
case "to-bottom-left":
case "to-left-bottom":
a = e.createLinearGradient(x.x + k, x.y - E, x.x - k, x.y + E);
break;
case "to-top-left":
case "to-left-top":
a = e.createLinearGradient(x.x + k, x.y + E, x.x - k, x.y - E);
break;
}
}
if (!a) return null;
for (var O = u.length === s.length, F = s.length, $ = 0; $ < F; $++)
a.addColorStop(O ? u[$] : $ / (F - 1), "rgba(" + s[$][0] + "," + s[$][1] + "," + s[$][2] + "," + o + ")");
return a;
};
Xr.gradientFillStyle = function(e, t, n, r) {
var o = this.createGradientStyleFor(e, "background", t, n, r);
if (!o) return null;
e.fillStyle = o;
};
Xr.colorFillStyle = function(e, t, n, r, o) {
e.fillStyle = "rgba(" + t + "," + n + "," + r + "," + o + ")";
};
Xr.eleFillStyle = function(e, t, n) {
var r = t.pstyle("background-fill").value;
if (r === "linear-gradient" || r === "radial-gradient")
this.gradientFillStyle(e, t, r, n);
else {
var o = t.pstyle("background-color").value;
this.colorFillStyle(e, o[0], o[1], o[2], n);
}
};
Xr.gradientStrokeStyle = function(e, t, n, r) {
var o = this.createGradientStyleFor(e, "line", t, n, r);
if (!o) return null;
e.strokeStyle = o;
};
Xr.colorStrokeStyle = function(e, t, n, r, o) {
e.strokeStyle = "rgba(" + t + "," + n + "," + r + "," + o + ")";
};
Xr.eleStrokeStyle = function(e, t, n) {
var r = t.pstyle("line-fill").value;
if (r === "linear-gradient" || r === "radial-gradient")
this.gradientStrokeStyle(e, t, r, n);
else {
var o = t.pstyle("line-color").value;
this.colorStrokeStyle(e, o[0], o[1], o[2], n);
}
};
Xr.matchCanvasSize = function(e) {
var t = this, n = t.data, r = t.findContainerClientCoords(), o = r[2], a = r[3], i = t.getPixelRatio(), s = t.motionBlurPxRatio;
(e === t.data.bufferCanvases[t.MOTIONBLUR_BUFFER_NODE] || e === t.data.bufferCanvases[t.MOTIONBLUR_BUFFER_DRAG]) && (i = s);
var u = o * i, l = a * i, c;
if (!(u === t.canvasWidth && l === t.canvasHeight)) {
t.fontCaches = null;
var d = n.canvasContainer;
d.style.width = o + "px", d.style.height = a + "px";
for (var f = 0; f < t.CANVAS_LAYERS; f++)
c = n.canvases[f], c.width = u, c.height = l, c.style.width = o + "px", c.style.height = a + "px";
for (var f = 0; f < t.BUFFER_COUNT; f++)
c = n.bufferCanvases[f], c.width = u, c.height = l, c.style.width = o + "px", c.style.height = a + "px";
t.textureMult = 1, i <= 1 && (c = n.bufferCanvases[t.TEXTURE_BUFFER], t.textureMult = 2, c.width = u * t.textureMult, c.height = l * t.textureMult), t.canvasWidth = u, t.canvasHeight = l;
}
};
Xr.renderTo = function(e, t, n, r) {
this.render({
forcedContext: e,
forcedZoom: t,
forcedPan: n,
drawAllLayers: !0,
forcedPxRatio: r
});
};
Xr.render = function(e) {
e = e || dS();
var t = e.forcedContext, n = e.drawAllLayers, r = e.drawOnlyNodeLayer, o = e.forcedZoom, a = e.forcedPan, i = this, s = e.forcedPxRatio === void 0 ? this.getPixelRatio() : e.forcedPxRatio, u = i.cy, l = i.data, c = l.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 = u.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 b = u.style(), x = u.zoom(), w = o !== void 0 ? o : x, C = u.pan(), k = {
x: C.x,
y: C.y
}, E = {
zoom: x,
pan: {
x: C.x,
y: C.y
}
}, S = i.prevViewport, O = S === void 0 || E.zoom !== S.zoom || E.pan.x !== S.pan.x || E.pan.y !== S.pan.y;
!O && !(v && !p) && (i.motionBlurPxRatio = 1), a && (k = a), w *= s, k.x *= s, k.y *= s;
var F = i.getCachedZSortedEles();
function $(_e, De, Ae, Be, Ue) {
var Ze = _e.globalCompositeOperation;
_e.globalCompositeOperation = "destination-out", i.colorFillStyle(_e, 255, 255, 255, i.motionBlurTransparency), _e.fillRect(De, Ae, Be, Ue), _e.globalCompositeOperation = Ze;
}
function A(_e, De) {
var Ae, Be, Ue, Ze;
!i.clearingMotionBlur && (_e === l.bufferContexts[i.MOTIONBLUR_BUFFER_NODE] || _e === l.bufferContexts[i.MOTIONBLUR_BUFFER_DRAG]) ? (Ae = {
x: C.x * h,
y: C.y * h
}, Be = x * h, Ue = i.canvasWidth * h, Ze = i.canvasHeight * h) : (Ae = k, Be = w, Ue = i.canvasWidth, Ze = i.canvasHeight), _e.setTransform(1, 0, 0, 1, 0, 0), De === "motionBlur" ? $(_e, 0, 0, Ue, Ze) : !t && (De === void 0 || De) && _e.clearRect(0, 0, Ue, Ze), n || (_e.translate(Ae.x, Ae.y), _e.scale(Be, Be)), a && _e.translate(a.x, a.y), o && _e.scale(o, o);
}
if (d || (i.textureDrawLastFrame = !1), d) {
if (i.textureDrawLastFrame = !0, !i.textureCache) {
i.textureCache = {}, i.textureCache.bb = u.mutableElements().boundingBox(), i.textureCache.texture = i.data.bufferCanvases[i.TEXTURE_BUFFER];
var L = i.data.bufferContexts[i.TEXTURE_BUFFER];
L.setTransform(1, 0, 0, 1, 0, 0), L.clearRect(0, 0, i.canvasWidth * i.textureMult, i.canvasHeight * i.textureMult), i.render({
forcedContext: L,
drawOnlyNodeLayer: !0,
forcedPxRatio: s * i.textureMult
});
var E = i.textureCache.viewport = {
zoom: u.zoom(),
pan: u.pan(),
width: i.canvasWidth,
height: i.canvasHeight
};
E.mpan = {
x: (0 - E.pan.x) / E.zoom,
y: (0 - E.pan.y) / E.zoom
};
}
c[i.DRAG] = !1, c[i.NODE] = !1;
var N = l.contexts[i.NODE], M = i.textureCache.texture, E = i.textureCache.viewport;
N.setTransform(1, 0, 0, 1, 0, 0), f ? $(N, 0, 0, E.width, E.height) : N.clearRect(0, 0, E.width, E.height);
var I = b.core("outside-texture-bg-color").value, z = b.core("outside-texture-bg-opacity").value;
i.colorFillStyle(N, I[0], I[1], I[2], z), N.fillRect(0, 0, E.width, E.height);
var x = u.zoom();
A(N, !1), N.clearRect(E.mpan.x, E.mpan.y, E.width / E.zoom / s, E.height / E.zoom / s), N.drawImage(M, E.mpan.x, E.mpan.y, E.width / E.zoom / s, E.height / E.zoom / s);
} else i.textureOnViewport && !t && (i.textureCache = null);
var R = u.extent(), q = i.pinching || i.hoverData.dragging || i.swipePanning || i.data.wheelZooming || i.hoverData.draggingEles || i.cy.animated(), oe = i.hideEdgesOnViewport && q, Q = [];
if (Q[i.NODE] = !c[i.NODE] && f && !i.clearedForMotionBlur[i.NODE] || i.clearingMotionBlur, Q[i.NODE] && (i.clearedForMotionBlur[i.NODE] = !0), Q[i.DRAG] = !c[i.DRAG] && f && !i.clearedForMotionBlur[i.DRAG] || i.clearingMotionBlur, Q[i.DRAG] && (i.clearedForMotionBlur[i.DRAG] = !0), c[i.NODE] || n || r || Q[i.NODE]) {
var ae = f && !Q[i.NODE] && h !== 1, N = t || (ae ? i.data.bufferContexts[i.MOTIONBLUR_BUFFER_NODE] : l.contexts[i.NODE]), pe = f && !ae ? "motionBlur" : void 0;
A(N, pe), oe ? i.drawCachedNodes(N, F.nondrag, s, R) : i.drawLayeredElements(N, F.nondrag, s, R), i.debug && i.drawDebugPoints(N, F.nondrag), !n && !f && (c[i.NODE] = !1);
}
if (!r && (c[i.DRAG] || n || Q[i.DRAG])) {
var ae = f && !Q[i.DRAG] && h !== 1, N = t || (ae ? i.data.bufferContexts[i.MOTIONBLUR_BUFFER_DRAG] : l.contexts[i.DRAG]);
A(N, f && !ae ? "motionBlur" : void 0), oe ? i.drawCachedNodes(N, F.drag, s, R) : i.drawCachedElements(N, F.drag, s, R), i.debug && i.drawDebugPoints(N, F.drag), !n && !f && (c[i.DRAG] = !1);
}
if (i.showFps || !r && c[i.SELECT_BOX] && !n) {
var N = t || l.contexts[i.SELECT_BOX];
if (A(N), i.selection[4] == 1 && (i.hoverData.selecting || i.touchData.selecting)) {
var x = i.cy.zoom(), we = b.core("selection-box-border-width").value / x;
N.lineWidth = we, N.fillStyle = "rgba(" + b.core("selection-box-color").value[0] + "," + b.core("selection-box-color").value[1] + "," + b.core("selection-box-color").value[2] + "," + b.core("selection-box-opacity").value + ")", N.fillRect(i.selection[0], i.selection[1], i.selection[2] - i.selection[0], i.selection[3] - i.selection[1]), we > 0 && (N.strokeStyle = "rgba(" + b.core("selection-box-border-color").value[0] + "," + b.core("selection-box-border-color").value[1] + "," + b.core("selection-box-border-color").value[2] + "," + b.core("selection-box-opacity").value + ")", N.strokeRect(i.selection[0], i.selection[1], i.selection[2] - i.selection[0], i.selection[3] - i.selection[1]));
}
if (l.bgActivePosistion && !i.hoverData.selecting) {
var x = i.cy.zoom(), ke = l.bgActivePosistion;
N.fillStyle = "rgba(" + b.core("active-bg-color").value[0] + "," + b.core("active-bg-color").value[1] + "," + b.core("active-bg-color").value[2] + "," + b.core("active-bg-opacity").value + ")", N.beginPath(), N.arc(ke.x, ke.y, b.core("active-bg-size").pfValue / x, 0, 2 * Math.PI), N.fill();
}
var fe = i.lastRedrawTime;
if (i.showFps && fe) {
fe = Math.round(fe);
var ge = Math.round(1e3 / fe);
N.setTransform(1, 0, 0, 1, 0, 0), N.fillStyle = "rgba(255, 0, 0, 0.75)", N.strokeStyle = "rgba(255, 0, 0, 0.75)", N.lineWidth = 1, N.fillText("1 frame = " + fe + " ms = " + ge + " fps", 0, 20);
var J = 60;
N.strokeRect(0, 30, 250, 20), N.fillRect(0, 30, 250 * Math.min(ge / J, 1), 20);
}
n || (c[i.SELECT_BOX] = !1);
}
if (f && h !== 1) {
var te = l.contexts[i.NODE], le = i.data.bufferCanvases[i.MOTIONBLUR_BUFFER_NODE], Ee = l.contexts[i.DRAG], Ne = i.data.bufferCanvases[i.MOTIONBLUR_BUFFER_DRAG], je = function(_e, De, Ae) {
_e.setTransform(1, 0, 0, 1, 0, 0), Ae || !g ? _e.clearRect(0, 0, i.canvasWidth, i.canvasHeight) : $(_e, 0, 0, i.canvasWidth, i.canvasHeight);
var Be = h;
_e.drawImage(
De,
// img
0,
0,
// sx, sy
i.canvasWidth * Be,
i.canvasHeight * Be,
// sw, sh
0,
0,
// x, y
i.canvasWidth,
i.canvasHeight
// w, h
);
};
(c[i.NODE] || Q[i.NODE]) && (je(te, le, Q[i.NODE]), c[i.NODE] = !1), (c[i.DRAG] || Q[i.DRAG]) && (je(Ee, Ne, Q[i.DRAG]), c[i.DRAG] = !1);
}
i.prevViewport = E, 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();
}, Bde)), t || u.emit("render");
};
var Ai = {};
Ai.drawPolygonPath = function(e, t, n, r, o, a) {
var i = r / 2, s = o / 2;
e.beginPath && e.beginPath(), e.moveTo(t + i * a[0], n + s * a[1]);
for (var u = 1; u < a.length / 2; u++)
e.lineTo(t + i * a[u * 2], n + s * a[u * 2 + 1]);
e.closePath();
};
Ai.drawRoundPolygonPath = function(e, t, n, r, o, a, i) {
i.forEach(function(s) {
return u_(e, s);
}), e.closePath();
};
Ai.drawRoundRectanglePath = function(e, t, n, r, o, a) {
var i = r / 2, s = o / 2, u = a === "auto" ? ws(r, o) : Math.min(a, s, i);
e.beginPath && e.beginPath(), e.moveTo(t, n - s), e.arcTo(t + i, n - s, t + i, n, u), e.arcTo(t + i, n + s, t, n + s, u), e.arcTo(t - i, n + s, t - i, n, u), e.arcTo(t - i, n - s, t, n - s, u), e.lineTo(t, n - s), e.closePath();
};
Ai.drawBottomRoundRectanglePath = function(e, t, n, r, o, a) {
var i = r / 2, s = o / 2, u = a === "auto" ? ws(r, o) : a;
e.beginPath && e.beginPath(), e.moveTo(t, n - s), e.lineTo(t + i, n - s), e.lineTo(t + i, n), e.arcTo(t + i, n + s, t, n + s, u), e.arcTo(t - i, n + s, t - i, n, u), e.lineTo(t - i, n - s), e.lineTo(t, n - s), e.closePath();
};
Ai.drawCutRectanglePath = function(e, t, n, r, o, a, i) {
var s = r / 2, u = o / 2, l = i === "auto" ? xy() : i;
e.beginPath && e.beginPath(), e.moveTo(t - s + l, n - u), e.lineTo(t + s - l, n - u), e.lineTo(t + s, n - u + l), e.lineTo(t + s, n + u - l), e.lineTo(t + s - l, n + u), e.lineTo(t - s + l, n + u), e.lineTo(t - s, n + u - l), e.lineTo(t - s, n - u + l), e.closePath();
};
Ai.drawBarrelPath = function(e, t, n, r, o) {
var a = r / 2, i = o / 2, s = t - a, u = t + a, l = n - i, c = n + i, d = L0(r, o), f = d.widthOffset, h = d.heightOffset, p = d.ctrlPtOffsetPct * f;
e.beginPath && e.beginPath(), e.moveTo(s, l + h), e.lineTo(s, c - h), e.quadraticCurveTo(s + p, c, s + f, c), e.lineTo(u - f, c), e.quadraticCurveTo(u - p, c, u, c - h), e.lineTo(u, l + h), e.quadraticCurveTo(u - p, l, u - f, l), e.lineTo(s + f, l), e.quadraticCurveTo(s + p, l, s, l + h), e.closePath();
};
var yk = Math.sin(0), bk = Math.cos(0), K0 = {}, G0 = {}, k_ = Math.PI / 40;
for (var Gs = 0 * Math.PI; Gs < 2 * Math.PI; Gs += k_)
K0[Gs] = Math.sin(Gs), G0[Gs] = Math.cos(Gs);
Ai.drawEllipsePath = function(e, t, n, r, o) {
if (e.beginPath && e.beginPath(), e.ellipse)
e.ellipse(t, n, r / 2, o / 2, 0, 0, 2 * Math.PI);
else
for (var a, i, s = r / 2, u = o / 2, l = 0 * Math.PI; l < 2 * Math.PI; l += k_)
a = t - s * K0[l] * yk + s * G0[l] * bk, i = n + u * G0[l] * yk + u * K0[l] * bk, l === 0 ? e.moveTo(a, i) : e.lineTo(a, i);
e.closePath();
};
var ad = {};
ad.createBuffer = function(e, t) {
var n = document.createElement("canvas");
return n.width = e, n.height = t, [n, n.getContext("2d")];
};
ad.bufferCanvasImage = function(e) {
var t = this.cy, n = t.mutableElements(), r = n.boundingBox(), o = this.findContainerClientCoords(), a = e.full ? Math.ceil(r.w) : o[2], i = e.full ? Math.ceil(r.h) : o[3], s = Ve(e.maxWidth) || Ve(e.maxHeight), u = this.getPixelRatio(), l = 1;
if (e.scale !== void 0)
a *= e.scale, i *= e.scale, l = e.scale;
else if (s) {
var c = 1 / 0, d = 1 / 0;
Ve(e.maxWidth) && (c = l * e.maxWidth / a), Ve(e.maxHeight) && (d = l * e.maxHeight / i), l = Math.min(c, d), a *= l, i *= l;
}
s || (a *= u, i *= u, l *= u);
var f = document.createElement("canvas");
f.width = a, f.height = i, f.style.width = a + "px", f.style.height = i + "px";
var h = f.getContext("2d");
if (a > 0 && i > 0) {
h.clearRect(0, 0, a, i), h.globalCompositeOperation = "source-over";
var p = this.getCachedZSortedEles();
if (e.full)
h.translate(-r.x1 * l, -r.y1 * l), h.scale(l, l), this.drawElements(h, p), h.scale(1 / l, 1 / l), h.translate(r.x1 * l, r.y1 * l);
else {
var v = t.pan(), m = {
x: v.x * l,
y: v.y * l
};
l *= t.zoom(), h.translate(m.x, m.y), h.scale(l, l), this.drawElements(h, p), h.scale(1 / l, 1 / l), h.translate(-m.x, -m.y);
}
e.bg && (h.globalCompositeOperation = "destination-over", h.fillStyle = e.bg, h.rect(0, 0, a, i), h.fill());
}
return f;
};
function Mde(e, t) {
for (var n = atob(e), r = new ArrayBuffer(n.length), o = new Uint8Array(r), a = 0; a < n.length; a++)
o[a] = n.charCodeAt(a);
return new Blob([r], {
type: t
});
}
function wk(e) {
var t = e.indexOf(",");
return e.substr(t + 1);
}
function C_(e, t, n) {
var r = function() {
return t.toDataURL(n, e.quality);
};
switch (e.output) {
case "blob-promise":
return new Gl(function(o, a) {
try {
t.toBlob(function(i) {
i != null ? o(i) : a(new Error("`canvas.toBlob()` sent a null value in its callback"));
}, n, e.quality);
} catch (i) {
a(i);
}
});
case "blob":
return Mde(wk(r()), n);
case "base64":
return wk(r());
case "base64uri":
default:
return r();
}
}
ad.png = function(e) {
return C_(e, this.bufferCanvasImage(e), "image/png");
};
ad.jpg = function(e) {
return C_(e, this.bufferCanvasImage(e), "image/jpeg");
};
var E_ = {};
E_.nodeShapeImpl = function(e, t, n, r, o, a, i, s) {
switch (e) {
case "ellipse":
return this.drawEllipsePath(t, n, r, o, a);
case "polygon":
return this.drawPolygonPath(t, n, r, o, a, i);
case "round-polygon":
return this.drawRoundPolygonPath(t, n, r, o, a, i, s);
case "roundrectangle":
case "round-rectangle":
return this.drawRoundRectanglePath(t, n, r, o, a, s);
case "cutrectangle":
case "cut-rectangle":
return this.drawCutRectanglePath(t, n, r, o, a, i, s);
case "bottomroundrectangle":
case "bottom-round-rectangle":
return this.drawBottomRoundRectanglePath(t, n, r, o, a, s);
case "barrel":
return this.drawBarrelPath(t, n, r, o, a);
}
};
var zde = S_, Nt = S_.prototype;
Nt.CANVAS_LAYERS = 3;
Nt.SELECT_BOX = 0;
Nt.DRAG = 1;
Nt.NODE = 2;
Nt.BUFFER_COUNT = 3;
Nt.TEXTURE_BUFFER = 0;
Nt.MOTIONBLUR_BUFFER_NODE = 1;
Nt.MOTIONBLUR_BUFFER_DRAG = 2;
function S_(e) {
var t = this, n = t.cy.window(), r = n.document;
t.data = {
canvases: new Array(Nt.CANVAS_LAYERS),
contexts: new Array(Nt.CANVAS_LAYERS),
canvasNeedsRedraw: new Array(Nt.CANVAS_LAYERS),
bufferCanvases: new Array(Nt.BUFFER_COUNT),
bufferContexts: new Array(Nt.CANVAS_LAYERS)
};
var o = "-webkit-tap-highlight-color", a = "rgba(0,0,0,0)";
t.data.canvasContainer = r.createElement("div");
var i = t.data.canvasContainer.style;
t.data.canvasContainer.style[o] = a, i.position = "relative", i.zIndex = "0", i.overflow = "hidden";
var s = e.cy.container();
s.appendChild(t.data.canvasContainer), s.style[o] = a;
var u = {
"-webkit-user-select": "none",
"-moz-user-select": "-moz-none",
"user-select": "none",
"-webkit-tap-highlight-color": "rgba(0,0,0,0)",
"outline-style": "none"
};
Toe() && (u["-ms-touch-action"] = "none", u["touch-action"] = "none");
for (var l = 0; l < Nt.CANVAS_LAYERS; l++) {
var c = t.data.canvases[l] = r.createElement("canvas");
t.data.contexts[l] = c.getContext("2d"), Object.keys(u).forEach(function(J) {
c.style[J] = u[J];
}), c.style.position = "absolute", c.setAttribute("data-id", "layer" + l), c.style.zIndex = String(Nt.CANVAS_LAYERS - l), t.data.canvasContainer.appendChild(c), t.data.canvasNeedsRedraw[l] = !1;
}
t.data.topCanvas = t.data.canvases[0], t.data.canvases[Nt.NODE].setAttribute("data-id", "layer" + Nt.NODE + "-node"), t.data.canvases[Nt.SELECT_BOX].setAttribute("data-id", "layer" + Nt.SELECT_BOX + "-selectbox"), t.data.canvases[Nt.DRAG].setAttribute("data-id", "layer" + Nt.DRAG + "-drag");
for (var l = 0; l < Nt.BUFFER_COUNT; l++)
t.data.bufferCanvases[l] = r.createElement("canvas"), t.data.bufferContexts[l] = t.data.bufferCanvases[l].getContext("2d"), t.data.bufferCanvases[l].style.position = "absolute", t.data.bufferCanvases[l].setAttribute("data-id", "buffer" + l), t.data.bufferCanvases[l].style.zIndex = String(-l - 1), t.data.bufferCanvases[l].style.visibility = "hidden";
t.pathsEnabled = !0;
var d = Br(), f = function(J) {
return {
x: (J.x1 + J.x2) / 2,
y: (J.y1 + J.y2) / 2
};
}, h = function(J) {
return {
x: -J.w / 2,
y: -J.h / 2
};
}, p = function(J) {
var te = J[0]._private, le = te.oldBackgroundTimestamp === te.backgroundTimestamp;
return !le;
}, v = function(J) {
return J[0]._private.nodeKey;
}, m = function(J) {
return J[0]._private.labelStyleKey;
}, g = function(J) {
return J[0]._private.sourceLabelStyleKey;
}, b = function(J) {
return J[0]._private.targetLabelStyleKey;
}, x = function(J, te, le, Ee, Ne) {
return t.drawElement(J, te, le, !1, !1, Ne);
}, w = function(J, te, le, Ee, Ne) {
return t.drawElementText(J, te, le, Ee, "main", Ne);
}, C = function(J, te, le, Ee, Ne) {
return t.drawElementText(J, te, le, Ee, "source", Ne);
}, k = function(J, te, le, Ee, Ne) {
return t.drawElementText(J, te, le, Ee, "target", Ne);
}, E = function(J) {
return J.boundingBox(), J[0]._private.bodyBounds;
}, S = function(J) {
return J.boundingBox(), J[0]._private.labelBounds.main || d;
}, O = function(J) {
return J.boundingBox(), J[0]._private.labelBounds.source || d;
}, F = function(J) {
return J.boundingBox(), J[0]._private.labelBounds.target || d;
}, $ = function(J, te) {
return te;
}, A = function(J) {
return f(E(J));
}, L = function(J, te, le) {
var Ee = J ? J + "-" : "";
return {
x: te.x + le.pstyle(Ee + "text-margin-x").pfValue,
y: te.y + le.pstyle(Ee + "text-margin-y").pfValue
};
}, N = function(J, te, le) {
var Ee = J[0]._private.rscratch;
return {
x: Ee[te],
y: Ee[le]
};
}, M = function(J) {
return L("", N(J, "labelX", "labelY"), J);
}, I = function(J) {
return L("source", N(J, "sourceLabelX", "sourceLabelY"), J);
}, z = function(J) {
return L("target", N(J, "targetLabelX", "targetLabelY"), J);
}, R = function(J) {
return h(E(J));
}, q = function(J) {
return h(O(J));
}, oe = function(J) {
return h(F(J));
}, Q = function(J) {
var te = S(J), le = h(S(J));
if (J.isNode()) {
switch (J.pstyle("text-halign").value) {
case "left":
le.x = -te.w;
break;
case "right":
le.x = 0;
break;
}
switch (J.pstyle("text-valign").value) {
case "top":
le.y = -te.h;
break;
case "bottom":
le.y = 0;
break;
}
}
return le;
}, ae = t.data.eleTxrCache = new $u(t, {
getKey: v,
doesEleInvalidateKey: p,
drawElement: x,
getBoundingBox: E,
getRotationPoint: A,
getRotationOffset: R,
allowEdgeTxrCaching: !1,
allowParentTxrCaching: !1
}), pe = t.data.lblTxrCache = new $u(t, {
getKey: m,
drawElement: w,
getBoundingBox: S,
getRotationPoint: M,
getRotationOffset: Q,
isVisible: $
}), we = t.data.slbTxrCache = new $u(t, {
getKey: g,
drawElement: C,
getBoundingBox: O,
getRotationPoint: I,
getRotationOffset: q,
isVisible: $
}), ke = t.data.tlbTxrCache = new $u(t, {
getKey: b,
drawElement: k,
getBoundingBox: F,
getRotationPoint: z,
getRotationOffset: oe,
isVisible: $
}), fe = t.data.lyrTxrCache = new y_(t);
t.onUpdateEleCalcs(function(J, te) {
ae.invalidateElements(te), pe.invalidateElements(te), we.invalidateElements(te), ke.invalidateElements(te), fe.invalidateElements(te);
for (var le = 0; le < te.length; le++) {
var Ee = te[le]._private;
Ee.oldBackgroundTimestamp = Ee.backgroundTimestamp;
}
});
var ge = function(J) {
for (var te = 0; te < J.length; te++)
fe.enqueueElementRefinement(J[te].ele);
};
ae.onDequeue(ge), pe.onDequeue(ge), we.onDequeue(ge), ke.onDequeue(ge);
}
Nt.redrawHint = function(e, t) {
var n = this;
switch (e) {
case "eles":
n.data.canvasNeedsRedraw[Nt.NODE] = t;
break;
case "drag":
n.data.canvasNeedsRedraw[Nt.DRAG] = t;
break;
case "select":
n.data.canvasNeedsRedraw[Nt.SELECT_BOX] = t;
break;
}
};
var Vde = typeof Path2D < "u";
Nt.path2dEnabled = function(e) {
if (e === void 0)
return this.pathsEnabled;
this.pathsEnabled = !!e;
};
Nt.usePaths = function() {
return Vde && this.pathsEnabled;
};
Nt.setImgSmoothing = function(e, t) {
e.imageSmoothingEnabled != null ? e.imageSmoothingEnabled = t : (e.webkitImageSmoothingEnabled = t, e.mozImageSmoothingEnabled = t, e.msImageSmoothingEnabled = t);
};
Nt.getImgSmoothing = function(e) {
return e.imageSmoothingEnabled != null ? e.imageSmoothingEnabled : e.webkitImageSmoothingEnabled || e.mozImageSmoothingEnabled || e.msImageSmoothingEnabled;
};
Nt.makeOffscreenCanvas = function(e, t) {
var n;
if ((typeof OffscreenCanvas > "u" ? "undefined" : Dn(OffscreenCanvas)) !== "undefined")
n = new OffscreenCanvas(e, t);
else {
var r = this.cy.window(), o = r.document;
n = o.createElement("canvas"), n.width = e, n.height = t;
}
return n;
};
[b_, la, Da, Ly, Ns, nu, Xr, Ai, ad, E_].forEach(function(e) {
ct(Nt, e);
});
var jde = [{
name: "null",
impl: i_
}, {
name: "base",
impl: g_
}, {
name: "canvas",
impl: zde
}], Hde = [{
type: "layout",
extensions: Xce
}, {
type: "renderer",
extensions: jde
}], __ = {}, T_ = {};
function O_(e, t, n) {
var r = n, o = function(E) {
Mt("Can not register `" + t + "` for `" + e + "` since `" + E + "` already exists in the prototype and can not be overridden");
};
if (e === "core") {
if (Ec.prototype[t])
return o(t);
Ec.prototype[t] = n;
} else if (e === "collection") {
if (tr.prototype[t])
return o(t);
tr.prototype[t] = n;
} else if (e === "layout") {
for (var a = function(E) {
this.options = E, n.call(this, E), It(this._private) || (this._private = {}), this._private.cy = E.cy, this._private.listeners = [], this.createEmitter();
}, i = a.prototype = Object.create(n.prototype), s = [], u = 0; u < s.length; u++) {
var l = s[u];
i[l] = i[l] || 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 E = this.options;
if (E && E.animate) {
var S = this.animations;
if (S)
for (var O = 0; O < S.length; O++)
S[O].stop();
}
return c ? c.call(this) : this.emit("layoutstop"), this;
}, i.destroy || (i.destroy = function() {
return this;
}), i.cy = function() {
return this._private.cy;
};
var d = function(E) {
return E._private.cy;
}, f = {
addEventFields: function(E, S) {
S.layout = E, S.cy = d(E), S.target = E;
},
bubble: function() {
return !0;
},
parent: function(E) {
return d(E);
}
};
ct(i, {
createEmitter: function() {
return this._private.emitter = new kh(f, this), this;
},
emitter: function() {
return this._private.emitter;
},
on: function(E, S) {
return this.emitter().on(E, S), this;
},
one: function(E, S) {
return this.emitter().one(E, S), this;
},
once: function(E, S) {
return this.emitter().one(E, S), this;
},
removeListener: function(E, S) {
return this.emitter().removeListener(E, S), this;
},
removeAllListeners: function() {
return this.emitter().removeAllListeners(), this;
},
emit: function(E, S) {
return this.emitter().emit(E, S), this;
}
}), Bt.eventAliasesOn(i), r = a;
} else if (e === "renderer" && t !== "null" && t !== "base") {
var h = P_("renderer", "base"), p = h.prototype, v = n, m = n.prototype, g = function() {
h.apply(this, arguments), v.apply(this, arguments);
}, b = g.prototype;
for (var x in p) {
var w = p[x], C = m[x] != null;
if (C)
return o(x);
b[x] = w;
}
for (var k in m)
b[k] = m[k];
p.clientFunctions.forEach(function(E) {
b[E] = b[E] || function() {
vn("Renderer does not implement `renderer." + E + "()` on its prototype");
};
}), r = g;
} else if (e === "__proto__" || e === "constructor" || e === "prototype")
return vn(e + " is an illegal type to be registered, possibly lead to prototype pollutions");
return eS({
map: __,
keys: [e, t],
value: r
});
}
function P_(e, t) {
return tS({
map: __,
keys: [e, t]
});
}
function Ude(e, t, n, r, o) {
return eS({
map: T_,
keys: [e, t, n, r],
value: o
});
}
function qde(e, t, n, r) {
return tS({
map: T_,
keys: [e, t, n, r]
});
}
var X0 = function() {
if (arguments.length === 2)
return P_.apply(null, arguments);
if (arguments.length === 3)
return O_.apply(null, arguments);
if (arguments.length === 4)
return qde.apply(null, arguments);
if (arguments.length === 5)
return Ude.apply(null, arguments);
vn("Invalid extension access syntax");
};
Ec.prototype.extension = X0;
Hde.forEach(function(e) {
e.extensions.forEach(function(t) {
O_(e.type, t.name, t.impl);
});
});
var $_ = function e() {
if (!(this instanceof e))
return new e();
this.length = 0;
}, Cs = $_.prototype;
Cs.instanceString = function() {
return "stylesheet";
};
Cs.selector = function(e) {
var t = this.length++;
return this[t] = {
selector: e,
properties: []
}, this;
};
Cs.css = function(e, t) {
var n = this.length - 1;
if (at(e))
this[n].properties.push({
name: e,
value: t
});
else if (It(e))
for (var r = e, o = Object.keys(r), a = 0; a < o.length; a++) {
var i = o[a], s = r[i];
if (s != null) {
var u = cr.properties[i] || cr.properties[ph(i)];
if (u != null) {
var l = u.name, c = s;
this[n].properties.push({
name: l,
value: c
});
}
}
}
return this;
};
Cs.style = Cs.css;
Cs.generateStyle = function(e) {
var t = new cr(e);
return this.appendToStyle(t);
};
Cs.appendToStyle = function(e) {
for (var t = 0; t < this.length; t++) {
var n = this[t], r = n.selector, o = n.properties;
e.selector(r);
for (var a = 0; a < o.length; a++) {
var i = o[a];
e.css(i.name, i.value);
}
}
return e;
};
var Wde = "3.30.2", Es = function(e) {
if (e === void 0 && (e = {}), It(e))
return new Ec(e);
if (at(e))
return X0.apply(X0, arguments);
};
Es.use = function(e) {
var t = Array.prototype.slice.call(arguments, 1);
return t.unshift(Es), e.apply(null, t), this;
};
Es.warnings = function(e) {
return uS(e);
};
Es.version = Wde;
Es.stylesheet = Es.Stylesheet = $_;
let Kde = class extends EventTarget {
constructor(e, t) {
super(), Uo(this, "cyg", null), Uo(this, "nodes", []), Uo(this, "edges", []), Uo(this, "axons", []), Uo(this, "dendrites", []), Uo(this, "somas", []), Uo(this, "labelCache", /* @__PURE__ */ new Map()), Uo(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]), o = await this.graphNode(n[1]);
this.nodes.push(r), this.nodes.push(o), this.edges.push({
id: `${r.id}_${o.id}`,
source: r.id,
target: o.id
});
}
else
this.nodes.push({
id: "MISSING",
label: "NO PATHS"
});
}
showConnectivity(e) {
this.cyg = new Qde(this, e), this.cyg.on("tap-node", (t) => {
const n = new CustomEvent("tap-node", {
detail: t.detail
});
this.dispatchEvent(n);
});
}
selectConnectivity(e) {
var t;
if ((t = this.cyg) != null && t.cy) {
let n = "";
this.cyg.cy.elements().forEach((r) => {
const o = r.data("label"), a = Y0(o);
Jde(e, a) && (n = r.id());
}), n && this.cyg.cy.$id(n).select();
}
}
clearConnectivity() {
var e;
(e = this.cyg) != null && e.cy && (this.cyg.cy.remove(), this.cyg.cy = null);
}
reset() {
var e;
(e = this.cyg) != null && e.cy && this.cyg.cy.reset();
}
zoom(e) {
var t;
if ((t = this.cyg) != null && t.cy) {
const n = this.cyg.cy.zoom(), r = this.cyg.cy.width(), o = this.cyg.cy.height(), a = {
x: r / 2,
y: o / 2
};
this.cyg.cy.zoom({
level: n + e,
renderedPosition: a
});
}
}
enableZoom(e) {
var t;
(t = this.cyg) != null && t.cy && this.cyg.cy.userZoomingEnabled(e);
}
get elements() {
return [
...this.nodes.map((e) => ({ data: e })),
...this.edges.map((e) => ({ data: e }))
];
}
get roots() {
return [
...this.dendrites,
...this.somas
];
}
async graphNode(e) {
const t = JSON.stringify(e), n = [e[0], ...e[1]], r = [];
for (const a of n) {
const i = this.labelCache.has(a) ? this.labelCache.get(a) : "";
r.push(i);
}
n.push(...r);
const o = {
id: t,
label: n.join(`
`)
};
return this.axons.includes(t) ? this.dendrites.includes(t) || this.somas.includes(t) ? o["both-a-d"] = !0 : o.axon = !0 : (this.dendrites.includes(t) || this.somas.includes(t)) && (o.dendrite = !0), o;
}
on(e, t) {
this.addEventListener(e, t);
}
};
const Gde = "#8300bf", Xde = "#f3ecf6", Yde = [
{
selector: "node",
style: {
label: function(e) {
return Zde(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": Gde,
"background-color": Xde,
"background-opacity": 0.75
}
}
];
function Zde(e) {
const t = e.split(`
`), n = t.length / 2, r = t.slice(n);
return A_(r.join(`
`));
}
function A_(e) {
return e.split(`
`).map((t) => t && t[0] >= "a" && t[0] <= "z" ? t.charAt(0).toUpperCase() + t.slice(1) : t).join(`
`);
}
function Y0(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 Jde(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 Qde extends EventTarget {
constructor(t, n) {
var r;
super(), Uo(this, "cy"), Uo(this, "tooltip"), this.cy = Es({
container: n,
elements: t.elements,
layout: {
name: "breadthfirst",
circle: !1,
roots: t.roots
},
directed: !0,
style: Yde,
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, o = Y0(r).map((a) => a.label + " (" + a.id + ")");
this.tooltip.innerText = A_(o.join(`
`)), this.tooltip.style.left = `${t.renderedPosition.x}px`, this.tooltip.style.top = `${t.renderedPosition.y}px`, this.tooltip.style.maxWidth = "240px", this.tooltip.style.zIndex = 2, this.tooltip.hidden = !1, this.checkRightBoundary(t.renderedPosition.x), this.tapNode(t, !0);
}
moveNode(t) {
const n = t.target;
this.tooltip.style.left = `${n.renderedPosition().x}px`, this.tooltip.style.top = `${n.renderedPosition().y}px`, this.checkRightBoundary(n.renderedPosition().x);
}
exitNode(t) {
this.tooltip.hidden = !0, this.tapNode(t, !1);
}
tapNode(t, n) {
const r = t.target, o = r.data();
let { label: a } = o;
n ? r.addClass("active") : (r.removeClass("active"), a = "", setTimeout(() => {
r.unselect();
}));
const i = Y0(a), s = new CustomEvent("tap-node", {
detail: i
});
this.dispatchEvent(s);
}
on(t, n) {
this.addEventListener(t, n);
}
}
const epe = 1.3, tpe = 24 * 60 * 60 * 1e3, npe = "Reset position", xk = "Lock zoom", rpe = "Unlock zoom", ope = "Zoom in", ape = "Zoom out", kk = 0.25, ipe = "#8300bf", spe = 3e3, lpe = {
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: npe,
zoomLockLabel: xk,
zoomInLabel: ope,
zoomOutLabel: ape,
iconColor: ipe,
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 o = JSON.parse(t);
this.labelCache = new Map(Object.entries(o));
}
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() + tpe;
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 < epe) {
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 Kde(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 o = await fetch(n, {
method: "POST",
headers: {
Accept: "application/json; charset=utf-8",
"Cache-Control": "no-store",
"Content-Type": "application/json"
},
body: JSON.stringify(r)
});
if (!o.ok)
throw new Error(`Cannot access ${n}`);
return await o.json();
} catch {
return {
values: []
};
}
},
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, o] of e.values)
if (r !== t) {
const a = JSON.parse(o);
this.labelCache.set(r, a.label || r), t = r;
}
const n = Object.fromEntries(this.labelCache);
sessionStorage.setItem("connectivity-graph-labels", JSON.stringify(n)), this.updateCacheExpiry();
}
},
cacheNodeLabels: function(e) {
for (const t of [e[0], ...e[1]])
this.labelledTerms.add(t);
},
cacheLabels: async function(e) {
for (const t of e.connectivity)
this.cacheNodeLabels(t[0]), this.cacheNodeLabels(t[1]);
},
showSpinner: function() {
this.loading = !0;
},
hideSpinner: function() {
this.loading = !1;
},
reset: function() {
this.connectivityGraph.reset();
},
zoomIn: function() {
this.connectivityGraph.zoom(kk);
},
zoomOut: function() {
this.connectivityGraph.zoom(-kk);
},
/**
* Enable/disable user zoom for scrolling
*/
toggleZoom: function() {
this.zoomEnabled = !this.zoomEnabled, this.zoomLockLabel = this.zoomEnabled ? rpe : xk, this.connectivityGraph.enableZoom(!this.zoomEnabled);
},
showErrorMessage: function(e) {
this.connectivityError = { ...e }, this.timeoutID && clearTimeout(this.timeoutID), this.timeoutID = setTimeout(() => {
this.connectivityError = null;
}, spe);
}
}
}, upe = { class: "connectivity-graph" }, cpe = {
ref: "graphCanvas",
class: "graph-canvas"
}, dpe = { class: "control-panel control-panel-tools" }, ppe = { class: "visually-hidden" }, fpe = { class: "visually-hidden" }, hpe = { class: "visually-hidden" }, vpe = { class: "visually-hidden" }, gpe = /* @__PURE__ */ wT('
Origin
Components
Destination
', 1), mpe = {
key: 0,
class: "connectivity-graph-error"
}, ype = { key: 0 };
function bpe(e, t, n, r, o, a) {
const i = wZ, s = lr, u = gs, l = Xc, c = jZ, d = UZ, f = GZ, h = YZ, p = Xre;
return tt((T(), B("div", upe, [
Y("div", cpe, null, 512),
Y("div", dpe, [
Y("div", {
class: W(["tools", { "zoom-locked": e.zoomEnabled }])
}, [
ee(l, {
content: e.resetLabel,
placement: "top",
effect: "control-tooltip"
}, {
default: G(() => [
ee(u, {
class: "control-button",
size: "small",
onClick: a.reset
}, {
default: G(() => [
ee(s, { color: "white" }, {
default: G(() => [
ee(i)
]),
_: 1
}),
Y("span", ppe, Te(e.resetLabel), 1)
]),
_: 1
}, 8, ["onClick"])
]),
_: 1
}, 8, ["content"]),
ee(l, {
content: e.zoomLockLabel,
placement: "top",
effect: "control-tooltip"
}, {
default: G(() => [
ee(u, {
class: "control-button",
size: "small",
onClick: a.toggleZoom
}, {
default: G(() => [
ee(s, { color: "white" }, {
default: G(() => [
e.zoomEnabled ? (T(), ie(c, { key: 0 })) : (T(), ie(d, { key: 1 }))
]),
_: 1
}),
Y("span", fpe, Te(e.zoomLockLabel), 1)
]),
_: 1
}, 8, ["onClick"])
]),
_: 1
}, 8, ["content"]),
ee(l, {
content: e.zoomInLabel,
placement: "left",
effect: "control-tooltip"
}, {
default: G(() => [
ee(u, {
class: "control-button",
size: "small",
onClick: a.zoomIn
}, {
default: G(() => [
ee(s, { color: "white" }, {
default: G(() => [
ee(f)
]),
_: 1
}),
Y("span", hpe, Te(e.zoomInLabel), 1)
]),
_: 1
}, 8, ["onClick"])
]),
_: 1
}, 8, ["content"]),
ee(l, {
content: e.zoomOutLabel,
placement: "left",
effect: "control-tooltip"
}, {
default: G(() => [
ee(u, {
class: "control-button",
size: "small",
onClick: a.zoomOut
}, {
default: G(() => [
ee(s, { color: "white" }, {
default: G(() => [
ee(h)
]),
_: 1
}),
Y("span", vpe, Te(e.zoomOutLabel), 1)
]),
_: 1
}, 8, ["onClick"])
]),
_: 1
}, 8, ["content"])
], 2)
]),
gpe,
e.connectivityError ? (T(), B("div", mpe, [
e.connectivityError.errorConnectivities ? (T(), B("strong", ype, Te(e.connectivityError.errorConnectivities), 1)) : ne("", !0),
Ke(" " + Te(e.connectivityError.errorMessage), 1)
])) : ne("", !0)
])), [
[p, e.loading]
]);
}
const wpe = /* @__PURE__ */ dh(lpe, [["render", bpe], ["__scopeId", "data-v-6acf6401"]]), Ck = "Copy to clipboard", xpe = "Copied!", kpe = "#8300bf", Cpe = {
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: Ck,
autoHideTimeout: 0,
iconColor: kpe
};
},
methods: {
copyToClipboard: async function() {
let e = !0;
this.autoHideTimeout = 600;
try {
const t = this.content.replaceAll(`
`, ""), n = document.createElement("div");
n.innerHTML = this.content;
const r = n.textContent || n.innerText || "", o = new Blob([t], { type: "text/html" }), a = new Blob([r], { type: "text/plain" }), i = new ClipboardItem({
"text/html": o,
"text/plain": a
});
await navigator.clipboard.write([i]);
} catch (t) {
console.error(
"Error when trying to use navigator.clipboard.write()",
t
), e = !1;
}
e ? this.textLabel = xpe : this.textLabel = "Error trying to copy to clipboard!";
},
resetSettings: function() {
this.autoHideTimeout = 0, this.textLabel = Ck;
}
}
}, Epe = { class: "visually-hidden" };
function Spe(e, t, n, r, o, a) {
const i = AZ, s = lr, u = gs, l = Xc;
return T(), ie(l, {
content: e.textLabel,
placement: "bottom",
"hide-after": e.autoHideTimeout,
effect: "clipboard-tooltip",
onHide: a.resetSettings
}, {
default: G(() => [
ee(u, {
class: W(["copy-clipboard-button", n.theme]),
size: "small",
onClick: a.copyToClipboard
}, {
default: G(() => [
ee(s, { color: e.iconColor }, {
default: G(() => [
ee(i)
]),
_: 1
}, 8, ["color"]),
Y("span", Epe, Te(e.textLabel), 1)
]),
_: 1
}, 8, ["class", "onClick"])
]),
_: 1
}, 8, ["content", "hide-after", "onHide"]);
}
const F_ = /* @__PURE__ */ dh(Cpe, [["render", Spe], ["__scopeId", "data-v-de3b5311"]]), I_ = `
`, N_ = `
`, L_ = `
`, D_ = `
`, R_ = `
`, B_ = `
`, M_ = `
`, z_ = `
`, V_ = `
`, j_ = `
`, H_ = `
`, U_ = `
`, q_ = `
`, W_ = `
`, K_ = `
`, G_ = `
`, X_ = `
`, Y_ = `
`, Z_ = `
`, J_ = `
`, Q_ = '', e8 = `
`, t8 = ``, n8 = `
`, r8 = `
`, o8 = `
`, a8 = `
`, i8 = `
`, s8 = `
`, l8 = `
`, u8 = `
`, c8 = `
`, d8 = `
`, p8 = (e, t, n, r) => {
const o = ["title", "desc", "defs", "style"], a = ["width", "height"], i = r || [];
let s = document.createElement("div");
s.innerHTML = e, o.map((l) => {
const c = s.querySelector(l);
c && c.remove();
}), a.map((l) => {
s.querySelector("svg").removeAttribute(l);
}), r && i.map((l) => {
Object.values(s.querySelectorAll(`[${l}]`)).map((c) => {
c.removeAttribute(l);
});
});
const u = s.innerHTML;
return s = null, u;
}, f8 = (e) => [
// Remove XML stuffs and comments
[/<\?xml[\s\S]*?>/gi, ""],
[//gi, ""],
[//gi, ""],
// SVG XML -> HTML5
[/\<([A-Za-z]+)([^\>]*)\/\>/g, "<$1$2>$1>"],
// 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(), _pe = !0, Tpe = !0, Ope = ["fill"], Ek = /* @__PURE__ */ Object.assign({
"/assets/icons/2horpanel.svg": I_,
"/assets/icons/2vertpanel.svg": N_,
"/assets/icons/3panel.svg": L_,
"/assets/icons/4panel.svg": D_,
"/assets/icons/5panel.svg": R_,
"/assets/icons/6panel.svg": B_,
"/assets/icons/6panelVertical.svg": M_,
"/assets/icons/changeBckgd.svg": z_,
"/assets/icons/close-no-bk.svg": V_,
"/assets/icons/close.svg": j_,
"/assets/icons/closeFullScreen.svg": H_,
"/assets/icons/comment.svg": U_,
"/assets/icons/connection.svg": q_,
"/assets/icons/dock.svg": W_,
"/assets/icons/drawLine.svg": K_,
"/assets/icons/drawPoint.svg": G_,
"/assets/icons/drawPolygon.svg": X_,
"/assets/icons/drawTrash.svg": Y_,
"/assets/icons/fitWindow.svg": Z_,
"/assets/icons/fullScreen.svg": J_,
"/assets/icons/help.svg": Q_,
"/assets/icons/magnifyingGlass.svg": e8,
"/assets/icons/noun-filter.svg": t8,
"/assets/icons/openMap.svg": n8,
"/assets/icons/pause.svg": r8,
"/assets/icons/permalink.svg": o8,
"/assets/icons/play.svg": a8,
"/assets/icons/resetZoom.svg": i8,
"/assets/icons/singlepanel.svg": s8,
"/assets/icons/tooltips.svg": l8,
"/assets/icons/undock.svg": u8,
"/assets/icons/zoomIn.svg": c8,
"/assets/icons/zoomOut.svg": d8
}), Ppe = Object.keys(Ek).map((e) => {
const t = p8(Ek[e], _pe, Tpe, Ope), n = e.replace(/^.+\/(\w+).svg$/, "$1");
return f8(t).replace("