import { Comment, Fragment, Teleport, Text, Transition, cloneVNode, computed, createApp, createBaseVNode, createBlock, createCommentVNode, createElementBlock, createStaticVNode, createTextVNode, createVNode, defineComponent, getCurrentInstance, getCurrentScope, h, inject, isRef, markRaw, mergeProps, nextTick, normalizeClass, normalizeStyle, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onMounted, onScopeDispose, onUnmounted, onUpdated, openBlock, popScopeId, provide, pushScopeId, reactive, readonly, ref, renderList, renderSlot, resolveComponent, resolveDirective, resolveDynamicComponent, shallowRef, toDisplayString, toHandlerKey, toHandlers, toRaw, toRef, toRefs, unref, useAttrs, useSlots, vModelCheckbox, vModelRadio, vModelText, vShow, warn, watch, watchEffect, withCtx, withDirectives, withKeys, withModifiers } from "./chunk-6UGCK2MK.js"; import "./chunk-DC5AMYBS.js"; // node_modules/@abi-software/map-side-bar/dist/map-side-bar.js var Fk = (e17) => !e17.getAttribute("aria-owns"); var Ik = (e17, t, n) => { const { parentNode: r } = e17; if (!r) return null; const o = r.querySelectorAll(n), a = Array.prototype.indexOf.call(o, e17); return o[a + t] || null; }; var Zd = (e17) => { e17 && (e17.focus(), !Fk(e17) && e17.click()); }; var fa = (e17, t, { checkForDefaultPrevented: n = true } = {}) => (o) => { const a = e17 == null ? void 0 : e17(o); if (n === false || !a) return t == null ? void 0 : t(o); }; var jy; var on = typeof window < "u"; var xT = (e17) => typeof e17 == "string"; var Nk = () => { }; var Bv = on && ((jy = window == null ? void 0 : window.navigator) == null ? void 0 : jy.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent); function Uu(e17) { return typeof e17 == "function" ? e17() : unref(e17); } function kT(e17) { return e17; } function Sc(e17) { return getCurrentScope() ? (onScopeDispose(e17), true) : false; } function CT(e17, t = true) { getCurrentInstance() ? onMounted(e17) : t ? e17() : nextTick(e17); } function Hy(e17, t, n = {}) { const { immediate: r = true } = n, o = ref(false); let a = null; function i() { a && (clearTimeout(a), a = null); } function s() { o.value = false, i(); } function u(...l) { i(), o.value = true, a = setTimeout(() => { o.value = false, a = null, e17(...l); }, Uu(t)); } return r && (o.value = true, on && u()), Sc(s), { isPending: readonly(o), start: u, stop: s }; } function Wo(e17) { var t; const n = Uu(e17); return (t = n == null ? void 0 : n.$el) != null ? t : n; } var _c = on ? window : void 0; function To(...e17) { let t, n, r, o; if (xT(e17[0]) || Array.isArray(e17[0]) ? ([n, r, o] = e17, t = _c) : [t, n, r, o] = e17, !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, h10) => (c.addEventListener(d, f, h10), () => c.removeEventListener(d, f, h10)), u = watch(() => [Wo(t), Uu(o)], ([c, d]) => { i(), c && a.push(...n.flatMap((f) => r.map((h10) => s(c, f, h10, d)))); }, { immediate: true, flush: "post" }), l = () => { u(), i(); }; return Sc(l), l; } var Uy = false; function ET(e17, t, n = {}) { const { window: r = _c, ignore: o = [], capture: a = true, detectIframe: i = false } = n; if (!r) return; Bv && !Uy && (Uy = true, Array.from(r.document.body.children).forEach((f) => f.addEventListener("click", Nk))); let s = true; const u = (f) => o.some((h10) => { if (typeof h10 == "string") return Array.from(r.document.querySelectorAll(h10)).some((p) => p === f.target || f.composedPath().includes(p)); { const p = Wo(h10); return p && (f.target === p || f.composedPath().includes(p)); } }), c = [ To(r, "click", (f) => { const h10 = Wo(e17); if (!(!h10 || h10 === f.target || f.composedPath().includes(h10))) { if (f.detail === 0 && (s = !u(f)), !s) { s = true; return; } t(f); } }, { passive: true, capture: a }), To(r, "pointerdown", (f) => { const h10 = Wo(e17); h10 && (s = !f.composedPath().includes(h10) && !u(f)); }, { passive: true }), i && To(r, "blur", (f) => { var h10; const p = Wo(e17); ((h10 = r.document.activeElement) == null ? void 0 : h10.tagName) === "IFRAME" && !(p != null && p.contains(r.document.activeElement)) && t(f); }) ].filter(Boolean); return () => c.forEach((f) => f()); } function Lk(e17, t = false) { const n = ref(), r = () => n.value = !!e17(); return r(), CT(r, t), n; } var qy = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}; var Wy = "__vueuse_ssr_handlers__"; qy[Wy] = qy[Wy] || {}; function ST(e17, t, { window: n = _c, initialValue: r = "" } = {}) { const o = ref(r), a = computed(() => { var i; return Wo(t) || ((i = n == null ? void 0 : n.document) == null ? void 0 : i.documentElement); }); return watch([a, () => Uu(e17)], ([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: true }), watch(o, (i) => { var s; (s = a.value) != null && s.style && a.value.style.setProperty(Uu(e17), i); }), o; } var Ky = Object.getOwnPropertySymbols; var _T = Object.prototype.hasOwnProperty; var TT = Object.prototype.propertyIsEnumerable; var OT = (e17, t) => { var n = {}; for (var r in e17) _T.call(e17, r) && t.indexOf(r) < 0 && (n[r] = e17[r]); if (e17 != null && Ky) for (var r of Ky(e17)) t.indexOf(r) < 0 && TT.call(e17, r) && (n[r] = e17[r]); return n; }; function qo(e17, 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 = watch(() => Wo(e17), (d) => { u(), s.value && o && d && (i = new ResizeObserver(t), i.observe(d, a)); }, { immediate: true, flush: "post" }), c = () => { u(), l(); }; return Sc(c), { isSupported: s, stop: c }; } var Gy = Object.getOwnPropertySymbols; var PT = Object.prototype.hasOwnProperty; var $T = Object.prototype.propertyIsEnumerable; var AT = (e17, t) => { var n = {}; for (var r in e17) PT.call(e17, r) && t.indexOf(r) < 0 && (n[r] = e17[r]); if (e17 != null && Gy) for (var r of Gy(e17)) t.indexOf(r) < 0 && $T.call(e17, r) && (n[r] = e17[r]); return n; }; function FT(e17, 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 = watch(() => Wo(e17), (d) => { u(), s.value && o && d && (i = new MutationObserver(t), i.observe(d, a)); }, { immediate: true }), c = () => { u(), l(); }; return Sc(c), { isSupported: s, stop: c }; } var Xy; (function(e17) { e17.UP = "UP", e17.RIGHT = "RIGHT", e17.DOWN = "DOWN", e17.LEFT = "LEFT", e17.NONE = "NONE"; })(Xy || (Xy = {})); var IT = Object.defineProperty; var Yy = Object.getOwnPropertySymbols; var NT = Object.prototype.hasOwnProperty; var LT = Object.prototype.propertyIsEnumerable; var Zy = (e17, t, n) => t in e17 ? IT(e17, t, { enumerable: true, configurable: true, writable: true, value: n }) : e17[t] = n; var DT = (e17, t) => { for (var n in t || (t = {})) NT.call(t, n) && Zy(e17, n, t[n]); if (Yy) for (var n of Yy(t)) LT.call(t, n) && Zy(e17, n, t[n]); return e17; }; var 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); var BT = () => on && /firefox/i.test(window.navigator.userAgent); Object.freeze({}); Object.freeze([]); var xa = () => { }; var MT = Object.prototype.hasOwnProperty; var Jy = (e17, t) => MT.call(e17, t); var br = Array.isArray; var Nn = (e17) => typeof e17 == "function"; var Or = (e17) => typeof e17 == "string"; var zn = (e17) => e17 !== null && typeof e17 == "object"; var zT = (e17) => (zn(e17) || Nn(e17)) && Nn(e17.then) && Nn(e17.catch); var VT = Object.prototype.toString; var jT = (e17) => VT.call(e17); var Lh = (e17) => jT(e17).slice(8, -1); var cg = (e17) => { const t = /* @__PURE__ */ Object.create(null); return (n) => t[n] || (t[n] = e17(n)); }; var HT = /-(\w)/g; var UT = cg((e17) => e17.replace(HT, (t, n) => n ? n.toUpperCase() : "")); var qT = /\B([A-Z])/g; var WT = cg( (e17) => e17.replace(qT, "-$1").toLowerCase() ); var KT = cg((e17) => e17.charAt(0).toUpperCase() + e17.slice(1)); var Dk = typeof global == "object" && global && global.Object === Object && global; var GT = typeof self == "object" && self && self.Object === Object && self; var Fo = Dk || GT || Function("return this")(); var oo = Fo.Symbol; var Rk = Object.prototype; var XT = Rk.hasOwnProperty; var YT = Rk.toString; var iu = oo ? oo.toStringTag : void 0; function ZT(e17) { var t = XT.call(e17, iu), n = e17[iu]; try { e17[iu] = void 0; var r = true; } catch { } var o = YT.call(e17); return r && (t ? e17[iu] = n : delete e17[iu]), o; } var JT = Object.prototype; var QT = JT.toString; function eO(e17) { return QT.call(e17); } var tO = "[object Null]"; var nO = "[object Undefined]"; var Qy = oo ? oo.toStringTag : void 0; function Dl(e17) { return e17 == null ? e17 === void 0 ? nO : tO : Qy && Qy in Object(e17) ? ZT(e17) : eO(e17); } function di(e17) { return e17 != null && typeof e17 == "object"; } var rO = "[object Symbol]"; function gf(e17) { return typeof e17 == "symbol" || di(e17) && Dl(e17) == rO; } function oO(e17, t) { for (var n = -1, r = e17 == null ? 0 : e17.length, o = Array(r); ++n < r; ) o[n] = t(e17[n], n, e17); return o; } var ao = Array.isArray; var aO = 1 / 0; var e1 = oo ? oo.prototype : void 0; var t1 = e1 ? e1.toString : void 0; function Bk(e17) { if (typeof e17 == "string") return e17; if (ao(e17)) return oO(e17, Bk) + ""; if (gf(e17)) return t1 ? t1.call(e17) : ""; var t = e17 + ""; return t == "0" && 1 / e17 == -aO ? "-0" : t; } var iO = /\s/; function sO(e17) { for (var t = e17.length; t-- && iO.test(e17.charAt(t)); ) ; return t; } var lO = /^\s+/; function uO(e17) { return e17 && e17.slice(0, sO(e17) + 1).replace(lO, ""); } function $o(e17) { var t = typeof e17; return e17 != null && (t == "object" || t == "function"); } var n1 = NaN; var cO = /^[-+]0x[0-9a-f]+$/i; var dO = /^0b[01]+$/i; var pO = /^0o[0-7]+$/i; var fO = parseInt; function r1(e17) { if (typeof e17 == "number") return e17; if (gf(e17)) return n1; if ($o(e17)) { var t = typeof e17.valueOf == "function" ? e17.valueOf() : e17; e17 = $o(t) ? t + "" : t; } if (typeof e17 != "string") return e17 === 0 ? e17 : +e17; e17 = uO(e17); var n = dO.test(e17); return n || pO.test(e17) ? fO(e17.slice(2), n ? 2 : 8) : cO.test(e17) ? n1 : +e17; } function Mk(e17) { return e17; } var hO = "[object AsyncFunction]"; var vO = "[object Function]"; var gO = "[object GeneratorFunction]"; var mO = "[object Proxy]"; function zk(e17) { if (!$o(e17)) return false; var t = Dl(e17); return t == vO || t == gO || t == hO || t == mO; } var Dh = Fo["__core-js_shared__"]; var o1 = function() { var e17 = /[^.]+$/.exec(Dh && Dh.keys && Dh.keys.IE_PROTO || ""); return e17 ? "Symbol(src)_1." + e17 : ""; }(); function yO(e17) { return !!o1 && o1 in e17; } var bO = Function.prototype; var wO = bO.toString; function Ss(e17) { if (e17 != null) { try { return wO.call(e17); } catch { } try { return e17 + ""; } catch { } } return ""; } var xO = /[\\^$.*+?()[\]{}|]/g; var kO = /^\[object .+?Constructor\]$/; var CO = Function.prototype; var EO = Object.prototype; var SO = CO.toString; var _O = EO.hasOwnProperty; var TO = RegExp( "^" + SO.call(_O).replace(xO, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$" ); function OO(e17) { if (!$o(e17) || yO(e17)) return false; var t = zk(e17) ? TO : kO; return t.test(Ss(e17)); } function PO(e17, t) { return e17 == null ? void 0 : e17[t]; } function _s(e17, t) { var n = PO(e17, t); return OO(n) ? n : void 0; } var Mv = _s(Fo, "WeakMap"); var a1 = Object.create; var $O = /* @__PURE__ */ function() { function e17() { } return function(t) { if (!$o(t)) return {}; if (a1) return a1(t); e17.prototype = t; var n = new e17(); return e17.prototype = void 0, n; }; }(); function AO(e17, t, n) { switch (n.length) { case 0: return e17.call(t); case 1: return e17.call(t, n[0]); case 2: return e17.call(t, n[0], n[1]); case 3: return e17.call(t, n[0], n[1], n[2]); } return e17.apply(t, n); } function FO(e17, t) { var n = -1, r = e17.length; for (t || (t = Array(r)); ++n < r; ) t[n] = e17[n]; return t; } var IO = 800; var NO = 16; var LO = Date.now; function DO(e17) { 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 e17.apply(void 0, arguments); }; } function RO(e17) { return function() { return e17; }; } var Cp = function() { try { var e17 = _s(Object, "defineProperty"); return e17({}, "", {}), e17; } catch { } }(); var BO = Cp ? function(e17, t) { return Cp(e17, "toString", { configurable: true, enumerable: false, value: RO(t), writable: true }); } : Mk; var MO = DO(BO); function zO(e17, t) { for (var n = -1, r = e17 == null ? 0 : e17.length; ++n < r && t(e17[n], n, e17) !== false; ) ; return e17; } function VO(e17, t, n, r) { e17.length; for (var o = n + 1; o--; ) if (t(e17[o], o, e17)) return o; return -1; } var jO = 9007199254740991; var HO = /^(?:0|[1-9]\d*)$/; function dg(e17, t) { var n = typeof e17; return t = t ?? jO, !!t && (n == "number" || n != "symbol" && HO.test(e17)) && e17 > -1 && e17 % 1 == 0 && e17 < t; } function Vk(e17, t, n) { t == "__proto__" && Cp ? Cp(e17, t, { configurable: true, enumerable: true, value: n, writable: true }) : e17[t] = n; } function pg(e17, t) { return e17 === t || e17 !== e17 && t !== t; } var UO = Object.prototype; var qO = UO.hasOwnProperty; function fg(e17, t, n) { var r = e17[t]; (!(qO.call(e17, t) && pg(r, n)) || n === void 0 && !(t in e17)) && Vk(e17, t, n); } function mf(e17, 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 = e17[s]), o ? Vk(n, s, u) : fg(n, s, u); } return n; } var i1 = Math.max; function WO(e17, t, n) { return t = i1(t === void 0 ? e17.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(e17, this, s); }; } var KO = 9007199254740991; function hg(e17) { return typeof e17 == "number" && e17 > -1 && e17 % 1 == 0 && e17 <= KO; } function jk(e17) { return e17 != null && hg(e17.length) && !zk(e17); } var GO = Object.prototype; function vg(e17) { var t = e17 && e17.constructor, n = typeof t == "function" && t.prototype || GO; return e17 === n; } function XO(e17, t) { for (var n = -1, r = Array(e17); ++n < e17; ) r[n] = t(n); return r; } var YO = "[object Arguments]"; function s1(e17) { return di(e17) && Dl(e17) == YO; } var Hk = Object.prototype; var ZO = Hk.hasOwnProperty; var JO = Hk.propertyIsEnumerable; var gg = s1(/* @__PURE__ */ function() { return arguments; }()) ? s1 : function(e17) { return di(e17) && ZO.call(e17, "callee") && !JO.call(e17, "callee"); }; function QO() { return false; } var Uk = typeof exports == "object" && exports && !exports.nodeType && exports; var l1 = Uk && typeof module == "object" && module && !module.nodeType && module; var e6 = l1 && l1.exports === Uk; var u1 = e6 ? Fo.Buffer : void 0; var t6 = u1 ? u1.isBuffer : void 0; var Ep = t6 || QO; var n6 = "[object Arguments]"; var r6 = "[object Array]"; var o6 = "[object Boolean]"; var a6 = "[object Date]"; var i6 = "[object Error]"; var s6 = "[object Function]"; var l6 = "[object Map]"; var u6 = "[object Number]"; var c6 = "[object Object]"; var d6 = "[object RegExp]"; var p6 = "[object Set]"; var f6 = "[object String]"; var h6 = "[object WeakMap]"; var v6 = "[object ArrayBuffer]"; var g6 = "[object DataView]"; var m6 = "[object Float32Array]"; var y6 = "[object Float64Array]"; var b6 = "[object Int8Array]"; var w6 = "[object Int16Array]"; var x6 = "[object Int32Array]"; var k6 = "[object Uint8Array]"; var C6 = "[object Uint8ClampedArray]"; var E6 = "[object Uint16Array]"; var S6 = "[object Uint32Array]"; var en = {}; en[m6] = en[y6] = en[b6] = en[w6] = en[x6] = en[k6] = en[C6] = en[E6] = en[S6] = true; 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] = false; function _6(e17) { return di(e17) && hg(e17.length) && !!en[Dl(e17)]; } function mg(e17) { return function(t) { return e17(t); }; } var qk = typeof exports == "object" && exports && !exports.nodeType && exports; var Au = qk && typeof module == "object" && module && !module.nodeType && module; var T6 = Au && Au.exports === qk; var Rh = T6 && Dk.process; var ul = function() { try { var e17 = Au && Au.require && Au.require("util").types; return e17 || Rh && Rh.binding && Rh.binding("util"); } catch { } }(); var c1 = ul && ul.isTypedArray; var Wk = c1 ? mg(c1) : _6; var O6 = Object.prototype; var P6 = O6.hasOwnProperty; function Kk(e17, t) { var n = ao(e17), r = !n && gg(e17), o = !n && !r && Ep(e17), a = !n && !r && !o && Wk(e17), i = n || r || o || a, s = i ? XO(e17.length, String) : [], u = s.length; for (var l in e17) (t || P6.call(e17, 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(e17, t) { return function(n) { return e17(t(n)); }; } var $6 = Gk(Object.keys, Object); var A6 = Object.prototype; var F6 = A6.hasOwnProperty; function I6(e17) { if (!vg(e17)) return $6(e17); var t = []; for (var n in Object(e17)) F6.call(e17, n) && n != "constructor" && t.push(n); return t; } function yf(e17) { return jk(e17) ? Kk(e17) : I6(e17); } function N6(e17) { var t = []; if (e17 != null) for (var n in Object(e17)) t.push(n); return t; } var L6 = Object.prototype; var D6 = L6.hasOwnProperty; function R6(e17) { if (!$o(e17)) return N6(e17); var t = vg(e17), n = []; for (var r in e17) r == "constructor" && (t || !D6.call(e17, r)) || n.push(r); return n; } function yg(e17) { return jk(e17) ? Kk(e17, true) : R6(e17); } var B6 = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/; var M6 = /^\w*$/; function bg(e17, t) { if (ao(e17)) return false; var n = typeof e17; return n == "number" || n == "symbol" || n == "boolean" || e17 == null || gf(e17) ? true : M6.test(e17) || !B6.test(e17) || t != null && e17 in Object(t); } var qu = _s(Object, "create"); function z6() { this.__data__ = qu ? qu(null) : {}, this.size = 0; } function V6(e17) { var t = this.has(e17) && delete this.__data__[e17]; return this.size -= t ? 1 : 0, t; } var j6 = "__lodash_hash_undefined__"; var H6 = Object.prototype; var U6 = H6.hasOwnProperty; function q6(e17) { var t = this.__data__; if (qu) { var n = t[e17]; return n === j6 ? void 0 : n; } return U6.call(t, e17) ? t[e17] : void 0; } var W6 = Object.prototype; var K6 = W6.hasOwnProperty; function G6(e17) { var t = this.__data__; return qu ? t[e17] !== void 0 : K6.call(t, e17); } var X6 = "__lodash_hash_undefined__"; function Y6(e17, t) { var n = this.__data__; return this.size += this.has(e17) ? 0 : 1, n[e17] = qu && t === void 0 ? X6 : t, this; } function ss(e17) { var t = -1, n = e17 == null ? 0 : e17.length; for (this.clear(); ++t < n; ) { var r = e17[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(e17, t) { for (var n = e17.length; n--; ) if (pg(e17[n][0], t)) return n; return -1; } var J6 = Array.prototype; var Q6 = J6.splice; function eP(e17) { var t = this.__data__, n = bf(t, e17); if (n < 0) return false; var r = t.length - 1; return n == r ? t.pop() : Q6.call(t, n, 1), --this.size, true; } function tP(e17) { var t = this.__data__, n = bf(t, e17); return n < 0 ? void 0 : t[n][1]; } function nP(e17) { return bf(this.__data__, e17) > -1; } function rP(e17, t) { var n = this.__data__, r = bf(n, e17); return r < 0 ? (++this.size, n.push([e17, t])) : n[r][1] = t, this; } function Pa(e17) { var t = -1, n = e17 == null ? 0 : e17.length; for (this.clear(); ++t < n; ) { var r = e17[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(e17) { var t = typeof e17; return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e17 !== "__proto__" : e17 === null; } function wf(e17, t) { var n = e17.__data__; return aP(t) ? n[typeof t == "string" ? "string" : "hash"] : n.map; } function iP(e17) { var t = wf(this, e17).delete(e17); return this.size -= t ? 1 : 0, t; } function sP(e17) { return wf(this, e17).get(e17); } function lP(e17) { return wf(this, e17).has(e17); } function uP(e17, t) { var n = wf(this, e17), r = n.size; return n.set(e17, t), this.size += n.size == r ? 0 : 1, this; } function $a(e17) { var t = -1, n = e17 == null ? 0 : e17.length; for (this.clear(); ++t < n; ) { var r = e17[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(e17, t) { if (typeof e17 != "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 = e17.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(e17) { var t = wg(e17, function(r) { return n.size === dP && n.clear(), r; }), n = t.cache; return t; } var fP = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; var hP = /\\(\\)?/g; var vP = pP(function(e17) { var t = []; return e17.charCodeAt(0) === 46 && t.push(""), e17.replace(fP, function(n, r, o, a) { t.push(o ? a.replace(hP, "$1") : r || n); }), t; }); function gP(e17) { return e17 == null ? "" : Bk(e17); } function xf(e17, t) { return ao(e17) ? e17 : bg(e17, t) ? [e17] : vP(gP(e17)); } var mP = 1 / 0; function Tc(e17) { if (typeof e17 == "string" || gf(e17)) return e17; var t = e17 + ""; return t == "0" && 1 / e17 == -mP ? "-0" : t; } function xg(e17, t) { t = xf(t, e17); for (var n = 0, r = t.length; e17 != null && n < r; ) e17 = e17[Tc(t[n++])]; return n && n == r ? e17 : void 0; } function ma(e17, t, n) { var r = e17 == null ? void 0 : xg(e17, t); return r === void 0 ? n : r; } function kg(e17, t) { for (var n = -1, r = t.length, o = e17.length; ++n < r; ) e17[o + n] = t[n]; return e17; } var d1 = oo ? oo.isConcatSpreadable : void 0; function yP(e17) { return ao(e17) || gg(e17) || !!(d1 && e17 && e17[d1]); } function Cg(e17, t, n, r, o) { var a = -1, i = e17.length; for (n || (n = yP), o || (o = []); ++a < i; ) { var s = e17[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(e17) { var t = e17 == null ? 0 : e17.length; return t ? Cg(e17, 1) : []; } function wP(e17) { return MO(WO(e17, void 0, bP), e17 + ""); } var Xk = Gk(Object.getPrototypeOf, Object); function Za() { if (!arguments.length) return []; var e17 = arguments[0]; return ao(e17) ? e17 : [e17]; } function xP() { this.__data__ = new Pa(), this.size = 0; } function kP(e17) { var t = this.__data__, n = t.delete(e17); return this.size = t.size, n; } function CP(e17) { return this.__data__.get(e17); } function EP(e17) { return this.__data__.has(e17); } var SP = 200; function _P(e17, t) { var n = this.__data__; if (n instanceof Pa) { var r = n.__data__; if (!Wu || r.length < SP - 1) return r.push([e17, t]), this.size = ++n.size, this; n = this.__data__ = new $a(r); } return n.set(e17, t), this.size = n.size, this; } function Xo(e17) { var t = this.__data__ = new Pa(e17); 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(e17, t) { return e17 && mf(t, yf(t), e17); } function OP(e17, t) { return e17 && mf(t, yg(t), e17); } var Yk = typeof exports == "object" && exports && !exports.nodeType && exports; var p1 = Yk && typeof module == "object" && module && !module.nodeType && module; var PP = p1 && p1.exports === Yk; var f1 = PP ? Fo.Buffer : void 0; var h1 = f1 ? f1.allocUnsafe : void 0; function $P(e17, t) { if (t) return e17.slice(); var n = e17.length, r = h1 ? h1(n) : new e17.constructor(n); return e17.copy(r), r; } function AP(e17, t) { for (var n = -1, r = e17 == null ? 0 : e17.length, o = 0, a = []; ++n < r; ) { var i = e17[n]; t(i, n, e17) && (a[o++] = i); } return a; } function Zk() { return []; } var FP = Object.prototype; var IP = FP.propertyIsEnumerable; var v1 = Object.getOwnPropertySymbols; var Eg = v1 ? function(e17) { return e17 == null ? [] : (e17 = Object(e17), AP(v1(e17), function(t) { return IP.call(e17, t); })); } : Zk; function NP(e17, t) { return mf(e17, Eg(e17), t); } var LP = Object.getOwnPropertySymbols; var Jk = LP ? function(e17) { for (var t = []; e17; ) kg(t, Eg(e17)), e17 = Xk(e17); return t; } : Zk; function DP(e17, t) { return mf(e17, Jk(e17), t); } function Qk(e17, t, n) { var r = t(e17); return ao(e17) ? r : kg(r, n(e17)); } function zv(e17) { return Qk(e17, yf, Eg); } function RP(e17) { return Qk(e17, yg, Jk); } var Vv = _s(Fo, "DataView"); var jv = _s(Fo, "Promise"); var Hv = _s(Fo, "Set"); var g1 = "[object Map]"; var BP = "[object Object]"; var m1 = "[object Promise]"; var y1 = "[object Set]"; var b1 = "[object WeakMap]"; var w1 = "[object DataView]"; var MP = Ss(Vv); var zP = Ss(Wu); var VP = Ss(jv); var jP = Ss(Hv); var HP = Ss(Mv); var 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(e17) { var t = Dl(e17), n = t == BP ? e17.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; var qP = UP.hasOwnProperty; function WP(e17) { var t = e17.length, n = new e17.constructor(t); return t && typeof e17[0] == "string" && qP.call(e17, "index") && (n.index = e17.index, n.input = e17.input), n; } var Sp = Fo.Uint8Array; function Sg(e17) { var t = new e17.constructor(e17.byteLength); return new Sp(t).set(new Sp(e17)), t; } function KP(e17, t) { var n = t ? Sg(e17.buffer) : e17.buffer; return new e17.constructor(n, e17.byteOffset, e17.byteLength); } var GP = /\w*$/; function XP(e17) { var t = new e17.constructor(e17.source, GP.exec(e17)); return t.lastIndex = e17.lastIndex, t; } var x1 = oo ? oo.prototype : void 0; var k1 = x1 ? x1.valueOf : void 0; function YP(e17) { return k1 ? Object(k1.call(e17)) : {}; } function ZP(e17, t) { var n = t ? Sg(e17.buffer) : e17.buffer; return new e17.constructor(n, e17.byteOffset, e17.length); } var JP = "[object Boolean]"; var QP = "[object Date]"; var e$ = "[object Map]"; var t$ = "[object Number]"; var n$ = "[object RegExp]"; var r$ = "[object Set]"; var o$ = "[object String]"; var a$ = "[object Symbol]"; var i$ = "[object ArrayBuffer]"; var s$ = "[object DataView]"; var l$ = "[object Float32Array]"; var u$ = "[object Float64Array]"; var c$ = "[object Int8Array]"; var d$ = "[object Int16Array]"; var p$ = "[object Int32Array]"; var f$ = "[object Uint8Array]"; var h$ = "[object Uint8ClampedArray]"; var v$ = "[object Uint16Array]"; var g$ = "[object Uint32Array]"; function m$(e17, t, n) { var r = e17.constructor; switch (t) { case i$: return Sg(e17); case JP: case QP: return new r(+e17); case s$: return KP(e17, n); case l$: case u$: case c$: case d$: case p$: case f$: case h$: case v$: case g$: return ZP(e17, n); case e$: return new r(); case t$: case o$: return new r(e17); case n$: return XP(e17); case r$: return new r(); case a$: return YP(e17); } } function y$(e17) { return typeof e17.constructor == "function" && !vg(e17) ? $O(Xk(e17)) : {}; } var b$ = "[object Map]"; function w$(e17) { return di(e17) && So(e17) == b$; } var C1 = ul && ul.isMap; var x$ = C1 ? mg(C1) : w$; var k$ = "[object Set]"; function C$(e17) { return di(e17) && So(e17) == k$; } var E1 = ul && ul.isSet; var E$ = E1 ? mg(E1) : C$; var S$ = 1; var _$ = 2; var T$ = 4; var eC = "[object Arguments]"; var O$ = "[object Array]"; var P$ = "[object Boolean]"; var $$ = "[object Date]"; var A$ = "[object Error]"; var tC = "[object Function]"; var F$ = "[object GeneratorFunction]"; var I$ = "[object Map]"; var N$ = "[object Number]"; var nC = "[object Object]"; var L$ = "[object RegExp]"; var D$ = "[object Set]"; var R$ = "[object String]"; var B$ = "[object Symbol]"; var M$ = "[object WeakMap]"; var z$ = "[object ArrayBuffer]"; var V$ = "[object DataView]"; var j$ = "[object Float32Array]"; var H$ = "[object Float64Array]"; var U$ = "[object Int8Array]"; var q$ = "[object Int16Array]"; var W$ = "[object Int32Array]"; var K$ = "[object Uint8Array]"; var G$ = "[object Uint8ClampedArray]"; var X$ = "[object Uint16Array]"; var Y$ = "[object Uint32Array]"; var 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$] = true; Jt[A$] = Jt[tC] = Jt[M$] = false; function Jd(e17, t, n, r, o, a) { var i, s = t & S$, u = t & _$, l = t & T$; if (i !== void 0) return i; if (!$o(e17)) return e17; var c = ao(e17); if (c) { if (i = WP(e17), !s) return FO(e17, i); } else { var d = So(e17), f = d == tC || d == F$; if (Ep(e17)) return $P(e17, s); if (d == nC || d == eC || f && !o) { if (i = u || f ? {} : y$(e17), !s) return u ? DP(e17, OP(i, e17)) : NP(e17, TP(i, e17)); } else { if (!Jt[d]) return o ? e17 : {}; i = m$(e17, d, s); } } a || (a = new Xo()); var h10 = a.get(e17); if (h10) return h10; a.set(e17, i), E$(e17) ? e17.forEach(function(m) { i.add(Jd(m, t, n, m, e17, a)); }) : x$(e17) && e17.forEach(function(m, g) { i.set(g, Jd(m, t, n, g, e17, a)); }); var p = l ? u ? RP : zv : u ? yg : yf, v = c ? void 0 : p(e17); return zO(v || e17, function(m, g) { v && (g = m, m = e17[g]), fg(i, g, Jd(m, t, n, g, e17, a)); }), i; } var Z$ = 1; var J$ = 4; function rC(e17) { return Jd(e17, Z$ | J$); } var Q$ = "__lodash_hash_undefined__"; function eA(e17) { return this.__data__.set(e17, Q$), this; } function tA(e17) { return this.__data__.has(e17); } function _p(e17) { var t = -1, n = e17 == null ? 0 : e17.length; for (this.__data__ = new $a(); ++t < n; ) this.add(e17[t]); } _p.prototype.add = _p.prototype.push = eA; _p.prototype.has = tA; function nA(e17, t) { for (var n = -1, r = e17 == null ? 0 : e17.length; ++n < r; ) if (t(e17[n], n, e17)) return true; return false; } function rA(e17, t) { return e17.has(t); } var oA = 1; var aA = 2; function oC(e17, t, n, r, o, a) { var i = n & oA, s = e17.length, u = t.length; if (s != u && !(i && u > s)) return false; var l = a.get(e17), c = a.get(t); if (l && c) return l == t && c == e17; var d = -1, f = true, h10 = n & aA ? new _p() : void 0; for (a.set(e17, t), a.set(t, e17); ++d < s; ) { var p = e17[d], v = t[d]; if (r) var m = i ? r(v, p, d, t, e17, a) : r(p, v, d, e17, t, a); if (m !== void 0) { if (m) continue; f = false; break; } if (h10) { if (!nA(t, function(g, b) { if (!rA(h10, b) && (p === g || o(p, g, n, r, a))) return h10.push(b); })) { f = false; break; } } else if (!(p === v || o(p, v, n, r, a))) { f = false; break; } } return a.delete(e17), a.delete(t), f; } function iA(e17) { var t = -1, n = Array(e17.size); return e17.forEach(function(r, o) { n[++t] = [o, r]; }), n; } function sA(e17) { var t = -1, n = Array(e17.size); return e17.forEach(function(r) { n[++t] = r; }), n; } var lA = 1; var uA = 2; var cA = "[object Boolean]"; var dA = "[object Date]"; var pA = "[object Error]"; var fA = "[object Map]"; var hA = "[object Number]"; var vA = "[object RegExp]"; var gA = "[object Set]"; var mA = "[object String]"; var yA = "[object Symbol]"; var bA = "[object ArrayBuffer]"; var wA = "[object DataView]"; var S1 = oo ? oo.prototype : void 0; var Bh = S1 ? S1.valueOf : void 0; function xA(e17, t, n, r, o, a, i) { switch (n) { case wA: if (e17.byteLength != t.byteLength || e17.byteOffset != t.byteOffset) return false; e17 = e17.buffer, t = t.buffer; case bA: return !(e17.byteLength != t.byteLength || !a(new Sp(e17), new Sp(t))); case cA: case dA: case hA: return pg(+e17, +t); case pA: return e17.name == t.name && e17.message == t.message; case vA: case mA: return e17 == t + ""; case fA: var s = iA; case gA: var u = r & lA; if (s || (s = sA), e17.size != t.size && !u) return false; var l = i.get(e17); if (l) return l == t; r |= uA, i.set(e17, t); var c = oC(s(e17), s(t), r, o, a, i); return i.delete(e17), c; case yA: if (Bh) return Bh.call(e17) == Bh.call(t); } return false; } var kA = 1; var CA = Object.prototype; var EA = CA.hasOwnProperty; function SA(e17, t, n, r, o, a) { var i = n & kA, s = zv(e17), u = s.length, l = zv(t), c = l.length; if (u != c && !i) return false; for (var d = u; d--; ) { var f = s[d]; if (!(i ? f in t : EA.call(t, f))) return false; } var h10 = a.get(e17), p = a.get(t); if (h10 && p) return h10 == t && p == e17; var v = true; a.set(e17, t), a.set(t, e17); for (var m = i; ++d < u; ) { f = s[d]; var g = e17[f], b = t[f]; if (r) var x = i ? r(b, g, f, t, e17, a) : r(g, b, f, e17, t, a); if (!(x === void 0 ? g === b || o(g, b, n, r, a) : x)) { v = false; break; } m || (m = f == "constructor"); } if (v && !m) { var w = e17.constructor, C = t.constructor; w != C && "constructor" in e17 && "constructor" in t && !(typeof w == "function" && w instanceof w && typeof C == "function" && C instanceof C) && (v = false); } return a.delete(e17), a.delete(t), v; } var _A = 1; var _1 = "[object Arguments]"; var T1 = "[object Array]"; var pd = "[object Object]"; var TA = Object.prototype; var O1 = TA.hasOwnProperty; function OA(e17, t, n, r, o, a) { var i = ao(e17), s = ao(t), u = i ? T1 : So(e17), 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(e17)) { if (!Ep(t)) return false; i = true, c = false; } if (f && !c) return a || (a = new Xo()), i || Wk(e17) ? oC(e17, t, n, r, o, a) : xA(e17, t, u, n, r, o, a); if (!(n & _A)) { var h10 = c && O1.call(e17, "__wrapped__"), p = d && O1.call(t, "__wrapped__"); if (h10 || p) { var v = h10 ? e17.value() : e17, m = p ? t.value() : t; return a || (a = new Xo()), o(v, m, n, r, a); } } return f ? (a || (a = new Xo()), SA(e17, t, n, r, o, a)) : false; } function kf(e17, t, n, r, o) { return e17 === t ? true : e17 == null || t == null || !di(e17) && !di(t) ? e17 !== e17 && t !== t : OA(e17, t, n, r, kf, o); } var PA = 1; var $A = 2; function AA(e17, t, n, r) { var o = n.length, a = o; if (e17 == null) return !a; for (e17 = Object(e17); o--; ) { var i = n[o]; if (i[2] ? i[1] !== e17[i[0]] : !(i[0] in e17)) return false; } for (; ++o < a; ) { i = n[o]; var s = i[0], u = e17[s], l = i[1]; if (i[2]) { if (u === void 0 && !(s in e17)) return false; } else { var c = new Xo(), d; if (!(d === void 0 ? kf(l, u, PA | $A, r, c) : d)) return false; } } return true; } function aC(e17) { return e17 === e17 && !$o(e17); } function FA(e17) { for (var t = yf(e17), n = t.length; n--; ) { var r = t[n], o = e17[r]; t[n] = [r, o, aC(o)]; } return t; } function iC(e17, t) { return function(n) { return n == null ? false : n[e17] === t && (t !== void 0 || e17 in Object(n)); }; } function IA(e17) { var t = FA(e17); return t.length == 1 && t[0][2] ? iC(t[0][0], t[0][1]) : function(n) { return n === e17 || AA(n, e17, t); }; } function NA(e17, t) { return e17 != null && t in Object(e17); } function LA(e17, t, n) { t = xf(t, e17); for (var r = -1, o = t.length, a = false; ++r < o; ) { var i = Tc(t[r]); if (!(a = e17 != null && n(e17, i))) break; e17 = e17[i]; } return a || ++r != o ? a : (o = e17 == null ? 0 : e17.length, !!o && hg(o) && dg(i, o) && (ao(e17) || gg(e17))); } function sC(e17, t) { return e17 != null && LA(e17, t, NA); } var DA = 1; var RA = 2; function BA(e17, t) { return bg(e17) && aC(t) ? iC(Tc(e17), t) : function(n) { var r = ma(n, e17); return r === void 0 && r === t ? sC(n, e17) : kf(t, r, DA | RA); }; } function MA(e17) { return function(t) { return t == null ? void 0 : t[e17]; }; } function zA(e17) { return function(t) { return xg(t, e17); }; } function VA(e17) { return bg(e17) ? MA(Tc(e17)) : zA(e17); } function jA(e17) { return typeof e17 == "function" ? e17 : e17 == null ? Mk : typeof e17 == "object" ? ao(e17) ? BA(e17[0], e17[1]) : IA(e17) : VA(e17); } var Mh = function() { return Fo.Date.now(); }; var HA = "Expected a function"; var UA = Math.max; var qA = Math.min; function lC(e17, t, n) { var r, o, a, i, s, u, l = 0, c = false, d = false, f = true; if (typeof e17 != "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 h10(k) { var E = r, S = o; return r = o = void 0, l = k, i = e17.apply(S, E), i; } function p(k) { return l = k, s = setTimeout(g, t), c ? h10(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 ? h10(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), h10(u); } return s === void 0 && (s = setTimeout(g, t)), i; } return C.cancel = x, C.flush = w, C; } function WA(e17, t, n) { var r = e17 == null ? 0 : e17.length; if (!r) return -1; var o = r - 1; return VO(e17, jA(t), o); } var KA = 1 / 0; function GA(e17) { var t = e17 == null ? 0 : e17.length; return t ? Cg(e17, KA) : []; } function Tp(e17) { for (var t = -1, n = e17 == null ? 0 : e17.length, r = {}; ++t < n; ) { var o = e17[t]; r[o[0]] = o[1]; } return r; } function Yo(e17, t) { return kf(e17, t); } function Oc(e17) { return e17 == null; } function uC(e17) { return e17 === void 0; } function XA(e17, t, n, r) { if (!$o(e17)) return e17; t = xf(t, e17); for (var o = -1, a = t.length, i = a - 1, s = e17; s != null && ++o < a; ) { var u = Tc(t[o]), l = n; if (u === "__proto__" || u === "constructor" || u === "prototype") return e17; 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 e17; } function YA(e17, t, n) { for (var r = -1, o = t.length, a = {}; ++r < o; ) { var i = t[r], s = xg(e17, i); n(s, i) && XA(a, xf(i, e17), s); } return a; } function ZA(e17, t) { return YA(e17, t, function(n, r) { return sC(e17, r); }); } var cC = wP(function(e17, t) { return e17 == null ? {} : ZA(e17, t); }); var ba = (e17) => e17 === void 0; var ea = (e17) => typeof e17 == "boolean"; var Ut = (e17) => typeof e17 == "number"; var Uv = (e17) => !e17 && e17 !== 0 || br(e17) && e17.length === 0 || zn(e17) && !Object.keys(e17).length; var Zi = (e17) => typeof Element > "u" ? false : e17 instanceof Element; var Ku = (e17) => Oc(e17); var JA = (e17) => Or(e17) ? !Number.isNaN(Number(e17)) : false; var QA = (e17 = "") => e17.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d"); var P1 = (e17) => KT(e17); var $1 = (e17) => Object.keys(e17); var dC = class extends Error { constructor(t) { super(t), this.name = "ElementPlusError"; } }; function pC(e17, t) { throw new dC(`[${e17}] ${t}`); } function Sn(e17, t) { if (true) { const n = Or(e17) ? new dC(`[${e17}] ${t}`) : e17; console.warn(n); } } var eF = "utils/dom/style"; var fC = (e17 = "") => e17.split(" ").filter((t) => !!t.trim()); var A1 = (e17, t) => { if (!e17 || !t) return false; if (t.includes(" ")) throw new Error("className should not contain space."); return e17.classList.contains(t); }; var qv = (e17, t) => { !e17 || !t.trim() || e17.classList.add(...fC(t)); }; var Gu = (e17, t) => { !e17 || !t.trim() || e17.classList.remove(...fC(t)); }; var Xs = (e17, t) => { var n; if (!on || !e17 || !t) return ""; let r = UT(t); r === "float" && (r = "cssFloat"); try { const o = e17.style[r]; if (o) return o; const a = (n = document.defaultView) == null ? void 0 : n.getComputedStyle(e17, ""); return a ? a[r] : ""; } catch { return e17.style[r]; } }; function cl(e17, t = "px") { if (!e17) return ""; if (Ut(e17) || JA(e17)) return `${e17}${t}`; if (Or(e17)) return e17; Sn(eF, "binding value must be a string or number"); } var fd; var tF = (e17) => { var t; if (!on) return 0; if (fd !== void 0) return fd; const n = document.createElement("div"); n.className = `${e17}-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(e17, t) { if (!on) return; if (!t) { e17.scrollTop = 0; return; } const n = []; let r = t.offsetParent; for (; r !== null && e17 !== r && e17.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 = e17.scrollTop, s = i + e17.clientHeight; o < i ? e17.scrollTop = o : a > s && (e17.scrollTop = a - e17.clientHeight); } var nF = defineComponent({ name: "ArrowDown", __name: "arrow-down", setup(e17) { return (t, n) => (openBlock(), createElementBlock("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ createBaseVNode("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" }) ])); } }); var _g = nF; var rF = defineComponent({ name: "ArrowLeft", __name: "arrow-left", setup(e17) { return (t, n) => (openBlock(), createElementBlock("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ createBaseVNode("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" }) ])); } }); var Tg = rF; var oF = defineComponent({ name: "ArrowRight", __name: "arrow-right", setup(e17) { return (t, n) => (openBlock(), createElementBlock("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ createBaseVNode("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" }) ])); } }); var Cf = oF; var aF = defineComponent({ name: "ArrowUp", __name: "arrow-up", setup(e17) { return (t, n) => (openBlock(), createElementBlock("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ createBaseVNode("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" }) ])); } }); var iF = aF; var sF = defineComponent({ name: "Check", __name: "check", setup(e17) { return (t, n) => (openBlock(), createElementBlock("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ createBaseVNode("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" }) ])); } }); var vC = sF; var lF = defineComponent({ name: "CircleCheck", __name: "circle-check", setup(e17) { return (t, n) => (openBlock(), createElementBlock("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ createBaseVNode("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" }), createBaseVNode("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" }) ])); } }); var uF = lF; var cF = defineComponent({ name: "CircleClose", __name: "circle-close", setup(e17) { return (t, n) => (openBlock(), createElementBlock("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ createBaseVNode("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" }), createBaseVNode("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" }) ])); } }); var Ef = cF; var dF = defineComponent({ name: "Close", __name: "close", setup(e17) { return (t, n) => (openBlock(), createElementBlock("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ createBaseVNode("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" }) ])); } }); var Wv = dF; var pF = defineComponent({ name: "DArrowLeft", __name: "d-arrow-left", setup(e17) { return (t, n) => (openBlock(), createElementBlock("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ createBaseVNode("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" }) ])); } }); var fF = pF; var hF = defineComponent({ name: "DArrowRight", __name: "d-arrow-right", setup(e17) { return (t, n) => (openBlock(), createElementBlock("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ createBaseVNode("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" }) ])); } }); var vF = hF; var gF = defineComponent({ name: "Delete", __name: "delete", setup(e17) { return (t, n) => (openBlock(), createElementBlock("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ createBaseVNode("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" }) ])); } }); var F1 = gF; var mF = defineComponent({ name: "Hide", __name: "hide", setup(e17) { return (t, n) => (openBlock(), createElementBlock("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ createBaseVNode("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" }), createBaseVNode("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" }) ])); } }); var yF = mF; var bF = defineComponent({ name: "Loading", __name: "loading", setup(e17) { return (t, n) => (openBlock(), createElementBlock("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ createBaseVNode("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" }) ])); } }); var Sf = bF; var wF = defineComponent({ name: "Location", __name: "location", setup(e17) { return (t, n) => (openBlock(), createElementBlock("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ createBaseVNode("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" }), createBaseVNode("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" }) ])); } }); var xF = wF; var kF = defineComponent({ name: "MoreFilled", __name: "more-filled", setup(e17) { return (t, n) => (openBlock(), createElementBlock("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ createBaseVNode("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" }) ])); } }); var I1 = kF; var CF = defineComponent({ name: "Notebook", __name: "notebook", setup(e17) { return (t, n) => (openBlock(), createElementBlock("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ createBaseVNode("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" }), createBaseVNode("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" }) ])); } }); var EF = CF; var SF = defineComponent({ name: "View", __name: "view", setup(e17) { return (t, n) => (openBlock(), createElementBlock("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ createBaseVNode("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" }) ])); } }); var gC = SF; var _F = defineComponent({ name: "WarnTriangleFilled", __name: "warn-triangle-filled", setup(e17) { return (t, n) => (openBlock(), createElementBlock("svg", { xmlns: "http://www.w3.org/2000/svg", "xml:space": "preserve", style: { "enable-background": "new 0 0 1024 1024" }, viewBox: "0 0 1024 1024" }, [ createBaseVNode("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" }) ])); } }); var TF = _F; var OF = defineComponent({ name: "Warning", __name: "warning", setup(e17) { return (t, n) => (openBlock(), createElementBlock("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ createBaseVNode("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" }) ])); } }); var mC = OF; var yC = "__epPropKey"; var et = (e17) => e17; var PF = (e17) => zn(e17) && !!e17[yC]; var _f = (e17, t) => { if (!zn(e17) || PF(e17)) return e17; const { values: n, required: r, default: o, type: a, validator: i } = e17, u = { type: a, required: !!r, validator: n || i ? (l) => { let c = false, d = []; if (n && (d = Array.from(n), Jy(e17, "default") && d.push(o), c || (c = d.includes(l))), i && (c || (c = i(l))), !c && d.length > 0) { const f = [...new Set(d)].map((h10) => JSON.stringify(h10)).join(", "); warn(`Invalid prop: validation failed${t ? ` for prop "${t}"` : ""}. Expected one of [${f}], got value ${JSON.stringify(l)}.`); } return c; } : void 0, [yC]: true }; return Jy(e17, "default") && (u.default = o), u; }; var mt = (e17) => Tp(Object.entries(e17).map(([t, n]) => [ t, _f(n, t) ])); var io = et([ String, Object, Function ]); var bC = { validating: Sf, success: uF, error: Ef }; var $n = (e17, t) => { if (e17.install = (n) => { for (const r of [e17, ...Object.values(t ?? {})]) n.component(r.name, r); }, t) for (const [n, r] of Object.entries(t)) e17[n] = r; return e17; }; var $F = (e17, t) => (e17.install = (n) => { n.directive(t, e17); }, e17); var Io = (e17) => (e17.install = xa, e17); var 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" }; var hn = "update:modelValue"; var ls = "change"; var Tf = ["", "default", "small", "large"]; var Qd = ((e17) => (e17[e17.TEXT = 1] = "TEXT", e17[e17.CLASS = 2] = "CLASS", e17[e17.STYLE = 4] = "STYLE", e17[e17.PROPS = 8] = "PROPS", e17[e17.FULL_PROPS = 16] = "FULL_PROPS", e17[e17.HYDRATE_EVENTS = 32] = "HYDRATE_EVENTS", e17[e17.STABLE_FRAGMENT = 64] = "STABLE_FRAGMENT", e17[e17.KEYED_FRAGMENT = 128] = "KEYED_FRAGMENT", e17[e17.UNKEYED_FRAGMENT = 256] = "UNKEYED_FRAGMENT", e17[e17.NEED_PATCH = 512] = "NEED_PATCH", e17[e17.DYNAMIC_SLOTS = 1024] = "DYNAMIC_SLOTS", e17[e17.HOISTED = -1] = "HOISTED", e17[e17.BAIL = -2] = "BAIL", e17))(Qd || {}); var N1 = (e17) => [...new Set(e17)]; var L1 = (e17) => !e17 && e17 !== 0 ? [] : Array.isArray(e17) ? e17 : [e17]; var AF = (e17) => /([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(e17); var Ja = (e17) => e17; var FF = ["class", "style"]; var IF = /^on[A-Z]/; var NF = (e17 = {}) => { const { excludeListeners: t = false, excludeKeys: n } = e17, r = computed(() => ((n == null ? void 0 : n.value) || []).concat(FF)), o = getCurrentInstance(); return o ? computed(() => { 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"), computed(() => ({}))); }; var Ji = ({ from: e17, replacement: t, scope: n, version: r, ref: o, type: a = "API" }, i) => { watch(() => unref(i), (s) => { s && Sn(n, `[${a}] ${e17} is about to be deprecated in version ${r}, please use ${t} instead. For more detail, please visit: ${o} `); }, { immediate: true }); }; 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}" } } }; var DF = (e17) => (t, n) => RF(t, n, unref(e17)); var RF = (e17, t, n) => ma(n, e17, e17).replace(/\{(\w+)\}/g, (r, o) => { var a; return `${(a = t == null ? void 0 : t[o]) != null ? a : `{${o}}`}`; }); var BF = (e17) => { const t = computed(() => unref(e17).name), n = isRef(e17) ? e17 : ref(e17); return { lang: t, locale: n, t: DF(e17) }; }; var wC = Symbol("localeContextKey"); var go = (e17) => { const t = e17 || inject(wC, ref()); return BF(computed(() => t.value || LF)); }; var Fu = "el"; var MF = "is-"; var Li = (e17, t, n, r, o) => { let a = `${e17}-${t}`; return n && (a += `-${n}`), r && (a += `__${r}`), o && (a += `--${o}`), a; }; var xC = Symbol("namespaceContextKey"); var Og = (e17) => { const t = e17 || (getCurrentInstance() ? inject(xC, ref(Fu)) : ref(Fu)); return computed(() => unref(t) || Fu); }; var pt = (e17, t) => { const n = Og(t); return { namespace: n, b: (v = "") => Li(n.value, e17, v, "", ""), e: (v) => v ? Li(n.value, e17, "", v, "") : "", m: (v) => v ? Li(n.value, e17, "", "", v) : "", be: (v, m) => v && m ? Li(n.value, e17, v, m, "") : "", em: (v, m) => v && m ? Li(n.value, e17, "", v, m) : "", bm: (v, m) => v && m ? Li(n.value, e17, v, "", m) : "", bem: (v, m, g) => v && m && g ? Li(n.value, e17, v, m, g) : "", is: (v, ...m) => { const g = m.length >= 1 ? m[0] : true; 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}-${e17}-${g}`] = v[g]); return m; }, cssVarBlockName: (v) => `--${n.value}-${e17}-${v}` }; }; var zF = (e17, t = {}) => { isRef(e17) || pC("[useLockscreen]", "You need to pass a ref param to this function"); const n = t.ns || pt("popup"), r = computed(() => n.bm("parent", "hidden")); if (!on || A1(document.body, r.value)) return; let o = 0, a = false, i = "0"; const s = () => { setTimeout(() => { Gu(document == null ? void 0 : document.body, r.value), a && document && (document.body.style.width = i); }, 200); }; watch(e17, (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); }), onScopeDispose(() => s()); }; var VF = _f({ type: et(Boolean), default: null }); var jF = _f({ type: et(Function) }); var HF = (e17) => { const t = `update:${e17}`, n = `onUpdate:${e17}`, r = [t], o = { [e17]: VF, [n]: jF }; return { useModelToggle: ({ indicator: i, toggleReason: s, shouldHideWhenRouteChanges: u, shouldProceed: l, onShow: c, onHide: d }) => { const f = getCurrentInstance(), { emit: h10 } = f, p = f.props, v = computed(() => Nn(p[n])), m = computed(() => p[e17] === null), g = (E) => { i.value !== true && (i.value = true, s && (s.value = E), Nn(c) && c(E)); }, b = (E) => { i.value !== false && (i.value = false, s && (s.value = E), Nn(d) && d(E)); }, x = (E) => { if (p.disabled === true || Nn(l) && !l()) return; const S = v.value && on; S && h10(t, true), (m.value || !S) && g(E); }, w = (E) => { if (p.disabled === true || !on) return; const S = v.value && on; S && h10(t, false), (m.value || !S) && b(E); }, C = (E) => { ea(E) && (p.disabled && E ? v.value && h10(t, false) : i.value !== E && (E ? g() : b())); }, k = () => { i.value ? w() : x(); }; return watch(() => p[e17], C), u && f.appContext.config.globalProperties.$route !== void 0 && watch(() => ({ ...f.proxy.$route }), () => { u.value && i.value && w(); }), onMounted(() => { C(p[e17]); }), { hide: w, show: x, toggle: k, hasUpdateHandler: v }; }, useModelToggleProps: o, useModelToggleEmits: r }; }; var kC = (e17) => { const t = getCurrentInstance(); return computed(() => { var n, r; return (r = (n = t == null ? void 0 : t.proxy) == null ? void 0 : n.$props) == null ? void 0 : r[e17]; }); }; var Pr = "top"; var so = "bottom"; var lo = "right"; var $r = "left"; var Pg = "auto"; var Pc = [Pr, so, lo, $r]; var dl = "start"; var Xu = "end"; var UF = "clippingParents"; var CC = "viewport"; var su = "popper"; var qF = "reference"; var D1 = Pc.reduce(function(e17, t) { return e17.concat([t + "-" + dl, t + "-" + Xu]); }, []); var $c = [].concat(Pc, [Pg]).reduce(function(e17, t) { return e17.concat([t, t + "-" + dl, t + "-" + Xu]); }, []); var WF = "beforeRead"; var KF = "read"; var GF = "afterRead"; var XF = "beforeMain"; var YF = "main"; var ZF = "afterMain"; var JF = "beforeWrite"; var QF = "write"; var e9 = "afterWrite"; var t9 = [WF, KF, GF, XF, YF, ZF, JF, QF, e9]; function ta(e17) { return e17 ? (e17.nodeName || "").toLowerCase() : null; } function No(e17) { if (e17 == null) return window; if (e17.toString() !== "[object Window]") { var t = e17.ownerDocument; return t && t.defaultView || window; } return e17; } function pl(e17) { var t = No(e17).Element; return e17 instanceof t || e17 instanceof Element; } function to(e17) { var t = No(e17).HTMLElement; return e17 instanceof t || e17 instanceof HTMLElement; } function $g(e17) { if (typeof ShadowRoot > "u") return false; var t = No(e17).ShadowRoot; return e17 instanceof t || e17 instanceof ShadowRoot; } function n9(e17) { var t = e17.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 === false ? a.removeAttribute(i) : a.setAttribute(i, s === true ? "" : s); })); }); } function r9(e17) { var t = e17.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: true, phase: "write", fn: n9, effect: r9, requires: ["computeStyles"] }; function Zo(e17) { return e17.split("-")[0]; } var Qi = Math.max; var Op = Math.min; var fl = Math.round; function hl(e17, t) { t === void 0 && (t = false); var n = e17.getBoundingClientRect(), r = 1, o = 1; if (to(e17) && t) { var a = e17.offsetHeight, i = e17.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(e17) { var t = hl(e17), n = e17.offsetWidth, r = e17.offsetHeight; return Math.abs(t.width - n) <= 1 && (n = t.width), Math.abs(t.height - r) <= 1 && (r = t.height), { x: e17.offsetLeft, y: e17.offsetTop, width: n, height: r }; } function SC(e17, t) { var n = t.getRootNode && t.getRootNode(); if (e17.contains(t)) return true; if (n && $g(n)) { var r = t; do { if (r && e17.isSameNode(r)) return true; r = r.parentNode || r.host; } while (r); } return false; } function Ca(e17) { return No(e17).getComputedStyle(e17); } function o9(e17) { return ["table", "td", "th"].indexOf(ta(e17)) >= 0; } function Ei(e17) { return ((pl(e17) ? e17.ownerDocument : e17.document) || window.document).documentElement; } function Of(e17) { return ta(e17) === "html" ? e17 : e17.assignedSlot || e17.parentNode || ($g(e17) ? e17.host : null) || Ei(e17); } function R1(e17) { return !to(e17) || Ca(e17).position === "fixed" ? null : e17.offsetParent; } function a9(e17) { var t = navigator.userAgent.toLowerCase().indexOf("firefox") !== -1, n = navigator.userAgent.indexOf("Trident") !== -1; if (n && to(e17)) { var r = Ca(e17); if (r.position === "fixed") return null; } var o = Of(e17); 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(e17) { for (var t = No(e17), n = R1(e17); 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(e17) || t; } function Fg(e17) { return ["top", "bottom"].indexOf(e17) >= 0 ? "x" : "y"; } function Iu(e17, t, n) { return Qi(e17, Op(t, n)); } function i9(e17, t, n) { var r = Iu(e17, t, n); return r > n ? n : r; } function _C() { return { top: 0, right: 0, bottom: 0, left: 0 }; } function TC(e17) { return Object.assign({}, _C(), e17); } function OC(e17, t) { return t.reduce(function(n, r) { return n[r] = e17, n; }, {}); } var s9 = function(e17, t) { return e17 = typeof e17 == "function" ? e17(Object.assign({}, t.rects, { placement: t.placement })) : e17, TC(typeof e17 != "number" ? e17 : OC(e17, Pc)); }; function l9(e17) { var t, n = e17.state, r = e17.name, o = e17.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), h10 = 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[h10], 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(e17) { var t = e17.state, n = e17.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: true, phase: "main", fn: l9, effect: u9, requires: ["popperOffsets"], requiresIfExists: ["preventOverflow"] }; function vl(e17) { return e17.split("-")[1]; } var d9 = { top: "auto", right: "auto", bottom: "auto", left: "auto" }; function p9(e17) { var t = e17.x, n = e17.y, r = window, o = r.devicePixelRatio || 1; return { x: fl(t * o) / o || 0, y: fl(n * o) / o || 0 }; } function B1(e17) { var t, n = e17.popper, r = e17.popperRect, o = e17.placement, a = e17.variation, i = e17.offsets, s = e17.position, u = e17.gpuAcceleration, l = e17.adaptive, c = e17.roundOffsets, d = e17.isFixed, f = i.x, h10 = f === void 0 ? 0 : f, p = i.y, v = p === void 0 ? 0 : p, m = typeof c == "function" ? c({ x: h10, y: v }) : { x: h10, y: v }; h10 = 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]; h10 -= F - r.width, h10 *= u ? 1 : -1; } } var $ = Object.assign({ position: s }, l && d9), A = c === true ? p9({ x: h10, y: v }) : { x: h10, y: v }; if (h10 = 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(" + h10 + "px, " + v + "px)" : "translate3d(" + h10 + "px, " + v + "px, 0)", L)); } return Object.assign({}, $, (t = {}, t[w] = b ? v + "px" : "", t[x] = g ? h10 + "px" : "", t.transform = "", t)); } function f9(e17) { var t = e17.state, n = e17.options, r = n.gpuAcceleration, o = r === void 0 ? true : r, a = n.adaptive, i = a === void 0 ? true : a, s = n.roundOffsets, u = s === void 0 ? true : 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: false, roundOffsets: u })))), t.attributes.popper = Object.assign({}, t.attributes.popper, { "data-popper-placement": t.placement }); } var PC = { name: "computeStyles", enabled: true, phase: "beforeWrite", fn: f9, data: {} }; var hd = { passive: true }; function h9(e17) { var t = e17.state, n = e17.instance, r = e17.options, o = r.scroll, a = o === void 0 ? true : o, i = r.resize, s = i === void 0 ? true : 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: true, phase: "write", fn: function() { }, effect: h9, data: {} }; var v9 = { left: "right", right: "left", bottom: "top", top: "bottom" }; function ep(e17) { return e17.replace(/left|right|bottom|top/g, function(t) { return v9[t]; }); } var g9 = { start: "end", end: "start" }; function M1(e17) { return e17.replace(/start|end/g, function(t) { return g9[t]; }); } function Ig(e17) { var t = No(e17), n = t.pageXOffset, r = t.pageYOffset; return { scrollLeft: n, scrollTop: r }; } function Ng(e17) { return hl(Ei(e17)).left + Ig(e17).scrollLeft; } function m9(e17) { var t = No(e17), n = Ei(e17), 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(e17), y: s }; } function y9(e17) { var t, n = Ei(e17), r = Ig(e17), o = (t = e17.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(e17), 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(e17) { var t = Ca(e17), n = t.overflow, r = t.overflowX, o = t.overflowY; return /auto|scroll|overlay|hidden/.test(n + o + r); } function AC(e17) { return ["html", "body", "#document"].indexOf(ta(e17)) >= 0 ? e17.ownerDocument.body : to(e17) && Lg(e17) ? e17 : AC(Of(e17)); } function Nu(e17, t) { var n; t === void 0 && (t = []); var r = AC(e17), o = r === ((n = e17.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(e17) { return Object.assign({}, e17, { left: e17.x, top: e17.y, right: e17.x + e17.width, bottom: e17.y + e17.height }); } function b9(e17) { var t = hl(e17); return t.top = t.top + e17.clientTop, t.left = t.left + e17.clientLeft, t.bottom = t.top + e17.clientHeight, t.right = t.left + e17.clientWidth, t.width = e17.clientWidth, t.height = e17.clientHeight, t.x = t.left, t.y = t.top, t; } function z1(e17, t) { return t === CC ? Kv(m9(e17)) : pl(t) ? b9(t) : Kv(y9(Ei(e17))); } function w9(e17) { var t = Nu(Of(e17)), n = ["absolute", "fixed"].indexOf(Ca(e17).position) >= 0, r = n && to(e17) ? Ac(e17) : e17; return pl(r) ? t.filter(function(o) { return pl(o) && SC(o, r) && ta(o) !== "body"; }) : []; } function x9(e17, t, n) { var r = t === "clippingParents" ? w9(e17) : [].concat(t), o = [].concat(r, [n]), a = o[0], i = o.reduce(function(s, u) { var l = z1(e17, 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(e17, 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(e17) { var t = e17.reference, n = e17.element, r = e17.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(e17, t) { t === void 0 && (t = {}); var n = t, r = n.placement, o = r === void 0 ? e17.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 ? false : d, h10 = n.padding, p = h10 === void 0 ? 0 : h10, v = TC(typeof p != "number" ? p : OC(p, Pc)), m = c === su ? qF : su, g = e17.rects.popper, b = e17.elements[f ? m : c], x = x9(pl(b) ? b : b.contextElement || Ei(e17.elements.popper), i, u), w = hl(e17.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 = e17.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(e17, 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 h10 = f.reduce(function(p, v) { return p[v] = Yu(e17, { placement: v, boundary: o, rootBoundary: a, padding: i })[Zo(v)], p; }, {}); return Object.keys(h10).sort(function(p, v) { return h10[p] - h10[v]; }); } function C9(e17) { if (Zo(e17) === Pg) return []; var t = ep(e17); return [M1(e17), t, M1(t)]; } function E9(e17) { var t = e17.state, n = e17.options, r = e17.name; if (!t.modifiersData[r]._skip) { for (var o = n.mainAxis, a = o === void 0 ? true : o, i = n.altAxis, s = i === void 0 ? true : i, u = n.fallbackPlacements, l = n.padding, c = n.boundary, d = n.rootBoundary, f = n.altBoundary, h10 = n.flipVariations, p = h10 === void 0 ? true : h10, 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 = true, 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), W = []; if (a && W.push(I[A] <= 0), s && W.push(I[z] <= 0, I[R] <= 0), W.every(function(we) { return we; })) { O = $, S = false; break; } E.set($, W); } 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 = true, t.placement = O, t.reset = true); } } var S9 = { name: "flip", enabled: true, phase: "main", fn: E9, requiresIfExists: ["offset"], data: { _skip: false } }; function V1(e17, t, n) { return n === void 0 && (n = { x: 0, y: 0 }), { top: e17.top - t.height - n.y, right: e17.right - t.width + n.x, bottom: e17.bottom - t.height + n.y, left: e17.left - t.width - n.x }; } function j1(e17) { return [Pr, lo, so, $r].some(function(t) { return e17[t] >= 0; }); } function _9(e17) { var t = e17.state, n = e17.name, r = t.rects.reference, o = t.rects.popper, a = t.modifiersData.preventOverflow, i = Yu(t, { elementContext: "reference" }), s = Yu(t, { altBoundary: true }), 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: true, phase: "main", requiresIfExists: ["preventOverflow"], fn: _9 }; function O9(e17, t, n) { var r = Zo(e17), o = [$r, Pr].indexOf(r) >= 0 ? -1 : 1, a = typeof n == "function" ? n(Object.assign({}, t, { placement: e17 })) : 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(e17) { var t = e17.state, n = e17.options, r = e17.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: true, phase: "main", requires: ["popperOffsets"], fn: P9 }; function A9(e17) { var t = e17.state, n = e17.name; t.modifiersData[n] = FC({ reference: t.rects.reference, element: t.rects.popper, strategy: "absolute", placement: t.placement }); } var IC = { name: "popperOffsets", enabled: true, phase: "read", fn: A9, data: {} }; function F9(e17) { return e17 === "x" ? "y" : "x"; } function I9(e17) { var t = e17.state, n = e17.options, r = e17.name, o = n.mainAxis, a = o === void 0 ? true : o, i = n.altAxis, s = i === void 0 ? false : i, u = n.boundary, l = n.rootBoundary, c = n.altBoundary, d = n.padding, f = n.tether, h10 = f === void 0 ? true : 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], W = z - m[M], oe = h10 ? -S[I] / 2 : 0, Q = b === dl ? E[I] : S[I], ae = b === dl ? -S[I] : -E[I], pe = t.elements.arrow, we = h10 && 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(h10 ? Op(R, _e) : R, z, h10 ? Qi(W, De) : W); 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 = h10 && P ? i9(se, Me, ce) : Iu(h10 ? se : nt, Me, h10 ? ce : st); k[C] = de, A[C] = de - Me; } t.modifiersData[r] = A; } } var N9 = { name: "preventOverflow", enabled: true, phase: "main", fn: I9, requiresIfExists: ["offset"] }; function L9(e17) { return { scrollLeft: e17.scrollLeft, scrollTop: e17.scrollTop }; } function D9(e17) { return e17 === No(e17) || !to(e17) ? Ig(e17) : L9(e17); } function R9(e17) { var t = e17.getBoundingClientRect(), n = fl(t.width) / e17.offsetWidth || 1, r = fl(t.height) / e17.offsetHeight || 1; return n !== 1 || r !== 1; } function B9(e17, t, n) { n === void 0 && (n = false); var r = to(t), o = to(t) && R9(t), a = Ei(t), i = hl(e17, 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, true), 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(e17) { var t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set(), r = []; e17.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 e17.forEach(function(a) { n.has(a.name) || o(a); }), r; } function z9(e17) { var t = M9(e17); return t9.reduce(function(n, r) { return n.concat(t.filter(function(o) { return o.phase === r; })); }, []); } function V9(e17) { var t; return function() { return t || (t = new Promise(function(n) { Promise.resolve().then(function() { t = void 0, n(e17()); }); })), t; }; } function j9(e17) { var t = e17.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 e17 = arguments.length, t = new Array(e17), n = 0; n < e17; n++) t[n] = arguments[n]; return !t.some(function(r) { return !(r && typeof r.getBoundingClientRect == "function"); }); } function Dg(e17) { e17 === void 0 && (e17 = {}); var t = e17, 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 = false, 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; }), h10(), 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 = false, 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 === true) { l.reset = false, 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 = true; } }; if (!U1(i, s)) return f; f.setOptions(u).then(function(v) { !d && u.onFirstUpdate && u.onFirstUpdate(v); }); function h10() { 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]; var q9 = Dg({ defaultModifiers: U9 }); var W9 = (e17, t, n = {}) => { const r = { name: "updateState", enabled: true, phase: "write", fn: ({ state: u }) => { const l = K9(u); Object.assign(i.value, l); }, requires: ["computeStyles"] }, o = computed(() => { const { onFirstUpdate: u, placement: l, strategy: c, modifiers: d } = unref(n); return { onFirstUpdate: u, placement: l || "bottom", strategy: c || "absolute", modifiers: [ ...d || [], r, { name: "applyStyles", enabled: false } ] }; }), a = shallowRef(), i = ref({ styles: { popper: { position: unref(o).strategy, left: "0", top: "0" }, arrow: { position: "absolute" } }, attributes: {} }), s = () => { a.value && (a.value.destroy(), a.value = void 0); }; return watch(o, (u) => { const l = unref(a); l && l.setOptions(u); }, { deep: true }), watch([e17, t], ([u, l]) => { s(), !(!u || !l) && (a.value = q9(u, l, unref(o))); }), onBeforeUnmount(() => { s(); }), { state: computed(() => { var u; return { ...((u = unref(a)) == null ? void 0 : u.state) || {} }; }), styles: computed(() => unref(i).styles), attributes: computed(() => unref(i).attributes), update: () => { var u; return (u = unref(a)) == null ? void 0 : u.update(); }, forceUpdate: () => { var u; return (u = unref(a)) == null ? void 0 : u.forceUpdate(); }, instanceRef: computed(() => unref(a)) }; }; function K9(e17) { const t = Object.keys(e17.elements), n = Tp(t.map((o) => [o, e17.styles[o] || {}])), r = Tp(t.map((o) => [o, e17.attributes[o]])); return { styles: n, attributes: r }; } var G9 = (e17) => { if (!e17) return { onClick: xa, onMousedown: xa, onMouseup: xa }; let t = false, n = false; return { onClick: (i) => { t && n && e17(i), t = n = false; }, onMousedown: (i) => { t = i.target === i.currentTarget; }, onMouseup: (i) => { n = i.target === i.currentTarget; } }; }; function q1() { let e17; const t = (r, o) => { n(), e17 = window.setTimeout(r, o); }, n = () => window.clearTimeout(e17); return Sc(() => n()), { registerTimeout: t, cancelTimeout: n }; } var Gv = { prefix: Math.floor(Math.random() * 1e4), current: 0 }; var X9 = Symbol("elIdInjection"); var NC = () => getCurrentInstance() ? inject(X9, Gv) : Gv; var pi = (e17) => { 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 computed(() => unref(e17) || `${n.value}-id-${t.prefix}-${t.current++}`); }; var Ys = []; var W1 = (e17) => { const t = e17; t.key === Fn.esc && Ys.forEach((n) => n(t)); }; var Y9 = (e17) => { onMounted(() => { Ys.length === 0 && document.addEventListener("keydown", W1), on && Ys.push(e17); }), onBeforeUnmount(() => { Ys = Ys.filter((t) => t !== e17), Ys.length === 0 && on && document.removeEventListener("keydown", W1); }); }; var K1; var LC = () => { const e17 = Og(), t = NC(), n = computed(() => `${e17.value}-popper-container-${t.prefix}`), r = computed(() => `#${n.value}`); return { id: n, selector: r }; }; var Z9 = (e17) => { const t = document.createElement("div"); return t.id = e17, document.body.appendChild(t), t; }; var J9 = () => { const { id: e17, selector: t } = LC(); return onBeforeMount(() => { on && (!K1 || !document.body.querySelector(t.value)) && (K1 = Z9(e17.value)); }), { id: e17, selector: t }; }; var Q9 = mt({ showAfter: { type: Number, default: 0 }, hideAfter: { type: Number, default: 200 }, autoClose: { type: Number, default: 0 } }); var eI = ({ showAfter: e17, 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 = unref(n); Ut(d) && d > 0 && i(() => { o(c); }, d); }, unref(e17)); }, onClose: (c) => { s(), a(() => { o(c); }, unref(t)); } }; }; var DC = Symbol("elForwardRef"); var tI = (e17) => { provide(DC, { setForwardRef: (n) => { e17.value = n; } }); }; var nI = (e17) => ({ mounted(t) { e17(t); }, updated(t) { e17(t); }, unmounted() { e17(null); } }); var G1 = { current: 0 }; var X1 = ref(0); var RC = 2e3; var Y1 = Symbol("elZIndexContextKey"); var BC = Symbol("zIndexContextKey"); var Rg = (e17) => { const t = getCurrentInstance() ? inject(Y1, G1) : G1, n = e17 || (getCurrentInstance() ? inject(BC, void 0) : void 0), r = computed(() => { const i = unref(n); return Ut(i) ? i : RC; }), o = computed(() => r.value + X1.value), a = () => (t.current++, X1.value = t.current, o.value); return !on && !inject(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(e17) { let t; function n() { if (e17.value == null) return; const { selectionStart: o, selectionEnd: a, value: i } = e17.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 (e17.value == null || t == null) return; const { value: o } = e17.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); } e17.value.setSelectionRange(u, u); } return [n, r]; } var Aa = _f({ type: String, values: Tf, required: false }); var MC = Symbol("size"); var zC = () => { const e17 = inject(MC, {}); return computed(() => unref(e17.size) || ""); }; function VC(e17, { beforeFocus: t, afterFocus: n, beforeBlur: r, afterBlur: o } = {}) { const a = getCurrentInstance(), { emit: i } = a, s = shallowRef(), u = ref(false), l = (f) => { Nn(t) && t(f) || u.value || (u.value = true, i("focus", f), n == null || n()); }, c = (f) => { var h10; Nn(r) && r(f) || f.relatedTarget && ((h10 = s.value) != null && h10.contains(f.relatedTarget)) || (u.value = false, i("blur", f), o == null || o()); }, d = () => { var f, h10; (f = s.value) != null && f.contains(document.activeElement) && s.value !== document.activeElement || (h10 = e17.value) == null || h10.focus(); }; return watch(s, (f) => { f && f.setAttribute("tabindex", "-1"); }), To(s, "focus", l, true), To(s, "blur", c, true), To(s, "click", d, true), false, { isFocused: u, wrapperRef: s, handleFocus: l, handleBlur: c }; } function Bg({ afterComposition: e17, emit: t }) { const n = ref(false), r = (s) => { t == null || t("compositionstart", s), n.value = true; }, 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 = false, nextTick(() => e17(s))); }; return { isComposing: n, handleComposition: (s) => { s.type === "compositionend" ? a(s) : o(s); }, handleCompositionStart: r, handleCompositionUpdate: o, handleCompositionEnd: a }; } var jC = Symbol("emptyValuesContextKey"); var oI = "use-empty-values"; var aI = ["", void 0, null]; var iI = void 0; var HC = mt({ emptyValues: Array, valueOnClear: { type: [String, Number, Boolean, Function], default: void 0, validator: (e17) => Nn(e17) ? !e17() : !e17 } }); var UC = (e17, t) => { const n = getCurrentInstance() ? inject(jC, ref({})) : ref({}), r = computed(() => e17.emptyValues || n.value.emptyValues || aI), o = computed(() => Nn(e17.valueOnClear) ? e17.valueOnClear() : e17.valueOnClear !== void 0 ? e17.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 }; }; var sI = mt({ ariaLabel: String, ariaOrientation: { type: String, values: ["horizontal", "vertical", "undefined"] }, ariaControls: String }); var Si = (e17) => cC(sI, e17); var qC = Symbol(); var Pp = ref(); function Pf(e17, t = void 0) { const n = getCurrentInstance() ? inject(qC, Pp) : Pp; return e17 ? computed(() => { var r, o; return (o = (r = n.value) == null ? void 0 : r[e17]) != null ? o : t; }) : n; } function lI(e17, t) { const n = Pf(), r = pt(e17, computed(() => { var s; return ((s = n.value) == null ? void 0 : s.namespace) || Fu; })), o = go(computed(() => { var s; return (s = n.value) == null ? void 0 : s.locale; })), a = Rg(computed(() => { var s; return ((s = n.value) == null ? void 0 : s.zIndex) || RC; })), i = computed(() => { var s; return unref(t) || ((s = n.value) == null ? void 0 : s.size) || ""; }); return uI(computed(() => unref(n) || {})), { ns: r, locale: o, zIndex: a, size: i }; } var uI = (e17, t, n = false) => { var r; const o = !!getCurrentInstance(), a = o ? Pf() : void 0, i = (r = void 0) != null ? r : o ? provide : void 0; if (!i) { Sn("provideGlobalConfig", "provideGlobalConfig() can only be used inside setup()."); return; } const s = computed(() => { const u = unref(e17); return a != null && a.value ? cI(a.value, u) : u; }); return i(qC, s), i(wC, computed(() => s.value.locale)), i(xC, computed(() => s.value.namespace)), i(BC, computed(() => s.value.zIndex)), i(MC, { size: computed(() => s.value.size || "") }), i(jC, computed(() => ({ emptyValues: s.value.emptyValues, valueOnClear: s.value.valueOnClear }))), (n || !Pp.value) && (Pp.value = s.value), s; }; var cI = (e17, t) => { const n = [.../* @__PURE__ */ new Set([...$1(e17), ...$1(t)])], r = {}; for (const o of n) r[o] = t[o] !== void 0 ? t[o] : e17[o]; return r; }; var vt = (e17, t) => { const n = e17.__vccOpts || e17; for (const [r, o] of t) n[r] = o; return n; }; var dI = mt({ size: { type: et([Number, String]) }, color: { type: String } }); var pI = defineComponent({ name: "ElIcon", inheritAttrs: false }); var fI = defineComponent({ ...pI, props: dI, setup(e17) { const t = e17, n = pt("icon"), r = computed(() => { const { size: o, color: a } = t; return !o && !a ? {} : { fontSize: ba(o) ? void 0 : cl(o), "--color": a }; }); return (o, a) => (openBlock(), createElementBlock("i", mergeProps({ class: unref(n).b(), style: unref(r) }, o.$attrs), [ renderSlot(o.$slots, "default") ], 16)); } }); var hI = vt(fI, [["__file", "icon.vue"]]); var nn = $n(hI); var Mg = Symbol("formContextKey"); var $p = Symbol("formItemContextKey"); var fi = (e17, t = {}) => { const n = ref(void 0), r = t.prop ? n : kC("size"), o = t.global ? n : zC(), a = t.form ? { size: void 0 } : inject(Mg, void 0), i = t.formItem ? { size: void 0 } : inject($p, void 0); return computed(() => r.value || unref(e17) || (i == null ? void 0 : i.size) || (a == null ? void 0 : a.size) || o.value || ""); }; var Fc = (e17) => { const t = kC("disabled"), n = inject(Mg, void 0); return computed(() => t.value || unref(e17) || (n == null ? void 0 : n.disabled) || false); }; var _i = () => { const e17 = inject(Mg, void 0), t = inject($p, void 0); return { form: e17, formItem: t }; }; var Ic = (e17, { formItemContext: t, disableIdGeneration: n, disableIdManagement: r }) => { n || (n = ref(false)), r || (r = ref(false)); const o = ref(); let a; const i = computed(() => { var s; return !!(!(e17.label || e17.ariaLabel) && t && t.inputIds && ((s = t.inputIds) == null ? void 0 : s.length) <= 1); }); return onMounted(() => { a = watch([toRef(e17, "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: true }); }), onUnmounted(() => { a && a(), t != null && t.removeInputId && o.value && t.removeInputId(o.value); }), { isLabeledByFormItem: i, inputId: o }; }; var yo; var vI = ` height:0 !important; visibility:hidden !important; ${BT() ? "" : "overflow:hidden !important;"} position:absolute !important; z-index:-1000 !important; top:0 !important; right:0 !important; `; var 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(e17) { const t = window.getComputedStyle(e17), 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(e17, t = 1, n) { var r; yo || (yo = document.createElement("textarea"), document.body.appendChild(yo)); const { paddingSize: o, borderSize: a, boxSizing: i, contextStyle: s } = mI(e17); yo.setAttribute("style", `${s};${vI}`), yo.value = e17.value || e17.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; } var 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: false }, 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: true }, inputStyle: { type: et([Object, Array, String]), default: () => Ja({}) }, autofocus: Boolean, rows: { type: Number, default: 2 }, ...Si(["ariaLabel"]) }); var bI = { [hn]: (e17) => Or(e17), input: (e17) => Or(e17), change: (e17) => Or(e17), focus: (e17) => e17 instanceof FocusEvent, blur: (e17) => e17 instanceof FocusEvent, clear: () => true, mouseleave: (e17) => e17 instanceof MouseEvent, mouseenter: (e17) => e17 instanceof MouseEvent, keydown: (e17) => e17 instanceof Event, compositionstart: (e17) => e17 instanceof CompositionEvent, compositionupdate: (e17) => e17 instanceof CompositionEvent, compositionend: (e17) => e17 instanceof CompositionEvent }; var wI = defineComponent({ name: "ElInput", inheritAttrs: false }); var xI = defineComponent({ ...wI, props: yI, emits: bI, setup(e17, { expose: t, emit: n }) { const r = e17, o = useAttrs(), a = useSlots(), i = computed(() => { 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 = computed(() => [ r.type === "textarea" ? m.b() : v.b(), v.m(h10.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")]: W.value && oe.value, [v.b("hidden")]: r.type === "hidden" }, o.class ]), u = computed(() => [ v.e("wrapper"), v.is("focus", O.value) ]), l = NF({ excludeKeys: computed(() => Object.keys(i.value)) }), { form: c, formItem: d } = _i(), { inputId: f } = Ic(r, { formItemContext: d }), h10 = fi(), p = Fc(), v = pt("input"), m = pt("textarea"), g = shallowRef(), b = shallowRef(), x = ref(false), w = ref(false), C = ref(), k = shallowRef(r.inputStyle), E = computed(() => 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 = computed(() => { var j; return (j = c == null ? void 0 : c.statusIcon) != null ? j : false; }), L = computed(() => (d == null ? void 0 : d.validateState) || ""), N = computed(() => L.value && bC[L.value]), M = computed(() => w.value ? gC : yF), I = computed(() => [ o.style ]), z = computed(() => [ r.inputStyle, k.value, { resize: r.resize } ]), R = computed(() => Oc(r.modelValue) ? "" : String(r.modelValue)), W = computed(() => r.clearable && !p.value && !r.readonly && !!R.value && (O.value || x.value)), oe = computed(() => r.showPassword && !p.value && !r.readonly && !!R.value && (!!R.value || O.value)), Q = computed(() => r.showWordLimit && !!r.maxlength && (r.type === "text" || r.type === "textarea") && !p.value && !r.readonly && !r.showPassword), ae = computed(() => R.value.length), pe = computed(() => !!Q.value && ae.value > Number(r.maxlength)), we = computed(() => !!a.suffix || !!r.suffixIcon || W.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 }, nextTick(() => { b.value.offsetHeight, k.value = Oe; }); } else k.value = { minHeight: Z1(b.value).minHeight }; }, te = /* @__PURE__ */ ((j) => { let se = false; return () => { var ce; if (se || !r.autosize) return; ((ce = b.value) == null ? void 0 : ce.offsetParent) === null || (j(), se = true); }; })(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 nextTick(), 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 nextTick(), (j = E.value) == null || j.focus(); }, Ze = () => { var j; return (j = E.value) == null ? void 0 : j.blur(); }, Me = (j) => { x.value = false, n("mouseleave", j); }, rt = (j) => { x.value = true, 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 watch(() => r.modelValue, () => { var j; nextTick(() => ge()), r.validateEvent && ((j = d == null ? void 0 : d.validate) == null || j.call(d, "change").catch((se) => Sn(se))); }), watch(R, () => le()), watch(() => r.type, async () => { await nextTick(), le(), ge(); }), onMounted(() => { !r.formatter && r.parser && Sn("ElInput", "If you set the parser, you also need to set the formatter."), le(), nextTick(ge); }), t({ input: g, textarea: b, ref: E, textareaStyle: z, autosize: toRef(r, "autosize"), isComposing: je, focus: Ue, blur: Ze, select: st, clear: P, resizeTextarea: ge }), (j, se) => (openBlock(), createElementBlock("div", mergeProps(unref(i), { class: [ unref(s), { [unref(v).bm("group", "append")]: j.$slots.append, [unref(v).bm("group", "prepend")]: j.$slots.prepend } ], style: unref(I), role: j.containerRole, onMouseenter: rt, onMouseleave: Me }), [ createCommentVNode(" input "), j.type !== "textarea" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [ createCommentVNode(" prepend slot "), j.$slots.prepend ? (openBlock(), createElementBlock("div", { key: 0, class: normalizeClass(unref(v).be("group", "prepend")) }, [ renderSlot(j.$slots, "prepend") ], 2)) : createCommentVNode("v-if", true), createBaseVNode("div", { ref_key: "wrapperRef", ref: S, class: normalizeClass(unref(u)) }, [ createCommentVNode(" prefix slot "), j.$slots.prefix || j.prefixIcon ? (openBlock(), createElementBlock("span", { key: 0, class: normalizeClass(unref(v).e("prefix")) }, [ createBaseVNode("span", { class: normalizeClass(unref(v).e("prefix-inner")) }, [ renderSlot(j.$slots, "prefix"), j.prefixIcon ? (openBlock(), createBlock(unref(nn), { key: 0, class: normalizeClass(unref(v).e("icon")) }, { default: withCtx(() => [ (openBlock(), createBlock(resolveDynamicComponent(j.prefixIcon))) ]), _: 1 }, 8, ["class"])) : createCommentVNode("v-if", true) ], 2) ], 2)) : createCommentVNode("v-if", true), createBaseVNode("input", mergeProps({ id: unref(f), ref_key: "input", ref: g, class: unref(v).e("inner") }, unref(l), { minlength: j.minlength, maxlength: j.maxlength, type: j.showPassword ? w.value ? "text" : "password" : j.type, disabled: unref(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: unref(_e), onCompositionupdate: unref(De), onCompositionend: unref(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"]), createCommentVNode(" suffix slot "), unref(we) ? (openBlock(), createElementBlock("span", { key: 1, class: normalizeClass(unref(v).e("suffix")) }, [ createBaseVNode("span", { class: normalizeClass(unref(v).e("suffix-inner")) }, [ !unref(W) || !unref(oe) || !unref(Q) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [ renderSlot(j.$slots, "suffix"), j.suffixIcon ? (openBlock(), createBlock(unref(nn), { key: 0, class: normalizeClass(unref(v).e("icon")) }, { default: withCtx(() => [ (openBlock(), createBlock(resolveDynamicComponent(j.suffixIcon))) ]), _: 1 }, 8, ["class"])) : createCommentVNode("v-if", true) ], 64)) : createCommentVNode("v-if", true), unref(W) ? (openBlock(), createBlock(unref(nn), { key: 1, class: normalizeClass([unref(v).e("icon"), unref(v).e("clear")]), onMousedown: withModifiers(unref(xa), ["prevent"]), onClick: P }, { default: withCtx(() => [ createVNode(unref(Ef)) ]), _: 1 }, 8, ["class", "onMousedown"])) : createCommentVNode("v-if", true), unref(oe) ? (openBlock(), createBlock(unref(nn), { key: 2, class: normalizeClass([unref(v).e("icon"), unref(v).e("password")]), onClick: Be }, { default: withCtx(() => [ (openBlock(), createBlock(resolveDynamicComponent(unref(M)))) ]), _: 1 }, 8, ["class"])) : createCommentVNode("v-if", true), unref(Q) ? (openBlock(), createElementBlock("span", { key: 3, class: normalizeClass(unref(v).e("count")) }, [ createBaseVNode("span", { class: normalizeClass(unref(v).e("count-inner")) }, toDisplayString(unref(ae)) + " / " + toDisplayString(j.maxlength), 3) ], 2)) : createCommentVNode("v-if", true), unref(L) && unref(N) && unref(A) ? (openBlock(), createBlock(unref(nn), { key: 4, class: normalizeClass([ unref(v).e("icon"), unref(v).e("validateIcon"), unref(v).is("loading", unref(L) === "validating") ]) }, { default: withCtx(() => [ (openBlock(), createBlock(resolveDynamicComponent(unref(N)))) ]), _: 1 }, 8, ["class"])) : createCommentVNode("v-if", true) ], 2) ], 2)) : createCommentVNode("v-if", true) ], 2), createCommentVNode(" append slot "), j.$slots.append ? (openBlock(), createElementBlock("div", { key: 1, class: normalizeClass(unref(v).be("group", "append")) }, [ renderSlot(j.$slots, "append") ], 2)) : createCommentVNode("v-if", true) ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [ createCommentVNode(" textarea "), createBaseVNode("textarea", mergeProps({ id: unref(f), ref_key: "textarea", ref: b, class: [unref(m).e("inner"), unref(v).is("focus", unref(O))] }, unref(l), { minlength: j.minlength, maxlength: j.maxlength, tabindex: j.tabindex, disabled: unref(p), readonly: j.readonly, autocomplete: j.autocomplete, style: unref(z), "aria-label": j.ariaLabel, placeholder: j.placeholder, form: j.form, autofocus: j.autofocus, rows: j.rows, onCompositionstart: unref(_e), onCompositionupdate: unref(De), onCompositionend: unref(Ae), onInput: Ee, onFocus: unref(F), onBlur: unref($), onChange: Ne, onKeydown: nt }), null, 16, ["id", "minlength", "maxlength", "tabindex", "disabled", "readonly", "autocomplete", "aria-label", "placeholder", "form", "autofocus", "rows", "onCompositionstart", "onCompositionupdate", "onCompositionend", "onFocus", "onBlur"]), unref(Q) ? (openBlock(), createElementBlock("span", { key: 0, style: normalizeStyle(C.value), class: normalizeClass(unref(v).e("count")) }, toDisplayString(unref(ae)) + " / " + toDisplayString(j.maxlength), 7)) : createCommentVNode("v-if", true) ], 64)) ], 16, ["role"])); } }); var kI = vt(xI, [["__file", "input.vue"]]); var $f = $n(kI); var Bs = 4; var 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" } }; var EI = ({ move: e17, size: t, bar: n }) => ({ [n.size]: t, transform: `translate${n.axis}(${e17}%)` }); var zg = Symbol("scrollbarContextKey"); var SI = mt({ vertical: Boolean, size: String, move: Number, ratio: { type: Number, required: true }, always: Boolean }); var _I = "Thumb"; var TI = defineComponent({ __name: "thumb", props: SI, setup(e17) { const t = e17, n = inject(zg), r = pt("scrollbar"); n || pC(_I, "can not inject scrollbar context"); const o = ref(), a = ref(), i = ref({}), s = ref(false); let u = false, l = false, c = on ? document.onselectstart : null; const d = computed(() => CI[t.vertical ? "vertical" : "horizontal"]), f = computed(() => EI({ size: t.size, move: t.move, bar: d.value })), h10 = computed(() => 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 * h10.value / o.value[d.value.offset]; n.wrapElement[d.value.scroll] = O * n.wrapElement[d.value.scrollSize] / 100; }, m = (k) => { k.stopImmediatePropagation(), u = true, document.addEventListener("mousemove", g), document.addEventListener("mouseup", b), c = document.onselectstart, document.onselectstart = () => false; }, g = (k) => { if (!o.value || !a.value || u === false) 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 * h10.value / o.value[d.value.offset]; n.wrapElement[d.value.scroll] = F * n.wrapElement[d.value.scrollSize] / 100; }, b = () => { u = false, i.value[d.value.axis] = 0, document.removeEventListener("mousemove", g), document.removeEventListener("mouseup", b), C(), l && (s.value = false); }, x = () => { l = false, s.value = !!t.size; }, w = () => { l = true, s.value = u; }; onBeforeUnmount(() => { C(), document.removeEventListener("mouseup", b); }); const C = () => { document.onselectstart !== c && (document.onselectstart = c); }; return To(toRef(n, "scrollbarElement"), "mousemove", x), To(toRef(n, "scrollbarElement"), "mouseleave", w), (k, E) => (openBlock(), createBlock(Transition, { name: unref(r).b("fade"), persisted: "" }, { default: withCtx(() => [ withDirectives(createBaseVNode("div", { ref_key: "instance", ref: o, class: normalizeClass([unref(r).e("bar"), unref(r).is(unref(d).key)]), onMousedown: v }, [ createBaseVNode("div", { ref_key: "thumb", ref: a, class: normalizeClass(unref(r).e("thumb")), style: normalizeStyle(unref(f)), onMousedown: p }, null, 38) ], 34), [ [vShow, k.always || s.value] ]) ]), _: 1 }, 8, ["name"])); } }); var J1 = vt(TI, [["__file", "thumb.vue"]]); var OI = mt({ always: { type: Boolean, default: true }, minSize: { type: Number, required: true } }); var PI = defineComponent({ __name: "bar", props: OI, setup(e17, { expose: t }) { const n = e17, r = inject(zg), o = ref(0), a = ref(0), i = ref(""), s = ref(""), u = ref(1), l = ref(1); return t({ handleScroll: (f) => { if (f) { const h10 = f.offsetHeight - Bs, p = f.offsetWidth - Bs; a.value = f.scrollTop * 100 / h10 * u.value, o.value = f.scrollLeft * 100 / p * l.value; } }, update: () => { const f = r == null ? void 0 : r.wrapElement; if (!f) return; const h10 = f.offsetHeight - Bs, p = f.offsetWidth - Bs, v = h10 ** 2 / f.scrollHeight, m = p ** 2 / f.scrollWidth, g = Math.max(v, n.minSize), b = Math.max(m, n.minSize); u.value = v / (h10 - v) / (g / (h10 - g)), l.value = m / (p - m) / (b / (p - b)), s.value = g + Bs < h10 ? `${g}px` : "", i.value = b + Bs < p ? `${b}px` : ""; } }), (f, h10) => (openBlock(), createElementBlock(Fragment, null, [ createVNode(J1, { move: o.value, ratio: l.value, size: i.value, always: f.always }, null, 8, ["move", "ratio", "size", "always"]), createVNode(J1, { move: a.value, ratio: u.value, size: s.value, vertical: "", always: f.always }, null, 8, ["move", "ratio", "size", "always"]) ], 64)); } }); var $I = vt(PI, [["__file", "bar.vue"]]); var AI = mt({ height: { type: [String, Number], default: "" }, maxHeight: { type: [String, Number], default: "" }, native: { type: Boolean, default: false }, 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"]) }); var FI = { scroll: ({ scrollTop: e17, scrollLeft: t }) => [e17, t].every(Ut) }; var Xv = "ElScrollbar"; var II = defineComponent({ name: Xv }); var NI = defineComponent({ ...II, props: AI, emits: FI, setup(e17, { expose: t, emit: n }) { const r = e17, o = pt("scrollbar"); let a, i, s = 0, u = 0; const l = ref(), c = ref(), d = ref(), f = ref(), h10 = computed(() => { const C = {}; return r.height && (C.height = cl(r.height)), r.maxHeight && (C.maxHeight = cl(r.maxHeight)), [r.wrapStyle, C]; }), p = computed(() => [ r.wrapClass, o.e("wrap"), { [o.em("wrap", "hidden-default")]: !r.native } ]), v = computed(() => [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 watch(() => r.noresize, (C) => { C ? (a == null || a(), i == null || i()) : ({ stop: a } = qo(d, w), i = To("resize", w)); }, { immediate: true }), watch(() => [r.maxHeight, r.height], () => { r.native || nextTick(() => { var C; w(), c.value && ((C = f.value) == null || C.handleScroll(c.value)); }); }), provide(zg, reactive({ scrollbarElement: l, wrapElement: c })), onActivated(() => { c.value && (c.value.scrollTop = s, c.value.scrollLeft = u); }), onMounted(() => { r.native || nextTick(() => { w(); }); }), onUpdated(() => w()), t({ wrapRef: c, update: w, scrollTo: g, setScrollTop: b, setScrollLeft: x, handleScroll: m }), (C, k) => (openBlock(), createElementBlock("div", { ref_key: "scrollbarRef", ref: l, class: normalizeClass(unref(o).b()) }, [ createBaseVNode("div", { ref_key: "wrapRef", ref: c, class: normalizeClass(unref(p)), style: normalizeStyle(unref(h10)), tabindex: C.tabindex, onScroll: m }, [ (openBlock(), createBlock(resolveDynamicComponent(C.tag), { id: C.id, ref_key: "resizeRef", ref: d, class: normalizeClass(unref(v)), style: normalizeStyle(C.viewStyle), role: C.role, "aria-label": C.ariaLabel, "aria-orientation": C.ariaOrientation }, { default: withCtx(() => [ renderSlot(C.$slots, "default") ]), _: 3 }, 8, ["id", "class", "style", "role", "aria-label", "aria-orientation"])) ], 46, ["tabindex"]), C.native ? createCommentVNode("v-if", true) : (openBlock(), createBlock($I, { key: 0, ref_key: "barRef", ref: f, always: C.always, "min-size": C.minSize }, null, 8, ["always", "min-size"])) ], 2)); } }); var LI = vt(NI, [["__file", "scrollbar.vue"]]); var Vg = $n(LI); var jg = Symbol("popper"); var WC = Symbol("popperContent"); var DI = [ "dialog", "grid", "group", "listbox", "menu", "navigation", "tooltip", "tree" ]; var KC = mt({ role: { type: String, values: DI, default: "tooltip" } }); var RI = defineComponent({ name: "ElPopper", inheritAttrs: false }); var BI = defineComponent({ ...RI, props: KC, setup(e17, { expose: t }) { const n = e17, r = ref(), o = ref(), a = ref(), i = ref(), s = computed(() => n.role), u = { triggerRef: r, popperInstanceRef: o, contentRef: a, referenceRef: i, role: s }; return t(u), provide(jg, u), (l, c) => renderSlot(l.$slots, "default"); } }); var MI = vt(BI, [["__file", "popper.vue"]]); var GC = mt({ arrowOffset: { type: Number, default: 5 } }); var zI = defineComponent({ name: "ElPopperArrow", inheritAttrs: false }); var VI = defineComponent({ ...zI, props: GC, setup(e17, { expose: t }) { const n = e17, r = pt("popper"), { arrowOffset: o, arrowRef: a, arrowStyle: i } = inject(WC, void 0); return watch(() => n.arrowOffset, (s) => { o.value = s; }), onBeforeUnmount(() => { a.value = void 0; }), t({ arrowRef: a }), (s, u) => (openBlock(), createElementBlock("span", { ref_key: "arrowRef", ref: a, class: normalizeClass(unref(r).e("arrow")), style: normalizeStyle(unref(i)), "data-popper-arrow": "" }, null, 6)); } }); var jI = vt(VI, [["__file", "arrow.vue"]]); var zh = "ElOnlyChild"; var HI = defineComponent({ name: zh, setup(e17, { slots: t, attrs: n }) { var r; const o = inject(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 ? withDirectives(cloneVNode(u, n), [[a]]) : (Sn(zh, "no valid child node found"), null); }; } }); function XC(e17) { if (!e17) return null; const t = e17; for (const n of t) { if (zn(n)) switch (n.type) { case Comment: continue; case Text: case "svg": return Q1(n); case Fragment: return XC(n.children); default: return n; } return Q1(n); } return null; } function Q1(e17) { const t = pt("only-child"); return createVNode("span", { class: t.e("content") }, [e17]); } var 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 }); var UI = defineComponent({ name: "ElPopperTrigger", inheritAttrs: false }); var qI = defineComponent({ ...UI, props: YC, setup(e17, { expose: t }) { const n = e17, { role: r, triggerRef: o } = inject(jg, void 0); tI(o); const a = computed(() => s.value ? n.id : void 0), i = computed(() => { if (r && r.value === "tooltip") return n.open && n.id ? n.id : void 0; }), s = computed(() => { if (r && r.value !== "tooltip") return r.value; }), u = computed(() => s.value ? `${n.open}` : void 0); let l; const c = [ "onMouseenter", "onMouseleave", "onClick", "onKeydown", "onFocus", "onBlur", "onContextmenu" ]; return onMounted(() => { watch(() => n.virtualRef, (d) => { d && (o.value = Wo(d)); }, { immediate: true }), watch(o, (d, f) => { l == null || l(), l = void 0, Zi(d) && (c.forEach((h10) => { var p; const v = n[h10]; v && (d.addEventListener(h10.slice(2).toLowerCase(), v), (p = f == null ? void 0 : f.removeEventListener) == null || p.call(f, h10.slice(2).toLowerCase(), v)); }), l = watch([a, i, s, u], (h10) => { [ "aria-controls", "aria-describedby", "aria-haspopup", "aria-expanded" ].forEach((p, v) => { Oc(h10[v]) ? d.removeAttribute(p) : d.setAttribute(p, h10[v]); }); }, { immediate: true })), Zi(f) && [ "aria-controls", "aria-describedby", "aria-haspopup", "aria-expanded" ].forEach((h10) => f.removeAttribute(h10)); }, { immediate: true }); }), onBeforeUnmount(() => { if (l == null || l(), l = void 0, o.value && Zi(o.value)) { const d = o.value; c.forEach((f) => { const h10 = n[f]; h10 && d.removeEventListener(f.slice(2).toLowerCase(), h10); }), o.value = void 0; } }), t({ triggerRef: o }), (d, f) => d.virtualTriggering ? createCommentVNode("v-if", true) : (openBlock(), createBlock(unref(HI), mergeProps({ key: 0 }, d.$attrs, { "aria-controls": unref(a), "aria-describedby": unref(i), "aria-expanded": unref(u), "aria-haspopup": unref(s) }), { default: withCtx(() => [ renderSlot(d.$slots, "default") ]), _: 3 }, 16, ["aria-controls", "aria-describedby", "aria-expanded", "aria-haspopup"])); } }); var WI = vt(qI, [["__file", "trigger.vue"]]); var Vh = "focus-trap.focus-after-trapped"; var jh = "focus-trap.focus-after-released"; var KI = "focus-trap.focusout-prevented"; var eb = { cancelable: true, bubbles: false }; var GI = { cancelable: true, bubbles: false }; var tb = "focusAfterTrapped"; var nb = "focusAfterReleased"; var XI = Symbol("elFocusTrap"); var Hg = ref(); var Af = ref(0); var Ug = ref(0); var vd = 0; var ZC = (e17) => { const t = [], n = document.createTreeWalker(e17, 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; }; var rb = (e17, t) => { for (const n of e17) if (!YI(n, t)) return n; }; var YI = (e17, t) => { if (false) return false; if (getComputedStyle(e17).visibility === "hidden") return true; for (; e17; ) { if (t && e17 === t) return false; if (getComputedStyle(e17).display === "none") return true; e17 = e17.parentElement; } return false; }; var ZI = (e17) => { const t = ZC(e17), n = rb(t, e17), r = rb(t.reverse(), e17); return [n, r]; }; var JI = (e17) => e17 instanceof HTMLInputElement && "select" in e17; var qa = (e17, t) => { if (e17 && e17.focus) { const n = document.activeElement; e17.focus({ preventScroll: true }), Ug.value = window.performance.now(), e17 !== n && JI(e17) && t && e17.select(); } }; function ob(e17, t) { const n = [...e17], r = e17.indexOf(t); return r !== -1 && n.splice(r, 1), n; } var QI = () => { let e17 = []; return { push: (r) => { const o = e17[0]; o && r !== o && o.pause(), e17 = ob(e17, r), e17.unshift(r); }, remove: (r) => { var o, a; e17 = ob(e17, r), (a = (o = e17[0]) == null ? void 0 : o.resume) == null || a.call(o); } }; }; var eN = (e17, t = false) => { const n = document.activeElement; for (const r of e17) if (qa(r, t), document.activeElement !== n) return; }; var ab = QI(); var tN = () => Af.value > Ug.value; var gd = () => { Hg.value = "pointer", Af.value = window.performance.now(); }; var ib = () => { Hg.value = "keyboard", Af.value = window.performance.now(); }; var nN = () => (onMounted(() => { vd === 0 && (document.addEventListener("mousedown", gd), document.addEventListener("touchstart", gd), document.addEventListener("keydown", ib)), vd++; }), onBeforeUnmount(() => { vd--, vd <= 0 && (document.removeEventListener("mousedown", gd), document.removeEventListener("touchstart", gd), document.removeEventListener("keydown", ib)); }), { focusReason: Hg, lastUserFocusTimestamp: Af, lastAutomatedFocusTimestamp: Ug }); var md = (e17) => new CustomEvent(KI, { ...GI, detail: e17 }); var rN = defineComponent({ name: "ElFocusTrap", inheritAttrs: false, props: { loop: Boolean, trapped: Boolean, focusTrapEl: Object, focusStartEl: { type: [Object, String], default: "first" } }, emits: [ tb, nb, "focusin", "focusout", "focusout-prevented", "release-requested" ], setup(e17, { emit: t }) { const n = ref(); let r, o; const { focusReason: a } = nN(); Y9((p) => { e17.trapped && !i.paused && t("release-requested", p); }); const i = { paused: false, pause() { this.paused = true; }, resume() { this.paused = false; } }, s = (p) => { if (!e17.loop && !e17.trapped || i.paused) return; const { key: v, altKey: m, ctrlKey: g, metaKey: b, currentTarget: x, shiftKey: w } = p, { loop: C } = e17, 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, true)); } else if (w && [O, S].includes(E)) { const A = md({ focusReason: a.value }); t("focusout-prevented", A), A.defaultPrevented || (p.preventDefault(), C && qa(F, true)); } } else if (E === S) { const A = md({ focusReason: a.value }); t("focusout-prevented", A), A.defaultPrevented || p.preventDefault(); } } }; provide(XI, { focusTrapRef: n, onKeydown: s }), watch(() => e17.focusTrapEl, (p) => { p && (n.value = p); }, { immediate: true }), watch([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 = unref(n); if (!v) return; const m = p.target, g = p.relatedTarget, b = m && v.contains(m); e17.trapped || g && v.contains(g) || (r = g), b && t("focusin", p), !i.paused && e17.trapped && (b ? o = m : qa(o, true)); }, d = (p) => { const v = unref(n); if (!(i.paused || !v)) if (e17.trapped) { const m = p.relatedTarget; !Oc(m) && !v.contains(m) && setTimeout(() => { if (!i.paused && e17.trapped) { const g = md({ focusReason: a.value }); t("focusout-prevented", g), g.defaultPrevented || qa(o, true); } }, 0); } else { const m = p.target; m && v.contains(m) || t("focusout", p); } }; async function f() { await nextTick(); const p = unref(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 || nextTick(() => { let b = e17.focusStartEl; Or(b) || (qa(b), document.activeElement !== b && (b = "first")), b === "first" && eN(ZC(p), true), (document.activeElement === v || b === "container") && qa(p); }); } } } function h10() { const p = unref(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 onMounted(() => { e17.trapped && f(), watch(() => e17.trapped, (p) => { p ? f() : h10(); }); }), onBeforeUnmount(() => { e17.trapped && h10(), 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(e17, t, n, r, o, a) { return renderSlot(e17.$slots, "default", { handleKeydown: e17.onKeydown }); } var JC = vt(rN, [["render", oN], ["__file", "focus-trap.vue"]]); var aN = ["fixed", "absolute"]; var iN = mt({ boundariesPadding: { type: Number, default: 0 }, fallbackPlacements: { type: et(Array), default: void 0 }, gpuAcceleration: { type: Boolean, default: true }, offset: { type: Number, default: 12 }, placement: { type: String, values: $c, default: "bottom" }, popperOptions: { type: et(Object), default: () => ({}) }, strategy: { type: String, values: aN, default: "absolute" } }); var 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: true }, pure: Boolean, focusOnShow: { type: Boolean, default: false }, trapping: { type: Boolean, default: false }, popperClass: { type: et([String, Array, Object]) }, popperStyle: { type: et([String, Array, Object]) }, referenceEl: { type: et(Object) }, triggerTargetEl: { type: et(Object) }, stopPopperMouseEvent: { type: Boolean, default: true }, virtualTriggering: Boolean, zIndex: Number, ...Si(["ariaLabel"]) }); var sN = { mouseenter: (e17) => e17 instanceof MouseEvent, mouseleave: (e17) => e17 instanceof MouseEvent, focus: () => true, blur: () => true, close: () => true }; var lN = (e17, t = []) => { const { placement: n, strategy: r, popperOptions: o } = e17, a = { placement: n, strategy: r, ...o, modifiers: [...cN(e17), ...t] }; return dN(a, o == null ? void 0 : o.modifiers), a; }; var uN = (e17) => { if (on) return Wo(e17); }; function cN(e17) { const { offset: t, gpuAcceleration: n, fallbackPlacements: r } = e17; 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(e17, t) { t && (e17.modifiers = [...e17.modifiers, ...t ?? []]); } var pN = 0; var fN = (e17) => { const { popperInstanceRef: t, contentRef: n, triggerRef: r, role: o } = inject(jg, void 0), a = ref(), i = ref(), s = computed(() => ({ name: "eventListeners", enabled: !!e17.visible })), u = computed(() => { var g; const b = unref(a), x = (g = unref(i)) != null ? g : pN; return { name: "arrow", enabled: !uC(b), options: { element: b, padding: x } }; }), l = computed(() => ({ onFirstUpdate: () => { p(); }, ...lN(e17, [ unref(u), unref(s) ]) })), c = computed(() => uN(e17.referenceEl) || unref(r)), { attributes: d, state: f, styles: h10, update: p, forceUpdate: v, instanceRef: m } = W9(c, n, l); return watch(m, (g) => t.value = g), onMounted(() => { watch(() => { var g; return (g = unref(c)) == null ? void 0 : g.getBoundingClientRect(); }, () => { p(); }); }), { attributes: d, arrowRef: a, contentRef: n, instanceRef: m, state: f, styles: h10, role: o, forceUpdate: v, update: p }; }; var hN = (e17, { attributes: t, styles: n, role: r }) => { const { nextZIndex: o } = Rg(), a = pt("popper"), i = computed(() => unref(t).popper), s = ref(Ut(e17.zIndex) ? e17.zIndex : o()), u = computed(() => [ a.b(), a.is("pure", e17.pure), a.is(e17.effect), e17.popperClass ]), l = computed(() => [ { zIndex: unref(s) }, unref(n).popper, e17.popperStyle || {} ]), c = computed(() => r.value === "dialog" ? "false" : void 0), d = computed(() => unref(n).arrow || {}); return { ariaModal: c, arrowStyle: d, contentAttrs: i, contentClass: u, contentStyle: l, contentZIndex: s, updateZIndex: () => { s.value = Ut(e17.zIndex) ? e17.zIndex : o(); } }; }; var vN = (e17, t) => { const n = ref(false), r = ref(); 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) => { e17.visible && !n.value && (l.target && (r.value = l.target), n.value = true); }, onFocusoutPrevented: (l) => { e17.trapping || (l.detail.focusReason === "pointer" && l.preventDefault(), n.value = false); }, onReleaseRequested: () => { n.value = false, t("close"); } }; }; var gN = defineComponent({ name: "ElPopperContent" }); var mN = defineComponent({ ...gN, props: QC, emits: sN, setup(e17, { expose: t, emit: n }) { const r = e17, { focusStartRef: o, trapped: a, onFocusAfterReleased: i, onFocusAfterTrapped: s, onFocusInTrap: u, onFocusoutPrevented: l, onReleaseRequested: c } = vN(r, n), { attributes: d, arrowRef: f, contentRef: h10, 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 = inject($p, void 0), O = ref(); provide(WC, { arrowStyle: x, arrowRef: f, arrowOffset: O }), S && provide($p, { ...S, addInputId: xa, removeInputId: xa }); let F; const $ = (L = true) => { g(), L && E(); }, A = () => { $(false), r.visible && r.focusOnShow ? a.value = true : r.visible === false && (a.value = false); }; return onMounted(() => { watch(() => r.triggerTargetEl, (L, N) => { F == null || F(), F = void 0; const M = unref(L || h10.value), I = unref(N || h10.value); Zi(M) && (F = watch([m, () => r.ariaLabel, b, () => r.id], (z) => { ["role", "aria-label", "aria-modal", "id"].forEach((R, W) => { Oc(z[W]) ? M.removeAttribute(R) : M.setAttribute(R, z[W]); }); }, { immediate: true })), I !== M && Zi(I) && ["role", "aria-label", "aria-modal", "id"].forEach((z) => { I.removeAttribute(z); }); }, { immediate: true }), watch(() => r.visible, A, { immediate: true }); }), onBeforeUnmount(() => { F == null || F(), F = void 0; }), t({ popperContentRef: h10, popperInstanceRef: v, updatePopper: $, contentStyle: k }), (L, N) => (openBlock(), createElementBlock("div", mergeProps({ ref_key: "contentRef", ref: h10 }, unref(w), { style: unref(k), class: unref(C), tabindex: "-1", onMouseenter: (M) => L.$emit("mouseenter", M), onMouseleave: (M) => L.$emit("mouseleave", M) }), [ createVNode(unref(JC), { trapped: unref(a), "trap-on-focus-in": true, "focus-trap-el": unref(h10), "focus-start-el": unref(o), onFocusAfterTrapped: unref(s), onFocusAfterReleased: unref(i), onFocusin: unref(u), onFocusoutPrevented: unref(l), onReleaseRequested: unref(c) }, { default: withCtx(() => [ renderSlot(L.$slots, "default") ]), _: 3 }, 8, ["trapped", "focus-trap-el", "focus-start-el", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusin", "onFocusoutPrevented", "onReleaseRequested"]) ], 16, ["onMouseenter", "onMouseleave"])); } }); var yN = vt(mN, [["__file", "content.vue"]]); var bN = $n(MI); var qg = Symbol("elTooltip"); var 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: true }, disabled: Boolean, ...Si(["ariaLabel"]) }); var Zu = mt({ ...YC, disabled: Boolean, trigger: { type: et([String, Array]), default: "hover" }, triggerKeys: { type: et(Array), default: () => [Fn.enter, Fn.space] } }); var { useModelToggleProps: wN, useModelToggleEmits: xN, useModelToggle: kN } = HF("visible"); var CN = mt({ ...KC, ...wN, ...Cr, ...Zu, ...GC, showArrow: { type: Boolean, default: true } }); var EN = [ ...xN, "before-show", "before-hide", "show", "hide", "open", "close" ]; var SN = (e17, t) => br(e17) ? e17.includes(t) : e17 === t; var Ms = (e17, t, n) => (r) => { SN(unref(e17), t) && n(r); }; var _N = defineComponent({ name: "ElTooltipTrigger" }); var TN = defineComponent({ ..._N, props: Zu, setup(e17, { expose: t }) { const n = e17, r = pt("tooltip"), { controlled: o, id: a, open: i, onOpen: s, onClose: u, onToggle: l } = inject(qg, void 0), c = ref(null), d = () => { if (unref(o) || n.disabled) return true; }, f = toRef(n, "trigger"), h10 = 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) => (openBlock(), createBlock(unref(WI), { id: unref(a), "virtual-ref": w.virtualRef, open: unref(i), "virtual-triggering": w.virtualTriggering, class: normalizeClass(unref(r).e("trigger")), onBlur: unref(g), onClick: unref(v), onContextmenu: unref(b), onFocus: unref(m), onMouseenter: unref(h10), onMouseleave: unref(p), onKeydown: unref(x) }, { default: withCtx(() => [ renderSlot(w.$slots, "default") ]), _: 3 }, 8, ["id", "virtual-ref", "open", "virtual-triggering", "class", "onBlur", "onClick", "onContextmenu", "onFocus", "onMouseenter", "onMouseleave", "onKeydown"])); } }); var ON = vt(TN, [["__file", "trigger.vue"]]); var PN = mt({ to: { type: et([String, Object]), required: true }, disabled: Boolean }); var $N = defineComponent({ __name: "teleport", props: PN, setup(e17) { return (t, n) => t.disabled ? renderSlot(t.$slots, "default", { key: 0 }) : (openBlock(), createBlock(Teleport, { key: 1, to: t.to }, [ renderSlot(t.$slots, "default") ], 8, ["to"])); } }); var AN = vt($N, [["__file", "teleport.vue"]]); var e3 = $n(AN); var FN = defineComponent({ name: "ElTooltipContent", inheritAttrs: false }); var IN = defineComponent({ ...FN, props: Cr, setup(e17, { expose: t }) { const n = e17, { selector: r } = LC(), o = pt("tooltip"), a = ref(null); let i; const { controlled: s, id: u, open: l, trigger: c, onClose: d, onOpen: f, onShow: h10, onHide: p, onBeforeShow: v, onBeforeHide: m } = inject(qg, void 0), g = computed(() => n.transition || `${o.namespace.value}-fade-in-linear`), b = computed(() => false ? true : n.persistent); onBeforeUnmount(() => { i == null || i(); }); const x = computed(() => unref(b) ? true : unref(l)), w = computed(() => n.disabled ? false : unref(l)), C = computed(() => n.appendTo || r.value), k = computed(() => { var I; return (I = n.style) != null ? I : {}; }), E = ref(true), S = () => { p(), E.value = true; }, O = () => { if (unref(s)) return true; }, F = fa(O, () => { n.enterable && unref(c) === "hover" && f(); }), $ = fa(O, () => { unref(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 = () => { h10(), i = ET(computed(() => { var I; return (I = a.value) == null ? void 0 : I.popperContentRef; }), () => { if (unref(s)) return; unref(c) !== "hover" && d(); }); }, M = () => { n.virtualTriggering || d(); }; return watch(() => unref(l), (I) => { I ? E.value = false : i == null || i(); }, { flush: "post" }), watch(() => n.content, () => { var I, z; (z = (I = a.value) == null ? void 0 : I.updatePopper) == null || z.call(I); }), t({ contentRef: a }), (I, z) => (openBlock(), createBlock(unref(e3), { disabled: !I.teleported, to: unref(C) }, { default: withCtx(() => [ createVNode(Transition, { name: unref(g), onAfterLeave: S, onBeforeEnter: A, onAfterEnter: N, onBeforeLeave: L }, { default: withCtx(() => [ unref(x) ? withDirectives((openBlock(), createBlock(unref(yN), mergeProps({ key: 0, id: unref(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, unref(k)], "reference-el": I.referenceEl, "trigger-target-el": I.triggerTargetEl, visible: unref(w), "z-index": I.zIndex, onMouseenter: unref(F), onMouseleave: unref($), onBlur: M, onClose: unref(d) }), { default: withCtx(() => [ renderSlot(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"])), [ [vShow, unref(w)] ]) : createCommentVNode("v-if", true) ]), _: 3 }, 8, ["name"]) ]), _: 3 }, 8, ["disabled", "to"])); } }); var NN = vt(IN, [["__file", "content.vue"]]); var LN = defineComponent({ name: "ElTooltip" }); var DN = defineComponent({ ...LN, props: CN, emits: EN, setup(e17, { expose: t, emit: n }) { const r = e17; J9(); const o = pi(), a = ref(), i = ref(), s = () => { var g; const b = unref(a); b && ((g = b.popperInstanceRef) == null || g.update()); }, u = ref(false), l = ref(), { show: c, hide: d, hasUpdateHandler: f } = kN({ indicator: u, toggleReason: l }), { onOpen: h10, onClose: p } = eI({ showAfter: toRef(r, "showAfter"), hideAfter: toRef(r, "hideAfter"), autoClose: toRef(r, "autoClose"), open: c, close: d }), v = computed(() => ea(r.visible) && !f.value); provide(qg, { controlled: v, id: o, open: readonly(u), trigger: toRef(r, "trigger"), onOpen: (g) => { h10(g); }, onClose: (g) => { p(g); }, onToggle: (g) => { unref(u) ? p(g) : h10(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 }), watch(() => r.disabled, (g) => { g && u.value && (u.value = false); }); 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 onDeactivated(() => u.value && d()), t({ popperRef: a, contentRef: i, isFocusInsideContent: m, updatePopper: s, onOpen: h10, onClose: p, hide: d }), (g, b) => (openBlock(), createBlock(unref(bN), { ref_key: "popperRef", ref: a, role: g.role }, { default: withCtx(() => [ createVNode(ON, { disabled: g.disabled, trigger: g.trigger, "trigger-keys": g.triggerKeys, "virtual-ref": g.virtualRef, "virtual-triggering": g.virtualTriggering }, { default: withCtx(() => [ g.$slots.default ? renderSlot(g.$slots, "default", { key: 0 }) : createCommentVNode("v-if", true) ]), _: 3 }, 8, ["disabled", "trigger", "trigger-keys", "virtual-ref", "virtual-triggering"]), createVNode(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: withCtx(() => [ renderSlot(g.$slots, "content", {}, () => [ g.rawContent ? (openBlock(), createElementBlock("span", { key: 0, innerHTML: g.content }, null, 8, ["innerHTML"])) : (openBlock(), createElementBlock("span", { key: 1 }, toDisplayString(g.content), 1)) ]), g.showArrow ? (openBlock(), createBlock(unref(jI), { key: 0, "arrow-offset": g.arrowOffset }, null, 8, ["arrow-offset"])) : createCommentVNode("v-if", true) ]), _: 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 = vt(DN, [["__file", "tooltip.vue"]]); var Ap = $n(RN); var t3 = Symbol("buttonGroupContextKey"); var BN = (e17, 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" }, computed(() => e17.type === "text")); const n = inject(t3, void 0), r = Pf("button"), { form: o } = _i(), a = fi(computed(() => n == null ? void 0 : n.size)), i = Fc(), s = ref(), u = useSlots(), l = computed(() => e17.type || (n == null ? void 0 : n.type) || ""), c = computed(() => { var p, v, m; return (m = (v = e17.autoInsertSpace) != null ? v : (p = r.value) == null ? void 0 : p.autoInsertSpace) != null ? m : false; }), d = computed(() => e17.tag === "button" ? { ariaDisabled: i.value || e17.loading, disabled: i.value || e17.loading, autofocus: e17.autofocus, type: e17.nativeType } : {}), f = computed(() => { 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) === Text) { const g = m.children; return new RegExp("^\\p{Unified_Ideograph}{2}$", "u").test(g.trim()); } } return false; }); return { _disabled: i, _size: a, _type: l, _ref: s, _props: d, shouldAddSpace: f, handleClick: (p) => { if (i.value || e17.loading) { p.stopPropagation(); return; } e17.nativeType === "reset" && (o == null || o.resetFields()), t("click", p); } }; }; var MN = [ "default", "primary", "success", "warning", "info", "danger", "text", "" ]; var zN = ["button", "submit", "reset"]; var 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" } }); var VN = { click: (e17) => e17 instanceof MouseEvent }; function Zn(e17, t) { jN(e17) && (e17 = "100%"); var n = HN(e17); return e17 = t === 360 ? e17 : Math.min(t, Math.max(0, parseFloat(e17))), n && (e17 = parseInt(String(e17 * t), 10) / 100), Math.abs(e17 - t) < 1e-6 ? 1 : (t === 360 ? e17 = (e17 < 0 ? e17 % t + t : e17 % t) / parseFloat(String(t)) : e17 = e17 % t / parseFloat(String(t)), e17); } function yd(e17) { return Math.min(1, Math.max(0, e17)); } function jN(e17) { return typeof e17 == "string" && e17.indexOf(".") !== -1 && parseFloat(e17) === 1; } function HN(e17) { return typeof e17 == "string" && e17.indexOf("%") !== -1; } function n3(e17) { return e17 = parseFloat(e17), (isNaN(e17) || e17 < 0 || e17 > 1) && (e17 = 1), e17; } function bd(e17) { return e17 <= 1 ? "".concat(Number(e17) * 100, "%") : e17; } function Ui(e17) { return e17.length === 1 ? "0" + e17 : String(e17); } function UN(e17, t, n) { return { r: Zn(e17, 255) * 255, g: Zn(t, 255) * 255, b: Zn(n, 255) * 255 }; } function sb(e17, t, n) { e17 = Zn(e17, 255), t = Zn(t, 255), n = Zn(n, 255); var r = Math.max(e17, t, n), o = Math.min(e17, 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 e17: a = (t - n) / u + (t < n ? 6 : 0); break; case t: a = (n - e17) / u + 2; break; case n: a = (e17 - t) / u + 4; break; } a /= 6; } return { h: a, s: i, l: s }; } function Hh(e17, t, n) { return n < 0 && (n += 1), n > 1 && (n -= 1), n < 1 / 6 ? e17 + (t - e17) * (6 * n) : n < 1 / 2 ? t : n < 2 / 3 ? e17 + (t - e17) * (2 / 3 - n) * 6 : e17; } function qN(e17, t, n) { var r, o, a; if (e17 = Zn(e17, 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, e17 + 1 / 3), o = Hh(s, i, e17), a = Hh(s, i, e17 - 1 / 3); } return { r: r * 255, g: o * 255, b: a * 255 }; } function lb(e17, t, n) { e17 = Zn(e17, 255), t = Zn(t, 255), n = Zn(n, 255); var r = Math.max(e17, t, n), o = Math.min(e17, t, n), a = 0, i = r, s = r - o, u = r === 0 ? 0 : s / r; if (r === o) a = 0; else { switch (r) { case e17: a = (t - n) / s + (t < n ? 6 : 0); break; case t: a = (n - e17) / s + 2; break; case n: a = (e17 - t) / s + 4; break; } a /= 6; } return { h: a, s: u, v: i }; } function WN(e17, t, n) { e17 = Zn(e17, 360) * 6, t = Zn(t, 100), n = Zn(n, 100); var r = Math.floor(e17), o = e17 - 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(e17, t, n, r) { var o = [ Ui(Math.round(e17).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(e17, t, n, r, o) { var a = [ Ui(Math.round(e17).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(e17) { return Math.round(parseFloat(e17) * 255).toString(16); } function cb(e17) { return zr(e17) / 255; } function zr(e17) { return parseInt(e17, 16); } function XN(e17) { return { r: e17 >> 16, g: (e17 & 65280) >> 8, b: e17 & 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(e17) { var t = { r: 0, g: 0, b: 0 }, n = 1, r = null, o = null, a = null, i = false, s = false; return typeof e17 == "string" && (e17 = QN(e17)), typeof e17 == "object" && (ua(e17.r) && ua(e17.g) && ua(e17.b) ? (t = UN(e17.r, e17.g, e17.b), i = true, s = String(e17.r).substr(-1) === "%" ? "prgb" : "rgb") : ua(e17.h) && ua(e17.s) && ua(e17.v) ? (r = bd(e17.s), o = bd(e17.v), t = WN(e17.h, r, o), i = true, s = "hsv") : ua(e17.h) && ua(e17.s) && ua(e17.l) && (r = bd(e17.s), a = bd(e17.l), t = qN(e17.h, r, a), i = true, s = "hsl"), Object.prototype.hasOwnProperty.call(e17, "a") && (n = e17.a)), n = n3(n), { ok: i, format: e17.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+%?"; var JN = "[-\\+]?\\d*\\.\\d+%?"; var ti = "(?:".concat(JN, ")|(?:").concat(ZN, ")"); var Uh = "[\\s|\\(]+(".concat(ti, ")[,|\\s]+(").concat(ti, ")[,|\\s]+(").concat(ti, ")\\s*\\)?"); var qh = "[\\s|\\(]+(".concat(ti, ")[,|\\s]+(").concat(ti, ")[,|\\s]+(").concat(ti, ")[,|\\s]+(").concat(ti, ")\\s*\\)?"); var 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(e17) { if (e17 = e17.trim().toLowerCase(), e17.length === 0) return false; var t = false; if (Zv[e17]) e17 = Zv[e17], t = true; else if (e17 === "transparent") return { r: 0, g: 0, b: 0, a: 0, format: "name" }; var n = wo.rgb.exec(e17); return n ? { r: n[1], g: n[2], b: n[3] } : (n = wo.rgba.exec(e17), n ? { r: n[1], g: n[2], b: n[3], a: n[4] } : (n = wo.hsl.exec(e17), n ? { h: n[1], s: n[2], l: n[3] } : (n = wo.hsla.exec(e17), n ? { h: n[1], s: n[2], l: n[3], a: n[4] } : (n = wo.hsv.exec(e17), n ? { h: n[1], s: n[2], v: n[3] } : (n = wo.hsva.exec(e17), n ? { h: n[1], s: n[2], v: n[3], a: n[4] } : (n = wo.hex8.exec(e17), 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(e17), n ? { r: zr(n[1]), g: zr(n[2]), b: zr(n[3]), format: t ? "name" : "hex" } : (n = wo.hex4.exec(e17), 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(e17), n ? { r: zr(n[1] + n[1]), g: zr(n[2] + n[2]), b: zr(n[3] + n[3]), format: t ? "name" : "hex" } : false))))))))); } function ua(e17) { return !!wo.CSS_UNIT.exec(String(e17)); } var eL = ( /** @class */ function() { function e17(t, n) { t === void 0 && (t = ""), n === void 0 && (n = {}); var r; if (t instanceof e17) 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 e17.prototype.isDark = function() { return this.getBrightness() < 128; }, e17.prototype.isLight = function() { return !this.isDark(); }, e17.prototype.getBrightness = function() { var t = this.toRgb(); return (t.r * 299 + t.g * 587 + t.b * 114) / 1e3; }, e17.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; }, e17.prototype.getAlpha = function() { return this.a; }, e17.prototype.setAlpha = function(t) { return this.a = n3(t), this.roundA = Math.round(100 * this.a) / 100, this; }, e17.prototype.isMonochrome = function() { var t = this.toHsl().s; return t === 0; }, e17.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 }; }, e17.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, ")"); }, e17.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 }; }, e17.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, ")"); }, e17.prototype.toHex = function(t) { return t === void 0 && (t = false), ub(this.r, this.g, this.b, t); }, e17.prototype.toHexString = function(t) { return t === void 0 && (t = false), "#" + this.toHex(t); }, e17.prototype.toHex8 = function(t) { return t === void 0 && (t = false), KN(this.r, this.g, this.b, this.a, t); }, e17.prototype.toHex8String = function(t) { return t === void 0 && (t = false), "#" + this.toHex8(t); }, e17.prototype.toHexShortString = function(t) { return t === void 0 && (t = false), this.a === 1 ? this.toHexString(t) : this.toHex8String(t); }, e17.prototype.toRgb = function() { return { r: Math.round(this.r), g: Math.round(this.g), b: Math.round(this.b), a: this.a }; }, e17.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, ")"); }, e17.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 }; }, e17.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, ")"); }, e17.prototype.toName = function() { if (this.a === 0) return "transparent"; if (this.a < 1) return false; for (var t = "#" + ub(this.r, this.g, this.b, false), 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 false; }, e17.prototype.toString = function(t) { var n = !!t; t = t ?? this.format; var r = false, 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(true)), t === "hex4" && (r = this.toHex8String(true)), t === "hex8" && (r = this.toHex8String()), t === "name" && (r = this.toName()), t === "hsl" && (r = this.toHslString()), t === "hsv" && (r = this.toHsvString()), r || this.toHexString()); }, e17.prototype.toNumber = function() { return (Math.round(this.r) << 16) + (Math.round(this.g) << 8) + Math.round(this.b); }, e17.prototype.clone = function() { return new e17(this.toString()); }, e17.prototype.lighten = function(t) { t === void 0 && (t = 10); var n = this.toHsl(); return n.l += t / 100, n.l = yd(n.l), new e17(n); }, e17.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 e17(n); }, e17.prototype.darken = function(t) { t === void 0 && (t = 10); var n = this.toHsl(); return n.l -= t / 100, n.l = yd(n.l), new e17(n); }, e17.prototype.tint = function(t) { return t === void 0 && (t = 10), this.mix("white", t); }, e17.prototype.shade = function(t) { return t === void 0 && (t = 10), this.mix("black", t); }, e17.prototype.desaturate = function(t) { t === void 0 && (t = 10); var n = this.toHsl(); return n.s -= t / 100, n.s = yd(n.s), new e17(n); }, e17.prototype.saturate = function(t) { t === void 0 && (t = 10); var n = this.toHsl(); return n.s += t / 100, n.s = yd(n.s), new e17(n); }, e17.prototype.greyscale = function() { return this.desaturate(100); }, e17.prototype.spin = function(t) { var n = this.toHsl(), r = (n.h + t) % 360; return n.h = r < 0 ? 360 + r : r, new e17(n); }, e17.prototype.mix = function(t, n) { n === void 0 && (n = 50); var r = this.toRgb(), o = new e17(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 e17(i); }, e17.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 e17(r)); return a; }, e17.prototype.complement = function() { var t = this.toHsl(); return t.h = (t.h + 180) % 360, new e17(t); }, e17.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 e17({ h: r, s: o, v: a })), a = (a + s) % 1; return i; }, e17.prototype.splitcomplement = function() { var t = this.toHsl(), n = t.h; return [ this, new e17({ h: (n + 72) % 360, s: t.s, l: t.l }), new e17({ h: (n + 216) % 360, s: t.s, l: t.l }) ]; }, e17.prototype.onBackground = function(t) { var n = this.toRgb(), r = new e17(t).toRgb(), o = n.a + r.a * (1 - n.a); return new e17({ 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 }); }, e17.prototype.triad = function() { return this.polyad(3); }, e17.prototype.tetrad = function() { return this.polyad(4); }, e17.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 e17({ h: (r + i * a) % 360, s: n.s, l: n.l })); return o; }, e17.prototype.equals = function(t) { return this.toRgbString() === new e17(t).toRgbString(); }, e17; }() ); function Ba(e17, t = 20) { return e17.mix("#141414", t).toString(); } function tL(e17) { const t = Fc(), n = pt("button"); return computed(() => { let r = {}, o = e17.color; if (o) { const a = o.match(/var\((.*?)\)/); a && (o = window.getComputedStyle(window.document.documentElement).getPropertyValue(a[1])); const i = new eL(o), s = e17.dark ? i.tint(20).toString() : Ba(i, 20); if (e17.plain) r = n.cssVarBlock({ "bg-color": e17.dark ? Ba(i, 90) : i.tint(90).toString(), "text-color": o, "border-color": e17.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")] = e17.dark ? Ba(i, 90) : i.tint(90).toString(), r[n.cssVarBlockName("disabled-text-color")] = e17.dark ? Ba(i, 50) : i.tint(50).toString(), r[n.cssVarBlockName("disabled-border-color")] = e17.dark ? Ba(i, 80) : i.tint(80).toString()); else { const u = e17.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 = e17.dark ? Ba(i, 50) : i.tint(50).toString(); r[n.cssVarBlockName("disabled-bg-color")] = c, r[n.cssVarBlockName("disabled-text-color")] = e17.dark ? "rgba(255, 255, 255, 0.5)" : `var(${n.cssVarName("color-white")})`, r[n.cssVarBlockName("disabled-border-color")] = c; } } } return r; }); } var nL = defineComponent({ name: "ElButton" }); var rL = defineComponent({ ...nL, props: Yv, emits: VN, setup(e17, { expose: t, emit: n }) { const r = e17, o = tL(r), a = pt("button"), { _ref: i, _size: s, _type: u, _disabled: l, _props: c, shouldAddSpace: d, handleClick: f } = BN(r, n), h10 = computed(() => [ 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) => (openBlock(), createBlock(resolveDynamicComponent(p.tag), mergeProps({ ref_key: "_ref", ref: i }, unref(c), { class: unref(h10), style: unref(o), onClick: unref(f) }), { default: withCtx(() => [ p.loading ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [ p.$slots.loading ? renderSlot(p.$slots, "loading", { key: 0 }) : (openBlock(), createBlock(unref(nn), { key: 1, class: normalizeClass(unref(a).is("loading")) }, { default: withCtx(() => [ (openBlock(), createBlock(resolveDynamicComponent(p.loadingIcon))) ]), _: 1 }, 8, ["class"])) ], 64)) : p.icon || p.$slots.icon ? (openBlock(), createBlock(unref(nn), { key: 1 }, { default: withCtx(() => [ p.icon ? (openBlock(), createBlock(resolveDynamicComponent(p.icon), { key: 0 })) : renderSlot(p.$slots, "icon", { key: 1 }) ]), _: 3 })) : createCommentVNode("v-if", true), p.$slots.default ? (openBlock(), createElementBlock("span", { key: 2, class: normalizeClass({ [unref(a).em("text", "expand")]: unref(d) }) }, [ renderSlot(p.$slots, "default") ], 2)) : createCommentVNode("v-if", true) ]), _: 3 }, 16, ["class", "style", "onClick"])); } }); var oL = vt(rL, [["__file", "button.vue"]]); var aL = { size: Yv.size, type: Yv.type }; var iL = defineComponent({ name: "ElButtonGroup" }); var sL = defineComponent({ ...iL, props: aL, setup(e17) { const t = e17; provide(t3, reactive({ size: toRef(t, "size"), type: toRef(t, "type") })); const n = pt("button"); return (r, o) => (openBlock(), createElementBlock("div", { class: normalizeClass(unref(n).b("group")) }, [ renderSlot(r.$slots, "default") ], 2)); } }); var r3 = vt(sL, [["__file", "button-group.vue"]]); var 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(e17) { return e17 && e17.__esModule && Object.prototype.hasOwnProperty.call(e17, "default") ? e17.default : e17; } var Wa = /* @__PURE__ */ new Map(); if (on) { let e17; document.addEventListener("mousedown", (t) => e17 = t), document.addEventListener("mouseup", (t) => { if (e17) { for (const n of Wa.values()) for (const { documentHandler: r } of n) r(t, e17); e17 = void 0; } }); } function db(e17, 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 = e17.contains(i) || e17.contains(s), d = e17 === i, f = n.length && n.some((p) => p == null ? void 0 : p.contains(i)) || n.length && n.includes(s), h10 = a && (a.contains(i) || a.contains(s)); u || l || c || d || f || h10 || t.value(r, o); }; } var o3 = { beforeMount(e17, t) { Wa.has(e17) || Wa.set(e17, []), Wa.get(e17).push({ documentHandler: db(e17, t), bindingFn: t.value }); }, updated(e17, t) { Wa.has(e17) || Wa.set(e17, []); const n = Wa.get(e17), r = n.findIndex((a) => a.bindingFn === t.oldValue), o = { documentHandler: db(e17, t), bindingFn: t.value }; r >= 0 ? n.splice(r, 1, o) : n.push(o); }, unmounted(e17) { Wa.delete(e17); } }; var 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" } }); var dL = defineComponent({ name: "ElCard" }); var pL = defineComponent({ ...dL, props: cL, setup(e17) { const t = pt("card"); return (n, r) => (openBlock(), createElementBlock("div", { class: normalizeClass([unref(t).b(), unref(t).is(`${n.shadow}-shadow`)]) }, [ n.$slots.header || n.header ? (openBlock(), createElementBlock("div", { key: 0, class: normalizeClass(unref(t).e("header")) }, [ renderSlot(n.$slots, "header", {}, () => [ createTextVNode(toDisplayString(n.header), 1) ]) ], 2)) : createCommentVNode("v-if", true), createBaseVNode("div", { class: normalizeClass([unref(t).e("body"), n.bodyClass]), style: normalizeStyle(n.bodyStyle) }, [ renderSlot(n.$slots, "default") ], 6), n.$slots.footer || n.footer ? (openBlock(), createElementBlock("div", { key: 1, class: normalizeClass(unref(t).e("footer")) }, [ renderSlot(n.$slots, "footer", {}, () => [ createTextVNode(toDisplayString(n.footer), 1) ]) ], 2)) : createCommentVNode("v-if", true) ], 2)); } }); var fL = vt(pL, [["__file", "card.vue"]]); var a3 = $n(fL); var 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: true }, ...Si(["ariaControls"]) }; var s3 = { [hn]: (e17) => Or(e17) || Ut(e17) || ea(e17), change: (e17) => Or(e17) || Ut(e17) || ea(e17) }; var Rl = Symbol("checkboxGroupContextKey"); var hL = ({ model: e17, isChecked: t }) => { const n = inject(Rl, void 0), r = computed(() => { 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) && e17.value.length >= s && !t.value || !ba(u) && e17.value.length <= u && t.value; }); return { isDisabled: Fc(computed(() => (n == null ? void 0 : n.disabled.value) || r.value)), isLimitDisabled: r }; }; var vL = (e17, { model: t, isLimitExceeded: n, hasOwnLabel: r, isDisabled: o, isLabeledByFormItem: a }) => { const i = inject(Rl, void 0), { formItem: s } = _i(), { emit: u } = getCurrentInstance(); function l(p) { var v, m, g, b; return [true, e17.trueValue, e17.trueLabel].includes(p) ? (m = (v = e17.trueValue) != null ? v : e17.trueLabel) != null ? m : true : (b = (g = e17.falseValue) != null ? g : e17.falseLabel) != null ? b : false; } 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([false, e17.falseValue, e17.falseLabel].includes(t.value)), await nextTick(), c(t.value, p))); } const h10 = computed(() => (i == null ? void 0 : i.validateEvent) || e17.validateEvent); return watch(() => e17.modelValue, () => { h10.value && (s == null || s.validate("change").catch((p) => Sn(p))); }), { handleChange: d, onClickRoot: f }; }; var gL = (e17) => { const t = ref(false), { emit: n } = getCurrentInstance(), r = inject(Rl, void 0), o = computed(() => ba(r) === false), a = ref(false), i = computed({ get() { var s, u; return o.value ? (s = r == null ? void 0 : r.modelValue) == null ? void 0 : s.value : (u = e17.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 === false && ((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 }; }; var mL = (e17, t, { model: n }) => { const r = inject(Rl, void 0), o = ref(false), a = computed(() => Ku(e17.value) ? e17.label : e17.value), i = computed(() => { const c = n.value; return ea(c) ? c : br(c) ? zn(a.value) ? c.map(toRaw).some((d) => Yo(d, a.value)) : c.map(toRaw).includes(a.value) : c != null ? c === e17.trueValue || c === e17.trueLabel : !!c; }), s = fi(computed(() => { var c; return (c = r == null ? void 0 : r.size) == null ? void 0 : c.value; }), { prop: true }), u = fi(computed(() => { var c; return (c = r == null ? void 0 : r.size) == null ? void 0 : c.value; })), l = computed(() => !!t.default || !Ku(a.value)); return { checkboxButtonSize: s, isChecked: i, isFocused: o, checkboxSize: u, hasOwnLabel: l, actualValue: a }; }; var l3 = (e17, t) => { const { formItem: n } = _i(), { model: r, isGroup: o, isLimitExceeded: a } = gL(e17), { isFocused: i, isChecked: s, checkboxButtonSize: u, checkboxSize: l, hasOwnLabel: c, actualValue: d } = mL(e17, t, { model: r }), { isDisabled: f } = hL({ model: r, isChecked: s }), { inputId: h10, isLabeledByFormItem: p } = Ic(e17, { formItemContext: n, disableIdGeneration: c, disableIdManagement: o }), { handleChange: v, onClickRoot: m } = vL(e17, { 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 = e17.trueValue) != null ? x : e17.trueLabel) != null ? w : true; } e17.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" }, computed(() => o.value && Ku(e17.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" }, computed(() => !!e17.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" }, computed(() => !!e17.falseLabel)), { inputId: h10, isLabeledByFormItem: p, isChecked: s, isDisabled: f, isFocused: i, checkboxButtonSize: u, checkboxSize: l, hasOwnLabel: c, model: r, actualValue: d, handleChange: v, onClickRoot: m }; }; var yL = defineComponent({ name: "ElCheckbox" }); var bL = defineComponent({ ...yL, props: i3, emits: s3, setup(e17) { const t = e17, n = useSlots(), { inputId: r, isLabeledByFormItem: o, isChecked: a, isDisabled: i, isFocused: s, checkboxSize: u, hasOwnLabel: l, model: c, actualValue: d, handleChange: f, onClickRoot: h10 } = l3(t, n), p = pt("checkbox"), v = computed(() => [ p.b(), p.m(u.value), p.is("disabled", i.value), p.is("bordered", t.border), p.is("checked", a.value) ]), m = computed(() => [ 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) => (openBlock(), createBlock(resolveDynamicComponent(!unref(l) && unref(o) ? "span" : "label"), { class: normalizeClass(unref(v)), "aria-controls": g.indeterminate ? g.ariaControls : null, onClick: unref(h10) }, { default: withCtx(() => { var x, w, C, k; return [ createBaseVNode("span", { class: normalizeClass(unref(m)) }, [ g.trueValue || g.falseValue || g.trueLabel || g.falseLabel ? withDirectives((openBlock(), createElementBlock("input", { key: 0, id: unref(r), "onUpdate:modelValue": (E) => isRef(c) ? c.value = E : null, class: normalizeClass(unref(p).e("original")), type: "checkbox", indeterminate: g.indeterminate, name: g.name, tabindex: g.tabindex, disabled: unref(i), "true-value": (w = (x = g.trueValue) != null ? x : g.trueLabel) != null ? w : true, "false-value": (k = (C = g.falseValue) != null ? C : g.falseLabel) != null ? k : false, onChange: unref(f), onFocus: (E) => s.value = true, onBlur: (E) => s.value = false, onClick: withModifiers(() => { }, ["stop"]) }, null, 42, ["id", "onUpdate:modelValue", "indeterminate", "name", "tabindex", "disabled", "true-value", "false-value", "onChange", "onFocus", "onBlur", "onClick"])), [ [vModelCheckbox, unref(c)] ]) : withDirectives((openBlock(), createElementBlock("input", { key: 1, id: unref(r), "onUpdate:modelValue": (E) => isRef(c) ? c.value = E : null, class: normalizeClass(unref(p).e("original")), type: "checkbox", indeterminate: g.indeterminate, disabled: unref(i), value: unref(d), name: g.name, tabindex: g.tabindex, onChange: unref(f), onFocus: (E) => s.value = true, onBlur: (E) => s.value = false, onClick: withModifiers(() => { }, ["stop"]) }, null, 42, ["id", "onUpdate:modelValue", "indeterminate", "disabled", "value", "name", "tabindex", "onChange", "onFocus", "onBlur", "onClick"])), [ [vModelCheckbox, unref(c)] ]), createBaseVNode("span", { class: normalizeClass(unref(p).e("inner")) }, null, 2) ], 2), unref(l) ? (openBlock(), createElementBlock("span", { key: 0, class: normalizeClass(unref(p).e("label")) }, [ renderSlot(g.$slots, "default"), g.$slots.default ? createCommentVNode("v-if", true) : (openBlock(), createElementBlock(Fragment, { key: 0 }, [ createTextVNode(toDisplayString(g.label), 1) ], 64)) ], 2)) : createCommentVNode("v-if", true) ]; }), _: 3 }, 8, ["class", "aria-controls", "onClick"])); } }); var wL = vt(bL, [["__file", "checkbox.vue"]]); var xL = defineComponent({ name: "ElCheckboxButton" }); var kL = defineComponent({ ...xL, props: i3, emits: s3, setup(e17) { const t = e17, n = useSlots(), { isFocused: r, isChecked: o, isDisabled: a, checkboxButtonSize: i, model: s, actualValue: u, handleChange: l } = l3(t, n), c = inject(Rl, void 0), d = pt("checkbox"), f = computed(() => { 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 }; }), h10 = computed(() => [ 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 openBlock(), createElementBlock("label", { class: normalizeClass(unref(h10)) }, [ p.trueValue || p.falseValue || p.trueLabel || p.falseLabel ? withDirectives((openBlock(), createElementBlock("input", { key: 0, "onUpdate:modelValue": (w) => isRef(s) ? s.value = w : null, class: normalizeClass(unref(d).be("button", "original")), type: "checkbox", name: p.name, tabindex: p.tabindex, disabled: unref(a), "true-value": (g = (m = p.trueValue) != null ? m : p.trueLabel) != null ? g : true, "false-value": (x = (b = p.falseValue) != null ? b : p.falseLabel) != null ? x : false, onChange: unref(l), onFocus: (w) => r.value = true, onBlur: (w) => r.value = false, onClick: withModifiers(() => { }, ["stop"]) }, null, 42, ["onUpdate:modelValue", "name", "tabindex", "disabled", "true-value", "false-value", "onChange", "onFocus", "onBlur", "onClick"])), [ [vModelCheckbox, unref(s)] ]) : withDirectives((openBlock(), createElementBlock("input", { key: 1, "onUpdate:modelValue": (w) => isRef(s) ? s.value = w : null, class: normalizeClass(unref(d).be("button", "original")), type: "checkbox", name: p.name, tabindex: p.tabindex, disabled: unref(a), value: unref(u), onChange: unref(l), onFocus: (w) => r.value = true, onBlur: (w) => r.value = false, onClick: withModifiers(() => { }, ["stop"]) }, null, 42, ["onUpdate:modelValue", "name", "tabindex", "disabled", "value", "onChange", "onFocus", "onBlur", "onClick"])), [ [vModelCheckbox, unref(s)] ]), p.$slots.default || p.label ? (openBlock(), createElementBlock("span", { key: 2, class: normalizeClass(unref(d).be("button", "inner")), style: normalizeStyle(unref(o) ? unref(f) : void 0) }, [ renderSlot(p.$slots, "default", {}, () => [ createTextVNode(toDisplayString(p.label), 1) ]) ], 6)) : createCommentVNode("v-if", true) ], 2); }; } }); var u3 = vt(kL, [["__file", "checkbox-button.vue"]]); var 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: true }, ...Si(["ariaLabel"]) }); var EL = { [hn]: (e17) => br(e17), change: (e17) => br(e17) }; var SL = defineComponent({ name: "ElCheckboxGroup" }); var _L = defineComponent({ ...SL, props: CL, emits: EL, setup(e17, { emit: t }) { const n = e17, r = pt("checkbox"), { formItem: o } = _i(), { inputId: a, isLabeledByFormItem: i } = Ic(n, { formItemContext: o }), s = async (l) => { t(hn, l), await nextTick(), t("change", l); }, u = computed({ get() { return n.modelValue; }, set(l) { s(l); } }); return provide(Rl, { ...cC(toRefs(n), [ "size", "min", "max", "disabled", "validateEvent", "fill", "textColor" ]), modelValue: u, changeEvent: s }), watch(() => n.modelValue, () => { n.validateEvent && (o == null || o.validate("change").catch((l) => Sn(l))); }), (l, c) => { var d; return openBlock(), createBlock(resolveDynamicComponent(l.tag), { id: unref(a), class: normalizeClass(unref(r).b("group")), role: "group", "aria-label": unref(i) ? void 0 : l.ariaLabel || "checkbox-group", "aria-labelledby": unref(i) ? (d = unref(o)) == null ? void 0 : d.labelId : void 0 }, { default: withCtx(() => [ renderSlot(l.$slots, "default") ]), _: 3 }, 8, ["id", "class", "aria-label", "aria-labelledby"]); }; } }); var c3 = vt(_L, [["__file", "checkbox-group.vue"]]); var TL = $n(wL, { CheckboxButton: u3, CheckboxGroup: c3 }); Io(u3); Io(c3); var 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 } }); var OL = mt({ ...d3, border: Boolean }); var p3 = { [hn]: (e17) => Or(e17) || Ut(e17) || ea(e17), [ls]: (e17) => Or(e17) || Ut(e17) || ea(e17) }; var f3 = Symbol("radioGroupKey"); var h3 = (e17, t) => { const n = ref(), r = inject(f3, void 0), o = computed(() => !!r), a = computed(() => Ku(e17.value) ? e17.label : e17.value), i = computed({ get() { return o.value ? r.modelValue : e17.modelValue; }, set(d) { o.value ? r.changeEvent(d) : t && t(hn, d), n.value.checked = e17.modelValue === a.value; } }), s = fi(computed(() => r == null ? void 0 : r.size)), u = Fc(computed(() => r == null ? void 0 : r.disabled)), l = ref(false), c = computed(() => 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" }, computed(() => o.value && Ku(e17.value))), { radioRef: n, isGroup: o, radioGroup: r, focus: l, size: s, disabled: u, tabIndex: c, modelValue: i, actualValue: a }; }; var PL = defineComponent({ name: "ElRadio" }); var $L = defineComponent({ ...PL, props: OL, emits: p3, setup(e17, { emit: t }) { const n = e17, r = pt("radio"), { radioRef: o, radioGroup: a, focus: i, size: s, disabled: u, modelValue: l, actualValue: c } = h3(n, t); function d() { nextTick(() => t("change", l.value)); } return (f, h10) => { var p; return openBlock(), createElementBlock("label", { class: normalizeClass([ unref(r).b(), unref(r).is("disabled", unref(u)), unref(r).is("focus", unref(i)), unref(r).is("bordered", f.border), unref(r).is("checked", unref(l) === unref(c)), unref(r).m(unref(s)) ]) }, [ createBaseVNode("span", { class: normalizeClass([ unref(r).e("input"), unref(r).is("disabled", unref(u)), unref(r).is("checked", unref(l) === unref(c)) ]) }, [ withDirectives(createBaseVNode("input", { ref_key: "radioRef", ref: o, "onUpdate:modelValue": (v) => isRef(l) ? l.value = v : null, class: normalizeClass(unref(r).e("original")), value: unref(c), name: f.name || ((p = unref(a)) == null ? void 0 : p.name), disabled: unref(u), checked: unref(l) === unref(c), type: "radio", onFocus: (v) => i.value = true, onBlur: (v) => i.value = false, onChange: d, onClick: withModifiers(() => { }, ["stop"]) }, null, 42, ["onUpdate:modelValue", "value", "name", "disabled", "checked", "onFocus", "onBlur", "onClick"]), [ [vModelRadio, unref(l)] ]), createBaseVNode("span", { class: normalizeClass(unref(r).e("inner")) }, null, 2) ], 2), createBaseVNode("span", { class: normalizeClass(unref(r).e("label")), onKeydown: withModifiers(() => { }, ["stop"]) }, [ renderSlot(f.$slots, "default", {}, () => [ createTextVNode(toDisplayString(f.label), 1) ]) ], 42, ["onKeydown"]) ], 2); }; } }); var AL = vt($L, [["__file", "radio.vue"]]); var FL = mt({ ...d3 }); var IL = defineComponent({ name: "ElRadioButton" }); var NL = defineComponent({ ...IL, props: FL, setup(e17) { const t = e17, n = pt("radio"), { radioRef: r, focus: o, size: a, disabled: i, modelValue: s, radioGroup: u, actualValue: l } = h3(t), c = computed(() => ({ 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 h10; return openBlock(), createElementBlock("label", { class: normalizeClass([ unref(n).b("button"), unref(n).is("active", unref(s) === unref(l)), unref(n).is("disabled", unref(i)), unref(n).is("focus", unref(o)), unref(n).bm("button", unref(a)) ]) }, [ withDirectives(createBaseVNode("input", { ref_key: "radioRef", ref: r, "onUpdate:modelValue": (p) => isRef(s) ? s.value = p : null, class: normalizeClass(unref(n).be("button", "original-radio")), value: unref(l), type: "radio", name: d.name || ((h10 = unref(u)) == null ? void 0 : h10.name), disabled: unref(i), onFocus: (p) => o.value = true, onBlur: (p) => o.value = false, onClick: withModifiers(() => { }, ["stop"]) }, null, 42, ["onUpdate:modelValue", "value", "name", "disabled", "onFocus", "onBlur", "onClick"]), [ [vModelRadio, unref(s)] ]), createBaseVNode("span", { class: normalizeClass(unref(n).be("button", "inner")), style: normalizeStyle(unref(s) === unref(l) ? unref(c) : {}), onKeydown: withModifiers(() => { }, ["stop"]) }, [ renderSlot(d.$slots, "default", {}, () => [ createTextVNode(toDisplayString(d.label), 1) ]) ], 46, ["onKeydown"]) ], 2); }; } }); var v3 = vt(NL, [["__file", "radio-button.vue"]]); var 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: true }, ...Si(["ariaLabel"]) }); var DL = p3; var RL = defineComponent({ name: "ElRadioGroup" }); var BL = defineComponent({ ...RL, props: LL, emits: DL, setup(e17, { emit: t }) { const n = e17, r = pt("radio"), o = pi(), a = ref(), { formItem: i } = _i(), { inputId: s, isLabeledByFormItem: u } = Ic(n, { formItemContext: i }), l = (d) => { t(hn, d), nextTick(() => t("change", d)); }; onMounted(() => { const d = a.value.querySelectorAll("[type=radio]"), f = d[0]; !Array.from(d).some((h10) => h10.checked) && f && (f.tabIndex = 0); }); const c = computed(() => n.name || o.value); return provide(f3, reactive({ ...toRefs(n), changeEvent: l, name: c })), watch(() => n.modelValue, () => { n.validateEvent && (i == null || i.validate("change").catch((d) => Sn(d))); }), (d, f) => (openBlock(), createElementBlock("div", { id: unref(s), ref_key: "radioGroupRef", ref: a, class: normalizeClass(unref(r).b("group")), role: "radiogroup", "aria-label": unref(u) ? void 0 : d.ariaLabel || "radio-group", "aria-labelledby": unref(u) ? unref(i).labelId : void 0 }, [ renderSlot(d.$slots, "default") ], 10, ["id", "aria-label", "aria-labelledby"])); } }); var g3 = vt(BL, [["__file", "radio-group.vue"]]); var ML = $n(AL, { RadioButton: v3, RadioGroup: g3 }); Io(g3); Io(v3); var zL = defineComponent({ name: "NodeContent", setup() { return { ns: pt("cascader-node") }; }, render() { const { ns: e17 } = this, { node: t, panel: n } = this.$parent, { data: r, label: o } = t, { renderLabelFn: a } = n; return h("span", { class: e17.e("label") }, a ? a({ node: t, data: r }) : o); } }); var Wg = Symbol(); var VL = defineComponent({ name: "ElCascaderNode", components: { ElCheckbox: TL, ElRadio: ML, NodeContent: zL, ElIcon: nn, Check: vC, Loading: Sf, ArrowRight: Cf }, props: { node: { type: Object, required: true }, menuId: String }, emits: ["expand"], setup(e17, { emit: t }) { const n = inject(Wg), r = pt("cascader-node"), o = computed(() => n.isHoverMenu), a = computed(() => n.config.multiple), i = computed(() => n.config.checkStrictly), s = computed(() => { var k; return (k = n.checkedNodes[0]) == null ? void 0 : k.uid; }), u = computed(() => e17.node.isDisabled), l = computed(() => e17.node.isLeaf), c = computed(() => i.value && !l.value || !u.value), d = computed(() => h10(n.expandingNode)), f = computed(() => i.value && n.checkedNodes.some(h10)), h10 = (k) => { var E; const { level: S, uid: O } = e17.node; return ((E = k == null ? void 0 : k.pathNodes[S - 1]) == null ? void 0 : E.uid) === O; }, p = () => { d.value || n.expandNode(e17.node); }, v = (k) => { const { node: E } = e17; k !== E.checked && n.handleCheckChange(E, k); }, m = () => { n.lazyLoad(e17.node, () => { l.value || p(); }); }, g = (k) => { o.value && (b(), !l.value && t("expand", k)); }, b = () => { const { node: k } = e17; !c.value || k.loading || (k.loaded ? p() : m()); }, x = () => { o.value && !l.value || (l.value && !u.value && !i.value && !a.value ? C(true) : b()); }, w = (k) => { i.value ? (v(k), e17.node.loaded && p()) : C(k); }, C = (k) => { e17.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(e17, t, n, r, o, a) { const i = resolveComponent("el-checkbox"), s = resolveComponent("el-radio"), u = resolveComponent("check"), l = resolveComponent("el-icon"), c = resolveComponent("node-content"), d = resolveComponent("loading"), f = resolveComponent("arrow-right"); return openBlock(), createElementBlock("li", { id: `${e17.menuId}-${e17.node.uid}`, role: "menuitem", "aria-haspopup": !e17.isLeaf, "aria-owns": e17.isLeaf ? null : e17.menuId, "aria-expanded": e17.inExpandingPath, tabindex: e17.expandable ? -1 : void 0, class: normalizeClass([ e17.ns.b(), e17.ns.is("selectable", e17.checkStrictly), e17.ns.is("active", e17.node.checked), e17.ns.is("disabled", !e17.expandable), e17.inExpandingPath && "in-active-path", e17.inCheckedPath && "in-checked-path" ]), onMouseenter: e17.handleHoverExpand, onFocus: e17.handleHoverExpand, onClick: e17.handleClick }, [ createCommentVNode(" prefix "), e17.multiple ? (openBlock(), createBlock(i, { key: 0, "model-value": e17.node.checked, indeterminate: e17.node.indeterminate, disabled: e17.isDisabled, onClick: withModifiers(() => { }, ["stop"]), "onUpdate:modelValue": e17.handleSelectCheck }, null, 8, ["model-value", "indeterminate", "disabled", "onClick", "onUpdate:modelValue"])) : e17.checkStrictly ? (openBlock(), createBlock(s, { key: 1, "model-value": e17.checkedNodeId, label: e17.node.uid, disabled: e17.isDisabled, "onUpdate:modelValue": e17.handleSelectCheck, onClick: withModifiers(() => { }, ["stop"]) }, { default: withCtx(() => [ createCommentVNode(` Add an empty element to avoid render label, do not use empty fragment here for https://github.com/vuejs/vue-next/pull/2485 `), createBaseVNode("span") ]), _: 1 }, 8, ["model-value", "label", "disabled", "onUpdate:modelValue", "onClick"])) : e17.isLeaf && e17.node.checked ? (openBlock(), createBlock(l, { key: 2, class: normalizeClass(e17.ns.e("prefix")) }, { default: withCtx(() => [ createVNode(u) ]), _: 1 }, 8, ["class"])) : createCommentVNode("v-if", true), createCommentVNode(" content "), createVNode(c), createCommentVNode(" postfix "), e17.isLeaf ? createCommentVNode("v-if", true) : (openBlock(), createElementBlock(Fragment, { key: 3 }, [ e17.node.loading ? (openBlock(), createBlock(l, { key: 0, class: normalizeClass([e17.ns.is("loading"), e17.ns.e("postfix")]) }, { default: withCtx(() => [ createVNode(d) ]), _: 1 }, 8, ["class"])) : (openBlock(), createBlock(l, { key: 1, class: normalizeClass(["arrow-right", e17.ns.e("postfix")]) }, { default: withCtx(() => [ createVNode(f) ]), _: 1 }, 8, ["class"])) ], 64)) ], 42, ["id", "aria-haspopup", "aria-owns", "aria-expanded", "tabindex", "onMouseenter", "onFocus", "onClick"]); } var HL = vt(VL, [["render", jL], ["__file", "node.vue"]]); var UL = defineComponent({ name: "ElCascaderMenu", components: { Loading: Sf, ElIcon: nn, ElScrollbar: Vg, ElCascaderNode: HL }, props: { nodes: { type: Array, required: true }, index: { type: Number, required: true } }, setup(e17) { const t = getCurrentInstance(), n = pt("cascader-menu"), { t: r } = go(), o = pi(); let a = null, i = null; const s = inject(Wg), u = ref(null), l = computed(() => !e17.nodes.length), c = computed(() => !s.initialLoaded), d = computed(() => `${o.value}-${e17.index}`), f = (m) => { a = m.target; }, h10 = (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: h10, clearHoverZone: v }; } }); function qL(e17, t, n, r, o, a) { const i = resolveComponent("el-cascader-node"), s = resolveComponent("loading"), u = resolveComponent("el-icon"), l = resolveComponent("el-scrollbar"); return openBlock(), createBlock(l, { key: e17.menuId, tag: "ul", role: "menu", class: normalizeClass(e17.ns.b()), "wrap-class": e17.ns.e("wrap"), "view-class": [e17.ns.e("list"), e17.ns.is("empty", e17.isEmpty)], onMousemove: e17.handleMouseMove, onMouseleave: e17.clearHoverZone }, { default: withCtx(() => { var c; return [ (openBlock(true), createElementBlock(Fragment, null, renderList(e17.nodes, (d) => (openBlock(), createBlock(i, { key: d.uid, node: d, "menu-id": e17.menuId, onExpand: e17.handleExpand }, null, 8, ["node", "menu-id", "onExpand"]))), 128)), e17.isLoading ? (openBlock(), createElementBlock("div", { key: 0, class: normalizeClass(e17.ns.e("empty-text")) }, [ createVNode(u, { size: "14", class: normalizeClass(e17.ns.is("loading")) }, { default: withCtx(() => [ createVNode(s) ]), _: 1 }, 8, ["class"]), createTextVNode(" " + toDisplayString(e17.t("el.cascader.loading")), 1) ], 2)) : e17.isEmpty ? (openBlock(), createElementBlock("div", { key: 1, class: normalizeClass(e17.ns.e("empty-text")) }, [ renderSlot(e17.$slots, "empty", {}, () => [ createTextVNode(toDisplayString(e17.t("el.cascader.noData")), 1) ]) ], 2)) : (c = e17.panel) != null && c.isHoverMenu ? (openBlock(), createElementBlock("svg", { key: 2, ref: "hoverZone", class: normalizeClass(e17.ns.e("hover-zone")) }, null, 2)) : createCommentVNode("v-if", true) ]; }), _: 3 }, 8, ["class", "wrap-class", "view-class", "onMousemove", "onMouseleave"]); } var WL = vt(UL, [["render", qL], ["__file", "menu.vue"]]); var KL = 0; var GL = (e17) => { const t = [e17]; let { parent: n } = e17; for (; n; ) t.unshift(n), n = n.parent; return t; }; var gl = class _gl { constructor(t, n, r, o = false) { this.data = t, this.config = n, this.parent = r, this.root = o, this.uid = KL++, this.checked = false, this.indeterminate = false, this.loading = false; 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 ? false : !(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) : false; 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")); } }; var Jv = (e17, t) => e17.reduce((n, r) => (r.isLeaf ? n.push(r) : (!t && n.push(r), n = n.concat(Jv(r.children, t))), n), []); var pb = class { constructor(t, n) { this.config = n; const r = (t || []).map((o) => new gl(o, this.config)); this.nodes = r, this.allNodes = Jv(r, false), this.leafNodes = Jv(r, true); } 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 = false) { 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(false).find(({ value: r, level: o }) => Yo(t.value, r) && t.level === o) || null; } }; var m3 = mt({ modelValue: { type: et([Number, String, Array]) }, options: { type: et(Array), default: () => [] }, props: { type: et(Object), default: () => ({}) } }); var XL = { expandTrigger: "click", multiple: false, checkStrictly: false, emitPath: true, lazy: false, lazyLoad: xa, value: "value", label: "label", children: "children", leaf: "leaf", disabled: "disabled", hoverThreshold: 500 }; var YL = (e17) => computed(() => ({ ...XL, ...e17.props })); var fb = (e17) => { if (!e17) return 0; const t = e17.id.split("-"); return Number(t[t.length - 2]); }; var ZL = (e17) => { if (!e17) return; const t = e17.querySelector("input"); t ? t.click() : Fk(e17) && e17.click(); }; var JL = (e17, t) => { const n = t.slice(0), r = n.map((a) => a.uid), o = e17.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; }; var QL = defineComponent({ name: "ElCascaderPanel", components: { ElCascaderMenu: WL }, props: { ...m3, border: { type: Boolean, default: true }, renderLabel: Function }, emits: [hn, ls, "close", "expand-change"], setup(e17, { emit: t, slots: n }) { let r = false; const o = pt("cascader"), a = YL(e17); let i = null; const s = ref(true), u = ref([]), l = ref(null), c = ref([]), d = ref(null), f = ref([]), h10 = computed(() => a.value.expandTrigger === "hover"), p = computed(() => e17.renderLabel || n.default), v = () => { const { options: A } = e17, L = a.value; r = false, i = new pb(A, L), c.value = [i.getNodes()], L.lazy && Uv(e17.options) ? (s.value = false, m(void 0, (N) => { N && (i = new pb(N, L), c.value = [i.getNodes()]), s.value = true, S(false, true); })) : S(false, true); }, m = (A, L) => { const N = a.value; A = A || new gl({}, N, void 0, true), A.loading = true; const M = (I) => { const z = A, R = z.root ? null : z; I && (i == null || i.appendNodes(I, R)), z.loading = false, z.loaded = true, 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 = true) => { const { checkStrictly: M, multiple: I } = a.value, z = f.value[0]; r = true, !I && (z == null || z.doCheck(false)), 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 !== false); }, k = () => { f.value.forEach((A) => A.doCheck(false)), 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((W) => W.valueByOption); f.value = z, l.value = N ? R : (A = R[0]) != null ? A : null; }, S = (A = false, L = false) => { const { modelValue: N } = e17, { 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(false, L)); }) : S(true, L); } else { const W = I ? L1(N) : [N], oe = N1(W.map((Q) => i == null ? void 0 : i.getNodeByValue(Q, R))); O(oe, L), l.value = rC(N); } }, O = (A, L = true) => { const { checkStrictly: N } = a.value, M = f.value, I = A.filter((W) => !!W && (N || W.isLeaf)), z = i == null ? void 0 : i.getSameNode(d.value), R = L && z || I[0]; R ? R.pathNodes.forEach((W) => g(W, true)) : d.value = null, M.forEach((W) => W.doCheck(false)), reactive(I).forEach((W) => W.doCheck(true)), f.value = I, nextTick(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 provide(Wg, reactive({ config: a, expandingNode: d, checkedNodes: f, isHoverMenu: h10, initialLoaded: s, renderLabelFn: p, lazyLoad: m, expandNode: g, handleCheckChange: b })), watch([a, () => e17.options], v, { deep: true, immediate: true }), watch(() => e17.modelValue, () => { r = false, S(); }, { deep: true }), watch(() => l.value, (A) => { Yo(A, e17.modelValue) || (t(hn, A), t(ls, A)); }), onBeforeUpdate(() => u.value = []), onMounted(() => !Uv(e17.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(e17, t, n, r, o, a) { const i = resolveComponent("el-cascader-menu"); return openBlock(), createElementBlock("div", { class: normalizeClass([e17.ns.b("panel"), e17.ns.is("bordered", e17.border)]), onKeydown: e17.handleKeyDown }, [ (openBlock(true), createElementBlock(Fragment, null, renderList(e17.menus, (s, u) => (openBlock(), createBlock(i, { key: u, ref_for: true, ref: (l) => e17.menuList[u] = l, index: u, nodes: [...s] }, { empty: withCtx(() => [ renderSlot(e17.$slots, "empty") ]), _: 2 }, 1032, ["index", "nodes"]))), 128)) ], 42, ["onKeydown"]); } var tD = vt(QL, [["render", eD], ["__file", "index.vue"]]); var nD = $n(tD); var 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 }); var rD = { close: (e17) => e17 instanceof MouseEvent, click: (e17) => e17 instanceof MouseEvent }; var oD = defineComponent({ name: "ElTag" }); var aD = defineComponent({ ...oD, props: Ju, emits: rD, setup(e17, { emit: t }) { const n = e17, r = fi(), o = pt("tag"), a = computed(() => { const { type: l, hit: c, effect: d, closable: f, round: h10 } = 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", h10) ]; }), i = (l) => { t("close", l); }, s = (l) => { t("click", l); }, u = (l) => { l.component.subTree.component.bum = null; }; return (l, c) => l.disableTransitions ? (openBlock(), createElementBlock("span", { key: 0, class: normalizeClass(unref(a)), style: normalizeStyle({ backgroundColor: l.color }), onClick: s }, [ createBaseVNode("span", { class: normalizeClass(unref(o).e("content")) }, [ renderSlot(l.$slots, "default") ], 2), l.closable ? (openBlock(), createBlock(unref(nn), { key: 0, class: normalizeClass(unref(o).e("close")), onClick: withModifiers(i, ["stop"]) }, { default: withCtx(() => [ createVNode(unref(Wv)) ]), _: 1 }, 8, ["class", "onClick"])) : createCommentVNode("v-if", true) ], 6)) : (openBlock(), createBlock(Transition, { key: 1, name: `${unref(o).namespace.value}-zoom-in-center`, appear: "", onVnodeMounted: u }, { default: withCtx(() => [ createBaseVNode("span", { class: normalizeClass(unref(a)), style: normalizeStyle({ backgroundColor: l.color }), onClick: s }, [ createBaseVNode("span", { class: normalizeClass(unref(o).e("content")) }, [ renderSlot(l.$slots, "default") ], 2), l.closable ? (openBlock(), createBlock(unref(nn), { key: 0, class: normalizeClass(unref(o).e("close")), onClick: withModifiers(i, ["stop"]) }, { default: withCtx(() => [ createVNode(unref(Wv)) ]), _: 1 }, 8, ["class", "onClick"])) : createCommentVNode("v-if", true) ], 6) ]), _: 3 }, 8, ["name"])); } }); var iD = vt(aD, [["__file", "tag.vue"]]); var ml = $n(iD); var sD = mt({ ...m3, size: Aa, placeholder: String, disabled: Boolean, clearable: Boolean, filterable: Boolean, filterMethod: { type: et(Function), default: (e17, t) => e17.text.includes(t) }, separator: { type: String, default: " / " }, showAllLevels: { type: Boolean, default: true }, collapseTags: Boolean, maxCollapseTags: { type: Number, default: 1 }, collapseTagsTooltip: { type: Boolean, default: false }, debounce: { type: Number, default: 300 }, beforeFilter: { type: et(Function), default: () => true }, 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: true }, persistent: { type: Boolean, default: true }, ...HC }); var lD = { [hn]: (e17) => true, [ls]: (e17) => true, focus: (e17) => e17 instanceof FocusEvent, blur: (e17) => e17 instanceof FocusEvent, clear: () => true, visibleChange: (e17) => ea(e17), expandChange: (e17) => !!e17, removeTag: (e17) => !!e17 }; var uD = "ElCascader"; var cD = defineComponent({ name: uD }); var dD = defineComponent({ ...cD, props: sD, emits: lD, setup(e17, { expose: t, emit: n }) { const r = e17, o = { modifiers: [ { name: "arrowPosition", enabled: true, phase: "main", fn: ({ state: re }) => { const { modifiersData: Se, placement: be } = re; ["right", "left", "bottom", "top"].includes(be) || (Se.arrow.x = 35); }, requires: ["arrow"] } ] }, a = useAttrs(); let i = 0, s = 0; const u = pt("cascader"), l = pt("input"), { t: c } = go(), { form: d, formItem: f } = _i(), { valueOnClear: h10 } = UC(r), { isComposing: p, handleComposition: v } = Bg({ afterComposition(re) { var Se; const be = (Se = re.target) == null ? void 0 : Se.value; Ye(be); } }), m = ref(null), g = ref(null), b = ref(null), x = ref(null), w = ref(null), C = ref(false), k = ref(false), E = ref(false), S = ref(false), O = ref(""), F = ref(""), $ = ref([]), A = ref([]), L = ref([]), N = computed(() => a.style), M = computed(() => r.disabled || (d == null ? void 0 : d.disabled)), I = computed(() => r.placeholder || c("el.cascader.placeholder")), z = computed(() => F.value || $.value.length > 0 || p.value ? "" : I.value), R = fi(), W = computed(() => ["small"].includes(R.value) ? "small" : "default"), oe = computed(() => !!r.props.multiple), Q = computed(() => !r.filterable || oe.value), ae = computed(() => oe.value ? F.value : O.value), pe = computed(() => { var re; return ((re = x.value) == null ? void 0 : re.checkedNodes) || []; }), we = computed(() => !r.clearable || M.value || E.value || !k.value ? false : !!pe.value.length), ke = computed(() => { const { showAllLevels: re, separator: Se } = r, be = pe.value; return be.length ? oe.value ? "" : be[0].calcText(re, Se) : ""; }), fe = computed(() => (f == null ? void 0 : f.validateState) || ""), ge = computed({ get() { return rC(r.modelValue); }, set(re) { const Se = re ?? h10.value; n(hn, Se), n(ls, Se), r.validateEvent && (f == null || f.validate("change").catch((be) => Sn(be))); } }), J = computed(() => [ u.b(), u.m(R.value), u.is("disabled", M.value), a.class ]), te = computed(() => [ l.e("icon"), "icon-arrow-down", u.is("reverse", C.value) ]), le = computed(() => u.is("focus", C.value || S.value)), Ee = computed(() => { 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(), nextTick((Le = x.value) == null ? void 0 : Le.scrollToExpandingNode)) : r.filterable && j(), n("visibleChange", re))); }, je = () => { nextTick(() => { var re; (re = m.value) == null || re.updatePopper(); }); }, _e = () => { E.value = false; }, De = (re) => { const { showAllLevels: Se, separator: be } = r; return { node: re, key: re.uid, text: re.calcText(Se, be), hitState: false, closable: !M.value && !re.isDisabled, isCollapseTag: false }; }, Ae = (re) => { var Se; const be = re.node; be.doCheck(false), (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: false, isCollapseTag: true }) : 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 ? false : (Dt.calcText(Le, Tt), be(Dt, ae.value))); oe.value && ($.value.forEach((Dt) => { Dt.hitState = false; }), A.value.forEach((Dt) => { Dt.hitState = false; })), E.value = true, 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(true), nextTick(Ze), re.preventDefault(); break; case Fn.esc: C.value === true && (re.preventDefault(), re.stopPropagation(), Ne(false)); break; case Fn.tab: Ne(false); break; } }, P = () => { var re; (re = x.value) == null || re.clearCheckedNodes(), !C.value && r.filterable && j(), Ne(false), 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, false) : (!Le && ((be = x.value) == null || be.handleCheckChange(re, true, false)), Ne(false)); }, 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 = true); }, Oe = (re) => { const Se = re.target, be = u.e("search-input"); Se.className === be && (S.value = true), n("focus", re); }, ye = (re) => { S.value = false, n("blur", re); }, Fe = lC(() => { const { value: re } = ae; if (!re) return; const Se = r.beforeFilter(re); zT(Se) ? Se.then(Ue).catch(() => { }) : Se !== false ? Ue() : _e(); }, r.debounce), Ye = (re, Se) => { !C.value && Ne(true), !(Se != null && Se.isComposing) && (re ? Fe() : _e()); }, Je = (re) => Number.parseFloat(ST(l.cssVarName("input-height"), re).value) - 2; return watch(E, je), watch([pe, M, () => r.collapseTags], Be), watch($, () => { nextTick(() => Me()); }), watch(R, async () => { await nextTick(); const re = g.value.input; i = Je(re) || i, Me(); }), watch(ke, j, { immediate: true }), onMounted(() => { 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) => (openBlock(), createBlock(unref(Ap), { ref_key: "tooltipRef", ref: m, visible: C.value, teleported: re.teleported, "popper-class": [unref(u).e("dropdown"), re.popperClass], "popper-options": o, "fallback-placements": re.fallbackPlacements, "stop-popper-mouse-event": false, "gpu-acceleration": false, placement: re.placement, transition: `${unref(u).namespace.value}-zoom-in-top`, effect: "light", pure: "", persistent: re.persistent, onHide: _e }, { default: withCtx(() => [ withDirectives((openBlock(), createElementBlock("div", { class: normalizeClass(unref(J)), style: normalizeStyle(unref(N)), onClick: () => Ne(unref(Q) ? void 0 : true), onKeydown: st, onMouseenter: (be) => k.value = true, onMouseleave: (be) => k.value = false }, [ createVNode(unref($f), { ref_key: "input", ref: g, modelValue: O.value, "onUpdate:modelValue": (be) => O.value = be, placeholder: unref(z), readonly: unref(Q), disabled: unref(M), "validate-event": false, size: unref(R), class: normalizeClass(unref(le)), tabindex: unref(oe) && re.filterable && !unref(M) ? -1 : void 0, onCompositionstart: unref(v), onCompositionupdate: unref(v), onCompositionend: unref(v), onFocus: Oe, onBlur: ye, onInput: Ye }, { suffix: withCtx(() => [ unref(we) ? (openBlock(), createBlock(unref(nn), { key: "clear", class: normalizeClass([unref(l).e("icon"), "icon-circle-close"]), onClick: withModifiers(P, ["stop"]) }, { default: withCtx(() => [ createVNode(unref(Ef)) ]), _: 1 }, 8, ["class", "onClick"])) : (openBlock(), createBlock(unref(nn), { key: "arrow-down", class: normalizeClass(unref(te)), onClick: withModifiers((be) => Ne(), ["stop"]) }, { default: withCtx(() => [ createVNode(unref(_g)) ]), _: 1 }, 8, ["class", "onClick"])) ]), _: 1 }, 8, ["modelValue", "onUpdate:modelValue", "placeholder", "readonly", "disabled", "size", "class", "tabindex", "onCompositionstart", "onCompositionupdate", "onCompositionend"]), unref(oe) ? (openBlock(), createElementBlock("div", { key: 0, ref_key: "tagWrapper", ref: b, class: normalizeClass([ unref(u).e("tags"), unref(u).is("validate", !!unref(fe)) ]) }, [ (openBlock(true), createElementBlock(Fragment, null, renderList($.value, (be) => (openBlock(), createBlock(unref(ml), { key: be.key, type: re.tagType, size: unref(W), effect: re.tagEffect, hit: be.hitState, closable: be.closable, "disable-transitions": "", onClose: (Le) => Ae(be) }, { default: withCtx(() => [ be.isCollapseTag === false ? (openBlock(), createElementBlock("span", { key: 0 }, toDisplayString(be.text), 1)) : (openBlock(), createBlock(unref(Ap), { key: 1, disabled: C.value || !re.collapseTagsTooltip, "fallback-placements": ["bottom", "top", "right", "left"], placement: "bottom", effect: "light" }, { default: withCtx(() => [ createBaseVNode("span", null, toDisplayString(be.text), 1) ]), content: withCtx(() => [ createBaseVNode("div", { class: normalizeClass(unref(u).e("collapse-tags")) }, [ (openBlock(true), createElementBlock(Fragment, null, renderList(A.value.slice(re.maxCollapseTags), (Le, Tt) => (openBlock(), createElementBlock("div", { key: Tt, class: normalizeClass(unref(u).e("collapse-tag")) }, [ (openBlock(), createBlock(unref(ml), { key: Le.key, class: "in-tooltip", type: re.tagType, size: unref(W), effect: re.tagEffect, hit: Le.hitState, closable: Le.closable, "disable-transitions": "", onClose: (Ct) => Ae(Le) }, { default: withCtx(() => [ createBaseVNode("span", null, toDisplayString(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 && !unref(M) ? withDirectives((openBlock(), createElementBlock("input", { key: 0, "onUpdate:modelValue": (be) => F.value = be, type: "text", class: normalizeClass(unref(u).e("search-input")), placeholder: unref(ke) ? "" : unref(I), onInput: (be) => Ye(F.value, be), onClick: withModifiers((be) => Ne(true), ["stop"]), onKeydown: withKeys(de, ["delete"]), onCompositionstart: unref(v), onCompositionupdate: unref(v), onCompositionend: unref(v), onFocus: Oe, onBlur: ye }, null, 42, ["onUpdate:modelValue", "placeholder", "onInput", "onClick", "onKeydown", "onCompositionstart", "onCompositionupdate", "onCompositionend"])), [ [vModelText, F.value] ]) : createCommentVNode("v-if", true) ], 2)) : createCommentVNode("v-if", true) ], 46, ["onClick", "onMouseenter", "onMouseleave"])), [ [unref(o3), () => Ne(false), unref(Ee)] ]) ]), content: withCtx(() => [ withDirectives(createVNode(unref(nD), { ref_key: "cascaderPanelRef", ref: x, modelValue: unref(ge), "onUpdate:modelValue": (be) => isRef(ge) ? ge.value = be : null, options: re.options, props: r.props, border: false, "render-label": re.$slots.default, onExpandChange: nt, onClose: (be) => re.$nextTick(() => Ne(false)) }, { empty: withCtx(() => [ renderSlot(re.$slots, "empty") ]), _: 3 }, 8, ["modelValue", "onUpdate:modelValue", "options", "props", "render-label", "onClose"]), [ [vShow, !E.value] ]), re.filterable ? withDirectives((openBlock(), createBlock(unref(Vg), { key: 0, ref_key: "suggestionPanel", ref: w, tag: "ul", class: normalizeClass(unref(u).e("suggestion-panel")), "view-class": unref(u).e("suggestion-list"), onKeydown: ce }, { default: withCtx(() => [ L.value.length ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(L.value, (be) => (openBlock(), createElementBlock("li", { key: be.uid, class: normalizeClass([ unref(u).e("suggestion-item"), unref(u).is("checked", be.checked) ]), tabindex: -1, onClick: (Le) => se(be) }, [ createBaseVNode("span", null, toDisplayString(be.text), 1), be.checked ? (openBlock(), createBlock(unref(nn), { key: 0 }, { default: withCtx(() => [ createVNode(unref(vC)) ]), _: 1 })) : createCommentVNode("v-if", true) ], 10, ["onClick"]))), 128)) : renderSlot(re.$slots, "empty", { key: 1 }, () => [ createBaseVNode("li", { class: normalizeClass(unref(u).e("empty-text")) }, toDisplayString(unref(c)("el.cascader.noMatch")), 3) ]) ]), _: 3 }, 8, ["class", "view-class"])), [ [vShow, E.value] ]) : createCommentVNode("v-if", true) ]), _: 3 }, 8, ["visible", "teleported", "popper-class", "fallback-placements", "placement", "transition", "persistent"])); } }); var pD = vt(dD, [["__file", "cascader.vue"]]); var y3 = $n(pD); var b3 = Symbol("rowContextKey"); var fD = [ "start", "center", "end", "space-around", "space-between", "space-evenly" ]; var hD = ["top", "middle", "bottom"]; var vD = mt({ tag: { type: String, default: "div" }, gutter: { type: Number, default: 0 }, justify: { type: String, values: fD, default: "start" }, align: { type: String, values: hD } }); var gD = defineComponent({ name: "ElRow" }); var mD = defineComponent({ ...gD, props: vD, setup(e17) { const t = e17, n = pt("row"), r = computed(() => t.gutter); provide(b3, { gutter: r }); const o = computed(() => { const i = {}; return t.gutter && (i.marginRight = i.marginLeft = `-${t.gutter / 2}px`), i; }), a = computed(() => [ n.b(), n.is(`justify-${t.justify}`, t.justify !== "start"), n.is(`align-${t.align}`, !!t.align) ]); return (i, s) => (openBlock(), createBlock(resolveDynamicComponent(i.tag), { class: normalizeClass(unref(a)), style: normalizeStyle(unref(o)) }, { default: withCtx(() => [ renderSlot(i.$slots, "default") ]), _: 3 }, 8, ["class", "style"])); } }); var yD = vt(mD, [["__file", "row.vue"]]); var w3 = $n(yD); var 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({}) } }); var wD = defineComponent({ name: "ElCol" }); var xD = defineComponent({ ...wD, props: bD, setup(e17) { const t = e17, { gutter: n } = inject(b3, { gutter: computed(() => 0) }), r = pt("col"), o = computed(() => { const i = {}; return n.value && (i.paddingLeft = i.paddingRight = `${n.value / 2}px`), i; }), a = computed(() => { 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) => (openBlock(), createBlock(resolveDynamicComponent(i.tag), { class: normalizeClass(unref(a)), style: normalizeStyle(unref(o)) }, { default: withCtx(() => [ renderSlot(i.$slots, "default") ]), _: 3 }, 8, ["class", "style"])); } }); var kD = vt(xD, [["__file", "col.vue"]]); var x3 = $n(kD); var CD = defineComponent({ name: "ElContainer" }); var ED = defineComponent({ ...CD, props: { direction: { type: String } }, setup(e17) { const t = e17, n = useSlots(), r = pt("container"), o = computed(() => t.direction === "vertical" ? true : t.direction === "horizontal" ? false : n && n.default ? n.default().some((i) => { const s = i.type.name; return s === "ElHeader" || s === "ElFooter"; }) : false); return (a, i) => (openBlock(), createElementBlock("section", { class: normalizeClass([unref(r).b(), unref(r).is("vertical", unref(o))]) }, [ renderSlot(a.$slots, "default") ], 2)); } }); var SD = vt(ED, [["__file", "container.vue"]]); var _D = defineComponent({ name: "ElAside" }); var TD = defineComponent({ ..._D, props: { width: { type: String, default: null } }, setup(e17) { const t = e17, n = pt("aside"), r = computed(() => t.width ? n.cssVarBlock({ width: t.width }) : {}); return (o, a) => (openBlock(), createElementBlock("aside", { class: normalizeClass(unref(n).b()), style: normalizeStyle(unref(r)) }, [ renderSlot(o.$slots, "default") ], 6)); } }); var k3 = vt(TD, [["__file", "aside.vue"]]); var OD = defineComponent({ name: "ElFooter" }); var PD = defineComponent({ ...OD, props: { height: { type: String, default: null } }, setup(e17) { const t = e17, n = pt("footer"), r = computed(() => t.height ? n.cssVarBlock({ height: t.height }) : {}); return (o, a) => (openBlock(), createElementBlock("footer", { class: normalizeClass(unref(n).b()), style: normalizeStyle(unref(r)) }, [ renderSlot(o.$slots, "default") ], 6)); } }); var C3 = vt(PD, [["__file", "footer.vue"]]); var $D = defineComponent({ name: "ElHeader" }); var AD = defineComponent({ ...$D, props: { height: { type: String, default: null } }, setup(e17) { const t = e17, n = pt("header"), r = computed(() => t.height ? n.cssVarBlock({ height: t.height }) : {}); return (o, a) => (openBlock(), createElementBlock("header", { class: normalizeClass(unref(n).b()), style: normalizeStyle(unref(r)) }, [ renderSlot(o.$slots, "default") ], 6)); } }); var E3 = vt(AD, [["__file", "header.vue"]]); var FD = defineComponent({ name: "ElMain" }); var ID = defineComponent({ ...FD, setup(e17) { const t = pt("main"); return (n, r) => (openBlock(), createElementBlock("main", { class: normalizeClass(unref(t).b()) }, [ renderSlot(n.$slots, "default") ], 2)); } }); var S3 = vt(ID, [["__file", "main.vue"]]); var ND = $n(SD, { Aside: k3, Footer: C3, Header: E3, Main: S3 }); Io(k3); Io(C3); Io(E3); Io(S3); var LD = mt({ mask: { type: Boolean, default: true }, customMaskEvent: Boolean, overlayClass: { type: et([ String, Array, Object ]) }, zIndex: { type: et([String, Number]) } }); var DD = { click: (e17) => e17 instanceof MouseEvent }; var RD = "overlay"; var BD = defineComponent({ name: "ElOverlay", props: LD, emits: DD, setup(e17, { slots: t, emit: n }) { const r = pt(RD), o = (u) => { n("click", u); }, { onClick: a, onMousedown: i, onMouseup: s } = G9(e17.customMaskEvent ? void 0 : o); return () => e17.mask ? createVNode("div", { class: [r.b(), e17.overlayClass], style: { zIndex: e17.zIndex }, onClick: a, onMousedown: i, onMouseup: s }, [renderSlot(t, "default")], Qd.STYLE | Qd.CLASS | Qd.PROPS, ["onClick", "onMouseup", "onMousedown"]) : h("div", { class: e17.overlayClass, style: { zIndex: e17.zIndex, position: "fixed", top: "0px", right: "0px", bottom: "0px", left: "0px" } }, [renderSlot(t, "default")]); } }); var MD = BD; var zD = mt({ center: Boolean, alignCenter: Boolean, closeIcon: { type: io }, draggable: Boolean, overflow: Boolean, fullscreen: Boolean, showClose: { type: Boolean, default: true }, title: { type: String, default: "" }, ariaLevel: { type: String, default: "2" } }); var VD = mt({ ...zD, appendToBody: Boolean, appendTo: { type: et([String, Object]), default: "body" }, beforeClose: { type: et(Function) }, destroyOnClose: Boolean, closeOnClickModal: { type: Boolean, default: true }, closeOnPressEscape: { type: Boolean, default: true }, lockScroll: { type: Boolean, default: true }, modal: { type: Boolean, default: true }, 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" } }); var jD = { open: () => true, opened: () => true, close: () => true, closed: () => true, [hn]: (e17) => ea(e17), openAutoFocus: () => true, closeAutoFocus: () => true }; var HD = (e17, t) => { var n; const o = getCurrentInstance().emit, { nextZIndex: a } = Rg(); let i = ""; const s = pi(), u = pi(), l = ref(false), c = ref(false), d = ref(false), f = ref((n = e17.zIndex) != null ? n : a()); let h10, p; const v = Pf("namespace", Fu), m = computed(() => { const M = {}, I = `--${v.value}-dialog`; return e17.fullscreen || (e17.top && (M[`${I}-margin-top`] = e17.top), e17.width && (M[`${I}-width`] = cl(e17.width))), M; }), g = computed(() => e17.alignCenter ? { display: "flex" } : {}); function b() { o("opened"); } function x() { o("closed"), o(hn, false), e17.destroyOnClose && (d.value = false); } function w() { o("close"); } function C() { p == null || p(), h10 == null || h10(), e17.openDelay && e17.openDelay > 0 ? { stop: h10 } = Hy(() => O(), e17.openDelay) : O(); } function k() { h10 == null || h10(), p == null || p(), e17.closeDelay && e17.closeDelay > 0 ? { stop: p } = Hy(() => F(), e17.closeDelay) : F(); } function E() { function M(I) { I || (c.value = true, l.value = false); } e17.beforeClose ? e17.beforeClose(M) : k(); } function S() { e17.closeOnClickModal && E(); } function O() { on && (l.value = true); } function F() { l.value = false; } function $() { o("openAutoFocus"); } function A() { o("closeAutoFocus"); } function L(M) { var I; ((I = M.detail) == null ? void 0 : I.focusReason) === "pointer" && M.preventDefault(); } e17.lockScroll && zF(l); function N() { e17.closeOnPressEscape && E(); } return watch(() => e17.modelValue, (M) => { M ? (c.value = false, C(), d.value = true, f.value = uC(e17.zIndex) ? a() : f.value++, nextTick(() => { o("open"), t.value && (t.value.scrollTop = 0); })) : l.value && k(); }), watch(() => e17.fullscreen, (M) => { t.value && (M ? (i = t.value.style.transform, t.value.style.transform = "") : t.value.style.transform = i); }), onMounted(() => { e17.modelValue && (l.value = true, d.value = true, 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 }; }; var UD = mt({ ...VD, direction: { type: String, default: "rtl", values: ["ltr", "rtl", "ttb", "btt"] }, size: { type: [String, Number], default: "30%" }, withHeader: { type: Boolean, default: true }, modalFade: { type: Boolean, default: true }, headerAriaLevel: { type: String, default: "2" } }); var qD = jD; var WD = defineComponent({ name: "ElDrawer", inheritAttrs: false }); var KD = defineComponent({ ...WD, props: UD, emits: qD, setup(e17, { expose: t }) { const n = e17, r = useSlots(); 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" }, computed(() => !!r.title)); const o = ref(), a = ref(), i = pt("drawer"), { t: s } = go(), { afterEnter: u, afterLeave: l, beforeLeave: c, visible: d, rendered: f, titleId: h10, bodyId: p, zIndex: v, onModalClick: m, onOpenAutoFocus: g, onCloseAutoFocus: b, onFocusoutPrevented: x, onCloseRequested: w, handleClose: C } = HD(n, o), k = computed(() => n.direction === "rtl" || n.direction === "ltr"), E = computed(() => cl(n.size)); return t({ handleClose: C, afterEnter: u, afterLeave: l }), (S, O) => (openBlock(), createBlock(unref(e3), { to: S.appendTo, disabled: S.appendTo !== "body" ? false : !S.appendToBody }, { default: withCtx(() => [ createVNode(Transition, { name: unref(i).b("fade"), onAfterEnter: unref(u), onAfterLeave: unref(l), onBeforeLeave: unref(c), persisted: "" }, { default: withCtx(() => [ withDirectives(createVNode(unref(MD), { mask: S.modal, "overlay-class": S.modalClass, "z-index": unref(v), onClick: unref(m) }, { default: withCtx(() => [ createVNode(unref(JC), { loop: "", trapped: unref(d), "focus-trap-el": o.value, "focus-start-el": a.value, onFocusAfterTrapped: unref(g), onFocusAfterReleased: unref(b), onFocusoutPrevented: unref(x), onReleaseRequested: unref(w) }, { default: withCtx(() => [ createBaseVNode("div", mergeProps({ ref_key: "drawerRef", ref: o, "aria-modal": "true", "aria-label": S.title || void 0, "aria-labelledby": S.title ? void 0 : unref(h10), "aria-describedby": unref(p) }, S.$attrs, { class: [unref(i).b(), S.direction, unref(d) && "open"], style: unref(k) ? "width: " + unref(E) : "height: " + unref(E), role: "dialog", onClick: withModifiers(() => { }, ["stop"]) }), [ createBaseVNode("span", { ref_key: "focusStartRef", ref: a, class: normalizeClass(unref(i).e("sr-focus")), tabindex: "-1" }, null, 2), S.withHeader ? (openBlock(), createElementBlock("header", { key: 0, class: normalizeClass(unref(i).e("header")) }, [ S.$slots.title ? renderSlot(S.$slots, "title", { key: 1 }, () => [ createCommentVNode(" DEPRECATED SLOT ") ]) : renderSlot(S.$slots, "header", { key: 0, close: unref(C), titleId: unref(h10), titleClass: unref(i).e("title") }, () => [ S.$slots.title ? createCommentVNode("v-if", true) : (openBlock(), createElementBlock("span", { key: 0, id: unref(h10), role: "heading", "aria-level": S.headerAriaLevel, class: normalizeClass(unref(i).e("title")) }, toDisplayString(S.title), 11, ["id", "aria-level"])) ]), S.showClose ? (openBlock(), createElementBlock("button", { key: 2, "aria-label": unref(s)("el.drawer.close"), class: normalizeClass(unref(i).e("close-btn")), type: "button", onClick: unref(C) }, [ createVNode(unref(nn), { class: normalizeClass(unref(i).e("close")) }, { default: withCtx(() => [ createVNode(unref(Wv)) ]), _: 1 }, 8, ["class"]) ], 10, ["aria-label", "onClick"])) : createCommentVNode("v-if", true) ], 2)) : createCommentVNode("v-if", true), unref(f) ? (openBlock(), createElementBlock("div", { key: 1, id: unref(p), class: normalizeClass(unref(i).e("body")) }, [ renderSlot(S.$slots, "default") ], 10, ["id"])) : createCommentVNode("v-if", true), S.$slots.footer ? (openBlock(), createElementBlock("div", { key: 2, class: normalizeClass(unref(i).e("footer")) }, [ renderSlot(S.$slots, "footer") ], 2)) : createCommentVNode("v-if", true) ], 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"]), [ [vShow, unref(d)] ]) ]), _: 3 }, 8, ["name", "onAfterEnter", "onAfterLeave", "onBeforeLeave"]) ]), _: 3 }, 8, ["to", "disabled"])); } }); var GD = vt(KD, [["__file", "drawer.vue"]]); var Kg = $n(GD); var XD = defineComponent({ inheritAttrs: false }); function YD(e17, t, n, r, o, a) { return renderSlot(e17.$slots, "default"); } var ZD = vt(XD, [["render", YD], ["__file", "collection.vue"]]); var JD = defineComponent({ name: "ElCollectionItem", inheritAttrs: false }); function QD(e17, t, n, r, o, a) { return renderSlot(e17.$slots, "default"); } var eR = vt(JD, [["render", QD], ["__file", "collection-item.vue"]]); var tR = "data-el-collection-item"; var nR = (e17) => { const t = `El${e17}Collection`, n = `${t}Item`, r = Symbol(t), o = Symbol(n), a = { ...ZD, name: t, setup() { const s = ref(null), u = /* @__PURE__ */ new Map(); provide(r, { itemMap: u, getItems: () => { const c = unref(s); if (!c) return []; const d = Array.from(c.querySelectorAll(`[${tR}]`)); return [...u.values()].sort((h10, p) => d.indexOf(h10.ref) - d.indexOf(p.ref)); }, collectionRef: s }); } }, i = { ...eR, name: n, setup(s, { attrs: u }) { const l = ref(null), c = inject(r, void 0); provide(o, { collectionItemRef: l }), onMounted(() => { const d = unref(l); d && c.itemMap.set(d, { ref: d, ...u }); }), onBeforeUnmount(() => { const d = unref(l); c.itemMap.delete(d); }); } }; return { COLLECTION_INJECTION_KEY: r, COLLECTION_ITEM_INJECTION_KEY: o, ElCollection: a, ElCollectionItem: i }; }; var 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: true }, loop: { type: Boolean, default: true }, 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"); var _3 = Symbol("elPaginationKey"); var rR = mt({ disabled: Boolean, currentPage: { type: Number, default: 1 }, prevText: { type: String }, prevIcon: { type: io } }); var oR = { click: (e17) => e17 instanceof MouseEvent }; var aR = defineComponent({ name: "ElPaginationPrev" }); var iR = defineComponent({ ...aR, props: rR, emits: oR, setup(e17) { const t = e17, { t: n } = go(), r = computed(() => t.disabled || t.currentPage <= 1); return (o, a) => (openBlock(), createElementBlock("button", { type: "button", class: "btn-prev", disabled: unref(r), "aria-label": o.prevText || unref(n)("el.pagination.prev"), "aria-disabled": unref(r), onClick: (i) => o.$emit("click", i) }, [ o.prevText ? (openBlock(), createElementBlock("span", { key: 0 }, toDisplayString(o.prevText), 1)) : (openBlock(), createBlock(unref(nn), { key: 1 }, { default: withCtx(() => [ (openBlock(), createBlock(resolveDynamicComponent(o.prevIcon))) ]), _: 1 })) ], 8, ["disabled", "aria-label", "aria-disabled", "onClick"])); } }); var sR = vt(iR, [["__file", "prev.vue"]]); var lR = mt({ disabled: Boolean, currentPage: { type: Number, default: 1 }, pageCount: { type: Number, default: 50 }, nextText: { type: String }, nextIcon: { type: io } }); var uR = defineComponent({ name: "ElPaginationNext" }); var cR = defineComponent({ ...uR, props: lR, emits: ["click"], setup(e17) { const t = e17, { t: n } = go(), r = computed(() => t.disabled || t.currentPage === t.pageCount || t.pageCount === 0); return (o, a) => (openBlock(), createElementBlock("button", { type: "button", class: "btn-next", disabled: unref(r), "aria-label": o.nextText || unref(n)("el.pagination.next"), "aria-disabled": unref(r), onClick: (i) => o.$emit("click", i) }, [ o.nextText ? (openBlock(), createElementBlock("span", { key: 0 }, toDisplayString(o.nextText), 1)) : (openBlock(), createBlock(unref(nn), { key: 1 }, { default: withCtx(() => [ (openBlock(), createBlock(resolveDynamicComponent(o.nextIcon))) ]), _: 1 })) ], 8, ["disabled", "aria-label", "aria-disabled", "onClick"])); } }); var dR = vt(cR, [["__file", "next.vue"]]); var T3 = Symbol("ElSelectGroup"); var Ff = Symbol("ElSelect"); function pR(e17, t) { const n = inject(Ff), r = inject(T3, { disabled: false }), o = computed(() => c(Za(n.props.modelValue), e17.value)), a = computed(() => { var h10; if (n.props.multiple) { const p = Za((h10 = n.props.modelValue) != null ? h10 : []); return !o.value && p.length >= n.props.multipleLimit && n.props.multipleLimit > 0; } else return false; }), i = computed(() => e17.label || (zn(e17.value) ? "" : e17.value)), s = computed(() => e17.value || e17.label || ""), u = computed(() => e17.disabled || t.groupDisabled || a.value), l = getCurrentInstance(), c = (h10 = [], p) => { if (zn(e17.value)) { const v = n.props.valueKey; return h10 && h10.some((m) => toRaw(ma(m, v)) === ma(p, v)); } else return h10 && h10.includes(p); }, d = () => { !e17.disabled && !r.disabled && (n.states.hoveringIndex = n.optionsArray.indexOf(l.proxy)); }, f = (h10) => { const p = new RegExp(QA(h10), "i"); t.visible = p.test(i.value) || e17.created; }; return watch(() => i.value, () => { !e17.created && !n.props.remote && n.setSelected(); }), watch(() => e17.value, (h10, p) => { const { remote: v, valueKey: m } = n.props; if (h10 !== p && (n.onOptionDestroy(p, l.proxy), n.onOptionCreate(l.proxy)), !e17.created && !v) { if (m && zn(h10) && zn(p) && h10[m] === p[m]) return; n.setSelected(); } }), watch(() => r.disabled, () => { t.groupDisabled = r.disabled; }, { immediate: true }), { select: n, currentLabel: i, currentValue: s, itemSelected: o, isDisabled: u, hoverItem: d, updateOption: f }; } var fR = defineComponent({ name: "ElOption", componentName: "ElOption", props: { value: { required: true, type: [String, Number, Boolean, Object] }, label: [String, Number], created: Boolean, disabled: Boolean }, setup(e17) { const t = pt("select"), n = pi(), r = computed(() => [ t.be("dropdown", "item"), t.is("disabled", unref(s)), t.is("selected", unref(i)), t.is("hovering", unref(f)) ]), o = reactive({ index: -1, groupDisabled: false, visible: true, hover: false }), { currentLabel: a, itemSelected: i, isDisabled: s, select: u, hoverItem: l, updateOption: c } = pR(e17, o), { visible: d, hover: f } = toRefs(o), h10 = getCurrentInstance().proxy; u.onOptionCreate(h10), onBeforeUnmount(() => { const v = h10.value, { selected: m } = u.states, b = (u.props.multiple ? m : [m]).some((x) => x.value === h10.value); nextTick(() => { u.states.cachedOptions.get(v) === h10 && !b && u.states.cachedOptions.delete(v); }), u.onOptionDestroy(v, h10); }); function p() { s.value || u.handleOptionSelect(h10); } 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(e17, t, n, r, o, a) { return withDirectives((openBlock(), createElementBlock("li", { id: e17.id, class: normalizeClass(e17.containerKls), role: "option", "aria-disabled": e17.isDisabled || void 0, "aria-selected": e17.itemSelected, onMouseenter: e17.hoverItem, onClick: withModifiers(e17.selectOptionClick, ["stop"]) }, [ renderSlot(e17.$slots, "default", {}, () => [ createBaseVNode("span", null, toDisplayString(e17.currentLabel), 1) ]) ], 42, ["id", "aria-disabled", "aria-selected", "onMouseenter", "onClick"])), [ [vShow, e17.visible] ]); } var Gg = vt(fR, [["render", hR], ["__file", "option.vue"]]); var vR = defineComponent({ name: "ElSelectDropdown", componentName: "ElSelectDropdown", setup() { const e17 = inject(Ff), t = pt("select"), n = computed(() => e17.props.popperClass), r = computed(() => e17.props.multiple), o = computed(() => e17.props.fitInputWidth), a = ref(""); function i() { var s; a.value = `${(s = e17.selectRef) == null ? void 0 : s.offsetWidth}px`; } return onMounted(() => { i(), qo(e17.selectRef, i); }), { ns: t, minWidth: a, popperClass: n, isMultiple: r, isFitInputWidth: o }; } }); function gR(e17, t, n, r, o, a) { return openBlock(), createElementBlock("div", { class: normalizeClass([e17.ns.b("dropdown"), e17.ns.is("multiple", e17.isMultiple), e17.popperClass]), style: normalizeStyle({ [e17.isFitInputWidth ? "width" : "minWidth"]: e17.minWidth }) }, [ e17.$slots.header ? (openBlock(), createElementBlock("div", { key: 0, class: normalizeClass(e17.ns.be("dropdown", "header")) }, [ renderSlot(e17.$slots, "header") ], 2)) : createCommentVNode("v-if", true), renderSlot(e17.$slots, "default"), e17.$slots.footer ? (openBlock(), createElementBlock("div", { key: 1, class: normalizeClass(e17.ns.be("dropdown", "footer")) }, [ renderSlot(e17.$slots, "footer") ], 2)) : createCommentVNode("v-if", true) ], 6); } var mR = vt(vR, [["render", gR], ["__file", "select-dropdown.vue"]]); var yR = 11; var bR = (e17, t) => { const { t: n } = go(), r = pi(), o = pt("select"), a = pt("input"), i = reactive({ 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: false, menuVisibleOnFocus: false, isBeforeHide: false }), s = ref(null), u = ref(null), l = ref(null), c = ref(null), d = ref(null), f = ref(null), h10 = ref(null), p = ref(null), v = ref(null), m = ref(null), g = ref(null), b = ref(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() { e17.automaticDropdown && !O.value && (O.value = true, i.menuVisibleOnFocus = true); }, 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 = false, i.menuVisibleOnFocus = false; } }), O = ref(false), F = ref(), { form: $, formItem: A } = _i(), { inputId: L } = Ic(e17, { formItemContext: A }), { valueOnClear: N, isEmptyValue: M } = UC(e17), I = computed(() => e17.disabled || ($ == null ? void 0 : $.disabled)), z = computed(() => br(e17.modelValue) ? e17.modelValue.length > 0 : !M(e17.modelValue)), R = computed(() => e17.clearable && !I.value && i.inputHovering && z.value), W = computed(() => e17.remote && e17.filterable && !e17.remoteShowSuffix ? "" : e17.suffixIcon), oe = computed(() => o.is("reverse", W.value && O.value)), Q = computed(() => (A == null ? void 0 : A.validateState) || ""), ae = computed(() => bC[Q.value]), pe = computed(() => e17.remote ? 300 : 0), we = computed(() => e17.loading ? e17.loadingText || n("el.select.loading") : e17.remote && !i.inputValue && i.options.size === 0 ? false : e17.filterable && i.inputValue && i.options.size > 0 && ke.value === 0 ? e17.noMatchText || n("el.select.noMatch") : i.options.size === 0 ? e17.noDataText || n("el.select.noData") : null), ke = computed(() => fe.value.filter((K) => K.visible).length), fe = computed(() => { 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 = computed(() => Array.from(i.cachedOptions.values())), J = computed(() => { const K = fe.value.filter((he) => !he.created).some((he) => he.currentLabel === i.inputValue); return e17.filterable && e17.allowCreate && i.inputValue !== "" && !K; }), te = () => { e17.filterable && Nn(e17.filterMethod) || e17.filterable && e17.remote && Nn(e17.remoteMethod) || fe.value.forEach((K) => { var he; (he = K.updateOption) == null || he.call(K, i.inputValue); }); }, le = fi(), Ee = computed(() => ["small"].includes(le.value) ? "small" : "default"), Ne = computed({ get() { return O.value && we.value !== false; }, set(K) { O.value = K; } }), je = computed(() => { if (e17.multiple && !ba(e17.modelValue)) return Za(e17.modelValue).length === 0 && !i.inputValue; const K = br(e17.modelValue) ? e17.modelValue[0] : e17.modelValue; return e17.filterable || ba(K) ? !i.inputValue : true; }), _e = computed(() => { var K; const he = (K = e17.placeholder) != null ? K : n("el.select.placeholder"); return e17.multiple || !z.value ? he : i.selectedLabel; }), De = computed(() => Bv ? null : "mouseenter"); watch(() => e17.modelValue, (K, he) => { e17.multiple && e17.filterable && !e17.reserveKeyword && (i.inputValue = "", Ae("")), Ue(), !Yo(K, he) && e17.validateEvent && (A == null || A.validate("change").catch((ze) => Sn(ze))); }, { flush: "post", deep: true }), watch(() => O.value, (K) => { K ? Ae(i.inputValue) : (i.inputValue = "", i.previousQuery = null, i.isBeforeHide = true), t("visible-change", K); }), watch(() => i.options.entries(), () => { var K; if (!on) return; const he = ((K = s.value) == null ? void 0 : K.querySelectorAll("input")) || []; (!e17.filterable && !e17.defaultFirstOption && !ba(e17.modelValue) || !Array.from(he).includes(document.activeElement)) && Ue(), e17.defaultFirstOption && (e17.filterable || e17.remote) && ke.value && Be(); }, { flush: "post" }), watch(() => i.hoveringIndex, (K) => { Ut(K) && K > -1 ? F.value = fe.value[K] || {} : F.value = {}, fe.value.forEach((he) => { he.hover = F.value === he; }); }), watchEffect(() => { i.isBeforeHide || te(); }); const Ae = (K) => { i.previousQuery === K || x.value || (i.previousQuery = K, e17.filterable && Nn(e17.filterMethod) ? e17.filterMethod(K) : e17.filterable && e17.remote && Nn(e17.remoteMethod) && e17.remoteMethod(K), e17.defaultFirstOption && (e17.filterable || e17.remote) && ke.value ? nextTick(Be) : nextTick(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 (e17.multiple) i.selectedLabel = ""; else { const he = br(e17.modelValue) ? e17.modelValue[0] : e17.modelValue, ze = Ze(he); i.selectedLabel = ze.currentLabel, i.selected = [ze]; return; } const K = []; ba(e17.modelValue) || Za(e17.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, e17.valueKey) === ma(K, e17.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 = true), Ae(i.inputValue); }, ce = (K) => { if (i.inputValue = K.target.value, e17.remote) de(); else return se(); }, de = lC(() => { se(); }, pe.value), Oe = (K) => { Yo(e17.modelValue, K) || t(ls, K); }, ye = (K) => WA(K, (he) => !i.disabledOptions.has(he)), Fe = (K) => { if (e17.multiple && K.code !== Fn.delete && K.target.value.length <= 0) { const he = Za(e17.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(e17.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 = e17.multiple ? [] : N.value; if (e17.multiple) for (const ze of i.selected) ze.isDisabled && he.push(ze.value); t(hn, he), Oe(he), i.hoveringIndex = -1, O.value = false, t("clear"), Vt(); }, re = (K) => { var he; if (e17.multiple) { const ze = Za((he = e17.modelValue) != null ? he : []).slice(), ot = Se(ze, K.value); ot > -1 ? ze.splice(ot, 1) : (e17.multipleLimit <= 0 || ze.length < e17.multipleLimit) && ze.push(K.value), t(hn, ze), Oe(ze), K.created && Ae(""), e17.filterable && !e17.reserveKeyword && (i.inputValue = ""); } else t(hn, K.value), Oe(K.value), O.value = false; Vt(), !O.value && nextTick(() => { be(K); }); }, Se = (K = [], he) => { if (!zn(he)) return K.indexOf(he); const ze = e17.valueKey; let ot = -1; return K.some((yn, qn) => toRaw(ma(yn, ze)) === ma(he, ze) ? (ot = qn, true) : false), 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 = computed(() => { var K, he; return (he = (K = l.value) == null ? void 0 : K.popperRef) == null ? void 0 : he.contentRef; }), Dt = () => { i.isBeforeHide = false, nextTick(() => 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 = false, S.value && qt(); }, sn = () => { i.inputValue.length > 0 ? i.inputValue = "" : O.value = false; }, wn = () => { I.value || (Bv && (i.inputHovering = true), i.menuVisibleOnFocus ? i.menuVisibleOnFocus = false : 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, e17.valueKey) : K.value, or = computed(() => fe.value.filter((K) => K.visible).every((K) => K.disabled)), Hn = computed(() => e17.multiple ? e17.collapseTags ? i.selected.slice(0, e17.maxCollapseTags) : i.selected : []), Un = computed(() => e17.multiple ? e17.collapseTags ? i.selected.slice(e17.maxCollapseTags) : [] : []), Wt = (K) => { if (!O.value) { O.value = true; 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 === true || he.states.groupDisabled === true || !he.visible) && Wt(K), nextTick(() => be(F.value)); } }, ln = () => { if (!u.value) return 0; const K = window.getComputedStyle(u.value); return Number.parseFloat(K.gap || "6px"); }, fn = computed(() => { const K = ln(); return { maxWidth: `${g.value && e17.maxCollapseTags === 1 ? i.selectionWidth - i.collapseItemWidth - K : i.selectionWidth}px` }; }), ar = computed(() => ({ maxWidth: `${i.selectionWidth}px` })), zo = computed(() => ({ 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), onMounted(() => { 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: W, 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: h10, suffixRef: p, selectRef: s, wrapperRef: E, selectionRef: u, scrollbarRef: b, menuRef: v, tagMenuRef: m, collapseItemRef: g }; }; var wR = defineComponent({ name: "ElOptions", setup(e17, { slots: t }) { const n = inject(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, h10, 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) ? (h10 = c.children) == null ? void 0 : h10.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; }; } }); var 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: true }, valueKey: { type: String, default: "value" }, collapseTags: Boolean, collapseTagsTooltip: Boolean, maxCollapseTags: { type: Number, default: 1 }, teleported: Cr.teleported, persistent: { type: Boolean, default: true }, 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: true }, 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"]) }); var hb = "ElSelect"; var kR = defineComponent({ 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(e17, { emit: t }) { const n = computed(() => { const { modelValue: a, multiple: i } = e17, s = i ? [] : void 0; return br(a) ? i ? a : s : i ? s : a; }), r = reactive({ ...toRefs(e17), modelValue: n }), o = bR(r, t); return provide(Ff, reactive({ 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(e17, t, n, r, o, a) { const i = resolveComponent("el-tag"), s = resolveComponent("el-tooltip"), u = resolveComponent("el-icon"), l = resolveComponent("el-option"), c = resolveComponent("el-options"), d = resolveComponent("el-scrollbar"), f = resolveComponent("el-select-menu"), h10 = resolveDirective("click-outside"); return withDirectives((openBlock(), createElementBlock("div", { ref: "selectRef", class: normalizeClass([e17.nsSelect.b(), e17.nsSelect.m(e17.selectSize)]), [toHandlerKey(e17.mouseEnterEventName)]: (p) => e17.states.inputHovering = true, onMouseleave: (p) => e17.states.inputHovering = false }, [ createVNode(s, { ref: "tooltipRef", visible: e17.dropdownMenuVisible, placement: e17.placement, teleported: e17.teleported, "popper-class": [e17.nsSelect.e("popper"), e17.popperClass], "popper-options": e17.popperOptions, "fallback-placements": e17.fallbackPlacements, effect: e17.effect, pure: "", trigger: "click", transition: `${e17.nsSelect.namespace.value}-zoom-in-top`, "stop-popper-mouse-event": false, "gpu-acceleration": false, persistent: e17.persistent, "append-to": e17.appendTo, onBeforeShow: e17.handleMenuEnter, onHide: (p) => e17.states.isBeforeHide = false }, { default: withCtx(() => { var p; return [ createBaseVNode("div", { ref: "wrapperRef", class: normalizeClass([ e17.nsSelect.e("wrapper"), e17.nsSelect.is("focused", e17.isFocused), e17.nsSelect.is("hovering", e17.states.inputHovering), e17.nsSelect.is("filterable", e17.filterable), e17.nsSelect.is("disabled", e17.selectDisabled) ]), onClick: withModifiers(e17.toggleMenu, ["prevent"]) }, [ e17.$slots.prefix ? (openBlock(), createElementBlock("div", { key: 0, ref: "prefixRef", class: normalizeClass(e17.nsSelect.e("prefix")) }, [ renderSlot(e17.$slots, "prefix") ], 2)) : createCommentVNode("v-if", true), createBaseVNode("div", { ref: "selectionRef", class: normalizeClass([ e17.nsSelect.e("selection"), e17.nsSelect.is("near", e17.multiple && !e17.$slots.prefix && !!e17.states.selected.length) ]) }, [ e17.multiple ? renderSlot(e17.$slots, "tag", { key: 0 }, () => [ (openBlock(true), createElementBlock(Fragment, null, renderList(e17.showTagList, (v) => (openBlock(), createElementBlock("div", { key: e17.getValueKey(v), class: normalizeClass(e17.nsSelect.e("selected-item")) }, [ createVNode(i, { closable: !e17.selectDisabled && !v.isDisabled, size: e17.collapseTagSize, type: e17.tagType, effect: e17.tagEffect, "disable-transitions": "", style: normalizeStyle(e17.tagStyle), onClose: (m) => e17.deleteTag(m, v) }, { default: withCtx(() => [ createBaseVNode("span", { class: normalizeClass(e17.nsSelect.e("tags-text")) }, [ renderSlot(e17.$slots, "label", { label: v.currentLabel, value: v.value }, () => [ createTextVNode(toDisplayString(v.currentLabel), 1) ]) ], 2) ]), _: 2 }, 1032, ["closable", "size", "type", "effect", "style", "onClose"]) ], 2))), 128)), e17.collapseTags && e17.states.selected.length > e17.maxCollapseTags ? (openBlock(), createBlock(s, { key: 0, ref: "tagTooltipRef", disabled: e17.dropdownMenuVisible || !e17.collapseTagsTooltip, "fallback-placements": ["bottom", "top", "right", "left"], effect: e17.effect, placement: "bottom", teleported: e17.teleported }, { default: withCtx(() => [ createBaseVNode("div", { ref: "collapseItemRef", class: normalizeClass(e17.nsSelect.e("selected-item")) }, [ createVNode(i, { closable: false, size: e17.collapseTagSize, type: e17.tagType, effect: e17.tagEffect, "disable-transitions": "", style: normalizeStyle(e17.collapseTagStyle) }, { default: withCtx(() => [ createBaseVNode("span", { class: normalizeClass(e17.nsSelect.e("tags-text")) }, " + " + toDisplayString(e17.states.selected.length - e17.maxCollapseTags), 3) ]), _: 1 }, 8, ["size", "type", "effect", "style"]) ], 2) ]), content: withCtx(() => [ createBaseVNode("div", { ref: "tagMenuRef", class: normalizeClass(e17.nsSelect.e("selection")) }, [ (openBlock(true), createElementBlock(Fragment, null, renderList(e17.collapseTagList, (v) => (openBlock(), createElementBlock("div", { key: e17.getValueKey(v), class: normalizeClass(e17.nsSelect.e("selected-item")) }, [ createVNode(i, { class: "in-tooltip", closable: !e17.selectDisabled && !v.isDisabled, size: e17.collapseTagSize, type: e17.tagType, effect: e17.tagEffect, "disable-transitions": "", onClose: (m) => e17.deleteTag(m, v) }, { default: withCtx(() => [ createBaseVNode("span", { class: normalizeClass(e17.nsSelect.e("tags-text")) }, [ renderSlot(e17.$slots, "label", { label: v.currentLabel, value: v.value }, () => [ createTextVNode(toDisplayString(v.currentLabel), 1) ]) ], 2) ]), _: 2 }, 1032, ["closable", "size", "type", "effect", "onClose"]) ], 2))), 128)) ], 2) ]), _: 3 }, 8, ["disabled", "effect", "teleported"])) : createCommentVNode("v-if", true) ]) : createCommentVNode("v-if", true), e17.selectDisabled ? createCommentVNode("v-if", true) : (openBlock(), createElementBlock("div", { key: 1, class: normalizeClass([ e17.nsSelect.e("selected-item"), e17.nsSelect.e("input-wrapper"), e17.nsSelect.is("hidden", !e17.filterable) ]) }, [ withDirectives(createBaseVNode("input", { id: e17.inputId, ref: "inputRef", "onUpdate:modelValue": (v) => e17.states.inputValue = v, type: "text", name: e17.name, class: normalizeClass([e17.nsSelect.e("input"), e17.nsSelect.is(e17.selectSize)]), disabled: e17.selectDisabled, autocomplete: e17.autocomplete, style: normalizeStyle(e17.inputStyle), role: "combobox", readonly: !e17.filterable, spellcheck: "false", "aria-activedescendant": ((p = e17.hoverOption) == null ? void 0 : p.id) || "", "aria-controls": e17.contentId, "aria-expanded": e17.dropdownMenuVisible, "aria-label": e17.ariaLabel, "aria-autocomplete": "none", "aria-haspopup": "listbox", onKeydown: [ withKeys(withModifiers((v) => e17.navigateOptions("next"), ["stop", "prevent"]), ["down"]), withKeys(withModifiers((v) => e17.navigateOptions("prev"), ["stop", "prevent"]), ["up"]), withKeys(withModifiers(e17.handleEsc, ["stop", "prevent"]), ["esc"]), withKeys(withModifiers(e17.selectOption, ["stop", "prevent"]), ["enter"]), withKeys(withModifiers(e17.deletePrevTag, ["stop"]), ["delete"]) ], onCompositionstart: e17.handleCompositionStart, onCompositionupdate: e17.handleCompositionUpdate, onCompositionend: e17.handleCompositionEnd, onInput: e17.onInput, onClick: withModifiers(e17.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"]), [ [vModelText, e17.states.inputValue] ]), e17.filterable ? (openBlock(), createElementBlock("span", { key: 0, ref: "calculatorRef", "aria-hidden": "true", class: normalizeClass(e17.nsSelect.e("input-calculator")), textContent: toDisplayString(e17.states.inputValue) }, null, 10, ["textContent"])) : createCommentVNode("v-if", true) ], 2)), e17.shouldShowPlaceholder ? (openBlock(), createElementBlock("div", { key: 2, class: normalizeClass([ e17.nsSelect.e("selected-item"), e17.nsSelect.e("placeholder"), e17.nsSelect.is("transparent", !e17.hasModelValue || e17.expanded && !e17.states.inputValue) ]) }, [ e17.hasModelValue ? renderSlot(e17.$slots, "label", { key: 0, label: e17.currentPlaceholder, value: e17.modelValue }, () => [ createBaseVNode("span", null, toDisplayString(e17.currentPlaceholder), 1) ]) : (openBlock(), createElementBlock("span", { key: 1 }, toDisplayString(e17.currentPlaceholder), 1)) ], 2)) : createCommentVNode("v-if", true) ], 2), createBaseVNode("div", { ref: "suffixRef", class: normalizeClass(e17.nsSelect.e("suffix")) }, [ e17.iconComponent && !e17.showClose ? (openBlock(), createBlock(u, { key: 0, class: normalizeClass([e17.nsSelect.e("caret"), e17.nsSelect.e("icon"), e17.iconReverse]) }, { default: withCtx(() => [ (openBlock(), createBlock(resolveDynamicComponent(e17.iconComponent))) ]), _: 1 }, 8, ["class"])) : createCommentVNode("v-if", true), e17.showClose && e17.clearIcon ? (openBlock(), createBlock(u, { key: 1, class: normalizeClass([ e17.nsSelect.e("caret"), e17.nsSelect.e("icon"), e17.nsSelect.e("clear") ]), onClick: e17.handleClearClick }, { default: withCtx(() => [ (openBlock(), createBlock(resolveDynamicComponent(e17.clearIcon))) ]), _: 1 }, 8, ["class", "onClick"])) : createCommentVNode("v-if", true), e17.validateState && e17.validateIcon ? (openBlock(), createBlock(u, { key: 2, class: normalizeClass([e17.nsInput.e("icon"), e17.nsInput.e("validateIcon")]) }, { default: withCtx(() => [ (openBlock(), createBlock(resolveDynamicComponent(e17.validateIcon))) ]), _: 1 }, 8, ["class"])) : createCommentVNode("v-if", true) ], 2) ], 10, ["onClick"]) ]; }), content: withCtx(() => [ createVNode(f, { ref: "menuRef" }, { default: withCtx(() => [ e17.$slots.header ? (openBlock(), createElementBlock("div", { key: 0, class: normalizeClass(e17.nsSelect.be("dropdown", "header")), onClick: withModifiers(() => { }, ["stop"]) }, [ renderSlot(e17.$slots, "header") ], 10, ["onClick"])) : createCommentVNode("v-if", true), withDirectives(createVNode(d, { id: e17.contentId, ref: "scrollbarRef", tag: "ul", "wrap-class": e17.nsSelect.be("dropdown", "wrap"), "view-class": e17.nsSelect.be("dropdown", "list"), class: normalizeClass([e17.nsSelect.is("empty", e17.filteredOptionsCount === 0)]), role: "listbox", "aria-label": e17.ariaLabel, "aria-orientation": "vertical" }, { default: withCtx(() => [ e17.showNewOption ? (openBlock(), createBlock(l, { key: 0, value: e17.states.inputValue, created: true }, null, 8, ["value"])) : createCommentVNode("v-if", true), createVNode(c, null, { default: withCtx(() => [ renderSlot(e17.$slots, "default") ]), _: 3 }) ]), _: 3 }, 8, ["id", "wrap-class", "view-class", "class", "aria-label"]), [ [vShow, e17.states.options.size > 0 && !e17.loading] ]), e17.$slots.loading && e17.loading ? (openBlock(), createElementBlock("div", { key: 1, class: normalizeClass(e17.nsSelect.be("dropdown", "loading")) }, [ renderSlot(e17.$slots, "loading") ], 2)) : e17.loading || e17.filteredOptionsCount === 0 ? (openBlock(), createElementBlock("div", { key: 2, class: normalizeClass(e17.nsSelect.be("dropdown", "empty")) }, [ renderSlot(e17.$slots, "empty", {}, () => [ createBaseVNode("span", null, toDisplayString(e17.emptyText), 1) ]) ], 2)) : createCommentVNode("v-if", true), e17.$slots.footer ? (openBlock(), createElementBlock("div", { key: 3, class: normalizeClass(e17.nsSelect.be("dropdown", "footer")), onClick: withModifiers(() => { }, ["stop"]) }, [ renderSlot(e17.$slots, "footer") ], 10, ["onClick"])) : createCommentVNode("v-if", true) ]), _: 3 }, 512) ]), _: 3 }, 8, ["visible", "placement", "teleported", "popper-class", "popper-options", "fallback-placements", "effect", "transition", "persistent", "append-to", "onBeforeShow", "onHide"]) ], 16, ["onMouseleave"])), [ [h10, e17.handleClickOutside, e17.popperRef] ]); } var ER = vt(kR, [["render", CR], ["__file", "select.vue"]]); var SR = defineComponent({ name: "ElOptionGroup", componentName: "ElOptionGroup", props: { label: String, disabled: Boolean }, setup(e17) { const t = pt("select"), n = ref(null), r = getCurrentInstance(), o = ref([]); provide(T3, reactive({ ...toRefs(e17) })); const a = computed(() => o.value.some((l) => l.visible === true)), 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 h10, p; i(f) ? d.push(f.component.proxy) : (h10 = f.children) != null && h10.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 onMounted(() => { u(); }), FT(n, u, { attributes: true, subtree: true, childList: true }), { groupRef: n, visible: a, ns: t }; } }); function _R(e17, t, n, r, o, a) { return withDirectives((openBlock(), createElementBlock("ul", { ref: "groupRef", class: normalizeClass(e17.ns.be("group", "wrap")) }, [ createBaseVNode("li", { class: normalizeClass(e17.ns.be("group", "title")) }, toDisplayString(e17.label), 3), createBaseVNode("li", null, [ createBaseVNode("ul", { class: normalizeClass(e17.ns.b("group")) }, [ renderSlot(e17.$slots, "default") ], 2) ]) ], 2)), [ [vShow, e17.visible] ]); } var O3 = vt(SR, [["render", _R], ["__file", "option-group.vue"]]); var Nc = $n(ER, { Option: Gg, OptionGroup: O3 }); var If = Io(Gg); Io(O3); var Xg = () => inject(_3, {}); var TR = mt({ pageSize: { type: Number, required: true }, 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 }); var OR = defineComponent({ name: "ElPaginationSizes" }); var PR = defineComponent({ ...OR, props: TR, emits: ["page-size-change"], setup(e17, { emit: t }) { const n = e17, { t: r } = go(), o = pt("pagination"), a = Xg(), i = ref(n.pageSize); watch(() => 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); } }), watch(() => n.pageSize, (l) => { i.value = l; }); const s = computed(() => 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) => (openBlock(), createElementBlock("span", { class: normalizeClass(unref(o).e("sizes")) }, [ createVNode(unref(Nc), { "model-value": i.value, disabled: l.disabled, "popper-class": l.popperClass, size: l.size, teleported: l.teleported, "validate-event": false, "append-to": l.appendSizeTo, onChange: u }, { default: withCtx(() => [ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(s), (d) => (openBlock(), createBlock(unref(If), { key: d, value: d, label: d + unref(r)("el.pagination.pagesize") }, null, 8, ["value", "label"]))), 128)) ]), _: 1 }, 8, ["model-value", "disabled", "popper-class", "size", "teleported", "append-to"]) ], 2)); } }); var $R = vt(PR, [["__file", "sizes.vue"]]); var AR = mt({ size: { type: String, values: Tf } }); var FR = defineComponent({ name: "ElPaginationJumper" }); var IR = defineComponent({ ...FR, props: AR, setup(e17) { const { t } = go(), n = pt("pagination"), { pageCount: r, disabled: o, currentPage: a, changeEvent: i } = Xg(), s = ref(), u = computed(() => { 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) => (openBlock(), createElementBlock("span", { class: normalizeClass(unref(n).e("jump")), disabled: unref(o) }, [ createBaseVNode("span", { class: normalizeClass([unref(n).e("goto")]) }, toDisplayString(unref(t)("el.pagination.goto")), 3), createVNode(unref($f), { size: d.size, class: normalizeClass([unref(n).e("editor"), unref(n).is("in-pagination")]), min: 1, max: unref(r), disabled: unref(o), "model-value": unref(u), "validate-event": false, "aria-label": unref(t)("el.pagination.page"), type: "number", "onUpdate:modelValue": l, onChange: c }, null, 8, ["size", "class", "max", "disabled", "model-value", "aria-label"]), createBaseVNode("span", { class: normalizeClass([unref(n).e("classifier")]) }, toDisplayString(unref(t)("el.pagination.pageClassifier")), 3) ], 10, ["disabled"])); } }); var NR = vt(IR, [["__file", "jumper.vue"]]); var LR = mt({ total: { type: Number, default: 1e3 } }); var DR = defineComponent({ name: "ElPaginationTotal" }); var RR = defineComponent({ ...DR, props: LR, setup(e17) { const { t } = go(), n = pt("pagination"), { disabled: r } = Xg(); return (o, a) => (openBlock(), createElementBlock("span", { class: normalizeClass(unref(n).e("total")), disabled: unref(r) }, toDisplayString(unref(t)("el.pagination.total", { total: o.total })), 11, ["disabled"])); } }); var BR = vt(RR, [["__file", "total.vue"]]); var MR = mt({ currentPage: { type: Number, default: 1 }, pageCount: { type: Number, required: true }, pagerCount: { type: Number, default: 7 }, disabled: Boolean }); var zR = defineComponent({ name: "ElPaginationPager" }); var VR = defineComponent({ ...zR, props: MR, emits: ["change"], setup(e17, { emit: t }) { const n = e17, r = pt("pager"), o = pt("icon"), { t: a } = go(), i = ref(false), s = ref(false), u = ref(false), l = ref(false), c = ref(false), d = ref(false), f = computed(() => { const w = n.pagerCount, C = (w - 1) / 2, k = Number(n.currentPage), E = Number(n.pageCount); let S = false, O = false; E > w && (k > w - C && (S = true), k < E - C && (O = true)); 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; }), h10 = computed(() => [ "more", "btn-quickprev", o.b(), r.is("disabled", n.disabled) ]), p = computed(() => [ "more", "btn-quicknext", o.b(), r.is("disabled", n.disabled) ]), v = computed(() => n.disabled ? -1 : 0); watchEffect(() => { const w = (n.pagerCount - 1) / 2; i.value = false, s.value = false, n.pageCount > n.pagerCount && (n.currentPage > n.pagerCount - w && (i.value = true), n.currentPage < n.pageCount - w && (s.value = true)); }); function m(w = false) { n.disabled || (w ? u.value = true : l.value = true); } function g(w = false) { w ? c.value = true : d.value = true; } 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) => (openBlock(), createElementBlock("ul", { class: normalizeClass(unref(r).b()), onClick: x, onKeyup: withKeys(b, ["enter"]) }, [ w.pageCount > 0 ? (openBlock(), createElementBlock("li", { key: 0, class: normalizeClass([[ unref(r).is("active", w.currentPage === 1), unref(r).is("disabled", w.disabled) ], "number"]), "aria-current": w.currentPage === 1, "aria-label": unref(a)("el.pagination.currentPage", { pager: 1 }), tabindex: unref(v) }, " 1 ", 10, ["aria-current", "aria-label", "tabindex"])) : createCommentVNode("v-if", true), i.value ? (openBlock(), createElementBlock("li", { key: 1, class: normalizeClass(unref(h10)), tabindex: unref(v), "aria-label": unref(a)("el.pagination.prevPages", { pager: w.pagerCount - 2 }), onMouseenter: (k) => m(true), onMouseleave: (k) => u.value = false, onFocus: (k) => g(true), onBlur: (k) => c.value = false }, [ (u.value || c.value) && !w.disabled ? (openBlock(), createBlock(unref(fF), { key: 0 })) : (openBlock(), createBlock(unref(I1), { key: 1 })) ], 42, ["tabindex", "aria-label", "onMouseenter", "onMouseleave", "onFocus", "onBlur"])) : createCommentVNode("v-if", true), (openBlock(true), createElementBlock(Fragment, null, renderList(unref(f), (k) => (openBlock(), createElementBlock("li", { key: k, class: normalizeClass([[ unref(r).is("active", w.currentPage === k), unref(r).is("disabled", w.disabled) ], "number"]), "aria-current": w.currentPage === k, "aria-label": unref(a)("el.pagination.currentPage", { pager: k }), tabindex: unref(v) }, toDisplayString(k), 11, ["aria-current", "aria-label", "tabindex"]))), 128)), s.value ? (openBlock(), createElementBlock("li", { key: 2, class: normalizeClass(unref(p)), tabindex: unref(v), "aria-label": unref(a)("el.pagination.nextPages", { pager: w.pagerCount - 2 }), onMouseenter: (k) => m(), onMouseleave: (k) => l.value = false, onFocus: (k) => g(), onBlur: (k) => d.value = false }, [ (l.value || d.value) && !w.disabled ? (openBlock(), createBlock(unref(vF), { key: 0 })) : (openBlock(), createBlock(unref(I1), { key: 1 })) ], 42, ["tabindex", "aria-label", "onMouseenter", "onMouseleave", "onFocus", "onBlur"])) : createCommentVNode("v-if", true), w.pageCount > 1 ? (openBlock(), createElementBlock("li", { key: 3, class: normalizeClass([[ unref(r).is("active", w.currentPage === w.pageCount), unref(r).is("disabled", w.disabled) ], "number"]), "aria-current": w.currentPage === w.pageCount, "aria-label": unref(a)("el.pagination.currentPage", { pager: w.pageCount }), tabindex: unref(v) }, toDisplayString(w.pageCount), 11, ["aria-current", "aria-label", "tabindex"])) : createCommentVNode("v-if", true) ], 42, ["onKeyup"])); } }); var jR = vt(VR, [["__file", "pager.vue"]]); var mr = (e17) => typeof e17 != "number"; var HR = mt({ pageSize: Number, defaultPageSize: Number, total: Number, pageCount: Number, pagerCount: { type: Number, validator: (e17) => Ut(e17) && Math.trunc(e17) === e17 && e17 > 4 && e17 < 22 && e17 % 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: true }, small: Boolean, size: Aa, background: Boolean, disabled: Boolean, hideOnSinglePage: Boolean, appendSizeTo: String }); var UR = { "update:current-page": (e17) => Ut(e17), "update:page-size": (e17) => Ut(e17), "size-change": (e17) => Ut(e17), change: (e17, t) => Ut(e17) && Ut(t), "current-change": (e17) => Ut(e17), "prev-click": (e17) => Ut(e17), "next-click": (e17) => Ut(e17) }; var vb = "ElPagination"; var qR = defineComponent({ name: vb, props: HR, emits: UR, setup(e17, { emit: t, slots: n }) { const { t: r } = go(), o = pt("pagination"), a = getCurrentInstance().vnode.props || {}, i = zC(), s = computed(() => { var C; return e17.small ? "small" : (C = e17.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" }, computed(() => !!e17.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 = computed(() => { if (mr(e17.total) && mr(e17.pageCount) || !mr(e17.currentPage) && !u) return false; if (e17.layout.includes("sizes")) { if (mr(e17.pageCount)) { if (!mr(e17.total) && !mr(e17.pageSize) && !l) return false; } else if (!l) return false; } return true; }), d = ref(mr(e17.defaultPageSize) ? 10 : e17.defaultPageSize), f = ref(mr(e17.defaultCurrentPage) ? 1 : e17.defaultCurrentPage), h10 = computed({ get() { return mr(e17.pageSize) ? d.value : e17.pageSize; }, set(C) { mr(e17.pageSize) && (d.value = C), l && (t("update:page-size", C), t("size-change", C)); } }), p = computed(() => { let C = 0; return mr(e17.pageCount) ? mr(e17.total) || (C = Math.max(1, Math.ceil(e17.total / h10.value))) : C = e17.pageCount, C; }), v = computed({ get() { return mr(e17.currentPage) ? f.value : e17.currentPage; }, set(C) { let k = C; C < 1 ? k = 1 : C > p.value && (k = p.value), mr(e17.currentPage) && (f.value = k), u && (t("update:current-page", k), t("current-change", k)); } }); watch(p, (C) => { v.value > C && (v.value = C); }), watch([v, h10], (C) => { t("change", ...C); }, { flush: "post" }); function m(C) { v.value = C; } function g(C) { h10.value = C; const k = p.value; v.value > k && (v.value = k); } function b() { e17.disabled || (v.value -= 1, t("prev-click", v.value)); } function x() { e17.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 provide(_3, { pageCount: p, disabled: computed(() => e17.disabled), currentPage: v, changeEvent: m, handleSizeChange: g }), () => { var C, k; if (!c.value) return Sn(vb, r("el.pagination.deprecationWarning")), null; if (!e17.layout || e17.hideOnSinglePage && p.value <= 1) return null; const E = [], S = [], O = h("div", { class: o.e("rightwrapper") }, S), F = { prev: h(sR, { disabled: e17.disabled, currentPage: v.value, prevText: e17.prevText, prevIcon: e17.prevIcon, onClick: b }), jumper: h(NR, { size: s.value }), pager: h(jR, { currentPage: v.value, pageCount: p.value, pagerCount: e17.pagerCount, onChange: m, disabled: e17.disabled }), next: h(dR, { disabled: e17.disabled, currentPage: v.value, pageCount: p.value, nextText: e17.nextText, nextIcon: e17.nextIcon, onClick: x }), sizes: h($R, { pageSize: h10.value, pageSizes: e17.pageSizes, popperClass: e17.popperClass, disabled: e17.disabled, teleported: e17.teleported, size: s.value, appendSizeTo: e17.appendSizeTo }), slot: (k = (C = n == null ? void 0 : n.default) == null ? void 0 : C.call(n)) != null ? k : null, total: h(BR, { total: mr(e17.total) ? 0 : e17.total }) }, $ = e17.layout.split(",").map((L) => L.trim()); let A = false; return $.forEach((L) => { if (L === "->") { A = true; 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)), h("div", { class: [ o.b(), o.is("background", e17.background), o.m(s.value) ] }, E); }; } }); var P3 = $n(qR); var 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: true }, 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: true }, persistent: { type: Boolean, default: true }, "onUpdate:visible": { type: Function } }); var KR = { "update:visible": (e17) => ea(e17), "before-enter": () => true, "before-leave": () => true, "after-enter": () => true, "after-leave": () => true }; var GR = "onUpdate:visible"; var XR = defineComponent({ name: "ElPopover" }); var YR = defineComponent({ ...XR, props: WR, emits: KR, setup(e17, { expose: t, emit: n }) { const r = e17, o = computed(() => r[GR]), a = pt("popover"), i = ref(), s = computed(() => { var m; return (m = unref(i)) == null ? void 0 : m.popperRef; }), u = computed(() => [ { width: cl(r.width) }, r.popperStyle ]), l = computed(() => [a.b(), r.popperClass, { [a.m("plain")]: !!r.content }]), c = computed(() => r.transition === `${a.namespace.value}-fade-in-linear`), d = () => { var m; (m = i.value) == null || m.hide(); }, f = () => { n("before-enter"); }, h10 = () => { n("before-leave"); }, p = () => { n("after-enter"); }, v = () => { n("update:visible", false), n("after-leave"); }; return t({ popperRef: s, hide: d }), (m, g) => (openBlock(), createBlock(unref(Ap), mergeProps({ 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": unref(l), "popper-style": unref(u), teleported: m.teleported, persistent: m.persistent, "gpu-acceleration": unref(c), "onUpdate:visible": unref(o), onBeforeShow: f, onBeforeHide: h10, onShow: p, onHide: v }), { content: withCtx(() => [ m.title ? (openBlock(), createElementBlock("div", { key: 0, class: normalizeClass(unref(a).e("title")), role: "title" }, toDisplayString(m.title), 3)) : createCommentVNode("v-if", true), renderSlot(m.$slots, "default", {}, () => [ createTextVNode(toDisplayString(m.content), 1) ]) ]), default: withCtx(() => [ m.$slots.reference ? renderSlot(m.$slots, "reference", { key: 0 }) : createCommentVNode("v-if", true) ]), _: 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 = vt(YR, [["__file", "popover.vue"]]); var gb = (e17, t) => { const n = t.arg || t.value, r = n == null ? void 0 : n.popperRef; r && (r.triggerRef = e17); }; var JR = { mounted(e17, t) { gb(e17, t); }, updated(e17, t) { gb(e17, t); } }; var QR = "popover"; var eB = $F(JR, QR); var Yg = $n(ZR, { directive: eB }); function tB(e17) { let t; const n = ref(false), r = reactive({ ...e17, originalPosition: "", originalOverflow: "", visible: false }); function o(f) { r.text = f; } function a() { const f = r.parent, h10 = 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, h10.bm("parent", "relative")), f.removeAttribute("loading-number")), Gu(f, h10.bm("parent", "hidden")); } i(), c.unmount(); } function i() { var f, h10; (h10 = (f = d.$el) == null ? void 0 : f.parentNode) == null || h10.removeChild(d.$el); } function s() { var f; e17.beforeClose && !e17.beforeClose() || (n.value = true, clearTimeout(t), t = setTimeout(u, 400), r.visible = false, (f = e17.closed) == null || f.call(e17)); } function u() { if (!n.value) return; const f = r.parent; n.value = false, f.vLoadingAddClassList = void 0, a(); } const l = defineComponent({ name: "ElLoading", setup(f, { expose: h10 }) { const { ns: p, zIndex: v } = lI("loading"); return h10({ ns: p, zIndex: v }), () => { const m = r.spinner || r.svg, g = h("svg", { class: "circular", viewBox: r.svgViewBox ? r.svgViewBox : "0 0 50 50", ...m ? { innerHTML: m } : {} }, [ h("circle", { class: "path", cx: "25", cy: "25", r: "20", fill: "none" }) ]), b = r.text ? h("p", { class: p.b("text") }, [r.text]) : void 0; return h(Transition, { name: p.b("fade"), onAfterLeave: u }, { default: withCtx(() => [ withDirectives(createVNode("div", { style: { backgroundColor: r.background || "" }, class: [ p.b("mask"), r.customClass, r.fullscreen ? "is-fullscreen" : "" ] }, [ h("div", { class: p.b("spinner") }, [g, b]) ]), [[vShow, r.visible]]) ]) }); }; } }), c = createApp(l), d = c.mount(document.createElement("div")); return { ...toRefs(r), setText: o, removeElLoadingChild: i, close: s, handleAfterLeave: u, vm: d, get $el() { return d.$el; } }; } var wd; var nB = function(e17 = {}) { if (!on) return; const t = rB(e17); 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), nextTick(() => n.visible.value = t.visible), t.fullscreen && (wd = n), n; }; var rB = (e17) => { var t, n, r, o; let a; return Or(e17.target) ? a = (t = document.querySelector(e17.target)) != null ? t : document.body : a = e17.target || document.body, { parent: a === document.body || e17.body ? document.body : a, background: e17.background || "", svg: e17.svg || "", svgViewBox: e17.svgViewBox || "", spinner: e17.spinner || false, text: e17.text || "", fullscreen: a === document.body && ((n = e17.fullscreen) != null ? n : true), lock: (r = e17.lock) != null ? r : false, customClass: e17.customClass || "", visible: (o = e17.visible) != null ? o : true, beforeClose: e17.beforeClose, closed: e17.closed, target: a }; }; var oB = async (e17, t, n) => { const { nextZIndex: r } = n.vm.zIndex || n.vm._.exposed.zIndex, o = {}; if (e17.fullscreen) n.originalPosition.value = Xs(document.body, "position"), n.originalOverflow.value = Xs(document.body, "overflow"), o.zIndex = r(); else if (e17.parent === document.body) { n.originalPosition.value = Xs(document.body, "position"), await nextTick(); for (const a of ["top", "left"]) { const i = a === "top" ? "scrollTop" : "scrollLeft"; o[a] = `${e17.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] = `${e17.target.getBoundingClientRect()[a]}px`; } else n.originalPosition.value = Xs(t, "position"); for (const [a, i] of Object.entries(o)) n.$el.style[a] = i; }; var mb = (e17, 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")), e17.fullscreen && e17.lock ? qv(t, r.bm("parent", "hidden")) : Gu(t, r.bm("parent", "hidden")); }; var tp = Symbol("ElLoading"); var yb = (e17, t) => { var n, r, o, a; const i = t.instance, s = (f) => zn(t.value) ? t.value[f] : void 0, u = (f) => { const h10 = Or(f) && (i == null ? void 0 : i[f]) || f; return h10 && ref(h10); }, l = (f) => u(s(f) || e17.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 : e17, body: (o = s("body")) != null ? o : t.modifiers.body, lock: (a = s("lock")) != null ? a : t.modifiers.lock }; e17[tp] = { options: d, instance: nB(d) }; }; var aB = (e17, t) => { for (const n of Object.keys(t)) isRef(t[n]) && (t[n].value = e17[n]); }; var Nf = { mounted(e17, t) { t.value && yb(e17, t); }, updated(e17, t) { const n = e17[tp]; t.oldValue !== t.value && (t.value && !t.oldValue ? yb(e17, t) : t.value && t.oldValue ? zn(t.value) && aB(t.value, n.options) : n == null || n.instance.close()); }, unmounted(e17) { var t; (t = e17[tp]) == null || t.instance.close(), e17[tp] = null; } }; var Lo = (e17, t) => { const n = e17.__vccOpts || e17; for (const [r, o] of t) n[r] = o; return n; }; var 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(e17, t) { e17 && e17.length > 0 && (this.categories[t] = { size: e17.length }, this.categories.All.size += e17.length); }, addSimulationsToCategories: function(e17) { e17 && e17.length > 0 && (this.categories.Simulations = { size: 1 }, this.categories.All.size += 1); }, categoryClicked: function(e17) { this.active = e17, this.$emit("categoryChanged", e17); } }, watch: { datasetBiolucida: { deep: true, immediate: true, handler: function(e17) { "dataset_images" in e17 && this.addToCategories(e17.dataset_images, "Images"); } }, entry: { deep: true, immediate: true, 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); } } } }; var sB = (e17) => (pushScopeId("data-v-da8a77c1"), e17 = e17(), popScopeId(), e17); var lB = { key: 0, class: "container", ref: "container" }; var uB = sB(() => createBaseVNode("div", null, "View data types:", -1)); function cB(e17, t, n, r, o, a) { const i = Gr; return e17.categories.All.size > 1 ? (openBlock(), createElementBlock("div", lB, [ uB, (openBlock(true), createElementBlock(Fragment, null, renderList(e17.categories, (s, u) => (openBlock(), createElementBlock(Fragment, null, [ s.size > 0 ? (openBlock(), createBlock(i, { class: normalizeClass([{ active: u == e17.active }, "tag-button"]), onClick: (l) => a.categoryClicked(u), size: "small", key: u }, { default: withCtx(() => [ createTextVNode(toDisplayString(u + " (" + s.size + ")"), 1) ]), _: 2 }, 1032, ["class", "onClick"])) : createCommentVNode("", true) ], 64))), 256)) ], 512)) : createCommentVNode("", true); } var $3 = Lo(iB, [["render", cB], ["__scopeId", "data-v-da8a77c1"]]); function A3(e17, t) { return function() { return e17.apply(t, arguments); }; } var { toString: dB } = Object.prototype; var { getPrototypeOf: Zg } = Object; var Lf = /* @__PURE__ */ ((e17) => (t) => { const n = dB.call(t); return e17[n] || (e17[n] = n.slice(8, -1).toLowerCase()); })(/* @__PURE__ */ Object.create(null)); var Do = (e17) => (e17 = e17.toLowerCase(), (t) => Lf(t) === e17); var Df = (e17) => (t) => typeof t === e17; var { isArray: Bl } = Array; var Qu = Df("undefined"); function pB(e17) { return e17 !== null && !Qu(e17) && e17.constructor !== null && !Qu(e17.constructor) && Hr(e17.constructor.isBuffer) && e17.constructor.isBuffer(e17); } var F3 = Do("ArrayBuffer"); function fB(e17) { let t; return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e17) : t = e17 && e17.buffer && F3(e17.buffer), t; } var hB = Df("string"); var Hr = Df("function"); var I3 = Df("number"); var Rf = (e17) => e17 !== null && typeof e17 == "object"; var vB = (e17) => e17 === true || e17 === false; var np = (e17) => { if (Lf(e17) !== "object") return false; const t = Zg(e17); return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e17) && !(Symbol.iterator in e17); }; var gB = Do("Date"); var mB = Do("File"); var yB = Do("Blob"); var bB = Do("FileList"); var wB = (e17) => Rf(e17) && Hr(e17.pipe); var xB = (e17) => { let t; return e17 && (typeof FormData == "function" && e17 instanceof FormData || Hr(e17.append) && ((t = Lf(e17)) === "formdata" || // detect form-data instance t === "object" && Hr(e17.toString) && e17.toString() === "[object FormData]")); }; var kB = Do("URLSearchParams"); var [CB, EB, SB, _B] = ["ReadableStream", "Request", "Response", "Headers"].map(Do); var TB = (e17) => e17.trim ? e17.trim() : e17.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ""); function Lc(e17, t, { allOwnKeys: n = false } = {}) { if (e17 === null || typeof e17 > "u") return; let r, o; if (typeof e17 != "object" && (e17 = [e17]), Bl(e17)) for (r = 0, o = e17.length; r < o; r++) t.call(null, e17[r], r, e17); else { const a = n ? Object.getOwnPropertyNames(e17) : Object.keys(e17), i = a.length; let s; for (r = 0; r < i; r++) s = a[r], t.call(null, e17[s], s, e17); } } function N3(e17, t) { t = t.toLowerCase(); const n = Object.keys(e17); let r = n.length, o; for (; r-- > 0; ) if (o = n[r], t === o.toLowerCase()) return o; return null; } var qi = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global; var L3 = (e17) => !Qu(e17) && e17 !== qi; function Qv() { const { caseless: e17 } = L3(this) && this || {}, t = {}, n = (r, o) => { const a = e17 && 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; } var OB = (e17, t, n, { allOwnKeys: r } = {}) => (Lc(t, (o, a) => { n && Hr(o) ? e17[a] = A3(o, n) : e17[a] = o; }, { allOwnKeys: r }), e17); var PB = (e17) => (e17.charCodeAt(0) === 65279 && (e17 = e17.slice(1)), e17); var $B = (e17, t, n, r) => { e17.prototype = Object.create(t.prototype, r), e17.prototype.constructor = e17, Object.defineProperty(e17, "super", { value: t.prototype }), n && Object.assign(e17.prototype, n); }; var AB = (e17, t, n, r) => { let o, a, i; const s = {}; if (t = t || {}, e17 == null) return t; do { for (o = Object.getOwnPropertyNames(e17), a = o.length; a-- > 0; ) i = o[a], (!r || r(i, e17, t)) && !s[i] && (t[i] = e17[i], s[i] = true); e17 = n !== false && Zg(e17); } while (e17 && (!n || n(e17, t)) && e17 !== Object.prototype); return t; }; var FB = (e17, t, n) => { e17 = String(e17), (n === void 0 || n > e17.length) && (n = e17.length), n -= t.length; const r = e17.indexOf(t, n); return r !== -1 && r === n; }; var IB = (e17) => { if (!e17) return null; if (Bl(e17)) return e17; let t = e17.length; if (!I3(t)) return null; const n = new Array(t); for (; t-- > 0; ) n[t] = e17[t]; return n; }; var NB = /* @__PURE__ */ ((e17) => (t) => e17 && t instanceof e17)(typeof Uint8Array < "u" && Zg(Uint8Array)); var LB = (e17, t) => { const r = (e17 && e17[Symbol.iterator]).call(e17); let o; for (; (o = r.next()) && !o.done; ) { const a = o.value; t.call(e17, a[0], a[1]); } }; var DB = (e17, t) => { let n; const r = []; for (; (n = e17.exec(t)) !== null; ) r.push(n); return r; }; var RB = Do("HTMLFormElement"); var BB = (e17) => e17.toLowerCase().replace( /[-_\s]([a-z\d])(\w*)/g, function(n, r, o) { return r.toUpperCase() + o; } ); var bb = (({ hasOwnProperty: e17 }) => (t, n) => e17.call(t, n))(Object.prototype); var MB = Do("RegExp"); var D3 = (e17, t) => { const n = Object.getOwnPropertyDescriptors(e17), r = {}; Lc(n, (o, a) => { let i; (i = t(o, a, e17)) !== false && (r[a] = i || o); }), Object.defineProperties(e17, r); }; var zB = (e17) => { D3(e17, (t, n) => { if (Hr(e17) && ["arguments", "caller", "callee"].indexOf(n) !== -1) return false; const r = e17[n]; if (Hr(r)) { if (t.enumerable = false, "writable" in t) { t.writable = false; return; } t.set || (t.set = () => { throw Error("Can not rewrite read-only method '" + n + "'"); }); } }); }; var VB = (e17, t) => { const n = {}, r = (o) => { o.forEach((a) => { n[a] = true; }); }; return Bl(e17) ? r(e17) : r(String(e17).split(t)), n; }; var jB = () => { }; var HB = (e17, t) => e17 != null && Number.isFinite(e17 = +e17) ? e17 : t; var Kh = "abcdefghijklmnopqrstuvwxyz"; var wb = "0123456789"; var R3 = { DIGIT: wb, ALPHA: Kh, ALPHA_DIGIT: Kh + Kh.toUpperCase() + wb }; var UB = (e17 = 16, t = R3.ALPHA_DIGIT) => { let n = ""; const { length: r } = t; for (; e17--; ) n += t[Math.random() * r | 0]; return n; }; function qB(e17) { return !!(e17 && Hr(e17.append) && e17[Symbol.toStringTag] === "FormData" && e17[Symbol.iterator]); } var WB = (e17) => { 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(e17, 0); }; var KB = Do("AsyncFunction"); var GB = (e17) => e17 && (Rf(e17) || Hr(e17)) && Hr(e17.then) && Hr(e17.catch); var B3 = ((e17, t) => e17 ? setImmediate : t ? ((n, r) => (qi.addEventListener("message", ({ source: o, data: a }) => { o === qi && a === n && r.length && r.shift()(); }, false), (o) => { r.push(o), qi.postMessage(n, "*"); }))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))( typeof setImmediate == "function", Hr(qi.postMessage) ); var XB = typeof queueMicrotask < "u" ? queueMicrotask.bind(qi) : typeof process < "u" && process.nextTick || B3; var 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(e17, t, n, r, o) { Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e17, 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 }; } }); var M3 = xt.prototype; var 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((e17) => { z3[e17] = { value: e17 }; }); Object.defineProperties(xt, z3); Object.defineProperty(M3, "isAxiosError", { value: true }); xt.from = (e17, t, n, r, o, a) => { const i = Object.create(M3); return Ce.toFlatObject(e17, i, function(u) { return u !== Error.prototype; }, (s) => s !== "isAxiosError"), xt.call(i, e17.message, t, n, r, o), i.cause = e17, i.name = e17.name, a && Object.assign(i, a), i; }; var YB = null; function e0(e17) { return Ce.isPlainObject(e17) || Ce.isArray(e17); } function V3(e17) { return Ce.endsWith(e17, "[]") ? e17.slice(0, -2) : e17; } function xb(e17, t, n) { return e17 ? e17.concat(t).map(function(o, a) { return o = V3(o), !n && a ? "[" + o + "]" : o; }).join(n ? "." : "") : t; } function ZB(e17) { return Ce.isArray(e17) && !e17.some(e0); } var JB = Ce.toFlatObject(Ce, {}, null, function(t) { return /^is[A-Z]/.test(t); }); function Bf(e17, t, n) { if (!Ce.isObject(e17)) throw new TypeError("target must be an object"); t = t || new FormData(), n = Ce.toFlatObject(n, { metaTokens: true, dots: false, indexes: false }, false, 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 === true ? xb([v], w, a) : i === null ? v : v + "[]", l(x) ); }), false; } return e0(p) ? true : (t.append(xb(m, v, a), l(p)), false); } const d = [], f = Object.assign(JB, { defaultVisitor: c, convertValue: l, isVisitable: e0 }); function h10(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 )) === true && h10(g, v ? v.concat(b) : [b]); }), d.pop(); } } if (!Ce.isObject(e17)) throw new TypeError("data must be an object"); return h10(e17), t; } function kb(e17) { const t = { "!": "%21", "'": "%27", "(": "%28", ")": "%29", "~": "%7E", "%20": "+", "%00": "\0" }; return encodeURIComponent(e17).replace(/[!'()~]|%20|%00/g, function(r) { return t[r]; }); } function Jg(e17, t) { this._pairs = [], e17 && Bf(e17, this, t); } var 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(e17) { return encodeURIComponent(e17).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]"); } function H3(e17, t, n) { if (!t) return e17; 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 = e17.indexOf("#"); i !== -1 && (e17 = e17.slice(0, i)), e17 += (e17.indexOf("?") === -1 ? "?" : "&") + a; } return e17; } var Cb = 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 : false, 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); }); } }; var U3 = { silentJSONParsing: true, forcedJSONParsing: true, clarifyTimeoutError: false }; var eM = typeof URLSearchParams < "u" ? URLSearchParams : Jg; var tM = typeof FormData < "u" ? FormData : null; var nM = typeof Blob < "u" ? Blob : null; var rM = { isBrowser: true, classes: { URLSearchParams: eM, FormData: tM, Blob: nM }, protocols: ["http", "https", "file", "blob", "url", "data"] }; var Qg = typeof window < "u" && typeof document < "u"; var oM = ((e17) => Qg && ["ReactNative", "NativeScript", "NS"].indexOf(e17) < 0)(typeof navigator < "u" && navigator.product); var aM = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef self instanceof WorkerGlobalScope && typeof self.importScripts == "function"; var iM = Qg && window.location.href || "http://localhost"; var sM = Object.freeze(Object.defineProperty({ __proto__: null, hasBrowserEnv: Qg, hasStandardBrowserEnv: oM, hasStandardBrowserWebWorkerEnv: aM, origin: iM }, Symbol.toStringTag, { value: "Module" })); var Oo = { ...sM, ...rM }; function lM(e17, t) { return Bf(e17, new Oo.classes.URLSearchParams(), Object.assign({ visitor: function(n, r, o, a) { return Oo.isNode && Ce.isBuffer(n) ? (this.append(r, n.toString("base64")), false) : a.defaultVisitor.apply(this, arguments); } }, t)); } function uM(e17) { return Ce.matchAll(/\w+|\[(\w*)]/g, e17).map((t) => t[0] === "[]" ? "" : t[1] || t[0]); } function cM(e17) { const t = {}, n = Object.keys(e17); let r; const o = n.length; let a; for (r = 0; r < o; r++) a = n[r], t[a] = e17[a]; return t; } function q3(e17) { function t(n, r, o, a) { let i = n[a++]; if (i === "__proto__") return true; 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(e17) && Ce.isFunction(e17.entries)) { const n = {}; return Ce.forEachEntry(e17, (r, o) => { t(uM(r), o, n, 0); }), n; } return null; } function dM(e17, t, n) { if (Ce.isString(e17)) try { return (t || JSON.parse)(e17), Ce.trim(e17); } catch (r) { if (r.name !== "SyntaxError") throw r; } return (0, JSON.stringify)(e17); } var 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", false), 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", false), 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"], (e17) => { Dc.headers[e17] = {}; }); var 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" ]); var fM = (e17) => { const t = {}; let n, r, o; return e17 && e17.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; }; var Eb = Symbol("internals"); function lu(e17) { return e17 && String(e17).trim().toLowerCase(); } function rp(e17) { return e17 === false || e17 == null ? e17 : Ce.isArray(e17) ? e17.map(rp) : String(e17); } function hM(e17) { const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g; let r; for (; r = n.exec(e17); ) t[r[1]] = r[2]; return t; } var vM = (e17) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e17.trim()); function Gh(e17, 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(e17) { return e17.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r); } function mM(e17, t) { const n = Ce.toCamelCase(" " + t); ["get", "set", "has"].forEach((r) => { Object.defineProperty(e17, r + n, { value: function(o, a, i) { return this[r].call(this, t, o, a, i); }, configurable: true }); }); } var Ar = class { 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 === true || l === void 0 && o[d] !== false) && (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 === true) 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 false; } delete(t, n) { const r = this; let o = false; 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 = true); } } return Ce.isArray(t) ? t.forEach(a) : a(t), o; } clear(t) { const n = Object.keys(this); let r = n.length, o = false; for (; r--; ) { const a = n[r]; (!t || Gh(this, this[a], a, t, true)) && (delete this[a], o = true); } 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] = true; }), 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 !== false && (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] = true); } 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: e17 }, t) => { let n = t[0].toUpperCase() + t.slice(1); return { get: () => e17, set(r) { this[n] = r; } }; }); Ce.freezeMethods(Ar); function Xh(e17, t) { const n = this || Dc, r = t || n, o = Ar.from(r.headers); let a = r.data; return Ce.forEach(e17, function(s) { a = s.call(n, a, o.normalize(), t ? t.status : void 0); }), o.normalize(), a; } function W3(e17) { return !!(e17 && e17.__CANCEL__); } function Ml(e17, t, n) { xt.call(this, e17 ?? "canceled", xt.ERR_CANCELED, t, n), this.name = "CanceledError"; } Ce.inherits(Ml, xt, { __CANCEL__: true }); function K3(e17, t, n) { const r = n.config.validateStatus; !n.status || !r || r(n.status) ? e17(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(e17) { const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e17); return t && t[1] || ""; } function bM(e17, t) { e17 = e17 || 10; const n = new Array(e17), r = new Array(e17); 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 % e17; if (o = (o + 1) % e17, o === a && (a = (a + 1) % e17), l - i < t) return; const h10 = c && l - c; return h10 ? Math.round(f * 1e3 / h10) : void 0; }; } function wM(e17, t) { let n = 0, r = 1e3 / t, o, a; const i = (l, c = Date.now()) => { n = c, o = null, a && (clearTimeout(a), a = null), e17.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)]; } var Fp = (e17, 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"]: true }; e17(d); }, n); }; var Sb = (e17, t) => { const n = e17 != null; return [(r) => t[0]({ lengthComputable: n, total: e17, loaded: r }), t[1]]; }; var _b = (e17) => (...t) => Ce.asap(() => e17(...t)); var 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 true; }; }() ); var kM = Oo.hasStandardBrowserEnv ? ( // Standard browser envs support document.cookie { write(e17, t, n, r, o, a) { const i = [e17 + "=" + 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 === true && i.push("secure"), document.cookie = i.join("; "); }, read(e17) { const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e17 + ")=([^;]*)")); return t ? decodeURIComponent(t[3]) : null; }, remove(e17) { this.write(e17, "", Date.now() - 864e5); } } ) : ( // Non-standard browser env (web workers, react-native) lack needed support. { write() { }, read() { return null; }, remove() { } } ); function CM(e17) { return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e17); } function EM(e17, t) { return t ? e17.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e17; } function G3(e17, t) { return e17 && !CM(t) ? EM(e17, t) : t; } var Tb = (e17) => e17 instanceof Ar ? { ...e17 } : e17; function us(e17, 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 e17) 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), true) }; return Ce.forEach(Object.keys(Object.assign({}, e17, t)), function(c) { const d = u[c] || o, f = d(e17[c], t[c], c); Ce.isUndefined(f) && d !== s || (n[c] = f); }), n; } var X3 = (e17) => { const t = us({}, e17); 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), e17.params, e17.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()) !== false) { 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 !== false && xM(t.url))) { const l = o && a && kM.read(a); l && i.set(o, l); } return t; }; var SM = typeof XMLHttpRequest < "u"; var _M = SM && function(e17) { return new Promise(function(n, r) { const o = X3(e17); let a = o.data; const i = Ar.from(o.headers).normalize(); let { responseType: s, onUploadProgress: u, onDownloadProgress: l } = o, c, d, f, h10, p; function v() { h10 && h10(), 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, true), 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: e17, 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, e17, m)), m = null); }, m.onerror = function() { r(new xt("Network Error", xt.ERR_NETWORK, e17, 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, e17, 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, true), m.addEventListener("progress", f)), u && m.upload && ([d, h10] = Fp(u), m.upload.addEventListener("progress", d), m.upload.addEventListener("loadend", h10)), (o.cancelToken || o.signal) && (c = (x) => { m && (r(!x || x.type ? new Ml(null, e17, 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, e17)); return; } m.send(a || null); }); }; var TM = (e17, t) => { let n = new AbortController(), r; const o = function(u) { if (!r) { r = true, 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 = () => { e17 && (a && clearTimeout(a), a = null, e17.forEach((u) => { u && (u.removeEventListener ? u.removeEventListener("abort", o) : u.unsubscribe(o)); }), e17 = null); }; e17.forEach((u) => u && u.addEventListener && u.addEventListener("abort", o)); const { signal: s } = n; return s.unsubscribe = i, [s, () => { a && clearTimeout(a), a = null; }]; }; var OM = function* (e17, t) { let n = e17.byteLength; if (n < t) { yield e17; return; } let r = 0, o; for (; r < n; ) o = r + t, yield e17.slice(r, o), r = o; }; var PM = async function* (e17, t, n) { for await (const r of e17) yield* OM(ArrayBuffer.isView(r) ? r : await n(String(r)), t); }; var Ob = (e17, t, n, r, o) => { const a = PM(e17, t, o); let i = 0, s, u = (l) => { s || (s = true, 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 h10 = i += f; n(h10); } l.enqueue(new Uint8Array(d)); } catch (c) { throw u(c), c; } }, cancel(l) { return u(l), a.return(); } }, { highWaterMark: 2 }); }; var Mf = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function"; var Y3 = Mf && typeof ReadableStream == "function"; var t0 = Mf && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e17) => (t) => e17.encode(t))(new TextEncoder()) : async (e17) => new Uint8Array(await new Response(e17).arrayBuffer())); var Z3 = (e17, ...t) => { try { return !!e17(...t); } catch { return false; } }; var $M = Y3 && Z3(() => { let e17 = false; const t = new Request(Oo.origin, { body: new ReadableStream(), method: "POST", get duplex() { return e17 = true, "half"; } }).headers.has("Content-Type"); return e17 && !t; }); var Pb = 64 * 1024; var n0 = Y3 && Z3(() => Ce.isReadableStream(new Response("").body)); var Ip = { stream: n0 && ((e17) => e17.body) }; Mf && ((e17) => { ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => { !Ip[t] && (Ip[t] = Ce.isFunction(e17[t]) ? (n) => n[t]() : (n, r) => { throw new xt(`Response type '${t}' is not supported`, xt.ERR_NOT_SUPPORT, r); }); }); })(new Response()); var AM = async (e17) => { if (e17 == null) return 0; if (Ce.isBlob(e17)) return e17.size; if (Ce.isSpecCompliantForm(e17)) return (await new Request(e17).arrayBuffer()).byteLength; if (Ce.isArrayBufferView(e17) || Ce.isArrayBuffer(e17)) return e17.byteLength; if (Ce.isURLSearchParams(e17) && (e17 = e17 + ""), Ce.isString(e17)) return (await t0(e17)).byteLength; }; var FM = async (e17, t) => { const n = Ce.toFiniteNumber(e17.getContentLength()); return n ?? AM(t); }; var IM = Mf && (async (e17) => { 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(e17); l = l ? (l + "").toLowerCase() : "text"; let [h10, p] = o || a || i ? TM([o, a], i) : [], v, m; const g = () => { !v && setTimeout(() => { h10 && h10.unsubscribe(); }), v = true; }; 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: h10, 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), true) ) || []; 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, e17); 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: e17, request: m }); }); } catch (x) { throw g(), x && x.name === "TypeError" && /fetch/i.test(x.message) ? Object.assign( new xt("Network Error", xt.ERR_NETWORK, e17, m), { cause: x.cause || x } ) : xt.from(x, x && x.code, e17, m); } }); var r0 = { http: YB, xhr: _M, fetch: IM }; Ce.forEach(r0, (e17, t) => { if (e17) { try { Object.defineProperty(e17, "name", { value: t }); } catch { } Object.defineProperty(e17, "adapterName", { value: t }); } }); var $b = (e17) => `- ${e17}`; var NM = (e17) => Ce.isFunction(e17) || e17 === null || e17 === false; var J3 = { getAdapter: (e17) => { e17 = Ce.isArray(e17) ? e17 : [e17]; const { length: t } = e17; let n, r; const o = {}; for (let a = 0; a < t; a++) { n = e17[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 === false ? "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(e17) { if (e17.cancelToken && e17.cancelToken.throwIfRequested(), e17.signal && e17.signal.aborted) throw new Ml(null, e17); } function Ab(e17) { return Yh(e17), e17.headers = Ar.from(e17.headers), e17.data = Xh.call( e17, e17.transformRequest ), ["post", "put", "patch"].indexOf(e17.method) !== -1 && e17.headers.setContentType("application/x-www-form-urlencoded", false), J3.getAdapter(e17.adapter || Dc.adapter)(e17).then(function(r) { return Yh(e17), r.data = Xh.call( e17, e17.transformResponse, r ), r.headers = Ar.from(r.headers), r; }, function(r) { return W3(r) || (Yh(e17), r && r.response && (r.response.data = Xh.call( e17, e17.transformResponse, r.response ), r.response.headers = Ar.from(r.response.headers))), Promise.reject(r); }); } var Q3 = "1.7.4"; var em = {}; ["object", "boolean", "number", "function", "string", "symbol"].forEach((e17, t) => { em[e17] = function(r) { return typeof r === e17 || "a" + (t < 1 ? "n " : " ") + e17; }; }); var 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 === false) throw new xt( o(i, " has been removed" + (n ? " in " + n : "")), xt.ERR_DEPRECATED ); return n && !Fb[i] && (Fb[i] = true, console.warn( o( i, " has been deprecated since v" + n + " and will be removed in the near future" ) )), t ? t(a, i, s) : true; }; }; function LM(e17, t, n) { if (typeof e17 != "object") throw new xt("options must be an object", xt.ERR_BAD_OPTION_VALUE); const r = Object.keys(e17); let o = r.length; for (; o-- > 0; ) { const a = r[o], i = t[a]; if (i) { const s = e17[a], u = s === void 0 || i(s, a, e17); if (u !== true) throw new xt("option " + a + " must be " + u, xt.ERR_BAD_OPTION_VALUE); continue; } if (n !== true) throw new xt("Unknown option " + a, xt.ERR_BAD_OPTION); } } var o0 = { assertOptions: LM, validators: em }; var Ma = o0.validators; var es = class { 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) }, false), o != null && (Ce.isFunction(o) ? n.paramsSerializer = { serialize: o } : o0.assertOptions(o, { encode: Ma.function, serialize: Ma.function }, true)), 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 = true; this.interceptors.request.forEach(function(v) { typeof v.runWhen == "function" && v.runWhen(n) === false || (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 h10 = n; for (d = 0; d < f; ) { const p = s[d++], v = s[d++]; try { h10 = p(h10); } catch (m) { v.call(this, m); break; } } try { c = Ab.call(this, h10); } 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(true); }); var tm = 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(e17) { return function(n) { return e17.apply(null, n); }; } function RM(e17) { return Ce.isObject(e17) && e17.isAxiosError === true; } var 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(([e17, t]) => { a0[t] = e17; }); function e5(e17) { const t = new es(e17), n = A3(es.prototype.request, t); return Ce.extend(n, es.prototype, t, { allOwnKeys: true }), Ce.extend(n, t, null, { allOwnKeys: true }), n.create = function(o) { return e5(us(e17, o)); }, n; } var 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 = (e17) => q3(Ce.isHTMLForm(e17) ? new FormData(e17) : e17); On.getAdapter = J3.getAdapter; On.HttpStatusCode = a0; On.default = On; var 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"; var 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(e17, t, n) { return await On({ method: "get", url: e17, 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(e17, t, n) { const r = encodeURIComponent(n); return `${e17}/${t}/files/${r}`; }, /** * Find data path in the array that matches the provide path */ findEntryWithPathInArray(e17, t) { if (t && e17) { for (let n = 0; n < e17.length; n++) if (t === e17[n].dataset.path) return e17[n]; } }, getThumbnailForPlot(e17, t) { if (t && e17) return this.findEntryWithPathInArray(t, e17.datacite.isSourceOf.path[0]); }, /** * Use the scaffoldViews to help with finding the correct thumbnails. * Use the index if the workflow stated above fails. */ getThumbnailForScaffold(e17, t, n, r) { if (n && n.length > 0) { let o; if (e17 && t) { const a = this.findEntryWithPathInArray(t, e17.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(e17, t) { let n = `${e17}/s3-resource/${t.datasetId}/${t.datasetVersion}/files/${t.file_path}?encodeBase64=true`; return t.s3Bucket && (n = n + `&s3BucketName=${t.s3Bucket}`), n; }, getSegmentationThumbnailURL(e17, t) { let n = `${e17}/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(e17, t) { return `${e17}/thumbnail/${t.id}`; }, getImageInfoFromBiolucida(e17, t, n) { const r = `${e17}/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(e17, t, n)), Promise.reject("Maximum iterations reached.")) ); } } }; var nm = (e17, t) => { const n = e17.__vccOpts || e17; for (const [r, o] of t) n[r] = o; return n; }; var zM = { class: "indicator-container" }; var VM = ["onClick"]; var jM = { __name: "IndexIndicator", props: { count: { type: Number, default: 0 }, current: { type: Number, default: 0 } }, emits: ["clicked"], setup(e17, { emit: t }) { const n = t; return (r, o) => (openBlock(), createElementBlock("div", zM, [ (openBlock(true), createElementBlock(Fragment, null, renderList(e17.count, (a, i) => (openBlock(), createElementBlock("div", { key: "indicator_" + a, class: normalizeClass(["indicator", { active: e17.current === i }]), onClick: (s) => n("clicked", i) }, null, 10, VM))), 128)) ])); } }; var HM = nm(jM, [["__scopeId", "data-v-afcfce15"]]); var ha = (e17, t, { checkForDefaultPrevented: n = true } = {}) => (r) => { const o = e17 == null ? void 0 : e17(r); if (n === false || !o) return t == null ? void 0 : t(r); }; var Ib; var Ur = typeof window < "u"; var UM = (e17) => typeof e17 == "string"; var t5 = () => { }; var qM = Ur && ((Ib = window == null ? void 0 : window.navigator) == null ? void 0 : Ib.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent); function n5(e17) { return typeof e17 == "function" ? e17() : unref(e17); } function WM(e17) { return e17; } function r5(e17) { return getCurrentScope() ? (onScopeDispose(e17), true) : false; } function Wi(e17) { var t; const n = n5(e17); return (t = n == null ? void 0 : n.$el) != null ? t : n; } var o5 = Ur ? window : void 0; function Zh(...e17) { let t, n, r, o; if (UM(e17[0]) || Array.isArray(e17[0]) ? ([n, r, o] = e17, t = o5) : [t, n, r, o] = e17, !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, h10) => (c.addEventListener(d, f, h10), () => c.removeEventListener(d, f, h10)), u = watch(() => [Wi(t), n5(o)], ([c, d]) => { i(), c && a.push(...n.flatMap((f) => r.map((h10) => s(c, f, h10, d)))); }, { immediate: true, flush: "post" }), l = () => { u(), i(); }; return r5(l), l; } var Nb = false; function KM(e17, t, n = {}) { const { window: r = o5, ignore: o = [], capture: a = true, detectIframe: i = false } = n; if (!r) return; qM && !Nb && (Nb = true, Array.from(r.document.body.children).forEach((c) => c.addEventListener("click", t5))); let s = true; 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(e17); if (!(!d || d === c.target || c.composedPath().includes(d))) { if (c.detail === 0 && (s = !u(c)), !s) { s = true; return; } t(c); } }, { passive: true, capture: a }), Zh(r, "pointerdown", (c) => { const d = Wi(e17); d && (s = !c.composedPath().includes(d) && !u(c)); }, { passive: true }), i && Zh(r, "blur", (c) => { var d; const f = Wi(e17); ((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()); } var Lb = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}; var Db = "__vueuse_ssr_handlers__"; Lb[Db] = Lb[Db] || {}; var Rb; (function(e17) { e17.UP = "UP", e17.RIGHT = "RIGHT", e17.DOWN = "DOWN", e17.LEFT = "LEFT", e17.NONE = "NONE"; })(Rb || (Rb = {})); var GM = Object.defineProperty; var Bb = Object.getOwnPropertySymbols; var XM = Object.prototype.hasOwnProperty; var YM = Object.prototype.propertyIsEnumerable; var Mb = (e17, t, n) => t in e17 ? GM(e17, t, { enumerable: true, configurable: true, writable: true, value: n }) : e17[t] = n; var ZM = (e17, t) => { for (var n in t || (t = {})) XM.call(t, n) && Mb(e17, n, t[n]); if (Bb) for (var n of Bb(t)) YM.call(t, n) && Mb(e17, n, t[n]); return e17; }; var 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); Object.freeze({}); Object.freeze([]); var Np = () => { }; var QM = Object.prototype.hasOwnProperty; var zb = (e17, t) => QM.call(e17, t); var e7 = Array.isArray; var Eu = (e17) => typeof e17 == "function"; var zl = (e17) => typeof e17 == "string"; var Rc = (e17) => e17 !== null && typeof e17 == "object"; var a5 = (e17) => { const t = /* @__PURE__ */ Object.create(null); return (n) => t[n] || (t[n] = e17(n)); }; var t7 = /-(\w)/g; var n7 = a5((e17) => e17.replace(t7, (t, n) => n ? n.toUpperCase() : "")); var r7 = /\B([A-Z])/g; var o7 = a5( (e17) => e17.replace(r7, "-$1").toLowerCase() ); var a7 = typeof global == "object" && global && global.Object === Object && global; var i7 = typeof self == "object" && self && self.Object === Object && self; var rm = a7 || i7 || Function("return this")(); var hi = rm.Symbol; var i5 = Object.prototype; var s7 = i5.hasOwnProperty; var l7 = i5.toString; var uu = hi ? hi.toStringTag : void 0; function u7(e17) { var t = s7.call(e17, uu), n = e17[uu]; try { e17[uu] = void 0; var r = true; } catch { } var o = l7.call(e17); return r && (t ? e17[uu] = n : delete e17[uu]), o; } var c7 = Object.prototype; var d7 = c7.toString; function p7(e17) { return d7.call(e17); } var f7 = "[object Null]"; var h7 = "[object Undefined]"; var Vb = hi ? hi.toStringTag : void 0; function om(e17) { return e17 == null ? e17 === void 0 ? h7 : f7 : Vb && Vb in Object(e17) ? u7(e17) : p7(e17); } function am(e17) { return e17 != null && typeof e17 == "object"; } var v7 = "[object Symbol]"; function im(e17) { return typeof e17 == "symbol" || am(e17) && om(e17) == v7; } function g7(e17, t) { for (var n = -1, r = e17 == null ? 0 : e17.length, o = Array(r); ++n < r; ) o[n] = t(e17[n], n, e17); return o; } var Bc = Array.isArray; var m7 = 1 / 0; var jb = hi ? hi.prototype : void 0; var Hb = jb ? jb.toString : void 0; function s5(e17) { if (typeof e17 == "string") return e17; if (Bc(e17)) return g7(e17, s5) + ""; if (im(e17)) return Hb ? Hb.call(e17) : ""; var t = e17 + ""; return t == "0" && 1 / e17 == -m7 ? "-0" : t; } function Lp(e17) { var t = typeof e17; return e17 != null && (t == "object" || t == "function"); } function y7(e17) { return e17; } var b7 = "[object AsyncFunction]"; var w7 = "[object Function]"; var x7 = "[object GeneratorFunction]"; var k7 = "[object Proxy]"; function C7(e17) { if (!Lp(e17)) return false; var t = om(e17); return t == w7 || t == x7 || t == b7 || t == k7; } var Jh = rm["__core-js_shared__"]; var Ub = function() { var e17 = /[^.]+$/.exec(Jh && Jh.keys && Jh.keys.IE_PROTO || ""); return e17 ? "Symbol(src)_1." + e17 : ""; }(); function E7(e17) { return !!Ub && Ub in e17; } var S7 = Function.prototype; var _7 = S7.toString; function T7(e17) { if (e17 != null) { try { return _7.call(e17); } catch { } try { return e17 + ""; } catch { } } return ""; } var O7 = /[\\^$.*+?()[\]{}|]/g; var P7 = /^\[object .+?Constructor\]$/; var $7 = Function.prototype; var A7 = Object.prototype; var F7 = $7.toString; var I7 = A7.hasOwnProperty; var N7 = RegExp( "^" + F7.call(I7).replace(O7, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$" ); function L7(e17) { if (!Lp(e17) || E7(e17)) return false; var t = C7(e17) ? N7 : P7; return t.test(T7(e17)); } function D7(e17, t) { return e17 == null ? void 0 : e17[t]; } function sm(e17, t) { var n = D7(e17, t); return L7(n) ? n : void 0; } function R7(e17, t, n) { switch (n.length) { case 0: return e17.call(t); case 1: return e17.call(t, n[0]); case 2: return e17.call(t, n[0], n[1]); case 3: return e17.call(t, n[0], n[1], n[2]); } return e17.apply(t, n); } var B7 = 800; var M7 = 16; var z7 = Date.now; function V7(e17) { 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 e17.apply(void 0, arguments); }; } function j7(e17) { return function() { return e17; }; } var Dp = function() { try { var e17 = sm(Object, "defineProperty"); return e17({}, "", {}), e17; } catch { } }(); var H7 = Dp ? function(e17, t) { return Dp(e17, "toString", { configurable: true, enumerable: false, value: j7(t), writable: true }); } : y7; var U7 = V7(H7); var q7 = 9007199254740991; var W7 = /^(?:0|[1-9]\d*)$/; function l5(e17, t) { var n = typeof e17; return t = t ?? q7, !!t && (n == "number" || n != "symbol" && W7.test(e17)) && e17 > -1 && e17 % 1 == 0 && e17 < t; } function K7(e17, t, n) { t == "__proto__" && Dp ? Dp(e17, t, { configurable: true, enumerable: true, value: n, writable: true }) : e17[t] = n; } function u5(e17, t) { return e17 === t || e17 !== e17 && t !== t; } var G7 = Object.prototype; var X7 = G7.hasOwnProperty; function Y7(e17, t, n) { var r = e17[t]; (!(X7.call(e17, t) && u5(r, n)) || n === void 0 && !(t in e17)) && K7(e17, t, n); } var qb = Math.max; function Z7(e17, t, n) { return t = qb(t === void 0 ? e17.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(e17, this, s); }; } var J7 = 9007199254740991; function Q7(e17) { return typeof e17 == "number" && e17 > -1 && e17 % 1 == 0 && e17 <= J7; } var ez = "[object Arguments]"; function Wb(e17) { return am(e17) && om(e17) == ez; } var c5 = Object.prototype; var tz = c5.hasOwnProperty; var nz = c5.propertyIsEnumerable; var d5 = Wb(/* @__PURE__ */ function() { return arguments; }()) ? Wb : function(e17) { return am(e17) && tz.call(e17, "callee") && !nz.call(e17, "callee"); }; var rz = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/; var oz = /^\w*$/; function az(e17, t) { if (Bc(e17)) return false; var n = typeof e17; return n == "number" || n == "symbol" || n == "boolean" || e17 == null || im(e17) ? true : oz.test(e17) || !rz.test(e17) || t != null && e17 in Object(t); } var ec = sm(Object, "create"); function iz() { this.__data__ = ec ? ec(null) : {}, this.size = 0; } function sz(e17) { var t = this.has(e17) && delete this.__data__[e17]; return this.size -= t ? 1 : 0, t; } var lz = "__lodash_hash_undefined__"; var uz = Object.prototype; var cz = uz.hasOwnProperty; function dz(e17) { var t = this.__data__; if (ec) { var n = t[e17]; return n === lz ? void 0 : n; } return cz.call(t, e17) ? t[e17] : void 0; } var pz = Object.prototype; var fz = pz.hasOwnProperty; function hz(e17) { var t = this.__data__; return ec ? t[e17] !== void 0 : fz.call(t, e17); } var vz = "__lodash_hash_undefined__"; function gz(e17, t) { var n = this.__data__; return this.size += this.has(e17) ? 0 : 1, n[e17] = ec && t === void 0 ? vz : t, this; } function cs(e17) { var t = -1, n = e17 == null ? 0 : e17.length; for (this.clear(); ++t < n; ) { var r = e17[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(e17, t) { for (var n = e17.length; n--; ) if (u5(e17[n][0], t)) return n; return -1; } var yz = Array.prototype; var bz = yz.splice; function wz(e17) { var t = this.__data__, n = zf(t, e17); if (n < 0) return false; var r = t.length - 1; return n == r ? t.pop() : bz.call(t, n, 1), --this.size, true; } function xz(e17) { var t = this.__data__, n = zf(t, e17); return n < 0 ? void 0 : t[n][1]; } function kz(e17) { return zf(this.__data__, e17) > -1; } function Cz(e17, t) { var n = this.__data__, r = zf(n, e17); return r < 0 ? (++this.size, n.push([e17, t])) : n[r][1] = t, this; } function Vl(e17) { var t = -1, n = e17 == null ? 0 : e17.length; for (this.clear(); ++t < n; ) { var r = e17[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(e17) { var t = typeof e17; return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e17 !== "__proto__" : e17 === null; } function Vf(e17, t) { var n = e17.__data__; return _z(t) ? n[typeof t == "string" ? "string" : "hash"] : n.map; } function Tz(e17) { var t = Vf(this, e17).delete(e17); return this.size -= t ? 1 : 0, t; } function Oz(e17) { return Vf(this, e17).get(e17); } function Pz(e17) { return Vf(this, e17).has(e17); } function $z(e17, t) { var n = Vf(this, e17), r = n.size; return n.set(e17, t), this.size += n.size == r ? 0 : 1, this; } function Ts(e17) { var t = -1, n = e17 == null ? 0 : e17.length; for (this.clear(); ++t < n; ) { var r = e17[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(e17, t) { if (typeof e17 != "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 = e17.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(e17) { var t = lm(e17, function(r) { return n.size === Fz && n.clear(), r; }), n = t.cache; return t; } var Nz = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; var Lz = /\\(\\)?/g; var Dz = Iz(function(e17) { var t = []; return e17.charCodeAt(0) === 46 && t.push(""), e17.replace(Nz, function(n, r, o, a) { t.push(o ? a.replace(Lz, "$1") : r || n); }), t; }); function Rz(e17) { return e17 == null ? "" : s5(e17); } function jf(e17, t) { return Bc(e17) ? e17 : az(e17, t) ? [e17] : Dz(Rz(e17)); } var Bz = 1 / 0; function um(e17) { if (typeof e17 == "string" || im(e17)) return e17; var t = e17 + ""; return t == "0" && 1 / e17 == -Bz ? "-0" : t; } function p5(e17, t) { t = jf(t, e17); for (var n = 0, r = t.length; e17 != null && n < r; ) e17 = e17[um(t[n++])]; return n && n == r ? e17 : void 0; } function Mz(e17, t, n) { var r = e17 == null ? void 0 : p5(e17, t); return r === void 0 ? n : r; } function zz(e17, t) { for (var n = -1, r = t.length, o = e17.length; ++n < r; ) e17[o + n] = t[n]; return e17; } var Kb = hi ? hi.isConcatSpreadable : void 0; function Vz(e17) { return Bc(e17) || d5(e17) || !!(Kb && e17 && e17[Kb]); } function jz(e17, t, n, r, o) { var a = -1, i = e17.length; for (n || (n = Vz), o || (o = []); ++a < i; ) { var s = e17[a]; n(s) ? zz(o, s) : o[o.length] = s; } return o; } function Hz(e17) { var t = e17 == null ? 0 : e17.length; return t ? jz(e17) : []; } function Uz(e17) { return U7(Z7(e17, void 0, Hz), e17 + ""); } function qz(e17, t) { return e17 != null && t in Object(e17); } function Wz(e17, t, n) { t = jf(t, e17); for (var r = -1, o = t.length, a = false; ++r < o; ) { var i = um(t[r]); if (!(a = e17 != null && n(e17, i))) break; e17 = e17[i]; } return a || ++r != o ? a : (o = e17 == null ? 0 : e17.length, !!o && Q7(o) && l5(i, o) && (Bc(e17) || d5(e17))); } function Kz(e17, t) { return e17 != null && Wz(e17, t, qz); } function i0(e17) { for (var t = -1, n = e17 == null ? 0 : e17.length, r = {}; ++t < n; ) { var o = e17[t]; r[o[0]] = o[1]; } return r; } function cm(e17) { return e17 == null; } function Gz(e17) { return e17 === void 0; } function Xz(e17, t, n, r) { if (!Lp(e17)) return e17; t = jf(t, e17); for (var o = -1, a = t.length, i = a - 1, s = e17; s != null && ++o < a; ) { var u = um(t[o]), l = n; if (u === "__proto__" || u === "constructor" || u === "prototype") return e17; 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 e17; } function Yz(e17, t, n) { for (var r = -1, o = t.length, a = {}; ++r < o; ) { var i = t[r], s = p5(e17, i); n(s, i) && Xz(a, jf(i, e17), s); } return a; } function Zz(e17, t) { return Yz(e17, t, function(n, r) { return Kz(e17, r); }); } var Jz = Uz(function(e17, t) { return e17 == null ? {} : Zz(e17, t); }); var Qz = (e17) => e17 === void 0; var dm = (e17) => typeof e17 == "boolean"; var tc = (e17) => typeof e17 == "number"; var Lu = (e17) => typeof Element > "u" ? false : e17 instanceof Element; var eV = (e17) => zl(e17) ? !Number.isNaN(Number(e17)) : false; var Gb = (e17) => Object.keys(e17); var tV = class extends Error { constructor(t) { super(t), this.name = "ElementPlusError"; } }; function ds(e17, t) { if (true) { const n = zl(e17) ? new tV(`[${e17}] ${t}`) : e17; console.warn(n); } } var nV = "utils/dom/style"; var f5 = (e17 = "") => e17.split(" ").filter((t) => !!t.trim()); var Xb = (e17, t) => { !e17 || !t.trim() || e17.classList.add(...f5(t)); }; var Rp = (e17, t) => { !e17 || !t.trim() || e17.classList.remove(...f5(t)); }; var cu = (e17, t) => { var n; if (!Ur || !e17 || !t) return ""; let r = n7(t); r === "float" && (r = "cssFloat"); try { const o = e17.style[r]; if (o) return o; const a = (n = document.defaultView) == null ? void 0 : n.getComputedStyle(e17, ""); return a ? a[r] : ""; } catch { return e17.style[r]; } }; function h5(e17, t = "px") { if (!e17) return ""; if (tc(e17) || eV(e17)) return `${e17}${t}`; if (zl(e17)) return e17; ds(nV, "binding value must be a string or number"); } var rV = defineComponent({ name: "Loading", __name: "loading", setup(e17) { return (t, n) => (openBlock(), createElementBlock("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ createBaseVNode("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" }) ])); } }); var oV = rV; var v5 = "__epPropKey"; var Ot = (e17) => e17; var aV = (e17) => Rc(e17) && !!e17[v5]; var Hf = (e17, t) => { if (!Rc(e17) || aV(e17)) return e17; const { values: n, required: r, default: o, type: a, validator: i } = e17, s = { type: a, required: !!r, validator: n || i ? (u) => { let l = false, c = []; if (n && (c = Array.from(n), zb(e17, "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(", "); warn(`Invalid prop: validation failed${t ? ` for prop "${t}"` : ""}. Expected one of [${d}], got value ${JSON.stringify(u)}.`); } return l; } : void 0, [v5]: true }; return zb(e17, "default") && (s.default = o), s; }; var Rn = (e17) => i0(Object.entries(e17).map(([t, n]) => [ t, Hf(n, t) ])); var s0 = Ot([ String, Object, Function ]); var Os = (e17, t) => { if (e17.install = (n) => { for (const r of [e17, ...Object.values(t ?? {})]) n.component(r.name, r); }, t) for (const [n, r] of Object.entries(t)) e17[n] = r; return e17; }; var iV = (e17, t) => (e17.install = (n) => { n.directive(t, e17); }, e17); var sV = (e17) => (e17.install = Np, e17); var 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" }; var lV = ["", "default", "small", "large"]; var uV = ({ from: e17, replacement: t, scope: n, version: r, ref: o, type: a = "API" }, i) => { watch(() => unref(i), (s) => { s && ds(n, `[${a}] ${e17} is about to be deprecated in version ${r}, please use ${t} instead. For more detail, please visit: ${o} `); }, { immediate: true }); }; 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}" } } }; var dV = (e17) => (t, n) => pV(t, n, unref(e17)); var pV = (e17, t, n) => Mz(n, e17, e17).replace(/\{(\w+)\}/g, (r, o) => { var a; return `${(a = t == null ? void 0 : t[o]) != null ? a : `{${o}}`}`; }); var fV = (e17) => { const t = computed(() => unref(e17).name), n = isRef(e17) ? e17 : ref(e17); return { lang: t, locale: n, t: dV(e17) }; }; var g5 = Symbol("localeContextKey"); var hV = (e17) => { const t = e17 || inject(g5, ref()); return fV(computed(() => t.value || cV)); }; var op = "el"; var vV = "is-"; var Di = (e17, t, n, r, o) => { let a = `${e17}-${t}`; return n && (a += `-${n}`), r && (a += `__${r}`), o && (a += `--${o}`), a; }; var m5 = Symbol("namespaceContextKey"); var pm = (e17) => { const t = e17 || (getCurrentInstance() ? inject(m5, ref(op)) : ref(op)); return computed(() => unref(t) || op); }; var mo = (e17, t) => { const n = pm(t); return { namespace: n, b: (r = "") => Di(n.value, e17, r, "", ""), e: (r) => r ? Di(n.value, e17, "", r, "") : "", m: (r) => r ? Di(n.value, e17, "", "", r) : "", be: (r, o) => r && o ? Di(n.value, e17, r, o, "") : "", em: (r, o) => r && o ? Di(n.value, e17, "", r, o) : "", bm: (r, o) => r && o ? Di(n.value, e17, r, "", o) : "", bem: (r, o, a) => r && o && a ? Di(n.value, e17, r, o, a) : "", is: (r, ...o) => { const a = o.length >= 1 ? o[0] : true; 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}-${e17}-${a}`] = r[a]); return o; }, cssVarBlockName: (r) => `--${n.value}-${e17}-${r}` }; }; var gV = Hf({ type: Ot(Boolean), default: null }); var mV = Hf({ type: Ot(Function) }); var yV = (e17) => { const t = `update:${e17}`, n = `onUpdate:${e17}`, r = [t], o = { [e17]: gV, [n]: mV }; return { useModelToggle: ({ indicator: a, toggleReason: i, shouldHideWhenRouteChanges: s, shouldProceed: u, onShow: l, onHide: c }) => { const d = getCurrentInstance(), { emit: f } = d, h10 = d.props, p = computed(() => Eu(h10[n])), v = computed(() => h10[e17] === null), m = (k) => { a.value !== true && (a.value = true, i && (i.value = k), Eu(l) && l(k)); }, g = (k) => { a.value !== false && (a.value = false, i && (i.value = k), Eu(c) && c(k)); }, b = (k) => { if (h10.disabled === true || Eu(u) && !u()) return; const E = p.value && Ur; E && f(t, true), (v.value || !E) && m(k); }, x = (k) => { if (h10.disabled === true || !Ur) return; const E = p.value && Ur; E && f(t, false), (v.value || !E) && g(k); }, w = (k) => { dm(k) && (h10.disabled && k ? p.value && f(t, false) : a.value !== k && (k ? m() : g())); }, C = () => { a.value ? x() : b(); }; return watch(() => h10[e17], w), s && d.appContext.config.globalProperties.$route !== void 0 && watch(() => ({ ...d.proxy.$route }), () => { s.value && a.value && x(); }), onMounted(() => { w(h10[e17]); }), { hide: x, show: b, toggle: C, hasUpdateHandler: p }; }, useModelToggleProps: o, useModelToggleEmits: r }; }; var y5 = (e17) => { const t = getCurrentInstance(); return computed(() => { var n, r; return (r = (n = t == null ? void 0 : t.proxy) == null ? void 0 : n.$props) == null ? void 0 : r[e17]; }); }; var Fr = "top"; var uo = "bottom"; var co = "right"; var Ir = "left"; var fm = "auto"; var Mc = [Fr, uo, co, Ir]; var yl = "start"; var nc = "end"; var bV = "clippingParents"; var b5 = "viewport"; var du = "popper"; var wV = "reference"; var Yb = Mc.reduce(function(e17, t) { return e17.concat([t + "-" + yl, t + "-" + nc]); }, []); var hm = [].concat(Mc, [fm]).reduce(function(e17, t) { return e17.concat([t, t + "-" + yl, t + "-" + nc]); }, []); var xV = "beforeRead"; var kV = "read"; var CV = "afterRead"; var EV = "beforeMain"; var SV = "main"; var _V = "afterMain"; var TV = "beforeWrite"; var OV = "write"; var PV = "afterWrite"; var $V = [xV, kV, CV, EV, SV, _V, TV, OV, PV]; function na(e17) { return e17 ? (e17.nodeName || "").toLowerCase() : null; } function Ro(e17) { if (e17 == null) return window; if (e17.toString() !== "[object Window]") { var t = e17.ownerDocument; return t && t.defaultView || window; } return e17; } function bl(e17) { var t = Ro(e17).Element; return e17 instanceof t || e17 instanceof Element; } function no(e17) { var t = Ro(e17).HTMLElement; return e17 instanceof t || e17 instanceof HTMLElement; } function vm(e17) { if (typeof ShadowRoot > "u") return false; var t = Ro(e17).ShadowRoot; return e17 instanceof t || e17 instanceof ShadowRoot; } function AV(e17) { var t = e17.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 === false ? a.removeAttribute(i) : a.setAttribute(i, s === true ? "" : s); })); }); } function FV(e17) { var t = e17.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: true, phase: "write", fn: AV, effect: FV, requires: ["computeStyles"] }; function Jo(e17) { return e17.split("-")[0]; } var ts = Math.max; var Mp = Math.min; var wl = Math.round; function xl(e17, t) { t === void 0 && (t = false); var n = e17.getBoundingClientRect(), r = 1, o = 1; if (no(e17) && t) { var a = e17.offsetHeight, i = e17.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(e17) { var t = xl(e17), n = e17.offsetWidth, r = e17.offsetHeight; return Math.abs(t.width - n) <= 1 && (n = t.width), Math.abs(t.height - r) <= 1 && (r = t.height), { x: e17.offsetLeft, y: e17.offsetTop, width: n, height: r }; } function x5(e17, t) { var n = t.getRootNode && t.getRootNode(); if (e17.contains(t)) return true; if (n && vm(n)) { var r = t; do { if (r && e17.isSameNode(r)) return true; r = r.parentNode || r.host; } while (r); } return false; } function Ea(e17) { return Ro(e17).getComputedStyle(e17); } function IV(e17) { return ["table", "td", "th"].indexOf(na(e17)) >= 0; } function Ti(e17) { return ((bl(e17) ? e17.ownerDocument : e17.document) || window.document).documentElement; } function Uf(e17) { return na(e17) === "html" ? e17 : e17.assignedSlot || e17.parentNode || (vm(e17) ? e17.host : null) || Ti(e17); } function Zb(e17) { return !no(e17) || Ea(e17).position === "fixed" ? null : e17.offsetParent; } function NV(e17) { var t = navigator.userAgent.toLowerCase().indexOf("firefox") !== -1, n = navigator.userAgent.indexOf("Trident") !== -1; if (n && no(e17)) { var r = Ea(e17); if (r.position === "fixed") return null; } var o = Uf(e17); 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(e17) { for (var t = Ro(e17), n = Zb(e17); 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(e17) || t; } function mm(e17) { return ["top", "bottom"].indexOf(e17) >= 0 ? "x" : "y"; } function Du(e17, t, n) { return ts(e17, Mp(t, n)); } function LV(e17, t, n) { var r = Du(e17, t, n); return r > n ? n : r; } function k5() { return { top: 0, right: 0, bottom: 0, left: 0 }; } function C5(e17) { return Object.assign({}, k5(), e17); } function E5(e17, t) { return t.reduce(function(n, r) { return n[r] = e17, n; }, {}); } var DV = function(e17, t) { return e17 = typeof e17 == "function" ? e17(Object.assign({}, t.rects, { placement: t.placement })) : e17, C5(typeof e17 != "number" ? e17 : E5(e17, Mc)); }; function RV(e17) { var t, n = e17.state, r = e17.name, o = e17.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), h10 = 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[h10], 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(e17) { var t = e17.state, n = e17.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: true, phase: "main", fn: RV, effect: BV, requires: ["popperOffsets"], requiresIfExists: ["preventOverflow"] }; function kl(e17) { return e17.split("-")[1]; } var zV = { top: "auto", right: "auto", bottom: "auto", left: "auto" }; function VV(e17) { var t = e17.x, n = e17.y, r = window, o = r.devicePixelRatio || 1; return { x: wl(t * o) / o || 0, y: wl(n * o) / o || 0 }; } function Jb(e17) { var t, n = e17.popper, r = e17.popperRect, o = e17.placement, a = e17.variation, i = e17.offsets, s = e17.position, u = e17.gpuAcceleration, l = e17.adaptive, c = e17.roundOffsets, d = e17.isFixed, f = i.x, h10 = f === void 0 ? 0 : f, p = i.y, v = p === void 0 ? 0 : p, m = typeof c == "function" ? c({ x: h10, y: v }) : { x: h10, y: v }; h10 = 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]; h10 -= F - r.width, h10 *= u ? 1 : -1; } } var $ = Object.assign({ position: s }, l && zV), A = c === true ? VV({ x: h10, y: v }) : { x: h10, y: v }; if (h10 = 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(" + h10 + "px, " + v + "px)" : "translate3d(" + h10 + "px, " + v + "px, 0)", L)); } return Object.assign({}, $, (t = {}, t[w] = b ? v + "px" : "", t[x] = g ? h10 + "px" : "", t.transform = "", t)); } function jV(e17) { var t = e17.state, n = e17.options, r = n.gpuAcceleration, o = r === void 0 ? true : r, a = n.adaptive, i = a === void 0 ? true : a, s = n.roundOffsets, u = s === void 0 ? true : 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: false, roundOffsets: u })))), t.attributes.popper = Object.assign({}, t.attributes.popper, { "data-popper-placement": t.placement }); } var S5 = { name: "computeStyles", enabled: true, phase: "beforeWrite", fn: jV, data: {} }; var xd = { passive: true }; function HV(e17) { var t = e17.state, n = e17.instance, r = e17.options, o = r.scroll, a = o === void 0 ? true : o, i = r.resize, s = i === void 0 ? true : 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: true, phase: "write", fn: function() { }, effect: HV, data: {} }; var UV = { left: "right", right: "left", bottom: "top", top: "bottom" }; function ap(e17) { return e17.replace(/left|right|bottom|top/g, function(t) { return UV[t]; }); } var qV = { start: "end", end: "start" }; function Qb(e17) { return e17.replace(/start|end/g, function(t) { return qV[t]; }); } function ym(e17) { var t = Ro(e17), n = t.pageXOffset, r = t.pageYOffset; return { scrollLeft: n, scrollTop: r }; } function bm(e17) { return xl(Ti(e17)).left + ym(e17).scrollLeft; } function WV(e17) { var t = Ro(e17), n = Ti(e17), 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(e17), y: s }; } function KV(e17) { var t, n = Ti(e17), r = ym(e17), o = (t = e17.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(e17), 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(e17) { var t = Ea(e17), n = t.overflow, r = t.overflowX, o = t.overflowY; return /auto|scroll|overlay|hidden/.test(n + o + r); } function T5(e17) { return ["html", "body", "#document"].indexOf(na(e17)) >= 0 ? e17.ownerDocument.body : no(e17) && wm(e17) ? e17 : T5(Uf(e17)); } function Ru(e17, t) { var n; t === void 0 && (t = []); var r = T5(e17), o = r === ((n = e17.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(e17) { return Object.assign({}, e17, { left: e17.x, top: e17.y, right: e17.x + e17.width, bottom: e17.y + e17.height }); } function GV(e17) { var t = xl(e17); return t.top = t.top + e17.clientTop, t.left = t.left + e17.clientLeft, t.bottom = t.top + e17.clientHeight, t.right = t.left + e17.clientWidth, t.width = e17.clientWidth, t.height = e17.clientHeight, t.x = t.left, t.y = t.top, t; } function e2(e17, t) { return t === b5 ? l0(WV(e17)) : bl(t) ? GV(t) : l0(KV(Ti(e17))); } function XV(e17) { var t = Ru(Uf(e17)), n = ["absolute", "fixed"].indexOf(Ea(e17).position) >= 0, r = n && no(e17) ? zc(e17) : e17; return bl(r) ? t.filter(function(o) { return bl(o) && x5(o, r) && na(o) !== "body"; }) : []; } function YV(e17, t, n) { var r = t === "clippingParents" ? XV(e17) : [].concat(t), o = [].concat(r, [n]), a = o[0], i = o.reduce(function(s, u) { var l = e2(e17, 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(e17, 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(e17) { var t = e17.reference, n = e17.element, r = e17.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(e17, t) { t === void 0 && (t = {}); var n = t, r = n.placement, o = r === void 0 ? e17.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 ? false : d, h10 = n.padding, p = h10 === void 0 ? 0 : h10, v = C5(typeof p != "number" ? p : E5(p, Mc)), m = c === du ? wV : du, g = e17.rects.popper, b = e17.elements[f ? m : c], x = YV(bl(b) ? b : b.contextElement || Ti(e17.elements.popper), i, u), w = xl(e17.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 = e17.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(e17, 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 h10 = f.reduce(function(p, v) { return p[v] = rc(e17, { placement: v, boundary: o, rootBoundary: a, padding: i })[Jo(v)], p; }, {}); return Object.keys(h10).sort(function(p, v) { return h10[p] - h10[v]; }); } function JV(e17) { if (Jo(e17) === fm) return []; var t = ap(e17); return [Qb(e17), t, Qb(t)]; } function QV(e17) { var t = e17.state, n = e17.options, r = e17.name; if (!t.modifiersData[r]._skip) { for (var o = n.mainAxis, a = o === void 0 ? true : o, i = n.altAxis, s = i === void 0 ? true : i, u = n.fallbackPlacements, l = n.padding, c = n.boundary, d = n.rootBoundary, f = n.altBoundary, h10 = n.flipVariations, p = h10 === void 0 ? true : h10, 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 = true, 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), W = []; if (a && W.push(I[A] <= 0), s && W.push(I[z] <= 0, I[R] <= 0), W.every(function(we) { return we; })) { O = $, S = false; break; } E.set($, W); } 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 = true, t.placement = O, t.reset = true); } } var ej = { name: "flip", enabled: true, phase: "main", fn: QV, requiresIfExists: ["offset"], data: { _skip: false } }; function t2(e17, t, n) { return n === void 0 && (n = { x: 0, y: 0 }), { top: e17.top - t.height - n.y, right: e17.right - t.width + n.x, bottom: e17.bottom - t.height + n.y, left: e17.left - t.width - n.x }; } function n2(e17) { return [Fr, co, uo, Ir].some(function(t) { return e17[t] >= 0; }); } function tj(e17) { var t = e17.state, n = e17.name, r = t.rects.reference, o = t.rects.popper, a = t.modifiersData.preventOverflow, i = rc(t, { elementContext: "reference" }), s = rc(t, { altBoundary: true }), 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: true, phase: "main", requiresIfExists: ["preventOverflow"], fn: tj }; function rj(e17, t, n) { var r = Jo(e17), o = [Ir, Fr].indexOf(r) >= 0 ? -1 : 1, a = typeof n == "function" ? n(Object.assign({}, t, { placement: e17 })) : 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(e17) { var t = e17.state, n = e17.options, r = e17.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: true, phase: "main", requires: ["popperOffsets"], fn: oj }; function ij(e17) { var t = e17.state, n = e17.name; t.modifiersData[n] = O5({ reference: t.rects.reference, element: t.rects.popper, strategy: "absolute", placement: t.placement }); } var P5 = { name: "popperOffsets", enabled: true, phase: "read", fn: ij, data: {} }; function sj(e17) { return e17 === "x" ? "y" : "x"; } function lj(e17) { var t = e17.state, n = e17.options, r = e17.name, o = n.mainAxis, a = o === void 0 ? true : o, i = n.altAxis, s = i === void 0 ? false : i, u = n.boundary, l = n.rootBoundary, c = n.altBoundary, d = n.padding, f = n.tether, h10 = f === void 0 ? true : 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], W = z - m[M], oe = h10 ? -S[I] / 2 : 0, Q = b === yl ? E[I] : S[I], ae = b === yl ? -S[I] : -E[I], pe = t.elements.arrow, we = h10 && 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(h10 ? Mp(R, _e) : R, z, h10 ? ts(W, De) : W); 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 = h10 && P ? LV(se, Me, ce) : Du(h10 ? se : nt, Me, h10 ? ce : st); k[C] = de, A[C] = de - Me; } t.modifiersData[r] = A; } } var uj = { name: "preventOverflow", enabled: true, phase: "main", fn: lj, requiresIfExists: ["offset"] }; function cj(e17) { return { scrollLeft: e17.scrollLeft, scrollTop: e17.scrollTop }; } function dj(e17) { return e17 === Ro(e17) || !no(e17) ? ym(e17) : cj(e17); } function pj(e17) { var t = e17.getBoundingClientRect(), n = wl(t.width) / e17.offsetWidth || 1, r = wl(t.height) / e17.offsetHeight || 1; return n !== 1 || r !== 1; } function fj(e17, t, n) { n === void 0 && (n = false); var r = no(t), o = no(t) && pj(t), a = Ti(t), i = xl(e17, 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, true), 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(e17) { var t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set(), r = []; e17.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 e17.forEach(function(a) { n.has(a.name) || o(a); }), r; } function vj(e17) { var t = hj(e17); return $V.reduce(function(n, r) { return n.concat(t.filter(function(o) { return o.phase === r; })); }, []); } function gj(e17) { var t; return function() { return t || (t = new Promise(function(n) { Promise.resolve().then(function() { t = void 0, n(e17()); }); })), t; }; } function mj(e17) { var t = e17.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 e17 = arguments.length, t = new Array(e17), n = 0; n < e17; n++) t[n] = arguments[n]; return !t.some(function(r) { return !(r && typeof r.getBoundingClientRect == "function"); }); } function xm(e17) { e17 === void 0 && (e17 = {}); var t = e17, 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 = false, 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; }), h10(), 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 = false, 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 === true) { l.reset = false, 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 = true; } }; if (!o2(i, s)) return f; f.setOptions(u).then(function(v) { !d && u.onFirstUpdate && u.onFirstUpdate(v); }); function h10() { 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]; var wj = xm({ defaultModifiers: bj }); var xj = (e17, t, n = {}) => { const r = { name: "updateState", enabled: true, phase: "write", fn: ({ state: u }) => { const l = kj(u); Object.assign(i.value, l); }, requires: ["computeStyles"] }, o = computed(() => { const { onFirstUpdate: u, placement: l, strategy: c, modifiers: d } = unref(n); return { onFirstUpdate: u, placement: l || "bottom", strategy: c || "absolute", modifiers: [ ...d || [], r, { name: "applyStyles", enabled: false } ] }; }), a = shallowRef(), i = ref({ styles: { popper: { position: unref(o).strategy, left: "0", top: "0" }, arrow: { position: "absolute" } }, attributes: {} }), s = () => { a.value && (a.value.destroy(), a.value = void 0); }; return watch(o, (u) => { const l = unref(a); l && l.setOptions(u); }, { deep: true }), watch([e17, t], ([u, l]) => { s(), !(!u || !l) && (a.value = wj(u, l, unref(o))); }), onBeforeUnmount(() => { s(); }), { state: computed(() => { var u; return { ...((u = unref(a)) == null ? void 0 : u.state) || {} }; }), styles: computed(() => unref(i).styles), attributes: computed(() => unref(i).attributes), update: () => { var u; return (u = unref(a)) == null ? void 0 : u.update(); }, forceUpdate: () => { var u; return (u = unref(a)) == null ? void 0 : u.forceUpdate(); }, instanceRef: computed(() => unref(a)) }; }; function kj(e17) { const t = Object.keys(e17.elements), n = i0(t.map((o) => [o, e17.styles[o] || {}])), r = i0(t.map((o) => [o, e17.attributes[o]])); return { styles: n, attributes: r }; } function a2() { let e17; const t = (r, o) => { n(), e17 = window.setTimeout(r, o); }, n = () => window.clearTimeout(e17); return r5(() => n()), { registerTimeout: t, cancelTimeout: n }; } var u0 = { prefix: Math.floor(Math.random() * 1e4), current: 0 }; var Cj = Symbol("elIdInjection"); var $5 = () => getCurrentInstance() ? inject(Cj, u0) : u0; var Ej = (e17) => { 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 computed(() => unref(e17) || `${n.value}-id-${t.prefix}-${t.current++}`); }; var Zs = []; var i2 = (e17) => { const t = e17; t.key === Bp.esc && Zs.forEach((n) => n(t)); }; var Sj = (e17) => { onMounted(() => { Zs.length === 0 && document.addEventListener("keydown", i2), Ur && Zs.push(e17); }), onBeforeUnmount(() => { Zs = Zs.filter((t) => t !== e17), Zs.length === 0 && Ur && document.removeEventListener("keydown", i2); }); }; var s2; var A5 = () => { const e17 = pm(), t = $5(), n = computed(() => `${e17.value}-popper-container-${t.prefix}`), r = computed(() => `#${n.value}`); return { id: n, selector: r }; }; var _j = (e17) => { const t = document.createElement("div"); return t.id = e17, document.body.appendChild(t), t; }; var Tj = () => { const { id: e17, selector: t } = A5(); return onBeforeMount(() => { Ur && (!s2 || !document.body.querySelector(t.value)) && (s2 = _j(e17.value)); }), { id: e17, selector: t }; }; var Oj = Rn({ showAfter: { type: Number, default: 0 }, hideAfter: { type: Number, default: 200 }, autoClose: { type: Number, default: 0 } }); var Pj = ({ showAfter: e17, 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 = unref(n); tc(l) && l > 0 && i(() => { o(u); }, l); }, unref(e17)); }, onClose: (u) => { s(), a(() => { o(u); }, unref(t)); } }; }; var F5 = Symbol("elForwardRef"); var $j = (e17) => { provide(F5, { setForwardRef: (t) => { e17.value = t; } }); }; var Aj = (e17) => ({ mounted(t) { e17(t); }, updated(t) { e17(t); }, unmounted() { e17(null); } }); var l2 = { current: 0 }; var u2 = ref(0); var I5 = 2e3; var c2 = Symbol("elZIndexContextKey"); var N5 = Symbol("zIndexContextKey"); var L5 = (e17) => { const t = getCurrentInstance() ? inject(c2, l2) : l2, n = e17 || (getCurrentInstance() ? inject(N5, void 0) : void 0), r = computed(() => { const i = unref(n); return tc(i) ? i : I5; }), o = computed(() => r.value + u2.value), a = () => (t.current++, u2.value = t.current, o.value); return !Ur && !inject(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 }; }; var Fj = Hf({ type: String, values: lV, required: false }); var D5 = Symbol("size"); var Ij = () => { const e17 = inject(D5, {}); return computed(() => unref(e17.size) || ""); }; var Nj = Symbol("emptyValuesContextKey"); Rn({ emptyValues: Array, valueOnClear: { type: [String, Number, Boolean, Function], default: void 0, validator: (e17) => Eu(e17) ? !e17() : !e17 } }); var Lj = Rn({ ariaLabel: String, ariaOrientation: { type: String, values: ["horizontal", "vertical", "undefined"] }, ariaControls: String }); var R5 = (e17) => Jz(Lj, e17); var B5 = Symbol(); var zp = ref(); function km(e17, t = void 0) { const n = getCurrentInstance() ? inject(B5, zp) : zp; return e17 ? computed(() => { var r, o; return (o = (r = n.value) == null ? void 0 : r[e17]) != null ? o : t; }) : n; } function Dj(e17, t) { const n = km(), r = mo(e17, computed(() => { var s; return ((s = n.value) == null ? void 0 : s.namespace) || op; })), o = hV(computed(() => { var s; return (s = n.value) == null ? void 0 : s.locale; })), a = L5(computed(() => { var s; return ((s = n.value) == null ? void 0 : s.zIndex) || I5; })), i = computed(() => { var s; return unref(t) || ((s = n.value) == null ? void 0 : s.size) || ""; }); return Rj(computed(() => unref(n) || {})), { ns: r, locale: o, zIndex: a, size: i }; } var Rj = (e17, t, n = false) => { var r; const o = !!getCurrentInstance(), a = o ? km() : void 0, i = (r = void 0) != null ? r : o ? provide : void 0; if (!i) { ds("provideGlobalConfig", "provideGlobalConfig() can only be used inside setup()."); return; } const s = computed(() => { const u = unref(e17); return a != null && a.value ? Bj(a.value, u) : u; }); return i(B5, s), i(g5, computed(() => s.value.locale)), i(m5, computed(() => s.value.namespace)), i(N5, computed(() => s.value.zIndex)), i(D5, { size: computed(() => s.value.size || "") }), i(Nj, computed(() => ({ emptyValues: s.value.emptyValues, valueOnClear: s.value.valueOnClear }))), (n || !zp.value) && (zp.value = s.value), s; }; var Bj = (e17, t) => { const n = [.../* @__PURE__ */ new Set([...Gb(e17), ...Gb(t)])], r = {}; for (const o of n) r[o] = t[o] !== void 0 ? t[o] : e17[o]; return r; }; var fr = (e17, t) => { const n = e17.__vccOpts || e17; for (const [r, o] of t) n[r] = o; return n; }; var Mj = Rn({ size: { type: Ot([Number, String]) }, color: { type: String } }); var zj = defineComponent({ name: "ElIcon", inheritAttrs: false }); var Vj = defineComponent({ ...zj, props: Mj, setup(e17) { const t = e17, n = mo("icon"), r = computed(() => { const { size: o, color: a } = t; return !o && !a ? {} : { fontSize: Qz(o) ? void 0 : h5(o), "--color": a }; }); return (o, a) => (openBlock(), createElementBlock("i", mergeProps({ class: unref(n).b(), style: unref(r) }, o.$attrs), [ renderSlot(o.$slots, "default") ], 16)); } }); var jj = fr(Vj, [["__file", "icon.vue"]]); var d2 = Os(jj); var Cm = Symbol("formContextKey"); var Vp = Symbol("formItemContextKey"); var Hj = (e17, t = {}) => { const n = ref(void 0), r = t.prop ? n : y5("size"), o = t.global ? n : Ij(), a = t.form ? { size: void 0 } : inject(Cm, void 0), i = t.formItem ? { size: void 0 } : inject(Vp, void 0); return computed(() => r.value || unref(e17) || (i == null ? void 0 : i.size) || (a == null ? void 0 : a.size) || o.value || ""); }; var M5 = (e17) => { const t = y5("disabled"), n = inject(Cm, void 0); return computed(() => t.value || unref(e17) || (n == null ? void 0 : n.disabled) || false); }; var Uj = () => { const e17 = inject(Cm, void 0), t = inject(Vp, void 0); return { form: e17, formItem: t }; }; var Em = Symbol("popper"); var z5 = Symbol("popperContent"); var qj = [ "dialog", "grid", "group", "listbox", "menu", "navigation", "tooltip", "tree" ]; var V5 = Rn({ role: { type: String, values: qj, default: "tooltip" } }); var Wj = defineComponent({ name: "ElPopper", inheritAttrs: false }); var Kj = defineComponent({ ...Wj, props: V5, setup(e17, { expose: t }) { const n = e17, r = ref(), o = ref(), a = ref(), i = ref(), s = computed(() => n.role), u = { triggerRef: r, popperInstanceRef: o, contentRef: a, referenceRef: i, role: s }; return t(u), provide(Em, u), (l, c) => renderSlot(l.$slots, "default"); } }); var Gj = fr(Kj, [["__file", "popper.vue"]]); var j5 = Rn({ arrowOffset: { type: Number, default: 5 } }); var Xj = defineComponent({ name: "ElPopperArrow", inheritAttrs: false }); var Yj = defineComponent({ ...Xj, props: j5, setup(e17, { expose: t }) { const n = e17, r = mo("popper"), { arrowOffset: o, arrowRef: a, arrowStyle: i } = inject(z5, void 0); return watch(() => n.arrowOffset, (s) => { o.value = s; }), onBeforeUnmount(() => { a.value = void 0; }), t({ arrowRef: a }), (s, u) => (openBlock(), createElementBlock("span", { ref_key: "arrowRef", ref: a, class: normalizeClass(unref(r).e("arrow")), style: normalizeStyle(unref(i)), "data-popper-arrow": "" }, null, 6)); } }); var Zj = fr(Yj, [["__file", "arrow.vue"]]); var Qh = "ElOnlyChild"; var Jj = defineComponent({ name: Qh, setup(e17, { slots: t, attrs: n }) { var r; const o = inject(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 ? withDirectives(cloneVNode(u, n), [[a]]) : (ds(Qh, "no valid child node found"), null); }; } }); function H5(e17) { if (!e17) return null; const t = e17; for (const n of t) { if (Rc(n)) switch (n.type) { case Comment: continue; case Text: case "svg": return p2(n); case Fragment: return H5(n.children); default: return n; } return p2(n); } return null; } function p2(e17) { const t = mo("only-child"); return createVNode("span", { class: t.e("content") }, [e17]); } var 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 }); var Qj = defineComponent({ name: "ElPopperTrigger", inheritAttrs: false }); var eH = defineComponent({ ...Qj, props: U5, setup(e17, { expose: t }) { const n = e17, { role: r, triggerRef: o } = inject(Em, void 0); $j(o); const a = computed(() => s.value ? n.id : void 0), i = computed(() => { if (r && r.value === "tooltip") return n.open && n.id ? n.id : void 0; }), s = computed(() => { if (r && r.value !== "tooltip") return r.value; }), u = computed(() => s.value ? `${n.open}` : void 0); let l; const c = [ "onMouseenter", "onMouseleave", "onClick", "onKeydown", "onFocus", "onBlur", "onContextmenu" ]; return onMounted(() => { watch(() => n.virtualRef, (d) => { d && (o.value = Wi(d)); }, { immediate: true }), watch(o, (d, f) => { l == null || l(), l = void 0, Lu(d) && (c.forEach((h10) => { var p; const v = n[h10]; v && (d.addEventListener(h10.slice(2).toLowerCase(), v), (p = f == null ? void 0 : f.removeEventListener) == null || p.call(f, h10.slice(2).toLowerCase(), v)); }), l = watch([a, i, s, u], (h10) => { [ "aria-controls", "aria-describedby", "aria-haspopup", "aria-expanded" ].forEach((p, v) => { cm(h10[v]) ? d.removeAttribute(p) : d.setAttribute(p, h10[v]); }); }, { immediate: true })), Lu(f) && [ "aria-controls", "aria-describedby", "aria-haspopup", "aria-expanded" ].forEach((h10) => f.removeAttribute(h10)); }, { immediate: true }); }), onBeforeUnmount(() => { if (l == null || l(), l = void 0, o.value && Lu(o.value)) { const d = o.value; c.forEach((f) => { const h10 = n[f]; h10 && d.removeEventListener(f.slice(2).toLowerCase(), h10); }), o.value = void 0; } }), t({ triggerRef: o }), (d, f) => d.virtualTriggering ? createCommentVNode("v-if", true) : (openBlock(), createBlock(unref(Jj), mergeProps({ key: 0 }, d.$attrs, { "aria-controls": unref(a), "aria-describedby": unref(i), "aria-expanded": unref(u), "aria-haspopup": unref(s) }), { default: withCtx(() => [ renderSlot(d.$slots, "default") ]), _: 3 }, 16, ["aria-controls", "aria-describedby", "aria-expanded", "aria-haspopup"])); } }); var tH = fr(eH, [["__file", "trigger.vue"]]); var ev = "focus-trap.focus-after-trapped"; var tv = "focus-trap.focus-after-released"; var nH = "focus-trap.focusout-prevented"; var f2 = { cancelable: true, bubbles: false }; var rH = { cancelable: true, bubbles: false }; var h2 = "focusAfterTrapped"; var v2 = "focusAfterReleased"; var oH = Symbol("elFocusTrap"); var Sm = ref(); var qf = ref(0); var _m = ref(0); var kd = 0; var q5 = (e17) => { const t = [], n = document.createTreeWalker(e17, 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; }; var g2 = (e17, t) => { for (const n of e17) if (!aH(n, t)) return n; }; var aH = (e17, t) => { if (false) return false; if (getComputedStyle(e17).visibility === "hidden") return true; for (; e17; ) { if (t && e17 === t) return false; if (getComputedStyle(e17).display === "none") return true; e17 = e17.parentElement; } return false; }; var iH = (e17) => { const t = q5(e17), n = g2(t, e17), r = g2(t.reverse(), e17); return [n, r]; }; var sH = (e17) => e17 instanceof HTMLInputElement && "select" in e17; var Ka = (e17, t) => { if (e17 && e17.focus) { const n = document.activeElement; e17.focus({ preventScroll: true }), _m.value = window.performance.now(), e17 !== n && sH(e17) && t && e17.select(); } }; function m2(e17, t) { const n = [...e17], r = e17.indexOf(t); return r !== -1 && n.splice(r, 1), n; } var lH = () => { let e17 = []; return { push: (t) => { const n = e17[0]; n && t !== n && n.pause(), e17 = m2(e17, t), e17.unshift(t); }, remove: (t) => { var n, r; e17 = m2(e17, t), (r = (n = e17[0]) == null ? void 0 : n.resume) == null || r.call(n); } }; }; var uH = (e17, t = false) => { const n = document.activeElement; for (const r of e17) if (Ka(r, t), document.activeElement !== n) return; }; var y2 = lH(); var cH = () => qf.value > _m.value; var Cd = () => { Sm.value = "pointer", qf.value = window.performance.now(); }; var b2 = () => { Sm.value = "keyboard", qf.value = window.performance.now(); }; var dH = () => (onMounted(() => { kd === 0 && (document.addEventListener("mousedown", Cd), document.addEventListener("touchstart", Cd), document.addEventListener("keydown", b2)), kd++; }), onBeforeUnmount(() => { kd--, kd <= 0 && (document.removeEventListener("mousedown", Cd), document.removeEventListener("touchstart", Cd), document.removeEventListener("keydown", b2)); }), { focusReason: Sm, lastUserFocusTimestamp: qf, lastAutomatedFocusTimestamp: _m }); var Ed = (e17) => new CustomEvent(nH, { ...rH, detail: e17 }); var pH = defineComponent({ name: "ElFocusTrap", inheritAttrs: false, props: { loop: Boolean, trapped: Boolean, focusTrapEl: Object, focusStartEl: { type: [Object, String], default: "first" } }, emits: [ h2, v2, "focusin", "focusout", "focusout-prevented", "release-requested" ], setup(e17, { emit: t }) { const n = ref(); let r, o; const { focusReason: a } = dH(); Sj((p) => { e17.trapped && !i.paused && t("release-requested", p); }); const i = { paused: false, pause() { this.paused = true; }, resume() { this.paused = false; } }, s = (p) => { if (!e17.loop && !e17.trapped || i.paused) return; const { key: v, altKey: m, ctrlKey: g, metaKey: b, currentTarget: x, shiftKey: w } = p, { loop: C } = e17, 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, true)); } else if (w && [O, S].includes(E)) { const $ = Ed({ focusReason: a.value }); t("focusout-prevented", $), $.defaultPrevented || (p.preventDefault(), C && Ka(F, true)); } } else if (E === S) { const $ = Ed({ focusReason: a.value }); t("focusout-prevented", $), $.defaultPrevented || p.preventDefault(); } } }; provide(oH, { focusTrapRef: n, onKeydown: s }), watch(() => e17.focusTrapEl, (p) => { p && (n.value = p); }, { immediate: true }), watch([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 = unref(n); if (!v) return; const m = p.target, g = p.relatedTarget, b = m && v.contains(m); e17.trapped || g && v.contains(g) || (r = g), b && t("focusin", p), !i.paused && e17.trapped && (b ? o = m : Ka(o, true)); }, d = (p) => { const v = unref(n); if (!(i.paused || !v)) if (e17.trapped) { const m = p.relatedTarget; !cm(m) && !v.contains(m) && setTimeout(() => { if (!i.paused && e17.trapped) { const g = Ed({ focusReason: a.value }); t("focusout-prevented", g), g.defaultPrevented || Ka(o, true); } }, 0); } else { const m = p.target; m && v.contains(m) || t("focusout", p); } }; async function f() { await nextTick(); const p = unref(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 || nextTick(() => { let g = e17.focusStartEl; zl(g) || (Ka(g), document.activeElement !== g && (g = "first")), g === "first" && uH(q5(p), true), (document.activeElement === v || g === "container") && Ka(p); }); } } } function h10() { const p = unref(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 onMounted(() => { e17.trapped && f(), watch(() => e17.trapped, (p) => { p ? f() : h10(); }); }), onBeforeUnmount(() => { e17.trapped && h10(), 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(e17, t, n, r, o, a) { return renderSlot(e17.$slots, "default", { handleKeydown: e17.onKeydown }); } var hH = fr(pH, [["render", fH], ["__file", "focus-trap.vue"]]); var vH = ["fixed", "absolute"]; var gH = Rn({ boundariesPadding: { type: Number, default: 0 }, fallbackPlacements: { type: Ot(Array), default: void 0 }, gpuAcceleration: { type: Boolean, default: true }, offset: { type: Number, default: 12 }, placement: { type: String, values: hm, default: "bottom" }, popperOptions: { type: Ot(Object), default: () => ({}) }, strategy: { type: String, values: vH, default: "absolute" } }); var 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: true }, pure: Boolean, focusOnShow: { type: Boolean, default: false }, trapping: { type: Boolean, default: false }, popperClass: { type: Ot([String, Array, Object]) }, popperStyle: { type: Ot([String, Array, Object]) }, referenceEl: { type: Ot(Object) }, triggerTargetEl: { type: Ot(Object) }, stopPopperMouseEvent: { type: Boolean, default: true }, virtualTriggering: Boolean, zIndex: Number, ...R5(["ariaLabel"]) }); var mH = { mouseenter: (e17) => e17 instanceof MouseEvent, mouseleave: (e17) => e17 instanceof MouseEvent, focus: () => true, blur: () => true, close: () => true }; var yH = (e17, t = []) => { const { placement: n, strategy: r, popperOptions: o } = e17, a = { placement: n, strategy: r, ...o, modifiers: [...wH(e17), ...t] }; return xH(a, o == null ? void 0 : o.modifiers), a; }; var bH = (e17) => { if (Ur) return Wi(e17); }; function wH(e17) { const { offset: t, gpuAcceleration: n, fallbackPlacements: r } = e17; 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(e17, t) { t && (e17.modifiers = [...e17.modifiers, ...t ?? []]); } var kH = 0; var CH = (e17) => { const { popperInstanceRef: t, contentRef: n, triggerRef: r, role: o } = inject(Em, void 0), a = ref(), i = ref(), s = computed(() => ({ name: "eventListeners", enabled: !!e17.visible })), u = computed(() => { var g; const b = unref(a), x = (g = unref(i)) != null ? g : kH; return { name: "arrow", enabled: !Gz(b), options: { element: b, padding: x } }; }), l = computed(() => ({ onFirstUpdate: () => { p(); }, ...yH(e17, [ unref(u), unref(s) ]) })), c = computed(() => bH(e17.referenceEl) || unref(r)), { attributes: d, state: f, styles: h10, update: p, forceUpdate: v, instanceRef: m } = xj(c, n, l); return watch(m, (g) => t.value = g), onMounted(() => { watch(() => { var g; return (g = unref(c)) == null ? void 0 : g.getBoundingClientRect(); }, () => { p(); }); }), { attributes: d, arrowRef: a, contentRef: n, instanceRef: m, state: f, styles: h10, role: o, forceUpdate: v, update: p }; }; var EH = (e17, { attributes: t, styles: n, role: r }) => { const { nextZIndex: o } = L5(), a = mo("popper"), i = computed(() => unref(t).popper), s = ref(tc(e17.zIndex) ? e17.zIndex : o()), u = computed(() => [ a.b(), a.is("pure", e17.pure), a.is(e17.effect), e17.popperClass ]), l = computed(() => [ { zIndex: unref(s) }, unref(n).popper, e17.popperStyle || {} ]), c = computed(() => r.value === "dialog" ? "false" : void 0), d = computed(() => unref(n).arrow || {}); return { ariaModal: c, arrowStyle: d, contentAttrs: i, contentClass: u, contentStyle: l, contentZIndex: s, updateZIndex: () => { s.value = tc(e17.zIndex) ? e17.zIndex : o(); } }; }; var SH = (e17, t) => { const n = ref(false), r = ref(); 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) => { e17.visible && !n.value && (o.target && (r.value = o.target), n.value = true); }, onFocusoutPrevented: (o) => { e17.trapping || (o.detail.focusReason === "pointer" && o.preventDefault(), n.value = false); }, onReleaseRequested: () => { n.value = false, t("close"); } }; }; var _H = defineComponent({ name: "ElPopperContent" }); var TH = defineComponent({ ..._H, props: W5, emits: mH, setup(e17, { expose: t, emit: n }) { const r = e17, { focusStartRef: o, trapped: a, onFocusAfterReleased: i, onFocusAfterTrapped: s, onFocusInTrap: u, onFocusoutPrevented: l, onReleaseRequested: c } = SH(r, n), { attributes: d, arrowRef: f, contentRef: h10, 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 = inject(Vp, void 0), O = ref(); provide(z5, { arrowStyle: x, arrowRef: f, arrowOffset: O }), S && provide(Vp, { ...S, addInputId: Np, removeInputId: Np }); let F; const $ = (L = true) => { g(), L && E(); }, A = () => { $(false), r.visible && r.focusOnShow ? a.value = true : r.visible === false && (a.value = false); }; return onMounted(() => { watch(() => r.triggerTargetEl, (L, N) => { F == null || F(), F = void 0; const M = unref(L || h10.value), I = unref(N || h10.value); Lu(M) && (F = watch([m, () => r.ariaLabel, b, () => r.id], (z) => { ["role", "aria-label", "aria-modal", "id"].forEach((R, W) => { cm(z[W]) ? M.removeAttribute(R) : M.setAttribute(R, z[W]); }); }, { immediate: true })), I !== M && Lu(I) && ["role", "aria-label", "aria-modal", "id"].forEach((z) => { I.removeAttribute(z); }); }, { immediate: true }), watch(() => r.visible, A, { immediate: true }); }), onBeforeUnmount(() => { F == null || F(), F = void 0; }), t({ popperContentRef: h10, popperInstanceRef: v, updatePopper: $, contentStyle: k }), (L, N) => (openBlock(), createElementBlock("div", mergeProps({ ref_key: "contentRef", ref: h10 }, unref(w), { style: unref(k), class: unref(C), tabindex: "-1", onMouseenter: (M) => L.$emit("mouseenter", M), onMouseleave: (M) => L.$emit("mouseleave", M) }), [ createVNode(unref(hH), { trapped: unref(a), "trap-on-focus-in": true, "focus-trap-el": unref(h10), "focus-start-el": unref(o), onFocusAfterTrapped: unref(s), onFocusAfterReleased: unref(i), onFocusin: unref(u), onFocusoutPrevented: unref(l), onReleaseRequested: unref(c) }, { default: withCtx(() => [ renderSlot(L.$slots, "default") ]), _: 3 }, 8, ["trapped", "focus-trap-el", "focus-start-el", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusin", "onFocusoutPrevented", "onReleaseRequested"]) ], 16, ["onMouseenter", "onMouseleave"])); } }); var OH = fr(TH, [["__file", "content.vue"]]); var PH = Os(Gj); var Tm = Symbol("elTooltip"); var 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: true }, disabled: Boolean, ...R5(["ariaLabel"]) }); var oc = Rn({ ...U5, disabled: Boolean, trigger: { type: Ot([String, Array]), default: "hover" }, triggerKeys: { type: Ot(Array), default: () => [Bp.enter, Bp.space] } }); var { useModelToggleProps: $H, useModelToggleEmits: AH, useModelToggle: FH } = yV("visible"); var IH = Rn({ ...V5, ...$H, ...Zr, ...oc, ...j5, showArrow: { type: Boolean, default: true } }); var NH = [ ...AH, "before-show", "before-hide", "show", "hide", "open", "close" ]; var LH = (e17, t) => e7(e17) ? e17.includes(t) : e17 === t; var zs = (e17, t, n) => (r) => { LH(unref(e17), t) && n(r); }; var DH = defineComponent({ name: "ElTooltipTrigger" }); var RH = defineComponent({ ...DH, props: oc, setup(e17, { expose: t }) { const n = e17, r = mo("tooltip"), { controlled: o, id: a, open: i, onOpen: s, onClose: u, onToggle: l } = inject(Tm, void 0), c = ref(null), d = () => { if (unref(o) || n.disabled) return true; }, f = toRef(n, "trigger"), h10 = 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) => (openBlock(), createBlock(unref(tH), { id: unref(a), "virtual-ref": w.virtualRef, open: unref(i), "virtual-triggering": w.virtualTriggering, class: normalizeClass(unref(r).e("trigger")), onBlur: unref(g), onClick: unref(v), onContextmenu: unref(b), onFocus: unref(m), onMouseenter: unref(h10), onMouseleave: unref(p), onKeydown: unref(x) }, { default: withCtx(() => [ renderSlot(w.$slots, "default") ]), _: 3 }, 8, ["id", "virtual-ref", "open", "virtual-triggering", "class", "onBlur", "onClick", "onContextmenu", "onFocus", "onMouseenter", "onMouseleave", "onKeydown"])); } }); var BH = fr(RH, [["__file", "trigger.vue"]]); var MH = Rn({ to: { type: Ot([String, Object]), required: true }, disabled: Boolean }); var zH = defineComponent({ __name: "teleport", props: MH, setup(e17) { return (t, n) => t.disabled ? renderSlot(t.$slots, "default", { key: 0 }) : (openBlock(), createBlock(Teleport, { key: 1, to: t.to }, [ renderSlot(t.$slots, "default") ], 8, ["to"])); } }); var VH = fr(zH, [["__file", "teleport.vue"]]); var jH = Os(VH); var HH = defineComponent({ name: "ElTooltipContent", inheritAttrs: false }); var UH = defineComponent({ ...HH, props: Zr, setup(e17, { expose: t }) { const n = e17, { selector: r } = A5(), o = mo("tooltip"), a = ref(null); let i; const { controlled: s, id: u, open: l, trigger: c, onClose: d, onOpen: f, onShow: h10, onHide: p, onBeforeShow: v, onBeforeHide: m } = inject(Tm, void 0), g = computed(() => n.transition || `${o.namespace.value}-fade-in-linear`), b = computed(() => false ? true : n.persistent); onBeforeUnmount(() => { i == null || i(); }); const x = computed(() => unref(b) ? true : unref(l)), w = computed(() => n.disabled ? false : unref(l)), C = computed(() => n.appendTo || r.value), k = computed(() => { var I; return (I = n.style) != null ? I : {}; }), E = ref(true), S = () => { p(), E.value = true; }, O = () => { if (unref(s)) return true; }, F = ha(O, () => { n.enterable && unref(c) === "hover" && f(); }), $ = ha(O, () => { unref(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 = () => { h10(), i = KM(computed(() => { var I; return (I = a.value) == null ? void 0 : I.popperContentRef; }), () => { unref(s) || unref(c) !== "hover" && d(); }); }, M = () => { n.virtualTriggering || d(); }; return watch(() => unref(l), (I) => { I ? E.value = false : i == null || i(); }, { flush: "post" }), watch(() => n.content, () => { var I, z; (z = (I = a.value) == null ? void 0 : I.updatePopper) == null || z.call(I); }), t({ contentRef: a }), (I, z) => (openBlock(), createBlock(unref(jH), { disabled: !I.teleported, to: unref(C) }, { default: withCtx(() => [ createVNode(Transition, { name: unref(g), onAfterLeave: S, onBeforeEnter: A, onAfterEnter: N, onBeforeLeave: L }, { default: withCtx(() => [ unref(x) ? withDirectives((openBlock(), createBlock(unref(OH), mergeProps({ key: 0, id: unref(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, unref(k)], "reference-el": I.referenceEl, "trigger-target-el": I.triggerTargetEl, visible: unref(w), "z-index": I.zIndex, onMouseenter: unref(F), onMouseleave: unref($), onBlur: M, onClose: unref(d) }), { default: withCtx(() => [ renderSlot(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"])), [ [vShow, unref(w)] ]) : createCommentVNode("v-if", true) ]), _: 3 }, 8, ["name"]) ]), _: 3 }, 8, ["disabled", "to"])); } }); var qH = fr(UH, [["__file", "content.vue"]]); var WH = defineComponent({ name: "ElTooltip" }); var KH = defineComponent({ ...WH, props: IH, emits: NH, setup(e17, { expose: t, emit: n }) { const r = e17; Tj(); const o = Ej(), a = ref(), i = ref(), s = () => { var g; const b = unref(a); b && ((g = b.popperInstanceRef) == null || g.update()); }, u = ref(false), l = ref(), { show: c, hide: d, hasUpdateHandler: f } = FH({ indicator: u, toggleReason: l }), { onOpen: h10, onClose: p } = Pj({ showAfter: toRef(r, "showAfter"), hideAfter: toRef(r, "hideAfter"), autoClose: toRef(r, "autoClose"), open: c, close: d }), v = computed(() => dm(r.visible) && !f.value); provide(Tm, { controlled: v, id: o, open: readonly(u), trigger: toRef(r, "trigger"), onOpen: (g) => { h10(g); }, onClose: (g) => { p(g); }, onToggle: (g) => { unref(u) ? p(g) : h10(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 }), watch(() => r.disabled, (g) => { g && u.value && (u.value = false); }); 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 onDeactivated(() => u.value && d()), t({ popperRef: a, contentRef: i, isFocusInsideContent: m, updatePopper: s, onOpen: h10, onClose: p, hide: d }), (g, b) => (openBlock(), createBlock(unref(PH), { ref_key: "popperRef", ref: a, role: g.role }, { default: withCtx(() => [ createVNode(BH, { disabled: g.disabled, trigger: g.trigger, "trigger-keys": g.triggerKeys, "virtual-ref": g.virtualRef, "virtual-triggering": g.virtualTriggering }, { default: withCtx(() => [ g.$slots.default ? renderSlot(g.$slots, "default", { key: 0 }) : createCommentVNode("v-if", true) ]), _: 3 }, 8, ["disabled", "trigger", "trigger-keys", "virtual-ref", "virtual-triggering"]), createVNode(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: withCtx(() => [ renderSlot(g.$slots, "content", {}, () => [ g.rawContent ? (openBlock(), createElementBlock("span", { key: 0, innerHTML: g.content }, null, 8, ["innerHTML"])) : (openBlock(), createElementBlock("span", { key: 1 }, toDisplayString(g.content), 1)) ]), g.showArrow ? (openBlock(), createBlock(unref(Zj), { key: 0, "arrow-offset": g.arrowOffset }, null, 8, ["arrow-offset"])) : createCommentVNode("v-if", true) ]), _: 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 = fr(KH, [["__file", "tooltip.vue"]]); var XH = Os(GH); var K5 = Symbol("buttonGroupContextKey"); var YH = (e17, 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" }, computed(() => e17.type === "text")); const n = inject(K5, void 0), r = km("button"), { form: o } = Uj(), a = Hj(computed(() => n == null ? void 0 : n.size)), i = M5(), s = ref(), u = useSlots(), l = computed(() => e17.type || (n == null ? void 0 : n.type) || ""), c = computed(() => { var h10, p, v; return (v = (p = e17.autoInsertSpace) != null ? p : (h10 = r.value) == null ? void 0 : h10.autoInsertSpace) != null ? v : false; }), d = computed(() => e17.tag === "button" ? { ariaDisabled: i.value || e17.loading, disabled: i.value || e17.loading, autofocus: e17.autofocus, type: e17.nativeType } : {}), f = computed(() => { var h10; const p = (h10 = u.default) == null ? void 0 : h10.call(u); if (c.value && (p == null ? void 0 : p.length) === 1) { const v = p[0]; if ((v == null ? void 0 : v.type) === Text) { const m = v.children; return new RegExp("^\\p{Unified_Ideograph}{2}$", "u").test(m.trim()); } } return false; }); return { _disabled: i, _size: a, _type: l, _ref: s, _props: d, shouldAddSpace: f, handleClick: (h10) => { if (i.value || e17.loading) { h10.stopPropagation(); return; } e17.nativeType === "reset" && (o == null || o.resetFields()), t("click", h10); } }; }; var ZH = [ "default", "primary", "success", "warning", "info", "danger", "text", "" ]; var JH = ["button", "submit", "reset"]; var 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" } }); var QH = { click: (e17) => e17 instanceof MouseEvent }; function Jn(e17, t) { eU(e17) && (e17 = "100%"); var n = tU(e17); return e17 = t === 360 ? e17 : Math.min(t, Math.max(0, parseFloat(e17))), n && (e17 = parseInt(String(e17 * t), 10) / 100), Math.abs(e17 - t) < 1e-6 ? 1 : (t === 360 ? e17 = (e17 < 0 ? e17 % t + t : e17 % t) / parseFloat(String(t)) : e17 = e17 % t / parseFloat(String(t)), e17); } function Sd(e17) { return Math.min(1, Math.max(0, e17)); } function eU(e17) { return typeof e17 == "string" && e17.indexOf(".") !== -1 && parseFloat(e17) === 1; } function tU(e17) { return typeof e17 == "string" && e17.indexOf("%") !== -1; } function G5(e17) { return e17 = parseFloat(e17), (isNaN(e17) || e17 < 0 || e17 > 1) && (e17 = 1), e17; } function _d(e17) { return e17 <= 1 ? "".concat(Number(e17) * 100, "%") : e17; } function Ki(e17) { return e17.length === 1 ? "0" + e17 : String(e17); } function nU(e17, t, n) { return { r: Jn(e17, 255) * 255, g: Jn(t, 255) * 255, b: Jn(n, 255) * 255 }; } function w2(e17, t, n) { e17 = Jn(e17, 255), t = Jn(t, 255), n = Jn(n, 255); var r = Math.max(e17, t, n), o = Math.min(e17, 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 e17: a = (t - n) / u + (t < n ? 6 : 0); break; case t: a = (n - e17) / u + 2; break; case n: a = (e17 - t) / u + 4; break; } a /= 6; } return { h: a, s: i, l: s }; } function nv(e17, t, n) { return n < 0 && (n += 1), n > 1 && (n -= 1), n < 1 / 6 ? e17 + (t - e17) * (6 * n) : n < 1 / 2 ? t : n < 2 / 3 ? e17 + (t - e17) * (2 / 3 - n) * 6 : e17; } function rU(e17, t, n) { var r, o, a; if (e17 = Jn(e17, 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, e17 + 1 / 3), o = nv(s, i, e17), a = nv(s, i, e17 - 1 / 3); } return { r: r * 255, g: o * 255, b: a * 255 }; } function x2(e17, t, n) { e17 = Jn(e17, 255), t = Jn(t, 255), n = Jn(n, 255); var r = Math.max(e17, t, n), o = Math.min(e17, t, n), a = 0, i = r, s = r - o, u = r === 0 ? 0 : s / r; if (r === o) a = 0; else { switch (r) { case e17: a = (t - n) / s + (t < n ? 6 : 0); break; case t: a = (n - e17) / s + 2; break; case n: a = (e17 - t) / s + 4; break; } a /= 6; } return { h: a, s: u, v: i }; } function oU(e17, t, n) { e17 = Jn(e17, 360) * 6, t = Jn(t, 100), n = Jn(n, 100); var r = Math.floor(e17), o = e17 - 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(e17, t, n, r) { var o = [ Ki(Math.round(e17).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(e17, t, n, r, o) { var a = [ Ki(Math.round(e17).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(e17) { return Math.round(parseFloat(e17) * 255).toString(16); } function C2(e17) { return Vr(e17) / 255; } function Vr(e17) { return parseInt(e17, 16); } function sU(e17) { return { r: e17 >> 16, g: (e17 & 65280) >> 8, b: e17 & 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(e17) { var t = { r: 0, g: 0, b: 0 }, n = 1, r = null, o = null, a = null, i = false, s = false; return typeof e17 == "string" && (e17 = dU(e17)), typeof e17 == "object" && (ca(e17.r) && ca(e17.g) && ca(e17.b) ? (t = nU(e17.r, e17.g, e17.b), i = true, s = String(e17.r).substr(-1) === "%" ? "prgb" : "rgb") : ca(e17.h) && ca(e17.s) && ca(e17.v) ? (r = _d(e17.s), o = _d(e17.v), t = oU(e17.h, r, o), i = true, s = "hsv") : ca(e17.h) && ca(e17.s) && ca(e17.l) && (r = _d(e17.s), a = _d(e17.l), t = rU(e17.h, r, a), i = true, s = "hsl"), Object.prototype.hasOwnProperty.call(e17, "a") && (n = e17.a)), n = G5(n), { ok: i, format: e17.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+%?"; var cU = "[-\\+]?\\d*\\.\\d+%?"; var ni = "(?:".concat(cU, ")|(?:").concat(uU, ")"); var rv = "[\\s|\\(]+(".concat(ni, ")[,|\\s]+(").concat(ni, ")[,|\\s]+(").concat(ni, ")\\s*\\)?"); var ov = "[\\s|\\(]+(".concat(ni, ")[,|\\s]+(").concat(ni, ")[,|\\s]+(").concat(ni, ")[,|\\s]+(").concat(ni, ")\\s*\\)?"); var 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(e17) { if (e17 = e17.trim().toLowerCase(), e17.length === 0) return false; var t = false; if (d0[e17]) e17 = d0[e17], t = true; else if (e17 === "transparent") return { r: 0, g: 0, b: 0, a: 0, format: "name" }; var n = xo.rgb.exec(e17); return n ? { r: n[1], g: n[2], b: n[3] } : (n = xo.rgba.exec(e17), n ? { r: n[1], g: n[2], b: n[3], a: n[4] } : (n = xo.hsl.exec(e17), n ? { h: n[1], s: n[2], l: n[3] } : (n = xo.hsla.exec(e17), n ? { h: n[1], s: n[2], l: n[3], a: n[4] } : (n = xo.hsv.exec(e17), n ? { h: n[1], s: n[2], v: n[3] } : (n = xo.hsva.exec(e17), n ? { h: n[1], s: n[2], v: n[3], a: n[4] } : (n = xo.hex8.exec(e17), 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(e17), n ? { r: Vr(n[1]), g: Vr(n[2]), b: Vr(n[3]), format: t ? "name" : "hex" } : (n = xo.hex4.exec(e17), 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(e17), n ? { r: Vr(n[1] + n[1]), g: Vr(n[2] + n[2]), b: Vr(n[3] + n[3]), format: t ? "name" : "hex" } : false))))))))); } function ca(e17) { return !!xo.CSS_UNIT.exec(String(e17)); } var pU = ( /** @class */ function() { function e17(t, n) { t === void 0 && (t = ""), n === void 0 && (n = {}); var r; if (t instanceof e17) 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 e17.prototype.isDark = function() { return this.getBrightness() < 128; }, e17.prototype.isLight = function() { return !this.isDark(); }, e17.prototype.getBrightness = function() { var t = this.toRgb(); return (t.r * 299 + t.g * 587 + t.b * 114) / 1e3; }, e17.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; }, e17.prototype.getAlpha = function() { return this.a; }, e17.prototype.setAlpha = function(t) { return this.a = G5(t), this.roundA = Math.round(100 * this.a) / 100, this; }, e17.prototype.isMonochrome = function() { var t = this.toHsl().s; return t === 0; }, e17.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 }; }, e17.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, ")"); }, e17.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 }; }, e17.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, ")"); }, e17.prototype.toHex = function(t) { return t === void 0 && (t = false), k2(this.r, this.g, this.b, t); }, e17.prototype.toHexString = function(t) { return t === void 0 && (t = false), "#" + this.toHex(t); }, e17.prototype.toHex8 = function(t) { return t === void 0 && (t = false), aU(this.r, this.g, this.b, this.a, t); }, e17.prototype.toHex8String = function(t) { return t === void 0 && (t = false), "#" + this.toHex8(t); }, e17.prototype.toHexShortString = function(t) { return t === void 0 && (t = false), this.a === 1 ? this.toHexString(t) : this.toHex8String(t); }, e17.prototype.toRgb = function() { return { r: Math.round(this.r), g: Math.round(this.g), b: Math.round(this.b), a: this.a }; }, e17.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, ")"); }, e17.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 }; }, e17.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, ")"); }, e17.prototype.toName = function() { if (this.a === 0) return "transparent"; if (this.a < 1) return false; for (var t = "#" + k2(this.r, this.g, this.b, false), 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 false; }, e17.prototype.toString = function(t) { var n = !!t; t = t ?? this.format; var r = false, 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(true)), t === "hex4" && (r = this.toHex8String(true)), t === "hex8" && (r = this.toHex8String()), t === "name" && (r = this.toName()), t === "hsl" && (r = this.toHslString()), t === "hsv" && (r = this.toHsvString()), r || this.toHexString()); }, e17.prototype.toNumber = function() { return (Math.round(this.r) << 16) + (Math.round(this.g) << 8) + Math.round(this.b); }, e17.prototype.clone = function() { return new e17(this.toString()); }, e17.prototype.lighten = function(t) { t === void 0 && (t = 10); var n = this.toHsl(); return n.l += t / 100, n.l = Sd(n.l), new e17(n); }, e17.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 e17(n); }, e17.prototype.darken = function(t) { t === void 0 && (t = 10); var n = this.toHsl(); return n.l -= t / 100, n.l = Sd(n.l), new e17(n); }, e17.prototype.tint = function(t) { return t === void 0 && (t = 10), this.mix("white", t); }, e17.prototype.shade = function(t) { return t === void 0 && (t = 10), this.mix("black", t); }, e17.prototype.desaturate = function(t) { t === void 0 && (t = 10); var n = this.toHsl(); return n.s -= t / 100, n.s = Sd(n.s), new e17(n); }, e17.prototype.saturate = function(t) { t === void 0 && (t = 10); var n = this.toHsl(); return n.s += t / 100, n.s = Sd(n.s), new e17(n); }, e17.prototype.greyscale = function() { return this.desaturate(100); }, e17.prototype.spin = function(t) { var n = this.toHsl(), r = (n.h + t) % 360; return n.h = r < 0 ? 360 + r : r, new e17(n); }, e17.prototype.mix = function(t, n) { n === void 0 && (n = 50); var r = this.toRgb(), o = new e17(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 e17(i); }, e17.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 e17(r)); return a; }, e17.prototype.complement = function() { var t = this.toHsl(); return t.h = (t.h + 180) % 360, new e17(t); }, e17.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 e17({ h: r, s: o, v: a })), a = (a + s) % 1; return i; }, e17.prototype.splitcomplement = function() { var t = this.toHsl(), n = t.h; return [ this, new e17({ h: (n + 72) % 360, s: t.s, l: t.l }), new e17({ h: (n + 216) % 360, s: t.s, l: t.l }) ]; }, e17.prototype.onBackground = function(t) { var n = this.toRgb(), r = new e17(t).toRgb(), o = n.a + r.a * (1 - n.a); return new e17({ 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 }); }, e17.prototype.triad = function() { return this.polyad(3); }, e17.prototype.tetrad = function() { return this.polyad(4); }, e17.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 e17({ h: (r + i * a) % 360, s: n.s, l: n.l })); return o; }, e17.prototype.equals = function(t) { return this.toRgbString() === new e17(t).toRgbString(); }, e17; }() ); function za(e17, t = 20) { return e17.mix("#141414", t).toString(); } function fU(e17) { const t = M5(), n = mo("button"); return computed(() => { let r = {}, o = e17.color; if (o) { const a = o.match(/var\((.*?)\)/); a && (o = window.getComputedStyle(window.document.documentElement).getPropertyValue(a[1])); const i = new pU(o), s = e17.dark ? i.tint(20).toString() : za(i, 20); if (e17.plain) r = n.cssVarBlock({ "bg-color": e17.dark ? za(i, 90) : i.tint(90).toString(), "text-color": o, "border-color": e17.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")] = e17.dark ? za(i, 90) : i.tint(90).toString(), r[n.cssVarBlockName("disabled-text-color")] = e17.dark ? za(i, 50) : i.tint(50).toString(), r[n.cssVarBlockName("disabled-border-color")] = e17.dark ? za(i, 80) : i.tint(80).toString()); else { const u = e17.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 = e17.dark ? za(i, 50) : i.tint(50).toString(); r[n.cssVarBlockName("disabled-bg-color")] = c, r[n.cssVarBlockName("disabled-text-color")] = e17.dark ? "rgba(255, 255, 255, 0.5)" : `var(${n.cssVarName("color-white")})`, r[n.cssVarBlockName("disabled-border-color")] = c; } } } return r; }); } var hU = defineComponent({ name: "ElButton" }); var vU = defineComponent({ ...hU, props: c0, emits: QH, setup(e17, { expose: t, emit: n }) { const r = e17, o = fU(r), a = mo("button"), { _ref: i, _size: s, _type: u, _disabled: l, _props: c, shouldAddSpace: d, handleClick: f } = YH(r, n), h10 = computed(() => [ 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) => (openBlock(), createBlock(resolveDynamicComponent(p.tag), mergeProps({ ref_key: "_ref", ref: i }, unref(c), { class: unref(h10), style: unref(o), onClick: unref(f) }), { default: withCtx(() => [ p.loading ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [ p.$slots.loading ? renderSlot(p.$slots, "loading", { key: 0 }) : (openBlock(), createBlock(unref(d2), { key: 1, class: normalizeClass(unref(a).is("loading")) }, { default: withCtx(() => [ (openBlock(), createBlock(resolveDynamicComponent(p.loadingIcon))) ]), _: 1 }, 8, ["class"])) ], 64)) : p.icon || p.$slots.icon ? (openBlock(), createBlock(unref(d2), { key: 1 }, { default: withCtx(() => [ p.icon ? (openBlock(), createBlock(resolveDynamicComponent(p.icon), { key: 0 })) : renderSlot(p.$slots, "icon", { key: 1 }) ]), _: 3 })) : createCommentVNode("v-if", true), p.$slots.default ? (openBlock(), createElementBlock("span", { key: 2, class: normalizeClass({ [unref(a).em("text", "expand")]: unref(d) }) }, [ renderSlot(p.$slots, "default") ], 2)) : createCommentVNode("v-if", true) ]), _: 3 }, 16, ["class", "style", "onClick"])); } }); var gU = fr(vU, [["__file", "button.vue"]]); var mU = { size: c0.size, type: c0.type }; var yU = defineComponent({ name: "ElButtonGroup" }); var bU = defineComponent({ ...yU, props: mU, setup(e17) { const t = e17; provide(K5, reactive({ size: toRef(t, "size"), type: toRef(t, "type") })); const n = mo("button"); return (r, o) => (openBlock(), createElementBlock("div", { class: normalizeClass(unref(n).b("group")) }, [ renderSlot(r.$slots, "default") ], 2)); } }); var X5 = fr(bU, [["__file", "button-group.vue"]]); var wU = Os(gU, { ButtonGroup: X5 }); sV(X5); var 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" } }); var kU = defineComponent({ name: "ElCard" }); var CU = defineComponent({ ...kU, props: xU, setup(e17) { const t = mo("card"); return (n, r) => (openBlock(), createElementBlock("div", { class: normalizeClass([unref(t).b(), unref(t).is(`${n.shadow}-shadow`)]) }, [ n.$slots.header || n.header ? (openBlock(), createElementBlock("div", { key: 0, class: normalizeClass(unref(t).e("header")) }, [ renderSlot(n.$slots, "header", {}, () => [ createTextVNode(toDisplayString(n.header), 1) ]) ], 2)) : createCommentVNode("v-if", true), createBaseVNode("div", { class: normalizeClass([unref(t).e("body"), n.bodyClass]), style: normalizeStyle(n.bodyStyle) }, [ renderSlot(n.$slots, "default") ], 6), n.$slots.footer || n.footer ? (openBlock(), createElementBlock("div", { key: 1, class: normalizeClass(unref(t).e("footer")) }, [ renderSlot(n.$slots, "footer", {}, () => [ createTextVNode(toDisplayString(n.footer), 1) ]) ], 2)) : createCommentVNode("v-if", true) ], 2)); } }); var EU = fr(CU, [["__file", "card.vue"]]); var SU = Os(EU); var _U = defineComponent({ inheritAttrs: false }); function TU(e17, t, n, r, o, a) { return renderSlot(e17.$slots, "default"); } var OU = fr(_U, [["render", TU], ["__file", "collection.vue"]]); var PU = defineComponent({ name: "ElCollectionItem", inheritAttrs: false }); function $U(e17, t, n, r, o, a) { return renderSlot(e17.$slots, "default"); } var AU = fr(PU, [["render", $U], ["__file", "collection-item.vue"]]); var FU = "data-el-collection-item"; var IU = (e17) => { const t = `El${e17}Collection`, n = `${t}Item`, r = Symbol(t), o = Symbol(n), a = { ...OU, name: t, setup() { const s = ref(null), u = /* @__PURE__ */ new Map(); provide(r, { itemMap: u, getItems: () => { const l = unref(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 = ref(null), c = inject(r, void 0); provide(o, { collectionItemRef: l }), onMounted(() => { const d = unref(l); d && c.itemMap.set(d, { ref: d, ...u }); }), onBeforeUnmount(() => { const d = unref(l); c.itemMap.delete(d); }); } }; return { COLLECTION_INJECTION_KEY: r, COLLECTION_ITEM_INJECTION_KEY: o, ElCollection: a, ElCollectionItem: i }; }; var 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: true }, loop: { type: Boolean, default: true }, 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"); var 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: true }, 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: true }, persistent: { type: Boolean, default: true }, "onUpdate:visible": { type: Function } }); var LU = { "update:visible": (e17) => dm(e17), "before-enter": () => true, "before-leave": () => true, "after-enter": () => true, "after-leave": () => true }; var DU = "onUpdate:visible"; var RU = defineComponent({ name: "ElPopover" }); var BU = defineComponent({ ...RU, props: NU, emits: LU, setup(e17, { expose: t, emit: n }) { const r = e17, o = computed(() => r[DU]), a = mo("popover"), i = ref(), s = computed(() => { var m; return (m = unref(i)) == null ? void 0 : m.popperRef; }), u = computed(() => [ { width: h5(r.width) }, r.popperStyle ]), l = computed(() => [a.b(), r.popperClass, { [a.m("plain")]: !!r.content }]), c = computed(() => r.transition === `${a.namespace.value}-fade-in-linear`), d = () => { var m; (m = i.value) == null || m.hide(); }, f = () => { n("before-enter"); }, h10 = () => { n("before-leave"); }, p = () => { n("after-enter"); }, v = () => { n("update:visible", false), n("after-leave"); }; return t({ popperRef: s, hide: d }), (m, g) => (openBlock(), createBlock(unref(XH), mergeProps({ 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": unref(l), "popper-style": unref(u), teleported: m.teleported, persistent: m.persistent, "gpu-acceleration": unref(c), "onUpdate:visible": unref(o), onBeforeShow: f, onBeforeHide: h10, onShow: p, onHide: v }), { content: withCtx(() => [ m.title ? (openBlock(), createElementBlock("div", { key: 0, class: normalizeClass(unref(a).e("title")), role: "title" }, toDisplayString(m.title), 3)) : createCommentVNode("v-if", true), renderSlot(m.$slots, "default", {}, () => [ createTextVNode(toDisplayString(m.content), 1) ]) ]), default: withCtx(() => [ m.$slots.reference ? renderSlot(m.$slots, "reference", { key: 0 }) : createCommentVNode("v-if", true) ]), _: 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 = fr(BU, [["__file", "popover.vue"]]); var E2 = (e17, t) => { const n = t.arg || t.value, r = n == null ? void 0 : n.popperRef; r && (r.triggerRef = e17); }; var zU = { mounted(e17, t) { E2(e17, t); }, updated(e17, t) { E2(e17, t); } }; var VU = "popover"; var jU = iV(zU, VU); var HU = Os(MU, { directive: jU }); function UU(e17) { let t; const n = ref(false), r = reactive({ ...e17, originalPosition: "", originalOverflow: "", visible: false }); function o(f) { r.text = f; } function a() { const f = r.parent, h10 = 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, h10.bm("parent", "relative")), f.removeAttribute("loading-number")), Rp(f, h10.bm("parent", "hidden")); } i(), c.unmount(); } function i() { var f, h10; (h10 = (f = d.$el) == null ? void 0 : f.parentNode) == null || h10.removeChild(d.$el); } function s() { var f; e17.beforeClose && !e17.beforeClose() || (n.value = true, clearTimeout(t), t = setTimeout(u, 400), r.visible = false, (f = e17.closed) == null || f.call(e17)); } function u() { if (!n.value) return; const f = r.parent; n.value = false, f.vLoadingAddClassList = void 0, a(); } const l = defineComponent({ name: "ElLoading", setup(f, { expose: h10 }) { const { ns: p, zIndex: v } = Dj("loading"); return h10({ ns: p, zIndex: v }), () => { const m = r.spinner || r.svg, g = h("svg", { class: "circular", viewBox: r.svgViewBox ? r.svgViewBox : "0 0 50 50", ...m ? { innerHTML: m } : {} }, [ h("circle", { class: "path", cx: "25", cy: "25", r: "20", fill: "none" }) ]), b = r.text ? h("p", { class: p.b("text") }, [r.text]) : void 0; return h(Transition, { name: p.b("fade"), onAfterLeave: u }, { default: withCtx(() => [ withDirectives(createVNode("div", { style: { backgroundColor: r.background || "" }, class: [ p.b("mask"), r.customClass, r.fullscreen ? "is-fullscreen" : "" ] }, [ h("div", { class: p.b("spinner") }, [g, b]) ]), [[vShow, r.visible]]) ]) }); }; } }), c = createApp(l), d = c.mount(document.createElement("div")); return { ...toRefs(r), setText: o, removeElLoadingChild: i, close: s, handleAfterLeave: u, vm: d, get $el() { return d.$el; } }; } var Td; var qU = function(e17 = {}) { if (!Ur) return; const t = WU(e17); 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), nextTick(() => n.visible.value = t.visible), t.fullscreen && (Td = n), n; }; var WU = (e17) => { var t, n, r, o; let a; return zl(e17.target) ? a = (t = document.querySelector(e17.target)) != null ? t : document.body : a = e17.target || document.body, { parent: a === document.body || e17.body ? document.body : a, background: e17.background || "", svg: e17.svg || "", svgViewBox: e17.svgViewBox || "", spinner: e17.spinner || false, text: e17.text || "", fullscreen: a === document.body && ((n = e17.fullscreen) != null ? n : true), lock: (r = e17.lock) != null ? r : false, customClass: e17.customClass || "", visible: (o = e17.visible) != null ? o : true, beforeClose: e17.beforeClose, closed: e17.closed, target: a }; }; var KU = async (e17, t, n) => { const { nextZIndex: r } = n.vm.zIndex || n.vm._.exposed.zIndex, o = {}; if (e17.fullscreen) n.originalPosition.value = cu(document.body, "position"), n.originalOverflow.value = cu(document.body, "overflow"), o.zIndex = r(); else if (e17.parent === document.body) { n.originalPosition.value = cu(document.body, "position"), await nextTick(); for (const a of ["top", "left"]) { const i = a === "top" ? "scrollTop" : "scrollLeft"; o[a] = `${e17.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] = `${e17.target.getBoundingClientRect()[a]}px`; } else n.originalPosition.value = cu(t, "position"); for (const [a, i] of Object.entries(o)) n.$el.style[a] = i; }; var S2 = (e17, 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")), e17.fullscreen && e17.lock ? Xb(t, r.bm("parent", "hidden")) : Rp(t, r.bm("parent", "hidden")); }; var ip = Symbol("ElLoading"); var _2 = (e17, t) => { var n, r, o, a; const i = t.instance, s = (f) => Rc(t.value) ? t.value[f] : void 0, u = (f) => { const h10 = zl(f) && (i == null ? void 0 : i[f]) || f; return h10 && ref(h10); }, l = (f) => u(s(f) || e17.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 : e17, body: (o = s("body")) != null ? o : t.modifiers.body, lock: (a = s("lock")) != null ? a : t.modifiers.lock }; e17[ip] = { options: d, instance: qU(d) }; }; var GU = (e17, t) => { for (const n of Object.keys(t)) isRef(t[n]) && (t[n].value = e17[n]); }; var XU = { mounted(e17, t) { t.value && _2(e17, t); }, updated(e17, t) { const n = e17[ip]; t.oldValue !== t.value && (t.value && !t.oldValue ? _2(e17, t) : t.value && t.oldValue ? Rc(t.value) && GU(t.value, n.options) : n == null || n.instance.close()); }, unmounted(e17) { var t; (t = e17[ip]) == null || t.instance.close(), e17[ip] = null; } }; function Y5(e17, t) { return function() { return e17.apply(t, arguments); }; } var { toString: YU } = Object.prototype; var { getPrototypeOf: Om } = Object; var Wf = /* @__PURE__ */ ((e17) => (t) => { const n = YU.call(t); return e17[n] || (e17[n] = n.slice(8, -1).toLowerCase()); })(/* @__PURE__ */ Object.create(null)); var Bo = (e17) => (e17 = e17.toLowerCase(), (t) => Wf(t) === e17); var Kf = (e17) => (t) => typeof t === e17; var { isArray: jl } = Array; var ac = Kf("undefined"); function ZU(e17) { return e17 !== null && !ac(e17) && e17.constructor !== null && !ac(e17.constructor) && qr(e17.constructor.isBuffer) && e17.constructor.isBuffer(e17); } var Z5 = Bo("ArrayBuffer"); function JU(e17) { let t; return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e17) : t = e17 && e17.buffer && Z5(e17.buffer), t; } var QU = Kf("string"); var qr = Kf("function"); var J5 = Kf("number"); var Gf = (e17) => e17 !== null && typeof e17 == "object"; var eq = (e17) => e17 === true || e17 === false; var sp = (e17) => { if (Wf(e17) !== "object") return false; const t = Om(e17); return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e17) && !(Symbol.iterator in e17); }; var tq = Bo("Date"); var nq = Bo("File"); var rq = Bo("Blob"); var oq = Bo("FileList"); var aq = (e17) => Gf(e17) && qr(e17.pipe); var iq = (e17) => { let t; return e17 && (typeof FormData == "function" && e17 instanceof FormData || qr(e17.append) && ((t = Wf(e17)) === "formdata" || // detect form-data instance t === "object" && qr(e17.toString) && e17.toString() === "[object FormData]")); }; var sq = Bo("URLSearchParams"); var [lq, uq, cq, dq] = ["ReadableStream", "Request", "Response", "Headers"].map(Bo); var pq = (e17) => e17.trim ? e17.trim() : e17.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ""); function Vc(e17, t, { allOwnKeys: n = false } = {}) { if (e17 === null || typeof e17 > "u") return; let r, o; if (typeof e17 != "object" && (e17 = [e17]), jl(e17)) for (r = 0, o = e17.length; r < o; r++) t.call(null, e17[r], r, e17); else { const a = n ? Object.getOwnPropertyNames(e17) : Object.keys(e17), i = a.length; let s; for (r = 0; r < i; r++) s = a[r], t.call(null, e17[s], s, e17); } } function Q5(e17, t) { t = t.toLowerCase(); const n = Object.keys(e17); let r = n.length, o; for (; r-- > 0; ) if (o = n[r], t === o.toLowerCase()) return o; return null; } var Gi = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global; var e4 = (e17) => !ac(e17) && e17 !== Gi; function p0() { const { caseless: e17 } = e4(this) && this || {}, t = {}, n = (r, o) => { const a = e17 && 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; } var fq = (e17, t, n, { allOwnKeys: r } = {}) => (Vc(t, (o, a) => { n && qr(o) ? e17[a] = Y5(o, n) : e17[a] = o; }, { allOwnKeys: r }), e17); var hq = (e17) => (e17.charCodeAt(0) === 65279 && (e17 = e17.slice(1)), e17); var vq = (e17, t, n, r) => { e17.prototype = Object.create(t.prototype, r), e17.prototype.constructor = e17, Object.defineProperty(e17, "super", { value: t.prototype }), n && Object.assign(e17.prototype, n); }; var gq = (e17, t, n, r) => { let o, a, i; const s = {}; if (t = t || {}, e17 == null) return t; do { for (o = Object.getOwnPropertyNames(e17), a = o.length; a-- > 0; ) i = o[a], (!r || r(i, e17, t)) && !s[i] && (t[i] = e17[i], s[i] = true); e17 = n !== false && Om(e17); } while (e17 && (!n || n(e17, t)) && e17 !== Object.prototype); return t; }; var mq = (e17, t, n) => { e17 = String(e17), (n === void 0 || n > e17.length) && (n = e17.length), n -= t.length; const r = e17.indexOf(t, n); return r !== -1 && r === n; }; var yq = (e17) => { if (!e17) return null; if (jl(e17)) return e17; let t = e17.length; if (!J5(t)) return null; const n = new Array(t); for (; t-- > 0; ) n[t] = e17[t]; return n; }; var bq = /* @__PURE__ */ ((e17) => (t) => e17 && t instanceof e17)(typeof Uint8Array < "u" && Om(Uint8Array)); var wq = (e17, t) => { const n = (e17 && e17[Symbol.iterator]).call(e17); let r; for (; (r = n.next()) && !r.done; ) { const o = r.value; t.call(e17, o[0], o[1]); } }; var xq = (e17, t) => { let n; const r = []; for (; (n = e17.exec(t)) !== null; ) r.push(n); return r; }; var kq = Bo("HTMLFormElement"); var Cq = (e17) => e17.toLowerCase().replace( /[-_\s]([a-z\d])(\w*)/g, function(t, n, r) { return n.toUpperCase() + r; } ); var T2 = (({ hasOwnProperty: e17 }) => (t, n) => e17.call(t, n))(Object.prototype); var Eq = Bo("RegExp"); var t4 = (e17, t) => { const n = Object.getOwnPropertyDescriptors(e17), r = {}; Vc(n, (o, a) => { let i; (i = t(o, a, e17)) !== false && (r[a] = i || o); }), Object.defineProperties(e17, r); }; var Sq = (e17) => { t4(e17, (t, n) => { if (qr(e17) && ["arguments", "caller", "callee"].indexOf(n) !== -1) return false; const r = e17[n]; if (qr(r)) { if (t.enumerable = false, "writable" in t) { t.writable = false; return; } t.set || (t.set = () => { throw Error("Can not rewrite read-only method '" + n + "'"); }); } }); }; var _q = (e17, t) => { const n = {}, r = (o) => { o.forEach((a) => { n[a] = true; }); }; return jl(e17) ? r(e17) : r(String(e17).split(t)), n; }; var Tq = () => { }; var Oq = (e17, t) => e17 != null && Number.isFinite(e17 = +e17) ? e17 : t; var iv = "abcdefghijklmnopqrstuvwxyz"; var O2 = "0123456789"; var n4 = { DIGIT: O2, ALPHA: iv, ALPHA_DIGIT: iv + iv.toUpperCase() + O2 }; var Pq = (e17 = 16, t = n4.ALPHA_DIGIT) => { let n = ""; const { length: r } = t; for (; e17--; ) n += t[Math.random() * r | 0]; return n; }; function $q(e17) { return !!(e17 && qr(e17.append) && e17[Symbol.toStringTag] === "FormData" && e17[Symbol.iterator]); } var Aq = (e17) => { 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(e17, 0); }; var Fq = Bo("AsyncFunction"); var Iq = (e17) => e17 && (Gf(e17) || qr(e17)) && qr(e17.then) && qr(e17.catch); var r4 = ((e17, t) => e17 ? setImmediate : t ? ((n, r) => (Gi.addEventListener("message", ({ source: o, data: a }) => { o === Gi && a === n && r.length && r.shift()(); }, false), (o) => { r.push(o), Gi.postMessage(n, "*"); }))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))( typeof setImmediate == "function", qr(Gi.postMessage) ); var Nq = typeof queueMicrotask < "u" ? queueMicrotask.bind(Gi) : typeof process < "u" && process.nextTick || r4; var 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(e17, t, n, r, o) { Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e17, 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 }; } }); var o4 = kt.prototype; var 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((e17) => { a4[e17] = { value: e17 }; }); Object.defineProperties(kt, a4); Object.defineProperty(o4, "isAxiosError", { value: true }); kt.from = (e17, t, n, r, o, a) => { const i = Object.create(o4); return xe.toFlatObject(e17, i, function(s) { return s !== Error.prototype; }, (s) => s !== "isAxiosError"), kt.call(i, e17.message, t, n, r, o), i.cause = e17, i.name = e17.name, a && Object.assign(i, a), i; }; var Lq = null; function f0(e17) { return xe.isPlainObject(e17) || xe.isArray(e17); } function i4(e17) { return xe.endsWith(e17, "[]") ? e17.slice(0, -2) : e17; } function P2(e17, t, n) { return e17 ? e17.concat(t).map(function(r, o) { return r = i4(r), !n && o ? "[" + r + "]" : r; }).join(n ? "." : "") : t; } function Dq(e17) { return xe.isArray(e17) && !e17.some(f0); } var Rq = xe.toFlatObject(xe, {}, null, function(e17) { return /^is[A-Z]/.test(e17); }); function Xf(e17, t, n) { if (!xe.isObject(e17)) throw new TypeError("target must be an object"); t = t || new FormData(), n = xe.toFlatObject(n, { metaTokens: true, dots: false, indexes: false }, false, function(h10, p) { return !xe.isUndefined(p[h10]); }); 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(h10) { if (h10 === null) return ""; if (xe.isDate(h10)) return h10.toISOString(); if (!s && xe.isBlob(h10)) throw new kt("Blob is not supported. Use a Buffer instead."); return xe.isArrayBuffer(h10) || xe.isTypedArray(h10) ? s && typeof Blob == "function" ? new Blob([h10]) : Buffer.from(h10) : h10; } function l(h10, p, v) { let m = h10; if (h10 && !v && typeof h10 == "object") { if (xe.endsWith(p, "{}")) p = r ? p : p.slice(0, -2), h10 = JSON.stringify(h10); else if (xe.isArray(h10) && Dq(h10) || (xe.isFileList(h10) || xe.endsWith(p, "[]")) && (m = xe.toArray(h10))) return p = i4(p), m.forEach(function(g, b) { !(xe.isUndefined(g) || g === null) && t.append( // eslint-disable-next-line no-nested-ternary i === true ? P2([p], b, a) : i === null ? p : p + "[]", u(g) ); }), false; } return f0(h10) ? true : (t.append(P2(v, p, a), u(h10)), false); } const c = [], d = Object.assign(Rq, { defaultVisitor: l, convertValue: u, isVisitable: f0 }); function f(h10, p) { if (!xe.isUndefined(h10)) { if (c.indexOf(h10) !== -1) throw Error("Circular reference detected in " + p.join(".")); c.push(h10), xe.forEach(h10, function(v, m) { (!(xe.isUndefined(v) || v === null) && o.call( t, v, xe.isString(m) ? m.trim() : m, p, d )) === true && f(v, p ? p.concat(m) : [m]); }), c.pop(); } } if (!xe.isObject(e17)) throw new TypeError("data must be an object"); return f(e17), t; } function $2(e17) { const t = { "!": "%21", "'": "%27", "(": "%28", ")": "%29", "~": "%7E", "%20": "+", "%00": "\0" }; return encodeURIComponent(e17).replace(/[!'()~]|%20|%00/g, function(n) { return t[n]; }); } function Pm(e17, t) { this._pairs = [], e17 && Xf(e17, this, t); } var s4 = Pm.prototype; s4.append = function(e17, t) { this._pairs.push([e17, t]); }; s4.toString = function(e17) { const t = e17 ? function(n) { return e17.call(this, n, $2); } : $2; return this._pairs.map(function(n) { return t(n[0]) + "=" + t(n[1]); }, "").join("&"); }; function Bq(e17) { return encodeURIComponent(e17).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]"); } function l4(e17, t, n) { if (!t) return e17; 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 = e17.indexOf("#"); i !== -1 && (e17 = e17.slice(0, i)), e17 += (e17.indexOf("?") === -1 ? "?" : "&") + a; } return e17; } var 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 : false, 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); }); } }; var u4 = { silentJSONParsing: true, forcedJSONParsing: true, clarifyTimeoutError: false }; var Mq = typeof URLSearchParams < "u" ? URLSearchParams : Pm; var zq = typeof FormData < "u" ? FormData : null; var Vq = typeof Blob < "u" ? Blob : null; var jq = { isBrowser: true, classes: { URLSearchParams: Mq, FormData: zq, Blob: Vq }, protocols: ["http", "https", "file", "blob", "url", "data"] }; var $m = typeof window < "u" && typeof document < "u"; var h0 = typeof navigator == "object" && navigator || void 0; var Hq = $m && (!h0 || ["ReactNative", "NativeScript", "NS"].indexOf(h0.product) < 0); var Uq = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef self instanceof WorkerGlobalScope && typeof self.importScripts == "function"; var qq = $m && window.location.href || "http://localhost"; var Wq = Object.freeze(Object.defineProperty({ __proto__: null, hasBrowserEnv: $m, hasStandardBrowserEnv: Hq, hasStandardBrowserWebWorkerEnv: Uq, navigator: h0, origin: qq }, Symbol.toStringTag, { value: "Module" })); var Nr = { ...Wq, ...jq }; function Kq(e17, t) { return Xf(e17, new Nr.classes.URLSearchParams(), Object.assign({ visitor: function(n, r, o, a) { return Nr.isNode && xe.isBuffer(n) ? (this.append(r, n.toString("base64")), false) : a.defaultVisitor.apply(this, arguments); } }, t)); } function Gq(e17) { return xe.matchAll(/\w+|\[(\w*)]/g, e17).map((t) => t[0] === "[]" ? "" : t[1] || t[0]); } function Xq(e17) { const t = {}, n = Object.keys(e17); let r; const o = n.length; let a; for (r = 0; r < o; r++) a = n[r], t[a] = e17[a]; return t; } function c4(e17) { function t(n, r, o, a) { let i = n[a++]; if (i === "__proto__") return true; 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(e17) && xe.isFunction(e17.entries)) { const n = {}; return xe.forEachEntry(e17, (r, o) => { t(Gq(r), o, n, 0); }), n; } return null; } function Yq(e17, t, n) { if (xe.isString(e17)) try { return (t || JSON.parse)(e17), xe.trim(e17); } catch (r) { if (r.name !== "SyntaxError") throw r; } return (0, JSON.stringify)(e17); } var jc = { transitional: u4, adapter: ["xhr", "http", "fetch"], transformRequest: [function(e17, t) { const n = t.getContentType() || "", r = n.indexOf("application/json") > -1, o = xe.isObject(e17); if (o && xe.isHTMLForm(e17) && (e17 = new FormData(e17)), xe.isFormData(e17)) return r ? JSON.stringify(c4(e17)) : e17; if (xe.isArrayBuffer(e17) || xe.isBuffer(e17) || xe.isStream(e17) || xe.isFile(e17) || xe.isBlob(e17) || xe.isReadableStream(e17)) return e17; if (xe.isArrayBufferView(e17)) return e17.buffer; if (xe.isURLSearchParams(e17)) return t.setContentType("application/x-www-form-urlencoded;charset=utf-8", false), e17.toString(); let a; if (o) { if (n.indexOf("application/x-www-form-urlencoded") > -1) return Kq(e17, this.formSerializer).toString(); if ((a = xe.isFileList(e17)) || n.indexOf("multipart/form-data") > -1) { const i = this.env && this.env.FormData; return Xf( a ? { "files[]": e17 } : e17, i && new i(), this.formSerializer ); } } return o || r ? (t.setContentType("application/json", false), Yq(e17)) : e17; }], transformResponse: [function(e17) { const t = this.transitional || jc.transitional, n = t && t.forcedJSONParsing, r = this.responseType === "json"; if (xe.isResponse(e17) || xe.isReadableStream(e17)) return e17; if (e17 && xe.isString(e17) && (n && !this.responseType || r)) { const o = !(t && t.silentJSONParsing) && r; try { return JSON.parse(e17); } catch (a) { if (o) throw a.name === "SyntaxError" ? kt.from(a, kt.ERR_BAD_RESPONSE, this, null, this.response) : a; } } return e17; }], /** * 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(e17) { return e17 >= 200 && e17 < 300; }, headers: { common: { Accept: "application/json, text/plain, */*", "Content-Type": void 0 } } }; xe.forEach(["delete", "get", "head", "post", "put", "patch"], (e17) => { jc.headers[e17] = {}; }); var 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" ]); var Jq = (e17) => { const t = {}; let n, r, o; return e17 && e17.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; }; var F2 = Symbol("internals"); function pu(e17) { return e17 && String(e17).trim().toLowerCase(); } function lp(e17) { return e17 === false || e17 == null ? e17 : xe.isArray(e17) ? e17.map(lp) : String(e17); } function Qq(e17) { const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g; let r; for (; r = n.exec(e17); ) t[r[1]] = r[2]; return t; } var eW = (e17) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e17.trim()); function sv(e17, 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(e17) { return e17.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r); } function nW(e17, t) { const n = xe.toCamelCase(" " + t); ["get", "set", "has"].forEach((r) => { Object.defineProperty(e17, r + n, { value: function(o, a, i) { return this[r].call(this, t, o, a, i); }, configurable: true }); }); } var Lr = class { 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 === true || l === void 0 && o[d] !== false) && (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 === true) 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 false; } delete(t, n) { const r = this; let o = false; 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 = true); } } return xe.isArray(t) ? t.forEach(a) : a(t), o; } clear(t) { const n = Object.keys(this); let r = n.length, o = false; for (; r--; ) { const a = n[r]; (!t || sv(this, this[a], a, t, true)) && (delete this[a], o = true); } 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] = true; }), 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 !== false && (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] = true); } 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: e17 }, t) => { let n = t[0].toUpperCase() + t.slice(1); return { get: () => e17, set(r) { this[n] = r; } }; }); xe.freezeMethods(Lr); function lv(e17, t) { const n = this || jc, r = t || n, o = Lr.from(r.headers); let a = r.data; return xe.forEach(e17, function(i) { a = i.call(n, a, o.normalize(), t ? t.status : void 0); }), o.normalize(), a; } function d4(e17) { return !!(e17 && e17.__CANCEL__); } function Hl(e17, t, n) { kt.call(this, e17 ?? "canceled", kt.ERR_CANCELED, t, n), this.name = "CanceledError"; } xe.inherits(Hl, kt, { __CANCEL__: true }); function p4(e17, t, n) { const r = n.config.validateStatus; !n.status || !r || r(n.status) ? e17(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(e17) { const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e17); return t && t[1] || ""; } function oW(e17, t) { e17 = e17 || 10; const n = new Array(e17), r = new Array(e17); 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 % e17; if (o = (o + 1) % e17, o === a && (a = (a + 1) % e17), u - i < t) return; const f = l && u - l; return f ? Math.round(d * 1e3 / f) : void 0; }; } function aW(e17, t) { let n = 0, r = 1e3 / t, o, a; const i = (s, u = Date.now()) => { n = u, o = null, a && (clearTimeout(a), a = null), e17.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)]; } var jp = (e17, 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"]: true }; e17(d); }, n); }; var I2 = (e17, t) => { const n = e17 != null; return [(r) => t[0]({ lengthComputable: n, total: e17, loaded: r }), t[1]]; }; var N2 = (e17) => (...t) => xe.asap(() => e17(...t)); var 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 e17 = Nr.navigator && /(msie|trident)/i.test(Nr.navigator.userAgent), t = document.createElement("a"); let n; function r(o) { let a = o; return e17 && (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 true; }; }() ); var sW = Nr.hasStandardBrowserEnv ? ( // Standard browser envs support document.cookie { write(e17, t, n, r, o, a) { const i = [e17 + "=" + 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 === true && i.push("secure"), document.cookie = i.join("; "); }, read(e17) { const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e17 + ")=([^;]*)")); return t ? decodeURIComponent(t[3]) : null; }, remove(e17) { this.write(e17, "", Date.now() - 864e5); } } ) : ( // Non-standard browser env (web workers, react-native) lack needed support. { write() { }, read() { return null; }, remove() { } } ); function lW(e17) { return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e17); } function uW(e17, t) { return t ? e17.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e17; } function f4(e17, t) { return e17 && !lW(t) ? uW(e17, t) : t; } var L2 = (e17) => e17 instanceof Lr ? { ...e17 } : e17; function ps(e17, 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 e17) 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), true) }; return xe.forEach(Object.keys(Object.assign({}, e17, t)), function(l) { const c = u[l] || o, d = c(e17[l], t[l], l); xe.isUndefined(d) && c !== s || (n[l] = d); }), n; } var h4 = (e17) => { const t = ps({}, e17); 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), e17.params, e17.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()) !== false) { 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 !== false && iW(t.url))) { const l = o && a && sW.read(a); l && i.set(o, l); } return t; }; var cW = typeof XMLHttpRequest < "u"; var dW = cW && function(e17) { return new Promise(function(t, n) { const r = h4(e17); let o = r.data; const a = Lr.from(r.headers).normalize(); let { responseType: i, onUploadProgress: s, onDownloadProgress: u } = r, l, c, d, f, h10; function p() { f && f(), h10 && h10(), r.cancelToken && r.cancelToken.unsubscribe(l), r.signal && r.signal.removeEventListener("abort", l); } let v = new XMLHttpRequest(); v.open(r.method.toUpperCase(), r.url, true), 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: e17, 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, e17, v)), v = null); }, v.onerror = function() { n(new kt("Network Error", kt.ERR_NETWORK, e17, 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, e17, 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, h10] = jp(u, true), 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, e17, 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, e17)); return; } v.send(o || null); }); }; var pW = (e17, t) => { const { length: n } = e17 = e17 ? e17.filter(Boolean) : []; if (t || n) { let r = new AbortController(), o; const a = function(l) { if (!o) { o = true, 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 = () => { e17 && (i && clearTimeout(i), i = null, e17.forEach((l) => { l.unsubscribe ? l.unsubscribe(a) : l.removeEventListener("abort", a); }), e17 = null); }; e17.forEach((l) => l.addEventListener("abort", a)); const { signal: u } = r; return u.unsubscribe = () => xe.asap(s), u; } }; var fW = function* (e17, t) { let n = e17.byteLength; if (n < t) { yield e17; return; } let r = 0, o; for (; r < n; ) o = r + t, yield e17.slice(r, o), r = o; }; var hW = async function* (e17, t) { for await (const n of vW(e17)) yield* fW(n, t); }; var vW = async function* (e17) { if (e17[Symbol.asyncIterator]) { yield* e17; return; } const t = e17.getReader(); try { for (; ; ) { const { done: n, value: r } = await t.read(); if (n) break; yield r; } } finally { await t.cancel(); } }; var D2 = (e17, t, n, r) => { const o = hW(e17, t); let a = 0, i, s = (u) => { i || (i = true, 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 }); }; var Yf = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function"; var v4 = Yf && typeof ReadableStream == "function"; var gW = Yf && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e17) => (t) => e17.encode(t))(new TextEncoder()) : async (e17) => new Uint8Array(await new Response(e17).arrayBuffer())); var g4 = (e17, ...t) => { try { return !!e17(...t); } catch { return false; } }; var mW = v4 && g4(() => { let e17 = false; const t = new Request(Nr.origin, { body: new ReadableStream(), method: "POST", get duplex() { return e17 = true, "half"; } }).headers.has("Content-Type"); return e17 && !t; }); var R2 = 64 * 1024; var v0 = v4 && g4(() => xe.isReadableStream(new Response("").body)); var Hp = { stream: v0 && ((e17) => e17.body) }; Yf && ((e17) => { ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => { !Hp[t] && (Hp[t] = xe.isFunction(e17[t]) ? (n) => n[t]() : (n, r) => { throw new kt(`Response type '${t}' is not supported`, kt.ERR_NOT_SUPPORT, r); }); }); })(new Response()); var yW = async (e17) => { if (e17 == null) return 0; if (xe.isBlob(e17)) return e17.size; if (xe.isSpecCompliantForm(e17)) return (await new Request(Nr.origin, { method: "POST", body: e17 }).arrayBuffer()).byteLength; if (xe.isArrayBufferView(e17) || xe.isArrayBuffer(e17)) return e17.byteLength; if (xe.isURLSearchParams(e17) && (e17 = e17 + ""), xe.isString(e17)) return (await gW(e17)).byteLength; }; var bW = async (e17, t) => xe.toFiniteNumber(e17.getContentLength()) ?? yW(t); var wW = Yf && (async (e17) => { 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(e17); l = l ? (l + "").toLowerCase() : "text"; let h10 = pW([o, a && a.toAbortSignal()], i), p; const v = h10 && h10.unsubscribe && (() => { h10.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: h10, 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), true) ) || []; 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, e17); 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: e17, 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, e17, p), { cause: g.cause || g } ) : kt.from(g, g && g.code, e17, p); } }); var g0 = { http: Lq, xhr: dW, fetch: wW }; xe.forEach(g0, (e17, t) => { if (e17) { try { Object.defineProperty(e17, "name", { value: t }); } catch { } Object.defineProperty(e17, "adapterName", { value: t }); } }); var B2 = (e17) => `- ${e17}`; var xW = (e17) => xe.isFunction(e17) || e17 === null || e17 === false; var m4 = { getAdapter: (e17) => { e17 = xe.isArray(e17) ? e17 : [e17]; const { length: t } = e17; let n, r; const o = {}; for (let a = 0; a < t; a++) { n = e17[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 === false ? "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(e17) { if (e17.cancelToken && e17.cancelToken.throwIfRequested(), e17.signal && e17.signal.aborted) throw new Hl(null, e17); } function M2(e17) { return uv(e17), e17.headers = Lr.from(e17.headers), e17.data = lv.call( e17, e17.transformRequest ), ["post", "put", "patch"].indexOf(e17.method) !== -1 && e17.headers.setContentType("application/x-www-form-urlencoded", false), m4.getAdapter(e17.adapter || jc.adapter)(e17).then(function(t) { return uv(e17), t.data = lv.call( e17, e17.transformResponse, t ), t.headers = Lr.from(t.headers), t; }, function(t) { return d4(t) || (uv(e17), t && t.response && (t.response.data = lv.call( e17, e17.transformResponse, t.response ), t.response.headers = Lr.from(t.response.headers))), Promise.reject(t); }); } var y4 = "1.7.7"; var Am = {}; ["object", "boolean", "number", "function", "string", "symbol"].forEach((e17, t) => { Am[e17] = function(n) { return typeof n === e17 || "a" + (t < 1 ? "n " : " ") + e17; }; }); var z2 = {}; Am.transitional = function(e17, t, n) { function r(o, a) { return "[Axios v" + y4 + "] Transitional option '" + o + "'" + a + (n ? ". " + n : ""); } return (o, a, i) => { if (e17 === false) throw new kt( r(a, " has been removed" + (t ? " in " + t : "")), kt.ERR_DEPRECATED ); return t && !z2[a] && (z2[a] = true, console.warn( r( a, " has been deprecated since v" + t + " and will be removed in the near future" ) )), e17 ? e17(o, a, i) : true; }; }; function kW(e17, t, n) { if (typeof e17 != "object") throw new kt("options must be an object", kt.ERR_BAD_OPTION_VALUE); const r = Object.keys(e17); let o = r.length; for (; o-- > 0; ) { const a = r[o], i = t[a]; if (i) { const s = e17[a], u = s === void 0 || i(s, a, e17); if (u !== true) throw new kt("option " + a + " must be " + u, kt.ERR_BAD_OPTION_VALUE); continue; } if (n !== true) throw new kt("Unknown option " + a, kt.ERR_BAD_OPTION); } } var m0 = { assertOptions: kW, validators: Am }; var Va = m0.validators; var ns = class { 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) }, false), o != null && (xe.isFunction(o) ? n.paramsSerializer = { serialize: o } : m0.assertOptions(o, { encode: Va.function, serialize: Va.function }, true)), 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 = true; this.interceptors.request.forEach(function(p) { typeof p.runWhen == "function" && p.runWhen(n) === false || (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 h10 = n; for (d = 0; d < f; ) { const p = s[d++], v = s[d++]; try { h10 = p(h10); } catch (m) { v.call(this, m); break; } } try { c = M2.call(this, h10); } 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(e17) { ns.prototype[e17] = function(t, n) { return this.request(ps(n || {}, { method: e17, url: t, data: (n || {}).data })); }; }); xe.forEach(["post", "put", "patch"], function(e17) { function t(n) { return function(r, o, a) { return this.request(ps(a || {}, { method: e17, headers: n ? { "Content-Type": "multipart/form-data" } : {}, url: r, data: o })); }; } ns.prototype[e17] = t(), ns.prototype[e17 + "Form"] = t(true); }); var Fm = 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(e17) { return function(t) { return e17.apply(null, t); }; } function EW(e17) { return xe.isObject(e17) && e17.isAxiosError === true; } var 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(([e17, t]) => { y0[t] = e17; }); function b4(e17) { const t = new ns(e17), n = Y5(ns.prototype.request, t); return xe.extend(n, ns.prototype, t, { allOwnKeys: true }), xe.extend(n, t, null, { allOwnKeys: true }), n.create = function(r) { return b4(ps(e17, r)); }, n; } var 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(e17) { return Promise.all(e17); }; Pn.spread = CW; Pn.isAxiosError = EW; Pn.mergeConfig = ps; Pn.AxiosHeaders = Lr; Pn.formToJSON = (e17) => c4(xe.isHTMLForm(e17) ? new FormData(e17) : e17); Pn.getAdapter = m4.getAdapter; Pn.HttpStatusCode = y0; Pn.default = Pn; var 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 e17 = SW; async function t(n, r, o) { return await Pn({ method: "get", url: n, params: r, timeout: o }); } return { defaultImg: e17, getRequest: t }; } var TW = ["src"]; var OW = ["src"]; var PW = { key: 1, class: "details" }; var $W = { key: 0 }; var AW = { class: "title text-placeholder" }; var FW = { __name: "Card", props: { data: { type: Object, required: true }, 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(e17, { emit: t }) { function n(g) { let b; try { b = new URL(g); } catch { return false; } return b.protocol === "http:" || b.protocol === "https:"; } const { defaultImg: r, getRequest: o } = _W(), a = ref(); ref(null), ref(4); const i = ref(void 0), s = ref(false), u = ref(false), l = ref(false), c = e17, d = t, f = computed(() => c.data.title && ((i ? i.value : false) || s.value) && (c.data.link || c.data.userData)); computed(() => showCardDetails ? height * 0.525 : height), computed(() => width - 2 * h10), computed(() => height * 0.237); const h10 = computed(() => height * 0.076); computed(() => showCardDetails ? height * 0.525 : height), watch( () => c.data, () => { i.value = void 0, s.value = false, l.value = false, u.value = false, c.data.thumbnail ? n(c.data.thumbnail) && c.data.mimetype ? v(c.data.thumbnail, { fetchAttempts: 0 }) : i.value = c.data.thumbnail : s.value = true, nextTick(() => { m(); }); }, { immediate: true } ), onUpdated(() => { nextTick(() => { 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 = true; } ); } function m() { if (c.data.hideTitle) u.value = true, l.value = true; else { const g = a; g && g.offsetParent ? (l.value = true, g.offsetWidth >= g.scrollWidth ? u.value = true : u.value = false) : c.data.title.length > 20 ? u.value = false : u.value = true; } } return (g, b) => { const x = HU, w = wU, C = SU, k = XU; return openBlock(), createBlock(C, { shadow: e17.shadow, "body-style": e17.bodyStyle, style: normalizeStyle({ padding: "0px", maxWidth: e17.width + "rem" }), class: "card" }, { default: withCtx(() => [ withDirectives((openBlock(), createElementBlock("div", null, [ createBaseVNode("div", { class: "cursor-pointer", style: normalizeStyle(e17.imageContainerStyle), onClick: withModifiers(p, ["prevent"]) }, [ s.value ? (openBlock(), createElementBlock("img", { key: 0, src: unref(r), style: normalizeStyle(e17.imageStyle) }, null, 12, TW)) : (openBlock(), createElementBlock("img", { key: 1, src: i.value, alt: "thumbnail loading ...", style: normalizeStyle(e17.imageStyle) }, null, 12, OW)) ], 4), createCommentVNode("", true), e17.showCardDetails ? (openBlock(), createElementBlock("div", PW, [ e17.data.hideType ? createCommentVNode("", true) : (openBlock(), createElementBlock("p", $W, [ createBaseVNode("b", null, toDisplayString(e17.data.type), 1) ])), createVNode(x, { "virtual-ref": a.value, disabled: u.value, content: e17.data.title, placement: "top", trigger: "hover", "popper-class": "gallery-popper", "virtual-triggering": "" }, null, 8, ["virtual-ref", "disabled", "content"]), withDirectives(createBaseVNode("p", { ref_key: "titleText", ref: a, class: "title" }, toDisplayString(e17.data.title), 513), [ [vShow, !e17.data.hideTitle] ]), withDirectives(createBaseVNode("p", AW, null, 512), [ [vShow, e17.data.hideTitle] ]), createVNode(w, { class: "button", onClick: withModifiers(p, ["prevent"]), size: "large" }, { default: withCtx(() => [ createTextVNode(" View " + toDisplayString(e17.data.type), 1) ]), _: 1 }) ])) : createCommentVNode("", true) ])), [ [k, !f.value] ]) ]), _: 1 }, 8, ["shadow", "body-style", "style"]); }; } }; var IW = nm(FW, [["__scopeId", "data-v-8306387d"]]); var Zf = (e17) => (pushScopeId("data-v-e745b327"), e17 = e17(), popScopeId(), e17); var NW = { ref: "myButton", class: "gallery" }; var LW = { class: "gallery-strip" }; var DW = Zf(() => createBaseVNode("span", { class: "progress-button" }, "‹", -1)); var RW = [ DW ]; var BW = { key: 1, style: { width: "2rem" } }; var MW = Zf(() => createBaseVNode("div", { class: "filler" }, null, -1)); var zW = { class: "card-line" }; var VW = Zf(() => createBaseVNode("div", { class: "filler" }, null, -1)); var jW = Zf(() => createBaseVNode("span", { class: "progress-button" }, "›", -1)); var HW = [ jW ]; var UW = { key: 3, style: { width: "2rem" } }; var 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: true }, /** * The option to highlight the active item. */ highlightActive: { type: Boolean, default: true }, /** * The option to show card details. */ showCardDetails: { type: Boolean, default: true }, /** * 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(e17, { expose: t, emit: n }) { function r(S) { return typeof window < "u" ? S * parseFloat(window.getComputedStyle(document.documentElement).fontSize) : S * 16; } const o = e17, a = n, i = ref(0), s = ref(0), u = ref(2), l = ref(2), c = computed(() => o.items.length), d = computed(() => s.value > 0), f = computed(() => s.value < c.value - 1), h10 = computed(() => 0.78 * o.cardWidth); computed(() => c.value * (o.cardWidth + 0.25) - 0.25); const p = computed(() => { 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 = computed(() => { const S = r(1), O = o.maxWidth / (S * c.value); return o.showIndicatorBar && O > 0.1 && c.value > 1; }), m = computed(() => { 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 = computed(() => { 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) => (openBlock(), createElementBlock("div", NW, [ createBaseVNode("div", LW, [ e17.items.length > 1 ? (openBlock(), createElementBlock("a", { key: 0, href: "#", class: normalizeClass(["oval", "prev", { disabled: !d.value }]), onClick: withModifiers(k, ["prevent"]) }, RW, 2)) : (openBlock(), createElementBlock("div", BW)), MW, createBaseVNode("div", zW, [ (openBlock(true), createElementBlock(Fragment, null, renderList(g.value, (F, $) => (openBlock(), createElementBlock("span", { key: "card_" + $, class: normalizeClass(["key-image-span", { active: w($) }]) }, [ F ? (openBlock(), createBlock(IW, { key: 0, data: F, "body-style": e17.bodyStyle, "image-container-style": e17.imageContainerStyle, "image-style": e17.imageStyle, width: e17.cardWidth, height: h10.value, shadow: e17.shadow, "show-card-details": e17.showCardDetails, onCardClicked: b, onDatalinkClicked: x }, null, 8, ["data", "body-style", "image-container-style", "image-style", "width", "height", "shadow", "show-card-details"])) : createCommentVNode("", true) ], 2))), 128)) ]), VW, e17.items.length > 1 ? (openBlock(), createElementBlock("a", { key: 2, href: "#", class: normalizeClass(["oval", "next", { disabled: !f.value }]), onClick: withModifiers(C, ["prevent"]) }, HW, 2)) : (openBlock(), createElementBlock("div", UW)) ]), createBaseVNode("div", { style: normalizeStyle(e17.bottomSpacer) }, null, 4), v.value ? (openBlock(), createBlock(HM, { key: 0, count: c.value, current: s.value, onClicked: E }, null, 8, ["count", "current"])) : createCommentVNode("", true) ], 512)); } }; var WW = nm(qW, [["__scopeId", "data-v-e745b327"]]); var KW = { name: "S3Bucket", data() { return { s3Bucket: void 0, s3Prefix: "" }; }, methods: { updateS3Bucket: function(e17) { if (this.s3Bucket = void 0, e17) { const t = e17.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; } } }; var Od = (e17) => e17.split("\\").pop().split("/").pop(); var fu = function(e17) { return e17.replace(/\b\w/g, (t) => t.toUpperCase()); }; var 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: false }; }, methods: { cardClicked: function(e17) { this.$emit("card-clicked", e17); }, datalinkClicked: function(e17) { this.$emit("datalink-clicked", e17); }, createSciCurnchItems: function() { this.updateS3Bucket(this.entry.s3uri), this.createDatasetItem(), this.createScaffoldItems(), this.createSimulationItems(), this.createPlotItems(), this.createSegmentationItems(); }, createDatasetItem: function() { const e17 = `${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: e17, hideType: true, hideTitle: true }); }, createImageItems: function() { this.entry.images && this.entry.images.forEach((e17) => { const t = e17.dataset.path, n = e17.identifier, r = `${this.envVars.ROOT_URL}/datasets/imageviewer?dataset_id=${this.datasetId}&dataset_version=${this.datasetVersion}&file_path=${t}&mimetype=${e17.mimetype.name}`; this.items.Images.push({ id: n, title: Od(t), type: "Image", link: r, hideType: true }); }); }, createPlotItems: function() { this.entry.plots && this.entry.plots.forEach((e17) => { const t = e17.dataset.path, n = e17.identifier, r = this.getThumbnailForPlot( e17, 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 = e17.datacite, s = `${this.envVars.API_LOCATION}/s3-resource/${this.getS3Prefix()}files/`, u = s + e17.dataset.path + this.getS3Args(); let l = {}; try { l = JSON.parse( i.supplemental_json_metadata.description ); } catch (h10) { console.warn(h10); } 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: true, mimetype: a }); }); }, createScaffoldItems: function() { if (this.entry.scaffolds) { let e17 = 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, e17 ); 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: true, mimetype: i }); }); } }, createSegmentationItems: function() { this.entry.segmentation && this.entry.segmentation.forEach((e17) => { const t = e17.id; let n = e17.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: true, mimetype: "image/png" }); }); }, createSimulationItems: function() { if (this.entry.simulation && this.entry.simulation.length > 0) { let e17 = { 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: true, hideTitle: true, userData: e17 }); } }, createVideoItems: function() { this.entry.videos && this.entry.videos.forEach((e17) => { const t = this.getS3FilePath( this.datasetId, this.datasetVersion, e17.dataset.path ), n = `${this.envVars.ROOT_URL}/datasets/videoviewer?dataset_version=${this.datasetVersion}&dataset_id=${this.datasetId}&file_path=${t}&mimetype=${e17.mimetype.name}`; this.items.Videos.push({ title: e17.name, type: "Video", thumbnail: this.defaultVideoImg, hideType: true, link: n }); }); }, onResize: function() { this.maxWidth = this.$el.clientWidth; }, getContextCardUrl: function(e17) { if (!(!this.entry.contextualInformation || this.entry.contextualInformation.length == 0)) { let t = this.entry["abi-contextual-information"].length == this.entry.scaffolds.length ? e17 : 0; return `${this.envVars.API_LOCATION}s3-resource/${this.getS3Prefix()}files/${this.entry.contextualInformation[t]}${this.getS3Args()}`; } }, getImageURL: function(e17, t) { let n = `${e17}/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 e17 = [...this.items.Dataset]; if (this.category === "All") { for (const [t, n] of Object.entries(this.items)) t !== "Dataset" && (e17 = e17.concat(n)); return e17; } else return [...this.items[this.category]]; } }, created: function() { this.createSciCurnchItems(); }, watch: { category: function() { this.resetIndex = true; }, galleryItems: function() { this.resetIndex = false; }, datasetBiolucida: { deep: true, immediate: true, handler: function(e17) { let t = []; "dataset_images" in e17 && t.push( ...Array.from(e17.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: true }; }) ), this.items.Images = t; } } }, mounted() { this.ro = new ResizeObserver(this.onResize).observe(this.$el); }, unmounted() { delete this.ro; } }; var XW = { class: "full-size" }; function YW(e17, t, n, r, o, a) { const i = resolveComponent("Gallery"); return openBlock(), createElementBlock("div", XW, [ createVNode(i, { bottomSpacer: o.bottomSpacer, cardWidth: 10, items: a.galleryItems, "max-width": o.maxWidth, "show-indicator-bar": false, "show-card-details": true, "highlight-active": false, "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"]) ]); } var w4 = Lo(GW, [["render", YW], ["__scopeId", "data-v-7e45605c"]]); function ZW(e17) { return { all: e17 = e17 || /* @__PURE__ */ new Map(), on: function(t, n) { var r = e17.get(t); r ? r.push(n) : e17.set(t, [n]); }, off: function(t, n) { var r = e17.get(t); r && (n ? r.splice(r.indexOf(n) >>> 0, 1) : e17.set(t, [])); }, emit: function(t, n) { var r = e17.get(t); r && r.slice().map(function(o) { o(n); }), (r = e17.get("*")) && r.slice().map(function(o) { o(t, n); }); } }; } var En = new ZW(); var Up = { "homo sapiens": "Human", "rattus norvegicus": "Rat", "mus musculus": "Mouse", "sus scrofa domesticus": "Pig", "sus scrofa": "Boar", "felis catus": "Cat" }; var 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; var QW = (e17, t, n) => t in e17 ? JW(e17, t, { enumerable: true, configurable: true, writable: true, value: n }) : e17[t] = n; var Uo = (e17, t, n) => QW(e17, typeof t != "symbol" ? t + "" : t, n); var va = (e17, t, { checkForDefaultPrevented: n = true } = {}) => (r) => { const o = e17 == null ? void 0 : e17(r); if (n === false || !o) return t == null ? void 0 : t(r); }; var j2; var _n = typeof window < "u"; var eK = (e17) => typeof e17 == "string"; var x4 = () => { }; var b0 = _n && ((j2 = window == null ? void 0 : window.navigator) == null ? void 0 : j2.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent); function k4(e17) { return typeof e17 == "function" ? e17() : unref(e17); } function tK(e17) { return e17; } function Jf(e17) { return getCurrentScope() ? (onScopeDispose(e17), true) : false; } function nK(e17, t = true) { getCurrentInstance() ? onMounted(e17) : t ? e17() : nextTick(e17); } function wa(e17) { var t; const n = k4(e17); return (t = n == null ? void 0 : n.$el) != null ? t : n; } var Qf = _n ? window : void 0; function Qr(...e17) { let t, n, r, o; if (eK(e17[0]) || Array.isArray(e17[0]) ? ([n, r, o] = e17, t = Qf) : [t, n, r, o] = e17, !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, h10) => (c.addEventListener(d, f, h10), () => c.removeEventListener(d, f, h10)), u = watch(() => [wa(t), k4(o)], ([c, d]) => { i(), c && a.push(...n.flatMap((f) => r.map((h10) => s(c, f, h10, d)))); }, { immediate: true, flush: "post" }), l = () => { u(), i(); }; return Jf(l), l; } var H2 = false; function rK(e17, t, n = {}) { const { window: r = Qf, ignore: o = [], capture: a = true, detectIframe: i = false } = n; if (!r) return; b0 && !H2 && (H2 = true, Array.from(r.document.body.children).forEach((c) => c.addEventListener("click", x4))); let s = true; 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(e17); if (!(!d || d === c.target || c.composedPath().includes(d))) { if (c.detail === 0 && (s = !u(c)), !s) { s = true; return; } t(c); } }, { passive: true, capture: a }), Qr(r, "pointerdown", (c) => { const d = wa(e17); d && (s = !c.composedPath().includes(d) && !u(c)); }, { passive: true }), i && Qr(r, "blur", (c) => { var d; const f = wa(e17); ((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(e17, t = false) { const n = ref(), r = () => n.value = !!e17(); return r(), nK(r, t), n; } var U2 = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}; var q2 = "__vueuse_ssr_handlers__"; U2[q2] = U2[q2] || {}; var W2 = Object.getOwnPropertySymbols; var oK = Object.prototype.hasOwnProperty; var aK = Object.prototype.propertyIsEnumerable; var iK = (e17, t) => { var n = {}; for (var r in e17) oK.call(e17, r) && t.indexOf(r) < 0 && (n[r] = e17[r]); if (e17 != null && W2) for (var r of W2(e17)) t.indexOf(r) < 0 && aK.call(e17, r) && (n[r] = e17[r]); return n; }; function ga(e17, 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 = watch(() => wa(e17), (d) => { u(), s.value && o && d && (i = new ResizeObserver(t), i.observe(d, a)); }, { immediate: true, flush: "post" }), c = () => { u(), l(); }; return Jf(c), { isSupported: s, stop: c }; } var K2 = Object.getOwnPropertySymbols; var sK = Object.prototype.hasOwnProperty; var lK = Object.prototype.propertyIsEnumerable; var uK = (e17, t) => { var n = {}; for (var r in e17) sK.call(e17, r) && t.indexOf(r) < 0 && (n[r] = e17[r]); if (e17 != null && K2) for (var r of K2(e17)) t.indexOf(r) < 0 && lK.call(e17, r) && (n[r] = e17[r]); return n; }; function cK(e17, 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 = watch(() => wa(e17), (d) => { u(), s.value && o && d && (i = new MutationObserver(t), i.observe(d, a)); }, { immediate: true }), c = () => { u(), l(); }; return Jf(c), { isSupported: s, stop: c }; } var G2; (function(e17) { e17.UP = "UP", e17.RIGHT = "RIGHT", e17.DOWN = "DOWN", e17.LEFT = "LEFT", e17.NONE = "NONE"; })(G2 || (G2 = {})); var dK = Object.defineProperty; var X2 = Object.getOwnPropertySymbols; var pK = Object.prototype.hasOwnProperty; var fK = Object.prototype.propertyIsEnumerable; var Y2 = (e17, t, n) => t in e17 ? dK(e17, t, { enumerable: true, configurable: true, writable: true, value: n }) : e17[t] = n; var hK = (e17, t) => { for (var n in t || (t = {})) pK.call(t, n) && Y2(e17, n, t[n]); if (X2) for (var n of X2(t)) fK.call(t, n) && Y2(e17, n, t[n]); return e17; }; var 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); var gK = () => _n && /firefox/i.test(window.navigator.userAgent); var Im = (e17) => { let t, n; return e17.type === "touchend" ? (n = e17.changedTouches[0].clientY, t = e17.changedTouches[0].clientX) : e17.type.startsWith("touch") ? (n = e17.touches[0].clientY, t = e17.touches[0].clientX) : (n = e17.clientY, t = e17.clientX), { clientX: t, clientY: n }; }; Object.freeze({}); Object.freeze([]); var ic = () => { }; var mK = Object.prototype.hasOwnProperty; var fs = (e17, t) => mK.call(e17, t); var Tr = Array.isArray; var wr = (e17) => typeof e17 == "function"; var ur = (e17) => typeof e17 == "string"; var Gn = (e17) => e17 !== null && typeof e17 == "object"; var yK = Object.prototype.toString; var bK = (e17) => yK.call(e17); var cv = (e17) => bK(e17).slice(8, -1); var E4 = (e17) => { const t = /* @__PURE__ */ Object.create(null); return (n) => t[n] || (t[n] = e17(n)); }; var wK = /-(\w)/g; var xK = E4((e17) => e17.replace(wK, (t, n) => n ? n.toUpperCase() : "")); var kK = /\B([A-Z])/g; var CK = E4( (e17) => e17.replace(kK, "-$1").toLowerCase() ); var S4 = typeof global == "object" && global && global.Object === Object && global; var EK = typeof self == "object" && self && self.Object === Object && self; var ia = S4 || EK || Function("return this")(); var ra = ia.Symbol; var _4 = Object.prototype; var SK = _4.hasOwnProperty; var _K = _4.toString; var hu = ra ? ra.toStringTag : void 0; function TK(e17) { var t = SK.call(e17, hu), n = e17[hu]; try { e17[hu] = void 0; var r = true; } catch { } var o = _K.call(e17); return r && (t ? e17[hu] = n : delete e17[hu]), o; } var OK = Object.prototype; var PK = OK.toString; function $K(e17) { return PK.call(e17); } var AK = "[object Null]"; var FK = "[object Undefined]"; var Z2 = ra ? ra.toStringTag : void 0; function Ul(e17) { return e17 == null ? e17 === void 0 ? FK : AK : Z2 && Z2 in Object(e17) ? TK(e17) : $K(e17); } function Cl(e17) { return e17 != null && typeof e17 == "object"; } var IK = "[object Symbol]"; function eh(e17) { return typeof e17 == "symbol" || Cl(e17) && Ul(e17) == IK; } function NK(e17, t) { for (var n = -1, r = e17 == null ? 0 : e17.length, o = Array(r); ++n < r; ) o[n] = t(e17[n], n, e17); return o; } var Ao = Array.isArray; var LK = 1 / 0; var J2 = ra ? ra.prototype : void 0; var Q2 = J2 ? J2.toString : void 0; function T4(e17) { if (typeof e17 == "string") return e17; if (Ao(e17)) return NK(e17, T4) + ""; if (eh(e17)) return Q2 ? Q2.call(e17) : ""; var t = e17 + ""; return t == "0" && 1 / e17 == -LK ? "-0" : t; } var DK = /\s/; function RK(e17) { for (var t = e17.length; t-- && DK.test(e17.charAt(t)); ) ; return t; } var BK = /^\s+/; function MK(e17) { return e17 && e17.slice(0, RK(e17) + 1).replace(BK, ""); } function vi(e17) { var t = typeof e17; return e17 != null && (t == "object" || t == "function"); } var ew = NaN; var zK = /^[-+]0x[0-9a-f]+$/i; var VK = /^0b[01]+$/i; var jK = /^0o[0-7]+$/i; var HK = parseInt; function tw(e17) { if (typeof e17 == "number") return e17; if (eh(e17)) return ew; if (vi(e17)) { var t = typeof e17.valueOf == "function" ? e17.valueOf() : e17; e17 = vi(t) ? t + "" : t; } if (typeof e17 != "string") return e17 === 0 ? e17 : +e17; e17 = MK(e17); var n = VK.test(e17); return n || jK.test(e17) ? HK(e17.slice(2), n ? 2 : 8) : zK.test(e17) ? ew : +e17; } function O4(e17) { return e17; } var UK = "[object AsyncFunction]"; var qK = "[object Function]"; var WK = "[object GeneratorFunction]"; var KK = "[object Proxy]"; function P4(e17) { if (!vi(e17)) return false; var t = Ul(e17); return t == qK || t == WK || t == UK || t == KK; } var dv = ia["__core-js_shared__"]; var nw = function() { var e17 = /[^.]+$/.exec(dv && dv.keys && dv.keys.IE_PROTO || ""); return e17 ? "Symbol(src)_1." + e17 : ""; }(); function GK(e17) { return !!nw && nw in e17; } var XK = Function.prototype; var YK = XK.toString; function Ps(e17) { if (e17 != null) { try { return YK.call(e17); } catch { } try { return e17 + ""; } catch { } } return ""; } var ZK = /[\\^$.*+?()[\]{}|]/g; var JK = /^\[object .+?Constructor\]$/; var QK = Function.prototype; var eG = Object.prototype; var tG = QK.toString; var nG = eG.hasOwnProperty; var rG = RegExp( "^" + tG.call(nG).replace(ZK, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$" ); function oG(e17) { if (!vi(e17) || GK(e17)) return false; var t = P4(e17) ? rG : JK; return t.test(Ps(e17)); } function aG(e17, t) { return e17 == null ? void 0 : e17[t]; } function $s(e17, t) { var n = aG(e17, t); return oG(n) ? n : void 0; } var w0 = $s(ia, "WeakMap"); function iG(e17, t, n) { switch (n.length) { case 0: return e17.call(t); case 1: return e17.call(t, n[0]); case 2: return e17.call(t, n[0], n[1]); case 3: return e17.call(t, n[0], n[1], n[2]); } return e17.apply(t, n); } var sG = 800; var lG = 16; var uG = Date.now; function cG(e17) { 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 e17.apply(void 0, arguments); }; } function dG(e17) { return function() { return e17; }; } var qp = function() { try { var e17 = $s(Object, "defineProperty"); return e17({}, "", {}), e17; } catch { } }(); var pG = qp ? function(e17, t) { return qp(e17, "toString", { configurable: true, enumerable: false, value: dG(t), writable: true }); } : O4; var fG = cG(pG); function hG(e17, t, n, r) { e17.length; for (var o = n + 1; o--; ) if (t(e17[o], o, e17)) return o; return -1; } var vG = 9007199254740991; var gG = /^(?:0|[1-9]\d*)$/; function Nm(e17, t) { var n = typeof e17; return t = t ?? vG, !!t && (n == "number" || n != "symbol" && gG.test(e17)) && e17 > -1 && e17 % 1 == 0 && e17 < t; } function mG(e17, t, n) { t == "__proto__" && qp ? qp(e17, t, { configurable: true, enumerable: true, value: n, writable: true }) : e17[t] = n; } function Lm(e17, t) { return e17 === t || e17 !== e17 && t !== t; } var yG = Object.prototype; var bG = yG.hasOwnProperty; function wG(e17, t, n) { var r = e17[t]; (!(bG.call(e17, t) && Lm(r, n)) || n === void 0 && !(t in e17)) && mG(e17, t, n); } var rw = Math.max; function xG(e17, t, n) { return t = rw(t === void 0 ? e17.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(e17, this, s); }; } var kG = 9007199254740991; function Dm(e17) { return typeof e17 == "number" && e17 > -1 && e17 % 1 == 0 && e17 <= kG; } function CG(e17) { return e17 != null && Dm(e17.length) && !P4(e17); } var EG = Object.prototype; function SG(e17) { var t = e17 && e17.constructor, n = typeof t == "function" && t.prototype || EG; return e17 === n; } function _G(e17, t) { for (var n = -1, r = Array(e17); ++n < e17; ) r[n] = t(n); return r; } var TG = "[object Arguments]"; function ow(e17) { return Cl(e17) && Ul(e17) == TG; } var $4 = Object.prototype; var OG = $4.hasOwnProperty; var PG = $4.propertyIsEnumerable; var Rm = ow(/* @__PURE__ */ function() { return arguments; }()) ? ow : function(e17) { return Cl(e17) && OG.call(e17, "callee") && !PG.call(e17, "callee"); }; function $G() { return false; } var A4 = typeof exports == "object" && exports && !exports.nodeType && exports; var aw = A4 && typeof module == "object" && module && !module.nodeType && module; var AG = aw && aw.exports === A4; var iw = AG ? ia.Buffer : void 0; var FG = iw ? iw.isBuffer : void 0; var x0 = FG || $G; var IG = "[object Arguments]"; var NG = "[object Array]"; var LG = "[object Boolean]"; var DG = "[object Date]"; var RG = "[object Error]"; var BG = "[object Function]"; var MG = "[object Map]"; var zG = "[object Number]"; var VG = "[object Object]"; var jG = "[object RegExp]"; var HG = "[object Set]"; var UG = "[object String]"; var qG = "[object WeakMap]"; var WG = "[object ArrayBuffer]"; var KG = "[object DataView]"; var GG = "[object Float32Array]"; var XG = "[object Float64Array]"; var YG = "[object Int8Array]"; var ZG = "[object Int16Array]"; var JG = "[object Int32Array]"; var QG = "[object Uint8Array]"; var eX = "[object Uint8ClampedArray]"; var tX = "[object Uint16Array]"; var nX = "[object Uint32Array]"; var tn = {}; tn[GG] = tn[XG] = tn[YG] = tn[ZG] = tn[JG] = tn[QG] = tn[eX] = tn[tX] = tn[nX] = true; 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] = false; function rX(e17) { return Cl(e17) && Dm(e17.length) && !!tn[Ul(e17)]; } function oX(e17) { return function(t) { return e17(t); }; } var F4 = typeof exports == "object" && exports && !exports.nodeType && exports; var Bu = F4 && typeof module == "object" && module && !module.nodeType && module; var aX = Bu && Bu.exports === F4; var pv = aX && S4.process; var sw = function() { try { var e17 = Bu && Bu.require && Bu.require("util").types; return e17 || pv && pv.binding && pv.binding("util"); } catch { } }(); var lw = sw && sw.isTypedArray; var I4 = lw ? oX(lw) : rX; var iX = Object.prototype; var sX = iX.hasOwnProperty; function lX(e17, t) { var n = Ao(e17), r = !n && Rm(e17), o = !n && !r && x0(e17), a = !n && !r && !o && I4(e17), i = n || r || o || a, s = i ? _G(e17.length, String) : [], u = s.length; for (var l in e17) sX.call(e17, 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(e17, t) { return function(n) { return e17(t(n)); }; } var cX = uX(Object.keys, Object); var dX = Object.prototype; var pX = dX.hasOwnProperty; function fX(e17) { if (!SG(e17)) return cX(e17); var t = []; for (var n in Object(e17)) pX.call(e17, n) && n != "constructor" && t.push(n); return t; } function N4(e17) { return CG(e17) ? lX(e17) : fX(e17); } var hX = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/; var vX = /^\w*$/; function Bm(e17, t) { if (Ao(e17)) return false; var n = typeof e17; return n == "number" || n == "symbol" || n == "boolean" || e17 == null || eh(e17) ? true : vX.test(e17) || !hX.test(e17) || t != null && e17 in Object(t); } var sc = $s(Object, "create"); function gX() { this.__data__ = sc ? sc(null) : {}, this.size = 0; } function mX(e17) { var t = this.has(e17) && delete this.__data__[e17]; return this.size -= t ? 1 : 0, t; } var yX = "__lodash_hash_undefined__"; var bX = Object.prototype; var wX = bX.hasOwnProperty; function xX(e17) { var t = this.__data__; if (sc) { var n = t[e17]; return n === yX ? void 0 : n; } return wX.call(t, e17) ? t[e17] : void 0; } var kX = Object.prototype; var CX = kX.hasOwnProperty; function EX(e17) { var t = this.__data__; return sc ? t[e17] !== void 0 : CX.call(t, e17); } var SX = "__lodash_hash_undefined__"; function _X(e17, t) { var n = this.__data__; return this.size += this.has(e17) ? 0 : 1, n[e17] = sc && t === void 0 ? SX : t, this; } function hs(e17) { var t = -1, n = e17 == null ? 0 : e17.length; for (this.clear(); ++t < n; ) { var r = e17[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(e17, t) { for (var n = e17.length; n--; ) if (Lm(e17[n][0], t)) return n; return -1; } var OX = Array.prototype; var PX = OX.splice; function $X(e17) { var t = this.__data__, n = th(t, e17); if (n < 0) return false; var r = t.length - 1; return n == r ? t.pop() : PX.call(t, n, 1), --this.size, true; } function AX(e17) { var t = this.__data__, n = th(t, e17); return n < 0 ? void 0 : t[n][1]; } function FX(e17) { return th(this.__data__, e17) > -1; } function IX(e17, t) { var n = this.__data__, r = th(n, e17); return r < 0 ? (++this.size, n.push([e17, t])) : n[r][1] = t, this; } function Fa(e17) { var t = -1, n = e17 == null ? 0 : e17.length; for (this.clear(); ++t < n; ) { var r = e17[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(e17) { var t = typeof e17; return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e17 !== "__proto__" : e17 === null; } function nh(e17, t) { var n = e17.__data__; return LX(t) ? n[typeof t == "string" ? "string" : "hash"] : n.map; } function DX(e17) { var t = nh(this, e17).delete(e17); return this.size -= t ? 1 : 0, t; } function RX(e17) { return nh(this, e17).get(e17); } function BX(e17) { return nh(this, e17).has(e17); } function MX(e17, t) { var n = nh(this, e17), r = n.size; return n.set(e17, t), this.size += n.size == r ? 0 : 1, this; } function Ia(e17) { var t = -1, n = e17 == null ? 0 : e17.length; for (this.clear(); ++t < n; ) { var r = e17[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(e17, t) { if (typeof e17 != "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 = e17.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(e17) { var t = Mm(e17, function(r) { return n.size === VX && n.clear(), r; }), n = t.cache; return t; } var HX = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; var UX = /\\(\\)?/g; var qX = jX(function(e17) { var t = []; return e17.charCodeAt(0) === 46 && t.push(""), e17.replace(HX, function(n, r, o, a) { t.push(o ? a.replace(UX, "$1") : r || n); }), t; }); function WX(e17) { return e17 == null ? "" : T4(e17); } function rh(e17, t) { return Ao(e17) ? e17 : Bm(e17, t) ? [e17] : qX(WX(e17)); } var KX = 1 / 0; function Hc(e17) { if (typeof e17 == "string" || eh(e17)) return e17; var t = e17 + ""; return t == "0" && 1 / e17 == -KX ? "-0" : t; } function zm(e17, t) { t = rh(t, e17); for (var n = 0, r = t.length; e17 != null && n < r; ) e17 = e17[Hc(t[n++])]; return n && n == r ? e17 : void 0; } function ya(e17, t, n) { var r = e17 == null ? void 0 : zm(e17, t); return r === void 0 ? n : r; } function L4(e17, t) { for (var n = -1, r = t.length, o = e17.length; ++n < r; ) e17[o + n] = t[n]; return e17; } var uw = ra ? ra.isConcatSpreadable : void 0; function GX(e17) { return Ao(e17) || Rm(e17) || !!(uw && e17 && e17[uw]); } function XX(e17, t, n, r, o) { var a = -1, i = e17.length; for (n || (n = GX), o || (o = []); ++a < i; ) { var s = e17[a]; n(s) ? L4(o, s) : o[o.length] = s; } return o; } function YX(e17) { var t = e17 == null ? 0 : e17.length; return t ? XX(e17) : []; } function ZX(e17) { return fG(xG(e17, void 0, YX), e17 + ""); } function Qa() { if (!arguments.length) return []; var e17 = arguments[0]; return Ao(e17) ? e17 : [e17]; } function JX() { this.__data__ = new Fa(), this.size = 0; } function QX(e17) { var t = this.__data__, n = t.delete(e17); return this.size = t.size, n; } function eY(e17) { return this.__data__.get(e17); } function tY(e17) { return this.__data__.has(e17); } var nY = 200; function rY(e17, t) { var n = this.__data__; if (n instanceof Fa) { var r = n.__data__; if (!lc || r.length < nY - 1) return r.push([e17, t]), this.size = ++n.size, this; n = this.__data__ = new Ia(r); } return n.set(e17, t), this.size = n.size, this; } function ka(e17) { var t = this.__data__ = new Fa(e17); 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(e17, t) { for (var n = -1, r = e17 == null ? 0 : e17.length, o = 0, a = []; ++n < r; ) { var i = e17[n]; t(i, n, e17) && (a[o++] = i); } return a; } function aY() { return []; } var iY = Object.prototype; var sY = iY.propertyIsEnumerable; var cw = Object.getOwnPropertySymbols; var lY = cw ? function(e17) { return e17 == null ? [] : (e17 = Object(e17), oY(cw(e17), function(t) { return sY.call(e17, t); })); } : aY; function uY(e17, t, n) { var r = t(e17); return Ao(e17) ? r : L4(r, n(e17)); } function dw(e17) { return uY(e17, N4, lY); } var k0 = $s(ia, "DataView"); var C0 = $s(ia, "Promise"); var E0 = $s(ia, "Set"); var pw = "[object Map]"; var cY = "[object Object]"; var fw = "[object Promise]"; var hw = "[object Set]"; var vw = "[object WeakMap]"; var gw = "[object DataView]"; var dY = Ps(k0); var pY = Ps(lc); var fY = Ps(C0); var hY = Ps(E0); var vY = Ps(w0); var 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(e17) { var t = Ul(e17), n = t == cY ? e17.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; var gY = "__lodash_hash_undefined__"; function mY(e17) { return this.__data__.set(e17, gY), this; } function yY(e17) { return this.__data__.has(e17); } function Wp(e17) { var t = -1, n = e17 == null ? 0 : e17.length; for (this.__data__ = new Ia(); ++t < n; ) this.add(e17[t]); } Wp.prototype.add = Wp.prototype.push = mY; Wp.prototype.has = yY; function bY(e17, t) { for (var n = -1, r = e17 == null ? 0 : e17.length; ++n < r; ) if (t(e17[n], n, e17)) return true; return false; } function wY(e17, t) { return e17.has(t); } var xY = 1; var kY = 2; function D4(e17, t, n, r, o, a) { var i = n & xY, s = e17.length, u = t.length; if (s != u && !(i && u > s)) return false; var l = a.get(e17), c = a.get(t); if (l && c) return l == t && c == e17; var d = -1, f = true, h10 = n & kY ? new Wp() : void 0; for (a.set(e17, t), a.set(t, e17); ++d < s; ) { var p = e17[d], v = t[d]; if (r) var m = i ? r(v, p, d, t, e17, a) : r(p, v, d, e17, t, a); if (m !== void 0) { if (m) continue; f = false; break; } if (h10) { if (!bY(t, function(g, b) { if (!wY(h10, b) && (p === g || o(p, g, n, r, a))) return h10.push(b); })) { f = false; break; } } else if (!(p === v || o(p, v, n, r, a))) { f = false; break; } } return a.delete(e17), a.delete(t), f; } function CY(e17) { var t = -1, n = Array(e17.size); return e17.forEach(function(r, o) { n[++t] = [o, r]; }), n; } function EY(e17) { var t = -1, n = Array(e17.size); return e17.forEach(function(r) { n[++t] = r; }), n; } var SY = 1; var _Y = 2; var TY = "[object Boolean]"; var OY = "[object Date]"; var PY = "[object Error]"; var $Y = "[object Map]"; var AY = "[object Number]"; var FY = "[object RegExp]"; var IY = "[object Set]"; var NY = "[object String]"; var LY = "[object Symbol]"; var DY = "[object ArrayBuffer]"; var RY = "[object DataView]"; var yw = ra ? ra.prototype : void 0; var fv = yw ? yw.valueOf : void 0; function BY(e17, t, n, r, o, a, i) { switch (n) { case RY: if (e17.byteLength != t.byteLength || e17.byteOffset != t.byteOffset) return false; e17 = e17.buffer, t = t.buffer; case DY: return !(e17.byteLength != t.byteLength || !a(new mw(e17), new mw(t))); case TY: case OY: case AY: return Lm(+e17, +t); case PY: return e17.name == t.name && e17.message == t.message; case FY: case NY: return e17 == t + ""; case $Y: var s = CY; case IY: var u = r & SY; if (s || (s = EY), e17.size != t.size && !u) return false; var l = i.get(e17); if (l) return l == t; r |= _Y, i.set(e17, t); var c = D4(s(e17), s(t), r, o, a, i); return i.delete(e17), c; case LY: if (fv) return fv.call(e17) == fv.call(t); } return false; } var MY = 1; var zY = Object.prototype; var VY = zY.hasOwnProperty; function jY(e17, t, n, r, o, a) { var i = n & MY, s = dw(e17), u = s.length, l = dw(t), c = l.length; if (u != c && !i) return false; for (var d = u; d--; ) { var f = s[d]; if (!(i ? f in t : VY.call(t, f))) return false; } var h10 = a.get(e17), p = a.get(t); if (h10 && p) return h10 == t && p == e17; var v = true; a.set(e17, t), a.set(t, e17); for (var m = i; ++d < u; ) { f = s[d]; var g = e17[f], b = t[f]; if (r) var x = i ? r(b, g, f, t, e17, a) : r(g, b, f, e17, t, a); if (!(x === void 0 ? g === b || o(g, b, n, r, a) : x)) { v = false; break; } m || (m = f == "constructor"); } if (v && !m) { var w = e17.constructor, C = t.constructor; w != C && "constructor" in e17 && "constructor" in t && !(typeof w == "function" && w instanceof w && typeof C == "function" && C instanceof C) && (v = false); } return a.delete(e17), a.delete(t), v; } var HY = 1; var bw = "[object Arguments]"; var ww = "[object Array]"; var Pd = "[object Object]"; var UY = Object.prototype; var xw = UY.hasOwnProperty; function qY(e17, t, n, r, o, a) { var i = Ao(e17), s = Ao(t), u = i ? ww : Ya(e17), 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(e17)) { if (!x0(t)) return false; i = true, c = false; } if (f && !c) return a || (a = new ka()), i || I4(e17) ? D4(e17, t, n, r, o, a) : BY(e17, t, u, n, r, o, a); if (!(n & HY)) { var h10 = c && xw.call(e17, "__wrapped__"), p = d && xw.call(t, "__wrapped__"); if (h10 || p) { var v = h10 ? e17.value() : e17, m = p ? t.value() : t; return a || (a = new ka()), o(v, m, n, r, a); } } return f ? (a || (a = new ka()), jY(e17, t, n, r, o, a)) : false; } function oh(e17, t, n, r, o) { return e17 === t ? true : e17 == null || t == null || !Cl(e17) && !Cl(t) ? e17 !== e17 && t !== t : qY(e17, t, n, r, oh, o); } var WY = 1; var KY = 2; function GY(e17, t, n, r) { var o = n.length, a = o; if (e17 == null) return !a; for (e17 = Object(e17); o--; ) { var i = n[o]; if (i[2] ? i[1] !== e17[i[0]] : !(i[0] in e17)) return false; } for (; ++o < a; ) { i = n[o]; var s = i[0], u = e17[s], l = i[1]; if (i[2]) { if (u === void 0 && !(s in e17)) return false; } else { var c = new ka(), d; if (!(d === void 0 ? oh(l, u, WY | KY, r, c) : d)) return false; } } return true; } function R4(e17) { return e17 === e17 && !vi(e17); } function XY(e17) { for (var t = N4(e17), n = t.length; n--; ) { var r = t[n], o = e17[r]; t[n] = [r, o, R4(o)]; } return t; } function B4(e17, t) { return function(n) { return n == null ? false : n[e17] === t && (t !== void 0 || e17 in Object(n)); }; } function YY(e17) { var t = XY(e17); return t.length == 1 && t[0][2] ? B4(t[0][0], t[0][1]) : function(n) { return n === e17 || GY(n, e17, t); }; } function ZY(e17, t) { return e17 != null && t in Object(e17); } function JY(e17, t, n) { t = rh(t, e17); for (var r = -1, o = t.length, a = false; ++r < o; ) { var i = Hc(t[r]); if (!(a = e17 != null && n(e17, i))) break; e17 = e17[i]; } return a || ++r != o ? a : (o = e17 == null ? 0 : e17.length, !!o && Dm(o) && Nm(i, o) && (Ao(e17) || Rm(e17))); } function M4(e17, t) { return e17 != null && JY(e17, t, ZY); } var QY = 1; var eZ = 2; function tZ(e17, t) { return Bm(e17) && R4(t) ? B4(Hc(e17), t) : function(n) { var r = ya(n, e17); return r === void 0 && r === t ? M4(n, e17) : oh(t, r, QY | eZ); }; } function nZ(e17) { return function(t) { return t == null ? void 0 : t[e17]; }; } function rZ(e17) { return function(t) { return zm(t, e17); }; } function oZ(e17) { return Bm(e17) ? nZ(Hc(e17)) : rZ(e17); } function aZ(e17) { return typeof e17 == "function" ? e17 : e17 == null ? O4 : typeof e17 == "object" ? Ao(e17) ? tZ(e17[0], e17[1]) : YY(e17) : oZ(e17); } var hv = function() { return ia.Date.now(); }; var iZ = "Expected a function"; var sZ = Math.max; var lZ = Math.min; function z4(e17, t, n) { var r, o, a, i, s, u, l = 0, c = false, d = false, f = true; if (typeof e17 != "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 h10(k) { var E = r, S = o; return r = o = void 0, l = k, i = e17.apply(S, E), i; } function p(k) { return l = k, s = setTimeout(g, t), c ? h10(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 ? h10(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), h10(u); } return s === void 0 && (s = setTimeout(g, t)), i; } return C.cancel = x, C.flush = w, C; } function uZ(e17, t, n) { var r = e17 == null ? 0 : e17.length; if (!r) return -1; var o = r - 1; return hG(e17, aZ(t), o); } function Kp(e17) { for (var t = -1, n = e17 == null ? 0 : e17.length, r = {}; ++t < n; ) { var o = e17[t]; r[o[0]] = o[1]; } return r; } function Gp(e17, t) { return oh(e17, t); } function ii(e17) { return e17 == null; } function cZ(e17) { return e17 === void 0; } function dZ(e17, t, n, r) { if (!vi(e17)) return e17; t = rh(t, e17); for (var o = -1, a = t.length, i = a - 1, s = e17; s != null && ++o < a; ) { var u = Hc(t[o]), l = n; if (u === "__proto__" || u === "constructor" || u === "prototype") return e17; 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 e17; } function pZ(e17, t, n) { for (var r = -1, o = t.length, a = {}; ++r < o; ) { var i = t[r], s = zm(e17, i); n(s, i) && dZ(a, rh(i, e17), s); } return a; } function fZ(e17, t) { return pZ(e17, t, function(n, r) { return M4(e17, r); }); } var V4 = ZX(function(e17, t) { return e17 == null ? {} : fZ(e17, t); }); var ri = (e17) => e17 === void 0; var El = (e17) => typeof e17 == "boolean"; var Xn = (e17) => typeof e17 == "number"; var rs = (e17) => typeof Element > "u" ? false : e17 instanceof Element; var Xp = (e17) => ii(e17); var hZ = (e17) => ur(e17) ? !Number.isNaN(Number(e17)) : false; var vZ = (e17 = "") => e17.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d"); var kw = (e17) => Object.keys(e17); var j4 = class extends Error { constructor(t) { super(t), this.name = "ElementPlusError"; } }; function gZ(e17, t) { throw new j4(`[${e17}] ${t}`); } function Tn(e17, t) { if (true) { const n = ur(e17) ? new j4(`[${e17}] ${t}`) : e17; console.warn(n); } } var mZ = "utils/dom/style"; var H4 = (e17 = "") => e17.split(" ").filter((t) => !!t.trim()); var S0 = (e17, t) => { !e17 || !t.trim() || e17.classList.add(...H4(t)); }; var os = (e17, t) => { !e17 || !t.trim() || e17.classList.remove(...H4(t)); }; var vu = (e17, t) => { var n; if (!_n || !e17 || !t) return ""; let r = xK(t); r === "float" && (r = "cssFloat"); try { const o = e17.style[r]; if (o) return o; const a = (n = document.defaultView) == null ? void 0 : n.getComputedStyle(e17, ""); return a ? a[r] : ""; } catch { return e17.style[r]; } }; function Sl(e17, t = "px") { if (!e17) return ""; if (Xn(e17) || hZ(e17)) return `${e17}${t}`; if (ur(e17)) return e17; Tn(mZ, "binding value must be a string or number"); } function yZ(e17, t) { if (!_n) return; if (!t) { e17.scrollTop = 0; return; } const n = []; let r = t.offsetParent; for (; r !== null && e17 !== r && e17.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 = e17.scrollTop, s = i + e17.clientHeight; o < i ? e17.scrollTop = o : a > s && (e17.scrollTop = a - e17.clientHeight); } var bZ = defineComponent({ name: "Aim", __name: "aim", setup(e17) { return (t, n) => (openBlock(), createElementBlock("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ createBaseVNode("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" }), createBaseVNode("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" }) ])); } }); var wZ = bZ; var xZ = defineComponent({ name: "ArrowDown", __name: "arrow-down", setup(e17) { return (t, n) => (openBlock(), createElementBlock("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ createBaseVNode("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" }) ])); } }); var Vm = xZ; var kZ = defineComponent({ name: "ArrowUp", __name: "arrow-up", setup(e17) { return (t, n) => (openBlock(), createElementBlock("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ createBaseVNode("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" }) ])); } }); var CZ = kZ; var EZ = defineComponent({ name: "CaretRight", __name: "caret-right", setup(e17) { return (t, n) => (openBlock(), createElementBlock("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ createBaseVNode("path", { fill: "currentColor", d: "M384 192v640l384-320.064z" }) ])); } }); var SZ = EZ; var _Z = defineComponent({ name: "CircleCheck", __name: "circle-check", setup(e17) { return (t, n) => (openBlock(), createElementBlock("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ createBaseVNode("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" }), createBaseVNode("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" }) ])); } }); var TZ = _Z; var OZ = defineComponent({ name: "CircleClose", __name: "circle-close", setup(e17) { return (t, n) => (openBlock(), createElementBlock("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ createBaseVNode("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" }), createBaseVNode("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" }) ])); } }); var jm = OZ; var PZ = defineComponent({ name: "Close", __name: "close", setup(e17) { return (t, n) => (openBlock(), createElementBlock("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ createBaseVNode("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" }) ])); } }); var Yp = PZ; var $Z = defineComponent({ name: "CopyDocument", __name: "copy-document", setup(e17) { return (t, n) => (openBlock(), createElementBlock("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ createBaseVNode("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" }), createBaseVNode("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" }) ])); } }); var AZ = $Z; var FZ = defineComponent({ name: "Delete", __name: "delete", setup(e17) { return (t, n) => (openBlock(), createElementBlock("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ createBaseVNode("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" }) ])); } }); var IZ = FZ; var NZ = defineComponent({ name: "Edit", __name: "edit", setup(e17) { return (t, n) => (openBlock(), createElementBlock("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ createBaseVNode("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" }), createBaseVNode("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" }) ])); } }); var LZ = NZ; var DZ = defineComponent({ name: "Finished", __name: "finished", setup(e17) { return (t, n) => (openBlock(), createElementBlock("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ createBaseVNode("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" }) ])); } }); var RZ = DZ; var BZ = defineComponent({ name: "Hide", __name: "hide", setup(e17) { return (t, n) => (openBlock(), createElementBlock("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ createBaseVNode("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" }), createBaseVNode("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" }) ])); } }); var MZ = BZ; var zZ = defineComponent({ name: "Loading", __name: "loading", setup(e17) { return (t, n) => (openBlock(), createElementBlock("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ createBaseVNode("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" }) ])); } }); var Hm = zZ; var VZ = defineComponent({ name: "Lock", __name: "lock", setup(e17) { return (t, n) => (openBlock(), createElementBlock("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ createBaseVNode("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" }), createBaseVNode("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" }) ])); } }); var jZ = VZ; var HZ = defineComponent({ name: "Unlock", __name: "unlock", setup(e17) { return (t, n) => (openBlock(), createElementBlock("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ createBaseVNode("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" }), createBaseVNode("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" }) ])); } }); var UZ = HZ; var qZ = defineComponent({ name: "View", __name: "view", setup(e17) { return (t, n) => (openBlock(), createElementBlock("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ createBaseVNode("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" }) ])); } }); var WZ = qZ; var KZ = defineComponent({ name: "ZoomIn", __name: "zoom-in", setup(e17) { return (t, n) => (openBlock(), createElementBlock("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ createBaseVNode("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" }) ])); } }); var GZ = KZ; var XZ = defineComponent({ name: "ZoomOut", __name: "zoom-out", setup(e17) { return (t, n) => (openBlock(), createElementBlock("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ createBaseVNode("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" }) ])); } }); var YZ = XZ; var U4 = "__epPropKey"; var ut = (e17) => e17; var ZZ = (e17) => Gn(e17) && !!e17[U4]; var ah = (e17, t) => { if (!Gn(e17) || ZZ(e17)) return e17; const { values: n, required: r, default: o, type: a, validator: i } = e17, s = { type: a, required: !!r, validator: n || i ? (u) => { let l = false, c = []; if (n && (c = Array.from(n), fs(e17, "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(", "); warn(`Invalid prop: validation failed${t ? ` for prop "${t}"` : ""}. Expected one of [${d}], got value ${JSON.stringify(u)}.`); } return l; } : void 0, [U4]: true }; return fs(e17, "default") && (s.default = o), s; }; var zt = (e17) => Kp(Object.entries(e17).map(([t, n]) => [ t, ah(n, t) ])); var gi = ut([ String, Object, Function ]); var q4 = { validating: Hm, success: TZ, error: jm }; var jn = (e17, t) => { if (e17.install = (n) => { for (const r of [e17, ...Object.values(t ?? {})]) n.component(r.name, r); }, t) for (const [n, r] of Object.entries(t)) e17[n] = r; return e17; }; var JZ = (e17, t) => (e17.install = (n) => { n.directive(t, e17); }, e17); var Na = (e17) => (e17.install = ic, e17); var 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" }; var Kn = "update:modelValue"; var Um = "change"; var W4 = ["", "default", "small", "large"]; var QZ = (e17) => /([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(e17); var Js = (e17) => e17; var eJ = ["class", "style"]; var tJ = /^on[A-Z]/; var nJ = (e17 = {}) => { const { excludeListeners: t = false, excludeKeys: n } = e17, r = computed(() => ((n == null ? void 0 : n.value) || []).concat(eJ)), o = getCurrentInstance(); return o ? computed(() => { 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"), computed(() => ({}))); }; var up = ({ from: e17, replacement: t, scope: n, version: r, ref: o, type: a = "API" }, i) => { watch(() => unref(i), (s) => { s && Tn(n, `[${a}] ${e17} is about to be deprecated in version ${r}, please use ${t} instead. For more detail, please visit: ${o} `); }, { immediate: true }); }; 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}" } } }; var oJ = (e17) => (t, n) => aJ(t, n, unref(e17)); var aJ = (e17, t, n) => ya(n, e17, e17).replace(/\{(\w+)\}/g, (r, o) => { var a; return `${(a = t == null ? void 0 : t[o]) != null ? a : `{${o}}`}`; }); var iJ = (e17) => { const t = computed(() => unref(e17).name), n = isRef(e17) ? e17 : ref(e17); return { lang: t, locale: n, t: oJ(e17) }; }; var K4 = Symbol("localeContextKey"); var Uc = (e17) => { const t = e17 || inject(K4, ref()); return iJ(computed(() => t.value || rJ)); }; var cp = "el"; var sJ = "is-"; var Ri = (e17, t, n, r, o) => { let a = `${e17}-${t}`; return n && (a += `-${n}`), r && (a += `__${r}`), o && (a += `--${o}`), a; }; var G4 = Symbol("namespaceContextKey"); var qm = (e17) => { const t = e17 || (getCurrentInstance() ? inject(G4, ref(cp)) : ref(cp)); return computed(() => unref(t) || cp); }; var wt = (e17, t) => { const n = qm(t); return { namespace: n, b: (r = "") => Ri(n.value, e17, r, "", ""), e: (r) => r ? Ri(n.value, e17, "", r, "") : "", m: (r) => r ? Ri(n.value, e17, "", "", r) : "", be: (r, o) => r && o ? Ri(n.value, e17, r, o, "") : "", em: (r, o) => r && o ? Ri(n.value, e17, "", r, o) : "", bm: (r, o) => r && o ? Ri(n.value, e17, r, "", o) : "", bem: (r, o, a) => r && o && a ? Ri(n.value, e17, r, o, a) : "", is: (r, ...o) => { const a = o.length >= 1 ? o[0] : true; 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}-${e17}-${a}`] = r[a]); return o; }, cssVarBlockName: (r) => `--${n.value}-${e17}-${r}` }; }; var lJ = ah({ type: ut(Boolean), default: null }); var uJ = ah({ type: ut(Function) }); var cJ = (e17) => { const t = `update:${e17}`, n = `onUpdate:${e17}`, r = [t], o = { [e17]: lJ, [n]: uJ }; return { useModelToggle: ({ indicator: a, toggleReason: i, shouldHideWhenRouteChanges: s, shouldProceed: u, onShow: l, onHide: c }) => { const d = getCurrentInstance(), { emit: f } = d, h10 = d.props, p = computed(() => wr(h10[n])), v = computed(() => h10[e17] === null), m = (k) => { a.value !== true && (a.value = true, i && (i.value = k), wr(l) && l(k)); }, g = (k) => { a.value !== false && (a.value = false, i && (i.value = k), wr(c) && c(k)); }, b = (k) => { if (h10.disabled === true || wr(u) && !u()) return; const E = p.value && _n; E && f(t, true), (v.value || !E) && m(k); }, x = (k) => { if (h10.disabled === true || !_n) return; const E = p.value && _n; E && f(t, false), (v.value || !E) && g(k); }, w = (k) => { El(k) && (h10.disabled && k ? p.value && f(t, false) : a.value !== k && (k ? m() : g())); }, C = () => { a.value ? x() : b(); }; return watch(() => h10[e17], w), s && d.appContext.config.globalProperties.$route !== void 0 && watch(() => ({ ...d.proxy.$route }), () => { s.value && a.value && x(); }), onMounted(() => { w(h10[e17]); }), { hide: x, show: b, toggle: C, hasUpdateHandler: p }; }, useModelToggleProps: o, useModelToggleEmits: r }; }; var X4 = (e17) => { const t = getCurrentInstance(); return computed(() => { var n, r; return (r = (n = t == null ? void 0 : t.proxy) == null ? void 0 : n.$props) == null ? void 0 : r[e17]; }); }; var Dr = "top"; var po = "bottom"; var fo = "right"; var Rr = "left"; var Wm = "auto"; var qc = [Dr, po, fo, Rr]; var _l = "start"; var uc = "end"; var dJ = "clippingParents"; var Y4 = "viewport"; var gu = "popper"; var pJ = "reference"; var Cw = qc.reduce(function(e17, t) { return e17.concat([t + "-" + _l, t + "-" + uc]); }, []); var ih = [].concat(qc, [Wm]).reduce(function(e17, t) { return e17.concat([t, t + "-" + _l, t + "-" + uc]); }, []); var fJ = "beforeRead"; var hJ = "read"; var vJ = "afterRead"; var gJ = "beforeMain"; var mJ = "main"; var yJ = "afterMain"; var bJ = "beforeWrite"; var wJ = "write"; var xJ = "afterWrite"; var kJ = [fJ, hJ, vJ, gJ, mJ, yJ, bJ, wJ, xJ]; function oa(e17) { return e17 ? (e17.nodeName || "").toLowerCase() : null; } function Mo(e17) { if (e17 == null) return window; if (e17.toString() !== "[object Window]") { var t = e17.ownerDocument; return t && t.defaultView || window; } return e17; } function Tl(e17) { var t = Mo(e17).Element; return e17 instanceof t || e17 instanceof Element; } function ro(e17) { var t = Mo(e17).HTMLElement; return e17 instanceof t || e17 instanceof HTMLElement; } function Km(e17) { if (typeof ShadowRoot > "u") return false; var t = Mo(e17).ShadowRoot; return e17 instanceof t || e17 instanceof ShadowRoot; } function CJ(e17) { var t = e17.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 === false ? a.removeAttribute(i) : a.setAttribute(i, s === true ? "" : s); })); }); } function EJ(e17) { var t = e17.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: true, phase: "write", fn: CJ, effect: EJ, requires: ["computeStyles"] }; function Qo(e17) { return e17.split("-")[0]; } var as = Math.max; var Zp = Math.min; var Ol = Math.round; function Pl(e17, t) { t === void 0 && (t = false); var n = e17.getBoundingClientRect(), r = 1, o = 1; if (ro(e17) && t) { var a = e17.offsetHeight, i = e17.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(e17) { var t = Pl(e17), n = e17.offsetWidth, r = e17.offsetHeight; return Math.abs(t.width - n) <= 1 && (n = t.width), Math.abs(t.height - r) <= 1 && (r = t.height), { x: e17.offsetLeft, y: e17.offsetTop, width: n, height: r }; } function J4(e17, t) { var n = t.getRootNode && t.getRootNode(); if (e17.contains(t)) return true; if (n && Km(n)) { var r = t; do { if (r && e17.isSameNode(r)) return true; r = r.parentNode || r.host; } while (r); } return false; } function Sa(e17) { return Mo(e17).getComputedStyle(e17); } function SJ(e17) { return ["table", "td", "th"].indexOf(oa(e17)) >= 0; } function Oi(e17) { return ((Tl(e17) ? e17.ownerDocument : e17.document) || window.document).documentElement; } function sh(e17) { return oa(e17) === "html" ? e17 : e17.assignedSlot || e17.parentNode || (Km(e17) ? e17.host : null) || Oi(e17); } function Ew(e17) { return !ro(e17) || Sa(e17).position === "fixed" ? null : e17.offsetParent; } function _J(e17) { var t = navigator.userAgent.toLowerCase().indexOf("firefox") !== -1, n = navigator.userAgent.indexOf("Trident") !== -1; if (n && ro(e17)) { var r = Sa(e17); if (r.position === "fixed") return null; } var o = sh(e17); 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(e17) { for (var t = Mo(e17), n = Ew(e17); 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(e17) || t; } function Xm(e17) { return ["top", "bottom"].indexOf(e17) >= 0 ? "x" : "y"; } function Mu(e17, t, n) { return as(e17, Zp(t, n)); } function TJ(e17, t, n) { var r = Mu(e17, t, n); return r > n ? n : r; } function Q4() { return { top: 0, right: 0, bottom: 0, left: 0 }; } function eE(e17) { return Object.assign({}, Q4(), e17); } function tE(e17, t) { return t.reduce(function(n, r) { return n[r] = e17, n; }, {}); } var OJ = function(e17, t) { return e17 = typeof e17 == "function" ? e17(Object.assign({}, t.rects, { placement: t.placement })) : e17, eE(typeof e17 != "number" ? e17 : tE(e17, qc)); }; function PJ(e17) { var t, n = e17.state, r = e17.name, o = e17.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), h10 = 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[h10], 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(e17) { var t = e17.state, n = e17.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: true, phase: "main", fn: PJ, effect: $J, requires: ["popperOffsets"], requiresIfExists: ["preventOverflow"] }; function $l(e17) { return e17.split("-")[1]; } var FJ = { top: "auto", right: "auto", bottom: "auto", left: "auto" }; function IJ(e17) { var t = e17.x, n = e17.y, r = window, o = r.devicePixelRatio || 1; return { x: Ol(t * o) / o || 0, y: Ol(n * o) / o || 0 }; } function Sw(e17) { var t, n = e17.popper, r = e17.popperRect, o = e17.placement, a = e17.variation, i = e17.offsets, s = e17.position, u = e17.gpuAcceleration, l = e17.adaptive, c = e17.roundOffsets, d = e17.isFixed, f = i.x, h10 = f === void 0 ? 0 : f, p = i.y, v = p === void 0 ? 0 : p, m = typeof c == "function" ? c({ x: h10, y: v }) : { x: h10, y: v }; h10 = 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]; h10 -= F - r.width, h10 *= u ? 1 : -1; } } var $ = Object.assign({ position: s }, l && FJ), A = c === true ? IJ({ x: h10, y: v }) : { x: h10, y: v }; if (h10 = 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(" + h10 + "px, " + v + "px)" : "translate3d(" + h10 + "px, " + v + "px, 0)", L)); } return Object.assign({}, $, (t = {}, t[w] = b ? v + "px" : "", t[x] = g ? h10 + "px" : "", t.transform = "", t)); } function NJ(e17) { var t = e17.state, n = e17.options, r = n.gpuAcceleration, o = r === void 0 ? true : r, a = n.adaptive, i = a === void 0 ? true : a, s = n.roundOffsets, u = s === void 0 ? true : 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: false, roundOffsets: u })))), t.attributes.popper = Object.assign({}, t.attributes.popper, { "data-popper-placement": t.placement }); } var nE = { name: "computeStyles", enabled: true, phase: "beforeWrite", fn: NJ, data: {} }; var $d = { passive: true }; function LJ(e17) { var t = e17.state, n = e17.instance, r = e17.options, o = r.scroll, a = o === void 0 ? true : o, i = r.resize, s = i === void 0 ? true : 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: true, phase: "write", fn: function() { }, effect: LJ, data: {} }; var DJ = { left: "right", right: "left", bottom: "top", top: "bottom" }; function dp(e17) { return e17.replace(/left|right|bottom|top/g, function(t) { return DJ[t]; }); } var RJ = { start: "end", end: "start" }; function _w(e17) { return e17.replace(/start|end/g, function(t) { return RJ[t]; }); } function Ym(e17) { var t = Mo(e17), n = t.pageXOffset, r = t.pageYOffset; return { scrollLeft: n, scrollTop: r }; } function Zm(e17) { return Pl(Oi(e17)).left + Ym(e17).scrollLeft; } function BJ(e17) { var t = Mo(e17), n = Oi(e17), 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(e17), y: s }; } function MJ(e17) { var t, n = Oi(e17), r = Ym(e17), o = (t = e17.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(e17), 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(e17) { var t = Sa(e17), n = t.overflow, r = t.overflowX, o = t.overflowY; return /auto|scroll|overlay|hidden/.test(n + o + r); } function oE(e17) { return ["html", "body", "#document"].indexOf(oa(e17)) >= 0 ? e17.ownerDocument.body : ro(e17) && Jm(e17) ? e17 : oE(sh(e17)); } function zu(e17, t) { var n; t === void 0 && (t = []); var r = oE(e17), o = r === ((n = e17.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(e17) { return Object.assign({}, e17, { left: e17.x, top: e17.y, right: e17.x + e17.width, bottom: e17.y + e17.height }); } function zJ(e17) { var t = Pl(e17); return t.top = t.top + e17.clientTop, t.left = t.left + e17.clientLeft, t.bottom = t.top + e17.clientHeight, t.right = t.left + e17.clientWidth, t.width = e17.clientWidth, t.height = e17.clientHeight, t.x = t.left, t.y = t.top, t; } function Tw(e17, t) { return t === Y4 ? _0(BJ(e17)) : Tl(t) ? zJ(t) : _0(MJ(Oi(e17))); } function VJ(e17) { var t = zu(sh(e17)), n = ["absolute", "fixed"].indexOf(Sa(e17).position) >= 0, r = n && ro(e17) ? Wc(e17) : e17; return Tl(r) ? t.filter(function(o) { return Tl(o) && J4(o, r) && oa(o) !== "body"; }) : []; } function jJ(e17, t, n) { var r = t === "clippingParents" ? VJ(e17) : [].concat(t), o = [].concat(r, [n]), a = o[0], i = o.reduce(function(s, u) { var l = Tw(e17, 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(e17, 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(e17) { var t = e17.reference, n = e17.element, r = e17.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(e17, t) { t === void 0 && (t = {}); var n = t, r = n.placement, o = r === void 0 ? e17.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 ? false : d, h10 = n.padding, p = h10 === void 0 ? 0 : h10, v = eE(typeof p != "number" ? p : tE(p, qc)), m = c === gu ? pJ : gu, g = e17.rects.popper, b = e17.elements[f ? m : c], x = jJ(Tl(b) ? b : b.contextElement || Oi(e17.elements.popper), i, u), w = Pl(e17.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 = e17.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(e17, 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 h10 = f.reduce(function(p, v) { return p[v] = cc(e17, { placement: v, boundary: o, rootBoundary: a, padding: i })[Qo(v)], p; }, {}); return Object.keys(h10).sort(function(p, v) { return h10[p] - h10[v]; }); } function UJ(e17) { if (Qo(e17) === Wm) return []; var t = dp(e17); return [_w(e17), t, _w(t)]; } function qJ(e17) { var t = e17.state, n = e17.options, r = e17.name; if (!t.modifiersData[r]._skip) { for (var o = n.mainAxis, a = o === void 0 ? true : o, i = n.altAxis, s = i === void 0 ? true : i, u = n.fallbackPlacements, l = n.padding, c = n.boundary, d = n.rootBoundary, f = n.altBoundary, h10 = n.flipVariations, p = h10 === void 0 ? true : h10, 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 = true, 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), W = []; if (a && W.push(I[A] <= 0), s && W.push(I[z] <= 0, I[R] <= 0), W.every(function(we) { return we; })) { O = $, S = false; break; } E.set($, W); } 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 = true, t.placement = O, t.reset = true); } } var WJ = { name: "flip", enabled: true, phase: "main", fn: qJ, requiresIfExists: ["offset"], data: { _skip: false } }; function Ow(e17, t, n) { return n === void 0 && (n = { x: 0, y: 0 }), { top: e17.top - t.height - n.y, right: e17.right - t.width + n.x, bottom: e17.bottom - t.height + n.y, left: e17.left - t.width - n.x }; } function Pw(e17) { return [Dr, fo, po, Rr].some(function(t) { return e17[t] >= 0; }); } function KJ(e17) { var t = e17.state, n = e17.name, r = t.rects.reference, o = t.rects.popper, a = t.modifiersData.preventOverflow, i = cc(t, { elementContext: "reference" }), s = cc(t, { altBoundary: true }), 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: true, phase: "main", requiresIfExists: ["preventOverflow"], fn: KJ }; function XJ(e17, t, n) { var r = Qo(e17), o = [Rr, Dr].indexOf(r) >= 0 ? -1 : 1, a = typeof n == "function" ? n(Object.assign({}, t, { placement: e17 })) : 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(e17) { var t = e17.state, n = e17.options, r = e17.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: true, phase: "main", requires: ["popperOffsets"], fn: YJ }; function JJ(e17) { var t = e17.state, n = e17.name; t.modifiersData[n] = aE({ reference: t.rects.reference, element: t.rects.popper, strategy: "absolute", placement: t.placement }); } var iE = { name: "popperOffsets", enabled: true, phase: "read", fn: JJ, data: {} }; function QJ(e17) { return e17 === "x" ? "y" : "x"; } function eQ(e17) { var t = e17.state, n = e17.options, r = e17.name, o = n.mainAxis, a = o === void 0 ? true : o, i = n.altAxis, s = i === void 0 ? false : i, u = n.boundary, l = n.rootBoundary, c = n.altBoundary, d = n.padding, f = n.tether, h10 = f === void 0 ? true : 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], W = z - m[M], oe = h10 ? -S[I] / 2 : 0, Q = b === _l ? E[I] : S[I], ae = b === _l ? -S[I] : -E[I], pe = t.elements.arrow, we = h10 && 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(h10 ? Zp(R, _e) : R, z, h10 ? as(W, De) : W); 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 = h10 && P ? TJ(se, Me, ce) : Mu(h10 ? se : nt, Me, h10 ? ce : st); k[C] = de, A[C] = de - Me; } t.modifiersData[r] = A; } } var tQ = { name: "preventOverflow", enabled: true, phase: "main", fn: eQ, requiresIfExists: ["offset"] }; function nQ(e17) { return { scrollLeft: e17.scrollLeft, scrollTop: e17.scrollTop }; } function rQ(e17) { return e17 === Mo(e17) || !ro(e17) ? Ym(e17) : nQ(e17); } function oQ(e17) { var t = e17.getBoundingClientRect(), n = Ol(t.width) / e17.offsetWidth || 1, r = Ol(t.height) / e17.offsetHeight || 1; return n !== 1 || r !== 1; } function aQ(e17, t, n) { n === void 0 && (n = false); var r = ro(t), o = ro(t) && oQ(t), a = Oi(t), i = Pl(e17, 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, true), 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(e17) { var t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set(), r = []; e17.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 e17.forEach(function(a) { n.has(a.name) || o(a); }), r; } function sQ(e17) { var t = iQ(e17); return kJ.reduce(function(n, r) { return n.concat(t.filter(function(o) { return o.phase === r; })); }, []); } function lQ(e17) { var t; return function() { return t || (t = new Promise(function(n) { Promise.resolve().then(function() { t = void 0, n(e17()); }); })), t; }; } function uQ(e17) { var t = e17.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 e17 = arguments.length, t = new Array(e17), n = 0; n < e17; n++) t[n] = arguments[n]; return !t.some(function(r) { return !(r && typeof r.getBoundingClientRect == "function"); }); } function Qm(e17) { e17 === void 0 && (e17 = {}); var t = e17, 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 = false, 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; }), h10(), 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 = false, 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 === true) { l.reset = false, 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 = true; } }; if (!Aw(i, s)) return f; f.setOptions(u).then(function(v) { !d && u.onFirstUpdate && u.onFirstUpdate(v); }); function h10() { 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]; var pQ = Qm({ defaultModifiers: dQ }); var fQ = (e17, t, n = {}) => { const r = { name: "updateState", enabled: true, phase: "write", fn: ({ state: u }) => { const l = hQ(u); Object.assign(i.value, l); }, requires: ["computeStyles"] }, o = computed(() => { const { onFirstUpdate: u, placement: l, strategy: c, modifiers: d } = unref(n); return { onFirstUpdate: u, placement: l || "bottom", strategy: c || "absolute", modifiers: [ ...d || [], r, { name: "applyStyles", enabled: false } ] }; }), a = shallowRef(), i = ref({ styles: { popper: { position: unref(o).strategy, left: "0", top: "0" }, arrow: { position: "absolute" } }, attributes: {} }), s = () => { a.value && (a.value.destroy(), a.value = void 0); }; return watch(o, (u) => { const l = unref(a); l && l.setOptions(u); }, { deep: true }), watch([e17, t], ([u, l]) => { s(), !(!u || !l) && (a.value = pQ(u, l, unref(o))); }), onBeforeUnmount(() => { s(); }), { state: computed(() => { var u; return { ...((u = unref(a)) == null ? void 0 : u.state) || {} }; }), styles: computed(() => unref(i).styles), attributes: computed(() => unref(i).attributes), update: () => { var u; return (u = unref(a)) == null ? void 0 : u.update(); }, forceUpdate: () => { var u; return (u = unref(a)) == null ? void 0 : u.forceUpdate(); }, instanceRef: computed(() => unref(a)) }; }; function hQ(e17) { const t = Object.keys(e17.elements), n = Kp(t.map((o) => [o, e17.styles[o] || {}])), r = Kp(t.map((o) => [o, e17.attributes[o]])); return { styles: n, attributes: r }; } function Fw() { let e17; const t = (r, o) => { n(), e17 = window.setTimeout(r, o); }, n = () => window.clearTimeout(e17); return Jf(() => n()), { registerTimeout: t, cancelTimeout: n }; } var T0 = { prefix: Math.floor(Math.random() * 1e4), current: 0 }; var vQ = Symbol("elIdInjection"); var sE = () => getCurrentInstance() ? inject(vQ, T0) : T0; var lh = (e17) => { 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 computed(() => unref(e17) || `${n.value}-id-${t.prefix}-${t.current++}`); }; var Qs = []; var Iw = (e17) => { const t = e17; t.key === In.esc && Qs.forEach((n) => n(t)); }; var gQ = (e17) => { onMounted(() => { Qs.length === 0 && document.addEventListener("keydown", Iw), _n && Qs.push(e17); }), onBeforeUnmount(() => { Qs = Qs.filter((t) => t !== e17), Qs.length === 0 && _n && document.removeEventListener("keydown", Iw); }); }; var Nw; var lE = () => { const e17 = qm(), t = sE(), n = computed(() => `${e17.value}-popper-container-${t.prefix}`), r = computed(() => `#${n.value}`); return { id: n, selector: r }; }; var mQ = (e17) => { const t = document.createElement("div"); return t.id = e17, document.body.appendChild(t), t; }; var yQ = () => { const { id: e17, selector: t } = lE(); return onBeforeMount(() => { _n && (!Nw || !document.body.querySelector(t.value)) && (Nw = mQ(e17.value)); }), { id: e17, selector: t }; }; var bQ = zt({ showAfter: { type: Number, default: 0 }, hideAfter: { type: Number, default: 200 }, autoClose: { type: Number, default: 0 } }); var wQ = ({ showAfter: e17, 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 = unref(n); Xn(l) && l > 0 && i(() => { o(u); }, l); }, unref(e17)); }, onClose: (u) => { s(), a(() => { o(u); }, unref(t)); } }; }; var uE = Symbol("elForwardRef"); var xQ = (e17) => { provide(uE, { setForwardRef: (t) => { e17.value = t; } }); }; var kQ = (e17) => ({ mounted(t) { e17(t); }, updated(t) { e17(t); }, unmounted() { e17(null); } }); var Lw = { current: 0 }; var Dw = ref(0); var cE = 2e3; var Rw = Symbol("elZIndexContextKey"); var dE = Symbol("zIndexContextKey"); var pE = (e17) => { const t = getCurrentInstance() ? inject(Rw, Lw) : Lw, n = e17 || (getCurrentInstance() ? inject(dE, void 0) : void 0), r = computed(() => { const i = unref(n); return Xn(i) ? i : cE; }), o = computed(() => r.value + Dw.value), a = () => (t.current++, Dw.value = t.current, o.value); return !_n && !inject(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(e17) { let t; function n() { if (e17.value == null) return; const { selectionStart: o, selectionEnd: a, value: i } = e17.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 (e17.value == null || t == null) return; const { value: o } = e17.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); } e17.value.setSelectionRange(u, u); } return [n, r]; } var ql = ah({ type: String, values: W4, required: false }); var fE = Symbol("size"); var EQ = () => { const e17 = inject(fE, {}); return computed(() => unref(e17.size) || ""); }; function ey(e17, { beforeFocus: t, afterFocus: n, beforeBlur: r, afterBlur: o } = {}) { const a = getCurrentInstance(), { emit: i } = a, s = shallowRef(), u = ref(false), l = (f) => { wr(t) && t(f) || u.value || (u.value = true, i("focus", f), n == null || n()); }, c = (f) => { var h10; wr(r) && r(f) || f.relatedTarget && (h10 = s.value) != null && h10.contains(f.relatedTarget) || (u.value = false, i("blur", f), o == null || o()); }, d = () => { var f, h10; (f = s.value) != null && f.contains(document.activeElement) && s.value !== document.activeElement || (h10 = e17.value) == null || h10.focus(); }; return watch(s, (f) => { f && f.setAttribute("tabindex", "-1"); }), Qr(s, "focus", l, true), Qr(s, "blur", c, true), Qr(s, "click", d, true), false, { isFocused: u, wrapperRef: s, handleFocus: l, handleBlur: c }; } function hE({ afterComposition: e17, emit: t }) { const n = ref(false), r = (i) => { t == null || t("compositionstart", i), n.value = true; }, 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 = false, nextTick(() => e17(i))); }; return { isComposing: n, handleComposition: (i) => { i.type === "compositionend" ? a(i) : o(i); }, handleCompositionStart: r, handleCompositionUpdate: o, handleCompositionEnd: a }; } var vE = Symbol("emptyValuesContextKey"); var SQ = "use-empty-values"; var _Q = ["", void 0, null]; var TQ = void 0; var OQ = zt({ emptyValues: Array, valueOnClear: { type: [String, Number, Boolean, Function], default: void 0, validator: (e17) => wr(e17) ? !e17() : !e17 } }); var PQ = (e17, t) => { const n = getCurrentInstance() ? inject(vE, ref({})) : ref({}), r = computed(() => e17.emptyValues || n.value.emptyValues || _Q), o = computed(() => wr(e17.valueOnClear) ? e17.valueOnClear() : e17.valueOnClear !== void 0 ? e17.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 }; }; var $Q = zt({ ariaLabel: String, ariaOrientation: { type: String, values: ["horizontal", "vertical", "undefined"] }, ariaControls: String }); var Pi = (e17) => V4($Q, e17); var gE = Symbol(); var Jp = ref(); function ty(e17, t = void 0) { const n = getCurrentInstance() ? inject(gE, Jp) : Jp; return e17 ? computed(() => { var r, o; return (o = (r = n.value) == null ? void 0 : r[e17]) != null ? o : t; }) : n; } function AQ(e17, t) { const n = ty(), r = wt(e17, computed(() => { var s; return ((s = n.value) == null ? void 0 : s.namespace) || cp; })), o = Uc(computed(() => { var s; return (s = n.value) == null ? void 0 : s.locale; })), a = pE(computed(() => { var s; return ((s = n.value) == null ? void 0 : s.zIndex) || cE; })), i = computed(() => { var s; return unref(t) || ((s = n.value) == null ? void 0 : s.size) || ""; }); return FQ(computed(() => unref(n) || {})), { ns: r, locale: o, zIndex: a, size: i }; } var FQ = (e17, t, n = false) => { var r; const o = !!getCurrentInstance(), a = o ? ty() : void 0, i = (r = void 0) != null ? r : o ? provide : void 0; if (!i) { Tn("provideGlobalConfig", "provideGlobalConfig() can only be used inside setup()."); return; } const s = computed(() => { const u = unref(e17); return a != null && a.value ? IQ(a.value, u) : u; }); return i(gE, s), i(K4, computed(() => s.value.locale)), i(G4, computed(() => s.value.namespace)), i(dE, computed(() => s.value.zIndex)), i(fE, { size: computed(() => s.value.size || "") }), i(vE, computed(() => ({ emptyValues: s.value.emptyValues, valueOnClear: s.value.valueOnClear }))), (n || !Jp.value) && (Jp.value = s.value), s; }; var IQ = (e17, t) => { const n = [.../* @__PURE__ */ new Set([...kw(e17), ...kw(t)])], r = {}; for (const o of n) r[o] = t[o] !== void 0 ? t[o] : e17[o]; return r; }; var bt = (e17, t) => { const n = e17.__vccOpts || e17; for (const [r, o] of t) n[r] = o; return n; }; var NQ = zt({ size: { type: ut([Number, String]) }, color: { type: String } }); var LQ = defineComponent({ name: "ElIcon", inheritAttrs: false }); var DQ = defineComponent({ ...LQ, props: NQ, setup(e17) { const t = e17, n = wt("icon"), r = computed(() => { const { size: o, color: a } = t; return !o && !a ? {} : { fontSize: ri(o) ? void 0 : Sl(o), "--color": a }; }); return (o, a) => (openBlock(), createElementBlock("i", mergeProps({ class: unref(n).b(), style: unref(r) }, o.$attrs), [ renderSlot(o.$slots, "default") ], 16)); } }); var RQ = bt(DQ, [["__file", "icon.vue"]]); var lr = jn(RQ); var ny = Symbol("formContextKey"); var dc = Symbol("formItemContextKey"); var vs = (e17, t = {}) => { const n = ref(void 0), r = t.prop ? n : X4("size"), o = t.global ? n : EQ(), a = t.form ? { size: void 0 } : inject(ny, void 0), i = t.formItem ? { size: void 0 } : inject(dc, void 0); return computed(() => r.value || unref(e17) || (i == null ? void 0 : i.size) || (a == null ? void 0 : a.size) || o.value || ""); }; var Kc = (e17) => { const t = X4("disabled"), n = inject(ny, void 0); return computed(() => t.value || unref(e17) || (n == null ? void 0 : n.disabled) || false); }; var As = () => { const e17 = inject(ny, void 0), t = inject(dc, void 0); return { form: e17, formItem: t }; }; var Gc = (e17, { formItemContext: t, disableIdGeneration: n, disableIdManagement: r }) => { n || (n = ref(false)), r || (r = ref(false)); const o = ref(); let a; const i = computed(() => { var s; return !!(!(e17.label || e17.ariaLabel) && t && t.inputIds && ((s = t.inputIds) == null ? void 0 : s.length) <= 1); }); return onMounted(() => { a = watch([toRef(e17, "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: true }); }), onUnmounted(() => { a && a(), t != null && t.removeInputId && o.value && t.removeInputId(o.value); }), { isLabeledByFormItem: i, inputId: o }; }; var bo; var BQ = ` height:0 !important; visibility:hidden !important; ${gK() ? "" : "overflow:hidden !important;"} position:absolute !important; z-index:-1000 !important; top:0 !important; right:0 !important; `; var 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(e17) { const t = window.getComputedStyle(e17), 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(e17, t = 1, n) { var r; bo || (bo = document.createElement("textarea"), document.body.appendChild(bo)); const { paddingSize: o, borderSize: a, boxSizing: i, contextStyle: s } = zQ(e17); bo.setAttribute("style", `${s};${BQ}`), bo.value = e17.value || e17.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; } var 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: false }, 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: true }, inputStyle: { type: ut([Object, Array, String]), default: () => Js({}) }, autofocus: Boolean, rows: { type: Number, default: 2 }, ...Pi(["ariaLabel"]) }); var jQ = { [Kn]: (e17) => ur(e17), input: (e17) => ur(e17), change: (e17) => ur(e17), focus: (e17) => e17 instanceof FocusEvent, blur: (e17) => e17 instanceof FocusEvent, clear: () => true, mouseleave: (e17) => e17 instanceof MouseEvent, mouseenter: (e17) => e17 instanceof MouseEvent, keydown: (e17) => e17 instanceof Event, compositionstart: (e17) => e17 instanceof CompositionEvent, compositionupdate: (e17) => e17 instanceof CompositionEvent, compositionend: (e17) => e17 instanceof CompositionEvent }; var HQ = defineComponent({ name: "ElInput", inheritAttrs: false }); var UQ = defineComponent({ ...HQ, props: VQ, emits: jQ, setup(e17, { expose: t, emit: n }) { const r = e17, o = useAttrs(), a = useSlots(), i = computed(() => { 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 = computed(() => [ r.type === "textarea" ? m.b() : v.b(), v.m(h10.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")]: W.value && oe.value, [v.b("hidden")]: r.type === "hidden" }, o.class ]), u = computed(() => [ v.e("wrapper"), v.is("focus", O.value) ]), l = nJ({ excludeKeys: computed(() => Object.keys(i.value)) }), { form: c, formItem: d } = As(), { inputId: f } = Gc(r, { formItemContext: d }), h10 = vs(), p = Kc(), v = wt("input"), m = wt("textarea"), g = shallowRef(), b = shallowRef(), x = ref(false), w = ref(false), C = ref(), k = shallowRef(r.inputStyle), E = computed(() => 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 = computed(() => { var P; return (P = c == null ? void 0 : c.statusIcon) != null ? P : false; }), L = computed(() => (d == null ? void 0 : d.validateState) || ""), N = computed(() => L.value && q4[L.value]), M = computed(() => w.value ? WZ : MZ), I = computed(() => [ o.style ]), z = computed(() => [ r.inputStyle, k.value, { resize: r.resize } ]), R = computed(() => ii(r.modelValue) ? "" : String(r.modelValue)), W = computed(() => r.clearable && !p.value && !r.readonly && !!R.value && (O.value || x.value)), oe = computed(() => r.showPassword && !p.value && !r.readonly && !!R.value && (!!R.value || O.value)), Q = computed(() => r.showWordLimit && !!r.maxlength && (r.type === "text" || r.type === "textarea") && !p.value && !r.readonly && !r.showPassword), ae = computed(() => R.value.length), pe = computed(() => !!Q.value && ae.value > Number(r.maxlength)), we = computed(() => !!a.suffix || !!r.suffixIcon || W.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 }, nextTick(() => { b.value.offsetHeight, k.value = de; }); } else k.value = { minHeight: Bw(b.value).minHeight }; }, J = /* @__PURE__ */ ((P) => { let j = false; return () => { var se; j || !r.autosize || ((se = b.value) == null ? void 0 : se.offsetParent) === null || (P(), j = true); }; })(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 nextTick(), 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 nextTick(), (P = E.value) == null || P.focus(); }, Ue = () => { var P; return (P = E.value) == null ? void 0 : P.blur(); }, Ze = (P) => { x.value = false, n("mouseleave", P); }, Me = (P) => { x.value = true, 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 watch(() => r.modelValue, () => { var P; nextTick(() => ge()), r.validateEvent && ((P = d == null ? void 0 : d.validate) == null || P.call(d, "change").catch((j) => Tn(j))); }), watch(R, () => te()), watch(() => r.type, async () => { await nextTick(), te(), ge(); }), onMounted(() => { !r.formatter && r.parser && Tn("ElInput", "If you set the parser, you also need to set the formatter."), te(), nextTick(ge); }), t({ input: g, textarea: b, ref: E, textareaStyle: z, autosize: toRef(r, "autosize"), isComposing: Ne, focus: Be, blur: Ue, select: nt, clear: st, resizeTextarea: ge }), (P, j) => (openBlock(), createElementBlock("div", mergeProps(unref(i), { class: [ unref(s), { [unref(v).bm("group", "append")]: P.$slots.append, [unref(v).bm("group", "prepend")]: P.$slots.prepend } ], style: unref(I), role: P.containerRole, onMouseenter: Me, onMouseleave: Ze }), [ createCommentVNode(" input "), P.type !== "textarea" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [ createCommentVNode(" prepend slot "), P.$slots.prepend ? (openBlock(), createElementBlock("div", { key: 0, class: normalizeClass(unref(v).be("group", "prepend")) }, [ renderSlot(P.$slots, "prepend") ], 2)) : createCommentVNode("v-if", true), createBaseVNode("div", { ref_key: "wrapperRef", ref: S, class: normalizeClass(unref(u)) }, [ createCommentVNode(" prefix slot "), P.$slots.prefix || P.prefixIcon ? (openBlock(), createElementBlock("span", { key: 0, class: normalizeClass(unref(v).e("prefix")) }, [ createBaseVNode("span", { class: normalizeClass(unref(v).e("prefix-inner")) }, [ renderSlot(P.$slots, "prefix"), P.prefixIcon ? (openBlock(), createBlock(unref(lr), { key: 0, class: normalizeClass(unref(v).e("icon")) }, { default: withCtx(() => [ (openBlock(), createBlock(resolveDynamicComponent(P.prefixIcon))) ]), _: 1 }, 8, ["class"])) : createCommentVNode("v-if", true) ], 2) ], 2)) : createCommentVNode("v-if", true), createBaseVNode("input", mergeProps({ id: unref(f), ref_key: "input", ref: g, class: unref(v).e("inner") }, unref(l), { minlength: P.minlength, maxlength: P.maxlength, type: P.showPassword ? w.value ? "text" : "password" : P.type, disabled: unref(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: unref(je), onCompositionupdate: unref(_e), onCompositionend: unref(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"]), createCommentVNode(" suffix slot "), unref(we) ? (openBlock(), createElementBlock("span", { key: 1, class: normalizeClass(unref(v).e("suffix")) }, [ createBaseVNode("span", { class: normalizeClass(unref(v).e("suffix-inner")) }, [ !unref(W) || !unref(oe) || !unref(Q) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [ renderSlot(P.$slots, "suffix"), P.suffixIcon ? (openBlock(), createBlock(unref(lr), { key: 0, class: normalizeClass(unref(v).e("icon")) }, { default: withCtx(() => [ (openBlock(), createBlock(resolveDynamicComponent(P.suffixIcon))) ]), _: 1 }, 8, ["class"])) : createCommentVNode("v-if", true) ], 64)) : createCommentVNode("v-if", true), unref(W) ? (openBlock(), createBlock(unref(lr), { key: 1, class: normalizeClass([unref(v).e("icon"), unref(v).e("clear")]), onMousedown: withModifiers(unref(ic), ["prevent"]), onClick: st }, { default: withCtx(() => [ createVNode(unref(jm)) ]), _: 1 }, 8, ["class", "onMousedown"])) : createCommentVNode("v-if", true), unref(oe) ? (openBlock(), createBlock(unref(lr), { key: 2, class: normalizeClass([unref(v).e("icon"), unref(v).e("password")]), onClick: Ae }, { default: withCtx(() => [ (openBlock(), createBlock(resolveDynamicComponent(unref(M)))) ]), _: 1 }, 8, ["class"])) : createCommentVNode("v-if", true), unref(Q) ? (openBlock(), createElementBlock("span", { key: 3, class: normalizeClass(unref(v).e("count")) }, [ createBaseVNode("span", { class: normalizeClass(unref(v).e("count-inner")) }, toDisplayString(unref(ae)) + " / " + toDisplayString(P.maxlength), 3) ], 2)) : createCommentVNode("v-if", true), unref(L) && unref(N) && unref(A) ? (openBlock(), createBlock(unref(lr), { key: 4, class: normalizeClass([ unref(v).e("icon"), unref(v).e("validateIcon"), unref(v).is("loading", unref(L) === "validating") ]) }, { default: withCtx(() => [ (openBlock(), createBlock(resolveDynamicComponent(unref(N)))) ]), _: 1 }, 8, ["class"])) : createCommentVNode("v-if", true) ], 2) ], 2)) : createCommentVNode("v-if", true) ], 2), createCommentVNode(" append slot "), P.$slots.append ? (openBlock(), createElementBlock("div", { key: 1, class: normalizeClass(unref(v).be("group", "append")) }, [ renderSlot(P.$slots, "append") ], 2)) : createCommentVNode("v-if", true) ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [ createCommentVNode(" textarea "), createBaseVNode("textarea", mergeProps({ id: unref(f), ref_key: "textarea", ref: b, class: [unref(m).e("inner"), unref(v).is("focus", unref(O))] }, unref(l), { minlength: P.minlength, maxlength: P.maxlength, tabindex: P.tabindex, disabled: unref(p), readonly: P.readonly, autocomplete: P.autocomplete, style: unref(z), "aria-label": P.ariaLabel, placeholder: P.placeholder, form: P.form, autofocus: P.autofocus, rows: P.rows, onCompositionstart: unref(je), onCompositionupdate: unref(_e), onCompositionend: unref(De), onInput: le, onFocus: unref(F), onBlur: unref($), onChange: Ee, onKeydown: rt }), null, 16, ["id", "minlength", "maxlength", "tabindex", "disabled", "readonly", "autocomplete", "aria-label", "placeholder", "form", "autofocus", "rows", "onCompositionstart", "onCompositionupdate", "onCompositionend", "onFocus", "onBlur"]), unref(Q) ? (openBlock(), createElementBlock("span", { key: 0, style: normalizeStyle(C.value), class: normalizeClass(unref(v).e("count")) }, toDisplayString(unref(ae)) + " / " + toDisplayString(P.maxlength), 7)) : createCommentVNode("v-if", true) ], 64)) ], 16, ["role"])); } }); var qQ = bt(UQ, [["__file", "input.vue"]]); var uh = jn(qQ); var Vs = 4; var 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" } }; var KQ = ({ move: e17, size: t, bar: n }) => ({ [n.size]: t, transform: `translate${n.axis}(${e17}%)` }); var ry = Symbol("scrollbarContextKey"); var GQ = zt({ vertical: Boolean, size: String, move: Number, ratio: { type: Number, required: true }, always: Boolean }); var XQ = "Thumb"; var YQ = defineComponent({ __name: "thumb", props: GQ, setup(e17) { const t = e17, n = inject(ry), r = wt("scrollbar"); n || gZ(XQ, "can not inject scrollbar context"); const o = ref(), a = ref(), i = ref({}), s = ref(false); let u = false, l = false, c = _n ? document.onselectstart : null; const d = computed(() => WQ[t.vertical ? "vertical" : "horizontal"]), f = computed(() => KQ({ size: t.size, move: t.move, bar: d.value })), h10 = computed(() => 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 * h10.value / o.value[d.value.offset]; n.wrapElement[d.value.scroll] = O * n.wrapElement[d.value.scrollSize] / 100; }, m = (k) => { k.stopImmediatePropagation(), u = true, document.addEventListener("mousemove", g), document.addEventListener("mouseup", b), c = document.onselectstart, document.onselectstart = () => false; }, g = (k) => { if (!o.value || !a.value || u === false) 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 * h10.value / o.value[d.value.offset]; n.wrapElement[d.value.scroll] = F * n.wrapElement[d.value.scrollSize] / 100; }, b = () => { u = false, i.value[d.value.axis] = 0, document.removeEventListener("mousemove", g), document.removeEventListener("mouseup", b), C(), l && (s.value = false); }, x = () => { l = false, s.value = !!t.size; }, w = () => { l = true, s.value = u; }; onBeforeUnmount(() => { C(), document.removeEventListener("mouseup", b); }); const C = () => { document.onselectstart !== c && (document.onselectstart = c); }; return Qr(toRef(n, "scrollbarElement"), "mousemove", x), Qr(toRef(n, "scrollbarElement"), "mouseleave", w), (k, E) => (openBlock(), createBlock(Transition, { name: unref(r).b("fade"), persisted: "" }, { default: withCtx(() => [ withDirectives(createBaseVNode("div", { ref_key: "instance", ref: o, class: normalizeClass([unref(r).e("bar"), unref(r).is(unref(d).key)]), onMousedown: v }, [ createBaseVNode("div", { ref_key: "thumb", ref: a, class: normalizeClass(unref(r).e("thumb")), style: normalizeStyle(unref(f)), onMousedown: p }, null, 38) ], 34), [ [vShow, k.always || s.value] ]) ]), _: 1 }, 8, ["name"])); } }); var Mw = bt(YQ, [["__file", "thumb.vue"]]); var ZQ = zt({ always: { type: Boolean, default: true }, minSize: { type: Number, required: true } }); var JQ = defineComponent({ __name: "bar", props: ZQ, setup(e17, { expose: t }) { const n = e17, r = inject(ry), o = ref(0), a = ref(0), i = ref(""), s = ref(""), u = ref(1), l = ref(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, h10 = d ** 2 / c.scrollHeight, p = f ** 2 / c.scrollWidth, v = Math.max(h10, n.minSize), m = Math.max(p, n.minSize); u.value = h10 / (d - h10) / (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) => (openBlock(), createElementBlock(Fragment, null, [ createVNode(Mw, { move: o.value, ratio: l.value, size: i.value, always: c.always }, null, 8, ["move", "ratio", "size", "always"]), createVNode(Mw, { move: a.value, ratio: u.value, size: s.value, vertical: "", always: c.always }, null, 8, ["move", "ratio", "size", "always"]) ], 64)); } }); var QQ = bt(JQ, [["__file", "bar.vue"]]); var eee = zt({ height: { type: [String, Number], default: "" }, maxHeight: { type: [String, Number], default: "" }, native: { type: Boolean, default: false }, 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"]) }); var tee = { scroll: ({ scrollTop: e17, scrollLeft: t }) => [e17, t].every(Xn) }; var O0 = "ElScrollbar"; var nee = defineComponent({ name: O0 }); var ree = defineComponent({ ...nee, props: eee, emits: tee, setup(e17, { expose: t, emit: n }) { const r = e17, o = wt("scrollbar"); let a, i, s = 0, u = 0; const l = ref(), c = ref(), d = ref(), f = ref(), h10 = computed(() => { const C = {}; return r.height && (C.height = Sl(r.height)), r.maxHeight && (C.maxHeight = Sl(r.maxHeight)), [r.wrapStyle, C]; }), p = computed(() => [ r.wrapClass, o.e("wrap"), { [o.em("wrap", "hidden-default")]: !r.native } ]), v = computed(() => [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 watch(() => r.noresize, (C) => { C ? (a == null || a(), i == null || i()) : ({ stop: a } = ga(d, w), i = Qr("resize", w)); }, { immediate: true }), watch(() => [r.maxHeight, r.height], () => { r.native || nextTick(() => { var C; w(), c.value && ((C = f.value) == null || C.handleScroll(c.value)); }); }), provide(ry, reactive({ scrollbarElement: l, wrapElement: c })), onActivated(() => { c.value && (c.value.scrollTop = s, c.value.scrollLeft = u); }), onMounted(() => { r.native || nextTick(() => { w(); }); }), onUpdated(() => w()), t({ wrapRef: c, update: w, scrollTo: g, setScrollTop: b, setScrollLeft: x, handleScroll: m }), (C, k) => (openBlock(), createElementBlock("div", { ref_key: "scrollbarRef", ref: l, class: normalizeClass(unref(o).b()) }, [ createBaseVNode("div", { ref_key: "wrapRef", ref: c, class: normalizeClass(unref(p)), style: normalizeStyle(unref(h10)), tabindex: C.tabindex, onScroll: m }, [ (openBlock(), createBlock(resolveDynamicComponent(C.tag), { id: C.id, ref_key: "resizeRef", ref: d, class: normalizeClass(unref(v)), style: normalizeStyle(C.viewStyle), role: C.role, "aria-label": C.ariaLabel, "aria-orientation": C.ariaOrientation }, { default: withCtx(() => [ renderSlot(C.$slots, "default") ]), _: 3 }, 8, ["id", "class", "style", "role", "aria-label", "aria-orientation"])) ], 46, ["tabindex"]), C.native ? createCommentVNode("v-if", true) : (openBlock(), createBlock(QQ, { key: 0, ref_key: "barRef", ref: f, always: C.always, "min-size": C.minSize }, null, 8, ["always", "min-size"])) ], 2)); } }); var oee = bt(ree, [["__file", "scrollbar.vue"]]); var aee = jn(oee); var oy = Symbol("popper"); var mE = Symbol("popperContent"); var iee = [ "dialog", "grid", "group", "listbox", "menu", "navigation", "tooltip", "tree" ]; var yE = zt({ role: { type: String, values: iee, default: "tooltip" } }); var see = defineComponent({ name: "ElPopper", inheritAttrs: false }); var lee = defineComponent({ ...see, props: yE, setup(e17, { expose: t }) { const n = e17, r = ref(), o = ref(), a = ref(), i = ref(), s = computed(() => n.role), u = { triggerRef: r, popperInstanceRef: o, contentRef: a, referenceRef: i, role: s }; return t(u), provide(oy, u), (l, c) => renderSlot(l.$slots, "default"); } }); var uee = bt(lee, [["__file", "popper.vue"]]); var bE = zt({ arrowOffset: { type: Number, default: 5 } }); var cee = defineComponent({ name: "ElPopperArrow", inheritAttrs: false }); var dee = defineComponent({ ...cee, props: bE, setup(e17, { expose: t }) { const n = e17, r = wt("popper"), { arrowOffset: o, arrowRef: a, arrowStyle: i } = inject(mE, void 0); return watch(() => n.arrowOffset, (s) => { o.value = s; }), onBeforeUnmount(() => { a.value = void 0; }), t({ arrowRef: a }), (s, u) => (openBlock(), createElementBlock("span", { ref_key: "arrowRef", ref: a, class: normalizeClass(unref(r).e("arrow")), style: normalizeStyle(unref(i)), "data-popper-arrow": "" }, null, 6)); } }); var pee = bt(dee, [["__file", "arrow.vue"]]); var vv = "ElOnlyChild"; var fee = defineComponent({ name: vv, setup(e17, { slots: t, attrs: n }) { var r; const o = inject(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 ? withDirectives(cloneVNode(u, n), [[a]]) : (Tn(vv, "no valid child node found"), null); }; } }); function wE(e17) { if (!e17) return null; const t = e17; for (const n of t) { if (Gn(n)) switch (n.type) { case Comment: continue; case Text: case "svg": return zw(n); case Fragment: return wE(n.children); default: return n; } return zw(n); } return null; } function zw(e17) { const t = wt("only-child"); return createVNode("span", { class: t.e("content") }, [e17]); } var 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 }); var hee = defineComponent({ name: "ElPopperTrigger", inheritAttrs: false }); var vee = defineComponent({ ...hee, props: xE, setup(e17, { expose: t }) { const n = e17, { role: r, triggerRef: o } = inject(oy, void 0); xQ(o); const a = computed(() => s.value ? n.id : void 0), i = computed(() => { if (r && r.value === "tooltip") return n.open && n.id ? n.id : void 0; }), s = computed(() => { if (r && r.value !== "tooltip") return r.value; }), u = computed(() => s.value ? `${n.open}` : void 0); let l; const c = [ "onMouseenter", "onMouseleave", "onClick", "onKeydown", "onFocus", "onBlur", "onContextmenu" ]; return onMounted(() => { watch(() => n.virtualRef, (d) => { d && (o.value = wa(d)); }, { immediate: true }), watch(o, (d, f) => { l == null || l(), l = void 0, rs(d) && (c.forEach((h10) => { var p; const v = n[h10]; v && (d.addEventListener(h10.slice(2).toLowerCase(), v), (p = f == null ? void 0 : f.removeEventListener) == null || p.call(f, h10.slice(2).toLowerCase(), v)); }), l = watch([a, i, s, u], (h10) => { [ "aria-controls", "aria-describedby", "aria-haspopup", "aria-expanded" ].forEach((p, v) => { ii(h10[v]) ? d.removeAttribute(p) : d.setAttribute(p, h10[v]); }); }, { immediate: true })), rs(f) && [ "aria-controls", "aria-describedby", "aria-haspopup", "aria-expanded" ].forEach((h10) => f.removeAttribute(h10)); }, { immediate: true }); }), onBeforeUnmount(() => { if (l == null || l(), l = void 0, o.value && rs(o.value)) { const d = o.value; c.forEach((f) => { const h10 = n[f]; h10 && d.removeEventListener(f.slice(2).toLowerCase(), h10); }), o.value = void 0; } }), t({ triggerRef: o }), (d, f) => d.virtualTriggering ? createCommentVNode("v-if", true) : (openBlock(), createBlock(unref(fee), mergeProps({ key: 0 }, d.$attrs, { "aria-controls": unref(a), "aria-describedby": unref(i), "aria-expanded": unref(u), "aria-haspopup": unref(s) }), { default: withCtx(() => [ renderSlot(d.$slots, "default") ]), _: 3 }, 16, ["aria-controls", "aria-describedby", "aria-expanded", "aria-haspopup"])); } }); var gee = bt(vee, [["__file", "trigger.vue"]]); var gv = "focus-trap.focus-after-trapped"; var mv = "focus-trap.focus-after-released"; var mee = "focus-trap.focusout-prevented"; var Vw = { cancelable: true, bubbles: false }; var yee = { cancelable: true, bubbles: false }; var jw = "focusAfterTrapped"; var Hw = "focusAfterReleased"; var bee = Symbol("elFocusTrap"); var ay = ref(); var ch = ref(0); var iy = ref(0); var Ad = 0; var kE = (e17) => { const t = [], n = document.createTreeWalker(e17, 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; }; var Uw = (e17, t) => { for (const n of e17) if (!wee(n, t)) return n; }; var wee = (e17, t) => { if (false) return false; if (getComputedStyle(e17).visibility === "hidden") return true; for (; e17; ) { if (t && e17 === t) return false; if (getComputedStyle(e17).display === "none") return true; e17 = e17.parentElement; } return false; }; var xee = (e17) => { const t = kE(e17), n = Uw(t, e17), r = Uw(t.reverse(), e17); return [n, r]; }; var kee = (e17) => e17 instanceof HTMLInputElement && "select" in e17; var Ga = (e17, t) => { if (e17 && e17.focus) { const n = document.activeElement; e17.focus({ preventScroll: true }), iy.value = window.performance.now(), e17 !== n && kee(e17) && t && e17.select(); } }; function qw(e17, t) { const n = [...e17], r = e17.indexOf(t); return r !== -1 && n.splice(r, 1), n; } var Cee = () => { let e17 = []; return { push: (t) => { const n = e17[0]; n && t !== n && n.pause(), e17 = qw(e17, t), e17.unshift(t); }, remove: (t) => { var n, r; e17 = qw(e17, t), (r = (n = e17[0]) == null ? void 0 : n.resume) == null || r.call(n); } }; }; var Eee = (e17, t = false) => { const n = document.activeElement; for (const r of e17) if (Ga(r, t), document.activeElement !== n) return; }; var Ww = Cee(); var See = () => ch.value > iy.value; var Fd = () => { ay.value = "pointer", ch.value = window.performance.now(); }; var Kw = () => { ay.value = "keyboard", ch.value = window.performance.now(); }; var _ee = () => (onMounted(() => { Ad === 0 && (document.addEventListener("mousedown", Fd), document.addEventListener("touchstart", Fd), document.addEventListener("keydown", Kw)), Ad++; }), onBeforeUnmount(() => { Ad--, Ad <= 0 && (document.removeEventListener("mousedown", Fd), document.removeEventListener("touchstart", Fd), document.removeEventListener("keydown", Kw)); }), { focusReason: ay, lastUserFocusTimestamp: ch, lastAutomatedFocusTimestamp: iy }); var Id = (e17) => new CustomEvent(mee, { ...yee, detail: e17 }); var Tee = defineComponent({ name: "ElFocusTrap", inheritAttrs: false, props: { loop: Boolean, trapped: Boolean, focusTrapEl: Object, focusStartEl: { type: [Object, String], default: "first" } }, emits: [ jw, Hw, "focusin", "focusout", "focusout-prevented", "release-requested" ], setup(e17, { emit: t }) { const n = ref(); let r, o; const { focusReason: a } = _ee(); gQ((p) => { e17.trapped && !i.paused && t("release-requested", p); }); const i = { paused: false, pause() { this.paused = true; }, resume() { this.paused = false; } }, s = (p) => { if (!e17.loop && !e17.trapped || i.paused) return; const { key: v, altKey: m, ctrlKey: g, metaKey: b, currentTarget: x, shiftKey: w } = p, { loop: C } = e17, 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, true)); } else if (w && [O, S].includes(E)) { const $ = Id({ focusReason: a.value }); t("focusout-prevented", $), $.defaultPrevented || (p.preventDefault(), C && Ga(F, true)); } } else if (E === S) { const $ = Id({ focusReason: a.value }); t("focusout-prevented", $), $.defaultPrevented || p.preventDefault(); } } }; provide(bee, { focusTrapRef: n, onKeydown: s }), watch(() => e17.focusTrapEl, (p) => { p && (n.value = p); }, { immediate: true }), watch([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 = unref(n); if (!v) return; const m = p.target, g = p.relatedTarget, b = m && v.contains(m); e17.trapped || g && v.contains(g) || (r = g), b && t("focusin", p), !i.paused && e17.trapped && (b ? o = m : Ga(o, true)); }, d = (p) => { const v = unref(n); if (!(i.paused || !v)) if (e17.trapped) { const m = p.relatedTarget; !ii(m) && !v.contains(m) && setTimeout(() => { if (!i.paused && e17.trapped) { const g = Id({ focusReason: a.value }); t("focusout-prevented", g), g.defaultPrevented || Ga(o, true); } }, 0); } else { const m = p.target; m && v.contains(m) || t("focusout", p); } }; async function f() { await nextTick(); const p = unref(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 || nextTick(() => { let g = e17.focusStartEl; ur(g) || (Ga(g), document.activeElement !== g && (g = "first")), g === "first" && Eee(kE(p), true), (document.activeElement === v || g === "container") && Ga(p); }); } } } function h10() { const p = unref(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 onMounted(() => { e17.trapped && f(), watch(() => e17.trapped, (p) => { p ? f() : h10(); }); }), onBeforeUnmount(() => { e17.trapped && h10(), 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(e17, t, n, r, o, a) { return renderSlot(e17.$slots, "default", { handleKeydown: e17.onKeydown }); } var Pee = bt(Tee, [["render", Oee], ["__file", "focus-trap.vue"]]); var $ee = ["fixed", "absolute"]; var Aee = zt({ boundariesPadding: { type: Number, default: 0 }, fallbackPlacements: { type: ut(Array), default: void 0 }, gpuAcceleration: { type: Boolean, default: true }, offset: { type: Number, default: 12 }, placement: { type: String, values: ih, default: "bottom" }, popperOptions: { type: ut(Object), default: () => ({}) }, strategy: { type: String, values: $ee, default: "absolute" } }); var 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: true }, pure: Boolean, focusOnShow: { type: Boolean, default: false }, trapping: { type: Boolean, default: false }, popperClass: { type: ut([String, Array, Object]) }, popperStyle: { type: ut([String, Array, Object]) }, referenceEl: { type: ut(Object) }, triggerTargetEl: { type: ut(Object) }, stopPopperMouseEvent: { type: Boolean, default: true }, virtualTriggering: Boolean, zIndex: Number, ...Pi(["ariaLabel"]) }); var Fee = { mouseenter: (e17) => e17 instanceof MouseEvent, mouseleave: (e17) => e17 instanceof MouseEvent, focus: () => true, blur: () => true, close: () => true }; var Iee = (e17, t = []) => { const { placement: n, strategy: r, popperOptions: o } = e17, a = { placement: n, strategy: r, ...o, modifiers: [...Lee(e17), ...t] }; return Dee(a, o == null ? void 0 : o.modifiers), a; }; var Nee = (e17) => { if (_n) return wa(e17); }; function Lee(e17) { const { offset: t, gpuAcceleration: n, fallbackPlacements: r } = e17; 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(e17, t) { t && (e17.modifiers = [...e17.modifiers, ...t ?? []]); } var Ree = 0; var Bee = (e17) => { const { popperInstanceRef: t, contentRef: n, triggerRef: r, role: o } = inject(oy, void 0), a = ref(), i = ref(), s = computed(() => ({ name: "eventListeners", enabled: !!e17.visible })), u = computed(() => { var g; const b = unref(a), x = (g = unref(i)) != null ? g : Ree; return { name: "arrow", enabled: !cZ(b), options: { element: b, padding: x } }; }), l = computed(() => ({ onFirstUpdate: () => { p(); }, ...Iee(e17, [ unref(u), unref(s) ]) })), c = computed(() => Nee(e17.referenceEl) || unref(r)), { attributes: d, state: f, styles: h10, update: p, forceUpdate: v, instanceRef: m } = fQ(c, n, l); return watch(m, (g) => t.value = g), onMounted(() => { watch(() => { var g; return (g = unref(c)) == null ? void 0 : g.getBoundingClientRect(); }, () => { p(); }); }), { attributes: d, arrowRef: a, contentRef: n, instanceRef: m, state: f, styles: h10, role: o, forceUpdate: v, update: p }; }; var Mee = (e17, { attributes: t, styles: n, role: r }) => { const { nextZIndex: o } = pE(), a = wt("popper"), i = computed(() => unref(t).popper), s = ref(Xn(e17.zIndex) ? e17.zIndex : o()), u = computed(() => [ a.b(), a.is("pure", e17.pure), a.is(e17.effect), e17.popperClass ]), l = computed(() => [ { zIndex: unref(s) }, unref(n).popper, e17.popperStyle || {} ]), c = computed(() => r.value === "dialog" ? "false" : void 0), d = computed(() => unref(n).arrow || {}); return { ariaModal: c, arrowStyle: d, contentAttrs: i, contentClass: u, contentStyle: l, contentZIndex: s, updateZIndex: () => { s.value = Xn(e17.zIndex) ? e17.zIndex : o(); } }; }; var zee = (e17, t) => { const n = ref(false), r = ref(); 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) => { e17.visible && !n.value && (o.target && (r.value = o.target), n.value = true); }, onFocusoutPrevented: (o) => { e17.trapping || (o.detail.focusReason === "pointer" && o.preventDefault(), n.value = false); }, onReleaseRequested: () => { n.value = false, t("close"); } }; }; var Vee = defineComponent({ name: "ElPopperContent" }); var jee = defineComponent({ ...Vee, props: CE, emits: Fee, setup(e17, { expose: t, emit: n }) { const r = e17, { focusStartRef: o, trapped: a, onFocusAfterReleased: i, onFocusAfterTrapped: s, onFocusInTrap: u, onFocusoutPrevented: l, onReleaseRequested: c } = zee(r, n), { attributes: d, arrowRef: f, contentRef: h10, 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 = inject(dc, void 0), O = ref(); provide(mE, { arrowStyle: x, arrowRef: f, arrowOffset: O }), S && provide(dc, { ...S, addInputId: ic, removeInputId: ic }); let F; const $ = (L = true) => { g(), L && E(); }, A = () => { $(false), r.visible && r.focusOnShow ? a.value = true : r.visible === false && (a.value = false); }; return onMounted(() => { watch(() => r.triggerTargetEl, (L, N) => { F == null || F(), F = void 0; const M = unref(L || h10.value), I = unref(N || h10.value); rs(M) && (F = watch([m, () => r.ariaLabel, b, () => r.id], (z) => { ["role", "aria-label", "aria-modal", "id"].forEach((R, W) => { ii(z[W]) ? M.removeAttribute(R) : M.setAttribute(R, z[W]); }); }, { immediate: true })), I !== M && rs(I) && ["role", "aria-label", "aria-modal", "id"].forEach((z) => { I.removeAttribute(z); }); }, { immediate: true }), watch(() => r.visible, A, { immediate: true }); }), onBeforeUnmount(() => { F == null || F(), F = void 0; }), t({ popperContentRef: h10, popperInstanceRef: v, updatePopper: $, contentStyle: k }), (L, N) => (openBlock(), createElementBlock("div", mergeProps({ ref_key: "contentRef", ref: h10 }, unref(w), { style: unref(k), class: unref(C), tabindex: "-1", onMouseenter: (M) => L.$emit("mouseenter", M), onMouseleave: (M) => L.$emit("mouseleave", M) }), [ createVNode(unref(Pee), { trapped: unref(a), "trap-on-focus-in": true, "focus-trap-el": unref(h10), "focus-start-el": unref(o), onFocusAfterTrapped: unref(s), onFocusAfterReleased: unref(i), onFocusin: unref(u), onFocusoutPrevented: unref(l), onReleaseRequested: unref(c) }, { default: withCtx(() => [ renderSlot(L.$slots, "default") ]), _: 3 }, 8, ["trapped", "focus-trap-el", "focus-start-el", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusin", "onFocusoutPrevented", "onReleaseRequested"]) ], 16, ["onMouseenter", "onMouseleave"])); } }); var Hee = bt(jee, [["__file", "content.vue"]]); var Uee = jn(uee); var sy = Symbol("elTooltip"); var 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: true }, disabled: Boolean, ...Pi(["ariaLabel"]) }); var pc = zt({ ...xE, disabled: Boolean, trigger: { type: ut([String, Array]), default: "hover" }, triggerKeys: { type: ut(Array), default: () => [In.enter, In.space] } }); var { useModelToggleProps: qee, useModelToggleEmits: Wee, useModelToggle: Kee } = cJ("visible"); var Gee = zt({ ...yE, ...qee, ...Er, ...pc, ...bE, showArrow: { type: Boolean, default: true } }); var Xee = [ ...Wee, "before-show", "before-hide", "show", "hide", "open", "close" ]; var Yee = (e17, t) => Tr(e17) ? e17.includes(t) : e17 === t; var js = (e17, t, n) => (r) => { Yee(unref(e17), t) && n(r); }; var Zee = defineComponent({ name: "ElTooltipTrigger" }); var Jee = defineComponent({ ...Zee, props: pc, setup(e17, { expose: t }) { const n = e17, r = wt("tooltip"), { controlled: o, id: a, open: i, onOpen: s, onClose: u, onToggle: l } = inject(sy, void 0), c = ref(null), d = () => { if (unref(o) || n.disabled) return true; }, f = toRef(n, "trigger"), h10 = 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) => (openBlock(), createBlock(unref(gee), { id: unref(a), "virtual-ref": w.virtualRef, open: unref(i), "virtual-triggering": w.virtualTriggering, class: normalizeClass(unref(r).e("trigger")), onBlur: unref(g), onClick: unref(v), onContextmenu: unref(b), onFocus: unref(m), onMouseenter: unref(h10), onMouseleave: unref(p), onKeydown: unref(x) }, { default: withCtx(() => [ renderSlot(w.$slots, "default") ]), _: 3 }, 8, ["id", "virtual-ref", "open", "virtual-triggering", "class", "onBlur", "onClick", "onContextmenu", "onFocus", "onMouseenter", "onMouseleave", "onKeydown"])); } }); var Qee = bt(Jee, [["__file", "trigger.vue"]]); var ete = zt({ to: { type: ut([String, Object]), required: true }, disabled: Boolean }); var tte = defineComponent({ __name: "teleport", props: ete, setup(e17) { return (t, n) => t.disabled ? renderSlot(t.$slots, "default", { key: 0 }) : (openBlock(), createBlock(Teleport, { key: 1, to: t.to }, [ renderSlot(t.$slots, "default") ], 8, ["to"])); } }); var nte = bt(tte, [["__file", "teleport.vue"]]); var rte = jn(nte); var ote = defineComponent({ name: "ElTooltipContent", inheritAttrs: false }); var ate = defineComponent({ ...ote, props: Er, setup(e17, { expose: t }) { const n = e17, { selector: r } = lE(), o = wt("tooltip"), a = ref(null); let i; const { controlled: s, id: u, open: l, trigger: c, onClose: d, onOpen: f, onShow: h10, onHide: p, onBeforeShow: v, onBeforeHide: m } = inject(sy, void 0), g = computed(() => n.transition || `${o.namespace.value}-fade-in-linear`), b = computed(() => false ? true : n.persistent); onBeforeUnmount(() => { i == null || i(); }); const x = computed(() => unref(b) ? true : unref(l)), w = computed(() => n.disabled ? false : unref(l)), C = computed(() => n.appendTo || r.value), k = computed(() => { var I; return (I = n.style) != null ? I : {}; }), E = ref(true), S = () => { p(), E.value = true; }, O = () => { if (unref(s)) return true; }, F = va(O, () => { n.enterable && unref(c) === "hover" && f(); }), $ = va(O, () => { unref(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 = () => { h10(), i = rK(computed(() => { var I; return (I = a.value) == null ? void 0 : I.popperContentRef; }), () => { unref(s) || unref(c) !== "hover" && d(); }); }, M = () => { n.virtualTriggering || d(); }; return watch(() => unref(l), (I) => { I ? E.value = false : i == null || i(); }, { flush: "post" }), watch(() => n.content, () => { var I, z; (z = (I = a.value) == null ? void 0 : I.updatePopper) == null || z.call(I); }), t({ contentRef: a }), (I, z) => (openBlock(), createBlock(unref(rte), { disabled: !I.teleported, to: unref(C) }, { default: withCtx(() => [ createVNode(Transition, { name: unref(g), onAfterLeave: S, onBeforeEnter: A, onAfterEnter: N, onBeforeLeave: L }, { default: withCtx(() => [ unref(x) ? withDirectives((openBlock(), createBlock(unref(Hee), mergeProps({ key: 0, id: unref(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, unref(k)], "reference-el": I.referenceEl, "trigger-target-el": I.triggerTargetEl, visible: unref(w), "z-index": I.zIndex, onMouseenter: unref(F), onMouseleave: unref($), onBlur: M, onClose: unref(d) }), { default: withCtx(() => [ renderSlot(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"])), [ [vShow, unref(w)] ]) : createCommentVNode("v-if", true) ]), _: 3 }, 8, ["name"]) ]), _: 3 }, 8, ["disabled", "to"])); } }); var ite = bt(ate, [["__file", "content.vue"]]); var ste = defineComponent({ name: "ElTooltip" }); var lte = defineComponent({ ...ste, props: Gee, emits: Xee, setup(e17, { expose: t, emit: n }) { const r = e17; yQ(); const o = lh(), a = ref(), i = ref(), s = () => { var g; const b = unref(a); b && ((g = b.popperInstanceRef) == null || g.update()); }, u = ref(false), l = ref(), { show: c, hide: d, hasUpdateHandler: f } = Kee({ indicator: u, toggleReason: l }), { onOpen: h10, onClose: p } = wQ({ showAfter: toRef(r, "showAfter"), hideAfter: toRef(r, "hideAfter"), autoClose: toRef(r, "autoClose"), open: c, close: d }), v = computed(() => El(r.visible) && !f.value); provide(sy, { controlled: v, id: o, open: readonly(u), trigger: toRef(r, "trigger"), onOpen: (g) => { h10(g); }, onClose: (g) => { p(g); }, onToggle: (g) => { unref(u) ? p(g) : h10(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 }), watch(() => r.disabled, (g) => { g && u.value && (u.value = false); }); 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 onDeactivated(() => u.value && d()), t({ popperRef: a, contentRef: i, isFocusInsideContent: m, updatePopper: s, onOpen: h10, onClose: p, hide: d }), (g, b) => (openBlock(), createBlock(unref(Uee), { ref_key: "popperRef", ref: a, role: g.role }, { default: withCtx(() => [ createVNode(Qee, { disabled: g.disabled, trigger: g.trigger, "trigger-keys": g.triggerKeys, "virtual-ref": g.virtualRef, "virtual-triggering": g.virtualTriggering }, { default: withCtx(() => [ g.$slots.default ? renderSlot(g.$slots, "default", { key: 0 }) : createCommentVNode("v-if", true) ]), _: 3 }, 8, ["disabled", "trigger", "trigger-keys", "virtual-ref", "virtual-triggering"]), createVNode(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: withCtx(() => [ renderSlot(g.$slots, "content", {}, () => [ g.rawContent ? (openBlock(), createElementBlock("span", { key: 0, innerHTML: g.content }, null, 8, ["innerHTML"])) : (openBlock(), createElementBlock("span", { key: 1 }, toDisplayString(g.content), 1)) ]), g.showArrow ? (openBlock(), createBlock(unref(pee), { key: 0, "arrow-offset": g.arrowOffset }, null, 8, ["arrow-offset"])) : createCommentVNode("v-if", true) ]), _: 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 = bt(lte, [["__file", "tooltip.vue"]]); var Xc = jn(ute); var EE = Symbol("buttonGroupContextKey"); var cte = (e17, 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" }, computed(() => e17.type === "text")); const n = inject(EE, void 0), r = ty("button"), { form: o } = As(), a = vs(computed(() => n == null ? void 0 : n.size)), i = Kc(), s = ref(), u = useSlots(), l = computed(() => e17.type || (n == null ? void 0 : n.type) || ""), c = computed(() => { var h10, p, v; return (v = (p = e17.autoInsertSpace) != null ? p : (h10 = r.value) == null ? void 0 : h10.autoInsertSpace) != null ? v : false; }), d = computed(() => e17.tag === "button" ? { ariaDisabled: i.value || e17.loading, disabled: i.value || e17.loading, autofocus: e17.autofocus, type: e17.nativeType } : {}), f = computed(() => { var h10; const p = (h10 = u.default) == null ? void 0 : h10.call(u); if (c.value && (p == null ? void 0 : p.length) === 1) { const v = p[0]; if ((v == null ? void 0 : v.type) === Text) { const m = v.children; return new RegExp("^\\p{Unified_Ideograph}{2}$", "u").test(m.trim()); } } return false; }); return { _disabled: i, _size: a, _type: l, _ref: s, _props: d, shouldAddSpace: f, handleClick: (h10) => { if (i.value || e17.loading) { h10.stopPropagation(); return; } e17.nativeType === "reset" && (o == null || o.resetFields()), t("click", h10); } }; }; var dte = [ "default", "primary", "success", "warning", "info", "danger", "text", "" ]; var pte = ["button", "submit", "reset"]; var 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" } }); var fte = { click: (e17) => e17 instanceof MouseEvent }; function Qn(e17, t) { hte(e17) && (e17 = "100%"); var n = vte(e17); return e17 = t === 360 ? e17 : Math.min(t, Math.max(0, parseFloat(e17))), n && (e17 = parseInt(String(e17 * t), 10) / 100), Math.abs(e17 - t) < 1e-6 ? 1 : (t === 360 ? e17 = (e17 < 0 ? e17 % t + t : e17 % t) / parseFloat(String(t)) : e17 = e17 % t / parseFloat(String(t)), e17); } function Nd(e17) { return Math.min(1, Math.max(0, e17)); } function hte(e17) { return typeof e17 == "string" && e17.indexOf(".") !== -1 && parseFloat(e17) === 1; } function vte(e17) { return typeof e17 == "string" && e17.indexOf("%") !== -1; } function SE(e17) { return e17 = parseFloat(e17), (isNaN(e17) || e17 < 0 || e17 > 1) && (e17 = 1), e17; } function Ld(e17) { return e17 <= 1 ? "".concat(Number(e17) * 100, "%") : e17; } function Xi(e17) { return e17.length === 1 ? "0" + e17 : String(e17); } function gte(e17, t, n) { return { r: Qn(e17, 255) * 255, g: Qn(t, 255) * 255, b: Qn(n, 255) * 255 }; } function Gw(e17, t, n) { e17 = Qn(e17, 255), t = Qn(t, 255), n = Qn(n, 255); var r = Math.max(e17, t, n), o = Math.min(e17, 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 e17: a = (t - n) / u + (t < n ? 6 : 0); break; case t: a = (n - e17) / u + 2; break; case n: a = (e17 - t) / u + 4; break; } a /= 6; } return { h: a, s: i, l: s }; } function yv(e17, t, n) { return n < 0 && (n += 1), n > 1 && (n -= 1), n < 1 / 6 ? e17 + (t - e17) * (6 * n) : n < 1 / 2 ? t : n < 2 / 3 ? e17 + (t - e17) * (2 / 3 - n) * 6 : e17; } function mte(e17, t, n) { var r, o, a; if (e17 = Qn(e17, 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, e17 + 1 / 3), o = yv(s, i, e17), a = yv(s, i, e17 - 1 / 3); } return { r: r * 255, g: o * 255, b: a * 255 }; } function Xw(e17, t, n) { e17 = Qn(e17, 255), t = Qn(t, 255), n = Qn(n, 255); var r = Math.max(e17, t, n), o = Math.min(e17, t, n), a = 0, i = r, s = r - o, u = r === 0 ? 0 : s / r; if (r === o) a = 0; else { switch (r) { case e17: a = (t - n) / s + (t < n ? 6 : 0); break; case t: a = (n - e17) / s + 2; break; case n: a = (e17 - t) / s + 4; break; } a /= 6; } return { h: a, s: u, v: i }; } function yte(e17, t, n) { e17 = Qn(e17, 360) * 6, t = Qn(t, 100), n = Qn(n, 100); var r = Math.floor(e17), o = e17 - 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(e17, t, n, r) { var o = [ Xi(Math.round(e17).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(e17, t, n, r, o) { var a = [ Xi(Math.round(e17).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(e17) { return Math.round(parseFloat(e17) * 255).toString(16); } function Zw(e17) { return jr(e17) / 255; } function jr(e17) { return parseInt(e17, 16); } function xte(e17) { return { r: e17 >> 16, g: (e17 & 65280) >> 8, b: e17 & 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(e17) { var t = { r: 0, g: 0, b: 0 }, n = 1, r = null, o = null, a = null, i = false, s = false; return typeof e17 == "string" && (e17 = Ste(e17)), typeof e17 == "object" && (da(e17.r) && da(e17.g) && da(e17.b) ? (t = gte(e17.r, e17.g, e17.b), i = true, s = String(e17.r).substr(-1) === "%" ? "prgb" : "rgb") : da(e17.h) && da(e17.s) && da(e17.v) ? (r = Ld(e17.s), o = Ld(e17.v), t = yte(e17.h, r, o), i = true, s = "hsv") : da(e17.h) && da(e17.s) && da(e17.l) && (r = Ld(e17.s), a = Ld(e17.l), t = mte(e17.h, r, a), i = true, s = "hsl"), Object.prototype.hasOwnProperty.call(e17, "a") && (n = e17.a)), n = SE(n), { ok: i, format: e17.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+%?"; var Ete = "[-\\+]?\\d*\\.\\d+%?"; var oi = "(?:".concat(Ete, ")|(?:").concat(Cte, ")"); var bv = "[\\s|\\(]+(".concat(oi, ")[,|\\s]+(").concat(oi, ")[,|\\s]+(").concat(oi, ")\\s*\\)?"); var wv = "[\\s|\\(]+(".concat(oi, ")[,|\\s]+(").concat(oi, ")[,|\\s]+(").concat(oi, ")[,|\\s]+(").concat(oi, ")\\s*\\)?"); var 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(e17) { if (e17 = e17.trim().toLowerCase(), e17.length === 0) return false; var t = false; if ($0[e17]) e17 = $0[e17], t = true; else if (e17 === "transparent") return { r: 0, g: 0, b: 0, a: 0, format: "name" }; var n = ko.rgb.exec(e17); return n ? { r: n[1], g: n[2], b: n[3] } : (n = ko.rgba.exec(e17), n ? { r: n[1], g: n[2], b: n[3], a: n[4] } : (n = ko.hsl.exec(e17), n ? { h: n[1], s: n[2], l: n[3] } : (n = ko.hsla.exec(e17), n ? { h: n[1], s: n[2], l: n[3], a: n[4] } : (n = ko.hsv.exec(e17), n ? { h: n[1], s: n[2], v: n[3] } : (n = ko.hsva.exec(e17), n ? { h: n[1], s: n[2], v: n[3], a: n[4] } : (n = ko.hex8.exec(e17), 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(e17), n ? { r: jr(n[1]), g: jr(n[2]), b: jr(n[3]), format: t ? "name" : "hex" } : (n = ko.hex4.exec(e17), 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(e17), n ? { r: jr(n[1] + n[1]), g: jr(n[2] + n[2]), b: jr(n[3] + n[3]), format: t ? "name" : "hex" } : false))))))))); } function da(e17) { return !!ko.CSS_UNIT.exec(String(e17)); } var _te = ( /** @class */ function() { function e17(t, n) { t === void 0 && (t = ""), n === void 0 && (n = {}); var r; if (t instanceof e17) 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 e17.prototype.isDark = function() { return this.getBrightness() < 128; }, e17.prototype.isLight = function() { return !this.isDark(); }, e17.prototype.getBrightness = function() { var t = this.toRgb(); return (t.r * 299 + t.g * 587 + t.b * 114) / 1e3; }, e17.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; }, e17.prototype.getAlpha = function() { return this.a; }, e17.prototype.setAlpha = function(t) { return this.a = SE(t), this.roundA = Math.round(100 * this.a) / 100, this; }, e17.prototype.isMonochrome = function() { var t = this.toHsl().s; return t === 0; }, e17.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 }; }, e17.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, ")"); }, e17.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 }; }, e17.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, ")"); }, e17.prototype.toHex = function(t) { return t === void 0 && (t = false), Yw(this.r, this.g, this.b, t); }, e17.prototype.toHexString = function(t) { return t === void 0 && (t = false), "#" + this.toHex(t); }, e17.prototype.toHex8 = function(t) { return t === void 0 && (t = false), bte(this.r, this.g, this.b, this.a, t); }, e17.prototype.toHex8String = function(t) { return t === void 0 && (t = false), "#" + this.toHex8(t); }, e17.prototype.toHexShortString = function(t) { return t === void 0 && (t = false), this.a === 1 ? this.toHexString(t) : this.toHex8String(t); }, e17.prototype.toRgb = function() { return { r: Math.round(this.r), g: Math.round(this.g), b: Math.round(this.b), a: this.a }; }, e17.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, ")"); }, e17.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 }; }, e17.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, ")"); }, e17.prototype.toName = function() { if (this.a === 0) return "transparent"; if (this.a < 1) return false; for (var t = "#" + Yw(this.r, this.g, this.b, false), 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 false; }, e17.prototype.toString = function(t) { var n = !!t; t = t ?? this.format; var r = false, 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(true)), t === "hex4" && (r = this.toHex8String(true)), t === "hex8" && (r = this.toHex8String()), t === "name" && (r = this.toName()), t === "hsl" && (r = this.toHslString()), t === "hsv" && (r = this.toHsvString()), r || this.toHexString()); }, e17.prototype.toNumber = function() { return (Math.round(this.r) << 16) + (Math.round(this.g) << 8) + Math.round(this.b); }, e17.prototype.clone = function() { return new e17(this.toString()); }, e17.prototype.lighten = function(t) { t === void 0 && (t = 10); var n = this.toHsl(); return n.l += t / 100, n.l = Nd(n.l), new e17(n); }, e17.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 e17(n); }, e17.prototype.darken = function(t) { t === void 0 && (t = 10); var n = this.toHsl(); return n.l -= t / 100, n.l = Nd(n.l), new e17(n); }, e17.prototype.tint = function(t) { return t === void 0 && (t = 10), this.mix("white", t); }, e17.prototype.shade = function(t) { return t === void 0 && (t = 10), this.mix("black", t); }, e17.prototype.desaturate = function(t) { t === void 0 && (t = 10); var n = this.toHsl(); return n.s -= t / 100, n.s = Nd(n.s), new e17(n); }, e17.prototype.saturate = function(t) { t === void 0 && (t = 10); var n = this.toHsl(); return n.s += t / 100, n.s = Nd(n.s), new e17(n); }, e17.prototype.greyscale = function() { return this.desaturate(100); }, e17.prototype.spin = function(t) { var n = this.toHsl(), r = (n.h + t) % 360; return n.h = r < 0 ? 360 + r : r, new e17(n); }, e17.prototype.mix = function(t, n) { n === void 0 && (n = 50); var r = this.toRgb(), o = new e17(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 e17(i); }, e17.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 e17(r)); return a; }, e17.prototype.complement = function() { var t = this.toHsl(); return t.h = (t.h + 180) % 360, new e17(t); }, e17.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 e17({ h: r, s: o, v: a })), a = (a + s) % 1; return i; }, e17.prototype.splitcomplement = function() { var t = this.toHsl(), n = t.h; return [ this, new e17({ h: (n + 72) % 360, s: t.s, l: t.l }), new e17({ h: (n + 216) % 360, s: t.s, l: t.l }) ]; }, e17.prototype.onBackground = function(t) { var n = this.toRgb(), r = new e17(t).toRgb(), o = n.a + r.a * (1 - n.a); return new e17({ 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 }); }, e17.prototype.triad = function() { return this.polyad(3); }, e17.prototype.tetrad = function() { return this.polyad(4); }, e17.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 e17({ h: (r + i * a) % 360, s: n.s, l: n.l })); return o; }, e17.prototype.equals = function(t) { return this.toRgbString() === new e17(t).toRgbString(); }, e17; }() ); function ja(e17, t = 20) { return e17.mix("#141414", t).toString(); } function Tte(e17) { const t = Kc(), n = wt("button"); return computed(() => { let r = {}, o = e17.color; if (o) { const a = o.match(/var\((.*?)\)/); a && (o = window.getComputedStyle(window.document.documentElement).getPropertyValue(a[1])); const i = new _te(o), s = e17.dark ? i.tint(20).toString() : ja(i, 20); if (e17.plain) r = n.cssVarBlock({ "bg-color": e17.dark ? ja(i, 90) : i.tint(90).toString(), "text-color": o, "border-color": e17.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")] = e17.dark ? ja(i, 90) : i.tint(90).toString(), r[n.cssVarBlockName("disabled-text-color")] = e17.dark ? ja(i, 50) : i.tint(50).toString(), r[n.cssVarBlockName("disabled-border-color")] = e17.dark ? ja(i, 80) : i.tint(80).toString()); else { const u = e17.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 = e17.dark ? ja(i, 50) : i.tint(50).toString(); r[n.cssVarBlockName("disabled-bg-color")] = c, r[n.cssVarBlockName("disabled-text-color")] = e17.dark ? "rgba(255, 255, 255, 0.5)" : `var(${n.cssVarName("color-white")})`, r[n.cssVarBlockName("disabled-border-color")] = c; } } } return r; }); } var Ote = defineComponent({ name: "ElButton" }); var Pte = defineComponent({ ...Ote, props: P0, emits: fte, setup(e17, { expose: t, emit: n }) { const r = e17, o = Tte(r), a = wt("button"), { _ref: i, _size: s, _type: u, _disabled: l, _props: c, shouldAddSpace: d, handleClick: f } = cte(r, n), h10 = computed(() => [ 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) => (openBlock(), createBlock(resolveDynamicComponent(p.tag), mergeProps({ ref_key: "_ref", ref: i }, unref(c), { class: unref(h10), style: unref(o), onClick: unref(f) }), { default: withCtx(() => [ p.loading ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [ p.$slots.loading ? renderSlot(p.$slots, "loading", { key: 0 }) : (openBlock(), createBlock(unref(lr), { key: 1, class: normalizeClass(unref(a).is("loading")) }, { default: withCtx(() => [ (openBlock(), createBlock(resolveDynamicComponent(p.loadingIcon))) ]), _: 1 }, 8, ["class"])) ], 64)) : p.icon || p.$slots.icon ? (openBlock(), createBlock(unref(lr), { key: 1 }, { default: withCtx(() => [ p.icon ? (openBlock(), createBlock(resolveDynamicComponent(p.icon), { key: 0 })) : renderSlot(p.$slots, "icon", { key: 1 }) ]), _: 3 })) : createCommentVNode("v-if", true), p.$slots.default ? (openBlock(), createElementBlock("span", { key: 2, class: normalizeClass({ [unref(a).em("text", "expand")]: unref(d) }) }, [ renderSlot(p.$slots, "default") ], 2)) : createCommentVNode("v-if", true) ]), _: 3 }, 16, ["class", "style", "onClick"])); } }); var $te = bt(Pte, [["__file", "button.vue"]]); var Ate = { size: P0.size, type: P0.type }; var Fte = defineComponent({ name: "ElButtonGroup" }); var Ite = defineComponent({ ...Fte, props: Ate, setup(e17) { const t = e17; provide(EE, reactive({ size: toRef(t, "size"), type: toRef(t, "type") })); const n = wt("button"); return (r, o) => (openBlock(), createElementBlock("div", { class: normalizeClass(unref(n).b("group")) }, [ renderSlot(r.$slots, "default") ], 2)); } }); var _E = bt(Ite, [["__file", "button-group.vue"]]); var gs = jn($te, { ButtonGroup: _E }); Na(_E); var Xa = /* @__PURE__ */ new Map(); if (_n) { let e17; document.addEventListener("mousedown", (t) => e17 = t), document.addEventListener("mouseup", (t) => { if (e17) { for (const n of Xa.values()) for (const { documentHandler: r } of n) r(t, e17); e17 = void 0; } }); } function Jw(e17, 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 = e17.contains(i) || e17.contains(s), d = e17 === i, f = n.length && n.some((p) => p == null ? void 0 : p.contains(i)) || n.length && n.includes(s), h10 = a && (a.contains(i) || a.contains(s)); u || l || c || d || f || h10 || t.value(r, o); }; } var TE = { beforeMount(e17, t) { Xa.has(e17) || Xa.set(e17, []), Xa.get(e17).push({ documentHandler: Jw(e17, t), bindingFn: t.value }); }, updated(e17, t) { Xa.has(e17) || Xa.set(e17, []); const n = Xa.get(e17), r = n.findIndex((a) => a.bindingFn === t.oldValue), o = { documentHandler: Jw(e17, t), bindingFn: t.value }; r >= 0 ? n.splice(r, 1, o) : n.push(o); }, unmounted(e17) { Xa.delete(e17); } }; var 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" } }); var Lte = defineComponent({ name: "ElCard" }); var Dte = defineComponent({ ...Lte, props: Nte, setup(e17) { const t = wt("card"); return (n, r) => (openBlock(), createElementBlock("div", { class: normalizeClass([unref(t).b(), unref(t).is(`${n.shadow}-shadow`)]) }, [ n.$slots.header || n.header ? (openBlock(), createElementBlock("div", { key: 0, class: normalizeClass(unref(t).e("header")) }, [ renderSlot(n.$slots, "header", {}, () => [ createTextVNode(toDisplayString(n.header), 1) ]) ], 2)) : createCommentVNode("v-if", true), createBaseVNode("div", { class: normalizeClass([unref(t).e("body"), n.bodyClass]), style: normalizeStyle(n.bodyStyle) }, [ renderSlot(n.$slots, "default") ], 6), n.$slots.footer || n.footer ? (openBlock(), createElementBlock("div", { key: 1, class: normalizeClass(unref(t).e("footer")) }, [ renderSlot(n.$slots, "footer", {}, () => [ createTextVNode(toDisplayString(n.footer), 1) ]) ], 2)) : createCommentVNode("v-if", true) ], 2)); } }); var Rte = bt(Dte, [["__file", "card.vue"]]); jn(Rte); var 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: true }, ...Pi(["ariaControls"]) }; var PE = { [Kn]: (e17) => ur(e17) || Xn(e17) || El(e17), change: (e17) => ur(e17) || Xn(e17) || El(e17) }; var Wl = Symbol("checkboxGroupContextKey"); var Bte = ({ model: e17, isChecked: t }) => { const n = inject(Wl, void 0), r = computed(() => { 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) && e17.value.length >= i && !t.value || !ri(s) && e17.value.length <= s && t.value; }); return { isDisabled: Kc(computed(() => (n == null ? void 0 : n.disabled.value) || r.value)), isLimitDisabled: r }; }; var Mte = (e17, { model: t, isLimitExceeded: n, hasOwnLabel: r, isDisabled: o, isLabeledByFormItem: a }) => { const i = inject(Wl, void 0), { formItem: s } = As(), { emit: u } = getCurrentInstance(); function l(p) { var v, m, g, b; return [true, e17.trueValue, e17.trueLabel].includes(p) ? (m = (v = e17.trueValue) != null ? v : e17.trueLabel) != null ? m : true : (b = (g = e17.falseValue) != null ? g : e17.falseLabel) != null ? b : false; } 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([false, e17.falseValue, e17.falseLabel].includes(t.value)), await nextTick(), c(t.value, p))); } const h10 = computed(() => (i == null ? void 0 : i.validateEvent) || e17.validateEvent); return watch(() => e17.modelValue, () => { h10.value && (s == null || s.validate("change").catch((p) => Tn(p))); }), { handleChange: d, onClickRoot: f }; }; var zte = (e17) => { const t = ref(false), { emit: n } = getCurrentInstance(), r = inject(Wl, void 0), o = computed(() => ri(r) === false), a = ref(false), i = computed({ get() { var s, u; return o.value ? (s = r == null ? void 0 : r.modelValue) == null ? void 0 : s.value : (u = e17.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 === false && ((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 }; }; var Vte = (e17, t, { model: n }) => { const r = inject(Wl, void 0), o = ref(false), a = computed(() => Xp(e17.value) ? e17.label : e17.value), i = computed(() => { const c = n.value; return El(c) ? c : Tr(c) ? Gn(a.value) ? c.map(toRaw).some((d) => Gp(d, a.value)) : c.map(toRaw).includes(a.value) : c != null ? c === e17.trueValue || c === e17.trueLabel : !!c; }), s = vs(computed(() => { var c; return (c = r == null ? void 0 : r.size) == null ? void 0 : c.value; }), { prop: true }), u = vs(computed(() => { var c; return (c = r == null ? void 0 : r.size) == null ? void 0 : c.value; })), l = computed(() => !!t.default || !Xp(a.value)); return { checkboxButtonSize: s, isChecked: i, isFocused: o, checkboxSize: u, hasOwnLabel: l, actualValue: a }; }; var $E = (e17, t) => { const { formItem: n } = As(), { model: r, isGroup: o, isLimitExceeded: a } = zte(e17), { isFocused: i, isChecked: s, checkboxButtonSize: u, checkboxSize: l, hasOwnLabel: c, actualValue: d } = Vte(e17, t, { model: r }), { isDisabled: f } = Bte({ model: r, isChecked: s }), { inputId: h10, isLabeledByFormItem: p } = Gc(e17, { formItemContext: n, disableIdGeneration: c, disableIdManagement: o }), { handleChange: v, onClickRoot: m } = Mte(e17, { 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 = e17.trueValue) != null ? b : e17.trueLabel) != null ? x : true; } e17.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" }, computed(() => o.value && Xp(e17.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" }, computed(() => !!e17.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" }, computed(() => !!e17.falseLabel)), { inputId: h10, isLabeledByFormItem: p, isChecked: s, isDisabled: f, isFocused: i, checkboxButtonSize: u, checkboxSize: l, hasOwnLabel: c, model: r, actualValue: d, handleChange: v, onClickRoot: m }; }; var jte = defineComponent({ name: "ElCheckbox" }); var Hte = defineComponent({ ...jte, props: OE, emits: PE, setup(e17) { const t = e17, n = useSlots(), { inputId: r, isLabeledByFormItem: o, isChecked: a, isDisabled: i, isFocused: s, checkboxSize: u, hasOwnLabel: l, model: c, actualValue: d, handleChange: f, onClickRoot: h10 } = $E(t, n), p = wt("checkbox"), v = computed(() => [ p.b(), p.m(u.value), p.is("disabled", i.value), p.is("bordered", t.border), p.is("checked", a.value) ]), m = computed(() => [ 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) => (openBlock(), createBlock(resolveDynamicComponent(!unref(l) && unref(o) ? "span" : "label"), { class: normalizeClass(unref(v)), "aria-controls": g.indeterminate ? g.ariaControls : null, onClick: unref(h10) }, { default: withCtx(() => { var x, w, C, k; return [ createBaseVNode("span", { class: normalizeClass(unref(m)) }, [ g.trueValue || g.falseValue || g.trueLabel || g.falseLabel ? withDirectives((openBlock(), createElementBlock("input", { key: 0, id: unref(r), "onUpdate:modelValue": (E) => isRef(c) ? c.value = E : null, class: normalizeClass(unref(p).e("original")), type: "checkbox", indeterminate: g.indeterminate, name: g.name, tabindex: g.tabindex, disabled: unref(i), "true-value": (w = (x = g.trueValue) != null ? x : g.trueLabel) != null ? w : true, "false-value": (k = (C = g.falseValue) != null ? C : g.falseLabel) != null ? k : false, onChange: unref(f), onFocus: (E) => s.value = true, onBlur: (E) => s.value = false, onClick: withModifiers(() => { }, ["stop"]) }, null, 42, ["id", "onUpdate:modelValue", "indeterminate", "name", "tabindex", "disabled", "true-value", "false-value", "onChange", "onFocus", "onBlur", "onClick"])), [ [vModelCheckbox, unref(c)] ]) : withDirectives((openBlock(), createElementBlock("input", { key: 1, id: unref(r), "onUpdate:modelValue": (E) => isRef(c) ? c.value = E : null, class: normalizeClass(unref(p).e("original")), type: "checkbox", indeterminate: g.indeterminate, disabled: unref(i), value: unref(d), name: g.name, tabindex: g.tabindex, onChange: unref(f), onFocus: (E) => s.value = true, onBlur: (E) => s.value = false, onClick: withModifiers(() => { }, ["stop"]) }, null, 42, ["id", "onUpdate:modelValue", "indeterminate", "disabled", "value", "name", "tabindex", "onChange", "onFocus", "onBlur", "onClick"])), [ [vModelCheckbox, unref(c)] ]), createBaseVNode("span", { class: normalizeClass(unref(p).e("inner")) }, null, 2) ], 2), unref(l) ? (openBlock(), createElementBlock("span", { key: 0, class: normalizeClass(unref(p).e("label")) }, [ renderSlot(g.$slots, "default"), g.$slots.default ? createCommentVNode("v-if", true) : (openBlock(), createElementBlock(Fragment, { key: 0 }, [ createTextVNode(toDisplayString(g.label), 1) ], 64)) ], 2)) : createCommentVNode("v-if", true) ]; }), _: 3 }, 8, ["class", "aria-controls", "onClick"])); } }); var Ute = bt(Hte, [["__file", "checkbox.vue"]]); var qte = defineComponent({ name: "ElCheckboxButton" }); var Wte = defineComponent({ ...qte, props: OE, emits: PE, setup(e17) { const t = e17, n = useSlots(), { isFocused: r, isChecked: o, isDisabled: a, checkboxButtonSize: i, model: s, actualValue: u, handleChange: l } = $E(t, n), c = inject(Wl, void 0), d = wt("checkbox"), f = computed(() => { 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 }; }), h10 = computed(() => [ 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 openBlock(), createElementBlock("label", { class: normalizeClass(unref(h10)) }, [ p.trueValue || p.falseValue || p.trueLabel || p.falseLabel ? withDirectives((openBlock(), createElementBlock("input", { key: 0, "onUpdate:modelValue": (w) => isRef(s) ? s.value = w : null, class: normalizeClass(unref(d).be("button", "original")), type: "checkbox", name: p.name, tabindex: p.tabindex, disabled: unref(a), "true-value": (g = (m = p.trueValue) != null ? m : p.trueLabel) != null ? g : true, "false-value": (x = (b = p.falseValue) != null ? b : p.falseLabel) != null ? x : false, onChange: unref(l), onFocus: (w) => r.value = true, onBlur: (w) => r.value = false, onClick: withModifiers(() => { }, ["stop"]) }, null, 42, ["onUpdate:modelValue", "name", "tabindex", "disabled", "true-value", "false-value", "onChange", "onFocus", "onBlur", "onClick"])), [ [vModelCheckbox, unref(s)] ]) : withDirectives((openBlock(), createElementBlock("input", { key: 1, "onUpdate:modelValue": (w) => isRef(s) ? s.value = w : null, class: normalizeClass(unref(d).be("button", "original")), type: "checkbox", name: p.name, tabindex: p.tabindex, disabled: unref(a), value: unref(u), onChange: unref(l), onFocus: (w) => r.value = true, onBlur: (w) => r.value = false, onClick: withModifiers(() => { }, ["stop"]) }, null, 42, ["onUpdate:modelValue", "name", "tabindex", "disabled", "value", "onChange", "onFocus", "onBlur", "onClick"])), [ [vModelCheckbox, unref(s)] ]), p.$slots.default || p.label ? (openBlock(), createElementBlock("span", { key: 2, class: normalizeClass(unref(d).be("button", "inner")), style: normalizeStyle(unref(o) ? unref(f) : void 0) }, [ renderSlot(p.$slots, "default", {}, () => [ createTextVNode(toDisplayString(p.label), 1) ]) ], 6)) : createCommentVNode("v-if", true) ], 2); }; } }); var AE = bt(Wte, [["__file", "checkbox-button.vue"]]); var 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: true }, ...Pi(["ariaLabel"]) }); var Gte = { [Kn]: (e17) => Tr(e17), change: (e17) => Tr(e17) }; var Xte = defineComponent({ name: "ElCheckboxGroup" }); var Yte = defineComponent({ ...Xte, props: Kte, emits: Gte, setup(e17, { emit: t }) { const n = e17, r = wt("checkbox"), { formItem: o } = As(), { inputId: a, isLabeledByFormItem: i } = Gc(n, { formItemContext: o }), s = async (l) => { t(Kn, l), await nextTick(), t("change", l); }, u = computed({ get() { return n.modelValue; }, set(l) { s(l); } }); return provide(Wl, { ...V4(toRefs(n), [ "size", "min", "max", "disabled", "validateEvent", "fill", "textColor" ]), modelValue: u, changeEvent: s }), watch(() => n.modelValue, () => { n.validateEvent && (o == null || o.validate("change").catch((l) => Tn(l))); }), (l, c) => { var d; return openBlock(), createBlock(resolveDynamicComponent(l.tag), { id: unref(a), class: normalizeClass(unref(r).b("group")), role: "group", "aria-label": unref(i) ? void 0 : l.ariaLabel || "checkbox-group", "aria-labelledby": unref(i) ? (d = unref(o)) == null ? void 0 : d.labelId : void 0 }, { default: withCtx(() => [ renderSlot(l.$slots, "default") ]), _: 3 }, 8, ["id", "class", "aria-label", "aria-labelledby"]); }; } }); var FE = bt(Yte, [["__file", "checkbox-group.vue"]]); var Zte = jn(Ute, { CheckboxButton: AE, CheckboxGroup: FE }); Na(AE); Na(FE); var 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 }); var Jte = { close: (e17) => e17 instanceof MouseEvent, click: (e17) => e17 instanceof MouseEvent }; var Qte = defineComponent({ name: "ElTag" }); var ene = defineComponent({ ...Qte, props: A0, emits: Jte, setup(e17, { emit: t }) { const n = e17, r = vs(), o = wt("tag"), a = computed(() => { const { type: l, hit: c, effect: d, closable: f, round: h10 } = 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", h10) ]; }), i = (l) => { t("close", l); }, s = (l) => { t("click", l); }, u = (l) => { l.component.subTree.component.bum = null; }; return (l, c) => l.disableTransitions ? (openBlock(), createElementBlock("span", { key: 0, class: normalizeClass(unref(a)), style: normalizeStyle({ backgroundColor: l.color }), onClick: s }, [ createBaseVNode("span", { class: normalizeClass(unref(o).e("content")) }, [ renderSlot(l.$slots, "default") ], 2), l.closable ? (openBlock(), createBlock(unref(lr), { key: 0, class: normalizeClass(unref(o).e("close")), onClick: withModifiers(i, ["stop"]) }, { default: withCtx(() => [ createVNode(unref(Yp)) ]), _: 1 }, 8, ["class", "onClick"])) : createCommentVNode("v-if", true) ], 6)) : (openBlock(), createBlock(Transition, { key: 1, name: `${unref(o).namespace.value}-zoom-in-center`, appear: "", onVnodeMounted: u }, { default: withCtx(() => [ createBaseVNode("span", { class: normalizeClass(unref(a)), style: normalizeStyle({ backgroundColor: l.color }), onClick: s }, [ createBaseVNode("span", { class: normalizeClass(unref(o).e("content")) }, [ renderSlot(l.$slots, "default") ], 2), l.closable ? (openBlock(), createBlock(unref(lr), { key: 0, class: normalizeClass(unref(o).e("close")), onClick: withModifiers(i, ["stop"]) }, { default: withCtx(() => [ createVNode(unref(Yp)) ]), _: 1 }, 8, ["class", "onClick"])) : createCommentVNode("v-if", true) ], 6) ]), _: 3 }, 8, ["name"])); } }); var tne = bt(ene, [["__file", "tag.vue"]]); var nne = jn(tne); var IE = Symbol("rowContextKey"); var rne = [ "start", "center", "end", "space-around", "space-between", "space-evenly" ]; var one = ["top", "middle", "bottom"]; var ane = zt({ tag: { type: String, default: "div" }, gutter: { type: Number, default: 0 }, justify: { type: String, values: rne, default: "start" }, align: { type: String, values: one } }); var ine = defineComponent({ name: "ElRow" }); var sne = defineComponent({ ...ine, props: ane, setup(e17) { const t = e17, n = wt("row"), r = computed(() => t.gutter); provide(IE, { gutter: r }); const o = computed(() => { const i = {}; return t.gutter && (i.marginRight = i.marginLeft = `-${t.gutter / 2}px`), i; }), a = computed(() => [ n.b(), n.is(`justify-${t.justify}`, t.justify !== "start"), n.is(`align-${t.align}`, !!t.align) ]); return (i, s) => (openBlock(), createBlock(resolveDynamicComponent(i.tag), { class: normalizeClass(unref(a)), style: normalizeStyle(unref(o)) }, { default: withCtx(() => [ renderSlot(i.$slots, "default") ]), _: 3 }, 8, ["class", "style"])); } }); var lne = bt(sne, [["__file", "row.vue"]]); var NE = jn(lne); var 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({}) } }); var cne = defineComponent({ name: "ElCol" }); var dne = defineComponent({ ...cne, props: une, setup(e17) { const t = e17, { gutter: n } = inject(IE, { gutter: computed(() => 0) }), r = wt("col"), o = computed(() => { const i = {}; return n.value && (i.paddingLeft = i.paddingRight = `${n.value / 2}px`), i; }), a = computed(() => { 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) => (openBlock(), createBlock(resolveDynamicComponent(i.tag), { class: normalizeClass(unref(a)), style: normalizeStyle(unref(o)) }, { default: withCtx(() => [ renderSlot(i.$slots, "default") ]), _: 3 }, 8, ["class", "style"])); } }); var pne = bt(dne, [["__file", "col.vue"]]); var ly = jn(pne); var fne = defineComponent({ name: "ElCollapseTransition" }); var hne = defineComponent({ ...fne, setup(e17) { 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) => (openBlock(), createBlock(Transition, mergeProps({ name: unref(t).b() }, toHandlers(r)), { default: withCtx(() => [ renderSlot(o.$slots, "default") ]), _: 3 }, 16, ["name"])); } }); var vne = bt(hne, [["__file", "collapse-transition.vue"]]); var gne = jn(vne); var mne = zt({ color: { type: ut(Object), required: true }, vertical: { type: Boolean, default: false } }); var xv = false; function fc(e17, 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 = false, (i = t.end) == null || i.call(t, a); }, o = function(a) { var i; xv || (a.preventDefault(), document.onselectstart = () => false, document.ondragstart = () => false, document.addEventListener("mousemove", n), document.addEventListener("mouseup", r), document.addEventListener("touchmove", n), document.addEventListener("touchend", r), xv = true, (i = t.start) == null || i.call(t, a)); }; e17.addEventListener("mousedown", o), e17.addEventListener("touchstart", o, { passive: false }); } var yne = (e17) => { const t = getCurrentInstance(), { t: n } = Uc(), r = shallowRef(), o = shallowRef(), a = computed(() => e17.color.get("alpha")), i = computed(() => 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: h10, clientY: p } = Im(d); if (e17.vertical) { let v = p - f.top; v = Math.max(r.value.offsetHeight / 2, v), v = Math.min(v, f.height - r.value.offsetHeight / 2), e17.color.set("alpha", Math.round((v - r.value.offsetHeight / 2) / (f.height - r.value.offsetHeight) * 100)); } else { let v = h10 - f.left; v = Math.max(r.value.offsetWidth / 2, v), v = Math.min(v, f.width - r.value.offsetWidth / 2), e17.color.set("alpha", Math.round((v - r.value.offsetWidth / 2) / (f.width - r.value.offsetWidth) * 100)); } } function l(d) { const { code: f, shiftKey: h10 } = d, p = h10 ? 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, e17.color.set("alpha", f); } return { thumb: r, bar: o, alpha: a, alphaLabel: i, handleDrag: u, handleClick: s, handleKeydown: l }; }; var bne = (e17, { bar: t, thumb: n, handleDrag: r }) => { const o = getCurrentInstance(), a = wt("color-alpha-slider"), i = ref(0), s = ref(0), u = ref(); function l() { if (!n.value || e17.vertical) return 0; const b = o.vnode.el, x = e17.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 (!e17.vertical) return 0; const x = e17.color.get("alpha"); return b ? Math.round(x * (b.offsetHeight - n.value.offsetHeight / 2) / 100) : 0; } function d() { if (e17.color && e17.color.value) { const { r: b, g: x, b: w } = e17.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(); } onMounted(() => { 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(); }), watch(() => e17.color.get("alpha"), () => f()), watch(() => e17.color.value, () => f()); const h10 = computed(() => [a.b(), a.is("vertical", e17.vertical)]), p = computed(() => a.e("bar")), v = computed(() => a.e("thumb")), m = computed(() => ({ background: u.value })), g = computed(() => ({ left: Sl(i.value), top: Sl(s.value) })); return { rootKls: h10, barKls: p, barStyle: m, thumbKls: v, thumbStyle: g, update: f }; }; var wne = "ElColorAlphaSlider"; var xne = defineComponent({ name: wne }); var kne = defineComponent({ ...xne, props: mne, setup(e17, { expose: t }) { const n = e17, { alpha: r, alphaLabel: o, bar: a, thumb: i, handleDrag: s, handleClick: u, handleKeydown: l } = yne(n), { rootKls: c, barKls: d, barStyle: f, thumbKls: h10, thumbStyle: p, update: v } = bne(n, { bar: a, thumb: i, handleDrag: s }); return t({ update: v, bar: a, thumb: i }), (m, g) => (openBlock(), createElementBlock("div", { class: normalizeClass(unref(c)) }, [ createBaseVNode("div", { ref_key: "bar", ref: a, class: normalizeClass(unref(d)), style: normalizeStyle(unref(f)), onClick: unref(u) }, null, 14, ["onClick"]), createBaseVNode("div", { ref_key: "thumb", ref: i, class: normalizeClass(unref(h10)), style: normalizeStyle(unref(p)), "aria-label": unref(o), "aria-valuenow": unref(r), "aria-orientation": m.vertical ? "vertical" : "horizontal", "aria-valuemin": "0", "aria-valuemax": "100", role: "slider", tabindex: "0", onKeydown: unref(l) }, null, 46, ["aria-label", "aria-valuenow", "aria-orientation", "onKeydown"]) ], 2)); } }); var Cne = bt(kne, [["__file", "alpha-slider.vue"]]); var Ene = defineComponent({ name: "ElColorHueSlider", props: { color: { type: Object, required: true }, vertical: Boolean }, setup(e17) { const t = wt("color-hue-slider"), n = getCurrentInstance(), r = ref(), o = ref(), a = ref(0), i = ref(0), s = computed(() => e17.color.get("hue")); watch(() => s.value, () => { f(); }); function u(h10) { h10.target !== r.value && l(h10); } function l(h10) { if (!o.value || !r.value) return; const p = n.vnode.el.getBoundingClientRect(), { clientX: v, clientY: m } = Im(h10); let g; if (e17.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); } e17.color.set("hue", g); } function c() { if (!r.value) return 0; const h10 = n.vnode.el; if (e17.vertical) return 0; const p = e17.color.get("hue"); return h10 ? Math.round(p * (h10.offsetWidth - r.value.offsetWidth / 2) / 360) : 0; } function d() { if (!r.value) return 0; const h10 = n.vnode.el; if (!e17.vertical) return 0; const p = e17.color.get("hue"); return h10 ? Math.round(p * (h10.offsetHeight - r.value.offsetHeight / 2) / 360) : 0; } function f() { a.value = c(), i.value = d(); } return onMounted(() => { if (!o.value || !r.value) return; const h10 = { drag: (p) => { l(p); }, end: (p) => { l(p); } }; fc(o.value, h10), fc(r.value, h10), f(); }), { bar: o, thumb: r, thumbLeft: a, thumbTop: i, hueValue: s, handleClick: u, update: f, ns: t }; } }); function Sne(e17, t, n, r, o, a) { return openBlock(), createElementBlock("div", { class: normalizeClass([e17.ns.b(), e17.ns.is("vertical", e17.vertical)]) }, [ createBaseVNode("div", { ref: "bar", class: normalizeClass(e17.ns.e("bar")), onClick: e17.handleClick }, null, 10, ["onClick"]), createBaseVNode("div", { ref: "thumb", class: normalizeClass(e17.ns.e("thumb")), style: normalizeStyle({ left: e17.thumbLeft + "px", top: e17.thumbTop + "px" }) }, null, 6) ], 2); } var _ne = bt(Ene, [["render", Sne], ["__file", "hue-slider.vue"]]); var 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: true }, ...Pi(["ariaLabel"]) }); var One = { [Kn]: (e17) => ur(e17) || ii(e17), [Um]: (e17) => ur(e17) || ii(e17), activeChange: (e17) => ur(e17) || ii(e17), focus: (e17) => e17 instanceof FocusEvent, blur: (e17) => e17 instanceof FocusEvent }; var LE = Symbol("colorPickerContextKey"); var Qw = function(e17, t, n) { return [ e17, t * n / ((e17 = (2 - t) * n) < 1 ? e17 : 2 - e17) || 0, e17 / 2 ]; }; var Pne = function(e17) { return typeof e17 == "string" && e17.includes(".") && Number.parseFloat(e17) === 1; }; var $ne = function(e17) { return typeof e17 == "string" && e17.includes("%"); }; var rl = function(e17, t) { Pne(e17) && (e17 = "100%"); const n = $ne(e17); return e17 = Math.min(t, Math.max(0, Number.parseFloat(`${e17}`))), n && (e17 = Number.parseInt(`${e17 * t}`, 10) / 100), Math.abs(e17 - t) < 1e-6 ? 1 : e17 % t / Number.parseFloat(t); }; var ex = { 10: "A", 11: "B", 12: "C", 13: "D", 14: "E", 15: "F" }; var pp = (e17) => { e17 = Math.min(Math.round(e17), 255); const t = Math.floor(e17 / 16), n = e17 % 16; return `${ex[t] || t}${ex[n] || n}`; }; var tx = function({ r: e17, g: t, b: n }) { return Number.isNaN(+e17) || Number.isNaN(+t) || Number.isNaN(+n) ? "" : `#${pp(e17)}${pp(t)}${pp(n)}`; }; var kv = { A: 10, B: 11, C: 12, D: 13, E: 14, F: 15 }; var Bi = function(e17) { return e17.length === 2 ? (kv[e17[0].toUpperCase()] || +e17[0]) * 16 + (kv[e17[1].toUpperCase()] || +e17[1]) : kv[e17[1].toUpperCase()] || +e17[1]; }; var Ane = function(e17, 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: e17, s: i * 100, v: a * 100 }; }; var nx = (e17, t, n) => { e17 = rl(e17, 255), t = rl(t, 255), n = rl(n, 255); const r = Math.max(e17, t, n), o = Math.min(e17, 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 e17: { a = (t - n) / s + (t < n ? 6 : 0); break; } case t: { a = (n - e17) / s + 2; break; } case n: { a = (e17 - t) / s + 4; break; } } a /= 6; } return { h: a * 360, s: u * 100, v: i * 100 }; }; var mu = function(e17, t, n) { e17 = rl(e17, 360) * 6, t = rl(t, 100), n = rl(n, 100); const r = Math.floor(e17), o = e17 - 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) }; }; var Vu = class { constructor(t = {}) { this._hue = 0, this._saturation = 100, this._value = 100, this._alpha = 100, this.enableAlpha = false, 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)); } } }; var Fne = defineComponent({ props: { colors: { type: Array, required: true }, color: { type: Object, required: true }, enableAlpha: { type: Boolean, required: true } }, setup(e17) { const t = wt("color-predefine"), { currentColor: n } = inject(LE), r = ref(a(e17.colors, e17.color)); watch(() => n.value, (i) => { const s = new Vu(); s.fromString(i), r.value.forEach((u) => { u.selected = s.compare(u); }); }), watchEffect(() => { r.value = a(e17.colors, e17.color); }); function o(i) { e17.color.fromString(e17.colors[i]); } function a(i, s) { return i.map((u) => { const l = new Vu(); return l.enableAlpha = e17.enableAlpha, l.format = "rgba", l.fromString(u), l.selected = l.value === s.value, l; }); } return { rgbaColors: r, handleSelect: o, ns: t }; } }); function Ine(e17, t, n, r, o, a) { return openBlock(), createElementBlock("div", { class: normalizeClass(e17.ns.b()) }, [ createBaseVNode("div", { class: normalizeClass(e17.ns.e("colors")) }, [ (openBlock(true), createElementBlock(Fragment, null, renderList(e17.rgbaColors, (i, s) => (openBlock(), createElementBlock("div", { key: e17.colors[s], class: normalizeClass([ e17.ns.e("color-selector"), e17.ns.is("alpha", i._alpha < 100), { selected: i.selected } ]), onClick: (u) => e17.handleSelect(s) }, [ createBaseVNode("div", { style: normalizeStyle({ backgroundColor: i.value }) }, null, 4) ], 10, ["onClick"]))), 128)) ], 2) ], 2); } var Nne = bt(Fne, [["render", Ine], ["__file", "predefine.vue"]]); var Lne = defineComponent({ name: "ElSlPanel", props: { color: { type: Object, required: true } }, setup(e17) { const t = wt("color-svpanel"), n = getCurrentInstance(), r = ref(0), o = ref(0), a = ref("hsl(0, 100%, 50%)"), i = computed(() => { const l = e17.color.get("hue"), c = e17.color.get("value"); return { hue: l, value: c }; }); function s() { const l = e17.color.get("saturation"), c = e17.color.get("value"), d = n.vnode.el, { clientWidth: f, clientHeight: h10 } = d; o.value = l * f / 100, r.value = (100 - c) * h10 / 100, a.value = `hsl(${e17.color.get("hue")}, 100%, 50%)`; } function u(l) { const c = n.vnode.el.getBoundingClientRect(), { clientX: d, clientY: f } = Im(l); let h10 = d - c.left, p = f - c.top; h10 = Math.max(0, h10), h10 = Math.min(h10, c.width), p = Math.max(0, p), p = Math.min(p, c.height), o.value = h10, r.value = p, e17.color.set({ saturation: h10 / c.width * 100, value: 100 - p / c.height * 100 }); } return watch(() => i.value, () => { s(); }), onMounted(() => { 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(e17, t, n, r, o, a) { return openBlock(), createElementBlock("div", { class: normalizeClass(e17.ns.b()), style: normalizeStyle({ backgroundColor: e17.background }) }, [ createBaseVNode("div", { class: normalizeClass(e17.ns.e("white")) }, null, 2), createBaseVNode("div", { class: normalizeClass(e17.ns.e("black")) }, null, 2), createBaseVNode("div", { class: normalizeClass(e17.ns.e("cursor")), style: normalizeStyle({ top: e17.cursorTop + "px", left: e17.cursorLeft + "px" }) }, [ createBaseVNode("div") ], 6) ], 6); } var Rne = bt(Lne, [["render", Dne], ["__file", "sv-panel.vue"]]); var Bne = defineComponent({ name: "ElColorPicker" }); var Mne = defineComponent({ ...Bne, props: Tne, emits: One, setup(e17, { expose: t, emit: n }) { const r = e17, { t: o } = Uc(), a = wt("color"), { formItem: i } = As(), s = vs(), u = Kc(), { inputId: l, isLabeledByFormItem: c } = Gc(r, { formItemContext: i }), d = ref(), f = ref(), h10 = ref(), p = ref(), v = ref(), m = ref(), { 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(false), W(); } }); let w = true; const C = reactive(new Vu({ enableAlpha: r.showAlpha, format: r.colorFormat || "", value: r.modelValue })), k = ref(false), E = ref(false), S = ref(""), O = computed(() => !r.modelValue && !E.value ? "transparent" : N(C, r.showAlpha)), F = computed(() => !r.modelValue && !E.value ? "" : C.value), $ = computed(() => c.value ? void 0 : r.ariaLabel || o("el.colorpicker.defaultLabel")), A = computed(() => c.value ? i == null ? void 0 : i.labelId : void 0), L = computed(() => [ 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: true }); function z() { u.value || M(true); } function R() { I(false), W(); } function W() { nextTick(() => { r.modelValue ? C.fromString(r.modelValue) : (C.value = "", nextTick(() => { E.value = false; })); }); } 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(false), nextTick(() => { const le = new Vu({ enableAlpha: r.showAlpha, format: r.colorFormat || "", value: r.modelValue }); C.compare(le) || W(); }); } function pe() { I(false), n(Kn, null), n("change", null), r.modelValue !== null && r.validateEvent && (i == null || i.validate("change").catch((te) => Tn(te))), W(); } function we() { k.value && (R(), g.value && ge()); } function ke(te) { te.preventDefault(), te.stopPropagation(), M(false), W(); } 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 onMounted(() => { r.modelValue && (S.value = F.value); }), watch(() => r.modelValue, (te) => { te ? te && te !== C.value && (w = false, C.fromString(te)) : E.value = false; }), watch(() => [r.colorFormat, r.showAlpha], () => { C.enableAlpha = r.showAlpha, C.format = r.colorFormat || C.format, C.doOnChange(), n(Kn, C.value); }), watch(() => F.value, (te) => { S.value = te, w && n("activeChange", te), w = true; }), watch(() => C.value, () => { !r.modelValue && !E.value && (E.value = true); }), watch(() => k.value, () => { nextTick(() => { var te, le, Ee; (te = d.value) == null || te.update(), (le = f.value) == null || le.update(), (Ee = h10.value) == null || Ee.update(); }); }), provide(LE, { currentColor: F }), t({ color: C, show: z, hide: R, focus: ge, blur: J }), (te, le) => (openBlock(), createBlock(unref(Xc), { ref_key: "popper", ref: p, visible: k.value, "show-arrow": false, "fallback-placements": ["bottom", "top", "right", "left"], offset: 0, "gpu-acceleration": false, "popper-class": [unref(a).be("picker", "panel"), unref(a).b("dropdown"), te.popperClass], "stop-popper-mouse-event": false, effect: "light", trigger: "click", teleported: te.teleported, transition: `${unref(a).namespace.value}-zoom-in-top`, persistent: "", onHide: (Ee) => M(false) }, { content: withCtx(() => [ withDirectives((openBlock(), createElementBlock("div", { onKeydown: withKeys(ke, ["esc"]) }, [ createBaseVNode("div", { class: normalizeClass(unref(a).be("dropdown", "main-wrapper")) }, [ createVNode(_ne, { ref_key: "hue", ref: d, class: "hue-slider", color: unref(C), vertical: "" }, null, 8, ["color"]), createVNode(Rne, { ref_key: "sv", ref: f, color: unref(C) }, null, 8, ["color"]) ], 2), te.showAlpha ? (openBlock(), createBlock(Cne, { key: 0, ref_key: "alpha", ref: h10, color: unref(C) }, null, 8, ["color"])) : createCommentVNode("v-if", true), te.predefine ? (openBlock(), createBlock(Nne, { key: 1, ref: "predefine", "enable-alpha": te.showAlpha, color: unref(C), colors: te.predefine }, null, 8, ["enable-alpha", "color", "colors"])) : createCommentVNode("v-if", true), createBaseVNode("div", { class: normalizeClass(unref(a).be("dropdown", "btns")) }, [ createBaseVNode("span", { class: normalizeClass(unref(a).be("dropdown", "value")) }, [ createVNode(unref(uh), { ref_key: "inputRef", ref: m, modelValue: S.value, "onUpdate:modelValue": (Ee) => S.value = Ee, "validate-event": false, size: "small", onKeyup: withKeys(Q, ["enter"]), onBlur: Q }, null, 8, ["modelValue", "onUpdate:modelValue", "onKeyup"]) ], 2), createVNode(unref(gs), { class: normalizeClass(unref(a).be("dropdown", "link-btn")), text: "", size: "small", onClick: pe }, { default: withCtx(() => [ createTextVNode(toDisplayString(unref(o)("el.colorpicker.clear")), 1) ]), _: 1 }, 8, ["class"]), createVNode(unref(gs), { plain: "", size: "small", class: normalizeClass(unref(a).be("dropdown", "btn")), onClick: ae }, { default: withCtx(() => [ createTextVNode(toDisplayString(unref(o)("el.colorpicker.confirm")), 1) ]), _: 1 }, 8, ["class"]) ], 2) ], 40, ["onKeydown"])), [ [unref(TE), we] ]) ]), default: withCtx(() => [ createBaseVNode("div", mergeProps({ id: unref(l), ref_key: "triggerRef", ref: v }, te.$attrs, { class: unref(L), role: "button", "aria-label": unref($), "aria-labelledby": unref(A), "aria-description": unref(o)("el.colorpicker.description", { color: te.modelValue || "" }), "aria-disabled": unref(u), tabindex: unref(u) ? -1 : te.tabindex, onKeydown: fe, onFocus: unref(b), onBlur: unref(x) }), [ unref(u) ? (openBlock(), createElementBlock("div", { key: 0, class: normalizeClass(unref(a).be("picker", "mask")) }, null, 2)) : createCommentVNode("v-if", true), createBaseVNode("div", { class: normalizeClass(unref(a).be("picker", "trigger")), onClick: oe }, [ createBaseVNode("span", { class: normalizeClass([unref(a).be("picker", "color"), unref(a).is("alpha", te.showAlpha)]) }, [ createBaseVNode("span", { class: normalizeClass(unref(a).be("picker", "color-inner")), style: normalizeStyle({ backgroundColor: unref(O) }) }, [ withDirectives(createVNode(unref(lr), { class: normalizeClass([unref(a).be("picker", "icon"), unref(a).is("icon-arrow-down")]) }, { default: withCtx(() => [ createVNode(unref(Vm)) ]), _: 1 }, 8, ["class"]), [ [vShow, te.modelValue || E.value] ]), withDirectives(createVNode(unref(lr), { class: normalizeClass([unref(a).be("picker", "empty"), unref(a).is("icon-close")]) }, { default: withCtx(() => [ createVNode(unref(Yp)) ]), _: 1 }, 8, ["class"]), [ [vShow, !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 = bt(Mne, [["__file", "color-picker.vue"]]); jn(zne); var Vne = defineComponent({ name: "ElContainer" }); var jne = defineComponent({ ...Vne, props: { direction: { type: String } }, setup(e17) { const t = e17, n = useSlots(), r = wt("container"), o = computed(() => t.direction === "vertical" ? true : t.direction === "horizontal" ? false : n && n.default ? n.default().some((a) => { const i = a.type.name; return i === "ElHeader" || i === "ElFooter"; }) : false); return (a, i) => (openBlock(), createElementBlock("section", { class: normalizeClass([unref(r).b(), unref(r).is("vertical", unref(o))]) }, [ renderSlot(a.$slots, "default") ], 2)); } }); var Hne = bt(jne, [["__file", "container.vue"]]); var Une = defineComponent({ name: "ElAside" }); var qne = defineComponent({ ...Une, props: { width: { type: String, default: null } }, setup(e17) { const t = e17, n = wt("aside"), r = computed(() => t.width ? n.cssVarBlock({ width: t.width }) : {}); return (o, a) => (openBlock(), createElementBlock("aside", { class: normalizeClass(unref(n).b()), style: normalizeStyle(unref(r)) }, [ renderSlot(o.$slots, "default") ], 6)); } }); var DE = bt(qne, [["__file", "aside.vue"]]); var Wne = defineComponent({ name: "ElFooter" }); var Kne = defineComponent({ ...Wne, props: { height: { type: String, default: null } }, setup(e17) { const t = e17, n = wt("footer"), r = computed(() => t.height ? n.cssVarBlock({ height: t.height }) : {}); return (o, a) => (openBlock(), createElementBlock("footer", { class: normalizeClass(unref(n).b()), style: normalizeStyle(unref(r)) }, [ renderSlot(o.$slots, "default") ], 6)); } }); var RE = bt(Kne, [["__file", "footer.vue"]]); var Gne = defineComponent({ name: "ElHeader" }); var Xne = defineComponent({ ...Gne, props: { height: { type: String, default: null } }, setup(e17) { const t = e17, n = wt("header"), r = computed(() => t.height ? n.cssVarBlock({ height: t.height }) : {}); return (o, a) => (openBlock(), createElementBlock("header", { class: normalizeClass(unref(n).b()), style: normalizeStyle(unref(r)) }, [ renderSlot(o.$slots, "default") ], 6)); } }); var BE = bt(Xne, [["__file", "header.vue"]]); var Yne = defineComponent({ name: "ElMain" }); var Zne = defineComponent({ ...Yne, setup(e17) { const t = wt("main"); return (n, r) => (openBlock(), createElementBlock("main", { class: normalizeClass(unref(t).b()) }, [ renderSlot(n.$slots, "default") ], 2)); } }); var ME = bt(Zne, [["__file", "main.vue"]]); var zE = jn(Hne, { Aside: DE, Footer: RE, Header: BE, Main: ME }); Na(DE); Na(RE); var VE = Na(BE); var uy = Na(ME); var Jne = defineComponent({ inheritAttrs: false }); function Qne(e17, t, n, r, o, a) { return renderSlot(e17.$slots, "default"); } var ere = bt(Jne, [["render", Qne], ["__file", "collection.vue"]]); var tre = defineComponent({ name: "ElCollectionItem", inheritAttrs: false }); function nre(e17, t, n, r, o, a) { return renderSlot(e17.$slots, "default"); } var rre = bt(tre, [["render", nre], ["__file", "collection-item.vue"]]); var ore = "data-el-collection-item"; var are = (e17) => { const t = `El${e17}Collection`, n = `${t}Item`, r = Symbol(t), o = Symbol(n), a = { ...ere, name: t, setup() { const s = ref(null), u = /* @__PURE__ */ new Map(); provide(r, { itemMap: u, getItems: () => { const l = unref(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 = ref(null), c = inject(r, void 0); provide(o, { collectionItemRef: l }), onMounted(() => { const d = unref(l); d && c.itemMap.set(d, { ref: d, ...u }); }), onBeforeUnmount(() => { const d = unref(l); c.itemMap.delete(d); }); } }; return { COLLECTION_INJECTION_KEY: r, COLLECTION_ITEM_INJECTION_KEY: o, ElCollection: a, ElCollectionItem: i }; }; var 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: true }, loop: { type: Boolean, default: true }, 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"); var jE = Symbol("ElSelectGroup"); var Yc = Symbol("ElSelect"); function ire(e17, t) { const n = inject(Yc), r = inject(jE, { disabled: false }), o = computed(() => c(Qa(n.props.modelValue), e17.value)), a = computed(() => { var h10; if (n.props.multiple) { const p = Qa((h10 = n.props.modelValue) != null ? h10 : []); return !o.value && p.length >= n.props.multipleLimit && n.props.multipleLimit > 0; } else return false; }), i = computed(() => e17.label || (Gn(e17.value) ? "" : e17.value)), s = computed(() => e17.value || e17.label || ""), u = computed(() => e17.disabled || t.groupDisabled || a.value), l = getCurrentInstance(), c = (h10 = [], p) => { if (Gn(e17.value)) { const v = n.props.valueKey; return h10 && h10.some((m) => toRaw(ya(m, v)) === ya(p, v)); } else return h10 && h10.includes(p); }, d = () => { !e17.disabled && !r.disabled && (n.states.hoveringIndex = n.optionsArray.indexOf(l.proxy)); }, f = (h10) => { const p = new RegExp(vZ(h10), "i"); t.visible = p.test(i.value) || e17.created; }; return watch(() => i.value, () => { !e17.created && !n.props.remote && n.setSelected(); }), watch(() => e17.value, (h10, p) => { const { remote: v, valueKey: m } = n.props; if (h10 !== p && (n.onOptionDestroy(p, l.proxy), n.onOptionCreate(l.proxy)), !e17.created && !v) { if (m && Gn(h10) && Gn(p) && h10[m] === p[m]) return; n.setSelected(); } }), watch(() => r.disabled, () => { t.groupDisabled = r.disabled; }, { immediate: true }), { select: n, currentLabel: i, currentValue: s, itemSelected: o, isDisabled: u, hoverItem: d, updateOption: f }; } var sre = defineComponent({ name: "ElOption", componentName: "ElOption", props: { value: { required: true, type: [String, Number, Boolean, Object] }, label: [String, Number], created: Boolean, disabled: Boolean }, setup(e17) { const t = wt("select"), n = lh(), r = computed(() => [ t.be("dropdown", "item"), t.is("disabled", unref(s)), t.is("selected", unref(i)), t.is("hovering", unref(f)) ]), o = reactive({ index: -1, groupDisabled: false, visible: true, hover: false }), { currentLabel: a, itemSelected: i, isDisabled: s, select: u, hoverItem: l, updateOption: c } = ire(e17, o), { visible: d, hover: f } = toRefs(o), h10 = getCurrentInstance().proxy; u.onOptionCreate(h10), onBeforeUnmount(() => { const v = h10.value, { selected: m } = u.states, g = (u.props.multiple ? m : [m]).some((b) => b.value === h10.value); nextTick(() => { u.states.cachedOptions.get(v) === h10 && !g && u.states.cachedOptions.delete(v); }), u.onOptionDestroy(v, h10); }); function p() { s.value || u.handleOptionSelect(h10); } 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(e17, t, n, r, o, a) { return withDirectives((openBlock(), createElementBlock("li", { id: e17.id, class: normalizeClass(e17.containerKls), role: "option", "aria-disabled": e17.isDisabled || void 0, "aria-selected": e17.itemSelected, onMouseenter: e17.hoverItem, onClick: withModifiers(e17.selectOptionClick, ["stop"]) }, [ renderSlot(e17.$slots, "default", {}, () => [ createBaseVNode("span", null, toDisplayString(e17.currentLabel), 1) ]) ], 42, ["id", "aria-disabled", "aria-selected", "onMouseenter", "onClick"])), [ [vShow, e17.visible] ]); } var cy = bt(sre, [["render", lre], ["__file", "option.vue"]]); var ure = defineComponent({ name: "ElSelectDropdown", componentName: "ElSelectDropdown", setup() { const e17 = inject(Yc), t = wt("select"), n = computed(() => e17.props.popperClass), r = computed(() => e17.props.multiple), o = computed(() => e17.props.fitInputWidth), a = ref(""); function i() { var s; a.value = `${(s = e17.selectRef) == null ? void 0 : s.offsetWidth}px`; } return onMounted(() => { i(), ga(e17.selectRef, i); }), { ns: t, minWidth: a, popperClass: n, isMultiple: r, isFitInputWidth: o }; } }); function cre(e17, t, n, r, o, a) { return openBlock(), createElementBlock("div", { class: normalizeClass([e17.ns.b("dropdown"), e17.ns.is("multiple", e17.isMultiple), e17.popperClass]), style: normalizeStyle({ [e17.isFitInputWidth ? "width" : "minWidth"]: e17.minWidth }) }, [ e17.$slots.header ? (openBlock(), createElementBlock("div", { key: 0, class: normalizeClass(e17.ns.be("dropdown", "header")) }, [ renderSlot(e17.$slots, "header") ], 2)) : createCommentVNode("v-if", true), renderSlot(e17.$slots, "default"), e17.$slots.footer ? (openBlock(), createElementBlock("div", { key: 1, class: normalizeClass(e17.ns.be("dropdown", "footer")) }, [ renderSlot(e17.$slots, "footer") ], 2)) : createCommentVNode("v-if", true) ], 6); } var dre = bt(ure, [["render", cre], ["__file", "select-dropdown.vue"]]); var pre = 11; var fre = (e17, t) => { const { t: n } = Uc(), r = lh(), o = wt("select"), a = wt("input"), i = reactive({ 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: false, menuVisibleOnFocus: false, isBeforeHide: false }), s = ref(null), u = ref(null), l = ref(null), c = ref(null), d = ref(null), f = ref(null), h10 = ref(null), p = ref(null), v = ref(null), m = ref(null), g = ref(null), b = ref(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() { e17.automaticDropdown && !O.value && (O.value = true, i.menuVisibleOnFocus = true); }, 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 = false, i.menuVisibleOnFocus = false; } }), O = ref(false), F = ref(), { form: $, formItem: A } = As(), { inputId: L } = Gc(e17, { formItemContext: A }), { valueOnClear: N, isEmptyValue: M } = PQ(e17), I = computed(() => e17.disabled || ($ == null ? void 0 : $.disabled)), z = computed(() => Tr(e17.modelValue) ? e17.modelValue.length > 0 : !M(e17.modelValue)), R = computed(() => e17.clearable && !I.value && i.inputHovering && z.value), W = computed(() => e17.remote && e17.filterable && !e17.remoteShowSuffix ? "" : e17.suffixIcon), oe = computed(() => o.is("reverse", W.value && O.value)), Q = computed(() => (A == null ? void 0 : A.validateState) || ""), ae = computed(() => q4[Q.value]), pe = computed(() => e17.remote ? 300 : 0), we = computed(() => e17.loading ? e17.loadingText || n("el.select.loading") : e17.remote && !i.inputValue && i.options.size === 0 ? false : e17.filterable && i.inputValue && i.options.size > 0 && ke.value === 0 ? e17.noMatchText || n("el.select.noMatch") : i.options.size === 0 ? e17.noDataText || n("el.select.noData") : null), ke = computed(() => fe.value.filter((K) => K.visible).length), fe = computed(() => { 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 = computed(() => Array.from(i.cachedOptions.values())), J = computed(() => { const K = fe.value.filter((he) => !he.created).some((he) => he.currentLabel === i.inputValue); return e17.filterable && e17.allowCreate && i.inputValue !== "" && !K; }), te = () => { e17.filterable && wr(e17.filterMethod) || e17.filterable && e17.remote && wr(e17.remoteMethod) || fe.value.forEach((K) => { var he; (he = K.updateOption) == null || he.call(K, i.inputValue); }); }, le = vs(), Ee = computed(() => ["small"].includes(le.value) ? "small" : "default"), Ne = computed({ get() { return O.value && we.value !== false; }, set(K) { O.value = K; } }), je = computed(() => { if (e17.multiple && !ri(e17.modelValue)) return Qa(e17.modelValue).length === 0 && !i.inputValue; const K = Tr(e17.modelValue) ? e17.modelValue[0] : e17.modelValue; return e17.filterable || ri(K) ? !i.inputValue : true; }), _e = computed(() => { var K; const he = (K = e17.placeholder) != null ? K : n("el.select.placeholder"); return e17.multiple || !z.value ? he : i.selectedLabel; }), De = computed(() => b0 ? null : "mouseenter"); watch(() => e17.modelValue, (K, he) => { e17.multiple && e17.filterable && !e17.reserveKeyword && (i.inputValue = "", Ae("")), Ue(), !Gp(K, he) && e17.validateEvent && (A == null || A.validate("change").catch((ze) => Tn(ze))); }, { flush: "post", deep: true }), watch(() => O.value, (K) => { K ? Ae(i.inputValue) : (i.inputValue = "", i.previousQuery = null, i.isBeforeHide = true), t("visible-change", K); }), watch(() => i.options.entries(), () => { var K; if (!_n) return; const he = ((K = s.value) == null ? void 0 : K.querySelectorAll("input")) || []; (!e17.filterable && !e17.defaultFirstOption && !ri(e17.modelValue) || !Array.from(he).includes(document.activeElement)) && Ue(), e17.defaultFirstOption && (e17.filterable || e17.remote) && ke.value && Be(); }, { flush: "post" }), watch(() => i.hoveringIndex, (K) => { Xn(K) && K > -1 ? F.value = fe.value[K] || {} : F.value = {}, fe.value.forEach((he) => { he.hover = F.value === he; }); }), watchEffect(() => { i.isBeforeHide || te(); }); const Ae = (K) => { i.previousQuery === K || x.value || (i.previousQuery = K, e17.filterable && wr(e17.filterMethod) ? e17.filterMethod(K) : e17.filterable && e17.remote && wr(e17.remoteMethod) && e17.remoteMethod(K), e17.defaultFirstOption && (e17.filterable || e17.remote) && ke.value ? nextTick(Be) : nextTick(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 (e17.multiple) i.selectedLabel = ""; else { const he = Tr(e17.modelValue) ? e17.modelValue[0] : e17.modelValue, ze = Ze(he); i.selectedLabel = ze.currentLabel, i.selected = [ze]; return; } const K = []; ri(e17.modelValue) || Qa(e17.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, e17.valueKey) === ya(K, e17.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 = true), Ae(i.inputValue); }, ce = (K) => { if (i.inputValue = K.target.value, e17.remote) de(); else return se(); }, de = z4(() => { se(); }, pe.value), Oe = (K) => { Gp(e17.modelValue, K) || t(Um, K); }, ye = (K) => uZ(K, (he) => !i.disabledOptions.has(he)), Fe = (K) => { if (e17.multiple && K.code !== In.delete && K.target.value.length <= 0) { const he = Qa(e17.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(e17.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 = e17.multiple ? [] : N.value; if (e17.multiple) for (const ze of i.selected) ze.isDisabled && he.push(ze.value); t(Kn, he), Oe(he), i.hoveringIndex = -1, O.value = false, t("clear"), Vt(); }, re = (K) => { var he; if (e17.multiple) { const ze = Qa((he = e17.modelValue) != null ? he : []).slice(), ot = Se(ze, K.value); ot > -1 ? ze.splice(ot, 1) : (e17.multipleLimit <= 0 || ze.length < e17.multipleLimit) && ze.push(K.value), t(Kn, ze), Oe(ze), K.created && Ae(""), e17.filterable && !e17.reserveKeyword && (i.inputValue = ""); } else t(Kn, K.value), Oe(K.value), O.value = false; Vt(), !O.value && nextTick(() => { be(K); }); }, Se = (K = [], he) => { if (!Gn(he)) return K.indexOf(he); const ze = e17.valueKey; let ot = -1; return K.some((yn, qn) => toRaw(ya(yn, ze)) === ya(he, ze) ? (ot = qn, true) : false), 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 = computed(() => { var K, he; return (he = (K = l.value) == null ? void 0 : K.popperRef) == null ? void 0 : he.contentRef; }), Dt = () => { i.isBeforeHide = false, nextTick(() => 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 = false, S.value && qt(); }, sn = () => { i.inputValue.length > 0 ? i.inputValue = "" : O.value = false; }, wn = () => { I.value || (b0 && (i.inputHovering = true), i.menuVisibleOnFocus ? i.menuVisibleOnFocus = false : 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, e17.valueKey) : K.value, or = computed(() => fe.value.filter((K) => K.visible).every((K) => K.disabled)), Hn = computed(() => e17.multiple ? e17.collapseTags ? i.selected.slice(0, e17.maxCollapseTags) : i.selected : []), Un = computed(() => e17.multiple ? e17.collapseTags ? i.selected.slice(e17.maxCollapseTags) : [] : []), Wt = (K) => { if (!O.value) { O.value = true; 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 === true || he.states.groupDisabled === true || !he.visible) && Wt(K), nextTick(() => be(F.value)); } }, ln = () => { if (!u.value) return 0; const K = window.getComputedStyle(u.value); return Number.parseFloat(K.gap || "6px"); }, fn = computed(() => { const K = ln(); return { maxWidth: `${g.value && e17.maxCollapseTags === 1 ? i.selectionWidth - i.collapseItemWidth - K : i.selectionWidth}px` }; }), ar = computed(() => ({ maxWidth: `${i.selectionWidth}px` })), zo = computed(() => ({ 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), onMounted(() => { 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: W, 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: h10, suffixRef: p, selectRef: s, wrapperRef: E, selectionRef: u, scrollbarRef: b, menuRef: v, tagMenuRef: m, collapseItemRef: g }; }; var hre = defineComponent({ name: "ElOptions", setup(e17, { slots: t }) { const n = inject(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, h10, 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) ? (h10 = c.children) == null ? void 0 : h10.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; }; } }); var 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: true }, valueKey: { type: String, default: "value" }, collapseTags: Boolean, collapseTagsTooltip: Boolean, maxCollapseTags: { type: Number, default: 1 }, teleported: Er.teleported, persistent: { type: Boolean, default: true }, 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: true }, 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"]) }); var rx = "ElSelect"; var gre = defineComponent({ 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(e17, { emit: t }) { const n = computed(() => { const { modelValue: a, multiple: i } = e17, s = i ? [] : void 0; return Tr(a) ? i ? a : s : i ? s : a; }), r = reactive({ ...toRefs(e17), modelValue: n }), o = fre(r, t); return provide(Yc, reactive({ 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(e17, t, n, r, o, a) { const i = resolveComponent("el-tag"), s = resolveComponent("el-tooltip"), u = resolveComponent("el-icon"), l = resolveComponent("el-option"), c = resolveComponent("el-options"), d = resolveComponent("el-scrollbar"), f = resolveComponent("el-select-menu"), h10 = resolveDirective("click-outside"); return withDirectives((openBlock(), createElementBlock("div", { ref: "selectRef", class: normalizeClass([e17.nsSelect.b(), e17.nsSelect.m(e17.selectSize)]), [toHandlerKey(e17.mouseEnterEventName)]: (p) => e17.states.inputHovering = true, onMouseleave: (p) => e17.states.inputHovering = false }, [ createVNode(s, { ref: "tooltipRef", visible: e17.dropdownMenuVisible, placement: e17.placement, teleported: e17.teleported, "popper-class": [e17.nsSelect.e("popper"), e17.popperClass], "popper-options": e17.popperOptions, "fallback-placements": e17.fallbackPlacements, effect: e17.effect, pure: "", trigger: "click", transition: `${e17.nsSelect.namespace.value}-zoom-in-top`, "stop-popper-mouse-event": false, "gpu-acceleration": false, persistent: e17.persistent, "append-to": e17.appendTo, onBeforeShow: e17.handleMenuEnter, onHide: (p) => e17.states.isBeforeHide = false }, { default: withCtx(() => { var p; return [ createBaseVNode("div", { ref: "wrapperRef", class: normalizeClass([ e17.nsSelect.e("wrapper"), e17.nsSelect.is("focused", e17.isFocused), e17.nsSelect.is("hovering", e17.states.inputHovering), e17.nsSelect.is("filterable", e17.filterable), e17.nsSelect.is("disabled", e17.selectDisabled) ]), onClick: withModifiers(e17.toggleMenu, ["prevent"]) }, [ e17.$slots.prefix ? (openBlock(), createElementBlock("div", { key: 0, ref: "prefixRef", class: normalizeClass(e17.nsSelect.e("prefix")) }, [ renderSlot(e17.$slots, "prefix") ], 2)) : createCommentVNode("v-if", true), createBaseVNode("div", { ref: "selectionRef", class: normalizeClass([ e17.nsSelect.e("selection"), e17.nsSelect.is("near", e17.multiple && !e17.$slots.prefix && !!e17.states.selected.length) ]) }, [ e17.multiple ? renderSlot(e17.$slots, "tag", { key: 0 }, () => [ (openBlock(true), createElementBlock(Fragment, null, renderList(e17.showTagList, (v) => (openBlock(), createElementBlock("div", { key: e17.getValueKey(v), class: normalizeClass(e17.nsSelect.e("selected-item")) }, [ createVNode(i, { closable: !e17.selectDisabled && !v.isDisabled, size: e17.collapseTagSize, type: e17.tagType, effect: e17.tagEffect, "disable-transitions": "", style: normalizeStyle(e17.tagStyle), onClose: (m) => e17.deleteTag(m, v) }, { default: withCtx(() => [ createBaseVNode("span", { class: normalizeClass(e17.nsSelect.e("tags-text")) }, [ renderSlot(e17.$slots, "label", { label: v.currentLabel, value: v.value }, () => [ createTextVNode(toDisplayString(v.currentLabel), 1) ]) ], 2) ]), _: 2 }, 1032, ["closable", "size", "type", "effect", "style", "onClose"]) ], 2))), 128)), e17.collapseTags && e17.states.selected.length > e17.maxCollapseTags ? (openBlock(), createBlock(s, { key: 0, ref: "tagTooltipRef", disabled: e17.dropdownMenuVisible || !e17.collapseTagsTooltip, "fallback-placements": ["bottom", "top", "right", "left"], effect: e17.effect, placement: "bottom", teleported: e17.teleported }, { default: withCtx(() => [ createBaseVNode("div", { ref: "collapseItemRef", class: normalizeClass(e17.nsSelect.e("selected-item")) }, [ createVNode(i, { closable: false, size: e17.collapseTagSize, type: e17.tagType, effect: e17.tagEffect, "disable-transitions": "", style: normalizeStyle(e17.collapseTagStyle) }, { default: withCtx(() => [ createBaseVNode("span", { class: normalizeClass(e17.nsSelect.e("tags-text")) }, " + " + toDisplayString(e17.states.selected.length - e17.maxCollapseTags), 3) ]), _: 1 }, 8, ["size", "type", "effect", "style"]) ], 2) ]), content: withCtx(() => [ createBaseVNode("div", { ref: "tagMenuRef", class: normalizeClass(e17.nsSelect.e("selection")) }, [ (openBlock(true), createElementBlock(Fragment, null, renderList(e17.collapseTagList, (v) => (openBlock(), createElementBlock("div", { key: e17.getValueKey(v), class: normalizeClass(e17.nsSelect.e("selected-item")) }, [ createVNode(i, { class: "in-tooltip", closable: !e17.selectDisabled && !v.isDisabled, size: e17.collapseTagSize, type: e17.tagType, effect: e17.tagEffect, "disable-transitions": "", onClose: (m) => e17.deleteTag(m, v) }, { default: withCtx(() => [ createBaseVNode("span", { class: normalizeClass(e17.nsSelect.e("tags-text")) }, [ renderSlot(e17.$slots, "label", { label: v.currentLabel, value: v.value }, () => [ createTextVNode(toDisplayString(v.currentLabel), 1) ]) ], 2) ]), _: 2 }, 1032, ["closable", "size", "type", "effect", "onClose"]) ], 2))), 128)) ], 2) ]), _: 3 }, 8, ["disabled", "effect", "teleported"])) : createCommentVNode("v-if", true) ]) : createCommentVNode("v-if", true), e17.selectDisabled ? createCommentVNode("v-if", true) : (openBlock(), createElementBlock("div", { key: 1, class: normalizeClass([ e17.nsSelect.e("selected-item"), e17.nsSelect.e("input-wrapper"), e17.nsSelect.is("hidden", !e17.filterable) ]) }, [ withDirectives(createBaseVNode("input", { id: e17.inputId, ref: "inputRef", "onUpdate:modelValue": (v) => e17.states.inputValue = v, type: "text", name: e17.name, class: normalizeClass([e17.nsSelect.e("input"), e17.nsSelect.is(e17.selectSize)]), disabled: e17.selectDisabled, autocomplete: e17.autocomplete, style: normalizeStyle(e17.inputStyle), role: "combobox", readonly: !e17.filterable, spellcheck: "false", "aria-activedescendant": ((p = e17.hoverOption) == null ? void 0 : p.id) || "", "aria-controls": e17.contentId, "aria-expanded": e17.dropdownMenuVisible, "aria-label": e17.ariaLabel, "aria-autocomplete": "none", "aria-haspopup": "listbox", onKeydown: [ withKeys(withModifiers((v) => e17.navigateOptions("next"), ["stop", "prevent"]), ["down"]), withKeys(withModifiers((v) => e17.navigateOptions("prev"), ["stop", "prevent"]), ["up"]), withKeys(withModifiers(e17.handleEsc, ["stop", "prevent"]), ["esc"]), withKeys(withModifiers(e17.selectOption, ["stop", "prevent"]), ["enter"]), withKeys(withModifiers(e17.deletePrevTag, ["stop"]), ["delete"]) ], onCompositionstart: e17.handleCompositionStart, onCompositionupdate: e17.handleCompositionUpdate, onCompositionend: e17.handleCompositionEnd, onInput: e17.onInput, onClick: withModifiers(e17.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"]), [ [vModelText, e17.states.inputValue] ]), e17.filterable ? (openBlock(), createElementBlock("span", { key: 0, ref: "calculatorRef", "aria-hidden": "true", class: normalizeClass(e17.nsSelect.e("input-calculator")), textContent: toDisplayString(e17.states.inputValue) }, null, 10, ["textContent"])) : createCommentVNode("v-if", true) ], 2)), e17.shouldShowPlaceholder ? (openBlock(), createElementBlock("div", { key: 2, class: normalizeClass([ e17.nsSelect.e("selected-item"), e17.nsSelect.e("placeholder"), e17.nsSelect.is("transparent", !e17.hasModelValue || e17.expanded && !e17.states.inputValue) ]) }, [ e17.hasModelValue ? renderSlot(e17.$slots, "label", { key: 0, label: e17.currentPlaceholder, value: e17.modelValue }, () => [ createBaseVNode("span", null, toDisplayString(e17.currentPlaceholder), 1) ]) : (openBlock(), createElementBlock("span", { key: 1 }, toDisplayString(e17.currentPlaceholder), 1)) ], 2)) : createCommentVNode("v-if", true) ], 2), createBaseVNode("div", { ref: "suffixRef", class: normalizeClass(e17.nsSelect.e("suffix")) }, [ e17.iconComponent && !e17.showClose ? (openBlock(), createBlock(u, { key: 0, class: normalizeClass([e17.nsSelect.e("caret"), e17.nsSelect.e("icon"), e17.iconReverse]) }, { default: withCtx(() => [ (openBlock(), createBlock(resolveDynamicComponent(e17.iconComponent))) ]), _: 1 }, 8, ["class"])) : createCommentVNode("v-if", true), e17.showClose && e17.clearIcon ? (openBlock(), createBlock(u, { key: 1, class: normalizeClass([ e17.nsSelect.e("caret"), e17.nsSelect.e("icon"), e17.nsSelect.e("clear") ]), onClick: e17.handleClearClick }, { default: withCtx(() => [ (openBlock(), createBlock(resolveDynamicComponent(e17.clearIcon))) ]), _: 1 }, 8, ["class", "onClick"])) : createCommentVNode("v-if", true), e17.validateState && e17.validateIcon ? (openBlock(), createBlock(u, { key: 2, class: normalizeClass([e17.nsInput.e("icon"), e17.nsInput.e("validateIcon")]) }, { default: withCtx(() => [ (openBlock(), createBlock(resolveDynamicComponent(e17.validateIcon))) ]), _: 1 }, 8, ["class"])) : createCommentVNode("v-if", true) ], 2) ], 10, ["onClick"]) ]; }), content: withCtx(() => [ createVNode(f, { ref: "menuRef" }, { default: withCtx(() => [ e17.$slots.header ? (openBlock(), createElementBlock("div", { key: 0, class: normalizeClass(e17.nsSelect.be("dropdown", "header")), onClick: withModifiers(() => { }, ["stop"]) }, [ renderSlot(e17.$slots, "header") ], 10, ["onClick"])) : createCommentVNode("v-if", true), withDirectives(createVNode(d, { id: e17.contentId, ref: "scrollbarRef", tag: "ul", "wrap-class": e17.nsSelect.be("dropdown", "wrap"), "view-class": e17.nsSelect.be("dropdown", "list"), class: normalizeClass([e17.nsSelect.is("empty", e17.filteredOptionsCount === 0)]), role: "listbox", "aria-label": e17.ariaLabel, "aria-orientation": "vertical" }, { default: withCtx(() => [ e17.showNewOption ? (openBlock(), createBlock(l, { key: 0, value: e17.states.inputValue, created: true }, null, 8, ["value"])) : createCommentVNode("v-if", true), createVNode(c, null, { default: withCtx(() => [ renderSlot(e17.$slots, "default") ]), _: 3 }) ]), _: 3 }, 8, ["id", "wrap-class", "view-class", "class", "aria-label"]), [ [vShow, e17.states.options.size > 0 && !e17.loading] ]), e17.$slots.loading && e17.loading ? (openBlock(), createElementBlock("div", { key: 1, class: normalizeClass(e17.nsSelect.be("dropdown", "loading")) }, [ renderSlot(e17.$slots, "loading") ], 2)) : e17.loading || e17.filteredOptionsCount === 0 ? (openBlock(), createElementBlock("div", { key: 2, class: normalizeClass(e17.nsSelect.be("dropdown", "empty")) }, [ renderSlot(e17.$slots, "empty", {}, () => [ createBaseVNode("span", null, toDisplayString(e17.emptyText), 1) ]) ], 2)) : createCommentVNode("v-if", true), e17.$slots.footer ? (openBlock(), createElementBlock("div", { key: 3, class: normalizeClass(e17.nsSelect.be("dropdown", "footer")), onClick: withModifiers(() => { }, ["stop"]) }, [ renderSlot(e17.$slots, "footer") ], 10, ["onClick"])) : createCommentVNode("v-if", true) ]), _: 3 }, 512) ]), _: 3 }, 8, ["visible", "placement", "teleported", "popper-class", "popper-options", "fallback-placements", "effect", "transition", "persistent", "append-to", "onBeforeShow", "onHide"]) ], 16, ["onMouseleave"])), [ [h10, e17.handleClickOutside, e17.popperRef] ]); } var yre = bt(gre, [["render", mre], ["__file", "select.vue"]]); var bre = defineComponent({ name: "ElOptionGroup", componentName: "ElOptionGroup", props: { label: String, disabled: Boolean }, setup(e17) { const t = wt("select"), n = ref(null), r = getCurrentInstance(), o = ref([]); provide(jE, reactive({ ...toRefs(e17) })); const a = computed(() => o.value.some((l) => l.visible === true)), 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 h10, p; i(f) ? d.push(f.component.proxy) : (h10 = f.children) != null && h10.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 onMounted(() => { u(); }), cK(n, u, { attributes: true, subtree: true, childList: true }), { groupRef: n, visible: a, ns: t }; } }); function wre(e17, t, n, r, o, a) { return withDirectives((openBlock(), createElementBlock("ul", { ref: "groupRef", class: normalizeClass(e17.ns.be("group", "wrap")) }, [ createBaseVNode("li", { class: normalizeClass(e17.ns.be("group", "title")) }, toDisplayString(e17.label), 3), createBaseVNode("li", null, [ createBaseVNode("ul", { class: normalizeClass(e17.ns.b("group")) }, [ renderSlot(e17.$slots, "default") ], 2) ]) ], 2)), [ [vShow, e17.visible] ]); } var HE = bt(bre, [["render", wre], ["__file", "option-group.vue"]]); var xre = jn(yre, { Option: cy, OptionGroup: HE }); var kre = Na(cy); Na(HE); var 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: true }, 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: true }, persistent: { type: Boolean, default: true }, "onUpdate:visible": { type: Function } }); var Ere = { "update:visible": (e17) => El(e17), "before-enter": () => true, "before-leave": () => true, "after-enter": () => true, "after-leave": () => true }; var Sre = "onUpdate:visible"; var _re = defineComponent({ name: "ElPopover" }); var Tre = defineComponent({ ..._re, props: Cre, emits: Ere, setup(e17, { expose: t, emit: n }) { const r = e17, o = computed(() => r[Sre]), a = wt("popover"), i = ref(), s = computed(() => { var m; return (m = unref(i)) == null ? void 0 : m.popperRef; }), u = computed(() => [ { width: Sl(r.width) }, r.popperStyle ]), l = computed(() => [a.b(), r.popperClass, { [a.m("plain")]: !!r.content }]), c = computed(() => r.transition === `${a.namespace.value}-fade-in-linear`), d = () => { var m; (m = i.value) == null || m.hide(); }, f = () => { n("before-enter"); }, h10 = () => { n("before-leave"); }, p = () => { n("after-enter"); }, v = () => { n("update:visible", false), n("after-leave"); }; return t({ popperRef: s, hide: d }), (m, g) => (openBlock(), createBlock(unref(Xc), mergeProps({ 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": unref(l), "popper-style": unref(u), teleported: m.teleported, persistent: m.persistent, "gpu-acceleration": unref(c), "onUpdate:visible": unref(o), onBeforeShow: f, onBeforeHide: h10, onShow: p, onHide: v }), { content: withCtx(() => [ m.title ? (openBlock(), createElementBlock("div", { key: 0, class: normalizeClass(unref(a).e("title")), role: "title" }, toDisplayString(m.title), 3)) : createCommentVNode("v-if", true), renderSlot(m.$slots, "default", {}, () => [ createTextVNode(toDisplayString(m.content), 1) ]) ]), default: withCtx(() => [ m.$slots.reference ? renderSlot(m.$slots, "reference", { key: 0 }) : createCommentVNode("v-if", true) ]), _: 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 = bt(Tre, [["__file", "popover.vue"]]); var ox = (e17, t) => { const n = t.arg || t.value, r = n == null ? void 0 : n.popperRef; r && (r.triggerRef = e17); }; var Pre = { mounted(e17, t) { ox(e17, t); }, updated(e17, t) { ox(e17, t); } }; var $re = "popover"; var Are = JZ(Pre, $re); jn(Ore, { directive: Are }); var ol = "$treeNodeId"; var ax = function(e17, t) { !t || t[ol] || Object.defineProperty(t, ol, { value: e17.id, enumerable: false, configurable: false, writable: false }); }; var dy = function(e17, t) { return e17 ? t[e17] : t[ol]; }; var F0 = (e17, t, n) => { const r = e17.value.currentNode; n(); const o = e17.value.currentNode; r !== o && t("current-change", o ? o.data : null, o); }; var I0 = (e17) => { let t = true, n = true, r = true; for (let o = 0, a = e17.length; o < a; o++) { const i = e17[o]; (i.checked !== true || i.indeterminate) && (t = false, i.disabled || (r = false)), (i.checked !== false || i.indeterminate) && (n = false); } return { all: t, none: n, allWithoutDisable: r, half: !t && !n }; }; var Su = function(e17) { if (e17.childNodes.length === 0 || e17.loading) return; const { all: t, none: n, half: r } = I0(e17.childNodes); t ? (e17.checked = true, e17.indeterminate = false) : r ? (e17.checked = false, e17.indeterminate = true) : n && (e17.checked = false, e17.indeterminate = false); const o = e17.parent; !o || o.level === 0 || e17.store.checkStrictly || Su(o); }; var Dd = function(e17, t) { const n = e17.store.props, r = e17.data || {}, o = n[t]; if (typeof o == "function") return o(r, e17); if (typeof o == "string") return r[o]; if (typeof o > "u") { const a = r[t]; return a === void 0 ? "" : a; } }; var Fre = 0; var is = class _is { constructor(t) { this.id = Fre++, this.text = null, this.checked = false, this.indeterminate = false, this.data = null, this.expanded = false, this.parent = null, this.visible = true, this.isCurrent = false, this.canFocus = false; for (const n in t) fs(t, n) && (this[n] = t[n]); this.level = 0, this.loaded = false, this.childNodes = [], this.loading = false, 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 !== true && this.data ? (this.setData(this.data), t.defaultExpandAll && (this.expanded = true, this.canFocus = true)) : 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 = true), t.lazy && t._initDefaultCheckedNode(this), this.updateLeafState(), this.parent && (this.level === 1 || this.parent.expanded === true) && (this.canFocus = true); } 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 = true) { 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(true); 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 = reactive(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 = true, o = o.parent; } this.expanded = true, t && t(), this.childNodes.forEach((o) => { o.canFocus = true; }); }; this.shouldLoadData() ? this.loadData((o) => { Array.isArray(o) && (this.checked ? this.setChecked(true, true) : this.store.checkStrictly || Su(this), r()); }) : r(); } doCreateChildren(t, n = {}) { t.forEach((r) => { this.insertChild(Object.assign({ data: r }, n), void 0, true); }); } collapse() { this.expanded = false, this.childNodes.forEach((t) => { t.canFocus = false; }); } shouldLoadData() { return this.store.lazy === true && this.store.load && !this.loaded; } updateLeafState() { if (this.store.lazy === true && this.loaded !== true && typeof this.isLeafByUser < "u") { this.isLeaf = this.isLeafByUser; return; } const t = this.childNodes; if (!this.store.lazy || this.store.lazy === true && this.loaded === true) { this.isLeaf = !t || t.length === 0; return; } this.isLeaf = false; } setChecked(t, n, r, o) { if (this.indeterminate = t === "half", this.checked = t === true, this.store.checkStrictly) return; if (!(this.shouldLoadData() && !this.store.checkDescendants)) { const { all: i, allWithoutDisable: s } = I0(this.childNodes); !this.isLeaf && !i && s && (this.checked = false, t = false); const u = () => { if (n) { const l = this.childNodes; for (let f = 0, h10 = l.length; f < h10; f++) { const p = l[f]; o = o || t !== false; const v = p.disabled ? p.checked : o; p.setChecked(v, n, true, 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 !== false }); return; } else u(); } const a = this.parent; !a || a.level === 0 || r || Su(a); } getChildren(t = false) { 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 === true && this.store.load && !this.loaded && (!this.loading || Object.keys(n).length)) { this.loading = true; const r = (a) => { this.childNodes = [], this.doCreateChildren(a, n), this.loaded = true, this.loading = false, this.updateLeafState(), t && t.call(this, a); }, o = () => { this.loading = false; }; 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); } }; var Ire = class { 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 = true; s = !i.some((u) => u.visible), a.root ? a.root.visible = s === false : a.visible = s === false; } 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(true, !this.checkStrictly); }); } _initDefaultCheckedNode(t) { (this.defaultCheckedKeys || []).includes(t.key) && t.setChecked(true, !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 = false, n = false) { 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 = false) { 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 = false, 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(false, false)); const s = (u) => { u.childNodes.forEach((l) => { var c; a[l.data[t]] = true, (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(false, false); continue; } if (c.childNodes.length && s(c), c.isLeaf || this.checkStrictly) { c.setChecked(true, false); continue; } if (c.setChecked(true, true), n) { c.setChecked(false, false); const f = function(h10) { h10.childNodes.forEach((p) => { p.isLeaf || p.setChecked(false, false), f(p); }); }; f(c); } } } setCheckedNodes(t, n = false) { const r = this.key, o = {}; t.forEach((a) => { o[(a || {})[r]] = true; }), this._setCheckedKeys(r, n, o); } setCheckedKeys(t, n = false) { this.defaultCheckedKeys = t; const r = this.key, o = {}; t.forEach((a) => { o[a] = true; }), 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 = false), this.currentNode = t, this.currentNode.isCurrent = true; } setUserCurrentNode(t, n = true) { const r = t[this.key], o = this.nodesMap[r]; this.setCurrentNode(o), n && this.currentNode.level > 1 && this.currentNode.parent.expand(null, true); } setCurrentNodeKey(t, n = true) { if (t == null) { this.currentNode && (this.currentNode.isCurrent = false), this.currentNode = null; return; } const r = this.getNode(t); r && (this.setCurrentNode(r), n && this.currentNode.level > 1 && this.currentNode.parent.expand(null, true)); } }; var Nre = defineComponent({ name: "ElTreeNodeContent", props: { node: { type: Object, required: true }, renderContent: Function }, setup(e17) { const t = wt("tree"), n = inject("NodeInstance"), r = inject("RootTree"); return () => { const o = e17.node, { data: a, store: i } = o; return e17.renderContent ? e17.renderContent(h, { _self: n, node: o, data: a, store: i }) : renderSlot(r.ctx.slots, "default", { node: o, data: a }, () => [ h("span", { class: t.be("node", "label") }, [o.label]) ]); }; } }); var Lre = bt(Nre, [["__file", "tree-node-content.vue"]]); function UE(e17) { const t = inject("TreeNodeMap", null), n = { treeNodeExpand: (r) => { e17.node !== r && e17.node.collapse(); }, children: [] }; return t && t.children.push(n), provide("TreeNodeMap", n), { broadcastExpanded: (r) => { if (e17.accordion) for (const o of n.children) o.treeNodeExpand(r); } }; } var qE = Symbol("dragEvents"); function Dre({ props: e17, ctx: t, el$: n, dropIndicator$: r, store: o }) { const a = wt("tree"), i = ref({ showDropIndicator: false, draggingNode: null, dropNode: null, allowDrop: true, dropType: null }); return provide(qE, { treeNodeDragStart: ({ event: s, treeNode: u }) => { if (typeof e17.allowDrag == "function" && !e17.allowDrag(u.node)) return s.preventDefault(), false; 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 = true, h10 = true, p = true, v = true; typeof e17.allowDrop == "function" && (f = e17.allowDrop(d.node, l.node, "prev"), v = h10 = e17.allowDrop(d.node, l.node, "inner"), p = e17.allowDrop(d.node, l.node, "next")), s.dataTransfer.dropEffect = h10 || f || p ? "move" : "none", (f || h10 || 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 || h10 || p ? i.value.dropNode = l : i.value.dropNode = null, l.node.nextSibling === d.node && (p = false), l.node.previousSibling === d.node && (f = false), l.node.contains(d.node, false) && (h10 = false), (d.node === l.node || d.node.contains(l.node)) && (f = false, h10 = false, p = false); const m = l.$el.querySelector(`.${a.be("node", "content")}`).getBoundingClientRect(), g = n.value.getBoundingClientRect(); let b; const x = f ? h10 ? 0.25 : p ? 0.45 : 1 : -1, w = p ? h10 ? 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" : h10 ? 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 h10; (h10 = o.value.nodesMap[f.data[o.value.key]]) == null || h10.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 = false, i.value.draggingNode = null, i.value.dropNode = null, i.value.allowDrop = true; } }), { dragState: i }; } var Rre = defineComponent({ 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: false } }, emits: ["node-expand"], setup(e17, t) { const n = wt("tree"), { broadcastExpanded: r } = UE(e17), o = inject("RootTree"), a = ref(false), i = ref(false), s = ref(null), u = ref(null), l = ref(null), c = inject(qE), d = getCurrentInstance(); provide("NodeInstance", d), o || Tn("Tree", "Can not find node's tree."), e17.node.expanded && (a.value = true, i.value = true); const f = o.props.props.children || "children"; watch(() => { const w = e17.node.data[f]; return w && [...w]; }, () => { e17.node.updateChildren(); }), watch(() => e17.node.indeterminate, (w) => { v(e17.node.checked, w); }), watch(() => e17.node.checked, (w) => { v(w, e17.node.indeterminate); }), watch(() => e17.node.childNodes.length, () => e17.node.reInitChecked()), watch(() => e17.node.expanded, (w) => { nextTick(() => a.value = w), w && (i.value = true); }); const h10 = (w) => dy(o.props.nodeKey, w.data), p = (w) => { const C = e17.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]: true } : k; }, v = (w, C) => { (s.value !== w || u.value !== C) && o.ctx.emit("check-change", e17.node.data, w, C), s.value = w, u.value = C; }, m = (w) => { F0(o.store, o.ctx.emit, () => o.store.value.setCurrentNode(e17.node)), o.currentNode.value = e17.node, o.props.expandOnClickNode && b(), o.props.checkOnClickNode && !e17.node.disabled && x(null, { target: { checked: !e17.node.checked } }), o.ctx.emit("node-click", e17.node.data, e17.node, d, w); }, g = (w) => { o.instance.vnode.props.onNodeContextmenu && (w.stopPropagation(), w.preventDefault()), o.ctx.emit("node-contextmenu", w, e17.node.data, e17.node, d); }, b = () => { e17.node.isLeaf || (a.value ? (o.ctx.emit("node-collapse", e17.node.data, e17.node, d), e17.node.collapse()) : e17.node.expand(() => { t.emit("node-expand", e17.node.data, e17.node, d); })); }, x = (w, C) => { e17.node.setChecked(C.target.checked, !o.props.checkStrictly), nextTick(() => { const k = o.store.value; o.ctx.emit("check", e17.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: h10, 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: e17 }); }, handleDragOver: (w) => { w.preventDefault(), o.props.draggable && c.treeNodeDragOver({ event: w, treeNode: { $el: l.value, node: e17.node } }); }, handleDrop: (w) => { w.preventDefault(); }, handleDragEnd: (w) => { o.props.draggable && c.treeNodeDragEnd(w); }, CaretRight: SZ }; } }); function Bre(e17, t, n, r, o, a) { const i = resolveComponent("el-icon"), s = resolveComponent("el-checkbox"), u = resolveComponent("loading"), l = resolveComponent("node-content"), c = resolveComponent("el-tree-node"), d = resolveComponent("el-collapse-transition"); return withDirectives((openBlock(), createElementBlock("div", { ref: "node$", class: normalizeClass([ e17.ns.b("node"), e17.ns.is("expanded", e17.expanded), e17.ns.is("current", e17.node.isCurrent), e17.ns.is("hidden", !e17.node.visible), e17.ns.is("focusable", !e17.node.disabled), e17.ns.is("checked", !e17.node.disabled && e17.node.checked), e17.getNodeClass(e17.node) ]), role: "treeitem", tabindex: "-1", "aria-expanded": e17.expanded, "aria-disabled": e17.node.disabled, "aria-checked": e17.node.checked, draggable: e17.tree.props.draggable, "data-key": e17.getNodeKey(e17.node), onClick: withModifiers(e17.handleClick, ["stop"]), onContextmenu: e17.handleContextMenu, onDragstart: withModifiers(e17.handleDragStart, ["stop"]), onDragover: withModifiers(e17.handleDragOver, ["stop"]), onDragend: withModifiers(e17.handleDragEnd, ["stop"]), onDrop: withModifiers(e17.handleDrop, ["stop"]) }, [ createBaseVNode("div", { class: normalizeClass(e17.ns.be("node", "content")), style: normalizeStyle({ paddingLeft: (e17.node.level - 1) * e17.tree.props.indent + "px" }) }, [ e17.tree.props.icon || e17.CaretRight ? (openBlock(), createBlock(i, { key: 0, class: normalizeClass([ e17.ns.be("node", "expand-icon"), e17.ns.is("leaf", e17.node.isLeaf), { expanded: !e17.node.isLeaf && e17.expanded } ]), onClick: withModifiers(e17.handleExpandIconClick, ["stop"]) }, { default: withCtx(() => [ (openBlock(), createBlock(resolveDynamicComponent(e17.tree.props.icon || e17.CaretRight))) ]), _: 1 }, 8, ["class", "onClick"])) : createCommentVNode("v-if", true), e17.showCheckbox ? (openBlock(), createBlock(s, { key: 1, "model-value": e17.node.checked, indeterminate: e17.node.indeterminate, disabled: !!e17.node.disabled, onClick: withModifiers(() => { }, ["stop"]), onChange: e17.handleCheckChange }, null, 8, ["model-value", "indeterminate", "disabled", "onClick", "onChange"])) : createCommentVNode("v-if", true), e17.node.loading ? (openBlock(), createBlock(i, { key: 2, class: normalizeClass([e17.ns.be("node", "loading-icon"), e17.ns.is("loading")]) }, { default: withCtx(() => [ createVNode(u) ]), _: 1 }, 8, ["class"])) : createCommentVNode("v-if", true), createVNode(l, { node: e17.node, "render-content": e17.renderContent }, null, 8, ["node", "render-content"]) ], 6), createVNode(d, null, { default: withCtx(() => [ !e17.renderAfterExpand || e17.childNodeRendered ? withDirectives((openBlock(), createElementBlock("div", { key: 0, class: normalizeClass(e17.ns.be("node", "children")), role: "group", "aria-expanded": e17.expanded }, [ (openBlock(true), createElementBlock(Fragment, null, renderList(e17.node.childNodes, (f) => (openBlock(), createBlock(c, { key: e17.getNodeKey(f), "render-content": e17.renderContent, "render-after-expand": e17.renderAfterExpand, "show-checkbox": e17.showCheckbox, node: f, accordion: e17.accordion, props: e17.props, onNodeExpand: e17.handleChildNodeExpand }, null, 8, ["render-content", "render-after-expand", "show-checkbox", "node", "accordion", "props", "onNodeExpand"]))), 128)) ], 10, ["aria-expanded"])), [ [vShow, e17.expanded] ]) : createCommentVNode("v-if", true) ]), _: 1 }) ], 42, ["aria-expanded", "aria-disabled", "aria-checked", "draggable", "data-key", "onClick", "onContextmenu", "onDragstart", "onDragover", "onDragend", "onDrop"])), [ [vShow, e17.node.visible] ]); } var Mre = bt(Rre, [["render", Bre], ["__file", "tree-node.vue"]]); function zre({ el$: e17 }, t) { const n = wt("tree"), r = shallowRef([]), o = shallowRef([]); onMounted(() => { a(); }), onUpdated(() => { r.value = Array.from(e17.value.querySelectorAll("[role=treeitem]")), o.value = Array.from(e17.value.querySelectorAll("input[type=checkbox]")); }), watch(o, (i) => { i.forEach((s) => { s.setAttribute("tabindex", "-1"); }); }), Qr(e17, "keydown", (i) => { const s = i.target; if (!s.className.includes(n.b("node"))) return; const u = i.code; r.value = Array.from(e17.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(e17.value.querySelectorAll(`.${n.is("focusable")}[role=treeitem]`)), o.value = Array.from(e17.value.querySelectorAll("input[type=checkbox]")); const s = e17.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"); }; } var Vre = defineComponent({ name: "ElTree", components: { ElTreeNode: Mre }, props: { data: { type: Array, default: () => [] }, emptyText: { type: String }, renderAfterExpand: { type: Boolean, default: true }, nodeKey: String, checkStrictly: Boolean, defaultExpandAll: Boolean, expandOnClickNode: { type: Boolean, default: true }, checkOnClickNode: Boolean, checkDescendants: { type: Boolean, default: false }, autoExpandParent: { type: Boolean, default: true }, defaultCheckedKeys: Array, defaultExpandedKeys: Array, currentNodeKey: [String, Number], renderContent: Function, showCheckbox: { type: Boolean, default: false }, draggable: { type: Boolean, default: false }, allowDrag: Function, allowDrop: Function, props: { type: Object, default: () => ({ children: "children", label: "label", disabled: "disabled" }) }, lazy: { type: Boolean, default: false }, 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(e17, t) { const { t: n } = Uc(), r = wt("tree"), o = inject(Yc, null), a = ref(new Ire({ key: e17.nodeKey, data: e17.data, lazy: e17.lazy, props: e17.props, load: e17.load, currentNodeKey: e17.currentNodeKey, checkStrictly: e17.checkStrictly, checkDescendants: e17.checkDescendants, defaultCheckedKeys: e17.defaultCheckedKeys, defaultExpandedKeys: e17.defaultExpandedKeys, autoExpandParent: e17.autoExpandParent, defaultExpandAll: e17.defaultExpandAll, filterNodeMethod: e17.filterNodeMethod })); a.value.initialize(); const i = ref(a.value.root), s = ref(null), u = ref(null), l = ref(null), { broadcastExpanded: c } = UE(e17), { dragState: d } = Dre({ props: e17, ctx: t, el$: u, dropIndicator$: l, store: a }); zre({ el$: u }, a); const f = computed(() => { const { childNodes: R } = i.value, W = o ? o.hasFilteredOptions !== 0 : false; return (!R || R.length === 0 || R.every(({ visible: oe }) => !oe)) && !W; }); watch(() => e17.currentNodeKey, (R) => { a.value.setCurrentNodeKey(R); }), watch(() => e17.defaultCheckedKeys, (R) => { a.value.setDefaultCheckedKey(R); }), watch(() => e17.defaultExpandedKeys, (R) => { a.value.setDefaultExpandedKeys(R); }), watch(() => e17.data, (R) => { a.value.setData(R); }, { deep: true }), watch(() => e17.checkStrictly, (R) => { a.value.checkStrictly = R; }); const h10 = (R) => { if (!e17.filterNodeMethod) throw new Error("[Tree] filterNodeMethod is required when filter"); a.value.filter(R); }, p = (R) => dy(e17.nodeKey, R.data), v = (R) => { if (!e17.nodeKey) throw new Error("[Tree] nodeKey is required in getNodePath"); const W = a.value.getNode(R); if (!W) return []; const oe = [W.data]; let Q = W.parent; for (; Q && Q !== i.value; ) oe.push(Q.data), Q = Q.parent; return oe.reverse(); }, m = (R, W) => a.value.getCheckedNodes(R, W), g = (R) => a.value.getCheckedKeys(R), b = () => { const R = a.value.getCurrentNode(); return R ? R.data : null; }, x = () => { if (!e17.nodeKey) throw new Error("[Tree] nodeKey is required in getCurrentKey"); const R = b(); return R ? R[e17.nodeKey] : null; }, w = (R, W) => { if (!e17.nodeKey) throw new Error("[Tree] nodeKey is required in setCheckedNodes"); a.value.setCheckedNodes(R, W); }, C = (R, W) => { if (!e17.nodeKey) throw new Error("[Tree] nodeKey is required in setCheckedKeys"); a.value.setCheckedKeys(R, W); }, k = (R, W, oe) => { a.value.setChecked(R, W, oe); }, E = () => a.value.getHalfCheckedNodes(), S = () => a.value.getHalfCheckedKeys(), O = (R, W = true) => { if (!e17.nodeKey) throw new Error("[Tree] nodeKey is required in setCurrentNode"); F0(a, t.emit, () => { c(R), a.value.setUserCurrentNode(R, W); }); }, F = (R, W = true) => { if (!e17.nodeKey) throw new Error("[Tree] nodeKey is required in setCurrentKey"); F0(a, t.emit, () => { c(), a.value.setCurrentNodeKey(R, W); }); }, $ = (R) => a.value.getNode(R), A = (R) => { a.value.remove(R); }, L = (R, W) => { a.value.append(R, W); }, N = (R, W) => { a.value.insertBefore(R, W); }, M = (R, W) => { a.value.insertAfter(R, W); }, I = (R, W, oe) => { c(W), t.emit("node-expand", R, W, oe); }, z = (R, W) => { if (!e17.nodeKey) throw new Error("[Tree] nodeKey is required in updateKeyChild"); a.value.updateChildren(R, W); }; return provide("RootTree", { ctx: t, props: e17, store: a, root: i, currentNode: s, instance: getCurrentInstance() }), provide(dc, void 0), { ns: r, store: a, root: i, currentNode: s, dragState: d, el$: u, dropIndicator$: l, isEmpty: f, filter: h10, 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(e17, t, n, r, o, a) { const i = resolveComponent("el-tree-node"); return openBlock(), createElementBlock("div", { ref: "el$", class: normalizeClass([ e17.ns.b(), e17.ns.is("dragging", !!e17.dragState.draggingNode), e17.ns.is("drop-not-allow", !e17.dragState.allowDrop), e17.ns.is("drop-inner", e17.dragState.dropType === "inner"), { [e17.ns.m("highlight-current")]: e17.highlightCurrent } ]), role: "tree" }, [ (openBlock(true), createElementBlock(Fragment, null, renderList(e17.root.childNodes, (s) => (openBlock(), createBlock(i, { key: e17.getNodeKey(s), node: s, props: e17.props, accordion: e17.accordion, "render-after-expand": e17.renderAfterExpand, "show-checkbox": e17.showCheckbox, "render-content": e17.renderContent, onNodeExpand: e17.handleNodeExpand }, null, 8, ["node", "props", "accordion", "render-after-expand", "show-checkbox", "render-content", "onNodeExpand"]))), 128)), e17.isEmpty ? (openBlock(), createElementBlock("div", { key: 0, class: normalizeClass(e17.ns.e("empty-block")) }, [ renderSlot(e17.$slots, "empty", {}, () => { var s; return [ createBaseVNode("span", { class: normalizeClass(e17.ns.e("empty-text")) }, toDisplayString((s = e17.emptyText) != null ? s : e17.t("el.tree.emptyText")), 3) ]; }) ], 2)) : createCommentVNode("v-if", true), withDirectives(createBaseVNode("div", { ref: "dropIndicator$", class: normalizeClass(e17.ns.e("drop-indicator")) }, null, 2), [ [vShow, e17.dragState.showDropIndicator] ]) ], 2); } var Hre = bt(Vre, [["render", jre], ["__file", "tree.vue"]]); jn(Hre); function Ure(e17) { let t; const n = ref(false), r = reactive({ ...e17, originalPosition: "", originalOverflow: "", visible: false }); function o(f) { r.text = f; } function a() { const f = r.parent, h10 = 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, h10.bm("parent", "relative")), f.removeAttribute("loading-number")), os(f, h10.bm("parent", "hidden")); } i(), c.unmount(); } function i() { var f, h10; (h10 = (f = d.$el) == null ? void 0 : f.parentNode) == null || h10.removeChild(d.$el); } function s() { var f; e17.beforeClose && !e17.beforeClose() || (n.value = true, clearTimeout(t), t = setTimeout(u, 400), r.visible = false, (f = e17.closed) == null || f.call(e17)); } function u() { if (!n.value) return; const f = r.parent; n.value = false, f.vLoadingAddClassList = void 0, a(); } const l = defineComponent({ name: "ElLoading", setup(f, { expose: h10 }) { const { ns: p, zIndex: v } = AQ("loading"); return h10({ ns: p, zIndex: v }), () => { const m = r.spinner || r.svg, g = h("svg", { class: "circular", viewBox: r.svgViewBox ? r.svgViewBox : "0 0 50 50", ...m ? { innerHTML: m } : {} }, [ h("circle", { class: "path", cx: "25", cy: "25", r: "20", fill: "none" }) ]), b = r.text ? h("p", { class: p.b("text") }, [r.text]) : void 0; return h(Transition, { name: p.b("fade"), onAfterLeave: u }, { default: withCtx(() => [ withDirectives(createVNode("div", { style: { backgroundColor: r.background || "" }, class: [ p.b("mask"), r.customClass, r.fullscreen ? "is-fullscreen" : "" ] }, [ h("div", { class: p.b("spinner") }, [g, b]) ]), [[vShow, r.visible]]) ]) }); }; } }), c = createApp(l), d = c.mount(document.createElement("div")); return { ...toRefs(r), setText: o, removeElLoadingChild: i, close: s, handleAfterLeave: u, vm: d, get $el() { return d.$el; } }; } var Rd; var qre = function(e17 = {}) { if (!_n) return; const t = Wre(e17); 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), nextTick(() => n.visible.value = t.visible), t.fullscreen && (Rd = n), n; }; var Wre = (e17) => { var t, n, r, o; let a; return ur(e17.target) ? a = (t = document.querySelector(e17.target)) != null ? t : document.body : a = e17.target || document.body, { parent: a === document.body || e17.body ? document.body : a, background: e17.background || "", svg: e17.svg || "", svgViewBox: e17.svgViewBox || "", spinner: e17.spinner || false, text: e17.text || "", fullscreen: a === document.body && ((n = e17.fullscreen) != null ? n : true), lock: (r = e17.lock) != null ? r : false, customClass: e17.customClass || "", visible: (o = e17.visible) != null ? o : true, beforeClose: e17.beforeClose, closed: e17.closed, target: a }; }; var Kre = async (e17, t, n) => { const { nextZIndex: r } = n.vm.zIndex || n.vm._.exposed.zIndex, o = {}; if (e17.fullscreen) n.originalPosition.value = vu(document.body, "position"), n.originalOverflow.value = vu(document.body, "overflow"), o.zIndex = r(); else if (e17.parent === document.body) { n.originalPosition.value = vu(document.body, "position"), await nextTick(); for (const a of ["top", "left"]) { const i = a === "top" ? "scrollTop" : "scrollLeft"; o[a] = `${e17.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] = `${e17.target.getBoundingClientRect()[a]}px`; } else n.originalPosition.value = vu(t, "position"); for (const [a, i] of Object.entries(o)) n.$el.style[a] = i; }; var ix = (e17, 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")), e17.fullscreen && e17.lock ? S0(t, r.bm("parent", "hidden")) : os(t, r.bm("parent", "hidden")); }; var fp = Symbol("ElLoading"); var sx = (e17, t) => { var n, r, o, a; const i = t.instance, s = (f) => Gn(t.value) ? t.value[f] : void 0, u = (f) => { const h10 = ur(f) && (i == null ? void 0 : i[f]) || f; return h10 && ref(h10); }, l = (f) => u(s(f) || e17.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 : e17, body: (o = s("body")) != null ? o : t.modifiers.body, lock: (a = s("lock")) != null ? a : t.modifiers.lock }; e17[fp] = { options: d, instance: qre(d) }; }; var Gre = (e17, t) => { for (const n of Object.keys(t)) isRef(t[n]) && (t[n].value = e17[n]); }; var Xre = { mounted(e17, t) { t.value && sx(e17, t); }, updated(e17, t) { const n = e17[fp]; t.oldValue !== t.value && (t.value && !t.oldValue ? sx(e17, t) : t.value && t.oldValue ? Gn(t.value) && Gre(t.value, n.options) : n == null || n.instance.close()); }, unmounted(e17) { var t; (t = e17[fp]) == null || t.instance.close(), e17[fp] = null; } }; var dh = (e17, t) => { const n = e17.__vccOpts || e17; for (const [r, o] of t) n[r] = o; return n; }; var 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: false, evidencePrefixes: ["", "DOI:", "PMID:"], evidencePrefix: "", evidence: [], authenticated: false, newEvidence: "", comment: "", prevSubs: [], showSubmissions: true, 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(e17) { e17 && (this.evidence.push(this.evidencePrefix + e17), this.newEvidence = ""); }, formatTime: function(e17) { const t = { year: "numeric", month: "long", day: "numeric", hour: "numeric", minute: "numeric", second: "numeric" }; return new Date(e17).toLocaleDateString(void 0, t); }, updatePrevSubmissions: function() { var e17; this.$annotator && this.authenticated && this.annotationEntry.resourceId && this.annotationEntry.featureId && ((e17 = this.$annotator) == null || e17.itemAnnotations( this.userApiKey, this.annotationEntry.resourceId, this.annotationEntry.featureId ).then((t) => { this.prevSubs = t; }).catch((t) => { console.log(t); })); }, submit: function() { var e17; 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), (e17 = this.$annotator) == null || e17.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(e17) { this.evidence.splice(e17, 1); }, resetSubmission: function() { this.editing = false, this.evidence = [], this.newFeature = "", this.comment = ""; } }, watch: { annotationEntry: { handler: function(e17, t) { e17 !== t && (this.resetSubmission(), this.updatePrevSubmissions()); }, immediate: false, deep: false } }, mounted: function() { var e17; (e17 = this.$annotator) == null || e17.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 = true, this.updatePrevSubmissions()) : this.errorMessage = ""; }); } }; var Fs = (e17) => (pushScopeId("data-v-9930ef40"), e17 = e17(), popScopeId(), e17); var Zre = { class: "block" }; var Jre = Fs(() => createBaseVNode("div", { class: "title" }, "Feature Annotations", -1)); var Qre = Fs(() => createBaseVNode("strong", { class: "sub-title" }, "Previous submissions:", -1)); var eoe = Fs(() => createBaseVNode("strong", null, "Evidence: ", -1)); var toe = ["href"]; var noe = Fs(() => createBaseVNode("strong", null, "Comment: ", -1)); var roe = Fs(() => createBaseVNode("strong", { class: "sub-title" }, "Suggest changes:", -1)); var ooe = Fs(() => createBaseVNode("strong", null, "Evidence:", -1)); var aoe = Fs(() => createBaseVNode("strong", null, "Comment:", -1)); var ioe = { class: "sub-title" }; function soe(e17, t, n, r, o, a) { const i = NE, s = CZ, u = lr, l = Vm, c = LZ, d = IZ, f = RZ, h10 = ly, p = Yp, v = kre, m = xre, g = uh, b = gs, x = uy; return openBlock(), createBlock(x, { class: "main" }, { default: withCtx(() => [ createBaseVNode("div", Zre, [ createVNode(i, { class: "info-field" }, { default: withCtx(() => [ Jre ]), _: 1 }), n.annotationEntry ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [ (openBlock(true), createElementBlock(Fragment, null, renderList(e17.displayPair, (w, C) => withDirectives((openBlock(), createBlock(i, { class: "dialog-text", key: w }, { default: withCtx(() => [ createBaseVNode("strong", null, toDisplayString(C) + ": ", 1), createTextVNode(" " + toDisplayString(n.annotationEntry[w]), 1) ]), _: 2 }, 1024)), [ [vShow, n.annotationEntry[w]] ])), 128)), e17.prevSubs.length > 0 ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [ withDirectives(createBaseVNode("div", { class: "hide", onClick: t[0] || (t[0] = (w) => e17.showSubmissions = false) }, [ createTextVNode(" Hide previous submissions "), createVNode(u, null, { default: withCtx(() => [ createVNode(s) ]), _: 1 }) ], 512), [ [vShow, e17.showSubmissions] ]), withDirectives(createBaseVNode("div", { class: "hide", onClick: t[1] || (t[1] = (w) => e17.showSubmissions = true) }, [ createTextVNode(" Show previous " + toDisplayString(e17.prevSubs.length) + " submission(s) ", 1), createVNode(u, null, { default: withCtx(() => [ createVNode(l) ]), _: 1 }) ], 512), [ [vShow, !e17.showSubmissions] ]), e17.showSubmissions ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [ createVNode(i, { class: "dialog-spacer" }), createVNode(i, { class: "dialog-text" }, { default: withCtx(() => [ Qre ]), _: 1 }), (openBlock(true), createElementBlock(Fragment, null, renderList(e17.prevSubs, (w, C) => (openBlock(), createElementBlock("div", { class: "entry", key: C }, [ createVNode(i, { class: "dialog-text" }, { default: withCtx(() => [ createBaseVNode("strong", null, toDisplayString(a.formatTime(w.created)), 1), createTextVNode(" " + toDisplayString(w.creator.name), 1) ]), _: 2 }, 1024), createVNode(i, { class: "dialog-text" }, { default: withCtx(() => [ eoe, (openBlock(true), createElementBlock(Fragment, null, renderList(w.body.evidence, (k) => (openBlock(), createBlock(i, { key: k, class: "dialog-text" }, { default: withCtx(() => [ createBaseVNode("a", { href: k, target: "_blank" }, toDisplayString(k), 9, toe) ]), _: 2 }, 1024))), 128)) ]), _: 2 }, 1024), createVNode(i, { class: "dialog-text" }, { default: withCtx(() => [ noe, createTextVNode(" " + toDisplayString(w.body.comment), 1) ]), _: 2 }, 1024) ]))), 128)) ], 64)) : createCommentVNode("", true) ], 64)) : createCommentVNode("", true), e17.authenticated ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [ a.isEditable ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [ createVNode(i, { class: "dialog-spacer" }), e17.editing ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [ createVNode(i, { class: "dialog-text" }, { default: withCtx(() => [ roe ]), _: 1 }), a.isDeleted ? createCommentVNode("", true) : (openBlock(), createElementBlock(Fragment, { key: 0 }, [ createVNode(i, { class: "dialog-text" }, { default: withCtx(() => [ ooe ]), _: 1 }), (openBlock(true), createElementBlock(Fragment, null, renderList(e17.evidence, (w, C) => (openBlock(), createBlock(i, { key: w }, { default: withCtx(() => [ createVNode(h10, { span: 20 }, { default: withCtx(() => [ createTextVNode(toDisplayString(e17.evidence[C]), 1) ]), _: 2 }, 1024), createVNode(h10, { span: 4 }, { default: withCtx(() => [ createVNode(u, { class: "standard-icon" }, { default: withCtx(() => [ createVNode(p, { onClick: (k) => a.removeEvidence(C) }, null, 8, ["onClick"]) ]), _: 2 }, 1024) ]), _: 2 }, 1024) ]), _: 2 }, 1024))), 128)), createVNode(i, null, { default: withCtx(() => [ createVNode(g, { size: "small", placeholder: "Enter", modelValue: e17.newEvidence, "onUpdate:modelValue": t[4] || (t[4] = (w) => e17.newEvidence = w), onChange: t[5] || (t[5] = (w) => a.evidenceEntered(w)) }, { prepend: withCtx(() => [ createVNode(m, { teleported: false, modelValue: e17.evidencePrefix, "onUpdate:modelValue": t[3] || (t[3] = (w) => e17.evidencePrefix = w), placeholder: "No Prefix", class: "select-box", "popper-class": "flatmap_dropdown" }, { default: withCtx(() => [ (openBlock(true), createElementBlock(Fragment, null, renderList(e17.evidencePrefixes, (w) => (openBlock(), createBlock(v, { key: w, label: w, value: w }, { default: withCtx(() => [ createVNode(i, null, { default: withCtx(() => [ createVNode(h10, { span: 12 }, { default: withCtx(() => [ createTextVNode(toDisplayString(w), 1) ]), _: 2 }, 1024) ]), _: 2 }, 1024) ]), _: 2 }, 1032, ["label", "value"]))), 128)) ]), _: 1 }, 8, ["modelValue"]) ]), _: 1 }, 8, ["modelValue"]) ]), _: 1 }) ], 64)), createVNode(i, null, { default: withCtx(() => [ aoe ]), _: 1 }), createVNode(i, { class: "dialog-text" }, { default: withCtx(() => [ createVNode(g, { type: "textarea", autosize: { minRows: 2, maxRows: 4 }, placeholder: "Enter", modelValue: e17.comment, "onUpdate:modelValue": t[6] || (t[6] = (w) => e17.comment = w) }, null, 8, ["modelValue"]) ]), _: 1 }), createVNode(i, { class: "dialog-text" }, { default: withCtx(() => [ createVNode(b, { class: "button", type: "primary", plain: "", onClick: a.submit }, { default: withCtx(() => [ createTextVNode(" Submit ") ]), _: 1 }, 8, ["onClick"]) ]), _: 1 }) ], 64)) : (openBlock(), createBlock(i, { key: 0 }, { default: withCtx(() => [ createVNode(u, { class: "standard-icon" }, { default: withCtx(() => [ createVNode(c, { onClick: t[2] || (t[2] = (w) => e17.editing = true) }) ]), _: 1 }), a.isDeleted ? (openBlock(), createBlock(u, { key: 0, class: "standard-icon" }, { default: withCtx(() => [ createVNode(d, { onClick: a.submit }, null, 8, ["onClick"]) ]), _: 1 })) : a.isPositionUpdated ? (openBlock(), createBlock(u, { key: 1, class: "standard-icon" }, { default: withCtx(() => [ createVNode(f, { onClick: a.submit }, null, 8, ["onClick"]) ]), _: 1 })) : createCommentVNode("", true) ]), _: 1 })), e17.errorMessage ? (openBlock(), createBlock(i, { key: 2, class: "dialog-text" }, { default: withCtx(() => [ createBaseVNode("strong", ioe, toDisplayString(e17.errorMessage), 1) ]), _: 1 })) : createCommentVNode("", true) ], 64)) : createCommentVNode("", true) ], 64)) : createCommentVNode("", true) ], 64)) : createCommentVNode("", true) ]) ]), _: 1 }); } var loe = dh(Yre, [["render", soe], ["__scopeId", "data-v-9930ef40"]]); var 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(e17, t) { this.group = e17, t !== void 0 && this.$emit("cancel-create"); }, immediate: true } }, computed: { confirmText: function() { return this.createData.editingIndex > -1 ? "Edit" : "Confirm"; } }, data: function() { return { group: "default", region: "", showPoint: false }; }, 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"); } } }; var coe = (e17) => (pushScopeId("data-v-d61c5879"), e17 = e17(), popScopeId(), e17); var doe = coe(() => createBaseVNode("span", { class: "create-text" }, " Primitives will be created in the __annotation region ", -1)); function poe(e17, t, n, r, o, a) { const i = VE, s = ly, u = NE, l = uh, c = gs, d = uy, f = zE; return openBlock(), createBlock(f, { class: "create-container" }, { default: withCtx(() => [ createVNode(i, { height: "30px", class: "header" }, { default: withCtx(() => [ createBaseVNode("div", null, "Create " + toDisplayString(n.createData.shape), 1) ]), _: 1 }), createVNode(d, { class: "slides-block" }, { default: withCtx(() => [ doe, withDirectives(createVNode(u, { class: "row" }, { default: withCtx(() => [ createVNode(s, { offset: 0, span: 8 }, { default: withCtx(() => [ createTextVNode(" Position: ") ]), _: 1 }), createVNode(s, { offset: 0, span: 16 }, { default: withCtx(() => [ (openBlock(true), createElementBlock(Fragment, null, renderList(n.createData.points, ({ value: h10, i: p }) => (openBlock(), createBlock(u, { key: p, class: "value" }, { default: withCtx(() => [ createTextVNode(toDisplayString(p), 1) ]), _: 2 }, 1024))), 128)) ]), _: 1 }) ]), _: 1 }, 512), [ [vShow, e17.showPoint] ]), createVNode(u, { class: "row" }, { default: withCtx(() => [ createVNode(s, { offset: 0, span: 8 }, { default: withCtx(() => [ createTextVNode(" Region: ") ]), _: 1 }), createVNode(s, { offset: 0, span: 16 }, { default: withCtx(() => [ createVNode(l, { modelValue: e17.region, "onUpdate:modelValue": t[0] || (t[0] = (h10) => e17.region = h10), placeholder: "__annotation", size: "small" }, null, 8, ["modelValue"]) ]), _: 1 }) ]), _: 1 }), createVNode(u, { class: "row" }, { default: withCtx(() => [ createVNode(s, { offset: 0, span: 8 }, { default: withCtx(() => [ createTextVNode(" Group: ") ]), _: 1 }), createVNode(s, { offset: 0, span: 16 }, { default: withCtx(() => [ createVNode(l, { modelValue: e17.group, "onUpdate:modelValue": t[1] || (t[1] = (h10) => e17.group = h10), placeholder: n.createData.shape, size: "small" }, null, 8, ["modelValue", "placeholder"]) ]), _: 1 }) ]), _: 1 }), createVNode(u, null, { default: withCtx(() => [ createVNode(s, { offset: 0, span: 12 }, { default: withCtx(() => [ createVNode(c, { type: "primary", plain: "", onClick: a.confirm }, { default: withCtx(() => [ createTextVNode(toDisplayString(a.confirmText), 1) ]), _: 1 }, 8, ["onClick"]) ]), _: 1 }), createVNode(s, { offset: 0, span: 12 }, { default: withCtx(() => [ createVNode(c, { type: "primary", plain: "", onClick: a.cancel }, { default: withCtx(() => [ createTextVNode(" Cancel ") ]), _: 1 }, 8, ["onClick"]) ]), _: 1 }) ]), _: 1 }) ]), _: 1 }) ]), _: 1 }); } var foe = dh(uoe, [["render", poe], ["__scopeId", "data-v-d61c5879"]]); function Dn(e17) { "@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(e17); } function py(e17, t) { if (!(e17 instanceof t)) throw new TypeError("Cannot call a class as a function"); } function hoe(e17, t) { for (var n = 0; n < t.length; n++) { var r = t[n]; r.enumerable = r.enumerable || false, r.configurable = true, "value" in r && (r.writable = true), Object.defineProperty(e17, r.key, r); } } function fy(e17, t, n) { return t && hoe(e17.prototype, t), Object.defineProperty(e17, "prototype", { writable: false }), e17; } function WE(e17, t, n) { return t in e17 ? Object.defineProperty(e17, t, { value: n, enumerable: true, configurable: true, writable: true }) : e17[t] = n, e17; } function Co(e17, t) { return voe(e17) || goe(e17, t) || KE(e17, t) || moe(); } function voe(e17) { if (Array.isArray(e17)) return e17; } function goe(e17, t) { var n = e17 == null ? null : typeof Symbol < "u" && e17[Symbol.iterator] || e17["@@iterator"]; if (n != null) { var r = [], o = true, a = false, i, s; try { for (n = n.call(e17); !(o = (i = n.next()).done) && (r.push(i.value), !(t && r.length === t)); o = true) ; } catch (u) { a = true, s = u; } finally { try { !o && n.return != null && n.return(); } finally { if (a) throw s; } } return r; } } function KE(e17, t) { if (e17) { if (typeof e17 == "string") return lx(e17, t); var n = Object.prototype.toString.call(e17).slice(8, -1); if (n === "Object" && e17.constructor && (n = e17.constructor.name), n === "Map" || n === "Set") return Array.from(e17); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return lx(e17, t); } } function lx(e17, t) { (t == null || t > e17.length) && (t = e17.length); for (var n = 0, r = new Array(t); n < t; n++) r[n] = e17[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(e17, t) { var n = typeof Symbol < "u" && e17[Symbol.iterator] || e17["@@iterator"]; if (!n) { if (Array.isArray(e17) || (n = KE(e17)) || t) { n && (e17 = n); var r = 0, o = function() { }; return { s: o, n: function() { return r >= e17.length ? { done: true } : { done: false, value: e17[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 = true, i = false, s; return { s: function() { n = n.call(e17); }, n: function() { var u = n.next(); return a = u.done, u; }, e: function(u) { i = true, s = u; }, f: function() { try { !a && n.return != null && n.return(); } finally { if (i) throw s; } } }; } var An = typeof window > "u" ? null : window; var ux = An ? An.navigator : null; An && An.document; var yoe = Dn(""); var XE = Dn({}); var boe = Dn(function() { }); var woe = typeof HTMLElement > "u" ? "undefined" : Dn(HTMLElement); var Zc = function(e17) { return e17 && e17.instanceString && dn(e17.instanceString) ? e17.instanceString() : null; }; var at = function(e17) { return e17 != null && Dn(e17) == yoe; }; var dn = function(e17) { return e17 != null && Dn(e17) === boe; }; var Gt = function(e17) { return !Wr(e17) && (Array.isArray ? Array.isArray(e17) : e17 != null && e17 instanceof Array); }; var It = function(e17) { return e17 != null && Dn(e17) === XE && !Gt(e17) && e17.constructor === Object; }; var xoe = function(e17) { return e17 != null && Dn(e17) === XE; }; var Ve = function(e17) { return e17 != null && Dn(e17) === Dn(1) && !isNaN(e17); }; var koe = function(e17) { return Ve(e17) && Math.floor(e17) === e17; }; var Qp = function(e17) { if (woe !== "undefined") return e17 != null && e17 instanceof HTMLElement; }; var Wr = function(e17) { return Jc(e17) || YE(e17); }; var Jc = function(e17) { return Zc(e17) === "collection" && e17._private.single; }; var YE = function(e17) { return Zc(e17) === "collection" && !e17._private.single; }; var hy = function(e17) { return Zc(e17) === "core"; }; var ZE = function(e17) { return Zc(e17) === "stylesheet"; }; var Coe = function(e17) { return Zc(e17) === "event"; }; var mi = function(e17) { return e17 == null ? true : !!(e17 === "" || e17.match(/^\s+$/)); }; var Eoe = function(e17) { return typeof HTMLElement > "u" ? false : e17 instanceof HTMLElement; }; var Soe = function(e17) { return It(e17) && Ve(e17.x1) && Ve(e17.x2) && Ve(e17.y1) && Ve(e17.y2); }; var _oe = function(e17) { return xoe(e17) && dn(e17.then); }; var Toe = function() { return ux && ux.userAgent.match(/msie|trident|edge/i); }; var hc = function(e17, 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] = e17.apply(o, a)), i; }; return n.cache = {}, n; }; var vy = hc(function(e17) { return e17.replace(/([A-Z])/g, function(t) { return "-" + t.toLowerCase(); }); }); var ph = hc(function(e17) { return e17.replace(/(-\w)/g, function(t) { return t[1].toUpperCase(); }); }); var JE = hc(function(e17, t) { return e17 + t[0].toUpperCase() + t.substring(1); }, function(e17, t) { return e17 + "$" + t; }); var cx = function(e17) { return mi(e17) ? e17 : e17.charAt(0).toUpperCase() + e17.substring(1); }; var Ln = "(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))"; var Ooe = "rgb[a]?\\((" + Ln + "[%]?)\\s*,\\s*(" + Ln + "[%]?)\\s*,\\s*(" + Ln + "[%]?)(?:\\s*,\\s*(" + Ln + "))?\\)"; var Poe = "rgb[a]?\\((?:" + Ln + "[%]?)\\s*,\\s*(?:" + Ln + "[%]?)\\s*,\\s*(?:" + Ln + "[%]?)(?:\\s*,\\s*(?:" + Ln + "))?\\)"; var $oe = "hsl[a]?\\((" + Ln + ")\\s*,\\s*(" + Ln + "[%])\\s*,\\s*(" + Ln + "[%])(?:\\s*,\\s*(" + Ln + "))?\\)"; var Aoe = "hsl[a]?\\((?:" + Ln + ")\\s*,\\s*(?:" + Ln + "[%])\\s*,\\s*(?:" + Ln + "[%])(?:\\s*,\\s*(?:" + Ln + "))?\\)"; var Foe = "\\#[0-9a-fA-F]{3}"; var Ioe = "\\#[0-9a-fA-F]{6}"; var QE = function(e17, t) { return e17 < t ? -1 : e17 > t ? 1 : 0; }; var Noe = function(e17, t) { return -1 * QE(e17, t); }; var ct = Object.assign != null ? Object.assign.bind(Object) : function(e17) { 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]; e17[i] = r[i]; } } return e17; }; var Loe = function(e17) { if (!(!(e17.length === 4 || e17.length === 7) || e17[0] !== "#")) { var t = e17.length === 4, n, r, o, a = 16; return t ? (n = parseInt(e17[1] + e17[1], a), r = parseInt(e17[2] + e17[2], a), o = parseInt(e17[3] + e17[3], a)) : (n = parseInt(e17[1] + e17[2], a), r = parseInt(e17[3] + e17[4], a), o = parseInt(e17[5] + e17[6], a)), [n, r, o]; } }; var Doe = function(e17) { var t, n, r, o, a, i, s, u; function l(h10, p, v) { return v < 0 && (v += 1), v > 1 && (v -= 1), v < 1 / 6 ? h10 + (p - h10) * 6 * v : v < 1 / 2 ? p : v < 2 / 3 ? h10 + (p - h10) * (2 / 3 - v) * 6 : h10; } var c = new RegExp("^" + $oe + "$").exec(e17); 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; }; var Roe = function(e17) { var t, n = new RegExp("^" + Ooe + "$").exec(e17); if (n) { t = []; for (var r = [], o = 1; o <= 3; o++) { var a = n[o]; if (a[a.length - 1] === "%" && (r[o] = true), 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; }; var Boe = function(e17) { return zoe[e17.toLowerCase()]; }; var Moe = function(e17) { return (Gt(e17) ? e17 : null) || Boe(e17) || Loe(e17) || Roe(e17) || Doe(e17); }; var 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] }; var eS = function(e17) { for (var t = e17.map, n = e17.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] = e17.value; } }; var tS = function(e17) { for (var t = e17.map, n = e17.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(e17) { var t = typeof e17; return e17 != null && (t == "object" || t == "function"); } var ms = Voe; var _u = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}; function joe(e17, t) { return t = { exports: {} }, e17(t, t.exports), t.exports; } var Hoe = typeof _u == "object" && _u && _u.Object === Object && _u; var Uoe = Hoe; var qoe = typeof self == "object" && self && self.Object === Object && self; var Woe = Uoe || qoe || Function("return this")(); var fh = Woe; var Koe = function() { return fh.Date.now(); }; var Ev = Koe; var Goe = /\s/; function Xoe(e17) { for (var t = e17.length; t-- && Goe.test(e17.charAt(t)); ) ; return t; } var Yoe = Xoe; var Zoe = /^\s+/; function Joe(e17) { return e17 && e17.slice(0, Yoe(e17) + 1).replace(Zoe, ""); } var Qoe = Joe; var eae = fh.Symbol; var Al = eae; var nS = Object.prototype; var tae = nS.hasOwnProperty; var nae = nS.toString; var yu = Al ? Al.toStringTag : void 0; function rae(e17) { var t = tae.call(e17, yu), n = e17[yu]; try { e17[yu] = void 0; var r = true; } catch { } var o = nae.call(e17); return r && (t ? e17[yu] = n : delete e17[yu]), o; } var oae = rae; var aae = Object.prototype; var iae = aae.toString; function sae(e17) { return iae.call(e17); } var lae = sae; var uae = "[object Null]"; var cae = "[object Undefined]"; var dx = Al ? Al.toStringTag : void 0; function dae(e17) { return e17 == null ? e17 === void 0 ? cae : uae : dx && dx in Object(e17) ? oae(e17) : lae(e17); } var rS = dae; function pae(e17) { return e17 != null && typeof e17 == "object"; } var fae = pae; var hae = "[object Symbol]"; function vae(e17) { return typeof e17 == "symbol" || fae(e17) && rS(e17) == hae; } var Qc = vae; var px = NaN; var gae = /^[-+]0x[0-9a-f]+$/i; var mae = /^0b[01]+$/i; var yae = /^0o[0-7]+$/i; var bae = parseInt; function wae(e17) { if (typeof e17 == "number") return e17; if (Qc(e17)) return px; if (ms(e17)) { var t = typeof e17.valueOf == "function" ? e17.valueOf() : e17; e17 = ms(t) ? t + "" : t; } if (typeof e17 != "string") return e17 === 0 ? e17 : +e17; e17 = Qoe(e17); var n = mae.test(e17); return n || yae.test(e17) ? bae(e17.slice(2), n ? 2 : 8) : gae.test(e17) ? px : +e17; } var fx = wae; var xae = "Expected a function"; var kae = Math.max; var Cae = Math.min; function Eae(e17, t, n) { var r, o, a, i, s, u, l = 0, c = false, d = false, f = true; if (typeof e17 != "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 h10(k) { var E = r, S = o; return r = o = void 0, l = k, i = e17.apply(S, E), i; } function p(k) { return l = k, s = setTimeout(g, t), c ? h10(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 ? h10(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), h10(u); } return s === void 0 && (s = setTimeout(g, t)), i; } return C.cancel = x, C.flush = w, C; } var hh = Eae; var Sv = An ? An.performance : null; var oS = Sv && Sv.now ? function() { return Sv.now(); } : function() { return Date.now(); }; var Sae = function() { if (An) { if (An.requestAnimationFrame) return function(e17) { An.requestAnimationFrame(e17); }; if (An.mozRequestAnimationFrame) return function(e17) { An.mozRequestAnimationFrame(e17); }; if (An.webkitRequestAnimationFrame) return function(e17) { An.webkitRequestAnimationFrame(e17); }; if (An.msRequestAnimationFrame) return function(e17) { An.msRequestAnimationFrame(e17); }; } return function(e17) { e17 && setTimeout(function() { e17(oS()); }, 1e3 / 60); }; }(); var ef = function(e17) { return Sae(e17); }; var _a = oS; var el = 9261; var aS = 65599; var Tu = 5381; var iS = function(e17) { for (var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : el, n = t, r; r = e17.next(), !r.done; ) n = n * aS + r.value | 0; return n; }; var vc = function(e17) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : el; return t * aS + e17 | 0; }; var gc = function(e17) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Tu; return (t << 5) + t + e17 | 0; }; var _ae = function(e17, t) { return e17 * 2097152 + t; }; var Ha = function(e17) { return e17[0] * 2097152 + e17[1]; }; var Bd = function(e17, t) { return [vc(e17[0], t[0]), gc(e17[1], t[1])]; }; var Tae = function(e17, t) { var n = { value: 0, done: false }, r = 0, o = e17.length, a = { next: function() { return r < o ? n.value = e17[r++] : n.done = true, n; } }; return iS(a, t); }; var ys = function(e17, t) { var n = { value: 0, done: false }, r = 0, o = e17.length, a = { next: function() { return r < o ? n.value = e17.charCodeAt(r++) : n.done = true, n; } }; return iS(a, t); }; var sS = function() { return Oae(arguments); }; var Oae = function(e17) { for (var t, n = 0; n < e17.length; n++) { var r = e17[n]; n === 0 ? t = ys(r) : t = ys(r, t); } return t; }; var hx = true; var Pae = console.warn != null; var $ae = console.trace != null; var gy = Number.MAX_SAFE_INTEGER || 9007199254740991; var lS = function() { return true; }; var tf = function() { return false; }; var vx = function() { return 0; }; var my = function() { }; var vn = function(e17) { throw new Error(e17); }; var uS = function(e17) { if (e17 !== void 0) hx = !!e17; else return hx; }; var Mt = function(e17) { uS() && (Pae ? console.warn(e17) : (console.log(e17), $ae && console.trace())); }; var Aae = function(e17) { return ct({}, e17); }; var Ko = function(e17) { return e17 == null ? e17 : Gt(e17) ? e17.slice() : It(e17) ? Aae(e17) : e17; }; var Fae = function(e17) { return e17.slice(); }; var cS = function(e17, t) { for ( // loop :) t = e17 = ""; // b - result , a - numeric letiable e17++ < 36; // t += e17 * 51 & 52 ? ( // return a random number or 4 (e17 ^ 15 ? ( // generate a random number from 0 to 15 8 ^ Math.random() * (e17 ^ 20 ? 16 : 4) ) : 4).toString(16) ) : "-" ) ; return t; }; var Iae = {}; var dS = function() { return Iae; }; var nr = function(e17) { var t = Object.keys(e17); 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 ? e17[a] : i; } return r; }; }; var yi = function(e17, t, n) { for (var r = e17.length - 1; r >= 0; r--) e17[r] === t && e17.splice(r, 1); }; var yy = function(e17) { e17.splice(0, e17.length); }; var Nae = function(e17, t) { for (var n = 0; n < t.length; n++) { var r = t[n]; e17.push(r); } }; var _o = function(e17, t, n) { return n && (t = JE(n, t)), e17[t]; }; var ei = function(e17, t, n, r) { n && (t = JE(n, t)), e17[t] = r; }; var Lae = function() { function e17() { py(this, e17), this._obj = {}; } return fy(e17, [{ 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]; } }]), e17; }(); var Go = typeof Map < "u" ? Map : Lae; var Dae = "undefined"; var Rae = function() { function e17(t) { if (py(this, e17), 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(e17, [{ 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); } }]), e17; }(); var Kl = (typeof Set > "u" ? "undefined" : Dn(Set)) !== Dae ? Set : Rae; var vh = function(e17, t) { var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : true; if (e17 === void 0 || t === void 0 || !hy(e17)) { 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: e17, single: true, // 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: false, // 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: true, // 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 ? true : !!t.selectable, // whether it's selectable locked: !!t.locked, // whether the element is locked (cannot be moved) grabbed: false, // whether the element is grabbed by the mouse; renderer sets this privately grabbable: t.grabbable === void 0 ? true : !!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: false, // 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: false, // 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 = e17.pan(), s = e17.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(); }; var gx = function(e17) { return e17 = { bfs: e17.bfs || !e17.dfs, dfs: e17.dfs || !e17.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, h10, 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), e17.bfs && (d[x] = true, u.push(b)), c[x] = 0); } for (var w = function() { var F = e17.bfs ? s.shift() : s.pop(), $ = F.id(); if (e17.dfs) { if (d[$]) return "continue"; d[$] = true, 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 === true) return h10 = F, "break"; if (z === false) return "break"; for (var R = F.connectedEdges().filter(function(pe) { return (!r || pe.source().same(F)) && m.has(pe); }), W = 0; W < R.length; W++) { var oe = R[W], 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), e17.bfs && (d[ae] = true, 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(h10) }; }; }; var mc = { breadthFirstSearch: gx({ bfs: true }), depthFirstSearch: gx({ dfs: true }) }; mc.bfs = mc.breadthFirstSearch; mc.dfs = mc.depthFirstSearch; var Bae = joe(function(e17, t) { (function() { var n, r, o, a, i, s, u, l, c, d, f, h10, 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(); }, h10 = 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 = h10; 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 e17.exports = b(); }(this, function() { return n; }); }).call(_u); }); var ed = Bae; var Mae = nr({ root: null, weight: function(e17) { return 1; }, directed: false }); var zae = { dijkstra: function(e17) { if (!It(e17)) { var t = arguments; e17 = { root: t[0], weight: t[1], directed: t[2] }; } var n = Mae(e17), 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(), h10 = 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 < h10.length; b++) { var x = h10[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, W = 0; W < I.length; W++) { var oe = I[W], 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(h10), 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) ? h10.filter(N)[0] : N[0]; return d[M.id()]; }, pathTo: function(N) { var M = at(N) ? h10.filter(N)[0] : N[0], I = [], z = M, R = z.id(); if (M.length > 0) for (I.unshift(M); c[R]; ) { var W = c[R]; I.unshift(W.edge), I.unshift(W.node), z = W.node, R = z.id(); } return i.spawn(I); } }; } }; var Vae = { // kruskal's algorithm (finds min spanning tree, assuming undirected graph) // implemented from pseudocode from wikipedia kruskal: function(e17) { e17 = e17 || 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 e17(b) - e17(x); }), c = 0; c < l.length; c++) { var d = l[c], f = d.source()[0], h10 = d.target()[0], p = s(f), v = s(h10), m = a[p], g = a[v]; p !== v && (i.merge(d), m.merge(g), a.splice(v, 1)); } return i; } }; var jae = nr({ root: null, goal: null, weight: function(e17) { return 1; }, heuristic: function(e17) { return 0; }, directed: false }); var Hae = { // Implemented from pseudocode from wikipedia aStar: function(e17) { var t = this.cy(), n = jae(e17), 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 = {}, h10 = new ed(function(W, oe) { return d[W.id()] - d[oe.id()]; }), p = new Kl(), v = {}, m = {}, g = function(W, oe) { h10.push(W), p.add(oe); }, b, x, w = function() { b = h10.pop(), x = b.id(), p.delete(x); }, C = function(W) { return p.has(W); }; g(r, u), c[u] = 0, d[u] = a(r); for (var k = 0; h10.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: true, distance: c[x], path: this.spawn(E), steps: k }; } f[x] = true; 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: false, distance: void 0, path: void 0, steps: k }; } }; var Uae = nr({ weight: function(e17) { return 1; }, directed: false }); var qae = { // Implemented from pseudocode from wikipedia floydWarshall: function(e17) { for (var t = this.cy(), n = Uae(e17), 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]; }, h10 = new Array(c), p = 0; p < c; p++) { var v = p % l, m = (p - v) / l; m === v ? h10[p] = 0 : h10[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 (h10[O] > F && (h10[O] = F, g[O] = S, b[O] = w), !o) { var $ = S * l + E; !o && h10[$] > F && (h10[$] = 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; h10[N] + h10[z] < h10[I] && (h10[I] = h10[N] + h10[z], g[I] = g[N]); } var R = function(Q) { return (at(Q) ? t.filter(Q) : Q)[0]; }, W = function(Q) { return d(R(Q)); }, oe = { distance: function(Q, ae) { var pe = W(Q), we = W(ae); return h10[pe * l + we]; }, path: function(Q, ae) { var pe = W(Q), we = W(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 }; var Wae = nr({ weight: function(e17) { return 1; }, directed: false, root: null }); var Kae = { // Implemented from pseudocode from wikipedia bellmanFord: function(e17) { var t = this, n = Wae(e17), 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, h10 = new Go(), p = false, v = []; a = u.collection(a)[0], c.unmergeBy(function(Ae) { return Ae.isLoop(); }); for (var m = c.length, g = function(Ae) { var Be = h10.get(Ae.id()); return Be || (Be = {}, h10.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 = false, 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 = true); }, F = 1; F < f; F++) { S = false; 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 = [], W = 0; W < m; W++) { var oe = c[W], 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 = true), e17.findNegativeWeightCycles !== false) { 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 }; var Gae = Math.sqrt(2); var Xae = function(e17, t, n) { n.length === 0 && vn("Karger-Stein must be run on a connected (sub)graph"); for (var r = n[e17], 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 h10 = 0; h10 < u.length; h10++) { var p = u[h10]; p[1] === s ? (u[h10] = p.slice(), u[h10][1] = i) : p[2] === s && (u[h10] = p.slice(), u[h10][2] = i); } for (var v = 0; v < t.length; v++) t[v] === s && (t[v] = i); return u; }; var _v = function(e17, t, n, r) { for (; n > r; ) { var o = Math.floor(Math.random() * t.length); t = Xae(o, e17, t), n--; } return t; }; var Yae = { // Computes the minimum cut of an undirected graph // Returns the correct answer with high probability kargerStein: function() { var e17 = 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 = [], h10 = new Array(o), p = new Array(o), v = new Array(o), m = function(z, R) { for (var W = 0; W < o; W++) R[W] = z[W]; }, 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, h10)) : k.length <= C.length && k.length < d && (d = k.length, f = k, m(v, h10)); } for (var E = this.spawn(f.map(function(z) { return r[z[0]]; })), S = this.spawn(), O = this.spawn(), F = h10[0], $ = 0; $ < h10.length; $++) { var A = h10[$], L = n[$]; A === F ? S.merge(L) : O.merge(L); } var N = function(z) { var R = e17.spawn(); return z.forEach(function(W) { R.merge(W), W.connectedEdges().forEach(function(oe) { e17.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; } }; var Zae = function(e17) { return { x: e17.x, y: e17.y }; }; var gh = function(e17, t, n) { return { x: e17.x * t + n.x, y: e17.y * t + n.y }; }; var pS = function(e17, t, n) { return { x: (e17.x - n.x) / t, y: (e17.y - n.y) / t }; }; var tl = function(e17) { return { x: e17[0], y: e17[1] }; }; var Jae = function(e17) { for (var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : e17.length, r = 1 / 0, o = t; o < n; o++) { var a = e17[o]; isFinite(a) && (r = Math.min(a, r)); } return r; }; var Qae = function(e17) { for (var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : e17.length, r = -1 / 0, o = t; o < n; o++) { var a = e17[o]; isFinite(a) && (r = Math.max(a, r)); } return r; }; var eie = function(e17) { for (var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : e17.length, r = 0, o = 0, a = t; a < n; a++) { var i = e17[a]; isFinite(i) && (r += i, o++); } return r / o; }; var tie = function(e17) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : e17.length, r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : true, o = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : true, a = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : true; r ? e17 = e17.slice(t, n) : (n < e17.length && e17.splice(n, e17.length - n), t > 0 && e17.splice(0, t)); for (var i = 0, s = e17.length - 1; s >= 0; s--) { var u = e17[s]; a ? isFinite(u) || (e17[s] = -1 / 0, i++) : e17.splice(s, 1); } o && e17.sort(function(d, f) { return d - f; }); var l = e17.length, c = Math.floor(l / 2); return l % 2 !== 0 ? e17[c + 1 + i] : (e17[c - 1 + i] + e17[c + i]) / 2; }; var nie = function(e17) { return Math.PI * e17 / 180; }; var Md = function(e17, t) { return Math.atan2(t, e17) - Math.PI / 2; }; var by = Math.log2 || function(e17) { return Math.log(e17) / Math.log(2); }; var fS = function(e17) { return e17 > 0 ? 1 : e17 < 0 ? -1 : 0; }; var bs = function(e17, t) { return Math.sqrt(zi(e17, t)); }; var zi = function(e17, t) { var n = t.x - e17.x, r = t.y - e17.y; return n * n + r * r; }; var rie = function(e17) { for (var t = e17.length, n = 0, r = 0; r < t; r++) n += e17[r]; for (var o = 0; o < t; o++) e17[o] = e17[o] / n; return e17; }; var Mn = function(e17, t, n, r) { return (1 - r) * (1 - r) * e17 + 2 * (1 - r) * r * t + r * r * n; }; var al = function(e17, t, n, r) { return { x: Mn(e17.x, t.x, n.x, r), y: Mn(e17.y, t.y, n.y, r) }; }; var oie = function(e17, t, n, r) { var o = { x: t.x - e17.x, y: t.y - e17.y }, a = bs(e17, t), i = { x: o.x / a, y: o.y / a }; return n = n ?? 0, r = r ?? n * a, { x: e17.x + i.x * r, y: e17.y + i.y * r }; }; var yc = function(e17, t, n) { return Math.max(e17, Math.min(n, t)); }; var Br = function(e17) { if (e17 == null) return { x1: 1 / 0, y1: 1 / 0, x2: -1 / 0, y2: -1 / 0, w: 0, h: 0 }; if (e17.x1 != null && e17.y1 != null) { if (e17.x2 != null && e17.y2 != null && e17.x2 >= e17.x1 && e17.y2 >= e17.y1) return { x1: e17.x1, y1: e17.y1, x2: e17.x2, y2: e17.y2, w: e17.x2 - e17.x1, h: e17.y2 - e17.y1 }; if (e17.w != null && e17.h != null && e17.w >= 0 && e17.h >= 0) return { x1: e17.x1, y1: e17.y1, x2: e17.x1 + e17.w, y2: e17.y1 + e17.h, w: e17.w, h: e17.h }; } }; var aie = function(e17) { return { x1: e17.x1, x2: e17.x2, w: e17.w, y1: e17.y1, y2: e17.y2, h: e17.h }; }; var iie = function(e17) { e17.x1 = 1 / 0, e17.y1 = 1 / 0, e17.x2 = -1 / 0, e17.y2 = -1 / 0, e17.w = 0, e17.h = 0; }; var sie = function(e17, t, n) { return { x1: e17.x1 + t, x2: e17.x2 + t, y1: e17.y1 + n, y2: e17.y2 + n, w: e17.w, h: e17.h }; }; var hS = function(e17, t) { e17.x1 = Math.min(e17.x1, t.x1), e17.x2 = Math.max(e17.x2, t.x2), e17.w = e17.x2 - e17.x1, e17.y1 = Math.min(e17.y1, t.y1), e17.y2 = Math.max(e17.y2, t.y2), e17.h = e17.y2 - e17.y1; }; var lie = function(e17, t, n) { e17.x1 = Math.min(e17.x1, t), e17.x2 = Math.max(e17.x2, t), e17.w = e17.x2 - e17.x1, e17.y1 = Math.min(e17.y1, n), e17.y2 = Math.max(e17.y2, n), e17.h = e17.y2 - e17.y1; }; var hp = function(e17) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0; return e17.x1 -= t, e17.x2 += t, e17.y1 -= t, e17.y2 += t, e17.w = e17.x2 - e17.x1, e17.h = e17.y2 - e17.y1, e17; }; var vp = function(e17) { 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 e17.x1 -= a, e17.x2 += r, e17.y1 -= n, e17.y2 += o, e17.w = e17.x2 - e17.x1, e17.h = e17.y2 - e17.y1, e17; }; var mx = function(e17, t) { e17.x1 = t.x1, e17.y1 = t.y1, e17.x2 = t.x2, e17.y2 = t.y2, e17.w = e17.x2 - e17.x1, e17.h = e17.y2 - e17.y1; }; var wy = function(e17, t) { return !(e17.x1 > t.x2 || t.x1 > e17.x2 || e17.x2 < t.x1 || t.x2 < e17.x1 || e17.y2 < t.y1 || t.y2 < e17.y1 || e17.y1 > t.y2 || t.y1 > e17.y2); }; var Fl = function(e17, t, n) { return e17.x1 <= t && t <= e17.x2 && e17.y1 <= n && n <= e17.y2; }; var uie = function(e17, t) { return Fl(e17, t.x, t.y); }; var vS = function(e17, t) { return Fl(e17, t.x1, t.y1) && Fl(e17, t.x2, t.y2); }; var gS = function(e17, 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, h10; if (d) { var p = n - l + u - i, v = r - c - i, m = n + l - u + i, g = v; if (h10 = ai(e17, t, n, r, p, v, m, g, false), h10.length > 0) return h10; } if (f) { var b = n + l + i, x = r - c + u - i, w = b, C = r + c - u + i; if (h10 = ai(e17, t, n, r, b, x, w, C, false), h10.length > 0) return h10; } if (d) { var k = n - l + u - i, E = r + c + i, S = n + l - u + i, O = E; if (h10 = ai(e17, t, n, r, k, E, S, O, false), h10.length > 0) return h10; } if (f) { var F = n - l - i, $ = r - c + u - i, A = F, L = r + c - u + i; if (h10 = ai(e17, t, n, r, F, $, A, L, false), h10.length > 0) return h10; } var N; { var M = n - l + u, I = r - c + u; if (N = Ou(e17, 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(e17, t, n, r, z, R, u + i), N.length > 0 && N[0] >= z && N[1] <= R) return [N[0], N[1]]; } { var W = n + l - u, oe = r + c - u; if (N = Ou(e17, t, n, r, W, oe, u + i), N.length > 0 && N[0] >= W && N[1] >= oe) return [N[0], N[1]]; } { var Q = n - l + u, ae = r + c - u; if (N = Ou(e17, t, n, r, Q, ae, u + i), N.length > 0 && N[0] <= Q && N[1] >= ae) return [N[0], N[1]]; } return []; }; var cie = function(e17, 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 <= e17 && e17 <= l + s && c - s <= t && t <= d + s; }; var die = function(e17, 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 !(e17 < l.x1 || e17 > l.x2 || t < l.y1 || t > l.y2); }; var pie = function(e17, t, n, r) { n -= r; var o = t * t - 4 * e17 * n; if (o < 0) return []; var a = Math.sqrt(o), i = 2 * e17, s = (-t + a) / i, u = (-t - a) / i; return [s, u]; }; var fie = function(e17, t, n, r, o) { var a = 1e-5; e17 === 0 && (e17 = a), t /= e17, n /= e17, r /= e17; var i, s, u, l, c, d, f, h10; 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) { h10 = u < 0 ? -Math.pow(-u, 1 / 3) : Math.pow(u, 1 / 3), o[0] = -f + 2 * h10, o[4] = o[2] = -(h10 + f); return; } s = -s, l = s * s * s, l = Math.acos(u / Math.sqrt(l)), h10 = 2 * Math.sqrt(s), o[0] = -f + h10 * Math.cos(l / 3), o[2] = -f + h10 * Math.cos((l + 2 * Math.PI) / 3), o[4] = -f + h10 * Math.cos((l + 4 * Math.PI) / 3); }; var hie = function(e17, 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 * e17 + 2 * o * o + 2 * o * e17 - i * e17 + 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 * e17 - o * e17 + r * a - r * r + r * t - a * t, f = []; fie(u, l, c, d, f); for (var h10 = 1e-7, p = [], v = 0; v < 6; v += 2) Math.abs(f[v + 1]) < h10 && 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 - e17, 2) + Math.pow(b - t, 2), m >= 0 ? x < m && (m = x) : m = x; return m; }; var vie = function(e17, t, n, r, o, a) { var i = [e17 - 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 ? (e17 - o) * (e17 - o) + (t - a) * (t - a) : l - d; }; var Sr = function(e17, 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 == e17 && a == e17)) if (r >= e17 && e17 >= a || r <= e17 && e17 <= a) s = (e17 - r) / (a - r) * (i - o) + o, s > t && u++; else continue; return u % 2 !== 0; }; var Ta = function(e17, 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), h10 = 0; h10 < l.length / 2; h10++) l[h10 * 2] = a / 2 * (n[h10 * 2] * d - n[h10 * 2 + 1] * f), l[h10 * 2 + 1] = i / 2 * (n[h10 * 2 + 1] * d + n[h10 * 2] * f), l[h10 * 2] += r, l[h10 * 2 + 1] += o; var p; if (u > 0) { var v = rf(l, -u); p = nf(v); } else p = l; return Sr(e17, t, p); }; var gie = function(e17, 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 - e17, 2) + Math.pow(c.cy - t, 2); if (d <= Math.pow(c.radius, 2)) return true; } return Sr(e17, t, u); }; var nf = function(e17) { for (var t = new Array(e17.length / 2), n, r, o, a, i, s, u, l, c = 0; c < e17.length / 4; c++) { n = e17[c * 4], r = e17[c * 4 + 1], o = e17[c * 4 + 2], a = e17[c * 4 + 3], c < e17.length / 4 - 1 ? (i = e17[(c + 1) * 4], s = e17[(c + 1) * 4 + 1], u = e17[(c + 1) * 4 + 2], l = e17[(c + 1) * 4 + 3]) : (i = e17[0], s = e17[1], u = e17[2], l = e17[3]); var d = ai(n, r, o, a, i, s, u, l, true); t[c * 2] = d[0], t[c * 2 + 1] = d[1]; } return t; }; var rf = function(e17, t) { for (var n = new Array(e17.length * 2), r, o, a, i, s = 0; s < e17.length / 2; s++) { r = e17[s * 2], o = e17[s * 2 + 1], s < e17.length / 2 - 1 ? (a = e17[(s + 1) * 2], i = e17[(s + 1) * 2 + 1]) : (a = e17[0], i = e17[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; }; var mie = function(e17, t, n, r, o, a) { var i = n - e17, 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 - e17) * c + e17, (r - t) * c + t]; }; var Yi = function(e17, t, n, r, o, a, i) { return e17 -= o, t -= a, e17 /= n / 2 + i, t /= r / 2 + i, e17 * e17 + t * t <= 1; }; var Ou = function(e17, t, n, r, o, a, i) { var s = [n - e17, r - t], u = [e17 - 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 h10 = (-c + Math.sqrt(f)) / (2 * l), p = (-c - Math.sqrt(f)) / (2 * l), v = Math.min(h10, p), m = Math.max(h10, 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] + e17, x = g[0] * s[1] + t; if (g.length > 1) { if (g[0] == g[1]) return [b, x]; var w = g[1] * s[0] + e17, C = g[1] * s[1] + t; return [b, x, w, C]; } else return [b, x]; }; var Tv = function(e17, t, n) { return t <= e17 && e17 <= n || n <= e17 && e17 <= t ? e17 : e17 <= t && t <= n || n <= t && t <= e17 ? t : n; }; var ai = function(e17, t, n, r, o, a, i, s, u) { var l = e17 - o, c = n - e17, d = i - o, f = t - a, h10 = r - t, p = s - a, v = d * f - p * l, m = c * f - h10 * l, g = p * c - d * h10; 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 ? [e17 + b * c, t + b * h10] : u ? [e17 + b * c, t + b * h10] : []; } else return v === 0 || m === 0 ? Tv(e17, n, i) === i ? [i, s] : Tv(e17, n, o) === o ? [o, a] : Tv(o, i, n) === n ? [n, r] : [] : []; }; var bc = function(e17, t, n, r, o, a, i, s) { var u = [], l, c = new Array(n.length), d = true; a == null && (d = false); var f; if (d) { for (var h10 = 0; h10 < c.length / 2; h10++) c[h10 * 2] = n[h10 * 2] * a + r, c[h10 * 2 + 1] = n[h10 * 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(e17, t, r, o, v, m, g, b), l.length !== 0 && u.push(l[0], l[1]); return u; }; var yie = function(e17, 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(e17, 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(e17, t, r, o, d[f * 4], d[f * 4 + 1], d[f * 4 + 2], d[f * 4 + 3], false), c.length !== 0 && l.push(c[0], c[1]); if (l.length > 2) { for (var h10 = [l[0], l[1]], p = Math.pow(h10[0] - e17, 2) + Math.pow(h10[1] - t, 2), v = 1; v < l.length / 2; v++) { var m = Math.pow(l[v * 2] - e17, 2) + Math.pow(l[v * 2 + 1] - t, 2); m <= p && (h10[0] = l[v * 2], h10[1] = l[v * 2 + 1], p = m); } return h10; } return l; }; var zd = function(e17, t, n) { var r = [e17[0] - t[0], e17[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]]; }; var yr = function(e17, t) { var n = N0(e17, t); return n = mS(n), n; }; var mS = function(e17) { for (var t, n, r = e17.length / 2, o = 1 / 0, a = 1 / 0, i = -1 / 0, s = -1 / 0, u = 0; u < r; u++) t = e17[2 * u], n = e17[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 = e17[2 * d] = e17[2 * d] * l, n = e17[2 * d + 1] = e17[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 = e17[2 * f + 1] = e17[2 * f + 1] + (-1 - a); return e17; }; var N0 = function(e17, t) { var n = 1 / e17 * 2 * Math.PI, r = e17 % 2 === 0 ? Math.PI / 2 + n / 2 : Math.PI / 2; r += t; for (var o = new Array(e17 * 2), a, i = 0; i < e17; i++) a = i * n + r, o[2 * i] = Math.cos(a), o[2 * i + 1] = Math.sin(-a); return o; }; var ws = function(e17, t) { return Math.min(e17 / 4, t / 4, 8); }; var yS = function(e17, t) { return Math.min(e17 / 10, t / 10, 8); }; var xy = function() { return 8; }; var bie = function(e17, t, n) { return [e17 - 2 * t + n, 2 * (t - e17), e17]; }; var L0 = function(e17, t) { return { heightOffset: Math.min(15, 0.05 * t), widthOffset: Math.min(100, 0.25 * e17), ctrlPtOffsetPct: 0.05 }; }; var wie = nr({ dampingFactor: 0.8, precision: 1e-6, iterations: 200, weight: function(e17) { return 1; } }); var xie = { pageRank: function(e17) { for (var t = wie(e17), 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, h10 = 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; h10[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; h10[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; h10[N] = $; } else for (var M = 0; M < c; M++) { var I = M * c + A; h10[I] = h10[I] / p[A] + v; } for (var z = new Array(c), R = new Array(c), W, 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] += h10[ke] * z[we]; } rie(R), W = z, z = R, R = W; for (var fe = 0, ge = 0; ge < c; ge++) { var J = W[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 }; var yx = nr({ root: null, weight: function(e17) { return 1; }, directed: false, alpha: 0 }); var il = { degreeCentralityNormalized: function(e17) { e17 = yx(e17); var t = this.cy(), n = this.nodes(), r = n.length; if (e17.directed) { for (var o = {}, a = {}, i = 0, s = 0, u = 0; u < r; u++) { var l = n[u], c = l.id(); e17.root = l; var d = this.degreeCentrality(e17); 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 = {}, h10 = 0, p = 0; p < r; p++) { var v = n[p]; e17.root = v; var m = this.degreeCentrality(e17); h10 < m.degree && (h10 = m.degree), f[v.id()] = m.degree; } return { degree: function(g) { return h10 === 0 ? 0 : (at(g) && (g = t.filter(g)), f[g.id()] / h10); } }; } }, // 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(e17) { e17 = yx(e17); var t = this.cy(), n = this, r = e17, 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, h10 = 0, p = 0, v = 0; v < l.length; v++) h10 += a(l[v]); for (var m = 0; m < c.length; m++) p += a(c[m]); return { indegree: Math.pow(d, 1 - s) * Math.pow(h10, 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: true, weight: function() { return 1; }, directed: false, root: null }); var sl = { closenessCentralityNormalized: function(e17) { for (var t = bx(e17), 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], h10 = 0; h10 < u.length; h10++) if (c !== h10) { var p = l.distance(f, u[h10]); 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(e17) { var t = bx(e17), 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: false }); var D0 = { // Implemented from the algorithm in the paper "On Variants of Shortest-Path Betweenness Centrality and their Generic Computation" by Ulrik Brandes betweennessCentrality: function(e17) { for (var t = kie(e17), 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], h10 = f.id(); n ? s[h10] = f.outgoers().nodes() : s[h10] = f.openNeighborhood().nodes(), c.set(h10, 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 = {}, W = 0; W < i.length; W++) R[i[W].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(e17) { return 1; } ] }); var Eie = function(e17) { return Cie(e17); }; var Sie = function(e17, t) { for (var n = 0, r = 0; r < t.length; r++) n += t[r](e17); return n; }; var _ie = function(e17, t, n) { for (var r = 0; r < t; r++) e17[r * t + r] = n; }; var bS = function(e17, t) { for (var n, r = 0; r < t; r++) { n = 0; for (var o = 0; o < t; o++) n += e17[o * t + r]; for (var a = 0; a < t; a++) e17[a * t + r] = e17[a * t + r] / n; } }; var Tie = function(e17, 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] += e17[o * n + i] * t[i * n + s]; } return r; }; var Oie = function(e17, t, n) { for (var r = e17.slice(0), o = 1; o < n; o++) e17 = Tie(e17, r, t); return e17; }; var Pie = function(e17, t, n) { for (var r = new Array(t * t), o = 0; o < t * t; o++) r[o] = Math.pow(e17[o], n); return bS(r, t), r; }; var $ie = function(e17, t, n, r) { for (var o = 0; o < n; o++) { var a = Math.round(e17[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 false; } return true; }; var Aie = function(e17, t, n, r) { for (var o = [], a = 0; a < t; a++) { for (var i = [], s = 0; s < t; s++) Math.round(e17[a * t + s] * 1e3) / 1e3 > 0 && i.push(n[s]); i.length !== 0 && o.push(r.collection(i)); } return o; }; var Fie = function(e17, t) { for (var n = 0; n < e17.length; n++) if (!t[n] || e17[n].id() !== t[n].id()) return false; return true; }; var Iie = function(e17) { for (var t = 0; t < e17.length; t++) for (var n = 0; n < e17.length; n++) t != n && Fie(e17[t], e17[n]) && e17.splice(n, 1); return e17; }; var wx = function(e17) { for (var t = this.nodes(), n = this.edges(), r = this.cy(), o = Eie(e17), 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 h10 = n[f], p = a[h10.source().id()], v = a[h10.target().id()], m = Sie(h10, o.attributes); l[p * s + v] += m, l[v * s + p] += m; } _ie(l, s, o.multFactor), bS(l, s); for (var g = true, b = 0; g && b < o.maxIterations; ) g = false, c = Oie(l, s, o.expandFactor), l = Pie(c, s, o.inflateFactor), $ie(l, c, u, 4) || (g = true), b++; var x = Aie(l, s, t, r); return x = Iie(x), x; }; var Nie = { markovClustering: wx, mcl: wx }; var Lie = function(e17) { return e17; }; var wS = function(e17, t) { return Math.abs(t - e17); }; var xx = function(e17, t, n) { return e17 + wS(t, n); }; var kx = function(e17, t, n) { return e17 + Math.pow(n - t, 2); }; var Die = function(e17) { return Math.sqrt(e17); }; var Rie = function(e17, t, n) { return Math.max(e17, wS(t, n)); }; var bu = function(e17, t, n, r, o) { for (var a = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : Lie, i = r, s, u, l = 0; l < e17; l++) s = t(l), u = n(l), i = o(i, s, u); return a(i); }; var Il = { euclidean: function(e17, t, n) { return e17 >= 2 ? bu(e17, t, n, 0, kx, Die) : bu(e17, t, n, 0, xx); }, squaredEuclidean: function(e17, t, n) { return bu(e17, t, n, 0, kx); }, manhattan: function(e17, t, n) { return bu(e17, t, n, 0, xx); }, max: function(e17, t, n) { return bu(e17, t, n, -1 / 0, Rie); } }; Il["squared-euclidean"] = Il.squaredEuclidean; Il.squaredeuclidean = Il.squaredEuclidean; function mh(e17, t, n, r, o, a) { var i; return dn(e17) ? i = e17 : i = Il[e17] || Il.euclidean, t === 0 && dn(e17) ? 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: false, testCentroids: null }); var ky = function(e17) { return Bie(e17); }; var of = function(e17, 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(e17, r.length, i, s, u, l); }; var Ov = function(e17, 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] = e17.min(n[u]).value, a[u] = e17.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; }; var xS = function(e17, t, n, r, o) { for (var a = 1 / 0, i = 0, s = 0; s < t.length; s++) { var u = of(n, e17, t[s], r, o); u < a && (a = u, i = s); } return i; }; var kS = function(e17, t, n) { for (var r = [], o = null, a = 0; a < t.length; a++) o = t[a], n[o.id()] === e17 && r.push(o); return r; }; var Mie = function(e17, t, n) { return Math.abs(t - e17) <= n; }; var zie = function(e17, t, n) { for (var r = 0; r < e17.length; r++) for (var o = 0; o < e17[r].length; o++) { var a = Math.abs(e17[r][o] - t[r][o]); if (a > n) return false; } return true; }; var Vie = function(e17, t, n) { for (var r = 0; r < n; r++) if (e17 === t[r]) return true; return false; }; var Cx = function(e17, t) { var n = new Array(t); if (e17.length < 50) for (var r = 0; r < t; r++) { for (var o = e17[Math.floor(Math.random() * e17.length)]; Vie(o, n, r); ) o = e17[Math.floor(Math.random() * e17.length)]; n[r] = o; } else for (var a = 0; a < t; a++) n[a] = e17[Math.floor(Math.random() * e17.length)]; return n; }; var Ex = function(e17, t, n) { for (var r = 0, o = 0; o < t.length; o++) r += of("manhattan", t[o], e17, n, "kMedoids"); return r; }; var jie = function(e17) { var t = this.cy(), n = this.nodes(), r = null, o = ky(e17), 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 = true, 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 = false; for (var d = 0; d < o.k; d++) { var f = kS(d, n, i); if (f.length !== 0) { for (var h10 = o.attributes.length, p = s[d], v = new Array(h10), m = new Array(h10), g = 0; g < h10; 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 = true); } s[d] = v, a[d] = t.collection(f); } } l++; } return a; }; var Hie = function(e17) { var t = this.cy(), n = this.nodes(), r = null, o = ky(e17), 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 = true, 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 = false; for (var h10 = 0; h10 < i.length; h10++) { var p = kS(h10, n, s); if (p.length !== 0) { l[h10] = Ex(i[h10], p, o.attributes); for (var v = 0; v < p.length; v++) u = Ex(p[v], p, o.attributes), u < l[h10] && (l[h10] = u, i[h10] = p[v], c = true); a[h10] = t.collection(p); } } d++; } return a; }; var Uie = function(e17, t, n, r, o) { for (var a, i, s = 0; s < t.length; s++) for (var u = 0; u < e17.length; u++) r[s][u] = Math.pow(n[s][u], o.m); for (var l = 0; l < e17.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]; e17[l][c] = a / i; } }; var qie = function(e17, t, n, r, o) { for (var a = 0; a < e17.length; a++) t[a] = e17[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); e17[d][c] = 1 / i; } }; var Wie = function(e17, 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(e17[u]); } for (var c = 0; c < o.length; c++) o[c] = r.collection(o[c]); return o; }; var Sx = function(e17) { var t = this.cy(), n = this.nodes(), r = ky(e17), 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, h10 = 0; h10 < r.k; h10++) i[d][h10] = Math.random(), f += i[d][h10]; 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 = true, b = 0; g && b < r.maxIterations; ) g = false, Uie(a, n, i, u, r), qie(i, s, a, n, r), zie(i, s, r.sensitivityThreshold) || (g = true), b++; return o = Wie(n, i, r, t), { clusters: o, degreeOfMembership: i }; }; var Kie = { kMeans: jie, kMedoids: Hie, fuzzyCMeans: Sx, fcm: Sx }; var 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: false, // 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 }); var Xie = { single: "min", complete: "max" }; var Yie = function(e17) { var t = Gie(e17), n = Xie[t.linkage]; return n != null && (t.linkage = n), t; }; var _x = function(e17, 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 < e17.length; c++) { var d = e17[c].key, f = n[d][r[d]]; f < i && (a = d, i = f); } if (o.mode === "threshold" && i >= o.threshold || o.mode === "dendrogram" && e17.length === 1) return false; var h10 = t[a], p = t[r[a]], v; o.mode === "dendrogram" ? v = { left: h10, right: p, key: h10.key } : v = { value: h10.value.concat(p.value), key: h10.key }, e17[h10.index] = v, e17.splice(p.index, 1), t[h10.key] = v; for (var m = 0; m < e17.length; m++) { var g = e17[m]; h10.key === g.key ? s = 1 / 0 : o.linkage === "min" ? (s = n[h10.key][g.key], n[h10.key][g.key] > n[p.key][g.key] && (s = n[p.key][g.key])) : o.linkage === "max" ? (s = n[h10.key][g.key], n[h10.key][g.key] < n[p.key][g.key] && (s = n[p.key][g.key])) : o.linkage === "mean" ? s = (n[h10.key][g.key] * h10.size + n[p.key][g.key] * p.size) / (h10.size + p.size) : o.mode === "dendrogram" ? s = l(g.value, h10.value) : s = l(g.value[0], h10.value[0]), n[h10.key][g.key] = n[g.key][h10.key] = s; } for (var b = 0; b < e17.length; b++) { var x = e17[b].key; if (r[x] === h10.key || r[x] === p.key) { for (var w = x, C = 0; C < e17.length; C++) { var k = e17[C].key; n[x][k] < n[x][w] && (w = k); } r[x] = w; } e17[b].index = b; } return h10.key = p.key = h10.index = p.index = null, true; }; var 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))); }; var Zie = function e8(t, n) { if (!t) return ""; if (t.left && t.right) { var r = e8(t.left, n), o = e8(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(); }; var Jie = function e10(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 = e10(t.left, n - 1, r)), t.right && (a = e10(t.right, n - 1, r)), o.concat(a)); }; var Tx = function(e17) { for (var t = this.cy(), n = this.nodes(), r = Yie(e17), 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 h10 = 0; h10 <= f; h10++) { var p = void 0; r.mode === "dendrogram" ? p = f === h10 ? 1 / 0 : a(i[f].value, i[h10].value) : p = f === h10 ? 1 / 0 : a(i[f].value[0], i[h10].value[0]), s[f][h10] = p, s[h10][f] = p, p < s[f][u[f]] && (u[f] = h10); } 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; }; var Qie = { hierarchicalClustering: Tx, hca: Tx }; var 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') ] }); var tse = function(e17) { var t = e17.damping, n = e17.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(e17); }; var nse = function(e17, t, n, r) { var o = function(a, i) { return r[i](a); }; return -mh(e17, r.length, function(a) { return o(t, a); }, function(a) { return o(n, a); }, t, n); }; var rse = function(e17, t) { var n = null; return t === "median" ? n = tie(e17) : t === "mean" ? n = eie(e17) : t === "min" ? n = Jae(e17) : t === "max" ? n = Qae(e17) : n = t, n; }; var ose = function(e17, t, n) { for (var r = [], o = 0; o < e17; o++) t[o * e17 + o] + n[o * e17 + o] > 0 && r.push(o); return r; }; var Ox = function(e17, t, n) { for (var r = [], o = 0; o < e17; o++) { for (var a = -1, i = -1 / 0, s = 0; s < n.length; s++) { var u = n[s]; t[o * e17 + u] > i && (a = u, i = t[o * e17 + u]); } a > 0 && r.push(a); } for (var l = 0; l < n.length; l++) r[n[l]] = n[l]; return r; }; var ase = function(e17, t, n) { for (var r = Ox(e17, 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] * e17 + a[l]]; c > u && (s = l, u = c); } n[o] = a[s]; } return r = Ox(e17, t, n), r; }; var Px = function(e17) { for (var t = this.cy(), n = this.nodes(), r = tse(e17), 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 h10 = 0; h10 < i; h10++) for (var p = 0; p < i; p++) h10 !== p && (u[h10 * i + p] = nse(r.distance, n[h10], 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 W = 0; W < i; W++) d[W * i + I] = (1 - r.damping) * Math.min(0, z - x[W]) + r.damping * b[W]; 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; }; var ise = { affinityPropagation: Px, ap: Px }; var sse = nr({ root: void 0, directed: false }); var lse = { hierholzer: function(e17) { if (!It(e17)) { var t = arguments; e17 = { root: t[0], directed: t[1] }; } var n = sse(e17), r = n.root, o = n.directed, a = this, i = false, 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(true), w = g.outdegree(true), C = x - w, k = w - x; C == 1 ? s ? i = true : s = b : k == 1 ? u ? i = true : u = b : (k > 1 || C > 1) && (i = true), 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(true); x % 2 && (s ? u ? i = true : 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: false, 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 h10 = 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 = h10(l); v.length != 1; ) c[v[0]].length == 0 ? (p.unshift(a.getElementById(v.shift())), p.unshift(a.getElementById(v.shift()))) : v = h10(v.shift()).concat(v); p.unshift(a.getElementById(v.shift())); for (var m in c) if (c[m].length) return f; return f.found = true, f.trail = this.spawn(p, true), f; } }; var jd = function() { var e17 = this, t = {}, n = 0, r = 0, o = [], a = [], i = {}, s = function(c, d) { for (var f = a.length - 1, h10 = [], p = e17.spawn(); a[f].x != c || a[f].y != d; ) h10.push(a.pop().edge), f--; h10.push(a.pop().edge), h10.forEach(function(v) { var m = v.connectedNodes().intersection(e17); p.merge(v), m.forEach(function(g) { var b = g.id(), x = g.connectedEdges().intersection(e17); 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, h10) { d === h10 && (r += 1), t[f] = { id: n, low: n++, cutVertex: false }; var p = e17.getElementById(f).connectedEdges().intersection(e17); if (p.size() === 0) o.push(e17.spawn(e17.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 !== h10 && (b = x.id(), i[b] || (i[b] = true, 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 = true, s(f, g)))); }); } }; e17.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 e17.getElementById(c); }); return { cut: e17.spawn(l), components: o }; }; var use = { hopcroftTarjanBiconnected: jd, htbc: jd, htb: jd, hopcroftTarjanBiconnectedComponents: jd }; var Hd = function() { var e17 = this, t = {}, n = 0, r = [], o = [], a = e17.spawn(e17), i = function s(u) { o.push(u), t[u] = { index: n, low: n++, explored: false }; var l = e17.getElementById(u).connectedEdges().intersection(e17); 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 = e17.spawn(); ; ) { var d = o.pop(); if (c.merge(e17.getElementById(d)), t[d].low = t[u].index, t[d].explored = true, d === u) break; } var f = c.edgesWith(c), h10 = c.merge(f); r.push(h10), a = a.difference(h10); } }; return e17.forEach(function(s) { if (s.isNode()) { var u = s.id(); u in t || i(u); } }), { cut: a, components: r }; }; var cse = { tarjanStronglyConnected: Hd, tsc: Hd, tscc: Hd, tarjanStronglyConnectedComponents: Hd }; var CS = {}; [mc, zae, Vae, Hae, qae, Kae, Yae, xie, il, sl, D0, Nie, Kie, Qie, ise, lse, use, cse].forEach(function(e17) { ct(CS, e17); }); var ES = 0; var SS = 1; var _S = 2; var Oa = function e11(t) { if (!(this instanceof e11)) return new e11(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(e17) { return $x(this, SS, "fulfillValue", e17); }, reject: function(e17) { return $x(this, _S, "rejectReason", e17); }, /* "The then Method" [Promises/A+ 1.1, 1.2, 2.2] */ then: function(e17, t) { var n = this, r = new Oa(); return n.onFulfilled.push(Fx(e17, r, "fulfill")), n.onRejected.push(Fx(t, r, "reject")), TS(n), r.proxy; } }; var $x = function(e17, t, n, r) { return e17.state === ES && (e17.state = t, e17[n] = r, TS(e17)), e17; }; var TS = function(e17) { e17.state === SS ? Ax(e17, "onFulfilled", e17.fulfillValue) : e17.state === _S && Ax(e17, "onRejected", e17.rejectReason); }; var Ax = function(e17, t, n) { if (e17[t].length !== 0) { var r = e17[t]; e17[t] = []; var o = function() { for (var a = 0; a < r.length; a++) r[a](n); }; typeof setImmediate == "function" ? setImmediate(o) : setTimeout(o, 0); } }; var Fx = function(e17, t, n) { return function(r) { if (typeof e17 != "function") t[n].call(t, r); else { var o; try { o = e17(r); } catch (a) { t.reject(a); return; } dse(t, o); } }; }; var dse = function e12(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 = false; try { r.call( n, /* resolvePromise */ /* [Promises/A+ 2.3.3.3.1] */ function(a) { o || (o = true, a === n ? t.reject(new TypeError("circular thenable chain")) : e12(t, a)); }, /* rejectPromise */ /* [Promises/A+ 2.3.3.3.2] */ function(a) { o || (o = true, t.reject(a)); } ); } catch (a) { o || t.reject(a); } return; } t.fulfill(n); }; Oa.all = function(e17) { return new Oa(function(t, n) { for (var r = new Array(e17.length), o = 0, a = function(s, u) { r[s] = u, o++, o === e17.length && t(r); }, i = 0; i < e17.length; i++) (function(s) { var u = e17[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(e17) { return new Oa(function(t, n) { t(e17); }); }; Oa.reject = function(e17) { return new Oa(function(t, n) { n(e17); }); }; var Gl = typeof Promise < "u" ? Promise : Oa; var R0 = function(e17, t, n) { var r = hy(e17), o = !r, a = this._private = ct({ duration: 1e3 }, t, n); if (a.target = e17, a.style = a.style || a.css, a.started = false, a.playing = false, a.hooked = false, a.applying = false, a.progress = 0, a.completes = [], a.frames = [], a.complete && dn(a.complete) && a.completes.push(a.complete), o) { var i = e17.position(); a.startPosition = a.startPosition || { x: i.x, y: i.y }, a.startStyle = a.startStyle || e17.cy().style().getAnimationStartStyle(e17, a.style); } if (r) { var s = e17.pan(); a.startPan = { x: s.x, y: s.y }, a.startZoom = e17.zoom(); } this.length = 1, this[0] = this; }; var xs = R0.prototype; ct(xs, { instanceString: function() { return "animation"; }, hook: function() { var e17 = this._private; if (!e17.hooked) { var t, n = e17.target._private.animation; e17.queue ? t = n.queue : t = n.current, t.push(this), Wr(e17.target) && e17.target.cy().addToAnimationPool(e17.target), e17.hooked = true; } return this; }, play: function() { var e17 = this._private; return e17.progress === 1 && (e17.progress = 0), e17.playing = true, e17.started = false, e17.stopped = false, this.hook(), this; }, playing: function() { return this._private.playing; }, apply: function() { var e17 = this._private; return e17.applying = true, e17.started = false, e17.stopped = false, this.hook(), this; }, applying: function() { return this._private.applying; }, pause: function() { var e17 = this._private; return e17.playing = false, e17.started = false, this; }, stop: function() { var e17 = this._private; return e17.playing = false, e17.started = false, e17.stopped = true, this; }, rewind: function() { return this.progress(0); }, fastforward: function() { return this.progress(1); }, time: function(e17) { var t = this._private; return e17 === void 0 ? t.progress * t.duration : this.progress(e17 / t.duration); }, progress: function(e17) { var t = this._private, n = t.playing; return e17 === void 0 ? t.progress : (n && this.pause(), t.progress = e17, t.started = false, n && this.play(), this); }, completed: function() { return this._private.progress === 1; }, reverse: function() { var e17 = this._private, t = e17.playing; t && this.pause(), e17.progress = 1 - e17.progress, e17.started = false; var n = function(s, u) { var l = e17[s]; l != null && (e17[s] = e17[u], e17[u] = l); }; if (n("zoom", "startZoom"), n("pan", "startPan"), n("position", "startPosition"), e17.style) for (var r = 0; r < e17.style.length; r++) { var o = e17.style[r], a = o.name, i = e17.startStyle[a]; e17.startStyle[a] = o, e17.style[r] = i; } return t && this.play(), this; }, promise: function(e17) { var t = this._private, n; switch (e17) { 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 e17 = this, t = e17.length !== void 0, n = t ? e17 : [e17], r = this._private.cy || this; if (!r.styleEnabled()) return false; var o = n[0]; if (o) return o._private.animation.current.length > 0; }; }, // animated clearQueue: function() { return function() { var e17 = this, t = e17.length !== void 0, n = t ? e17 : [e17], 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(e17, t) { var n = this._private.cy || this; return n.styleEnabled() ? this.animate({ delay: e17, duration: e17, complete: t }) : this; }; }, // delay delayAnimation: function() { return function(e17, t) { var n = this._private.cy || this; return n.styleEnabled() ? this.animation({ delay: e17, duration: e17, complete: t }) : this; }; }, // delay animation: function() { return function(e17, 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(); e17 = ct({}, e17, t); var l = Object.keys(e17).length === 0; if (l) return new R0(o[0], e17); switch (e17.duration === void 0 && (e17.duration = 400), e17.duration) { case "slow": e17.duration = 600; break; case "fast": e17.duration = 200; break; } if (s && (e17.style = u.getPropsList(e17.style || e17.css), e17.css = void 0), s && e17.renderedPosition != null) { var c = e17.renderedPosition, d = a.pan(), f = a.zoom(); e17.position = pS(c, f, d); } if (i && e17.panBy != null) { var h10 = e17.panBy, p = a.pan(); e17.pan = { x: p.x + h10.x, y: p.y + h10.y }; } var v = e17.center || e17.centre; if (i && v != null) { var m = a.getCenterPan(v.eles, e17.zoom); m != null && (e17.pan = m); } if (i && e17.fit != null) { var g = e17.fit, b = a.getFitViewport(g.eles || g.boundingBox, g.padding); b != null && (e17.pan = b.pan, e17.zoom = b.zoom); } if (i && It(e17.zoom)) { var x = a.getZoomedViewport(e17.zoom); x != null ? (x.zoomed && (e17.zoom = x.zoom), x.panned && (e17.pan = x.pan)) : e17.zoom = null; } return new R0(o[0], e17); }; }, // animate animate: function() { return function(e17, t) { var n = this, r = n.length !== void 0, o = r ? n : [n], a = this._private.cy || this; if (!a.styleEnabled()) return this; t && (e17 = ct({}, e17, t)); for (var i = 0; i < o.length; i++) { var s = o[i], u = s.animated() && (e17.queue === void 0 || e17.queue), l = s.animation(e17, u ? { queue: true } : void 0); l.play(); } return this; }; }, // animate stop: function() { return function(e17, 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); } e17 && (u.animation.queue = []), t || (u.animation.current = []); } return a.notify("draw"), this; }; } // stop }; var fse = Array.isArray; var yh = fse; var hse = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/; var vse = /^\w*$/; function gse(e17, t) { if (yh(e17)) return false; var n = typeof e17; return n == "number" || n == "symbol" || n == "boolean" || e17 == null || Qc(e17) ? true : vse.test(e17) || !hse.test(e17) || t != null && e17 in Object(t); } var mse = gse; var yse = "[object AsyncFunction]"; var bse = "[object Function]"; var wse = "[object GeneratorFunction]"; var xse = "[object Proxy]"; function kse(e17) { if (!ms(e17)) return false; var t = rS(e17); return t == bse || t == wse || t == yse || t == xse; } var Cse = kse; var Ese = fh["__core-js_shared__"]; var Pv = Ese; var Ix = function() { var e17 = /[^.]+$/.exec(Pv && Pv.keys && Pv.keys.IE_PROTO || ""); return e17 ? "Symbol(src)_1." + e17 : ""; }(); function Sse(e17) { return !!Ix && Ix in e17; } var _se = Sse; var Tse = Function.prototype; var Ose = Tse.toString; function Pse(e17) { if (e17 != null) { try { return Ose.call(e17); } catch { } try { return e17 + ""; } catch { } } return ""; } var $se = Pse; var Ase = /[\\^$.*+?()[\]{}|]/g; var Fse = /^\[object .+?Constructor\]$/; var Ise = Function.prototype; var Nse = Object.prototype; var Lse = Ise.toString; var Dse = Nse.hasOwnProperty; var Rse = RegExp( "^" + Lse.call(Dse).replace(Ase, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$" ); function Bse(e17) { if (!ms(e17) || _se(e17)) return false; var t = Cse(e17) ? Rse : Fse; return t.test($se(e17)); } var Mse = Bse; function zse(e17, t) { return e17 == null ? void 0 : e17[t]; } var Vse = zse; function jse(e17, t) { var n = Vse(e17, t); return Mse(n) ? n : void 0; } var Cy = jse; var Hse = Cy(Object, "create"); var wc = Hse; function Use() { this.__data__ = wc ? wc(null) : {}, this.size = 0; } var qse = Use; function Wse(e17) { var t = this.has(e17) && delete this.__data__[e17]; return this.size -= t ? 1 : 0, t; } var Kse = Wse; var Gse = "__lodash_hash_undefined__"; var Xse = Object.prototype; var Yse = Xse.hasOwnProperty; function Zse(e17) { var t = this.__data__; if (wc) { var n = t[e17]; return n === Gse ? void 0 : n; } return Yse.call(t, e17) ? t[e17] : void 0; } var Jse = Zse; var Qse = Object.prototype; var ele = Qse.hasOwnProperty; function tle(e17) { var t = this.__data__; return wc ? t[e17] !== void 0 : ele.call(t, e17); } var nle = tle; var rle = "__lodash_hash_undefined__"; function ole(e17, t) { var n = this.__data__; return this.size += this.has(e17) ? 0 : 1, n[e17] = wc && t === void 0 ? rle : t, this; } var ale = ole; function Xl(e17) { var t = -1, n = e17 == null ? 0 : e17.length; for (this.clear(); ++t < n; ) { var r = e17[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(e17, t) { return e17 === t || e17 !== e17 && t !== t; } var OS = lle; function ule(e17, t) { for (var n = e17.length; n--; ) if (OS(e17[n][0], t)) return n; return -1; } var bh = ule; var cle = Array.prototype; var dle = cle.splice; function ple(e17) { var t = this.__data__, n = bh(t, e17); if (n < 0) return false; var r = t.length - 1; return n == r ? t.pop() : dle.call(t, n, 1), --this.size, true; } var fle = ple; function hle(e17) { var t = this.__data__, n = bh(t, e17); return n < 0 ? void 0 : t[n][1]; } var vle = hle; function gle(e17) { return bh(this.__data__, e17) > -1; } var mle = gle; function yle(e17, t) { var n = this.__data__, r = bh(n, e17); return r < 0 ? (++this.size, n.push([e17, t])) : n[r][1] = t, this; } var ble = yle; function Yl(e17) { var t = -1, n = e17 == null ? 0 : e17.length; for (this.clear(); ++t < n; ) { var r = e17[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; var xle = Cy(fh, "Map"); var kle = xle; function Cle() { this.size = 0, this.__data__ = { hash: new Nx(), map: new (kle || wle)(), string: new Nx() }; } var Ele = Cle; function Sle(e17) { var t = typeof e17; return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e17 !== "__proto__" : e17 === null; } var _le = Sle; function Tle(e17, t) { var n = e17.__data__; return _le(t) ? n[typeof t == "string" ? "string" : "hash"] : n.map; } var wh = Tle; function Ole(e17) { var t = wh(this, e17).delete(e17); return this.size -= t ? 1 : 0, t; } var Ple = Ole; function $le(e17) { return wh(this, e17).get(e17); } var Ale = $le; function Fle(e17) { return wh(this, e17).has(e17); } var Ile = Fle; function Nle(e17, t) { var n = wh(this, e17), r = n.size; return n.set(e17, t), this.size += n.size == r ? 0 : 1, this; } var Lle = Nle; function Zl(e17) { var t = -1, n = e17 == null ? 0 : e17.length; for (this.clear(); ++t < n; ) { var r = e17[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; var Dle = "Expected a function"; function Ey(e17, t) { if (typeof e17 != "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 = e17.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; var Ble = 500; function Mle(e17) { var t = Rle(e17, function(r) { return n.size === Ble && n.clear(), r; }), n = t.cache; return t; } var zle = Mle; var Vle = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; var jle = /\\(\\)?/g; var Hle = zle(function(e17) { var t = []; return e17.charCodeAt(0) === 46 && t.push(""), e17.replace(Vle, function(n, r, o, a) { t.push(o ? a.replace(jle, "$1") : r || n); }), t; }); var $S = Hle; function Ule(e17, t) { for (var n = -1, r = e17 == null ? 0 : e17.length, o = Array(r); ++n < r; ) o[n] = t(e17[n], n, e17); return o; } var AS = Ule; var qle = 1 / 0; var Lx = Al ? Al.prototype : void 0; var Dx = Lx ? Lx.toString : void 0; function FS(e17) { if (typeof e17 == "string") return e17; if (yh(e17)) return AS(e17, FS) + ""; if (Qc(e17)) return Dx ? Dx.call(e17) : ""; var t = e17 + ""; return t == "0" && 1 / e17 == -qle ? "-0" : t; } var Wle = FS; function Kle(e17) { return e17 == null ? "" : Wle(e17); } var IS = Kle; function Gle(e17, t) { return yh(e17) ? e17 : mse(e17, t) ? [e17] : $S(IS(e17)); } var NS = Gle; var Xle = 1 / 0; function Yle(e17) { if (typeof e17 == "string" || Qc(e17)) return e17; var t = e17 + ""; return t == "0" && 1 / e17 == -Xle ? "-0" : t; } var Sy = Yle; function Zle(e17, t) { t = NS(t, e17); for (var n = 0, r = t.length; e17 != null && n < r; ) e17 = e17[Sy(t[n++])]; return n && n == r ? e17 : void 0; } var Jle = Zle; function Qle(e17, t, n) { var r = e17 == null ? void 0 : Jle(e17, t); return r === void 0 ? n : r; } var eue = Qle; var tue = function() { try { var e17 = Cy(Object, "defineProperty"); return e17({}, "", {}), e17; } catch { } }(); var Rx = tue; function nue(e17, t, n) { t == "__proto__" && Rx ? Rx(e17, t, { configurable: true, enumerable: true, value: n, writable: true }) : e17[t] = n; } var rue = nue; var oue = Object.prototype; var aue = oue.hasOwnProperty; function iue(e17, t, n) { var r = e17[t]; (!(aue.call(e17, t) && OS(r, n)) || n === void 0 && !(t in e17)) && rue(e17, t, n); } var sue = iue; var lue = 9007199254740991; var uue = /^(?:0|[1-9]\d*)$/; function cue(e17, t) { var n = typeof e17; return t = t ?? lue, !!t && (n == "number" || n != "symbol" && uue.test(e17)) && e17 > -1 && e17 % 1 == 0 && e17 < t; } var due = cue; function pue(e17, t, n, r) { if (!ms(e17)) return e17; t = NS(t, e17); for (var o = -1, a = t.length, i = a - 1, s = e17; s != null && ++o < a; ) { var u = Sy(t[o]), l = n; if (u === "__proto__" || u === "constructor" || u === "prototype") return e17; 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 e17; } var fue = pue; function hue(e17, t, n) { return e17 == null ? e17 : fue(e17, t, n); } var vue = hue; function gue(e17, t) { var n = -1, r = e17.length; for (t || (t = Array(r)); ++n < r; ) t[n] = e17[n]; return t; } var mue = gue; function yue(e17) { return yh(e17) ? AS(e17, Sy) : Qc(e17) ? [e17] : mue($S(IS(e17))); } var bue = yue; var wue = { // access data field data: function(e17) { var t = { field: "data", bindingEvent: "data", allowBinding: false, allowSetting: false, allowGetting: false, settingEvent: "data", settingTriggersEvent: false, triggerFnName: "trigger", immutableKeys: {}, // key => true if immutable updateStyle: false, beforeGet: function(n) { }, beforeSet: function(n, r) { }, onSet: function(n) { }, canSet: function(n) { return true; } }; return e17 = ct({}, t, e17), function(n, r) { var o = e17, 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 h10 = WE({}, n, r); o.beforeSet(a, h10); 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(e17) { var t = { field: "data", event: "data", triggerFnName: "trigger", triggerEvent: false, immutableKeys: {} // key => true if immutable }; return e17 = ct({}, t, e17), function(n) { var r = e17, 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, h10 = i.length; f < h10; 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 }; var xue = { eventAliasesOn: function(e17) { var t = e17; 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); }); }; } }; var Bt = {}; [pse, wue, xue].forEach(function(e17) { ct(Bt, e17); }); var kue = { animate: Bt.animate(), animation: Bt.animation(), animated: Bt.animated(), clearQueue: Bt.clearQueue(), delay: Bt.delay(), delayAnimation: Bt.delayAnimation(), stop: Bt.stop() }; var gp = { classes: function(e17) { var t = this; if (e17 === void 0) { var n = []; return t[0]._private.classes.forEach(function(h10) { return n.push(h10); }), n; } else Gt(e17) || (e17 = (e17 || "").match(/\S+/g) || []); for (var r = [], o = new Kl(e17), a = 0; a < t.length; a++) { for (var i = t[a], s = i._private, u = s.classes, l = false, c = 0; c < e17.length; c++) { var d = e17[c], f = u.has(d); if (!f) { l = true; break; } } l || (l = u.size !== e17.length), l && (s.classes = o, r.push(i)); } return r.length > 0 && this.spawn(r).updateStyle().emit("class"), t; }, addClass: function(e17) { return this.toggleClass(e17, true); }, hasClass: function(e17) { var t = this[0]; return t != null && t._private.classes.has(e17); }, toggleClass: function(e17, t) { Gt(e17) || (e17 = e17.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 = false, c = 0; c < e17.length; c++) { var d = e17[c], f = u.has(d), h10 = false; t || r && !f ? (u.add(d), h10 = true) : (!t || r && f) && (u.delete(d), h10 = true), !l && h10 && (o.push(s), l = true); } return o.length > 0 && this.spawn(o).updateStyle().emit("class"), n; }, removeClass: function(e17) { return this.toggleClass(e17, false); }, flashClass: function(e17, t) { var n = this; if (t == null) t = 250; else if (t === 0) return n; return n.addClass(e17), setTimeout(function() { n.removeClass(e17); }, 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 e17, t, n; for (e17 = Ft.comparatorOp.split("|"), n = 0; n < e17.length; n++) t = e17[n], Ft.comparatorOp += "|@" + t; for (e17 = Ft.comparatorOp.split("|"), n = 0; n < e17.length; n++) t = e17[n], !(t.indexOf("!") >= 0) && t !== "=" && (Ft.comparatorOp += "|\\!" + t); })(); var Ht = function() { return { checks: [] }; }; var 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 }; var B0 = [{ selector: ":selected", matches: function(e17) { return e17.selected(); } }, { selector: ":unselected", matches: function(e17) { return !e17.selected(); } }, { selector: ":selectable", matches: function(e17) { return e17.selectable(); } }, { selector: ":unselectable", matches: function(e17) { return !e17.selectable(); } }, { selector: ":locked", matches: function(e17) { return e17.locked(); } }, { selector: ":unlocked", matches: function(e17) { return !e17.locked(); } }, { selector: ":visible", matches: function(e17) { return e17.visible(); } }, { selector: ":hidden", matches: function(e17) { return !e17.visible(); } }, { selector: ":transparent", matches: function(e17) { return e17.transparent(); } }, { selector: ":grabbed", matches: function(e17) { return e17.grabbed(); } }, { selector: ":free", matches: function(e17) { return !e17.grabbed(); } }, { selector: ":removed", matches: function(e17) { return e17.removed(); } }, { selector: ":inside", matches: function(e17) { return !e17.removed(); } }, { selector: ":grabbable", matches: function(e17) { return e17.grabbable(); } }, { selector: ":ungrabbable", matches: function(e17) { return !e17.grabbable(); } }, { selector: ":animated", matches: function(e17) { return e17.animated(); } }, { selector: ":unanimated", matches: function(e17) { return !e17.animated(); } }, { selector: ":parent", matches: function(e17) { return e17.isParent(); } }, { selector: ":childless", matches: function(e17) { return e17.isChildless(); } }, { selector: ":child", matches: function(e17) { return e17.isChild(); } }, { selector: ":orphan", matches: function(e17) { return e17.isOrphan(); } }, { selector: ":nonorphan", matches: function(e17) { return e17.isChild(); } }, { selector: ":compound", matches: function(e17) { return e17.isNode() ? e17.isParent() : e17.source().isParent() || e17.target().isParent(); } }, { selector: ":loop", matches: function(e17) { return e17.isLoop(); } }, { selector: ":simple", matches: function(e17) { return e17.isSimple(); } }, { selector: ":active", matches: function(e17) { return e17.active(); } }, { selector: ":inactive", matches: function(e17) { return !e17.active(); } }, { selector: ":backgrounding", matches: function(e17) { return e17.backgrounding(); } }, { selector: ":nonbackgrounding", matches: function(e17) { return !e17.backgrounding(); } }].sort(function(e17, t) { return Noe(e17.selector, t.selector); }); var Cue = function() { for (var e17 = {}, t, n = 0; n < B0.length; n++) t = B0[n], e17[t.selector] = t.matches; return e17; }(); var Eue = function(e17, t) { return Cue[e17](t); }; var Sue = "(" + B0.map(function(e17) { return e17.selector; }).join("|") + ")"; var Hs = function(e17) { return e17.replace(new RegExp("\\\\(" + Ft.metaChar + ")", "g"), function(t, n) { return n; }); }; var Ua = function(e17, t, n) { e17[e17.length - 1] = n; }; var M0 = [{ name: "group", // just used for identifying when debugging query: true, regex: "(" + Ft.group + ")", populate: function(e17, t, n) { var r = Co(n, 1), o = r[0]; t.checks.push({ type: We.GROUP, value: o === "*" ? o : o + "s" }); } }, { name: "state", query: true, regex: Sue, populate: function(e17, t, n) { var r = Co(n, 1), o = r[0]; t.checks.push({ type: We.STATE, value: o }); } }, { name: "id", query: true, regex: "\\#(" + Ft.id + ")", populate: function(e17, t, n) { var r = Co(n, 1), o = r[0]; t.checks.push({ type: We.ID, value: Hs(o) }); } }, { name: "className", query: true, regex: "\\.(" + Ft.className + ")", populate: function(e17, t, n) { var r = Co(n, 1), o = r[0]; t.checks.push({ type: We.CLASS, value: Hs(o) }); } }, { name: "dataExists", query: true, regex: "\\[\\s*(" + Ft.variable + ")\\s*\\]", populate: function(e17, t, n) { var r = Co(n, 1), o = r[0]; t.checks.push({ type: We.DATA_EXIST, field: Hs(o) }); } }, { name: "dataCompare", query: true, regex: "\\[\\s*(" + Ft.variable + ")\\s*(" + Ft.comparatorOp + ")\\s*(" + Ft.value + ")\\s*\\]", populate: function(e17, 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: true, regex: "\\[\\s*(" + Ft.boolOp + ")\\s*(" + Ft.variable + ")\\s*\\]", populate: function(e17, 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: true, regex: "\\[\\[\\s*(" + Ft.meta + ")\\s*(" + Ft.comparatorOp + ")\\s*(" + Ft.number + ")\\s*\\]\\]", populate: function(e17, 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: true, regex: Ft.separator, populate: function(e17, t) { var n = e17.currentSubject, r = e17.edgeCount, o = e17.compoundCount, a = e17[e17.length - 1]; n != null && (a.subject = n, e17.currentSubject = null), a.edgeCount = r, a.compoundCount = o, e17.edgeCount = 0, e17.compoundCount = 0; var i = e17[e17.length++] = Ht(); return i; } }, { name: "directedEdge", separator: true, regex: Ft.directedEdge, populate: function(e17, t) { if (e17.currentSubject == null) { var n = Ht(), r = t, o = Ht(); return n.checks.push({ type: We.DIRECTED_EDGE, source: r, target: o }), Ua(e17, t, n), e17.edgeCount++, o; } else { var a = Ht(), i = t, s = Ht(); return a.checks.push({ type: We.NODE_SOURCE, source: i, target: s }), Ua(e17, t, a), e17.edgeCount++, s; } } }, { name: "undirectedEdge", separator: true, regex: Ft.undirectedEdge, populate: function(e17, t) { if (e17.currentSubject == null) { var n = Ht(), r = t, o = Ht(); return n.checks.push({ type: We.UNDIRECTED_EDGE, nodes: [r, o] }), Ua(e17, t, n), e17.edgeCount++, o; } else { var a = Ht(), i = t, s = Ht(); return a.checks.push({ type: We.NODE_NEIGHBOR, node: i, neighbor: s }), Ua(e17, t, a), s; } } }, { name: "child", separator: true, regex: Ft.child, populate: function(e17, t) { if (e17.currentSubject == null) { var n = Ht(), r = Ht(), o = e17[e17.length - 1]; return n.checks.push({ type: We.CHILD, parent: o, child: r }), Ua(e17, t, n), e17.compoundCount++, r; } else if (e17.currentSubject === t) { var a = Ht(), i = e17[e17.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(e17, i, a), e17.currentSubject = u, e17.compoundCount++, l; } else { var d = Ht(), f = Ht(), h10 = [{ type: We.PARENT, parent: d, child: f }]; return d.checks = t.checks, t.checks = h10, e17.compoundCount++, f; } } }, { name: "descendant", separator: true, regex: Ft.descendant, populate: function(e17, t) { if (e17.currentSubject == null) { var n = Ht(), r = Ht(), o = e17[e17.length - 1]; return n.checks.push({ type: We.DESCENDANT, ancestor: o, descendant: r }), Ua(e17, t, n), e17.compoundCount++, r; } else if (e17.currentSubject === t) { var a = Ht(), i = e17[e17.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(e17, i, a), e17.currentSubject = u, e17.compoundCount++, l; } else { var d = Ht(), f = Ht(), h10 = [{ type: We.ANCESTOR, ancestor: d, descendant: f }]; return d.checks = t.checks, t.checks = h10, e17.compoundCount++, f; } } }, { name: "subject", modifier: true, regex: Ft.subject, populate: function(e17, t) { if (e17.currentSubject != null && e17.currentSubject !== t) return Mt("Redefinition of subject in selector `" + e17.toString() + "`"), false; e17.currentSubject = t; var n = e17[e17.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(e17) { return e17.regexObj = new RegExp("^" + e17.regex); }); var _ue = function(e17) { for (var t, n, r, o = 0; o < M0.length; o++) { var a = M0[o], i = a.name, s = e17.match(a.regexObj); if (s != null) { n = s, t = a, r = i; var u = s[0]; e17 = e17.substring(u.length); break; } } return { expr: t, match: n, name: r, remaining: e17 }; }; var Tue = function(e17) { var t = e17.match(/^\s+/); if (t) { var n = t[0]; e17 = e17.substring(n.length); } return e17; }; var Oue = function(e17) { var t = this, n = t.inputText = e17, r = t[0] = Ht(); for (t.length = 1, n = Tue(n); ; ) { var o = _ue(n); if (o.expr == null) return Mt("The selector `" + e17 + "`is invalid"), false; var a = o.match.slice(1), i = o.expr.populate(t, r, a); if (i === false) return false; 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 `" + e17 + "` is invalid because it uses both a compound selector and an edge selector"), false; if (l.edgeCount > 1) return Mt("The selector `" + e17 + "` is invalid because it uses multiple edge selectors"), false; l.edgeCount === 1 && Mt("The selector `" + e17 + "` 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 true; }; var Pue = function() { if (this.toStringCache != null) return this.toStringCache; for (var e17 = function(u) { return u ?? ""; }, t = function(u) { return at(u) ? '"' + u + '"' : e17(u); }, n = function(u) { return " " + u + " "; }, r = function(u, l) { var c = u.type, d = u.value; switch (c) { case We.GROUP: { var f = e17(d); return f.substring(0, f.length - 1); } case We.DATA_COMPARE: { var h10 = u.field, p = u.operator; return "[" + h10 + n(e17(p)) + t(d) + "]"; } case We.DATA_BOOL: { var v = u.operator, m = u.field; return "[" + e17(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(e17(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; }; var $ue = { parse: Oue, toString: Pue }; var LS = function(e17, t, n) { var r, o = at(e17), a = Ve(e17), i = at(n), s, u, l = false, c = false, d = false; switch (t.indexOf("!") >= 0 && (t = t.replace("!", ""), c = true), t.indexOf("@") >= 0 && (t = t.replace("@", ""), l = true), (o || i || l) && (s = !o && !a ? "" : "" + e17, u = "" + n), l && (e17 = 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 = e17 === n; break; case ">": d = true, r = e17 > n; break; case ">=": d = true, r = e17 >= n; break; case "<": d = true, r = e17 < n; break; case "<=": d = true, r = e17 <= n; break; default: r = false; break; } return c && (e17 != null || !d) && (r = !r), r; }; var Aue = function(e17, t) { switch (t) { case "?": return !!e17; case "!": return !e17; case "^": return e17 === void 0; } }; var Fue = function(e17) { return e17 !== void 0; }; var _y = function(e17, t) { return e17.data(t); }; var Iue = function(e17, t) { return e17[t](); }; var gn = []; var rn = function(e17, t) { return e17.checks.every(function(n) { return gn[n.type](n, t); }); }; gn[We.GROUP] = function(e17, t) { var n = e17.value; return n === "*" || n === t.group(); }; gn[We.STATE] = function(e17, t) { var n = e17.value; return Eue(n, t); }; gn[We.ID] = function(e17, t) { var n = e17.value; return t.id() === n; }; gn[We.CLASS] = function(e17, t) { var n = e17.value; return t.hasClass(n); }; gn[We.META_COMPARE] = function(e17, t) { var n = e17.field, r = e17.operator, o = e17.value; return LS(Iue(t, n), r, o); }; gn[We.DATA_COMPARE] = function(e17, t) { var n = e17.field, r = e17.operator, o = e17.value; return LS(_y(t, n), r, o); }; gn[We.DATA_BOOL] = function(e17, t) { var n = e17.field, r = e17.operator; return Aue(_y(t, n), r); }; gn[We.DATA_EXIST] = function(e17, t) { var n = e17.field; return e17.operator, Fue(_y(t, n)); }; gn[We.UNDIRECTED_EDGE] = function(e17, t) { var n = e17.nodes[0], r = e17.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(e17, t) { return rn(e17.node, t) && t.neighborhood().some(function(n) { return n.isNode() && rn(e17.neighbor, n); }); }; gn[We.DIRECTED_EDGE] = function(e17, t) { return rn(e17.source, t.source()) && rn(e17.target, t.target()); }; gn[We.NODE_SOURCE] = function(e17, t) { return rn(e17.source, t) && t.outgoers().some(function(n) { return n.isNode() && rn(e17.target, n); }); }; gn[We.NODE_TARGET] = function(e17, t) { return rn(e17.target, t) && t.incomers().some(function(n) { return n.isNode() && rn(e17.source, n); }); }; gn[We.CHILD] = function(e17, t) { return rn(e17.child, t) && rn(e17.parent, t.parent()); }; gn[We.PARENT] = function(e17, t) { return rn(e17.parent, t) && t.children().some(function(n) { return rn(e17.child, n); }); }; gn[We.DESCENDANT] = function(e17, t) { return rn(e17.descendant, t) && t.ancestors().some(function(n) { return rn(e17.ancestor, n); }); }; gn[We.ANCESTOR] = function(e17, t) { return rn(e17.ancestor, t) && t.descendants().some(function(n) { return rn(e17.descendant, n); }); }; gn[We.COMPOUND_SPLIT] = function(e17, t) { return rn(e17.subject, t) && rn(e17.left, t) && rn(e17.right, t); }; gn[We.TRUE] = function() { return true; }; gn[We.COLLECTION] = function(e17, t) { var n = e17.value; return n.has(t); }; gn[We.FILTER] = function(e17, t) { var n = e17.value; return n(t); }; var Nue = function(e17) { var t = this; if (t.length === 1 && t[0].checks.length === 1 && t[0].checks[0].type === We.ID) return e17.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 true; } return false; }; return t.text() == null && (n = function() { return true; }), e17.filter(n); }; var Lue = function(e17) { for (var t = this, n = 0; n < t.length; n++) { var r = t[n]; if (rn(r, e17)) return true; } return false; }; var Due = { matches: Lue, filter: Nue }; var bi = function(e17) { this.inputText = e17, this.currentSubject = null, this.compoundCount = 0, this.edgeCount = 0, this.length = 0, e17 == null || at(e17) && e17.match(/^\s*$/) || (Wr(e17) ? this.addQuery({ checks: [{ type: We.COLLECTION, value: e17.collection() }] }) : dn(e17) ? this.addQuery({ checks: [{ type: We.FILTER, value: e17 }] }) : at(e17) ? this.parse(e17) || (this.invalid = true) : vn("A selector must be created from a string; found ")); }; var wi = bi.prototype; [$ue, Due].forEach(function(e17) { return ct(wi, e17); }); wi.text = function() { return this.inputText; }; wi.size = function() { return this.length; }; wi.eq = function(e17) { return this[e17]; }; wi.sameText = function(e17) { return !this.invalid && !e17.invalid && this.text() === e17.text(); }; wi.addQuery = function(e17) { this[this.length++] = e17; }; wi.selector = wi.toString; var si = { allAre: function(e17) { var t = new bi(e17); return this.every(function(n) { return t.matches(n); }); }, is: function(e17) { var t = new bi(e17); return this.some(function(n) { return t.matches(n); }); }, some: function(e17, t) { for (var n = 0; n < this.length; n++) { var r = t ? e17.apply(t, [this[n], n, this]) : e17(this[n], n, this); if (r) return true; } return false; }, every: function(e17, t) { for (var n = 0; n < this.length; n++) { var r = t ? e17.apply(t, [this[n], n, this]) : e17(this[n], n, this); if (!r) return false; } return true; }, same: function(e17) { if (this === e17) return true; e17 = this.cy().collection(e17); var t = this.length, n = e17.length; return t !== n ? false : t === 1 ? this[0] === e17[0] : this.every(function(r) { return e17.hasElementWithId(r.id()); }); }, anySame: function(e17) { return e17 = this.cy().collection(e17), this.some(function(t) { return e17.hasElementWithId(t.id()); }); }, allAreNeighbors: function(e17) { e17 = this.cy().collection(e17); var t = this.neighborhood(); return e17.every(function(n) { return t.hasElementWithId(n.id()); }); }, contains: function(e17) { e17 = this.cy().collection(e17); var t = this; return e17.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(e17, 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), h10 = d[f]; return h10 || (d[f] = e17.call(s, n, r, o, a)); } else return e17.call(s, n, r, o, a); }; }; var Nl = { parent: function(e17) { 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, true).filter(e17); }, parents: function(e17) { 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, true).filter(e17); }, commonAncestors: function(e17) { 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(e17); }, orphans: function(e17) { return this.stdFilter(function(t) { return t.isOrphan(); }).filter(e17); }, nonorphans: function(e17) { return this.stdFilter(function(t) { return t.isChild(); }).filter(e17); }, children: eo(function(e17) { 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, true).filter(e17); }, "children"), siblings: function(e17) { return this.parent().children().not(this).filter(e17); }, isParent: function() { var e17 = this[0]; if (e17) return e17.isNode() && e17._private.children.length !== 0; }, isChildless: function() { var e17 = this[0]; if (e17) return e17.isNode() && e17._private.children.length === 0; }, isChild: function() { var e17 = this[0]; if (e17) return e17.isNode() && e17._private.parent != null; }, isOrphan: function() { var e17 = this[0]; if (e17) return e17.isNode() && e17._private.parent == null; }, descendants: function(e17) { 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, true).filter(e17); } }; function Ty(e17, t, n, r) { for (var o = [], a = new Kl(), i = e17.cy(), s = i.hasCompoundNodes(), u = 0; u < e17.length; u++) { var l = e17[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 e17; } function DS(e17, 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()) || e17.push(a); } } Nl.forEachDown = function(e17) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : true; return Ty(this, e17, t, DS); }; function RS(e17, t, n) { if (n.isChild()) { var r = n._private.parent; t.has(r.id()) || e17.push(r); } } Nl.forEachUp = function(e17) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : true; return Ty(this, e17, t, RS); }; function Rue(e17, t, n) { RS(e17, t, n), DS(e17, t, n); } Nl.forEachUpAndDown = function(e17) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : true; return Ty(this, e17, t, Rue); }; Nl.ancestors = Nl.parents; var xc; var BS; xc = BS = { data: Bt.data({ field: "data", bindingEvent: "data", allowBinding: true, allowSetting: true, settingEvent: "data", settingTriggersEvent: true, triggerFnName: "trigger", allowGetting: true, immutableKeys: { id: true, source: true, target: true, parent: true }, updateStyle: true }), removeData: Bt.removeData({ field: "data", event: "data", triggerFnName: "trigger", triggerEvent: true, immutableKeys: { id: true, source: true, target: true, parent: true }, updateStyle: true }), scratch: Bt.data({ field: "scratch", bindingEvent: "scratch", allowBinding: true, allowSetting: true, settingEvent: "scratch", settingTriggersEvent: true, triggerFnName: "trigger", allowGetting: true, updateStyle: true }), removeScratch: Bt.removeData({ field: "scratch", event: "scratch", triggerFnName: "trigger", triggerEvent: true, updateStyle: true }), rscratch: Bt.data({ field: "rscratch", allowBinding: false, allowSetting: true, settingTriggersEvent: false, allowGetting: true }), removeRscratch: Bt.removeData({ field: "rscratch", triggerEvent: false }), id: function() { var e17 = this[0]; if (e17) return e17._private.data.id; } }; xc.attr = xc.data; xc.removeAttr = xc.removeData; var Bue = BS; var xh = {}; function $v(e17) { return function(t) { var n = this; if (t === void 0 && (t = true), 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 += e17(o, s)); } return r; } else return; }; } ct(xh, { degree: $v(function(e17, t) { return t.source().same(t.target()) ? 2 : 1; }), indegree: $v(function(e17, t) { return t.target().same(e17) ? 1 : 0; }), outdegree: $v(function(e17, t) { return t.source().same(e17) ? 1 : 0; }) }); function Us(e17, t) { return function(n) { for (var r, o = this.nodes(), a = 0; a < o.length; a++) { var i = o[a], s = i[e17](n); s !== void 0 && (r === void 0 || t(s, r)) && (r = s); } return r; }; } ct(xh, { minDegree: Us("degree", function(e17, t) { return e17 < t; }), maxDegree: Us("degree", function(e17, t) { return e17 > t; }), minIndegree: Us("indegree", function(e17, t) { return e17 < t; }), maxIndegree: Us("indegree", function(e17, t) { return e17 > t; }), minOutdegree: Us("outdegree", function(e17, t) { return e17 < t; }), maxOutdegree: Us("outdegree", function(e17, t) { return e17 > t; }) }); ct(xh, { totalDegree: function(e17) { for (var t = 0, n = this.nodes(), r = 0; r < n.length; r++) t += n[r].degree(e17); return t; } }); var Po; var MS; var zS = function(e17, t, n) { for (var r = 0; r < e17.length; r++) { var o = e17[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(); } } }; var Bx = { field: "position", bindingEvent: "position", allowBinding: true, allowSetting: true, settingEvent: "position", settingTriggersEvent: true, triggerFnName: "emitAndNotify", allowGetting: true, validKeys: ["x", "y"], beforeGet: function(e17) { e17.updateCompoundBounds(); }, beforeSet: function(e17, t) { zS(e17, t, false); }, onSet: function(e17) { e17.dirtyCompoundBoundsCache(); }, canSet: function(e17) { return !e17.locked(); } }; Po = MS = { position: Bt.data(Bx), // position but no notification to renderer silentPosition: Bt.data(ct({}, Bx, { allowBinding: false, allowSetting: true, settingTriggersEvent: false, allowGetting: false, beforeSet: function(e17, t) { zS(e17, t, true); }, onSet: function(e17) { e17.dirtyCompoundBoundsCache(); } })), positions: function(e17, t) { if (It(e17)) t ? this.silentPosition(e17) : this.position(e17); else if (dn(e17)) { var n = e17, 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(e17) { return this.positions(e17, true); }, shift: function(e17, t, n) { var r; if (It(e17) ? (r = { x: Ve(e17.x) ? e17.x : 0, y: Ve(e17.y) ? e17.y : 0 }, n = t) : at(e17) && Ve(t) && (r = { x: 0, y: 0 }, r[e17] = 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(e17, t) { return It(e17) ? this.shift(e17, true) : at(e17) && Ve(t) && this.shift(e17, t, true), this; }, // get/set the rendered (i.e. on screen) positon of the element renderedPosition: function(e17, t) { var n = this[0], r = this.cy(), o = r.zoom(), a = r.pan(), i = It(e17) ? e17 : void 0, s = i !== void 0 || t !== void 0 && at(e17); if (n && n.isNode()) if (s) for (var u = 0; u < this.length; u++) { var l = this[u]; t !== void 0 ? l.position(e17, (t - a[e17]) / o) : i !== void 0 && l.position(pS(i, o, a)); } else { var c = n.position(); return i = gh(c, o, a), e17 === void 0 ? i : i[e17]; } else if (!s) return; return this; }, // get/set the position relative to the parent relativePosition: function(e17, t) { var n = this[0], r = this.cy(), o = It(e17) ? e17 : void 0, a = o !== void 0 || t !== void 0 && at(e17), 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(e17, t + f[e17]) : o !== void 0 && u.position({ x: o.x + f.x, y: o.y + f.y }); } else { var h10 = 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: h10.x - g.x, y: h10.y - g.y }, e17 === void 0 ? o : o[e17]; } 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; var ll; var $i; ll = $i = {}; $i.renderedBoundingBox = function(e17) { var t = this.boundingBox(e17), 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 e17 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : false, t = this.cy(); return !t.styleEnabled() || !t.hasCompoundNodes() ? this : (this.forEachUp(function(n) { if (n.isParent()) { var r = n._private; r.compoundBoundsClean = false, r.bbCache = null, e17 || n.emitAndNotify("bounds"); } }), this); }; $i.updateCompoundBounds = function() { var e17 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : false, t = this.cy(); if (!t.styleEnabled() || !t.hasCompoundNodes()) return this; if (!e17 && 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: false, // updating the compound bounds happens outside of the regular // cache cycle (i.e. before fired events) useCache: false }), 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 h10(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 = h10(c.width.val - d.w, v, m), w = x.biasDiff, C = x.biasComplementDiff, k = h10(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 || e17) && (n(o), t.batching() || (a.compoundBoundsClean = true)); } return this; }; var Jr = function(e17) { return e17 === 1 / 0 || e17 === -1 / 0 ? 0 : e17; }; var Eo = function(e17, t, n, r, o) { r - t === 0 || o - n === 0 || t == null || n == null || r == null || o == null || (e17.x1 = t < e17.x1 ? t : e17.x1, e17.x2 = r > e17.x2 ? r : e17.x2, e17.y1 = n < e17.y1 ? n : e17.y1, e17.y2 = o > e17.y2 ? o : e17.y2, e17.w = e17.x2 - e17.x1, e17.h = e17.y2 - e17.y1); }; var Vi = function(e17, t) { return t == null ? e17 : Eo(e17, t.x1, t.y1, t.x2, t.y2); }; var wu = function(e17, t, n) { return _o(e17, t, n); }; var Ud = function(e17, 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(e17, c.x1, c.y1, c.x2, c.y2); } } }; var Av = function(e17, 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), h10 = 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 += h10 - Math.max(g, x) - w - C, $ += h10 + 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 W = z ? wu(o.rstyle, "labelAngle", n) : m.pfValue, oe = Math.cos(W), Q = Math.sin(W), 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(e17, F, A, $, L), Eo(o.labelBounds.all, F, A, $, L); } return e17; } }; var zue = function(e17, 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 = (e17.w + i * 2) / e17.w, u = (e17.h + i * 2) / e17.h, l = 0, c = 0; ["diamond", "pentagon", "round-triangle"].includes(a) ? (s = (e17.w + i * 2.4) / e17.w, c = -i / 3.6) : ["concave-hexagon", "rhomboid", "right-rhomboid"].includes(a) ? s = (e17.w + i * 2.4) / e17.w : a === "star" ? (s = (e17.w + i * 2.8) / e17.w, u = (e17.h + i * 2.6) / e17.h, c = -i / 3.8) : a === "triangle" ? (s = (e17.w + i * 2.8) / e17.w, u = (e17.h + i * 2.4) / e17.h, c = -i / 1.4) : a === "vee" && (s = (e17.w + i * 4.4) / e17.w, u = (e17.h + i * 3.8) / e17.h, c = -i * 0.5); var d = e17.h * u - e17.h, f = e17.w * s - e17.w; if (vp(e17, [Math.ceil(d / 2), Math.ceil(f / 2)]), l != 0 || c !== 0) { var h10 = sie(e17, l, c); hS(e17, h10); } } } }; var Vue = function(e17, t) { var n = e17._private.cy, r = n.styleEnabled(), o = n.headless(), a = Br(), i = e17._private, s = e17.isNode(), u = e17.isEdge(), l, c, d, f, h10, p, v = i.rstyle, m = s && r ? e17.pstyle("bounds-expansion").pfValue : [0], g = function(_e) { return _e.pstyle("display").value !== "none"; }, b = !r || g(e17) && (!u || g(e17.source()) && g(e17.target())); if (b) { var x = 0, w = 0; r && t.includeOverlays && (x = e17.pstyle("overlay-opacity").value, x !== 0 && (w = e17.pstyle("overlay-padding").value)); var C = 0, k = 0; r && t.includeUnderlays && (C = e17.pstyle("underlay-opacity").value, C !== 0 && (k = e17.pstyle("underlay-padding").value)); var E = Math.max(w, k), S = 0, O = 0; if (r && (S = e17.pstyle("width").pfValue, O = S / 2), s && t.includeNodes) { var F = e17.position(); h10 = F.x, p = F.y; var $ = e17.outerWidth(), A = $ / 2, L = e17.outerHeight(), N = L / 2; l = h10 - A, c = h10 + A, d = p - N, f = p + N, Eo(a, l, d, c, f), r && t.includeOutlines && zue(a, e17); } else if (u && t.includeEdges) if (r && !o) { var M = e17.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 W; switch (M) { case "bezier": case "unbundled-bezier": W = v.bezierPts; break; case "segments": case "taxi": case "round-segments": case "round-taxi": W = v.linePts; break; } if (W != null) for (var oe = 0; oe < W.length; oe++) { var Q = W[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 = e17.source(), pe = ae.position(), we = e17.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, e17, "mid-source"), Ud(a, e17, "mid-target"), Ud(a, e17, "source"), Ud(a, e17, "target")), r) { var J = e17.pstyle("ghost").value === "yes"; if (J) { var te = e17.pstyle("ghost-offset-x").pfValue, le = e17.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, e17, null), u && (t.includeSourceLabels && Av(a, e17, "source"), t.includeTargetLabels && Av(a, e17, "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; }; var VS = function(e17) { var t = 0, n = function(o) { return (o ? 1 : 0) << t++; }, r = 0; return r += n(e17.incudeNodes), r += n(e17.includeEdges), r += n(e17.includeLabels), r += n(e17.includeMainLabels), r += n(e17.includeSourceLabels), r += n(e17.includeTargetLabels), r += n(e17.includeOverlays), r += n(e17.includeOutlines), r; }; var jS = function(e17) { if (e17.isEdge()) { var t = e17.source().position(), n = e17.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; }; var Mx = function(e17, t) { var n = e17._private, r, o = e17.isEdge(), a = t == null ? zx : VS(t), i = a === zx, s = jS(e17), u = n.bbCachePosKey === s, l = t.useCache && u, c = function(h10) { return h10._private.bbCache == null || h10._private.styleDirty; }, d = !l || c(e17) || o && c(e17.source()) || c(e17.target()); if (d ? (u || e17.recalculateRenderedStyle(l), r = Vue(e17, kc), n.bbCache = r, n.bbCachePosKey = s) : r = n.bbCache, !i) { var f = e17.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; }; var kc = { includeNodes: true, includeEdges: true, includeLabels: true, includeMainLabels: true, includeSourceLabels: true, includeTargetLabels: true, includeOverlays: true, includeUnderlays: true, includeOutlines: true, useCache: true }; var zx = VS(kc); var Vx = nr(kc); $i.boundingBox = function(e17) { var t; if (this.length === 1 && this[0]._private.bbCache != null && !this[0]._private.styleDirty && (e17 === void 0 || e17.useCache === void 0 || e17.useCache === true)) e17 === void 0 ? e17 = kc : e17 = Vx(e17), t = Mx(this[0], e17); else { t = Br(), e17 = e17 || kc; var n = Vx(e17), 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(!e17.useCache); for (var f = 0; f < r.length; f++) { var h10 = r[f]; Vi(t, Mx(h10, 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 e17 = 0; e17 < this.length; e17++) { var t = this[e17]._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(e17) { 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(e17)) { var a = e17; e17 = function() { return a; }; } var i = function(l, c) { return l._private.bbAtOldPos = e17(l, c); }, s = function(l) { return l._private.bbAtOldPos; }; n.startBatch(), t.forEach(i).silentPositions(e17), r && (o.dirtyCompoundBoundsCache(), o.dirtyBoundingBoxCache(), o.updateCompoundBounds(true)); var u = aie(this.boundingBox({ useCache: false })); return t.silentPositions(s), r && (o.dirtyCompoundBoundsCache(), o.dirtyBoundingBoxCache(), o.updateCompoundBounds(true)), n.endBatch(), u; }; ll.boundingbox = ll.bb = ll.boundingBox; ll.renderedBoundingbox = ll.renderedBoundingBox; var jue = $i; var Pu; var td; Pu = td = {}; var HS = function(e17) { e17.uppercaseName = cx(e17.name), e17.autoName = "auto" + e17.uppercaseName, e17.labelName = "label" + e17.uppercaseName, e17.outerName = "outer" + e17.uppercaseName, e17.uppercaseOuterName = cx(e17.outerName), Pu[e17.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[e17.autoName] || 0; var a = t.pstyle(e17.name); switch (a.strValue) { case "label": return t.recalculateRenderedStyle(), n.rstyle[e17.labelName] || 0; default: return a.pfValue; } } else return 1; }, Pu["outer" + e17.uppercaseName] = function() { var t = this[0], n = t._private, r = n.cy, o = r._private.styleEnabled; if (t) if (o) { var a = t[e17.name](), i = t.pstyle("border-width").pfValue, s = 2 * t.padding(); return a + i + s; } else return 1; }, Pu["rendered" + e17.uppercaseName] = function() { var t = this[0]; if (t) { var n = t[e17.name](); return n * this.cy().zoom(); } }, Pu["rendered" + e17.uppercaseOuterName] = function() { var t = this[0]; if (t) { var n = t[e17.outerName](); return n * this.cy().zoom(); } }; }; HS({ name: "width" }); HS({ name: "height" }); td.padding = function() { var e17 = this[0], t = e17._private; return e17.isParent() ? (e17.updateCompoundBounds(), t.autoPadding !== void 0 ? t.autoPadding : e17.pstyle("padding").pfValue) : e17.pstyle("padding").pfValue; }; td.paddedHeight = function() { var e17 = this[0]; return e17.height() + 2 * e17.padding(); }; td.paddedWidth = function() { var e17 = this[0]; return e17.width() + 2 * e17.padding(); }; var Hue = td; var Uue = function(e17, t) { if (e17.isEdge()) return t(e17); }; var que = function(e17, t) { if (e17.isEdge()) { var n = e17.cy(); return gh(t(e17), n.zoom(), n.pan()); } }; var Wue = function(e17, t) { if (e17.isEdge()) { var n = e17.cy(), r = n.pan(), o = n.zoom(); return t(e17).map(function(a) { return gh(a, o, r); }); } }; var Kue = function(e17) { return e17.renderer().getControlPoints(e17); }; var Gue = function(e17) { return e17.renderer().getSegmentPoints(e17); }; var Xue = function(e17) { return e17.renderer().getSourceEndpoint(e17); }; var Yue = function(e17) { return e17.renderer().getTargetEndpoint(e17); }; var Zue = function(e17) { return e17.renderer().getEdgeMidpoint(e17); }; var jx = { controlPoints: { get: Kue, mult: true }, segmentPoints: { get: Gue, mult: true }, sourceEndpoint: { get: Xue }, targetEndpoint: { get: Yue }, midpoint: { get: Zue } }; var Jue = function(e17) { return "rendered" + e17[0].toUpperCase() + e17.substr(1); }; var Que = Object.keys(jx).reduce(function(e17, t) { var n = jx[t], r = Jue(t); return e17[t] = function() { return Uue(this, n.get); }, n.mult ? e17[r] = function() { return Wue(this, n.get); } : e17[r] = function() { return que(this, n.get); }, e17; }, {}); var ece = ct({}, Mue, jue, Hue, Que); var US = function(e17, t) { this.recycle(e17, t); }; function xu() { return false; } function qd() { return true; } US.prototype = { instanceString: function() { return "event"; }, recycle: function(e17, t) { if (this.isImmediatePropagationStopped = this.isPropagationStopped = this.isDefaultPrevented = xu, e17 != null && e17.preventDefault ? (this.type = e17.type, this.isDefaultPrevented = e17.defaultPrevented ? qd : xu) : e17 != null && e17.type ? t = e17 : this.type = e17, 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 = e17 && e17.timeStamp || Date.now(); }, preventDefault: function() { this.isDefaultPrevented = qd; var e17 = this.originalEvent; e17 && e17.preventDefault && e17.preventDefault(); }, stopPropagation: function() { this.isPropagationStopped = qd; var e17 = this.originalEvent; e17 && e17.stopPropagation && e17.stopPropagation(); }, stopImmediatePropagation: function() { this.isImmediatePropagationStopped = qd, this.stopPropagation(); }, isDefaultPrevented: xu, isPropagationStopped: xu, isImmediatePropagationStopped: xu }; var qS = /^([^.]+)(\.(?:[^.]+))?$/; var tce = ".*"; var WS = { qualifierCompare: function(e17, t) { return e17 === t; }, eventMatches: function() { return true; }, addEventFields: function() { }, callbackContext: function(e17) { return e17; }, beforeEmit: function() { }, afterEmit: function() { }, bubble: function() { return false; }, parent: function() { return null; }, context: null }; var Hx = Object.keys(WS); var nce = {}; function kh() { for (var e17 = 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] = e17[r] || WS[r]; } this.context = t || this.context, this.listeners = [], this.emitting = 0; } var xi = kh.prototype; var KS = function(e17, 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, h10 = t(e17, l, d, f, r, o, a); if (h10 === false) break; } } } }; var Ux = function(e17, t) { return e17.addEventFields(e17.context, t), new US(t.type, t); }; var rce = function(e17, t, n) { if (Coe(n)) { t(e17, n); return; } else if (It(n)) { t(e17, Ux(e17, 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(e17, { type: s, namespace: u, target: e17.context }); t(e17, l); } } } }; xi.on = xi.addListener = function(e17, 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 }); }, e17, t, n, r, o), this; }; xi.one = function(e17, t, n, r) { return this.on(e17, t, n, r, { one: true }); }; xi.removeListener = xi.off = function(e17, 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, h10, p, v) { if ((l.type === f || e17 === "*") && (!h10 && l.namespace !== ".*" || l.namespace === h10) && (!p || c.qualifierCompare(l.qualifier, p)) && (!v || l.callback === v)) return a.splice(u, 1), false; }, e17, 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(e17, 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), h10 = c.callback.apply(f, d); a.afterEmit(a.context, c, i), h10 === false && (i.stopPropagation(), i.preventDefault()); } }, u = 0; u < o; u++) s(u); a.bubble(a.context) && !i.isPropagationStopped() && a.parent(a.context).emit(i, t); }, e17), this.emitting--, this; }; var oce = { qualifierCompare: function(e17, t) { return e17 == null || t == null ? e17 == null && t == null : e17.sameText(t); }, eventMatches: function(e17, t, n) { var r = t.qualifier; return r != null ? e17 !== n.target && Jc(n.target) && r.matches(n.target) : true; }, addEventFields: function(e17, t) { t.cy = e17.cy(), t.target = e17; }, callbackContext: function(e17, t, n) { return t.qualifier != null ? n.target : e17; }, beforeEmit: function(e17, t) { t.conf && t.conf.once && t.conf.onceCollection.removeListener(t.event, t.qualifier, t.callback); }, bubble: function() { return true; }, parent: function(e17) { return e17.isChild() ? e17.parent() : e17.cy(); } }; var Wd = function(e17) { return at(e17) ? new bi(e17) : e17; }; var GS = { createEmitter: function() { for (var e17 = 0; e17 < this.length; e17++) { var t = this[e17], n = t._private; n.emitter || (n.emitter = new kh(oce, t)); } return this; }, emitter: function() { return this._private.emitter; }, on: function(e17, t, n) { for (var r = Wd(t), o = 0; o < this.length; o++) { var a = this[o]; a.emitter().on(e17, r, n); } return this; }, removeListener: function(e17, t, n) { for (var r = Wd(t), o = 0; o < this.length; o++) { var a = this[o]; a.emitter().removeListener(e17, r, n); } return this; }, removeAllListeners: function() { for (var e17 = 0; e17 < this.length; e17++) { var t = this[e17]; t.emitter().removeAllListeners(); } return this; }, one: function(e17, t, n) { for (var r = Wd(t), o = 0; o < this.length; o++) { var a = this[o]; a.emitter().one(e17, r, n); } return this; }, once: function(e17, t, n) { for (var r = Wd(t), o = 0; o < this.length; o++) { var a = this[o]; a.emitter().on(e17, r, n, { once: true, onceCollection: this }); } }, emit: function(e17, t) { for (var n = 0; n < this.length; n++) { var r = this[n]; r.emitter().emit(e17, t); } return this; }, emitAndNotify: function(e17, t) { if (this.length !== 0) return this.cy().notify(e17, this), this.emit(e17, t), this; } }; Bt.eventAliasesOn(GS); var XS = { nodes: function(e17) { return this.filter(function(t) { return t.isNode(); }).filter(e17); }, edges: function(e17) { return this.filter(function(t) { return t.isEdge(); }).filter(e17); }, // internal helper to get nodes and edges as separate collections with single iteration over elements byGroup: function() { for (var e17 = this.spawn(), t = this.spawn(), n = 0; n < this.length; n++) { var r = this[n]; r.isNode() ? e17.push(r) : t.push(r); } return { nodes: e17, edges: t }; }, filter: function(e17, t) { if (e17 === void 0) return this; if (at(e17) || Wr(e17)) return new bi(e17).filter(this); if (dn(e17)) { for (var n = this.spawn(), r = this, o = 0; o < r.length; o++) { var a = r[o], i = t ? e17.apply(t, [a, o, r]) : e17(a, o, r); i && n.push(a); } return n; } return this.spawn(); }, not: function(e17) { if (e17) { at(e17) && (e17 = this.filter(e17)); for (var t = this.spawn(), n = 0; n < this.length; n++) { var r = this[n], o = e17.has(r); o || t.push(r); } return t; } else return this; }, absoluteComplement: function() { var e17 = this.cy(); return e17.mutableElements().not(this); }, intersect: function(e17) { if (at(e17)) { var t = e17; return this.filter(t); } for (var n = this.spawn(), r = this, o = e17, a = this.length < e17.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(e17) { var t = this._private.cy; at(e17) && (e17 = t.$(e17)); var n = this.spawn(), r = this, o = e17, 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(e17) { var t = this._private.cy; at(e17) && (e17 = t.$(e17)); var n = this.spawn(), r = this.spawn(), o = this.spawn(), a = this, i = e17, s = function(u, l, c) { for (var d = 0; d < u.length; d++) { var f = u[d], h10 = f._private.data.id, p = l.hasElementWithId(h10); p ? o.merge(f) : c.push(f); } }; return s(a, i, n), s(i, a, r), { left: n, right: r, both: o }; }, add: function(e17) { var t = this._private.cy; if (!e17) return this; if (at(e17)) { var n = e17; e17 = t.mutableElements().filter(n); } for (var r = this.spawnSelf(), o = 0; o < e17.length; o++) { var a = e17[o], i = !this.has(a); i && r.push(a); } return r; }, // in place merge on calling collection merge: function(e17) { var t = this._private, n = t.cy; if (!e17) return this; if (e17 && at(e17)) { var r = e17; e17 = n.mutableElements().filter(r); } for (var o = t.map, a = 0; a < e17.length; a++) { var i = e17[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(e17) { var t = this[e17], n = t.id(), r = this._private, o = r.map; this[e17] = void 0, o.delete(n); var a = e17 === 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[e17] = s, o.set(u, { ele: s, index: e17 }); } return this.length--, this; }, // remove single ele in place in calling collection unmergeOne: function(e17) { e17 = e17[0]; var t = this._private, n = e17._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(e17) { var t = this._private.cy; if (!e17) return this; if (e17 && at(e17)) { var n = e17; e17 = t.mutableElements().filter(n); } for (var r = 0; r < e17.length; r++) this.unmergeOne(e17[r]); return this; }, unmergeBy: function(e17) { for (var t = this.length - 1; t >= 0; t--) { var n = this[t]; e17(n) && this.unmergeAt(t); } return this; }, map: function(e17, t) { for (var n = [], r = this, o = 0; o < r.length; o++) { var a = r[o], i = t ? e17.apply(t, [a, o, r]) : e17(a, o, r); n.push(i); } return n; }, reduce: function(e17, t) { for (var n = t, r = this, o = 0; o < r.length; o++) n = e17(n, r[o], o, r); return n; }, max: function(e17, t) { for (var n = -1 / 0, r, o = this, a = 0; a < o.length; a++) { var i = o[a], s = t ? e17.apply(t, [i, a, o]) : e17(i, a, o); s > n && (n = s, r = i); } return { value: n, ele: r }; }, min: function(e17, t) { for (var n = 1 / 0, r, o = this, a = 0; a < o.length; a++) { var i = o[a], s = t ? e17.apply(t, [i, a, o]) : e17(i, a, o); s < n && (n = s, r = i); } return { value: n, ele: r }; } }; var 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 e17 = this[0]; if (e17) return e17._private.group; } }; var YS = function(e17, t) { var n = e17.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(e17) - 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(e17) - i(t); if (s !== 0) return s; var u = e17.pstyle("z-index").value - t.pstyle("z-index").value; return u !== 0 ? u : e17.poolIndex() - t.poolIndex(); }; var af = { forEach: function(e17, t) { if (dn(e17)) for (var n = this.length, r = 0; r < n; r++) { var o = this[r], a = t ? e17.apply(t, [o, r, this]) : e17(o, r, this); if (a === false) break; } return this; }, toArray: function() { for (var e17 = [], t = 0; t < this.length; t++) e17.push(this[t]); return e17; }, slice: function(e17, t) { var n = [], r = this.length; t == null && (t = r), e17 == null && (e17 = 0), e17 < 0 && (e17 = r + e17), t < 0 && (t = r + t); for (var o = e17; o >= 0 && o < t && o < r; o++) n.push(this[o]); return this.spawn(n); }, size: function() { return this.length; }, eq: function(e17) { return this[e17] || 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(e17) { if (!dn(e17)) return this; var t = this.toArray().sort(e17); return this.spawn(t); }, sortByZIndex: function() { return this.sort(YS); }, zDepth: function() { var e17 = this[0]; if (e17) { var t = e17._private, n = t.group; if (n === "nodes") { var r = t.data.parent ? e17.parents().size() : 0; return e17.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 e17 = "undefined", t = (typeof Symbol > "u" ? "undefined" : Dn(Symbol)) != e17 && Dn(Symbol.iterator) != e17; t && (af[Symbol.iterator] = function() { var n = this, r = { value: void 0, done: false }, o = 0, a = this.length; return WE({ next: function() { return o < a ? r.value = n[o++] : (r.value = void 0, r.done = true), r; } }, Symbol.iterator, function() { return this; }); }); }; ice(); var sce = nr({ nodeDimensionsIncludeLabels: false }); var mp = { // Calculates and returns node dimensions { x, y } based on options given layoutDimensions: function(e17) { e17 = sce(e17); var t; if (!this.takesUpSpace()) t = { w: 0, h: 0 }; else if (e17.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(e17, 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); e17.emit({ type: "layoutstart", layout: e17 }), e17.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 h10 = 0; h10 < r.length; h10++) { var p = r[h10], v = f(p, h10), m = t.animateFilter == null || t.animateFilter(p, h10); if (m) { var g = p.animation({ position: v, duration: t.animationDuration, easing: t.animationEasing }); e17.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 }); e17.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 }); e17.animations.push(x); } e17.animations.forEach(function(w) { return w.play(); }), e17.one("layoutready", t.ready), e17.emit({ type: "layoutready", layout: e17 }), Gl.all(e17.animations.map(function(w) { return w.promise(); })).then(function() { e17.one("layoutstop", t.stop), e17.emit({ type: "layoutstop", layout: e17 }); }); } 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), e17.one("layoutready", t.ready), e17.emit({ type: "layoutready", layout: e17 }), e17.one("layoutstop", t.stop), e17.emit({ type: "layoutstop", layout: e17 }); return this; }, layout: function(e17) { var t = this.cy(); return t.makeLayout(ct({}, e17, { eles: this })); } }; mp.createLayout = mp.makeLayout = mp.layout; function ZS(e17, t, n) { var r = n._private, o = r.styleCache = r.styleCache || [], a; return (a = o[e17]) != null || (a = o[e17] = t(n)), a; } function Ch(e17, t) { return e17 = ys(e17), function(n) { return ZS(e17, t, n); }; } function Eh(e17, t) { e17 = ys(e17); var n = function(r) { return t.call(r); }; return function() { var r = this[0]; if (r) return ZS(e17, n, r); }; } var er = { recalculateRenderedStyle: function(e17) { var t = this.cy(), n = t.renderer(), r = t.styleEnabled(); return n && r && n.recalculateRenderedStyle(this, e17), this; }, dirtyStyleCache: function() { var e17 = this.cy(), t = function(r) { return r._private.styleCache = null; }; if (e17.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(e17) { 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; e17 = !!(e17 || e17 === void 0), r && (o = this.spawnSelf().merge(this.descendants()).merge(this.parents())); var a = o; return e17 ? a.emitAndNotify("style") : a.emit("style"), o.forEach(function(i) { return i._private.styleDirty = true; }), this; }, // private: clears dirty flag and recalculates style cleanStyle: function() { var e17 = this.cy(); if (e17.styleEnabled()) for (var t = 0; t < this.length; t++) { var n = this[t]; n._private.styleDirty && (n._private.styleDirty = false, e17.style().apply(n)); } }, // get the internal parsed style object for the specified property parsedStyle: function(e17) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : true, n = this[0], r = n.cy(); if (r.styleEnabled() && n) { this.cleanStyle(); var o = n._private.style[e17]; return o ?? (t ? r.style().getDefaultProperty(e17) : null); } }, numericStyle: function(e17) { var t = this[0]; if (t.cy().styleEnabled() && t) { var n = t.pstyle(e17); return n.pfValue !== void 0 ? n.pfValue : n.value; } }, numericStyleUnits: function(e17) { var t = this[0]; if (t.cy().styleEnabled() && t) return t.pstyle(e17).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(e17) { var t = this.cy(); if (!t.styleEnabled()) return this; var n = this[0]; if (n) return t.style().getRenderedStyle(n, e17); }, // read the calculated css style of the element or override the style (via a bypass) style: function(e17, t) { var n = this.cy(); if (!n.styleEnabled()) return this; var r = false, o = n.style(); if (It(e17)) { var a = e17; o.applyBypass(this, a, r), this.emitAndNotify("style"); } else if (at(e17)) if (t === void 0) { var i = this[0]; return i ? o.getStylePropertyValue(i, e17) : void 0; } else o.applyBypass(this, e17, t, r), this.emitAndNotify("style"); else if (e17 === void 0) { var s = this[0]; return s ? o.getRawStyle(s) : void 0; } return this; }, removeStyle: function(e17) { var t = this.cy(); if (!t.styleEnabled()) return this; var n = false, r = t.style(), o = this; if (e17 === void 0) for (var a = 0; a < o.length; a++) { var i = o[a]; r.removeAllBypasses(i, n); } else { e17 = e17.split(/\s+/); for (var s = 0; s < o.length; s++) { var u = o[s]; r.removeBypasses(u, e17, 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 e17 = this.cy(); if (!e17.styleEnabled()) return 1; var t = e17.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 e17 = this.cy(); if (!e17.styleEnabled()) return false; var t = this[0], n = t.cy().hasCompoundNodes(); if (t) return n ? t.effectiveOpacity() === 0 : t.pstyle("opacity").value === 0; }, backgrounding: function() { var e17 = this.cy(); if (!e17.styleEnabled()) return false; var t = this[0]; return !!t._private.backgrounding; } }; function Fv(e17, t) { var n = e17._private, r = n.data.parent ? e17.parents() : null; if (r) for (var o = 0; o < r.length; o++) { var a = r[o]; if (!t(a)) return false; } return true; } function Oy(e17) { var t = e17.ok, n = e17.edgeOkViaNode || e17.ok, r = e17.parentOk || e17.ok; return function() { var o = this.cy(); if (!o.styleEnabled()) return true; var a = this[0], i = o.hasCompoundNodes(); if (a) { var s = a._private; if (!t(a)) return false; 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(e17) { return e17.pstyle("display").value === "element" && e17.width() !== 0 && (e17.isNode() ? e17.height() !== 0 : true); }); er.takesUpSpace = Eh("takesUpSpace", Oy({ ok: Jl })); var lce = Ch("eleInteractive", function(e17) { return e17.pstyle("events").value === "yes" && e17.pstyle("visibility").value === "visible" && Jl(e17); }); var uce = Ch("parentInteractive", function(e17) { return e17.pstyle("visibility").value === "visible" && Jl(e17); }); er.interactive = Eh("interactive", Oy({ ok: lce, parentOk: uce, edgeOkViaNode: Jl })); er.noninteractive = function() { var e17 = this[0]; if (e17) return !e17.interactive(); }; var cce = Ch("eleVisible", function(e17) { return e17.pstyle("visibility").value === "visible" && e17.pstyle("opacity").pfValue !== 0 && Jl(e17); }); var dce = Jl; er.visible = Eh("visible", Oy({ ok: cce, edgeOkViaNode: dce })); er.hidden = function() { var e17 = this[0]; if (e17) return !e17.visible(); }; er.isBundledBezier = Eh("isBundledBezier", function() { return this.cy().styleEnabled() ? !this.removed() && this.pstyle("curve-style").value === "bezier" && this.takesUpSpace() : false; }); er.bypass = er.css = er.style; er.renderedCss = er.renderedStyle; er.removeBypass = er.removeCss = er.removeStyle; er.pstyle = er.parsedStyle; var li = {}; function qx(e17) { return function() { var t = arguments, n = []; if (t.length === 2) { var r = t[0], o = t[1]; this.on(e17.event, r, o); } else if (t.length === 1 && dn(t[0])) { var a = t[0]; this.on(e17.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 = !e17.ableField || u._private[e17.ableField], c = u._private[e17.field] != e17.value; if (e17.overrideAble) { var d = e17.overrideAble(u); if (d !== void 0 && (l = d, !d)) return this; } l && (u._private[e17.field] = e17.value, c && n.push(u)); } var f = this.spawn(n); f.updateStyle(), f.emit(e17.event), i && f.emit(i); } return this; }; } function Ql(e17) { li[e17.field] = function() { var t = this[0]; if (t) { if (e17.overrideField) { var n = e17.overrideField(t); if (n !== void 0) return n; } return t._private[e17.field]; } }, li[e17.on] = qx({ event: e17.on, field: e17.field, ableField: e17.ableField, overrideAble: e17.overrideAble, value: true }), li[e17.off] = qx({ event: e17.off, field: e17.field, ableField: e17.ableField, overrideAble: e17.overrideAble, value: false }); } Ql({ field: "locked", overrideField: function(e17) { return e17.cy().autolock() ? true : void 0; }, on: "lock", off: "unlock" }); Ql({ field: "grabbable", overrideField: function(e17) { return e17.cy().autoungrabify() || e17.pannable() ? false : void 0; }, on: "grabify", off: "ungrabify" }); Ql({ field: "selected", ableField: "selectable", overrideAble: function(e17) { return e17.cy().autounselectify() ? false : void 0; }, on: "select", off: "unselect" }); Ql({ field: "selectable", overrideField: function(e17) { return e17.cy().autounselectify() ? false : void 0; }, on: "selectify", off: "unselectify" }); li.deselect = li.unselect; li.grabbed = function() { var e17 = this[0]; if (e17) return e17._private.grabbed; }; Ql({ field: "active", on: "activate", off: "unactivate" }); Ql({ field: "pannable", on: "panify", off: "unpanify" }); li.inactive = function() { var e17 = this[0]; if (e17) return !e17._private.active; }; var dr = {}; var Wx = function(e17) { return function(t) { for (var n = this, r = [], o = 0; o < n.length; o++) { var a = n[o]; if (a.isNode()) { for (var i = false, s = a.connectedEdges(), u = 0; u < s.length; u++) { var l = s[u], c = l.source(), d = l.target(); if (e17.noIncomingEdges && d === a && c !== a || e17.noOutgoingEdges && c === a && d !== a) { i = true; break; } } i || r.push(a); } } return this.spawn(r, true).filter(t); }; }; var Kx = function(e17) { 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(); e17.outgoing && l === a ? (r.push(u), r.push(c)) : e17.incoming && c === a && (r.push(u), r.push(l)); } } return this.spawn(r, true).filter(t); }; }; var Gx = function(e17) { return function(t) { for (var n = this, r = [], o = {}; ; ) { var a = e17.outgoing ? n.outgoers() : n.incomers(); if (a.length === 0) break; for (var i = false, s = 0; s < a.length; s++) { var u = a[s], l = u.id(); o[l] || (o[l] = true, r.push(u), i = true); } if (!i) break; n = a; } return this.spawn(r, true).filter(t); }; }; dr.clearTraversalCache = function() { for (var e17 = 0; e17 < this.length; e17++) this[e17]._private.traversalCache = null; }; ct(dr, { // get the root nodes in the DAG roots: Wx({ noIncomingEdges: true }), // get the leaf nodes in the DAG leaves: Wx({ noOutgoingEdges: true }), // normally called children in graph theory // these nodes =edges=> outgoing nodes outgoers: eo(Kx({ outgoing: true }), "outgoers"), // aka DAG descendants successors: Gx({ outgoing: true }), // normally called parents in graph theory // these nodes <=edges= incoming nodes incomers: eo(Kx({ incoming: true }), "incomers"), // aka DAG ancestors predecessors: Gx({ incoming: true }) }); ct(dr, { neighborhood: eo(function(e17) { 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, true).filter(e17); }, "neighborhood"), closedNeighborhood: function(e17) { return this.neighborhood().add(this).filter(e17); }, openNeighborhood: function(e17) { return this.neighborhood(e17); } }); dr.neighbourhood = dr.neighborhood; dr.closedNeighbourhood = dr.closedNeighborhood; dr.openNeighbourhood = dr.openNeighborhood; ct(dr, { source: eo(function(e17) { var t = this[0], n; return t && (n = t._private.source || t.cy().collection()), n && e17 ? n.filter(e17) : n; }, "source"), target: eo(function(e17) { var t = this[0], n; return t && (n = t._private.target || t.cy().collection()), n && e17 ? n.filter(e17) : n; }, "target"), sources: Xx({ attr: "source" }), targets: Xx({ attr: "target" }) }); function Xx(e17) { return function(t) { for (var n = [], r = 0; r < this.length; r++) { var o = this[r], a = o._private[e17.attr]; a && n.push(a); } return this.spawn(n, true).filter(t); }; } ct(dr, { edgesWith: eo(Yx(), "edgesWith"), edgesTo: eo(Yx({ thisIsSrc: true }), "edgesTo") }); function Yx(e17) { return function(t) { var n = [], r = this._private.cy, o = e17 || {}; 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, true); }; } ct(dr, { connectedEdges: eo(function(e17) { 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, true).filter(e17); }, "connectedEdges"), connectedNodes: eo(function(e17) { 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, true).filter(e17); }, "connectedNodes"), parallelEdges: eo(Zx(), "parallelEdges"), codirectedEdges: eo(Zx({ codirected: true }), "codirectedEdges") }); function Zx(e17) { var t = { codirected: false }; return e17 = ct({}, t, e17), function(n) { for (var r = [], o = this.edges(), a = e17, 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, h10 = 0; h10 < f.length; h10++) { var p = f[h10], 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, true).filter(n); }; } ct(dr, { components: function(e17) { var t = this, n = t.cy(), r = n.collection(), o = e17 == null ? t.nodes() : e17.nodes(), a = []; e17 != null && o.empty() && (o = e17.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: false, 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 e17 = this[0]; return e17.cy().mutableElements().components(e17)[0]; } }); dr.componentsOf = dr.components; var tr = function(e17, t) { var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false, r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : false; if (e17 === void 0) { vn("A collection must have a reference to the core"); return; } var o = new Go(), a = false; if (!t) t = []; else if (t.length > 0 && It(t[0]) && !Jc(t[0])) { a = true; 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 (e17.hasElementWithId(d.id) || s.has(d.id)) continue; var f = new vh(e17, c, false); i.push(f), s.add(d.id); } t = i; } this.length = 0; for (var h10 = 0, p = t.length; h10 < p; h10++) { var v = t[h10][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: e17, 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(); }; var Qt = vh.prototype = tr.prototype = Object.create(Array.prototype); Qt.instanceString = function() { return "collection"; }; Qt.spawn = function(e17, t) { return new tr(this.cy(), e17, 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, true); }; Qt.hasElementWithId = function(e17) { return e17 = "" + e17, this._private.map.has(e17); }; Qt.getElementById = function(e17) { e17 = "" + e17; var t = this._private.cy, n = this._private.map.get(e17); return n ? n.ele : new tr(t); }; Qt.$id = Qt.getElementById; Qt.poolIndex = function() { var e17 = this._private.cy, t = e17._private.elements, n = this[0]._private.data.id; return t._private.map.get(n).index; }; Qt.indexOf = function(e17) { var t = e17[0]._private.data.id; return this._private.map.get(t).index; }; Qt.indexOfId = function(e17) { return e17 = "" + e17, this._private.map.get(e17).index; }; Qt.json = function(e17) { var t = this.element(), n = this.cy(); if (t == null && e17) return this; if (t != null) { var r = t._private; if (It(e17)) { if (n.startBatch(), e17.data) { t.data(e17.data); var o = r.data; if (t.isEdge()) { var a = false, i = {}, s = e17.data.source, u = e17.data.target; s != null && s != o.source && (i.source = "" + s, a = true), u != null && u != o.target && (i.target = "" + u, a = true), a && (t = t.move(i)); } else { var l = "parent" in e17.data, c = e17.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 })); } } e17.position && t.position(e17.position); var d = function(p, v, m) { var g = e17[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"), e17.classes != null && t.classes(e17.classes), n.endBatch(), this; } else if (e17 === 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 h10 = 0; return r.classes.forEach(function(p) { return f.classes += h10++ === 0 ? p : " " + p; }), f; } } }; Qt.jsons = function() { for (var e17 = [], t = 0; t < this.length; t++) { var n = this[t], r = n.json(); e17.push(r); } return e17; }; Qt.clone = function() { for (var e17 = this.cy(), t = [], n = 0; n < this.length; n++) { var r = this[n], o = r.json(), a = new vh(e17, o, false); t.push(a); } return new tr(e17, t); }; Qt.copy = Qt.clone; Qt.restore = function() { for (var e17 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : true, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : true, 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 h10 = s[d], p = h10._private, v = p.data; if (h10.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 (h10.isNode()) { var g = p.position; g.x == null && (g.x = 0), g.y == null && (g.y = 0); } if (h10.isEdge()) { for (var b = h10, x = ["source", "target"], w = x.length, C = false, 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 = true) : r.hasElementWithId(S) || (vn("Can not create edge `" + m + "` with nonexistant " + E + " `" + S + "`"), C = true); } 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: h10, index: 0 }), p.removed = false, t && r.addToPool(h10); } 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 = false, R = I; !R.empty(); ) { if (A.same(R)) { z = true, L.parent = void 0; break; } R = R.parent(); } z || (I[0]._private.children.push(A), A._private.parent = I[0], o.hasCompoundNodes = true); } } } if (s.length > 0) { for (var W = s.length === n.length ? n : new tr(r, s), oe = 0; oe < W.length; oe++) { var Q = W[oe]; Q.isNode() || (Q.parallelEdges().clearTraversalCache(), Q.source().clearTraversalCache(), Q.target().clearTraversalCache()); } var ae; o.hasCompoundNodes ? ae = r.collection().merge(W).merge(W.connectedNodes()).merge(W.parent()) : ae = W, ae.dirtyCompoundBoundsCache().dirtyBoundingBoxCache().updateStyle(e17), e17 ? W.emitAndNotify("add") : t && W.emit("add"); } return n; }; Qt.removed = function() { var e17 = this[0]; return e17 && e17._private.removed; }; Qt.inside = function() { var e17 = this[0]; return e17 && !e17._private.removed; }; Qt.remove = function() { var e17 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : true, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : true, 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()] = true, 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 h10(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] = true, 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]; h10(k), k.isBundledBezier() && k.dirtyBoundingBoxCache(); } } else { var E = g.parent(); E.length !== 0 && v(E, g); } t && (g._private.removed = true); } var S = a._private.elements; a._private.hasCompoundNodes = false; for (var O = 0; O < S.length; O++) { var F = S[O]; if (F.isParent()) { a._private.hasCompoundNodes = true; break; } } var $ = new tr(this.cy(), r); $.size() > 0 && (e17 ? $.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(e17) { var t = this._private.cy, n = this, r = false, o = false, a = function(h10) { return h10 == null ? h10 : "" + h10; }; if (e17.source !== void 0 || e17.target !== void 0) { var i = a(e17.source), s = a(e17.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 h10 = 0; h10 < n.length; h10++) { var p = n[h10], v = p._private.data; p.isEdge() && (u && (v.source = i), l && (v.target = s)); } n.restore(r, o); }), n.emitAndNotify("move")); } else if (e17.parent !== void 0) { var c = a(e17.parent), d = c === null || t.hasElementWithId(c); if (d) { var f = c === null ? void 0 : c; t.batch(function() { var h10 = n.remove(r, o); h10.emitAndNotify("moveout"); for (var p = 0; p < n.length; p++) { var v = n[p], m = v._private.data; v.isNode() && (m.parent = f); } h10.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(e17) { ct(Qt, e17); }); var pce = { add: function(e17) { var t, n = this; if (Wr(e17)) { var r = e17; 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(e17)) { var s = e17; t = new tr(n, s); } else if (It(e17) && (Gt(e17.nodes) || Gt(e17.edges))) { for (var u = e17, l = [], c = ["nodes", "edges"], d = 0, f = c.length; d < f; d++) { var h10 = c[d], p = u[h10]; if (Gt(p)) for (var v = 0, m = p.length; v < m; v++) { var g = ct({ group: h10 }, p[v]); l.push(g); } } t = new tr(n, l); } else { var b = e17; t = new vh(n, b).collection(); } return t; }, remove: function(e17) { if (!Wr(e17) && at(e17)) { var t = e17; e17 = this.$(t); } return e17.remove(); } }; function fce(e17, 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 false; for (var d = 0; d < 4; ++d) if (typeof arguments[d] != "number" || isNaN(arguments[d]) || !isFinite(arguments[d])) return false; e17 = Math.min(e17, 1), n = Math.min(n, 1), e17 = Math.max(e17, 0), n = Math.max(n, 0); var f = c ? new Float32Array(u) : new Array(u); function h10(F, $) { return 1 - 3 * $ + 3 * F; } function p(F, $) { return 3 * $ - 6 * F; } function v(F) { return 3 * F; } function m(F, $, A) { return ((h10($, A) * F + p($, A)) * F + v($)) * F; } function g(F, $, A) { return 3 * h10($, A) * F * F + 2 * p($, A) * F + v($); } function b(F, $) { for (var A = 0; A < o; ++A) { var L = g($, e17, n); if (L === 0) return $; var N = m($, e17, n) - F; $ -= N / L; } return $; } function x() { for (var F = 0; F < u; ++F) f[F] = m(F * l, e17, n); } function w(F, $, A) { var L, N, M = 0; do N = $ + (A - $) / 2, L = m(N, e17, 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, e17, n); return I >= a ? b(F, M) : I === 0 ? M : w(F, $, $ + l); } var k = false; function E() { k = true, (e17 !== t || n !== r) && x(); } var S = function(F) { return k || E(), e17 === t && n === r ? F : F === 0 ? 0 : F === 1 ? 1 : m(C(F), t, r); }; S.getControlPoints = function() { return [{ x: e17, y: t }, { x: n, y: r }]; }; var O = "generateBezier(" + [e17, t, n, r] + ")"; return S.toString = function() { return O; }, S; } var hce = /* @__PURE__ */ function() { function e17(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: e17(i) }; } function n(r, o) { var a = { dx: r.v, dv: e17(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, h10, 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), h10 = l / i * d) : h10 = d; p = n(p || s, h10), 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; }; }(); var Zt = function(e17, t, n, r) { var o = fce(e17, t, n, r); return function(a, i, s) { return a + (i - a) * o(s); }; }; var yp = { linear: function(e17, t, n) { return e17 + (t - e17) * 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(e17, t, n) { if (n === 0) return yp.linear; var r = hce(e17, t, n); return function(o, a, i) { return o + (a - o) * r(i); }; }, "cubic-bezier": Zt }; function Jx(e17, t, n, r, o) { if (r === 1 || t === n) return n; var a = o(t, n, r); return e17 == null || ((e17.roundValue || e17.color) && (a = Math.round(a)), e17.min !== void 0 && (a = Math.max(a, e17.min)), e17.max !== void 0 && (a = Math.min(a, e17.max))), a; } function Qx(e17, t) { return e17.pfValue != null || e17.value != null ? e17.pfValue != null && (t == null || t.type.units !== "%") ? e17.pfValue : e17.value : e17; } function qs(e17, t, n, r, o) { var a = o != null ? o.type : null; n < 0 ? n = 0 : n > 1 && (n = 1); var i = Qx(e17, 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(e17, t, n, r) { var o = !r, a = e17._private, i = t._private, s = i.easing, u = i.startTime, l = r ? e17 : e17.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 h10, p; at(d) ? (h10 = d, p = []) : (h10 = d[1], p = d.slice(2).map(function(W) { return +W; })), p.length > 0 ? (h10 === "spring" && p.push(i.duration), i.easingImpl = yp[h10].apply(null, p)) : i.easingImpl = yp[h10]; } 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 && !e17.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)), e17.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)), e17.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)), e17.emit("zoom")), (E || F) && e17.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(e17, N, R); } e17.emit("style"); } } return i.progress = m, m; } function ku(e17, t) { return e17 == null || t == null ? false : Ve(e17) && Ve(t) ? true : !!(e17 && t); } function gce(e17, t, n, r) { var o = t._private; o.started = true, o.startTime = n - o.progress * o.duration; } function ek(e17, t) { var n = t._private.aniEles, r = []; function o(c, d) { var f = c._private, h10 = f.animation.current, p = f.animation.queue, v = false; if (h10.length === 0) { var m = p.shift(); m && h10.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 = h10.length - 1; b >= 0; b--) { var x = h10[b], w = x._private; if (w.stopped) { h10.splice(b, 1), w.hooked = false, w.playing = false, w.started = false, g(w.frames); continue; } !w.playing && !w.applying || (w.playing && w.applying && (w.applying = false), w.started || gce(c, x, e17), vce(c, x, e17, d), w.applying && (w.applying = false), g(w.frames), w.step != null && w.step(e17), x.completed() && (h10.splice(b, 1), w.hooked = false, w.playing = false, w.started = false, g(w.completes)), v = true); } return !d && h10.length === 0 && p.length === 0 && r.push(c), v; } for (var a = false, i = 0; i < n.length; i++) { var s = n[i], u = o(s); a = a || u; } var l = o(t, true); (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(e17) { var t = this; t.styleEnabled() && t._private.aniEles.merge(e17); }, stopAnimationLoop: function() { this._private.animationsRunning = false; }, startAnimationLoop: function() { var e17 = this; if (e17._private.animationsRunning = true, !e17.styleEnabled()) return; function t() { e17._private.animationsRunning && ef(function(r) { ek(r, e17), t(); }); } var n = e17.renderer(); n && n.beforeRender ? n.beforeRender(function(r, o) { ek(o, e17); }, n.beforeRenderPriorities.animations) : t(); } }; var yce = { qualifierCompare: function(e17, t) { return e17 == null || t == null ? e17 == null && t == null : e17.sameText(t); }, eventMatches: function(e17, t, n) { var r = t.qualifier; return r != null ? e17 !== n.target && Jc(n.target) && r.matches(n.target) : true; }, addEventFields: function(e17, t) { t.cy = e17, t.target = e17; }, callbackContext: function(e17, t, n) { return t.qualifier != null ? n.target : e17; } }; var Kd = function(e17) { return at(e17) ? new bi(e17) : e17; }; var JS = { createEmitter: function() { var e17 = this._private; return e17.emitter || (e17.emitter = new kh(yce, this)), this; }, emitter: function() { return this._private.emitter; }, on: function(e17, t, n) { return this.emitter().on(e17, Kd(t), n), this; }, removeListener: function(e17, t, n) { return this.emitter().removeListener(e17, Kd(t), n), this; }, removeAllListeners: function() { return this.emitter().removeAllListeners(), this; }, one: function(e17, t, n) { return this.emitter().one(e17, Kd(t), n), this; }, once: function(e17, t, n) { return this.emitter().one(e17, Kd(t), n), this; }, emit: function(e17, t) { return this.emitter().emit(e17, t), this; }, emitAndNotify: function(e17, t) { return this.emit(e17), this.notify(e17, t), this; } }; Bt.eventAliasesOn(JS); var z0 = { png: function(e17) { var t = this._private.renderer; return e17 = e17 || {}, t.png(e17); }, jpg: function(e17) { var t = this._private.renderer; return e17 = e17 || {}, e17.bg = e17.bg || "#fff", t.jpg(e17); } }; z0.jpeg = z0.jpg; var bp = { layout: function(e17) { var t = this; if (e17 == null) { vn("Layout options must be specified to make a layout"); return; } if (e17.name == null) { vn("A `name` must be specified to make a layout"); return; } var n = e17.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(e17.eles) ? o = t.$(e17.eles) : o = e17.eles != null ? e17.eles : t.$(); var a = new r(ct({}, e17, { cy: t, eles: o })); return a; } }; bp.createLayout = bp.makeLayout = bp.layout; var bce = { notify: function(e17, t) { var n = this._private; if (this.batching()) { n.batchNotifications = n.batchNotifications || {}; var r = n.batchNotifications[e17] = n.batchNotifications[e17] || this.collection(); t != null && r.merge(t); return; } if (n.notificationsEnabled) { var o = this.renderer(); this.destroyed() || !o || o.notify(e17, t); } }, notifications: function(e17) { var t = this._private; return e17 === void 0 ? t.notificationsEnabled : (t.notificationsEnabled = !!e17, this); }, noNotifications: function(e17) { this.notifications(false), e17(), this.notifications(true); }, batching: function() { return this._private.batchCount > 0; }, startBatch: function() { var e17 = this._private; return e17.batchCount == null && (e17.batchCount = 0), e17.batchCount === 0 && (e17.batchStyleEles = this.collection(), e17.batchNotifications = {}), e17.batchCount++, this; }, endBatch: function() { var e17 = this._private; if (e17.batchCount === 0) return this; if (e17.batchCount--, e17.batchCount === 0) { e17.batchStyleEles.updateStyle(); var t = this.renderer(); Object.keys(e17.batchNotifications).forEach(function(n) { var r = e17.batchNotifications[n]; r.empty() ? t.notify(n) : t.notify(n, r); }); } return this; }, batch: function(e17) { return this.startBatch(), e17(), this.endBatch(), this; }, // for backwards compatibility batchData: function(e17) { var t = this; return this.batch(function() { for (var n = Object.keys(e17), r = 0; r < n.length; r++) { var o = n[r], a = e17[o], i = t.getElementById(o); i.data(a); } }); } }; var wce = nr({ hideEdgesOnViewport: false, textureOnViewport: false, motionBlur: false, motionBlurOpacity: 0.05, pixelRatio: void 0, desktopTapThreshold: 4, touchTapThreshold: 8, wheelSensitivity: 1, debug: false, showFps: false }); var V0 = { renderTo: function(e17, t, n, r) { var o = this._private.renderer; return o.renderTo(e17, 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(e17) { var t = this, n = t.extension("renderer", e17.name); if (n == null) { vn("Can not initialise: No such renderer `".concat(e17.name, "` found. Did you forget to import it and `cytoscape.use()` it?")); return; } e17.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(e17); r.cy = t, t._private.renderer = new n(r), this.notify("init"); }, destroyRenderer: function() { var e17 = this; e17.notify("destroy"); var t = e17.container(); if (t) for (t._cyreg = null; t.childNodes.length > 0; ) t.removeChild(t.childNodes[0]); e17._private.renderer = null, e17.mutableElements().forEach(function(n) { var r = n._private; r.rscratch = {}, r.rstyle = {}, r.animation.current = [], r.animation.queue = []; }); }, onRender: function(e17) { return this.on("render", e17); }, offRender: function(e17) { return this.off("render", e17); } }; 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(e17, t) { return at(e17) ? this.$(e17) : Wr(e17) ? e17.collection() : Gt(e17) ? (t || (t = {}), new tr(this, e17, t.unique, t.removed)) : new tr(this); }, nodes: function(e17) { var t = this.$(function(n) { return n.isNode(); }); return e17 ? t.filter(e17) : t; }, edges: function(e17) { var t = this.$(function(n) { return n.isEdge(); }); return e17 ? t.filter(e17) : t; }, // search the graph like jQuery $: function(e17) { var t = this._private.elements; return e17 ? t.filter(e17) : t.spawnSelf(); }, mutableElements: function() { return this._private.elements; } }; wp.elements = wp.filter = wp.$; var hr = {}; var ju = "t"; var xce = "f"; hr.apply = function(e17) { for (var t = this, n = t._private, r = n.cy, o = r.collection(), a = 0; a < e17.length; a++) { var i = e17[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 = true; var c = t.updateStyleHints(i); c && o.push(i); } } return o; }; hr.getPropertiesDiff = function(e17, t) { var n = this, r = n._private.propDiffs = n._private.propDiffs || {}, o = e17 + "-" + t, a = r[o]; if (a) return a; for (var i = [], s = {}, u = 0; u < n.length; u++) { var l = n[u], c = e17[u] === ju, d = t[u] === ju, f = c !== d, h10 = l.mappedProperties.length > 0; if (f || d && h10) { var p = void 0; f && h10 || f ? p = l.properties : h10 && (p = l.mappedProperties); for (var v = 0; v < p.length; v++) { for (var m = p[v], g = m.name, b = false, 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] = true, i.push(g)); } } } return r[o] = i, i; }; hr.getContextMeta = function(e17) { for (var t = this, n = "", r, o = e17._private.styleCxtKey || "", a = 0; a < t.length; a++) { var i = t[a], s = i.selector && i.selector.matches(e17); s ? n += ju : n += xce; } return r = t.getPropertiesDiff(o, n), e17._private.styleCxtKey = n, { key: n, diffPropNames: r, empty: r.length === 0 }; }; hr.getContextStyle = function(e17) { var t = e17.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(e17, t, n) { for (var r = this, o = e17.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: true } : l = { name: u, delete: true }; 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 h10 = a[u] = { prev: c }; r.applyParsedProperty(n, l), h10.next = n.pstyle(u), h10.next && h10.next.bypass && (h10.next = h10.next.bypassed); } } return { diffProps: a }; }; hr.updateStyleHints = function(e17) { var t = e17._private, n = this, r = n.propertyGroupNames, o = n.propertyGroupKeys, a = function(le, Ee, Ne) { return n.getPropertiesHash(le, Ee, Ne); }, i = t.styleKey; if (e17.removed()) return false; var s = t.group === "nodes", u = e17._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]); }, h10 = 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(e17, 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; h10(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 W = a(e17, ["label"], R.labelDimensions); if (t.labelKey = Ha(W), t.labelStyleKey = Ha(Bd(R.commonLabel, W)), !s) { var oe = a(e17, ["source-label"], R.labelDimensions); t.sourceLabelKey = Ha(oe), t.sourceLabelStyleKey = Ha(Bd(R.commonLabel, oe)); var Q = a(e17, ["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(e17) { var t = e17._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(e17, t) { var n = this, r = t, o = e17._private.style, a, i = n.types, s = n.properties[r.name].type, u = r.bypass, l = o[r.name], c = l && l.bypass, d = e17._private, f = "mapping", h10 = function(ae) { return ae == null ? null : ae.pfValue != null ? ae.pfValue : ae.value; }, p = function() { var ae = h10(l), pe = h10(r); n.checkTriggers(e17, r.name, ae, pe); }; if (t.name === "curve-style" && e17.isEdge() && // loops must be bundled beziers (t.value !== "bezier" && e17.isLoop() || // edges connected to compound nodes can not be haystacks t.value === "haystack" && (e17.source().isParent() || e17.target().isParent())) && (r = t = this.parse(t.name, "bezier", u)), r.delete) return o[r.name] = void 0, p(), true; if (r.deleteBypassed) return l ? l.bypass ? (l.bypassed = void 0, p(), true) : false : (p(), true); if (r.deleteBypass) return l ? l.bypass ? (o[r.name] = l.bypassed, p(), true) : false : (p(), true); var v = function() { Mt("Do not assign mappings to elements without corresponding data (i.e. ele `" + e17.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(), false; 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 `" + e17.id() + "` is non-numeric)"), false; 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 false; if (!a) return v(), false; 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 W = I[R]; z = z[W]; } if (z != null && (a = this.parse(r.name, z, r.bypass, f)), !a) return v(), false; a.mapping = r, r = a; break; } case i.fn: { var oe = r.value, Q = r.fnValue != null ? r.fnValue : oe(e17); if (r.prevFnValue = Q, Q == null) return Mt("Custom function mappers may not return null (i.e. `" + r.name + "` for ele `" + e17.id() + "` is null)"), false; 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 `" + e17.id() + "` is invalid)"), false; a.mapping = Ko(r), r = a; break; } case void 0: break; default: return false; } return u ? (c ? r.bypassed = l.bypassed : r.bypassed = l, o[r.name] = r) : c ? l.bypassed = r : o[r.name] = r, p(), true; }; hr.cleanElements = function(e17, t) { for (var n = 0; n < e17.length; n++) { var r = e17[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 e17 = this._private.cy, t = e17.mutableElements(); t.updateStyle(); }; hr.updateTransitions = function(e17, t) { var n = this, r = e17._private, o = e17.pstyle("transition-property").value, a = e17.pstyle("transition-duration").pfValue, i = e17.pstyle("transition-delay").pfValue; if (o.length > 0 && a > 0) { for (var s = {}, u = false, l = 0; l < o.length; l++) { var c = o[l], d = e17.pstyle(c), f = t[c]; if (f) { var h10 = f.prev, p = h10, v = f.next != null ? f.next : d, m = false, 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(e17, c, g), u = true)); } } if (!u) return; r.transitioning = true, new Gl(function(x) { i > 0 ? e17.delayAnimation(i).play().promise().then(x) : x(); }).then(function() { return e17.animation({ style: s, duration: a, easing: e17.pstyle("transition-timing-function").value, queue: false }).play().promise(); }).then(function() { n.removeBypasses(e17, o), e17.emitAndNotify("style"), r.transitioning = false; }); } else r.transitioning && (this.removeBypasses(e17, o), e17.emitAndNotify("style"), r.transitioning = false); }; hr.checkTrigger = function(e17, t, n, r, o, a) { var i = this.properties[t], s = o(i); s != null && s(n, r) && a(i); }; hr.checkZOrderTrigger = function(e17, t, n, r) { var o = this; this.checkTrigger(e17, t, n, r, function(a) { return a.triggersZOrder; }, function() { o._private.cy.notify("zorder", e17); }); }; hr.checkBoundsTrigger = function(e17, t, n, r) { this.checkTrigger(e17, t, n, r, function(o) { return o.triggersBounds; }, function(o) { e17.dirtyCompoundBoundsCache(), e17.dirtyBoundingBoxCache(), // only for beziers -- so performance of other edges isn't affected o.triggersBoundsOfParallelBeziers && t === "curve-style" && (n === "bezier" || r === "bezier") && e17.parallelEdges().forEach(function(a) { a.isBundledBezier() && a.dirtyBoundingBoxCache(); }), o.triggersBoundsOfConnectedEdges && t === "display" && (n === "none" || r === "none") && e17.connectedEdges().forEach(function(a) { a.dirtyBoundingBoxCache(); }); }); }; hr.checkTriggers = function(e17, t, n, r) { e17.dirtyStyleCache(), this.checkZOrderTrigger(e17, t, n, r), this.checkBoundsTrigger(e17, t, n, r); }; var nd = {}; nd.applyBypass = function(e17, t, n, r) { var o = this, a = [], i = true; 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, true); c && a.push(c); } } else if (at(t)) { var d = this.parse(t, n, true); d && a.push(d); } else if (It(t)) { var f = t; r = n; for (var h10 = Object.keys(f), p = 0; p < h10.length; p++) { var v = h10[p], m = f[v]; if (m === void 0 && (m = f[ph(v)]), m !== void 0) { var g = this.parse(v, m, true); g && a.push(g); } } } else return false; if (a.length === 0) return false; for (var b = false, x = 0; x < e17.length; x++) { for (var w = e17[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(e17, t, n) { t = vy(t); for (var r = 0; r < e17.length; r++) { var o = e17[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(e17, t) { return this.removeBypasses(e17, this.propertyNames, t); }; nd.removeBypasses = function(e17, t, n) { for (var r = true, o = 0; o < e17.length; o++) { for (var a = e17[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, true), h10 = i[l.name] = { prev: c }; this.applyParsedProperty(a, f), h10.next = a.pstyle(l.name); } } this.updateStyleHints(a), n && this.updateTransitions(a, i, r); } }; var Py = {}; Py.getEmSizeInPixels = function() { var e17 = this.containerCss("font-size"); return e17 != null ? parseFloat(e17) : 1; }; Py.containerCss = function(e17) { var t = this._private.cy, n = t.container(), r = t.window(); if (r && n && r.getComputedStyle) return r.getComputedStyle(n).getPropertyValue(e17); }; var aa = {}; aa.getRenderedStyle = function(e17, t) { return t ? this.getStylePropertyValue(e17, t, true) : this.getRawStyle(e17, true); }; aa.getRawStyle = function(e17, t) { var n = this; if (e17 = e17[0], e17) { for (var r = {}, o = 0; o < n.properties.length; o++) { var a = n.properties[o], i = n.getStylePropertyValue(e17, a.name, t); i != null && (r[a.name] = i, r[ph(a.name)] = i); } return r; } }; aa.getIndexedStyle = function(e17, t, n, r) { var o = e17.pstyle(t)[n][r]; return o ?? e17.cy().style().getDefaultProperty(t)[n][0]; }; aa.getStylePropertyValue = function(e17, t, n) { var r = this; if (e17 = e17[0], e17) { var o = r.properties[t]; o.alias && (o = o.pointsTo); var a = o.type, i = e17.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 = e17.cy().zoom(), d = function(v) { return v * c; }, f = function(v, m) { return d(v) + m; }, h10 = Gt(s), p = h10 ? u.every(function(v) { return v != null; }) : u != null; return p ? h10 ? s.map(function(v, m) { return f(v, u[m]); }).join(" ") : f(s, u) : h10 ? s.map(function(v) { return at(v) ? v : "" + d(v); }).join(" ") : "" + d(s); } else if (l != null) return l; } return null; } }; aa.getAnimationStartStyle = function(e17, t) { for (var n = {}, r = 0; r < t.length; r++) { var o = t[r], a = o.name, i = e17.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(e17) { var t = this, n = [], r = e17, 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(e17, t, n) { var r = n.slice(), o, a, i, s, u, l; for (u = 0; u < t.length; u++) if (o = t[u], a = e17.pstyle(o, false), 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(e17) { for (var t = this, n = 0; n < e17.length; n++) { var r = e17[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(e17) { var t = this; return t.resetToDefault(), t.appendFromJson(e17), t; }; Sh.json = function() { for (var e17 = [], 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; } e17.push({ selector: r ? r.toString() : "core", style: a }); } return e17; }; var $y = {}; $y.appendFromString = function(e17) { var t = this, n = this, r = "" + e17, 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 h10 = c[2], p = false; a = h10; 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:" + h10), p = true; 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(e17) { var t = this; return t.resetToDefault(), t.appendFromString(e17), t; }; var Wn = {}; (function() { var e17 = Ln, t = Poe, n = Aoe, r = Foe, o = Ioe, a = function(J) { return "^" + J + "\\s*\\(\\s*([\\w\\.]+)\\s*\\)$"; }, i = function(J) { var te = e17 + "|\\w+|" + t + "|" + n + "|" + r + "|" + o; return "^" + J + "\\s*\\(([\\w\\.]+)\\s*\\,\\s*(" + e17 + ")\\s*\\,\\s*(" + e17 + ")\\s*,\\s*(" + te + ")\\s*\\,\\s*(" + te + ")\\)$"; }, s = [`^url\\s*\\(\\s*['"]?(.+?)['"]?\\s*\\)$`, "^(none)$", "^(.+)$"]; Wn.types = { time: { number: true, min: 0, units: "s|ms", implicitUnits: "ms" }, percent: { number: true, min: 0, max: 100, units: "%", implicitUnits: "%" }, percentages: { number: true, min: 0, max: 100, units: "%", implicitUnits: "%", multiple: true }, zeroOneNumber: { number: true, min: 0, max: 1, unitless: true }, zeroOneNumbers: { number: true, min: 0, max: 1, unitless: true, multiple: true }, nOneOneNumber: { number: true, min: -1, max: 1, unitless: true }, nonNegativeInt: { number: true, min: 0, integer: true, unitless: true }, nonNegativeNumber: { number: true, min: 0, unitless: true }, position: { enums: ["parent", "origin"] }, nodeSize: { number: true, min: 0, enums: ["label"] }, number: { number: true, unitless: true }, numbers: { number: true, unitless: true, multiple: true }, positiveNumber: { number: true, unitless: true, min: 0, strictMin: true }, size: { number: true, min: 0 }, bidirectionalSize: { number: true }, // allows negative bidirectionalSizeMaybePercent: { number: true, allowPercent: true }, // allows negative bidirectionalSizes: { number: true, multiple: true }, // allows negative sizeMaybePercent: { number: true, min: 0, allowPercent: true }, axisDirection: { enums: ["horizontal", "leftward", "rightward", "vertical", "upward", "downward", "auto"] }, paddingRelativeTo: { enums: ["width", "height", "average", "min", "max"] }, bgWH: { number: true, min: 0, allowPercent: true, enums: ["auto"], multiple: true }, bgPos: { number: true, allowPercent: true, multiple: true }, bgRelativeTo: { enums: ["inner", "include-padding"], multiple: true }, bgRepeat: { enums: ["repeat", "repeat-x", "repeat-y", "no-repeat"], multiple: true }, bgFit: { enums: ["none", "contain", "cover"], multiple: true }, bgCrossOrigin: { enums: ["anonymous", "use-credentials", "null"], multiple: true }, bgClip: { enums: ["none", "node"], multiple: true }, bgContainment: { enums: ["inside", "over"], multiple: true }, color: { color: true }, colors: { color: true, multiple: true }, fill: { enums: ["solid", "linear-gradient", "radial-gradient"] }, bool: { enums: ["yes", "no"] }, bools: { enums: ["yes", "no"], multiple: true }, 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: true }, 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: true, 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: true, 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: true }, data: { mapping: true, regex: a("data") }, layoutData: { mapping: true, regex: a("layoutData") }, scratch: { mapping: true, regex: a("scratch") }, mapData: { mapping: true, regex: i("mapData") }, mapLayoutData: { mapping: true, regex: i("mapLayoutData") }, mapScratch: { mapping: true, regex: i("mapScratch") }, fn: { mapping: true, fn: true }, url: { regexes: s, singleRegexMatchValue: true }, urls: { regexes: s, singleRegexMatchValue: true, multiple: true }, propList: { propList: true }, angle: { number: true, units: "deg|rad", implicitUnits: "rad" }, textRotation: { number: true, units: "deg|rad", implicitUnits: "rad", enums: ["none", "autorotate"] }, polygonPointList: { number: true, multiple: true, evenMultiple: true, min: -1, max: 1, unitless: true }, edgeDistances: { enums: ["intersection", "node-position", "endpoints"] }, edgeEndpoint: { number: true, multiple: true, 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: true, 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 false; } } }, easing: { regexes: ["^(spring)\\s*\\(\\s*(" + e17 + ")\\s*,\\s*(" + e17 + ")\\s*\\)$", "^(cubic-bezier)\\s*\\(\\s*(" + e17 + ")\\s*,\\s*(" + e17 + ")\\s*,\\s*(" + e17 + ")\\s*,\\s*(" + e17 + ")\\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: true, multiple: true, 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 ? true : 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 }], h10 = [{ 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: true }, { 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: true }, { 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, h10, 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: h10, 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 }, W = Wn.propertyGroupNames = {}, oe = Wn.propertyGroupKeys = Object.keys(R); oe.forEach(function(J) { W[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: true, pointsTo: fe }; z.push(ge), z[ke.name] = ge; } })(); Wn.getDefaultProperty = function(e17) { return this.getDefaultProperties()[e17]; }; Wn.getDefaultProperties = function() { var e17 = this._private; if (e17.defaultProperties != null) return e17.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 e17.defaultProperties = n, e17.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(e17, t, n, r) { var o = this; if (dn(t)) return o.parseImplWarn(e17, t, n, r); var a = r === "mapping" || r === true || r === false || r == null ? "dontcare" : r, i = n ? "t" : "f", s = "" + t, u = sS(e17, s, i, a), l = o.propCache = o.propCache || [], c; return (c = l[u]) || (c = l[u] = o.parseImplWarn(e17, t, n, r)), (n || r === "mapping") && (c = Ko(c), c && (c.value = Ko(c.value))), c; }; _h.parseImplWarn = function(e17, t, n, r) { var o = this.parseImpl(e17, t, n, r); return !o && t != null && Mt("The style property `".concat(e17, ": ").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(e17, t, n, r) { var o = this; e17 = vy(e17); var a = o.properties[e17], i = t, s = o.types; if (!a || t === void 0) return null; a.alias && (a = a.pointsTo, e17 = 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: e17, value: t, bypass: true, deleteBypass: true }; if (dn(t)) return { name: e17, 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 false; var f = s.data; return { name: e17, 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 false; var h10 = s.mapData; if (!(l.color || l.number)) return false; var p = this.parse(e17, d[4]); if (!p || p.mapped) return false; var v = this.parse(e17, d[5]); if (!v || v.mapped) return false; if (p.pfValue === v.pfValue || p.strValue === v.strValue) return Mt("`" + e17 + ": " + t + "` is not a valid mapper because the output range is zero; converting to `" + e17 + ": " + p.strValue + "`"), this.parse(e17, 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 false; } return { name: e17, value: d, strValue: "" + t, mapped: h10, 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 = false, O = 0; O < x.length; O++) { var F = o.parse(e17, 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: e17, value: w[0], strValue: w[0], bypass: n } : null : { name: e17, 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: e17, 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: e17, 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 W = R.split(/\s*,\s*|\s+/), oe = 0; oe < W.length; oe++) { var Q = W[oe].trim(); o.properties[Q] ? z.push(Q) : Mt("`" + Q + "` is not a valid property name"); } if (z.length === 0) return null; } return { name: e17, value: z, strValue: z.length === 0 ? "none" : z.join(" "), bypass: n }; } else if (l.color) { var ae = Moe(t); return ae ? { name: e17, 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: e17, value: l.singleRegexMatchValue ? ge[1] : ge, strValue: "" + t, bypass: n }; } return null; } else return l.string ? { name: e17, value: "" + t, strValue: "" + t, bypass: n } : l.enums ? $() : null; }; var cr = function e13(t) { if (!(this instanceof e13)) return new e13(t); if (!hy(t)) { vn("A style must have a core reference"); return; } this._private = { cy: t, coreStyle: {} }, this.length = 0, this.resetToDefault(); }; var pr = cr.prototype; pr.instanceString = function() { return "style"; }; pr.clear = function() { for (var e17 = this._private, t = e17.cy, n = t.elements(), r = 0; r < this.length; r++) this[r] = void 0; return this.length = 0, e17.contextStyles = {}, e17.propDiffs = {}, this.cleanElements(n, true), n.forEach(function(o) { var a = o[0]._private; a.styleDirty = true, a.appliedInitStyle = false; }), this; }; pr.resetToDefault = function() { return this.clear(), this.addDefaultStylesheet(), this; }; pr.core = function(e17) { return this._private.coreStyle[e17] || this.getDefaultProperty(e17); }; pr.selector = function(e17) { var t = e17 === "core" ? null : new bi(e17), n = this.length++; return this[n] = { selector: t, properties: [], mappedProperties: [], index: n }, this; }; pr.css = function() { var e17 = this, t = arguments; if (t.length === 1) for (var n = t[0], r = 0; r < e17.properties.length; r++) { var o = e17.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(e17, t) { var n = this.parse(e17, 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 = true), n.mapped && this[r].mappedProperties.push(n); var o = !this[r].selector; o && (this._private.coreStyle[n.name] = n); } return this; }; pr.append = function(e17) { return ZE(e17) ? e17.appendToStyle(this) : Gt(e17) ? this.appendFromJson(e17) : at(e17) && this.appendFromString(e17), this; }; cr.fromJson = function(e17, t) { var n = new cr(e17); return n.fromJson(t), n; }; cr.fromString = function(e17, t) { return new cr(e17).fromString(t); }; [hr, nd, Py, aa, Sh, $y, Wn, _h].forEach(function(e17) { ct(pr, e17); }); cr.types = pr.types; cr.properties = pr.properties; cr.propertyGroups = pr.propertyGroups; cr.propertyGroupNames = pr.propertyGroupNames; cr.propertyGroupKeys = pr.propertyGroupKeys; var kce = { style: function(e17) { if (e17) { var t = this.setStyle(e17); t.update(); } return this._private.style; }, setStyle: function(e17) { var t = this._private; return ZE(e17) ? t.style = e17.generateStyle(this) : Gt(e17) ? t.style = cr.fromJson(this, e17) : at(e17) ? t.style = cr.fromString(this, e17) : t.style = cr(this), t.style; }, // e.g. cy.data() changed => recalc ele mappers updateStyle: function() { this.mutableElements().updateStyle(); } }; var Cce = "single"; var ks = { autolock: function(e17) { if (e17 !== void 0) this._private.autolock = !!e17; else return this._private.autolock; return this; }, autoungrabify: function(e17) { if (e17 !== void 0) this._private.autoungrabify = !!e17; else return this._private.autoungrabify; return this; }, autounselectify: function(e17) { if (e17 !== void 0) this._private.autounselectify = !!e17; else return this._private.autounselectify; return this; }, selectionType: function(e17) { var t = this._private; if (t.selectionType == null && (t.selectionType = Cce), e17 !== void 0) (e17 === "additive" || e17 === "single") && (t.selectionType = e17); else return t.selectionType; return this; }, panningEnabled: function(e17) { if (e17 !== void 0) this._private.panningEnabled = !!e17; else return this._private.panningEnabled; return this; }, userPanningEnabled: function(e17) { if (e17 !== void 0) this._private.userPanningEnabled = !!e17; else return this._private.userPanningEnabled; return this; }, zoomingEnabled: function(e17) { if (e17 !== void 0) this._private.zoomingEnabled = !!e17; else return this._private.zoomingEnabled; return this; }, userZoomingEnabled: function(e17) { if (e17 !== void 0) this._private.userZoomingEnabled = !!e17; else return this._private.userZoomingEnabled; return this; }, boxSelectionEnabled: function(e17) { if (e17 !== void 0) this._private.boxSelectionEnabled = !!e17; else return this._private.boxSelectionEnabled; return this; }, pan: function() { var e17 = arguments, t = this._private.pan, n, r, o, a, i; switch (e17.length) { case 0: return t; case 1: if (at(e17[0])) return n = e17[0], t[n]; if (It(e17[0])) { if (!this._private.panningEnabled) return this; o = e17[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 = e17[0], r = e17[1], (n === "x" || n === "y") && Ve(r) && (t[n] = r), this.emit("pan viewport"); break; } return this.notify("viewport"), this; }, panBy: function(e17, 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(e17) && (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 = e17, a = t, (o === "x" || o === "y") && Ve(a) && (r[o] += a), this.emit("pan viewport"); break; } return this.notify("viewport"), this; }, fit: function(e17, t) { var n = this.getFitViewport(e17, 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(e17, t) { if (Ve(e17) && t === void 0 && (t = e17, e17 = void 0), !(!this._private.panningEnabled || !this._private.zoomingEnabled)) { var n; if (at(e17)) { var r = e17; e17 = this.$(r); } else if (Soe(e17)) { var o = e17; 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(e17) || (e17 = this.mutableElements()); if (!(Wr(e17) && e17.empty())) { n = n || e17.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(e17, t) { var n = this._private; if (t == null) { var r = e17; e17 = r.min, t = r.max; } return Ve(e17) && Ve(t) && e17 <= t ? (n.minZoom = e17, n.maxZoom = t) : Ve(e17) && t === void 0 && e17 <= n.maxZoom ? n.minZoom = e17 : Ve(t) && e17 === void 0 && t >= n.minZoom && (n.maxZoom = t), this; }, minZoom: function(e17) { return e17 === void 0 ? this._private.minZoom : this.zoomRange({ min: e17 }); }, maxZoom: function(e17) { return e17 === void 0 ? this._private.maxZoom : this.zoomRange({ max: e17 }); }, getZoomedViewport: function(e17) { var t = this._private, n = t.pan, r = t.zoom, o, a, i = false; if (t.zoomingEnabled || (i = true), Ve(e17) ? a = e17 : It(e17) && (a = e17.level, e17.position != null ? o = gh(e17.position, r, n) : e17.renderedPosition != null && (o = e17.renderedPosition), o != null && !t.panningEnabled && (i = true)), 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: true, panned: true, zoom: l, pan: c }; } else return { zoomed: true, panned: false, zoom: a, pan: n }; }, zoom: function(e17) { if (e17 === void 0) return this._private.zoom; var t = this.getZoomedViewport(e17), 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(e17) { var t = this._private, n = true, r = true, o = [], a = false, i = false; if (!e17) return this; if (Ve(e17.zoom) || (n = false), It(e17.pan) || (r = false), !n && !r) return this; if (n) { var s = e17.zoom; s < t.minZoom || s > t.maxZoom || !t.zoomingEnabled ? a = true : (t.zoom = s, o.push("zoom")); } if (r && (!a || !e17.cancelOnFailedZoom) && t.panningEnabled) { var u = e17.pan; Ve(u.x) && (t.pan.x = u.x, i = false), Ve(u.y) && (t.pan.y = u.y, i = false), i || o.push("pan"); } return o.length > 0 && (o.push("viewport"), this.emit(o.join(" ")), this.notify("viewport")), this; }, center: function(e17) { var t = this.getCenterPan(e17); return t && (this._private.pan = t, this.emit("pan viewport"), this.notify("viewport")), this; }, getCenterPan: function(e17, t) { if (this._private.panningEnabled) { if (at(e17)) { var n = e17; e17 = this.mutableElements().filter(n); } else Wr(e17) || (e17 = this.mutableElements()); if (e17.length !== 0) { var r = e17.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 e17 = this._private, t = e17.container, n = this; return e17.sizeCache = e17.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 e17 = this._private.pan, t = this._private.zoom, n = this.renderedExtent(), r = { x1: (n.x1 - e17.x) / t, x2: (n.x2 - e17.x) / t, y1: (n.y1 - e17.y) / t, y2: (n.y2 - e17.y) / t }; return r.w = r.x2 - r.x1, r.h = r.y2 - r.y1, r; }, renderedExtent: function() { var e17 = this.width(), t = this.height(); return { x1: 0, y1: 0, x2: e17, y2: t, w: e17, h: t }; }, multiClickDebounceTime: function(e17) { if (e17) this._private.multiClickDebounceTime = e17; 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: true, allowSetting: true, settingEvent: "data", settingTriggersEvent: true, triggerFnName: "trigger", allowGetting: true, updateStyle: true }), removeData: Bt.removeData({ field: "data", event: "data", triggerFnName: "trigger", triggerEvent: true, updateStyle: true }), scratch: Bt.data({ field: "scratch", bindingEvent: "scratch", allowBinding: true, allowSetting: true, settingEvent: "scratch", settingTriggersEvent: true, triggerFnName: "trigger", allowGetting: true, updateStyle: true }), removeScratch: Bt.removeData({ field: "scratch", event: "scratch", triggerFnName: "trigger", triggerEvent: true, updateStyle: true }) }; Cc.attr = Cc.data; Cc.removeAttr = Cc.removeData; var Ec = function(e17) { var t = this; e17 = ct({}, e17); var n = e17.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 && !e17.headless, i = e17; i.layout = ct({ name: a ? "grid" : "null" }, i.layout), i.renderer = ct({ name: a ? "canvas" : "null" }, i.renderer); var s = function(f, h10, p) { return h10 !== void 0 ? h10 : p !== void 0 ? p : f; }, u = this._private = { container: n, // html dom ele container ready: false, // 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: false, // whether destroy was called notificationsEnabled: true, // whether notifications are sent to the renderer minZoom: 1e-50, maxZoom: 1e50, zoomingEnabled: s(true, i.zoomingEnabled), userZoomingEnabled: s(true, i.userZoomingEnabled), panningEnabled: s(true, i.panningEnabled), userPanningEnabled: s(true, i.userPanningEnabled), boxSelectionEnabled: s(true, i.boxSelectionEnabled), autolock: s(false, i.autolock, i.autolockNodes), autoungrabify: s(false, i.autoungrabify, i.autoungrabifyNodes), autounselectify: s(false, 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: false, multiClickDebounceTime: s(250, i.multiClickDebounceTime) }; this.createEmitter(), this.selectionType(i.selectionType), this.zoomRange({ min: i.minZoom, max: i.maxZoom }); var l = function(f, h10) { var p = f.some(_oe); if (p) return Gl.all(f).then(h10); h10(f); }; u.styleEnabled && t.setStyle([]); var c = ct({}, i, i.renderer); t.initRenderer(c); var d = function(f, h10, p) { t.notifications(false); 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(true), t.emit(g), t.one("load", h10), 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 h10 = f[0], p = f[1]; u.styleEnabled && t.style().append(h10), d(p, function() { t.startAnimationLoop(), u.ready = true, 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); }); }; var sf = Ec.prototype; ct(sf, { instanceString: function() { return "core"; }, isReady: function() { return this._private.ready; }, destroyed: function() { return this._private.destroyed; }, ready: function(e17) { return this.isReady() ? this.emitter().emit("ready", [], e17) : this.on("ready", e17), this; }, destroy: function() { var e17 = this; if (!e17.destroyed()) return e17.stopAnimationLoop(), e17.destroyRenderer(), this.emit("destroy"), e17._private.destroyed = true, e17; }, hasElementWithId: function(e17) { return this._private.elements.hasElementWithId(e17); }, getElementById: function(e17) { return this._private.elements.getElementById(e17); }, hasCompoundNodes: function() { return this._private.hasCompoundNodes; }, headless: function() { return this._private.renderer.isHeadless(); }, styleEnabled: function() { return this._private.styleEnabled; }, addToPool: function(e17) { return this._private.elements.merge(e17), this; }, removeFromPool: function(e17) { return this._private.elements.unmerge(e17), this; }, container: function() { return this._private.container || null; }, window: function() { var e17 = this._private.container; if (e17 == null) return An; var t = this._private.container.ownerDocument; return t === void 0 || t == null ? An : t.defaultView || An; }, mount: function(e17) { if (e17 != null) { var t = this, n = t._private, r = n.options; return !Qp(e17) && Qp(e17[0]) && (e17 = e17[0]), t.stopAnimationLoop(), t.destroyRenderer(), n.container = e17, n.styleEnabled = true, 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 e17 = this; return e17.stopAnimationLoop(), e17.destroyRenderer(), e17.initRenderer({ name: "null" }), e17.emit("unmount"), e17; }, options: function() { return Ko(this._private.options); }, json: function(e17) { var t = this, n = t._private, r = t.mutableElements(), o = function(b) { return t.getElementById(b.id()); }; if (It(e17)) { if (t.startBatch(), e17.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] = true, 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(e17.elements)) i(e17.elements); else for (var s = ["nodes", "edges"], u = 0; u < s.length; u++) { var l = s[u], c = e17.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(); }); } e17.style && t.style(e17.style), e17.zoom != null && e17.zoom !== n.zoom && t.zoom(e17.zoom), e17.pan && (e17.pan.x !== n.pan.x || e17.pan.y !== n.pan.y) && t.pan(e17.pan), e17.data && t.data(e17.data); for (var f = ["minZoom", "maxZoom", "zoomingEnabled", "userZoomingEnabled", "panningEnabled", "userPanningEnabled", "boxSelectionEnabled", "autolock", "autoungrabify", "autounselectify", "multiClickDebounceTime"], h10 = 0; h10 < f.length; h10++) { var p = f[h10]; e17[p] != null && t[p](e17[p]); } return t.endBatch(), this; } else { var v = !!e17, 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(e17) { ct(sf, e17); }); var Ece = { fit: true, // whether to fit the viewport to the graph directed: false, // whether the tree is directed downwards (or edges can point in any direction if false) padding: 30, // padding on fit circle: false, // put depths in concentric circles if true, put depths top down if false grid: false, // 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: true, // prevents node overlap, may overflow boundingBox if not enough space nodeDimensionsIncludeLabels: false, // 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: false, // 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(e17, t) { return true; }, // 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(e17, t) { return t; } // transform a given node position. Useful for changing flow direction in discrete layouts }; var Sce = { maximal: false, // 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: false // 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 }; var Ws = function(e17) { return e17.scratch("breadthfirst"); }; var tk = function(e17, t) { return e17.scratch("breadthfirst", t); }; function QS(e17) { this.options = ct({}, Ece, Sce, e17); } QS.prototype.run = function() { var e17 = this.options, t = e17, n = e17.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], h10 = n.getElementById(f); c.push(h10); } 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(false), Be = De.filter(function(Ue) { return Ue.degree(false) === 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] = true; } }); 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, true; } return false; }; 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 W = o[R], oe = W.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: true, // 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: true, // prevents node overlap, may overflow boundingBox and radius if not enough space nodeDimensionsIncludeLabels: false, // 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: true, // 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: false, // 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(e17, t) { return true; }, // 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(e17, t) { return t; } // transform a given node position. Useful for changing flow direction in discrete layouts }; function e_(e17) { this.options = ct({}, _ce, e17); } e_.prototype.run = function() { var e17 = this.options, t = e17, n = e17.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 h10 = a[f], p = h10.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: true, // 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: true, // whether the layout should go clockwise (true) or counterclockwise/anticlockwise (false) equidistant: false, // 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: true, // prevents node overlap, may overflow boundingBox if not enough space nodeDimensionsIncludeLabels: false, // 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(e17) { return e17.degree(); }, levelWidth: function(e17) { return e17.maxDegree() / 4; }, animate: false, // 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(e17, t) { return true; }, // 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(e17, t) { return t; } // transform a given node position. Useful for changing flow direction in discrete layouts }; function t_(e17) { this.options = ct({}, Tce, e17); } t_.prototype.run = function() { for (var e17 = this.options, t = e17, n = t.counterclockwise !== void 0 ? !t.counterclockwise : t.clockwise, r = e17.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 h10 = 0; h10 < a.length; h10++) { var p = a[h10], 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, W = 0, oe = 0; oe < g.length; oe++) { var Q = g[oe], ae = Q.r - W; R = Math.max(R, ae); } W = 0; for (var pe = 0; pe < g.length; pe++) { var we = g[pe]; pe === 0 && (W = we.r), we.r = W, W += 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; var 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: true, // 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(e17, t) { return true; }, // 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: true, // 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: false, // Randomize the initial positions of the nodes (true) or use existing positions (false) randomize: false, // Extra spacing between components in non-compound graphs componentSpacing: 40, // Node repulsion (non overlapping) multiplier nodeRepulsion: function(e17) { return 2048; }, // Node repulsion (overlapping) multiplier nodeOverlap: 4, // Ideal edge (non nested) length idealEdgeLength: function(e17) { return 32; }, // Divisor to compute edge forces edgeElasticity: function(e17) { 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(e17) { this.options = ct({}, Oce, e17), 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 e17 = this.options, t = e17.cy, n = this; n.stopped = false, (e17.animate === true || e17.animate === false) && n.emit({ type: "layoutstart", layout: n }), e17.debug === true ? Iv = true : Iv = false; var r = Pce(t, n, e17); Iv && Fce(r), e17.randomize && Ice(r); var o = _a(), a = function() { Nce(r, t, e17), e17.fit === true && t.fit(e17.padding); }, i = function(d) { return !(n.stopped || d >= e17.numIter || (Lce(r, e17), r.temperature = r.temperature * e17.coolingFactor, r.temperature < e17.minTemp)); }, s = function() { if (e17.animate === true || e17.animate === false) a(), n.one("layoutstop", e17.stop), n.emit({ type: "layoutstop", layout: n }); else { var d = e17.eles.nodes(), f = n_(r, e17, d); d.layoutPositions(n, e17, f); } }, u = 0, l = true; if (e17.animate === true) { var c = function d() { for (var f = 0; l && f < e17.refresh; ) l = i(u), u++, f++; if (!l) rk(r, e17), s(); else { var h10 = _a(); h10 - o >= e17.animationThreshold && a(), ef(d); } }; c(); } else { for (; l; ) l = i(u), u++; rk(r, e17), s(); } return this; }; Th.prototype.stop = function() { return this.stopped = true, this.thread && this.thread.stop(), this.emit("layoutstop"), this; }; Th.prototype.destroy = function() { return this.thread && this.thread.stop(), this; }; var Pce = function(e17, t, n) { for (var r = n.eles.edges(), o = n.eles.nodes(), a = Br(n.boundingBox ? n.boundingBox : { x1: 0, y1: 0, w: e17.width(), h: e17.height() }), i = { isCompound: e17.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 h10 = o[l], p = h10.layoutDimensions(n), v = {}; v.isLocked = h10.locked(), v.id = h10.data("id"), v.parentId = h10.data("parent"), v.cmptId = u[h10.id()], v.children = [], v.positionX = h10.position("x"), v.positionY = h10.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(h10.style("padding")), v.padRight = parseFloat(h10.style("padding")), v.padTop = parseFloat(h10.style("padding")), v.padBottom = parseFloat(h10.style("padding")), v.nodeRepulsion = dn(n.nodeRepulsion) ? n.nodeRepulsion(h10) : 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 h10 = i.layoutNodes[l], w = h10.parentId; w != null ? i.layoutNodes[i.idToIndex[w]].children.push(h10.id) : (m[++b] = h10.id, x.push(h10.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), W = i.graphSet[R], oe = 0, v = i.layoutNodes[N]; W.indexOf(v.id) === -1; ) v = i.layoutNodes[i.idToIndex[v.parentId]], oe++; for (v = i.layoutNodes[M]; W.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; }; var $ce = function(e17, t, n) { var r = Ace(e17, t, 0, n); return 2 > r.count ? 0 : r.graph; }; var Ace = function e14(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 = e14(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 }; }; var Fce; var Ice = function(e17, t) { for (var n = e17.clientWidth, r = e17.clientHeight, o = 0; o < e17.nodeSize; o++) { var a = e17.layoutNodes[o]; a.children.length === 0 && !a.isLocked && (a.positionX = Math.random() * n, a.positionY = Math.random() * r); } }; var n_ = function(e17, t, n) { var r = e17.boundingBox, o = { x1: 1 / 0, x2: -1 / 0, y1: 1 / 0, y2: -1 / 0 }; return t.boundingBox && (n.forEach(function(a) { var i = e17.layoutNodes[e17.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 = e17.layoutNodes[e17.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 }; }; }; var Nce = function(e17, t, n) { var r = n.layout, o = n.eles.nodes(), a = n_(e17, n, o); o.positions(a), e17.ready !== true && (e17.ready = true, r.one("layoutready", n.ready), r.emit({ type: "layoutready", layout: this })); }; var Lce = function(e17, t, n) { Dce(e17, t), Mce(e17), zce(e17, t), Vce(e17), jce(e17); }; var Dce = function(e17, t) { for (var n = 0; n < e17.graphSet.length; n++) for (var r = e17.graphSet[n], o = r.length, a = 0; a < o; a++) for (var i = e17.layoutNodes[e17.idToIndex[r[a]]], s = a + 1; s < o; s++) { var u = e17.layoutNodes[e17.idToIndex[r[s]]]; Rce(i, u, e17, t); } }; var nk = function(e17) { return -e17 + 2 * e17 * Math.random(); }; var Rce = function(e17, t, n, r) { var o = e17.cmptId, a = t.cmptId; if (!(o !== a && !n.isCompound)) { var i = t.positionX - e17.positionX, s = t.positionY - e17.positionY, u = 1; i === 0 && s === 0 && (i = nk(u), s = nk(u)); var l = Bce(e17, 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(e17, i, s), d = lf(t, -1 * i, -1 * s), f = d.x - c.x, h10 = d.y - c.y, p = f * f + h10 * h10, v = Math.sqrt(p), m = (e17.nodeRepulsion + t.nodeRepulsion) / p, g = m * f / v, b = m * h10 / v; e17.isLocked || (e17.offsetX -= g, e17.offsetY -= b), t.isLocked || (t.offsetX += g, t.offsetY += b); } }; var Bce = function(e17, t, n, r) { if (n > 0) var o = e17.maxX - t.minX; else var o = t.maxX - e17.minX; if (r > 0) var a = e17.maxY - t.minY; else var a = t.maxY - e17.minY; return o >= 0 && a >= 0 ? Math.sqrt(o * o + a * a) : 0; }; var lf = function(e17, t, n) { var r = e17.positionX, o = e17.positionY, a = e17.height || 1, i = e17.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); }; var Mce = function(e17, t) { for (var n = 0; n < e17.edgeSize; n++) { var r = e17.layoutEdges[n], o = e17.idToIndex[r.sourceId], a = e17.layoutNodes[o], i = e17.idToIndex[r.targetId], s = e17.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, h10 = d.y - c.y, p = Math.sqrt(f * f + h10 * h10), v = Math.pow(r.idealLength - p, 2) / r.elasticity; if (p !== 0) var m = v * f / p, g = v * h10 / p; else var m = 0, g = 0; a.isLocked || (a.offsetX += m, a.offsetY += g), s.isLocked || (s.offsetX -= m, s.offsetY -= g); } } }; var zce = function(e17, t) { if (t.gravity !== 0) for (var n = 1, r = 0; r < e17.graphSet.length; r++) { var o = e17.graphSet[r], a = o.length; if (r === 0) var u = e17.clientHeight / 2, l = e17.clientWidth / 2; else var i = e17.layoutNodes[e17.idToIndex[o[0]]], s = e17.layoutNodes[e17.idToIndex[i.parentId]], u = s.positionX, l = s.positionY; for (var c = 0; c < a; c++) { var d = e17.layoutNodes[e17.idToIndex[o[c]]]; if (!d.isLocked) { var f = u - d.positionX, h10 = l - d.positionY, p = Math.sqrt(f * f + h10 * h10); if (p > n) { var v = t.gravity * f / p, m = t.gravity * h10 / p; d.offsetX += v, d.offsetY += m; } } } } }; var Vce = function(e17, t) { var n = [], r = 0, o = -1; for (n.push.apply(n, e17.graphSet[0]), o += e17.graphSet[0].length; r <= o; ) { var a = n[r++], i = e17.idToIndex[a], s = e17.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 = e17.layoutNodes[e17.idToIndex[u[d]]]; f.offsetX += l, f.offsetY += c, n[++o] = u[d]; } s.offsetX = 0, s.offsetY = 0; } } }; var jce = function(e17, t) { for (var n = 0; n < e17.nodeSize; n++) { var r = e17.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 < e17.nodeSize; n++) { var r = e17.layoutNodes[n]; if (!(0 < r.children.length || r.isLocked)) { var o = Hce(r.offsetX, r.offsetY, e17.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, e17); } } for (var n = 0; n < e17.nodeSize; n++) { var r = e17.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); } }; var Hce = function(e17, t, n) { var r = Math.sqrt(e17 * e17 + t * t); if (r > n) var o = { x: n * e17 / r, y: n * t / r }; else var o = { x: e17, y: t }; return o; }; var Uce = function e15(t, n) { var r = t.parentId; if (r != null) { var o = n.layoutNodes[n.idToIndex[r]], a = false; if ((o.maxX == null || t.maxX + o.padRight > o.maxX) && (o.maxX = t.maxX + o.padRight, a = true), (o.minX == null || t.minX - o.padLeft < o.minX) && (o.minX = t.minX - o.padLeft, a = true), (o.maxY == null || t.maxY + o.padBottom > o.maxY) && (o.maxY = t.maxY + o.padBottom, a = true), (o.minY == null || t.minY - o.padTop < o.minY) && (o.minY = t.minY - o.padTop, a = true), a) return e15(o, n); } }; var rk = function(e17, t) { for (var n = e17.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, h10 = 0, p = 0, v = 0, m = Math.sqrt(u) * e17.clientWidth / e17.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 += h10 - l.y1); } f += l.w + t.componentSpacing, p += l.w + t.componentSpacing, v = Math.max(v, l.h), p > m && (h10 += v + t.componentSpacing, f = 0, p = 0, v = 0); } } }; var qce = { fit: true, // 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: true, // prevents node overlap, may overflow boundingBox if not enough space avoidOverlapPadding: 10, // extra spacing around nodes when avoidOverlap: true nodeDimensionsIncludeLabels: false, // 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: false, // 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(e17) { }, // 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: false, // 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(e17, t) { return true; }, // 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(e17, t) { return t; } // transform a given node position. Useful for changing flow direction in discrete layouts }; function r_(e17) { this.options = ct({}, qce, e17); } r_.prototype.run = function() { var e17 = this.options, t = e17, n = e17.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, h10 = t.cols != null ? t.cols : t.columns; if (f != null && h10 != null) u = f, l = h10; else if (f != null && h10 == null) u = f, l = Math.ceil(i / u); else if (f == null && h10 != null) l = h10, 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] = true; }, N = 0, M = 0, I = function() { M++, M >= l && (M = 0, N++); }, z = {}, R = 0; R < o.length; R++) { var W = o[R], oe = t.position(W); 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[W.id()] = Q, L(Q.row, Q.col); } } var ae = function(pe, we) { var ke, fe; if (pe.locked() || pe.isParent()) return false; 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(e17) { this.options = ct({}, Wce, e17); } Ay.prototype.run = function() { var e17 = this.options, t = e17.eles, n = this; return e17.cy, n.emit("layoutstart"), t.nodes().positions(function() { return { x: 0, y: 0 }; }), n.one("layoutready", e17.ready), n.emit("layoutready"), n.one("layoutstop", e17.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: true, // 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: false, // 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(e17, t) { return true; }, // 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(e17, t) { return t; } // transform a given node position. Useful for changing flow direction in discrete layouts }; function o_(e17) { this.options = ct({}, Kce, e17); } o_.prototype.run = function() { var e17 = this.options, t = e17.eles, n = t.nodes(), r = dn(e17.positions); function o(a) { if (e17.positions == null) return Zae(a.position()); if (r) return e17.positions(a); var i = e17.positions[a._private.data.id]; return i ?? null; } return n.layoutPositions(this, e17, function(a, i) { var s = o(a); return a.locked() || s == null ? false : s; }), this; }; var Gce = { fit: true, // 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: false, // 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(e17, t) { return true; }, // 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(e17, t) { return t; } // transform a given node position. Useful for changing flow direction in discrete layouts }; function a_(e17) { this.options = ct({}, Gce, e17); } a_.prototype.run = function() { var e17 = this.options, t = e17.cy, n = e17.eles, r = Br(e17.boundingBox ? e17.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, e17, 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_(e17) { this.options = e17, this.notifications = 0; } var ok = function() { }; var 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 true; }, png: ak, jpg: ak }; var Fy = {}; Fy.arrowShapeWidth = 0.3; Fy.registerArrowShapes = function() { var e17 = this.arrowShapes = {}, t = this, n = function(u, l, c, d, f, h10, 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 h10 = u * Math.cos(d) - l * Math.sin(d), p = u * Math.sin(d) + l * Math.cos(d), v = h10 * 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 = [], h10 = 0; h10 < u.length; h10 += 2) { var p = u[h10], v = u[h10 + 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 = e17[l]), e17[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, h10, p, v) { var m = a(o(this.points, f + 2 * v, h10, p)), g = Sr(c, d, m); return g; }, roughCollide: n, draw: function(c, d, f, h10) { var p = o(this.points, d, f, h10); 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: e17.triangle.points, controlPoint: [0, -0.15], roughCollide: n, draw: function(u, l, c, d, f) { var h10 = o(this.points, l, c, d), p = this.controlPoint, v = r(p[0], p[1], l, c, d); t.arrowShapeImpl(this.name)(u, h10, 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, h10, 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 h10 = o(this.points, l, c, d), p = o(this.pointsTee, l, c, d); t.arrowShapeImpl(this.name)(u, h10, 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, h10, 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 h10 = o(this.pointsTr, l, c, d); t.arrowShapeImpl(this.name)(u, h10, 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, h10 = 5; return c[f] = c[f] - d, c[h10] = c[h10] - d, c; }, collide: function(u, l, c, d, f, h10, p) { var v = a(o(this.points, c + 2 * p, d, f)), m = a(o(this.crossLinePts(c, h10), c + 2 * p, d, f)), g = Sr(u, l, v) || Sr(u, l, m); return g; }, draw: function(u, l, c, d, f) { var h10 = o(this.points, l, c, d), p = o(this.crossLinePts(l, f), l, c, d); t.arrowShapeImpl(this.name)(u, h10, 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, h10, 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(e17, t) { var n = this.cy, r = this.findContainerClientCoords(), o = r[0], a = r[1], i = r[4], s = n.pan(), u = n.zoom(), l = ((e17 - 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 e17 = this.container, t = e17.getBoundingClientRect(), n = this.cy.window().getComputedStyle(e17), 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 = e17.clientWidth, s = e17.clientHeight, u = o.left + o.right, l = o.top + o.bottom, c = a.left + a.right, d = t.width / (i + c), f = i - u, h10 = s - l, p = t.left + o.left + a.left, v = t.top + o.top + a.top; return this.containerBB = [p, v, f, h10, d]; }; Is.invalidateContainerClientCoordsCache = function() { this.containerBB = null; }; Is.findNearestElement = function(e17, t, n, r) { return this.findNearestElements(e17, t, n, r)[0]; }; Is.findNearestElements = function(e17, 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, h10 = 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 < h10)) 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, h10 = S ?? h10; break; } } } else s.push(E), p = E, h10 = S ?? h10; } 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 <= e17 && e17 <= A.x + F && A.y - $ <= t && t <= A.y + $) { var M = a.nodeShapes[o.getNodeShape(E)]; if (M.checkPoint(e17, t, 0, S, O, A.x, A.y, L, N)) return m(E, 0), true; } } 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, W = 0; W + 3 < R.length; W += 2) if (cie(e17, t, R[W], R[W + 1], R[W + 2], R[W + 3], N) && L > (z = vie(e17, t, R[W], R[W + 1], R[W + 2], R[W + 3]))) return m(E, z), true; } else if (O.edgeType === "bezier" || O.edgeType === "multibezier" || O.edgeType === "self" || O.edgeType === "compound") { for (var R = O.allpts, W = 0; W + 5 < O.allpts.length; W += 4) if (die(e17, t, R[W], R[W + 1], R[W + 2], R[W + 3], R[W + 4], R[W + 5], N) && L > (z = hie(e17, t, R[W], R[W + 1], R[W + 2], R[W + 3], R[W + 4], R[W + 5]))) return m(E, z), true; } 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 }], W = 0; W < Q.length; W++) { var ae = Q[W], pe = a.arrowShapes[E.pstyle(ae.name + "-arrow-shape").value], we = E.pstyle("width").pfValue; if (pe.roughCollide(e17, t, oe, ae.angle, { x: ae.x, y: ae.y }, we, c) && pe.collide(e17, t, oe, ae.angle, { x: ae.x, y: ae.y }, we, c)) return m(E), true; } 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, W = E.pstyle($ + "text-margin-y").pfValue, oe = A.x1 - F - R, Q = A.x2 + F - R, ae = A.y1 - F - W, pe = A.y2 + F - W; 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 + W, te.x + R, te.y + W, le.x + R, le.y + W, J.x + R, J.y + W ]; if (Sr(e17, t, Ee)) return m(E), true; } else if (Fl(A, e17, t)) return m(E), true; } } 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(e17, t, n, r) { var o = this.getCachedZSortedEles().interactive, a = [], i = Math.min(e17, n), s = Math.max(e17, n), u = Math.min(t, r), l = Math.max(t, r); e17 = i, n = s, t = u, r = l; for (var c = Br({ x1: e17, y1: t, x2: n, y2: r }), d = 0; d < o.length; d++) { var f = o[d]; if (f.isNode()) { var h10 = f, p = h10.boundingBox({ includeNodes: true, includeEdges: false, includeLabels: false }); wy(c, p) && !vS(p, c) && a.push(h10); } 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 = true, w = 0; w < b.length; w++) if (!uie(c, b[w])) { x = false; break; } x && a.push(v); } else (g.edgeType === "haystack" || g.edgeType === "straight") && a.push(v); } } return a; }; var uf = {}; uf.calculateArrowAngles = function(e17) { var t = e17._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, h10, g, b; if (n ? (c = t.haystackPts[0], d = t.haystackPts[1], f = t.haystackPts[2], h10 = t.haystackPts[3]) : (c = t.arrowStartX, d = t.arrowStartY, f = t.arrowEndX, h10 = 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 + h10) / 2), u = f - c, l = h10 - 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 = h10 - 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 = h10 - m; } else u = f - g, l = h10 - b; t.tgtArrowAngle = Md(u, l); }; uf.getArrowWidth = uf.getArrowHeight = function(e17, t) { var n = this.arrowWidthCache = this.arrowWidthCache || {}, r = n[e17 + ", " + t]; return r || (r = Math.max(Math.pow(e17 * 13.37, 0.9), 29) * t, n[e17 + ", " + t] = r, r); }; var j0; var H0; var Ho = {}; var Yr = {}; var ik; var sk; var Hi; var xp; var pa; var Mi; var ji; var jo; var Ks; var Gd; var s_; var l_; var U0; var q0; var lk; var uk = function(e17, t, n) { n.x = t.x - e17.x, n.y = t.y - e17.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); }; var Yce = function(e17, t) { t.x = e17.x * -1, t.y = e17.y * -1, t.nx = e17.nx * -1, t.ny = e17.ny * -1, t.ang = e17.ang > 0 ? -(Math.PI - e17.ang) : Math.PI + e17.ang; }; var Zce = function(e17, t, n, r, o) { if (e17 !== lk ? uk(t, e17, 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 = false, sk < 0 ? pa < 0 ? pa = Math.PI + pa : (pa = Math.PI - pa, Hi = -1, xp = true) : pa > 0 && (Hi = -1, xp = true), 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_(e17, t) { t.radius === 0 ? e17.lineTo(t.cx, t.cy) : e17.arc(t.cx, t.cy, t.radius, t.startAngle, t.endAngle, t.counterClockwise); } function Iy(e17, t, n, r) { var o = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : true; 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(e17, 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(e17, t) { var n = t.posPts, r = t.intersectionPts, o = t.vectorNormInverse, a, i = e17.pstyle("source-endpoint"), s = e17.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 = e17.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(e17.source()[0], i), f = Co(d, 2), h10 = f[0], p = f[1], v = this.manualEndptToPx(e17.target()[0], s), m = Co(v, 2), g = m[0], b = m[1], x = { x1: h10, y1: p, x2: g, y2: b }; o = l(h10, p, g, b), a = x; } else Mt("Edge ".concat(e17.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(e17) { for (var t = 0; t < e17.length; t++) { var n = e17[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(), h10 = 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 * h10 * 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 = true, this.storeEdgeProjections(n), this.calculateArrowAngles(n), this.recalculateEdgeLabelProjections(n), this.calculateLabelAngles(n); } }; vr.findSegmentsPoints = function(e17, t) { var n = e17._private.rscratch, r = e17.pstyle("segment-weights"), o = e17.pstyle("segment-distances"), a = e17.pstyle("segment-radii"), i = e17.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], h10 = 1 - d, p = d, v = this.findMidptPtsEtc(e17, t), m = v.midptPts, g = v.vectorNormInverse, b = { x: m.x1 * h10 + m.x2 * p, y: m.y1 * h10 + 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(e17, t, n, r) { var o = e17._private.rscratch, a = t.dirCounts, i = t.srcPos, s = e17.pstyle("control-point-distances"), u = s ? s.pfValue[0] : void 0, l = e17.pstyle("loop-direction").pfValue, c = e17.pstyle("loop-sweep").pfValue, d = e17.pstyle("control-point-step-size").pfValue; o.edgeType = "self"; var f = n, h10 = d; r && (f = 0, h10 = 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 * h10 * (f / 3 + 1), i.y + Math.sin(v) * 1.4 * h10 * (f / 3 + 1), i.x + Math.cos(m) * 1.4 * h10 * (f / 3 + 1), i.y + Math.sin(m) * 1.4 * h10 * (f / 3 + 1)]; }; vr.findCompoundLoopPoints = function(e17, t, n, r) { var o = e17._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 = e17.pstyle("control-point-step-size").pfValue, f = e17.pstyle("control-point-distances"), h10 = f ? f.pfValue[0] : void 0, p = n, v = d; r && (p = 0, v = h10); 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(e17) { e17._private.rscratch.edgeType = "straight"; }; vr.findBezierPoints = function(e17, t, n, r, o) { var a = e17._private.rscratch, i = e17.pstyle("control-point-step-size").pfValue, s = e17.pstyle("control-point-distances"), u = e17.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 h10 = 0; h10 < l; h10++) { var p = (0.5 - t.eles.length / 2 + n) * i * (o ? -1 : 1), v = void 0, m = fS(p); f && (c = s ? s.pfValue[h10] : i, d = u.value[h10]), 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(e17, 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(e17, t) { var n = e17._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, h10 = t.tgtW, p = t.tgtH, v = e17.pstyle("edge-distances").value, m = v !== "node-position", g = e17.pstyle("taxi-direction").value, b = g, x = e17.pstyle("taxi-turn"), w = x.units === "%", C = x.pfValue, k = C < 0, E = e17.pstyle("taxi-turn-min-distance").pfValue, S = m ? (d + h10) / 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 = false; b === l ? g = Math.abs(L) > Math.abs(N) ? o : r : b === u || b === s ? (g = r, M = true) : (b === a || b === i) && (g = o, M = true); var I = g === r, z = I ? N : L, R = I ? $ : F, W = fS(R), oe = false; !(M && (w || k)) && (b === s && R < 0 || b === u && R > 0 || b === a && R > 0 || b === i && R < 0) && (W *= -1, z = W * Math.abs(z), oe = true); var Q; if (w) { var ae = C < 0 ? 1 + C : C; Q = ae * z; } else { var pe = C < 0 ? z : 0; Q = pe + C * W; } 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) <= h10 / 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 * W : 0), j = c.x1, se = c.x2; n.segpts = [j, P, se, P]; } else { var ce = c.x1 + Q + (m ? d / 2 * W : 0), de = c.y1, Oe = c.y2; n.segpts = [ce, de, ce, Oe]; } if (n.isRound) { var ye = e17.pstyle("taxi-radius").value, Fe = e17.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(e17, t) { var n = e17._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, h10 = 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(e17.pstyle("width").pfValue, e17.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 = false; if (v || m || E) { F = true; 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, h10); 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 = true; 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), W = { // 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] + W.x * 2 * oe, y: n.ctrlpts[1] + W.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] + W.x * (C - S), n.ctrlpts[1] = n.ctrlpts[1] + W.y * (C - S)) : (n.ctrlpts[0] = ae[0] + W.x * C, n.ctrlpts[1] = ae[1] + W.y * C); } F && this.findEndpoints(e17); } }; vr.storeAllpts = function(e17) { var t = e17._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], h10 = [d.x - f.cx, d.y - f.cy], p = f.radius / Math.sqrt(Math.pow(h10[0], 2) + Math.pow(h10[1], 2)); h10 = h10.map(function(v) { return v * p; }), t.midX = f.cx + h10[0], t.midY = f.cy + h10[1], t.midVector = h10; } } } }; vr.checkForInvalidEdgeWarning = function(e17) { var t = e17[0]._private.rscratch; t.nodesOverlap || Ve(t.startX) && Ve(t.startY) && Ve(t.endX) && Ve(t.endY) ? t.loggedErr = false : t.loggedErr || (t.loggedErr = true, Mt("Edge `" + e17.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(e17) { var t = this; if (!(!e17 || e17.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 < e17.length; u++) { var l = e17[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"), h10 = 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 = true), h10 && (x.hasBezier = true); } } 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(), W = 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 = true; 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, W, 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, W, 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: true, hasBezier: S.hasBezier, hasUnbundled: S.hasUnbundled, eles: S.eles, srcPos: I, tgtPos: M, srcW: W, 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_(e17) { var t = []; if (e17 != null) { for (var n = 0; n < e17.length; n += 2) { var r = e17[n], o = e17[n + 1]; t.push({ x: r, y: o }); } return t; } } vr.getSegmentPoints = function(e17) { var t = e17[0]._private.rscratch, n = t.edgeType; if (n === "segments") return this.recalculateRenderedStyle(e17), c_(t.segpts); }; vr.getControlPoints = function(e17) { var t = e17[0]._private.rscratch, n = t.edgeType; if (n === "bezier" || n === "multibezier" || n === "self" || n === "compound") return this.recalculateRenderedStyle(e17), c_(t.ctrlpts); }; vr.getEdgeMidpoint = function(e17) { var t = e17[0]._private.rscratch; return this.recalculateRenderedStyle(e17), { x: t.midX, y: t.midY }; }; var rd = {}; rd.manualEndptToPx = function(e17, t) { var n = this, r = e17.position(), o = e17.outerWidth(), a = e17.outerHeight(), i = e17._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(e17)].intersectLine(r.x, r.y, o, a, c[0], c[1], 0, e17.pstyle("corner-radius").value === "auto" ? "auto" : e17.pstyle("corner-radius").pfValue, i); } }; rd.findEndpoints = function(e17) { var t = this, n, r = e17.source()[0], o = e17.target()[0], a = r.position(), i = o.position(), s = e17.pstyle("target-arrow-shape").value, u = e17.pstyle("source-arrow-shape").value, l = e17.pstyle("target-distance-from-node").pfValue, c = e17.pstyle("source-distance-from-node").pfValue, d = r._private.rscratch, f = o._private.rscratch, h10 = e17.pstyle("curve-style").value, p = e17._private.rscratch, v = p.edgeType, m = h10 === "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 = e17.pstyle("source-endpoint"), O = E ? "outside-to-node" : S.value, F = r.pstyle("corner-radius").value === "auto" ? "auto" : r.pstyle("corner-radius").pfValue, $ = e17.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]], W = x ? [p.ctrlpts[p.ctrlpts.length - 2], p.ctrlpts[p.ctrlpts.length - 1]] : R; N = W, 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(e17) + l), Ue = zd(n, N, t.arrowShapes[s].gap(e17) + 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(e17) + c), Se = zd(n, M, t.arrowShapes[u].gap(e17) + 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 = true : p.badLine = false); }; rd.getSourceEndpoint = function(e17) { var t = e17[0]._private.rscratch; switch (this.recalculateRenderedStyle(e17), t.edgeType) { case "haystack": return { x: t.haystackPts[0], y: t.haystackPts[1] }; default: return { x: t.arrowStartX, y: t.arrowStartY }; } }; rd.getTargetEndpoint = function(e17) { var t = e17[0]._private.rscratch; switch (this.recalculateRenderedStyle(e17), 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(e17, 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 < e17.bezierProjPcts.length; i++) { var s = e17.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(e17) { var t = e17._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, e17, 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(e17.pstyle("width").pfValue, e17.pstyle("arrow-scale").value) * this.arrowShapeWidth; }; Ny.recalculateEdgeProjections = function(e17) { this.findEdgeControlPoints(e17); }; var sa = {}; sa.recalculateNodeLabelProjection = function(e17) { var t = e17.pstyle("label").strValue; if (!mi(t)) { var n, r, o = e17._private, a = e17.width(), i = e17.height(), s = e17.padding(), u = e17.position(), l = e17.pstyle("text-halign").strValue, c = e17.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(e17), this.applyLabelDimensions(e17); } }; var d_ = function(e17, t) { var n = Math.atan(t / e17); return e17 === 0 && n < 0 && (n = n * -1), n; }; var p_ = function(e17, t) { var n = t.x - e17.x, r = t.y - e17.y; return d_(n, r); }; var Qce = function(e17, t, n, r) { var o = yc(0, r - 1e-3, 1), a = yc(0, r + 1e-3, 1), i = al(e17, t, n, o), s = al(e17, t, n, a); return p_(i, s); }; sa.recalculateEdgeLabelProjections = function(e17) { var t, n = e17._private, r = n.rscratch, o = this, a = { mid: e17.pstyle("label").strValue, source: e17.pstyle("source-label").strValue, target: e17.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 h10 = { 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: h10, 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 h10 = e17.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 >= h10 || k) { v = { cp: x, segment: C }; break; } } if (v) break; } var E = v.cp, S = v.segment, O = (h10 - 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 >= h10)); R += 2) ; var W = h10 - N, oe = W / 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(e17); } }; sa.applyLabelDimensions = function(e17) { this.applyPrefixedLabelDimensions(e17), e17.isEdge() && (this.applyPrefixedLabelDimensions(e17, "source"), this.applyPrefixedLabelDimensions(e17, "target")); }; sa.applyPrefixedLabelDimensions = function(e17, t) { var n = e17._private, r = this.getLabelText(e17, t), o = this.calculateLabelDimensions(e17, r), a = e17.pstyle("line-height").pfValue, i = e17.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(e17, t) { var n = e17._private, r = t ? t + "-" : "", o = e17.pstyle(r + "label").strValue, a = e17.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 = e17.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 = e17.pstyle("text-max-width").pfValue, f = e17.pstyle("text-overflow-wrap").value, h10 = f === "anywhere", p = [], v = /[\s\u200b]+|$/g, m = 0; m < c.length; m++) { var g = c[m], b = this.calculateLabelDimensions(e17, g), x = b.width; if (h10) { 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(e17, 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 = e17.pstyle("text-max-width").pfValue, z = "", R = "…", W = false; if (this.calculateLabelDimensions(e17, o).width < I) return o; for (var oe = 0; oe < o.length; oe++) { var Q = this.calculateLabelDimensions(e17, z + o[oe] + R).width; if (Q > I) break; z += o[oe], oe === o.length - 1 && (W = true); } return W || (z += R), z; } return o; }; sa.getLabelJustification = function(e17) { var t = e17.pstyle("text-justification").strValue, n = e17.pstyle("text-halign").strValue; if (t === "auto") if (e17.isNode()) switch (n) { case "left": return "right"; case "right": return "left"; default: return "center"; } else return "center"; else return t; }; sa.calculateLabelDimensions = function(e17, t) { var n = this, r = n.cy.window(), o = r.document, a = ys(t, e17._private.labelDimsKey), i = n.labelDimCache || (n.labelDimCache = []), s = i[a]; if (s != null) return s; var u = 0, l = e17.pstyle("font-style").strValue, c = e17.pstyle("font-size").pfValue, d = e17.pstyle("font-family").strValue, f = e17.pstyle("font-weight").strValue, h10 = this.labelCalcCanvas, p = this.labelCalcCanvasContext; if (!h10) { h10 = this.labelCalcCanvas = o.createElement("canvas"), p = this.labelCalcCanvasContext = h10.getContext("2d"); var v = h10.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(e17, t) { var n = e17._private, r = n.rscratch, o = e17.isEdge(), a = t ? t + "-" : "", i = e17.pstyle(a + "text-rotation"), s = i.strValue; return s === "none" ? 0 : o && s === "autorotate" ? r.labelAutoAngle : s === "autorotate" ? 0 : i.pfValue; }; sa.calculateLabelAngles = function(e17) { var t = this, n = e17.isEdge(), r = e17._private, o = r.rscratch; o.labelAngle = t.calculateLabelAngle(e17), n && (o.sourceLabelAngle = t.calculateLabelAngle(e17, "source"), o.targetLabelAngle = t.calculateLabelAngle(e17, "target")); }; var f_ = {}; var ck = 28; var dk = false; f_.getNodeShape = function(e17) { var t = this, n = e17.pstyle("shape").value; if (n === "cutrectangle" && (e17.width() < ck || e17.height() < ck)) return dk || (Mt("The `cutrectangle` node shape can not be used at small sizes so `rectangle` is used instead"), dk = true), "rectangle"; if (e17.isParent()) return n === "rectangle" || n === "roundrectangle" || n === "round-rectangle" || n === "cutrectangle" || n === "cut-rectangle" || n === "barrel" ? n : "rectangle"; if (n === "polygon") { var r = e17.pstyle("shape-polygon-points").value; return t.nodeShapes.makePolygon(r).name; } return n; }; var Oh = {}; Oh.registerCalculationListeners = function() { var e17 = this.cy, t = e17.collection(), n = this, r = function(a) { var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : true; 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 = false, c.cleanConnected = false; } }; n.binder(e17).on("bounds.* dirty.*", function(a) { var i = a.target; r(i); }).on("style.* background.*", function(a) { var i = a.target; r(i, false); }); 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 = true); } if (i) for (var c = 0; c < i.length; c++) { var d = i[c]; d(a, t); } n.recalculateRenderedStyle(t), t = e17.collection(); } }; n.flushRenderedStyleQueue = function() { o(true); }, n.beforeRender(o, n.beforeRenderPriorities.eleCalcs); }; Oh.onUpdateEleCalcs = function(e17) { var t = this.onUpdateEleCalcsFns = this.onUpdateEleCalcsFns || []; t.push(e17); }; Oh.recalculateRenderedStyle = function(e17, t) { var n = function(x) { return x._private.rstyle.cleanConnected; }, r = [], o = []; if (!this.destroyed) { t === void 0 && (t = true); for (var a = 0; a < e17.length; a++) { var i = e17[a], s = i._private, u = s.rstyle; i.isEdge() && (!n(i.source()) || !n(i.target())) && (u.clean = false), !(t && u.clean || i.removed()) && i.pstyle("display").value !== "none" && (s.group === "nodes" ? o.push(i) : r.push(i), u.clean = true); } for (var l = 0; l < o.length; l++) { var c = o[l], d = c._private, f = d.rstyle, h10 = c.position(); this.recalculateNodeLabelProjection(c), f.nodeX = h10.x, f.nodeY = h10.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 e17 = this.cachedZSortedEles; if (e17) { e17.drag = [], e17.nondrag = []; for (var t = [], n = 0; n < e17.length; n++) { var r = e17[n], o = r._private.rscratch; r.grabbed() && !r.isParent() ? t.push(r) : o.inDragLayer ? e17.drag.push(r) : e17.nondrag.push(r); } for (var n = 0; n < t.length; n++) { var r = t[n]; e17.drag.push(r); } } }; Ph.invalidateCachedZSortedEles = function() { this.cachedZSortedEles = null; }; Ph.getCachedZSortedEles = function(e17) { if (e17 || !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(e17) { ct(h_, e17); }); var v_ = {}; v_.getCachedImage = function(e17, t, n) { var r = this, o = r.imageCache = r.imageCache || {}, a = o[e17]; if (a) return a.image.complete || a.image.addEventListener("load", n), a.image; a = o[e17] = o[e17] || {}; var i = a.image = new Image(); i.addEventListener("load", n), i.addEventListener("error", function() { i.error = true; }); var s = "data:", u = e17.substring(0, s.length).toLowerCase() === s; return u || (t = t === "null" ? null : t, i.crossOrigin = t), i.src = e17, i; }; var eu = {}; eu.registerBinding = function(e17, t, n, r) { var o = Array.prototype.slice.apply(arguments, [1]), a = this.binder(e17); return a.on.apply(a, o); }; eu.binder = function(e17) { var t = this, n = t.cy.window(), r = e17 === n || e17 === n.document || e17 === n.document.body || Eoe(e17); if (t.supportsPassiveEvents == null) { var o = false; try { var a = Object.defineProperty({}, "passive", { get: function() { return o = true, true; } }); 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 ?? false, passive: false, once: false }), t.bindings.push({ target: e17, args: c }), (e17.addEventListener || e17.on).apply(e17, c), this; }; return { on: i, addEventListener: i, addListener: i, bind: i }; }; eu.nodeIsDraggable = function(e17) { return e17 && e17.isNode() && !e17.locked() && e17.grabbable(); }; eu.nodeIsGrabbable = function(e17) { return this.nodeIsDraggable(e17) && e17.interactive(); }; eu.load = function() { var e17 = this, t = e17.cy.window(), n = function(P) { return P.selected(); }, r = function(P, j, se, ce) { P == null && (P = e17.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 = true; if (e17.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 = false; break; } } else se = true; return se; }, i = function(P) { P[0]._private.grabbed = true; }, s = function(P) { P[0]._private.grabbed = false; }, u = function(P) { P[0]._private.rscratch.inDragLayer = true; }, l = function(P) { P[0]._private.rscratch.inDragLayer = false; }, c = function(P) { P[0]._private.rscratch.isGrabTarget = true; }, d = function(P) { P[0]._private.rscratch.isGrabTarget = false; }, f = function(P, j) { var se = j.addToList, ce = se.has(P); !ce && P.grabbable() && !P.locked() && (se.merge(P), i(P)); }, h10 = 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); }), h10(P, j), g(P, { inDragLayer: j.inDragLayer }), e17.updateCachedGrabbedEles(); }, v = p, m = function(P) { P && (e17.getCachedZSortedEles().forEach(function(j) { s(j), l(j), d(j); }), e17.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 ? (e17.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 === e17.container) { e17.destroy(); break; } } } }), e17.container.parentNode && e17.removeObserver.observe(e17.container.parentNode, { childList: true })) : e17.registerBinding(e17.container, "DOMNodeRemoved", function(P) { e17.destroy(); }); var C = hh(function() { e17.cy.resize(); }, 100); x && (e17.styleObserver = new MutationObserver(C), e17.styleObserver.observe(e17.container, { attributes: true })), e17.registerBinding(t, "resize", C), w && (e17.resizeObserver = new ResizeObserver(C), e17.resizeObserver.observe(e17.container)); var k = function(P, j) { for (; P != null; ) j(P), P = P.parentNode; }, E = function() { e17.invalidateContainerClientCoordsCache(); }; k(e17.container, function(P) { e17.registerBinding(P, "transitionend", E), e17.registerBinding(P, "animationend", E), e17.registerBinding(P, "scroll", E); }), e17.registerBinding(e17.container, "contextmenu", function(P) { P.preventDefault(); }); var S = function() { return e17.selection[4] !== 0; }, O = function(P) { for (var j = e17.findContainerClientCoords(), se = j[0], ce = j[1], de = j[2], Oe = j[3], ye = P.touches ? P.touches : [P], Fe = false, 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 = true; break; } } if (!Fe) return false; for (var re = e17.container, Se = P.target, be = Se.parentNode, Le = false; be; ) { if (be === re) { Le = true; break; } be = be.parentNode; } return !!Le; }; e17.registerBinding(e17.container, "mousedown", function(P) { if (O(P) && !(e17.hoverData.which === 1 && P.which !== 1)) { P.preventDefault(), b(), e17.hoverData.capture = true, e17.hoverData.which = P.which; var j = e17.cy, se = [P.clientX, P.clientY], ce = e17.projectIntoViewport(se[0], se[1]), de = e17.selection, Oe = e17.findNearestElements(ce[0], ce[1], true, false), ye = Oe[0], Fe = e17.dragData.possibleDragElements; e17.hoverData.mdownPos = ce, e17.hoverData.mdownGPos = se; var Ye = function() { e17.hoverData.tapholdCancelled = false, clearTimeout(e17.hoverData.tapholdTimeout), e17.hoverData.tapholdTimeout = setTimeout(function() { if (!e17.hoverData.tapholdCancelled) { var Le = e17.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] } }); } }, e17.tapholdDuration); }; if (P.which == 3) { e17.hoverData.cxtStarted = true; var Je = { originalEvent: P, type: "cxttapstart", position: { x: ce[0], y: ce[1] } }; ye ? (ye.activate(), ye.emit(Je), e17.hoverData.down = ye) : j.emit(Je), e17.hoverData.downTime = (/* @__PURE__ */ new Date()).getTime(), e17.hoverData.cxtDragged = false; } else if (P.which == 1) { ye && ye.activate(); { if (ye != null && e17.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 = e17.dragData.possibleDragElements = j.collection(), v(ye, { addToList: Fe }), ye.emit(re("grabon")).emit(re("grab")); else { Fe = e17.dragData.possibleDragElements = j.collection(); var be = j.$(function(Le) { return Le.isNode() && Le.selected() && e17.nodeIsGrabbable(Le); }); p(be, { addToList: Fe }), ye.emit(re("grabon")), be.forEach(Se); } e17.redrawHint("eles", true), e17.redrawHint("drag", true); } e17.hoverData.down = ye, e17.hoverData.downs = Oe, e17.hoverData.downTime = (/* @__PURE__ */ new Date()).getTime(); } r(ye, ["mousedown", "tapstart", "vmousedown"], P, { x: ce[0], y: ce[1] }), ye == null ? (de[4] = 1, e17.data.bgActivePosistion = { x: ce[0], y: ce[1] }, e17.redrawHint("select", true), e17.redraw()) : ye.pannable() && (de[4] = 1), Ye(); } de[0] = de[2] = ce[0], de[1] = de[3] = ce[1]; } }, false), e17.registerBinding(t, "mousemove", function(P) { var j = e17.hoverData.capture; if (!(!j && !O(P))) { var se = false, ce = e17.cy, de = ce.zoom(), Oe = [P.clientX, P.clientY], ye = e17.projectIntoViewport(Oe[0], Oe[1]), Fe = e17.hoverData.mdownPos, Ye = e17.hoverData.mdownGPos, Je = e17.selection, re = null; !e17.hoverData.draggingEles && !e17.hoverData.dragging && !e17.hoverData.selecting && (re = e17.findNearestElement(ye[0], ye[1], true, false)); var Se = e17.hoverData.last, be = e17.hoverData.down, Le = [ye[0] - Je[2], ye[1] - Je[3]], Tt = e17.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; e17.hoverData.isOverThresholdDrag = Ct = an >= e17.desktopTapThreshold2; } var sn = o(P); Ct && (e17.hoverData.tapholdCancelled = true); var wn = function() { var ar = e17.hoverData.dragDelta = e17.hoverData.dragDelta || []; ar.length === 0 ? (ar.push(Le[0]), ar.push(Le[1])) : (ar[0] += Le[0], ar[1] += Le[1]); }; se = true, r(re, ["mousemove", "vmousemove", "tapdrag"], P, { x: ye[0], y: ye[1] }); var xn = function() { e17.data.bgActivePosistion = void 0, e17.hoverData.selecting || ce.emit({ originalEvent: P, type: "boxstart", position: { x: ye[0], y: ye[1] } }), Je[4] = 1, e17.hoverData.selecting = true, e17.redrawHint("select", true), e17.redraw(); }; if (e17.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), e17.hoverData.cxtDragged = true, (!e17.hoverData.cxtOver || re !== e17.hoverData.cxtOver) && (e17.hoverData.cxtOver && e17.hoverData.cxtOver.emit({ originalEvent: P, type: "cxtdragout", position: { x: ye[0], y: ye[1] } }), e17.hoverData.cxtOver = re, re && re.emit({ originalEvent: P, type: "cxtdragover", position: { x: ye[0], y: ye[1] } })); } } else if (e17.hoverData.dragging) { if (se = true, ce.panningEnabled() && ce.userPanningEnabled()) { var or; if (e17.hoverData.justStartedPan) { var Hn = e17.hoverData.mdownPos; or = { x: (ye[0] - Hn[0]) * de, y: (ye[1] - Hn[1]) * de }, e17.hoverData.justStartedPan = false; } else or = { x: Le[0] * de, y: Le[1] * de }; ce.panBy(or), ce.emit("dragpan"), e17.hoverData.dragged = true; } ye = e17.projectIntoViewport(P.clientX, P.clientY); } else if (Je[4] == 1 && (be == null || be.pannable())) { if (Ct) { if (!e17.hoverData.dragging && ce.boxSelectionEnabled() && (sn || !ce.panningEnabled() || !ce.userPanningEnabled())) xn(); else if (!e17.hoverData.selecting && ce.panningEnabled() && ce.userPanningEnabled()) { var Un = a(be, e17.hoverData.downs); Un && (e17.hoverData.dragging = true, e17.hoverData.justStartedPan = true, Je[4] = 0, e17.data.bgActivePosistion = tl(Fe), e17.redrawHint("select", true), e17.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] }), e17.hoverData.last = re), be) if (Ct) { if (ce.boxSelectionEnabled() && sn) be && be.grabbed() && (m(Tt), be.emit("freeon"), Tt.emit("free"), e17.dragData.didDrag && (be.emit("dragfreeon"), Tt.emit("dragfree"))), xn(); else if (be && be.grabbed() && e17.nodeIsDraggable(be)) { var Wt = !e17.dragData.didDrag; Wt && e17.redrawHint("eles", true), e17.dragData.didDrag = true, e17.hoverData.draggingEles || p(Tt, { inDragLayer: true }); var ln = { x: 0, y: 0 }; if (Ve(Le[0]) && Ve(Le[1]) && (ln.x += Le[0], ln.y += Le[1], Wt)) { var fn = e17.hoverData.dragDelta; fn && Ve(fn[0]) && Ve(fn[1]) && (ln.x += fn[0], ln.y += fn[1]); } e17.hoverData.draggingEles = true, Tt.silentShift(ln).emit("position drag"), e17.redrawHint("drag", true), e17.redraw(); } } else wn(); se = true; } if (Je[2] = ye[0], Je[3] = ye[1], se) return P.stopPropagation && P.stopPropagation(), P.preventDefault && P.preventDefault(), false; } }, false); var F, $, A; e17.registerBinding(t, "mouseup", function(P) { if (!(e17.hoverData.which === 1 && P.which !== 1 && e17.hoverData.capture)) { var j = e17.hoverData.capture; if (j) { e17.hoverData.capture = false; var se = e17.cy, ce = e17.projectIntoViewport(P.clientX, P.clientY), de = e17.selection, Oe = e17.findNearestElement(ce[0], ce[1], true, false), ye = e17.dragData.possibleDragElements, Fe = e17.hoverData.down, Ye = o(P); if (e17.data.bgActivePosistion && (e17.redrawHint("select", true), e17.redraw()), e17.hoverData.tapholdCancelled = true, e17.data.bgActivePosistion = void 0, Fe && Fe.unactivate(), e17.hoverData.which === 3) { var Je = { originalEvent: P, type: "cxttapend", position: { x: ce[0], y: ce[1] } }; if (Fe ? Fe.emit(Je) : se.emit(Je), !e17.hoverData.cxtDragged) { var re = { originalEvent: P, type: "cxttap", position: { x: ce[0], y: ce[1] } }; Fe ? Fe.emit(re) : se.emit(re); } e17.hoverData.cxtDragged = false, e17.hoverData.which = null; } else if (e17.hoverData.which === 1) { if (r(Oe, ["mouseup", "tapend", "vmouseup"], P, { x: ce[0], y: ce[1] }), !e17.dragData.didDrag && // didn't move a node around !e17.hoverData.dragged && // didn't pan !e17.hoverData.selecting && // not box selection !e17.hoverData.isOverThresholdDrag && (r(Fe, ["click", "tap", "vclick"], P, { x: ce[0], y: ce[1] }), $ = false, P.timeStamp - A <= se.multiClickDebounceTime() ? (F && clearTimeout(F), $ = true, 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 && !e17.dragData.didDrag && !e17.hoverData.selecting && !e17.hoverData.dragged && !o(P) && (se.$(n).unselect(["tapunselect"]), ye.length > 0 && e17.redrawHint("eles", true), e17.dragData.possibleDragElements = ye = se.collection()), Oe == Fe && !e17.dragData.didDrag && !e17.hoverData.selecting && Oe != null && Oe._private.selectable && (e17.hoverData.dragging || (se.selectionType() === "additive" || Ye ? Oe.selected() ? Oe.unselect(["tapunselect"]) : Oe.select(["tapselect"]) : Ye || (se.$(n).unmerge(Oe).unselect(["tapunselect"]), Oe.select(["tapselect"]))), e17.redrawHint("eles", true)), e17.hoverData.selecting) { var Se = se.collection(e17.getAllInBox(de[0], de[1], de[2], de[3])); e17.redrawHint("select", true), Se.length > 0 && e17.redrawHint("eles", true), 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"), e17.redraw(); } if (e17.hoverData.dragging && (e17.hoverData.dragging = false, e17.redrawHint("select", true), e17.redrawHint("eles", true), e17.redraw()), !de[4]) { e17.redrawHint("drag", true), e17.redrawHint("eles", true); var Le = Fe && Fe.grabbed(); m(ye), Le && (Fe.emit("freeon"), ye.emit("free"), e17.dragData.didDrag && (Fe.emit("dragfreeon"), ye.emit("dragfree"))); } } de[4] = 0, e17.hoverData.down = null, e17.hoverData.cxtStarted = false, e17.hoverData.draggingEles = false, e17.hoverData.selecting = false, e17.hoverData.isOverThresholdDrag = false, e17.dragData.didDrag = false, e17.hoverData.dragged = false, e17.hoverData.dragDelta = [], e17.hoverData.mdownPos = null, e17.hoverData.mdownGPos = null, e17.hoverData.which = null; } } }, false); var L = function(P) { if (!e17.scrollingPage) { var j = e17.cy, se = j.zoom(), ce = j.pan(), de = e17.projectIntoViewport(P.clientX, P.clientY), Oe = [de[0] * se + ce.x, de[1] * se + ce.y]; if (e17.hoverData.draggingEles || e17.hoverData.dragging || e17.hoverData.cxtStarted || S()) { P.preventDefault(); return; } if (j.panningEnabled() && j.userPanningEnabled() && j.zoomingEnabled() && j.userZoomingEnabled()) { P.preventDefault(), e17.data.wheelZooming = true, clearTimeout(e17.data.wheelTimeout), e17.data.wheelTimeout = setTimeout(function() { e17.data.wheelZooming = false, e17.redrawHint("eles", true), e17.redraw(); }, 150); var ye; P.deltaY != null ? ye = P.deltaY / -250 : P.wheelDeltaY != null ? ye = P.wheelDeltaY / 1e3 : ye = P.wheelDelta / 1e3, ye = ye * e17.wheelSensitivity; var Fe = P.deltaMode === 1; Fe && (ye *= 33); var Ye = j.zoom() * Math.pow(10, ye); P.type === "gesturechange" && (Ye = e17.gestureStartZoom * P.scale), j.zoom({ level: Ye, renderedPosition: { x: Oe[0], y: Oe[1] } }), j.emit(P.type === "gesturechange" ? "pinchzoom" : "scrollzoom"); } } }; e17.registerBinding(e17.container, "wheel", L, true), e17.registerBinding(t, "scroll", function(P) { e17.scrollingPage = true, clearTimeout(e17.scrollingPageTimeout), e17.scrollingPageTimeout = setTimeout(function() { e17.scrollingPage = false; }, 250); }, true), e17.registerBinding(e17.container, "gesturestart", function(P) { e17.gestureStartZoom = e17.cy.zoom(), e17.hasTouchStarted || P.preventDefault(); }, true), e17.registerBinding(e17.container, "gesturechange", function(P) { e17.hasTouchStarted || L(P); }, true), e17.registerBinding(e17.container, "mouseout", function(P) { var j = e17.projectIntoViewport(P.clientX, P.clientY); e17.cy.emit({ originalEvent: P, type: "mouseout", position: { x: j[0], y: j[1] } }); }, false), e17.registerBinding(e17.container, "mouseover", function(P) { var j = e17.projectIntoViewport(P.clientX, P.clientY); e17.cy.emit({ originalEvent: P, type: "mouseover", position: { x: j[0], y: j[1] } }); }, false); var N, M, I, z, R, W, 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; e17.registerBinding(e17.container, "touchstart", te = function(P) { if (e17.hasTouchStarted = true, !!O(P)) { b(), e17.touchData.capture = true, e17.data.bgActivePosistion = void 0; var j = e17.cy, se = e17.touchData.now, ce = e17.touchData.earlier; if (P.touches[0]) { var de = e17.projectIntoViewport(P.touches[0].clientX, P.touches[0].clientY); se[0] = de[0], se[1] = de[1]; } if (P.touches[1]) { var de = e17.projectIntoViewport(P.touches[1].clientX, P.touches[1].clientY); se[2] = de[0], se[3] = de[1]; } if (P.touches[2]) { var de = e17.projectIntoViewport(P.touches[2].clientX, P.touches[2].clientY); se[4] = de[0], se[5] = de[1]; } if (P.touches[1]) { e17.touchData.singleTouchMoved = true, m(e17.dragData.touchDragEles); var Oe = e17.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), W = 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 (W < Je && !P.touches[2]) { var re = e17.findNearestElement(se[0], se[1], true, true), Se = e17.findNearestElement(se[2], se[3], true, true); re && re.isNode() ? (re.activate().emit({ originalEvent: P, type: "cxttapstart", position: { x: se[0], y: se[1] } }), e17.touchData.start = re) : Se && Se.isNode() ? (Se.activate().emit({ originalEvent: P, type: "cxttapstart", position: { x: se[0], y: se[1] } }), e17.touchData.start = Se) : j.emit({ originalEvent: P, type: "cxttapstart", position: { x: se[0], y: se[1] } }), e17.touchData.start && (e17.touchData.start._private.grabbed = false), e17.touchData.cxt = true, e17.touchData.cxtDragged = false, e17.data.bgActivePosistion = void 0, e17.redraw(); return; } } if (P.touches[2]) j.boxSelectionEnabled() && P.preventDefault(); else if (!P.touches[1] && P.touches[0]) { var be = e17.findNearestElements(se[0], se[1], true, true), Le = be[0]; if (Le != null && (Le.activate(), e17.touchData.start = Le, e17.touchData.starts = be, e17.nodeIsGrabbable(Le))) { var Tt = e17.dragData.touchDragEles = j.collection(), Ct = null; e17.redrawHint("eles", true), e17.redrawHint("drag", true), Le.selected() ? (Ct = j.$(function(an) { return an.selected() && e17.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 && (e17.data.bgActivePosistion = { x: de[0], y: de[1] }, e17.redrawHint("select", true), e17.redraw()), e17.touchData.singleTouchMoved = false, e17.touchData.singleTouchStartTime = +/* @__PURE__ */ new Date(), clearTimeout(e17.touchData.tapholdTimeout), e17.touchData.tapholdTimeout = setTimeout(function() { e17.touchData.singleTouchMoved === false && !e17.pinching && !e17.touchData.selecting && r(e17.touchData.start, ["taphold"], P, { x: se[0], y: se[1] }); }, e17.tapholdDuration); } if (P.touches.length >= 1) { for (var Vt = e17.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]; e17.touchData.startGPosition = [bn.clientX, bn.clientY]; } } }, false); var le; e17.registerBinding(t, "touchmove", le = function(P) { var j = e17.touchData.capture; if (!(!j && !O(P))) { var se = e17.selection, ce = e17.cy, de = e17.touchData.now, Oe = e17.touchData.earlier, ye = ce.zoom(); if (P.touches[0]) { var Fe = e17.projectIntoViewport(P.touches[0].clientX, P.touches[0].clientY); de[0] = Fe[0], de[1] = Fe[1]; } if (P.touches[1]) { var Fe = e17.projectIntoViewport(P.touches[1].clientX, P.touches[1].clientY); de[2] = Fe[0], de[3] = Fe[1]; } if (P.touches[2]) { var Fe = e17.projectIntoViewport(P.touches[2].clientX, P.touches[2].clientY); de[4] = Fe[0], de[5] = Fe[1]; } var Ye = e17.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 >= e17.touchTapThreshold2; } if (j && e17.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 / W, xn = 150, mn = xn * xn, or = 1.5, Hn = or * or; if (wn >= Hn || sn >= mn) { e17.touchData.cxt = false, e17.data.bgActivePosistion = void 0, e17.redrawHint("select", true); var Un = { originalEvent: P, type: "cxttapend", position: { x: de[0], y: de[1] } }; e17.touchData.start ? (e17.touchData.start.unactivate().emit(Un), e17.touchData.start = null) : ce.emit(Un); } } if (j && e17.touchData.cxt) { var Un = { originalEvent: P, type: "cxtdrag", position: { x: de[0], y: de[1] } }; e17.data.bgActivePosistion = void 0, e17.redrawHint("select", true), e17.touchData.start ? e17.touchData.start.emit(Un) : ce.emit(Un), e17.touchData.start && (e17.touchData.start._private.grabbed = false), e17.touchData.cxtDragged = true; var Wt = e17.findNearestElement(de[0], de[1], true, true); (!e17.touchData.cxtOver || Wt !== e17.touchData.cxtOver) && (e17.touchData.cxtOver && e17.touchData.cxtOver.emit({ originalEvent: P, type: "cxtdragout", position: { x: de[0], y: de[1] } }), e17.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(), e17.data.bgActivePosistion = void 0, this.lastThreeTouch = +/* @__PURE__ */ new Date(), e17.touchData.selecting || ce.emit({ originalEvent: P, type: "boxstart", position: { x: de[0], y: de[1] } }), e17.touchData.selecting = true, e17.touchData.didSelect = true, 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), e17.redrawHint("select", true), e17.redraw(); else if (j && P.touches[1] && !e17.touchData.didSelect && ce.zoomingEnabled() && ce.panningEnabled() && ce.userZoomingEnabled() && ce.userPanningEnabled()) { P.preventDefault(), e17.data.bgActivePosistion = void 0, e17.redrawHint("select", true); var ln = e17.dragData.touchDragEles; if (ln) { e17.redrawHint("drag", true); for (var fn = 0; fn < ln.length; fn++) { var ar = ln[fn]._private; ar.grabbed = false, ar.rscratch.inDragLayer = false; } } var zo = e17.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 = e17.dragData.touchDragEles; m(ln), e17.redrawHint("drag", true), e17.redrawHint("eles", true), zo.unactivate().emit("freeon"), ln.emit("free"), e17.dragData.didDrag && (zo.emit("dragfreeon"), ln.emit("dragfree")); } ce.viewport({ zoom: Vo, pan: ld, cancelOnFailedZoom: true }), ce.emit("pinchzoom"), R = K, N = Vt, M = qt, I = bn, z = an, e17.pinching = true; } if (P.touches[0]) { var Fe = e17.projectIntoViewport(P.touches[0].clientX, P.touches[0].clientY); de[0] = Fe[0], de[1] = Fe[1]; } if (P.touches[1]) { var Fe = e17.projectIntoViewport(P.touches[1].clientX, P.touches[1].clientY); de[2] = Fe[0], de[3] = Fe[1]; } if (P.touches[2]) { var Fe = e17.projectIntoViewport(P.touches[2].clientX, P.touches[2].clientY); de[4] = Fe[0], de[5] = Fe[1]; } } else if (P.touches[0] && !e17.touchData.didSelect) { var Mr = e17.touchData.start, ru = e17.touchData.last, Wt; if (!e17.hoverData.draggingEles && !e17.swipePanning && (Wt = e17.findNearestElement(de[0], de[1], true, true)), j && Mr != null && P.preventDefault(), j && Mr != null && e17.nodeIsDraggable(Mr)) if (Je) { var ln = e17.dragData.touchDragEles, ud = !e17.dragData.didDrag; ud && p(ln, { inDragLayer: true }), e17.dragData.didDrag = true; var Ii = { x: 0, y: 0 }; if (Ve(re[0]) && Ve(re[1]) && (Ii.x += re[0], Ii.y += re[1], ud)) { e17.redrawHint("eles", true); var gr = e17.touchData.dragDelta; gr && Ve(gr[0]) && Ve(gr[1]) && (Ii.x += gr[0], Ii.y += gr[1]); } e17.hoverData.draggingEles = true, ln.silentShift(Ii).emit("position drag"), e17.redrawHint("drag", true), e17.touchData.startPosition[0] == Oe[0] && e17.touchData.startPosition[1] == Oe[1] && e17.redrawHint("eles", true), e17.redraw(); } else { var gr = e17.touchData.dragDelta = e17.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] } })), e17.touchData.last = Wt, j) for (var fn = 0; fn < de.length; fn++) de[fn] && e17.touchData.startPosition[fn] && Je && (e17.touchData.singleTouchMoved = true); if (j && (Mr == null || Mr.pannable()) && ce.panningEnabled() && ce.userPanningEnabled()) { var $h = a(Mr, e17.touchData.starts); $h && (P.preventDefault(), e17.data.bgActivePosistion || (e17.data.bgActivePosistion = tl(e17.touchData.startPosition)), e17.swipePanning ? (ce.panBy({ x: re[0] * ye, y: re[1] * ye }), ce.emit("dragpan")) : Je && (e17.swipePanning = true, ce.panBy({ x: be * ye, y: Tt * ye }), ce.emit("dragpan"), Mr && (Mr.unactivate(), e17.redrawHint("select", true), e17.touchData.start = null))); var Fe = e17.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 && !e17.hoverData.draggingEles && !e17.swipePanning && e17.data.bgActivePosistion != null && (e17.data.bgActivePosistion = void 0, e17.redrawHint("select", true), e17.redraw()); } }, false); var Ee; e17.registerBinding(t, "touchcancel", Ee = function(P) { var j = e17.touchData.start; e17.touchData.capture = false, j && j.unactivate(); }); var Ne, je, _e, De; if (e17.registerBinding(t, "touchend", Ne = function(P) { var j = e17.touchData.start, se = e17.touchData.capture; if (se) P.touches.length === 0 && (e17.touchData.capture = false), P.preventDefault(); else return; var ce = e17.selection; e17.swipePanning = false, e17.hoverData.draggingEles = false; var de = e17.cy, Oe = de.zoom(), ye = e17.touchData.now, Fe = e17.touchData.earlier; if (P.touches[0]) { var Ye = e17.projectIntoViewport(P.touches[0].clientX, P.touches[0].clientY); ye[0] = Ye[0], ye[1] = Ye[1]; } if (P.touches[1]) { var Ye = e17.projectIntoViewport(P.touches[1].clientX, P.touches[1].clientY); ye[2] = Ye[0], ye[3] = Ye[1]; } if (P.touches[2]) { var Ye = e17.projectIntoViewport(P.touches[2].clientX, P.touches[2].clientY); ye[4] = Ye[0], ye[5] = Ye[1]; } j && j.unactivate(); var Je; if (e17.touchData.cxt) { if (Je = { originalEvent: P, type: "cxttapend", position: { x: ye[0], y: ye[1] } }, j ? j.emit(Je) : de.emit(Je), !e17.touchData.cxtDragged) { var re = { originalEvent: P, type: "cxttap", position: { x: ye[0], y: ye[1] } }; j ? j.emit(re) : de.emit(re); } e17.touchData.start && (e17.touchData.start._private.grabbed = false), e17.touchData.cxt = false, e17.touchData.start = null, e17.redraw(); return; } if (!P.touches[2] && de.boxSelectionEnabled() && e17.touchData.selecting) { e17.touchData.selecting = false; var Se = de.collection(e17.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, e17.redrawHint("select", true), 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() && e17.redrawHint("eles", true), e17.redraw(); } if (j != null && j.unactivate(), P.touches[2]) e17.data.bgActivePosistion = void 0, e17.redrawHint("select", true); else if (!P.touches[1] && !P.touches[0] && !P.touches[0]) { e17.data.bgActivePosistion = void 0, e17.redrawHint("select", true); var Le = e17.dragData.touchDragEles; if (j != null) { var Tt = j._private.grabbed; m(Le), e17.redrawHint("drag", true), e17.redrawHint("eles", true), Tt && (j.emit("freeon"), Le.emit("free"), e17.dragData.didDrag && (j.emit("dragfreeon"), Le.emit("dragfree"))), r(j, ["touchend", "tapend", "vmouseup", "tapdragout"], P, { x: ye[0], y: ye[1] }), j.unactivate(), e17.touchData.start = null; } else { var Ct = e17.findNearestElement(ye[0], ye[1], true, true); r(Ct, ["touchend", "tapend", "vmouseup", "tapdragout"], P, { x: ye[0], y: ye[1] }); } var Dt = e17.touchData.startPosition[0] - ye[0], Vt = Dt * Dt, qt = e17.touchData.startPosition[1] - ye[1], bn = qt * qt, an = Vt + bn, sn = an * Oe * Oe; e17.touchData.singleTouchMoved || (j || de.$(":selected").unselect(["tapunselect"]), r(j, ["tap", "vclick"], P, { x: ye[0], y: ye[1] }), je = false, P.timeStamp - De <= de.multiClickDebounceTime() ? (_e && clearTimeout(_e), je = true, 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 && !e17.dragData.didDrag && j._private.selectable && sn < e17.touchTapThreshold2 && !e17.pinching && (de.selectionType() === "single" ? (de.$(n).unmerge(j).unselect(["tapunselect"]), j.select(["tapselect"])) : j.selected() ? j.unselect(["tapunselect"]) : j.select(["tapselect"]), e17.redrawHint("eles", true)), e17.touchData.singleTouchMoved = true; } for (var wn = 0; wn < ye.length; wn++) Fe[wn] = ye[wn]; e17.dragData.didDrag = false, P.touches.length === 0 && (e17.touchData.dragDelta = [], e17.touchData.startPosition = [null, null, null, null, null, null], e17.touchData.startGPosition = null, e17.touchData.didSelect = false), P.touches.length < 2 && (P.touches.length === 1 && (e17.touchData.startGPosition = [P.touches[0].clientX, P.touches[0].clientY]), e17.pinching = false, e17.redrawHint("eles", true), e17.redraw()); }, false), 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; }; e17.registerBinding(e17.container, "pointerdown", function(P) { st(P) || (P.preventDefault(), Ze(P), nt(P), te(P)); }), e17.registerBinding(e17.container, "pointerup", function(P) { st(P) || (Me(P), nt(P), Ne(P)); }), e17.registerBinding(e17.container, "pointercancel", function(P) { st(P) || (Me(P), nt(P), Ee(P)); }), e17.registerBinding(e17.container, "pointermove", function(P) { st(P) || (P.preventDefault(), rt(P), nt(P), le(P)); }); } }; var La = {}; La.generatePolygon = function(e17, t) { return this.nodeShapes[e17] = { renderer: this, name: e17, 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(e17, t, n, r, o, a) { this.renderer.nodeShapeImpl(this.name, e17, t, n, r, o); }, intersectLine: function(e17, t, n, r, o, a, i, s) { return mie(o, a, e17, t, n / 2 + i, r / 2 + i); }, checkPoint: function(e17, t, n, r, o, a, i, s) { return Yi(e17, t, r, o, a, i, n); } }; }; La.generateRoundPolygon = function(e17, t) { return this.nodeShapes[e17] = { renderer: this, name: e17, 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 h10, p, v, m, g = d.length; for (p = d[g - 1], h10 = 0; h10 < g; h10++) v = d[h10 % g], m = d[(h10 + 1) % g], s[u][h10] = 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(e17, t, n, r, o, a) { this.renderer.nodeShapeImpl(this.name, e17, t, n, r, o, this.points, a); }, intersectLine: function(e17, t, n, r, o, a, i, s) { return gS(o, a, e17, t, n, r, i, s); }, checkPoint: function(e17, 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(e17, t, this.points, a, i, r, o - c, [0, -1], n) || Ta(e17, t, this.points, a, i, r - c, o, [0, -1], n) || Yi(e17, t, c, c, a - u + s, i - l + s, n) || Yi(e17, t, c, c, a + u - s, i - l + s, n) || Yi(e17, t, c, c, a + u - s, i + l - s, n) || Yi(e17, 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(e17, t, n, r, o, a) { this.renderer.nodeShapeImpl(this.name, e17, t, n, r, o, null, a); }, generateCutTrianglePts: function(e17, t, n, r, o) { var a = o === "auto" ? this.cornerLength : o, i = t / 2, s = e17 / 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(e17, t, n, r, o, a, i, s) { var u = this.generateCutTrianglePts(n + 2 * i, r + 2 * i, e17, 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, e17, t); }, checkPoint: function(e17, t, n, r, o, a, i, s) { var u = s === "auto" ? this.cornerLength : s; if (Ta(e17, t, this.points, a, i, r, o - 2 * u, [0, -1], n) || Ta(e17, t, this.points, a, i, r - 2 * u, o, [0, -1], n)) return true; var l = this.generateCutTrianglePts(r, o, a, i); return Sr(e17, t, l.topLeft) || Sr(e17, t, l.topRight) || Sr(e17, t, l.bottomRight) || Sr(e17, t, l.bottomLeft); } }; }; La.generateBarrel = function() { return this.nodeShapes.barrel = { renderer: this, name: "barrel", points: yr(4, 0), draw: function(e17, t, n, r, o, a) { this.renderer.nodeShapeImpl(this.name, e17, t, n, r, o); }, intersectLine: function(e17, 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, e17, 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]]; }, h10 = [].concat(f(d.topLeft), f(d.topRight), f(d.bottomRight), f(d.bottomLeft)); return bc(o, a, h10, e17, t); }, generateBarrelBezierPts: function(e17, t, n, r) { var o = t / 2, a = e17 / 2, i = n - a, s = n + a, u = r - o, l = r + o, c = L0(e17, t), d = c.heightOffset, f = c.widthOffset, h10 = c.ctrlPtOffsetPct * e17, p = { topLeft: [i, u + d, i + h10, u, i + f, u], topRight: [s - f, u, s - h10, u, s, u + d], bottomRight: [s, l - d, s - h10, l, s - f, l], bottomLeft: [i + f, l, i + h10, l, i, l - d] }; return p.topLeft.isTop = true, p.topRight.isTop = true, p.bottomLeft.isBottom = true, p.bottomRight.isBottom = true, p; }, checkPoint: function(e17, t, n, r, o, a, i, s) { var u = L0(r, o), l = u.heightOffset, c = u.widthOffset; if (Ta(e17, t, this.points, a, i, r, o - 2 * l, [0, -1], n) || Ta(e17, t, this.points, a, i, r - 2 * c, o, [0, -1], n)) return true; 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, $), W = pie(R[0], R[1], R[2], k), oe = W.filter(function(Q) { return 0 <= Q && Q <= 1; }); if (oe.length > 0) return oe[0]; } return null; }, h10 = Object.keys(d), p = 0; p < h10.length; p++) { var v = h10[p], m = d[v], g = f(e17, 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 true; } } return false; } }; }; La.generateBottomRoundrectangle = function() { return this.nodeShapes["bottom-round-rectangle"] = this.nodeShapes.bottomroundrectangle = { renderer: this, name: "bottom-round-rectangle", points: yr(4, 0), draw: function(e17, t, n, r, o, a) { this.renderer.nodeShapeImpl(this.name, e17, t, n, r, o, this.points, a); }, intersectLine: function(e17, t, n, r, o, a, i, s) { var u = e17 - (n / 2 + i), l = t - (r / 2 + i), c = l, d = e17 + (n / 2 + i), f = ai(o, a, e17, t, u, l, d, c, false); return f.length > 0 ? f : gS(o, a, e17, t, n, r, i, s); }, checkPoint: function(e17, t, n, r, o, a, i, s) { s = s === "auto" ? ws(r, o) : s; var u = 2 * s; if (Ta(e17, t, this.points, a, i, r, o - u, [0, -1], n) || Ta(e17, t, this.points, a, i, r - u, o, [0, -1], n)) return true; 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(e17, t, d) || Yi(e17, t, u, u, a + r / 2 - s, i + o / 2 - s, n) || Yi(e17, t, u, u, a - r / 2 + s, i + o / 2 - s, n)); } }; }; La.registerNodeShapes = function() { var e17 = 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)), e17.square = e17.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); } e17.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(e17) { e17 = e17 || 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 = true, t.renderOptions = e17; }; od.beforeRender = function(e17, t) { if (!this.destroyed) { t == null && vn("Priority is not optional for beforeRender"); var n = this.beforeRenderCallbacks; n.push({ fn: e17, priority: t }), n.sort(function(r, o) { return o.priority - r.priority; }); } }; var pk = function(e17, t, n) { for (var r = e17.beforeRenderCallbacks, o = 0; o < r.length; o++) r[o].fn(t, n); }; od.startRenderLoop = function() { var e17 = this, t = e17.cy; if (!e17.renderLoopStarted) { e17.renderLoopStarted = true; var n = function r(o) { if (!e17.destroyed) { if (!t.batching()) if (e17.requestedFrame && !e17.skipFrame) { pk(e17, true, o); var a = _a(); e17.render(e17.renderOptions); var i = e17.lastDrawTime = _a(); e17.averageRedrawTime === void 0 && (e17.averageRedrawTime = i - a), e17.redrawCount === void 0 && (e17.redrawCount = 0), e17.redrawCount++, e17.redrawTotalTime === void 0 && (e17.redrawTotalTime = 0); var s = i - a; e17.redrawTotalTime += s, e17.lastRedrawTime = s, e17.averageRedrawTime = e17.averageRedrawTime / 2 + s / 2, e17.requestedFrame = false; } else pk(e17, false, o); e17.skipFrame = false, ef(r); } }; ef(n); } }; var ede = function(e17) { this.init(e17); }; var g_ = ede; var tu = g_.prototype; tu.clientFunctions = ["redrawHint", "render", "renderTo", "matchCanvasSize", "nodeShapeImpl", "arrowShapeImpl"]; tu.init = function(e17) { var t = this; t.options = e17, t.cy = e17.cy; var n = t.container = e17.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: false, initialPan: [null, null], capture: false }, t.dragData = { possibleDragElements: [] }, t.touchData = { start: null, capture: false, // These 3 fields related to tap, taphold events startPosition: [null, null, null, null, null, null], singleTouchStartTime: null, singleTouchMoved: true, now: [null, null, null, null, null, null], earlier: [null, null, null, null, null, null] }, t.redraws = 0, t.showFps = e17.showFps, t.debug = e17.debug, t.hideEdgesOnViewport = e17.hideEdgesOnViewport, t.textureOnViewport = e17.textureOnViewport, t.wheelSensitivity = e17.wheelSensitivity, t.motionBlurEnabled = e17.motionBlur, t.forcedPixelRatio = Ve(e17.pixelRatio) ? e17.pixelRatio : null, t.motionBlur = e17.motionBlur, t.motionBlurOpacity = e17.motionBlurOpacity, t.motionBlurTransparency = 1 - t.motionBlurOpacity, t.motionBlurPxRatio = 1, t.mbPxRBlurry = 1, t.minMbLowQualFrames = 4, t.fullQualityMb = false, t.clearedForMotionBlur = [], t.desktopTapThreshold = e17.desktopTapThreshold, t.desktopTapThreshold2 = e17.desktopTapThreshold * e17.desktopTapThreshold, t.touchTapThreshold = e17.touchTapThreshold, t.touchTapThreshold2 = e17.touchTapThreshold * e17.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(e17, t) { var n = this, r = n.cy; if (!this.destroyed) { if (e17 === "init") { n.load(); return; } if (e17 === "destroy") { n.destroy(); return; } (e17 === "add" || e17 === "remove" || e17 === "move" && r.hasCompoundNodes() || e17 === "load" || e17 === "zorder" || e17 === "mount") && n.invalidateCachedZSortedEles(), e17 === "viewport" && n.redrawHint("select", true), (e17 === "load" || e17 === "resize" || e17 === "mount") && (n.invalidateContainerClientCoordsCache(), n.matchCanvasSize(n.container)), n.redrawHint("eles", true), n.redrawHint("drag", true), this.startRenderLoop(), this.redraw(); } }; tu.destroy = function() { var e17 = this; e17.destroyed = true, e17.cy.stopAnimationLoop(); for (var t = 0; t < e17.bindings.length; t++) { var n = e17.bindings[t], r = n, o = r.target; (o.off || o.removeEventListener).apply(o, r.args); } if (e17.bindings = [], e17.beforeRenderCallbacks = [], e17.onUpdateEleCalcsFns = [], e17.removeObserver && e17.removeObserver.disconnect(), e17.styleObserver && e17.styleObserver.disconnect(), e17.resizeObserver && e17.resizeObserver.disconnect(), e17.labelCalcDiv) try { document.body.removeChild(e17.labelCalcDiv); } catch { } }; tu.isHeadless = function() { return false; }; [Fy, h_, v_, eu, La, od].forEach(function(e17) { ct(tu, e17); }); var Nv = 1e3 / 60; var m_ = { setupDequeueing: function(e17) { return function() { var t = this, n = this.renderer; if (!t.dequeueingSetup) { t.dequeueingSetup = true; var r = hh(function() { n.redrawHint("eles", true), n.redrawHint("drag", true), n.redraw(); }, e17.deqRedrawThreshold), o = function(i, s) { var u = _a(), l = n.averageRedrawTime, c = n.lastRedrawTime, d = [], f = n.cy.extent(), h10 = 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 >= e17.deqFastCost * g) break; } else if (i) { if (v >= e17.deqCost * c || v >= e17.deqAvgCost * l) break; } else if (m >= e17.deqNoDrawCost * Nv) break; var b = e17.deq(t, h10, f); if (b.length > 0) for (var x = 0; x < b.length; x++) d.push(b[x]); else break; } d.length > 0 && (e17.onDeqd(t, d), !i && e17.shouldRedraw(t, d, h10, f) && r()); }, a = e17.priority || my; n.beforeRender(o, a(t)); } }; } }; var tde = function() { function e17(t) { var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : tf; py(this, e17), this.idsByKey = new Go(), this.keyForId = new Go(), this.cachesByLvl = new Go(), this.lvls = [], this.getKey = t, this.doesEleInvalidateKey = n; } return fy(e17, [{ 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; } }]), e17; }(); var fk = 25; var Xd = 50; var kp = -4; var W0 = 3; var nde = 7.99; var rde = 8; var ode = 1024; var ade = 1024; var ide = 1024; var sde = 0.2; var lde = 0.8; var ude = 10; var cde = 0.15; var dde = 0.1; var pde = 0.9; var fde = 0.9; var hde = 100; var vde = 1; var nl = { dequeue: "dequeue", downscale: "downscale", highQuality: "highQuality" }; var gde = nr({ getKey: null, doesEleInvalidateKey: tf, drawElement: null, getBoundingBox: null, getRotationPoint: null, getRotationOffset: null, isVisible: lS, allowEdgeTxrCaching: true, allowParentTxrCaching: true }); var $u = function(e17, t) { var n = this; n.renderer = e17, n.onDequeues = []; var r = gde(t); ct(n, r), n.lookup = new tde(r.getKey, r.doesEleInvalidateKey), n.setupDequeueing(); }; var Bn = $u.prototype; Bn.reasons = nl; Bn.getTextureQueue = function(e17) { var t = this; return t.eleImgCaches = t.eleImgCaches || {}, t.eleImgCaches[e17] = t.eleImgCaches[e17] || []; }; Bn.getRetiredTextureQueue = function(e17) { var t = this, n = t.eleImgCaches.retired = t.eleImgCaches.retired || {}, r = n[e17] = n[e17] || []; return r; }; Bn.getElementQueue = function() { var e17 = this, t = e17.eleCacheQueue = e17.eleCacheQueue || new ed(function(n, r) { return r.reqs - n.reqs; }); return t; }; Bn.getElementKeyToQueue = function() { var e17 = this, t = e17.eleKeyToCacheQueue = e17.eleKeyToCacheQueue || {}; return t; }; Bn.getElement = function(e17, 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) || !e17.visible() || e17.removed() || !a.allowEdgeTxrCaching && e17.isEdge() || !a.allowParentTxrCaching && e17.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(e17, l); if (!this.isVisible(e17, f)) return null; var h10 = u.get(e17, r); if (h10 && h10.invalidated && (h10.invalidated = false, h10.texture.invalidatedWidth -= h10.width), h10) return h10; 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(e17, 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(e17, t, n, $, nl.downscale); F(); } else return a.queueElement(e17, k.level - 1), k; else { var A; if (!x && !w && !C) for (var L = r - 1; L >= kp; L--) { var N = u.get(e17, L); if (N) { A = N; break; } } if (b(A)) return a.queueElement(e17, r), A; m.context.translate(m.usedWidth, 0), m.context.scale(l, l), this.drawElement(m.context, e17, t, f, false), m.context.scale(1 / l, 1 / l), m.context.translate(-m.usedWidth, 0); } return h10 = { x: m.usedWidth, texture: m, level: r, scale: l, width: d, height: c, scaledLabelShown: f }, m.usedWidth += Math.ceil(d + rde), m.eleCaches.push(h10), u.set(e17, r, h10), a.checkTextureFullness(m), h10; }; Bn.invalidateElements = function(e17) { for (var t = 0; t < e17.length; t++) this.invalidateElement(e17[t]); }; Bn.invalidateElement = function(e17) { var t = this, n = t.lookup, r = [], o = n.isInvalid(e17); if (o) { for (var a = kp; a <= W0; a++) { var i = n.getForCachedKey(e17, a); i && r.push(i); } var s = n.invalidate(e17); if (s) for (var u = 0; u < r.length; u++) { var l = r[u], c = l.texture; c.invalidatedWidth += l.width, l.invalidated = true, t.checkTextureUtility(c); } t.removeFromQueue(e17); } }; Bn.checkTextureUtility = function(e17) { e17.invalidatedWidth >= sde * e17.width && this.retireTexture(e17); }; Bn.checkTextureFullness = function(e17) { var t = this, n = t.getTextureQueue(e17.height); e17.usedWidth / e17.width > lde && e17.fullnessChecks >= ude ? yi(n, e17) : e17.fullnessChecks++; }; Bn.retireTexture = function(e17) { var t = this, n = e17.height, r = t.getTextureQueue(n), o = this.lookup; yi(r, e17), e17.retired = true; for (var a = e17.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(e17); }; Bn.addTexture = function(e17, t) { var n = this, r = n.getTextureQueue(e17), o = {}; return r.push(o), o.eleCaches = [], o.height = e17, 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(e17, t) { for (var n = this, r = n.getTextureQueue(e17), o = n.getRetiredTextureQueue(e17), a = 0; a < o.length; a++) { var i = o[a]; if (i.width >= t) return i.retired = false, 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(e17, t) { var n = this, r = n.getElementQueue(), o = n.getElementKeyToQueue(), a = this.getKey(e17), i = o[a]; if (i) i.level = Math.max(i.level, t), i.eles.merge(e17), i.reqs++, r.updateItem(i); else { var s = { eles: e17.spawn().merge(e17), level: t, reqs: 1, key: a }; r.push(s), o[a] = s; } }; Bn.dequeue = function(e17) { 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, e17, s.level, nl.dequeue); } } return o; }; Bn.removeFromQueue = function(e17) { var t = this, n = t.getElementQueue(), r = t.getElementKeyToQueue(), o = this.getKey(e17), a = r[o]; a != null && (a.eles.length === 1 ? (a.reqs = gy, n.updateItem(a), n.pop(), r[o] = null) : a.eles.unmerge(e17)); }; Bn.onDequeue = function(e17) { this.onDequeues.push(e17); }; Bn.offDequeue = function(e17) { yi(this.onDequeues, e17); }; Bn.setupDequeueing = m_.setupDequeueing({ deqRedrawThreshold: hde, deqCost: cde, deqAvgCost: dde, deqNoDrawCost: pde, deqFastCost: fde, deq: function(e17, t, n) { return e17.dequeue(t, n); }, onDeqd: function(e17, t) { for (var n = 0; n < e17.onDequeues.length; n++) { var r = e17.onDequeues[n]; r(t); } }, shouldRedraw: function(e17, 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 true; } return false; }, priority: function(e17) { return e17.renderer.beforeRenderPriorities.eleTxrDeq; } }); var mde = 1; var Hu = -4; var cf = 2; var yde = 3.99; var bde = 50; var wde = 50; var xde = 0.15; var kde = 0.1; var Cde = 0.9; var Ede = 0.9; var Sde = 1; var hk = 250; var _de = 4e3 * 4e3; var Tde = true; var y_ = function(e17) { var t = this, n = t.renderer = e17, r = n.cy; t.layersByLevel = {}, t.firstGet = true, t.lastInvalidationTime = _a() - 2 * hk, t.skipping = false, 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 = true : t.skipping = false; }, n.beforeRenderPriorities.lyrTxrSkip); var o = function(a, i) { return i.reqs - a.reqs; }; t.layersQueue = new ed(o), t.setupDequeueing(); }; var rr = y_.prototype; var vk = 0; var Ode = Math.pow(2, 53) - 1; rr.makeLayer = function(e17, t) { var n = Math.pow(2, t), r = Math.ceil(e17.w * n), o = Math.ceil(e17.h * n), a = this.renderer.makeOffscreenCanvas(r, o), i = { id: vk = ++vk % Ode, bb: e17, 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(e17, t, n) { var r = this, o = r.renderer, a = o.cy, i = a.zoom(), s = r.firstGet; if (r.firstGet = false, n == null) { if (n = Math.ceil(by(i * t)), n < Hu) n = Hu; else if (i >= yde || n > cf) return null; } r.validateLayersElesOrdering(n, e17); var u = r.layersByLevel, l = Math.pow(2, n), c = u[n] = u[n] || [], d, f = r.levelIsComplete(n, e17), h10, p = function() { var O = function(L) { if (r.validateLayersElesOrdering(L, e17), r.levelIsComplete(L, e17)) return h10 = u[L], true; }, F = function(L) { if (!h10) 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 < e17.length; O++) hS(d, e17[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 = e17.length / mde, x = !s, w = 0; w < e17.length; w++) { var C = e17[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: true, after: g }), !g)) return null; h10 || x ? r.queueLayer(g, C) : r.drawEleInLayer(g, C, n, t), g.eles.push(C), E[n] = g; } return h10 || (x ? null : c); }; rr.getEleLevelForLayerLevel = function(e17, t) { return e17; }; rr.drawEleInLayer = function(e17, t, n, r) { var o = this, a = this.renderer, i = e17.context, s = t.boundingBox(); s.w === 0 || s.h === 0 || !t.visible() || (n = o.getEleLevelForLayerLevel(n, r), a.setImgSmoothing(i, false), a.drawCachedElement(i, t, null, null, n, Tde), a.setImgSmoothing(i, true)); }; rr.levelIsComplete = function(e17, t) { var n = this, r = n.layersByLevel[e17]; if (!r || r.length === 0) return false; for (var o = 0, a = 0; a < r.length; a++) { var i = r[a]; if (i.reqs > 0 || i.invalid) return false; o += i.eles.length; } return o === t.length; }; rr.validateLayersElesOrdering = function(e17, t) { var n = this.layersByLevel[e17]; 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(e17, t) { for (var n = this, r = Jc(e17[0]), o = 0; o < e17.length; o++) for (var a = r ? null : e17[o], i = r ? e17[o] : e17[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 e17 = this, t = false, n = Hu; n <= cf; n++) { var r = e17.layersByLevel[n]; if (r && r.length > 0) { t = true; break; } } return t; }; rr.invalidateElements = function(e17) { var t = this; e17.length !== 0 && (t.lastInvalidationTime = _a(), !(e17.length === 0 || !t.haveLayers()) && t.updateElementsInLayers(e17, function(n, r, o) { t.invalidateLayer(n); })); }; rr.invalidateLayer = function(e17) { if (this.lastInvalidationTime = _a(), !e17.invalid) { var t = e17.level, n = e17.eles, r = this.layersByLevel[t]; yi(r, e17), e17.elesQueue = [], e17.invalid = true, e17.replacement && (e17.replacement.invalid = true); for (var o = 0; o < n.length; o++) { var a = n[o]._private.rscratch.imgLayerCaches; a && (a[t] = null); } } }; rr.refineElementTextures = function(e17) { var t = this; t.updateElementsInLayers(e17, 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(e17) { this.eleTxrDeqs.merge(e17), this.scheduleElementRefinement(); }; rr.queueLayer = function(e17, t) { var n = this, r = n.layersQueue, o = e17.elesQueue, a = o.hasId = o.hasId || {}; if (!e17.replacement) { if (t) { if (a[t.id()]) return; o.push(t), a[t.id()] = true; } e17.reqs ? (e17.reqs++, r.updateItem(e17)) : (e17.reqs = 1, r.push(e17)); } }; rr.dequeue = function(e17) { 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, e17), o++), r.length === 0 && r.push(true), a.elesQueue.length === 0 && (n.pop(), a.reqs = 0, a.replaces && t.applyLayerReplacement(a), t.requestRedraw()); } return r; }; rr.applyLayerReplacement = function(e17) { var t = this, n = t.layersByLevel[e17.level], r = e17.replaces, o = n.indexOf(r); if (!(o < 0 || r.invalid)) { n[o] = e17; for (var a = 0; a < e17.eles.length; a++) { var i = e17.eles[a]._private, s = i.imgLayerCaches = i.imgLayerCaches || {}; s && (s[e17.level] = e17); } t.requestRedraw(); } }; rr.requestRedraw = hh(function() { var e17 = this.renderer; e17.redrawHint("eles", true), e17.redrawHint("drag", true), e17.redraw(); }, 100); rr.setupDequeueing = m_.setupDequeueing({ deqRedrawThreshold: bde, deqCost: xde, deqAvgCost: kde, deqNoDrawCost: Cde, deqFastCost: Ede, deq: function(e17, t) { return e17.dequeue(t); }, onDeqd: my, shouldRedraw: lS, priority: function(e17) { return e17.renderer.beforeRenderPriorities.lyrTxrDeq; } }); var b_ = {}; var gk; function Pde(e17, t) { for (var n = 0; n < t.length; n++) { var r = t[n]; e17.lineTo(r.x, r.y); } } function $de(e17, t, n) { for (var r, o = 0; o < t.length; o++) { var a = t[o]; o === 0 && (r = a), e17.lineTo(a.x, a.y); } e17.quadraticCurveTo(n.x, n.y, r.x, r.y); } function mk(e17, t, n) { e17.beginPath && e17.beginPath(); for (var r = t, o = 0; o < r.length; o++) { var a = r[o]; e17.lineTo(a.x, a.y); } var i = n, s = n[0]; e17.moveTo(s.x, s.y); for (var o = 1; o < i.length; o++) { var a = i[o]; e17.lineTo(a.x, a.y); } e17.closePath && e17.closePath(); } function Ade(e17, t, n, r, o) { e17.beginPath && e17.beginPath(), e17.arc(n, r, o, 0, Math.PI * 2, false); var a = t, i = a[0]; e17.moveTo(i.x, i.y); for (var s = 0; s < a.length; s++) { var u = a[s]; e17.lineTo(u.x, u.y); } e17.closePath && e17.closePath(); } function Fde(e17, t, n, r) { e17.arc(t, n, r, 0, Math.PI * 2, false); } b_.arrowShapeImpl = function(e17) { return (gk || (gk = { polygon: Pde, "triangle-backcurve": $de, "triangle-tee": mk, "circle-triangle": Ade, "triangle-cross": mk, circle: Fde }))[e17]; }; var la = {}; la.drawElement = function(e17, t, n, r, o, a) { var i = this; t.isNode() ? i.drawNode(e17, t, n, r, o, a) : i.drawEdge(e17, t, n, r, o, a); }; la.drawElementOverlay = function(e17, t) { var n = this; t.isNode() ? n.drawNodeOverlay(e17, t) : n.drawEdgeOverlay(e17, t); }; la.drawElementUnderlay = function(e17, t) { var n = this; t.isNode() ? n.drawNodeUnderlay(e17, t) : n.drawEdgeUnderlay(e17, t); }; la.drawCachedElementPortion = function(e17, 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), h10 = 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, e17.translate(x, w), e17.rotate(f), C = u.getImgSmoothing(e17), C || u.setImgSmoothing(e17, true); var E = n.getRotationOffset(t); g = E.x, b = E.y; } else g = h10, b = p; var S; d !== 1 && (S = e17.globalAlpha, e17.globalAlpha = S * d), e17.drawImage(c.texture.canvas, c.x, 0, c.width, c.height, g, b, v, m), d !== 1 && (e17.globalAlpha = S), f !== 0 && (e17.rotate(-f), e17.translate(-x, -w), C || u.setImgSmoothing(e17, false)); } else n.drawElement(e17, t); } }; var Ide = function() { return 0; }; var Nde = function(e17, t) { return e17.getTextAngle(t, null); }; var Lde = function(e17, t) { return e17.getTextAngle(t, "source"); }; var Dde = function(e17, t) { return e17.getTextAngle(t, "target"); }; var Rde = function(e17, t) { return t.effectiveOpacity(); }; var Lv = function(e17, t) { return t.pstyle("text-opacity").pfValue * t.effectiveOpacity(); }; la.drawCachedElement = function(e17, 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(), h10 = a === true ? 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(e17, t), i.drawCachedElementPortion(e17, t, u, n, o, h10, Ide, Rde), (!p || !v) && i.drawCachedElementPortion(e17, t, l, n, o, h10, Nde, Lv), p && !v && (i.drawCachedElementPortion(e17, t, c, n, o, h10, Lde, Lv), i.drawCachedElementPortion(e17, t, d, n, o, h10, Dde, Lv)), i.drawElementOverlay(e17, t); } }; la.drawElements = function(e17, t) { for (var n = this, r = 0; r < t.length; r++) { var o = t[r]; n.drawElement(e17, o); } }; la.drawCachedElements = function(e17, t, n, r) { for (var o = this, a = 0; a < t.length; a++) { var i = t[a]; o.drawCachedElement(e17, i, n, r); } }; la.drawCachedNodes = function(e17, t, n, r) { for (var o = this, a = 0; a < t.length; a++) { var i = t[a]; i.isNode() && o.drawCachedElement(e17, i, n, r); } }; la.drawLayeredElements = function(e17, 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 || e17.drawImage(s.canvas, u.x1, u.y1, u.w, u.h); } else o.drawCachedElements(e17, t, n, r); }; var Da = {}; Da.drawEdge = function(e17, t, n) { var r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : true, o = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : true, a = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : true, i = this, s = t._private.rscratch; if (!(a && !t.visible()) && !(s.badLine || s.allpts == null || isNaN(s.allpts[0]))) { var u; n && (u = n, e17.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, h10 = 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(e17, t, N), i.drawEdgeTrianglePath(t, e17, s.allpts)) : (e17.lineWidth = h10, e17.lineCap = p, i.eleStrokeStyle(e17, t, N), i.drawEdgePath(t, e17, s.allpts, f), e17.lineCap = "butt"); }, w = function() { var N = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : g; if (e17.lineWidth = h10 + v, e17.lineCap = p, v > 0) i.colorStrokeStyle(e17, m[0], m[1], m[2], N); else { e17.lineCap = "butt"; return; } d === "straight-triangle" ? i.drawEdgeTrianglePath(t, e17, s.allpts) : (i.drawEdgePath(t, e17, s.allpts, f), e17.lineCap = "butt"); }, C = function() { o && i.drawEdgeOverlay(e17, t); }, k = function() { o && i.drawEdgeUnderlay(e17, t); }, E = function() { var N = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : b; i.drawArrowheads(e17, t, N); }, S = function() { i.drawElementText(e17, t, null, r); }; e17.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; e17.translate(F, $), x(L), E(L), e17.translate(-F, -$); } else w(); k(), x(), E(), C(), S(), n && e17.translate(u.x1, u.y1); } }; var w_ = function(e17) { if (!["overlay", "underlay"].includes(e17)) throw new Error("Invalid state"); return function(t, n) { if (n.visible()) { var r = n.pstyle("".concat(e17, "-opacity")).value; if (r !== 0) { var o = this, a = o.usePaths(), i = n._private.rscratch, s = n.pstyle("".concat(e17, "-padding")).pfValue, u = 2 * s, l = n.pstyle("".concat(e17, "-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(e17, t, n, r) { var o = e17._private.rscratch, a = t, i, s = false, u = this.usePaths(), l = e17.pstyle("line-dash-pattern").pfValue, c = e17.pstyle("line-dash-offset").pfValue; if (u) { var d = n.join("$"), f = o.pathCacheKey && o.pathCacheKey === d; f ? (i = t = o.pathCache, s = true) : (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 h10 = 2; h10 + 3 < n.length; h10 += 4) t.quadraticCurveTo(n[h10], n[h10 + 1], n[h10 + 2], n[h10 + 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(e17, t, n) { t.fillStyle = t.strokeStyle; for (var r = e17.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(e17, t, n) { var r = t._private.rscratch, o = r.edgeType === "haystack"; o || this.drawArrowhead(e17, t, "source", r.arrowStartX, r.arrowStartY, r.srcArrowAngle, n), this.drawArrowhead(e17, t, "mid-target", r.midX, r.midY, r.midtgtArrowAngle, n), this.drawArrowhead(e17, t, "mid-source", r.midX, r.midY, r.midsrcArrowAngle, n), o || this.drawArrowhead(e17, t, "target", r.arrowEndX, r.arrowEndY, r.tgtArrowAngle, n); }; Da.drawArrowhead = function(e17, 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"), h10 = f.value === "match-line" ? d : f.pfValue; f.units === "%" && (h10 *= d); var p = t.pstyle("opacity").value; i === void 0 && (i = p); var v = e17.globalCompositeOperation; (i !== 1 || c === "hollow") && (e17.globalCompositeOperation = "destination-out", s.colorFillStyle(e17, 255, 255, 255, 1), s.colorStrokeStyle(e17, 255, 255, 255, 1), s.drawArrowShape(t, e17, l, d, u, h10, r, o, a), e17.globalCompositeOperation = v); var m = t.pstyle(n + "-arrow-color").value; s.colorFillStyle(e17, m[0], m[1], m[2], i), s.colorStrokeStyle(e17, m[0], m[1], m[2], i), s.drawArrowShape(t, e17, c, d, u, h10, r, o, a); } } }; Da.drawArrowShape = function(e17, t, n, r, o, a, i, s, u) { var l = this, c = this.usePaths() && o !== "triangle-cross", d = false, f, h10 = t, p = { x: i, y: s }, v = e17.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 = true) : (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 = h10, 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(e17, t, n, r, o, a, i, s, u, l) { if (!(o <= 0 || a <= 0 || u <= 0 || l <= 0)) try { e17.drawImage(t, n, r, o, a, i, s, u, l); } catch (c) { Mt(c); } }; Ly.drawInscribedImage = function(e17, 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), h10 = n.width(), p = n.height(), v = n.padding() * 2, m = h10 + (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, W = c(n, "background-position-y", "units", r), oe = c(n, "background-position-y", "pfValue", r); W === "%" ? 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 = e17.globalAlpha; e17.globalAlpha = C; var we = a.getImgSmoothing(e17), ke = false; if (k === "no" && we ? (a.setImgSmoothing(e17, false), ke = true) : k === "yes" && !we && (a.setImgSmoothing(e17, true), ke = true), f === "no-repeat") w && (e17.save(), b.pathCache ? e17.clip(b.pathCache) : (a.nodeShapes[a.getNodeShape(n)].draw(e17, s, u, m, g, E, b), e17.clip())), a.safeDrawImage(e17, t, 0, 0, S, O, L, R, F, $), w && e17.restore(); else { var fe = e17.createPattern(t, f); e17.fillStyle = fe, a.nodeShapes[a.getNodeShape(n)].draw(e17, s, u, m, g, E, b), e17.translate(L, R), e17.fill(), e17.translate(-L, -R); } e17.globalAlpha = pe, ke && a.setImgSmoothing(e17, we); } }; var Ns = {}; Ns.eleTextBiggerThanMin = function(e17, t) { if (!t) { var n = e17.cy().zoom(), r = this.getPixelRatio(), o = Math.ceil(by(n * r)); t = Math.pow(2, o); } var a = e17.pstyle("font-size").pfValue * t, i = e17.pstyle("min-zoomed-font-size").pfValue; return !(a < i); }; Ns.drawElementText = function(e17, t, n, r, o) { var a = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : true, i = this; if (r == null) { if (a && !i.eleTextBiggerThanMin(t)) return; } else if (r === false) return; if (t.isNode()) { var s = t.pstyle("label"); if (!s || !s.value) return; var u = i.getLabelJustification(t); e17.textAlign = u, e17.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; e17.textAlign = "center", e17.textBaseline = "bottom"; } var h10 = !n, p; n && (p = n, e17.translate(-p.x1, -p.y1)), o == null ? (i.drawText(e17, t, null, h10, a), t.isEdge() && (i.drawText(e17, t, "source", h10, a), i.drawText(e17, t, "target", h10, a))) : i.drawText(e17, t, o, h10, a), n && e17.translate(p.x1, p.y1); }; Ns.getFontCache = function(e17) { var t; this.fontCaches = this.fontCaches || []; for (var n = 0; n < this.fontCaches.length; n++) if (t = this.fontCaches[n], t.context === e17) return t; return t = { context: e17 }, this.fontCaches.push(t), t; }; Ns.setupTextStyle = function(e17, t) { var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : true, 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; e17.font = r + " " + i + " " + o + " " + a, e17.lineJoin = "round", this.colorFillStyle(e17, l[0], l[1], l[2], s), this.colorStrokeStyle(e17, c[0], c[1], c[2], u); }; function Dv(e17, t, n, r, o) { var a = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : 5, i = arguments.length > 6 ? arguments[6] : void 0; e17.beginPath(), e17.moveTo(t + a, n), e17.lineTo(t + r - a, n), e17.quadraticCurveTo(t + r, n, t + r, n + a), e17.lineTo(t + r, n + o - a), e17.quadraticCurveTo(t + r, n + o, t + r - a, n + o), e17.lineTo(t + a, n + o), e17.quadraticCurveTo(t, n + o, t, n + o - a), e17.lineTo(t, n + a), e17.quadraticCurveTo(t, n, t + a, n), e17.closePath(), i ? e17.stroke() : e17.fill(); } Ns.getTextAngle = function(e17, t) { var n, r = e17._private, o = r.rscratch, a = t ? t + "-" : "", i = e17.pstyle(a + "text-rotation"), s = _o(o, "labelAngle", t); return i.strValue === "autorotate" ? n = e17.isEdge() ? s : 0 : i.strValue === "none" ? n = 0 : n = i.pfValue, n; }; Ns.drawText = function(e17, t, n) { var r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : true, o = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : true, 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(e17, t, o); var h10 = n ? n + "-" : "", p = _o(i, "labelWidth", n), v = _o(i, "labelHeight", n), m = t.pstyle(h10 + "text-margin-x").pfValue, g = t.pstyle(h10 + "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, e17.translate(c, d), e17.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 = e17.fillStyle, R = t.pstyle("text-background-color").value; e17.fillStyle = "rgba(" + R[0] + "," + R[1] + "," + R[2] + "," + k * s + ")", $ ? Dv(e17, L, N, M, I, A) : e17.fillRect(L, N, M, I), e17.fillStyle = z; } if (S > 0 && E > 0) { var W = e17.strokeStyle, oe = e17.lineWidth, Q = t.pstyle("text-border-color").value, ae = t.pstyle("text-border-style").value; if (e17.strokeStyle = "rgba(" + Q[0] + "," + Q[1] + "," + Q[2] + "," + E * s + ")", e17.lineWidth = S, e17.setLineDash) switch (ae) { case "dotted": e17.setLineDash([1, 1]); break; case "dashed": e17.setLineDash([4, 2]); break; case "double": e17.lineWidth = S / 4, e17.setLineDash([]); break; case "solid": e17.setLineDash([]); break; } if ($ ? Dv(e17, L, N, M, I, A, "stroke") : e17.strokeRect(L, N, M, I), ae === "double") { var pe = S / 2; $ ? Dv(e17, L + pe, N + pe, M - pe * 2, I - pe * 2, A, "stroke") : e17.strokeRect(L + pe, N + pe, M - pe * 2, I - pe * 2); } e17.setLineDash && e17.setLineDash([]), e17.lineWidth = oe, e17.strokeStyle = W; } } var we = 2 * t.pstyle("text-outline-width").pfValue; if (we > 0 && (e17.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 && e17.strokeText(ke[te], u, l), e17.fillText(ke[te], u, l), l += fe; } else we > 0 && e17.strokeText(f, u, l), e17.fillText(f, u, l); C !== 0 && (e17.rotate(-C), e17.translate(-c, -d)); } } }; var nu = {}; nu.drawNode = function(e17, t, n) { var r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : true, o = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : true, a = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : true, 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, h10 = i.usePaths(), p, v = false, m = t.padding(); s = t.width() + 2 * m, u = t.height() + 2 * m; var g; n && (g = n, e17.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, W = 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(e17, t, Oe); }, te = function() { var Oe = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Q; i.colorStrokeStyle(e17, N[0], N[1], N[2], Oe); }, le = function() { var Oe = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : ke; i.colorStrokeStyle(e17, 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 = false; return Se != null ? (be = Se, Le = true, 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 (h10) { e17.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; h10 && (Oe = { x: 0, y: 0 }), i.nodeShapes[i.getNodeShape(t)].draw(p || e17, Oe.x, Oe.y, s, u, ge, c); } h10 ? e17.fill(p) : e17.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] : true, 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(e17, C[Je], t, Je, Oe)); } l.backgrounding = Ye !== k, Fe !== l.backgrounding && t.updateStyle(false); }, Be = function() { var Oe = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : false, ye = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : f; i.hasPie(t) && (i.drawPie(e17, t, ye), Oe && (h10 || i.nodeShapes[i.getNodeShape(t)].draw(e17, 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(e17, Fe, Fe, Fe, ye), h10 ? e17.fill(p) : e17.fill()); }, Ze = function() { if (A > 0) { if (e17.lineWidth = A, e17.lineCap = z, e17.lineJoin = I, e17.setLineDash) switch (M) { case "dotted": e17.setLineDash([1, 1]); break; case "dashed": e17.setLineDash(W), e17.lineDashOffset = oe; break; case "solid": case "double": e17.setLineDash([]); break; } if (R !== "center") { if (e17.save(), e17.lineWidth *= 2, R === "inside") h10 ? e17.clip(p) : e17.clip(); else { var Oe = new Path2D(); Oe.rect(-s / 2 - A, -u / 2 - A, s + 2 * A, u + 2 * A), Oe.addPath(p), e17.clip(Oe, "evenodd"); } h10 ? e17.stroke(p) : e17.stroke(), e17.restore(); } else h10 ? e17.stroke(p) : e17.stroke(); if (M === "double") { e17.lineWidth = A / 3; var ye = e17.globalCompositeOperation; e17.globalCompositeOperation = "destination-out", h10 ? e17.stroke(p) : e17.stroke(), e17.globalCompositeOperation = ye; } e17.setLineDash && e17.setLineDash([]); } }, Me = function() { if (ae > 0) { if (e17.lineWidth = ae, e17.lineCap = "butt", e17.setLineDash) switch (we) { case "dotted": e17.setLineDash([1, 1]); break; case "dashed": e17.setLineDash([4, 2]); break; case "solid": case "double": e17.setLineDash([]); break; } var Oe = d; h10 && (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 (h10) { var Tt = Ee(re, Se, ye, be); Le = Tt.path; } if (ye === "ellipse") i.drawEllipsePath(Le || e17, 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 || e17, 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 || e17, 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 || e17, 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 || e17, Oe.x, Oe.y, re, Se, ge + (Fe + ae + fe) / 2); else if (ye === "barrel") i.drawBarrelPath(Le || e17, 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 || e17, Oe.x, Oe.y, s, u, be); } else { var fn = (Fe + ae + fe) / s; be = nf(rf(be, -fn)), i.drawPolygonPath(Le || e17, Oe.x, Oe.y, s, u, be); } if (h10 ? e17.stroke(Le) : e17.stroke(), we === "double") { e17.lineWidth = Fe / 3; var ar = e17.globalCompositeOperation; e17.globalCompositeOperation = "destination-out", h10 ? e17.stroke(Le) : e17.stroke(), e17.globalCompositeOperation = ar; } e17.setLineDash && e17.setLineDash([]); } }, rt = function() { o && i.drawNodeOverlay(e17, t, d, s, u); }, nt = function() { o && i.drawNodeUnderlay(e17, t, d, s, u); }, st = function() { i.drawElementText(e17, 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; e17.translate(j, se), le(), Me(), J(ce * L), De(), Ae(de, true), te(ce * Q), Ze(), Be($ !== 0 || A !== 0), Ae(de, false), Ue(de), e17.translate(-j, -se); } h10 && e17.translate(-d.x, -d.y), nt(), h10 && e17.translate(d.x, d.y), le(), Me(), J(), De(), Ae(f, true), te(), Ze(), Be($ !== 0 || A !== 0), Ae(f, false), Ue(), h10 && e17.translate(-d.x, -d.y), st(), rt(), n && e17.translate(g.x1, g.y1); } }; var x_ = function(e17) { if (!["overlay", "underlay"].includes(e17)) throw new Error("Invalid state"); return function(t, n, r, o, a) { var i = this; if (n.visible()) { var s = n.pstyle("".concat(e17, "-padding")).pfValue, u = n.pstyle("".concat(e17, "-opacity")).value, l = n.pstyle("".concat(e17, "-color")).value, c = n.pstyle("".concat(e17, "-shape")).value, d = n.pstyle("".concat(e17, "-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(e17) { return e17 = e17[0], e17._private.hasPie; }; nu.drawPie = function(e17, 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 h10 = 1; h10 <= o.pieBackgroundN; h10++) { var p = t.pstyle("pie-" + h10 + "-background-size").value, v = t.pstyle("pie-" + h10 + "-background-color").value, m = t.pstyle("pie-" + h10 + "-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 || (e17.beginPath(), e17.moveTo(i, s), e17.arc(i, s, c, b, w), e17.closePath(), this.colorFillStyle(e17, v[0], v[1], v[2], m), e17.fill(), d += g); } }; var Xr = {}; var Bde = 100; Xr.getPixelRatio = function() { var e17 = this.data.contexts[0]; if (this.forcedPixelRatio != null) return this.forcedPixelRatio; var t = this.cy.window(), n = e17.backingStorePixelRatio || e17.webkitBackingStorePixelRatio || e17.mozBackingStorePixelRatio || e17.msBackingStorePixelRatio || e17.oBackingStorePixelRatio || e17.backingStorePixelRatio || 1; return (t.devicePixelRatio || 1) / n; }; Xr.paintCache = function(e17) { for (var t = this.paintCaches = this.paintCaches || [], n = true, r, o = 0; o < t.length; o++) if (r = t[o], r.context === e17) { n = false; break; } return n && (r = { context: e17 }, t.push(r)), r; }; Xr.createGradientStyleFor = function(e17, 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), h10 = bs(c, d); a = e17.createRadialGradient(d.x, d.y, 0, d.x, d.y, Math.max(f, h10)); } else { var p = i ? { x: 0, y: 0 } : n.position(), v = n.paddedWidth(), m = n.paddedHeight(); a = e17.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 = e17.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 = e17.createLinearGradient(x.x, x.y - E, x.x, x.y + E); break; case "to-top": a = e17.createLinearGradient(x.x, x.y + E, x.x, x.y - E); break; case "to-left": a = e17.createLinearGradient(x.x + k, x.y, x.x - k, x.y); break; case "to-right": a = e17.createLinearGradient(x.x - k, x.y, x.x + k, x.y); break; case "to-bottom-right": case "to-right-bottom": a = e17.createLinearGradient(x.x - k, x.y - E, x.x + k, x.y + E); break; case "to-top-right": case "to-right-top": a = e17.createLinearGradient(x.x - k, x.y + E, x.x + k, x.y - E); break; case "to-bottom-left": case "to-left-bottom": a = e17.createLinearGradient(x.x + k, x.y - E, x.x - k, x.y + E); break; case "to-top-left": case "to-left-top": a = e17.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(e17, t, n, r) { var o = this.createGradientStyleFor(e17, "background", t, n, r); if (!o) return null; e17.fillStyle = o; }; Xr.colorFillStyle = function(e17, t, n, r, o) { e17.fillStyle = "rgba(" + t + "," + n + "," + r + "," + o + ")"; }; Xr.eleFillStyle = function(e17, t, n) { var r = t.pstyle("background-fill").value; if (r === "linear-gradient" || r === "radial-gradient") this.gradientFillStyle(e17, t, r, n); else { var o = t.pstyle("background-color").value; this.colorFillStyle(e17, o[0], o[1], o[2], n); } }; Xr.gradientStrokeStyle = function(e17, t, n, r) { var o = this.createGradientStyleFor(e17, "line", t, n, r); if (!o) return null; e17.strokeStyle = o; }; Xr.colorStrokeStyle = function(e17, t, n, r, o) { e17.strokeStyle = "rgba(" + t + "," + n + "," + r + "," + o + ")"; }; Xr.eleStrokeStyle = function(e17, t, n) { var r = t.pstyle("line-fill").value; if (r === "linear-gradient" || r === "radial-gradient") this.gradientStrokeStyle(e17, t, r, n); else { var o = t.pstyle("line-color").value; this.colorStrokeStyle(e17, o[0], o[1], o[2], n); } }; Xr.matchCanvasSize = function(e17) { var t = this, n = t.data, r = t.findContainerClientCoords(), o = r[2], a = r[3], i = t.getPixelRatio(), s = t.motionBlurPxRatio; (e17 === t.data.bufferCanvases[t.MOTIONBLUR_BUFFER_NODE] || e17 === 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(e17, t, n, r) { this.render({ forcedContext: e17, forcedZoom: t, forcedPan: n, drawAllLayers: true, forcedPxRatio: r }); }; Xr.render = function(e17) { e17 = e17 || dS(); var t = e17.forcedContext, n = e17.drawAllLayers, r = e17.drawOnlyNodeLayer, o = e17.forcedZoom, a = e17.forcedPan, i = this, s = e17.forcedPxRatio === void 0 ? this.getPixelRatio() : e17.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 = e17.motionBlur !== void 0 ? e17.motionBlur : i.motionBlur, h10 = 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", true), i.redrawHint("drag", true)), i.prevPxRatio = s), !t && i.motionBlurTimeout && clearTimeout(i.motionBlurTimeout), f && (i.mbFrames == null && (i.mbFrames = 0), i.mbFrames++, i.mbFrames < 3 && (g = false), i.mbFrames > i.minMbLowQualFrames && (i.motionBlurPxRatio = i.mbPxRBlurry)), i.clearingMotionBlur && (i.motionBlurPxRatio = 1), i.textureDrawLastFrame && !d && (c[i.NODE] = true, c[i.SELECT_BOX] = true); 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 * h10, y: C.y * h10 }, Be = x * h10, Ue = i.canvasWidth * h10, Ze = i.canvasHeight * h10) : (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 = false), d) { if (i.textureDrawLastFrame = true, !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: true, 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] = false, c[i.NODE] = false; 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, false), 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(), W = i.pinching || i.hoverData.dragging || i.swipePanning || i.data.wheelZooming || i.hoverData.draggingEles || i.cy.animated(), oe = i.hideEdgesOnViewport && W, Q = []; if (Q[i.NODE] = !c[i.NODE] && f && !i.clearedForMotionBlur[i.NODE] || i.clearingMotionBlur, Q[i.NODE] && (i.clearedForMotionBlur[i.NODE] = true), Q[i.DRAG] = !c[i.DRAG] && f && !i.clearedForMotionBlur[i.DRAG] || i.clearingMotionBlur, Q[i.DRAG] && (i.clearedForMotionBlur[i.DRAG] = true), c[i.NODE] || n || r || Q[i.NODE]) { var ae = f && !Q[i.NODE] && h10 !== 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] = false); } if (!r && (c[i.DRAG] || n || Q[i.DRAG])) { var ae = f && !Q[i.DRAG] && h10 !== 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] = false); } 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] = false); } if (f && h10 !== 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 = h10; _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] = false), (c[i.DRAG] || Q[i.DRAG]) && (je(Ee, Ne, Q[i.DRAG]), c[i.DRAG] = false); } i.prevViewport = E, i.clearingMotionBlur && (i.clearingMotionBlur = false, i.motionBlurCleared = true, i.motionBlur = true), f && (i.motionBlurTimeout = setTimeout(function() { i.motionBlurTimeout = null, i.clearedForMotionBlur[i.NODE] = false, i.clearedForMotionBlur[i.DRAG] = false, i.motionBlur = false, i.clearingMotionBlur = !d, i.mbFrames = 0, c[i.NODE] = true, c[i.DRAG] = true, i.redraw(); }, Bde)), t || u.emit("render"); }; var Ai = {}; Ai.drawPolygonPath = function(e17, t, n, r, o, a) { var i = r / 2, s = o / 2; e17.beginPath && e17.beginPath(), e17.moveTo(t + i * a[0], n + s * a[1]); for (var u = 1; u < a.length / 2; u++) e17.lineTo(t + i * a[u * 2], n + s * a[u * 2 + 1]); e17.closePath(); }; Ai.drawRoundPolygonPath = function(e17, t, n, r, o, a, i) { i.forEach(function(s) { return u_(e17, s); }), e17.closePath(); }; Ai.drawRoundRectanglePath = function(e17, t, n, r, o, a) { var i = r / 2, s = o / 2, u = a === "auto" ? ws(r, o) : Math.min(a, s, i); e17.beginPath && e17.beginPath(), e17.moveTo(t, n - s), e17.arcTo(t + i, n - s, t + i, n, u), e17.arcTo(t + i, n + s, t, n + s, u), e17.arcTo(t - i, n + s, t - i, n, u), e17.arcTo(t - i, n - s, t, n - s, u), e17.lineTo(t, n - s), e17.closePath(); }; Ai.drawBottomRoundRectanglePath = function(e17, t, n, r, o, a) { var i = r / 2, s = o / 2, u = a === "auto" ? ws(r, o) : a; e17.beginPath && e17.beginPath(), e17.moveTo(t, n - s), e17.lineTo(t + i, n - s), e17.lineTo(t + i, n), e17.arcTo(t + i, n + s, t, n + s, u), e17.arcTo(t - i, n + s, t - i, n, u), e17.lineTo(t - i, n - s), e17.lineTo(t, n - s), e17.closePath(); }; Ai.drawCutRectanglePath = function(e17, t, n, r, o, a, i) { var s = r / 2, u = o / 2, l = i === "auto" ? xy() : i; e17.beginPath && e17.beginPath(), e17.moveTo(t - s + l, n - u), e17.lineTo(t + s - l, n - u), e17.lineTo(t + s, n - u + l), e17.lineTo(t + s, n + u - l), e17.lineTo(t + s - l, n + u), e17.lineTo(t - s + l, n + u), e17.lineTo(t - s, n + u - l), e17.lineTo(t - s, n - u + l), e17.closePath(); }; Ai.drawBarrelPath = function(e17, 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, h10 = d.heightOffset, p = d.ctrlPtOffsetPct * f; e17.beginPath && e17.beginPath(), e17.moveTo(s, l + h10), e17.lineTo(s, c - h10), e17.quadraticCurveTo(s + p, c, s + f, c), e17.lineTo(u - f, c), e17.quadraticCurveTo(u - p, c, u, c - h10), e17.lineTo(u, l + h10), e17.quadraticCurveTo(u - p, l, u - f, l), e17.lineTo(s + f, l), e17.quadraticCurveTo(s + p, l, s, l + h10), e17.closePath(); }; var yk = Math.sin(0); var bk = Math.cos(0); var K0 = {}; var G0 = {}; var k_ = Math.PI / 40; for (Gs = 0 * Math.PI; Gs < 2 * Math.PI; Gs += k_) K0[Gs] = Math.sin(Gs), G0[Gs] = Math.cos(Gs); var Gs; Ai.drawEllipsePath = function(e17, t, n, r, o) { if (e17.beginPath && e17.beginPath(), e17.ellipse) e17.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 ? e17.moveTo(a, i) : e17.lineTo(a, i); e17.closePath(); }; var ad = {}; ad.createBuffer = function(e17, t) { var n = document.createElement("canvas"); return n.width = e17, n.height = t, [n, n.getContext("2d")]; }; ad.bufferCanvasImage = function(e17) { var t = this.cy, n = t.mutableElements(), r = n.boundingBox(), o = this.findContainerClientCoords(), a = e17.full ? Math.ceil(r.w) : o[2], i = e17.full ? Math.ceil(r.h) : o[3], s = Ve(e17.maxWidth) || Ve(e17.maxHeight), u = this.getPixelRatio(), l = 1; if (e17.scale !== void 0) a *= e17.scale, i *= e17.scale, l = e17.scale; else if (s) { var c = 1 / 0, d = 1 / 0; Ve(e17.maxWidth) && (c = l * e17.maxWidth / a), Ve(e17.maxHeight) && (d = l * e17.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 h10 = f.getContext("2d"); if (a > 0 && i > 0) { h10.clearRect(0, 0, a, i), h10.globalCompositeOperation = "source-over"; var p = this.getCachedZSortedEles(); if (e17.full) h10.translate(-r.x1 * l, -r.y1 * l), h10.scale(l, l), this.drawElements(h10, p), h10.scale(1 / l, 1 / l), h10.translate(r.x1 * l, r.y1 * l); else { var v = t.pan(), m = { x: v.x * l, y: v.y * l }; l *= t.zoom(), h10.translate(m.x, m.y), h10.scale(l, l), this.drawElements(h10, p), h10.scale(1 / l, 1 / l), h10.translate(-m.x, -m.y); } e17.bg && (h10.globalCompositeOperation = "destination-over", h10.fillStyle = e17.bg, h10.rect(0, 0, a, i), h10.fill()); } return f; }; function Mde(e17, t) { for (var n = atob(e17), 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(e17) { var t = e17.indexOf(","); return e17.substr(t + 1); } function C_(e17, t, n) { var r = function() { return t.toDataURL(n, e17.quality); }; switch (e17.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, e17.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(e17) { return C_(e17, this.bufferCanvasImage(e17), "image/png"); }; ad.jpg = function(e17) { return C_(e17, this.bufferCanvasImage(e17), "image/jpeg"); }; var E_ = {}; E_.nodeShapeImpl = function(e17, t, n, r, o, a, i, s) { switch (e17) { 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_; var 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_(e17) { 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 = e17.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] = false; } 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 = true; var d = Br(), f = function(J) { return { x: (J.x1 + J.x2) / 2, y: (J.y1 + J.y2) / 2 }; }, h10 = 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, false, false, 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 h10(E(J)); }, W = function(J) { return h10(O(J)); }, oe = function(J) { return h10(F(J)); }, Q = function(J) { var te = S(J), le = h10(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: false, allowParentTxrCaching: false }), 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: W, 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(e17, t) { var n = this; switch (e17) { 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(e17) { if (e17 === void 0) return this.pathsEnabled; this.pathsEnabled = !!e17; }; Nt.usePaths = function() { return Vde && this.pathsEnabled; }; Nt.setImgSmoothing = function(e17, t) { e17.imageSmoothingEnabled != null ? e17.imageSmoothingEnabled = t : (e17.webkitImageSmoothingEnabled = t, e17.mozImageSmoothingEnabled = t, e17.msImageSmoothingEnabled = t); }; Nt.getImgSmoothing = function(e17) { return e17.imageSmoothingEnabled != null ? e17.imageSmoothingEnabled : e17.webkitImageSmoothingEnabled || e17.mozImageSmoothingEnabled || e17.msImageSmoothingEnabled; }; Nt.makeOffscreenCanvas = function(e17, t) { var n; if ((typeof OffscreenCanvas > "u" ? "undefined" : Dn(OffscreenCanvas)) !== "undefined") n = new OffscreenCanvas(e17, t); else { var r = this.cy.window(), o = r.document; n = o.createElement("canvas"), n.width = e17, n.height = t; } return n; }; [b_, la, Da, Ly, Ns, nu, Xr, Ai, ad, E_].forEach(function(e17) { ct(Nt, e17); }); var jde = [{ name: "null", impl: i_ }, { name: "base", impl: g_ }, { name: "canvas", impl: zde }]; var Hde = [{ type: "layout", extensions: Xce }, { type: "renderer", extensions: jde }]; var __ = {}; var T_ = {}; function O_(e17, t, n) { var r = n, o = function(E) { Mt("Can not register `" + t + "` for `" + e17 + "` since `" + E + "` already exists in the prototype and can not be overridden"); }; if (e17 === "core") { if (Ec.prototype[t]) return o(t); Ec.prototype[t] = n; } else if (e17 === "collection") { if (tr.prototype[t]) return o(t); tr.prototype[t] = n; } else if (e17 === "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 true; }, 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 (e17 === "renderer" && t !== "null" && t !== "base") { var h10 = P_("renderer", "base"), p = h10.prototype, v = n, m = n.prototype, g = function() { h10.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 (e17 === "__proto__" || e17 === "constructor" || e17 === "prototype") return vn(e17 + " is an illegal type to be registered, possibly lead to prototype pollutions"); return eS({ map: __, keys: [e17, t], value: r }); } function P_(e17, t) { return tS({ map: __, keys: [e17, t] }); } function Ude(e17, t, n, r, o) { return eS({ map: T_, keys: [e17, t, n, r], value: o }); } function qde(e17, t, n, r) { return tS({ map: T_, keys: [e17, 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(e17) { e17.extensions.forEach(function(t) { O_(e17.type, t.name, t.impl); }); }); var $_ = function e16() { if (!(this instanceof e16)) return new e16(); this.length = 0; }; var Cs = $_.prototype; Cs.instanceString = function() { return "stylesheet"; }; Cs.selector = function(e17) { var t = this.length++; return this[t] = { selector: e17, properties: [] }, this; }; Cs.css = function(e17, t) { var n = this.length - 1; if (at(e17)) this[n].properties.push({ name: e17, value: t }); else if (It(e17)) for (var r = e17, 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(e17) { var t = new cr(e17); return this.appendToStyle(t); }; Cs.appendToStyle = function(e17) { for (var t = 0; t < this.length; t++) { var n = this[t], r = n.selector, o = n.properties; e17.selector(r); for (var a = 0; a < o.length; a++) { var i = o[a]; e17.css(i.name, i.value); } } return e17; }; var Wde = "3.30.2"; var Es = function(e17) { if (e17 === void 0 && (e17 = {}), It(e17)) return new Ec(e17); if (at(e17)) return X0.apply(X0, arguments); }; Es.use = function(e17) { var t = Array.prototype.slice.call(arguments, 1); return t.unshift(Es), e17.apply(null, t), this; }; Es.warnings = function(e17) { return uS(e17); }; Es.version = Wde; Es.stylesheet = Es.Stylesheet = $_; var Kde = class extends EventTarget { constructor(e17, 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 = e17, this.graphCanvas = t; } async addConnectivity(e17) { var t; if (this.axons = e17.axons.map((n) => JSON.stringify(n)), this.dendrites = e17.dendrites.map((n) => JSON.stringify(n)), (t = e17.somas) != null && t.length && (this.somas = e17.somas.map((n) => JSON.stringify(n))), e17.connectivity.length) for (const n of e17.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(e17) { this.cyg = new Qde(this, e17), this.cyg.on("tap-node", (t) => { const n = new CustomEvent("tap-node", { detail: t.detail }); this.dispatchEvent(n); }); } selectConnectivity(e17) { 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(e17, a) && (n = r.id()); }), n && this.cyg.cy.$id(n).select(); } } clearConnectivity() { var e17; (e17 = this.cyg) != null && e17.cy && (this.cyg.cy.remove(), this.cyg.cy = null); } reset() { var e17; (e17 = this.cyg) != null && e17.cy && this.cyg.cy.reset(); } zoom(e17) { 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 + e17, renderedPosition: a }); } } enableZoom(e17) { var t; (t = this.cyg) != null && t.cy && this.cyg.cy.userZoomingEnabled(e17); } get elements() { return [ ...this.nodes.map((e17) => ({ data: e17 })), ...this.edges.map((e17) => ({ data: e17 })) ]; } get roots() { return [ ...this.dendrites, ...this.somas ]; } async graphNode(e17) { const t = JSON.stringify(e17), n = [e17[0], ...e17[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"] = true : o.axon = true : (this.dendrites.includes(t) || this.somas.includes(t)) && (o.dendrite = true), o; } on(e17, t) { this.addEventListener(e17, t); } }; var Gde = "#8300bf"; var Xde = "#f3ecf6"; var Yde = [ { selector: "node", style: { label: function(e17) { return Zde(e17.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(e17) { const t = e17.split(` `), n = t.length / 2, r = t.slice(n); return A_(r.join(` `)); } function A_(e17) { return e17.split(` `).map((t) => t && t[0] >= "a" && t[0] <= "z" ? t.charAt(0).toUpperCase() + t.slice(1) : t).join(` `); } function Y0(e17) { const t = e17 ? e17.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(e17, t) { e17.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 < e17.length; n++) if (JSON.stringify(e17[n]) !== JSON.stringify(t[n])) return false; return true; } var Qde = class 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: false, roots: t.roots }, directed: true, 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 = true, (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 = false, this.checkRightBoundary(t.renderedPosition.x), this.tapNode(t, true); } 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 = true, this.tapNode(t, false); } 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); } }; var epe = 1.3; var tpe = 24 * 60 * 60 * 1e3; var npe = "Reset position"; var xk = "Lock zoom"; var rpe = "Unlock zoom"; var ope = "Zoom in"; var ape = "Zoom out"; var kk = 0.25; var ipe = "#8300bf"; var spe = 3e3; var 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: true, 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: false, connectivityError: null, timeoutID: void 0 }; }, mounted() { this.refreshCache(), this.loadCacheData(), this.run().then((e17) => { this.showGraph(this.entry); }); }, methods: { loadCacheData: function() { const e17 = 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 (e17 && (this.selectedSource = e17), 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((e17) => { sessionStorage.removeItem(e17); }); }, refreshCache: function() { const e17 = sessionStorage.getItem("connectivity-graph-expiry"); (/* @__PURE__ */ new Date()).getTime() > e17 && this.removeAllCacheData(); }, updateCacheExpiry: function() { const e17 = (/* @__PURE__ */ new Date()).getTime() + tpe; sessionStorage.setItem("connectivity-graph-expiry", e17); }, 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(e17) { const t = this.$refs.graphCanvas; this.showSpinner(), this.connectivityGraph = new Kde(this.labelCache, t), await this.connectivityGraph.addConnectivity(this.knowledgeByPath.get(e17)), 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(e17, t) { const n = `${this.mapServer}knowledge/query/`, r = { sql: e17, 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 e17 = await this.getJsonData(`${this.mapServer}knowledge/sources`), t = e17 ? e17.sources || [] : []; let n = ""; for (const r of t) r && n === "" && (n = r); return n; }, loadPathData: async function(e17) { const t = await this.query( `select entity, knowledge from knowledge where entity like 'ilxtr:%' and source=? order by entity`, [e17] ); return t ? t.values : []; }, setPathList: async function(e17) { this.pathList.length || (this.pathList = await this.loadPathData(e17), 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 e17 = await this.getJsonData(`${this.mapServer}knowledge/schema-version`); return e17 && +e17.version || 0; }, getJsonData: async function(e17) { try { const t = await fetch(e17, { method: "GET", headers: { Accept: "application/json; charset=utf-8", "Cache-Control": "no-store", "Content-Type": "application/json" } }); return t.ok || console.error(`Cannot access ${e17}`), await t.json(); } catch { return null; } }, getCachedTermLabels: async function() { if (this.labelledTerms.size) { const e17 = 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 e17.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(e17) { for (const t of [e17[0], ...e17[1]]) this.labelledTerms.add(t); }, cacheLabels: async function(e17) { for (const t of e17.connectivity) this.cacheNodeLabels(t[0]), this.cacheNodeLabels(t[1]); }, showSpinner: function() { this.loading = true; }, hideSpinner: function() { this.loading = false; }, 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(e17) { this.connectivityError = { ...e17 }, this.timeoutID && clearTimeout(this.timeoutID), this.timeoutID = setTimeout(() => { this.connectivityError = null; }, spe); } } }; var upe = { class: "connectivity-graph" }; var cpe = { ref: "graphCanvas", class: "graph-canvas" }; var dpe = { class: "control-panel control-panel-tools" }; var ppe = { class: "visually-hidden" }; var fpe = { class: "visually-hidden" }; var hpe = { class: "visually-hidden" }; var vpe = { class: "visually-hidden" }; var gpe = createStaticVNode('
Origin
Components
Destination
', 1); var mpe = { key: 0, class: "connectivity-graph-error" }; var ype = { key: 0 }; function bpe(e17, t, n, r, o, a) { const i = wZ, s = lr, u = gs, l = Xc, c = jZ, d = UZ, f = GZ, h10 = YZ, p = Xre; return withDirectives((openBlock(), createElementBlock("div", upe, [ createBaseVNode("div", cpe, null, 512), createBaseVNode("div", dpe, [ createBaseVNode("div", { class: normalizeClass(["tools", { "zoom-locked": e17.zoomEnabled }]) }, [ createVNode(l, { content: e17.resetLabel, placement: "top", effect: "control-tooltip" }, { default: withCtx(() => [ createVNode(u, { class: normalizeClass(["control-button", e17.theme]), size: "small", onClick: a.reset }, { default: withCtx(() => [ createVNode(s, { color: "white" }, { default: withCtx(() => [ createVNode(i) ]), _: 1 }), createBaseVNode("span", ppe, toDisplayString(e17.resetLabel), 1) ]), _: 1 }, 8, ["class", "onClick"]) ]), _: 1 }, 8, ["content"]), createVNode(l, { content: e17.zoomLockLabel, placement: "top", effect: "control-tooltip" }, { default: withCtx(() => [ createVNode(u, { class: normalizeClass(["control-button", e17.theme]), size: "small", onClick: a.toggleZoom }, { default: withCtx(() => [ createVNode(s, { color: "white" }, { default: withCtx(() => [ e17.zoomEnabled ? (openBlock(), createBlock(c, { key: 0 })) : (openBlock(), createBlock(d, { key: 1 })) ]), _: 1 }), createBaseVNode("span", fpe, toDisplayString(e17.zoomLockLabel), 1) ]), _: 1 }, 8, ["class", "onClick"]) ]), _: 1 }, 8, ["content"]), createVNode(l, { content: e17.zoomInLabel, placement: "left", effect: "control-tooltip" }, { default: withCtx(() => [ createVNode(u, { class: normalizeClass(["control-button", e17.theme]), size: "small", onClick: a.zoomIn }, { default: withCtx(() => [ createVNode(s, { color: "white" }, { default: withCtx(() => [ createVNode(f) ]), _: 1 }), createBaseVNode("span", hpe, toDisplayString(e17.zoomInLabel), 1) ]), _: 1 }, 8, ["class", "onClick"]) ]), _: 1 }, 8, ["content"]), createVNode(l, { content: e17.zoomOutLabel, placement: "left", effect: "control-tooltip" }, { default: withCtx(() => [ createVNode(u, { class: normalizeClass(["control-button", e17.theme]), size: "small", onClick: a.zoomOut }, { default: withCtx(() => [ createVNode(s, { color: "white" }, { default: withCtx(() => [ createVNode(h10) ]), _: 1 }), createBaseVNode("span", vpe, toDisplayString(e17.zoomOutLabel), 1) ]), _: 1 }, 8, ["class", "onClick"]) ]), _: 1 }, 8, ["content"]) ], 2) ]), gpe, e17.connectivityError ? (openBlock(), createElementBlock("div", mpe, [ e17.connectivityError.errorConnectivities ? (openBlock(), createElementBlock("strong", ype, toDisplayString(e17.connectivityError.errorConnectivities), 1)) : createCommentVNode("", true), createTextVNode(" " + toDisplayString(e17.connectivityError.errorMessage), 1) ])) : createCommentVNode("", true) ])), [ [p, e17.loading] ]); } var wpe = dh(lpe, [["render", bpe], ["__scopeId", "data-v-2ea51769"]]); var Ck = "Copy to clipboard"; var xpe = "Copied!"; var kpe = "#8300bf"; var 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 e17 = true; 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 ), e17 = false; } e17 ? this.textLabel = xpe : this.textLabel = "Error trying to copy to clipboard!"; }, resetSettings: function() { this.autoHideTimeout = 0, this.textLabel = Ck; } } }; var Epe = { class: "visually-hidden" }; function Spe(e17, t, n, r, o, a) { const i = AZ, s = lr, u = gs, l = Xc; return openBlock(), createBlock(l, { content: e17.textLabel, placement: "bottom", "hide-after": e17.autoHideTimeout, effect: "clipboard-tooltip", onHide: a.resetSettings }, { default: withCtx(() => [ createVNode(u, { class: normalizeClass(["copy-clipboard-button", n.theme]), size: "small", onClick: a.copyToClipboard }, { default: withCtx(() => [ createVNode(s, { color: e17.iconColor }, { default: withCtx(() => [ createVNode(i) ]), _: 1 }, 8, ["color"]), createBaseVNode("span", Epe, toDisplayString(e17.textLabel), 1) ]), _: 1 }, 8, ["class", "onClick"]) ]), _: 1 }, 8, ["content", "hide-after", "onHide"]); } var F_ = dh(Cpe, [["render", Spe], ["__scopeId", "data-v-de3b5311"]]); var I_ = ` 2horpanel ? `; var N_ = ` 2vertpanel ? `; var L_ = ` 3panel ? `; var D_ = ` 4panel ? `; var R_ = ` 2horpanel ? `; var B_ = ` 2horpanel ? `; var M_ = ` 4panel ? `; var z_ = ` changeBckgd `; var V_ = ` close no bk `; var j_ = ` close `; var H_ = ` closeFullScreen `; var U_ = ` Comment `; var q_ = ` Connection `; var W_ = ` dock `; var K_ = ` drawLine `; var G_ = ` drawPoint `; var X_ = ` drawPolygon `; var Y_ = ` drawTrash `; var Z_ = ` fitWindow `; var J_ = ` fullScreen `; var Q_ = 'DataPortal-Icons'; var e82 = ` magnifyingGlass `; var t8 = `Created by Wahyu Prihantorofrom the Noun Project`; var n8 = ` openMap `; var r8 = ` Artboard Copy 6 `; var o8 = ` permalink `; var a8 = ` play `; var i8 = ` resetZoom `; var s8 = ` singlepanel ? `; var l8 = ` tooltips ? `; var u8 = ` undock `; var c8 = ` zoomIn `; var d8 = ` zoomOut `; var p8 = (e17, t, n, r) => { const o = ["title", "desc", "defs", "style"], a = ["width", "height"], i = r || []; let s = document.createElement("div"); s.innerHTML = e17, 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; }; var f8 = (e17) => [ // Remove XML stuffs and comments [/<\?xml[\s\S]*?>/gi, ""], [//gi, ""], [//gi, ""], // SVG XML -> HTML5 [/\<([A-Za-z]+)([^\>]*)\/\>/g, "<$1$2>"], // convert self-closing XML SVG nodes to explicitly closed HTML5 SVG nodes [/\s+/g, " "], // replace whitespace sequences with a single space [/\> \<"] // remove whitespace between tags ].reduce((t, n) => "".replace.apply(t, n), e17).trim(); var _pe = true; var Tpe = true; var Ope = ["fill"]; var Ek = 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": e82, "/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 }); var Ppe = Object.keys(Ek).map((e17) => { const t = p8(Ek[e17], _pe, Tpe, Ope), n = e17.replace(/^.+\/(\w+).svg$/, "$1"); return f8(t).replace("", "symbol>"); }); Ppe.join(` `); var Z0 = 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": e82, "/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 }); var $pe = Object.keys(Z0).map((e17) => { const t = p8(Z0[e17]), n = e17.replace(/^.+\/(\w+).svg$/, "$1"); return f8(t).replace("", "symbol>"); }); $pe.join(` `); var Ape = { data() { return { ElIconView: gC }; }, name: "DatasetCard", components: { BadgesGroup: $3, ImageGallery: w4, Button: Gr, Icon: nn, CopyToClipboard: F_ }, props: { /** * Object containing information for * the required viewing. */ entry: { type: Object, default: () => { } }, envVars: { type: Object, default: () => { } } }, data: function() { return { thumbnail: V2, dataLocation: this.entry.doi, discoverId: void 0, loading: true, version: 1, lastDoi: void 0, biolucidaData: void 0, currentCategory: "All", copyContent: "" }; }, computed: { contributors: function() { let e17 = ""; return this.entry.contributors && (this.entry.contributors.length === 1 ? e17 = this.lastName(this.entry.contributors[0].name) : this.entry.contributors.length === 2 ? e17 = this.lastName(this.entry.contributors[0].name) + " & " + this.lastName(this.entry.contributors[1].name) : this.entry.contributors.length > 2 && (e17 = this.lastName(this.entry.contributors[0].name) + " et al.")), e17; }, samples: function() { let e17 = ""; return this.entry.species && (Up[this.entry.species[0].toLowerCase()] ? e17 = `${Up[this.entry.species[0].toLowerCase()]}` : e17 = `${this.entry.species}`), this.entry.numberSamples > 0 && (e17 += " (", this.entry.numberSamples === 1 ? e17 += `${this.entry.numberSamples} sample` : this.entry.numberSamples > 1 && (e17 += `${this.entry.numberSamples} samples`), this.entry.numberSubjects === 1 ? e17 += ` from ${this.entry.numberSubjects} subject` : this.entry.numberSamples > 1 && (e17 += ` from ${this.entry.numberSubjects} subjects`), e17 += ")"), e17; }, label: function() { return this.entry.organs ? this.entry.organs[0] : this.entry.name; }, publishYear: function() { return this.entry.publishDate.split("-")[0]; } }, mounted: function() { this.updateCopyContent(); }, methods: { cardClicked: function() { this.openDataset(); }, categoryChanged: function(e17) { this.currentCategory = e17; }, galleryClicked: function(e17) { this.propogateCardAction(e17); }, galleryDatalinkClicked: function(e17) { En.emit("datalink-clicked", e17); }, openDataset: function() { window.open(this.dataLocation, "_blank"); }, openRepository: function() { let e17 = this.envVars.API_LOCATION; this.entry.additionalLinks.forEach(function(t) { if (t.description == "Repository") { let n = new XMLHttpRequest(); n.open("POST", e17 + "/pmr_latest_exposure", true), n.setRequestHeader("Content-type", "application/json"), n.onreadystatechange = () => { if (n.readyState === 4) { let r = ""; n.status === 200 && (r = JSON.parse(n.responseText).url), r === "" && (r = t.uri), window.open(r, "_blank"); } }, n.send(JSON.stringify({ workspace_url: t.uri })); } }); }, propogateCardAction: function(e17) { En.emit("PopoverActionClick", e17), En.emit("contextUpdate", e17); }, splitDOI: function(e17) { return [ e17.split("/")[e17.split("/").length - 2], e17.split("/")[e17.split("/").length - 1] ]; }, getBanner: function() { if (this.lastDoi !== this.entry.doi) { this.lastDoi = this.entry.doi, this.loading = true; let e17 = this.splitDOI(this.entry.doi); fetch( `${this.envVars.PENNSIEVE_API_LOCATION}/discover/datasets/doi/${e17[0]}/${e17[1]}` ).then((t) => { if (t.ok) return t.json(); throw Error(t.statusText); }).then((t) => { this.thumbnail = t.banner, this.discoverId = t.id, this.version = t.version, this.dataLocation = `https://sparc.science/datasets/${t.id}?type=dataset`, this.getBiolucidaInfo(this.discoverId), this.loading = false, this.updateCopyContent(); }).catch(() => { this.thumbnail = V2, this.discoverId = Number(this.entry.datasetId), this.loading = false; }); } }, lastName: function(e17) { return e17.split(",")[0]; }, getBiolucidaInfo: function(e17) { let n = this.envVars.API_LOCATION + "image_search/" + e17; fetch(n).then((r) => r.json()).then((r) => { r.status == "success" && (this.biolucidaData = r); }); }, updateCopyContent: function() { const e17 = []; if (this.entry.name && e17.push(`
${this.entry.name}
`), this.contributors) { let t = this.contributors; this.entry.publishDate && (t += ` (${this.publishYear})`), e17.push(`
${t}
`); } if (this.samples && e17.push(`
${this.samples}
`), this.entry.doi) { let t = "
DOI:
"; t += ` `, t += `${this.entry.doi}`, e17.push(`
${t}
`); } if (this.entry.datasetId) { let t = "
Dataset ID:
"; t += ` `, t += `${this.entry.datasetId}`, e17.push(`
${t}
`); } if (this.dataLocation) { let t = "
Dataset URL:
"; t += ` `, t += `${this.dataLocation}`, e17.push(`
${t}
`); } if (this.version) { let t = "
Dataset version:
"; t += ` `, t += `${this.version}`, e17.push(`
${t}
`); } this.copyContent = e17.join(`
`); } }, created: function() { this.getBanner(); }, watch: { // currently not using card overflow "entry.description": function() { this.getBanner(); } } }; var Fpe = (e17) => (pushScopeId("data-v-541a51e6"), e17 = e17(), popScopeId(), e17); var Ipe = { class: "dataset-card-container", ref: "container" }; var Npe = { class: "dataset-card", ref: "card" }; var Lpe = Fpe(() => createBaseVNode("div", { class: "seperator-path" }, null, -1)); var Dpe = { class: "card" }; var Rpe = { class: "card-left" }; var Bpe = { class: "card-right" }; var Mpe = { class: "details" }; var zpe = { class: "details" }; var Vpe = { key: 0, class: "details loading-icon" }; var jpe = { class: "badges-container" }; var Hpe = { class: "float-button-container" }; function Upe(e17, t, n, r, o, a) { const i = w4, s = Gr, u = $3, l = resolveComponent("CopyToClipboard"), c = Nf; return openBlock(), createElementBlock("div", Ipe, [ createBaseVNode("div", Npe, [ Lpe, withDirectives((openBlock(), createElementBlock("div", Dpe, [ createBaseVNode("span", Rpe, [ !e17.loading && e17.discoverId ? (openBlock(), createBlock(i, { key: 0, datasetId: e17.discoverId, datasetVersion: e17.version, entry: n.entry, envVars: n.envVars, label: a.label, datasetThumbnail: e17.thumbnail, "dataset-biolucida": e17.biolucidaData, category: e17.currentCategory, onCardClicked: a.galleryClicked, onDatalinkClicked: a.galleryDatalinkClicked }, null, 8, ["datasetId", "datasetVersion", "entry", "envVars", "label", "datasetThumbnail", "dataset-biolucida", "category", "onCardClicked", "onDatalinkClicked"])) : createCommentVNode("", true) ]), createBaseVNode("div", Bpe, [ createBaseVNode("div", { class: "title", onClick: t[0] || (t[0] = (...d) => a.cardClicked && a.cardClicked(...d)) }, toDisplayString(n.entry.name), 1), createBaseVNode("div", Mpe, toDisplayString(a.contributors) + " " + toDisplayString(n.entry.publishDate ? `(${a.publishYear})` : ""), 1), createBaseVNode("div", zpe, toDisplayString(a.samples), 1), n.entry.detailsReady ? createCommentVNode("", true) : withDirectives((openBlock(), createElementBlock("div", Vpe, null, 512)), [ [c, !n.entry.detailsReady] ]), createBaseVNode("div", null, [ n.entry.simulation ? (openBlock(), createBlock(s, { key: 0, onClick: a.openRepository, size: "small", class: "button", icon: o.ElIconView }, { default: withCtx(() => [ createTextVNode("View repository") ]), _: 1 }, 8, ["onClick", "icon"])) : createCommentVNode("", true) ]), createBaseVNode("div", jpe, [ createVNode(u, { entry: n.entry, "dataset-biolucida": e17.biolucidaData, onCategoryChanged: a.categoryChanged }, null, 8, ["entry", "dataset-biolucida", "onCategoryChanged"]) ]), createBaseVNode("div", Hpe, [ createVNode(l, { content: e17.copyContent }, null, 8, ["content"]) ]) ]) ])), [ [c, e17.loading] ]) ], 512) ], 512); } var h8 = Lo(Ape, [["render", Upe], ["__scopeId", "data-v-541a51e6"]]); var Sk = function(e17) { return [...new Set(e17.map((t) => JSON.stringify(t)))].map( (t) => JSON.parse(t) ); }; var qpe = { name: "SearchHistory", components: { Tag: ml, Select: Nc }, data() { return { searchHistory: [], selectValue: "Full search history" }; }, computed: { reversedSearchHistory: function() { return Sk( this.searchHistory.slice().reverse().filter((e17) => e17.search !== "") ); }, cascaderOptions: function() { return this.reversedSearchHistory.map((e17) => ({ value: e17.search, label: e17.search })); } }, methods: { getSearchHistory() { localStorage.getItem("sparc.science-sidebar-search-history") ? this.searchHistory = JSON.parse( localStorage.getItem("sparc.science-sidebar-search-history") ) : this.searchHistory = []; }, clearSearchHistory() { localStorage.removeItem("sparc.science-sidebar-search-history"), this.searchHistory = []; }, addSearchToHistory(e17, t) { e17 = [], t = t.trim(); let n = JSON.parse( localStorage.getItem("sparc.science-sidebar-search-history") ); n ? (n.push({ filters: e17, search: t }), this.searchHistory = Sk(n), localStorage.setItem( "sparc.science-sidebar-search-history", JSON.stringify(n) )) : localStorage.setItem( "sparc.science-sidebar-search-history", JSON.stringify([{ filters: e17, search: t }]) ); }, search: function(e17) { this.$emit("search", e17); }, selectChange: function(e17) { this.selectValue = e17, this.search({ search: e17 }); } }, mounted: function() { this.getSearchHistory(), En.on("search-changed", (e17) => { this.setSearchHistory(e17); }); } }; var Wpe = { class: "history-container" }; function Kpe(e17, t, n, r, o, a) { const i = ml, s = If, u = Nc; return openBlock(), createElementBlock("div", Wpe, [ (openBlock(true), createElementBlock(Fragment, null, renderList(a.reversedSearchHistory, (l, c) => (openBlock(), createElementBlock(Fragment, null, [ c < 3 ? (openBlock(), createBlock(i, { class: "search-tag", key: c, onClick: (d) => a.search(l), size: "large" }, { default: withCtx(() => [ createTextVNode(toDisplayString(l.search), 1) ]), _: 2 }, 1032, ["onClick"])) : createCommentVNode("", true) ], 64))), 256)), a.reversedSearchHistory.length > 0 ? (openBlock(), createBlock(u, { key: 0, "model-value": o.selectValue, class: "m-2 search-select", placeholder: "Full search History", "popper-class": "sidebar-search-select-popper", onChange: a.selectChange, teleported: false }, { default: withCtx(() => [ (openBlock(true), createElementBlock(Fragment, null, renderList(a.cascaderOptions, (l, c) => (openBlock(), createBlock(s, { key: c, label: l.label, value: l.value }, null, 8, ["label", "value"]))), 128)) ]), _: 1 }, 8, ["model-value", "onChange"])) : createCommentVNode("", true) ]); } var v8 = Lo(qpe, [["render", Kpe], ["__scopeId", "data-v-def88150"]]); var g8 = (e17, t) => { const n = e17.__vccOpts || e17; for (const [r, o] of t) n[r] = o; return n; }; var Gpe = ["xlink:href"]; var Xpe = { __name: "SvgIcon", props: { /** * The svg icon to show. */ icon: { type: String, required: true }, /** * The option to spin the icon. */ spin: { type: Boolean, default: false } }, setup(e17) { return (t, n) => (openBlock(), createElementBlock("svg", { class: normalizeClass(["map-icon", { "map-icon-spin": e17.spin }]) }, [ createBaseVNode("use", { "xlink:href": `#${e17.icon}` }, null, 8, Gpe) ], 2)); } }; var Ype = g8(Xpe, [["__scopeId", "data-v-e172d5ff"]]); var m8 = ` 2horpanel ? `; var y8 = ` 2vertpanel ? `; var b8 = ` 3panel ? `; var w8 = ` 4panel ? `; var x8 = ` 2horpanel ? `; var k8 = ` 2horpanel ? `; var C8 = ` 4panel ? `; var E8 = ` changeBckgd `; var S8 = ` close no bk `; var _8 = ` close `; var T8 = ` closeFullScreen `; var O8 = ` Comment `; var P8 = ` Connection `; var $8 = ` dock `; var A8 = ` drawLine `; var F8 = ` drawPoint `; var I8 = ` drawPolygon `; var N8 = ` drawTrash `; var L8 = ` fitWindow `; var D8 = ` fullScreen `; var R8 = 'DataPortal-Icons'; var B8 = ` magnifyingGlass `; var M8 = `Created by Wahyu Prihantorofrom the Noun Project`; var z8 = ` openMap `; var V8 = ` Artboard Copy 6 `; var j8 = ` permalink `; var H8 = ` play `; var U8 = ` resetZoom `; var q8 = ` singlepanel ? `; var W8 = ` tooltips ? `; var K8 = ` undock `; var G8 = ` zoomIn `; var X8 = ` zoomOut `; var Y8 = (e17, t, n, r) => { const o = ["title", "desc", "defs", "style"], a = ["width", "height"], i = r || []; let s = document.createElement("div"); s.innerHTML = e17, 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; }; var Z8 = (e17) => [ // Remove XML stuffs and comments [/<\?xml[\s\S]*?>/gi, ""], [//gi, ""], [//gi, ""], // SVG XML -> HTML5 [/\<([A-Za-z]+)([^\>]*)\/\>/g, "<$1$2>"], // convert self-closing XML SVG nodes to explicitly closed HTML5 SVG nodes [/\s+/g, " "], // replace whitespace sequences with a single space [/\> \<"] // remove whitespace between tags ].reduce((t, n) => "".replace.apply(t, n), e17).trim(); var Zpe = true; var Jpe = true; var Qpe = ["fill"]; var J0 = Object.assign({ "/assets/icons/2horpanel.svg": m8, "/assets/icons/2vertpanel.svg": y8, "/assets/icons/3panel.svg": b8, "/assets/icons/4panel.svg": w8, "/assets/icons/5panel.svg": x8, "/assets/icons/6panel.svg": k8, "/assets/icons/6panelVertical.svg": C8, "/assets/icons/changeBckgd.svg": E8, "/assets/icons/close-no-bk.svg": S8, "/assets/icons/close.svg": _8, "/assets/icons/closeFullScreen.svg": T8, "/assets/icons/comment.svg": O8, "/assets/icons/connection.svg": P8, "/assets/icons/dock.svg": $8, "/assets/icons/drawLine.svg": A8, "/assets/icons/drawPoint.svg": F8, "/assets/icons/drawPolygon.svg": I8, "/assets/icons/drawTrash.svg": N8, "/assets/icons/fitWindow.svg": L8, "/assets/icons/fullScreen.svg": D8, "/assets/icons/help.svg": R8, "/assets/icons/magnifyingGlass.svg": B8, "/assets/icons/noun-filter.svg": M8, "/assets/icons/openMap.svg": z8, "/assets/icons/pause.svg": V8, "/assets/icons/permalink.svg": j8, "/assets/icons/play.svg": H8, "/assets/icons/resetZoom.svg": U8, "/assets/icons/singlepanel.svg": q8, "/assets/icons/tooltips.svg": W8, "/assets/icons/undock.svg": K8, "/assets/icons/zoomIn.svg": G8, "/assets/icons/zoomOut.svg": X8 }); var efe = Object.keys(J0).map((e17) => { const t = Y8(J0[e17], Zpe, Jpe, Qpe), n = e17.replace(/^.+\/(\w+).svg$/, "$1"); return Z8(t).replace("", "symbol>"); }); efe.join(` `); var Q0 = Object.assign({ "/assets/icons/2horpanel.svg": m8, "/assets/icons/2vertpanel.svg": y8, "/assets/icons/3panel.svg": b8, "/assets/icons/4panel.svg": w8, "/assets/icons/5panel.svg": x8, "/assets/icons/6panel.svg": k8, "/assets/icons/6panelVertical.svg": C8, "/assets/icons/changeBckgd.svg": E8, "/assets/icons/close-no-bk.svg": S8, "/assets/icons/close.svg": _8, "/assets/icons/closeFullScreen.svg": T8, "/assets/icons/comment.svg": O8, "/assets/icons/connection.svg": P8, "/assets/icons/dock.svg": $8, "/assets/icons/drawLine.svg": A8, "/assets/icons/drawPoint.svg": F8, "/assets/icons/drawPolygon.svg": I8, "/assets/icons/drawTrash.svg": N8, "/assets/icons/fitWindow.svg": L8, "/assets/icons/fullScreen.svg": D8, "/assets/icons/help.svg": R8, "/assets/icons/magnifyingGlass.svg": B8, "/assets/icons/noun-filter.svg": M8, "/assets/icons/openMap.svg": z8, "/assets/icons/pause.svg": V8, "/assets/icons/permalink.svg": j8, "/assets/icons/play.svg": H8, "/assets/icons/resetZoom.svg": U8, "/assets/icons/singlepanel.svg": q8, "/assets/icons/tooltips.svg": W8, "/assets/icons/undock.svg": K8, "/assets/icons/zoomIn.svg": G8, "/assets/icons/zoomOut.svg": X8 }); var tfe = Object.keys(Q0).map((e17) => { const t = Y8(Q0[e17]), n = e17.replace(/^.+\/(\w+).svg$/, "$1"); return Z8(t).replace("", "symbol>"); }); var nfe = { name: "MapSvgSpriteColor", svgContext: Q0, svgSprite: tfe.join(` `) // concatenate all symbols into $options.svgSprite }; var rfe = ["innerHTML"]; function ofe(e17, t, n, r, o, a) { return openBlock(), createElementBlock("svg", { width: "0", height: "0", style: { display: "none" }, innerHTML: e17.$options.svgSprite }, null, 8, rfe); } var afe = g8(nfe, [["render", ofe]]); var J8 = { exports: {} }; (function(e17, t) { (function(n, r) { e17.exports = r(); })(lL, function() { function n(D, V, q) { return V in D ? Object.defineProperty(D, V, { value: q, enumerable: true, configurable: true, writable: true }) : D[V] = q, D; } function r(D, V) { var q = Object.keys(D); if (Object.getOwnPropertySymbols) { var X = Object.getOwnPropertySymbols(D); V && (X = X.filter(function(ue) { return Object.getOwnPropertyDescriptor(D, ue).enumerable; })), q.push.apply(q, X); } return q; } function o(D) { for (var V = 1; V < arguments.length; V++) { var q = arguments[V] != null ? arguments[V] : {}; V % 2 ? r(Object(q), true).forEach(function(X) { n(D, X, q[X]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(D, Object.getOwnPropertyDescriptors(q)) : r(Object(q)).forEach(function(X) { Object.defineProperty(D, X, Object.getOwnPropertyDescriptor(q, X)); }); } return D; } function a(D, V) { if (D == null) return {}; var q, X, ue = function(He, Pe) { if (He == null) return {}; var Re, Xe, qe = {}, yt = Object.keys(He); for (Xe = 0; Xe < yt.length; Xe++) Re = yt[Xe], Pe.indexOf(Re) >= 0 || (qe[Re] = He[Re]); return qe; }(D, V); if (Object.getOwnPropertySymbols) { var Ie = Object.getOwnPropertySymbols(D); for (X = 0; X < Ie.length; X++) q = Ie[X], V.indexOf(q) >= 0 || Object.prototype.propertyIsEnumerable.call(D, q) && (ue[q] = D[q]); } return ue; } function i(D, V) { return function(q) { if (Array.isArray(q)) return q; }(D) || function(q, X) { if (Symbol.iterator in Object(q) || Object.prototype.toString.call(q) === "[object Arguments]") { var ue = [], Ie = true, He = false, Pe = void 0; try { for (var Re, Xe = q[Symbol.iterator](); !(Ie = (Re = Xe.next()).done) && (ue.push(Re.value), !X || ue.length !== X); Ie = true) ; } catch (qe) { He = true, Pe = qe; } finally { try { Ie || Xe.return == null || Xe.return(); } finally { if (He) throw Pe; } } return ue; } }(D, V) || function() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }(); } function s(D) { return function(V) { if (Array.isArray(V)) { for (var q = 0, X = new Array(V.length); q < V.length; q++) X[q] = V[q]; return X; } }(D) || function(V) { if (Symbol.iterator in Object(V) || Object.prototype.toString.call(V) === "[object Arguments]") return Array.from(V); }(D) || function() { throw new TypeError("Invalid attempt to spread non-iterable instance"); }(); } function u(D) { var V, q = "algoliasearch-client-js-".concat(D.key), X = function() { return V === void 0 && (V = D.localStorage || window.localStorage), V; }, ue = function() { return JSON.parse(X().getItem(q) || "{}"); }, Ie = function(Pe) { X().setItem(q, JSON.stringify(Pe)); }, He = function() { var Pe = D.timeToLive ? 1e3 * D.timeToLive : null, Re = ue(), Xe = Object.fromEntries(Object.entries(Re).filter(function(yt) { return i(yt, 2)[1].timestamp !== void 0; })); if (Ie(Xe), Pe) { var qe = Object.fromEntries(Object.entries(Xe).filter(function(yt) { var gt = i(yt, 2)[1], $t = (/* @__PURE__ */ new Date()).getTime(); return !(gt.timestamp + Pe < $t); })); Ie(qe); } }; return { get: function(Pe, Re) { var Xe = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : { miss: function() { return Promise.resolve(); } }; return Promise.resolve().then(function() { He(); var qe = JSON.stringify(Pe); return ue()[qe]; }).then(function(qe) { return Promise.all([qe ? qe.value : Re(), qe !== void 0]); }).then(function(qe) { var yt = i(qe, 2), gt = yt[0], $t = yt[1]; return Promise.all([gt, $t || Xe.miss(gt)]); }).then(function(qe) { return i(qe, 1)[0]; }); }, set: function(Pe, Re) { return Promise.resolve().then(function() { var Xe = ue(); return Xe[JSON.stringify(Pe)] = { timestamp: (/* @__PURE__ */ new Date()).getTime(), value: Re }, X().setItem(q, JSON.stringify(Xe)), Re; }); }, delete: function(Pe) { return Promise.resolve().then(function() { var Re = ue(); delete Re[JSON.stringify(Pe)], X().setItem(q, JSON.stringify(Re)); }); }, clear: function() { return Promise.resolve().then(function() { X().removeItem(q); }); } }; } function l(D) { var V = s(D.caches), q = V.shift(); return q === void 0 ? { get: function(X, ue) { var Ie = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : { miss: function() { return Promise.resolve(); } }, He = ue(); return He.then(function(Pe) { return Promise.all([Pe, Ie.miss(Pe)]); }).then(function(Pe) { return i(Pe, 1)[0]; }); }, set: function(X, ue) { return Promise.resolve(ue); }, delete: function(X) { return Promise.resolve(); }, clear: function() { return Promise.resolve(); } } : { get: function(X, ue) { var Ie = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : { miss: function() { return Promise.resolve(); } }; return q.get(X, ue, Ie).catch(function() { return l({ caches: V }).get(X, ue, Ie); }); }, set: function(X, ue) { return q.set(X, ue).catch(function() { return l({ caches: V }).set(X, ue); }); }, delete: function(X) { return q.delete(X).catch(function() { return l({ caches: V }).delete(X); }); }, clear: function() { return q.clear().catch(function() { return l({ caches: V }).clear(); }); } }; } function c() { var D = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : { serializable: true }, V = {}; return { get: function(q, X) { var ue = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : { miss: function() { return Promise.resolve(); } }, Ie = JSON.stringify(q); if (Ie in V) return Promise.resolve(D.serializable ? JSON.parse(V[Ie]) : V[Ie]); var He = X(), Pe = ue && ue.miss || function() { return Promise.resolve(); }; return He.then(function(Re) { return Pe(Re); }).then(function() { return He; }); }, set: function(q, X) { return V[JSON.stringify(q)] = D.serializable ? JSON.stringify(X) : X, Promise.resolve(X); }, delete: function(q) { return delete V[JSON.stringify(q)], Promise.resolve(); }, clear: function() { return V = {}, Promise.resolve(); } }; } function d(D, V, q) { var X = { "x-algolia-api-key": q, "x-algolia-application-id": V }; return { headers: function() { return D === g.WithinHeaders ? X : {}; }, queryParameters: function() { return D === g.WithinQueryParameters ? X : {}; } }; } function f(D) { var V = 0; return D(function q() { return V++, new Promise(function(X) { setTimeout(function() { X(D(q)); }, Math.min(100 * V, 1e3)); }); }); } function h10(D) { var V = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : function(q, X) { return Promise.resolve(); }; return Object.assign(D, { wait: function(q) { return h10(D.then(function(X) { return Promise.all([V(X, q), X]); }).then(function(X) { return X[1]; })); } }); } function p(D) { for (var V = D.length - 1; V > 0; V--) { var q = Math.floor(Math.random() * (V + 1)), X = D[V]; D[V] = D[q], D[q] = X; } return D; } function v(D, V) { return V && Object.keys(V).forEach(function(q) { D[q] = V[q](D); }), D; } function m(D) { for (var V = arguments.length, q = new Array(V > 1 ? V - 1 : 0), X = 1; X < V; X++) q[X - 1] = arguments[X]; var ue = 0; return D.replace(/%s/g, function() { return encodeURIComponent(q[ue++]); }); } var g = { WithinQueryParameters: 0, WithinHeaders: 1 }; function b(D, V) { var q = D || {}, X = q.data || {}; return Object.keys(q).forEach(function(ue) { ["timeout", "headers", "queryParameters", "data", "cacheable"].indexOf(ue) === -1 && (X[ue] = q[ue]); }), { data: Object.entries(X).length > 0 ? X : void 0, timeout: q.timeout || V, headers: q.headers || {}, queryParameters: q.queryParameters || {}, cacheable: q.cacheable }; } var x = { Read: 1, Write: 2, Any: 3 }, w = 1, C = 2, k = 3; function E(D) { var V = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : w; return o(o({}, D), {}, { status: V, lastUpdate: Date.now() }); } function S(D) { return typeof D == "string" ? { protocol: "https", url: D, accept: x.Any } : { protocol: D.protocol || "https", url: D.url, accept: D.accept || x.Any }; } var O = "DELETE", F = "GET", $ = "POST", A = "PUT"; function L(D, V) { return Promise.all(V.map(function(q) { return D.get(q, function() { return Promise.resolve(E(q)); }); })).then(function(q) { var X = q.filter(function(He) { return function(Pe) { return Pe.status === w || Date.now() - Pe.lastUpdate > 12e4; }(He); }), ue = q.filter(function(He) { return function(Pe) { return Pe.status === k && Date.now() - Pe.lastUpdate <= 12e4; }(He); }), Ie = [].concat(s(X), s(ue)); return { getTimeout: function(He, Pe) { return (ue.length === 0 && He === 0 ? 1 : ue.length + 3 + He) * Pe; }, statelessHosts: Ie.length > 0 ? Ie.map(function(He) { return S(He); }) : V }; }); } function N(D, V, q, X) { var ue = [], Ie = function(gt, $t) { if (!(gt.method === F || gt.data === void 0 && $t.data === void 0)) { var St = Array.isArray(gt.data) ? gt.data : o(o({}, gt.data), $t.data); return JSON.stringify(St); } }(q, X), He = function(gt, $t) { var St = o(o({}, gt.headers), $t.headers), Yt = {}; return Object.keys(St).forEach(function(cn) { var xr = St[cn]; Yt[cn.toLowerCase()] = xr; }), Yt; }(D, X), Pe = q.method, Re = q.method !== F ? {} : o(o({}, q.data), X.data), Xe = o(o(o({ "x-algolia-agent": D.userAgent.value }, D.queryParameters), Re), X.queryParameters), qe = 0, yt = function gt($t, St) { var Yt = $t.pop(); if (Yt === void 0) throw { name: "RetryError", message: "Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.", transporterStackTrace: W(ue) }; var cn = { data: Ie, headers: He, method: Pe, url: z(Yt, q.path, Xe), connectTimeout: St(qe, D.timeouts.connect), responseTimeout: St(qe, X.timeout) }, xr = function(kr) { var sr = { request: cn, response: kr, host: Yt, triesLeft: $t.length }; return ue.push(sr), sr; }, ou = { onSuccess: function(kr) { return function(sr) { try { return JSON.parse(sr.content); } catch (Ni) { throw /* @__PURE__ */ function(Ra, Rs) { return { name: "DeserializationError", message: Ra, response: Rs }; }(Ni.message, sr); } }(kr); }, onRetry: function(kr) { var sr = xr(kr); return kr.isTimedOut && qe++, Promise.all([D.logger.info("Retryable failure", oe(sr)), D.hostsCache.set(Yt, E(Yt, kr.isTimedOut ? k : C))]).then(function() { return gt($t, St); }); }, onFail: function(kr) { throw xr(kr), function(sr, Ni) { var Ra = sr.content, Rs = sr.status, au = Ra; try { au = JSON.parse(Ra).message; } catch { } return /* @__PURE__ */ function(dd, Nh, mT) { return { name: "ApiError", message: dd, status: Nh, transporterStackTrace: mT }; }(au, Rs, Ni); }(kr, W(ue)); } }; return D.requester.send(cn).then(function(kr) { return function(sr, Ni) { return function(Ra) { var Rs = Ra.status; return Ra.isTimedOut || function(au) { var dd = au.isTimedOut, Nh = au.status; return !dd && ~~Nh == 0; }(Ra) || ~~(Rs / 100) != 2 && ~~(Rs / 100) != 4; }(sr) ? Ni.onRetry(sr) : ~~(sr.status / 100) == 2 ? Ni.onSuccess(sr) : Ni.onFail(sr); }(kr, ou); }); }; return L(D.hostsCache, V).then(function(gt) { return yt(s(gt.statelessHosts).reverse(), gt.getTimeout); }); } function M(D) { var V = D.hostsCache, q = D.logger, X = D.requester, ue = D.requestsCache, Ie = D.responsesCache, He = D.timeouts, Pe = D.userAgent, Re = D.hosts, Xe = D.queryParameters, qe = { hostsCache: V, logger: q, requester: X, requestsCache: ue, responsesCache: Ie, timeouts: He, userAgent: Pe, headers: D.headers, queryParameters: Xe, hosts: Re.map(function(yt) { return S(yt); }), read: function(yt, gt) { var $t = b(gt, qe.timeouts.read), St = function() { return N(qe, qe.hosts.filter(function(cn) { return (cn.accept & x.Read) != 0; }), yt, $t); }; if (($t.cacheable !== void 0 ? $t.cacheable : yt.cacheable) !== true) return St(); var Yt = { request: yt, mappedRequestOptions: $t, transporter: { queryParameters: qe.queryParameters, headers: qe.headers } }; return qe.responsesCache.get(Yt, function() { return qe.requestsCache.get(Yt, function() { return qe.requestsCache.set(Yt, St()).then(function(cn) { return Promise.all([qe.requestsCache.delete(Yt), cn]); }, function(cn) { return Promise.all([qe.requestsCache.delete(Yt), Promise.reject(cn)]); }).then(function(cn) { var xr = i(cn, 2); return xr[0], xr[1]; }); }); }, { miss: function(cn) { return qe.responsesCache.set(Yt, cn); } }); }, write: function(yt, gt) { return N(qe, qe.hosts.filter(function($t) { return ($t.accept & x.Write) != 0; }), yt, b(gt, qe.timeouts.write)); } }; return qe; } function I(D) { var V = { value: "Algolia for JavaScript (".concat(D, ")"), add: function(q) { var X = "; ".concat(q.segment).concat(q.version !== void 0 ? " (".concat(q.version, ")") : ""); return V.value.indexOf(X) === -1 && (V.value = "".concat(V.value).concat(X)), V; } }; return V; } function z(D, V, q) { var X = R(q), ue = "".concat(D.protocol, "://").concat(D.url, "/").concat(V.charAt(0) === "/" ? V.substr(1) : V); return X.length && (ue += "?".concat(X)), ue; } function R(D) { return Object.keys(D).map(function(V) { return m("%s=%s", V, (q = D[V], Object.prototype.toString.call(q) === "[object Object]" || Object.prototype.toString.call(q) === "[object Array]" ? JSON.stringify(D[V]) : D[V])); var q; }).join("&"); } function W(D) { return D.map(function(V) { return oe(V); }); } function oe(D) { var V = D.request.headers["x-algolia-api-key"] ? { "x-algolia-api-key": "*****" } : {}; return o(o({}, D), {}, { request: o(o({}, D.request), {}, { headers: o(o({}, D.request.headers), V) }) }); } var Q = function(D) { return function(V, q) { return D.transporter.write({ method: $, path: "2/abtests", data: V }, q); }; }, ae = function(D) { return function(V, q) { return D.transporter.write({ method: O, path: m("2/abtests/%s", V) }, q); }; }, pe = function(D) { return function(V, q) { return D.transporter.read({ method: F, path: m("2/abtests/%s", V) }, q); }; }, we = function(D) { return function(V) { return D.transporter.read({ method: F, path: "2/abtests" }, V); }; }, ke = function(D) { return function(V, q) { return D.transporter.write({ method: $, path: m("2/abtests/%s/stop", V) }, q); }; }, fe = function(D) { return function(V) { return D.transporter.read({ method: F, path: "1/strategies/personalization" }, V); }; }, ge = function(D) { return function(V, q) { return D.transporter.write({ method: $, path: "1/strategies/personalization", data: V }, q); }; }; function J(D) { return function V(q) { return D.request(q).then(function(X) { if (D.batch !== void 0 && D.batch(X.hits), !D.shouldStop(X)) return X.cursor ? V({ cursor: X.cursor }) : V({ page: (q.page || 0) + 1 }); }); }({}); } var te = function(D) { return function(V, q) { var X = q || {}, ue = X.queryParameters, Ie = a(X, ["queryParameters"]), He = o({ acl: V }, ue !== void 0 ? { queryParameters: ue } : {}); return h10(D.transporter.write({ method: $, path: "1/keys", data: He }, Ie), function(Pe, Re) { return f(function(Xe) { return Me(D)(Pe.key, Re).catch(function(qe) { if (qe.status !== 404) throw qe; return Xe(); }); }); }); }; }, le = function(D) { return function(V, q, X) { var ue = b(X); return ue.queryParameters["X-Algolia-User-ID"] = V, D.transporter.write({ method: $, path: "1/clusters/mapping", data: { cluster: q } }, ue); }; }, Ee = function(D) { return function(V, q, X) { return D.transporter.write({ method: $, path: "1/clusters/mapping/batch", data: { users: V, cluster: q } }, X); }; }, Ne = function(D) { return function(V, q) { return h10(D.transporter.write({ method: $, path: m("/1/dictionaries/%s/batch", V), data: { clearExistingDictionaryEntries: true, requests: { action: "addEntry", body: [] } } }, q), function(X, ue) { return sn(D)(X.taskID, ue); }); }; }, je = function(D) { return function(V, q, X) { return h10(D.transporter.write({ method: $, path: m("1/indexes/%s/operation", V), data: { operation: "copy", destination: q } }, X), function(ue, Ie) { return ce(D)(V, { methods: { waitTask: Cn } }).waitTask(ue.taskID, Ie); }); }; }, _e = function(D) { return function(V, q, X) { return je(D)(V, q, o(o({}, X), {}, { scope: [Ih.Rules] })); }; }, De = function(D) { return function(V, q, X) { return je(D)(V, q, o(o({}, X), {}, { scope: [Ih.Settings] })); }; }, Ae = function(D) { return function(V, q, X) { return je(D)(V, q, o(o({}, X), {}, { scope: [Ih.Synonyms] })); }; }, Be = function(D) { return function(V, q) { return V.method === F ? D.transporter.read(V, q) : D.transporter.write(V, q); }; }, Ue = function(D) { return function(V, q) { return h10(D.transporter.write({ method: O, path: m("1/keys/%s", V) }, q), function(X, ue) { return f(function(Ie) { return Me(D)(V, ue).then(Ie).catch(function(He) { if (He.status !== 404) throw He; }); }); }); }; }, Ze = function(D) { return function(V, q, X) { var ue = q.map(function(Ie) { return { action: "deleteEntry", body: { objectID: Ie } }; }); return h10(D.transporter.write({ method: $, path: m("/1/dictionaries/%s/batch", V), data: { clearExistingDictionaryEntries: false, requests: ue } }, X), function(Ie, He) { return sn(D)(Ie.taskID, He); }); }; }, Me = function(D) { return function(V, q) { return D.transporter.read({ method: F, path: m("1/keys/%s", V) }, q); }; }, rt = function(D) { return function(V, q) { return D.transporter.read({ method: F, path: m("1/task/%s", V.toString()) }, q); }; }, nt = function(D) { return function(V) { return D.transporter.read({ method: F, path: "/1/dictionaries/*/settings" }, V); }; }, st = function(D) { return function(V) { return D.transporter.read({ method: F, path: "1/logs" }, V); }; }, P = function(D) { return function(V) { return D.transporter.read({ method: F, path: "1/clusters/mapping/top" }, V); }; }, j = function(D) { return function(V, q) { return D.transporter.read({ method: F, path: m("1/clusters/mapping/%s", V) }, q); }; }, se = function(D) { return function(V) { var q = V || {}, X = q.retrieveMappings, ue = a(q, ["retrieveMappings"]); return X === true && (ue.getClusters = true), D.transporter.read({ method: F, path: "1/clusters/mapping/pending" }, ue); }; }, ce = function(D) { return function(V) { var q = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, X = { transporter: D.transporter, appId: D.appId, indexName: V }; return v(X, q.methods); }; }, de = function(D) { return function(V) { return D.transporter.read({ method: F, path: "1/keys" }, V); }; }, Oe = function(D) { return function(V) { return D.transporter.read({ method: F, path: "1/clusters" }, V); }; }, ye = function(D) { return function(V) { return D.transporter.read({ method: F, path: "1/indexes" }, V); }; }, Fe = function(D) { return function(V) { return D.transporter.read({ method: F, path: "1/clusters/mapping" }, V); }; }, Ye = function(D) { return function(V, q, X) { return h10(D.transporter.write({ method: $, path: m("1/indexes/%s/operation", V), data: { operation: "move", destination: q } }, X), function(ue, Ie) { return ce(D)(V, { methods: { waitTask: Cn } }).waitTask(ue.taskID, Ie); }); }; }, Je = function(D) { return function(V, q) { return h10(D.transporter.write({ method: $, path: "1/indexes/*/batch", data: { requests: V } }, q), function(X, ue) { return Promise.all(Object.keys(X.taskID).map(function(Ie) { return ce(D)(Ie, { methods: { waitTask: Cn } }).waitTask(X.taskID[Ie], ue); })); }); }; }, re = function(D) { return function(V, q) { return D.transporter.read({ method: $, path: "1/indexes/*/objects", data: { requests: V } }, q); }; }, Se = function(D) { return function(V, q) { var X = V.map(function(ue) { return o(o({}, ue), {}, { params: R(ue.params || {}) }); }); return D.transporter.read({ method: $, path: "1/indexes/*/queries", data: { requests: X }, cacheable: true }, q); }; }, be = function(D) { return function(V, q) { return Promise.all(V.map(function(X) { var ue = X.params, Ie = ue.facetName, He = ue.facetQuery, Pe = a(ue, ["facetName", "facetQuery"]); return ce(D)(X.indexName, { methods: { searchForFacetValues: By } }).searchForFacetValues(Ie, He, o(o({}, q), Pe)); })); }; }, Le = function(D) { return function(V, q) { var X = b(q); return X.queryParameters["X-Algolia-User-ID"] = V, D.transporter.write({ method: O, path: "1/clusters/mapping" }, X); }; }, Tt = function(D) { return function(V, q, X) { var ue = q.map(function(Ie) { return { action: "addEntry", body: Ie }; }); return h10(D.transporter.write({ method: $, path: m("/1/dictionaries/%s/batch", V), data: { clearExistingDictionaryEntries: true, requests: ue } }, X), function(Ie, He) { return sn(D)(Ie.taskID, He); }); }; }, Ct = function(D) { return function(V, q) { return h10(D.transporter.write({ method: $, path: m("1/keys/%s/restore", V) }, q), function(X, ue) { return f(function(Ie) { return Me(D)(V, ue).catch(function(He) { if (He.status !== 404) throw He; return Ie(); }); }); }); }; }, Dt = function(D) { return function(V, q, X) { var ue = q.map(function(Ie) { return { action: "addEntry", body: Ie }; }); return h10(D.transporter.write({ method: $, path: m("/1/dictionaries/%s/batch", V), data: { clearExistingDictionaryEntries: false, requests: ue } }, X), function(Ie, He) { return sn(D)(Ie.taskID, He); }); }; }, Vt = function(D) { return function(V, q, X) { return D.transporter.read({ method: $, path: m("/1/dictionaries/%s/search", V), data: { query: q }, cacheable: true }, X); }; }, qt = function(D) { return function(V, q) { return D.transporter.read({ method: $, path: "1/clusters/mapping/search", data: { query: V } }, q); }; }, bn = function(D) { return function(V, q) { return h10(D.transporter.write({ method: A, path: "/1/dictionaries/*/settings", data: V }, q), function(X, ue) { return sn(D)(X.taskID, ue); }); }; }, an = function(D) { return function(V, q) { var X = Object.assign({}, q), ue = q || {}, Ie = ue.queryParameters, He = a(ue, ["queryParameters"]), Pe = Ie ? { queryParameters: Ie } : {}, Re = ["acl", "indexes", "referers", "restrictSources", "queryParameters", "description", "maxQueriesPerIPPerHour", "maxHitsPerQuery"]; return h10(D.transporter.write({ method: A, path: m("1/keys/%s", V), data: Pe }, He), function(Xe, qe) { return f(function(yt) { return Me(D)(V, qe).then(function(gt) { return function($t) { return Object.keys(X).filter(function(St) { return Re.indexOf(St) !== -1; }).every(function(St) { if (Array.isArray($t[St]) && Array.isArray(X[St])) { var Yt = $t[St]; return Yt.length === X[St].length && Yt.every(function(cn, xr) { return cn === X[St][xr]; }); } return $t[St] === X[St]; }); }(gt) ? Promise.resolve() : yt(); }); }); }); }; }, sn = function(D) { return function(V, q) { return f(function(X) { return rt(D)(V, q).then(function(ue) { return ue.status !== "published" ? X() : void 0; }); }); }; }, wn = function(D) { return function(V, q) { return h10(D.transporter.write({ method: $, path: m("1/indexes/%s/batch", D.indexName), data: { requests: V } }, q), function(X, ue) { return Cn(D)(X.taskID, ue); }); }; }, xn = function(D) { return function(V) { return J(o(o({ shouldStop: function(q) { return q.cursor === void 0; } }, V), {}, { request: function(q) { return D.transporter.read({ method: $, path: m("1/indexes/%s/browse", D.indexName), data: q }, V); } })); }; }, mn = function(D) { return function(V) { var q = o({ hitsPerPage: 1e3 }, V); return J(o(o({ shouldStop: function(X) { return X.hits.length < q.hitsPerPage; } }, q), {}, { request: function(X) { return My(D)("", o(o({}, q), X)).then(function(ue) { return o(o({}, ue), {}, { hits: ue.hits.map(function(Ie) { return delete Ie._highlightResult, Ie; }) }); }); } })); }; }, or = function(D) { return function(V) { var q = o({ hitsPerPage: 1e3 }, V); return J(o(o({ shouldStop: function(X) { return X.hits.length < q.hitsPerPage; } }, q), {}, { request: function(X) { return zy(D)("", o(o({}, q), X)).then(function(ue) { return o(o({}, ue), {}, { hits: ue.hits.map(function(Ie) { return delete Ie._highlightResult, Ie; }) }); }); } })); }; }, Hn = function(D) { return function(V, q, X) { var ue = X || {}, Ie = ue.batchSize, He = a(ue, ["batchSize"]), Pe = { taskIDs: [], objectIDs: [] }; return h10(function Re() { var Xe, qe = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0, yt = []; for (Xe = qe; Xe < V.length && (yt.push(V[Xe]), yt.length !== (Ie || 1e3)); Xe++) ; return yt.length === 0 ? Promise.resolve(Pe) : wn(D)(yt.map(function(gt) { return { action: q, body: gt }; }), He).then(function(gt) { return Pe.objectIDs = Pe.objectIDs.concat(gt.objectIDs), Pe.taskIDs.push(gt.taskID), Xe++, Re(Xe); }); }(), function(Re, Xe) { return Promise.all(Re.taskIDs.map(function(qe) { return Cn(D)(qe, Xe); })); }); }; }, Un = function(D) { return function(V) { return h10(D.transporter.write({ method: $, path: m("1/indexes/%s/clear", D.indexName) }, V), function(q, X) { return Cn(D)(q.taskID, X); }); }; }, Wt = function(D) { return function(V) { var q = V || {}, X = q.forwardToReplicas, ue = b(a(q, ["forwardToReplicas"])); return X && (ue.queryParameters.forwardToReplicas = 1), h10(D.transporter.write({ method: $, path: m("1/indexes/%s/rules/clear", D.indexName) }, ue), function(Ie, He) { return Cn(D)(Ie.taskID, He); }); }; }, ln = function(D) { return function(V) { var q = V || {}, X = q.forwardToReplicas, ue = b(a(q, ["forwardToReplicas"])); return X && (ue.queryParameters.forwardToReplicas = 1), h10(D.transporter.write({ method: $, path: m("1/indexes/%s/synonyms/clear", D.indexName) }, ue), function(Ie, He) { return Cn(D)(Ie.taskID, He); }); }; }, fn = function(D) { return function(V, q) { return h10(D.transporter.write({ method: $, path: m("1/indexes/%s/deleteByQuery", D.indexName), data: V }, q), function(X, ue) { return Cn(D)(X.taskID, ue); }); }; }, ar = function(D) { return function(V) { return h10(D.transporter.write({ method: O, path: m("1/indexes/%s", D.indexName) }, V), function(q, X) { return Cn(D)(q.taskID, X); }); }; }, zo = function(D) { return function(V, q) { return h10(K(D)([V], q).then(function(X) { return { taskID: X.taskIDs[0] }; }), function(X, ue) { return Cn(D)(X.taskID, ue); }); }; }, K = function(D) { return function(V, q) { var X = V.map(function(ue) { return { objectID: ue }; }); return Hn(D)(X, Ds.DeleteObject, q); }; }, he = function(D) { return function(V, q) { var X = q || {}, ue = X.forwardToReplicas, Ie = b(a(X, ["forwardToReplicas"])); return ue && (Ie.queryParameters.forwardToReplicas = 1), h10(D.transporter.write({ method: O, path: m("1/indexes/%s/rules/%s", D.indexName, V) }, Ie), function(He, Pe) { return Cn(D)(He.taskID, Pe); }); }; }, ze = function(D) { return function(V, q) { var X = q || {}, ue = X.forwardToReplicas, Ie = b(a(X, ["forwardToReplicas"])); return ue && (Ie.queryParameters.forwardToReplicas = 1), h10(D.transporter.write({ method: O, path: m("1/indexes/%s/synonyms/%s", D.indexName, V) }, Ie), function(He, Pe) { return Cn(D)(He.taskID, Pe); }); }; }, ot = function(D) { return function(V) { return Fi(D)(V).then(function() { return true; }).catch(function(q) { if (q.status !== 404) throw q; return false; }); }; }, yn = function(D) { return function(V, q, X) { return D.transporter.read({ method: $, path: m("1/answers/%s/prediction", D.indexName), data: { query: V, queryLanguages: q }, cacheable: true }, X); }; }, qn = function(D) { return function(V, q) { var X = q || {}, ue = X.query, Ie = X.paginate, He = a(X, ["query", "paginate"]), Pe = 0; return function Re() { return Ry(D)(ue || "", o(o({}, He), {}, { page: Pe })).then(function(Xe) { for (var qe = 0, yt = Object.entries(Xe.hits); qe < yt.length; qe++) { var gt = i(yt[qe], 2), $t = gt[0], St = gt[1]; if (V(St)) return { object: St, position: parseInt($t, 10), page: Pe }; } if (Pe++, Ie === false || Pe >= Xe.nbPages) throw { name: "ObjectNotFoundError", message: "Object not found." }; return Re(); }); }(); }; }, ir = function(D) { return function(V, q) { return D.transporter.read({ method: F, path: m("1/indexes/%s/%s", D.indexName, V) }, q); }; }, kn = function() { return function(D, V) { for (var q = 0, X = Object.entries(D.hits); q < X.length; q++) { var ue = i(X[q], 2), Ie = ue[0]; if (ue[1].objectID === V) return parseInt(Ie, 10); } return -1; }; }, un = function(D) { return function(V, q) { var X = q || {}, ue = X.attributesToRetrieve, Ie = a(X, ["attributesToRetrieve"]), He = V.map(function(Pe) { return o({ indexName: D.indexName, objectID: Pe }, ue ? { attributesToRetrieve: ue } : {}); }); return D.transporter.read({ method: $, path: "1/indexes/*/objects", data: { requests: He } }, Ie); }; }, Vo = function(D) { return function(V, q) { return D.transporter.read({ method: F, path: m("1/indexes/%s/rules/%s", D.indexName, V) }, q); }; }, Fi = function(D) { return function(V) { return D.transporter.read({ method: F, path: m("1/indexes/%s/settings", D.indexName), data: { getVersion: 2 } }, V); }; }, id = function(D) { return function(V, q) { return D.transporter.read({ method: F, path: m("1/indexes/%s/synonyms/%s", D.indexName, V) }, q); }; }, sd = function(D) { return function(V, q) { return h10(ld(D)([V], q).then(function(X) { return { objectID: X.objectIDs[0], taskID: X.taskIDs[0] }; }), function(X, ue) { return Cn(D)(X.taskID, ue); }); }; }, ld = function(D) { return function(V, q) { var X = q || {}, ue = X.createIfNotExists, Ie = a(X, ["createIfNotExists"]), He = ue ? Ds.PartialUpdateObject : Ds.PartialUpdateObjectNoCreate; return Hn(D)(V, He, Ie); }; }, Mr = function(D) { return function(V, q) { var X = q || {}, ue = X.safe, Ie = X.autoGenerateObjectIDIfNotExist, He = X.batchSize, Pe = a(X, ["safe", "autoGenerateObjectIDIfNotExist", "batchSize"]), Re = function(St, Yt, cn, xr) { return h10(D.transporter.write({ method: $, path: m("1/indexes/%s/operation", St), data: { operation: cn, destination: Yt } }, xr), function(ou, kr) { return Cn(D)(ou.taskID, kr); }); }, Xe = Math.random().toString(36).substring(7), qe = "".concat(D.indexName, "_tmp_").concat(Xe), yt = gr({ appId: D.appId, transporter: D.transporter, indexName: qe }), gt = [], $t = Re(D.indexName, qe, "copy", o(o({}, Pe), {}, { scope: ["settings", "synonyms", "rules"] })); return gt.push($t), h10((ue ? $t.wait(Pe) : $t).then(function() { var St = yt(V, o(o({}, Pe), {}, { autoGenerateObjectIDIfNotExist: Ie, batchSize: He })); return gt.push(St), ue ? St.wait(Pe) : St; }).then(function() { var St = Re(qe, D.indexName, "move", Pe); return gt.push(St), ue ? St.wait(Pe) : St; }).then(function() { return Promise.all(gt); }).then(function(St) { var Yt = i(St, 3), cn = Yt[0], xr = Yt[1], ou = Yt[2]; return { objectIDs: xr.objectIDs, taskIDs: [cn.taskID].concat(s(xr.taskIDs), [ou.taskID]) }; }), function(St, Yt) { return Promise.all(gt.map(function(cn) { return cn.wait(Yt); })); }); }; }, ru = function(D) { return function(V, q) { return Ah(D)(V, o(o({}, q), {}, { clearExistingRules: true })); }; }, ud = function(D) { return function(V, q) { return Fh(D)(V, o(o({}, q), {}, { clearExistingSynonyms: true })); }; }, Ii = function(D) { return function(V, q) { return h10(gr(D)([V], q).then(function(X) { return { objectID: X.objectIDs[0], taskID: X.taskIDs[0] }; }), function(X, ue) { return Cn(D)(X.taskID, ue); }); }; }, gr = function(D) { return function(V, q) { var X = q || {}, ue = X.autoGenerateObjectIDIfNotExist, Ie = a(X, ["autoGenerateObjectIDIfNotExist"]), He = ue ? Ds.AddObject : Ds.UpdateObject; if (He === Ds.UpdateObject) { var Pe = true, Re = false, Xe = void 0; try { for (var qe, yt = V[Symbol.iterator](); !(Pe = (qe = yt.next()).done); Pe = true) if (qe.value.objectID === void 0) return h10(Promise.reject({ name: "MissingObjectIDError", message: "All objects must have an unique objectID (like a primary key) to be valid. Algolia is also able to generate objectIDs automatically but *it's not recommended*. To do it, use the `{'autoGenerateObjectIDIfNotExist': true}` option." })); } catch (gt) { Re = true, Xe = gt; } finally { try { Pe || yt.return == null || yt.return(); } finally { if (Re) throw Xe; } } } return Hn(D)(V, He, Ie); }; }, $h = function(D) { return function(V, q) { return Ah(D)([V], q); }; }, Ah = function(D) { return function(V, q) { var X = q || {}, ue = X.forwardToReplicas, Ie = X.clearExistingRules, He = b(a(X, ["forwardToReplicas", "clearExistingRules"])); return ue && (He.queryParameters.forwardToReplicas = 1), Ie && (He.queryParameters.clearExistingRules = 1), h10(D.transporter.write({ method: $, path: m("1/indexes/%s/rules/batch", D.indexName), data: V }, He), function(Pe, Re) { return Cn(D)(Pe.taskID, Re); }); }; }, iT = function(D) { return function(V, q) { return Fh(D)([V], q); }; }, Fh = function(D) { return function(V, q) { var X = q || {}, ue = X.forwardToReplicas, Ie = X.clearExistingSynonyms, He = X.replaceExistingSynonyms, Pe = b(a(X, ["forwardToReplicas", "clearExistingSynonyms", "replaceExistingSynonyms"])); return ue && (Pe.queryParameters.forwardToReplicas = 1), (He || Ie) && (Pe.queryParameters.replaceExistingSynonyms = 1), h10(D.transporter.write({ method: $, path: m("1/indexes/%s/synonyms/batch", D.indexName), data: V }, Pe), function(Re, Xe) { return Cn(D)(Re.taskID, Xe); }); }; }, Ry = function(D) { return function(V, q) { return D.transporter.read({ method: $, path: m("1/indexes/%s/query", D.indexName), data: { query: V }, cacheable: true }, q); }; }, By = function(D) { return function(V, q, X) { return D.transporter.read({ method: $, path: m("1/indexes/%s/facets/%s/query", D.indexName, V), data: { facetQuery: q }, cacheable: true }, X); }; }, My = function(D) { return function(V, q) { return D.transporter.read({ method: $, path: m("1/indexes/%s/rules/search", D.indexName), data: { query: V } }, q); }; }, zy = function(D) { return function(V, q) { return D.transporter.read({ method: $, path: m("1/indexes/%s/synonyms/search", D.indexName), data: { query: V } }, q); }; }, sT = function(D) { return function(V, q) { var X = q || {}, ue = X.forwardToReplicas, Ie = b(a(X, ["forwardToReplicas"])); return ue && (Ie.queryParameters.forwardToReplicas = 1), h10(D.transporter.write({ method: A, path: m("1/indexes/%s/settings", D.indexName), data: V }, Ie), function(He, Pe) { return Cn(D)(He.taskID, Pe); }); }; }, Cn = function(D) { return function(V, q) { return f(function(X) { return (/* @__PURE__ */ function(ue) { return function(Ie, He) { return ue.transporter.read({ method: F, path: m("1/indexes/%s/task/%s", ue.indexName, Ie.toString()) }, He); }; }(D))(V, q).then(function(ue) { return ue.status !== "published" ? X() : void 0; }); }); }; }, Ds = { AddObject: "addObject", UpdateObject: "updateObject", PartialUpdateObject: "partialUpdateObject", PartialUpdateObjectNoCreate: "partialUpdateObjectNoCreate", DeleteObject: "deleteObject", DeleteIndex: "delete", ClearIndex: "clear" }, Ih = { Settings: "settings", Synonyms: "synonyms", Rules: "rules" }, lT = 1, uT = 2, cT = 3, cd = function(D) { return function(V, q) { var X = V.map(function(ue) { return o(o({}, ue), {}, { threshold: ue.threshold || 0 }); }); return D.transporter.read({ method: $, path: "1/indexes/*/recommendations", data: { requests: X }, cacheable: true }, q); }; }, dT = function(D) { return function(V, q) { return cd(D)(V.map(function(X) { return o(o({}, X), {}, { fallbackParameters: {}, model: "bought-together" }); }), q); }; }, pT = function(D) { return function(V, q) { return cd(D)(V.map(function(X) { return o(o({}, X), {}, { model: "related-products" }); }), q); }; }, fT = function(D) { return function(V, q) { var X = V.map(function(ue) { return o(o({}, ue), {}, { model: "trending-facets", threshold: ue.threshold || 0 }); }); return D.transporter.read({ method: $, path: "1/indexes/*/recommendations", data: { requests: X }, cacheable: true }, q); }; }, hT = function(D) { return function(V, q) { var X = V.map(function(ue) { return o(o({}, ue), {}, { model: "trending-items", threshold: ue.threshold || 0 }); }); return D.transporter.read({ method: $, path: "1/indexes/*/recommendations", data: { requests: X }, cacheable: true }, q); }; }, vT = function(D) { return function(V, q) { return cd(D)(V.map(function(X) { return o(o({}, X), {}, { model: "looking-similar" }); }), q); }; }, gT = function(D) { return function(V, q) { var X = V.map(function(ue) { return o(o({}, ue), {}, { model: "recommended-for-you", threshold: ue.threshold || 0 }); }); return D.transporter.read({ method: $, path: "1/indexes/*/recommendations", data: { requests: X }, cacheable: true }, q); }; }; function Vy(D, V, q) { var X, ue = { appId: D, apiKey: V, timeouts: { connect: 1, read: 2, write: 30 }, requester: { send: function(Pe) { return new Promise(function(Re) { var Xe = new XMLHttpRequest(); Xe.open(Pe.method, Pe.url, true), Object.keys(Pe.headers).forEach(function($t) { return Xe.setRequestHeader($t, Pe.headers[$t]); }); var qe, yt = function($t, St) { return setTimeout(function() { Xe.abort(), Re({ status: 0, content: St, isTimedOut: true }); }, 1e3 * $t); }, gt = yt(Pe.connectTimeout, "Connection timeout"); Xe.onreadystatechange = function() { Xe.readyState > Xe.OPENED && qe === void 0 && (clearTimeout(gt), qe = yt(Pe.responseTimeout, "Socket timeout")); }, Xe.onerror = function() { Xe.status === 0 && (clearTimeout(gt), clearTimeout(qe), Re({ content: Xe.responseText || "Network request failed", status: Xe.status, isTimedOut: false })); }, Xe.onload = function() { clearTimeout(gt), clearTimeout(qe), Re({ content: Xe.responseText, status: Xe.status, isTimedOut: false }); }, Xe.send(Pe.data); }); } }, logger: (X = cT, { debug: function(Pe, Re) { return lT >= X && console.debug(Pe, Re), Promise.resolve(); }, info: function(Pe, Re) { return uT >= X && console.info(Pe, Re), Promise.resolve(); }, error: function(Pe, Re) { return console.error(Pe, Re), Promise.resolve(); } }), responsesCache: c(), requestsCache: c({ serializable: false }), hostsCache: l({ caches: [u({ key: "".concat("4.23.2", "-").concat(D) }), c()] }), userAgent: I("4.23.2").add({ segment: "Browser" }) }, Ie = o(o({}, ue), q), He = function() { return function(Pe) { return function(Re) { var Xe = Re.region || "us", qe = d(g.WithinHeaders, Re.appId, Re.apiKey), yt = M(o(o({ hosts: [{ url: "personalization.".concat(Xe, ".algolia.com") }] }, Re), {}, { headers: o(o(o({}, qe.headers()), { "content-type": "application/json" }), Re.headers), queryParameters: o(o({}, qe.queryParameters()), Re.queryParameters) })); return v({ appId: Re.appId, transporter: yt }, Re.methods); }(o(o(o({}, ue), Pe), {}, { methods: { getPersonalizationStrategy: fe, setPersonalizationStrategy: ge } })); }; }; return function(Pe) { var Re = Pe.appId, Xe = d(Pe.authMode !== void 0 ? Pe.authMode : g.WithinHeaders, Re, Pe.apiKey), qe = M(o(o({ hosts: [{ url: "".concat(Re, "-dsn.algolia.net"), accept: x.Read }, { url: "".concat(Re, ".algolia.net"), accept: x.Write }].concat(p([{ url: "".concat(Re, "-1.algolianet.com") }, { url: "".concat(Re, "-2.algolianet.com") }, { url: "".concat(Re, "-3.algolianet.com") }])) }, Pe), {}, { headers: o(o(o({}, Xe.headers()), { "content-type": "application/x-www-form-urlencoded" }), Pe.headers), queryParameters: o(o({}, Xe.queryParameters()), Pe.queryParameters) })); return v({ transporter: qe, appId: Re, addAlgoliaAgent: function(yt, gt) { qe.userAgent.add({ segment: yt, version: gt }); }, clearCache: function() { return Promise.all([qe.requestsCache.clear(), qe.responsesCache.clear()]).then(function() { }); } }, Pe.methods); }(o(o({}, Ie), {}, { methods: { search: Se, searchForFacetValues: be, multipleBatch: Je, multipleGetObjects: re, multipleQueries: Se, copyIndex: je, copySettings: De, copySynonyms: Ae, copyRules: _e, moveIndex: Ye, listIndices: ye, getLogs: st, listClusters: Oe, multipleSearchForFacetValues: be, getApiKey: Me, addApiKey: te, listApiKeys: de, updateApiKey: an, deleteApiKey: Ue, restoreApiKey: Ct, assignUserID: le, assignUserIDs: Ee, getUserID: j, searchUserIDs: qt, listUserIDs: Fe, getTopUserIDs: P, removeUserID: Le, hasPendingMappings: se, clearDictionaryEntries: Ne, deleteDictionaryEntries: Ze, getDictionarySettings: nt, getAppTask: rt, replaceDictionaryEntries: Tt, saveDictionaryEntries: Dt, searchDictionaryEntries: Vt, setDictionarySettings: bn, waitAppTask: sn, customRequest: Be, initIndex: function(Pe) { return function(Re) { return ce(Pe)(Re, { methods: { batch: wn, delete: ar, findAnswers: yn, getObject: ir, getObjects: un, saveObject: Ii, saveObjects: gr, search: Ry, searchForFacetValues: By, waitTask: Cn, setSettings: sT, getSettings: Fi, partialUpdateObject: sd, partialUpdateObjects: ld, deleteObject: zo, deleteObjects: K, deleteBy: fn, clearObjects: Un, browseObjects: xn, getObjectPosition: kn, findObject: qn, exists: ot, saveSynonym: iT, saveSynonyms: Fh, getSynonym: id, searchSynonyms: zy, browseSynonyms: or, deleteSynonym: ze, clearSynonyms: ln, replaceAllObjects: Mr, replaceAllSynonyms: ud, searchRules: My, getRule: Vo, deleteRule: he, saveRule: $h, saveRules: Ah, replaceAllRules: ru, browseRules: mn, clearRules: Wt } }); }; }, initAnalytics: function() { return function(Pe) { return function(Re) { var Xe = Re.region || "us", qe = d(g.WithinHeaders, Re.appId, Re.apiKey), yt = M(o(o({ hosts: [{ url: "analytics.".concat(Xe, ".algolia.com") }] }, Re), {}, { headers: o(o(o({}, qe.headers()), { "content-type": "application/json" }), Re.headers), queryParameters: o(o({}, qe.queryParameters()), Re.queryParameters) })); return v({ appId: Re.appId, transporter: yt }, Re.methods); }(o(o(o({}, ue), Pe), {}, { methods: { addABTest: Q, getABTest: pe, getABTests: we, stopABTest: ke, deleteABTest: ae } })); }; }, initPersonalization: He, initRecommendation: function() { return function(Pe) { return Ie.logger.info("The `initRecommendation` method is deprecated. Use `initPersonalization` instead."), He()(Pe); }; }, getRecommendations: cd, getFrequentlyBoughtTogether: dT, getLookingSimilar: vT, getRecommendedForYou: gT, getRelatedProducts: pT, getTrendingFacets: fT, getTrendingItems: hT } })); } return Vy.version = "4.23.2", Vy; }); })(J8); var ife = J8.exports; var sfe = uL(ife); var Q8 = class { constructor(t, n, r = "https://api.pennsieve.io") { this.client = sfe( t, n ), this.PENNSIEVE_API_LOCATION = r, this.anatomyFacetLabels = []; } initIndex(t) { this.index = this.client.initIndex(t); } getAlgoliaFacets(t) { const n = t.map((i) => i.facetPropPath), r = t.map((i) => i.facetSubpropPath); let o = [], a = 0; return this.index.search("", { sortFacetValuesBy: "alpha", facets: n.concat(r) }).then((i) => (n.map((s) => { const u = t.find((h10) => h10.facetPropPath == s); var l = []; const c = i.facets; if (c === void 0) return; const d = c[s] == null ? {} : c[s], f = u && c[u.facetSubpropPath] ? Object.keys(c[u.facetSubpropPath]) : []; Object.keys(d).map((h10) => { const p = f.reduce((m, g) => { const b = g.split("."); return b.length !== 2 || h10 === b[0] && m.push({ label: b[1], id: a++, facetPropPath: `${u ? u.facetSubpropPath : void 0}` }), m; }, []); let v = { label: h10, id: a++, facetPropPath: s }; p.length > 0 && (v.children = p), l.push(v); }), l.length > 0 && o.push({ label: u ? u.label : "", id: a++, children: l, key: s }); }), o)); } // Returns all DOIs of all versions for a given discover dataset _discoverAllDois(t, n = "https://api.pennsieve.io") { return new Promise((r) => { fetch(`${n}/discover/datasets/${t}/versions`).then((o) => o.json()).then((o) => { r(o.map((a) => a.doi)); }); }); } // Get all dois given a list of discoverIds _expandDois(t, n = "https://api.pennsieve.io") { return new Promise((r) => { let o = t.map((a) => this._discoverAllDois(a, n)); Promise.all(o).then((a) => { r(a.flat()); }); }); } _processResultsForCards(t) { let n = [], r = {}; for (let o of t) r = { ...o }, r = { anatomy: o.anatomy ? o.anatomy.organ.map((a) => a.curie) : void 0, doi: o.item.curie.split(":")[1], name: o.item.name, description: o.item.description, updated: o.pennsieve ? o.pennsieve.updatedAt : void 0, publishDate: o.pennsieve ? o.pennsieve.publishDate : void 0, datasetId: o.objectID, detailsReady: false }, n.push(r); return n; } _processAnatomy(t) { let n = [], r = [], o = [], a = []; return t.forEach((i) => { i.item && i.item.keywords && i.item.keywords.forEach((s) => { let u = s.keyword.toUpperCase(); (u.includes("UBERON") || u.includes("ILX")) && n.push(this._processUberonURL(u)); }), i.anatomy && i.anatomy.organ && i.anatomy.organ.forEach((s) => { s.curie && (n.push(s.curie), r.push(s.name)); }); }), a = [...new Set(n)], o = [...new Set(r)], this.anatomyFacetLabels = o, a; } _processUberonURL(t) { return t.split("/").pop().replace("_", ":"); } /** * Get Search results * This is using fetch from the Algolia API */ search(t, n = "", r = 10, o = 1) { return new Promise((a) => { this.index.search(n, { facets: ["*"], hitsPerPage: r, page: o - 1, filters: t, attributesToHighlight: [], attributesToRetrieve: [ "pennsieve.publishDate", "pennsieve.updatedAt", "item.curie", "item.name", "item.description", "objectID", "anatomy.organ.curie" ] }).then((i) => { let s = { items: this._processResultsForCards(i.hits), total: i.nbHits, discoverIds: i.hits.map((u) => u.pennsieve ? u.pennsieve.identifier : u.objectID), dois: i.hits.map((u) => u.item.curie.split(":")[1]) }; a(s); }); }); } /** * Get key words * This is used to return all keywords for a given search. Note that you often want the hits per page to be maxed out */ anatomyInSearch(t, n = "", r = 999999, o = 1) { return new Promise((a) => { this.index.search(n, { facets: ["*"], hitsPerPage: r, page: o - 1, filters: t, attributesToHighlight: [], attributesToRetrieve: [ "objectID", "item.keywords.keyword", "anatomy.organ.name", "anatomy.organ.curie" ] }).then((i) => { a({ forFlatmap: this.processResultsForFlatmap(i.hits), forScaffold: this.processResultsForScaffold(i.hits) }); }); }); } processResultsForFlatmap(t) { return t.map((r) => ({ id: r.objectID, terms: r.anatomy ? r.anatomy.organ.map((o) => o.curie) : [] })); } processResultsForScaffold(t) { let n = {}; return t.forEach((r) => { r.anatomy && r.anatomy.organ && r.anatomy.organ.forEach((o) => { o.name && (n[o.name] ? n[o.name]++ : n[o.name] = 1); }); }), n; } }; var Dy = [ { label: "Data Type", id: "item.types", facetPropPath: "item.types.name", facetSubpropPath: "item.types.subcategory.name" }, { label: "Anatomical Structure", id: "anatomy.organ.category", facetPropPath: "anatomy.organ.category.name", facetSubpropPath: "anatomy.organ.subcategory.name", facetFilterPath: "anatomy.organ.name" }, { label: "Species", id: "organisms.primary.species", facetPropPath: "organisms.primary.species.name", facetSubpropPath: "organisms.primary.species.subcategory.name" }, { label: "Experimental Approach", id: "item.modalities", facetPropPath: "item.modalities.keyword", facetSubpropPath: "item.modalities.subcategory.name" }, { label: "Sex", id: "attributes.subject.sex", facetPropPath: "attributes.subject.sex.value", facetSubpropPath: "attributes.subject.sex.subcategory.name" }, { label: "Age Categories", id: "attributes.subject.ageCategory", facetPropPath: "attributes.subject.ageCategory.value", facetSubpropPath: "attributes.subject.ageCategory.subcategory.name" } ]; function _k(e17 = void 0) { if (e17 === void 0) return "NOT item.published.status:embargo"; e17.forEach((o) => o.label = o.facet); let t = lfe(e17), n = "NOT item.published.status:embargo"; return n = `(${n}) AND `, Dy.map((o) => o.facetPropPath).map((o) => { let a = t.filter( (u) => u.facetPropPath == o ), i = "", s = ""; a.map((u) => { let l = u.facetSubPropPath ? u.facetSubPropPath : o; u.AND ? s += `AND "${l}":"${u.label}"` : i += `"${l}":"${u.label}" OR `; }), !(i == "" && s == "") && (i = `(${i.substring(0, i.lastIndexOf(" OR "))})`, n += `${i + s} AND `, n = n.split("()AND ").join("")); }), n.substring(0, n.lastIndexOf(" AND ")); } function lfe(e17) { return e17.filter((t) => t.label !== "Show all"); } var df = function(e17) { return e17.charAt(0).toUpperCase() + e17.slice(1); }; var Rv = function(e17) { const t = e17.toLowerCase(); return Up[t] ? df(Up[t]) : df(t); }; var ufe = { name: "SearchFilters", components: { MapSvgIcon: Ype, MapSvgSpriteColor: afe, Option: If, Select: Nc, Popover: Yg, Cascader: y3 }, props: { /** * Object containing information for * the required viewing. */ entry: Object, envVars: { type: Object, default: () => { } } }, data: function() { return { algoliaClient: void 0, cascaderIsReady: false, previousShowAllChecked: { species: false, gender: false, organ: false, datasets: false }, showFilters: true, showFiltersText: true, cascadeSelected: [], cascadeSelectedWithBoolean: [], numberShown: 10, filters: [], facets: ["Species", "Gender", "Organ", "Datasets"], numberDatasetsShown: ["10", "20", "50"], props: { multiple: true }, options: [ { value: "Species", label: "Species", children: [{}] } ], presentTags: [] }; }, setup() { const e17 = markRaw({}), t = markRaw({ term: /* @__PURE__ */ new Set(), facet: /* @__PURE__ */ new Set(), facet2: /* @__PURE__ */ new Set() }); return { cascaderTags: e17, correctnessCheck: t }; }, computed: { numberOfResultsText: function() { return `${this.entry.numberOfHits} results | Showing`; } }, methods: { createCascaderItemValue: function(e17, t = void 0, n = void 0) { let r = e17; return t && (r = `${e17}>${t}`), t && n && (r = `${e17}>${t}>${n}`), !t && n && console.warn( `Warning: ${n} provided without its parent, this will not be shown in the cascader` ), r; }, populateCascader: function() { return new Promise((e17) => { this.algoliaClient.getAlgoliaFacets(Dy).then((t) => { this.facets = t, En.emit("available-facets", t), this.options = t, this.options.forEach((n, r) => { this.options[r].total = this.countTotalFacet(n), this.options[r].label = Rv(n.label), this.options[r].value = this.createCascaderItemValue( n.key, void 0 ), this.options[r].children.unshift({ value: this.createCascaderItemValue("Show all"), label: "Show all" }), this.options[r].children.forEach((o, a) => { this.options[r].children[a].label = Rv( o.label ), this.options[r].children[a].value = this.createCascaderItemValue(n.label, o.label), this.options[r].children[a].children && this.options[r].children[a].children.length > 0 && this.options[r].children[a].children.forEach((i, s) => { this.options[r].children[a].children[s].label = Rv(i.label), this.options[r].children[a].children[s].value = this.createCascaderItemValue( n.label, o.label, i.label ); }); }); }); }).finally(() => { e17(); }); }); }, /** * Create manual events when cascader tag is closed */ cascadeTagClose: function(e17) { let t = []; Object.entries(this.cascaderTags).map((n) => { const r = n[0], o = n[1], a = this.options.filter((s) => s.label == r)[0], i = a.key; for (let s = 0; s < a.children.length; s++) { const u = a.children[s], l = u.label, c = u.value; if (Array.isArray(o)) if (o.length === 0 && l.toLowerCase() === "show all") { t.push([i, c]); break; } else l !== e17 && o.includes(l) && t.push([i, c]); else Object.entries(o).map((d) => { const f = d[0], h10 = d[1]; f === l && u.children.map((p) => { const v = p.label, m = p.value; v !== e17 && h10.includes(v) && t.push([i, m]); }); }); } }), this.cascadeEvent(t); }, /** * Re-generate 'cascaderTags' and 'presentTags' * Not able to avoid wrong facet at the moment */ tagsChangedCallback: function(e17) { this.correctnessCheck.term && this.correctnessCheck.facet && this.correctnessCheck.facet2 && this.options.map((t) => { this.correctnessCheck.term.add(t.label), t.children.map((n) => { this.correctnessCheck.facet.add(n.label), t.label === "Anatomical structure" && n.label !== "Show all" && n.children.map((r) => { this.correctnessCheck.facet2.add(r.label); }); }); }), this.cascaderTags = {}, this.presentTags = [], e17.map((t) => { const { facet: n, facet2: r, term: o } = t; this.correctnessCheck.term.has(o) && this.correctnessCheck.facet.has(n) && (r ? this.correctnessCheck.facet2.has(r) && (o in this.cascaderTags ? n in this.cascaderTags[o] ? this.cascaderTags[o][n].push(r) : this.cascaderTags[o][n] = [r] : (this.cascaderTags[o] = {}, this.cascaderTags[o][n] = [r])) : o in this.cascaderTags && o !== "Anatomical structure" ? this.cascaderTags[o].push(n) : n.toLowerCase() !== "show all" ? this.cascaderTags[o] = [n] : this.cascaderTags[o] = []); }), Object.values(this.cascaderTags).map((t) => { const n = Array.isArray(t) ? t : Object.values(t).flat(1); this.presentTags = [...this.presentTags, ...n]; }), this.presentTags = [...new Set(this.presentTags)], this.presentTags.length > 0 ? this.showFiltersText = false : this.showFiltersText = true; }, /** * Support for function 'showAllEventModifierForAutoCheckAll' * Called in function 'populateCascader' */ countTotalFacet: function(e17) { return ["anatomy.organ.category.name"].includes(e17.key) ? e17.children.reduce((n, r) => (n = typeof n == "number" ? n : n.children.length, n + r.children.length)) : e17.children.length; }, /** * When check/uncheck all child items, automatically check "Show all" */ showAllEventModifierForAutoCheckAll: function(e17) { const t = {}; return e17.map((n) => { const r = n[0]; r in t ? t[r] += 1 : t[r] = 1; }), this.options.map((n) => { const r = n.key, o = n.children.filter((i) => i.label === "Show all")[0].value, a = n.total; t[r] === a && (e17 = e17.filter((i) => i[0] !== n.key), delete t[r]), r in t || e17.unshift([r, o]); }), e17; }, // cascadeEvent: initiate searches based off cascader changes cascadeEvent: function(e17) { let t = [...e17]; if (t) { if (t = this.showAllEventModifier(t), t = this.showAllEventModifierForAutoCheckAll(t), this.__expandItem__) { let o = 0; this.__expandItem__.length > 1 && (o = 1); const a = t.filter((s) => s[o] == this.__expandItem__[o]), i = t.filter((s) => s[o] !== this.__expandItem__[o]); t = [...a, ...i]; } let n = t.filter((o) => o !== void 0).map((o) => { let { hString: a, bString: i } = this.findHierarachyStringAndBooleanString(o), { facet: s, facet2: u, term: l } = this.getFacetsFromHierarchyString(a); return { facetPropPath: o[0], facet: s, facet2: u, term: l, AND: i // for setting the boolean }; }), r = t.filter((o) => o !== void 0).map((o) => { let a, i = o[0].includes("duplicate") ? o[0].split("duplicate")[0] : o[0], { hString: s, bString: u } = this.findHierarachyStringAndBooleanString(o), { facet: l, facet2: c, term: d } = this.getFacetsFromHierarchyString(s); return c && (l = c, a = "anatomy.organ.name"), { facetPropPath: i, facet: l, term: d, AND: u, // for setting the boolean facetSubPropPath: a // will be used for filters if we are at the third level of the cascader }; }); this.$emit("loading", true), this.$emit("filterResults", r), this.setCascader(n), this.cssMods(); } }, //this fucntion is needed as we previously stored booleans in the array of event that // are stored in the cascader findHierarachyStringAndBooleanString(e17) { let t, n; return e17.length >= 3 ? e17[2] && (typeof e17[2] == "string" || e17[2] instanceof String) && e17[2].split(">").length > 2 ? (t = e17[2], n = e17.length == 4 ? e17[3] : void 0) : (t = e17[1], n = e17[2]) : (t = e17[1], n = void 0), { hString: t, bString: n }; }, // Splits the terms and facets from the string stored in the cascader getFacetsFromHierarchyString(e17) { let t, n, r, o = e17.split(">"); return o.length == 3 ? (r = o[2], t = o[1], n = o[0]) : (t = o[1], n = o[0]), { facet: t, facet2: r, term: n }; }, // showAllEventModifier: Modifies a cascade event to unclick all selections in category if "show all" is clicked. Also unchecks "Show all" if any secection is clicked // *NOTE* Does NOT remove 'Show all' selections from showing in 'cascadeSelected' showAllEventModifier: function(e17) { if (e17.map((n) => n ? n[1].toLowerCase().includes("show all") : false).includes(true)) { let n = [], r = {}; for (const o in e17) r[e17[o][0]] === void 0 && (r[e17[o][0]] = []), r[e17[o][0]].push(e17[o]); for (const o in r) { let a; for (let i = r[o].length - 1; i >= 0; i--) if (r[o][i][1].toLowerCase().includes("show all")) { a = r[o].splice(i, 1)[0]; break; } a ? this.previousShowAllChecked[o] && r[o].length > 0 ? n.push(...r[o]) : n.push(a) : n.push(...r[o]); } return n.sort((o, a) => this.__expandItem__ ? o[0] == this.__expandItem__ ? a[0] == this.__expandItem__ ? 0 : -1 : a[0] == this.__expandItem__ ? o[0] == this.__expandItem__ ? 0 : 1 : 0 : 0); } return e17; }, cascadeExpandChange: function(e17) { this.__expandItem__ = e17, this.cssMods(); }, numberShownChanged: function(e17) { this.$emit("numberPerPage", parseInt(e17)); }, updatePreviousShowAllChecked: function(e17) { for (const t in this.previousShowAllChecked) this.previousShowAllChecked[t] = false; e17.forEach((t) => { t[1].toLowerCase().includes("show all") && (this.previousShowAllChecked[t[0]] = true); }); }, // setCascader: Clears previous selections and takes in an array of facets to select: filterFacets // facets are in the form: // { // facetPropPath: 'anatomy.organ.name', // term: 'Sex', // facet: 'Male' // AND: true // Optional value for setting the boolean within a facet // } setCascader: function(e17) { if (this.cascaderIsReady && e17 && e17.length != 0) { const t = (n) => { let r = [ n.facetPropPath, this.createCascaderItemValue(df(n.term), n.facet) ]; return n.facet2 && r.push( this.createCascaderItemValue( df(n.term), n.facet, n.facet2 ) ), r; }; this.cascadeSelected = e17.map((n) => t(n)), this.cascadeSelectedWithBoolean = e17.map((n) => { let r = t(n); return r.push(n.AND), r; }), this.updatePreviousShowAllChecked(this.cascadeSelected); } this.tagsChangedCallback(e17); }, addFilter: function(e17) { if (this.cascaderIsReady && e17) { let t = this.validateAndConvertFilterToHierarchical(e17); if (t) return this.cascadeSelected.filter((n) => n.term != t.term), this.cascadeSelected.push([ t.facetPropPath, this.createCascaderItemValue(t.term, t.facet), this.createCascaderItemValue( t.term, t.facet, t.facet2 ) ]), this.cascadeSelectedWithBoolean.push([ t.facetPropPath, this.createCascaderItemValue(t.term, t.facet), this.createCascaderItemValue( t.term, t.facet, t.facet2 ), t.AND ]), true; } }, initiateSearch: function() { this.cascadeEvent(this.cascadeSelectedWithBoolean); }, // checkShowAllBoxes: Checks each 'Show all' cascade option by using the setCascader function checkShowAllBoxes: function() { this.setCascader( this.options.map((e17) => ({ facetPropPath: e17.value, term: e17.label, facet: "Show all" })) ); }, makeCascadeLabelsClickable: function() { this.$nextTick(() => { document.querySelectorAll(".sidebar-cascader-popper .el-cascader-node__label").forEach((e17) => { e17.onclick = function() { const t = this.previousElementSibling; t && (t.parentElement.attributes["aria-owns"] || this.previousElementSibling.click()); }; }); }); }, cssMods: function() { this.makeCascadeLabelsClickable(), this.removeTopLevelCascaderCheckboxes(); }, removeTopLevelCascaderCheckboxes: function() { this.$nextTick(() => { document.querySelectorAll( ".sidebar-cascader-popper .el-cascader-menu__list" )[0].querySelectorAll(".el-checkbox__input").forEach((t) => t.style.display = "none"); }); }, /* * Given a filter, the function below returns the filter in the format of the cascader, returns false if facet is not found */ validateAndConvertFilterToHierarchical: function(e17) { if (e17 && e17.facet && e17.term) { if (e17.facet2) return e17; for (const t of this.options) if (t.value === e17.facetPropPath) for (const n of t.children) { if (n.label === e17.facet) return e17; if (n.children && n.children.length > 0) { for (const r of n.children) if (r.label === e17.facet) return e17.facet2 = r.label, e17.facet = n.label, e17; } } } return false; }, getHierarchicalValidatedFilters: function(e17) { if (e17) if (this.cascaderIsReady) { const t = []; return e17.forEach((n) => { const r = this.validateAndConvertFilterToHierarchical(n); r && t.push(r); }), t; } else return e17; return []; } }, mounted: function() { this.algoliaClient = markRaw(new Q8( this.envVars.ALGOLIA_ID, this.envVars.ALGOLIA_KEY, this.envVars.PENNSIEVE_API_LOCATION )), this.algoliaClient.initIndex(this.envVars.ALGOLIA_INDEX), this.populateCascader().then(() => { this.cascaderIsReady = true, this.checkShowAllBoxes(), this.setCascader(this.entry.filterFacets), this.cssMods(), this.$emit("cascaderReady"); }); } }; var cfe = (e17) => (pushScopeId("data-v-88a79b0f"), e17 = e17(), popScopeId(), e17); var dfe = { class: "filters" }; var pfe = { key: 0, class: "cascader-tag" }; var ffe = { class: "el-tags-container" }; var hfe = { class: "el-tags-container" }; var vfe = { class: "search-filters transition-box" }; var gfe = { key: 0, class: "filter-default-value" }; var mfe = cfe(() => createBaseVNode("div", null, [ createBaseVNode("strong", null, "Within categories:"), createTextVNode(" OR "), createBaseVNode("br"), createTextVNode(" example: 'heart' OR 'colon' "), createBaseVNode("br"), createBaseVNode("br"), createBaseVNode("strong", null, "Between categories:"), createTextVNode(" AND "), createBaseVNode("br"), createTextVNode(" example: 'rat' AND 'lung' ") ], -1)); var yfe = { class: "dataset-shown" }; var bfe = { class: "dataset-results-feedback" }; function wfe(e17, t, n, r, o, a) { const i = resolveComponent("MapSvgSpriteColor"), s = ml, u = Yg, l = y3, c = resolveComponent("MapSvgIcon"), d = If, f = Nc, h10 = Nf; return openBlock(), createElementBlock("div", dfe, [ createVNode(i), e17.presentTags.length > 0 ? (openBlock(), createElementBlock("div", pfe, [ createVNode(s, { class: "ml-2", type: "info", closable: "", onClose: t[0] || (t[0] = (p) => a.cascadeTagClose(e17.presentTags[0])) }, { default: withCtx(() => [ createTextVNode(toDisplayString(e17.presentTags[0]), 1) ]), _: 1 }), e17.presentTags.length > 1 ? (openBlock(), createBlock(u, { key: 0, placement: "bottom-start", width: 200, trigger: "hover" }, { default: withCtx(() => [ createBaseVNode("div", ffe, [ (openBlock(true), createElementBlock(Fragment, null, renderList(e17.presentTags.slice(1), (p, v) => (openBlock(), createBlock(s, { key: v, class: "ml-2", type: "info", closable: "", onClose: (m) => a.cascadeTagClose(p) }, { default: withCtx(() => [ createTextVNode(toDisplayString(p), 1) ]), _: 2 }, 1032, ["onClose"]))), 128)) ]) ]), reference: withCtx(() => [ createBaseVNode("div", hfe, [ e17.presentTags.length > 1 ? (openBlock(), createBlock(s, { key: 0, class: "ml-2", type: "info" }, { default: withCtx(() => [ createTextVNode(" +" + toDisplayString(e17.presentTags.length - 1), 1) ]), _: 1 })) : createCommentVNode("", true) ]) ]), _: 1 })) : createCommentVNode("", true) ])) : createCommentVNode("", true), createVNode(Transition, { name: "el-zoom-in-top" }, { default: withCtx(() => [ withDirectives((openBlock(), createElementBlock("span", vfe, [ createVNode(l, { class: "cascader", ref: "cascader", modelValue: e17.cascadeSelected, "onUpdate:modelValue": t[1] || (t[1] = (p) => e17.cascadeSelected = p), size: "large", placeholder: " ", "collapse-tags": true, "collapse-tags-tooltip": "", options: e17.options, props: e17.props, onChange: t[2] || (t[2] = (p) => a.cascadeEvent(p)), onExpandChange: a.cascadeExpandChange, "show-all-levels": true, "popper-class": "sidebar-cascader-popper" }, null, 8, ["modelValue", "options", "props", "onExpandChange"]), e17.showFiltersText ? (openBlock(), createElementBlock("div", gfe, "Filters")) : createCommentVNode("", true), createVNode(u, { title: "How do filters work?", width: "250", trigger: "hover", "append-to-body": false, "popper-class": "popover" }, { reference: withCtx(() => [ createVNode(c, { icon: "help", class: "help" }) ]), default: withCtx(() => [ mfe ]), _: 1 }) ])), [ [vShow, e17.showFilters], [h10, !e17.cascaderIsReady] ]) ]), _: 1 }), createBaseVNode("div", yfe, [ createBaseVNode("span", bfe, toDisplayString(a.numberOfResultsText), 1), createVNode(f, { class: "number-shown-select", modelValue: e17.numberShown, "onUpdate:modelValue": t[3] || (t[3] = (p) => e17.numberShown = p), placeholder: "10", onChange: t[4] || (t[4] = (p) => a.numberShownChanged(p)) }, { default: withCtx(() => [ (openBlock(true), createElementBlock(Fragment, null, renderList(e17.numberDatasetsShown, (p) => (openBlock(), createBlock(d, { key: p, label: p, value: p }, null, 8, ["label", "value"]))), 128)) ]), _: 1 }, 8, ["modelValue"]) ]) ]); } var eT = Lo(ufe, [["render", wfe], ["__scopeId", "data-v-88a79b0f"]]); var xfe = async function(e17) { if (!e17.ok) { let t = await e17.json(); throw t ? new Error(t.message) : new Error(e17); } return e17; }; var kfe = { searchInput: "", lastSearch: "", results: [], numberOfHits: 0, filter: [], loadingCards: false, numberPerPage: 10, page: 1, pageModel: 1, start: 0, hasSearched: false, contextCardEnabled: false }; var Cfe = { components: { SearchFilters: eT, DatasetCard: h8, SearchHistory: v8, Button: Gr, Card: a3, Drawer: Kg, Icon: nn, Input: $f, Pagination: P3 }, name: "SideBarContent", props: { visible: { type: Boolean, default: false }, isDrawer: { type: Boolean, default: true }, entry: { type: Object, default: () => kfe }, envVars: { type: Object, default: () => { } } }, data: function() { return { ...this.entry, algoliaClient: void 0, bodyStyle: { flex: "1 1 auto", "flex-flow": "column", display: "flex" }, cascaderIsReady: false }; }, computed: { // This computed property populates filter data's entry object with $data from this sidebar filterEntry: function() { return { numberOfHits: this.numberOfHits, filterFacets: this.filter }; } }, methods: { hoverChanged: function(e17) { this.$emit("hover-changed", e17); }, resetSearch: function() { this.numberOfHits = 0, this.discoverIds = [], this._dois = [], this.results = [], this.loadingCards = false; }, openSearch: function(e17, t = "") { this.searchInput = t, this.resetPageNavigation(), this.cascaderIsReady ? (this.filter = this.$refs.filtersRef.getHierarchicalValidatedFilters(e17), e17 && e17.length > 0 && this.filter && this.filter.length === 0 ? (this.$refs.filtersRef.checkShowAllBoxes(), this.resetSearch()) : this.filter && (this.searchAlgolia(this.filter, t), this.$refs.filtersRef.setCascader(this.filter))) : (this.filter = e17, (!e17 || e17.length == 0) && this.searchAlgolia(this.filter, t)); }, addFilter: function(e17) { this.cascaderIsReady ? (this.resetPageNavigation(), e17 && this.$refs.filtersRef.addFilter(e17) && this.$refs.filtersRef.initiateSearch()) : Array.isArray(this.filter) ? this.filter.push(e17) : this.filter = [e17]; }, cascaderReady: function() { this.cascaderIsReady = true, this.openSearch(this.filter, this.searchInput); }, clearSearchClicked: function() { this.searchInput = "", this.resetPageNavigation(), this.searchAlgolia(this.filters, this.searchInput), this.$refs.searchHistory.selectValue = "Full search history"; }, searchEvent: function(e17 = false) { (e17.keyCode === 13 || e17 instanceof MouseEvent) && (this.resetPageNavigation(), this.searchAlgolia(this.filters, this.searchInput), this.$refs.searchHistory.selectValue = "Full search history", this.$refs.searchHistory.addSearchToHistory( this.filters, this.searchInput )); }, filterUpdate: function(e17) { this.filters = [...e17], this.resetPageNavigation(), this.searchAlgolia(e17, this.searchInput), this.$emit("search-changed", { value: e17, type: "filter-update" }); }, searchAlgolia(e17, t = "") { this.loadingCards = true, this.algoliaClient.anatomyInSearch(_k(e17), t).then((n) => { En.emit("anatomy-in-datasets", n.forFlatmap), En.emit("number-of-datasets-for-anatomies", n.forScaffold); }), this.algoliaClient.search(_k(e17), t, this.numberPerPage, this.page).then((n) => { this.numberOfHits = n.total, this.discoverIds = n.discoverIds, this._dois = n.dois, this.results = n.items, this.loadingCards = false, this.scrollToTop(), this.$emit("search-changed", { value: this.searchInput, type: "query-update" }), this._abortController && this._abortController.abort(), this._abortController = new AbortController(); const r = this._abortController.signal; this.perItemSearch(r, { count: 0 }); }); }, filtersLoading: function(e17) { this.loadingCards = e17; }, numberPerPageUpdate: function(e17) { this.numberPerPage = e17, this.pageChange(1); }, pageChange: function(e17) { this.start = (e17 - 1) * this.numberPerPage, this.page = e17, this.searchAlgolia( this.filters, this.searchInput, this.numberPerPage, this.page ); }, handleMissingData: function(e17) { let t = this.results.findIndex((n) => n.doi === e17); this.results[t] && (this.results[t].detailsReady = true); }, perItemSearch: function(e17, t) { if (10 > t.count) { const r = this._dois.shift(); r && (t.count++, this.callSciCrunch(this.envVars.API_LOCATION, { dois: [r] }, e17).then((o) => { o.numberOfHits === 0 ? this.handleMissingData(r) : this.resultsProcessing(o), this.$refs.content.style["overflow-y"] = "scroll", t.count--, this.perItemSearch(e17, t); }).catch((o) => { o.name !== "AbortError" && (this.handleMissingData(r), t.count--, this.perItemSearch(e17, t)); }), this.perItemSearch(e17, t)); } }, scrollToTop: function() { this.$refs.content && this.$refs.content.scroll({ top: 0, behavior: "smooth" }); }, resetPageNavigation: function() { this.start = 0, this.page = 1; }, resultsProcessing: function(e17) { this.lastSearch = this.searchInput, e17.results.length !== 0 && e17.results.forEach((t) => { let n = this.results.findIndex( (r) => t.doi ? t.doi.includes(r.doi) : false ); Object.assign(this.results[n], t), Object.assign(this.results[n], { numberSamples: t.sampleSize ? parseInt(t.sampleSize) : 0, numberSubjects: t.subjectSize ? parseInt(t.subjectSize) : 0, updated: (t.updated && t.updated.length) > 0 ? t.updated[0].timestamp.split("T")[0] : "", url: t.uri[0], datasetId: t.dataset_identifier, datasetRevision: t.dataset_revision, datasetVersion: t.dataset_version, organs: t.organs && t.organs.length > 0 ? [...new Set(t.organs.map((r) => r.name))] : void 0, species: t.organisms && t.organisms[0].species ? [ ...new Set( t.organisms.map( (r) => r.species ? r.species.name : null ) ) ] : void 0, // This processing only includes each gender once into 'sexes' scaffolds: t["abi-scaffold-metadata-file"], thumbnails: t["abi-thumbnail"] ? t["abi-thumbnail"] : t["abi-scaffold-thumbnail"], scaffoldViews: t["abi-scaffold-view-file"], videos: t.video, plots: t["abi-plot"], images: t["common-images"], contextualInformation: t["abi-contextual-information"].length > 0 ? t["abi-contextual-information"] : void 0, segmentation: t["mbf-segmentation"], simulation: t["abi-simulation-file"], additionalLinks: t.additionalLinks, detailsReady: true }), this.results[n] = this.results[n]; }); }, createfilterParams: function(e17) { let t = new URLSearchParams(); for (const n in e17) Array.isArray(e17[n]) ? e17[n].forEach((r) => { t.append(n, r); }) : t.append(n, e17[n]); return t.toString(); }, callSciCrunch: function(e17, t = {}, n) { return new Promise((r, o) => { let a = this.envVars.API_LOCATION + this.searchEndpoint + "?" + this.createfilterParams(t); fetch(a, { signal: n }).then(xfe).then((i) => i.json()).then((i) => r(i)).catch((i) => o(i)); }); }, getAlgoliaFacets: async function() { return await this.algoliaClient.getAlgoliaFacets( Dy ); }, searchHistorySearch: function(e17) { this.searchInput = e17.search, this.filters = e17.filters, this.openSearch(e17.filters, e17.search); } }, mounted: function() { this.algoliaClient = markRaw(new Q8( this.envVars.ALGOLIA_ID, this.envVars.ALGOLIA_KEY, this.envVars.PENNSIEVE_API_LOCATION )), this.algoliaClient.initIndex(this.envVars.ALGOLIA_INDEX), this.openSearch(this.filter, this.searchInput); }, created: function() { this.searchEndpoint = "dataset_info/using_multiple_dois/"; } }; var Efe = { class: "header" }; var Sfe = { class: "content scrollbar", ref: "content" }; var _fe = { key: 0, class: "error-feedback" }; function Tfe(e17, t, n, r, o, a) { const i = $f, s = Gr, u = eT, l = v8, c = h8, d = P3, f = a3, h10 = Nf; return openBlock(), createBlock(f, { "body-style": e17.bodyStyle, class: "content-card" }, { header: withCtx(() => [ createBaseVNode("div", Efe, [ createVNode(i, { class: "search-input", placeholder: "Search", modelValue: e17.searchInput, "onUpdate:modelValue": t[0] || (t[0] = (p) => e17.searchInput = p), onKeyup: a.searchEvent, clearable: "", onClear: a.clearSearchClicked }, null, 8, ["modelValue", "onKeyup", "onClear"]), createVNode(s, { type: "primary", class: "button", onClick: a.searchEvent, size: "large" }, { default: withCtx(() => [ createTextVNode(" Search ") ]), _: 1 }, 8, ["onClick"]) ]) ]), default: withCtx(() => [ createVNode(u, { class: "filters", ref: "filtersRef", entry: a.filterEntry, envVars: n.envVars, onFilterResults: a.filterUpdate, onNumberPerPage: a.numberPerPageUpdate, onLoading: a.filtersLoading, onCascaderReady: a.cascaderReady }, null, 8, ["entry", "envVars", "onFilterResults", "onNumberPerPage", "onLoading", "onCascaderReady"]), createVNode(l, { ref: "searchHistory", onSearch: a.searchHistorySearch }, null, 8, ["onSearch"]), withDirectives((openBlock(), createElementBlock("div", Sfe, [ e17.results.length === 0 && !e17.loadingCards ? (openBlock(), createElementBlock("div", _fe, " No results found - Please change your search / filter criteria. ")) : createCommentVNode("", true), (openBlock(true), createElementBlock(Fragment, null, renderList(e17.results, (p) => (openBlock(), createElementBlock("div", { key: p.doi, class: "step-item" }, [ createVNode(c, { class: "dataset-card", entry: p, envVars: n.envVars, onMouseenter: (v) => a.hoverChanged(p), onMouseleave: t[1] || (t[1] = (v) => a.hoverChanged(void 0)) }, null, 8, ["entry", "envVars", "onMouseenter"]) ]))), 128)), createVNode(d, { class: "pagination", "current-page": e17.page, "onUpdate:currentPage": t[2] || (t[2] = (p) => e17.page = p), "hide-on-single-page": "", large: "", layout: "prev, pager, next", "page-size": e17.numberPerPage, total: e17.numberOfHits, onCurrentChange: a.pageChange }, null, 8, ["current-page", "page-size", "total", "onCurrentChange"]) ])), [ [h10, e17.loadingCards] ]) ]), _: 1 }, 8, ["body-style"]); } var tT = Lo(Cfe, [["render", Tfe], ["__scopeId", "data-v-7574b21a"]]); var Ofe = { name: "AnnotationTool", components: { AnnotationPopup: loe, Button: Gr, CreateTooltipContent: foe, Col: x3, ElIconDelete: F1, Icon: nn, Row: w3 }, props: { annotationEntry: { type: Object }, createData: { type: Object, default: {} } }, data: function() { return { ElIconDelete: shallowRef(F1) }; } }; var Pfe = { class: "annotation-tool scrollbar" }; var $fe = { key: 1, class: "delete-container" }; function Afe(e17, t, n, r, o, a) { const i = resolveComponent("CreateTooltipContent"), s = resolveComponent("annotation-popup"), u = x3, l = Gr, c = w3; return openBlock(), createElementBlock("div", Pfe, [ withDirectives(createVNode(i, { createData: n.createData, onConfirmCreate: t[0] || (t[0] = (d) => e17.$emit("confirm-create", d)), onCancelCreate: t[1] || (t[1] = (d) => e17.$emit("cancel-create")), class: "create-tooltip-content" }, null, 8, ["createData"]), [ [vShow, n.createData && n.createData.toBeConfirmed] ]), n.annotationEntry && (!n.createData || !n.createData.toBeConfirmed) ? (openBlock(), createBlock(s, { key: 0, class: "annotation-popup", annotationEntry: n.annotationEntry, onAnnotation: t[2] || (t[2] = (d) => e17.$emit("annotation", d)) }, null, 8, ["annotationEntry"])) : createCommentVNode("", true), n.createData && n.createData.toBeDeleted ? (openBlock(), createElementBlock("div", $fe, [ createVNode(c, null, { default: withCtx(() => [ createVNode(u, { offset: 1, span: 6 }, { default: withCtx(() => [ createTextVNode("Delete this feature?") ]), _: 1 }), createVNode(u, { offset: 1, span: 3 }, { default: withCtx(() => [ createVNode(l, { class: "delete-button", icon: e17.ElIconDelete, onClick: t[3] || (t[3] = (d) => e17.$emit("confirm-delete")) }, { default: withCtx(() => [ createTextVNode(" Delete ") ]), _: 1 }, 8, ["icon"]) ]), _: 1 }), createVNode(u, { offset: 1, span: 2 }, { default: withCtx(() => [ createVNode(l, { class: "delete-button", onClick: t[4] || (t[4] = (d) => e17.$emit("cancel-create")) }, { default: withCtx(() => [ createTextVNode(" Dismiss ") ]), _: 1 }) ]), _: 1 }) ]), _: 1 }) ])) : createCommentVNode("", true) ]); } var nT = Lo(Ofe, [["render", Afe], ["__scopeId", "data-v-de83d649"]]); var Ffe = { name: "ExternalResourceCard", components: { Button: Gr }, props: { resources: { type: Array, default: () => [] } }, data: function() { return { pubmeds: [], pubmedIds: [], ElIconNotebook: shallowRef(EF) }; }, methods: { capitalise: function(e17) { return e17.charAt(0).toUpperCase() + e17.slice(1); }, openUrl: function(e17) { En.emit("open-pubmed-url", e17), window.open(e17, "_blank"); } } }; var Ife = { class: "resource-container" }; function Nfe(e17, t, n, r, o, a) { const i = Gr; return openBlock(), createElementBlock("div", Ife, [ (openBlock(true), createElementBlock(Fragment, null, renderList(n.resources, (s) => (openBlock(), createElementBlock("div", { key: s.id, class: "resource" }, [ s.id === "pubmed" ? (openBlock(), createBlock(i, { key: 0, class: "button", id: "open-pubmed-button", icon: e17.ElIconNotebook, onClick: (u) => a.openUrl(s.url) }, { default: withCtx(() => [ createTextVNode(" Open publications in PubMed ") ]), _: 2 }, 1032, ["icon", "onClick"])) : createCommentVNode("", true) ]))), 128)) ]); } var rT = Lo(Ffe, [["render", Nfe], ["__scopeId", "data-v-e726c314"]]); var Lfe = (e17) => e17.replace(/\w\S*/g, (t) => t.charAt(0).toUpperCase() + t.substr(1).toLowerCase()); var Cu = function(e17) { return e17 ? e17.charAt(0).toUpperCase() + e17.slice(1) : ""; }; var Dfe = 3e3; var Rfe = { name: "ConnectivityInfo", components: { Button: Gr, Container: ND, Icon: nn, ElIconArrowUp: iF, ElIconArrowDown: _g, ElIconWarning: mC, ExternalResourceCard: rT, CopyToClipboard: F_, ConnectivityGraph: wpe }, props: { entry: { type: Object, default: () => ({ destinations: [], origins: [], components: [], destinationsWithDatasets: [], originsWithDatasets: [], componentsWithDatasets: [], resource: void 0, featuresAlert: void 0 }) }, envVars: { type: Object, default: () => { } }, availableAnatomyFacets: { type: Array, default: () => [] } }, data: function() { return { controller: void 0, activeSpecies: void 0, pubmedSearchUrl: "", loading: false, activeView: "listView", facetList: [], showToolip: false, showDetails: false, originDescriptions: { motor: "is the location of the initial cell body of the circuit", sensory: "is the location of the initial cell body in the PNS circuit" }, componentsWithDatasets: [], uberons: [{ id: void 0, name: void 0 }], connectivityError: null, timeoutID: void 0 }; }, watch: { availableAnatomyFacets: { handler: function(e17) { this.convertFacetsToList(e17); }, immediate: true, deep: true } }, computed: { updatedCopyContent: function() { return this.getUpdateCopyContent(); }, resources: function() { let e17 = []; return this.entry && this.entry.hyperlinks && (e17 = this.entry.hyperlinks), e17; }, originDescription: function() { return this.entry && this.entry.title && this.entry.title.toLowerCase().includes("motor") ? this.originDescriptions.motor : this.originDescriptions.sensory; }, provSpeciesDescription: function() { let e17 = "Studied in"; return this.entry.provenanceTaxonomyLabel.forEach((t) => { e17 += ` ${t},`; }), e17 = e17.slice(0, -1), e17 += " species", e17; } }, methods: { titleCase: function(e17) { return Lfe(e17); }, capitalise: function(e17) { return Cu(e17); }, openUrl: function(e17) { window.open(e17, "_blank"); }, openAll: function() { En.emit("onConnectivityActionClick", { type: "Facets", labels: this.entry.componentsWithDatasets.map((e17) => e17.name.toLowerCase()) }); }, openAxons: function() { En.emit("onConnectivityActionClick", { type: "Facets", labels: this.entry.destinationsWithDatasets.map((e17) => e17.name.toLowerCase()) }); }, // shouldShowExploreButton: Checks if the feature is in the list of available anatomy facets shouldShowExploreButton: function(e17) { for (let t = 0; t < e17.length; t++) if (this.facetList.includes(e17[t].name.toLowerCase())) return true; return false; }, // convertFacetsToList: Converts the available anatomy facets to a list for easy searching convertFacetsToList: function(e17) { e17.forEach((t) => { t.children ? this.convertFacetsToList(t.children) : this.facetList.push(t.label.toLowerCase()); }); }, openDendrites: function() { En.emit("onConnectivityActionClick", { type: "Facets", labels: this.entry.originsWithDatasets.map((e17) => e17.name.toLowerCase()) }); }, pubmedSearchUrlUpdate: function(e17) { this.pubmedSearchUrl = e17; }, showConnectivity: function(e17) { const t = e17.featureId || []; this.$emit("show-connectivity", t); }, switchConnectivityView: function(e17) { if (this.activeView = e17, e17 === "graphView") { const t = this.$refs.connectivityGraphRef; t && t.$el && t.$el.scrollIntoView({ behavior: "smooth" }); } }, onTapNode: function(e17) { const t = e17.map((n) => n.label).join(", "); this.toggleConnectivityTooltip(t, { show: true }); }, getUpdateCopyContent: function() { var n, r, o, a, i; if (!this.entry) return ""; const e17 = []; if (this.entry.title ? e17.push(`
${Cu(this.entry.title)}
`) : e17.push(`
${this.entry.featureId}
`), (n = this.entry.provenanceTaxonomyLabel) != null && n.length && e17.push(`
${this.provSpeciesDescription}
`), (r = this.resources) != null && r.length) { const s = []; this.resources.forEach((u) => { let l = ""; u.id === "pubmed" && (l += "
PubMed URL:
", l += ` `, l += ``), s.push(l); }), e17.push(s.join(`
`)); } this.entry.paths && e17.push(`
${this.entry.paths}
`); function t(s, u, l = []) { let c = `
${s}
`; const d = []; u.forEach((h10) => { let p = []; h10.split(",").forEach((v) => { const m = l.find((g) => g.name === v.trim()); m ? p.push(`${Cu(v)} (${m.id})`) : p.push(`${Cu(v)}`); }), d.push(p.join(",")); }); const f = d.map((h10) => `
  • ${h10}
  • `).join(` `); return c += ` `, c += `
      ${f}
    `, c; } if ((o = this.entry.origins) != null && o.length) { const s = "Origin", u = this.entry.origins, l = this.entry.originsWithDatasets, c = t(s, u, l); e17.push(c); } if ((a = this.entry.components) != null && a.length) { const s = "Components", u = this.entry.components, l = this.entry.componentsWithDatasets, c = t(s, u, l); e17.push(c); } if ((i = this.entry.destinations) != null && i.length) { const s = "Destination", u = this.entry.destinations, l = this.entry.destinationsWithDatasets, c = t(s, u, l); e17.push(c); } return e17.join(`
    `); }, toggleConnectivityTooltip: function(e17, t) { const n = [ ...this.entry.componentsWithDatasets, ...this.entry.destinationsWithDatasets, ...this.entry.originsWithDatasets ], r = e17.split(","), o = []; t.show && r.forEach((a) => { const i = n.find( (s) => s.name.toLowerCase().trim() === a.toLowerCase().trim() ); i && o.push({ id: i.id, label: i.name }); }), this.$emit("connectivity-component-click", o); }, getErrorConnectivities: function(e17) { const t = [...new Set(e17)]; let n = ""; return t.forEach((r, o) => { const { label: a } = r; n += o === 0 ? Cu(a) : a, t.length > 1 && (o + 2 === t.length ? n += " and " : o + 1 < t.length && (n += ", ")); }), n; }, /** * Function to show error message. * `errorInfo` includes `errorData` array (optional) for error connectivities * and `errorMessage` for error message. * @arg `errorInfo` */ getConnectivityError: function(e17) { const { errorData: t, errorMessage: n } = e17; return { errorConnectivities: this.getErrorConnectivities(t), errorMessage: n }; }, pushConnectivityError: function(e17) { const t = this.getConnectivityError(e17), n = this.$refs.connectivityGraphRef; n && n.showErrorMessage(t), this.connectivityError = { ...t }, this.timeoutID && clearTimeout(this.timeoutID), this.timeoutID = setTimeout(() => { this.connectivityError = null; }, Dfe); } }, mounted: function() { En.on("connectivity-graph-error", (e17) => { this.pushConnectivityError(e17); }); } }; var Ls = (e17) => (pushScopeId("data-v-50c6e446"), e17 = e17(), popScopeId(), e17); var Bfe = { key: 0, class: "main" }; var Mfe = { class: "connectivity-info-title" }; var zfe = { key: 0, class: "block" }; var Vfe = { class: "title" }; var jfe = { style: { "word-break": "keep-all" } }; var Hfe = { key: 0, class: "subtitle" }; var Ufe = { key: 1, class: "block" }; var qfe = { class: "title" }; var Wfe = { key: 2, class: "block" }; var Kfe = { class: "title-buttons" }; var Gfe = Ls(() => createBaseVNode("span", null, " Show connectivity on map ", -1)); var Xfe = { class: "content-container population-display" }; var Yfe = Ls(() => createBaseVNode("div", { class: "block attribute-title-container" }, [ createBaseVNode("span", { class: "attribute-title" }, "Population Display") ], -1)); var Zfe = { class: "block buttons-row" }; var Jfe = { key: 0, class: "content-container content-container-connectivity" }; var Qfe = { key: 0, class: "block" }; var ehe = { class: "attribute-title-container" }; var the = Ls(() => createBaseVNode("span", { class: "attribute-title" }, "Origin", -1)); var nhe = { style: { "word-break": "keep-all" } }; var rhe = Ls(() => createBaseVNode("i", null, "Origin", -1)); var ohe = ["origin-item-label", "onMouseenter", "onMouseleave"]; var ahe = { key: 1, class: "block" }; var ihe = Ls(() => createBaseVNode("div", { class: "attribute-title-container" }, [ createBaseVNode("div", { class: "attribute-title" }, "Components") ], -1)); var she = ["component-item-label", "onMouseenter", "onMouseleave"]; var lhe = { key: 2, class: "block" }; var uhe = { class: "attribute-title-container" }; var che = Ls(() => createBaseVNode("span", { class: "attribute-title" }, "Destination", -1)); var dhe = Ls(() => createBaseVNode("span", { style: { "word-break": "keep-all" } }, [ createBaseVNode("i", null, "Destination"), createTextVNode(" is where the axons terminate ") ], -1)); var phe = ["destination-item-label", "onMouseenter", "onMouseleave"]; var fhe = { class: "block" }; var hhe = { key: 3, class: "connectivity-error-container" }; var vhe = { class: "connectivity-error" }; var ghe = { key: 0 }; var mhe = { key: 1, class: "content-container" }; function yhe(e17, t, n, r, o, a) { const i = TF, s = nn, u = Yg, l = rT, c = xF, d = Gr, f = resolveComponent("CopyToClipboard"), h10 = mC, p = resolveComponent("connectivity-graph"), v = Nf; return n.entry ? withDirectives((openBlock(), createElementBlock("div", Bfe, [ createBaseVNode("div", Mfe, [ createBaseVNode("div", null, [ n.entry.title ? (openBlock(), createElementBlock("div", zfe, [ createBaseVNode("div", Vfe, [ createTextVNode(toDisplayString(a.capitalise(n.entry.title)) + " ", 1), n.entry.featuresAlert ? (openBlock(), createBlock(u, { key: 0, width: "250", trigger: "hover", teleported: false, "popper-class": "popover-origin-help" }, { reference: withCtx(() => [ createVNode(s, { class: "alert" }, { default: withCtx(() => [ createVNode(i) ]), _: 1 }) ]), default: withCtx(() => [ createBaseVNode("span", jfe, toDisplayString(n.entry.featuresAlert), 1) ]), _: 1 })) : createCommentVNode("", true) ]), n.entry.provenanceTaxonomyLabel && n.entry.provenanceTaxonomyLabel.length > 0 ? (openBlock(), createElementBlock("div", Hfe, toDisplayString(a.provSpeciesDescription), 1)) : createCommentVNode("", true) ])) : (openBlock(), createElementBlock("div", Ufe, [ createBaseVNode("div", qfe, toDisplayString(n.entry.featureId), 1) ])), a.resources.length ? (openBlock(), createElementBlock("div", Wfe, [ createVNode(l, { resources: a.resources }, null, 8, ["resources"]) ])) : createCommentVNode("", true) ]), createBaseVNode("div", Kfe, [ createVNode(u, { width: "auto", trigger: "hover", teleported: false, "popper-class": "popover-map-pin" }, { reference: withCtx(() => [ createVNode(d, { class: "button-circle", circle: "", onClick: t[0] || (t[0] = (m) => a.showConnectivity(n.entry)) }, { default: withCtx(() => [ createVNode(s, { color: "white" }, { default: withCtx(() => [ createVNode(c) ]), _: 1 }) ]), _: 1 }) ]), default: withCtx(() => [ Gfe ]), _: 1 }), createVNode(f, { content: a.updatedCopyContent }, null, 8, ["content"]) ]) ]), createBaseVNode("div", Xfe, [ Yfe, createBaseVNode("div", Zfe, [ createVNode(d, { class: normalizeClass(e17.activeView === "listView" ? "button" : "el-button-secondary"), onClick: t[1] || (t[1] = (m) => a.switchConnectivityView("listView")) }, { default: withCtx(() => [ createTextVNode(" List view ") ]), _: 1 }, 8, ["class"]), createVNode(d, { class: normalizeClass(e17.activeView === "graphView" ? "button" : "el-button-secondary"), onClick: t[2] || (t[2] = (m) => a.switchConnectivityView("graphView")) }, { default: withCtx(() => [ createTextVNode(" Graph view ") ]), _: 1 }, 8, ["class"]) ]) ]), e17.activeView === "listView" ? (openBlock(), createElementBlock("div", Jfe, [ createTextVNode(toDisplayString(n.entry.paths) + " ", 1), n.entry.origins && n.entry.origins.length > 0 ? (openBlock(), createElementBlock("div", Qfe, [ createBaseVNode("div", ehe, [ the, createVNode(u, { width: "250", trigger: "hover", teleported: false, "popper-class": "popover-origin-help" }, { reference: withCtx(() => [ createVNode(s, { class: "info" }, { default: withCtx(() => [ createVNode(h10) ]), _: 1 }) ]), default: withCtx(() => [ createBaseVNode("span", nhe, [ rhe, createTextVNode(" " + toDisplayString(a.originDescription), 1) ]) ]), _: 1 }) ]), (openBlock(true), createElementBlock(Fragment, null, renderList(n.entry.origins, (m, g) => (openBlock(), createElementBlock("div", { class: "attribute-content", "origin-item-label": m, key: m, onMouseenter: (b) => a.toggleConnectivityTooltip(m, { show: true }), onMouseleave: (b) => a.toggleConnectivityTooltip(m, { show: false }) }, toDisplayString(a.capitalise(m)), 41, ohe))), 128)), withDirectives(createVNode(d, { class: "button", id: "open-dendrites-button", onClick: a.openDendrites }, { default: withCtx(() => [ createTextVNode(" Explore origin data ") ]), _: 1 }, 8, ["onClick"]), [ [ vShow, n.entry.originsWithDatasets && n.entry.originsWithDatasets.length > 0 && a.shouldShowExploreButton(n.entry.originsWithDatasets) ] ]) ])) : createCommentVNode("", true), n.entry.components && n.entry.components.length > 0 ? (openBlock(), createElementBlock("div", ahe, [ ihe, (openBlock(true), createElementBlock(Fragment, null, renderList(n.entry.components, (m, g) => (openBlock(), createElementBlock("div", { class: "attribute-content", "component-item-label": m, key: m, onMouseenter: (b) => a.toggleConnectivityTooltip(m, { show: true }), onMouseleave: (b) => a.toggleConnectivityTooltip(m, { show: false }) }, toDisplayString(a.capitalise(m)), 41, she))), 128)) ])) : createCommentVNode("", true), n.entry.destinations && n.entry.destinations.length > 0 ? (openBlock(), createElementBlock("div", lhe, [ createBaseVNode("div", uhe, [ che, createVNode(u, { width: "250", trigger: "hover", teleported: false, "popper-class": "popover-origin-help" }, { reference: withCtx(() => [ createVNode(s, { class: "info" }, { default: withCtx(() => [ createVNode(h10) ]), _: 1 }) ]), default: withCtx(() => [ dhe ]), _: 1 }) ]), (openBlock(true), createElementBlock(Fragment, null, renderList(n.entry.destinations, (m, g) => (openBlock(), createElementBlock("div", { class: "attribute-content", "destination-item-label": m, key: m, onMouseenter: (b) => a.toggleConnectivityTooltip(m, { show: true }), onMouseleave: (b) => a.toggleConnectivityTooltip(m, { show: false }) }, toDisplayString(a.capitalise(m)), 41, phe))), 128)), withDirectives(createVNode(d, { class: "button", onClick: a.openAxons }, { default: withCtx(() => [ createTextVNode(" Explore destination data ") ]), _: 1 }, 8, ["onClick"]), [ [ vShow, n.entry.destinationsWithDatasets && n.entry.destinationsWithDatasets.length > 0 && a.shouldShowExploreButton(n.entry.destinationsWithDatasets) ] ]) ])) : createCommentVNode("", true), withDirectives(createBaseVNode("div", fhe, [ createVNode(d, { class: "button", onClick: a.openAll }, { default: withCtx(() => [ createTextVNode(" Search for data on components ") ]), _: 1 }, 8, ["onClick"]) ], 512), [ [ vShow, n.entry.componentsWithDatasets && n.entry.componentsWithDatasets.length > 0 && a.shouldShowExploreButton(n.entry.componentsWithDatasets) ] ]), e17.connectivityError ? (openBlock(), createElementBlock("div", hhe, [ createBaseVNode("div", vhe, [ e17.connectivityError.errorConnectivities ? (openBlock(), createElementBlock("strong", ghe, toDisplayString(e17.connectivityError.errorConnectivities), 1)) : createCommentVNode("", true), createTextVNode(" " + toDisplayString(e17.connectivityError.errorMessage), 1) ]) ])) : createCommentVNode("", true) ])) : createCommentVNode("", true), e17.activeView === "graphView" ? (openBlock(), createElementBlock("div", mhe, [ createVNode(p, { entry: n.entry.featureId[0], mapServer: n.envVars.FLATMAPAPI_LOCATION, onTapNode: a.onTapNode, ref: "connectivityGraphRef" }, null, 8, ["entry", "mapServer", "onTapNode"]) ])) : createCommentVNode("", true) ])), [ [v, e17.loading] ]) : createCommentVNode("", true); } var oT = Lo(Rfe, [["render", yhe], ["__scopeId", "data-v-50c6e446"]]); var bhe = { name: "Tabs", props: { tabTitles: { type: Array, default: () => [] }, activeId: { type: Number, default: 1 } }, methods: { titleClicked: function(e17, t) { this.$emit("titleClicked", { id: e17, type: t }); }, tabClose: function(e17) { this.$emit("tab-close", e17); } } }; var whe = (e17) => (pushScopeId("data-v-ed1ce6dc"), e17 = e17(), popScopeId(), e17); var xhe = { class: "tab-container" }; var khe = ["onClick"]; var Che = { class: "title-text" }; var Ehe = whe(() => createBaseVNode("span", { class: "visually-hidden" }, "Close", -1)); function She(e17, t, n, r, o, a) { const i = Gr; return openBlock(), createElementBlock("div", xhe, [ (openBlock(true), createElementBlock(Fragment, null, renderList(n.tabTitles, (s) => (openBlock(), createElementBlock("div", { class: normalizeClass(["title", { "active-tab": s.id == n.activeId }]), key: s.id }, [ createBaseVNode("div", { class: normalizeClass(["title-text-table", { highlightText: s.id == n.activeId }]), onClick: (u) => a.titleClicked(s.id, s.type) }, [ createBaseVNode("div", Che, toDisplayString(s.title), 1) ], 10, khe), s.id > 1 ? (openBlock(), createBlock(i, { key: 0, onClick: (u) => a.tabClose(s.id), class: "button-tab-close", "aria-label": "Close" }, { default: withCtx(() => [ createTextVNode(" × "), Ehe ]), _: 2 }, 1032, ["onClick"])) : createCommentVNode("", true) ], 2))), 128)) ]); } var aT = Lo(bhe, [["render", She], ["__scopeId", "data-v-ed1ce6dc"]]); var _he = { components: { SidebarContent: tT, Tabs: aT, ElIconArrowLeft: Tg, ElIconArrowRight: Cf, Drawer: Kg, Icon: nn, ConnectivityInfo: oT, AnnotationTool: nT }, name: "SideBar", props: { /** * The option to show side bar. */ visible: { type: Boolean, default: false }, /** * The environment variables object with * `API_LOCATION`, `ALGOLIA_KEY`, `ALGOLIA_ID`, * `ALGOLIA_INDEX`, `PENNSIEVE_API_LOCATION`, `BL_SERVER_URL`, * `NL_LINK_PREFIX`, `ROOT_URL` */ envVars: { type: Object, default: () => { } }, /** * The array of objects to show multiple sidebar contents. */ tabs: { type: Array, default: () => [ { id: 1, title: "Search", type: "search" }, { id: 2, title: "Connectivity", type: "connectivity" }, { id: 3, title: "Annotation", type: "annotation" } ] }, /** * The active tab id for default tab. */ activeTabId: { type: Number, default: 1 }, /** * The option to show or hide sidebar on page load. */ openAtStart: { type: Boolean, default: false }, /** * The connectivity info data to show in sidebar. */ connectivityInfo: { type: Object, default: null }, /** * The annotation data to show in sidebar. */ annotationEntry: { type: Object, default: null }, createData: { type: Object, default: null } }, data: function() { return { drawerOpen: false, availableAnatomyFacets: [] }; }, methods: { /** * This event is emitted when the mouse hover are changed. * @arg data */ hoverChanged: function(e17) { this.$emit("hover-changed", e17); }, /** * This event is emitted when the show connectivity button is clicked. * @arg featureIds */ showConnectivity: function(e17) { this.$emit("show-connectivity", e17); }, /** * This function is triggered after a connectivity component is clicked. * @arg data */ onConnectivityComponentClick: function(e17) { this.$emit("connectivity-component-click", e17); }, /** * This event is emitted when the search filters are changed. * @arg `obj` {data, id} */ searchChanged: function(e17, t) { this.$emit("search-changed", { ...t, id: e17 }); }, /** * The function to close sidebar. * @public */ close: function() { this.drawerOpen = false; }, /** * The function to toggle (open and close) sidebar. * @public */ toggleDrawer: function() { this.drawerOpen = !this.drawerOpen; }, openSearch: function(e17, t) { this.drawerOpen = true, this.$nextTick(() => { this.getSearchTabRefById(1).openSearch(e17, t); }); }, /** * Get the tab object by tab id and type. * If not found, return the first available tab. */ getTabByIdAndType: function(e17, t) { const n = e17 || this.activeTabId, r = t || "search", o = this.tabs.find((i) => i.id === n && i.type === r), a = this.tabs[0]; return o || a; }, /** * Get the ref id of the tab by id and type. */ getTabRefId: function(e17, t) { let n = "searchTab_"; t === "connectivity" ? n = "connectivityTab_" : t === "annotation" && (n = "annotationTab_"); const r = this.getTabByIdAndType(e17, t); return n + r.id; }, getSearchTabRefById: function(e17) { const t = e17 || 1, n = this.getTabRefId(t, "search"); return this.$refs[n][0]; }, /** * The function to add filters to sidebar search. * * @param {Object} filter * @public */ addFilter: function(e17) { this.drawerOpen = true, e17.AND = true, this.$nextTick(() => { this.getSearchTabRefById(1).addFilter(e17); }); }, openNeuronSearch: function(e17) { this.drawerOpen = true, this.$nextTick(() => { this.getSearchTabRefById(1).openSearch( "", void 0, "scicrunch-query-string/", { field: "*organ.curie", curie: e17 } ); }); }, getAlgoliaFacets: async function() { return await this.getSearchTabRefById(1).getAlgoliaFacets(); }, setDrawerOpen: function(e17 = true) { this.drawerOpen = e17; }, /** * The function to emit 'tabClicked' event with tab's `id` and tab's `type` * when user clicks the sidebar tab. * @param {Object} {id, type} * @public */ tabClicked: function({ id: e17, type: t }) { this.$emit("tabClicked", { id: e17, type: t }); }, tabClose: function(e17) { this.$emit("tab-close", e17); }, /** * To receive error message for connectivity graph * @param {String} errorMessage */ updateConnectivityGraphError: function(e17) { En.emit("connectivity-graph-error", e17); } }, computed: { activeTabs: function() { const e17 = [ { id: 1, title: "Search", type: "search" } ]; return this.connectivityInfo && e17.push({ id: 2, title: "Connectivity", type: "connectivity" }), this.annotationEntry && Object.keys(this.annotationEntry).length > 0 && e17.push({ id: 3, title: "Annotation", type: "annotation" }), e17; } }, created: function() { this.drawerOpen = this.openAtStart; }, mounted: function() { En.on("PopoverActionClick", (e17) => { this.$emit("actionClick", e17); }), En.on("number-of-datasets-for-anatomies", (e17) => { this.$emit("number-of-datasets-for-anatomies", e17); }), En.on("anatomy-in-datasets", (e17) => { this.$emit("anatomy-in-datasets", e17); }), En.on("contextUpdate", (e17) => { this.$emit("contextUpdate", e17); }), En.on("datalink-clicked", (e17) => { this.$emit("datalink-clicked", e17); }), En.on("onConnectivityActionClick", (e17) => { this.tabClicked({ id: 1, type: "search" }), this.$emit("actionClick", e17); }), En.on("available-facets", (e17) => { this.availableAnatomyFacets = e17.find((t) => t.label === "Anatomical Structure").children; }); } }; var The = { ref: "container" }; var Ohe = { class: "box-card" }; var Phe = { class: "sidebar-container" }; function $he(e17, t, n, r, o, a) { const i = Tg, s = nn, u = Cf, l = aT, c = oT, d = nT, f = tT, h10 = Kg; return openBlock(), createElementBlock("div", The, [ e17.drawerOpen ? createCommentVNode("", true) : (openBlock(), createElementBlock("div", { key: 0, onClick: t[0] || (t[0] = (...p) => a.toggleDrawer && a.toggleDrawer(...p)), class: "open-tab" }, [ createVNode(s, null, { default: withCtx(() => [ createVNode(i) ]), _: 1 }) ])), createVNode(h10, { class: "side-bar my-drawer", modelValue: e17.drawerOpen, "onUpdate:modelValue": t[7] || (t[7] = (p) => e17.drawerOpen = p), teleported: false, "modal-append-to-body": false, size: "584", "with-header": false, wrapperClosable: false, modal: false, "modal-class": "sidebar-body", "z-index": 10, "lock-scroll": false }, { default: withCtx(() => [ createBaseVNode("div", Ohe, [ e17.drawerOpen ? (openBlock(), createElementBlock("div", { key: 0, onClick: t[1] || (t[1] = (...p) => a.close && a.close(...p)), class: "close-tab" }, [ createVNode(s, null, { default: withCtx(() => [ createVNode(u) ]), _: 1 }) ])) : createCommentVNode("", true), createBaseVNode("div", Phe, [ a.activeTabs.length > 1 ? (openBlock(), createBlock(l, { key: 0, tabTitles: a.activeTabs, activeId: n.activeTabId, onTitleClicked: a.tabClicked, onTabClose: a.tabClose }, null, 8, ["tabTitles", "activeId", "onTitleClicked", "onTabClose"])) : createCommentVNode("", true), (openBlock(true), createElementBlock(Fragment, null, renderList(n.tabs, (p) => (openBlock(), createElementBlock(Fragment, { key: "tab.id" }, [ p.type === "connectivity" && n.connectivityInfo ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [ p.id === n.activeTabId ? (openBlock(), createBlock(c, { key: 0, entry: n.connectivityInfo, availableAnatomyFacets: e17.availableAnatomyFacets, envVars: n.envVars, ref_for: true, ref: "connectivityTab_" + p.id, onShowConnectivity: a.showConnectivity, onConnectivityComponentClick: a.onConnectivityComponentClick }, null, 8, ["entry", "availableAnatomyFacets", "envVars", "onShowConnectivity", "onConnectivityComponentClick"])) : createCommentVNode("", true) ], 64)) : p.type === "annotation" ? withDirectives((openBlock(), createBlock(d, { key: 1, ref_for: true, ref: "annotationTab_" + p.id, annotationEntry: n.annotationEntry, createData: n.createData, onAnnotation: t[2] || (t[2] = (v) => e17.$emit("annotation-submitted", v)), onConfirmCreate: t[3] || (t[3] = (v) => e17.$emit("confirm-create", v)), onCancelCreate: t[4] || (t[4] = (v) => e17.$emit("cancel-create")), onConfirmDelete: t[5] || (t[5] = (v) => e17.$emit("confirm-delete", v)) }, null, 8, ["annotationEntry", "createData"])), [ [vShow, p.id === n.activeTabId] ]) : withDirectives((openBlock(), createBlock(f, { key: 2, class: "sidebar-content-container", contextCardEntry: p.contextCard, envVars: n.envVars, ref_for: true, ref: "searchTab_" + p.id, onSearchChanged: (v) => a.searchChanged(p.id, v), onHoverChanged: t[6] || (t[6] = (v) => a.hoverChanged(v)) }, null, 8, ["contextCardEntry", "envVars", "onSearchChanged"])), [ [vShow, p.id === n.activeTabId] ]) ], 64))), 128)) ]) ]) ]), _: 1 }, 8, ["modelValue"]) ], 512); } var Ihe = Lo(_he, [["render", $he], ["__scopeId", "data-v-f6b40708"]]); export { Ihe as SideBar }; /*! Bundled license information: @abi-software/map-side-bar/dist/map-side-bar.js: (** * @vue/shared v3.4.21 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **) (*! Element Plus Icons Vue v2.3.1 *) (** * @vue/shared v3.4.27 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **) (*! 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) *) (*! 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 *) (*! Bezier curve function generator. Copyright Gaetan Renaudeau. MIT License: http://en.wikipedia.org/wiki/MIT_License *) (*! Runge-Kutta spring physics function generator. Adapted from Framer.js, copyright Koen Bok. MIT License: http://en.wikipedia.org/wiki/MIT_License *) (*! algoliasearch.umd.js | 4.23.2 | © Algolia, inc. | https://github.com/algolia/algoliasearch-client-javascript *) */ //# sourceMappingURL=@abi-software_map-side-bar.js.map